diff --git a/llm-content/announcements/gst-changes.md b/llm-content/announcements/gst-changes.md new file mode 100644 index 00000000..d09d8e38 --- /dev/null +++ b/llm-content/announcements/gst-changes.md @@ -0,0 +1,43 @@ +--- +title: GST Changes for E-invoicing w.e.f. 01 January 2021 +description: Check the changes in the GST guidelines regarding e-invoicing, effective from 01 January 2021. Check the actions required to help us comply with the regulations. +--- + +# GST Changes for E-invoicing w.e.f. 01 January 2021 + +As per the GST guidelines, effective from 01 January 2021, all B2B invoices raised in the month of January will need to be registered on the Invoice Registration Portal (IRP). Therefore, the invoices for the billing period of 1-30 December will be raised by Razorpay on 31 December. The next billing cycle will include charges borne on 31 December 2020. + +Billing Cycle | Invoice for the month of +--- +01 - 30 December 2020 | December 2021 +--- +31 Dec - 31 January 2020 | January 2021 + +## FAQs + +#### 1. What is e-invoicing under GST? + E-invoicing is a system in which B2B invoices are electronically authenticated via the common GST portal. Once an invoice is electronically authenticated on the IRP, it is issued a unique identification number called the IRN. This eliminates the need for manual data entry while filing GST-1 return, as the information will be passed directly from the IRP to the GST Portal. + + Razorpay B2B invoices raised in January 2021 will include an IRN and a QR code, as can be seen below: + + ![Razorpay e-Invoice Example](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/gst-changes-razorpay-invoice.jpg.md) + +#### 2. Who is `e-invoicing` applicable to? + If you have updated your GSTIN on your Razorpay Account, B2B invoices raised in January 2021 for the billing period of 31 December 2020 to 31 January 2021 will be registered on the GST Invoice Registration Portal. + + If you have not updated the GSTIN, you will receive a B2C invoice. This invoice does not need to be registered on the IRP as of now. + +#### 3. What are the changes applicable from 01 January 2021? + Any invoice raised in the month of January 2021 will need to be registered on the GST IRP. The IRP will issue the invoice a QR code and an IRN. + +#### 4. Why is this change occurring? + All the invoices raised in January 2021 will be registered on the IRP. Hence, it is necessary to raise an invoice for the December billing cycle in December to allow you and Razorpay to be GST compliant. + + Ensure that your GSTIN, address and PIN code available on the Dashboard is up to date. You can update these by raising a request with our [Support team](https://razorpay.com/support/#request). + + If your GSTIN, address and PIN code are not up to date, we may not be able to register your invoice on the GST portal, leading to non-compliance. This may affect any GST input credit you may be availing. + +#### 5. Why has 31 December 2020 not been added to the billing cycle of December? + Due to the guidelines, any invoice raised in January 2021 must be registered on the GST IRP. Therefore, to minimise impact, the invoice for the billing period of 1-30 December 2020 will be raised by Razorpay on 31 December. + + Charges for Razorpay’s services for 31 December will be billed in the cycle of 31 December to 31 January in order to be GST compliant. diff --git a/llm-content/announcements/rbi-card-mandate-guidelines/recurring-payments.md b/llm-content/announcements/rbi-card-mandate-guidelines/recurring-payments.md new file mode 100644 index 00000000..a27e12d6 --- /dev/null +++ b/llm-content/announcements/rbi-card-mandate-guidelines/recurring-payments.md @@ -0,0 +1,83 @@ +--- +title: RBI Directive on Recurring Card Payments +description: Check the changes in the RBI Guidelines released on 31st March 2021, regarding recurring card payments. +--- + +# RBI Directive on Recurring Card Payments + +Further to the [circular (issued on 21 Aug 2019)](https://rbidocs.rbi.org.in/rdocs/notification/PDFs/47EMANDATE39D1306C26AE4B44B2EA0050F23E7E3D.PDF) and the [press release (issued on 31 March 2021)](https://rbidocs.rbi.org.in/rdocs/PressRelease/PDFs/PR1326B5CD909C140349E9A7295435E69893D0.PDF), RBI released a new circular on 31 March 2021, regarding registration of new card mandates. You can find the new RBI circular [here](https://rbidocs.rbi.org.in/rdocs/notification/PDFs/NOT11820DB6EC9DF8A4611926B0A897918D64F.PDF). + +## Guidelines for Issuing Banks (To be complied by 30 Sep 2021) + +RBI has issued the following guidelines for issuing banks to authorise mandates and collect recurring payments on credit cards, debit cards and prepaid instruments. RBI has announced this step to make card transactions safer and secured. + +- All mandate registrations must go through Additional Factor of Authentication (AFA). AFA is a process wherein a customer receives an OTP or card PIN during modification or revocation of the mandate and the first transaction. +- AFA is mandatory for registering mandates on cards. The maximum limit for registering mandates is ₹15,000. You can refer to the [RBI circular](https://rbidocs.rbi.org.in/rdocs/notification/PDFs/DPSSSIDEC420205A3895EA5B6044F2B4AB7A133FE35AD7.PDF). +- At the time of registration, banks should provide customers with the option to choose the communication medium (SMS or email) to which the pre-debit notifications will be sent. +- Banks should send customers a pre-debit notification at least 24 hours before the actual debit. The notification must contain all the information regarding the upcoming debit. Customers should be provided with an option to opt-out of the particular debit or the mandate. +- Banks should also send a post-debit notification to the customers. This notification should contain all the information regarding the debit. +- Banks must provide customers with an online facility through which customers can withdraw from any e-mandate at any point in time. The customers will have to perform the AFA at the time of withdrawal. +- For all such withdrawn e-mandates, the acquiring banks should ensure that the respective businesses delete all customer payment information. +- Banks should set up redressal system to address customers grievances. Card networks should also have a dispute resolution mechanism in place. + +> **INFO** +> +> +> **Note** +> +> You do not need to make any integration changes at your end. The circular applies to the issuing banks, and the banks need to implement the changes mentioned above. +> + +## Impact on Existing and New Mandates + +The impact of the new guidelines is given below: + +Existing Mandates | New Mandates +--- +As per the [press release](https://rbidocs.rbi.org.in/rdocs/PressRelease/PDFs/PR1326B5CD909C140349E9A7295435E69893D0.PDF), there will be no impact on existing card mandates from 1 April 2021. Recurring payments will continue to be processed on such mandates. | As per the [new circular](https://rbidocs.rbi.org.in/rdocs/notification/PDFs/NOT11820DB6EC9DF8A4611926B0A897918D64F.PDF), your customers may not be able to sign up new mandates on cards from 1 April 2021 till issuing banks comply with the guidelines issued in the RBI circular dated 21 August 2019. + +## Alternative Solution: UPI Autopay + +We will soon be enabling UPI Autopay on your Dashboard. You can create a registration link that allows your customers to choose UPI to make recurring payments. + +### Supporting Banks and UPI Apps + +- Mandates on UPI Autopay can be set up using ICICI, SBI and HDFC accounts on UPI collect flow. + +- Only BHIM and Paytm UPI apps are supported on UPI Autopay. + +If you do not want to use UPI Autopay, you can disable it from the Settings tab on the Subscriptions page from the Dashboard. + +**Read More**: Learn more about UPI Autopay from our [blog](https://razorpay.com/blog/what-is-upi-autopay-recurring-payments-razorpay-subscriptions/) and [documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md). + +## MandateHQ: Helping Issuing Banks Comply with the RBI Circular + +The RBI has given a 6 months extension (till 30 Sep 2021) to all issuing banks to comply with the guidelines set forth in the circular. + +- Razorpay has partnered with Mastercard to launch MandateHQ - a plug-and-play solution that will allow issuing banks to offer standing instructions on credit cards, debit cards and pre-paid instruments in compliance with the RBI circular. + +- We are working with most of the issuing banks to on-board them on MandateHQ and ensure a smooth transition by 30 Sep 2021. We will keep you posted when banks start going live. + +## FAQs + +Given below are some of the frequently asked questions. + +#### 1. Will debits on card mandates registered before 1 April work from 1 April 2021? + +Yes, card tokens registered before 1 April will work post 1 April 2021. + +#### 2. Can we register new card mandates from 1 April 2021? + +As per the new circular released by RBI on 31 March 2021, no new mandate for recurring online transactions shall be registered by stakeholders, unless such mandates are compliant with the circular dated 21 August 2019. + +#### 3. How many banks are currently compliant with the RBI circular? + +We are working with most of the issuing banks to on-board them on MandateHQ and help them comply with the RBI circular before 30 Sep 2021. We will keep you posted when banks start going live. + +#### 4. Will this impact mandates via other methods such as E-mandate, Paper NACH and UPI Autopay? + +This change does not impact mandates using UPI Autopay, E-Mandate and PaperNACH. You can continue to register new mandates and charge the existing ones via these methods. + +#### 5. Will existing mandates registered through international cards be impacted? + +No, the RBI circular is applicable only for issuing banks in India. International card mandates will continue to work. diff --git a/llm-content/announcements/rbi-card-mandate-guidelines/recurring-payments/cards.md b/llm-content/announcements/rbi-card-mandate-guidelines/recurring-payments/cards.md new file mode 100644 index 00000000..71a29e4b --- /dev/null +++ b/llm-content/announcements/rbi-card-mandate-guidelines/recurring-payments/cards.md @@ -0,0 +1,161 @@ +--- +title: Cards Go Live on Recurring Payments +description: Check the banks that are going live on cards, existing mandates management and action to be taken by businesses to process recurring payments on card mandates. +--- + +# Cards Go Live on Recurring Payments + +The [RBI issued a new circular](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/rbi-card-mandate-guidelines/recurring-payments.md) on March 31, 2021 for banks to authorise mandates and collect recurring payments on credit, debit, and prepaid cards. According to the circular, all issuing banks must comply with the new guidelines. As a result, Cards as a payment method has been at a standstill since April 2021. + +Certain banks have now complied with the new RBI guidelines and can use Cards as a payment method to process recurring payments. The following FAQs provide more information about such banks and our efforts to help businesses process recurring payments without any issues. + +## FAQs + +Given below are some of the frequently asked questions. + +#### 1. Which banks have enabled Recurring Payments through Cards? + +Refer to the [list of banks that support cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/supported-banks.md). + +> **WARN** +> +> +> **Watch Out!** +> +> Please contact our support team if you are facing difficulties with card payments from any of the major banks on the above list. +> + +> **INFO** +> +> +> **Handy Tips** +> +> We support Visa and Mastercard cards of all major banks. +> + +Watch this video to see how a customer registers for Recurring Payments using Cards. + +![](/docs/assets/images/end_customer_card_registration.gif) + +#### 2. What happens when a customer tries to use the card details of banks that are not live? + +If a customer tries to enter card details of banks that are not live, an error message saying `Card does not support recurring payments.` will be displayed, as shown below. + +![](/docs/assets/images/cards-mandatehq-error.jpg) + +#### 3. Will the existing card tokens continue to work post September 30, 2021? + +We will migrate existing credit card tokens of OneCard bank by September 30, 2021. Therefore, you can continue to process recurring payments on such mandates even after September 30, 2021. As and when more banks become available for Recurring Payments using Cards, we will migrate the existing mandates of such banks. + +> **WARN** +> +> +> **Watch Out!** +> +> All of the card tokens that will be migrated are credit card tokens as debit cards of these banks were not enabled for recurring before. +> + +#### 4. Can we continue to process recurring payments through card tokens of banks that are yet to go live? + +> **INFO** +> +> +> All the card tokens of banks that are not live will be in `paused` state from October 1, 2021. You will not be able to debit these mandates. Do reach out to your customers in advance and register new mandates using alternate payment methods such as UPI or Emandate. +> + +> Refer to the [Recurring Payments document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments.md) for more information on payment methods. +> + +> Alternatively, you can also use Payment Links from the Dashboard or mobile application and collect payment from customers on the due date. +> + +> Refer to the [Payment Link document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md) for more information. +> + +#### 5. How can I get to know the status of tokens? + +You can go to the **Reports section** in your Dashboard and download the token report on October 1, 2021 to know the status of all your tokens to take appropriate action. + +To download the token report: + +1. Log in to the Dashboard and click the **Reports** from the left menu. +2. Select **Token Report** from the **Select Report Type** drop-down list. +3. Select the relevant **Period** from the **Select Period** drop-down list. +4. Select the file format from the **Select Format** drop-down list. You can choose CSV, XLSX or XLS formats. +5. Click **Generate Report** to download or get it emailed to your registered email address by selecting the **Email Report To** check box. + +Watch the animation below for steps to check token status. + +![](/docs/assets/images/check_token_report.gif) + +#### 6. Are there any changes in the APIs for processing card-based mandates? + +There are no changes in the existing integration flow. However, we have added a few optional token parameters to the **Create Order API**. If these parameters are not passed in the request, then the default values are assumed. + +Refer to the [Recurring Payments API document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md#112-create-an-order) for more information on changes. + +#### 7. Are there any changes in turnaround time (TAT) for registering mandates and for processing debits? + +Starting October 1, 2021, you will have to raise the debit request 24 hours in advance for processing debits on registered mandates. A pre-debit notification will be sent to the customer’s registered mobile number or email ID. If they do not pause or cancel the mandate, then the recurring debit will be processed, and you will get the notification through a webhook or in the Dashboard. A sample pre-debit notification is given below for your reference: + +![](/docs/assets/images/cards-mandatehq-pre-debit.jpg) + +#### 8. Is there a maximum monetary limit for processing card-based mandates? + +You can register mandates up to a maximum of ₹15,000 without any intervention from customers and process subsequent payments. + +To register and process mandates of amounts greater than ₹15,000, an Additional Factor Authentication (AFA) is required from customers for every subsequent debit. + +#### 9. What is the new flow to process subsequent debits using cards under the new RBI guidelines? + +> **INFO** +> +> +> **Note:** +> +> Businesses to only initiate the debit, and the rest will be taken care of by banks and Razorpay. +> + +To process subsequent debits below ₹15,000: +1. Businesses initiate the debit for an amount less than ₹15,000. +2. Bank will send a pre-debit notification SMS to the customer immediately. +3. The amount will be debited 36 hours after the notification. + +![](/docs/assets/images/cards-mandatehq-pre-debit.jpg) + +To process subsequent debits above ₹15,000: +1. Businesses initiate the debit for an amount greater than ₹15,000. +2. Bank will send a notification with a link for Additional Factor Authentication (AFA) to the customer immediately. The AFA link will be active for 72 hours. +3. The amount will be debited as soon as the customer provides AFA. + +The short animation below shows the customer side flow of giving consent through the AFA link. + +![](/docs/assets/images/cards-mandatehq.gif) + +#### 10. Are there any changes in processing recurring payments on international cards? + +No, there are no changes in processing recurring payments on international cards. The RBI guidelines apply only to domestic cards and not international cards. + +#### 11. For card tokens, what is the turnaround time (TAT) for mandate registration? + +For card tokens, the mandate registration happens in real-time. + +#### 12. What is the TAT for processing debits of cards mandates? + +For processing debits below ₹15,000, the TAT is 24 hours after raising the debit request, subject to the customer not pausing or cancelling the mandate. + +For processing debits above ₹15,000, the amount will be debited as soon as the customer provides consent through AFA, which has a validity of 72 hours. + +#### 13. Can cardholders make changes to registered card tokens? How are businesses notified of such changes? + +Yes, cardholders can pause, resume and cancel card tokens from the portal provided by the bank to manage them. You will get notifications through multiple webhooks when a cardholder initiates any such changes to the card tokens. You can also see these changes in the Dashboard. + +#### 14. Can businesses cancel card tokens? + +Yes, businesses can cancel card tokens by deleting them. Tokens can be deleted either from the [dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#delete-the-token) or using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/tokens.md#23-delete-tokens). + +#### 15. Is it possible to skip the MandateHQ summary screen that appears before the bank page while making a transaction? + +Yes, you can skip the MandateHQ summary screen by enabling **Skip Mandate Summary Page for Cards** option from the Dashboard. + +![](/docs/assets/images/skip_mandate_cards_rp.jpg) diff --git a/llm-content/announcements/rbi-card-mandate-guidelines/recurring-payments/cards/tokenisation.md b/llm-content/announcements/rbi-card-mandate-guidelines/recurring-payments/cards/tokenisation.md new file mode 100644 index 00000000..edb1df62 --- /dev/null +++ b/llm-content/announcements/rbi-card-mandate-guidelines/recurring-payments/cards/tokenisation.md @@ -0,0 +1,57 @@ +--- +title: Cards Tokenisation +description: Frequently asked questions on tokenisation of cards. +--- + +# Cards Tokenisation + +#### 1. What is tokenisation, and how does it impact the business? + +Tokenisation is the process by which the original card number / Primary Account Number (PAN) is replaced with a surrogate value called a **token**. + +This token will not be visible to the cardholder. It will be managed between the Token Requestor (TR) and Network. +As per the RBI guidelines ([link](https://www.rbi.org.in/Scripts/NotificationUser.aspx?Id=12211&Mode=0) and [link](https://rbidocs.rbi.org.in/rdocs/notification/PDFs/DPSSCOFTBA69C3B5B8CC4025AD089456DD857C5F.PDF)), starting from September 30 2022, Businesses, Payment Gateways and Payment Aggregators are no longer allowed to store actual customer card details. Businesses must adopt a tokenisation solution to continue offering customers a saved card experience. + +Card networks and card issuers are the only parties that can save card details, and others can only have a tokenised card. + +#### 2. How is the existing recurring token different from the new token? + +This token terminology should not be confused with the existing concept of recurring tokens. Henceforth, we will call the current subscriptions as `recurring tokens` and new surrogate value tokens (for saved cards) as `network tokens`. + +For a one-time payment the process of tokenising cards is not mandatory. Cardholders and businesses may choose not to tokenise cards. However, this step is compulsory for recurring mandate creation as Razorpay currently uses saved cards for subsequent debit requests. Post September 30, 2022, network tokens will be used for subsequent debit requests. + +#### 3. Is customer consent required for token creation? + +Yes, customer consent and an additional authentication factor (AFA) are required to save a card or create a token. This can be the same AFA used during the first transaction (2FA needs to be changed to AFA). + +#### 4. Are there any additional efforts required by businesses to integrate? + +**Standard Checkout**: +No additional effort is required for businesses that have integrated using the Standard Checkout method. Existing recurring mandate creation APIs will handle network tokenisation from the back-end. + +In the case of standard checkout, Razorpay controls the customer-facing UI, and consent is already taken from cardholders mandatorily while registering mandates. + +This is how explicit consent is collected from the card holders - + +![](/docs/assets/images/caw-checkout.gif) + +**Custom and S2S Checkout**: +Businesses that have integrated using the Custom & S2S Checkout method, are expected to collect cardholder consent explicitly for tokenisation. The Razorpay Checkout UI shown above can be used as an example. Please check the respective API docs for checking how collected consent is passed to Razorpay. + +In all these cases, Razorpay will act as a Token Requestor and handle network token creation based on existing recurring mandate creation APIs. + +#### 5. What all information can Payment Gateways, Payment Aggregators and other businesses save? + +The businesses can save the last 4 digits of the card number and the card issuer's name for tracking and analytical purposes. Apart from this, they can save metadata such as the network name, issuer name and so on. + +#### 6. What happens to the existing saved cards and the ongoing subscriptions post September 30, 2022? + +As per the RBI guidelines, Razorpay, as a PG, will have to purge the card data after September 30. However, the existing subscriptions will continue to be active after September 30 as they are already tokenised. + +#### 7. Are there any changes in processing debits for Subscriptions using international cards? + +No, there are no changes in processing debits for Subscriptions using international cards. The RBI guidelines apply only to domestic cards and not international cards. + +#### 8. Are there any charges on businesses for tokenisation? + +Yes. Tokenisation is compulsory for domestic recurring card mandates, and the tokens are used for subsequent debits in the life cycle of any recurring mandate. Razorpay will communicate the cost of using tokenisation facilities to respective businesses. Please reach out to your respective account managers or log in to the Dashboard to raise a ticket for any query related to tokenisation. diff --git a/llm-content/announcements/rbi-card-mandate-guidelines/recurring-payments/mandatehq-faqs.md b/llm-content/announcements/rbi-card-mandate-guidelines/recurring-payments/mandatehq-faqs.md new file mode 100644 index 00000000..fb0c33a6 --- /dev/null +++ b/llm-content/announcements/rbi-card-mandate-guidelines/recurring-payments/mandatehq-faqs.md @@ -0,0 +1,73 @@ +--- +title: Frequently Asked Questions +description: Find answers to frequently asked questions about RBI guidelines on Recurring Payments MandateHQ. +--- + +# Frequently Asked Questions + +1. #### What are the new RBI guidelines on Recurring payments via Card? + + + Following are the new RBI guidelines on Recurring payments via Card: + - Additional Factor of Authentication (AFA) must be made mandatory for all recurring transactions above ₹5,000 on debit cards, credit cards and other prepaid instruments. + - In case of subsequent automated debits without AFA, the cardholder should get a pre debit notification at least 24 hrs in advance. The notification must contain all information regarding the upcoming debit. + - Cardholders should have the option to cancel or modify the mandate at any point in time. + +1. #### Is there a maximum and minimum amount limit for processing recurring transactions through this solution? + + + Yes. The maximum limit to process card-based mandates is ₹5,000, and the minimum limit is ₹1. + +1. #### What will change for businesses in India on account of these RBI Guidelines? + + + Businesses in India will have the following changes: + - Mandate HQ is a plug-and-play API-based solution for issuing banks in India to comply with the RBI guidelines. + - Razorpay Subscriptions will automatically be integrated with MandateHQ. Businesses can continue onboarding customers and accept subscription payments seamlessly without any additional integration efforts on their end. + +1. #### How many banks have partnered with MandateHQ? + + + Razorpay's goal is to integrate MandateHQ with more than 50 banks in the next 12 months. As the adoption of the product increases, we expect even the smallest of banks from India's hinterlands to support their offerings by enabling recurring payments to millions of first-time digital banking customers and businesses while complying with RBI guidelines. + +1. #### What are the features embedded in the solution to make it safe and secure for the end consumer? + + + Following are the features embedded in the solution: + - The solution is PCI DSS Compliant - Highest level. + - Adequate risk and fraud checks. + - Support for OTP verification for all significant actions such as register, update and cancel a mandate and so on. + - Support for pre-debit and post-debit notification to inform consumers about the debits. + - Validation checks to make sure that businesses are debiting payment as per the rule set by the customer. + +1. #### How can banks comply with RBI guidelines and integrate with MandateHQ within a short period? + + + Razorpay’s solution enables banks to support recurring payments in 7 to 10 business days. + +1. #### How is Razorpay planning to get businesses to comply with this? + + + MandateHQ and issuing banks are ensuring compliance with RBI guidelines. There is no effort for businesses to comply with these guidelines. They will be able to use a fully compliant system without any changes. + +1. #### How will MandateHQ benefit the businesses? What would be the most significant advantage for them from a CapEx perspective? + + + MandateHQ will ensure that businesses can continue focusing on their business, and Razorpay will ensure compliance with the RBI guidelines. + +1. #### What are the benefits for the cardholder? + + + Following are some of the benefits for the cardholder: + - Cardholders will have transparency on what, why, when and how they will be charged. + - Cardholders will have an interface to view and manage their mandates end-to-end. From keeping track of the debit trail to updating an existing mandate, multiple features are supported via MandateHQ. + +1. #### How does the new RBI guidelines affect my existing mandates? + + + Razorpay MandateHQ allows issuers and businesses to migrate their existing mandate into the new framework. This migration will ensure business continuity. + +1. #### Does the end customer have to pay any charges to use the MandateHQ? + + + No. The end customers do not have to pay any amount to use the MandateHQ. diff --git a/llm-content/announcements/rbi-card-mandate-guidelines/subscriptions.md b/llm-content/announcements/rbi-card-mandate-guidelines/subscriptions.md new file mode 100644 index 00000000..bea1147c --- /dev/null +++ b/llm-content/announcements/rbi-card-mandate-guidelines/subscriptions.md @@ -0,0 +1,89 @@ +--- +title: RBI Directive on Card Payments for Subscriptions +description: Check the changes in the RBI Guidelines released on 31st March 2021, regarding card payments for Subscriptions. +--- + +# RBI Directive on Card Payments for Subscriptions + +Further to the [circular (issued on 21 Aug 2019)](https://rbidocs.rbi.org.in/rdocs/notification/PDFs/47EMANDATE39D1306C26AE4B44B2EA0050F23E7E3D.PDF) and the [press release (issued on 31 March 2021)](https://rbidocs.rbi.org.in/rdocs/PressRelease/PDFs/PR1326B5CD909C140349E9A7295435E69893D0.PDF), RBI released a new circular on 31 March 2021, regarding registration of new card mandates. You can find the new RBI circular [here](https://rbidocs.rbi.org.in/rdocs/notification/PDFs/NOT11820DB6EC9DF8A4611926B0A897918D64F.PDF). + +## Guidelines for Issuing Banks (To be complied by 30 Sep 2021) + +RBI has issued the following guidelines for issuing banks to authorise mandates and collect recurring payments on credit cards, debit cards, and prepaid instruments. RBI has announced this step to make card transactions safer and secure. + +- All mandate registrations must go through Additional Factor of Authentication (AFA). AFA is a process wherein a customer receives an OTP or card PIN during modification or revocation of the mandate and the first transaction. +- AFA is mandatory for registering mandates on cards. The maximum limit for registering mandates is ₹15,000. You can refer to the [RBI circular](https://rbidocs.rbi.org.in/rdocs/notification/PDFs/DPSSSIDEC420205A3895EA5B6044F2B4AB7A133FE35AD7.PDF). +- At the time of registration, banks should provide customers with the option to choose the communication medium (SMS or email) to which the pre-debit notifications will be sent. +- Banks should send customers a pre-debit notification at least 24 hours before the actual debit. The notification must contain all the information regarding the upcoming debit. Customers should be provided with an option to opt-out of the particular debit or the mandate. +- Banks should also send a post-debit notification to the customers. This notification should contain all the information regarding the debit. +- Banks must provide customers with an online facility through which customers can withdraw from any e-mandate at any point in time. The customers will have to perform the AFA at the time of withdrawal. +- For all such withdrawn e-mandates, the acquiring banks should ensure that the respective businesses delete all customer payment information. +- Banks should set-up redressal system to address customers grievances. Card networks should also have in place a dispute resolution mechanism. + +> **INFO** +> +> +> **Handy Tips** +> +> You do not need to make any integration changes at your end. The circular applies to the issuing banks, and the banks need to implement the changes mentioned above. +> + +## Impact on Existing and New Mandates + +The impact of the new guidelines is given below: + +Existing Mandates | New Mandates +--- +As per the [press release](https://rbidocs.rbi.org.in/rdocs/PressRelease/PDFs/PR1326B5CD909C140349E9A7295435E69893D0.PDF), there will be no impact on existing card mandates from 1 April 2021. Recurring payments will continue to be processed on such mandates. | As per the [new circular](https://rbidocs.rbi.org.in/rdocs/notification/PDFs/NOT11820DB6EC9DF8A4611926B0A897918D64F.PDF), your customers may not be able to sign up new mandates on cards from 1 April 2021 till issuing banks comply with the guidelines issued in the RBI circular dated 21 August 2019. + +## Alternative Solution: UPI Autopay + +We will soon be enabling UPI Autopay on your Dashboard. You can [create a subscription link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md) that will allow your customers to choose UPI to make recurring payments. + + +### Supporting Banks and UPI Apps + +- Mandates on UPI Autopay can be set up using ICICI, SBI and HDFC accounts on UPI collect flow. + +- Only BHIM and Paytm UPI apps are supported on UPI Autopay. + +If you do not want to use UPI Autopay, you can disable it from the Settings tab on the Subscriptions page from your Dashboard. + +Learn more about UPI Autopay from our [blog](https://razorpay.com/blog/what-is-upi-autopay-recurring-payments-razorpay-subscriptions/) and [documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/faqs.md#upi). + +## MandateHQ: Helping Issuing Banks Comply with the RBI Circular + +The RBI has given a 6 months extension (till 30 Sep 2021) to all issuing banks to comply with the guidelines set forth in the circular. + +- Razorpay has partnered with Mastercard to launch MandateHQ - a plug-and-play solution that will allow issuing banks to offer standing instructions on credit cards, debit cards and pre-paid instruments in compliance with the RBI circular. + +- We are working with most of the issuing banks to on-board them on MandateHQ and ensure a smooth transition by 30 Sep 2021. We will keep you posted when banks start going live. + +## FAQs + +Given below are some of the frequently asked questions. + +#### 1. Will subscription plans created and in the active state before 1 April work from 1 April 2021? + +Yes, subscription plans created and in the active state before 1 April will work post 1 April 2021. + +#### 2. Can we register new card mandates from 1 April 2021? + +As per the new circular released by RBI on 31 March 2021, no new mandate for recurring online transactions shall be registered by stakeholders, unless such mandates are compliant with the circular dated 21 August 2019. + +#### 3. How many banks are currently compliant with the RBI circular? + +We are working with most of the issuing banks to on-board them on MandateHQ and help them comply with the RBI circular before 30 Sep 2021. We will keep you posted when banks start going live. + +#### 4. Will existing mandates registered through international cards be impacted? + +No, the RBI circular is applicable only for issuing banks in India. International card mandates will continue to work. + +#### 5. I want to enable customers to make payments through UPI only. How can I configure payment methods? + +Follow these steps to enable or disable payment methods (Cards and UPI): +1. Log in to the Dashboard. +2. Navigate to **Subscriptions** → **Settings**. +3. Configure the payment methods: + - **Card**: Enable this to accept recurring payments via cards for your subscriptions in any of our supported international currencies. + - **UPI**: Enable this to accept UPI payments when recurring charge is less than ₹15,000. Only INR is supported. diff --git a/llm-content/announcements/rbi-card-mandate-guidelines/subscriptions/cards.md b/llm-content/announcements/rbi-card-mandate-guidelines/subscriptions/cards.md new file mode 100644 index 00000000..0980ab2e --- /dev/null +++ b/llm-content/announcements/rbi-card-mandate-guidelines/subscriptions/cards.md @@ -0,0 +1,134 @@ +--- +title: Cards Go Live on Subscriptions +description: Check the banks that are going live on cards, existing mandates management and action to be taken by businesses to process Subscriptions on card mandates. +--- + +# Cards Go Live on Subscriptions + +The [RBI issued a new circular](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/rbi-card-mandate-guidelines/subscriptions.md) on 31 March 2021 for banks to authorise mandates and collect recurring payments on credit, debit, and prepaid cards. According to the circular, all issuing banks must comply with the new guidelines. As a result, Cards as a payment method has been at a standstill since April 2021 and has impacted the entire recurring ecosystem. + +Certain banks have now complied with the new RBI guidelines and going live on Cards for Subscriptions. The following FAQs provide more information about such banks and our efforts to help businesses process Subscriptions and Recurring Payments without any issues. + +## FAQs + +Given below are some of the frequently asked questions. + +#### 1. Which banks are live on the cards, and what does this mean for businesses? + +Businesses like yours can onboard customers and process recurring payments through debit, credit and prepaid cards of the following banks from October 1, 2021. Customers can now sign up for Subscription plans using their card details easily. + +Refer to the [list of banks that support cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md#cards). + +> **WARN** +> +> +> **Watch Out!** +> +> Please contact our support team if you are facing difficulties with card payments from any of the major banks on the above list. +> + +> **INFO** +> +> +> **Handy Tips** +> +> We support Visa and Mastercard cards of all major banks. +> + +#### 2. What happens when a customer tries to use the card details of banks that are not live? + +If a customer tries to enter card details of banks that are not live, an error message saying `Card does not support recurring payments` will be displayed, as shown below. + +![](/docs/assets/images/cards-mandatehq-error-sub.jpg) + +#### 3. Will the existing subscription plans continue to work post September 30, 2021? + +We will migrate existing Subscription plans of City Union Bank (CUB), OneCard and Karur Vysya Bank by September 30, 2021. Wel will continue to process debits on such Subscription plans even after September 30, 2021. For banks that will go live after September 30, 2021, we will migrate the Subscription plans of such banks as and when they go live. + +> **WARN** +> +> +> **Watch Out!** +> +> All of the Subscriptions that will be migrated are credit card based Subscriptions as debit cards of these banks were not enabled before. +> + +#### 4. What happens to debits of Subscriptions plans of banks that are not live by September 30, 2021? + +> **INFO** +> +> +> +> All the Subscription plans of banks that are not live will be moved to the `pending` state on their respective billing dates starting from October 1, 2021. We will notify your customers through email with the following options to activate the Subscription again: + +> +> **Option 1:** Update with new card details of banks that are live. + +> +> **Option 2:** Use UPI as the alternate payment method and register to re-activate the subscription. + +> +> **Alternate Approach** - Register for a new Subscription + +> +> In case you wish to reach out to your customers to sign up for new Subscriptions, you can do the following: +> 1. Cancel all card-based Subscriptions, and the status will be moved to the `cancelled` state. +> 2. Notify your customers about the cancelled Subscriptions and send new subscription links, and request them to register afresh using UPI or the cards of banks that are live. +> +> Refer to the [Subscriptions document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) for more information. +> +> + +#### 5. Are there any changes in turnaround time (TAT) for processing debits on Subscriptions? + +Starting October 1, 2021, we will initiate the debit on every Subscription 24 hours in advance. The respective banks will send a pre-debit notification to the customer’s registered mobile number or email ID. If the cutomer does not pause or cancel the Subscription, then the debit will be processed, and you will get the notification through a webhook or in the Dashboard. A sample pre-debit notification is given below for your reference: + +![](/docs/assets/images/cards-mandatehq-pre-debit.jpg) + +#### 6. Are there any changes in APIs for processing card-based Subscriptions? + +No, there are no changes in APIs to process card-based Subscriptions. + +#### 7. Is there a maximum monetary limit for processing card-based Subscriptions? + +For plans upto maximum amount of ₹15,000, debits will be processed without any intervention from customers. + +For plans above ₹15,000 an Additional Factor Authentication (AFA) is required from customers for every subsequent debit. + +#### 8. What is the new flow to process card-based Subscriptions under the new RBI guidelines? + +> **INFO** +> +> +> **Note:** +> +> All the steps mentioned below will be taken care of by Razorpay and banks. No additional effort is required from businesses and customers. +> + +To process debits of amounts below ₹15,000: +1. Razorpay will initiate the debit 36 hours before the actual debit date. +2. Bank will send a pre-debit notification SMS to the customer immediately. +3. The amount will be debited 36 hours after the notification provided the customer does not pause or cancel the Subscription. + +To process debits of amounts above ₹15,000: +1. Razorpay will initiate the debit 36 hours before the actual debit date. +2. Bank will send a notification with a link for Additional Factor Authentication (AFA) to the customer immediately. The AFA link will be active for 72 hours. +3. The amount will be debited once the customer provides AFA. + +The short animation below shows the customer side flow of giving consent through the AFA link. + +![](/docs/assets/images/cards-mandatehq.gif) + +#### 9. Are there any changes in processing debits for Subscriptions using international cards? + +No, there are no changes in processing debits for Subscriptions using international cards. The RBI guidelines apply only to domestic cards and not international cards. + +#### 10. Can cardholders make changes to active Subscriptions? + +Yes, cardholders can pause, resume and cancel active Subscriptions from the portal provided by the bank to manage them. You will get notifications through multiple webhooks when a cardholder initiates any such changes to the Subscriptions. You can also see these changes in the Dashboard. + +#### 11. Is it possible to skip the MandateHQ summary screen that appears before the bank page while making a transaction? + +Yes, you can skip the MandateHQ summary screen by enabling **Skip Mandate Summary Page for Cards** option from the Dashboard. + +![](/docs/assets/images/skip_mandate_cards_rp.jpg) diff --git a/llm-content/announcements/rbi-card-mandate-guidelines/subscriptions/cards/tokenisation.md b/llm-content/announcements/rbi-card-mandate-guidelines/subscriptions/cards/tokenisation.md new file mode 100644 index 00000000..8a36f39e --- /dev/null +++ b/llm-content/announcements/rbi-card-mandate-guidelines/subscriptions/cards/tokenisation.md @@ -0,0 +1,55 @@ +--- +title: Cards Tokenisation +description: Frequently asked questions on tokenisation of cards. +--- + +# Cards Tokenisation + +#### 1. What is tokenisation, and how does it impact the business? + +Tokenisation is the process by which the original card number / Primary Account Number (PAN) is replaced with a surrogate value called a **token**. + +This token will not be visible to the cardholder. It will be managed between the Token Requestor (TR) and Network. +As per the RBI guidelines ([link](https://www.rbi.org.in/Scripts/NotificationUser.aspx?Id=12211&Mode=0) and [link](https://rbidocs.rbi.org.in/rdocs/notification/PDFs/DPSSCOFTBA69C3B5B8CC4025AD089456DD857C5F.PDF)), from September 30 2022, businesses, Payment Gateways and Payment Aggregators are no longer allowed to store actual customer card details. Businesses must adopt a tokenisation solution to continue offering customers a saved card experience. + +Card networks and card issuers are the only parties that can save card details, and others can only have a tokenised card. + +For one-time payment, this process of tokenising cards (i.e. saving cards with a surrogate value) is not mandatory, card holders as well as merchant may choose to not tokenise cards. But for subscription mandate creation, this step will be compulsory as for subsequent debit requests Razorpay currently uses saved cards, post-30th September,2022 network tokens will be used for subsequent debit requests. + +#### 2. Is customer consent required for token creation? + +Yes, customer consent and an additional authentication factor (AFA) are required to save a card or create a token. This can be the same 2FA used during the first transaction. + +#### 3. Are there any additional efforts required by businesses to integrate? + +**Standard Checkout**: +For Standard Checkout recurring merchants, there is no additional effort. No new API call needs to be used, Existing subscription APIs will handle network tokenisation from the back-end. + +In case of standard checkout, Razorpay controls the customer facing UI and consent is already being collected from card holders mandatorily while creation of subscriptions. + +![](/docs/assets/images/subscriptions-tokenisation.gif) + +**Custom and S2S Checkout**: +For subscription merchants on Custom & S2S Checkout, we expect merchants to collect card holder consent explicitly for tokenisation (sample UI is shared above). + +In all these cases, Razorpay will act as Token Requestor and handle network token creation based on existing subscription APIs. + +#### 4. What all information can Payment Gateways, Payment Aggregators and other businesses save? + +The businesses can save the last 4 digits of the card number and the card issuer's name for tracking and analytical purposes. Apart from this, they can save metadata such as the network name, issuer name and so on. + +#### 5. What happens to the existing saved cards and the ongoing Subscriptions post September 30, 2022? + +As per the RBI guidelines, Razorpay, as a PG, will have to purge the card data after September 30. However, the existing Subscriptions will continue to be active after September 30 as they are already tokenised. + +#### 6. Are there any changes in processing debits for Subscriptions using international cards? + +No, there are no changes in processing debits for Subscriptions using international cards. The RBI guidelines apply only to domestic cards and not international cards. + +#### 7. Can cardholders make changes to active Subscriptions? + +Yes, cardholders can pause, resume and cancel active Subscriptions from the portal provided by the bank to manage them, just like how they can do now. You will get notifications through multiple webhooks when a cardholder initiates any such changes to the Subscriptions. You can also see these changes in the Dashboard. + +#### 8. Are there any charges on businesses for tokenisation? + +Tokenisation is compulsory for domestic card based subscriptions and the tokens are used for subsequent debits in the life cycle of any subscription. The cost for using tokenisation facility from Razorpay will be communicated to respective merchants. Please reach out to respective account managers or raise a ticket for any query related to tokenisation. diff --git a/llm-content/announcements/rbi-card-mandate-guidelines/subscriptions/mandatehq-faqs.md b/llm-content/announcements/rbi-card-mandate-guidelines/subscriptions/mandatehq-faqs.md new file mode 100644 index 00000000..1a37f760 --- /dev/null +++ b/llm-content/announcements/rbi-card-mandate-guidelines/subscriptions/mandatehq-faqs.md @@ -0,0 +1,62 @@ +--- +title: Frequently Asked Questions +description: Find answers to frequently asked questions about RBI guidelines on Subscriptions MandateHQ. +--- + +# Frequently Asked Questions + +1. #### What are the new RBI guidelines on Recurring payments via Card? + + Following are the new RBI guidelines on Recurring payments via Card: + - Additional Factor of Authentication (AFA) must be made mandatory for all recurring transactions above ₹5,000 on debit cards, credit cards and other prepaid instruments. + - In case of subsequent automated debits without AFA, the cardholder should get a pre debit notification at least 24 hrs in advance. The notification must contain all information regarding the upcoming debit. + - Cardholders should have the option to cancel or modify the mandate at any point in time. + +1. #### Is there a maximum and minimum amount limit for processing recurring transactions through this solution? + + Yes. The maximum limit to process card-based mandates is ₹5,000, and the minimum limit is ₹1. + +1. #### What will change for businesses in India on account of these RBI Guidelines? + + Businesses in India will have the following changes: + - Mandate HQ is a plug-and-play API-based solution for issuing banks in India to comply with the RBI guidelines. + - Razorpay Subscriptions will automatically be integrated with MandateHQ. Businesses can continue onboarding customers and accept subscription payments seamlessly without any additional integration efforts on their end. + +1. #### How many banks have partnered with MandateHQ? + + Razorpay's goal is to integrate MandateHQ with more than 50 banks in the next 12 months. As the adoption of the product increases, we expect even the smallest of banks from India's hinterlands to support their offerings by enabling recurring payments to millions of first-time digital banking customers and businesses while complying with RBI guidelines. + +1. #### What are the features embedded in the solution to make it safe and secure for the end consumer? + + Following are the features embedded in the solution: + - The solution is PCI DSS Compliant - Highest level. + - Adequate risk and fraud checks. + - Support for OTP verification for all significant actions such as register, update and cancel a mandate and so on. + - Support for pre-debit and post-debit notification to inform consumers about the debits. + - Validation checks to make sure that businesses are debiting payment as per the rule set by the customer. + +1. #### How can banks comply with RBI guidelines and integrate with MandateHQ within a short period? + + Razorpay’s solution enables banks to support recurring payments in 7 to 10 business days. + +1. #### How is Razorpay planning to get businesses to comply with this? + + MandateHQ and issuing banks are ensuring compliance with RBI guidelines. There is no effort for businesses to comply with these guidelines. They will be able to use a fully compliant system without any changes. + +1. #### How will MandateHQ benefit the businesses? What would be the most significant advantage for them from a CapEx perspective? + + MandateHQ will ensure that businesses can continue focusing on their business, and Razorpay will ensure compliance with the RBI guidelines. + +1. #### What are the benefits for the cardholder? + + Following are some of the benefits for the cardholder: + - Cardholders will have transparency on what, why, when and how they will be charged. + - Cardholders will have an interface to view and manage their mandates end-to-end. From keeping track of the debit trail to updating an existing mandate, multiple features are supported via MandateHQ. + +1. #### How does the new RBI guidelines affect my existing mandates? + + Razorpay MandateHQ allows issuers and businesses to migrate their existing mandate into the new framework. This migration will ensure business continuity. + +1. #### Does the end customer have to pay any charges to use the MandateHQ? + + No. The end customers do not have to pay any amount to use the MandateHQ. diff --git a/llm-content/announcements/subscription-changes.md b/llm-content/announcements/subscription-changes.md new file mode 100644 index 00000000..680c7bbb --- /dev/null +++ b/llm-content/announcements/subscription-changes.md @@ -0,0 +1,75 @@ +--- +title: Subscription Workflow Changes +description: Check the changes made by Razorpay on the Subscription workflow. +--- + +# Subscription Workflow Changes + +Razorpay is committed to continuously innovating its products to provide the best payment experience to its customers. As a part of this endeavour, we have made certain modifications to our Subscription product to optimize customer experience and overall conversion. + +## Workflow Changes + +The standard procedure for mandate registration and subsequent debits remains unchanged. However, the following functionalities are deprecated: + +### Domestic Cards + +The following use cases are deprecated for Subscriptions activated using domestic cards. + +**Manually Charge a Card From Dashboard** + +You cannot manually charge a card from [dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/manually-charge-card.md#manually-charge-a-card-from-dashboard) for recurring debits. The **Atempt Charge** option is removed from the Dashboard. + +![subscription manual charge removal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/subscription-manual-charge-removal.jpg.md) + +You can ask customers to update the [payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#change-the-card-linked-to-the-subscription) or [create a new Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md#subscription). + +**Update a Subscription** + +You can [update](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/update.md) only the offer and not the following information of an active Subscription: +- Plan change +- Quantity change +- Start date change +- No of cycles + +The options to update the above mentioned fields are disabled in the Dashboard. + +![Domestic Card Update Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/subscription-update-card.jpg.md) + +You get the following error if you try to update the Subscription using API. + +```json: Error Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Only offers can be updated for subscriptions when payment mode is domestic card", + "field":"offer_id" + } +} +``` + +**Create Add-ons** + +You cannot create add-ons to the same Subscription. The customers can [create a new Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md#subscription) or bill it as a separate payment. + +The option to create an add-on under **Upcoming Invoice** in the Dashboard is removed. + +![Domestic Cards Create Add-ons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-add-ons.jpg.md) + +You get the following error if you try to create an add-on to the same Subscription using API. + +```json: Error Response +{ +"error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Addons can't be added for subscriptions when payment mode is domestic card" + } +} +``` + +**UPI Autopay** + +The following use case is deprecated for Subscriptions activated using UPI autopay: + +**Manually Charge a UPI Handle From Dashboard** + +An option to manually retry recurring debits is disabled. You can ask customers to update the payment method or [create a new Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md#subscription). diff --git a/llm-content/announcements/tls.md b/llm-content/announcements/tls.md new file mode 100644 index 00000000..1aeaca0f --- /dev/null +++ b/llm-content/announcements/tls.md @@ -0,0 +1,63 @@ +--- +title: Announcement Regarding TLS +description: Payment processing is not allowed on TLS 1.0. Configure TLS 1.1 or TLS 1.2 on the device to continue processing payments. +--- + +# Announcement Regarding TLS + +> **WARN** +> +> +> **Watch Out!** +> +> According to PCI regulations, payment processing is not allowed on TLS 1.0. To process a payment, TLS 1.1 or TLS 1.2 should be configured on the device. In case of Android devices, TLS 1.1 and TLS 1.2 both are rolled out together. +> +> Payments via Razorpay will not work on devices that do not have TLS 1.2 configured. +> +> + +## Which devices have TLS 1.2 enabled? + +As per official Android documentation, TLS 1.2 is supported in API level 16+ and enabled by default in API level 20+. Please note that for API levels 16, 17, 18 and 19, its not guaranteed that TLS 1.2 will be enabled. So if TLS 1.2 is not enabled in any of these devices then the SDK will give an error for the same and users will not be able to complete payments. + +## How would the existing apps be affected? + +If the device does not have TLS 1.2, the payment will fail with an error message given in `onPaymentError` callback. The devices which have TLS 1.2 would not be affected. + +## Upcoming SDK changes + +We will update `minSdkVersion` to 19 in our SDK and will support Android devices with API level 19 and above. + +If your app wants to support any device which has lower API version, then you may override the `minSdkVersion` of our SDK. In such a case, if devices do not have TLS 1.2, payment will still fail. You can check by calling `Checkout.isDeviceSupported()` method, if the SDK is triggered for a device without TLS 1.2, the SDK will give the error ("The device does not have TLSv1.2") in `onPaymentError` callback. Please refer to sample code given below to override minSdkVersion of the SDK. + +```xml + +``` + +## FAQs + + +### 1. Being a Merchant, do I need to take any action? + + Unless you are using Java/.NET on your server backend or your customers are using any of the above mentioned device platforms, there is no action required from your end. + + + +### 2. How do I know if a customer is affected? + + The Checkout popup won't open for the customer's browser/app. Please ask them to upgrade their browser or device. + + + +### 3. Is Android affected as well? + + Yes, we can no longer support our Android SDK on Android versions below 4.4 (4.4 is supported). This is less than 0.5% of payments that we see on the platform. + + + +### 4. Is there a new Android SDK release? + + Yes. Our new release sets the minimum version of our SDK to Android 4.4 + + +If you have any further queries, please mail our [Integrations Team](mailto:integrations@razorpay.com). diff --git a/llm-content/announcements/tls/certs.md b/llm-content/announcements/tls/certs.md new file mode 100644 index 00000000..1d40ab54 --- /dev/null +++ b/llm-content/announcements/tls/certs.md @@ -0,0 +1,23 @@ +--- +title: Certificate Pinning +--- + +# Certificate Pinning + +> **WARN** +> +> +> **Watch Out!** +> +> We highly discourage pinning our SSL Certificate to your applications. The certificate provided below is only in case you are mandated by internal policies to whitelist Razorpay's SSL Certificates. You should instead use the [latest CA Bundle](https://curl.haxx.se/docs/caextract.html) provided by your OS. +> + +The latest SSL certificates for `api.razorpay.com` are provided below with dates from which they are considered to be applicable. + + Certificate File | Valid From | Expiry + --- + [X1.pem](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x1.pem.md) & [Chain](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x1-chain.pem.md) | Feb 7th, 2016 | April 12th, 2019 + --- + [X2.pem](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x2.pem.md) & [Chain](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x2-chain.pem.md) | April 10th, 2019 | April 15th, 2020 + +The "Valid From" is the date when we plan to roll out the certificate. Expiry Dates are expiration dates for the SSL Certificates. Since we roll out our infrastructure changes on a gradual basis, we recommend whitelisting our certificate as per Valid From/Expiry timelines. If they overlap, you should whitelist all of the certificates in that range. diff --git a/llm-content/announcements/upi-collect-migration/custom-integration.md b/llm-content/announcements/upi-collect-migration/custom-integration.md new file mode 100644 index 00000000..0903feae --- /dev/null +++ b/llm-content/announcements/upi-collect-migration/custom-integration.md @@ -0,0 +1,73 @@ +--- +title: Migrate from UPI Collect to UPI Intent/QR Code - Custom Checkout +description: According to NPCI guidelines, the UPI Collect flow is deprecated. Update your Custom Checkout integration to use UPI Intent or UPI QR code. +--- + +# Migrate from UPI Collect to UPI Intent/QR Code - Custom Checkout + +According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026 to align with the latest ecosystem compliance standards and ensure higher transaction success rates. Customers can no longer make payments by manually entering VPA/UPI id/mobile numbers. + +- If you are a new customer, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#intent-flow). +- If you are an existing customer, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. + +#### Exemptions + +UPI Collect will continue to be supported for: +- MCC 6012 & 6211 (IPO and secondary market transactions). +- iOS mobile app and mobile web transactions. +- UPI Mandates (execute/modify/revoke operations only) +- eRupi vouchers. +- PACB businesses (cross-border/international payments). + +## UPI Collect Flow Configuration + +To migrate from UPI Collect, you need to remove the UPI Collect flow configuration from your `razorpay.js`: +```json +// Remove this configuration +upi: { + vpa: "success@razorpay", + flow: "collect" +} +``` + +This will disable the UPI Collect flow from your checkout. + +## Migration Steps by Platform + +Follow the platform-specific steps below to enable the alternative UPI payment method: + + +### Web + + After removing the UPI Collect configuration, enable [UPI QR code](https://razorpay.com/docs/payments/payment-gateway/web-integration/custom/payment-methods/#redirect-flow) to accept UPI payments. + + +> **WARN** +> +> +> **Important Note** +> +> UPI Intent is not supported on web. +> + + + + +### Mobile Web + + After removing the UPI Collect configuration, integrate [UPI Intent on mobile web](https://razorpay.com/docs/payments/payment-gateway/web-integration/custom/payment-methods/upi-intent-mweb/). + + + +### WebView + + After removing the UPI Collect configuration, enable [UPI Intent on webview](https://razorpay.com/docs/payments/payment-gateway/web-integration/custom/features/webview/upi-intent-android/). + + +> **INFO** +> +> +> **Handy tips** +> +> The **Save VPA** and **Validate VPA** features will not be available since the Collect flow is disabled. These features work only with the UPI Collect flow. +> diff --git a/llm-content/announcements/upi-collect-migration/recurring-payments/custom-checkout.md b/llm-content/announcements/upi-collect-migration/recurring-payments/custom-checkout.md new file mode 100644 index 00000000..ac8fa9a7 --- /dev/null +++ b/llm-content/announcements/upi-collect-migration/recurring-payments/custom-checkout.md @@ -0,0 +1,131 @@ +--- +title: Migrate from UPI Collect to UPI Intent - Custom Checkout +description: Steps to migrate to UPI Intent/QR code flows for Custom Checkout integrations across Web, mWeb and WebView platforms. +--- + +# Migrate from UPI Collect to UPI Intent - Custom Checkout + +According to NPCI guidelines, the UPI Collect flow (Pay with UPI id/VPA/Number) is being deprecated for new UPI Autopay registrations and will no longer be supported after 28 February 2026. +- Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +- Save VPA and Validate VPA features will not be available after migration as these features work only with the UPI Collect flow. + +> **INFO** +> +> +> **Handy Tips** +> +> Subsequent debits for existing mandates created via UPI Collect will continue to be executed without any change. No immediate action is required for these. +> + +**Exemptions** + +UPI Collect will continue to be supported for: +- MCC 6012 & 6211 (IPO and secondary market transactions) +- iOS mobile app and mobile web transactions (exempted until further notice) +- UPI Mandates (execute/modify/revoke operations only) +- eRupi vouchers +- PACB businesses (cross-border/international payments) + +**Action Required** + +Remove the UPI Collect option from your checkout by 28 February 2026 and continue to support Intent-based UPI payments. This applies to payments made via all desktop browsers and Android devices (mWeb and mobile app). Failure to comply with the deadline will result in a disruption to your payments experience. + +- If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). +- If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent to continue accepting UPI payments if: + - You currently accept UPI payments via Collect flow. + - You use Razorpay Custom Checkout on Web, mWeb or WebView to accept Recurring Payments from customers. + - Your integration includes UPI Collect parameters in `razorpay.js`. + - Your users enter UPI id/VPAs for payment. + +## Prerequisite + +Contact [Razorpay support](https://razorpay.com/support/) to enable UPI Intent for your Razorpay account if it is not already enabled. + +## Migration Steps by Platform + + +### Web + + You can only use UPI QR code to accept UPI payments. This is because UPI Intent is not supported on desktop web and UPI Collect will not be available after the NPCI deadline. + + **Change Needed** + + 1. If you were previously using UPI Collect, you must remove `upi[vpa]` parameter from `razorpay.js`. + + ```js: Replace UPI Collect with UPI QR + razorpay.createPayment({ + amount: 5000, + email: 'gaurav.kumar@example.com', + contact: '+919000090000', + order_id: 'order_9A33XWu170XXXX', + // Remove the upi[vpa] parameter + //upi: + //{ + // vpa: 'gauravkumar@somebank', + // flow: 'collect' + //} + }); + ``` + 2. Integrate with UPI QR code. Refer to the [UPI QR code Redirect Flow documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#redirect-flow) to complete the integration. + + + +### mWeb + + On mobile web, UPI Intent allows users to complete payments through their preferred PSP apps. + + **Change Needed** + + 1. If you were previously using UPI Collect, you must remove `upi[vpa]` parameter from `razorpay.js`. + + ```js: Remove UPI VPA Parameter + var options = { + "key": "YOUR_KEY_ID", + "amount": "50000", + "currency": "INR", + "name": "Acme Corp", + "description": "Test Transaction", + "order_id": "order_9A33XWu170gUtm", + // Remove the upi[vpa] parameter + //upi: + //{ + // vpa: 'gauravkumar@somebank', + // flow: 'collect' + //} + }; + ``` + 2. Integrate UPI Intent on mWeb. Refer to the [UPI Intent mWeb Integration Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods/upi-intent-mweb.md). + + + +### WebView + + For WebView integrations, enable UPI Intent to display UPI apps for payment completion. + + **Change Needed** + + 1. If you were previously using UPI Collect, you must remove `upi[vpa]` parameter from `razorpay.js`. + + ```js: Remove UPI Parameter + var options = { + "key": "YOUR_KEY_ID", + "amount": "50000", + "currency": "INR", + "name": "Acme Corp", + "description": "Test Transaction", + "order_id": "order_9A33XWu170gUtm", + // Remove the upi[vpa] parameter + //upi: + //{ + // vpa: 'gauravkumar@somebank', + // flow: 'collect' + //} + }; + ``` + 2. Integrate UPI Intent by following the UPI Webview Integration guide for [Android](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/webview/upi-intent-android.md) and [iOS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/webview/upi-intent-ios.md). Implement deep link handling in your Android/iOS app to launch UPI apps from WebView. + + +## Related Information + +- [UPI Payment Method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) +- [Recurring Payments - UPI Autopay Custom Checkout Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/upi/create-authorization-transaction.md) diff --git a/llm-content/announcements/upi-collect-migration/recurring-payments/s2s-integration.md b/llm-content/announcements/upi-collect-migration/recurring-payments/s2s-integration.md new file mode 100644 index 00000000..86c8ff3a --- /dev/null +++ b/llm-content/announcements/upi-collect-migration/recurring-payments/s2s-integration.md @@ -0,0 +1,131 @@ +--- +title: Migrate from UPI Collect to UPI Intent - S2S APIs +description: Steps to migrate from UPI Collect to UPI Intent/QR code flows for Server-to-Server (S2S) API integrations across Desktop Web, mWeb and WebView platforms. +--- + +# Migrate from UPI Collect to UPI Intent - S2S APIs + +According to NPCI guidelines, the UPI Collect flow is being deprecated from 28 February 2026. +- Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +- Save VPA and Validate VPA features will not be available after migration as these features work only with the UPI Collect flow. + +**Exemptions** + +UPI Collect will continue to be supported for: +- MCC 6012 & 6211 (IPO and secondary market transactions) +- iOS mobile app and mobile web transactions +- UPI Mandates (execute/modify/revoke operations only) +- eRupi vouchers +- PACB businesses (cross-border/international payments) + +**Action Required** + +- If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). +- If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments if: + - You use Server-to-Server (S2S) API integration for UPI payments + - Your API calls include `"flow": "collect"` parameter + - You use the `/v1/payments/create/upi` endpoint with Collect flow + - Your users enter UPI id/VPAs for payment + +## Prerequisite + +Contact [Razorpay support](https://razorpay.com/support/) to enable UPI Intent for your Razorpay account if it is not already enabled. + +## Migration Steps by Platform + + +### Desktop Web + + Migrate from the Collect flow API to the Intent flow API. Once the intent URL is generated, you should embed this URL into the QR code that you generate at your end. + + **Change Needed** + + 1. Update your API call to use UPI Intent flow instead of UPI Collect flow. Remove `vpa` and `expiry_time` parameters from the request body. Replace `collect` with `intent` as the value of the `upi.flow` parameter. Refer to the [UPI Intent guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-intent/authorization-transaction.md#113-create-an-authorisation-payment) for further information. + + ```curl: Replace UPI Collect with Intent + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -H 'content-type: application/json' \ + -X POST https://api.razorpay.com/v1/payments/create/upi + -d '{ + "amount": 50000, + "currency": "INR", + "order_id": "order_9A33XWu170gUtm", + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "method": "upi", + // Remove these Collect parameters + //"upi": { + // "flow": "collect", + // "vpa": "gauravkumar@exampleupi", + // "expiry_time": 5 + //}, + // Add this Intent parameter + "upi": { + "flow": "intent" + } + }' + ``` + + 2. The API returns an intent URL in the response. Embed this intent URL into a QR code on your end and display it to customers on desktop. + + ```json: API Response + { + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "link": "upi://pay?pa=merchant@upi&pn=Merchant&am=500.00&tr=rzp_FVmAstJWfsD3SO&tn=Payment", + "status": "created" + } + ``` + + 3. Use [webhooks to get payment status updates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md). + + + +### mWeb & WebView + + On mobile web and WebView, you must migrate from UPI Collect to UPI Intent. UPI Intent returns a deeplink that launches UPI apps for payment completion. + + **Change Needed** + + 1. Update your API call to use UPI Intent flow instead of UPI Collect flow. Remove `vpa` and `expiry_time` parameters from the request body. Replace `collect` with `intent` as the value of the `upi.flow` parameter. + + ```curl: Replace UPI Collect with Intent + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -H 'content-type: application/json' \ + -X POST https://api.razorpay.com/v1/payments/create/upi + -d '{ + "amount": 50000, + "currency": "INR", + "order_id": "order_9A33XWu170gUtm", + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "method": "upi", + // Remove these Collect parameters + //"upi": { + // "flow": "collect", + // "vpa": "gauravkumar@exampleupi", + // "expiry_time": 5 + //}, + // Add this Intent parameter + "upi": { + "flow": "intent" + } + }' + ``` + + 2. The API returns an intent URL in the response. Embed this intent URL into a QR code on your end and display it to customers on mobile. + + ```json: API Response + { + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "link": "upi://pay?pa=merchant@upi&pn=Merchant&am=500.00&tr=rzp_FVmAstJWfsD3SO&tn=Payment", + "status": "created" + } + ``` + + 3. Use [webhooks to get payment status updates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md). + + +## Related Information + +- [UPI Payment Method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) +- [Recurring Payments - UPI Autopay S2S Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-intent/authorization-transaction.md) diff --git a/llm-content/announcements/upi-collect-migration/recurring-payments/standard-checkout.md b/llm-content/announcements/upi-collect-migration/recurring-payments/standard-checkout.md new file mode 100644 index 00000000..43390587 --- /dev/null +++ b/llm-content/announcements/upi-collect-migration/recurring-payments/standard-checkout.md @@ -0,0 +1,86 @@ +--- +title: Migrate from UPI Collect to UPI Intent - Standard Checkout +description: Steps to migrate to UPI Intent/QR code flows for Standard Checkout integrations across Web, mWeb and mobile app platforms. +--- + +# Migrate from UPI Collect to UPI Intent - Standard Checkout + +According to NPCI guidelines, the UPI Collect flow (Pay with UPI ID/Number) is being deprecated for new UPI Autopay registrations and will no longer be supported after 28 February 2026. +- Customers can no longer register UPI mandates by manually entering VPA/UPI id/mobile numbers. +- Save VPA and Validate VPA features will not be available after migration as these features work only with the UPI Collect flow. + +> **INFO** +> +> +> **Handy Tips** +> +> Subsequent debits for existing mandates created via UPI Collect will continue to be executed without any change. No immediate action is required for these. +> + +**Exemptions** + +UPI Collect will continue to be supported for: +- MCC 6012 & 6211 (IPO and secondary market transactions) +- iOS mobile app and mobile web transactions (exempted until further notice) +- UPI Mandates (execute/modify/revoke operations only) +- eRupi vouchers +- PACB businesses (cross-border/international payments) + +**Action Required** + +Remove the UPI Collect option from your checkout by 28 February 2026 and continue to support Intent-based UPI payments. This applies to payments made via all desktop browsers and Android devices (mWeb and mobile app). Failure to comply with the deadline will result in a disruption to your payments experience. + +- If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). +- If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent to continue accepting UPI payments if: + - You currently accept UPI payments via Collect flow on Standard Checkout. + - Your checkout displays a "Pay with UPI ID/Number" input field. + +> **INFO** +> +> +> **Handy Tips** +> +> For Standard Checkout integrations, Razorpay will automatically disable UPI Collect flows. However, you are also encouraged to make the changes at your end as described below. +> + +## Prerequisite + +Contact [Razorpay support](https://razorpay.com/support/) to enable UPI Intent for your Razorpay account if it is not already enabled. + +## Migration Steps by Platform + + +### Web + + + You can only use UPI QR code to accept UPI payments. This is because UPI Intent is not supported on desktop web and UPI Collect will not be available after the NPCI deadline. UPI QR code is enabled by default on your Razorpay account. You do not need to make any changes to your integration. + + + +### mWeb + + You can use UPI Intent and/or UPI QR code to accept UPI payments on mWeb. + + **Change Needed:** + + Contact [Razorpay support](https://razorpay.com/support/) to get UPI QR code feature enabled on your Razorpay account. + + + + +### WebView + + For WebView integrations, you can display UPI Intent and optionally enable QR code. + + + **Change Needed:** + + 1. Additional integration steps are needed for UPI Intent to work on WebView for [Android](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-android.md) and [iOS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-ios.md). + + 2. Contact [Razorpay support](https://razorpay.com/support/) to get UPI QR code feature enabled on your Razorpay account. + + +## Related Information + +- [UPI Payment Method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) +- [Recurring Payments - UPI Autopay Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi.md) diff --git a/llm-content/announcements/upi-collect-migration/s2s-integration.md b/llm-content/announcements/upi-collect-migration/s2s-integration.md new file mode 100644 index 00000000..172bf2dc --- /dev/null +++ b/llm-content/announcements/upi-collect-migration/s2s-integration.md @@ -0,0 +1,85 @@ +--- +title: Migrate from UPI Collect to UPI Intent/QR Code - S2S Integration +description: According to NPCI guidelines, the UPI Collect flow is deprecated. Update your S2S integration to use UPI Intent or UPI QR code. +--- + +# Migrate from UPI Collect to UPI Intent/QR Code - S2S Integration + +According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026 to align with the latest ecosystem compliance standards and ensure higher transaction success rates. Customers can no longer make payments by manually entering VPA/UPI id/mobile numbers. + +- If you are a new customer, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md). +- If you are an existing customer, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. + +#### Exemptions + +UPI Collect will continue to be supported for: +- MCC 6012 & 6211 (IPO and secondary market transactions). +- iOS mobile app and mobile web transactions. +- UPI Mandates (execute/modify/revoke operations only) +- eRupi vouchers. +- PACB businesses (cross-border/international payments). + +## UPI Collect Flow Configuration + +To migrate from UPI Collect, you need to remove the UPI Collect flow configuration from your API calls and replace it with UPI Intent. + +### Step 1: Remove UPI Collect + +Based on your API endpoint, remove the following UPI Collect configuration: + +- For `/v1/payments/create/json` and `/v1/orders` endpoints: +```json +// Remove this configuration +"upi": { + "flow": "collect", + "vpa": "user@upi" +} +``` + +- For `/v1/payments/create/upi` endpoint: +```json +// Remove this configuration +"upi": { + "flow": "collect", + "vpa": "gauravkumar@exampleupi", + "expiry_time": 5 +} +``` + +### Step 2: Add UPI Intent + +Replace the above configuration with UPI Intent: +```json +"upi": { + "flow": "intent" +} +``` + +## Migration Steps by Platform + +Follow the platform-specific implementation details below: + + +### Web (Desktop Web) + + After updating your API configuration to use UPI Intent (as shown above), the UPI QR code will be generated for desktop web users. + + **Supported API Endpoints:** + - `https://api.razorpay.com/v1/payments/create/json` + - `https://api.razorpay.com/v1/orders` + - `https://api.razorpay.com/v1/payments/create/upi` + + Refer to the [UPI Intent documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md) for implementation details. + + + +### Mobile Web and WebView + + After updating your API configuration to use UPI Intent (as shown above), follow these additional steps: + + 1. Use the Intent flow API instead of the Collect flow API. + 2. Once the intent URL is generated, you can: + - Embed the URL into a QR code that you generate on your end, or + - Use the returned deeplink directly to initiate the UPI Intent flow. + + Refer to the [UPI Intent documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md) for implementation details. diff --git a/llm-content/announcements/upi-collect-migration/standard-integration.md b/llm-content/announcements/upi-collect-migration/standard-integration.md new file mode 100644 index 00000000..7c5c0a76 --- /dev/null +++ b/llm-content/announcements/upi-collect-migration/standard-integration.md @@ -0,0 +1,97 @@ +--- +title: Migrate from UPI Collect to UPI Intent/QR Code - Standard Checkout +description: According to NPCI guidelines, the UPI Collect flow is deprecated. Migrate to UPI Intent or UPI QR code to continue accepting UPI payments. +--- + +# Migrate from UPI Collect to UPI Intent/QR Code - Standard Checkout + +According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026 to align with the latest ecosystem compliance standards and ensure higher transaction success rates. Customers can no longer make payments by manually entering VPA/UPI id/mobile numbers. + +- If you are a new customer, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). +- If you are an existing customer, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. + +#### Exemptions + +UPI Collect will continue to be supported for: +- MCC 6012 & 6211 (IPO and secondary market transactions). +- iOS mobile app and mobile web transactions. +- UPI Mandates (execute/modify/revoke operations only) +- eRupi vouchers. +- PACB businesses (cross-border/international payments). + +## Hide UPI Collect Flow + +To migrate from UPI Collect to UPI Intent or UPI QR Code, you must hide the UPI Collect flow in your checkout configuration. Add the following configuration in `checkout.js`: + +```json +"config": { + "display": { + "hide": [ + { + "method": "upi", + "flows": ["collect"] + } + ] + } +} +``` + +This will hide the UPI Collect flow and automatically display the appropriate UPI payment method based on your platform. + +## Migration Steps + +Follow the steps given below based on your integration type and platform: + + +### Web + + Once you hide the UPI Collect flow using the above configuration, UPI QR code will be displayed automatically on desktop checkout. Know more about [UPI QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md#upi-qr-code). + + +> **WARN** +> +> +> **Watch Out!** +> +> UPI Intent is not supported on web. +> + + + + +### Mobile Web + + Once you hide the UPI Collect flow using the above configuration, the following payment options are available: + + + + UPI Intent will be available by default once Collect is deprecated. Know more about [UPI Intent on mobile web](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md#integrate-on-android-ios-and-mobile-web). + + + You also have the option to display UPI QR code. This is an on-demand feature. To show UPI QR code, raise a request with our support team to get this feature enabled on your account. Know more about [UPI QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md#upi-qr-code). + + + + + +### WebView + + Once you hide the UPI Collect flow using the above configuration, the following payment options are available. + + + + UPI Intent will be available by default once Collect is deprecated. Know more about [UPI Intent on WebView](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-android.md). + + + You also have the option to display UPI QR code. This is an on-demand feature. To show UPI QR code, raise a request with our support team to get this feature enabled on your account. Know more about [UPI QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md#upi-qr-code). + + + + +> **INFO** +> +> +> **Handy tips** +> +> The **Save VPA** and **Validate VPA** features will not be available since the Collect flow is disabled. These features work only with the UPI Collect flow. +> diff --git a/llm-content/announcements/whitelists.md b/llm-content/announcements/whitelists.md new file mode 100644 index 00000000..115f5a19 --- /dev/null +++ b/llm-content/announcements/whitelists.md @@ -0,0 +1,60 @@ +--- +title: Announcements from Razorpay Infra Group +description: List of changes that need to be done at your end for whitelisting Razorpay SSL certificates and IP addresses of Razorpay APIs and Webhooks. +--- + +# Announcements from Razorpay Infra Group + +Know about the changes that need to be done in your environment related to whitelisting of Razorpay-issued SSL certificates and IP addresses used to communicate with Razorpay APIs and Webhooks. + +## Razorpay SSL Certificates + +SSL certificates for `api.razorpay.com` with valid date ranges are tabulated below: + + Certificate File | Valid From | Expiry + --- + [X3.pem](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x3.pem.md) & [Chain](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x3-chain.pem.md) | March 13th, 2020 | July 28th, 2021 + --- + [X2.pem](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x2.pem.md) & [Chain](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x2-chain.pem.md) | April 10th, 2019 | April 15th, 2020 + --- + [X1.pem](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x1.pem.md) & [Chain](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x1-chain.pem.md) | Feb 7th, 2016 | April 12th, 2019 + +As we roll out our infrastructure changes on a gradual basis, we recommend whitelisting our certificate as per Valid From/Expiry timelines. If they overlap, you should whitelist all of the certificates in that range. + +> **WARN** +> +> +> **Note** +> +> We highly discourage pinning our SSL Certificate to your applications. The certificates provided, in the table above, should be used **only** if you are mandated by internal policies to whitelist Razorpay's SSL Certificates. Instead, you should use the [latest CA Bundle](https://curl.haxx.se/docs/caextract.html) provided by your OS. +> + +## Razorpay API IPs + +Requests to Razorpay APIs should be routed to `api.razorpay.com`. This will be resolved to various IPs controlled by our load balancers. However, in your environment, if there is a restriction of IPs to which the requests should be sent, all your API requests can be routed to `prod-api-static.razorpay.com`. This will be resolved to any of the following IPs: + +```js: List of API IPs +13.232.63.19 +13.234.135.6 +13.234.83.3 +13.235.207.57 +52.66.140.48 +52.66.140.61 +``` +## Razorpay Webhook IPs + +List of Razorpay IPs from which Webhooks are sent from our servers: + +```js: List of Webhook IPs +35.154.217.40 +35.154.22.73 +13.126.238.192 +13.127.201.109 +13.232.194.134 +35.154.143.15 +52.66.151.218 +52.66.75.174 +52.66.76.63 +``` + +It is highly recommended to use [Webhook Signature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md#validation) to validate the integrity of the webhooks, even though you have whitelisted our Webhook IPs. diff --git a/llm-content/api.md b/llm-content/api.md new file mode 100644 index 00000000..f6851c84 --- /dev/null +++ b/llm-content/api.md @@ -0,0 +1,57 @@ +--- +title: Razorpay API Documentation +heading: API Reference Guide +description: Get started with Razorpay APIs and test them on Postman. Generate API Keys in Test and Live Modes. +--- + +# API Reference Guide + +Razorpay APIs are completely RESTful, and all our responses are returned in JSON. + +> **INFO** +> +> +> **Integrations** +> +> - Looking to integrate your website, ecommerce store or mobile app with Razorpay Payment Gateway? Find the [right integration method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md#integration-types). +> - Accept payments [**without** a website or app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md#accept-payments) using other Razorpay products, such as Payment Links, Payment Pages, Subscription Links, Invoices and Smart Collect. +> - For S2S integration, contact the [Support team](https://razorpay.com/support/#request) with your requirements. +> + + + + Our APIs are present on the Razorpay [Postman Public Workspace](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/collection/12492020-952c7295-118c-400f-8f2c-5266ef6f689a). Watch the video to know how to fork APIs and save them to your private workspace for testing. + + + + Test Razorpay APIs using Postman. Watch the video to know how to get started. + + All Razorpay APIs are authenticated using Basic Authentication. You must [generate test API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md) on the Dashboard before trying the APIs. + + +## API Gateway URL + +For most of the Razorpay APIs, the Gateway URL is `https://api.razorpay.com/v1`. You need to include this before each API endpoint to make API calls. However, certain APIs are on V2. Hence, the gateway URL may differ for certain APIs. + + +### Example + + + + - Use the URL `https://api.razorpay.com/v1/payments` to access payment resources. + + - Use the URL `https://api.razorpay.com/v2/accounts` to access Route (Linked Account)-related resources. + + + + + + +### Related Information + +- [Understand Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md) +- [API Authentication](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md) +- [Sandbox Setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/sandbox-setup.md) +- [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) +- [API Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/best-practices.md) +- [API Glossary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/glossary.md) diff --git a/llm-content/api/authentication.md b/llm-content/api/authentication.md new file mode 100644 index 00000000..d14d5ff9 --- /dev/null +++ b/llm-content/api/authentication.md @@ -0,0 +1,151 @@ +--- +title: API Authentication +description: Authentication process for Razorpay APIs. +--- + +# API Authentication + +Check how to authenticate the APIs. + +## API Authentication + +All Razorpay APIs are authenticated using `Basic Auth`. Basic auth requires the following: +- `[YOUR_KEY_ID]` +- `[YOUR_KEY_SECRET]` + +Basic auth expects an `Authorization` header for each request in the `Basic base64token` format. Here, `base64token` is a base64 encoded string of `YOUR_KEY_ID:YOUR_KEY_SECRET`. + +> **WARN** +> +> +> **Watch Out!** +> +> The `Authorization` header value should strictly adhere to the format mentioned above. Invalid formats will result in authentication failures. +> Few examples of **invalid** headers are: `BASIC base64token`, `basic base64token`, `Basic "base64token"` and `Basic $base64token`. +> + +## Generate API Keys + +You can generate API Keys from the Dashboard. + + + Follow these steps to generate API keys: + + + Watch this video to see how to generate API keys in the Test mode. + + +[Video: https://www.youtube.com/embed/VOn8JlGPG2I?si=WTAbAeLB3Hnp1n3r] + + + + + Watch this video to see how to generate API keys in the Live mode. + + +[Video: https://www.youtube.com/embed/Cer8UfBGX_E?si=Libr1RXoFSEDfY1c] + + + +1. Log in to your Dashboard with the appropriate credentials. +2. Select the mode (**Test** or **Live**) for which you want to generate the API key. + - **Test Mode**: The test mode is a simulation mode that you can use to test your integration flow. **Your customers will not be able to make payments in this mode**. + - **Live Mode**: When your integration is complete, switch to live mode and generate live mode API keys. In the integration, **replace test mode keys with live mode keys to accept customer payments**. +3. Navigate to **Account & Settings** → **API Keys** (under **Website and app settings**) → **Generate Key** to generate key for the selected mode. + +> **WARN** +> +> +> **Watch Out!** +> +> - After generating the keys from the Dashboard, download and save them securely. You can use only one set of API keys. If you do not remember your API keys, you must [regenerate them](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#regenerate-api-keys) from the Dashboard and update them wherever the previous keys were used for payment gateway integrations. +> - API Keys are universal; that is, they are applicable to all websites and apps that you have whitelisted for your Merchant ID. +> - **Do not share your API Key secret** with anyone or on any public platforms. **This can pose security threats to your Razorpay account**. +> - Once you generate the API Keys, only the **Key Id** is visible on the Dashboard, **not the Key secret**, as it can pose security threats to your Razorpay account. +> - Use the **Live API Keys** to accept live payments and the **Test API Keys** for test transactions. +> + + + + To generate API keys: +1. Log in to your [RazorpayX Account](https://x.razorpay.com/). +2. Navigate to the user icon in the top-right corner of the screen and click `My Profile' → **My Accounts & Settings**. +3. Navigate to **Developer Controls** and click **Generate Key**. + +> **INFO** +> +> +> **Handy Tips** +> +> When generating API keys in Live mode, you must enter the OTP sent to you. This is to authroize the new user generating a new set of keys. + +> The same is **not applicable** for Test Mode. +> + +4. Download the keys when the pop-up appears. + + +### Test Mode API Keys + + Watch this video to see how to generate API keys in the test mode. + + +[Video: https://www.youtube.com/embed/PS06fCIqRKI] + + + + +### Live Mode API Keys + + +> **WARN** +> +> +> **Watch Out!** +> +> You must activate your account to make live payouts. To activate your account, provide the following KYC information from your Dashboard: +> - Contact Info +> - Business Details +> - Your Bank Account Information +> - Business Documents such as ID proof, Business Registration proof and Company PAN. +> + + + + + +1. Log in to your Dashboard with the appropriate credentials. +2. Select the mode (**Test** or **Live**) for which you want to generate the API key. + - **Test Mode**: The test mode is a simulation mode that you can use to test your integration flow. **Your customers will not be able to make payments in this mode**. + - **Live Mode**: When your integration is complete, switch to live mode and generate live mode API keys. In the integration, **replace test mode keys with live mode keys to accept customer payments**. +3. Navigate to **Account & Settings** → **API Keys** (under **Website and app settings**) → **Generate Key** to generate key for the selected mode. + +> **WARN** +> +> +> **Watch Out!** +> +> - After generating the keys from the Dashboard, download and save them securely. You can use only one set of API keys. If you do not remember your API keys, you must [regenerate them](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#regenerate-api-keys) from the Dashboard and update them wherever the previous keys were used for payment gateway integrations. +> - API Keys are universal; that is, they are applicable to all websites and apps that you have whitelisted for your Merchant ID. +> - **Do not share your API Key secret** with anyone or on any public platforms. **This can pose security threats to your Razorpay account**. +> - Once you generate the API Keys, only the **Key Id** is visible on the Dashboard, **not the Key secret**, as it can pose security threats to your Razorpay account. +> - Use the **Live API Keys** to accept live payments and the **Test API Keys** for test transactions. +> + +## Roll API Keys + +You can roll the Live and Test mode API keys if you have lost them or exposed them. You can choose to regenerate the API keys by deactivating them immediately or after 24 hours. + + + Know how to [regenerate Razorpay API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#regenerate-api-keys). + + + Know how to [regenerate RazorpayX API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md#regenerate-api-keys). + + +### Related Information + +- [Understand Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md) +- [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) +- [Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/best-practices.md) +- [Glossary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/glossary.md) diff --git a/llm-content/api/best-practices.md b/llm-content/api/best-practices.md new file mode 100644 index 00000000..7f6df904 --- /dev/null +++ b/llm-content/api/best-practices.md @@ -0,0 +1,28 @@ +--- +title: Razorpay APIs | Best Practices +heading: Best Practices +description: Find the best practices to follow while working with Razorpay APIs. +--- + +# Best Practices + +Follow these best practices while working with APIs. + +- **Do not share your API Key secret with anyone or on any public platforms.** This can pose security threats for your Razorpay account. +- While sending API requests to Razorpay servers, it is recommended to honour the TTL of the entries and not cache the DNS aggressively at your end. This is applicable when you are not using Razorpay SDKs. +- If you are using our SDKs, our SDKs can handle DNS caching and honour the TTLs that are set in the records. + +> **SUCCESS** +> +> +> **What's New** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +### Related Information +- [Understand Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md) +- [API Authentication](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md) +- [Sandbox Setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/sandbox-setup.md) +- [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) +- [Glossary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/glossary.md) diff --git a/llm-content/api/bills.md b/llm-content/api/bills.md new file mode 100644 index 00000000..aec3abe2 --- /dev/null +++ b/llm-content/api/bills.md @@ -0,0 +1,28 @@ +--- +title: API | Razorpay Bills +heading: About Bills +description: API Documentation for Razorpay bills. Create, Update and Delete Bills using APIs. Check the various use cases and code samples. +--- + +# About Bills + +You can use Razorpay [Billme](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/billme.md) to create digital bills and share them with your customers. + + Fork the Razorpay Postman Public Workspace and try the Bills APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/razorpay-public-workspace/folder/12492020-43632330-6e4d-4cf5-b2e4-14f278e72f46?action=share&source=copy-link&creator=19311422) + +### Related Guides + +[Razorpay Billme](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/billme.md) + +### Endpoints + +- **post** `/v1/bills` - Create a Bill: + Creates a Bill. + +- **patch** `/v1/bills/:bill_id` - Update a Bill: + Updates the details of a Bill. + +- **delete** `/v1/bills/:bill_id` - Delete a Bill: + Deletes a Bill. diff --git a/llm-content/api/bills/create.md b/llm-content/api/bills/create.md new file mode 100644 index 00000000..0e9011f8 --- /dev/null +++ b/llm-content/api/bills/create.md @@ -0,0 +1,2060 @@ +--- +title: Create a Bill +description: Create Bills with this endpoint and share with your customers. +--- + +# Create a Bill + +## Create a Bill + +Use this endpoint to create a Bill. + +### Request + +```curl: Curl - Retail +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/bills +-d '{ + "store_code": "JK-001", + "business_type": "retail", + "business_category": "retail_and_consumer_goods", + "customer": { + "contact": "9876543210", + "name": "Gaurav Kumar" + }, + "order_service_type": "dine_in", + "order_number": "ORD212", + "receipt_timestamp": 1722664800, + "receipt_number": "INV001250010", + "receipt_type": "tax_invoice", + "receipt_delivery": "digital", + "tags": ["noise cancelling", "limited edition"], + "qr_code_number": "T2322 00000009291", + "bar_code_number": "3412", + "billing_pos_number": "bn", + "pos_category": "traditional_pos", + "receipt_summary": { + "total_quantity": 2, + "sub_total_amount": 150000, + "total_tax_amount": 37500, + "total_tax_percent": 25, + "currency": "INR", + "net_payable_amount": 187500, + "additional_charges": [ + { + "description": "alteration charge", + "amount": 2000 + }, + { + "description": "cash on delivery", + "amount": 2000 + }, + ], + "payment_status": "success", + "change_amount": 0, + "roundup_amount": 0, + "total_discount_percent": 0, + "total_discount_amount": 0, + "discounts": [ + { + "name": "none", + "amount": 0, + "percent": 10 + } + ], + "used_wallet_amount": 0 + }, + "taxes": [ + { + "name": "CGST", + "percentage": 10, + "amount": 15000 + }, + { + "name": "SGST", + "percentage": 10, + "amount": 15000 + }, + { + "name": "cess", + "percentage": 5, + "amount": 7500 + } + ], + "line_items": [ + { + "name": "Acme Soap", + "quantity": 1, + "unit_amount": 10000, + "employee_id": "1234", + "unit": "pc", + "tags": ["noise cancelling", "limited edition"], + "sub_items": [ + { + "name": "Advanced Edition", + "quantity": 1, + "unit_amount": 0, + "employee_id": "1234", + "total_amount" : 1000, + "unit": "pc" + } + ], + "hsn_code": "HC2000INCLT", + "product_code": "DRCO38", + "total_amount": 10000, + "taxes": [ + { + "name": "CGST", + "percentage": 10, + "amount": 1000 + }, + { + "name": "SGST", + "percentage": 10, + "amount": 1000 + } + ] + }, + { + "name": "Acme Earphones", + "quantity": 1, + "unit_amount": 80000, + "unit": "pc", + "hsn_code": "HC2000INPPLT", + "product_code": "POPLT281", + "total_amount": 80000, + "taxes": [ + { + "name": "CGST", + "percentage": 10, + "amount": 8000 + }, + { + "name": "SGST", + "percentage": 10, + "amount": 8000 + } + ] + } + ], + "payments": [ + { + "method": "paytm", + "currency": "INR", + "amount": 90000, + "payment_reference_id": "", + "financier_data": { + "reference": "", + "name": "v" + } + } + ] +}' + +```curl: Curl - Food & Beverage +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/bills +-d '{ + "store_code": "JK-001", + "business_type": "retail", + "business_category": "food_and_beverages", + "customer": { + "contact": "9876543210", + "name": "Gaurav Kumar" + }, + "order_service_type": "dine_in", + "order_number": "ORD212", + "receipt_timestamp": 1722664800, + "receipt_number": "INV00125006", + "receipt_type": "tax_invoice", + "receipt_delivery": "digital", + "tags": ["caramel", "large"], + "qr_code_number": "T2322 00000009291", + "bar_code_number": "3412", + "billing_pos_number": "bn", + "pos_category": "traditional_pos", + "receipt_summary": { + "total_quantity": 2, + "sub_total_amount": 150000, + "total_tax_amount": 37500, + "total_tax_percent": 25, + "currency": "INR", + "net_payable_amount": 187500, + "additional_charges": [ + { + "description": "alteration charge", + "amount": 2000 + }, + { + "description": "cash on delivery", + "amount": 2000 + }, + ], + "payment_status": "success", + "change_amount": 0, + "roundup_amount": 0, + "total_discount_percent": 0, + "total_discount_amount": 0, + "discounts": [ + { + "name": "none", + "amount": 0, + "percent": 10 + } + ], + "used_wallet_amount": 0 + }, + "taxes": [ + { + "name": "CGST", + "percentage": 10, + "amount": 15000 + }, + { + "name": "SGST", + "percentage": 10, + "amount": 15000 + }, + { + "name": "cess", + "percentage": 5, + "amount": 7500 + } + ], + "line_items": [ + { + "name": "Acme Soap", + "quantity": 1, + "unit_amount": 10000, + "employee_id": "1234", + "unit": "pc", + "tags": ["caramel", "large"], + "sub_items": [ + { + "name": "Gourmet Popcorn", + "quantity": 1, + "unit_amount": 0, + "employee_id": "1234", + "total_amount": 1000, + "unit": "pc" + } + ], + "hsn_code": "HC2000INCLT", + "product_code": "DRCO38", + "total_amount": 10000, + "taxes": [ + { + "name": "CGST", + "percentage": 10, + "amount": 1000 + }, + { + "name": "SGST", + "percentage": 10, + "amount": 1000 + } + ] + }, + { + "name": "Popcorn Tub", + "quantity": 1, + "unit_amount": 80000, + "employee_id": "1234", + "unit": "pc", + "hsn_code": "HC2000INPPLT", + "product_code": "POPLT281", + "total_amount": 80000, + "taxes": [ + { + "name": "CGST", + "percentage": 10, + "amount": 8000 + }, + { + "name": "SGST", + "percentage": 10, + "amount": 8000 + } + ] + } + ], + "payments": [ + { + "method": "paytm", + "currency": "INR", + "amount": 90000, + "payment_reference_id": "", + "financier_data": { + "reference": "", + "name": "v" + } + } + ] +}' + +```curl: Curl - Events +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/bills +-d '{ + "store_code": "JK-001", + "business_type": "retail", + "business_category": "events", + "customer": { + "contact": "9876543210", + "name": "Gaurav Kumar" + }, + "receipt_timestamp": 1722664800, + "receipt_number": "INV00124912", + "receipt_type": "tax_invoice", + "receipt_delivery": "digital", + "tags": ["party1", "graduation"], + "qr_code_number": "T2322 00000009291", + "billing_pos_number": "bn", + "pos_category": "traditional_pos", + "receipt_summary": { + "total_quantity": 1, + "sub_total_amount": 50100, + "total_tax_amount": 500, + "currency": "INR", + "net_payable_amount": 50600, + "additional_charges": [ + { + "description": "alteration charge", + "amount": 2000 + }, + { + "description": "cash on delivery", + "amount": 2000 + }, + ], + "payment_status": "success", + "change_amount": 0, + "roundup_amount": 0, + "total_discount_percent": 0, + "total_discount_amount": 0, + "discounts": [ + { + "name": "none", + "amount": 0 + } + ], + "used_wallet_amount": 0 + }, + "taxes": [ + { + "name": "cgst", + "percentage": 20, + "amount": 200 + }, + { + "name": "sgst", + "percentage": 20, + "amount": 200 + }, + { + "name": "cess", + "percentage": 10, + "amount": 100 + } + ], + "line_items": [ + { + "name": "3D Charge", + "quantity": 1, + "employee_id": "1234", + "total_amount": 1000, + "tags": ["party1", "graduation"], + "sub_items": [ + { + "name": "Party", + "quantity": 1, + "unit_amount": 0, + "employee_id": "1234", + "total_amount": 1000, + "unit": "pc" + } + ] + } + ], + "payments": [ + { + "method": "paytm", + "currency": "INR", + "amount": 50000, + "payment_reference_id": "", + "financier_data": { + "reference": "", + "name": "v" + } + } + ], + "event": { + "name": "My Party", + "start_timestamp": 1722911400, + "end_timestamp": 1722924000, + "location": "B-wing", + "room": "Auditorium 1", + "seats": [ + "gold b1", + "gold b2", + "gold b3" + ] + } +}' +``` + +### Response + +```json: Success - Events +{ + "id": "bill_PYatDqaJ7gzzlu", + "business_type": "retail", + "business_category": "events", + "customer": { + "contact": "9876543210", + "name": "Gaurav Kumar", + "email": "", + "customer_id": "", + "date_of_birth": "", + "profession": "", + "company_name": "", + "marital_status": "", + "spouse_name": "", + "anniversary_date": "", + "gender": "", + "gstin": "", + "billing_address": null, + "shipping_address": null + }, + "loyalty": null, + "store_code": "JK-001", + "receipt_timestamp": 1722664800, + "receipt_number": "INV00124991", + "receipt_type": "tax_invoice", + "receipt_delivery": "digital", + "bar_code_number": "", + "qr_code_number": "T2322 00000009291", + "billing_pos_number": "bn", + "pos_category": "traditional_pos", + "order_number": "", + "order_service_type": "", + "delivery_status_url": "", + "line_items": [ + { + "name": "3D Charge", + "quantity": 1, + "employee_id": "1234", + "unit": "", + "description": "", + "hsn_code": "", + "product_code": "", + "product_uid": "", + "image_url": "", + "total_amount": 1000, + "brand": "", + "style": "", + "colour": "", + "size": "", + "financier_data": null, + "taxes": [], + "tags": [ + "party1", + "graduation" + ], + "sub_items": [ + { + "name": "Party", + "quantity": 1, + "unit_amount": 0, + "employee_id": "1234", + "unit": "pc", + "description": "", + "hsn_code": "", + "product_code": "", + "product_uid": "", + "image_url": "", + "total_amount": 10, + "brand": "", + "style": "", + "colour": "", + "size": "", + "taxes": [], + "tags": [] + } + ] + } + ], + "receipt_summary": { + "total_quantity": 1, + "sub_total_amount": 50100, + "currency": "INR", + "net_payable_amount": 50600, + "additional_charges": [ + { + "description": "alteration charge", + "amount": 2000 + }, + { + "description": "cash on delivery", + "amount": 2000 + }, + ], + "payment_status": "success", + "delivery_charges": 0, + "cod_charges": 0, + "change_amount": 0, + "roundup_amount": 0, + "total_discount_percent": 0, + "total_discount_amount": 0, + "discounts": [ + { + "name": "none", + "amount": 0 + } + ], + "used_wallet_amount": 0, + "total_tax_amount": 500 + }, + "taxes": [ + { + "name": "cgst", + "percentage": 20, + "amount": 2 + }, + { + "name": "sgst", + "percentage": 20, + "amount": 2 + }, + { + "name": "cess", + "percentage": 10, + "amount": 1 + } + ], + "payments": [ + { + "method": "paytm", + "currency": "INR", + "amount": 50000, + "payment_reference_id": "", + "financier_data": { + "reference": "", + "name": "v" + } + } + ], + "event": { + "name": "My Party", + "start_timestamp": 1722911400, + "end_timestamp": 1722924000, + "location": "B-wing", + "room": "Auditorium 1", + "seats": [ + "gold b1", + "gold b2", + "gold b3" + ] + }, + "receipt_url": "yourbill.me/PYatDqaJ7gzzlu", + "created_at": 1722664800, + "tags": [ + "party1", + "graduation" + ] +} + +```json: Success - Food & Beverage +{ + "id": "bill_PYaq2YV1pgU3Ue", + "business_type": "retail", + "business_category": "food_and_beverages", + "customer": { + "contact": "9876543210", + "name": "Gaurav Kumar", + "email": "", + "customer_id": "", + "date_of_birth": "", + "profession": "", + "company_name": "", + "marital_status": "", + "spouse_name": "", + "anniversary_date": "", + "gender": "", + "gstin": "", + "billing_address": null, + "shipping_address": null + }, + "loyalty": null, + "store_code": "JK-001", + "receipt_timestamp": 1722664800, + "receipt_number": "INV00125011", + "receipt_type": "tax_invoice", + "receipt_delivery": "digital", + "bar_code_number": "3412", + "qr_code_number": "T2322 00000009291", + "billing_pos_number": "bn", + "pos_category": "traditional_pos", + "order_number": "ORD212", + "order_service_type": "dine_in", + "delivery_status_url": "", + "line_items": [ + { + "name": "Acme Soap", + "quantity": 1, + "unit_amount": 10000, + "employee_id": "1234", + "unit": "pc", + "description": "", + "hsn_code": "HC2000INCLT", + "product_code": "DRCO38", + "product_uid": "", + "image_url": "", + "total_amount": 10000, + "brand": "", + "style": "", + "colour": "", + "size": "", + "financier_data": null, + "taxes": [ + { + "name": "CGST", + "percentage": 10, + "amount": 1000 + }, + { + "name": "SGST", + "percentage": 10, + "amount": 1000 + } + ], + "tags": [ + "caramel", + "large" + ], + "sub_items": [ + { + "name": "Gourmet Popcorn", + "quantity": 1, + "unit_amount": 0, + "employee_id": "1234", + "unit": "pc", + "description": "", + "hsn_code": "", + "product_code": "", + "product_uid": "", + "image_url": "", + "total_amount": 1, + "brand": "", + "style": "", + "colour": "", + "size": "", + "taxes": [], + "tags": [] + } + ] + }, + { + "name": "Popcorn Tub", + "quantity": 1, + "unit_amount": 80000, + "employee_id": "1234", + "unit": "pc", + "description": "", + "hsn_code": "HC2000INPPLT", + "product_code": "POPLT281", + "product_uid": "", + "image_url": "", + "total_amount": 80000, + "brand": "", + "style": "", + "colour": "", + "size": "", + "financier_data": null, + "taxes": [ + { + "name": "CGST", + "percentage": 10, + "amount": 8000 + }, + { + "name": "SGST", + "percentage": 10, + "amount": 8000 + } + ], + "tags": [], + "sub_items": [] + } + ], + "receipt_summary": { + "total_quantity": 2, + "sub_total_amount": 150000, + "currency": "INR", + "net_payable_amount": 187500, + "additional_charges": [ + { + "description": "alteration charge", + "amount": 2000 + }, + { + "description": "cash on delivery", + "amount": 2000 + }, + ], + "payment_status": "success", + "delivery_charges": 0, + "cod_charges": 0, + "change_amount": 0, + "roundup_amount": 0, + "total_discount_percent": 0, + "total_discount_amount": 0, + "discounts": [ + { + "name": "none", + "amount": 0, + "percent": 10 + } + ], + "used_wallet_amount": 0, + "total_tax_amount": 37500, + "total_tax_percent": 25 + }, + "taxes": [ + { + "name": "CGST", + "percentage": 10, + "amount": 150 + }, + { + "name": "SGST", + "percentage": 10, + "amount": 150 + }, + { + "name": "cess", + "percentage": 5, + "amount": 75 + } + ], + "payments": [ + { + "method": "paytm", + "currency": "INR", + "amount": 90000, + "payment_reference_id": "", + "financier_data": { + "reference": "", + "name": "v" + } + } + ], + "event": null, + "receipt_url": "yourbill.me/PYaq2YV1pgU3Ue", + "created_at": 1722664800, + "tags": [ + "caramel", + "large" + ] +} + +```json: Success - Retail +{ + "id": "bill_PYamApGCFTAjkh", + "business_type": "retail", + "business_category": "retail_and_consumer_goods", + "customer": { + "contact": "9876543210", + "name": "Gaurav Kumar", + "email": "", + "customer_id": "", + "date_of_birth": "", + "profession": "", + "company_name": "", + "marital_status": "", + "spouse_name": "", + "anniversary_date": "", + "gender": "", + "gstin": "", + "billing_address": null, + "shipping_address": null + }, + "loyalty": null, + "store_code": "JK-001", + "receipt_timestamp": 1722664800, + "receipt_number": "INV001250013", + "receipt_type": "tax_invoice", + "receipt_delivery": "digital", + "bar_code_number": "3412", + "qr_code_number": "T2322 00000009291", + "billing_pos_number": "bn", + "pos_category": "traditional_pos", + "order_number": "ORD213", + "order_service_type": "", + "delivery_status_url": "", + "line_items": [ + { + "name": "Acme Soap", + "quantity": 1, + "unit_amount": 10000, + "employee_id": "1234", + "unit": "pc", + "description": "", + "hsn_code": "HC2000INCLT", + "product_code": "DRCO38", + "product_uid": "", + "image_url": "", + "total_amount": 10000, + "brand": "", + "style": "", + "colour": "", + "size": "", + "financier_data": null, + "taxes": [ + { + "name": "CGST", + "percentage": 10, + "amount": 1000 + }, + { + "name": "SGST", + "percentage": 10, + "amount": 1000 + } + ], + "tags": [ + "noise cancelling", + "limited edition" + ], + "sub_items": [ + { + "name": "Advanced Edition", + "quantity": 1, + "unit_amount": 0, + "employee_id": "1234", + "unit": "pc", + "description": "", + "hsn_code": "", + "product_code": "", + "product_uid": "", + "image_url": "", + "total_amount": 10, + "brand": "", + "style": "", + "colour": "", + "size": "", + "taxes": [], + "tags": [] + } + ] + }, + { + "name": "Acme Earphones", + "quantity": 1, + "unit_amount": 80000, + "employee_id": "1234", + "unit": "pc", + "description": "", + "hsn_code": "HC2000INPPLT", + "product_code": "POPLT281", + "product_uid": "", + "image_url": "", + "total_amount": 80000, + "brand": "", + "style": "", + "colour": "", + "size": "", + "financier_data": null, + "taxes": [ + { + "name": "CGST", + "percentage": 10, + "amount": 8000 + }, + { + "name": "SGST", + "percentage": 10, + "amount": 8000 + } + ], + "tags": [], + "sub_items": [] + } + ], + "receipt_summary": { + "total_quantity": 2, + "sub_total_amount": 150000, + "currency": "INR", + "net_payable_amount": 187500, + "additional_charges": [ + { + "description": "alteration charge", + "amount": 2000 + }, + { + "description": "cash on delivery", + "amount": 2000 + }, + ], + "payment_status": "success", + "delivery_charges": 0, + "cod_charges": 0, + "change_amount": 0, + "roundup_amount": 0, + "total_discount_percent": 0, + "total_discount_amount": 0, + "discounts": [ + { + "name": "none", + "amount": 0, + "percent": 10 + } + ], + "used_wallet_amount": 0, + "total_tax_amount": 37500, + "total_tax_percent": 25 + }, + "taxes": [ + { + "name": "CGST", + "percentage": 10, + "amount": 150 + }, + { + "name": "SGST", + "percentage": 10, + "amount": 150 + }, + { + "name": "cess", + "percentage": 5, + "amount": 75 + } + ], + "payments": [ + { + "method": "paytm", + "currency": "INR", + "amount": 90000, + "payment_reference_id": "", + "financier_data": { + "reference": "", + "name": "v" + } + } + ], + "event": null, + "receipt_url": "yourbill.me/PYamApGCFTAjkh", + "created_at": 1722664800, + "tags": [ + "noise cancelling", + "limited edition" + ] +} + +```json: Failure +{ + "error": { + "code": "UNAUTHORISED", + "description": "client not authorised to update", + "field": null, + "source": "business", + "step": "authentication", + "reason": "unauthorised", + "metadata": {} + } +} +``` + +### Parameters + +`store_code` _conditionally mandatory_ +: `string` Associated store code for the receipt. Required if you have a multi-store setup where you have a single integration and have multiple stores under you. + +`business_type` _mandatory_ +: `string` The type of business. Possible values: + - `ecommerce` + - `retail` + +`business_category` _mandatory_ +: `string` The category the business falls under. Possible values: + - `events` + - `food_and_beverages` + - `retail_and_consumer_goods` + - `other_services` + +`customer` _conditionally mandatory_ +: `object` Details of the customer. Required if receipt mode is `digital` or `digital_and_print`. + + `contact` _conditionally mandatory_ + : `string` The customer's phone number. Required if receipt mode is `digital` or `digital_and_print` and `email` is not present. + + `name` _optional_ + : `string` The customer's name. + + `email` _conditionally mandatory_ + : `string` The customer's email address. Required if receipt mode is `digital` or `digital_and_print` and `contact` is not present. + + `customer_id` _optional_ + : `string` The customer's customer_id. Required if receipt mode is `digital` or `digital_and_print` and neither `contact` nor `email` is present. + + `age` _optional_ + : `integer` Age of the customer. + + `date_of_birth` _optional_ + : `string` Customer's date of birth. + + `pan` _optional_ + : `string` PAN number of the billed customer. + + `profession` _optional_ + : `string` Customer's current job profile name. + + `company_name` _optional_ + : `string` Customer's current employer. + + `marital_status` _optional_ + : `string` Customer's marital status. Possible values: + - `married` + - `unmarried` + + `spouse_name` _optional_ + : `string` Name of customer's spouse. + + `anniversary_date` _optional_ + : `string` Customer's date of anniversary. + + `gender` _optional_ + : `string` Customer gender. Possible values: + - `male` + - `female` + - `other` + + `gstin` _optional_ + : `string` Customer's GST number. + + `billing_address` _mandatory_ + : `object` Customer's billing address. Required if your `business_type` is `ecommerce`. + + `customer_name` _optional_ + : `string` Name of the recipient. + + `contact` _optional_ + : `string` The mobile number of the recipient. + + `gstin` _optional_ + : `string` GST number of the recipient. + + `pan` _optional_ + : `string` PAN number of the recipient. + + `address_line_1` _optional_ + : `string` Customer billing address line 1. + + `address_line_2` _optional_ + : `string` Customer billing address line 2. + + `landmark` _optional_ + : `string` Customer billing address landmark. + + `city` _optional_ + : `string` Customer billing address city. + + `province` _optional_ + : `string` Customer billing address province. + + `pin_code` _optional_ + : `string` Customer billing address PIN code. + + `country` _optional_ + : `string` Customer billing address country. + + `shipping_address` _mandatory_ + : `object` Customer's billing address. Required if your `business_type` is `ecommerce`. + + `customer_name` _optional_ + : `string` Name of the recipient. + + `contact` _optional_ + : `string` The mobile number of the recipient. + + `gstin` _optional_ + : `string` GST number of the recipient. + + `pan` _optional_ + : `string` PAN number of the recipient. + + `address_line_1` _optional_ + : `string` Customer shipping address line 1. + + `address_line_2` _optional_ + : `string` Customer shipping address line 2. + + `landmark` _optional_ + : `string` Customer shipping address landmark. + + `city` _optional_ + : `string` Customer shipping address city. + + `province` _optional_ + : `string` Customer shipping address province. + + `pin_code` _optional_ + : `string` Customer shipping address PIN code. + + `country` _optional_ + : `string` Customer shipping address country. + +`employee` _optional_ +: `object` This is an array of objects containing details of the employees associated with the receipt. + + `id` _optional_ + : `string` Employee ID/code. + + `name` _optional_ + : `string` Employee name. + + `role` _optional_ + : `string` Employee designation/role. + +`loyalty` _conditionally mandatory_ +: `object` Customer loyalty details. + + `type` _optional_ + : `string` Customer loyalty type. + + `card_num` _optional_ + : `string` Hashed debit/credit card number provided by the customer. + + `card_holder_name` _optional_ + : `string` Name of the card holder. + + `wallet_amount` _optional_ + : `integer` Wallet amount after used rewards of the customer. + + `amount_saved` _optional_ + : `integer` Amount saved by the customer. + + `points_earned` _optional_ + : `integer` Points earned by the customer after a transaction. + + `points_redeemed` _optional_ + : `integer` Points redeemed by the customer on a transaction. + + `points_available` _optional_ + : `integer` Points available to the customer at the beginning of the transaction. + + `points_balance` _optional_ + : `integer` Points available to the customer at the end of the transaction. + +`receipt_timestamp` _mandatory_ +: `integer` UNIX timestamp of the date and time when the receipt was generated. + +`receipt_number` _mandatory_ +: `string` Unique receipt number generated for the bill. + +`receipt_type` _mandatory_ +: `string` The type of receipt. Possible values: + - `tax_invoice` + - `sales_invoice` + - `sales_return_invoice` + - `proforma_invoice` + - `credit_invoice` + - `purchase_invoice` + - `debit_invoice` + - `order_confirmation` + +`receipt_delivery` _mandatory_ +: `string` Indicates the delivery type of the receipt. Possible values: + - `digital` + - `print` + - `digital_and_print` + +`tags` _optional_ +: `string` An array of strings representing relevant tags associated with the invoice. + +`bar_code_number` _optional_ +: `string` Bar code generated after the transaction. This will be displayed on the digital bill only. + +`qr_code_number` _optional_ +: `string` QR code generated after the transaction. This will be displayed on the digital bill only. + +`billing_pos_number` _optional_ +: `string` POS number of the machine that generated the bill. This is applicable if `business_type` is `retail`. + +`pos_category` _optional_ +: `string` The type of POS machine. This is applicable if `business_type` is `retail`. Possible values: + - `traditional_pos` + - `kiosk_pos` + +`order_number` _optional_ +: `string` Incremental order number of the generated bill. + +`order_service_type` _optional_ +: `string` Order service type of the generated bill. This is applicable if `business_category` is `food_and_beverages`. Possible values: + - `dine_in` + - `take_away` + +`delivery_status_url` _optional_ +: `string` Order delivery status. This is applicable if `business_type` is `ecommerce`. + +`line_items` _conditionally mandatory_ +: `object` This is an array of objects containing the product data of the bill. Required if `receipt_type` is not `credit_invoice` or `debit_invoice`. + + `name` _mandatory_ + : `string` Name of the product. + + `quantity` _mandatory_ + : `float` Quantity of the product. + + `unit_amount` _optional_ + : `integer` Price of the product. + + `unit` _optional_ + : `string` Type of unit. Possible values: + - `kg` + - `g` + - `mg` + - `lt` + - `ml` + - `pc` + - `cm` + - `m` + - `in` + - `ft` + - `set` + + `gross_weight` _optional_ + : `float` The total weight of the item, including all materials such as metal, stones, diamonds, and other embellishments. + + `net_weight` _optional_ + : `float` The weight of only the metal used in the item, excluding the weight of any diamonds, stones, or other materials. + + `description` _optional_ + : `string` Product/Item description. + + `hsn_code` _optional_ + : `string` HSN code of the product. + + `product_code` _optional_ + : `string` Product/Item code. + + `product_uid` _optional_ + : `string` Product/Item UID/SKU Code. + + `image_url` _optional_ + : `string` Image URL of the product. + + `total_amount` _mandatory_ + : `integer` Total amount of the product. + + `brand` _optional_ + : `string` Brand name of the product. + + `style` _optional_ + : `string` Product style. + + `colour` _optional_ + : `string` Colour of the product. + + `size` _optional_ + : `string` Size of the product in `cm`. + + `tags` _optional_ + : `string` An array of strings representing relevant tags associated with the item. + + `employee_id` _optional_ + : `string` Unique ID of the employee who sold the product. + + `additional_charges` _optional_ + : `object` This is an array of objects containing details of any additional charges on the item. + + `description` _optional_ + : `string` Description of the additional charges. + + `amount` _optional_ + : `integer` Amount of additional charges. + + `percent` _optional_ + : `float` Percent calculated on total amount. + + `sub_items` _conditionally mandatory_ + : `object` An array of objects containing the sub-item details of the item. + + `name` _mandatory_ + : `string` Name of the sub-item. + + `quantity` _mandatory_ + : `integer` Sub-item quantity. + + `unit_amount` _optional_ + : `integer` Price of the sub-item. + + `unit` _optional_ + : `string` Type of unit. Possible values: + - `kg` + - `g` + - `mg` + - `lt` + - `ml` + - `pc` + - `cm` + - `m` + - `in` + - `ft` + - `set` + + `gross_weight` _optional_ + : `float` The total weight of the item, including all materials such as metal, stones, diamonds, and other embellishments. + + `net_weight` _optional_ + : `float` The weight of only the metal used in the item, excluding the weight of any diamonds, stones, or other materials. + + `description` _optional_ + : `string` Sub-item description. + + `hsn_code` _optional_ + : `string` HSN code of the product. + + `product_code` _optional_ + : `string` Sub-item code. + + `product_uid` _optional_ + : `string` Sub-item UID/SKU Code. + + `image_url` _optional_ + : `string` Image URL of the sub-item. + + `total_amount` _mandatory_ + : `integer` Total amount of the sub-item. + + `brand` _optional_ + : `string` Brand name of the sub-item. + + `style` _optional_ + : `string` Sub-item style. + + `colour` _optional_ + : `string` Colour of the sub-item. + + `size` _optional_ + : `string` Size of the sub-item in `cm`. + + `tags` _optional_ + : `string` An array of strings representing relevant tags associated with the sub-item. + + `employee_id` _optional_ + : `string` Unique ID of the employee who sold the product. + + `additional_charges` _optional_ + : `object` This is an array of objects containing details of the additional charges of the item. + + `description` _optional_ + : `string` Description of the additional charges. + + `amount` _optional_ + : `integer` Amount of additional charges. + + `percent` _optional_ + : `float` percent calculated on total amount. + + `taxes` _optional_ + : `object` This is an array of objects containing the details of the taxes incurred. + + `name` _mandatory_ + : `string` Name of the tax. For example, CGST, SGST and so on. + + `percentage` _optional_ + : `float` Percentage of tax. + + `amount` _mandatory_ + : `integer` Applicable tax calculated on total amount. + + `financier_data` _optional_ + : `object` Data of the financier. This is applicable if the product is financed. For example, if the product is purchased on EMI. + + `reference` _optional_ + : `string` Unique id of the financier. + + `name` _optional_ + : `string` Name of the financier. + + `taxes` _optional_ + : `object` This is an array of objects containing the details of the taxes incurred. + + `name` _mandatory_ + : `string` Name of the tax. For example, CGST, SGST and so on. + + `percentage` _optional_ + : `float` Percentage of tax. + + `amount` _mandatory_ + : `integer` Applicable tax calculated on total amount. + +`receipt_summary` _mandatory_ +: `object` Details of the receipt. + + `total_quantity` _mandatory_ + : `integer` Total product quantity sold in the invoice. + + `sub_total_amount` _optional_ + : `integer` The total amount before taxes, discounts and additional fees are added to the invoice. + + `currency` _mandatory_ + : `string` The currency of the invoice. Refer to this sheet for the list of supported currencies. + + `total_tax_amount` _optional_ + : `integer` Total tax amount in paise. + + `total_tax_percent` _optional_ + : `float` Total tax percentage applied on the receipt. + + `net_payable_amount` _mandatory_ + : `integer` The total amount payable after adding taxes, discounts and additional fees to the invoice. + + `additional_charges` _optional_ + : `object` This is an array of objects containing the details of any additional charges applied on the invoice. If `additional_charges` is present, then `description` and `amount` are required. + + `description` _optional_ + : `string` Description of the additional charge. + + `amount` _optional_ + : `integer` Amount of the additional charge. + + `percent` _optional_ + : `float` Percent calculated on total amount. + + `payment_status` _optional_ + : `string` Status of the payment. Possible values: + - `pending` + - `authorized` + - `failed` + - `declined` + - `refunded` + - `cancelled` + - `processed` + - `settled` + - `voided` + - `success` + - `paid` + - `unpaid` + + `change_amount` _optional_ + : `integer` Change amount to be returned to the customer if the payment was made in cash. + + `roundup_amount` _optional_ + : `integer` Change amount to be returned to the customer if the payment was made in cash. + + `total_discount_percent` _optional_ + : `float` Total percentage of the discount on the sub-total amount without the taxes. + + `total_discount_amount` _optional_ + : `integer` Total value of the discount on the invoice. + + `discounts` _optional_ + : `object` This is an array of objects containing the details of the discount. If product reference (`product_code`, `product_uid`, or `hsn_code`) is present in the object, then the discount will be on the item. If not, the discount will be on the invoice. + + `name` _optional_ + : `string` Name of the discount. + + `amount` _optional_ + : `string` Amount of the applied discount. + + `percent` _optional_ + : `integer` Percentile value of the discounted amount. + + `product_code` _optional_ + : `string` Sub-item code. + + `product_uid` _optional_ + : `string` Sub-item UID/SKU Code. + + `hsn_code` _optional_ + : `string` HSN code of the product. + + `reference_id` _optional_ + : `string` Reference ID of the discount. + + `used_wallet_amount` _optional_ + : `string` Amount used from the customer's wallet for this transaction. + +`taxes` _conditionally mandatory_ +: `object` This is an array of objects containing the details of the taxes applied. Required if `receipt_type` is `tax_inovice`, `purchase_invoice` or `sales_invoice`. + + `name` _mandatory_ + : `string` Name of the tax. For example, CGST, SGST and so on. + + `percentage` _optional_ + : `float` Percentage of tax. + + `amount` _mandatory_ + : `integer` Applicable tax calculated on total amount. + +`payments` _mandatory_ +: `object` This is an array of objects containing the details of the payment. + + `method` _mandatory_ + : `string` The mode of payment. + + `currency` _mandatory_ + : `string` The currency in which the payment was made. + + `amount` _mandatory_ + : `integer` The amount of the payment in paise. For example, if the amount is `1200`. The unit will be `120000`. + + `payment_reference_id` _optional_ + : `string` The Unique id of the payment method. + + `financier_data` _optional_ + : `object` Details of the financier. + + `reference` _optional_ + : `string` Unique id of the financier. + + `name` _optional_ + : `string` Name of the financier. + +`event` _conditionally mandatory_ +: `object` Details of the event booking. Required if `business_category` is `events`. + + `name` _mandatory_ + : `string` Name of the event. + + `start_timestamp` _optional_ + : `integer` The exact time in seconds when the event starts. + + `end_timestamp` _optional_ + : `integer` The exact time in seconds when the event ends. + + `location` _optional_ + : `string` The location/venue of the event. + + `room` _optional_ + : `string` The specific room where the event was held. + + `seats` _optional_ + : `string` The number of seats booked for the event. + +`irn` _optional_ +: `object` This object contains IRN ( Invoice Reference Number ) related details. If `irn` is present, +qr_code and irn_number are required. + + `acknowledgement_number` _optional_ + : `string` Acknowledgement number of the generated IRN. + + `acknowledgement_date` _optional_ + : `integer` Acknowledgement date of the generated IRN. + + `qr_code` _conditionally mandatory_ + : `string` QR code associated with the IRN. Required if `irn` is present. + + `irn_number` _conditionally mandatory_ + : `string` E-invoice IRN. Required if IRN is present. + +### Parameters + +`id` _mandatory_ +: `string` Unique id of the bill generated. + +`business_type` _mandatory_ +: `string` The type of business. Possible values: + - `ecommerce` + - `retail` + +`business_category` _mandatory_ +: `string` The category the business falls under. Possible values: + - `events` + - `food_and_beverages` + - `retail_and_consumer_goods` + - `other_services` + +`customer` _conditionally mandatory_ +: `object` Details of the customer. Required if receipt mode is `digital` or `digital_and_print`. + + `contact` _conditionally mandatory_ + : `string` The customer's phone number. Required if receipt mode is `digital` or `digital_and_print` and `email` is not present. + + `name` _optional_ + : `string` The customer's name. + + `email` _conditionally mandatory_ + : `string` The customer's email address. Required if receipt mode is `digital` or `digital_and_print` and `contact` not present. + + `customer_id` _optional_ + : `string` The customer's customer_id. Required if receipt mode is `digital` or `digital_and_print` and neither `contact` nor `email` is present. + + `age` _optional_ + : `integer` Age of the customer. + + `date_of_birth` _optional_ + : `string` Customer's date of birth. + + `profession` _optional_ + : `string` Customer's current job profile name. + + `company_name` _optional_ + : `string` Customer current employer. + + `date_of_birth` _optional_ + : `string` Customer's date of birth. + + `marital_status` _optional_ + : `string` Customer's marital status. Possible values: + - `married` + - `unmarried` + + `spouse_name` _optional_ + : `string` Name of customer's spouse. + + `anniversary_date` _optional_ + : `string` Customer's date of anniversary. + + `gender` _optional_ + : `string` Customer gender. Possible values: + - `male` + - `female` + - `other` + + `gstin` _optional_ + : `string` Customer's GST number. + + `billing_address` _mandatory_ + : `object` Customer's billing address. Required if your `business_type` is `ecommerce`. + + `address_line_1` _optional_ + : `string` Customer billing address line 1. + + `address_line_2` _optional_ + : `string` Customer billing address line 2. + + `landmark` _optional_ + : `string` Customer billing address landmark. + + `city` _optional_ + : `string` Customer billing address city. + + `province` _optional_ + : `string` Customer billing address province. + + `pin_code` _optional_ + : `string` Customer billing address PIN code. + + `country` _optional_ + : `string` Customer billing address country. + + `shipping_address` _mandatory_ + : `object` Customer's billing address. Required if your `business_type` is `ecommerce`. + + `customer_name` _optional_ + : `string` Name of the recipient. + + `contact` _optional_ + : `string` The mobile number of the recipient. + + `gstin` _optional_ + : `string` GST number of the recipient. + + `pan` _optional_ + : `string` PAN number of the recipient. + + `address_line_1` _optional_ + : `string` Customer shipping address line 1. + + `address_line_2` _optional_ + : `string` Customer shipping address line 2. + + `landmark` _optional_ + : `string` Customer shipping address landmark. + + `city` _optional_ + : `string` Customer shipping address city. + + `province` _optional_ + : `string` Customer shipping address province. + + `pin_code` _optional_ + : `string` Customer shipping address PIN code. + + `country` _optional_ + : `string` Customer shipping address country. + +`loyalty` _conditionally mandatory_ +: `object` Customer loyalty details. + + `type` _optional_ + : `string` Customer loyalty type. + + `card_num` _optional_ + : `string` Hashed debit/credit card number provided by the customer. + + `card_holder_name` _optional_ + : `string` Name of the card holder. + + `wallet_amount` _optional_ + : `integer` Wallet amount after used rewards of the customer. + + `amount_saved` _optional_ + : `integer` Amount saved by the customer. + + `points_earned` _optional_ + : `integer` Points earned by the customer after a transaction. + + `points_redeemed` _optional_ + : `integer` Points redeemed by the customer on a transaction. + + `points_available` _optional_ + : `integer` Points available to the customer at the beginning of the transaction. + + `points_balance` _optional_ + : `integer` Points available to the customer at the end of the transaction. + +`store_code` _conditionally mandatory_ +: `string` Associated store code for the receipt. Required if you have a multi-store setup where you have a single integration and have multiple stores under you. + +`receipt_timestamp` _mandatory_ +: `integer` UNIX timestamp of the date and time when the receipt was generated. + +`receipt_number` _mandatory_ +: `string` Unique receipt number generated for the bill. + +`receipt_type` _mandatory_ +: `string` The type of receipt. Possible values: + - `tax_invoice` + - `sales_invoice` + - `sales_return_invoice` + - `proforma_invoice` + - `credit_invoice` + - `purchase_invoice` + - `debit_invoice` + - `order_confirmation` + +`receipt_delivery` _mandatory_ +: `string` Indicates the delivery type of the receipt. Possible values: + - `digital` + - `print` + - `digital_and_print` + +`tags` _optional_ +: `string` An array of strings representing relevant tags associated with the invoice. + +`bar_code_number` _optional_ +: `integer` Bar code generated after the transaction. This will be displayed on the digital bill only. + +`qr_code_number` _optional_ +: `integer` QR code generated after the transaction. This will be displayed on the digital bill only. + +`billing_pos_number` _optional_ +: `string` POS number of the machine that generated the bill. This is applicable if `business_type` is `retail`. + +`pos_category` _optional_ +: `string` The type of POS machine. This is applicable if `business_type` is `retail`. Possible values: + - `traditional_pos` + - `kiosk_pos` + +`order_number` _optional_ +: `string` Incremental order number of the generated bill. + +`order_service_type` _optional_ +: `string` Order service type of the generated bill. This is applicable if `business_category` is `food_and_beverages`. Possible values: + - `dine_in` + - `take_away` + +`delivery_status_url` _optional_ +: `string` Order delivery status. This is applicable if `business_type` is `ecommerce`. + +`line_items` _conditionally mandatory_ +: `object` This is an array of objects containing the product data of the bill. Required if `receipt_type` is not `credit_invoice` or `debit_invoice`. + + `name` _mandatory_ + : `string` Name of the product. + + `quantity` _mandatory_ + : `float` Quantity of the product. + + `unit_amount` _optional_ + : `integer` Price of the product. + + `unit` _optional_ + : `string` Type of unit. Possible values: + - `kg` + - `g` + - `mg` + - `lt` + - `ml` + - `pc` + - `cm` + - `m` + - `in` + - `ft` + - `set` + + `description` _optional_ + : `string` Product/Item description. + + `hsn_code` _optional_ + : `string` HSN code of the product. + + `product_code` _optional_ + : `string` Product/Item code. + + `product_uid` _optional_ + : `string` Product/Item UID/SKU Code. + + `image_url` _optional_ + : `string` Image URL of the product. + + `total_amount` _mandatory_ + : `integer` Total amount of the product. + + `brand` _optional_ + : `string` Brand name of the product. + + `style` _optional_ + : `string` Product style. + + `colour` _optional_ + : `string` Colour of the product. + + `size` _optional_ + : `string` Size of the product in `cm`. + + `tags` _optional_ + : `string` An array of strings representing relevant tags associated with the item. + + `sub_items` _conditionally mandatory_ + : `object` An array of objects containing the sub-item details of the item. + + `name` _mandatory_ + : `string` Name of the sub-item. + + `quantity` _mandatory_ + : `integer` Sub-item quantity. + + `unit_amount` _optional_ + : `integer` Price of the sub-item. + + `unit` _optional_ + : `string` Type of unit. Possible values: + - `kg` + - `g` + - `mg` + - `lt` + - `ml` + - `pc` + - `cm` + - `m` + - `in` + - `ft` + - `set` + + `description` _optional_ + : `string` Sub-item description. + + `hsn_code` _optional_ + : `string` HSN code of the product. + + `product_code` _optional_ + : `string` Sub-item code. + + `product_uid` _optional_ + : `string` Sub-item UID/SKU Code. + + `image_url` _optional_ + : `string` Image URL of the sub-item. + + `total_amount` _mandatory_ + : `integer` Total amount of the sub-item. + + `brand` _optional_ + : `string` Brand name of the sub-item. + + `style` _optional_ + : `string` Sub-item style. + + `colour` _optional_ + : `string` Colour of the sub-item. + + `size` _optional_ + : `string` Size of the sub-item in `cm`. + + `tags` _optional_ + : `string` An array of strings representing relevant tags associated with the sub-item. + + `taxes` _optional_ + : `object` This is an array of objects containing the details of the taxes incurred. + + `name` _mandatory_ + : `string` Name of the tax. For example, CGST, SGST and so on. + + `percentage` _optional_ + : `float` Percentage of tax. + + `amount` _mandatory_ + : `integer` Applicable tax calculated on total amount. + + `taxes` _optional_ + : `object` This is an array of objects containing the details of the taxes incurred. + + `name` _mandatory_ + : `string` Name of the tax. For example, CGST, SGST and so on. + + `percentage` _optional_ + : `float` Percentage of tax. + + `amount` _mandatory_ + : `integer` Applicable tax calculated on total amount. + +`receipt_summary` _mandatory_ +: `object` Details of the receipt. + + `total_quantity` _mandatory_ + : `integer` Total product quantity sold in the invoice. + + `sub_total_amount` _optional_ + : `integer` The total amount before taxes, discounts and additional fees are added to the invoice. + + `currency` _mandatory_ + : `string` The currency of the invoice. Refer to this sheet for the list of supported currencies. + + `total_tax_amount` _optional_ + : `integer` Total tax amount in paise. + + `total_tax_percent` _optional_ + : `float` Total tax percentage applied on the receipt. + + `net_payable_amount` _mandatory_ + : `integer` The total amount payable after adding taxes, discounts and additional fees to the invoice. + + `additional_charges` _optional_ + : `object` This is an array of objects containing the details of any additional charges applied on the invoice. If `additional_charges` is present, then `description` and `amount` are required. + + `description` _optional_ + : `string` Description of the additional charge. + + `amount` _optional_ + : `integer` Amount of the additional charge. + + `percent` _optional_ + : `float` Percent calculated on total amount. + + `payment_status` _optional_ + : `string` Status of the payment. Possible values: + - `pending` + - `authorized` + - `failed` + - `declined` + - `refunded` + - `cancelled` + - `processed` + - `settled` + - `voided` + - `success` + - `paid` + - `unpaid` + + `change_amount` _optional_ + : `integer` Change amount to be returned to the customer if the payment was made in cash. + + `roundup_amount` _optional_ + : `integer` Change amount to be returned to the customer if the payment was made in cash. + + `total_discount_percent` _optional_ + : `float` Total percentage of the discount on the sub-total amount without the taxes. + + `total_discount_amount` _optional_ + : `integer` Total value of the discount on the invoice. + + `discounts` _optional_ + : `object` This is an array of objects containing the details of the discount. If product reference (`product_code`, `product_uid`, or `hsn_code`) is present in the object, then the discount will be on the item. If not, the discount will be on the invoice. + + `name` _optional_ + : `string` Name of the discount. + + `amount` _optional_ + : `string` Amount of the applied discount. + + `percent` _optional_ + : `integer` Percentile value of the discounted amount. + + `used_wallet_amount` _optional_ + : `string` Amount used from the customer's wallet for this transaction. + +`taxes` _conditionally mandatory_ +: `object` This is an array of objects containing the details of the taxes applied. Required if `receipt_type` is `tax_inovice`, `purchase_invoice` or `sales_invoice`. + + `name` _mandatory_ + : `string` Name of the tax. For example, CGST, SGST and so on. + + `percentage` _optional_ + : `float` Percentage of tax. + + `amount` _mandatory_ + : `integer` Applicable tax calculated on total amount. + +`payments` _mandatory_ +: `object` Details of the payment. + + `method` _mandatory_ + : `string` The mode of payment. + + `currency` _mandatory_ + : `string` The currency in which the payment was made. + + `amount` _mandatory_ + : `integer` The amount of the payment in paise. For example, if the amount is `1200`. The unit will be `120000`. + + `payment_reference_id` _optional_ + : `string` The Unique id of the payment method. + + `financier_data` _optional_ + : `object` Details of the financier. + + `reference` _optional_ + : `string` Unique id of the financier. + + `name` _optional_ + : `string` Name of the financier. + +`event` _conditionally mandatory_ +: `object` Details of the event booking. Required if `business_category` is `events`. + + `name` _mandatory_ + : `string` Name of the event. + + `start_timestamp` _optional_ + : `integer` The exact time in seconds when the event starts. + + `end_timestamp` _optional_ + : `integer` The exact time in seconds when the event ends. + + `location` _optional_ + : `string` The location/venue of the event. + + `room` _optional_ + : `string` The specific room where the event was held. + + `seats` _optional_ + : `string` The number of seats booked for the event. + +`receipt_url` +: `string` The link to the receipt. + +`created_at` +: `integer` UNIX timestamp of the date when the bill was generated. + +### Errors + +client not authorised to update +* code: 401 +* description: The client credentials are unauthorised to make changes to this bill. +* solution: Use authorised credentials to make changes to the bill. + +The quantity must be an integer +* code: 400 +* description: The quantity of the product was not written in integer format. +* solution: Write the quantity in integer format. + +Operation failed +* code: 500 +* description: There is an internal server error +* solution: There is a server issue. Raise a support ticket with us to get this resolved. diff --git a/llm-content/api/bills/delete.md b/llm-content/api/bills/delete.md new file mode 100644 index 00000000..52cd1840 --- /dev/null +++ b/llm-content/api/bills/delete.md @@ -0,0 +1,53 @@ +--- +title: Delete a Bill +description: Delete Bills with this endpoint. +--- + +# Delete a Bill + +## Delete a Bill + +Use this endpoint to delete a Bill. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X DELETE https://api.razorpay.com/v1/bills/bill_4a5e9ulyzk1mk2 +``` + +### Response + +```json: Success +{"status": "deleted"} + +```json: Failure +{ + "error": { + "code": "UNAUTHORISED", + "description": "client not authorised to update", + "field": null, + "source": "business", + "step": "authentication", + "reason": "unauthorised", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the bill that must be deleted. + +### Errors + +client not authorised to update +* code: 401 +* description: The client credentials are unauthorised to make changes to this bill. +* solution: Use authorised credentials to make changes to the bill. + +Operation failed +* code: 500 +* description: There is an internal server error +* solution: There is a server issue. Raise a support ticket with us to get this resolved. diff --git a/llm-content/api/bills/entity.md b/llm-content/api/bills/entity.md new file mode 100644 index 00000000..ffd8588b --- /dev/null +++ b/llm-content/api/bills/entity.md @@ -0,0 +1,776 @@ +--- +title: Bills Entity +description: Entity parameters and sample code for Bills API. +--- + +# Bills Entity + +The Bills entity has the following parameters: + +### Response + +```json: Entity +{ + "id": "bill_PYamApGCFTAjkh", + "business_type": "retail", + "business_category": "retail_and_consumer_goods", + "customer": { + "contact": "9876543210", + "name": "Gaurav Kumar", + "email": "", + "customer_id": "", + "date_of_birth": "", + "profession": "", + "company_name": "", + "marital_status": "", + "spouse_name": "", + "anniversary_date": "", + "gender": "", + "gstin": "", + "billing_address": null, + "shipping_address": null + }, + "loyalty": null, + "store_code": "JK-001", + "receipt_timestamp": 1722664800, + "receipt_number": "INV001250013", + "receipt_type": "tax_invoice", + "receipt_delivery": "digital", + "bar_code_number": "3412", + "qr_code_number": "T2322 00000009291", + "billing_pos_number": "bn", + "pos_category": "traditional_pos", + "order_number": "ORD213", + "order_service_type": "", + "delivery_status_url": "", + "line_items": [ + { + "name": "Acme Soap", + "quantity": 1, + "unit_amount": 10000, + "employee_id": "1234", + "unit": "pc", + "description": "", + "hsn_code": "HC2000INCLT", + "product_code": "DRCO38", + "product_uid": "", + "image_url": "", + "total_amount": 10000, + "brand": "", + "style": "", + "colour": "", + "size": "", + "financier_data": null, + "taxes": [ + { + "name": "CGST", + "percentage": 10, + "amount": 1000 + }, + { + "name": "SGST", + "percentage": 10, + "amount": 1000 + } + ], + "tags": [ + "noise cancelling", + "limited edition" + ], + "sub_items": [ + { + "name": "Advanced Edition", + "quantity": 1, + "unit_amount": 0, + "employee_id": "1234", + "unit": "pc", + "description": "", + "hsn_code": "", + "product_code": "", + "product_uid": "", + "image_url": "", + "total_amount": 10, + "brand": "", + "style": "", + "colour": "", + "size": "", + "taxes": [], + "tags": [] + } + ] + }, + { + "name": "Acme Earphones", + "quantity": 1, + "unit_amount": 80000, + "employee_id": "1234", + "unit": "pc", + "description": "", + "hsn_code": "HC2000INPPLT", + "product_code": "POPLT281", + "product_uid": "", + "image_url": "", + "total_amount": 80000, + "brand": "", + "style": "", + "colour": "", + "size": "", + "financier_data": null, + "taxes": [ + { + "name": "CGST", + "percentage": 10, + "amount": 8000 + }, + { + "name": "SGST", + "percentage": 10, + "amount": 8000 + } + ], + "tags": [], + "sub_items": [] + } + ], + "receipt_summary": { + "total_quantity": 2, + "sub_total_amount": 150000, + "currency": "INR", + "net_payable_amount": 187500, + "additional_charges": [ + { + "description": "alteration charge", + "amount": 2000 + }, + { + "description": "cash on delivery", + "amount": 2000 + }, + ], + "payment_status": "success", + "change_amount": 0, + "roundup_amount": 0, + "total_discount_percent": 0, + "total_discount_amount": 0, + "discounts": [ + { + "name": "none", + "amount": 0, + "percent": 10 + } + ], + "used_wallet_amount": 0, + "total_tax_amount": 37500, + "total_tax_percent": 25 + }, + "taxes": [ + { + "name": "CGST", + "percentage": 10, + "amount": 150 + }, + { + "name": "SGST", + "percentage": 10, + "amount": 150 + }, + { + "name": "cess", + "percentage": 5, + "amount": 75 + } + ], + "payments": [ + { + "method": "paytm", + "currency": "INR", + "amount": 90000, + "payment_reference_id": "", + "financier_data": { + "reference": "", + "name": "v" + } + } + ], + "event": null, + "receipt_url": "yourbill.me/PYamApGCFTAjkh", + "created_at": 1722664800, + "tags": [ + "noise cancelling", + "limited edition" + ] +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique id of the bill generated. + +`business_type` _mandatory_ +: `string` The type of business. Possible values: + - `ecommerce` + - `retail` + +`business_category` _mandatory_ +: `string` The category the business falls under. Possible values: + - `events` + - `food_and_beverages` + - `retail_and_consumer_goods` + - `other_services` + +`customer` _conditionally mandatory_ +: `object` Details of the customer. Required if receipt mode is `digital` or `digital_and_print`. + + `contact` _conditionally mandatory_ + : `string` The customer's phone number. Required if receipt mode is `digital` or `digital_and_print` and `email` is not present. + + `name` _optional_ + : `string` The customer's name. + + `email` _conditionally mandatory_ + : `string` The customer's email address. Required if receipt mode is `digital` or `digital_and_print` and `contact` not present. + + `customer_id` _optional_ + : `string` The customer's customer_id. Required if receipt mode is `digital` or `digital_and_print` and neither `contact` nor `email` is present. + + `age` _optional_ + : `integer` Age of the customer. + + `date_of_birth` _optional_ + : `string` Customer's date of birth. + + `pan` _optional_ + : `string` PAN number of the billed customer. + + `profession` _optional_ + : `string` Customer's current job profile name. + + `company_name` _optional_ + : `string` Customer current employer. + + `date_of_birth` _optional_ + : `string` Customer's date of birth. + + `marital_status` _optional_ + : `string` Customer's marital status. Possible values: + - `married` + - `unmarried` + + `spouse_name` _optional_ + : `string` Name of customer's spouse. + + `anniversary_date` _optional_ + : `string` Customer's date of anniversary. + + `gender` _optional_ + : `string` Customer gender. Possible values: + - `male` + - `female` + - `other` + + `gstin` _optional_ + : `string` Customer's GST number. + + `billing_address` _mandatory_ + : `object` Customer's billing address. Required if your `business_type` is `ecommerce`. + + `address_line_1` _optional_ + : `string` Customer billing address line 1. + + `address_line_2` _optional_ + : `string` Customer billing address line 2. + + `landmark` _optional_ + : `string` Customer billing address landmark. + + `city` _optional_ + : `string` Customer billing address city. + + `province` _optional_ + : `string` Customer billing address province. + + `pin_code` _optional_ + : `string` Customer billing address PIN code. + + `country` _optional_ + : `string` Customer billing address country. + + `shipping_address` _mandatory_ + : `object` Customer's billing address. Required if your `business_type` is `ecommerce`. + + `customer_name` _optional_ + : `string` Name of the recipient. + + `contact` _optional_ + : `string` The mobile number of the recipient. + + `gstin` _optional_ + : `string` GST number of the recipient. + + `pan` _optional_ + : `string` PAN number of the recipient. + + `address_line_1` _optional_ + : `string` Customer shipping address line 1. + + `address_line_2` _optional_ + : `string` Customer shipping address line 2. + + `landmark` _optional_ + : `string` Customer shipping address landmark. + + `city` _optional_ + : `string` Customer shipping address city. + + `province` _optional_ + : `string` Customer shipping address province. + + `pin_code` _optional_ + : `string` Customer shipping address PIN code. + + `country` _optional_ + : `string` Customer shipping address country. + +`employee` _optional_ +: `object` This is an array of objects containing details of the employees associated with the receipt. + + `id` _optional_ + : `string` Employee ID/code. + + `name` _optional_ + : `string` Employee name. + + `role` _optional_ + : `string` Employee designation/role. + +`loyalty` _conditionally mandatory_ +: `object` Customer loyalty details. + + `type` _optional_ + : `string` Customer loyalty type. + + `card_num` _optional_ + : `string` Hashed debit/credit card number provided by the customer. + + `card_holder_name` _optional_ + : `string` Name of the card holder. + + `wallet_amount` _optional_ + : `integer` Wallet amount after used rewards of the customer. + + `amount_saved` _optional_ + : `integer` Amount saved by the customer. + + `points_earned` _optional_ + : `integer` Points earned by the customer after a transaction. + + `points_redeemed` _optional_ + : `integer` Points redeemed by the customer on a transaction. + + `points_available` _optional_ + : `integer` Points available to the customer at the beginning of the transaction. + + `points_balance` _optional_ + : `integer` Points available to the customer at the end of the transaction. + +`store_code` _conditionally mandatory_ +: `string` Associated store code for the receipt. Required if you have a multi-store setup where you have a single integration and have multiple stores under you. + +`receipt_timestamp` _mandatory_ +: `integer` UNIX timestamp of the date and time when the receipt was generated. + +`receipt_number` _mandatory_ +: `string` Unique receipt number generated for the bill. + +`receipt_type` _mandatory_ +: `string` The type of receipt. Possible values: + - `tax_invoice` + - `sales_invoice` + - `sales_return_invoice` + - `proforma_invoice` + - `credit_invoice` + - `purchase_invoice` + - `debit_invoice` + - `order_confirmation` + +`receipt_delivery` _mandatory_ +: `string` Indicates the delivery type of the receipt. Possible values: + - `digital` + - `print` + - `digital_and_print` + +`tags` _optional_ +: `array` An array of strings representing relevant tags associated with the invoice. + +`bar_code_number` _optional_ +: `integer` Bar code generated after the transaction. This will be displayed on the digital bill only. + +`qr_code_number` _optional_ +: `integer` QR code generated after the transaction. This will be displayed on the digital bill only. + +`billing_pos_number` _optional_ +: `string` POS number of the machine that generated the bill. This is applicable if `business_type` is `retail`. + +`pos_category` _optional_ +: `string` The type of POS machine. This is applicable if `business_type` is `retail`. Possible values: + - `traditional_pos` + - `kiosk_pos` + +`order_number` _optional_ +: `string` Incremental order number of the generated bill. + +`order_service_type` _optional_ +: `string` Order service type of the generated bill. This is applicable if `business_category` is `food_and_beverages`. Possible values: + - `dine_in` + - `take_away` + +`delivery_status_url` _optional_ +: `string` Order delivery status. This is applicable if `business_type` is `ecommerce`. + +`line_items` _conditionally mandatory_ +: `object` This is an array of objects containing the product data of the bill. Required if `receipt_type` is not `credit_invoice` or `debit_invoice`. + + `name` _mandatory_ + : `string` Name of the product. + + `quantity` + : `float` Quantity of the product. + + `unit_amount` _optional_ + : `integer` Price of the product. + + `unit` _optional_ + : `string` Type of unit. Possible values: + - `kg` + - `g` + - `mg` + - `lt` + - `ml` + - `pc` + - `cm` + - `m` + - `in` + - `ft` + - `set` + + `gross_weight` _optional_ + : `float` The total weight of the item, including all materials such as metal, stones, diamonds, and other embellishments. + + `net_weight` _optional_ + : `float` The weight of only the metal used in the item, excluding the weight of any diamonds, stones, or other materials. + + `description` _optional_ + : `string` Product/Item description. + + `hsn_code` _optional_ + : `string` HSN code of the product. + + `product_code` _optional_ + : `string` Product/Item code. + + `product_uid` _optional_ + : `string` Product/Item UID/SKU Code. + + `image_url` _optional_ + : `string` Image URL of the product. + + `total_amount` _mandatory_ + : `integer` Total amount of the product. + + `brand` _optional_ + : `string` Brand name of the product. + + `style` _optional_ + : `string` Product style. + + `colour` _optional_ + : `string` Colour of the product. + + `size` _optional_ + : `string` Size of the product in `cm`. + + `tags` _optional_ + : `string` An array of strings representing relevant tags associated with the item. + + `employee_id` _optional_ + : `string` Unique ID of the employee who sold the product. + + `additional_charges` _optional_ + : `object` This is an array of objects containing details of any additional charges on the item. + + `description` _optional_ + : `string` Description of the additional charges. + + `amount` _optional_ + : `integer` Amount of additional charges. + + `percent` _optional_ + : `float` Percent calculated on total amount. + + `sub_items` _conditionally mandatory_ + : `object` An array of objects containing the sub-item details of the item. + + `name` _mandatory_ + : `string` Name of the sub-item. + + `quantity` _mandatory_ + : `integer` Sub-item quantity. + + `unit_amount` _optional_ + : `integer` Price of the sub-item. + + `unit` _optional_ + : `string` Type of unit. Possible values: + - `kg` + - `g` + - `mg` + - `lt` + - `ml` + - `pc` + - `cm` + - `m` + - `in` + - `ft` + - `set` + + `gross_weight` _optional_ + : `float` The total weight of the item, including all materials such as metal, stones, diamonds, and other embellishments. + + `net_weight` _optional_ + : `float` The weight of only the metal used in the item, excluding the weight of any diamonds, stones, or other materials. + + `description` _optional_ + : `string` Sub-item description. + + `hsn_code` _optional_ + : `string` HSN code of the product. + + `product_code` _optional_ + : `string` Sub-item code. + + `product_uid` _optional_ + : `string` Sub-item UID/SKU Code. + + `image_url` _optional_ + : `string` Image URL of the sub-item. + + `total_amount` _mandatory_ + : `integer` Total amount of the sub-item. + + `brand` _optional_ + : `string` Brand name of the sub-item. + + `style` _optional_ + : `string` Sub-item style. + + `colour` _optional_ + : `string` Colour of the sub-item. + + `size` _optional_ + : `string` Size of the sub-item in `cm`. + + `tags` _optional_ + : `string` An array of strings representing relevant tags associated with the sub-item. + + `additional_charges` _optional_ + : `object` This is an array of objects containing details of any additional charges on the item. + + `description` _optional_ + : `string` Description of the additional charges. + + `amount` _optional_ + : `integer` Amount of additional charges. + + `percent` _optional_ + : `float` Percent calculated on total amount. + + `taxes` _optional_ + : `object` This is an array of objects containing the details of the taxes incurred. + + `name` _mandatory_ + : `string` Name of the tax. For example, CGST, SGST and so on. + + `percentage` _optional_ + : `float` Percentage of tax. + + `amount` _mandatory_ + : `integer` Applicable tax calculated on total amount. + + `taxes` _optional_ + : `object` This is an array of objects containing the details of the taxes incurred. + + `name` _mandatory_ + : `string` Name of the tax. For example, CGST, SGST and so on. + + `percentage` _optional_ + : `float` Percentage of tax. + + `amount` _mandatory_ + : `integer` Applicable tax calculated on total amount. + +`receipt_summary` _mandatory_ +: `object` Details of the receipt. + + `total_quantity` _mandatory_ + : `integer` Total product quantity sold in the invoice. + + `sub_total_amount` _optional_ + : `integer` The total amount before taxes, discounts and additional fees are added to the invoice. + + `currency` _mandatory_ + : `string` The currency of the invoice. Refer to this sheet for the list of supported currencies. + + `total_tax_amount` _optional_ + : `integer` Total tax amount in paise. + + `total_tax_percent` _optional_ + : `float` Total tax percentage applied on the receipt. + + `net_payable_amount` _mandatory_ + : `integer` The total amount payable after adding taxes, discounts and additional fees to the invoice. + + `additional_charges` _optional_ + : `object` This is an array of objects containing the details of any additional charges applied on the invoice. If `additional_charges` is present, then `description` and `amount` are required. + + `description` _optional_ + : `string` Description of the additional charge. + + `amount` _optional_ + : `integer` Amount of the additional charge. + + `percent` _optional_ + : `float` Percent calculated on total amount. + + `payment_status` _optional_ + : `string` Status of the payment. Possible values: + - `pending` + - `authorized` + - `failed` + - `declined` + - `refunded` + - `cancelled` + - `processed` + - `settled` + - `voided` + - `success` + - `paid` + - `unpaid` + + `change_amount` _optional_ + : `integer` Change amount to be returned to the customer if the payment was made in cash. + + `roundup_amount` _optional_ + : `integer` Change amount to be returned to the customer if the payment was made in cash. + + `total_discount_percent` _optional_ + : `float` Total percentage of the discount on the sub-total amount without the taxes. + + `total_discount_amount` _optional_ + : `integer` Total value of the discount on the invoice. + + `discounts` _optional_ + : `object` This is an array of objects containing the details of the discount. If product reference (`product_code`, `product_uid`, or `hsn_code`) is present in the object, then the discount will be on the item. If not, the discount will be on the invoice. + + `name` _optional_ + : `string` Name of the discount. + + `amount` _optional_ + : `string` Amount of the applied discount. + + `percent` _optional_ + : `integer` Percentile value of the discounted amount. + + `product_code` _optional_ + : `string` Product/Item code. + + `product_uid` _optional_ + : `string` Product/Item UID/SKU Code. + + `hsn_code` _optional_ + : `string` HSN code of the product. + + `reference_id` _optional_ + : `string` Reference ID of the discount. + + `used_wallet_amount` _optional_ + : `string` Amount used from the customer's wallet for this transaction. + +`taxes` _conditionally mandatory_ +: `object` This is an array of objects containing the details of the taxes applied. Required if `receipt_type` is `tax_inovice`, `purchase_invoice` or `sales_invoice`. + + `name` _mandatory_ + : `string` Name of the tax. For example, CGST, SGST and so on. + + `percentage` _optional_ + : `float` Percentage of tax. + + `amount` _mandatory_ + : `integer` Applicable tax calculated on total amount. + +`payments` _mandatory_ +: `object` Details of the payment. + + `method` _mandatory_ + : `string` The mode of payment. + + `currency` _mandatory_ + : `string` The currency in which the payment was made. + + `amount` _mandatory_ + : `integer` The amount of the payment in paise. For example, if the amount is `1200`. The unit will be `120000`. + + `payment_reference_id` _optional_ + : `string` The Unique id of the payment method. + + `financier_data` _optional_ + : `object` Details of the financier. + + `reference` _optional_ + : `string` Unique id of the financier. + + `name` _optional_ + : `string` Name of the financier. + +`event` _conditionally mandatory_ +: `object` Details of the event booking. Required if `business_category` is `events`. + + `name` _mandatory_ + : `string` Name of the event. + + `start_timestamp` _optional_ + : `integer` The exact time in seconds when the event starts. + + `end_timestamp` _optional_ + : `integer` The exact time in seconds when the event ends. + + `location` _optional_ + : `string` The location/venue of the event. + + `room` _optional_ + : `string` The specific room where the event was held. + + `seats` _optional_ + : `string` The number of seats booked for the event. + +`irn` _optional_ +: `object` This object contains IRN ( Invoice Reference Number ) related details. If `irn` is present, +qr_code and irn_number are required. + + `acknowledgement_number` _optional_ + : `string` Acknowledgement number of the generated IRN. + + `acknowledgement_date` _optional_ + : `integer` Acknowledgement date of the generated IRN. + + `qr_code` _conditionally mandatory_ + : `string` QR code associated with the IRN. Required if IRN is present. + + `irn_number` _conditionally mandatory_ + : `string` E-invoice IRN. Required if IRN is present. + +`receipt_url` +: `string` The link to the receipt. + +`created_at` +: `integer` UNIX timestamp of the date when the bill was generated. diff --git a/llm-content/api/bills/update.md b/llm-content/api/bills/update.md new file mode 100644 index 00000000..878d1492 --- /dev/null +++ b/llm-content/api/bills/update.md @@ -0,0 +1,1226 @@ +--- +title: Update a Bill +description: Update Bills with this endpoint. +--- + +# Update a Bill + +## Update a Bill + +Use this endpoint to update a Bill. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X PATCH https://api.razorpay.com/v1/bills/bill_4a5e9ulyzk1mk2 +-d '{ + "store_code": "", + "customer": { + "contact": "9000090001", + "email": "saurav.kumar@example.com" + }, + "receipt_type": "tax_invoice", + "receipt_timestamp": 1907416999, + "receipt_delivery": "digital", + "line_items": [ + { + "name": "T-Shirt", + "quantity": 1, + "employee_id": "1234", + "total_amount": 100000 + } + ], + "receipt_summary": { + "total_quantity": 1, + "sub_total_amount": 100000, + "currency": "INR", + "net_payable_amount": 124000, + "additional_charges": [ + { + "description": "alteration charge", + "amount": 2000 + }, + { + "description": "cash on delivery", + "amount": 2000 + }, + ], + "payment_status": "paid" + }, + "taxes": [ + { + "name": "cgst", + "percentage": 1200, + "amount": 12000 + }, + { + "name": "sgst", + "percentage": 1200, + "amount": 12000 + } + ], + "payments": [ + { + "method": "Bank Transfer", + "amount": 124000, + "currency": "INR" + } + ] +}' +``` + +### Response + +```json: Success +{ + "id": "bill_PYy4RWJWiNcPyE", + "business_type": "retail", + "business_category": "events", + "customer": { + "contact": "9000090001", + "name": "d", + "email": "saurav.kumar@example.com", + "customer_id": "", + "age": 2, + "date_of_birth": "", + "profession": "", + "company_name": "", + "marital_status": "", + "spouse_name": "", + "anniversary_date": "", + "gender": "", + "gstin": "", + "billing_address": { + "address_line_1": "", + "address_line_2": "", + "landmark": "", + "city": "", + "province": "", + "pin_code": "", + "country": "" + }, + "shipping_address": { + "address_line_1": "", + "address_line_2": "", + "landmark": "", + "city": "", + "province": "", + "pin_code": "", + "country": "" + } + }, + "loyalty": { + "type": "", + "card_num": "", + "card_holder_name": "", + "points_redeemed": 1 + }, + "store_code": "JK-001", + "receipt_timestamp": 1907416999, + "receipt_number": "INV00124992", + "receipt_type": "tax_invoice", + "receipt_delivery": "digital", + "bar_code_number": "", + "qr_code_number": "T2322 00000009291", + "billing_pos_number": "bn", + "pos_category": "traditional_pos", + "order_number": "", + "order_service_type": "", + "delivery_status_url": "", + "line_items": [ + { + "name": "T-Shirt", + "quantity": 1, + "unit": "", + "employee_id": "1234", + "description": "", + "hsn_code": "", + "product_code": "", + "product_uid": "", + "image_url": "", + "total_amount": 100000, + "brand": "", + "style": "", + "colour": "", + "size": "", + "financier_data": null, + "taxes": [], + "tags": [], + "sub_items": [] + } + ], + "receipt_summary": { + "total_quantity": 1, + "sub_total_amount": 100000, + "currency": "INR", + "net_payable_amount": 124000, + "additional_charges": [ + { + "description": "alteration charge", + "amount": 2000 + }, + { + "description": "cash on delivery", + "amount": 2000 + }, + ], + "payment_status": "paid", + "discounts": [] + }, + "taxes": [ + { + "name": "cgst", + "percentage": 1200, + "amount": 120 + }, + { + "name": "sgst", + "percentage": 1200, + "amount": 120 + } + ], + "payments": [ + { + "method": "Bank Transfer", + "currency": "INR", + "amount": 124000, + "payment_reference_id": "", + "financier_data": null + } + ], + "event": { + "name": "My Party", + "start_timestamp": 1722911400, + "end_timestamp": 1722924000, + "location": "B-wing", + "room": "Auditorium 1", + "seats": [ + "gold b1", + "gold b2", + "gold b3" + ] + }, + "receipt_url": "yourbill.me/PYy4RWJWiNcPyE", + "created_at": 1907416999, + "tags": [ + "party1", + "graduation" + ] +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the Bill. + +### Parameters + +`store_code` _conditionally mandatory_ +: `string` Associated store code for the receipt. Required if you have a multi-store setup where you have a single integration and have multiple stores under you. + +`customer` _conditionally mandatory_ +: `object` Details of the customer. Required if receipt mode is `digital` or `digital_and_print`. + + `contact` _conditionally mandatory_ + : `string` The customer's phone number. Required if receipt mode is `digital` or `digital_and_print` and `email` is not present. + + `name` _optional_ + : `string` The customer's name. + + `email` _conditionally mandatory_ + : `string` The customer's email address. Required if receipt mode is `digital` or `digital_and_print` and `contact` is not present. + + `customer_id` _optional_ + : `string` The customer's customer_id. Required if receipt mode is `digital` or `digital_and_print` and neither `contact` nor `email` is present. + + `age` _optional_ + : `integer` Age of the customer. + + `date_of_birth` _optional_ + : `string` Customer's date of birth. + + `pan` _optional_ + : `string` PAN number of the billed customer. + + `profession` _optional_ + : `string` Customer's current job profile name. + + `company_name` _optional_ + : `string` Customer current employer. + + `marital_status` _optional_ + : `string` Customer's marital status. Possible values: + - `married` + - `unmarried` + + `spouse_name` _optional_ + : `string` Name of customer's spouse. + + `anniversary_date` _optional_ + : `string` Customer's date of anniversary. + + `gender` _optional_ + : `string` Customer gender. Possible values: + - `male` + - `female` + - `other` + + `gstin` _optional_ + : `string` Customer's GST number. + + `billing_address` _mandatory_ + : `object` Customer's billing address. Required if your `business_type` is `ecommerce`. + + `address_line_1` _optional_ + : `string` Customer billing address line 1. + + `address_line_2` _optional_ + : `string` Customer billing address line 2. + + `landmark` _optional_ + : `string` Customer billing address landmark. + + `city` _optional_ + : `string` Customer billing address city. + + `province` _optional_ + : `string` Customer billing address province. + + `pin_code` _optional_ + : `string` Customer billing address PIN code. + + `country` _optional_ + : `string` Customer billing address country. + + `shipping_address` _mandatory_ + : `object` Customer's billing address. Required if your `business_type` is `ecommerce`. + + `customer_name` _optional_ + : `string` Name of the recipient. + + `contact` _optional_ + : `string` The mobile number of the recipient. + + `gstin` _optional_ + : `string` GST number of the recipient. + + `pan` _optional_ + : `string` PAN number of the recipient. + + `address_line_1` _optional_ + : `string` Customer shipping address line 1. + + `address_line_2` _optional_ + : `string` Customer shipping address line 2. + + `landmark` _optional_ + : `string` Customer shipping address landmark. + + `city` _optional_ + : `string` Customer shipping address city. + + `province` _optional_ + : `string` Customer shipping address province. + + `pin_code` _optional_ + : `string` Customer shipping address PIN code. + + `country` _optional_ + : `string` Customer shipping address country. + +`employee` _optional_ +: `object` This is an array of objects containing details of the employees associated with the receipt. + + `id` _optional_ + : `string` Employee ID/code. Unique identifier of the employee. + + `name` _optional_ + : `string` Name of the employee. + + `role` _optional_ + : `string` Employee designation/role. + +`loyalty` _conditionally mandatory_ +: `object` Customer loyalty details. + + `type` _optional_ + : `string` Customer loyalty type. + + `card_num` _optional_ + : `string` Hashed debit/credit card number provided by the customer. + + `card_holder_name` _optional_ + : `string` Name of the card holder. + + `wallet_amount` _optional_ + : `integer` Wallet amount after used rewards of the customer. + + `amount_saved` _optional_ + : `integer` Amount saved by the customer. + + `points_earned` _optional_ + : `integer` Points earned by the customer after a transaction. + + `points_redeemed` _optional_ + : `integer` Points redeemed by the customer on a transaction. + + `points_available` _optional_ + : `integer` Points available to the customer at the beginning of the transaction. + + `points_balance` _optional_ + : `integer` Points available to the customer at the end of the transaction. + +`receipt_type` _mandatory_ +: `string` The type of receipt. Possible values: + - `tax_invoice` + - `sales_invoice` + - `sales_return_invoice` + - `proforma_invoice` + - `credit_invoice` + - `purchase_invoice` + - `debit_invoice` + +`receipt_timestamp` _mandatory_ +: `integer` UNIX timestamp of the date and time when the receipt was generated. + +`receipt_delivery` _mandatory_ +: `string` Indicates the delivery type of the receipt. Possible values: + - `digital` + - `print` + - `digital_and_print` + +`tags` _optional_ +: `string` An array of strings representing relevant tags associated with the invoice. + +`pos_category` _optional_ +: `string` The type of POS machine. This is applicable if `business_type` is `retail`. Possible values: + - `traditional_pos` + - `kiosk_pos` + +`line_items` _conditionally mandatory_ +: `object` This is an array of objects containing the product data of the bill. Required if `receipt_type` is not `credit_invoice` or `debit_invoice`. + + `name` _mandatory_ + : `string` Name of the product. + + `quantity` _mandatory_ + : `float` Quantity of the product. + + `unit_amount` _optional_ + : `integer` Price of the product. + + `unit` _optional_ + : `string` Type of unit. Possible values: + - `kg` + - `g` + - `mg` + - `lt` + - `ml` + - `pc` + - `cm` + - `m` + - `in` + - `ft` + - `set` + + `gross_weight` _optional_ + : `float` The total weight of the item, including all materials such as metal, stones, diamonds, and other embellishments. + + `net_weight` _optional_ + : `float` The weight of only the metal used in the item, excluding the weight of any diamonds, stones, or other materials. + + `description` _optional_ + : `string` Product/Item description. + + `hsn_code` _optional_ + : `string` HSN code of the product. + + `product_code` _optional_ + : `string` Product/Item code. + + `product_uid` _optional_ + : `string` Product/Item UID/SKU Code. + + `image_url` _optional_ + : `string` Image URL of the product. + + `total_amount` _mandatory_ + : `integer` Total amount of the product. + + `brand` _optional_ + : `string` Brand name of the product. + + `style` _optional_ + : `string` Product style. + + `colour` _optional_ + : `string` Colour of the product. + + `size` _optional_ + : `string` Size of the product in `cm`. + + `tags` _optional_ + : `string` An array of strings representing relevant tags associated with the item. + + `employee_id` _optional_ + : `string` Unique ID of the employee who sold the product. + + `additional_charges` _optional_ + : `object` This is an array of objects containing details of the additional charges of the item. + + `description` _optional_ + : `string` Description of the additional charge. + + `amount` _optional_ + : `integer` Amount of additional charge. + + `percent` _optional_ + : `float` Percent calculated on total amount. + + `sub_items` _conditionally mandatory_ + : `object` An array of objects containing the sub-item details of the item. + + `name` _mandatory_ + : `string` Name of the sub-item. + + `quantity` _mandatory_ + : `integer` Sub-item quantity. + + `unit_amount` _optional_ + : `integer` Price of the sub-item. + + `unit` _optional_ + : `string` Type of unit. Possible values: + - `kg` + - `g` + - `mg` + - `lt` + - `ml` + - `pc` + - `cm` + - `m` + - `in` + - `ft` + - `set` + + `gross_weight` _optional_ + : `float` The total weight of the item, including all materials such as metal, stones, diamonds, and other embellishments. + + `net_weight` _optional_ + : `float` The weight of only the metal used in the item, excluding the weight of any diamonds, stones, or other materials. + + `description` _optional_ + : `string` Sub-item description. + + `hsn_code` _optional_ + : `string` HSN code of the product. + + `product_code` _optional_ + : `string` Sub-item code. + + `product_uid` _optional_ + : `string` Sub-item UID/SKU Code. + + `image_url` _optional_ + : `string` Image URL of the sub-item. + + `total_amount` _mandatory_ + : `integer` Total amount of the sub-item. + + `brand` _optional_ + : `string` Brand name of the sub-item. + + `style` _optional_ + : `string` Sub-item style. + + `colour` _optional_ + : `string` Colour of the sub-item. + + `size` _optional_ + : `string` Size of the sub-item in `cm`. + + `tags` _optional_ + : `string` An array of strings representing relevant tags associated with the sub-item. + + `employee_id` _optional_ + : `string` Unique ID of the employee who sold the product. + + `additional_charges` _optional_ + : `object` This is an array of objects containing details of the additional charges of the item. + + `description` _optional_ + : `string` Description of the additional charge. + + `amount` _optional_ + : `integer` Amount of additional charge. + + `percent` _optional_ + : `float` Percent calculated on total amount. + + `taxes` _optional_ + : `object` This is an array of objects containing the details of the taxes incurred. + + `name` _mandatory_ + : `string` Name of the tax. For example, CGST, SGST and so on. + + `percentage` _optional_ + : `float` Percentage of tax. + + `amount` _mandatory_ + : `integer` Applicable tax calculated on total amount. + + `financier_data` _optional_ + : `object` Data of the financier. This is applicable if the product is financed. For example, if the product is purchased on EMI. + + `reference` _optional_ + : `string` Unique id of the financier. + + `name` _optional_ + : `string` Name of the financier. + + `taxes` _optional_ + : `object` This is an array of objects containing the details of the taxes incurred. + + `name` _mandatory_ + : `string` Name of the tax. For example, CGST, SGST and so on. + + `percentage` _optional_ + : `float` Percentage of tax. + + `amount` _mandatory_ + : `integer` Applicable tax calculated on total amount. + +`receipt_summary` _mandatory_ +: `object` Details of the receipt. + + `total_quantity` _mandatory_ + : `integer` Total product quantity sold in the invoice. + + `sub_total_amount` _optional_ + : `integer` The total amount before taxes, discounts and additional fees are added to the invoice. + + `currency` _mandatory_ + : `string` The currency of the invoice. Refer to this sheet for the list of supported currencies. + + `total_tax_amount` _optional_ + : `integer` Total tax amount in paise. + + `total_tax_percent` _optional_ + : `float` Total tax percentage applied on the receipt. + + `net_payable_amount` _mandatory_ + : `integer` The total amount payable after adding taxes, discounts and additional fees to the invoice. + + `additional_charges` _optional_ + : `object` This is an array of objects containing the details of any additional charges applied on the invoice. If `additional_charges` is present, then `description` and `amount` are required. + + `description` _optional_ + : `string` Description of the additional charge. + + `amount` _optional_ + : `integer` Amount of the additional charge. + + `percent` _optional_ + : `float` Percent calculated on total amount. + + `payment_status` _optional_ + : `string` Status of the payment. Possible values: + - `pending` + - `authorized` + - `failed` + - `declined` + - `refunded` + - `cancelled` + - `processed` + - `settled` + - `voided` + - `success` + - `paid` + - `unpaid` + + `change_amount` _optional_ + : `integer` Change amount to be returned to the customer if the payment was made in cash. + + `roundup_amount` _optional_ + : `integer` Change amount to be returned to the customer if the payment was made in cash. + + `total_discount_percent` _optional_ + : `float` Total percentage of the discount on the sub-total amount without the taxes. + + `total_discount_amount` _optional_ + : `integer` Total value of the discount on the invoice. + + `discounts` _optional_ + : `object` This is an array of objects containing the details of the discount. If product reference (`product_code`, `product_uid`, or `hsn_code`) is present in the object, then the discount will be on the item. If not, the discount will be on the invoice. + + `name` _optional_ + : `string` Name of the discount. + + `amount` _optional_ + : `string` Amount of the applied discount. + + `percent` _optional_ + : `integer` Percentile value of the discounted amount. + + `product_code` _optional_ + : `string` Product/Item code. + + `product_uid` _optional_ + : `string` Product/Item UID/SKU Code. + + `hsn_code` _optional_ + : `string` HSN code of the product. + + `reference_id` _optional_ + : `string` Reference ID of the discount. + + `used_wallet_amount` _optional_ + : `string` Amount used from the customer's wallet for this transaction. + +`taxes` _optional_ + : `object` This is an array of objects containing the details of the taxes incurred. + + `name` _mandatory_ + : `string` Name of the tax. For example, CGST, SGST and so on. + + `percentage` _optional_ + : `float` Percentage of tax. + + `amount` _mandatory_ + : `integer` Applicable tax calculated on total amount. + +`payments` _mandatory_ +: `object` This is an array of objects containing the details of the payment. + + `method` _mandatory_ + : `string` The mode of payment. + + `currency` _mandatory_ + : `string` The currency in which the payment was made. + + `amount` _mandatory_ + : `integer` The amount of the payment in paise. For example, if the amount is `1200`. The unit will be `120000`. + +`irn` _optional_ +: `object` This object contains IRN ( Invoice Reference Number ) related details. If `irn` is present, +qr_code and irn_number are required. + + `acknowledgement_number` _optional_ + : `string` Acknowledgement number of the generated IRN. + + `acknowledgement_date` _optional_ + : `integer` Acknowledgement date of the generated IRN. + + `qr_code` _conditionally mandatory_ + : `string` QR code associated with the IRN. Required if `irn` is present. + + `irn_number` _conditionally mandatory_ + : `string` E-invoice IRN. Required if IRN is present. + +### Parameters + +`id` _mandatory_ +: `string` Unique id of the bill generated. + +`business_type` _mandatory_ +: `string` The type of business. Possible values: + - `ecommerce` + - `retail` + +`business_category` _mandatory_ +: `string` The category the business falls under. Possible values: + - `events` + - `food_and_beverages` + - `retail_and_consumer_goods` + - `other_services` + +`customer` _conditionally mandatory_ +: `object` Details of the customer. Required if receipt mode is `digital` or `digital_and_print`. + + `contact` _conditionally mandatory_ + : `string` The customer's phone number. Required if receipt mode is `digital` or `digital_and_print` and `email` is not present. + + `name` _optional_ + : `string` The customer's name. + + `email` _conditionally mandatory_ + : `string` The customer's email address. Required if receipt mode is `digital` or `digital_and_print` & `contact` not present. + + `customer_id` _optional_ + : `string` The customer's customer_id. Required if receipt mode is `digital` or `digital_and_print` and neither `contact` nor `email` is present. + + `age` _optional_ + : `integer` Age of the customer. + + `date_of_birth` _optional_ + : `string` Customer's date of birth. + + `profession` _optional_ + : `string` Customer's current job profile name. + + `company_name` _optional_ + : `string` Customer current employer. + + `date_of_birth` _optional_ + : `string` Customer's date of birth. + + `marital_status` _optional_ + : `string` Customer's marital status. Possible values: + - `married` + - `unmarried` + + `spouse_name` _optional_ + : `string` Name of customer's spouse. + + `anniversary_date` _optional_ + : `string` Customer's date of anniversary. + + `gender` _optional_ + : `string` Customer gender. Possible values: + - `male` + - `female` + - `other` + + `gstin` _optional_ + : `string` Customer's GST number. + + `billing_address` _mandatory_ + : `object` Customer's billing address. Required if your `business_type` is `ecommerce`. + + `address_line_1` _optional_ + : `string` Customer billing address line 1. + + `address_line_2` _optional_ + : `string` Customer billing address line 2. + + `landmark` _optional_ + : `string` Customer billing address landmark. + + `city` _optional_ + : `string` Customer billing address city. + + `province` _optional_ + : `string` Customer billing address province. + + `pin_code` _optional_ + : `string` Customer billing address PIN code. + + `country` _optional_ + : `string` Customer billing address country. + + `shipping_address` _mandatory_ + : `object` Customer's billing address. Required if your `business_type` is `ecommerce`. + + `address_line_1` _optional_ + : `string` Customer shipping address line 1. + + `address_line_2` _optional_ + : `string` Customer shipping address line 2. + + `landmark` _optional_ + : `string` Customer shipping address landmark. + + `city` _optional_ + : `string` Customer shipping address city. + + `province` _optional_ + : `string` Customer shipping address province. + + `pin_code` _optional_ + : `string` Customer shipping address PIN code. + + `country` _optional_ + : `string` Customer shipping address country. + +`loyalty` _conditionally mandatory_ +: `object` Customer loyalty details. + + `type` _optional_ + : `string` Customer loyalty type. + + `card_num` _optional_ + : `string` Hashed debit/credit card number provided by the customer. + + `card_holder_name` _optional_ + : `string` Name of the card holder. + + `wallet_amount` _optional_ + : `integer` Wallet amount after used rewards of the customer. + + `amount_saved` _optional_ + : `integer` Amount saved by the customer. + + `points_earned` _optional_ + : `integer` Points earned by the customer after a transaction. + + `points_redeemed` _optional_ + : `integer` Points redeemed by the customer on a transaction. + + `points_available` _optional_ + : `integer` Points available to the customer at the beginning of the transaction. + + `points_balance` _optional_ + : `integer` Points available to the customer at the end of the transaction. + +`store_code` _conditionally mandatory_ +: `string` Associated store code for the receipt. Required if you have a multi-store setup where you have a single integration and have multiple stores under you. + +`receipt_timestamp` _mandatory_ +: `integer` UNIX timestamp of the date and time when the receipt was generated. + +`receipt_number` _mandatory_ +: `string` Unique receipt number generated for the bill. + +`receipt_type` _mandatory_ +: `string` The type of receipt. Possible values: + - `tax_invoice` + - `sales_invoice` + - `sales_return_invoice` + - `proforma_invoice` + - `credit_invoice` + - `purchase_invoice` + - `debit_invoice` + +`receipt_delivery` _mandatory_ +: `string` Indicates the delivery type of the receipt. Possible values: + - `digital` + - `print` + - `digital_and_print` + +`tags` _optional_ +: `string` An array of strings representing relevant tags associated with the invoice. + +`bar_code_number` _optional_ +: `integer` Bar code generated after the transaction. This will be displayed on the digital bill only. + +`qr_code_number` _optional_ +: `integer` QR code generated after the transaction. This will be displayed on the digital bill only. + +`billing_pos_number` _optional_ +: `string` POS number of the machine that generated the bill. This is applicable if `business_type` is `retail`. + +`pos_category` _optional_ +: `string` The type of POS machine. This is applicable if `business_type` is `retail`. Possible values: + - `traditional_pos` + - `kiosk_pos` + +`order_number` _optional_ +: `string` Incremental order number of the generated bill. + +`order_service_type` _optional_ +: `string` Order service type of the generated bill. This is applicable if `business_category` is `food_and_beverages`. Possible values: + - `dine_in` + - `take_away` + +`delivery_status_url` _optional_ +: `string` Order delivery status. This is applicable if `business_type` is `ecommerce`. + +`line_items` _conditionally mandatory_ +: `object` This is an array of objects containing the product data of the bill. Required if `receipt_type` is not `credit_invoice` or `debit_invoice`. + + `name` _mandatory_ + : `string` Name of the product. + + `quantity` _mandatory_ + : `float` Quantity of the product. + + `unit_amount` _optional_ + : `integer` Price of the product. + + `employee_id` _optional_ + : `string` Unique ID of the employee who sold the product. + + `unit` _optional_ + : `string` Type of unit. Possible values: + - `kg` + - `g` + - `mg` + - `lt` + - `ml` + - `pc` + - `cm` + - `m` + - `in` + - `ft` + - `set` + + `description` _optional_ + : `string` Product/Item description. + + `hsn_code` _optional_ + : `string` HSN code of the product. + + `product_code` _optional_ + : `string` Product/Item code. + + `product_uid` _optional_ + : `string` Product/Item UID/SKU Code. + + `image_url` _optional_ + : `string` Image URL of the product. + + `total_amount` _mandatory_ + : `integer` Total amount of the product. + + `brand` _optional_ + : `string` Brand name of the product. + + `style` _optional_ + : `string` Product style. + + `colour` _optional_ + : `string` Colour of the product. + + `size` _optional_ + : `string` Size of the product in `cm`. + + `tags` _optional_ + : `string` An array of strings representing relevant tags associated with the item. + + `sub_items` _conditionally mandatory_ + : `object` An array of objects containing the sub-item details of the item. + + `name` _mandatory_ + : `string` Name of the sub-item. + + `quantity` _mandatory_ + : `integer` Sub-item quantity. + + `unit_amount` _optional_ + : `integer` Price of the sub-item. + + `employee_id` _optional_ + : `string` Unique ID of the employee who sold the product. + + `unit` _optional_ + : `string` Type of unit. Possible values: + - `kg` + - `g` + - `mg` + - `lt` + - `ml` + - `pc` + - `cm` + - `m` + - `in` + - `ft` + - `set` + + `description` _optional_ + : `string` Sub-item description. + + `hsn_code` _optional_ + : `string` HSN code of the product. + + `product_code` _optional_ + : `string` Sub-item code. + + `product_uid` _optional_ + : `string` Sub-item UID/SKU Code. + + `image_url` _optional_ + : `string` Image URL of the sub-item. + + `total_amount` _mandatory_ + : `integer` Total amount of the sub-item. + + `brand` _optional_ + : `string` Brand name of the sub-item. + + `style` _optional_ + : `string` Sub-item style. + + `colour` _optional_ + : `string` Colour of the sub-item. + + `size` _optional_ + : `string` Size of the sub-item in `cm`. + + `tags` _optional_ + : `string` An array of strings representing relevant tags associated with the sub-item. + + `taxes` _optional_ + : `object` This is an array of objects containing the details of the taxes incurred. + + `name` _mandatory_ + : `string` Name of the tax. For example, CGST, SGST and so on. + + `percentage` _optional_ + : `float` Percentage of tax. + + `amount` _mandatory_ + : `integer` Applicable tax calculated on total amount. + + `taxes` _optional_ + : `object` This is an array of objects containing the details of the taxes incurred. + + `name` _mandatory_ + : `string` Name of the tax. For example, CGST, SGST and so on. + + `percentage` _optional_ + : `float` Percentage of tax. + + `amount` _mandatory_ + : `integer` Applicable tax calculated on total amount. + +`receipt_summary` _mandatory_ +: `object` Details of the receipt. + + `total_quantity` _mandatory_ + : `integer` Total product quantity sold in the invoice. + + `sub_total_amount` _optional_ + : `integer` The total amount before taxes, discounts and additional fees are added to the invoice. + + `currency` _mandatory_ + : `string` The currency of the invoice. Refer to this sheet for the list of supported currencies. + + `total_tax_amount` _optional_ + : `integer` Total tax amount in paise. + + `total_tax_percent` _optional_ + : `float` Total tax percentage applied on the receipt. + + `net_payable_amount` _mandatory_ + : `integer` The total amount payable after adding taxes, discounts and additional fees to the invoice. + + `additional_charges` _optional_ + : `object` This is an array of objects containing the details of any additional charges applied on the invoice. If `additional_charges` is present, then `description` and `amount` are required. + + `description` _optional_ + : `string` Description of the additional charge. + + `amount` _optional_ + : `integer` Amount of the additional charge. + + `percent` _optional_ + : `float` Percent calculated on total amount. + + `payment_status` _optional_ + : `string` Status of the payment. Possible values: + - `pending` + - `authorized` + - `failed` + - `declined` + - `refunded` + - `cancelled` + - `processed` + - `settled` + - `voided` + - `success` + - `paid` + - `unpaid` + + `change_amount` _optional_ + : `integer` Change amount to be returned to the customer if the payment was made in cash. + + `roundup_amount` _optional_ + : `integer` Change amount to be returned to the customer if the payment was made in cash. + + `total_discount_percent` _optional_ + : `float` Total percentage of the discount on the sub-total amount without the taxes. + + `total_discount_amount` _optional_ + : `integer` Total value of the discount on the invoice. + + `discounts` _optional_ + : `object` This is an array of objects containing the details of the discount. + + `name` _optional_ + : `string` Name of the discount. + + `amount` _optional_ + : `string` Amount of the applied discount. + + `percent` _optional_ + : `integer` Percentile value of the discounted amount. + + `used_wallet_amount` _optional_ + : `string` Amount used from the customer's wallet for this transaction. + +`taxes` _conditionally mandatory_ +: `object` This is an array of objects containing the details of the taxes applied. Required if `receipt_type` is `tax_inovice`, `purchase_invoice` or `sales_invoice`. + + `name` _mandatory_ + : `string` Name of the tax. For example, CGST, SGST and so on. + + `percentage` _optional_ + : `float` Percentage of tax. + + `amount` _mandatory_ + : `integer` Applicable tax calculated on total amount. + +`payments` _mandatory_ +: `object` Details of the payment. + + `method` _mandatory_ + : `string` The mode of payment. + + `currency` _mandatory_ + : `string` The currency in which the payment was made. + + `amount` _mandatory_ + : `integer` The amount of the payment in paise. For example, if the amount is `1200`. The unit will be `120000`. + + `payment_reference_id` _optional_ + : `string` The Unique id of the payment method. + + `financier_data` _optional_ + : `object` Details of the financier. + + `reference` _optional_ + : `string` Unique id of the financier. + + `name` _optional_ + : `string` Name of the financier. + +`event` _conditionally mandatory_ +: `object` Details of the event booking. Required if `business_category` is `events`. + + `name` _mandatory_ + : `string` Name of the event. + + `start_timestamp` _optional_ + : `integer` The exact time in seconds when the event starts. + + `end_timestamp` _optional_ + : `integer` The exact time in seconds when the event ends. + + `location` _optional_ + : `string` The location/venue of the event. + + `room` _optional_ + : `string` The specific room where the event was held. + + `seats` _optional_ + : `string` The number of seats booked for the event. + +`receipt_url` +: `string` The link to the receipt. + +`created_at` +: `integer` UNIX timestamp of the date when the bill was generated. + +### Errors + +client not authorised to update +* code: 401 +* description: The client credentials are unauthorised to make changes to this bill. +* solution: Use authorised credentials to make changes to the bill. + +The quantity must be an integer +* code: 400 +* description: The quantity of the product was not written in integer format. +* solution: Write the quantity in integer format. + +Operation failed +* code: 400 +* description: There is an internal server error. +* solution: There is a server issue. Raise a support ticket with us to get this resolved. + +Bill not found for given receipt_number +* code: 400 +* description: The bill id is incorrect or deleted. +* solution: Add the correct bill id. diff --git a/llm-content/api/changelog.md b/llm-content/api/changelog.md new file mode 100644 index 00000000..e16ad754 --- /dev/null +++ b/llm-content/api/changelog.md @@ -0,0 +1,43 @@ +--- +title: API Changelog +description: List of changes made to Razorpay APIs. +--- + +# API Changelog + +- **Payments Changelog**: Discover new releases and updates regarding Razorpay Payments products, SDKs and plugins. + + - **RazorpayX Changelog**: Discover new releases and updates regarding RazorpayX products. + +The following table records changes made to Razorpay API since Jan 2024: + +Month-Year | Product | Description +--- +Mar 2026 | Razorpay MCP Server | Added support for the `detect_stack` and `integrate_razorpay_checkout` tools to the MCP server. +--- +Oct 2025 | Razorpay n8n Node | Launched the [Razorpay n8n Community Node](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node.md) for no-code payment automation. Automate payment operations, process transactions, manage refunds and connect Razorpay with 400+ services like Google Sheets, Slack and WhatsApp using the n8n workflow platform. +--- +Sep 2025 | Razorpay MCP Server | Added OAuth 2.0 support to the MCP server for secure user authentication and resource access. +--- +Aug 2025 | Fund Account Validation | You will receive a UTR number in the API response for every successful Fund Account Validation ([Bank Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/composite-account-validation/bank-account.md) and [VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/composite-account-validation/vpa.md)). +--- +Aug 2025 | Razorpay Remote MCP Server | Razorpay Remote MCP server now supports streamable HTTP responses, enabling chunked data transmission for improved performance. +--- +Jun 2025 | Razorpay Remote MCP Server | Launched Razorpay Remote MCP – a fully hosted, self-serve AI-native payments infrastructure layer. +--- +Apr 2025 | Razorpay MCP Server | Introduced Razorpay MCP Server. It provides seamless integration with Razorpay APIs, enabling developers to build advanced payment processing workflows and AI-powered tools. +--- +Apr 2025 | Smart Collect 2.0 | You can now use the upgraded [ Smart Collect 2.0 APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-2.md) for more functions such as creating a Customer Identifier with VPA and Bank Account, adding a VPA to an existing Customer Identifier and fetching payments made using UPI. +--- +Mar 2025 | Payouts | You can now send payouts to your customers' mobile numbers directly using the [Payouts to Phone Composite API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-composite/create/phone-number.md). +--- +Feb 2025 | RazorpayX | Introduced [API for fetching account balance(s)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation/balance-fetch.md). +--- +Jul 2024 | Payouts | Made [idempotency header](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) mandatory for normal and composite Payouts APIs. +--- +May 2024 | Payments | **Currency Subunit Changes** + - When using the amount parameter to accept or refund payments made using zero-decimal currencies (such as the Japanese Yen (JPY)), you do not need to pass the amount in currency subunits. For example, if the payment amount is JPY 295, pass the parameter value as 295. +- The change is applicable to [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md), [Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/entity.md), [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/entity.md), [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/settlements/entity.md), [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/entity.md), [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/entity.md) and [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/entity.md). + +--- +Feb 2024 | Payouts | [Introduced Composite Account Validation API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/composite-account-validation.md) to create contact, fund account and validate the bank account (using penny-drop/penniless) and VPA IDs of your customers, in a single API call. diff --git a/llm-content/api/customers.md b/llm-content/api/customers.md new file mode 100644 index 00000000..a2a9939e --- /dev/null +++ b/llm-content/api/customers.md @@ -0,0 +1,34 @@ +--- +title: API | Create Customers +heading: Customers +description: Create, edit, and fetch Customer details using Razorpay APIs. +--- + +# Customers + +Add or create [Customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md) with basic details such as name, email and contact details. You can then offer various Razorpay solutions to your customers. Edit customer details as needed. You can create and manage customers using APIs or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md). + +Fork the Razorpay Postman Public Workspace and try the Customers APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-d53fbf12-1684-44ab-9c20-47d7b3d1f2ae) + +### Related Guides + +[About Customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md) + +### Endpoints + + - **post** `/v1/customers` - Create a Customer: + Creates or adds a customer with basic details such as name and contact details. + + + - **put** `/v1/customers/:id` - Edit Customer Details: + Edits the customer details such as name, email and contact details. + + + - **get** `/v1/customers` - Fetch All Customers: + Retrieves details of all the customers. + + + - **get** `/v1/customers/:id` - Fetch Customer With ID: + Retrieves details of a customer as per the id. diff --git a/llm-content/api/customers/bank-accounts.md b/llm-content/api/customers/bank-accounts.md new file mode 100644 index 00000000..ea7e892d --- /dev/null +++ b/llm-content/api/customers/bank-accounts.md @@ -0,0 +1,368 @@ +--- +title: Bank Accounts +description: Add, and delete Customer's bank account details using Razorpay APIs. +--- + +# Bank Accounts + +Add or delete customer's bank account with basic details such as name, email and contact details. You can then offer various Razorpay solutions to your customers. Edit customer details as needed. + +## Use Cases + +1. [Add Bank Account of Customer](#1-add-bank-account-of-customer) +2. [Delete Bank Account of Customer.](#2-delete-bank-account-of-customer) + +## 1. Add Bank Account of Customer + +The following endpoint adds the customer's bank accounts. + +customers/:customer_id/bank_account + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers/:customer_id/bank_account \ +-H "Content-Type: application/json" \ +-d '{ + "ifsc_code" : "UTIB0000194", + "account_number" :"916010080000000", + "beneficiary_name" : "Gaurav Kumar", + "beneficiary_address1" : "address 1", + "beneficiary_address2" : "address 2", + "beneficiary_address3" : "address 3", + "beneficiary_address4" : "address 4", + "beneficiary_email" : "gaurav.kumar@example.com", + "beneficiary_mobile" : "1234567890", + "beneficiary_city" :"Bangalore", + "beneficiary_state" : "KA", + "beneficiary_country" : "IN" +}' + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_N5mywh91sXB69O" + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("ifsc_code","UTIB0000194"); +customerRequest.put("account_number","916010080000000"); +customerRequest.put("beneficiary_name","Gaurav Kumar"); +customerRequest.put("beneficiary_address1","address 1"); +customerRequest.put("beneficiary_address2","address 2"); +customerRequest.put("beneficiary_address3","address 3"); +customerRequest.put("beneficiary_address4","address 4"); +customerRequest.put("beneficiary_email","gaurav.kumar@example.com"); +customerRequest.put("beneficiary_mobile","1234567890"); +customerRequest.put("beneficiary_city","Bangalore"); +customerRequest.put("beneficiary_state","KA"); +customerRequest.put("beneficiary_country","IN"); + +BankAccount bankaccount = instance.customers.addBankAccount(customerId, customerRequest) + +```python: Python + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +customerId = "cust_N5mywh91sXB69O" + +client.customer.addBankAccount(customerId, { + "ifsc_code" : "UTIB0000194", + "account_number" :"916010080000000", + "beneficiary_name" : "Gaurav Kumar", + "beneficiary_address1" : "address 1", + "beneficiary_address2" : "address 2", + "beneficiary_address3" : "address 3", + "beneficiary_address4" : "address 4", + "beneficiary_email" : "gaurav.kumar@example.com", + "beneficiary_mobile" : "1234567890", + "beneficiary_city" :"Bangalore", + "beneficiary_state" : "KA", + "beneficiary_country" : "IN" +}) + +```php: PHP + +$api = new Api($key_id, $secret); + +$customerId = "cust_N5mywh91sXB69O" + +$api->customer->fetch($customerId)->addBankAccount([ + "ifsc_code" => "UTIB0000194", + "account_number" => "916010080000000", + "beneficiary_name" => "Gaurav Kumar", + "beneficiary_address1" => "address 1", + "beneficiary_address2" => "address 2", + "beneficiary_address3" => "address 3", + "beneficiary_address4" => "address 4", + "beneficiary_email" => "gaurav.kumar@example.com", + "beneficiary_mobile" => "1234567890", + "beneficiary_city" => "Bangalore", + "beneficiary_state" => "KA", + "beneficiary_country" => "IN", +]); + +```csharp: .NET + +RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + +string customerId = "cust_N5mywh91sXB69O"; + +Dictionary customerRequest = new Dictionary(); +customerRequest.Add("ifsc_code", "UTIB0000194"); +customerRequest.Add("account_number", "916010080000000"); +customerRequest.Add("beneficiary_name", "Gaurav Kumar"); +customerRequest.Add("beneficiary_address1", "address 1"); +customerRequest.Add("beneficiary_address2", "address 2"); +customerRequest.Add("beneficiary_address3", "address 3"); +customerRequest.Add("beneficiary_address4", "address 4"); +customerRequest.Add("beneficiary_email", "gaurav.kumar@example.com"); +customerRequest.Add("beneficiary_mobile", "1234567890"); +customerRequest.Add("beneficiary_city", "Bangalore"); +customerRequest.Add("beneficiary_state", "KA"); +customerRequest.Add("beneficiary_country", "IN"); + +BankAccount refund = client.Customer.Fetch(customerId).AddBankAccount(customerRequest); + +```ruby: Ruby + +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_N5mywh91sXB69O" + +Razorpay::Customer.add_bank_account(customerId,{ + "ifsc_code": "UTIB0000194", + "account_number": "916010080000000", + "beneficiary_name": "Gaurav Kumar", + "beneficiary_address1": "address 1", + "beneficiary_address2": "address 2", + "beneficiary_address3": "address 3", + "beneficiary_address4": "address 4", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "1234567890", + "beneficiary_city": "Bangalore", + "beneficiary_state": "KA", + "beneficiary_country": "IN" +}) + +```javascript: Node.js + +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var customerId = "cust_N5mywh91sXB69O" + +instance.customers.addBankAccount(customerId, { + "ifsc_code" : "UTIB0000194", + "account_number" :"916010080000000", + "beneficiary_name" : "Gaurav Kumar", + "beneficiary_address1" : "address 1", + "beneficiary_address2" : "address 2", + "beneficiary_address3" : "address 3", + "beneficiary_address4" : "address 4", + "beneficiary_email" : "gaurav.kumar@example.com", + "beneficiary_mobile" : "1234567890", + "beneficiary_city" :"Bangalore", + "beneficiary_state" : "KA", + "beneficiary_country" : "IN" +}); + +```go: Go + +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +customerId := "cust_N5mywh91sXB69O" + +body, err := client.Customer.AddBankAccount(customerId, data, nil) +``` + +```json: Response +{ + "id": "ba_LSZht1Cm7xFTwF", + "entity": "bank_account", + "ifsc": "ICIC0001207", + "bank_name": "ICICI Bank", + "name": "Gaurav Kumar", + "notes": [], + "account_number": "XXXXXXXXXXXXXXX0434" +} +``` + +### Request Parameters + +`account_number` +: `integer` Customer's bank account number. For example, `916010080000000`. + +`beneficiary_name` +:`string` The name of the beneficiary associated with the bank account. + +`beneficiary_address1` +: `string` The virtual payment address. + +`beneficiary_email` +: `string` Email address of the beneficiary. For example, `gaurav.kumar@example.com`. + +`beneficiary_mobile` +: `integer` Mobile number of the beneficiary. + +`beneficiary_city` +: `string` The name of the city of the beneficiary. + +`beneficiary_state` +: `string` The state of the beneficiary. + +`beneficiary_country` +: `string` The country of the beneficiary. + +`beneficiary_pin` +: `integer` The pin code of the beneficiary's address. + +`ifsc_code` +: `string` The IFSC code of the bank branch associated with the account. + +### Response Parameters + +`bank_accounts` +: `array` An array containing bank account details. + + `id` + : `string` Unique identifier of the bank account. + + `entity` + : `string` The type of entity, which in this case is `bank_account`. + + `ifsc` + : `string` The IFSC code of the bank branch associated with the account. + + `bank_name` + : `string` The name of the bank. + + `name` + : `string` The name associated with the bank account. + + `notes` + : `object` Set of key-value pairs that can be used to store additional information about the payment. + + `account_number` + : `integer` Customer's bank account number. For example, `916010080000000`. + +## 2. Delete Bank Account of Customer + +You can also delete customer's bank accounts. Use the following endpoint to delete. + +customers/:customer_id/bank_account/:bank_id + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/:customer_id/bank_account/:bank_id + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_N5mywh91sXB69O" + +String bankAccountId = "ba_N6aM8uo64IzxHu" + +Customer customer = instance.customers.deleteBankAccount(customerId, bankaccountId) + +```python: Python + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +customerId = "cust_N5mywh91sXB69O" + +bankAccountId = "ba_N6aM8uo64IzxHu" + +client.customer.deleteBankAccount(customerId, bankaccountId) + +```php: PHP +$api = new Api($key_id, $secret); + +$customerId = "cust_N5mywh91sXB69O" + +$bankAccountId = "ba_N6aM8uo64IzxHu" + +$api->customer->fetch($customerId)->deleteBankAccount($bankAccountId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + +string customerId = "cust_N5mywh91sXB69O" + +String bankAccountId = "ba_N6aM8uo64IzxHu" + +Customer refund = client.Customer.Fetch(customerId).DeleteBankAccount(bankAccountId); + +```ruby: Ruby + +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_N5mywh91sXB69O" + +bankAccountId = "ba_N6aM8uo64IzxHu" + +Razorpay::Customer.delete_bank_account(customerId, bankAccountId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var customerId = "cust_N5mywh91sXB69O" + +var bankAccountId = "ba_N6aM8uo64IzxHu" + +instance.customers.deleteBankAccount(customerId, bankAccountId); + +```go: Go + +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +bankAccountId := "ba_N6aM8uo64IzxHu" + +customerId := "cust_N5mywh91sXB69O" + +body, err := client.Customer.DeleteBankAccount(customerId, bankAccountId, nil, nil) +``` + +```json: Response +{ + "id": "ba_Evg09Ll05SIPSD", + "ifsc": "ICIC0001207", + "bank_name": "ICICI Bank", + "name": "Test R4zorpay", + "account_number": "XXXXXXXXXXXXXXX0434", + "status": "deleted" +} +``` + +### Path Parameters + +`customer_id` _mandatory_ +: `string` Customer id of the customer whose bank account is to be deleted. + +`bank_id` _mandatory_ +: `string` The bank_id that needs to be deleted. + +### Response Parameters + +`id` +: `string` Bank_id that is deleted. + +`ifsc` +: `string` IFSC code of bank. + +`bank_name` +: `string` Bank name. + +`name` +: `string` Account holder name. + +`account_number` +: `string` Bank account number. + +`status` +: `string` Status of the bank in bank_account entity. diff --git a/llm-content/api/customers/create.md b/llm-content/api/customers/create.md new file mode 100644 index 00000000..7acb951e --- /dev/null +++ b/llm-content/api/customers/create.md @@ -0,0 +1,216 @@ +--- +title: Create a Customer +description: Create a Customer using Razorpay Customers API. +--- + +# Create a Customer + +## Create a Customer + +Use this endpoint to create or add a customer with basic details such as name and contact details. + +### Request + +```cURL: Curl + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "contact": "9123456780", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name","Gaurav Kumar"); +customerRequest.put("contact","9123456780"); +customerRequest.put("email","gaurav.kumar@example.com"); +customerRequest.put("fail_existing","0"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} + +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->create(array('name' => 'Gaurav Kumar', 'email' => 'gaurav.kumar@example.com','contact'=>'9123456780','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", "Gaurav Kumar"); +options.Add("contact", "9123456780"); +options.Add("email", "gaurav.kumar@example.com"); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({ + name: "Gaurav Kumar", + contact: 9123456780, + email: "gaurav.kumar@example.com", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +``` + +### Response + +```json: Success +{ + "id" : "cust_1Aa00000000004", + "entity": "customer", + "name" : "", + "email" : "", + "contact" : "", + "gstin": null, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at ": 1234567890 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } +} +``` + +### Parameters + +`name` _optional_ +: `string` Customer's name. Alphanumeric value with period (.), apostrophe ('), forward slash (/), at (@) and parentheses are allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact ` _optional_ +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email ` _optional_ +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`fail_existing` _optional_ +: `string` Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + +`gstin` _optional_ +: `string` Customer's GST number, if available. For example, `29XAbbA4369J1PA`. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`entity` _optional_ +: `string` Indicates the type of entity. + +`name` +: `string` Customer's name. Alphanumeric, with period (.), apostrophe ('), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. + +`contact` +: `string` The customer's phone number. A maximum length of 15 characters including country code. + +`email` +: `string` The customer's email address. A maximum length of 64 characters. + +`gstin` +: `string` GST number linked to the customer. For example, `29XAbbA4369J1PA`. + +`notes` +: `json object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + +* solution: The API keys must be active and entered correctly with no whitespace before or after the keys. + + +Contact number should be at least 8 digits, including country code. +* code: 400 +* description: The contact number is less than 8 digits. +* solution: Enter contact number that meets the validation criteria. It should have at least 8 digits, including the country code. For example, "+919876543210". diff --git a/llm-content/api/customers/customer-fund-account.md b/llm-content/api/customers/customer-fund-account.md new file mode 100644 index 00000000..7cf2b824 --- /dev/null +++ b/llm-content/api/customers/customer-fund-account.md @@ -0,0 +1,281 @@ +--- +title: Customer Fund Account APIs +description: Create and fetch a Fund account for a Customer. +--- + +# Customer Fund Account APIs + +Using Razorpay APIs, you can create a fund account for a customer. Know more about [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md). + +## Create a Fund Account + +You can use the below endpoint to create a fund account for a customer. + +/fund_accounts + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/fund_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "customer_id":"cust_Aa000000000001", + "account_type":"bank_account", + "bank_account":{ + "name":"Gaurav Kumar", + "account_number":"11214311215411", + "ifsc":"HDFC0000053" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject fundAccountRequest = new JSONObject(); +fundAccountRequest.put("customer_id", "cust_JDdNazagOgg9Ig"); +fundAccountRequest.put("account_type", "bank_account"); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("ifsc","HDFC0000053"); +fundAccountRequest.put("bank_account", bankAccount); + +FundAccount fundaccount = razorpay.fundAccount.create(fundAccountRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.fund_account.create({ + "customer_id":"cust_Aa000000000001", + "account_type":"bank_account", + "bank_account":{ + "name":"Gaurav Kumar", + "account_number":"11214311215411", + "ifsc":"HDFC0000053" + } +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->fundAccount->create(array('customer_id'=>$customerId,'account_type'=>'bank_account','bank_account'=>array('name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'ifsc'=>'HDFC0000053'))) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer_id":"cust_Aa000000000001", + "account_type":"bank_account", + "bank_account":{ + "name":"Gaurav Kumar", + "account_number":"11214311215411", + "ifsc":"HDFC0000053" + } +} + +Razorpay::FundAccount.create(data) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.fundAccount.create({ + "customer_id":"cust_Aa000000000001", + "account_type":"bank_account", + "bank_account":{ + "name":"Gaurav Kumar", + "account_number":"11214311215411", + "ifsc":"HDFC0000053" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer_id":"cust_Aa000000000001", + "account_type":"bank_account", + "bank_account":map[string]interface{}{ + "name":"Gaurav Kumar", + "account_number":"11214311215411", + "ifsc":"HDFC0000053", + }, +} +body, err := client.FundAccount.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary fundAccountRequest = new Dictionary(); +fundAccountRequest.Add("customer_id", "cust_Z6t7VFTb9xHeOs"); +fundAccountRequest.Add("account_type", "bank_account"); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("ifsc","HDFC0000053"); +fundAccountRequest.Add("bank_account", bankAccount); + +FundAccount fundaccount = client.FundAccount.Create(fundAccountRequest); + +```json: Response +{ + "id": "fa_JiT6rz7uEpG3B4", + "entity": "fund_account", + "customer_id": "cust_JfrT7i6et3JjFf", + "account_type": "bank_account", + "bank_account": { + "ifsc": "HDFC0000053", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "notes": [], + "account_number": "11214311215411" + }, + "batch_id": null, + "active": true, + "created_at": 1655448526 +} +``` + +### Request Parameters + +`customer_id` _mandatory_ +: `string` This is the unique ID linked to a customer. For example, `cust_Aa000000000001`. + +`account_type` _mandatory_ +: `string` The type of account to be linked to the customer ID. In this case it will be `bank_account`. + +`bank_account` +: `object` Customer bank account details. + + `name` _mandatory_ + : `string` Name of account holder as per bank records. For example, `Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` Customer's bank IFSC. For example, `HDFC0000053`. + + `account_number` _mandatory_ + : `string` Beneficiary account number. For example, `11214311215411`. + +### Response Parameters + +`id` +: `string` The unique ID linked to the fund account. For example, `fa_Aa000000000001`. + +`entity` +: `string` The name of the Razorpay entity. In this case it will be `fund_account`. + +`customer_id` +: `string` This is the unique ID linked to a customer. For example, `cust_Aa000000000001`. + +`account_type` +: `string` The type of account to be linked to the customer ID. In this case it will be `bank_account`. + +`bank_account` +: `object` Customer bank account details. + + `name` + : `string` Name of account holder as per bank records. For example, `Gaurav Kumar`. + + `account_number` + : `string` Beneficiary account number. For example, `11214311215411`. + + `ifsc` + : `string` Customer's bank IFSC. For example, `HDFC0000053`. + + `bank_name` + : `string` Customer's bank name. For example `HDFC`. + +`active` +: `string` Status of the fund account. Possible values: + - `true`: Fund account is active. + - `false`: Fund account is inactive. + +`created_at` +: `integer` The time at which the account was created at Razorpay. The output for this parameter is date and time in the Unix format, for example, `1543650891`. + +## Fetch all Fund Accounts + +You can use the below endpoint to fetch all fund accounts linked to your account. + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/fund_accounts?customer_id=cust_Aa000000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_Aa000000000001"; + +FundAccount fundaccount = razorpay.fundAccount.fetch(customerId); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.fund_account.fetch(customerId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->fundAccount->all(array('customer_id'=>$customerIds)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer_id": "cust_Aa000000000001" +} +Razorpay::FundAccount.all(para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.fundAccount.fetch(customerId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "customer_id":"cust_Aa000000000001", +} +body, err := client.FundAccount.All(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary fundAccountRequest = new Dictionary(); +fundAccountRequest.Add("customer_id","cust_Z6t7VFTb9xHeOs"); + +List fundaccount = client.FundAccount.All(fundAccountRequest); + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "fa_JiT6rz7uEpG3B4", + "entity": "fund_account", + "customer_id": "cust_Aa000000000001", + "account_type": "bank_account", + "bank_account": { + "ifsc": "HDFC0000053", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "notes": [], + "account_number": "11214311215411" + }, + "batch_id": null, + "active": true, + "created_at": 1655448526 + } + ] +} +``` +### Query Parameter + +`customer_id` _mandatory_ +: `string` This is the unique ID linked to a customer. For example, `cust_Aa000000000001`. diff --git a/llm-content/api/customers/edit.md b/llm-content/api/customers/edit.md new file mode 100644 index 00000000..1e4b0886 --- /dev/null +++ b/llm-content/api/customers/edit.md @@ -0,0 +1,157 @@ +--- +title: Edit Customer Details +description: Edit Customer Details using Razorpay Customers API. +--- + +# Edit Customer Details + +## Edit Customer Details + +Use this endpoint to edit the customer details such as name, email and contact details. When editing a customer's details, ensure that the combination of the values in the `email` and `contact` attributes is unique for every customer. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PUT https://api.razorpay.com/v1/customers/cust_1Aa00000000003 \ +-H "Content-Type: application/json" \ +-d '{ + "name": "", + "email": "", + "contact": "" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000003"; + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name",""); +customerRequest.put("contact",""); +customerRequest.put("email",""); + +Customer customer = razorpay.customers.edit(customerId,customerRequest); + +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.edit(customerId,{ + "name": "", + "email": "", + "contact": +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +customerId := "cust_1Aa00000000003" + +data = map[string]interface{}{ + "name": "", + "email": "", + "contact": , +} +body, err := client.Customer.Edit(customerId, data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->edit(array('name' => '', 'email' => '', 'contact': '', 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf'))); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000003" + +Razorpay::Customer.edit(customerId,{ + "name": "", + "email": "", + "contact": , +}) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.edit(customerId,{ + name: "", + email: "", + contact: +}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000003"; + +Dictionary customerRequest = new Dictionary(); +customerRequest.Add("name", ""); +customerRequest.Add("contact", ""); +customerRequest.Add("email", ""); + +Customer card = client.Customer.Fetch(customerId).Edit(customerRequest); +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to the customer. + +### Parameters + +`name` _optional_ +: `string` Customer's name. Alphanumeric, with period (.), apostrophe ('), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact` _optional_ +: `string` The customer's phone number. A maximum length of 15 characters. For example, `+919876543210`. + +`email` _optional_ +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +### Parameters + +`id` +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`entity` _optional_ +: `string` Indicates the type of entity. + +`name` +: `string` Customer's name. Alphanumeric, with period (.), apostrophe (') and parentheses allowed. The name must be between 3-50 characters in length. + +`contact` +: `string` The customer's phone number. A maximum length of 15 characters including country code. + +`email` +: `string` The customer's email address. A maximum length of 64 characters. + +`gstin` +: `string` GST number linked to the customer. For example, `29XAbbA4369J1PA`. + +`notes` +: `string` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + +* solution: The API keys must be active and entered correctly with no whitespace before or after the keys. + +Contact number should be at least 8 digits, including country code. +* code: 400 +* description: The contact number is less than 8 digits. +* solution: Enter a contact number that meets the validation criteria. It should have at least 8 digits, including the country code. + +id is not a valid id. +* code: 400 +* description: The `customer_id` passed is invalid. +* solution: Use a valid `customer_id`. diff --git a/llm-content/api/customers/entity.md b/llm-content/api/customers/entity.md new file mode 100644 index 00000000..39063804 --- /dev/null +++ b/llm-content/api/customers/entity.md @@ -0,0 +1,46 @@ +--- +title: Customers Entity +description: Entity parameters and sample code for Customers API. +--- + +# Customers Entity + +The Customers entity has the following parameters: + +### Response + +```json: Entity +{ + "id": "cust_JbRkXMROZUMCVq", + "entity": "customer", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "notes": [], + "created_at": 1653915355 +} +``` + +### Parameters + +`id` +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`name` +: `string` Customer's name. Alphanumeric, with period (.), apostrophe ('), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact` +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email` +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`gstin` +: `string` GST number linked to the customer. For example, `29XAbbA4369J1PA`. + +`notes` +: `json object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. diff --git a/llm-content/api/customers/fetch-all.md b/llm-content/api/customers/fetch-all.md new file mode 100644 index 00000000..1c403bee --- /dev/null +++ b/llm-content/api/customers/fetch-all.md @@ -0,0 +1,153 @@ +--- +title: Fetch All Customers +description: Fetch all Customers using Razorpay Customers API. +--- + +# Fetch All Customers + +## Fetch All Customers + +Use this endpoint to retrieve the details of all the customers. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers?count=2&skip=1 + +```Java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List customer = razorpay.customers.fetchAll(params); + +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.all(options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +optional := map[string]interface{}{ + "count":1, + } + +body, err := client.Customer.All(optional, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->all($options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +options = {"count": 2} + +Razorpay::Customer.all(options) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.all(options) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("count","1"); + +List card = client.Customer.All(paramRequest); + +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "cust_LQPdeJqQeKQrJM", + "entity": "customer", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "gstin": null, + "notes": [], + "created_at": 1678580352 + }, + { + "id": "cust_LQPd9lomgwDE5F", + "entity": "customer", + "name": "Saurav Kumar", + "email": "saurav.kumar@example.com", + "contact": "+919876543210", + "gstin": null, + "notes": [], + "created_at": 1678580324 + } + ] +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`count` _optional_ +: `integer` The number of customer records to be retrieved from the system. The default value is 10. The maximum value is 100. This can be used for pagination in combination with `skip`. + +`skip` _optional_ +: `integer` The number of customer records that must be skipped. The default value is 0. This can be used for pagination in combination with `count`. + +### Parameters + +`entity` _optional_ +: `string` Indicates the type of entity. + +`id` +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`name` +: `string` Customer's name. Alphanumeric, with period (.), apostrophe ('), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact` +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email` +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`gstin` +: `string` GST number linked to the customer. For example, `29XAbbA4369J1PA`. + +`notes` +: `string` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + +* solution: The API keys must be active and entered correctly with no whitespace before or after the keys. diff --git a/llm-content/api/customers/fetch-with-id.md b/llm-content/api/customers/fetch-with-id.md new file mode 100644 index 00000000..4bcf6ace --- /dev/null +++ b/llm-content/api/customers/fetch-with-id.md @@ -0,0 +1,142 @@ +--- +title: Fetch Customer With ID +description: Fetch Customer With id using Razorpay Customers API. +--- + +# Fetch Customer With ID + +## Fetch Customer With ID + +Use this endpoint to retrieve details of a customer with id. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000001 \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000001"; + +Customer customer = razorpay.customers.fetch(customerId); + +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.fetch(customerId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +customerId := "cust_1Aa00000000001" + +body, err := client.Customer.Fetch(customerId, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetch(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000001" + +Razorpay::Customer.fetch(customerId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +Customer customer = client.Customer.Fetch("cust_M462yViJrhNrQc"); +``` + +### Response + +```json: Success +{ + "id": "cust_1Aa00000000001", + "entity": "customer", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1655298731 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "LQPd9lomgwDE5Fs is not a valid id", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to the customer. + +### Parameters + +`id` +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`entity` _optional_ +: `string` Indicates the type of entity. + +`name` +: `string` Customer's name. Alphanumeric, with period (.), apostrophe ('), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact` +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email` +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`gstin` +: `string` GST number linked to the customer. For example, `29XAbbA4369J1PA`. + +`notes` +: `string` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + +* solution: The API keys must be active and entered correctly with no whitespace before or after the keys. + +id is not a valid id. +* code: 400 +* description: The `customer_id` passed is invalid. +* solution: Use a valid `customer_id`. + +The id provided does not exist. +* code: 400 +* description: The `customer_id` does not exist or does not belong to the requestor. +* solution: Ensure that you use a valid `customer_id` that belongs to the requestor. diff --git a/llm-content/api/disputes.md b/llm-content/api/disputes.md new file mode 100644 index 00000000..ea50c48a --- /dev/null +++ b/llm-content/api/disputes.md @@ -0,0 +1,41 @@ +--- +title: Disputes +description: List of Dispute APIs available to perform various actions. +--- + +# Disputes + +A [dispute](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md) arises when your customer or the issuing bank questions the validity of a payment. You can manage disputes using APIs or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md#dashboard-actions) to ensure a seamless dispute management experience. + + + + Fork the Razorpay Postman Public Workspace and try the Disputes APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-0803d1d0-dbdf-4312-bd7b-b4817cea2840) + + +### Related Guides + +[About Disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/disputes.md) + +### Endpoints + +- **get** `/v1/disputes` - Fetch All Disputes: + Retrieves information about all disputes. + +- **get** `/v1/disputes/:id` - Fetch a Dispute With ID: + Retrieves details for a specific dispute using the unique identifier linked to the dispute. + +- **get** `/v1/disputes/:id?expand[]=payment` - Fetch a Dispute With ID (Example 1): + Retrieves details for a specific dispute with expanded payment details. + +- **get** `/v1/disputes/:id?expand[]=transaction.settlement` - Fetch a Dispute With ID (Example 2): + Retrieves details for a specific dispute with expanded `transaction.settlement` details. + +- **post** `/v1/disputes/:id/accept` - Accept a Dispute: + Accepts a dispute against the payment. + +- **patch** `/v1/disputes/:id/contest` - Contest a Dispute: + Contests a dispute with explanations and supporting documents to submit evidences. diff --git a/llm-content/api/disputes/accept.md b/llm-content/api/disputes/accept.md new file mode 100644 index 00000000..96bb4f91 --- /dev/null +++ b/llm-content/api/disputes/accept.md @@ -0,0 +1,177 @@ +--- +title: Accept a Dispute +description: Accept a Dispute using Razorpay Disputes API. +--- + +# Accept a Dispute + +## Accept a Dispute + +Use this endpoint to accept a dispute charge, indicating that you do not wish to contest the dispute, acknowledging it as `lost`. + +- The dispute status will change from `open` to `lost`. +- Accepting a dispute is **irreversible**. + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the dispute. + +### Parameters + +`id` +: `string` The unique identifier of the dispute generated by Razorpay. For example, `disp_AHfqOvkldwsbqt`. + +`entity` +: `string` Indicates the type of entity. In this case, it is `dispute`. + +`payment_id` +: `string` The unique identifier of the payment against which the dispute was created. For example, `pay_EsyWjHrfzb59eR`. + +`amount` +: `integer` Amount, in currency subunits, for which the dispute was created. + +`currency` +: `string` 3-letter ISO currency code associated with the amount. + +`amount_deducted` +: `integer` The amount, in currency subunits, deducted from your Razorpay current balance when the dispute is `lost`. This amount will be `0` unless the status of dispute is updated to `lost`. Know about the different [states of disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md#dispute-states). + +`reason_code` +: `string` Code associated with the reason for the dispute. + +`reason_description` +: `string` A brief description of the reason for dispute. + +`respond_by` +: `integer` Unix timestamp by which a response should be sent to the customer. + +`status` +: `string` The status of the dispute. Possible statuses are: + - `open`: Indicates that the dispute has been created. + - `under_review`: Indicates that the issuing bank is reviewing the dispute. + - `won`: Indicates that the bank has accepted the remedial documents, and you have won the chargeback. + - `lost`: Indicates that the bank did not accept the remedial documents, and you have lost the chargeback. + - `closed`: Indicates that the fraudulent transaction was closed after you provided either the transaction details or made a refund to the customer. + +`phase` +: `string` Phase associated with the dispute. Possible phases are: + - `fraud`: A dispute raised by the bank when it suspects a transaction to be fraudulent based on the risk analysis. + - `retrieval`: A request initiated by the customer with their issuer bank for additional information about a transaction. + - `chargeback`: A refund claim initiated by the customers with their issuer banks. In such cases, the bank starts an official inquiry. + - `pre_arbitration`: A chargeback that you have won is challenged by the customer for the second time. + - `arbitration`: A chargeback that you have won is challenged for a third time by the customer and the card networks directly getting involved. + +`created_at` +: `integer` Unix timestamp when the dispute was created. + +`evidence` +: `object` Provides details of the evidence submitted/saved for contesting a dispute. Use the [Documents API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/documents.md) to securely share documents with Razorpay. + + `amount` + : `integer` The contested amount in currency subunits, for which evidence is provided. The value can vary from `0` to the dispute amount. The default value is the dispute amount. + + `summary` + : `string` The explanation provided by you for contesting the dispute. It can have a maximum length of 1000 characters. + + `shipping_proof` + : `list` List of document ids which serves as proof that the product was shipped to the customer at their provided address. It should show their complete shipping address, if possible. + + `billing_proof` + : `list` List of document ids which serves as proof of order confirmation, such as a receipt. + + `cancellation_proof` + : `list` List of document ids that serves as proof that this product/service was cancelled. + + `customer_communication` + : `list` List of document ids listing any written/email communication from the customer confirming that the customer received the product/service or is satisfied with the product/service. + + `proof_of_service` + : `list` List of document ids showing proof of service provided to the customer. + + `explanation_letter` + : `list` (List of document ids) Any letter(s) from you specifying information pertinent to the dispute/payment that needs to be considered for processing the dispute. + + `refund_confirmation` + : `list` List of document ids showing proof that the refund had been provided to the customer. + + `access_activity_log` + : `list` List of document ids of any server or activity logs which prove that the customer accessed or downloaded the purchased digital product. + + `refund_cancellation_policy` + : `list` List of document ids listing your refund and/or cancellation policy, as shown to the customer. + + `term_and_conditions` + : `list` List of document ids listing your sales terms and conditions, as shown to the customer. + + `others` + : `list` Specifies the evidence documents to be uploaded as a part of contesting a dispute. It is a list of tuples consisting of the following: + + `type` + : `string` Describes the custom type of evidence document(s) provided. + + `document_ids` + : `list` List of document ids corresponding to the customer evidence type. + + ```json: Example + [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH7", + "doc_EFtmUsbwpXwBH6" + ] + } + ] + ``` + + `submitted_at` + : `integer` Unix timestamp when the dispute was last submitted by you (for review) to Razorpay. The default value is `null`. + +### Errors + +The id provided does not exist. +* code: 400 +* description: - A wrong prefix is used. +- The dispute id does not exist or does not belong to the requestor. + +* solution: - The dispute id must start with `disp_`. +- Use a valid dispute id that belongs to the requestor. + + +_id is not a valid id. +* code: 400 +* description: - The id is not 14 characters long. +- The id is not alphanumeric. + +* solution: Use a valid dispute id. + +invalid_proof_type is/are not required and should not be sent. +* code: 400 +* description: Incorrect parameters are passed in the request body. +* solution: No parameter is required in the request body. + +Action not allowed as deadline to respond has elapsed. +* code: 400 +* description: The deadline to respond for a dispute has elapsed. +* solution: You can only respond to a dispute within the deadline. + +Action not allowed when dispute is in lost status. +* code: 400 +* description: This error occurs when you try to perform an action on a dispute with lost status. +* solution: You cannot perform any action on a dispute with lost status. + +Action not allowed when dispute is in won status. +* code: 400 +* description: This error occurs when you try to perform an action on a dispute with won status. +* solution: You cannot perform any action on a dispute with won status. + +Action not allowed when dispute is in closed status. +* code: 400 +* description: This error occurs when you try to perform an action on a closed dispute. +* solution: You cannot perform any action on a closed dispute. + +Action not allowed when dispute is in under_review status. +* code: 400 +* description: This error occurs when you try to perform an action on a dispute under review. +* solution: You cannot perform any action on a dispute under review. diff --git a/llm-content/api/disputes/contest.md b/llm-content/api/disputes/contest.md new file mode 100644 index 00000000..70a1296d --- /dev/null +++ b/llm-content/api/disputes/contest.md @@ -0,0 +1,368 @@ +--- +title: Contest a Dispute +description: Contest a Dispute using Razorpay Disputes API. +--- + +# Contest a Dispute + +## Contest a Dispute + +Use this endpoint to contest a dispute, indicating that you would like to challenge the dispute raised against a payment. + +In addition to explicitly contesting a dispute, the contest process can also be triggered by: +- Attaching an evidence document using [Documents API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/documents.md) with having a purpose set to `dispute_evidence`. +- Providing the evidence in textual format. +- Specifying the contest amount (partial or full). The default choice is contesting the full amount if it is not specifically mentioned. + +- Ensure you pass the `action` parameter as `submit` to confirm the contest of the dispute. Dispute evidence draft does not get auto-submitted. +- Ensure you provide a minimum of one document for contesting a dispute. Add as many relevant documents as possible to maximise the chances of dispute resolution in your favor. + +### Response + +```json: Draft +{ + "id": "disp_AHfqOvkldwsbqt", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "", + "amount_deducted": 0, + "reason_code": "chargeback", + "respond_by": 1590604200, + "status": "open", + "phase": "chargeback", + "created_at": 1590059211, + "evidence": { + "amount": 5000, + "summary": "goods delivered", + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "submitted_at": null + } +} + +```json: Submit +{ + "id": "disp_AHfqOvkldwsbqt", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "chargeback", + "respond_by": 1590604200, + "status": "under_review", + "phase": "chargeback", + "created_at": 1590059211, + "evidence": { + "amount": 5000, + "summary": "goods delivered", + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": [ + "doc_EFtmUsbwpXwBG9", + "doc_EFtmUsbwpXwBG8" + ], + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "submitted_at": 1590603200 + } +} +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the dispute. + +### Parameters + +`amount` _optional_ +: `integer` The amount being contested. If the contest amount is not mentioned, we will assume it to be a full dispute contest. + +`summary` +: `string` The explanation provided by you for contesting the dispute. It can have a maximum length of 1000 characters. + +`shipping_proof` +: `list` List of document ids which serves as proof that the product was shipped to the customer at their provided address. It should show their complete shipping address, if possible. + +`billing_proof` +: `list` List of document ids which serves as proof of order confirmation, such as a receipt. + +`cancellation_proof` +: `list` List of document ids that serves as proof that this product/service was cancelled. + +`customer_communication` +: `list` List of document ids listing any written/email communication from the customer confirming that the customer received the product/service or is satisfied with the product/service. + +`proof_of_service` +: `list` List of document ids showing proof of service provided to the customer. + +`explanation_letter` +: `list` (List of document ids) Any letter(s) from you specifying information pertinent to the dispute/payment that needs to be considered for processing the dispute. + +`refund_confirmation` +: `list` List of document ids showing proof that the refund was provided to the customer. + +`access_activity_log` +: `list` List of document ids of any server or activity logs which prove that the customer accessed or downloaded the purchased digital product. + +`refund_cancellation_policy` +: `list` List of document ids listing your refund and/or cancellation policy, as shown to the customer. + +`term_and_conditions` +: `list` List of document ids listing your sales terms and conditions, as shown to the customer. + + `others` + : `list` Specifies the evidence documents to be uploaded as a part of contesting a dispute. It is a list of tuples consisting of the following: + + `type` + : `string` Describes the custom type of evidence document(s) provided. + + `document_ids` + : `list` List of document ids corresponding to the customer evidence type. + + ```json: Example + [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH7", + "doc_EFtmUsbwpXwBH6" + ] + } + ] + ``` + +`action` _optional_ +: `string` The action to be taken for this contest. Possible values: + - `draft`: Allows you to contest the dispute by updating the dispute entity. This action does not submit the dispute yet. The absence of the key action or a corresponding value would default the action to `draft`. + - `submit`: Allows you to contest the dispute by updating the dispute entity and submitting the same to Razorpay. You need to provide a minimum of one document id (across any of the evidence object attributes) for a successful submission: + - Submitting for review would change the status of your dispute from `open` to `under_review`. + - It triggers the webhook event `payment.dispute.under_review`. + + Add as many relevant documents as possible to maximise the chances of dispute resolution in your favour. + +### Parameters + +`id` +: `string` The unique identifier of the dispute generated by Razorpay. For example, `disp_AHfqOvkldwsbqt`. + +`entity` +: `string` Indicates the type of entity. In this case, it is `dispute`. + +`payment_id` +: `string` The unique identifier of the payment against which the dispute was created. For example, `pay_EsyWjHrfzb59eR`. + +`amount` +: `integer` Amount, in currency subunits, for which the dispute was created. + +`currency` +: `string` 3-letter ISO currency code associated with the amount. + +`amount_deducted` +: `integer` The amount, in currency subunits, deducted from your Razorpay current balance when the dispute is `lost`. This amount will be `0` unless the status of dispute is updated to `lost`. Know about the different [ states of disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md#dispute-states). + +`reason_code` +: `string` Code associated with the reason for the dispute. + +`reason_description` +: `string` A brief description of the reason for dispute. + +`respond_by` +: `integer` Unix timestamp by which a response should be sent to the customer. + +`status` +: `string` The status of the dispute. Possible statuses are: + - `open`: Indicates that the dispute has been created. + - `under_review`: Indicates that the issuing bank is reviewing the dispute. + - `won`: Indicates that the bank has accepted the remedial documents, and you have won the chargeback. + - `lost`: Indicates that the bank did not accept the remedial documents, and you have lost the chargeback. + - `closed`: Indicates that the fraudulent transaction was closed after you provided either the transaction details or made a refund to the customer. + +`phase` +: `string` Phase associated with the dispute. Possible phases are: + - `fraud`: A dispute raised by the bank when it suspects a transaction to be fraudulent based on the risk analysis. + - `retrieval`: A request initiated by the customer with their issuer bank for additional information about a transaction. + - `chargeback`: A refund claim initiated by the customers with their issuer banks. In such cases, the bank starts an official inquiry. + - `pre_arbitration`: A chargeback that you have won is challenged by the customer for the second time. + - `arbitration`: A chargeback that you have won is challenged for a third time by the customer and the card networks directly getting involved. + +`created_at` +: `integer` Unix timestamp when the dispute was created. + +`evidence` +: `object` Provides details of the evidence submitted/saved for contesting a dispute. Use the [Documents API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/documents.md) to securely share documents with Razorpay. + + `amount` + : `integer` The contested amount in currency subunits, for which evidence is provided. The value can vary from `0` to the dispute amount. The default value is the dispute amount. + + `summary` + : `string` The explanation provided by you for contesting the dispute. It can have a maximum length of 1000 characters. + + `shipping_proof` + : `list` List of document ids which serves as proof that the product was shipped to the customer at their provided address. It should show their complete shipping address, if possible. + + `billing_proof` + : `list` List of document ids which serves as proof of order confirmation, such as a receipt. + + `cancellation_proof` + : `list` List of document ids that serves as proof that this product/service was cancelled. + + `customer_communication` + : `list` List of document ids listing any written/email communication from the customer confirming that the customer received the product/service or is satisfied with the product/service. + + `proof_of_service` + : `list` List of document ids showing proof of service provided to the customer. + + `explanation_letter` + : `list` (List of document ids) Any letter(s) from you specifying information pertinent to the dispute/payment that needs to be considered for processing the dispute. + + `refund_confirmation` + : `list` List of document ids showing proof that the refund had been provided to the customer. + + `access_activity_log` + : `list` List of document ids of any server or activity logs which prove that the customer accessed or downloaded the purchased digital product. + + `refund_cancellation_policy` + : `list` List of document ids listing your refund and/or cancellation policy, as shown to the customer. + + `term_and_conditions` + : `list` List of document ids listing your sales terms and conditions, as shown to the customer. + + `others` + : `list` Specifies the evidence documents to be uploaded as a part of contesting a dispute. It is a list of tuples consisting of the following: + + `type` + : `string` Describes the custom type of evidence document(s) provided. + + `document_ids` + : `list` List of document ids corresponding to the customer evidence type. + + ```json: Example + [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH7", + "doc_EFtmUsbwpXwBH6" + ] + } + ] + ``` + + `submitted_at` + : `integer` Unix timestamp when the dispute was last submitted by you (for review) to Razorpay. The default value is `null`. + +### Errors + +The id provided does not exist. +* code: 400 +* description: - A wrong prefix is used. +- The dispute id does not exist or does not belong to the requestor. + +* solution: - The dispute id must start with `disp_`. +- Use a valid dispute id that belongs to the requestor. + + +_id is not a valid id. +* code: 400 +* description: - The id is not 14 characters long. +- The id is not alphanumeric. + +* solution: Use a valid dispute id. + +invalid_proof_type is/are not required and should not be sent. +* code: 400 +* description: Incorrect parameters are passed in the request body. +* solution: No parameter is required in the request body. + +Action not allowed as deadline to respond has elapsed. +* code: 400 +* description: The deadline to respond for a dispute has elapsed. +* solution: You can only respond to a dispute within the deadline. + +Action not allowed when dispute is in lost status. +* code: 400 +* description: This error occurs when you try to perform an action on a dispute with lost status. +* solution: You cannot perform any action on a dispute with lost status. + +Action not allowed when dispute is in won status. +* code: 400 +* description: This error occurs when you try to perform an action on a dispute with won status. +* solution: You cannot perform any action on a dispute with won status. + +Action not allowed when dispute is in closed status. +* code: 400 +* description: This error occurs when you try to perform an action on a closed dispute. +* solution: You cannot perform any action on a closed dispute. + +Action not allowed when dispute is in under_review status. +* code: 400 +* description: This error occurs when you try to perform an action on a dispute under review. +* solution: You cannot perform any action on a dispute under review. + +contest amount cannot be greater than dispute amount. +* code: 400 +* description: This error occurs when the contest amount is greater than the dispute amount. +* solution: Make sure the contest amount is lesser than the dispute amount. + +The selected action is invalid. +* code: 400 +* description: This error occurs when you try to perform an invalid action. +* solution: Only valid actions can be performed. + +Invalid file id provided or merchant is unauthorized to access the fileId(s) provided +* code: 400 +* description: This error occurs when you try to access invalid or unauthorised files. +* solution: Make sure the file is valid or you have access to the file. diff --git a/llm-content/api/disputes/entity.md b/llm-content/api/disputes/entity.md new file mode 100644 index 00000000..cc208697 --- /dev/null +++ b/llm-content/api/disputes/entity.md @@ -0,0 +1,169 @@ +--- +title: Disputes Entity +description: Know about Disputes entity parameters and their description +--- + +# Disputes Entity + +## Disputes Entity + +The Disputes entity has the following parameters: + +### Response + +```json: Entity +{ + "id":"disp_AHfqOvkldwsbqt", + "entity":"dispute", + "payment_id":"pay_EsyWjHrfzb59eR", + "amount":10000, + "currency":"INR", + "amount_deducted":0, + "reason_code":"chargeback", + "respond_by":1590604200, + "status":"open", + "phase":"chargeback", + "created_at":1590059211, + "evidence":{ + "amount":9000, + "summary":"goods delivered", + "shipping_proof":[ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof":[ + "doc_EFtmUsbwpXwBG9", + "doc_EFtmUsbwpXwBG8" + ], + "cancellation_proof":null, + "customer_communication":null, + "proof_of_service":null, + "explanation_letter":null, + "refund_confirmation":null, + "access_activity_log":null, + "refund_cancellation_policy":null, + "term_and_conditions":null, + "others":[ + { + "type":"receipt_signed_by_customer", + "document_ids":[ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "submitted_at":null + } +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the dispute generated by Razorpay. For example, `disp_AHfqOvkldwsbqt`. + +`entity` +: `string` Indicates the type of entity. In this case, it is `dispute`. + +`payment_id` +: `string` The unique identifier of the payment against which the dispute was created. For example, `pay_EsyWjHrfzb59eR`. + +`amount` +: `integer` Amount, in currency subunits, for which the dispute was created. + +`currency` +: `string` 3-letter ISO currency code associated with the amount. + +`amount_deducted` +: `integer` The amount, in currency subunits, deducted from your Razorpay current balance when the dispute is `lost`. This amount will be `0` unless the status of dispute is updated to `lost`. Know about the different [ states of disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md#dispute-states). + +`reason_code` +: `string` Code associated with the reason for the dispute. + +`reason_description` +: `string` A brief description of the reason for dispute. + +`respond_by` +: `integer` Unix timestamp by which a response should be sent to the customer. + +`status` +: `string` The status of the dispute. Possible statuses are: + - `open`: Indicates that the dispute has been created. + - `under_review`: Indicates that the issuing bank is reviewing the dispute. + - `won`: Indicates that the bank has accepted the remedial documents, and you have won the chargeback. + - `lost`: Indicates that the bank did not accept the remedial documents, and you have lost the chargeback. + - `closed`: Indicates that the fraudulent transaction was closed after you provided either the transaction details or made a refund to the customer. + +`phase` +: `string` Phase associated with the dispute. Possible phases are: + - `fraud`: A dispute raised by the bank when it suspects a transaction to be fraudulent based on the risk analysis. + - `retrieval`: A request initiated by the customer with their issuer bank for additional information about a transaction. + - `chargeback`: A refund claim initiated by the customers with their issuer banks. In such cases, the bank starts an official inquiry. + - `pre_arbitration`: A chargeback that you have won is challenged by the customer for the second time. + - `arbitration`: A chargeback that you have won is challenged for a third time by the customer and the card networks directly getting involved. + +`created_at` +: `integer` Unix timestamp when the dispute was created. + +`evidence` +: `object` Provides details of the evidence submitted/saved for contesting a dispute. Use the [Documents API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/documents.md) to securely share documents with Razorpay. + + `amount` + : `integer` The contested amount in currency subunits, for which evidence is provided. The value can vary from `0` to the dispute amount. The default value is the dispute amount. + + `summary` + : `string` The explanation provided by you for contesting the dispute. It can have a maximum length of 1000 characters. + + `shipping_proof` + : `list` List of document ids which serves as proof that the product was shipped to the customer at their provided address. It should show their complete shipping address, if possible. + + `billing_proof` + : `list` List of document ids which serves as proof of order confirmation, such as a receipt. + + `cancellation_proof` + : `list` List of document ids that serves as proof that this product/service was cancelled. + + `customer_communication` + : `list` List of document ids listing any written/email communication from the customer confirming that the customer received the product/service or is satisfied with the product/service. + + `proof_of_service` + : `list` List of document ids showing proof of service provided to the customer. + + `explanation_letter` + : `list` (List of document ids) Any letter(s) from you specifying information pertinent to the dispute/payment that needs to be considered for processing the dispute. + + `refund_confirmation` + : `list` List of document ids showing proof that the refund had been provided to the customer. + + `access_activity_log` + : `list` List of document ids of any server or activity logs which prove that the customer accessed or downloaded the purchased digital product. + + `refund_cancellation_policy` + : `list` List of document ids listing your refund and/or cancellation policy, as shown to the customer. + + `term_and_conditions` + : `list` List of document ids listing your sales terms and conditions, as shown to the customer. + + `others` + : `list` Specifies the evidence documents to be uploaded as a part of contesting a dispute. It is a list of tuples consisting of the following: + + `type` + : `string` Describes the custom type of evidence document(s) provided. + + `document_ids` + : `list` List of document ids corresponding to the customer evidence type. + + ```json: Example + [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH7", + "doc_EFtmUsbwpXwBH6" + ] + } + ] + ``` + + `submitted_at` + : `integer` Unix timestamp when the dispute was last submitted by you (for review) to Razorpay. The default value is `null`. diff --git a/llm-content/api/disputes/fetch-all.md b/llm-content/api/disputes/fetch-all.md new file mode 100644 index 00000000..53bbb6fa --- /dev/null +++ b/llm-content/api/disputes/fetch-all.md @@ -0,0 +1,271 @@ +--- +title: Fetch All Disputes +description: Fetch all Disputes using Razorpay Disputes API. +--- + +# Fetch All Disputes + +## Fetch All Disputes + +Use this endpoint to retrieve all the disputes raised by your customers. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/disputes \ +-H "Content-Type: application/json" + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dispute dispute = instance.dispute.fetchAll(); + +```python: Python + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.dispute.all() + +```php: PHP + +$api = new Api($key_id, $secret); + +$api->dispute->all(); + +```csharp: .NET + +RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + +List disputes = client.Dispute.All(); + +```ruby: Ruby + +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Dispute.all() + +```javascript: Node.js + +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var options = { + count: 1 +} + +instance.disputes.all(options) + +```go: Go + +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Dispute.All(nil, nil) +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "disp_Esz7KAitoYM7PJ", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "pre_arbitration", + "respond_by": 1590604200, + "status": "open", + "phase": "pre_arbitration", + "created_at": 1590059211, + "evidence": { + "amount": 10000, + "summary": null, + "shipping_proof": null, + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": null, + "submitted_at": null + } + }, + { + "id": "disp_Esyvk3kZj0isXk", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 5000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "warning_bulletin_or_exception_file", + "respond_by": 1590604200, + "status": "won", + "phase": "chargeback", + "created_at": 1590058554, + "evidence": { + "amount": 5000, + "summary": null, + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": null, + "submitted_at": 1590604100 + } + } + ] +} +```json: Failure +{ + "status_code":400, + "success":false, + "errors":[ + "Value of each expand must be one of following types: payment, transaction.settlement", + "Status Code: 400" + ] +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the dispute generated by Razorpay. For example, `disp_AHfqOvkldwsbqt`. + +`entity` +: `string` Indicates the type of entity. In this case, it is `dispute`. + +`payment_id` +: `string` The unique identifier of the payment against which the dispute was created. For example, `pay_EsyWjHrfzb59eR`. + +`amount` +: `integer` Amount, in currency subunits, for which the dispute was created. + +`currency` +: `string` 3-letter ISO currency code associated with the amount. + +`amount_deducted` +: `integer` The amount, in currency subunits, deducted from your Razorpay current balance when the dispute is `lost`. This amount will be `0` unless the status of dispute is updated to `lost`. Know about the different [ states of disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md#dispute-states). + +`reason_code` +: `string` Code associated with the reason for the dispute. + +`reason_description` +: `string` A brief description of the reason for dispute. + +`respond_by` +: `integer` Unix timestamp by which a response should be sent to the customer. + +`status` +: `string` The status of the dispute. Possible statuses are: + - `open`: Indicates that the dispute has been created. + - `under_review`: Indicates that the issuing bank is reviewing the dispute. + - `won`: Indicates that the bank has accepted the remedial documents, and you have won the chargeback. + - `lost`: Indicates that the bank did not accept the remedial documents, and you have lost the chargeback. + - `closed`: Indicates that the fraudulent transaction was closed after you provided either the transaction details or made a refund to the customer. + +`phase` +: `string` Phase associated with the dispute. Possible phases are: + - `fraud`: A dispute raised by the bank when it suspects a transaction to be fraudulent based on the risk analysis. + - `retrieval`: A request initiated by the customer with their issuer bank for additional information about a transaction. + - `chargeback`: A refund claim initiated by the customers with their issuer banks. In such cases, the bank starts an official inquiry. + - `pre_arbitration`: A chargeback that you have won is challenged by the customer for the second time. + - `arbitration`: A chargeback that you have won is challenged for a third time by the customer and the card networks directly getting involved. + +`created_at` +: `integer` Unix timestamp when the dispute was created. + +`evidence` +: `object` Provides details of the evidence submitted/saved for contesting a dispute. Use the [Documents API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/documents.md) to securely share documents with Razorpay. + + `amount` + : `integer` The contested amount in currency subunits, for which evidence is provided. The value can vary from `0` to the dispute amount. The default value is the dispute amount. + + `summary` + : `string` The explanation provided by you for contesting the dispute. It can have a maximum length of 1000 characters. + + `shipping_proof` + : `list` List of document ids which serves as proof that the product was shipped to the customer at their provided address. It should show their complete shipping address, if possible. + + `billing_proof` + : `list` List of document ids which serves as proof of order confirmation, such as a receipt. + + `cancellation_proof` + : `list` List of document ids that serves as proof that this product/service was cancelled. + + `customer_communication` + : `list` List of document ids listing any written/email communication from the customer confirming that the customer received the product/service or is satisfied with the product/service. + + `proof_of_service` + : `list` List of document ids showing proof of service provided to the customer. + + `explanation_letter` + : `list` (List of document ids) Any letter(s) from you specifying information pertinent to the dispute/payment that needs to be considered for processing the dispute. + + `refund_confirmation` + : `list` List of document ids showing proof that the refund had been provided to the customer. + + `access_activity_log` + : `list` List of document ids of any server or activity logs which prove that the customer accessed or downloaded the purchased digital product. + + `refund_cancellation_policy` + : `list` List of document ids listing your refund and/or cancellation policy, as shown to the customer. + + `term_and_conditions` + : `list` List of document ids listing your sales terms and conditions, as shown to the customer. + + `others` + : `list` Specifies the evidence documents to be uploaded as a part of contesting a dispute. It is a list of tuples consisting of the following: + + `type` + : `string` Describes the custom type of evidence document(s) provided. + + `document_ids` + : `list` List of document ids corresponding to the customer evidence type. + + ```json: Example + [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH7", + "doc_EFtmUsbwpXwBH6" + ] + } + ] + ``` + + `submitted_at` + : `integer` Unix timestamp when the dispute was last submitted by you (for review) to Razorpay. The default value is `null`. + +### Errors + +The api key provided is invalid +* code: 401 +* description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys. + +Value of each expand must be one of following types: payment, transaction.settlement +* code: 400 +* description: The value of the `expand` query parameter is neither `payments` nor `transaction.settlement`. +* solution: Pass the `expand` query parameter value as either `payments` or `transaction.settlement`. diff --git a/llm-content/api/disputes/fetch-dispute-expanded-payment.md b/llm-content/api/disputes/fetch-dispute-expanded-payment.md new file mode 100644 index 00000000..614e5e27 --- /dev/null +++ b/llm-content/api/disputes/fetch-dispute-expanded-payment.md @@ -0,0 +1,237 @@ +--- +title: Fetch a Dispute With ID (With Expanded Payments Details) +description: Fetch a Dispute using Razorpay Disputes API. +--- + +# Fetch a Dispute With ID (With Expanded Payments Details) + +## Fetch a Dispute With ID (With Expanded Payments Details) + +Use this endpoint to retrieve the details of a specific dispute using expanded payments details. + +### Response + +```json: Success +{ + "status_code":200, + "success":true, + "data":{ + "id":"disp_K8bVLppJ8zp5Wp", + "entity":"dispute", + "payment_id":"pay_K74a54NSclvx1M", + "amount":36800, + "currency":"INR", + "amount_deducted":0, + "gateway_dispute_id":"testtwo", + "reason_code":"2", + "reason_description":"live test", + "respond_by":1661711400, + "status":"under_review", + "phase":"chargeback", + "comments":null, + "evidence":{ + "amount":368, + "summary":"testing", + "submitted_at":1661159542, + "shipping_proof":null, + "billing_proof":null, + "cancellation_proof":null, + "customer_communication":null, + "proof_of_service":[ + "doc_K8cgi0fgjXk0En" + ], + "explanation_letter":null, + "refund_confirmation":[ + "doc_K8chcnednNAcrD" + ], + "access_activity_log":null, + "refund_cancellation_policy":null, + "terms_and_conditions":null, + "others":[ + { + "type":"second", + "document_ids":[ + "doc_K8cIsvjyHY5KuO" + ] + } + ] + }, + "lifecycle":[ + { + "change":{ + "new":{ + "status":"under_review" + }, + "old":{ + "status":"open" + } + }, + "user_id":"AlNVTJfGQwKf7O", + "created_at":1661159543, + "merchant_id":"AlNVTRJpqd9sqB" + } + ], + "created_at":1661154932, + "reason":{ + "gateway_code":"2", + "gateway_description":"livetest", + "code":"2", + "description":"live test", + "network":"Amex" + }, + "transaction":null + } +} +```json: Failure +{ + "status_code":400, + "success":false, + "errors":[ + "Value of each expand must be one of following types: payment, transaction.settlement", + "Status Code: 400" + ] +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the dispute. + +### Parameters + +`expand[]=payment` _optional_ +: `string` Use to expand the payments of a dispute. + +### Parameters + +`id` +: `string` The unique identifier of the dispute generated by Razorpay. For example, `disp_AHfqOvkldwsbqt`. + +`entity` +: `string` Indicates the type of entity. In this case, it is `dispute`. + +`payment_id` +: `string` The unique identifier of the payment against which the dispute was created. For example, `pay_EsyWjHrfzb59eR`. + +`amount` +: `integer` Amount, in currency subunits, for which the dispute was created. + +`currency` +: `string` 3-letter ISO currency code associated with the amount. + +`amount_deducted` +: `integer` The amount, in currency subunits, deducted from your Razorpay current balance when the dispute is `lost`. This amount will be `0` unless the status of dispute is updated to `lost`. Know about the different [ states of disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md#dispute-states). + +`reason_code` +: `string` Code associated with the reason for the dispute. + +`reason_description` +: `string` A brief description of the reason for dispute. + +`respond_by` +: `integer` Unix timestamp by which a response should be sent to the customer. + +`status` +: `string` The status of the dispute. Possible statuses are: + - `open`: Indicates that the dispute has been created. + - `under_review`: Indicates that the issuing bank is reviewing the dispute. + - `won`: Indicates that the bank has accepted the remedial documents, and you have won the chargeback. + - `lost`: Indicates that the bank did not accept the remedial documents, and you have lost the chargeback. + - `closed`: Indicates that the fraudulent transaction was closed after you provided either the transaction details or made a refund to the customer. + +`phase` +: `string` Phase associated with the dispute. Possible phases are: + - `fraud`: A dispute raised by the bank when it suspects a transaction to be fraudulent based on the risk analysis. + - `retrieval`: A request initiated by the customer with their issuer bank for additional information about a transaction. + - `chargeback`: A refund claim initiated by the customers with their issuer banks. In such cases, the bank starts an official inquiry. + - `pre_arbitration`: A chargeback that you have won is challenged by the customer for the second time. + - `arbitration`: A chargeback that you have won is challenged for a third time by the customer and the card networks directly getting involved. + +`created_at` +: `integer` Unix timestamp when the dispute was created. + +`evidence` +: `object` Provides details of the evidence submitted/saved for contesting a dispute. Use the [Documents API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/documents.md) to securely share documents with Razorpay. + + `amount` + : `integer` The contested amount in currency subunits, for which evidence is provided. The value can vary from `0` to the dispute amount. The default value is the dispute amount. + + `summary` + : `string` The explanation provided by you for contesting the dispute. It can have a maximum length of 1000 characters. + + `shipping_proof` + : `list` List of document ids which serves as proof that the product was shipped to the customer at their provided address. It should show their complete shipping address, if possible. + + `billing_proof` + : `list` List of document ids which serves as proof of order confirmation, such as a receipt. + + `cancellation_proof` + : `list` List of document ids that serves as proof that this product/service was cancelled. + + `customer_communication` + : `list` List of document ids listing any written/email communication from the customer confirming that the customer received the product/service or is satisfied with the product/service. + + `proof_of_service` + : `list` List of document ids showing proof of service provided to the customer. + + `explanation_letter` + : `list` (List of document ids) Any letter(s) from you specifying information pertinent to the dispute/payment that needs to be considered for processing the dispute. + + `refund_confirmation` + : `list` List of document ids showing proof that the refund had been provided to the customer. + + `access_activity_log` + : `list` List of document ids of any server or activity logs which prove that the customer accessed or downloaded the purchased digital product. + + `refund_cancellation_policy` + : `list` List of document ids listing your refund and/or cancellation policy, as shown to the customer. + + `term_and_conditions` + : `list` List of document ids listing your sales terms and conditions, as shown to the customer. + + `others` + : `list` Specifies the evidence documents to be uploaded as a part of contesting a dispute. It is a list of tuples consisting of the following: + + `type` + : `string` Describes the custom type of evidence document(s) provided. + + `document_ids` + : `list` List of document ids corresponding to the customer evidence type. + + ```json: Example + [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH7", + "doc_EFtmUsbwpXwBH6" + ] + } + ] + ``` + + `submitted_at` + : `integer` Unix timestamp when the dispute was last submitted by you (for review) to Razorpay. The default value is `null`. + +### Errors + +The id provided does not exist. +* code: 400 +* description: - A wrong prefix is used. +- The dispute id does not exist or does not belong to the requestor. + +* solution: - The dispute id must start with `disp_`. +- Use a valid dispute id that belongs to the requestor. + +_id is not a valid id. +* code: 400 +* description: - The id is not 14 characters long. +- The id is not alphanumeric. + +* solution: Use a valid dispute id. + +Value of each expand must be one of following types: payment, transaction.settlement +* code: 400 +* description: The value of the `expand` query parameter is neither `payments` nor `transaction.settlement`. +* solution: Pass the `expand` query parameter value as either `payments` or `transaction.settlement`. diff --git a/llm-content/api/disputes/fetch-dispute-expanded-transaction.md b/llm-content/api/disputes/fetch-dispute-expanded-transaction.md new file mode 100644 index 00000000..679f6dbc --- /dev/null +++ b/llm-content/api/disputes/fetch-dispute-expanded-transaction.md @@ -0,0 +1,242 @@ +--- +title: Fetch a Dispute With ID (With Expanded transaction.settlement Details) +description: Fetch a Dispute using Razorpay Disputes API. +--- + +# Fetch a Dispute With ID (With Expanded transaction.settlement Details) + +## Fetch a Dispute With ID (With Expanded transaction.settlement Details) + +Use this endpoint to retrieve the details of a specific dispute using expanded `transaction.settlement` details. + +### Response + +```json: Success +{ + "status_code":200, + "success":true, + "data":{ + "id":"disp_K8bVLppJ8zp5Wp", + "entity":"dispute", + "payment_id":"pay_K74a54NSclvx1M", + "amount":36800, + "currency":"INR", + "amount_deducted":0, + "gateway_dispute_id":"testtwo", + "reason_code":"2", + "reason_description":"live test", + "respond_by":1661711400, + "status":"under_review", + "phase":"chargeback", + "comments":null, + "evidence":{ + "amount":368, + "summary":"testing", + "submitted_at":1661159542, + "shipping_proof":null, + "billing_proof":null, + "cancellation_proof":null, + "customer_communication":null, + "proof_of_service":[ + "doc_K8cgi0fgjXk0En" + ], + "explanation_letter":null, + "refund_confirmation":[ + "doc_K8chcnednNAcrD" + ], + "access_activity_log":null, + "refund_cancellation_policy":null, + "terms_and_conditions":null, + "others":[ + { + "type":"second", + "document_ids":[ + "doc_K8cIsvjyHY5KuO" + ] + } + ] + }, + "lifecycle":[ + { + "change":{ + "new":{ + "status":"under_review" + }, + "old":{ + "status":"open" + } + }, + "user_id":"AlNVTJfGQwKf7O", + "created_at":1661159543, + "merchant_id":"AlNVTRJpqd9sqB" + } + ], + "created_at":1661154932, + "reason":{ + "gateway_code":"2", + "gateway_description":"livetest", + "code":"2", + "description":"live test", + "network":"Amex" + }, + "transaction":null + } +} +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Value of each expand must be one of following types: empty", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + }, + "field":"expand.0" + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the dispute. + +### Parameters + +`expand[]=transaction.settlement` _optional_ +: `string` Use to expand the transaction.settlement details of a dispute. + +### Parameters + +`id` +: `string` The unique identifier of the dispute generated by Razorpay. For example, `disp_AHfqOvkldwsbqt`. + +`entity` +: `string` Indicates the type of entity. In this case, it is `dispute`. + +`payment_id` +: `string` The unique identifier of the payment against which the dispute was created. For example, `pay_EsyWjHrfzb59eR`. + +`amount` +: `integer` Amount, in currency subunits, for which the dispute was created. + +`currency` +: `string` 3-letter ISO currency code associated with the amount. + +`amount_deducted` +: `integer` The amount, in currency subunits, deducted from your Razorpay current balance when the dispute is `lost`. This amount will be `0` unless the status of dispute is updated to `lost`. Know about the different [ states of disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md#dispute-states). + +`reason_code` +: `string` Code associated with the reason for the dispute. + +`reason_description` +: `string` A brief description of the reason for dispute. + +`respond_by` +: `integer` Unix timestamp by which a response should be sent to the customer. + +`status` +: `string` The status of the dispute. Possible statuses are: + - `open`: Indicates that the dispute has been created. + - `under_review`: Indicates that the issuing bank is reviewing the dispute. + - `won`: Indicates that the bank has accepted the remedial documents, and you have won the chargeback. + - `lost`: Indicates that the bank did not accept the remedial documents, and you have lost the chargeback. + - `closed`: Indicates that the fraudulent transaction was closed after you provided either the transaction details or made a refund to the customer. + +`phase` +: `string` Phase associated with the dispute. Possible phases are: + - `fraud`: A dispute raised by the bank when it suspects a transaction to be fraudulent based on the risk analysis. + - `retrieval`: A request initiated by the customer with their issuer bank for additional information about a transaction. + - `chargeback`: A refund claim initiated by the customers with their issuer banks. In such cases, the bank starts an official inquiry. + - `pre_arbitration`: A chargeback that you have won is challenged by the customer for the second time. + - `arbitration`: A chargeback that you have won is challenged for a third time by the customer and the card networks directly getting involved. + +`created_at` +: `integer` Unix timestamp when the dispute was created. + +`evidence` +: `object` Provides details of the evidence submitted/saved for contesting a dispute. Use the [Documents API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/documents.md) to securely share documents with Razorpay. + + `amount` + : `integer` The contested amount in currency subunits, for which evidence is provided. The value can vary from `0` to the dispute amount. The default value is the dispute amount. + + `summary` + : `string` The explanation provided by you for contesting the dispute. It can have a maximum length of 1000 characters. + + `shipping_proof` + : `list` List of document ids which serves as proof that the product was shipped to the customer at their provided address. It should show their complete shipping address, if possible. + + `billing_proof` + : `list` List of document ids which serves as proof of order confirmation, such as a receipt. + + `cancellation_proof` + : `list` List of document ids that serves as proof that this product/service was cancelled. + + `customer_communication` + : `list` List of document ids listing any written/email communication from the customer confirming that the customer received the product/service or is satisfied with the product/service. + + `proof_of_service` + : `list` List of document ids showing proof of service provided to the customer. + + `explanation_letter` + : `list` (List of document ids) Any letter(s) from you specifying information pertinent to the dispute/payment that needs to be considered for processing the dispute. + + `refund_confirmation` + : `list` List of document ids showing proof that the refund had been provided to the customer. + + `access_activity_log` + : `list` List of document ids of any server or activity logs which prove that the customer accessed or downloaded the purchased digital product. + + `refund_cancellation_policy` + : `list` List of document ids listing your refund and/or cancellation policy, as shown to the customer. + + `term_and_conditions` + : `list` List of document ids listing your sales terms and conditions, as shown to the customer. + + `others` + : `list` Specifies the evidence documents to be uploaded as a part of contesting a dispute. It is a list of tuples consisting of the following: + + `type` + : `string` Describes the custom type of evidence document(s) provided. + + `document_ids` + : `list` List of document ids corresponding to the customer evidence type. + + ```json: Example + [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH7", + "doc_EFtmUsbwpXwBH6" + ] + } + ] + ``` + + `submitted_at` + : `integer` Unix timestamp when the dispute was last submitted by you (for review) to Razorpay. The default value is `null`. + +### Errors + +The id provided does not exist. +* code: 400 +* description: - A wrong prefix is used. +- The dispute id does not exist or does not belong to the requestor. + +* solution: - The dispute id must start with `disp_`. +- Use a valid dispute id that belongs to the requestor. + +_id is not a valid id. +* code: 400 +* description: - The id is not 14 characters long. +- The id is not alphanumeric. + +* solution: Use a valid dispute id. + +Value of each expand must be one of following types: payment, transaction.settlement +* code: 400 +* description: The value of the `expand` query parameter is neither `payments` nor `transaction.settlement`. +* solution: Pass the `expand` query parameter value as either `payments` or `transaction.settlement`. diff --git a/llm-content/api/disputes/fetch.md b/llm-content/api/disputes/fetch.md new file mode 100644 index 00000000..081c0c86 --- /dev/null +++ b/llm-content/api/disputes/fetch.md @@ -0,0 +1,390 @@ +--- +title: Fetch a Dispute With ID +description: Fetch a Dispute using Razorpay Disputes API. +--- + +# Fetch a Dispute With ID + +## Fetch a Dispute With ID + +Use this endpoint to retrieve the details of a specific dispute. + +### Response + +```json: Open State & Not Contested +{ + "id": "disp_AHfqOvkldwsbqt", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "pre_arbitration", + "respond_by": 1590604200, + "status": "open", + "phase": "pre_arbitration", + "created_at": 1590059211, + "evidence": { + "amount": 10000, + "summary": "goods delivered", + "shipping_proof": null, + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": null, + "submitted_at": null + } +} +```json: Open State & In-progress Contest +{ + "id": "disp_AHfqOvkldwsbqt", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "chargeback", + "respond_by": 1590604200, + "status": "open", + "phase": "chargeback", + "created_at": 1590059211, + "evidence": { + "amount": 9000, + "summary": "goods delivered", + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": [ + "doc_EFtmUsbwpXwBG9", + "doc_EFtmUsbwpXwBG8" + ], + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "submitted_at": null + } +} +```json: Under Review +{ + "id": "disp_AHfqOvkldwsbqt", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "chargeback", + "respond_by": 1590604200, + "status": "under_review", + "phase": "chargeback", + "created_at": 1590059211, + "evidence": { + "amount": 9000, + "summary": "goods delivered", + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": [ + "doc_EFtmUsbwpXwBG9", + "doc_EFtmUsbwpXwBG8" + ], + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "submitted_at": 1590603200 + } +} +```json: Lost +{ + "id": "disp_AHfqOvkldwsbqt", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 10000, + "reason_code": "chargeback", + "respond_by": 1590604200, + "status": "lost", + "phase": "chargeback", + "created_at": 1590059211, + "evidence": { + "amount": 10000, + "summary": null, + "shipping_proof": null, + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": null, + "submitted_at": null + } +} +```json: Won +{ + "id": "disp_AHfqOvkldwsbqt", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 1000, + "reason_code": "chargeback", + "respond_by": 1590604200, + "status": "won", + "phase": "chargeback", + "evidence": { + "amount": 9000, + "summary": "goods delivered", + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": [ + "doc_EFtmUsbwpXwBG9", + "doc_EFtmUsbwpXwBG8" + ], + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "submitted_at": 1590603200 + }, + "created_at": 1590059211 +} +```json: Closed +{ + "id": "disp_AHfqOvkldwsbqt", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "chargeback", + "respond_by": 1590604200, + "status": "closed", + "phase": "chargeback", + "created_at": 1590059211, + "evidence": { + "amount": 10000, + "summary": "goods delivered", + "shipping_proof": null, + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": null, + "submitted_at": null + } +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The id provided does not exist", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the dispute. + +### Parameters + +`id` +: `string` The unique identifier of the dispute generated by Razorpay. For example, `disp_AHfqOvkldwsbqt`. + +`entity` +: `string` Indicates the type of entity. In this case, it is `dispute`. + +`payment_id` +: `string` The unique identifier of the payment against which the dispute was created. For example, `pay_EsyWjHrfzb59eR`. + +`amount` +: `integer` Amount, in currency subunits, for which the dispute was created. + +`currency` +: `string` 3-letter ISO currency code associated with the amount. + +`amount_deducted` +: `integer` The amount, in currency subunits, deducted from your Razorpay current balance when the dispute is `lost`. This amount will be `0` unless the status of dispute is updated to `lost`. Know about the different [ states of disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md#dispute-states). + +`reason_code` +: `string` Code associated with the reason for the dispute. + +`reason_description` +: `string` A brief description of the reason for dispute. + +`respond_by` +: `integer` Unix timestamp by which a response should be sent to the customer. + +`status` +: `string` The status of the dispute. Possible statuses are: + - `open`: Indicates that the dispute has been created. + - `under_review`: Indicates that the issuing bank is reviewing the dispute. + - `won`: Indicates that the bank has accepted the remedial documents, and you have won the chargeback. + - `lost`: Indicates that the bank did not accept the remedial documents, and you have lost the chargeback. + - `closed`: Indicates that the fraudulent transaction was closed after you provided either the transaction details or made a refund to the customer. + +`phase` +: `string` Phase associated with the dispute. Possible phases are: + - `fraud`: A dispute raised by the bank when it suspects a transaction to be fraudulent based on the risk analysis. + - `retrieval`: A request initiated by the customer with their issuer bank for additional information about a transaction. + - `chargeback`: A refund claim initiated by the customers with their issuer banks. In such cases, the bank starts an official inquiry. + - `pre_arbitration`: A chargeback that you have won is challenged by the customer for the second time. + - `arbitration`: A chargeback that you have won is challenged for a third time by the customer and the card networks directly getting involved. + +`created_at` +: `integer` Unix timestamp when the dispute was created. + +`evidence` +: `object` Provides details of the evidence submitted/saved for contesting a dispute. Use the [Documents API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/documents.md) to securely share documents with Razorpay. + + `amount` + : `integer` The contested amount in currency subunits, for which evidence is provided. The value can vary from `0` to the dispute amount. The default value is the dispute amount. + + `summary` + : `string` The explanation provided by you for contesting the dispute. It can have a maximum length of 1000 characters. + + `shipping_proof` + : `list` List of document ids which serves as proof that the product was shipped to the customer at their provided address. It should show their complete shipping address, if possible. + + `billing_proof` + : `list` List of document ids which serves as proof of order confirmation, such as a receipt. + + `cancellation_proof` + : `list` List of document ids that serves as proof that this product/service was cancelled. + + `customer_communication` + : `list` List of document ids listing any written/email communication from the customer confirming that the customer received the product/service or is satisfied with the product/service. + + `proof_of_service` + : `list` List of document ids showing proof of service provided to the customer. + + `explanation_letter` + : `list` (List of document ids) Any letter(s) from you specifying information pertinent to the dispute/payment that needs to be considered for processing the dispute. + + `refund_confirmation` + : `list` List of document ids showing proof that the refund had been provided to the customer. + + `access_activity_log` + : `list` List of document ids of any server or activity logs which prove that the customer accessed or downloaded the purchased digital product. + + `refund_cancellation_policy` + : `list` List of document ids listing your refund and/or cancellation policy, as shown to the customer. + + `term_and_conditions` + : `list` List of document ids listing your sales terms and conditions, as shown to the customer. + + `others` + : `list` Specifies the evidence documents to be uploaded as a part of contesting a dispute. It is a list of tuples consisting of the following: + + `type` + : `string` Describes the custom type of evidence document(s) provided. + + `document_ids` + : `list` List of document ids corresponding to the customer evidence type. + + ```json: Example + [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH7", + "doc_EFtmUsbwpXwBH6" + ] + } + ] + ``` + + `submitted_at` + : `integer` Unix timestamp when the dispute was last submitted by you (for review) to Razorpay. The default value is `null`. + +### Errors + +The api key provided is invalid +* code: 401 +* description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys. + +The id provided does not exist. +* code: 400 +* description: - A wrong prefix is used. +- The dispute id does not exist or does not belong to the requestor. + +* solution: - The dispute id must start with `disp_`. +- Use a valid dispute id that belongs to the requestor. + +_id is not a valid id. +* code: 400 +* description: - The id is not 14 characters long. +- The id is not alphanumeric. + +* solution: Use a valid dispute id. + +Value of each expand must be one of following types: payment, transaction.settlement +* code: 400 +* description: The value of the `expand` query parameter is neither `payments` nor `transaction.settlement`. +* solution: Pass the `expand` query parameter value as either `payments` or `transaction.settlement`. diff --git a/llm-content/api/documents.md b/llm-content/api/documents.md new file mode 100644 index 00000000..a036dc94 --- /dev/null +++ b/llm-content/api/documents.md @@ -0,0 +1,28 @@ +--- +title: Documents API +heading: Documents +description: Securely send dispute-related documents to Razorpay using the Documents API. +--- + +# Documents + +Use the Documents APIs to securely upload and share documents with Razorpay. + + Fork the Razorpay Postman Public Workspace and try the Documents APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-c8192d5e-7fd8-4047-a6c4-eb2ef5e34155) + +### Related Guides + +[About Documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/submit-evidence.md) + +### Endpoints + +- **post** `/v1/documents` - Create a Document: + Uploads a document onto the Razorpay ecosystem. + +- **get** `/v1/documents/:id` - Fetch Document Information: + Retrieves the details of any document that was uploaded. + +- **get** `/v1/documents/:id/content` - Fetch Document Content: + Downloads a previously uploaded document. diff --git a/llm-content/api/documents/create.md b/llm-content/api/documents/create.md new file mode 100644 index 00000000..08762d7d --- /dev/null +++ b/llm-content/api/documents/create.md @@ -0,0 +1,148 @@ +--- +title: Create a Document +description: Create a Document using Razorpays API. +--- + +# Create a Document + +## Create a Document + +Use this endpoint to upload a document onto the Razorpay ecosystem. After a document is successfully uploaded, the corresponding document id (present in response) can be provided in cases such as dispute evidence submission. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST 'https://api.razorpay.com/v1/documents' \ +-H "Content-Type: multipart/form-data" \ +-F 'purpose=dispute_evidence' \ +-F 'file=@/Users/your_name/sample_uploaded.jpeg' + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject request = new JSONObject(); +request.put("file", "/Users/your_name/Downloads/sample_uploaded.jpeg"); +request.put("purpose", "dispute_evidence"); + +Document document = instance.document.create(request); + +```python: Python + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +file = open("/Users/your_name/Downloads/sample_uploaded.jpeg", "rb") + +x = client.document.create({"file": file, "purpose": "dispute_evidence"}) + +```php: PHP + +$api = new Api($key_id, $secret); + +$payload = array( + 'file'=> '/Users/your_name/Downloads/sample_uploaded.pdf' + "purpose" => "dispute_evidence"); + +$api->document->create($payload); + +```ruby: Ruby + +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Document.create({ + "file": File.new("/Users/your_name/Downloads/sample_uploaded.jpeg"), + "purpose": "dispute_evidence" +}); + +```javascript: Node.js + +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var formData = { + 'file': { + 'value': fs.createReadStream('/Users/your_name/Downloads/sample_uploaded.pdf'), + 'options': { + 'filename': 'sample_uploaded.pdf', + 'contentType': null + } + }, + 'purpose': 'dispute_evidence' +}; + +instance.documents.create(formData); + +```go: Go + +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +filePath := "/Users/your_name/Downloads/sample_uploaded.jpeg" + file, err := os.Open(filePath) + + fields := map[string]string{ + "purpose": "dispute_evidence", + } + + params := requests.FileUploadParams{ + File: file, + Fields: fields, + } + ``` + +### Response + +```json: Success +{ + "id": "doc_EsyWjHrfzb59Re", + "entity": "document", + "purpose": "dispute_evidence", + "name": "doc_19_12_2020.jpg", + "mime_type": "image/png", + "size": 2863, + "created_at": 1590604200 +} +```json: Failure +{ + "error":{ + "status_code": 401, + "description":"The API `` provided is invalid.", + "code":"BAD_REQUEST_ERROR" + } +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the document uploaded. + +`entity` +: `string` Indicates the type of entity. In this case, it is `document`. + +`purpose` +: `string` The reason you are uploading this document. Here, it is `dispute_evidence`. + +`size` +: `integer` Indicates the size of the document in bytes. + +`mime_type` +: `string` Indicates the nature and format in which the document is uploaded. Possible values include: + - image/jpg + - image/jpeg + - image/png + - application/pdf + +`created_at` +: `integer` Unix timestamp at which the document was uploaded. + +### Errors + +The API `` provided is invalid. +* code: 401 +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard.- Different keys for test mode and live modes. +- Expired API key. + +* solution: The API keys must be active and entered correctly with no whitespace before or after the keys. diff --git a/llm-content/api/documents/entity.md b/llm-content/api/documents/entity.md new file mode 100644 index 00000000..941944f5 --- /dev/null +++ b/llm-content/api/documents/entity.md @@ -0,0 +1,48 @@ +--- +title: Documents Entity +description: Know about documents entity parameters and their description. +--- + +# Documents Entity + +## Documents Entity + +The Documents entity has the following parameters: + +### Response + +```json: Entity +{ + "id":"doc_EsyWjHrfzb59Re", + "entity":"document", + "purpose":"dispute_evidence", + "name":"file_19_18_2020.jpg", + "mime_type":"image/png", + "size":2863, + "created_at":1590604200 +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the document uploaded. + +`entity` +: `string` Indicates the type of entity. In this case, it is `document`. + +`purpose` +: `string` The reason you are uploading this document. Here, it is `dispute_evidence`. + +`size` +: `integer` Indicates the size of the document in bytes. + +`mime_type` +: `string` Indicates the nature and format in which the document is uploaded. Possible values are: + - image/jpg + - image/jpeg + - image/png + - application/pdf + +`created_at` +: `integer` Unix timestamp at which the document was uploaded. diff --git a/llm-content/api/documents/fetch-content.md b/llm-content/api/documents/fetch-content.md new file mode 100644 index 00000000..77fa36cc --- /dev/null +++ b/llm-content/api/documents/fetch-content.md @@ -0,0 +1,50 @@ +--- +title: Fetch Document Content +description: Fetch Document Content using Razorpays API. +--- + +# Fetch Document Content + +## Fetch Document Content + +Use this endpoint to download an earlier uploaded document. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/documents/:id/content +``` + +### Response + +```json: Failure +{ + "error":{ + "status_code": 401, + "description":"The API `` provided is invalid.", + "code":"BAD_REQUEST_ERROR" + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the document. + +### Errors + +The API `` provided is invalid. +* code: 400 +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard.- Different keys for test mode and live modes. +- Expired API key. + +* solution: The API keys must be active and entered correctly with no whitespace before or after the keys. + +_id is not a valid id. +* code: 400 +* description: - The id is not 14 characters long. +- The id is not alphanumeric. + +* solution: Use a valid document id. diff --git a/llm-content/api/documents/fetch-info.md b/llm-content/api/documents/fetch-info.md new file mode 100644 index 00000000..10bd0206 --- /dev/null +++ b/llm-content/api/documents/fetch-info.md @@ -0,0 +1,135 @@ +--- +title: Fetch Document Information +description: Fetch Document Information using Razorpays API. +--- + +# Fetch Document Information + +## Fetch Document Information + +Use this endpoint to retrieve the details of any document that was uploaded earlier. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/documents/doc_EsyWjHrfzb59Re + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String documentId = "doc_EsyWjHrfzb59Re"; + +Document document = instance.document.fetch(documentId); + +```python: Python + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +documentId = "doc_NiyXWXXXXXXXXX" + +client.document.fetch(documentId) + +```php: PHP + +$api = new Api($key_id, $secret); + +$documentId = ""; + +$api->document->fetch($documentId); + +```ruby: Ruby + +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +documentId = "doc_NiyXWXXXXXXXXX" + +Razorpay::Document.fetch(documentId) + +```javascript: Node.js + +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var documentId = "doc_EsyWjHrfzb59Re"; + +instance.documents.fetch(documentId); + +```go: Go + +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +documentId = "doc_NiyXWXXXXXXXXX" + +body, err := client.Document.Fetch(documentId, nil, nil) +``` + +### Response + +```json: Success +{ + "id": "doc_EsyWjHrfzb59Re", + "entity": "document", + "purpose": "dispute_evidence", + "name": "file_19_18_2020.jpg", + "mime_type": "image/png", + "size": 2863, + "created_at": 1590604200 +} +```json: Failure +{ + "error":{ + "status_code": 401, + "description":"The API `` provided is invalid.", + "code":"BAD_REQUEST_ERROR" + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the document. + +### Parameters + +`id` +: `string` The unique identifier of the document uploaded. + +`entity` +: `string` Indicates the type of entity. In this case, it is `document`. + +`purpose` +: `string` The reason you are uploading this document. Here, it is `dispute_evidence`. + +`size` +: `integer` Indicates the size of the document in bytes. + +`mime_type` +: `string` Indicates the nature and format in which the document is uploaded. Possible values include: + - image/jpg + - image/jpeg + - image/png + - application/pdf + +`created_at` +: `integer` Unix timestamp at which the document was uploaded. + +### Errors + +The API `` provided is invalid. +* code: 400 +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard.- Different keys for test mode and live modes. +- Expired API key. + +* solution: The API keys must be active and entered correctly with no whitespace before or after the keys. + +_id is not a valid id. +* code: 400 +* description: - The id is not 14 characters long. +- The id is not alphanumeric. + +* solution: Use a valid document id. diff --git a/llm-content/api/glossary.md b/llm-content/api/glossary.md new file mode 100644 index 00000000..3f0b4edd --- /dev/null +++ b/llm-content/api/glossary.md @@ -0,0 +1,35 @@ +--- +title: API | Glossary +heading: Glossary +description: A list of commonly used terms related to Razorpay APIs. +--- + +# Glossary + +The following table lists all the commonly used terms and their definitions used in Razorpay APIs: + +Terms | Description +--- +API | API (Application Programming Interface) is a software code using which two applications can talk to each other. +--- +API Key | A unique identifier used to authenticate a client or application making a request to an API. +--- +Curl | A command line tool for transferring data in various protocols, in our case HTTP. Many of the API example calls are made in the cURL syntax. For more information about cURL, visit the [cURL website](https://curl.haxx.se/). +--- +Endpoint| An API endpoint is the point of entry in a communication channel when two systems are interacting. It refers to touch points of the communication between an API and a server. +--- +HTTP | The Hypertext Transfer Protocol (HTTP) is designed to enable communications between clients and servers. HTTP works as a request-response protocol between a client and server. +--- +JSON | JavaScript Object Notation is a way to transport and store data. JSON is smaller than XML and easier to parse. For more visit the [JSON website](http://www.json.org/). +--- +Rate Limit | Rate limit is the number of API calls an app or user can make within a given time period. If this limit is exceeded, the app or user may be throttled. +--- +Webhooks | Webhooks are a means by which applications automatically communicate with each other. Webhooks allow you to receive real-time data from an app when an event happens. + +### Related Information + +- [Understand Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md) +- [API Authentication](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md) +- [Sandbox Setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/sandbox-setup.md) +- [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) +- [Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/best-practices.md) diff --git a/llm-content/api/orders.md b/llm-content/api/orders.md new file mode 100644 index 00000000..1672ade9 --- /dev/null +++ b/llm-content/api/orders.md @@ -0,0 +1,19 @@ +--- +title: API | Orders +heading: Orders +description: Create, view and update an Order using Razorpay APIs. +--- + +# Orders + +You can create [ Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md) and link them to payments. Orders APIs are used to create, update and retrieve details of Orders. Also, you can retrieve details of payments made towards these Orders. + +Fork the Razorpay Postman Public Workspace and try the Orders APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-91450029-1c52-4375-8033-39ca4c2d0a8c) + +### Related Guides + +[ About Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/orders.md) diff --git a/llm-content/api/orders/create.md b/llm-content/api/orders/create.md new file mode 100644 index 00000000..36d0521f --- /dev/null +++ b/llm-content/api/orders/create.md @@ -0,0 +1,239 @@ +--- +title: Create an Order +description: Create an Order using Razorpay Orders API. +--- + +# Create an Order + +## Create an Order + +Use this endpoint to create an order with basic details such as amount and currency. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 5000, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",5000); +orderRequest.put("currency",""); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = razorpay.orders.create(orderRequest); + +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 5000, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 5000); // amount in the smallest currency unit +options.Add("receipt", "order_rcptid_11"); +options.Add("currency", ""); +Order order = client.Order.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 5000, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 50000, + currency: "", + receipt: "receipt#1", + notes: { + key1: "value3", + key2: "value2" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 5000, + "currency": "", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + } +} +body, err := client.Order.Create(data, nil) +``` + +### Response + +```json: Success +{ + "amount": 5000, + "amount_due": 5000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1756455561, + "currency": "INR", + "entity": "order", + "id": "order_RB58MiP5SPFYyM", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "receipt": "receipt#1", + "status": "created" +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least 1.00", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + +### Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Can have a maximum length of 40 characters and has to be unique. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + +### Errors + +Authentication failed. +* code: 400 +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + +* solution: The API keys must be active and entered correctly with no whitespace before or after the keys. + +The amount must be at least INR 1.00. +* code: 400 +* description: The amount specified is less than the minimum amount. Currency subunits, such as paise (in the case of INR), should always be greater than 100. +* solution: Enter an amount equal to or greater than the minimum amount, that is 100. + +The **field name** is required. +* code: 400 +* description: A mandatory field is missing. +* solution: Ensure all mandatory fields and values are present. diff --git a/llm-content/api/orders/entity.md b/llm-content/api/orders/entity.md new file mode 100644 index 00000000..f0190a1c --- /dev/null +++ b/llm-content/api/orders/entity.md @@ -0,0 +1,83 @@ +--- +title: Orders Entity +description: Entity parameters and sample code for Orders API. +--- + +# Orders Entity + +The Orders entity has the following parameters: + +### Response + +```json: Entity +{ + "id": "order_DaZlswtdcn9UNV", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "Receipt #20", + "status": "created", + "attempts": 0, + "notes": { + "key1": "value1", + "key2": "value2" + }, + "created_at": 1572502745 +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. diff --git a/llm-content/api/orders/fetch-all-expanded-card-payments.md b/llm-content/api/orders/fetch-all-expanded-card-payments.md new file mode 100644 index 00000000..27805624 --- /dev/null +++ b/llm-content/api/orders/fetch-all-expanded-card-payments.md @@ -0,0 +1,414 @@ +--- +title: Fetch All Orders (With Expand Card Payments) +description: Expand card object when fetching payents for Orders using Razorpay Orders API. +--- + +# Fetch All Orders (With Expand Card Payments) + +## Fetch All Orders (With Expanded Card Payments) + +Use this endpoint to retrieve the details of all the orders that you created, with the card parameter expanded in the payments object. + +### Request + +```Curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/orders?expand[]=payments.card + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("expand[]","payments.card"); + +List order = instance.orders.fetchAll(params); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) +client.order.all({ + "expand[]": "payments.card" +}) + +```php: PHP +$api = new Api($key_id, $secret); +$api->order->all(array("expand[]" => "payments.card")); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +option = {"expand[]": "payments.card"} + +Razorpay::Order.all(option) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.all({ + "expand[]": "payments.card" +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +options := map[string]interface{}{ + "expand[]": "payments.card", +} +body, err := client.Order.All(options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("expand[]","payments.card"); + +List order = client.Order.All(orderRequest); + +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "order_MjehF7I6RXSm2o", + "entity": "order", + "amount": 500, + "amount_paid": 500, + "amount_due": 0, + "currency": "", + "receipt": null, + "payments": { + "entity": "collection", + "count": 1, + "items": [ + { + "id": "pay_MjehkbJc3pPERF", + "entity": "payment", + "amount": 500, + "currency": "", + "status": "captured", + "order_id": "order_MjehF7I6RXSm2o", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_MjehkeMkNIzhOb", + "card": { + "id": "card_MjehkeMkNIzhOb", + "entity": "card", + "name": "", + "last4": "0153", + "network": "Visa", + "type": "debit", + "issuer": null, + "international": false, + "emi": false, + "sub_type": "consumer", + "token_iin": null + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "", + "contact": "", + "notes": [], + "fee": 10, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "486881" + }, + "created_at": 1696318958 + } + ] + }, + "offer_id": null, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1696318929 + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`expand[]=payments.card` _optional_ +: `string` Use to expand the card payments made for an order. + +### Parameters + +`id` +: `string` The unique identifier of the order. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + +`payments` +: `object` Details of the payment. + + `id` + : `string` Unique identifier of the payment. + + `entity` + : `string` Indicates the type of entity. + + `amount` + : `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + + `currency` + : `string` The currency in which the payment is made. + + `status` + : `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + + + + `method` + : `string` The payment method used for making the payment. Possible values:- `card` +- `netbanking` +- `wallet` +- `upi` +- `emi` + + + + + + + + + + + `order_id` + : `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + + `description` + : `string` Description of the payment, if any. + + `international` + : `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + + `refund_status` + : `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + + `amount_refunded` + : `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + + `captured` + : `boolean` Indicates if the payment is captured. + + `email` + : `string` Customer email address used for the payment. + + `contact` + : `string` Customer contact number used for the payment. + + `fee` + : `integer` Fee (including tax) charged by us. + + `tax` + : `integer` Tax charged for the payment. + + `error_code` + : `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + + `error_description` + : `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + + `error_source` + : `string` The point of failure. For example, `customer`. + + `error_step` + : `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + + `error_reason` + : `string` The exact error reason. For example, `incorrect_otp`. + + `notes` + : `json object` Contains user-defined fields, stored for reference purposes. + + `created_at` + : `integer` Timestamp, in UNIX format, on which the payment was created. + + `card_id` + : `string` The unique identifier of the card used by the customer to make the payment. + + + + `wallet` + : `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + + + + + + `acquirer_data` + : `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + + + + + + + + `bank` + : `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for HSBC Bank. + + + + + + + + + + `upi` + : `object` Details of the UPI payment received. Applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + + + + + `card` + : `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + + `network` + : `string` The card network. Possible values:- `MasterCard` +- `Visa` +- `RuPay` +- `American Express` +- `Diners Club` +- `Maestro` +- `Unknown` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. This attribute will not be set for the card issued by a foreign bank. + + `emi` + : `boolean` Determines if card can be used for EMI payments. `true` if EMI payments are supported on card. `false` if EMI payments are not supported on card. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + + + + Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. diff --git a/llm-content/api/orders/fetch-all-expanded-payments.md b/llm-content/api/orders/fetch-all-expanded-payments.md new file mode 100644 index 00000000..9d4170d5 --- /dev/null +++ b/llm-content/api/orders/fetch-all-expanded-payments.md @@ -0,0 +1,322 @@ +--- +title: Fetch All Orders (With Expanded Payments) +description: Expand payments object when fetching Order details using Razorpay Orders API. +--- + +# Fetch All Orders (With Expanded Payments) + +## Fetch All Orders (With Expanded Payments) + +Use this endpoint to retrieve the details of all the orders that you created, with the payment parameter expanded. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/orders?expand[]=payments + +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "order_EpMTIJM0rhOj3H", + "entity": "order", + "amount": 10000, + "amount_paid": 0, + "amount_due": 10000, + "currency": "", + "receipt": null, + "payments": { + "entity": "collection", + "count": 1, + "items": [ + { + "id": "pay_EpMq4YcK0z5UYk", + "entity": "payment", + "amount": 10000, + "currency": "", + "status": "authorized", + "order_id": "order_EpMTIJM0rhOj3H", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": "card_EpMq4e7H6fHBQZ", + "bank": null, + "wallet": null, + "vpa": null, + "email": "", + "contact": "", + "notes": [], + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "created_at": 1589269390 + } + ] + }, + "offer_id": null, + "status": "attempted", + "attempts": 1, + "notes": [], + "created_at": 1589268096 + }, + { + "id": "order_Eoryq8z9wd0y7i", + "entity": "order", + "amount": 10000, + "amount_paid": 0, + "amount_due": 10000, + "currency": "", + "receipt": null, + "payments": { + "entity": "collection", + "count": 1, + "items": [ + { + "id": "pay_EpMr7r6DRIdYPO", + "entity": "payment", + "amount": 10000, + "currency": "", + "status": "authorized", + "order_id": "order_Eoryq8z9wd0y7i", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": "card_EpMr7y6E5cDXvd", + "bank": null, + "wallet": null, + "vpa": null, + "email": "", + "contact": "", + "notes": [], + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "created_at": 1589269450 + } + ] + }, + "offer_id": null, + "status": "attempted", + "attempts": 1, + "notes": [], + "created_at": 1589160718 + } + ] +} +``` + +### Parameters + +`expand[]=payments` +: `string` Use to expand the payments made for an order. + +### Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + +`payments` +: `object` Details of the payment. + + `id` + : `string` Unique identifier of the payment. + + `entity` + : `string` Indicates the type of entity. + + `amount` + : `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + + `currency` + : `string` The currency in which the payment is made. + + `status` + : `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + + + + `method` + : `string` The payment method used for making the payment. Possible values:- `card` +- `netbanking` +- `wallet` +- `upi` +- `emi` + + + + + + + + + + `order_id` + : `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + + `description` + : `string` Description of the payment, if any. + + `international` + : `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + + `refund_status` + : `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + + `amount_refunded` + : `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + + `captured` + : `boolean` Indicates if the payment is captured. + + `email` + : `string` Customer email address used for the payment. + + `contact` + : `string` Customer contact number used for the payment. + + `fee` + : `integer` Fee (including tax) charged by us. + + `tax` + : `integer` Tax charged for the payment. + + `error_code` + : `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + + `error_description` + : `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + + `error_source` + : `string` The point of failure. For example, `customer`. + + `error_step` + : `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + + `error_reason` + : `string` The exact error reason. For example, `incorrect_otp`. + + `notes` + : `json object` Contains user-defined fields, stored for reference purposes. + + `created_at` + : `integer` Timestamp, in UNIX format, on which the payment was created. + + `card_id` + : `string` The unique identifier of the card used by the customer to make the payment. + + + + `wallet` + : `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + + + + `acquirer_data` + : `array` A dynamic array consisting unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + + + + + + `bank` + : `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + + + + + + + + + + `upi` + : `object` Details of the UPI payment received. Applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. diff --git a/llm-content/api/orders/fetch-all.md b/llm-content/api/orders/fetch-all.md new file mode 100644 index 00000000..25d39721 --- /dev/null +++ b/llm-content/api/orders/fetch-all.md @@ -0,0 +1,196 @@ +--- +title: Fetch All Orders +description: Fetch all Orders using Razorpay Orders API. +--- + +# Fetch All Orders + +## Fetch All Orders + +Use this endpoint to retrieve the details of all the orders you created. In this example, **count and skip query parameters** have been used. You can invoke this API without these query parameters as well. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ +-X GET https://api.razorpay.com/v1/orders?count=2&skip=1 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List order = razorpay.orders.fetchAll(params); + +```python: Python +# do easy_install razorpay or +# pip install razorpay +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.all(option) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->all($options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +option = {"count":1} + +Razorpay::Order.all(option) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.all(option) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +options := map[string]interface{}{ + "count": 1, +} +body, err := client.Order.All(options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("count","1"); + +List order = client.Order.All(orderRequest); + +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "order_EKzX2WiEWbMxmx", + "entity": "order", + "amount": 1234, + "amount_paid": 0, + "amount_due": 1234, + "currency": "", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582637108 + }, + { + "id": "order_EAI5nRfThga2TU", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1580300731 + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`authorized`_optional_ +: `integer` Possible values: + - `1` : Retrieves Orders for which payments have been authorized. Payment and order states differ. Know more about [payment states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#payment-life-cycle). + - `0` : Retrieves orders for which payments have not been authorized. + +`receipt`_optional_ +: `string` Retrieves the orders that contain the provided value for receipt. + +`from`_optional_ +: `integer` Timestamp (in Unix format) from when the orders should be fetched. + +`to`_optional_ +: `integer` Timestamp (in Unix format) up till when orders are to be fetched. + +`count`_optional_ +: `integer` The number of orders to be fetched. The default value is 10. The maximum value is 100. This can be used for pagination, in combination with `skip`. + +`skip`_optional_ +: `integer` The number of orders to be skipped. The default value is `0`. This can be used for pagination, in combination with `count`. + +`expand[]`_optional_ +: `array` Used to retrieve additional information about the payment. Using this parameter will cause a sub-entity to be added to the response. Supported values are:- `payments`: Returns a collection of all payments made for each order. +- `payments.card`: Returns the card details of each payment made for each order. +- `transfers`: Returns a collection of transfers created for each order. +For more information about creating transfers using orders, refer to the [Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md) section of the [Route API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/route.md) documentation. +- `virtual_account`: Returns the virtual account details created for each order. +For more information about creating Virtual Accounts, refer to the [Smart Collect API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md) + +### Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + +### Errors + +The API `` provided is invalid. +* code: 400 +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + +* solution: The API keys must be active and entered correctly with no whitespace before or after the keys. diff --git a/llm-content/api/orders/fetch-payments.md b/llm-content/api/orders/fetch-payments.md new file mode 100644 index 00000000..7eaa786d --- /dev/null +++ b/llm-content/api/orders/fetch-payments.md @@ -0,0 +1,281 @@ +--- +title: Fetch Payments for an Order +description: Fetch payments for an Order using Razorpay Orders API. +--- + +# Fetch Payments for an Order + +## Fetch Payments for an Order + +Use this endpoint to fetch all the payments made for an order. The response contains all the authorised or failed payments for that order. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ + +-X GET https://api.razorpay.com/v1/orders/order_DaaS6LOUAASb7Y/payments \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String orderId = "order_DaaS6LOUAASb7Y"; + +Order order = razorpay.orders.fetchPayments(orderId); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.payments(orderId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->fetch($orderId)->payments(); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +orderId = "order_DaaS6LOUAASb7Y" + +Razorpay::Order.fetch("order_JCRhAvzvZQPkwT").payments + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.fetchPayments(orderId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Order.Payments("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string orderId = "order_Z6t7VFTb9xHeOs"; + +List order = client.Order.Fetch(orderId).Payments(); +``` + +### Response + +```json: Success +{ + "entity":"collection", + "count":2, + "items":[ + { + "id":"pay_N8FUmetkCE2hZP", + "entity":"payment", + "amount":100, + "currency":"INR", + "status":"failed", + "order_id":"order_N8FRN5zTm5S3wx", + "invoice_id":null, + "international":false, + "method":"upi", + "amount_refunded":0, + "refund_status":null, + "captured":false, + "description":null, + "card_id":null, + "bank":null, + "wallet":null, + "vpa":"failure@razorpay", + "email":"void@razorpay.com", + "contact":"+919999999999", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee":null, + "tax":null, + "error_code":"BAD_REQUEST_ERROR", + "error_description":"Payment was unsuccessful due to a temporary issue. If amount got deducted, it will be refunded within 5-7 working days.", + "error_source":"gateway", + "error_step":"payment_response", + "error_reason":"payment_failed", + "acquirer_data":{ + "rrn":null + }, + "created_at":1701688684, + "upi":{ + "vpa":"failure@razorpay" + } + }, + { + "id":"pay_N8FVRD1DzYzBh1", + "entity":"payment", + "amount":100, + "currency":"INR", + "status":"captured", + "order_id":"order_N8FRN5zTm5S3wx", + "invoice_id":null, + "international":false, + "method":"upi", + "amount_refunded":0, + "refund_status":null, + "captured":true, + "description":null, + "card_id":null, + "bank":null, + "wallet":null, + "vpa":"success@razorpay", + "email":"void@razorpay.com", + "contact":"+919999999999", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee":2, + "tax":0, + "error_code":null, + "error_description":null, + "error_source":null, + "error_step":null, + "error_reason":null, + "acquirer_data":{ + "rrn":"267567962619", + "upi_transaction_id":"F5B66C7C07CA6FEAD77E956DC2FC7ABE" + }, + "created_at":1701688721, + "upi":{ + "vpa":"success@razorpay" + } + } + ] +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the order for which the payments should be retrieved. + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + +`currency` +: `string` The currency in which the payment is made. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including tax) charged by us. + +`tax` +: `integer` Tax charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + + + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + + + + + +`upi` +: `object` Details of the UPI payment received. Applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. diff --git a/llm-content/api/orders/fetch-with-id.md b/llm-content/api/orders/fetch-with-id.md new file mode 100644 index 00000000..88d7d09d --- /dev/null +++ b/llm-content/api/orders/fetch-with-id.md @@ -0,0 +1,164 @@ +--- +title: Fetch an Order With ID +description: Fetches an Order with its id using the Razorpay Orders API. +--- + +# Fetch an Order With ID + +## Fetch an Order With ID + +Use this endpoint to retrieve details of a particular order as per the id. + + + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ +-X GET https://api.razorpay.com/v1/orders/order_DaaS6LOUAASb7Y \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String orderId = "order_DaaS6LOUAASb7Y"; + +Order order = razorpay.orders.fetch(orderId); + +```Python: Python +# do easy_install razorpay or +# pip install razorpay + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.fetch(orderId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->fetch($orderId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +orderId = "order_DaaS6LOUAASb7Y" + +Razorpay::Order.fetch(orderId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.fetch(orderId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Order.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string orderId = "order_Z6t7VFTb9xHeOs"; + +Order order = client.Order.Fetch(orderId); +``` + + + +### Response + +```json: Success +{ + "id": "order_DaaS6LOUAASb7Y", + "entity": "order", + "amount": 2000, + "amount_paid": 0, + "amount_due": 2000, + "currency": "", + "receipt": null, + "offer_id": "offer_JGQvQtvJmVDRIA", + "offers": [ + "offer_JGQvQtvJmVDRIA" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1654776878 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The id provided does not exist", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the order to be retrieved. + +### Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + +### Errors + +The API `` provided is invalid. +* code: 400 +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + +* solution: The API keys must be active and entered correctly with no whitespace before or after the keys. + +id is not a valid id. +* code: 400 +* description: The `order_id` passed is invalid. +* solution: Use a valid `order_id`. + +The id provided does not exist +* code: 400 +* description: The `order_id` does not exist or does not belong to the requestor. +* solution: Ensure that you use a valid `order_id` that belongs to the requestor. diff --git a/llm-content/api/orders/products.md b/llm-content/api/orders/products.md new file mode 100644 index 00000000..9c475102 --- /dev/null +++ b/llm-content/api/orders/products.md @@ -0,0 +1,139 @@ +--- +title: Products +description: Send additional information regarding products added by customers to their carts using the Products API. +--- + +# Products + +You can now store additional information on the products that customers add to their cart while shopping on your website or app, using the Products API. + +The Products API is based on the Orders API and uses the same endpoint. Along with the existing Orders parameters, you must use the `products` array to pass additional, domain-specific product information such as type, price, and so on. + +## List of Endpoints + +API Endpoint | Description +--- +[Create an Order with Product Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/products/create-with-details.md) | Creates an Order with the transaction details and the domain-specific product details. +--- +[Create a Payment Link with Product Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/products/create-pl-with-details.md) | Create a Payment Link to store additional information about the products purchased by customers while accepting payments using Payment Links Third-Party Validation. + +## Product Entity + +The product parameters vary based on its `type`. Right now, only `mutual_fund` is supported. + +### Type: Mutual Funds + +Businesses in this sector can use the `products` array to detail mutual fund investments in one order. + +> **WARN** +> +> +> **Watch Out!** +> +> - SEBI mandates Razorpay to report investments for Stock Brokers and Mutual Fund Distributors. Some details are thus mandatory. But for AMCs or Exchange platforms, these parameters are optional. +> - Always include mandatory parameters as required by the receiving entity. Razorpay won't validate them, and missing parameters can lead to transaction rejection. +> + +### Other Product Types + +The `products` array allows businesses to detail customer purchases in one order. + +> **INFO** +> +> +> **Handy Tips** +> +> Currently, only `mutual_funds` is supported. To request other types, contact our [Support team](https://razorpay.com/support/#request). +> + +The `products` array has the following parameters: + +`type` _mandatory_ +: `string` The type of product. Currently, the only supported value is `mutual_fund`. + +`plan` _if type=mutual_fund_ _optional_ +: `string` The name of the mutual fund plan selected by the customer. For example, `GD`. + + +`folio` _if type=mutual_fund_ _optional_ +: `string` Unique identifier of the customer's account with the mutual fund. For example, `9104927822`. + + +`amount` _if type=mutual_fund_ _mandatory_ +: `string` The amount paid by the customer for the plan. Sum of the individual cart amount must be equal to total order amount. It must be in paise. For example, `1400`. + + +`option` _if type=mutual_fund_ _optional_ +: `string` Mutual fund plan option. For example, `G`. + +`scheme` _if type=mutual_fund_ _mandatory for RTA_ +: `string` The type of mutual fund scheme you chose. +For example, `LT`, `BP`. + + +`receipt` _if type=mutual_fund_ _mandatory_ +: `string` Unique reference number (Order Number) generated at the merchant’s name. For example, `77407`. + +`mf_member_id` _mandatory_ +: `string` Unique Member ID as issued by the mutual fund platform. Can have a maximum length of 20 characters. + +`mf_user_id` _mandatory_ +: `string` Unique User or Client ID as issued by the mutual fund platform. Can have a maximum length of 10 characters. + +`mf_partner` _mandatory_ +: `string` The mutual fund platform being used to enable the purchase. Possible values are: - `cams` + - `kfin` + - `bse` + - `nse` + Can have a maximum length of 4 characters. + +> **WARN** +> +> +> **Watch Out!** +> +> Do not use values apart from the ones given above. It will not be accepted. +> + +`mf_investment_type` _mandatory_ +: `string` The type of investment. Possible values are: - `L`: Lump sum + - `S`: SIP + Can have a maximum length of 7 characters. + +`mf_amc_code` _mandatory for RTA_ +: `string` The AMC code for the mutual fund. Can have a maximum length of 5 characters. [List of possible values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/products/appendix.md). + +```json: Sample Entity +{ + "products": [ + { + "type": "mutual_fund", + "plan": "GD", + "folio": "9104927822", + "amount": "1400", + "option": "G", + "scheme": "LT", + "receipt": "77407", + "mf_member_id": "123445", + "mf_user_id": "77407", + "mf_partner": "cams", + "mf_investment_type": "L", + "mf_amc_code": "UTB" + }, + { + "type": "mutual_fund", + "plan": "SS", + "folio": "414117335676", + "amount": "2400", + "option": "G", + "scheme": "BP", + "receipt": "77407", + "mf_member_id": "990445", + "mf_user_id": "99407", + "mf_partner": "kfin", + "mf_investment_type": "S", + "mf_amc_code": "MIR" + } + ] +} +``` diff --git a/llm-content/api/orders/products/appendix.md b/llm-content/api/orders/products/appendix.md new file mode 100644 index 00000000..ad69841c --- /dev/null +++ b/llm-content/api/orders/products/appendix.md @@ -0,0 +1,103 @@ +--- +title: Appendix | Products API +heading: Appendix +description: List of AMC and related codes. +--- + +# Appendix + +Given below are the list of codes for AMCs, as provided by CAMS and Kfin. + +### AMC Codes List by CAMS + +AMC Code | AMC Name +--- +B | Aditya Birla Sun Life Mutual Fund +--- +D | DSP Mutual Fund +--- +H | HDFC Mutual Fund +--- +K | Kotak Mutual Fund +--- +SH | Shriram Mutual Fund +--- +UK | Union Mutual Fund +--- +MM | Mahindra Manulife Mutual Fund +--- +PP | PPFAS Mutual Fund +--- +P | ICICI Prudential Mutual Fund +--- +O | HSBC Mutual Fund +--- +T | Tata Mutual Fund +--- +IF | IIFL Mutual Fund +--- +F | L&T Mutual Fund +--- +G | IDFC Mutual Fund +--- +FTI | Franklin Templeton Mutual Fund +--- +L | SBI Mutual Fund +--- +Y | WhiteOak Mutual Fund + +### AMC Codes List by Kfin + +AMC Code | AMC Name +--- +CRF | CANARA ROBECO MUTUAL FUND +--- +LIC | LIC MUTUAL FUND +--- +PMF | PRINCIPAL MUTUAL FUND +--- +TMF | TAURUS MUTUAL FUND +--- +JMF | JM FINANCIAL MUTUAL FUND +--- +BPF | BARODA PIONEER MUTUAL FUND +--- +UTI | UTI MUTUAL FUND +--- +BAF | BHARTI AXA MUTUAL FUND +--- +MAF | MIRAE ASSET MUTUAL FUND +--- +EMF | EDELWEISS MUTUAL FUND +--- +RGF | RELIGARE INVESCO MUTUAL FUND +--- +QMF | QUANTUM MUTUAL FUND +--- +IBM | INDIABULLS MUTUAL FUND +--- +MOF | MOTILAL OSWAL MUTUAL FUND +--- +AXF | AXIS MUTUAL FUND +--- +PRM | PRAMERICA MUTUAL FUND +--- +PLF | NAVI MUTUAL FUND +--- +135 | IDBI MUTUAL FUND +--- +ITI | ITI MUTUAL FUND +--- +166 | QUANT MUTUAL FUND +--- +176 | SUNDARAM MF +--- +178 | BNP PARIBAS MUTUAL FUND +--- +185 | Trust Mutual Fund +--- +187 | NJ Mutual Fund +--- +RMF | NIPPON INDIA MUTUAL FUND +--- +188 | SAMCO MF diff --git a/llm-content/api/orders/products/create-pl-with-details.md b/llm-content/api/orders/products/create-pl-with-details.md new file mode 100644 index 00000000..ead84d7b --- /dev/null +++ b/llm-content/api/orders/products/create-pl-with-details.md @@ -0,0 +1,240 @@ +--- +title: Create a Payment Link With Product Details +description: Create a Payment Link to store additional information about the products purchased by customers while accepting payments using Payment Links Third-Party Validation. +--- + +# Create a Payment Link With Product Details + +### Request Parameters + + +`amount` _mandatory_ +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. + +`currency` _optional_ +: `string` A three-letter ISO code for the currency in which you want to accept the payment. For example, INR. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`accept_partial` _optional_ +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`first_min_partial_amount` _conditionally mandatory_ +: `integer` Minimum amount, in currency subunits, that must be paid by the customer as the first partial payment. Default value is `100`. Default currency is `INR`. For example, if an amount of is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. Must be passed along with `accept_partial` parameter. + + +`description` _optional_ +: `string` A brief description of the Payment Link. The maximum character limit supported is 2048. + +`customer` _optional_ +: `string` Customer details + + `name` _optional_ + : `string` The customer's name. + + `email` _optional_ + : `string` The customer's email address. + + `contact` _optional_ + : `string` The customer's phone number. + +`notify` _optional_ +: `array` Defines who handles Payment Link notification. + + `sms` _optional_ + : `boolean` Defines who handles the SMS notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + + `email` _optional_ + : `boolean` Defines who handles the email notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + +`reminder_enable` _optional_ +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`options` _mandatory_ +: `string` Contains the configurations and preferences related to the payment process. + + `order` _mandatory_ + : `string` Indicates the details related to how the payment should be processed. + + `method` _mandatory_ + : `string` Indicates the payment method being used. In this case, it is `netbanking`. + + `bank_account` _mandatory_ + : `string` Details of the bank account. + + `account_number` _mandatory_ + : `string` The bank account number. + + `name` _mandatory_ + : `string` Name of the bank account holder. + + `ifsc` _mandatory_ + : `string` The IFSC code of the bank. + +`products` _mandatory_ +: `array` Details of the products. + + `type` _mandatory_ + : `string` The type of product. Currently, the only supported value is `mutual_fund`. + + `plan` _if type=mutual_fund_ _optional_ + : `string` The name of the mutual fund plan selected by the customer. For example, `GD`. + + + `folio` _if type=mutual_fund_ _optional_ + : `string` Unique identifier of the customer's account with the mutual fund. For example, `9104927822`. + + + `amount` _if type=mutual_fund_ _mandatory_ + : `string` The amount paid by the customer for the plan. Sum of the individual cart amount must be equal to total order amount. It must be in paise. For example, `1400`. + + + `option` _if type=mutual_fund_ _optional_ + : `string` Mutual fund plan option. For example, `G`. + + `scheme` _if type=mutual_fund_ _mandatory for RTA_ + : `string` The type of mutual fund scheme you chose. + For example, `LT`, `BP`. + + + `receipt` _if type=mutual_fund_ _mandatory_ + : `string` Unique reference number (Order Number) generated at the merchant’s name. For example, `77407`. + + `mf_member_id` _mandatory_ + : `string` Unique member id as issued by the mutual fund platform. Can have a maximum length of 20 characters. + + `mf_user_id` _mandatory_ + : `string` Unique user or client id as issued by the mutual fund platform. Can have a maximum length of 10 characters. + + `mf_partner` _mandatory_ + : `string` The mutual fund platform being used to enable the purchase. Possible values are: - `cams` + - `kfin` + - `bse` + - `nse` + Can have a maximum length of 4 characters. + +> **WARN** +> +> +> **Watch Out!** +> +> Do not use values apart from the ones given above. It will not be accepted. +> + + `mf_investment_type` _mandatory_ + : `string` The type of investment. Possible values are: - `L`: Lump sum + - `S`: SIP + Can have a maximum length of 7 characters. + + `mf_amc_code` _mandatory for RTA_ + : `string` The AMC code for the mutual fund. Can have a maximum length of 5 characters. [List of possible values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/products/appendix.md) + + + + +### Response Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. + +`amount_paid` +: `integer` Amount paid by the customer. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + +`customer` +: `string` Customer details + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`first_min_partial_amount` +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more. This array gets populated only after the customer makes a payment. Until then, the value is `null`. + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. diff --git a/llm-content/api/orders/products/create-with-details.md b/llm-content/api/orders/products/create-with-details.md new file mode 100644 index 00000000..24d67b99 --- /dev/null +++ b/llm-content/api/orders/products/create-with-details.md @@ -0,0 +1,161 @@ +--- +title: Create an Order With Product Details +description: Create an Order with the transaction details and the domain-specific product details. +--- + +# Create an Order With Product Details + +/v1/orders + +Use this endpoint to create an Order with the transaction details and the domain-specific product details. + +> **INFO** +> +> +> **Handy Tips** +> +> We have an optional feature called **Amount Check**, which will reject your order request if the sum of all the products is not equal to the amount passed in the order. To get this feature enabled, raise a request to our [Support team](https://razorpay.com/support/#request). +> +> +> + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. Payment can only be made for this amount against the Order. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Can have a maximum length of 40 characters and has to be unique. + +`products` _mandatory_ +: `array` Details of the products. + + `type` _mandatory_ + : `string` The type of product. Currently, the only supported value is `mutual_fund`. + + `plan` _if type=mutual_fund_ _optional_ + : `string` The name of the mutual fund plan selected by the customer. For example, `GD`. + + + `folio` _if type=mutual_fund_ _optional_ + : `string` Unique identifier of the customer's account with the mutual fund. For example, `9104927822`. + + + `amount` _if type=mutual_fund_ _mandatory_ + : `string` The amount paid by the customer for the plan. Sum of the individual cart amount must be equal to total order amount. It must be in paise. For example, `1400`. + + + `option` _if type=mutual_fund_ _optional_ + : `string` Mutual fund plan option. For example, `G`. + + `scheme` _if type=mutual_fund_ _mandatory for RTA_ + : `string` The type of mutual fund scheme you chose. + For example, `LT`, `BP`. + + + `receipt` _if type=mutual_fund_ _mandatory_ + : `string` Unique reference number (Order Number) generated at the merchant’s name. For example, `77407`. + + `mf_member_id` _mandatory_ + : `string` Unique member id as issued by the mutual fund platform. Can have a maximum length of 20 characters. + + `mf_user_id` _mandatory_ + : `string` Unique user or client id as issued by the mutual fund platform. Can have a maximum length of 10 characters. + + `mf_partner` _mandatory_ + : `string` The mutual fund platform being used to enable the purchase. Possible values are: - `cams` + - `kfin` + - `bse` + - `nse` + Can have a maximum length of 4 characters. + +> **WARN** +> +> +> **Watch Out!** +> +> Do not use values apart from the ones given above. It will not be accepted. +> + + `mf_investment_type` _mandatory_ + : `string` The type of investment. Possible values are: - `L`: Lump sum + - `S`: SIP + Can have a maximum length of 7 characters. + + `mf_amc_code` _mandatory for RTA_ + : `string` The AMC code for the mutual fund. Can have a maximum length of 5 characters. [List of possible values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/products/appendix.md). + + + +### Response Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`products` _mandatory_ +: `array` Details of the products. + + `type` _mandatory_ + : `string` The type of product. Currently, the only supported value is `mutual_fund`. + + `plan` _if type=mutual_fund_ _optional_ + : `string` The name of the mutual fund plan selected by the customer. For example, `GD`. + + + `folio` _if type=mutual_fund_ _optional_ + : `string` Unique identifier of the customer's account with the mutual fund. For example, `9104927822`. + + + `amount` _if type=mutual_fund_ _mandatory_ + : `string` The amount paid by the customer for the plan. Sum of the individual cart amount must be equal to total order amount. It must be in paise. For example, `1400`. + + + `option` _if type=mutual_fund_ _optional_ + : `string` Mutual fund plan option. For example, `G`. + + `scheme` _if type=mutual_fund_ _mandatory for RTA_ + : `string` The type of mutual fund scheme you chose. + For example, `LT`, `BP`. + + + `receipt` _if type=mutual_fund_ _mandatory_ + : `string` Unique reference number (Order Number) generated at the merchant’s name. For example, `77407`. + + `mf_member_id` _mandatory_ + : `string` Unique member id as issued by the mutual fund platform. Can have a maximum length of 20 characters. + + `mf_user_id` _mandatory_ + : `string` Unique user or client id as issued by the mutual fund platform. Can have a maximum length of 10 characters. + + `mf_partner` _mandatory_ + : `string` The mutual fund platform being used to enable the purchase. Possible values are: - `cams` + - `kfin` + - `bse` + - `nse` + Can have a maximum length of 4 characters. + +> **WARN** +> +> +> **Watch Out!** +> +> Do not use values apart from the ones given above. It will not be accepted. +> + + `mf_investment_type` _mandatory_ + : `string` The type of investment. Possible values are: - `L`: Lump sum + - `S`: SIP + Can have a maximum length of 7 characters. + + `mf_amc_code` _mandatory for RTA_ + : `string` The AMC code for the mutual fund. Can have a maximum length of 5 characters. [List of possible values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/products/appendix.md) diff --git a/llm-content/api/orders/update.md b/llm-content/api/orders/update.md new file mode 100644 index 00000000..10cc9e02 --- /dev/null +++ b/llm-content/api/orders/update.md @@ -0,0 +1,208 @@ +--- +title: Update an Order +description: Update an Order using Razorpay Orders API. +--- + +# Update an Order + +## Update an Order + +Use this endpoint to update an Order. - You can modify an existing order to update the `Notes` field **only**. +- Notes can be used to record additional information about the order. +- A key-value store, the `notes` field can have a maximum of 15 key-value pairs, each of 256 characters (maximum). + + + + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ +-X PATCH https://api.razorpay.com/v1/orders/order_DaaS6LOUAASb7Y \ +-d '{ + "notes": { + "key1": "value3", + "key2": "value2" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String orderId = "order_DaaS6LOUAASb7Y"; + +JSONObject orderRequest = new JSONObject(); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = razorpay.orders.edit(orderId,orderRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.edit(orderId,{ + "notes": { + "key1": "value3", + "key2": "value2" + } +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->fetch($orderId)->edit(array('notes'=> array('notes_key_1'=>'Beam me up Scotty. 1', 'notes_key_2'=>'Engage'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.edit(orderId,{ + "notes": { + "key1": "value3", + "key2": "value2" + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +orderId = "order_DaaS6LOUAASb7Y" + +para_attr = { + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.edit(orderId,para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "notes": map[string]interface{}{ + "notes_key_1": "value1", + "notes_key_2": "value2", + }, +} +body, err := client.Order.Update("", data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string orderId = "order_Z6t7VFTb9xHeOs"; + +Dictionary orderRequest = new Dictionary(); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot Update"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Fetch(orderId).Edit(orderRequest); +``` + +### Response + +```json: Success +{ + "id":"order_DaaS6LOUAASb7Y", + "entity":"order", + "amount":2200, + "amount_paid":0, + "amount_due":2200, + "currency":"", + "receipt":"Receipt #211", + "offer_id":null, + "status":"attempted", + "attempts":1, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "created_at":1572505143 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The id provided does not exist", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the order in which the `Notes` field must be updated. + +### Parameters + +`notes` _mandatory_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + +### Errors + +The API `` provided is invalid. +* code: 400 +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + +* solution: The API keys must be active and entered correctly with no whitespace before or after the keys. + +id is not a valid id. +* code: 400 +* description: The `order_id` passed is invalid. +* solution: Use a valid `order_id`. + +The id provided does not exist +* code: 400 +* description: The `order_id` does not exist or does not belong to the requestor. +* solution: Ensure that you use a valid `order_id` that belongs to the requestor. diff --git a/llm-content/api/partners/account-onboarding.md b/llm-content/api/partners/account-onboarding.md new file mode 100644 index 00000000..d8a665af --- /dev/null +++ b/llm-content/api/partners/account-onboarding.md @@ -0,0 +1,36 @@ +--- +title: Partners Sub-merchant Onboarding APIs | Account +heading: Account +description: Use the Account APIs to onboard sub-merchants. +--- + +# Account + +You can use the Account APIs to create a sub-merchant account. After an account gets created, an `account_id` is assigned. Check the [account activation flow and states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md#account-activation). + +Fork the Razorpay Postman Public Workspace and try the Account APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-51a4958d-ae00-4717-9ec4-64cb7c1bf7fb) + +### Related Guides + +[Sub-merchant Onboarding APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/webhooks.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners.md) + +### Endpoints + + - **post** `/v2/accounts` - Create an Account: + Creates a sub-merchant account. + + + - **get** `/v2/accounts/:account_id` - Fetch an Account: + Retrieves the details of an account. + + + - **patch** `/v2/accounts/:account_id` - Update an Account: + Updates an account for different product activation statuses. + + + - **delete** `/v2/accounts/:account_id` - Delete an Account: + Deletes a sub-merchant account. diff --git a/llm-content/api/partners/account-onboarding/create.md b/llm-content/api/partners/account-onboarding/create.md new file mode 100644 index 00000000..d82c65e8 --- /dev/null +++ b/llm-content/api/partners/account-onboarding/create.md @@ -0,0 +1,999 @@ +--- +title: Create an Account | Sub-Merchant Onboarding APIs +heading: Create an Account +description: Onboard sub-merchants by creating an account using Razorpay Partners APIs. +--- + +# Create an Account + +## Create an Account + +Use this endpoint to create an account. + +### Request + +```Curl: Curl +curl -X POST https://api.razorpay.com/v2/accounts \ +-u \ +-H "Content-Type: application/json" \ +-d '{ + "email": "gauriagain.kumar@example.org", + "phone": "9000090000", + "legal_business_name": "Acme Corp", + "business_type": "partnership", + "customer_facing_business_name": "Example", + "profile": { + "category": "healthcare", + "subcategory": "clinic", + "description": "Healthcare E-commerce platform", + "addresses": { + "operation": { + "street1": "507, Koramangala 6th block", + "street2": "Kormanagala", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": 560047, + "country": "IN" + }, + "registered": { + "street1": "507, Koramangala 1st block", + "street2": "MG Road", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": 560034, + "country": "IN" + } + }, + "business_model": "Online Clothing ( men, women, ethnic, modern ) fashion and lifestyle, accessories, t-shirt, shirt, track pant, shoes." + }, + "legal_info": { + "pan": "AAACL1234C", + "gst": "18AABCU9603R1ZM" + }, + "brand": { + "color": "FFFFFF" + }, + "notes": { + "internal_ref_id": "123123" + }, + "contact_name": "Gaurav Kumar", + "contact_info": { + "chargeback": { + "email": "cb@example.org" + }, + "refund": { + "email": "cb@example.org" + }, + "support": { + "email": "support@example.org", + "phone": "9999999998", + "policy_url": "https://www.google.com" + } + }, + "apps": { + "websites": [ + "https://www.example.org" + ], + "android": [ + { + "url": "playstore.example.org", + "name": "Example" + } + ], + "ios": [ + { + "url": "appstore.example.org", + "name": "Example" + } + ] + } +}' + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +JSONObject accountRequest = new JSONObject(); +accountRequest.put("email","gauriagain.kumar@example.org"); +accountRequest.put("phone","9000090000"); +accountRequest.put("legal_business_name","Acme Corp"); +accountRequest.put("business_type","partnership"); +accountRequest.put("customer_facing_business_name","Example"); +JSONObject profile = new JSONObject(); +profile.put("category","healthcare"); +profile.put("subcategory","clinic"); +profile.put("description","Healthcare E-commerce platform"); + +JSONObject operation = new JSONObject(); +operation.put("street1","507, Koramangala 6th block"); +operation.put("street2","507, Koramangala"); +operation.put("city","Bengaluru"); +operation.put("state","Karnataka"); +operation.put("postal_code","560047"); +operation.put("country","IN"); + +JSONObject registered = new JSONObject(); +registered.put("street1","507, Koramangala 1th block"); +registered.put("street2","MG Road"); +registered.put("city","Bengaluru"); +registered.put("state","Karnataka"); +registered.put("postal_code","560034"); +registered.put("country","IN"); + +JSONObject addresses = new JSONObject(); +addresses.put("operation",operation); +addresses.put("registered",registered); + +profile.put("addresses",addresses); +profile.put("business_model","Online Clothing ( men, women, ethnic, modern ) fashion and lifestyle, accessories, t-shirt, shirt, track pant, shoes."); + +JSONObject legalInfo = new JSONObject(); +legalInfo.put("pan","AAACL1234C"); +legalInfo.put("gst","18AABCU9603R1ZM"); + +accountRequest.put("profile",profile); +accountRequest.put("legal_info",legalInfo); + +JSONObject brand = new JSONObject(); +brand.put("color","FFFFFF"); + +accountRequest.put("brand",brand); + +JSONObject notes = new JSONObject(); +notes.put("internal_ref_id","123123"); + +accountRequest.put("notes",notes); +accountRequest.put("contact_name","Gaurav Kumar"); + +JSONObject contactInfo = new JSONObject(); +JSONObject chargeback = new JSONObject(); +chargeback.put("email","cb@example.org"); + +JSONObject refund = new JSONObject(); +refund.put("email","cb@example.org"); + +JSONObject support = new JSONObject(); +support.put("email","support@example.org"); +support.put("phone","9999999998"); +support.put("policy_url","https://www.google.com"); + +contactInfo.put("chargeback",chargeback); +contactInfo.put("refund",refund); +contactInfo.put("support",support); +accountRequest.put("contact_info",contactInfo); + +JSONObject apps = new JSONObject(); +ArrayList url = new ArrayList(); +url.add("https://www.example.org"); + +apps.put("websites",url); +ArrayList android = new ArrayList(); +JSONObject android_details = new JSONObject(); +android_details.put("url","playstore.example.org"); +android_details.put("name","Example"); + +apps.put("android",android); +android.add(android_details); +ArrayList ios = new ArrayList(); +JSONObject ios_details = new JSONObject(); +ios_details.put("url","appstore.example.org"); +ios_details.put("name","Example"); +ios.add(ios_details); +apps.put("android",android); +apps.put("ios",ios); + +Account account = instance.account.create(accountRequest); + +```php: PHP +$api = new Api(null, null, ""); + +$api->account->create(array( + "email" => "gauriagain.kumar@example.org", + "phone" => "9000090000", + "legal_business_name" => "Acme Corp", + "business_type" => "partnership", + "customer_facing_business_name" => "Example", + "profile" => array( + "category" => "healthcare", + "subcategory" => "clinic", + "description" => "Healthcare E-commerce platform", + "addresses" => array( + "operation" => array( + "street1" => "507, Koramangala 6th block", + "street2" => "Kormanagala", + "city" => "Bengaluru", + "state" => "Karnataka", + "postal_code" => 560047, + "country" => "IN" + ), + "registered" => array( + "street1" => "507, Koramangala 1st block", + "street2" => "MG Road", + "city" => "Bengaluru", + "state" => "Karnataka", + "postal_code" => 560034, + "country" => "IN" + ) + ), + "business_model" => "Online Clothing ( men, women, ethnic, modern ) fashion and lifestyle, accessories, t-shirt, shirt, track pant, shoes." + ), + "legal_info" => array( + "pan" => "AAACL1234C", + "gst" => "18AABCU9603R1ZM" + ), + "brand" => array( + "color" => "FFFFFF" + ), + "notes" => array( + "internal_ref_id" => "123123" + ), + "contact_name" => "Gaurav Kumar", + "contact_info" => array( + "chargeback" => array( + "email" => "cb@example.org" + ), + "refund" => array( + "email" => "cb@example.org" + ), + "support" => array( + "email" => "support@example.org", + "phone" => "9999999998", + "policy_url" => "https://www.google.com" + ) + ), + "apps" => array( + "websites" => array( + "https://www.example.org" + ), + "android" => array( + array( + "url" => "playstore.example.org", + "name" => "Example" + ) + ), + "ios" => array( + array( + "url" => "appstore.example.org", + "name" => "Example" + ) + ) + ) +)); + +```javascript: Node.js + +const instance = new Razorpay({ + oauthToken: "" +); + +instance.accounts.create({ + "email": "gauriagain.kumar@example.org", + "phone": "9000090000", + "legal_business_name": "Acme Corp", + "business_type": "partnership", + "customer_facing_business_name": "Example", + "profile": { + "category": "healthcare", + "subcategory": "clinic", + "description": "Healthcare E-commerce platform", + "addresses": { + "operation": { + "street1": "507, Koramangala 6th block", + "street2": "Kormanagala", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": 560047, + "country": "IN" + }, + "registered": { + "street1": "507, Koramangala 1st block", + "street2": "MG Road", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": 560034, + "country": "IN" + } + }, + "business_model": "Online Clothing ( men, women, ethnic, modern ) fashion and lifestyle, accessories, t-shirt, shirt, track pant, shoes." + }, + "legal_info": { + "pan": "AAACL1234C", + "gst": "18AABCU9603R1ZM" + }, + "brand": { + "color": "FFFFFF" + }, + "notes": { + "internal_ref_id": "123123" + }, + "contact_name": "Gaurav Kumar", + "contact_info": { + "chargeback": { + "email": "cb@example.org" + }, + "refund": { + "email": "cb@example.org" + }, + "support": { + "email": "support@example.org", + "phone": "9999999998", + "policy_url": "https://www.google.com" + } + }, + "apps": { + "websites": [ + "https://www.example.org" + ], + "android": [ + { + "url": "playstore.example.org", + "name": "Example" + } + ], + "ios": [ + { + "url": "appstore.example.org", + "name": "Example" + } + ] + } + }) + +```ruby: Ruby + +require "razorpay" +Razorpay._with_oauth('access_token') +Razorpay::Account.create({ + "email": "gauriagain.kumar@example.org", + "phone": "9000090000", + "legal_business_name": "Acme Corp", + "business_type": "partnership", + "customer_facing_business_name": "Example", + "profile": { + "category": "healthcare", + "subcategory": "clinic", + "description": "Healthcare E-commerce platform", + "addresses": { + "operation": { + "street1": "507, Koramangala 6th block", + "street2": "Kormanagala", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": 560047, + "country": "IN" + }, + "registered": { + "street1": "507, Koramangala 1st block", + "street2": "MG Road", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": 560034, + "country": "IN" + } + }, + "business_model": "Online Clothing ( men, women, ethnic, modern ) fashion and lifestyle, accessories, t-shirt, shirt, track pant, shoes." + }, + "legal_info": { + "pan": "AAACL1234C", + "gst": "18AABCU9603R1ZM" + }, + "brand": { + "color": "FFFFFF" + }, + "notes": { + "internal_ref_id": "123123" + }, + "contact_name": "Gaurav Kumar", + "contact_info": { + "chargeback": { + "email": "cb@example.org" + }, + "refund": { + "email": "cb@example.org" + }, + "support": { + "email": "support@example.org", + "phone": "9999999998", + "policy_url": "https://www.google.com" + } + }, + "apps": { + "websites": [ + "https://www.example.org" + ], + "android": [ + { + "url": "playstore.example.org", + "name": "Example" + } + ], + "ios": [ + { + "url": "appstore.example.org", + "name": "Example" + } + ] + } +}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[ACCESS_TOKEN]"); + +Dictionary accountRequest = new Dictionary(); +accountRequest.Add("email", "gauriagain_n21.kumar@example.org"); +accountRequest.Add("phone", "9000090000"); +accountRequest.Add("legal_business_name", "Acme Corp"); +accountRequest.Add("business_type", "partnership"); +accountRequest.Add("customer_facing_business_name", "Example"); +Dictionary profile = new Dictionary(); +profile.Add("category", "healthcare"); +profile.Add("subcategory", "clinic"); +profile.Add("description", "Healthcare E-commerce platform"); + +Dictionary operation = new Dictionary(); +operation.Add("street1", "507, Koramangala 6th block"); +operation.Add("street2", "507, Koramangala"); +operation.Add("city", "Bengaluru"); +operation.Add("state", "Karnataka"); +operation.Add("postal_code", "560047"); +operation.Add("country", "IN"); + +Dictionary registered = new Dictionary(); +registered.Add("street1", "507, Koramangala 1th block"); +registered.Add("street2", "MG Road"); +registered.Add("city", "Bengaluru"); +registered.Add("state", "Karnataka"); +registered.Add("postal_code", "560034"); +registered.Add("country", "IN"); + +Dictionary addresses = new Dictionary(); +addresses.Add("operation", operation); +addresses.Add("registered", registered); + +profile.Add("addresses", addresses); +profile.Add("business_model", "Online Clothing ( men, women, ethnic, modern ) fashion and lifestyle, accessories, t-shirt, shirt, track pant, shoes."); + +Dictionary legalInfo = new Dictionary(); +legalInfo.Add("pan", "AAACL1234C"); +legalInfo.Add("gst", "18AABCU9603R1ZM"); + +accountRequest.Add("profile", profile); +accountRequest.Add("legal_info", legalInfo); + +Dictionary brand = new Dictionary(); +brand.Add("color", "FFFFFF"); + +accountRequest.Add("brand", brand); + +Dictionary notes = new Dictionary(); +notes.Add("internal_ref_id", "123123"); + +accountRequest.Add("notes", notes); +accountRequest.Add("contact_name", "Gaurav Kumar"); + +Dictionary contactInfo = new Dictionary(); +Dictionary chargeback = new Dictionary(); +chargeback.Add("email", "cb@example.org"); + +Dictionary refund = new Dictionary(); +refund.Add("email", "cb@example.org"); + +Dictionary support = new Dictionary(); +support.Add("email", "support@example.org"); +support.Add("phone", "9999999998"); +support.Add("policy_url", "https://www.google.com"); + +contactInfo.Add("chargeback", chargeback); +contactInfo.Add("refund", refund); +contactInfo.Add("support", support); +accountRequest.Add("contact_info", contactInfo); + +Dictionary apps = new Dictionary(); +List url = new List(); +url.Add("https://www.example.org"); + +apps.Add("websites", url); +Dictionary android_details = new Dictionary(); +android_details.Add("url", "playstore.example.org"); +android_details.Add("name", "Example"); +List> android = new List>(); +android.Add(android_details); +apps.Add("android", android); + +Dictionary ios_details = new Dictionary(); +ios_details.Add("url", "appstore.example.org"); +ios_details.Add("name", "Example"); +List> ios = new List>(); +ios.Add(ios_details); +apps.Add("ios", ios); +accountRequest.Add("apps", apps); + +Account payment = client.Account.Create(accountRequest); + +``` + +### Response + +```json: Success +{ + "id": "acc_GRWKk7qQsLnDjX", + "type": "standard", + "status": "created", + "email": "gauriagain.kumar@example.org", + "profile": { + "category": "healthcare", + "subcategory": "clinic", + "addresses": { + "registered": { + "street1": "507, Koramangala 1st block", + "street2": "MG Road", + "city": "Bengaluru", + "state": "KARNATAKA", + "postal_code": 560034, + "country": "IN" + }, + "operation": { + "street1": "507, Koramangala 6th block", + "street2": "Kormanagalo", + "city": "Bengaluru", + "state": "KARNATAKA", + "country": "IN", + "postal_code": 560047 + } + }, + "business_model": "Online Clothing ( men, women, ethnic, modern ) fashion and lifestyle, accessories, t-shirt, shirt, track pant, shoes." + }, + "notes": { + "internal_ref_id": "123123" + }, + "created_at": 1611136837, + "phone": "9000090000", + "business_type": "partnership", + "legal_business_name": "Acme Corp", + "customer_facing_business_name": "Example", + "legal_info": { + "pan": "AAACL1234C", + "gst": "18AABCU9603R1ZM" + }, + "apps": { + "websites": [ + "https://www.example.org" + ], + "android": [ + { + "url": "playstore.example.org", + "name": "Example" + } + ], + "ios": [ + { + "url": "appstore.example.org", + "name": "Example" + } + ] + }, + "brand": { + "color": "#FFFFFF" + }, + "contact_info": { + "chargeback": { + "email": "cb@example.org", + "phone": null, + "policy_url": null + }, + "refund": { + "email": "cb@example.org", + "phone": null, + "policy_url": null + }, + "support": { + "email": "support@example.org", + "phone": "9999999998", + "policy_url": "https://www.google.com" + } + } +} +``` + +### Parameters + +`email`_mandatory_ +: `string` The sub-merchant's business email address. + +`phone`_mandatory_ +: `integer` The sub-merchant's business phone number, without the country code. The minimum length is 8 characters and the maximum length is 15. For example, `9876543210`. + +`legal_business_name` _mandatory_ +: `string` The name of the sub-merchant's business. For example, `Acme Corp`. The minimum length is 4 characters and the maximum length is 200. + +`customer_facing_business_name` _optional_ +: `string` The sub-merchant billing label as it appears on the Dashboard. The minimum length is 1 character and the maximum length is 255. + +`business_type` _mandatory_ +: `string` The type of business operated by the sub-merchant. Possible values: [Business Types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md). + +`reference_id` _optional_ +: `string` Partner's external account reference id. The minimum length is 1 character and the maximum length is 512. + +`profile` +: `object` The business details of the sub-merchant's account. + + `category` _mandatory_ + : `string` The business category of the sub-merchant. Possible values: [List of Business Categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#business-category). + + `subcategory` _mandatory_ + : `string` The business sub-category of the sub-merchant. Possible values: [List of Business Sub-Categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#business-sub-category). + + `description` _deprecated_ + : `string` This parameter has been deprecated. Pass the description using the `business_model` parameter. + + `business_model` _optional_ + : `string` The business description. The character limit between 1-255 characters. + + `addresses` + : `object` Details of sub-merchant's address. + + `operation` _optional_ + : `object` Details of the sub-merchant's operational address. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 32. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + + `registered` _mandatory_ + : `object` Details of the sub-merchant's registered address. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 32. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + +`legal_info` _optional_ +: `object` The legal details about the sub-merchant's business. + + `pan` _optional_ + : `string` Valid PAN number details of the sub-merchant's business. + - This is a 10-digit alphanumeric code. For example, `AVOJB1111K`. + - The 4th digit should be either of 'C', 'H', 'F', 'A', 'T', 'B', 'J', 'G', 'L'. + - The regex for Company PAN is `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`. + + `gst` _optional_ + : `string` Valid GSTIN number details of the sub-merchant. + - This is a 15-digit PAN-based unique identification number. + - The Regex for GSTIN is `/^[0123][0-9][a-z]{5}[0-9]{4}[a-z][0-9][a-z0-9][a-z0-9]$/gi` + + `cin` _optional_ + : `string` CIN is for Private Limited and Public Limited, whereas LLPIN is for LLP business type. + - This is a 21-digit alpha-numeric number. + - The Regex for CIN is `/^([a-z]{3}-\d{4}|[ul]\d{5}[a-z]{2}\d{4}[a-z]{3}\d{6})$/i`. + +`brand` _optional_ +: `object` The branding details of the sub-merchant's business. + + `color` _optional_ + : `string` The color code of sub-merchant's business brand. This is a 6-character hex code (Regex: [a-fA-F0-9]\{6\}). + +`notes` _optional_ +: `object` Contains user-defined fields stored by the partner for reference purposes. + +`contact_name` _mandatory_ +: `string` The name of the contact. The minimum length is 4 and the maximum length is 255 characters. + +`contact_info` _optional_ +: `object` Options available for contact support. + + `chargeback` + : `object` The type of contact support. + + `email` _optional_ + : `string` The email id of chargeback POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` _optional_ + : `string` The phone number of chargeback POC. The minimum length is 8 and the maximum length is 10 characters. + + `policy_url` _optional_ + : `string` The URL of chargeback policy. + + `refund` + : `object` The type of contact support. + + `email` _optional_ + : `string` The email id of refund POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` _optional_ + : `string` The phone number of refund POC. The minimum length is 8 and the maximum length is 10 characters. + + `policy_url` _optional_ + : `string` The URL of refund policy. + + `support` + : `object` The type of contact support. + + `email` _optional_ + : `string` The email id of support POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` _optional_ + : `string` The phone number of support POC. The minimum length is 8 and the maximum length is 10 characters. + + `policy_url` _optional_ + : `string` The URL of support policy. + +`apps` _optional_ +: `object` The website/app details of the sub-merchant's business. + + `websites` _optional_ + : `array` The websites for the sub-merchant's business. A minimum of 1 website is required. + + `android` _optional_ + : `array` Android app details + + `url`_optional_ + : `string` The link of the Android app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` _optional_ + : `string` The name of the Android app. + + `ios` _optional_ + : `array` iOS app details + + `url` _optional_ + : `string` The link of the iOS app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` _optional_ + : `string` The name of the iOS app. + +### Parameters + +`id` +: `string` The unique identifier of a sub-merchant account generated by Razorpay. The maximum length is 18 characters. For example, `acc_GLGeLkU2JUeyDZ`. + +`type` +: `string` The account type. Possible value is `standard`. + +`status` +: `string` The status of the account. Possible values: + - `created`: Account status when the merchant account is created. + - `activated`: Account status when the merchant KYC is approved. + - `needs_clarification`: Account status when the merchant is asked to provide clarifications related to the KYC details submitted. + - `under_review`: Account status when the merchant submits all the KYC requirements. + - `suspended`: Account status when the merchant account is identified as potentially fraudulent and is suspended. + - `rejected`: Account status when the KYC details submitted by the merchant are rejected during manual review. + +`email` +: `string` The sub-merchant's business email address. + +`phone` +: `integer` The sub-merchant's business phone number. The minimum length is 8 characters and the maximum length is 15. + +`legal_business_name` +: `string` The name of the sub-merchant's business. For example, `Acme Corp`. The minimum length is 4 characters and the maximum length is 200. + +`customer_facing_business_name` +: `string` The sub-merchant billing label as it appears on the Dashboard. The minimum length is 1 character and the maximum length is 255. This parameter might be required to complete the KYC process. However, it is optional for this API. + +`business_type` +: `string` The type of business operated by the sub-merchant. Possible values: [Business Types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md). + +`reference_id` +: `string` Partner's external account reference id. The minimum length is 1 character and the maximum length is 512. + +`profile` +: `object` The business details of the sub-merchant's account. + + `category` + : `string` The business category of the sub-merchant. Possible values: [Business Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#business-category) + + `subcategory` + : `string` The business sub-category of the sub-merchant. Possible values: [Business Sub-Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#business-sub-category) + + `description` _deprecated_ + : `string` This parameter has been deprecated. Pass the description using the `business_model` parameter. + + `business_model` + : `string` The business description. The minimum length is 1 character and the maximum length is 255. + + `addresses` + : `object` Details of sub-merchant's address. + + + `operation` + : `object` Details of the sub-merchant's operational address. This parameter might be required to complete the KYC process. However, it is optional for this API. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 100. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + + `registered` + : `object` Details of the sub-merchant's registered address. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 100. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + +`legal_info` +: `object` The legal details about the sub-merchant's business. + + `pan` + : `string` Valid PAN number details of the sub-merchant's business. + - This is a 10-digit alphanumeric code. For example, `AVOJB1111K`. + - The 4th digit should be either of 'C', 'H', 'F', 'A', 'T', 'B', 'J', 'G', 'L'. + - The regex for Company PAN is `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`. + This parameter might be required to complete the KYC process. However, it is optional for this API. Business types like proprietorship and individual (`not_yet_registered`), do not require Business PAN. + + `gst` + : `string` Valid GSTIN number details of the sub-merchant. + - This is a 15-digit PAN-based unique identification number. + - The Regex to validate GSTIN is `/^[0123][0-9][a-z]{5}[0-9]{4}[a-z][0-9][a-z0-9][a-z0-9]$/gi`. + + `cin` + : `string` CIN is for Private Limited and Public Limited, whereas LLPIN is for LLP business type. + - This is a 21-digit alpha-numeric number. + - The Regex to validate CIN is `/^([a-z]{3}-\d{4}|[ul]\d{5}[a-z]{2}\d{4}[a-z]{3}\d{6})$/i`. + +`brand` +: `object` The branding details of the sub-merchant's business. + + `color` + : `string` The color code of sub-merchant's business brand. This is a 6-character hex code (Regex: [a-fA-F0-9]\{6\}). + +`notes` +: `object` Contains user-defined fields stored by the partner for reference purposes. + +`contact_name` +: `string` The name of the contact. The minimum length is 4 and the maximum length is 255 characters. + +`contact_info` +: `object` Options available for contact support. + + `chargeback` + : `object` The type of contact support. + + `email` + : `string` The email id of chargeback POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of chargeback POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of chargeback policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. Only domain name is mandatory. + + `refund` + : `object` The type of contact support. + + `email` + : `string` The email id of refund POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of refund POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of refund policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `support` + : `array` The type of contact support. + + `email` + : `string` The email id of support POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of support POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of support policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + +`apps` +: `object` The app details of the sub-merchant's business + + `websites` + : `array` The website/app for the sub-merchant's business. A minimum of 1 website is required. + + `android` + : `array` Android app details + + `url` + : `string` The link of the Android app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` + : `string` The name of the Android app. + + `ios` + : `array` iOS app details + + `url` + : `string` The link of the iOS app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` + : `string` The name of the iOS app. + +`activated_at` +: `integer` Unix timestamp that indicates when the merchant account was activated. This parameter has `null` value till the account is activated. + +`live` +: `boolean` Indicates the payments acceptance status of the merchant account. Possible values: + - `true`: Merchant can start accepting customer payments. + - `false`: Merchant cannot accept customer payments. + +`hold_funds` +: `boolean` Indicates the settlements status of the merchant account. Possible values: + - `true`: Settlement are on hold. Funds are not transferred to the merchant account. + - `false`: Settlements can be transferred to the merchant account. diff --git a/llm-content/api/partners/account-onboarding/delete.md b/llm-content/api/partners/account-onboarding/delete.md new file mode 100644 index 00000000..91ea4d36 --- /dev/null +++ b/llm-content/api/partners/account-onboarding/delete.md @@ -0,0 +1,364 @@ +--- +title: Delete an Account | Sub-Merchant Onboarding APIs +heading: Delete an Account +description: Delete an Account using Razorpay Partners APIs. +--- + +# Delete an Account + +## Delete an Account + +Use this endpoint to delete a sub-merchant account. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +### Request + +```cURL: Curl +curl -X DELETE https://api.razorpay.com/v2/accounts/acc_GXQAkO2MrvBYg4 \ +-u \ +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accountId = "acc_GP4lfNA0iIMn5B"; + +Account account = instance.account.delete(accountId); + +```php: PHP +$api = new Api(null, null, ""); + +$accountId = "acc_GP4lfNA0iIMn5B"; +$api->account->delete($accountId); + +```javascript: Node.js + +const instance = new Razorpay({ + oauthToken: "" +); + +const accountId = "acc_Q8BdU0uPXXXpqI"; + +instance.accounts.delete(accountId); + +```ruby: Ruby + +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +accountId = "acc_GP4lfNA0iIMn5B"; + +Razorpay::Account.delete(accountId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[ACCESS_TOKEN]"); + +string accountId = "acc_ua2tBezhcEBvap"; + +Account account = client.Account.Fetch(accountId).Delete(); + +``` + +### Response + +```json: Success +{ + "id": "acc_GXQAkO2MrvBYg4", + "type": "standard", + "status": "suspended", + "email": "gaurav.kumar@acme.org", + "profile": { + "category": "healthcare", + "subcategory": "clinic", + "addresses": { + "registered": { + "street1": "507, Koramangala 1st block", + "street2": "MG Road", + "city": "Bengaluru", + "state": "KARNATAKA", + "postal_code": "560034", + "country": "IN" + }, + "operation": { + "street1": "507, Koramangala 1st block", + "street2": "MG Road", + "city": "Bengaluru", + "state": "KARNATAKA", + "country": "IN", + "postal_code": "560034" + } + }, + "business_model": "Online Clothing ( men, women, ethnic, modern ) fashion and lifestyle, accessories, t-shirt, shirt, track pant, shoes." + }, + "notes": { + "internal_ref_id": "123123" + }, + "created_at": 1612425180, + "suspended_at": 1612425235, + "phone": "9000090000", + "reference_id": "account_COdeRandom", + "business_type": "partnership", + "legal_business_name": "Acme Corp Pvt Ltd", + "customer_facing_business_name": "Acme", + "legal_info": { + "pan": "AAACL1234C", + "gst": "18AABCU9603R1ZM" + }, + "apps": { + "websites": [ + "https://www.acme.org" + ], + "android": [ + { + "url": "playstore.acme.org", + "name": "Acme" + } + ], + "ios": [ + { + "url": "appstore.acme.org", + "name": "Acme" + } + ] + }, + "brand": { + "color": "#FFFFFF" + }, + "contact_name": "Gaurav Kumar", + "contact_info": { + "chargeback": { + "email": "cb@acme.org", + "phone": "9000090000", + "policy_url": "https://www.google.com" + }, + "refund": { + "email": "cb@acme.org", + "phone": "9898989898", + "policy_url": "https://www.google.com" + }, + "support": { + "email": "support@acme.org", + "phone": "9898989898", + "policy_url": "https://www.google.com" + } + } +} + +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account that must be deleted. For example, `acc_GPaClllZWaPBfv`. + +### Parameters + +`id` +: `string` The unique identifier of a sub-merchant account generated by Razorpay. The maximum length is 18 characters. For example, `acc_GLGeLkU2JUeyDZ`. + +`type` +: `string` The account type. Possible value is `standard`. + +`status` +: `string` The status of the account changes to `suspended`. + +`email` +: `string` The sub-merchant's business email address. + +`phone` +: `integer` The sub-merchant's business phone number. The minimum length is 8 characters and the maximum length is 15. + +`legal_business_name` +: `string` The name of the sub-merchant's business. For example, `Acme Corp`. The minimum length is 4 characters and the maximum length is 200. + +`customer_facing_business_name` +: `string` The sub-merchant billing label as it appears on the Dashboard. The minimum length is 1 character and the maximum length is 255. This parameter might be required to complete the KYC process. However, it is optional for this API. + +`business_type` +: `string` The type of business operated by the sub-merchant. Possible values: [Business Types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md). + +`suspended_at` +: `integer` Timestamp, in Unix format, at which the account will be suspended. + +`reference_id` +: `string` Partner's external account reference id. The minimum length is 1 character and the maximum length is 512. + +`profile` +: `object` The business details of the sub-merchant's account. + + `category` + : `string` The business category of the sub-merchant. Possible values: [Business Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#business-category) + + `subcategory` + : `string` The business sub-category of the sub-merchant. Possible values: [Business Sub-Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#business-sub-category) + + `description` _deprecated_ + : `string` This parameter has been deprecated. Pass the description using the `business_model` parameter. + + `business_model` + : `string` The business description. The minimum length is 1 character and the maximum length is 255. + + `addresses` + : `object` Details of sub-merchant's address. + + + `operation` + : `object` Details of the sub-merchant's operational address. This parameter might be required to complete the KYC process. However, it is optional for this API. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 100. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + + `registered` + : `object` Details of the sub-merchant's registered address. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 100. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + +`legal_info` +: `object` The legal details about the sub-merchant's business. + + `pan` + : `string` Valid PAN number details of the sub-merchant's business. + - This is a 10-digit alphanumeric code. For example, `AVOJB1111K`. + - The 4th digit should be either of 'C', 'H', 'F', 'A', 'T', 'B', 'J', 'G', 'L'. + - The regex for Company PAN is `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`. + This parameter might be required to complete the KYC process. However, it is optional for this API. + + `gst` + : `string` Valid GSTIN number details of the sub-merchant. + - This is a 15-digit PAN-based unique identification number. + - The Regex for GSTIN is `/^[0123][0-9][a-z]{5}[0-9]{4}[a-z][0-9][a-z0-9][a-z0-9]$/gi`. + + `cin` + : `string` CIN is for Private Limited and Public Limited, whereas LLPIN is for LLP business type. + - This is a 21-digit alpha-numeric number. + - The Regex for CIN is `/^([a-z]{3}-\d{4}|[ul]\d{5}[a-z]{2}\d{4}[a-z]{3}\d{6})$/i`. + +`brand` +: `object` The branding details of the sub-merchant's business. + + `color` + : `string` The color code of sub-merchant's business brand. This is a 6-character hex code (Regex: [a-fA-F0-9]\{6\}). + +`notes` +: `object` Contains user-defined fields stored by the partner for reference purposes. + +`contact_name` +: `string` The name of the contact. The minimum length is 4 and the maximum length is 255 characters. + +`contact_info` +: `object` Options available for contact support. + + `chargeback` + : `object` The type of contact support. + + `email` + : `string` The email id of chargeback POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of chargeback POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of chargeback policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. Only domain name is mandatory. + + `refund` + : `object` The type of contact support. + + `email` + : `string` The email id of refund POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of refund POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of refund policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `support` + : `array` The type of contact support. + + `email` + : `string` The email id of support POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of support POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of support policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + +`apps` +: `object` The app details of the sub-merchant's business + + `websites` + : `array` The website/app for the sub-merchant's business. A minimum of 1 website is required. + + `android` + : `array` Android app details + + `url` + : `string` The link of the Android app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` + : `string` The name of the Android app. + + `ios` + : `array` iOS app details + + `url` + : `string` The link of the iOS app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` + : `string` The name of the iOS app. + +`activated_at` +: `integer` Unix timestamp that indicates when the merchant account was activated. This parameter has `null` value till the account is activated. + +`live` +: `boolean` Indicates the payments acceptance status of the merchant account. Possible values: + - `true`: Merchant can start accepting customer payments. + - `false`: Merchant cannot accept customer payments. + +`hold_funds` +: `boolean` Indicates the settlements status of the merchant account. Possible values: + - `true`: Settlement are on hold. Funds are not transferred to the merchant account. + - `false`: Settlements can be transferred to the merchant account. diff --git a/llm-content/api/partners/account-onboarding/entity.md b/llm-content/api/partners/account-onboarding/entity.md new file mode 100644 index 00000000..63312c65 --- /dev/null +++ b/llm-content/api/partners/account-onboarding/entity.md @@ -0,0 +1,314 @@ +--- +title: Account Entity +description: Entity parameters and sample code for Accounts API. +--- + +# Account Entity + +The Account entity has the following parameters: + +### Response + +```json: Entity +{ + "id": "acc_GRWKk7qQsLnDjX", + "type": "standard", + "email": "gauri.kumar@example.org", + "activated_at": null, + "live": false, + "hold_funds": true, + "status": "created", + "profile": { + "category": "healthcare", + "subcategory": "clinic", + "addresses": { + "registered": { + "street1": "507, Koramangala 1st block", + "street2": "MG Road", + "city": "Bengaluru", + "state": "KARNATAKA", + "postal_code": 560034, + "country": "IN" + }, + "operation": { + "street1": "507, Koramangala 6th block", + "street2": "Kormanagala", + "city": "Bengaluru", + "state": "KARNATAKA", + "country": "IN", + "postal_code": 560047 + } + }, + "business_model": "Online Clothing ( men, women, ethnic, modern ) fashion and lifestyle, accessories, t-shirt, shirt, track pant, shoes." + }, + "notes": { + "internal_ref_id": "123123" + }, + "created_at": 1611136837, + "phone": "9999999998", + "business_type": "partnership", + "legal_business_name": "Acme Corp", + "customer_facing_business_name": "Example", + "legal_info": { + "pan": "AAACL1234C", + "gst": "18AABCU9603R1ZM" + }, + "apps": { + "websites": [ + "https://www.example.org" + ], + "android": [ + { + "url": "playstore.example.org", + "name": "Example" + } + ], + "ios": [ + { + "url": "appstore.example.org", + "name": "Example" + } + ] + }, + "brand": { + "color": "#FFFFFF" + }, + "contact_name": "Gaurav Kumar", + "contact_info": { + "chargeback": { + "email": "cb@example.org", + "phone": null, + "policy_url": null + }, + "refund": { + "email": "cb@example.org", + "phone": null, + "policy_url": null + }, + "support": { + "email": "support@example.org", + "phone": "9999999998", + "policy_url": "https://www.google.com" + } + } +} +``` + +### Parameters + +`id` +: `string` The unique identifier of a sub-merchant account generated by Razorpay. The maximum length is 18 characters. For example, `acc_GLGeLkU2JUeyDZ`. + +`type` +: `string` The account type. Possible value is `standard`. + +`status` +: `string` The status of the account. Possible values: + - `created`: Account status when the merchant account is created. + - `activated`: Account status when the merchant KYC is approved. + - `needs_clarification`: Account status when the merchant is asked to provide clarifications related to the KYC details submitted. + - `under_review`: Account status when the merchant submits all the KYC requirements. + - `suspended`: Account status when the merchant account is identified as potentially fraudulent and is suspended. + - `rejected`: Account status when the KYC details submitted by the merchant are rejected during manual review. + +`email` +: `string` The sub-merchant's business email address. + +`phone` +: `integer` The sub-merchant's business phone number. The minimum length is 8 characters and the maximum length is 15. + +`legal_business_name` +: `string` The name of the sub-merchant's business. For example, `Acme Corp`. The minimum length is 4 characters and the maximum length is 200. + +`customer_facing_business_name` +: `string` The sub-merchant billing label as it appears on the Dashboard. The minimum length is 1 character and the maximum length is 255. This parameter might be required to complete the KYC process. However, it is optional for this API. + +`business_type` +: `string` The type of business operated by the sub-merchant. Possible values: [Business Types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md). + +`reference_id` +: `string` Partner's external account reference id. The minimum length is 1 character and the maximum length is 512. + +`profile` +: `object` The business details of the sub-merchant's account. + + `category` + : `string` The business category of the sub-merchant. Possible values: [Business Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#business-category) + + `subcategory` + : `string` The business sub-category of the sub-merchant. Possible values: [Business Sub-Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#business-sub-category) + + `description` _deprecated_ + : `string` This parameter has been deprecated. Pass the description using the `business_model` parameter. + + `business_model` + : `string` The business description. The minimum length is 1 character and the maximum length is 255. + + `addresses` + : `object` Details of sub-merchant's address. + + + `operation` + : `object` Details of the sub-merchant's operational address. This parameter might be required to complete the KYC process. However, it is optional for this API. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 100. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + + `registered` + : `object` Details of the sub-merchant's registered address. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 100. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + +`legal_info` +: `object` The legal details about the sub-merchant's business. + + `pan` + : `string` Valid PAN number details of the sub-merchant's business. + - This is a 10-digit alphanumeric code. For example, `AVOJB1111K`. + - The 4th digit should be either of 'C', 'H', 'F', 'A', 'T', 'B', 'J', 'G', 'L'. + - The regex for Company PAN is `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`. + + This parameter might be required to complete the KYC process. However, it is optional for this API. Business types like proprietorship and individual (`not_yet_registered`), do not require Business PAN. + + `gst` + : `string` Valid GSTIN number details of the sub-merchant. + - This is a 15-digit PAN-based unique identification number. + - The Regex for GSTIN is `/^[0123][0-9][a-z]{5}[0-9]{4}[a-z][0-9][a-z0-9][a-z0-9]$/gi`. + + `cin` + : `string` CIN is for Private Limited and Public Limited, whereas LLPIN is for LLP business type. + - This is a 21-digit alpha-numeric number. + - The Regex for CIN is `/^([a-z]{3}-\d{4}|[ul]\d{5}[a-z]{2}\d{4}[a-z]{3}\d{6})$/i`. + +`brand` +: `object` The branding details of the sub-merchant's business. + + `color` + : `string` The color code of sub-merchant's business brand. This is a 6-character hex code (Regex: [a-fA-F0-9]\{6\}). + +`notes` +: `object` Contains user-defined fields stored by the partner for reference purposes. + +`contact_name` +: `string` The name of the contact. The minimum length is 4 and the maximum length is 255 characters. + +`contact_info` +: `object` Options available for contact support. + + `chargeback` + : `object` The type of contact support. + + `email` + : `string` The email id of chargeback POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of chargeback POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of chargeback policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. Only domain name is mandatory. + + `refund` + : `object` The type of contact support. + + `email` + : `string` The email id of refund POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of refund POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of refund policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `support` + : `array` The type of contact support. + + `email` + : `string` The email id of support POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of support POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of support policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + +`apps` +: `object` The app details of the sub-merchant's business + + `websites` + : `array` The website/app for the sub-merchant's business. A minimum of 1 website is required. + + `android` + : `array` Android app details + + `url` + : `string` The link of the Android app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` + : `string` The name of the Android app. + + `ios` + : `array` iOS app details + + `url` + : `string` The link of the iOS app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` + : `string` The name of the iOS app. + +`activated_at` +: `integer` Unix timestamp that indicates when the merchant account was activated. This parameter has `null` value till the account is activated. + +`live` +: `boolean` Indicates the payments acceptance status of the merchant account. Possible values: + - `true`: Merchant can start accepting customer payments. + - `false`: Merchant cannot accept customer payments. + +`hold_funds` +: `boolean` Indicates the settlements status of the merchant account. Possible values: + - `true`: Settlement are on hold. Funds are not transferred to the merchant account. + - `false`: Settlements can be transferred to the merchant account. diff --git a/llm-content/api/partners/account-onboarding/fetch.md b/llm-content/api/partners/account-onboarding/fetch.md new file mode 100644 index 00000000..3869ed90 --- /dev/null +++ b/llm-content/api/partners/account-onboarding/fetch.md @@ -0,0 +1,314 @@ +--- +title: Fetch an Account | Sub-Merchant Onboarding APIs +heading: Fetch an Account +description: Retrieve account details with Razorpay Partners sub-merchant onboarding APIs. +--- + +# Fetch an Account + +## Fetch an Account + +Use this endpoint to retrieve the details of an account. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +### Request + +```Curl: Curl +curl -X GET https://api.razorpay.com/v2/accounts/acc_GP4lfNA0iIMn5B \ +-u \ + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accountId = "acc_GP4lfNA0iIMn5B"; + +Account account = instance.account.fetch(accountId); + +```php: PHP +$api = new Api(null, null, ""); + +$accountId = "acc_GP4lfNA0iIMn5B"; +$api->account->fetch($accountId); + +```javascript: Node.js + +const instance = new Razorpay({ + oauthToken: "" +); + +const accountId = "acc_GP4lfNA0iIMn5B"; + +instance.accounts.fetch(accountId); + +```ruby: Ruby + +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') + +accountId = "acc_GP4lfNA0iIMn5B"; + +Razorpay::Account.fetch(accountId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[ACCESS_TOKEN]"); + +string accountId = "acc_ua2tBezhcEBvap"; + +Account account = client.Account.Fetch(accountId); +``` + +### Response + +```json: Success +{ + "id": "acc_GP4lfNA0iIMn5B", + "type": "standard", + "status": "created", + "email": "gauri@example.org", + "profile": { + "category": "healthcare", + "subcategory": "clinic", + "addresses": { + "registered": { + "street1": "507, Koramangala 1st block", + "street2": "MG Road-1", + "city": "Bengalore", + "state": "KARNATAKA", + "postal_code": "560034", + "country": "IN" + } + } + }, + "notes": [], + "created_at": 1610603081, + "phone": "9000090000", + "reference_id": "randomId", + "business_type": "partnership", + "legal_business_name": "Acme Corp", + "customer_facing_business_name": "Example Pvt. Ltd." +} + +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay. For example, `acc_GP4lfNA0iIMn5B`. + +### Parameters + +`id` +: `string` The unique identifier of a sub-merchant account generated by Razorpay. The maximum length is 18 characters. For example, `acc_GLGeLkU2JUeyDZ`. + +`type` +: `string` The account type. Possible value is `standard`. + +`status` +: `string` The status of the account. Possible values: + - `created`: Account status when the merchant account is created. + - `activated`: Account status when the merchant KYC is approved. + - `needs_clarification`: Account status when the merchant is asked to provide clarifications related to the KYC details submitted. + - `under_review`: Account status when the merchant submits all the KYC requirements. + - `suspended`: Account status when the merchant account is identified as potentially fraudulent and is suspended. + - `rejected`: Account status when the KYC details submitted by the merchant are rejected during manual review. + +`email` +: `string` The sub-merchant's business email address. + +`phone` +: `integer` The sub-merchant's business phone number. The minimum length is 8 characters and the maximum length is 15. + +`legal_business_name` +: `string` The name of the sub-merchant's business. For example, `Acme Corp`. The minimum length is 4 characters and the maximum length is 200. + +`customer_facing_business_name` +: `string` The sub-merchant billing label as it appears on the Dashboard. The minimum length is 1 character and the maximum length is 255. This parameter might be required to complete the KYC process. However, it is optional for this API. + +`business_type` +: `string` The type of business operated by the sub-merchant. Possible values: [Business Types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md). + +`reference_id` +: `string` Partner's external account reference id. The minimum length is 1 character and the maximum length is 512. + +`profile` +: `object` The business details of the sub-merchant's account. + + `category` + : `string` The business category of the sub-merchant. Possible values: [Business Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#business-category) + + `subcategory` + : `string` The business sub-category of the sub-merchant. Possible values: [Business Sub-Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#business-sub-category) + + `description` _deprecated_ + : `string` This parameter has been deprecated. Pass the description using the `business_model` parameter. + + `business_model` + : `string` The business description. The minimum length is 1 character and the maximum length is 255. + + `addresses` + : `object` Details of sub-merchant's address. + + + `operation` + : `object` Details of the sub-merchant's operational address. This parameter might be required to complete the KYC process. However, it is optional for this API. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 100. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + + `registered` + : `object` Details of the sub-merchant's registered address. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 100. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + +`legal_info` +: `object` The legal details about the sub-merchant's business. + + `pan` + : `string` Valid PAN number details of the sub-merchant's business. + - This is a 10-digit alphanumeric code. For example, `AVOJB1111K`. + - The 4th digit should be either of 'C', 'H', 'F', 'A', 'T', 'B', 'J', 'G', 'L'. + - The regex for Company PAN is `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`. + This parameter might be required to complete the KYC process. However, it is optional for this API. + + `gst` + : `string` Valid GSTIN number details of the sub-merchant. + - This is a 15-digit PAN-based unique identification number. + - The Regex for GSTIN is `/^[0123][0-9][a-z]{5}[0-9]{4}[a-z][0-9][a-z0-9][a-z0-9]$/gi`. + + `cin` + : `string` CIN is for Private Limited and Public Limited, whereas LLPIN is for LLP business type. + - This is a 21-digit alpha-numeric number. + - The Regex for CIN is `/^([a-z]{3}-\d{4}|[ul]\d{5}[a-z]{2}\d{4}[a-z]{3}\d{6})$/i`. + +`brand` +: `object` The branding details of the sub-merchant's business. + + `color` + : `string` The color code of sub-merchant's business brand. This is a 6-character hex code (Regex: [a-fA-F0-9]\{6\}). + +`notes` +: `object` Contains user-defined fields stored by the partner for reference purposes. + +`contact_name` +: `string` The name of the contact. The minimum length is 4 and the maximum length is 255 characters. + +`contact_info` +: `object` Options available for contact support. + + `chargeback` + : `object` The type of contact support. + + `email` + : `string` The email id of chargeback POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of chargeback POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of chargeback policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. Only domain name is mandatory. + + `refund` + : `object` The type of contact support. + + `email` + : `string` The email id of refund POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of refund POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of refund policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `support` + : `array` The type of contact support. + + `email` + : `string` The email id of support POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of support POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of support policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + +`apps` +: `object` The app details of the sub-merchant's business + + `websites` + : `array` The website/app for the sub-merchant's business. A minimum of 1 website is required. + + `android` + : `array` Android app details + + `url` + : `string` The link of the Android app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` + : `string` The name of the Android app. + + `ios` + : `array` iOS app details + + `url` + : `string` The link of the iOS app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` + : `string` The name of the iOS app. + +`activated_at` +: `integer` Unix timestamp that indicates when the merchant account was activated. This parameter has `null` value till the account is activated. + +`live` +: `boolean` Indicates the payments acceptance status of the merchant account. Possible values: + - `true`: Merchant can start accepting customer payments. + - `false`: Merchant cannot accept customer payments. + +`hold_funds` +: `boolean` Indicates the settlements status of the merchant account. Possible values: + - `true`: Settlement are on hold. Funds are not transferred to the merchant account. + - `false`: Settlements can be transferred to the merchant account. diff --git a/llm-content/api/partners/account-onboarding/update.md b/llm-content/api/partners/account-onboarding/update.md new file mode 100644 index 00000000..003e68d8 --- /dev/null +++ b/llm-content/api/partners/account-onboarding/update.md @@ -0,0 +1,358 @@ +--- +title: Update an Account | Sub-Merchant Onboarding APIs +heading: Update an Account +description: Update account with Razorpay Partners sub-merchant onboarding APIs. +--- + +# Update an Account + +## Update an Account + +Use this endpoint to update the details of a sub-merchant account. + +The information you can update using the Update an Account API differs based on the product activation status. + +Activation Status | Update Permitted +--- +`requested` | You can update the details for all the fields. +--- +`needs_clarification` | The fields you can update depend on the `reason_code` mentioned in the `requirements` object in the [Request a Product Activation API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/request.md): - **document_missing** or **field_missing**: You can update all the fields. +- **needs_clarification**: You can update only the specific field for which Razorpay is seeking clarification for. + +--- +`under_review` | You cannot update any fields. +--- +`activated` | You cannot use this API to update any fields as your account is already active. + +> **WARN** +> +> +> **Watch Out!** +> +> Currently, we do not support making concurrent requests to the following Onboarding APIs including their combination on the same `account_id`: +> - Update Account API +> - [Update Stakeholder API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/update.md) +> - [Update Product Configuration API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/update-settlement-account-details.md) +> +> Please wait for the response of these APIs before making subsequent requests. +> + +Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +### Request + +```Curl: Curl +curl -X PATCH https://api.razorpay.com/v2/accounts/acc_GP4lfNA0iIMn5B \ +-u \ +-H "Content-Type: application/json" \ +-d '{ + "customer_facing_business_name": "ABCD Ltd" +}' + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accountId = "acc_GP4lfNA0iIMn5B"; + +JSONObject accountRequest = new JSONObject(); +accountRequest.put("customer_facing_business_name","ABCD Ltd"); + +Account account = instance.account.edit(accountId,accountRequest); + +```php: PHP +$api = new Api(null, null, ""); + +$accountId = "acc_GP4lfNA0iIMn5B"; +$api->account->edit($accountId,array( + "customer_facing_business_name" => "ABCD Ltd" +)); + +```javascript: Node.js + +const instance = new Razorpay({ + oauthToken: "" +); + +const accountId = "acc_GP4lfNA0iIMn5B"; + +instance.accounts.edit(accountId,{ + "customer_facing_business_name": "ABCD Ltd" +}); + +```ruby: Ruby + +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +accountId = "acc_GP4lfNA0iIMn5B"; + +Razorpay::Account.edit(accountId,{ + "customer_facing_business_name": "ABCD Ltd" +}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[ACCESS_TOKEN]"); + +string accountId = "acc_ua2tBezhcEBvap"; + +Dictionary accountRequest = new Dictionary(); +accountRequest.Add("customer_facing_business_name", "Example"); + +Account account = client.Account.Fetch(accountId).Edit(accountRequest); + +``` + +### Response + +```json: Success +{ + "id": "acc_GP4lfNA0iIMn5B", + "type": "standard", + "status": "created", + "email": "gauri@example.org", + "profile": { + "category": "healthcare", + "subcategory": "clinic", + "addresses": { + "registered": { + "street1": "507, Koramangala 1st block", + "street2": "MG Road-1", + "city": "Bengalore", + "state": "KARNATAKA", + "postal_code": "560034", + "country": "IN" + } + } + }, + "notes": [], + "created_at": 1610603081, + "phone": "9000090000", + "reference_id": "randomId", + "business_type": "partnership", + "legal_business_name": "Acme Corp", + "customer_facing_business_name": "ABCD Ltd" +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay. For example, `acc_GP4lfNA0iIMn5B`. + +### Parameters + +`id` +: `string` The unique identifier of a sub-merchant account generated by Razorpay. The maximum length is 18 characters. For example, `acc_GLGeLkU2JUeyDZ`. + +`type` +: `string` The account type. Possible value is `standard`. + +`status` +: `string` The status of the account. Possible values: + - `created`: Account status when the merchant account is created. + - `activated`: Account status when the merchant KYC is approved. + - `needs_clarification`: Account status when the merchant is asked to provide clarifications related to the KYC details submitted. + - `under_review`: Account status when the merchant submits all the KYC requirements. + - `suspended`: Account status when the merchant account is identified as potentially fraudulent and is suspended. + - `rejected`: Account status when the KYC details submitted by the merchant are rejected during manual review. + +`email` +: `string` The sub-merchant's business email address. + +`phone` +: `integer` The sub-merchant's business phone number. The minimum length is 8 characters and the maximum length is 15. + +`legal_business_name` +: `string` The name of the sub-merchant's business. For example, `Acme Corp`. The minimum length is 4 characters and the maximum length is 200. + +`customer_facing_business_name` +: `string` The sub-merchant billing label as it appears on the Dashboard. The minimum length is 1 character and the maximum length is 255. This parameter might be required to complete the KYC process. However, it is optional for this API. + +`business_type` +: `string` The type of business operated by the sub-merchant. Possible values: [Business Types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md). + +`reference_id` +: `string` Partner's external account reference id. The minimum length is 1 character and the maximum length is 512. + +`profile` +: `object` The business details of the sub-merchant's account. + + `category` + : `string` The business category of the sub-merchant. Possible values: [Business Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#business-category) + + `subcategory` + : `string` The business sub-category of the sub-merchant. Possible values: [Business Sub-Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#business-sub-category) + + `description` _deprecated_ + : `string` This parameter has been deprecated. Pass the description using the `business_model` parameter. + + `business_model` + : `string` The business description. The minimum length is 1 character and the maximum length is 255. + + `addresses` + : `object` Details of sub-merchant's address. + + + `operation` + : `object` Details of the sub-merchant's operational address. This parameter might be required to complete the KYC process. However, it is optional for this API. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 100. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + + `registered` + : `object` Details of the sub-merchant's registered address. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 100. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + +`legal_info` +: `object` The legal details about the sub-merchant's business. + + `pan` + : `string` Valid PAN number details of the sub-merchant's business. + - This is a 10-digit alphanumeric code. For example, `AVOJB1111K`. + - The 4th digit should be either of 'C', 'H', 'F', 'A', 'T', 'B', 'J', 'G', 'L'. + - The regex for Company PAN is `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`. + This parameter might be required to complete the KYC process. However, it is optional for this API. + + `gst` + : `string` Valid GSTIN number details of the sub-merchant. + - This is a 15-digit PAN-based unique identification number. + - The Regex for GSTIN is `/^[0123][0-9][a-z]{5}[0-9]{4}[a-z][0-9][a-z0-9][a-z0-9]$/gi`. + + `cin` + : `string` CIN is for Private Limited and Public Limited, whereas LLPIN is for LLP business type. + - This is a 21-digit alpha-numeric number. + - The Regex for CIN is `/^([a-z]{3}-\d{4}|[ul]\d{5}[a-z]{2}\d{4}[a-z]{3}\d{6})$/i`. + +`brand` +: `object` The branding details of the sub-merchant's business. + + `color` + : `string` The color code of sub-merchant's business brand. This is a 6-character hex code (Regex: [a-fA-F0-9]\{6\}). + +`notes` +: `object` Contains user-defined fields stored by the partner for reference purposes. + +`contact_name` +: `string` The name of the contact. The minimum length is 4 and the maximum length is 255 characters. + +`contact_info` +: `object` Options available for contact support. + + `chargeback` + : `object` The type of contact support. + + `email` + : `string` The email id of chargeback POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of chargeback POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of chargeback policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. Only domain name is mandatory. + + `refund` + : `object` The type of contact support. + + `email` + : `string` The email id of refund POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of refund POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of refund policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `support` + : `array` The type of contact support. + + `email` + : `string` The email id of support POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of support POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of support policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + +`apps` +: `object` The app details of the sub-merchant's business + + `websites` + : `array` The website/app for the sub-merchant's business. A minimum of 1 website is required. + + `android` + : `array` Android app details + + `url` + : `string` The link of the Android app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` + : `string` The name of the Android app. + + `ios` + : `array` iOS app details + + `url` + : `string` The link of the iOS app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` + : `string` The name of the iOS app. + +`activated_at` +: `integer` Unix timestamp that indicates when the merchant account was activated. This parameter has `null` value till the account is activated. + +`live` +: `boolean` Indicates the payments acceptance status of the merchant account. Possible values: + - `true`: Merchant can start accepting customer payments. + - `false`: Merchant cannot accept customer payments. + +`hold_funds` +: `boolean` Indicates the settlements status of the merchant account. Possible values: + - `true`: Settlement are on hold. Funds are not transferred to the merchant account. + - `false`: Settlements can be transferred to the merchant account. diff --git a/llm-content/api/partners/errors.md b/llm-content/api/partners/errors.md new file mode 100644 index 00000000..5bc83274 --- /dev/null +++ b/llm-content/api/partners/errors.md @@ -0,0 +1,208 @@ +--- +title: Generic Partners API Errors +heading: Generic API Errors +description: List of errors encountered while using Partners API with solutions. +--- + +# Generic API Errors + +Given below are the error codes and descriptions that are common to all Onboarding APIs. + +- [400 Bad Request Error](#400-bad-request-error) +- [401 Unauthorized](#401-unauthorized) +- [500 Internal Server Error](#500-internal-server-error) + +## 400 Bad Request Error + +Given below are sample error objects for bad request errors. + +### Data Exceeds Specified Length + +This error occurs when the value sent for a particular field exceeds the specified limit. For example, if you had sent a phone number with more than 10 digits. + +Error Description | Solution +--- +The `field_name` must be `x` digits. | Check the length mentioned in the documentation and resend. + +```json: Length Exceeded +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The phone must be 10 digits.", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "phone" + } +} +``` + +### Invalid URL Sent + +This error occurs when you the send an invalid URL. + +Error Description | Solution +--- +The url is not a valid URL. | Check the URL and resend. + +```json: Invalid URL +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The url is not a valid URL.", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Invalid Data Sent + +This error occurs when the value sent for a particular field is incorrect. For example, if you sent an invalid webhook event name. + +Error Description | Solution +--- +Invalid event name/names: payment.authorized | Check the mentioned field (here, webhook event name) and resend. + +```json: Invalid Data +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Invalid event name/names: payment.authorized", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Blank Field + +This error occurs when a field is sent without any values. For example, if the Account entity parameter `customer_facing_business_name` is sent without any value. + +Error Description | Solution +--- +The business dba field is required. | Ensure all mandatory fields and values are present. (Here, the business name). + +```json: Blank Business Name Field +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The business dba field is required.", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "business_dba" + } +} +``` + +### Extra Fields Submitted at Needs Clarification State + +This error occurs when the Razorpay team has evaluated the details, changed the activation status to `needs_clarification` and has sought more details. Therefore, only those fields which are present in the `requirements array` in the [Fetch Product Configuration API](https://razorpay.com/docs/api/partners/product-configuration/fetch) response should be resent. You cannot send any additional fields. + +Error Description | Solution +--- +Only fields requested for needs clarification are allowed for update. | Send only the highlighted fields. + +```json: Extra Fields +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Only fields requested for needs clarification are allowed for update" + } +} +``` + +### Extra Fields Submitted at Under Review State + +This error occurs when the Razorpay team is evaluating the submitted details and changed the activation status to `under_review`. Therefore, you cannot send any fields. + +Error Description | Solution +--- +Merchant activation form has been locked for editing by admin | Do not send any requests. Wait for Razorpay team to revert. + +```json: Extra Fields +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Merchant activation form has been locked for editing by admin" + } +} +``` + +### Extra Fields Submitted at Activated State + +This error occurs when the activation is complete. At this point, you cannot send any fields. + +Error Description | Solution +--- +Merchant activation form has been locked for editing by admin | Do not send any requests. + +```json: Extra Fields +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Merchant activation form has been locked for editing by admin" + } +} +``` + +## 401 Unauthorized + +This error occurs when you use incorrect API keys while making the requests. + +Error Description | Solution +--- +The api secret provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + +```json: Invalid Key +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +```json: Invalid Secret +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api secret provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +## 500 Internal Server Error + +This error occurs when emojis are sent in the API request. + +Error Description | Solution +--- +We are facing some trouble completing your request at the moment. Please try again shortly. | Ensure that the API request does not have emojis and resend. + +```json: Server Error +{ + "error": { + "code": "SERVER_ERROR", + "description": "We are facing some trouble completing your request at the moment. Please try again shortly.", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` diff --git a/llm-content/api/partners/product-configuration-xpress-onboarding.md b/llm-content/api/partners/product-configuration-xpress-onboarding.md new file mode 100644 index 00000000..db98f23d --- /dev/null +++ b/llm-content/api/partners/product-configuration-xpress-onboarding.md @@ -0,0 +1,2355 @@ +--- +title: Product Configuration APIs +description: Use the Product Configuration APIs to enable sub-merchants request for a product. +--- + +# Product Configuration APIs + +You can use the Product Configuration APIs to configure and activate Razorpay products for a sub-merchant account according to their requirements. For example, if you need our Payment Gateway product for all sub-merchants or Payment Gateway for one sub-merchant and Payment Link product for another sub-merchant, you can do so using this API. + +You can create, fetch and update product configuration requests using these APIs. + +You can even accept terms and conditions for the requested product using these APIs. You can fetch the terms and conditions using the [Fetch Terms and Conditions API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/terms-conditions/fetch.md). + +> **INFO** +> +> +> **Handy Tips** +> +> - In the requirements section of Documents API, depending upon the requirement, you can classify it into two types: + +> - Optional document + +> field_reference: "proof_type.document_type" + +> Example: `business_proof_of_identification.business_pan_url` + +> This means as a sub-merchant you need to upload the `business_pan_url` document in order to get the optional requirement fulfilled. + +> - Selected optional document + +> field_reference : "proof_type" + +> Example: `individual_proof_of_address` + +> This means as a merchant you can upload from ONE of the following groups, that is submit [`aadhar_front` ,`aadhar_back`] or [`voter_id_front`, `voter_id_back`] or [`passport_front`, `passport_back`]. Once all the documents from any ONE of the groups are uploaded, the optional requirement gets fulfilled. +> - The products Payment Links and Payment Gateway have similar requirements. If a requirement is submitted through a product configuration for payment_gateway, the same will be applicable for other product configurations, such as payment_links, and vice versa. +> + +You can try out our APIs on the Razorpay Postman Public Workspace. + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-07bc4970-f967-4020-922f-8adb7ea407e8) + +## Product Configuration Entity + + +### Entity Parameters + +`id` +: `string` The unique identifier of a product generated by Razorpay for a sub-merchant account. This id is used to fetch or update a product. + +`product_name` +: `string` The product(s) to be configured. Possible values: + - `payment_gateway` + - `payment_links` + +`tnc` +: `object` It consists of the configuration for the accepted terms and conditions by the merchant for the requested product. If the terms and conditions are accepted by the user for the requested product, it would consist of following fields: + + `id` + : `string` The unique identifier representing the acceptance of terms and conditions for a product by a user. + + `accepted` + : `boolean` The flag that represents whether the terms and conditions are accepted by the user. + - `true`: Terms and conditions are accepted by user. + - `false`: Terms and conditions are not accepted by user. + + `accepted_at` + : `integer` The Unix timestamp at which the terms and conditions were accepted by the user for the requested product. + +`activation_status` +: `string` The status of the product activation. + - `requested` + - `needs_clarification` + - `under_review` + - `activated_kyc_pending` + - `activated` + - `suspended` + +`otp` +: `object` OTP specific details of the merchant. + + `contact_mobile` + : `string` The contact number for which the OTP details have been submitted. + +> **INFO** +> +> +> **Handy Tips** +> +> This number should be the same as the one provided during account creation. +> + + `external_reference_number` + : `string` Used to search the OTP verification logs on your (partner's) system in case of an enquiry. Ideally, this is a reference number that you use to track OTP verification. + + `otp_submission_timestamp` + : `string` The timestamp of OTP submission to user. + + `otp_verification_timestamp` + : `string` The timestamp of OTP verification by partner. + +`configuration` +: The following are the possible configurations: + + `payment_methods` + : `object` The payment methods configured, such as, netbanking, UPI, Wallet and EMI. + + `upi` + : `object` The UPI type payment method. + + `status` + : `string` The status of UPI payment method. + + `instrument` + : `array` The list of UPI instruments requested or enabled. + + `netbanking` + : `object` The netbanking type payment method. + + `status` + : `string` The status of the netbanking payment method. + + `instrument` + : `array` The netbanking instrument object. + + `type` + : `string` The type of netbanking payment method. Possible values: + + - Retail + + - Corporate + + `bank` + : `array` The list of netbanking banks requested or enabled. Refer the [Appendix](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#netbanking-bank-codes) page for netbanking bank codes. + + `wallet` + : `object` The Wallet type payment method. + + `status` + : `string` The status of the Wallet payment method. + + `instrument` + : `array` The list of Wallet instruments requested or enabled. + + `emi` + : `string` The EMI type payment method. + + `status` + : `string` The status of EMI payment method. + + `instrument` + : `array` The EMI instrument object. + + `type` + : `string` The type of EMI payment method. Possible values: + - `card_emi` + - `cardless_emi` + + `partner` + : `array` The list of EMI partners requested or enabled. Possible values: + - For `card_emi`: `debit` and `credit`. + - For `cardless_emi`: `zestmoney` and `earlysalary`. + + `paylater` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `paylater` payment method. + - `false`: Does not enable the `paylater` payment method. + + `instrument` + : `string` The Paylater service provider. Possible values are: + - `epaylater` + - `getsimpl` + + `payment_capture` + : `object` The payment capture settings object. + + `mode` + : `string` The mode through which payment capture is done. Possible values: + - `automatic`: Payments are auto-captured (default) + - `manual`: You have to manually capture payments using our Capture API or from the Partner's Dashboard. + + `automatic_expiry` + : `numeric` This denotes the time in minutes when the payment is in the authorized state. This is auto-captured. + + `manual_expiry` + : `numeric` This denotes the time in minutes until you can manually capture payments in the authorized state. + - Must be equal to or greater than the `automatic_expire_period` value. + - The default and the maximum value is 7200 minutes. + - The payments in the authorized state after the `manual_expiry_period` are auto-refunded. + + `settlements` + : `object` The Settlement settings object. + + `account_number` + : `string` The bank account number to which settlements are made. Account details can be found on the Dashboard. For example, 7878780080316316 + + `ifsc_code` + : `string` The IFSC associated with the bank account. For example, `RATN0VAAPIS`. + + `beneficiary_name` + : `string` The name of the beneficiary associated with the bank account. + +> **INFO** +> +> +> **Handy Tip** +> +> This API parameter is needed complete the KYC process. However, it is optional for this API. +> + + `refund` + : `object` This denotes the payment refund settings. + + `default_refund_speed` + : `string` Speed at which the refund is to be processed. Possible values are: + - normal: Indicates that the refund will be processed at the normal speed. By default, the refund will take 5-7 working days. + - optimum: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. That is: + - If the refund can be processed instantly, Razorpay will initiate the process irrespective of the payment method used to make the payment. + - If an instant refund is not made, Razorpay will initiate a refund that is processed at the normal speed. For example, payments made using debit cards, netbanking or unsupported credit cards. + + `checkout` + : `object` The checkout form of the payment capture. + + `theme_color` + : `string` The theme color for sub-merchant's checkout page + + `logo` + : `string` The logo of the sub-merchant's business on the checkout page. + + `flash_checkout` + : `boolean` The flagging options **Enable** or **Disable** for Razorpay's Flash Checkout to securely save the card details of your customers. + + `notifications` + : `object` This denotes the notifications settings. + + `email` + : `string` The email addresses that will receive notifications regarding payments, settlements, daily payment reports, webhooks, and so on. + + `whatsapp` + : `boolean` The WhatsApp notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. + + `sms` + : `boolean` The SMS notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. This attribute will be set to `false`. + +`requested_configuration` +: `object` The configuration of the product requested by the user that is yet to be set as active. + +`active_configuration` +: `object` The configuration of the product that has been set as active. + +`requirements` +: `object` The list of requirements to be enabled for this product or some of the configurations under this product. + + `field_reference` + : `string` The field which is in issue or missing. The JSON key path in resolution URL. + + `resolution_url` + : `string` The URL to address the requirement. The API endpoint to be used for updating missing fields or documents. + + `status` + : `string` The status of the requirement. + + `reason_code` + : `string` The reason code for showing in the requirement. Description will be sent only when reason code is "". Possible values are: + - `field_missing` + - `needs_clarification` + - `document_missing` + + `description` + : `string` This parameter is displayed when the reason_code is `needs_clarification`. + +`requested_at` +: `integer` The Unix timestamp at which the product configuration is requested. + + + +### Sample Entity + +```json: PG Sample Entity +{ + "requested_configuration": { + "payment_methods": [] + }, + "active_configuration": { + "payment_capture": { + "mode": "automatic", + "refund_speed": "normal", + "automatic_expiry_period": 7200 + }, + "settlements": { + "account_number": null, + "ifsc_code": null, + "beneficiary_name": null + }, + "checkout": { + "theme_color": "#FFFFFF", + "flash_checkout": true + }, + "refund": { + "default_refund_speed": "normal" + }, + "notifications": { + "whatsapp": false, + "sms": false, + "email": [ + "b963e252-1201-45b0-9c39-c53eceb0cfd6_load@gmail.com" + ] + }, + "payment_methods": { + "netbanking": { + "enabled": true, + "instrument": [ + { + "type": "retail", + "bank": [ + "hdfc", + "sbin", + "utib", + "icic", + "scbl", + "yesb" + ] + } + ] + }, + "wallet": { + "enabled": true, + "instrument": [ + "airtelmoney", + "jiomoney", + "olamoney", + "payzapp", + "mobikwik" + ] + }, + "upi": { + "enabled": true, + "instrument": [ + "upi" + ] + } + } + }, + "requirements": [ + { + "field_reference": "otp.contact_mobile", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "otp.external_reference_number", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "optional", + "reason_code": "field_missing" + }, + { + "field_reference": "otp.otp_submission_timestamp", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "optional", + "reason_code": "field_missing" + }, + { + "field_reference": "otp.otp_verification_timestamp", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "optional", + "reason_code": "field_missing" + }, + { + "field_reference": "name", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "kyc.pan", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.beneficiary_name", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.account_number", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.ifsc_code", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "individual_proof_of_address", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/stakeholders/{stakeholderId}/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "individual_proof_of_identification.personal_pan", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/stakeholders/{stakeholderId}/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "business_proof_of_identification.business_proof_url", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "customer_facing_business_name", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC", + "status": "optional", + "reason_code": "field_missing" + } + ], + "tnc": { + "id": "tnc_IgohZaDBHRGjPv", + "accepted": true, + "accepted_at": 1641550798 + }, + "id": "acc_prd_JnvWa1Ggyr1MN7", + "account_id": "acc_JnvU4bvDf8rmEC", + "product_name": "payment_gateway", + "activation_status": "needs_clarification", + "requested_at": 162547884 +} +```json: PL Sample Entity +{ + "requested_configuration": { + "payment_methods": [] + }, + "active_configuration": { + "payment_capture": { + "mode": "automatic", + "refund_speed": "normal", + "automatic_expiry_period": 7200 + }, + "settlements": { + "account_number": null, + "ifsc_code": null, + "beneficiary_name": null + }, + "checkout": { + "theme_color": "#FFFFFF", + "flash_checkout": true + }, + "refund": { + "default_refund_speed": "normal" + }, + "notifications": { + "whatsapp": false, + "sms": false, + "email": [ + "b963e252-1201-45b0-9c39-c53eceb0cfd6_load@gmail.com" + ] + }, + "payment_methods": { + "netbanking": { + "enabled": true, + "instrument": [ + { + "type": "retail", + "bank": [ + "hdfc", + "sbin", + "utib", + "icic", + "scbl", + "yesb" + ] + } + ] + }, + "wallet": { + "enabled": true, + "instrument": [ + "airtelmoney", + "jiomoney", + "olamoney", + "payzapp", + "mobikwik" + ] + }, + "upi": { + "enabled": true, + "instrument": [ + "upi" + ] + } + } + }, + "requirements": [ + { + "field_reference": "otp.contact_mobile", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "otp.external_reference_number", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "optional", + "reason_code": "field_missing" + }, + { + "field_reference": "otp.otp_submission_timestamp", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "optional", + "reason_code": "field_missing" + }, + { + "field_reference": "otp.otp_verification_timestamp", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "optional", + "reason_code": "field_missing" + }, + { + "field_reference": "name", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "kyc.pan", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.beneficiary_name", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.account_number", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.ifsc_code", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "individual_proof_of_address", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/stakeholders/{stakeholderId}/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "individual_proof_of_identification.personal_pan", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/stakeholders/{stakeholderId}/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "business_proof_of_identification.business_proof_url", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "customer_facing_business_name", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC", + "status": "optional", + "reason_code": "field_missing" + } + ], + "tnc": { + "id": "tnc_IgohZaDBHRGjPv", + "accepted": true, + "accepted_at": 1641550798 + }, + "id": "acc_prd_JnvWa1Ggyr1MN7", + "account_id": "acc_JnvU4bvDf8rmEC", + "product_name": "payment_links", + "activation_status": "needs_clarification", + "requested_at": 162547884 +} +``` + + + +## Request a Product Configuration + +You can even accept terms and conditions for the requested product using these APIs. + +> **INFO** +> +> +> **Handy Tips** +> +> As a partner, you can fetch the Razorpay terms and conditions using the [Fetch Terms and Conditions API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/terms-conditions/fetch.md). +> + +Use the following API endpoint to request for a product configuration: + +/accounts/:account_id/products + +```Curl: PG Request +curl -u : \ +-X POST https://api.razorpay.com/v2/accounts/acc_JnvU4bvDf8rmEC/products \ +-H "Content-Type: application/json" \ +-d '{ + "product_name": "payment_gateway", + "tnc_accepted": true, + "ip": "233.233.233.234" +}' +```json: PG Response +{ + "requested_configuration": { + "payment_methods": [] + }, + "active_configuration": { + "payment_capture": { + "mode": "automatic", + "refund_speed": "normal", + "automatic_expiry_period": 7200 + }, + "settlements": { + "account_number": null, + "ifsc_code": null, + "beneficiary_name": null + }, + "checkout": { + "theme_color": "#FFFFFF", + "flash_checkout": true + }, + "refund": { + "default_refund_speed": "normal" + }, + "notifications": { + "whatsapp": false, + "sms": false, + "email": [ + "b963e252-1201-45b0-9c39-c53eceb0cfd6_load@gmail.com" + ] + }, + "payment_methods": { + "netbanking": { + "enabled": true, + "instrument": [ + { + "type": "retail", + "bank": [ + "hdfc", + "sbin", + "utib", + "icic", + "scbl", + "yesb" + ] + } + ] + }, + "wallet": { + "enabled": true, + "instrument": [ + "airtelmoney", + "jiomoney", + "olamoney", + "payzapp", + "mobikwik" + ] + }, + "upi": { + "enabled": true, + "instrument": [ + "upi" + ] + } + } + }, + "requirements": [ + { + "field_reference": "otp.contact_mobile", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "otp.external_reference_number", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "optional", + "reason_code": "field_missing" + }, + { + "field_reference": "otp.otp_submission_timestamp", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "optional", + "reason_code": "field_missing" + }, + { + "field_reference": "otp.otp_verification_timestamp", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "optional", + "reason_code": "field_missing" + }, + { + "field_reference": "name", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "kyc.pan", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.beneficiary_name", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.account_number", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.ifsc_code", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "individual_proof_of_address", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/stakeholders/{stakeholderId}/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "individual_proof_of_identification.personal_pan", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/stakeholders/{stakeholderId}/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "business_proof_of_identification.business_proof_url", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "customer_facing_business_name", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC", + "status": "optional", + "reason_code": "field_missing" + } + ], + "tnc": { + "id": "tnc_IgohZaDBHRGjPv", + "accepted": true, + "accepted_at": 1641550798 + }, + "id": "acc_prd_JnvWa1Ggyr1MN7", + "account_id": "acc_JnvU4bvDf8rmEC", + "product_name": "payment_gateway", + "activation_status": "needs_clarification", + "requested_at": 162547884 +} +```Curl: PL Request +curl -u : \ +-X POST https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products \ +-H "Content-Type: application/json" \ +-d '{ + "product_name": "payment_links", + "tnc_accepted": true, + "ip": "233.233.233.234" +}' +```json: PL Response +{ + "requested_configuration": { + "payment_methods": [] + }, + "active_configuration": { + "payment_capture": { + "mode": "automatic", + "refund_speed": "normal", + "automatic_expiry_period": 7200 + }, + "settlements": { + "account_number": null, + "ifsc_code": null, + "beneficiary_name": null + }, + "checkout": { + "theme_color": "#FFFFFF", + "flash_checkout": true + }, + "refund": { + "default_refund_speed": "normal" + }, + "notifications": { + "whatsapp": false, + "sms": false, + "email": [ + "b963e252-1201-45b0-9c39-c53eceb0cfd6_load@gmail.com" + ] + }, + "payment_methods": { + "netbanking": { + "enabled": true, + "instrument": [ + { + "type": "retail", + "bank": [ + "hdfc", + "sbin", + "utib", + "icic", + "scbl", + "yesb" + ] + } + ] + }, + "wallet": { + "enabled": true, + "instrument": [ + "airtelmoney", + "jiomoney", + "olamoney", + "payzapp", + "mobikwik" + ] + }, + "upi": { + "enabled": true, + "instrument": [ + "upi" + ] + } + } + }, + "requirements": [ + { + "field_reference": "otp.contact_mobile", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "otp.external_reference_number", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "optional", + "reason_code": "field_missing" + }, + { + "field_reference": "otp.otp_submission_timestamp", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "optional", + "reason_code": "field_missing" + }, + { + "field_reference": "otp.otp_verification_timestamp", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "optional", + "reason_code": "field_missing" + }, + { + "field_reference": "name", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "kyc.pan", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.beneficiary_name", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.account_number", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.ifsc_code", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/products/acc_prd_JnvWa1Ggyr1MN7", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "individual_proof_of_address", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/stakeholders/{stakeholderId}/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "individual_proof_of_identification.personal_pan", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/stakeholders/{stakeholderId}/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "business_proof_of_identification.business_proof_url", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "customer_facing_business_name", + "resolution_url": "/accounts/acc_JnvU4bvDf8rmEC", + "status": "optional", + "reason_code": "field_missing" + } + ], + "tnc": { + "id": "tnc_IgohZaDBHRGjPv", + "accepted": true, + "accepted_at": 1641550798 + }, + "id": "acc_prd_JnvWa1Ggyr1MN7", + "account_id": "acc_JnvU4bvDf8rmEC", + "product_name": "payment_links", + "activation_status": "needs_clarification", + "requested_at": 162547884 +} +``` + + +### Path Parameter + +`account_id` +: `string` The unique identifier of the sub-merchant account generated by Razorpay. For example, `acc_HQVlm3bnPmccC0`. This id is used to fetch or update a product. The product is created for this sub-merchant account id. + + + +### Request Parameters + +`product_name` _mandatory_ +: `string` The product(s) to be configured. Possible values: + - `payment_gateway` + - `payment_links` + +`tnc_accepted` _optional_ +: `boolean` Pass this parameter to accept terms and conditions. Send this parameter along with the `ip` parameter when the `tnc` is accepted. Possible value is `true` which indicates acceptance of terms and conditions. + +`ip` _optional_ +: `string` The IP address of the merchant while accepting the terms and conditions. Send this parameter along with the `tnc_accepted` parameter when the `tnc` is accepted. + + + +### Response Parameters + +`requested_configuration` +: `object` The configuration of the product requested by the user that is yet to be set as active. + +`tnc` +: `object` It consists of the configuration for the accepted terms and conditions by the merchant for the requested product. If the terms and conditions are accepted by the user for the requested product, it would consist of following fields: + + `id` + : `string` The unique identifier representing the acceptance of terms and conditions for a product by a user. + + `accepted` + : `boolean` The flag that represents whether the terms and conditions were accepted by the user. + - `true`: Terms and conditions are accepted by user. + - `false`: Terms and conditions are not accepted by user. + + `accepted_at` + : `integer` The Unix timestamp at which the terms and conditions were accepted by the user for the requested product. + +`active_configuration` +: `object` The configuration of the product that has been set as active. + + `payment_capture` + : `object` The Payment Capture Settings Object + + `mode` + : `string` The mode through which payment capture is done. Possible values: + - `automatic`: Payments are auto-captured (default) + - `manual`: You have to manually capture payments using our Capture API or from the Partner's Dashboard. + + `automatic_expiry` + : `numeric` This denotes the time in minutes when the payment is in the authorized state. This is auto-captured. + + `manual_expiry` + : `numeric` This denotes the time in minutes until you can manually capture payments in the authorized state. + - Must be equal to or greater than the `automatic_expire_period` value. + - The default and the maximum value is 7200 minutes. + - The payments in the authorized state after the `manual_expiry_period` are auto-refunded. + + `settlements` + : `object` The Settlement settings object. + `account_number` + : `string` The bank account number to which settlements are made. Account details can be found on the Dashboard. For example, 7878780080316316 + + `ifsc_code` + : `string` The IFSC associated with the bank account. For example, `RATN0VAAPIS`. + + `beneficiary_name` + : `string` The name of the beneficiary associated with the bank account. + + `checkout` + : `object` The checkout form of the payment capture. + + `theme_color` + : `string` The theme color for sub-merchant's checkout page. + + `logo` + : `string` The logo of the sub-merchant's business on the checkout page. + + `flash_checkout` + : `boolean` The flagging options **Enable** or **Disable** for Razorpay's Flash Checkout to securely save the card details of your customers. + + `refund` + : `object` This denotes the payment refund settings. + + `default_refund_speed` + : `string` Speed at which the refund is to be processed. Possible values are: + - normal: Indicates that the refund will be processed via the normal speed. By default, the refund will take 5-7 working days. + - optimum: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. That is: + - If the refund can be processed instantly, Razorpay will initiate the process irrespective of the payment method used to make the payment. + - If an instant refund is not made, Razorpay will initiate a refund that is processed at the normal speed. For example, payments made using debit cards, netbanking or unsupported credit cards. + + `notifications` + : `object` This denotes the notifications settings. + + `email` + : `string` The email addresses that will receive notifications regarding payments, settlements, daily payment reports, webhooks, and so on. + + `whatsapp` + : `boolean` The WhatsApp notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. + + `sms` + : `boolean` The SMS notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. This attribute will be set to `false`. + + `payment_methods` _optional_ + : `object` Details of the payment method you want to enable for the product. + + `netbanking` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `netbanking` payment method. + - `false`: Does not enable the `netbanking` payment method. + + `instrument` + : `object` Details regarding the bank. Possible value: + + `type` + : `string` The type of bank. Possible values are `retail` and `corporate`. + + `bank` + : `string` The bank code. Refer to the [list of bank codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#netbanking-bank-codes). + + `card` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `card` payment method. + - `false`: Does not enable the `card` payment method. + + `instrument` + : `object` Details regarding the card. Possible value: + + `type` + : `string` Possible value is `domestic`. + + `issuer` + : `string` The card issuer. Possible values for issuer are: + - `amex` + - `dicl` + - `maestro` + - `mastercard` + - `rupay` + - `visa` + + `wallet` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `wallet` payment method. + - `false`: Does not enable the `wallet` payment method. + + `instrument` + : `string` The wallet issuer. Possible values are: + - `airtelmoney` + - `amazonpay` + - `jiomoney` + - `mobiwik` + - `mpesa` + - `olamoney` + - `paytm` + - `payzapp` + - `payumoney` + - `phonepe` + - `phonepeswitch` + - `sbibuddy` + + `upi` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `upi` payment method. + - `false`: Does not enable the `upi` payment method. + + `instrument` + : `string` The UPI service provider. Possible values are: + - `google_pay` + - `upi` + + `paylater` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `paylater` payment method. + - `false`: Does not enable the `paylater` payment method. + + `instrument` + : `string` The Paylater service provider. Possible values are: + - `epaylater` + - `getsimpl` + + `emi` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `paylater` payment method. + - `false`: Does not enable the `paylater` payment method. + + `instrument` + : `object` The EMI instrument object. + + `type` + : `string` The type of EMI payment method. Possible values: + - `card_emi` + - `cardless_emi` + + `partner` + : `string` The list of EMI partners requested or enabled. Possible values: + - For `card_emi`: `debit` and `credit`. + - For `cardless_emi`: `zestmoney` and `earlysalary`. + +`requirements` +: `object` The list of requirements to be enabled for this product or some of the configurations under this product. + + `field_reference` + : `string` The field which is in issue or missing. The JSON key path in resolution URL. + + `resolution_url` + : `string` The URL to address the requirement. The API endpoint to be used for updating missing fields or documents. + + `status` + : `string` The status of the requirement. Possible values are: + - `optional` + - `required` + + `reason_code` + : `string` The reason code for showing in the requirement. Possible values are: + - `field_missing` + - `needs_clarification` + - `document_missing` + +`id` +: `string` The unique identifier of the sub-merchant product account generated by Razorpay. For example, `acc_prd_HEgNpywUFctQ9e`. The product is created for this sub-merchant account id. + +`account_id` +: `string` The unique identifier of the sub-merchant generated by Razorpay. For example, `acc_HQVlm3bnPmccC0`. + +`product_name` +: `string` The product(s) to be configured. Possible values: + - `payment_gateway` + - `payment_links` + +`activation_status` +: `string` The status of the product activation. + - `requested` + - `needs_clarification` + - `under_review` + - `activated_kyc_pending` + - `activated` + - `suspended` + +`requested_at` +: `integer` The Unix timestamp at which the product configuration has been requested. + + + +### Error Response Parameters + + Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + + +## Update a Product Configuration + +Use the following endpoint to update a product's configuration: + +/accounts/:account_id/products/:product_id + +> **WARN** +> +> +> **Watch Out!** +> +> Currently, we do not support making concurrent requests to the following Onboarding APIs including their combination on the same `account_id`: +> - [Update Account API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/update.md) +> - [Update Product Configuration API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/update-settlement-account-details.md) +> - [Update Stakeholder API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/update.md) +> Please wait for the response of these APIs before making subsequent requests. +> + + +### Use Cases + + You can update the following details for Payment Gateway and Payment Links using the Update a Product Configuration API. However, whether the details can be updated or not depends upon the [**product activation status**](#product-activation-status). + + - OTP specific details: You can share OTP-specific details using the `otp` object. + + - Settlement Bank Account Details: You can update the `settlement` object with the new bank account details based on the product activation status. + + - Request Additional Payment Methods: You can request various payment methods and related instruments to be enabled using the `payment_methods` object. However, you can request for only one payment method at a time. For example, if you want to enable HDFC Netbanking and Rupay Domestic Card payment methods, you should send two separate API requests. You cannot send a consolidated request using this API. + + - Update Notifications Settings: You can update the email, WhatsApp and SMS settings using the `notifications` object. + + - Configure Checkout Features: You can change the checkout theme colour, add a logo and enable the saving of customer card details using the `checkout` object. + + - Configure Refund Speed: You can configure the default refund speed using the `refund` object. + + - Accept of Terms and Conditions: You can accept Razorpay terms and conditions. + + + +### Product Activation Status and Updates Permitted + +Activation Status | Update Permitted +--- +`requested` | You can update the details for all the fields. +--- +`needs_clarification` | The fields you can update depend on the reason_code mentioned in the requirements object in the [Request a Product Activation API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/request.md): - **document_missing** or **field_missing**: You can update all the fields. +- **needs_clarification**: You can update only the specific field for which Razorpay is seeking clarification for. + +--- +`under_review` | You cannot update any field. +--- +`activated_kyc_pending` | You cannot update any field. +--- +`activated` | You cannot use this API to update any fields as your account is already active. + + + +### Update Settlement Account and Providing OTP Details + +The settlement account details and OTP-specific details are provided in the sample code given below. Payment methods object is not used here. +```Curl: PG +curl -u : \ +-X PATCH https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e/ \ +-d '{ + "otp": { + "external_reference_number": "123ABCD", + "contact_mobile": "9820202020", + "otp_submission_timestamp": "3632201810011343123", + "otp_verification_timestamp": "3632201810011354123" + }, + "notifications": { + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + }, + "checkout": { + "theme_color": "#528FFF" + }, + "refund": { + "default_refund_speed": "optimum" + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "tnc_accepted": true, + "ip": "233.233.233.234" +}' + +```json: Response +{ + "requested_configuration": [], + "active_configuration": { + "otp": { + "external_reference_number": "123ABCD", + "contact_mobile": "9820202020", + "otp_submission_timestamp": "3632201810011343123", + "otp_verification_timestamp": "3632201810011354123" + }, + "payment_capture": { + "mode": "automatic", + "refund_speed": "normal", + "automatic_expiry_period": 7200 + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "checkout": { + "theme_color": "#528FFF", + "flash_checkout": true + }, + "refund": { + "default_refund_speed": "optimum" + }, + "notifications": { + "whatsapp": true, + "sms": false, + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + } + }, + "requirements": [ + { + "field_reference": "name", + "resolution_url": "/accounts/acc_Jo1v32EQBvySEd/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "kyc.pan", + "resolution_url": "/accounts/acc_Jo1v32EQBvySEd/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "individual_proof_of_address", + "resolution_url": "/accounts/acc_Jo1v32EQBvySEd/stakeholders/{stakeholderId}/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "individual_proof_of_identification.personal_pan", + "resolution_url": "/accounts/acc_Jo1v32EQBvySEd/stakeholders/{stakeholderId}/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "business_proof_of_identification.business_proof_url", + "resolution_url": "/accounts/acc_Jo1v32EQBvySEd/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "customer_facing_business_name", + "resolution_url": "/accounts/acc_Jo1v32EQBvySEd", + "status": "optional", + "reason_code": "field_missing" + } + ], + "tnc": { + "id": "tnc_IgohZaDBHRGjPv", + "accepted": true, + "accepted_at": 1641550798 + }, + "id": "acc_prd_HEgNpywUFctQ9e", + "account_id": "acc_Jo1v32EQBvySEd", + "product_name": "payment_gateway", + "activation_status": "needs_clarification", + "requested_at": 1625478849 +} + +```Curl: PL +curl -u : \ +-X PATCH https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9f/ \ +-d '{ + "otp": { + "external_reference_number": "123ABCD", + "contact_mobile": "9820202020", + "otp_submission_timestamp": "3632201810011343123", + "otp_verification_timestamp": "3632201810011354123" + }, + "notifications": { + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + }, + "checkout": { + "theme_color": "#528FFF" + }, + "refund": { + "default_refund_speed": "optimum" + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "tnc_accepted": true, + "ip": "233.233.233.234" +}' + +```json: Response +{ + "requested_configuration": [], + "active_configuration": { + "otp": { + "external_reference_number": "123ABCD", + "contact_mobile": "9820202020", + "otp_submission_timestamp": "3632201810011343123", + "otp_verification_timestamp": "3632201810011354123" + }, + "payment_capture": { + "mode": "automatic", + "refund_speed": "normal", + "automatic_expiry_period": 7200 + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "checkout": { + "theme_color": "#528FFF", + "flash_checkout": true + }, + "refund": { + "default_refund_speed": "optimum" + }, + "notifications": { + "whatsapp": true, + "sms": false, + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + } + }, + "requirements": [ + { + "field_reference": "name", + "resolution_url": "/accounts/acc_Jo1v32EQBvySEd/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "kyc.pan", + "resolution_url": "/accounts/acc_Jo1v32EQBvySEd/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "individual_proof_of_address", + "resolution_url": "/accounts/acc_Jo1v32EQBvySEd/stakeholders/{stakeholderId}/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "individual_proof_of_identification.personal_pan", + "resolution_url": "/accounts/acc_Jo1v32EQBvySEd/stakeholders/{stakeholderId}/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "business_proof_of_identification.business_proof_url", + "resolution_url": "/accounts/acc_Jo1v32EQBvySEd/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "customer_facing_business_name", + "resolution_url": "/accounts/acc_Jo1v32EQBvySEd", + "status": "optional", + "reason_code": "field_missing" + } + ], + "tnc": { + "id": "tnc_IgohZaDBHRGjPv", + "accepted": true, + "accepted_at": 1641550798 + }, + "id": "acc_prd_HEgNpywUFctQ9e", + "account_id": "acc_Jo1v32EQBvySEd", + "product_name": "payment_links", + "activation_status": "needs_clarification", + "requested_at": 1625478849 +} +``` + +### Request Payment Methods + +Given below is the Payment Gateway product sample code when you request for a specific payment method. Here the `payment_method` object is used. + +> **WARN** +> +> +> **Watch Out!** +> +> You can send request for only *one payment method at a time*. For example, if you want to enable HDFC Netbanking and Rupay Domestic Card payment methods, you should send two separate API requests. You cannot send a consolidated request using this API. +> + +```Curl: Netbanking +curl -u : \ +-X PATCH https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e/ \ +-d '{ + "notifications": { + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + }, + "checkout": { + "theme_color": "#528FFF" + }, + "refund": { + "default_refund_speed": "optimum" + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "payment_methods": { + "netbanking": { + "enabled": true, + "instrument": { + "type": "retail", + "bank": "utib" + } + } + } +}' + +```json: Response +{ + "requested_configuration": { + "payment_methods": { + "netbanking": { + "enabled": true, + "instrument": [ + { + "type": "retail", + "bank": [ + "utib" + ] + } + ] + } + } + }, +// already activated payment methods + "active_configuration": { + "payment_methods": { + "netbanking": { + "enabled": true, + "instrument": [ + { + "type": "retail", + "bank": [ + "hdfc", + "sbin" + ] + } + ] + }, + "cards": { + "enabled": true, + "instrument": [ + { + "issuer": "rupay", + "type": [ + "domestic" + ] + } + ] + }, + "wallet": { + "enabled": true, + "instrument": [ + "airtelmoney" + ] + } + } + } +} + +```curl: Card +curl -u : \ +-X PATCH https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e/ \ +-d'{ + "notifications": { + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + }, + "checkout": { + "theme_color": "#528FFF" + }, + "refund": { + "default_refund_speed": "optimum" + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "payment_methods": { + "cards": { + "enabled": true, + "instrument": { + "issuer": "rupay", + "type": "domestic" + } + } + } +}' + +```json: Response +{ + "requested_configuration": { + "payment_methods": { + "cards": { + "enabled": true, + "instrument": [ + { + "issuer": "rupay", + "type": [ + "domestic" + ] + } + ] + } + } + }, + // already activated payment methods + "active_configuration": { + "payment_methods": { + "netbanking": { + "enabled": true, + "instrument": [ + { + "type": "retail", + "bank": [ + "hdfc", + "sbin" + ] + } + ] + }, + "wallet": { + "enabled": true, + "instrument": [ + "airtelmoney" + ] + } + } + } +} + +```curl: Wallet +curl -u : \ +-X PATCH https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e/ \ +-d'{ + "notifications": { + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + }, + "checkout": { + "theme_color": "#528FFF" + }, + "refund": { + "default_refund_speed": "optimum" + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "payment_methods": { + "wallet": { + "enabled": true, + "instrument": "airtelmoney" + } + } +}' + +```json: Response +{ + "requested_configuration": { + "payment_methods": { + "wallet": { + "enabled": true, + "instrument": [ + "airtelmoney" + ] + } + } + }, + // already activated payment methods + "active_configuration": { + "payment_methods": { + "netbanking": { + "enabled": true, + "instrument": [ + { + "type": "retail", + "bank": [ + "hdfc", + "sbin" + ] + } + ] + } + } + } +} + +```curl: UPI +curl -u : \ +-X PATCH https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e/ \ +-d'{ + "notifications": { + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + }, + "checkout": { + "theme_color": "#528FFF" + }, + "refund": { + "default_refund_speed": "optimum" + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "payment_methods": { + "upi": { + "enabled": true, + "instrument": "upi" + } + } +}' + +```json: Response +{ + "requested_configuration": { + "payment_methods": { + "upi": { + "enabled": true, + "instrument": [ + "upi" + ] + } + } + }, + // already activated payment methods + "active_configuration": { + "payment_methods": { + "netbanking": { + "enabled": true, + "instrument": [ + { + "type": "retail", + "bank": [ + "hdfc", + "sbin" + ] + } + ] + }, + "wallet": { + "enabled": true, + "instrument": [ + "airtelmoney" + ] + } + } + } +} + +```curl: Paylater +curl -u : \ +-X PATCH https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e/ \ +-d'{ + "notifications": { + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + }, + "checkout": { + "theme_color": "#528FFF" + }, + "refund": { + "default_refund_speed": "optimum" + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "payment_methods": { + "paylater": { + "enabled": true, + "instrument": "epaylater" + } + } +}' + +```json: Response +{ + "requested_configuration": { + "payment_methods": { + "paylater": { + "enabled": true, + "instrument": [ + "epaylater" + ] + } + } + }, + // already activated payment methods + "active_configuration": { + "payment_methods": { + "netbanking": { + "enabled": true, + "instrument": [ + { + "type": "retail", + "bank": [ + "hdfc", + "sbin" + ] + } + ] + }, + "wallet": { + "enabled": true, + "instrument": [ + "airtelmoney" + ] + } + } + } +} + +```curl: EMI +curl -u : \ +-X PATCH https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e/ \ +-d'{ + "notifications": { + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + }, + "checkout": { + "theme_color": "#528FFF" + }, + "refund": { + "default_refund_speed": "optimum" + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "payment_methods": { + "emi": { + "enabled": true, + "instrument": { + "type": "cardless_emi", + "partner": "zestmoney" + } + } + } +}' + +```json: Response +{ + "requested_configuration": { + "payment_methods": { + "emi": { + "enabled": true, + "instrument": { + "type": "cardless_emi", + "partner": "zestmoney" + } + } + } + }, + // already activated payment methods + "active_configuration": { + "payment_methods": { + "netbanking": { + "enabled": true, + "instrument": [ + { + "type": "retail", + "bank": [ + "hdfc", + "sbin" + ] + } + ] + }, + "wallet": { + "enabled": true, + "instrument": [ + "airtelmoney" + ] + } + } + } +} +``` + + +### Path Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay. For example, `acc_HQVlm3bnPmccC0`. + +`id` _mandatory_ +: `string` The unique identifier of a product generated by Razorpay. For example, `acc_prd_HEgNpywUFctQ9e`. + + + +### Request Parameters + +`otp` _conditional_ +: `object` OTP specific details of the merchant. + + `contact_mobile` _mandatory_ + : `string` The contact number for which the OTP details have been submitted. + +> **INFO** +> +> +> **Handy Tips** +> +> This number should be the same as the one provided during account creation. +> + + `external_reference_number` _optional_ + : `string` Used to search the OTP verification logs on your (partner's) system in case of an enquiry. Ideally, this is a reference number that you use to track OTP verification. + + `otp_submission_timestamp` _optional_ + : `string` The timestamp of OTP submission to user. + + `otp_verification_timestamp` _optional_ + : `string` The timestamp of OTP verification by partner. + +`notifications` _optional_ +: `object` This denotes the notifications settings. + + `email` + : `string` The email addresses that will receive notifications regarding payments, settlements, daily payment reports, webhooks, and so on. + + `whatsapp` + : `boolean` The WhatsApp notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. + + `sms` + : `boolean` The SMS notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. This attribute will be set to `false`. + +`checkout` _optional_ +: `object` The checkout form of the payment capture. + + `theme_color` + : `string` The theme color for sub-merchant's checkout page + + `logo` + : `string` The logo of the sub-merchant's business on the checkout page. + + `flash_checkout` + : `boolean` The flagging options **Enable** or **Disable** for Razorpay's Flash Checkout to securely save the card details of your customers. + +`refund` _optional_ +: `object` This denotes the payment refund settings. + + `default_refund_speed` + : `string` Speed at which the refund is to be processed. Possible values are: + - normal: Indicates that the refund will be processed at normal speed. By default, the refund will take 5-7 working days. + - optimum: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. That is: + - If the refund can be processed instantly, Razorpay will initiate the process irrespective of the payment method used to make the payment. + - If an instant refund is not made, Razorpay will initiate a refund that is processed at the normal speed. For example, payments made using debit cards, netbanking or unsupported credit cards. + +`settlements` _conditional_ +: `object` The Settlement settings object. + + `account_number` + : `string` The bank account number to which settlements are made. Account details can be found on the Dashboard. For example, 7878780080316316 + + `ifsc_code` + : `string` The IFSC associated with the bank account. For example, `RATN0VAAPIS`. + + `beneficiary_name` + : `string` The name of the beneficiary associated with the bank account. + +`tnc_accepted` _optional_ +: `boolean` Pass this parameter to accept terms and conditions. Send this parameter along with the `ip` parameter when the `tnc` is accepted. Possible value is `true` which indicates acceptance of terms and conditions. + +`ip` _optional_ +: `string` The IP address of the merchant while accepting the terms and conditions. Send this parameter along with the `tnc_accepted` parameter when the `tnc` is accepted. + +`payment_methods` _optional_ +: `object` Details of the payment method you want to enable for the product. + + `netbanking` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `netbanking` payment method. + - `false`: Does not enable the `netbanking` payment method. + + `instrument` + : `object` Details regarding the bank. Possible value: + + `type` + : `string` The type of bank. Possible values are `retail` and `corporate`. + + `bank` + : `string` The bank code. Refer to the [list of bank codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#netbanking-bank-codes). + + `card` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `card` payment method. + - `false`: Does not enable the `card` payment method. + + `instrument` + : `object` Details regarding the card. Possible value: + + `type` + : `string` Possible value is `domestic`. + + `issuer` + : `string` The card issuer. Possible values for issuer are: + - `amex` + - `dicl` + - `maestro` + - `mastercard` + - `rupay` + - `visa` + + `wallet` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `wallet` payment method. + - `false`: Does not enable the `wallet` payment method. + + `instrument` + : `string` The wallet issuer. Possible values are: + - `airtelmoney` + - `amazonpay` + - `jiomoney` + - `mobiwik` + - `mpesa` + - `olamoney` + - `paytm` + - `payzapp` + - `payumoney` + - `phonepe` + - `phonepeswitch` + - `sbibuddy` + + `upi` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `upi` payment method. + - `false`: Does not enable the `upi` payment method. + + `instrument` + : `string` The UPI service provider. Possible values are: + - `google_pay` + - `upi` + + `paylater` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `paylater` payment method. + - `false`: Does not enable the `paylater` payment method. + + `instrument` + : `string` The Paylater service provider. Possible values are: + - `epaylater` + - `getsimpl` + + `emi` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `paylater` payment method. + - `false`: Does not enable the `paylater` payment method. + + `instrument` + : `object` The EMI instrument object. + + `type` + : `string` The type of EMI payment method. Possible values: + - `card_emi` + - `cardless_emi` + + `partner` + : `string` The list of EMI partners requested or enabled. Possible values: + - For `card_emi`: `debit` and `credit`. + - For `cardless_emi`: `zestmoney` and `earlysalary`. + + + +### Error Response Parameters + + Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + + +## Fetch a Product Configuration + +Use the following endpoint to retrieve the details of a product for a given sub-merchant's account: + +/accounts/:account_id/products/:product_id + +```Curl: PG Request +curl -u : \ +- X GET https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e/ \ +```json: PG Response +{ + "requested_configuration": [], + "active_configuration": { + "otp": { + "external_reference_number": "123ABCD", + "contact_mobile": "9820202020", + "otp_submission_timestamp": "3632201810011343123", + "otp_verification_timestamp": "3632201810011354123" + }, + "payment_capture": { + "mode": "automatic", + "refund_speed": "normal", + "automatic_expiry_period": 7200 + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "checkout": { + "theme_color": "#528FFF", + "flash_checkout": true + }, + "refund": { + "default_refund_speed": "optimum" + }, + "notifications": { + "whatsapp": false, + "sms": false, + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + } + }, + "requirements": [ + { + "field_reference": "name", + "resolution_url": "/accounts/acc_JpAjoRj0urWjA9/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "kyc.pan", + "resolution_url": "/accounts/acc_JpAjoRj0urWjA9/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "individual_proof_of_address", + "resolution_url": "/accounts/acc_JpAjoRj0urWjA9/stakeholders/{stakeholderId}/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "individual_proof_of_identification.personal_pan", + "resolution_url": "/accounts/acc_JpAjoRj0urWjA9/stakeholders/{stakeholderId}/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "business_proof_of_identification.business_proof_url", + "resolution_url": "/accounts/acc_JpAjoRj0urWjA9/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "customer_facing_business_name", + "resolution_url": "/accounts/acc_JpAjoRj0urWjA9", + "status": "optional", + "reason_code": "field_missing" + } + ], + "tnc": { + "id": "tnc_JpAkSSpke9hRIl", + "accepted": true, + "accepted_at": 1656912244 + }, + "id": "acc_prd_JpAkSWjRpNrCWN", + "product_name": "payment_gateway", + "activation_status": "needs_clarification", + "account_id": "acc_JpAjoRj0urWjA9", + "requested_at": 1656912246 +} +```Curl: PL Request +curl -u : \ +- X GET https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9f/ \ +```json: PL Response +{ + "requested_configuration": [], + "active_configuration": { + "otp": { + "external_reference_number": "123ABCD", + "contact_mobile": "9820202020", + "otp_submission_timestamp": "3632201810011343123", + "otp_verification_timestamp": "3632201810011354123" + }, + "payment_capture": { + "mode": "automatic", + "refund_speed": "normal", + "automatic_expiry_period": 7200 + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "checkout": { + "theme_color": "#528FFF", + "flash_checkout": true + }, + "refund": { + "default_refund_speed": "optimum" + }, + "notifications": { + "whatsapp": false, + "sms": false, + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + } + }, + "requirements": [ + { + "field_reference": "name", + "resolution_url": "/accounts/acc_JpAjoRj0urWjA9/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "kyc.pan", + "resolution_url": "/accounts/acc_JpAjoRj0urWjA9/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "individual_proof_of_address", + "resolution_url": "/accounts/acc_JpAjoRj0urWjA9/stakeholders/{stakeholderId}/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "individual_proof_of_identification.personal_pan", + "resolution_url": "/accounts/acc_JpAjoRj0urWjA9/stakeholders/{stakeholderId}/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "business_proof_of_identification.business_proof_url", + "resolution_url": "/accounts/acc_JpAjoRj0urWjA9/documents", + "status": "optional", + "reason_code": "document_missing" + }, + { + "field_reference": "customer_facing_business_name", + "resolution_url": "/accounts/acc_JpAjoRj0urWjA9", + "status": "optional", + "reason_code": "field_missing" + } + ], + "tnc": { + "id": "tnc_JpAkSSpke9hRIl", + "accepted": true, + "accepted_at": 1656912244 + }, + "id": "acc_prd_JpAkSWjRpNrCWN", + "product_name": "payment_links", + "activation_status": "needs_clarification", + "account_id": "acc_JpAjoRj0urWjA9", + "requested_at": 1656912246 +} +``` + + +### Path Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay. For example, `acc_HQVlm3bnPmccC0`. + +`id` _mandatory_ +: `string` The unique identifier of a product generated by Razorpay. For example, `acc_prd_HEgNpywUFctQ9e`. + + + +### Error Response Parameters + + Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + + +### Related Information + +- [Xpress Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/xpress-onboarding.md) diff --git a/llm-content/api/partners/product-configuration.md b/llm-content/api/partners/product-configuration.md new file mode 100644 index 00000000..455aa5ff --- /dev/null +++ b/llm-content/api/partners/product-configuration.md @@ -0,0 +1,39 @@ +--- +title: Product Configuration APIs +description: Use the Product Configuration APIs to enable sub-merchants request for a product. +--- + +# Product Configuration APIs + +You can use the Product Configuration APIs to configure and activate Razorpay products for a sub-merchant account according to their requirements. For example, if you need our Payment Gateway product for all sub-merchants or Payment Gateway for one sub-merchant and Payment Link product for another sub-merchant, you can do so using this API. + +You can even accept terms and conditions for the requested product using these APIs. You can fetch the terms and conditions using the [Fetch Terms and Conditions API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/terms-conditions/fetch.md). + +The products Payment Links and Payment Gateway have similar requirements. If a requirement is submitted through a product configuration for `payment_gateway`, the same will be applicable for `payment_links`, and vice versa. + +Fork the Razorpay Postman Public Workspace and try the Product Configuration APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md#api-authentication). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-07bc4970-f967-4020-922f-8adb7ea407e8) + +### Related Guides + +[Sub-merchant Onboarding APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/webhooks.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners.md) + +### Endpoints + + - **post** `/v2/accounts/:account_id/products` - Request a Product Configuration: + Requests a product configuration for Payment Gateway and Payment Links. + + + - **get** `/v2/accounts/:account_id/products/:product_id` - Fetch a Product Configuration: + Retrieves the details of an account. + + + - **patch** `/v2/accounts/:account_id/products/:product_id` - Update Settlement Account Details: + Updates settlement account details. + + + - **patch** `/v2/accounts/:account_id/products/:product_id` - Request Payment Methods: + Requests Payment Methods. diff --git a/llm-content/api/partners/product-configuration/entity.md b/llm-content/api/partners/product-configuration/entity.md new file mode 100644 index 00000000..85b29122 --- /dev/null +++ b/llm-content/api/partners/product-configuration/entity.md @@ -0,0 +1,345 @@ +--- +title: Product Configuration Entity +description: Entity parameters and sample code for Product Configuration API. +--- + +# Product Configuration Entity + +The Product Configuration entity has the following parameters: + +### Response + +```json: PG Entity +{ + "requested_configuration": [], + "active_configuration": { + "payment_capture": { + "mode": "automatic", + "refund_speed": "normal", + "automatic_expiry_period": 7200 + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "checkout": { + "theme_color": "#528FFF", + "flash_checkout": true, + "logo": "https://example.com/your_logo" + }, + "refund": { + "default_refund_speed": "optimum" + }, + "notifications": { + "whatsapp": false, + "sms": false, + "email": [ + "gaurav.kumar@example.com", + "acd@example.com" + ] + } + }, + "requirements": [ + { + "field_reference": "settlements.account_number", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e", + "reason_code": "field_missing", + "status": "required" + }, + { + "field_reference": "settlements.ifsc", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e", + "reason_code": "field_missing", + "status": "required" + }, + { + "field_reference": "settlements.beneficiary_name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e", + "reason_code": "field_missing", + "status": "required" + } + ], + "tnc":{ + "id": "tnc_IgohZaDBHRGjPv", + "accepted": true, + "accepted_at": 1641550798 + }, + "id": "acc_prd_HEgNpywUFctQ9e", + "account_id": "acc_HQVlm3bnPmccC0", + "product_name": "payment_gateway", + "activation_status": "needs_clarification", + "requested_at": 1605181524 +} +```json: PL Entity +{ + "requested_configuration": [], + "active_configuration": { + "payment_capture": { + "mode": "automatic", + "refund_speed": "normal", + "automatic_expiry_period": 7200 + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "checkout": { + "theme_color": "#528FFF", + "flash_checkout": true, + "logo": "https://example.com/your_logo" + }, + "refund": { + "default_refund_speed": "optimum" + }, + "notifications": { + "whatsapp": false, + "sms": false, + "email": [ + "gaurav.kumar@example.com", + "acd@example.com" + ] + } + }, + "requirements": [ + { + "field_reference": "settlements.account_number", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9f", + "reason_code": "field_missing", + "status": "required" + }, + { + "field_reference": "settlements.ifsc", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9f", + "reason_code": "field_missing", + "status": "required" + }, + { + "field_reference": "settlements.beneficiary_name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9f", + "reason_code": "field_missing", + "status": "required" + } + ], + "tnc":{ + "id": "tnc_IgohZaDBHRGjPq", + "accepted": true, + "accepted_at": 1641550798 + }, + "id": "acc_prd_HEgNpywUFctQ9f", + "account_id": "acc_HQVlm3bnPmccC0", + "product_name": "payment_links", + "activation_status": "needs_clarification", + "requested_at": 1605181524 +} +``` + +### Parameters + +`id` +: `string` The unique identifier of a product generated by Razorpay for a sub-merchant account. This id is used to fetch or update a product. + +`product_name` +: `string` The product(s) to be configured. Possible values: + - `payment_gateway` + - `payment_links` + +`tnc` +: `object` It consists of the configuration for the accepted terms and conditions by the merchant for the requested product. If the terms and conditions are accepted by the user for the requested product, it would consist of the following fields: + + `id` + : `string` The unique identifier representing the acceptance of terms and conditions for a product by a user. + + `accepted` + : `boolean` The flag that represents whether the terms and conditions are accepted by the user. + - `true`: Terms and conditions are accepted by user. + - `false`: Terms and conditions are not accepted by user. + + `accepted_at` + : `integer` The Unix timestamp at which the terms and conditions were accepted by the user for the requested product. + +`activation_status` +: `string` The status of the [product activation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/product-activation.md). + - `requested` + - `needs_clarification` + - `under_review` + - `activated` + - `suspended` + +`configuration` +: `object` The following are the possible configurations: + + `payment_methods` + : `object` The payment methods configured, such as, netbanking, UPI, Wallet and EMI. + + `upi` + : `object` The UPI type payment method. + + `status` + : `string` The status of UPI payment method. + + `instrument` + : `array` The list of UPI instruments requested or enabled. + + `netbanking` + : `object` The netbanking type payment method. + + `status` + : `string` The status of the netbanking payment method. + + `instrument` + : `array` The netbanking instrument object. + + `type` + : `string` The type of netbanking payment method. Possible values: + + - Retail + + - Corporate + + `bank` + : `array` The list of netbanking banks requested or enabled. Refer the [Appendix](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#netbanking-bank-codes) page for netbanking bank codes. + + `wallet` + : `object` The Wallet type payment method. + + `status` + : `string` The status of the Wallet payment method. + + `instrument` + : `array` The list of Wallet instruments requested or enabled. + + `emi` + : `string` The EMI type payment method. + + `status` + : `string` The status of EMI payment method. + + `instrument` + : `array` The EMI instrument object. + + `type` + : `string` The type of EMI payment method. Possible values: + - `card_emi` + - `cardless_emi` + + `partner` + : `array` The list of EMI partners requested or enabled. Possible values: + - For `card_emi`: `debit` and `credit`. + - For `cardless_emi`: `zestmoney` and `earlysalary`. + + `paylater` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `paylater` payment method. + - `false`: Does not enable the `paylater` payment method. + + `instrument` + : `string` The Paylater service provider. Possible values are: + - `epaylater` + - `getsimpl` + + `payment_capture` + : `object` The payment capture settings object. + + `mode` + : `string` The mode through which payment capture is done. Possible values: + - `automatic`: Payments are auto-captured (default) + - `manual`: You have to manually capture payments using our Capture API or from the Partner's Dashboard. + + `automatic_expiry` + : `numeric` This denotes the time in minutes when the payment is in the authorized state. This is auto-captured. + + `manual_expiry` + : `numeric` This denotes the time in minutes until you can manually capture payments in the authorized state. + - Must be equal to or greater than the `automatic_expire_period` value. + - The default and the maximum value is 7200 minutes. + - The payments in the authorized state after the `manual_expiry_period` are auto-refunded. + + `settlements` + : `object` The Settlement settings object. + + `account_number` + : `string` The bank account number to which settlements are made. Account details can be found on the Partner's Dashboard. For example, 7878780080316316. + + `ifsc_code` + : `string` The IFSC associated with the bank account. For example, `RATN0VAAPIS`. + + `beneficiary_name` + : `string` The name of the beneficiary associated with the bank account. + +> **INFO** +> +> +> **Handy Tip** +> +> This API parameter is needed complete the KYC process. However, it is optional for this API. +> + + `refund` + : `object` This denotes the payment refund settings. + + `default_refund_speed` + : `string` Speed at which the refund is to be processed. Possible values are: + - normal: Indicates that the refund will be processed at the normal speed. By default, the refund will take 5-7 working days. + - optimum: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. That is: + - If the refund can be processed instantly, Razorpay will initiate the process irrespective of the payment method used to make the payment. + - If an instant refund is not made, Razorpay will initiate a refund that is processed at the normal speed. For example, payments made using debit cards, netbanking or unsupported credit cards. + + `checkout` + : `object` The checkout form of the payment capture. + + `theme_color` + : `string` The theme color for sub-merchant's checkout page + + `logo` + : `string` The logo of the sub-merchant's business on the checkout page. + + `flash_checkout` + : `boolean` The flagging options **Enable** or **Disable** for Razorpay's Flash Checkout to securely save the card details of your customers. + + `notifications` + : `object` This denotes the notifications settings. + + `email` + : `string` The email addresses that will receive notifications regarding payments, settlements, daily payment reports, webhooks, and so on. + + `whatsapp` + : `boolean` The WhatsApp notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. + + `sms` + : `boolean` The SMS notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. This attribute will be set to `false`. + +`requested_configuration` +: `object` The configuration of the product requested by the user that is yet to be set as active. + +`active_configuration` +: `object` The configuration of the product that has been set as active. + +`requirements` +: `object` The list of requirements to be enabled for this product or some of the configurations under this product. It is classified into two types: - Required document: field_reference: "proof_type.document_type". For example: `business_proof_of_identification.business_pan_url`. The sub-merchant needs to upload the `business_pan_url` document to get the requirement fulfilled. +- Selected required document: field_reference : "proof_type". For example: `individual_proof_of_address`. The sub-merchant can upload ONE of the following groups, that is, submit [`aadhar_front` ,`aadhar_back`] or [`voter_id_front`, `voter_id_back`] or [`passport_front`, `passport_back`]. Once all the documents of any ONE of the groups are uploaded, the requirement gets fulfilled. + + `field_reference` + : `string` The field which is in issue or missing. The JSON key path in resolution URL. + + `resolution_url` + : `string` The URL to address the requirement. The API endpoint to be used for updating missing fields or documents. + + `status` + : `string` The status of the requirement. + + `reason_code` + : `string` The reason code for showing in the requirement. Description will be sent only when reason code is "". Possible values are: + - `field_missing` + - `needs_clarification` + - `document_missing` + + `description` + : `string` This parameter is displayed when the reason_code is `needs_clarification`. + +`requested_at` +: `integer` The Unix timestamp at which the product configuration is requested. diff --git a/llm-content/api/partners/product-configuration/fetch.md b/llm-content/api/partners/product-configuration/fetch.md new file mode 100644 index 00000000..b2e2d62b --- /dev/null +++ b/llm-content/api/partners/product-configuration/fetch.md @@ -0,0 +1,557 @@ +--- +title: Fetch a Product Configuration | Sub-Merchant Onboarding APIs +heading: Fetch a Product Configuration +description: Fetch a Product Configuration using Razorpay Partners APIs. +--- + +# Fetch a Product Configuration + +## Fetch a Product Configuration + +Use this endpoint to retrieve the details of a product for a given sub-merchant's account. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +### Request + +```Curl: Curl +curl -X GET https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e/ \ +-u \ + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String accountId = "acc_GP4lfNA0iIMn5B"; + +String productId = "acc_prd_HEgNpywUFctQ9e"; + +Account product = instance.product.fetch(accountId, productId); + +```php: PHP +$api = new Api(null, null, ""); + +$accountId = "acc_GP4lfNA0iIMn5B"; +$productId = "acc_prd_HEgNpywUFctQ9e"; + +$products = $api->account->fetch($accountId)->products(); + +$products->fetch($productId); + +```javascript: Node.js + +const instance = new Razorpay({ + oauthToken: "" +); + +const accountId = "acc_GP4lfNA0iIMn5B"; + +const productId = "acc_prd_HEgNpywUFctQ9e"; + +instance.products.fetch(accountId, productId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +accountId = "acc_GP4lfNA0iIMn5B" + +productId = "acc_prd_HEgNpywUFctQ9e" + +Razorpay::Product.fetch(accountId, productId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[ACCESS_TOKEN]"); + +string accountId = "acc_Z6t7VFTb9xHeOs"; + +string productId = "acc_prd_Z6t7VFTb9xHeOs"; + +Product product = client.Product.Fetch(accountId, productId) +``` + +### Response + +```json: PG Success +{ + "requested_configuration": { + "payment_methods": [] + }, + "active_configuration": { + "payment_capture": { + "mode": "automatic", + "refund_speed": "normal", + "automatic_expiry_period": 7200 + }, + "settlements": { + "account_number": null, + "ifsc_code": null, + "beneficiary_name": null + }, + "checkout": { + "theme_color": "#FFFFFF", + "flash_checkout": true + }, + "refund": { + "default_refund_speed": "normal" + }, + "notifications": { + "whatsapp": true, + "sms": false, + "email": [ + "b963e252-1201-45b0-9c39-c53eceb0cfd6_load@gmail.com" + ] + }, + "payment_methods": { + "netbanking": { + "enabled": true, + "instrument": [ + { + "type": "retail", + "bank": [ + "hdfc", + "sbin", + "utib", + "icic", + "scbl", + "yesb" + ] + } + ] + }, + "wallet": { + "enabled": true, + "instrument": [ + "airtelmoney", + "jiomoney", + "olamoney", + "payzapp", + "mobikwik" + ] + }, + "upi": { + "enabled": true, + "instrument": [ + "upi" + ] + } + } + }, + "requirements": [ + { + "field_reference": "individual_proof_of_address", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/stakeholders/{stakeholderId}/documents", + "status": "required", + "reason_code": "document_missing" + }, + { + "field_reference": "individual_proof_of_identification", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/stakeholders/{stakeholderId}/documents", + "status": "required", + "reason_code": "document_missing" + }, + { + "field_reference": "business_proof_of_identification", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/documents", + "status": "required", + "reason_code": "document_missing" + }, + { + "field_reference": "settlements.beneficiary_name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.account_number", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.ifsc_code", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "contact_name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "customer_facing_business_name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "kyc.pan", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/stakeholders", + "status": "required", + "reason_code": "field_missing" + } + ], + "tnc":{ + "id": "tnc_IgohZaDBHRGjPv", + "accepted": true, + "accepted_at": 1641550798 + }, + "id": "acc_prd_HEgNpywUFctQ9e", + "account_id": "acc_HQVlm3bnPmccC0", + "product_name": "payment_gateway", + "activation_status": "needs_clarification", + "requested_at": 1625478849 +} + +```json: PL Success +{ + "requested_configuration": { + "payment_methods": [] + }, + "active_configuration": { + "payment_capture": { + "mode": "automatic", + "refund_speed": "normal", + "automatic_expiry_period": 7200 + }, + "settlements": { + "account_number": null, + "ifsc_code": null, + "beneficiary_name": null + }, + "checkout": { + "theme_color": "#FFFFFF", + "flash_checkout": true + }, + "refund": { + "default_refund_speed": "normal" + }, + "notifications": { + "whatsapp": true, + "sms": false, + "email": [ + "b963e252-1201-45b0-9c39-c53eceb0cfd6_load@gmail.com" + ] + }, + "payment_methods": { + "netbanking": { + "enabled": true, + "instrument": [ + { + "type": "retail", + "bank": [ + "hdfc", + "sbin", + "utib", + "icic", + "scbl", + "yesb" + ] + } + ] + }, + "wallet": { + "enabled": true, + "instrument": [ + "airtelmoney", + "jiomoney", + "olamoney", + "payzapp", + "mobikwik" + ] + }, + "upi": { + "enabled": true, + "instrument": [ + "upi" + ] + } + } + }, + "requirements": [ + { + "field_reference": "individual_proof_of_address", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/stakeholders/{stakeholderId}/documents", + "status": "required", + "reason_code": "document_missing" + }, + { + "field_reference": "individual_proof_of_identification", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/stakeholders/{stakeholderId}/documents", + "status": "required", + "reason_code": "document_missing" + }, + { + "field_reference": "business_proof_of_identification", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/documents", + "status": "required", + "reason_code": "document_missing" + }, + { + "field_reference": "settlements.beneficiary_name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9f", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.account_number", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9f", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.ifsc_code", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9f", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "contact_name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "customer_facing_business_name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "kyc.pan", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/stakeholders", + "status": "required", + "reason_code": "field_missing" + } + ], + "tnc":{ + "id": "tnc_IgohZaDBHRGjPv", + "accepted": true, + "accepted_at": 1641550798 + }, + "id": "acc_prd_HEgNpywUFctQ9f", + "account_id": "acc_HQVlm3bnPmccC0", + "product_name": "payment_links", + "activation_status": "needs_clarification", + "requested_at": 1625478849 +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay. For example, `acc_HQVlm3bnPmccC0`. + +`id` _mandatory_ +: `string` The unique identifier of a product generated by Razorpay. For example, `acc_prd_HEgNpywUFctQ9e`. + +### Parameters + +`id` +: `string` The unique identifier of a product generated by Razorpay for a sub-merchant account. This id is used to fetch or update a product. + +`product_name` +: `string` The product(s) to be configured. Possible values: + - `payment_gateway` + - `payment_links` + +`tnc` +: `object` It consists of the configuration for the accepted terms and conditions by the merchant for the requested product. If the terms and conditions are accepted by the user for the requested product, it would consist of the following fields: + + `id` + : `string` The unique identifier representing the acceptance of terms and conditions for a product by a user. + + `accepted` + : `boolean` The flag that represents whether the terms and conditions are accepted by the user. + - `true`: Terms and conditions are accepted by user. + - `false`: Terms and conditions are not accepted by user. + + `accepted_at` + : `integer` The Unix timestamp at which the terms and conditions were accepted by the user for the requested product. + +`activation_status` +: `string` The status of the [product activation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/product-activation.md). + - `requested` + - `needs_clarification` + - `under_review` + - `activated` + - `suspended` + +`configuration` +: `object` The following are the possible configurations: + + `payment_methods` + : `object` The payment methods configured, such as, netbanking, UPI, Wallet and EMI. + + `upi` + : `object` The UPI type payment method. + + `status` + : `string` The status of UPI payment method. + + `instrument` + : `array` The list of UPI instruments requested or enabled. + + `netbanking` + : `object` The netbanking type payment method. + + `status` + : `string` The status of the netbanking payment method. + + `instrument` + : `array` The netbanking instrument object. + + `type` + : `string` The type of netbanking payment method. Possible values: + + - Retail + + - Corporate + + `bank` + : `array` The list of netbanking banks requested or enabled. Refer the [Appendix](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#netbanking-bank-codes) page for netbanking bank codes. + + `wallet` + : `object` The Wallet type payment method. + + `status` + : `string` The status of the Wallet payment method. + + `instrument` + : `array` The list of Wallet instruments requested or enabled. + + `emi` + : `string` The EMI type payment method. + + `status` + : `string` The status of EMI payment method. + + `instrument` + : `array` The EMI instrument object. + + `type` + : `string` The type of EMI payment method. Possible values: + - `card_emi` + - `cardless_emi` + + `partner` + : `array` The list of EMI partners requested or enabled. Possible values: + - For `card_emi`: `debit` and `credit`. + - For `cardless_emi`: `zestmoney` and `earlysalary`. + + `paylater` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `paylater` payment method. + - `false`: Does not enable the `paylater` payment method. + + `instrument` + : `string` The Paylater service provider. Possible values: + - `epaylater` + - `getsimpl` + + `payment_capture` + : `object` The payment capture settings object. + + `mode` + : `string` The mode through which payment capture is done. Possible values: + - `automatic`: Payments are auto-captured (default) + - `manual`: You have to manually capture payments using our Capture API or from the Partner's Dashboard. + + `automatic_expiry` + : `numeric` This denotes the time in minutes when the payment is in the authorized state. This is auto-captured. + + `manual_expiry` + : `numeric` This denotes the time in minutes until you can manually capture payments in the authorized state. + - Must be equal to or greater than the `automatic_expire_period` value. + - The default and the maximum value is 7200 minutes. + - The payments in the authorized state after the `manual_expiry_period` are auto-refunded. + + `settlements` + : `object` The Settlement settings object. + + `account_number` + : `string` The bank account number to which settlements are made. Account details can be found on the Dashboard. For example, 7878780080316316. + + `ifsc_code` + : `string` The IFSC associated with the bank account. For example, `RATN0VAAPIS`. + + `beneficiary_name` + : `string` The name of the beneficiary associated with the bank account. This API parameter is needed complete the KYC process. However, it is optional for this API. + + `refund` + : `object` This denotes the payment refund settings. + + `default_refund_speed` + : `string` Speed at which the refund is to be processed. Possible values: + - normal: Indicates that the refund will be processed at the normal speed. By default, the refund will take 5-7 working days. + - optimum: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. That is: + - If the refund can be processed instantly, Razorpay will initiate the process irrespective of the payment method used to make the payment. + - If an instant refund is not made, Razorpay will initiate a refund that is processed at the normal speed. For example, payments made using debit cards, netbanking or unsupported credit cards. + + `checkout` + : `object` The checkout form of the payment capture. + + `theme_color` + : `string` The theme color for sub-merchant's checkout page + + `logo` + : `string` The logo of the sub-merchant's business on the checkout page. + + `flash_checkout` + : `boolean` The flagging options **Enable** or **Disable** for Razorpay's Flash Checkout to securely save the card details of your customers. + + `notifications` + : `object` This denotes the notifications settings. + + `email` + : `string` The email addresses that will receive notifications regarding payments, settlements, daily payment reports, webhooks, and so on. + + `whatsapp` + : `boolean` The WhatsApp notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. + + `sms` + : `boolean` The SMS notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. This attribute will be set to `false`. + +`requested_configuration` +: `object` The configuration of the product requested by the user that is yet to be set as active. + +`active_configuration` +: `object` The configuration of the product that has been set as active. + +`requirements` +: `object` The list of requirements to be enabled for this product or some of the configurations under this product. + + `field_reference` + : `string` The field which is in issue or missing. The JSON key path in resolution URL. + + `resolution_url` + : `string` The URL to address the requirement. The API endpoint to be used for updating missing fields or documents. + + `status` + : `string` The status of the requirement. + + `reason_code` + : `string` The reason code for showing in the requirement. Description will be sent only when reason code is "". Possible values: + - `field_missing` + - `needs_clarification` + - `document_missing` + + `description` + : `string` This parameter is displayed when the reason_code is `needs_clarification`. + +`requested_at` +: `integer` The Unix timestamp at which the product configuration is requested. diff --git a/llm-content/api/partners/product-configuration/request.md b/llm-content/api/partners/product-configuration/request.md new file mode 100644 index 00000000..d9037298 --- /dev/null +++ b/llm-content/api/partners/product-configuration/request.md @@ -0,0 +1,486 @@ +--- +title: Request a Product Configuration | Sub-Merchant Onboarding APIs +heading: Request a Product Configuration +description: Request a Product Configuration for Payment Gateway using Razorpay Partners APIs. +--- + +# Request a Product Configuration + +## Request a Product Configuration | Payment Gateway + +Use this endpoint to request a product configuration for Payment Gateway or Payment Links. You can even accept terms and conditions for the requested product using these APIs. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +### Request + +```Curl: Curl +curl -X POST https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products \ +-u \ +-H "Content-Type: application/json" \ +-d '{ + "product_name": "payment_gateway", + "tnc_accepted": true, + "ip": "233.233.233.234" +}' + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accountId = "acc_GP4lfNA0iIMn5B"; + +JSONObject productRequest = new JSONObject(); +productRequest.put("product_name","payment_gateway"); +productRequest.put("tnc_accepted",true); +productRequest.put("ip","233.233.233.234"); + +Account product = instance.product.requestProductConfiguration(accountId, productRequest); + +```php: PHP +$api = new Api(null, null, ""); + +$accountId = "acc_GP4lfNA0iIMn5B"; + +$products = $api->account->fetch($accountId)->products(); + +$products->requestProductConfiguration(array( + "product_name" => "payment_gateway", + "tnc_accepted" => true, + "ip" => "233.233.233.234" +)); + +```javascript: Node.js + +const instance = new Razorpay({ + oauthToken: "", + +const accountId = "acc_Q8BdU0uPXXXpqI"; + +instance.products.requestProductConfiguration(accountId, { + "product_name" : "payment_gateway", + "tnc_accepted" : true, + "ip" : "233.233.233.234" +}); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +accountId = "acc_GP4lfNA0iIMn5B" + +Razorpay::Product.request_product_configuration(accountId, { + "product_name": "payment_gateway", + "tnc_accepted": true, + "ip": "233.233.233.234" +}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[ACCESS_TOKEN]"); +string accountId = "acc_Z6t7VFTb9xHeOs"; + +Dictionary productRequest = new Dictionary(); +productRequest.Add("product_name", "payment_gateway"); +productRequest.Add("tnc_accepted", true); +productRequest.Add("ip", "233.233.233.234"); + +Product product = client.Product.Create(productRequest); + +``` + +### Response + +```json: Success +{ + "requested_configuration": { + "payment_methods": [] + }, + "active_configuration": { + "payment_capture": { + "mode": "automatic", + "refund_speed": "normal", + "automatic_expiry_period": 7200 + }, + "settlements": { + "account_number": null, + "ifsc_code": null, + "beneficiary_name": null + }, + "checkout": { + "theme_color": "#FFFFFF", + "flash_checkout": true, + "logo": "https://example.com/your_logo" + }, + "refund": { + "default_refund_speed": "normal" + }, + "notifications": { + "whatsapp": true, + "sms": false, + "email": [ + "b963e252-1201-45b0-9c39-c53eceb0cfd6_load@gmail.com" + ] + }, + "payment_methods": { + "netbanking": { + "enabled": true, + "instrument": [ + { + "type": "retail", + "bank": [ + "hdfc", + "sbin", + "utib", + "icic", + "scbl", + "yesb" + ] + } + ] + }, + "wallet": { + "enabled": true, + "instrument": [ + "airtelmoney", + "jiomoney", + "olamoney", + "payzapp", + "mobikwik" + ] + }, + "upi": { + "enabled": true, + "instrument": [ + "upi" + ] + } + } + }, + "requirements": [ + { + "field_reference": "individual_proof_of_address", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/stakeholders/{stakeholderId}/documents", + "status": "required", + "reason_code": "document_missing" + }, + { + "field_reference": "individual_proof_of_identification", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/stakeholders/{stakeholderId}/documents", + "status": "required", + "reason_code": "document_missing" + }, + { + "field_reference": "business_proof_of_identification", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/documents", + "status": "required", + "reason_code": "document_missing" + }, + { + "field_reference": "settlements.beneficiary_name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.account_number", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "settlements.ifsc_code", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "contact_name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/stakeholders", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "customer_facing_business_name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "kyc.pan", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/stakeholders", + "status": "required", + "reason_code": "field_missing" + } + ], + "tnc":{ + "id": "tnc_IgohZaDBHRGjPv", + "accepted": true, + "accepted_at": 1641550798 + }, + "id": "acc_prd_HEgNpywUFctQ9e", + "account_id": "acc_HQVlm3bnPmccC0", + "product_name": "payment_gateway", + "activation_status": "needs_clarification", + "requested_at": 162547884 +} +``` + +### Parameters + +`account_id` +: `string` The unique identifier of the sub-merchant account generated by Razorpay. For example, `acc_HQVlm3bnPmccC0`. This id is used to fetch or update a product. The product is created for this sub-merchant account id. + +### Parameters + +`product_name` _mandatory_ +: `string` The product(s) to be configured. Possible values: + - `payment_gateway` + - `payment_links` + +`tnc_accepted` _optional_ +: `boolean` Pass this parameter to accept terms and conditions. Send this parameter along with the `ip` parameter when the `tnc` is accepted. Possible value is `true` which indicates acceptance of terms and conditions. + +`ip` _optional_ +: `string` The IP address of the merchant while accepting the terms and conditions. Send this parameter along with the `tnc_accepted` parameter when the `tnc` is accepted. + +### Parameters + +`requested_configuration` +: `object` The configuration of the product requested by the user that is yet to be set as active. + +`tnc` +: `object` It consists of the configuration for the accepted terms and conditions by the merchant for the requested product. If the terms and conditions are accepted by the user for the requested product, it would consist of following fields: + + `id` + : `string` The unique identifier representing the acceptance of terms and conditions for a product by a user. + + `accepted` + : `boolean` The flag that represents whether the terms and conditions were accepted by the user. + - `true`: Terms and conditions are accepted by user. + - `false`: Terms and conditions are not accepted by user. + + `accepted_at` + : `integer` The Unix timestamp at which the terms and conditions were accepted by the user for the requested product. + +`active_configuration` +: `object` The configuration of the product that has been set as active. + + `payment_capture` + : `object` The Payment Capture Settings Object + + `mode` + : `string` The mode through which payment capture is done. Possible values: + - `automatic`: Payments are auto-captured (default) + - `manual`: You have to manually capture payments using our Capture API or from the Partner's Dashboard. + + `automatic_expiry` + : `numeric` This denotes the time in minutes when the payment is in the authorized state. This is auto-captured. + + `manual_expiry` + : `numeric` This denotes the time in minutes until you can manually capture payments in the authorized state. + - Must be equal to or greater than the `automatic_expire_period` value. + - The default and the maximum value is 7200 minutes. + - The payments in the authorized state after the `manual_expiry_period` are auto-refunded. + + `settlements` + : `object` The Settlement settings object. + + `account_number` + : `string` The bank account number to which settlements are made. Account details can be found on the Dashboard. For example, 7878780080316316. + + `ifsc_code` + : `string` The IFSC associated with the bank account. For example, `RATN0VAAPIS`. + + `beneficiary_name` + : `string` The name of the beneficiary associated with the bank account. + + `checkout` + : `object` The checkout form of the payment capture. + + `theme_color` + : `string` The theme color for sub-merchant's checkout page. + + `logo` + : `string` The logo of the sub-merchant's business on the checkout page. + + `flash_checkout` + : `boolean` The flagging options **Enable** or **Disable** for Razorpay's Flash Checkout to securely save the card details of your customers. + + `refund` + : `object` This denotes the payment refund settings. + + `default_refund_speed` + : `string` Speed at which the refund is to be processed. Possible values: + - normal: Indicates that the refund will be processed via the normal speed. By default, the refund will take 5-7 working days. + - optimum: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. That is: + - If the refund can be processed instantly, Razorpay will initiate the process irrespective of the payment method used to make the payment. + - If an instant refund is not made, Razorpay will initiate a refund that is processed at the normal speed. For example, payments made using debit cards, netbanking or unsupported credit cards. + + `notifications` + : `object` This denotes the notifications settings. + + `email` + : `string` The email addresses that will receive notifications regarding payments, settlements, daily payment reports, webhooks, and so on. + + `whatsapp` + : `boolean` The WhatsApp notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. + + `sms` + : `boolean` The SMS notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. This attribute will be set to `false`. + + `payment_methods` + : `object` Details of the payment method you want to enable for the product. + + `netbanking` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `netbanking` payment method. + - `false`: Does not enable the `netbanking` payment method. + + `instrument` + : `object` Details regarding the bank. + + `type` + : `string` The type of bank. Possible values are `retail` and `corporate`. + + `bank` + : `string` The bank code. Refer to the [list of bank codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#netbanking-bank-codes). + + `card` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `card` payment method. + - `false`: Does not enable the `card` payment method. + + `instrument` + : `object` Details regarding the card. + + `type` + : `string` Possible value is `domestic`. + + `issuer` + : `string` The card issuer. Possible values: + - `amex` + - `dicl` + - `maestro` + - `mastercard` + - `rupay` + - `visa` + + `wallet` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `wallet` payment method. + - `false`: Does not enable the `wallet` payment method. + + `instrument` + : `string` The wallet issuer. Possible values: + - `airtelmoney` + - `amazonpay` + - `jiomoney` + - `mobiwik` + - `mpesa` + - `olamoney` + - `paytm` + - `payzapp` + - `payumoney` + - `phonepe` + - `phonepeswitch` + - `sbibuddy` + + `upi` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `upi` payment method. + - `false`: Does not enable the `upi` payment method. + + `instrument` + : `string` The UPI service provider. Possible values: + - `google_pay` + - `upi` + + `paylater` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `paylater` payment method. + - `false`: Does not enable the `paylater` payment method. + + `instrument` + : `string` The Paylater service provider. Possible values: + - `epaylater` + - `getsimpl` + + `emi` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `paylater` payment method. + - `false`: Does not enable the `paylater` payment method. + + `instrument` + : `object` The EMI instrument object. + + `type` + : `string` The type of EMI payment method. Possible values: + - `card_emi` + - `cardless_emi` + + `partner` + : `string` The list of EMI partners requested or enabled. Possible values: + - For `card_emi`: `debit` and `credit`. + - For `cardless_emi`: `zestmoney` and `earlysalary`. + +`requirements` +: `object` The list of requirements to be enabled for this product or some of the configurations under this product. It is classified into two types: - Required document: field_reference: "proof_type.document_type". For example: `business_proof_of_identification.business_pan_url`. The sub-merchant needs to upload the `business_pan_url` document to get the requirement fulfilled. +- Selected required document: field_reference : "proof_type". For example: `individual_proof_of_address`. The sub-merchant can upload ONE of the following groups, that is, submit [`aadhar_front` ,`aadhar_back`] or [`voter_id_front`, `voter_id_back`] or [`passport_front`, `passport_back`]. Once all the documents of any ONE of the groups are uploaded, the requirement gets fulfilled. + + `field_reference` + : `string` The field which is in issue or missing. The JSON key path in resolution URL. + + `resolution_url` + : `string` The URL to address the requirement. The API endpoint to be used for updating missing fields or documents. + + `status` + : `string` The status of the requirement. + + `reason_code` + : `string` The reason code for showing in the requirement. Possible values: + - `field_missing` + - `needs_clarification` + - `document_missing` + +`id` +: `string` The unique identifier of the sub-merchant product account generated by Razorpay. For example, `acc_prd_HEgNpywUFctQ9e`. The product is created for this sub-merchant account id. + +`account_id` +: `string` The unique identifier of the sub-merchant generated by Razorpay. For example, `acc_HQVlm3bnPmccC0`. + +`product_name` +: `string` The product(s) to be configured. Possible values: + - `payment_gateway` + - `payment_links` + +`activation_status` +: `string` The status of the [product activation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/product-activation.md). + - `requested` + - `needs_clarification` + - `under_review` + - `activated` + - `suspended` + +`requested_at` +: `integer` The Unix timestamp at which the product configuration has been requested. diff --git a/llm-content/api/partners/product-configuration/update-request-payment-methods.md b/llm-content/api/partners/product-configuration/update-request-payment-methods.md new file mode 100644 index 00000000..7a323e5e --- /dev/null +++ b/llm-content/api/partners/product-configuration/update-request-payment-methods.md @@ -0,0 +1,523 @@ +--- +title: Update a Product Configuration | Request Payment Methods +heading: Request Payment Methods +description: Request Payment Methods during product configuration using Razorpay Partners APIs. +--- + +# Request Payment Methods + +## Request Payment Methods + +Use this endpoint to update a product's configuration and request payment methods like UPI, netbanking and card. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +Check the [use cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md#use-cases-to-update-settlement-account-details) and [updates permitted for different product activation statuses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md#product-activation-status-and-updates-permitted) before using this API. + +> **WARN** +> +> +> **Watch Out!** +> +> Currently, we do not support making concurrent requests to the following Onboarding APIs including their combination on the same `account_id`: +> - [Update Account API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/update.md) +> - [Update Stakeholder API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/update.md) +> - [Update Product Configuration API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/update-settlement-account-details.md) +> +> Please wait for the response of these APIs before making subsequent requests. +> + +Given here is the Payment Gateway product sample code when you request for a specific payment method. Here the `payment_method` object is used. The example used is `netbanking`. + +> **WARN** +> +> +> **Watch Out!** +> +> You can send request for only *one payment method at a time*. For example, if you want to enable HDFC Netbanking and Rupay Domestic Card payment methods, you should send two separate API requests. You cannot send a consolidated request using this API. +> + +### Request + +```curl: Curl +curl -X PATCH https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e/ \ +-u \ +-d' { + "notifications": { + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + }, + "checkout": { + "theme_color": "#528FFF" + }, + "refund": { + "default_refund_speed": "optimum" + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "payment_methods": { + "upi": { + "enabled": true, + "instrument": "upi" + } + }, + "tnc_accepted": true, + "ip": "233.233.233.234" +}' + +```php: PHP +$api = new Api(null, null, ""); + +$accountId = "acc_GP4lfNA0iIMn5B"; +$productId = "acc_prd_HEgNpywUFctQ9e"; + +$products = $api->account->fetch($accountId)->products(); + +$products->edit($productId, array( + "notifications" => array( + "email" => array( + "gaurav.kumar@example.com", + "acd@gmail.com" + ) + ), + "checkout" => array( + "theme_color" => "#528FFF" + ), + "refund" => array( + "default_refund_speed" => "optimum" + ), + "settlements" => array( + "account_number" => "1234567890", + "ifsc_code" => "HDFC0000317", + "beneficiary_name" => "Gaurav Kumar" + ), + "payment_methods" => array( + "upi" => array( + "enabled" => true, + "instrument" => "upi" + ) + ), + "tnc_accepted" => true, + "ip" => "233.233.233.234" +)); +``` + +### Response + +```json: Success +{ + "requested_configuration": { + "payment_methods": { + "upi": { + "enabled": true, + "instrument": [ + "upi" + ] + } + } + }, + // already activated payment methods + "active_configuration": { + "payment_methods": { + "netbanking": { + "enabled": true, + "instrument": [ + { + "type": "retail", + "bank": [ + "hdfc", + "sbin" + ] + } + ] + }, + "wallet": { + "enabled": true, + "instrument": [ + "airtelmoney" + ] + } + } + } +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay. For example, `acc_HQVlm3bnPmccC0`. + +`id` _mandatory_ +: `string` The unique identifier of a product generated by Razorpay. For example, `acc_prd_HEgNpywUFctQ9e`. + +### Parameters + +`notifications` _optional_ +: `object` This denotes the notifications settings. + + `email` + : `string` The email addresses that will receive notifications regarding payments, settlements, daily payment reports, webhooks, and so on. + + `whatsapp` + : `boolean` The WhatsApp notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. + + `sms` + : `boolean` The SMS notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. This attribute will be set to `false`. + +`checkout` _optional_ +: `object` The checkout form of the payment capture. + + `theme_color` + : `string` The theme color for sub-merchant's checkout page + + `logo` + : `string` The logo of the sub-merchant's business on the checkout page. + + `flash_checkout` + : `boolean` The flagging options **Enable** or **Disable** for Razorpay's Flash Checkout to securely save the card details of your customers. + +`refund` _optional_ +: `object` This denotes the payment refund settings. + + `default_refund_speed` + : `string` Speed at which the refund is to be processed. Possible values: + - `normal`: Indicates that the refund will be processed at normal speed. By default, the refund will take 5-7 working days. + - `optimum`: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. That is: + - If the refund can be processed instantly, Razorpay will initiate the process irrespective of the payment method used to make the payment. + - If an instant refund is not made, Razorpay will initiate a refund that is processed at the normal speed. For example, payments made using debit cards, netbanking or unsupported credit cards. + +`settlements` _conditional_ +: `object` The Settlement settings object. + + `account_number` + : `string` The bank account number to which settlements are made. Account details can be found on the Dashboard. For example, 7878780080316316. + + `ifsc_code` + : `string` The IFSC associated with the bank account. For example, `RATN0VAAPIS`. + + `beneficiary_name` + : `string` The name of the beneficiary associated with the bank account. + +`tnc_accepted` _optional_ +: `boolean` Pass this parameter to accept terms and conditions. Send this parameter along with the `ip` parameter when the `tnc` is accepted. Possible value is `true` which indicates acceptance of terms and conditions. + +`ip` _optional_ +: `string` The IP address of the merchant while accepting the terms and conditions. Send this parameter along with the `tnc_accepted` parameter when the `tnc` is accepted. + +`payment_methods` _optional_ +: `object` Details of the payment method you want to enable for the product. + + `netbanking` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `netbanking` payment method. + - `false`: Does not enable the `netbanking` payment method. + + `instrument` + : `object` Details regarding the bank. + + `type` + : `string` The type of bank. Possible values: + - `retail` + - `corporate`. + + `bank` + : `string` The bank code. Refer to the [list of bank codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#netbanking-bank-codes). + + `card` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `card` payment method. + - `false`: Does not enable the `card` payment method. + + `instrument` + : `object` Details regarding the card. + + `type` + : `string` Possible value is `domestic`. + + `issuer` + : `string` The card issuer. Possible values: + - `amex` + - `dicl` + - `maestro` + - `mastercard` + - `rupay` + - `visa` + + `wallet` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `wallet` payment method. + - `false`: Does not enable the `wallet` payment method. + + `instrument` + : `string` The wallet issuer. Possible values: + - `airtelmoney` + - `amazonpay` + - `jiomoney` + - `mobiwik` + - `mpesa` + - `olamoney` + - `paytm` + - `payzapp` + - `payumoney` + - `phonepe` + - `phonepeswitch` + - `sbibuddy` + + `upi` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `upi` payment method. + - `false`: Does not enable the `upi` payment method. + + `instrument` + : `string` The UPI service provider. Possible values: + - `google_pay` + - `upi` + + `paylater` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `paylater` payment method. + - `false`: Does not enable the `paylater` payment method. + + `instrument` + : `string` The Paylater service provider. Possible values: + - `epaylater` + - `getsimpl` + + `emi` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `paylater` payment method. + - `false`: Does not enable the `paylater` payment method. + + `instrument` + : `object` The EMI instrument object. + + `type` + : `string` The type of EMI payment method. Possible values: + - `card_emi` + - `cardless_emi` + + `partner` + : `string` The list of EMI partners requested or enabled. Possible values: + - For `card_emi`: `debit` and `credit`. + - For `cardless_emi`: `zestmoney` and `earlysalary`. + +### Parameters + +`id` +: `string` The unique identifier of a product generated by Razorpay for a sub-merchant account. This id is used to fetch or update a product. + +`product_name` +: `string` The product(s) to be configured. Possible values: + - `payment_gateway` + - `payment_links` + +`tnc` +: `object` It consists of the configuration for the accepted terms and conditions by the merchant for the requested product. If the terms and conditions are accepted by the user for the requested product, it would consist of the following fields: + + `id` + : `string` The unique identifier representing the acceptance of terms and conditions for a product by a user. + + `accepted` + : `boolean` The flag that represents whether the terms and conditions are accepted by the user. + - `true`: Terms and conditions are accepted by user. + - `false`: Terms and conditions are not accepted by user. + + `accepted_at` + : `integer` The Unix timestamp at which the terms and conditions were accepted by the user for the requested product. + +`activation_status` +: `string` The status of the [product activation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/product-activation.md). + - `requested` + - `needs_clarification` + - `under_review` + - `activated` + - `suspended` + +`configuration` +: `object` The following are the possible configurations: + + `payment_methods` + : `object` The payment methods configured, such as, netbanking, UPI, Wallet and EMI. + + `upi` + : `object` The UPI type payment method. + + `status` + : `string` The status of UPI payment method. + + `instrument` + : `array` The list of UPI instruments requested or enabled. + + `netbanking` + : `object` The netbanking type payment method. + + `status` + : `string` The status of the netbanking payment method. + + `instrument` + : `array` The netbanking instrument object. + + `type` + : `string` The type of netbanking payment method. Possible values: + + - Retail + + - Corporate + + `bank` + : `array` The list of netbanking banks requested or enabled. Refer the [Appendix](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#netbanking-bank-codes) page for netbanking bank codes. + + `wallet` + : `object` The Wallet type payment method. + + `status` + : `string` The status of the Wallet payment method. + + `instrument` + : `array` The list of Wallet instruments requested or enabled. + + `emi` + : `string` The EMI type payment method. + + `status` + : `string` The status of EMI payment method. + + `instrument` + : `array` The EMI instrument object. + + `type` + : `string` The type of EMI payment method. Possible values: + - `card_emi` + - `cardless_emi` + + `partner` + : `array` The list of EMI partners requested or enabled. Possible values: + - For `card_emi`: `debit` and `credit`. + - For `cardless_emi`: `zestmoney` and `earlysalary`. + + `paylater` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `paylater` payment method. + - `false`: Does not enable the `paylater` payment method. + + `instrument` + : `string` The Paylater service provider. Possible values are: + - `epaylater` + - `getsimpl` + + `payment_capture` + : `object` The payment capture settings object. + + `mode` + : `string` The mode through which payment capture is done. Possible values: + - `automatic`: Payments are auto-captured (default) + - `manual`: You have to manually capture payments using our Capture API or from the Partner's Dashboard. + + `automatic_expiry` + : `numeric` This denotes the time in minutes when the payment is in the authorized state. This is auto-captured. + + `manual_expiry` + : `numeric` This denotes the time in minutes until you can manually capture payments in the authorized state. + - Must be equal to or greater than the `automatic_expire_period` value. + - The default and the maximum value is 7200 minutes. + - The payments in the authorized state after the `manual_expiry_period` are auto-refunded. + + `settlements` + : `object` The Settlement settings object. + + `account_number` + : `string` The bank account number to which settlements are made. Account details can be found on the Dashboard. For example, 7878780080316316. + + `ifsc_code` + : `string` The IFSC associated with the bank account. For example, `RATN0VAAPIS`. + + `beneficiary_name` + : `string` The name of the beneficiary associated with the bank account. This API parameter is needed complete the KYC process. However, it is optional for this API. + + `refund` + : `object` This denotes the payment refund settings. + + `default_refund_speed` + : `string` Speed at which the refund is to be processed. Possible values are: + - normal: Indicates that the refund will be processed at the normal speed. By default, the refund will take 5-7 working days. + - optimum: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. That is: + - If the refund can be processed instantly, Razorpay will initiate the process irrespective of the payment method used to make the payment. + - If an instant refund is not made, Razorpay will initiate a refund that is processed at the normal speed. For example, payments made using debit cards, netbanking or unsupported credit cards. + + `checkout` + : `object` The checkout form of the payment capture. + + `theme_color` + : `string` The theme color for sub-merchant's checkout page + + `logo` + : `string` The logo of the sub-merchant's business on the checkout page. + + `flash_checkout` + : `boolean` The flagging options **Enable** or **Disable** for Razorpay's Flash Checkout to securely save the card details of your customers. + + `notifications` + : `object` This denotes the notifications settings. + + `email` + : `string` The email addresses that will receive notifications regarding payments, settlements, daily payment reports, webhooks, and so on. + + `whatsapp` + : `boolean` The WhatsApp notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. + + `sms` + : `boolean` The SMS notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. This attribute will be set to `false`. + +`requested_configuration` +: `object` The configuration of the product requested by the user that is yet to be set as active. + +`active_configuration` +: `object` The configuration of the product that has been set as active. + +`requirements` +: `object` The list of requirements to be enabled for this product or some of the configurations under this product. + + `field_reference` + : `string` The field which is in issue or missing. The JSON key path in resolution URL. + + `resolution_url` + : `string` The URL to address the requirement. The API endpoint to be used for updating missing fields or documents. + + `status` + : `string` The status of the requirement. + + `reason_code` + : `string` The reason code for showing in the requirement. Description will be sent only when reason code is "". Possible values are: + - `field_missing` + - `needs_clarification` + - `document_missing` + + `description` + : `string` This parameter is displayed when the reason_code is `needs_clarification`. + +`requested_at` +: `integer` The Unix timestamp at which the product configuration is requested. diff --git a/llm-content/api/partners/product-configuration/update-settlement-account-details.md b/llm-content/api/partners/product-configuration/update-settlement-account-details.md new file mode 100644 index 00000000..b1ada479 --- /dev/null +++ b/llm-content/api/partners/product-configuration/update-settlement-account-details.md @@ -0,0 +1,790 @@ +--- +title: Update a Product Configuration | Update Settlement Account Details +heading: Update Settlement Account Details +description: Update a Product Configuration during product configuration using Razorpay Partners APIs. +--- + +# Update Settlement Account Details + +## Update Settlement Account Details + +Use this endpoint to update a product's configuration. Update settlement account details and request for Payment Gateway and Payment Links products. In this sample, the payment methods object has not been used. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +Check the [use cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md#use-cases-to-update-settlement-account-details) and [updates permitted for different product activation statuses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md#product-activation-status-and-updates-permitted) before using this API. + +> **WARN** +> +> +> **Watch Out!** +> +> Currently, we do not support making concurrent requests to the following Onboarding APIs including their combination on the same `account_id`: +> - [Update Account API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/update.md) +> - [Update Stakeholder API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/update.md) +> - Update Product Configuration API +> +> Please wait for the response of these APIs before making subsequent requests. +> + +### Request + +```Curl: Curl +curl -X PATCH https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e/ \ +-u \ +-d '{ + "notifications": { + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + }, + "checkout": { + "theme_color": "#528FFF" + }, + "refund": { + "default_refund_speed": "optimum" + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "tnc_accepted": true, + "ip": "233.233.233.234" +}' + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accountId = "acc_GP4lfNA0iIMn5B"; + +String productId = "acc_prd_HEgNpywUFctQ9e"; + +JSONObject productRequest = new JSONObject(); + +JSONObject notifications = new JSONObject(); +ArrayList details = new ArrayList(); +details.add("gaurav.kumar@example.com"); +details.add("acd@gmail.com"); + +notifications.put("email",details); + +productRequest.put("notifications",notifications); + +JSONObject checkout = new JSONObject(); +checkout.put("theme_color","#528FFF"); + +productRequest.put("checkout",checkout); + +JSONObject refund = new JSONObject(); +refund.put("default_refund_speed","optimum"); + +productRequest.put("refund",refund); + +JSONObject settlements = new JSONObject(); +settlements.put("account_number","1234567890"); +settlements.put("ifsc_code","HDFC0000317"); +settlements.put("beneficiary_name","Gaurav Kumar"); + +productRequest.put("settlements",settlements); +productRequest.put("tnc_accepted",true); +productRequest.put("ip","233.233.233.234"); + +Account product = instance.product.edit(accountId, productId, productRequest); + +```php: PHP +$api = new Api(null, null, ""); + +$accountId = "acc_GP4lfNA0iIMn5B"; +$productId = "acc_prd_HEgNpywUFctQ9e"; + +$api->account->fetch($accountId)->products()->edit($productId, array( + "notifications" => array( + "email" => array( + "gaurav.kumar@example.com", + "acd@gmail.com" + ) + ), + "checkout" => array( + "theme_color" => "#528FFF" + ), + "refund" => array( + "default_refund_speed" => "optimum" + ), + "settlements" => array( + "account_number" => "1234567890", + "ifsc_code" => "HDFC0000317", + "beneficiary_name" => "Gaurav Kumar" + ), + "tnc_accepted" => true, + "ip" => "233.233.233.234" +)); + +```javascript: Node.js + +const instance = new Razorpay({ + oauthToken: "", + +const accountId = "acc_GP4lfNA0iIMn5B"; +const productId = "acc_prd_HEgNpywUFctQ9e"; + +instance.products.edit(accountId, productId, { + "notifications": { + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + }, + "checkout": { + "theme_color": "#528FFF" + }, + "refund": { + "default_refund_speed": "optimum" + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "tnc_accepted": true, + "ip": "233.233.233.234" +}); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +accountId = "acc_GP4lfNA0iIMn5B" +productId = "acc_prd_HEgNpywUFctQ9e" + +Razorpay::Product.edit(accountId, productId, { + "notifications": { + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + }, + "checkout": { + "theme_color": "#528FFF" + }, + "refund": { + "default_refund_speed": "optimum" + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "tnc_accepted": 1, + "ip": "233.233.233.234" +}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[ACCESS_TOKEN]"); + +string accountId = "acc_Z6t7VFTb9xHeOs"; + +string productId = "acc_Z6t7VFTb9xHeOs"; + +Dictionary productRequest = new Dictionary(); +Dictionary notifications = new Dictionary(); +List details = new List(); +details.Add("gaurav.kumar@example.com"); +details.Add("acd@gmail.com"); + +notifications.Add("email", details); + +productRequest.Add("notifications", notifications); + +Dictionary checkout = new Dictionary(); +checkout.Add("theme_color", "#528FFF"); + +productRequest.Add("checkout", checkout); + +Dictionary refund = new Dictionary(); +refund.Add("default_refund_speed", "optimum"); + +productRequest.Add("refund", refund); + +Dictionary settlements = new Dictionary(); +settlements.Add("account_number", "1234567891"); +settlements.Add("ifsc_code", "HDFC0000317"); +settlements.Add("beneficiary_name", "Gaurav Kumar"); + +productRequest.Add("settlements", settlements); +productRequest.Add("tnc_accepted", true); +productRequest.Add("ip", "233.233.233.234"); + +Product product = client.Product.Fetch(accountId, productId).Edit(productRequest); + +``` + +### Response + +```json: PG Success +{ + "requested_configuration": [], + "active_configuration": { + "payment_capture": { + "mode": "automatic", + "refund_speed": "normal", + "automatic_expiry_period": 7200 + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "checkout": { + "theme_color": "#528FFF", + "flash_checkout": true + }, + "refund": { + "default_refund_speed": "optimum" + }, + "notifications": { + "whatsapp": true, + "sms": false, + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + } + }, + "requirements": [ + { + "field_reference": "individual_proof_of_address", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/stakeholders/sth_HVChECMdCsVR9D/documents", + "status": "required", + "reason_code": "document_missing" + }, + { + "field_reference": "individual_proof_of_identification", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/stakeholders/sth_HVChECMdCsVR9D/documents", + "status": "required", + "reason_code": "document_missing" + }, + { + "field_reference": "business_proof_of_identification", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/documents", + "status": "required", + "reason_code": "document_missing" + }, + { + "field_reference": "contact_name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "customer_facing_business_name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "profile.address.operation.street1", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "profile.address.operation.city", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "profile.address.operation.postal_code", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "profile.address.operation.state", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + } + ], + "tnc":{ + "id": "tnc_IgohZaDBHRGjPv", + "accepted": true, + "accepted_at": 1641550798 + }, + "id": "acc_prd_HEgNpywUFctQ9e", + "account_id": "acc_HQVlm3bnPmccC0", + "product_name": "payment_gateway", + "activation_status": "needs_clarification", + "requested_at": 1625478849 +} + +```json: PL Success +{ + "requested_configuration": [], + "active_configuration": { + "payment_capture": { + "mode": "automatic", + "refund_speed": "normal", + "automatic_expiry_period": 7200 + }, + "settlements": { + "account_number": "1234567890", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "checkout": { + "theme_color": "#528FFF", + "flash_checkout": true + }, + "refund": { + "default_refund_speed": "optimum" + }, + "notifications": { + "whatsapp": true, + "sms": false, + "email": [ + "gaurav.kumar@example.com", + "acd@gmail.com" + ] + } + }, + "requirements": [ + { + "field_reference": "individual_proof_of_address", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/stakeholders/sth_HVChECMdCsVR9D/documents", + "status": "required", + "reason_code": "document_missing" + }, + { + "field_reference": "individual_proof_of_identification", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/stakeholders/sth_HVChECMdCsVR9D/documents", + "status": "required", + "reason_code": "document_missing" + }, + { + "field_reference": "business_proof_of_identification", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0/documents", + "status": "required", + "reason_code": "document_missing" + }, + { + "field_reference": "contact_name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "customer_facing_business_name", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "profile.address.operation.street1", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "profile.address.operation.city", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "profile.address.operation.postal_code", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + }, + { + "field_reference": "profile.address.operation.state", + "resolution_url": "/accounts/acc_HQVlm3bnPmccC0", + "status": "required", + "reason_code": "field_missing" + } + ], + "tnc":{ + "id": "tnc_IgohZaDBHRGjPa", + "accepted": true, + "accepted_at": 1641550798 + }, + "id": "acc_prd_HEgNpywUFctQ9f", + "account_id": "acc_HQVlm3bnPmccC0", + "product_name": "payment_links", + "activation_status": "needs_clarification", + "requested_at": 1625478849 +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay. For example, `acc_HQVlm3bnPmccC0`. + +`id` _mandatory_ +: `string` The unique identifier of a product generated by Razorpay. For example, `acc_prd_HEgNpywUFctQ9e`. + +### Parameters + +`notifications` _optional_ +: `object` This denotes the notifications settings. + + `email` + : `string` The email addresses that will receive notifications regarding payments, settlements, daily payment reports, webhooks, and so on. + + `whatsapp` + : `boolean` The WhatsApp notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. + + `sms` + : `boolean` The SMS notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. This attribute will be set to `false`. + +`checkout` _optional_ +: `object` The checkout form of the payment capture. + + `theme_color` + : `string` The theme color for sub-merchant's checkout page + + `logo` + : `string` The logo of the sub-merchant's business on the checkout page. + + `flash_checkout` + : `boolean` The flagging options **Enable** or **Disable** for Razorpay's Flash Checkout to securely save the card details of your customers. + +`refund` _optional_ +: `object` This denotes the payment refund settings. + + `default_refund_speed` + : `string` Speed at which the refund is to be processed. Possible values are: + - normal: Indicates that the refund will be processed at normal speed. By default, the refund will take 5-7 working days. + - optimum: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. That is: + - If the refund can be processed instantly, Razorpay will initiate the process irrespective of the payment method used to make the payment. + - If an instant refund is not made, Razorpay will initiate a refund that is processed at the normal speed. For example, payments made using debit cards, netbanking or unsupported credit cards. + +`settlements` _conditional_ +: `object` The Settlement settings object. + + `account_number` + : `string` The bank account number to which settlements are made. Account details can be found on the Dashboard. For example, 7878780080316316. + + `ifsc_code` + : `string` The IFSC associated with the bank account. For example, `RATN0VAAPIS`. + + `beneficiary_name` + : `string` The name of the beneficiary associated with the bank account. + +`tnc_accepted` _optional_ +: `boolean` Pass this parameter to accept terms and conditions. Send this parameter along with the `ip` parameter when the `tnc` is accepted. Possible value is `true` which indicates acceptance of terms and conditions. + +`ip` _optional_ +: `string` The IP address of the merchant while accepting the terms and conditions. Send this parameter along with the `tnc_accepted` parameter when the `tnc` is accepted. + +`payment_methods` _optional_ +: `object` Details of the payment method you want to enable for the product. + + `netbanking` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `netbanking` payment method. + - `false`: Does not enable the `netbanking` payment method. + + `instrument` + : `object` Details regarding the bank. + + `type` + : `string` The type of bank. Possible values are `retail` and `corporate`. + + `bank` + : `string` The bank code. Refer to the [list of bank codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#netbanking-bank-codes). + + `card` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `card` payment method. + - `false`: Does not enable the `card` payment method. + + `instrument` + : `object` Details regarding the card. + + `type` + : `string` Possible value is `domestic`. + + `issuer` + : `string` The card issuer. Possible values: + - `amex` + - `dicl` + - `maestro` + - `mastercard` + - `rupay` + - `visa` + + `wallet` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `wallet` payment method. + - `false`: Does not enable the `wallet` payment method. + + `instrument` + : `string` The wallet issuer. Possible values are: + - `airtelmoney` + - `amazonpay` + - `jiomoney` + - `mobiwik` + - `mpesa` + - `olamoney` + - `paytm` + - `payzapp` + - `payumoney` + - `phonepe` + - `phonepeswitch` + - `sbibuddy` + + `upi` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `upi` payment method. + - `false`: Does not enable the `upi` payment method. + + `instrument` + : `string` The UPI service provider. Possible values are: + - `google_pay` + - `upi` + + `paylater` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `paylater` payment method. + - `false`: Does not enable the `paylater` payment method. + + `instrument` + : `string` The Paylater service provider. Possible values are: + - `epaylater` + - `getsimpl` + + `emi` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `paylater` payment method. + - `false`: Does not enable the `paylater` payment method. + + `instrument` + : `object` The EMI instrument object. + + `type` + : `string` The type of EMI payment method. Possible values: + - `card_emi` + - `cardless_emi` + + `partner` + : `string` The list of EMI partners requested or enabled. Possible values: + - For `card_emi`: `debit` and `credit`. + - For `cardless_emi`: `zestmoney` and `earlysalary`. + +### Parameters + +`id` +: `string` The unique identifier of a product generated by Razorpay for a sub-merchant account. This id is used to fetch or update a product. + +`product_name` +: `string` The product(s) to be configured. Possible values: + - `payment_gateway` + - `payment_links` + +`tnc` +: `object` It consists of the configuration for the accepted terms and conditions by the merchant for the requested product. If the terms and conditions are accepted by the user for the requested product, it would consist of the following fields: + + `id` + : `string` The unique identifier representing the acceptance of terms and conditions for a product by a user. + + `accepted` + : `boolean` The flag that represents whether the terms and conditions are accepted by the user. + - `true`: Terms and conditions are accepted by user. + - `false`: Terms and conditions are not accepted by user. + + `accepted_at` + : `integer` The Unix timestamp at which the terms and conditions were accepted by the user for the requested product. + +`activation_status` +: `string` The status of the [product activation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/product-activation.md). + - `requested` + - `needs_clarification` + - `under_review` + - `activated` + - `suspended` + +`active_configuration` +: `object` The configuration of the product that has been set as active. + + `payment_methods` + : `object` The payment methods configured, such as, netbanking, UPI, Wallet and EMI. + + `upi` + : `object` The UPI type payment method. + + `status` + : `string` The status of UPI payment method. + + `instrument` + : `array` The list of UPI instruments requested or enabled. + + `netbanking` + : `object` The netbanking type payment method. + + `status` + : `string` The status of the netbanking payment method. + + `instrument` + : `array` The netbanking instrument object. + + `type` + : `string` The type of netbanking payment method. Possible values: + + - Retail + + - Corporate + + `bank` + : `array` The list of netbanking banks requested or enabled. Refer the [Appendix](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#netbanking-bank-codes) page for netbanking bank codes. + + `wallet` + : `object` The Wallet type payment method. + + `status` + : `string` The status of the Wallet payment method. + + `instrument` + : `array` The list of Wallet instruments requested or enabled. + + `emi` + : `string` The EMI type payment method. + + `status` + : `string` The status of EMI payment method. + + `instrument` + : `array` The EMI instrument object. + + `type` + : `string` The type of EMI payment method. Possible values: + - `card_emi` + - `cardless_emi` + + `partner` + : `array` The list of EMI partners requested or enabled. Possible values: + - For `card_emi`: `debit` and `credit`. + - For `cardless_emi`: `zestmoney` and `earlysalary`. + + `paylater` + : `object` The payment method to be enabled. + + `enabled` + : `boolean` Enables or disables the payment method. Possible values: + - `true`: Enables the `paylater` payment method. + - `false`: Does not enable the `paylater` payment method. + + `instrument` + : `string` The Paylater service provider. Possible values are: + - `epaylater` + - `getsimpl` + + `payment_capture` + : `object` The payment capture settings object. + + `mode` + : `string` The mode through which payment capture is done. Possible values: + - `automatic`: Payments are auto-captured (default) + - `manual`: You have to manually capture payments using our Capture API or from the Partner's Dashboard. + + `automatic_expiry` + : `numeric` This denotes the time in minutes when the payment is in the authorized state. This is auto-captured. + + `manual_expiry` + : `numeric` This denotes the time in minutes until you can manually capture payments in the authorized state. + - Must be equal to or greater than the `automatic_expire_period` value. + - The default and the maximum value is 7200 minutes. + - The payments in the authorized state after the `manual_expiry_period` are auto-refunded. + + `settlements` + : `object` The Settlement settings object. + + `account_number` + : `string` The bank account number to which settlements are made. Account details can be found on the Dashboard. For example, 7878780080316316. + + `ifsc_code` + : `string` The IFSC associated with the bank account. For example, `RATN0VAAPIS`. + + `beneficiary_name` + : `string` The name of the beneficiary associated with the bank account. This API parameter is needed complete the KYC process. However, it is optional for this API. + + `refund` + : `object` This denotes the payment refund settings. + + `default_refund_speed` + : `string` Speed at which the refund is to be processed. Possible values are: + - normal: Indicates that the refund will be processed at the normal speed. By default, the refund will take 5-7 working days. + - optimum: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. That is: + - If the refund can be processed instantly, Razorpay will initiate the process irrespective of the payment method used to make the payment. + - If an instant refund is not made, Razorpay will initiate a refund that is processed at the normal speed. For example, payments made using debit cards, netbanking or unsupported credit cards. + + `checkout` + : `object` The checkout form of the payment capture. + + `theme_color` + : `string` The theme color for sub-merchant's checkout page + + `logo` + : `string` The logo of the sub-merchant's business on the checkout page. + + `flash_checkout` + : `boolean` The flagging options **Enable** or **Disable** for Razorpay's Flash Checkout to securely save the card details of your customers. + + `notifications` + : `object` This denotes the notifications settings. + + `email` + : `string` The email addresses that will receive notifications regarding payments, settlements, daily payment reports, webhooks, and so on. + + `whatsapp` + : `boolean` The WhatsApp notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. + + `sms` + : `boolean` The SMS notifications you receive regarding payments, settlements, daily payment reports, webhooks, etc. This attribute will be set to `false`. + +`requested_configuration` +: `object` The configuration of the product requested by the user that is yet to be set as active. + +`requirements` +: `object` The list of requirements to be enabled for this product or some of the configurations under this product. + + `field_reference` + : `string` The field which is in issue or missing. The JSON key path in resolution URL. + + `resolution_url` + : `string` The URL to address the requirement. The API endpoint to be used for updating missing fields or documents. + + `status` + : `string` The status of the requirement. + + `reason_code` + : `string` The reason code for showing in the requirement. Description will be sent only when reason code is "". Possible values are: + - `field_missing` + - `needs_clarification` + - `document_missing` + + `description` + : `string` This parameter is displayed when the reason_code is `needs_clarification`. + +`requested_at` +: `integer` The Unix timestamp at which the product configuration is requested. diff --git a/llm-content/api/partners/stakeholder.md b/llm-content/api/partners/stakeholder.md new file mode 100644 index 00000000..f6bb6125 --- /dev/null +++ b/llm-content/api/partners/stakeholder.md @@ -0,0 +1,35 @@ +--- +title: Stakeholder APIs +description: Use the Stakeholder APIs to add stakeholders for an account. +--- + +# Stakeholder APIs + +You can use the Stakeholder APIs to add a stakeholder for an account. Each stakeholder will have their KYC. A stakeholder can be a signatory or an owner of the business. + +Fork the Razorpay Postman Public Workspace and try the Stakeholder APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md#api-authentication/). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-d1f55eac-11ca-49b6-92cc-2fb96ceb0f5e) + +### Related Guides + +[Sub-merchant Onboarding APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/webhooks.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners.md) + +### Endpoints + + - **post** `/v2/accounts/:account_id/stakeholders` - Create a Stakeholder: + Creates a stakeholder. + + + - **get** `/v2/accounts/:account_id/stakeholders/:stakeholder_id` - Fetch a Stakeholder With ID: + Retrieves the details of a stakeholder. + + + - **get** `/v2/accounts/:account_id/stakeholders` - Fetch All Stakeholders: + Retrieves the details of all stakeholders. + + + - **patch** `/v2/accounts/:account_id/stakeholders/:stakeholder_id` - Update a Stakeholder: + Updates a stakeholder. diff --git a/llm-content/api/partners/stakeholder/create.md b/llm-content/api/partners/stakeholder/create.md new file mode 100644 index 00000000..4e909c41 --- /dev/null +++ b/llm-content/api/partners/stakeholder/create.md @@ -0,0 +1,429 @@ +--- +title: Create a Stakeholder | Sub-Merchant Onboarding APIs +heading: Create a Stakeholder +description: Create a Stakeholder using Razorpay Partners APIs. +--- + +# Create a Stakeholder + +## Create a Stakeholder + +Use this API endpoint to create a stakeholder. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +### Request + +```cURL: Curl +curl -X POST https://api.razorpay.com/v2/accounts/acc_GLGeLkU2JUeyDZ/stakeholders \ +-u \ +-H "Content-Type: application/json" \ +-d '{ + "percentage_ownership": 10, + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "relationship": { + "director": true, + "executive": false + }, + "phone": { + "primary": "9000090000", + "secondary": "9000090000" + }, + "addresses": { + "residential": { + "street": "506, Koramangala 1st block", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": "560034", + "country": "IN" + } + }, + "kyc": { + "pan": "AVOPB1111K" + }, + "notes": { + "random_key_by_partner": "random_value" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accountId = "acc_GP4lfNA0iIMn5B"; + +JSONObject StakeRequest = new JSONObject(); +StakeRequest.put("email","gauri.kumari@example.com"); +StakeRequest.put("percentage_ownership",10); +StakeRequest.put("name","Gauri Kumari"); + +JSONObject relationship = new JSONObject(); +relationship.put("director",true); +relationship.put("executive",false); + +StakeRequest.put("relationship",relationship); + +JSONObject phone = new JSONObject(); +phone.put("primary","9000090000"); +phone.put("secondary","9000090000"); + +StakeRequest.put("phone",phone); + +JSONObject residential = new JSONObject(); +residential.put("street","507, Koramangala 6th block"); +residential.put("city","Bengaluru"); +residential.put("state","Karnataka"); +residential.put("postal_code","560047"); +residential.put("country","IN"); + +JSONObject addresses = new JSONObject(); +addresses.put("residential",residential); +StakeRequest.put("addresses",addresses); + +JSONObject kyc = new JSONObject(); +kyc.put("pan","AVOPB1111K"); + +StakeRequest.put("kyc",kyc); + +JSONObject notes = new JSONObject(); +notes.put("random_key_by_partner","random_value"); + +StakeRequest.put("notes",notes); + +Stakeholder stakeholder = instance.stakeholder.create(accountId, StakeRequest); + +```php: PHP + +$api = new Api(null, null, ""); + +$accountId = "acc_GP4lfNA0iIMn5B"; + +$stakeholders = $api->account->fetch($accountId)->stakeholders(); + +$stakeholders->create(array( + "percentage_ownership" => 10, + "name" => "Gaurav Kumar", + "email" => "gaurav.kumarr@example.com", + "relationship" => array( + "director" => true, + "executive" => false + ), + "phone" => array( + "primary" => "7474747474", + "secondary" => "7474747474" + ), + "addresses" => array( + "residential" => array( + "street" => "506, Koramangala 1st block", + "city" => "Bengaluru", + "state" => "Karnataka", + "postal_code" => "560034", + "country" => "IN" + ) + ), + "kyc" => array( + "pan" => "AVOPB1111K" + ), + "notes" => array( + "random_key_by_partner" => "random_value" + ) +)); + +```javascript: Node.js + +const instance = new Razorpay({ + oauthToken: "" +); + +const accountId = "acc_GP4lfNA0iIMn5B"; + +instance.stakeholders.create(accountId, { + "percentage_ownership": 10, + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "relationship": { + "director": true, + "executive": false + }, + "phone": { + "primary": "7474747474", + "secondary": "7474747474" + }, + "addresses": { + "residential": { + "street": "506, Koramangala 1st block", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": "560034", + "country": "IN" + } + }, + "kyc": { + "pan": "AVOPB1111K" + }, + "notes": { + "random_key_by_partner": "random_value" + } +}); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +accountId = "acc_GP4lfNA0iIMn5B" + +Razorpay::Stakeholder.create(accountId, { + "percentage_ownership": 10, + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "relationship": { + "director": 1, + "executive": 0 + }, + "phone": { + "primary": "7474747474", + "secondary": "7474747474" + }, + "addresses": { + "residential": { + "street": "506, Koramangala 1st block", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": "560034", + "country": "IN" + } + }, + "kyc": { + "pan": "AVOPB1111K" + }, + "notes": { + "random_key_by_partner": "random_value" + } +}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[ACCESS_TOKEN]"); + +string accountId = "acc_ua2tBezhcEBvap"; + +Dictionary StakeRequest = new Dictionary(); +StakeRequest.Add("email", "gauriagain.kumar@example.org"); +StakeRequest.Add("percentage_ownership", 10); +StakeRequest.Add("name", "Gaurav Kumar"); + +Dictionary relationship = new Dictionary(); +relationship.Add("director", true); +relationship.Add("executive", false); + +StakeRequest.Add("relationship", relationship); + +Dictionary phone = new Dictionary(); +phone.Add("primary", "9999999999"); +phone.Add("secondary", "9999999999"); + +StakeRequest.Add("phone", phone); + +Dictionary residential = new Dictionary(); +residential.Add("street", "507, Koramangala 6th block"); +residential.Add("city", "Bengaluru"); +residential.Add("state", "Karnataka"); +residential.Add("postal_code", "560047"); +residential.Add("country", "IN"); + +Dictionary addresses = new Dictionary(); +addresses.Add("residential", residential); +StakeRequest.Add("addresses", addresses); + +Dictionary kyc = new Dictionary(); +kyc.Add("pan", "AVOPB1111K"); + +StakeRequest.Add("kyc", kyc); + +Dictionary notes = new Dictionary(); +notes.Add("random_key_by_partner", "random_value"); + +StakeRequest.Add("notes", notes); + +Stakeholder stakeholder = client.Stakeholder.Create(accountId, StakeRequest); + +``` + +### Response + +```json: Success +{ + "entity": "stakeholder", + "relationship": { + "director": true + }, + "phone": { + "primary": "9000090000", + "secondary": "9000090000" + }, + "notes": { + "random_key_by_partner": "random_value" + }, + "kyc": { + "pan": "AVOPB1111K" + }, + "id": "sth_GLGgm8fFCKc92m", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "percentage_ownership": 10, + "addresses": { + "residential": { + "street": "506, Koramangala 1st block", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": "560034", + "country": "IN" + } + } +} +``` + +### Parameters + +`account_id` +: `string` The unique identifier of the sub-merchant account generated by Razorpay. For example, `acc_GLGeLkU2JUeyDZ`. This id is used to fetch or update a stakeholder. The stakeholder is created for this sub-merchant account id. + +### Parameters + +`name` _mandatory_ +: `string` The stakeholder's name as per the PAN card. The maximum length is 255 characters. + +`email` +: `string` The stakeholder's email address. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + +`percentage_ownership`_optional_ +: `float` The stakeholder's ownership of the business in percentage. Only two decimal places are allowed. For example, `87.55`. The maximum length is 100 characters. + +`relationship` +: `object` The stakeholder's relationship with the account's business. + + `director` + : `boolean` Determines if stakeholder is a director of the account's legal entity. + - `true`: Stakeholder is a director. + - `false` (default): Stakeholder is not a director. + `executive` + : `boolean` Determines if the stakeholder is an executive of the account's legal entity. + - `true`: Stakeholder is an executive. + - `false` (false): Stakeholder is not an executive. + +`phone` _optional_ +: `object` The stakeholder's phone number. + + `primary`_optional_ + : `integer` The primary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + + `secondary`_optional_ + : `integer` The secondary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + +`addresses` _optional_ +: `object` Details of stakeholder's address. + + `residential` + : `object` Details of the stakeholder's residential address. + + `street` _optional_ + : `string` The stakeholder's street address. The minimum length is 10 characters and maximum length is 255. + + `city` _optional_ + : `string` The city. The minimum length is 2 and maximum length is 32. + + `state` _optional_ + : `string` The state. The minimum length is 2 and maximum length is 32. + + `postal_code` _optional_ + : `string` The postal code. The minimum length is 2 and maximum length is 10. + + `country` _optional_ + : `string` The country. The minimum length is 2 and maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + +`kyc` _conditional_ +: `object` The type of document required to establish the stakeholder's identity. + + `pan` + : `string` The PAN number of the stakeholder. + + - This is a 10-digit alphanumeric code. For example, `AVOPB1111K`. + - **Regex to validate Stakeholder PAN**: `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`. + - **Validation for Stakeholder PAN**: The 4th digit should be 'P'. + - If the business type is HUF, the karta's PAN should be provided. + +`notes` _optional_ +: `object` Contains user-defined fields stored by the partner for reference purposes. Maximum 15 key-value pairs, 512 characters (maximum) each. + +### Parameters + +`id` +: `string` The unique identifier of the stakeholder whose details are created. For example, `sth_GLGgm8fFCKc92m`. + +`percentage_ownership` +: `float` The stakeholder's ownership of the business in percentage. Only two decimal places are allowed. For example, `87.55`. The maximum length is 100 characters. + +`name` +: `string` The stakeholder's name as per the PAN card. The maximum length is 255 characters. + +`email` +: `string` The stakeholder's email address. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + +`relationship` +: `object` The stakeholder's relationship with the account's business. + `director` + : `boolean` Determines if stakeholder is a director of the account's legal entity. + - `true`: Stakeholder is a director. + - `false` (default): Stakeholder is not a director. + `executive` + : `boolean` Determines if the stakeholder is an executive of the account's legal entity. + - `true`: Stakeholder is an executive. + - `false` (false): Stakeholder is not an executive. + +`phone` +: `object` The stakeholder's phone number. + + `primary` + : `integer` The primary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + + `secondary` + : `integer` The secondary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + +`addresses` +: `object` Details of stakeholder's address. + + `residential` + : `string` Details of the stakeholder's residential address. + + `street` + : `string` The stakeholder's street address. The minimum length is 10 characters and maximum length is 255. + + `city` + : `string` The city. The minimum length is 2 and maximum length is 32. + + `state` + : `string` The state. The minimum length is 2 and maximum length is 32. + + `postal_code` + : `string` The postal code. The minimum length is 2 and maximum length is 10. + + `country` + : `string` The country. The minimum length is 2 and maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + +`kyc` +: `object` The type of document required to establish the stakeholder's identity. + + `pan` + : `string` The PAN number of the stakeholder. + + - This is a 10-digit alphanumeric code. For example, `AVOPB1111K`. + - **Regex to validate Stakeholder PAN**: `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/` + - **Validation for Stakeholder PAN**: The 4th digit should be 'P'. + + - If the business type is HUF, the karta's PAN should be provided. + - This API parameter might be required to complete the KYC process, however, it is optional for this API. + +`notes` +: `object` Contains user-defined fields stored by the partner for reference purposes. It can hold a maximum of 15 key-value pairs, 512 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. diff --git a/llm-content/api/partners/stakeholder/entity.md b/llm-content/api/partners/stakeholder/entity.md new file mode 100644 index 00000000..b4d3b1c4 --- /dev/null +++ b/llm-content/api/partners/stakeholder/entity.md @@ -0,0 +1,127 @@ +--- +title: Stakeholder Entity +description: Entity parameters and sample code for Stakeholders API. +--- + +# Stakeholder Entity + +The Stakeholder entity has the following parameters: + +### Response + +```json: Entity +{ + "entity": "stakeholder", + "relationship": { + "executive": true + }, + "phone": { + "primary": "9000090000", + "secondary": "9000090000" + }, + "notes": { + "random_key_by_partner": "random_value" + }, + "kyc": { + "pan": "AVOPB1111K" + }, + "id": "sth_GLGgm8fFCKc92m", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "percentage_ownership": 10, + "addresses": { + "residential": { + "street": "506, Koramangala 1st block", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": "560034", + "country": "IN" + } + } +} +``` + +### Parameters + +`id` +: `string` The unique identifier of a stakeholder generated by Razorpay, used to fetch or update a stakeholder. For example, `sth_GLGgm8fFCKc92m`. Maximum length supported is 18 characters. + +`entity` +: `string` Here it is `stakeholder`. + +`percentage_ownership` +: `float` The stakeholder's ownership of the business in percentage. Only two decimal places are allowed. For example, `87.55`. The maximum length is 100 characters. + +`name` +: `string` The stakeholder's name as per the PAN card. The maximum length is 255 characters. + +`email` +: `string` The stakeholder's email address. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + +`relationship` +: `object` The stakeholder's relationship with the account's business. + `director` + : `boolean` Determines if stakeholder is a director of the account's legal entity. + - `true`: Stakeholder is a director. + - `false` (default): Stakeholder is not a director. + `executive` + : `boolean` Determines if the stakeholder is an executive of the account's legal entity. + - `true`: Stakeholder is an executive. + - `false` (false): Stakeholder is not an executive. + +`phone` +: `object` The stakeholder's phone number. + + `primary` + : `integer` The primary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + + `secondary` + : `integer` The secondary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + +`addresses` +: `object` Details of stakeholder's address. + + `residential` + : `string` Details of the stakeholder's residential address. + + `street` + : `string` The stakeholder's street address. The minimum length is 10 characters and maximum length is 255. + + `city` + : `string` The city. The minimum length is 2 and maximum length is 32. + + `state` + : `string` The state. The minimum length is 2 and maximum length is 32. + + `postal_code` + : `string` The postal code. The minimum length is 2 and maximum length is 10. + + `country` + : `string` The country. The minimum length is 2 and maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + +`kyc` +: `object` The type of document required to establish the stakeholder's identity. + + `pan` + : `string` The PAN number of the stakeholder. + + - This is a 10-digit alphanumeric code. For example, `AVOPB1111K`. + - **Regex to validate Stakeholder PAN**: `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/` + - **Validation for Stakeholder PAN**: The 4th digit should be 'P'. + + - If the business type is HUF, the karta's PAN should be provided. + +> **INFO** +> +> +> **Handy Tip** +> +> To complete the KYC process, this API parameter might be required, but it is optional for this API. +> + + +`notes` +: `object` Contains user-defined fields stored by the partner for reference purposes. It can hold a maximum of 15 key-value pairs, 512 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. diff --git a/llm-content/api/partners/stakeholder/fetch-all.md b/llm-content/api/partners/stakeholder/fetch-all.md new file mode 100644 index 00000000..90d221fc --- /dev/null +++ b/llm-content/api/partners/stakeholder/fetch-all.md @@ -0,0 +1,177 @@ +--- +title: Fetch All Stakeholder | Sub-Merchant Onboarding APIs +heading: Fetch All Stakeholders +description: Fetch all Stakeholders using Razorpay Partners APIs. +--- + +# Fetch All Stakeholders + +## Fetch All Stakeholders + +Use this endpoint to retrieve the details of all stakeholders for a given account. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +### Request + +```cURL: Curl +curl -X GET https://api.razorpay.com/v2/accounts/acc_GLGeLkU2JUeyDZ/stakeholders \ +-u \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accountId = "acc_GP4lfNA0iIMn5B"; + +List stakeholder = instance.stakeholder.fetchAll(accountId); + +```php: PHP +$api = new Api(null, null, ""); + +$accountId = "acc_GP4lfNA0iIMn5B"; + +$stakeholders = $api->account->fetch($accountId)->stakeholders(); + +$stakeholders->all(); + +```javascript: Node.js + +const instance = new Razorpay({ + oauthToken: "" +); + +const accountId = "acc_GP4lfNA0iIMn5B"; + +instance.stakeholders.all(accountId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +accountId = "acc_GP4lfNA0iIMn5B"; + +Razorpay::Stakeholder.all(accountId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[ACCESS_TOKEN]"); + +string accountId = "acc_ua2tBezhcEBvap"; + +List stakeholder = client.Stakeholder.All(accountId); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "items": [ + { + "id": "GZ13yPHLJof9IE", + "entity": "stakeholder", + "relationship": { + "director": true + }, + "phone": { + "primary": "9000090000", + "secondary": "9000090000" + }, + "notes": { + "random_key_by_partner": "random_value" + }, + "kyc": { + "pan": "AVOPB1111K" + }, + "name": "Gaurav Kumar", + "email": "gaurav.kumar@acme.org", + "percentage_ownership": 10, + "addresses": { + "residential": { + "street": "506, Koramangala 1st block", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": "560034", + "country": "in" + } + } + } + ], + "count": 1 +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay. For example, `acc_GLGeLkU2JUeyDZ`. + +### Parameters + +`id` +: `string` The unique identifier of a stakeholder generated by Razorpay, used to fetch or update a stakeholder. For example, `sth_GLGgm8fFCKc92m`. Maximum length supported is 18 characters. + +`percentage_ownership` +: `float` The stakeholder's ownership of the business in percentage. Only two decimal places are allowed. For example, `87.55`. The maximum length is 100 characters. + +`name` +: `string` The stakeholder's name as per the PAN card. The maximum length is 255 characters. + +`email` +: `string` The stakeholder's email address. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + +`relationship` +: `object` The stakeholder's relationship with the account's business. + `director` + : `boolean` Determines if stakeholder is a director of the account's legal entity. + - `true`: Stakeholder is a director. + - `false` (default): Stakeholder is not a director. + `executive` + : `boolean` Determines if the stakeholder is an executive of the account's legal entity. + - `true`: Stakeholder is an executive. + - `false` (false): Stakeholder is not an executive. + +`phone` +: `object` The stakeholder's phone number. + + `primary` + : `integer` The primary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + + `secondary` + : `integer` The secondary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + +`addresses` +: `object` Details of stakeholder's address. + + `residential` + : `string` Details of the stakeholder's residential address. + + `street` + : `string` The stakeholder's street address. The minimum length is 10 characters and maximum length is 255. + + `city` + : `string` The city. The minimum length is 2 and maximum length is 32. + + `state` + : `string` The state. The minimum length is 2 and maximum length is 32. + + `postal_code` + : `string` The postal code. The minimum length is 2 and maximum length is 10. + + `country` + : `string` The country. The minimum length is 2 and maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + +`kyc` +: `object` The type of document required to establish the stakeholder's identity. + + `pan` + : `string` The PAN number of the stakeholder. + + - This is a 10-digit alphanumeric code. For example, `AVOPB1111K`. + - **Regex to validate Stakeholder PAN**: `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/` + - **Validation for Stakeholder PAN**: The 4th digit should be 'P'. + + - If the business type is HUF, the karta's PAN should be provided. + - This API parameter might be required to complete the KYC process, however, it is optional for this API. + +`notes` +: `object` Contains user-defined fields stored by the partner for reference purposes. It can hold a maximum of 15 key-value pairs, 512 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. diff --git a/llm-content/api/partners/stakeholder/fetch-with-id.md b/llm-content/api/partners/stakeholder/fetch-with-id.md new file mode 100644 index 00000000..a01dd516 --- /dev/null +++ b/llm-content/api/partners/stakeholder/fetch-with-id.md @@ -0,0 +1,183 @@ +--- +title: Fetch a Stakeholder With ID | Sub-Merchant Onboarding APIs +heading: Fetch a Stakeholder With ID +description: Fetch a Stakeholder using Razorpay Partners APIs. +--- + +# Fetch a Stakeholder With ID + +## Fetch a Stakeholder With ID + +Use this endpoint to retrieve the details of a stakeholder. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +### Request + +```cURL: Curl +curl -u : \ +- X GET https://api.razorpay.com/v2/accounts/acc_GLGeLkU2JUeyDZ/stakeholders/sth_GOQ4Eftlz62TSL \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accountId = "acc_GP4lfNA0iIMn5B"; + +String stakeholderId = "sth_GOQ4Eftlz62TSL"; + +Stakeholder stakeholder = instance.stakeholder.fetch(accountId, stakeholderId); + +```php: PHP + +$api = new Api(null, null, ""); + +$accountId = "acc_GP4lfNA0iIMn5B"; +$stakeholderId = "sth_GOQ4Eftlz62TSL"; + +$stakeholders = $api->account->fetch($accountId)->stakeholders(); + +$stakeholders->fetch($stakeholderId); + +```javascript: Node.js + +const instance = new Razorpay({ + oauthToken: "" +); + +const accountId = "acc_GP4lfNA0iIMn5B"; +const stakeholderId = "sth_GOQ4Eftlz62TSL"; + +instance.stakeholders.fetch(accountId, stakeholderId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +accountId = "acc_GP4lfNA0iIMn5B"; + +stakeholderId = "sth_GOQ4Eftlz62TSL"; + +Razorpay::Stakeholder.fetch(accountId, stakeholderId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[ACCESS_TOKEN]"); + +string accountId = "acc_ua2tBezhcEBvap"; + +string stakeholderId = "sth_ua2tBezhcEBvap"; + +Stakeholder stakeholder = client.Stakeholder.Fetch(accountId, stakeholderId); +``` + +### Response + +```json: Success +{ + "entity": "stakeholder", + "relationship": { + "director": true + }, + "phone": { + "primary": "9000090000", + "secondary": "9000090000" + }, + "notes": { + "random_key_by_partner": "random_value2" + }, + "kyc": { + "pan": "AVOPB1111J" + }, + "id": "sth_GOQ4Eftlz62TSL", + "name": "Gauri Kumar", + "email": "gauri@example.com", + "percentage_ownership": 20, + "addresses": { + "residential": { + "street": "507, Koramangala 1st block", + "city": "Bangalore", + "state": "Karnataka", + "postal_code": "560035", + "country": "in" + } + } +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay. For example, `acc_GLGeLkU2JUeyDZ`. + +`id` +: `string` The unique identifier of the stakeholder whose details are to be fetched. For example, `sth_GOQ4Eftlz62TSL`. + +### Parameters + +`id` +: `string` The unique identifier of a stakeholder generated by Razorpay, used to fetch or update a stakeholder. For example, `sth_GLGgm8fFCKc92m`. Maximum length supported is 18 characters. + +`percentage_ownership` +: `float` The stakeholder's ownership of the business in percentage. Only two decimal places are allowed. For example, `87.55`. The maximum length is 100 characters. + +`name` +: `string` The stakeholder's name as per the PAN card. The maximum length is 255 characters. + +`email` +: `string` The stakeholder's email address. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + +`relationship` +: `object` The stakeholder's relationship with the account's business. + `director` + : `boolean` Determines if stakeholder is a director of the account's legal entity. + - `true`: Stakeholder is a director. + - `false` (default): Stakeholder is not a director. + `executive` + : `boolean` Determines if the stakeholder is an executive of the account's legal entity. + - `true`: Stakeholder is an executive. + - `false` (false): Stakeholder is not an executive. + +`phone` +: `object` The stakeholder's phone number. + + `primary` + : `integer` The primary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + + `secondary` + : `integer` The secondary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + +`addresses` +: `object` Details of stakeholder's address. + + `residential` + : `string` Details of the stakeholder's residential address. + + `street` + : `string` The stakeholder's street address. The minimum length is 10 characters and maximum length is 255. + + `city` + : `string` The city. The minimum length is 2 and maximum length is 32. + + `state` + : `string` The state. The minimum length is 2 and maximum length is 32. + + `postal_code` + : `string` The postal code. The minimum length is 2 and maximum length is 10. + + `country` + : `string` The country. The minimum length is 2 and maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + +`kyc` +: `object` The type of document required to establish the stakeholder's identity. + + `pan` + : `string` The PAN number of the stakeholder. + + - This is a 10-digit alphanumeric code. For example, `AVOPB1111K`. + - **Regex to validate Stakeholder PAN**: `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/` + - **Validation for Stakeholder PAN**: The 4th digit should be 'P'. + + - If the business type is HUF, the karta's PAN should be provided. + - This API parameter might be required to complete the KYC process, however, it is optional for this API. + +`notes` +: `object` Contains user-defined fields stored by the partner for reference purposes. It can hold a maximum of 15 key-value pairs, 512 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. diff --git a/llm-content/api/partners/stakeholder/update.md b/llm-content/api/partners/stakeholder/update.md new file mode 100644 index 00000000..e5707670 --- /dev/null +++ b/llm-content/api/partners/stakeholder/update.md @@ -0,0 +1,435 @@ +--- +title: Update a Stakeholder | Sub-Merchant Onboarding APIs +heading: Update a Stakeholder +description: Update a Stakeholder using Razorpay Partners APIs. +--- + +# Update a Stakeholder + +## Update a Stakeholder + +Use this endpoint to update the details of a stakeholder. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +The information you can update for a stakeholder using the Update a Stakeholder API differs based on the [product activation status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md#product-activation-status-and-updates-permitted). + +> **WARN** +> +> +> Currently, we do not support making concurrent requests to the following Onboarding APIs including their combination on the same `account_id`: +> - [Update Account API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/update.md) +> - Update Stakeholder API +> - [Update Product Configuration API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/update-settlement-account-details.md) +> +> Please wait for the response of these APIs before making subsequent requests. +> + +### Request + +```cURL: Curl +curl -X PATCH https://api.razorpay.com/v2/accounts/acc_GLGeLkU2JUeyDZ/stakeholders/sth_GOQ4Eftlz62TSL \ +-u \ +-H "Content-Type: application/json" \ +-d '{ + "percentage_ownership": 20, + "name": "Gauri Kumar", + "relationship": { + "director": false, + "executive": true + }, + "phone": { + "primary": "9000090000", + "secondary": "9000090000" + }, + "addresses": { + "residential": { + "street": "507, Koramangala 1st block", + "city": "Bangalore", + "state": "Karnataka", + "postal_code": "560035", + "country": "IN" + } + }, + "kyc": { + "pan": "AVOPB1111J" + }, + "notes": { + "random_key_by_partner": "random_value2" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accountId = "acc_GP4lfNA0iIMn5B"; + +String stakeholderId = "sth_GOQ4Eftlz62TSL"; + +JSONObject StakeRequest = new JSONObject(); +StakeRequest.put("email","gauri.kumari@example.com"); +StakeRequest.put("percentage_ownership",10); +StakeRequest.put("name","Gauri Kumari"); + +JSONObject relationship = new JSONObject(); +relationship.put("director",true); +relationship.put("executive",false); + +StakeRequest.put("relationship",relationship); + +JSONObject phone = new JSONObject(); +phone.put("primary","9000090000"); +phone.put("secondary","9000090000"); + +StakeRequest.put("phone",phone); + +JSONObject residential = new JSONObject(); +residential.put("street","507, Koramangala 6th block"); +residential.put("city","Bengaluru"); +residential.put("state","Karnataka"); +residential.put("postal_code","560047"); +residential.put("country","IN"); + +JSONObject addresses = new JSONObject(); +addresses.put("residential",residential); +StakeRequest.put("addresses",addresses); + +JSONObject kyc = new JSONObject(); +kyc.put("pan","AVOPB1111K"); + +StakeRequest.put("kyc",kyc); + +JSONObject notes = new JSONObject(); +notes.put("random_key_by_partner","random_value"); + +StakeRequest.put("notes",notes); + +Stakeholder stakeholder = instance.stakeholder.edit(accountId, stakeholderId, StakeRequest); + +```php: PHP +$api = new Api(null, null, ""); + +$accountId = "acc_GP4lfNA0iIMn5B"; +$stakeholderId = "sth_GOQ4Eftlz62TSL"; + +$stakeholders = $api->account->fetch($accountId)->stakeholders(); + +$stakeholders->edit($stakeholderId, array( + "percentage_ownership" => 20, + "name" => "Gauri Kumar", + "relationship" => array( + "director" => false, + "executive" => true + ), + "phone" => array( + "primary" => "9898989898", + "secondary" => "9898989898" + ), + "addresses" => array( + "residential" => array( + "street" => "507, Koramangala 1st block", + "city" => "Bangalore", + "state" => "Karnataka", + "postal_code" => "560035", + "country" => "IN" + ) + ), + "kyc" => array( + "pan" => "AVOPB1111J" + ), + "notes" => array( + "random_key_by_partner" => "random_value2" + ) +)); + +```javascript: Node.js + +const instance = new Razorpay({ + oauthToken: "" +); + +const accountId = "acc_GP4lfNA0iIMn5B"; +const stakeholderId = "sth_GOQ4Eftlz62TSL"; + +instance.stakeholders.edit(accountId, stakeholderId, { + "percentage_ownership": 20, + "name": "Gauri Kumar", + "relationship": { + "director": false, + "executive": true + }, + "phone": { + "primary": "9898989898", + "secondary": "9898989898" + }, + "addresses": { + "residential": { + "street": "507, Koramangala 1st block", + "city": "Bangalore", + "state": "Karnataka", + "postal_code": "560035", + "country": "IN" + } + }, + "kyc": { + "pan": "AVOPB1111J" + }, + "notes": { + "random_key_by_partner": "random_value2" + } +}); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +accountId = "acc_GP4lfNA0iIMn5B"; +stakeholderId = "sth_GOQ4Eftlz62TSL"; + +Razorpay::Stakeholder.edit(accountId, stakeholderId, { + "percentage_ownership": 20, + "name": "Gauri Kumar", + "relationship": { + "director": 0, + "executive": 1 + }, + "phone": { + "primary": "9898989898", + "secondary": "9898989898" + }, + "addresses": { + "residential": { + "street": "507, Koramangala 1st block", + "city": "Bangalore", + "state": "Karnataka", + "postal_code": "560035", + "country": "IN" + } + }, + "kyc": { + "pan": "AVOPB1111J" + }, + "notes": { + "random_key_by_partner": "random_value2" + } +}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[ACCESS_TOKEN]"); + +Dictionary StakeRequest = new Dictionary(); +StakeRequest.Add("percentage_ownership", 10); +StakeRequest.Add("name", "Gaurav Kumar"); + +Dictionary relationship = new Dictionary(); +relationship.Add("director", true); +relationship.Add("executive", false); + +StakeRequest.Add("relationship", relationship); + +Dictionary phone = new Dictionary(); +phone.Add("primary", "9999999999"); +phone.Add("secondary", "9999999999"); + +StakeRequest.Add("phone", phone); + +Dictionary residential = new Dictionary(); +residential.Add("street", "507, Koramangala 6th block"); +residential.Add("city", "Bengaluru"); +residential.Add("state", "Karnataka"); +residential.Add("postal_code", "560047"); +residential.Add("country", "IN"); + +Dictionary addresses = new Dictionary(); +addresses.Add("residential", residential); +StakeRequest.Add("addresses", addresses); + +Dictionary kyc = new Dictionary(); +kyc.Add("pan", "AVOPB1111K"); + +StakeRequest.Add("kyc", kyc); + +Dictionary notes = new Dictionary(); +notes.Add("random_key_by_partner", "random_value"); + +StakeRequest.Add("notes", notes); + +string accountId = "acc_ua2tBezhcEBvap"; +string stakeholderId = "sth_ua2tBezhcEBvap"; + +Stakeholder stakeholder = client.Stakeholder.Fetch(accountId, stakeholderId).Edit(accountId, StakeRequest); +``` + +### Response + +```json: Success +{ + "id": "acc_GP4lfNA0iIMn5B", + "type": "standard", + "status": "created", + "email": "gauri.kumari@example.com", + "profile": { + "category": "healthcare", + "subcategory": "clinic", + "addresses": { + "registered": { + "street1": "507, Koramangala 1st block", + "street2": "MG Road-1", + "city": "Bengalore", + "state": "KARNATAKA", + "postal_code": "560034", + "country": "IN" + } + } + }, + "notes": [], + "created_at": 1610603081, + "phone": "9000090000", + "reference_id": "randomId", + "business_type": "partnership", + "legal_business_name": "Acme Corp", + "customer_facing_business_name": "ABCD Ltd" +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay. For example, `acc_GLGeLkU2JUeyDZ` + +`id` _mandatory_ +: `string` The unique identifier of the stakeholder whose details are to be updated. For example, `sth_GOQ4Eftlz62TSL` + +### Parameters + +`percentage_ownership`_optional_ +: `float` The stakeholder's ownership of the business in percentage. Only two decimal places are allowed. For example, `87.55`. The maximum length is 100 characters. + +`name` _optional_ +: `string` The stakeholder's name as per the PAN card. The maximum length is 255 characters. + +`relationship` +: `object` The stakeholder's relationship with the account's business. + `director` + : `boolean` Determines if stakeholder is a director of the account's legal entity. + - `true`: Stakeholder is a director. + - `false` (default): Stakeholder is not a director. + `executive` + : `boolean` Determines if the stakeholder is an executive of the account's legal entity. + - `true`: Stakeholder is an executive. + - `false` (false): Stakeholder is not an executive. + +`phone` _optional_ +: `object` The stakeholder's phone number. + + `primary`_optional_ + : `integer` The primary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + + `secondary`_optional_ + : `integer` The secondary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + +`addresses` _optional_ +: `object` Details of stakeholder's address. + + `residential` + : `object` Details of the stakeholder's residential address. + + `street` _optional_ + : `string` The stakeholder's street address. The minimum length is 10 characters and maximum length is 255. + + `city` _optional_ + : `string` The city. The minimum length is 2 and maximum length is 32. + + `state` _optional_ + : `string` The state. The minimum length is 2 and maximum length is 32. + + `postal_code` _optional_ + : `string` The postal code. The minimum length is 2 and maximum length is 10. + + `country` _optional_ + : `string` The country. The minimum length is 2 and maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + +`kyc` _conditional_ +: `object` The type of document required to establish the stakeholder's identity. + + `pan` + : `string` The PAN number of the stakeholder. + + - This is a 10-digit alphanumeric code. For example, `AVOPB1111K`. + - **Regex to validate Stakeholder PAN**: `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`. + - **Validation for Stakeholder PAN**: The 4th digit should be 'P'. + - If the business type is HUF, the karta's PAN should be provided. + +`notes` _optional_ +: `object` Contains user-defined fields stored by the partner for reference purposes. Maximum 15 key-value pairs, 512 characters (maximum) each. + +### Parameters + +`id` +: `string` The unique identifier of a stakeholder generated by Razorpay, used to fetch or update a stakeholder. For example, `sth_GLGgm8fFCKc92m`. Maximum length supported is 18 characters. + +`percentage_ownership` +: `float` The stakeholder's ownership of the business in percentage. Only two decimal places are allowed. For example, `87.55`. The maximum length is 100 characters. + +`name` +: `string` The stakeholder's name as per the PAN card. The maximum length is 255 characters. + +`email` +: `string` The stakeholder's email address. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + +`relationship` +: `object` The stakeholder's relationship with the account's business. + `director` + : `boolean` Determines if stakeholder is a director of the account's legal entity. + - `true`: Stakeholder is a director. + - `false` (default): Stakeholder is not a director. + `executive` + : `boolean` Determines if the stakeholder is an executive of the account's legal entity. + - `true`: Stakeholder is an executive. + - `false` (false): Stakeholder is not an executive. + +`phone` +: `object` The stakeholder's phone number. + + `primary` + : `integer` The primary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + + `secondary` + : `integer` The secondary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + +`addresses` +: `object` Details of stakeholder's address. + + `residential` + : `string` Details of the stakeholder's residential address. + + `street` + : `string` The stakeholder's street address. The minimum length is 10 characters and maximum length is 255. + + `city` + : `string` The city. The minimum length is 2 and maximum length is 32. + + `state` + : `string` The state. The minimum length is 2 and maximum length is 32. + + `postal_code` + : `string` The postal code. The minimum length is 2 and maximum length is 10. + + `country` + : `string` The country. The minimum length is 2 and maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + +`kyc` +: `object` The type of document required to establish the stakeholder's identity. + + `pan` + : `string` The PAN number of the stakeholder. + + - This is a 10-digit alphanumeric code. For example, `AVOPB1111K`. + - **Regex to validate Stakeholder PAN**: `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/` + - **Validation for Stakeholder PAN**: The 4th digit should be 'P'. + + - If the business type is HUF, the karta's PAN should be provided. + - This API parameter might be required to complete the KYC process, however, it is optional for this API. + +`notes` +: `object` Contains user-defined fields stored by the partner for reference purposes. It can hold a maximum of 15 key-value pairs, 512 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. diff --git a/llm-content/api/partners/terms-conditions.md b/llm-content/api/partners/terms-conditions.md new file mode 100644 index 00000000..f4150351 --- /dev/null +++ b/llm-content/api/partners/terms-conditions.md @@ -0,0 +1,27 @@ +--- +title: Terms and Conditions APIs +description: Use the Terms and Conditions APIs to accept and fetch terms and conditions for a sub-merchant. +--- + +# Terms and Conditions APIs + +You can use the Terms and Conditions APIs to fetch terms and conditions for a sub-merchant. Check the [workflow to fetch and accept terms and conditions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md#terms-and-conditions-workflow) for a sub-merchant. + +Fork the Razorpay Postman Public Workspace and try the Terms and Conditions APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md#api-authentication/). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-69580306-114f-4e7e-b960-4b0f5cc1ddd6) + +### Related Guides + +[Sub-merchant Onboarding APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/webhooks.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners.md) + +### Endpoints + + - **get** `/v2/products/:product_name/tnc` - Fetch Terms and Conditions: + Retrieves terms and conditions for a sub-merchant. + + + - **post** `/v2/accounts/:account_id/products` - Accept Terms and Conditions: + Use the Product Configuration API to accept terms and conditions for a sub-merchant. diff --git a/llm-content/api/partners/terms-conditions/entity.md b/llm-content/api/partners/terms-conditions/entity.md new file mode 100644 index 00000000..259a0482 --- /dev/null +++ b/llm-content/api/partners/terms-conditions/entity.md @@ -0,0 +1,50 @@ +--- +title: Terms and Conditions Entity +description: Entity parameters and sample code for Terms and Conditions API. +--- + +# Terms and Conditions Entity + +The Terms and Conditions entity has the following parameters: + +### Response + +```json: Entity +{ + "entity": "tnc_map", + "product_name": "payments", + "id": "tnc_map_HjOVhIdpVDZ0FB", + "tnc": { + "terms": "https://razorpay.com/terms", + "privacy": "https://razorpay.com/privacy", + "agreement": "https://razorpay.com/agreement" + }, + "last_published_at": 1640589653 +} +``` + +### Parameters + +`entity` +: `string` The name of the entity. Here it is `tnc_map`. + +`product_name` +: `string` Determines what business unit the terms and conditions belong to. + +`id` +: `string` Unique identifier of the terms and conditions belonging to a specific business unit. + +`tnc` +: `object` The terms and conditions content. + + `terms` + : `string` The terms and conditions webpage URL. + + `privacy` + : `string` The privacy policy webpage URL. + + `agreement` + : `string` The agreement webpage URL. + +`last_published_at` +: `integer` The timestamp in Unix format, when the terms and conditions were created/last updated. diff --git a/llm-content/api/partners/terms-conditions/fetch.md b/llm-content/api/partners/terms-conditions/fetch.md new file mode 100644 index 00000000..cec61fc3 --- /dev/null +++ b/llm-content/api/partners/terms-conditions/fetch.md @@ -0,0 +1,120 @@ +--- +title: Fetch Terms and Conditions | Sub-Merchant Onboarding APIs +heading: Fetch Terms and Conditions +description: Fetch Terms and Conditions for a Sub-Merchant using Razorpay Partners APIs. +--- + +# Fetch Terms and Conditions + +## Fetch Terms and Conditions + +Use this endpoint to retrieve the terms and conditions of a sub-merchant. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +### Request + +```cURL: Curl +curl -u \ +-H "Content-Type: application/json" \ +-X GET https://api.razorpay.com/v2/products/payments/tnc \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_ACCESS_TOKEN]"); + +String productName = "payments"; + +TncMap tncMap = instance.product.fetchTnc(productName); + +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ACCESS_TOKEN")) + +productName = "payments" + +client.product.fetchTnc(productName) + +```go: Go + +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_ACCESS_TOKEN") +productName := "payments" + +body, err := client.Product.FetchTnc(productName, nil, nil) + +```php: PHP + +$api = new Api($access_token); + +$productName = "payments"; + +$api->product->fetchTnc($productName); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_ACCESS_TOKEN') + +productName = "payments" + +Razorpay::Product.fetch_tnc(productName) + +```js: Node.js + +var instance = new Razorpay({ access_token: 'YOUR_ACCESS_TOKEN' }) + +var productName = "payments"; + +instance.products.fetchTnc(productName); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_ACCESS_TOKEN]"); + +string productName = "payments"; + +Tnc tnc = client.Tnc.Fetch(productName) +``` + +### Response + +```json: Success +{ + "entity": "tnc_map", + "product_name": "payments", + "id": "tnc_map_HjOVhIdpVDZ0FB", + "tnc": { + "terms": "https://razorpay.com/terms", + "privacy": "https://razorpay.com/privacy", + "agreement": "https://razorpay.com/agreement" + }, + "last_published_at": 1640589653 +} +``` + +### Parameters + +`product_name` _mandatory_ +: `string` The product family for which the relevant product to be requested for the sub-merchant. Possible value is `payments`. + +### Parameters + +`entity` +: `string` The name of the entity. Here it is `tnc_map`. + +`product_name` +: `string` Determines what business unit the terms and conditions belong to. + +`id` +: `string` Unique identifier of the terms and conditions belonging to a specific business unit. + +`tnc` +: `object` The terms and conditions content. + + `terms` + : `string` The terms and conditions webpage URL. + + `privacy` + : `string` The privacy policy webpage URL. + + `agreement` + : `string` The agreement webpage URL. + +`last_published_at` +: `integer` The timestamp in Unix format, when the terms and conditions were created/last updated. diff --git a/llm-content/api/partners/upload-document.md b/llm-content/api/partners/upload-document.md new file mode 100644 index 00000000..5c77a59a --- /dev/null +++ b/llm-content/api/partners/upload-document.md @@ -0,0 +1,37 @@ +--- +title: Document APIs +description: Use the Document APIs to upload files and complete the mandatory KYC requirements. +--- + +# Document APIs + +Use the Document APIs to upload and fetch documents for the KYC verification process. Check the [product activation status and updates permitted](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md#product-activation-status-and-updates-permitted) for Document APIs. + +The maximum supported file size for a JPG/PNG is 4MB. The maximum supported file size for a PDF is 2MB. Do not pass file URLs instead of uploading documents. If you have uploaded the document but mandatory field-level parameters are not passed in the API, you need to re-execute the Documents API with the same document and pass the fields. + +Fork the Razorpay Postman Public Workspace and try the Document APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md#api-authentication/). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-91288595-d910-4f84-822d-808de103aeba) + +### Related Guides + +[Sub-merchant Onboarding APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/webhooks.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners.md) + +### Endpoints + + - **post** `/v2/accounts/:account_id/documents` - Upload Account Documents: + Uploads business documents for a sub-merchant's account. + + + - **post** `/v2/accounts/:account_id/stakeholders/:stakeholder_id/documents` - Upload Stakeholder Documents: + Uploads signatory documents for a stakeholder. + + + - **get** `/v2/accounts/:account_id/documents` - Fetch Account Documents: + Retrieves the documents uploaded for an account. + + + - **get** `/v2/accounts/:account_id/stakeholders/:stakeholder_id/documents` - Fetch Stakeholder Documents: + Retrieves the documents uploaded for a stakeholder. diff --git a/llm-content/api/partners/upload-document/fetch-account-documents.md b/llm-content/api/partners/upload-document/fetch-account-documents.md new file mode 100644 index 00000000..61d8c7ee --- /dev/null +++ b/llm-content/api/partners/upload-document/fetch-account-documents.md @@ -0,0 +1,75 @@ +--- +title: Fetch Account Documents | Sub-Merchant Onboarding APIs +heading: Fetch Account Documents +description: Fetch the documents uploaded for an Account using Razorpay APIs. +--- + +# Fetch Account Documents + +## Fetch Account Documents + +Use this endpoint to fetch the documents uploaded for an account. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +### Request + +```cURL: Curl +curl -X GET https://api.razorpay.com/v2/accounts/acc_GP4lfNA0iIMn5B/documents \ +-u \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accountId = "acc_LryDIBIjBDbOWy"; + +Account account = instance.account.fetchAccountDoc(accountId); + +```php: PHP +$api = new Api(null, null, ""); + +$accountId = "acc_M83Uw27KXuC7c8"; +$api->account->fetch($accoundId)->fetchAccountDoc(); + +```javascript: Node.js + +const instance = new Razorpay({ + oauthToken: "", + +const accountId = "acc_GP4lfNA0iIMn5B"; +instance.accounts.fetchAccountDoc(accountId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +account_id = "acc_0000000000001" + +Razorpay::Account.fetch_account_doc(account_id) +``` + +### Response + +```json: Success +{ + "business_proof_of_identification": [ + { + "type": "shop_establishment_certificate", + "document_id": "doc_GMh9oIJuoCcjdT" + } + ] +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay. For example, `acc_GP4lfNA0iIMn5B`. + +### Parameters + +`business_proof_of_identification` +: `array` The business proof document. For more details, refer the [Appendix](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md). + + `type` + : `string` The type of document uploaded. Check the list of [Document Types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#document-type). + + `document_id` + : `string` The id generated once the business proof document is uploaded. diff --git a/llm-content/api/partners/upload-document/fetch-stakeholder-documents.md b/llm-content/api/partners/upload-document/fetch-stakeholder-documents.md new file mode 100644 index 00000000..cd1d6c37 --- /dev/null +++ b/llm-content/api/partners/upload-document/fetch-stakeholder-documents.md @@ -0,0 +1,101 @@ +--- +title: Fetch Stakeholder Documents | Sub-Merchant Onboarding APIs +heading: Fetch Stakeholder Documents +description: Fetch the documents uploaded for a Stakeholder using Razorpay APIs. +--- + +# Fetch Stakeholder Documents + +## Fetch Stakeholder Documents + +Use this endpoint to fetch the files uploaded for a stakeholder. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +### Request + +```cURL: Curl +curl -X GET https://api.razorpay.com/v2/accounts/acc_GMh5YcLv9iGMKf/stakeholders/sth_GOUCFN3nE0XlYq/documents \ +-u \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accoundId = "acc_LryDIBIjBDbOWy"; +String stakeholderId = "sth_M0zjeiVOLRJRPW"; + +Stakeholder stakeholder = instance.stakeholder.fetchStakeholderDoc(accoundId, stakeholderId); + +```php: PHP +$api = new Api(null, null, ""); + +$accountId = "acc_00000000000001"; +$stakeholderId = "sth_00000000000001"; + +$stakeholders = $api->account->fetch($accountId)->stakeholders(); + +$stakeholders->fetchStakeholderDoc($stakeholderId); + +```javascript: Node.js + +const instance = new Razorpay({ + oauthToken: "", + +const accountId = "acc_GP4lfNA0iIMn5B"; +const stakeholderId = "sth_GOQ4Eftlz62TSL"; + +instance.stakeholders.fetchStakeholderDoc(accountId, stakeholderId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +account_id = "acc_0000000000001" +stakeholder_id = "sth_00000000000001" + +Razorpay::Stakeholder.fetch_stakeholder_doc(account_id, stakeholder_id) +``` + +### Response + +```json: Success +{ + "individual_proof_of_address": [ + { + "type": "aadhar_front", + "document_id": "doc_GOgDZbg848e6bI" + }, + { + "type": "aadhar_back", + "document_id": "doc_GOVuOa8PCgXlEA" + } + ] +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay. For example, `acc_GMh5YcLv9iGMKf`. + +`stakeholder_id` _mandatory_ +: `string` The unique identifier of the stakeholder generated by Razorpay. For example, `sth_GOUCFN3nE0XlYq`. + +### Parameters + +`individual_proof_of_address` +: `array` The document submitted as individual proof of address. + + `type` + : `string` The type of document. Possible values: + - `voter_id_back` + + - `voter_id_front` + + - `aadhar_front` + + - `aadhar_back` + + - `passport_front` + + - `passport_back` + + `document_id` + : `string` The id generated once the business proof document is uploaded. diff --git a/llm-content/api/partners/upload-document/upload-account-documents.md b/llm-content/api/partners/upload-document/upload-account-documents.md new file mode 100644 index 00000000..51243b34 --- /dev/null +++ b/llm-content/api/partners/upload-document/upload-account-documents.md @@ -0,0 +1,133 @@ +--- +title: Upload Account Documents | Sub-Merchant Onboarding APIs +heading: Upload Account Documents +description: Upload signatory documents for an Account using Razorpay APIs. +--- + +# Upload Account Documents + +## Upload Account Documents + +Use this endpoint to upload business documents for a sub-merchant's account. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +The information you can update using the Upload Account Documents API differs based on the [product activation status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md#product-activation-status-and-updates-permitted). + +### Request + +```cURL: Curl +curl -X POST https://api.razorpay.com/v2/accounts/acc_Go5TSvGPw0NB8v/documents \ +-u \ +-F 'file=@/Users/your_name/Downloads/sample_uploaded.jpeg' // file path +-F 'document_type=business_proof_url' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accountId = "acc_M83Uw27KXuC7c8"; + +JSONObject request = new JSONObject(); +request.put("files","/Users/your_name/Downloads/sample_uploaded.jpeg"); +request.put("document_type","business_proof_url"); + +Account account = instance.account.uploadAccountDoc(accountId, request); + +```php: PHP +$api = new Api(null, null, ""); + +$accountId = "acc_M83Uw27KXuC7c8"; +$payload = [ + 'file'=> '/Users/your_name/Downloads/sample_uploaded.pdf' + "document_type" => "business_proof_url" +]; +$api->account->fetch($accoundId)->uploadAccountDoc($payload); + +```javascript: Node.js + +const instance = new Razorpay({ + oauthToken: "", +}); +const accountId = "acc_GP4lfNA0iIMn5B"; + +const uploadfile = fs.createReadStream( + "/Users/your_name/Downloads/sample_uploaded.pdf", +); + +var formData = { + file: { + value: uploadfile, + options: { + filename: "sample_uploaded.pdf", + contentType: null, + }, + }, + document_type: "business_proof_url", +}; + +instance.accounts.uploadAccountDoc(accountId, formData); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +account_id = "acc_0000000000001" + +Razorpay::Account.upload_account_doc(account_id,{ + "file": File.new("/Users/your_name/Downloads/sample_uploaded.jpeg"), + "document_type": "business_proof_url" +}) +``` + +### Response + +```json: Success +{ + "business_proof_of_identification": [ + { + "type": "business_proof_url", + "url": "" + } + ] +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay. For example, `acc_GP4lfNA0iIMn5B`. + +### Parameters + +`file` _mandatory_ +: `string` The URL generated once the business proof document is uploaded. + +`document_type` _mandatory_ +: `string` The documents valid for the proof type to be shared. Possible values: + + - business_proof_of_identification + + - `shop_establishment_certificate` + + - `gst_certificate` + + - `msme_certificate` + + - `business_proof_url` (In case of HUF deed, Certificate of Incorporation, Partnership Deed, NGO Certificate, Trust Certificate and Society Certificate) + + - `business_pan_url` + - additional_documents: + + - `form_12_a_url` + + - `form_80g_url` + + - `cancelled_cheque` + +### Parameters + +`business_proof_of_identification` +: `array` The business proof document. For more details, refer the [Appendix](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md). + + `type` + : `string` The type of document uploaded. Check the list of [Document Types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#document-type). + + `document_id` + : `string` The id generated once the business proof document is uploaded. diff --git a/llm-content/api/partners/upload-document/upload-stakeholder-documents.md b/llm-content/api/partners/upload-document/upload-stakeholder-documents.md new file mode 100644 index 00000000..d98750c9 --- /dev/null +++ b/llm-content/api/partners/upload-document/upload-stakeholder-documents.md @@ -0,0 +1,159 @@ +--- +title: Upload Stakeholder Documents | Sub-Merchant Onboarding APIs +heading: Upload Stakeholder Documents +description: Upload signatory documents for a Stakeholder using Razorpay APIs. +--- + +# Upload Stakeholder Documents + +## Upload Stakeholder Documents + +Use this endpoint to upload signatory documents for a stakeholder. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +> **INFO** +> +> +> **Handy Tips** +> +> If your product activation status is `requested`, you can update all the fields. If the status is `needs_clarification`, you can update only specific fields. +> + +### Request + +```cURL: Curl +curl -X POST https://api.razorpay.com/v2/accounts/acc_Go5TSvGPw0NB8v/stakeholders/sth_Go5iFZJ8dqAfjg/documents \ +-u \ +-F 'file=@/Users/your_name/Downloads/sample_uploaded.jpeg' // file path +-F 'document_type=aadhar_front' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accoundId = "acc_LryDIBIjBDbOWy"; +String stakeholderId = "sth_M0zjeiVOLRJRPW"; + +JSONObject request = new JSONObject(); +request.put("file","/Users/your_name/Downloads/sample_uploaded.jpeg"); +request.put("document_type","aadhar_front"); + +Stakeholder stakeholder = instance.stakeholder.uploadStakeholderDoc(accoundId, stakeholderId, request); + +```php: PHP +$api = new Api(null, null, ""); + +$accountId = "acc_00000000000001"; +$stakeholderId = "sth_00000000000001"; +$payload = [ + 'file'=> '/Users/your_name/Downloads/sample_uploaded.pdf', + "document_type" => "aadhar_front" +]; + +$stakeholders = $api->account->fetch($accountId)->stakeholders(); + +$stakeholders->uploadStakeholderDoc($stakeholderId, $payload); + +```javascript: Node.js +const instance = new Razorpay({ + oauthToken: "", +}); + +const accountId = "acc_GP4lfNA0iIMn5B"; +const stakeholderId = "sth_GOQ4Eftlz62TSL"; + +const uploadFile = fs.createReadStream( + "/Users/your_name/Downloads/sample_uploaded.jpeg", +); + +const formData = { + file: { + value: uploadFile, + options: { + filename: "sample_uploaded.jpeg", + contentType: null, + }, + }, + document_type: "aadhar_front", +}; + +instance.stakeholders.uploadStakeholderDoc(accountId, stakeholderId, formData); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +account_id = "acc_0000000000001" +stakeholder_id = "sth_00000000000001" + +Razorpay::Stakeholder.upload_stakeholder_doc(account_id, stakeholder_id, { + "file": File.new("/Users/your_name/Downloads/sample_uploaded.jpeg"), + "document_type": "aadhar_front" +}); + +``` + +### Response + +```json: Success +{ + "individual_proof_of_address": [ + { + "type": "aadhar_front", + "url": "https://rzp.io/i/bzDAbNg" + } + ] +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay. For example, `acc_GMh5YcLv9iGMKf`. + +`stakeholder_id` _mandatory_ +: `string` The unique identifier of the stakeholder generated by Razorpay. For example, `sth_GOUCFN3nE0XlYq`. + +### Parameters + +`file` _mandatory_ +: `array` The URL generated once the business proof document is uploaded. + +`document_type` _mandatory_ +: `string` The documents for the valid proof type to be shared. In case of `individual_proof_of_address`, both the front and back of a document proof must be uploaded. Possible values: + - individual_proof_of_identification: + + - `personal_pan` + + - individual_proof_of_address: + + - `voter_id_back` + + - `voter_id_front` + + - `aadhar_front` + + - `aadhar_back` + + - `passport_front` + + - `passport_back` + +### Parameters + +`individual_proof_of_address` +: `array` The document submitted as individual proof of address. + + `type` + : `string` The type of document. Possible values: + - `voter_id_back` + + - `voter_id_front` + + - `aadhar_front` + + - `aadhar_back` + + - `passport_front` + + - `passport_back` + + `url` + : `string` The URL of the document. diff --git a/llm-content/api/partners/webhooks.md b/llm-content/api/partners/webhooks.md new file mode 100644 index 00000000..e0f85b2a --- /dev/null +++ b/llm-content/api/partners/webhooks.md @@ -0,0 +1,40 @@ +--- +title: Webhooks APIs +heading: Webhooks +description: Use the Webhook APIs to receive event notifications or subscribe to events happening in a sub-merchant's account as per their integration. +--- + +# Webhooks + +Use the Webhooks APIs to receive event notifications or subscribe to events happening in a sub-merchant's account for the integration installed. + +Fork the Razorpay Postman Public Workspace and try the Webhooks APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md#api-authentication). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-9d7fe39c-c63f-4f25-9bc8-09bcb59c7f26) + +### Related Guides + +[Sub-merchant Onboarding APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/webhooks.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners.md) + +### Endpoints + + - **post** `/v2/accounts/:account_id/webhooks` - Create a Webhook: + Creates a webhook. + + + - **get** `/v2/accounts/:account_id/webhooks/:webhook_id` - Fetch a Webhook With ID: + Retrieves the details of a webhook. + + + - **get** `/v2/accounts/:account_id/webhooks` - Fetch all Webhooks: + Retrieves the details of all webhooks. + + + - **patch** `/v2/accounts/:account_id/webhooks/:webhook_id` - Update a Webhook: + Updates a webhook. + + + - **delete** `/v2/accounts/:account_id/webhooks/:webhook_id` - Delete a Webhook: + Deletes a webhook. diff --git a/llm-content/api/partners/webhooks/create.md b/llm-content/api/partners/webhooks/create.md new file mode 100644 index 00000000..73b6d8b1 --- /dev/null +++ b/llm-content/api/partners/webhooks/create.md @@ -0,0 +1,190 @@ +--- +title: Create a Webhook | Sub-Merchant Onboarding APIs +heading: Create a Webhook +description: Create a webhook using Razorpay APIs to receive event notifications. +--- + +# Create a Webhook + +## Create a Webhook + +Use this API endpoint to create a webhook. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +> **INFO** +> +> +> **Handy Tips** +> +> You can create up to 30 webhooks for an `account_id`. +> + +### Request + +```cURL: Curl +curl -X POST https://api.razorpay.com/v2/accounts/acc_JOGUdtKu3dB03d/webhooks \ +-u \ +-H "Content-Type: application/json" \ +-d '{ + "url": "https://google.com", + "alert_email": "gaurav.kumar@example.com", + "secret": "12345", + "events": [ + "payment.authorized", + "payment.failed", + "payment.captured", + "payment.dispute.created", + "refund.failed", + "refund.created" + ] +}' + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accountId = "acc_GP4lfNA0iIMn5B"; + +JSONObject webhookRequest = new JSONObject(); +webhookRequest.put("url","https://google.com"); +webhookRequest.put("alert_email","gaurav.kumar@example.com"); +webhookRequest.put("secret","12345"); + +ArrayList events = new ArrayList(); +events.add("payment.authorized"); +events.add("payment.failed"); +events.add("payment.captured"); +events.add("payment.dispute.created"); +events.add("refund.failed"); +events.add("refund.created"); + +webhookRequest.put("events",events); + +Webhook webhook = instance.webhook.create(accountId, webhookRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +accountId = "acc_GP4lfNA0iIMn5B" + +Razorpay::Webhook.create({ + "url": "https://google.com", + "alert_email": "gaurav.kumar@example.com", + "secret": "12345", + "events": [ + "payment.authorized", + "payment.failed", + "payment.captured", + "payment.dispute.created", + "refund.failed", + "refund.created" + ] +}, accountId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[ACCESS_TOKEN]"); + +String accountId = "acc_ua2tBezhcEBvap"; + +Dictionary webhookRequest = new Dictionary(); +webhookRequest.Add("url", "https://www.google.com"); +webhookRequest.Add("alert_email", "gaurav.kumar@example.com"); +List events = new List(); +events.Add("refund.created"); +events.Add("payment.authorized"); +events.Add("payment.failed"); +events.Add("payment.captured"); +events.Add("payment.dispute.created"); +events.Add("refund.failed"); +events.Add("refund.created"); +webhookRequest.Add("secret", "12345"); +webhookRequest.Add("events", events); + +Webhook webhook = client.Webhook.Create(webhookRequest, accountId); +``` + +### Response + +```json: Success +{ + "id": "JebiXkKGYwua5L", + "created_at": 1654605478, + "updated_at": 1654605478, + "service": "beta-api-live", + "owner_id": "JOGUdtKu3dB03d", + "owner_type": "merchant", + "context": [], + "disabled_at": 0, + "url": "https://google.com", + "alert_email": "gaurav.kumar@example.com", + "secret_exists": true, + "entity": "webhook", + "active": true, + "events": [ + "payment.authorized", + "payment.failed", + "payment.captured", + "payment.dispute.created", + "refund.failed", + "refund.created" + ] +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of the sub-merchant account generated by Razorpay for which a webhook is created. For example, `acc_H3kYHQ635sBwXG`. This id is used to fetch, update and delete a webhook. The webhook is created for this sub-merchant account id. + +### Parameters + +`url` _mandatory_ +: `string` The URL where you receive the webhook payload when an event is triggered. The maximum length is 255 characters. + +`alert_email` _optional_ +: `string` This is the email address to which notifications must be sent in case of webhook failure. + +`secret` _optional_ +: `string` A secret for the webhook endpoint that is used to validate that the webhook is from Razorpay. + +`events` _mandatory_ +: `object` The required events from the list of Active Events. For example, `payment.authorized`, `payment.captured`, `payment.failed`, `payment.dispute.created`, `refund.failed`, `refund.created` and so on. + +### Parameters + +`id` +: `string` The unique identifier of the webhook generated by Razorpay. For example, `HK890egfiItP3H`. + +`created_at` +: `integer` The Unix timestamp at which the webhook has been created. + +`updated_at` +: `integer` The Unix timestamp at which the webhook has been updated. + +`owner_id` +: `string` The unique identifier generated by Razorpay for the sub-merchant who will receive the webhooks. For example, in this case, it will be `account_id` passed in the API URL. + +`owner_type` +: `string` Indicates the type of owner. For example, in this case, it will be the merchant. + +`url` +: `string` The URL where you receive the webhook payload when an event is triggered. The maximum length is 255 characters. + +`secret` +: `string` A secret for the webhook endpoint used to validate that the webhook is from Razorpay. + +`alert_email` +: `string` This is the email address to which notifications must be sent in case of webhook failure. + +`secret_exists` +: `boolean` This attribute will be set to `true` if a secret password has been set for the webhook endpoint. + +`entity` +: `string` Indicates the type of entity. For example, in this case, it will be **webhook**. + +`active` +: `string` Indicates the status of webhook. + - `true`: Webhook in an activated state. + - `false`: Webhook in a deactivated state. + +`events` +: `object` The required events from the list of Active Events. For example, `payment.authorized`, `payment.captured`, `payment.failed`, `payment.dispute.created`, `refund.failed`, `refund.created` and so on. diff --git a/llm-content/api/partners/webhooks/delete.md b/llm-content/api/partners/webhooks/delete.md new file mode 100644 index 00000000..71cac809 --- /dev/null +++ b/llm-content/api/partners/webhooks/delete.md @@ -0,0 +1,62 @@ +--- +title: Delete a Webhook | Sub-Merchant Onboarding APIs +heading: Delete a Webhook +description: Delete a webhook of a sub-merchant account using Razorpay APIs +--- + +# Delete a Webhook + +## Delete a Webhook + +Use this endpoint to delete the webhook of a sub-merchant's account generated by Razorpay. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +### Request + +```cURL: Curl +curl -X DELETE https://api.razorpay.com/v2/accounts/acc_H3kYHQ635sBwXG/webhooks/HK890egfiItP3H \ +-u \ + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accountId = "acc_GP4lfNA0iIMn5B"; + +String webhookId = "HK890egfiItP3H"; + +List webhook = instance.webhook.delete(accountId, webhookId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +accountId = "acc_GP4lfNA0iIMn5B" + +webhookId = "HK890egfiItP3H" + +Razorpay::Webhook.delete(webhookId, accountId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[ACCESS_TOKEN]"); + +string accountId = "acc_ua2tBezhcEBvap"; + +string webhookId = "HK890egfiItP3H"; + +List webhook = client.Webhook.Delete(webhookId, accountId); +``` + +### Response + +```json: Success +{ + [] +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay. For example, `acc_H3kYHQ635sBwXG`. + +`webhook_id` _mandatory_ +: `string` The unique identifier of the webhook whose details are to be deleted. For example, `HK890egfiItP3H` diff --git a/llm-content/api/partners/webhooks/entity.md b/llm-content/api/partners/webhooks/entity.md new file mode 100644 index 00000000..7ff491ca --- /dev/null +++ b/llm-content/api/partners/webhooks/entity.md @@ -0,0 +1,76 @@ +--- +title: Webhooks Entity +description: Entity parameters and sample code for Webhooks API. +--- + +# Webhooks Entity + +The Webhooks entity has the following parameters: + +### Response + +```json: Entity +{ + "id": "JebiXkKGYwua5L", + "created_at": 1654605478, + "updated_at": 1654605478, + "service": "beta-api-live", + "owner_id": "JOGUdtKu3dB03d", + "owner_type": "merchant", + "context": [], + "disabled_at": 0, + "url": "https://google.com", + "alert_email": "gaurav.kumar@example.com", + "secret_exists": true, + "entity": "webhook", + "active": true, + "events": [ + "payment.authorized", + "payment.failed", + "payment.captured", + "payment.dispute.created", + "refund.failed", + "refund.created" + ] +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the created webhook. For example, `HK890egfiItP3H`. This id is used to fetch, update or delete a webhook. The maximum length is 14 characters. + +`created_at` +: `integer` The Unix timestamp at which the webhook has been created. + +`updated_at` +: `integer` The Unix timestamp at which the webhook has been updated. + +`owner_id` +: `string` The unique identifier generated by Razorpay for the sub-merchant who will receive the webhooks. For example, in this case, it will be `account_id` passed in the API URL. + +`owner_type` +: `string` Indicates the type of owner. For example, in this case, it will be the merchant. + +`url` +: `string` The URL where you receive the webhook payload when an event is triggered. The maximum length is 255 characters. + +`secret` +: `string` A secret for the webhook endpoint used to validate that the webhook is from Razorpay. + +`alert_email` +: `string` This is the email address to which notifications must be sent in case of webhook failure. + +`secret_exists` +: `boolean` This attribute is set to `true` if a secret password has been set for the webhook endpoint. If no secret is sent in the request, this parameter does not appear in the response code. + +`entity` +: `string` Indicates the type of entity. For example, in this case, it will be **webhook**. + +`active` +: `string` Indicates the status of webhook. + - `true`: Webhook is activated. + - `false`: Webhook is deactivated. + +`events` +: `object` The required events from the list of Active Events. For example, `payment.authorized`, `payment.captured`, `payment.failed`, `payment.dispute.created`, `refund.failed`, `refund.created` and so on. diff --git a/llm-content/api/partners/webhooks/fetch-all.md b/llm-content/api/partners/webhooks/fetch-all.md new file mode 100644 index 00000000..f9dd3f41 --- /dev/null +++ b/llm-content/api/partners/webhooks/fetch-all.md @@ -0,0 +1,135 @@ +--- +title: Fetch All Webhooks | Sub-Merchant Onboarding APIs +heading: Fetch All Webhooks +description: Fetch and view the details of all webhooks using Razorpay APIs. +--- + +# Fetch All Webhooks + +## Fetch All Webhooks + +Use this endpoint to retrieve all webhooks for a given account. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +### Request + +```cURL: Curl +curl -u : \ +- X GET https://api.razorpay.com/v2/accounts/acc_H3kYHQ635sBwXG/webhooks \ + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accountId = "acc_GP4lfNA0iIMn5B"; + +Webhook webhook = instance.webhook.fetchAll(accountId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +accountId = "acc_GP4lfNA0iIMn5B"; + +Razorpay::Webhook.all({ + "count": 1 +}, accountId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[ACCESS_TOKEN]"); + +string accountId = "acc_ua2tBezhcEBvap"; + +List webhook = client.Webhook.All(accountId); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "HK890egfiItP3H", + "created_at": 1624060358, + "updated_at": 1624060358, + "service": "beta-api-test", + "owner_id": "H3kYHQ635sBwXG", + "owner_type": "merchant", + "context": [], + "disabled_at": 0, + "url": "https://en1mwkqo5ioct.x.pipedream.net", + "alert_email": "gaurav.kumar@example.com", + "secret_exists": true, + "entity": "webhook", + "active": true, + "events": [ + "payment.authorized", + "payment.failed", + "payment.captured", + "payment.dispute.created", + "refund.failed", + "refund.created" + ] + } + ] +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay for which a webhook is created. For example, `acc_H3kYHQ635sBwXG`. + +### Parameters + +`from` _optional_ +: `integer` Timestamp, in seconds, from when the webhooks are to be fetched. + +`to` _optional_ +: `integer` Timestamp, in seconds, till when the webhooks are to be fetched. + +`count` _optional_ +: `integer` Number of webhooks to be fetched. The default value is `10` and the maximum value is `100`. This can be used for pagination, in combination with `skip`. + +`skip` _optional_ +: `integer` Number of records to be skipped while fetching the webhooks. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` The unique identifier of the created webhook. For example, `HK890egfiItP3H`. This id is used to fetch, update or delete a webhook. The maximum length is 14 characters. + +`created_at` +: `integer` The Unix timestamp at which the webhook has been created. + +`updated_at` +: `integer` The Unix timestamp at which the webhook has been updated. + +`owner_id` +: `string` The unique identifier generated by Razorpay for the sub-merchant who will receive the webhooks. For example, in this case, it will be `account_id` passed in the API URL. + +`owner_type` +: `string` Indicates the type of owner. For example, in this case, it will be the merchant. + +`url` +: `string` The URL where you receive the webhook payload when an event is triggered. The maximum length is 255 characters. + +`secret` +: `string` A secret for the webhook endpoint used to validate that the webhook is from Razorpay. + +`alert_email` +: `string` This is the email address to which notifications must be sent in case of webhook failure. + +`secret_exists` +: `boolean` This attribute is set to `true` if a secret password has been set for the webhook endpoint. If no secret is sent in the request, this parameter does not appear in the response code. + +`entity` +: `string` Indicates the type of entity. For example, in this case, it will be **webhook**. + +`active` +: `string` Indicates the status of webhook. + - `true`: Webhook is activated. + - `false`: Webhook is deactivated. + +`events` +: `object` The required events from the list of Active Events. For example, `payment.authorized`, `payment.captured`, `payment.failed`, `payment.dispute.created`, `refund.failed`, `refund.created` and so on. diff --git a/llm-content/api/partners/webhooks/fetch-with-id.md b/llm-content/api/partners/webhooks/fetch-with-id.md new file mode 100644 index 00000000..8986ec1d --- /dev/null +++ b/llm-content/api/partners/webhooks/fetch-with-id.md @@ -0,0 +1,121 @@ +--- +title: Fetch a Webhook With ID | Sub-Merchant Onboarding APIs +heading: Fetch a Webhook With ID +description: Fetch and view the details of a specific webhook id using Razorpay APIs. +--- + +# Fetch a Webhook With ID + +## Fetch a Webhook With ID + +Use this endpoint to retrieve and view the details of a webhook. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +### Request + +```cURL: Curl +curl -X GET https://api.razorpay.com/v2/accounts/acc_H3kYHQ635sBwXG/webhooks/HK890egfiItP3H \ +-u \ + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accountId = "acc_GP4lfNA0iIMn5B"; + +String webhookId = "HK890egfiItP3H"; + +Webhook webhook = instance.webhook.fetch(accountId, webhookId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +accountId = "acc_GP4lfNA0iIMn5B"; + +webhookId = "HK890egfiItP3H"; + +Razorpay::Webhook.fetch(webhookId, accountId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[ACCESS_TOKEN]"); + +string accountId = "acc_ua2tBezhcEBvap"; + +string webhookId = "HK890egfiItP3H"; + +Webhook webhook = client.Webhook.Fetch(webhookId, accountId); +``` + +### Response + +```json: Success +{ + "id": "HK890egfiItP3H", + "created_at": 1623060358, + "updated_at": 1623060358, + "owner_id": "H3kYHQ635sBwXG", + "owner_type": "merchant", + "context": [], + "disabled_at": 0, + "url": "https://en1mwkqo5ioct.x.pipedream.net", + "alert_email": "gaurav.kumar@example.com", + "secret_exists": true, + "entity": "webhook", + "active": true, + "events": [ + "payment.authorized", + "payment.failed", + "payment.captured", + "payment.dispute.created", + "refund.failed", + "refund.created" + ] +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay for which a webhook is created. For example, `acc_H3kYHQ635sBwXG`. + +`webhook_id` _mandatory_ +: `string` The unique identifier of the webhook whose details are to be retrieved. For example, `HK890egfiItP3H`. + +### Parameters + +`id` +: `string` The unique identifier of the created webhook. For example, `HK890egfiItP3H`. This id is used to fetch, update or delete a webhook. The maximum length is 14 characters. + +`created_at` +: `integer` The Unix timestamp at which the webhook has been created. + +`updated_at` +: `integer` The Unix timestamp at which the webhook has been updated. + +`owner_id` +: `string` The unique identifier generated by Razorpay for the sub-merchant who will receive the webhooks. For example, in this case, it will be `account_id` passed in the API URL. + +`owner_type` +: `string` Indicates the type of owner. For example, in this case, it will be the merchant. + +`url` +: `string` The URL where you receive the webhook payload when an event is triggered. The maximum length is 255 characters. + +`secret` +: `string` A secret for the webhook endpoint used to validate that the webhook is from Razorpay. + +`alert_email` +: `string` This is the email address to which notifications must be sent in case of webhook failure. + +`secret_exists` +: `boolean` This attribute is set to `true` if a secret password has been set for the webhook endpoint. If no secret is sent in the request, this parameter does not appear in the response code. + +`entity` +: `string` Indicates the type of entity. For example, in this case, it will be **webhook**. + +`active` +: `string` Indicates the status of webhook. + - `true`: Webhook is activated. + - `false`: Webhook is deactivated. + +`events` +: `object` The required events from the list of Active Events. For example, `payment.authorized`, `payment.captured`, `payment.failed`, `payment.dispute.created`, `refund.failed`, `refund.created` and so on. diff --git a/llm-content/api/partners/webhooks/update.md b/llm-content/api/partners/webhooks/update.md new file mode 100644 index 00000000..b530cbd0 --- /dev/null +++ b/llm-content/api/partners/webhooks/update.md @@ -0,0 +1,149 @@ +--- +title: Update a Webhook | Sub-Merchant Onboarding APIs +heading: Update a Webhook +description: Update a Webhook using Razorpay APIs. +--- + +# Update a Webhook + +## Update a Webhook + +Use this endpoint to update the details of a webhook. Know about the [various error responses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) for this API. + +### Request + +```cURL: Curl +curl -X PATCH https://api.razorpay.com/v2/accounts/acc_H3kYHQ635sBwXG/webhooks/HK890egfiItP3H \ +-u \ +-H "Content-Type: application/json" \ +-d '{ + "url": "https://www.linkedin.com", + "events": [ + "refund.created" + ] +}' + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]"); + +String accountId = "acc_GP4lfNA0iIMn5B"; + +String webhookId = "HK890egfiItP3H"; + +JSONObject webhookRequest = new JSONObject(); +webhookRequest.put("url","https://www.linkedin.com"); +ArrayList events = new ArrayList(); +events.add("refund.created"); +webhookRequest.put("events",events); + +Webhook webhook = instance.webhook.edit(accountId, webhookId, webhookRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('ACCESS_TOKEN') +webhookId = "HK890egfiItP3H" + +accountId = "acc_GP4lfNA0iIMn5B" + +Razorpay::Webhook.edit({ + "url": "https://www.linkedin.com", + "events": [ + "refund.created" + ] +}, webhookId, accountId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[ACCESS_TOKEN]"); + +string accountId = "acc_ua2tBezhcEBvap"; + +string webhookId = "wxK6n7AmmJyRtq"; + +Dictionary webhookRequest = new Dictionary(); +webhookRequest.Add("url", "https://www.google.com"); +List events = new List(); +events.Add("refund.created"); +webhookRequest.Add("events", events); + +Webhook webhook = client.Webhook.Fetch(webhookId,accountId).Edit(webhookRequest, accountId); +``` + +### Response + +```json: Success +{ + "id": "HK890egfiItP3H", + "created_at": 1623060358, + "updated_at": 1623067148, + "service": "beta-api-test", + "owner_id": "H3kYHQ635sBwXG", + "owner_type": "merchant", + "context": [], + "disabled_at": 0, + "url": "https://www.linkedin.com", + "alert_email": "gaurav.kumar@example.com", + "secret_exists": true, + "entity": "webhook", + "active": true, + "events": [ + "refund.created" + ] +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of a sub-merchant account generated by Razorpay. For example, `acc_H3kYHQ635sBwXG` + +`webhook_id` _mandatory_ +: `string` The unique identifier of the webhook whose details are to be updated. For example, `HK890egfiItP3H` + +### Parameters + +`url` _mandatory_ +: `string` The URL where you receive the webhook payload when an event is triggered. The maximum length is 255 characters. + +`events` _mandatory_ +: `object` The required events from the list of Active Events. For example, `payment.authorized`, `payment.captured`, `payment.failed`, `payment.dispute.created`, `refund.failed`, `refund.created` and so on. + +### Parameters + +`id` +: `string` The unique identifier of the created webhook. For example, `HK890egfiItP3H`. This id is used to fetch, update or delete a webhook. The maximum length is 14 characters. + +`created_at` +: `integer` The Unix timestamp at which the webhook has been created. + +`updated_at` +: `integer` The Unix timestamp at which the webhook has been updated. + +`owner_id` +: `string` The unique identifier generated by Razorpay for the sub-merchant who will receive the webhooks. For example, in this case, it will be `account_id` passed in the API URL. + +`owner_type` +: `string` Indicates the type of owner. For example, in this case, it will be the merchant. + +`url` +: `string` The URL where you receive the webhook payload when an event is triggered. The maximum length is 255 characters. + +`secret` +: `string` A secret for the webhook endpoint used to validate that the webhook is from Razorpay. + +`alert_email` +: `string` This is the email address to which notifications must be sent in case of webhook failure. + +`secret_exists` +: `boolean` This attribute is set to `true` if a secret password has been set for the webhook endpoint. If no secret is sent in the request, this parameter does not appear in the response code. + +`entity` +: `string` Indicates the type of entity. For example, in this case, it will be **webhook**. + +`active` +: `string` Indicates the status of webhook. + - `true`: Webhook is activated. + - `false`: Webhook is deactivated. + +`events` +: `object` The required events from the list of Active Events. For example, `payment.authorized`, `payment.captured`, `payment.failed`, `payment.dispute.created`, `refund.failed`, `refund.created` and so on. diff --git a/llm-content/api/payment-settlement-control-api.md b/llm-content/api/payment-settlement-control-api.md new file mode 100644 index 00000000..51f5d82f --- /dev/null +++ b/llm-content/api/payment-settlement-control-api.md @@ -0,0 +1,56 @@ +--- +title: Payment Settlement Control API +--- + +# Payment Settlement Control API + +The following section describes the API to control the payment settlement. + +```json: Request Payload +{ + "on_hold": true, + "on_hold_until": 1537872668 +} +``` + +```json: Response +{ + "id": "pay_AsvVMXmaAwwMVl", + "entity": "payment", + "amount": 5000, + "currency": "INR", + "status": "authorized", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": "card_AsvVMaZI125Eu2", + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919123456780", + "on_hold": true, + "on_hold_until": 1537872668, + "notes": [], + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "created_at": 1535898144 +} +``` + +## Request Parameters + +`on_hold` _boolean_ +: Indicates whether settlement for the payment is on hold or not. + +`on_hold_until` _integer_ +: Timestamp indicating until which the settlement for the payment is to be kept on hold. The settlement will be initiated on the next business day after the timestamp. +If this field is set, the `on_hold` field has to be set to `true`. diff --git a/llm-content/api/payments.md b/llm-content/api/payments.md new file mode 100644 index 00000000..c414aa29 --- /dev/null +++ b/llm-content/api/payments.md @@ -0,0 +1,77 @@ +--- +title: Payments +description: Capture and fetch Payments using Razorpay APIs. +--- + +# Payments + +Payments APIs are used to capture and fetch payments. You can also fetch payments based on orders and card details of payment. + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use Payments API only to retrieve payment details or change the status from `authorized` to `captured` and **not** to collect payments. You can use our [products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md) to accept payments. +> + + + + Fork the Razorpay Postman Public Workspace and try the Payments APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-11b2db21-9019-4814-9669-c70305b8fd6e) + + + +### Related Guides + +[ About Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) +[Sample Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md) + +### Endpoints + + - **post** `/v1/payments/:id/capture` - Capture a Payment: + Captures a payment. + + + - **get** `/v1/payments/:id` - Fetch a Payment With ID: + Retrieves details of a specific payment using id. + + + - **get** `/v1/payments/:id/?expand[]=card` - Fetch a Payment With ID (Example 1): + Retrieves details of all the payments that is created, with the `card` parameter. + + + - **get** `/v1/payments/:id/?expand[]=emi` - Fetch a Payment With ID (Example 2): + Retrieves details of all the payments that is created, with the `emi` parameter. + + + - **get** `/v1/payments/:id/?expand[]=offers` - Fetch a Payment With ID (Example 3): + Retrieves details of all the payments that is created, with the `offers` parameter. + + + - **get** `/v1/payments` - Fetch All Payments: + Retrieves details of all payments. + + + - **get** `/v1/payments?expand[]=card` - Fetch All Payments (Example 1): + Retrieves expanded card details of a payment. + + + - **get** `/v1/payments?expand[]=emi` - Fetch All Payments (Example 2): + Retrieves expanded EMI details of a payment. + + + - **get** `/v1/orders/:id/payments` - Fetch Payments Based on Orders: + Retrieves payments linked to an Order. + + + - **get** `/v1/payments/:id/card` - Fetch Card Details of a Payment: + Retrieves card details of a payment. + + + + - **patch** `/v1/payments/:id/` - Update a Payment: + Edits an existing payment. diff --git a/llm-content/api/payments/capture.md b/llm-content/api/payments/capture.md new file mode 100644 index 00000000..bf0b4d50 --- /dev/null +++ b/llm-content/api/payments/capture.md @@ -0,0 +1,389 @@ +--- +title: Capture a Payment +description: Create a Payment using Razorpay Payments API. +--- + +# Capture a Payment + +## Capture a Payment + +Use this endpoint to change the payment status from `authorized` to `captured`. Attempting to capture a payment whose status is not `authorized` will produce an error. +- After the customer's bank authorises the payment, you must verify if the authorised amount deducted from the customer's account is the same as the amount paid by the customer on your website or app. +- You can [configure automatic capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) of payments on the Dashboard. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H 'content-type: application/json' \ +-X POST https://api.razorpay.com/v1/payments/pay_29QQoUBi66xm2f/capture \ +-d '{ + "amount": 1000, + "currency": "INR" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_29QQoUBi66xm2f"; + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", "INR"); + +Payment payment = razorpay.payments.capture(paymentId, paymentRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.capture(paymentId,{ + "amount" : 1000, + "currency" : "INR" +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +paymentId := "pay_29QQoUBi66xm2f" +amount := 1000 + +data := map[string]interface{}{ + "currency": "INR", +} + +body, err := client.Payment.Capture(paymentId, amount, data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId)->capture(array('amount'=>$amount,'currency' => 'INR')); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_29QQoUBi66xm2f" + +para_attr = { + "amount": 1000, + "currency" : "INR" +} +Razorpay::Payment.capture(paymentId, para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.capture(pay_29QQoUBi66xm2f, 1000, INR) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +Payment payment = client.Payment.Fetch(paymentId); + +Dictionary options = new Dictionary(); +options.Add("amount", ""); +options.Add ("currency", ""); +Payment paymentCaptured = payment.Capture(options); +``` + +### Response + +```json: Success +{ + "id": "pay_G3P9vcIhRs3NV4", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "captured", + "order_id": "order_GjCr5oKh4AVC51", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Payment for Adidas shoes", + "card_id": "card_KOdY30ajbuyOYN", + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "customer_id": "cust_K6fNE0WJZWGqtN", + "token_id": "token_KOdY$DBYQOv08n", + "notes": [], + "fee": 1, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "authentication_reference_number": "100222021120200000000742753928" + }, + "created_at": 1605871409, + "provider": null, + "upi": { + "payer_account_type": "credit_card", + "vpa": "gaurav.kumar@examplebank", + "flow": "intent" + }, + "reward": null +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be an integer.", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the payment to be captured. + +### Parameters + +`amount` _mandatory_ +: `integer` The amount to be captured (should be equal to the order amount, in the smallest unit of the currency). While creating a capture request, in the `amount` field, enter only the amount associated with the order that is stored in your database. + + + +`currency` _mandatory_ +: `string` ISO code of the currency in which the payment was made. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. This attribute will not be set for the card issued by a foreign bank. + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + + + Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + - `credit_line` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible values: + - `intent`: When a UPI app is selected and user is redirected to it. + - `collect`: The user enters their UPI ID and receives a notification from the UPI app. They open the app and complete the payment. + - `in_app` In case of Turbo UPI Payments. + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + + + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +Capture amount must be equal to the amount authorized. +* code: 400 +* description: - The capture amount is incorrect. +- The amount you are trying to capture differs from the authorised amount . + +* solution: - Enter the correct capture amount. +- Ensure that the amount to be captured is equal to the authorised amount. + +Your payment has been declined as the order is already paid. Please initiate the payment with a new order. +* code: 400 +* description: This payment has already been captured. +* solution: Ensure that the payment is in the `authorized` state to capture it successfully. + +The id provided does not exist +* code: 400 +* description: The `payment_id` provided is incorrect. +* solution: Enter the correct `payment_id`. + +The requested URL was not found on the server. +* code: 400 +* description: The URL is incorrect. +* solution: Use the correct URL. + +The amount must be an integer +* code: 400 +* description: The amount specified is incorrect. +* solution: Enter the correct amount without any decimal points. diff --git a/llm-content/api/payments/cards/fingerprints.md b/llm-content/api/payments/cards/fingerprints.md new file mode 100644 index 00000000..c80f4d43 --- /dev/null +++ b/llm-content/api/payments/cards/fingerprints.md @@ -0,0 +1,101 @@ +--- +title: Card Fingerprints (or PAR) API +description: Retrieve a unique card reference for a given card or token using the Card Fingerprints API. +--- + +# Card Fingerprints (or PAR) API + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +Razorpay works with card networks to return a unique card fingerprint for each card and all tokens created against that card. + +This value is unique across the payment ecosystem. It means this fingerprint will act as a global identifier and will not change while processing payments. + +You can use the Card Fingerprints API to retrieve: + +- **Payment Account Reference** for Mastercard and Visa cards. +- **Network Reference id** for non-tokenised RuPay cards. + +## What is Payment Account Reference + +Payment Account Reference (PAR) is a 29-character identifier associated with a specific card. It is independent of Razorpay and is provided by card networks and card-issuing banks. + +## What is Network Reference ID + +Card networks need issuing banks' support to generate PAR value. However, RuPay currently has very low coverage on PAR value and needs to work with a large number of banks to increase the coverage. To overcome this challenge they have introduced - network reference id. +It works in the same way as the PAR value and is 36-character long. The token create API call returns the Network Reference id. + +Razorpay returns both **network reference id** as well as **PAR** value wherever available for RuPay Cards. + +## Use cases +This API is helpful for card identification in various situations: +- Restricting the number of times an offer is availed on the card. +- Applying risk checks as to how many times a card is used or if it is associated with fraud users. +- Block existing and newly blacklisted cards. + +## List of Endpoints + +> **INFO** +> +> +> **Handy Tips** +> +> You can initiate a request for a card reference number using the following: +> - Card number +> - Tokenised card number +> - Razorpay token +> + +API Endpoint | Description +--- +[Fetch Card Reference Number Using Card Number](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/cards/fingerprints/fetch-card-number.md) | Fetches the card reference number for a specific card using card number. +--- +[Fetch Card Reference Number Using Tokenised Card Number](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/cards/fingerprints/fetch-tokenised-number.md) | Fetches the card reference number for a specific card using tokenised card number. +--- +[Fetch Card Reference Number Using Razorpay Token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/cards/fingerprints/fetch-razorpay-token.md) | Fetches the card reference number for a specific card using Razorpay Token. + +## Card Fingerprint Entity + +`network` +: `string` The card network. Possible values: + - `Mastercard` + - `RuPay` + - `Visa` + +`payment_account_reference` +: `string` The 29-character unique identifier for Mastercard and Visa cards. For RuPay cards, the value is `null`. + +`network_reference_id` +: `string` The unique identifier generated for RuPay cards. + +```json: Sample Entity +{ + "network": "Visa", + "payment_account_reference": "V0010013819231376539033235990", + "network_reference_id": null +} +``` + +`network` +: `string` The card network. Possible values: + - `Mastercard` + - `RuPay` + - `Visa` + +`payment_account_reference` +: `string` The 29-character unique identifier for Mastercard and Visa cards. For RuPay cards, the value is `null`. + +`network_reference_id` +: `string` The unique identifier generated for RuPay cards. diff --git a/llm-content/api/payments/cards/fingerprints/fetch-card-number.md b/llm-content/api/payments/cards/fingerprints/fetch-card-number.md new file mode 100644 index 00000000..74b165fc --- /dev/null +++ b/llm-content/api/payments/cards/fingerprints/fetch-card-number.md @@ -0,0 +1,97 @@ +--- +title: Fetch Card Reference Number Using Card Number +description: Retrieve the card reference number for a specific card using card number. +--- + +# Fetch Card Reference Number Using Card Number + +## Fetch Card Reference Number Using Card Number + +Use this endpoint to retrieve the card reference number for a specific card using card number. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/cards/fingerprints \ +-H "content-type: application/json" \ +-d '{ + "number": "4854980604708430" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject request = new JSONObject(); +request.put("number","4854980604708430"); + +Card card = instance.card.requestCardReference(request); + +```php:PHP +$api = new Api($key_id, $secret); + +$api->card->requestCardReference(array("number" =>"4854980604708430")); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "number":"4854980604708430", +} +body, err := client.Card.RequestCardReference(data, nil) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.cards.requestCardReference({"number":"4854980604708430"}); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary cardRequest = new Dictionary(); +cardRequest.Add("number", "4854980604708430"); + +Card card = client.Card.RequestCardReference(cardRequest); +``` + +### Response + +```json: Success - Visa and MC +{ + "network": "Visa", + "payment_account_reference": "V0010013819231376539033235990", + "network_reference_id": null +} +```json: Success - Rupay +{ + "network": "RuPay", + "payment_account_reference": null, + "network_reference_id": "1001381923137653903323591234sdfds90" +} +``` + +### Parameters + +`number` _mandatory_ +: `string` The card number whose PAR or network reference id should be retrieved. + +`tokenised` _optional_ +: `boolean` Determines if the card is saved as a token. +Possible Values: + - `true`: The card number is saved as a token. +- `false`: The card number is not saved as a token. + +### Parameters + +`network` +: `string` The card network. Possible values: + - `Mastercard` + - `RuPay` + - `Visa` + +`payment_account_reference` +: `string` The 29-character unique identifier for Mastercard and Visa cards. For RuPay cards, the value is `null`. + +`network_reference_id` +: `string` The unique identifier generated for RuPay cards. diff --git a/llm-content/api/payments/cards/fingerprints/fetch-razorpay-token.md b/llm-content/api/payments/cards/fingerprints/fetch-razorpay-token.md new file mode 100644 index 00000000..0f2f2574 --- /dev/null +++ b/llm-content/api/payments/cards/fingerprints/fetch-razorpay-token.md @@ -0,0 +1,97 @@ +--- +title: Fetch Card Reference Number Using Razorpay Token +description: Retrieve the card reference number for a specific card using Razorpay token. +--- + +# Fetch Card Reference Number Using Razorpay Token + +## Fetch Card Reference Number Using Razorpay Token + +Use this endpoint to retrieve the card reference number for a specific card using Razorpay token. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/cards/fingerprints \ +-H "content-type: application/json" \ +-d '{ + "token": "token_4lsdksD31GaZ09" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject request = new JSONObject(); +request.put("token","token_4lsdksD31GaZ09"); + +Card card = instance.card.requestCardReference(request); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->card->requestCardReference(array("token" =>"token_4lsdksD31GaZ09")); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "token":"token_4lsdksD31GaZ09", +} +body, err := client.Card.RequestCardReference(data, nil) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.cards.requestCardReference({"token":"token_4lsdksD31GaZ09"}); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary cardRequest = new Dictionary(); +cardRequest.Add("token","token_Z6t7VFTb9xHeOs"); + +Card card = client.Card.RequestCardReference(cardRequest); +``` + +### Response + +```json: Success - Visa +{ + "provider": "Visa", + "payment_account_reference": "V0010013819231376539033235990", + "network_reference_id": null +} +```json: Success - Mastercard +{ + "provider": "Mastercard", + "payment_account_reference": "V0010013819231376539033235990", + "network_reference_id": null +} +```json: Success - Rupay +{ + "provider": "RuPay", + "payment_account_reference": null, + "network_reference_id": "1001381923137653903323591234sdfds90" +} +``` + +### Parameters + +`token` _mandatory_ +: `string` The token whose PAR or network reference id should be retrieved. + +### Parameters + +`provider` +: `string` The card network provider. Possible values: + - `Mastercard` + - `RuPay` + - `Visa` + +`payment_account_reference` +: `string` The 29-character unique identifier for Mastercard and Visa cards. For RuPay cards, the value is `null`. + +`network_reference_id` +: `string` The unique identifier generated for RuPay cards. diff --git a/llm-content/api/payments/cards/fingerprints/fetch-tokenised-number.md b/llm-content/api/payments/cards/fingerprints/fetch-tokenised-number.md new file mode 100644 index 00000000..e350e723 --- /dev/null +++ b/llm-content/api/payments/cards/fingerprints/fetch-tokenised-number.md @@ -0,0 +1,106 @@ +--- +title: Fetch Card Reference Number Using Tokenised Card Number +description: Retrieve the card reference number for a specific card using tokenised card number. +--- + +# Fetch Card Reference Number Using Tokenised Card Number + +## Fetch Card Reference Number Using Tokenised Card Number + +Use this endpoint to retrieve the card reference number for a specific card using the tokenised card number. + +> **WARN** +> +> +> **Watch Out!** +> +> Using a RuPay card will throw an error as it is not supported. It will not provide `network_reference_id` for tokenised card numbers. It will be available as part of Create Token response only. +> + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/cards/fingerprints \ +-H "content-type: application/json" \ +-d '{ + "number": "4854980604708430" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject request = new JSONObject(); +request.put("number","4854980604708430"); + +Card card = instance.card.requestCardReference(request); + +```php:PHP +$api = new Api($key_id, $secret); + +$api->card->requestCardReference(array("number" =>"4854980604708430")); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "number":"4854980604708430", +} +body, err := client.Card.RequestCardReference(data, nil) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.cards.requestCardReference({"number":"4854980604708430"}); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary cardRequest = new Dictionary(); +cardRequest.Add("number", "4854980604708430"); + +Card card = client.Card.RequestCardReference(cardRequest); +``` + +### Response + +```json: Success - Visa and MC +{ + "network": "Visa", + "payment_account_reference": "V0010013819231376539033235990", + "network_reference_id": null +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The card network was not able to provide card reference value for this request", + "field": null, + "source": "gateway", + "step": "card_reference_provision", + "reason": "card_reference_not_found", + "metadata": { + } + } +} +``` + +### Parameters + +`number` _mandatory_ +: `string` The tokenised card number whose PAR or network reference id should be retrieved. + +### Parameters + +`network` +: `string` The card network. Possible values: + - `Mastercard` + - `RuPay` + - `Visa` + +`payment_account_reference` +: `string` The 29-character unique identifier for Mastercard and Visa cards. For RuPay cards, the value is `null`. + +`network_reference_id` +: `string` The unique identifier generated for RuPay cards. diff --git a/llm-content/api/payments/cards/iin-api.md b/llm-content/api/payments/cards/iin-api.md new file mode 100644 index 00000000..ab573bcb --- /dev/null +++ b/llm-content/api/payments/cards/iin-api.md @@ -0,0 +1,378 @@ +--- +title: Fetch Card IIN Information using IIN API +description: Fetch customer card IIN information before payment initiation using the IIN API. +--- + +# Fetch Card IIN Information using IIN API + +The Issuer Identification Number (IIN, also known as BIN) is the first 6 digits of a credit or debit card. Our IIN API provides all the details about a given IIN. + +Using this API, you can get details about customers' cards even before the payment is initiated. This helps you to determine whether the payment should be allowed. + +For example, if you do not want to accept credit card payments from customers, you can use this API to detect the customer's card type by checking the IIN. Based on the response, you can decide whether to allow the payment to proceed or not. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Card Tokenisation + +Tokenisation is a process by which the card number gets replaced by another virtual 16-digit number called Token. This token (or tokenised card number) is used to process payments instead of the actual card number. + +A token is a unique digital identifier in mobile and online transactions. The first 6 or 9 digits of token created is referred to as token_iin. + +### RBI Guidelines on Tokenisation + +As per RBI guidelines, businesses or Payment Aggregators cannot save actual card numbers on their servers. They can only tokenise the card and use these tokens for subsequent payments. + +## Tokenised IIN +The first 9 digits of the token are referred to as tokenised IIN. +- For Visa, Mastercard and RuPay tokenised cards, the IIN is the first 9 digits of the token. This is referred to as token_iin. For example, `438628111`. +- For other networks, the length of Token IIN might change to 6 or 8 digits. + +> **INFO** +> +> +> **Handy Tips** +> - You will get the token_iin from your tokenisation solution provider as part of the token entity. +> - If you use **Razorpay** as your tokenisation solution provider, you will get the token_iin within the card object. Refer to the `token.card.token_iin` parameter. +> + +## Uses + +You can use this API to: + +- Check if the IIN of the card number entered by a customer is valid. +- Check if the IIN is eligible for different payment flows such as recurring and EMI. +- Get information about the card network, card type and issuing bank. +- Detect customer's card type. +- Fetch the actual card IIN for a given token IIN. This is currently supported for Visa and MasterCard. + +## Supported Length of the IIN + +Please make sure to pass the IIN with correct length as described in the table below: + +Network | Normal (non-tokenised) Card IINs | Tokenised Card IINs +--- +Visa | 6 to 8 digits | 9 digits +--- +MasterCard | 6 to 8 digits | 9 digits +--- +RuPay| 6 to 8 digits | 9 digits +--- +DICL | 6 to 8 digits | Not Supported +--- +American Express | 6 to 8 digits | Not Supported +--- + +## IIN Entity + +```json: Entity +{ + "iin": "438628", + "entity": "iin", + "network": "Visa", + "type": "credit", + "sub_type": "business", + "issuer_code": "HSBC", + "issuer_name": "HSBC Bank", + "international": false, + "tokenised_iin": false, + "card_iin": null, + "emi": { + "available": false + }, + "recurring": { + "available": true + }, + "authentication_types": [ + { + "type": "3ds" + }, + { + "type": "otp" + } + ] +} +``` + +`iin` +: `string` The Issuer Identification Number (IIN). The starting 6 digits of credit or debit card number. For example, `438628` or `438628111`. + +`entity` +: `string` The name of the entity. Here, it is `iin`. + +`network` +: `string` The card network for the given IIN. Possible values: + + + - `Visa` + - `RuPay` + - `MasterCard` + - `American Express` + - `Diners Club` + - `Maestro` + - `JCB` + - `Union Pay` + - `Unknown` + + + + - `Visa` + - `MasterCard` + + +`type` +: `string` The card type for the given IIN. The card payment pricing may differ based on the card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + +`sub_type` +: `string` The card sub-type for the given IIN. The card payment pricing may differ based on the card sub-type. Possible values: + - `consumer` + - `business` + - `unknown` + +`international` +: `boolean` Determines whether the card is international (issued outside India) or domestic. Possible values: + - `true`: Card issued outside India. + - `false`: Card issued within India. + +`issuer_code` +: `string` The 4-character issuer code unique to each issuing bank. For example, `HSBC`. + +`issuer_name` +: `string` The name of the issuing bank. Available for cards issued in India only. For example, `HSBC Bank`. + +`emi` +: `json object` A JSON object which provides information about the applicability of EMI on the IIN. + + `available` + : `boolean` Determines whether the card is eligible for EMI payments or not. Possible values: + - `true`: IIN is eligible for EMI payments. + - `false`: IIN is not eligible for EMI payments. + +`recurring` +: `json object` A JSON object which provides information about the applicability of recurring payments on the IIN. + + `available` + : `boolean` Determines whether the card is eligible for recurring payments or not. Possible values: + - `true`: IIN is eligible for recurring payments. + - `false`: IIN is not eligible for recurring payments. + +`authentication_types` +: `array` Array which lists the possible authentication types for which the IIN is eligible. Possible values: + - `type: 3ds`: Indicates that the card IIN supports normal 3ds payments. + - `type: otp`: Indicates that the card IIN supports native OTP payments. Native OTP gives you flexibility to accept the OTP entered by the cardholder on your screen. + +## Fetch IIN + +The following API helps you get all the information about the IIN: + +/iins/:iin + +### Path Parameter + +`id` _mandatory_ +: `string` The first 6 to 9 digits of the customer's card number depending on the network. + - The IIN length will be 6 digits for: + - Non-tokenised card IINs for all networks. + - Tokenised IINs for Amex. + - The IIN length will be 9 digits for tokenised IINs for Visa and Mastercard. + +#### 6-digit IINs + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/iins/438628/ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String tokenIin = "438628"; +Iin token = instance.iin.fetch(tokenIin); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +tokenIin = "438628" +client.iin.fetch(tokenIin) + +```php: PHP +$api = new Api($key_id, $secret); + +$tokenIin = "438628"; +$api->iin->fetch($tokenIin); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var tokenIin = "438628"; +instance.iins.fetch(tokenIin) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +tokenIin := "438628" + +body, err := client.Iin.Fetch(tokenIin, nil, nil) + +```json: Response +{ + "iin": "438628", + "entity": "iin", + "network": "Visa", + "type": "credit", + "sub_type": "business", + "issuer_code": "HSBC", + "issuer_name": "HSBC Bank", + "international": false, + "emi": { + "available": true + }, + "recurring": { + "available": true + }, + "authentication_types": [ + { + "type": "3ds" + }, + { + "type": "otp" + }, + { + "type": "otp_less_authentication" + } + ] +} +``` + +#### 9-digit IINs + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/iins/987654321/ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String tokenIin = "987654321"; +Iin token = instance.iin.fetch(tokenIin); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +tokenIin = "987654321" +client.iin.fetch(tokenIin) + +```php: PHP +$api = new Api($key_id, $secret); + +$tokenIin = "987654321"; +$api->iin->fetch($tokenIin); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var tokenIin = "987654321"; +instance.iins.fetch(tokenIin) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +tokenIin := "987654321" + +body, err := client.Iin.Fetch(tokenIin, nil, nil) + +```json: Response +{ + "iin": "987654321", + "entity": "iin", + "network": "Visa", + "type": "credit", + "sub_type": "business", + "issuer_code": "HSBC", + "issuer_name": "HSBC Bank", + "international": false, + "tokenised_iin": true, + "card_iin": "438628”, + } + "emi":{ + "available": true + }, + "recurring": { + "available": true + }, + "authentication_types": [ + { + "type":"3ds" + }, + { + "type":"otp" + } + ] +} +``` + +## Error Handling + +### Invalid IIN + +The following error will be shown when the IIN is invalid: + +```json: Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "IIN 000000 does not exist", + "source": "merchant", + "step": "NA", + "reason": "iin_does_not_exist", + "metadata": {} + } +} +``` + +### Invalid IIN length + +The following error will be shown when the length of IIN is invalid : + +```json: Error Response: 6 digits +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The requested IIN is a card IIN & should be 6 digits long.", + "source": "business", + "step": "NA", + "reason": "invalid_iin_length", + "metadata": {} + } +} +```json: Error Response: 9 digits +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The requested IIN is a token IIN & should be 9 digits long.", + "source": "business", + "step": "NA", + "reason": "invalid_iin_length", + "metadata": {} + } +} +``` diff --git a/llm-content/api/payments/customer-payment-history.md b/llm-content/api/payments/customer-payment-history.md new file mode 100644 index 00000000..a5f828bf --- /dev/null +++ b/llm-content/api/payments/customer-payment-history.md @@ -0,0 +1,133 @@ +--- +title: Customer Payment History +description: View all the payments associated with a customer using Razorpay APIs. +--- + +# Customer Payment History + +You can retrieve the history of all payments made by a customer using Razorpay APIs. + +## Prerequisites + +1. To fetch payments made by a customer, you must create and associate a customer with every payment. + Create a new customer using the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) and store the customer ID at your end. This customer ID must be passed when the payment is made by the customer. + +2. Generate the API keys from the Dashboard for authenticating the API requests with Razorpay. +Watch [this](https://i.imgur.com/ylwYzbC.gif) animation to learn how to generate the API keys in the Dashboard. + +> **INFO** +> +> +> **Note** +> +> When the customer makes a first-time payment, the created `customer_id` can be used for future payments made by the same customer. +> + +## Associate a Payment with a Customer + +To associate the payment details to a specific customer, pass the created `customer_id` to the [ Razorpay Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#12-integrate-with-checkout-on-client-side) at the time of payment. + +```html: HTML + +``` + +## Fetch Payments by Customer ID + +The following endpoint is used for retrieving a list of payments for a customer: + +/payments + +### Path Parameters + +`customer_id` _string_ +: Unique identifier of the customer, which is passed to the Checkout form at the time of payment. + +### Query Parameters + +`from` _timestamp_ +: Timestamp, in seconds, at which the payments were created. + +`to` _timestamp_ +: Timestamp, in seconds, till which the payments were created. + +`count` _integer_ +: The number of payments to be fetched. Defaults to 10. + +`skip` _integer_ +: The number of payments to be skipped. + +### Example + +```curl: Sample request +curl -X GET -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +https://api.razorpay.com/v1/payments?customer_id=cust_32hsbEKriO6ai4 +```json: Response +{ + "count": 2, + "entity": "collection", + "items": [ + { + "id": "pay_7IZD7aJ2kkmOjk", + "entity": "payment", + "amount": 29935, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "wallet", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "A Wild Sheep Chase is the third novel by Japanese author Haruki Murakami", + "card_id": null, + "bank": null, + "wallet": "olamoney", + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "customer_id": "cust_32hsbEKriO6ai4", + "notes": { + "merchant_order_id": "order id" + }, + "fee": 12, + "tax": 2, + "error_code": null, + "error_description": null, + "created_at": 1487348129 + }, + { + "id": "pay_19btGlBig6xZ2f", + "entity": "payment", + "amount": 500, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Purchase Description", + "card_id": "card_12abClEig3hi2k", + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "customer_id": "cust_32hsbEKriO6ai4", + "notes": { + "merchant_order_id": "order id" + } + }, + { + "fee": 12, + "tax": 2, + "error_code": null, + "error_description": null, + "created_at": 1400826750 + } + ] +} +``` diff --git a/llm-content/api/payments/downtime.md b/llm-content/api/payments/downtime.md new file mode 100644 index 00000000..76e1ed3c --- /dev/null +++ b/llm-content/api/payments/downtime.md @@ -0,0 +1,31 @@ +--- +title: Payment Downtime API +heading: Payment Downtime +description: Check the Payment Downtime API to view a list of affected payment methods during downtime. +--- + +# Payment Downtime + +Downtime is when one or more payment options underperform, leading to considerable delays in payment processing. These downtimes are due to technical issues or outages at Razorpay's partner or issuing banks. + + + Razorpay [informs you about the downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/downtime-updates.md) to communicate it to your customers and display only the unaffected payment methods while accepting payments from them. You can poll the API or configure Webhooks to be notified of the downtimes and plan the remediation steps accordingly. Downtime communication for the payment methods such as cards, netbanking and UPI is available. + + + Fork the Razorpay Postman Public Workspace and try the Downtime APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-4270ff49-ebe0-478e-8d3d-e7c2c75b2e4d) + +### Related Guides + +[About Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/downtime-updates.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payments-downtime) + +### Endpoints + +- **get** `/v1/payments/downtimes` - Fetch Payment Downtime Details: + Retrieves details of Payment Downtime. + +- **get** `/v1/payments/downtimes/:id` - Fetch Payment Downtime Details With ID: + Retrieves details of a Payment Downtime with id. diff --git a/llm-content/api/payments/downtime/entity.md b/llm-content/api/payments/downtime/entity.md new file mode 100644 index 00000000..deec67f4 --- /dev/null +++ b/llm-content/api/payments/downtime/entity.md @@ -0,0 +1,217 @@ +--- +title: Payment Downtime Entity +description: Know about the Payment Downtime entity parameters and their description. +--- + +# Payment Downtime Entity + +## Payment Downtime Entity + +The Downtime entity has the following parameters: + +### Response + +```json: Netbanking +{ + "id": "down_F1cxDoHWD4fkQt", + "method": "netbanking", + "begin": 1591946222, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "bank": "COSB" + }, + "created_at": 1591946223, + "updated_at": 1591946297 +} +```json: UPI - VPA Handle +{ + "id": "down_F8LCfthx90fMOo", + "method": "upi", + "begin": 1593412063, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "vpa_handle": "oksbi" + }, + "created_at": 1593412092, + "updated_at": 1593412092 +} +```json: UPI - PSP +{ + "id": "down_F8LCfthx90fMOo", + "method": "upi", + "begin": 1593412063, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "psp": "bhim" + }, + "created_at": 1593412092, + "updated_at": 1593412092 +} +```json: Turbo UPI +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "down_F1cxDoHWD4fkQt", + "entity": "payment.downtime", + "method": "upi", + "begin": 1591946222, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "flow": "in_app" + }, + "created_at": 1591946223, + "updated_at": 1591946297 + } + ] +} +```json: Card - Issuer +{ + "id": "down_F7LroRQAAFuswd", + "method": "card", + "begin": 1593196031, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "issuer": "SBIN", + "card_type": "credit" + }, + "created_at": 1593196089, + "updated_at": 1593196089 +} +```json: Card - Network +{ + "id": "down_F7LroRQAAFuswd", + "method": "card", + "begin": 1593196031, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "network": "VISA", + "card_type": "credit" + }, + "created_at": 1593196089, + "updated_at": 1593196089 +} +``` + +### Parameters + +`id` +: `string` Unique identifier of the downtime's occurrence. + +`entity` +: `string` Here, it will be `payment.downtime`. + +`method` +: `string` The payment method that is experiencing the downtime. Possible values include: + - `card` + - `netbanking` + - `upi` + +`begin` +: `integer` Timestamp (in Unix) that indicates the start of the downtime. Applicable for both scheduled and unscheduled downtimes. + +`end` +: `integer` Timestamp (in Unix) that indicates the end of the downtime. + Available only for scheduled downtimes, where the end-time is known. Set to `null` when the end-time is unknown, possibly during unscheduled downtimes. + +`status` +: `string` Status of the downtime. Possible statuses: + - `scheduled`: A downtime is scheduled to happen at a later time. + - `started`: The downtime has started and is ongoing. + - `resolved`: The downtime is resolved. + - `updated`: An ongoing downtime that has been updated after its start. For example, when the severity of the downtime changes from medium to high. + +`scheduled` +: `boolean` Indicates if the downtime is scheduled or unscheduled. Possible values: + - `true`: This is a scheduled downtime by the issuer, network, or the bank, which was informed to Razorpay. + - `false`: This is an unscheduled downtime. + +`severity` +: `string` Severity of the downtime. Possible values: + - `high`: Possible when all the payment methods are affected by downtime. Observed when the issuer, bank or network is down. + - `medium`: Possible when a higher number of declines in transactions or low success rates are observed with the payment methods. + - `low`: Possible when the reason for the downtime is unknown. Impact on payment methods is minimal. + +`instrument` +: `string` Payment method that is underperforming. + + `bank` _if method=netbanking_ + : `string` Bank code of the affected bank. Possible values: + - `HDFC` + - `ICIC` + - `SBIN` + - `KKBK` + - `UTIB` + - `PUNB` + + `network` _if method=card_ + : `string` Card network. Possible values: + - `AMEX` + - `DICL` + - `MC` + - `RUPAY` + - `VISA` + - `ALL` + + `issuer` _if method=card_ + : `string` The 4-character issuer code unique to each issuing bank in India. Possible values: + - `SBIN` + - `HDFC` + - `ICIC` + - `UTIB` + - `CITI` + - `PUNB` + - `KKBK` + - `CNRB` + - `BKID` + - `BARB` + - `JAKA` + - `UBIN` + + `psp` _if method=upi_ + : `string` Code of the affected Payment Service Provider (PSP). This is populated only when VPA handles associated with the PSP are down. If a PSP is associated with multiple VPA handles, it is marked down only when **all** the handles associated with it are down. For example, `google_pay` is marked down only when all Google Pay handles - `oksbi`, `okhdfcbank`, `okicici` and `okaxis` are down. Possible values for this parameter are: + - `google_pay` + - `phonepe` + - `paytm` + - `bhim` + + `vpa_handle` _if method=upi_ + : `string` Affected VPA handle. For example, `@oksbi`. To learn about the possible values, refer to the [list of handles supported by NPCI](https://www.npci.org.in/what-we-do/upi/3rd-party-apps). If the entire UPI system is experiencing a downtime, the value `ALL` is displayed. + + `card_type` _if method=card_ + : `string` The card type used to process the payment. Possible values: + - `credit` + - `debit` + +`created_at` +: `integer` Timestamp (in Unix) that indicates the time at which the downtime was recorded in Razorpay servers. + +`updated_at` +: `integer` Timestamp (in Unix) that indicates the time at which the downtime record was updated in Razorpay servers. + +`flow` +: `string` Indicates the UPI payments flow being used during the downtime event. Possible values: + - `collect` + - `intent` + - `in_app` Only applicable for Turbo UPI payments. + +Know more about [the possible values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). diff --git a/llm-content/api/payments/downtime/fetch-all.md b/llm-content/api/payments/downtime/fetch-all.md new file mode 100644 index 00000000..b7b8215f --- /dev/null +++ b/llm-content/api/payments/downtime/fetch-all.md @@ -0,0 +1,324 @@ +--- +title: Fetch All Payment Downtime Details +description: Fetch all payment downtime details using Razorpay Payment Downtime API. +--- + +# Fetch All Payment Downtime Details + +## Fetch All Payment Downtime Details + +Use this endpoint to retrieve details of all payment downtimes. + +### Response + +```json: Netbanking +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "down_F1cxDoHWD4fkQt", + "entity": "payment.downtime", + "method": "netbanking", + "begin": 1591946222, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "bank": "COSB" + }, + "created_at": 1591946223, + "updated_at": 1591946297 + }, + { + "id": "down_F1cxlArweEWitF", + "entity": "payment.downtime", + "method": "netbanking", + "begin": 1591946222, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "bank": "UTIB" + }, + "created_at": 1591946254, + "updated_at": 1591946298 + } + ] +} +```json: UPI Handle +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "down_F8LCfthx90fMOo", + "entity": "payment.downtime", + "method": "upi", + "begin": 1593412063, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "vpa_handle": "oksbi" + }, + "created_at": 1593412092, + "updated_at": 1593412092 + } + ] +} +```json: UPI PSP +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "down_F8LCfthx90fMOo", + "entity": "payment.downtime", + "method": "upi", + "begin": 1593412063, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "psp": "bhim", + "flow": "collect" + }, + "created_at": 1593412092, + "updated_at": 1593412092 + } + ] +} +```json: Turbo UPI +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "down_F1cxDoHWD4fkQt", + "entity": "payment.downtime", + "method": "upi", + "begin": 1591946222, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "flow": "in_app" + }, + "created_at": 1591946223, + "updated_at": 1591946297 + } + ] +} +```json: Card - Network +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "down_F7LroRQAAFuswd", + "entity": "payment.downtime", + "method": "card", + "begin": 1593196031, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "network": "VISA" + }, + "created_at": 1593196089, + "updated_at": 1593196089 + } + ] +} +```json: Card - Issuer +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "down_F7LroRQAAFuswd", + "entity": "payment.downtime", + "method": "card", + "begin": 1593196031, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "issuer": "SBIN" + }, + "created_at": 1593196089, + "updated_at": 1593196089 + } + ] +} +```json: Card / Netbanking +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "down_F7LroRQAAFuswd", + "entity": "payment.downtime", + "method": "card", + "begin": 1593196031, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "issuer": "SBIN", + "card_type": "credit" + }, + "created_at": 1593196089, + "updated_at": 1593196089 + }, + { + "id": "down_F1cxDoHWD4fkQt", + "entity": "payment.downtime", + "method": "netbanking", + "begin": 1591946222, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "bank": "COSB" + }, + "created_at": 1591946223, + "updated_at": 1591946297 + }, + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` +: `string` Unique identifier of the downtime's occurrence. + +`entity` +: `string` Here, it will be `payment.downtime`. + +`method` +: `string` The payment method that is experiencing the downtime. Possible values include: + - `card` + - `netbanking` + - `upi` + +`begin` +: `integer` Timestamp (in Unix) that indicates the start of the downtime. Applicable for both scheduled and unscheduled downtimes. + +`end` +: `integer` Timestamp (in Unix) that indicates the end of the downtime. + Available only for scheduled downtimes, where the end-time is known. Set to `null` when the end-time is unknown, possibly during unscheduled downtimes. + +`status` +: `string` Status of the downtime. +Possible statuses are. + - `scheduled`: A downtime is scheduled to happen at a later time. + - `started`: The downtime has started and is ongoing. + - `updated`: An ongoing downtime that has been updated after its start. For example, when the severity of the downtime changes from medium to high. + +`scheduled` +: `boolean` Possible values: + - `true`: This is a scheduled downtime by the issuer, network, or the bank, which was informed to Razorpay. + - `false`: This is an unscheduled downtime. + +`severity` +: `string` Severity of the downtime. +Possible values: + - `high`: Possible when all the payment methods are affected by downtime. Observed when the issuer, bank or network is down. + - `medium`: Possible when a higher number of declines in transactions or low success rates are observed with the payment methods. + - `low`: Possible when the reason for the downtime is unknown. Impact on payment methods is minimal. + +`instrument` +: `string` Payment method that is underperforming. + + `bank` _if method=netbanking_ + : `string` Bank code of the affected bank. Possible values: + - `HDFC` + - `ICIC` + - `SBIN` + - `KKBK` + - `UTIB` + - `PUNB` + + `network` _if method=card_ + : `string` Card network. Possible values: + - `AMEX` + - `DICL` + - `MC` + - `RUPAY` + - `VISA` + - `ALL` + + `issuer` _if method=card_ + : `string` The 4-character issuer code unique to each issuing bank in India. Possible values: + - `SBIN` + - `HDFC` + - `ICIC` + - `UTIB` + - `CITI` + - `PUNB` + - `KKBK` + - `CNRB` + - `BKID` + - `BARB` + - `JAKA` + - `UBIN` + + `psp` _if method=upi_ + : `string` Code of the affected Payment Service Provider (PSP). This is populated only when VPA handles associated with the PSP are down. If a PSP is associated with multiple VPA handles, it is marked down only when **all** the handles associated with it are down. For example, `google_pay` is marked down only when all Google Pay handles - `oksbi`, `okhdfcbank`, `okicici` and `okaxis` are down. Possible values for this parameter are: + - `google_pay` + - `phonepe` + - `paytm` + - `bhim` + + `vpa_handle` _if method=upi_ + : `string` Affected VPA handle. For example, `@oksbi`. To learn about the possible values, refer to the [list of handles supported by NPCI](https://www.npci.org.in/what-we-do/upi/3rd-party-apps). If the entire UPI system is experiencing a downtime, the value `ALL` is displayed. + + `card_type` _if method=card_ + : `string` The card type used to process the payment. Possible values: + - `credit` + - `debit` + + `flow` + : `string` Indicates the UPI payments flow being used during the downtime event. Possible values: + - `collect` + - `intent` + - `in_app` Only applicable for Turbo UPI payments. + +`created_at` +: `integer` Timestamp (in Unix) that indicates the time at which the downtime was recorded in Razorpay servers. + +`updated_at` +: `integer` Timestamp (in Unix) that indicates the time at which the downtime record was updated in Razorpay servers. + +Know more about [the possible values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. diff --git a/llm-content/api/payments/downtime/fetch-with-id.md b/llm-content/api/payments/downtime/fetch-with-id.md new file mode 100644 index 00000000..c8d77949 --- /dev/null +++ b/llm-content/api/payments/downtime/fetch-with-id.md @@ -0,0 +1,237 @@ +--- +title: Fetch Payment Downtime Details With ID +description: Fetch Payment Downtime Details With id using Razorpay Payments Downtime API. +--- + +# Fetch Payment Downtime Details With ID + +## Fetch Payment Downtime Details With ID + +Use this endpoint to fetch downtime status if you have not received any webhook notifications due to technical issues. Usually, downtime webhook payloads are delivered within few seconds of the event. However, in some cases, this can be delayed by few minutes due to various reasons. + +### Response + +```json: Netbanking +{ + "id": "down_F1cxDoHWD4fkQt", + "method": "netbanking", + "begin": 1591946222, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "bank": "COSB" + }, + "created_at": 1591946223, + "updated_at": 1591946297 +} +```json: UPI Handle +{ + "id": "down_F8LCfthx90fMOo", + "method": "upi", + "begin": 1593412063, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "vpa_handle": "oksbi" + }, + "created_at": 1593412092, + "updated_at": 1593412092 +} +```json: UPI PSP +{ + "id": "down_F8LCfthx90fMOo", + "method": "upi", + "begin": 1593412063, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "psp": "bhim", + "flow": "collect" + }, + "created_at": 1593412092, + "updated_at": 1593412092 +} +```json: Turbo UPI +{ + "id": "down_F1cxDoHWD4fkQt", + "method": "upi", + "begin": 1593412063, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "flow": "in_app" + }, + "created_at": 1593412092, + "updated_at": 1593412092 +} +```json: Card - Issuer +{ + "id": "down_F7LroRQAAFuswd", + "method": "card", + "begin": 1593196031, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "issuer": "SBIN", + "card_type": "credit" + }, + "created_at": 1593196089, + "updated_at": 1593196089 +} +```json: Card - Network +{ + "id": "down_F7LroRQAAFuswd", + "method": "card", + "begin": 1593196031, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "network": "VISA", + "card_type": "credit" + }, + "created_at": 1593196089, + "updated_at": 1593196089 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the downtime. + +### Parameters + +`id` +: `string` Unique identifier of the downtime's occurrence. + +`entity` +: `string` Here, it will be `payment.downtime`. + +`method` +: `string` The payment method that is experiencing the downtime. Possible values include: + - `card` + - `netbanking` + - `upi` + +`begin` +: `integer` Timestamp (in Unix) that indicates the start of the downtime. Applicable for both scheduled and unscheduled downtimes. + +`end` +: `integer` Timestamp (in Unix) that indicates the end of the downtime. + Available only for scheduled downtimes, where the end-time is known. Set to `null` when the end-time is unknown, possibly during unscheduled downtimes. + +`status` +: `string` Status of the downtime. +Possible statuses are. + - `scheduled`: A downtime is scheduled to happen at a later time. + - `started`: The downtime has started and is ongoing. + - `resolved`: The downtime is resolved. + - `updated`: An ongoing downtime that has been updated after its start. For example, when the severity of the downtime changes from medium to high. + +`scheduled` +: `boolean` Possible values: + - `true`: This is a scheduled downtime by the issuer, network, or the bank, which was informed to Razorpay. + - `false`: This is an unscheduled downtime. + +`severity` +: `string` Severity of the downtime. +Possible values: + - `high`: Possible when all the payment methods are affected by downtime. Observed when the issuer, bank or network is down. + - `medium`: Possible when a higher number of declines in transactions or low success rates are observed with the payment methods. + - `low`: Possible when the reason for the downtime is unknown. Impact on payment methods is minimal. + +`instrument` +: `string` Payment method that is underperforming. + + `bank` _if method=netbanking_ + : `string` Bank code of the affected bank. Possible values: + - `HDFC` + - `ICIC` + - `SBIN` + - `KKBK` + - `UTIB` + - `PUNB` + + `network` _if method=card_ + : `string` Card network. Possible values: + - `AMEX` + - `DICL` + - `MC` + - `RUPAY` + - `VISA` + - `ALL` + + `issuer` _if method=card_ + : `string` The 4-character issuer code unique to each issuing bank in India. Possible values: + - `SBIN` + - `HDFC` + - `ICIC` + - `UTIB` + - `CITI` + - `PUNB` + - `KKBK` + - `CNRB` + - `BKID` + - `BARB` + - `JAKA` + - `UBIN` + + `psp` _if method=upi_ + : `string` Code of the affected Payment Service Provider (PSP). This is populated only when VPA handles associated with the PSP are down. If a PSP is associated with multiple VPA handles, it is marked down only when **all** the handles associated with it are down. For example, `google_pay` is marked down only when all Google Pay handles - `oksbi`, `okhdfcbank`, `okicici` and `okaxis` are down. Possible values for this parameter are: + - `google_pay` + - `phonepe` + - `paytm` + - `bhim` + + `vpa_handle` _if method=upi_ + : `string` Affected VPA handle. For example, `@oksbi`. To learn about the possible values, refer to the [list of handles supported by NPCI](https://www.npci.org.in/what-we-do/upi/3rd-party-apps). If the entire UPI system is experiencing a downtime, the value `ALL` is displayed. + + `card_type` _if method=card_ + : `string` The card type used to process the payment. Possible values: + - `credit` + - `debit` + + `flow` + : `string` Indicates the UPI payments flow being used during the downtime event. Possible values: + - `collect` + - `intent` + - `in_app` Only applicable for Turbo UPI payments. + +`created_at` +: `integer` Timestamp (in Unix) that indicates the time at which the downtime was recorded in Razorpay servers. + +`updated_at` +: `integer` Timestamp (in Unix) that indicates the time at which the downtime record was updated in Razorpay servers. + +Know more about [the possible values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. diff --git a/llm-content/api/payments/entity.md b/llm-content/api/payments/entity.md new file mode 100644 index 00000000..9bd22aeb --- /dev/null +++ b/llm-content/api/payments/entity.md @@ -0,0 +1,344 @@ +--- +title: Payments Entity +description: Know about payment entities and their description. +--- + +# Payments Entity + +The Payments entity has the following parameters: + +### Response + +```json: Success +{ + "id": "pay_L0nSsccovt6zyp", + "entity": "payment", + "amount": 9900, + "currency": "INR", + "status": "captured", + "order_id": "order_L0nS83FfCHaWqV", + "invoice_id": "inv_L0nS7JIyuX6Lyb", + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "#L0nS7JIyuX6Lyb", + "card_id": "card_L0nSsfPv1LjA20", + "card": { + "id": "card_L0nSsfPv1LjA20", + "entity": "card", + "name": "", + "last4": "0153", + "network": "Visa", + "type": "debit", + "issuer": null, + "international": false, + "emi": false, + "sub_type": "consumer", + "token_iin": null + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+9000090000", + "notes": [], + "fee": 198, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "299196", + "authentication_reference_number": "100222021120200000000742753928" // Pass AEVV as the value for AMEX card transactions. + }, + "created_at": 1672987417 +} +```json: Failure +{ + "id": "pay_Kb8P4crStfXJea", + "entity": "payment", + "amount": 10000, + "currency": "INR", + "status": "failed", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": "Test Transaction", + "card_id": "card_Kb8P4eO7zAsjQJ", + "card": { + "id": "card_Kb8P4eO7zAsjQJ", + "entity": "card", + "name": "", + "last4": "0153", + "network": "Visa", + "type": "debit", + "issuer": null, + "international": false, + "emi": false, + "sub_type": "consumer", + "token_iin": null + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+9000090000", + "notes": { + "address": "Razorpay Corporate Office" + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Your payment has been cancelled. Try again or complete the payment later.", + "error_source": "customer", + "error_step": "payment_authentication", + "error_reason": "payment_cancelled", + "acquirer_data": { + "auth_code": null + }, + "created_at": 1667384312 +} +``` + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `emi` + + - `upi` + + + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + +`captured` +: `boolean` Indicates if the payment is captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + + + + + + + + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. + + +> **INFO** +> +> +> **Handy Tips** +> +> This attribute will not be set for the card issued by a foreign bank. +> + + + + `emi` + : `boolean` This attribute is set to `true` if the card can be used for EMI payment method. + + + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + +> **INFO** +> +> +> **Handy Tips** +> +> Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). +> + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible value `in_app`. + +> **INFO** +> +> +> **Handy Tips** +> +> The field `flow` is present only in the case of Turbo UPI Payments. +> + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. diff --git a/llm-content/api/payments/fetch-all-payments-with-expanded-card-details.md b/llm-content/api/payments/fetch-all-payments-with-expanded-card-details.md new file mode 100644 index 00000000..ee901cc1 --- /dev/null +++ b/llm-content/api/payments/fetch-all-payments-with-expanded-card-details.md @@ -0,0 +1,348 @@ +--- +title: Fetch All Payments (With Expanded Card Details) +description: Fetch all Payments (With Expanded Card Details) using Razorpay Payments API. +--- + +# Fetch All Payments (With Expanded Card Details) + +## Fetch All Payments (With Expanded Card Details) + +Use this endpoint to retrieve the expanded card details of the payments, where the payment method is `card`. + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "pay_KbC8Hxx98GVyYb", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Test Transaction", + "card_id": "card_KbC8I0uOUzzcqX", + "card": { + "id": "card_KbC8I0uOUzzcqX", + "entity": "card", + "name": "", + "last4": "3818", + "network": "RuPay", + "type": "debit", + "issuer": null, + "international": false, + "emi": false, + "sub_type": "consumer", + "token_iin": null + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@gmail.com", + "contact": "+919000090000", + "token_id": "token_KbC8IC6N0evwsl", + "notes": { + "address": "Razorpay Corporate Office" + }, + "fee": 20, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "600165", + "authentication_reference_number": null // Pass AEVV as the value for AMEX card transactions. + }, + "created_at": 1667397446 + }, + { + "id": "pay_KbC4riXCVxRSj9", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Test Transaction", + "card_id": "card_KbC4rldTyupyPI", + "card": { + "id": "card_KbC4rldTyupyPI", + "entity": "card", + "name": "", + "last4": "3818", + "network": "RuPay", + "type": "debit", + "issuer": null, + "international": false, + "emi": false, + "sub_type": "consumer", + "token_iin": null + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "address": "Razorpay Corporate Office" + }, + "fee": 20, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "231868", + "authentication_reference_number": null // Pass AEVV as the value for AMEX card transactions. + }, + "created_at": 1667397252 + } + ] +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`from` _optional_ +: `integer` UNIX timestamp, in seconds, from when payments are to be fetched. + +`to` _optional_ +: `integer` UNIX timestamp, in seconds, till when payments are to be fetched. + +`count` _optional_ +: `integer` Number of payments to be fetched. + Default value is 10. Maximum value is 100. This can be used for pagination, in combination with the `skip` parameter. + +`skip` _optional_ +: `integer` Number of records to be skipped while fetching the payments. + +`expand[]` _optional_ +: `array` Used to retrieve additional information about the payment, the method used to make the payment. The response will include a sub-entity if this parameter is used. +Possible values: + - `card`: Expanded card details, usable for card and EMI payments. + - `emi`: Expanded EMI plan details, usable for EMI payments. + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + +> **WARN** +> +> +> **Watch Out!** +> +> Cardholder names for domestic cards are considered sensitive information and are not populated. +> + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. This attribute will not be set for the card issued by a foreign bank. + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + + + Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible value `in_app`. The field `flow` is present only in the case of Turbo UPI Payments. + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +Value of each expand must be one of following types: card, emi, transaction, refunds, offers, token, transaction.settlement . +* code: 400 +* description: The value for the `expand` parameter is incorrect. +* solution: Enter the correct value for the `expand` parameter. Here it is `card`. diff --git a/llm-content/api/payments/fetch-all-payments-with-expanded-emi-details.md b/llm-content/api/payments/fetch-all-payments-with-expanded-emi-details.md new file mode 100644 index 00000000..8fa4decd --- /dev/null +++ b/llm-content/api/payments/fetch-all-payments-with-expanded-emi-details.md @@ -0,0 +1,378 @@ +--- +title: Fetch All Payments (With Expanded EMI Details) +description: Fetch all Payments (With Expanded EMI Details) using Razorpay Payments API. +--- + +# Fetch All Payments (With Expanded EMI Details) + +## Fetch All Payments (With Expanded EMI Details) + +Use this endpoint to retrieve the expanded EMI plan details of the payments, in which the payment method is `emi`. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/payments?expand[]=emi + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("expand[]","emi"); + +List payment = razorpay.payments.fetchAll(params); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.all({'expand[]':'emi'}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "expand[]":"emi", + } + +body, err := client.Payment.All(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->all(array('expand[]'=>'emi') + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Payment.all({'expand[]':'emi'}) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.all({'expand[]':'emi'}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("expand[]","emi"); + +List payment = client.Payment.All(paramRequest); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "pay_KbCVlLqUbb3VhA", + "entity": "payment", + "amount": 400000, + "currency": "INR", + "status": "authorized", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "emi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": "Test Transaction", + "card_id": "card_KbCVlPnxWRlOpH", + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "address": "Razorpay Corporate Office" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "205480" + }, + "emi": { + "issuer": "HDFC", + "type": "credit", + "rate": 1500, + "duration": 24 + }, + "created_at": 1667398779 + }, + { + "id": "pay_KbCUSPzYZdEVGA", + "entity": "payment", + "amount": 300000, + "currency": "INR", + "status": "authorized", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "emi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": "Test Transaction", + "card_id": "card_KbCUSTVRUci85O", + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "address": "Razorpay Corporate Office" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "102251" + }, + "emi": { + "issuer": "HDFC", + "type": "credit", + "rate": 1500, + "duration": 12 + }, + "created_at": 1667398705 + } + ] +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Value of each expand must be one of following types: card, emi, transaction, transaction.settlement, refunds, offers, token", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "expand.0" + } +} +``` + +### Parameters + +`from` _optional_ +: `integer` UNIX timestamp, in seconds, from when payments are to be fetched. + +`to` _optional_ +: `integer` UNIX timestamp, in seconds, till when payments are to be fetched. + +`count` _optional_ +: `integer` Number of payments to be fetched. + Default value is 10. Maximum value is 100. This can be used for pagination, in combination with the `skip` parameter. + +`skip` _optional_ +: `integer` Number of records to be skipped while fetching the payments. + +`expand[]` _optional_ +: `array` Used to retrieve additional information about the payment, the method used to make the payment. The response will include a sub-entity if this parameter is used. +Possible values: + - `card`: Expanded card details, usable for card and EMI payments. + - `emi`: Expanded EMI plan details, usable for EMI payments. + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. This attribute will not be set for the card issued by a foreign bank. + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + + + Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible value `in_app`. The field `flow` is present only in the case of Turbo UPI Payments. + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +Value of each expand must be one of following types: card, emi, transaction, refunds, offers, token, transaction.settlement. +* code: 400 +* description: The value for the `expand` parameter is incorrect. +* solution: Enter the correct value for the `expand` parameter. Here it is `emi`. diff --git a/llm-content/api/payments/fetch-all-payments.md b/llm-content/api/payments/fetch-all-payments.md new file mode 100644 index 00000000..26f8f224 --- /dev/null +++ b/llm-content/api/payments/fetch-all-payments.md @@ -0,0 +1,257 @@ +--- +title: Fetch All Payments +description: Fetch all Payments using Razorpay Payments API. +--- + +# Fetch All Payments + +## Fetch All Payments + +Use this endpoint to retrieve details of all the payments. By default, only the last 10 records are displayed. You can use the `count` and `skip` parameters to retrieve the specific number of records that you need. + +### Parameters + +`from` _optional_ +: `integer` UNIX timestamp, in seconds, from when payments are to be fetched. + +`to` _optional_ +: `integer` UNIX timestamp, in seconds, till when payments are to be fetched. + +`count` _optional_ +: `integer` Number of payments to be fetched. + Default value is 10. Maximum value is 100. This can be used for pagination, in combination with the `skip` parameter. + +`skip` _optional_ +: `integer` Number of records to be skipped while fetching the payments. + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + + + + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. This attribute will not be set for the card issued by a foreign bank. + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + + + Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible values: + - `intent`: When a UPI app is selected and user is redirected to it. + - `collect`: The user enters their UPI ID and receives a notification from the UPI app. They open the app and complete the payment. + - `in_app`: In case of Turbo UPI Payments. + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + + + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. This attribute will not be set for the card issued by a foreign bank. + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +from must be between 946684800 and 4765046400 +* code: 400 +* description: The time range entered is invalid. +* solution: Enter a valid time range between `946684800` and `4765046400`. diff --git a/llm-content/api/payments/fetch-card-details-payment.md b/llm-content/api/payments/fetch-card-details-payment.md new file mode 100644 index 00000000..ae1f0147 --- /dev/null +++ b/llm-content/api/payments/fetch-card-details-payment.md @@ -0,0 +1,112 @@ +--- +title: Fetch Card Details of a Payment +description: Fetch Card Details of a Payment using Razorpay Payments API. +--- + +# Fetch Card Details of a Payment + +## Fetch Card Details of a Payment + +Use this endpoint to retrieve the details of the card used to make a payment. + +### Response + +```json: Success +{ + "id": "card_JXPULjlKqC5j0i", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "4366", + "network": "Visa", + "type": "credit", + "issuer": "UTIB", + "international": false, + "emi": false, + "sub_type": "consumer", + "token_iin": null +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Payment was not done using card", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the payment for which you want to retrieve card details. + +### Parameters + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. This attribute will not be set for the card issued by a foreign bank. + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + + + Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The id provided does not exist. +* code: 400 +* description: The `payment_id` provided is incorrect. +* solution: Enter the correct `payment_id`. + +Payment was not done using card. +* code: 400 +* description: The payment for the `payment_id` entered was not completed using a card. +* solution: Use a `payment_id` which was completed using a card. diff --git a/llm-content/api/payments/fetch-payment-expanded-card.md b/llm-content/api/payments/fetch-payment-expanded-card.md new file mode 100644 index 00000000..0f147ae6 --- /dev/null +++ b/llm-content/api/payments/fetch-payment-expanded-card.md @@ -0,0 +1,349 @@ +--- +title: Fetch a Payment (With Expanded Card Details) +description: Fetch a Payment with Expanded Card Details using Razorpay Payments API. +--- + +# Fetch a Payment (With Expanded Card Details) + +## Fetch a Payment (With Expanded Card Details) + +Use this endpoint to retrieve the details of all the payments that you created, with the `card` parameter expanded in the payments object. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/payments/pay_DG4a4vAWvKrh79/?expand[]=card + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_JqLHMVryzMEafT"; + +JSONObject request = new JSONObject(); +request.put("expand[]","card"); + +Entity payment = razorpay.payments.get("payments/"+paymentId, request); + +```python: Python +import razorpay + +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch("pay_JqLHMVryzMEafT",{"expand[]":"card"}) + +```ruby: Ruby +require "razorpay" + +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_JLcbRwKkgDlWWJ" + +para_attr = { + "expand[]": "card" +} + +Razorpay::Payment.request.get paymentId , para_attr + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "expand[]":"card", +} + +paymentId := "pay_JqLHMVryzMEafT" + +body, err := client.Payment.Fetch(paymentId, data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$paymentId = "pay_MLzFlOC98cJmHQ"; + +$api->payment->fetch($paymentId)->expandedDetails(["expand[]"=> "card"]); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +paymentId = "pay_JqLHMVryzMEafT" + +instance.payments.fetch(paymentId,{"expand[]":"card"}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("expand[]","card"); + +List payment = client.Payment.All(paramRequest); +``` + +### Response + +```json: Success +{ + "id": "pay_H9oR0gLCaVlV6m", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "failed", + "order_id": "order_H9o58N6qmLYQKC", + "invoice_id": null, + "terminal_id": "term_G5kJnYM9GhhLYT", + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": "card_H9oR0ocen1cmZq", + "card": { + "id": "card_H9oR0ocen1cmZq", + "entity": "card", + "name": "Gaurav", + "last4": "1213", + "network": "RuPay", + "type": "credit", + "issuer": "UTIB", + "international": false, + "emi": false, + "sub_type": "business" + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "email": "gaurav.kumar@example.com", + "phone": "09000090000" + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Card issuer is invalid", + "error_source": "customer", + "error_step": "payment_authentication", + "error_reason": "incorrect_card_details", + "acquirer_data": { + "auth_code": null, + "authentication_reference_number": "100222021120200000000742753928" // Pass AEVV as the value for AMEX card transactions. + }, + "created_at": 1620807547 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + +### Parameters + +`expand[]=card` +: `string` Use to expand the card details when the payment method is `card`. + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + +> **WARN** +> +> +> **Watch Out!** +> +> Cardholder names for domestic cards are considered sensitive information and are not populated. +> + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. This attribute will not be set for the card issued by a foreign bank. + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + + + Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible value `in_app`. The field `flow` is present only in the case of Turbo UPI Payments. + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. diff --git a/llm-content/api/payments/fetch-payment-expanded-emi.md b/llm-content/api/payments/fetch-payment-expanded-emi.md new file mode 100644 index 00000000..b199612a --- /dev/null +++ b/llm-content/api/payments/fetch-payment-expanded-emi.md @@ -0,0 +1,328 @@ +--- +title: Fetch a Payment with Expanded EMI Details +description: Fetch a Payment with Expanded EMI details using Razorpay Payments API. +--- + +# Fetch a Payment with Expanded EMI Details + +## Fetch a Payment (With Expanded EMI Details) + +Use this endpoint to retrieve the details of all the payments that you created, with the `emi` parameter expanded in the payments object. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/payments/pay_DG4ZdRK8ZnXC3k/?expand[]=emi + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_JqLHMVryzMEafT"; + +JSONObject request = new JSONObject(); +request.put("expand[]","emi"); + +Entity payment = razorpay.payments.get("payments/"+paymentId, request); + +```python: Python +import razorpay + +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch("pay_JqLHMVryzMEafT",{"expand[]":"emi"}) + +```ruby: Ruby +require "razorpay" + +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_JLcbRwKkgDlWWJ" + +para_attr = { + "expand[]": "emi" +} + +Razorpay::Payment.request.get paymentId , para_attr + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "expand[]":"emi", +} + +paymentId := "pay_JqLHMVryzMEafT" + +body, err := client.Payment.Fetch(paymentId, data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$paymentId = "pay_MLzFlOC98cJmHQ"; + +$api->payment->fetch($paymentId)->expandedDetails(["expand[]"=> "emi"]); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +paymentId = "pay_JqLHMVryzMEafT" + +instance.payments.fetch(paymentId,{"expand[]":"emi"}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("expand[]","emi"); + +List payment = client.Payment.All(paramRequest); +``` + +### Response + +```json: Success +{ + "id": "pay_DG4ZdRK8ZnXC3k", + "entity": "payment", + "amount": 200000, + "currency": "INR", + "status": "authorized", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "emi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": "card_DG4ZdUO3xABb20", + "bank": "ICIC", + "wallet": null, + "vpa": null, + "email": "gaurav@example.com", + "contact": "+919972000005", + "notes": [], + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "emi": { + "issuer": "ICIC", + "rate": 1300, + "duration": 6 + }, + "acquirer_data": { + "auth_code": "828553" + }, + "created_at": 1568026077 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + +### Parameters + +`expand[]=emi` +: `string` Use to expand the `emi` details when the payment method is emi. + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. This attribute will not be set for the card issued by a foreign bank. + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + + + Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible value `in_app`. The field `flow` is present only in the case of Turbo UPI Payments. + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. diff --git a/llm-content/api/payments/fetch-payment-expanded-offers.md b/llm-content/api/payments/fetch-payment-expanded-offers.md new file mode 100644 index 00000000..b55a9be6 --- /dev/null +++ b/llm-content/api/payments/fetch-payment-expanded-offers.md @@ -0,0 +1,334 @@ +--- +title: Fetch a Payment with Expanded Offers Details +description: Fetch a Payment with Expanded Offers details using Razorpay Payments API. +--- + +# Fetch a Payment with Expanded Offers Details + +## Fetch a Payment (With Expanded Offers Details) + +Use this endpoint to retrieve the details of all the payments that you created, with the `offer` parameter expanded in the payments object. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/payments/pay_Exez1iJzI3hqR5/?expand[]=offers + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_JqLHMVryzMEafT"; + +JSONObject request = new JSONObject(); +request.put("expand[]","offers"); + +Entity payment = razorpay.payments.get("payments/"+paymentId, request); + +```python: Python +import razorpay + +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch("pay_JqLHMVryzMEafT",{"expand[]":"offers"}) + +```ruby: Ruby +require "razorpay" + +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_JLcbRwKkgDlWWJ" + +para_attr = { + "expand[]": "offers" +} + +Razorpay::Payment.request.get paymentId , para_attr + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "expand[]":"offers", +} + +paymentId := "pay_JqLHMVryzMEafT" + +body, err := client.Payment.Fetch(paymentId, data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$paymentId = "pay_MLzFlOC98cJmHQ"; + +$api->payment->fetch($paymentId)->expandedDetails(["expand[]"=> "emi"]); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +paymentId = "pay_JqLHMVryzMEafT" + +instance.payments.fetch(paymentId,{"expand[]":"offers"}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary param = new Dictionary(); +param.Add("expand[]", "offers"); + +Payment payment = client.Payment.Fetch("pay_XXXXXXXXXXXXXX").ExpandedDetails(param); +``` + +### Response + +```json: Success +{ + "id": "pay_G8VaL2Z68LRtDs", + "entity": "payment", + "amount": 900, + "currency": "INR", + "status": "captured", + "order_id": "order_G8VXfKDWDEOHHd", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "offers": { + "entity": "collection", + "count": 1, + "items": [ + { + "id": "offer_G8VXOp0qNuEXzh" + } + ] + }, + "description": "Purchase Shoes", + "card_id": null, + "bank": "KKBK", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_DitrYCFtCIokBO", + "notes": [], + "fee": 22, + "tax": 4, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "0125836177", + "authentication_reference_number": "100222021120200000000742753928" + }, + "created_at": 1606985740 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + +### Parameters + +`expand[]=offers` +: `string` Use to expand the offers applied to a payment, wherever applicable. + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. This attribute will not be set for the card issued by a foreign bank. + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + + + Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible value `in_app`. The field `flow` is present only in the case of Turbo UPI Payments. + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. diff --git a/llm-content/api/payments/fetch-payments-orders.md b/llm-content/api/payments/fetch-payments-orders.md new file mode 100644 index 00000000..0fefbba2 --- /dev/null +++ b/llm-content/api/payments/fetch-payments-orders.md @@ -0,0 +1,388 @@ +--- +title: Fetch Payments Based on Orders +description: Fetch Payments Based on Orders using Razorpay Payments API. +--- + +# Fetch Payments Based on Orders + +## Fetch Payments Based on Orders + +Use this endpoint to retrieve payments corresponding to an order. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/orders/order_DovFx48wjYEr2I/payments + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String orderId = "order_DovFx48wjYEr2I"; + +Order order = razorpay.orders.fetchPayments(orderId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.payment(orderId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +orderId := "order_DovFx48wjYEr2I" + +body, err := client.Order.Payments(orderId, nil, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->fetch($orderId)->payments(); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +orderId = "order_DovFx48wjYEr2I" + +Razorpay::Order.fetch(orderId).payments + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.fetchPayments(orderId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string orderId = "order_Z6t7VFTb9xHeOs"; + +List payments = client.Order.Fetch(orderId).Payments(); + +``` + +### Response + +```json: Success - Card +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "pay_KbCaQOgY6QclC7", + "entity": "payment", + "amount": 1234, + "currency": "INR", + "status": "captured", + "order_id": "order_KbCZFK4mhbWLoO", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Test Transaction", + "card_id": "card_KbCaQTTxBsAVLQ", + "card": { + "id": "card_KbCaQTTxBsAVLQ", + "entity": "card", + "name": "", + "last4": "3818", + "network": "RuPay", + "type": "debit", + "issuer": null, + "international": false, + "emi": false, + "sub_type": "consumer", + "token_iin": null + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "address": "Razorpay Corporate Office" + }, + "fee": 25, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "457282", + "authentication_reference_number": null + }, + "created_at": 1667399043 + } + ] +} + +```json: Success - UPI +{ + "entity": "collection", + "count": 1, + "items": [ + { + "acquirer_data": { + "rrn": "867001630595", + "upi_transaction_id": "AXI217bee8713a042c0a55d0ffaa12528ed" + }, + "amount": 102, + "amount_captured": null, + "amount_refunded": 0, + "bank": null, + "captured": true, + "card_id": null, + "contact": "+919000090000", + "created_at": 1740728156, + "currency": "INR", + "description": null, + "email": "gaurav.kumar@gmail.com", + "entity": "payment", + "error_code": null, + "error_description": null, + "error_reason": null, + "error_source": null, + "error_step": null, + "fee": 2, + "gateway_provider": "Razorpay", + "id": "pay_Q13AaZ8lLVJbTX", + "international": false, + "invoice_id": null, + "method": "upi", + "notes": [], + "order_id": "order_Q139NCRSCkyESs", + "provider": null, + "refund_status": null, + "reward": null, + "status": "captured", + "tax": 0, + "token_id": "token_78aXYt4Iy7ThPb", + "upi": { + "payer_account_type": "bank_account", + "vpa": "gaurav.kumar@okicici", + "flow": "intent" + }, + "vpa": "gaurav.kumar@okicici", + "wallet": null + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "x48wjYEr2I is not a valid id", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the order for which you want to fetch payment details. + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. This attribute will not be set for the card issued by a foreign bank. + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + + + Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible values: + - `intent`: When a UPI app is selected and user is redirected to it. + - `collect`: The user enters their UPI ID and receives a notification from the UPI app. They open the app and complete the payment. + - `in_app`: In case of Turbo UPI Payments. + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The id provided does not exist. +* code: 400 +* description: The `order_id` is missing. +* solution: Ensure that you pass the `order_id` in the URL. + +_id is not a valid id. +* code: 400 +* description: The `order_id` provided is incorrect. +* solution: Enter the correct `order_id`. diff --git a/llm-content/api/payments/fetch-with-id.md b/llm-content/api/payments/fetch-with-id.md new file mode 100644 index 00000000..8e674e13 --- /dev/null +++ b/llm-content/api/payments/fetch-with-id.md @@ -0,0 +1,459 @@ +--- +title: Fetch a Payment With ID +description: Fetch a Payment using Razorpay Payments API. +--- + +# Fetch a Payment With ID + +## Fetch a Payment With ID + +Use this endpoint to retrieve the details of a specific payment using its `id`. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/payments/pay_DG4ZdRK8ZnXC3k + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_DG4ZdRK8ZnXC3k"; + +Payment payment = razorpay.payments.fetch(paymentId); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +paymentId := "pay_DG4ZdRK8ZnXC3k" + +body, err := client.Payment.Fetch(paymentId, nil, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_DG4ZdRK8ZnXC3k" + +Razorpay::Payment.fetch(paymentId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +Payment payment = client.Payment.Fetch(paymentId); +``` + +### Response + +```json: Netbanking +{ + "id": "pay_MT48CvBhIC98MQ", + "entity": "payment", + "amount": 2100, + "currency": "INR", + "status": "captured", + "order_id": "order_MT47xgV5ApouIB", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "#MT47qgzX2EOko2", + "card_id": null, + "bank": "ICIC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 50, + "tax": 8, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "6951370" + }, + "created_at": 1692696719 +} +``` json: UPI +{ + "id": "pay_MT3PgKGazkDUUM", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "captured", + "order_id": "order_MLXS6VLbhKH7i1", + "invoice_id": "inv_MLXS5jI0oFNX2a", + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "#MLXS5jI0oFNX2a", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@examplebank", + "email": null, + "contact": "+919000090000", + "notes": [], + "fee": 24, + "tax": 4, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "322398320067" + }, + "created_at": 1692694191, + "upi": { + "payer_account_type": "credit_card", + "vpa": "gaurav.kumar@examplebank", + "flow": "intent" + } +} + +```json: Card +{ + "id": "pay_DG4ZdRK8ZnXC3k", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_GjCr5oKh4AVC51", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Payment for Adidas shoes", + "card_id": "card_KOdY30ajbuyOYN", + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "customer_id": "cust_K6fNE0WJZWGqtN", + "token_id": "token_KOdY$DBYQOv08n", + "notes": [], + "fee": 1, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "064381", + "arn": "74119663031031075351326", + "rrn": "303107535132" + }, + "created_at": 1605871409 +} + +```json: Wallet +{ + "id": "pay_MT4GRFUHBfMCNf", + "entity": "payment", + "amount": 250000, + "currency": "INR", + "status": "captured", + "order_id": "order_MT4FE4i64KutqB", + "invoice_id": null, + "international": false, + "method": "wallet", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "#MT4F1XRgHKcWEt", + "card_id": null, + "bank": null, + "wallet": "airtelmoney", + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 5900, + "tax": 900, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "transaction_id": null + }, + "created_at": 1692697187 +} + +```json: Pay Later +{ + "id": "pay_QrfcvoKuJmQMy4", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_QrfZOFrKHaAErr", + "invoice_id": null, + "international": false, + "method": "paylater", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Payment for your product", + "card_id": null, + "bank": null, + "wallet": "rzpx_postpaid", + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 2, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "transaction_id": null + }, + "created_at": 1752217274 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The id provided does not exist", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Response + +### Response + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + - `paylater` + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. This attribute will not be set for the card issued by a foreign bank. + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + + + Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + - `credit_line` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible values: + - `intent`: When a UPI app is selected and user is redirected to it. + - `collect`: The user enters their UPI ID and receives a notification from the UPI app. They open the app and complete the payment. + - `in_app`: In case of Turbo UPI Payments. + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The id provided does not exist. +* code: 400 +* description: The `payment_id` provided is incorrect. +* solution: Use the correct `payment_id`. diff --git a/llm-content/api/payments/form-post-payment-create.md b/llm-content/api/payments/form-post-payment-create.md new file mode 100644 index 00000000..73c2f266 --- /dev/null +++ b/llm-content/api/payments/form-post-payment-create.md @@ -0,0 +1,238 @@ +--- +title: Form POST Payments +description: Collect payment details from your customers as Form attributes using Razorpay APIs. +--- + +# Form POST Payments + +While accepting payments from your customers, you can collect the payment details as form attributes. The collected payment information can be submitted directly to our Payments API. + +If you want to securely store the sensitive data entered by the customers, please use [ Razorpay Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + +> **WARN** +> +> +> **Watch Out!** +> Ensure that the payment details entered by customers never reach your servers, unless you are [PCI-DSS certified](https://www.pcisecuritystandards.org/documents/PCI-DSS-v3_2_1-SAQ-D_Merchant.pdf). +> + +## Request +The payment details collected from your client-side implementation should be submitted as a `POST` request to the following URL: + + /payments + +### Request Parameters +The submitted form should contain the following attributes in the request body: + +`key_id` _mandatory_ +: `string` The key id that you have generated from the **API Keys** tab in the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, `INR`. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order. + Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`ip` _mandatory_ +: `string` Customer's IP address. + +`email` _mandatory_ +: `string` Email address of the customer. Maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. Maximum length supported is 15 characters, inclusive of country code. + +`authentication` _optional_ +: `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + +`browser` _mandatory_ +: `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `language` + : `string` Obtained from the payer's browser using the `navigator.language` HTML DOM property. Maximum limit of 8 characters. + +`method` _mandatory_ +: `string` Name of the payment method. Possible values are: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + - `cardless_emi` + - `paylater` + +`card` +: `object` Details associated with the card. Required if the payment method is `card`. + + `number` _mandatory_ + : `string` Unformatted card number. Required if the method is `card`. + + `name` _mandatory_ + : `string` Name of the cardholder. Required if the method is `card`. + + `expiry_month` _mandatory_ + : `integer` Expiry month for card in `MM` format. Required if the method is `card`. + + `expiry_year` _mandatory_ + : `string` Expiry year for card in `YY` format. Required if the method is `card`. + + `cvv` _mandatory_ + : `string` CVV printed on the back of card. Required if the method is `card`. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +`bank` +: `string` Bank code of the bank used for the payment. Required if the method is `netbanking`. + +`bank_account` +: The details of the bank account that should be passed in the request. Required if the method is `emandate`. + + `account_number` _mandatory_ + : `string` Bank account number used to initiate the payment. + + `ifsc` _mandatory_ + : `string` IFSC of the bank used to initiate the payment. + + `name` _mandatory_ + : `string` Name associated with the bank account used to initiate the payment. + +`emi_duration` +: `string` The EMI duration in months. Required if the method is `emi`. + +`vpa` +: `string` Virtual payment address of the customer. Required if the method is `upi`. + +`wallet` +: `string` Wallet code for the wallet used for the payment. Required if the method is `wallet`. + +`notes` _optional_ +: `object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`referrer` _optional_ +: `string` Referrer header passed by the client's browser. + +`user_agent` _optional_ +: `string` Customer user-agent. + +#### Example + +In the HTML form, add the `key_id` of the API key generated from your Dashboard. + +```html: HTML + +``` + +## Response + +Typically, the response is contained in an `HTML Form Post` and should be opened in the customer's browser. The HTML form contains form-fields along with the `razorpay_payment_id` and is automatically posted to the bank or wallet URL (specified in the form) to continue with the payment process. + +After the customer completes a payment, a `POST` request is sent to the `callback_URL` configured in the request. Possible responses are described below: + +### 200 OK + +A successful payment with `200 OK` status contains the following response: + +`razorpay_payment_id` +: `string` Unique identifier of the payment created for this request. + +`razorpay_order_id` +: `string` Unique identifier of the order. + Displayed only if you have implemented [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) at your server-side. + +`razorpay_signature` +: `string` A hexadecimal string that indicates that the callback is sent by Razorpay. + Validate the `razorpay_signature` at your end as described [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#15-verify-payment-signature). + +```json: Callback Response +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` +### 400 Bad Request + +These validation errors are seen when erroneous parameters are passed in the request. For example, invalid currency or wrong card number. + +Know more about [error codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#error-codes). + +A sample validation error with `400 Bad Request` contains the following response: + +``` +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Wrong card number", + "field": "number" + } +} +``` + +## Failed Payments + +In failed payments, the response received at the `callback_url` contains the error details as shown below: + +``` +error%5Bcode%5D=BAD_REQUEST_ERROR&error%5Bdescription%5D=Payment+failed +``` + +The key-value parameters of the request is shown below: + +error[code] +: BAD_REQUEST_ERROR + +error[description] +: Payment failed + +Know more about [error codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#error-codes). + +> **INFO** +> +> +> **Handy Tips** +> You can set query parameters in `callback_url` to map it with entities at your end. For example, http://your-site.com/url?cart_id=123 is a valid callback_url. +> diff --git a/llm-content/api/payments/invoices.md b/llm-content/api/payments/invoices.md new file mode 100644 index 00000000..8ac3f865 --- /dev/null +++ b/llm-content/api/payments/invoices.md @@ -0,0 +1,86 @@ +--- +title: API | Invoices +heading: Invoices +description: Create, update, delete, cancel, fetch and send Invoices using Razorpay APIs. +--- + +# Invoices + +You can use [Razorpay Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) to send invoices to your customers and accept payments instantly. The invoice contains information regarding the sale such as the name of the invoiced products or services, quantity, billing cycle, price breakup, receipt number and customer information. + +You can create and manage Invoices using APIs or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/create.md#create-an-invoice-from-dashboard). + +> **INFO** +> +> +> **Handy Tips** +> +> You can only create non-GST Invoices via APIs. Non-GST invoices can be created in any of the [supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). You cannot add tax rates for invoices created using international currencies. +> + +Fork the Razorpay Postman Public Workspace and try the invoices APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-6109230d-794c-4a01-b982-4d8479afee53) + +### Related Guides + +[About Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/invoices.md) + +### Endpoints + + - **post** `/v1/invoices` - Create an Invoice (Example 1): + Creates an Invoice using a Customer id. + + + - **post** `/v1/invoices` - Create an Invoice (Example 2): + Creates an Invoice using customer details such as name and billing details. + + + - **patch** `/v1/invoices/:id` - Update an Invoice: + Updates an Invoice. + + + - **post** `/v1/invoices/:id/issue` - Issue an Invoice: + Issues an Invoice. + + + - **delete** `/v1/invoices/:id` - Delete an Invoice: + Deletes an Invoice. + + + - **post** `/v1/invoices/:id/cancel` - Cancel an Invoice: + Cancels an Invoice. + + + - **get** `/v1/invoices/:id` - Fetch an Invoice With ID: + Retrieves details of a particular Invoice using id. + + + - **get** `/v1/invoices` - Fetch All Invoices: + Retrieves details of all Invoices. + + + - **post** `/v1/invoices/:id/notify_by/:medium` - Send Notifications: + Sends notifications to customers. + + + - **post** `/v1/items` - Create an Item: + Creates an item by providing basic details such as name and amount. + + + - **get** `/v1/items/:id` - Fetch an Item With ID: + Retrieves details an item by id. + + + - **get** `/v1/items` - Fetch All Items: + Retrieves details of multiple items. + + + - **patch** `/v1/items/:id` - Update an Item: + Updates the details of an item. + + + - **delete** `/v1/items/:id` - Delete an Item: + Deletes an item. diff --git a/llm-content/api/payments/invoices/cancel.md b/llm-content/api/payments/invoices/cancel.md new file mode 100644 index 00000000..1fe787ce --- /dev/null +++ b/llm-content/api/payments/invoices/cancel.md @@ -0,0 +1,383 @@ +--- +title: Cancel an Invoice +description: Cancel an invoice using this endpoint. +--- + +# Cancel an Invoice + +## Cancel an Invoice + +Use this endpoint to cancel an invoice. Invoices in the `paid` state cannot be cancelled. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + +-X POST https://api.razorpay.com/v1/invoices/inv_JqVZyyKWjCs9cY/cancel \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String invoiceId = "inv_DC2XAh2fOFuU15"; + +Invoice invoice = razorpay.invoices.cancel(invoiceId); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.invoice.cancel(invoiceId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Invoice.cancel(invoiceId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->invoice->fetch($invoiceId)->cancel(); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Invoice.Cancel("", nil, nil) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.invoices.cancel(invoiceId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] +"); + +string invoiceId = "inv_DAweOiQ7amIUVd"; + +Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); +``` + +### Response + +```json: Success +{ + "amount": 20000, + "amount_due": null, + "amount_paid": null, + "billing_end": null, + "billing_start": null, + "cancelled_at": 1657203958, + "comment": "Fresh sea weed mowed this morning", + "created_at": 1657203943, + "currency": "", + "currency_symbol": "", + "customer_details": { + "billing_address": null, + "contact": "", + "customer_contact": "", + "customer_email": "", + "customer_name": "", + "email": "", + "gstin": null, + "id": "cust_DtHaBuooGHTuyZ", + "name": "", + "shipping_address": null + }, + "customer_id": "cust_DtHaBuooGHTuyZ", + "date": 1588076279, + "description": "Domestic invoice for Gaurav Kumar.", + "email_status": "pending", + "entity": "invoice", + "expire_by": 1924991999, + "expired_at": null, + "first_payment_min_amount": null, + "gross_amount": 20000, + "group_taxes_discounts": false, + "id": "inv_JqVZyyKWjCs9cY", + "idempotency_key": null, + "invoice_number": "Receipt No. 123234", + "issued_at": null, + "line_items": [ + { + "amount": 20000, + "currency": "", + "description": "Crate of sea weed.", + "gross_amount": 20000, + "hsn_code": null, + "id": "li_JqVZyzHIx1exXC", + "item_id": null, + "name": "Crate of sea weed", + "net_amount": 20000, + "quantity": 1, + "ref_id": null, + "ref_type": null, + "sac_code": null, + "tax_amount": 0, + "tax_inclusive": false, + "tax_rate": null, + "taxable_amount": 20000, + "taxes": [], + "type": "invoice", + "unit": null, + "unit_amount": 20000 + } + ], + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "order_id": null, + "paid_at": null, + "partial_payment": true, + "payment_id": null, + "receipt": "Receipt No. 123234", + "reminder_status": null, + "short_url": null, + "sms_status": "pending", + "status": "cancelled", + "subscription_status": null, + "supply_state_code": null, + "tax_amount": 0, + "taxable_amount": 20000, + "terms": "No Returns; No Refunds", + "type": "invoice", + "user_id": null, + "view_less": true +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Operation not allowed for Invoice in cancelled status.", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the invoice. + +### Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` Indicates the type of entity. Here, it is `invoice`. + +`type` +: `string` Here, it should be `invoice`. + +`invoice_number` +: `string` Unique number you added for internal reference. The minimum character length is 1 and maximum is 40. + +`customer_id` +: `string` The unique identifier of the customer. You can create `customer_id` using the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). Alternatively, you can pass the customer object described in the below fields. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `name` + : `string` Customer's name. Alphanumeric, with period (.), apostrophe (') and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + + `email` + : `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `contact` + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + + `billing_address` + : `object` Details of the customer's billing address. + + `id` + : `string` The unique identifier generated for the customer's billing address. + + `type` + : `string` The customer address type. Here it is `billing_address`. + + `primary` + : `boolean` Defines if this is the primary address. + - `true`: It is the customer's primary address. + - `false`: It is not the customer's primary address. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `city` + : `string` The city. + + `zipcode` + : `string` The zipcode. + + `state` + : `string` The state. + + `country` + : `string` The country. + + `shipping_address` + : `object` Details of the customer's shipping address. + + `id` + : `string` The unique identifier generated for the customer's shipping address. + + `type` + : `string` The customer address type. Here it is `shipping_address`. + + `primary` + : `boolean` Defines if this is the primary address. + - `true`: It is the customer's primary address. + - `false`: It is not the customer's primary address. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `city` + : `string` The city. + + `zipcode` + : `string` The zipcode. + + `state` + : `string` The state. + + `country` + : `string` The country. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `object` Details of the line item that is billed in the invoice. Maximum of 50 line items. + + `id` + : `string` Unique identifier that is generated if a new item has been created while creating the invoice. + + `item_id` + : `string` Unique identifier of the item generated using Items API that has been billed in the invoice. + + `name` + : `string` The item's name. + + `description` + : `string` A brief description of the item. + + `amount` + : `integer` The price of the item. + + `currency` + : `string` The currency associated with the item. Default is `INR`. Know about the [list of supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `type` + : `string` Here, it is `invoice`. + + `quantity` + : `integer` The quantity of the item billed in the invoice. Defaults to `1`. + +. + + `type` + : `string` Here, it is `invoice`. + + `quantity` + : `integer` The quantity of the item billed in the invoice. Defaults to `1`. + +`payment_id` +: `string` Unique identifier of a payment made against this invoice. + +`status` +: `string` The status of the invoice. Know more about [Invoice States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md). Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` Timestamp, in Unix format, at which the invoice will expire. + +`issued_at` +: `integer` Timestamp, in Unix format, at which the invoice was issued to the customer. + +`paid_at` +: `integer` Timestamp, in Unix format, at which the payment was made. + +`cancelled_at` +: `integer` Timestamp, in Unix format, at which the invoice was cancelled. + +`expired_at` +: `integer` Timestamp, in Unix format, at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `30000`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. You must mandatorily pass this parameter if accepting international payments. If you have passed `currency` as a sub-parameter in the `line_item` object, you must ensure that the same currency is passed in both places. Know about the [list of supported international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + +. + +`description` +: `string` A brief description of the invoice. The maximum character length is 2048. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. Share this link with customers to accept payments. + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +### Errors + +Operation not allowed for Invoice in cancelled status. +* code: 400 +* description: You are trying to cancel an invoice which is already in the cancelled status. +* solution: You can only cancel an unpaid issued invoice. diff --git a/llm-content/api/payments/invoices/create-item.md b/llm-content/api/payments/invoices/create-item.md new file mode 100644 index 00000000..4a83f114 --- /dev/null +++ b/llm-content/api/payments/invoices/create-item.md @@ -0,0 +1,253 @@ +--- +title: Create an Item +description: Create an Item with basic details such as name and amount. +--- + +# Create an Item + +## Create an Item + +Use this endpoint to create an item with basic details such as name and amount. After an item is created, it appears on the list of created items and in the drop-down menu at the time of invoice creation. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -H "Content-Type: application/json" \ + -X POST https://api.razorpay.com/v1/items \ + -d '{ + "name":"Book / English August", + "description":"An indian story, Booker prize winner.", + "amount": 20000, + "currency": "" + }' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject itemRequest = new JSONObject(); +itemRequest.put("name","Book / English August"); +itemRequest.put("description","An indian story, Booker prize winner."); +itemRequest.put("amount", 20000); +itemRequest.put("currency",""); + +Item item = razorpay.items.create(itemRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.item.create({ + "name": "Book / English August", + "description": "An indian story, Booker prize winner.", + "amount": 20000, + "currency": "" +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Item.create({ + "name": "Book / English August", + "description": "An indian story, Booker prize winner.", + "amount": 20000, + "currency": "" +}); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "name": "Book / English August", + "description": "An indian story, Booker prize winner.", + "amount": 20000, + "currency": "", +} +body, err := client.Item.Create(data, nil) + + ```php: PHP +$api = new Api($key_id, $secret); + +$api->Item->create(array("name" => "Book / English August","description" => "An indian story, Booker prize winner.","amount" => 20000,"currency" => "")); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.Items.create({ + "name": "Book / English August", + "description": "An indian story, Booker prize winner.", + "amount": 20000, + "currency": "" +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Item.create({ + "name": "Book / English August", + "description": "An indian story, Booker prize winner.", + "amount": 20000, + "currency": "" +}); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary itemRequest = new Dictionary(); +itemRequest.Add("name", "Book / English August"); +itemRequest.Add("description", "An indian story, Booker prize winner."); +itemRequest.Add("amount", 20000); +itemRequest.Add("currency", ""); + +Item item = client.Item.Create(itemRequest); +``` + +### Response + +```json: Success +{ + "id": "item_JInaSLODeDUQiQ", + "active": true, + "name": "Book / English August", + "description": "An indian story, Booker prize winner.", + "amount": 20000, + "unit_amount": 20000, + "currency": "", + "type": "invoice", + "unit": null, + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "tax_id": null, + "tax_group_id": null, + "created_at": 1649843796 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} + +``` + +### Parameters + +`name` _mandatory_ +: `string` Name of the item. + +`description` _optional_ +: `string` A brief description about the item. + +`amount` _mandatory_ +: `integer` The price of the item. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the amount should be charged. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +### Parameters + +`id` +: `string` The unique identifier of the item. + +`active` +: `boolean` Indicates the status of the item. Possible values: + - `true` (default): Item is in the active state. + - `false`: Item is in the inactive state. + +`name` +: `string` The name of the item. + +`description` +: `string` A text description about the item. + +`amount` +: `integer` The price of the item. + +`unit_amount` +: `integer` The per unit billing amount for each individual unit. + +`currency` +: `string` The currency in which the amount should be charged. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`type` +: `string` Here, it must be `invoice`. + +`unit` +: `integer` The number of units of the item billed in the invoice. + +`tax_inclusive` +: `boolean` Indicates whether the base amount includes tax. + - `true`: The base amount includes tax. + - `false`: The base amount does not include tax. By default, the value is set to `false`. + +`hsn_code` +: `integer` The 8-digit code used to classify the product as per the Harmonised System of Nomenclature. + +`sac_code` +: `integer` The 6-digit code used to classify the service as per the Services Accounting Code. + +`tax_rate` +: `string` The percentage at which an individual or a corporation is taxed. + +`tax_id` +: `string` The identification number that gets displayed on invoices issued to the customer. + +`tax_group_id` +: `string` The identification number for the tax group. A tax group is a collection of taxes that can be applied as a single set of rules. + +`created_at` +: `integer` Unix timestamp, at which the item was created. For example, `1649843796`. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard.- Different keys for test mode and live modes. +- Expired API key. + +* solution: The API keys must be active and entered correctly with no whitespace before or after the keys. + +The currency field is required. +* code: 400 +* description: The currency field is blank. +* solution: Ensure that the currency field is added with a valid currency code. + +The merchant doesn't have international activated +* code: 400 +* description: This happens when an international currency code is added. +* solution: Ensure that the currency field is added with a valid currency code. + +The amount must be at least INR 1.00 +* code: 400 +* description: This happens when the amount added in the amount field is less than INR 1. +* solution: Ensure that the amount is INR 1 or greater. diff --git a/llm-content/api/payments/invoices/create-with-customer-id.md b/llm-content/api/payments/invoices/create-with-customer-id.md new file mode 100644 index 00000000..123f6a21 --- /dev/null +++ b/llm-content/api/payments/invoices/create-with-customer-id.md @@ -0,0 +1,584 @@ +--- +title: Create an Invoice With Customer ID +description: Create an Invoice with the Customer id. +--- + +# Create an Invoice With Customer ID + +## Create an Invoice With Customer ID + +Use this endpoint to create an invoice by passing the `customer_id`. + +> **INFO** +> +> +> **Handy Tips** +> +> You cannot create GST compliant invoices using APIs. This means you cannot add the following to the invoice when creating an invoice via APIs: + +> - tax rate +> - cess +> - HSN code +> - SAC code +> + +### Request + +```curl: Curl +curl -u : +-X POST https://api.razorpay.com/v1/invoices \ +-H 'Content-type: application/json' \ +-d '{ + "type": "invoice", + "date": 1760714528, + "customer_id": "cust_HOQzpsovChhcpl", + "line_items": [ + { + "item_id": "item_K6g5L6X43dXjEA" + } + ] +}' +```php: PHP +$api = new Api($key_id, $secret); +$api->invoice->create(array ('type' => 'invoice','date' => 1589994898, 'customer_id'=> 'cust_E7q0trFqXgExmT', 'line_items'=>array(array('item_id'=>'item_DRt61i2NnL8oy6')))); +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +line_items := make(map[string]interface{}) +line_items["0"] = map[string]interface{}{ + "item_id": "item_DRt61i2NnL8oy6", +} + +data := map[string]interface{}{ + "type": "invoice", + "date": 1589994898, + "customer_id": "cust_E7q0trFqXgExmT", + "line_items": line_items, +} + +body, err := client.Invoice.Create(data, nil) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.invoice.create({ + "type:": "invoice", + "date": 1589994898, + "customer_id": "cust_E7q0trFqXgExmT", + "line_items": [ + { + "item_id": "item_DRt61i2NnL8oy6" + } + ] +}) +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject invoiceRequest = new JSONObject(); +invoiceRequest.put("type", "invoice"); +invoiceRequest.put("date", "1589994898"); +invoiceRequest.put("customer_id","cust_JDdNazagOgg9Ig"); +List lines = new ArrayList<>(); +JSONObject lineItems = new JSONObject(); +lineItems.put("item_id","item_J7lZCyxMVeEtYB"); +lines.add(lineItems); +invoiceRequest.put("line_items",lines); + +Invoice invoice = instance.invoices.create(invoiceRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Invoice.create({ + "type": "invoice", + "date": 1589994898, + "customer_id": "cust_E7q0trFqXgExmT", + "line_items": [ + { + "item_id": "item_DRt61i2NnL8oy6" + } + ] +}) +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.invoices.create({ + "type": "invoice", + "date": 1989994898, + "customer_id": "cust_E7q0trFqXgExmT", + "line_items": [ + { + "item_id": "item_DRt61i2NnL8oy6" + } + ] +}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary invoiceRequest = new Dictionary(); +invoiceRequest.Add("type", "invoice"); +invoiceRequest.Add("date", "1589994898"); +invoiceRequest.Add("customer_id","cust_Z6t7VFTb9xHeOs"); +List> lines = new List>(); +Dictionary lineItems = new Dictionary(); +lineItems.Add("item_id","item_Z6t7VFTb9xHeOs"); +lines.Add(lineItems); +invoiceRequest.Add("line_items",lines); + +Invoice invoice = client.Invoice.Create(invoiceRequest); +``` + +### Response + +```json: Success +{ + "id": "inv_K6g5bviu09mXo1", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_HOQzpsovChhcpl", + "customer_details": { + "id": "cust_HOQzpsovChhcpl", + "name": null, + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": null, + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_K6g5bxSIwYIXJS", + "line_items": [ + { + "id": "li_K6g5bwLZuBmb1Q", + "item_id": "item_K6g5L6X43dXjEA", + "ref_id": null, + "ref_type": null, + "name": "Cloth", + "description": "Cotton Cloth", + "amount": 1200, + "unit_amount": 1200, + "gross_amount": 1200, + "tax_amount": 0, + "taxable_amount": 1200, + "net_amount": 1200, + "currency": "", + "type": "invoice", + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "unit": null, + "quantity": 1, + "taxes": [] + } + ], + "payment_id": null, + "status": "issued", + "expire_by": null, + "issued_at": 1660734398, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1760714528, + "terms": null, + "partial_payment": false, + "gross_amount": 1200, + "tax_amount": 0, + "taxable_amount": 1200, + "amount": 1200, + "amount_paid": 0, + "amount_due": 1200, + "currency": "", + "currency_symbol": "", + "description": null, + "notes": [], + "comment": null, + "short_url": "https://rzp.io/i/ksYThDL", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "invoice", + "group_taxes_discounts": false, + "created_at": 1660734398 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`type` _mandatory_ +: `string` Indicates the type of entity. Here, it is `invoice`. + +`description` _optional_ +: `string` A brief description of the invoice. + +`draft` _optional_ +: `string` Invoice is created in `draft` state when value is set to `1`. + +`customer_id` _mandatory_ +: `string` You can pass the `customer_id` in this field, if you are using the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). If not, you can pass the customer object described in the below fields. + +`customer` +: `object` Customer details. + + `name` _mandatory_ + : `string` Customer's name. Alphanumeric, with period (.), apostrophe (') and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + + `billing_address` + : `object` The customer's billing address. + + `line1` _mandatory_ + : `string` The first line of the customer's address. + + `line2` _optional_ + : `string` The second line of the customer's address. + + `city` _mandatory_ + : `string` The city + + `zipcode` _mandatory_ + : `string` The zipcode + + `state` _mandatory_ + : `string` The state + + `country` _mandatory_ + : `string` The country + + `shipping_address` + : `object` The customer's shipping address. + + `line1` _mandatory_ + : `string` The first line of the customer's address. + + `line2` _optional_ + : `string` The second line of the customer's address. + + `city` _mandatory_ + : `string` The city + + `zipcode` _mandatory_ + : `string` The zipcode + + `state` _mandatory_ + : `string` The state + + `country` _mandatory_ + : `string` The country + +`line_items` +: `object` Details of the line item that is billed in the invoice. Maximum of 50 line items. + + `item_id` _conditionally mandatory_ + : `string` If you are using the [Items API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/create-item.md), you may use an existing item. You can choose to override details such as name, description by passing these along with `item_id`. While the invoice will show the updated details, the existing item will not be updated. This parameter is mandatory if you are not going to use any other parameter in the array. + + `name` _conditionally mandatory_ + : `string` The item name. Mandatory if `item_id` is not provided. + + `description` _optional_ + : `string` A brief description of the item. + + `amount` _conditionally mandatory_ + : `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `30000`. Mandatory if `item_id` is not provided. + + `currency` _optional_ + : `string` The currency associated with the item. Defaults to `INR`. Know about the [list of supported international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) This should match invoice currency. + + `quantity` _optional_ + : `integer` The number of units of the item billed in the invoice. Defaults to `1`. + +. + + `quantity` _optional_ + : `integer` The number of units of the item billed in the invoice. Defaults to `1`. + +`expire_by` _optional_ +: `integer` Timestamp, in Unix format, at which the invoice will expire. + +`sms_notify` _optional_ +: `boolean` Defines who handles the SMS notification. Possible values: + - `true` (default): Razorpay sends the notification to the customer. + - `false`: You send the notification to the customer. + +`email_notify` _optional_ +: `boolean` Defines who handles the email notification. Possible values: + - `true` (default): Razorpay sends the notification to the customer. + - `false`: You send the notification to the customer. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`currency` _conditionally mandatory_ +: `string` The currency associated with the invoice. You must mandatorily pass this parameter if accepting international payments. If you have passed `currency` as a sub-parameter in the `line_item` object, you must ensure that the same currency is passed in both places. Know about the [list of supported international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + +. + +`notes` _optional_ +: `string` Any custom notes added to the invoice. Maximum of 2048 characters. + +### Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` Indicates the type of entity. Here, it is `invoice`. + +`type` +: `string` Here, it should be `invoice`. + +`invoice_number` +: `string` Unique number you added for internal reference. The minimum character length is 1 and maximum is 40. + +`customer_id` +: `string` The unique identifier of the customer. You can create `customer_id` using the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). Alternatively, you can pass the customer object described in the below fields. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `name` + : `string` Customer's name. Alphanumeric, with period (.), apostrophe (') and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + + `email` + : `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `contact` + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + + `billing_address` + : `object` Details of the customer's billing address. + + `id` + : `string` The unique identifier generated for the customer's billing address. + + `type` + : `string` The customer address type. Here it is `billing_address`. + + `primary` + : `boolean` Defines if this is the primary address. + - `true`: It is the customer's primary address. + - `false`: It is not the customer's primary address. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `city` + : `string` The city. + + `zipcode` + : `string` The zipcode. + + `state` + : `string` The state. + + `country` + : `string` The country. + + `shipping_address` + : `object` Details of the customer's shipping address. + + `id` + : `string` The unique identifier generated for the customer's shipping address. + + `type` + : `string` The customer address type. Here it is `shipping_address`. + + `primary` + : `boolean` Defines if this is the primary address. + - `true`: It is the customer's primary address. + - `false`: It is not the customer's primary address. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `city` + : `string` The city. + + `zipcode` + : `string` The zipcode. + + `state` + : `string` The state. + + `country` + : `string` The country. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `object` Details of the line item that is billed in the invoice. Maximum of 50 line items. + + `id` + : `string` Unique identifier that is generated if a new item has been created while creating the invoice. + + `item_id` + : `string` Unique identifier of the item generated using Items API that has been billed in the invoice. + + `name` + : `string` The item's name. + + `description` + : `string` A brief description of the item. + + `amount` + : `integer` The price of the item. + + `currency` + : `string` The currency associated with the item. Default is `INR`. Know about the [list of supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `type` + : `string` Here, it is `invoice`. + + `quantity` + : `integer` The quantity of the item billed in the invoice. Defaults to `1`. + +. + + `type` + : `string` Here, it is `invoice`. + + `quantity` + : `integer` The quantity of the item billed in the invoice. Defaults to `1`. + +`payment_id` +: `string` Unique identifier of a payment made against this invoice. + +`status` +: `string` The status of the invoice. Know more about [Invoice States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md). Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` Timestamp, in Unix format, at which the invoice will expire. + +`issued_at` +: `integer` Timestamp, in Unix format, at which the invoice was issued to the customer. + +`paid_at` +: `integer` Timestamp, in Unix format, at which the payment was made. + +`cancelled_at` +: `integer` Timestamp, in Unix format, at which the invoice was cancelled. + +`expired_at` +: `integer` Timestamp, in Unix format, at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `30000`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. You must mandatorily pass this parameter if accepting international payments. If you have passed `currency` as a sub-parameter in the `line_item` object, you must ensure that the same currency is passed in both places. Know about the [list of supported international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + +. + +`description` +: `string` A brief description of the invoice. The maximum character length is 2048. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. Share this link with customers to accept payments. + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: The API key or secret are not entered or an invalid API key is used. +* solution: Use and enter the correct API details while executing the API. + +customer is required. +* code: 400 +* description: An invoice is issued without adding customer details. +* solution: Ensure that the customer details are entered. + +the merchant doesn't have international activated. +* code: 400 +* description: The line_items object has an international currency set. For example, USD, is not enabled for your account. +* solution: Ensure that your account has international payments enabled. + +Currency of all items should be the same as of the invoice. +* code: 400 +* description: There is a difference in currency entered between `line_items` and invoice currency. +* solution: Ensure that the `line_items` currency matches that of the invoice. + +expire_by should be at least 15 minutes after current time. +* code: 400 +* description: The expiry date is before or within 15 minutes of the current time +* solution: Ensure that the Expiry date is greater than the (current time + 15 minutes). For example, if the current time is 1 pm, the expiry date must be at least 1.15 pm. + +line_items is required. +* code: 400 +* description: A mandatory field is empty. +* solution: Ensure that you fill all the mandatory fields. diff --git a/llm-content/api/payments/invoices/create-with-details.md b/llm-content/api/payments/invoices/create-with-details.md new file mode 100644 index 00000000..04e3bacb --- /dev/null +++ b/llm-content/api/payments/invoices/create-with-details.md @@ -0,0 +1,853 @@ +--- +title: Create an Invoice With Customer Details +description: Create an Invoice with basic details such as name and billing address. +--- + +# Create an Invoice With Customer Details + +## Create an Invoice With Customer Details + +Use this endpoint to create an invoice using details such as `name`, `billing_address` and `shipping_address`. + +> **INFO** +> +> +> **Handy Tips** +> +> You cannot create GST compliant invoices using APIs. This means you cannot add the following to the invoice when creating an invoice via APIs: + +> - tax rate +> - cess +> - HSN code +> - SAC code +> + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/invoices \ +-H 'Content-type: application/json' \ +-d '{ + "type": "invoice", + "description": "Invoice for the month of January 2020", + "partial_payment": true, + "customer": { + "name": "", + "contact": "", + "email": "", + "billing_address": { + "line1": "Bakers Street", + "line2": "Country Road", + "zipcode": "560068", + "city": "Bengaluru", + "state": "Karnataka", + "country": "in" + }, + "shipping_address": { + "line1": "Bakers Street", + "line2": "Country Road", + "zipcode": "560068", + "city": "Bengaluru", + "state": "Karnataka", + "country": "IN" + } + }, + "line_items": [ + { + "name": "Master Cloud Computing in 30 Days", + "description": "Book by Ravena Ravenclaw", + "amount": 399, + "currency": "", + "quantity": 1 + } + ], + "sms_notify": true, + "email_notify": false, + "currency": "", + "expire_by": 1589765167, + "notes": { + "key1": "Testing." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject invoiceRequest = new JSONObject(); +invoiceRequest.put("type", "invoice"); +invoiceRequest.put("description", "Invoice for the month of January 2020"); +invoiceRequest.put("partial_payment",true); +JSONObject customer = new JSONObject(); +customer.put("name",""); +customer.put("contact",""); +customer.put("email",""); +JSONObject billingAddress = new JSONObject(); +billingAddress.put("line1","Ground & 1st Floor, SJR Cyber Laskar"); +billingAddress.put("line2","Hosur Road"); +billingAddress.put("zipcode","560068"); +billingAddress.put("city","Bengaluru"); +billingAddress.put("state","Karnataka"); +billingAddress.put("country","in"); +customer.put("billing_address",billingAddress); +JSONObject shippingAddress = new JSONObject(); +shippingAddress.put("line1","Ground & 1st Floor, SJR Cyber Laskar"); +shippingAddress.put("line2","Hosur Road"); +shippingAddress.put("zipcode","560068"); +shippingAddress.put("city","Bengaluru"); +shippingAddress.put("state","Karnataka"); +shippingAddress.put("country","in"); +customer.put("shipping_address",shippingAddress); +invoiceRequest.put("customer",customer); +List lines = new ArrayList<>(); +JSONObject lineItems = new JSONObject(); +lineItems.put("name","Master Cloud Computing in 30 Days"); +lineItems.put("description","Book by Ravena Ravenclaw"); +lineItems.put("amount",399); +lineItems.put("currency",""); +lineItems.put("quantity",1); +lines.add(lineItems); +invoiceRequest.put("line_items",lines); +invoiceRequest.put("email_notify", true); +invoiceRequest.put("sms_notify", true); +invoiceRequest.put("currency",""); +invoiceRequest.put("expire_by", 1580479824); + +Invoice invoice = instance.invoices.create(invoiceRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.invoice.create({ + "type": "invoice", + "description": "Invoice for the month of January 2020", + "partial_payment": true, + "customer": { + "name": "", + "contact": "", + "email": "", + "billing_address": { + "line1": "Ground & 1st Floor, SJR Cyber Laskar", + "line2": "Hosur Road", + "zipcode": "560068", + "city": "Bengaluru", + "state": "Karnataka", + "country": "in" + }, + "shipping_address": { + "line1": "Ground & 1st Floor, SJR Cyber Laskar", + "line2": "Hosur Road", + "zipcode": "560068", + "city": "Bengaluru", + "state": "Karnataka", + "country": "in" + } + }, + "line_items": [ + { + "name": "Master Cloud Computing in 30 Days", + "description": "Book by Ravena Ravenclaw", + "amount": 399, + "currency": "", + "quantity": 1 + } + ], + "sms_notify": True, + "email_notify": True, + "currency": "", + "expire_by": 1589765167 +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +line_items := make(map[string]interface{}) +line_items["0"] = map[string]interface{}{ + "name": "Master Cloud Computing in 30 Days", + "description": "Book by Ravena Ravenclaw", + "amount": 399, + "currency": "", + "quantity": 1, + } + +data := map[string]interface{}{ + "type": "invoice", + "description": "Invoice for the month of January 2020", + "partial_payment": true, + "customer": map[string]interface{}{ + "name": "", + "contact": "", + "email": "", + "billing_address": map[string]interface{}{ + "line1": "Ground & 1st Floor, SJR Cyber Laskar", + "line2": "Hosur Road", + "zipcode": 560068, + "city": "Bengaluru", + "state": "Karnataka", + "country": "in", + }, + "shipping_address": map[string]interface{}{ + "line1": "Ground & 1st Floor, SJR Cyber Laskar", + "line2": "Hosur Road", + "zipcode": 560068, + "city": "Bengaluru", + "state": "Karnataka", + "country": "in", + }, + }, + "line_items": line_items, + "sms_notify": true, + "email_notify": true, + "currency": "", + "expire_by": 1589765167 +} +body, err := client.Invoice.Create(data, nil) +```php: PHP +$api = new Api($key_id, $secret); + +$api->invoice->create(array( + 'type' => 'invoice', + 'description' => 'Invoice for the month of January 2020', + 'partial_payment' => true, + 'customer' => array( + 'name' => '', + 'contact' => '', + 'email' => '', + 'billing_address' => array( + 'line1' => 'Ground & 1st Floor, SJR Cyber Laskar', + 'line2' => 'Hosur Road', + 'zipcode' => '560068', + 'city' => 'Bengaluru', + 'state' => 'Karnataka', + 'country' => 'in' + ), + 'shipping_address' => array( + 'line1' => 'Ground & 1st Floor, SJR Cyber Laskar', + 'line2' => 'Hosur Road', + 'zipcode' => '560068', + 'city' => 'Bengaluru', + 'state' => 'Karnataka', + 'country' => 'in' + ) + ), + 'line_items' => array( + array( + 'name' => 'Master Cloud Computing in 30 Days', + 'description' => 'Book by Ravena Ravenclaw', + 'amount' => 399, + 'currency' => '', + 'quantity' => 1 + ) + ), + 'sms_notify' => true, + 'email_notify' => true, + 'currency' => '', + 'expire_by' => 1589765167 +)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Invoice.create({ + "type": "invoice", + "description": "Invoice for the month of January 2020", + "partial_payment": true, + "customer": { + "name": "", + "contact": "", + "email": "", + "billing_address": { + "line1": "Ground & 1st Floor, SJR Cyber Laskar", + "line2": "Hosur Road", + "zipcode": 560068, + "city": "Bengaluru", + "state": "Karnataka", + "country": "in" + }, + "shipping_address": { + "line1": "Ground & 1st Floor, SJR Cyber Laskar", + "line2": "Hosur Road", + "zipcode": 560068, + "city": "Bengaluru", + "state": "Karnataka", + "country": "in" + } + }, + "line_items": [ + { + "name": "Master Cloud Computing in 30 Days", + "description": "Book by Ravena Ravenclaw", + "amount": 399, + "currency": "", + "quantity": 1 + } + ], + "sms_notify": 1, + "email_notify": 1, + "currency": "", + "expire_by": 1589765167 +}) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.invoice.create({ + "type": "invoice", + "description": "Invoice for the month of January 2020", + "partial_payment": true, + "customer": { + "name": "", + "contact": "", + "email": "", + "billing_address": { + "line1": "Ground & 1st Floor, SJR Cyber Laskar", + "line2": "Hosur Road", + "zipcode": 560068, + "city": "Bengaluru", + "state": "Karnataka", + "country": "in" + }, + "shipping_address": { + "line1": "Ground & 1st Floor, SJR Cyber Laskar", + "line2": "Hosur Road", + "zipcode": 560068, + "city": "Bengaluru", + "state": "Karnataka", + "country": "in" + } + }, + "line_items": [ + { + "name": "Master Cloud Computing in 30 Days", + "description": "Book by Ravena Ravenclaw", + "amount": 399, + "currency": "", + "quantity": 1 + } + ], + "sms_notify": true, + "email_notify": true, + "currency": "", + "expire_by": 1589765167 +}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary invoiceRequest = new Dictionary(); +invoiceRequest.Add("type", "invoice"); +invoiceRequest.Add("description", "Invoice for the month of January 2020"); +invoiceRequest.Add("partial_payment", true); +Dictionary customer = new Dictionary(); +customer.Add("name", ""); +customer.Add("contact", ""); +customer.Add("email", ""); +Dictionary billingAddress = new Dictionary(); +billingAddress.Add("line1", "Bakers Street"); +billingAddress.Add("line2", "Country Road"); +billingAddress.Add("zipcode", "560068"); +billingAddress.Add("city", "Bengaluru"); +billingAddress.Add("state", "Karnataka"); +billingAddress.Add("country", "in"); +customer.Add("billing_address", billingAddress); +Dictionary shippingAddress = new Dictionary(); +shippingAddress.Add("line1", "Bakers Street"); +shippingAddress.Add("line2", "Country Road"); +shippingAddress.Add("zipcode", "560068"); +shippingAddress.Add("city", "Bengaluru"); +shippingAddress.Add("state", "Karnataka"); +shippingAddress.Add("country", "in"); +customer.Add("shipping_address", shippingAddress); +invoiceRequest.Add("customer", customer); +List> lines = new List>(); +Dictionary lineItems = new Dictionary(); +lineItems.Add("name", "Master Cloud ComAdding in 30 Days"); +lineItems.Add("description", "Book by Ravena Ravenclaw"); +lineItems.Add("amount", 399); +lineItems.Add("currency", ""); +lineItems.Add("quantity", 1); +lines.Add(lineItems); +invoiceRequest.Add("line_items", lines); +invoiceRequest.Add("email_notify", true); +invoiceRequest.Add("sms_notify", true); +invoiceRequest.Add("currency", ""); +invoiceRequest.Add("expire_by", 1580479824); + +Invoice invoice = client.Invoice.Create(invoiceRequest); +``` + +### Response + +```json: Success +{ + "id": "inv_E7q0tqkxBRzdau", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_E7q0trFqXgExmT", + "customer_details": { + "id": "cust_E7q0trFqXgExmT", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": { + "id": "addr_E7q0ttqh4SGhAC", + "type": "billing_address", + "primary": true, + "line1": "Bakers Street", + "line2": "Country Road", + "zipcode": "560068", + "city": "Bengaluru", + "state": "Karnataka", + "country": "in" + }, + "shipping_address": { + "id": "addr_E7q0ttKwVA1h2V", + "type": "shipping_address", + "primary": true, + "line1": "Bakers Street", + "line2": "Country Road", + "zipcode": "560068", + "city": "Bengaluru", + "state": "Karnataka", + "country": "in" + }, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_E7q0tvRpC0WJwg", + "line_items": [ + { + "id": "li_E7q0tuPNg84VbZ", + "item_id": null, + "ref_id": null, + "ref_type": null, + "name": "Master Cloud Computing in 30 Days", + "description": "Book by Ravena Ravenclaw", + "amount": 399, + "unit_amount": 399, + "gross_amount": 399, + "tax_amount": 0, + "taxable_amount": 399, + "net_amount": 399, + "currency": "", + "type": "invoice", + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "unit": null, + "quantity": 1, + "taxes": [] + } + ], + "payment_id": null, + "status": "issued", + "expire_by": 1589765167, + "issued_at": 1579765167, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1579765167, + "terms": null, + "partial_payment": true, + "gross_amount": 399, + "tax_amount": 0, + "taxable_amount": 399, + "amount": 399, + "amount_paid": 0, + "amount_due": 399, + "currency": "", + "currency_symbol": "$", + "description": "Invoice for the month of January 2020", + "notes": [], + "comment": null, + "short_url": "https://rzp.io/i/2wxV8Xs", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "invoice", + "group_taxes_discounts": false, + "created_at": 1579765167 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`type` _mandatory_ +: `string` Indicates the type of entity. Here, it is `invoice`. + +`description` _optional_ +: `string` A brief description of the invoice. + +`draft` _optional_ +: `string` Invoice is created in `draft` state when value is set to `1`. + +`customer_id` _mandatory_ +: `string` You can pass the `customer_id` in this field, if you are using the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). If not, you can pass the customer object described in the below fields. + +`customer` +: `object` Customer details. + + `name` _mandatory_ + : `string` Customer's name. Alphanumeric, with period (.), apostrophe (') and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + + `billing_address` + : `object` The customer's billing address. + + `line1` _mandatory_ + : `string` The first line of the customer's address. + + `line2` _optional_ + : `string` The second line of the customer's address. + + `city` _mandatory_ + : `string` The city + + `zipcode` _mandatory_ + : `string` The zipcode + + `state` _mandatory_ + : `string` The state + + `country` _mandatory_ + : `string` The country + + `shipping_address` + : `object` The customer's shipping address. + + `line1` _mandatory_ + : `string` The first line of the customer's address. + + `line2` _optional_ + : `string` The second line of the customer's address. + + `city` _mandatory_ + : `string` The city + + `zipcode` _mandatory_ + : `string` The zipcode + + `state` _mandatory_ + : `string` The state + + `country` _mandatory_ + : `string` The country + +`line_items` +: `object` Details of the line item that is billed in the invoice. Maximum of 50 line items. + + `item_id` _conditionally mandatory_ + : `string` If you are using the [Items API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/create-item.md), you may use an existing item. You can choose to override details such as name, description by passing these along with `item_id`. While the invoice will show the updated details, the existing item will not be updated. This parameter is mandatory if you are not going to use any other parameter in the array. + + `name` _conditionally mandatory_ + : `string` The item name. Mandatory if `item_id` is not provided. + + `description` _optional_ + : `string` A brief description of the item. + + `amount` _conditionally mandatory_ + : `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `30000`. Mandatory if `item_id` is not provided. + + `currency` _optional_ + : `string` The currency associated with the item. Defaults to `INR`. Know about the [list of supported international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) This should match invoice currency. + + `quantity` _optional_ + : `integer` The number of units of the item billed in the invoice. Defaults to `1`. + +. + + `quantity` _optional_ + : `integer` The number of units of the item billed in the invoice. Defaults to `1`. + +`expire_by` _optional_ +: `integer` Timestamp, in Unix format, at which the invoice will expire. + +`sms_notify` _optional_ +: `boolean` Defines who handles the SMS notification. Possible values: + - `true` (default): Razorpay sends the notification to the customer. + - `false`: You send the notification to the customer. + +`email_notify` _optional_ +: `boolean` Defines who handles the email notification. Possible values: + - `true` (default): Razorpay sends the notification to the customer. + - `false`: You send the notification to the customer. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`currency` _conditionally mandatory_ +: `string` The currency associated with the invoice. You must mandatorily pass this parameter if accepting international payments. If you have passed `currency` as a sub-parameter in the `line_item` object, you must ensure that the same currency is passed in both places. Know about the [list of supported international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + +. + +`notes` _optional_ +: `string` Any custom notes added to the invoice. Maximum of 2048 characters. + +### Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` Indicates the type of entity. Here, it is `invoice`. + +`type` +: `string` Here, it should be `invoice`. + +`invoice_number` +: `string` Unique number you added for internal reference. The minimum character length is 1 and maximum is 40. + +`customer_id` +: `string` The unique identifier of the customer. You can create `customer_id` using the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). Alternatively, you can pass the customer object described in the below fields. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `name` + : `string` Customer's name. Alphanumeric, with period (.), apostrophe (') and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + + `email` + : `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `contact` + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + + `billing_address` + : `object` Details of the customer's billing address. + + `id` + : `string` The unique identifier generated for the customer's billing address. + + `type` + : `string` The customer address type. Here it is `billing_address`. + + `primary` + : `boolean` Defines if this is the primary address. + - `true`: It is the customer's primary address. + - `false`: It is not the customer's primary address. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `city` + : `string` The city. + + `zipcode` + : `string` The zipcode. + + `state` + : `string` The state. + + `country` + : `string` The country. + + `shipping_address` + : `object` Details of the customer's shipping address. + + `id` + : `string` The unique identifier generated for the customer's shipping address. + + `type` + : `string` The customer address type. Here it is `shipping_address`. + + `primary` + : `boolean` Defines if this is the primary address. + - `true`: It is the customer's primary address. + - `false`: It is not the customer's primary address. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `city` + : `string` The city. + + `zipcode` + : `string` The zipcode. + + `state` + : `string` The state. + + `country` + : `string` The country. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `object` Details of the line item that is billed in the invoice. Maximum of 50 line items. + + `id` + : `string` Unique identifier that is generated if a new item has been created while creating the invoice. + + `item_id` + : `string` Unique identifier of the item generated using Items API that has been billed in the invoice. + + `name` + : `string` The item's name. + + `description` + : `string` A brief description of the item. + + `amount` + : `integer` The price of the item. + + `currency` + : `string` The currency associated with the item. Default is `INR`. Know about the [list of supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `type` + : `string` Here, it is `invoice`. + + `quantity` + : `integer` The quantity of the item billed in the invoice. Defaults to `1`. + +. + + `type` + : `string` Here, it is `invoice`. + + `quantity` + : `integer` The quantity of the item billed in the invoice. Defaults to `1`. + +`payment_id` +: `string` Unique identifier of a payment made against this invoice. + +`status` +: `string` The status of the invoice. Know more about [Invoice States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md). Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` Timestamp, in Unix format, at which the invoice will expire. + +`issued_at` +: `integer` Timestamp, in Unix format, at which the invoice was issued to the customer. + +`paid_at` +: `integer` Timestamp, in Unix format, at which the payment was made. + +`cancelled_at` +: `integer` Timestamp, in Unix format, at which the invoice was cancelled. + +`expired_at` +: `integer` Timestamp, in Unix format, at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `30000`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. You must mandatorily pass this parameter if accepting international payments. If you have passed `currency` as a sub-parameter in the `line_item` object, you must ensure that the same currency is passed in both places. Know about the [list of supported international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + +. + +`description` +: `string` A brief description of the invoice. The maximum character length is 2048. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. Share this link with customers to accept payments. + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: The API key or secret are not entered or an invalid API key is used. +* solution: Use and enter the correct API details while executing the API. + +customer is required. +* code: 400 +* description: An invoice is issued without adding customer details. +* solution: Ensure that the customer details are entered. + +the merchant doesn't have international activated. +* code: 400 +* description: The line_items object has an international currency set. For example, USD, is not enabled for your account. +* solution: Ensure that your account has international payments enabled. + +Currency of all items should be the same as of the invoice. +* code: 400 +* description: There is a difference in currency entered between `line_items` and invoice currency. +* solution: Ensure that the `line_items` currency matches that of the invoice. + +expire_by should be at least 15 minutes after current time. +* code: 400 +* description: The expiry date is before or within 15 minutes of the current time +* solution: Ensure that the Expiry date is greater than the (current time + 15 minutes). For example, if the current time is 1 pm, the expiry date must be at least 1.15 pm. + +line_items is required. +* code: 400 +* description: A mandatory field is empty. +* solution: Ensure that you fill all the mandatory fields. diff --git a/llm-content/api/payments/invoices/delete-item.md b/llm-content/api/payments/invoices/delete-item.md new file mode 100644 index 00000000..8fa30384 --- /dev/null +++ b/llm-content/api/payments/invoices/delete-item.md @@ -0,0 +1,105 @@ +--- +title: Delete an Item +description: Delete an Item using this endpoint. +--- + +# Delete an Item + +## Delete an Item + +Use this endpoint to delete an item. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X DELETE https://api.razorpay.com/v1/items/item_7Oy8OMV6BdEAac \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String itemId = "item_7Oy8OMV6BdEAac"; + +List item = razorpay.items.delete(itemId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.item.delete(itemId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +itemId = "item_7Oy8OMV6BdEAac" + +Razorpay::Item.delete(itemId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Item.Delete("", nil, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->Item->fetch($itemId)->delete(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.Items.delete(itemId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +itemId = "item_7Oy8OMV6BdEAac" + +Razorpay::Item.delete(itemId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string itemId = "item_7Oy8OMV6BdEAac"; + +List payment = client.Item.Fetch(itemId).Delete(); + +``` + +### Response + +```json: Success +[] + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} + +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the item that must be deleted. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: The API key or secret are not entered or an invalid API key is used. +* solution: Use and enter the correct API details while executing the API. + +The id provided does not exist. +* code: 400 +* description: The invoice id entered is either invalid or does not belong to the requester account. +* solution: Enter a valid invoice id. diff --git a/llm-content/api/payments/invoices/delete.md b/llm-content/api/payments/invoices/delete.md new file mode 100644 index 00000000..582ec2ca --- /dev/null +++ b/llm-content/api/payments/invoices/delete.md @@ -0,0 +1,90 @@ +--- +title: Delete an Invoice +description: Delete an invoice using this endpoint. +--- + +# Delete an Invoice + +## Delete an Invoice + +Use this endpoint to delete invoices. You can only delete an invoice that is in the `draft` state. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X DELETE https://api.razorpay.com/v1/invoices/inv_DAuFuwWYU3R9tg \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String invoiceId = "inv_DAuFuwWYU3R9tg"; + +List invoice = razorpay.invoices.delete(InvoiceId); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.invoice.delete(invoiceId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Invoice.Delete("", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Invoice.delete(invoiceId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->invoice->fetch($invoiceId)->delete(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.invoices.delete(invoiceId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] +"); + +string invoiceId = "inv_DAweOiQ7amIUVd"; + +List invoice = client.Invoice.Fetch(invoiceId).Delete(); +``` + +### Response + +```json: Success +[] + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Operation not allowed for Invoice in cancelled status.", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the invoice. + +### Errors + +Operation not allowed for Invoice in cancelled status. +* code: 400 +* description: You are trying to delete an invoice that is not in the `Draft` status. +* solution: Try deleting an invoice in `Draft`status. diff --git a/llm-content/api/payments/invoices/entity.md b/llm-content/api/payments/invoices/entity.md new file mode 100644 index 00000000..63c67ca7 --- /dev/null +++ b/llm-content/api/payments/invoices/entity.md @@ -0,0 +1,325 @@ +--- +title: Invoices Entity +description: Entity parameters and sample code for Invoices API. +--- + +# Invoices Entity + +The Invoices entity has the following parameters: + +### Response + +```json: Entity +{ + "id": "inv_E7q0tqkxBRzdau", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_E7q0trFqXgExmT", + "customer_details": { + "id": "cust_E7q0trFqXgExmT", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": { + "id": "addr_E7q0ttqh4SGhAC", + "type": "billing_address", + "primary": true, + "line1": "Bakers Street", + "line2": "Country Road", + "zipcode": "560068", + "city": "Bengaluru", + "state": "Karnataka", + "country": "in" + }, + "shipping_address": { + "id": "addr_E7q0ttKwVA1h2V", + "type": "shipping_address", + "primary": true, + "line1": "Bakers Street", + "line2": "Country Road", + "zipcode": "560068", + "city": "Bengaluru", + "state": "Karnataka", + "country": "in" + }, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_E7q0tvRpC0WJwg", + "line_items": [ + { + "id": "li_E7q0tuPNg84VbZ", + "item_id": null, + "ref_id": null, + "ref_type": null, + "name": "Master Cloud Computing in 30 Days", + "description": "Book by Ravena Ravenclaw", + "amount": 399, + "unit_amount": 399, + "gross_amount": 399, + "tax_amount": 0, + "taxable_amount": 399, + "net_amount": 399, + "currency": "", + "type": "invoice", + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "unit": null, + "quantity": 1, + "taxes": [] + } + ], + "payment_id": null, + "status": "issued", + "expire_by": null, + "issued_at": 1579765167, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1579765167, + "terms": null, + "partial_payment": false, + "gross_amount": 399, + "tax_amount": 0, + "taxable_amount": 399, + "amount": 399, + "amount_paid": 0, + "amount_due": 399, + "currency": "", + "description": null, + "notes": [], + "comment": null, + "short_url": "https://rzp.io/i/2wxV8Xs", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "invoice", + "group_taxes_discounts": false, + "created_at": 1579765167 +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` Indicates the type of entity. Here, it is `invoice`. + +`type` +: `string` Here, it should be `invoice`. + +`invoice_number` +: `string` Unique number you added for internal reference. The minimum character length is 1 and maximum is 40. + +`customer_id` +: `string` The unique identifier of the customer. You can create `customer_id` using the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). Alternatively, you can pass the customer object described in the below fields. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `name` + : `string` Customer's name. Alphanumeric, with period (.), apostrophe (') and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + + `email` + : `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `contact` + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + + `billing_address` + : `object` Details of the customer's billing address. + + `id` + : `string` The unique identifier generated for the customer's billing address. + + `type` + : `string` The customer address type. Here it is `billing_address`. + + `primary` + : `boolean` Defines if this is the primary address. + - `true`: It is the customer's primary address. + - `false`: It is not the customer's primary address. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `city` + : `string` The city. + + `zipcode` + : `string` The zipcode. + + `state` + : `string` The state. + + `country` + : `string` The country. + + `shipping_address` + : `object` Details of the customer's shipping address. + + `id` + : `string` The unique identifier generated for the customer's shipping address. + + `type` + : `string` The customer address type. Here it is `shipping_address`. + + `primary` + : `boolean` Defines if this is the primary address. + - `true`: It is the customer's primary address. + - `false`: It is not the customer's primary address. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `city` + : `string` The city. + + `zipcode` + : `string` The zipcode. + + `state` + : `string` The state. + + `country` + : `string` The country. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `object` Details of the line item that is billed in the invoice. Maximum of 50 line items. + + `id` + : `string` Unique identifier that is generated if a new item has been created while creating the invoice. + + `item_id` + : `string` Unique identifier of the item generated using Items API that has been billed in the invoice. + + `name` + : `string` The item's name. + + `description` + : `string` A brief description of the item. + + `amount` + : `integer` The price of the item. + + `currency` + : `string` The currency associated with the item. Default is `INR`. Know about the [list of supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `type` + : `string` Here, it is `invoice`. + + `quantity` + : `integer` The quantity of the item billed in the invoice. Defaults to `1`. + +`payment_id` +: `string` Unique identifier of a payment made against this invoice. + +`status` +: `string` The status of the invoice. Know more about [Invoice States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md). Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` Timestamp, in Unix format, at which the invoice will expire. + +`issued_at` +: `integer` Timestamp, in Unix format, at which the invoice was issued to the customer. + +`paid_at` +: `integer` Timestamp, in Unix format, at which the payment was made. + +`cancelled_at` +: `integer` Timestamp, in Unix format, at which the invoice was cancelled. + +`expired_at` +: `integer` Timestamp, in Unix format, at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. You must mandatorily pass this parameter if accepting international payments. If you have passed `currency` as a sub-parameter in the `line_item` object, you must ensure that the same currency is passed in both places. Know about the [list of supported international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`description` +: `string` A brief description of the invoice. The maximum character length is 2048. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. Share this link with customers to accept payments. + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. diff --git a/llm-content/api/payments/invoices/fetch-all-items.md b/llm-content/api/payments/invoices/fetch-all-items.md new file mode 100644 index 00000000..227880e4 --- /dev/null +++ b/llm-content/api/payments/invoices/fetch-all-items.md @@ -0,0 +1,219 @@ +--- +title: Fetch All Items +description: Retrieve all the Items created till date. +--- + +# Fetch All Items + +## Fetch All Items + +Use this endpoint to retrieve the details of all the items created till date. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + - X GET https://api.razorpay.com/v1/items/ \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List item = razorpay.items.fetchAll(params); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.item.all(options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +options = {"count":1} + +Razorpay::Item.all(options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +options:= map[string]interface{}{ + "count": 2, + "skip": 1, +} +body, err := client.Item.All(options, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->Item->all($options); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.items.all(options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +options = {"count":2} + +Razorpay::Item.all(options) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary itemRequest = new Dictionary(); +itemRequest.Add("count","1"); + +List item = client.Item.All(); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "item_JInaSLODeDUQiQ", + "active": true, + "name": "Book / English August", + "description": "An indian story, Booker prize winner.", + "amount": 20000, + "unit_amount": 20000, + "currency": "", + "type": "invoice", + "unit": null, + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "tax_id": null, + "tax_group_id": null, + "created_at": 1649843796 + }, + { + "id": "item_JIPSg5L06yhHie", + "active": false, + "name": "Book / Ignited Minds - Updated name!", + "description": "New descirption too. :).", + "amount": 20000, + "unit_amount": 20000, + "currency": "INR", + "type": "invoice", + "unit": null, + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "tax_id": null, + "tax_group_id": null, + "created_at": 1649758835 + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} + +``` + +### Parameters + +`from` +: `integer` Unix timestamp, in seconds, from when the items are to be fetched. + +`to` +: `integer` Unix timestamp, in seconds, till when the items are to be fetched. + +`count` +: `integer` Number of items to be fetched. + - Default value: `10` + - Maximum value: `100` + - This can be used for pagination, in combination with the `skip` parameter. + +`skip` +: `integer` Number of records to be skipped while fetching the items. + +`active` +: `integer` Fetches number of active or inactive items. + - The value is `1` for active items. + - The value is `0` for inactive items. + +### Parameters + +`id` +: `string` The unique identifier of the item. + +`active` +: `boolean` Indicates the status of the item. Possible values: + - `true` (default): Item is in the active state. + - `false`: Item is in the inactive state. + +`name` +: `string` The name of the item. + +`description` +: `string` A text description about the item. + +`amount` +: `integer` The price of the item. + +`unit_amount` +: `integer` The per unit billing amount for each individual unit. + +`currency` +: `string` The currency in which the amount should be charged. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`type` +: `string` Here, it must be `invoice`. + +`unit` +: `integer` The number of units of the item billed in the invoice. + +`tax_inclusive` +: `boolean` Indicates whether the base amount includes tax. + - `true`: The base amount includes tax. + - `false`: The base amount does not include tax. By default, the value is set to `false`. + +`hsn_code` +: `integer` The 8-digit code used to classify the product as per the Harmonised System of Nomenclature. + +`sac_code` +: `integer` The 6-digit code used to classify the service as per the Services Accounting Code. + +`tax_rate` +: `string` The percentage at which an individual or a corporation is taxed. + +`tax_id` +: `string` The identification number that gets displayed on invoices issued to the customer. + +`tax_group_id` +: `string` The identification number for the tax group. A tax group is a collection of taxes that can be applied as a single set of rules. + +`created_at` +: `integer` Unix timestamp, at which the item was created. For example, `1649843796`. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard.- Different keys for test mode and live modes. +- Expired API key. + +* solution: The API keys must be active and entered correctly with no whitespace before or after the keys. diff --git a/llm-content/api/payments/invoices/fetch-all.md b/llm-content/api/payments/invoices/fetch-all.md new file mode 100644 index 00000000..3794204e --- /dev/null +++ b/llm-content/api/payments/invoices/fetch-all.md @@ -0,0 +1,506 @@ +--- +title: Fetch All Invoices +description: Fetch the details of all Invoices using this endpoint. +--- + +# Fetch All Invoices + +## Fetch All Invoices + +Use this endpoint to retrieve the details of all invoices. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/invoices/ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +List invoice = razorpay.invoices.fetchAll(); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.invoice.all() + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +option := map[string]interface{}{ + "count" : 1, +} +body, err := client.Invoice.All(option, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Invoice.all(options) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->invoice->all(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.invoices.all() + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +List invoice = client.Invoice.All(); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "inv_DAweOiQ7amIUVd", + "entity": "invoice", + "receipt": "#0961", + "invoice_number": "#0961", + "customer_id": "cust_DAtUWmvpktokrT", + "customer_details": { + "id": "cust_DAtUWmvpktokrT", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": { + "id": "addr_DAtUWoxgu91obl", + "type": "billing_address", + "primary": true, + "line1": "Bakers Street", + "line2": "Country Road", + "zipcode": "400092", + "city": "Mumbai", + "state": "Maharashtra", + "country": "in" + }, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": null, + "line_items": [ + { + "id": "li_DAweOizsysoJU6", + "item_id": null, + "name": "Book / English August - Updated name and quantity", + "description": "150 points in Quidditch", + "amount": 400, + "unit_amount": 400, + "gross_amount": 400, + "tax_amount": 0, + "taxable_amount": 400, + "net_amount": 400, + "currency": "", + "type": "invoice", + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "unit": null, + "quantity": 1, + "taxes": [] + }, + { + "id": "li_DAwjWQUo07lnjF", + "item_id": null, + "name": "Book / A Wild Sheep Chase", + "description": null, + "amount": 200, + "unit_amount": 200, + "gross_amount": 200, + "tax_amount": 0, + "taxable_amount": 200, + "net_amount": 200, + "currency": "", + "type": "invoice", + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "unit": null, + "quantity": 1, + "taxes": [] + } + ], + "payment_id": null, + "status": "draft", + "expire_by": 1567103399, + "issued_at": null, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": null, + "email_status": null, + "date": 1566891149, + "terms": null, + "partial_payment": false, + "gross_amount": 600, + "tax_amount": 0, + "taxable_amount": 600, + "amount": 600, + "amount_paid": null, + "amount_due": null, + "currency": "", + "currency_symbol": "", + "description": "This is a test invoice.", + "notes": { + "updated-key": "An updated note." + }, + "comment": null, + "short_url": null, + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "invoice", + "group_taxes_discounts": false, + "created_at": 1566906474, + "idempotency_key": null + }, + { + "id": "inv_DAul2TA6zodukS", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_DAuFux32LnIsqJ", + "customer_details": { + "id": "cust_DAuFux32LnIsqJ", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": { + "id": "addr_DAuFuz499I5mgk", + "type": "billing_address", + "primary": true, + "line1": "L-16, The Business Centre,", + "line2": "61, Wellfield Road", + "zipcode": "110001", + "city": "New Delhi", + "state": "Delhi", + "country": "in" + }, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_DAul2V0vnGXIML", + "line_items": [ + { + "id": "li_DAul2TuV4fhwd3", + "item_id": "item_DAqThJ7v09UO3n", + "name": "Magic Beans", + "description": "Beans that make you go kaput!", + "amount": 2000, + "unit_amount": 2000, + "gross_amount": 2000, + "tax_amount": 0, + "taxable_amount": 2000, + "net_amount": 2000, + "currency": "", + "type": "invoice", + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "unit": null, + "quantity": 1, + "taxes": [] + } + ], + "payment_id": null, + "status": "cancelled", + "expire_by": null, + "issued_at": 1566899808, + "paid_at": null, + "cancelled_at": 1566973122, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1566994898, + "terms": "Updated terms and conditions for Acme Corp", + "partial_payment": false, + "gross_amount": 2000, + "tax_amount": 0, + "taxable_amount": 2000, + "amount": 2000, + "amount_paid": 0, + "amount_due": 2000, + "currency": "", + "description": null, + "notes": [], + "comment": "Updated comment on the Invoice", + "short_url": "https://rzp.io/i/F7EPd9Q", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "invoice", + "group_taxes_discounts": false, + "created_at": 1566899808, + "idempotency_key": null + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`type` _optional_ +: `string` Here, it is `invoice`. + +`payment_id` _optional_ +: `string` The unique identifier of the payment made by the customer against the invoice. + +`receipt` _optional_ +: `string` The unique receipt number that you entered for internal purposes. + +`customer_id` _optional_ +: `string` The unique identifier of the customer. When used, fetches all invoices generated for a customer. + +### Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` Indicates the type of entity. Here, it is `invoice`. + +`type` +: `string` Here, it should be `invoice`. + +`invoice_number` +: `string` Unique number you added for internal reference. The minimum character length is 1 and maximum is 40. + +`customer_id` +: `string` The unique identifier of the customer. You can create `customer_id` using the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). Alternatively, you can pass the customer object described in the below fields. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `name` + : `string` Customer's name. Alphanumeric, with period (.), apostrophe (') and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + + `email` + : `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `contact` + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + + `billing_address` + : `object` Details of the customer's billing address. + + `id` + : `string` The unique identifier generated for the customer's billing address. + + `type` + : `string` The customer address type. Here it is `billing_address`. + + `primary` + : `boolean` Defines if this is the primary address. + - `true`: It is the customer's primary address. + - `false`: It is not the customer's primary address. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `city` + : `string` The city. + + `zipcode` + : `string` The zipcode. + + `state` + : `string` The state. + + `country` + : `string` The country. + + `shipping_address` + : `object` Details of the customer's shipping address. + + `id` + : `string` The unique identifier generated for the customer's shipping address. + + `type` + : `string` The customer address type. Here it is `shipping_address`. + + `primary` + : `boolean` Defines if this is the primary address. + - `true`: It is the customer's primary address. + - `false`: It is not the customer's primary address. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `city` + : `string` The city. + + `zipcode` + : `string` The zipcode. + + `state` + : `string` The state. + + `country` + : `string` The country. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `object` Details of the line item that is billed in the invoice. Maximum of 50 line items. + + `id` + : `string` Unique identifier that is generated if a new item has been created while creating the invoice. + + `item_id` + : `string` Unique identifier of the item generated using Items API that has been billed in the invoice. + + `name` + : `string` The item's name. + + `description` + : `string` A brief description of the item. + + `amount` + : `integer` The price of the item. + + `currency` + : `string` The currency associated with the item. Default is `INR`. Know about the [list of supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `type` + : `string` Here, it is `invoice`. + + `quantity` + : `integer` The quantity of the item billed in the invoice. Defaults to `1`. + +. + + `type` + : `string` Here, it is `invoice`. + + `quantity` + : `integer` The quantity of the item billed in the invoice. Defaults to `1`. + +`payment_id` +: `string` Unique identifier of a payment made against this invoice. + +`status` +: `string` The status of the invoice. Know more about [Invoice States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md). Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` Timestamp, in Unix format, at which the invoice will expire. + +`issued_at` +: `integer` Timestamp, in Unix format, at which the invoice was issued to the customer. + +`paid_at` +: `integer` Timestamp, in Unix format, at which the payment was made. + +`cancelled_at` +: `integer` Timestamp, in Unix format, at which the invoice was cancelled. + +`expired_at` +: `integer` Timestamp, in Unix format, at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `30000`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. You must mandatorily pass this parameter if accepting international payments. If you have passed `currency` as a sub-parameter in the `line_item` object, you must ensure that the same currency is passed in both places. Know about the [list of supported international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + +. + +`description` +: `string` A brief description of the invoice. The maximum character length is 2048. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. Share this link with customers to accept payments. + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: The API key or secret are not entered or an invalid API key is used. +* solution: Use and enter the correct API details while executing the API. + +The id provided does not exist. +* code: 400 +* description: The invoice id entered is either invalid or does not belong to the requester account. +* solution: Enter a valid invoice id. diff --git a/llm-content/api/payments/invoices/fetch-with-id-item.md b/llm-content/api/payments/invoices/fetch-with-id-item.md new file mode 100644 index 00000000..47bd4979 --- /dev/null +++ b/llm-content/api/payments/invoices/fetch-with-id-item.md @@ -0,0 +1,180 @@ +--- +title: Fetch Item With ID +description: Fetch an Item with your Item Id. +--- + +# Fetch Item With ID + +## Fetch Item With ID + +Use this endpoint to retrieve the details of a specific item using the `Item_id`. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + - X GET https://api.razorpay.com/v1/items/item_7Oxp4hmm6T4SCn \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String itemId = "item_7Oxp4hmm6T4SCn"; + +Item item = razorpay.items.fetch(itemId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.item.fetch(itemId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +itemId = "item_7Oxp4hmm6T4SCn" + +Razorpay::Item.fetch(itemId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Item.Fetch("", nil, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->Item->fetch($itemId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.items.fetch(itemId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +itemId = "item_7Oxp4hmm6T4SCn" + +Razorpay::Item.fetch(itemId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string itemId = "item_7Oxp4hmm6T4SCn"; + +Item item = client.Item.Fetch(itemId); +``` + +### Response + +```json: Success +{ + "id": "item_7Oxp4hmm6T4SCn", + "active": true, + "name": "Book / English August", + "description": "An indian story, Booker prize winner.", + "amount": 20000, + "unit_amount": 20000, + "currency": "INR", + "type": "invoice", + "unit": null, + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "tax_id": null, + "tax_group_id": null, + "created_at": 1649843796 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} + +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the item whose details are to be fetched. + +### Parameters + +`id` +: `string` The unique identifier of the item. + +`active` +: `boolean` Indicates the status of the item. Possible values: + - true (default): Item is in active state. + - false: Item is in inactive state. + +`name` +: `string` The name of the item. + +`description` +: `string` A text description about the item. + +`amount` +: `integer` The price of the item. + +`unit_amount` +: `integer` The per unit billing amount for each individual unit. + +`currency` +: `string` The currency in which the amount should be charged. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`type` +: `string` Here, it must be `invoice`. + +`unit` +: `integer` The number of units of the item billed in the invoice. + +`tax_inclusive` +: `boolean` Indicates whether the base amount includes tax. + - `true`: The base amount includes tax. + - `false`: The base amount does not include tax. By default, the value is set to `false`. + +`hsn_code` +: `integer` The 8-digit code used to classify the product as per the Harmonised System of Nomenclature. + +`sac_code` +: `integer` The 6-digit code used to classify the service as per the Services Accounting Code. + +`tax_rate` +: `string` The percentage at which an individual or a corporation is taxed. + +`tax_id` +: `string` The identification number that gets displayed on invoices issued to the customer. + +`tax_group_id` +: `string` The identification number for the tax group. A tax group is a collection of taxes that can be applied as a single set of rules. + +`created_at` +: `integer` Unix timestamp, at which the item was created. For example, `1649843796`. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: The API key or secret are not entered or an invalid API key is used. +* solution: Use and enter the correct API details while executing the API. + +The id provided does not exist. +* code: 400 +* description: The invoice id entered is either invalid or does not belong to the requester account. +* solution: Enter a valid invoice id. + +no Route matched with those values +* code: 400 +* description: This happens when the lenght of the id is incorrect. +* solution: Enter a valid invoice id. diff --git a/llm-content/api/payments/invoices/fetch-with-id.md b/llm-content/api/payments/invoices/fetch-with-id.md new file mode 100644 index 00000000..f8d6244c --- /dev/null +++ b/llm-content/api/payments/invoices/fetch-with-id.md @@ -0,0 +1,398 @@ +--- +title: Fetch an Invoice With ID +description: Fetch the details of an Invoice using this endpoint. +--- + +# Fetch an Invoice With ID + +## Fetch an Invoice With ID + +Use this endpoint to retrieve all the details of an invoice. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/invoices/inv_E7q0tqkxBRzdau +-H 'content-type:application/json' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String invoiceId = "inv_E7q0tqkxBRzdau"; + +Invoice invoice = razorpay.invoices.fetch(invoiceId); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.invoice.fetch(invoiceId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Invoice.Fetch("", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Invoice.fetch(invoiceId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->invoice->fetch($invoiceId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.invoices.fetch(invoiceId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string invoiceId = "inv_Z6t7VFTb9xHeOs"; + +Invoice invoice = client.Invoice.Fetch(invoiceId); +``` + +### Response + +```json: Success +{ + "id": "inv_E7q0tqkxBRzdau", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_E7q0trFqXgExmT", + "customer_details": { + "id": "cust_E7q0trFqXgExmT", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": { + "id": "addr_E7q0ttqh4SGhAC", + "type": "billing_address", + "primary": true, + "line1": "Bakers Street", + "line2": "Country Road", + "zipcode": "560068", + "city": "Bengaluru", + "state": "Karnataka", + "country": "in" + }, + "shipping_address": { + "id": "addr_E7q0ttKwVA1h2V", + "type": "shipping_address", + "primary": true, + "line1": "Bakers Street", + "line2": "Country Road", + "zipcode": "560068", + "city": "Bengaluru", + "state": "Karnataka", + "country": "in" + }, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_E7q0tvRpC0WJwg", + "line_items": [ + { + "id": "li_E7q0tuPNg84VbZ", + "item_id": null, + "ref_id": null, + "ref_type": null, + "name": "Master Cloud Computing in 30 Days", + "description": "Book by Ravena Ravenclaw", + "amount": 399, + "unit_amount": 399, + "gross_amount": 399, + "tax_amount": 0, + "taxable_amount": 399, + "net_amount": 399, + "currency": "", + "type": "invoice", + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "unit": null, + "quantity": 1, + "taxes": [] + } + ], + "payment_id": null, + "status": "issued", + "expire_by": 1589765167, + "issued_at": 1579765167, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1579765167, + "terms": null, + "partial_payment": true, + "gross_amount": 399, + "tax_amount": 0, + "taxable_amount": 399, + "amount": 399, + "amount_paid": 0, + "amount_due": 399, + "currency": "", + "currency_symbol": "₹", + "description": "Invoice for the month of January 2020", + "notes": [], + "comment": null, + "short_url": "https://rzp.io/i/2wxV8Xs", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "invoice", + "group_taxes_discounts": false, + "created_at": 1579765167, + "idempotency_key": null +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the invoice. + +### Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` Indicates the type of entity. Here, it is `invoice`. + +`type` +: `string` Here, it should be `invoice`. + +`invoice_number` +: `string` Unique number you added for internal reference. The minimum character length is 1 and maximum is 40. + +`customer_id` +: `string` The unique identifier of the customer. You can create `customer_id` using the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). Alternatively, you can pass the customer object described in the below fields. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `name` + : `string` Customer's name. Alphanumeric, with period (.), apostrophe (') and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + + `email` + : `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `contact` + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + + `billing_address` + : `object` Details of the customer's billing address. + + `id` + : `string` The unique identifier generated for the customer's billing address. + + `type` + : `string` The customer address type. Here it is `billing_address`. + + `primary` + : `boolean` Defines if this is the primary address. + - `true`: It is the customer's primary address. + - `false`: It is not the customer's primary address. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `city` + : `string` The city. + + `zipcode` + : `string` The zipcode. + + `state` + : `string` The state. + + `country` + : `string` The country. + + `shipping_address` + : `object` Details of the customer's shipping address. + + `id` + : `string` The unique identifier generated for the customer's shipping address. + + `type` + : `string` The customer address type. Here it is `shipping_address`. + + `primary` + : `boolean` Defines if this is the primary address. + - `true`: It is the customer's primary address. + - `false`: It is not the customer's primary address. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `city` + : `string` The city. + + `zipcode` + : `string` The zipcode. + + `state` + : `string` The state. + + `country` + : `string` The country. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `object` Details of the line item that is billed in the invoice. Maximum of 50 line items. + + `id` + : `string` Unique identifier that is generated if a new item has been created while creating the invoice. + + `item_id` + : `string` Unique identifier of the item generated using Items API that has been billed in the invoice. + + `name` + : `string` The item's name. + + `description` + : `string` A brief description of the item. + + `amount` + : `integer` The price of the item. + + `currency` + : `string` The currency associated with the item. Default is `INR`. Know about the [list of supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `type` + : `string` Here, it is `invoice`. + + `quantity` + : `integer` The quantity of the item billed in the invoice. Defaults to `1`. + +. + + `type` + : `string` Here, it is `invoice`. + + `quantity` + : `integer` The quantity of the item billed in the invoice. Defaults to `1`. + +`payment_id` +: `string` Unique identifier of a payment made against this invoice. + +`status` +: `string` The status of the invoice. Know more about [Invoice States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md). Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` Timestamp, in Unix format, at which the invoice will expire. + +`issued_at` +: `integer` Timestamp, in Unix format, at which the invoice was issued to the customer. + +`paid_at` +: `integer` Timestamp, in Unix format, at which the payment was made. + +`cancelled_at` +: `integer` Timestamp, in Unix format, at which the invoice was cancelled. + +`expired_at` +: `integer` Timestamp, in Unix format, at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `30000`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. You must mandatorily pass this parameter if accepting international payments. If you have passed `currency` as a sub-parameter in the `line_item` object, you must ensure that the same currency is passed in both places. Know about the [list of supported international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + +. + +`description` +: `string` A brief description of the invoice. The maximum character length is 2048. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. Share this link with customers to accept payments. + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: The API key or secret are not entered or an invalid API key is used. +* solution: Use and enter the correct API details while executing the API. + +The id provided does not exist. +* code: 400 +* description: The invoice id entered is either invalid or does not belong to the requester account. +* solution: Enter a valid invoice id. diff --git a/llm-content/api/payments/invoices/issue.md b/llm-content/api/payments/invoices/issue.md new file mode 100644 index 00000000..7638b77c --- /dev/null +++ b/llm-content/api/payments/invoices/issue.md @@ -0,0 +1,420 @@ +--- +title: Issue an Invoice +description: Issue an invoice using this endpoint. +--- + +# Issue an Invoice + +## Issue an Invoice + +Use this endpoint to issue invoices to your customers. Only an invoice in the `draft` state can be issued. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/invoices/inv_DAweOiQ7amIUVd/issue + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String invoiceId = "inv_DAweOiQ7amIUVd"; + +Invoice invoice = razorpay.invoices.issue(invoiceId); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.invoice.issue(invoiceId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Invoice.Issue("", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Invoice.issue(invoiceId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->invoice->fetch($invoiceId)->issue(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.invoices.issue(invoiceId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string invoiceId = "inv_DAweOiQ7amIUVd"; + +Invoice invoice = client.Invoice.Fetch(invoiceId).Issue(); +``` + +### Response + +```jSON: Success +{ + "id": "inv_DAweOiQ7amIUVd", + "entity": "invoice", + "receipt": "#0961", + "invoice_number": "#0961", + "customer_id": "cust_DAtUWmvpktokrT", + "customer_details": { + "id": "cust_DAtUWmvpktokrT", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": { + "id": "addr_DAtUWoxgu91obl", + "type": "billing_address", + "primary": true, + "line1": "318 C-Wing, Suyog Co. Housing Society Ltd.", + "line2": "T.P.S Road, Vazira, Borivali", + "zipcode": "400092", + "city": "Mumbai", + "state": "Maharashtra", + "country": "in" + }, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_DBG3P8ZgDd1dsG", + "line_items": [ + { + "id": "li_DAweOizsysoJU6", + "item_id": null, + "name": "Book / English August - Updated name and quantity", + "description": "150 points in Quidditch", + "amount": 400, + "unit_amount": 400, + "gross_amount": 400, + "tax_amount": 0, + "taxable_amount": 400, + "net_amount": 400, + "currency": "", + "type": "invoice", + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "unit": null, + "quantity": 1, + "taxes": [] + }, + { + "id": "li_DAwjWQUo07lnjF", + "item_id": null, + "name": "Book / A Wild Sheep Chase", + "description": null, + "amount": 200, + "unit_amount": 200, + "gross_amount": 200, + "tax_amount": 0, + "taxable_amount": 200, + "net_amount": 200, + "currency": "", + "type": "invoice", + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "unit": null, + "quantity": 1, + "taxes": [] + } + ], + "payment_id": null, + "status": "issued", + "expire_by": 1567103399, + "issued_at": 1566974805, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": null, + "email_status": null, + "date": 1566891149, + "terms": null, + "partial_payment": false, + "gross_amount": 600, + "tax_amount": 0, + "taxable_amount": 600, + "amount": 600, + "amount_paid": 0, + "amount_due": 600, + "currency": "", + "currency_symbol": "", + "description": "This is a test invoice.", + "notes": { + "updated-key": "An updated note." + }, + "comment": null, + "short_url": "https://rzp.io/i/K8Zg72C", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "invoice", + "group_taxes_discounts": false, + "created_at": 1566906474, + "idempotency_key": null +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the invoice. + +### Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` Indicates the type of entity. Here, it is `invoice`. + +`type` +: `string` Here, it should be `invoice`. + +`invoice_number` +: `string` Unique number you added for internal reference. The minimum character length is 1 and maximum is 40. + +`customer_id` +: `string` The unique identifier of the customer. You can create `customer_id` using the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). Alternatively, you can pass the customer object described in the below fields. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `name` + : `string` Customer's name. Alphanumeric, with period (.), apostrophe (') and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + + `email` + : `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `contact` + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + + `billing_address` + : `object` Details of the customer's billing address. + + `id` + : `string` The unique identifier generated for the customer's billing address. + + `type` + : `string` The customer address type. Here it is `billing_address`. + + `primary` + : `boolean` Defines if this is the primary address. + - `true`: It is the customer's primary address. + - `false`: It is not the customer's primary address. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `city` + : `string` The city. + + `zipcode` + : `string` The zipcode. + + `state` + : `string` The state. + + `country` + : `string` The country. + + `shipping_address` + : `object` Details of the customer's shipping address. + + `id` + : `string` The unique identifier generated for the customer's shipping address. + + `type` + : `string` The customer address type. Here it is `shipping_address`. + + `primary` + : `boolean` Defines if this is the primary address. + - `true`: It is the customer's primary address. + - `false`: It is not the customer's primary address. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `city` + : `string` The city. + + `zipcode` + : `string` The zipcode. + + `state` + : `string` The state. + + `country` + : `string` The country. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `object` Details of the line item that is billed in the invoice. Maximum of 50 line items. + + `id` + : `string` Unique identifier that is generated if a new item has been created while creating the invoice. + + `item_id` + : `string` Unique identifier of the item generated using Items API that has been billed in the invoice. + + `name` + : `string` The item's name. + + `description` + : `string` A brief description of the item. + + `amount` + : `integer` The price of the item. + + `currency` + : `string` The currency associated with the item. Default is `INR`. Know about the [list of supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `type` + : `string` Here, it is `invoice`. + + `quantity` + : `integer` The quantity of the item billed in the invoice. Defaults to `1`. + +. + + `type` + : `string` Here, it is `invoice`. + + `quantity` + : `integer` The quantity of the item billed in the invoice. Defaults to `1`. + +`payment_id` +: `string` Unique identifier of a payment made against this invoice. + +`status` +: `string` The status of the invoice. Know more about [Invoice States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md). Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` Timestamp, in Unix format, at which the invoice will expire. + +`issued_at` +: `integer` Timestamp, in Unix format, at which the invoice was issued to the customer. + +`paid_at` +: `integer` Timestamp, in Unix format, at which the payment was made. + +`cancelled_at` +: `integer` Timestamp, in Unix format, at which the invoice was cancelled. + +`expired_at` +: `integer` Timestamp, in Unix format, at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `30000`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. You must mandatorily pass this parameter if accepting international payments. If you have passed `currency` as a sub-parameter in the `line_item` object, you must ensure that the same currency is passed in both places. Know about the [list of supported international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + +. + +`description` +: `string` A brief description of the invoice. The maximum character length is 2048. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. Share this link with customers to accept payments. + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +### Errors + +The API `` provided is invalid. +* code: 400 +* description: There is a mismatch between the API credentials passed in the API call and those generated on the Dashboard. +* solution: - Ensure that the API Keys are active and entered correctly. +- There should be no whitespaces before or after the keys. + +line_items is required. +* code: 400 +* description: Items and customer details are missing. +* solution: Add items and customer details. + +Operation not allowed for Invoice in issued status. +* code: 400 +* description: You are trying to issue an invoice that is already issued. +* solution: Issue an invoice in the draft state. + +The id provided does not exist. +* code: 400 +* description: There is an error in the invoice id. It may be incorrect or invalid. +* solution: Check that you have entered a valid invoice id. diff --git a/llm-content/api/payments/invoices/item-entity.md b/llm-content/api/payments/invoices/item-entity.md new file mode 100644 index 00000000..3342db59 --- /dev/null +++ b/llm-content/api/payments/invoices/item-entity.md @@ -0,0 +1,104 @@ +--- +title: Items Entity +description: Entity parameters and sample code for Items API. +--- + +# Items Entity + +The Items entity has the following parameters: + +### Response + +```json: Entity +{ + "id": "item_JInaSLODeDUQiQ", + "active": true, + "name": "Book / English August", + "description": "An Indian story, Booker prize winner.", + "amount": 20000, + "unit_amount": 20000, + "currency": "", + "type": "invoice", + "unit": null, + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "tax_id": null, + "tax_group_id": null, + "created_at": 1649843796 +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the item. + +`active` +: `boolean` Indicates the status of the item. Possible values: + - `true` (default): Item is in the active state. + - `false`: Item is in the inactive state. + +`name` +: `string` The name of the item. + +`description` +: `string` A text description about the item. + +`amount` _mandatory_ +: `integer` The price of the item. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the amount should be charged. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`unit_amount` +: `integer` The per unit billing amount for each individual unit. + +`type` +: `string` Here, it must be `invoice`. + +`unit` +: `integer` The number of units of the item billed in the invoice. + +`tax_inclusive` +: `boolean` Indicates whether the base amount includes tax. + - `true`: The base amount includes tax. + - `false`: The base amount does not include tax. By default, the value is set to `false`. + +`hsn_code` +: `integer` The 8-digit code used to classify the product as per the Harmonised System of Nomenclature. + +`sac_code` +: `integer` The 6-digit code used to classify the service as per the Services Accounting Code. + +`tax_rate` +: `string` The percentage at which an individual or a corporation is taxed. + +`tax_id` +: `string` The identification number that gets displayed on invoices issued to the customer. + +`tax_group_id` +: `string` The identification number for the tax group. A tax group is a collection of taxes that can be applied as a single set of rules. + +`created_at` +: `integer` Unix timestamp, at which the item was created. For example, `1649843796`. diff --git a/llm-content/api/payments/invoices/resend.md b/llm-content/api/payments/invoices/resend.md new file mode 100644 index 00000000..4d4526d6 --- /dev/null +++ b/llm-content/api/payments/invoices/resend.md @@ -0,0 +1,124 @@ +--- +title: Send Notifications +description: Send notifications to your customers via SMS and Email using this endpoint. +--- + +# Send Notifications + +## Send Notifications + +Use this endpoint to send notifications with the short URL to the customer via email or SMS. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/invoices/inv_DAuFuwWYU3R9tg/notify_by/sms \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String invoiceId = "inv_DAuFuwWYU3R9tg"; + +String medium = "sms"; + +Invoice invoice = razorpay.invoices.notifyBy(invoiceId,medium); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.invoice.notify_by(invoiceId,medium) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +invoiceId = "inv_DAuFuwWYU3R9tg" + +medium = "email" + +Razorpay::Invoice.notifyBy(invoiceId,medium) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Invoice.Notify("", "", nil, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->invoice->fetch($invoiceId)->notify($medium); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.invoices.notifyBy(invoiceId,medium) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] +"); + +string invoiceId = "inv_DAweOiQ7amIUVd"; + +string medium = "sms"; + +Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); +``` + +### Response + +```json: Success +{ + "success": true +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the invoice whose link is to be sent by SMS or email. + +`medium` _mandatory_ +: `string` Possible values: + - `sms` + - `email` + +### Parameters + +`success` +: `boolean` Indicates whether the notifications were sent successfully. Possible values: + - `true`: The notifications were successfully via SMS, email or both. + - `false`: The notifications were not sent. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: There is a mismatch between the API credentials passed in the API call and those generated on the Dashboard. +* solution: - Ensure that the API Keys are active and entered correctly. +- There should be no whitespaces before or after the keys. + + +The id provided does not exist. +* code: 400 +* description: The invoice id entered is either invalid or does not belong to the requester account. +* solution: Enter a valid invoice id. + +email is not a valid communication medium. +* code: 400 +* description: There is a spelling error in “email” in the URL. +* solution: Check that the keywords are spelled correctly. diff --git a/llm-content/api/payments/invoices/update-item.md b/llm-content/api/payments/invoices/update-item.md new file mode 100644 index 00000000..8337df30 --- /dev/null +++ b/llm-content/api/payments/invoices/update-item.md @@ -0,0 +1,262 @@ +--- +title: Update an Item +description: Update an Item details using this endpoint. +--- + +# Update an Item + +## Update an Item + +Use this endpoint to update the details of an item. You can also edit the details of a created item from the Dashboard by clicking on that specific item from the list of items. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -H "Content-Type: application/json" \ + -X PATCH https://api.razorpay.com/v1/items/item_7Oy8OMV6BdEAac \ + -d '{ + "name":"Book / Ignited Minds - Updated name!", + "description":"New descirption too." + }' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String itemId = "item_7Oy8OMV6BdEAac"; + +JSONObject itemRequest = new JSONObject(); +itemRequest.put("name","Book / Ignited Minds - Updated name!"); +itemRequest.put("description","An indian story, Booker prize winner."); +itemRequest.put("amount", 20000); +itemRequest.put("currency",""); +itemRequest.put("active",true); + +Item item = razorpay.items.edit(itemId, itemRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.item.edit({ + "name": "Book / Ignited Minds - Updated name!", + "description": "New descirption too.", + "amount": 20000, + "currency": "", + "active": true +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +itemId = "item_7Oy8OMV6BdEAac" + +para_attr = { + "name": "Book / Ignited Minds - Updated name!", + "description": "New descirption too.", + "amount": 20000, + "currency": "", + "active": true +} + +Razorpay::Item.edit(itemId,para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "name": "Book / Ignited Minds - Updated name!", + "description": "New descirption too.", + "amount": 20000, + "currency": "", + "active": true, +} +body, err := client.Item.Update("", data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->Item->fetch($itemId)->edit(array("name" => "Book / Ignited Minds - Updated name!","description" => "New descirption too.","amount" => 20000,"currency" => "","active" => true +)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.Items.edit({ + "name": "Book / Ignited Minds - Updated name!", + "description": "New descirption too.", + "amount": 20000, + "currency": "", + "active": true +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +itemId = "item_JDcbIdX9xojCje" + +para_attr = { + "name": "Book / Ignited Minds - Updated name!", + "description": "New descirption too.", + "amount": 20000, + "currency": "", + "active": true +} + +Razorpay::Item.edit(itemId,para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string itemId = "item_7Oy8OMV6BdEAac"; + +Dictionary itemRequest = new Dictionary(); +itemRequest.Add("name", "Book / Ignited Minds - Updated name!"); +itemRequest.Add("description", "An indian story, Booker prize winner."); +itemRequest.Add("amount", 20000); +itemRequest.Add("currency", ""); +itemRequest.Add("active", true); + +Item payment = client.Item.Fetch(itemId).Edit(itemRequest); +``` + +### Response + +```json: Success +{ + "id": "item_7Oy8OMV6BdEAac", + "active": true, + "name": "Book / Ignited Minds - Updated name!", + "description": "New descirption too.", + "amount": 20000, + "unit_amount": 20000, + "currency": "", + "type": "invoice", + "unit": null, + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "tax_id": null, + "tax_group_id": null, + "created_at": 1649843796 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} + +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifer of the item whose details are to be updated. + +### Parameters + +`name` _optional_ +: `string` The name of the item. + +`description` _optional_ +: `string` A brief description about the item. + +`amount` _optional_ +: `integer` The price of the item in the lowest unit of currency. + +`currency` _optional_ +: `string` The currency in which the amount should be charged. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`active` _optional_ +: `boolean` Indicates the status of the item. Possible values: + - `true` (default): Item is in the active state. + - `false`: Item is in the inactive state. + +### Parameters + +`id` +: `string` The unique identifier of the item. + +`active` +: `boolean` Indicates the status of the item. Possible values: + - `true` (default): Item is in the active state. + - `false`: Item is in the inactive state. + +`name` +: `string` The name of the item. + +`description` +: `string` A text description about the item. + +`amount` +: `integer` The price of the item. + +`unit_amount` +: `integer` The per unit billing amount for each individual unit. + +`currency` +: `string` The currency in which the amount should be charged. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`type` +: `string` Here, it must be `invoice`. + +`unit` +: `integer` The number of units of the item billed in the invoice. + +`tax_inclusive` +: `boolean` Indicates whether the base amount includes tax. + - `true`: The base amount includes tax. + - `false`: The base amount does not include tax. By default, the value is set to `false`. + +`hsn_code` +: `integer` The 8-digit code used to classify the product as per the Harmonised System of Nomenclature. + +`sac_code` +: `integer` The 6-digit code used to classify the service as per the Services Accounting Code. + +`tax_rate` +: `string` The percentage at which an individual or a corporation is taxed. + +`tax_id` +: `string` The identification number that gets displayed on invoices issued to the customer. + +`tax_group_id` +: `string` The identification number for the tax group. A tax group is a collection of taxes that can be applied as a single set of rules. + +`created_at` +: `integer` Unix timestamp, at which the item was created. For example, `1649843796`. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: The API key or secret are not entered or an invalid API key is used. +* solution: Use and enter the correct API details while executing the API. + +The id provided does not exist. +* code: 400 +* description: The invoice id entered is either invalid or does not belong to the requester account. +* solution: Enter a valid invoice id. + +The amount field is required when item id is not present. +* code: 400 +* description: Only name is entered without item id or amount. +* solution: Provide either the item id or the amount with the name. + +The name field is required when item id is not present. +* code: 400 +* description: Possible reasons: - Only the amount field is entered without a name or item id. +- The amount, name or item id are not entered. + +* solution: Provide the name field of the item when passing the amount. diff --git a/llm-content/api/payments/invoices/update.md b/llm-content/api/payments/invoices/update.md new file mode 100644 index 00000000..134feb19 --- /dev/null +++ b/llm-content/api/payments/invoices/update.md @@ -0,0 +1,707 @@ +--- +title: Update an Invoice +description: Update the details of the Invoice using this endpoint. +--- + +# Update an Invoice + +## Update an Invoice + +Use this endpoint to update the details of the invoice. + +The following table displays ths updates allowed as per invoice states: + +Status | Parameter Update Allowed +--- +Draft | All parameters can be updated including the line items. You can also add new line items. +--- +Issued | You can update the following parameters: - `partial_payment` +- `receipt` +- `comment` +- `terms` +- `notes` +- `expire_by` + +--- +Cancelled | Only `notes` can be updated. +--- +Expired | Only `notes` can be updated. +--- +Partially Paid | Only `notes` can be updated. +--- +Paid | Only `notes` can be updated. + +### Request + +/invoices/:id + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X PATCH https://api.razorpay.com/v1/invoices/inv_DAtUWmR3Y5Dmxb \ +-H 'content-type : application/json' +-d '{ + "line_items": [ + { + "id": "li_DAweOizsysoJU6", + "name": "Book / English August - Updated name and quantity", + "quantity": 1 + }, + { + "name": "Book / A Wild Sheep Chase", + "amount": 200, + "currency": "", + "quantity": 1 + } + ], + "notes": { + "updated-key": "An updated note." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String invoiceId = "inv_DAtUWmR3Y5Dmxb"; + +JSONObject invoiceRequest = new JSONObject(); +List lines = new ArrayList<>(); +JSONObject lineItems = new JSONObject(); +lineItems.put("id","li_DAweOizsysoJU6"); +lineItems.put("name","Book / English August - Updated name and quantity"); +lineItems.put("quantity",1); +JSONObject lineItems1 = new JSONObject(); +lineItems1.put("name","Book / A Wild Sheep Chase"); +lineItems1.put("amount","200"); +lineItems1.put("currency",""); +lineItems1.put("quantity",1); +lines.add(lineItems); +lines.add(lineItems1); +invoiceRequest.put("line_items",lines); +JSONObject notes = new JSONObject(); +notes.put("updated-key","An updated note."); +invoiceRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.edit(invoiceId,invoiceRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.invoice.edit(invoiceId,{ + "line_items": [ + { + "id": "li_DAweOizsysoJU6", + "name": "Book / English August - Updated name and quantity", + "quantity": 1 + }, + { + "name": "Book / A Wild Sheep Chase", + "amount": 200, + "currency": "", + "quantity": 1 + } + ], + "notes": { + "updated-key": "An updated note." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +line_items := make(map[string]interface{}) +line_items["0"] = map[string]interface{}{ + "id": "li_DAweOizsysoJU6", + "name": "Book / English August - Updated name and quantity", + "quantity": 1, + } + +data:= map[string]interface{}{ + "line_items": line_items, + "notes": map[string]interface{}{ + "updated-key": "An updated note.", + }, +} +body, err := client.Invoice.Invoice.Update("", data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +invoiceId = "inv_DAtUWmR3Y5Dmxb" + +para_attr = { + "line_items": [ + { + "id": "li_DAweOizsysoJU6", + "name": "Book / English August - Updated name and quantity", + "quantity": 1 + }, + { + "name": "Book / A Wild Sheep Chase", + "amount": 200, + "currency": "", + "quantity": 1 + } + ], + "notes": { + "updated-key": "An updated note. done" + } +} + +Razorpay::Invoice.edit(invoiceId,para_attr) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->invoice->fetch($invoiceId)->edit(array('line_items' => array(array('id' => 'li_DAweOizsysoJU6','name' => 'Book / English August - Updated name and quantity','quantity' => 1),array('name' => 'Book / A Wild Sheep Chase','amount' => 200,'currency' => '','quantity' => 1)),'notes' => array('updated-key' => 'An updated note.'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.invoices.edit(invoiceId,{ + line_items: [ + { + id: "li_DAweOizsysoJU6", + name: "Book / English August - Updated name and quantity", + quantity: 1 + }, + { + name: "Book / A Wild Sheep Chase", + amount: 200, + currency: "", + quantity: 1 + } + ], + notes: { + "updated-key": "An updated note." + } +}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string invoiceId = "inv_Z6t7VFTb9xHeOs"; + +Dictionary invoiceRequest = new Dictionary(); +List> lines = new List>(); +Dictionary lineItems = new Dictionary(); +lineItems.Add("id", "li_Z6t7VFTb9xHeOs"); +lineItems.Add("name", "Book / English August - Updated name and quantity"); +lineItems.Add("quantity", 1); +Dictionary lineItems1 = new Dictionary(); +lineItems1.Add("name", "Book / A Wild Sheep Chase"); +lineItems1.Add("amount", "200"); +lineItems1.Add("currency", ""); +lineItems1.Add("quantity", 1); +lines.Add(lineItems); +lines.Add(lineItems1); +invoiceRequest.Add("line_items", lines); +Dictionary notes = new Dictionary(); +notes.Add("updated-key", "An updated note."); +invoiceRequest.Add("notes", notes); + +Invoice invoice = client.Invoice.Fetch(invoiceId).Edit(invoiceRequest); +``` + +### Response + +```json: Success +{ + "id": "inv_DAtUWmR3Y5Dmxb", + "entity": "invoice", + "receipt": "#0961", + "invoice_number": "#0961", + "customer_id": "cust_DAtUWmvpktokrT", + "customer_details": { + "id": "cust_DAtUWmvpktokrT", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": { + "id": "addr_DAtUWoxgu91obl", + "type": "billing_address", + "primary": true, + "line1": "Bakers Street", + "line2": "T.P.S Road, Vazira, Borivali", + "zipcode": "400092", + "city": "Mumbai", + "state": "Maharashtra", + "country": "in" + }, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": null, + "line_items": [ + { + "id": "li_DAweOizsysoJU6", + "item_id": null, + "name": "Book / English August - Updated name and quantity", + "description": "150 points in Quidditch", + "amount": 400, + "unit_amount": 400, + "gross_amount": 400, + "tax_amount": 0, + "taxable_amount": 400, + "net_amount": 400, + "currency": "", + "type": "invoice", + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "unit": null, + "quantity": 1, + "taxes": [] + }, + { + "id": "li_DAwjWQUo07lnjF", + "item_id": null, + "name": "Book / A Wild Sheep Chase", + "description": null, + "amount": 200, + "unit_amount": 200, + "gross_amount": 200, + "tax_amount": 0, + "taxable_amount": 200, + "net_amount": 200, + "currency": "", + "type": "invoice", + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "unit": null, + "quantity": 1, + "taxes": [] + } + ], + "payment_id": null, + "status": "draft", + "expire_by": 1567103399, + "issued_at": null, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": null, + "email_status": null, + "date": 1566891149, + "terms": null, + "partial_payment": false, + "gross_amount": 600, + "tax_amount": 0, + "taxable_amount": 600, + "amount": 600, + "amount_paid": null, + "amount_due": null, + "currency": "", + "currency_symbol": "", + "description": "This is a test invoice.", + "notes": { + "updated-key": "An updated note." + }, + "comment": null, + "short_url": null, + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "invoice", + "group_taxes_discounts": false, + "created_at": 1566906474, + "idempotency_key": null +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the invoice. + +### Parameters + +`type` +: `string` Indicates the type of entity. Here, it is `invoice`. + +`description` +: `string` A brief description of the invoice. + +`draft` +: `string` Invoice is created in `draft` state when value is set to `1`. + +`customer_id` +: `string` You can pass the `customer_id` in this field, if you are using the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). If not, you can pass the customer object described in the below fields. + +`customer` +: `object` Customer details. + + `name` _mandatory_ + : `string` Customer's name. Alphanumeric, with period (.), apostrophe (') and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + + `billing_address` + : `object` The customer's billing address. + + `line1` _mandatory_ + : `string` The first line of the customer's address. + + `line2` _optional_ + : `string` The second line of the customer's address. + + `city` _mandatory_ + : `string` The city + + `zipcode` _mandatory_ + : `string` The zipcode + + `state` _mandatory_ + : `string` The state + + `country` _mandatory_ + : `string` The country + + `shipping_address` + : `object` The customer's shipping address. + + `line1` _mandatory_ + : `string` The first line of the customer's address. + + `line2` _optional_ + : `string` The second line of the customer's address. + + `city` _mandatory_ + : `string` The city + + `zipcode` _mandatory_ + : `string` The zipcode + + `state` _mandatory_ + : `string` The state + + `country` _mandatory_ + : `string` The country + +`line_items` +: `object` Details of the line item that is billed in the invoice. Maximum of 50 line items. + + `item_id` _conditionally mandatory_ + : `string` If you are using the [Items API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/create-item.md), you may use an existing item. You can choose to override details such as name, description by passing these along with `item_id`. While the invoice will show the updated details, the existing item will not be updated. This parameter is mandatory if you are not going to use any other parameter in the array. + + `name` _conditionally mandatory_ + : `string` The item name. Mandatory if `item_id` is not provided. + + `description` _optional_ + : `string` A brief description of the item. + + `amount` _conditionally mandatory_ + : `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `30000`. Mandatory if `item_id` is not provided. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _optional_ + : `string` The currency associated with the item. Defaults to `INR`. Know about the [list of supported international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) This should match invoice currency. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `quantity` _optional_ + : `integer` The number of units of the item billed in the invoice. Defaults to `1`. + +`expire_by` +: `integer` Timestamp, in Unix format, at which the invoice will expire. + +`sms_notify` +: `boolean` Defines who handles the SMS notification. Possible values: + - `true` (default): Razorpay sends the notification to the customer. + - `false`: You send the notification to the customer. + +`email_notify` +: `boolean` Defines who handles the email notification. Possible values: + - `true` (default): Razorpay sends the notification to the customer. + - `false`: You send the notification to the customer. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`currency` +: `string` The currency associated with the invoice. You must mandatorily pass this parameter if accepting international payments. If you have passed `currency` as a sub-parameter in the `line_item` object, you must ensure that the same currency is passed in both places. Know about the [list of supported international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +### Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` Indicates the type of entity. Here, it is `invoice`. + +`type` +: `string` Here, it should be `invoice`. + +`invoice_number` +: `string` Unique number you added for internal reference. The minimum character length is 1 and maximum is 40. + +`customer_id` +: `string` The unique identifier of the customer. You can create `customer_id` using the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). Alternatively, you can pass the customer object described in the below fields. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `name` + : `string` Customer's name. Alphanumeric, with period (.), apostrophe (') and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + + `email` + : `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `contact` + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + + `billing_address` + : `object` Details of the customer's billing address. + + `id` + : `string` The unique identifier generated for the customer's billing address. + + `type` + : `string` The customer address type. Here it is `billing_address`. + + `primary` + : `boolean` Defines if this is the primary address. + - `true`: It is the customer's primary address. + - `false`: It is not the customer's primary address. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `city` + : `string` The city. + + `zipcode` + : `string` The zipcode. + + `state` + : `string` The state. + + `country` + : `string` The country. + + `shipping_address` + : `object` Details of the customer's shipping address. + + `id` + : `string` The unique identifier generated for the customer's shipping address. + + `type` + : `string` The customer address type. Here it is `shipping_address`. + + `primary` + : `boolean` Defines if this is the primary address. + - `true`: It is the customer's primary address. + - `false`: It is not the customer's primary address. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `city` + : `string` The city. + + `zipcode` + : `string` The zipcode. + + `state` + : `string` The state. + + `country` + : `string` The country. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `object` Details of the line item that is billed in the invoice. Maximum of 50 line items. + + `id` + : `string` Unique identifier that is generated if a new item has been created while creating the invoice. + + `item_id` + : `string` Unique identifier of the item generated using Items API that has been billed in the invoice. + + `name` + : `string` The item's name. + + `description` + : `string` A brief description of the item. + + `amount` + : `integer` The price of the item. + + `currency` + : `string` The currency associated with the item. Default is `INR`. Know about the [list of supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `type` + : `string` Here, it is `invoice`. + + `quantity` + : `integer` The quantity of the item billed in the invoice. Defaults to `1`. + +. + + `type` + : `string` Here, it is `invoice`. + + `quantity` + : `integer` The quantity of the item billed in the invoice. Defaults to `1`. + +`payment_id` +: `string` Unique identifier of a payment made against this invoice. + +`status` +: `string` The status of the invoice. Know more about [Invoice States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md). Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` Timestamp, in Unix format, at which the invoice will expire. + +`issued_at` +: `integer` Timestamp, in Unix format, at which the invoice was issued to the customer. + +`paid_at` +: `integer` Timestamp, in Unix format, at which the payment was made. + +`cancelled_at` +: `integer` Timestamp, in Unix format, at which the invoice was cancelled. + +`expired_at` +: `integer` Timestamp, in Unix format, at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `30000`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. You must mandatorily pass this parameter if accepting international payments. If you have passed `currency` as a sub-parameter in the `line_item` object, you must ensure that the same currency is passed in both places. Know about the [list of supported international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + +. + +`description` +: `string` A brief description of the invoice. The maximum character length is 2048. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. Share this link with customers to accept payments. + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +### Errors + +The api key provided is invalid +* code: 400 +* description: The API key or secret are not entered or an invalid API key is used. +* solution: Use and enter the correct API details while executing the API. + +customer, line_items, sms_notify, email_notify, draft, date is/are not required and should not be sent +* code: 400 +* description: The mentioned parameters are not required for updating an invoice. +* solution: Pass only the required parameters in the Update Invoice API. + +The amount field is required when item id is not present. +* code: 400 +* description: Only name is entered without item id or amount. +* solution: Provide either the item id or the amount with the name. + +The name field is required when item id is not present. +* code: 400 +* description: Possible reasons: - Only the amount field is entered without a name or item id. +- The amount, name or item id are not entered. + +* solution: Provide the name field of the item when passing the amount. diff --git a/llm-content/api/payments/payment-links.md b/llm-content/api/payments/payment-links.md new file mode 100644 index 00000000..a98d785a --- /dev/null +++ b/llm-content/api/payments/payment-links.md @@ -0,0 +1,104 @@ +--- +title: API | Payment Links +heading: Payment Links +description: Create, update, delete, cancel, fetch and send Payment Links using Razorpay APIs. +--- + +# Payment Links + +[Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md) are URLs that you can send to your customers through SMS and email to collect payments from them. Customers can click on the URL, which opens the payment request page, and complete the payment using any of the available payment methods. You can create, fetch, edit or cancel Payment Links using APIs or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#dashboard-actions). + +Fork the Razorpay Postman Public Workspace and try the Payment Links APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-a731e460-9f2d-4fa8-b149-3fc7df7983f5?ctx=documentation) + +### Related Guides + +[ About Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payment-links.md) + +### Endpoints + + - **post** `/v1/payment_links` - Create a Standard Payment Link: + Creates a Standard Payment Link. + + + - **post** `/v1/payment_links` - Create a UPI Payment Link: + Creates a UPI Payment Link. + + + - **get** `/v1/payment_links` - Fetch All Standard Payment Links: + Retrieves data of all Standard Payment Links. + + + - **get** `/v1/payment_links` - Fetch All UPI Payment Links: + Retrieves data of all UPI Payment Links. + + + - **get** `/v1/payment_links/:id` - Fetch a Standard Payment Link With ID: + Retrieves data of a Standard Payment Link with id. + + + - **get** `/v1/payment_links/:id` - Fetch a UPI Payment Link With ID: + Retrieves data of a UPI Payment Link with id. + + + - **post** `/v1/payment_links/:id/notify_by/:medium` - Send or Resend Notifications: + Sends notifications to your customers. + + + - **patch** `/v1/payment_links/:id` - Update a Standard Payment Link: + Updates the details of a Standard Payment Link. + + + - **patch** `/v1/payment_links/:id` - Update a UPI Payment Link: + Updates the details of a UPI Payment Link. + + + - **post** `/v1/payment_links/:id/cancel` - Cancel a Standard Payment Link: + Cancels a Standard Payment Link. + + + - **post** `/v1/payment_links/:id/cancel` - Cancel a UPI Payment Link: + Cancels a UPI Payment Link. + + + - **post** `/v1/payment_links` - Implement Thematic Changes on Checkout: + Makes thematic chages to your Payment Links. + + + - **post** `/v1/payment_links` - Changes Business Name: + Changes your Business name. + + + - **post** `/v1/payment_links` - Customise Payment Methods (Example 1): + Customises Payment Methods with the Options and Method Parameters. + + + - **post** `/v1/payment_links` - Customise Payment Methods (Example 2): + Customises Payment Methods with the Options and Config Parameters. + + + - **post** `/v1/payment_links` - Rename Labels in the Checkout Section: + Renames Labels in the Checkout Section. + + + - **post** `/v1/payment_links` - Rename Labels in Payment Details Section: + Renames Labels in the Payment details section. + + + - **post** `/v1/payment_links` - Offers on Payment Links: + Helps you provide discount and cashback offers on Payment Links + + + - **post** `/v1/payment_links` - Manage Reminders for Payment Links: + Helps you manage reminders on Payment Links. + + + - **post** `/v1/payment_links` - Transfer Payments Received Using Payment Links: + Helps you transfer payments received using Payment Links. + + + - **post** `/v1/payment_links` - Perform Third-Party Validation Using Payment Links: + Helps you perform Third-Party Validation using Payment Links. diff --git a/llm-content/api/payments/payment-links/cancel-standard.md b/llm-content/api/payments/payment-links/cancel-standard.md new file mode 100644 index 00000000..496ea92e --- /dev/null +++ b/llm-content/api/payments/payment-links/cancel-standard.md @@ -0,0 +1,254 @@ +--- +title: Cancel a Standard Payment Link +description: Cancel a Standard Payment Link using this endpoint. +--- + +# Cancel a Standard Payment Link + +## Cancel a Standard Payment Link + +Use this endpoint to cancel a Standard Payment Link. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payment_links/plink_ExjpAUN3gVHrPJ/cancel \ +-H 'Content-type: application/json' \ + +```php: PHP +$api = new Api($key_id, $secret); + +$api->paymentLink->fetch($paymentLinkId)->cancel(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.paymentLink.cancel(paymentLinkId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment_link.cancel(paymentLinkId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.PaymentLink.Cancel("", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +paymentLinkId = "plink_ExjpAUN3gVHrPJ" + +Razorpay::PaymentLink.cancel(paymentLinkId) + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +String PaymentLinkId = "plink_FMbhpT6nqDjDei"; + +PaymentLink paymentlink = razorpay.paymentLink.cancel(paymentLinkId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentLinkId = "plink_Z6t7VFTb9xHeOs"; + +PaymentLink paymentlink = client.PaymentLink.Fetch(paymentLinkId).Cancel(); +``` + +### Response + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the Payment Link. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +cannot cancel or expire an already paid/partially paid link +* code: 400 +* description: When a business tries to cancel/expire a Payment Link which is already paid or partially paid. +* solution: Ensure that the Payment Link is in the `created` state to cancel the Payment Link. + +cannot cancel or expire an expired link +* code: 400 +* description: When a business tries to cancel/expire a payment link which has expired or cancelled. +* solution: Ensure the Payment Link you want to cancel is in the `created` state. + +The id provided does not exist +* code: 400 +* description: The Payment Link does not belong to the requestor business, or it doesn't exist. +* solution: Ensure that the Payment Link is valid and belongs to the requestor business. + +The api \{key/secret\} provided is invalid +* code: 4xx +* description: There is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Ensure that the API Keys are active and entered correctly. Also, make sure there are no white-spaces before or after the keys. diff --git a/llm-content/api/payments/payment-links/cancel-upi.md b/llm-content/api/payments/payment-links/cancel-upi.md new file mode 100644 index 00000000..60f4a7dc --- /dev/null +++ b/llm-content/api/payments/payment-links/cancel-upi.md @@ -0,0 +1,200 @@ +--- +title: Cancel a UPI Payment Link +description: Cancel a UPI Payment Link using this endpoint. +--- + +# Cancel a UPI Payment Link + +## Cancel a UPI Payment Link + +Use this endpoint to cancel a UPI Payment Link. + +### Request + +### Response + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the Payment Link. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +cannot cancel or expire an already paid/partially paid link +* code: 400 +* description: When you try to cancel/expire a Payment Link which is already paid or partially paid. +* solution: Ensure that the Payment Link is in the `created` state to cancel the Payment Link. + +cannot cancel or expire an expired link +* code: 400 +* description: When you try to cancel/expire a payment link which has expired or cancelled. +* solution: Ensure the Payment Link you want to cancel is in the `created` state. + +The id provided does not exist +* code: 400 +* description: The Payment Link does not belong to the requestor business, or it doesn't exist. +* solution: Ensure that the Payment Link is valid and belongs to the requestor business. + +The api \{key/secret\} provided is invalid +* code: 4xx +* description: There is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Ensure that the API Keys are active and entered correctly. Also, make sure there are no white-spaces before or after the keys. diff --git a/llm-content/api/payments/payment-links/change-business-name.md b/llm-content/api/payments/payment-links/change-business-name.md new file mode 100644 index 00000000..b81e591d --- /dev/null +++ b/llm-content/api/payments/payment-links/change-business-name.md @@ -0,0 +1,592 @@ +--- +title: API | Payment Links - Change Business Name +heading: Change Business Name +description: Customise the business name appearing on the Checkout section of the Payment Link payment request page using Razorpay APIs. +--- + +# Change Business Name + +## Change Business Name + +Use this endpoint to change the business name that appears on the Checkout section of the Payment Link's payment request page. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payment_links/ \ +-H 'Content-type: application/json' \ +-d '{ + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#2234542", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "name": "Lacme Corp" + } + } +}' + +```php: PHP +$api = new Api($key_id, $secret); + +$api->paymentLink->create(array('amount'=>500, 'currency'=>'', 'accept_partial'=>true, 'first_min_partial_amount'=>100, 'description' => 'For XYZ purpose', 'customer' => array('name'=>'', 'email' => '', 'contact'=>''), 'notify'=>array('sms'=>true, 'email'=>true) ,'reminder_enable'=>true , 'options'=>array('checkout'=>array('name'=>'Lacme Corp')))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.paymentLink.create({ + amount: 1000, + currency: "", + accept_partial: true, + first_min_partial_amount: 100, + reference_id: "#2234542", + description: "Payment for policy no #23456", + customer: { + name: "", + contact: "", + email: "" + }, + notify: { + sms: true, + email: true + }, + reminder_enable: true, + options: { + checkout: { + name: "Lacme Corp" + } + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment_link.create({ + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#2234542", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "name": "Acme Corp" + } + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#2234542", + "description": "Payment for policy no #23456", + "customer": map[string]interface{}{ + "name": "", + "contact": "", + "email": "", + }, + "notify": map[string]interface{}{ + "sms": true, + "email": true, + }, + "reminder_enable": true, + "options": map[string]interface{}{ + "checkout": map[string]interface{}{ + "name": "Acme Corp", + }, + }, +} +body, err := client.PaymentLink.Create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +para_attr = { + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#2234542", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "name": "Lacme Corp" + } + } +} + +Razorpay.headers = {"Content-type" => "application/json"} + +Razorpay::PaymentLink.create(para_attr.to_json) + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +JSONObject paymentLinkRequest = new JSONObject(); +paymentLinkRequest.put("amount",1000); +paymentLinkRequest.put("currency",""); +paymentLinkRequest.put("accept_partial",true); +paymentLinkRequest.put("reference_id","#aasasw8"); +paymentLinkRequest.put("first_min_partial_amount",100); +paymentLinkRequest.put("description","Payment for policy no #23456"); +JSONObject customer = new JSONObject(); +customer.put("name",""); +customer.put("contact",""); +customer.put("email",""); +paymentLinkRequest.put("customer",customer); +JSONObject notify = new JSONObject(); +notify.put("sms",true); +notify.put("email",true); +paymentLinkRequest.put("notify",notify); +paymentLinkRequest.put("reminder_enable",true); + +JSONObject options = new JSONObject(); +JSONObject notes = new JSONObject(); +notes.put("branch","Acme Corp Bangalore North"); +notes.put("name",""); + +JSONObject checkout = new JSONObject(); +checkout.put("name","Lacme Corp"); +options.put("checkout",checkout); +paymentLinkRequest.put("options",options); + +PaymentLink payment = razorpay.paymentLink.create(paymentLinkRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentLinkRequest = new Dictionary(); +paymentLinkRequest.Add("amount", 1000); +paymentLinkRequest.Add("currency", ""); +paymentLinkRequest.Add("accept_partial", true); +paymentLinkRequest.Add("reference_id", "#aasasw8"); +paymentLinkRequest.Add("first_min_partial_amount", 100); +paymentLinkRequest.Add("description", "Payment for policy no #23456"); +Dictionary customer = new Dictionary(); +customer.Add("contact", "+919999999999"); +customer.Add("name", ""); +customer.Add("email", ""); +paymentLinkRequest.Add("customer", customer); +Dictionary notify = new Dictionary(); +notify.Add("sms", true); +notify.Add("email", true); +paymentLinkRequest.Add("notify", notify); +paymentLinkRequest.Add("reminder_enable", true); + +Dictionary options = new Dictionary(); +Dictionary notes = new Dictionary(); +notes.Add("branch", "Acme Corp Bangalore North"); +notes.Add("name", ""); + +Dictionary checkout = new Dictionary(); +checkout.Add("name", "Lacme Corp"); +options.Add("checkout", checkout); +paymentLinkRequest.Add("options", options); + +PaymentLink paymentlink = client.PaymentLink.Create(paymentLinkRequest); +``` + +### Response + +```json: Success +{ + "accept_partial": true, + "amount": 1000, + "amount_paid": 0, + "callback_method": "", + "callback_url": "", + "cancelled_at": 0, + "created_at": 1596187657, + "currency": "", + "customer": { + "contact": "", + "email": "", + "name": "" + }, + "description": "Payment for policy no #23456", + "expire_by": 0, + "expired_at": 0, + "first_min_partial_amount": 100, + "id": "plink_FL3M2gJFs1Jkma", + "notes": null, + "notify": { + "email": true, + "sms": true + }, + "payments": null, + "reference_id": "#2234542", + "reminder_enable": true, + "reminders": [], + "short_url": "https://rzp.io/i/at2OOsR", + "source": "", + "source_id": "", + "status": "created", + "updated_at": 1596187657, + "user_id": "" +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`amount` _mandatory_ +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _optional_ +: `string` A three-letter ISO code for the currency in which you want to accept the payment. For example, INR. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +. For example, if an amount of is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. Must be passed along with `accept_partial` parameter. + +`upi_link` _mandatory for creating UPI Payment Link_ +: `boolean` Must be set to `true` for creating UPI Payment Link. If the `upi_link` parameter is not passed or passed with value as false, a Standard Payment Link will be created. Possible values: + - `true`: Creates a UPI Payment Link. + - `false`: Creates a Standard Payment Link. + + +`description` _optional_ +: `string` A brief description of the Payment Link. The maximum character limit supported is 2048. + +`reference_id` _optional_ +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`customer` _optional_ +: `json object` Customer details + + `name` _optional_ + : `string` The customer's name. + + `email` _optional_ + : `string` The customer's email address. + + `contact` _optional_ + : `string` The customer's phone number. + +`expire_by` _optional_ +: `integer` Timestamp, in Unix, at which the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`notify` _optional_ +: `array` Defines who handles Payment Link notification. + + `sms` _optional_ + : `boolean` Defines who handles the SMS notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + + `email` _optional_ + : `boolean` Defines who handles the email notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Payment Link for Groceries.”`. + +`callback_url` _optional_ +: `string` If specified, adds a redirect URL to the Payment Link. Once customers completes the payment, they are redirected to the specified URL. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> If the `callback_url` is passed, it must be passed in the correct format. That is, it should contain a URL. +> +> + +`callback_method` _conditionally mandatory_ +: `string` If `callback_url` parameter is passed, callback_method must be passed with the value `get`. + +`reminder_enable` _optional_ +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`options` +: `array` Option to customise the business name. Parent parameter under which the `checkout` child parameter must be passed. + + `checkout` _mandatory_ + : `array` The parameter for the checkout section. `name` and `description` are its children. + + `name` _optional_ + : `string` Used to change the business name that appears on the Checkout section of the Payment Link's payment request page. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +The api \{key/secret\} provided is invalid +* code: 4xx +* description: There is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure that: - The API Keys are active and entered correctly. +- There are no white-spaces before or after the keys. + +The \{input field\} is required +* code: 4xx +* description: A mandatory field is empty. +* solution: Ensure all mandatory fields and values are present. + +wrong input fields sent. +* code: 400 +* description: When wrong input fields are sent during Payment Link creation. +* solution: Ensure that the input fields are added correctly. Refer to these [request parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#request-parameters) on how to add correct input fields. + +payment link creation with reference ID already attempted +* code: 400 +* description: An existing reference id has been passed. +* solution: Ensure that a unique reference id is used for all Payment Links. + +timestamp must be atleast 15 minutes in future +* code: 400 +* description: The epoch time passed is less than 15 minutes from the current time. +* solution: The `close_by` time should be more than 15 minutes from the current time. + +Invalid access: Cannot create a payment link in live mode, as live mode is disabled for merchant. +* code: 400 +* description: Occurs when you try to create a Payment Link in Live mode, but live mode is disabled for you +* solution: Raise a request to our [support team](https://razorpay.com/support/) to get live mode enabled for you. + +Invalid access: Cannot create a payment link, as Merchant is Suspended. +* code: 400 +* description: Occurs when you try to create a Payment Link when you have been been suspended. +* solution: Raise a request to our [support team](https://razorpay.com/support/) to be reinstated. + +value: the length must not be greater than 255. +* code: 400 +* description: When the notes length is greater than 255 characters during Payment Link creation. +* solution: Please create a payment link with notes values less than 255 characters. diff --git a/llm-content/api/payments/payment-links/checkout-theme.md b/llm-content/api/payments/payment-links/checkout-theme.md new file mode 100644 index 00000000..872251e5 --- /dev/null +++ b/llm-content/api/payments/payment-links/checkout-theme.md @@ -0,0 +1,611 @@ +--- +title: API | Payment Links - Checkout Theme +heading: Implement Thematic Changes in Payment Links Checkout Section +description: Customise the Checkout UI in the Payment Links payment request page using Razorpay APIs. Hide the top bar and prevent customers from choosing a different payment method. +--- + +# Implement Thematic Changes in Payment Links Checkout Section + +## Implement Thematic Changes in Payment Links Checkout Section + +Use this endpoint to modify the top bar theme element of the Checkout UI on the payment request page. This restricts customers from navigating to the initial screen of Checkout and selecting a different payment method. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payment_links/ \ +-H 'Content-type: application/json' \ +-d '{ + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#423212", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "theme": { + "hide_topbar": true + } + } + } +}' + +```php: PHP +$api = new Api($key_id, $secret); + +$api->paymentLink->create(array('amount'=>500, 'currency'=>'', 'accept_partial'=>true, 'first_min_partial_amount'=>100, 'description' => 'For XYZ purpose', 'customer' => array('name'=>'', 'email' => '', 'contact'=>''), 'notify'=>array('sms'=>true, 'email'=>true) ,'reminder_enable'=>true , 'options'=>array('checkout'=>array('theme'=>array('hide_topbar'=>'true'))))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.paymentLink.create({ + amount: 1000, + currency: "", + accept_partial: true, + first_min_partial_amount: 100, + reference_id: "#423212", + description: "Payment for policy no #23456", + customer: { + name: "", + contact: "", + email: "" + }, + notify: { + sms: true, + email: true + }, + reminder_enable: true, + options: { + checkout: { + theme: { + hide_topbar: true + } + } + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment_link.create({ + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#423212", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "theme": { + "hide_topbar": true + } + } + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#423212", + "description": "Payment for policy no #23456", + "customer": map[string]interface{}{ + "name": "", + "contact": "", + "email": "", + }, + "notify": map[string]interface{}{ + "sms": true, + "email": true, + }, + "reminder_enable": true, + "options": map[string]interface{}{ + "checkout": map[string]interface{}{ + "theme": map[string]interface{}{ + "hide_topbar": true, + }, + }, + }, +} +body, err := client.PaymentLink.Create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +para_attr = { + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#423212", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "theme": { + "hide_topbar": true + } + } + } +} + +Razorpay.headers = {"Content-type" => "application/json"} + +Razorpay::PaymentLink.create(para_attr.to_json) + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +JSONObject paymentLinkRequest = new JSONObject(); +paymentLinkRequest.put("amount",1000); +paymentLinkRequest.put("currency",""); +paymentLinkRequest.put("accept_partial",true); +paymentLinkRequest.put("reference_id","#aasasw8"); +paymentLinkRequest.put("first_min_partial_amount",100); +paymentLinkRequest.put("description","Payment for policy no #23456"); +JSONObject customer = new JSONObject(); +customer.put("name",""); +customer.put("contact",""); +customer.put("email",""); +paymentLinkRequest.put("customer",customer); +JSONObject notify = new JSONObject(); +notify.put("sms",true); +notify.put("email",true); +paymentLinkRequest.put("notify",notify); +paymentLinkRequest.put("reminder_enable",true); + +JSONObject options = new JSONObject(); +JSONObject notes = new JSONObject(); +notes.put("branch","Acme Corp Bangalore North"); +notes.put("name","Bhairav Kumar"); + +JSONObject theme = new JSONObject(); +theme.put("hide_topbar",true); +JSONObject checkout = new JSONObject(); +checkout.put("theme",theme); +options.put("checkout",checkout); +paymentLinkRequest.put("options",options); + +PaymentLink payment = razorpay.paymentLink.create(paymentLinkRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentLinkRequest = new Dictionary(); +paymentLinkRequest.Add("amount", 1000); +paymentLinkRequest.Add("currency", ""); +paymentLinkRequest.Add("accept_partial", true); +paymentLinkRequest.Add("reference_id", "#aasasw8"); +paymentLinkRequest.Add("first_min_partial_amount", 100); +paymentLinkRequest.Add("description", "Payment for policy no #23456"); +Dictionary customer = new Dictionary(); +customer.Add("contact", "+919999999999"); +customer.Add("name", ""); +customer.Add("email", ""); +paymentLinkRequest.Add("customer", customer); +Dictionary notify = new Dictionary(); +notify.Add("sms", true); +notify.Add("email", true); +paymentLinkRequest.Add("notify", notify); +paymentLinkRequest.Add("reminder_enable", true); + +Dictionary options = new Dictionary(); +Dictionary notes = new Dictionary(); +notes.Add("branch", "Acme Corp Bangalore North"); +notes.Add("name", "Bhairav Kumar"); + +Dictionary theme = new Dictionary(); +theme.Add("hide_topbar",true); +Dictionary checkout = new Dictionary(); +checkout.Add("theme",theme); +options.Add("checkout",checkout); +paymentLinkRequest.Add("options",options); + +PaymentLink paymentlink = client.PaymentLink.Create(paymentLinkRequest); +``` + +### Response + +```json: Success +{ + "accept_partial": true, + "amount": 1000, + "amount_paid": 0, + "callback_method": "", + "callback_url": "", + "cancelled_at": 0, + "created_at": 1596187814, + "currency": "", + "customer": { + "contact": "", + "email": "", + "name": "" + }, + "description": "Payment for policy no #23456", + "expire_by": 0, + "expired_at": 0, + "first_min_partial_amount": 100, + "id": "plink_FL3Oncr7XxXFf6", + "notes": null, + "notify": { + "email": true, + "sms": true + }, + "payments": null, + "reference_id": "#423212", + "reminder_enable": true, + "reminders": [], + "short_url": "https://rzp.io/i/j45EmLE", + "source": "", + "source_id": "", + "status": "created", + "updated_at": 1596187814, + "user_id": "" +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`amount` _mandatory_ +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _optional_ +: `string` A three-letter ISO code for the currency in which you want to accept the payment. For example, INR. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +. For example, if an amount of is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. Must be passed along with `accept_partial` parameter. + +`upi_link` _mandatory for creating UPI Payment Link_ +: `boolean` Must be set to `true` for creating UPI Payment Link. If the `upi_link` parameter is not passed or passed with value as false, a Standard Payment Link will be created. Possible values: + - `true`: Creates a UPI Payment Link. + - `false`: Creates a Standard Payment Link. + + +`description` _optional_ +: `string` A brief description of the Payment Link. The maximum character limit supported is 2048. + +`reference_id` _optional_ +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`customer` _optional_ +: `json object` Customer details + + `name` _optional_ + : `string` The customer's name. + + `email` _optional_ + : `string` The customer's email address. + + `contact` _optional_ + : `string` The customer's phone number. + +`expire_by` _optional_ +: `integer` Timestamp, in Unix, at which the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`notify` _optional_ +: `array` Defines who handles Payment Link notification. + + `sms` _optional_ + : `boolean` Defines who handles the SMS notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + + `email` _optional_ + : `boolean` Defines who handles the email notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Payment Link for Groceries.”`. + +`callback_url` _optional_ +: `string` If specified, adds a redirect URL to the Payment Link. Once customers completes the payment, they are redirected to the specified URL. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> If the `callback_url` is passed, it must be passed in the correct format. That is, it should contain a URL. +> +> + +`callback_method` _conditionally mandatory_ +: `string` If `callback_url` parameter is passed, callback_method must be passed with the value `get`. + +`reminder_enable` _optional_ +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`options` +: `array` Options to show or hide the top bar. Parent parameter under which the `checkout` and `theme` child parameters must be passed. + + `checkout` _mandatory_ + : `array` The parameter for the Checkout section. + + `theme` + : `array` Modifies the thematic elements of Checkout. + + `hide_topbar` _mandatory_ + : `boolean` Used to display or hide the top bar on the Checkout. This bar shows the selected payment method, phone number and gives the customer the option to navigate to the initial Checkout screen and change the payment method. Possible values are: + - `true`: Hides the top bar. + - `false` (default): Displays the top bar. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +The api \{key/secret\} provided is invalid +* code: 4xx +* description: There is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure that: - The API Keys are active and entered correctly. +- There are no white-spaces before or after the keys. + +The \{input field\} is required +* code: 4xx +* description: A mandatory field is empty. +* solution: Ensure all mandatory fields and values are present. + +wrong input fields sent. +* code: 400 +* description: When wrong input fields are sent during Payment Link creation. +* solution: Ensure that the input fields are added correctly. Refer to these [request parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#request-parameters) on how to add correct input fields. + +payment link creation with reference ID already attempted +* code: 400 +* description: An existing reference id has been passed. +* solution: Ensure that a unique reference id is used for all Payment Links. + +timestamp must be atleast 15 minutes in future +* code: 400 +* description: The epoch time passed is less than 15 minutes from the current time. +* solution: The `close_by` time should be more than 15 minutes from the current time. + +Invalid access: Cannot create a payment link in live mode, as live mode is disabled for merchant. +* code: 400 +* description: Occurs when you try to create a Payment Link in Live mode, but live mode is disabled for you +* solution: Raise a request to our [support team](https://razorpay.com/support/) to get live mode enabled for you. + +Invalid access: Cannot create a payment link, as Merchant is Suspended. +* code: 400 +* description: Occurs when you try to create a Payment Link when you have been suspended. +* solution: Raise a request to our [support team](https://razorpay.com/support/) to be reinstated. + +value: the length must not be greater than 255. +* code: 400 +* description: When the notes length is greater than 255 characters during Payment Link creation. +* solution: Please create a payment link with notes values less than 255 characters. diff --git a/llm-content/api/payments/payment-links/create-standard.md b/llm-content/api/payments/payment-links/create-standard.md new file mode 100644 index 00000000..1b910c8f --- /dev/null +++ b/llm-content/api/payments/payment-links/create-standard.md @@ -0,0 +1,554 @@ +--- +title: Create a Standard Payment Link +description: Create a Standard Payment Link using this endpoint. +--- + +# Create a Standard Payment Link + +## Create a Standard Payment Link + +Use this endpoint to create a Payment Link using basic details such as amount, expiry date, reference id, description, customer details and so on. + +- **Basic Payment Links** + +These are regular Payment Links, which are not customised. + +- **Customised Payment Links** + +You can [customise Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/customise.md) as per your business requirements. + +> **INFO** +> +> +> **Handy Tips** +> +> As per Razorpay's updated security policy, even if the customer's email address and phone number are provided while creating the Payment Link, these details are not auto-populated on the Checkout section of the Payment Link hosted page. The customer will have to enter these details manually while making the payment. +> + +- After successful completion of the payment, customers can be redirected to a specific URL using the `callback_url` and `callback_method` parameters. Know more about how to use [these paramaters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#using-callback-url-parameter). + +- Verify the `razorpay_signature` parameter to validate that it is authentic and sent from Razorpay servers. Know more about how to [Verify Signature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/apis.md#verify-signature). + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payment_links/ \ +-H 'Content-type: application/json' \ +-d '{ + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "expire_by": 1691097057, + "reference_id": "TS1989", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "notes": { + "policy_name": "Life Insurance Policy" + }, + "callback_url": "https://example-callback-url.com/", + "callback_method": "get" +}' + +```php: PHP +$api = new Api($key_id, $secret); + +$api->paymentLink->create(array('amount'=>500, 'currency'=>'', 'accept_partial'=>true, +'first_min_partial_amount'=>100, 'description' => 'For XYZ purpose', 'customer' => array('name'=>'', +'email' => '', 'contact'=>''), 'notify'=>array('sms'=>true, 'email'=>true) , +'reminder_enable'=>true ,'notes'=>array('policy_name'=> 'Life Insurance Policy'),'callback_url' => 'https://example-callback-url.com/', +'callback_method'=>'get')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.paymentLink.create({ + amount: 500, + currency: "", + accept_partial: true, + first_min_partial_amount: 100, + description: "For XYZ purpose", + customer: { + name: "", + email: "", + contact: "" + }, + notify: { + sms: true, + email: true + }, + reminder_enable: true, + notes: { + policy_name: "Life Insurance Policy" + }, + callback_url: "https://example-callback-url.com/", + callback_method: "get" +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment_link.create({ + "amount": 500, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "description": "For XYZ purpose", + "customer": { + "name": "", + "email": "", + "contact": "" + }, + "notify": { + "sms": True, + "email": True + }, + "reminder_enable": true, + "notes": { + "policy_name": "Life Insurance Policy" + }, + "callback_url": "https://example-callback-url.com/", + "callback_method": "get" +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "expire_by": 1691097057, + "reference_id": "TS1989", + "description": "Payment for policy no #23456", + "customer": map[string]interface{}{ + "name": "", + "contact": "", + "email": "", + }, + "notify": map[string]interface{}{ + "sms": true, + "email": true, + }, + "reminder_enable": true, + "notes": map[string]interface{}{ + "policy_name": "Life Insurance Policy", + }, + "callback_url": "https://example-callback-url.com/", + "callback_method": "get", +} +body, err := client.PaymentLink.Create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') +Razorpay.headers = {"Content-type" => "application/json"} + +para_attr = { + "amount": 500, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "description": "For XYZ purpose", + "customer": { + "name": "", + "email": "", + "contact": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "notes": { + "policy_name": "Life Insurance Policy" + }, + "callback_url": "https://example-callback-url.com/", + "callback_method": "get" +} + +Razorpay::PaymentLink.create(para_attr.to_json) + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +JSONObject paymentLinkRequest = new JSONObject(); +paymentLinkRequest.put("amount",1000); +paymentLinkRequest.put("currency",""); +paymentLinkRequest.put("accept_partial",true); +paymentLinkRequest.put("first_min_partial_amount",100); +paymentLinkRequest.put("expire_by",1691097057); +paymentLinkRequest.put("reference_id","TS1989"); +paymentLinkRequest.put("description","Payment for policy no #23456"); +JSONObject customer = new JSONObject(); +customer.put("name",""); +customer.put("contact",""); +customer.put("email",""); +paymentLinkRequest.put("customer",customer); +JSONObject notify = new JSONObject(); +notify.put("sms",true); +notify.put("email",true); +paymentLinkRequest.put("notify",notify); +paymentLinkRequest.put("reminder_enable",true); +JSONObject notes = new JSONObject(); +notes.put("policy_name","Life Insurance Policy"); +paymentLinkRequest.put("notes",notes); +paymentLinkRequest.put("callback_url","https://example-callback-url.com/"); +paymentLinkRequest.put("callback_method","get"); + +PaymentLink payment = razorpay.paymentLink.create(paymentLinkRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentLinkRequest = new Dictionary(); +paymentLinkRequest.Add("amount", 1000); +paymentLinkRequest.Add("currency", ""); +paymentLinkRequest.Add("accept_partial", true); +paymentLinkRequest.Add("first_min_partial_amount", 100); +paymentLinkRequest.Add("expire_by", 1691097057); +paymentLinkRequest.Add("reference_id", "TS1989"); +paymentLinkRequest.Add("description", "Payment for policy no #23456"); +Dictionary customer = new Dictionary(); +customer.Add("contact", ""); +customer.Add("name", ""); +customer.Add("email", ""); +paymentLinkRequest.Add("customer", customer); +Dictionary notify = new Dictionary(); +notify.Add("sms", true); +notify.Add("email", true); +paymentLinkRequest.Add("reminder_enable", true); +Dictionary notes = new Dictionary(); +notes.Add("policy_name", "Life Insurance Policy"); +paymentLinkRequest.Add("notes", notes); +paymentLinkRequest.Add("callback_url", "https://example-callback-url.com/"); +paymentLinkRequest.Add("callback_method", "get"); + +PaymentLink paymentlink = client.PaymentLink.Create(paymentLinkRequest); +``` + +### Response + +### Parameters + +`amount` _mandatory_ +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _optional_ +: `string` A three-letter ISO code for the currency in which you want to accept the payment. For example, INR. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +. For example, if an amount of is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. Must be passed along with `accept_partial` parameter. + +`upi_link` _mandatory for creating UPI Payment Link_ +: `boolean` Must be set to `true` for creating UPI Payment Link. If the `upi_link` parameter is not passed or passed with value as false, a Standard Payment Link will be created. Possible values: + - `true`: Creates a UPI Payment Link. + - `false`: Creates a Standard Payment Link. + + +`description` _optional_ +: `string` A brief description of the Payment Link. The maximum character limit supported is 2048. + +`reference_id` _optional_ +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`customer` _optional_ +: `json object` Customer details + + `name` _optional_ + : `string` The customer's name. + + `email` _optional_ + : `string` The customer's email address. + + `contact` _optional_ + : `string` The customer's phone number. + +`expire_by` _optional_ +: `integer` Timestamp, in Unix, at which the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`notify` _optional_ +: `array` Defines who handles Payment Link notification. + + `sms` _optional_ + : `boolean` Defines who handles the SMS notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + + `email` _optional_ + : `boolean` Defines who handles the email notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Payment Link for Groceries.”`. + +`callback_url` _optional_ +: `string` If specified, adds a redirect URL to the Payment Link. Once customers completes the payment, they are redirected to the specified URL. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> If the `callback_url` is passed, it must be passed in the correct format. That is, it should contain a URL. +> +> + +`callback_method` _conditionally mandatory_ +: `string` If `callback_url` parameter is passed, callback_method must be passed with the value `get`. + +`reminder_enable` _optional_ +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +The \{input field\} is required +* code: 4xx +* description: A mandatory field is empty. +* solution: Ensure all mandatory fields and values are present. + +wrong input fields sent. +* code: 400 +* description: When wrong input fields are sent during Payment Link creation. +* solution: Ensure that the input fields are added correctly. Refer to these [request parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#request-parameters) on how to add correct input fields. + +payment link creation with reference ID already attempted +* code: 400 +* description: An existing reference id has been passed. +* solution: Ensure that a unique reference id is used for all Payment Links. + +UPI Payment Links is not supported in Test Mode. Please experience the product in Live Mode. +* code: 400 +* description: The UPI link parameter has been passed with the Test API keys. +* solution: Ensure that you use [Live API keys](/api/authentication#live-mode-api-keys) while passing UPI links. + +upi is currently supported only in indian currency +* code: 400 +* description: Occurs when you try to create a UPI Payment Link using an international currency. +* solution: Ensure that you create a UPI payment link only in indian currency. + +partial payment not supported in upi link +* code: 400 +* description: Occurs when you try to create a UPI Payment Link with partial payments enabled. +* solution: Please do not enable partial payments for UPI Payment Links. + +timestamp must be atleast 15 minutes in future +* code: 400 +* description: The epoch time passed is less than 15 minutes from the current time. +* solution: The `close_by` time should be more than 15 minutes from the current time. + +Invalid access: Cannot create a payment link in live mode, as live mode is disabled for merchant. +* code: 400 +* description: Occurs when you try to create a Payment Link in Live mode, but live mode is disabled for you +* solution: Raise a request to our [support team](https://razorpay.com/support/) to get live mode enabled for you. + +Invalid access: Cannot create a payment link, as Merchant is Suspended. +* code: 400 +* description: Occurs when you try to create a Payment Link when you have been been suspended. +* solution: Raise a request to our [support team](https://razorpay.com/support/) to be reinstated. + +value: the length must not be greater than 255. +* code: 400 +* description: When the notes length is greater than 255 characters during Payment Link creation. +* solution: Please create a payment link with notes values less than 255 characters. diff --git a/llm-content/api/payments/payment-links/create-upi.md b/llm-content/api/payments/payment-links/create-upi.md new file mode 100644 index 00000000..26e0284e --- /dev/null +++ b/llm-content/api/payments/payment-links/create-upi.md @@ -0,0 +1,341 @@ +--- +title: Create a UPI Payment Link +description: Create a UPI Payment Link using this endpoint. +--- + +# Create a UPI Payment Link + +## Create a UPI Payment Link + +Use this endpoint to create a UPI Payment Link using basic details such as amount, expiry date, reference id, description, customer details and so on. + +- **Basic Payment Links** + +These are regular Payment Links, which are not customised. + +- **Customised Payment Links** + +You can [customise Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/customise.md) as per your business requirements. + +> **INFO** +> +> +> **Handy Tips** +> +> As per Razorpay's updated security policy, even if the customer's email address and phone number are provided while creating the Payment Link, these details are not auto-populated on the Checkout section of the Payment Link hosted page. The customer will have to enter these details manually while making the payment. +> + +- After successful completion of the payment, customers can be redirected to a specific URL using the `callback_url` and `callback_method` parameters. Know more about how to use [these paramaters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#using-callback-url-parameter). + +- Verify the `razorpay_signature` parameter to validate that it is authentic and sent from Razorpay servers. Know more about how to [Verify Signature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#verify-signature). + +### Request + +### Response + +### Parameters + +`amount` _mandatory_ +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _optional_ +: `string` A three-letter ISO code for the currency in which you want to accept the payment. For example, INR. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +. For example, if an amount of is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. Must be passed along with `accept_partial` parameter. + +`upi_link` _mandatory for creating UPI Payment Link_ +: `boolean` Must be set to `true` for creating UPI Payment Link. If the `upi_link` parameter is not passed or passed with value as false, a Standard Payment Link will be created. Possible values: + - `true`: Creates a UPI Payment Link. + - `false`: Creates a Standard Payment Link. + + +`description` _optional_ +: `string` A brief description of the Payment Link. The maximum character limit supported is 2048. + +`reference_id` _optional_ +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`customer` _optional_ +: `json object` Customer details + + `name` _optional_ + : `string` The customer's name. + + `email` _optional_ + : `string` The customer's email address. + + `contact` _optional_ + : `string` The customer's phone number. + +`expire_by` _optional_ +: `integer` Timestamp, in Unix, at which the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`notify` _optional_ +: `array` Defines who handles Payment Link notification. + + `sms` _optional_ + : `boolean` Defines who handles the SMS notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + + `email` _optional_ + : `boolean` Defines who handles the email notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Payment Link for Groceries.”`. + +`callback_url` _optional_ +: `string` If specified, adds a redirect URL to the Payment Link. Once customers completes the payment, they are redirected to the specified URL. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> If the `callback_url` is passed, it must be passed in the correct format. That is, it should contain a URL. +> +> + +`callback_method` _conditionally mandatory_ +: `string` If `callback_url` parameter is passed, callback_method must be passed with the value `get`. + +`reminder_enable` _optional_ +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +The \{input field\} is required +* code: 4xx +* description: A mandatory field is empty. +* solution: Ensure all mandatory fields and values are present. + +wrong input fields sent. +* code: 400 +* description: When wrong input fields are sent during Payment Link creation. +* solution: Ensure that the input fields are added correctly. Refer to these [request parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#request-parameters) on how to add correct input fields. + +payment link creation with reference ID already attempted +* code: 400 +* description: An existing reference id has been passed. +* solution: Ensure that a unique reference id is used for all Payment Links. + +UPI Payment Links is not supported in Test Mode. Please experience the product in Live Mode. +* code: 400 +* description: The UPI link parameter has been passed with the Test API keys. +* solution: Ensure that you use [Live API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) while passing UPI links. + +upi is currently supported only in indian currency +* code: 400 +* description: Occurs when you try to create a UPI Payment Link using an international currency. +* solution: Ensure that you create a UPI payment link only in indian currency. + +partial payment not supported in upi link +* code: 400 +* description: Occurs when you try to create a UPI Payment Link with partial payments enabled. +* solution: Please do not enable partial payments for UPI Payment Links. + +timestamp must be atleast 15 minutes in future +* code: 400 +* description: The epoch time passed is less than 15 minutes from the current time. +* solution: The `close_by` time should be more than 15 minutes from the current time. + +Invalid access: Cannot create a payment link in live mode, as live mode is disabled for merchant. +* code: 400 +* description: Occurs when you try to create a Payment Link in Live mode, but live mode is disabled for you +* solution: Raise a request to our [support team](https://razorpay.com/support/) to get live mode enabled for you. + +Invalid access: Cannot create a payment link, as Merchant is Suspended. +* code: 400 +* description: Occurs when you try to create a Payment Link when you have been been suspended. +* solution: Raise a request to our [support team](https://razorpay.com/support/) to be reinstated. + +value: the length must not be greater than 255. +* code: 400 +* description: When the notes length is greater than 255 characters during Payment Link creation. +* solution: Please create a payment link with notes values less than 255 characters. diff --git a/llm-content/api/payments/payment-links/customise-options-config.md b/llm-content/api/payments/payment-links/customise-options-config.md new file mode 100644 index 00000000..b54d8c66 --- /dev/null +++ b/llm-content/api/payments/payment-links/customise-options-config.md @@ -0,0 +1,1112 @@ +--- +title: Customise Payment Methods - Options and Config Parameters +description: Customise the payment methods available to customers while using Payment Links using Razorpay APIs. +--- + +# Customise Payment Methods - Options and Config Parameters + +## Customise Payment Methods - Options and Config Parameters + +Use this endpoint to configure the payment methods of your choice on the Checkout section of the Payment Links to provide a highly personalised experience for your customers. + +- You can use the `options` and `config` parameters for greater control over display of specific payment methods or instruments on the Checkout section of Payment Link. + +- For example, you can remove a certain bank from Netbanking or highlight a specific wallet. + +- These parameters must be passed along with the `options` and `checkout` parameters mentioned in the Request Parameters section below, along with the [Create Payment Link API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#create-payment-link) parameters. + +## Use Cases + +Depending on the use cases that you might have, Razorpay allows you to create configuration of the payment methods: + + +### Highlighting certain payment instruments on the Checkout + + For example, Google Pay could be displayed outside the UPI block as a separate payment method. HDFC Netbanking could come out of the Netbanking container as a separate payment method. + + + +### Restricting a particular card or banking network, issuer, BIN and card type, different properties of the card, to accept payments. + + For example, you can choose to accept payments only from **HDFC Visa Debit cards** on the Checkout. + + + +### Removing a certain payment method or instrument + + For example, OlaMoney can be removed as a payment method from wallets. The entire Netbanking block or a certain bank in Netbanking can be removed from the Checkout. + + + +### Reordering of payment methods on the Checkout + + You can choose to arrange UPI as the first section instead of Cards on the Checkout. Within the UPI block, you can again order the PSPs, according to your need. + + + +### Grouping of payment instruments + + For example, you can choose to group Netbanking and UPI payment methods of a bank as a block that will be labelled as Pay via Bank on the Checkout. + + +### Request + +```curl: Curl + +Use this API endpoint for HDFC Netbanking. + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payment_links/ \ +-H 'Content-type: application/json' \ +-d '{ + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#21132", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "config": { + "display": { + "blocks": { + "banks": { + "name": "Pay using HDFC", + "instruments": [ + { + "method": "netbanking", + "banks": [ + "HDFC" + ] + } + ] + } + }, + "sequence": [ + "block.banks" + ], + "preferences": { + "show_default_blocks": false + } + } + } + } + } +}' + +Use this API endpoint for Reordered Payment Methods. + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payment_links/ \ +-H 'Content-type: application/json' \ +-d '{ + "amount": 1000, + "currency": "", + "reference_id": "TSsd3ty1e99uu869", + "description": "Payment for policy no #23y56", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "options": { + "checkout": { + "config": { + "display": { + "blocks": { + "banks": { + "name": "All Payment Methods", + "instruments": [ + { + "method": "upi" + }, + { + "method": "netbanking" + }, + { + "method": "card", + "iins": [ + "43558" + ] + }, + { + "method": "wallet" + } + ] + } + }, + "sequence": [ + "block.banks" + ], + "preferences": { + "show_default_blocks": false + } + } + } + } + } +}' + +```javascript: Node.js + +Use this API endpoint for HDFC Netbanking. + +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.paymentLink.create({ + "amount": 1000, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#21132", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "config": { + "display": { + "blocks": { + "banks": { + "name": "Pay using HDFC", + "instruments": [ + { + "method": "netbanking", + "banks": [ + "HDFC" + ] + } + ] + } + }, + "sequence": [ + "block.banks" + ], + "preferences": { + "show_default_blocks": false + } + } + } + } + } +}) + +Use this API endpoint for Reordered Payment Methods. + +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.paymentLink.create({ + "amount": 1000, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#21132", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "config": { + "display": { + "blocks": { + "banks": { + "name": "All Payment Methods", + "instruments": [ + { + "method": "upi" + }, + { + "method": "netbanking" + }, + { + "method": "card" + }, + { + "method": "wallet" + } + ] + } + }, + "sequence": [ + "block.banks" + ], + "preferences": { + "show_default_blocks": false + } + } + } + } + } +}) + +```php: PHP + +Use this API endpoint for HDFC Netbanking. + +$api = new Api($key_id, $secret); + +$api->paymentLink->create(array('amount'=>1000,'currency'=>'INR','accept_partial'=>true,'first_min_partial_amount'=>100,'reference_id'=>'#21132','description'=>'Payment for policy no #23456','customer'=>array('name'=>'','contact'=>'','email'=>'',),'notify'=>array('sms'=>true,'email'=>true,),'reminder_enable'=>true,'options'=>array('checkout'=>array('config'=>array('display'=>array('blocks'=>array('banks'=>array('name'=>'Pay using HDFC','instruments'=>array(0=>array('method'=>'netbanking','banks'=>array(0=>'HDFC',),),),),),'sequence'=>array(0=>'block.banks',),'preferences'=>array('show_default_blocks'=>false,),),),),),)); + +Use this API endpoint for Reordered Payment Methods. + +$api = new Api($key_id, $secret); + +$api->paymentLink->create(array('amount'=>1000,'currency'=>'INR','accept_partial'=>true,'first_min_partial_amount'=>100,'reference_id'=>'#21132','description'=>'Payment for policy no #23456','customer'=>array('name'=>'','contact'=>'','email'=>'',),'notify'=>array('sms'=>true,'email'=>true,),'reminder_enable'=>true,'options'=>array('checkout'=>array('config'=>array('display'=>array('blocks'=>array('banks'=>array('name'=>'All Payment Methods','instruments'=>array(0=>array('method'=>'upi',),1=>array('method'=>'netbanking',),2=>array('method'=>'card',),3=>array('method'=>'wallet',),),),),'sequence'=>array(0=>'block.banks',),'preferences'=>array('show_default_blocks'=>false,),),),),),)); + +```go: Go + +Use this API endpoint for HDFC Netbanking. + +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 1000, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#21132", + "description": "Payment for policy no #23456", + "customer": map[string]interface{}{ + "name": "", + "contact": "", + "email": ", + }, + "notify": map[string]interface{}{ + "sms": true, + "email": true, + }, + "reminder_enable": true, + "options": map[string]interface{}{ + "checkout": map[string]interface{}{ + "config": map[string]interface{}{ + "display": map[string]interface{}{ + "blocks": map[string]interface{}{ + "banks": map[string]interface{}{ + "name": "Pay using HDFC", + "instruments": []interface{}{ + map[string]interface{}{ + "method": "netbanking", + "banks": []string{ + "HDFC", + }, + }, + }, + }, + }, + }, + "sequence": []string{ + "block.banks", + }, + "preferences": map[string]interface{}{ + "show_default_blocks": false, + }, + }, + }, + }, + } + + + body, err := client.PaymentLink.Create(para_attr, nil) + +Use this API endpoint for Reordered Payment Methods. + +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 1000, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#21132", + "description": "Payment for policy no #23456", + "customer": map[string]interface{}{ + "name": "", + "contact": "", + "email": "", + }, + "notify": map[string]interface{}{ + "sms": true, + "email": true, + }, + "reminder_enable": true, + "options": map[string]interface{}{ + "checkout": map[string]interface{}{ + "config": map[string]interface{}{ + "display": map[string]interface{}{ + "blocks": map[string]interface{}{ + "banks": map[string]interface{}{ + "name": "Pay using HDFC", + "instruments": []interface{}{ + map[string]interface{}{ + "method": "netbanking", + }, + map[string]interface{}{ + "method": "upi", + }, + map[string]interface{}{ + "method": "wallet", + }, + map[string]interface{}{ + "method": "card", + }, + }, + }, + }, + }, + "sequence": []string{ + "block.banks", + }, + "preferences": map[string]interface{}{ + "show_default_blocks": false, + }, + }, + }, + }, + } + + + body, err := client.PaymentLink.Create(para_attr, nil) + +```java: Java + + Use this API endpoint for HDFC Netbanking. + + import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +JSONObject paymentLinkRequest = new JSONObject(); +paymentLinkRequest.put("amount",1000); +paymentLinkRequest.put("currency","INR"); +paymentLinkRequest.put("accept_partial",true); +paymentLinkRequest.put("first_min_partial_amount",100); +paymentLinkRequest.put("expire_by",1691097057); +paymentLinkRequest.put("reference_id","TS1989"); +paymentLinkRequest.put("description","Payment for policy no #23456"); +JSONObject customer = new JSONObject(); +customer.put("name",""); +customer.put("contact",""); +customer.put("email",""); +paymentLinkRequest.put("customer",customer); +JSONObject notify = new JSONObject(); +notify.put("sms",true); +notify.put("email",true); +paymentLinkRequest.put("reminder_enable",true); +JSONObject checkout = new JSONObject(); +JSONObject config = new JSONObject(); +JSONObject display = new JSONObject(); +List sequence = new ArrayList<>(); +JSONObject preference = new JSONObject(); +JSONObject banks = new JSONObject(); +banks.put("name", "Pay using HDFC"); +List instruments = new ArrayList<>(); +JSONObject netbanking = new JSONObject(); +netbanking.put("method","netbanking"); +List bankDetails = new ArrayList<>(); +bankDetails.add("HDFC"); +netbanking.put("banks", bankDetails); +instruments.add(netbanking); +banks.put("instruments", instruments); +sequence.add("block.banks"); +preference.put("show_default_blocks", false); +JSONObject displayObj = new JSONObject(); +displayObj.put("blocks", banks); +displayObj.put("sequence",sequence); +displayObj.put("preferences", preference); +config.put("config", display); +display.put("display", displayObj); +checkout.put("checkout", config); +paymentLinkRequest.put("options",checkout); + +PaymentLink payment = instance.paymentLink.create(paymentLinkRequest); + +Use this API endpoint for Reordered Payment Methods. + + import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +JSONObject paymentLinkRequest = new JSONObject(); +paymentLinkRequest.put("amount",1000); +paymentLinkRequest.put("currency","INR"); +paymentLinkRequest.put("accept_partial",true); +paymentLinkRequest.put("first_min_partial_amount",100); +paymentLinkRequest.put("expire_by",1691097057); +paymentLinkRequest.put("reference_id","TS1989"); +paymentLinkRequest.put("description","Payment for policy no #23456"); +JSONObject customer = new JSONObject(); +customer.put("name",""); +customer.put("contact",""); +customer.put("email",""); +paymentLinkRequest.put("customer",customer); +JSONObject notify = new JSONObject(); +notify.put("sms",true); +notify.put("email",true); +paymentLinkRequest.put("reminder_enable",true); +JSONObject checkout = new JSONObject(); +JSONObject config = new JSONObject(); +JSONObject display = new JSONObject(); +List sequence = new ArrayList<>(); +JSONObject preference = new JSONObject(); +JSONObject banks = new JSONObject(); +banks.put("name", "Pay using HDFC"); +List instruments = new ArrayList<>(); + +JSONObject netbanking = new JSONObject(); +netbanking.put("method","netbanking"); +JSONObject upi = new JSONObject(); +upi.put("method","upi"); +JSONObject card = new JSONObject(); +card.put("method","card"); +JSONObject wallet = new JSONObject(); +wallet.put("method","wallet"); + +instruments.add(netbanking); +instruments.add(upi); +instruments.add(card); +instruments.add(wallet); + +banks.put("instruments", instruments); +sequence.add("block.banks"); +preference.put("show_default_blocks", false); +JSONObject displayObj = new JSONObject(); +displayObj.put("blocks", banks); +displayObj.put("sequence",sequence); +displayObj.put("preferences", preference); +config.put("config", display); +display.put("display", displayObj); +checkout.put("checkout", config); +paymentLinkRequest.put("options",checkout); + +PaymentLink paymentlink = instance.paymentLink.create(paymentLinkRequest); + +```csharp: .NET + +Use this API endpoint for HDFC Netbanking. + +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +Dictionary paymentLinkRequest = new Dictionary(); +paymentLinkRequest.Add("amount", 1000); +paymentLinkRequest.Add("currency", "INR"); +paymentLinkRequest.Add("accept_partial", true); +paymentLinkRequest.Add("first_min_partial_amount", 100); +paymentLinkRequest.Add("expire_by", 1691097057); +paymentLinkRequest.Add("reference_id", "TS1989"); +paymentLinkRequest.Add("description", "Payment for policy no #23456"); +Dictionary customer = new Dictionary(); +customer.Add("name", ""); +customer.Add("contact", ""); +customer.Add("email", ""); +paymentLinkRequest.Add("customer", customer); +Dictionary notify = new Dictionary(); +notify.Add("sms", true); +notify.Add("email", true); +paymentLinkRequest.Add("reminder_enable", true); +Dictionary checkout = new Dictionary(); +Dictionary config = new Dictionary(); +Dictionary display = new Dictionary(); +List sequence = new List(); +Dictionary preference = new Dictionary(); +Dictionary banks = new Dictionary(); +banks.Add("name", "Pay using HDFC"); +List instruments = new List(); +Dictionary bankingDetails = new Dictionary(); +bankingDetails.Add("method", "netbanking"); +List instrumentBanks = new List(); +instrumentBanks.Add("HDFC"); +bankingDetails.Add("banks", instrumentBanks); +instruments.Add(bankingDetails); +banks.Add("instruments", instruments); +sequence.Add("block.banks"); +preference.Add("show_default_blocks", false); +Dictionary displayObj = new Dictionary(); +displayObj.Add("blocks", banks); +displayObj.Add("sequence", sequence); +displayObj.Add("preferences", preference); +config.Add("config", display); +display.Add("display", displayObj); +checkout.Add("checkout", config); +paymentLinkRequest.Add("options", checkout); + +PaymentLink paymentlink = client.PaymentLink.Create(paymentLinkRequest); + +Use this API endpoint for Reordered Payment Methods. + +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +Dictionary paymentLinkRequest = new Dictionary(); +paymentLinkRequest.Add("amount", 1000); +paymentLinkRequest.Add("currency", "INR"); +paymentLinkRequest.Add("accept_partial", true); +paymentLinkRequest.Add("first_min_partial_amount", 100); +paymentLinkRequest.Add("expire_by", 1691097057); +paymentLinkRequest.Add("reference_id", "TS1989"); +paymentLinkRequest.Add("description", "Payment for policy no #23456"); +Dictionary customer = new Dictionary(); +customer.Add("name", ""); +customer.Add("contact", ""); +customer.Add("email", ""); +paymentLinkRequest.Add("customer", customer); +Dictionary notify = new Dictionary(); +notify.Add("sms", true); +notify.Add("email", true); +paymentLinkRequest.Add("reminder_enable", true); +Dictionary checkout = new Dictionary(); +Dictionary config = new Dictionary(); +Dictionary display = new Dictionary(); +List sequence = new List(); +Dictionary preference = new Dictionary(); +Dictionary banks = new Dictionary(); +banks.Add("name", "Pay using HDFC"); +List instruments = new List(); +Dictionary netbanking = new Dictionary(); +netbanking.Add("method", "netbanking"); +Dictionary upi = new Dictionary(); +upi.Add("method", "upi"); +Dictionary card = new Dictionary(); +card.Add("method", "card"); +Dictionary wallet = new Dictionary(); +wallet.Add("method", "wallet"); +instruments.Add(netbanking); +instruments.Add(upi); +instruments.Add(card); +instruments.Add(wallet); +banks.Add("instruments", instruments); +sequence.Add("block.banks"); +preference.Add("show_default_blocks", false); +Dictionary displayObj = new Dictionary(); +displayObj.Add("blocks", banks); +displayObj.Add("sequence", sequence); +displayObj.Add("preferences", preference); +config.Add("config", display); +display.Add("display", displayObj); +checkout.Add("checkout", config); +paymentLinkRequest.Add("options", checkout); + +PaymentLink paymentlink = client.PaymentLink.Create(paymentLinkRequest); + +```ruby: Ruby + +Use this API endpoint for HDFC Netbanking. + +Razorpay.setup('key_id', 'key_secret') + +Razorpay.headers = {"Content-type" => "application/json"} + +para_attr = { + "amount": 1000, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#21132", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "config": { + "display": { + "blocks": { + "banks": { + "name": "Pay using HDFC", + "instruments": [ + { + "method": "netbanking", + "banks": [ + "HDFC" + ] + } + ] + } + }, + "sequence": [ + "block.banks" + ], + "preferences": { + "show_default_blocks": false + } + } + } + } + } + } + +Razorpay::PaymentLink.create(para_attr) + +Use this API endpoint for Reordered Payment Methods. + +Razorpay.setup('key_id', 'key_secret') + +Razorpay.headers = {"Content-type" => "application/json"} + +para_attr = { + "amount": 1000, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#21132", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "config": { + "display": { + "blocks": { + "banks": { + "name": "All Payment Methods", + "instruments": [ + { + "method": "upi" + }, + { + "method": "netbanking" + }, + { + "method": "card" + }, + { + "method": "wallet" + } + ] + } + }, + "sequence": [ + "block.banks" + ], + "preferences": { + "show_default_blocks": false + } + } + } + } + } + } + +Razorpay::PaymentLink.create(para_attr) + +```python: Python + +Use this API endpoint for HDFC Netbanking. + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment_link.create({ + "amount": 1000, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#21132", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "config": { + "display": { + "blocks": { + "banks": { + "name": "Pay using HDFC", + "instruments": [ + { + "method": "netbanking", + "banks": [ + "HDFC" + ] + } + ] + } + }, + "sequence": [ + "block.banks" + ], + "preferences": { + "show_default_blocks": false + } + } + } + } + } +}) + +Use this API endpoint for Reordered Payment Methods. + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment_link.create({ + "amount": 1000, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#21132", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "config": { + "display": { + "blocks": { + "banks": { + "name": "All Payment Methods", + "instruments": [ + { + "method": "upi" + }, + { + "method": "netbanking" + }, + { + "method": "card" + }, + { + "method": "wallet" + } + ] + } + }, + "sequence": [ + "block.banks" + ], + "preferences": { + "show_default_blocks": false + } + } + } + } + } +}) + +``` + +### Response + +### Parameters + +`amount` _mandatory_ +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _optional_ +: `string` A three-letter ISO code for the currency in which you want to accept the payment. For example, INR. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +. For example, if an amount of is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. Must be passed along with `accept_partial` parameter. + +`upi_link` _mandatory for creating UPI Payment Link_ +: `boolean` Must be set to `true` for creating UPI Payment Link. If the `upi_link` parameter is not passed or passed with value as false, a Standard Payment Link will be created. Possible values: + - `true`: Creates a UPI Payment Link. + - `false`: Creates a Standard Payment Link. + + +`description` _optional_ +: `string` A brief description of the Payment Link. The maximum character limit supported is 2048. + +`reference_id` _optional_ +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`customer` _optional_ +: `json object` Customer details + + `name` _optional_ + : `string` The customer's name. + + `email` _optional_ + : `string` The customer's email address. + + `contact` _optional_ + : `string` The customer's phone number. + +`expire_by` _optional_ +: `integer` Timestamp, in Unix, at which the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`notify` _optional_ +: `array` Defines who handles Payment Link notification. + + `sms` _optional_ + : `boolean` Defines who handles the SMS notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + + `email` _optional_ + : `boolean` Defines who handles the email notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Payment Link for Groceries.”`. + +`callback_url` _optional_ +: `string` If specified, adds a redirect URL to the Payment Link. Once customers completes the payment, they are redirected to the specified URL. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> If the `callback_url` is passed, it must be passed in the correct format. That is, it should contain a URL. +> +> + +`callback_method` _conditionally mandatory_ +: `string` If `callback_url` parameter is passed, callback_method must be passed with the value `get`. + +`reminder_enable` _optional_ +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`options` _mandatory_ +: `array` Options to display or hide payment methods on the Checkout section. Parent parameter under which the `checkout` child parameters must be passed. + + `checkout` _mandatory_ + : `array` The parameter for the Checkout section. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. diff --git a/llm-content/api/payments/payment-links/customise-payment-methods.md b/llm-content/api/payments/payment-links/customise-payment-methods.md new file mode 100644 index 00000000..45bf58d8 --- /dev/null +++ b/llm-content/api/payments/payment-links/customise-payment-methods.md @@ -0,0 +1,605 @@ +--- +title: Customise Payment Methods - Options and Method Parameters +description: Customise the payment methods available to customers while using Payment Links using Razorpay APIs. +--- + +# Customise Payment Methods - Options and Method Parameters + +## Customise Payment Methods - Options and Method Parameters + +Use this endpoint to enable or disable display of specific payment methods. For example, you can use the `options` and `method` parameters to display only `card` and `netbanking` methods on the Checkout. + +You can use the `options` parameter to display or hide any of the payment methods: + +- Card +- Netbanking +- UPI +- Wallet + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payment_links/ \ +-H 'Content-type: application/json' \ +-d '{ + "amount": 1000, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#523442", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "method": { + "netbanking": true, + "card": true, + "upi": false, + "wallet": false + } + } + } +}' + +```php: PHP +$api = new Api($key_id, $secret); + +$api->paymentLink->create(array('amount'=>500, 'currency'=>'INR', 'accept_partial'=>true, 'first_min_partial_amount'=>100, 'description' => 'For XYZ purpose', 'customer' => array('name'=>'', 'email' => '', 'contact'=>''), 'notify'=>array('sms'=>true, 'email'=>true) ,'reminder_enable'=>true , 'options'=>array('checkout'=>array('method'=>array('netbanking'=> true, 'card'=> true, 'upi'=>false, 'wallet'=>false))))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.paymentLink.create({ + amount: 500, + currency: "INR", + accept_partial: true, + first_min_partial_amount: 100, + description: "For XYZ purpose", + customer: { + name: "", + email: "", + contact: "" + }, + notify: { + sms: true, + email: true + }, + reminder_enable: true, + options: { + checkout: { + method: { + netbanking: true, + card: true, + upi: false, + wallet: false + } + } + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment_link.create({ + "amount": 500, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "description": "For XYZ purpose", + "customer": { + "name": "", + "email": "", + "contact": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "method": { + "netbanking": True, + "card": True, + "upi": False, + "wallet": False + } + } + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 1000, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#523442", + "description": "Payment for policy no #23456", + "customer": map[string]interface{}{ + "name": "", + "contact": "", + "email": "", + }, + "notify": map[string]interface{}{ + "sms": true, + "email": true, + }, + "reminder_enable": true, + "options": map[string]interface{}{ + "checkout": map[string]interface{}{ + "method": map[string]interface{}{ + "netbanking": true, + "card": true, + "upi": false, + "wallet": false, + }, + }, + }, +} +body, err := client.PaymentLink.Create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +para_attr = { + "amount": 500, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "description": "For XYZ purpose", + "customer": { + "name": "", + "email": "", + "contact": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "method": { + "netbanking": 1, + "card": 1, + "upi": 0, + "wallet": 0 + } + } + } +} + +Razorpay.headers = {"Content-type" => "application/json"} + +Razorpay::PaymentLink.create(para_attr.to_json) + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +JSONObject paymentLinkRequest = new JSONObject(); +paymentLinkRequest.put("amount",1000); +paymentLinkRequest.put("currency","INR"); +paymentLinkRequest.put("accept_partial",true); +paymentLinkRequest.put("reference_id","#aasasw8"); +paymentLinkRequest.put("first_min_partial_amount",100); +paymentLinkRequest.put("description","Payment for policy no #23456"); +JSONObject customer = new JSONObject(); +customer.put("name",""); +customer.put("contact",""); +customer.put("email",""); +paymentLinkRequest.put("customer",customer); +JSONObject notify = new JSONObject(); +notify.put("sms",true); +notify.put("email",true); +paymentLinkRequest.put("notify",notify); +paymentLinkRequest.put("reminder_enable",true); + +JSONObject options = new JSONObject(); +JSONObject notes = new JSONObject(); +notes.put("branch","Acme Corp Bangalore North"); +notes.put("name","Bhairav Kumar"); + +JSONObject method = new JSONObject(); +method.put("netbanking", true); +method.put("card", true); +method.put("upi", true); +method.put("wallet", true); +JSONObject checkout = new JSONObject(); +checkout.put("method",method); +options.put("checkout",checkout); +paymentLinkRequest.put("options",options); + +PaymentLink payment = razorpay.paymentLink.create(paymentLinkRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentLinkRequest = new Dictionary(); +paymentLinkRequest.Add("amount", 1000); +paymentLinkRequest.Add("currency", "INR"); +paymentLinkRequest.Add("accept_partial", true); +paymentLinkRequest.Add("reference_id", "#aasasw8"); +paymentLinkRequest.Add("first_min_partial_amount", 100); +paymentLinkRequest.Add("description", "Payment for policy no #23456"); +Dictionary customer = new Dictionary(); +customer.Add("contact", ""); +customer.Add("name", ""); +customer.Add("email", ""); +paymentLinkRequest.Add("customer", customer); +Dictionary notify = new Dictionary(); +notify.Add("sms", true); +notify.Add("email", true); +paymentLinkRequest.Add("notify", notify); +paymentLinkRequest.Add("reminder_enable", true); + +Dictionary options = new Dictionary(); +Dictionary notes = new Dictionary(); +notes.Add("branch", "Acme Corp Bangalore North"); +notes.Add("name", "Bhairav Kumar"); + +Dictionary method = new Dictionary(); +method.Add("netbanking", true); +method.Add("card", true); +method.Add("upi", true); +method.Add("wallet", true); + +Dictionary checkout = new Dictionary(); +checkout.Add("prefill", prefill); +options.Add("checkout", checkout); +paymentLinkRequest.Add("options", options); + +PaymentLink paymentlink = client.PaymentLink.Create(paymentLinkRequest); +``` + +### Response + +### Parameters + +`amount` _mandatory_ +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _optional_ +: `string` A three-letter ISO code for the currency in which you want to accept the payment. For example, INR. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +. For example, if an amount of is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. Must be passed along with `accept_partial` parameter. + +`upi_link` _mandatory for creating UPI Payment Link_ +: `boolean` Must be set to `true` for creating UPI Payment Link. If the `upi_link` parameter is not passed or passed with value as false, a Standard Payment Link will be created. Possible values: + - `true`: Creates a UPI Payment Link. + - `false`: Creates a Standard Payment Link. + + +`description` _optional_ +: `string` A brief description of the Payment Link. The maximum character limit supported is 2048. + +`reference_id` _optional_ +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`customer` _optional_ +: `json object` Customer details + + `name` _optional_ + : `string` The customer's name. + + `email` _optional_ + : `string` The customer's email address. + + `contact` _optional_ + : `string` The customer's phone number. + +`expire_by` _optional_ +: `integer` Timestamp, in Unix, at which the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`notify` _optional_ +: `array` Defines who handles Payment Link notification. + + `sms` _optional_ + : `boolean` Defines who handles the SMS notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + + `email` _optional_ + : `boolean` Defines who handles the email notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Payment Link for Groceries.”`. + +`callback_url` _optional_ +: `string` If specified, adds a redirect URL to the Payment Link. Once customers completes the payment, they are redirected to the specified URL. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> If the `callback_url` is passed, it must be passed in the correct format. That is, it should contain a URL. +> +> + +`callback_method` _conditionally mandatory_ +: `string` If `callback_url` parameter is passed, callback_method must be passed with the value `get`. + +`reminder_enable` _optional_ +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`options` _mandatory_ +: `array` Options to display or hide payment methods on the Checkout section. Parent parameter under which the `checkout` and `method` child parameters must be passed. + + `checkout` _mandatory_ + : `array` The parameter for the Checkout section. `method` is its child parameter. + + `method` _mandatory_ + : `array` Using this parameter, you can control the display of payment methods on the Checkout section. Possible values of the payment methods are: + - `netbanking` + - `upi` + - `card` + - `wallet` + + `netbanking` + : `boolean` Used to enable or disable `netbanking` as a payment method on the Checkout section. Possible values are: + - `true` (default): Displays netbanking on the Checkout. + - `false`: Hides netbanking on the Checkout. + + `upi` + : `boolean` Used to enable or disable `UPI` as a payment method on the Checkout section. Possible values are: + - `true` (default): Displays UPI on the Checkout. + - `false`: Hides UPI on the Checkout. + + `card` _optional_ + : `boolean` Used to enable or disable `card` as a payment method on the Checkout section. Possible values are: + - `true` (default): Displays card on the Checkout. + - `false`: Hides card on the Checkout. + + `wallet` _optional_ + : `boolean` Used to enable or disable `wallet` as a payment method on the Checkout section. Possible values are: + - `true` (default): Displays wallet on the Checkout. + - `false`: Hides wallet on the Checkout. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +The api \{key/secret\} provided is invalid +* code: 4xx +* description: There is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure that: - The API Keys are active and entered correctly. +- There are no white-spaces before or after the keys. + +The \{input field\} is required +* code: 4xx +* description: A mandatory field is empty. +* solution: Ensure all mandatory fields and values are present. + +wrong input fields sent. +* code: 400 +* description: When wrong input fields are sent during Payment Link creation. +* solution: Ensure that the input fields are added correctly. Refer to these [request parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#request-parameters) on how to add correct input fields. + +payment link creation with reference ID already attempted +* code: 400 +* description: An existing reference id has been passed. +* solution: Ensure that a unique reference id is used for all Payment Links. + +timestamp must be atleast 15 minutes in future +* code: 400 +* description: The epoch time passed is less than 15 minutes from the current time. +* solution: The `close_by` time should be more than 15 minutes from the current time. + +Invalid access: Cannot create a payment link in live mode, as live mode is disabled for merchant. +* code: 400 +* description: Occurs when you try to create a Payment Link in Live mode, but live mode is disabled for you +* solution: Raise a request to our [support team](https://razorpay.com/support/) to get live mode enabled for you. + +Invalid access: Cannot create a payment link, as Merchant is Suspended. +* code: 400 +* description: Occurs when you try to create a Payment Link when you have been been suspended. +* solution: Raise a request to our [support team](https://razorpay.com/support/) to be reinstated. + +value: the length must not be greater than 255. +* code: 400 +* description: When the notes length is greater than 255 characters during Payment Link creation. +* solution: Please create a payment link with notes values less than 255 characters. diff --git a/llm-content/api/payments/payment-links/entity.md b/llm-content/api/payments/payment-links/entity.md new file mode 100644 index 00000000..1f55141d --- /dev/null +++ b/llm-content/api/payments/payment-links/entity.md @@ -0,0 +1,249 @@ +--- +title: Payment Links Entity +description: Entity parameters and sample code for Payment Links API. +--- + +# Payment Links Entity + +The Payment Link entity has the following fields: + +### Response + +```json: Standard Payment Link Entity +{ + "accept_partial": true, + "amount": 1000, + "amount_paid": 0, + "callback_method": "get", + "callback_url": "https://example-callback-url.com/", + "cancelled_at": 1591097270, + "created_at": 1591097057, + "currency": "", + "customer": { + "contact": "", + "email": "", + "name": "" + }, + "description": "Payment for policy no #23456", + "expire_by": 1691097057, + "expired_at": 0, + "first_min_partial_amount": 100, + "id": "plink_ExjpAUN3gVHrPJ", + "notes": { + "policy_name": "Life Insurance Policy" + }, + "notify": { + "email": true, + "sms": true + }, + "payments": [], + "reference_id": "TS1989", + "reminder_enable": true, + "reminders": { + "status": "failed" + }, + "short_url": "https://rzp.io/i/nxrHnLJ", + "status": "cancelled", + "updated_at": 1591097270, + "user_id": "" +} + +```json: UPI Payment Link Entity +{ + "accept_partial": false, + "amount": 1000, + "amount_paid": 0, + "cancelled_at": 1591097270, + "created_at": 1591097057, + "currency": "", + "customer": { + "contact": "", + "email": "", + "name": "" + }, + "description": "Payment for policy no #23456", + "expire_by": 1691097057, + "expired_at": 0, + "first_min_partial_amount": 0, + "id": "plink_ExjpAUN3gVHrPJ", + "upi_link": "true", + "notes": { + "policy_name": "Life Insurance Policy" + }, + "notify": { + "email": true, + "sms": true + }, + "payments": null, + "reference_id": "TS1989", + "reminder_enable": true, + "reminders": { + "status": "failed" + }, + "short_url": "https://rzp.io/i/nxrHnLJ", + "source": "", + "source_id": "", + "status": "created", + "updated_at": 1591097270, + "user_id": "" +} +``` + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. diff --git a/llm-content/api/payments/payment-links/fetch-all-standard.md b/llm-content/api/payments/payment-links/fetch-all-standard.md new file mode 100644 index 00000000..ae16e050 --- /dev/null +++ b/llm-content/api/payments/payment-links/fetch-all-standard.md @@ -0,0 +1,244 @@ +--- +title: Fetch All Standard Payment Links +description: Fetch all Standard Payment Links using this endpoint. +--- + +# Fetch All Standard Payment Links + +## Fetch All Standard Payment Links + +Use this endpoint to retrieve the details of all the Standard Payment Links. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +- X GET https://api.razorpay.com/v1/payment_links/ \ +- H "content-type: application/json" + +```php: PHP +$api = new Api($key_id, $secret); + +$api->paymentLink->all(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET', headers : { 'Content-Type': 'application/json' }}) + +instance.paymentLink.all() + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment_link.all() + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.PaymentLink.All(nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +Razorpay::PaymentLink.all() + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +JSONObject params = new JSONObject(); +params.put("reference_id","TS1989"); + +List paymentlink = razorpay.paymentLink.fetchAll(params); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentLinkRequest = new Dictionary(); +paymentLinkRequest.Add("count", 1); + +PaymentLink paymentlink = client.PaymentLink.All(paymentLinkRequest); + +``` + +### Response + +### Parameters + +`payment_id` _optional_ +: `string` Unique identifier of the payment associated with the Payment Link. + +`reference_id` _optional_ +: `string` The unique reference number entered while creating the Payment Link. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +The api \{key/secret\} provided is invalid +* code: 4xx +* description: There is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure that: - The API Keys are active and entered correctly. +- There are no white-spaces before or after the keys. diff --git a/llm-content/api/payments/payment-links/fetch-all-upi.md b/llm-content/api/payments/payment-links/fetch-all-upi.md new file mode 100644 index 00000000..0deb646a --- /dev/null +++ b/llm-content/api/payments/payment-links/fetch-all-upi.md @@ -0,0 +1,244 @@ +--- +title: Fetch All UPI Payment Links +description: Fetch all UPI Payment Links using this endpoint. +--- + +# Fetch All UPI Payment Links + +## Fetch All UPI Payment Links + +Use this endpoint to retrieve the details of all the UPI Payment Links. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +- X GET https://api.razorpay.com/v1/payment_links/ \ +- H "content-type: application/json" + +```php: PHP +$api = new Api($key_id, $secret); + +$api->paymentLink->all(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET', headers : { 'Content-Type': 'application/json' }}) + +instance.paymentLink.all() + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment_link.all() + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.PaymentLink.All(nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +Razorpay::PaymentLink.all() + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +JSONObject params = new JSONObject(); +params.put("reference_id","TS1989"); + +List paymentlink = razorpay.paymentLink.fetchAll(params); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentLinkRequest = new Dictionary(); +paymentLinkRequest.Add("count", 1); + +PaymentLink paymentlink = client.PaymentLink.All(paymentLinkRequest); + +``` + +### Response + +### Parameters + +`payment_id` _optional_ +: `string` Unique identifier of the payment associated with the Payment Link. + +`reference_id` _optional_ +: `string` The unique reference number entered while creating the Payment Link. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +The api \{key/secret\} provided is invalid +* code: 4xx +* description: There is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure that: - The API Keys are active and entered correctly. +- There are no white-spaces before or after the keys. diff --git a/llm-content/api/payments/payment-links/fetch-id-standard.md b/llm-content/api/payments/payment-links/fetch-id-standard.md new file mode 100644 index 00000000..6fa1c9e9 --- /dev/null +++ b/llm-content/api/payments/payment-links/fetch-id-standard.md @@ -0,0 +1,196 @@ +--- +title: Fetch Standard Payment Links With ID +description: Fetch Standard Payment Links with their Id using this endpoint. +--- + +# Fetch Standard Payment Links With ID + +## Fetch Standard Payment Links With ID + +Use this endpoint to retrieve the details of a Standard Payment Link using its id. + +### Request + +### Response + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the Payment Link. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +invalid input [strippedId] = [xxxxxxxxxxxx] +* code: 400 +* description: An invalid Payment Link id has been passed. +* solution: Ensure that a valid Payment Link id is sent in the API endpoint. + +The id provided does not exist +* code: 400 +* description: The Payment Link does not belong to the requestor business, or it doesn't exist. +* solution: Ensure that the Payment Link is valid and belongs to the requestor business. + +The api \{key/secret\} provided is invalid +* code: 4xx +* description: There is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure that: - The API Keys are active and entered correctly. +- There are no white-spaces before or after the keys. diff --git a/llm-content/api/payments/payment-links/fetch-id-upi.md b/llm-content/api/payments/payment-links/fetch-id-upi.md new file mode 100644 index 00000000..5fd4c29e --- /dev/null +++ b/llm-content/api/payments/payment-links/fetch-id-upi.md @@ -0,0 +1,196 @@ +--- +title: Fetch UPI Payment Links With ID +description: Fetch UPI Payment Links with their Id using this endpoint. +--- + +# Fetch UPI Payment Links With ID + +## Fetch UPI Payment Links With ID + +Use this endpoint to retrieve the details of a UPI Payment Link using its id. + +### Request + +### Response + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the Payment Link. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +invalid input [strippedId] = [xxxxxxxxxxxx] +* code: 400 +* description: An invalid Payment Link id has been passed. +* solution: Ensure that a valid Payment Link id is sent in the API endpoint. + +The id provided does not exist +* code: 400 +* description: The Payment Link does not belong to the requestor business, or it doesn't exist. +* solution: Ensure that the Payment Link is valid and belongs to the requestor business. + +The api \{key/secret\} provided is invalid +* code: 4xx +* description: There is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure that: - The API Keys are active and entered correctly. +- There are no white-spaces before or after the keys. diff --git a/llm-content/api/payments/payment-links/offers.md b/llm-content/api/payments/payment-links/offers.md new file mode 100644 index 00000000..f9bfeb07 --- /dev/null +++ b/llm-content/api/payments/payment-links/offers.md @@ -0,0 +1,601 @@ +--- +title: API | Payment Links - Offers +heading: Offers on Payment Links +description: Provide offers to customers using Payment Links APIs. +--- + +# Offers on Payment Links + +## Offers on Payment Links + +Use this endpoint to provide offers on Payment Links. Razorpay Offers provides discounts or cashback on Payment Links issued to customers. You can restrict the payment methods on which the Offers are applied and limit their usage to a defined time period. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you do not enable partial payments on Payment Links on which offer is being applied. +> + +Know more about how to show [Offers Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/offers.md) via the Dashboard. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payment_links +-H 'content-type: application/json' +-d '{ + "amount": 3400, + "currency": "INR", + "accept_partial": false, + "reference_id": "#425", + "description": "Payment for policy no #23456", + "customer": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": false, + "options": { + "order": { + "offers": [ + "offer_F4WMTC3pwFKnzq", + "offer_F4WJHqvGzw8dWF" + ] + } + } +}' + +```php: PHP +$api = new Api($key_id, $secret); + +$api->paymentLink->create(array('amount'=>20000, 'currency'=>'INR', 'accept_partial'=>false, 'description' => 'For XYZ purpose', 'customer' => array('name'=>'Gaurav Kumar', 'email' => 'gaurav.kumar@example.com', 'contact'=>'+919000090000'), 'notify'=>array('sms'=>true, 'email'=>true) ,'reminder_enable'=>false , 'options'=>array('order'=>array('offers'=>array('offer_I0PqexIiTmMRnA')))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.paymentLink.create({ + "amount": 3400, + "currency": "INR", + "accept_partial": false, + "reference_id": "#425", + "description": "Payment for policy no #23456", + "customer": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": false, + "options": { + "order": { + "offers": [ + "offer_F4WMTC3pwFKnzq", + "offer_F4WJHqvGzw8dWF" + ] + } + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment_link.create({ + "amount": 3400, + "currency": "INR", + "accept_partial": false, + "reference_id": "#425", + "description": "Payment for policy no #23456", + "customer": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": false, + "options": { + "order": { + "offers": [ + "offer_F4WMTC3pwFKnzq", + "offer_F4WJHqvGzw8dWF" + ] + } + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 3400, + "currency": "INR", + "accept_partial": false, + "reference_id": "#425", + "description": "Payment for policy no #23456", + "customer": map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + }, + "notify": map[string]interface{}{ + "sms": true, + "email": true, + }, + "reminder_enable": false, + "options": map[string]interface{}{ + "order": map[string]interface{}{ + "offers": []string{ + "offer_JGQvQtvJmVDRIA", + }, + }, + }, + } +body, err := client.PaymentLink.Create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +para_attr = { + "amount": 3400, + "currency": "INR", + "accept_partial": false, + "reference_id": "#425", + "description": "Payment for policy no #23456", + "customer": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": false, + "options": { + "order": { + "offers": [ + "offer_F4WMTC3pwFKnzq", + "offer_F4WJHqvGzw8dWF" + ] + } + } +} + +Razorpay.headers = {"Content-type" => "application/json"} + +Razorpay::PaymentLink.create(para_attr.to_json) + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +JSONObject paymentLinkRequest = new JSONObject(); +paymentLinkRequest.put("amount",3400); +paymentLinkRequest.put("currency","INR"); +paymentLinkRequest.put("accept_partial",false); +paymentLinkRequest.put("reference_id","#aasasw8"); +paymentLinkRequest.put("description","Payment for policy no #23456"); +JSONObject customer = new JSONObject(); +customer.put("name","+919000090000"); +customer.put("contact","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +paymentLinkRequest.put("customer",customer); +JSONObject notify = new JSONObject(); +notify.put("sms",true); +notify.put("email",true); +paymentLinkRequest.put("notify",notify); +paymentLinkRequest.put("reminder_enable",false); +JSONObject options = new JSONObject(); +JSONObject transferRequest = new JSONObject(); +List transfers = new ArrayList<>(); +List offerParams = new ArrayList<>(); +offerParams.add("offer_JTUADI4ZWBGWur"); +offerParams.add("offer_F4WJHqvGzw8dWF"); +JSONObject order = new JSONObject(); +order.put("offers",offerParams); +options.put("order",order); +paymentLinkRequest.put("options",options); + +PaymentLink payment = razorpay.paymentLink.create(paymentLinkRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentLinkRequest = new Dictionary(); +paymentLinkRequest.Add("amount", 3400); +paymentLinkRequest.Add("currency", "INR"); +paymentLinkRequest.Add("accept_partial", false); +paymentLinkRequest.Add("reference_id", "#aasasw8"); +paymentLinkRequest.Add("description", "Payment for policy no #23456"); +Dictionary customer = new Dictionary(); +customer.Add("contact", "+919999999999"); +customer.Add("name", "Gaurav Kumar"); +customer.Add("email", "gaurav.kumar@example.com"); +paymentLinkRequest.Add("customer", customer); +Dictionary notify = new Dictionary(); +notify.Add("sms", true); +notify.Add("email", true); +paymentLinkRequest.Add("notify", notify); +paymentLinkRequest.Add("reminder_enable", false); +Dictionary options = new Dictionary(); +List offerParams = new List(); +offerParams.Add("offer_JTUADI4ZWBGWur"); +offerParams.Add("offer_F4WJHqvGzw8dWF"); +Dictionary order = new Dictionary(); +order.Add("offers", offerParams); +options.Add("order", order); + +PaymentLink paymentlink = client.PaymentLink.Create(paymentLinkRequest); +``` + +### Response + +```json: Success +{ + "accept_partial": false, + "amount": 3400, + "amount_paid": 0, + "cancelled_at": 0, + "created_at": 1600183040, + "currency": "INR", + "customer": { + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "name": "Gaurav Kumar" + }, + "description": "Payment for policy no #23456", + "expire_by": 0, + "expired_at": 0, + "first_min_partial_amount": 0, + "id": "plink_FdLt0WBldRyE5t", + "notes": null, + "notify": { + "email": true, + "sms": true + }, + "payments": null, + "reference_id": "#425", + "reminder_enable": false, + "reminders": [], + "short_url": "https://rzp.io/i/CM5ohDC", + "status": "created", + "user_id": "" +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`amount` _mandatory_ +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _optional_ +: `string` A three-letter ISO code for the currency in which you want to accept the payment. For example, INR. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +. For example, if an amount of is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. Must be passed along with `accept_partial` parameter. + +`upi_link` _mandatory for creating UPI Payment Link_ +: `boolean` Must be set to `true` for creating UPI Payment Link. If the `upi_link` parameter is not passed or passed with value as false, a Standard Payment Link will be created. Possible values: + - `true`: Creates a UPI Payment Link. + - `false`: Creates a Standard Payment Link. + + +`description` _optional_ +: `string` A brief description of the Payment Link. The maximum character limit supported is 2048. + +`reference_id` _optional_ +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`customer` _optional_ +: `json object` Customer details + + `name` _optional_ + : `string` The customer's name. + + `email` _optional_ + : `string` The customer's email address. + + `contact` _optional_ + : `string` The customer's phone number. + +`expire_by` _optional_ +: `integer` Timestamp, in Unix, at which the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`notify` _optional_ +: `array` Defines who handles Payment Link notification. + + `sms` _optional_ + : `boolean` Defines who handles the SMS notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + + `email` _optional_ + : `boolean` Defines who handles the email notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Payment Link for Groceries.”`. + +`callback_url` _optional_ +: `string` If specified, adds a redirect URL to the Payment Link. Once customers completes the payment, they are redirected to the specified URL. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> If the `callback_url` is passed, it must be passed in the correct format. That is, it should contain a URL. +> +> + +`callback_method` _conditionally mandatory_ +: `string` If `callback_url` parameter is passed, callback_method must be passed with the value `get`. + +`reminder_enable` _optional_ +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`options` _mandatory_ +: `array` Options to associate the `offer_id` with the Payment Link. Parent parameter under which the `order` child parameter must be passed. + + `order` _mandatory_ + : `array` The parameter under which the `offer_id` must be passed. + + `offer_id` _mandatory_ + : `string` Unique identifier of the offer created in the previous step. For example, `offer_F4WMTC3pwFKnzq`. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +The api \{key/secret\} provided is invalid +* code: 4xx +* description: There is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure that: - The API Keys are active and entered correctly. +- There are no white-spaces before or after the keys. + +The \{input field\} is required +* code: 4xx +* description: A mandatory field is empty. +* solution: Ensure all mandatory fields and values are present. + +wrong input fields sent. +* code: 400 +* description: When wrong input fields are sent during Payment Link creation. +* solution: Ensure that the input fields are added correctly. Refer to these [request parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#request-parameters) on how to add correct input fields. + +payment link creation with reference ID already attempted +* code: 400 +* description: An existing reference id has been passed. +* solution: Ensure that a unique reference id is used for all Payment Links. + +timestamp must be atleast 15 minutes in future +* code: 400 +* description: The epoch time passed is less than 15 minutes from the current time. +* solution: The `close_by` time should be more than 15 minutes from the current time. + +Invalid access: Cannot create a payment link in live mode, as live mode is disabled for merchant. +* code: 400 +* description: Occurs when you try to create a Payment Link in Live mode, but live mode is disabled for you +* solution: Raise a request to our [support team](https://razorpay.com/support/) to get live mode enabled for you. + +Invalid access: Cannot create a payment link, as Merchant is Suspended. +* code: 400 +* description: Occurs when you try to create a Payment Link when you have been been suspended. +* solution: Raise a request to our [support team](https://razorpay.com/support/) to be reinstated. + +value: the length must not be greater than 255. +* code: 400 +* description: When the notes length is greater than 255 characters during Payment Link creation. +* solution: Please create a payment link with notes values less than 255 characters. diff --git a/llm-content/api/payments/payment-links/parameters.md b/llm-content/api/payments/payment-links/parameters.md new file mode 100644 index 00000000..d20f6549 --- /dev/null +++ b/llm-content/api/payments/payment-links/parameters.md @@ -0,0 +1,39 @@ +--- +title: Modified Request and Response Parameters for Payment Links +description: Check the Request and Response parameters for the Razorpay APIs that have undergone change and modify your integration accordingly. +--- + +# Modified Request and Response Parameters for Payment Links + +> **WARN** +> +> +> **New API Version** +> +> We are introducing a new version of APIs for Payment Links. +> + +> Old API URL: https://api.razorpay.com/v1/invoices +> + +> New API URL: https://api.razorpay.com/v1/payment_links +> + +> Some of the existing request and response parameters have changed and new ones have been added. +> +> Pass this information to your developers and ask them to change your integration accordingly. +> + +Along with the changes in the API endpoint, some of the Payment Links' request and response parameters have undergone change. + +Old Parameter | New Parameter | Description +--- +partial_payment | accept_partial | To allow customers to make partial payments for a Payment Link. `accept_partial` must be used in association with the `first_min_partial_amount` parameter. +--- +first_payment_min_amount | first_partial_min_amount | If partial payment is allowed, the minimum amount that must be paid as the first payment. +--- +receipt | reference_id | User-defined reference number for a Payment Link. +--- +sms_notify | notify.sms | Defines who handles the SMS notification to the customer. +--- +email_notify | notify.email | Defines who handles the email notification to the customer. diff --git a/llm-content/api/payments/payment-links/reminders.md b/llm-content/api/payments/payment-links/reminders.md new file mode 100644 index 00000000..f07dad57 --- /dev/null +++ b/llm-content/api/payments/payment-links/reminders.md @@ -0,0 +1,397 @@ +--- +title: Manage Reminders for Payment Links +description: Enable or disable reminders for Payment Links using Razorpay APIs. +--- + +# Manage Reminders for Payment Links + +## Manage Reminders for Payment Links + +Use this endpoint to manage reminders for Payment Links. + +- While reminders are enabled globally from Dashboard Settings, you can disable them for specific Payment Links. A valid use case for this might be when the customer has paid the money to you offline. In this case, you would not want reminders to be sent to them. + +- You can disable reminders during creation of Payment Link or by updating the link. To disable reminders for a Payment Link, pass `reminder_enable` as `false`, during [Payment Link creation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#create-payment-link). + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payment_links/ \ +-H 'Content-type: application/json' \ +-d '{ + "amount": 1000, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#425", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": false +}' + +```php: PHP +$api = new Api($key_id, $secret); + +$api->paymentLink->create(array('amount'=>500, 'currency'=>'INR', 'accept_partial'=>true, 'first_min_partial_amount'=>100, 'description' => 'For XYZ purpose', 'customer' => array('name'=>'', 'email' => '', 'contact'=>''), 'notify'=>array('sms'=>true, 'email'=>true) ,'reminder_enable'=>false)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.paymentLink.create({ + amount: 1000, + currency: "INR", + accept_partial: true, + first_min_partial_amount: 100, + reference_id: "#425", + description: "Payment for policy no #23456", + customer: { + name: "", + contact: "", + email: "" + }, + notify: { + sms: true, + email: true + }, + reminder_enable: false +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment_link.create({ + "amount": 1000, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#425", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": false +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 1000, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#425", + "description": "Payment for policy no #23456", + "customer": map[string]interface{}{ + "name": "", + "contact": "", + "email": "", + }, + "notify": map[string]interface{}{ + "sms": true, + "email": true, + }, + "reminder_enable": false + } +body, err := client.PaymentLink.Create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +para_attr = { + "amount": 1000, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#425", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": false +} + +Razorpay.headers = {"Content-type" => "application/json"} + +Razorpay::PaymentLink.create(para_attr.to_json) + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +JSONObject paymentLinkRequest = new JSONObject(); +paymentLinkRequest.put("amount",3400); +paymentLinkRequest.put("currency","INR"); +paymentLinkRequest.put("accept_partial",true); +paymentLinkRequest.put("reference_id","#aasasw8"); +paymentLinkRequest.put("first_min_partial_amount",100); +paymentLinkRequest.put("description","Payment for policy no #23456"); +JSONObject customer = new JSONObject(); +customer.put("name",""); +customer.put("contact",""); +customer.put("email",""); +paymentLinkRequest.put("customer",customer); +JSONObject notify = new JSONObject(); +notify.put("sms",true); +notify.put("email",true); +paymentLinkRequest.put("notify",notify); +paymentLinkRequest.put("reminder_enable",false); + +PaymentLink payment = razorpay.paymentLink.create(paymentLinkRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentLinkRequest = new Dictionary(); +paymentLinkRequest.Add("amount",3400); +paymentLinkRequest.Add("currency","INR"); +paymentLinkRequest.Add("accept_partial",true); +paymentLinkRequest.Add("reference_id","#aasasw8"); +paymentLinkRequest.Add("first_min_partial_amount",100); +paymentLinkRequest.Add("description","Payment for policy no #23456"); +Dictionary customer = new Dictionary(); +customer.Add("contact",""); +customer.Add("name",""); +customer.Add("email",""); +paymentLinkRequest.Add("customer",customer); +Dictionary notify = new Dictionary(); +notify.Add("sms",true); +notify.Add("email",true); +paymentLinkRequest.Add("notify",notify); +paymentLinkRequest.Add("reminder_enable",false); + +PaymentLink paymentlink = client.PaymentLink.Create(paymentLinkRequest); +``` + +### Response + +### Parameters + +`amount` _mandatory_ +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. + +`currency` _optional_ +: `string` A three-letter ISO code for the currency in which you want to accept the payment. For example, INR. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +. + +. For example, if an amount of is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. Must be passed along with `accept_partial` parameter. + +`description` _optional_ +: `string` A brief description of the Payment Link. The maximum character limit supported is 2048. + +`customer` _optional_ +: `json object` Customer details + + `name` _optional_ + : `string` The customer's name. + + `email` _optional_ + : `string` The customer's email address. + + `contact` _optional_ + : `string` The customer's phone number. + +`notify` _optional_ +: `array` Defines who handles Payment Link notification. + + `sms` _optional_ + : `boolean` Defines who handles the SMS notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + + `email` _optional_ + : `boolean` Defines who handles the email notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + +`reminder_enable` _optional_ +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. diff --git a/llm-content/api/payments/payment-links/rename-checkout-labels.md b/llm-content/api/payments/payment-links/rename-checkout-labels.md new file mode 100644 index 00000000..69c178b2 --- /dev/null +++ b/llm-content/api/payments/payment-links/rename-checkout-labels.md @@ -0,0 +1,656 @@ +--- +title: Rename Labels in Checkout Section +description: Customise and rename the labels in the Checkout Section of the Payment Links payment request page using Razorpay APIs. +--- + +# Rename Labels in Checkout Section + +## Rename Labels in Checkout Section + +Use this endpoint to change the labels for the fields related to partial payments. + +- When you enable partial payments for a Payment Link, the following fields that appear in the payment request page are `Pay in full`, `Make payments in parts`, `Pay some now and the remaining later` and `Minimum first amount`. + +- You can replace the labels for these fields with custom labels that are specific to your business use case. You may even display labels in a different language. + +### Request + +``` curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payment_links/ \ +-H 'Content-type: application/json' \ +-d '{ + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#421", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + #customisation parameters start below# + "options": { + "checkout": { + "partial_payment": { + "min_amount_label": "Minimum Money to be paid", + "partial_amount_label": "Pay in parts", + "partial_amount_description": "Pay at least ₹100", + "full_amount_label": "Pay the entire amount" + } + } + } +}' + +```php: PHP +$api = new Api($key_id, $secret); + +$api->paymentLink->create(array('amount'=>500, 'currency'=>'', 'accept_partial'=>true, 'first_min_partial_amount'=>100, 'description' => 'For XYZ purpose', 'customer' => array('name'=>'', 'email' => '', 'contact'=>''), 'notify'=>array('sms'=>true, 'email'=>true) ,'reminder_enable'=>true , 'options'=>array('checkout'=>array('partial_payment'=>array('min_amount_label'=>'Minimum Money to be paid', 'partial_amount_label'=>'Pay in parts', 'partial_amount_description'=>'Pay at least ₹100', 'full_amount_label'=>'Pay the entire amount'))))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.paymentLink.create({ + amount: 1000, + currency: "", + accept_partial: true, + first_min_partial_amount: 100, + reference_id: "#412232", + description: "Payment for policy no #23456", + expire_by: 1599193801, + customer: { + name: "", + contact: "", + email: "" + }, + notify: { + sms: true, + email: true + }, + reminder_enable: true, + options: { + hosted_page: { + label: { + receipt: "Ref No.", + description: "Course Name", + amount_payable: "Course Fee Payable", + amount_paid: "Course Fee Paid", + partial_amount_due: "Fee Installment Due", + partial_amount_paid: "Fee Installment Paid", + expire_by: "Pay Before", + expired_on: "Link Expired. Please contact Admin", + amount_due: "Course Fee Due" + }, + show_preferences: { + issued_to: false + } + } + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment_link.create({ + "amount": 500, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "description": "For XYZ purpose", + "customer": { + "name": "", + "email": "", + "contact": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "partial_payment": { + "min_amount_label": "Minimum Money to be paid", + "partial_amount_label": "Pay in parts", + "partial_amount_description": "Pay at least ₹100", + "full_amount_label": "Pay the entire amount" + } + } + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#421", + "description": "Payment for policy no #23456", + "customer": map[string]interface{}{ + "name": "", + "contact": "", + "email": "", + }, + "notify": map[string]interface{}{ + "sms": true, + "email": true, + }, + "reminder_enable": true, + "options": map[string]interface{}{ + "checkout": map[string]interface{}{ + "partial_payment": map[string]interface{}{ + "min_amount_label": "Minimum Money to be paid", + "partial_amount_label": "Pay in parts", + "partial_amount_description": "Pay at least ₹100", + "full_amount_label": "Pay the entire amount", + }, + }, + }, +} +body, err := client.PaymentLink.Create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +para_attr = { + "amount": 500, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "description": "For XYZ purpose", + "customer": { + "name": "", + "email": "", + "contact": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "partial_payment": { + "min_amount_label": "Minimum Money to be paid", + "partial_amount_label": "Pay in parts", + "partial_amount_description": "Pay at least ₹100", + "full_amount_label": "Pay the entire amount" + } + } + } +} + +Razorpay.headers = {"Content-type" => "application/json"} + +Razorpay::PaymentLink.create(para_attr.to_json) + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +JSONObject paymentLinkRequest = new JSONObject(); +paymentLinkRequest.put("amount",1000); +paymentLinkRequest.put("currency",""); +paymentLinkRequest.put("accept_partial",true); +paymentLinkRequest.put("reference_id","#aasasw8"); +paymentLinkRequest.put("first_min_partial_amount",100); +paymentLinkRequest.put("description","Payment for policy no #23456"); +JSONObject customer = new JSONObject(); +customer.put("name",""); +customer.put("contact",""); +customer.put("email",""); +paymentLinkRequest.put("customer",customer); +JSONObject notify = new JSONObject(); +notify.put("sms",true); +notify.put("email",true); +paymentLinkRequest.put("notify",notify); +paymentLinkRequest.put("reminder_enable",true); + +JSONObject options = new JSONObject(); +JSONObject notes = new JSONObject(); +notes.put("branch","Acme Corp Bangalore North"); +notes.put("name",""); + +JSONObject partialPayment = new JSONObject(); +partialPayment.put("min_amount_label","Minimum Money to be pai"); +partialPayment.put("partial_amount_label","Pay in parts"); +partialPayment.put("partial_amount_description","Pay at least ₹100"); +partialPayment.put("full_amount_label","Pay the entire amount"); +JSONObject checkout = new JSONObject(); +checkout.put("partial_payment",partialPayment); +options.put("checkout",checkout); +paymentLinkRequest.put("options",options); + +PaymentLink payment = razorpay.paymentLink.create(paymentLinkRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentLinkRequest = new Dictionary(); +paymentLinkRequest.Add("amount", 1000); +paymentLinkRequest.Add("currency", ""); +paymentLinkRequest.Add("accept_partial", true); +paymentLinkRequest.Add("reference_id", "#aasasw8"); +paymentLinkRequest.Add("first_min_partial_amount", 100); +paymentLinkRequest.Add("description", "Payment for policy no #23456"); + +Dictionary customer = new Dictionary(); +customer.Add("contact", "+919999999999"); +customer.Add("name", ""); +customer.Add("email", ""); + +paymentLinkRequest.Add("customer", customer); + +Dictionary notify = new Dictionary(); +notify.Add("sms", true); +notify.Add("email", true); + +paymentLinkRequest.Add("notify", notify); +paymentLinkRequest.Add("reminder_enable", true); + +Dictionary notes = new Dictionary(); +Dictionary options = new Dictionary(); + +notes.Add("branch", "Acme Corp Bangalore North"); +notes.Add("name", "Bhairav Kumar"); + +Dictionary partialPayment = new Dictionary(); ; +partialPayment.Add("min_amount_label", "Minimum Money to be pai"); +partialPayment.Add("partial_amount_label", "Pay in parts"); +partialPayment.Add("partial_amount_description", "Pay at least ₹100"); +partialPayment.Add("full_amount_label", "Pay the entire amount"); +Dictionary checkout = new Dictionary(); +checkout.Add("partial_payment", partialPayment); +options.Add("checkout", checkout); +paymentLinkRequest.Add("options", options); + +PaymentLink paymentlink = client.PaymentLink.Create(paymentLinkRequest); +``` + +### Response + +```json: Success +{ + "accept_partial": true, + "amount": 1000, + "amount_paid": 0, + "callback_method": "", + "callback_url": "", + "cancelled_at": 0, + "created_at": 1596193199, + "currency": "", + "customer": { + "contact": "", + "email": "", + "name": "" + }, + "deleted_at": 0, + "description": "Payment for policy no #23456", + "expire_by": 0, + "expired_at": 0, + "first_min_partial_amount": 100, + "id": "plink_FL4vbXVKfW7PAz", + "notes": null, + "notify": { + "email": true, + "sms": true + }, + "payments": null, + "reference_id": "#42321", + "reminder_enable": true, + "reminders": [], + "short_url": "https://rzp.io/i/F4GC9z1", + "source": "", + "source_id": "", + "status": "created", + "updated_at": 1596193199, + "user_id": "" +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`amount` _mandatory_ +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _optional_ +: `string` A three-letter ISO code for the currency in which you want to accept the payment. For example, INR. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +. For example, if an amount of is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. Must be passed along with `accept_partial` parameter. + +`upi_link` _mandatory for creating UPI Payment Link_ +: `boolean` Must be set to `true` for creating UPI Payment Link. If the `upi_link` parameter is not passed or passed with value as false, a Standard Payment Link will be created. Possible values: + - `true`: Creates a UPI Payment Link. + - `false`: Creates a Standard Payment Link. + + +`description` _optional_ +: `string` A brief description of the Payment Link. The maximum character limit supported is 2048. + +`reference_id` _optional_ +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`customer` _optional_ +: `json object` Customer details + + `name` _optional_ + : `string` The customer's name. + + `email` _optional_ + : `string` The customer's email address. + + `contact` _optional_ + : `string` The customer's phone number. + +`expire_by` _optional_ +: `integer` Timestamp, in Unix, at which the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`notify` _optional_ +: `array` Defines who handles Payment Link notification. + + `sms` _optional_ + : `boolean` Defines who handles the SMS notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + + `email` _optional_ + : `boolean` Defines who handles the email notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Payment Link for Groceries.”`. + +`callback_url` _optional_ +: `string` If specified, adds a redirect URL to the Payment Link. Once customers completes the payment, they are redirected to the specified URL. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> If the `callback_url` is passed, it must be passed in the correct format. That is, it should contain a URL. +> +> + +`callback_method` _conditionally mandatory_ +: `string` If `callback_url` parameter is passed, callback_method must be passed with the value `get`. + +`reminder_enable` _optional_ +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`options` _mandatory_ +: `array` Options to rename the labels for partial payment fields in the checkout form. Parent parameter under which the `checkout` and `partial_payment` child parameters must be passed. + + `checkout` _mandatory_ + : `array` The parameter for the Checkout section. `partial_payment` is its child parameter. + + `accept_partial` + : `array` Modifies labels of fields related to partial payments. + + `min_amount_label` _optional_ + : `string` Changes the label for the `Minimum first amount` field. + + `partial_amount_label` _optional_ + : `string` Changes the label for the `Make payment in parts` field. + + `partial_amount_description` _optional_ + : `string` Changes the label for the `Pay some now and the remaining later` field. + + `full_amount_label` _optional_ + : `string` Changes the label for the `Pay in full` field. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +The api \{key/secret\} provided is invalid +* code: 4xx +* description: There is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure that: - The API Keys are active and entered correctly. +- There are no white-spaces before or after the keys. + +The \{input field\} is required +* code: 4xx +* description: A mandatory field is empty. +* solution: Ensure all mandatory fields and values are present. + +wrong input fields sent. +* code: 400 +* description: When wrong input fields are sent during Payment Link creation. +* solution: Ensure that the input fields are added correctly. Refer to these [request parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#request-parameters) on how to add correct input fields. + +payment link creation with reference ID already attempted +* code: 400 +* description: An existing reference id has been passed. +* solution: Ensure that a unique reference id is used for all Payment Links. + +timestamp must be atleast 15 minutes in future +* code: 400 +* description: The epoch time passed is less than 15 minutes from the current time. +* solution: The `close_by` time should be more than 15 minutes from the current time. + +Invalid access: Cannot create a payment link in live mode, as live mode is disabled for merchant. +* code: 400 +* description: Occurs when you try to create a Payment Link in Live mode, but live mode is disabled for you +* solution: Raise a request to our [support team](https://razorpay.com/support/) to get live mode enabled for you. + +Invalid access: Cannot create a payment link, as Merchant is Suspended. +* code: 400 +* description: Occurs when you try to create a Payment Link when you have been been suspended. +* solution: Raise a request to our [support team](https://razorpay.com/support/) to be reinstated. + +value: the length must not be greater than 255. +* code: 400 +* description: When the notes length is greater than 255 characters during Payment Link creation. +* solution: Please create a payment link with notes values less than 255 characters. diff --git a/llm-content/api/payments/payment-links/rename-payment-details-labels.md b/llm-content/api/payments/payment-links/rename-payment-details-labels.md new file mode 100644 index 00000000..d7f9ec23 --- /dev/null +++ b/llm-content/api/payments/payment-links/rename-payment-details-labels.md @@ -0,0 +1,678 @@ +--- +title: Rename Labels in Payment Details Section +description: Customise and rename the labels in the Payment Details section of the Payment Links payment request page using Razorpay APIs. +--- + +# Rename Labels in Payment Details Section + +## Rename Labels in Payment Details Section + +Use this endpoint to change the labels for fields on the Payment Details section of the Payment Link's payment request page. + +- You may even display labels in a different language for example, Hindi or Tamil. + +- Given below is the list of fields for which you can rename labels. + - `PAYMENT FOR` + - `RECEIPT NO.` + - `AMOUNT PAYABLE` + - `EXPIRES ON` + - `EXPIRED ON` + - `DUE` + - `PAID` + - `AMOUNT PAID` + - `ISSUED TO` + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payment_links/ \ +-H 'Content-type: application/json' \ +-d '{ + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#412232", + "description": "Payment for policy no #23456", + "expire_by": 1599193801, + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "hosted_page": { + "label": { + "receipt": "Ref No.", + "description": "Course Name", + "amount_payable": "Course Fee Payable", + "amount_paid": "Course Fee Paid", + "partial_amount_due": "Fee Installment Due", + "partial_amount_paid": "Fee Installment Paid", + "expire_by": "Pay Before", + "expired_on": "Link Expired. Please contact Admin", + "amount_due": "Course Fee Due" + }, + "show_preferences": { + "issued_to": false + } + } + } +}' + +```php: PHP +$api = new Api($key_id, $secret); + +$api->paymentLink->create(array('amount'=>500, 'currency'=>'', 'accept_partial'=>true, 'first_min_partial_amount'=>100, 'description' => 'For XYZ purpose', 'customer' => array('name'=>'', 'email' => '', 'contact'=>''), 'notify'=>array('sms'=>true, 'email'=>true) ,'reminder_enable'=>true , 'options'=>array('hosted_page'=>array('label'=>array('receipt'=>'Ref No.', 'description'=>'Course Name', 'amount_payable'=>'Course Fee Payable', 'amount_paid'=>'Course Fee Paid', 'partial_amount_due'=>'Fee Installment Due', 'partial_amount_paid'=>'Fee Installment Paid', 'expire_by'=>'Pay Before', 'expired_on'=>'1632223497','amount_due'=>'Course Fee Due'), 'show_preferences'=>array('issued_to'=>false))))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.paymentLink.create({ + amount: 1000, + currency: "", + accept_partial: true, + first_min_partial_amount: 100, + reference_id: "#421", + description: "Payment for policy no #23456", + customer: { + name: "", + contact: "", + email: "" + }, + notify: { + sms: true, + email: true + }, + reminder_enable: true, + options: { + checkout: { + partial_payment: { + min_amount_label: "Minimum Money to be paid", + partial_amount_label: "Pay in parts", + partial_amount_description: "Pay at least ₹100", + full_amount_label: "Pay the entire amount" + } + } + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment_link.create({ + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#421", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "partial_payment": { + "min_amount_label": "Minimum Money to be paid", + "partial_amount_label": "Pay in parts", + "partial_amount_description": "Pay at least ₹100", + "full_amount_label": "Pay the entire amount" + } + } + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#412232", + "description": "Payment for policy no #23456", + "expire_by": 1599193801, + "customer": map[string]interface{}{ + "name": "", + "contact": "", + "email": "", + }, + "notify": map[string]interface{}{ + "sms": true, + "email": true, + }, + "reminder_enable": true, + "options": map[string]interface{}{ + "hosted_page": map[string]interface{}{ + "label": map[string]interface{}{ + "receipt": "Ref No.", + "description": "Course Name", + "amount_payable": "Course Fee Payable", + "amount_paid": "Course Fee Paid", + "partial_amount_due": "Fee Installment Due", + "partial_amount_paid": "Fee Installment Paid", + "expire_by": "Pay Before", + "expired_on": "Link Expired. Please contact Admin", + "amount_due": "Course Fee Due", + }, + "show_preferences": map[string]interface{}{ + "issued_to": false, + }, + }, + }, +} + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +para_attr = { + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#421", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "checkout": { + "partial_payment": { + "min_amount_label": "Minimum Money to be paid", + "partial_amount_label": "Pay in parts", + "partial_amount_description": "Pay at least ₹100", + "full_amount_label": "Pay the entire amount" + } + } + } +} + +Razorpay.headers = {"Content-type" => "application/json"} + +Razorpay::PaymentLink.create(para_attr.to_json) + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +JSONObject paymentLinkRequest = new JSONObject(); +paymentLinkRequest.put("amount",1000); +paymentLinkRequest.put("currency",""); +paymentLinkRequest.put("accept_partial",true); +paymentLinkRequest.put("reference_id","#aasasw8"); +paymentLinkRequest.put("first_min_partial_amount",100); +paymentLinkRequest.put("description","Payment for policy no #23456"); +JSONObject customer = new JSONObject(); +customer.put("name",""); +customer.put("contact",""); +customer.put("email",""); +paymentLinkRequest.put("customer",customer); +JSONObject notify = new JSONObject(); +notify.put("sms",true); +notify.put("email",true); +paymentLinkRequest.put("notify",notify); +paymentLinkRequest.put("reminder_enable",true); + +JSONObject options = new JSONObject(); +JSONObject notes = new JSONObject(); +notes.put("branch","Acme Corp Bangalore North"); +notes.put("name","Bhairav Kumar"); + +JSONObject partialPayment = new JSONObject(); +partialPayment.put("min_amount_label","Minimum Money to be paid"); +partialPayment.put("partial_amount_label","Pay in parts"); +partialPayment.put("partial_amount_description","Pay at least ₹100"); +partialPayment.put("full_amount_label","Pay the entire amount"); +JSONObject checkout = new JSONObject(); +checkout.put("partial_payment",partialPayment); +options.put("checkout",checkout); +paymentLinkRequest.put("options",options); + +PaymentLink payment = razorpay.paymentLink.create(requestRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentLinkRequest = new Dictionary(); +paymentLinkRequest.Add("amount", 1000); +paymentLinkRequest.Add("currency", ""); +paymentLinkRequest.Add("accept_partial", true); +paymentLinkRequest.Add("reference_id", "#aasasw8"); +paymentLinkRequest.Add("first_min_partial_amount", 100); +paymentLinkRequest.Add("description", "Payment for policy no #23456"); +Dictionary customer = new Dictionary(); +customer.Add("contact", "+919999999999"); +customer.Add("name", ""); +customer.Add("email", ""); +paymentLinkRequest.Add("customer", customer); +Dictionary notify = new Dictionary(); +notify.Add("sms", true); +notify.Add("email", true); +paymentLinkRequest.Add("notify", notify); +paymentLinkRequest.Add("reminder_enable", true); + +Dictionary options = new Dictionary(); +Dictionary notes = new Dictionary(); +notes.Add("branch", "Acme Corp Bangalore North"); +notes.Add("name", "Bhairav Kumar"); + +Dictionary partialPayment = new Dictionary(); +partialPayment.Add("min_amount_label", "Minimum Money to be paid"); +partialPayment.Add("partial_amount_label", "Pay in parts"); +partialPayment.Add("partial_amount_description", "Pay at least ₹100"); +partialPayment.Add("full_amount_label", "Pay the entire amount"); +Dictionary checkout = new Dictionary(); +checkout.Add("partial_payment", partialPayment); +options.Add("checkout", checkout); +paymentLinkRequest.Add("options", options); + +PaymentLink paymentlink = client.PaymentLink.Create(paymentLinkRequest); + +```curl: Request - Hindi +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payment_links/ \ +-H 'Content-type: application/json' \ +-d '{ + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#423", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + #customisation parameters start below# + "options":{ + "hosted_page":{ + "label":{ + "receipt":"रसीद संख्या", + "description":"कोर्स का नाम", + "amount_payable":"शुल्क भुगतान", + "amount_paid":"शुल्क जमा ", + "partial_amount_due":"बाकी शुल्क किस्त", + "partial_amount_paid":"शुल्क किस्त जमा", + "expire_by":"शुल्क पेमेंट लास्ट डेट", + "expired_on":"लिंक की समय सीमा समाप्त हो गई है। कृपया व्यवस्थापक से संपर्क करें", + "amount_due": "बाकी शुल्क " + }, + "show_preferences":{ + "issued_to":false + } + } + } +}' +```curl: Request - Tamil +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payment_links/ \ +-H 'Content-type: application/json' \ +-d '{ + "amount": 1000, + "currency": "", + "accept_partial": true, + "first_min_partial_amount": 100, + "reference_id": "#424", + "description": "Payment for policy no #23456", + "customer": { + "name": "", + "contact": "", + "email": "" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + #customisation parameters start below# + "options":{ + "hosted_page":{ + "label":{ + "receipt":"ரசீது எண்", + "description":"கடன் வகை", + "amount_payable":"செலுத்த வேண்டிய கடன் தவணைத் தொகை", + "amount_paid":"செலுத்தப்பட்ட கடன் தவணைத் தொகை", + "expire_by":"கடைசி தேதி", + "expired_on":"இணைப்பு காலாவதியானது. நிர்வாகியைத் தொடர்பு கொள்ளவும்", + "amount_due": "மீதமுள்ள கடன் தவணைத் தொகை" + }, + "show_preferences":{ + "issued_to":false + } + } + } +}' +``` + +### Response + +### Parameters + +`amount` _mandatory_ +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _optional_ +: `string` A three-letter ISO code for the currency in which you want to accept the payment. For example, INR. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +. For example, if an amount of is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. Must be passed along with `accept_partial` parameter. + +`upi_link` _mandatory for creating UPI Payment Link_ +: `boolean` Must be set to `true` for creating UPI Payment Link. If the `upi_link` parameter is not passed or passed with value as false, a Standard Payment Link will be created. Possible values: + - `true`: Creates a UPI Payment Link. + - `false`: Creates a Standard Payment Link. + + +`description` _optional_ +: `string` A brief description of the Payment Link. The maximum character limit supported is 2048. + +`reference_id` _optional_ +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`customer` _optional_ +: `json object` Customer details + + `name` _optional_ + : `string` The customer's name. + + `email` _optional_ + : `string` The customer's email address. + + `contact` _optional_ + : `string` The customer's phone number. + +`expire_by` _optional_ +: `integer` Timestamp, in Unix, at which the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`notify` _optional_ +: `array` Defines who handles Payment Link notification. + + `sms` _optional_ + : `boolean` Defines who handles the SMS notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + + `email` _optional_ + : `boolean` Defines who handles the email notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Payment Link for Groceries.”`. + +`callback_url` _optional_ +: `string` If specified, adds a redirect URL to the Payment Link. Once customers completes the payment, they are redirected to the specified URL. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> If the `callback_url` is passed, it must be passed in the correct format. That is, it should contain a URL. +> +> + +`callback_method` _conditionally mandatory_ +: `string` If `callback_url` parameter is passed, callback_method must be passed with the value `get`. + +`reminder_enable` _optional_ +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +The api \{key/secret\} provided is invalid +* code: 4xx +* description: There is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure that: - The API Keys are active and entered correctly. +- There are no white-spaces before or after the keys. + +The \{input field\} is required +* code: 4xx +* description: A mandatory field is empty. +* solution: Ensure all mandatory fields and values are present. + +wrong input fields sent. +* code: 400 +* description: When wrong input fields are sent during Payment Link creation. +* solution: Ensure that the input fields are added correctly. Refer to these [request parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#request-parameters) on how to add correct input fields. + +payment link creation with reference ID already attempted +* code: 400 +* description: An existing reference id has been passed. +* solution: Ensure that a unique reference id is used for all Payment Links. + +timestamp must be atleast 15 minutes in future +* code: 400 +* description: The epoch time passed is less than 15 minutes from the current time. +* solution: The `close_by` time should be more than 15 minutes from the current time. + +Invalid access: Cannot create a payment link in live mode, as live mode is disabled for merchant. +* code: 400 +* description: Occurs when you try to create a Payment Link in Live mode, but live mode is disabled for you +* solution: Raise a request to our [support team](https://razorpay.com/support/) to get live mode enabled for you. + +Invalid access: Cannot create a payment link, as Merchant is Suspended. +* code: 400 +* description: Occurs when you try to create a Payment Link when you have been been suspended. +* solution: Raise a request to our [support team](https://razorpay.com/support/) to be reinstated. + +value: the length must not be greater than 255. +* code: 400 +* description: When the notes length is greater than 255 characters during Payment Link creation. +* solution: Please create a payment link with notes values less than 255 characters. diff --git a/llm-content/api/payments/payment-links/resend.md b/llm-content/api/payments/payment-links/resend.md new file mode 100644 index 00000000..e5c288ea --- /dev/null +++ b/llm-content/api/payments/payment-links/resend.md @@ -0,0 +1,112 @@ +--- +title: Send or Resend Notifications +description: Send or Resend notifications to your customers via email and SMS using this endpoint. +--- + +# Send or Resend Notifications + +## Send or Resend Notifications + +Use this endpoint to send or resend notifications to your customers via email and SMS. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payment_links/plink_Et2G7ymGcTTuM5/notify_by/sms \ + +```php: PHP +$api = new Api($key_id, $secret); + +$api->paymentLink->fetch($paymentLinkId)->notifyBy($medium)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.paymentLink.notifyBy(paymentLinkId, medium) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment_link.notifyBy(paymentLinkId, medium) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.PaymentLink.NotifyBy("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +paymentLinkId = "plink_ExjpAUN3gVHrPJ" + +medium = "email" + +Razorpay::PaymentLink.notify_by(paymentLinkId, medium) + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +String paymentLinkId = "plink_FMbhpT6nqDjDei"; + +String medium = "email"; + +PaymentLink paymentlink = razorpay.paymentLink.notifyBy(paymentLinkId,medium); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentLinkId = "plink_Z6t7VFTb9xHeOs"; + +string = "email"; + +PaymentLink paymentlink = client.PaymentLink.Fetch(paymentLinkId).NotifyBy(medium); +``` + +### Response + +```json: Success +{ + "success": true +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "invalid input [id] = [link_QX7wiVUHdcOOoW]", + "metadata": [], + "reason": null, + "source": null, + "step": null + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the Payment Link that should be resent. + +`medium` _mandatory_ +: `string` Medium through which the Payment Link must be resent. Possible values: + - `sms` + - `email` + +### Parameters + +`success` +: `boolean` Indicates whether the notification was sent successfully. Possible value is `true`, which means the notification was sent successfully. + +### Errors + +not a valid notification medium +* code: 400 +* description: Occurs when you try to resend a Payment Link to customers and medium of notification is not valid. +* solution: Ensure that you use the correct medium to resend a payment link. diff --git a/llm-content/api/payments/payment-links/third-party-validation.md b/llm-content/api/payments/payment-links/third-party-validation.md new file mode 100644 index 00000000..c04f6d3f --- /dev/null +++ b/llm-content/api/payments/payment-links/third-party-validation.md @@ -0,0 +1,358 @@ +--- +title: Perform Third-Party Validation Using Payment Links +description: Use Razorpay Payment Links APIs to perform third-party validation of bank accounts provided by your customers. +--- + +# Perform Third-Party Validation Using Payment Links + +## Perform Third-Party Validation Using Payment Links + +Use this endpoint to comply with the regulatory guidelines in a manner such that the customers make payments only from their registered bank account. + +- TPV stands for Third Party Validation. This feature is made available only to businesses operating in Mutual fund, Securities or Brokerage sectors. + +- You can perform third party validation using Payment Links by passing the `options` parameter along with the Create Payment Links API request. Check the [use cases to perform TPV using Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/use-cases.md). + + to get this feature activated on your Razorpay account. + +### Response + +### Parameters + +`amount` _mandatory_ +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _optional_ +: `string` A three-letter ISO code for the currency in which you want to accept the payment. For example, INR. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +. For example, if an amount of is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. Must be passed along with `accept_partial` parameter. + +`upi_link` _mandatory for creating UPI Payment Link_ +: `boolean` Must be set to `true` for creating UPI Payment Link. If the `upi_link` parameter is not passed or passed with value as false, a Standard Payment Link will be created. Possible values: + - `true`: Creates a UPI Payment Link. + - `false`: Creates a Standard Payment Link. + + +`description` _optional_ +: `string` A brief description of the Payment Link. The maximum character limit supported is 2048. + +`reference_id` _optional_ +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`customer` _optional_ +: `json object` Customer details + + `name` _optional_ + : `string` The customer's name. + + `email` _optional_ + : `string` The customer's email address. + + `contact` _optional_ + : `string` The customer's phone number. + +`expire_by` _optional_ +: `integer` Timestamp, in Unix, at which the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`notify` _optional_ +: `array` Defines who handles Payment Link notification. + + `sms` _optional_ + : `boolean` Defines who handles the SMS notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + + `email` _optional_ + : `boolean` Defines who handles the email notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Payment Link for Groceries.”`. + +`callback_url` _optional_ +: `string` If specified, adds a redirect URL to the Payment Link. Once customers completes the payment, they are redirected to the specified URL. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> If the `callback_url` is passed, it must be passed in the correct format. That is, it should contain a URL. +> +> + +`callback_method` _conditionally mandatory_ +: `string` If `callback_url` parameter is passed, callback_method must be passed with the value `get`. + +`reminder_enable` _optional_ +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`options` _mandatory_ +: `array` Options to configure the customer's bank account details in the Payment Link. Parent parameter under which the `order` child parameter must be passed. + + `order` _mandatory_ + : `array` The parameter under which the customer's bank account details must be configured to perform third party validation. + + `bank_account` _mandatory_ + : `array` Parent parameter under which the customer's bank account details must be passed. + + `account_number` _mandatory_ + : `string` The bank account number through which the customer is expected to make the payment. + + `name` _mandatory_ + : `string` The name of the account holder. + + `ifsc` _mandatory_ + : `string` The IFSC associated with the bank account through which the customer is expected to make the payment. + + `method` _mandatory_ + : `string` Use this parameter to control which payment methods must be shown on the Checkout. Possible values: + - `netbanking` + - `upi` + + +> **WARN** +> +> +> **Note** +> +> Do not pass this parameter if allowing customers to make payments using either `netbanking` or `upi` as the payment method. +> + + `netbanking` + : `boolean` Used to enable or disable `netbanking` as a payment method the Checkout. Possible values are: + - `true` (default): Displays netbanking on the Checkout. + - `false`: Hides netbanking on the Checkout. + + `upi` + : `boolean` Used to enable or disable `UPI` as a payment method on the Checkout. Possible values are: + - `true` (default): Displays UPI on the Checkout. + - `false`: Hides UPI on the Checkout. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +The api \{key/secret\} provided is invalid +* code: 4xx +* description: There is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure that: - The API Keys are active and entered correctly. +- There are no white-spaces before or after the keys. + +The \{input field\} is required +* code: 4xx +* description: A mandatory field is empty. +* solution: Ensure all mandatory fields and values are present. + +wrong input fields sent. +* code: 400 +* description: When wrong input fields are sent during Payment Link creation. +* solution: Ensure that the input fields are added correctly. Refer to these [request parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#request-parameters) on how to add correct input fields. + +payment link creation with reference ID already attempted +* code: 400 +* description: An existing reference id has been passed. +* solution: Ensure that a unique reference id is used for all Payment Links. + +timestamp must be atleast 15 minutes in future +* code: 400 +* description: The epoch time passed is less than 15 minutes from the current time. +* solution: The `close_by` time should be more than 15 minutes from the current time. + +Invalid access: Cannot create a payment link in live mode, as live mode is disabled for merchant. +* code: 400 +* description: Occurs when you try to create a Payment Link in Live mode, but live mode is disabled for you +* solution: Raise a request to our [support team](https://razorpay.com/support/) to get live mode enabled for you. + +Invalid access: Cannot create a payment link, as Merchant is Suspended. +* code: 400 +* description: Occurs when you try to create a Payment Link when you have been been suspended. +* solution: Raise a request to our [support team](https://razorpay.com/support/) to be reinstated. + +value: the length must not be greater than 255. +* code: 400 +* description: When the notes length is greater than 255 characters during Payment Link creation. +* solution: Please create a payment link with notes values less than 255 characters. diff --git a/llm-content/api/payments/payment-links/transfer-payments.md b/llm-content/api/payments/payment-links/transfer-payments.md new file mode 100644 index 00000000..ae9f1be9 --- /dev/null +++ b/llm-content/api/payments/payment-links/transfer-payments.md @@ -0,0 +1,707 @@ +--- +title: Transfer Payments Received Using Payment Links +description: Directly transfer the payments received from customers via Payment Links to your linked accounts using Razorpay APIs. +--- + +# Transfer Payments Received Using Payment Links + +## Transfer Payments Received Using Payment Links + +Use this endpoint to transfer the payments received from your customers automatically to your linked accounts. Know how to [create a linked account and transfer payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/transfer-payments.md). + +### Request + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/payment_links +-H 'content-type: application/json' +-d '{ + "amount": 1500, + "currency": "INR", + "accept_partial": false, + "reference_id": "#aasasw8", + "description": "Payment for policy no #23456", + "customer": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "order": { + "transfers": [ + { + "account": "acc_CPRsN1LkFccllA", + "amount": 500, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Bhairav Kumar" + }, + "linked_account_notes": [ + "branch" + ] + }, + { + "account": "acc_CNo3jSI8OkFJJJ", + "amount": 500, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Saurav Kumar" + }, + "linked_account_notes": [ + "branch" + ] + } + ] + } + } +}' + +```php: PHP +$api = new Api($key_id, $secret); + +$api->paymentLink->create(array('amount'=>20000, 'currency'=>'INR', 'accept_partial'=>false, 'description' => 'For XYZ purpose', 'customer' => array('name'=>'Gaurav Kumar', 'email' => 'gaurav.kumar@example.com', 'contact'=>'+919000090000'), 'notify'=>array('sms'=>true, 'email'=>true) ,'reminder_enable'=>true , 'options'=>array('order'=>array('transfers'=>array('account'=>'acc_CPRsN1LkFccllA', 'amount'=>500, 'currency'=>'INR', 'notes'=>array('branch'=>'Acme Corp Bangalore North', 'name'=>'Bhairav Kumar' ,'linked_account_notes'=>array('branch'))), array('account'=>'acc_CNo3jSI8OkFJJJ', 'amount'=>500, 'currency'=>'INR', 'notes'=>array('branch'=>'Acme Corp Bangalore North', 'name'=>'Saurav Kumar' ,'linked_account_notes'=>array('branch'))))))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.paymentLink.create({ + amount: 20000, + currency: "INR", + accept_partial: false, + description: "For XYZ purpose", + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: "+919000090000" + }, + notify: { + sms: true, + email: true + }, + reminder_enable: true, + options: { + order: [ + { + account: "acc_CNo3jSI8OkFJJJ", + amount: 500, + currency: "INR", + notes: { + branch: "Acme Corp Bangalore North", + name: "Saurav Kumar", + linked_account_notes: [ + "branch" + ] + } + } + ] + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment_link.create({ + "amount": 20000, + "currency": "INR", + "accept_partial": false, + "description": "For XYZ purpose", + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "order": [ + { + "account": "acc_CNo3jSI8OkFJJJ", + "amount": 500, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Saurav Kumar", + "linked_account_notes": [ + "branch" + ] + } + } + ] + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 1500, + "currency": "INR", + "accept_partial": false, + "reference_id": "#aasasw8", + "description": "Payment for policy no #23456", + "customer": map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + }, + "notify": map[string]interface{}{ + "sms": true, + "email": true, + }, + "reminder_enable": true, + "options": map[string]interface{}{ + "order": map[string]interface{}{ + "transfers": []interface{}{ + map[string]interface{}{ + "account": "acc_HjVXbtpSCIxENR", + "amount": 500, + "currency": "INR", + "notes": map[string]interface{}{ + "branch": "Acme Corp Bangalore North", + "name": "Bhairav Kumar", + }, + "linked_account_notes": []string{ + "branch", + }, + }, + map[string]interface{}{ + "account": "acc_HalyQGZh9ZyiGg", + "amount": 500, + "currency": "INR", + "notes": map[string]interface{}{ + "branch": "Acme Corp Bangalore South", + "name": "Saurav Kumar", + }, + "linked_account_notes": []string{ + "branch", + }, + }, + }, + }, + }, + } +body, err := client.PaymentLink.Create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +para_attr = { + "amount": 20000, + "currency": "INR", + "accept_partial": false, + "description": "For XYZ purpose", + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "options": { + "order": [ + { + "account": "acc_CNo3jSI8OkFJJJ", + "amount": 500, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Saurav Kumar", + "linked_account_notes": [ + "branch" + ] + } + } + ] + } +} + +Razorpay.headers = {"Content-type" => "application/json"} + +Razorpay::PaymentLink.create(para_attr.to_json) + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +JSONObject paymentLinkRequest = new JSONObject(); +paymentLinkRequest.put("amount", 1000); +paymentLinkRequest.put("currency", "INR"); +paymentLinkRequest.put("accept_partial", false); +paymentLinkRequest.put("reference_id", "#aasasw8"); +paymentLinkRequest.put("description", "Payment for policy no #23456"); +JSONObject customer = new JSONObject(); +customer.put("name", "+919000090000"); +customer.put("contact", "Gaurav Kumar"); +customer.put("email", "gaurav.kumar@example.com"); +paymentLinkRequest.put("customer", customer); +JSONObject notify = new JSONObject(); +notify.put("sms", true); +notify.put("email", true); +paymentLinkRequest.put("notify", notify); +paymentLinkRequest.put("reminder_enable", true); + +JSONObject options = new JSONObject(); +JSONObject transferRequest = new JSONObject(); +List transfers = new ArrayList (); + +JSONObject transferParams = new JSONObject(); +transferParams.put("account", "acc_I0QRP7PpvaHhpB"); +transferParams.put("amount", 500); +transferParams.put("currency", "INR"); +JSONObject notes = new JSONObject(); +notes.put("branch", "Acme Corp Bangalore North"); +notes.put("name", "Bhairav Kumar"); +transferParams.put("notes", notes); +List linkedAccountNotes = new ArrayList (); +linkedAccountNotes.add("branch"); +transferParams.put("linked_account_notes", linkedAccountNotes); +transfers.add(transferParams); +JSONObject order = new JSONObject(); +order.put("transfer", transfers); +options.put("order", order); +paymentLinkRequest.put("options", options); + +PaymentLink payment = razorpay.paymentLink.create(paymentLinkRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentLinkRequest = new Dictionary(); +paymentLinkRequest.Add("amount", 1000); +paymentLinkRequest.Add("currency", "INR"); +paymentLinkRequest.Add("accept_partial", false); +paymentLinkRequest.Add("reference_id", "#aasasw8"); +paymentLinkRequest.Add("description", "Payment for policy no #23456"); +Dictionary customer = new Dictionary(); +customer.Add("contact", "+919999999999"); +customer.Add("name", "Gaurav Kumar"); +customer.Add("email", "gaurav.kumar@example.com"); +paymentLinkRequest.Add("customer", customer); +Dictionary notify = new Dictionary(); +notify.Add("sms", true); +notify.Add("email", true); +paymentLinkRequest.Add("notify", notify); +paymentLinkRequest.Add("reminder_enable", true); + +Dictionary options = new Dictionary(); +List> transfers = new List>(); +Dictionary transferParams = new Dictionary(); +transferParams.Add("account", "acc_I0QRP7PpvaHhpB"); +transferParams.Add("amount", 500); +transferParams.Add("currency", "INR"); +Dictionary notes = new Dictionary(); +notes.Add("branch", "Acme Corp Bangalore North"); +notes.Add("name", "Bhairav Kumar"); +transferParams.Add("notes", notes); +List linkedAccountNotes = new List(); +linkedAccountNotes.Add("branch"); +transferParams.Add("linked_account_notes", linkedAccountNotes); +transfers.Add(transferParams); +Dictionary order = new Dictionary(); +order.Add("transfers", transfers); +options.Add("order", order); +paymentLinkRequest.Add("options", options); + +PaymentLink paymentlink = client.PaymentLink.Create(paymentLinkRequest); +``` + +### Response + +``` json: Success +{ + "accept_partial": false, + "amount": 1500, + "amount_paid": 0, + "callback_method": "", + "callback_url": "", + "cancelled_at": 0, + "created_at": 1596526969, + "currency": "INR", + "customer": { + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "name": "Gaurav Kumar" + }, + "deleted_at": 0, + "description": "Payment for policy no #23456", + "expire_by": 0, + "expired_at": 0, + "first_min_partial_amount": 0, + "id": "plink_FMbhpT6nqDjDei", + "notes": null, + "notify": { + "email": true, + "sms": true + }, + "payments": null, + "reference_id": "#aasasw8", + "reminder_enable": true, + "reminders": [], + "short_url": "https://rzp.io/i/ORor1MT", + "source": "", + "source_id": "", + "status": "created", + "updated_at": 1596526969, + "user_id": "" +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`amount` _mandatory_ +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _optional_ +: `string` A three-letter ISO code for the currency in which you want to accept the payment. For example, INR. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +. For example, if an amount of is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. Must be passed along with `accept_partial` parameter. + +`upi_link` _mandatory for creating UPI Payment Link_ +: `boolean` Must be set to `true` for creating UPI Payment Link. If the `upi_link` parameter is not passed or passed with value as false, a Standard Payment Link will be created. Possible values: + - `true`: Creates a UPI Payment Link. + - `false`: Creates a Standard Payment Link. + + +`description` _optional_ +: `string` A brief description of the Payment Link. The maximum character limit supported is 2048. + +`reference_id` _optional_ +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`customer` _optional_ +: `json object` Customer details + + `name` _optional_ + : `string` The customer's name. + + `email` _optional_ + : `string` The customer's email address. + + `contact` _optional_ + : `string` The customer's phone number. + +`expire_by` _optional_ +: `integer` Timestamp, in Unix, at which the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`notify` _optional_ +: `array` Defines who handles Payment Link notification. + + `sms` _optional_ + : `boolean` Defines who handles the SMS notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + + `email` _optional_ + : `boolean` Defines who handles the email notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Payment Link for Groceries.”`. + +`callback_url` _optional_ +: `string` If specified, adds a redirect URL to the Payment Link. Once customers completes the payment, they are redirected to the specified URL. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> If the `callback_url` is passed, it must be passed in the correct format. That is, it should contain a URL. +> +> + +`callback_method` _conditionally mandatory_ +: `string` If `callback_url` parameter is passed, callback_method must be passed with the value `get`. + +`reminder_enable` _optional_ +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`options` _mandatory_ +: `array` Options to configure the transfer in the Payment Link. Parent parameter under which the `order` child parameter must be passed. + + `order` _mandatory_ + : `array` The parameter under which the linked account and transfer details must be configured to perform the transfer. `transfer` is a child parameter of `order`. + + `transfers` + : `array` Pass transfer details such as amount, account, linked account information and more. + + `account` _mandatory_ + : `string` Unique identifier of the linked account to which the transfer is to be made. + + `amount` _mandatory_ + : `integer` The amount to be transferred to the linked account. For example, for an amount of ₹200.35, the value of this field should be 20035. This amount cannot exceed the order amount. + + `currency` _mandatory_ + : `string` The currency in which the transfer should be made. We support only `INR` for Route transactions. + + `notes` + : `json object` Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "bangalore"`. + + `linked_account_notes` + : `array` List of keys from the `notes` object which needs to be shown to linked accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + + `on_hold` _optional_ + : `boolean` Indicates whether settlements to the linked account should be put on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + + `on_hold_until` _optional_ + : `integer` Timestamp, in Unix, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +The api \{key/secret\} provided is invalid +* code: 4xx +* description: There is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure that: - The API Keys are active and entered correctly. +- There are no white-spaces before or after the keys. + +The \{input field\} is required +* code: 4xx +* description: A mandatory field is empty. +* solution: Ensure all mandatory fields and values are present. + +wrong input fields sent. +* code: 400 +* description: When wrong input fields are sent during Payment Link creation. +* solution: Ensure that the input fields are added correctly. Refer to these [request parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#request-parameters) on how to add correct input fields. + +payment link creation with reference ID already attempted +* code: 400 +* description: An existing reference id has been passed. +* solution: Ensure that a unique reference id is used for all Payment Links. + +timestamp must be atleast 15 minutes in future +* code: 400 +* description: The epoch time passed is less than 15 minutes from the current time. +* solution: The `close_by` time should be more than 15 minutes from the current time. + +Invalid access: Cannot create a payment link in live mode, as live mode is disabled for merchant. +* code: 400 +* description: Occurs when you try to create a Payment Link in Live mode, but live mode is disabled for you +* solution: Raise a request to our [support team](https://razorpay.com/support/) to get live mode enabled for you. + +Invalid access: Cannot create a payment link, as Merchant is Suspended. +* code: 400 +* description: Occurs when you try to create a Payment Link when you have been been suspended. +* solution: Raise a request to our [support team](https://razorpay.com/support/) to be reinstated. + +value: the length must not be greater than 255. +* code: 400 +* description: When the notes length is greater than 255 characters during Payment Link creation. +* solution: Please create a payment link with notes values less than 255 characters. diff --git a/llm-content/api/payments/payment-links/update-standard.md b/llm-content/api/payments/payment-links/update-standard.md new file mode 100644 index 00000000..11310982 --- /dev/null +++ b/llm-content/api/payments/payment-links/update-standard.md @@ -0,0 +1,326 @@ +--- +title: Update Standard Payment Link +description: Update the details of a Standard Payment Link using this endpoint. +--- + +# Update Standard Payment Link + +## Update Standard Payment Link + +Use this endpoint to edit the Standard Payment Link details such as the reference id, expiry date and so on. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PATCH https://api.razorpay.com/v1/payment_links/plink_Et2G7ymGcTTuM5 \ +-H 'Content-type: application/json' \ +-d '{ + "reference_id": "TS35", + "expire_by": 1653347540, + "reminder_enable":false, + "notes":{ + "policy_name": "Life Insurance Policy" + } +}' + +```php: PHP +$api = new Api($key_id, $secret); + +$api->paymentLink->fetch($paymentLinkId)->edit(array("reference_id"=>"TS42", "expire_by"=>"1640270451" , "reminder_enable"=>0, "notes"=>["policy_name"=>"Life Insurance Policy 2"])); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.paymentLink.edit(paymentLinkId, { + "reference_id": "TS35", + "expire_by": 1653347540, + "reminder_enable":false, + "notes":{ + "policy_name": "Life Insurance Policy" + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment_link.edit(paymentLinkId, { + "reference_id": "TS35", + "expire_by": 1653347540, + "reminder_enable":false, + "notes":{ + "policy_name": "Life Insurance Policy" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "reference_id": "TS35", + "expire_by": 1653347540, + "reminder_enable":false, + "notes":map[string]interface{}{ + "policy_name": "Life Insurance Policy", + }, +} +body, err := client.PaymentLink.Update("", data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +Razorpay.headers = {"Content-type" => "application/json"} + +paymentLinkId = "plink_ExjpAUN3gVHrPJ" + +para_attr = { + "reference_id": "TS35", + "expire_by": 1653347540, + "reminder_enable":false, + "notes":{ + "policy_name": "Life Insurance Policy" + } +} + +Razorpay::PaymentLink.edit(paymentLinkId, para_attr.to_json) + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +String paymentLinkId = "plink_FMbhpT6nqDjDei"; + +JSONObject paymentLinkRequest = new JSONObject(); +paymentLinkRequest.put("reference_id","TS35"); +paymentLinkRequest.put("expire_by",1653347540); +paymentLinkRequest.put("reminder_enable",true); +JSONObject notes = new JSONObject(); +notes.put("policy_name","Life Insurance Policy"); +paymentLinkRequest.put("notes",notes); + +PaymentLink paymentlink = razorpay.paymentLink.edit(PaymentLinkId,paymentLinkRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentLinkId = "plink_Z6t7VFTb9xHeOs"; + +Dictionary paymentLinkRequest = new Dictionary(); +paymentLinkRequest.Add("reference_id","TS35"); +paymentLinkRequest.Add("expire_by",1653347540); +paymentLinkRequest.Add("reminder_enable",true); +Dictionary notes = new Dictionary(); +notes.Add("policy_name", "Life Insurance Policy"); +paymentLinkRequest.Add("notes", notes); + +PaymentLink paymentlink = client.PaymentLink.Fetch(paymentLinkId).Edit(paymentLinkRequest); +``` + +### Response + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the Payment Link. + +### Parameters + + Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`reference_id` _optional_ +: `string` Adds a unique reference number to an existing link. + +`expire_by` _optional_ +: `integer` Timestamp, in Unix format, when the payment links should expire. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Payment Link for Groceries”`. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +update can only be made in created or partially paid state +* code: 400 +* description: A payment link has been passed in `paid` state. +* solution: Ensure that the Payment Link is in the `created` state or `partially paid` state to update the Payment Link. + +wrong input fields sent. +* code: 400 +* description: When wrong input fields are sent while updating the Payment Link. +* solution: Ensure that the input fields are added correctly. Refer to these [request parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#request-parameters) on how to add correct input fields. + +The id provided does not exist +* code: 400 +* description: The Payment Link does not belong to the requestor business, or it doesn't exist. +* solution: Ensure that the Payment Link is valid and belongs to the requestor business. + +The api \{key/secret\} provided is invalid +* code: 4xx +* description: There is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Ensure that the API Keys are active and entered correctly. Also, make sure there are no white-spaces before or after the keys. diff --git a/llm-content/api/payments/payment-links/update-upi.md b/llm-content/api/payments/payment-links/update-upi.md new file mode 100644 index 00000000..8c18f2a0 --- /dev/null +++ b/llm-content/api/payments/payment-links/update-upi.md @@ -0,0 +1,213 @@ +--- +title: Update UPI Payment Link +description: Update the details of a UPI Payment Link using this endpoint. +--- + +# Update UPI Payment Link + +## Update UPI Payment Link + +Use this endpoint to edit the UPI Payment Link details, such as the reference id, expiry date and so on. + +### Response + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the Payment Link. + +### Parameters + + Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`reference_id` _optional_ +: `string` Adds a unique reference number to an existing link. + +`expire_by` _optional_ +: `integer` Timestamp, in Unix format, when the payment links should expire. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Payment Link for Groceries”`. + +### Parameters + +`accept_partial` +: `boolean` Indicates whether customers can make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) using the Payment Link. Possible values: + - `true`: Customer can make partial payments. + - `false` (default): Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`amount_paid` +: `integer` Amount paid by the customer. + +`callback_url` +: `string` If specified, adds a redirect URL to the Payment Link. Once the customer completes the payment, they are redirected to the specified URL. + +`callback_method` +: `string` If `callback_url` parameter is passed, `callback_method` must be passed with the value `get`. + +`cancelled_at` +: `integer` Timestamp, in Unix, at which the Payment Link was cancelled by you. + +`created_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was created. + +`currency` +: `string` Defaults to INR. We accept payments in [international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +`customer` +: `json object` Customer details. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's phone number. + +`description` +: `string` A brief description of the Payment Link. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`expired_at` +: `integer` Timestamp, in Unix, at which the Payment Link expired. + +`id` +: `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + +`upi_link` +: `boolean` Indicates whether the Payment Link is a UPI Payment Link. + - `true`: A UPI Payment Link has been created. + - `false`: It is a Standard Payment Link. + +`notes` +: `object` Set of key-value pairs that you can use to store additional information. You (Businesses) can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters. + +`notify` +: `array` Defines who handles Payment Link notification. + + `sms` + : `boolean` Defines who handles the SMS notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + + `email` + : `boolean` Defines who handles the email notification. + - `true`: Razorpay handles the notification. + - `false`: Businesses handle the notification. + +`payments` +: `array` Payment details such as amount, payment id, Payment Link id and more are stored in this array. It is populated only after a payment is successfully captured by the customer. Only captured payments will be shown here. Until then, the value is `null`. + + `amount` + : `integer` The amount paid by the customer using the Payment Link. + + `created_at` + : `integer` Timestamp, in Unix, indicating when the payment was made. + + + + `method` + : `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `card` + - `wallet` + - `upi` + - `emi` + - `bank_transfer` + + + + + + + + + + `payment_id` + : `string` Unique identifier of the payment made against the Payment Link. + + `plink_id` + : `string` Unique identifier of the Payment Link. For example, `plink_ERgihyaAAC0VNW`. + + `status` + : `string` The payment state. Possible value is `captured`. + + `updated_at` + : `integer` Timestamp, in Unix, indicating when the payment was updated. + +`reference_id` +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`short_url` +: `string` The unique short URL generated for the Payment Link. + +`status` +: `string` Displays the current state of the Payment Link. Possible values: + - `created` + - `partially_paid` + - `expired` + - `cancelled` + - `paid` + +`updated_at` +: `integer` Timestamp, in Unix, indicating when the Payment Link was updated. + +`reminder_enable` +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +`user_id` +: `string` A unique identifier for the user role through which the Payment Link was created. For example, `HD1JAKCCPGDfRx`. + +### Errors + +update can only be made in created or partially paid state +* code: 400 +* description: A payment link has been passed in `paid` state. +* solution: Ensure that the Payment Link is in the `created` state or `partially paid` state to update the Payment Link. + +wrong input fields sent. +* code: 400 +* description: When wrong input fields are sent while updating the Payment Link. +* solution: Ensure that the input fields are added correctly. Refer to these [request parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#request-parameters) on how to add correct input fields. + +The id provided does not exist +* code: 400 +* description: The Payment Link does not belong to the requestor business, or it doesn't exist. +* solution: Ensure that the Payment Link is valid and belongs to the requestor business. + +The api \{key/secret\} provided is invalid +* code: 4xx +* description: There is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Ensure that the API Keys are active and entered correctly. Also, make sure there are no white-spaces before or after the keys. diff --git a/llm-content/api/payments/recurring-payments.md b/llm-content/api/payments/recurring-payments.md new file mode 100644 index 00000000..5aa72822 --- /dev/null +++ b/llm-content/api/payments/recurring-payments.md @@ -0,0 +1,328 @@ +--- +title: Recurring Payments API +description: Integrate Recurring Payments using Razorpay APIs. +--- + +# Recurring Payments API + +You can use Razorpay [Recurring Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments.md) APIs to create subsequent payments for your customers at intervals you can define and control. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Integration Flow + +The integration flow varies depending on how you choose to create the authorisation transaction. + +## Using Razorpay Standard Checkout + +![](/docs/assets/images/recurring-payments-recurring_payments_standard_checkout.jpg) + +You can integrate Recurring Payments using Razorpay Standard Checkout via APIs. Following is the integration flow to collect recurring payments using the Razorpay Standard Checkout: + +1. **Create a customer** + +This returns a `customer_id`. +1. **Create an order** + +This returns an `order_id`. The order amount for: + - For Emandate is ₹0. + - Cards is a minimum of ₹1. + - Paper NACH is ₹0. + - UPI is ₹1. +1. **Create authorisation transaction** + +Pass the `customer_id`, `order_id` and a few additional parameters in your Checkout to create the authorisation payment. The customer completes the authorisation payment, which generates a `token`. This payment can be authorized using one of the following instruments: + - Emandate + - Card + - Paper NACH. The following additional steps have to be completed for NACH: + 1. The customer either downloads a pre-filled NACH form or you can send it to the customer. + 1. The customer signs the pre-filled NACH form. + 1. The customer either uploads the signed form or sends it to you to upload for processing. +Know more about [uploading Paper Nach Form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upload-paper-nach-form.md). + - UPI. +1. **Retrieve and check the status of the token** + +After the token status changes to `confirmed`, you can create and charge subsequent payments. +1. **Create and charge subsequent payments** + +To do this, you have to manually: + 1. Create a new order. + 1. Create a recurring payment. + +## Using a Registration Link + +![](/docs/assets/images/recurring-payments-recurring_payments_registration_link.jpg) +You can create registration links from the Dashboard or using APIs. + +Following is the integration flow to collect recurring payments using a registration link: + +1. **Create a registration link and send it to your customer** + +The customer completes the authorisation payment, which generates a `token`. This payment can be authorised using one of the following instruments: + - Emandate + - Card + - Paper NACH. The following additional steps have to be completed for NACH: + 1. The customer either downloads a pre-filled NACH form or you can send it to the customer. + 1. The customer signs the pre-filled NACH form. + 1. The customer either uploads the signed form or sends it to you to upload for processing. +Know more about [uploading Paper Nach Form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upload-paper-nach-form.md). + - UPI + +> **INFO** +> +> +> **No Need to Create a Customer and Order Separately** +> +> If you use a registration link to create the authorisation transaction, Razorpay automatically creates a customer and the order on your behalf. +> + +2. **Retrieve and check the token status** + +After the token status changes to `confirmed`, you can create and charge subsequent payments. +3. **Create and charge subsequent payments** + +To do this, you have to manually: + 1. Create a new order. + 2. Create a recurring payment. + +## API Gateway URL + +For most of the Razorpay APIs, the Gateway URL is `https://api.razorpay.com/v1`. You need to include this before each API endpoint to make API calls. However, certain APIs are on V2. Hence, the gateway URL may differ for certain APIs. + + +### Example + + + + - Use the URL `https://api.razorpay.com/v1/payments` to access payment resources. + + - Use the URL `https://api.razorpay.com/v2/accounts` to access Route (Linked Account)-related resources. + + + + + + +## API Authorisation + +All Razorpay APIs are authenticated using `Basic Auth`. Basic auth requires the following: +- `[YOUR_KEY_ID]` +- `[YOUR_KEY_SECRET]` + +Basic auth expects an `Authorization` header for each request in the `Basic base64token` format. Here, `base64token` is a base64 encoded string of `YOUR_KEY_ID:YOUR_KEY_SECRET`. + +> **WARN** +> +> +> **Watch Out!** +> +> The `Authorization` header value should strictly adhere to the format mentioned above. Invalid formats will result in authentication failures. +> Few examples of **invalid** headers are: `BASIC base64token`, `basic base64token`, `Basic "base64token"` and `Basic $base64token`. +> + +## Generate API Key + +Follow these steps to generate API keys: + + + Watch this video to see how to generate API keys in the Test mode. + + +[Video: https://www.youtube.com/embed/VOn8JlGPG2I?si=WTAbAeLB3Hnp1n3r] + + + + + Watch this video to see how to generate API keys in the Live mode. + + +[Video: https://www.youtube.com/embed/Cer8UfBGX_E?si=Libr1RXoFSEDfY1c] + + + +1. Log in to your Dashboard with the appropriate credentials. +2. Select the mode (**Test** or **Live**) for which you want to generate the API key. + - **Test Mode**: The test mode is a simulation mode that you can use to test your integration flow. **Your customers will not be able to make payments in this mode**. + - **Live Mode**: When your integration is complete, switch to live mode and generate live mode API keys. In the integration, **replace test mode keys with live mode keys to accept customer payments**. +3. Navigate to **Account & Settings** → **API Keys** (under **Website and app settings**) → **Generate Key** to generate key for the selected mode. + +> **WARN** +> +> +> **Watch Out!** +> +> - After generating the keys from the Dashboard, download and save them securely. You can use only one set of API keys. If you do not remember your API keys, you must [regenerate them](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#regenerate-api-keys) from the Dashboard and update them wherever the previous keys were used for payment gateway integrations. +> - API Keys are universal; that is, they are applicable to all websites and apps that you have whitelisted for your Merchant ID. +> - **Do not share your API Key secret** with anyone or on any public platforms. **This can pose security threats to your Razorpay account**. +> - Once you generate the API Keys, only the **Key Id** is visible on the Dashboard, **not the Key secret**, as it can pose security threats to your Razorpay account. +> - Use the **Live API Keys** to accept live payments and the **Test API Keys** for test transactions. +> + +## List of APIs as per Supported Payment Methods + + +### Emandate + + ## Process Registration and Subsequent Payments Separately + + + API | Description + --- + [Create Authorisation Transaction using Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-authorization-transaction.md#11-using-razorpay-standard-checkout) | API to create an authorisation transaction using Razorpay Checkout. + --- + [Create Authorisation Transaction using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-authorization-transaction.md#12-using-a-registration-link) | API to create an authorisation transaction using Registration Link. + --- + [Fetch Tokens using Payment id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/tokens.md#21-fetch-token-by-payment-id) | API to fetch tokens using the Payment id. + --- + [Fetch Tokens using Customer id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/tokens.md#22-fetch-tokens-by-customer-id) | API to fetch tokens using the Customer id. + --- + [Delete Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/tokens.md#23-delete-tokens) | API to delete tokens. + --- + [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-subsequent-payments.md) | API to create subsequent payments. + + + ### Process Registration and Charge First Payment Together + + + API | Description + --- + [Create Authorisation Transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/auto-debit.md#1-create-an-authorization-transaction) | API to create an authorisation transaction. + --- + [Fetch Tokens using Payment id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/auto-debit.md#21-fetch-token-by-payment-id) | API to fetch tokens using the Payment id. + --- + [Fetch Tokens using Customer id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/auto-debit.md#22-fetch-tokens-by-customer-id) | API to fetch tokens using the Customer id. + --- + [Delete Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/auto-debit.md#23-delete-tokens) | API to delete tokens. + --- + [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/auto-debit.md#3-create-subsequent-payments) | API to create subsequent payments. + + + + +### Cards + + + API | Description + --- + [Create Authorisation Transaction using Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md#11-using-razorpay-standard-checkout) | API to create an authorisation transaction using Razorpay Checkout. + --- + [Create Authorisation Transaction using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md#12-using-a-registration-link) | API to create an authorisation transaction using Registration Link. + --- + [Fetch Tokens using Payment id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/tokens.md#21-fetch-token-by-payment-id) | API to fetch tokens using the Payment id. + --- + [Fetch Tokens using Customer id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/tokens.md#22-fetch-tokens-by-customer-id) | API to fetch tokens using the Customer id. + --- + [Delete Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/tokens.md#23-delete-tokens) | API to delete tokens. + --- + [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-subsequent-payments.md) | API to create subsequent payments. + + + + +### Paper NACH + + ### Process Registration and Subsequent Payments Separately + + API | Description + --- + [Create Authorisation Transaction using Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-authorization-transaction.md#11-using-razorpay-standard-checkout) | API to create an authorisation transaction using Razorpay Checkout. + --- + [Create Authorisation Transaction using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-authorization-transaction.md#12-using-a-registration-link) | API to create an authorisation transaction using Registration Link. + --- + [Fetch Tokens using Order id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/tokens.md#21-fetch-payment-id-using-order-id) | API to fetch tokens using the Order id. + --- + [Fetch Tokens using Payment id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/tokens.md#22-fetch-token-by-payment-id) | API to fetch tokens using the Payment id. + --- + [Fetch Tokens using Customer id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/tokens.md#23-fetch-tokens-by-customer-id) | API to fetch tokens using the Customer id. + --- + [Delete Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/tokens.md#24-delete-tokens) | API to delete tokens. + --- + [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-subsequent-payments.md) | API to create subsequent payments. + + + ### Process Registration and Charge First Payment Together + + + API | Description + --- + [Create Authorisation Transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/auto-debit.md#1-create-an-authorization-transaction) | API to create an authorisation transaction. + --- + [Fetch Tokens using Payment id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/auto-debit.md#21-fetch-token-by-payment-id) | API to fetch tokens using the Payment id. + --- + [Fetch Tokens using Customer id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/auto-debit.md#22-fetch-tokens-by-customer-id) | API to fetch tokens using the Customer id. + --- + [Delete Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/auto-debit.md#23-delete-tokens) | API to delete tokens. + --- + [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/auto-debit.md#3-create-subsequent-payments) | API to create subsequent payments. + + + + +### UPI + + + API | Description + --- + [Create Authorisation Transaction using Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md#11-using-razorpay-standard-checkout) | API to create an authorisation transaction using Razorpay Checkout. + --- + [Create Authorisation Transaction using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md#12-using-a-registration-link) | API to create an authorisation transaction using Registration Link. + --- + [Fetch Tokens using Payment id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/tokens.md#21-fetch-token-by-payment-id) | API to fetch tokens using the Payment id. + --- + [Fetch Tokens using Customer id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/tokens.md#22-fetch-tokens-by-customer-id) | API to fetch tokens using the Customer id. + --- + [Delete Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/tokens.md#23-delete-tokens) | API to delete tokens. + --- + [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-subsequent-payments.md) | API to create subsequent payments. + + + + + + +### UPI OTM + + + API | Description + --- + [Create Authorisation Transaction using Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-otm/authorization-transaction.md#11-using-razorpay-standard-checkout) | API to create an authorisation transaction using Razorpay Checkout. + --- + [Create Authorisation Transaction using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-otm/authorization-transaction.md#12-using-a-registration-link) | API to create an authorisation transaction using Registration Link. + --- + [Fetch Tokens using Payment id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-otm/tokens.md#21-fetch-token-by-payment-id) | API to fetch tokens using the Payment id. + --- + [Fetch Tokens using Customer id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-otm/tokens.md#22-fetch-tokens-by-customer-id) | API to fetch tokens using the Customer id. + --- + [Delete Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-otm/tokens.md#23-delete-tokens) | API to delete tokens. + --- + [One Time Payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-otm/one-time-payment.md) | API to create one time payment. + + + + +### UPI TPV + + + API | Description + --- + [Create Authorisation Transaction using Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-tpv/create-authorization-transaction.md#11-using-razorpay-standard-checkout) | API to create an authorisation transaction using Razorpay Checkout. + --- + [Fetch Tokens using Payment id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-tpv/tokens.md#21-fetch-token-by-payment-id) | API to fetch tokens using the Payment id. + --- + [Fetch Tokens using Customer id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-tpv/tokens.md#22-fetch-tokens-by-customer-id) | API to fetch tokens using the Customer id. + --- + [Delete Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-tpv/tokens.md#23-delete-tokens) | API to delete tokens. + --- + [Subsequent Payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-tpv/create-subsequent-payments.md) | API to create subsequent payment. diff --git a/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md b/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md new file mode 100644 index 00000000..d08df865 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md @@ -0,0 +1,1424 @@ +--- +title: 1. Create the Authorisation Transaction +description: Create an authorisation transaction for cards using Razorpay APIs. +--- + +# 1. Create the Authorisation Transaction + +You can create an authorisation transaction using [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +> **WARN** +> +> +> +> **Watch Out!** +> +> Bank downtime can affect success rates when processing recurring payments via debit cards. +> + +## 1.1. Using Razorpay APIs + +To create an authorisation transaction using Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorisation-payment). + +> **INFO** +> +> +> **Handy Tips** +> +> For the Authorisation Payment to be successful in a day (for example, 5th June), you should create an Order and the Authorisation Transaction on the same day (5th June) before 11:59 pm. +> + +### 1.1.1. Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + +### Request Parameters + + `name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + + +### 1.1.2. Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":100, + "currency":"", + "customer_id":"cust_4xbQrmEoA5WJ01", + "method":"card", + "token": { + "max_amount": 1000000, + "expire_at": 2709971120, + "frequency": "monthly" + }, + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 100); +orderRequest.put("currency", ""); +orderRequest.put("customer_id", "cust_4xbQrmEoA5WJ01"); +orderRequest.put("method", "card"); +JSONObject token = new JSONObject(); +token.put("max_amount","100000000"); +token.put("expire_at","2709971120"); +token.put("frequency","monthly"); +orderRequest.put("token", token); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => '', 'receipt' => '123', 'customer_id'=> $customerId, 'method'=>'card', 'token' => array('max_amount' => 100000000, 'expire_at' => 2709971120, 'frequency' => 'monthly'), 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":100, + "currency":"", + "customer_id":"cust_4xbQrmEoA5WJ01", + "method":"card", + "token": { + "max_amount": 1000000, + "expire_at": 4102444799, + "frequency": "monthly" + }, + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 50000, + 'currency': '', + 'customer_id': 'cust_4xbQrmEoA5WJ01', + 'method': 'card', + 'token':{ + 'max_amount': 100000000, + 'expire_at': 4102444799, + 'frequency': 'monthly' + }, + 'receipt': 'receipt#1', + 'notes': {'key1': 'value3', 'key2': 'value2'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +param_attr = { + "amount":100, + "currency": "", + "customer_id": "cust_4xbQrmEoA5WJ01", + "method": "card", + "token": { + "max_amount": 1000000, + "expire_at": 4102444799, + "frequency": "monthly" + }, + "receipt": "Receipt No. 1", + "notes":{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount":100, + "currency":"", + "customer_id":"", + "method":"card", + "token":map[string]interface{}{ + "max_amount": 1000000, + "expire_at": 4102444799, + "frequency": "monthly" + }, + "receipt":"Receipt No. 1", + "notes":map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("customer_id", "cust_Z6t7VFTb9xHeOs"); +orderRequest.Add("method", "card"); +Dictionary token = new Dictionary(); +token.Add("max_amount", "5000"); +token.Add("expire_at", "2709971120"); +token.Add("frequency", "monthly"); +orderRequest.Add("token", token); +orderRequest.Add("receipt", "receipt#176"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +``` + +```json: Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":100, + "amount_paid":0, + "amount_due":100, + "currency":"", + "receipt":"Receipt No. 1", + "method":"card", + "description":null, + "customer_id":"cust_4xbQrmEoA5WJ01", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1565172642 +} +``` + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the amount should be `100`, that is, . + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _optional_ +: `string` Payment method used to make the authorisation transaction. Here, it is `card`. + +`token` +: `object` Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be auto-debited in a single charge. The minimum value is `100`, that is, , and the maximum value is `1500000`, that is, . For an amount higher than this, the cardholder should provide an Additional Factor of Authentication (AFA) as per RBI guidelines. + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The card's expiry year is considered a default value. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `weekly` + - `monthly` + - `yearly` + - `as_presented` + +, that is, . For an amount higher than this, the cardholder should provide an Additional Factor of Authentication (AFA) as per RBI guidelines. + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The card's expiry year is considered a default value. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `weekly` + - `monthly` + - `yearly` + - `as_presented` + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`entity` +: `string` The entity that has been created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100`, that is, . + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to pay. + +`currency` +: `string` The 3-letter ISO currency code for the payment. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`method` +: `string` Payment method used to make the authorisation transaction. Here, it is `card`. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +You can create a payment against the `order_id` after you create an order. + + +### 1.1.3. Create an Authorisation Payment + +Create a payment checkout form for customers to make Authorisation Transaction and register their mandate. You can use the Handler Function or Callback URL. + +Handler Function | Callback URL +--- +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. | When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. + +> **WARN** +> +> +> +> **Watch Out!** +> +> - The callback URL is not supported for recurring payments created using the registration link. +> - While handling the first time authorisation payment response, consume the `error_reason` field with value `upi_dummy_payment` and `error_description` field with value `Payment was a dummy payment for one time mandate registration.` to identify successful mandate registration. The parent `error_code` will be `BAD_REQUEST_ERROR`. +> + +```html: Checkout with handler functions + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "handler": function (response) { + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature); + }, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +```html: Manual checkout with Callback URL + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +``` + + +### Additional Checkout Fields + + You should send the following additional parameters along with the existing checkout options as a part of the authorisation transaction. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +`recurring` _mandatory_ +: `boolean` Possible values: + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + + +> **INFO** +> +> +> **Handy Tips** +> +> The `recurring` parameter also supports the value `preferred`. Use this when you want to support recurring payments and one-time payment in the same flow. +> + + + +After this step, you can proceed to integrate with the [Fetch Token API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/tokens.md). + +## 1.2. Using a Registration Link + +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the API or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +- You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. + +- When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. +- A registration link should always have an order amount (in subunits) the customer will be charged when making the authorisation payment. For cards, the amount should be in the case of cards. + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can [use Webhooks to get notifications about successful payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) against a registration link. +> +> + +### 1.2.1. Create a Registration Link + +The following endpoint creates a registration link. + +/subscription_registration/auth_links + +```curl: Curl +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"", + "email":"", + "contact":"" + }, + "type":"link", + "amount":"100", + "currency":"", + "description":"Registration Link for ", + "subscription_registration":{ + "method":"card", + "max_amount":"1000000", + "expire_at":1609423824, + "frequency": "monthly" + }, + "receipt":"Receipt No. 1", + "email_notify": true, + "sms_notify": true, + "expire_by":1580479824, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name",""); +customer.put("email",""); +customer.put("contact",""); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 100); +registrationLinkRequest.put("currency", ""); +registrationLinkRequest.put("description", "Registration Link for "); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","card"); +subscriptionRegistration.put("max_amount",1000000); +subscriptionRegistration.put("expire_at",1609423824); +subscriptionRegistration.put("frequency","monthly"); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. 1"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'','email'=>'','contact'=>''),'type'=>'link','amount'=>100,'currency'=>'','description'=>'Registration Link for ','subscription_registration'=>array('method'=>'card','max_amount'=>'1000000','expire_at'=>'1634215992','frequency'=>'monthly'),'receipt'=>'Receipt No. 5','email_notify'=> true,'sms_notify'=>true,'expire_by'=>1634215992, 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Tea. Earl Gray. Hot.'))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.createRegistrationLink({ + customer: { + name: "", + email: "", + contact: "" + }, + type: "link", + amount: 100, + currency: "", + description: "Registration Link for ", + subscription_registration: { + method: "card", + max_amount: 1000000, + expire_at: 1609423824, + frequency: "monthly" + }, + receipt: "Receipt No. 1", + email_notify: true, + sms_notify: true, + expire_by: 1580479824, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey... decaf." + } +}) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + 'customer': {'name': '', + 'email': '', + 'contact': ''}, + 'type': 'link', + 'amount': '100', + 'currency': '', + 'description': 'Registration Link for Gaurav', + 'subscription_registration': {'method': 'card', 'max_amount': '1000000' + , 'expire_at': 1644737663, 'frequency': 'monthly'}, + 'receipt': 'Receipt No. #11', + 'email_notify': True, + 'sms_notify': True, + 'expire_by': 1644737663, + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer":{ + "name": "", + "email": "", + "contact": "" + }, + "type": "link", + "amount": "100", + "currency": "", + "description": "Registration Link for ", + "subscription_registration":{ + "method": "card", + "max_amount": "1000000", + "expire_at": 1609423824, + "frequency": "monthly" + }, + "receipt": "Receipt No. 1", + "email_notify": true, + "sms_notify": true, + "expire_by":1580479824, + "notes":{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} + +Razorpay::SubscriptionRegistration.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer":map[string]interface{}{ + "name":"", + "email":"", + "contact":"", + }, + "type":"link", + "amount":"100", + "currency":"", + "description":"Registration Link for ", + "subscription_registration":map[string]interface{}{ + "method":"card", + "max_amount":"1000000", + "expire_at":1609423824, + "frequency": "monthly" + }, + "receipt":"Receipt No. 1", + "email_notify": true, + "sms_notify": true, + "expire_by":1681987284, + "notes":map[string]interface{}{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot.", + }, +} + +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary registrationLinkRequest = new Dictionary(); +Dictionary customer = new Dictionary(); +customer.Add("name", ""); +customer.Add("email", ""); +customer.Add("contact", ""); +registrationLinkRequest.Add("customer", customer); +registrationLinkRequest.Add("type", "link"); +registrationLinkRequest.Add("amount", 100); +registrationLinkRequest.Add("currency", ""); +registrationLinkRequest.Add("description", "Registration Link for "); +Dictionary subscriptionRegistration = new Dictionary(); +subscriptionRegistration.Add("method", "card"); +subscriptionRegistration.Add("max_amount", 1000000); +subscriptionRegistration.Add("expire_at", 1609423824); +registrationLinkRequest.Add("subscription_registration", subscriptionRegistration); +registrationLinkRequest.Add("receipt", "Receipt No. #18d"); +registrationLinkRequest.Add("email_notify", true); +registrationLinkRequest.Add("sms_notify", true); +registrationLinkRequest.Add("expire_by", 1580479824); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +registrationLinkRequest.Add("notes", notes); + +Invoice invoice = client.Invoice.CreateRegistrationLink(registrationLinkRequest); +``` + +```json: Response +{ + "id": "inv_FHrXGIpd3N17DX", + "entity": "invoice", + "receipt": "Receipt No. 24", + "invoice_number": "Receipt No. 24", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrXGJNngJyEAe", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 4102444799, + "issued_at": 1595491014, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491014, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for ", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/VSriCfn", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491014, + "idempotency_key": null +} +``` + + +### Request Parameters + + `customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + + `subscription_registration` +: `object` Details of the authorisation transaction. + + `method` _mandatory_ + : `string` The authorisation method. Here it is `card`. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be auto-debited in a single charge. The minimum value is `100` (₹1) and the maximum value is `100000000` (₹10,00,000). For an amount higher than this or the RBI limit of ₹15,000 (`1500000`) or ₹1,00,000 (`10000000`) respectively, the cardholder should provide an Additional Factor of Authentication (AFA) as per RBI guidelines. + + `expire_at` _optional_ + : `integer` The Unix timestamp till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. The card's expiry year is considered a default value. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `weekly` + - `monthly` + - `yearly` + - `as_presented` + + `sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + + +### Path Parameters + + `id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + + + +### Response Parameter + +`success` +: `boolean` Indicates whether the notifications were sent successfully. Possible values: + - `true`: The notifications were successfully sent via SMS, email or both. + - `false`: The notifications were not sent. + + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + + +### Path Parameter + + `id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. + + + +### Response Parameter + + `id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + + +After this step, you can proceed to integrate with the [Fetch Token API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/tokens.md). diff --git a/llm-content/api/payments/recurring-payments/cards/create-subsequent-payments.md b/llm-content/api/payments/recurring-payments/cards/create-subsequent-payments.md new file mode 100644 index 00000000..870f0f23 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/cards/create-subsequent-payments.md @@ -0,0 +1,682 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorized. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use the notification object in the request if you want to control pre-debit notifications and recurring debits. +> + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture":true, + "receipt":"Receipt No. 1", + "notification":{ + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114 + }, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notification = new JSONObject(); +notification.put("token_id","token_M7K2eFBU7vToaQ"); +notification.put("payment_after","1634057114"); +orderRequest.put("notification", notification); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notification'=> array('token_id'=> 'token_M7K2eFBU7vToaQ','payment_after'=> '1634057114'), 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notification": { + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114 + }, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notification': {'token_id': 'token_M7K2eFBU7vToaQ', + 'payment_after': 1634057114}, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notification": { + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114 + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notification": map[string]interface{}{ + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114 + }, + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notification = new Dictionary(); +notification.Add("token_id", "token_M7K2eFBU7vToaQ"); +notification.Add("payment_after", "1634057114"); +orderRequest.Add("notification", notification); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "notification":{ + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114, + "id":"notification_00000000000001" + }, + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is `100`, that is, . + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notification` +: `object` Details of the pre-debit notification. This object is optional. You should use it only if you want to control pre-debit notifications and debits. If you do not pass this object, we will automatically try to debit after 36 hours and 5 minutes. + + +> **INFO** +> +> +> **Handy Tips** +> +> The TAT to create a debit if you send a pre-debit notification is 36 hours and 5 minutes. +> + + +> **WARN** +> +> +> **Watch Out!** +> +> We will not attempt any retry if the debit fails for tokens with the notification object in the created order. You should manually retry the debit attempt. +> + + `token_id` _mandatory_ + : `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + + `payment_after` _optional_ + : `integer` UNIX timestamp post which the debit is supposed to happen. Defaults to 36 hours and 5 minutes after the pre-debit notification is delivered. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + + + +### Response Parameters + + `id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000001`. + +`entity` +: `string` The entity that has been created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `rcptid #1`. + +`notification` +: `object` Details of the pre-debit notification. + + `token_id` + : `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + + `payment_after` + : `integer` UNIX timestamp post which the debit is supposed to happen. + + `id` + : `string` the unique identifier of the notification. For example, `notification_00000000000001`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + + +## 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +- You will get a `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` as a response after the payment request is successfully processed. +- In the case of some banks, such as HDFC Bank and Axis Bank, the payment entity is in the `created` state since the charging system of these banks is file-based and can take some time. + + +### Request Parameters + + + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`razorpay_payment_id` +: `string` The unique identifier of the payment that is created. For example, `pay_1Aa00000000001`. + +`razorpay_order_id` +: `string` The unique identifier of the order that is created. For example, `order_1Aa00000000001`. + +`razorpay_signature` +: `string` The signature generated by the Razorpay. For example, `9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d` + + + +### Error Response Parameters + + Given below is a list of possible errors you may face while creating a Recurring Payment. + +Error [columWidth="30"] | Cause | Solution +--- +pre_debit_notification_not_sent | This error occurs when a pre-debit notification is not sent and a debit attempt is made. | Make sure to send a pre-debit notification before an attempt. +--- +BAD_REQUEST_MANDATE_PROMISED_DEBIT_DATE_NOT_HONOURED | This error occurs when you attempt a debit within 36 hours and 5 minutes of a notification being delivered. | You can only attempt a manual debit 36 hours and 5 minutes after the notification is delivered. + + + +## 3.3. Fetch an Order With ID + +Use this endpoint to retrieve details of a particular order as per the id. + +/v1/orders/:id + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/orders/:id + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String orderId = "order_1Aa00000000002"; + +Order order = razorpay.orders.fetch(orderId); + +```Python: Python +# do easy_install razorpay or +# pip install razorpay + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.fetch(orderId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->fetch($orderId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +orderId = "order_1Aa00000000002" + +Razorpay::Order.fetch(orderId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.fetch(orderId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Order.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string orderId = "order_1Aa00000000002"; + +Order order = client.Order.Fetch(orderId); +``` + +```json: Success +{ + "id":"order_DaaS6LOUAASb7Y", + "entity":"order", + "amount":2000, + "amount_paid":0, + "amount_due":2000, + "currency":"", + "receipt":null, + "notification":{ + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114, + "id":"notification_00000000000001", + "status":"delivered", + "delivered_at":1634057113 + }, + "offer_id":"offer_JGQvQtvJmVDRIA", + "offers":[ + "offer_JGQvQtvJmVDRIA" + ], + "status":"created", + "attempts":0, + "notes":[ + + ], + "created_at":1654776878 +} +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Path Parameter + + `id` _mandatory_ +: `string` Unique identifier of the order to be retrieved. + + + +### Response Parameters + + `id` +: `string` The unique identifier of the order. + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`notification` +: `object` Details of the pre-debit notification. The notification object is populated in the response only if you have passed this while creating an order. + + `token_id` + : `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + + `payment_after` + : `integer` Unix timestamp post which the debit is supposed to happen. + + `id` + : `string` Unique identifier of the notification. + + `delivered_at` + : `integer` Indicates the unix timestamp when the notification was delivered. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. diff --git a/llm-content/api/payments/recurring-payments/cards/tokens.md b/llm-content/api/payments/recurring-payments/cards/tokens.md new file mode 100644 index 00000000..40de684a --- /dev/null +++ b/llm-content/api/payments/recurring-payments/cards/tokens.md @@ -0,0 +1,822 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +Know more about [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/integrate.md#fetch-card-mandate-registration-details). + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches a token id using the Payment id. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000001"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_1Aa00000000001" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.Fetch(paymentId); +``` + +```json: Response +{ + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "", + "status": "captured", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "bank": null, + "wallet": null, + "vpa": null, + "email": "", + "contact": "", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "541898" + }, + "created_at": 1595449871 +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` from the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + + +### Path Parameter + + `id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + + + +### Response Parameters + + `id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. Here, it is `payment`. + +`amount` +: `integer` The payment amount represented in smallest unit of the currency passed. For example, `amount = 100` translates to `100` subunits, that is . + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`order_id` +: `string` The unique identifier of the order. + +`invoice_id` +: `string` The unique identifier of the invoice. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`amount_refunded` +: `integer` The amount refunded in smallest unit of the currency passed. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string` Description of the payment, if any. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `integer` Customer contact number used for the payment. + +`customer_id` +: `string` The unique identifier of the customer. + +`token_id` +: `string` The unique identifier of the token. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + + +## 2.2. Fetch All Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint fetches tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> This endpoint will not fetch the details of expired, rejected and unused tokens. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +List customer = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customer.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000002" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity":"collection", + "count":1, + "items":[ + { + "id":"token_HouA2OQR5Z2jTL", + "entity":"token", + "token":"2JPRk664pZHUWG", + "bank":null, + "wallet":null, + "method":"card", + "card":{ + "entity":"card", + "name":"", + "last4":"8950", + "network":"Visa", + "type":"credit", + "issuer":"STCB", + "international":false, + "emi":false, + "sub_type":"consumer", + "expiry_month":12, + "expiry_year":2030, + "flows":{ + "otp":true, + "recurring":true + } + }, + "recurring":true, + "recurring_details":{ + "status":"confirmed", + "failure_reason":null + }, + "auth_type":null, + "mrn":null, + "used_at":1629779657, + "created_at":1629779657, + "expired_at":1640975399, + "dcc_enabled":false, + "billing_address":null + } + ] +} +``` + + +### Path Parameter + + `id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + + + +### Response Parameters + + `entity` +: `string` The entity being created. Here, it is a `collection`. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: `object` Details related to token such as `token id` and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is `token_id`. + + `entity` + : `string` The entity being created. Here, it is a `token`. + + `token` + : `string` The token is being fetched. + + `bank` + : `string` Card issuing bank details. + + `wallet` + : `string` Provides wallet information. + + `method` + : `string` The payment method used to make the transaction. + + `card` + : `object` Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is `Visa`. + + `type` + : `string` Card type (debit or credit). In this example, it is `credit`. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `boolean` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : `object` The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + + `vpa` + : `object` The VPA details. + + `username` + : `string` The username of the VPA holder. For example, `gaurav.kumar`. + + `handle` + : `string` The VPA handle. Here it is `upi`. + + `name` + : `string` The name of the VPA holder. + + + `recurring` + : `string` This represents whether recurring is enabled for this token. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + `recurring_details` + : `object` Details of the recurring transaction. + + `status` + : `string` This represents the status of the recurring transaction. Possible values: + - `initiated` + - `confirmed` + - `rejected` + - `cancelled` + - `paused` + + `failure_reason` + : `string` This provides the reason why the recurring transaction failed. + + `auth_type` + : `string` The authorisation type details. + + `mrn` + : `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + + `used_at` + : `integer` The VPA usage timestamp. + + `created_at` + : `integer` The token creation timestamp. + + `expired_at` + : `integer` The token expiry date timestamp. + + `dcc_enabled` + : `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + + +## 2.3 Fetch a Token by Customer ID + +The following endpoint fetches a particular token linked to a customer. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_IjsVsJ7d27hxOs/tokens/token_J0BgMu8YDVusZa + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_IjsVsJ7d27hxOs"; + +String tokenId = "token_J0BgMu8YDVusZa"; + +List customer = razorpay.customers.fetchTokens(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->fetch($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customer.fetchTokens(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.fetch(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_IjsVsJ7d27hxOs" + +tokenId = "token_J0BgMu8YDVusZa" + +Razorpay::Customer.fetch(customerId).fetchToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token("", "", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_J0BgMu8YDVusZa" + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "id":"token_J0BgMu8YDVusZa", + "entity":"token", + "token":"ya5olMAYU0ap4F", + "bank":null, + "wallet":null, + "method":"card", + "card":{ + "entity":"card", + "name":"", + "last4":"7558", + "network":"Visa", + "type":"credit", + "issuer":"FDRL", + "international":false, + "emi":true, + "sub_type":"consumer", + "token_iin":null, + "expiry_month":1, + "expiry_year":2027, + "flows":{ + "recurring":true + } + }, + "recurring":true, + "recurring_details":{ + "status":"confirmed", + "failure_reason":null + }, + "auth_type":null, + "mrn":null, + "used_at":1645780406, + "created_at":1645780188, + "expired_at":2709971120, + "status":null, + "notes":[ + + ], + "dcc_enabled":false, + "compliant_with_tokenisation_guidelines":false +} +``` + + +### Path Parameters + + `customer_id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_IjsVsJ7d27hxOs`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that should be retrieved. For example, `token_J0BgMu8YDVusZa`. + + + +### Response Parameters + + `entity` +: `string` The entity being created. Here, it is a `collection`. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: `object` Details related to token such as `token id` and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is `token_id`. + + `entity` + : `string` The entity being created. Here, it is a `token`. + + `token` + : `string` The token is being fetched. + + `bank` + : `string` Card issuing bank details. + + `wallet` + : `string` Provides wallet information. + + `method` + : `string` The payment method used to make the transaction. + + `card` + : `object` Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is `Visa`. + + `type` + : `string` Card type (debit or credit). In this example, it is `credit`. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `boolean` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : `object` The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + + `vpa` + : `object` The VPA details. + + `username` + : `string` The username of the VPA holder. For example, `gaurav.kumar`. + + `handle` + : `string` The VPA handle. Here it is `upi`. + + `name` + : `string` The name of the VPA holder. + + + `recurring` + : `string` This represents whether recurring is enabled for this token. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + `recurring_details` + : `object` Details of the recurring transaction. + + `status` + : `string` This represents the status of the recurring transaction. Possible values: + - `initiated` + - `confirmed` + - `rejected` + - `cancelled` + - `paused` + + `failure_reason` + : `string` This provides the reason why the recurring transaction failed. + + `auth_type` + : `string` The authorisation type details. + + `mrn` + : `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + + `used_at` + : `integer` The VPA usage timestamp. + + `created_at` + : `integer` The token creation timestamp. + + `expired_at` + : `integer` The token expiry date timestamp. + + `dcc_enabled` + : `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + + +## 2.4. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameters + + `customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + + + +### Response Parameter + + `deleted` +: `boolean` Indicates whether the token is deleted. Possible values: + - `true`: The token is deleted successfully. + - `false`: The token was not deleted. diff --git a/llm-content/api/payments/recurring-payments/custom.md b/llm-content/api/payments/recurring-payments/custom.md new file mode 100644 index 00000000..90a740ed --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom.md @@ -0,0 +1,238 @@ +--- +title: Recurring Payments API - Custom Integration +description: Know how you can integrate Recurring Payments using Razorpay APIs. +--- + +# Recurring Payments API - Custom Integration + +Recurring Payments allow you to charge your customers repeatedly without requiring them to enter payment details each time. Your customers authorise their payment method once and you can charge them at intervals you control based on your business needs. + +Use Razorpay Recurring Payments to create flexible payment schedules for subscriptions, installments, usage-based billing or on-demand charges. Set up recurring payments quickly using our powerful REST APIs. + + to get this feature activated on your Razorpay account. + +## Integration Flow + +The integration flow varies depending on how you choose to create the authorisation transaction. + + +### Using Razorpay APIs + + ![](/docs/assets/images/recurring-payments-recurring_payments_standard_checkout.jpg) + +This is possible only via APIs. The integration flow to collect recurring payments using Razorpay APIs is: + +1. Create a customer. This returns a `customer_id`. +1. Create an order. This returns an `order_id`. The order amount for: + - Emandate is ₹0. + - Cards is a minimum of ₹1. + - Paper NACH is ₹0. + - UPI is ₹1. +1. Pass the `customer_id`, `order_id` and a few additional parameters in your Checkout to create the authorisation payment. The customer completes the authorisation payment, which generates a `token`. This payment can be authorised using one of the following instruments: + - Emandate. + - Card. + - Paper NACH. The following additional steps have to be completed for NACH: + 1. The customer either downloads a pre-filled NACH form or you can send it to the customer. + 1. The customer signs the pre-filled NACH form. + 1. The customer either uploads the signed form or sends it to you to upload for processing. + - UPI. +1. Retrieve and check the status of the token. **Once the token status changes to `confirmed`, you can create and charge subsequent payments**. +1. Create and charge subsequent payments. To do this, you have to manually: + 1. Create a new order. + 1. Create a recurring payment. + + + + +### Using a Registration Link + + + +![](/docs/assets/images/recurring-payments-recurring_payments_registration_link.jpg) +You can create registration links from the Dashboard or using APIs. + +Following is the integration flow to collect recurring payments using a registration link: + +1. **Create a registration link and send it to your customer** + +The customer completes the authorisation payment, which generates a `token`. This payment can be authorised using one of the following instruments: + - Emandate + - Card + - Paper NACH. The following additional steps have to be completed for NACH: + 1. The customer either downloads a pre-filled NACH form or you can send it to the customer. + 1. The customer signs the pre-filled NACH form. + 1. The customer either uploads the signed form or sends it to you to upload for processing. +Know more about [uploading Paper Nach Form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upload-paper-nach-form.md). + - UPI + +> **INFO** +> +> +> **No Need to Create a Customer and Order Separately** +> +> If you use a registration link to create the authorisation transaction, Razorpay automatically creates a customer and the order on your behalf. +> + +2. **Retrieve and check the token status** + +After the token status changes to `confirmed`, you can create and charge subsequent payments. +3. **Create and charge subsequent payments** + +To do this, you have to manually: + 1. Create a new order. + 2. Create a recurring payment. + + + +## API Gateway URL + +For most of the Razorpay APIs, the Gateway URL is `https://api.razorpay.com/v1`. You need to include this before each API endpoint to make API calls. However, certain APIs are on V2. Hence, the gateway URL may differ for certain APIs. + + +### Example + + + + - Use the URL `https://api.razorpay.com/v1/payments` to access payment resources. + + - Use the URL `https://api.razorpay.com/v2/accounts` to access Route (Linked Account)-related resources. + + + + + + +## API Authorisation + +All Razorpay APIs are authenticated using `Basic Auth`. Basic auth requires the following: +- `[YOUR_KEY_ID]` +- `[YOUR_KEY_SECRET]` + +Basic auth expects an `Authorization` header for each request in the `Basic base64token` format. Here, `base64token` is a base64 encoded string of `YOUR_KEY_ID:YOUR_KEY_SECRET`. + +> **WARN** +> +> +> **Watch Out!** +> +> The `Authorization` header value should strictly adhere to the format mentioned above. Invalid formats will result in authentication failures. +> Few examples of **invalid** headers are: `BASIC base64token`, `basic base64token`, `Basic "base64token"` and `Basic $base64token`. +> + +### Generate API Key + +Follow these steps to generate API keys: + + + Watch this video to see how to generate API keys in the Test mode. + + +[Video: https://www.youtube.com/embed/VOn8JlGPG2I?si=WTAbAeLB3Hnp1n3r] + + + + + Watch this video to see how to generate API keys in the Live mode. + + +[Video: https://www.youtube.com/embed/Cer8UfBGX_E?si=Libr1RXoFSEDfY1c] + + + +1. Log in to your Dashboard with the appropriate credentials. +2. Select the mode (**Test** or **Live**) for which you want to generate the API key. + - **Test Mode**: The test mode is a simulation mode that you can use to test your integration flow. **Your customers will not be able to make payments in this mode**. + - **Live Mode**: When your integration is complete, switch to live mode and generate live mode API keys. In the integration, **replace test mode keys with live mode keys to accept customer payments**. +3. Navigate to **Account & Settings** → **API Keys** (under **Website and app settings**) → **Generate Key** to generate key for the selected mode. + +> **WARN** +> +> +> **Watch Out!** +> +> - After generating the keys from the Dashboard, download and save them securely. You can use only one set of API keys. If you do not remember your API keys, you must [regenerate them](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#regenerate-api-keys) from the Dashboard and update them wherever the previous keys were used for payment gateway integrations. +> - API Keys are universal; that is, they are applicable to all websites and apps that you have whitelisted for your Merchant ID. +> - **Do not share your API Key secret** with anyone or on any public platforms. **This can pose security threats to your Razorpay account**. +> - Once you generate the API Keys, only the **Key Id** is visible on the Dashboard, **not the Key secret**, as it can pose security threats to your Razorpay account. +> - Use the **Live API Keys** to accept live payments and the **Test API Keys** for test transactions. +> + +## List of APIs as per Supported Payment Methods + + +### Emandate + + + API | Description + --- + [Create Authorisation Transaction using Razorpay APIs](/api/payments/recurring-payments/custom/emandate/create-authorization-transaction/#11-using-razorpay-apis) | API to create an authorisation transaction using Razorpay APIs. + --- + [Create Authorisation Transaction using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/emandate/create-authorization-transaction.md#12-using-a-registration-link) | API to create an authorisation transaction using Registration Link. + --- + [Fetch Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/emandate/tokens.md) | API to fetch tokens. + --- + [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/emandate/create-subsequent-payments.md) | API to create subsequent payments. + + + + +### Cards + + + API | Description + --- + [Create Authorisation Transaction using Razorpay APIs](/api/payments/recurring-payments/custom/cards/create-authorization-transaction/#11-using-razorpay-apis) | API to create an authorisation transaction using Razorpay APIs. + --- + [Create Authorisation Transaction using Registration Link](/api/payments/recurring-payments/custom/cards/create-authorization-transaction/#12-using-a-registration-link) | API to create an authorisation transaction using Registration Link. + --- + [Fetch Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/cards/tokens.md) | API to fetch tokens. + --- + [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/cards/create-subsequent-payments.md) | API to create subsequent payments. + + + + +### Paper NACH + + + API | Description + --- + [Create Authorisation Transaction using Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/paper-nach/create-authorization-transaction.md#11-using-razorpay-apis) | API to create an authorisation transaction using Razorpay APIs. + --- + [Create Authorisation Transaction using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/paper-nach/create-authorization-transaction.md#12-using-a-registration-link) | API to create an authorisation transaction using Registration Link. + --- + [Fetch Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/paper-nach/tokens.md) | API to fetch tokens. + --- + [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/paper-nach/create-subsequent-payments.md) | API to create subsequent payments. + + + + +### UPI Autopay + + + API | Description + --- + [Create Authorisation Transaction using Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/upi/create-authorization-transaction.md#11-using-razorpay-apis) | API to create an authorisation transaction using Razorpay APIs. + --- + [Create Authorisation Transaction using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/upi/create-authorization-transaction.md#12-using-a-registration-link) | API to create an authorisation transaction using Registration Link. + --- + [Fetch Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/upi/tokens.md) | API to fetch tokens. + --- + [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/upi/create-subsequent-payments.md) | API to create subsequent payments. + + + + + + +### UPI TPV + + + API | Description + --- + [Create Authorisation Transaction using Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/upi-tpv/create-authorization-transaction.md#11-using-razorpay-apis) | API to create an authorisation transaction using Razorpay APIs. + --- + [Fetch Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/upi-tpv/tokens.md) | API to fetch tokens. + --- + [Subsequent Payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/upi-tpv/create-subsequent-payments.md) | API to create subsequent payment. diff --git a/llm-content/api/payments/recurring-payments/custom/cards/create-authorization-transaction.md b/llm-content/api/payments/recurring-payments/custom/cards/create-authorization-transaction.md new file mode 100644 index 00000000..7f1112ef --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/cards/create-authorization-transaction.md @@ -0,0 +1,1127 @@ +--- +title: 1. Create the Authorisation Transaction +description: Create an authorisation transaction for cards using Razorpay APIs. +--- + +# 1. Create the Authorisation Transaction + +You can create an authorisation transaction using [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +## 1.1. Using Razorpay APIs + +To create an authorisation transaction using Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorisation-payment). + +> **INFO** +> +> +> **Handy Tips** +> +> For the Authorisation Payment to be successful in a day (for example, 5th June), you should create an Order and the Authorisation Transaction on the same day (5th June) before 11:59 pm. +> + +### 1.1.1. Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + +### Request Parameters + + `name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + + +### 1.1.2. Create an Order + +The Orders API allows you to create a unique Razorpay `order_id`, for example, `order_1Aa00000000001`, that would be tied to the authorisation transaction. Refer to our detailed [Order documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md) for more details. + +Use the below endpoint to create an order. + +/orders + +You can create a payment against the `order_id` once it is generated. + +```cURL: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "", + "customer_id":"cust_1Aa00000000001", + "token": { + "max_amount": 1500000, + "expire_at": 2709971120, + "frequency": "monthly" + }, + "receipt": "Receipt No. 1", + notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' +```json: Response +{ + "id": "order_1Aa00000000002", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "customer_id":"cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + "created_at": 1565172642 +} +``` + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is `100`, that is, . + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_1Aa00000000001`. + +`token` +: `object` Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be auto-debited in a single charge. The minimum value is `100`, that is, , and the maximum value is `1500000`, that is, . For an amount higher than this, the cardholder should provide an Additional Factor of Authentication (AFA) as per RBI guidelines. + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The default value is 10 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Currently supported frequencies are `as_presented` and `monthly`. The support for other frequencies is expected to be live soon. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`entity` +: `string` The entity that has been created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100`, that is, . + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to pay. + +`currency` +: `string` The 3-letter ISO currency code for the payment. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`method` +: `string` Payment method used to make the authorisation transaction. Here, it is `card`. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +You can create a payment against the `order_id` after you create an order. + + +### 1.1.3. Create an Authorisation Payment + +> **INFO** +> +> +> **Handler Function vs Callback URL** +> +> - **Handler Function**: +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL**: +> +When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. +> + +```html: Custom checkout with handler functions + + + Pay + + + + const btn = document.querySelector("#btn"); + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + + razorpay.once("ready", function (response) { + console.log(response.methods); + }) + + var data = { + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "", // Default is INR. We support more than 90 currencies. + "email": "", + "contact": "", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "save": 1, + "consent_to_save_card": 1, + "method": "card", + "card[name]": "", + "card[number]": "5104015555555558", + "card[cvv]": "123", + "card[expiry_month]": "10", + "card[expiry_year]": "30" + }; + + btn.addEventListener("click", function () { // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on("payment.success", function (resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature) + }); // will pass payment ID, order ID and Razorpay signature to success handler. + + razorpay.on("payment.error", function (resp) { + alert(resp.error.description) + }); // will pass error object to error handler + }) + + +```html: Custom checkout with Callback URL + + + Pay + + + + const btn = document.querySelector("#btn"); + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + + razorpay.once("ready", function (response) { + console.log(response.methods); + }) + + var data = { + "callback_url": "www.example-callback-url.com", + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "", // Default is INR. We support more than 90 currencies. + "email": "", + "contact": "", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "save": 1, + "consent_to_save_card": 1, + "method": "card", + "card[name]": "", + "card[number]": "5104015555555558", + "card[cvv]": "123", + "card[expiry_month]": "10", + "card[expiry_year]": "30" + }; + + btn.addEventListener("click", function () { // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + }) + + +``` + + +### Additional Checkout Fields + + `customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + + `recurring` _mandatory_ +: `boolean` Possible values: + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + + +> **INFO** +> +> +> **Handy Tips** +> +> The `recurring` parameter also supports the value `preferred`. Use this when you want to support **recurring payments** and **one-time payment** in the same flow. +> + +`save` _mandatory_ +: `integer` Indicates whether to save the card details. Possible values: + - `1`: Save the card details. + - `0`: Do not save the card details. + +`consent_to_save_card` _mandatory_ +: `integer` Indicates whether you have taken the customer's consent for tokenising the card. Possible values: + - `1`: Taken the customer's consent. + - `0`: Not taken the customer's consent. + + +After this step, you can proceed to integrate with the [Fetch Token API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/cards/tokens.md). + +## 1.2. Using a Registration Link + +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the [API](#121-create-a-registration-link) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> - You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> - You can [use Webhooks to get notifications about successful payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) against a registration link. +> + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. + +A registration link must always have the amount (in Paise) that the customer will be charged when making the authorisation payment. For cards, the amount must be a minimum of `₹1`. + +### 1.2.1. Create a Registration Link + +Use the below endpoint to create a registration link. + +/subscription_registration/auth_links + +```curl: Request +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"", + "email":"", + "contact":"" + }, + "type":"link", + "amount":"100", + "currency":"", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":{ + "method":"card", + "max_amount":"100000000", + "expire_at":1609423824 + }, + "receipt":"Receipt No. 1", + "email_notify": true, + "sms_notify": true, + "expire_by":1580479824, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrXGIpd3N17DX", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrXGJNngJyEAe", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 4102444799, + "issued_at": 1595491014, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491014, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/VSriCfn", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491014, + "idempotency_key": null +} +``` + + +### Request Parameters + + `customer` +: Details of the customer to whom the registration link will be sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `string` Customer's phone number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, only `INR` is supported. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. For example, `12:30 p.m. Thali meals (Gaurav Kumar)`. + `subscription_registration` +: Details of the authorisation transaction. + + `method` _mandatory_ + : `string` The authorization method. Here it is `card`. + + `max_amount` _optional_ + : `integer` Use to set the maximum amount (in paise) per debit request. The value can range from `500` - `9999900`. Defaults to ₹99,000. + + `expire_at` _optional_ + : `integer` The timestamp, in Unix format, till when you can use the token (authorization on the payment method) to charge the customer subsequent payments. + `sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Can have the following values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Can have the following values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The timestamp, in Unix, till when the registration link should be available to the customer to make the authorisation transaction. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + + +### Path Parameters + + `id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + + + +### Response Parameter + +`success` +: `boolean` Indicates whether the notifications were sent successfully. Possible values: + - `true`: The notifications were successfully sent via SMS, email or both. + - `false`: The notifications were not sent. + + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + + +### Path Parameter + + `id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. + + + +### Response Parameters + + `id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + + +After this step, you can proceed to integrate with the [Fetch Token API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/cards/tokens.md). diff --git a/llm-content/api/payments/recurring-payments/custom/cards/create-subsequent-payments.md b/llm-content/api/payments/recurring-payments/custom/cards/create-subsequent-payments.md new file mode 100644 index 00000000..93192527 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/cards/create-subsequent-payments.md @@ -0,0 +1,516 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notification":{ + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114 + }, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notification = new JSONObject(); +notification.put("token_id","token_M7K2eFBU7vToaQ"); +notification.put("payment_after","1634057114"); +orderRequest.put("notification", notification); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array( + 'receipt' => '123', + 'amount' => 1000, + 'payment_capture' => true, + 'currency' => '', + 'notification' => array( + 'token_id' => 'token_M7K2eFBU7vToaQ', + 'payment_after' => '1634057114' + ), + 'notes' => array( + 'key1' => 'value3', + 'key2' => 'value2' + ) +)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notification": { + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114 + }, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notification': { + 'token_id': 'token_M7K2eFBU7vToaQ', + 'payment_after': 1634057114 + }, + 'notes': { + 'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.' + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notification": { + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114 + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notification": map[string]interface{}{ + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114 + }, + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 1000); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notification = new Dictionary(); +notification.Add("token_id", "token_M7K2eFBU7vToaQ"); +notification.Add("payment_after", "1634057114"); +orderRequest.Add("notification", notification); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is `100`, that is, . + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`notification` +: `object` Details of the pre-debit notification. This object is optional. You should use it only if you want to control pre-debit notifications and debits. If you do not pass this object, we will automatically try to debit after 36 hours and 5 minutes. + + + +> **INFO** +> +> +> **Handy Tips** +> +> The TAT to create a debit if you send a pre-debit notification is 36 hours and 5 minutes. +> + + + + +> **WARN** +> +> +> **Watch Out!** +> +> We will not attempt any retry if the debit fails for tokens with the notification object in the created order. You should manually retry the debit attempt. +> + + `token_id` _mandatory_ + : `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + + `payment_after` _optional_ + : `integer` UNIX timestamp post which the debit is supposed to happen. Defaults to 36 hours and 5 minutes after the pre-debit notification is delivered. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + + + +### Response Parameters + + `id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000001`. + +`entity` +: `string` The entity that has been created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `rcptid #1`. + +`notification` +: `object` Details of the pre-debit notification. + + `token_id` + : `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + + `payment_after` + : `integer` UNIX timestamp post which the debit is supposed to happen. + + `id` + : `string` the unique identifier of the notification. For example, `notification_00000000000001`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + + +## 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + + + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameter + +`razorpay_payment_id` +: `string` The unique identifier of the payment that is created. For example, `pay_1Aa00000000001`. + + + +### Error Response Parameters + + Given below is a list of possible errors you may face while creating a Recurring Payment. + +Error [columWidth="30"] | Cause | Solution +--- +pre_debit_notification_not_sent | This error occurs when a pre-debit notification is not sent and a debit attempt is made. | Make sure to send a pre-debit notification before an attempt. +--- +BAD_REQUEST_MANDATE_PROMISED_DEBIT_DATE_NOT_HONOURED | This error occurs when you attempt a debit within 36 hours and 5 minutes of a notification being delivered. | You can only attempt a manual debit 36 hours and 5 minutes after the notification is delivered. diff --git a/llm-content/api/payments/recurring-payments/custom/cards/tokens.md b/llm-content/api/payments/recurring-payments/custom/cards/tokens.md new file mode 100644 index 00000000..80484d8f --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/cards/tokens.md @@ -0,0 +1,526 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +## 2.1. Fetch Token by Payment id + +Use the below endpoint to fetch `token_id` using the `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String Paymentid = "pay_FHfqtkRzWvxky4"; + +Payment payment = instance.payments.fetch(paymentids); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_FHfqtkRzWvxky4" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) +``` + +```json: Response +{ + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "", + "status": "captured", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "bank": null, + "wallet": null, + "vpa": null, + "email": "", + "contact": "", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "541898" + }, + "created_at": 1595449871 +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` from the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + + +### Path Parameter + + `id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + + + +### Response Parameters + + `id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. Here, it is `payment`. + +`amount` +: `integer` The payment amount represented in smallest unit of the currency passed. For example, `amount = 100` translates to `100` subunits, that is . + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`order_id` +: `string` The unique identifier of the order. + +`invoice_id` +: `string` The unique identifier of the invoice. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`amount_refunded` +: `integer` The amount refunded in smallest unit of the currency passed. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string` Description of the payment, if any. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `integer` Customer contact number used for the payment. + +`customer_id` +: `string` The unique identifier of the customer. + +`token_id` +: `string` The unique identifier of the token. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + + +## 2.2. Fetch Tokens by Customer id + +Use the below endpoint to fetch all tokens linked to a customer. + +A customer can have multiple tokens tied to them. These tokens can be used to create subsequent payments for multiple products or services. + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_FHfn3rIiM1Z8nr"; + +Customer customer = instance.customers.fetchToken(customerId, tokenId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000002" + +tokenId = "token_FHfn3rIiM1Z8nr" + +Razorpay::Customer.fetch(customerId).fetchToken(tokenId) +``` + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfn3rIiM1Z8nr", + "entity": "token", + "token": "2aqzyte2EqvuDr", + "bank": null, + "wallet": null, + "method": "card", + "card": { + "entity": "card", + "name": "", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer", + "expiry_month": 5, + "expiry_year": 2030, + "flows": { + "otp": true, + "recurring": true + } + }, + "vpa": null, + "recurring": true, + "auth_type": null, + "mrn": null, + "used_at": 1595449871, + "created_at": 1595449652, + "expired_at": 1748716199, + "dcc_enabled": false + } + ] +} +``` + + +### Path Parameter + + `id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + + + +### Response Parameters + + `entity` +: `string` The entity being created. Here, it is a `collection`. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: `object` Details related to token such as `token id` and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is `token_id`. + + `entity` + : `string` The entity being created. Here, it is a `token`. + + `token` + : `string` The token is being fetched. + + `bank` + : `string` Card issuing bank details. + + `wallet` + : `string` Provides wallet information. + + `method` + : `string` The payment method used to make the transaction. + + `card` + : `object` Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is `Visa`. + + `type` + : `string` Card type (debit or credit). In this example, it is `credit`. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `boolean` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : `object` The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + + `vpa` + : `object` The VPA details. + + `username` + : `string` The username of the VPA holder. For example, `gaurav.kumar`. + + `handle` + : `string` The VPA handle. Here it is `upi`. + + `name` + : `string` The name of the VPA holder. + + + `recurring` + : `string` This represents whether recurring is enabled for this token. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + `recurring_details` + : `object` Details of the recurring transaction. + + `status` + : `string` This represents the status of the recurring transaction. Possible values: + - `initiated` + - `confirmed` + - `rejected` + - `cancelled` + - `paused` + + `failure_reason` + : `string` This provides the reason why the recurring transaction failed. + + `auth_type` + : `string` The authorisation type details. + + `mrn` + : `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + + `used_at` + : `integer` The VPA usage timestamp. + + `created_at` + : `integer` The token creation timestamp. + + `expired_at` + : `integer` The token expiry date timestamp. + + `dcc_enabled` + : `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + + +## 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameter + + `customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + + + +### Response Parameter + + `deleted` +: `boolean` Indicates whether the token is deleted. Possible values: + - `true`: The token is deleted successfully. + - `false`: The token was not deleted. diff --git a/llm-content/api/payments/recurring-payments/custom/emandate/auto-debit.md b/llm-content/api/payments/recurring-payments/custom/emandate/auto-debit.md new file mode 100644 index 00000000..a46c821d --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/emandate/auto-debit.md @@ -0,0 +1,2070 @@ +--- +title: Charge First Payment Automatically after Emandate Registration +description: Register a customer's mandate AND charge them the first recurring payment as part of the same transaction via Emandate. +--- + +# Charge First Payment Automatically after Emandate Registration + +## 1. Create an Authorisation Transaction + +> **INFO** +> +> +> **Authorisation transaction + auto-charge first payment** +> +> You can register a customer's mandate **AND** charge them the first recurring payment as part of the same transaction. To do this all you have to do is pass the `first_payment_amount` parameter while creating the order. +> + +You can create an authorisation transaction using [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +### 1.1. Using Razorpay APIs + +To create an authorisation transaction using Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorisation-payment). + +> **INFO** +> +> +> **Handy Tips** +> +> For the Authorisation Payment to be successful in a day (for example, 5th June), you should create an Order and the Authorisation Transaction on the same day (5th June) before 11:59 pm. +> + +#### 1.1.1. Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + +#### Request Parameters + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.1.2. Create an Order + +The Orders API allows you to create a unique Razorpay `order_id`, for example, `order_1Aa00000000001`, that would be tied to a payment. This `order_id` has a 1:1 mapping with the order created for the authorisation payment at your end. To learn more about Razorpay Orders, refer our detailed [Order documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +Use the below endpoint to create an order. + +/orders + +You can create a payment against the `order_id` once it is created. + +```cURL: Emandate via Netbanking +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "method": "emandate", + "payment_capture": true, + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "first_payment_amount": 100, + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}' +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "netbanking", + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 100 + } +} +```cURL: Emandate via Debit Card +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "method": "emandate", + "payment_capture": true, + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "first_payment_amount": 100, + "auth_type": "debitcard", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}' +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "debitcard", + "expire_at": 4102444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 100 + } +} +```cURL: Emandate via Aadhaar +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "method": "emandate", + "payment_capture": true, + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "first_payment_amount": 100, + "auth_type": "aadhaar", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}' +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "aadhaar", + "expire_at": 4102444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 100 + } +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For emandate, the amount has to be `0`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`method` _mandatory_ +: `string` The authorization method. In this case, the value will be `emandate`. + +`payment_capture` _mandatory_ +: `boolean` Determines if payment should be automatically captured. Possible values: + - `true` (recommended): Automatically capture the payment. + - `false` (default/not recommended): You have to manually capture payments. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer who is to be charged. For example, `cust_D0cs04OIpPPU1F`. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: `object` Details related to the authorisation such as max amount and bank account information. Pass a value in the `first_payment_amount` parameter if you want to auto-charge the customer the first payment immediately after authorisation using the same `order_id`. The first payment will be created automatically and executed within 2 days of emandate token confirmation. + + `first_payment_amount` _optional_ + : `integer` The amount, in paise, the customer should be auto-charged in addition to the authorization amount. For example, `100000`. + + `auth_type` _optional_ + : `string` Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + + `max_amount` _optional_ + : `integer` The maximum amount, in paise, that a customer can be charged in one transaction. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` _optional_ + : `integer` The timestamp, in Unix format, till when you can use the token (authorization on the payment method) to charge the customer subsequent payments. Defaults to 10 years for `emandate`. The value can range from the current date to 31-12-2099 (`4101580799`). + + `bank_account` + : Customer bank account details. + + `account_number` _optional_ + : `string` Customer's bank account number. + + `ifsc_code` _optional_ + : `string` Customer's bank IFSC. For example `UTIB0000001`. + + `beneficiary_name` _optional_ + : `string` Customer's name. For example, `Gaurav Kumar`. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `notes`_optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.1.3. Create an Authorisation Payment + +> **INFO** +> +> +> **Handler Function vs Callback URL** +> +> - **Handler Function**: +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL**: +> +When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. +> + + +### Netbanking + + ```html: Handler Function + + + + + + + + Pay + + + + const btn = document.querySelector("#btn"); + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + + razorpay.once("ready", function (response) { + console.log(response.methods); + }) + + var data = { + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR", // Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "method": "emandate", + "bank": "HDFC", + "auth_type": "netbanking", + "bank_account[name]": "Gaurav Kumar", + "bank_account[account_number]": "1121431121541121", + "bank_account[account_type]": "savings", + "bank_account[ifsc]": "HDFC0000001" + }; + + btn.addEventListener("click", function () { // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on("payment.success", function (resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature) + }); // will pass payment ID, order ID and Razorpay signature to success handler. + + razorpay.on("payment.error", function (resp) { + alert(resp.error.description) + }); // will pass error object to error handler + }) + + + ```html: Callback URL + + + + + + + + Pay + + + + const btn = document.querySelector("#btn"); + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + + razorpay.once("ready", function (response) { + console.log(response.methods); + }) + + var data = { + "callback_url": "www.example-callback-url.com", + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR", // Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "method": "emandate", + "bank": "HDFC", + "auth_type": "netbanking", + "bank_account[name]": "Gaurav Kumar", + "bank_account[account_number]": "1121431121541121", + "bank_account[account_type]": "savings", + "bank_account[ifsc]": "HDFC0000001" + }; + + btn.addEventListener("click", function () { // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + }) + + + ``` + + + +### Debit Card + + ```html: Handler Function + + + + + + + Pay + + + const btn = document.querySelector("#btn"); + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + + razorpay.once("ready", function (response) { + console.log(response.methods); + }) + + var data = { + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR", // Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "method": "emandate", + "bank": "HDFC", + "auth_type": "debitcard", + "bank_account[name]": "Gaurav Kumar", + "bank_account[account_number]": "1121431121541121", + "bank_account[account_type]": "savings", + "bank_account[ifsc]": "HDFC0000001" + }; + + btn.addEventListener("click", function () { // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on("payment.success", function (resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature) + }); // will pass payment ID, order ID and Razorpay signature to success handler. + + razorpay.on("payment.error", function (resp) { + alert(resp.error.description) + }); // will pass error object to error handler + }) + + + ```html: Callback URL + + + + + + + + Pay + + + + const btn = document.querySelector("#btn"); + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + + razorpay.once("ready", function (response) { + console.log(response.methods); + }) + + var data = { + "callback_url": "www.example-callback-url.com", + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR", // Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "method": "emandate", + "bank": "HDFC", + "auth_type": "debitcard", + "bank_account[name]": "Gaurav Kumar", + "bank_account[account_number]": "1121431121541121", + "bank_account[account_type]": "savings", + "bank_account[ifsc]": "HDFC0000001" + }; + + btn.addEventListener("click", function () { // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + }) + + + ``` + + + +### Aadhaar + + ```html: Handler Function + + + + + + + + Pay + + + + const btn = document.querySelector("#btn"); + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + + razorpay.once("ready", function (response) { + console.log(response.methods); + }) + + var data = { + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR", // Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "method": "emandate", + "bank": "HDFC", + "auth_type": "aadhaar", + "bank_account[name]": "Gaurav Kumar", + "bank_account[account_number]": "1121431121541121", + "bank_account[account_type]": "savings", + "bank_account[ifsc]": "HDFC0000001" + }; + + btn.addEventListener("click", function () { // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on("payment.success", function (resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature) + }); // will pass payment ID, order ID and Razorpay signature to success handler. + + razorpay.on("payment.error", function (resp) { + alert(resp.error.description) + }); // will pass error object to error handler + }) + + + ```html: Callback URL + + + + + + + + Pay + + + + const btn = document.querySelector("#btn"); + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + + razorpay.once("ready", function (response) { + console.log(response.methods); + }) + + var data = { + "callback_url": "www.example-callback-url.com", + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR", // Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "method": "emandate", + "bank": "HDFC", + "auth_type": "aadhaar", + "bank_account[name]": "Gaurav Kumar", + "bank_account[account_number]": "1121431121541121", + "bank_account[account_type]": "savings", + "bank_account[ifsc]": "HDFC0000001" + }; + + btn.addEventListener("click", function () { // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + }) + + + ``` + + +#### Additional Checkout Fields + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +`recurring` _mandatory_ +: `boolean` Determines whether the recurring is enabled or not. Possible values: + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +### 1.2. Using a Registration Link + +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the [API](#121-create-a-registration-link) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> - You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> - You can [use Webhooks to get notifications about successful payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) against a registration link. +> + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. + +A registration link must always have an amount (in paise) that the customer will be charged when making the authorisation payment. In the case of emandate, the order amount must be `0`. + +### 1.2.1. Create a Registration Link + +Use the below endpoint to create a registration link. + +/subscription_registration/auth_links + +```cURL: Emandate via Netbanking +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "netbanking", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrY6tDtVP2dHg", + "entity": "invoice", + "receipt": "Receipt no. 1", + "invoice_number": "Receipt no. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrY6tiC2y7NNN", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491063, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491063, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/DxEcNtR", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491063, + "idempotency_key": null +} +```cURL: Emandate via Debit Card +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "debitcard", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrZAOeCuB9HtK", + "entity": "invoice", + "receipt": "Receipt no. 1", + "invoice_number": "Receipt no. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZAPOStKd4xS", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491123, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491123, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/RllVOmA", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491123, + "idempotency_key": null +} +```cURL: Emandate via Aadhaar +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "aadhaar", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrZAOeCuB9HtK", + "entity": "invoice", + "receipt": "Receipt no. 1", + "invoice_number": "Receipt no. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZAPOStKd4xS", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491123, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491123, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/RllVOmA", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491123, + "idempotency_key": null +} +``` + +#### Request Parameters + +`customer` +: Details of the customer to whom the registration link will be sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `string` Customer's phone number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, only `INR` is supported. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. For example, `12:30 p.m. Thali meals (Gaurav Kumar)`. + +`subscription_registration` +: Details of the authorisation payment. + + `method` _mandatory_ + : `string` The authorization method. In this case, it will be `emandate`. + + `auth_type` _optional_ + : `string` Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + + `first_payment_amount` _optional_ + : `integer` The amount, in paise, the customer should be auto-charged in addition to the authorization amount. For example, `100000`. + + `max_amount` _optional_ + : `integer` The maximum amount, in paise, that a customer can be charged in one transaction. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` _optional_ + : `integer` The timestamp, in Unix, till when you can use the token (authorization on the payment method) to charge the customer subsequent payments. Defaults to 10 years for `emandate`. The value can range from the current date to 31-12-2099 (`4101580799`). + + `bank_account` + : The customer's bank account details. + + `beneficiary_name` _optional_ + : `string` Name on the bank account. For example `Gaurav Kumar`. + + `account_number` _optional_ + : `integer` Customer's bank account number. For example `11214311215411`. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` _optional_ + : `string` Customer's bank IFSC. For example `HDFC0000001`. + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Can have the following values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Can have the following values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The timestamp, in Unix, till when the registration link should be available to the customer to make the authorisation transaction. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + +#### Path Parameters + +`id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. + +## 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +### 2.1. Fetch Token by Payment ID + +Use the below endpoint to fetch the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); + +```json: Response +{ + "id": "pay_FHf9a7AO0iXM9I", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_FHf9OwSeyetnKC", + "invoice_id": "inv_FHf9P2hhXEti7i", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHf9aAZR9hWJkq", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595447410 +} +``` + +> **INFO** +> +> +> **Note** +> +> You can also retrieve the `token_id` via the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +### 2.2. Fetch Tokens by Customer ID + +Use the below endpoint to fetch all tokens linked to a customer. + +A customer can have multiple tokens tied to them. These tokens can be used to create subsequent payments for multiple products or services. + +/customers/:id/tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); + +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "token_FHf94Uym9tdYFJ", + "entity": "token", + "token": "2wDPM7VAlXtjAR", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "netbanking", + "mrn": null, + "used_at": 1595447381, + "created_at": 1595447381, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 1689971140, + "dcc_enabled": false + }, + { + "id": "token_FHf9aAZR9hWJkq", + "entity": "token", + "token": "AwAwIFBmDSJ4p6", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "debitcard", + "mrn": null, + "used_at": 1595447410, + "created_at": 1595447410, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 4102444799, + "dcc_enabled": false + } + ] +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +### 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + +#### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + +## 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +### 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +### 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. diff --git a/llm-content/api/payments/recurring-payments/custom/emandate/create-authorization-transaction.md b/llm-content/api/payments/recurring-payments/custom/emandate/create-authorization-transaction.md new file mode 100644 index 00000000..f1632472 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/emandate/create-authorization-transaction.md @@ -0,0 +1,1985 @@ +--- +title: 1. Create the Authorisation Transaction +description: Know how to create an authorisation transaction with method emandate so customers can complete the authorization using their netbanking login. +--- + +# 1. Create the Authorisation Transaction + +You can create an authorisation transaction using [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +## 1.1. Using Razorpay APIs + +To create an authorisation transaction using the Razorpay APIs, you need to: + +1. [Fetch Payment Methods](#111-fetch-payment-methods). +2. [Create a Customer](#111-create-a-customer). +3. [Create an Order](#112-create-an-order). +4. [Create Authorisation Payment using Razorpay APIs](#114-create-an-authorisation-payment). + +### 1.1.1. Fetch Payment Methods + +Use the below endpoint to fetch a list of banks Razorpay supports for different payment methods. + +/methods + +> **WARN** +> +> +> **Watch Out!** +> +> To fire this API, provide your [KEY_ID] for authorization. Your [KEY_SECRET] is NOT required and should NOT be passed. +> + +```curl: Request +curl -u [YOUR_KEY_ID]\ +- X GET https://api.razorpay.com/v1/methods \ +```json: Response +{ + "methods": { + "entity": "methods", + ... + recurring: { + emandate: { + "AUBL": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "AU SMALL FINANCE BANK" + }, + }, + } + } + } +``` + +### 1.1.2. Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + +### Request Parameters + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.1.3. Create an Order + +```cURL: Emandate via Netbanking +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("payment_capture", true); +orderRequest.put("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.put("method", "emandate"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("auth_type","netbanking"); +token.put("max_amount","9999900"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0000001"); +token.put("bank_account",bankAccount); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','payment_capture' => true,'method' => 'emandate','customer_id' => 'cust_1Aa00000000001','receipt' => 'Receipt No. 1','notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'),'token' => array('auth_type' => 'netbanking','max_amount' => 9999900,'expire_at' => 4102444799,'notes' => array('notes_key_1' => 'Tea, Earl Grey, Hot','notes_key_2' => 'Tea, Earl Grey… decaf.'),'bank_account' => array('beneficiary_name' => 'Gaurav Kumar','account_number' => '1121431121541121','account_type' => 'savings','ifsc_code' => 'HDFC0000001')))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + payment_capture: true, + method: "emandate", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "netbanking", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: 1121431121541121, + account_type: "savings", + ifsc_code: "HDFC0000001" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'emandate', + 'customer_id': 'cust_1Aa00000000001', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'netbanking', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "amount": 0, + "currency": "INR", + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 1121431121541121, + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token": map[string]interface{}{ + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 0); +orderRequest.Add("currency", "INR"); +orderRequest.Add("payment_capture", true); +orderRequest.Add("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.Add("method", "emandate"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); +Dictionary token = new Dictionary(); +token.Add("auth_type","netbanking"); +token.Add("max_amount","9999900"); +token.Add("expire_at","2709971120"); +Dictionary tokenNotes = new Dictionary(); +tokenNotes.Add("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.Add("notes_key_2","Tea, Earl Grey… decaf."); +token.Add("notes",tokenNotes); +orderRequest.Add("token", token); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +token.Add("bank_account",bankAccount); + +Order order = client.Order.Create(orderRequest); + +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "netbanking", + "expire_at": 4102444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 0 + } +} +``` + +```cURL: Emandate via Debit Card +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "debitcard", + "max_amount": 9999900, + "expire_at": 4102444799, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("payment_capture", true); +orderRequest.put("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.put("method", "emandate"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("auth_type","debitcard"); +token.put("max_amount","9999900"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0000001"); +token.put("bank_account",bankAccount); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','payment_capture' => true,'method' => 'emandate','customer_id' => 'cust_1Aa00000000001','receipt' => 'Receipt No. 1','notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'),'token' => array('auth_type' => 'debitcard','max_amount' => 9999900,'expire_at' => 4102444799,'notes' => array('notes_key_1' => 'Tea, Earl Grey, Hot','notes_key_2' => 'Tea, Earl Grey… decaf.'),'bank_account' => array('beneficiary_name' => 'Gaurav Kumar','account_number' => '1121431121541121','account_type' => 'savings','ifsc_code' => 'HDFC0000001')))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + payment_capture: true, + method: "emandate", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "debitcard", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: 1121431121541121, + account_type: "savings", + ifsc_code: "HDFC0000001" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'emandate', + 'customer_id': 'cust_1Aa00000000001', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'debitcard', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "amount": 0, + "currency": "INR", + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "debitcard", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 1121431121541121, + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token": map[string]interface{}{ + "auth_type": "debitcard", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "debitcard", + "expire_at": 4102444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 0 + } +} +``` + +```cURL: Emandate via Aadhaar +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "aadhaar", + "max_amount": 9999900, + "expire_at": 4102444799, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("payment_capture", true); +orderRequest.put("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.put("method", "emandate"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("auth_type","aadhaar"); +token.put("max_amount","9999900"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0000001"); +token.put("bank_account",bankAccount); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','payment_capture' => true,'method' => 'emandate','customer_id' => 'cust_1Aa00000000001','receipt' => 'Receipt No. 1','notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'),'token' => array('auth_type' => 'aadhaar','max_amount' => 9999900,'expire_at' => 4102444799,'notes' => array('notes_key_1' => 'Tea, Earl Grey, Hot','notes_key_2' => 'Tea, Earl Grey… decaf.'),'bank_account' => array('beneficiary_name' => 'Gaurav Kumar','account_number' => '1121431121541121','account_type' => 'savings','ifsc_code' => 'HDFC0000001')))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + payment_capture: true, + method: "emandate", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "aadhaar", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: 1121431121541121, + account_type: "savings", + ifsc_code: "HDFC0000001" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'emandate', + 'payment_capture': True, + 'customer_id': 'cust_1Aa00000000001', + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'aadhaar', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "amount": 0, + "currency": "INR", + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "aadhaar", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 1121431121541121, + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token": map[string]interface{}{ + "auth_type": "aadhaar", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "aadhaar", + "expire_at": 4102444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 0 + } +} +``` + +> **INFO** +> +> +> **Authorisation transaction + auto-charge first payment** +> +> You can register a customer's mandate **and** charge them the first recurring payment as part of the same transaction. Know more about [charge first payment automatically after Emandate registration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/auto-debit.md). +> + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For emandate, the amount has to be `0`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`method` _mandatory_ +: `string` The authorisation method. In this case the value will be `emandate`. + +`payment_capture` _mandatory_ +: `boolean` Determines if payment should be automatically captured. Possible values: + - `true` (recommended): Automatically capture the payment. + - `false` (default/not recommended): You have to manually capture payments. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer, who is to be charged. For example, `cust_D0cs04OIpPPU1F`. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `rcptid #1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: Details related to the authorisation such as max amount and bank account information. + + `auth_type` _optional_ + : `string` Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + + `max_amount` _optional_ + : `integer` The maximum amount, in paise, that a customer can be charged in one transaction. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` _optional_ + : `integer` The Unix timestamp to indicate till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. Defaults to 40 years. The maximum value you can set is 40 years from the current date. Any value beyond this will throw an error. + + `notes`_optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `bank_account` + : Customer's bank account details that should be pre-filled on the checkout. + + `account_number` _optional_ + : `string` Customer's bank account number. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` _optional_ + : `string` Customer's bank IFSC. For example `UTIB0000001`. + + `beneficiary_name` _optional_ + : `string` Customer's name. For example, `Gaurav Kumar`. + + `notes`_optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +> **INFO** +> +> +> **Authorisation transaction + auto-charge first payment** +> +> You can register a customer's mandate **AND** charge them the first recurring payment as part of the same transaction. Refer to the [Emandate section under Registration and Charge First Payment Together](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/auto-debit.md) for more information. +> + +### 1.1.4. Create an Authorisation Payment + +> **INFO** +> +> +> **Handler Function vs Callback URL** +> +> - **Handler Function**: +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL**: +> +When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. +> + + +### Netbanking + + ```html: Handler Function + + + + + + + + Pay + + + + const btn = document.querySelector("#btn"); + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + + razorpay.once("ready", function (response) { + console.log(response.methods); + }) + + var data = { + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR", // Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "method": "emandate", + "bank": "HDFC", + "auth_type": "netbanking", + "bank_account[name]": "Gaurav Kumar", + "bank_account[account_number]": "1121431121541121", + "bank_account[account_type]": "savings", + "bank_account[ifsc]": "HDFC0000001" + }; + + btn.addEventListener("click", function () { // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on("payment.success", function (resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature) + }); // will pass payment ID, order ID and Razorpay signature to success handler. + + razorpay.on("payment.error", function (resp) { + alert(resp.error.description) + }); // will pass error object to error handler + }) + + + ```html: Callback URL + + + + + + + + Pay + + + + const btn = document.querySelector("#btn"); + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + + razorpay.once("ready", function (response) { + console.log(response.methods); + }) + + var data = { + "callback_url": "www.example-callback-url.com", + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR", // Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "method": "emandate", + "bank": "HDFC", + "auth_type": "netbanking", + "bank_account[name]": "Gaurav Kumar", + "bank_account[account_number]": "1121431121541121", + "bank_account[account_type]": "savings", + "bank_account[ifsc]": "HDFC0000001" + }; + + btn.addEventListener("click", function () { // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + }) + + + ``` + + + +### Debit Card + + ```html: Handler Function + + + + + + + Pay + + + const btn = document.querySelector("#btn"); + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + + razorpay.once("ready", function (response) { + console.log(response.methods); + }) + + var data = { + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR", // Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "method": "emandate", + "bank": "HDFC", + "auth_type": "debitcard", + "bank_account[name]": "Gaurav Kumar", + "bank_account[account_number]": "1121431121541121", + "bank_account[account_type]": "savings", + "bank_account[ifsc]": "HDFC0000001" + }; + + btn.addEventListener("click", function () { // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on("payment.success", function (resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature) + }); // will pass payment ID, order ID and Razorpay signature to success handler. + + razorpay.on("payment.error", function (resp) { + alert(resp.error.description) + }); // will pass error object to error handler + }) + + + ```html: Callback URL + + + + + + + + Pay + + + + const btn = document.querySelector("#btn"); + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + + razorpay.once("ready", function (response) { + console.log(response.methods); + }) + + var data = { + "callback_url": "www.example-callback-url.com", + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR", // Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "method": "emandate", + "bank": "HDFC", + "auth_type": "debitcard", + "bank_account[name]": "Gaurav Kumar", + "bank_account[account_number]": "1121431121541121", + "bank_account[account_type]": "savings", + "bank_account[ifsc]": "HDFC0000001" + }; + + btn.addEventListener("click", function () { // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + }) + + + ``` + + + +### Aadhaar + + ```html: Handler Function + + + + + + + + Pay + + + + const btn = document.querySelector("#btn"); + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + + razorpay.once("ready", function (response) { + console.log(response.methods); + }) + + var data = { + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR", // Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "method": "emandate", + "bank": "HDFC", + "auth_type": "aadhaar", + "bank_account[name]": "Gaurav Kumar", + "bank_account[account_number]": "1121431121541121", + "bank_account[account_type]": "savings", + "bank_account[ifsc]": "HDFC0000001" + }; + + btn.addEventListener("click", function () { // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on("payment.success", function (resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature) + }); // will pass payment ID, order ID and Razorpay signature to success handler. + + razorpay.on("payment.error", function (resp) { + alert(resp.error.description) + }); // will pass error object to error handler + }) + + + ```html: Callback URL + + + + + + + + Pay + + + + const btn = document.querySelector("#btn"); + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + + razorpay.once("ready", function (response) { + console.log(response.methods); + }) + + var data = { + "callback_url": "www.example-callback-url.com", + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR", // Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "method": "emandate", + "bank": "HDFC", + "auth_type": "aadhaar", + "bank_account[name]": "Gaurav Kumar", + "bank_account[account_number]": "1121431121541121", + "bank_account[account_type]": "savings", + "bank_account[ifsc]": "HDFC0000001" + }; + + btn.addEventListener("click", function () { // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + }) + + + ``` + + +### Additional Checkout Fields + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +`recurring` _mandatory_ +: `boolean` Determines whether the recurring is enabled or not. Possible values: + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +## 1.2. Using a Registration Link + +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the [API](#121-create-a-registration-link) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> - You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> - You can [use Webhooks to get notifications about successful payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) against a registration link. +> + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. + +A registration link must always have an amount (in Paise) that the customer will be charged when making the authorisation payment. In the case of emandate, the order amount must be `0`. + +### 1.2.1. Create a Registration Link + +Use the below endpoint to create a registration link for recurring payments. + +/subscription_registration/auth_links + +```cURL: Emandate via Netbanking +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "method": "emandate", + "auth_type": "netbanking", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrY6tDtVP2dHg", + "entity": "invoice", + "receipt": "Receipt no. 1", + "invoice_number": "Receipt no. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrY6tiC2y7NNN", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491063, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491063, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/DxEcNtR", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491063, + "idempotency_key": null +} +```cURL: Emandate via Debit Card +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "method": "emandate", + "auth_type": "debitcard", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrZAOeCuB9HtK", + "entity": "invoice", + "receipt": "Receipt no. 1", + "invoice_number": "Receipt no. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZAPOStKd4xS", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491123, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491123, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/RllVOmA", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491123, + "idempotency_key": null +} +```cURL: Emandate via Aadhaar +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "method": "emandate", + "auth_type": "aadhaar", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrZAOeCuB9HtK", + "entity": "invoice", + "receipt": "Receipt no. 1", + "invoice_number": "Receipt no. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZAPOStKd4xS", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491123, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491123, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/RllVOmA", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491123, + "idempotency_key": null +} +``` + +### Request Parameters + +`customer` +: Details of the customer to whom the registration link will be sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `string` Customer's phone number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, only `INR` is supported. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. For example, `12:30 p.m. Thali meals (Gaurav Kumar)`. + +`subscription_registration` +: Details of the authorisation payment. + + `method` _mandatory_ + : `string` The authorization method. In this case, it will be `emandate`. + + `auth_type` _optional_ + : `string` Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + + `max_amount` _optional_ + : `integer` The maximum amount, in paise, that a customer can be charged in one transaction. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` _optional_ + : `integer` The timestamp, in Unix format, till when you can use the token (authorization on the payment method) to charge the customer subsequent payments. Defaults to 10 years for `emandate`. The value can range from the current date to 31-12-2099 (`4101580799`). + + `bank_account` + : The customer's bank account details. + + `beneficiary_name` _optional_ + : `string` Name on the bank account. For example `Gaurav Kumar`. + + `account_number` _optional_ + : `integer` Customer's bank account number. For example `11214311215411`. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` _optional_ + : `string` Customer's bank IFSC. For example `HDFC0000001`. + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Can have the following values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Can have the following values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The timestamp, in Unix, till when the registration link should be available to the customer to make the authorisation transaction. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + +### Path Parameters + +`id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. diff --git a/llm-content/api/payments/recurring-payments/custom/emandate/create-subsequent-payments.md b/llm-content/api/payments/recurring-payments/custom/emandate/create-subsequent-payments.md new file mode 100644 index 00000000..9a90e257 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/emandate/create-subsequent-payments.md @@ -0,0 +1,374 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +## 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. diff --git a/llm-content/api/payments/recurring-payments/custom/emandate/tokens.md b/llm-content/api/payments/recurring-payments/custom/emandate/tokens.md new file mode 100644 index 00000000..ff922a97 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/emandate/tokens.md @@ -0,0 +1,253 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +## 2.1. Fetch Token by Payment ID + +Use the below endpoint to fetch the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); + +```json: Response +{ + "id": "pay_FHf9a7AO0iXM9I", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_FHf9OwSeyetnKC", + "invoice_id": "inv_FHf9P2hhXEti7i", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHf9aAZR9hWJkq", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595447410 +} +``` + +> **INFO** +> +> +> **Note** +> +> You can also retrieve the `token_id` via the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +## 2.2. Fetch Tokens by Customer ID + +Use the below endpoint to fetch all tokens linked to a customer. + +A customer can have multiple tokens tied to them. These tokens can be used to create subsequent payments for multiple products or services. + +/customers/:id/tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); + +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "token_FHf94Uym9tdYFJ", + "entity": "token", + "token": "2wDPM7VAlXtjAR", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "netbanking", + "mrn": null, + "used_at": 1595447381, + "created_at": 1595447381, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 1689971140, + "dcc_enabled": false + }, + { + "id": "token_FHf9aAZR9hWJkq", + "entity": "token", + "token": "AwAwIFBmDSJ4p6", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "debitcard", + "mrn": null, + "used_at": 1595447410, + "created_at": 1595447410, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 4102444799, + "dcc_enabled": false + } + ] +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +## 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. diff --git a/llm-content/api/payments/recurring-payments/custom/paper-nach/auto-debit.md b/llm-content/api/payments/recurring-payments/custom/paper-nach/auto-debit.md new file mode 100644 index 00000000..b86942da --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/paper-nach/auto-debit.md @@ -0,0 +1,1838 @@ +--- +title: Charge First Payment Automatically after NACH Registration +description: Register a customer's mandate AND charge them the first recurring payment as part of the same transaction via paper NACH. +--- + +# Charge First Payment Automatically after NACH Registration + +## 1. Create an Authorisation Transaction + +> **INFO** +> +> +> **Authorisation transaction + auto-charge first payment** +> +> You can register a customer's mandate **AND** charge them the first recurring payment as part of the same transaction. To do this all you have to do is pass the `first_payment_amount` parameter while creating the order. +> + +The flow to complete an authorisation transaction using paper NACH is a little different from the regular recurring payment flow. The flow when using paper NACH is: +1. Create a customer. +1. Create an order by passing the `customer_id` and method `nach`. When you do this, Razorpay generates a NACH form with the customer information pre-filled and ready to sign. +1. The customer signs the form. The customer can obtain the form in one of the following ways: + - You can download the form from the Dashboard and send it to the customer. + - Download from the Hosted page (in the case of registration links). + +1. The signed form is uploaded to Razorpay. This can be done in one of the following ways: + - Using custom Checkout page created from Razorpay APIs. + - Hosted page (in the case of registration links). + - The customer can send you the form and you can upload the form for the customer. The acceptable image formats and size are: + - jpeg + - jpg + - png + - Maximum accepted size is 6 MB. + +Once the details are validated, the authorisation transaction is completed and a token is generated. You can charge your customer as per your business model once the token status changes to `confirmed`. + +You can create an authorisation transaction using [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +### 1.1. Using Razorpay APIs + +To create an authorisation transaction using Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorisation-payment). + +> **INFO** +> +> +> **Handy Tips** +> +> For the Authorisation Payment to be successful in a day (for example, 5th June), you should create an Order and the Authorisation Transaction on the same day (5th June) before 11:59 pm. +> + +### 1.1.1. Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + +#### Request Parameters + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.1.2. Create an Order + +You can use the [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md) API to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":0, + "currency":"INR", + "method":"nach", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token":{ + "first_payment_amount": 10000, + "auth_type":"physical", + "max_amount":10000000, + "expire_at":1580480689, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account":{ + "account_number":"11214311215411", + "ifsc_code":"HDFC0000001", + "beneficiary_name":"Gaurav Kumar", + "account_type":"savings" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "description":"Paper NACH Gaurav Kumar" + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.put("method", "nach"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("first_payment_amount",100); +token.put("auth_type","physical"); +token.put("max_amount","10000000"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +token.put("bank_account",bankAccount); +JSONObject nach = new JSONObject(); +nach.put("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.put("form_reference2","Method Paper NACH"); +nach.put("description","Paper NACH Gaurav Kumar"); +token.put("nach",nach); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => 'INR', 'method'=>'nach', 'customer_id'=>$customerId, 'receipt'=>'Receipt No. 5', 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Tea. Earl Gray. Hot.'), 'token'=>array('first_payment_amount'=>10000, 'auth_type'=>'physical' ,'max_amount'=>'50000','expire_at'=>'1634215992', 'notes'=>array('note_key 1'=> 'Tea, Earl Grey… decaf.','note_key 2'=> 'Tea. Earl Gray. Hot.'), 'bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233'), 'nach'=> array('form_reference1'=> 'Recurring Payment for Gaurav Kumar','form_reference2'=> 'Method Paper NACH', 'description'=>'Paper NACH Gaurav Kumar')))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 100, + currency: "INR", + method: "nach", + receipt: "Receipt No. 5", + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + token: { + first_payment_amount: 10000, + auth_type: "physical", + max_amount: 50000, + expire_at: 1634215992, + notes: { + "note_key 1": "Tea, Earl Grey… decaf.", + "note_key 2": "Tea. Earl Gray. Hot." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "11214311215411", + account_type: "savings", + ifsc_code: "HDFC0001233" + }, + nach: { + form_reference1: "Recurring Payment for Gaurav Kumar", + form_reference2: "Method Paper NACH", + description: "Paper NACH Gaurav Kumar" + } + } +}) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount":100, + "currency":"INR", + "method":"nach", + "receipt":"Receipt No. 5", + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + }, + "token":{ + "first_payment_amount":10000, + "auth_type":"physical", + "max_amount":50000, + "expire_at":1634215992, + "notes":{ + "note_key 1":"Tea, Earl Grey… decaf.", + "note_key 2":"Tea. Earl Gray. Hot." + }, + "bank_account":{ + "beneficiary_name":"Gaurav Kumar", + "account_number":11214311215411, + "account_type":"savings", + "ifsc_code":"HDFC0001233" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "description":"Paper NACH Gaurav Kumar" + } + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "method": "nach", + "receipt": "Receipt No. 5", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "token": { + "first_payment_amount": 10000, + "auth_type": "physical", + "max_amount": 50000, + "expire_at": 1634215992, + "notes": { + "note_key 1": "Tea, Earl Grey… decaf.", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + }, + "nach": { + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "description": "Paper NACH Gaurav Kumar" + } + } +} +Razorpay.Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount":0, + "currency":"INR", + "method":"nach", + "customer_id": "cust_1Aa00000000001", + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token":map[string]interface{}{ + "first_payment_amount": 10000, + "auth_type":"physical", + "max_amount":10000000, + "expire_at":2709971120, + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account":map[string]interface{}{ + "account_number":"11214311215411", + "ifsc_code":"HDFC0000001", + "beneficiary_name":"Gaurav Kumar", + "account_type":"savings", + }, + "nach":map[string]interface{}{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "description":"Paper NACH Gaurav Kumar", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 0); +orderRequest.Add("currency", "INR"); +orderRequest.Add("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.Add("method", "nach"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); +Dictionary token = new Dictionary(); +token.Add("auth_type","physical"); +token.Add("max_amount","10000000"); +token.Add("expire_at","2709971120"); +Dictionary tokenNotes = new Dictionary(); +tokenNotes.Add("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.Add("notes_key_2","Tea, Earl Grey… decaf."); +token.Add("notes",tokenNotes); +orderRequest.Add("token", token); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +token.Add("bank_account",bankAccount); +Dictionary nach = new Dictionary(); +nach.Add("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.Add("form_reference2","Method Paper NACH"); +nach.Add("description","Paper NACH Gaurav Kumar"); +token.Add("nach",nach); + +Order order = client.Order.Create(orderRequest); + +```json: Response +{ + "id":"order_1Aa00000000001", + "entity":"order", + "amount":0, + "amount_paid":0, + "amount_due":0, + "currency":"INR", + "receipt":"Receipt No. 1", + "offer_id":null, + "offers":{ + "entity":"collection", + "count":0, + "items":[] + }, + "status":"created", + "attempts":0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at":1579775420, + "token":{ + "method":"nach", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status":null, + "failure_reason":null, + "currency":"INR", + "max_amount":10000000, + "auth_type":"physical", + "expire_at":1580480689, + "nach":{ + "create_form":true, + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "prefilled_form":"https://rzp.io/i/bitw", + "upload_form_url":"https://rzp.io/i/gts", + "description":"Paper NACH Gaurav Kumar" + }, + "bank_account":{ + "ifsc":"HDFC0000001", + "bank_name":"HDFC Bank", + "name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "beneficiary_email":"gaurav.kumar@example.com", + "beneficiary_mobile":"9876543210" + }, + "first_payment_amount":10000 + } +} +``` + +> **INFO** +> +> +> **Download and Upload the Pre-filled NACH Form** +> +> Once the order is created, the generated pre-filled form must be downloaded, signed by your customer and uploaded back to Razorpay to complete the transaction. + +> +> You receive the following parameters as part of the response: +> +> `prefilled_form` +> : The link from where you can download the pre-filled NACH form. +> +> `upload_form_url` +> : The link where the NACH form should be uploaded once it is signed by the customer. +> + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For Paper NACH, the amount has to be `0`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`method` _mandatory_ +: `string` The authorization method. In this case, the value will be `nach`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer who is to be charged. For example, `cust_D0cs04OIpPPU1F`. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: Details related to the authorization such as max amount and bank account information. Pass a value in the `first_payment_amount` parameter if you want to auto-charge the customer the first payment immediately after authorization. + + `first_payment_amount` _optional_ + : `integer` The amount, in paise, the customer should be auto-charged in addition to the authorization amount. For example, `100000`. + + `auth_type` _mandatory_ + : `string` In this case, it will be `nach`. + + `bank_account` + : The customer's bank account details. + + `beneficiary_name` _mandatory_ + : `string` Name on the bank account. For example, `Gaurav Kumar`. + + `account_number` _mandatory_ + : `integer` Customer's bank account number. For example, `11214311215411`. + + `account_type` _mandatory_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` _mandatory_ + : `string` Customer's bank IFSC. For example, `HDFC0000001`. + + `nach` + : Additional information to be printed on the NACH form that your customer will sign. + + `form_reference1` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `form_reference2` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `max_amount` _optional_ + : `integer` Use to set the maximum amount, in paise, per debit request. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/faqs.md#3-is-there-a-limit-on-the-debit). + + `expire_at` _optional_ + : `integer` The timestamp, in Unix, till when you can use the token (authorization on the payment method) to charge the customer subsequent payments. Defaults to 10 years for `emandate`. The value can range from the current date to 31-12-2099 (`4101580799`). + + `notes`_optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.1.3. Create an Authorisation Payment + +Follow these steps to create authorisation transaction: + +1. Download the Paper NACH form and send it to the customers. +1. Ask the customers to fill the form and + - Upload it via the Checkout. + - Send it to you and you can upload it from the Dashboard. +1. Upload the received form via create NACH File API. + +### 1.1.3.1 Upload the NACH File via Checkout + +> **INFO** +> +> +> **Handler Function vs Callback URL** +> +> - **Handler Function**: +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL**: +> +When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. +> + +```html: Custom checkout with handler functions + + + Pay + + const btn = document.querySelector("#btn"); + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + razorpay.once("ready", function(response) { + console.log(response.methods); + }) + var data = { + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR",// Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "method": "nach", + "bank": "HDFC", + "auth_type": "physical", + "bank_account[name]": "Gaurav Kumar", + "bank_account[account_number]": "1121431121541121", + "bank_account[account_type]": "savings", + "bank_account[ifsc]": "HDFC0000001" + }; + btn.addEventListener("click", function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID and Razorpay signature to success handler. + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); // will pass error object to error handler + }) + + +```html: Custom checkout with Callback URL + + + Pay + + const btn = document.querySelector("#btn"); + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + razorpay.once("ready", function(response) { + console.log(response.methods); + }) + var data = { + "callback_url": "www.example-callback-url.com", + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR",// Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "method": "nach", + "bank": "HDFC", + "auth_type": "physical", + "bank_account[name]": "Gaurav Kumar", + "bank_account[account_number]": "1121431121541121", + "bank_account[account_type]": "savings", + "bank_account[ifsc]": "HDFC0000001" + }; + btn.addEventListener("click", function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + }) + + +``` + +#### Additional Checkout Fields + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +`recurring` _mandatory_ +: `boolean` Determines whether the recurring is enabled or not. Possible values: + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +### 1.2. Using a Registration Link + +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the [API](#121-create-a-registration-link) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> - You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> - You can [use Webhooks to get notifications about successful payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) against a registration link. +> + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. + +A registration link must always have an amount (in paise) that the customer will be charged when making the authorisation payment. In the case of Paper NACH, the order amount must be `0`. + +### 1.2.1. Create a Registration Link + +Use the below endpoint to create a registration link for recurring payments. + +/subscription_registration/auth_links + +> **INFO** +> +> +> **Download and Upload the Pre-filled NACH Form** +> +> Once the registration link is created, the generated pre-filled form must be downloaded, signed by your customer and uploaded back to Razorpay to complete the transaction. +> The hosted page has a **Download NACH Form** option from where the customer can download the pre-filled form. Once downloaded, the customer has to sign the form. The signed form can then be uploaded to Razorpay using the **Upload NACH Form** option on the hosted page. +> + +```cURL: Curl +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780" + }, + "amount":0, + "currency":"INR", + "type":"link", + "description":"12 p.m. Meals", + "subscription_registration":{ + "first_payment_amount": 10000, + "method":"nach", + "auth_type":"physical", + "bank_account":{ + "beneficiary_name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "ifsc_code":"HDFC0001233" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH" + }, + "expire_at":1947483647, + "max_amount":50000 + }, + "receipt":"Receipt No. 1", + "sms_notify": true, + "email_notify": true, + "expire_by":1647483647, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'amount'=>100, 'type'=>'link','currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('first_payment_amount'=>100, 'method'=>'nach', 'auth_type'=>'physical' ,'max_amount'=>'50000','expire_at'=>'1634215992','bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233'), 'nach'=> array('form_reference1'=> 'Recurring Payment for Gaurav Kumar','form_reference2'=> 'Method Paper NACH')),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992, 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Tea. Earl Gray. Hot.')); +```json: Response +{ + "id": "inv_FHrZiAubEzDdaq", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZiBOkWHZPOp", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1647483647, + "issued_at": 1595491154, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491154, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "12 p.m. Meals", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/bzDYbNg", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491154, + "idempotency_key": null, + "token": { + "method": "nach", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 50000, + "auth_type": "physical", + "expire_at": 1947483647, + "nach": { + "create_form": true, + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "prefilled_form": "https://rzp.io/i/exdIzYN", + "upload_form_url": "https://rzp.io/i/bzDYbNg", + "description": "12 p.m. Meals" + }, + "bank_account": { + "ifsc": "HDFC0001233", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9123456780" + }, + "first_payment_amount": 0 + }, + "nach_form_url": "https://rzp.io/i/exdIzYN" +} +``` + +#### Request Parameters + +`customer` +: Details of the customer to whom the registration link will be sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `string` Customer's phone number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, only `INR` is supported. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. For example, `12:30 p.m. Thali meals (Gaurav Kumar)`. + +`subscription_registration` +: Details of the authorisation payment. + + `first_payment_amount` _optional_ + : `integer` The amount, in paise, the customer should be auto-charged in addition to the authorization amount. For example, `100000`. + + `method` _mandatory_ + : `string` The NACH type used to make the authorisation payment. Here, it is `physical`. + + `auth_type` _mandatory_ + : `string` The authorization method used to make the authorisation transaction. Here, it is `nach`. + + `bank_account` + : The customer's bank account details. + + `beneficiary_name` _mandatory_ + : `string` The name on the beneficiary. For example, `Gaurav Kumar`. + + `account_number` _mandatory_ + : `integer` The customer's bank account number. For example, `11214311215411`. + + `account_type` _mandatory_ + : `string` The customer's bank account type. Possible values: + - `savings` + - `current` + + `ifsc_code` _mandatory_ + : `string` The customer's bank IFSC. For example, `HDFC0000001`. + + `max_amount` _optional_ + : `integer` Use to set the maximum amount, in paise, per debit request. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/faqs.md). + + `expire_at` _optional_ + : `integer` The Unix timestamp till when you can use the token (authorization on the payment method) to charge the customer subsequent payments. The default value is 10 years for `emandate`. This value can range from the current date to 31-12-2099 (`4101580799`). + + `nach` + : Additional information to be printed on the NACH form that your customer will sign. + + `form_reference1` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `form_reference2` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `description` _optional_ + : `string` A user-entered description that appears on the hosted page. For example, `Form for Gaurav Kumar.` + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Can have the following values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Can have the following values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The timestamp, in Unix, till when the registration link should be available to the customer to make the authorisation transaction. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + +#### Path Parameters + +`id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +### 1.2.3. Cancel a Registration Link + +Use the below endpoint to cancel a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> **Note** +> +> You can only cancel registration link that is in the `issued` state. +> + +```cURL: Request +curl -u : +-X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + +```json: Response +{ + "id": "inv_FHrZiAubEzDdaq", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZiBOkWHZPOp", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 1647483647, + "issued_at": 1595491154, + "paid_at": null, + "cancelled_at": 1595491339, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491154, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "12 p.m. Meals", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/bzDYbNg", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491154, + "idempotency_key": null, + "token": { + "method": "nach", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 50000, + "auth_type": "physical", + "expire_at": 1947483647, + "nach": { + "create_form": true, + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "prefilled_form": "https://rzp.io/i/tSYd5aV", + "upload_form_url": "https://rzp.io/i/bzDYbNg", + "description": "12 p.m. Meals" + }, + "bank_account": { + "ifsc": "HDFC0001233", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9123456780" + }, + "first_payment_amount": 0 + }, + "nach_form_url": "https://rzp.io/i/tSYd5aV" +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. + +## 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +### 2.1. Fetch Token by Payment ID + +Use the below endpoint to fetch the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000003 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_SECRET}" + +String paymentId = "pay_1Aa00000000003"; + +Payment payment = razorpay.payments.fetch(paymentId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_1Aa00000000003" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.Fetch(paymentId); + +```json: Response +{ + "id": "pay_EnLNTjINiPkMEZ", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_EnLLfglmKksr4K", + "invoice_id": "inv_EnLLfgCzRfcMuh", + "international": false, + "method": "nach", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_EnLLfgCzRfcMuh", + "card_id": null, + "bank": "UTIB", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EnLNTnn7uyRg5V", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1588827564 +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +### 2.2. Fetch Tokens by Customer ID + +Use the below endpoint to fetch tokens linked to a customer. + +A customer can have multiple tokens tied to them. These tokens can be used to create subsequent payments for multiple products or services. + +> **WARN** +> +> +> **Watch Out!** +> +> This endpoint will not fetch the details of expired and unused tokens. +> + +/customers/:id/tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000004"; + +Customer customer = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetchTokens(customerId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_EhYgIE3pOyMQpD", + "entity": "token", + "token": "3mQ5Czc6APNppI", + "bank": "HDFC", + "wallet": null, + "method": "nach", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "physical", + "mrn": null, + "used_at": 1587564373, + "created_at": 1587564373, + "dcc_enabled": false + } + ] +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +### 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + +## 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +### 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +### 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. diff --git a/llm-content/api/payments/recurring-payments/custom/paper-nach/create-authorization-transaction.md b/llm-content/api/payments/recurring-payments/custom/paper-nach/create-authorization-transaction.md new file mode 100644 index 00000000..9a00f09b --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/paper-nach/create-authorization-transaction.md @@ -0,0 +1,1415 @@ +--- +title: 1. Create the Authorisation Transaction +description: Learn how to create an authorisation transaction with method NACH so customers can set up authorization by signing a physical NACH form. +--- + +# 1. Create the Authorisation Transaction + +The flow to complete an authorisation transaction using paper NACH is a little different from the regular recurring payment flow. The flow when using paper NACH is: +1. Create a customer. +1. Create an order by passing the `customer_id` and method `nach`. When you do this, Razorpay generates a NACH form with the customer information pre-filled and ready to sign. +1. The customer signs the form. The customer can obtain the form in one of the following ways: + - You can download the form from the Dashboard and send it to the customer. + - Download from the Hosted page (in the case of registration links). + +1. The signed form is uploaded to Razorpay. This can be done in one of the following ways: + - Using custom Checkout page created from Razorpay APIs. + - Hosted page (in the case of registration links). + - The customer can send you the form and you can upload the form for the customer. The acceptable image formats and size are: + - jpeg + - jpg + - png + - Maximum accepted size is 6 MB. + +Once the details are validated, the authorisation transaction is completed and a token is generated. You can charge your customer as per your business model once the token status changes to `confirmed`. + +You can create an authorisation transaction using [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +## 1.1. Using Razorpay APIs + +To create an authorisation transaction using Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorisation-payment). + +> **INFO** +> +> +> **Handy Tips** +> +> For the Authorisation Payment to be successful in a day (for example, 5th June), you should create an Order and the Authorisation Transaction on the same day (5th June) before 11:59 pm. +> + +### 1.1.1. Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + +### Request Parameters + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.1.2. Create an Order + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":0, + "currency":"INR", + "method":"nach", + "customer_id": "cust_1Aa00000000001", + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token":{ + "auth_type":"physical", + "max_amount":10000000, + "expire_at":2709971120, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account":{ + "account_number":"11214311215411", + "ifsc_code":"HDFC0000001", + "beneficiary_name":"Gaurav Kumar", + "account_type":"savings" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "description":"Paper NACH Gaurav Kumar" + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.put("method", "nach"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("auth_type","physical"); +token.put("max_amount","10000000"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +token.put("bank_account",bankAccount); +JSONObject nach = new JSONObject(); +nach.put("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.put("form_reference2","Method Paper NACH"); +nach.put("description","Paper NACH Gaurav Kumar"); +token.put("nach",nach); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','method' => 'nach','customer_id' => 'cust_1Aa00000000001','receipt' => 'Receipt No. 1', 'notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'),'token' => array('auth_type' => 'physical','max_amount' => 10000000,'expire_at' => 2709971120,'notes' => array('notes_key_1' => 'Tea, Earl Grey, Hot','notes_key_2' => 'Tea, Earl Grey… decaf.'),'bank_account' => array('account_number' => '11214311215411','ifsc_code' => 'HDFC0000001','beneficiary_name' => 'Gaurav Kumar','account_type' => 'savings'),'nach' => array('form_reference1' => 'Recurring Payment for Gaurav Kumar','form_reference2' => 'Method Paper NACH','description' => 'Paper NACH Gaurav Kumar')))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + method: "nach", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "netbanking", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "1121431121541121", + account_type: "savings", + ifsc_code: "HDFC0000001" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'nach', + 'customer_id': 'cust_1Aa00000000001', + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'netbanking', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 0, + "currency": "INR", + "method": "nach", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 1121431121541121, + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount":0, + "currency":"INR", + "method":"nach", + "customer_id": "cust_1Aa00000000001", + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token":map[string]interface{}{ + "auth_type":"physical", + "max_amount":10000000, + "expire_at":2709971120, + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account":map[string]interface{}{ + "account_number":"11214311215411", + "ifsc_code":"HDFC0000001", + "beneficiary_name":"Gaurav Kumar", + "account_type":"savings", + }, + "nach":map[string]interface{}{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "description":"Paper NACH Gaurav Kumar", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 0); +orderRequest.Add("currency", "INR"); +orderRequest.Add("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.Add("method", "nach"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); +Dictionary token = new Dictionary(); +token.Add("auth_type","physical"); +token.Add("max_amount","10000000"); +token.Add("expire_at","2709971120"); +Dictionary tokenNotes = new Dictionary(); +tokenNotes.Add("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.Add("notes_key_2","Tea, Earl Grey… decaf."); +token.Add("notes",tokenNotes); +orderRequest.Add("token", token); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +token.Add("bank_account",bankAccount); +Dictionary nach = new Dictionary(); +nach.Add("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.Add("form_reference2","Method Paper NACH"); +nach.Add("description","Paper NACH Gaurav Kumar"); +token.Add("nach",nach); + +Order order = client.Order.Create(orderRequest); +``` + +```json: Success Response +{ + "id":"order_1Aa00000000001", + "entity":"order", + "amount":0, + "amount_paid":0, + "amount_due":0, + "currency":"INR", + "receipt":"rcptid #10", + "offer_id":null, + "offers":{ + "entity":"collection", + "count":0, + "items":[ + + ] + }, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Beam me up Scotty", + "notes_key_2":"Engage" + }, + "created_at":1579775420, + "token":{ + "method":"nach", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "recurring_status":null, + "failure_reason":null, + "currency":"INR", + "max_amount":10000000, + "auth_type":"physical", + "expire_at":1580480689, + "nach":{ + "create_form":true, + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "prefilled_form":"https://rzp.io/i/bitw", + "upload_form_url":"https://rzp.io/i/gts", + "description":"Paper NACH Gaurav Kumar" + }, + "bank_account":{ + "ifsc":"HDFC0000001", + "bank_name":"HDFC Bank", + "name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "beneficiary_email":"gaurav.kumar@example.com", + "beneficiary_mobile":"9876543210" + }, + "first_payment_amount":0 + } +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For Paper NACH, the amount has to be `0`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`method` _mandatory_ +: `string` The authorization method. In this case, the value will be `nach`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer, who is to be charged. For example, `cust_D0cs04OIpPPU1F`. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: Details related to the authorization such as max amount, bank account information and NACH information. + + `auth_type` _mandatory_ + : `string` In this case, it will be `physical`. + + `bank_account` + : Customer's bank account details that will be printed on the NACH form. + + `account_number`_mandatory_ + : `string` Customer's bank account number. For example, `11214311215411`. + + `ifsc_code`_mandatory_ + : `string` Customer's bank IFSC. For example, `UTIB0000001`. + + `beneficiary_name`_mandatory_ + : `string` Customer's name. For example, `Gaurav Kumar`. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `max_amount` _optional_ + : `integer` Use to set the maximum amount per debit request. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/faqs.md#3-is-there-a-limit-on-the-debit). + + `expire_at` _optional_ + : `integer` Timestamp, in Unix, that specifies when the registration link should expire. The default value is 30 years. + + `nach` + : Additional information to be printed on the NACH form that your customer will sign. + + `form_reference1` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `form_reference2` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `description` _optional_ + : `string` A user-entered description that appears on the hosted page. For example, `Form for Gaurav Kumar.` + + `notes`_optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.1.3. Create an Authorisation Payment + +Follow these steps to create authorisation transaction: + +1. Download the Paper NACH form and send it to the customers. +1. Ask the customers to fill the form and + - Upload it via the Checkout. + - Send it to you and you can upload it from the Dashboard. +1. Upload the received form via create NACH File API. + +#### 1.1.3.1 Upload the NACH File via Checkout + +> **INFO** +> +> +> **Handler Function vs Callback URL** +> +> - **Handler Function**: +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL**: +> +When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. +> + +```html: Custom checkout with handler functions + + + Pay + + const btn = document.querySelector("#btn"); + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + razorpay.once("ready", function(response) { + console.log(response.methods); + }) + var data = { + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR",// Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "method": "nach", + "bank": "HDFC", + "auth_type": "physical", + "bank_account[name]": "Gaurav Kumar", + "bank_account[account_number]": "1121431121541121", + "bank_account[account_type]": "savings", + "bank_account[ifsc]": "HDFC0000001" + }; + btn.addEventListener("click", function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID and Razorpay signature to success handler. + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); // will pass error object to error handler + }) + + +```html: Custom checkout with Callback URL + + + Pay + + const btn = document.querySelector("#btn"); + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + razorpay.once("ready", function(response) { + console.log(response.methods); + }) + var data = { + "callback_url": "www.example-callback-url.com", + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR",// Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": true, + "method": "nach", + "bank": "HDFC", + "auth_type": "physical", + "bank_account[name]": "Gaurav Kumar", + "bank_account[account_number]": "1121431121541121", + "bank_account[account_type]": "savings", + "bank_account[ifsc]": "HDFC0000001" + }; + btn.addEventListener("click", function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + }) + + +``` + +#### Additional Checkout Fields + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +`recurring` _mandatory_ +: `boolean` Determines whether the recurring is enabled or not. Possible values: + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +#### 1.1.3.2 Upload the NACH File via API + +> **INFO** +> +> +> **Feature Request** +> +> This feature is available only on request. It is not available by default. Raise a request on our [Support Portal](https://razorpay.com/support/#request) to get this feature enabled. +> + +You can use the Create NACH File API to upload the signed NACH forms you collect from your customers. On successful verification, we submit the form to NPCI and return a success/failure response to you. + +Use the below endpoint to upload the completed NACH file. + +/payments/create/nach/file + +```cURL: Request +curl -u : \ +-X POST 'https://api.razorpay.com/v1/payments/create/nach/file' \ +-H "Content-Type: multipart/form-data" \ +-F 'order_id=order_FoLdZrq6QGKUWg' \ +-F 'file=@/Users/your_name/sample_uploaded.jpeg' // file path +```json: Successful Response +{ + "razorpay_payment_id": "pay_FjDn43bvssCqEM", + "razorpay_order_id": "order_FoLdZrq6QGKUWg", + "razorpay_signature": "f13775ea8a91e9bf229b9fdba3ad783f7ff2bdbce1c35e87a69ae7418808da04" +} +```json: Error Response +{ +"error": { + "code": "BAD_REQUEST_ERROR", + "description": "file size exceeds limit", + "field": null, + "source": "customer", + "step": "form_upload", + "reason": "file size exceeds limit", + "metadata": { + "payment_id": null, + "order_id": "order_FoLdZrq6QGKUWg" + } + } +} +``` + +#### Error Reasons + +To learn about errors, refer to the FAQ [Upload the NACH File](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/faqs.md) section. + +## 1.2. Using a Registration Link + +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the [API](#121-create-a-registration-link) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> - You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> - You can [use Webhooks to get notifications about successful payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) against a registration link. +> + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. + +In the case of Paper NACH, the order amount must be `0`. + +### 1.2.1. Create a Registration Link + +The following endpoint creates a registration link for recurring payments. + +/subscription_registration/auth_links + +```cURL: Curl +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780" + }, + "amount":0, + "currency":"INR", + "type":"link", + "description":"12 p.m. Meals", + "subscription_registration":{ + "method":"nach", + "auth_type":"physical", + "bank_account":{ + "beneficiary_name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "ifsc_code":"HDFC0001233" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH" + }, + "expire_at":1947483647, + "max_amount":50000 + }, + "receipt":"Receipt No. 1", + "sms_notify":true, + "email_notify":true, + "expire_by":1647483647, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 0); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "12 p.m. Meals"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","nach"); +subscriptionRegistration.put("auth_type","physical"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +JSONObject nach = new JSONObject(); +nach.put("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.put("form_reference2","Method Paper NACH"); +subscriptionRegistration.put("bank_account",bankAccount); +subscriptionRegistration.put("nach",nach); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. #1"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer' => array('name' => 'Gaurav Kumar','email' => 'gaurav.kumar@example.com','contact' => '9123456780'),'amount' => 0,'currency' => 'INR','type' => 'link','description' => '12 p.m. Meals','subscription_registration' => array('method' => 'nach','auth_type' => 'physical','bank_account' => array('beneficiary_name' => 'Gaurav Kumar','account_number' => '11214311215411','account_type' => 'savings','ifsc_code' => 'HDFC0001233'),'nach' => array('form_reference1' => 'Recurring Payment for Gaurav Kumar','form_reference2' => 'Method Paper NACH'),'expire_at' => 1947483647,'max_amount' => 50000),'receipt' => 'Receipt No. 1','sms_notify' => true,'email_notify' => true,'expire_by' => 1647483647,'notes' => array('note_key 1' => 'Beam me up Scotty','note_key 2' => 'Tea. Earl Gray. Hot.'))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + amount: 0, + currency: "INR", + type: "link", + description: "12 p.m. Meals", + subscription_registration: { + method: "nach", + auth_type: "physical", + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: 11214311215411, + account_type: "savings", + ifsc_code: "HDFC0001233" + }, + nach: { + form_reference1: "Recurring Payment for Gaurav Kumar", + form_reference2: "Method Paper NACH" + }, + expire_at: 1947483647, + max_amount: 50000 + }, + receipt: "Receipt No. 1", + sms_notify: true, + email_notify: true, + expire_by: 1647483647, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + 'customer': {'name': 'Gaurav Kumar', + 'email': 'gaurav.kumar@example.com', + 'contact': 9123456780}, + 'amount': 0, + 'currency': 'INR', + 'type': 'link', + 'description': '12 p.m. Meals', + 'subscription_registration': { + 'method': 'nach', + 'auth_type': 'physical', + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 11214311215411, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0001233', + }, + 'nach': {'form_reference1': 'Recurring Payment for Gaurav Kumar' + , 'form_reference2': 'Method Paper NACH'}, + 'expire_at': 1947483647, + 'max_amount': 50000, + }, + 'receipt': 'Receipt No. 1', + 'sms_notify': True, + 'email_notify': True, + 'expire_by': 1647483647, + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "amount": 0, + "currency": "INR", + "type": "link", + "description": "12 p.m. Meals", + "subscription_registration": { + "method": "nach", + "auth_type": "physical", + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + }, + "nach": { + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH" + }, + "expire_at": 1947483647, + "max_amount": 50000 + }, + "receipt": "Receipt No. 1", + "sms_notify": 1, + "email_notify": 1, + "expire_by": 1647483647, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} + +Razorpay::SubscriptionRegistration.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer":map[string]interface{}{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + }, + "amount":0, + "currency":"INR", + "type":"link", + "description":"12 p.m. Meals", + "subscription_registration":map[string]interface{}{ + "method":"nach", + "auth_type":"physical", + "bank_account":map[string]interface{}{ + "beneficiary_name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "ifsc_code":"HDFC0001233", + }, + "nach":map[string]interface{}{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + }, + "expire_at":1947483647, + "max_amount":50000, + }, + "receipt":"Receipt No. 1", + "sms_notify":true, + "email_notify":true, + "expire_by":1647483647, + "notes":map[string]interface{}{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot.", + }, +} + +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary registrationLinkRequest = new Dictionary(); +Dictionary customer = new Dictionary(); +customer.Add("name","Gaurav Kumar"); +customer.Add("email","gaurav.kumar@example.com"); +customer.Add("contact","9123456780"); +registrationLinkRequest.Add("customer", customer); +registrationLinkRequest.Add("type", "link"); +registrationLinkRequest.Add("amount", 0); +registrationLinkRequest.Add("currency", "INR"); +registrationLinkRequest.Add("description", "12 p.m. Meals"); +Dictionary subscriptionRegistration = new Dictionary(); +subscriptionRegistration.Add("method","nach"); +subscriptionRegistration.Add("auth_type","physical"); +subscriptionRegistration.Add("max_amount",50000); +subscriptionRegistration.Add("expire_at",1609423824); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +Dictionary nach = new Dictionary(); +nach.Add("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.Add("form_reference2","Method Paper NACH"); +subscriptionRegistration.Add("bank_account",bankAccount); +subscriptionRegistration.Add("nach",nach); +registrationLinkRequest.Add("subscription_registration", subscriptionRegistration); +registrationLinkRequest.Add("receipt", "Receipt No. #111"); +registrationLinkRequest.Add("email_notify", true); +registrationLinkRequest.Add("sms_notify", true); +registrationLinkRequest.Add("expire_by", 1580479824); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.Add("notes", notes); + +Invoice invoice = client.Invoice.CreateRegistrationLink(registrationLinkRequest); + +```json: Response +{ + "id": "inv_FHrZiAubEzDdaq", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZiBOkWHZPOp", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1647483647, + "issued_at": 1595491154, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491154, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "12 p.m. Meals", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/bzDYbNg", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491154, + "idempotency_key": null, + "token": { + "method": "nach", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 50000, + "auth_type": "physical", + "expire_at": 1947483647, + "nach": { + "create_form": true, + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "prefilled_form": "https://rzp.io/i/exdIzYN", + "upload_form_url": "https://rzp.io/i/bzDYbNg", + "description": "12 p.m. Meals" + }, + "bank_account": { + "ifsc": "HDFC0001233", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9123456780" + }, + "first_payment_amount": 0 + }, + "nach_form_url": "https://rzp.io/i/exdIzYN" +} +``` + +### Request Parameters + +`customer` +: Details of the customer to whom the registration link will be sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `string` Customer's phone number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, only `INR` is supported. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. For example, `12:30 p.m. Thali meals (Gaurav Kumar)`. + +`subscription_registration` +: Details of the authorisation payment. + + `method` _mandatory_ + : `string` In this case, it will be `nach`. + + `auth_type` _mandatory_ + : `string` In this case, it will be `physical`. + + `bank_account` + : The customer's bank account details. + + `beneficiary_name` _mandatory_ + : `string` Name on the bank account. For example, `Gaurav Kumar`. + + `account_number` _mandatory_ + : `integer` Customer's bank account number. For example, `11214311215411`. + + `account_type` _mandatory_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` _mandatory_ + : `string` Customer's bank IFSC. For example, `HDFC0000001`. + + `nach` + : Additional information to be printed on the NACH form that your customer will sign. + + `form_reference1` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `form_reference2` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `max_amount` _optional_ + : `integer` Use to set the maximum amount per debit request. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/faqs.md#3-is-there-a-limit-on-the-debit). + + `expire_at` _optional_ + : `integer` The timestamp, in Unix format, till when you can use the token (authorization on the payment method) to charge the customer subsequent payments. + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Can have the following values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Can have the following values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The timestamp, in Unix, till when the registration link should be available to the customer to make the authorisation transaction. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + +### Path Parameters + +`id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +### 1.2.3. Cancel a Registration Link + +Use the below endpoint to cancel a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> **Note** +> +> You can only cancel registration link that is in the `issued` state. +> + +```cURL: Request +curl -u : +-X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + +```json: Response +{ + "id": "inv_FHrZiAubEzDdaq", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZiBOkWHZPOp", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 1647483647, + "issued_at": 1595491154, + "paid_at": null, + "cancelled_at": 1595491339, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491154, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "12 p.m. Meals", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/bzDYbNg", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491154, + "idempotency_key": null, + "token": { + "method": "nach", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 50000, + "auth_type": "physical", + "expire_at": 1947483647, + "nach": { + "create_form": true, + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "prefilled_form": "https://rzp.io/i/tSYd5aV", + "upload_form_url": "https://rzp.io/i/bzDYbNg", + "description": "12 p.m. Meals" + }, + "bank_account": { + "ifsc": "HDFC0001233", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9123456780" + }, + "first_payment_amount": 0 + }, + "nach_form_url": "https://rzp.io/i/tSYd5aV" +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. diff --git a/llm-content/api/payments/recurring-payments/custom/paper-nach/create-subsequent-payments.md b/llm-content/api/payments/recurring-payments/custom/paper-nach/create-subsequent-payments.md new file mode 100644 index 00000000..9a90e257 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/paper-nach/create-subsequent-payments.md @@ -0,0 +1,374 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +## 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. diff --git a/llm-content/api/payments/recurring-payments/custom/paper-nach/tokens.md b/llm-content/api/payments/recurring-payments/custom/paper-nach/tokens.md new file mode 100644 index 00000000..6a29cc35 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/paper-nach/tokens.md @@ -0,0 +1,389 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +## 2.1 Fetch Payment ID using Order ID. + +After you send the registration link, You should wait for the customer to make the payment. You can check the status of the payment using our APIs. The following endpoint fetches the `payment_id` using an `order_id`. + +/orders/:id/payments + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/orders/order_1Aa00000000003/payments + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String orderId = "order_1Aa00000000003"; + +Order order = razorpay.orders.fetchPayments(orderId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->fetch($orderId)->payments() +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.fetchPayments(orderId) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.payment(orderId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +orderId = "order_1Aa00000000003" + +Razorpay::Order.fetch("order_1Aa00000000003").payments + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Order.Payments("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string orderId = "order_Z6t7VFTb9xHeOs"; + +List order = client.Order.Fetch(orderId).Payments(); + +```json: Response +{ + "entity":"collection", + "count":1, + "items":[ + { + "id":"pay_1Aa00000000003", + "entity":"payment", + "amount":0, + "currency":"INR", + "status":"captured", + "order_id":"order_1Aa00000000003", + "invoice_id":"inv_1Aa00000000003", + "international":false, + "method":"nach", + "amount_refunded":0, + "refund_status":null, + "captured":true, + "description":"12 p.m. Meals", + "card_id":null, + "bank":"HDFC", + "wallet":null, + "vpa":null, + "email":"gaurav.kumar@example.com", + "contact":"99876543210", + "customer_id":"cust_1Aa00000000002", + "token_id":"token_1Aa00000000003", + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + }, + "fee":0, + "tax":0, + "error_code":null, + "error_description":null, + "created_at":1580109147 + } + ] +} +``` + +### Path Parameter + +`id` +: `string` The unique identifier of the order. For example, `order_1Aa00000000001`. + +## 2.2. Fetch Token by Payment ID + +Use the below endpoint to fetch the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000003 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_SECRET}" + +String paymentId = "pay_1Aa00000000003"; + +Payment payment = razorpay.payments.fetch(paymentId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_1Aa00000000003" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.Fetch(paymentId); + +```json: Response +{ + "id": "pay_EnLNTjINiPkMEZ", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_EnLLfglmKksr4K", + "invoice_id": "inv_EnLLfgCzRfcMuh", + "international": false, + "method": "nach", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_EnLLfgCzRfcMuh", + "card_id": null, + "bank": "UTIB", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EnLNTnn7uyRg5V", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1588827564 +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +## 2.3. Fetch Tokens by Customer ID + +Use the below endpoint to fetch tokens linked to a customer. + +A customer can have multiple tokens tied to them. These tokens can be used to create subsequent payments for multiple products or services. + +> **WARN** +> +> +> **Watch Out!** +> +> This endpoint will not fetch the details of expired and unused tokens. +> + +/customers/:id/tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000004"; + +Customer customer = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetchTokens(customerId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_EhYgIE3pOyMQpD", + "entity": "token", + "token": "3mQ5Czc6APNppI", + "bank": "HDFC", + "wallet": null, + "method": "nach", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "physical", + "mrn": null, + "used_at": 1587564373, + "created_at": 1587564373, + "dcc_enabled": false + } + ] +} +``` + +### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +## 2.4. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. diff --git a/llm-content/api/payments/recurring-payments/custom/postman-collection.md b/llm-content/api/payments/recurring-payments/custom/postman-collection.md new file mode 100644 index 00000000..86c28d6c --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/postman-collection.md @@ -0,0 +1,21 @@ +--- +title: Postman Collection +description: Download the Postman collection for Razorpay Recurring Payments. +--- + +# Postman Collection + +We have a Postman collection to make the integration quicker and easier. Click the **Download Postman Collection** button below to get started. + +Download Postman Collection + +## Instructions to Use Postman Collection + +- All Razorpay APIs are authorized using Basic Authorization. + - [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + - Add your API Keys in Postman. Select the required API → Auth → Type = Basic Auth → Username = ``; Password = `` + ![](/docs/assets/images/api-postman_basic_auth.gif) +- Some APIs in the collection require data specific to your account, such as `order_id`, `cust_id` and `token_id` either in the request body or as a path parameter. + - For example, the create order API requires you to add the `cust_id` (Customer ID) in the request body. + - These parameters are enclosed in \{\} in the collection. For example, \{cust_id\}. + - The API throws an error if these are incorrect or do not exist in your system. diff --git a/llm-content/api/payments/recurring-payments/custom/upi-tpv/create-authorization-transaction.md b/llm-content/api/payments/recurring-payments/custom/upi-tpv/create-authorization-transaction.md new file mode 100644 index 00000000..5defe515 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/upi-tpv/create-authorization-transaction.md @@ -0,0 +1,1124 @@ +--- +title: 1. Create the Authorisation Transaction +description: Learn how to create an authorisation transaction for upi. +--- + +# 1. Create the Authorisation Transaction + +You can create an authorisation transaction using [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +## 1.1 Using Razorpay APIs + +To create an authorisation transaction using Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorisation-payment). + +> **INFO** +> +> +> **Handy Tips** +> +> For the Authorisation Payment to be successful in a day (for example, 5th June), you should create an Order and the Authorisation Transaction on the same day (5th June) before 11:59 pm. +> + +### 1.1.1 Create a Customer + +Razorpay links recurring tokens to customers via a unique identifier. This unique identifier for the customer is generated using the Customer API. + +You can create a customer using the below endpoint. + +/customers + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name","Gaurav Kumar"); +customerRequest.put("contact","9123456780"); +customerRequest.put("email","gaurav.kumar@example.com"); +customerRequest.put("fail_existing", "0"); +customerRequest.put("gstin","29XAbbA4369J1PA"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + 'name': 'Gaurav Kumar', + 'email': 'gaurav.kumar@example.com', + 'contact': '9123456780', + 'fail_existing': '0', + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->create(array('name' => 'Gaurav Kumar', 'email' => 'gaurav.kumar@example.com','contact'=>'9123456780','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", "Gaurav Kumar"); +options.Add("contact", "9123456780"); +options.Add("email", "gaurav.kumar@example.com"); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "gstin": "29XAbbA4369J1PA", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Customer.create(para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({ + name: "Gaurav Kumar", + contact: 9123456780, + email: "gaurav.kumar@example.com", + fail_existing: "0", + gstin: "29XAbbA4369J1PA", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +```json: Response +{ + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 +} +``` + +Once a customer is created, you can create an order for the authorization of the payment. + +### Request Parameters + +`name` _mandatory_ +: `string` The customer's name. For example, `Gaurav Kumar`. + +`email ` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact ` _mandatory_ +: `string` The customer's phone number. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.1.2. Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +> **INFO** +> +> +> **Handy Tips** +> +> The subsequent payment frequency is displayed on your customer's PSP. They can select the required frequency while registering for the mandate. +> + +The Orders API allows you to create a unique Razorpay `order_id`, for example, `order_1Aa00000000001`, that would be tied to the authorisation transaction. Refer to our detailed [Order documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md) for more details. + +Use the below endpoint to create an order. + +/orders + +You can create a payment against the `order_id` once it is generated. + +```cURL: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "customer_id": "cust_4xbQrmEoA5WJ01", + "method": "upi", + "payment_capture": true, + "token": { + "max_amount": 200000, + "expire_at": 2709971120, + "frequency": "monthly" + }, + "bank_account":{ + "account_number":"123456789012345", + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' +``` + +```json: Success Response +{ + "id": "order_1Aa00000000002", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "bank_account":{ + "account_number":"123456789012345", + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + "created_at": 1565172642 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount, in paise. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _mandatory_ +: `string` Payment method for the authorisation transaction. Here, the value should be `upi`. + +`receipt` _optional_ +: `string` Unique identifier for the order entered by you. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: Details related to the authorization such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be debited in a single charge. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The default value is 10 years and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + + `recurring_value` _optional_ + : `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + + `recurring_type` _optional_ + : `string` Determines when the recurring debit can be done. Possible values are: + - `on`: Recurring debit happens on the exact day of every month. + +> **INFO** +> +> +> **Handy Tips** +> +> For creating an order with `recurring_type`=`on`, set the `recurring_value` parameter to the current date. +> + + - `before`: Recurring debit can happen any time before the specified date. + - `after`: Recurring debit can happen any time after the specified date. + + For example, if the frequency is `monthly`, recurring_value is `17` and recurring_type is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if recurring_type is `after`, recurring debit can only happen on or after the 17th of the month. + +`bank_account` _mandatory_ +: Details of the bank account of the customer. + + `account_number` _mandatory_ + : `integer` The bank account number of the customer. For example, `123456789012345`. + + `name` _mandatory_ + : `string` The name of the bank account holder. + + `ifsc` _mandatory_ + : The IFSC of the bank. For example, `HDFC0000053`. + +### 1.1.3. Create an Authorisation Payment + +Integrate with Razorpay Custom Checkout using the code given below to create an authorisation payment. + +> **INFO** +> +> +> **Handler Function vs Callback URL** +> +> - **Handler Function**: +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL**: +> +When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. +> + +```html: Custom Checkout with handler functions + + + Pay + + const btn = document.querySelector("#btn"); + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + razorpay.once("ready", function(response) { + console.log(response.methods); + }) + var data = { + "amount": 300, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR",// Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": "1", + "method": "upi", + "upi": + { + "vpa": "gauravkumar@somebank", + "flow": "collect" + }// Applicable only for exempted businesses. UPI Collect is deprecated for all others effective 28 Feb 2026. + }; + btn.addEventListener("click", function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID and Razorpay signature to success handler. + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); // will pass error object to error handler + }) + + +```html: Custom checkout with Callback URL + + + Pay + + const btn = document.querySelector("#btn"); + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + razorpay.once("ready", function(response) { + console.log(response.methods); + }) + var data = { + "callback_url": "www.example-callback-url.com", + "amount": 300, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR",// Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": "1", + "method": "upi", + "upi": + { + "vpa": "gauravkumar@somebank", + "flow": "collect" + }// Applicable only for exempted businesses. UPI Collect is deprecated for all others effective 28 Feb 2026. + }; + btn.addEventListener("click", function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + }) + + +``` + +### Additional Checkout Fields + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +`recurring` _mandatory_ +: `string` Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this when you want to support **recurring payments** and **one-time payment** in the same flow. + +## 1.2. Using a Registration Link + +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the [API](#121-create-a-registration-link) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> - You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> - You can [use Webhooks to get notifications about successful payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) against a registration link. +> + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. + +A registration link must always have the amount (in paise) that the customer will be charged when making the authorisation payment. For UPI, the amount must be a minimum of `₹1`. + +### 1.2.1. Create a Registration Link + +The following endpoint creates a registration link. + +/subscription_registration/auth_links + +```curl: Curl +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780" + }, + "type":"link", + "amount":"100", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":{ + "method":"upi", + "max_amount":"500", + "expire_at":4102444799, + "frequency":"monthly", + "recurring_value": 25, + "recurring_type": "on", + "bank_account":{ + "account_number":"123456789012345", + "name":"Gaurav Kumar", + "ifsc_code":"HDFC0000053" + } + }, + "receipt":"Receipt No. 23", + "email_notify":true, + "sms_notify":true, + "expire_by":4102444799, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 100); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "Registration Link for Gaurav Kumar"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","upi"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +subscriptionRegistration.put("frequency","monthly"); +subscriptionRegistration.put("recurring_value","25"); +subscriptionRegistration.put("recurring_type","on"); +JSONObject bank_account = new JSONObject(); +bank_account.put("account_number","123456789012345"); +bank_account.put("name","Gaurav Kumar"); +bank_account.put("ifsc_code","HDFC0000053"); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. #112"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('method'=>'upi','max_amount'=>'500','expire_at'=>'1634215992','recurring_value'=>'25','recurring_type'=>'on',bank_account' => array('account_number' => 123456789012345, 'name' => Gaurav Kumar, 'ifsc_code' => 'HDFC0000053')),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992,'notes' => array('note_key 1' => 'Beam me up Scotty','note_key 2' => 'Tea. Earl Gray. Hot.'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 100, + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + method: "upi", + max_amount: 500, + expire_at: 1634215992, + recurring_value: 25, + recurring_type: "on", + bank_account: { + account_number: 123456789012345, + name: "Gaurav Kumar", + ifsc_code: "HDFC0000053" + } + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "method": "upi", + "max_amount": 500, + "expire_at": 1634215992, + "recurring_value": 25, + "recurring_type": "on", + "bank_account": { + "account_number": 123456789012345, + "name": "Gaurav Kumar", + "ifsc_code": "HDFC0000053" + } + }, + "receipt": "Receipt No. 5", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::SubscriptionRegistration.create(para_attr) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":9123456780 + }, + "type":"link", + "amount":100, + "currency":"INR", + "description":"12 p.m. Meals", + "subscription_registration":{ + "method":"upi", + "expire_at":1580480689, + "max_amount":500, + "recurring_value": 25, + "recurring_type": "on", + "bank_account": { + "account_number": 123456789012345, + "name": "Gaurav Kumar", + "ifsc_code": "HDFC0000053" + } + }, + "receipt":"Receipt no. 1", + "expire_by":1880480689, + "sms_notify": True, + "email_notify": True, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer":map[string]interface{}{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + }, + "type":"link", + "amount":"100", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":map[string]interface{}{ + "method":"upi", + "max_amount":"500", + "expire_at":1609423824, + "frequency": "monthly", + "recurring_value": 25, + "recurring_type": "on", + "bank_account": { + "account_number": 123456789012345, + "name": "Gaurav Kumar", + "ifsc_code": "HDFC0000053" + } + }, + "receipt":"Receipt No. 1", + "email_notify":true, + "sms_notify":true, + "expire_by":1681987284, + "notes":map[string]interface{}{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot.", + }, +} +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```json: Response +{ + "id": "inv_FHr1ekX0r2VCVK", + "entity": "invoice", + "receipt": "Receipt No. 23", + "invoice_number": "Receipt No. 23", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHr1ehR3nmNeXo", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 4102444799, + "issued_at": 1595489219, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595489219, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/ak1WxDB", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595489219, + "idempotency_key": null +} +``` + +### Request Parameters + +`customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + +`subscription_registration` +: Details of the authorisation transaction. + + `method` _mandatory_ + : `string` The payment method used to make authorisation transaction. Here, it is `card`. + + `max_amount` _mandatory_ + : `integer` Use to set the maximum amount (in paise) per debit request. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _optional_ + : `integer` The Unix timestamp till when you can use the token to charge the customer subsequent payments. The default value is 10 years and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + +`recurring_value` _optional_ +: `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + +`recurring_type` _optional_ +: `string` Determines when the recurring debit can be done. Possible values are: + +- `on`: recurring debit happens on the exact day of every month. + - `before`: recurring debit can happens any time before the specified date. + - `after`: recurring debit can happens any time after the specified date. + +For example, if the frequency is `monthly`, recurring_value is `17` and recurring_type is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if recurring_type is `after`, recurring debit can only happen on or after the 17th of the month. + + `bank_account` _mandatory_ + : Details of the bank account of the customer. + + `account_number` _mandatory_ + : `integer` The bank account number of the customer. For example, `123456789012345`. + + `name` _mandatory_ + : `string` The name of the bank account holder. + + `ifsc` _mandatory_ + : `string` The IFSC of the bank. For example, `HDFC0000053`. + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + +### Path Parameters + +`id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. diff --git a/llm-content/api/payments/recurring-payments/custom/upi-tpv/create-subsequent-payments.md b/llm-content/api/payments/recurring-payments/custom/upi-tpv/create-subsequent-payments.md new file mode 100644 index 00000000..6b64f998 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/upi-tpv/create-subsequent-payments.md @@ -0,0 +1,429 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is authorised. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created when you created the authorisation transaction. + +Use the below endpoint to create an order: + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"INR", + "payment_capture":true, + "method":"upi", + "bank_account":{ + "account_number":"123456789012345", + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + }, + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", "INR"); +orderRequest.put("payment_capture", true); +orderRequest.put("method", "upi"); +JSONObject bank_account = new JSONObject(); +bank_account.put("account_number","123456789012345"); +bank_account.put("name","Gaurav Kumar"); +bank_account.put("ifsc","HDFC0000053"); +orderRequest.put("bank_account", bank_account); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true,'method' => 'upi','bank_account' => array('account_number' => 123456789012345, 'name' => Gaurav Kumar, 'ifsc' => 'HDFC0000053'),'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "method":"upi", + "bank_account": { + "account_number": 123456789012345, + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': 'INR', + 'payment_capture': True, + 'method': 'upi', + 'bank_account':{ + 'account_number':123456789012345, + 'name':'Gaurav Kumar', + 'ifsc':'HDFC0000053' + }, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "INR", + "payment_capture": true, + "method":"upi", + "receipt": "Receipt No. 1", + "bank_account":{ + "account_number":123456789012345, + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "method":"upi", + "bank_account":map[string]interface{}{ + "account_number":123456789012345, + "name":Gaurav Kumar, + "ifsc":"HDFC0000053", + }, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_1Aa00000000002", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "bank_account":{ + "account_number":"123456789012345", + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + "created_at": 1565172642 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is `100` (₹1). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether tha payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +`bank_account` _mandatory_ +: Details of the bank account of the customer. + + `account_number` _mandatory_ + : `integer` The bank account number of the customer. For example, `123456789012345`. + + `name` _mandatory_ + : `string` The name of the bank account holder. + + `ifsc` _mandatory_ + : The IFSC of the bank. For example, `HDFC0000053`. + +## 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +> **INFO** +> +> +> **UPI Payments** +> +> - We recommend sending a pre-debit notification to the customer 48 hours before the debit date. +> - For UPI, it may take between 24-36 hours for the subsequent payment to reflect on your Dashboard. +> - This is because of the failure of pre-debit notification and/or any retries that we attempt for the payment. +> - Do not create another subsequent payment until you get the status of the previous one. +> + +> **WARN** +> +> +> **UPI Payments** +> +> - The subsequent payment may fail if there is late authorisation of an earlier payment. +> - For UPI, **do not** create subsequent payments on the last day of the cycle. This will cause the payment to fail. +> + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. diff --git a/llm-content/api/payments/recurring-payments/custom/upi-tpv/tokens.md b/llm-content/api/payments/recurring-payments/custom/upi-tpv/tokens.md new file mode 100644 index 00000000..0110a56b --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/upi-tpv/tokens.md @@ -0,0 +1,401 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +Know about about [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/integrate.md#fetch-emandate-registration-details). + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_FHfAzEJ51k8NLj" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentid = "pay_FHfqtkRzWvxky4"; + +Payment payment = client.Payment.Fetch(paymentid); +``` + +```json: Debit Payment +{ + "id": "pay_FHfAzEJ51k8NLj", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfANdTUYeP8lb", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfAzGzREc1ug6", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595447490 +} +```json: Authorisation Payment +{ + "id": "pay_QDhVJ5M23wt4rh", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "failed", + "order_id": "order_QDhT2PqFJvtg4y", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "success@razorpay", + "email": "gaurav.kumar@example.com", + "contact": "+919123456780", + "customer_id": "cust_Q0g6LTYw3obZEn", + "token_id": "token_QDhVJHYr5m87fF", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey\u2026 decaf.", + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + "optimizer_provider_name": "razorpay" + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment was a dummy payment for one time mandate registration.", + "error_source": "business", + "error_step": "payment_initiation", + "error_reason": "upi_dummy_payment", + "acquirer_data": { + "rrn": null + }, + "gateway_provider": "Razorpay", + "created_at": 1743490280, + "upi": { + "vpa": "success@razorpay" + } +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` via the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +## 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> - This endpoint will not fetch the details of expired and unused tokens. +> - The UPI tokens are not populated in the API response if the `save_vpa` feature is not enabled in your account. Please raise a request with our Support team to get this activated. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +List tokens = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +## 2.3. Delete Tokens + +> **WARN** +> +> +> **Watch Out!** +> +> Deleting a token removes it from Razorpay's database. The deleted token will not appear on the Dashboard or when all tokens are fetched. However, it does not cancel the mandate. If you wish to cancel the mandate from NPCI, use the [Cancel Token API](#24-cancel-token). +> + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameters + + `customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + + + +### Response Parameters + + +`deleted` +: `boolean` Indicates whether the token is deleted. Possible values: + - `true`: The token is deleted successfully. + - `false`: The token was not deleted. + + +## 2.4. Cancel Token +The following endpoint initiates cancellation of the mandate from NPCI. + +/customers/:customer_id/tokens/:token_id/cancel + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PUT https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001/cancel +```json: Response +{ + "status": "cancellation_initiated” +} +``` + + +### Path Parameters + + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be cancelled. For example, `token_1Aa00000000001`. diff --git a/llm-content/api/payments/recurring-payments/custom/upi/create-authorization-transaction.md b/llm-content/api/payments/recurring-payments/custom/upi/create-authorization-transaction.md new file mode 100644 index 00000000..bca85af2 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/upi/create-authorization-transaction.md @@ -0,0 +1,918 @@ +--- +title: 1. Create the Authorisation Transaction +description: Learn how to create an authorisation transaction for upi. +--- + +# 1. Create the Authorisation Transaction + +> **WARN** +> +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated for new UPI Autopay registrations effective 28 February 2026. +> - Customers can no longer register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> - Subsequent debits for existing mandates created via UPI Collect will continue to be executed without change. +> +> **Exemptions:** +> +> UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only). +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use UPI Intent. +> - If you are an existing Razorpay user not covered by exemptions, you must remove the UPI Collect parameters from `razorpay.js` and migrate to UPI Intent or UPI QR code to continue accepting UPI Autopay registrations. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/recurring-payments/custom-checkout.md). +> +> + +You can create an authorisation transaction using [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +## 1.1 Using Razorpay APIs + +To create an authorisation transaction using Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorisation-payment). + +> **INFO** +> +> +> **Handy Tips** +> +> For the Authorisation Payment to be successful in a day (for example, 5th June), you should create an Order and the Authorisation Transaction on the same day (5th June) before 11:59 pm. +> + +### 1.1.1 Create a Customer + + +### Sample Code + + Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + + Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + + + + +### Request Parameters + + `name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + +### 1.1.2. Create an Order + +The Orders API allows you to create a unique Razorpay `order_id`, for example, `order_1Aa00000000001`, that would be tied to the authorisation transaction. Refer to our detailed [Order documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md) for more details. + +You can create a payment against the `order_id` once it is generated. + +Use the below endpoint to create an order. + +/orders + + +### Sample Code + + + ```cURL: Request + curl -u : \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 100, + "currency": "INR", + "customer_id": "cust_4xbQrmEoA5WJ01", + "method": "upi", + "payment_capture": true, + "token": { + "max_amount": 200000, + "expire_at": 2709971120, + "frequency": "monthly" + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + }' + ```json: Response + { + "id": "order_1Aa00000000002", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1565172642 + } + ``` + + + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `upi`. + +`receipt` _optional_ +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be debited in a single charge. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The default value is 10 years and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + + `recurring_value` _optional_ + : `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + + `recurring_type` _optional_ + : `string` Determines when the recurring debit can be done. Possible values are: + - `on`: Recurring debit happens on the exact day of every month. + +> **INFO** +> +> +> **Handy Tips** +> +> For creating an order with `recurring_type`=`on`, set the `recurring_value` parameter to the current date. +> + + - `before`: Recurring debit can happen any time before the specified date. + - `after`: Recurring debit can happen any time after the specified date. + + For example, if the `frequency` is `monthly`, `recurring_value` is `17` and `recurring_type` is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if `recurring_type` is `after`, recurring debit can only happen on or after the 17th of the month. + + +### 1.1.3. Create an Authorisation Payment + +> **INFO** +> +> +> **Handler Function vs Callback URL** +> +> - **Handler Function**: +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL**: +> +When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. +> + + +### UPI Intent + + UPI Intent is supported on **mWeb (Android)** and **Mobile App (WebView)**. On **Desktop Web**, as UPI Intent is not supported, a QR code is displayed instead. + + + Platform | Procedure + --- + **mWeb** | Customers are redirected to their preferred UPI app to complete the payment. For the complete integration guide, refer to [UPI Intent on Mobile Web](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods/upi-intent-mweb.md). + --- + **Mobile App (WebView)** | UPI Intent requires deep link handling in your Android or iOS app to launch UPI apps from the WebView. For the complete integration guide, refer to [UPI Intent in WebView — Android](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/webview/upi-intent-android.md) and [UPI Intent in WebView — iOS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/webview/upi-intent-ios.md). + --- + **Desktop Web** | UPI Intent is not supported. A QR code is automatically displayed for customers to scan with their preferred UPI app. No additional code changes are required. + + + + List of Supported UPI Apps + + + Android | iOS + --- + - Google Pay +- BHIM +- PhonePe +- PayTM +- Amazon Pay +| - Google Pay +- PhonePe +- PayTM + + + + + + + + + +### UPI Collect + + +> **WARN** +> +> +> **Deprecation Notice** +> +> **UPI Collect is deprecated effective 28 February 2026.** This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/recurring-payments/custom-checkout.md) to switch to UPI Intent. +> + + ```html: Checkout with handler functions + + + Pay + + const btn = document.querySelector("#btn"); + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + razorpay.once("ready", function(response) { + console.log(response.methods); + }) + var data = { + "amount": 300, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR",// Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": "1", + "method": "upi", + "upi": + { + "vpa": "gauravkumar@somebank", + "flow": "collect" + }// Applicable only for exempted businesses. UPI Collect is deprecated for all others effective 28 Feb 2026. + }; + btn.addEventListener("click", function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID and Razorpay signature to success handler. + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); // will pass error object to error handler + }) + + + ``` + + ```html: Custom checkout with Callback URL + + + Pay + + const btn = document.querySelector("#btn"); + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + razorpay.once("ready", function(response) { + console.log(response.methods); + }) + var data = { + "callback_url": "www.example-callback-url.com", + "amount": 300, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR",// Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": "1", + "method": "upi", + "upi": + { + "vpa": "gauravkumar@somebank", + "flow": "collect" + }// Applicable only for exempted businesses. UPI Collect is deprecated for all others effective 28 Feb 2026. + }; + btn.addEventListener("click", function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + }) + + + ``` + +#### Additional Checkout fields + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +`recurring` _mandatory_ +: `string` Determines if the recurring payment is enabled or not. Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this if you want to allow **recurring payments** and **one-time payment** in the same flow. + +## 1.2. Using a Registration Link + +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the [API](#121-create-a-registration-link) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> - You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> - You can [use Webhooks to get notifications about successful payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) against a registration link. +> + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. + +A registration link must always have the amount (in paise) that the customer will be charged when making the authorisation payment. For UPI, the amount must be a minimum of `₹1`. + +### 1.2.1. Create a Registration Link + +Use the below endpoint to create a registration link. + +/subscription_registration/auth_links + + +### Sample Code + + ```curl: Request + curl -u : + -X POST https://api.razorpay.com/v1/subscription_registration/auth_links + -H "Content-Type: application/json" \ + -d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": "100", + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "method": "upi", + "max_amount": "500", + "expire_at": 4102444799, + "frequency": "monthly" + }, + "receipt": "Receipt No. 1", + "email_notify": true, + "sms_notify": true, + "expire_by": 4102444799, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } + }' + ```json: Response + { + "id": "inv_FHr1ekX0r2VCVK", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHr1ehR3nmNeXo", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 4102444799, + "issued_at": 1595489219, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595489219, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/ak1WxDB", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595489219, + "idempotency_key": null + } + ``` + + + +### Request Parameters + + `customer` +: Details of the customer to whom the registration link will be sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `string` Customer's phone number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, only `INR` is supported. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. For example, `12:30 p.m. Thali meals (Gaurav Kumar)`. + + `subscription_registration` +: Details of the authorisation transaction. + + `method` _mandatory_ + : `string` The authorization method. Here it is `card`. + + `max_amount` _optional_ + : `integer` Use to set the maximum amount (in paise) per debit request. The value can range from `500` - `9999900`. Defaults to ₹99,000. + + `expire_at` _optional_ + : `integer` The timestamp, in Unix format, till when you can use the token (authorization on the payment method) to charge the customer subsequent payments. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Must be set to `monthly`. + + `sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Can have the following values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Can have the following values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The timestamp, in Unix, till when the registration link should be available to the customer to make the authorisation transaction. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + + +### Path Parameters + + `id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. diff --git a/llm-content/api/payments/recurring-payments/custom/upi/create-subsequent-payments.md b/llm-content/api/payments/recurring-payments/custom/upi/create-subsequent-payments.md new file mode 100644 index 00000000..88898b5e --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/upi/create-subsequent-payments.md @@ -0,0 +1,450 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notification":{ + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114 + }, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notification = new JSONObject(); +notification.put("token_id","token_M7K2eFBU7vToaQ"); +notification.put("payment_after","1634057114"); +orderRequest.put("notification", notification); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array( + 'receipt' => '123', + 'amount' => 100, + 'payment_capture' => true, + 'currency' => '', + 'notification' => array( + 'token_id' => 'token_M7K2eFBU7vToaQ', + 'payment_after' => '1634057114' + ), + 'notes' => array( + 'key1' => 'value3', + 'key2' => 'value2' + ) +)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notification": { + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114 + }, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notification': {'token_id': 'token_M7K2eFBU7vToaQ', + 'payment_after': 1634057114}, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notification": { + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114 + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notification": map[string]interface{}{ + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114 + }, + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notification = new Dictionary(); +notification.Add("token_id", "token_M7K2eFBU7vToaQ"); +notification.Add("payment_after", "1634057114"); +orderRequest.Add("notification", notification); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is `100` (). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`notification` +: `object` Details of the pre-debit notification. This object is optional. You should use it only if you want to control pre-debit notifications and debits. If you do not pass this object, we will automatically try to debit 25 hours after the pre-debit notification is delivered. + + +> **WARN** +> +> +> **Watch Out!** +> +> We will not attempt any retry if the debit fails for tokens with the notification object in the created order. You should manually retry the debit attempt. +> + + `token_id` _mandatory_ + : `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + + `payment_after` _optional_ + : `integer` UNIX timestamp post which the debit is supposed to happen. Defaults to 25 hours after the pre-debit notification is delivered. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +## 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +> **INFO** +> +> +> **UPI Payments** +> +> - We recommend sending a pre-debit notification to the customer 48 hours before the debit date. +> - For UPI, it may take between 24-36 hours for the subsequent payment to reflect on your Dashboard. +> - This is because of the failure of pre-debit notification and/or any retries that we attempt for the payment. +> - Do not create another subsequent payment until you get the status of the previous one. +> + +> **WARN** +> +> +> **UPI Payments** +> +> - The subsequent payment may fail if there is late authorisation of an earlier payment. +> - For UPI, **do not** create subsequent payments on the last day of the cycle. This will cause the payment to fail. +> + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. diff --git a/llm-content/api/payments/recurring-payments/custom/upi/tokens.md b/llm-content/api/payments/recurring-payments/custom/upi/tokens.md new file mode 100644 index 00000000..be4fd2b1 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/upi/tokens.md @@ -0,0 +1,272 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +## 2.1. Fetch Token by Payment ID + +Use the below endpoint to fetch the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); + +```json: Response +{ + "id": "pay_FHfAzEJ51k8NLj", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfANdTUYeP8lb", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfAzGzREc1ug6", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595447490 +} +``` + +> **INFO** +> +> +> **Note** +> +> You can also retrieve the `token_id` via the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +## 2.2. Fetch Tokens by Customer ID + +> **WARN** +> +> +> **Watch Out!** +> +> The UPI tokens are not populated in the API response if the `save_vpa` feature is not enabled in your account. Please raise a request with our Support team to get this activated. +> + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +## 2.3. Delete Tokens + +> **WARN** +> +> +> **Watch Out!** +> +> Deleting a token removes it from Razorpay's database. The deleted token will not appear on the Dashboard or when all tokens are fetched. However, it does not cancel the mandate. If you wish to cancel the mandate from NPCI, use the [Cancel Token API](#24-cancel-token). +> + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameters + + `customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + + + +### Response Parameters + + +`deleted` +: `boolean` Indicates whether the token is deleted. Possible values: + - `true`: The token is deleted successfully. + - `false`: The token was not deleted. + + +## 2.4. Cancel Token +The following endpoint initiates cancellation of the mandate from NPCI. + +/customers/:customer_id/tokens/:token_id/cancel + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PUT https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001/cancel +```json: Response +{ + "status": "cancellation_initiated” +} +``` + + +### Path Parameters + + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be cancelled. For example, `token_1Aa00000000001`. diff --git a/llm-content/api/payments/recurring-payments/custom/webhooks.md b/llm-content/api/payments/recurring-payments/custom/webhooks.md new file mode 100644 index 00000000..e2b5ed66 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/custom/webhooks.md @@ -0,0 +1,2747 @@ +--- +title: Webhooks +description: Learn how to set up webhooks for recurring payments, available webhook events and sample payloads for these events. Webhooks are the best ways to receive alerts about the authorisation payment, the status of tokens and subsequent recurring payments. +--- + +# Webhooks + +Webhooks (Web Callback, HTTP Push API or Reverse API) automatically notify your application when specific events occur. Instead of continuously polling APIs to check for updates, webhooks push notifications directly to your server when events happen. + +## Webhooks vs APIs + +Here is how webhooks compare to traditional API polling: + +Aspect | APIs | Webhooks +--- +**Data retrieval** | Pull-based (you request) | Push-based (we send) +--- +**Timing** | On-demand | Near real-time when events occur +--- +**Resource usage** | Requires polling | Event-driven, efficient + +## How Razorpay Webhooks Work + +When you subscribe to webhook events, Razorpay sends an HTTP POST request with JSON payload to your configured endpoint URL whenever those events are triggered. + +Suppose you have subscribed to the `order.paid` webhook event, you will receive a notification every time a user pays you for an order, in the configured endpoint URL. + +### Use Cases + +There can be multiple uses for webhook events. Two of these are listed below. + + +### Capturing Late Authorised Payments + + Capturing payments for which you did not receive a response on the client-side is perhaps the most important use case for the `payment.authorized` event. + + Sometimes, the communication between the bank and Razorpay or between you and Razorpay may not occur. This could be because of a slow network connection or your customer closing the window while processing the payment. This could lead to a payment being marked as **Failed** on the Dashboard but changed to **Authorized** at a later time. Know more about [late authorisation of payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md). + + You can use webhooks to get notified about payments that get authorised and analyse this data to decide whether to capture the payment or not. + + + +### Notifications on Failed Payments + + When a payment attempted by your customer fails, we receive the failed payment status from the bank. This payment gets recorded in our system as **Failed**. + + Suppose you have enabled the `payment.failed` webhook, you will receive a notification from us about the failed payment. You can then further analyse this payment and notify your customer about the failure. + + + +### Setup and Configuration + +- You can set up webhooks from your Dashboard and configure separate URLs for **Live** mode and **Test** mode. Know more about setting up [Payment webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) and [Payout webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md). +- A **Test** mode webhook receives events for your test transactions. Know more about [testing webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). +- Webhook URLs must use ports **80** or **443** only. +- Ensure Razorpay webhook IPs are whitelisted on your server. Even if your server accepts all incoming requests, webhooks may still be blocked by cloud security groups or network configurations. Refer to [Razorpay IPs and Certificates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#webhook-ips) for the complete list of webhook IP addresses. + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + +## Idempotency + +There could be scenarios where your endpoint might receive the same webhook event multiple times. This is an expected behaviour based on the webhook design. + +To handle duplicate webhook events: +1. You can identify the duplicate webhooks using the `x-razorpay-event-id` header. The value for this header is unique per event. +2. Check the value of `x-razorpay-event-id` in the webhook request header. +3. Verify if an event with the same header is processed at your end. + +## Deactivation + +All webhook responses must return a status code in the range `2XX` within a window of 5 seconds. If we receive response codes other than this or the request times out, it is considered a failure. + +On failure, a webhook is re-tried at progressive intervals of time, defined in the exponential back-off policy, for 24 hours. If the failures continue for 24 hours, the webhook is disabled. You need to enable the webhook from the Dashboard after fixing the errors at your end. Know more about [enabling Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md#enabledisable-a-webhook). + +> **INFO** +> +> +> **Handy Tips** +> +> When a webhook gets disabled, you receive an email notification on the email id you configured while setting up the webhooks. +> + +## Setup Webhooks + +Watch this video to see how to set up a webhook. + +[Video: https://www.youtube.com/embed/Xiikw4_CcQk?si=b6kYHKIp1xikPrJZ] + +To set up webhooks: + +1. Log in to the Dashboard and navigate to **Accounts & Settings**. +2. Click **Webhooks** under **Website and app settings**. +3. Click the **+ Add New Webhook** button. + + ![Add a new webhooks button on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-1.jpg.md) +4. In the **Webhook Setup** pop-up page: + - Enter the **URL** where you want to receive the webhook payload when an event is triggered. We recommend using an HTTPS URL. + + +> **INFO** +> +> +> **Handy Tips** +> +> - You can set up to **30 URLs** to receive Webhook notifications. Webhooks can only be delivered to public URLs. +> - If your URL contains `razorpay` as a domain, you will not be able to add the URL and will receive an error. +> - If you attempt to save a localhost endpoint as part of a webhook setup, you will notice an error. Know more about [testing Webhooks on an application running on localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#application-running-on-localhost). +> + + + - Enter a **Secret** for the webhook endpoint. The secret is used to validate that the webhook is from Razorpay. Do not expose the secret publicly. Know more about [how to validate webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> - When setting up the webhook, specify a secret. Use this secret to validate that the webhook is from Razorpay. Entering the secret is optional but recommended. The secret should never be exposed publicly. +> - The webhook secret does not need to be the Razorpay API key secret. +> + + + + - In the **Alert Email** field, enter the email address to which the notifications should be sent in case of webhook failure. You will receive webhook related notifications like failures, deactivation and so on. + - Select the required events from the list of **Active Events**. + ![List of active webhook events on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-2.jpg.md) + +5. Click **Create Webhook**. After you set up a webhook, it appears on the list of webhooks. + ![List of webhooks on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhooks-list.jpg.md) +6. You can select the webhook and click **Edit** to make more changes. + +## Validation + +When your webhook `secret` is set, Razorpay uses it to create a hash signature with each payload. This hash signature is passed with each request under the `X-Razorpay-Signature` header that you need to validate at your end. We provide support for validating the signature in all of our [language SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration.md). + +If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. + +`X-Razorpay-Signature` +: The hash signature is calculated using HMAC with SHA256 algorithm; with your webhook secret set as the key and the webhook request body as the message. + +You can also validate the webhook signature yourself using a [HMAC](https://en.wikipedia.org/wiki/Hash-based_message_authentication_code) as shown below: + +```html: HMAC Hex Digest +key = webhook_secret +message = webhook_body // raw webhook request body +received_signature = webhook_signature + +expected_signature = hmac('sha256', message, key) + +if expected_signature != received_signature + throw SecurityError +end + +``` + +> **WARN** +> +> +> **Do Not Parse or Cast the Webhook Request Body** +> +> While generating the signature at your end, ensure that the webhook body passed as an argument is the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> + +## Check Payment Status using Webhooks + +You can use these webhooks to check the status of the authorisation payment and subsequent payments. + +Webhook Event | Description +--- +[`payment.authorized`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized) | Indicates the payment has been authorized. A payment is authorized when the customer’s payment details are successfully authenticated by the bank. +--- +[`payment.captured`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-captured) | Indicates when the payment has been captured. +--- +[`order.paid`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#order-paid) | Indicates the customer has successfully made the payment. +--- +[`payment.failed`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-failed) | Indicates that the payment has failed. If the payment fails, you need to create an authorisation transaction again. + +### Payment Authorized + +Indicates that the payment has been authorized. A payment is authorized when the customer’s payment details are successfully authenticated by the bank. + +> **WARN** +> +> +> **Watch Out!** +> +> For Emandate, the 'acquirer_data' is populated as an empty object in the webhook. +> + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.authorized", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHf94S8ja4Cggz", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "authorized", + "order_id": "order_FHf8iqahguUGkM", + "invoice_id": "inv_FHf8iwg1ZaNMNh", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHf94Uym9tdYFJ", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595447381 + } + } + }, + "created_at": 1595447383 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.authorized", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "authorized", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "card": { + "id": "card_F0zoXUp4IPPGoI", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "541898" + }, + "created_at": 1595449871 + } + } + }, + "created_at": 1595449872 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.authorized", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhXwFbTdVTDWVA", + "entity": "payment", + "amount": 0, + "currency": "INR", + "base_amount": 0, + "status": "authorized", + "order_id": "order_EhTTPTTwLAijw8", + "invoice_id": "inv_EhTTPSxAjbXCWi", + "international": false, + "method": "nach", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhXwFeR0hG3qZj", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1587561758 + } + } + }, + "created_at": 1587562064 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.authorized", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhm0UWoNrZT3h", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "authorized", + "order_id": "order_FHhlVrVCPWGSDC", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhm0XTtJg9zqb", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "688684363734", + "upi_transaction_id": "B832E94839C6C5194D2DB36F865F564D" + }, + "created_at": 1595456636 + } + } + }, + "created_at": 1595456636 +} +``` + +### Payment Captured + +Indicates that the payment has been captured. + +> **WARN** +> +> +> **Watch Out!** +> +> For Emandate, the 'acquirer_data' is populated as an empty object in the webhook. +> + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.captured", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHf94S8ja4Cggz", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_FHf8iqahguUGkM", + "invoice_id": "inv_FHf8iwg1ZaNMNh", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHf94Uym9tdYFJ", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595447381 + } + } + }, + "created_at": 1595447383 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.captured", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "card": { + "id": "card_F0zoXUp4IPPGoI", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "541898" + }, + "created_at": 1595449871 + } + } + }, + "created_at": 1595449873 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.captured", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhXwFbTdVTDWVA", + "entity": "payment", + "amount": 0, + "currency": "INR", + "base_amount": 0, + "status": "captured", + "order_id": "order_EhTTPTTwLAijw8", + "invoice_id": "inv_EhTTPSxAjbXCWi", + "international": false, + "method": "nach", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhXwFeR0hG3qZj", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at": 1587561758 + } + } + }, + "created_at": 1587562064 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.captured", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhm0UWoNrZT3h", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHhlVrVCPWGSDC", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhm0XTtJg9zqb", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "688684363734", + "upi_transaction_id": "B832E94839C6C5194D2DB36F865F564D" + }, + "created_at": 1595456636 + } + } + }, + "created_at": 1595456636 +} +``` + +### Order Paid + +Indicates that the payment has been captured. + +> **WARN** +> +> +> **Watch Out!** +> +> - For Emandate, the 'acquirer_data' is populated as an empty object in the webhook. +> - The `invoice_id` parameter is populated with the unique identifier value (for example, `inv_FHf8iwg1ZaNMNh`) for Emandate, Card and Paper NACH methods only. For UPI, the value of the `invoice_id` parameter value is `null`. +> + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "order.paid", + "contains": [ + "payment", + "order" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHf94S8ja4Cggz", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_FHf8iqahguUGkM", + "invoice_id": "inv_FHf8iwg1ZaNMNh", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHf94Uym9tdYFJ", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595447381 + } + }, + "order": { + "entity": { + "id": "order_FHf8iqahguUGkM", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "paid", + "attempts": 1, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1595447361, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "netbanking", + "expire_at": 1689971140, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "XXXXXXXXXXXX1121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 0 + } + } + } + }, + "created_at": 1595447383 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "order.paid", + "contains": [ + "payment", + "order" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": "inv_FHf8iwg1ZaNMNh", + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "card": { + "id": "card_F0zoXUp4IPPGoI", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "541898" + }, + "created_at": 1595449871 + } + }, + "order": { + "entity": { + "id": "order_FHfnswDdfu96HQ", + "entity": "order", + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "paid", + "attempts": 1, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1595449699 + } + } + }, + "created_at": 1595449873 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "order.paid", + "contains": [ + "payment", + "order" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhXwFbTdVTDWVA", + "entity": "payment", + "amount": 0, + "currency": "INR", + "base_amount": 0, + "status": "captured", + "order_id": "order_EhTTPTTwLAijw8", + "invoice_id": "inv_EhTTPSxAjbXCWi", + "international": false, + "method": "nach", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhXwFeR0hG3qZj", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "created_at": 1587561758 + } + }, + "order": { + "entity": { + "id": "order_EhTTPTTwLAijw8", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": null, + "offer_id": null, + "status": "paid", + "attempts": 1, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at": 1587546033, + "token": { + "method": "nach", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 10000000, + "auth_type": "physical", + "expire_at": 1617215399, + "nach": { + "create_form": true, + "form_reference1": "Reference 1", + "form_reference2": "Reference 2", + "prefilled_form": "https://rzp.io/i/kHXQ34x", + "upload_form_url": "https://rzp.io/i/2IcNo4E", + "description": "Paper NACH" + }, + "bank_account": { + "ifsc": "HDFC0000123", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "99889900231489", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 10000 + } + } + } + }, + "created_at": 1587562064 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "order.paid", + "contains": [ + "payment", + "order" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhm0UWoNrZT3h", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHhlVrVCPWGSDC", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhm0XTtJg9zqb", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "688684363734", + "upi_transaction_id": "B832E94839C6C5194D2DB36F865F564D" + }, + "created_at": 1595456636 + } + }, + "order": { + "entity": { + "id": "order_FHhlVrVCPWGSDC", + "entity": "order", + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "paid", + "attempts": 2, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1595456608 + } + } + }, + "created_at": 1595456636 +} +``` + +### Payment Failed + +Indicates that the payment has failed. If the payment fails, you need to create an authorisation transaction again. + +> **WARN** +> +> +> **Watch Out!** +> +> For Emandate, the 'acquirer_data' is populated as an empty object in the webhook. +> + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.failed", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhKpRTgEWNzBx", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "failed", + "order_id": "order_FHhKYYSK40KNzt", + "invoice_id": "inv_FHhKYltuPeHTyP", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhKpV8NeHJHtg", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595455092 + } + } + }, + "created_at": 1595455094 +} +```json: Cards +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.failed", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhLcvd67XXsBe", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "failed", + "order_id": "order_FHhLONJc3wlBbv", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "card": { + "id": "card_F0zoXUp4IPPGoI", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "error_source": "gateway", + "error_step": "payment_authorization", + "error_reason": "payment_failed", + "acquirer_data": { + "auth_code": null + }, + "created_at": 1595455138 + } + } + }, + "created_at": 1595455139 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.failed", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhYcjfgwGLVZOf", + "entity": "payment", + "amount": 0, + "currency": "INR", + "base_amount": 0, + "status": "failed", + "order_id": "order_EhYX40CBIRmSaC", + "invoice_id": "inv_EhYX3zhOm38daM", + "international": false, + "method": "nach", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhYcjjYiEL1nEW", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1587564171 + } + } + }, + "created_at": 1587564208 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.failed", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhSxIRyTtshjQr", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "failed", + "order_id": "order_EhSwt4nx32X1Ss", + "invoice_id": "inv_EhSwt4FKpTKrdf", + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": "Invoice #inv_EhSwt4FKpTKrdf", + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": gaurav.kumar@okhdfc, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhSxIV7p0l7yri", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "created_at": 1587544209 + } + } + }, + "created_at": 1587544212 +} +``` + +## Check Token Status using Webhooks + +You can use the below webhooks to check the status of the token. + +Webhook Event | Applicable Methods | Description +--- +[`token.confirmed`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-confirmed) | - Emandate +- Card +- Paper NACH +- UPI + | Indicates that the bank has completed the mandate registration. Once confirmed, you can create subsequent payments as per your business needs. +--- +[`token.rejected`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-rejected) | - Emandate +- Card +- Paper NACH +- UPI + | Indicates that the has been rejected. If rejected, you need to create the authorisation transaction again. +--- +[`token.cancelled`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-cancelled) | - Emandate +- UPI + - Card + | Indicated the token has been cancelled. +--- +[`token.paused`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-paused) | UPI | Indicated the token has been paused by your customer. + +### Token Confirmed + +Indicates that the bank has completed the mandate registration. Once confirmed, you can create subsequent payments as per your business needs. + +Available for tokens authorized using the following methods: +- Emandate +- Card +- Paper NACH +- UPI + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.confirmed", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHf94Uym9tdYFJ", + "entity": "token", + "token": "2wDPM7VAlXtjAR", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "netbanking", + "mrn": null, + "used_at": 1595447381, + "created_at": 1595447381, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 1689971140, + "dcc_enabled": false + } + } + }, + "created_at": 1595447383 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.confirmed", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHfn3rIiM1Z8nr", + "entity": "token", + "token": "2aqzyte2EqvuDr", + "bank": null, + "wallet": null, + "method": "card", + "card": { + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer", + "expiry_month": 5, + "expiry_year": 2025, + "flows": { + "otp": true, + "recurring": true, + "iframe": false + } + }, + "recurring": true, + "auth_type": null, + "mrn": null, + "used_at": 1595449653, + "created_at": 1595449652, + "expired_at": 1748716199, + "dcc_enabled": false + } + } + }, + "created_at": 1595449654 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.confirmed", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHf94Uym9tdYFJ", + "entity": "token", + "token": "2wDPM7VAlXtjAR", + "bank": "HDFC", + "wallet": null, + "method": "nach", + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "physical", + "mrn": null, + "used_at": 1595447381, + "created_at": 1595447381, + "max_amount": 9999900, + "expired_at": 1689971140, + "dcc_enabled": false + } + } + }, + "created_at": 1595447383 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.confirmed", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHhm0XTtJg9zqb", + "entity": "token", + "token": "BmwqwrkHZTlzVF", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595456636, + "created_at": 1595456636, + "start_time": 1595456608, + "dcc_enabled": false + } + } + }, + "created_at": 1595456636 +} +``` + +### Token Rejected + +Triggered during the token creation/registration process, when the token creation process fails without completion. + +This webhook is available for tokens authorized using the following methods: +- Emandate +- Card +- Paper NACH +- UPI + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.rejected", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHhXz1xrfmEtzO", + "entity": "token", + "token": "CxQakUkIEObsTB", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "recurring": false, + "recurring_details": { + "status": "rejected", + "failure_reason": "Rejected by bank" + }, + "auth_type": "debitcard", + "mrn": null, + "used_at": 1595455839, + "created_at": 1595455839, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 4102444799, + "dcc_enabled": false + } + } + }, + "created_at": 1595455843 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.rejected", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHhXz1xrfmEtzO", + "entity": "token", + "token": "CxQakUkIEObsTB", + "bank": "HDFC", + "wallet": null, + "method": "card", + "recurring": false, + "recurring_details": { + "status": "rejected", + "failure_reason": "Rejected by bank" + }, + "card": { + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer", + "expiry_month": 5, + "expiry_year": 2021, + "flows": { + "otp": true, + "recurring": false, + "iframe": false + } + }, + "auth_type": "card", + "mrn": null, + "used_at": 1595455839, + "created_at": 1595455839, + "max_amount": 9999900, + "expired_at": 4102444799, + "dcc_enabled": false + } + } + }, + "created_at": 1595455843 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.rejected", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHhXz1xrfmEtzO", + "entity": "token", + "token": "CxQakUkIEObsTB", + "bank": "HDFC", + "wallet": null, + "method": "nach", + "recurring": false, + "recurring_details": { + "status": "rejected", + "failure_reason": "Rejected by bank" + }, + "auth_type": "physical", + "mrn": null, + "used_at": 1595455839, + "created_at": 1595455839, + "max_amount": 9999900, + "expired_at": 4102444799, + "dcc_enabled": false + } + } + }, + "created_at": 1595455843 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.rejected", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHhm0XTtJg9zqb", + "entity": "token", + "token": "BmwqwrkHZTlzVF", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "rejected", + "failure_reason": "Rejected by bank" + }, + "auth_type": "upi", + "mrn": null, + "used_at": 1595456636, + "created_at": 1595456636, + "start_time": 1595456608, + "dcc_enabled": false + } + } + }, + "created_at": 1595456636 +} +``` + +### Token Cancelled + +Triggered when a token is explicitly cancelled or deactivated. Usually happens after a successful token creation. + +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.cancelled", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FVIP5DVexjoZjF", + "entity": "token", + "token": "5ESJrtR1V6k6mp", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "56546", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "cancelled", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1598424055, + "created_at": 1598424055, + "start_time": 1598510437, + "dcc_enabled": false, + "max_amount": 5600, + "expired_at": 1913956837 + } + } + }, + "created_at": 1599065559 +} + +```json: Cards +{ + "entity":"event", + "account_id":"acc_8TgNt9DVrJB0bl", + "event":"token.cancelled", + "contains":[ + "token" + ], + "payload":{ + "token":{ + "entity":{ + "id":"token_KaQbMNOeH67CZj", + "entity":"token", + "token":"DWrlGEB3ZqWKNV", + "bank":null, + "wallet":null, + "method":"card", + "card":{ + "entity":"card", + "name":"", + "last4":"3182", + "network":"Visa", + "type":"credit", + "issuer":"HDFC", + "international":false, + "emi":true, + "sub_type":"consumer", + "token_iin":"486924082", + "expiry_month":"01", + "expiry_year":"2099", + "flows":{ + "otp":true, + "recurring":true + }, + "cobranding_partner":null + }, + "recurring":true, + "recurring_details":{ + "status":"cancelled", + "failure_reason":null + }, + "auth_type":null, + "mrn":null, + "used_at":1675247897, + "created_at":1667230058, + "expired_at":1730399399, + "status":"active", + "error_description":null, + "dcc_enabled":false, + "max_amount":200, + "error_code":null, + "compliant_with_tokenisation_guidelines":true + } + } + }, + "created_at":1681372110 +} +``` + +### Token Paused + +Indicates the token has been paused by your customer. + +Available only for tokens authorized via UPI. + +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.paused", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FVIP5DVexjoZjF", + "entity": "token", + "token": "5ESJrtR1V6k6mp", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "56546", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "paused", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1598424055, + "created_at": 1598424055, + "start_time": 1598510437, + "dcc_enabled": false, + "max_amount": 5600, + "expired_at": 1913956837 + } + } + }, + "created_at": 1599065559 +} +``` + +### Token Resumed + +Indicates the token has been unpaused by your customer. + +Available only for tokens authorized via UPI. + +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.resumed", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FVIP5DVexjoZjF", + "entity": "token", + "token": "5ESJrtR1V6k6mp", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "56546", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "resumed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1598424055, + "created_at": 1598424055, + "start_time": 1598510437, + "dcc_enabled": false, + "max_amount": 5600, + "expired_at": 1913956837 + } + } + }, + "created_at": 1599065559 +} +``` + +## Check Registration Link Status using Webhooks + +You can use these webhooks to check the status of the registration link. + +Webhook Event | Description +--- +[`invoice.paid`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#invoice-paid) | Indicates that a registration link is successfully paid. +--- +[`invoice.expired`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#invoice-expired) | Indicates that a registration link has expired. + +### Invoice Paid + +Indicates that a registration link has been successfully paid. + +> **WARN** +> +> +> **Watch Out!** +> +> For Emandate, the 'acquirer_data' is populated as an empty object in the webhook. +> + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhf2L2OS2qE1u", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_FHhejhc3XFHr5c", + "invoice_id": "inv_FHhejg2WDlmyGP", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_FHhejg2WDlmyGP", + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhf2PMcYf1mOu", + "notes": { + "Internal Note": "Random Description" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595456240 + } + }, + "order": { + "entity": { + "id": "order_FHhejhc3XFHr5c", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1595456223, + "token": { + "method": "emandate", + "notes": { + "Internal Note": "Random Description" + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": null, + "expire_at": 1609439399, + "bank_account": { + "ifsc": "HDFC0000123", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "XXXXXXXX9012", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 0 + } + } + }, + "invoice": { + "entity": { + "id": "inv_FHhejg2WDlmyGP", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_FHhejhc3XFHr5c", + "payment_id": "pay_FHhf2L2OS2qE1u", + "status": "paid", + "expire_by": 1596220199, + "issued_at": 1595456223, + "paid_at": 1595456243, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595456223, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Authorization link", + "notes": { + "Internal Note": "Random Description" + }, + "comment": null, + "short_url": "https://rzp.io/i/6gkcy7O", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "user_id": "CTlk1QZN33LQUT", + "created_at": 1595456223, + "idempotency_key": null + } + } + }, + "created_at": 1595456243 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhcSi5TDZ7wJL", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHhcC7dWy3feTu", + "invoice_id": "inv_FHhcC629qa82SA", + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_FHhcC629qa82SA", + "card_id": "card_F0zoXUp4IPPGoI", + "card": { + "id": "card_F0zoXUp4IPPGoI", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "Internal Note": "Random Description" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "290686" + }, + "created_at": 1595456094 + } + }, + "order": { + "entity": { + "id": "order_FHhcC7dWy3feTu", + "entity": "order", + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1595456078, + "token": { + "method": "card", + "notes": { + "Internal Note": "Random Description" + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": null, + "expire_at": null, + "first_payment_amount": 0 + } + } + }, + "invoice": { + "entity": { + "id": "inv_FHhcC629qa82SA", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_FHhcC7dWy3feTu", + "payment_id": "pay_FHhcSi5TDZ7wJL", + "status": "paid", + "expire_by": 1596220199, + "issued_at": 1595456078, + "paid_at": 1595456095, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595456078, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Authorization Link", + "notes": { + "Internal Note": "Random Description" + }, + "comment": null, + "short_url": "https://rzp.io/i/X2cWr1D", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "user_id": "CTlk1QZN33LQUT", + "created_at": 1595456078, + "idempotency_key": null + } + } + }, + "created_at": 1595456095 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhXwFbTdVTDWVA", + "entity": "payment", + "amount": 0, + "currency": "INR", + "base_amount": 0, + "status": "captured", + "order_id": "order_EhTTPTTwLAijw8", + "invoice_id": "inv_EhTTPSxAjbXCWi", + "international": false, + "method": "nach", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhXwFeR0hG3qZj", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "created_at": 1587561758 + } + }, + "order": { + "entity": { + "id": "order_EhTTPTTwLAijw8", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": null, + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1587546033, + "token": { + "method": "nach", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 10000000, + "auth_type": "physical", + "expire_at": 1617215399, + "nach": { + "create_form": true, + "form_reference1": "Reference 1", + "form_reference2": "Reference 2", + "prefilled_form": "https://rzp.io/i/409IxCx", + "upload_form_url": "https://rzp.io/i/2IcNo4E", + "description": "Paper NACH" + }, + "bank_account": { + "ifsc": "HDFC0000123", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "99889900231489", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 10000 + } + } + }, + "invoice": { + "entity": { + "id": "inv_EhTTPSxAjbXCWi", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_EhTTPTTwLAijw8", + "payment_id": "pay_EhXwFbTdVTDWVA", + "status": "paid", + "expire_by": 1588271399, + "issued_at": 1587546033, + "paid_at": 1587562064, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1587546033, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Paper NACH", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "comment": null, + "short_url": "https://rzp.io/i/2IcNo4E", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "subscription_status": null, + "user_id": "BhPhy4mGkOmThn", + "created_at": 1587546033, + "idempotency_key": null, + "reminder_status": null, + "token": { + "method": "nach", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 10000000, + "auth_type": "physical", + "expire_at": 1617215399, + "nach": { + "create_form": true, + "form_reference1": "Reference 1", + "form_reference2": "Reference 2", + "prefilled_form": "https://rzp.io/i/409IxCx", + "upload_form_url": "https://rzp.io/i/2IcNo4E", + "description": "Paper NACH" + }, + "bank_account": { + "ifsc": "HDFC0000123", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "99889900231489", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 10000 + }, + "nach_form_url": "https://rzp.io/i/409IxCx" + } + } + }, + "created_at": 1587562064 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhw4RhnuZPiuO", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHhvTLKwXS9bnS", + "invoice_id": "inv_FHhvTPure2cEqZ", + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_FHhvTPure2cEqZ", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhw4Ufvv7kv9u", + "notes": { + "Internal Note": "Random Description" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "237153511656", + "upi_transaction_id": "B1D63A7B0366274F83AF9B3A0D7C5CA8" + }, + "created_at": 1595457208 + } + }, + "order": { + "entity": { + "id": "order_FHhvTLKwXS9bnS", + "entity": "order", + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "currency": "INR", + "receipt": null, + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "paid", + "attempts": 3, + "notes": [], + "created_at": 1595457173, + "token": { + "method": "upi", + "notes": { + "Internal Note": "Random Description" + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 200000, + "auth_type": null, + "expire_at": 1609439399, + "first_payment_amount": 0 + } + } + }, + "invoice": { + "entity": { + "id": "inv_FHhvTPure2cEqZ", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_FHhvTLKwXS9bnS", + "payment_id": "pay_FHhw4RhnuZPiuO", + "status": "paid", + "expire_by": 1596220199, + "issued_at": 1595457174, + "paid_at": 1595457208, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595457173, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Authorization transaction", + "notes": { + "Internal Note": "Random Description" + }, + "comment": null, + "short_url": "https://rzp.io/i/GZlLJ0d", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "user_id": "CTlk1QZN33LQUT", + "created_at": 1595457174, + "idempotency_key": null + } + } + }, + "created_at": 1595457208 +} +``` + +### Invoice Expired + +Indicates that a registration link has expired. + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.expired", + "contains": [ + "invoice" + ], + "payload": { + "invoice": { + "entity": { + "id": "inv_EhT8EVjQDUukPy", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_EhT8EWJQqnMYq5", + "payment_id": null, + "status": "expired", + "expire_by": 1587580199, + "issued_at": 1587544830, + "paid_at": null, + "cancelled_at": null, + "expired_at": 1587580384, + "sms_status": "sent", + "email_status": "sent", + "date": 1587544830, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Emandate", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "comment": null, + "short_url": "https://rzp.io/i/bJsb41M", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "subscription_status": null, + "user_id": "BhPhy4mGkOmThn", + "created_at": 1587544830, + "idempotency_key": null, + "reminder_status": null + } + } + }, + "created_at": 1587580384 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.expired", + "contains": [ + "invoice" + ], + "payload": { + "invoice": { + "entity": { + "id": "inv_EhT9735kpvUafM", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_EhT9741SenUX1D", + "payment_id": null, + "status": "expired", + "expire_by": 1587580199, + "issued_at": 1587544880, + "paid_at": null, + "cancelled_at": null, + "expired_at": 1587580384, + "sms_status": "sent", + "email_status": "sent", + "date": 1587544880, + "terms": null, + "partial_payment": false, + "gross_amount": 10000, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 10000, + "amount_paid": 0, + "amount_due": 10000, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Card", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "comment": null, + "short_url": "https://rzp.io/i/BapcbaV", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "subscription_status": null, + "user_id": "BhPhy4mGkOmThn", + "created_at": 1587544880, + "idempotency_key": null, + "reminder_status": null + } + } + }, + "created_at": 1587580384 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.expired", + "contains": [ + "invoice" + ], + "payload": { + "invoice": { + "entity": { + "id": "inv_EhTAJksst7voVZ", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_EhTAJlTQZbL9NT", + "payment_id": null, + "status": "expired", + "expire_by": 1587580199, + "issued_at": 1587544949, + "paid_at": null, + "cancelled_at": null, + "expired_at": 1587580384, + "sms_status": "sent", + "email_status": "sent", + "date": 1587544949, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Paper NACH", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "comment": null, + "short_url": "https://rzp.io/i/IT8vEd1", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "subscription_status": null, + "user_id": "BhPhy4mGkOmThn", + "created_at": 1587544949, + "idempotency_key": null, + "reminder_status": null, + "token": { + "method": "nach", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 10000000, + "auth_type": "physical", + "expire_at": 1617215399, + "nach": { + "create_form": true, + "form_reference1": "Reference 1", + "form_reference2": "Reference 2", + "prefilled_form": "https://rzp.io/i/jDvNSTc", + "upload_form_url": "https://rzp.io/i/IT8vEd1", + "description": "Paper NACH" + }, + "bank_account": { + "ifsc": "HDFC0000123", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "88990011223344", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 0 + }, + "nach_form_url": "https://rzp.io/i/jDvNSTc" + } + } + }, + "created_at": 1587580384 +} +``` diff --git a/llm-content/api/payments/recurring-payments/emandate/auto-debit.md b/llm-content/api/payments/recurring-payments/emandate/auto-debit.md new file mode 100644 index 00000000..09bf9ad8 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/emandate/auto-debit.md @@ -0,0 +1,3603 @@ +--- +title: Charge First Payment Automatically after Emandate Registration +description: Register a customer's mandate and charge them the first recurring payment as part of the same transaction via Emandate. +--- + +# Charge First Payment Automatically after Emandate Registration + +You can register a customer's mandate and charge them the first recurring payment as part of the same transaction. For this, you have to pass the `first_payment_amount` parameter while creating the order. + +## 1. Create an Authorisation Transaction + +You can create an authorisation transaction: + +- Using the [Razorpay Standard Checkout](#11-using-razorpay-standard-checkout). +- Using a [Registration Link](#12-using-a-registration-link). + +### 1.1. Using Razorpay Standard Checkout + +To create an authorisation transaction using the Razorpay Standard Checkout, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay Standard Checkout](#113-create-an-authorisation-payment). + +### 1.1.1. Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + +#### Request Parameters + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + +### 1.1.2. Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +#### Emandate via Netbanking + +```curl: Emandate via Netbanking +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "first_payment_amount": 100, + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_1Aa00000000001"); +orderRequest.put("method", "emandate"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("first_payment_amount",100); +token.put("auth_type","netbanking"); +token.put("max_amount","9999900"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +token.put("bank_account",bankAccount); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => 'INR', 'method'=>'emandate', 'customer_id'=>$customerId, 'receipt'=>'Receipt No. 5', 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Engage'), 'token'=>array('first_payment_amount'=>10000, 'auth_type'=>'netbanking' ,'max_amount'=>'9999900','expire_at'=>'4102444799', 'notes'=>array('note_key 1'=> 'Tea, Earl Grey… decaf.','note_key 2'=> 'Tea. Earl Gray. Hot.'), 'bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233')))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 100, + currency: "INR", + method: "emandate", + receipt: "Receipt No. 5", + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Engage" + }, + token: { + first_payment_amount: 10000, + auth_type: "netbanking", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + "note_key 1": "Tea, Earl Grey… decaf.", + "note_key 2": "Tea. Earl Gray. Hot." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "11214311215411", + account_type: "savings", + ifsc_code: "HDFC0001233" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'emandate', + 'customer_id': 'cust_1Aa00000000001', + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'netbanking', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "method": "emandate", + "receipt": "Receipt No. 5", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Engage" + }, + "token": { + "first_payment_amount": 10000, + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "note_key 1": "Tea, Earl Grey… decaf.", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + } +} +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token": map[string]interface{}{ + "first_payment_amount": 100, + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 0); +orderRequest.Add("currency", "INR"); +orderRequest.Add("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.Add("method", "emandate"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); +Dictionary token = new Dictionary(); +token.Add("first_payment_amount",100); +token.Add("auth_type","netbanking"); +token.Add("max_amount","10000000"); +token.Add("expire_at","2709971120"); +Dictionary tokenNotes = new Dictionary(); +tokenNotes.Add("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.Add("notes_key_2","Tea, Earl Grey… decaf."); +token.Add("notes",tokenNotes); +orderRequest.Add("token", token); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +token.Add("bank_account",bankAccount); + +Order order = client.Order.Create(orderRequest); + +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "netbanking", + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 100 + } +} +``` + +#### Emandate via Debit Card + +```curl: Emandate via Debit Card +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "first_payment_amount": 100, + "auth_type": "debitcard", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_1Aa00000000001"); +orderRequest.put("method", "emandate"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("first_payment_amount",100); +token.put("auth_type","debitcard"); +token.put("max_amount","9999900"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +token.put("bank_account",bankAccount); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => 'INR', 'method'=>'emandate', 'customer_id'=>$customerId, 'receipt'=>'Receipt No. 5', 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Engage'), 'token'=>array('first_payment_amount'=>10000, 'auth_type'=>'debitcard' ,'max_amount'=>'9999900','expire_at'=>'4102444799', 'notes'=>array('note_key 1'=> 'Tea, Earl Grey… decaf.','note_key 2'=> 'Tea. Earl Gray. Hot.'), 'bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233')))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 100, + currency: "INR", + method: "emandate", + receipt: "Receipt No. 5", + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Engage" + }, + token: { + first_payment_amount: 10000, + auth_type: "debitcard", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + "note_key 1": "Tea, Earl Grey… decaf.", + "note_key 2": "Tea. Earl Gray. Hot." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "11214311215411", + account_type: "savings", + ifsc_code: "HDFC0001233" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'emandate', + 'customer_id': 'cust_1Aa00000000001', + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'debitcard', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "method": "emandate", + "receipt": "Receipt No. 5", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Engage" + }, + "token": { + "first_payment_amount": 10000, + "auth_type": "debitcard", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "note_key 1": "Tea, Earl Grey… decaf.", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + } +} +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token": map[string]interface{}{ + "first_payment_amount": 100, + "auth_type": "debitcard", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "debitcard", + "expire_at": 4102444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 100 + } +} +``` + +#### Emandate via Aadhaar + +```curl: Emandate via Aadhaar +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "first_payment_amount": 100, + "auth_type": "aadhaar", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_1Aa00000000001"); +orderRequest.put("method", "emandate"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("first_payment_amount",100); +token.put("auth_type","aadhaar"); +token.put("max_amount","9999900"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +token.put("bank_account",bankAccount); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => 'INR', 'method'=>'emandate', 'customer_id'=>$customerId, 'receipt'=>'Receipt No. 5', 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Engage'), 'token'=>array('first_payment_amount'=>10000, 'auth_type'=>'aadhaar' ,'max_amount'=>'9999900','expire_at'=>'4102444799', 'notes'=>array('note_key 1'=> 'Tea, Earl Grey… decaf.','note_key 2'=> 'Tea. Earl Gray. Hot.'), 'bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233')))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 100, + currency: "INR", + method: "emandate", + receipt: "Receipt No. 5", + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Engage" + }, + token: { + first_payment_amount: 10000, + auth_type: "aadhaar", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + "note_key 1": "Tea, Earl Grey… decaf.", + "note_key 2": "Tea. Earl Gray. Hot." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "11214311215411", + account_type: "savings", + ifsc_code: "HDFC0001233" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'emandate', + 'customer_id': 'cust_1Aa00000000001', + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'aadhaar', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "method": "emandate", + "receipt": "Receipt No. 5", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Engage" + }, + "token": { + "first_payment_amount": 10000, + "auth_type": "aadhaar", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "note_key 1": "Tea, Earl Grey… decaf.", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + } +} +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token": map[string]interface{}{ + "first_payment_amount": 100, + "auth_type": "aadhaar", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001", + }, + }, +} +body, err := client.Order.Create(data, nil) +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "aadhaar", + "expire_at": 4102444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 100 + } +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For emandate, the amount should be `0`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether tha payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `emandate`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer to be charged. For example, `cust_D0cs04OIpPPU1F`. + +`receipt` _optional_ +: `string` A user-entered unique identifier of the order. For example, `rcptid #1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: `object` Details related to the authorization such as max amount and bank account information. Pass a value in the `first_payment_amount` parameter if you want to auto-charge the customer the first payment immediately after mandate authorisation. The first payment amount will be debited, with a new `order_id` and corresponding `payment_id` created automatically and executed within 2 days of emandate token confirmation. + + `first_payment_amount` _optional_ + : `integer` The amount, in paise, that should be auto-charged in addition to the authorization amount. For example, `100000`. + + `auth_type` _optional_ + : `string` The payment method used to make the authorisation transaction. Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + + `max_amount` _optional_ + : `integer` The maximum amount, in paise, that a customer can be charged in one transaction. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` _optional_ + : `integer` The Unix timestamp, till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. The default value is 10 years for `emandate`. This value can range from the current date to 31-12-2099 (`4102444799`). + + `notes`_optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `bank_account` + : The customer's bank account details that should be pre-filled on the checkout. + + `account_number` _optional_ + : `string` The customer's bank account number. + + `account_type` _optional_ + : `string` The customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` _optional_ + : `string` The customer's bank IFSC. For example `UTIB0000001`. + + `beneficiary_name` _optional_ + : `string` The customer's name. For example, `Gaurav Kumar`. + +> **WARN** +> +> +> **Watch Out!** +> +> The `beneficiary_name` should be between 4 to 120 characters. +> + +### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000001`. + +`entity` +: `string` The entity that has been created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. For emandate, the amount should be `0`. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to pay. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `rcptid #1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`token` +: Details related to the authorisation such as max amount and bank account information. + + `auth_type` + : `string` Emandate type used to make the authorisation payment. Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + + `max_amount` + : `integer` The maximum amount in paise a customer can be charged in a transaction. Know about the [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` + : `integer` The Unix timestamp to indicate till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. The default value is 10 years for `emandate`. This value can range from the current date to 31-12-2099 (`4102444799`). + + `notes` + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`bank_account` +: `object` Customer's bank account details that should be pre-filled on the checkout. + + `account_number` + : `string` Customer's bank account number. + + `account_type` + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` + : `string` Customer's bank IFSC. For example `UTIB0000001`. + + `beneficiary_name` + : `string` Name of the beneficiary. For example, `Gaurav Kumar`. + +### 1.1.3. Create an Authorisation Payment + +Create a payment checkout form for customers to make Authorisation Transaction and register their mandate. You can use the Handler Function or Callback URL. + +Handler Function | Callback URL +--- +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. | When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. + +> **WARN** +> +> +> +> **Watch Out!** +> +> - The callback URL is not supported for recurring payments created using the registration link. +> - While handling the first time authorisation payment response, consume the `error_reason` field with value `upi_dummy_payment` and `error_description` field with value `Payment was a dummy payment for one time mandate registration.` to identify successful mandate registration. The parent `error_code` will be `BAD_REQUEST_ERROR`. +> + +```html: Checkout with handler functions + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "handler": function (response) { + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature); + }, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +```html: Manual checkout with Callback URL + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +``` + +### Additional Checkout Fields + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +### 1.2. Using a Registration Link + +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the [API](#121-create-a-registration-link) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> + +- When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. +- A registration link should always have an order amount (in paise) the customer will be charged when making the authorisation payment. This amount should be `0` in the case of Emandate. + +> **INFO** +> +> +> **Handy Tips** +> +> You can [use Webhooks to get notifications about successful payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) against a registration link. +> + +### 1.2.1. Create a Registration Link + +The following endpoint creates a registration link. + +/subscription_registration/auth_links + +#### Emandate via Netbanking + +```cURL: Emandate via Netbanking +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "netbanking", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 0); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "12 p.m. Meals"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","emandate"); +subscriptionRegistration.put("auth_type","netbanking"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +subscriptionRegistration.put("bank_account",bankAccount); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. 1"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('first_payment_amount'=>100, 'method'=>'emandate', 'auth_type'=>'netbanking' ,'max_amount'=>'50000','expire_at'=>'1634215992','bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233')),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992, 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Tea. Earl Gray. Hot.')) ); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 100, + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + first_payment_amount: 100, + method: "emandate", + auth_type: "netbanking", + max_amount: 50000, + expire_at: 1634215992, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "11214311215411", + account_type: "savings", + ifsc_code: "HDFC0001233" + } + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + 'customer': {'name': 'Gaurav Kumar', + 'email': 'gaurav.kumar@example.com', + 'contact': 9123456780}, + 'type': 'link', + 'amount': 0, + 'currency': 'INR', + 'description': '12 p.m. Meals', + 'subscription_registration': { + 'method': 'emandate', + 'auth_type': 'netbanking', + 'expire_at': 1580480689, + 'max_amount': 50000, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 11214311215411, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0001233', + }, + }, + 'receipt': 'Receipt no. 1', + 'expire_by': 1880480689, + 'sms_notify': True, + 'email_notify': True, + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "netbanking", + "max_amount": 50000, + "expire_at": 1634215992, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt No. 5", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::SubscriptionRegistration.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer": map[string]interface{}{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": map[string]interface{}{ + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "netbanking", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233", + }, + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} + +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary registrationLinkRequest = new Dictionary(); +Dictionary customer = new Dictionary(); +customer.Add("name","Gaurav Kumar"); +customer.Add("email","gaurav.kumar@example.com"); +customer.Add("contact","9123456780"); +registrationLinkRequest.Add("customer", customer); +registrationLinkRequest.Add("type", "link"); +registrationLinkRequest.Add("amount", 0); +registrationLinkRequest.Add("currency", "INR"); +registrationLinkRequest.Add("description", "12 p.m. Meals"); +Dictionary subscriptionRegistration = new Dictionary(); +subscriptionRegistration.Add("method","emandate"); +subscriptionRegistration.Add("auth_type","netbanking"); +subscriptionRegistration.Add("max_amount",50000); +subscriptionRegistration.Add("expire_at",1609423824); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +subscriptionRegistration.Add("bank_account",bankAccount); +registrationLinkRequest.Add("subscription_registration", subscriptionRegistration); +registrationLinkRequest.Add("receipt", "Receipt No. 1"); +registrationLinkRequest.Add("email_notify", true); +registrationLinkRequest.Add("sms_notify", true); +registrationLinkRequest.Add("expire_by", 1580479824); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.Add("notes", notes); + +Invoice invoice = client.Invoice.CreateRegistrationLink(registrationLinkRequest); + +```json: Response +{ + "id": "inv_FHrY6tDtVP2dHg", + "entity": "invoice", + "receipt": "Receipt no. 25", + "invoice_number": "Receipt no. 25", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrY6tiC2y7NNN", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491063, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491063, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/DxEcNtR", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491063, + "idempotency_key": null +} +``` + +#### Emandate via Debit Card + +```cURL: Emandate via Debit Card +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "debitcard", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 0); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "12 p.m. Meals"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","emandate"); +subscriptionRegistration.put("auth_type","debitcard"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +subscriptionRegistration.put("bank_account",bankAccount); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. 1"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('first_payment_amount'=>100, 'method'=>'emandate', 'auth_type'=>'debitcard' ,'max_amount'=>'50000','expire_at'=>'1634215992','bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233')),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992, 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Tea. Earl Gray. Hot.')) ); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 100, + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + first_payment_amount: 100, + method: "emandate", + auth_type: "debitcard", + max_amount: 50000, + expire_at: 1634215992, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "11214311215411", + account_type: "savings", + ifsc_code: "HDFC0001233" + } + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + 'customer': {'name': 'Gaurav Kumar', + 'email': 'gaurav.kumar@example.com', + 'contact': 9123456780}, + 'type': 'link', + 'amount': 0, + 'currency': 'INR', + 'description': '12 p.m. Meals', + 'subscription_registration': { + 'method': 'emandate', + 'auth_type': 'debitcard', + 'expire_at': 1580480689, + 'max_amount': 50000, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 11214311215411, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0001233', + }, + }, + 'receipt': 'Receipt no. 1', + 'expire_by': 1880480689, + 'sms_notify': True, + 'email_notify': True, + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "debitcard", + "max_amount": 50000, + "expire_at": 1634215992, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt No. 5", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::SubscriptionRegistration.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer": map[string]interface{}{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": map[string]interface{}{ + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "debitcard", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233", + }, + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} + +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```json: Response +{ + "id": "inv_FHrZAOeCuB9HtK", + "entity": "invoice", + "receipt": "Receipt no. 26", + "invoice_number": "Receipt no. 26", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZAPOStKd4xS", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491123, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491123, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/RllVOmA", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491123, + "idempotency_key": null +} +``` + +#### Emandate via Aadhaar + +```cURL: Emandate via Aadhaar +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "aadhaar", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 0); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "12 p.m. Meals"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","emandate"); +subscriptionRegistration.put("auth_type","aadhaar"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +subscriptionRegistration.put("bank_account",bankAccount); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. 1"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('first_payment_amount'=>100, 'method'=>'emandate', 'auth_type'=>'aadhaar' ,'max_amount'=>'50000','expire_at'=>'1634215992','bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233')),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992, 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Tea. Earl Gray. Hot.')) ); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 100, + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + first_payment_amount: 100, + method: "emandate", + auth_type: "aadhaar", + max_amount: 50000, + expire_at: 1634215992, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "11214311215411", + account_type: "savings", + ifsc_code: "HDFC0001233" + } + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + 'customer': {'name': 'Gaurav Kumar', + 'email': 'gaurav.kumar@example.com', + 'contact': 9123456780}, + 'type': 'link', + 'amount': 0, + 'currency': 'INR', + 'description': '12 p.m. Meals', + 'subscription_registration': { + 'method': 'emandate', + 'auth_type': 'aadhaar', + 'expire_at': 1580480689, + 'max_amount': 50000, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 11214311215411, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0001233', + }, + }, + 'receipt': 'Receipt no. 1', + 'expire_by': 1880480689, + 'sms_notify': True, + 'email_notify': True, + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "aadhaar", + "max_amount": 50000, + "expire_at": 1634215992, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt No. 5", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::SubscriptionRegistration.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer": map[string]interface{}{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": map[string]interface{}{ + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "aadhaar", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233", + }, + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} + +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```json: Response +{ + "id": "inv_FHrZAOeCuB9HtK", + "entity": "invoice", + "receipt": "Receipt no. 26", + "invoice_number": "Receipt no. 26", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZAPOStKd4xS", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491123, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491123, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/RllVOmA", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491123, + "idempotency_key": null +} +``` + +#### Request Parameters + +`customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + +`subscription_registration` +: `object` Details of the authorisation payment. + + `method` _mandatory_ + : `string` The authorization method. Here, it is `emandate`. + + `auth_type` _optional_ + : `string` Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + + `first_payment_amount` _optional_ + : `integer` The amount, in paise, the customer should be auto-charged in addition to the authorisation amount. For example, `100000`. Pass a value in the `first_payment_amount` parameter if you want to auto-charge the customer the first payment immediately after mandate authorisation. The first payment amount will be debited, with a new `order_id` and corresponding `payment_id` created automatically and executed within 2 days of emandate token confirmation. + + `max_amount` _optional_ + : `integer` The maximum amount, in paise, a customer can be charged in a transaction. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` _optional_ + : `integer` The Unix timestamp indicates till when you can use the token (authorization on the payment method) to charge the customer their subsequent payments. Defaults to `40 years`. The maximum value you can set is 40 years from the current date. Any value beyond this will throw an error. + + `bank_account` + : `object` The customer's bank account details. + + `beneficiary_name` _optional_ + : `string` Name on the beneficiary. For example `Gaurav Kumar`. + +> **WARN** +> +> +> **Watch Out!** +> +> The `beneficiary_name` should be between 4 to 120 characters. +> + + `account_number` _optional_ + : `string` Customer's bank account number. For example `11214311215411`. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` _optional_ + : `string` Customer's bank IFSC. For example `HDFC0000001`. + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + +#### Path Parameters + +`id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +### Response Parameters + +`success` +: `boolean` Indicates whether the notifications were sent successfully. Possible values: + - `true`: The notifications were successfully sent via SMS, email or both. + - `false`: The notifications were not sent. + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. + +### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +## 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +Know more about [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md#fetch-emandate-registration-details). + +### 2.1. Fetch Token by Payment ID + +The following endpoint retrieves the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_1Aa00000000002" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.Fetch(paymentId); + +```json: Response +{ + "id": "pay_FHf9a7AO0iXM9I", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_FHf9OwSeyetnKC", + "invoice_id": "inv_FHf9P2hhXEti7i", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHf9aAZR9hWJkq", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595447410 +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. Here, it is `payment`. + +`amount` +: `integer` The payment amount represented in smallest unit of the currency passed. For example, `amount = 100` translates to `100` subunits, that is . + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`order_id` +: `string` The unique identifier of the order. + +`invoice_id` +: `string` The unique identifier of the invoice. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`amount_refunded` +: `integer` The amount refunded in smallest unit of the currency passed. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string` Description of the payment, if any. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `integer` Customer contact number used for the payment. + +`customer_id` +: `string` The unique identifier of the customer. + +`token_id` +: `string` The unique identifier of the token. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +### 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> This endpoint will not fetch the details of expired and unused tokens. +> + +/customers/:id/tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +Customer customer = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000002 " + +Razorpay::Customer.fetchTokens(customerId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); + +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "token_FHf94Uym9tdYFJ", + "entity": "token", + "token": "2wDPM7VAlXtjAR", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "netbanking", + "mrn": null, + "used_at": 1595447381, + "created_at": 1595447381, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 1689971140, + "dcc_enabled": false + }, + { + "id": "token_FHf9aAZR9hWJkq", + "entity": "token", + "token": "AwAwIFBmDSJ4p6", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "debitcard", + "mrn": null, + "used_at": 1595447410, + "created_at": 1595447410, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 4102444799, + "dcc_enabled": false + } + ] +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +### Response Parameters + +`entity` +: `string` The entity being created. Here, it is a `collection`. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: `object` Details related to token such as `token id` and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is `token_id`. + + `entity` + : `string` The entity being created. Here, it is a `token`. + + `token` + : `string` The token is being fetched. + + `bank` + : `string` Card issuing bank details. + + `wallet` + : `string` Provides wallet information. + + `method` + : `string` The payment method used to make the transaction. + + `card` + : `object` Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is `Visa`. + + `type` + : `string` Card type (debit or credit). In this example, it is `credit`. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `boolean` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : `object` The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + + `vpa` + : `object` The VPA details. + + `username` + : `string` The username of the VPA holder. For example, `gaurav.kumar`. + + `handle` + : `string` The VPA handle. Here it is `upi`. + + `name` + : `string` The name of the VPA holder. + + + `recurring` + : `string` This represents whether recurring is enabled for this token. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + `recurring_details` + : `object` Details of the recurring transaction. + + `status` + : `string` This represents the status of the recurring transaction. Possible values: + - `initiated` + - `confirmed` + - `rejected` + - `cancelled` + - `paused` + + `failure_reason` + : `string` This provides the reason why the recurring transaction failed. + + `auth_type` + : `string` The authorisation type details. + + `mrn` + : `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + + `used_at` + : `integer` The VPA usage timestamp. + + `created_at` + : `integer` The token creation timestamp. + + `expired_at` + : `integer` The token expiry date timestamp. + + `dcc_enabled` + : `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + +### 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + +### Response Parameters + +`deleted` +: `boolean` Indicates whether the token is deleted. Possible values: + - `true`: The token is deleted successfully. + - `false`: The token was not deleted. + +## 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +### 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000001`. + +`entity` +: `string` The entity that has been created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to pay. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `rcptid #1`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +### 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +### Response Parameters + +`razorpay_payment_id` +: `string` The unique identifier of the payment that is created. For example, `pay_1Aa00000000001`. diff --git a/llm-content/api/payments/recurring-payments/emandate/create-authorization-transaction.md b/llm-content/api/payments/recurring-payments/emandate/create-authorization-transaction.md new file mode 100644 index 00000000..42678ed4 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/emandate/create-authorization-transaction.md @@ -0,0 +1,2241 @@ +--- +title: 1. Create the Authorisation Transaction +description: Create an authorisation transaction with Emandate as a payment method. +--- + +# 1. Create the Authorisation Transaction + +You can create an authorisation transaction using [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +## 1.1. Using Razorpay APIs + +To create an authorisation transaction using Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorisation-payment). + +> **INFO** +> +> +> **Handy Tips** +> +> For the Authorisation Payment to be successful in a day (for example, 5th June), you should create an Order and the Authorisation Transaction on the same day (5th June) before 11:59 pm. +> + +### 1.1.1. Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + +### Request Parameters + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Response Parameters + +`id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + +### 1.1.2. Create an Order + +```cURL: Emandate via Netbanking +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("payment_capture", true); +orderRequest.put("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.put("method", "emandate"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("auth_type","netbanking"); +token.put("max_amount","9999900"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0000001"); +token.put("bank_account",bankAccount); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','payment_capture' => true,'method' => 'emandate','customer_id' => 'cust_1Aa00000000001','receipt' => 'Receipt No. 1','notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'),'token' => array('auth_type' => 'netbanking','max_amount' => 9999900,'expire_at' => 4102444799,'notes' => array('notes_key_1' => 'Tea, Earl Grey, Hot','notes_key_2' => 'Tea, Earl Grey… decaf.'),'bank_account' => array('beneficiary_name' => 'Gaurav Kumar','account_number' => '1121431121541121','account_type' => 'savings','ifsc_code' => 'HDFC0000001')))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + payment_capture: true, + method: "emandate", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "netbanking", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: 1121431121541121, + account_type: "savings", + ifsc_code: "HDFC0000001" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'emandate', + 'customer_id': 'cust_1Aa00000000001', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'netbanking', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "amount": 0, + "currency": "INR", + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 1121431121541121, + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token": map[string]interface{}{ + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 0); +orderRequest.Add("currency", "INR"); +orderRequest.Add("payment_capture", true); +orderRequest.Add("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.Add("method", "emandate"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); +Dictionary token = new Dictionary(); +token.Add("auth_type","netbanking"); +token.Add("max_amount","9999900"); +token.Add("expire_at","2709971120"); +Dictionary tokenNotes = new Dictionary(); +tokenNotes.Add("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.Add("notes_key_2","Tea, Earl Grey… decaf."); +token.Add("notes",tokenNotes); +orderRequest.Add("token", token); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +token.Add("bank_account",bankAccount); + +Order order = client.Order.Create(orderRequest); + +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "netbanking", + "expire_at": 4102444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 0 + } +} +``` + +```cURL: Emandate via Debit Card +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "debitcard", + "max_amount": 9999900, + "expire_at": 4102444799, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("payment_capture", true); +orderRequest.put("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.put("method", "emandate"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("auth_type","debitcard"); +token.put("max_amount","9999900"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0000001"); +token.put("bank_account",bankAccount); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','payment_capture' => true,'method' => 'emandate','customer_id' => 'cust_1Aa00000000001','receipt' => 'Receipt No. 1','notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'),'token' => array('auth_type' => 'debitcard','max_amount' => 9999900,'expire_at' => 4102444799,'notes' => array('notes_key_1' => 'Tea, Earl Grey, Hot','notes_key_2' => 'Tea, Earl Grey… decaf.'),'bank_account' => array('beneficiary_name' => 'Gaurav Kumar','account_number' => '1121431121541121','account_type' => 'savings','ifsc_code' => 'HDFC0000001')))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + payment_capture: true, + method: "emandate", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "debitcard", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: 1121431121541121, + account_type: "savings", + ifsc_code: "HDFC0000001" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'emandate', + 'customer_id': 'cust_1Aa00000000001', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'debitcard', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "amount": 0, + "currency": "INR", + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "debitcard", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 1121431121541121, + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token": map[string]interface{}{ + "auth_type": "debitcard", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "debitcard", + "expire_at": 4102444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 0 + } +} +``` + +```cURL: Emandate via Aadhaar +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "aadhaar", + "max_amount": 9999900, + "expire_at": 4102444799, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("payment_capture", true); +orderRequest.put("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.put("method", "emandate"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("auth_type","aadhaar"); +token.put("max_amount","9999900"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0000001"); +token.put("bank_account",bankAccount); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','payment_capture' => true,'method' => 'emandate','customer_id' => 'cust_1Aa00000000001','receipt' => 'Receipt No. 1','notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'),'token' => array('auth_type' => 'aadhaar','max_amount' => 9999900,'expire_at' => 4102444799,'notes' => array('notes_key_1' => 'Tea, Earl Grey, Hot','notes_key_2' => 'Tea, Earl Grey… decaf.'),'bank_account' => array('beneficiary_name' => 'Gaurav Kumar','account_number' => '1121431121541121','account_type' => 'savings','ifsc_code' => 'HDFC0000001')))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + payment_capture: true, + method: "emandate", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "aadhaar", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: 1121431121541121, + account_type: "savings", + ifsc_code: "HDFC0000001" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'emandate', + 'payment_capture': True, + 'customer_id': 'cust_1Aa00000000001', + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'aadhaar', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "amount": 0, + "currency": "INR", + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "aadhaar", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 1121431121541121, + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token": map[string]interface{}{ + "auth_type": "aadhaar", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "aadhaar", + "expire_at": 4102444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 0 + } +} +``` + +> **INFO** +> +> +> **Authorisation transaction + auto-charge first payment** +> +> You can register a customer's mandate **and** charge them the first recurring payment as part of the same transaction. Know more about [charge first payment automatically after Emandate registration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/auto-debit.md). +> + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For emandate, the amount should be `0`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether tha payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `emandate`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer to be charged. For example, `cust_D0cs04OIpPPU1F`. + +`receipt` _optional_ +: `string` A user-entered unique identifier of the order. For example, `rcptid #1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: Details related to the authorisation such as max amount and bank account information. + +`auth_type` _optional_ + : `string` Emandate type used to make the authorisation payment. Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + + `max_amount` _optional_ + : `integer` The maximum amount in paise a customer can be charged in a transaction. Know about the [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` _optional_ + : `integer` The Unix timestamp to indicate till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. Defaults to 40 years. The maximum value you can set is 40 years from the current date. Any value beyond this will throw an error. + + `notes`_optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `bank_account` + : Customer's bank account details that should be pre-filled on the checkout. + + `account_number` _optional_ + : `string` Customer's bank account number. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` _optional_ + : `string` Customer's bank IFSC. For example `UTIB0000001`. + + `beneficiary_name` _optional_ + : `string` Name of the beneficiary. For example, `Gaurav Kumar`. + +> **WARN** +> +> +> **Watch Out!** +> +> The `beneficiary_name` should be between 4 to 120 characters. +> + +### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000001`. + +`entity` +: `string` The entity that has been created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. For emandate, the amount should be `0`. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to pay. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `rcptid #1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`token` +: Details related to the authorisation such as max amount and bank account information. + + `auth_type` + : `string` Emandate type used to make the authorisation payment. Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + + `max_amount` + : `integer` The maximum amount in paise a customer can be charged in a transaction. Know about the [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` + : `integer` The Unix timestamp to indicate till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. The default value is 10 years for `emandate`. This value can range from the current date to 31-12-2099 (`4102444799`). + + `notes` + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`bank_account` +: Customer's bank account details that should be pre-filled on the checkout. + + `account_number` + : `string` Customer's bank account number. + + `account_type` + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` + : `string` Customer's bank IFSC. For example `UTIB0000001`. + + `beneficiary_name` + : `string` Name of the beneficiary. For example, `Gaurav Kumar`. + +### 1.1.3. Create an Authorisation Payment + +Create a payment checkout form for customers to make Authorisation Transaction and register their mandate. You can use the Handler Function or Callback URL. + +Handler Function | Callback URL +--- +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. | When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. + +> **WARN** +> +> +> +> **Watch Out!** +> +> - The callback URL is not supported for recurring payments created using the registration link. +> - While handling the first time authorisation payment response, consume the `error_reason` field with value `upi_dummy_payment` and `error_description` field with value `Payment was a dummy payment for one time mandate registration.` to identify successful mandate registration. The parent `error_code` will be `BAD_REQUEST_ERROR`. +> + +```html: Checkout with handler functions + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "handler": function (response) { + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature); + }, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +```html: Manual checkout with Callback URL + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +``` + +### Additional Checkout Fields + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +## 1.2. Using a Registration Link + +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the [API](#121-create-a-registration-link) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> + +- When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. +- A registration link should always have an order amount (in paise) the customer will be charged when making the authorisation payment. This amount should be `0` in the case of Emandate. + +> **INFO** +> +> +> **Handy Tips** +> +> You can [use Webhooks to get notifications about successful payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) against a registration link. +> + +### 1.2.1. Create a Registration Link + +The following endpoint creates a registration link. + +/subscription_registration/auth_links + +```cURL: Emandate via Netbanking +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "method": "emandate", + "auth_type": "netbanking", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 0); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "12 p.m. Meals"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","emandate"); +subscriptionRegistration.put("auth_type","netbanking"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +subscriptionRegistration.put("bank_account",bankAccount); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. 25"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('method'=>'emandate','max_amount'=>'500','expire_at'=>'1634215992'),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992,'notes' => array('note_key 1' => 'Beam me up Scotty','note_key 2' => 'Tea. Earl Gray. Hot.'))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 0, + currency: "INR", + description: "12 p.m. Meals", + subscription_registration: { + method: "emandate", + auth_type: "netbanking", + expire_at: 1580480689, + max_amount: 50000, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: 11214311215411, + account_type: "savings", + ifsc_code: "HDFC0001233" + } + }, + receipt: "Receipt no. 1", + expire_by: 1880480689, + sms_notify: true, + email_notify: true, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + 'customer': {'name': 'Gaurav Kumar', + 'email': 'gaurav.kumar@example.com', + 'contact': 9123456780}, + 'type': 'link', + 'amount': 0, + 'currency': 'INR', + 'description': '12 p.m. Meals', + 'subscription_registration': { + 'method': 'emandate', + 'auth_type': 'netbanking', + 'expire_at': 1580480689, + 'max_amount': 50000, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 11214311215411, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0001233', + }, + }, + 'receipt': 'Receipt no. 1', + 'expire_by': 1880480689, + 'sms_notify': True, + 'email_notify': True, + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "method": "emandate", + "auth_type": "netbanking", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. #12", + "expire_by": 1880480689, + "sms_notify": 1, + "email_notify": 1, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} + +Razorpay::SubscriptionRegistration.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer": map[string]interface{}{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": map[string]interface{}{ + "method": "emandate", + "auth_type": "netbanking", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233", + }, + }, + "receipt": "Receipt no. 25", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} + +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary registrationLinkRequest = new Dictionary(); +Dictionary customer = new Dictionary(); +customer.Add("name","Gaurav Kumar"); +customer.Add("email","gaurav.kumar@example.com"); +customer.Add("contact","9123456780"); +registrationLinkRequest.Add("customer", customer); +registrationLinkRequest.Add("type", "link"); +registrationLinkRequest.Add("amount", 0); +registrationLinkRequest.Add("currency", "INR"); +registrationLinkRequest.Add("description", "12 p.m. Meals"); +Dictionary subscriptionRegistration = new Dictionary(); +subscriptionRegistration.Add("method","emandate"); +subscriptionRegistration.Add("auth_type","netbanking"); +subscriptionRegistration.Add("max_amount",50000); +subscriptionRegistration.Add("expire_at",1609423824); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +subscriptionRegistration.Add("bank_account",bankAccount); +registrationLinkRequest.Add("subscription_registration", subscriptionRegistration); +registrationLinkRequest.Add("receipt", "Receipt No. 1"); +registrationLinkRequest.Add("email_notify", true); +registrationLinkRequest.Add("sms_notify", true); +registrationLinkRequest.Add("expire_by", 1580479824); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.Add("notes", notes); + +Invoice invoice = client.Invoice.CreateRegistrationLink(registrationLinkRequest); + +```json: Response +{ + "id": "inv_FHrY6tDtVP2dHg", + "entity": "invoice", + "receipt": "Receipt no. 25", + "invoice_number": "Receipt no. 25", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrY6tiC2y7NNN", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491063, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491063, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/DxEcNtR", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491063, + "idempotency_key": null +} +``` + +```cURL: Emandate via Debit Card +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "method": "emandate", + "auth_type": "debitcard", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrZAOeCuB9HtK", + "entity": "invoice", + "receipt": "Receipt no. 26", + "invoice_number": "Receipt no. 26", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZAPOStKd4xS", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491123, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491123, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/RllVOmA", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491123, + "idempotency_key": null +} +``` + +```cURL: Emandate via Aadhaar +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "method": "emandate", + "auth_type": "aadhaar", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrZAOeCuB9HtK", + "entity": "invoice", + "receipt": "Receipt no. 26", + "invoice_number": "Receipt no. 26", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZAPOStKd4xS", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491123, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491123, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/RllVOmA", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491123, + "idempotency_key": null +} +``` + +### Request Parameters + +`customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + +`subscription_registration` +: Details of the authorisation payment. + + `method` _mandatory_ + : `string` The authorization method. Here, it is `emandate`. + + `auth_type` _optional_ + : `string` Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + +`max_amount` _optional_ + : `integer` The maximum amount, in paise, a customer can be charged in a transaction. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` _optional_ + : `integer` The Unix timestamp indicates till when you can use the token (authorization on the payment method) to charge the customer their subsequent payments. Defaults to `40 years`. The maximum value you can set is 40 years from the current date. Any value beyond this will throw an error. + + `bank_account` + : The customer's bank account details. + + `beneficiary_name` _optional_ + : `string` Name on the beneficiary. For example `Gaurav Kumar`. + +> **WARN** +> +> +> **Watch Out!** +> +> The `beneficiary_name` should be between 4 to 120 characters. +> + + `account_number` _optional_ + : `string` Customer's bank account number. For example `11214311215411`. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` _optional_ + : `string` Customer's bank IFSC. For example `HDFC0000001`. + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + +### Path Parameters + +`id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +### Response Parameters + +`success` +: `boolean` Indicates whether the notifications were sent successfully. Possible values: + - `true`: The notifications were successfully sent via SMS, email or both. + - `false`: The notifications were not sent. + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. + +### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. diff --git a/llm-content/api/payments/recurring-payments/emandate/create-subsequent-payments.md b/llm-content/api/payments/recurring-payments/emandate/create-subsequent-payments.md new file mode 100644 index 00000000..68eda06d --- /dev/null +++ b/llm-content/api/payments/recurring-payments/emandate/create-subsequent-payments.md @@ -0,0 +1,268 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorized. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000001`. + +`entity` +: `string` The entity that has been created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to pay. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `rcptid #1`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +## 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +> **INFO** +> +> +> **Handy Tips** +> +> If the first attempt fails, you can retry after getting the confirmation or rejection of the last payment, as it may take more than 24 hours. +> +> For example: +> - If the charge fails on 1 November 2023 and you receive the confirmation, you can retry the attempt on 4 November 2023. +> - If the charge fails on 1 November 2023 and you receive the confirmation on 2 November 2023, you can retry the attempt on 5 November 2023. +> + +/payments/create/recurring + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +### Response Parameters + +`razorpay_payment_id` +: `string` The unique identifier of the payment that is created. For example, `pay_1Aa00000000001`. + +> **WARN** +> +> +> **Watch Out!** +> +> You will receive `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` as a response when you create a Recurring Payment in [Test mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md). +> diff --git a/llm-content/api/payments/recurring-payments/emandate/tokens.md b/llm-content/api/payments/recurring-payments/emandate/tokens.md new file mode 100644 index 00000000..54b844e9 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/emandate/tokens.md @@ -0,0 +1,566 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +Know more about [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md#fetch-emandate-registration-details). + +## 2.1. Fetch Token by Payment ID + +The following endpoint retrieves the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_1Aa00000000002" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.Fetch(paymentId); + +```json: Response +{ + "id": "pay_FHf9a7AO0iXM9I", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_FHf9OwSeyetnKC", + "invoice_id": "inv_FHf9P2hhXEti7i", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHf9aAZR9hWJkq", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595447410 +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. Here, it is `payment`. + +`amount` +: `integer` The payment amount represented in smallest unit of the currency passed. For example, `amount = 100` translates to `100` subunits, that is . + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`order_id` +: `string` The unique identifier of the order. + +`invoice_id` +: `string` The unique identifier of the invoice. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`amount_refunded` +: `integer` The amount refunded in smallest unit of the currency passed. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string` Description of the payment, if any. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `integer` Customer contact number used for the payment. + +`customer_id` +: `string` The unique identifier of the customer. + +`token_id` +: `string` The unique identifier of the token. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +## 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> This endpoint will not fetch the details of expired and unused tokens. +> + +/customers/:id/tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +Customer customer = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000002 " + +Razorpay::Customer.fetchTokens(customerId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); + +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "token_FHf94Uym9tdYFJ", + "entity": "token", + "token": "2wDPM7VAlXtjAR", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "netbanking", + "mrn": null, + "used_at": 1595447381, + "created_at": 1595447381, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 1689971140, + "dcc_enabled": false + }, + { + "id": "token_FHf9aAZR9hWJkq", + "entity": "token", + "token": "AwAwIFBmDSJ4p6", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "debitcard", + "mrn": null, + "used_at": 1595447410, + "created_at": 1595447410, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 4102444799, + "dcc_enabled": false + } + ] +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +### Response Parameters + +`entity` +: `string` The entity being created. Here, it is a `collection`. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: `object` Details related to token such as `token id` and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is `token_id`. + + `entity` + : `string` The entity being created. Here, it is a `token`. + + `token` + : `string` The token is being fetched. + + `bank` + : `string` Card issuing bank details. + + `wallet` + : `string` Provides wallet information. + + `method` + : `string` The payment method used to make the transaction. + + `card` + : `object` Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is `Visa`. + + `type` + : `string` Card type (debit or credit). In this example, it is `credit`. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `boolean` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : `object` The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + + `vpa` + : `object` The VPA details. + + `username` + : `string` The username of the VPA holder. For example, `gaurav.kumar`. + + `handle` + : `string` The VPA handle. Here it is `upi`. + + `name` + : `string` The name of the VPA holder. + + + `recurring` + : `string` This represents whether recurring is enabled for this token. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + `recurring_details` + : `object` Details of the recurring transaction. + + `status` + : `string` This represents the status of the recurring transaction. Possible values: + - `initiated` + - `confirmed` + - `rejected` + - `cancelled` + - `paused` + + `failure_reason` + : `string` This provides the reason why the recurring transaction failed. + + `auth_type` + : `string` The authorisation type details. + + `mrn` + : `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + + `used_at` + : `integer` The VPA usage timestamp. + + `created_at` + : `integer` The token creation timestamp. + + `expired_at` + : `integer` The token expiry date timestamp. + + `dcc_enabled` + : `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + +## 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + +### Response Parameters + +`deleted` +: `boolean` Indicates whether the token is deleted. Possible values: + - `true`: The token is deleted successfully. + - `false`: The token was not deleted. diff --git a/llm-content/api/payments/recurring-payments/paper-nach/auto-debit.md b/llm-content/api/payments/recurring-payments/paper-nach/auto-debit.md new file mode 100644 index 00000000..d4ae0d22 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/paper-nach/auto-debit.md @@ -0,0 +1,2819 @@ +--- +title: Charge First Payment Automatically after NACH Registration +description: Register a customer's mandate AND charge them the first recurring payment as part of the same transaction via paper NACH. +--- + +# Charge First Payment Automatically after NACH Registration + +You can register a customer's mandate and charge them the first recurring payment as part of the same transaction. For this you have to pass the `first_payment_amount` parameter while creating the order. + +The flow to complete an authorisation transaction using paper NACH differs from the other payment method's flow. +1. Create a customer. +2. Create an order by passing the `customer_id` and the method as `nach`. Razorpay generates a NACH form with the customer information pre-filled and ready to sign. +3. The customer can get the form in one of the following ways to sign it: + - You can download the form from the Dashboard and send it to the customer. + - A customer can download the form from the Hosted page (in the case of registration links). +4. The signed form can be uploaded in one of the following ways: + - Using the Standard Checkout page. + - Hosted page (in the case of registration links). + - The customer can send you the form and you can upload the form for the customer. The acceptable image formats and size are: + - jpeg + - jpg + - png + - Maximum accepted size is 6 MB. + +Once the details are validated, the authorisation transaction is completed and a token is generated. You can charge your customer as per your business model after the token status changes to `confirmed`. + +## 1. Create an Authorisation Transaction + +You can create an authorisation transaction: + +- Using the [Razorpay Standard Checkout](#11-using-razorpay-standard-checkout). +- Using a [Registration Link](#12-using-a-registration-link). + +### 1.1. Using Razorpay Standard Checkout + +To create an authorisation transaction using the Razorpay Standard Checkout, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay Standard Checkout](#113-create-an-authorisation-payment). + +### 1.1.1. Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + +#### Request Parameters + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + +### 1.1.2. Create an Order + +You can use the [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md) API to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":0, + "currency":"INR", + "method":"nach", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token":{ + "first_payment_amount": 10000, + "auth_type":"physical", + "max_amount":10000000, + "expire_at":1580480689, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account":{ + "account_number":"11214311215411", + "ifsc_code":"HDFC0000001", + "beneficiary_name":"Gaurav Kumar", + "account_type":"savings" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "description":"Paper NACH Gaurav Kumar" + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.put("method", "nach"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("first_payment_amount",100); +token.put("auth_type","physical"); +token.put("max_amount","10000000"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +token.put("bank_account",bankAccount); +JSONObject nach = new JSONObject(); +nach.put("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.put("form_reference2","Method Paper NACH"); +nach.put("description","Paper NACH Gaurav Kumar"); +token.put("nach",nach); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => 'INR', 'method'=>'nach', 'customer_id'=>$customerId, 'receipt'=>'Receipt No. 5', 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Tea. Earl Gray. Hot.'), 'token'=>array('first_payment_amount'=>10000, 'auth_type'=>'physical' ,'max_amount'=>'50000','expire_at'=>'1634215992', 'notes'=>array('note_key 1'=> 'Tea, Earl Grey… decaf.','note_key 2'=> 'Tea. Earl Gray. Hot.'), 'bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233'), 'nach'=> array('form_reference1'=> 'Recurring Payment for Gaurav Kumar','form_reference2'=> 'Method Paper NACH', 'description'=>'Paper NACH Gaurav Kumar')))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 100, + currency: "INR", + method: "nach", + receipt: "Receipt No. 5", + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + token: { + first_payment_amount: 10000, + auth_type: "physical", + max_amount: 50000, + expire_at: 1634215992, + notes: { + "note_key 1": "Tea, Earl Grey… decaf.", + "note_key 2": "Tea. Earl Gray. Hot." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "11214311215411", + account_type: "savings", + ifsc_code: "HDFC0001233" + }, + nach: { + form_reference1: "Recurring Payment for Gaurav Kumar", + form_reference2: "Method Paper NACH", + description: "Paper NACH Gaurav Kumar" + } + } +}) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount":100, + "currency":"INR", + "method":"nach", + "receipt":"Receipt No. 5", + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + }, + "token":{ + "first_payment_amount":10000, + "auth_type":"physical", + "max_amount":50000, + "expire_at":1634215992, + "notes":{ + "note_key 1":"Tea, Earl Grey… decaf.", + "note_key 2":"Tea. Earl Gray. Hot." + }, + "bank_account":{ + "beneficiary_name":"Gaurav Kumar", + "account_number":11214311215411, + "account_type":"savings", + "ifsc_code":"HDFC0001233" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "description":"Paper NACH Gaurav Kumar" + } + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "method": "nach", + "receipt": "Receipt No. 5", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "token": { + "first_payment_amount": 10000, + "auth_type": "physical", + "max_amount": 50000, + "expire_at": 1634215992, + "notes": { + "note_key 1": "Tea, Earl Grey… decaf.", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + }, + "nach": { + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "description": "Paper NACH Gaurav Kumar" + } + } +} +Razorpay.Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount":0, + "currency":"INR", + "method":"nach", + "customer_id": "cust_1Aa00000000001", + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token":map[string]interface{}{ + "first_payment_amount": 10000, + "auth_type":"physical", + "max_amount":10000000, + "expire_at":2709971120, + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account":map[string]interface{}{ + "account_number":"11214311215411", + "ifsc_code":"HDFC0000001", + "beneficiary_name":"Gaurav Kumar", + "account_type":"savings", + }, + "nach":map[string]interface{}{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "description":"Paper NACH Gaurav Kumar", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 0); +orderRequest.Add("currency", "INR"); +orderRequest.Add("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.Add("method", "nach"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); +Dictionary token = new Dictionary(); +token.Add("auth_type","physical"); +token.Add("max_amount","10000000"); +token.Add("expire_at","2709971120"); +Dictionary tokenNotes = new Dictionary(); +tokenNotes.Add("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.Add("notes_key_2","Tea, Earl Grey… decaf."); +token.Add("notes",tokenNotes); +orderRequest.Add("token", token); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +token.Add("bank_account",bankAccount); +Dictionary nach = new Dictionary(); +nach.Add("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.Add("form_reference2","Method Paper NACH"); +nach.Add("description","Paper NACH Gaurav Kumar"); +token.Add("nach",nach); + +Order order = client.Order.Create(orderRequest); + +```json: Response +{ + "id":"order_1Aa00000000001", + "entity":"order", + "amount":0, + "amount_paid":0, + "amount_due":0, + "currency":"INR", + "receipt":"Receipt No. 1", + "offer_id":null, + "offers":{ + "entity":"collection", + "count":0, + "items":[] + }, + "status":"created", + "attempts":0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at":1579775420, + "token":{ + "method":"nach", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status":null, + "failure_reason":null, + "currency":"INR", + "max_amount":10000000, + "auth_type":"physical", + "expire_at":1580480689, + "nach":{ + "create_form":true, + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "prefilled_form":"https://rzp.io/i/bitw", + "upload_form_url":"https://rzp.io/i/gts", + "description":"Paper NACH Gaurav Kumar" + }, + "bank_account":{ + "ifsc":"HDFC0000001", + "bank_name":"HDFC Bank", + "name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "beneficiary_email":"gaurav.kumar@example.com", + "beneficiary_mobile":"9876543210" + }, + "first_payment_amount":10000 + } +} +``` + +> **INFO** +> +> +> **Download and Upload the Pre-filled NACH Form** +> +> Once the order is created, the generated pre-filled form must be downloaded, signed by your customer and uploaded back to Razorpay to complete the transaction. + +> +> You receive the following parameters as part of the response: +> +> `prefilled_form` +> : The link from where you can download the pre-filled NACH form. +> +> `upload_form_url` +> : The link where the NACH form should be uploaded once it is signed by the customer. +> + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For Paper NACH, the amount has to be `0`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`method` _mandatory_ +: `string` The authorisation method. In this case the value will be `nach`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer, who is to be charged. For example, `cust_D0cs04OIpPPU1F`. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `rcptid #1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: Details related to the authorisation transaction such as max amount and bank account information. Pass a value in the `first_payment_amount` parameter if you want to auto-charge the customer the first payment immediately after authorization. + + `first_payment_amount` _optional_ + : `integer` The amount, in paise, that should be auto-charged in addition to the authorization amount. For example, `100000`. + + `auth_type` _mandatory_ + : `string` The payment method used to make the authorisation payment. Here, it is `physical`. + + `bank_account` + : The customer's bank account details that is printed on the NACH form. + + `account_number`_mandatory_ + : `string` The customer's bank account number. For example `11214311215411`. + + `ifsc_code`_mandatory_ + : `string` The customer's bank IFSC. For example `UTIB0000001`. + + `beneficiary_name`_mandatory_ + : `string` The customer's name. For example, `Gaurav Kumar`. + + `account_type` _optional_ + : `string` The customer's bank account type. Possible values: + - `savings` (default) + - `current` + - `cc` (Cash Credit) + - `nre` (SB-NRE) + - `nro` (SB-NRO) + + `max_amount` _optional_ + : `integer` Use to set the maximum amount per debit request. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/faqs.md#3-is-there-a-limit-on-the-debit). + + `expire_at` _optional_ + : `integer` The Unix timestamp that specifies when the registration link should expire. The value can range from the current date to 01-19-2038 (`2147483647`). + + `nach` + : Additional information to be printed on the NACH form that your customer will sign. + + `form_reference1` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `form_reference2` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `description` _optional_ + : `string` A user-entered description that appears on the hosted page. For example, `Form for Gaurav Kumar.` + + `notes`_optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000001`. + +`entity` +: `string` The entity that has been created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. For emandate, the amount should be `0`. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to pay. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `rcptid #1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`token` +: Details related to the authorisation such as max amount and bank account information. + + `auth_type` + : `string` Emandate type used to make the authorisation payment. Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + + `max_amount` + : `integer` The maximum amount in paise a customer can be charged in a transaction. Know about the [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` + : `integer` The Unix timestamp to indicate till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. The default value is 10 years for `emandate`. This value can range from the current date to 31-12-2099 (`4102444799`). + + `notes` + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`bank_account` +: Customer's bank account details that should be pre-filled on the checkout. + + `account_number` + : `string` Customer's bank account number. + + `account_type` + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` + : `string` Customer's bank IFSC. For example `UTIB0000001`. + + `beneficiary_name` + : `string` Name of the beneficiary. For example, `Gaurav Kumar`. + +> **INFO** +> +> +> **Download and Upload the Pre-filled NACH Form** +> +> Once the order is created, the pre-filled form must be downloaded, signed by your customer and uploaded back to Razorpay to complete the transaction. +> +> You receive the following parameters as part of the response: +> +> `prefilled_form` +> : The link from where you can download the pre-filled NACH form. +> +> `upload_form_url` +> : The link where the NACH form should be uploaded once it is signed by the customer. +> +> **Authorisation transaction + auto-charge first payment**: +> + +> You can register a customer's mandate **and** charge them the first recurring payment as part of the same transaction. Refer to the [Paper NACH section under Registration and Charge First Payment Together](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/auto-debit.md#1-create-an-authorization-transaction) for more information. +> + +You can create a payment against the `order_id` after it is created. + +### 1.1.3. Create an Authorisation Payment + +You should create an authorisation payment after you create an order. + +To create an authorisation payment: + +1. Download the Paper NACH form and send it to the customers. +2. Ask the customers to fill the form and either [Upload via Checkout](#1131-upload-the-nach-file-via-checkout) or send it to you to upload the form using the [create NACH File API](#1132-upload-the-nach-file-via-api). + +#### 1.1.3.1 Upload the NACH File via Checkout + +Create a payment checkout form for customers to upload the NACH form and make the Authorisation Transaction. You can use the Handler Function or Callback URL. + +**Handler Function** | **Callback URL** +--- +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout form. You need to collect these and send them to your server. | When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. + +> **WARN** +> +> +> **Watch Out!** +> +> The Callback URL is not supported for Recurring Payments created using the registration link. +> + +```html: Checkout with handler functions + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "handler": function (response) { + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature); + }, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +```html: Manual checkout with Callback URL + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +``` + +#### Additional Checkout Fields + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +`recurring` _mandatory_ +: `boolean` Determines whether the recurring payment is enabled or not. Possible values: + - `1`: Recurring payment is enabled. + - `0`: Recurring payment is not enabled. + +#### 1.1.3.2 Upload the NACH File via API + +You can upload the signed NACH forms that are collected from your customers using the create NACH File API, . Razorpay's OCR-enabled NACH engine submits the form to NPCI on successful verification and you will receive a success or a failure response. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +Use the following endpoint to upload the signed Paper NACH form via the API. + +/payments/create/nach/file + +Use the following API to upload the NACH file sent by the customer. + +```cURL: Request +curl -u : \ +-X POST 'https://api.razorpay.com/v1/payments/create/nach/file' \ +-H "Content-Type: multipart/form-data" \ +-F 'order_id=order_FoLdZrq6QGKUWg' \ +-F 'recurring=1' \ +-F 'file=@/Users/your_name/sample_uploaded.jpeg' // file path +``` + +```json: Successful Response +{ + "razorpay_payment_id": "pay_FjDn43bvssCqEM", + "razorpay_order_id": "order_FjDdQ6a0GluJ2c", + "razorpay_signature": "f13775ea8a91e9bf229b9fdba3ad783f7ff2bdbce1c35e87a69ae7418808da04" +} +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"file size exceeds limit", + "field":null, + "source":"customer", + "step":"form_upload", + "reason":"file size exceeds limit", + "metadata":{ + "payment_id":null, + "order_id":"order_DBJKIP31Y4jl8" + } + } +} +``` + +### Error Reasons + +The below table lists the errors that may appear while uploading the NACH file, the reason, explanation and next steps: + +Reason | Explanation | Next Steps +--- +`unknown_file_type` | The file type of the image is not supported. | Upload an image that is in either of `.jpeg`, `.jpg` or `.png` formats. +--- +`file_size_exceeds_limit` | The file size exceeds the permissible limits. | Upload an image of smaller size. +--- +`image_not_clear` | The uploaded image is not clear. This can either be due to poor resolution or because part of the image is cropped. | Upload an image with better quality without any cropping of the form. +--- +`form_mismatch` | The ID of the uploaded form does not match with that in our records. | Check that the form is uploaded against the correct order ID. +--- +`form_signature_missing` | The signature of the customer is either missing or could not be detected. | Check that the customer has signed in the appropriate box and that the image uploaded is clear. For current account, a company stamp may also be required. +--- +`form_data_mismatch` | One or more of the fields on the NACH form do not match with that in our records. | Check that the image is clear and that the data has not been tampered with before uploading again. +--- +`form_status_pending` | A form against this order is pending action on the destination bank. A new form cannot be submitted till a status is received. | Wait for an update from the destination bank on the approval/rejection of the mandate. + +### 1.2. Using a Registration Link + +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the [API](#121-create-a-registration-link) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> + +- When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. +- A registration link should always have an order amount (in paise) the customer will be charged when making the authorisation payment. This amount should be `0` in the case of Paper NACH. + +> **INFO** +> +> +> **Handy Tips** +> +> You can [use Webhooks to get notifications about successful payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) against a registration link. +> + +### 1.2.1. Create a Registration Link + +The following endpoint creates a registration link for recurring payments. + +/subscription_registration/auth_links + +```cURL: Curl +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780" + }, + "amount":0, + "currency":"INR", + "type":"link", + "description":"12 p.m. Meals", + "subscription_registration":{ + "method":"nach", + "auth_type":"physical", + "bank_account":{ + "beneficiary_name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "ifsc_code":"HDFC0001233" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH" + }, + "expire_at":1947483647, + "max_amount":50000 + }, + "receipt":"Receipt No. 1", + "sms_notify":true, + "email_notify":true, + "expire_by":1647483647, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 0); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "12 p.m. Meals"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","nach"); +subscriptionRegistration.put("auth_type","physical"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +JSONObject nach = new JSONObject(); +nach.put("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.put("form_reference2","Method Paper NACH"); +subscriptionRegistration.put("bank_account",bankAccount); +subscriptionRegistration.put("nach",nach); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. #27"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'amount'=>100, 'type'=>'link','currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('first_payment_amount'=>100, 'method'=>'nach', 'auth_type'=>'physical' ,'max_amount'=>'50000','expire_at'=>'1634215992','bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233'), 'nach'=> array('form_reference1'=> 'Recurring Payment for Gaurav Kumar','form_reference2'=> 'Method Paper NACH')),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992, 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Tea. Earl Gray. Hot.')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + amount: 100, + type: "link", + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + first_payment_amount: 100, + method: "nach", + auth_type: "physical", + max_amount: 50000, + expire_at: 1634215992, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "11214311215411", + account_type: "savings", + ifsc_code: "HDFC0001233" + }, + nach: { + form_reference1: "Recurring Payment for Gaurav Kumar", + form_reference2: "Method Paper NACH" + } + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":9123456780 + }, + "amount":100, + "type":"link", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":{ + "first_payment_amount":100, + "method":"nach", + "auth_type":"physical", + "max_amount":50000, + "expire_at":1634215992, + "bank_account":{ + "beneficiary_name":"Gaurav Kumar", + "account_number":11214311215411, + "account_type":"savings", + "ifsc_code":"HDFC0001233" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH" + } + }, + "receipt":"Receipt No. 5", + "email_notify": True, + "sms_notify":True, + "expire_by":1634215992, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "amount": 100, + "type": "link", + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "first_payment_amount": 100, + "method": "nach", + "auth_type": "physical", + "max_amount": 50000, + "expire_at": 1634215992, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + }, + "nach": { + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH" + } + }, + "receipt": "Receipt No. 27", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::SubscriptionRegistration.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer":map[string]interface{}{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + }, + "amount":0, + "currency":"INR", + "type":"link", + "description":"12 p.m. Meals", + "subscription_registration":map[string]interface{}{ + "method":"nach", + "auth_type":"physical", + "bank_account":map[string]interface{}{ + "beneficiary_name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "ifsc_code":"HDFC0001233", + }, + "nach":map[string]interface{}{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + }, + "expire_at":1947483647, + "max_amount":50000, + }, + "receipt":"Receipt No. 1", + "sms_notify":true, + "email_notify":true, + "expire_by":1647483647, + "notes":map[string]interface{}{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot.", + }, +} + +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary registrationLinkRequest = new Dictionary(); +Dictionary customer = new Dictionary(); +customer.Add("name","Gaurav Kumar"); +customer.Add("email","gaurav.kumar@example.com"); +customer.Add("contact","9123456780"); +registrationLinkRequest.Add("customer", customer); +registrationLinkRequest.Add("type", "link"); +registrationLinkRequest.Add("amount", 0); +registrationLinkRequest.Add("currency", "INR"); +registrationLinkRequest.Add("description", "12 p.m. Meals"); +Dictionary subscriptionRegistration = new Dictionary(); +subscriptionRegistration.Add("method","nach"); +subscriptionRegistration.Add("auth_type","physical"); +subscriptionRegistration.Add("max_amount",50000); +subscriptionRegistration.Add("expire_at",1609423824); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +Dictionary nach = new Dictionary(); +nach.Add("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.Add("form_reference2","Method Paper NACH"); +subscriptionRegistration.Add("bank_account",bankAccount); +subscriptionRegistration.Add("nach",nach); +registrationLinkRequest.Add("subscription_registration", subscriptionRegistration); +registrationLinkRequest.Add("receipt", "Receipt No. #111"); +registrationLinkRequest.Add("email_notify", true); +registrationLinkRequest.Add("sms_notify", true); +registrationLinkRequest.Add("expire_by", 1580479824); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.Add("notes", notes); + +Invoice invoice = client.Invoice.CreateRegistrationLink(registrationLinkRequest); + +```json: Response +{ + "id": "inv_FHrZiAubEzDdaq", + "entity": "invoice", + "receipt": "Receipt No. 27", + "invoice_number": "Receipt No. 27", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZiBOkWHZPOp", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1647483647, + "issued_at": 1595491154, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491154, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "12 p.m. Meals", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/bzDYbNg", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491154, + "idempotency_key": null, + "token": { + "method": "nach", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 50000, + "auth_type": "physical", + "expire_at": 1947483647, + "nach": { + "create_form": true, + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "prefilled_form": "https://rzp.io/i/exdIzYN", + "upload_form_url": "https://rzp.io/i/bzDYbNg", + "description": "12 p.m. Meals" + }, + "bank_account": { + "ifsc": "HDFC0001233", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9123456780" + }, + "first_payment_amount": 0 + }, + "nach_form_url": "https://rzp.io/i/exdIzYN" +} +``` + +> **INFO** +> +> +> **Download and Upload the Pre-filled NACH Form** +> +> Once the registration link is created, the customer should complete these steps: +> 1. Download the pre-filled form using the Download NACH Form option on the Razorpay hosted page. +> 2. Sign the form. +> 3. Upload the signed form using the Upload NACH Form option on the Razorpay hosted page. +> + +#### Request Parameters + +`customer` +: Details of the customer to whom the registration link will be sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `string` Customer's phone number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, only `INR` is supported. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. For example, `12:30 p.m. Thali meals (Gaurav Kumar)`. + +`subscription_registration` +: Details of the authorisation payment. + + `first_payment_amount` _optional_ + : `integer` The amount, in paise, the customer should be auto-charged in addition to the authorization amount. For example, `100000`. + + `method` _mandatory_ + : `string` The NACH type used to make the authorisation payment. Here, it is `physical`. + + `auth_type` _mandatory_ + : `string` The authorization method used to make the authorisation transaction. Here, it is `nach`. + + `bank_account` + : The customer's bank account details. + + `beneficiary_name` _mandatory_ + : `string` The name on the beneficiary. For example, `Gaurav Kumar`. + + `account_number` _mandatory_ + : `integer` The customer's bank account number. For example, `11214311215411`. + + `account_type` _mandatory_ + : `string` The customer's bank account type. Possible values: + - `savings` + - `current` + + `ifsc_code` _mandatory_ + : `string` The customer's bank IFSC. For example, `HDFC0000001`. + + `max_amount` _optional_ + : `integer` Use to set the maximum amount, in paise, per debit request. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/faqs.md). + + `expire_at` _optional_ + : `integer` The Unix timestamp till when you can use the token (authorization on the payment method) to charge the customer subsequent payments. The default value is 10 years for `emandate`. This value can range from the current date to 31-12-2099 (`4101580799`). + + `nach` + : Additional information to be printed on the NACH form that your customer will sign. + + `form_reference1` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `form_reference2` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `description` _optional_ + : `string` A user-entered description that appears on the hosted page. For example, `Form for Gaurav Kumar.` + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Can have the following values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Can have the following values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The timestamp, in Unix, till when the registration link should be available to the customer to make the authorisation transaction. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + +#### Path Parameters + +`id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +#### Response Parameters + +`success` +: `boolean` Indicates whether the notifications were sent successfully. Possible values: + - `true`: The notifications were successfully sent via SMS, email or both. + - `false`: The notifications were not sent. + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +```cURL: Curl +curl -u : +-X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String invoiceId = "inv_1Aa00000000001"; + +Invoice invoice = razorpay.invoices.cancel(invoiceId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->invoice->fetch($invoiceId)->cancel(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.invoices.cancel(invoiceId); +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.invoice.cancel(invoiceId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +invoiceId = "inv_JDdNb4xdf4gxQ7" + +Razorpay::Invoice.cancel(invoiceId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Invoice.Cancel("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string invoiceId = "inv_DAweOiQ7amIUVd"; + +Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + +```json: Response +{ + "amount": 0, + "amount_due": 0, + "amount_paid": 0, + "auth_link_status": "cancelled", + "billing_end": null, + "billing_start": null, + "cancelled_at": 1661428198, + "comment": null, + "created_at": 1661424249, + "currency": "INR", + "currency_symbol": "₹", + "customer_details": { + "billing_address": null, + "contact": "9023456780", + "customer_contact": "9023456780", + "customer_email": "gaurav.kumar1@example.com", + "customer_name": "Gaurav Kumar", + "email": "gaurav.kumar1@example.com", + "gstin": null, + "id": "cust_K9pyoGi6vDUMgM", + "name": "Gaurav Kumar", + "shipping_address": null + }, + "customer_id": "cust_K9pyoGi6vDUMgM", + "date": 1661424248, + "description": "salsa", + "email_status": "sent", + "entity": "invoice", + "expire_by": 1947483647, + "expired_at": null, + "first_payment_min_amount": null, + "gross_amount": 0, + "group_taxes_discounts": false, + "id": "inv_K9pyoiihbl98jD", + "idempotency_key": null, + "invoice_number": "trtrtr1", + "issued_at": 1661424248, + "line_items": [], + "nach_form_url": "https://rzp.io/i/Ui2gOJOom", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "order_id": "order_K9pypNRrcL4bij", + "paid_at": null, + "partial_payment": false, + "payment_id": null, + "receipt": "trtrtr1", + "reminder_status": null, + "short_url": "https://rzp.io/i/WNa96WB", + "sms_status": "sent", + "status": "cancelled", + "subscription_status": null, + "supply_state_code": null, + "tax_amount": 0, + "taxable_amount": 0, + "terms": null, + "token": { + "auth_type": "physical", + "bank_account": { + "account_number": "11214311215411", + "account_type": "savings", + "bank_name": "HDFC Bank", + "beneficiary_email": "gaurav.kumar1@example.com", + "beneficiary_mobile": "9023456780", + "ifsc": "HDFC0001233", + "name": "Gaurav Kumar" + }, + "currency": "INR", + "expire_at": 1947483647, + "failure_reason": null, + "first_payment_amount": 0, + "max_amount": 50000, + "method": "nach", + "nach": { + "create_form": true, + "description": "salsa", + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "prefilled_form": "https://rzp.io/i/WYAUISM64", + "prefilled_form_transient": "https://rzp.io/i/Ui2gOJOom", + "upload_form_url": "https://rzp.io/i/WNa96WB" + }, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "recurring_status": null + }, + "type": "link", + "user_id": null, + "view_less": true +} + +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. + +#### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +## 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +Know more about [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/integrate.md#fetch-nach-mandate-registration-details). + +### 2.1. Fetch Token by Payment ID + +Use the below endpoint to fetch the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000003 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_SECRET}" + +String paymentId = "pay_1Aa00000000003"; + +Payment payment = razorpay.payments.fetch(paymentId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_1Aa00000000003" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.Fetch(paymentId); + +```json: Response +{ + "id": "pay_EnLNTjINiPkMEZ", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_EnLLfglmKksr4K", + "invoice_id": "inv_EnLLfgCzRfcMuh", + "international": false, + "method": "nach", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_EnLLfgCzRfcMuh", + "card_id": null, + "bank": "UTIB", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EnLNTnn7uyRg5V", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1588827564 +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. Here, it is `payment`. + +`amount` +: `integer` The payment amount represented in smallest unit of the currency passed. For example, `amount = 100` translates to `100` subunits, that is . + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`order_id` +: `string` The unique identifier of the order. + +`invoice_id` +: `string` The unique identifier of the invoice. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`amount_refunded` +: `integer` The amount refunded in smallest unit of the currency passed. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string` Description of the payment, if any. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `integer` Customer contact number used for the payment. + +`customer_id` +: `string` The unique identifier of the customer. + +`token_id` +: `string` The unique identifier of the token. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +### 2.2. Fetch Tokens by Customer ID + +Use the below endpoint to fetch tokens linked to a customer. + +A customer can have multiple tokens tied to them. These tokens can be used to create subsequent payments for multiple products or services. + +> **WARN** +> +> +> **Watch Out!** +> +> This endpoint will not fetch the details of expired and unused tokens. +> + +/customers/:id/tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000004"; + +Customer customer = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetchTokens(customerId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_EhYgIE3pOyMQpD", + "entity": "token", + "token": "3mQ5Czc6APNppI", + "bank": "HDFC", + "wallet": null, + "method": "nach", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "physical", + "mrn": null, + "used_at": 1587564373, + "created_at": 1587564373, + "dcc_enabled": false + } + ] +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +### Response Parameters + +`entity` +: `string` The entity being created. Here, it is a `collection`. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: `object` Details related to token such as `token id` and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is `token_id`. + + `entity` + : `string` The entity being created. Here, it is a `token`. + + `token` + : `string` The token is being fetched. + + `bank` + : `string` Card issuing bank details. + + `wallet` + : `string` Provides wallet information. + + `method` + : `string` The payment method used to make the transaction. + + `card` + : `object` Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is `Visa`. + + `type` + : `string` Card type (debit or credit). In this example, it is `credit`. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `boolean` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : `object` The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + + `vpa` + : `object` The VPA details. + + `username` + : `string` The username of the VPA holder. For example, `gaurav.kumar`. + + `handle` + : `string` The VPA handle. Here it is `upi`. + + `name` + : `string` The name of the VPA holder. + + + `recurring` + : `string` This represents whether recurring is enabled for this token. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + `recurring_details` + : `object` Details of the recurring transaction. + + `status` + : `string` This represents the status of the recurring transaction. Possible values: + - `initiated` + - `confirmed` + - `rejected` + - `cancelled` + - `paused` + + `failure_reason` + : `string` This provides the reason why the recurring transaction failed. + + `auth_type` + : `string` The authorisation type details. + + `mrn` + : `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + + `used_at` + : `integer` The VPA usage timestamp. + + `created_at` + : `integer` The token creation timestamp. + + `expired_at` + : `integer` The token expiry date timestamp. + + `dcc_enabled` + : `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + +### 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + +### Response Parameters + +`deleted` +: `boolean` Indicates whether the token is deleted. Possible values: + - `true`: The token is deleted successfully. + - `false`: The token was not deleted. + +## 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +### 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000001`. + +`entity` +: `string` The entity that has been created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to pay. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `rcptid #1`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +### 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +### Response Parameters + +`razorpay_payment_id` +: `string` The unique identifier of the payment that is created. For example, `pay_1Aa00000000001`. + +`razorpay_order_id` +: `string` The unique identifier of the order that is created. For example, `order_1Aa00000000001`. + +`razorpay_signature` +: `string` The signature generated by the Razorpay. For example, `9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d`. diff --git a/llm-content/api/payments/recurring-payments/paper-nach/create-authorization-transaction.md b/llm-content/api/payments/recurring-payments/paper-nach/create-authorization-transaction.md new file mode 100644 index 00000000..06609196 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/paper-nach/create-authorization-transaction.md @@ -0,0 +1,2268 @@ +--- +title: 1. Create the Authorisation Transaction +description: Create an authorisation transaction with NACH as a payment method. +--- + +# 1. Create the Authorisation Transaction + +The flow to complete an authorisation transaction using paper NACH differs from the other payment method's flow. +1. Create a customer. +2. Create an order by passing the `customer_id` and the method as `nach`. Razorpay generates a NACH form with the customer information pre-filled and ready to sign. +3. The customer can get the form in one of the following ways to sign it: + - You can download the form from the Dashboard and send it to the customer. + - A customer can download the form from the Hosted page (in the case of registration links). +4. The signed form can be uploaded in one of the following ways: + - Using the Standard Checkout page. + - Hosted page (in the case of registration links). + - The customer can send you the form and you can upload the form for the customer. The acceptable image formats and size are: + - jpeg + - jpg + - png + - Maximum accepted size is 6 MB. + +Once the details are validated, the authorisation transaction is completed and a token is generated. You can charge your customer as per your business model after the token status changes to `confirmed`. + +You can create an authorisation transaction: + +- Using the [Razorpay Standard Checkout](#11-using-razorpay-standard-checkout). +- Using a [Registration Link](#12-using-a-registration-link). + +## 1.1. Using Razorpay Standard Checkout + +To create an authorisation transaction using the Razorpay Standard Checkout, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay Standard Checkout](#113-create-an-authorisation-payment). + +### 1.1.1. Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + +#### Request Parameters + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + +### 1.1.2. Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":0, + "currency":"INR", + "method":"nach", + "customer_id": "cust_1Aa00000000001", + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token":{ + "auth_type":"physical", + "max_amount":10000000, + "expire_at":2709971120, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account":{ + "account_number":"11214311215411", + "ifsc_code":"HDFC0000001", + "beneficiary_name":"Gaurav Kumar", + "account_type":"savings" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "description":"Paper NACH Gaurav Kumar" + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.put("method", "nach"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("auth_type","physical"); +token.put("max_amount","10000000"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +token.put("bank_account",bankAccount); +JSONObject nach = new JSONObject(); +nach.put("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.put("form_reference2","Method Paper NACH"); +nach.put("description","Paper NACH Gaurav Kumar"); +token.put("nach",nach); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','method' => 'nach','customer_id' => 'cust_1Aa00000000001','receipt' => 'Receipt No. 1', 'notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'),'token' => array('auth_type' => 'physical','max_amount' => 10000000,'expire_at' => 2709971120,'notes' => array('notes_key_1' => 'Tea, Earl Grey, Hot','notes_key_2' => 'Tea, Earl Grey… decaf.'),'bank_account' => array('account_number' => '11214311215411','ifsc_code' => 'HDFC0000001','beneficiary_name' => 'Gaurav Kumar','account_type' => 'savings'),'nach' => array('form_reference1' => 'Recurring Payment for Gaurav Kumar','form_reference2' => 'Method Paper NACH','description' => 'Paper NACH Gaurav Kumar')))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + method: "nach", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "netbanking", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "1121431121541121", + account_type: "savings", + ifsc_code: "HDFC0000001" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'nach', + 'customer_id': 'cust_1Aa00000000001', + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'netbanking', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 0, + "currency": "INR", + "method": "nach", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 1121431121541121, + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount":0, + "currency":"INR", + "method":"nach", + "customer_id": "cust_1Aa00000000001", + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token":map[string]interface{}{ + "auth_type":"physical", + "max_amount":10000000, + "expire_at":2709971120, + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account":map[string]interface{}{ + "account_number":"11214311215411", + "ifsc_code":"HDFC0000001", + "beneficiary_name":"Gaurav Kumar", + "account_type":"savings", + }, + "nach":map[string]interface{}{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "description":"Paper NACH Gaurav Kumar", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 0); +orderRequest.Add("currency", "INR"); +orderRequest.Add("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.Add("method", "nach"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); +Dictionary token = new Dictionary(); +token.Add("auth_type","physical"); +token.Add("max_amount","10000000"); +token.Add("expire_at","2709971120"); +Dictionary tokenNotes = new Dictionary(); +tokenNotes.Add("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.Add("notes_key_2","Tea, Earl Grey… decaf."); +token.Add("notes",tokenNotes); +orderRequest.Add("token", token); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +token.Add("bank_account",bankAccount); +Dictionary nach = new Dictionary(); +nach.Add("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.Add("form_reference2","Method Paper NACH"); +nach.Add("description","Paper NACH Gaurav Kumar"); +token.Add("nach",nach); + +Order order = client.Order.Create(orderRequest); +``` + +```json: Success Response +{ + "id":"order_1Aa00000000001", + "entity":"order", + "amount":0, + "amount_paid":0, + "amount_due":0, + "currency":"INR", + "receipt":"rcptid #10", + "offer_id":null, + "offers":{ + "entity":"collection", + "count":0, + "items":[ + + ] + }, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Beam me up Scotty", + "notes_key_2":"Engage" + }, + "created_at":1579775420, + "token":{ + "method":"nach", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "recurring_status":null, + "failure_reason":null, + "currency":"INR", + "max_amount":10000000, + "auth_type":"physical", + "expire_at":1580480689, + "nach":{ + "create_form":true, + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "prefilled_form":"https://rzp.io/i/bitw", + "upload_form_url":"https://rzp.io/i/gts", + "description":"Paper NACH Gaurav Kumar" + }, + "bank_account":{ + "ifsc":"HDFC0000001", + "bank_name":"HDFC Bank", + "name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "beneficiary_email":"gaurav.kumar@example.com", + "beneficiary_mobile":"9876543210" + }, + "first_payment_amount":0 + } +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For Paper NACH, the amount has to be `0`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`method` _mandatory_ +: `string` The authorisation method. In this case the value will be `nach`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer, who is to be charged. For example, `cust_D0cs04OIpPPU1F`. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `rcptid #1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: Details related to the authorisation such as max amount, bank account information and NACH information. + +`auth_type` _mandatory_ + : `string` In this case, it will be `physical`. + + `bank_account` + : Customer's bank account details that will be printed on the NACH form. + + `account_number`_mandatory_ + : `string` Customer's bank account number. For example `11214311215411`. + + `ifsc_code`_mandatory_ + : `string` Customer's bank IFSC. For example `UTIB0000001`. + + `beneficiary_name`_mandatory_ + : `string` Customer's name. For example, `Gaurav Kumar`. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + - `cc` (Cash Credit) + - `nre` (SB-NRE) + - `nro` (SB-NRO) + + `max_amount` _optional_ + : `integer` Use to set the maximum amount per debit request. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/faqs.md#3-is-there-a-limit-on-the-debit). + + `expire_at` _optional_ + : `integer` Timestamp, in Unix, that specifies when the registration link should expire. The value can range from the current date to 01-19-2038 (`2147483647`). + + `nach` + : Additional information to be printed on the NACH form that your customer will sign. + + `form_reference1` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `form_reference2` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `description` _optional_ + : `string` A user-entered description that appears on the hosted page. For example, `Form for Gaurav Kumar.` + + `notes`_optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000001`. + +`entity` +: `string` The entity that is created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. For NACH, the amount should be `0`. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to pay. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `rcptid #10`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. Here, it is `created`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`token` +: Details related to the authorisation such as max amount and bank account information. + + `method` + : `string` Payment method used to make the authorisation payment. Here, it is `nach`. + + `notes` + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`max_amount` +: `integer` The maximum amount in paise a customer can be charged in a transaction. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/faqs.md#3-is-there-a-limit-on-the-debit). + +`expire_at` +: `integer` The Unix timestamp to indicate the date till which you can use the token (authorisation on the payment method) to charge the customer subsequent payments. + +`auth_type` +: `string` NACH type used to make the authorisation payment. Here, it is `physical`. + +`nach` +: Additional information to be printed on the NACH form that your customer will sign. + + `create_form` + : `boolean` Indicates whether the form is created or not. Possible values: - `true`: The NACH form is created. + - `false`: The NACH form is not created. + + `form_reference1` + : `string` A user-entered reference that appears on the NACH form. + + `form_reference2` + : `string` A user-entered reference that appears on the NACH form. + + `prefilled_form` + : `string` The link from where you can download the pre-filled NACH form. + + `upload_form_url` + : `string` The link where the NACH form should be uploaded once it is signed by the customer. + + `description` + : `string` A user-entered description that appears on the hosted page. For example, `Paper NACH Gaurav Kumar`. + +`bank_account` +: Customer's bank account details that should be pre-filled on the checkout. + + `ifsc_code` + : `string` Customer's bank IFSC. For example, `HDFC0000001`. + + `bank_name` + : `string` The bank name. For example, `HDFC Bank`. + + `name` + : `string` Name of the beneficiary. For example, `Gaurav Kumar`. + + `account_number` + : `string` Customer's bank account number. + + `account_type` + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + - `cc` (Cash Credit) + - `nre` (SB-NRE) + - `nro` (SB-NRO) + + `beneficiary_email` + : `string` Email address of the beneficiary. For example, `gaurav.kumar@example.com`. + + `beneficiary_mobile` + : `integer` Mobile number of the beneficiary. + +> **INFO** +> +> +> **Download and Upload the Pre-filled NACH Form** +> +> Once the order is created, the pre-filled form must be downloaded, signed by your customer and uploaded back to Razorpay to complete the transaction. +> +> You receive the following parameters as part of the response: +> +> `prefilled_form` +> : The link from where you can download the pre-filled NACH form. +> +> `upload_form_url` +> : The link where the NACH form should be uploaded once it is signed by the customer. +> +> **Authorisation transaction + auto-charge first payment**: +> + +> You can register a customer's mandate **and** charge them the first recurring payment as part of the same transaction. Refer to the [Paper NACH section under Registration and Charge First Payment Together](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/auto-debit.md#1-create-an-authorization-transaction) for more information. +> + +#### Error Response Parameters + +Given below is a list of possible errors you may face while creating an Order. + +Error | Cause | Solution +--- +The id provided does not exist | This error occurs when you enter an incorrect `customer_id`. | Make sure to enter a valid `customer_id`. +--- +The api key provided is invalid | This error occurs when you enter the wrong API key or secret. | Make sure to enter a valid API key and secret. +--- +The amount should be 0. | This error occurs when you enter an amount greater than INR 0. | Make sure to enter the amount is INR 0. +--- +Invalid IFSC Code | This error occurs when you enter an incorrect IFSC code. | Make sure to enter a correct IFSC code. +--- +The currency should be INR when method is nach | This error occurs when you enter a currency other than INR | Make sure the currency is INR. +--- +The amount field is required. | This error occurs when you have not entered the amount or the `max_amount` value. | Make sure to enter the `max_amount` value. +--- +The minimum transaction amount allowed is Re. 5. | This error occurs when you enter the maximum amount less than the minimum amount. | Make sure the `max_amount` value is more than the `min_amount` value. +--- +invaild_account_number | This error occurs when you have not entered the `account_number`. | Make sure to enter a valid `account_number`. +--- +selected_frequency_invalid | This error occurs when you enter an incorrect `frequency` parameter value. | Make sure to enter a correct `frequency` parameter value. + +### 1.1.3. Create an Authorisation Payment + +You should create an authorisation payment after you create an order. + +To create an authorisation payment: + +1. Download the Paper NACH form and send it to the customer. +2. Ask the customers to fill the form and either [Upload via Checkout](#1131-upload-the-nach-file-via-checkout) or send it to you to upload the form using the [create NACH File API](#1132-upload-the-nach-file-via-api). + +#### 1.1.3.1 Upload the NACH File via Checkout + +Create a payment checkout form for customers to upload the NACH form and make the Authorisation Transaction. You can use the Handler Function or Callback URL. + +**Handler Function** | **Callback URL** +--- +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout form. You need to collect these and send them to your server. | When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. + +> **WARN** +> +> +> **Watch Out!** +> +> The Callback URL is not supported for Recurring Payments created using the registration link. +> + +```html: Checkout with handler functions + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "handler": function (response) { + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature); + }, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +```html: Manual checkout with Callback URL + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +``` + +#### Additional Checkout Fields + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +`recurring` _mandatory_ +: `boolean` Determines whether the recurring is enabled or not. Possible values: + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +#### Error Response Parameters + +Given below is a list of possible errors you may face while making the authorisation payment. + + +### adequate_funds_not_available_blocked + + - **Description**: Sufficient unblocked funds not available in customer's account. Please ask customer to add fund and try again. + - **Next Steps**: Please ask customer to add sufficient unblocked funds and try again. + + + +### bad_request_error + + - **Description**: Invalid Mandate Sequence Number. + - **Next Steps**: Retry after some time during the valid cycle. + + + +### bank_account_invalid + + - **Description**: Payment failed because Account linked to VPA is invalid. + - **Next Steps**: Create a new mandate with the customer. + + + +### bank_account_validation_failed + + - **Description**: Payment was unsuccessful as the details are invalid. Please retry with the right details. + - **Next Steps**: Ask the customer to retry again. + + + +### bank_not_available + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### bank_technical_error + + + + Bank Temporarily Unavailable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Temporary Bank Issue + + - **Description**: Payment was unsuccessful due to a temporary issue at your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Bank Declined + + - **Description**: Payment was unsuccessful as it was declined by your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Bank or Wallet Gateway Error + + - **Description**: Payment processing failed due to error at bank or wallet gateway. + - **Next Steps**: Retry after some time. + + + +### General Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Bank Services Halt + + - **Description**: Payment was unsuccessful due to a temporary halt of services at this bank. + - **Next Steps**: Retry after some time. + + + + + + + +### credit_to_beneficiary_failed + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### debit_declined + + - **Description**: Payment was unsuccessful as it was declined by remitter bank. + - **Next Steps**: Create a new mandate with the customer. + + + +### debit_instrument_blocked + + - **Description**: Payment was unsuccessful as the account linked to this UPI ID is blocked. Try using another account. + - **Next Steps**: Create a new mandate with the customer. + + + +### duplicate_mandate_request + + - **Description**: Duplicate mandate request. Please try again with another mandate request. + - **Next Steps**: Please try again with another mandate request. + + + +### gateway_technical_error + + + + Bank or Wallet Gateway Error + + - **Description**: Payment processing failed due to error at bank or wallet gateway. + - **Next Steps**: Retry after some time. + + + +### Temporary Issue with Money Deduction + + - **Description**: Payment was unsuccessful due to a temporary issue. If money got deducted, reach out to the seller. + - **Next Steps**: Retry after some time. + + + + + + + +### incorrect_pin + + - **Description**: You have entered an incorrect PIN on the UPI app. Please retry with the correct PIN. + - **Next Steps**: Ask the customer to retry with correct PIN. + + + +### insufficient_funds + + - **Description**: Transaction failed due to insufficient funds. + - **Next Steps**: Ask the customer to add balance to their account and retry. + + + +### invalid_request + + - **Description**: Payment processing failed due to error at bank or wallet gateway. + - **Next Steps**: Retry after some time. + + + +### invalid_response_from_gateway + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### invalid_transaction_beneficiary + + - **Description**: Beneficiary address resolution failed. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### invalid_vpa + + - **Description**: You have entered an incorrect UPI ID. Please retry with the correct UPI ID. + - **Next Steps**: Ask the customer to retry with a valid VPA. + + + +### issuer_dispatch_failed + + - **Description**: Payment failed due to some issue at the issuer bank. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### limit_exceeded_remitting_bank + + - **Description**: Limit exceeded for remitter bank. Please ask customer to try with another bank account. + - **Next Steps**: Please ask customer to try with another bank account. + + + +### mandate_debit_beyond_psp_amount_cap + + - **Description**: Debit amount is beyond payer PSP specified amount cap. Please reduce the amount and try again. + - **Next Steps**: Please reduce the mandate amount to match customer PSP. + + + +### mandate_request_limit_breached + + - **Description**: Maximum number of mandate creation requests exceeded for customer's bank account. Please wait for some time before initiating new mandate creation requests. + - **Next Steps**: Please wait for some time before initiating new mandate creation requests. + + + +### mobile_number_invalid + + - **Description**: Registered Mobile number linked to the account has been changed or removed. + - **Next Steps**: Create a new mandate with the customer. + + + +### nature_of_debit_not_allowed + + - **Description**: Nature of debit not allowed in customer's account. Please ask the customer to use a different bank account. + - **Next Steps**: Please ask the customer to use a different bank account. + + + +### no_financial_address_record_found + + - **Description**: No financial address record found for this VPA. Please ask customer to try with another bank account. + - **Next Steps**: Please ask customer to try with other bank account. + + + +### no_original_request_found + + - **Description**: No mandate details were found in the record during debit. Please try after some time. + - **Next Steps**: Please try after some time. + + + +### payment_collect_request_expired + + - **Description**: Payment was unsuccessful as you could not pay with the UPI app within time. + - **Next Steps**: Retry after some time. + + + +### payment_declined + + + + Bank Declined Payment + + - **Description**: Payment was unsuccessful as it was declined by your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Ask the customer to retry with other account. + + + +### Customer Declined Payment + + - **Description**: You have declined the payment request on the UPI app. Please retry when you are ready. + - **Next Steps**: Ask the customer to approve the payment. + + + + + + + +### payment_failed + + - **Description**: Payment was unsuccessful due to a temporary issue. If amount got deducted, it will be refunded within 5-7 working days. + - **Next Steps**: Retry after 1 hour. + + + +### payment_pending + + - **Description**: The status of your payment is pending. You can either wait or retry to pay successfully. + - **Next Steps**: Retry after some time. + + + +### payment_risk_check_failed + + - **Description**: Payment was unsuccessful as your account does not pass the risk checks done by your bank. Try using another account. + - **Next Steps**: Retry after some time. + + + +### payment_timed_out + + - **Description**: Payment was unsuccessful as you could not complete it in time. + - **Next Steps**: Retry after some time. + + + +### pre_debit_notification_failed + + - **Description**: Unable to Notify the Customer. + - **Next Steps**: Retry after some time. + + + +### remitter_dispatch_failed + + - **Description**: Payment failed due to some issue at the customer's. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### request_timed_out + + + + General Timeout - Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Timeout - Bank Declined + + - **Description**: Payment was unsuccessful as it was declined by your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Timeout - Recurring Payment Creation + + - **Description**: Payment was unsuccessful as the recurring payment can not be created at this time. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + + + + + +### transaction_frequency_limit_exceeded + + - **Description**: Payment failed. Please try again with another bank account. + - **Next Steps**: Create a new mandate with the customer. + + + +### transaction_limit_exceeded + + + + Amount Limit Exceeded + + - **Description**: Payment failed because Transaction amount limit has exceeded. + - **Next Steps**: Reach out to the customer to collect the amount. + + + +### Bank Account Amount Limit + + - **Description**: Payment was unsuccessful as you exceeded the amount limit on the bank account linked to this UPI id. + - **Next Steps**: Ask the customer to retry after some time. + + + + + + + +### transaction_not_allowed + + - **Description**: Payment was unsuccessful as it was declined by your bank. Reach out to your bank for more details. Try using another account. + - **Next Steps**: Create a new mandate with the customer. + + + +### upi_dummy_payment + + - **Description**: Payment was a dummy payment for one time mandate registration. + - **Next Steps**: NA + + +#### 1.1.3.2 Upload the NACH File via API + +Use the following API to upload the NACH file sent by the customer. + +```cURL: Request +curl -u : \ +-X POST 'https://api.razorpay.com/v1/payments/create/nach/file' \ +-H "Content-Type: multipart/form-data" \ +-F 'order_id=order_FoLdZrq6QGKUWg' \ +-F 'recurring=1' \ +-F 'file=@/Users/your_name/sample_uploaded.jpeg' // file path +``` + +```json: Successful Response +{ + "razorpay_payment_id": "pay_FjDn43bvssCqEM", + "razorpay_order_id": "order_FjDdQ6a0GluJ2c", + "razorpay_signature": "f13775ea8a91e9bf229b9fdba3ad783f7ff2bdbce1c35e87a69ae7418808da04" +} +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"file size exceeds limit", + "field":null, + "source":"customer", + "step":"form_upload", + "reason":"file size exceeds limit", + "metadata":{ + "payment_id":null, + "order_id":"order_DBJKIP31Y4jl8" + } + } +} +``` + +#### Request Parameters + +`order_id` _mandatory_ +: `string` The unique identifier of the order that was created. For example, `order_FoLdZrq6QGKUWg`. + +`recurring` _mandatory_ +: `boolean` Determines whether the recurring is enabled or not. Possible values: + - `1`: Recurring is enabled. + - `0`: Recurring is not enabled. + +`file` _mandatory_ +: `strinng` The path where you have saved the NACH file. + +#### Response Parameters + +`razorpay_payment_id` +: `string` The unique identifier of the payment that is created. For example, `pay_FjDn43bvssCqEM`. + +`razorpay_order_id` +: `string` The unique identifier of the order that is created. For example, `order_FjDdQ6a0GluJ2c`. + +`razorpay_signature` +: `string` The signature generated by the Razorpay. For example, `f13775ea8a91e9bf229b9fdba3ad783f7ff2bdbce1c35e87a69ae7418808da04` + +#### Error Response Parameters + +Given below is a list of possible errors you may face while while uploading a NACH file. + +Error | Cause | Solution +--- +`unknown_file_type` | This error occurs when the file type of the image is not supported. | Make sure the image is in either `.jpeg`, `.jpg` or `.png` formats. +--- +`file_size_exceeds_limit` | This error occurs when the file size exceeds the permissible limits. | Make sure to upload an image of a smaller size. +--- +`image_not_clear` | This error occurs when the uploaded image is not clear. This can either be due to poor resolution or because part of the image is cropped. | Make sure to upload an image with better quality. +--- +`form_mismatch` | This error occurs when the ID of the uploaded form does not match that in our records. | Make sure to upload the image against the correct order ID. +--- +`form_signature_missing` | This error occurs when the signature of the customer is either missing or could not be detected. | Check that the customer has signed in the appropriate box and that the image uploaded is clear. For current accounts, a company stamp may also be required. +--- +`form_data_mismatch` | This error occurs when one or more of the fields on the NACH form do not match with that in our records. | Check that the image is clear and the data has not been tampered with before uploading again. +--- +`form_status_pending` | This error occurs when a form against the order is pending action on the destination bank. You cannot submit a new form till you receive a status. | Wait for an update from the destination bank on the approval/rejection of the mandate. +--- + +## 1.2. Using a Registration Link + +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the [API](#121-create-a-registration-link) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> + +- When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. +- A registration link should always have an order amount (in paise) the customer will be charged when making the authorisation payment. This amount should be `0` in the case of Paper NACH. + +> **INFO** +> +> +> **Handy Tips** +> +> You can [use Webhooks to get notifications about successful payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) against a registration link. +> + +### 1.2.1. Create a Registration Link + +The following endpoint creates a registration link for recurring payments. + +/subscription_registration/auth_links + +```cURL: Curl +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780" + }, + "amount":0, + "currency":"INR", + "type":"link", + "description":"12 p.m. Meals", + "subscription_registration":{ + "method":"nach", + "auth_type":"physical", + "bank_account":{ + "beneficiary_name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "ifsc_code":"HDFC0001233" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH" + }, + "expire_at":1947483647, + "max_amount":50000 + }, + "receipt":"Receipt No. 1", + "sms_notify":true, + "email_notify":true, + "expire_by":1647483647, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 0); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "12 p.m. Meals"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","nach"); +subscriptionRegistration.put("auth_type","physical"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +JSONObject nach = new JSONObject(); +nach.put("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.put("form_reference2","Method Paper NACH"); +subscriptionRegistration.put("bank_account",bankAccount); +subscriptionRegistration.put("nach",nach); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. #1"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer' => array('name' => 'Gaurav Kumar','email' => 'gaurav.kumar@example.com','contact' => '9123456780'),'amount' => 0,'currency' => 'INR','type' => 'link','description' => '12 p.m. Meals','subscription_registration' => array('method' => 'nach','auth_type' => 'physical','bank_account' => array('beneficiary_name' => 'Gaurav Kumar','account_number' => '11214311215411','account_type' => 'savings','ifsc_code' => 'HDFC0001233'),'nach' => array('form_reference1' => 'Recurring Payment for Gaurav Kumar','form_reference2' => 'Method Paper NACH'),'expire_at' => 1947483647,'max_amount' => 50000),'receipt' => 'Receipt No. 1','sms_notify' => true,'email_notify' => true,'expire_by' => 1647483647,'notes' => array('note_key 1' => 'Beam me up Scotty','note_key 2' => 'Tea. Earl Gray. Hot.'))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + amount: 0, + currency: "INR", + type: "link", + description: "12 p.m. Meals", + subscription_registration: { + method: "nach", + auth_type: "physical", + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: 11214311215411, + account_type: "savings", + ifsc_code: "HDFC0001233" + }, + nach: { + form_reference1: "Recurring Payment for Gaurav Kumar", + form_reference2: "Method Paper NACH" + }, + expire_at: 1947483647, + max_amount: 50000 + }, + receipt: "Receipt No. 1", + sms_notify: true, + email_notify: true, + expire_by: 1647483647, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + 'customer': {'name': 'Gaurav Kumar', + 'email': 'gaurav.kumar@example.com', + 'contact': 9123456780}, + 'amount': 0, + 'currency': 'INR', + 'type': 'link', + 'description': '12 p.m. Meals', + 'subscription_registration': { + 'method': 'nach', + 'auth_type': 'physical', + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 11214311215411, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0001233', + }, + 'nach': {'form_reference1': 'Recurring Payment for Gaurav Kumar' + , 'form_reference2': 'Method Paper NACH'}, + 'expire_at': 1947483647, + 'max_amount': 50000, + }, + 'receipt': 'Receipt No. 1', + 'sms_notify': True, + 'email_notify': True, + 'expire_by': 1647483647, + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "amount": 0, + "currency": "INR", + "type": "link", + "description": "12 p.m. Meals", + "subscription_registration": { + "method": "nach", + "auth_type": "physical", + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + }, + "nach": { + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH" + }, + "expire_at": 1947483647, + "max_amount": 50000 + }, + "receipt": "Receipt No. 1", + "sms_notify": 1, + "email_notify": 1, + "expire_by": 1647483647, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} + +Razorpay::SubscriptionRegistration.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer":map[string]interface{}{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + }, + "amount":0, + "currency":"INR", + "type":"link", + "description":"12 p.m. Meals", + "subscription_registration":map[string]interface{}{ + "method":"nach", + "auth_type":"physical", + "bank_account":map[string]interface{}{ + "beneficiary_name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "ifsc_code":"HDFC0001233", + }, + "nach":map[string]interface{}{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + }, + "expire_at":1947483647, + "max_amount":50000, + }, + "receipt":"Receipt No. 1", + "sms_notify":true, + "email_notify":true, + "expire_by":1647483647, + "notes":map[string]interface{}{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot.", + }, +} + +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary registrationLinkRequest = new Dictionary(); +Dictionary customer = new Dictionary(); +customer.Add("name","Gaurav Kumar"); +customer.Add("email","gaurav.kumar@example.com"); +customer.Add("contact","9123456780"); +registrationLinkRequest.Add("customer", customer); +registrationLinkRequest.Add("type", "link"); +registrationLinkRequest.Add("amount", 0); +registrationLinkRequest.Add("currency", "INR"); +registrationLinkRequest.Add("description", "12 p.m. Meals"); +Dictionary subscriptionRegistration = new Dictionary(); +subscriptionRegistration.Add("method","nach"); +subscriptionRegistration.Add("auth_type","physical"); +subscriptionRegistration.Add("max_amount",50000); +subscriptionRegistration.Add("expire_at",1609423824); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +Dictionary nach = new Dictionary(); +nach.Add("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.Add("form_reference2","Method Paper NACH"); +subscriptionRegistration.Add("bank_account",bankAccount); +subscriptionRegistration.Add("nach",nach); +registrationLinkRequest.Add("subscription_registration", subscriptionRegistration); +registrationLinkRequest.Add("receipt", "Receipt No. #111"); +registrationLinkRequest.Add("email_notify", true); +registrationLinkRequest.Add("sms_notify", true); +registrationLinkRequest.Add("expire_by", 1580479824); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.Add("notes", notes); + +Invoice invoice = client.Invoice.CreateRegistrationLink(registrationLinkRequest); + +```json: Response +{ + "id": "inv_FHrZiAubEzDdaq", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZiBOkWHZPOp", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1647483647, + "issued_at": 1595491154, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491154, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "12 p.m. Meals", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/bzDYbNg", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491154, + "idempotency_key": null, + "token": { + "method": "nach", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 50000, + "auth_type": "physical", + "expire_at": 1947483647, + "nach": { + "create_form": true, + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "prefilled_form": "https://rzp.io/i/exdIzYN", + "upload_form_url": "https://rzp.io/i/bzDYbNg", + "description": "12 p.m. Meals" + }, + "bank_account": { + "ifsc": "HDFC0001233", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9123456780" + }, + "first_payment_amount": 0 + }, + "nach_form_url": "https://rzp.io/i/exdIzYN" +} +``` + +#### Request Parameters + +`customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + +`subscription_registration` +: Details of the authorisation payment. + + `method` _mandatory_ + : `string` The Paper NACH method used to make the authorisation transaction. Here, it is `physical`. + + `auth_type` _mandatory_ + : `string` The payment method used to make the authorisation transaction. Here, it is `nach`. + + `bank_account` + : The customer's bank account details. + + `beneficiary_name` _mandatory_ + : `string` The beneficiary name. For example, `Gaurav Kumar`. + + `account_number` _mandatory_ + : `integer` The customer's bank account number. For example, `11214311215411`. + + `account_type` _mandatory_ + : `string` The customer's bank account type. Possible values: + - `savings` + - `current` + + `ifsc_code` _mandatory_ + : `string` The customer's bank IFSC. For example, `HDFC0000001`. + + `max_amount` _optional_ + : `integer` Use to set the maximum amount, in paise, per debit request. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/faqs.md#3-is-there-a-limit-on-the-debit). + + `expire_at` _optional_ + : `integer` The Unix timestamp till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. The default value is 10 years. The value can range from the current date to 31-12-2099 (`4101580799`). + + `nach` + : Additional information to be printed on the NACH form your customer will sign. + + `form_reference1` _optional_ + : `string` A user entered reference that appears on the NACH form. + + `form_reference2` _optional_ + : `string` A user entered reference that appears on the NACH form. + + `description` _optional_ + : `string` A user entered description that appears on the hosted page. For example, `Form for Gaurav Kumar.` + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + +#### Path Parameters + +`id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +#### Response Parameters + +`success` +: `boolean` Indicates whether the notifications were sent successfully. Possible values: + - `true`: The notifications were successfully sent via SMS, email or both. + - `false`: The notifications were not sent. + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +```cURL: Curl +curl -u : +-X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String invoiceId = "inv_1Aa00000000001"; + +Invoice invoice = razorpay.invoices.cancel(invoiceId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->invoice->fetch($invoiceId)->cancel(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.invoices.cancel(invoiceId); +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.invoice.cancel(invoiceId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +invoiceId = "inv_1Aa00000000001" + +Razorpay::Invoice.cancel(invoiceId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Invoice.Cancel("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string invoiceId = "inv_DAweOiQ7amIUVd"; + +Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + +```json: Response +{ + "id": "inv_FHrZiAubEzDdaq", + "entity": "invoice", + "receipt": "Receipt No. 27", + "invoice_number": "Receipt No. 27", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZiBOkWHZPOp", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 1647483647, + "issued_at": 1595491154, + "paid_at": null, + "cancelled_at": 1595491339, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491154, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "12 p.m. Meals", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/bzDYbNg", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491154, + "idempotency_key": null, + "token": { + "method": "nach", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 50000, + "auth_type": "physical", + "expire_at": 1947483647, + "nach": { + "create_form": true, + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "prefilled_form": "https://rzp.io/i/tSYd5aV", + "upload_form_url": "https://rzp.io/i/bzDYbNg", + "description": "12 p.m. Meals" + }, + "bank_account": { + "ifsc": "HDFC0001233", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9123456780" + }, + "first_payment_amount": 0 + }, + "nach_form_url": "https://rzp.io/i/tSYd5aV" +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> You can only cancel the registration link that is in the `issued` state. +> + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. + +#### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. diff --git a/llm-content/api/payments/recurring-payments/paper-nach/create-subsequent-payments.md b/llm-content/api/payments/recurring-payments/paper-nach/create-subsequent-payments.md new file mode 100644 index 00000000..cb0e011f --- /dev/null +++ b/llm-content/api/payments/recurring-payments/paper-nach/create-subsequent-payments.md @@ -0,0 +1,474 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000001`. + +`entity` +: `string` The entity that has been created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to pay. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `rcptid #1`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating an Order. + +Error | Cause | Solution +--- +The api key provided is invalid | This error occurs when you enter the wrong API key or secret. | Make sure to enter the valid API key and secret. +--- +The amount must be at least INR 1.00. | This error occurs when you enter an amount less than INR 1. | Make sure the entered amount is atleast INR 1. +--- +The currency should be INR when method is upi | This error occurs when you enter a currency other than INR. | Make sure the currency is INR. +--- + +## 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +### Response Parameters + +`razorpay_payment_id` +: `string` The unique identifier of the payment that is created. For example, `pay_1Aa00000000001`. + +`razorpay_order_id` +: `string` The unique identifier of the order that is created. For example, `order_1Aa00000000001`. + +`razorpay_signature` +: `string` The signature generated by the Razorpay. For example, `9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d`. + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating a Recurring Payment. + +Error | Cause | Solution +--- +bank_account_invalid | This error occurs when The customer's bank account is either closed or no longer valid. The customer or bank may have closed the account. | The customer should re-register the mandate. +--- +bank_account_validation_failed | This error occurs when the bank could not validate the customer registration for debiting the customer. | You can retry after some time or reach out to Razorpay. +--- +bank_technical_error | The destination bank was facing technical problems at the time the payment was attempted. This error usually occurs when the Core Banking System encounters a technical error while processing the payment. | You can retry after some time or reach out to Razorpay. +--- +debit_instrument_blocked | This error occurs when the bank temporarily blocks withdrawals on the customer's account. | The customer should reach out to their bank to get the account unblocked. +--- +debit_instrument_inactive | This error occurs when the bank temporarily blocks withdrawals on the customer's account. | The customer should reach out to their bank to get the account unblocked. +--- +gateway_technical_error | The payment failed due to a technical error at the gateway. This error usually occurs when the gateway server encounters a technical error while processing the payment. | You can retry after some time or reach out to Razorpay. +--- +incorrect_ifsc | This error occurs when the bank IFSC code is no longer valid. | The customer should re-register the mandate. +--- +input_validation_failed | The payment failed due to the wrong request or input sent in the payment request. You can also get this error while creating a payment with incorrect parameter values on the Dashboard. | Rectify the validation issues and try again. Check the error description and field parameters for more information about the error. +Check your integration/payment request or reach out to Razorpay. Refer to the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). +--- +insufficient_funds | This error occurs when the customer does not have sufficient funds in the account to complete the payment. | You can retry after asking the customer to add funds to their bank account. +--- +invalid_amount | This error occurs when the amount or currency passed in the payment request is not supported or invalid. This can arise when you pass a different variable type in the amount field or pass an unsupported amount value. | You can check your integration and payment request. +--- +mandate_not_active | This error occurs when the registered mandate is no longer active. The customer or bank could have cancelled the mandate. | The customer should re-register the mandate. +--- +payment_cancelled | This error occurs when the customer has explicitly cancelled the payment. The customer could have given a cancellation instruction to their banks. | You can retry after informing the customer to remove the cancellation request. +--- +payment_declined | Destination Bank or Gateway has declined the payment due to business or technical reasons such as terminal and pricing. | You can retry after some time or reach out to Razorpay. +--- +payment_failed | This error occurs when the destination Bank or Gateway has declined the payment due to business or technical reasons such as terminal and pricing. | You can retry after some time or reach out to Razorpay. +--- +payment_mandate_not_active | This error occurs when the is not yet activated the registered mandate. Banks sometimes take longer to activate the mandates at their end. | You can retry after some time or reach out to Razorpay. +--- +payment_timed_out | This error occurs when the bank with the registered mandate could not debit the customer's account in time. | You can retry after some time or reach out to Razorpay. +--- +server_error | This error occurs when there is a technical error at Razorpay's server. | You can retry after some time or reach out to Razorpay. +--- +transaction_limit_exceeded | This error occurs when customers exceed their account's credit or debit limit during high-value transactions. | You can retry after some time by informing the customer to update their transaction limits. +--- diff --git a/llm-content/api/payments/recurring-payments/paper-nach/tokens.md b/llm-content/api/payments/recurring-payments/paper-nach/tokens.md new file mode 100644 index 00000000..44936499 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/paper-nach/tokens.md @@ -0,0 +1,727 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +Know more about [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/integrate.md#fetch-nach-mandate-registration-details). + +## 2.1 Fetch Payment ID using Order ID + +After you send the registration link, You should wait for the customer to make the payment. You can check the status of the payment using our APIs. The following endpoint fetches the `payment_id` using an `order_id`. + +/orders/:id/payments + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/orders/order_1Aa00000000003/payments + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String orderId = "order_1Aa00000000003"; + +Order order = razorpay.orders.fetchPayments(orderId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->fetch($orderId)->payments() +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.fetchPayments(orderId) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.payment(orderId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +orderId = "order_1Aa00000000003" + +Razorpay::Order.fetch("order_1Aa00000000003").payments + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Order.Payments("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string orderId = "order_Z6t7VFTb9xHeOs"; + +List order = client.Order.Fetch(orderId).Payments(); + +```json: Response +{ + "entity":"collection", + "count":1, + "items":[ + { + "id":"pay_1Aa00000000003", + "entity":"payment", + "amount":0, + "currency":"INR", + "status":"captured", + "order_id":"order_1Aa00000000003", + "invoice_id":"inv_1Aa00000000003", + "international":false, + "method":"nach", + "amount_refunded":0, + "refund_status":null, + "captured":true, + "description":"12 p.m. Meals", + "card_id":null, + "bank":"HDFC", + "wallet":null, + "vpa":null, + "email":"gaurav.kumar@example.com", + "contact":"99876543210", + "customer_id":"cust_1Aa00000000002", + "token_id":"token_1Aa00000000003", + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + }, + "fee":0, + "tax":0, + "error_code":null, + "error_description":null, + "created_at":1580109147 + } + ] +} +``` + +### Path Parameter + +`id` +: `string` The unique identifier of the order. For example, `order_1Aa00000000001`. + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. Here, it is `payment`. + +`amount` +: `integer` The payment amount represented in smallest unit of the currency passed. For example, `amount = 100` translates to `100` subunits, that is . + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`order_id` +: `string` The unique identifier of the order. + +`invoice_id` +: `string` The unique identifier of the invoice. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`amount_refunded` +: `integer` The amount refunded in smallest unit of the currency passed. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string` Description of the payment, if any. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `integer` Customer contact number used for the payment. + +`customer_id` +: `string` The unique identifier of the customer. + +`token_id` +: `string` The unique identifier of the token. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +## 2.2. Fetch Token by Payment ID + +Use the below endpoint to fetch the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000003 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_SECRET}" + +String paymentId = "pay_1Aa00000000003"; + +Payment payment = razorpay.payments.fetch(paymentId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_1Aa00000000003" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.Fetch(paymentId); + +```json: Response +{ + "id": "pay_EnLNTjINiPkMEZ", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_EnLLfglmKksr4K", + "invoice_id": "inv_EnLLfgCzRfcMuh", + "international": false, + "method": "nach", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_EnLLfgCzRfcMuh", + "card_id": null, + "bank": "UTIB", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EnLNTnn7uyRg5V", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1588827564 +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. Here, it is `payment`. + +`amount` +: `integer` The payment amount represented in smallest unit of the currency passed. For example, `amount = 100` translates to `100` subunits, that is . + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`order_id` +: `string` The unique identifier of the order. + +`invoice_id` +: `string` The unique identifier of the invoice. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`amount_refunded` +: `integer` The amount refunded in smallest unit of the currency passed. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string` Description of the payment, if any. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `integer` Customer contact number used for the payment. + +`customer_id` +: `string` The unique identifier of the customer. + +`token_id` +: `string` The unique identifier of the token. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +## 2.3. Fetch Tokens by Customer ID + +Use the below endpoint to fetch tokens linked to a customer. + +A customer can have multiple tokens tied to them. These tokens can be used to create subsequent payments for multiple products or services. + +> **WARN** +> +> +> **Watch Out!** +> +> This endpoint will not fetch the details of expired and unused tokens. +> + +/customers/:id/tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000004"; + +Customer customer = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetchTokens(customerId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_EhYgIE3pOyMQpD", + "entity": "token", + "token": "3mQ5Czc6APNppI", + "bank": "HDFC", + "wallet": null, + "method": "nach", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "physical", + "mrn": null, + "used_at": 1587564373, + "created_at": 1587564373, + "dcc_enabled": false + } + ] +} +``` + +### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +### Response Parameters + +`entity` +: `string` The entity being created. Here, it is a `collection`. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: `object` Details related to token such as `token id` and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is `token_id`. + + `entity` + : `string` The entity being created. Here, it is a `token`. + + `token` + : `string` The token is being fetched. + + `bank` + : `string` Card issuing bank details. + + `wallet` + : `string` Provides wallet information. + + `method` + : `string` The payment method used to make the transaction. + + `card` + : `object` Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is `Visa`. + + `type` + : `string` Card type (debit or credit). In this example, it is `credit`. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `boolean` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : `object` The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + + `vpa` + : `object` The VPA details. + + `username` + : `string` The username of the VPA holder. For example, `gaurav.kumar`. + + `handle` + : `string` The VPA handle. Here it is `upi`. + + `name` + : `string` The name of the VPA holder. + + + `recurring` + : `string` This represents whether recurring is enabled for this token. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + `recurring_details` + : `object` Details of the recurring transaction. + + `status` + : `string` This represents the status of the recurring transaction. Possible values: + - `initiated` + - `confirmed` + - `rejected` + - `cancelled` + - `paused` + + `failure_reason` + : `string` This provides the reason why the recurring transaction failed. + + `auth_type` + : `string` The authorisation type details. + + `mrn` + : `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + + `used_at` + : `integer` The VPA usage timestamp. + + `created_at` + : `integer` The token creation timestamp. + + `expired_at` + : `integer` The token expiry date timestamp. + + `dcc_enabled` + : `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + +## 2.4. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + +### Response Parameters + +`deleted` +: `boolean` Indicates whether the token is deleted. Possible values: + - `true`: The token is deleted successfully. + - `false`: The token was not deleted. diff --git a/llm-content/api/payments/recurring-payments/postman-collection.md b/llm-content/api/payments/recurring-payments/postman-collection.md new file mode 100644 index 00000000..b419e2c6 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/postman-collection.md @@ -0,0 +1,21 @@ +--- +title: Postman Collection +description: Download the Postman collection for Razorpay Recurring Payments. +--- + +# Postman Collection + +We have a Postman collection to make the integration quicker and easier. Click the **Download Postman Collection** button below to get started. + +Download Postman Collection + +## Instructions to Use Postman Collection + +- All Razorpay APIs are authenticated using Basic Authentication. + - [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + - Add your API Keys in Postman. Select the required API → Auth → Type = Basic Auth → Username = [Your_Key_ID]; Password = [Your_Key_secret] + ![](/docs/assets/images/api-postman_basic_auth.gif) +- Some APIs in the collection require data specific to your account such as `order_id`, `cust_id` and `token_id` either in the request body or as a path parameter. + - For example, the create order API requires you to add the `cust_id` (Customer ID) in the request body. + - These parameters are enclosed in \{\} in the collection. For example, \{cust_id\}. + - The API throws an error if these are incorrect or do not exist in your system. diff --git a/llm-content/api/payments/recurring-payments/upi-otm/authorization-transaction.md b/llm-content/api/payments/recurring-payments/upi-otm/authorization-transaction.md new file mode 100644 index 00000000..0308a9bd --- /dev/null +++ b/llm-content/api/payments/recurring-payments/upi-otm/authorization-transaction.md @@ -0,0 +1,1452 @@ +--- +title: 1. Create the Authorisation Transaction +description: Steps to create an authorisation transaction for UPI one time mandate. +--- + +# 1. Create the Authorisation Transaction + +Create a one time mandate on UPI to let your customers block an amount and pay later. The amount gets blocked on the customer's bank account and can be debited once within the expiry of the mandate. A one time mandate on UPI can help charge customers post-delivery of products or services, helping make the customer experience delightful for businesses like Ecommerce, Travel, Transport, Healthcare and many more. + +**Example** + +Gaurav Kumar wants to reserve a room at Acme Hotel. However, he is still determining the travel plan. He wants to pay after check-in. + +Using UPI One Time Mandate, Gaurav Kumar can consent to block the hotel booking amount and only let Acme Hotel debit the amount after check-in. + +To create a one time mandate: +1. [Create an authorisation transaction](#create-an-authorisation-transaction) +2. [Fetch and manage tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/collect/tokens.md) +3. [Create a one time mandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/collect/one-time-payment.md) + +## Create an Authorisation Transaction + +You can create an authorisation transaction using the [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +## 1.1 Using Razorpay APIs + +To create an authorisation transaction using the Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +1. [Create an Order](#112-create-an-order). +1. [Create Authorisation Payment using Razorpay APIs](#114-create-an-authorization-payment). + +### 1.1.1 Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + +### Request Parameters + + `name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + +### 1.1.2. Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction for a one time mandate. To create a one-time mandate, pass the value of the `frequency` parameter as `one_time`. The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "customer_id": "cust_4xbQrmEoA5WJ01", + "method": "upi", + "token": { + "max_amount": 200000, + "expire_at": 2709971120, + "frequency": "one_time" + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 100); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_4xbQrmEoA5WJ01"); +orderRequest.put("method", "upi"); +orderRequest.put("receipt", "receipt#1"); +JSONObject token = new JSONObject(); +token.put("max_amount","200000"); +token.put("expire_at","2709971120"); +token.put("frequency","one_time"); +orderRequest.put("token", token); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','method' => 'upi','customer_id' => 'cust_4xbQrmEoA5WJ01', 'token' => array('max_amount' => 200000, 'expire_at' => 2709971120, 'frequency' => 'one_time'),'receipt' => 'Receipt No. 1' ,'notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + method: "upi", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "netbanking", + max_amount: 9999900, + expire_at: 4102444799, + frequency: "one_time", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount":0, + "currency":"INR", + "method":"upi", + "customer_id":"cust_1Aa00000000001", + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Beam me up Scotty", + "notes_key_2":"Engage" + }, + "token":{ + "auth_type":"netbanking", + "max_amount":9999900, + "expire_at":4102444799, + "frequency": "one_time", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 0, + "currency": "INR", + "method": "upi", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "frequency": "one_time", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } +} +Razorpay.Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount":100, + "currency":"INR", + "customer_id":"", + "method":"upi", + "token":map[string]interface{}{ + "max_amount":5000, + "expire_at":2709971120, + "frequency":"one_time" + }, + "receipt":"Receipt No. 1", + "notes":map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf.", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_1Aa00000000002", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1565172642 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `upi`. + +`receipt` _optional_ +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: `object` Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be debited in a single charge. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _mandatory_ + : `integer` The Unix timestamp at which the authorisation transaction expires. For insurance MCCs (6300, 5960, 6529), the maximum validity is 14 days. For all other MCCs, the maximum validity is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. The value should be `one_time` for one time mandate. + + +### 1.1.3. Create an Authorisation Payment + +Create a payment checkout form for customers to make Authorisation Transaction and register their mandate. You can use the Handler Function or Callback URL. + +Handler Function | Callback URL +--- +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. | When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. + +> **WARN** +> +> +> +> **Watch Out!** +> +> - The callback URL is not supported for recurring payments created using the registration link. +> - While handling the first time authorisation payment response, consume the `error_reason` field with value `upi_dummy_payment` and `error_description` field with value `Payment was a dummy payment for one time mandate registration.` to identify successful mandate registration. The parent `error_code` will be `BAD_REQUEST_ERROR`. +> + +```html: Checkout with handler functions + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "handler": function (response) { + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature); + }, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +```html: Manual checkout with Callback URL + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +``` + +#### Additional Checkout Fields + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +`recurring` _mandatory_ +: `string` Determines if the recurring payment is enabled or not. Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this if you want to allow **recurring payments** and **one-time payment** in the same flow. + +#### Error Response Parameters + +Given below is a list of possible errors you may face while making the authorisation payment. + + +### adequate_funds_not_available_blocked + + - **Description**: Sufficient unblocked funds not available in customer's account. Please ask customer to add fund and try again. + - **Next Steps**: Please ask customer to add sufficient unblocked funds and try again. + + + +### bad_request_error + + - **Description**: Invalid Mandate Sequence Number. + - **Next Steps**: Retry after some time during the valid cycle. + + + +### bank_account_invalid + + - **Description**: Payment failed because Account linked to VPA is invalid. + - **Next Steps**: Create a new mandate with the customer. + + + +### bank_account_validation_failed + + - **Description**: Payment was unsuccessful as the details are invalid. Please retry with the right details. + - **Next Steps**: Ask the customer to retry again. + + + +### bank_not_available + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### bank_technical_error + + + + Bank Temporarily Unavailable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Temporary Bank Issue + + - **Description**: Payment was unsuccessful due to a temporary issue at your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Bank Declined + + - **Description**: Payment was unsuccessful as it was declined by your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Bank or Wallet Gateway Error + + - **Description**: Payment processing failed due to error at bank or wallet gateway. + - **Next Steps**: Retry after some time. + + + +### General Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Bank Services Halt + + - **Description**: Payment was unsuccessful due to a temporary halt of services at this bank. + - **Next Steps**: Retry after some time. + + + + + + + +### credit_to_beneficiary_failed + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### debit_declined + + - **Description**: Payment was unsuccessful as it was declined by remitter bank. + - **Next Steps**: Create a new mandate with the customer. + + + +### debit_instrument_blocked + + - **Description**: Payment was unsuccessful as the account linked to this UPI ID is blocked. Try using another account. + - **Next Steps**: Create a new mandate with the customer. + + + +### duplicate_mandate_request + + - **Description**: Duplicate mandate request. Please try again with another mandate request. + - **Next Steps**: Please try again with another mandate request. + + + +### gateway_technical_error + + + + Bank or Wallet Gateway Error + + - **Description**: Payment processing failed due to error at bank or wallet gateway. + - **Next Steps**: Retry after some time. + + + +### Temporary Issue with Money Deduction + + - **Description**: Payment was unsuccessful due to a temporary issue. If money got deducted, reach out to the seller. + - **Next Steps**: Retry after some time. + + + + + + + +### incorrect_pin + + - **Description**: You have entered an incorrect PIN on the UPI app. Please retry with the correct PIN. + - **Next Steps**: Ask the customer to retry with correct PIN. + + + +### insufficient_funds + + - **Description**: Transaction failed due to insufficient funds. + - **Next Steps**: Ask the customer to add balance to their account and retry. + + + +### invalid_request + + - **Description**: Payment processing failed due to error at bank or wallet gateway. + - **Next Steps**: Retry after some time. + + + +### invalid_response_from_gateway + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### invalid_transaction_beneficiary + + - **Description**: Beneficiary address resolution failed. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### invalid_vpa + + - **Description**: You have entered an incorrect UPI ID. Please retry with the correct UPI ID. + - **Next Steps**: Ask the customer to retry with a valid VPA. + + + +### issuer_dispatch_failed + + - **Description**: Payment failed due to some issue at the issuer bank. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### limit_exceeded_remitting_bank + + - **Description**: Limit exceeded for remitter bank. Please ask customer to try with another bank account. + - **Next Steps**: Please ask customer to try with another bank account. + + + +### mandate_debit_beyond_psp_amount_cap + + - **Description**: Debit amount is beyond payer PSP specified amount cap. Please reduce the amount and try again. + - **Next Steps**: Please reduce the mandate amount to match customer PSP. + + + +### mandate_request_limit_breached + + - **Description**: Maximum number of mandate creation requests exceeded for customer's bank account. Please wait for some time before initiating new mandate creation requests. + - **Next Steps**: Please wait for some time before initiating new mandate creation requests. + + + +### mobile_number_invalid + + - **Description**: Registered Mobile number linked to the account has been changed or removed. + - **Next Steps**: Create a new mandate with the customer. + + + +### nature_of_debit_not_allowed + + - **Description**: Nature of debit not allowed in customer's account. Please ask the customer to use a different bank account. + - **Next Steps**: Please ask the customer to use a different bank account. + + + +### no_financial_address_record_found + + - **Description**: No financial address record found for this VPA. Please ask customer to try with another bank account. + - **Next Steps**: Please ask customer to try with other bank account. + + + +### no_original_request_found + + - **Description**: No mandate details were found in the record during debit. Please try after some time. + - **Next Steps**: Please try after some time. + + + +### payment_collect_request_expired + + - **Description**: Payment was unsuccessful as you could not pay with the UPI app within time. + - **Next Steps**: Retry after some time. + + + +### payment_declined + + + + Bank Declined Payment + + - **Description**: Payment was unsuccessful as it was declined by your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Ask the customer to retry with other account. + + + +### Customer Declined Payment + + - **Description**: You have declined the payment request on the UPI app. Please retry when you are ready. + - **Next Steps**: Ask the customer to approve the payment. + + + + + + + +### payment_failed + + - **Description**: Payment was unsuccessful due to a temporary issue. If amount got deducted, it will be refunded within 5-7 working days. + - **Next Steps**: Retry after 1 hour. + + + +### payment_pending + + - **Description**: The status of your payment is pending. You can either wait or retry to pay successfully. + - **Next Steps**: Retry after some time. + + + +### payment_risk_check_failed + + - **Description**: Payment was unsuccessful as your account does not pass the risk checks done by your bank. Try using another account. + - **Next Steps**: Retry after some time. + + + +### payment_timed_out + + - **Description**: Payment was unsuccessful as you could not complete it in time. + - **Next Steps**: Retry after some time. + + + +### pre_debit_notification_failed + + - **Description**: Unable to Notify the Customer. + - **Next Steps**: Retry after some time. + + + +### remitter_dispatch_failed + + - **Description**: Payment failed due to some issue at the customer's. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### request_timed_out + + + + General Timeout - Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Timeout - Bank Declined + + - **Description**: Payment was unsuccessful as it was declined by your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Timeout - Recurring Payment Creation + + - **Description**: Payment was unsuccessful as the recurring payment can not be created at this time. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + + + + + +### transaction_frequency_limit_exceeded + + - **Description**: Payment failed. Please try again with another bank account. + - **Next Steps**: Create a new mandate with the customer. + + + +### transaction_limit_exceeded + + + + Amount Limit Exceeded + + - **Description**: Payment failed because Transaction amount limit has exceeded. + - **Next Steps**: Reach out to the customer to collect the amount. + + + +### Bank Account Amount Limit + + - **Description**: Payment was unsuccessful as you exceeded the amount limit on the bank account linked to this UPI id. + - **Next Steps**: Ask the customer to retry after some time. + + + + + + + +### transaction_not_allowed + + - **Description**: Payment was unsuccessful as it was declined by your bank. Reach out to your bank for more details. Try using another account. + - **Next Steps**: Create a new mandate with the customer. + + + +### upi_dummy_payment + + - **Description**: Payment was a dummy payment for one time mandate registration. + - **Next Steps**: NA + + +## 1.2. Using a Registration Link + +Registration Links are an alternate way of creating an authorisation transaction. If you create a registration link, you need not create a customer or an order. + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. The customer can use the invoice to make the Authorisation Payment. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use [Token Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) to get notifications about successful payments against a registration link. Do not use payment webhooks for Authorisation Payments. +> + +### 1.2.1. Create a Registration Link + +The following endpoint creates a registration link you can share with your customers to make one time mandate payments. This is a dummy transaction that fails with an error `BAD_REQUEST_ERROR` when a customer tries to approve the mandate request from a PSP application. A token is created and marked as `confirmed` for the same. + +/subscription_registration/auth_links + +```curl: Curl +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": "100", + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "method": "upi", + "max_amount": "500", + "expire_at": 4102444799, + "frequency": "one_time" + }, + "receipt": "Receipt No. 23", + "email_notify": true, + "sms_notify": true, + "expire_by": 4102444799, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 100); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "Registration Link for Gaurav Kumar"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","upi"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +subscriptionRegistration.put("frequency","one_time"); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. #112"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('method'=>'upi','max_amount'=>'500','expire_at'=>'1634215992','frequency'=>'one_time'),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992,'notes' => array('note_key 1' => 'Beam me up Scotty','note_key 2' => 'Tea. Earl Gray. Hot.'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 100, + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + method: "upi", + max_amount: 500, + expire_at: 1634215992, + frequency: "one_time" + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "method": "upi", + "max_amount": 500, + "expire_at": 1634215992, + "frequency": "one_time" + }, + "receipt": "Receipt No. 5", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::SubscriptionRegistration.create(para_attr) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":9123456780 + }, + "type":"link", + "amount":100, + "currency":"INR", + "description":"12 p.m. Meals", + "subscription_registration":{ + "method":"upi", + "expire_at":1580480689, + "max_amount":500, + "frequency": "one_time" + }, + "receipt":"Receipt no. 1", + "expire_by":1880480689, + "sms_notify": True, + "email_notify": True, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer":map[string]interface{}{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + }, + "type":"link", + "amount":"100", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":map[string]interface{}{ + "method":"upi", + "max_amount":"500", + "expire_at":1609423824, + "frequency": "one_time" + }, + "receipt":"Receipt No. 1", + "email_notify":true, + "sms_notify":true, + "expire_by":1681987284, + "notes":map[string]interface{}{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot.", + }, +} +body, err := client.Invoice.CreateRegistrationLink(data, nil) +``` + +```json: Response +{ + "id": "inv_FHr1ekX0r2VCVK", + "entity": "invoice", + "receipt": "Receipt No. 23", + "invoice_number": "Receipt No. 23", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHr1ehR3nmNeXo", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 4102444799, + "issued_at": 1595489219, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595489219, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/ak1WxDB", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595489219, + "idempotency_key": null +} +``` + + +### Request Parameters + + `customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + + `subscription_registration` +: `object` Details of the authorisation transaction. + + `method` _mandatory_ + : `string` The payment method used to make authorisation transaction. Here, it is `card`. + + `max_amount` _mandatory_ + : `integer` Use to set the maximum amount (in paise) per debit request. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _optional_ + : `integer` The Unix timestamp till when you can use the token to charge the customer subsequent payments. The default value is 10 years and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. The value should be `one_time` for one time mandate. + + `sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + + +### Path Parameters + + `id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + + +### Path Parameters + + `id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. diff --git a/llm-content/api/payments/recurring-payments/upi-otm/faqs.md b/llm-content/api/payments/recurring-payments/upi-otm/faqs.md new file mode 100644 index 00000000..59d85105 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/upi-otm/faqs.md @@ -0,0 +1,41 @@ +--- +title: UPI One-time Mandate | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about UPI One-time Mandate. +--- + +# Frequently Asked Questions (FAQs) + +### 1. How is customer security ensured while handling recurring payment tokens? + + Razorpay deletes the token as soon as the recurring payment is completed, ensuring complete security. + + + +### 2. What is the time taken for the UPI One Time Mandate processing? + + The UPI One Time Mandate transactions occur realtime. The system immediately processes the transactions. + + + +### 3. How does the maximum blocked amount work for transactions? + + Businesses can set a maximum amount which will be blocked for the customer and can debit any amount equal to or less than the maximum amount. + + + +### 4. If the business blocks ₹10000 and debits ₹5000 what happens to the remaining amount? + + If the business blocks an amount and debits a lesser amount, the remaining amount will be unblocked by the bank and refunded back to the customer. + + + +### 5. Can businesses modify the mandate after it is created? + + No, once a mandate is created, it cannot be modified. + + + +### 6. Which are the top UPI apps supported for one time mandate transactions? + + The top UPI apps supported for mandate transactions are PhonePe and Google Pay. diff --git a/llm-content/api/payments/recurring-payments/upi-otm/one-time-payment.md b/llm-content/api/payments/recurring-payments/upi-otm/one-time-payment.md new file mode 100644 index 00000000..e77d0980 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/upi-otm/one-time-payment.md @@ -0,0 +1,390 @@ +--- +title: 3. Create a One Time Payment +description: Create and charge a one time payment using Razorpay APIs. +--- + +# 3. Create a One Time Payment + +You should perform the following steps to create and charge your customer a one time payment: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a one time payment](#32-create-a-one-time-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order to charge a one time mandate. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", "INR"); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': 'INR', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "INR", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"INR", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + + +## 3.2. Create a One Time Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a one-time payment. After the payment is complete (authorized or failed), the respective token will move to the `cancelled` state and you can no longer use the token. You will get the [token.cancelled](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-cancelled) webhook notification for the same. + +The following endpoint creates a one time payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "amount": 1000, + "currency": "INR", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("contact", "9000090000"); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", "INR"); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'gaurav.kumar@example.com','contact'=>'9000090000','amount'=>100,'currency'=>'INR','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "amount": 1000, + "currency": "INR", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': 'gaurav.kumar@example.com', + 'contact': 9000090000, + 'amount': 1000, + 'currency': 'INR', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': true, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "amount": 1000, + "currency": "INR", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "amount": 1000, + "currency": "INR", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9000090000"); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id": "pay_1Aa00000000001", + "razorpay_order_id": "order_1Aa00000000001", + "razorpay_signature": "9398a4854983909b3df3f700e1a300f39bc48bbc1a125304cabd646fd6a006c6" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + + + +`email ` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact ` _mandatory_ +: `integer` The customer's phone number. For example, `9876543210`. + +`currency` _mandatory_ +: `string` 3-letter ISO currency code for the payment. Currently, only `INR` is allowed. + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`description`_optional_ +: `string` A user-entered description for the payment. For example, `Creating recurring payment for Gaurav Kumar` + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. diff --git a/llm-content/api/payments/recurring-payments/upi-otm/tokens.md b/llm-content/api/payments/recurring-payments/upi-otm/tokens.md new file mode 100644 index 00000000..b80e553c --- /dev/null +++ b/llm-content/api/payments/recurring-payments/upi-otm/tokens.md @@ -0,0 +1,393 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_FHfAzEJ51k8NLj" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentid = "pay_FHfqtkRzWvxky4"; + +Payment payment = client.Payment.Fetch(paymentid); +``` + +```json: Debit Payment +{ + "id": "pay_FHfAzEJ51k8NLj", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfANdTUYeP8lb", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfAzGzREc1ug6", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595447490 +} +```json: Authorisation Payment +{ + "id": "pay_QDhVJ5M23wt4rh", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "failed", + "order_id": "order_QDhT2PqFJvtg4y", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "success@razorpay", + "email": "gaurav.kumar@example.com", + "contact": "+919123456780", + "customer_id": "cust_Q0g6LTYw3obZEn", + "token_id": "token_QDhVJHYr5m87fF", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey\u2026 decaf.", + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + "optimizer_provider_name": "razorpay" + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment was a dummy payment for one time mandate registration.", + "error_source": "business", + "error_step": "payment_initiation", + "error_reason": "upi_dummy_payment", + "acquirer_data": { + "rrn": null + }, + "gateway_provider": "Razorpay", + "created_at": 1743490280, + "upi": { + "vpa": "success@razorpay" + } +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` via the [payment.failed webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-failed). +> + + +### Path Parameters + + `id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + + +## 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> - This endpoint will not fetch the details of expired and unused tokens. +> - The UPI tokens are not populated in the API response if the `save_vpa` feature is not enabled in your account. Please raise a request with our Support team to get this activated. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +List tokens = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + + +### Path Parameters + + `id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + + +## 2.3. Delete Tokens + +> **WARN** +> +> +> **Watch Out!** +> +> Deleting a token removes it from Razorpay's database. The deleted token will not appear on the Dashboard or when all tokens are fetched. However, it does not cancel the mandate. If you wish to cancel the mandate from NPCI, use the [Cancel Token API](#24-cancel-token). +> + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameters + + `customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + + +## 2.4. Cancel Token +The following endpoint initiates cancellation of the mandate from NPCI. + +/customers/:customer_id/tokens/:token_id/cancel + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PUT https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001/cancel +```json: Response +{ + "status": "cancellation_initiated” +} +``` + + +### Path Parameters + + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be cancelled. For example, `token_1Aa00000000001`. diff --git a/llm-content/api/payments/recurring-payments/upi-tpv/create-authorization-transaction.md b/llm-content/api/payments/recurring-payments/upi-tpv/create-authorization-transaction.md new file mode 100644 index 00000000..a87fa7fc --- /dev/null +++ b/llm-content/api/payments/recurring-payments/upi-tpv/create-authorization-transaction.md @@ -0,0 +1,1651 @@ +--- +title: 1. Create the Authorisation Transaction +description: Create an authorisation transaction for UPI. +--- + +# 1. Create the Authorisation Transaction + +You can create an authorisation transaction using [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +## 1.1 Using Razorpay APIs + +To create an authorisation transaction using Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorisation-payment). + +> **INFO** +> +> +> **Handy Tips** +> +> For the Authorisation Payment to be successful in a day (for example, 5th June), you should create an Order and the Authorisation Transaction on the same day (5th June) before 11:59 pm. +> + +### 1.1.1 Create a Customer + +Razorpay links recurring tokens to customers via a unique identifier. This unique identifier for the customer is generated using the Customer API. + +You can create a customer using the below endpoint. + +/customers + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name","Gaurav Kumar"); +customerRequest.put("contact","9123456780"); +customerRequest.put("email","gaurav.kumar@example.com"); +customerRequest.put("fail_existing", "0"); +customerRequest.put("gstin","29XAbbA4369J1PA"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + 'name': 'Gaurav Kumar', + 'email': 'gaurav.kumar@example.com', + 'contact': '9123456780', + 'fail_existing': '0', + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->create(array('name' => 'Gaurav Kumar', 'email' => 'gaurav.kumar@example.com','contact'=>'9123456780','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", "Gaurav Kumar"); +options.Add("contact", "9123456780"); +options.Add("email", "gaurav.kumar@example.com"); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "gstin": "29XAbbA4369J1PA", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Customer.create(para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({ + name: "Gaurav Kumar", + contact: 9123456780, + email: "gaurav.kumar@example.com", + fail_existing: "0", + gstin: "29XAbbA4369J1PA", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +```json: Response +{ + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 +} +``` + +Once a customer is created, you can create an order for the authorization of the payment. + +#### Request Parameters + +`name` _mandatory_ +: `string` The customer's name. For example, `Gaurav Kumar`. + +`email ` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact ` _mandatory_ +: `string` The customer's phone number. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.1.2. Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +> **INFO** +> +> +> **Handy Tips** +> +> The subsequent payment frequency is displayed on your customer's PSP. They can select the required frequency while registering for the mandate. +> + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":100, + "currency":"INR", + "customer_id":"cust_4xbQrmEoA5WJ01", + "method":"upi", + "token":{ + "max_amount":200000, + "expire_at":2709971120, + "frequency":"monthly", + "recurring_value": 25, + "recurring_type": "on" + }, + "bank_account":{ + "account_number":"123456789012345", + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + }, + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 100); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_4xbQrmEoA5WJ01"); +orderRequest.put("method", "upi"); +orderRequest.put("receipt", "receipt#1"); +JSONObject token = new JSONObject(); +token.put("max_amount","200000"); +token.put("expire_at","2709971120"); +token.put("frequency","monthly"); +token.put("recurring_value","25"); +token.put("recurring_type","on"); +orderRequest.put("token", token); +JSONObject bank_account = new JSONObject(); +bank_account.put("account_number","123456789012345"); +bank_account.put("name","Gaurav Kumar"); +bank_account.put("ifsc","HDFC0000053"); +orderRequest.put("bank_account", bank_account); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','method' => 'upi','customer_id' => 'cust_4xbQrmEoA5WJ01', 'token' => array('max_amount' => 200000, 'expire_at' => 2709971120, 'frequency' => 'monthly', 'recurring_value' => '25', 'recurring_type' => 'on'),'bank_account' => array('account_number' => 123456789012345, 'name' => Gaurav Kumar, 'ifsc' => 'HDFC0000053'),'receipt' => 'Receipt No. 1' ,'notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'))); + +```javascript: Node.js +var instance = new Razorpay({ + key_id: 'YOUR_KEY_ID', + key_secret: 'YOUR_SECRET' +}) + +instance.orders.create({ + amount: 0, + currency: "INR", + method: "upi", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "netbanking", + max_amount: 9999900, + expire_at: 4102444799, + recurring_value: 25, + recurring_type: "on", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }, + bank_account: { + account_number: 123456789012345, + name: "Gaurav Kumar", + ifsc: "HDFC0000053" + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount":0, + "currency":"INR", + "method":"upi", + "customer_id":"cust_1Aa00000000001", + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Beam me up Scotty", + "notes_key_2":"Engage" + }, + "token":{ + "auth_type":"netbanking", + "max_amount":9999900, + "expire_at":4102444799, + "recurring_value": 25, + "recurring_type": "on", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } + }, + "bank_account":{ + "account_number":123456789012345, + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 0, + "currency": "INR", + "method": "upi", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "recurring_value": 25, + "recurring_type": "on", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + }, + "bank_account":{ + "account_number":123456789012345, + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + } +} +Razorpay.Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount":100, + "currency":"INR", + "customer_id":"", + "method":"upi", + "token":map[string]interface{}{ + "max_amount":5000, + "expire_at":2709971120, + "frequency":"monthly", + "recurring_value": 25, + "recurring_type": "on" + }, + "bank_account":map[string]interface{}{ + "account_number":123456789012345, + "name":Gaurav Kumar, + "ifsc":"HDFC0000053", + }, + "receipt":"Receipt No. 1", + "notes":map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf.", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_1Aa00000000002", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "method": "upi", + "attempts": 0, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + "created_at": 1565172642 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"invaild_account_number", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + }, + "field":"bank_account.account_number" + } +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount, in paise. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _mandatory_ +: `string` Payment method for the authorisation transaction. Here, the value should be `upi`. + +`receipt` _optional_ +: `string` Unique identifier for the order entered by you. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: Details related to the authorization such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be debited in a single charge. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The default value is 10 years and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + + `recurring_value` _optional_ + : `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + + `recurring_type` _optional_ + : `string` Determines when the recurring debit can be done. Possible values are: + - `on`: Recurring debit happens on the exact day of every month. + +> **INFO** +> +> +> **Handy Tips** +> +> For creating an order with `recurring_type`=`on`, set the `recurring_value` parameter to the current date. +> + + - `before`: Recurring debit can happen any time before the specified date. + - `after`: Recurring debit can happen any time after the specified date. + + For example, if the frequency is `monthly`, recurring_value is `17` and recurring_type is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if recurring_type is `after`, recurring debit can only happen on or after the 17th of the month. + +`bank_account` _mandatory_ +: Details of the bank account of the customer. + + `account_number` _mandatory_ + : `integer` The bank account number of the customer. For example, `123456789012345`. + + `name` _mandatory_ + : `string` The name of the bank account holder. + + `ifsc` _mandatory_ + : The IFSC of the bank. For example, `HDFC0000053`. + +#### Error Response Parameters + +Given below is a list of possible errors you may face while creating an Order. + +Error | Cause | Solution +--- +The id provided does not exist | This error occurs when you enter an incorrect `customer_id`. | Make sure to enter a valid `customer_id`. +--- +The api key provided is invalid | This error occurs when you enter the wrong API key or secret. | Make sure to enter a valid API key and secret. +--- +The amount must be at least INR 1.00. | This error occurs when you enter an amount less than INR 1. | Make sure the entered amount is atleast INR 1.00. +--- +The currency should be INR when method is upi | This error occurs when you enter a currency other than INR | Make sure the currency is INR. +--- +The amount field is required. | This error occurs when you have not entered the amount or the `max_amount` value. | Make sure to enter the `max_amount` value. +--- +The minimum transaction amount allowed is Re. 5. | This error occurs when you enter the maximum amount less than the minimum amount. | Make sure the `max_amount` value is more than the `min_amount` value. +--- +invaild_account_number | This error occurs when you have not entered the `account_number`. | Make sure to enter a valid `account_number`. +--- +The order amount cannot be greater than the token max amount for upi recurring. | This error occurs when the order amount exceeds the `token_max` amount passed in the API request payload. | Ensure the order amount is lesser than the `token_max` account. + +### 1.1.3. Create an Authorisation Payment + +Create a payment checkout form for customers to make Authorisation Transaction and register their mandate. You can use the Handler Function or Callback URL. + +Handler Function | Callback URL +--- +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. | When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. + +> **WARN** +> +> +> +> **Watch Out!** +> +> - The callback URL is not supported for recurring payments created using the registration link. +> - While handling the first time authorisation payment response, consume the `error_reason` field with value `upi_dummy_payment` and `error_description` field with value `Payment was a dummy payment for one time mandate registration.` to identify successful mandate registration. The parent `error_code` will be `BAD_REQUEST_ERROR`. +> + +```html: Checkout with handler functions + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "handler": function (response) { + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature); + }, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +```html: Manual checkout with Callback URL + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +``` + +#### Additional Checkout Fields + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +`recurring` _mandatory_ +: `string` Determines if the recurring payment is enabled or not. Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this if you want to allow **recurring payments** and **one-time payment** in the same flow. + +#### Error Response Parameters + +Given below is a list of possible errors you may face while making the authorisation payment. + + +### adequate_funds_not_available_blocked + + - **Description**: Sufficient unblocked funds not available in customer's account. Please ask customer to add fund and try again. + - **Next Steps**: Please ask customer to add sufficient unblocked funds and try again. + + + +### bad_request_error + + - **Description**: Invalid Mandate Sequence Number. + - **Next Steps**: Retry after some time during the valid cycle. + + + +### bank_account_invalid + + - **Description**: Payment failed because Account linked to VPA is invalid. + - **Next Steps**: Create a new mandate with the customer. + + + +### bank_account_validation_failed + + - **Description**: Payment was unsuccessful as the details are invalid. Please retry with the right details. + - **Next Steps**: Ask the customer to retry again. + + + +### bank_not_available + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### bank_technical_error + + + + Bank Temporarily Unavailable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Temporary Bank Issue + + - **Description**: Payment was unsuccessful due to a temporary issue at your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Bank Declined + + - **Description**: Payment was unsuccessful as it was declined by your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Bank or Wallet Gateway Error + + - **Description**: Payment processing failed due to error at bank or wallet gateway. + - **Next Steps**: Retry after some time. + + + +### General Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Bank Services Halt + + - **Description**: Payment was unsuccessful due to a temporary halt of services at this bank. + - **Next Steps**: Retry after some time. + + + + + + + +### credit_to_beneficiary_failed + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### debit_declined + + - **Description**: Payment was unsuccessful as it was declined by remitter bank. + - **Next Steps**: Create a new mandate with the customer. + + + +### debit_instrument_blocked + + - **Description**: Payment was unsuccessful as the account linked to this UPI ID is blocked. Try using another account. + - **Next Steps**: Create a new mandate with the customer. + + + +### duplicate_mandate_request + + - **Description**: Duplicate mandate request. Please try again with another mandate request. + - **Next Steps**: Please try again with another mandate request. + + + +### gateway_technical_error + + + + Bank or Wallet Gateway Error + + - **Description**: Payment processing failed due to error at bank or wallet gateway. + - **Next Steps**: Retry after some time. + + + +### Temporary Issue with Money Deduction + + - **Description**: Payment was unsuccessful due to a temporary issue. If money got deducted, reach out to the seller. + - **Next Steps**: Retry after some time. + + + + + + + +### incorrect_pin + + - **Description**: You have entered an incorrect PIN on the UPI app. Please retry with the correct PIN. + - **Next Steps**: Ask the customer to retry with correct PIN. + + + +### insufficient_funds + + - **Description**: Transaction failed due to insufficient funds. + - **Next Steps**: Ask the customer to add balance to their account and retry. + + + +### invalid_request + + - **Description**: Payment processing failed due to error at bank or wallet gateway. + - **Next Steps**: Retry after some time. + + + +### invalid_response_from_gateway + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### invalid_transaction_beneficiary + + - **Description**: Beneficiary address resolution failed. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### invalid_vpa + + - **Description**: You have entered an incorrect UPI ID. Please retry with the correct UPI ID. + - **Next Steps**: Ask the customer to retry with a valid VPA. + + + +### issuer_dispatch_failed + + - **Description**: Payment failed due to some issue at the issuer bank. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### limit_exceeded_remitting_bank + + - **Description**: Limit exceeded for remitter bank. Please ask customer to try with another bank account. + - **Next Steps**: Please ask customer to try with another bank account. + + + +### mandate_debit_beyond_psp_amount_cap + + - **Description**: Debit amount is beyond payer PSP specified amount cap. Please reduce the amount and try again. + - **Next Steps**: Please reduce the mandate amount to match customer PSP. + + + +### mandate_request_limit_breached + + - **Description**: Maximum number of mandate creation requests exceeded for customer's bank account. Please wait for some time before initiating new mandate creation requests. + - **Next Steps**: Please wait for some time before initiating new mandate creation requests. + + + +### mobile_number_invalid + + - **Description**: Registered Mobile number linked to the account has been changed or removed. + - **Next Steps**: Create a new mandate with the customer. + + + +### nature_of_debit_not_allowed + + - **Description**: Nature of debit not allowed in customer's account. Please ask the customer to use a different bank account. + - **Next Steps**: Please ask the customer to use a different bank account. + + + +### no_financial_address_record_found + + - **Description**: No financial address record found for this VPA. Please ask customer to try with another bank account. + - **Next Steps**: Please ask customer to try with other bank account. + + + +### no_original_request_found + + - **Description**: No mandate details were found in the record during debit. Please try after some time. + - **Next Steps**: Please try after some time. + + + +### payment_collect_request_expired + + - **Description**: Payment was unsuccessful as you could not pay with the UPI app within time. + - **Next Steps**: Retry after some time. + + + +### payment_declined + + + + Bank Declined Payment + + - **Description**: Payment was unsuccessful as it was declined by your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Ask the customer to retry with other account. + + + +### Customer Declined Payment + + - **Description**: You have declined the payment request on the UPI app. Please retry when you are ready. + - **Next Steps**: Ask the customer to approve the payment. + + + + + + + +### payment_failed + + - **Description**: Payment was unsuccessful due to a temporary issue. If amount got deducted, it will be refunded within 5-7 working days. + - **Next Steps**: Retry after 1 hour. + + + +### payment_pending + + - **Description**: The status of your payment is pending. You can either wait or retry to pay successfully. + - **Next Steps**: Retry after some time. + + + +### payment_risk_check_failed + + - **Description**: Payment was unsuccessful as your account does not pass the risk checks done by your bank. Try using another account. + - **Next Steps**: Retry after some time. + + + +### payment_timed_out + + - **Description**: Payment was unsuccessful as you could not complete it in time. + - **Next Steps**: Retry after some time. + + + +### pre_debit_notification_failed + + - **Description**: Unable to Notify the Customer. + - **Next Steps**: Retry after some time. + + + +### remitter_dispatch_failed + + - **Description**: Payment failed due to some issue at the customer's. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### request_timed_out + + + + General Timeout - Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Timeout - Bank Declined + + - **Description**: Payment was unsuccessful as it was declined by your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Timeout - Recurring Payment Creation + + - **Description**: Payment was unsuccessful as the recurring payment can not be created at this time. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + + + + + +### transaction_frequency_limit_exceeded + + - **Description**: Payment failed. Please try again with another bank account. + - **Next Steps**: Create a new mandate with the customer. + + + +### transaction_limit_exceeded + + + + Amount Limit Exceeded + + - **Description**: Payment failed because Transaction amount limit has exceeded. + - **Next Steps**: Reach out to the customer to collect the amount. + + + +### Bank Account Amount Limit + + - **Description**: Payment was unsuccessful as you exceeded the amount limit on the bank account linked to this UPI id. + - **Next Steps**: Ask the customer to retry after some time. + + + + + + + +### transaction_not_allowed + + - **Description**: Payment was unsuccessful as it was declined by your bank. Reach out to your bank for more details. Try using another account. + - **Next Steps**: Create a new mandate with the customer. + + + +### upi_dummy_payment + + - **Description**: Payment was a dummy payment for one time mandate registration. + - **Next Steps**: NA + + +## 1.2. Using a Registration Link + +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the [API](#121-create-a-registration-link) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> - You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> - You can [use Webhooks to get notifications about successful payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) against a registration link. +> + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. + +A registration link must always have the amount (in Paise) that the customer will be charged when making the authorisation payment. For UPI, the amount must be a minimum of `₹1`. + +### 1.2.1. Create a Registration Link + +The following endpoint creates a registration link. + +/subscription_registration/auth_links + +```curl: Curl +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780" + }, + "type":"link", + "amount":"100", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":{ + "method":"upi", + "max_amount":"500", + "expire_at":4102444799, + "frequency":"monthly", + "recurring_value": 25, + "recurring_type": "on", + "bank_account":{ + "account_number":"123456789012345", + "name":"Gaurav Kumar", + "ifsc_code":"HDFC0000053" + } + }, + "receipt":"Receipt No. 23", + "email_notify":true, + "sms_notify":true, + "expire_by":4102444799, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 100); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "Registration Link for Gaurav Kumar"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","upi"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +subscriptionRegistration.put("frequency","monthly"); +subscriptionRegistration.put("recurring_value","25"); +subscriptionRegistration.put("recurring_type","on"); +JSONObject bank_account = new JSONObject(); +bank_account.put("account_number","123456789012345"); +bank_account.put("name","Gaurav Kumar"); +bank_account.put("ifsc_code","HDFC0000053"); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. #112"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('method'=>'upi','max_amount'=>'500','expire_at'=>'1634215992','recurring_value'=>'25','recurring_type'=>'on',bank_account' => array('account_number' => 123456789012345, 'name' => Gaurav Kumar, 'ifsc_code' => 'HDFC0000053')),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992,'notes' => array('note_key 1' => 'Beam me up Scotty','note_key 2' => 'Tea. Earl Gray. Hot.'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 100, + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + method: "upi", + max_amount: 500, + expire_at: 1634215992, + recurring_value: 25, + recurring_type: "on", + bank_account: { + account_number: 123456789012345, + name: "Gaurav Kumar", + ifsc_code: "HDFC0000053" + } + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "method": "upi", + "max_amount": 500, + "expire_at": 1634215992, + "recurring_value": 25, + "recurring_type": "on", + "bank_account": { + "account_number": 123456789012345, + "name": "Gaurav Kumar", + "ifsc_code": "HDFC0000053" + } + }, + "receipt": "Receipt No. 5", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::SubscriptionRegistration.create(para_attr) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":9123456780 + }, + "type":"link", + "amount":100, + "currency":"INR", + "description":"12 p.m. Meals", + "subscription_registration":{ + "method":"upi", + "expire_at":1580480689, + "max_amount":500, + "recurring_value": 25, + "recurring_type": "on", + "bank_account": { + "account_number": 123456789012345, + "name": "Gaurav Kumar", + "ifsc_code": "HDFC0000053" + } + }, + "receipt":"Receipt no. 1", + "expire_by":1880480689, + "sms_notify": True, + "email_notify": True, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer":map[string]interface{}{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + }, + "type":"link", + "amount":"100", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":map[string]interface{}{ + "method":"upi", + "max_amount":"500", + "expire_at":1609423824, + "frequency": "monthly", + "recurring_value": 25, + "recurring_type": "on", + "bank_account": { + "account_number": 123456789012345, + "name": "Gaurav Kumar", + "ifsc_code": "HDFC0000053" + } + }, + "receipt":"Receipt No. 1", + "email_notify":true, + "sms_notify":true, + "expire_by":1681987284, + "notes":map[string]interface{}{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot.", + }, +} +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```json: Response +{ + "id": "inv_FHr1ekX0r2VCVK", + "entity": "invoice", + "receipt": "Receipt No. 23", + "invoice_number": "Receipt No. 23", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHr1ehR3nmNeXo", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 4102444799, + "issued_at": 1595489219, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595489219, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/ak1WxDB", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595489219, + "idempotency_key": null +} +``` + +#### Request Parameters + +`customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + +`subscription_registration` +: Details of the authorisation transaction. + + `method` _mandatory_ + : `string` The payment method used to make authorisation transaction. Here, it is `card`. + + `max_amount` _mandatory_ + : `integer` Use to set the maximum amount (in paise) per debit request. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _optional_ + : `integer` The Unix timestamp till when you can use the token to charge the customer subsequent payments. The default value is 10 years and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + +`recurring_value` _optional_ +: `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + +`recurring_type` _optional_ +: `string` Determines when the recurring debit can be done. Possible values are: + +- `on`: recurring debit happens on the exact day of every month. + - `before`: recurring debit can happens any time before the specified date. + - `after`: recurring debit can happens any time after the specified date. + +For example, if the frequency is `monthly`, recurring_value is `17` and recurring_type is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if recurring_type is `after`, recurring debit can only happen on or after the 17th of the month. + + `bank_account` _mandatory_ + : Details of the bank account of the customer. + + `account_number` _mandatory_ + : `integer` The bank account number of the customer. For example, `123456789012345`. + + `name` _mandatory_ + : `string` The name of the bank account holder. + + `ifsc` _mandatory_ + : `string` The IFSC of the bank. For example, `HDFC0000053`. + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + +#### Path Parameters + +`id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. diff --git a/llm-content/api/payments/recurring-payments/upi-tpv/create-subsequent-payments.md b/llm-content/api/payments/recurring-payments/upi-tpv/create-subsequent-payments.md new file mode 100644 index 00000000..927cf906 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/upi-tpv/create-subsequent-payments.md @@ -0,0 +1,488 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is authorised. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created when you created the authorisation transaction. + +Use the below endpoint to create an order: + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"INR", + "payment_capture":true, + "method":"upi", + "bank_account":{ + "account_number":"123456789012345", + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + }, + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", "INR"); +orderRequest.put("payment_capture", true); +orderRequest.put("method", "upi"); +JSONObject bank_account = new JSONObject(); +bank_account.put("account_number","123456789012345"); +bank_account.put("name","Gaurav Kumar"); +bank_account.put("ifsc","HDFC0000053"); +orderRequest.put("bank_account", bank_account); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true,'method' => 'upi','bank_account' => array('account_number' => 123456789012345, 'name' => Gaurav Kumar, 'ifsc' => 'HDFC0000053'),'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "method":"upi", + "bank_account": { + "account_number": 123456789012345, + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': 'INR', + 'payment_capture': True, + 'method': 'upi', + 'bank_account':{ + 'account_number':123456789012345, + 'name':'Gaurav Kumar', + 'ifsc':'HDFC0000053' + }, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "INR", + "payment_capture": true, + "method":"upi", + "receipt": "Receipt No. 1", + "bank_account":{ + "account_number":123456789012345, + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "method":"upi", + "bank_account":map[string]interface{}{ + "account_number":123456789012345, + "name":Gaurav Kumar, + "ifsc":"HDFC0000053", + }, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_1Aa00000000002", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "bank_account":{ + "account_number":"123456789012345", + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + "created_at": 1565172642 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is `100` (₹1). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether tha payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +`bank_account` _mandatory_ +: Details of the bank account of the customer. + + `account_number` _mandatory_ + : `integer` The bank account number of the customer. For example, `123456789012345`. + + `name` _mandatory_ + : `string` The name of the bank account holder. + + `ifsc` _mandatory_ + : The IFSC of the bank. For example, `HDFC0000053`. + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating an Order. + +Error | Cause | Solution +--- +The api key provided is invalid | This error occurs when you enter the wrong API key or secret. | Make sure to enter the valid API key and secret. +--- +The amount must be at least INR 1.00. | This error occurs when you enter an amount less than INR 1. | Make sure the entered amount is atleast INR 1. +--- +The currency should be INR when method is upi | This error occurs when you enter a currency other than INR. | Make sure the currency is INR. +--- + +## 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +> **INFO** +> +> +> **UPI Payments** +> +> - We recommend sending a pre-debit notification to the customer 48 hours before the debit date. +> - For UPI, it may take between 24-36 hours for the subsequent payment to reflect on your Dashboard. +> - This is because of the failure of pre-debit notification and/or any retries that we attempt for the payment. +> - Do not create another subsequent payment until you get the status of the previous one. +> + +> **WARN** +> +> +> **UPI Payments** +> +> - The subsequent payment may fail if there is late authorisation of an earlier payment. +> - For UPI, **do not** create subsequent payments on the last day of the cycle. This will cause the payment to fail. +> + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating a Recurring Payment. + +Error | Cause | Solution +--- +Amount exceeds maximum amount allowed | This error occurs when you enter an amount greater than the authorized maximum amount. | Make sure the amount is equal to or less than the maximum amount for the particular token. +--- +Your payment amount is different from your order amount. To pay successfully, please try using right amount. | This error occurs when you enter a different amount while creating a subsequent payment. | Make sure the order and the subsequent payment amounts are the same. +--- +bank_account_invalid | This error occurs when The customer's bank account is either closed or no longer valid. The customer or bank may have closed the account. | The customer should re-register the mandate. +--- +bank_account_validation_failed | This error occurs when the bank could not validate the customer registration for debiting the customer. | You can retry after some time or reach out to Razorpay. +--- +bank_technical_error | The destination bank was facing technical problems at the time the payment was attempted. This error usually occurs when the Core Banking System encounters a technical error while processing the payment. | You can retry after some time or reach out to Razorpay. +--- +debit_instrument_blocked | This error occurs when the bank temporarily blocks withdrawals on the customer's account. | The customer should reach out to their bank to get the account unblocked. +--- +debit_instrument_inactive | This error occurs when the bank temporarily blocks withdrawals on the customer's account. | The customer should reach out to their bank to get the account unblocked. +--- +gateway_technical_error | The payment failed due to a technical error at the gateway. This error usually occurs when the gateway server encounters a technical error while processing the payment. | You can retry after some time or reach out to Razorpay. +--- +input_validation_failed | The payment failed due to the wrong request or input sent in the payment request. You can also get this error while creating a payment with incorrect parameter values on the Dashboard. | Rectify the validation issues and try again. Check the error description and field parameters for more information about the error. +Check your integration/payment request or reach out to Razorpay. Refer to the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). +--- +insufficient_funds | This error occurs when the customer does not have sufficient funds in the account to complete the payment. | You can retry after asking the customer to add funds to their bank account. +--- +invalid_amount | This error occurs when the amount or currency passed in the payment request is not supported or invalid. This can arise when you pass a different variable type in the amount field or pass an unsupported amount value. | You can check your integration and payment request. +--- +mandate_not_active | This error occurs when the registered mandate is no longer active. The customer or bank could have cancelled the mandate. | The customer should re-register the mandate. +--- +payment_cancelled | This error occurs when the customer has explicitly cancelled the payment. The customer could have given a cancellation instruction to their banks. | You can retry after informing the customer to remove the cancellation request. +--- +payment_declined | Destination Bank or Gateway has declined the payment due to business or technical reasons such as terminal and pricing. | You can retry after some time or reach out to Razorpay. +--- +payment_failed | This error occurs when the destination Bank or Gateway has declined the payment due to business or technical reasons such as terminal and pricing. | You can retry after some time or reach out to Razorpay. +--- +payment_mandate_not_active | This error occurs when the is not yet activated the registered mandate. Banks sometimes take longer to activate the mandates at their end. | You can retry after some time or reach out to Razorpay. +--- +payment_timed_out | This error occurs when the bank with the registered mandate could not debit the customer's account in time. | You can retry after some time or reach out to Razorpay. +--- +server_error | This error occurs when there is a technical error at Razorpay's server. | You can retry after some time or reach out to Razorpay. +--- +transaction_limit_exceeded | This error occurs when customers exceed their account's credit or debit limit during high-value transactions. | You can retry after some time by informing the customer to update their transaction limits. +--- diff --git a/llm-content/api/payments/recurring-payments/upi-tpv/tokens.md b/llm-content/api/payments/recurring-payments/upi-tpv/tokens.md new file mode 100644 index 00000000..48f31693 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/upi-tpv/tokens.md @@ -0,0 +1,391 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +Know about about [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/integrate.md#fetch-emandate-registration-details). + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_FHfAzEJ51k8NLj" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentid = "pay_FHfqtkRzWvxky4"; + +Payment payment = client.Payment.Fetch(paymentid); +``` + +```json: Debit Payment +{ + "id": "pay_FHfAzEJ51k8NLj", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfANdTUYeP8lb", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfAzGzREc1ug6", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595447490 +} +```json: Authorisation Payment +{ + "id": "pay_QDhVJ5M23wt4rh", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "failed", + "order_id": "order_QDhT2PqFJvtg4y", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "success@razorpay", + "email": "gaurav.kumar@example.com", + "contact": "+919123456780", + "customer_id": "cust_Q0g6LTYw3obZEn", + "token_id": "token_QDhVJHYr5m87fF", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey\u2026 decaf.", + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + "optimizer_provider_name": "razorpay" + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment was a dummy payment for one time mandate registration.", + "error_source": "business", + "error_step": "payment_initiation", + "error_reason": "upi_dummy_payment", + "acquirer_data": { + "rrn": null + }, + "gateway_provider": "Razorpay", + "created_at": 1743490280, + "upi": { + "vpa": "success@razorpay" + } +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` via the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +## 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> - This endpoint will not fetch the details of expired and unused tokens. +> - The UPI tokens are not populated in the API response if the `save_vpa` feature is not enabled in your account. Please raise a request with our Support team to get this activated. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +List tokens = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +## 2.3. Delete Tokens + +> **WARN** +> +> +> **Watch Out!** +> +> Deleting a token removes it from Razorpay's database. The deleted token will not appear on the Dashboard or when all tokens are fetched. However, it does not cancel the mandate. If you wish to cancel the mandate from NPCI, use the [Cancel Token API](#24-cancel-token). +> + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameters + + `customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + + +## 2.4. Cancel Token +The following endpoint initiates cancellation of the mandate from NPCI. + +/customers/:customer_id/tokens/:token_id/cancel + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PUT https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001/cancel +```json: Response +{ + "status": "cancellation_initiated” +} +``` + + +### Path Parameters + + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be cancelled. For example, `token_1Aa00000000001`. diff --git a/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md b/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md new file mode 100644 index 00000000..4afe1130 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md @@ -0,0 +1,1970 @@ +--- +title: 1. Create an Authorisation Transaction +description: Create an authorisation transaction for UPI using Razorpay APIs and Registration Link. +--- + +# 1. Create an Authorisation Transaction + +> **WARN** +> +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated for new UPI Autopay registrations effective 28 February 2026. +> - Customers can no longer register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> - Subsequent debits for existing mandates created via UPI Collect will continue to be executed without change. +> +> **Exemptions** +> +> UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only). +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required** +> +> - If you are a new Razorpay user, use UPI Intent. +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI Autopay registrations. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/recurring-payments/standard-checkout.md). +> +> + +You can create an authorisation transaction using [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +## 1.1 Using Razorpay APIs + +To create an authorisation transaction using Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorisation-payment). + +> **INFO** +> +> +> **Handy Tips** +> +> For the Authorisation Payment to be successful in a day (for example, 5th June), you should create an Order and the Authorisation Transaction on the same day (5th June) before 11:59 pm. +> + +### 1.1.1 Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + +### Request Parameters + + `name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + + +### 1.1.2 Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + + +### Sample Code + + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "customer_id": "cust_4xbQrmEoA5WJ01", + "method": "upi", + "token": { + "max_amount": 200000, + "expire_at": 2709971120, + "frequency": "monthly", + "recurring_value": 25, + "recurring_type": "on" + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 100); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_4xbQrmEoA5WJ01"); +orderRequest.put("method", "upi"); +orderRequest.put("receipt", "receipt#1"); +JSONObject token = new JSONObject(); +token.put("max_amount","200000"); +token.put("expire_at","2709971120"); +token.put("frequency","monthly"); +token.put("recurring_value","25"); +token.put("recurring_type","on"); +orderRequest.put("token", token); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','method' => 'upi','customer_id' => 'cust_4xbQrmEoA5WJ01', 'token' => array('max_amount' => 200000, 'expire_at' => 2709971120, 'frequency' => 'monthly', 'recurring_value' => '25', 'recurring_type' => 'on'),'receipt' => 'Receipt No. 1' ,'notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + method: "upi", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "netbanking", + max_amount: 9999900, + expire_at: 4102444799, + recurring_value: 25, + recurring_type: "on", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount":0, + "currency":"INR", + "method":"upi", + "customer_id":"cust_1Aa00000000001", + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Beam me up Scotty", + "notes_key_2":"Engage" + }, + "token":{ + "auth_type":"netbanking", + "max_amount":9999900, + "expire_at":4102444799, + "recurring_value": 25, + "recurring_type": "on", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 0, + "currency": "INR", + "method": "upi", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "recurring_value": 25, + "recurring_type": "on", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } +} +Razorpay.Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount":100, + "currency":"INR", + "customer_id":"", + "method":"upi", + "token":map[string]interface{}{ + "max_amount":5000, + "expire_at":2709971120, + "frequency":"monthly", + "recurring_value": 25, + "recurring_type": "on" + }, + "receipt":"Receipt No. 1", + "notes":map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf.", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_1Aa00000000002", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + "created_at": 1565172642 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + + + +> **INFO** +> +> +> **Handy Tips** +> +> The subsequent payment frequency is displayed on your customer's PSP. They can select the required frequency while registering for the mandate. +> + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `upi`. + +`receipt` _optional_ +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be debited in a single charge. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The default value is 10 years and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + + `recurring_value` _optional_ + : `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + + `recurring_type` _optional_ + : `string` Determines when the recurring debit can be done. Possible values are: + - `on`: Recurring debit happens on the exact day of every month. + +> **INFO** +> +> +> **Handy Tips** +> +> For creating an order with `recurring_type`=`on`, set the `recurring_value` parameter to the current date. +> + + - `before`: Recurring debit can happen any time before the specified date. + - `after`: Recurring debit can happen any time after the specified date. + + For example, if the `frequency` is `monthly`, `recurring_value` is `17` and `recurring_type` is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if `recurring_type` is `after`, recurring debit can only happen on or after the 17th of the month. + + + +### Response Parameters + + `id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000001`. + +`entity` +: `string` The entity that has been created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. For emandate, the amount should be `0`. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `rcptid #1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + + + +### Error Response Parameters + + Given below is a list of possible errors you may face while creating an Order. + +Error | Cause | Solution +--- +The id provided does not exist | This error occurs when you enter an incorrect `customer_id.` | Make sure to enter a valid `customer_id`. +--- +The api key provided is invalid | This error occurs when you enter the wrong API key or secret. | Make sure to enter a valid API key and secret. +--- +The amount must be at least INR 1.00. | This error occurs when you enter an amount less than INR 1. | Make sure the entered amount is atleast INR 1.00. +--- +The currency should be INR when method is upi | This error occurs when you enter a currency other than INR | Make sure the currency is INR. +--- +The amount field is required. | This error occurs when you have not entered the amount or the `max_amount` value. | Make sure to enter the `max_amount` value. +--- +The minimum transaction amount allowed is Re. 5. | This error occurs when you enter the maximum amount less than the minimum amount. | Make sure the `max_amount` value is more than the `min_amount` value. +--- +The order amount cannot be greater than the token max amount for upi recurring. | This error occurs when the order amount exceeds the `token_max` amount passed in the API request payload. | Ensure the order amount is lesser than the `token_max` account. + + + +### 1.1.3. Create an Authorisation Payment + +Create a payment checkout form for customers to make Authorisation Transaction and register their mandate. You can use the Handler Function or Callback URL. + +**Handler Function** | **Callback URL** +--- +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. | When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. + +> **WARN** +> +> +> **Watch Out!** +> +> The callback URL is not supported for recurring payments created using the registration link. +> + + +### UPI Intent + + UPI Intent is supported on **mWeb (Android)** and **Mobile App (WebView)**. On **Desktop Web**, as UPI Intent is not supported, a QR code is automatically displayed instead. + + If UPI Intent is not enabled on your account, please reach out to the [support team](https://razorpay.com/support). + + + Platform | Steps + --- + **mWeb** | Customers are redirected to their preferred UPI app to complete the payment. For the complete integration guide, refer to [UPI Intent on Mobile Web](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md#integrate-on-android-ios-and-mobile-web). + --- + **Mobile App (WebView)** | UPI Intent requires passing `webview_intent: true` in the checkout options and implementing deep link handling in your Android or iOS app. For the complete integration guide, refer to [UPI Intent in WebView — Android](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-android.md) and [UPI Intent in WebView — iOS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-ios.md). + --- + **Desktop Web** | UPI Intent is not supported. A QR code is automatically displayed for customers to scan with their preferred UPI app. No additional code changes are required. + + + + +### UPI Collect + + +> **WARN** +> +> +> **Deprecation Notice** +> +> **UPI Collect is deprecated effective 28 February 2026.** This section is applicable only for exempted businesses. If you are an existing Razorpay user not covered by the exemptions, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/recurring-payments/standard-checkout.md) to switch to UPI Intent. +> + + + ```html: UPI Collect with handler functions + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": "1", + "handler": function (response) { + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature); + }, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + + ```html: UPI Collect with Callback URL + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": "1", + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + + ``` + + + +#### Additional Checkout Fields + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +`recurring` _mandatory_ +: `string` Determines if the recurring payment is enabled or not. Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this if you want to allow **recurring payments** and **one-time payment** in the same flow. + + +### Error Response Parameters + + Given below is a list of possible errors you may face while making the authorisation payment. + + + adequate_funds_not_available_blocked + + - **Description**: Sufficient unblocked funds not available in customer's account. Please ask customer to add fund and try again. + - **Next Steps**: Please ask customer to add sufficient unblocked funds and try again. + + + +### bad_request_error + + - **Description**: Invalid Mandate Sequence Number. + - **Next Steps**: Retry after some time during the valid cycle. + + + +### bank_account_invalid + + - **Description**: Payment failed because Account linked to VPA is invalid. + - **Next Steps**: Create a new mandate with the customer. + + + +### bank_account_validation_failed + + - **Description**: Payment was unsuccessful as the details are invalid. Please retry with the right details. + - **Next Steps**: Ask the customer to retry again. + + + +### bank_not_available + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### bank_technical_error + + + + Bank Temporarily Unavailable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Temporary Bank Issue + + - **Description**: Payment was unsuccessful due to a temporary issue at your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Bank Declined + + - **Description**: Payment was unsuccessful as it was declined by your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Bank or Wallet Gateway Error + + - **Description**: Payment processing failed due to error at bank or wallet gateway. + - **Next Steps**: Retry after some time. + + + +### General Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Bank Services Halt + + - **Description**: Payment was unsuccessful due to a temporary halt of services at this bank. + - **Next Steps**: Retry after some time. + + + + + + + +### credit_to_beneficiary_failed + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### debit_declined + + - **Description**: Payment was unsuccessful as it was declined by remitter bank. + - **Next Steps**: Create a new mandate with the customer. + + + +### debit_instrument_blocked + + - **Description**: Payment was unsuccessful as the account linked to this UPI ID is blocked. Try using another account. + - **Next Steps**: Create a new mandate with the customer. + + + +### duplicate_mandate_request + + - **Description**: Duplicate mandate request. Please try again with another mandate request. + - **Next Steps**: Please try again with another mandate request. + + + +### gateway_technical_error + + + + Bank or Wallet Gateway Error + + - **Description**: Payment processing failed due to error at bank or wallet gateway. + - **Next Steps**: Retry after some time. + + + +### Temporary Issue with Money Deduction + + - **Description**: Payment was unsuccessful due to a temporary issue. If money got deducted, reach out to the seller. + - **Next Steps**: Retry after some time. + + + + + + + +### incorrect_pin + + - **Description**: You have entered an incorrect PIN on the UPI app. Please retry with the correct PIN. + - **Next Steps**: Ask the customer to retry with correct PIN. + + + +### insufficient_funds + + - **Description**: Transaction failed due to insufficient funds. + - **Next Steps**: Ask the customer to add balance to their account and retry. + + + +### invalid_request + + - **Description**: Payment processing failed due to error at bank or wallet gateway. + - **Next Steps**: Retry after some time. + + + +### invalid_response_from_gateway + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### invalid_transaction_beneficiary + + - **Description**: Beneficiary address resolution failed. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### invalid_vpa + + - **Description**: You have entered an incorrect UPI ID. Please retry with the correct UPI ID. + - **Next Steps**: Ask the customer to retry with a valid VPA. + + + +### issuer_dispatch_failed + + - **Description**: Payment failed due to some issue at the issuer bank. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### limit_exceeded_remitting_bank + + - **Description**: Limit exceeded for remitter bank. Please ask customer to try with another bank account. + - **Next Steps**: Please ask customer to try with another bank account. + + + +### mandate_debit_beyond_psp_amount_cap + + - **Description**: Debit amount is beyond payer PSP specified amount cap. Please reduce the amount and try again. + - **Next Steps**: Please reduce the mandate amount to match customer PSP. + + + +### mandate_request_limit_breached + + - **Description**: Maximum number of mandate creation requests exceeded for customer's bank account. Please wait for some time before initiating new mandate creation requests. + - **Next Steps**: Please wait for some time before initiating new mandate creation requests. + + + +### mobile_number_invalid + + - **Description**: Registered Mobile number linked to the account has been changed or removed. + - **Next Steps**: Create a new mandate with the customer. + + + +### nature_of_debit_not_allowed + + - **Description**: Nature of debit not allowed in customer's account. Please ask the customer to use a different bank account. + - **Next Steps**: Please ask the customer to use a different bank account. + + + +### no_financial_address_record_found + + - **Description**: No financial address record found for this VPA. Please ask customer to try with another bank account. + - **Next Steps**: Please ask customer to try with other bank account. + + + +### no_original_request_found + + - **Description**: No mandate details were found in the record during debit. Please try after some time. + - **Next Steps**: Please try after some time. + + + +### payment_collect_request_expired + + - **Description**: Payment was unsuccessful as you could not pay with the UPI app within time. + - **Next Steps**: Retry after some time. + + + +### payment_declined + + + + Bank Declined Payment + + - **Description**: Payment was unsuccessful as it was declined by your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Ask the customer to retry with other account. + + + +### Customer Declined Payment + + - **Description**: You have declined the payment request on the UPI app. Please retry when you are ready. + - **Next Steps**: Ask the customer to approve the payment. + + + + + + + +### payment_failed + + - **Description**: Payment was unsuccessful due to a temporary issue. If amount got deducted, it will be refunded within 5-7 working days. + - **Next Steps**: Retry after 1 hour. + + + +### payment_pending + + - **Description**: The status of your payment is pending. You can either wait or retry to pay successfully. + - **Next Steps**: Retry after some time. + + + +### payment_risk_check_failed + + - **Description**: Payment was unsuccessful as your account does not pass the risk checks done by your bank. Try using another account. + - **Next Steps**: Retry after some time. + + + +### payment_timed_out + + - **Description**: Payment was unsuccessful as you could not complete it in time. + - **Next Steps**: Retry after some time. + + + +### pre_debit_notification_failed + + - **Description**: Unable to Notify the Customer. + - **Next Steps**: Retry after some time. + + + +### remitter_dispatch_failed + + - **Description**: Payment failed due to some issue at the customer's. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### request_timed_out + + + + General Timeout - Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Timeout - Bank Declined + + - **Description**: Payment was unsuccessful as it was declined by your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Timeout - Recurring Payment Creation + + - **Description**: Payment was unsuccessful as the recurring payment can not be created at this time. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + + + + + +### transaction_frequency_limit_exceeded + + - **Description**: Payment failed. Please try again with another bank account. + - **Next Steps**: Create a new mandate with the customer. + + + +### transaction_limit_exceeded + + + + Amount Limit Exceeded + + - **Description**: Payment failed because Transaction amount limit has exceeded. + - **Next Steps**: Reach out to the customer to collect the amount. + + + +### Bank Account Amount Limit + + - **Description**: Payment was unsuccessful as you exceeded the amount limit on the bank account linked to this UPI id. + - **Next Steps**: Ask the customer to retry after some time. + + + + + + + +### transaction_not_allowed + + - **Description**: Payment was unsuccessful as it was declined by your bank. Reach out to your bank for more details. Try using another account. + - **Next Steps**: Create a new mandate with the customer. + + + +### upi_dummy_payment + + - **Description**: Payment was a dummy payment for one time mandate registration. + - **Next Steps**: NA + + + + + +## 1.2 Using a Registration Link + +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the [API](#121-create-a-registration-link) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> + +- When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. +- A registration link should always have an order amount (in paise) the customer is charged when making the authorisation payment. For UPI, the amount must be a minimum of `₹1`. + +> **INFO** +> +> +> **Handy Tips** +> +> You can [use Webhooks to get notifications about successful payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-registration-link-status-using-webhooks) against a registration link. +> + +### 1.2.1 Create a Registration Link + +The following endpoint creates a registration link. + +/subscription_registration/auth_links + + +### Sample Code + + + ```curl: Curl + curl -u : + -X POST https://api.razorpay.com/v1/subscription_registration/auth_links + -H "Content-Type: application/json" \ + -d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": "100", + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "method": "upi", + "max_amount": "500", + "expire_at": 4102444799, + "frequency": "monthly", + "recurring_value": 25, + "recurring_type": "on" + }, + "receipt": "Receipt No. 23", + "email_notify": true, + "sms_notify": true, + "expire_by": 4102444799, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject registrationLinkRequest = new JSONObject(); + JSONObject customer = new JSONObject(); + customer.put("name","Gaurav Kumar"); + customer.put("email","gaurav.kumar@example.com"); + customer.put("contact","9123456780"); + registrationLinkRequest.put("customer", customer); + registrationLinkRequest.put("type", "link"); + registrationLinkRequest.put("amount", 100); + registrationLinkRequest.put("currency", "INR"); + registrationLinkRequest.put("description", "Registration Link for Gaurav Kumar"); + JSONObject subscriptionRegistration = new JSONObject(); + subscriptionRegistration.put("method","upi"); + subscriptionRegistration.put("max_amount",50000); + subscriptionRegistration.put("expire_at",1609423824); + subscriptionRegistration.put("frequency","monthly"); + subscriptionRegistration.put("recurring_value","25"); + subscriptionRegistration.put("recurring_type","on"); + registrationLinkRequest.put("subscription_registration", subscriptionRegistration); + registrationLinkRequest.put("receipt", "Receipt No. #112"); + registrationLinkRequest.put("email_notify", true); + registrationLinkRequest.put("sms_notify", true); + registrationLinkRequest.put("expire_by", 1580479824); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + registrationLinkRequest.put("notes", notes); + + Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('method'=>'upi','max_amount'=>'500','expire_at'=>'1634215992','frequency'=>'monthly','recurring_value'=>'25','recurring_type'=>'on'),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992,'notes' => array('note_key 1' => 'Beam me up Scotty','note_key 2' => 'Tea. Earl Gray. Hot.'))); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.subscriptions.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 100, + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + method: "upi", + max_amount: 500, + expire_at: 1634215992, + frequency: "monthly", + recurring_value: 25, + recurring_type: "on" + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } + }) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "method": "upi", + "max_amount": 500, + "expire_at": 1634215992, + "recurring_value": 25, + "recurring_type": "on" + }, + "receipt": "Receipt No. 5", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } + } + Razorpay::SubscriptionRegistration.create(para_attr) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.registration_link.create({ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":9123456780 + }, + "type":"link", + "amount":100, + "currency":"INR", + "description":"12 p.m. Meals", + "subscription_registration":{ + "method":"upi", + "expire_at":1580480689, + "max_amount":500, + "recurring_value": 25, + "recurring_type": "on" + }, + "receipt":"Receipt no. 1", + "expire_by":1880480689, + "sms_notify": True, + "email_notify": True, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data:= map[string]interface{}{ + "customer":map[string]interface{}{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + }, + "type":"link", + "amount":"100", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":map[string]interface{}{ + "method":"upi", + "max_amount":"500", + "expire_at":1609423824, + "frequency": "monthly", + "recurring_value": 25, + "recurring_type": "on" + }, + "receipt":"Receipt No. 1", + "email_notify":true, + "sms_notify":true, + "expire_by":1681987284, + "notes":map[string]interface{}{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot.", + }, + } + body, err := client.Invoice.CreateRegistrationLink(data, nil) + + ```json: Response + { + "id": "inv_FHr1ekX0r2VCVK", + "entity": "invoice", + "receipt": "Receipt No. 23", + "invoice_number": "Receipt No. 23", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHr1ehR3nmNeXo", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 4102444799, + "issued_at": 1595489219, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595489219, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/ak1WxDB", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595489219, + "idempotency_key": null + } + ``` + + + + +### Request Parameters + + `customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + + `subscription_registration` +: Details of the authorisation transaction. + + `method` _mandatory_ + : `string` The payment method used to make authorisation transaction. Here, it is `card`. + + `max_amount` _mandatory_ + : `integer` Use to set the maximum amount (in paise) per debit request. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _optional_ + : `integer` The Unix timestamp till when you can use the token to charge the customer subsequent payments. The default value is 10 years and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + +`recurring_value` _optional_ +: `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + +`recurring_type` _optional_ +: `string` Determines when the recurring debit can be done. Possible values are: + +- `on`: recurring debit happens on the exact day of every month. + - `before`: recurring debit can happens any time before the specified date. + - `after`: recurring debit can happens any time after the specified date. + +For example, if the frequency is `monthly`, recurring_value is `17` and recurring_type is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if recurring_type is `after`, recurring debit can only happen on or after the 17th of the month. + + `sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + + +### 1.2.2 Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + + +### Path Parameters + + `id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + + + +### Response Parameters + +`success` +: `boolean` Indicates whether the notifications were sent successfully. Possible values: + - `true`: The notifications were successfully sent via SMS, email or both. + - `false`: The notifications were not sent. + + +### 1.2.3 Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + + +### Path Parameter + + `id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. + + + +### Response Parameters + + `id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. diff --git a/llm-content/api/payments/recurring-payments/upi/create-subsequent-payments.md b/llm-content/api/payments/recurring-payments/upi/create-subsequent-payments.md new file mode 100644 index 00000000..1522b1c0 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/upi/create-subsequent-payments.md @@ -0,0 +1,1192 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is authorised. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use the notification object in the request if you want to control pre-debit notifications and recurring debits. +> + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture":true, + "receipt":"Receipt No. 1", + "notification":{ + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114 + }, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notification = new JSONObject(); +notification.put("token_id","token_M7K2eFBU7vToaQ"); +notification.put("payment_after","1634057114"); +orderRequest.put("notification", notification); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notification'=> array('token_id'=> 'token_M7K2eFBU7vToaQ','payment_after'=> '1634057114'), 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notification": { + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114 + }, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notification': {'token_id': 'token_M7K2eFBU7vToaQ', + 'payment_after': 1634057114}, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notification": { + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114 + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notification": map[string]interface{}{ + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114 + }, + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notification = new Dictionary(); +notification.Add("token_id", "token_M7K2eFBU7vToaQ"); +notification.Add("payment_after", "1634057114"); +orderRequest.Add("notification", notification); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "notification":{ + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114, + "id":"notification_00000000000001" + }, + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is `100` (). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notification` +: `object` Details of the pre-debit notification. This object is optional. You should use it only if you want to control pre-debit notifications and debits. If you do not pass this object, we will automatically try to debit 25 hours after the pre-debit notification is delivered. + + +> **WARN** +> +> +> **Watch Out!** +> +> We will not attempt any retry if the debit fails for tokens with the notification object in the created order. You should manually retry the debit attempt. +> + + `token_id` _mandatory_ + : `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + + `payment_after` _optional_ + : `integer` UNIX timestamp post which the debit is supposed to happen. Defaults to 25 hours after the pre-debit notification is delivered. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000001`. + +`entity` +: `string` The entity that has been created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to pay. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `rcptid #1`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating an Order. + +Error | Cause | Solution +--- +The api key provided is invalid | This error occurs when you enter the wrong API key or secret. | Make sure to enter the valid API key and secret. +--- +The amount must be at least INR 1.00. | This error occurs when you enter an amount less than INR 1. | Make sure the entered amount is atleast INR 1. +--- +The currency should be INR when method is upi | This error occurs when you enter a currency other than INR. | Make sure the currency is INR. +--- + +## 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +> **INFO** +> +> +> **UPI Payments** +> +> - We recommend sending a pre-debit notification to the customer 48 hours before the debit date. +> - For UPI, it may take between 24-36 hours for the subsequent payment to reflect on your Dashboard. +> - This is because of the failure of pre-debit notification and/or any retries that we attempt for the payment. +> - Do not create another subsequent payment until you get the status of the previous one. +> + +> **WARN** +> +> +> **UPI Payments** +> +> - The subsequent payment may fail if there is late authorisation of an earlier payment. +> - For UPI, **do not** create subsequent payments on the last day of the cycle. This will cause the payment to fail. +> + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +### Response Parameters + +`razorpay_payment_id` +: `string` The unique identifier of the payment that is created. For example, `pay_1Aa00000000001`. + +`razorpay_order_id` +: `string` The unique identifier of the order that is created. For example, `order_1Aa00000000001`. + +`razorpay_signature` +: `string` The signature generated by the Razorpay. For example, `9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d` + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating a Recurring Payment. + + +### adequate_funds_not_available_blocked + + - **Description**: Sufficient unblocked funds not available in customer's account. Please ask customer to add fund and try again. + - **Next Steps**: Please ask customer to add sufficient unblocked funds and try again. + + + +### amount_does_not_match_mandate_amount + + + + Amount Mismatch - Mandate Amount + + - **Description**: The payment failed as the amount does not match the amount provided at the time of mandate creation. + - **Next Steps**: Pass the transaction amount less than or equal to the mandate amount. + + + +### Amount Mismatch - Payment Amount + + - **Description**: The amount does not match with payment amount. + - **Next Steps**: Retry with correct amount. + + + + + + + +### bad_request_error + + - **Description**: Invalid Mandate Sequence Number. + - **Next Steps**: Retry after some time during the valid cycle. + + + +### bank_account_invalid + + - **Description**: Payment failed because Account linked to VPA is invalid. + - **Next Steps**: Create a new mandate with the customer. + + + +### bank_not_available + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### bank_technical_error + + + + Bank Decline + + - **Description**: Payment was unsuccessful as it was declined by your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Bank or Wallet Gateway Error + + - **Description**: Payment processing failed due to error at bank or wallet gateway + - **Next Steps**: Retry after some time. + + + +### Temporary Bank Issue + + - **Description**: Payment was unsuccessful due to a temporary issue at your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### General Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Bank Services Halt + + - **Description**: Payment was unsuccessful due to a temporary halt of services at this bank. + - **Next Steps**: Retry after some time. + + + + + + + +### banks_hsm_is_down_remitter + + - **Description**: Remitter bank failed to process the transaction. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### credit_to_beneficiary_failed + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### debit_declined + + - **Description**: Payment was unsuccessful as it was declined by remitter bank. + - **Next Steps**: Create a new mandate with the customer. + + + +### debit_instrument_blocked + + - **Description**: Payment was unsuccessful as the account linked to this UPI ID is blocked. Try using another account. + - **Next Steps**: Create a new mandate with the customer. + + + +### execution_day_rule_mismatch + + + + Execution Day Rule Mismatch + + - **Description**: Day of debit does not match the debit execution rule for the payer. Please ensure execution day matches the execution rule. + - **Next Steps**: Please ensure execution day matches execution rule. + + + +### Execution Day Rule Mismatch - Remitter + + - **Description**: Day of debit does not match the debit execution rule for the payer. Please ensure execution day matches the execution rule. + - **Next Steps**: Please ensure execution day matches execution rule and try again. + + + + + + + +### gateway_technical_error + + + + Bank or Wallet Gateway Error + + - **Description**: Payment processing failed due to error at bank or wallet gateway. + - **Next Steps**: Retry after some time. + + + +### Temporary Issue with Money Deduction + + - **Description**: Payment was unsuccessful due to a temporary issue. If money got deducted, reach out to the seller. + - **Next Steps**: Retry after some time. + + + + + + + +### id_value_must_be_present + + - **Description**: Failed to debit customer's bank account. Mandate details are incorrect. + - **Next Steps**: Please try after sometime. + + + +### insufficient_funds + + - **Description**: Transaction failed due to insufficient funds. + - **Next Steps**: Ask the customer to add balance to their account and retry. + + + +### invalid_response_from_gateway + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### invalid_token + + - **Description**: Invalid Token. + - **Next Steps**: Create a new mandate with the customer. + + + +### invalid_transaction_beneficiary + + - **Description**: Beneficiary address resolution failed. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### invalid_vpa + + - **Description**: You have entered an incorrect UPI ID. Please retry with the correct UPI ID. + - **Next Steps**: Ask the customer to retry with a valid VPA. + + + +### issuer_dispatch_failed + + - **Description**: Payment failed due to some issue at the issuer bank. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### limit_exceeded_remitting_bank + + - **Description**: Limit exceeded for remitter bank. Please ask customer to try with another bank account. + - **Next Steps**: Please ask customer to try with another bank account. + + + +### mandate_cancelled + + - **Description**: UPI mandate created for payment has been cancelled by user. + - **Next Steps**: Create a new mandate with the customer. + + + +### mandate_current_cycle_allowed_debit_exceeds + + - **Description**: Mandate is already honoured. + - **Next Steps**: Wait till next cycle for debiting the customer. + + + +### mandate_debit_beyond_psp_amount_cap + + - **Description**: Debit amount is beyond payer PSP specified amount cap. Please reduce the amount and try again. + - **Next Steps**: Please reduce the mandate amount to match customer PSP. + + + +### mandate_expired + + - **Description**: UPI Mandate is expired. + - **Next Steps**: Create a new mandate with the customer. + + + +### mandate_not_active + + - **Description**: UPI mandate is not active. + - **Next Steps**: Create a new mandate with the customer. + + + +### mandate_paused + + - **Description**: UPI mandate is not active, it is paused by user. + - **Next Steps**: Ask the customer to resume the mandate & retry. + + + +### merchant_error_payee_psp + + - **Description**: VPA resolution into bank account details failed. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### mobile_number_invalid + + - **Description**: Registered Mobile number linked to the account has been changed or removed. + - **Next Steps**: Create a new mandate with the customer. + + + +### mpin_not_set_by_customer + + - **Description**: UPI MPIN not set by customer. Please ask customer to set MPIN and try again. + - **Next Steps**: Please ask customer to set MPIN and try again. + + + +### nature_of_debit_not_allowed + + - **Description**: Nature of debit not allowed in customer's account. Please ask the customer to use a different bank account. + - **Next Steps**: Please ask the customer to use a different bank account. + + + +### no_financial_address_record_found + + - **Description**: No financial address record found for this vpa. Please ask customer to try with another bank account. + - **Next Steps**: Please ask customer to try with other bank account. + + + +### no_original_request_found + + - **Description**: No mandate details were found in the record during debit. Please try after some time. + - **Next Steps**: Please try after some time. + + + +### null_ack_processing_failure + + - **Description**: Processing failure at gateway. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### number_of_pin_tries_exceeded + + - **Description**: Customer has exceeded PIN retry limit. Please ask customer to create a new mandate and enter the right PIN. + - **Next Steps**: Please ask customer to create a new mandate and enter the right PIN. + + + +### payer_account_has_changed + + - **Description**: Payer account linked to the customer's VPA has changed. Please request the customer to either change it to the bank account used during mandate registration or register a new mandate for them. + - **Next Steps**: Please request the customer to either change it to the bank account used during mandate registration or register a new mandate for them. + + + +### payer_seqnum_validation_failure + + - **Description**: Payer sequence number length validation failed. + - **Next Steps**: Please provide a valid payer sequence number (1-3 digits). + + + +### payment_failed + + + + Temporary Issue with Refund + + - **Description**: Payment was unsuccessful due to a temporary issue. If amount got deducted, it will be refunded within 5-7 working days. + - **Next Steps**: Retry after 1 hour. + + + +### Try Another Bank Account + + - **Description**: Payment failed. Please try again with another bank account. + - **Next Steps**: Retry after some time. + + + + + + + +### payment_pending + + - **Description**: The status of your payment is pending. You can either wait or retry to pay successfully. + - **Next Steps**: Retry after some time. + + + +### payment_risk_check_failed + + - **Description**: Payment was unsuccessful as your account does not pass the risk checks done by your bank. Try using another account. + - **Next Steps**: Retry after some time. + + + +### payment_stopped_by_court_order + + - **Description**: Payment processing failure at remitter bank. Please ask customer to try with another bank account. + - **Next Steps**: Please ask customer to try with another bank account. + + + +### payment_timed_out + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is not reachable at this time. + - **Next Steps**: Retry after some time. + + + +### per_transaction_limit_exceeded + + - **Description**: Customer bank per transaction limit exceeded. Please try again with a lower amount. + - **Next Steps**: Please reduce transaction amount and try again. + + + +### psp_bank_not_available + + - **Description**: Payer PSP / Bank not available. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### psp_not_available + + - **Description**: Payment was unsuccessful as the UPI app is not reachable at this time. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### psp_timeout + + - **Description**: Payer PSP timed out. Please try again. + - **Next Steps**: Please try again after some time. + + + +### regid_details_must_be_present + + - **Description**: Gateway validation failure. Please try after sometime or create a new mandate. + - **Next Steps**: Please try after sometime or create a new mandate. + + + +### remitter_account_dormant + + - **Description**: Bank Account is closed. + - **Next Steps**: Create a new mandate with the customer. + + + +### remitter_dispatch_failed + + - **Description**: Payment failed due to some issue at the customer's. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### request_timed_out + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### response_not_received_within_tat + + - **Description**: VPA resolution into bank account details failed. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### seqnum_mismatch_payer_psp + + - **Description**: Sequence number mismatch between payer and payee PSP. Please try again after some time. + - **Next Steps**: Please ask customer to try after sometime. + + + +### suspected_fraud_decline + + - **Description**: Suspected fraud, transaction declined by customer's bank. Please try again after some time. + - **Next Steps**: Please try after sometime. + + + +### transaction_frequency_limit_exceeded + + - **Description**: Payment failed. Please try again with another bank account. + - **Next Steps**: Create a new mandate with the customer. + + + +### transaction_limit_exceeded + + - **Description**: Payment failed because Transaction amount limit has exceeded + - **Next Steps**: Reach out to the customer to collect the amount. + + + +### transaction_not_allowed + + - **Description**: Payment was unsuccessful as it was declined by your bank. Reach out to your bank for more details. Try using another account. + - **Next Steps**: Create a new mandate with the customer. + + + +### transaction_not_permitted_cardholder + + - **Description**: Transaction not permitted for customer's account. Please ask customer to try with another bank account. + - **Next Steps**: Please ask customer to try with another bank account. + + + +### transaction_not_permitted_cardholder_beneficiary + + - **Description**: Transaction not permitted in beneficiary account. Please try again with another bank account. + - **Next Steps**: Please try again with another bank account. + + + +### transaction_not_permitted_to_vpa + + - **Description**: Transaction not permitted to payee VPA by the payer PSP. Please contact your bank to enable Autopay for this VPA. + - **Next Steps**: Please contact your bank to enable autopay for this VPA. + + + +### umn_does_not_exist_payer + + - **Description**: Mandate does not exist. Please create a new mandate. + - **Next Steps**: Please ask customer to create new mandate. + + + +### unable_to_process_beneficiary_bank + + - **Description**: Error processing request at beneficiary bank. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### vpa_resolution_failed + + - **Description**: You have entered an incorrect UPI ID. Please retry with the correct UPI ID. + - **Next Steps**: Retry after some time. + + +## 3.3. Fetch an Order With ID + +Use this endpoint to retrieve details of a particular order as per the id. + +/v1/orders/:id + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/orders/:id + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String orderId = "order_1Aa00000000002"; + +Order order = razorpay.orders.fetch(orderId); + +```Python: Python +# do easy_install razorpay or +# pip install razorpay + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.fetch(orderId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->fetch($orderId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +orderId = "order_1Aa00000000002" + +Razorpay::Order.fetch(orderId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.fetch(orderId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Order.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string orderId = "order_1Aa00000000002"; + +Order order = client.Order.Fetch(orderId); +``` + +```json: Success +{ + "id":"order_DaaS6LOUAASb7Y", + "entity":"order", + "amount":2000, + "amount_paid":0, + "amount_due":2000, + "currency":"", + "receipt":null, + "notification":{ + "token_id":"token_M7K2eFBU7vToaQ", + "payment_after":1634057114, + "id":"notification_00000000000001", + "status":"delivered", + "delivered_at":1634057113 + }, + "offer_id":"offer_JGQvQtvJmVDRIA", + "offers":[ + "offer_JGQvQtvJmVDRIA" + ], + "status":"created", + "attempts":0, + "notes":[ + + ], + "created_at":1654776878 +} +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the order to be retrieved. + +### Response Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`notification` +: `object` Details of the pre-debit notification. The notification object is populated in the response only if you have passed this while creating an order. + + `token_id` + : `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + + `payment_after` + : `integer` Unix timestamp post which the debit is supposed to happen. + + `id` + : `string` Unique identifier of the notification. + + `delivered_at` + : `integer` Indicates the unix timestamp when the notification was delivered. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. diff --git a/llm-content/api/payments/recurring-payments/upi/tokens.md b/llm-content/api/payments/recurring-payments/upi/tokens.md new file mode 100644 index 00000000..edacaf94 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/upi/tokens.md @@ -0,0 +1,633 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +Know more about [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/integrate.md#fetch-emandate-registration-details). + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_FHfAzEJ51k8NLj" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentid = "pay_FHfqtkRzWvxky4"; + +Payment payment = client.Payment.Fetch(paymentid); +``` + +```json: Debit Payment +{ + "id": "pay_FHfAzEJ51k8NLj", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfANdTUYeP8lb", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfAzGzREc1ug6", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595447490 +} +```json: Authorisation Payment +{ + "id": "pay_QDhVJ5M23wt4rh", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "failed", + "order_id": "order_QDhT2PqFJvtg4y", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "success@razorpay", + "email": "gaurav.kumar@example.com", + "contact": "+919123456780", + "customer_id": "cust_Q0g6LTYw3obZEn", + "token_id": "token_QDhVJHYr5m87fF", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey\u2026 decaf.", + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + "optimizer_provider_name": "razorpay" + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment was a dummy payment for one time mandate registration.", + "error_source": "business", + "error_step": "payment_initiation", + "error_reason": "upi_dummy_payment", + "acquirer_data": { + "rrn": null + }, + "gateway_provider": "Razorpay", + "created_at": 1743490280, + "upi": { + "vpa": "success@razorpay" + } +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` via the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. Here, it is `payment`. + +`amount` +: `integer` The payment amount represented in smallest unit of the currency passed. For example, `amount = 100` translates to `100` subunits, that is . + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`order_id` +: `string` The unique identifier of the order. + +`invoice_id` +: `string` The unique identifier of the invoice. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`amount_refunded` +: `integer` The amount refunded in smallest unit of the currency passed. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string` Description of the payment, if any. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `integer` Customer contact number used for the payment. + +`customer_id` +: `string` The unique identifier of the customer. + +`token_id` +: `string` The unique identifier of the token. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +## 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> - This endpoint will not fetch the details of expired and unused tokens. +> - The UPI tokens are not populated in the API response if the `save_vpa` feature is not enabled in your account. Please raise a request with our Support team to get this activated. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +List tokens = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +### Response Parameters + +`entity` +: `string` The entity being created. Here, it is a `collection`. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: `object` Details related to token such as `token id` and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is `token_id`. + + `entity` + : `string` The entity being created. Here, it is a `token`. + + `token` + : `string` The token is being fetched. + + `bank` + : `string` Card issuing bank details. + + `wallet` + : `string` Provides wallet information. + + `method` + : `string` The payment method used to make the transaction. + + `card` + : `object` Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is `Visa`. + + `type` + : `string` Card type (debit or credit). In this example, it is `credit`. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `boolean` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : `object` The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + + `vpa` + : `object` The VPA details. + + `username` + : `string` The username of the VPA holder. For example, `gaurav.kumar`. + + `handle` + : `string` The VPA handle. Here it is `upi`. + + `name` + : `string` The name of the VPA holder. + + + `recurring` + : `string` This represents whether recurring is enabled for this token. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + `recurring_details` + : `object` Details of the recurring transaction. + + `status` + : `string` This represents the status of the recurring transaction. Possible values: + - `initiated` + - `confirmed` + - `rejected` + - `cancelled` + - `paused` + + `failure_reason` + : `string` This provides the reason why the recurring transaction failed. + + `auth_type` + : `string` The authorisation type details. + + `mrn` + : `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + + `used_at` + : `integer` The VPA usage timestamp. + + `created_at` + : `integer` The token creation timestamp. + + `expired_at` + : `integer` The token expiry date timestamp. + + `dcc_enabled` + : `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + +## 2.3. Delete Tokens + +> **WARN** +> +> +> **Watch Out!** +> +> Deleting a token removes it from Razorpay's database. The deleted token will not appear on the Dashboard or when all tokens are fetched. However, it does not cancel the mandate. If you wish to cancel the mandate from NPCI, use the [Cancel Token API](#24-cancel-token). +> + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameters + + `customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + + + +### Response Parameters + + +`deleted` +: `boolean` Indicates whether the token is deleted. Possible values: + - `true`: The token is deleted successfully. + - `false`: The token was not deleted. + + +## 2.4. Cancel Token +The following endpoint initiates cancellation of the mandate from NPCI. + +/customers/:customer_id/tokens/:token_id/cancel + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PUT https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001/cancel +```json: Response +{ + "status": "cancellation_initiated” +} +``` + + +### Path Parameters + + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be cancelled. For example, `token_1Aa00000000001`. diff --git a/llm-content/api/payments/recurring-payments/wallets/create-authorization-transaction.md b/llm-content/api/payments/recurring-payments/wallets/create-authorization-transaction.md new file mode 100644 index 00000000..f8260823 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/wallets/create-authorization-transaction.md @@ -0,0 +1,1377 @@ +--- +title: 1. Create the Authorisation Transaction +--- + +# 1. Create the Authorisation Transaction + +You can create an authorisation transaction using [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +## 1.1. Using Razorpay Curlec APIs + +To create an authorisation transaction using Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorisation-payment). + +> **INFO** +> +> +> **Handy Tips** +> +> For the Authorisation Payment to be successful in a day (for example, 5th June), you should create an Order and the Authorisation Transaction on the same day (5th June) before 11:59 pm. +> + +### 1.1.1. Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + +#### Request Parameters + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + +### 1.1.2. Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":100, + "currency":"INR", + "customer_id":"cust_4xbQrmEoA5WJ01", + "method":"card", + "token": { + "max_amount": 100000000, + "expire_at": 2709971120, + "frequency": "monthly" + }, + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 100); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_4xbQrmEoA5WJ01"); +orderRequest.put("method", "card"); +JSONObject token = new JSONObject(); +token.put("max_amount","100000000"); +token.put("expire_at","2709971120"); +token.put("frequency","monthly"); +orderRequest.put("token", token); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => 'INR', 'receipt' => '123', 'customer_id'=> $customerId, 'method'=>'card', 'token' => array('max_amount' => 100000000, 'expire_at' => 2709971120, 'frequency' => 'monthly'), 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":100, + "currency":"INR", + "customer_id":"cust_4xbQrmEoA5WJ01", + "method":"card", + "token": { + "max_amount": 100000000, + "expire_at": 4102444799, + "frequency": "monthly" + }, + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 50000, + 'currency': 'INR', + 'customer_id': 'cust_4xbQrmEoA5WJ01', + 'method': 'card', + 'token':{ + 'max_amount': 100000000, + 'expire_at': 4102444799, + 'frequency': 'monthly' + }, + 'receipt': 'receipt#1', + 'notes': {'key1': 'value3', 'key2': 'value2'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +param_attr = { + "amount":100, + "currency": "INR", + "customer_id": "cust_4xbQrmEoA5WJ01", + "method": "card", + "token": { + "max_amount": 100000000, + "expire_at": 4102444799, + "frequency": "monthly" + }, + "receipt": "Receipt No. 1", + "notes":{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount":100, + "currency":"INR", + "customer_id":"", + "method":"card", + "token":map[string]interface{}{ + "max_amount": 100000000, + "expire_at": 4102444799, + "frequency": "monthly" + }, + "receipt":"Receipt No. 1", + "notes":map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", "INR"); +orderRequest.Add("customer_id", "cust_Z6t7VFTb9xHeOs"); +orderRequest.Add("method", "card"); +Dictionary token = new Dictionary(); +token.Add("max_amount", "5000"); +token.Add("expire_at", "2709971120"); +token.Add("frequency", "monthly"); +orderRequest.Add("token", token); +orderRequest.Add("receipt", "receipt#176"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +```json: Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":100, + "amount_paid":0, + "amount_due":100, + "currency":"INR", + "receipt":"Receipt No. 1", + "method":"card", + "description":null, + "customer_id":"cust_4xbQrmEoA5WJ01", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1565172642 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _optional_ +: `string` Payment method used to make the authorisation transaction. Here, it is `card`. + +`token` +: Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be auto-debited in a single charge. The minimum value is `100` (₹1) and the maximum value is `100000000` (₹10,00,000). For an amount higher than this or the RBI limit of ₹15,000 (`1500000`), the cardholder should provide an Additional Factor of Authentication (AFA) as per RBI guidelines. + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The card's expiry year is considered a default value. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `weekly` + - `monthly` + - `yearly` + - `as_presented` + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`entity` +: `string` The entity that has been created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to pay. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`method` +: `string` Payment method used to make the authorisation transaction. Here, it is `card`. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +You can create a payment against the `order_id` after you create an order. + +### 1.1.3. Create an Authorisation Payment + +Create a payment checkout form for customers to make Authorisation Transaction and register their mandate. You can use the Handler Function or Callback URL. + +Handler Function | Callback URL +--- +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. | When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. + +> **WARN** +> +> +> +> **Watch Out!** +> +> - The callback URL is not supported for recurring payments created using the registration link. +> - While handling the first time authorisation payment response, consume the `error_reason` field with value `upi_dummy_payment` and `error_description` field with value `Payment was a dummy payment for one time mandate registration.` to identify successful mandate registration. The parent `error_code` will be `BAD_REQUEST_ERROR`. +> + +```html: Checkout with handler functions + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "handler": function (response) { + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature); + }, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +```html: Manual checkout with Callback URL + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +``` + +#### Additional Checkout Fields + +You should send the following additional parameters along with the existing checkout options as a part of the authorisation transaction. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +`recurring` _mandatory_ +: `boolean` Possible values: + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + + +> **INFO** +> +> +> **Handy Tips** +> +> The `recurring` parameter also supports the value `preferred`. Use this when you want to support recurring payments and one-time payment in the same flow. +> + +## 1.2. Using a Registration Link + +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the [API](#121-create-a-registration-link) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> + +- When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. +- A registration link should always have an order amount (in subunits) the customer will be charged when making the authorisation payment. + +> **INFO** +> +> +> **Handy Tips** +> +> You can [use Webhooks to get notifications about successful payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) against a registration link. +> + +### 1.2.1. Create a Registration Link + +The following endpoint creates a registration link. + +/subscription_registration/auth_links + +```curl: Curl +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780" + }, + "type":"link", + "amount":"100", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":{ + "method":"card", + "max_amount":"500", + "expire_at":1609423824, + "frequency": "monthly" + }, + "receipt":"Receipt No. 1", + "email_notify":true, + "sms_notify":true, + "expire_by":1580479824, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 100); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "Registration Link for Gaurav Kumar"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","card"); +subscriptionRegistration.put("max_amount",500); +subscriptionRegistration.put("expire_at",1609423824); +subscriptionRegistration.put("frequency","monthly"); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. 1"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('method'=>'card','max_amount'=>'500','expire_at'=>'1634215992','frequency'=>'monthly'),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992, 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Tea. Earl Gray. Hot.'))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 100, + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + method: "card", + max_amount: 500, + expire_at: 1609423824, + frequency: "monthly" + }, + receipt: "Receipt No. 1", + email_notify: true, + sms_notify: true, + expire_by: 1580479824, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey... decaf." + } +}) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + 'customer': {'name': 'Gaurav Kumar', + 'email': 'gaurav.kumar@example.com', + 'contact': '9123456780'}, + 'type': 'link', + 'amount': '100', + 'currency': 'INR', + 'description': 'Registration Link for Gaurav', + 'subscription_registration': {'method': 'card', 'max_amount': '500' + , 'expire_at': 1644737663, 'frequency': 'monthly'}, + 'receipt': 'Receipt No. #11', + 'email_notify': True, + 'sms_notify': True, + 'expire_by': 1644737663, + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer":{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": "100", + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration":{ + "method": "card", + "max_amount": "500", + "expire_at": 1609423824, + "frequency": "monthly" + }, + "receipt": "Receipt No. 1", + "email_notify":1, + "sms_notify":1, + "expire_by":1580479824, + "notes":{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} + +Razorpay::SubscriptionRegistration.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer":map[string]interface{}{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + }, + "type":"link", + "amount":"100", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":map[string]interface{}{ + "method":"card", + "max_amount":"500", + "expire_at":1609423824, + "frequency": "monthly" + }, + "receipt":"Receipt No. 1", + "email_notify":true, + "sms_notify":true, + "expire_by":1681987284, + "notes":map[string]interface{}{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot.", + }, +} + +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary registrationLinkRequest = new Dictionary(); +Dictionary customer = new Dictionary(); +customer.Add("name", "Gaurav Kumar"); +customer.Add("email", "gaurav.kumar@example.com"); +customer.Add("contact", "9123456780"); +registrationLinkRequest.Add("customer", customer); +registrationLinkRequest.Add("type", "link"); +registrationLinkRequest.Add("amount", 100); +registrationLinkRequest.Add("currency", "INR"); +registrationLinkRequest.Add("description", "Registration Link for Gaurav Kumar"); +Dictionary subscriptionRegistration = new Dictionary(); +subscriptionRegistration.Add("method", "card"); +subscriptionRegistration.Add("max_amount", 500); +subscriptionRegistration.Add("expire_at", 1609423824); +registrationLinkRequest.Add("subscription_registration", subscriptionRegistration); +registrationLinkRequest.Add("receipt", "Receipt No. #18d"); +registrationLinkRequest.Add("email_notify", true); +registrationLinkRequest.Add("sms_notify", true); +registrationLinkRequest.Add("expire_by", 1580479824); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +registrationLinkRequest.Add("notes", notes); + +Invoice invoice = client.Invoice.CreateRegistrationLink(registrationLinkRequest); + +```json: Response +{ + "id": "inv_FHrXGIpd3N17DX", + "entity": "invoice", + "receipt": "Receipt No. 24", + "invoice_number": "Receipt No. 24", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrXGJNngJyEAe", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 4102444799, + "issued_at": 1595491014, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491014, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/VSriCfn", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491014, + "idempotency_key": null +} +``` + +#### Request Parameters + +`customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + +`subscription_registration` +: Details of the authorisation transaction. + + `method` _mandatory_ + : `string` The authorisation method. Here it is `card`. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be auto-debited in a single charge. The minimum value is `100` (₹1) and the maximum value is `100000000` (₹10,00,000). For an amount higher than this or the RBI limit of ₹15,000 (`1500000`), the cardholder should provide an Additional Factor of Authentication (AFA) as per RBI guidelines. + + `expire_at` _optional_ + : `integer` The Unix timestamp till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. The card's expiry year is considered a default value. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `weekly` + - `monthly` + - `yearly` + - `as_presented` + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + +#### Path Parameters + +`id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +#### Response Parameters + +`success` +: `boolean` Indicates whether the notifications were sent successfully. Possible values: + - `true`: The notifications were successfully sent via SMS, email or both. + - `false`: The notifications were not sent. + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. + +#### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. diff --git a/llm-content/api/payments/recurring-payments/wallets/create-subsequent-payments.md b/llm-content/api/payments/recurring-payments/wallets/create-subsequent-payments.md new file mode 100644 index 00000000..15c88e88 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/wallets/create-subsequent-payments.md @@ -0,0 +1,420 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorized. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000001`. + +`entity` +: `string` The entity that has been created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to pay. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `rcptid #1`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +## 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +- You will get a `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` as a response after the payment request is successfully processed. +- In the case of some banks, such as HDFC Bank and Axis Bank, the payment entity is in the `created` state since the charging system of these banks is file-based and can take some time. + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +### Response Parameters + +`razorpay_payment_id` +: `string` The unique identifier of the payment that is created. For example, `pay_1Aa00000000001`. + +`razorpay_order_id` +: `string` The unique identifier of the order that is created. For example, `order_1Aa00000000001`. + +`razorpay_signature` +: `string` The signature generated by the Razorpay. For example, `9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d` diff --git a/llm-content/api/payments/recurring-payments/wallets/tokens.md b/llm-content/api/payments/recurring-payments/wallets/tokens.md new file mode 100644 index 00000000..127c5441 --- /dev/null +++ b/llm-content/api/payments/recurring-payments/wallets/tokens.md @@ -0,0 +1,808 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +Know more about [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/integrate.md#fetch-card-mandate-registration-details). + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches a token id using the Payment id. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000001"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_1Aa00000000001" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.Fetch(paymentId); + +```json: Response +{ + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "541898" + }, + "created_at": 1595449871 +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` from the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. Here, it is `payment`. + +`amount` +: `integer` The payment amount represented in smallest unit of the currency passed. For example, `amount = 100` translates to `100` subunits, that is . + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`order_id` +: `string` The unique identifier of the order. + +`invoice_id` +: `string` The unique identifier of the invoice. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`amount_refunded` +: `integer` The amount refunded in smallest unit of the currency passed. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string` Description of the payment, if any. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `integer` Customer contact number used for the payment. + +`customer_id` +: `string` The unique identifier of the customer. + +`token_id` +: `string` The unique identifier of the token. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +## 2.2. Fetch All Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint fetches tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> This endpoint will not fetch the details of expired and unused tokens. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +List customer = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customer.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000002" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +List token = client.Customer.Fetch(customerId).Tokens(); + +```json: Response +{ + "entity":"collection", + "count":1, + "items":[ + { + "id":"token_HouA2OQR5Z2jTL", + "entity":"token", + "token":"2JPRk664pZHUWG", + "bank":null, + "wallet":null, + "method":"card", + "card":{ + "entity":"card", + "name":"Gaurav Kumar", + "last4":"8950", + "network":"Visa", + "type":"credit", + "issuer":"STCB", + "international":false, + "emi":false, + "sub_type":"consumer", + "expiry_month":12, + "expiry_year":2021, + "flows":{ + "otp":true, + "recurring":true + } + }, + "recurring":true, + "recurring_details":{ + "status":"confirmed", + "failure_reason":null + }, + "auth_type":null, + "mrn":null, + "used_at":1629779657, + "created_at":1629779657, + "expired_at":1640975399, + "dcc_enabled":false, + "billing_address":null + } + ] +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +### Response Parameters + +`entity` +: `string` The entity being created. Here, it is a `collection`. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: Details related to token such as `token id` and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is `token_id`. + + `entity` + : `string` The entity being created. Here, it is a `token`. + + `token` + : `string` The token is being fetched. + + + `bank` + : `string` Card issuing bank details. + + + + + `method` + : `string` The payment method used to make the transaction. + + `card` + : Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is `Visa`. + + `type` + : `string` Card type (debit or credit). In this example, it is `credit`. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `boolean` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + +`vpa` +: `string` The VPA details. + + `username` + : `string` The username of the VPA holder. For example, `gaurav.kumar`. + + `handle` + : `string` The VPA handle. Here it is `upi`. + + `name` + : `string` The name of the VPA holder. + + + + +`recurring` +: `string` This represents whether recurring is enabled for this token or not. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + +`recurring_details` +: `object` Details of the recurring transaction. + + `status` + : `string` This represents the status of the recurring transaction. Possible values: + - `initiated` + - `confirmed` + - `rejected` + - `cancelled` + - `paused` + + `failure_reason` + : `string` This provides the reason why the recurring transaction failed. + +`auth_type` +: `string` The authorisation type details. + +`mrn` +: `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + +`used_at` +: `integer` The VPA usage timestamp. + +`created_at` +: `integer` The token creation timestamp. + +`expired_at` +: `integer` The token expiry date timestamp. + +`dcc_enabled` +: `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + +## 2.3 Fetch a Token by Customer ID + +The following endpoint fetches a particular token linked to a customer. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_IjsVsJ7d27hxOs/tokens/token_J0BgMu8YDVusZa + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_IjsVsJ7d27hxOs"; + +String tokenId = "token_J0BgMu8YDVusZa"; + +List customer = razorpay.customers.fetchTokens(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->fetch($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customer.fetchTokens(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.fetch(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_IjsVsJ7d27hxOs" + +tokenId = "token_J0BgMu8YDVusZa" + +Razorpay::Customer.fetch(customerId).fetchToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token("", "", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_J0BgMu8YDVusZa" + +List token = client.Customer.Fetch(customerId).Tokens(); + +```json: Response +{ + "id":"token_J0BgMu8YDVusZa", + "entity":"token", + "token":"ya5olMAYU0ap4F", + "bank":null, + "wallet":null, + "method":"card", + "card":{ + "entity":"card", + "name":"Gaurav Kumar", + "last4":"7558", + "network":"Visa", + "type":"credit", + "issuer":"FDRL", + "international":false, + "emi":true, + "sub_type":"consumer", + "token_iin":null, + "expiry_month":1, + "expiry_year":2027, + "flows":{ + "recurring":true + } + }, + "recurring":true, + "recurring_details":{ + "status":"confirmed", + "failure_reason":null + }, + "auth_type":null, + "mrn":null, + "used_at":1645780406, + "created_at":1645780188, + "expired_at":2709971120, + "status":null, + "notes":[ + + ], + "dcc_enabled":false, + "compliant_with_tokenisation_guidelines":false +} +``` + +### Path Parameters + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_IjsVsJ7d27hxOs`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that should be retrieved. For example, `token_J0BgMu8YDVusZa`. + +### Response Parameters + +`entity` +: `string` The entity being created. Here, it is a `collection`. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: Details related to token such as `token id` and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is `token_id`. + + `entity` + : `string` The entity being created. Here, it is a `token`. + + `token` + : `string` The token is being fetched. + + + `bank` + : `string` Card issuing bank details. + + + + + `method` + : `string` The payment method used to make the transaction. + + `card` + : Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is `Visa`. + + `type` + : `string` Card type (debit or credit). In this example, it is `credit`. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `boolean` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + +`vpa` +: `string` The VPA details. + + `username` + : `string` The username of the VPA holder. For example, `gaurav.kumar`. + + `handle` + : `string` The VPA handle. Here it is `upi`. + + `name` + : `string` The name of the VPA holder. + + + + +`recurring` +: `string` This represents whether recurring is enabled for this token or not. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + +`recurring_details` +: `object` Details of the recurring transaction. + + `status` + : `string` This represents the status of the recurring transaction. Possible values: + - `initiated` + - `confirmed` + - `rejected` + - `cancelled` + - `paused` + + `failure_reason` + : `string` This provides the reason why the recurring transaction failed. + +`auth_type` +: `string` The authorisation type details. + +`mrn` +: `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + +`used_at` +: `integer` The VPA usage timestamp. + +`created_at` +: `integer` The token creation timestamp. + +`expired_at` +: `integer` The token expiry date timestamp. + +`dcc_enabled` +: `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + +## 2.4. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + +### Path Parameters + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + +### Response Parameter + +`deleted` +: `boolean` Indicates whether the token is deleted. Possible values: + - `true`: The token is deleted successfully. + - `false`: The token was not deleted. diff --git a/llm-content/api/payments/recurring-payments/webhooks.md b/llm-content/api/payments/recurring-payments/webhooks.md new file mode 100644 index 00000000..4abb304c --- /dev/null +++ b/llm-content/api/payments/recurring-payments/webhooks.md @@ -0,0 +1,2767 @@ +--- +title: Webhooks +description: Set up webhooks for Recurring Payments, check available webhook events and sample payloads for these events. +--- + +# Webhooks + +Webhooks (Web Callback, HTTP Push API or Reverse API) automatically notify your application when specific events occur. Instead of continuously polling APIs to check for updates, webhooks push notifications directly to your server when events happen. + +## Webhooks vs APIs + +Here is how webhooks compare to traditional API polling: + +Aspect | APIs | Webhooks +--- +**Data retrieval** | Pull-based (you request) | Push-based (we send) +--- +**Timing** | On-demand | Near real-time when events occur +--- +**Resource usage** | Requires polling | Event-driven, efficient + +## How Razorpay Webhooks Work + +When you subscribe to webhook events, Razorpay sends an HTTP POST request with JSON payload to your configured endpoint URL whenever those events are triggered. + +Suppose you have subscribed to the `order.paid` webhook event, you will receive a notification every time a user pays you for an order, in the configured endpoint URL. + +### Use Cases + +There can be multiple uses for webhook events. Two of these are listed below. + + +### Capturing Late Authorised Payments + + Capturing payments for which you did not receive a response on the client-side is perhaps the most important use case for the `payment.authorized` event. + + Sometimes, the communication between the bank and Razorpay or between you and Razorpay may not occur. This could be because of a slow network connection or your customer closing the window while processing the payment. This could lead to a payment being marked as **Failed** on the Dashboard but changed to **Authorized** at a later time. Know more about [late authorisation of payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md). + + You can use webhooks to get notified about payments that get authorised and analyse this data to decide whether to capture the payment or not. + + + +### Notifications on Failed Payments + + When a payment attempted by your customer fails, we receive the failed payment status from the bank. This payment gets recorded in our system as **Failed**. + + Suppose you have enabled the `payment.failed` webhook, you will receive a notification from us about the failed payment. You can then further analyse this payment and notify your customer about the failure. + + + +### Setup and Configuration + +- You can set up webhooks from your Dashboard and configure separate URLs for **Live** mode and **Test** mode. Know more about setting up [Payment webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) and [Payout webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md). +- A **Test** mode webhook receives events for your test transactions. Know more about [testing webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). +- Webhook URLs must use ports **80** or **443** only. +- Ensure Razorpay webhook IPs are whitelisted on your server. Even if your server accepts all incoming requests, webhooks may still be blocked by cloud security groups or network configurations. Refer to [Razorpay IPs and Certificates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#webhook-ips) for the complete list of webhook IP addresses. + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + +## Idempotency + +There could be scenarios where your endpoint might receive the same webhook event multiple times. This is an expected behaviour based on the webhook design. + +To handle duplicate webhook events: +1. You can identify the duplicate webhooks using the `x-razorpay-event-id` header. The value for this header is unique per event. +2. Check the value of `x-razorpay-event-id` in the webhook request header. +3. Verify if an event with the same header is processed at your end. + +## Deactivation + +All webhook responses must return a status code in the range `2XX` within a window of 5 seconds. If we receive response codes other than this or the request times out, it is considered a failure. + +On failure, a webhook is re-tried at progressive intervals of time, defined in the exponential back-off policy, for 24 hours. If the failures continue for 24 hours, the webhook is disabled. You need to enable the webhook from the Dashboard after fixing the errors at your end. Know more about [enabling Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md#enabledisable-a-webhook). + +> **INFO** +> +> +> **Handy Tips** +> +> When a webhook gets disabled, you receive an email notification on the email id you configured while setting up the webhooks. +> + +## Setup Webhooks + +Watch this video to see how to set up a webhook. + +[Video: https://www.youtube.com/embed/Xiikw4_CcQk?si=b6kYHKIp1xikPrJZ] + +To set up webhooks: + +1. Log in to the Dashboard and navigate to **Accounts & Settings**. +2. Click **Webhooks** under **Website and app settings**. +3. Click the **+ Add New Webhook** button. + + ![Add a new webhooks button on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-1.jpg.md) +4. In the **Webhook Setup** pop-up page: + - Enter the **URL** where you want to receive the webhook payload when an event is triggered. We recommend using an HTTPS URL. + + +> **INFO** +> +> +> **Handy Tips** +> +> - You can set up to **30 URLs** to receive Webhook notifications. Webhooks can only be delivered to public URLs. +> - If your URL contains `razorpay` as a domain, you will not be able to add the URL and will receive an error. +> - If you attempt to save a localhost endpoint as part of a webhook setup, you will notice an error. Know more about [testing Webhooks on an application running on localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#application-running-on-localhost). +> + + + - Enter a **Secret** for the webhook endpoint. The secret is used to validate that the webhook is from Razorpay. Do not expose the secret publicly. Know more about [how to validate webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> - When setting up the webhook, specify a secret. Use this secret to validate that the webhook is from Razorpay. Entering the secret is optional but recommended. The secret should never be exposed publicly. +> - The webhook secret does not need to be the Razorpay API key secret. +> + + + + - In the **Alert Email** field, enter the email address to which the notifications should be sent in case of webhook failure. You will receive webhook related notifications like failures, deactivation and so on. + - Select the required events from the list of **Active Events**. + ![List of active webhook events on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-2.jpg.md) + +5. Click **Create Webhook**. After you set up a webhook, it appears on the list of webhooks. + ![List of webhooks on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhooks-list.jpg.md) +6. You can select the webhook and click **Edit** to make more changes. + +## Validation + +When your webhook `secret` is set, Razorpay uses it to create a hash signature with each payload. This hash signature is passed with each request under the `X-Razorpay-Signature` header that you need to validate at your end. We provide support for validating the signature in all of our [language SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration.md). + +If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. + +`X-Razorpay-Signature` +: The hash signature is calculated using HMAC with SHA256 algorithm; with your webhook secret set as the key and the webhook request body as the message. + +You can also validate the webhook signature yourself using a [HMAC](https://en.wikipedia.org/wiki/Hash-based_message_authentication_code) as shown below: + +```html: HMAC Hex Digest +key = webhook_secret +message = webhook_body // raw webhook request body +received_signature = webhook_signature + +expected_signature = hmac('sha256', message, key) + +if expected_signature != received_signature + throw SecurityError +end + +``` + +> **WARN** +> +> +> **Do Not Parse or Cast the Webhook Request Body** +> +> While generating the signature at your end, ensure that the webhook body passed as an argument is the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> + +## Check Payment Status Using Webhooks + +You can use these webhooks to check the status of the authorisation payment and subsequent payments. + +Webhook Event | Description +--- +[`payment.authorized`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized) | Indicates the payment has been authorized. A payment is authorized when the customer’s payment details are successfully authenticated by the bank. +--- +[`payment.captured`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-captured) | Indicates when the payment has been captured. +--- +[`order.paid`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#order-paid) | Indicates the customer has successfully made the payment. +--- +[`payment.failed`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-failed) | Indicates that the payment has failed. If the payment fails, you need to create an authorisation transaction again. + +### Payment Authorized + +Indicates that the payment has been authorized. A payment is authorized when the customer’s payment details are successfully authenticated by the bank. + +> **WARN** +> +> +> **Watch Out!** +> +> For Emandate, the 'acquirer_data' is populated as an empty object in the webhook. +> + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.authorized", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHf94S8ja4Cggz", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "authorized", + "order_id": "order_FHf8iqahguUGkM", + "invoice_id": "inv_FHf8iwg1ZaNMNh", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHf94Uym9tdYFJ", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595447381 + } + } + }, + "created_at": 1595447383 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.authorized", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "authorized", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "card": { + "id": "card_F0zoXUp4IPPGoI", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "541898" + }, + "created_at": 1595449871 + } + } + }, + "created_at": 1595449872 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.authorized", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhXwFbTdVTDWVA", + "entity": "payment", + "amount": 0, + "currency": "INR", + "base_amount": 0, + "status": "authorized", + "order_id": "order_EhTTPTTwLAijw8", + "invoice_id": "inv_EhTTPSxAjbXCWi", + "international": false, + "method": "nach", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhXwFeR0hG3qZj", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1587561758 + } + } + }, + "created_at": 1587562064 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.authorized", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhm0UWoNrZT3h", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "authorized", + "order_id": "order_FHhlVrVCPWGSDC", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhm0XTtJg9zqb", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "688684363734", + "upi_transaction_id": "B832E94839C6C5194D2DB36F865F564D" + }, + "created_at": 1595456636 + } + } + }, + "created_at": 1595456636 +} +``` + +### Payment Captured + +Indicates that the payment has been captured. + +> **WARN** +> +> +> **Watch Out!** +> +> For Emandate, the 'acquirer_data' is populated as an empty object in the webhook. +> + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.captured", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHf94S8ja4Cggz", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_FHf8iqahguUGkM", + "invoice_id": "inv_FHf8iwg1ZaNMNh", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHf94Uym9tdYFJ", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595447381 + } + } + }, + "created_at": 1595447383 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.captured", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "card": { + "id": "card_F0zoXUp4IPPGoI", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "541898" + }, + "created_at": 1595449871 + } + } + }, + "created_at": 1595449873 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.captured", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhXwFbTdVTDWVA", + "entity": "payment", + "amount": 0, + "currency": "INR", + "base_amount": 0, + "status": "captured", + "order_id": "order_EhTTPTTwLAijw8", + "invoice_id": "inv_EhTTPSxAjbXCWi", + "international": false, + "method": "nach", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhXwFeR0hG3qZj", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at": 1587561758 + } + } + }, + "created_at": 1587562064 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.captured", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhm0UWoNrZT3h", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHhlVrVCPWGSDC", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhm0XTtJg9zqb", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "688684363734", + "upi_transaction_id": "B832E94839C6C5194D2DB36F865F564D" + }, + "created_at": 1595456636 + } + } + }, + "created_at": 1595456636 +} +``` + +### Order Paid + +Indicates that the payment has been captured. + +> **WARN** +> +> +> **Watch Out!** +> +> - For Emandate, the 'acquirer_data' is populated as an empty object in the webhook. +> - The `invoice_id` parameter is populated with the unique identifier value (for example, `inv_FHf8iwg1ZaNMNh`) for Emandate, Card and Paper NACH methods only. For UPI, the value of the `invoice_id` parameter value is `null`. +> + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "order.paid", + "contains": [ + "payment", + "order" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHf94S8ja4Cggz", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_FHf8iqahguUGkM", + "invoice_id": "inv_FHf8iwg1ZaNMNh", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHf94Uym9tdYFJ", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595447381 + } + }, + "order": { + "entity": { + "id": "order_FHf8iqahguUGkM", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "paid", + "attempts": 1, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1595447361, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "netbanking", + "expire_at": 1689971140, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "XXXXXXXXXXXX1121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 0 + } + } + } + }, + "created_at": 1595447383 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "order.paid", + "contains": [ + "payment", + "order" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": "inv_FHf8iwg1ZaNMNh", + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "card": { + "id": "card_F0zoXUp4IPPGoI", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "541898" + }, + "created_at": 1595449871 + } + }, + "order": { + "entity": { + "id": "order_FHfnswDdfu96HQ", + "entity": "order", + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "paid", + "attempts": 1, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1595449699 + } + } + }, + "created_at": 1595449873 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "order.paid", + "contains": [ + "payment", + "order" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhXwFbTdVTDWVA", + "entity": "payment", + "amount": 0, + "currency": "INR", + "base_amount": 0, + "status": "captured", + "order_id": "order_EhTTPTTwLAijw8", + "invoice_id": "inv_EhTTPSxAjbXCWi", + "international": false, + "method": "nach", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhXwFeR0hG3qZj", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "created_at": 1587561758 + } + }, + "order": { + "entity": { + "id": "order_EhTTPTTwLAijw8", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": null, + "offer_id": null, + "status": "paid", + "attempts": 1, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at": 1587546033, + "token": { + "method": "nach", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 10000000, + "auth_type": "physical", + "expire_at": 1617215399, + "nach": { + "create_form": true, + "form_reference1": "Reference 1", + "form_reference2": "Reference 2", + "prefilled_form": "https://rzp.io/i/kHXQ34x", + "upload_form_url": "https://rzp.io/i/2IcNo4E", + "description": "Paper NACH" + }, + "bank_account": { + "ifsc": "HDFC0000123", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "99889900231489", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 10000 + } + } + } + }, + "created_at": 1587562064 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "order.paid", + "contains": [ + "payment", + "order" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhm0UWoNrZT3h", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHhlVrVCPWGSDC", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhm0XTtJg9zqb", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "688684363734", + "upi_transaction_id": "B832E94839C6C5194D2DB36F865F564D" + }, + "created_at": 1595456636 + } + }, + "order": { + "entity": { + "id": "order_FHhlVrVCPWGSDC", + "entity": "order", + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "paid", + "attempts": 2, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1595456608 + } + } + }, + "created_at": 1595456636 +} +``` + +### Payment Failed + +Indicates that the payment has failed. If the payment fails, you need to create an authorisation transaction again. + +> **WARN** +> +> +> **Watch Out!** +> +> For Emandate, the 'acquirer_data' is populated as an empty object in the webhook. +> + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.failed", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhKpRTgEWNzBx", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "failed", + "order_id": "order_FHhKYYSK40KNzt", + "invoice_id": "inv_FHhKYltuPeHTyP", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhKpV8NeHJHtg", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595455092 + } + } + }, + "created_at": 1595455094 +} +```json: Cards +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.failed", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhLcvd67XXsBe", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "failed", + "order_id": "order_FHhLONJc3wlBbv", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "card": { + "id": "card_F0zoXUp4IPPGoI", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "error_source": "gateway", + "error_step": "payment_authorization", + "error_reason": "payment_failed", + "acquirer_data": { + "auth_code": null + }, + "created_at": 1595455138 + } + } + }, + "created_at": 1595455139 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.failed", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhYcjfgwGLVZOf", + "entity": "payment", + "amount": 0, + "currency": "INR", + "base_amount": 0, + "status": "failed", + "order_id": "order_EhYX40CBIRmSaC", + "invoice_id": "inv_EhYX3zhOm38daM", + "international": false, + "method": "nach", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhYcjjYiEL1nEW", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1587564171 + } + } + }, + "created_at": 1587564208 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.failed", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhSxIRyTtshjQr", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "failed", + "order_id": "order_EhSwt4nx32X1Ss", + "invoice_id": "inv_EhSwt4FKpTKrdf", + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": "Invoice #inv_EhSwt4FKpTKrdf", + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": gaurav.kumar@okhdfc, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhSxIV7p0l7yri", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "created_at": 1587544209 + } + } + }, + "created_at": 1587544212 +} +``` + +## Check Token Status using Webhooks + +You can use the below webhooks to check the status of the token. + +Webhook Event | Applicable Methods | Description +--- +[`token.confirmed`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-confirmed) | - Emandate +- Card +- Paper NACH +- UPI + | Indicates that the bank has completed the mandate registration. Once confirmed, you can create subsequent payments as per your business needs. +--- +[`token.rejected`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-rejected) | - Emandate +- Card +- Paper NACH +- UPI + | Indicates that the has been rejected. If rejected, you need to create the authorisation transaction again. +--- +[`token.cancelled`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-cancelled) | - Emandate +- UPI + - Card + | Indicated the token has been cancelled. +--- +[`token.paused`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-paused) | UPI | Indicated the token has been paused by your customer. + +### Token Confirmed + +Indicates that the bank has completed the mandate registration. Once confirmed, you can create subsequent payments as per your business needs. + +Available for tokens authorized using the following methods: +- Emandate +- Card +- Paper NACH +- UPI + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.confirmed", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHf94Uym9tdYFJ", + "entity": "token", + "token": "2wDPM7VAlXtjAR", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "netbanking", + "mrn": null, + "used_at": 1595447381, + "created_at": 1595447381, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 1689971140, + "dcc_enabled": false + } + } + }, + "created_at": 1595447383 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.confirmed", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHfn3rIiM1Z8nr", + "entity": "token", + "token": "2aqzyte2EqvuDr", + "bank": null, + "wallet": null, + "method": "card", + "card": { + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer", + "expiry_month": 5, + "expiry_year": 2025, + "flows": { + "otp": true, + "recurring": true, + "iframe": false + } + }, + "recurring": true, + "auth_type": null, + "mrn": null, + "used_at": 1595449653, + "created_at": 1595449652, + "expired_at": 1748716199, + "dcc_enabled": false + } + } + }, + "created_at": 1595449654 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.confirmed", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHf94Uym9tdYFJ", + "entity": "token", + "token": "2wDPM7VAlXtjAR", + "bank": "HDFC", + "wallet": null, + "method": "nach", + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "physical", + "mrn": null, + "used_at": 1595447381, + "created_at": 1595447381, + "max_amount": 9999900, + "expired_at": 1689971140, + "dcc_enabled": false + } + } + }, + "created_at": 1595447383 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.confirmed", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHhm0XTtJg9zqb", + "entity": "token", + "token": "BmwqwrkHZTlzVF", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595456636, + "created_at": 1595456636, + "start_time": 1595456608, + "dcc_enabled": false + } + } + }, + "created_at": 1595456636 +} +``` + +### Token Rejected + +Triggered during the token creation/registration process, when the token creation process fails without completion. + +This webhook is available for tokens authorized using the following methods: +- Emandate +- Card +- Paper NACH +- UPI + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.rejected", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHhXz1xrfmEtzO", + "entity": "token", + "token": "CxQakUkIEObsTB", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "recurring": false, + "recurring_details": { + "status": "rejected", + "failure_reason": "Rejected by bank" + }, + "auth_type": "debitcard", + "mrn": null, + "used_at": 1595455839, + "created_at": 1595455839, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 4102444799, + "dcc_enabled": false + } + } + }, + "created_at": 1595455843 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.rejected", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHhXz1xrfmEtzO", + "entity": "token", + "token": "CxQakUkIEObsTB", + "bank": "HDFC", + "wallet": null, + "method": "card", + "recurring": false, + "recurring_details": { + "status": "rejected", + "failure_reason": "Rejected by bank" + }, + "card": { + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer", + "expiry_month": 5, + "expiry_year": 2021, + "flows": { + "otp": true, + "recurring": false, + "iframe": false + } + }, + "auth_type": "card", + "mrn": null, + "used_at": 1595455839, + "created_at": 1595455839, + "max_amount": 9999900, + "expired_at": 4102444799, + "dcc_enabled": false + } + } + }, + "created_at": 1595455843 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.rejected", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHhXz1xrfmEtzO", + "entity": "token", + "token": "CxQakUkIEObsTB", + "bank": "HDFC", + "wallet": null, + "method": "nach", + "recurring": false, + "recurring_details": { + "status": "rejected", + "failure_reason": "Rejected by bank" + }, + "auth_type": "physical", + "mrn": null, + "used_at": 1595455839, + "created_at": 1595455839, + "max_amount": 9999900, + "expired_at": 4102444799, + "dcc_enabled": false + } + } + }, + "created_at": 1595455843 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.rejected", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHhm0XTtJg9zqb", + "entity": "token", + "token": "BmwqwrkHZTlzVF", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "rejected", + "failure_reason": "Rejected by bank" + }, + "auth_type": "upi", + "mrn": null, + "used_at": 1595456636, + "created_at": 1595456636, + "start_time": 1595456608, + "dcc_enabled": false + } + } + }, + "created_at": 1595456636 +} +``` + +### Token Cancelled + +Triggered when a token is explicitly cancelled or deactivated. Usually happens after a successful token creation. + +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.cancelled", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FVIP5DVexjoZjF", + "entity": "token", + "token": "5ESJrtR1V6k6mp", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "56546", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "cancelled", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1598424055, + "created_at": 1598424055, + "start_time": 1598510437, + "dcc_enabled": false, + "max_amount": 5600, + "expired_at": 1913956837 + } + } + }, + "created_at": 1599065559 +} + +```json: Cards +{ + "entity":"event", + "account_id":"acc_8TgNt9DVrJB0bl", + "event":"token.cancelled", + "contains":[ + "token" + ], + "payload":{ + "token":{ + "entity":{ + "id":"token_KaQbMNOeH67CZj", + "entity":"token", + "token":"DWrlGEB3ZqWKNV", + "bank":null, + "wallet":null, + "method":"card", + "card":{ + "entity":"card", + "name":"", + "last4":"3182", + "network":"Visa", + "type":"credit", + "issuer":"HDFC", + "international":false, + "emi":true, + "sub_type":"consumer", + "token_iin":"486924082", + "expiry_month":"01", + "expiry_year":"2099", + "flows":{ + "otp":true, + "recurring":true + }, + "cobranding_partner":null + }, + "recurring":true, + "recurring_details":{ + "status":"cancelled", + "failure_reason":null + }, + "auth_type":null, + "mrn":null, + "used_at":1675247897, + "created_at":1667230058, + "expired_at":1730399399, + "status":"active", + "error_description":null, + "dcc_enabled":false, + "max_amount":200, + "error_code":null, + "compliant_with_tokenisation_guidelines":true + } + } + }, + "created_at":1681372110 +} +``` + +### Token Paused + +Indicates the token has been paused by your customer. + +Available only for tokens authorized via UPI. + +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.paused", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FVIP5DVexjoZjF", + "entity": "token", + "token": "5ESJrtR1V6k6mp", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "56546", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "paused", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1598424055, + "created_at": 1598424055, + "start_time": 1598510437, + "dcc_enabled": false, + "max_amount": 5600, + "expired_at": 1913956837 + } + } + }, + "created_at": 1599065559 +} +``` + +## Check Registration Link Status using Webhooks + +You can use these webhooks to check the status of the registration link. + +Webhook Event | Description +--- +[`invoice.paid`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#invoice-paid) | Indicates that a registration link is successfully paid. +--- +[`invoice.expired`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#invoice-expired) | Indicates that a registration link has expired. + +### Invoice Paid + +Indicates that a registration link has been successfully paid. + +> **WARN** +> +> +> **Watch Out!** +> +> For Emandate, the 'acquirer_data' is populated as an empty object in the webhook. +> + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhf2L2OS2qE1u", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_FHhejhc3XFHr5c", + "invoice_id": "inv_FHhejg2WDlmyGP", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_FHhejg2WDlmyGP", + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhf2PMcYf1mOu", + "notes": { + "Internal Note": "Random Description" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595456240 + } + }, + "order": { + "entity": { + "id": "order_FHhejhc3XFHr5c", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1595456223, + "token": { + "method": "emandate", + "notes": { + "Internal Note": "Random Description" + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": null, + "expire_at": 1609439399, + "bank_account": { + "ifsc": "HDFC0000123", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "XXXXXXXX9012", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 0 + } + } + }, + "invoice": { + "entity": { + "id": "inv_FHhejg2WDlmyGP", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_FHhejhc3XFHr5c", + "payment_id": "pay_FHhf2L2OS2qE1u", + "status": "paid", + "expire_by": 1596220199, + "issued_at": 1595456223, + "paid_at": 1595456243, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595456223, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Authorization link", + "notes": { + "Internal Note": "Random Description" + }, + "comment": null, + "short_url": "https://rzp.io/i/6gkcy7O", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "user_id": "CTlk1QZN33LQUT", + "created_at": 1595456223, + "idempotency_key": null + } + } + }, + "created_at": 1595456243 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhcSi5TDZ7wJL", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHhcC7dWy3feTu", + "invoice_id": "inv_FHhcC629qa82SA", + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_FHhcC629qa82SA", + "card_id": "card_F0zoXUp4IPPGoI", + "card": { + "id": "card_F0zoXUp4IPPGoI", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "Internal Note": "Random Description" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "290686" + }, + "created_at": 1595456094 + } + }, + "order": { + "entity": { + "id": "order_FHhcC7dWy3feTu", + "entity": "order", + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1595456078, + "token": { + "method": "card", + "notes": { + "Internal Note": "Random Description" + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": null, + "expire_at": null, + "first_payment_amount": 0 + } + } + }, + "invoice": { + "entity": { + "id": "inv_FHhcC629qa82SA", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_FHhcC7dWy3feTu", + "payment_id": "pay_FHhcSi5TDZ7wJL", + "status": "paid", + "expire_by": 1596220199, + "issued_at": 1595456078, + "paid_at": 1595456095, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595456078, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Authorization Link", + "notes": { + "Internal Note": "Random Description" + }, + "comment": null, + "short_url": "https://rzp.io/i/X2cWr1D", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "user_id": "CTlk1QZN33LQUT", + "created_at": 1595456078, + "idempotency_key": null + } + } + }, + "created_at": 1595456095 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhXwFbTdVTDWVA", + "entity": "payment", + "amount": 0, + "currency": "INR", + "base_amount": 0, + "status": "captured", + "order_id": "order_EhTTPTTwLAijw8", + "invoice_id": "inv_EhTTPSxAjbXCWi", + "international": false, + "method": "nach", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhXwFeR0hG3qZj", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "created_at": 1587561758 + } + }, + "order": { + "entity": { + "id": "order_EhTTPTTwLAijw8", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": null, + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1587546033, + "token": { + "method": "nach", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 10000000, + "auth_type": "physical", + "expire_at": 1617215399, + "nach": { + "create_form": true, + "form_reference1": "Reference 1", + "form_reference2": "Reference 2", + "prefilled_form": "https://rzp.io/i/409IxCx", + "upload_form_url": "https://rzp.io/i/2IcNo4E", + "description": "Paper NACH" + }, + "bank_account": { + "ifsc": "HDFC0000123", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "99889900231489", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 10000 + } + } + }, + "invoice": { + "entity": { + "id": "inv_EhTTPSxAjbXCWi", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_EhTTPTTwLAijw8", + "payment_id": "pay_EhXwFbTdVTDWVA", + "status": "paid", + "expire_by": 1588271399, + "issued_at": 1587546033, + "paid_at": 1587562064, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1587546033, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Paper NACH", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "comment": null, + "short_url": "https://rzp.io/i/2IcNo4E", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "subscription_status": null, + "user_id": "BhPhy4mGkOmThn", + "created_at": 1587546033, + "idempotency_key": null, + "reminder_status": null, + "token": { + "method": "nach", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 10000000, + "auth_type": "physical", + "expire_at": 1617215399, + "nach": { + "create_form": true, + "form_reference1": "Reference 1", + "form_reference2": "Reference 2", + "prefilled_form": "https://rzp.io/i/409IxCx", + "upload_form_url": "https://rzp.io/i/2IcNo4E", + "description": "Paper NACH" + }, + "bank_account": { + "ifsc": "HDFC0000123", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "99889900231489", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 10000 + }, + "nach_form_url": "https://rzp.io/i/409IxCx" + } + } + }, + "created_at": 1587562064 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhw4RhnuZPiuO", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHhvTLKwXS9bnS", + "invoice_id": "inv_FHhvTPure2cEqZ", + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_FHhvTPure2cEqZ", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhw4Ufvv7kv9u", + "notes": { + "Internal Note": "Random Description" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "237153511656", + "upi_transaction_id": "B1D63A7B0366274F83AF9B3A0D7C5CA8" + }, + "created_at": 1595457208 + } + }, + "order": { + "entity": { + "id": "order_FHhvTLKwXS9bnS", + "entity": "order", + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "currency": "INR", + "receipt": null, + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "paid", + "attempts": 3, + "notes": [], + "created_at": 1595457173, + "token": { + "method": "upi", + "notes": { + "Internal Note": "Random Description" + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 200000, + "auth_type": null, + "expire_at": 1609439399, + "first_payment_amount": 0 + } + } + }, + "invoice": { + "entity": { + "id": "inv_FHhvTPure2cEqZ", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_FHhvTLKwXS9bnS", + "payment_id": "pay_FHhw4RhnuZPiuO", + "status": "paid", + "expire_by": 1596220199, + "issued_at": 1595457174, + "paid_at": 1595457208, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595457173, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Authorization transaction", + "notes": { + "Internal Note": "Random Description" + }, + "comment": null, + "short_url": "https://rzp.io/i/GZlLJ0d", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "user_id": "CTlk1QZN33LQUT", + "created_at": 1595457174, + "idempotency_key": null + } + } + }, + "created_at": 1595457208 +} +``` + +### Invoice Expired + +Indicates that a registration link has expired. + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.expired", + "contains": [ + "invoice" + ], + "payload": { + "invoice": { + "entity": { + "id": "inv_EhT8EVjQDUukPy", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_EhT8EWJQqnMYq5", + "payment_id": null, + "status": "expired", + "expire_by": 1587580199, + "issued_at": 1587544830, + "paid_at": null, + "cancelled_at": null, + "expired_at": 1587580384, + "sms_status": "sent", + "email_status": "sent", + "date": 1587544830, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Emandate", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "comment": null, + "short_url": "https://rzp.io/i/bJsb41M", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "subscription_status": null, + "user_id": "BhPhy4mGkOmThn", + "created_at": 1587544830, + "idempotency_key": null, + "reminder_status": null + } + } + }, + "created_at": 1587580384 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.expired", + "contains": [ + "invoice" + ], + "payload": { + "invoice": { + "entity": { + "id": "inv_EhT9735kpvUafM", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_EhT9741SenUX1D", + "payment_id": null, + "status": "expired", + "expire_by": 1587580199, + "issued_at": 1587544880, + "paid_at": null, + "cancelled_at": null, + "expired_at": 1587580384, + "sms_status": "sent", + "email_status": "sent", + "date": 1587544880, + "terms": null, + "partial_payment": false, + "gross_amount": 10000, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 10000, + "amount_paid": 0, + "amount_due": 10000, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Card", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "comment": null, + "short_url": "https://rzp.io/i/BapcbaV", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "subscription_status": null, + "user_id": "BhPhy4mGkOmThn", + "created_at": 1587544880, + "idempotency_key": null, + "reminder_status": null + } + } + }, + "created_at": 1587580384 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.expired", + "contains": [ + "invoice" + ], + "payload": { + "invoice": { + "entity": { + "id": "inv_EhTAJksst7voVZ", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_EhTAJlTQZbL9NT", + "payment_id": null, + "status": "expired", + "expire_by": 1587580199, + "issued_at": 1587544949, + "paid_at": null, + "cancelled_at": null, + "expired_at": 1587580384, + "sms_status": "sent", + "email_status": "sent", + "date": 1587544949, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Paper NACH", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "comment": null, + "short_url": "https://rzp.io/i/IT8vEd1", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "subscription_status": null, + "user_id": "BhPhy4mGkOmThn", + "created_at": 1587544949, + "idempotency_key": null, + "reminder_status": null, + "token": { + "method": "nach", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 10000000, + "auth_type": "physical", + "expire_at": 1617215399, + "nach": { + "create_form": true, + "form_reference1": "Reference 1", + "form_reference2": "Reference 2", + "prefilled_form": "https://rzp.io/i/jDvNSTc", + "upload_form_url": "https://rzp.io/i/IT8vEd1", + "description": "Paper NACH" + }, + "bank_account": { + "ifsc": "HDFC0000123", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "88990011223344", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 0 + }, + "nach_form_url": "https://rzp.io/i/jDvNSTc" + } + } + }, + "created_at": 1587580384 +} +``` + +## Check Notification Status using Webhooks + +You can use these webhooks to check the status of the pre-debit notification sent to the customer when the payment method is [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md) and [Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md). These notification webhooks are available only if you send the notification object while creating an order. + +Webhooks Event | Description +--- +`notification.delivered` | Indicates that a pre-debit notification is successfully delivered. +--- +`notification.failed` | Indicates that a pre-debit notification has failed to deliver. + +### Notification Delivered + +Indicates that a pre-debit notification is successfully delivered. + +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "order.notification.delivered", + "contains": [ + "notification" + ], + "payload": { + "notification": { + "entity": { + "id": "notification_00000000000001", + "entity": "notification", + "order_id": "order_1Aa00000000002", + "token_id": "token_M7K2eFBU7vToaQ", + "delivered_at": 1634057113, + "status": "delivered", + "payment_after": 1634057114 + } + }, + "created_at": 1595456636 + } +} +``` + +### Notification Failed + +Indicates that a pre-debit notification has failed to deliver. You should re-trigger the pre-debit notification before making a debit attempt in these cases. + +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "order.notification.failed", + "contains": [ + "notification" + ], + "payload": { + "notification": { + "entity": { + "id": "notification_00000000000002", + "entity": "notification", + "order_id": "order_1Aa00000000002", + "token_id": "token_M7K2eFBU7vToaQ", + "delivered_at": null, + "status": "failed", + "payment_after": 1634057114 + } + }, + "created_at": 1595456636 + } +} +``` diff --git a/llm-content/api/payments/route.md b/llm-content/api/payments/route.md new file mode 100644 index 00000000..2e2c47bf --- /dev/null +++ b/llm-content/api/payments/route.md @@ -0,0 +1,96 @@ +--- +title: API | Route +heading: Route +description: Use Route to create APIs for Linked Accounts, Stakeholders, Product Configuration and Stakeholders. +--- + +# Route + +You should create a linked account to integrate Route and start transferring payments to vendors. + + + Below are the steps to integrate Route. You can also refer to our comprehensive [Route Integration guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/integration-guide.md). + + 1. [Create a Linked Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-linked-account.md) + 2. [Create a Stakeholder](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-stakeholder.md) + 3. [Request a Product Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/request-product-config.md) + 4. [Update a Product Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/update-product-config.md) + 5. Transfer funds to Linked Accounts using [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-transfers-orders.md), [Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-transfers-payments.md) or [Direct Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/direct-transfers.md) methods. + + Fork the Razorpay Postman Public Workspace and try the Linked Account APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-ee29e3a3-f06a-464c-b9f2-03a20e875591) + +### Related Guides + +[About Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md) +[About Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route.md) +[Integrate With Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/integration-guide.md) + +### Endpoints + +- **post** `/v2/accounts` - Create a Linked Account: + Creates a Linked Account. + +- **patch** `/v2/accounts/:account_id` - Update a Linked Account: + Updates a Linked Account. + +- **get** `/v2/accounts/:account_id` - Fetch a Linked Account With ID: + Fetches a Linked Account using a unique identifier. + +- **post** `/v2/accounts/:account_id/stakeholders` - Create a Stakeholder: + Creates a Stakeholder. + +- **patch** `/v2/accounts/:account_id/stakeholders/:stakeholder_id` - Update a Stakeholder Account: + Updates a Stakeholder account. + +- **post** `/v2/accounts/:account_id/products` - Request a Product Configuration: + Requests a product configuration. + +- **patch** `/v2/accounts/:account_id/products/:product_id` - Update a Product Configuration: + Updates a product configuration. + +- **get** `/v2/accounts/:account_id/products/:product_id` - Fetch a Product Configuration: + Fetches a product configuration. + +- **post** `/v1/orders` - Create Transfers from Orders: + Creates Transfers from orders. + +- **post** `/v1/payments/:id/transfers` - Create Transfers from Payments: + Creates Transfers to Linked Accounts once the payments are captured. + +- **post** `/v1/transfers` - Direct Transfers: + Transfers funds directly from your account balance to the Linked Accounts. + +- **post** `/v1/transfers` - Create a Direct Transfer (Idempotent Request): + Transfers funds directly from your account balance to the Linked Accounts. + +- **get** `/v1/payments/:id/transfers` - Fetch Transfers for a Payment: + Fetches transfers created for a specific payment. + +- **get** `/v1/orders/:id/?expand[]=transfers&status=processing` - Fetch Transfer for an Order: + Fetches transfers created for a specific order. + +- **get** `/v1/transfers/:id` - Fetch a Transfer With ID: + Displays specific transfer details. + +- **get** `/v1/transfers?recipient_settlement_id=:id` - Fetch Transfers for a Settlement: + Retrieves the collection of transfers created for a particular Settlement ID. + +- **get** `/v1/transfers?expand[]=recipient_settlement` - Fetch Settlement Details: + Displays the details of settlements made to Linked Accounts. + +- **get** `/v1/payments/` - Fetch Payments of a Linked Account: + Displays all the payments received by a Linked Account. + +- **post** `/v1/payments/:id/refund` - Refund Payments and Reverse Transfer from a Linked Account: + Initiates a payment refund to a customer. + +- **post** `/v1/transfers/:id/reversals` - Reverse a Transfer: + Initiates a reversal of funds from the Linked Account to your account. + +- **get** `/v1/transfers/:id/reversals` - Fetch Reversals for a Transfer: + Fetches reversals for a Transfer. + +- **patch** `/v1/transfers/:id` - Modify Settlement Hold for Transfers: + Modifies the settlement configuration for a particular transfer id. diff --git a/llm-content/api/payments/route/account-apis-beta.md b/llm-content/api/payments/route/account-apis-beta.md new file mode 100644 index 00000000..eadda899 --- /dev/null +++ b/llm-content/api/payments/route/account-apis-beta.md @@ -0,0 +1,752 @@ +--- +title: Account APIs [beta] +description: Create accounts directly from your website/ app using Razorpay Account APIs. +--- + +# Account APIs [beta] + +Account APIs let you dynamically create accounts with Razorpay directly from your website/app to set a fully-functional payment ecosystem up and running quickly. Our APIs use basic auth as authentication. Refer the [API Documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#authentication) section to know more. + +You can perform the following operations with the Account APIs: + +- [Create an Account](#create-an-account) +- [Fetch Accounts](#fetch-accounts) +- [Fetch Account by ID](#fetch-account-by-id) + +## Account Entity + +The account entity has the following fields. + +`name` +: `string` Name of the account holder. + +`email` +: `string` Email address of the account holder. + +`tnc_accepted` +: `boolean` Indicates if the [terms and conditions](https://razorpay.com/terms/) have been accepted or not. + - `true`: Terms and conditions have been accepted. + - `false`: Terms and conditions have not been accepted. + +`business_name` +: `string` Your company name. + +`business_type` +: `string` Business type. Possible values: + - `llp` + - `ngo` + - `other` + - `individual` + - `partnership` + - `proprietorship` + - `public_limited` + - `private_limited` + - `trust`, `society` + - `not_yet_registered` + - `educational_institutes` + +`ifsc_code` +: `string` The ifsc code of your bank account. + +`beneficiary_name` +: `string` Name of the bank account holder. + +`account number` _mandatory_ +: `string` The bank account number. + +`account_type` +: `string` The bank account type. For example, Current. + +`id` +: `string` Razorpay account ID. For example `acc_gHQwerty123ggd`. + +`live` +: `boolean` Indicates if an account is live or not. Possible values: + - `true`: Account is live. + - `false`: Account is not live. + +`managed` +: `boolean` Indicates if it is a Linked Account or not. + +`status` +: `string` Indicates the status of an account. Possible values: + - `activated` + - `not_activated` + - `verification_failed` (penny testing enabled) + - `verification_pending` (penny testing enabled) + +`can_submit` +: `boolean` Indicates if the activation fields have been filled up or not. Possible values: + - `true`: Activation fields are filled. + - `false`: Activation fields are not filled. + +`fields_pending` +: `array` Lists all the pending fields for activating the account. + +`transaction_report_email` +: `array` List of emails to which the transaction email report will be sent. + +`mobile` +: `integer` Company mobile number. + +`landline` +: `integer` Company landline number. + +`business_models` +: `string` The type of the business modes. Can accept these values: `B2B` or `B2C` or `B2B+B2C`. + +`registered_address` +: The registered address of the company. + + `address` + : `string` The registered company address, at the time of account creation. + + `city` + : `string` The name of the city in your business address. + + `state` + : `string` The name of the state in your business address. + + `pin` + : `integer` The pin code of the area in your business address. + +`operational_address` +: The operational address of the company. + + `address` + : `string` The current operational address of the company. + + `city` + : `string` The name of the city in your operational address. + + `state` + : `string` The name of the state in your operational address. + + `pin` + : `string` The pin code of the area in your operational address. + +`date_establishment` +: `integer` Date of establishment. + +`transaction_volume` +: `string` Expected annual transaction volume (INR). + +`average_transaction_size` +: `integer` Expected average transaction value. + +`cin` +: `string` Company CIN. + +`gstin` +: `string` GST Identification Number. + +`p_gstin` +: `string` Provisional GST Identification Number. + +`pan` +: `string` Company PAN. + +`pan_name` +: `string` Name of the account holder in PAN card. + +`promoter_pan` +: `string` PAN of any 1 authorized signatory/promoter/director. + +`promoter_pan_name` +: `string` Name on the promoter's PAN Card. + +`notes` +: `object` A key-value store present with every Razorpay entity like Account, Payment, Refund, etc. You can use this for storing additional data relating to the entity in a structured format. Refer [Notes section of API documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to learn more. + +`destination` +: `string` The Id of the bank account entity created. For example, ba_gHQwerty123ggd + +## Create an Account + +Use the following endpoint to create an account. + +beta/accounts + +### Sample Request and Response + +```curl: Sample Request +curl -XPOST 'https://api.razorpay.com/v1/beta/accounts' \ + -u [YOUR_KEY_ID]:[YOUR_SECRET] \ + -H "Content-type: application/json" \ + -d '{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "tnc_accepted":true, + "account_details":{ + "business_name":"Acme Corporation", + "business_type":"individual" + }, + "bank_account":{ + "ifsc_code":"HDFC0CAGSBK", + "beneficiary_name":"Gaurav Kumar", + "account_type":"current", + "account_number":1234567890123456 + } + }' +``` + +```json: Success Response +{ + "id": "acc_gHQwerty123ggd", + "entity": "account", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "live": false, + "managed": true, + "tnc_accepted": true, + "activation_details": { + "status": "activated", + "activated_at": 1513681274, + "can_submit": true, + "fields_pending": [ ] + }, + "secondary_emails": { + "transaction_report_email": [ ] + }, + "account_details": { + "mobile": null, + "landline": null, + "business_name": "Acme Corporation", + "business_type": "individual", + "business_model": null, + "registered_address": { + "address": null, + "city": null, + "state": null, + "pin": null + }, + "operational_address": { + "address": null, + "city": null, + "state": null, + "pin": null + }, + "date_established": null, + "transaction_volume": null, + "average_transaction_size": null, + "kyc_details": { + "cin": null, + "gstin": null, + "p_gstin": null, + "pan": null, + "pan_name": null, + "promoter_pan": null, + "promoter_pan_name": null, + "business_proof_file": null, + "address_proof_file": null + } + }, + "notes": { }, + "fund_transfer": { + "destination": "ba_9EhChhUhhXdHBv" + } +} +```json: Success Response - Penny testing enabled +{ + "id": "acc_gHQwerty123ggd", + "entity": "account", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "live": false, + "managed": true, + "tnc_accepted": true, + "activation_details": { + "status": "activated", + "bank_details_verification_error": null, + "activated_at": 1513681274, + "can_submit": true, + "fields_pending": [ ] + }, + "secondary_emails": { + "transaction_report_email": [ ] + }, + "account_details": { + "mobile": null, + "landline": null, + "business_name": "Acme Corporation", + "business_type": "individual", + "business_model": null, + "registered_address": { + "address": null, + "city": null, + "state": null, + "pin": null + }, + "operational_address": { + "address": null, + "city": null, + "state": null, + "pin": null + }, + "date_established": null, + "transaction_volume": null, + "average_transaction_size": null, + "kyc_details": { + "cin": null, + "gstin": null, + "p_gstin": null, + "pan": null, + "pan_name": null, + "promoter_pan": null, + "promoter_pan_name": null, + "business_proof_file": null, + "address_proof_file": null + } + }, + "notes": { }, + "fund_transfer": { + "destination": "ba_9EhChhUhhXdHBv" + } +} +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The name field is required.", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + }, + "field":"name" + } +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> All JSON input fields in the request are mandatory. +> + +#### Error Response Parameters + +Given below is a list of possible errors you may face while creating a Linked Account. + +Error | Cause | Solution +--- +The name field is required. | This error occurs when the `account_number` starts with 0 because the parameter is an integer and 0 at the start is not taken. | Make sure to pass the account number in double quotes so that the starting zeroes are taken. + +## Fetch Accounts + +The below API is used for fetching the details of all the accounts. + +beta/accounts + +### Sample Request and Response + +The below API creates a Razorpay merchant account. + +```curl: cURL +curl -X GET 'https://api.razorpay.com/v1/beta/accounts' \ + -u [YOUR_KEY_ID]:[YOUR_SECRET] \ +```json: Response +{ + "entity":"collection", + "count":2, + "items":[ + { + "id":"acc_gHQwerty123ggd", + "entity":"account", + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "live":false, + "managed":true, + "tnc_accepted":true, + "activation_details":{ + "status":"activated", + "activated_at":1513681274, + "can_submit":true, + "fields_pending":[ + + ] + }, + "secondary_emails":{ + "transaction_report_email":[ + + ] + }, + "account_details":{ + "mobile":null, + "landline":null, + "business_name":"Acme Corporation", + "business_type":"individual", + "paymentdetails":null, + "business_model":null, + "registered_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "operational_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "date_established":null, + "transaction_volume":null, + "average_transaction_size":null, + "kyc_details":{ + "cin":null, + "gstin":null, + "p_gstin":null, + "pan":null, + "pan_name":null, + "promoter_pan":null, + "promoter_pan_name":null, + "business_proof_file":null, + "address_proof_file":null + } + }, + "notes":{ + "merchant_data_1":"some string" + }, + "fund_transfer":{ + "destination":"ba_9EhChhUhhXdHBv" + } + }, + { + "id":"acc_fHQwerty123ffe", + "entity":"account", + "name":"John Appleseed", + "email":"johnappleseed@gmail.com", + "live":true, + "managed":true, + "tnc_accepted":true, + "activation_details":{ + "status":"activated", + "activated_at":1513681274, + "can_submit":true, + "fields_pending":[ + + ] + }, + "secondary_emails":{ + "transaction_report_email":[ + + ] + }, + "account_details":{ + "mobile":null, + "landline":null, + "business_name":"XYZ software solutions", + "business_type":"partnership", + "paymentdetails":null, + "business_model":null, + "registered_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "operational_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "date_established":null, + "transaction_volume":null, + "average_transaction_size":null, + "kyc_details":{ + "cin":null, + "gstin":null, + "p_gstin":null, + "pan":null, + "pan_name":null, + "promoter_pan":null, + "promoter_pan_name":null, + "business_proof_file":null, + "address_proof_file":null + } + }, + "notes":{ + "merchant_data_1":"some id" + }, + "fund_transfer":{ + "destination":"ba_9FiDasQoewhnrs" + } + } + ] +} +```json: Response - Penny testing enabled +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "acc_gHQwerty123ggd", + "entity": "account", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "live": false, + "managed": true, + "tnc_accepted": true, + "activation_details": { + "status": "activated", + "bank_details_verification_error": null, + "activated_at": 1513681274, + "can_submit": true, + "fields_pending": [ ] + }, + "secondary_emails": { + "transaction_report_email": [ ] + }, + "account_details": { + "mobile": null, + "landline": null, + "business_name": "Acme Corporation", + "business_type": "individual", + "paymentdetails": null, + "business_model": null, + "registered_address": { + "address": null, + "city": null, + "state": null, + "pin": null + }, + "operational_address": { + "address": null, + "city": null, + "state": null, + "pin": null + }, + "date_established": null, + "transaction_volume": null, + "average_transaction_size": null, + "kyc_details": { + "cin": null, + "gstin": null, + "p_gstin": null, + "pan": null, + "pan_name": null, + "promoter_pan": null, + "promoter_pan_name": null, + "business_proof_file": null, + "address_proof_file": null + } + }, + "notes": { + "merchant_data_1": "some string" + }, + "fund_transfer": { + "destination": "ba_9EhChhUhhXdHBv" + } + }, + { + "id": "acc_fHQwerty123ffe", + "entity": "account", + "name": "John Appleseed", + "email": "johnappleseed@gmail.com", + "live": true, + "managed": true, + "tnc_accepted": true, + "activation_details": { + "status": "verfication_pending", + "bank_details_verification_error": null, + "activated_at": 1513681274, + "can_submit": true, + "fields_pending": [ ] + }, + "secondary_emails": { + "transaction_report_email": [ ] + }, + "account_details": { + "mobile": null, + "landline": null, + "business_name": "XYZ software solutions", + "business_type": "partnership", + "paymentdetails": null, + "business_model": null, + "registered_address": { + "address": null, + "city": null, + "state": null, + "pin": null + }, + "operational_address": { + "address": null, + "city": null, + "state": null, + "pin": null + }, + "date_established": null, + "transaction_volume": null, + "average_transaction_size": null, + "kyc_details": { + "cin": null, + "gstin": null, + "p_gstin": null, + "pan": null, + "pan_name": null, + "promoter_pan": null, + "promoter_pan_name": null, + "business_proof_file": null, + "address_proof_file": null + } + }, + "notes": { + "merchant_data_1": "some id" + }, + "fund_transfer": { + "destination": "ba_9FiDasQoewhnrs" + } + } + ] +} +``` + +## Fetch Account by ID + +The below API is used for fetching details of an account by ID. + +beta/accounts/:id + +### Sample Request and Response + +The below API fetches the details of a Razorpay merchant account. + +```curl:cURL +curl -XGET \ +'https://api.razorpay.com/v1/beta/accounts/acc_gHQwerty123ggd' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +```json: Response +{ + "id":"acc_gHQwerty123ggd", + "entity":"account", + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "live":false, + "managed":true, + "tnc_accepted":true, + "activation_details":{ + "status":"activated", + "activated_at":1513681274, + "can_submit":true, + "fields_pending":[ + + ] + }, + "secondary_emails":{ + "transaction_report_email":[ + + ] + }, + "account_details":{ + "mobile":null, + "landline":null, + "business_name":"Acme Corporation", + "business_type":"individual", + "paymentdetails":null, + "business_model":null, + "registered_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "operational_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "date_established":null, + "transaction_volume":null, + "average_transaction_size":null, + "kyc_details":{ + "cin":null, + "gstin":null, + "p_gstin":null, + "pan":null, + "pan_name":null, + "promoter_pan":null, + "promoter_pan_name":null, + "business_proof_file":null, + "address_proof_file":null + } + }, + "notes":{ + "merchant_data_1":"some string" + }, + "fund_transfer":{ + "destination":"ba_9EhChhUhhXdHBv" + } +} +```json: Response - Penny testing Enabled +{ + "id":"acc_JMJ6qeTz3t2ukr", + "entity":"account", + "name":"Test PT 1", + "email":"f20150054h@alumni.bits-pilani.ac.in", + "live":true, + "managed":true, + "tnc_accepted":true, + "activation_details":{ + "status":"verification_failed", + "activated_at":null, + "can_submit":true, + "bank_details_verification_error":"KC03: INVALID BENEFICIARY ACCOUNT \/ IFSC", + "fields_pending":[ + + ] + }, + "secondary_emails":{ + "transaction_report_email":[ + "f20150054h@alumni.bits-pilani.ac.in" + ] + }, + "account_details":{ + "mobile":null, + "landline":null, + "business_name":"Test PT 1", + "business_type":"private_limited", + "paymentdetails":null, + "business_model":null, + "registered_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "operational_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "date_established":null, + "transaction_volume":null, + "average_transaction_size":null, + "kyc_details":{ + "cin":null, + "gstin":null, + "p_gstin":null, + "pan":null, + "pan_name":null, + "promoter_pan":null, + "promoter_pan_name":null, + "business_proof_file":null, + "address_proof_file":null + } + }, + "notes":[ + + ], + "fund_transfer":{ + "destination":"ba_JMJ6qju5KecEHu" + }, + "dashboard_access":true, + "allow_reversals":false +} +``` diff --git a/llm-content/api/payments/route/create-linked-account.md b/llm-content/api/payments/route/create-linked-account.md new file mode 100644 index 00000000..11b469be --- /dev/null +++ b/llm-content/api/payments/route/create-linked-account.md @@ -0,0 +1,415 @@ +--- +title: Create a Linked Account +description: Create a Linked Account using the Razorpay API. +--- + +# Create a Linked Account + +## Create a Linked Account + +Use this endpoint to create a Linked Account. + +### Request + +```curl: Curl +curl -X POST 'https://api.razorpay.com/v2/accounts' \ + -u [YOUR_KEY_ID]:[YOUR_SECRET] \ + -H "Content-type: application/json" \ + -d '{ + "email":"gaurav.kumar@example.com", + "phone":"9000090000", + "type":"route", + "reference_id":"124124", + "legal_business_name":"Acme Corp", + "business_type":"partnership", + "contact_name":"Gaurav Kumar", + "profile":{ + "category":"healthcare", + "subcategory":"clinic", + "addresses":{ + "registered":{ + "street1":"507, Koramangala 1st block", + "street2":"MG Road", + "city":"Bengaluru", + "state":"KARNATAKA", + "postal_code":"560034", + "country":"IN" + } + } + }, + "legal_info":{ + "pan":"AAACL1234C", + "gst":"18AABCU9603R1ZM" + } +}' +``` + +### Response + +```json: Success +{ + "id":"acc_GRWKk7qQsLnDjX", + "type":"route", + "status":"created", + "email":"gaurav.kumar@example.com", + "profile":{ + "category":"healthcare", + "subcategory":"clinic", + "addresses":{ + "registered":{ + "street1":"507, Koramangala 1st block", + "street2":"MG Road", + "city":"Bengaluru", + "state":"KARNATAKA", + "postal_code":"560034", + "country":"IN" + } + } + }, + "notes":[ + + ], + "created_at":1611136837, + "phone":"9000090000", + "contact_name":"Gaurav Kumar", + "reference_id":"124124", + "business_type":"partnership", + "legal_business_name":"Acme Corp", + "customer_facing_business_name":"Acme Corp", + "legal_info":{ + "pan":"AAACL1234C", + "gst":"18AABCU9603R1ZM" + } +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Invalid business type: xyz", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "business_type" + } +} +``` + +### Parameters + +`email`_mandatory_ +: `string` The Linked Account's business email address. + +`phone`_mandatory_ +: `integer` The Linked Account's business phone number. The minimum length is 8 characters and the maximum length is 15. + +`legal_business_name` _mandatory_ +: `string` The name of the Linked Account's business. For example, `Acme Corp`. The minimum length is 4 characters and the maximum length is 200. + +`customer_facing_business_name` _optional_ +: `string` The Linked Account billing label as it appears on the Dashboard. The minimum length is 1 character and the maximum length is 255. + +`business_type` _mandatory_ +: `string` The type of business operated by the Linked Account holder. List of possible values are available [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/integration-guide.md#business-type). + +`reference_id` _optional_ +: `string` Partner's external account reference id. The minimum length is 1 character and the maximum length is 512. + +`profile` _mandatory_ +: `object` The business details of the Linked Account's account. + + `category` _mandatory_ + : `string` The business category of the Linked Account. Possible values: [List of Business Categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/integration-guide.md#business-category). + + `subcategory` _mandatory_ + : `string` The business sub-category of the Linked Account. Possible values: [List of Business Sub-Categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/integration-guide.md#business-sub-category). + + `business_model` _optional_ + : `string` The business description. The character limit between 1-255 characters. + + `addresses` + : `object` Details of Linked Account's address. + + `operation` _optional_ + : `object` Details of the Linked Account's operational address. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 32. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. + + `registered` _mandatory_ + : `object` Details of the Linked Account's registered address. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 32. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. + +`legal_info` _conditional_ +: `object` The legal details about the Linked Account's business. The mandatory [KYC requirement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/integration-guide.md#kyc-requirements) parameters should be passed depending on the business requirements. + + `pan` _conditional_ + : `string` Valid PAN number details of the Linked Account's business. + - This is a 10-digit alphanumeric code. For example, `AVOJB1111K`. + - The 4th digit should be either of 'C', 'H', 'F', 'A', 'T', 'B', 'J', 'G', 'L'. + - The regex for Company PAN is `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`. + + `gst` _conditional_ + : `string` Valid GSTIN number details of the Linked Account. + - This is a 15-digit PAN-based unique identification number. + - The Regex for GSTIN is `/^[0123][0-9][a-z]{5}[0-9]{4}[a-z][0-9][a-z0-9][a-z0-9]$/gi`. + +`contact_info` _optional_ +: `object` Options available for contact support. + + `chargeback` + : `object` The type of contact support. + + `email` + : `string` The email id of chargeback POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of chargeback POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of chargeback policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. Only domain name is mandatory. + + `refund` + : `object` The type of contact support. + + `email` + : `string` The email id of refund POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of refund POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of refund policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `support` + : `array` The type of contact support. + + `email` + : `string` The email id of support POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of support POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of support policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + +`apps` _optional_ +: `object` The app details of the account holder's business. + + `websites` + : `array` The website/app for the account holder's business. A minimum of 1 website is required. + + `android` + : `array` Android app details + + `url` + : `string` The link of the Android app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` + : `string` The name of the Android app. + + `ios` + : `array` iOS app details + + `url` + : `string` The link of the iOS app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` + : `string` The name of the iOS app. + +### Parameters + +`id` +: `string` The unique identifier of the account generated by Razorpay. The maximum length is 18 characters. For example, `acc_GLGeLkU2JUeyDZ`. + +`type` +: `string` The account type. Possible value is `route`. + +`reference_id` +: `string` The internal reference ID. This value can be maximum of 20 characters. For example, `123123`. + +`status` +: `string` The status of the account. Possible values: + - `created` + - `suspended` + +`email` +: `string` The account holder's email address. + +`phone` +: `integer` The account holder's phone number. The minimum length is 8 characters and the maximum length is 15. + +`legal_business_name` +: `string` The name of the account holder's business. For example, `Acme Corp`. The minimum length is 4 characters and the maximum length is 200. + +`business_type` +: `string` The type of business operated by the account holder. Possible values: [Business Types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/integration-guide.md#business-type). + +`profile` +: `object` The account holder's business details. + + `category` + : `string` The business category of the account holder. For example, `healthcare`. Possible values: [Business Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/integration-guide.md#business-category). + + `subcategory` + : `string` The business sub-category of the account holder. For example, `clinic`. Possible values: [Business Sub-Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/integration-guide.md#business-sub-category). + + `addresses` + : `object` Details of account holder's address. + + `registered` + : `object` Details of the account holder's registered address. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 100. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. + +`legal_info` +: `object` The legal details about the account holder's business. The mandatory [KYC requirement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/integration-guide.md#kyc-requirements) parameters should be passed depending on the business requirements. + + `pan` + : `string` Valid PAN number details of the account holder's business. + - This is a 10-digit alphanumeric code. For example, `AVOJB1111K`. + - The 4th digit should be either of 'C', 'H', 'F', 'A', 'T', 'B', 'J', 'G', 'L'. + - The regex for Company PAN is `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`. + + This parameter might be required to complete the KYC process. However, it is optional for this API. + + `gst` + : `string` Valid GSTIN number details of the account holder. + - This is a 15-digit PAN-based unique identification number. + - The Regex for GSTIN is `/^[0123][0-9][a-z]{5}[0-9]{4}[a-z][0-9][a-z0-9][a-z0-9]$/gi`. + +`notes` +: `object` Contains user-defined fields stored by the partner for reference purposes. + +`contact_name` +: `string` The name of the contact. The minimum length is 4 and the maximum length is 255 characters. + +### Errors + +The api key/secret provided is invalid +* code: 4xx +* description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys. + +The input field is required +* code: 400 +* description: This error occurs when a mandatory field is empty. +* solution: Make sure to fill in all the mandatory fields. + +The requested URL was not found on the server. +* code: 400 +* description: This error occurs when Marketplace feature is not enabled for merchants using private auth. +* solution: Ensure to enable Marketplace feature for merchants using private auth. + +Invalid type: route +* code: 400 +* description: This error occurs when the value of a parameter is invalid. For example, when the value of the `type` parameter is other than `route`. +* solution: Ensure to send correct values for parameters. + +Route code Support feature not enabled to add account code. +* code: 400 +* description: This error occurs when you pass the value for the `reference_id` parameter, but the `route_code_support` feature is not enabled for merchants. +* solution: Ensure to enable the `route_code_support` feature for merchants before passing the value for the `reference_id` parameter. + +Merchant email already exists for account - BbHKlnuyZkf0xa. +* code: 400 +* description: This error occurs when you try to create a Linked Account with an existing email address. +* solution: Make sure the email address is unique while creating a Linked Account. + +Invalid IFSC Code +* code: 400 +* description: This error occurs when you pass an invalid IFSC code. +* solution: Make sure you pass a valid IFSC code. + +The name may only contain alphabets, digits and spaces +* code: 400 +* description: This error occurs when the name field has anything other than alphabets, digits and spaces. +* solution: Make sure you enter a valid name without special characters. + +The bank account number must be between 5 and 35 characters +* code: 400 +* description: This error occurs when you pass an invalid bank account number. +* solution: Make sure to pass a valid account number. + +Account_code -account_code is not allowed for this merchant +* code: 400 +* description: This error occurs when the `account_code` feature is not enabled for the merchant. +* solution: Make sure to enable the correct feature for the merchant - `route_code_support`. + +Please enter a valid name. Links, emails and HTML tags are not allowed. +* code: 400 +* description: This error occurs when the Linked Account name contains URLs, HTML tags, emails and so on. +* solution: Ensure you don't send URLs, HTML tags and emails in the Linked Account name. + +The code format is invalid. +* code: 400 +* description: This error occurs when the `reference_id` format is invalid. +* solution: Ensure the `reference_id` format is valid. + +The code must be at least 3 characters. +* code: 400 +* description: This error occurs when the `reference_id` value has less than a minimum of 3 characters. +* solution: The `reference_id` value should be between 3 to 20 characters. diff --git a/llm-content/api/payments/route/create-stakeholder.md b/llm-content/api/payments/route/create-stakeholder.md new file mode 100644 index 00000000..74db4c9c --- /dev/null +++ b/llm-content/api/payments/route/create-stakeholder.md @@ -0,0 +1,454 @@ +--- +title: Create a Stakeholder Account +description: Create a Stakeholder account using the Razorpay API. +--- + +# Create a Stakeholder Account + +## Create a Stakeholder Account + +Use this endpoint to create a stakeholder account. + +### Request + +```curl: Curl +curl -X POST 'https://api.razorpay.com/v2/accounts/acc_GLGeLkU2JUeyDZ/stakeholders' \ + -u [YOUR_KEY_ID]:[YOUR_SECRET] \ + -H "Content-type: application/json" \ + -d '{ + "name":"Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "addresses":{ + "residential":{ + "street":"506, Koramangala 1st block", + "city":"Bengaluru", + "state":"Karnataka", + "postal_code":"560034", + "country":"IN" + } + }, + "kyc":{ + "pan":"AVOPBXXXXX" + }, + "notes":{ + "random_key":"random_value" + } +}' + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String accountId = "acc_GLGeLkU2JUeyDZ"; + +JSONObject StakeRequest = new JSONObject(); +StakeRequest.put("email","gaurav.kumar@example.com"); +StakeRequest.put("name","Gaurav Kumar"); + +JSONObject residential = new JSONObject(); +residential.put("street","506, Koramangala 1st block"); +residential.put("city","Bengaluru"); +residential.put("state","Karnataka"); +residential.put("postal_code","560034"); +residential.put("country","IN"); + +JSONObject addresses = new JSONObject(); +addresses.put("residential",residential); +StakeRequest.put("addresses",addresses); + +JSONObject kyc = new JSONObject(); +kyc.put("pan","AVOPBXXXXX"); + +StakeRequest.put("kyc",kyc); + +JSONObject notes = new JSONObject(); +notes.put("random_key_by_partner","random_value"); + +StakeRequest.put("notes",notes); + +Stakeholder stakeholder = instance.stakeholder.create(accountId, StakeRequest); + +```python: Python + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +accountId = "acc_GLGeLkU2JUeyDZ" + +client.stakeholder.create(accountId, { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "addresses": { + "residential": { + "street": "506, Koramangala 1st block", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": "560034", + "country": "IN" + } + }, + "kyc": { + "pan": "AVOPBXXXXX" + }, + "notes": { + "random_key_by_partner": "random_value" + } +}) + +```php: PHP + +$api = new Api($key_id, $secret); + +$accountId = "acc_GLGeLkU2JUeyDZ"; + +$api->account->fetch("acc_GLGeLkU2JUeyDZ")->stakeholders()->create(array( + "name" => "Gaurav Kumar", + "email" => "gaurav.kumar@example.com", + "addresses" => array( + "residential" => array( + "street" => "506, Koramangala 1st block", + "city" => "Bengaluru", + "state" => "Karnataka", + "postal_code" => "560034", + "country" => "IN" + ) + ), + "kyc" => array( + "pan" => "AVOPBXXXXX" + ), + "notes" => array( + "random_key_by_partner" => "random_value" + ) +)); + +```csharp: .NET + +RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + +string accountId = "acc_GLGeLkU2JUeyDZ"; + +Dictionary StakeRequest = new Dictionary(); +StakeRequest.Add("email", "gaurav.kumar@example.com"); +StakeRequest.Add("name", "Gaurav Kumar"); + +Dictionary residential = new Dictionary(); +residential.Add("street", "506, Koramangala 1st block"); +residential.Add("city", "Bengaluru"); +residential.Add("state", "Karnataka"); +residential.Add("postal_code", "560034"); +residential.Add("country", "IN"); + +Dictionary addresses = new Dictionary(); +addresses.Add("residential", residential); +StakeRequest.Add("addresses", addresses); + +Dictionary kyc = new Dictionary(); +kyc.Add("pan", "AVOPBXXXXX"); + +StakeRequest.Add("kyc", kyc); + +Dictionary notes = new Dictionary(); +notes.Add("random_key_by_partner", "random_value"); + +StakeRequest.Add("notes", notes); + +Stakeholder stakeholder = client.Stakeholder.Create(accountId, StakeRequest); + +```ruby: Ruby + +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +accountId = "acc_GLGeLkU2JUeyDZ" + +Razorpay::Stakeholder.create(accountId, { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "addresses": { + "residential": { + "street": "506, Koramangala 1st block", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": "560034", + "country": "IN" + } + }, + "kyc": { + "pan": "AVOPBXXXXX" + }, + "notes": { + "random_key_by_partner": "random_value" + } +}) + +```javascript: Node.js + +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var accountId = "acc_GLGeLkU2JUeyDZ"; + +instance.stakeholders.create(accountId, { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "addresses": { + "residential": { + "street": "506, Koramangala 1st block", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": "560034", + "country": "IN" + } + }, + "kyc": { + "pan": "AVOPBXXXXX" + }, + "notes": { + "random_key_by_partner": "random_value" + } +}); + +```go: Go + +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +accountId := "acc_GLGeLkU2JUeyDZ" + +data := map[string]interface{}{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "addresses": map[string]interface{}{ + "residential": map[string]interface{}{ + "street": "506, Koramangala 1st block", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": "560034", + "country": "IN", + }, + }, + "kyc": map[string]interface{}{ + "pan": "AVOPBXXXXX", + }, + "notes": map[string]interface{}{ + "random_key_by_partner": "random_value", + }, +} + +body, err := client.Stakeholder.Create(accountId, data, nil) +``` + +### Response + +```json: Success +{ + "entity":"stakeholder", + "relationship":{ + "executive":true + }, + "phone":{ + "primary":9000090000, + "secondary":999999991 + }, + "notes":[ + + ], + "kyc":{ + "pan":"CZCPG5228F" + }, + "id":"sth_GLGgm8fFCKc92m", + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "percentage_ownership":10, + "addresses":{ + "residential":{ + "street":"506, Koramangala 1st block", + "city":"Bengaluru", + "state":"Karnataka", + "postal_code":"560034", + "country":"IN" + } + } +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Linked account does not exist", + "source":"", + "step":"", + "reason":"linked_account_id_does_not_exist", + "metadata":{ + + } + } +} +``` + +### Parameters + +`account_id` +: `string` The unique identifier of the account generated by Razorpay. For example, acc_GLGeLkU2JUeyDZ. This id is used to fetch or update a stakeholder. + +### Parameters + +`name` +: `string` The stakeholder's name as per the PAN card. The maximum length is 255 characters. + +`email` _mandatory_ +: `string` The stakeholder's email address. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + +`percentage_ownership`_optional_ +: `float` The stakeholder's ownership of the business in percentage. Only two decimal places are allowed. For example, `87.55`. The maximum length is 100 characters. + +`relationship` +: `object` The stakeholder's relationship with the account's business. + `director` + : `boolean` Determines if stakeholder is a director of the account's legal entity. + - `true`: Stakeholder is a director. + - `false` (default): Stakeholder is not a director. + `executive` + : `boolean` Determines if the stakeholder is an executive of the account's legal entity. + - `true`: Stakeholder is an executive. + - `false` (false): Stakeholder is not an executive. + +`phone` _optional_ +: `object` The stakeholder's phone number. + + `primary`_optional_ + : `integer` The primary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + + `secondary`_optional_ + : `integer` The secondary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + +`addresses` _optional_ +: `object` Details of stakeholder's address. + + `residential` + : `object` Details of the stakeholder's residential address. + + `street` _optional_ + : `string` The stakeholder's street address. The minimum length is 10 characters and maximum length is 255. + + `city` _optional_ + : `string` The city. The minimum length is 2 and maximum length is 32. + + `state` _optional_ + : `string` The state. The minimum length is 2 and maximum length is 32. + + `postal_code` _optional_ + : `string` The postal code. The minimum length is 2 and maximum length is 10. + + `country` _optional_ + : `string` The country. The minimum length is 2 and maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. + +`kyc` _conditional_ +: `object` The type of document required to establish the stakeholder's identity. + + `pan` + : `string` The PAN number of the stakeholder. + - This is a 10-digit alphanumeric code. For example, `AVOPBXXXXX`. + - **Regex for Stakeholder PAN**: `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`. + - **Validation for Stakeholder PAN**: The 4th digit should be `P`. + +`notes` _optional_ +: `object` Contains user-defined fields stored for reference purposes. Maximum 15 key-value pairs, 512 characters (maximum) each. + +### Parameters + +`id` +: `string` The unique identifier of a stakeholder generated by Razorpay, used to fetch or update a stakeholder. For example, `sth_GLGgm8fFCKc92m`. Maximum length supported is 18 characters. + +`entity` +: `string` Here it is `stakeholder`. + +`percentage_ownership` +: `float` The stakeholder's ownership of the business in percentage. Only two decimal places are allowed. For example, `87.55`. The maximum length is 100 characters. + +`name` +: `string` The stakeholder's name as per the PAN card. The maximum length is 255 characters. + +`email` +: `string` The stakeholder's email address. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + +`relationship` +: `object` The stakeholder's relationship with the account's business. + `director` + : `boolean` Determines if stakeholder is a director of the account's legal entity. + - `true`: Stakeholder is a director. + - `false` (default): Stakeholder is not a director. + `executive` + : `boolean` Determines if the stakeholder is an executive of the account's legal entity. + - `true`: Stakeholder is an executive. + - `false` (false): Stakeholder is not an executive. + +`phone` +: `object` The stakeholder's phone number. + + `primary` + : `integer` The primary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + + `secondary` + : `integer` The secondary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + +`addresses` +: `object` Details of stakeholder's address. + + `residential` + : `string` Details of the stakeholder's residential address. + + `street` + : `string` The stakeholder's street address. The minimum length is 10 characters and maximum length is 255. + + `city` + : `string` The city. The minimum length is 2 and maximum length is 32. + + `state` + : `string` The state. The minimum length is 2 and maximum length is 32. + + `postal_code` + : `string` The postal code. The minimum length is 2 and maximum length is 10. + + `country` + : `string` The country. The minimum length is 2 and maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. + +`kyc` +: `object` The type of document required to establish the stakeholder's identity. + + `pan` + : `string` The PAN of the stakeholder. + + - This is a 10-digit alphanumeric code. For example, `AVOPBXXXXX`. + - **Regex for Stakeholder PAN**: `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/` + - **Validation for Stakeholder PAN**: The 4th digit should be 'P'. + + +> **INFO** +> +> +> **Handy Tip** +> + +> To complete the KYC process, this API parameter might be required, but it is optional for this API. +> + + +`notes` +: `object` Contains user-defined fields stored by the partner for reference purposes. It can hold a maximum of 15 key-value pairs, 512 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. + +### Errors + +Linked account does not exist. +* code: 400 +* description: This error occurs when the requester is not the parent of the child account, or the child account does not exist. +* solution: Ensure the Linked Account id exists before proceeding with the update API. + +Stakeholders cannot be more than one for Route product. +* code: 400 +* description: This error occurs when you try to create more than one stakeholder for Linked Accounts. +* solution: Route products cannot have more than one stakeholder. diff --git a/llm-content/api/payments/route/create-transfers-orders.md b/llm-content/api/payments/route/create-transfers-orders.md new file mode 100644 index 00000000..406ffa81 --- /dev/null +++ b/llm-content/api/payments/route/create-transfers-orders.md @@ -0,0 +1,539 @@ +--- +title: Create Transfers From Orders +description: Initiate Transfers when creating an Order using the Razorpay API. +--- + +# Create Transfers From Orders + +## Create Transfers From Orders + +Use this endpoint to set up transfer of funds while creating an order. This can be done by passing the transfers parameters as part of the request body. + +- You cannot create transfers on orders which has the `partial_payment` parameter enabled. Ensure that this parameter is set to `0`. +- You cannot create transfers on orders for international currencies. Currently, this feature only supports orders created using INR. + +### Request + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type: application/json' +-d '{ + "amount": 2000, + "currency": "INR", + "transfers": [ + { + "account": "acc_IRQWUleX4BqvYn", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": true, + "on_hold_until": 1671222870 + }, + { + "account": "acc_IROu8Nod6PXPtZ", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Saurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": false + } + ] +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",2000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +List transfers = new ArrayList<>(); +JSONObject transferParams = new JSONObject(); +transferParams.put("account","acc_CPRsN1LkFccllA"); +transferParams.put("amount",100); +transferParams.put("currency","INR"); +JSONObject notes = new JSONObject(); +notes.put("name","Gaurav Kumar"); +notes.put("roll_no","IEC2011025"); +transferParams.put("notes",notes); +List linkedAccountNotes = new ArrayList<>(); +linkedAccountNotes.add("roll_no"); +transferParams.put("linked_account_notes",linkedAccountNotes); +transferParams.put("on_hold",true); +transfers.add(transferParams); +orderRequest.put("transfers", transfers); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 2000,'currency' => 'INR','transfers' => array(array('account' => 'acc_CPRsN1LkFccllA','amount' => 1000,'currency' => 'INR','notes' => array('branch' => 'Acme Corp Bangalore North','name' => 'Gaurav Kumar'),'linked_account_notes' => array('branch'),'on_hold' => true,'on_hold_until' => 1671222870),array('account' => 'acc_CNo3jSI8OkFJJJ','amount' => 1000,'currency' => 'INR','notes' => array('branch' => 'Acme Corp Bangalore South','name' => 'Saurav Kumar'),'linked_account_notes' => array('branch'),'on_hold' => false)))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 2000, + currency: "INR", + transfers: [ + { + account: "acc_CPRsN1LkFccllA", + amount: 1000, + currency: "INR", + notes: { + branch: "Acme Corp Bangalore North", + name: "Gaurav Kumar" + }, + linked_account_notes: [ + "branch" + ], + on_hold: true, + on_hold_until: 1671222870 + }, + { + account: "acc_CNo3jSI8OkFJJJ", + amount: 1000, + currency: "INR", + notes: { + branch: "Acme Corp Bangalore South", + name: "Saurav Kumar" + }, + linked_account_notes: [ + "branch" + ], + on_hold: false + } + ] +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount":2000, + "currency":"INR", + "transfers":[ + { + "account":"acc_CPRsN1LkFccllA", + "amount":1000, + "currency":"INR", + "notes":{ + "branch":"Acme Corp Bangalore North", + "name":"Gaurav Kumar" + }, + "linked_account_notes":[ + "branch" + ], + "on_hold": True, + "on_hold_until":1671222870 + }, + { + "account":"acc_CNo3jSI8OkFJJJ", + "amount":1000, + "currency":"INR", + "notes":{ + "branch":"Acme Corp Bangalore South", + "name":"Saurav Kumar" + }, + "linked_account_notes":[ + "branch" + ], + "on_hold": False + } + ] +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 2000, + "currency": "INR", + "transfers": [ + { + "account": "acc_CPRsN1LkFccllA", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": 1, + "on_hold_until": 1671222870 + }, + { + "account": "acc_CNo3jSI8OkFJJJ", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Saurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": 0 + } + ] +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "amount": 2000, + "currency": "INR", + "transfers": []interface{}{ + map[string]interface{}{ + "account": "acc_IRQWUleX4BqvYn", + "amount": 100, + "currency": "INR", + "notes": map[string]interface{}{ + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar", + }, + "linked_account_notes": []string{ + "branch", + }, + "on_hold": true, + "on_hold_until": 1671222870, + }, + }, +} + +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] +"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#341"); +List> transfers = new List>(); +Dictionary transferParams = new Dictionary(); +transferParams.Add("account", "acc_I0QRP7PpvaHhpB"); +transferParams.Add("amount", 100); +transferParams.Add("currency", "INR"); +Dictionary notes = new Dictionary(); +notes.Add("name", "Gaurav Kumar"); +notes.Add("roll_no", "IEC2011025"); +transferParams.Add("notes", notes); +List linkedAccountNotes = new List(); +linkedAccountNotes.Add("roll_no"); +transferParams.Add("linked_account_notes", linkedAccountNotes); +transferParams.Add("on_hold", true); +transfers.Add(transferParams); +orderRequest.Add("transfers", transfers); + +Order token = client.Order.Create(orderRequest); +``` + +### Response + +```json: Success +{ + "id": "order_JJCYnu3hipocHz", + "entity": "order", + "amount": 2000, + "amount_paid": 0, + "amount_due": 2000, + "currency": "INR", + "receipt": null, + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1649931742, + "transfers": [ + { + "id": "trf_JJCYnw77tqUT9r", + "entity": "transfer", + "status": "created", + "source": "order_JJCYnu3hipocHz", + "recipient": "acc_IRQWUleX4BqvYn", + "amount": 1000, + "currency": "INR", + "amount_reversed": 0, + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": true, + "on_hold_until": 1671222870, + "recipient_settlement_id": null, + "created_at": 1649931742, + "processed_at": null, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_JJCYnw77tqUT9r", + "source": null, + "metadata": null + } + }, + { + "id": "trf_JJCYnxe5GV19Kk", + "entity": "transfer", + "status": "created", + "source": "order_JJCYnu3hipocHz", + "recipient": "acc_IROu8Nod6PXPtZ", + "amount": 1000, + "currency": "INR", + "amount_reversed": 0, + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Saurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": false, + "on_hold_until": null, + "recipient_settlement_id": null, + "created_at": 1649931742, + "processed_at": null, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_JJCYnxe5GV19Kk", + "source": null, + "metadata": null + } + } + ] +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, in paise. For example, for an amount of ₹299.35, the value of this field should be 29935. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. We support only `INR` for Route transactions. + +`receipt` _optional_ +: `string` Unique identifier that you can use for internal reference. + +`transfers` +: `array` Details regarding the transfer. + + `account` _mandatory_ + : `string` Unique identifier of the Linked Account to which the transfer is to be made. + + `amount` _mandatory_ + : `integer` The amount to be transferred to the Linked Account. For example, for an amount of ₹200.35, the value of this field should be 20035. This amount cannot exceed the order amount. + + `currency` _mandatory_ + : `string` The currency in which the transfer should be made. We support only `INR` for Route transactions. + + `notes` + : `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "Bangalore"`. + + `linked_account_notes` + : `array` List of keys from the `notes` object which needs to be shown to Linked Accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + + `on_hold` _optional_ + : `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + + `on_hold_until` _optional_ + : `integer` Timestamp, in Unix format, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + +### Parameters + +`id` +: `string` Unique identifier of the order created. + +`entity` +: `string` The name of the entity. Here, it is `order`. + +`amount` +: `integer` The order amount, in paise. For example, for an amount of ₹299.35, the value of this field should be 29935. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` The currency in which the order should be created. We support only `INR` for Route transactions. + +`receipt` +: `string` Unique identifier that you can use for internal reference. + +`status` +: `string` The status of the order. Possible values: + - `created` + - `attempted` + - `paid` + +`notes` +: `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. + +`created_at` +: `integer` Timestamp in Unix. This indicates the time of the order created. + +`transfers` +: `array` Details regarding the transfer. + + `id` + : `string` Unique identifier of the transfer. + + `recipient` + : `string` Unique identifier of the Linked Account to which the transfer is to be made. + + `transfer_status` + : `string` The status of the transfer. Possible values: + - `created` + - `pending` + - `processed` + - `failed` + - `reversed` + - `partially_reversed` + + `settlement_status` + : `string` The status of the settlement. Possible values: + - `pending` + - `on_hold` + - `settled` + + `amount` + : `integer` The amount to be transferred to the Linked Account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035. This amount cannot exceed the order amount. + + `currency` + : `string` The currency in which the transfer should be made. We support only `INR` for Route transactions. + + `notes` + : `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "Bangalore"`. + + `linked_account_notes` + : `array` List of keys from the `notes` object which needs to be shown to Linked Accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + + `on_hold` + : `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + + `on_hold_until` + : `integer` Timestamp, in Unix, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + + `error` + : `string` Provides error details that may occur during transfers. + + `code` + : `string` Type of the error. + + `description` + : `string` Error description. + + `field` + : `string` Name of the parameter in the API request that caused the error. + + `source` + : `string` The point of failure in the specific operation. For example, customer, business and so on. + + `step` + : `string` The stage where the transaction failure occurred. Stages can be different depending on the payment method used to make the transaction. + + `reason` + : `string` The exact error reason. It can be handled programmatically. + +### Errors + +The api key/secret provided is invalid +* code: 4xx +* description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys. + +The amount must be at least INR 1.00 +* code: 400 +* description: This error occurs when the amount is less than the minimum amount. The transaction amount expressed in the currency subunit, such as paise (in INR) should always be greater than or equal to 100. +* solution: Make sure the amount is equal to or greater than the minimum amount of ₹100. + +The input field is required +* code: 400 +* description: This error occurs when a mandatory field is empty. +* solution: Make sure to fill in all the mandatory fields. + +The currency should be INR for transfers +* code: 400 +* description: This error occurs when the currency is anything other than `INR`. +* solution: Ensure the currency value is `INR` as we support only `INR` for Route transactions. + +Keys sent in linked_account_notes must exist in notes +* code: 400 +* description: This error occurs when there is a mismatch between the key passed in the `linked_account_notes` array and the key from the `notes` object. +* solution: Make sure the key passed in the `linked_account_notes` array always matches the key from the `notes` object. + +on_hold_until must be between 946684800 and 4765046400 +* code: 400 +* description: This error occurs when the time stamp provided for the `on_hold_until` entity is not correct or if it is not between `946684800` and `4765046400`. +* solution: Make sure to enter the relevant `on_hold_until` entity time stamp. It should also be within the time `946684800` and `4765046400`. + +input is an invalid account_code. +* code: 400 +* description: This error occurs when the `account_code` passed is invalid or does not belong to the requested merchant. +* solution: Make sure to pass the valid `account_code`. + +Transfer cannot be made due to insufficient balance +* code: 400 +* description: This error occurs when the total balance is less than or equal to the transfer amount. +* solution: Make sure you have enough balance. You can also [add funds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/balances.md#add-funds-to-your-reserve-balance) to the account and then try doing the transfer. + +The sum of amount requested for transfer is greater than the captured amount +* code: 400 +* description: This error occurs when the total transferred amount exceeds the captured payment amount. +* solution: Make sure the transfer amount is less than the captured payment. diff --git a/llm-content/api/payments/route/create-transfers-payments.md b/llm-content/api/payments/route/create-transfers-payments.md new file mode 100644 index 00000000..4ad2cac7 --- /dev/null +++ b/llm-content/api/payments/route/create-transfers-payments.md @@ -0,0 +1,464 @@ +--- +title: Create Transfers From Payments +description: Initiate Transfers from captured payments using the Razorpay API. +--- + +# Create Transfers From Payments + +## Create Transfers From Payments + +Use this endpoint to create Transfers from captured payments. You can create and capture payments in the regular payments flow using the [Razorpay Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md) and [Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +You should perform additional steps to disburse payments using Razorpay Route. + +1. The customer pays the amount using the standard payment flow. +2. Once the payment is `captured`, you can initiate a transfer to Linked Accounts with a transfer API call. You have to pass the details such as `account_id` and `amount`. + +### Request + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/payments/pay_E8JR8E0XyjUSZd/transfers \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type: application/json' +-d '{ + "transfers": [ + { + "account": "acc_IROu8Nod6PXPtZ", + "amount": 100, + "currency": "INR", + "notes": { + "name": "Gaurav Kumar", + "roll_no": "IEC2011025" + }, + "linked_account_notes": [ + "roll_no" + ], + "on_hold": true, + "on_hold_until": 1671222870 + }, + { + "account": "acc_IRQWUleX4BqvYn", + "amount": 300, + "currency": "INR", + "notes": { + "name": "Saurav Kumar", + "roll_no": "IEC2011026" + }, + "linked_account_notes": [ + "roll_no" + ], + "on_hold": false + } + ] +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_E8JR8E0XyjUSZd"; + +JSONObject transferRequest = new JSONObject(); +List transfers = new ArrayList<>(); +JSONObject transferParams = new JSONObject(); +transferParams.put("account","acc_I0QRP7PpvaHhpB"); +transferParams.put("amount",100); +transferParams.put("currency","INR"); +JSONObject notes = new JSONObject(); +notes.put("name","Gaurav Kumar"); +notes.put("roll_no","IEC2011026"); +transferParams.put("notes",notes); +List linkedAccountNotes = new ArrayList<>(); +linkedAccountNotes.add("roll_no"); +transferParams.put("linked_account_notes",linkedAccountNotes); +transferParams.put("on_hold",true); +transfers.add(transferParams); +transferRequest.put("transfers", transfers); + +List transfer = razorpay.payments.transfer(paymentId,transferRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId)->transfer(array('transfers' => array('account'=> $accountId, 'amount'=> '1000', 'currency'=>'INR', 'notes'=> array('name'=>'Gaurav Kumar', 'roll_no'=>'IEC2011025'), 'linked_account_notes'=>array('branch'), 'on_hold'=> true, 'on_hold_until'=>'1671222870'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.transfer(paymentId,{ + "transfers": [ + { + "account": 'acc_HgzcrXeSLfNP9U', + "amount": 100, + "currency": "INR", + "notes": { + "name": "Gaurav Kumar", + "roll_no": "IEC2011025" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": true, + "on_hold_until": 1671222870 + } + ] + }) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.transfer(paymentId,{ + "transfers": [ + { + "account": 'acc_HgzcrXeSLfNP9U', + "amount": 100, + "currency": "INR", + "notes": { + "name": "Gaurav Kumar", + "roll_no": "IEC2011025" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": True, + "on_hold_until": 1671222870 + } + ] + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_E8JR8E0XyjUSZd" + +para_attr = { + "transfers": [ + { + "account": 'acc_HgzcrXeSLfNP9U', + "amount": 100, + "currency": "INR", + "notes": { + "name": "Gaurav Kumar", + "roll_no": "IEC2011025" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": 1, + "on_hold_until": 1671222870 + } + ] + } + +Razorpay::Payment.fetch(paymentId).transfer(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "transfers": []interface{}{ + map[string]interface{}{ + "account": "acc_HjVXbtpSCIxENR", + "amount": 100, + "currency": "INR", + "notes": map[string]interface{}{ + "name": "Gaurav Kumar", + "roll_no": "IEC2011025", + }, + "linked_account_notes": []string{ + "roll_no", + }, + "on_hold": true, + "on_hold_until": 1671222870, + }, + }, +} + +body, err := client.Payment.Transfer("", data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] +"); + +string paymentId = "pay_E8JR8E0XyjUSZd"; + +Dictionary transferRequest = new Dictionary(); +List> transfers = new List>(); +Dictionary transferParams = new Dictionary(); +transferParams.Add("account", "acc_I0QRP7PpvaHhpB"); +transferParams.Add("amount", 100); +transferParams.Add("currency", "INR"); +Dictionary notes = new Dictionary(); +notes.Add("name", "Gaurav Kumar"); +notes.Add("roll_no", "IEC2011025"); +transferParams.Add("notes", notes); +List linkedAccountNotes = new List(); +linkedAccountNotes.Add("roll_no"); +transferParams.Add("linked_account_notes", linkedAccountNotes); +transferParams.Add("on_hold", true); +transfers.Add(transferParams); +transferRequest.Add("transfers", transfers); + +List transfer = client.Payment.Fetch(paymentId).Transfer(transferRequest); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "trf_JJD535tJtk6Yy0", + "entity": "transfer", + "status": "pending", + "source": "pay_JGmCgTEa9OTQcX", + "recipient": "acc_IROu8Nod6PXPtZ", + "amount": 100, + "currency": "INR", + "amount_reversed": 0, + "notes": { + "name": "Gaurav Kumar", + "roll_no": "IEC2011025" + }, + "linked_account_notes": [ + "roll_no" + ], + "on_hold": true, + "on_hold_until": 1671222870, + "recipient_settlement_id": null, + "created_at": 1649933574, + "processed_at": null, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_JJD535tJtk6Yy0", + "source": null, + "metadata": null + } + }, + { + "id": "trf_JJD536GI6wuz3m", + "entity": "transfer", + "status": "pending", + "source": "pay_JGmCgTEa9OTQcX", + "recipient": "acc_IRQWUleX4BqvYn", + "amount": 300, + "currency": "INR", + "amount_reversed": 0, + "notes": { + "name": "Saurav Kumar", + "roll_no": "IEC2011026" + }, + "linked_account_notes": [ + "roll_no" + ], + "on_hold": false, + "on_hold_until": null, + "recipient_settlement_id": null, + "created_at": 1649933574, + "processed_at": null, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_JJD536GI6wuz3m", + "source": null, + "metadata": null + } + } + ] +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the payment on which the transfer must be created. + +### Parameters + +`transfers` +: `array` Details regarding the transfer. + + `account` _mandatory_ + : `string` Unique identifier of the Linked Account to which the transfer is to be made. + + `amount` _mandatory_ + : `integer` The amount to be transferred to the Linked Account. For example, for an amount of ₹200.35, the value of this field should be 20035. + + `currency` _mandatory_ + : `string` The currency in which the transfer should be made. We support only `INR` for Route transactions. + + `notes` + : `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "Bangalore"`. + + `linked_account_notes` + : `array` List of keys from the `notes` object which needs to be shown to Linked Accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + + `on_hold` + : `boolean` Indicates whether the account settlement for transfer is on hold. Know more about [on hold settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/schedule-settlement.md#settlement-settings-for-linked-accounts). Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + + `on_hold_until` + : `integer` Timestamp, in Unix, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. We recommend you set the on_hold_until value greater than 30 mins from the transfer creation time. + + +> **INFO** +> +> +> **Handy Tips** +> +> - The settlement schedule defined for the Linked Account takes precedence over the `on_hold` and `on_hold_until` functionality. This means that a defined settlement schedule is the minimum time required for the transfer to be settled. +> +> - Let us take the example of a T+10 settlement schedule: +> +> - If you create a transfer with `on_hold: true` and then release it on T+7 day, the settlement will only go out on T+10 day. +> - If you create a transfer with `on_hold: true` and `on_hold_until: 1491567400` (assume the timestamp 1491567400 corresponds to 7 days after transfer), the `on_hold` will change to false on T+7 day. The settlement will only go out on T+10 day. +> + +### Parameters + +`id` +: `string` Unique identifier of the transfer. + +`entity` +: `string` The name of the entity. Here, it is `transfer`. + +`transfer_status` +: `string` The status of the transfer. Possible values are: + - `created` + - `pending` + - `processed` + - `failed` + - `reversed` + - `partially_reversed` + +`settlement_status` +: `string` The status of the settlement. Possible values are: + - `pending` + - `on_hold` + - `settled` + +`source` +: `string` Unique identifier of the transfer source. The source can be a `payment` or an `order`. + +`recipient` +: `string` Unique identifier of the transfer destination, that is, the Linked Account. + +`amount` +: `integer` The amount to be transferred to the Linked Account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`currency` +: `string` ISO currency code. We support route transfers only in `INR`. + +`amount_reversed` +: `integer` Amount reversed from this transfer for refunds. + +`notes` +: `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "Bangalore"`. + +`error` +: `string` Provides error details that may occur during transfers. + + `code` + : `string` Type of the error. + + `description` + : `string` Error description. + + `field` + : `string` Name of the parameter in the API request that caused the error. + + `source` + : `string` The point of failure in the specific operation. For example, customer, business and so on. + + `step` + : `string` The stage where the transaction failure occurred. Stages can be different depending on the payment method used to make the transaction. + + `id` + : `string` Unique identifier of the transfer. + + `reason` + : `string` The exact error reason. It can be handled programmatically. + +`linked_account_notes` +: `array` List of keys from the `notes` object which needs to be shown to Linked Accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + +`on_hold` +: `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + +`on_hold_until` +: `integer` Timestamp, in Unix format, indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + +`recipient_settlement_id` +: `string` Unique identifier of the settlement. + +`created_at` +: `integer` Timestamp, in Unix, at which the record was created. + +### Errors + +The api key/secret provided is invalid +* code: 4xx +* description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys. + +The transfers.0.amount must be at least 100. +* code: 400 +* description: This error occurs when the amount is less than the minimum amount. The transaction amount expressed in the currency subunit, such as paise (in INR) should always be greater than or equal to 100. +* solution: Make sure the amount is equal to or greater than the minimum amount of ₹100. + +The input field is required +* code: 400 +* description: This error occurs when a mandatory field is empty. +* solution: Make sure to fill in all the mandatory fields. + +payment_id is not a valid id +* code: 400 +* description: This error occurs when you pass an invalid `payment_id` in the API endpoint. +* solution: Make sure to pass a vaild `payment_id`. + +The id provided does not exist +* code: 400 +* description: This error occurs when there is a miss-match between the API keys via which the transaction was initiated for that particular `payment_id` and the API keys passed in the API call. +* solution: Ensure the API keys via which you have accepted the payment for the `payment_id` passed in the API endpoint matches the API keys passed in the API call. + +input is an invalid account_code. +* code: 400 +* description: This error occurs when the `account_code` passed is invalid or does not belong to the requested merchant. +* solution: Make sure to pass the valid `account_code`. + +Transfer cannot be made due to insufficient balance +* code: 400 +* description: This error occurs when the total balance is less than or equal to the transfer amount. +* solution: Make sure you have enough balance. You can also [add funds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/balances.md#add-funds-to-your-reserve-balance) to the account and then try doing the transfer. + +The sum of amount requested for transfer is greater than the captured amount +* code: 400 +* description: This error occurs when the total transferred amount exceeds the captured payment amount. +* solution: Make sure the transfer amount is less than the captured payment. diff --git a/llm-content/api/payments/route/direct-transfers-idempotent-request.md b/llm-content/api/payments/route/direct-transfers-idempotent-request.md new file mode 100644 index 00000000..e44a7db2 --- /dev/null +++ b/llm-content/api/payments/route/direct-transfers-idempotent-request.md @@ -0,0 +1,264 @@ +--- +title: Create a Direct Transfer (Idempotent Request) +description: Retry or send the same transfer request multiple times safely using the Razorpay API. +--- + +# Create a Direct Transfer (Idempotent Request) + +## Create a Direct Transfer (Idempotent Request) + +Idempotency allows you to safely retry or send the same request multiple times without fear of repeating the transfer request more than once. + +- When you try to create a transfer, in some cases due to network downtimes, you may not get a response from our servers. As a consequence, you will not be aware of the transfer id or its state. In such cases, you can safely retry the transaction using the same idempotency key without risk of double-payout or duplication. + +- To make a transfer request idempotent, add the header `X-Transfer-Idempotency` to the request and pass an idempotency key against it. The idempotency key (4-36 characters) can contain alphabets, numbers, hyphens, underscores and space only. For example, `fbdabb70-9548-4cfe-8da1-c9bbf39e96b0`. + +> **WARN** +> +> +> **Watch Out!** +> +> Currently, idempotency is supported only on the Direct Transfers API. +> + +> **INFO** +> +> +> **Handy Tips** +> +> - When retrying a request, the request body must be the same as the first request for idempotency to work. A different payload will be rejected as a `BAD_REQUEST`. +> - The idempotency key in retries must be the same as the original request. +> - Use unique idempotency keys for each unique request. +> - If we receive another request while the first one is in process, we will send a 409 error code. You can retry if you get this error code. +> + +### Request + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/transfers \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H 'content-type: application/json' \ +-H 'X-Transfer-Idempotency: fbdabb70-9548-4cfe-8da1-c9bbf39e96b0' \ +-d '{ + "account": "acc_CPRsN1LkFccllA", + "amount": 100, + "currency": "INR" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject transferRequest = new JSONObject(); +headers.put("X-Transfer-Idempotency","fbdabb70-9548-4cfe-8da1-c9bbf39e96b0"); +razorpay.addHeaders(headers); +transferRequest.put("amount",50000); +transferRequest.put("currency","INR"); +transferRequest.put("account","acc_CPRsN1LkFccllA"); + +Transfer transfer = razorpay.transfers.create(transferRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->setHeader("X-Transfer-Idempotency","fbdabb70-9548-4cfe-8da1-c9bbf39e96b0"); + +$api->transfer->create(array('account' => $accountId, 'amount' => 500, 'currency' => 'INR')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.transfers.create({ + "amount": 500, + "currency": "INR", + "account": "acc_CPRsN1LkFccllA" +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.transfer.create({ + "amount":500, + "currency":"INR", + "account": "acc_CPRsN1LkFccllA" +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay.headers = {"X-Transfer-Idempotency" => "fbdabb70-9548-4cfe-8da1-c9bbf39e96b0"} + +para_attr = { + "account": accountId, + "amount": 500, + "currency": "INR" +} + +Razorpay::Transfer.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +extraHeaders:= map[string]string{ + "X-Transfer-Idempotency": "fbdabb70-9548-4cfe-8da1-c9bbf39e96b0", + } + +data:= map[string]interface{}{ + "account": "", + "amount": 100, + "currency": "INR", +} +body, err := client.Transfer.Create(data, nil) +``` + +### Response + +```json: Success +{ + "id": "trf_JqpKevElHShZkw", + "entity": "transfer", + "status": "processed", + "source": "acc_CJoeHMNpi0nC7k", + "recipient": "acc_CPRsN1LkFccllA", + "amount": 100, + "currency": "INR", + "amount_reversed": 0, + "fees": 1, + "tax": 0, + "notes": [], + "linked_account_notes": [], + "on_hold": false, + "on_hold_until": null, + "recipient_settlement_id": null, + "created_at": 1657273505, + "processed_at": 1657273505, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_JqpKevElHShZkw", + "source": null, + "metadata": null + } +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Parameters + +`account` _mandatory_ +: `string` Unique identifier of the Linked Account to which the transfer must be made. + +`amount` _mandatory_ +: `integer` The amount (in paise) to be transferred to the Linked Account. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`currency` _mandatory_ +: `string` The currency used in the transaction. We support only `INR` for Route transactions. + +`notes` _optional_ +: `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. + +### Parameters + +`id` +: `string` Unique identifier of the transfer. + +`entity` +: `string` The name of the entity. Here, it is `transfer`. + +`transfer_status` +: `string` The status of the transfer. Possible values are: + - `created` + - `pending` + - `processed` + - `failed` + - `reversed` + - `partially_reversed` + +`settlement_status` +: `string` The status of the settlement. Possible values are: + - `pending` + - `on_hold` + - `settled` + +`source` +: `string` Unique identifier of the transfer source. The source can be a `payment` or an `order`. + +`recipient` +: `string` Unique identifier of the transfer destination, that is, the Linked Account. + +`amount` +: `integer` The amount to be transferred to the Linked Account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`currency` +: `string` ISO currency code. We support route transfers only in `INR`. + +`amount_reversed` +: `integer` Amount reversed from this transfer for refunds. + +`notes` +: `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "Bangalore"`. + +`error` +: `string` Provides error details that may occur during transfers. + + `code` + : `string` Type of the error. + + `description` + : `string` Error description. + + `field` + : `string` Name of the parameter in the API request that caused the error. + + `source` + : `string` The point of failure in the specific operation. For example, customer, business and so on. + + `step` + : `string` The stage where the transaction failure occurred. Stages can be different depending on the payment method used to make the transaction. + + `id` + : `string` Unique identifier of the transfer. + + `reason` + : `string` The exact error reason. It can be handled programmatically. + +`linked_account_notes` +: `array` List of keys from the `notes` object which needs to be shown to Linked Accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + +`on_hold` +: `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + +`on_hold_until` +: `integer` Timestamp, in Unix format, indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + +`recipient_settlement_id` +: `string` Unique identifier of the settlement. + +`created_at` +: `integer` Timestamp, in Unix, at which the record was created. + +### Errors + +The API key/secret provided is invalid. +* code: 4xx +* description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys. diff --git a/llm-content/api/payments/route/direct-transfers.md b/llm-content/api/payments/route/direct-transfers.md new file mode 100644 index 00000000..f9f98a2f --- /dev/null +++ b/llm-content/api/payments/route/direct-transfers.md @@ -0,0 +1,265 @@ +--- +title: Create a Direct Transfer +description: Create a Direct Transfer using the Razorpay API. +--- + +# Create a Direct Transfer + +## Create a Direct Transfer + +Use this endpoint to create a direct transfer of funds from your account to a Linked Account. Apart from transferring payments received from customers, you can also transfer funds to your Linked Accounts directly from your account balance using the **Direct Transfers** API. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +### Request + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/transfers \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H 'content-type: application/json' \ +-d '{ + "account": "acc_CPRsN1LkFccllA", + "amount": 100, + "currency": "INR" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject transferRequest = new JSONObject(); +transferRequest.put("amount",50000); +transferRequest.put("currency","INR"); +transferRequest.put("account","acc_CPRsN1LkFccllA"); + +Transfer transfer = razorpay.transfers.create(transferRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->transfer->create(array('account' => $accountId, 'amount' => 500, 'currency' => 'INR')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.transfers.create({ + "amount": 500, + "currency": "INR", + "account": "acc_CPRsN1LkFccllA" +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.transfer.create({ + "amount":500, + "currency":"INR", + "account": "acc_CPRsN1LkFccllA" +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "account": accountId, + "amount": 500, + "currency": "INR" +} + +Razorpay::Transfer.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "account": "", + "amount": 100, + "currency": "INR", +} +body, err := client.Transfer.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] +"); + +Dictionary transferRequest = new Dictionary(); +transferRequest.Add("account", "acc_I0QRP7PpvaHhpB"); +transferRequest.Add("amount", 100); +transferRequest.Add("currency", "INR"); + +Transfer transfer = client.Transfer.Create(transferRequest); +``` + +### Response + +```json: Success +{ + "id": "trf_JqpKevElHShZkw", + "entity": "transfer", + "status": "processed", + "source": "acc_CJoeHMNpi0nC7k", + "recipient": "acc_CPRsN1LkFccllA", + "amount": 100, + "currency": "INR", + "amount_reversed": 0, + "fees": 1, + "tax": 0, + "notes": [], + "linked_account_notes": [], + "on_hold": false, + "on_hold_until": null, + "recipient_settlement_id": null, + "created_at": 1657273505, + "processed_at": 1657273505, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_JqpKevElHShZkw", + "source": null, + "metadata": null + } +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Parameters + +`account` _mandatory_ +: `string` Unique identifier of the Linked Account to which the transfer must be made. + +`amount` _mandatory_ +: `integer` The amount (in paise) to be transferred to the Linked Account. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`currency` _mandatory_ +: `string` The currency used in the transaction. We support only `INR` for Route transactions. + +`notes` _optional_ +: `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. + +### Parameters + +`id` +: `string` Unique identifier of the transfer. + +`entity` +: `string` The name of the entity. Here, it is `transfer`. + +`transfer_status` +: `string` The status of the transfer. Possible values are: + - `created` + - `pending` + - `processed` + - `failed` + - `reversed` + - `partially_reversed` + +`settlement_status` +: `string` The status of the settlement. Possible values are: + - `pending` + - `on_hold` + - `settled` + +`source` +: `string` Unique identifier of the transfer source. The source can be a `payment` or an `order`. + +`recipient` +: `string` Unique identifier of the transfer destination, that is, the Linked Account. + +`amount` +: `integer` The amount to be transferred to the Linked Account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`currency` +: `string` ISO currency code. We support route transfers only in `INR`. + +`amount_reversed` +: `integer` Amount reversed from this transfer for refunds. + +`notes` +: `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "Bangalore"`. + +`error` +: `string` Provides error details that may occur during transfers. + + `code` + : `string` Type of the error. + + `description` + : `string` Error description. + + `field` + : `string` Name of the parameter in the API request that caused the error. + + `source` + : `string` The point of failure in the specific operation. For example, customer, business and so on. + + `step` + : `string` The stage where the transaction failure occurred. Stages can be different depending on the payment method used to make the transaction. + + `id` + : `string` Unique identifier of the transfer. + + `reason` + : `string` The exact error reason. It can be handled programmatically. + +`linked_account_notes` +: `array` List of keys from the `notes` object which needs to be shown to Linked Accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + +`on_hold` +: `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + +`on_hold_until` +: `integer` Timestamp, in Unix format, indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + +`recipient_settlement_id` +: `string` Unique identifier of the settlement. + +`created_at` +: `integer` Timestamp, in Unix, at which the record was created. + +### Errors + +The api key/secret provided is invalid +* code: 4xx +* description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys. + +The transfers.0.amount must be at least 100. +* code: 400 +* description: This error occurs when the amount is less than the minimum amount. The transaction amount expressed in the currency subunit, such as paise (in INR) should always be greater than or equal to 100. +* solution: Make sure the amount is equal to or greater than the minimum amount of ₹100. + +The input field is required +* code: 400 +* description: This error occurs when a mandatory field is empty. +* solution: Make sure to fill in all the mandatory fields. diff --git a/llm-content/api/payments/route/fetch-a-transfer.md b/llm-content/api/payments/route/fetch-a-transfer.md new file mode 100644 index 00000000..4d3e0a79 --- /dev/null +++ b/llm-content/api/payments/route/fetch-a-transfer.md @@ -0,0 +1,214 @@ +--- +title: Fetch a Transfer With ID +description: Fetch a Transfer using the Razorpay API. +--- + +# Fetch a Transfer With ID + +## Fetch a Transfer With ID + +Use this endpoint to fetch details of a transfer by its unique identifier. + +### Request + +```curl: Curl +curl -X GET https://api.razorpay.com/v1/transfers/trf_JJD536GI6wuz3m \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String transferId = "trf_JJD536GI6wuz3m"; + +Transfer transfer = razorpay.transfers.fetch(transferId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->transfer->fetch($transferId); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.transfers.fetch(transferId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.transfer.fetch(transferId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +transferId = "trf_JJD536GI6wuz3m" + +Razorpay::Transfer.fetch(transferId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Transfer.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] +"); + +string transferId = "trf_E7V62rAxJ3zYMo"; + +Transfer transfer = client.Transfer.Fetch("trf_Mb2I3eslnL3bFk"); +``` + +### Response + +```json: Success +{ + "id": "trf_JJD536GI6wuz3m", + "entity": "transfer", + "status": "processed", + "source": "pay_JGmCgTEa9OTQcX", + "recipient": "acc_IRQWUleX4BqvYn", + "amount": 300, + "currency": "INR", + "amount_reversed": 0, + "fees": 1, + "tax": 0, + "notes": { + "name": "Saurav Kumar", + "roll_no": "IEC2011026" + }, + "linked_account_notes": [ + "roll_no" + ], + "on_hold": false, + "on_hold_until": null, + "settlement_status": "pending", + "recipient_settlement_id": null, + "created_at": 1649933574, + "processed_at": 1649933579, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_JJD536GI6wuz3m", + "source": null, + "metadata": null + } +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the transfer for which details must be fetched. + +### Parameters + +`id` +: `string` Unique identifier of the transfer. + +`entity` +: `string` The name of the entity. Here, it is `transfer`. + +`transfer_status` +: `string` The status of the transfer. Possible values are: + - `created` + - `pending` + - `processed` + - `failed` + - `reversed` + - `partially_reversed` + +`settlement_status` +: `string` The status of the settlement. Possible values are: + - `pending` + - `on_hold` + - `settled` + +`source` +: `string` Unique identifier of the transfer source. The source can be a `payment` or an `order`. + +`recipient` +: `string` Unique identifier of the transfer destination, that is, the Linked Account. + +`amount` +: `integer` The amount to be transferred to the Linked Account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`currency` +: `string` ISO currency code. We support route transfers only in `INR`. + +`amount_reversed` +: `integer` Amount reversed from this transfer for refunds. + +`notes` +: `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "Bangalore"`. + +`error` +: `string` Provides error details that may occur during transfers. + + `code` + : `string` Type of the error. + + `description` + : `string` Error description. + + `field` + : `string` Name of the parameter in the API request that caused the error. + + `source` + : `string` The point of failure in the specific operation. For example, customer, business and so on. + + `step` + : `string` The stage where the transaction failure occurred. Stages can be different depending on the payment method used to make the transaction. + + `id` + : `string` Unique identifier of the transfer. + + `reason` + : `string` The exact error reason. It can be handled programmatically. + +`linked_account_notes` +: `array` List of keys from the `notes` object which needs to be shown to Linked Accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + +`on_hold` +: `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + +`on_hold_until` +: `integer` Timestamp, in Unix format, indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + +`recipient_settlement_id` +: `string` Unique identifier of the settlement. + +`created_at` +: `integer` Timestamp, in Unix, at which the record was created. + +### Errors + +The api key/secret provided is invalid +* code: 4xx +* description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys. + +transfer_id is not a valid id +* code: 400 +* description: This error occurs when you pass an invalid `transfer_id` in the API endpoint. +* solution: Make sure to pass a vaild `transfer_id`. diff --git a/llm-content/api/payments/route/fetch-payments-linked-account.md b/llm-content/api/payments/route/fetch-payments-linked-account.md new file mode 100644 index 00000000..7eff727a --- /dev/null +++ b/llm-content/api/payments/route/fetch-payments-linked-account.md @@ -0,0 +1,245 @@ +--- +title: Fetch Payments of a Linked Account +description: Fetch Payments of a Linked Account using the Razorpay API. +--- + +# Fetch Payments of a Linked Account + +## Fetch Payments of a Linked Account + +Use this endpoint to fetch a list of all the payments received by a Linked Account. For this, you should send the Linked Account id in the `X-Razorpay-Account` API request header, as shown in the Curl example. + +### Request + +```curl: Curl +curl -X GET https://api.razorpay.com/v1/payments \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H 'X-Razorpay-Account: acc_IRQWUleX4BqvYn' \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Map headers = new HashMap(); +headers.put("X-Razorpay-Account","acc_IRQWUleX4BqvYn"); +instance.addHeaders(headers); + +List payments = razorpay.payments.fetchAll(); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->all(array('X-Razorpay-Account'=> $linkedAccountId)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.all({ + 'X-Razorpay-Account': linkedAccountId +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.all({ + "X-Razorpay-Account":"linkedAccountId" +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay.headers = {"X-Razorpay-Account" => "linkedAccountId"} + +Razorpay::Payment.all + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +extraHeaders:= map[string]string{ + "X-Razorpay-Account": "", +} +body, err := client.Payment.All(nil, extraHeaders) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] +"); + +client.addHeader("X-Razorpay-Account","acc_CPRsN1LkFccllA"); + +List transfer = client.Payment.All(); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "pay_JJCqynf4fQS0N1", + "entity": "payment", + "amount": 10000, + "currency": "INR", + "status": "captured", + "order_id": "order_JJCqnZG8f3754z", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "#JJCqaOhFihfkVE", + "card_id": null, + "bank": "YESB", + "wallet": null, + "vpa": null, + "email": "john.example@example.com", + "contact": "+919820958250", + "notes": [], + "fee": 236, + "tax": 36, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "2118867" + }, + "created_at": 1649932775 + }, + { + "id": "pay_JHAe1Zat55GbZB", + "entity": "payment", + "amount": 5000, + "currency": "INR", + "status": "captured", + "order_id": "order_IluGWxBm9U8zJ8", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Test Transaction", + "card_id": null, + "bank": "KKBK", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "address": "Razorpay Corporate Office" + }, + "fee": 118, + "tax": 18, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "7003347" + }, + "created_at": 1649488316 + } + ] +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `string` The payment amount represented in the smallest unit of the currency passed. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`currency` +: `string` The currency in which the payment is made. We support only `INR` for Route transactions. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Here, it will be `transfer`. + +`order_id` +: `string` Unique identifier of the order associated with the payment. + +`description` +: `string` Description of the payment, if any. + +`refund_status` +: `string` The refund status of the payment. Possible values include: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in the smallest unit of the currency passed. For example, if the `amount_refunded` is 100, then it translates to 100 paise, that is ₹1. Only INR is supported. + +`captured` +: `boolean` Indicates whether the payment has been captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Code for the error that occurred during payment. For example, `BAD_GATEWAY_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. + +`notes` +: `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. + +`created_at` +: `integer` Timestamp, in Unix, on which the payment was created. + +### Errors + +The api key/secret provided is invalid +* code: 4xx +* description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys. + +The id provided does not exist +* code: 400 +* description: This error occurs when the Linked Account is invalid or does not belong to the requested merchant. +* solution: Ensure the Linked Account is valid and belongs to the requested merchant. diff --git a/llm-content/api/payments/route/fetch-product-config.md b/llm-content/api/payments/route/fetch-product-config.md new file mode 100644 index 00000000..e7ca79fc --- /dev/null +++ b/llm-content/api/payments/route/fetch-product-config.md @@ -0,0 +1,195 @@ +--- +title: Fetch a Product Configuration +description: Fetch a product configuration using the Razorpay API. +--- + +# Fetch a Product Configuration + +## Fetch a Product Configuration + +Use this endpoint to fetch a product configuration. + +### Request + +```curl: Curl +curl -X GET 'https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e/' \ + -u [YOUR_KEY_ID]:[YOUR_SECRET] \ + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String accountId = "acc_HQVlm3bnPmccC0"; + +String productId = "acc_prd_HEgNpywUFctQ9e"; + +Account product = instance.product.fetch(accountId, productId); + +```python: Python + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +accountId = "acc_HQVlm3bnPmccC0" + +productId = "acc_prd_HEgNpywUFctQ9e" + +client.product.fetch(accountId, productId) + +```php: PHP + +$api = new Api($key_id, $secret); + +$accountId = "acc_HQVlm3bnPmccC0"; + +$productId = "acc_prd_HEgNpywUFctQ9e"; + +$api->account->fetch($accountId)->products()->fetch($productId); + +```csharp: .NET + +RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + +string accountId = "acc_HQVlm3bnPmccC0"; + +string productId = "acc_prd_HEgNpywUFctQ9e"; + +Product product = client.Product.Fetch(accountId, productId) + +```ruby: Ruby + +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +accountId = "acc_HQVlm3bnPmccC0" + +productId = "acc_prd_HEgNpywUFctQ9e" + +Razorpay::Product.fetch(accountId, productId) + +```javascript: Node.js + +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var accountId = "acc_HQVlm3bnPmccC0"; + +var productId = "acc_prd_HEgNpywUFctQ9e"; + +instance.products.fetch(accountId, productId); + +```go: Go + +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +accountId := "acc_HQVlm3bnPmccC0" + +productId := "acc_prd_HEgNpywUFctQ9e" + +body, err := client.Product.Fetch(accountId, productId, nil, nil) +``` + +### Response + +```json: Success +{ + "requested_configuration":[ + + ], + "active_configuration":{ + "settlements":{ + "account_number":null, + "ifsc_code":null, + "beneficiary_name":null + } + }, + "requirements":[ + { + "field_reference":"settlements.beneficiary_name", + "resolution_url":"/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e", + "reason_code":"field_missing", + "status":"required" + }, + { + "field_reference":"settlements.account_number", + "resolution_url":"/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e", + "reason_code":"field_missing", + "status":"required" + }, + { + "field_reference":"settlements.ifsc_code", + "resolution_url":"/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e", + "reason_code":"field_missing", + "status":"required" + } + ], + "tnc":{ + "id":"tnc_K1eopApuHyBE7D", + "accepted":true, + "accepted_at":1659638222 + }, + "id":"acc_prd_HEgNpywUFctQ9e", + "product_name":"route", + "activation_status":"needs_clarification", + "account_id":"acc_HQVlm3bnPmccC0", + "requested_at":1659638222 +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The provided product config id doesn't exist for the merchant", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of an account generated by Razorpay. For example, `acc_HQVlm3bnPmccC0`. + +`product_id` _mandatory_ +: `string` The unique identifier of a product generated by Razorpay. For example, `acc_prd_HEgNpywUFctQ9e`. + +### Parameters + +`requested_configuration` +: `object` The configuration of the product requested by the user that is yet to be set as active. + +`active_configuration` +: `object` The configuration of the product that has been set as active. + + `settlements` + : `object` The Settlement settings object. + + + + `account_number` + : `string` The bank account number to which settlements are made. Account details can be found on the Dashboard. For example, 7878780080316316 + + `ifsc_code` + : `string` The IFSC associated with the bank account. For example, `RATN0VAAPIS`. + + + + + + `beneficiary_name` + : `string` The name of the beneficiary associated with the bank account. This API parameter is needed to complete the KYC process. However, it is optional for this API. + +`requirements` +: `object` The list of requirements to be enabled for this product or some of the configurations under this product. + +### Errors + +The provided product config id doesn't exist for the merchant. +* code: 400 +* description: This error occurs when the provided product configuration does not belong to the Linked Account. +* solution: Ensure you provide the correct `product_id` associated with the Linked Account. diff --git a/llm-content/api/payments/route/fetch-reversals.md b/llm-content/api/payments/route/fetch-reversals.md new file mode 100644 index 00000000..b11a7b7b --- /dev/null +++ b/llm-content/api/payments/route/fetch-reversals.md @@ -0,0 +1,114 @@ +--- +title: Fetch Reversals for a Transfer +description: Fetch Reversals for a Transfer using the Razorpay API. +--- + +# Fetch Reversals for a Transfer + +## Fetch Reversals for a Transfer + +Use this endpoint to retrieve a list of reversals made for a transfer. + +### Request + +```curl: Curl +curl -X GET https://api.razorpay.com/v1/transfers/trf_Lt048W7cgLdo1u/reversals \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + +```php: PHP +$api = new Api($key_id, $secret); + +$api->transfer->fetch("trf_Lt048W7cgLdo1u")->reversals(); + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.transfer.reversals(transferId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Transfer.Reversals("", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +transferId = "trf_JhemwjNekar9Za" +Razorpay::Transfer.reversals(transferId) +``` + +### Response + +```json: Success +{ + "entity":"collection", + "count":1, + "items":[ + { + "id":"rvrsl_Lt09xvyzskI7KZ", + "entity":"reversal", + "transfer_id":"trf_Lt048W7cgLdo1u", + "amount":50000, + "fee":0, + "tax":0, + "currency":"INR", + "notes":[ + + ], + "initiator_id":"Ghri4beeOuMTAb", + "customer_refund_id":null, + "utr":null, + "created_at":1684822489 + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the transfer. + +### Parameters + +`id` +: `string` The unique identifier of the reversal. + +`entity` +: `string` The name of the entity. Here, it is `reversal`. + +`transfer_id` +: `string` The unique identifier of the transfer that was reversed. + +`amount` +: `integer` The amount that was reversed, in paise. + +`currency` +: `string` ISO currency code. We support route reversals only in INR. + +`initiator_id` +: `string` The unique identifier of the merchant (MID). + +`created_at` +: `integer` Timestamp in Unix. This indicates the time at which the reversal was created. + +### Errors + +The API key/secret provided is invalid. +* code: 4xx +* description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys. diff --git a/llm-content/api/payments/route/fetch-settlement-details.md b/llm-content/api/payments/route/fetch-settlement-details.md new file mode 100644 index 00000000..16e5793b --- /dev/null +++ b/llm-content/api/payments/route/fetch-settlement-details.md @@ -0,0 +1,320 @@ +--- +title: Fetch Settlement Details +description: Fetch settlement details using the Razorpay API. +--- + +# Fetch Settlement Details + +## Fetch Settlement Details + +Use this endpoint to fetch details of settlements made to Linked Accounts. You should append `?expand[]=recipient_settlement` as the query parameter to the fetch transfer request. This would return a `settlement` entity and the `transfer` entity. + +### Request + +```curl: Curl +curl -X GET https://api.razorpay.com/v1/transfers?expand[]=recipient_settlement \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("expand[]","recipient_settlement"); + +List transfer = razorpay.transfers.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->transfer->all(array('expand[]'=> 'recipient_settlement')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.transfers.all({ + expand[] = 'recipient_settlement' +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.transfer.all({ + "expand[]":"recipient_settlement" +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Transfer.fetch_settlements + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "expand[]": "recipient_settlement", +} +body, err := client.Transfer.All(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] +"); + +Dictionary transferRequest = new Dictionary(); +transferRequest.Add("expand[]", "recipient_settlement"); + +List transfer = client.Transfer.All(transferRequest); +``` + +### Response + +```json: Success +{ + "entity":"collection", + "count":2, + "items":[ + { + "id":"trf_LQzChWyKaanhLt", + "entity":"transfer", + "status":"processed", + "source":"pay_LObWTFZaMBE09S", + "recipient":"acc_LQDB1eV0EnS808", + "account_code":"sartest", + "amount":200, + "currency":"INR", + "amount_reversed":0, + "fees":0, + "tax":0, + "notes":[ + + ], + "linked_account_notes":[ + + ], + "on_hold":false, + "on_hold_until":null, + "settlement_status":"settled", + "recipient_settlement_id":"setl_LRfWxcxaJyXwde", + "recipient_settlement":{ + "id":"setl_LRfWxcxaJyXwde", + "entity":"settlement", + "amount":200, + "status":"processed", + "fees":0, + "tax":0, + "utr":"cg8kkuoffu3jpb4k8hgg", + "created_at":1678854659 + }, + "created_at":1678705600, + "processed_at":1678705601, + "error":{ + "code":null, + "description":null, + "reason":null, + "field":null, + "step":null, + "id":"trf_LQzChWyKaanhLt", + "source":null, + "metadata":null + }, + "source_channel":"online" + }, + { + "id":"trf_Ks9IagO4T2wZ5l", + "entity":"transfer", + "status":"processed", + "source":"pay_Ks9IUPU43z3FRz", + "recipient":"acc_H9sehmPXd5nd2n", + "account_code":"Palguna_test", + "amount":100000, + "currency":"INR", + "amount_reversed":0, + "fees":0, + "tax":0, + "notes":[ + + ], + "linked_account_notes":[ + + ], + "on_hold":false, + "on_hold_until":null, + "settlement_status":"settled", + "recipient_settlement_id":"setl_KstcJycgGX6lRa", + "recipient_settlement":{ + "id":"setl_KstcJycgGX6lRa", + "entity":"settlement", + "amount":200000, + "status":"processed", + "fees":0, + "tax":0, + "utr":"ceen24sa13gn9rr3uij0", + "created_at":1671262362 + }, + "created_at":1671099247, + "processed_at":1671099247, + "error":{ + "code":null, + "description":null, + "reason":null, + "field":null, + "step":null, + "id":"trf_Ks9IagO4T2wZ5l", + "source":null, + "metadata":null + }, + "source_channel":"online" + } + ] +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Parameters + +`expand` _mandatory_ +: `string` Used to retrieve settlement entity along with transfer entity. Supported value is `recipient_settlement`. + +`transfer_type` _optional_ +: `string` Applicable only if you are a Razorpay Partner. Controls which transfers are returned based on the destination account and partner configuration. Possible values are: + - `platform`: Returns transfers excluding those sent to the partner's own Linked Accounts. + - `regular` (or when the parameter is omitted): The behaviour depends on the partner's `route_partnerships` feature setting: + - If `route_partnerships` is enabled: Returns transfers sent to the partner's own Linked Accounts. + - If `route_partnerships` is disabled: Returns all regular transfers associated with the Partner account. + +Descriptions for the optional query parameters are present in the [Pagination & Rate Limiting](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#pagination) documentation. + +### Parameters + +`id` +: `string` Unique identifier of the transfer. + +`entity` +: `string` The name of the entity. Here, it is `transfer`. + +`transfer_status` +: `string` The status of the transfer. Possible values are: + - `created` + - `pending` + - `processed` + - `failed` + - `reversed` + - `partially_reversed` + +`settlement_status` +: `string` The status of the settlement. Possible values are: + - `pending` + - `on_hold` + - `settled` + +`source` +: `string` Unique identifier of the transfer source. The source can be a `payment` or an `order`. + +`recipient` +: `string` Unique identifier of the transfer destination, that is, the Linked Account. + +`amount` +: `integer` The amount to be transferred to the Linked Account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`currency` +: `string` ISO currency code. We support route transfers only in `INR`. + +`amount_reversed` +: `integer` Amount reversed from this transfer for refunds. + +`notes` +: `json object` Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. + +`on_hold` +: `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + +`on_hold_until` +: `integer` Timestamp, in Unix, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + +`recipient_settlement_id` +: `string` Unique identifier of the settlement. + +`recipient_settlement` +: `array` + + `id` + : `string` Unique identifier of the settlement received by the Linked Account. + + `entity` + : `string` Indicates the type of entity. Here, it is `settlement`. + + `amount` + : `string` The settlement amount represented in the smallest unit of the currency passed. + + `status` + : `string` The status of the settlement. Possible values: + -`processed` - The settlement process was successful. + -`failed` - The settlement process failed. + + `fee` + : `integer` Fee (including GST) charged by Razorpay. + + `tax` + : `integer` GST charged for the payment. + + `utr` + : `string` Unique identifier received for the settlement from the bank. + + `created_at` + : `integer` Timestamp, in Unix, at which the settlement was created. + +`linked_account_notes` +: `array` List of keys from the `notes` object which needs to be shown to Linked Accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + +`created_at` +: `integer` Timestamp, in Unix, at which the transfer was created. + +`processed_at` +: `integer` Timestamp, in Unix, at which the transfer was processed. + +`error` +: `array` Provides error details that may occur during transfers. + + `code` + : `string` Type of the error. + + `description` + : `string` Error description. + + `field` + : `string` Name of the parameter in the API request that caused the error. + + `source` + : `string` The point of failure in the specific operation. For example, customer, business and so on. + + `step` + : `string` The stage where the transaction failure occurred. Stages can be different depending on the payment method used to make the transaction. + + `reason` + : `string` The exact error reason. It can be handled programmatically. + +`source_channel` +: `string` Medium through which transfers were created. For example, `online`. + +### Errors + +The api key/secret provided is invalid +* code: 4xx +* description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys. If you get null as an API response, an invalid `recipient_settlement_id` was passed. Ensure to pass a valid `recipient_settlement_id`, and it belongs to the Linked Account. diff --git a/llm-content/api/payments/route/fetch-transfer-order.md b/llm-content/api/payments/route/fetch-transfer-order.md new file mode 100644 index 00000000..13865d73 --- /dev/null +++ b/llm-content/api/payments/route/fetch-transfer-order.md @@ -0,0 +1,286 @@ +--- +title: Fetch Transfer for an Order +description: Fetch Transfer for an order using the Razorpay API. +--- + +# Fetch Transfer for an Order + +## Fetch Transfer for an Order + +Use this endpoint to retrieve the collection of all transfers created on a specific order id. + +### Request + +```curl: Curl +curl -X GET https://api.razorpay.com/v1/orders/order_DSkl2lBNvueOly/?expand[]=transfers&status=processing \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject request = new JSONObject(); +request.put("expand[]","transfers"); + +Order response = razorpayclient.orders.get("orders/order_JJCYnu3hipocHz",request); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->fetch($orderId)->transfers(array('expand[]'=>'transfers')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.fetchTransferOrder(orderId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.fetch(orderId, { + "expand[]": "transfers" +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +orderId = "order_JJCYnu3hipocHz" + +Razorpay::Order.fetch_transfer_order(orderId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "expand[]": "transfers", +} +body, err := client.Order.Fetch("", data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] +"); + +string orderId = "order_JkaIDdkgGXVcwS"; + +Dictionary transferRequest = new Dictionary(); +transferRequest.Add("expand[]", "transfers"); + +Order token = client.Order.Fetch(orderId, transferRequest); +``` + +### Response + +```json: Success +{ + "id": "order_JJCYnu3hipocHz", + "entity": "order", + "amount": 2000, + "amount_paid": 0, + "amount_due": 2000, + "currency": "INR", + "receipt": null, + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1649931742, + "transfers": { + "entity": "collection", + "count": 2, + "items": [ + { + "id": "trf_JJCYnw77tqUT9r", + "entity": "transfer", + "status": "created", + "source": "order_JJCYnu3hipocHz", + "recipient": "acc_IRQWUleX4BqvYn", + "amount": 1000, + "currency": "INR", + "amount_reversed": 0, + "fees": 0, + "tax": null, + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": true, + "on_hold_until": 1671222870, + "settlement_status": null, + "recipient_settlement_id": null, + "created_at": 1649931742, + "processed_at": null, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_JJCYnw77tqUT9r", + "source": null, + "metadata": null + } + }, + { + "id": "trf_JJCYnxe5GV19Kk", + "entity": "transfer", + "status": "created", + "source": "order_JJCYnu3hipocHz", + "recipient": "acc_IROu8Nod6PXPtZ", + "amount": 1000, + "currency": "INR", + "amount_reversed": 0, + "fees": 0, + "tax": null, + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Saurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": false, + "on_hold_until": null, + "settlement_status": null, + "recipient_settlement_id": null, + "created_at": 1649931742, + "processed_at": null, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_JJCYnxe5GV19Kk", + "source": null, + "metadata": null + } + } + ] + } +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the Order for which transfers must be retrieved. + +### Parameters + +`expand` _mandatory_ +: `array` Used to retrieve details regarding the transfers initiated via an order. Supported value is `transfers`. + +`status` _optional_ +: `string` Status of the transfer. + +### Parameters + +`id` +: `string` Unique identifier of the transfer. + +`entity` +: `string` The name of the entity. Here, it is `transfer`. + +`transfer_status` +: `string` The status of the transfer. Possible values are: + - `created` + - `pending` + - `processed` + - `failed` + - `reversed` + - `partially_reversed` + +`settlement_status` +: `string` The status of the settlement. Possible values are: + - `pending` + - `on_hold` + - `settled` + +`source` +: `string` Unique identifier of the transfer source. The source can be a `payment` or an `order`. + +`recipient` +: `string` Unique identifier of the transfer destination, that is, the Linked Account. + +`amount` +: `integer` The amount to be transferred to the Linked Account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`currency` +: `string` ISO currency code. We support route transfers only in `INR`. + +`amount_reversed` +: `integer` Amount reversed from this transfer for refunds. + +`notes` +: `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "Bangalore"`. + +`error` +: `string` Provides error details that may occur during transfers. + + `code` + : `string` Type of the error. + + `description` + : `string` Error description. + + `field` + : `string` Name of the parameter in the API request that caused the error. + + `source` + : `string` The point of failure in the specific operation. For example, customer, business and so on. + + `step` + : `string` The stage where the transaction failure occurred. Stages can be different depending on the payment method used to make the transaction. + + `id` + : `string` Unique identifier of the transfer. + + `reason` + : `string` The exact error reason. It can be handled programmatically. + +`linked_account_notes` +: `array` List of keys from the `notes` object which needs to be shown to Linked Accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + +`on_hold` +: `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + +`on_hold_until` +: `integer` Timestamp, in Unix format, indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + +`recipient_settlement_id` +: `string` Unique identifier of the settlement. + +`created_at` +: `integer` Timestamp, in Unix, at which the record was created. + +### Errors + +The api key/secret provided is invalid +* code: 4xx +* description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys. + +order_id is not a valid id +* code: 400 +* description: This error occurs when you pass an invalid `order_id` in the API endpoint. +* solution: Make sure to pass a vaild `order_id`. diff --git a/llm-content/api/payments/route/fetch-transfers-for-a-settlement.md b/llm-content/api/payments/route/fetch-transfers-for-a-settlement.md new file mode 100644 index 00000000..4d4b4478 --- /dev/null +++ b/llm-content/api/payments/route/fetch-transfers-for-a-settlement.md @@ -0,0 +1,223 @@ +--- +title: Fetch Transfers for a Settlement +description: Fetch Transfers for a Settlement using the Razorpay API. +--- + +# Fetch Transfers for a Settlement + +## Fetch Transfers for a Settlement + +Use this endpoint to retrieve the collection of all transfers made for a particular `recipient_settlement_id`. + +### Request + +``` curl: Curl +curl -X GET https://api.razorpay.com/v1/transfers?recipient_settlement_id=setl_HYIIk3H0J4PYdX \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("recipient_settlement_id","setl_HYIIk3H0J4PYdX"); + +List transfers = razorpay.transfers.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->transfer->all(array('recipient_settlement_id'=> $recipientSettlementId)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.transfers.all({ + recipient_settlement_id : recipientSettlementId +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.transfer.all({ + "recipient_settlement_id":"recipientSettlementId" +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +recipientSettlementId = "setl_HYIIk3H0J4PYdX" + +Razorpay::Transfer.all({ + "recipient_settlement_id": recipientSettlementId +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "recipient_settlement_id": "", +} +body, err := client.Transfer.All(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] +"); + +Dictionary transferRequest = new Dictionary(); +transferRequest.Add("recipient_settlement_id", "setl_DHYJ3dRPqQkAgV"); + +List transfer = client.Transfer.All(transferRequest); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "trf_HWjmkReRGPhguR", + "entity": "transfer", + "status": "processed", + "source": "pay_HWjY9DZSMsbm5E", + "recipient": "acc_HWjl1kqobJzf4i", + "amount": 1000, + "currency": "INR", + "amount_reversed": 0, + "fees": 3, + "tax": 0, + "notes": [], + "linked_account_notes": [], + "on_hold": false, + "on_hold_until": null, + "settlement_status": "settled", + "recipient_settlement_id": "setl_HYIIk3H0J4PYdX", + "created_at": 1625812996, + "processed_at": 1625812996, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_HWjmkReRGPhguR", + "source": null, + "metadata": null + } + } + ] +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Parameters + +`recipient_settlement_id` _mandatory_ +: `string` Unique identifier of a settlement obtained from the `settlement.processed` webhook payload. + +Descriptions for the optional query parameters are present in the [Pagination & Rate Limiting](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#pagination) documentation. + +### Parameters + +`id` +: `string` Unique identifier of the transfer. + +`entity` +: `string` The name of the entity. Here, it is `transfer`. + +`transfer_status` +: `string` The status of the transfer. Possible values are: + - `created` + - `pending` + - `processed` + - `failed` + - `reversed` + - `partially_reversed` + +`settlement_status` +: `string` The status of the settlement. Possible values are: + - `pending` + - `on_hold` + - `settled` + +`source` +: `string` Unique identifier of the transfer source. The source can be a `payment` or an `order`. + +`recipient` +: `string` Unique identifier of the transfer destination, that is, the Linked Account. + +`amount` +: `integer` The amount to be transferred to the Linked Account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`currency` +: `string` ISO currency code. We support route transfers only in `INR`. + +`amount_reversed` +: `integer` Amount reversed from this transfer for refunds. + +`notes` +: `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "Bangalore"`. + +`error` +: `string` Provides error details that may occur during transfers. + + `code` + : `string` Type of the error. + + `description` + : `string` Error description. + + `field` + : `string` Name of the parameter in the API request that caused the error. + + `source` + : `string` The point of failure in the specific operation. For example, customer, business and so on. + + `step` + : `string` The stage where the transaction failure occurred. Stages can be different depending on the payment method used to make the transaction. + + `id` + : `string` Unique identifier of the transfer. + + `reason` + : `string` The exact error reason. It can be handled programmatically. + +`linked_account_notes` +: `array` List of keys from the `notes` object which needs to be shown to Linked Accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + +`on_hold` +: `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + +`on_hold_until` +: `integer` Timestamp, in Unix format, indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + +`recipient_settlement_id` +: `string` Unique identifier of the settlement. + +`created_at` +: `integer` Timestamp, in Unix, at which the record was created. + +### Errors + +The api key/secret provided is invalid +* code: 4xx +* description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys. diff --git a/llm-content/api/payments/route/fetch-transfers-payment.md b/llm-content/api/payments/route/fetch-transfers-payment.md new file mode 100644 index 00000000..78b9fbf4 --- /dev/null +++ b/llm-content/api/payments/route/fetch-transfers-payment.md @@ -0,0 +1,255 @@ +--- +title: Fetch Transfers for a Payment +description: Fetch Transfers for a payment using the Razorpay API. +--- + +# Fetch Transfers for a Payment + +## Fetch Transfers for a Payment + +Use this endpoint to retrieve the collection of all transfers created on a specific Payment id. Once the settlement against the transfer is processed, a webhook notification `settlement.processed` is sent which contains a `recipient_settlement_id`. Know more about [sample webhook payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/route.md#settlement-processed). + +### Request + +```curl: Curl +curl -X GET https://api.razorpay.com/v1/payments/pay_JGmCgTEa9OTQcX/transfers \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_JGmCgTEa9OTQcX"; + +List payments = razorpay.payments.fetchAllTransfers(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch('payment')->transfers(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetchTransfer(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.transfers(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_JGmCgTEa9OTQcX" + +Razorpay::Payment.fetch(paymentId).fetch_transfer + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Transfers("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] +"); + +string paymentId = "pay_E9up5WhIfMYnKW"; + +List token = client.Payment.Fetch(paymentId).Transfers(); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "trf_JJD535tJtk6Yy0", + "entity": "transfer", + "status": "processed", + "source": "pay_JGmCgTEa9OTQcX", + "recipient": "acc_IROu8Nod6PXPtZ", + "amount": 100, + "currency": "INR", + "amount_reversed": 0, + "fees": 1, + "tax": 0, + "notes": { + "name": "Gaurav Kumar", + "roll_no": "IEC2011025" + }, + "linked_account_notes": [ + "roll_no" + ], + "on_hold": true, + "on_hold_until": 1671222870, + "settlement_status": "on_hold", + "recipient_settlement_id": null, + "created_at": 1649933574, + "processed_at": 1649933579, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_JJD535tJtk6Yy0", + "source": null, + "metadata": null + } + }, + { + "id": "trf_JJD536GI6wuz3m", + "entity": "transfer", + "status": "processed", + "source": "pay_JGmCgTEa9OTQcX", + "recipient": "acc_IRQWUleX4BqvYn", + "amount": 300, + "currency": "INR", + "amount_reversed": 0, + "fees": 1, + "tax": 0, + "notes": { + "name": "Saurav Kumar", + "roll_no": "IEC2011026" + }, + "linked_account_notes": [ + "roll_no" + ], + "on_hold": false, + "on_hold_until": null, + "settlement_status": "pending", + "recipient_settlement_id": null, + "created_at": 1649933574, + "processed_at": 1649933579, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_JJD536GI6wuz3m", + "source": null, + "metadata": null + } + } + ] +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the Payment for which transfers must be retrieved. + +### Parameters + +`id` +: `string` Unique identifier of the transfer. + +`entity` +: `string` The name of the entity. Here, it is `transfer`. + +`transfer_status` +: `string` The status of the transfer. Possible values are: + - `created` + - `pending` + - `processed` + - `failed` + - `reversed` + - `partially_reversed` + +`settlement_status` +: `string` The status of the settlement. Possible values are: + - `pending` + - `on_hold` + - `settled` + +`source` +: `string` Unique identifier of the transfer source. The source can be a `payment` or an `order`. + +`recipient` +: `string` Unique identifier of the transfer destination, that is, the Linked Account. + +`amount` +: `integer` The amount to be transferred to the Linked Account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`currency` +: `string` ISO currency code. We support route transfers only in `INR`. + +`amount_reversed` +: `integer` Amount reversed from this transfer for refunds. + +`notes` +: `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "Bangalore"`. + +`error` +: `string` Provides error details that may occur during transfers. + + `code` + : `string` Type of the error. + + `description` + : `string` Error description. + + `field` + : `string` Name of the parameter in the API request that caused the error. + + `source` + : `string` The point of failure in the specific operation. For example, customer, business and so on. + + `step` + : `string` The stage where the transaction failure occurred. Stages can be different depending on the payment method used to make the transaction. + + `id` + : `string` Unique identifier of the transfer. + + `reason` + : `string` The exact error reason. It can be handled programmatically. + +`linked_account_notes` +: `array` List of keys from the `notes` object which needs to be shown to Linked Accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + +`on_hold` +: `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + +`on_hold_until` +: `integer` Timestamp, in Unix format, indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + +`recipient_settlement_id` +: `string` Unique identifier of the settlement. + +`created_at` +: `integer` Timestamp, in Unix, at which the record was created. + +### Errors + +The api key/secret provided is invalid +* code: 4xx +* description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys. + +payment_id is not a valid id +* code: 400 +* description: This error occurs when you pass an invalid `payment_id` in the API endpoint. +* solution: Make sure to pass a vaild `payment_id`. diff --git a/llm-content/api/payments/route/fetch-with-id.md b/llm-content/api/payments/route/fetch-with-id.md new file mode 100644 index 00000000..15164978 --- /dev/null +++ b/llm-content/api/payments/route/fetch-with-id.md @@ -0,0 +1,315 @@ +--- +title: Fetch a Linked Account With ID +description: Fetch details of a Linked Account using the Razorpay API. +--- + +# Fetch a Linked Account With ID + +## Fetch a Linked Account With ID + +Use this endpoint to fetch details of a Linked Account using the unique identifier. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_SECRET] +-X GET 'https://api.razorpay.com/v2/accounts/acc_GLGeLkU2JUeyDZ' \ +``` + +### Response + +```json: Success +{ + "id":"acc_GLGeLkU2JUeyDZ", + "type":"route", + "reference_id":"123123", + "status":"created", + "email":"gaurav.kumar@example.org", + "profile":{ + "category":"healthcare", + "subcategory":"clinic", + "addresses":{ + "registered":{ + "street1":"507, Koramangala 1st block", + "street2":"MG Road", + "city":"Bengaluru", + "state":"KARNATAKA", + "postal_code":560034, + "country":"IN" + }, + "operation":{ + "street1":"507, Koramangala 6th block", + "street2":"Kormanagala", + "city":"Bengaluru", + "state":"KARNATAKA", + "country":"IN", + } + }, + "business_model":null + }, + "notes":[ + + ], + "created_at":1611136837, + "phone":"9999999998", + "business_type":"partnership", + "legal_business_name":"Acme Corp", + "customer_facing_business_name":"Acme Corp", + "legal_info":{ + "pan":"AAACL1234C", + "gst":"18AABCU9603R1ZM" + }, + "apps":{ + "websites":[ + + ], + "android":[ + { + "url":null, + "name":null + } + ], + "ios":[ + { + "url":null, + "name":null + } + ] + }, + "brand":{ + "color":null + }, + "contact_name":"Gaurav Kumar", + "contact_info":{ + "chargeback":{ + "email":null, + "phone":null, + "policy_url":null + }, + "refund":{ + "email":null, + "phone":null, + "policy_url":null + }, + "support":{ + "email":null, + "phone":null, + "policy_url":null + } + } +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Linked account does not exist", + "source":"", + "step":"", + "reason":"linked_account_id_does_not_exist", + "metadata":{ + + } + } +} +``` + +### Parameters + +`account_id` +: `string` The unique identifier of the Linked Account. For example, `acc_GLGeLkU2JUeyDZ`. + +### Parameters + +`id` +: `string` The unique identifier of the account generated by Razorpay. The maximum length is 18 characters. For example, `acc_GLGeLkU2JUeyDZ`. + +`type` +: `string` The account type. Possible value is `route`. + +`reference_id` +: `string` The internal reference id. This value can be maximum of 20 characters. For example, `123123`. + +`status` +: `string` The status of the account. Possible values: + - `created` + - `suspended` + +`email` +: `string` The account holder's email address. + +`phone` +: `integer` The account holder's phone number. The minimum length is 8 characters and the maximum length is 15. + +`legal_business_name` +: `string` The name of the account holder's business. For example, `Acme Corp`. The minimum length is 4 characters and the maximum length is 200. + +`business_type` +: `string` The type of business operated by the account holder. Possible values: [Business Types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md). + +`profile` +: `object` The account holder's business details. + + `category` + : `string` The business category of the account holder. For example, `healthcare`. Possible values: [Business Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md#business-category). + + `subcategory` + : `string` The business sub-category of the account holder. For example, `clinic`. Possible values: [Business Sub-Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md#business-sub-category). + + `addresses` + : `object` Details of account holder's address. + + `registered` + : `object` Details of the account holder's registered address. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 100. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. For example, for India, you must write either `IN` or `india`. + + `operation` + : `object` Details of the account holder's operational address. This parameter might be required to complete the KYC process. However, it is optional for this API. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 100. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. + +`business_model` + : `string` The business description. The minimum length is 1 character and the maximum length is 255. + + +`legal_info` +: `object` The legal details about the account holder's business. The mandatory [KYC requirement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md) parameters should be passed depending on the business requirements. + + `pan` + : `string` Valid PAN number details of the account holder's business. + - This is a 10-digit alphanumeric code. For example, `AVOJB1111K`. + - The 4th digit should be either of 'C', 'H', 'F', 'A', 'T', 'B', 'J', 'G', 'L'. + - The regex for Company PAN is `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`. This parameter might be required to complete the KYC process. However, it is optional for this API. + + `gst` + : `string` Valid GSTIN number details of the account holder. + - This is a 15-digit PAN-based unique identification number. + - The Regex for GSTIN is `/^[0123][0-9][a-z]{5}[0-9]{4}[a-z][0-9][a-z0-9][a-z0-9]$/gi`. + +`notes` +: `object` Contains user-defined fields stored by the partner for reference purposes. + +`contact_name` +: `string` The name of the contact. The minimum length is 4 and the maximum length is 255 characters. + +`contact_info` +: `object` Options available for contact support. + + `chargeback` + : `object` The type of contact support. + + `email` + : `string` The email id of chargeback POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of chargeback POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of chargeback policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. Only domain name is mandatory. + + `refund` + : `object` The type of contact support. + + `email` + : `string` The email id of refund POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of refund POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of refund policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `support` + : `array` The type of contact support. + + `email` + : `string` The email id of support POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of support POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of support policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + +`apps` +: `object` The app details of the account holder's business + + `websites` + : `array` The website/app for the account holder's business. A minimum of 1 website is required. + + `android` + : `array` Android app details + + `url` + : `string` The link of the Android app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` + : `string` The name of the Android app. + + `ios` + : `array` iOS app details + + `url` + : `string` The link of the iOS app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` + : `string` The name of the iOS app. + +### Errors + +The id provided does not exist +* code: 400 +* description: This error occurs when the Linked Account does not belong to the requested merchant, or it is invalid. +* solution: Ensure the Linked Account belongs to the requested merchant and the account ID is valid. + +Linked account does not exist. +* code: 400 +* description: This error occurs when the requester is not the parent of the child account, or the child account does not exist. +* solution: Ensure the Linked Account id exists before proceeding with the update API. diff --git a/llm-content/api/payments/route/linked-account-apis-beta.md b/llm-content/api/payments/route/linked-account-apis-beta.md new file mode 100644 index 00000000..89ab6ef7 --- /dev/null +++ b/llm-content/api/payments/route/linked-account-apis-beta.md @@ -0,0 +1,989 @@ +--- +title: Account APIs [beta] +description: Create accounts directly from your website/ app using Razorpay Account APIs. +--- + +# Account APIs [beta] + +Account APIs lets you dynamically create accounts with Razorpay directly from your site/app to quickly set a fully-functional payment ecosystem up and running. Our APIs use basic auth as authentication. Refer the [API Documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#authentication) section to know more. + +You can perform the following operations with the Account APIs: + +- [Create an Account](#create-an-account) +- [Fetch Accounts](#fetch-accounts) +- [Fetch Account by ID](#fetch-account-by-id) +- [Update bank account details](#update-bank-account-details) + +## Account Entity + +The account entity has the following fields. + +`name` +: `string` Name of the account holder. + +`email` +: `string` Email address of the account holder. + +`tnc_accepted` +: `boolean` Indicates if the terms and conditions have been accepted or not. + - `true`: Terms and conditions have been accepted. + - `false`: Terms and conditions have not been accepted. + +`business_name` +: `string` Your company name. + +`business_type` +: `string` Business type. Possible values: + - `llp` + - `ngo` + - `other` + - `individual` + - `partnership` + - `proprietorship` + - `public_limited` + - `private_limited` + - `trust`, `society` + - `not_yet_registered` + - `educational_institutes` + +`ifsc_code` +: `string` The ifsc code of your bank account. + +`beneficiary_name` +: `string` Name of the bank account holder. + +`account number` _mandatory_ +: `string` The bank account number. + +`account_type` +: `string` The bank account type. For example, Current. + +`id` +: `string` Razorpay account ID. For example `acc_gHQwerty123ggd`. + +`live` +: `boolean` Indicates if an account is live or not. + - `true`: Account is live. + - `false`: Account is not live. + +`managed` +: `boolean` Indicates if it is a Linked Account or not. + +`status` +: `string` Indicates the status of an account. Possible values: + - `activated` + - `not_activated` + - `verification_failed` (penny testing enabled) + - `verification_pending` (penny testing enabled) + +`can_submit` +: `boolean` Indicates if the activation fields have been filled up or not. Possible values: + - `true`: Activation fields are filled. + - `false`: Activation fields are not filled. + +`fields_pending` +: `array` Lists all the pending fields for activating the account. + +`transaction_report_email` +: `array` List of emails to which the transaction email report will be sent. + +`mobile` +: `integer` Company mobile number. + +`landline` +: `integer` Company landline number. + +`business_models` +: `string` The type of the business modes. Can accept these values: `B2B` or `B2C` or `B2B+B2C`. + +`registered_address` +: The registered address of the company. + + `address` + : `string` The registered company address, at the time of account creation. + + `city` + : `string` The name of the city in your business address. + + `state` + : `string` The name of the state in your business address. + + `pin` + : `integer` The pin code of the area in your business address. + +`operational_address` +: The operational address of the company. + + `address` + : `string` The current operational address of the company. + + `city` + : `string` The name of the city in your operational address. + + `state` + : `string` The name of the state in your operational address. + + `pin` + : `string` The pin code of the area in your operational address. + +`date_establishment` +: `integer` Date of establishment. + +`transaction_volume` +: `string` Expected annual transaction volume (INR). + +`average_transaction_size` +: `integer` Expected average transaction value. + +`cin` +: `string` Company CIN. + +`gstin` +: `string` GST Identification Number. + +`p_gstin` +: `string` Provisional GST Identification Number. + +`pan` +: `string` Company PAN. + +`pan_name` +: `string` Name of the account holder as given on PAN card. + +`promoter_pan` +: `string` PAN of any 1 authorized signatory/promoter/director. + +`promoter_pan_name` +: `string` Name on the promoter's PAN Card. + +`notes` +: `object` A key-value store present with every Razorpay entity like Account, Payment, Refund, etc. You can use this for storing additional data relating to the entity in a structured format. Refer [Notes section of API documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to learn more. + +`destination` +: `string` The Id of the bank account entity created. For example, ba_gHQwerty123ggd + +## Create an Account + +Use the following endpoint to create an account. + +beta/accounts + +### Sample Request and Response + +```curl: Sample Request +curl -XPOST 'https://api.razorpay.com/v1/beta/accounts' \ + -u [YOUR_KEY_ID]:[YOUR_SECRET] \ + -H "Content-type: application/json" \ + -d '{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "tnc_accepted":true, + "account_details":{ + "business_name":"Acme Corporation", + "business_type":"individual" + }, + "bank_account":{ + "ifsc_code":"HDFC0CAGSBK", + "beneficiary_name":"Gaurav Kumar", + "account_type":"current", + "account_number":1234567890123456 + } + }' +```json: Response +{ + "id": "acc_gHQwerty123ggd", + "entity": "account", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "live": false, + "managed": true, + "tnc_accepted": true, + "activation_details": { + "status": "activated", + "activated_at": 1513681274, + "can_submit": true, + "fields_pending": [ ] + }, + "secondary_emails": { + "transaction_report_email": [ ] + }, + "account_details": { + "mobile": null, + "landline": null, + "business_name": "Acme Corporation", + "business_type": "individual", + "business_model": null, + "registered_address": { + "address": null, + "city": null, + "state": null, + "pin": null + }, + "operational_address": { + "address": null, + "city": null, + "state": null, + "pin": null + }, + "date_established": null, + "transaction_volume": null, + "average_transaction_size": null, + "kyc_details": { + "cin": null, + "gstin": null, + "p_gstin": null, + "pan": null, + "pan_name": null, + "promoter_pan": null, + "promoter_pan_name": null, + "business_proof_file": null, + "address_proof_file": null + } + }, + "notes": { }, + "fund_transfer": { + "destination": "ba_9EhChhUhhXdHBv" + } +} +```json: Response - Penny testing enabled +{ + "id": "acc_gHQwerty123ggd", + "entity": "account", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "live": false, + "managed": true, + "tnc_accepted": true, + "activation_details": { + "status": "activated", + "bank_details_verification_error": null, + "activated_at": 1513681274, + "can_submit": true, + "fields_pending": [ ] + }, + "secondary_emails": { + "transaction_report_email": [ ] + }, + "account_details": { + "mobile": null, + "landline": null, + "business_name": "Acme Corporation", + "business_type": "individual", + "business_model": null, + "registered_address": { + "address": null, + "city": null, + "state": null, + "pin": null + }, + "operational_address": { + "address": null, + "city": null, + "state": null, + "pin": null + }, + "date_established": null, + "transaction_volume": null, + "average_transaction_size": null, + "kyc_details": { + "cin": null, + "gstin": null, + "p_gstin": null, + "pan": null, + "pan_name": null, + "promoter_pan": null, + "promoter_pan_name": null, + "business_proof_file": null, + "address_proof_file": null + } + }, + "notes": { }, + "fund_transfer": { + "destination": "ba_9EhChhUhhXdHBv" + } +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> All the JSON Input fields are mandatory in the request. +> + +## Fetch Accounts + +The below API is used for fetching the details of all the accounts. + +beta/accounts + +### Sample Request and Response + +The below API creates a Razorpay merchant account. + +```curl: cURL +curl -X GET 'https://api.razorpay.com/v1/beta/accounts' \ + -u [YOUR_KEY_ID]:[YOUR_SECRET] \ +```json: Response +{ + "entity":"collection", + "count":2, + "items":[ + { + "id":"acc_gHQwerty123ggd", + "entity":"account", + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "live":false, + "managed":true, + "tnc_accepted":true, + "activation_details":{ + "status":"activated", + "activated_at":1513681274, + "can_submit":true, + "fields_pending":[ + + ] + }, + "secondary_emails":{ + "transaction_report_email":[ + + ] + }, + "account_details":{ + "mobile":null, + "landline":null, + "business_name":"Acme Corporation", + "business_type":"individual", + "paymentdetails":null, + "business_model":null, + "registered_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "operational_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "date_established":null, + "transaction_volume":null, + "average_transaction_size":null, + "kyc_details":{ + "cin":null, + "gstin":null, + "p_gstin":null, + "pan":null, + "pan_name":null, + "promoter_pan":null, + "promoter_pan_name":null, + "business_proof_file":null, + "address_proof_file":null + } + }, + "notes":{ + "merchant_data_1":"some string" + }, + "fund_transfer":{ + "destination":"ba_9EhChhUhhXdHBv" + } + }, + { + "id":"acc_fHQwerty123ffe", + "entity":"account", + "name":"John Appleseed", + "email":"johnappleseed@gmail.com", + "live":true, + "managed":true, + "tnc_accepted":true, + "activation_details":{ + "status":"activated", + "activated_at":1513681274, + "can_submit":true, + "fields_pending":[ + + ] + }, + "secondary_emails":{ + "transaction_report_email":[ + + ] + }, + "account_details":{ + "mobile":null, + "landline":null, + "business_name":"XYZ software solutions", + "business_type":"partnership", + "paymentdetails":null, + "business_model":null, + "registered_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "operational_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "date_established":null, + "transaction_volume":null, + "average_transaction_size":null, + "kyc_details":{ + "cin":null, + "gstin":null, + "p_gstin":null, + "pan":null, + "pan_name":null, + "promoter_pan":null, + "promoter_pan_name":null, + "business_proof_file":null, + "address_proof_file":null + } + }, + "notes":{ + "merchant_data_1":"some id" + }, + "fund_transfer":{ + "destination":"ba_9FiDasQoewhnrs" + } + } + ] +} +```json: Response - Penny testing enabled +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "acc_gHQwerty123ggd", + "entity": "account", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "live": false, + "managed": true, + "tnc_accepted": true, + "activation_details": { + "status": "activated", + "bank_details_verification_error": null, + "activated_at": 1513681274, + "can_submit": true, + "fields_pending": [ ] + }, + "secondary_emails": { + "transaction_report_email": [ ] + }, + "account_details": { + "mobile": null, + "landline": null, + "business_name": "Acme Corporation", + "business_type": "individual", + "paymentdetails": null, + "business_model": null, + "registered_address": { + "address": null, + "city": null, + "state": null, + "pin": null + }, + "operational_address": { + "address": null, + "city": null, + "state": null, + "pin": null + }, + "date_established": null, + "transaction_volume": null, + "average_transaction_size": null, + "kyc_details": { + "cin": null, + "gstin": null, + "p_gstin": null, + "pan": null, + "pan_name": null, + "promoter_pan": null, + "promoter_pan_name": null, + "business_proof_file": null, + "address_proof_file": null + } + }, + "notes": { + "merchant_data_1": "some string" + }, + "fund_transfer": { + "destination": "ba_9EhChhUhhXdHBv" + } + }, + { + "id": "acc_fHQwerty123ffe", + "entity": "account", + "name": "John Appleseed", + "email": "johnappleseed@gmail.com", + "live": true, + "managed": true, + "tnc_accepted": true, + "activation_details": { + "status": "verfication_pending", + "bank_details_verification_error": null, + "activated_at": 1513681274, + "can_submit": true, + "fields_pending": [ ] + }, + "secondary_emails": { + "transaction_report_email": [ ] + }, + "account_details": { + "mobile": null, + "landline": null, + "business_name": "XYZ software solutions", + "business_type": "partnership", + "paymentdetails": null, + "business_model": null, + "registered_address": { + "address": null, + "city": null, + "state": null, + "pin": null + }, + "operational_address": { + "address": null, + "city": null, + "state": null, + "pin": null + }, + "date_established": null, + "transaction_volume": null, + "average_transaction_size": null, + "kyc_details": { + "cin": null, + "gstin": null, + "p_gstin": null, + "pan": null, + "pan_name": null, + "promoter_pan": null, + "promoter_pan_name": null, + "business_proof_file": null, + "address_proof_file": null + } + }, + "notes": { + "merchant_data_1": "some id" + }, + "fund_transfer": { + "destination": "ba_9FiDasQoewhnrs" + } + } + ] +} +``` + +## Fetch Account by ID + +The below API is used for fetching details of an account by ID. + +beta/accounts/:id + +### Sample Request and Response + +The below API fetches the details of a Razorpay merchant account. + +```curl:cURL +curl -XGET \ +'https://api.razorpay.com/v1/beta/accounts/acc_gHQwerty123ggd' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +```json: Response +{ + "id":"acc_gHQwerty123ggd", + "entity":"account", + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "live":false, + "managed":true, + "tnc_accepted":true, + "activation_details":{ + "status":"activated", + "activated_at":1513681274, + "can_submit":true, + "fields_pending":[ + + ] + }, + "secondary_emails":{ + "transaction_report_email":[ + + ] + }, + "account_details":{ + "mobile":null, + "landline":null, + "business_name":"Acme Corporation", + "business_type":"individual", + "paymentdetails":null, + "business_model":null, + "registered_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "operational_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "date_established":null, + "transaction_volume":null, + "average_transaction_size":null, + "kyc_details":{ + "cin":null, + "gstin":null, + "p_gstin":null, + "pan":null, + "pan_name":null, + "promoter_pan":null, + "promoter_pan_name":null, + "business_proof_file":null, + "address_proof_file":null + } + }, + "notes":{ + "merchant_data_1":"some string" + }, + "fund_transfer":{ + "destination":"ba_9EhChhUhhXdHBv" + } +} +```json: Response - Penny testing Enabled +{ + "id":"acc_JMJ6qeTz3t2ukr", + "entity":"account", + "name":"Test PT 1", + "email":"f20150054h@alumni.bits-pilani.ac.in", + "live":true, + "managed":true, + "tnc_accepted":true, + "activation_details":{ + "status":"verification_failed", + "activated_at":null, + "can_submit":true, + "bank_details_verification_error":"KC03: INVALID BENEFICIARY ACCOUNT \/ IFSC", + "fields_pending":[ + + ] + }, + "secondary_emails":{ + "transaction_report_email":[ + "f20150054h@alumni.bits-pilani.ac.in" + ] + }, + "account_details":{ + "mobile":null, + "landline":null, + "business_name":"Test PT 1", + "business_type":"private_limited", + "paymentdetails":null, + "business_model":null, + "registered_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "operational_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "date_established":null, + "transaction_volume":null, + "average_transaction_size":null, + "kyc_details":{ + "cin":null, + "gstin":null, + "p_gstin":null, + "pan":null, + "pan_name":null, + "promoter_pan":null, + "promoter_pan_name":null, + "business_proof_file":null, + "address_proof_file":null + } + }, + "notes":[ + + ], + "fund_transfer":{ + "destination":"ba_JMJ6qju5KecEHu" + }, + "dashboard_access":true, + "allow_reversals":false +} +``` + +## Update Bank Account Details + +Use the following endpoint to update bank account details of the Linked Account. + +beta/accounts/:id/bank_account + +```curl: Request +curl -XPATCH 'api.razorpay.com/v1/beta/accounts/:id/bank_account' \ + -u [YOUR_KEY_ID]:[YOUR_SECRET] \ + -H "Content-type: application/json" \ + -d '{ + "beneficiary_name":"Gaurav Kumar", + "account_number":"1234567890123456", + "ifsc_code":"HDFC0CAGSBK" +}' +```json: Response +{ + "status":"activated", + "beneficiary_name":"Madishetty Saketh", + "account_number":"41390812314", + "ifsc_code":"ADCC0000014" +} +```json: Response - Penny testing enabled +{ + "status":"verification_pending", + "beneficiary_name":"Madishetty Saketh", + "account_number":"41390812314", + "ifsc_code":"ADCC0000014" +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the Linked Account. + +### Request Parameters + +`beneficiary_name` _mandatory_ +: `string` Beneficiary account name. + +`account number` _mandatory_ +: `string` The bank account number. + +`ifsc_code` _mandatory_ +: `string` The ifsc code of your bank account. + +### Response Parameters + +`status` +: `string` Indicates the status of a Linked Account. Possible values: + - `activated` + - `verification_failed` (penny testing enabled) + - `verification_pending` (penny testing enabled) + +`beneficiary_name` +: `string` Beneficiary account name. + +`account number` +: `string` The bank account number. + +`ifsc_code` +: `string` The ifsc code of your bank account. + +## Webhooks + +The `account.updated` event is triggered for the Penny testing enabled Linked Accounts when the bank verification of the account fails or is successful. + +### Sample Payload + +The sample payload of the `account.updated` event is given below. + +```json: verification_failed +{ + "entity":"event", + "account_id":"acc_JxAdv7oWTvEleH", + "event":"account.updated", + "contains":[ + "account", + "bank_account" + ], + "payload":{ + "account":{ + "entity":{ + "id":"acc_JxAdv7oWTvEleH", + "entity":"account", + "name":"Madishetty Saketh", + "email":"siddharth.arora+1@razorpay.com", + "live":true, + "managed":true, + "tnc_accepted":true, + "activation_details":{ + "status":"verification_failed", + "activated_at":null, + "can_submit":true, + "bank_details_verification_error":"KC03: INVALID BENEFICIARY ACCOUNT \/ IFSC", + "fields_pending":[ + + ] + }, + "secondary_emails":{ + "transaction_report_email":[ + "siddharth.arora+1@razorpay.com" + ] + }, + "account_details":{ + "mobile":null, + "landline":null, + "business_name":"Madishetty Saketh", + "business_type":"private_limited", + "paymentdetails":null, + "business_model":null, + "registered_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "operational_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "date_established":null, + "transaction_volume":null, + "average_transaction_size":null, + "kyc_details":{ + "cin":null, + "gstin":null, + "p_gstin":null, + "pan":null, + "pan_name":null, + "promoter_pan":null, + "promoter_pan_name":null, + "business_proof_file":null, + "address_proof_file":null + } + }, + "notes":[ + + ], + "fund_transfer":{ + "destination":"ba_JxC2Ko0kZWRBGb" + }, + "dashboard_access":false, + "allow_reversals":false + } + }, + "bank_account":{ + "entity":{ + "id":"ba_JxC2Ko0kZWRBGb", + "entity":"bank_account", + "ifsc":"HDFC0004342", + "bank_name":"HDFC Bank", + "name":"Madishetty Saketh", + "notes":[ + + ], + "account_number":"0123456789" + } + } + }, + "created_at":1658659082 +} +```json: verification_successful +{ + "entity":"event", + "account_id":"acc_JxAdv7oWTvEleH", + "event":"account.updated", + "contains":[ + "account", + "bank_account" + ], + "payload":{ + "account":{ + "entity":{ + "id":"acc_JxAdv7oWTvEleH", + "entity":"account", + "name":"Madishetty Saketh", + "email":"siddharth.arora+1@razorpay.com", + "live":true, + "managed":true, + "tnc_accepted":true, + "activation_details":{ + "status":"activated", + "activated_at":1658658648, + "can_submit":true, + "bank_details_verification_error":"", + "fields_pending":[ + + ] + }, + "secondary_emails":{ + "transaction_report_email":[ + "siddharth.arora+1@razorpay.com" + ] + }, + "account_details":{ + "mobile":null, + "landline":null, + "business_name":"Madishetty Saketh", + "business_type":"private_limited", + "paymentdetails":null, + "business_model":null, + "registered_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "operational_address":{ + "address":null, + "city":null, + "state":null, + "pin":null + }, + "date_established":null, + "transaction_volume":null, + "average_transaction_size":null, + "kyc_details":{ + "cin":null, + "gstin":null, + "p_gstin":null, + "pan":null, + "pan_name":null, + "promoter_pan":null, + "promoter_pan_name":null, + "business_proof_file":null, + "address_proof_file":null + } + }, + "notes":[ + + ], + "fund_transfer":{ + "destination":"ba_JxEpIAhUyVbcvc" + }, + "dashboard_access":false, + "allow_reversals":false + } + }, + "bank_account":{ + "entity":{ + "id":"ba_JxEpIAhUyVbcvc", + "entity":"bank_account", + "ifsc":"HDFC0004342", + "bank_name":"HDFC Bank", + "name":"Madishetty Saketh", + "notes":[ + + ], + "account_number":"50100285259544" + } + } + }, + "created_at":1658673286 +} +``` diff --git a/llm-content/api/payments/route/linked-account-entity.md b/llm-content/api/payments/route/linked-account-entity.md new file mode 100644 index 00000000..731459e4 --- /dev/null +++ b/llm-content/api/payments/route/linked-account-entity.md @@ -0,0 +1,273 @@ +--- +title: Linked Account Entity +description: Know about linked account entity parameters and their description. +--- + +# Linked Account Entity + +## Linked Account Entity + +The Linked Account entity has the following parameters. + +### Response + +```json: Entity +{ + "id":"acc_GRWKk7qQsLnDjX", + "type":"route", + "reference_id":"123123", + "status":"created", + "email":"gauri.kumar@example.org", + "profile":{ + "category":"healthcare", + "subcategory":"clinic", + "addresses":{ + "registered":{ + "street1":"507, Koramangala 1st block", + "street2":"MG Road", + "city":"Bengaluru", + "state":"KARNATAKA", + "postal_code":560034, + "country":"IN" + }, + "operation":{ + "street1":"507, Koramangala 6th block", + "street2":"Kormanagala", + "city":"Bengaluru", + "state":"KARNATAKA", + "country":"IN", + "postal_code":560047 + } + }, + "business_model":"Online Clothing ( men, women, ethnic, modern ) fashion and lifestyle, accessories, t-shirt, shirt, track pant, shoes." + }, + "notes":{ + + }, + "created_at":1611136837, + "phone":"9999999998", + "business_type":"partnership", + "legal_business_name":"Acme Corp", + "customer_facing_business_name":"Acme Corp", + "legal_info":{ + "pan":"AAACL1234C", + "gst":"18AABCU9603R1ZM" + }, + "apps":{ + "websites":[ + "https://www.example.org" + ], + "android":[ + { + "url":"playstore.example.org", + "name":"Example" + } + ], + "ios":[ + { + "url":"appstore.example.org", + "name":"Example" + } + ] + }, + "brand":{ + "color":"#FFFFFF" + }, + "contact_name":"Gaurav Kumar", + "contact_info":{ + "chargeback":{ + "email":"cb@example.org", + "phone":null, + "policy_url":null + }, + "refund":{ + "email":"cb@example.org", + "phone":null, + "policy_url":null + }, + "support":{ + "email":"support@example.org", + "phone":"9999999998", + "policy_url":"https://www.google.com" + } + } +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the account generated by Razorpay. The maximum length is 18 characters. For example, `acc_GLGeLkU2JUeyDZ`. + +`type` +: `string` The account type. Possible value is `route`. + +`reference_id` +: `string` The internal reference ID. This value can be maximum of 20 characters. For example, `123123`. + +`status` +: `string` The status of the account. Possible values: + - `created` + - `suspended` + +`email` +: `string` The account holder's email address. + +`phone` +: `integer` The account holder's phone number. The minimum length is 8 characters and the maximum length is 15. + +`legal_business_name` +: `string` The name of the account holder's business. For example, `Acme Corp`. The minimum length is 4 characters and the maximum length is 200. + +`business_type` +: `string` The type of business operated by the account holder. Possible values: See [Business Types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/integration-guide.md#business-type). + +`profile` +: `object` The account holder's business details. + + `category` + : `string` The business category of the account holder. For example, `healthcare`. Possible values: See [Business Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/integration-guide.md#business-category). + + `subcategory` + : `string` The business sub-category of the account holder. For example, `clinic`. Possible values: See [Business Sub-Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/integration-guide.md#business-sub-category). + + `addresses` + : `object` Details of account holder's address. + + `registered` + : `object` Details of the account holder's registered address. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 100. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + + `operation` + : `object` Details of the account holder's operational address. This parameter might be required to complete the KYC process. However, it is optional for this API. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 100. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. [List of supported Countries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#country-list). + +`business_model` + : `string` The business description. The minimum length is 1 character and the maximum length is 255. + +`legal_info` +: `object` The legal details about the account holder's business. The mandatory [KYC requirement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md) parameters should be passed depending on the business requirements. + + `pan` + : `string` Valid PAN number details of the account holder's business. + - This is a 10-digit alphanumeric code. For example, `AVOJB1111K`. + - The 4th digit should be either of 'C', 'H', 'F', 'A', 'T', 'B', 'J', 'G', 'L'. + - The regex for Company PAN is `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`. This parameter might be required to complete the KYC process. However, it is optional for this API. + + `gst` + : `string` Valid GSTIN number details of the account holder. + - This is a 15-digit PAN-based unique identification number. + - The Regex to validate GSTIN is `/^[0123][0-9][a-z]{5}[0-9]{4}[a-z][0-9][a-z0-9][a-z0-9]$/gi`. + +`notes` +: `object` Contains user-defined fields stored by the partner for reference purposes. + +`contact_name` +: `string` The name of the contact. The minimum length is 4 and the maximum length is 255 characters. + +`contact_info` +: `object` Options available for contact support. + + `chargeback` + : `object` The type of contact support. + + `email` + : `string` The email id of chargeback POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of chargeback POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of chargeback policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. Only domain name is mandatory. + + `refund` + : `object` The type of contact support. + + `email` + : `string` The email id of refund POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of refund POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of refund policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `support` + : `array` The type of contact support. + + `email` + : `string` The email id of support POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. The total character length supported is 132. + + `phone` + : `integer` The phone number of support POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of support policy. Regex is (protocol://``:port/resource path?querystring#fragementid) protocol-both http/https allowed. + +`apps` +: `object` The app details of the account holder's business + + `websites` + : `array` The website/app for the account holder's business. A minimum of 1 website is required. + + `android` + : `array` Android app details + + `url` + : `string` The link of the Android app. Regex is (protocol://``:port/resource path?querystring#fragementid) protocol-both http/https allowed. + + `name` + : `string` The name of the Android app. + + `ios` + : `array` iOS app details + + `url` + : `string` The link of the iOS app. Regex is (protocol://``:port/resource path?querystring#fragementid) protocol-both http/https allowed. + + `name` + : `string` The name of the iOS app. diff --git a/llm-content/api/payments/route/modify-settlement-hold.md b/llm-content/api/payments/route/modify-settlement-hold.md new file mode 100644 index 00000000..a09cf14f --- /dev/null +++ b/llm-content/api/payments/route/modify-settlement-hold.md @@ -0,0 +1,256 @@ +--- +title: Modify Settlement Hold for Transfers +description: Modify Settlement Hold for Transfers using the Razorpay API. +--- + +# Modify Settlement Hold for Transfers + +## Modify Settlement Hold for Transfers + +Use this endpoint to modify the settlement configuration for a particular `transfer_id`. On a successful request, the API responds with the modified transfer entity. + +### Request + +```curl: Curl +curl -X PATCH https://api.razorpay.com/v1/transfers/trf_JJD536GI6wuz3m \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H 'content-type: application/json' \ +-d '{ + "on_hold": true, + "on_hold_until": 1679691505 +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String transferId = "trf_JJD536GI6wuz3m"; + +JSONObject transferRequest = new JSONObject(); +transferRequest.put("on_hold",true); +transferRequest.put("on_hold_until",1679691505); + +Transfer transfer = razorpay.transfers.edit(transferId,transferRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->transfer->fetch($paymentId)->edit(array('on_hold' => true, 'on_hold_until' => '1679691505')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.transfers.edit(paymentId,{ + "on_hold": true, + "on_hold_until": "1679691505" +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.transfer.edit(transferId,{ + "on_hold": True, + "on_hold_until": "1679691505" +}) +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_EAeSM2Xul8xYRo" + +para_attr = { + "on_hold": "1", + "on_hold_until": "1679691505" +} +Razorpay::Transfer.fetch(transferId).edit(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "on_hold": true, + "on_hold_until": 1649971331, +} +body, err := client.Transfer.Edit("", data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] +"); + +string transferId = "trf_EB17rqOUbzSCEE"; + +Dictionary transferRequest = new Dictionary(); +transferRequest.Add("on_hold",true); +transferRequest.Add("on_hold_until",1679691505); + +Transfer transfer = client.Transfer.Fetch(transferId).Edit(transferRequest); +``` + +### Response + +```json: Success +{ + "id": "trf_JJD536GI6wuz3m", + "entity": "transfer", + "status": "processed", + "source": "pay_JGmCgTEa9OTQcX", + "recipient": "acc_IRQWUleX4BqvYn", + "amount": 300, + "currency": "INR", + "amount_reversed": 0, + "fees": 1, + "tax": 0, + "notes": { + "name": "Saurav Kumar", + "roll_no": "IEC2011026" + }, + "linked_account_notes": [ + "roll_no" + ], + "on_hold": true, + "on_hold_until": 1649971331, + "settlement_status": "on_hold", + "recipient_settlement_id": null, + "created_at": 1649933574, + "processed_at": 1649933579, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_JJD536GI6wuz3m", + "source": null, + "metadata": null + } +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the transfer for which settlement configurations should be modified. + +### Parameters + +`on_hold` _mandatory_ +: `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Put the transfer settlement on hold. + - `false`: Releases the settlement. +For example, if the settlement schedule is T+10 days, a transfer made with `on_hold` set to true will not be settled even after 10 days, as it is on hold. If the hold is disabled on `T+15` day, the amount will be settled to the Linked Account by the next working day. + +`on_hold_until` _optional_ +: `integer` Timestamp, in Unix, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. For example, if a transfer is created with `on_hold_until` timestamp defined as `1583991784`, the settlement will be held off until the specified time period. The amount will be settled to the Linked Account only on the next day. + +### Parameters + +`id` +: `string` Unique identifier of the transfer. + +`entity` +: `string` The name of the entity. Here, it is `transfer`. + +`transfer_status` +: `string` The status of the transfer. Possible values are: + - `created` + - `pending` + - `processed` + - `failed` + - `reversed` + - `partially_reversed` + +`settlement_status` +: `string` The status of the settlement. Possible values are: + - `pending` + - `on_hold` + - `settled` + +`source` +: `string` Unique identifier of the transfer source. The source can be a `payment` or an `order`. + +`recipient` +: `string` Unique identifier of the transfer destination, that is, the Linked Account. + +`amount` +: `integer` The amount to be transferred to the Linked Account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`currency` +: `string` ISO currency code. We support route transfers only in `INR`. + +`amount_reversed` +: `integer` Amount reversed from this transfer for refunds. + +`notes` +: `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "Bangalore"`. + +`error` +: `string` Provides error details that may occur during transfers. + + `code` + : `string` Type of the error. + + `description` + : `string` Error description. + + `field` + : `string` Name of the parameter in the API request that caused the error. + + `source` + : `string` The point of failure in the specific operation. For example, customer, business and so on. + + `step` + : `string` The stage where the transaction failure occurred. Stages can be different depending on the payment method used to make the transaction. + + `id` + : `string` Unique identifier of the transfer. + + `reason` + : `string` The exact error reason. It can be handled programmatically. + +`linked_account_notes` +: `array` List of keys from the `notes` object which needs to be shown to Linked Accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + +`on_hold` +: `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + +`on_hold_until` +: `integer` Timestamp, in Unix format, indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + +`recipient_settlement_id` +: `string` Unique identifier of the settlement. + +`created_at` +: `integer` Timestamp, in Unix, at which the record was created. + +### Errors + +The api key/secret provided is invalid +* code: 4xx +* description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys. + +The amount must be at least INR 1.00 +* code: 400 +* description: This error occurs when the amount is less than the minimum amount. The transaction amount expressed in the currency subunit, such as paise (in INR) should always be greater than or equal to ₹1. +* solution: Make sure the amount is equal to or greater than the minimum amount of ₹1. + +transfer_id is not a valid id +* code: 400 +* description: This error occurs when you pass an invalid `transfer_id` in the API endpoint. +* solution: Make sure to pass a vaild `transfer_id`. diff --git a/llm-content/api/payments/route/product-configuration-entity.md b/llm-content/api/payments/route/product-configuration-entity.md new file mode 100644 index 00000000..3b71cac8 --- /dev/null +++ b/llm-content/api/payments/route/product-configuration-entity.md @@ -0,0 +1,148 @@ +--- +title: Product Configuration Entity +description: Know about product configuration entity parameters and their description. +--- + +# Product Configuration Entity + +## Product Configuration Entity + +The Product Configuration entity has the following parameters. + +### Response + +```json: Entity +{ + "requested_configuration":[ + + ], + "active_configuration":{ + "settlements":{ + "account_number":"1234567890", + "ifsc_code":"HDFC0000317", + "beneficiary_name":"Gaurav Kumar" + } + }, + "requirements":[ + { + "field_reference":"settlements.account_number", + "resolution_url":"/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e", + "reason_code":"field_missing", + "status":"required" + }, + { + "field_reference":"settlements.ifsc", + "resolution_url":"/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e", + "reason_code":"field_missing", + "status":"required" + }, + { + "field_reference":"kyc.pan", + "resolution_url":"/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e", + "reason_code":"kyc_failed", + "status":"required" + }, + { + "field_reference":"settlements.beneficiary_name", + "resolution_url":"/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e", + "reason_code":"field_missing", + "status":"required" + } + ], + "tnc":{ + "id":"tnc_IgohZaDBHRGjPv", + "accepted":true, + "accepted_at":1641550798 + }, + "id":"acc_prd_HEgNpywUFctQ9e", + "account_id":"acc_HQVlm3bnPmccC0", + "product_name":"route", + "activation_status":"needs_clarification", + "requested_at":1605181524 +} +``` + +### Parameters + +`id` +: `string` The unique identifier of a product generated by Razorpay. This id is used to fetch or update a product. + +`product_name` +: `string` The product(s) to be configured. Possible values: + - `Route` + +`tnc_accepted` +: `object` It consists of the configuration for the accepted terms and conditions by the merchant for the requested product. If the terms and conditions are accepted by the user for the requested product, it would consist of following fields: + + `id` + : `string` The unique identifier representing the acceptance of terms and conditions for a product by a user. + + `accepted` + : `boolean` The flag that represents whether the terms and conditions are accepted by the user. + - `true`: Terms and conditions are accepted by user. + - `false`: Terms and conditions are not accepted by user. + + `accepted_at` + : `integer` The Unix timestamp at which the terms and conditions were accepted by the user for the requested product. + +`requested_configuration` +: `object` The configuration of the product requested by the user that is yet to be set as active. + +`active_configuration` +: `object` The configuration of the product that has been set as active. + + `settlements` + : `object` The Settlement settings object. + + + + `account_number` + : `string` The bank account number to which settlements are made. Account details can be found on the Dashboard. For example, `7878780080310012`. + + `ifsc_code` + : `string` The IFSC associated with the bank account. For example, `RATN0VAAPIS`. + + + + + + `beneficiary_name` + : `string` The name of the beneficiary associated with the bank account. This API parameter is needed to complete the KYC process. However, it is optional for this API. + +`requirements` +: `object` The list of requirements to be enabled for this product or some of the configurations under this product. + + `field_reference` + : `string` The field which is in issue or missing. The JSON key path in resolution URL. + + `resolution_url` + : `string` The URL to address the requirement. The API endpoint to be used for updating missing fields or documents. + + `status` + : `string` The status of the requirement. + + `reason_code` + : `string` The reason code for showing in the requirement. Possible values are: + - `field_missing` + - `needs_clarification` + - `document_missing` + +`id` +: `string` The unique identifier of the account generated by Razorpay. For example, `acc_prd_K1eopFF8G21tux`. The product is created for this account id. + +`account_id` +: `string` The unique identifier generated by Razorpay. For example, `acc_K1em7bWYEiwmnc`. + +`product_name` +: `string` The product(s) to be configured. Here it is `route`. + +`activation_status` +: `string` The status of the product activation. + - `requested` + - `needs_clarification` + - `under_review` + - `activated` + - `suspended` + +`requested_at` +: `integer` The Unix timestamp at which the product configuration has been requested. diff --git a/llm-content/api/payments/route/refund-payments-and-reverse-transfer.md b/llm-content/api/payments/route/refund-payments-and-reverse-transfer.md new file mode 100644 index 00000000..d90dca57 --- /dev/null +++ b/llm-content/api/payments/route/refund-payments-and-reverse-transfer.md @@ -0,0 +1,203 @@ +--- +title: Refund Payments and Reverse Transfer from a Linked Account +description: Refund Payments and reverse Transfer from a Linked Account using the Razorpay API. +--- + +# Refund Payments and Reverse Transfer from a Linked Account + +## Refund Payments and Reverse Transfer from a Linked Account + +Use this endpoint to create refunds on a particular `payment_id`. + +- The amount is deducted from your main account balance when refunding a payment. You can set the `reverse_all` parameter to `true` in the refund POST request to recover the amount from the Linked Account. This will recover the amount for every transfer made on the payment before processing the refund to the customer. + +- You can automate reversals with the `reverse_all` parameter in the following refund scenarios: + - Full refund + - Partial refund for a payment transferred to a single account. + +> **WARN** +> +> +> **Watch Out!** +> +> For partial refunds on a payment transferred to multiple accounts, the `reverse_all` parameter cannot be applied since Razorpay cannot determine which transfer to reverse partially. You will have to use the transfer reversal API to reverse this payment. +> + +A new `reversal` entity is created internally and linked for every `reversal` defined by the `transfer_id`. + +### Request + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/payments/pay_JJCqynf4fQS0N1/refund \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type: application/json' +-d '{ + "amount": 100, + "reverse_all": true +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_JJCqynf4fQS0N1"; + +JSONObject params = new JSONObject(); +params.put("amount",100); +params.put("reverse_all",true); + +Refund payment = razorpay.payments.refund(paymentId,params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId)->refund(array('amount'=> '100','reverse_all'=> true)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.refund(paymentId,{ + amount : 100, + reverse_all : true +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.refund(paymentId, {"amount": 100, "reverse_all": True}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_JJCqynf4fQS0N1" + +para_attr = { + "amount" : 100, + "reverse_all" : 1 +} + +Razorpay::Payment.fetch(paymentId).refund(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "reverse_all": true, +} +body, err := client.Payment.Refund("", , data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] +"); + +String paymentId = "pay_EAdwQDe4JrhOFX"; + +Dictionary param = new Dictionary(); +param.Add("amount",100); +param.Add("reverse_all",true); + +Refund transfer = client.Payment.Fetch("pay_MZS53duPD7FNd1").Refund(param); +``` + +### Response + +```json: Success +{ + "id": "rfnd_JJFNlNXPHY640A", + "entity": "refund", + "amount": 100, + "currency": "INR", + "payment_id": "pay_JJCqynf4fQS0N1", + "notes": [], + "receipt": null, + "acquirer_data": { + "arn": null + }, + "created_at": 1649941680, + "batch_id": null, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "normal" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` A unique identifier of the payment that should be refunded. + +### Parameters + +`amount` _mandatory_ +: `string` The amount of refund in the smallest unit of currency. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`reverse_all` _optional_ +: `boolean` Reverses transfer made to a linked account. Possible values: + - `true`: Reverses transfer made to a linked account. + - `false`: Does not reverse transfer made to a linked account. + +### Parameters + +`id` +: `string` Unique identifier of the refund. + +`entity` +: `string` Indicates the type of entity. Here, it is `refund`. + +`amount` +: `integer` The amount of refund in the smallest unit of currency. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`currency` +: `string` The currency of refund. Currently, only INR is supported. + +`payment_id` +: `string` Unique identifier of the payment for which this refund has been requested. + +`created_at` +: `integer` Timestamp, in Unix, of refund creation. + +`notes` +: `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. + +`receipt` +: `string` Unique identifier that you can use for internal reference. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + +### Errors + +The api key/secret provided is invalid +* code: 4xx +* description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys. + +The sum of amount requested for refund is greater than the available amount +* code: 400 +* description: This error occurs when the total transferred amount exceeds the payment amount. +* solution: Make sure to check the amount passed with the payment made. + +The amount must be at least INR 1.00 +* code: 400 +* description: This error occurs when the amount is less than the minimum amount. The transaction amount expressed in the currency subunit, such as paise (in INR) should always be greater than or equal to ₹1. +* solution: Make sure the amount is equal to or greater than the minimum amount of ₹1. + +payment_id is not a valid id +* code: 400 +* description: This error occurs when you pass an invalid `payment_id` in the API endpoint. +* solution: Make sure to pass a vaild `payment_id`. diff --git a/llm-content/api/payments/route/request-product-config.md b/llm-content/api/payments/route/request-product-config.md new file mode 100644 index 00000000..4a97d31e --- /dev/null +++ b/llm-content/api/payments/route/request-product-config.md @@ -0,0 +1,281 @@ +--- +title: Request a Product Configuration +description: Request a product configuration using the Razorpay API. +--- + +# Request a Product Configuration + +## Request a Product Configuration + +Use this endpoint to request a product configuration. + +### Request + +```Curl: Curl +curl -X POST https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products \ +-u : \ +-H "Content-Type: application/json" \ +-d '{ + "product_name":"route", + "tnc_accepted":true +}' + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String accountId = "acc_HQVlm3bnPmccC0"; + +JSONObject productRequest = new JSONObject(); +productRequest.put("product_name","route"); +productRequest.put("tnc_accepted",true); + +Account product = instance.product.requestProductConfiguration(accountId, productRequest); + +```python: Python + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +accountId = "acc_HQVlm3bnPmccC0" + +client.product.requestProductConfiguration(accountId, { + "product_name" : "route", + "tnc_accepted" : True +}) + +```php: PHP + +$api = new Api($key_id, $secret); + +$accountId = "acc_HQVlm3bnPmccC0"; + +$api->account->fetch($accountId)->products()->requestProductConfiguration(array( + "product_name" => "route", + "tnc_accepted" => true +)); + +```csharp: .NET + +RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + +string accountId = "acc_HQVlm3bnPmccC0"; + +Dictionary productRequest = new Dictionary(); +productRequest.Add("product_name", "route"); +productRequest.Add("tnc_accepted", true); + +Product product = client.Product.Create(productRequest); + +```ruby: Ruby + +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +accountId = "acc_HQVlm3bnPmccC0" + +Razorpay::Product.request_product_configuration(accountId, { + "product_name": "route", + "tnc_accepted": true +}) + +```javascript: Node.js + +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var accountId = "acc_HQVlm3bnPmccC0"; + +instance.products.requestProductConfiguration(accountId, { + "product_name" : "route", + "tnc_accepted" : true +}); + +```go: Go + +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +accountId := "acc_HQVlm3bnPmccC0" + +data := map[string]interface{}{ + "product_name" : "route", + "tnc_accepted" : true +} + +body, err := client.Product.RequestProductConfiguration(accountId, data, nil); +``` + +### Response + +```json: Success +{ + "requested_configuration":[ + + ], + "active_configuration":{ + "settlements":{ + "account_number": 7878780080310012, + "ifsc_code":"RATN0VAAPIS", + "beneficiary_name":"" + } + }, + "requirements":[ + { + "field_reference":"settlements.beneficiary_name", + "resolution_url":"/accounts/acc_K1em7bWYEiwmnc/products/acc_prd_K1eopFF8G21tux", + "reason_code":"field_missing", + "status":"required" + }, + { + "field_reference":"settlements.account_number", + "resolution_url":"/accounts/acc_K1em7bWYEiwmnc/products/acc_prd_K1eopFF8G21tux", + "reason_code":"field_missing", + "status":"required" + }, + { + "field_reference":"settlements.ifsc_code", + "resolution_url":"/accounts/acc_K1em7bWYEiwmnc/products/acc_prd_K1eopFF8G21tux", + "reason_code":"field_missing", + "status":"required" + } + ], + "tnc":{ + "id":"tnc_K1eopApuHyBE7D", + "accepted":true, + "accepted_at":1659638222 + }, + "id":"acc_prd_K1eopFF8G21tux", + "product_name":"route", + "activation_status":"needs_clarification", + "account_id":"acc_K1em7bWYEiwmnc", + "requested_at":1659638222 +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Linked account does not exist", + "source":"", + "step":"", + "reason":"linked_account_id_does_not_exist", + "metadata":{ + + } + } +} +``` + +### Parameters + +`account_id` +: `string` The unique identifier of the account generated by Razorpay. For example, `acc_HQVlm3bnPmccC0`. This id is used to fetch or update a product. The product is created for this account id. + +### Parameters + +`product_name` _mandatory_ +: `string` The product(s) to be configured. Here it is `route`. + +`tnc_accepted` _optional_ +: `boolean` Determines whether the terms and conditions are accepted or not. Possible values: + - `true`: Terms and conditions are accepted. + - `false`: Terms and conditions are not accepted. + +### Parameters + +`id` +: `string` The unique identifier of a product generated by Razorpay. This id is used to fetch or update a product. + +`product_name` +: `string` The product(s) to be configured. Possible values: + - `Route` + +`tnc_accepted` +: `object` It consists of the configuration for the accepted terms and conditions by the merchant for the requested product. If the terms and conditions are accepted by the user for the requested product, it would consist of following fields: + + `id` + : `string` The unique identifier representing the acceptance of terms and conditions for a product by a user. + + `accepted` + : `boolean` The flag that represents whether the terms and conditions are accepted by the user. + - `true`: Terms and conditions are accepted by user. + - `false`: Terms and conditions are not accepted by user. + + `accepted_at` + : `integer` The Unix timestamp at which the terms and conditions were accepted by the user for the requested product. + +`requested_configuration` +: `object` The configuration of the product requested by the user that is yet to be set as active. + +`active_configuration` +: `object` The configuration of the product that has been set as active. + + `settlements` + : `object` The Settlement settings object. + + + + `account_number` + : `string` The bank account number to which settlements are made. Account details can be found on the Dashboard. For example, `7878780080310012`. + + `ifsc_code` + : `string` The IFSC associated with the bank account. For example, `RATN0VAAPIS`. + + + + + + `beneficiary_name` + : `string` The name of the beneficiary associated with the bank account. This API parameter is needed to complete the KYC process. However, it is optional for this API. + +`requirements` +: `object` The list of requirements to be enabled for this product or some of the configurations under this product. + + `field_reference` + : `string` The field which is in issue or missing. The JSON key path in resolution URL. + + `resolution_url` + : `string` The URL to address the requirement. The API endpoint to be used for updating missing fields or documents. + + `status` + : `string` The status of the requirement. + + `reason_code` + : `string` The reason code for showing in the requirement. Possible values are: + - `field_missing` + - `needs_clarification` + - `document_missing` + +`id` +: `string` The unique identifier of the account generated by Razorpay. For example, `acc_prd_K1eopFF8G21tux`. The product is created for this account id. + +`account_id` +: `string` The unique identifier generated by Razorpay. For example, `acc_K1em7bWYEiwmnc`. + +`activation_status` +: `string` The status of the product activation. + - `requested` + - `needs_clarification` + - `under_review` + - `activated` + - `suspended` + +`requested_at` +: `integer` The Unix timestamp at which the product configuration has been requested. + +### Errors + +Linked account does not exist. +* code: 400 +* description: This error occurs when the requester is not the parent of the child account, or the child account does not exist. +* solution: Ensure the Linked Account id exists before proceeding with the update API. + +The product requested is invalid. +* code: 400 +* description: This error occurs when the provided data is invalid. +* solution: Ensure to pass the valid data. + +The selected tnc accepted is invalid. +* code: 400 +* description: This error occurs when the `tnc.accepted` value is `false`. +* solution: Ensure to accept the tnc by passing the `accepted` value as `true`. diff --git a/llm-content/api/payments/route/reverse-a-transfer.md b/llm-content/api/payments/route/reverse-a-transfer.md new file mode 100644 index 00000000..d666b55b --- /dev/null +++ b/llm-content/api/payments/route/reverse-a-transfer.md @@ -0,0 +1,204 @@ +--- +title: Reverse a Transfer +description: Reverse a Transfer using the Razorpay API. +--- + +# Reverse a Transfer + +## Reverse a Transfer + +Use this endpoint to create reversals on a particular `transfer_id`. + +- The amount specified is debited from the Linked Account balance and credited to your balance. + +- Partial reversals are also supported, and you can create multiple reversals on a `transfer_id`. If you do not provide the `amount` parameter in the request, then the entire amount of the transfer is reversed. + +> **INFO** +> +> +> **Handy Tips** +> If a reversal ID is generated, the reversal was successful. +> + +### Request + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/transfers/trf_EAznuJ9cDLnF7Y/reversals \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type: application/json' +-d '{ + "amount":100, + "notes":{ + "branch":"Acme Corp Bangalore North", + "name":"Gaurav Kumar" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String transferId = "trf_EAznuJ9cDLnF7Y"; + +JSONObject transferRequest = new JSONObject(); +transferRequest.put("amount","100"); +JSONObject notes = new JSONObject(); +notes.put("branch","Acme Corp Bangalore North"); +notes.put("name","Gaurav Kumar"); +transferParams.put("notes",notes); + +Transfer transfer = razorpay.transfers.reversal(transferId,transferRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->transfer->fetch($transferId)->reverse(array('amount'=>'100','notes' => array('branch' => 'Acme Corp Bangalore North','name' => 'Gaurav Kumar'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.transfers.reverse(transferId,{ + amount:100, + notes: { + branch: "Acme Corp Bangalore North", + name: "Gaurav Kumar" + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.transfer.reverse(transferId, { + "amount": 100, + "notes":{ + "branch":"Acme Corp Bangalore North", + "name":"Gaurav Kumar" + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +transferId = "trf_EAznuJ9cDLnF7Y" + +para_attr = { + "amount":100, + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + } +} + +Razorpay::Transfer.fetch(transferId).reverse(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "amount": 100, + "notes": map[string]interface{}{ + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + } +} +body, err := client.Transfer.Reverse("", data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] +"); + +string transferId = "trf_EAznuJ9cDLnF7Y"; + +Dictionary transferRequest = new Dictionary(); +transferRequest.Add("amount","100"); + +Reversal transfer = client.Transfer.Fetch(transferId).Reversal(transferRequest); +``` + +### Response + +```json: Success +{ + "id": "rvrsl_EB0BWgGDAu7tOz", + "entity": "reversal", + "transfer_id": "trf_EAznuJ9cDLnF7Y", + "amount": 100, + "fee": 0, + "tax": 0, + "currency": "INR", + "notes": [], + "initiator_id": "CJoeHMNpi0nC7k", + "customer_refund_id": null, + "created_at": 1580456007 +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the transfer to be reversed. + +### Parameters + +`amount` _optional_ +: `integer` The amount to be reversed from the Linked Account to your account. If this parameter is not passed, the entire transfer amount will be reversed. + +`notes` _optional_ +: `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "Bangalore"`. + +### Parameters + +`id` +: `string` The unique identifier of the reversal. + +`entity` +: `string` The name of the entity. Here, it is `reversal`. + +`transfer_id` +: `string` The unique identifier of the transfer that was reversed. + +`amount` +: `integer` The amount that was reversed, in paise. + +`currency` +: `string` ISO currency code. We support route reversals only in INR. + +`created_at` +: `integer` Timestamp in Unix. This indicates the time at which the reversal was created. + +### Errors + +The api key/secret provided is invalid +* code: 4xx +* description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys. + +The amount must be at least INR 1.00 +* code: 400 +* description: This error occurs when the amount is less than the minimum amount. The transaction amount expressed in the currency subunit, such as paise (in INR) should always be greater than or equal to ₹1. +* solution: Make sure the amount is equal to or greater than the minimum amount of ₹1. + +transfer_id is not a valid id +* code: 400 +* description: This error occurs when you pass an invalid `transfer_id` in the API endpoint. +* solution: Make sure to pass a vaild `transfer_id`. + +The linked account does not have sufficient balance to process reversal. +* code: 400 +* description: Insufficient balance in the linked account to complete the reversal. +* solution: Ensure that you have sufficient balance in your linked account to complete the reversal. diff --git a/llm-content/api/payments/route/stakeholder-entity.md b/llm-content/api/payments/route/stakeholder-entity.md new file mode 100644 index 00000000..2f169760 --- /dev/null +++ b/llm-content/api/payments/route/stakeholder-entity.md @@ -0,0 +1,117 @@ +--- +title: Stakeholder Entity +description: Know about stakeholder entity parameters and their description. +--- + +# Stakeholder Entity + +## Stakeholder Entity + +The Stakeholder entity has the following parameters. + +### Response + +```json: Entity +{ + "entity":"stakeholder", + "relationship":{ + "executive":true + }, + "phone":{ + "primary":"", + "secondary":"" + }, + "notes":[ + + ], + "kyc":{ + "pan":"AVOPB1111K" + }, + "id":"sth_GLGgm8fFCKc92m", + "name":"", + "email":"", + "percentage_ownership":null, + "addresses":{ + "residential":{ + "street":"506, Koramangala 1st block", + "city":"Bengaluru", + "state":"Karnataka", + "postal_code":"560034", + "country":"IN" + } + } +} +``` + +### Parameters + +`id` +: `string` The unique identifier of a stakeholder generated by Razorpay, used to fetch or update a stakeholder. For example, `sth_GLGgm8fFCKc92m`. Maximum length supported is 18 characters. + +`entity` +: `string` Here it is `stakeholder`. + +`percentage_ownership` +: `float` The stakeholder's ownership of the business in percentage. Only two decimal places are allowed. For example, `87.55`. The maximum length is 100 characters. + +`name` +: `string` The stakeholder's name as per the PAN card. The maximum length is 255 characters. + +`email` +: `string` The stakeholder's email address. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + +`relationship` +: `object` The stakeholder's relationship with the account's business. + `director` + : `boolean` Determines if stakeholder is a director of the account's legal entity. + - `true`: Stakeholder is a director. + - `false` (default): Stakeholder is not a director. + `executive` + : `boolean` Determines if the stakeholder is an executive of the account's legal entity. + - `true`: Stakeholder is an executive. + - `false` (false): Stakeholder is not an executive. + +`phone` +: `object` The stakeholder's phone number. + + `primary` + : `integer` The primary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + + `secondary` + : `integer` The secondary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + +`addresses` +: `object` Details of stakeholder's address. + + `residential` + : `string` Details of the stakeholder's residential address. + + `street` + : `string` The stakeholder's street address. The minimum length is 10 characters and maximum length is 255. + + `city` + : `string` The city. The minimum length is 2 and maximum length is 32. + + `state` + : `string` The state. The minimum length is 2 and maximum length is 32. + + `postal_code` + : `string` The postal code. The minimum length is 2 and maximum length is 10. + + `country` + : `string` The country. The minimum length is 2 and maximum length is 64. For example, for India, you must write either `IN` or `india`. + +`kyc` +: `object` The type of document required to establish the stakeholder's identity. + + `pan` + : `string` The PAN of the stakeholder. + + - This is a 10-digit alphanumeric code. For example, `AVOPB1111K`. + - **Regex for Stakeholder PAN**: `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/` + - **Validation for Stakeholder PAN**: The 4th digit should be 'P'. To complete the KYC process, this API parameter might be required, but it is optional for this API. + +`notes` +: `object` Contains user-defined fields stored by the partner for reference purposes. It can hold a maximum of 15 key-value pairs, 512 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. diff --git a/llm-content/api/payments/route/transfers-entity.md b/llm-content/api/payments/route/transfers-entity.md new file mode 100644 index 00000000..26822b79 --- /dev/null +++ b/llm-content/api/payments/route/transfers-entity.md @@ -0,0 +1,169 @@ +--- +title: Transfers Entity +description: Know about transfers entity parameters and their description. +--- + +# Transfers Entity + +## Transfers Entity + +The transfers entity has the following parameters. + +### Response + +```json: Entity +{ + "entity":"collection", + "count":2, + "items":[ + { + "id":"trf_ECB6hP5cyN30pU", + "entity":"transfer", + "transfer_status":"failed", + "settlement_status":null, + "source":"pay_EB1R2s8D4vOAKG", + "recipient":"acc_CNo3jSI8OkFJJJ", + "amount":100, + "currency":"INR", + "amount_reversed":0, + "notes":{ + "name":"Saurav Kumar", + "roll_no":"IEC2011026" + }, + "error":{ + "code":"BAD_REQUEST_TRANSFER_INSUFFICIENT_BALANCE", + "description":"Transfer failed due to insufficient balance", + "field":null, + "source":"transfer", + "step":"balance_check", + "reason":"insufficient_balance" + }, + "fees":1, + "tax":0, + "on_hold":false, + "on_hold_until":null, + "recipient_settlement_id":null, + "created_at":1580712811, + "linked_account_notes":[ + "roll_no" + ], + "processed_at":1580712811 + }, + { + "id":"trf_ECB6hP5cyN30pU", + "entity":"transfer", + "transfer_status":"failed", + "settlement_status":null, + "source":"pay_EB1R2s8D4vOAKG", + "recipient":"acc_CNo3jSI8OkFJJJ", + "amount":100, + "currency":"INR", + "amount_reversed":0, + "notes":{ + "name":"Saurav Kumar", + "roll_no":"IEC2011026" + }, + "error":{ + "code":"BAD_REQUEST_PAYMENT_FEES_GREATER_THAN_AMOUNT", + "description":"Transfer amount was greater than amount available for transfer", + "field":null, + "source":"transfer", + "step":"amount_validation", + "reason":"transfer_amount_higher_than_balance" + }, + "fees":1, + "tax":0, + "on_hold":false, + "on_hold_until":null, + "recipient_settlement_id":null, + "created_at":1580712811, + "linked_account_notes":[ + "roll_no" + ], + "processed_at":1580712811 + } + ] +} +``` + +### Parameters + +`id` +: `string` Unique identifier of the transfer. + +`entity` +: `string` The name of the entity. Here, it is `transfer`. + +`transfer_status` +: `string` The status of the transfer. Possible values are: + - `created` + - `pending` + - `processed` + - `failed` + - `reversed` + - `partially_reversed` + +`settlement_status` +: `string` The status of the settlement. Possible values are: + - `pending` + - `on_hold` + - `settled` + +`source` +: `string` Unique identifier of the transfer source. The source can be a `payment` or an `order`. + +`recipient` +: `string` Unique identifier of the transfer destination, that is, the Linked Account. + +`amount` +: `integer` The amount to be transferred to the Linked Account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`currency` +: `string` ISO currency code. We support route transfers only in `INR`. + +`amount_reversed` +: `integer` Amount reversed from this transfer for refunds. + +`notes` +: `json object` Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "Bangalore"`. + +`error` +: `string` Provides error details that may occur during transfers. + + `code` + : `string` Type of the error. + + `description` + : `string` Error description. + + `field` + : `string` Name of the parameter in the API request that caused the error. + + `source` + : `string` The point of failure in the specific operation. For example, customer, business and so on. + + `step` + : `string` The stage where the transaction failure occurred. Stages can be different depending on the payment method used to make the transaction. + + `id` + : `string` Unique identifier of the transfer. + + `reason` + : `string` The exact error reason. It can be handled programmatically. + +`linked_account_notes` +: `array` List of keys from the `notes` object which needs to be shown to Linked Accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + +`on_hold` +: `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + +`on_hold_until` +: `integer` Timestamp, in Unix format, indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + +`recipient_settlement_id` +: `string` Unique identifier of the settlement. + +`created_at` +: `integer` Timestamp, in Unix, at which the record was created. diff --git a/llm-content/api/payments/route/update-linked-accounts.md b/llm-content/api/payments/route/update-linked-accounts.md new file mode 100644 index 00000000..b6e5db67 --- /dev/null +++ b/llm-content/api/payments/route/update-linked-accounts.md @@ -0,0 +1,379 @@ +--- +title: Update a Linked Account +description: Update Linked Accounts using the Razorpay API. +--- + +# Update a Linked Account + +## Update a Linked Account + +Use this endpoint to update a Linked Account details. + +You can update all other fields except `business_type` and `email` on the created Linked Account. + +### Request + +```Curl: Curl +curl -X PATCH https://api.razorpay.com/v2/accounts/acc_LWXFUBYnysbYFV \ +-u : \ +-H "Content-type: application/json" \ +-d '{ + "legal_business_name": "Acme Corp V2", + "profile": { + "addresses": { + "operation": { + "street1": "5071, Koramangala 6th block", + "street2": "Kormanagala", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": 560047, + "country": "IN" + } + } + }, + "legal_info": { + "pan": "BAACL1234C", + "gst": "10AABCU9603R1ZM" + } +}' +``` + +### Response + +```json: Success +{ + "id": "acc_LWXFUBYnysbYFV", + "type": "route", + "status": "created", + "email": "gaurava.kumar@example.com", + "profile": { + "category": "healthcare", + "subcategory": "clinic", + "addresses": { + "registered": { + "street1": "507, Koramangala 1st block", + "street2": "MG Road", + "city": "Bengaluru", + "state": "KARNATAKA", + "postal_code": "560034", + "country": "IN" + }, + "operation": { + "street1": "5071, Koramangala 6th block", + "street2": "Kormanagala", + "city": "Bengaluru", + "state": "KARNATAKA", + "country": "IN", + "postal_code": 560047 + } + } + }, + "notes": [], + "created_at": 1679917193, + "phone": "+919000090000", + "contact_name": "Gaurav Kumar", + "reference_id": "124126", + "business_type": "partnership", + "legal_business_name": "Acme Corp V2", + "customer_facing_business_name": "Acme Corp V2", + "legal_info": { + "pan": "BAACL1234C", + "gst": "10AABCU9603R1ZM" + } +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Linked account does not exist", + "source":"", + "step":"", + "reason":"linked_account_id_does_not_exist", + "metadata":{ + + } + } +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` Unique identifier of the Linked Account whose details you need to update. + +### Parameters + +`phone`_mandatory_ +: `integer` The Linked Account's business phone number. The minimum length is 8 characters and the maximum length is 15. + +`legal_business_name` _mandatory_ +: `string` The name of the Linked Account's business. For example, `Acme Corp`. The minimum length is 4 characters and the maximum length is 200. + +`customer_facing_business_name` _optional_ +: `string` The Linked Account billing label as it appears on the Dashboard. The minimum length is 1 character and the maximum length is 255. + +`reference_id` _optional_ +: `string` Partner's external account reference id. The minimum length is 1 character and the maximum length is 512. + +`profile` _mandatory_ +: `object` The business details of the Linked Account's account. + + `category` _mandatory_ + : `string` The business category of the Linked Account. Possible values: [List of Business Categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md). + + `subcategory` _mandatory_ + : `string` The business sub-category of the Linked Account. Possible values: [List of Business Sub-Categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md). + + `business_model` _optional_ + : `string` The business description. The character limit between 1-255 characters. + + `addresses` + : `object` Details of Linked Account's address. + + `operation` _optional_ + : `object` Details of the Linked Account's operational address. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 32. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. + + `registered` _mandatory_ + : `object` Details of the Linked Account's registered address. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 32. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. + +`legal_info` _conditional_ +: `object` The legal details about the Linked Account's business. The mandatory [KYC requirement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/integration-guide.md#kyc-requirements) parameters should be passed depending on the business requirements. + + `pan` _conditional_ + : `string` Valid PAN number details of the Linked Account's business. + - This is a 10-digit alphanumeric code. For example, `AVOJB1111K`. + - The 4th digit should be either of 'C', 'H', 'F', 'A', 'T', 'B', 'J', 'G', 'L'. + - The regex for Company PAN is `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`. + + `gst` _conditional_ + : `string` Valid GSTIN number details of the Linked Account. + - This is a 15-digit PAN-based unique identification number. + - The Regex for GSTIN is `/^[0123][0-9][a-z]{5}[0-9]{4}[a-z][0-9][a-z0-9][a-z0-9]$/gi`. + +`contact_info` _optional_ +: `object` Options available for contact support. + + `chargeback` + : `object` The type of contact support. + + `email` + : `string` The email id of chargeback POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of chargeback POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of chargeback policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. Only domain name is mandatory. + + `refund` + : `object` The type of contact support. + + `email` + : `string` The email id of refund POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of refund POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of refund policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `support` + : `array` The type of contact support. + + `email` + : `string` The email id of support POC. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + + `phone` + : `integer` The phone number of support POC. The maximum length is 10 characters. + + `policy_url` + : `string` The URL of support policy. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + +`apps` _optional_ +: `object` The app details of the account holder's business + + `websites` + : `array` The website/app for the account holder's business. A minimum of 1 website is required. + + `android` + : `array` Android app details + + `url` + : `string` The link of the Android app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` + : `string` The name of the Android app. + + `ios` + : `array` iOS app details + + `url` + : `string` The link of the iOS app. Regex is (protocol://``:port/resource path?querystring#fragementid) + protocol-both http/https allowed. + + `name` + : `string` The name of the iOS app. + +### Parameters + +`id` +: `string` The unique identifier of the account generated by Razorpay. The maximum length is 18 characters. For example, `acc_GLGeLkU2JUeyDZ`. + +`type` +: `string` The account type. Possible value is `route`. + +`status` +: `string` The status of the account. Possible values: + - `created` + - `suspended` + +`email` +: `string` The account holder's email address. + +`phone` +: `integer` The account holder's phone number. The minimum length is 8 characters and the maximum length is 15. + +`legal_business_name` +: `string` The name of the account holder's business. For example, `Acme Corp`. The minimum length is 4 characters and the maximum length is 200. + +`business_type` +: `string` The type of business operated by the account holder. Possible values: [Business Types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md). + +`profile` +: `object` The account holder's business details. + + `category` + : `string` The business category of the account holder. For example, `healthcare`. Possible values: [Business Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md). + + `subcategory` + : `string` The business sub-category of the account holder. For example, `clinic`. Possible values: [Business Sub-Category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md). + + `addresses` + : `object` Details of account holder's address. + + `registered` + : `object` Details of the account holder's registered address. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 100. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. + + `operation` + : `object` Details of the account holder's operational address. This parameter might be required to complete the KYC process. However, it is optional for this API. + + `street1` + : `string` Address, line 1. The maximum length is 100 characters. + + `street2` + : `string` Address, line 2. The maximum length is 100 characters. + + `city` + : `string` The city. The maximum length is 100 characters. + + `state` + : `string` The state. The minimum length is 2 and the maximum length is 100. + + `postal_code` + : `integer` The postal code. This should be exactly 6 characters. + + `country` + : `string` The country. The minimum length is 2 and the maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. + +`legal_info` +: `object` The legal details about the account holder's business. The mandatory [KYC requirement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md) parameters should be passed depending on the business requirements. + + `pan` + : `string` Valid PAN number details of the account holder's business. + - This is a 10-digit alphanumeric code. For example, `AVOJB1111K`. + - The 4th digit should be either of 'C', 'H', 'F', 'A', 'T', 'B', 'J', 'G', 'L'. + - The regex for Company PAN is `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`. This parameter might be required to complete the KYC process. However, it is optional for this API. + + `gst` + : `string` Valid GSTIN number details of the account holder. + - This is a 15-digit PAN-based unique identification number. + - The Regex for GSTIN is `/^[0123][0-9][a-z]{5}[0-9]{4}[a-z][0-9][a-z0-9][a-z0-9]$/gi`. + +`notes` +: `object` Contains user-defined fields stored by the partner for reference purposes. + +`contact_name` +: `string` The name of the contact. The minimum length is 4 and the maximum length is 255 characters. + +`contact_info` +: `object` Options available for contact support. + +### Errors + +Linked account does not exist. +* code: 400 +* description: This error occurs when the requester is not the parent of the child account, or the child account does not exist. +* solution: Ensure the Linked Account id exists before proceeding with the update API. + +Merchant activation form has been locked for editing by admin. +* code: 400 +* description: This error occurs when the submitted extra fields are under the review stage. +* solution: You can wait for the review to be successful. diff --git a/llm-content/api/payments/route/update-product-config.md b/llm-content/api/payments/route/update-product-config.md new file mode 100644 index 00000000..be4c8e9a --- /dev/null +++ b/llm-content/api/payments/route/update-product-config.md @@ -0,0 +1,292 @@ +--- +title: Update a Product Configuration +description: Update a product configuration using the Razorpay API. +--- + +# Update a Product Configuration + +## Update a Product Configuration + +Use this endpoint to update a product configuration. + +### Request + +```Curl: Curl +curl -X PATCH https://api.razorpay.com/v2/accounts/acc_HQVlm3bnPmccC0/products/acc_prd_HEgNpywUFctQ9e/ \ +-u : \ +-H "Content-Type: application/json" \ +-d '{ + "settlements":{ + "account_number":"1234567890123456", + "ifsc_code":"HDFC0000317", + "beneficiary_name":"Gaurav Kumar" + }, + "tnc_accepted":true +}' + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String accountId = "acc_HQVlm3bnPmccC0"; + +String productId = "acc_prd_HEgNpywUFctQ9e"; + +JSONObject productRequest = new JSONObject(); + +JSONObject settlements = new JSONObject(); +settlements.put("account_number","1234567890123456"); +settlements.put("ifsc_code","HDFC0000317"); +settlements.put("beneficiary_name","Gaurav Kumar"); + +productRequest.put("settlements",settlements); + +productRequest.put("tnc_accepted",true); + +Account product = instance.product.edit(accountId, productId, productRequest); + +```python: Python + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +accountId = "acc_HQVlm3bnPmccC0" +productId = "acc_prd_HEgNpywUFctQ9e" + +client.product.edit(accountId, productId, { + "settlements": { + "account_number": "1234567890123456", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "tnc_accepted": True +}) + +```php: PHP + +$api = new Api($key_id, $secret); + +$accountId = "acc_HQVlm3bnPmccC0"; +$productId = "acc_prd_HEgNpywUFctQ9e"; + +$api->account->fetch($accountId)->products()->edit($productId, array( + "settlements" => array( + "account_number" => "1234567890123456", + "ifsc_code" => "HDFC0000317", + "beneficiary_name" => "Gaurav Kumar" + ), + "tnc_accepted" => true +)); + +```csharp: .NET + +RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + +string accountId = "acc_HQVlm3bnPmccC0"; + +string productId = "acc_prd_HEgNpywUFctQ9e"; + +Dictionary productRequest = new Dictionary(); + +Dictionary settlements = new Dictionary(); +settlements.Add("account_number", "1234567891"); +settlements.Add("ifsc_code", "HDFC0000317"); +settlements.Add("beneficiary_name", "Gaurav Kumar"); + +productRequest.Add("settlements", settlements); +productRequest.Add("tnc_accepted", true); + +Product product = client.Product.Fetch(accountId, productId).Edit(productRequest); + +```ruby: Ruby + +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +accountId = "acc_HQVlm3bnPmccC0" +productId = "acc_prd_HEgNpywUFctQ9e" + +Razorpay::Product.edit(accountId, productId, { + "settlements": { + "account_number": "1234567890123456", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "tnc_accepted": true +}) + +```javascript: Node.js + +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var accountId = "acc_HQVlm3bnPmccC0"; +var productId = "acc_prd_HEgNpywUFctQ9e"; + +instance.products.edit(accountId, productId, { + "settlements": { + "account_number": "1234567890123456", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar" + }, + "tnc_accepted": true +}); + +```go: Go + +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +accountId := "acc_HQVlm3bnPmccC0" +productId := "acc_prd_HEgNpywUFctQ9e" + +data := map[string]interface{}{ + "settlements": map[string]interface{}{ + "account_number":"1234567890123456", + "ifsc_code": "HDFC0000317", + "beneficiary_name": "Gaurav Kumar", + }, + "tnc_accepted": true +} + +body, err := client.Product.Edit(accountId, productId, data, nil) +``` + +### Response + +```json: Success +{ + "requested_configuration":[ + + ], + "active_configuration":{ + "settlements":{ + "account_number":"1234567890123456", + "ifsc_code":"HDFC0000317", + "beneficiary_name":"Gaurav Kumar" + } + }, + "requirements":[ + + ], + "tnc":{ + "id":"tnc_K1eopApuHyBE7D", + "accepted":true, + "accepted_at":1659638222 + }, + "id":"acc_prd_K1eopFF8G21tux", + "product_name":"route", + "activation_status":"activated", + "account_id":"acc_K1em7bWYEiwmnc", + "requested_at":1659638222 +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Linked account does not exist", + "source":"", + "step":"", + "reason":"linked_account_id_does_not_exist", + "metadata":{ + + } + } +} +``` + +### Parameters + +`account_id` _mandatory_ +: `string` The unique identifier of an account generated by Razorpay. For example, `acc_HQVlm3bnPmccC0`. + +`product_id` _mandatory_ +: `string` The unique identifier of a product generated by Razorpay. For example, `acc_prd_HEgNpywUFctQ9e`. + +### Parameters + +`settlements` _conditional_ +: `object` The Settlement settings object. + + + + `account_number` + : `string` The bank account number to which settlements are made. For example, `1234567890123456`. + + `ifsc_code` + : `string` The IFSC associated with the bank account. For example, `HDFC0000317`. + + + + + + `beneficiary_name` + : `string` The name of the beneficiary associated with the bank account. + +`tnc_accepted` _optional_ +: `boolean` This parameter is optional but needs to be added to accept terms and conditions. Possible value is only `true`. + +### Parameters + +`requested_configuration` +: `object` The configuration of the product requested by the user that is yet to be set as active. + +`active_configuration` +: `object` The configuration of the product that has been set as active. + + `settlements` + : `object` The Settlement settings object. + + + + `account_number` + : `string` The bank account number to which settlements are made. Account details can be found on the Dashboard. For example, `7878780080310012`. + + + + + + `ifsc_code` + : `string` The IFSC associated with the bank account. For example, `RATN0VAAPIS`. + + + + + + `beneficiary_name` + : `string` The name of the beneficiary associated with the bank account. + +> **INFO** +> +> +> **Handy Tip** +> + +> This API parameter is needed to complete the KYC process. However, it is optional for this API. +> + + +`requirements` +: `object` The list of requirements to be enabled for this product or some of the configurations under this product. + +### Errors + +Linked account does not exist. +* code: 400 +* description: This error occurs when the requester is not the parent of the child account, or the child account does not exist. +* solution: Ensure the Linked Account id exists before proceeding with the update API. + +Merchant activation form has been locked for editing by admin. +* code: 400 +* description: This error occurs when the submitted extra fields are under the review stage. +* solution: You can wait for the review to be successful. + +Invalid IFSC Code. +* code: 400 +* description: This error occurs when the IFSC is invalid. +* solution: Ensure to pass the valid IFSC. + +The account number must be between 5 and 20 characters. +* code: 400 +* description: This error occurs when the account number is less than 5 or more than 20 characters. +* solution: Ensure the account number is between 5 to 20 characters. diff --git a/llm-content/api/payments/route/update-stakeholder.md b/llm-content/api/payments/route/update-stakeholder.md new file mode 100644 index 00000000..60e3f4c6 --- /dev/null +++ b/llm-content/api/payments/route/update-stakeholder.md @@ -0,0 +1,421 @@ +--- +title: Update a Stakeholder Account +description: Update a stakeholder account using the Razorpay API. +--- + +# Update a Stakeholder Account + +## Update a Stakeholder Account + +Use this endpoint to update a stakeholder account. + +### Request + +```curl: Curl +curl -X PATCH 'https://api.razorpay.com/v2/accounts/acc_GLGeLkU2JUeyDZ/stakeholders/sth_GOQ4Eftlz62TSL' \ + -u [YOUR_KEY_ID]:[YOUR_SECRET] \ + -H "Content-type: application/json" \ + -d '{ + "addresses":{ + "residential":{ + "street":"507, Koramangala 1st block", + "city":"Bangalore", + "state":"Karnataka", + "postal_code":"560035", + "country":"IN" + } + }, + "kyc":{ + "pan":"AVOPBXXXXX" + } +}' + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String accountId = "acc_GLGeLkU2JUeyDZ"; + +String stakeholderId = "sth_GOQ4Eftlz62TSL"; + +JSONObject residential = new JSONObject(); +residential.put("street","507, Koramangala 1st block"); +residential.put("city","Bengaluru"); +residential.put("state","Karnataka"); +residential.put("postal_code","560035"); +residential.put("country","IN"); + +JSONObject addresses = new JSONObject(); +addresses.put("residential",residential); +StakeRequest.put("addresses",addresses); + +JSONObject kyc = new JSONObject(); +kyc.put("pan","AVOPBXXXXX"); + +StakeRequest.put("kyc",kyc); + +Stakeholder stakeholder = instance.stakeholder.edit(accountId, stakeholderId, StakeRequest); + +```python: Python + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +accountId = "acc_GLGeLkU2JUeyDZ" +stakeholderId = "sth_GOQ4Eftlz62TSL" + +client.stakeholder.edit(accountId, stakeholderId, { + "addresses": { + "residential": { + "street": "507, Koramangala 1st block", + "city": "Bangalore", + "state": "Karnataka", + "postal_code": "560035", + "country": "IN" + } + }, + "kyc": { + "pan": "AVOPBXXXXX" + } +}) + +```php: PHP + +$api = new Api($key_id, $secret); + +$accountId = "acc_GLGeLkU2JUeyDZ"; +$stakeholderId = "sth_GOQ4Eftlz62TSL"; + +$api->account->fetch($accountId)->stakeholders()->edit($stakeholderId, array( + "addresses" => array( + "residential" => array( + "street" => "507, Koramangala 1st block", + "city" => "Bangalore", + "state" => "Karnataka", + "postal_code" => "560035", + "country" => "IN" + ) + ), + "kyc" => array( + "pan" => "AVOPBXXXXX" + ) +)); + +```csharp: .NET + +RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + +Dictionary residential = new Dictionary(); +residential.Add("street", "507, Koramangala 6th block"); +residential.Add("city", "Bengaluru"); +residential.Add("state", "Karnataka"); +residential.Add("postal_code", "560047"); +residential.Add("country", "IN"); + +Dictionary addresses = new Dictionary(); +addresses.Add("residential", residential); +StakeRequest.Add("addresses", addresses); + +Dictionary kyc = new Dictionary(); +kyc.Add("pan", "AVOPBXXXXX"); + +StakeRequest.Add("kyc", kyc); + +string accountId = "acc_GLGeLkU2JUeyDZ"; +string stakeholderId = "sth_GOQ4Eftlz62TSL"; + +Stakeholder stakeholder = client.Stakeholder.Fetch(accountId, stakeholderId).Edit(accountId, StakeRequest); + +```ruby: Ruby + +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +accountId = "acc_GLGeLkU2JUeyDZ"; +stakeholderId = "sth_GOQ4Eftlz62TSL"; + +Razorpay::Stakeholder.edit(accountId, stakeholderId, { + "addresses": { + "residential": { + "street": "507, Koramangala 1st block", + "city": "Bangalore", + "state": "Karnataka", + "postal_code": "560035", + "country": "IN" + } + }, + "kyc": { + "pan": "AVOPBXXXXX" + } +}) + +```javascript: Node.js + +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var accountId = "acc_GLGeLkU2JUeyDZ"; +var stakeholderId = "sth_GOQ4Eftlz62TSL"; + +instance.stakeholders.edit(accountId, stakeholderId, { + "addresses": { + "residential": { + "street": "507, Koramangala 1st block", + "city": "Bangalore", + "state": "Karnataka", + "postal_code": "560035", + "country": "IN" + } + }, + "kyc": { + "pan": "AVOPBXXXXX" + } +}); + +```go: Go + +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +accountId := "acc_GLGeLkU2JUeyDZ" +stakeholderId := "sth_GOQ4Eftlz62TSL" + +data := map[string]interface{}{ + "addresses": map[string]interface{}{ + "residential": map[string]interface{}{ + "street": "507, Koramangala 1st block", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": "560035", + "country": "IN", + }, + }, + "kyc": map[string]interface{}{ + "pan": "AVOPBXXXXX", + } +} +body, err := client.Stakeholder.Edit(accoundId, stakeholderId, data, nil) +``` + +### Response + +```json: Success +{ + "entity": "stakeholder", + "relationship": { + "executive": true + }, + "phone": { + "primary": "9000090000", + "secondary": "9000090000" + }, + "notes": { + "random_key_by_partner": "random_value" + }, + "kyc": { + "pan": "AVOPB1111K" + }, + "id": "sth_GLGgm8fFCKc92m", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "percentage_ownership": 10, + "addresses": { + "residential": { + "street": "506, Koramangala 1st block", + "city": "Bengaluru", + "state": "Karnataka", + "postal_code": "560034", + "country": "IN" + } + } +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Linked account does not exist", + "source":"", + "step":"", + "reason":"linked_account_id_does_not_exist", + "metadata":{ + + } + } +} +``` + +### Parameters + +`account_id` +: `string` The unique identifier of the account generated by Razorpay. For example, `acc_GLGeLkU2JUeyDZ`. This id is used to fetch or update a stakeholder. + +`stakeholder_id` +: `string` The unique of the stakeholder account created. For example, `sth_GOQ4Eftlz62TSL`. + +### Parameters + +`name` _mandatory_ +: `string` The stakeholder's name as per the PAN card. The maximum length is 255 characters. + +`email` _mandatory_ +: `string` The stakeholder's email address. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + The total character length supported is 132. + +`percentage_ownership`_optional_ +: `float` The stakeholder's ownership of the business in percentage. Only two decimal places are allowed. For example, `87.55`. The maximum length is 100 characters. + +`relationship` +: `object` The stakeholder's relationship with the account's business. + `director` + : `boolean` Determines if stakeholder is a director of the account's legal entity. + - `true`: Stakeholder is a director. + - `false` (default): Stakeholder is not a director. + `executive` + : `boolean` Determines if the stakeholder is an executive of the account's legal entity. + - `true`: Stakeholder is an executive. + - `false` (false): Stakeholder is not an executive. + +`phone` _optional_ +: `object` The stakeholder's phone number. + + `primary`_optional_ + : `integer` The primary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + + `secondary`_optional_ + : `integer` The secondary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + +`addresses` _optional_ +: `object` Details of stakeholder's address. + + `residential` + : `object` Details of the stakeholder's residential address. + + `street` _optional_ + : `string` The stakeholder's street address. The minimum length is 10 characters and maximum length is 255. + + `city` _optional_ + : `string` The city. The minimum length is 2 and maximum length is 32. + + `state` _optional_ + : `string` The state. The minimum length is 2 and maximum length is 32. + + `postal_code` _optional_ + : `string` The postal code. The minimum length is 2 and maximum length is 10. + + `country` _optional_ + : `string` The country. The minimum length is 2 and maximum length is 64. For example, for India, you must write either `IN` or `india`. + +`kyc` _conditional_ +: `object` The type of document required to establish the stakeholder's identity. + + `pan` + : `string` The PAN number of the stakeholder. + - This is a 10-digit alphanumeric code. For example, `AVOPB1111K`. + - **Regex for Stakeholder PAN**: `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/`. + - **Validation for Stakeholder PAN**: The 4th digit should be `P`. + +`notes` _optional_ +: `object` Contains user-defined fields stored for reference purposes. Maximum 15 key-value pairs, 512 characters (maximum) each. + +### Parameters + +`id` +: `string` The unique identifier of a stakeholder generated by Razorpay, used to fetch or update a stakeholder. For example, `sth_GLGgm8fFCKc92m`. Maximum length supported is 18 characters. + +`entity` +: `string` Here it is `stakeholder`. + +`percentage_ownership` +: `float` The stakeholder's ownership of the business in percentage. Only two decimal places are allowed. For example, `87.55`. The maximum length is 100 characters. + +`name` +: `string` The stakeholder's name as per the PAN card. The maximum length is 255 characters. + +`email` +: `string` The stakeholder's email address. The maximum length is: + - local part (before @): 64 characters. + - domain part (after @): 68 characters. + +`relationship` +: `object` The stakeholder's relationship with the account's business. + `director` + : `boolean` Determines if stakeholder is a director of the account's legal entity. + - `true`: Stakeholder is a director. + - `false` (default): Stakeholder is not a director. + `executive` + : `boolean` Determines if the stakeholder is an executive of the account's legal entity. + - `true`: Stakeholder is an executive. + - `false` (false): Stakeholder is not an executive. + +`phone` +: `object` The stakeholder's phone number. + + `primary` + : `integer` The primary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + + `secondary` + : `integer` The secondary contact number of the stakeholder. The minimum length is 8 characters and the maximum length is 11. + +`addresses` +: `object` Details of stakeholder's address. + + `residential` + : `string` Details of the stakeholder's residential address. + + `street` + : `string` The stakeholder's street address. The minimum length is 10 characters and maximum length is 255. + + `city` + : `string` The city. The minimum length is 2 and maximum length is 32. + + `state` + : `string` The state. The minimum length is 2 and maximum length is 32. + + `postal_code` + : `string` The postal code. The minimum length is 2 and maximum length is 10. + + `country` + : `string` The country. The minimum length is 2 and maximum length is 64. This can either be a country code in capital letters or the full name of the country in lower case letters. For example, for India, you must write either `IN` or `india`. + +`kyc` +: `object` The type of document required to establish the stakeholder's identity. + + `pan` + : `string` The PAN of the stakeholder. + + - This is a 10-digit alphanumeric code. For example, `AVOPB1111K`. + - **Regex for Stakeholder PAN**: `/^[a-zA-z]{5}\d{4}[a-zA-Z]{1}$/` + - **Validation for Stakeholder PAN**: The 4th digit should be 'P'. + + +> **INFO** +> +> +> **Handy Tip** +> + +> To complete the KYC process, this API parameter might be required, but it is optional for this API. +> + + +`notes` +: `object` Contains user-defined fields stored by the partner for reference purposes. It can hold a maximum of 15 key-value pairs, 512 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. + +### Errors + +Linked account does not exist. +* code: 400 +* description: This error occurs when the requester is not the parent of the child account, or the child account does not exist. +* solution: Ensure the Linked Account id exists before proceeding with the update API. + +The id provided does not exist. +* code: 400 +* description: This error occurs when the stakeholder does not belong to the account provided. +* solution: Ensure you provide a valid id with the existing account. + +Merchant activation form has been locked for editing by admin. +* code: 400 +* description: This error occurs when the submitted extra fields are under the review stage. +* solution: You can wait for the review to be successful. diff --git a/llm-content/api/payments/smart-collect-2.md b/llm-content/api/payments/smart-collect-2.md new file mode 100644 index 00000000..dabe674f --- /dev/null +++ b/llm-content/api/payments/smart-collect-2.md @@ -0,0 +1,97 @@ +--- +title: Smart Collect 2.0 APIs +description: Integrate Smart Collect 2.0 using Razorpay APIs. +--- + +# Smart Collect 2.0 APIs + +Smart Collect 2.0, which is an upgraded version of [Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md) , offers additional APIs which enables you to create Customer Identifiers with Bank Account and VPA Receiver, add VPA Receiver to existing Customer Identifier, and fetch payments made using UPI. + +Open a Current account or an Escrow account to start using [Smart Collect 2.0](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md). + +Fork the Razorpay Postman Public Workspace and try the Smart Collect APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-9fd01f11-0b59-4e97-a281-40f4b14277ec) + +> **INFO** +> +> +> **Handy Tips** +> +> - **Smart Collect 2.0** offers all the existing functionalities of **Smart Collect** and uses the same **Smart Collect** API endpoints, in addition to the new APIs listed on this page. +> +> - Use [Smart Collect TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-tpv.md) APIs to **Add an Allowed Payer** or **Delete an Allowed Payer** +> +> + +> **WARN** +> +> +> **Watch Out!** +> +> Bank account is mandatory to create a Customer Identifier. You cannot create a Customer Identifier using VPA (UPI) alone. +> + +### Related Guides + +[About Smart Collect 2.0](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/smart-collect.md) + +### Endpoints + + - **post** `/v1/virtual_accounts` - Create Customer Identifier with VPA and Bank Account Receivers With Smart Collect 2.0: + Creates a Customer Identifier with VPA and Bank Account Receivers With Smart Collect 2.0. + + + + - **post** `v1/virtual_accounts/:id/receivers` - Add VPA Receiver to existing Customer Identifier With Smart Collect 2.0: + Adds a VPA Receiver to an existing Customer Identifier With Smart Collect 2.0. + + + - **get** `/v1/payments/:id/upi_transfer` - Fetch Payments Made Using UPI With Smart Collect 2.0: + Retrieves payments made using UPI With Smart Collect 2.0. + + + - **post** `/v1/virtual_accounts` - Create a Customer Identifier With Bank Account Receiver: + Creates a Customer Identifier with bank account receiver. + + + - **post** `/v1/virtual_accounts/:id` - Update a Customer Identifier: + Updates details of a Customer Identifier. + + + - **get** `/v1/virtual_accounts/:id` - Fetch a Customer Identifier Using ID: + Retrieves details of a Customer Identifier using id. + + + - **get** `/v1/virtual_accounts/` - Fetch All Customer Identifiers: + Retrieves details of all Customer Identifiers. + + + - **get** `/v1/virtual_accounts/:id/payments` - Fetch Payments for a Customer Identifier: + Retrieves details of payments made against a particular Customer Identifier. + + + - **get** `/v1/virtual_accounts/:id/payments` - Fetch Payments Made By Bank Transfer: + Retrieves details of a payment using bank transfer method. + + + - **get** `/v1/payments?skip=0&count=25&va_transaction_id=:id&virtual_account=1` - Fetch Payments Using UTR: + Retrieves details of a payment using bank transfer method via UTR. + + + - **post** `/v1/virtual_accounts/:id/close` - Close a Customer Identifier: + Closes a Customer Identifier. + + + - **post** `v1/virtual_accounts/:id/receivers` - Add VPA Receiver to existing Customer Identifier With Smart Collect 2.0: + Adds a VPA Receiver to an existing Customer Identifier With Smart Collect 2.0. + + + - **post** `/v1/virtual_accounts` - Create Customer Identifier with VPA and Bank Account Receivers With Smart Collect 2.0: + Creates a Customer Identifier with VPA and Bank Account Receivers With Smart Collect 2.0. + + + - **get** `/v1/payments/:id/upi_transfer` - Fetch Payments Made Using UPI With Smart Collect 2.0: + Retrieves payments made using UPI With Smart Collect 2.0. diff --git a/llm-content/api/payments/smart-collect-2/add-receiver-bank-transfer.md b/llm-content/api/payments/smart-collect-2/add-receiver-bank-transfer.md new file mode 100644 index 00000000..1ca40e91 --- /dev/null +++ b/llm-content/api/payments/smart-collect-2/add-receiver-bank-transfer.md @@ -0,0 +1,260 @@ +--- +title: Add Bank Account Receiver to an Existing Customer Identifier +description: Integrate Bank Account Receiver to an existing Customer Identifier seamlessly using the Razorpay Smart Collect API. Ensure secure and efficient transactions with robust integration. +--- + +# Add Bank Account Receiver to an Existing Customer Identifier + +## Add Bank Account Receiver to an Existing Customer Identifier + +Use this endpoint to add a bank account receiver to an existing Customer Identifier. If you have created a Customer Identifier with a receiver, for example, bank account, you cannot add another bank account receiver or replace it using this endpoint. + +> **INFO** +> +> +> **Handy Tips** +> +> - **Smart Collect 2.0** uses the same API endpoints as **Smart Collect.** +> - Use [Smart Collect TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-tpv.md) APIs to **Add an Allowed Payer** or **Delete an Allowed Payer** +> +> + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/virtual_accounts/va_DzaBLzIz494C64/receivers +-H 'content-type: application/json' +-d '{ + "types": [ + "bank_account" + ] +}' + +```php: PHP +$api = new Api('YOUR_KEY_ID, 'YOUR_KEY_SECRET'); +$api->virtualAccount->fetch($virtualId)->addReceiver(array('types' => array('bank_account'),'bank_account' => array('descriptor'=>'gauravkumar'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.addReceiver(virtualId,{ + types: [ + "bank_account" + ], + bank_account: { + descriptor: "gaurikumari" + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.virtual_account.add_receiver(virtualId,{ + "types": [ + "bank_account" + ], + "bank_account": { + "descriptor": "gaurikumari" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +types := make(map[string]interface{}) +types["0"] = "bank_account" + +data:= map[string]interface{}{ + "types": types, + "bank_account": map[string]interface{}{ + "descriptor": "gaurikumari", + }, + } + +body, err := client.VirtualAccount.AddReceiver("", data, nil) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String virtualId = "va_Di5gbNptcWV8fQ"; + +JSONObject virtualRequest = new JSONObject(); +List types = new ArrayList<>(); +types.add("vpa"); +virtualRequest.put("types",types); +JSONObject vpa = new JSONObject(); +vpa.put("descriptor","gaurikumari"); +virtualRequest.put("bank_account",bank_account); + +VirtualAccount virtualaccount = instance.virtualAccounts.addReceiver(virtualId,virtualRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary virtualRequest = new Dictionary(); +List types = new List(); +types.Add("bank_account"); +virtualRequest.Add("types", types); + +VirtualAccount refund = client.VirtualAccount.Fetch(virtualId).AddReceiver(virtualRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +virtualId = "va_Di5gbNptcWV8fQ" + +para_attr = { + "types": [ + "bank_account" + ], + "bank_account": { + "descriptor": "gaurikumari" + } +} + +Razorpay::VirtualAccount.add_receiver(virtualId, para_attr) +``` + +### Response + +```json: Success +{ + "id": "va_DzaBLzIz494C64", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Customer Identifier created for Raftar Soft", + "amount_expected": null, + "notes": [], + "amount_paid": 0, + "customer_id": "cust_Cp5BlkchbcN9vf", + "receivers": [ + { + "id": "ba_DzcfdIfpw37iUl", + "entity": "bank_account", + "ifsc": "YESB0CMSNOC", + "bank_name": "Yes Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223333225458057" + }, + { + "id": "vpa_DzaBM9AEJew8H1", + "entity": "bank_account", + "username": "rpy.payto00000gaurikumari", + "handle": "icici", + "address": "rpy.payto00000gaurikumari@icici" + } + ], + "close_by": 1581615838, + "closed_at": null, + "created_at": 1577962694 +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the Customer Identifier to which another receiver type is to be added. + +### Parameters + +`types` _mandatory_ + : `array` The receiver type to be added to the Customer Identifier. Possible values are: + - `bank_account` + - `vpa` + +`vpa` _optional_ +: `json object` Descriptor details for the virtual UPI ID. This is to be passed only when `vpa` is passed as the receiver `types`. + + `descriptor` + : `string` You can provide a custom descriptor for the UPI ID. This is a unique identifier provided by you to identify the customer. For example, `gaurikumari` and `akashkumar` are the descriptors in the usernames `rpy.payto00000gaurikumari` and `rpy.payto00000akashkumar` respectively. The combination of merchant prefix and descriptor must be 20 characters. If you go ahead with the default merchant prefix, you will get 10 characters. Hence, the descriptor should be 10 characters only. If a user tries to input 11 or more characters in a descriptor, our API will throw an error for invalid character length. + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md). + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Know more about [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the virtual bank account or virtual UPI ID. Sample IDs for: + - Virtual bank account: `ba_Di5gbQsGn0QSz3` + - Virtual UPI ID: `vpa_CkTmLXqVYPkbxx` + + `entity` + : `string` Name of the entity. Possible values are: + - `bank_account` + - `vpa` + + `ifsc` + : `string` The IFSC for the virtual bank account created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the virtual bank account. For example, `RBL Bank`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the virtual bank account or virtual UPI ID can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md). This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `username` + : `string` The UPI ID consists of the username and the bank handle. The `username` consists of the `namespace` (assigned by the bank to Razorpay), the `merchant prefix` (which can be customised by you) and the `descriptor` (which you provide to identify the customer). The unique identifier which forms the first half of the virtual UPI ID. For example, `rpy.payto00000gaurikumari`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. The descriptor can be 10 characters only. + + `handle` + : `string` The bank name that forms the second half of the virtual UPI ID. For example, `icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + + `address` + : `string` The UPI ID that combines the `username` and the `handle` with the `@` symbol. For example, `rpy.payto00000gaurikumari@icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> - Any request beyond `2147483647` UNIX timestamp will fail. +> - A Customer Identifier API that has not been used for 90 days will be automatically closed even if no `close_by` date has been set. +> + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. diff --git a/llm-content/api/payments/smart-collect-2/add-receiver-vpa.md b/llm-content/api/payments/smart-collect-2/add-receiver-vpa.md new file mode 100644 index 00000000..4f1e19cf --- /dev/null +++ b/llm-content/api/payments/smart-collect-2/add-receiver-vpa.md @@ -0,0 +1,259 @@ +--- +title: Add VPA Receiver to an Existing Customer Identifier +description: Add VPA Receiver to an existing Customer Identifier using the Razorpay API +--- + +# Add VPA Receiver to an Existing Customer Identifier + +## Add VPA Receiver to an Existing Customer Identifier (Smart Collect 2.0) + +Use this endpoint to add a VPA receiver to an existing Customer Identifier. +If you have created a Customer Identifier with only a VPA receiver, you cannot replace or update it using this endpoint. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/virtual_accounts/va_DzcFjMezDcN8vv/receivers +-H 'content-type: application/json' +-d '{ + "types": [ + "vpa" + ], + "vpa": { + "descriptor": "gaurikumari" + } +}' + +```php: PHP +$api = new Api('YOUR_KEY_ID, 'YOUR_KEY_SECRET'); +$api->virtualAccount->fetch($virtualId)->addReceiver(array('types' => array('vpa'),'vpa' => array('descriptor'=>'gauravkumar'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.addReceiver(virtualId,{ + types: [ + "vpa" + ], + vpa: { + descriptor: "gaurikumari" + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.virtual_account.add_receiver(virtualId,{ + "types": [ + "vpa" + ], + "vpa": { + "descriptor": "gaurikumari" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +types := make(map[string]interface{}) +types["0"] = "vpa" + +data:= map[string]interface{}{ + "types": types, + "vpa": map[string]interface{}{ + "descriptor": "gaurikumari", + }, + } + +body, err := client.VirtualAccount.AddReceiver("", data, nil) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String virtualId = "va_Di5gbNptcWV8fQ"; + +JSONObject virtualRequest = new JSONObject(); +List types = new ArrayList<>(); +types.add("vpa"); +virtualRequest.put("types",types); +JSONObject vpa = new JSONObject(); +vpa.put("descriptor","gaurikumari"); +virtualRequest.put("vpa",vpa); + +VirtualAccount virtualaccount = instance.virtualAccounts.addReceiver(virtualId,virtualRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +virtualId = "va_Di5gbNptcWV8fQ" + +para_attr = { + "types": [ + "vpa" + ], + "vpa": { + "descriptor": "gaurikumari" + } +} + +Razorpay::VirtualAccount.add_receiver(virtualId, para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] + +string virtualId = "va_Z6t7VFTb9xHeOs"; + +Dictionary virtualRequest = new Dictionary(); +List types = new List(); +types.Add("vpa"); +virtualRequest.Add("types", types); +Dictionary vpa = new Dictionary(); +vpa.Add("descriptor", "gaurikumari"); +virtualRequest.Add("vpa", vpa); + +VirtualAccount refund = client.VirtualAccount.Fetch(virtualId).AddReceiver(virtualRequest); +``` + +### Response + +```json: Success +{ + "id": "va_DzcFjMezDcN8vv", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "", + "amount_expected": null, + "notes": [], + "amount_paid": 0, + "customer_id": "cust_DzbSeP2RJD1ZHg", + "receivers": [ + { + "id": "ba_DzcFjVqAMSCEIW", + "entity": "bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223333232194699" + }, + { + "id": "vpa_DzcZR5ofjCUKAx", + "entity": "vpa", + "username": "rpy.payto00000gaurikumari", + "handle": "icici", + "address": "rpy.payto00000gaurikumari@icici" + } + ], + "close_by": null, + "closed_at": null, + "created_at": 1577969986 +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the Customer Identifier to which another receiver type is to be added. + +### Parameters + +`types` _mandatory_ + : `array` The receiver type to be added to the Customer Identifier. Possible values are: + - `bank_account` + - `vpa` + +`vpa` _optional_ +: `json object` Descriptor details for the virtual UPI ID. This is to be passed only when `vpa` is passed as the receiver `types`. + + `descriptor` + : `string` You can provide a custom descriptor for the UPI ID. This is a unique identifier provided by you to identify the customer. For example, `gaurikumari` and `akashkumar` are the descriptors in the usernames `rpy.payto00000gaurikumari` and `rpy.payto00000akashkumar` respectively. The combination of merchant prefix and descriptor must be 20 characters. If you go ahead with the default merchant prefix, you will get 10 characters. Hence, the descriptor should be 10 characters only. If a user tries to input 11 or more characters in a descriptor, our API will throw an error for invalid character length. + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md). + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Know more about [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the virtual bank account or virtual UPI ID. Sample IDs for: + - Virtual bank account: `ba_Di5gbQsGn0QSz3` + - Virtual UPI ID: `vpa_CkTmLXqVYPkbxx` + + `entity` + : `string` Name of the entity. Possible values are: + - `bank_account` + - `vpa` + + `ifsc` + : `string` The IFSC for the virtual bank account created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the virtual bank account. For example, `RBL Bank`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the virtual bank account or virtual UPI ID can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md). This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `username` + : `string` The UPI ID consists of the username and the bank handle. The `username` consists of the `namespace` (assigned by the bank to Razorpay), the `merchant prefix` (which can be customised by you) and the `descriptor` (which you provide to identify the customer). The unique identifier which forms the first half of the virtual UPI ID. For example, `rpy.payto00000gaurikumari`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. The descriptor can be 10 characters only. + + `handle` + : `string` The bank name that forms the second half of the virtual UPI ID. For example, `icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + + `address` + : `string` The UPI ID that combines the `username` and the `handle` with the `@` symbol. For example, `rpy.payto00000gaurikumari@icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> - Any request beyond `2147483647` UNIX timestamp will fail. +> - A Customer Identifier API that has not been used for 90 days will be automatically closed even if no `close_by` date has been set. +> + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. diff --git a/llm-content/api/payments/smart-collect-2/create-cust-id-bank-account-vpa.md b/llm-content/api/payments/smart-collect-2/create-cust-id-bank-account-vpa.md new file mode 100644 index 00000000..c6a7ebeb --- /dev/null +++ b/llm-content/api/payments/smart-collect-2/create-cust-id-bank-account-vpa.md @@ -0,0 +1,364 @@ +--- +title: Create a Customer Identifier With VPA and Bank Account Receivers With Smart Collect 2.0 +description: Create a Customer Identifier with both VPA and bank account receivers using the Razorpay API. Ensure seamless, secure transactions with efficient and reliable integration. +--- + +# Create a Customer Identifier With VPA and Bank Account Receivers With Smart Collect 2.0 + +## Create a Customer Identifier With VPA and Bank Account Receivers (Smart Collect 2.0) + +Use this endpoint to create a Customer Identifier with both `bank_account` and `vpa` receiver types. + +You can customise the merchant prefix of the vpa (`payto00000`) as per your business requirements. This is an on-demand feature and is not available by default. To enable creation of custom merchant prefix, raise a request on our [Support Portal](https://razorpay.com/support/#request). + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot create a Customer Identifier with VPA Receiver alone. You can only add VPA to an existing Customer Identifier. +> + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/virtual_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "receivers": { + "types": [ + "vpa", + "bank_account" + ], + "bank_account": + { + "descriptor": "1234567890" + } + "vpa": + { + "descriptor": "gaurikumari" + } + }, + "description": "Receive payment instalment from Gaurav Kumar- Flat No 105", + "customer_id": "cust_BM8NbnFAk1BVDA", + "close_by": 1681615838 +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject request = new JSONObject(); +JSONArray receiverTypeArray = new JSONArray(); +receiverTypeArray.put("vpa","bank_account"); +request.put("receiver_types", receiverTypeArray); +JSONObject notes = new JSONObject(); +notes.put("receiver_key", "receiver_value"); +request.put("notes", notes); +request.put("description", "First Customer Identifier"); + +VirtualAccount virtualAccount = razorpayClient.VirtualAccounts.create(request); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.virtual_account.create({ + "receivers": { + "types": [ + "vpa" + "bank_account" + ] + }, + "description": "Customer Identifier created for Raftar Soft", + "customer_id": "cust_CaVDm8eDRSXYME", + "close_by": 1681615838, + "notes": { + "project_name": "Banking Software" + } +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->virtualAccount->create(array('receivers' => array('types'=> array('vpa','bank_account')),'allowed_payers' => array(array('type'=>'vpa','bank_account','vpa','bank_account'=>array('ifsc'=>'RATN0VAAPIS','account_number'=>'2223330027558515'))),'description' => 'Customer Identifier created for Raftar Soft','customer_id' => 'cust_HssUOFiOd2b1TJ', 'notes' => array('project_name' => 'Banking Software'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.create({ + receivers: { + types: [ + "vpa" + "bank_account" + ] + }, + description: "Customer Identifier created for Raftar Soft", + customer_id: "cust_CaVDm8eDRSXYME", + close_by: 1681615838, + notes: { + project_name: "Banking Software" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +types := make(map[string]interface{}) +types["0"] = "vpa","qr_code" + +data:= map[string]interface{}{ + "receivers": map[string]interface{}{ + "types": types, + }, + "description": "Customer Identifier created for Raftar Soft", + "customer_id": "cust_CaVDm8eDRSXYME", + "close_by": 1681615838, + "notes": map[string]interface{}{ + "project_name": "Banking Software", + }, +} + +body, err := client.VirtualAccount.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary virtualRequest = new Dictionary(); +string[] types = { "vpa", "bank_account" }; +Dictionary typesParam = new Dictionary(); +typesParam.Add("types", types); +Dictionary vpaParam = new Dictionary(); +vpaParam.Add("descriptor", "gaurikumar"); +typesParam.Add("vpa", vpaParam); +virtualRequest.Add("receivers", typesParam); +virtualRequest.Add("description", "Virtual Account created for Raftar Soft"); +virtualRequest.Add("customer_id", "cust_NBJmkv5lDFKnaH"); +virtualRequest.Add("close_by", 1681615838); +Dictionary notes = new Dictionary(); +notes.Add("project_name", "Banking Software"); +virtualRequest.Add("notes", notes); + +VirtualAccount virtualaccount = client.VirtualAccount.Create(virtualRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "receivers": { + "types": [ + "vpa","bank_account" + ] + }, + "description": "Customer Identifier created for Raftar Soft", + "customer_id": "cust_CaVDm8eDRSXYME", + "close_by": 1681615838, + "notes": { + "project_name": "Banking Software" + } +} + +Razorpay::VirtualAccount.create(para_attr) + +``` + +### Response + +```json: Success +{ + "id": "va_DzaznJGgvduD1R", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Receive payment instalment from Gaurav Kumar- Flat No 105", + "amount_expected": null, + "notes": [], + "amount_paid": 0, + "customer_id": "cust_BM8NbnFAk1BVDA", + "receivers": [ + { + "id": "ba_Dzaznb0XK1yx1l", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223333226676435" + }, + { + "id": "vpa_DzaznS24HKkTBY", + "entity": "vpa", + "username": "rpy.payto00000gaurikumari", + "handle": "icici", + "address": "rpy.payto00000gaurikumari@icici" + } + ], + "close_by": 1681615838, + "closed_at": null, + "created_at": 1577965559 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`receivers` _mandatory_ +: `json object` Configuration of desired receivers for the Customer Identifier. + + `types` + : `array` List of desired receiver types. Possible values: + - `bank_account` + - `vpa` + + `vpa` _optional_ + : `json object` Descriptor details for the virtual UPI ID. This is to be passed only when `vpa` is passed as the receiver `types`. + + `descriptor` + : `string` You can provide a custom descriptor for the UPI ID. This is a unique identifier provided by you to identify the customer. For example, `gaurikumari` and `akashkumar` are the descriptors in the usernames `rpy.payto00000gaurikumari` and `rpy.payto00000akashkumar` respectively. The combination of merchant prefix and descriptor must be 20 characters. The length of the merchant prefix can vary between 4-10 characters, and the length of descriptor from 10-16 characters. + + `bank_account` _optional_ + : `json object` Descriptor details for the Bank Account. This is to be passed only when `bank_account` is passed as the receiver `types`. + + `descriptor`_optional_ + : `string` A unique, numeric / alphanumeric custom descriptor defined by you for the bank account. The maximum length allowed is 10 digits. + +> **INFO** +> +> **Handy Tips** +Please reach out to the [support team](https://razorpay.com/support/#request) if you are unable to pass the parameter with `bank_account`. + + +`description` _optional_ +: `string` A brief description of the Customer Identifier. + +`customer_id` _optional_ +: `string` Unique identifier of the customer to whom the Customer Identifier must be tagged. Create a customer using the [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`notes` _optional_ +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). + +`close_by` _optional_ +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. For example, `1681615838`. This needs to be passed only if you want the Customer Identifier to be temporary and auto-deleted after a specific usage time. + + +> **WARN** +> +> +> **Watch Out!** +> - While sharing the details of Customer Identifiers (created using RBL bank) with the customers, ensure that the fifth character in the IFSC is number `0` and not the letter O. For example, valid IFSC is `RATN0VAAPIS` and not `RATNOVAAPIS`. +> - A Customer Identifier will close automatically only if the UNIX timestamp is passed in the `close_by` request parameter. +> + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md). + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Know more about [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the virtual bank account or virtual UPI ID. Sample IDs for: + - Virtual bank account: `ba_Di5gbQsGn0QSz3` + - Virtual UPI ID: `vpa_CkTmLXqVYPkbxx` + + `entity` + : `string` Name of the entity. Possible values are: + - `bank_account` + - `vpa` + + `ifsc` + : `string` The IFSC for the virtual bank account created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the virtual bank account. For example, `RBL Bank`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the virtual bank account or virtual UPI ID can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md). This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `username` + : `string` The UPI ID consists of the username and the bank handle. The `username` consists of the `namespace` (assigned by the bank to Razorpay), the `merchant prefix` (which can be customised by you) and the `descriptor` (which you provide to identify the customer). The unique identifier which forms the first half of the virtual UPI ID. For example, `rpy.payto00000gaurikumari`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. The descriptor can be 10 characters only. + + `handle` + : `string` The bank name that forms the second half of the virtual UPI ID. For example, `icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + + `address` + : `string` The UPI ID that combines the `username` and the `handle` with the `@` symbol. For example, `rpy.payto00000gaurikumari@icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + +`close_by`_optional_ +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. This is returned only if the UNIX timestamp was specified during the Customer Identifier creation. There is no expiry time for a Customer Identifier unless specified during creation. + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. + +### Errors + +The api `` provided is invalid +* code: 4xx +* description: Occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the dashboard. +* solution: Make sure that the API keys are active and entered correctly. Also, make sure there are no whitespaces before or after the keys. + +The `field name` is required +* code: 400 +* description: Occurs when a mandatory field is empty. +* solution: Make sure that all the mandatory fields are filled. + +The id provided does not exist +* code: 400 +* description: Occurs when the `customer_id` passed is wrong or does not belong to the identifier associated to the API Keys used. +* solution: Make sure that the `customer_id` and the API keys used belong to the same identifier and same mode, whether test or live respectively. + +Receivers field is required +* code: 400 +* description: Occurs when the receivers field is empty. +* solution: Make sure that the receivers field is populated with receiver type as either bank account or VPA according to your receiver requirement. + +An active Customer Identifier with the same descriptor already exists for your account. +* code: 400 +* description: The description provided by you already exists for another account. +* solution: Provide a different description, as the same description already exists for an account. diff --git a/llm-content/api/payments/smart-collect-2/create-cust-id-vpa.md b/llm-content/api/payments/smart-collect-2/create-cust-id-vpa.md new file mode 100644 index 00000000..f4348080 --- /dev/null +++ b/llm-content/api/payments/smart-collect-2/create-cust-id-vpa.md @@ -0,0 +1,347 @@ +--- +title: Create a Customer Identifier With VPA Receiver +description: Create a Customer Identifier with VPA Receiver using the Razorpay API. +--- + +# Create a Customer Identifier With VPA Receiver + +## Create a Customer Identifier With VPA Receiver + +Use this endpoint to create a Customer Identifier with `vpa` as the receiver type. + +### Request + +``` curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/virtual_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "receivers": { + "types": [ + "vpa" + ], + "vpa": { // Pass this only for custom descriptor. + "descriptor": "gaurikumari" + } + }, + "description": "Receive payment instalment from Gaurav Kumar- Flat No 105", + "customer_id": "cust_BM8NbnFAk1BVDA", + "close_by": 1681615838 +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject request = new JSONObject(); +JSONArray receiverTypeArray = new JSONArray(); +receiverTypeArray.put("vpa"); +request.put("receiver_types", receiverTypeArray); +JSONObject notes = new JSONObject(); +notes.put("receiver_key", "receiver_value"); +request.put("notes", notes); +request.put("description", "First Customer Identifier"); + +VirtualAccount virtualAccount = razorpayClient.VirtualAccounts.create(request); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.virtual_account.create({ + "receivers": { + "types": [ + "vpa" + ] + }, + "description": "Customer Identifier created for Raftar Soft", + "customer_id": "cust_CaVDm8eDRSXYME", + "close_by": 1681615838, + "notes": { + "project_name": "Banking Software" + } +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->virtualAccount->create(array('receivers' => array('types'=> array('vpa')),'allowed_payers' => array(array('type'=>'vpa','vpa'=>array('ifsc'=>'RATN0VAAPIS','account_number'=>'2223330027558515'))),'description' => 'Customer Identifier created for Raftar Soft','customer_id' => 'cust_HssUOFiOd2b1TJ', 'notes' => array('project_name' => 'Banking Software'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.create({ + receivers: { + types: [ + "vpa" + ] + }, + description: "Customer Identifier created for Raftar Soft", + customer_id: "cust_CaVDm8eDRSXYME", + close_by: 1681615838, + notes: { + project_name: "Banking Software" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +types := make(map[string]interface{}) +types["0"] = "vpa" + +data:= map[string]interface{}{ + "receivers": map[string]interface{}{ + "types": types, + }, + "description": "Customer Identifier created for Raftar Soft", + "customer_id": "cust_CaVDm8eDRSXYME", + "close_by": 1681615838, + "notes": map[string]interface{}{ + "project_name": "Banking Software", + }, +} + +body, err := client.VirtualAccount.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary virtualRequest = new Dictionary(); +string[] types = { "vpa" }; +Dictionary typesParam = new Dictionary(); +typesParam.Add("types", types); +Dictionary vpaParam = new Dictionary(); +vpaParam.Add("descriptor", "gaurikumari"); +typesParam.Add("vpa", vpaParam); +virtualRequest.Add("receivers", typesParam); +virtualRequest.Add("description", "Virtual Account created for Raftar Soft"); +virtualRequest.Add("customer_id", "cust_NBJmkv5lDFKnaH"); +virtualRequest.Add("close_by", 1681615838); +Dictionary notes = new Dictionary(); +notes.Add("project_name", "Banking Software"); +virtualRequest.Add("notes", notes); + +VirtualAccount virtualaccount = client.VirtualAccount.Create(virtualRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "receivers": { + "types": [ + "vpa" + ] + }, + "description": "Customer Identifier created for Raftar Soft", + "customer_id": "cust_CaVDm8eDRSXYME", + "close_by": 1681615838, + "notes": { + "project_name": "Banking Software" + } +} + +Razorpay::VirtualAccount.create(para_attr) +``` + +### Response + +```json: Success +{ + "id": "va_DzaBLzIz494C64", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Receive payment instalment from Gaurav Kumar- Flat No 105", + "amount_expected": null, + "notes": [], + "amount_paid": 0, + "customer_id": "cust_BM8NbnFAk1BVDA", + "receivers": [ + { + "id": "vpa_DzaBM9AEJew8H1", + "entity": "vpa", + "username": "rpy.payto00000gaurikumari", + "handle": "icici", + "address": "rpy.payto00000gaurikumari@icici" + } + ], + "close_by": 1681615838, + "closed_at": null, + "created_at": 1577962694 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`receivers` _mandatory_ +: `json object` Configuration of desired receivers for the Customer Identifier. + + `types` + : `array` List of desired receiver types. Possible values: + - `bank_account` + - `vpa` + + `vpa` _optional_ + : `json object` Descriptor details for the virtual UPI ID. This is to be passed only when `vpa` is passed as the receiver `types`. + + `descriptor` + : `string` You can provide a custom descriptor for the UPI ID. This is a unique identifier provided by you to identify the customer. For example, `gaurikumari` and `akashkumar` are the descriptors in the usernames `rpy.payto00000gaurikumari` and `rpy.payto00000akashkumar` respectively. The combination of merchant prefix and descriptor must be 20 characters. The length of the merchant prefix can vary between 4-10 characters, and the length of descriptor from 10-16 characters. + + `bank_account` _optional_ + : `json object` Descriptor details for the Bank Account. This is to be passed only when `bank_account` is passed as the receiver `types`. + + `descriptor`_optional_ + : `string` A unique, numeric / alphanumeric custom descriptor defined by you for the bank account. The maximum length allowed is 10 digits. + +> **INFO** +> +> **Handy Tips** +Please reach out to the [support team](https://razorpay.com/support/#request) if you are unable to pass the parameter with `bank_account`. + + +`description` _optional_ +: `string` A brief description of the Customer Identifier. + +`customer_id` _optional_ +: `string` Unique identifier of the customer to whom the Customer Identifier must be tagged. Create a customer using the [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`notes` _optional_ +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). + +`close_by` _optional_ +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. For example, `1681615838`. This needs to be passed only if you want the Customer Identifier to be temporary and auto-deleted after a specific usage time. + + +> **WARN** +> +> +> **Watch Out!** +> - While sharing the details of Customer Identifiers (created using RBL bank) with the customers, ensure that the fifth character in the IFSC is number `0` and not the letter O. For example, valid IFSC is `RATN0VAAPIS` and not `RATNOVAAPIS`. +> - A Customer Identifier will close automatically only if the UNIX timestamp is passed in the `close_by` request parameter. +> + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md). + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Know more about [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the virtual bank account or virtual UPI ID. Sample IDs for: + - Virtual bank account: `ba_Di5gbQsGn0QSz3` + - Virtual UPI ID: `vpa_CkTmLXqVYPkbxx` + + `entity` + : `string` Name of the entity. Possible values are: + - `bank_account` + - `vpa` + + `ifsc` + : `string` The IFSC for the virtual bank account created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the virtual bank account. For example, `RBL Bank`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the virtual bank account or virtual UPI ID can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md). This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `username` + : `string` The UPI ID consists of the username and the bank handle. The `username` consists of the `namespace` (assigned by the bank to Razorpay), the `merchant prefix` (which can be customised by you) and the `descriptor` (which you provide to identify the customer). The unique identifier which forms the first half of the virtual UPI ID. For example, `rpy.payto00000gaurikumari`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. The descriptor can be 10 characters only. + + `handle` + : `string` The bank name that forms the second half of the virtual UPI ID. For example, `icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + + `address` + : `string` The UPI ID that combines the `username` and the `handle` with the `@` symbol. For example, `rpy.payto00000gaurikumari@icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> - Any request beyond `2147483647` UNIX timestamp will fail. +> - A Customer Identifier API that has not been used for 90 days will be automatically closed even if no `close_by` date has been set. +> + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. + +### Errors + +The api `` provided is invalid +* code: 4xx +* description: Occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the dashboard. +* solution: Make sure that the API keys are active and entered correctly. Also, make sure there are no whitespaces before or after the keys. + +The `field name` is required +* code: 400 +* description: Occurs when a mandatory field is empty. +* solution: Make sure that all the mandatory fields are filled. + +The id provided does not exist +* code: 400 +* description: Occurs when the `customer_id` passed is wrong or does not belong to the identifier associated to the Keys used. +* solution: Make sure that the `customer_id` and the API keys used belong to the same identifier and same mode, whether test or live respectively. + +Receivers field is required +* code: 400 +* description: Occurs when the receivers field is empty. +* solution: Make sure that the receivers field is populated with receiver type as either bank account or VPA according to your receiver requirement. + +An active Customer Identifier with the same descriptor already exists for your account. +* code: 400 +* description: The description provided by you already exists for another account. +* solution: Provide a different description, as the same description already exists for an account. diff --git a/llm-content/api/payments/smart-collect-2/entity.md b/llm-content/api/payments/smart-collect-2/entity.md new file mode 100644 index 00000000..8b03abce --- /dev/null +++ b/llm-content/api/payments/smart-collect-2/entity.md @@ -0,0 +1,130 @@ +--- +title: Smart Collect 2.0 Entity +description: Entity parameters and sample code for Smart Collect 2.0 API. +--- + +# Smart Collect 2.0 Entity + +The Smart Collect 2.0 entity has the following parameters: + +### Response + +```json: Success +{ + "id": "va_DzcFjMezDcN8vv", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "", + "amount_expected": null, + "notes": [], + "amount_paid": 0, + "customer_id": "cust_DzbSeP2RJD1ZHg", + "receivers": [ + { + "id": "ba_DzcFjVqAMSCEIW", + "entity": "bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223333232194699" + }, + { + "id": "vpa_DzcZR5ofjCUKAx", + "entity": "vpa", + "username": "rpy.payto00000gaurikumari", + "handle": "icici", + "address": "rpy.payto00000gaurikumari@icici" + } + ], + "close_by": null, + "closed_at": null, + "created_at": 1577969986 +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md). + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Know more about [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the virtual bank account or virtual UPI ID. Sample IDs for: + - Virtual bank account: `ba_Di5gbQsGn0QSz3` + - Virtual UPI ID: `vpa_CkTmLXqVYPkbxx` + + `entity` + : `string` Name of the entity. Possible values are: + - `bank_account` + - `vpa` + + `ifsc` + : `string` The IFSC for the virtual bank account created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the virtual bank account. For example, `RBL Bank`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the virtual bank account or virtual UPI ID can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md). This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `username` + : `string` The UPI ID consists of the username and the bank handle. The `username` consists of the `namespace` (assigned by the bank to Razorpay), the `merchant prefix` (which can be customised by you) and the `descriptor` (which you provide to identify the customer). The unique identifier which forms the first half of the virtual UPI ID. For example, `rpy.payto00000gaurikumari`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. The descriptor can be 10 characters only. + + `handle` + : `string` The bank name that forms the second half of the virtual UPI ID. For example, `icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + + `address` + : `string` The UPI ID that combines the `username` and the `handle` with the `@` symbol. For example, `rpy.payto00000gaurikumari@icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> - Any request beyond `2147483647` UNIX timestamp will fail. +> - A Customer Identifier API that has not been used for 90 days will be automatically closed even if no `close_by` date has been set. +> + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. diff --git a/llm-content/api/payments/smart-collect-2/fetch-payments-upi.md b/llm-content/api/payments/smart-collect-2/fetch-payments-upi.md new file mode 100644 index 00000000..6a05db7f --- /dev/null +++ b/llm-content/api/payments/smart-collect-2/fetch-payments-upi.md @@ -0,0 +1,193 @@ +--- +title: Fetch Payments Made Using UPI Payment Method +description: Fetch Payments made using UPI payment method, using the Razorpay API +--- + +# Fetch Payments Made Using UPI Payment Method + +## Fetch Payments Made Using UPI (Smart Collect 2.0) + +Use this endpoint to retrieve details of payments made using the UPI payment method. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET \ +https://api.razorpay.com/v1/payments/pay_E5YETrWuVgP3fI/upi_transfer \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_CmiztqmYJPtDAu"; + +Payment payment = instance.payments.fetchupiTransfers(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($virtualId)->upiTransfer(); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.upi_transfer(paymentId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.upiTransfer(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.upiTransfer("", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymend_id = "pay_Di5iqCqA1WEHq6" + +Razorpay::Razorpay::Payment.fetch(paymend_id).upiTransfer +``` + +### Response + +```json: Success +{ + "id": "ut_E5YEUKb9yA0YvX", + "entity": "upi_transfer", + "amount": 100, + "payer_vpa": "gauravkumar@exampleupi", + "payer_bank": "HDFC BANK LTD", + "payer_account": "50100000000001", + "payer_ifsc": "HDFC0000004", + "payment_id": "pay_E5YETrWuVgP3fI", + "npci_reference_id": "001718859181", + "virtual_account_id": "va_E5V3Rb3sQaMS5v", + "virtual_account": { + "id": "va_E5V3Rb3sQaMS5v", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "First Customer Identifier", + "amount_expected": null, + "notes": [], + "amount_paid": 200, + "customer_id": "cust_9xnHzNGIEY4TAV", + "receivers": [ + { + "id": "vpa_E5V3RsO1g4QK7t", + "entity": "vpa", + "username": "rpy.payto00000gaurikumari", + "handle": "icici", + "address": "rpy.payto00000gaurikumari@icici" + } + ], + "close_by": null, + "closed_at": null, + "created_at": 1579254678 + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the payment made to the Customer Identifier. + +### Parameters + +`id` +: `string` The unique identifier of the UPI transfer. + +`entity` +: `string` The name of the entity. Here, it is `upi_transfer`. + +`amount` +: `integer` The amount paid by the customer. + +`payer_vpa` +: `string` The UPI ID of the customer that is used to make the payment. + +`payer_bank` +: `string` The name of the customer's bank. + +`payer_account` +: `string` The bank account number of the customer that is linked to the UPI ID. + +`payer_ifsc` +: `string` The IFSC associated with the bank account. + +`payment_id` +: `string` The unique identifier of the payment made by the customer. + +`npci_reference_id` +: `string` The unique reference number provided by NPCI for the payment. + +`virtual_account_id` +: `string` The unique identifier of the Customer Identifier. + +`virtual_account` +: `object` Details of the Customer Identifier. + + `id` + : `string` The unique identifier of the Customer Identifier. + + `name` + : `string` The `merchant billing label` as it appears on Dashboard. + + `entity` + : `string` The name of the entity. Here, it is `virtual account`. + + `status` + : `string` Indicates the status of the Customer Identifier. Possible values are: + - `active` + - `closed` + + `description` + : `string` A brief description about the Customer Identifier. + + `amount_paid` + : `integer` The amount paid by the customer into the Customer Identifier. + + `notes` + : `object` Any custom notes added during the creation of the Customer Identifier. + + `customer_id` + : `string` The unique identifier of the customer the Customer Identifier is linked with. For more details, refer to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + + `receivers` + : `object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the virtual UPI ID. For example, `vpa_CkTmLXqVYPkbxx`. + + `entity` + : `string` The name of the entity. Here, it is `vpa`. + + `username` + : `string` The unique identifier which forms the first half of the virtual UPI ID. For example, `rpy.payto00000gaurikumari`. + + `handle` + : `string` The bank name that forms the second half of the virtual UPI ID. For example, `icici`. + + `address` + : `string` The UPI ID that combines the `username` and the `handle` with the `@` symbol. For example, `rpy.payto00000gaurikumari@icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + + `close_by` + : `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + +> **INFO** +> +> **Handy Tips** +Any request beyond `2147483647` UNIX timestamp will fail. + + `closed_at` + : `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + + `created_at` + : `integer` UNIX timestamp at which the Customer Identifier was created. diff --git a/llm-content/api/payments/smart-collect-2/tpv-add-receiver-bank-transfer.md b/llm-content/api/payments/smart-collect-2/tpv-add-receiver-bank-transfer.md new file mode 100644 index 00000000..20808d6a --- /dev/null +++ b/llm-content/api/payments/smart-collect-2/tpv-add-receiver-bank-transfer.md @@ -0,0 +1,239 @@ +--- +title: Add Bank Account Receiver to an Existing Customer Identifier (TPV) +description: Integrate Bank Account Receiver to an existing Customer Identifier seamlessly using the Razorpay **Smart Collect TPV** API. Ensure secure and efficient transactions with robust integration. +--- + +# Add Bank Account Receiver to an Existing Customer Identifier (TPV) + +## Add Bank Account Receiver to an Existing Customer Identifier + +Use this endpoint to add a bank account receiver to an existing Customer Identifier. If you have created a Customer Identifier with a receiver, for example, bank account, you cannot add another bank account receiver or replace it. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/virtual_accounts/va_DzaBLzIz494C64/receivers +-H 'content-type: application/json' +-d '{ + "types": [ + "bank_account" + ] +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String virtualId = "va_Di5gbNptcWV8fQ"; + +JSONObject virtualRequest = new JSONObject(); +List types = new ArrayList<>(); +types.add("bank_account"); +virtualRequest.put("types",types); +JSONObject vpa = new JSONObject(); +bank_account.put("descriptor","gaurikumari"); +virtualRequest.put("bank_account",bank_account); + +VirtualAccount virtualaccount = instance.virtualAccounts.addReceiver(virtualId,virtualRequest); + +```python: Python +import razorpay +razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]")) + +client.virtual_account.add_receiver(virtualId,{ + "types": [ + "bank_account" + ], + "bank_account": { + "descriptor": "gauravkumar" + } +}) + +```php: PHP +$api = new Api('YOUR_KEY_ID, 'YOUR_KEY_SECRET'); +$api->virtualAccount->fetch($virtualId)->addReceiver(array('types' => array('bank_account'),'bank_account' => array('descriptor'=>'gauravkumar'))); + +```ruby: Ruby +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +virtualId = "va_Di5gbNptcWV8fQ" + +para_attr = { + "types": [ + "bank_account" + ], + "bank_account": { + "descriptor": "gauravkumar" + } +} + +Razorpay::VirtualAccount.add_receiver(virtualId, para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.addReceiver(virtualId,{ + types: [ + "bank_account" + ], + bank_account: { + descriptor: "gauravkumar" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +types := make(map[string]interface{}) +type["0"] = "vpa" + +data:= map[string]interface{}{ + "type": type, + "bank_account": map[string]interface{}{ + "descriptor": "gauravkumar", + }, + } + +body, err := client.VirtualAccount.AddReceiver("", data, nil) +``` + +### Response + +```json: Success +{ + "id": "va_DzcFjMezDcN8vv", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "", + "amount_expected": null, + "notes": [], + "amount_paid": 0, + "customer_id": "cust_DzbSeP2RJD1ZHg", + "receivers": [ + { + "id": "ba_DzcFjVqAMSCEIW", + "entity": "bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223333232194699" + }, + { + "id": "vpa_DzcZR5ofjCUKAx", + "entity": "bank_account", + "username": "rpy.payto00000gaurikumari", + "handle": "icici", + "address": "rpy.payto00000gaurikumari@icici" + } + ], + "close_by": null, + "closed_at": null, + "created_at": 1577969986 +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the Customer Identifier to which another receiver type is to be added. + +### Parameters + +`types` _mandatory_ +: `array` The receiver type to be added to the Customer Identifier. Possible values are: + - `bank_account` + - `vpa` + +`vpa` _optional_ +: `json object` Descriptor details for the virtual UPI ID. This is to be passed only when `vpa` is passed as the receiver `types`. + + `descriptor` + : `string` You can provide a custom descriptor for the UPI ID. This is a unique identifier provided by you to identify the customer. For example, `gaurikumari` and `akashkumar` are the descriptors in the usernames `rpy.payto00000gaurikumari` and `rpy.payto00000akashkumar` respectively. The combination of merchant prefix and descriptor must be 20 characters. If you go ahead with the default merchant prefix, you will get 10 characters. Hence the descriptor should be 10 characters only. If a user tries to input 11 or more characters in a descriptor, our API will throw an error for invalid character length. + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md). + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Know more about [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the virtual bank account or virtual UPI ID. Sample IDs for: + - Virtual bank account: `ba_Di5gbQsGn0QSz3` + - Virtual UPI ID: `vpa_CkTmLXqVYPkbxx` + + `entity` + : `string` Name of the entity. Possible values are: + - `bank_account` + - `vpa` + + `ifsc` + : `string` The IFSC for the virtual bank account created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the virtual bank account. For example, `RBL Bank`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the virtual bank account or virtual UPI ID can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md). This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `username` + : `string` The UPI ID consists of the username and the bank handle. The `username` consists of the `namespace` (assigned by the bank to Razorpay), the `merchant prefix` (which can be customised by you) and the `descriptor` (which you provide to identify the customer). The unique identifier which forms the first half of the virtual UPI ID. For example, `rpy.payto00000gaurikumari`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. The descriptor can be 10 characters only. + + `handle` + : `string` The bank name that forms the second half of the virtual UPI ID. For example, `icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + + `address` + : `string` The UPI ID that combines the `username` and the `handle` with the `@` symbol. For example, `rpy.payto00000gaurikumari@icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> - Any request beyond `2147483647` UNIX timestamp will fail. +> - A Customer Identifier API that has not been used for 90 days will be automatically closed even if no `close_by` date has been set. +> + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. diff --git a/llm-content/api/payments/smart-collect-2/tpv-add-receiver-vpa.md b/llm-content/api/payments/smart-collect-2/tpv-add-receiver-vpa.md new file mode 100644 index 00000000..1104c7ee --- /dev/null +++ b/llm-content/api/payments/smart-collect-2/tpv-add-receiver-vpa.md @@ -0,0 +1,257 @@ +--- +title: Add VPA Receiver to an Existing Customer Identifier (TPV) +description: Add VPA Receiver to an existing Customer Identifier using the Razorpay **Smart Collect TPV** API. +--- + +# Add VPA Receiver to an Existing Customer Identifier (TPV) + +## Add VPA Receiver to an Existing Customer Identifier + +Use this endpoint to add a VPA receiver to an existing Customer Identifier. + +If you have created a Customer Identifier with only a VPA receiver, you cannot replace or update it. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/virtual_accounts/va_DzcFjMezDcN8vv/receivers +-H 'content-type: application/json' +-d '{ + "types": [ + "vpa" + ], + "vpa": { + "descriptor": "gaurikumari" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String virtualId = "va_Di5gbNptcWV8fQ"; + +JSONObject virtualRequest = new JSONObject(); +List types = new ArrayList<>(); +types.add("vpa"); +virtualRequest.put("types",types); +JSONObject vpa = new JSONObject(); +vpa.put("descriptor","gaurikumari"); +virtualRequest.put("vpa",vpa); + +VirtualAccount virtualaccount = instance.virtualAccounts.addReceiver(virtualId,virtualRequest); + +```python: Python +import razorpay +razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]")) + +client.virtual_account.add_receiver(virtualId,{ + "types": [ + "vpa" + ], + "vpa": { + "descriptor": "gauravkumar" + } +}) + +```php: PHP +$api = new Api('YOUR_KEY_ID, 'YOUR_KEY_SECRET'); +$api->virtualAccount->fetch($virtualId)->addReceiver(array('types' => array('vpa'),'vpa' => array('descriptor'=>'gauravkumar'))); + +```ruby: Ruby +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +virtualId = "va_Di5gbNptcWV8fQ" + +para_attr = { + "types": [ + "vpa" + ], + "vpa": { + "descriptor": "gauravkumar" + } +} + +Razorpay::VirtualAccount.add_receiver(virtualId, para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.addReceiver(virtualId,{ + types: [ + "vpa" + ], + vpa: { + descriptor: "gauravkumar" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +types := make(map[string]interface{}) +type["0"] = "vpa" + +data:= map[string]interface{}{ + "type": type, + "vpa": map[string]interface{}{ + "descriptor": "gauravkumar", + }, + } + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] + +string virtualId = "va_Z6t7VFTb9xHeOs"; + +Dictionary virtualRequest = new Dictionary(); +List types = new List(); +types.Add("vpa"); +virtualRequest.Add("types", types); +Dictionary vpa = new Dictionary(); +vpa.Add("descriptor", "gaurikumari"); +virtualRequest.Add("vpa", vpa); + +VirtualAccount refund = client.VirtualAccount.Fetch(virtualId).AddReceiver(virtualRequest); +``` + +### Response + +```json: Success +{ + "id": "va_DzcFjMezDcN8vv", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "", + "amount_expected": null, + "notes": [], + "amount_paid": 0, + "customer_id": "cust_DzbSeP2RJD1ZHg", + "receivers": [ + { + "id": "ba_DzcFjVqAMSCEIW", + "entity": "bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223333232194699" + }, + { + "id": "vpa_DzcZR5ofjCUKAx", + "entity": "vpa", + "username": "rpy.payto00000gaurikumari", + "handle": "icici", + "address": "rpy.payto00000gaurikumari@icici" + } + ], + "close_by": null, + "closed_at": null, + "created_at": 1577969986 +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the Customer Identifier to which another receiver type is to be added. + +### Parameters + +`types` _mandatory_ +: `array` The receiver type to be added to the Customer Identifier. Possible values are: + - `bank_account` + - `vpa` + +`vpa` _optional_ +: `json object` Descriptor details for the virtual UPI ID. This is to be passed only when `vpa` is passed as the receiver `types`. + + `descriptor` + : `string` You can provide a custom descriptor for the UPI ID. This is a unique identifier provided by you to identify the customer. For example, `gaurikumari` and `akashkumar` are the descriptors in the usernames `rpy.payto00000gaurikumari` and `rpy.payto00000akashkumar` respectively. The combination of merchant prefix and descriptor must be 20 characters. If you go ahead with the default merchant prefix, you will get 10 characters. Hence the descriptor should be 10 characters only. If a user tries to input 11 or more characters in a descriptor, our API will throw an error for invalid character length. + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md). + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Know more about [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the virtual bank account or virtual UPI ID. Sample IDs for: + - Virtual bank account: `ba_Di5gbQsGn0QSz3` + - Virtual UPI ID: `vpa_CkTmLXqVYPkbxx` + + `entity` + : `string` Name of the entity. Possible values are: + - `bank_account` + - `vpa` + + `ifsc` + : `string` The IFSC for the virtual bank account created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the virtual bank account. For example, `RBL Bank`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the virtual bank account or virtual UPI ID can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md). This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `username` + : `string` The UPI ID consists of the username and the bank handle. The `username` consists of the `namespace` (assigned by the bank to Razorpay), the `merchant prefix` (which can be customised by you) and the `descriptor` (which you provide to identify the customer). The unique identifier which forms the first half of the virtual UPI ID. For example, `rpy.payto00000gaurikumari`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. The descriptor can be 10 characters only. + + `handle` + : `string` The bank name that forms the second half of the virtual UPI ID. For example, `icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + + `address` + : `string` The UPI ID that combines the `username` and the `handle` with the `@` symbol. For example, `rpy.payto00000gaurikumari@icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> - Any request beyond `2147483647` UNIX timestamp will fail. +> - A Customer Identifier API that has not been used for 90 days will be automatically closed even if no `close_by` date has been set. +> + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. diff --git a/llm-content/api/payments/smart-collect-tpv.md b/llm-content/api/payments/smart-collect-tpv.md new file mode 100644 index 00000000..38ae61c2 --- /dev/null +++ b/llm-content/api/payments/smart-collect-tpv.md @@ -0,0 +1,57 @@ +--- +title: API | Payments - Smart Collect With TPV +heading: Smart Collect With TPV +description: Create and manage Customer Identifiers and fetch payment details using Razorpay **Smart Collect TPV** APIs. +--- + +# Smart Collect With TPV + +You can create Customer Identifiers using the **Smart Collect** APIs to accept large payments from your customers in the form of bank transfers via NEFT, RTGS and IMPS. In addition, you can also add an Allowed Payer or delete an Allowed payer using **Smart Collect TPV** APIs. + +> **INFO** +> +> +> **Handy Tips** +> +> If you are a new customer, explore [Smart Collect 2.0 ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-2.md) . It uses the same APIs as **Smart Collect**, while also offering additional endpoints—such as creating a Customer Identifier with a VPA and bank account, fetching UPI payments, and adding a VPA Receiver to an existing Customer Identifier. +> +> + +Fork the Razorpay Postman Public Workspace and try the Smart Collect with TPV APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-3ea069ae-e9fc-4778-b70b-193e0693e476) + +### Related Guides + +[ About Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/smart-collect.md) + +### Endpoints + + - **post** `/v1/virtual_accounts` - Create a Customer Identifier with TPV: + Creates a Customer Identifier with bank account. + + + - **post** `/v1/virtual_accounts/:va_id/allowed_payers` - Add an Allowed Payer With TPV: + Adds an allowed payer's account. + + + - **get** `/v1/virtual_accounts/:id` - Fetch a Customer Identifier Using id With TPV: + Retrieves details of a Customer Identifier with id. + + + - **get** `/v1/virtual_accounts` - Fetch All Customer Identifiers With TPV: + Retrieves details of all Customer Identifiers. + + + - **get** `/v1/virtual_accounts/:id/payments` - Fetch Payments for a Customer Identifier With TPV: + Retrieves details of payments made against a particular Customer Identifier. + + + - **get** `/v1/payments/:id/bank_transfer` - Fetch Payment Details Using id and Transfer Method With TPV: + Retrieves details of a payment using payment id and bank transfer method. + + + - **delete** `/v1/virtual_accounts/:va_id/allowed_payers/:id` - Delete an Allowed Payer Account With TPV: + Deletes an allowed payer account. diff --git a/llm-content/api/payments/smart-collect-tpv/add-allowed-payer.md b/llm-content/api/payments/smart-collect-tpv/add-allowed-payer.md new file mode 100644 index 00000000..d7f6841c --- /dev/null +++ b/llm-content/api/payments/smart-collect-tpv/add-allowed-payer.md @@ -0,0 +1,324 @@ +--- +title: Add an Allowed Payer Account +description: Add an Allowed Payer Account using the Razorpay **Smart Collect TPV** APIs. +--- + +# Add an Allowed Payer Account + +## Add an Allowed Payer With TPV + +Use this endpoint to add an allowed payer's account. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/virtual_accounts/{va_id}/allowed_payers \ +-H "Content-Type: application/json" \ +-d '{ + "type":"bank_account", + "bank_account":{ + "ifsc":"UTIB0000013", + "account_number":"914010012345679" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String virtualId = "va_Di5gbNptcWV8fQ"; + +JSONObject virtualRequest = new JSONObject(); +virtualRequest.put("type","bank_account"); +JSONObject vpa = new JSONObject(); +vpa.put("ifsc","UTIB0000013"); +vpa.put("account_number","914011112345679"); +virtualRequest.put("bank_account",vpa); + +VirtualAccount virtualaccount = instance.virtualAccounts.addAllowedPayers(virtualId,virtualRequest); + +```php: PHP +$api = new Api($api_key, $api_secret); + +$api->virtualAccount->fetch($virtualId)->addAllowedPayer(array('types' => 'bank_account','bank_account' => array('ifsc'=>'UTIB0000013','account_number'=>'914010012345679'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.allowedPayer(virtualId,{ + types: "bank_account", + bank_account: { + ifsc: "UTIB0000013", + account_number: "914010012345679" + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.virtual_account.add_allowed_player(virtualId,{ + "types": "bank_account", + "bank_account": { + "ifsc": "UTIB0000013", + "account_number": 914010012345679 + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +virtualId = "va_Di5gbNptcWV8fQ" + +para_attr = { + "type": "bank_account", + "bank_account": { + "ifsc": "UTIB0000013", + "account_number": 914010012345679 + } +} + +Razorpay::VirtualAccount.allowed_payer(virtualId, para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +types := make(map[string]interface{}) +types["0"] = "vpa" + + data:= map[string]interface{}{ + "type": types, + "vpa": map[string]interface{}{ + "descriptor": "gaurikumari", + }, + } +body, err := client.VirtualAccount.AllowedPayer("", data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] + +String virtualId = "va_Z6t7VFTb9xHeOs"; + +Dictionary virtualRequest = new Dictionary(); +virtualRequest.Add("type", "bank_account"); +Dictionary vpa = new Dictionary(); +vpa.Add("ifsc", "UTIB0000013"); +vpa.Add("account_number", "914012112345679"); +virtualRequest.Add("bank_account", vpa); + +VirtualAccount refund = client.VirtualAccount.Fetch("va_MaxCJzVjbKRBAr").AddAllowedPayers(virtualRequest); +``` + +### Response + +```json: Success +{ + "id": "va_IUVQ3usNTeteGl", + "name": "Smart Grofers", + "entity": "virtual_account", + "status": "active", + "description": "Customer Identifier created for Raftar Soft", + "amount_expected": null, + "notes": { + "project_name": "Banking Software" + }, + "amount_paid": 10000, + "customer_id": null, + "receivers": [ + { + "id": "ba_IUVQ424tVVobzZ", + "entity": "bank_account", + "ifsc": "RAZR0000001", + "bank_name": null, + "name": "Smart Grofers", + "notes": [], + "account_number": "1112220007297133" + }, + { + "id": "vpa_IUVRKM3WejBvhc", + "entity": "vpa", + "username": "rzr.payto000007005195066", + "handle": "icic", + "address": "rzr.payto000007005195066@icic" + } + ], + "allowed_payers": [ + { + "type": "bank_account", + "id": "ba_JRSigCQ3MUCBYn", + "bank_account": { + "ifsc": "UTIB0000013", + "account_number": "914010012345679" + } + } + ], + "close_by": 1681615838, + "closed_at": null, + "created_at": 1638862811 +} +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Only 10 allowed payer accounts can be added", + "field":"allowed_payers", + "source":"business", + "step":"virtual_account_edit", + "reason":"allowed_payer_limit_exceeded", + "metadata":[] + } +} +``` + +### Parameters + +`va_id` _mandatory_ +: `string` The unique identifier of the Customer Identifier to which you want to add `allowed_payers` account details. + +### Parameters + +`type` _mandatory_ +: `string` The type of account. Possible value is `bank_account`. + +`bank_account` _mandatory_ +: `object` Indicates the bank account details such as `ifsc` and `account_number`. + + `ifsc` _mandatory_ + : `string` The IFSC associated with the bank account. + + `account_number` _mandatory_ + : `string` The bank account number. + +> **INFO** +> +> +> **Handy Tips** +> +> SBI account numbers can contain zeros preceding actual numbers. You should enter the complete account number, including these zeros, or else the transaction will fail, and the amount will be refunded automatically. +> +> For example, if the account number is 00000022234631312, add the complete account number and not just 22234631312. +> + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to know more. + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Check the [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) section to know more. + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the Customer Identifier. Sample id for Customer Identifier is `ba_Di5gbQsGn0QSz3` + + `entity` + : `string` Name of the entity. Possible value is `bank_account`. + + `ifsc` + : `string` The IFSC for the Customer Identifier created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the Customer Identifier. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to know more. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + +`allowed_payers` +: `array` Details of customer bank accounts which will be allowed to make payments to your Customer Identifier. The parent parameter under which the customer bank account details must be passed as child parameters. You can add account details of 10 allowed payers for a Customer Identifier. For more details, refer to the [Third Party Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/third-party-validation.md) section. + + `type` + : `string` The type of account through which the customer will make the payment. Possible value is `bank_account`. + + `id` + : `string` The unique identifier of the `allowed_payers` account. + + `bank_account` + : `object` Indicates the bank account details such as `ifsc` and `account_number`. + + `ifsc` + : `string` The IFSC associated with the bank account through which the customer is expected to make the payment. + + `account_number` + : `string` The bank account number through which the customer is expected to make the payment. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). Any request beyond `2147483647` UNIX timestamp will fail. + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. + +### Errors + +Account validation is only applicable on bank account as a receiver type +* code: 400 +* description: This error occurs when you try to add an allowed payer account on a Customer Identifier with VPA added as a receiver (with or without a Bank account). +* solution: You cannot add an allowed payer account on a Customer Identifier with VPA added as a receiver (with or without a Bank account). + +Only 10 allowed payer accounts can be added. +* code: 400 +* description: This error occurs when you try to add new allowed payer accounts when the overall `allowed_payers` limit is exceeded. You can only add up to 10 allowed payer accounts. +* solution: Do not add more than 10 allowed payers. + +The bank account.account number field is required when bank account is present. +* code: 400 +* description: This error occurs when you do not pass the bank account number in the request. +* solution: Make sure to pass the bank account number in the request. + +The bank account.ifsc field is required when bank account is present +* code: 400 +* description: This error occurs when you do not pass the IFSC in the request. +* solution: Make sure to pass the IFSC in the request. + +The ifsc must be 11 characters. +* code: 400 +* description: This error occurs when you pass an incorrect IFSC in the request. An IFSC must be 11 characters. +* solution: Make sure to pass a valid IFSC in the request. + +Payer detail already exist for virtual account. +* code: 400 +* description: This error occurs when you try to add a duplicate allowed payer's account with the same IFSC and account number that already exists. +* solution: Make sure to add a valid allowed payer's account. + +Bharat QR not supported for Customer Identifier. +* code: 400 +* description: Passing the receivers as `qr`. +* solution: We have deprecated the `qr` receiver type from our APIs. From now on, only `vpa` and `bank_account` will be supported. (Jun 2022). + +Bharat QR not enabled. +* code: 400 +* description: If you are a new merchant trying to create a Bharat QR code. +* solution: We have deprecated the `bharat_qr` type for QR v2 product. diff --git a/llm-content/api/payments/smart-collect-tpv/close.md b/llm-content/api/payments/smart-collect-tpv/close.md new file mode 100644 index 00000000..067cfaab --- /dev/null +++ b/llm-content/api/payments/smart-collect-tpv/close.md @@ -0,0 +1,215 @@ +--- +title: Close a Customer Identifier (TPV) +description: Close a Customer Identifier using the Razorpay **Smart Collect TPV** API. +--- + +# Close a Customer Identifier (TPV) + +## Close a Customer Identifier + +Use this endpoint to close a Customer Identifier. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/virtual_accounts/va_Di5gbNptcWV8fQ/close + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String virtualId = "va_Di5gbNptcWV8fQ"; + +instance.virtualAccounts.close(virtualId); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.virtual_account.close(virtualId) + +```php: PHP +$api = new Api($api_key, $api_secret); + +$api->virtualAccount->fetch($virtualId)->close(); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +virtualId = "va_Di5gbNptcWV8fQ" + +Razorpay::VirtualAccount.close(virtualId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.close(virtualId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.VirtualAccount.Close("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] + +string virtualId = "va_Z6t7VFTb9xHeOs"; + +VirtualAccount virtulaccount = client.VirtualAccount.Fetch("va_MaxCJzVjbKRBAr").Close(); +``` + +### Response + +```json: Success +{ + "id":"va_Di5gbNptcWV8fQ", + "name":"Acme Corp", + "entity":"virtual_account", + "status":"closed", + "description":"Customer Identifier created for M/S ABC Exports", + "amount_expected":230000, + "notes":{ + "material":"teakwood" + }, + "amount_paid":239000, + "customer_id":"cust_DOMUFFiGdCaCUJ", + "receivers":[ + { + "id":"ba_Di5gbQsGn0QSz3", + "entity":"bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name":"Acme Corp", + "notes":[], + "account_number":"1112220061746877" + } + ], + "allowed_payers": [ + { + "type": "bank_account", + "id":"ba_DlGmm9mSj8fjRM", + "bank_account": { + "ifsc": "UTIB0000013", + "account_number": "914010012345679" + } + }, + { + "type": "bank_account", + "id":"ba_Cmtnm5tSj6agUW", + "bank_account": { + "ifsc": "UTIB0000014", + "account_number": "914010012345680" + } + } + ], + "close_by":1574427237, + "closed_at":1574164078, + "created_at":1574143517 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the Customer Identifier that is to be closed. + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to know more. + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Check the [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) section to know more. + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the Customer Identifier. Sample id for Customer Identifier is `ba_Di5gbQsGn0QSz3` + + `entity` + : `string` Name of the entity. Possible value is `bank_account`. + + `ifsc` + : `string` The IFSC for the Customer Identifier created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the Customer Identifier. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to know more. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + +`allowed_payers` +: `array` Details of customer bank accounts which will be allowed to make payments to your Customer Identifier. The parent parameter under which the customer bank account details must be passed as child parameters. You can add account details of 10 allowed payers for a Customer Identifier. For more details, refer to the [Third Party Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/third-party-validation.md) section. + + `type` + : `string` The type of account through which the customer will make the payment. Possible value is `bank_account`. + + `id` + : `string` The unique identifier of the `allowed_payers` account. + + `bank_account` + : `object` Indicates the bank account details such as `ifsc` and `account_number`. + + `ifsc` + : `string` The IFSC associated with the bank account through which the customer is expected to make the payment. + + `account_number` + : `string` The bank account number through which the customer is expected to make the payment. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). Any request beyond `2147483647` UNIX timestamp will fail. + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: Occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the dashboard. +* solution: Make sure that the API keys are active and entered correctly. Also, make sure there are no whitespaces before or after the keys. diff --git a/llm-content/api/payments/smart-collect-tpv/create.md b/llm-content/api/payments/smart-collect-tpv/create.md new file mode 100644 index 00000000..c4962771 --- /dev/null +++ b/llm-content/api/payments/smart-collect-tpv/create.md @@ -0,0 +1,449 @@ +--- +title: Create a Customer Identifier With TPV +description: Create a Customer Identifier using the Razorpay Smart Collect API. +--- + +# Create a Customer Identifier With TPV + +## Create a Customer Identifier With TPV + +Use this endpoint to create a Customer Identifier. While sharing the details of CIs (created using RBL bank) with the customers, ensure that the fifth character in the IFSC is number `0` and not the letter O. For example, valid IFSC is `RATN0VAAPIS` and not `RATNOVAAPIS`. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/virtual_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "receivers": { + "types": [ + "bank_account" + ], + "bank_account": + { + "descriptor": "1234567890" + } + + }, + "allowed_payers": [ + { + "type": "bank_account", + "bank_account": { + "ifsc": "UTIB0000013", + "account_number": "914010012345679" + } + }, + { + "type": "bank_account", + "bank_account": { + "ifsc": "UTIB0000014", + "account_number": "914010012345680" + } + } + ], + "description": "Customer Identifier created for Raftar Soft", + "customer_id": "cust_CaVDm8eDRSXYME", + "close_by": 1681615838, + "notes": { + "project_name": "Banking Software" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject virtualRequest = new JSONObject(); +List types = new ArrayList<>(); +JSONObject typesParam = new JSONObject(); +types.add("bank_account"); +typesParam.put("types",types); +virtualRequest.put("receivers",typesParam); +List allowedPayer = new ArrayList<>(); +JSONObject allowedPayerParams = new JSONObject(); +allowedPayerParams.put("type","bank_account"); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("ifsc","UTIB0000013"); +bankAccount.put("account_number","914010012345679"); +allowedPayer.add(allowedPayerParams); +allowedPayerParams.put("bank_account",bankAccount); +virtualRequest.put("allowed_payers",allowedPayer); +virtualRequest.put("description","Customer Identifier created for Raftar Soft"); +virtualRequest.put("customer_id","cust_JDdNazagOgg9Ig"); +virtualRequest.put("close_by",1681615838); +JSONObject notes = new JSONObject(); +notes.put("project_name","Banking Software"); +virtualRequest.put("notes", notes); + +VirtualAccount virtualaccount = instance.virtualAccounts.create(virtualRequest); + +```php: PHP +$api = new Api($api_key, $api_secret); + +$api->virtualAccount->create(array('receivers' => array('types'=> array('bank_account')),'allowed_payers' => array(array('type'=>'bank_account','bank_account'=>array('ifsc'=>'RATN0VAAPIS','account_number'=>'2223330027558515'))),'description' => 'Customer Identifier created for Raftar Soft','customer_id' => 'cust_HssUOFiOd2b1TJ', 'notes' => array('project_name' => 'Banking Software'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.create({ + receivers: { + types: [ + "bank_account" + ] + }, + allowed_payers: [ + { + type: "bank_account", + bank_account: { + ifsc: "RATN0VAAPIS", + account_number: "2223330027558515" + } + } + ], + description: "Customer Identifier created for Raftar Soft", + customer_id: "cust_HssUOFiOd2b1TJ", + notes: { + project_name: "Banking Software" + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.virtual_account.create({ + "receivers": { + "types": [ + "bank_account" + ] + }, + "allowed_payers": [ + { + "type": "bank_account", + "bank_account": { + "ifsc": "RATN0VAAPIS", + "account_number": 2223330027558515 + } + } + ], + "description": "Customer Identifier created for Raftar Soft", + "customer_id": "cust_HssUOFiOd2b1TJ", + "notes": { + "project_name": "Banking Software" + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::VirtualAccount.create({ + "receivers": { + "types": [ + "bank_account" + ] + }, + "allowed_payers": [ + { + "type": "bank_account", + "bank_account": { + "ifsc": "RATN0VAAPIS", + "account_number": 2223330027558515 + } + } + ], + "description": "Customer Identifier created for Raftar Soft", + "customer_id": "cust_HssUOFiOd2b1TJ", + "notes": { + "project_name": "Banking Software" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +types := make(map[string]interface{}) +types["0"] = "bank_account" + +allowed_payers := make(map[string]interface{}) +allowed_payers["0"] = map[string]interface{}{ + "type": "bank_account", + "bank_account": map[string]interface{}{ + "ifsc": "RATN0VAAPIS", + "account_number": 2223330099089860, + }, + } + +data:= map[string]interface{}{ + "receivers": map[string]interface{}{ + "types": types, + }, + "allowed_payers" : allowed_payers, + "description": "Customer Identifier created for Raftar Soft", + "customer_id": "cust_CaVDm8eDRSXYME", + "close_by": 1681615838, + "notes": map[string]interface{}{ + "project_name": "Banking Software", + }, +} + +body, err := client.VirtualAccount.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] + +Dictionary virtualRequest = new Dictionary(); +List types = new List(); +Dictionary typesParam = new Dictionary(); +types.Add("bank_account"); +typesParam.Add("types", types); +virtualRequest.Add("receivers", typesParam); +List> allowedPayer = new List>(); +Dictionary allowedPayerParams = new Dictionary(); +allowedPayerParams.Add("type", "bank_account"); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("ifsc", "UTIB0000013"); +bankAccount.Add("account_number", "914010012345679"); +allowedPayer.Add(allowedPayerParams); +allowedPayerParams.Add("bank_account", bankAccount); +virtualRequest.Add("allowed_payers", allowedPayer); +virtualRequest.Add("description", "Virtual Account created for Raftar Soft"); +virtualRequest.Add("customer_id", "cust_JDdNazagOgg9Ig"); +virtualRequest.Add("close_by", 1681615838); +Dictionary notes = new Dictionary(); +notes.Add("project_name", "Banking Software"); +virtualRequest.Add("notes", notes); + +VirtualAccount virtualaccount = client.VirtualAccount.Create(virtualRequest); + +``` + +### Response + +```json: Success +{ + "id":"va_DlGmm7jInLudH9", + "name":"Acme Corp", + "entity":"virtual_account", + "status":"active", + "description":"Customer Identifier created for Raftar Soft", + "amount_expected":null, + "notes":{ + "project_name":"Banking Software" + }, + "amount_paid":0, + "customer_id":"cust_CaVDm8eDRSXYME", + "receivers":[ + { + "id":"ba_DlGmm9mSj8fjRM", + "entity":"bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name":"Acme Corp", + "notes":[], + "account_number":"2223330099089860" + } + ], + "allowed_payers": [ + { + "type": "bank_account", + "id":"ba_DlGmm9mSj8fjRM", + "bank_account": { + "ifsc": "UTIB0000013", + "account_number": "914010012345679" + } + }, + { + "type": "bank_account", + "id":"ba_Cmtnm5tSj6agUW", + "bank_account": { + "ifsc": "UTIB0000014", + "account_number": "914010012345680" + } + } + ], + "close_by":1681615838, + "closed_at":null, + "created_at":1574837626 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Account validation is only applicable on bank account as a receiver type", + "field": "receivers", + "source": "business", + "step": "virtual_account_edit", + "reason": "account_validation_not_supported_on_vpa", + "metadata": [] + } +} +``` + +### Parameters + +`receivers` _mandatory_ +: `json object` Configuration of desired receivers for the Customer Identifier. + + `types` + : `array` List of desired receiver types. Possible value is `bank_account` + + `bank_account` _mandatory_ + : `json object` Descriptor details for the Bank Account. This is to be passed only when `bank_account` is passed as the receiver `types`. + + `descriptor` + : `string` A unique, numeric / alphanumeric custom descriptor defined by you for the bank account. The maximum length allowed is 10 digits. + +> **INFO** +> +> **Handy Tips** +Please reach out to the [support team](https://razorpay.com/support/#request) if you are unable to pass the parameter with `bank_account`. + +`allowed_payers` _mandatory_ +: `array` Details of customer bank accounts which will be allowed to make payments to your Customer Identifier. The parent parameter under which the customer bank account details must be passed as child parameters. You can add account details of 10 allowed payers for a Customer Identifier. For more details, refer to the [Third Party Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/third-party-validation.md) section. + + `type` _mandatory_ + : `string` The type of account through which the customer will make the payment. Possible value is `bank_account`. + + `bank_account` _mandatory_ + : `object` Indicates the bank account details such as `ifsc` and `account_number`. + + `ifsc` _mandatory_ + : `string` The IFSC associated with the bank account through which the customer is expected to make the payment. + + `account_number` _mandatory_ + : `string` The bank account number through which the customer is expected to make the payment. SBI account numbers can contain zeros preceding actual numbers. You should enter the complete account number, including these zeros, or else the transaction will fail, and the amount will be refunded automatically. For example, if the account number is 00000022234631312, add the complete account number and not just 22234631312. + +`description` _optional_ +: `string` A brief description of the Customer Identifier. + +`customer_id` _optional_ +: `string` Unique identifier of the customer to whom the Customer Identifier must be tagged. Refer to the [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) documentation to learn how to create a customer. + +`notes` _optional_ +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Refer to the [Notes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to learn more. + +`close_by` _optional_ +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. For example, `1681615838`. This needs to be passed only if you want the Customer Identifier to be temporary and auto-deleted after a specific usage time. + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to know more. + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Check the [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) section to know more. + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the Customer Identifier. Sample id for Customer Identifier is `ba_Di5gbQsGn0QSz3` + + `entity` + : `string` Name of the entity. Possible value is `bank_account`. + + `ifsc` + : `string` The IFSC for the Customer Identifier created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the Customer Identifier. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to know more. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + +`allowed_payers` +: `array` Details of customer bank accounts which will be allowed to make payments to your Customer Identifier. The parent parameter under which the customer bank account details must be passed as child parameters. You can add account details of 10 allowed payers for a Customer Identifier. For more details, refer to the [Third Party Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/third-party-validation.md) section. + + `type` + : `string` The type of account through which the customer will make the payment. Possible value is `bank_account`. + + `id` + : `string` The unique identifier of the `allowed_payers` account. + + `bank_account` + : `object` Indicates the bank account details such as `ifsc` and `account_number`. + + `ifsc` + : `string` The IFSC associated with the bank account through which the customer is expected to make the payment. + + `account_number` + : `string` The bank account number through which the customer is expected to make the payment. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. This is returned only if the UNIX timestamp was specified during the Customer Identifier creation. There is no expiry time for a Customer Identifier unless specified during creation. + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: - Occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. + - `customer_id` is not correct. + +* solution: - Make sure that the API keys are active and entered correctly. Also, make sure there are no whitespaces before or after the API keys. + - Make sure that the `customer_id` and the API keys used belong to the same account and same mode, whether test or live respectively. + + +The `field name` is required +* code: 400 +* description: Occurs when a mandatory field is empty. +* solution: Make sure that all the mandatory fields are filled. + +The id provided does not exist +* code: 400 +* description: Occurs when the `customer_id` passed is wrong or does not belong to the identifier associated to the API keys used. +* solution: Make sure that the `customer_id` and the API keys used belong to the same identifier and same mode, whether test or live respectively. + +only 10 allowed payers can be added +* code: 400 +* description: Occurs when more than 10 allowed payers are added in the Dashboard. +* solution: When creating the Customer Identifier, allowed payers cannot be more than 10. + +Account validation is only applicable on bank account as receiver type. +* code: 400 +* description: This error occurs when you try to add an allowed payer account on a Customer Identifier with VPA added as a receiver (with or without a Bank account). +* solution: Allowed payers must have bank account details and not VPA. + +The bank account IFSC field is required when the bank is present ( in allowed payers) +* code: 400 +* description: This error occurs when you do not pass the IFSC code in the request. +* solution: Provide IFSC code for the allowed payers bank account. + +Invalid IFSC OR IFSC must be 11 Characters +* code: 400 +* description: This error occurs when you pass an incorrect IFSC code in the request. An IFSC must be 11 characters. +* solution: Pass the correct IFSC code of the allowed payers bank account. diff --git a/llm-content/api/payments/smart-collect-tpv/delete-allowed-payer.md b/llm-content/api/payments/smart-collect-tpv/delete-allowed-payer.md new file mode 100644 index 00000000..2914a11a --- /dev/null +++ b/llm-content/api/payments/smart-collect-tpv/delete-allowed-payer.md @@ -0,0 +1,118 @@ +--- +title: Delete an Allowed Payer Account +description: Delete an Allowed Payer Account using the Razorpay Smart Collect API. +--- + +# Delete an Allowed Payer Account + +## Delete an Allowed Payer With TPV + +Use this endpoint to delete the allowed payer's account details added to a Customer Identifier. You can delete one account detail in a single request. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/virtual_accounts/va_DlGmm7jInLudH9/allowed_payers/ba_DlGmm9mSj8fjRM \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String virtualId = "va_Di5gbNptcWV8fQ"; + +String allowedPlayer = "ba_DlGmm9mSj8fjRM"; + +VirtualAccount virtualaccount = instance.VirtualAccounts.deleteAllowedPayer(virtualId,allowedPayersId); + +```php: PHP +$api = new Api($api_key, $api_secret); + +$api->virtualAccount->fetch($virtualId)->deleteAllowedPayer($allowedPayersId); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.deleteAllowedPayer(virtualId,allowedPayersId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.virtual_account.delete_allowed_player(virtualId,allowedPayersId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +virtualId = "va_Di5gbNptcWV8fQ" + +allowedPayersId = "ba_J0XikIKgezi6PC" + +Razorpay::VirtualAccount.delete_allowed_payer(virtualId,allowedPayersId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.VirtualAccount.DeleteAllowedPayer("", "", nil, nil) +``` + +### Response + +```json: Response +null +``` + +### Parameters + +`va_id` _mandatory_ +: `string` The unique identifier of the Customer Identifier from which the `allowed_payers` account details should be deleted. + +`id` _mandatory_ +: `string` The unique identifier of the `allowed_payers` account that has to be deleted. + +### Parameters + +`type` _mandatory_ +: `string` The type of account. Possible value is `bank_account`. + +`bank_account` _mandatory_ +: `object` Indicates the bank account details such as `ifsc` and `account_number`. + + `ifsc` _mandatory_ + : `string` The IFSC associated with the bank account. + + `account_number` _mandatory_ + : `string` The bank account number. + +> **INFO** +> +> +> **Handy Tips** +> +> SBI account numbers can contain zeros preceding actual numbers. You should enter the complete account number, including these zeros, or else the transaction will fail, and the amount will be refunded automatically. +> +> For example, if the account number is 00000022234631312, add the complete account number and not just 22234631312. +> + +### Errors + +Account validation is only applicable on bank account as a receiver type +* code: 400 +* description: This error occurs when you try to add an allowed payer account on a Customer Identifier with VPA added as a receiver (with or without a Bank account). +* solution: You cannot add an allowed payer account on a Customer Identifier with VPA added as a receiver (with or without a Bank account). + +Only 10 allowed payer accounts can be added. +* code: 400 +* description: This error occurs when you try to add new allowed payer accounts when the overall `allowed_payers` limit is exceeded. You can only add up to 10 allowed payer accounts. +* solution: Make sure you do not add more than 10 allowed payers. + +The bank account.account number field is required when bank account is present. +* code: 400 +* description: This error occurs when you do not pass the bank account number in the request. +* solution: Make sure to pass the bank account number in the request. + +Payer detail already exist for virtual account. +* code: 400 +* description: This error occurs when you try to add a duplicate allowed payer's account with the same IFSC and account number that already exists. +* solution: Make sure to add a valid allowed payer's account. diff --git a/llm-content/api/payments/smart-collect-tpv/entity.md b/llm-content/api/payments/smart-collect-tpv/entity.md new file mode 100644 index 00000000..4fc08e8b --- /dev/null +++ b/llm-content/api/payments/smart-collect-tpv/entity.md @@ -0,0 +1,137 @@ +--- +title: Smart Collect With TPV Entity +description: Entity parameters and sample code for Smart Collect With TPV API. +--- + +# Smart Collect With TPV Entity + +The Smart Collect with TPV entity has the following parameters: + +### Response + +```json: Entity +{ + "id":"va_CaVE4QbyJvQRdk", + "name":"Acme Corp", + "entity":"virtual_account", + "status":"active", + "description":"Customer Identifier created for Gaurav Kumar", + "notes":{ + "flat no":"105" + }, + "amount_paid":0, + "customer_id":"cust_805c8oBQdBGPwS", + "receivers":[ + { + "id": "ba_DzXNNxY8yQu5iV", + "entity": "bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223333230231378" + } + ], + "allowed_payers": [ + { + "type": "bank_account", + "id":"ba_DlGmm9mSj8fjRM", + "bank_account": { + "ifsc": "UTIB0000013", + "account_number": "914010012345679" + } + }, + { + "type": "bank_account", + "id":"ba_Cmtnm5tSj6agUW", + "bank_account": { + "ifsc": "UTIB0000014", + "account_number": "914010012345680" + } + } + ], + "close_by": 1581615838, + "closed_at": null, + "created_at": 1577962694 +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to know more. + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Check the [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) section to know more. + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the Customer Identifier. Sample id for Customer Identifier is `ba_Di5gbQsGn0QSz3` + + `entity` + : `string` Name of the entity. Possible value is `bank_account`. + + `ifsc` + : `string` The IFSC for the Customer Identifier created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the Customer Identifier. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to know more. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + +`allowed_payers` +: `array` Details of customer bank accounts which will be allowed to make payments to your Customer Identifier. The parent parameter under which the customer bank account details must be passed as child parameters. You can add account details of 10 allowed payers for a Customer Identifier. For more details, refer to the [Third Party Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/third-party-validation.md) section. + + `type` + : `string` The type of account through which the customer will make the payment. Possible value is `bank_account`. + + `id` + : `string` The unique identifier of the `allowed_payers` account. + + `bank_account` + : `object` Indicates the bank account details such as `ifsc` and `account_number`. + + `ifsc` + : `string` The IFSC associated with the bank account through which the customer is expected to make the payment. + + `account_number` + : `string` The bank account number through which the customer is expected to make the payment. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). Any request beyond `2147483647` UNIX timestamp will fail. + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. diff --git a/llm-content/api/payments/smart-collect-tpv/fetch-all.md b/llm-content/api/payments/smart-collect-tpv/fetch-all.md new file mode 100644 index 00000000..06005f0c --- /dev/null +++ b/llm-content/api/payments/smart-collect-tpv/fetch-all.md @@ -0,0 +1,282 @@ +--- +title: Fetch All Customer Identifiers With TPV +description: Fetch all Customer Identifiers using the Razorpay **Smart Collect TPV** API. +--- + +# Fetch All Customer Identifiers With TPV + +## Fetch All Customer Identifiers With TPV + +Use this endpoint to fetch the details of all Customer Identifiers. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET \ +https://api.razorpay.com/v1/virtual_accounts \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List virtualaccount = instance.virtualAccounts.fetchAll(params); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.virtual_account.all(options) + +```php: PHP +$api = new Api('YOUR_KEY_ID, 'YOUR_KEY_SECRET'); + +$api->virtualAccount->all($options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +options = {"count":1} + +Razorpay::VirtualAccount.all(options) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.all(options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "count" : 1, +} + +body, err := client.VirtualAccount.All(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] + +Dictionary param = new Dictionary(); +param.Add("count","1"); + +List virtualaccount = client.VirtualAccount.All(param); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "va_Di5gbNptcWV8fQ", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "closed", + "description": "Customer Identifier created for M/S ABC Exports", + "amount_expected": 2300, + "notes": { + "material": "teakwood" + }, + "amount_paid": 239000, + "customer_id": "cust_DOMUFFiGdCaCUJ", + "receivers": [ + { + "id": "ba_Di5gbQsGn0QSz3", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "1112220061746877" + } + ], + "allowed_payers": [ + { + "type": "bank_account", + "id":"ba_DlGmm9mSj8fjRM", + "bank_account": { + "ifsc": "UTIB0000013", + "account_number": "914010012345679" + } + }, + { + "type": "bank_account", + "id":"ba_Cmtnm5tSj6agUW", + "bank_account": { + "ifsc": "UTIB0000014", + "account_number": "914010012345680" + } + } + ], + "close_by": 1574427237, + "closed_at": 1574164078, + "created_at": 1574143517 + }, + { + "id": "va_Dho86Avmdw6h09", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Customer Identifier created for Raftar Soft", + "amount_expected": null, + "notes": { + "material": "oakwood" + }, + "amount_paid": 0, + "customer_id": "cust_DOMUFFiGdCaDNK", + "receivers": [ + { + "id": "ba_Dho86DoV16LqiO", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "1112220046254840" + } + ], + "allowed_payers": [ + { + "type": "bank_account", + "id":"ba_DlGmm9mSj8fjRM", + "bank_account": { + "ifsc": "UTIB0000013", + "account_number": "914010012345679" + } + }, + { + "type": "bank_account", + "id":"ba_Cmtnm5tSj6agUW", + "bank_account": { + "ifsc": "UTIB0000014", + "account_number": "914010012345680" + } + } + ], + "close_by": 1574427237, + "closed_at": null, + "created_at": 1574081690 + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`from` _optional_ +: `integer` Timestamp, in seconds, from when Customer Identifiers are to be fetched. + +`to` _optional_ +: `integer` Timestamp, in seconds, till when Customer Identifiers are to be fetched. + +`count` _optional_ +: `integer` Number of Customer Identifiers to be fetched. The default value is 10 and the maximum value is 100. This can be used for pagination, in combination with `skip`. + +`skip` _optional_ +: `integer` Number of records to be skipped while fetching the Customer Identifiers. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to know more. + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Check the [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) section to know more. + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the Customer Identifier. Sample id for Customer Identifier is `ba_Di5gbQsGn0QSz3` + + `entity` + : `string` Name of the entity. Possible value is `bank_account`. + + `ifsc` + : `string` The IFSC for the Customer Identifier created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the Customer Identifier. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to know more. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + +`allowed_payers` +: `array` Details of customer bank accounts which will be allowed to make payments to your Customer Identifier. The parent parameter under which the customer bank account details must be passed as child parameters. You can add account details of 10 allowed payers for a Customer Identifier. For more details, refer to the [Third Party Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/third-party-validation.md) section. + + `type` + : `string` The type of account through which the customer will make the payment. Possible value is `bank_account`. + + `id` + : `string` The unique identifier of the `allowed_payers` account. + + `bank_account` + : `object` Indicates the bank account details such as `ifsc` and `account_number`. + + `ifsc` + : `string` The IFSC associated with the bank account through which the customer is expected to make the payment. + + `account_number` + : `string` The bank account number through which the customer is expected to make the payment. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). Any request beyond `2147483647` UNIX timestamp will fail. + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: Occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the dashboard. +* solution: Make sure that the API keys are active and entered correctly. Also, make sure there are no whitespaces before or after the keys. diff --git a/llm-content/api/payments/smart-collect-tpv/fetch-payment-id-transfer.md b/llm-content/api/payments/smart-collect-tpv/fetch-payment-id-transfer.md new file mode 100644 index 00000000..d0857bda --- /dev/null +++ b/llm-content/api/payments/smart-collect-tpv/fetch-payment-id-transfer.md @@ -0,0 +1,353 @@ +--- +title: Fetch Payment Details using ID and Transfer Method +description: Fetch Payment Details using ID and Transfer Method using the Razorpay Smart Collect API. +--- + +# Fetch Payment Details using ID and Transfer Method + +## Fetch Payment Details Using ID and Transfer Method With TPV + +Use this endpoint to fetch payment details for a bank transfer. If Razorpay does not receive the bank account information of the customer from the remitting bank, the `payer_bank_account` parameter will be set to null. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET \ +https://api.razorpay.com/v1/payments/pay_CmiztqmYJPtDAu/bank_transfer \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_CmiztqmYJPtDAu"; + +Payment payment = instance.payments.fetchBankTransfers(paymentId); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.bank_transfer(paymentId) + +```php: PHP +$api = new Api($api_key, $api_secret); + +$api->payment->fetch($paymentId)->bankTransfer(); + +```ruby: Ruby +payment_id = "pay_Di5iqCqA1WEHq6" + +Razorpay::Payment.fetch(paymend_id).bank_transfer + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.bankTransfer(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.BankTransfer("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +BankTransfer virtualaccount = client.Payment.Fetch(paymentId).BankTransfers(); +``` + +### Response + +```json: Success +{ + "id": "bt_Di5iqCElVyRlCb", + "entity": "bank_transfer", + "payment_id": "pay_Di5iqCqA1WEHq6", + "mode": "NEFT", + "bank_reference": "157414364471", + "amount": 239000, + "payer_bank_account": { + "id": "ba_Di5iqSxtYrTzPU", + "entity": "bank_account", + "ifsc": null, + "bank_name": null, + "name": "Acme Corp", + "notes": [], + "account_number": "765432123456789" + }, + "virtual_account_id": "va_Di5gbNptcWV8fQ", + "virtual_account": { + "id": "va_Di5gbNptcWV8fQ", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "closed", + "description": "Customer Identifier created for M/S ABC Exports", + "amount_expected": 2300, + "notes": { + "material": "teakwood" + }, + "amount_paid": 239000, + "customer_id": "cust_DOMUFFiGdCaCUJ", + "receivers": [ + { + "id": "ba_Di5gbQsGn0QSz3", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "1112220061746877" + } + ], + "allowed_payers": [ + { + "type": "bank_account", + "id":"ba_DlGmm9mSj8fjRM", + "bank_account": { + "ifsc": "UTIB0000013", + "account_number": "914010012345679" + } + }, + { + "type": "bank_account", + "id":"ba_Cmtnm5tSj6agUW", + "bank_account": { + "ifsc": "UTIB0000014", + "account_number": "914010012345680" + } + } + ], + "close_by": 1574427237, + "closed_at": 1574164078, + "created_at": 1574143517 + } +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the payment made to the Customer Identifier. + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + +`currency` +: `string` The currency in which the payment is made. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. + + +> **INFO** +> +> +> **Handy Tips** +> +> This attribute will not be set for the card issued by a foreign bank. +> + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + +> **INFO** +> +> +> **Handy Tips** +> +> Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). +> + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible value `in_app`. + +> **INFO** +> +> +> **Handy Tips** +> +> The field `flow` is present only in the case of Turbo UPI Payments. +> + + + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: Occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the dashboard. +* solution: Make sure that the API keys are active and entered correctly. Also, make sure there are no whitespaces before or after the keys. diff --git a/llm-content/api/payments/smart-collect-tpv/fetch-payments.md b/llm-content/api/payments/smart-collect-tpv/fetch-payments.md new file mode 100644 index 00000000..2bd29232 --- /dev/null +++ b/llm-content/api/payments/smart-collect-tpv/fetch-payments.md @@ -0,0 +1,218 @@ +--- +title: Fetch Payments for a Customer Identifier With TPV +description: Fetch Payments for a Customer Identifier using the Razorpay **Smart Collect TPV** API. +--- + +# Fetch Payments for a Customer Identifier With TPV + +## Fetch Payments for a Customer Identifier With TPV + +Use this endpoint to fetch payments made against a particular Customer Identifier. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET \ +https://api.razorpay.com/v1/virtual_accounts/va_CminDKtoToBGmd/payments \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String virtualId = "va_DlGmm7jInLudH9"; + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List payments = instance.virtualAccounts.fetchPayments(virtualId,params); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.virtual_account.payments(virtualId,options) + +```php: PHP +$api = new Api('YOUR_KEY_ID, 'YOUR_KEY_SECRET'); + +$api->virtualAccount->fetch($virtualId)->payments($options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +virtualId = "va_IDDYE8gYTLJCEH" + +options = {"count":1} + +Razorpay::VirtualAccount.fetch(virtualId).payments(options) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.fetchPayments(virtualId,options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.VirtualAccount.Payments("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] + +string virtualId = "va_Z6t7VFTb9xHeOs"; + +Dictionary param = new Dictionary(); +param.Add("count","1"); + +List virtualaccount = client.VirtualAccount.Fetch(virtualId).Payments(param); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "pay_JGmL38CqCHTyZZ", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "bank_transfer", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_HWj3MjySAHSjtq", + "notes": [], + "fee": 12, + "tax": 2, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "209817848101" + }, + "created_at": 1649402719 + } + ] +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the Customer Identifier for which the payment details are to be fetched. + +### Parameters + +`from` _optional_ +: `integer` Timestamp, in seconds, from when payments are to be fetched. + +`to` _optional_ +: `integer` Timestamp, in seconds, till when payments are to be fetched. + +`count` _optional_ +: `integer` Number of payments to be fetched. The default value is 10 and the maximum value is 100. This can be used for pagination, in combination with `skip`. + +`skip` _optional_ +: `integer` Number of records to be skipped while fetching the payments. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to know more. + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Check the [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) section to know more. + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the Customer Identifier. Sample id for Customer Identifier is `ba_Di5gbQsGn0QSz3` + + `entity` + : `string` Name of the entity. Possible value is `bank_account`. + + `ifsc` + : `string` The IFSC for the Customer Identifier created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the Customer Identifier. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to know more. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + +`allowed_payers` +: `array` Details of customer bank accounts which will be allowed to make payments to your Customer Identifier. The parent parameter under which the customer bank account details must be passed as child parameters. You can add account details of 10 allowed payers for a Customer Identifier. For more details, refer to the [Third Party Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/third-party-validation.md) section. + + `type` + : `string` The type of account through which the customer will make the payment. Possible value is `bank_account`. + + `id` + : `string` The unique identifier of the `allowed_payers` account. + + `bank_account` + : `object` Indicates the bank account details such as `ifsc` and `account_number`. + + `ifsc` + : `string` The IFSC associated with the bank account through which the customer is expected to make the payment. + + `account_number` + : `string` The bank account number through which the customer is expected to make the payment. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). Any request beyond `2147483647` UNIX timestamp will fail. + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: Occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the dashboard. +* solution: Make sure that the API keys are active and entered correctly. Also, make sure there are no whitespaces before or after the keys. diff --git a/llm-content/api/payments/smart-collect-tpv/fetch-with-id.md b/llm-content/api/payments/smart-collect-tpv/fetch-with-id.md new file mode 100644 index 00000000..dcebed83 --- /dev/null +++ b/llm-content/api/payments/smart-collect-tpv/fetch-with-id.md @@ -0,0 +1,214 @@ +--- +title: Fetch a Customer Identifier Using id With TPV +description: Fetch a Customer Identifier by id using the Razorpay Smart Collect TPV API. +--- + +# Fetch a Customer Identifier Using id With TPV + +## Fetch a Customer Identifier Using ID With TPV + +Use this endpoint to fetch a Customer Identifier using id. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET \ +https://api.razorpay.com/v1/virtual_accounts/va_D6Vw6zyJ0OmRZg \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String virtualId = "va_4xbQrmEoA5WJ0G"; + +VirtualAccount virtualaccount = instance.virtualAccounts.fetch(virtualId); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.virtual_account.fetch(virtualId) + +```php: PHP +$api = new Api('YOUR_KEY_ID, 'YOUR_KEY_SECRET'); + +$api->virtualAccount->fetch($virtualId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +virtualId = "va_IDDYE8gYTLJCEH" + +Razorpay::VirtualAccount.fetch(virtualId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.fetch(virtualId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.VirtualAccount.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] + +string virtualId = "va_Z6t7VFTb9xHeOs"; + +VirtualAccount virtualaccount = client.VirtualAccount.Fetch(virtualId); +``` + +### Response + +```json: Success +{ + "id": "va_D6Vw6zyJ0OmRZg", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Customer Identifier for Raftar Soft", + "amount_expected": 5000, + "notes": [], + "amount_paid": null, + "customer_id": "cust_9xnHzNGIEY4TAV", + "receivers": [ + { + "id": "ba_D6Vw76RrHA3DC9", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223330025991681" + } + ], + "allowed_payers": [ + { + "type": "bank_account", + "id":"ba_DlGmm9mSj8fjRM", + "bank_account": { + "ifsc": "UTIB0000013", + "account_number": "914010012345679" + } + }, + { + "type": "bank_account", + "id":"ba_Cmtnm5tSj6agUW", + "bank_account": { + "ifsc": "UTIB0000014", + "account_number": "914010012345680" + } + } + ], + "close_by": null, + "closed_at": 1568109789, + "created_at": 1565939036 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the Customer Identifier whose details are to be fetched. + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to know more. + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Check the [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) section to know more. + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the Customer Identifier. Sample id for Customer Identifier is `ba_Di5gbQsGn0QSz3` + + `entity` + : `string` Name of the entity. Possible value is `bank_account`. + + `ifsc` + : `string` The IFSC for the Customer Identifier created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the Customer Identifier. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to know more. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + +`allowed_payers` +: `array` Details of customer bank accounts which will be allowed to make payments to your Customer Identifier. The parent parameter under which the customer bank account details must be passed as child parameters. You can add account details of 10 allowed payers for a Customer Identifier. For more details, refer to the [Third Party Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/third-party-validation.md) section. + + `type` + : `string` The type of account through which the customer will make the payment. Possible value is `bank_account`. + + `id` + : `string` The unique identifier of the `allowed_payers` account. + + `bank_account` + : `object` Indicates the bank account details such as `ifsc` and `account_number`. + + `ifsc` + : `string` The IFSC associated with the bank account through which the customer is expected to make the payment. + + `account_number` + : `string` The bank account number through which the customer is expected to make the payment. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). Any request beyond `2147483647` UNIX timestamp will fail. + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: Occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the dashboard. +* solution: Make sure that the API keys are active and entered correctly. Also, make sure there are no whitespaces before or after the keys. diff --git a/llm-content/api/payments/smart-collect.md b/llm-content/api/payments/smart-collect.md new file mode 100644 index 00000000..04cfc9c7 --- /dev/null +++ b/llm-content/api/payments/smart-collect.md @@ -0,0 +1,73 @@ +--- +title: API | Payments - Smart Collect +heading: Smart Collect +description: Create Customer Identifiers on-demand for customers to pay via NEFT, RTGS and IMPS using Razorpay Smart Collect APIs. +--- + +# Smart Collect + +You can create Customer Identifiers using the Smart Collect APIs to accept large payments from your customers in the form of bank transfers via NEFT, RTGS and IMPS. + +> **INFO** +> +> +> **Handy Tips** +> +> - If you are a new customer, explore [Smart Collect 2.0 ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-2.md) . It uses the same APIs as **Smart Collect**, while also offering additional endpoints—such as creating a Customer Identifier with a VPA and bank account, fetching UPI payments, and adding a VPA Receiver to an existing Customer Identifier. +> - You can also **Add an Allowed Payer** or **Delete an Allowed Payer** using [Smart Collect TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-tpv.md) APIs. +> + +Fork the Razorpay Postman Public Workspace and try the Smart Collect APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-9fd01f11-0b59-4e97-a281-40f4b14277ec) + +### Related Guides + +[About Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/smart-collect.md) + +### Endpoints + + - **post** `/v1/virtual_accounts` - Create a Customer Identifier With Bank Account Receiver: + Creates a Customer Identifier with bank account receiver. + + + - **post** `/v1/virtual_accounts/:id` - Update a Customer Identifier: + Updates details of a Customer Identifier. + + + - **get** `/v1/virtual_accounts/:id` - Fetch a Customer Identifier Using ID: + Retrieves details of a Customer Identifier using id. + + + - **get** `/v1/virtual_accounts/` - Fetch All Customer Identifiers: + Retrieves details of all Customer Identifiers. + + + - **get** `/v1/virtual_accounts/:id/payments` - Fetch Payments for a Customer Identifier: + Retrieves details of payments made against a particular Customer Identifier. + + + - **get** `/v1/virtual_accounts/:id/payments` - Fetch Payments Made By Bank Transfer: + Retrieves details of a payment using bank transfer method. + + + - **get** `/v1/payments?skip=0&count=25&va_transaction_id=:id&virtual_account=1` - Fetch Payments Using UTR: + Retrieves details of a payment using bank transfer method via UTR. + + + - **post** `/v1/virtual_accounts/:id/close` - Close a Customer Identifier: + Closes a Customer Identifier. + + + - **post** `v1/virtual_accounts/:id/receivers` - Add VPA Receiver to existing Customer Identifier With Smart Collect 2.0: + Adds a VPA Receiver to an existing Customer Identifier With Smart Collect 2.0. + + + - **post** `/v1/virtual_accounts` - Create Customer Identifier with VPA and Bank Account Receivers With Smart Collect 2.0: + Creates a Customer Identifier with VPA and Bank Account Receivers With Smart Collect 2.0. + + + - **get** `/v1/payments/:id/upi_transfer` - Fetch Payments Made Using UPI With Smart Collect 2.0: + Retrieves payments made using UPI With Smart Collect 2.0. diff --git a/llm-content/api/payments/smart-collect/close.md b/llm-content/api/payments/smart-collect/close.md new file mode 100644 index 00000000..d38e7808 --- /dev/null +++ b/llm-content/api/payments/smart-collect/close.md @@ -0,0 +1,238 @@ +--- +title: Close a Customer Identifier +description: Close a Customer Identifier using the Razorpay API +--- + +# Close a Customer Identifier + +## Close a Customer Identifier + +Use this endpoint to close a Customer Identifier. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/virtual_accounts/va_Di5gbNptcWV8fQ/close + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String virtualId = "va_Di5gbNptcWV8fQ"; + +instance.virtualAccounts.close(virtualId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.virtual_account.close(virtualId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +virtualId = "va_Di5gbNptcWV8fQ" + +Razorpay::VirtualAccount.close(virtualId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->virtualAccount->fetch($virtualId)->close(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.close(virtualId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.VirtualAccount.Close("", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +virtualId = "va_Di5gbNptcWV8fQ" + +Razorpay::VirtualAccount.close(virtualId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] + +string virtualId = "va_Z6t7VFTb9xHeOs"; + +VirtualAccount virtulaccount = client.VirtualAccount.Fetch("va_MaxCJzVjbKRBAr").Close(); +``` + +### Response + +```json: Success - bank account +{ + "id":"va_Di5gbNptcWV8fQ", + "name":"Acme Corp", + "entity":"virtual_account", + "status":"closed", + "description":"Customer Identifier created for M/S ABC Exports", + "amount_expected":230000, + "notes":{ + "material":"teakwood" + }, + "amount_paid":239000, + "customer_id":"cust_DOMUFFiGdCaCUJ", + "receivers":[ + { + "id":"ba_Di5gbQsGn0QSz3", + "entity":"bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name":"Acme Corp", + "notes":[], + "account_number":"1112220061746877" + } + ], + "close_by":1574427237, + "closed_at":1574164078, + "created_at":1574143517 +} + +```json: Success - vpa +{ + "id":"va_Di5gbNptcWV8fQ", + "name":"Acme Corp", + "entity":"virtual_account", + "status":"closed", + "description":"Customer Identifier created for M/S ABC Exports", + "amount_expected":null, + "notes":{ + "material":"teakwood" + }, + "amount_paid":239000, + "customer_id":"cust_DOMUFFiGdCaCUJ", + "receivers":[ + { + "id":"vpa_CkTmLXqVYPkbxx", + "entity":"vpa", + "username": "rpy.payto00000468657501", + "handle": "icici", + "address": "rpy.payto00000468657501@icici" + } + ], + "close_by":1574427237, + "closed_at":1574164078, + "created_at":1574143517 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the Customer Identifier that is to be closed. + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Know more about [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the virtual bank account or virtual UPI ID. Sample IDs for: + - Virtual bank account: `ba_Di5gbQsGn0QSz3` + - Virtual UPI ID: `vpa_CkTmLXqVYPkbxx` + + `entity` + : `string` Name of the entity. Possible values are: + - `bank_account` + - `vpa` + + `ifsc` + : `string` The IFSC for the virtual bank account created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the virtual bank account. For example, `RBL Bank`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the virtual bank account or virtual UPI ID can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `username` + : `string` The UPI ID consists of the username and the bank handle. The `username` consists of the `namespace` (assigned by the bank to Razorpay), the `merchant prefix` (which can be customised by you) and the `descriptor` (which you provide to identify the customer). The unique identifier which forms the first half of the virtual UPI ID. For example, `rpy.payto00000gaurikumari`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. The descriptor can be 10 characters only. + + `handle` + : `string` The bank name that forms the second half of the virtual UPI ID. For example, `icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + + `address` + : `string` The UPI ID that combines the `username` and the `handle` with the `@` symbol. For example, `rpy.payto00000gaurikumari@icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> - Any request beyond `2147483647` UNIX timestamp will fail. +> - A Customer Identifier API that has not been used for 90 days will be automatically closed even if no `close_by` date has been set. +> + + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: Occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure that the API keys are active and entered correctly. Also, make sure there are no whitespaces before or after the keys. diff --git a/llm-content/api/payments/smart-collect/create-cust-id-bank-account.md b/llm-content/api/payments/smart-collect/create-cust-id-bank-account.md new file mode 100644 index 00000000..df44267e --- /dev/null +++ b/llm-content/api/payments/smart-collect/create-cust-id-bank-account.md @@ -0,0 +1,345 @@ +--- +title: Create a Customer Identifier With Bank Account Receiver +description: Create a Customer Identifier with bank account receiver using the Razorpay API. +--- + +# Create a Customer Identifier With Bank Account Receiver + +## Create a Customer Identifier With Bank Account Receiver + +Use this endpoint to create a Customer Identifier with bank account receiver type. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/virtual_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "receivers": { + "types": [ + "bank_account" + ], + "bank_account": { + "descriptor": "1234567890" + } + }, + "description": "Customer Identifier created for Raftar Soft", + "customer_id": "cust_CaVDm8eDRSXYME", + "close_by": 1681615838, + "notes": { + "project_name": "Banking Software" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject virtualRequest = new JSONObject(); +List types = new ArrayList<>(); +JSONObject typesParam = new JSONObject(); +types.add("bank_account"); +typesParam.put("types",types); +virtualRequest.put("receivers",typesParam); +virtualRequest.put("description","Customer Identifier created for Raftar Soft"); +virtualRequest.put("customer_id","cust_JDdNazagOgg9Ig"); +virtualRequest.put("close_by",1681615838); +JSONObject notes = new JSONObject(); +notes.put("project_name","Banking Software"); +virtualRequest.put("notes", notes); + +VirtualAccount virtualaccount = instance.virtualAccounts.create(virtualRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.virtual_account.create({ + "receivers": { + "types": [ + "bank_account" + ] + }, + "description": "Customer Identifier created for Raftar Soft", + "customer_id": "cust_CaVDm8eDRSXYME", + "close_by": 1681615838, + "notes": { + "project_name": "Banking Software" + } +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->virtualAccount->create(array('receivers' => array('types'=> array('bank_account')),'allowed_payers' => array(array('type'=>'bank_account','bank_account'=>array('ifsc'=>'RATN0VAAPIS','account_number'=>'2223330027558515'))),'description' => 'Customer Identifier created for Raftar Soft','customer_id' => 'cust_HssUOFiOd2b1TJ', 'notes' => array('project_name' => 'Banking Software'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.create({ + receivers: { + types: [ + "bank_account" + ] + }, + description: "Customer Identifier created for Raftar Soft", + customer_id: "cust_CaVDm8eDRSXYME", + close_by: 1681615838, + notes: { + project_name: "Banking Software" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +types := make(map[string]interface{}) +types["0"] = "bank_account" + +data:= map[string]interface{}{ + "receivers": map[string]interface{}{ + "types": types, + }, + "description": "Customer Identifier created for Raftar Soft", + "customer_id": "cust_CaVDm8eDRSXYME", + "close_by": 1681615838, + "notes": map[string]interface{}{ + "project_name": "Banking Software", + }, +} + +body, err := client.VirtualAccount.Create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "receivers": { + "types": [ + "bank_account" + ] + }, + "description": "Customer Identifier created for Raftar Soft", + "customer_id": "cust_CaVDm8eDRSXYME", + "close_by": 1681615838, + "notes": { + "project_name": "Banking Software" + } +} + +Razorpay::VirtualAccount.create(para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] + +Dictionary virtualRequest = new Dictionary(); +string[] types = { "bank_account" }; +Dictionary typesParam = new Dictionary(); +typesParam.Add("types", types); +virtualRequest.Add("receivers", typesParam); +virtualRequest.Add("description", "Virtual Account created for Raftar Soft"); +virtualRequest.Add("customer_id", "cust_JDdNazagOgg9Ig"); +virtualRequest.Add("close_by", 1681615838); +Dictionary notes = new Dictionary(); +notes.Add("project_name", "Banking Software"); +virtualRequest.Add("notes", notes); + +VirtualAccount virtualaccount = client.VirtualAccount.Create(virtualRequest); + +``` + +### Response + +```json: Success +{ + "id":"va_DlGmm7jInLudH9", + "name":"Acme Corp", + "entity":"virtual_account", + "status":"active", + "description":"Customer Identifier created for Raftar Soft", + "amount_expected":null, + "notes":{ + "project_name":"Banking Software" + }, + "amount_paid":0, + "customer_id":"cust_CaVDm8eDRSXYME", + "receivers":[ + { + "id":"ba_DlGmm9mSj8fjRM", + "entity":"bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name":"Acme Corp", + "notes":[], + "account_number":"2223330099089860" + } + ], + "close_by":1681615838, + "closed_at":null, + "created_at":1574837626 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`receivers` _mandatory_ +: `json object` Configuration of desired receivers for the Customer Identifier. + + `types` + : `array` List of desired receiver types. Possible values: + - `bank_account` + - `vpa` + + `vpa` _optional_ + : `json object` Descriptor details for the virtual UPI ID. This is to be passed only when `vpa` is passed as the receiver `types`. + + `descriptor` + : `string` You can provide a custom descriptor for the UPI ID. This is a unique identifier provided by you to identify the customer. For example, `gaurikumari` and `akashkumar` are the descriptors in the usernames `rpy.payto00000gaurikumari` and `rpy.payto00000akashkumar` respectively. The combination of merchant prefix and descriptor must be 20 characters. The length of the merchant prefix can vary between 4-10 characters, and the length of descriptor from 10-16 characters. + + `bank_account` _optional_ + : `json object` Descriptor details for the Bank Account. This is to be passed only when `bank_account` is passed as the receiver `types`. + + `descriptor`_optional_ + : `string` A unique, numeric / alphanumeric custom descriptor defined by you for the bank account. The maximum length allowed is 10 digits. + +> **INFO** +> +> **Handy Tips** +Please reach out to the [support team](https://razorpay.com/support/#request) if you are unable to pass the parameter with `bank_account`. + + +`description` _optional_ +: `string` A brief description of the Customer Identifier. + +`customer_id` _optional_ +: `string` Unique identifier of the customer to whom the Customer Identifier must be tagged. Create a customer using the [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`notes` _optional_ +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). + +`close_by` _optional_ +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. For example, `1681615838`. This needs to be passed only if you want the Customer Identifier to be temporary and auto-deleted after a specific usage time. + + +> **WARN** +> +> +> **Watch Out!** +> - While sharing the details of Customer Identifiers (created using RBL bank) with the customers, ensure that the fifth character in the IFSC is number `0` and not the letter O. For example, valid IFSC is `RATN0VAAPIS` and not `RATNOVAAPIS`. +> - A Customer Identifier will close automatically only if the UNIX timestamp is passed in the `close_by` request parameter. +> + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Know more about [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the virtual bank account or virtual UPI ID. Sample IDs for: + - Virtual bank account: `ba_Di5gbQsGn0QSz3` + - Virtual UPI ID: `vpa_CkTmLXqVYPkbxx` + + `entity` + : `string` Name of the entity. Possible values are: + - `bank_account` + - `vpa` + + `ifsc` + : `string` The IFSC for the virtual bank account created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the virtual bank account. For example, `RBL Bank`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the virtual bank account or virtual UPI ID can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `username` + : `string` The UPI ID consists of the username and the bank handle. The `username` consists of the `namespace` (assigned by the bank to Razorpay), the `merchant prefix` (which can be customised by you) and the `descriptor` (which you provide to identify the customer). The unique identifier which forms the first half of the virtual UPI ID. For example, `rpy.payto00000gaurikumari`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. The descriptor can be 10 characters only. + + `handle` + : `string` The bank name that forms the second half of the virtual UPI ID. For example, `icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + + `address` + : `string` The UPI ID that combines the `username` and the `handle` with the `@` symbol. For example, `rpy.payto00000gaurikumari@icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + +`close_by` _optional_ +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. For example, ` 1681615838`. This is returned only if the UNIX timestamp was specified during the Customer Identifier creation. There is no expiry time for a Customer Identifier unless specified during creation. + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. + +### Errors + +The api `` provided is invalid +* code: 4xx +* description: Occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure that the API keys are active and entered correctly. Also, make sure there are no whitespaces before or after the keys. + +The `field name` is required +* code: 400 +* description: Occurs when a mandatory field is empty. +* solution: Make sure that all the mandatory fields are filled. + +The id provided does not exist +* code: 400 +* description: Occurs when the `customer_id` passed is wrong or does not belong to the identifier associated to the API Keys used. +* solution: Make sure that the `customer_id` and the API keys used belong to the same identifier and same mode, whether test or live respectively. + +Receivers field is required +* code: 400 +* description: Occurs when the receivers field is empty. +* solution: Make sure that the receivers field is populated with receiver type as either bank account or VPA according to your receiver requirement. + +An active Customer Identifier with the same descriptor already exists for your account. +* code: 400 +* description: The description provided by you already exists for another account. +* solution: Provide a different description, as the same description already exists for an account. diff --git a/llm-content/api/payments/smart-collect/entity.md b/llm-content/api/payments/smart-collect/entity.md new file mode 100644 index 00000000..5746bbc6 --- /dev/null +++ b/llm-content/api/payments/smart-collect/entity.md @@ -0,0 +1,113 @@ +--- +title: Smart Collect Entity +description: Entity parameters and sample code for Smart Collect API. +--- + +# Smart Collect Entity + +The Smart Collect entity has the following parameters: + +### Response + +```json: Entity +{ + "id":"va_CaVE4QbyJvQRdk", + "name":"Acme Corp", + "entity":"virtual_account", + "status":"active", + "description":"Customer Identifier created for Gaurav Kumar", + "notes":{ + "flat no":"105" + }, + "amount_paid":0, + "customer_id":"cust_805c8oBQdBGPwS", + "receivers":[ + { + "id": "ba_DzXNNxY8yQu5iV", + "entity": "bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223333230231378" + } + ], + "close_by": 1581615838, + "closed_at": null, + "created_at": 1577962694 +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Know more about [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the virtual bank account. Sample IDs for: - Virtual bank account: `ba_Di5gbQsGn0QSz3` + + `entity` + : `string` Name of the entity. Possible values are: - `bank_account` + + `ifsc` + : `string` The IFSC for the virtual bank account created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the virtual bank account. For example, `RBL Bank`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the virtual bank account can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> - Any request beyond `2147483647` UNIX timestamp will fail. +> - A Customer Identifier API that has not been used for 90 days will be automatically closed even if no `close_by` date has been set. +> + + + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. diff --git a/llm-content/api/payments/smart-collect/fetch-all.md b/llm-content/api/payments/smart-collect/fetch-all.md new file mode 100644 index 00000000..629bfa0c --- /dev/null +++ b/llm-content/api/payments/smart-collect/fetch-all.md @@ -0,0 +1,261 @@ +--- +title: Fetch All Customer Identifiers +description: Fetch all Customer Identifiers using the Razorpay Smart Collect APIs. +--- + +# Fetch All Customer Identifiers + +## Fetch All Customer Identifiers + +Use this endpoint to retrieve details of all Customer Identifiers. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET \ +https://api.razorpay.com/v1/virtual_accounts \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List virtualaccount = instance.virtualAccounts.fetchAll(params); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.virtual_account.all(options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +options = {"count":1} + +Razorpay::VirtualAccount.all(options) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->virtualAccount->all($options); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.all(options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "count" : 1, +} + +body, err := client.VirtualAccount.All(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +options = {"count":1} + +Razorpay::VirtualAccount.all(options) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] + +Dictionary param = new Dictionary(); +param.Add("count","1"); + +List virtualaccount = client.VirtualAccount.All(param); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "va_Di5gbNptcWV8fQ", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "closed", + "description": "Customer Identifier created for M/S ABC Exports", + "amount_expected": 2300, + "notes": { + "material": "teakwood" + }, + "amount_paid": 239000, + "customer_id": "cust_DOMUFFiGdCaCUJ", + "receivers": [ + { + "id": "ba_Di5gbQsGn0QSz3", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "1112220061746877" + } + ], + "close_by": 1574427237, + "closed_at": 1574164078, + "created_at": 1574143517 + }, + { + "id": "va_Dho86Avmdw6h09", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Customer Identifier created for Raftar Soft", + "amount_expected": null, + "notes": { + "material": "oakwood" + }, + "amount_paid": 0, + "customer_id": "cust_DOMUFFiGdCaDNK", + "receivers": [ + { + "id": "ba_Dho86DoV16LqiO", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "1112220046254840" + } + ], + "close_by": 1574427237, + "closed_at": null, + "created_at": 1574081690 + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`from` _optional_ +: `integer` Timestamp, in seconds, from when Customer Identifiers are to be fetched. + +`to` _optional_ +: `integer` Timestamp, in seconds, till when Customer Identifiers are to be fetched. + +`count` _optional_ +: `integer` Number of Customer Identifiers to be fetched. The default value is 10 and the maximum value is 100. This can be used for pagination, in combination with `skip`. + +`skip` _optional_ +: `integer` Number of records to be skipped while fetching the Customer Identifiers. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Know more about [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the virtual bank account. Sample IDs for: + - Virtual bank account: `ba_Di5gbQsGn0QSz3` + - Virtual UPI ID: `vpa_CkTmLXqVYPkbxx` + + `entity` + : `string` Name of the entity. Possible values: + - `bank_account` + - `vpa` + + `ifsc` + : `string` The IFSC for the virtual bank account created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the virtual bank account. For example, `RBL Bank`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the virtual bank account can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + : `json object` Any custom notes you might want to add to the virtual bank account or virtual UPI ID can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md). This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `username` + : `string` The UPI ID consists of the username and the bank handle. The `username` consists of the `namespace` (assigned by the bank to Razorpay), the `merchant prefix` (which can be customised by you) and the `descriptor` (which you provide to identify the customer). The unique identifier which forms the first half of the virtual UPI ID. For example, `rpy.payto00000gaurikumari`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. The descriptor can be 10 characters only. + + `handle` + : `string` The bank name that forms the second half of the virtual UPI ID. For example, `icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + + `address` + : `string` The UPI ID that combines the `username` and the `handle` with the `@` symbol. For example, `rpy.payto00000gaurikumari@icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> - Any request beyond `2147483647` UNIX timestamp will fail. +> - A Customer Identifier API that has not been used for 90 days will be automatically closed even if no `close_by` date has been set. +> + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: Occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the dashboard. +* solution: Make sure that the API keys are active and entered correctly. Also, make sure there are no whitespaces before or after the keys. diff --git a/llm-content/api/payments/smart-collect/fetch-payments-bank-transfer-utr.md b/llm-content/api/payments/smart-collect/fetch-payments-bank-transfer-utr.md new file mode 100644 index 00000000..80efca2f --- /dev/null +++ b/llm-content/api/payments/smart-collect/fetch-payments-bank-transfer-utr.md @@ -0,0 +1,335 @@ +--- +title: Fetch Payments Using UTR Number +description: Fetch Payments made using Bank Transfer via UTR using the Razorpay API. +--- + +# Fetch Payments Using UTR Number + +## Fetch Payments Using UTR Number + +Use this endpoint to retrieve details of payments made using the bank transfer method via UTR. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET \ +https://api.razorpay.com/v1/payments?skip=0&count=25&va_transaction_id=209817848101&virtual_account=1 +-H "Content-Type: application/json" \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("skip", 0); +params.put("count", 25); +params.put("va_transaction_id", 209817848101); +params.put("virtual_account”, 1); + +List payments = razorpay.Payments.fetchAll(params); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.all({ + "skip": 0, + "count": 25, + “va_transaction_id”: 209817848101, + "virtual_account": 1 +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->all(array('skip' => 0, 'count' => 25, 'va_transaction_id' => 209817848101, virtual_account'=> 1)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.all( + "count": 25, + "skip": 0, + "va_transaction_id": 209817848101, + “virtual_account”: 1 +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "count": 25, + “skip”: 0, + “va_transaction_id”: 209817848101, + “virtual_account”: 1, +} + +body, err := client.Payment.All(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("count", 10); +paymentRequest.Add("skip", 0); +paymentRequest.Add("va_transaction_id", 209817848101); +paymentRequest.Add("virtual_account", 1); + +```ruby: Ruby +require 'razorpay' +Razorpay.setup("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]") + +Razorpay::Payment.all({count:25, skip:0, va_transaction_id: 209817848101, virtual_account: 1}) +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "pay_JGmL38CqCHTyZZ", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi ", + "email": "saurav.kumar@example.com", + "contact": "+919900990099", + "customer_id": "cust_HWj3MjySAHSjtq", + "notes": [], + "fee": 12, + "tax": 2, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "209817848101" + }, + "created_at": 1649402719 + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`count` _optional_ +: `integer` Number of payments to be fetched. Default value is 10. Maximum value is 100. This can be used for pagination, in combination with the `skip` parameter. + +`skip` _optional_ +: `integer` Number of records to be skipped while fetching the payments. + +`va_transaction_id` _optional_ +: `integer` The UTR number or the unique transaction id of the transaction done via a Customer Identifier. + +`virtual_account` _optional_ +: `integer` The product used to fetch is Customer Identifiers. +Possible values: `1` + +### Parameters + +`id` +: `string` UTR number or unique transaction id of the transaction. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, `amount_refunded = 1000` indicates ₹10.00. + +`currency` +: `string` The currency in which the payment is made. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorised` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, `amount_refunded = 1000` indicates ₹10.00. + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. This attribute will not be set for the card issued by a foreign bank. + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business`. Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible value `in_app`. The field `flow` is present only in the case of Turbo UPI Payments. + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: Occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the dashboard. +* solution: Make sure that the API keys are active and entered correctly. Also, make sure there are no whitespaces before or after the keys. diff --git a/llm-content/api/payments/smart-collect/fetch-payments-bank-transfer.md b/llm-content/api/payments/smart-collect/fetch-payments-bank-transfer.md new file mode 100644 index 00000000..e01cc2e6 --- /dev/null +++ b/llm-content/api/payments/smart-collect/fetch-payments-bank-transfer.md @@ -0,0 +1,256 @@ +--- +title: Fetch Payments Made Using Bank Transfer +description: Fetch Payments made using Bank Transfer payment method. +--- + +# Fetch Payments Made Using Bank Transfer + +## Fetch Payments Made By Bank Transfer + +Use this endpoint to retrieve details of payments made using the bank transfer method. + +If Razorpay does not receive the bank account information of the customer from the remitting bank, the `payer_bank_account` parameter will be set to null. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET \ +https://api.razorpay.com/v1/payments/pay_CmiztqmYJPtDAu/bank_transfer \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_CmiztqmYJPtDAu"; + +Payment payment = instance.payments.fetchBankTransfers(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($virtualId)->bankTransfer(); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +paymend_id = "pay_Di5iqCqA1WEHq6" + +Razorpay::Payment.fetch(paymend_id).bank_transfer + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.bank_transfer(paymentId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.bankTransfer(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.BankTransfer("", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymend_id = "pay_Di5iqCqA1WEHq6" + +Razorpay::Razorpay::Payment.fetch(paymend_id).bank_transfer + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +BankTransfer virtualaccount = client.Payment.Fetch(paymentId).BankTransfers(); +``` + +### Response + +```json: Success +{ + "id": "bt_Di5iqCElVyRlCb", + "entity": "bank_transfer", + "payment_id": "pay_Di5iqCqA1WEHq6", + "mode": "NEFT", + "bank_reference": "157414364471", + "amount": 239000, + "payer_bank_account": { + "id": "ba_Di5iqSxtYrTzPU", + "entity": "bank_account", + "ifsc": "UTIB0003198", + "bank_name": "Axis Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "765432123456789" + }, + "virtual_account_id": "va_Di5gbNptcWV8fQ", + "virtual_account": { + "id": "va_Di5gbNptcWV8fQ", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "closed", + "description": "Customer Identifier created for M/S ABC Exports", + "amount_expected": 2300, + "notes": { + "material": "teakwood" + }, + "amount_paid": 239000, + "customer_id": "cust_DOMUFFiGdCaCUJ", + "receivers": [ + { + "id": "ba_Di5gbQsGn0QSz3", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "1112220061746877" + } + ], + "close_by": 1574427237, + "closed_at": 1574164078, + "created_at": 1574143517 + } +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the payment made to the Customer Identifier. + +### Parameters + +`id` +: `string` The unique identifier of the bank transfer. + +`entity` +: `string` The name of the entity. Here, it is `bank_transfer`. + +`payment_id` +: `string` The unique identifier of the payment. + +`mode` +: `string` The mode of bank transfer used. Possible values are: + - `NEFT` + - `RTGS` + - `IMPS` + - `UPI` + +`bank_reference` +: `string` Unique reference number provided by the bank for the transaction. + +`payer_bank_account` +: `object` The payer bank account details from which payment is received. + + `id` + : `string` The unique identifier of the customer's bank account. + + `entity` + : `string` The name of the entity. Here, it is `bank_account`. + + `ifsc` + : `string` The IFSC associated with the bank account. + + `bank_name` + : `string` The name of the bank in which the customer has an account. + + `notes` + : `object` Any custom notes added to the Customer Identifier. + + `account_number` + : `string` The unique account number of the customer. + +`virtual_account_id` +: `string` The unique identifier of the Customer Identifier. + +`virtual_account` +: `object` Details of the Customer Identifier. + + `id` + : `string` The unique identifier of the Customer Identifier. + + `name` + : `string` The `merchant billing label` as it appears on Dashboard. + + `entity` + : `string` The name of the entity. Here, it is `virtual account`. + + `status` + : `string` Indicates the status of the Customer Identifier. Possible values are: + - `active` + - `closed` + + `description` + : `string` A brief description about the Customer Identifier. + + `amount_expected` + : `integer` The amount expected by the merchant. + + `amount_paid` + : `integer` The amount paid by the customer to the Customer Identifier. + + `notes` + : `object` Any custom notes added during the creation of the Customer Identifier. + + `customer_id` + : `string` The unique identifier of the customer the Customer Identifier is linked with. Know more about [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + + `receivers` + : `object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the Customer Identifier. For example, `ba_Di5gbQsGn0QSz3`. + + `entity` + : `string` The name of the entity. Here, it is `bank_account`. + + `ifsc` + : `string` The IFSC for the Customer Identifier created. For example, `RATN0VAAPIS`. + + `bank_name` + : `string` The bank associated with the Customer Identifier. For example, `RBL`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. + + `name` + : `string` The `merchant billing label` as it appears on Dashboard. + + `notes` + : `object` Any custom notes added during the creation of the Customer Identifier. + + `close_by` + : `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). Any request beyond `2147483647` UNIX timestamp will fail. + + `closed_at` + : `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + + `created_at` + : `integer` UNIX timestamp at which the Customer Identifier was created. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: Occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the dashboard. +* solution: Make sure that the API keys are active and entered correctly. Also, make sure there are no whitespaces before or after the keys. diff --git a/llm-content/api/payments/smart-collect/fetch-payments-cust-id.md b/llm-content/api/payments/smart-collect/fetch-payments-cust-id.md new file mode 100644 index 00000000..d20e2058 --- /dev/null +++ b/llm-content/api/payments/smart-collect/fetch-payments-cust-id.md @@ -0,0 +1,362 @@ +--- +title: Fetch Payments for a Customer Identifier +description: Fetch payments for a Customer Identifier using the Razorpay API +--- + +# Fetch Payments for a Customer Identifier + +## Fetch Payments for a Customer Identifier + +Use this endpoint to retrieve payment details for a single Customer Identifier by id. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET \ +https://api.razorpay.com/v1/virtual_accounts/va_CminDKtoToBGmd/payments \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String virtualId = "va_DlGmm7jInLudH9"; + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List virtualaccounts = instance.virtualAccounts.fetchPayments(virtualId,params); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.virtual_account.payments(virtualId,options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +virtualId = "va_IDDYE8gYTLJCEH" + +options = {"count":1} + +Razorpay::VirtualAccount.fetch(virtualId).payments(options) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->virtualAccount->fetch($virtualId)->payments($options); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.fetchPayments(virtualId,options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.VirtualAccount.Payments("", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +virtualId = "va_IDDYE8gYTLJCEH" + +options = {"count":1} + +Razorpay::VirtualAccount.fetch(virtualId).payments(options) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] + +string virtualId = "va_Z6t7VFTb9xHeOs"; + +Dictionary param = new Dictionary(); +param.Add("count","1"); + +List virtualaccount = client.VirtualAccount.Fetch(virtualId).Payments(param); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "pay_JGmL38CqCHTyZZ", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_HWj3MjySAHSjtq", + "notes": [], + "fee": 12, + "tax": 2, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "209817848101" + }, + "created_at": 1649402719 + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the Customer Identifier for which the payment details are to be fetched. + +### Parameters + +`from` _optional_ +: `integer` Timestamp, in seconds, from when payments are to be fetched. + +`to` _optional_ +: `integer` Timestamp, in seconds, till when payments are to be fetched. + +`count` _optional_ +: `integer` Number of payments to be fetched. The default value is 10 and the maximum value is 100. This can be used for pagination, in combination with `skip`. + +`skip` _optional_ +: `integer` Number of records to be skipped while fetching the payments. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + +`currency` +: `string` The currency in which the payment is made. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. + + +> **INFO** +> +> +> **Handy Tips** +> +> This attribute will not be set for the card issued by a foreign bank. +> + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + +> **INFO** +> +> +> **Handy Tips** +> +> Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). +> + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible value `in_app`. + +> **INFO** +> +> +> **Handy Tips** +> +> The field `flow` is present only in the case of Turbo UPI Payments. +> + + + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: Occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the dashboard. +* solution: Make sure that the API keys are active and entered correctly. Also, make sure there are no whitespaces before or after the keys. diff --git a/llm-content/api/payments/smart-collect/fetch-with-id.md b/llm-content/api/payments/smart-collect/fetch-with-id.md new file mode 100644 index 00000000..a9000e4b --- /dev/null +++ b/llm-content/api/payments/smart-collect/fetch-with-id.md @@ -0,0 +1,199 @@ +--- +title: Fetch a Customer Identifier Using id +description: Fetch a Customer Identifier with id using the Razorpay API +--- + +# Fetch a Customer Identifier Using id + +## Fetch a Customer Identifier Using ID + +Use this endpoint to fetch a Customer Identifier with id. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET \ +https://api.razorpay.com/v1/virtual_accounts/va_D6Vw6zyJ0OmRZg \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String virtualId = "va_4xbQrmEoA5WJ0G"; + +VirtualAccount virtualaccount = instance.virtualAccounts.fetch(virtualId); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.virtual_account.fetch(virtualId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') + +virtualId = "va_IDDYE8gYTLJCEH" + +Razorpay::VirtualAccount.fetch(virtualId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->virtualAccount->fetch($virtualId); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.fetch(virtualId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.VirtualAccount.Fetch("", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +virtualId = "va_IDDYE8gYTLJCEH" + +Razorpay::VirtualAccount.fetch(virtualId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET] + +string virtualId = "va_Z6t7VFTb9xHeOs"; + +VirtualAccount virtualaccount = client.VirtualAccount.Fetch(virtualId); +``` + +### Response + +```json: Success - bank account +{ + "id": "va_D6Vw6zyJ0OmRZg", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Customer Identifier for Raftar Soft", + "amount_expected": 5000, + "notes": [], + "amount_paid": null, + "customer_id": "cust_9xnHzNGIEY4TAV", + "receivers": [ + { + "id": "ba_D6Vw76RrHA3DC9", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223330025991681" + } + ], + "close_by": null, + "closed_at": 1568109789, + "created_at": 1565939036 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the Customer Identifier whose details are to be fetched. + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Know more about [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the virtual bank account. Sample IDs for: + - Virtual bank account: `ba_Di5gbQsGn0QSz3` + - Virtual UPI ID: `vpa_CkTmLXqVYPkbxx` + + `entity` + : `string` Name of the entity. Possible values: + - `bank_account` + - `vpa` + + `ifsc` + : `string` The IFSC for the virtual bank account created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the virtual bank account. For example, `RBL Bank`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the virtual bank account can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> - Any request beyond `2147483647` UNIX timestamp will fail. +> - A Customer Identifier API that has not been used for 90 days will be automatically closed even if no `close_by` date has been set. +> + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. + +### Errors + +The API `` provided is invalid. +* code: 4xx +* description: Occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard. +* solution: Make sure that the API keys are active and entered correctly. Also, make sure there are no whitespaces before or after the keys. diff --git a/llm-content/api/payments/smart-collect/update.md b/llm-content/api/payments/smart-collect/update.md new file mode 100644 index 00000000..e87a6fdf --- /dev/null +++ b/llm-content/api/payments/smart-collect/update.md @@ -0,0 +1,284 @@ +--- +title: Update a Customer Identifier +description: Update a Customer Identifier using the Razorpay API +--- + +# Update a Customer Identifier + +## Update a Customer Identifier + +Use this endpoint to update your Customer Identifier. You cannot update the expiry date of a Customer Identifier that has been closed. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X PATCH https://api.razorpay.com/v1/virtual_accounts/va_KFIrkRmd70ylIg +-H 'content-type: application/json' +-d '{ + "close_by": 1981615845, + "description": "VA creation for Raftar Soft", + "notes": { + "project_name": "Banking Software Work" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String virtualId = "va_Di5gbNptcWV8fQ"; + +JSONObject virtualRequest = new JSONObject(); +List types = new ArrayList<>(); +types.add("vpa"); +virtualRequest.put("types",types); +JSONObject vpa = new JSONObject(); +vpa.put("descriptor","gaurikumari"); +virtualRequest.put("vpa",vpa); + +VirtualAccount virtualaccount = instance.virtualAccounts.addReceiver(virtualId,virtualRequest); + +```php: PHP +$api = new Api('YOUR_KEY_ID, 'YOUR_KEY_SECRET'); +$api->virtualAccount->fetch($virtualId)->addReceiver(array('types' => array('vpa'),'vpa' => array('descriptor'=>'gauravkumar'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.virtualAccounts.addReceiver(virtualId,{ + types: [ + "vpa" + ], + vpa: { + descriptor: "gaurikumari" + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.virtual_account.add_receiver(virtualId,{ + "types": [ + "vpa" + ], + "vpa": { + "descriptor": "gaurikumari" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +types := make(map[string]interface{}) +types["0"] = "vpa" + +data:= map[string]interface{}{ + "types": types, + "vpa": map[string]interface{}{ + "descriptor": "gaurikumari", + }, + } + +body, err := client.VirtualAccount.AddReceiver("", data, nil) +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String virtualId = "va_Di5gbNptcWV8fQ"; + +JSONObject virtualRequest = new JSONObject(); +List types = new ArrayList<>(); +types.add("vpa"); +virtualRequest.put("types",types); +JSONObject vpa = new JSONObject(); +vpa.put("descriptor","gaurikumari"); +virtualRequest.put("vpa",vpa); + +VirtualAccount virtualaccount = instance.virtualAccounts.addReceiver(virtualId,virtualRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string virtualId = "va_NHjFyJYeqeNsag"; + +Dictionary virtualRequest = new Dictionary(); +virtualRequest.Add("description", "VA creation for Raftar Soft"); +Dictionary notes = new Dictionary(); +notes.Add("project_name", "Banking Software Work"); +virtualRequest.Add("notes", notes); + +VirtualAccount refund = client.VirtualAccount.Fetch(virtualId).Edit(virtualRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +virtualId = "va_Di5gbNptcWV8fQ" + +para_attr = { + "types": [ + "vpa" + ], + "vpa": { + "descriptor": "gaurikumari" + } +} + +Razorpay::VirtualAccount.add_receiver(virtualId, para_attr) +``` + +### Response + +```json: Success +{ + "id": "va_KFIrkRmd70ylIg", + "name": "Word Express", + "entity": "virtual_account", + "status": "active", + "description": "VA creation for Raftar Soft", + "amount_expected": null, + "notes": { + "project_name": "Banking Software Work" + }, + "amount_paid": 0, + "customer_id": "cust_FY61BIF7OVJLRp", + "receivers": [ + { + "id": "ba_KFIrkdawCUDC6n", + "entity": "bank_account", + "ifsc": "RAZR0000001", + "bank_name": null, + "name": "Word Express", + "notes": [], + "account_number": "1112220091736494" + } + ], + "close_by": 1981615845, + "closed_at": null, + "created_at": 1577969986 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "close by date should be atleast 15 min after current time", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the Customer Identifier which you want to update. + +### Parameters + +`close_by` _optional_ +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> - Any request beyond `2147483647` UNIX timestamp will fail. +> - If a Customer Identifier API is not used for 90 days, it will automatically close even if no `close_by` date has been set. +> + +`description` _optional_ +: `string` A brief description of the Customer Identifier. + +`notes` _optional_ +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Refer to the [Notes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to learn more. + +### Parameters + +`id` +: `string` The unique identifier of the Customer Identifier. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the Customer Identifier is in `active` or `closed` state. + +`description` +: `string` A brief description about the Customer Identifier. + +`amount_expected` +: `integer` The amount expected by the merchant. + +`amount_paid` +: `integer` The amount paid by the customer into the Customer Identifier. + +`notes` +: `json object` Any custom notes you might want to add to the Customer Identifier can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). + +`customer_id` +: `string` Unique identifier of the customer the Customer Identifier is linked with. Know more about [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`receivers` +: `json object` Configuration of desired receivers for the Customer Identifier. + + `id` + : `string` The unique identifier of the virtual bank account. Sample IDs for: + - Virtual bank account: `ba_Di5gbQsGn0QSz3` + - Virtual UPI ID: `vpa_CkTmLXqVYPkbxx` + + `entity` + : `string` Name of the entity. Possible values: + - `bank_account` + - `vpa` + + `ifsc` + : `string` The IFSC for the virtual bank account created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the virtual bank account. For example, `RBL Bank`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the virtual bank account can be entered here. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + +`close_by` +: `integer` UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + - Any request beyond `2147483647` UNIX timestamp will fail. + - A Customer Identifier API that has not been used for 90 days will be automatically closed even if no `close_by` date has been set. + +`closed_at` +: `integer` UNIX timestamp at which the Customer Identifier is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the Customer Identifier was created. + +### Errors + + +Customer Identifier cannot be updated +* code: 400 +* description: If you have created a Customer Identifier with only a VPA receiver, you cannot replace or update it. +* solution: Create a new Customer Identifier with bank account details. + +Bank account Receiver already exists +* code: 400 +* description: If you have created a Customer Identifier with a receiver, for example, bank account, you cannot add another bank account receiver or replace it. +* solution: Create a new Customer Identifier for new banking details of receiver. + +close by date should be atleast 15 min after current time +* code: 400 +* description: The epoch time passed is less than current time. +* solution: Send the correct `close_by` time. And the `close_by` time should be more than 15 minutes from the current time. diff --git a/llm-content/api/payments/subscriptions-custom.md b/llm-content/api/payments/subscriptions-custom.md new file mode 100644 index 00000000..3189e1ec --- /dev/null +++ b/llm-content/api/payments/subscriptions-custom.md @@ -0,0 +1,2368 @@ +--- +title: Subscriptions +description: Create and fetch Plans and Subscriptions. Create and delete Add-ons using Razorpay Subscriptions APIs. +--- + +# Subscriptions + +You can create, fetch, query or cancel plans, subscriptions and addons using the Subscriptions API. These operations can also be performed on the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md). + +## Postman Collection + +We have a Postman collection to make the integration quicker and easier. Click the **Download Postman Collection** button below to get started. + +[Download Postman Collection](https://app.getpostman.com/run-collection/2d531340e7ec07fad630) + +### Instructions to Use Postman Collection + +- All Razorpay APIs are authenticated using Basic Authentication. + - [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + - Add your API Keys in Postman. Select the required API → Auth → Type = Basic Auth → Username = [Your_Key_ID]; Password = [Your_Key_secret] + ![](/docs/assets/images/api-postman_basic_auth.gif) +- Some APIs in the collection require data specific to your account such as `plan_id`, `sub_id` and `ao_id` either in the request body or as a query parameter. + - For example, the create subscription API requires you to add the `plan_id` (Plan ID) in the request body. + - These parameters are enclosed in \{\} in the collection. For example, \{plan_id\}. + - The API throws an error if these are incorrect or do not exist in your system. + +## Plans + +A plan is a foundation on which a Subscription is built. It acts as a reusable template and contains details of the goods or services offered, the amount to be charged and the frequency at which the customer should be charged (billing cycle). Depending upon your business, you can create multiple plans with different billing cycles and pricing. + +You should create a plan using the Checkout or Subscription link before creating a Subscription. + +### Create a Plan + +Use the below endpoint to create a plan. + +/plans + +#### Request Parameters + +`period` _mandatory_ +: `string` This, combined with `interval`, defines the frequency of the plan. Possible values: + - `daily` + - `weekly` + - `monthly` + - `quarterly` + - `yearly` + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can create custom frequencies while creating a plan. For example, once in 3 weeks. +> - For UPI, all undefined frequencies except `daily`, `weekly`, `monthly`, `quarterly` and `yearly` are considered `as-presented`. +> - For domestic cards, all undefined frequencies except `weekly`, `monthly` and `yearly` are considered `as-presented` while registering the mandate with banks. +> - For Emandate, all defined and undefined frequencies are considered `as-presented` while registering the mandate with banks. +> + + + +`interval` _mandatory_ +: `integer` This, combined with `period`, defines the frequency of the plan. If the billing cycle is 2 months, the value should be `2`. For daily plans, the minimum value should be `7`. + +`item` +: `object` Details of the plan. + + `name` _mandatory_ + : `string` Name of the plan. For example, `Test Plan`. + + `amount` _mandatory_ + : `integer` Amount for the plan that is to be charged to the subscription in the next billing cycle. For example, `69900` translates to . + + `currency` _mandatory_ + : `string` Currency for the payment. For example, `INR`. You can accept payment in any of the [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `description` _optional_ + : `string` Description for the plan. For example, `Description for the test plan`. + +`notes` _optional_ +: `object` Notes you can enter of the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Monthly gym membership"`. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/plans \ +-H "Content-Type: application/json" \ +-d '{ + "period": "weekly", + "interval": 1, + "item": { + "name": "Test plan - Weekly", + "amount": 69900, + "currency": "", + "description": "Description for the test plan" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject planRequest = new JSONObject(); +planRequest.put("period","weekly"); +planRequest.put("interval",1); +JSONObject item = new JSONObject(); +item.put("name","Test plan - Weekly"); +item.put("amount",69900); +item.put("currency",""); +item.put("description","Description for the test plan"); +planRequest.put("item",item); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +planRequest.put("notes",notes); + +Plan plan = razorpay.plans.create(planRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->plan->create(array('period' => 'weekly', 'interval' => 1, 'item' => array('name' => 'Test Weekly 1 plan', 'description' => 'Description for the weekly 1 plan', 'amount' => 600, 'currency' => ''),'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.plans.create({ + period: "weekly", + interval: 1, + item: { + name: "Test plan - Weekly", + amount: 69900, + currency: "", + description: "Description for the test plan" + }, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.plan.create({ + 'period': 'weekly', + 'interval': 1, + 'item': { + 'name': 'Test plan - Weekly', + 'amount': 69900, + 'currency': '', + 'description': 'Description for the test plan', + }, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "period": "weekly", + "interval": 1, + "item": { + "name": "Test plan - Weekly", + "amount": 69900, + "currency": "", + "description": "Description for the test plan" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Plan.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "period": "weekly", + "interval": 1, + "item": map[string]interface{}{ + "name": "Test plan - Weekly", + "amount": 69900, + "currency": "", + "description": "Description for the test plan", + }, + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} +body, err := client.Plan.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary planRequest = new Dictionary(); +planRequest.Add("period", "weekly"); +planRequest.Add("interval", 1); +Dictionary item = new Dictionary(); +item.Add("name", "Test plan - Weekly"); +item.Add("amount", 69900); +item.Add("currency", ""); +item.Add("description", "Description for the test plan"); +planRequest.Add("item", item); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +planRequest.Add("notes", notes); + +Plan plan = client.Plan.Create(planRequest); +``` + +```json: Success Response +{ + "id":"plan_00000000000001", + "entity":"plan", + "interval":1, + "period":"weekly", + "item":{ + "id":"item_00000000000001", + "active":true, + "name":"Test plan - Weekly", + "description":"Description for the test plan - Weekly", + "amount":69900, + "unit_amount":69900, + "currency":"", + "type":"plan", + "unit":null, + "tax_inclusive":false, + "hsn_code":null, + "sac_code":null, + "tax_rate":null, + "tax_id":null, + "tax_group_id":null, + "created_at":1580219935, + "updated_at":1580219935 + }, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1580219935 +} + +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "offer_id is/are not required and should not be sent" + } +} +``` + +#### Response Parameters + +`id` +: `string` The unique identifier linked to a plan. For example, `plan_00000000000001`. This ID is used when creating a subscription for a customer. + +`entity` +: `string` The entity being created. Here, it is `plan`. + +`interval` +: `integer` Used together with `period` to define how often the customer should be charged. + +`period` +: `string` Used together with `interval` to define how often the customer should be charged. Possible values: + - `daily` + - `weekly` + - `monthly` + - `yearly` + +`item` +: `array` Details of the plan. + + `id` + : `string` The unique identifier linked to an item. For example, `item_00000000000001`. + + `name` + : `string` Name of the plan. For example, `Test Plan`. + + `amount` + : `integer` Amount for the plan. When you use this plan to create a subscription, the customer will be charged this amount periodically. + + `currency` + : `string` Currency for the payment. You can accept payment in any of the [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `description` + : `string` Description for the plan. For example, `Description for the test plan`. + +`notes` +: `object` Notes you can enter of the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Monthly Gym"`. + +`created_at` +: `integer` The Unix timestamp at which the plan was created. + +### Fetch all Plans + +Use the below endpoint to fetch details of all plans. + +/plans + +#### Query Parameters + +`from` _optional_ +: `integer` The Unix timestamp from when plans are to be fetched. + +`to` _optional_ +: `integer` The Unix timestamp till when plans are to be fetched. + +`count` _optional_ +: `integer` The number of plans to be fetched. Default value is 10. Maximum value is 100. This can be used for pagination in combination with `skip`. + +`skip` _optional_ +: `integer` The number of plans to be skipped. Default value is 0. This can be used for pagination in combination with `count`. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/plans \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List plans = razorpay.plans.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->plan->all($options); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.plans.all(options) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.plan.all(options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +options = {"count": 2} + +Razorpay::Plan.all(options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +options:= map[string]interface{}{ + "count": 1, + "skip": 1, +} +body, err := client.Plan.All(options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("count","1"); + +List plan = client.Plan.All(paramRequest); +``` + +### Fetch a Plan by ID + +Use the below endpoint to fetch details of a plan by its unique identifier. + +/plans/:id + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the plan. For example, `plan_00000000000001`. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/plans/plan_00000000000001 \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String planId = "plan_00000000000001"; + +Plan plan = razorpay.plans.fetch(planId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->plan->fetch($planId); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.plans.fetch(planId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.plan.fetch(planId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +planId = "plan_00000000000001" + +Razorpay::Plan.fetch(planId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Plan.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String planId = "plan_00000000000001"; + +Plan plan = client.Plan.Fetch(planId); +``` + +## Subscriptions + +You can use Subscriptions to charge a customer periodically. A Subscription ties a customer to a particular plan you have created. It contains details like the plan, the start date, total number of billing cycles, free trial period (if any) and upfront amount to be collected. + +### Create a Subscription + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/subscriptions \ +-H "Content-Type: application/json" \ +-d '{ + "plan_id":"plan_00000000000001", + "total_count":6, + "quantity":1, + "customer_notify": true, + "start_at":1773461489, + "expire_by":1773547889, + "addons":[ + { + "item":{ + "name":"Delivery charges", + "amount":3000, + "currency":"" + } + } + ], + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary subscriptionRequest = new Dictionary(); +subscriptionRequest.Add("plan_id", "plan_Z6t7VFTb9xHeOs"); +subscriptionRequest.Add("total_count", 6); +subscriptionRequest.Add("quantity", 1); +subscriptionRequest.Add("customer_notify", true); +subscriptionRequest.Add("start_at", 1773461489); +subscriptionRequest.Add("expire_by", 1773547889); +Dictionary linesItem = new Dictionary(); +Dictionary item = new Dictionary(); +item.Add("name", "Delivery charges"); +item.Add("amount", 30000); +item.Add("currency", ""); +linesItem.Add("item", item); +object[] addons = new object[]{ linesItem }; +subscriptionRequest.Add("addons", addons); +subscriptionRequest.Add("offer_id", "offer_LFw2SqDBi8kf53"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +subscriptionRequest.Add("notes", notes); + +Subscription subscription = client.Subscription.Create(subscriptionRequest); +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject subscriptionRequest = new JSONObject(); +subscriptionRequest.put("plan_id", "plan_7wAosPWtrkhqZw"); +subscriptionRequest.put("total_count", 6); +subscriptionRequest.put("quantity", 1); +subscriptionRequest.put("customer_notify", true); +subscriptionRequest.put("start_at", 1773461489); +subscriptionRequest.put("expire_by", 1773547889); +List addons = new ArrayList<>(); +JSONObject linesItem = new JSONObject(); +JSONObject item = new JSONObject(); +item.put("name","Delivery charges"); +item.put("amount",30000); +item.put("currency",""); +linesItem.put("item",item); +addons.add(linesItem); +subscriptionRequest.put("addons",addons); +subscriptionRequest.put("offer_id","offer_JHD834hjbxzhd38d"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +subscriptionRequest.put("notes", notes); + +Subscription order = razorpay.subscriptions.create(subscriptionRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->create(array('plan_id' => 'plan_7wAosPWtrkhqZw', 'customer_notify' => true,'quantity'=>5, 'total_count' => 6, 'start_at' => 1773461489, 'addons' => array(array('item' => array('name' => 'Delivery charges', 'amount' => 30000, 'currency' => ''))),'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.create({ + plan_id: "plan_7wAosPWtrkhqZw", + customer_notify: true, + quantity: 5, + total_count: 6, + start_at: 1773461489, + addons: [ + { + item: { + name: "Delivery charges", + amount: 30000, + currency: "" + } + } + ], + notes: { + key1: "value3", + key2: "value2" + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.create({ + 'plan_id': 'plan_7wAosPWtrkhqZw', + 'customer_notify': True, + 'quantity': 5, + 'total_count': 6, + 'start_at': 1773461489, + 'addons': [{'item': {'name': 'Delivery charges', 'amount': 30000, + 'currency': ''}}], + 'notes': {'key1': 'value3', 'key2': 'value2'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "plan_id": "plan_7wAosPWtrkhqZw", + "customer_notify": 1, + "quantity": 5, + "total_count": 6, + "start_at": 1773461489, + "addons": [ + { + "item": { + "name": "Delivery charges", + "amount": 30000, + "currency": "" + } + } + ], + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Subscription.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "plan_id":"plan_JCPs6ZkAutbaCe", + "total_count":3, + "quantity": 1, + "customer_notify": true, + "start_at":1773461489, + "expire_by":1773547889, + "addons":[]interface{}{ + map[string]interface{}{ + "item":map[string]interface{}{ + "name":"Delivery charges", + "amount":3000, + "currency":"", + }, + }, + }, + "notes":map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Subscription.Create(data, nil) +``` + +#### Request Parameters + +`plan_id` _mandatory_ +: `string` The unique identifier of a plan that should be linked to the Subscription. For example, `plan_00000000000001`. + +`total_count` _mandatory_ +: `integer` The number of billing cycles for which the customer should be charged. For example, if a customer is buying a 1-year subscription billed on a bi-monthly basis, this value should be `6`. + +`quantity` _optional_ +: `integer` The number of times the customer should be charged the plan amount per invoice. For example, a customer subscribes to use software. The charges are /month/license. The customer wants 5 licenses. You should pass `5` as the quantity. The customer is charged (5 x ) monthly. By default, this value is set to `1`. + +`start_at` _optional_ +: `integer` Unix timestamp that indicates from when the Subscription should start. If not passed, the Subscription starts immediately after the authorisation payment. For example, `1581013800`. For Subscriptions with a future start_date, frequency is considered `as_presented`. + +`expire_by` _optional_ +: `integer` Unix timestamp that indicates till when the customer can make the authorisation payment. For example, `1581013800`. The default value is 30 years. Do not pass any value if you do not want to set an expiry date. + +`customer_notify` _optional_ +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. Possible values: + - `true` (default): Communication handled by Razorpay. + - `false`: Communication handled by businesses. + +`addons` +: `object` Array that contains details of any upfront amount you want to collect as part of the authorisation transaction. + + `item` + : `object` Details of the upfront amount you want to charge your customer. + + `name` _optional_ + : `string` A name for the upfront amount you want to charge the customer. For example, `Delivery Fee`. + + `amount` _optional_ + : `integer` The upfront amount in the currency subunit you want to charge the customer. For example ,`30000`. + + `currency` _optional_ + : `string` The currency in which you want to charge the customer. This has to match the plan currency. For example, `INR`. + +`offer_id` _optional_ +: `string` The unique identifier of the offer that is linked to the Subscription. You can obtain this from the Dashboard. For example, `offer_JHD834hjbxzhd38d`. + +`notes` _optional_ +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`id` +: `string` The unique identifier of the subscription created. For example, `sub_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `subscription`. + +`plan_id` +: `string` The unique identifier for a plan that is linked to the created subscription. For example, `plan_00000000000001`. + +`customer_id` +: `string` The unique identifier of the customer linked to the subscription. This is populated automatically once the customer completes the authorisation transaction. For example, `cust_00000000000001`. + +`status` +: `string` Status of the subscription. Refer to the [life cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) for more details. Possible values: + - `created` + - `authenticated` + - `active` + - `pending` + - `halted` + - `cancelled` + - `completed` + - `expired` + +`current_start` +: `integer` Unix timestamp. The start time of the current billing cycle of the subscription. For example, `1581013800`. + +`current_end` +: `integer` Unix timestamp. The end time of the current billing cycle of the subscription. For example, `1581013800`. + +`ended_at` +: `integer` The timestamp, in Unix format, when the subscription was completed or was cancelled. For example, `1581013800`. + +`quantity` +: `integer` The number of times the plan should be linked to the subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass 5 as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to 1. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`charge_at` +: `integer` Unix timestamp. This indicates when the next charge on the subscription should be made. For example, `1581013800`. + +`offer_id` +: `string` The unique identifier of the offer that should be linked to the subscription. For example, `offer_JHD834hjbxzhd38d`. + +`start_at` +: `integer` The timestamp, in Unix format, when the subscription should start. If not passed, the subscription starts immediately after the authorisation payment. For example, `1581013800`. + +`end_at` +: `integer` The timestamp, in Unix format, when the subscription should end. For example, `1581013800`. + +`auth_attempts` +: `integer` The number of times that the charge for the current billing cycle has been attempted on the card. For example, `2`. + +`total_count` +: `integer` The number of billing cycles for which the customer should be charged. For example, `2`. We support subscriptions for a maximum duration of 100 years. The number of billing cycles depends if the subscription is daily, weekly, monthly or yearly. + +`paid_count` +: `integer` This indicates the number of billing cycles for which the customer has already been charged. For example, `2`. + +`customer_notify` +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. + - `true`: Communication handled by Razorpay. Defaults to `true`. + - `false`: Communication handled by businesses. + +`created_at` +: `integer` The timestamp, in Unix format, when the subscription was created. For example, `1581013800`. + +`expire_by` +: `integer` The timestamp, in Unix format, till when the customer can make the authorisation payment. For example, `1581013800`. + +`short_url` +: `string` URL that can be used to make the authorisation payment. For example, `https://rzp.io/i/PWtAiEo`. + +`has_scheduled_changes` +: `boolean` Indicates if the subscription has any scheduled changes. Possible values: + - `true`: Subscription has scheduled changes. + - `false`: Subscription does not have scheduled changes. + +`schedule_change_at` +: `string` Represents when the subscription should be updated. Possible values: + - `now` (default): Updates the subscription immediately. + - `cycle_end`: Updates the subscription at the end of the current billing cycle. + +`remaining_count` +: `integer` This indicates the number of billing cycles remaining on the subscription. For example, `2`. + +### Create a Subscription Link + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/subscriptions \ +-H "Content-Type: application/json" \ +-d '{ + "plan_id": "plan_00000000000001", + "total_count": 12, + "quantity": 1, + "start_at": 1561852800, + "expire_by": 1561939199, + "customer_notify": true, + "addons": [ + { + "item": { + "name": "Delivery charges", + "amount": 30000, + "currency": "" + } + } + ], + "offer_id":"offer_JHD834hjbxzhd38d", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "notify_info":{ + "notify_phone": "", + "notify_email": "" + } +}' + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +Dictionary subscriptionRequest = new Dictionary(); +subscriptionRequest.Add("plan_id", "plan_Z6t7VFTb9xHeOs"); +subscriptionRequest.Add("total_count", 12); +subscriptionRequest.Add("quantity", 1); +subscriptionRequest.Add("customer_notify", true); +subscriptionRequest.Add("start_at", 1580453311); +subscriptionRequest.Add("expire_by", 1580626111); +List> addons = new List>(); +Dictionary linesItem = new Dictionary(); +Dictionary item = new Dictionary(); +item.Add("name", "Delivery charges"); +item.Add("amount", 30000); +item.Add("currency", ""); +linesItem.Add("item", item); +addons.Add(linesItem); +subscriptionRequest.Add("addons", addons); +subscriptionRequest.Add("offer_id", "offer_Z6t7VFTb9xHeOs"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +subscriptionRequest.Add("notes", notes); +Dictionary notifyInfo = new Dictionary(); +notifyInfo.Add("notify_phone", ""); +notifyInfo.Add("notify_email", ""); +subscriptionRequest.Add("notify_info", notifyInfo); + +Subscription subscription = client.Subscription.Create(subscriptionRequest); + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject subscriptionRequest = new JSONObject(); +subscriptionRequest.put("plan_id", "plan_HoYg68p5kmuvzD"); +subscriptionRequest.put("total_count", 12); +subscriptionRequest.put("quantity", 1); +subscriptionRequest.put("customer_notify", true); +subscriptionRequest.put("start_at", 1580453311); +subscriptionRequest.put("expire_by", 1580626111); +List addons = new ArrayList<>(); +JSONObject linesItem = new JSONObject(); +JSONObject item = new JSONObject(); +item.put("name","Delivery charges"); +item.put("amount",30000); +item.put("currency",""); +linesItem.put("item",item); +addons.add(linesItem); +subscriptionRequest.put("addons",addons); +subscriptionRequest.put("offer_id","offer_JTUADI4ZWBGWur"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +subscriptionRequest.put("notes", notes); +JSONObject notifyInfo = new JSONObject(); +notifyInfo.put("notify_phone",""); +notifyInfo.put("notify_email",""); +subscriptionRequest.put("notify_info",notifyInfo); + +Subscription subscription = razorpay.subscriptions.create(subscriptionRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->create(array('plan_id' => 'plan_HoYg68p5kmuvzD','total_count' => 12,'quantity' => 1,'expire_by' => 1633237807,'customer_notify' => true, 'addons' => array(array('item'=>array('name' => 'Delivery charges','amount' => 30000,'currency' => ''))),'notes'=>array('notes_key_1'=>'Tea, Earl Grey, Hot','notes_key_2'=>'Tea, Earl Grey… decaf.'),'notify_info'=>array('notify_phone' => '','notify_email'=> ''))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.create({ + plan_id: "plan_HoYg68p5kmuvzD", + total_count: 12, + quantity: 1, + expire_by: 1633237807, + customer_notify: true, + addons: [ + { + item: { + name: "Delivery charges", + amount: 30000, + currency: "" + } + } + ], + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + }, + notify_info: { + notify_phone: "", + notify_email: "" + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.create({ + 'plan_id': 'plan_HoYg68p5kmuvzD', + 'total_count': 12, + 'quantity': 1, + 'expire_by': 1633237807, + 'customer_notify': True, + 'addons': [{'item': {'name': 'Delivery charges', 'amount': 30000, + 'currency': ''}}], + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey\xe2\x80\xa6 decaf.'}, + 'notify_info': {'notify_phone': '', + 'notify_email': ''} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "plan_id": "plan_HoYg68p5kmuvzD", + "total_count": 12, + "quantity": 1, + "expire_by": 1633237807, + "customer_notify": 1, + "addons": [ + { + "item": { + "name": "Delivery charges", + "amount": 30000, + "currency": "" + } + } + ], + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "notify_info": { + "notify_phone": "", + "notify_email": "" + } +} + +Razorpay::Subscription.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "plan_id": "plan_00000000000001", + "total_count": 12, + "quantity": 1, + "start_at": 1561852800, + "expire_by": 1561939199, + "customer_notify": true, + "addons": []interface{}{ + map[string]interface{}{ + "item": map[string]interface{}{ + "name": "Delivery charges", + "amount": 30000, + "currency": "", + }, + }, + }, + "offer_id":"offer_JHD834hjbxzhd38d", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, + "notify_info":map[string]interface{}{ + "notify_phone": "", + "notify_email": "", + }, +} +body, err := client.Subscription.Create(data, nil) +``` + +#### Request Parameters + +`plan_id` _mandatory_ +: `string` The unique identifier of a plan that should be linked to the Subscription. For example, `plan_00000000000001`. + +`total_count` _mandatory_ +: `integer` The number of billing cycles for which the customer should be charged. For example, if a customer is buying a 1-year subscription billed on a bi-monthly basis, this value should be `6`. + +`quantity` _optional_ +: `integer` The number of times the customer should be charged the plan amount per invoice. For example, a customer subscribes to use software. The charges are /month/license. The customer wants 5 licenses. You should pass `5` as the quantity. The customer is charged (5 x ) monthly. By default, this value is set to `1`. + +`start_at` _optional_ +: `integer` Unix timestamp that indicates from when the Subscription should start. If not passed, the Subscription starts immediately after the authorisation payment. For example, `1581013800`. For Subscriptions with a future start_date, frequency is considered `as_presented`. + +`expire_by` _optional_ +: `integer` Unix timestamp that indicates till when the customer can make the authorisation payment. For example, `1581013800`. The default value is 30 years. Do not pass any value if you do not want to set an expiry date. + +`customer_notify` _optional_ +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. Possible values: + - `true` (default): Communication handled by Razorpay. + - `false`: Communication handled by businesses. + +`addons` +: `object` Array that contains details of any upfront amount you want to collect as part of the authorisation transaction. + + `item` + : `object` Details of the upfront amount you want to charge your customer. + + `name` _optional_ + : `string` A name for the upfront amount you want to charge the customer. For example, `Delivery Fee`. + + `amount` _optional_ + : `integer` The upfront amount in the currency subunit you want to charge the customer. For example ,`30000`. + + `currency` _optional_ + : `string` The currency in which you want to charge the customer. This has to match the plan currency. For example, `INR`. + +`offer_id` _optional_ +: `string` The unique identifier of the offer that is linked to the Subscription. You can obtain this from the Dashboard. For example, `offer_JHD834hjbxzhd38d`. + +`notes` _optional_ +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`notify_info` +: `object` The customer's email and phone number to which notifications are to be sent. Use this array only if you have set the `customer_notify` parameter to `true`. That is, Razorpay sends notifications to the customer. The customer details entered in the API request are only to notify the customer about the Subscription. The same will not be prefilled in the checkout as per the government guidelines. + + `notify_phone` _optional_ + : `string` The customer's phone number. + + `notify_email` _optional_ + : `string` The customer's email. + +You can perform various actions related to Subscriptions using the Dashboard. + +#### Response Parameters + +`id` +: `string` The unique identifier of the subscription created. For example, `sub_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `subscription`. + +`plan_id` +: `string` The unique identifier for a plan that is linked to the created subscription. For example, `plan_00000000000001`. + +`customer_id` +: `string` The unique identifier of the customer linked to the subscription. This is populated automatically once the customer completes the authorisation transaction. For example, `cust_00000000000001`. + +`status` +: `string` Status of the subscription. Refer to the [life cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) for more details. Possible values: + - `created` + - `authenticated` + - `active` + - `pending` + - `halted` + - `cancelled` + - `completed` + - `expired` + +`current_start` +: `integer` Unix timestamp. The start time of the current billing cycle of the subscription. For example, `1581013800`. + +`current_end` +: `integer` Unix timestamp. The end time of the current billing cycle of the subscription. For example, `1581013800`. + +`ended_at` +: `integer` The timestamp, in Unix format, when the subscription was completed or was cancelled. For example, `1581013800`. + +`quantity` +: `integer` The number of times the plan should be linked to the subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass 5 as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to 1. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`charge_at` +: `integer` Unix timestamp. This indicates when the next charge on the subscription should be made. For example, `1581013800`. + +`offer_id` +: `string` The unique identifier of the offer that should be linked to the subscription. For example, `offer_JHD834hjbxzhd38d`. + +`start_at` +: `integer` The timestamp, in Unix format, when the subscription should start. If not passed, the subscription starts immediately after the authorisation payment. For example, `1581013800`. + +`end_at` +: `integer` The timestamp, in Unix format, when the subscription should end. For example, `1581013800`. + +`auth_attempts` +: `integer` The number of times that the charge for the current billing cycle has been attempted on the card. For example, `2`. + +`total_count` +: `integer` The number of billing cycles for which the customer should be charged. For example, `2`. We support subscriptions for a maximum duration of 100 years. The number of billing cycles depends if the subscription is daily, weekly, monthly or yearly. + +`paid_count` +: `integer` This indicates the number of billing cycles for which the customer has already been charged. For example, `2`. + +`customer_notify` +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. + - `true`: Communication handled by Razorpay. Defaults to `true`. + - `false`: Communication handled by businesses. + +`created_at` +: `integer` The timestamp, in Unix format, when the subscription was created. For example, `1581013800`. + +`expire_by` +: `integer` The timestamp, in Unix format, till when the customer can make the authorisation payment. For example, `1581013800`. + +`short_url` +: `string` URL that can be used to make the authorisation payment. For example, `https://rzp.io/i/PWtAiEo`. + +`has_scheduled_changes` +: `boolean` Indicates if the subscription has any scheduled changes. Possible values: + - `true`: Subscription has scheduled changes. + - `false`: Subscription does not have scheduled changes. + +`schedule_change_at` +: `string` Represents when the subscription should be updated. Possible values: + - `now` (default): Updates the subscription immediately. + - `cycle_end`: Updates the subscription at the end of the current billing cycle. + +`remaining_count` +: `integer` This indicates the number of billing cycles remaining on the subscription. For example, `2`. + +### Fetch All Subscriptions + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/subscriptions \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List subscriptions = razorpay.subscriptions.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->all($options); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.all(options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +options = {"count": 1} + +Razorpay::Subscription.all(options) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.all(options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +options := map[string]interface{}{ + "count": 2, +} +body, err := client.Subscription.All(options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("count","1"); + +List subscription = client.Subscription.All(paramRequest); +``` + +#### Query Parameters + +`plan_id` _optional_ +: `string` The unique identifier of the plan for which you want to retrieve all the Subscriptions. + +`from` _optional_ +: `integer` The Unix timestamp from when Subscriptions are to be fetched. + +`to` _optional_ +: `integer` The Unix timestamp till when Subscriptions are to be fetched. + +`count` _optional_ +: `integer` The number of Subscriptions to be fetched. Default value is `10`. Maximum value is 100. This can be used for pagination, in combination with `skip`. + +`skip` _optional_ +: `integer` The number of Subscriptions to be skipped. Default value is `0`. This can be used for pagination, in combination with `count`. + +### Fetch Subscription by ID + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/subscriptions/sub_00000000000001 \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +Subscription subscription = razorpay.subscriptions.fetch(subscriptionId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.fetch(subscriptionId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.fetch(subscriptionId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +Razorpay::Subscription.fetch(subscriptionId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Subscription.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +Subscription subscription = client.Subscription.Fetch(subscriptionId); +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +### Cancel a Subscription + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/subscriptions/sub_00000000000001/cancel \ +-H "Content-Type: application/json" \ +-d '{ + "cancel_at_cycle_end": false +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +JSONObject params = new JSONObject(); +params.put("cancel_at_cycle_end", true); + +Subscription subscription = razorpay.subscriptions.cancel(subscriptionId, params); + +```php: PHP +$api = new Api($key_id, $secret); + +$options = array("cancel_at_cycle_end" => true) + +$api->subscription->fetch($subscriptionId)->cancel($options); + +```javascript: Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_SECRET", +}); + +var subscriptionId = "sub_00000000000001"; + +instance.subscriptions.cancel(subscriptionId, { + cancel_at_cycle_end: true, +}); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +subscriptionId = "sub_1N6I3dbbIrc3wUG" + +client.subscription.cancel(subscriptionId, { + "cancel_at_cycle_end": True +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +options = {"cancel_at_cycle_end":0} + +Razorpay::Subscription.cancel(subscriptionId,options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "cancel_at_cycle_end": true, +} +body, err := client.Subscription.Cancel("", data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +Dictionary param = new Dictionary(); +param.Add("cancel_at_cycle_end", true); + +Subscription subscription = client.Subscription.Fetch(subscriptionId).Cancel(param); +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +#### Request Parameter + +`cancel_at_cycle_end`_optional_ +: `boolean` Use this parameter to cancel a Subscription at the end of a billing cycle. Possible values: + - `true`: Cancel the subscription at the end of the current billing cycle. + - `false` (default): Cancel the subscription immediately. + +### Update a Subscription + +```curl: Curl +curl -u : \ +-X PATCH https://api.razorpay.com/v1/subscriptions/sub_00000000000001 \ +-H "Content-Type: application/json" \ +-d '{ + "plan_id":"plan_00000000000002", + "offer_id":"offer_JHD834hjbxzhd38d", + "quantity":5, + "remaining_count":5, + "start_at":1496000432, + "schedule_change_at":"now", + "customer_notify": true +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000002"; + +JSONObject params = new JSONObject(); +params.put("plan_id","plan_00000000000002"); +params.put("offer_id","offer_JHD834hjbxzhd38d"); +params.put("quantity",5); +params.put("remaining_count",5); +params.put("start_at",1496000432); +params.put("schedule_change_at","now"); +params.put("customer_notify", true); + +Subscription subscription = razorpay.subscription.update(subscriptionId,params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->update($options); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.update(subscriptionId,options) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.update(subscriptionId, options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000002" + +options = { + "plan_id":"plan_00000000000002", + "offer_id":"offer_JHD834hjbxzhd38d", + "quantity":5, + "remaining_count":5, + "start_at":1496000432, + "schedule_change_at":"now", + "customer_notify":1 +} + +Razorpay::Subscription.fetch(subscriptionId).edit(options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Subscription.Update("", options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_00000000000002"; + +Dictionary param = new Dictionary(); +param.Add("plan_id","plan_00000000000002"); +param.Add("offer_id","offer_JHD834hjbxzhd38d"); +param.Add("quantity",5); +param.Add("remaining_count",5); +param.Add("start_at",1496000432); +param.Add("schedule_change_at","now"); +param.Add("customer_notify", true); + +Subscription subscription = client.Subscription.Fetch(subscriptionId).Edit(param); +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +#### Request Parameters + +`plan_id`_optional_ +: `string` The unique identifier of the new plan that should be linked to the Subscription. For example, `plan_00000000000001`. + +`offer_id` _optional_ +: `string` The unique identifier of the offer that should be linked to the Subscription. You can obtain this from the Dashboard. For example, `offer_JHD834hjbxzhd38d`. + +`quantity`_optional_ +: `integer` The number of times the plan should be linked to the Subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass `5` as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to `1`. + +`remaining_count`_optional_ +: `integer` This parameter is used to update the `total_count` for a Subscription. For example, let us consider a monthly Subscription with 12 billing cycles. The Subscription has been charged successfully 4 times and 3 more invoices have been issued, but have not been charged. The remaining count in such cases is 5. However, you can overwrite this value using this parameter. + +`start_at`_optional_ +: `integer` Unix timestamp. The new start date for the Subscription. + +`schedule_change_at`_optional_ +: `string` Represents when the Subscription should be updated. + - `now` (default): Updates the Subscription immediately. + - `cycle_end`: Updates the Subscription at the end of the current billing cycle. + +`customer_notify`_optional_ +: `boolean` Represents who sends notifications to the customer. Possible values: + - `true` (default): Notifications sent by Razorpay. + - `false`: Notifications sent by you. + +### Fetch Details of a Pending Update + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/subscriptions/sub_00000000000001/retrieve_scheduled_changes \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +Subscription subscription = razorpay.subscription.fetchPendingUpdate(subscriptionId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->pendingUpdate() + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.pendingUpdate(subscriptionId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.pending_update(subscriptionId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +Razorpay::Subscription.fetch(subscriptionId).pending_update + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Subscription.PendingUpdate("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_00000000000001"; + +Subscription subscription = client.Subscription.Fetch(subscriptionId).FetchPendingUpdate(); + +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +### Cancel an Update + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/subscriptions/sub_00000000000001/cancel_scheduled_changes \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +Subscription subscription = razorpay.subscription.cancelPendingUpdate(subscriptionId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->cancelScheduledChanges(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.cancelScheduledChanges(subscriptionId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.cancel_scheduled_changes(subscriptionId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +Razorpay::Subscription.cancel_scheduled_changes(subscriptionId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Subscription.CancelScheduledChanges("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_00000000000001"; + +Subscription subscription = client.Subscription.Fetch(subscriptionId).CancelPendingUpdate(); +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +### Pause a Subscription + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/subscriptions/sub_00000000000001/pause \ +-H "Content-Type: application/json" \ +-d '{ + "pause_at":"now" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +JSONObject params = new JSONObject(); +params.put("pause_at","now"); + +Subscription subscription = razorpay.subscription.pause(SubscriptionId,params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->pause(array('pause_at'=>'now')) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.pause(subscriptionId,{ + pause_at : 'now' +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.pause(subscriptionId, {'pause_at': 'now'}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +options = {"pause_at": "now"} + +Razorpay::Subscription.pause(subscriptionId,options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +options := map[string]interface{}{ "pause_at" : "now" } +body, err := client.Subscription.Pause("", options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_00000000000001"; + +Dictionary param = new Dictionary(); +param.Add("pause_at","now"); + +Subscription subscription = client.Subscription.Fetch(subscriptionId).Pause(param); + +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +#### Request Parameters + +`pause_at` _optional_ +: `string` The value should be `now` to pause a Subscription immediately. + +### Resume a Subscription + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/subscriptions/sub_00000000000001/resume \ +-H "Content-Type: application/json" \ +-d '{ + "resume_at":"now" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String SubscriptionId = "sub_00000000000001"; + +JSONObject params = new JSONObject(); +params.put("resume_at","now"); + +Subscription subscription = razorpay.subscription.resume(SubscriptionId,requestJson); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->resume(array('resume_at'=>'now')) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.resume(subscriptionId,{ + resume_at : 'now' +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.resume(subscriptionId, {'resume_at': 'now'}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +options = {"resume_at": "now"} + +Razorpay::Subscription.resume(subscriptionId,options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +options := map[string]interface{}{ "resume_at" : "now" } +body, err := client.Subscription.Resume("", options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_00000000000001"; + +Dictionary param = new Dictionary(); +param.Add("resume_at","now"); + +Subscription subscription = client.Subscription.Fetch(subscriptionId).Resume(param); +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +#### Request Parameters + +`resume_at` _optional_ +: `string` The value should be `now` to resume a Subscription immediately. + +### Fetch All Invoices for a Subscription + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/invoices?subscription_id=sub_00000000000001 \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("subscription_id",subscriptionId); + +List invoices = razorpay.invoices.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->invoice->all(['subscription_id'=>$subscriptionId]); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.invoices.all({ + 'subscription_id':subscriptionId +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.invoice.all({'subscription_id': subscriptionId}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = {"subscription_id": "sub_00000000000001"} + +Razorpay::Invoice.all(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ "subscription_id": "sub_00000000000001" } +body, err := client.Invoice.All(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary param = new Dictionary(); +param.Add("subscription_id", "sub_Z6t7VFTb9xHeOs"); + +List subscription = client.Invoice.All(param); +``` + +#### Query Parameter + +`subscription_id` _mandatory_ +: `string` The unique identifier linked to the Subscription. For example, `sub_00000000000001`. + +#### Response Parameters + +`count` +: `integer` The number of invoices generated for the Subscription. + +`item` +: `array` List of invoices generated for the Subscription. + + `id` + : `string` The unique identifier of the invoice issued for the Subscription. + + `entity` + : `string` The entity being created. Here, it is `invoice`. + + `receipt` + : `string` Here, it is `null`. + + `invoice_number` + : `string` The invoice number. Here, it is `null`. + + `customer_id` + : `string` The unique identifier of the customer linked to the Subscription. + + `customer_details` + : `object` Details of the customer. + + `id` + : `string` The unique identifier of the customer linked to the Subscription. + + `name` + : `string` The customer's name. Know more [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's contact number. + + `billing_address` + : `string` The customer's billing address. + + `shipping_address` + : `string` The customer's shipping address. + + `customer_name` + : `string` The customer's name. + + `customer_email` + : `string` The customer's email address. + + `customer_contact` + : `string` The customer's contact number. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`subscription_id` +: `string` The unique identifier of the Subscription. For example, `sub_00000000000001`. + +`line_items` +: `array` Details of the line item that is billed in the invoice. Number of arrays = number of line items billed in the invoice. For example, if the Subscription starts immediately and has an upfront fee attached to it, the number of line items = 2. One for the Subscription charge and one for the upfront fee. + + `id` + : `string` The unique identifier linked to the item billed in the invoice. For example, `li_00000000000001`. + + `item_id` + : `string` Here, it is `null`. + + `name` + : `string` The item's name. For example, `Monthly Plan`. + + `description` + : `string` A brief description of the item. Here, it is `null`. + + `amount` + : `integer` The item's price, in currency subunits. For example, `99900`. + + `currency` + : `string` The currency for the amount charged for the item. + + `type` + : `string` The type of charge. Possible values: + - `plan` + - `addon` + + `quantity` + : `integer` The number of units of the item billed in the invoice. For example, `1`. + +`payment_id` +: `string` Unique identifier of the payment made by the customer using this invoice. For example, `pay_00000000000001`. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `expired` + - `cancelled` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp, indicates at which the invoice will expire. For example, `1593411509` + +`issued_at` +: `integer` The Unix timestamp, indicates at which the invoice was issued to the customer. For example, `1593411209` + +`paid_at` +: `integer` The Unix timestamp, indicates at which the payment was made. For example, `1593411325` + +`cancelled_at` +: `integer` The Unix timestamp, indicates at which the invoice was canceled by you. For example, `1593411209` + +`expired_at` +: `integer` The Unix timestamp, indicates at which the invoice has expired. For example, `1593411209` + +`sms_status` +: `string` Indicates whether the SMS notification for the invoice was sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` Indicates whether the email notification for the invoice was sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` The Unix timestamp, that indicates the date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Here, it is `null`. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. + - `true`: Customer can make partial payments. + - `false`: Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. This should be in the smallest unit of the currency. For example, `29995`. + +`amount_paid` +: `integer` Amount paid by the customer using the invoice. For example, `29995`. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the item. + +`description` +: `string` A brief description of the invoice. Here, it is `null`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`comment` +: `string` Any comments to be added in the invoice. Here, it is `null`. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with customers to accept payments. Once canceled, no payments can be accepted using the link. For example, `https://rzp.io/i/gb5827Hh`. + +`view_less` +: `boolean` Used when the link description is lengthy and you want to make the text collapsible. The text can be expanded by the customer using the **Show More** link. + - `true` (default): Link description appears collapsed, with a **Show More** link. + - `false`: Link description appears expanded. + +`type` +: `string` Here, it is `invoice`. + +`created_at` +: `integer` The Unix timestamp, that indicates when this invoice entity was created. For example, `1593411943`. + +### Delete an Offer Linked to a Subscription + +```curl: Curl +curl -u [YOUR_KEY_ID]:YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/subscriptions/sub_00000000000001/offer_JHD834hjbxzhd38d \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +String offerId = "offer_JHD834hjbxzhd38d"; + +Subscription subscription = razorpay.subscription.deleteSubscriptionOffer(subscriptionId, offerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->deleteOffer($offerId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.deleteOffer(subscriptionId, offerId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.delete_offer(subscriptionId, offerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +offerId = "offer_JHD834hjbxzhd38d" + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Subscription.DeleteOffer("", "", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_I3GGEs7Xgmnozy"; + +string offerId = "offer_JCTD1XMlUmzF6Z"; + +Subscription subscription = client.Subscription.Fetch(subscriptionId).DeleteOffer(offerId); +``` + +#### Path Parameters + +`sub_id` _mandatory_ +: `string` The unique identifier of the Subscription from which you want to remove the offer. For example, `sub_00000000000001`. + +`offer_id` _mandatory_ +: `string` The unique identifier of the offer you want remove from the Subscription. For example, `offer_JHD834hjbxzhd38d`. + +## Checkout Integration + +### Authentication Transaction + +After you create a subscription, you need the customer's permission to charge their card at periodic intervals. For this, the customer has to complete an authorisation transaction. + +You can collect the authorisation transaction by passing the `subscription_id` along with the other options to the Razorpay Custom Checkout. + +**Read more**: [Razorpay Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). + +Once the authorisation transaction is successful, Razorpay returns the following data in the response: +- `razorpay_payment_id` +- `razorpay_subscription_id` +- `razorpay_signature` + +> **INFO** +> +> +> **Note** +> +> - You do not have to pass any `order_id` to the checkout. +> + +> - As part of the authorisation transaction, we create a customer using the details entered on the checkout and link it to the subscription. +> + +> **INFO** +> +> +> **Handler Function vs Callback URL** +> +> - **Handler Function**: +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL**: +> +When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. +> + +> **WARN** +> +> +> **Watch Out!** +> +> The Callback URL is not supported for Recurring Payments created using the registration link. +> + +```html: Custom checkout with handler function + + + Pay + + const btn = document.querySelector("#btn"); + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + razorpay.once("ready", function(response) { + console.log(response.methods); + }) + var data = { + "amount": 99900, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR",// Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "subscription_id": "sub_EZgYaySTZrhqpf", + "save": 1, + "consent_to_save_card": 1, + "method": "card", + "card[name]": "Gaurav Kumar", + "card[number]": "5104015555555558", + "card[cvv]": "123", + "card[expiry_month]": "10", + "card[expiry_year]": "25" + }; + btn.addEventListener("click", function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_subscription_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); // will pass error object to error handler + }) + + +```html: Custom checkout with callback URL + + + Pay + + const btn = document.querySelector("#btn"); + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + razorpay.once("ready", function(response) { + console.log(response.methods); + }) + var data = { + "callback_url": "www.example-callback-url.com", + "amount": 99900, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR",// Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "address": "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + "subscription_id": "sub_EZgYaySTZrhqpf", + "save": 1, + "consent_to_save_card": 1, + "method": "card", + "card[name]": "Gaurav Kumar", + "card[number]": "5104015555555558", + "card[cvv]": "123", + "card[expiry_month]": "10", + "card[expiry_year]": "25" + }; + btn.addEventListener("click", function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + }) + + +``` + +### Payment Verification + +This is a mandatory step that allows you to confirm the authenticity of the card details returned to the Checkout form for successful payments. + +> **INFO** +> +> +> +> **Handy Tips** +> +> You should consider the payment as successful and Subscription as authorised only after the signature has been successfully verified. +> + +To verify the `razorpay_signature` returned to you by the Checkout form: + +1. Create a signature in your server using the following attributes: + - `subscription_id`: Retrieve the `subscription_id` from your server. Do not use the `razorpay_subscription_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. + The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md#prerequisites). + +1. Use the SHA256 algorithm, the `razorpay_payment_id` and the `subscription_id` to construct a HMAC hex digest as shown below: + + ``` + generated_signature = hmac_sha256(razorpay_payment_id + "|" + subscription_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + +1. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_subscription_id", "sub_ID6MOhgkcoHj9I"); +options.put("razorpay_payment_id", "pay_IDZNwZZFtnjyym"); +options.put("razorpay_signature", "601f383334975c714c91a7d97dd723eb56520318355863dcf3821c0d07a17693"); + +boolean status = Utils.verifySubscription(options, secret); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_subscription_payment_signature({ + 'razorpay_subscription_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'pay_IDZNwZZFtnjyym', + razorpay_payment_id: 'sub_ID6MOhgkcoHj9I', + razorpay_signature: '601f383334975c714c91a7d97dd723eb56520318355863dcf3821c0d07a17693' + } + +Razorpay::Utility.verify_payment_signature(payment_response) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_subscription_id": "sub_ID6MOhgkcoHj9I", + "razorpay_payment_id": "pay_IDZNwZZFtnjyym", +} + +signature := "601f383334975c714c91a7d97dd723eb56520318355863dcf3821c0d07a17693"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifySubscriptionSignature(params, signature, secret) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_subscription_id' => $razorpaySubscriptionId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.paymentVerification({ + 'subscription_id':'sub_ID6MOhgkcoHj9I', + 'payment_id':'pay_IDZNwZZFtnjyym', + 'signature':'601f383334975c714c91a7d97dd723eb56520318355863dcf3821c0d07a17693' + },secret) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_subscription_id", "sub_ID6MOhgkcoHj9I"); +options.Add("razorpay_payment_id", "pay_IDZNwZZFtnjyym"); +options.Add("razorpay_signature", "601f383334975c714c91a7d97dd723eb56520318355863dcf3821c0d07a17693"); + +Utils.verifySubscriptionSignature(options); +``` + +## Add-ons + +You can create add-ons to charge the customer an extra amount for a particular billing cycle. Once you create an add-on for a Subscription, it is added to the next invoice that is generated. On the next scheduled charge, the customer is charged the add-on amount in addition to their regular Subscription amount. + +### Create an Add-on + +#### Path Parameter + +`id` _mandatory_ +: `string` The subscription ID to which the add-on is being added. + +#### Request Parameters + +. + + `description` _optional_ + : `string` Description for the add-on. For example, `1 extra oil fried appala with meals`. + +`quantity` _optional_ +: `integer` This specifies the number of units of the add-on to be charged to the customer. For example, `2`. Defaults to `1`. The total amount is calculated as `amount` * `quantity`. + +#### Response Parameters + +`id` +: `string` The unique identifier of the created add-on. For example, `ao_00000000000001`. + +`quantity` +: `integer` This specifies the number of units of the add-on to be charged to the customer. For example, `2`. The total amount is calculated as `amount` * `quantity`. + +`created_at` +: `integer` The timestamp, in Unix format, when the add-on was created. For example, `1581597318`. + +`subscription_id` +: `string` The unique identifier of the subscription to which the add-on is being added. For example, `sub_00000000000001`. + +`invoice_id` +: `string` The add-on is added to the **next** invoice that is generated after the add-on is created. This field is populated only after the invoice is generated. Until then, it is `null`. Once the add-on is linked to an invoice, it cannot be deleted. + +### Fetch all Add-ons + +#### Query Parameters + +`from` _optional_ +: `integer` The Unix timestamp from when add-ons are to be fetched. + +`to` _optional_ +: `integer` The Unix timestamp till when add-ons are to be fetched. + +`count` _optional_ +: `integer` The number of add-ons to be fetched. Default value is `10`. Maximum value is `100`. This can be used for pagination, in combination with `skip`. + +`skip` _optional_ +: `integer` The number of add-ons to be skipped. Default value is `0`. This can be used for pagination, in combination with `count`. + +### Fetch an Add-on by ID + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of an add-on. For example, `ao_00000000000001`. + +### Delete an Add-on + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/addons/ao_00000000000001 \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String addonId = "ao_00000000000001"; + +List addon = razorpay.addons.delete(addonId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->addon->fetch($addonId)->delete(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.addons.delete(addonId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.addon.delete(addonId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Addon.delete("ao_00000000000001") + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +addonId := "ao_Jey1r0000000" +body, err := client.Addon.Delete(addonId, nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string addonId = "ao_00000000000001"; + +List addon = client.Addon.Fetch(addonId).Delete(); +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of an add-on. For example, `ao_00000000000001`. + +## Webhooks + +### Available Webhook Events + +Refer to the Webhooks section for a list of available webhook events for Subscriptions. + +### Setup Webhooks + +Refer to the Webhooks section to learn how to setup webhooks. + +### Sample Payloads + +Refer to the Webhooks section for sample payloads. diff --git a/llm-content/api/payments/subscriptions.md b/llm-content/api/payments/subscriptions.md new file mode 100644 index 00000000..9671837f --- /dev/null +++ b/llm-content/api/payments/subscriptions.md @@ -0,0 +1,79 @@ +--- +title: Subscriptions +description: Know about Subscriptions and list of endpoints. +--- + +# Subscriptions + +You can use Subscriptions to charge a customer periodically. A Subscription contains details like the plan, the start date, the total number of billing cycles, the free trial period (if any) and the upfront amount to be collected. + + + + + Below are the steps to integrate Subscriptions. You can also refer to our comprehensive [Subscriptions Integration guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/integration-guide.md). + + 1. [Create a Plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/create-plan.md) + 2. [Create a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/create-subscription.md) + 3. [Checkout Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/integration-guide.md#step-14-integrate-with-standard-checkout/) + + Fork the Razorpay Postman Public Workspace and try the Subscription APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-33ddca50-ea58-4c30-be41-bd7643a1438c) + +### Related Guides + +[About Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) +[Integrate With Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/integration-guide.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/subscriptions.md) + +### Endpoints + +- **post** `/v1/plans` - Create a Plan: + Creates a plan. + +- **get** `/v1/plans` - Fetch All Plans: + Fetches all the plans. + +- **get** `/v1/plans/:id` - Fetch a Plan With ID: + Fetches a plan by its unique identifier. + +- **post** `/v1/subscriptions` - Create a Subscription: + Creates a Subscription. + + +- **post** `/v1/subscriptions` - Create a Subscription Link: + Creates a Subscription link. + +- **get** `/v1/subscriptions` - Fetch All Subscriptions: + Fetches all the created Subscriptions. + +- **get** `/v1/subscriptions/:id` - Fetch Subscription With ID: + Fetches a Subscription details using its unique identifier. + +- **post** `/v1/subscriptions/:id/cancel` - Cancel a Subscription: + Cancels a Subscription. + +- **patch** `/v1/subscriptions/:id` - Update a Subscription: + Updates a Subscription. + +- **get** `/v1/subscriptions/:id/retrieve_scheduled_changes` - Fetch Details of a Pending Update: + Fetches details about any update of a Subscription. + +- **post** `/v1/subscriptions/:id/cancel_scheduled_changes` - Cancel an Update: + Cancels an update. + +- **post** `/v1/subscriptions/:id/pause` - Pause a Subscription: + Pauses an active Subscription. + +- **post** `/v1/subscriptions/:id/resume` - Resume a Subscription: + Resumes a paused Subscription. + +- **get** `/v1/subscriptions` - Fetch All Invoices for a Subscription: + Fetches all the generated invoices for a Subscription. + +- **post** `/v1/subscriptions` - Link an Offer to a Subscription: + Links an Offer to a Subscription. + +- **delete** `/v1/subscriptions/:sub_id/:offer_id` - Delete an Offer linked to a Subscription: + Deletes an Offer linked to a Subscription. diff --git a/llm-content/api/payments/subscriptions/add-on-entity.md b/llm-content/api/payments/subscriptions/add-on-entity.md new file mode 100644 index 00000000..81d78b8e --- /dev/null +++ b/llm-content/api/payments/subscriptions/add-on-entity.md @@ -0,0 +1,135 @@ +--- +title: Add-ons Entity +description: Know about the Add-ons entity and the associated parameter descriptions. +--- + +# Add-ons Entity + +## Add-on Entity + +The Add-ons entity has the following parameters. + +### Response + +```json: Entity +{ + "entity":"collection", + "count":2, + "items":[ + { + "id":"ao_00000000000002", + "entity":"addon", + "item":{ + "id":"item_00000000000002", + "active":true, + "name":"Extra sweet", + "description":"1 extra sweet of the day with meals", + "amount":90000, + "unit_amount":90000, + "currency":"INR", + "type":"addon", + "unit":null, + "tax_inclusive":false, + "hsn_code":null, + "sac_code":null, + "tax_rate":null, + "tax_id":null, + "tax_group_id":null, + "created_at":1581597318, + "updated_at":1581597318 + }, + "quantity":1, + "created_at":1581597318, + "subscription_id":"sub_00000000000001", + "invoice_id":"inv_00000000000001" + }, + { + "id":"ao_00000000000001", + "entity":"addon", + "item":{ + "id":"item_00000000000001", + "active":true, + "name":"Extra muffin", + "description":"extra muffin with meals", + "amount":30000, + "unit_amount":30000, + "currency":"INR", + "type":"addon", + "unit":null, + "tax_inclusive":false, + "hsn_code":null, + "sac_code":null, + "tax_rate":null, + "tax_id":null, + "tax_group_id":null, + "created_at":1581597318, + "updated_at":1581597318 + }, + "quantity":2, + "created_at":1581597318, + "subscription_id":"sub_00000000000001", + "invoice_id":null + } + ] +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the created add-on. For example, `ao_00000000000001`. + +`item` +: `object` Details of the created add-on. + + `id` + : `string` The unique identifier of the created item. For example, `item_00000000000001`. + + `active` + : `boolean` Indicates whether the add-on is active. Here, the value is `true`. + + `name` + : `string` Name of the add-on. For example, `Extra muffin`. + + `description` + : `string` Description for the add-on. For example, `extra muffin with meals`. + + `amount` + : `integer` Amount for the add-on in currency subunit that is to be charged for the Subscription in the next billing cycle. For example, `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` + : `string` The currency in which the customer should be charged for the add-on. For example, `INR`. Know more about [supported currencies](https://razorpay.com/docs/payments/international-payments/#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `created_at` + : `integer` The Unix timestamp indicates when the item was created. For example, `1581597318`. + +`quantity` +: `integer` This specifies the number of units of the add-on to be charged to the customer. For example, `2`. The total amount is calculated as `amount` * `quantity`. + +`created_at` +: `integer` The Unix timestamp, indicates when the add-on was created. For example, `1581597318`. + +`subscription_id` +: `string` The unique identifier of the Subscription to which the add-on is being added. For example, `sub_00000000000001`. + +`invoice_id` +: `string` The add-on is added to the next invoice that is generated after it is created. This field is populated only after the invoice is generated. Until then, it is `null`. Once the add-on is linked to an invoice, it cannot be deleted. diff --git a/llm-content/api/payments/subscriptions/cancel-subscription.md b/llm-content/api/payments/subscriptions/cancel-subscription.md new file mode 100644 index 00000000..4893fe74 --- /dev/null +++ b/llm-content/api/payments/subscriptions/cancel-subscription.md @@ -0,0 +1,243 @@ +--- +title: Cancel a Subscription +description: Cancel a Subscription using the Razorpay API. +--- + +# Cancel a Subscription + +## Cancel a Subscription + +Use this endpoint to cancel a Subscription. You can either cancel the Subscription immediately or at the end of the current billing cycle. Once cancelled, you cannot renew or reactivate it. + +- When you cancel a Subscription, the status changes to `cancelled`. +- If you choose to cancel a Subscription at the end of a billing cycle, its status changes to `cancelled` only at the end of the current billing cycle. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/subscriptions/sub_00000000000001/cancel \ +-H "Content-Type: application/json" \ +-d '{ + "cancel_at_cycle_end": false +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +JSONObject params = new JSONObject(); +params.put("cancel_at_cycle_end", true); + +Subscription subscription = razorpay.subscriptions.cancel(subscriptionId, params); + +```php: PHP +$api = new Api($key_id, $secret); + +$options = array("cancel_at_cycle_end" => true) + +$api->subscription->fetch($subscriptionId)->cancel($options); + +```javascript: Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_SECRET", +}); + +var subscriptionId = "sub_00000000000001"; + +instance.subscriptions.cancel(subscriptionId, { + cancel_at_cycle_end: true, +}); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +subscriptionId = "sub_1N6I3dbbIrc3wUG" + +client.subscription.cancel(subscriptionId, { + "cancel_at_cycle_end": True +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +options = {"cancel_at_cycle_end":0} + +Razorpay::Subscription.cancel(subscriptionId,options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "cancel_at_cycle_end": true, +} +body, err := client.Subscription.Cancel("", data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +Dictionary param = new Dictionary(); +param.Add("cancel_at_cycle_end", true); + +Subscription subscription = client.Subscription.Fetch(subscriptionId).Cancel(param); +``` + +### Response + +```json: Success +{ + "id": "sub_00000000000001", + "entity": "subscription", + "plan_id": "plan_00000000000001", + "customer_id": "cust_D00000000000001", + "status": "cancelled", + "current_start": 1580453311, + "current_end": 1581013800, + "ended_at": 1580288092, + "quantity": 1, + "notes":{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "charge_at": 1580453311, + "start_at": 1577385991, + "end_at": 1603737000, + "auth_attempts": 0, + "total_count": 6, + "paid_count": 1, + "customer_notify": true, + "created_at": 1580283117, + "expire_by": 1581013800, + "short_url": "https://rzp.io/i/z3b1R61A9", + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count": 5 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Subscription is not cancellable in expired status.", + "field": "status" + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +### Parameters + +`cancel_at_cycle_end`_optional_ +: `boolean` Use this parameter to cancel a Subscription at the end of a billing cycle. Possible values: + - `true`: Cancel the subscription at the end of the current billing cycle. + - `false` (default): Cancel the subscription immediately. + +### Parameters + +`id` +: `string` The unique identifier of the subscription created. For example, `sub_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `subscription`. + +`plan_id` +: `string` The unique identifier for a plan that is linked to the created subscription. For example, `plan_00000000000001`. + +`customer_id` +: `string` The unique identifier of the customer linked to the subscription. This is populated automatically once the customer completes the authorisation transaction. For example, `cust_00000000000001`. + +`status` +: `string` Status of the subscription. Refer to the [life cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) for more details. Possible values: + - `created` + - `authenticated` + - `active` + - `pending` + - `halted` + - `cancelled` + - `completed` + - `expired` + +`current_start` +: `integer` Unix timestamp. The start time of the current billing cycle of the subscription. For example, `1581013800`. + +`current_end` +: `integer` Unix timestamp. The end time of the current billing cycle of the subscription. For example, `1581013800`. + +`ended_at` +: `integer` The timestamp, in Unix format, when the subscription was completed or was cancelled. For example, `1581013800`. + +`quantity` +: `integer` The number of times the plan should be linked to the subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass 5 as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to 1. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`charge_at` +: `integer` Unix timestamp. This indicates when the next charge on the subscription should be made. For example, `1581013800`. + +`offer_id` +: `string` The unique identifier of the offer that should be linked to the subscription. For example, `offer_JHD834hjbxzhd38d`. + +`start_at` +: `integer` The timestamp, in Unix format, when the subscription should start. If not passed, the subscription starts immediately after the authorisation payment. For example, `1581013800`. + +`end_at` +: `integer` The timestamp, in Unix format, when the subscription should end. For example, `1581013800`. + +`auth_attempts` +: `integer` The number of times that the charge for the current billing cycle has been attempted on the card. For example, `2`. + +`total_count` +: `integer` The number of billing cycles for which the customer should be charged. For example, `2`. We support subscriptions for a maximum duration of 100 years. The number of billing cycles depends if the subscription is daily, weekly, monthly or yearly. + +`paid_count` +: `integer` This indicates the number of billing cycles for which the customer has already been charged. For example, `2`. + +`customer_notify` +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. + - `true`: Communication handled by Razorpay. Defaults to `true`. + - `false`: Communication handled by businesses. + +`created_at` +: `integer` The timestamp, in Unix format, when the subscription was created. For example, `1581013800`. + +`expire_by` +: `integer` The timestamp, in Unix format, till when the customer can make the authorisation payment. For example, `1581013800`. + +`short_url` +: `string` URL that can be used to make the authorisation payment. For example, `https://rzp.io/i/PWtAiEo`. + +`has_scheduled_changes` +: `boolean` Indicates if the subscription has any scheduled changes. Possible values: + - `true`: Subscription has scheduled changes. + - `false`: Subscription does not have scheduled changes. + +`schedule_change_at` +: `string` Represents when the subscription should be updated. Possible values: + - `now` (default): Updates the subscription immediately. + - `cycle_end`: Updates the subscription at the end of the current billing cycle. + +`remaining_count` +: `integer` This indicates the number of billing cycles remaining on the subscription. For example, `2`. + +### Errors + +Subscription is not cancellable in expired status. +* code: 400 +* description: This error occurs when you are trying to cancel a Subscription which is in the expired state. +* solution: You cannot cancel a Subscription in the expired state. Ensure that the Subscription is in the active or authenticated state to cancel. diff --git a/llm-content/api/payments/subscriptions/cancel-update.md b/llm-content/api/payments/subscriptions/cancel-update.md new file mode 100644 index 00000000..151155a7 --- /dev/null +++ b/llm-content/api/payments/subscriptions/cancel-update.md @@ -0,0 +1,220 @@ +--- +title: Cancel an Update +description: Cancel an update using the Razorpay API. +--- + +# Cancel an Update + +## Cancel an Update + +Use this endpoint to cancel a pending update. This happens when a Subscription is updated using the `end of cycle` option for the `schedule_change_at` parameter. + +**Example** + +A Subscription is to be charged on the 1st of every month. It was charged on January 01, 2021. On January 15, 2021, it was updated using the `end of cycle` option for the `schedule_change_at` parameter. In this case, the update goes live after the Subscription is charged on February 01, 2021. Such updates are said to be scheduled updates and can be cancelled using this API. + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel a pending update for a subscription. You cannot cancel an update once it is live. +> + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/subscriptions/sub_00000000000001/cancel_scheduled_changes \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +Subscription subscription = razorpay.subscription.cancelPendingUpdate(subscriptionId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->cancelScheduledChanges(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.cancelScheduledChanges(subscriptionId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.cancel_scheduled_changes(subscriptionId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +Razorpay::Subscription.cancel_scheduled_changes(subscriptionId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Subscription.CancelScheduledChanges("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_00000000000001"; + +Subscription subscription = client.Subscription.Fetch(subscriptionId).CancelPendingUpdate(); +``` + +### Response + +```json: Success +{ + "id": "sub_00000000000001", + "entity": "subscription", + "plan_id": "plan_00000000000003", + "customer_id": "cust_00000000000001", + "status": "active", + "current_start": 1580284732, + "current_end": 1580841000, + "ended_at": null, + "quantity": 1, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "charge_at": 1580841000, + "start_at": 1580284732, + "end_at": 1611081000, + "auth_attempts": 0, + "total_count": 6, + "paid_count": 1, + "customer_notify": true, + "created_at": 1580284702, + "expire_by": 1580626111, + "short_url": "https://rzp.io/i/fFWTkbf", + "has_scheduled_changes": false, + "change_scheduled_at": 1527858600, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count": 5, +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +### Parameters + +`id` +: `string` The unique identifier of the subscription created. For example, `sub_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `subscription`. + +`plan_id` +: `string` The unique identifier for a plan that is linked to the created subscription. For example, `plan_00000000000001`. + +`customer_id` +: `string` The unique identifier of the customer linked to the subscription. This is populated automatically once the customer completes the authorisation transaction. For example, `cust_00000000000001`. + +`status` +: `string` Status of the subscription. Refer to the [life cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) for more details. Possible values: + - `created` + - `authenticated` + - `active` + - `pending` + - `halted` + - `cancelled` + - `completed` + - `expired` + +`current_start` +: `integer` Unix timestamp. The start time of the current billing cycle of the subscription. For example, `1581013800`. + +`current_end` +: `integer` Unix timestamp. The end time of the current billing cycle of the subscription. For example, `1581013800`. + +`ended_at` +: `integer` The timestamp, in Unix format, when the subscription was completed or was cancelled. For example, `1581013800`. + +`quantity` +: `integer` The number of times the plan should be linked to the subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass 5 as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to 1. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`charge_at` +: `integer` Unix timestamp. This indicates when the next charge on the subscription should be made. For example, `1581013800`. + +`offer_id` +: `string` The unique identifier of the offer that should be linked to the subscription. For example, `offer_JHD834hjbxzhd38d`. + +`start_at` +: `integer` The timestamp, in Unix format, when the subscription should start. If not passed, the subscription starts immediately after the authorisation payment. For example, `1581013800`. + +`end_at` +: `integer` The timestamp, in Unix format, when the subscription should end. For example, `1581013800`. + +`auth_attempts` +: `integer` The number of times that the charge for the current billing cycle has been attempted on the card. For example, `2`. + +`total_count` +: `integer` The number of billing cycles for which the customer should be charged. For example, `2`. We support subscriptions for a maximum duration of 100 years. The number of billing cycles depends if the subscription is daily, weekly, monthly or yearly. + +`paid_count` +: `integer` This indicates the number of billing cycles for which the customer has already been charged. For example, `2`. + +`customer_notify` +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. + - `true`: Communication handled by Razorpay. Defaults to `true`. + - `false`: Communication handled by businesses. + +`created_at` +: `integer` The timestamp, in Unix format, when the subscription was created. For example, `1581013800`. + +`expire_by` +: `integer` The timestamp, in Unix format, till when the customer can make the authorisation payment. For example, `1581013800`. + +`short_url` +: `string` URL that can be used to make the authorisation payment. For example, `https://rzp.io/i/PWtAiEo`. + +`has_scheduled_changes` +: `boolean` Indicates if the subscription has any scheduled changes. Possible values: + - `true`: Subscription has scheduled changes. + - `false`: Subscription does not have scheduled changes. + +`schedule_change_at` +: `string` Represents when the subscription should be updated. Possible values: + - `now` (default): Updates the subscription immediately. + - `cycle_end`: Updates the subscription at the end of the current billing cycle. + +`remaining_count` +: `integer` This indicates the number of billing cycles remaining on the subscription. For example, `2`. + +### Errors + +The API key/secret provided is invalid. +* code: 4xx +* description: This error occurs due to a mismatch between the API credentials passed in the API call and those generated on the Dashboard. +* solution: Ensure that the API keys are active and correctly entered, with no whitespaces before or after the keys. diff --git a/llm-content/api/payments/subscriptions/create-add-on.md b/llm-content/api/payments/subscriptions/create-add-on.md new file mode 100644 index 00000000..66c4de05 --- /dev/null +++ b/llm-content/api/payments/subscriptions/create-add-on.md @@ -0,0 +1,53 @@ +--- +title: Create an Add-on +description: Create an Add-on using the Razorpay API. +--- + +# Create an Add-on + +## Create an Add-on + +Use this endpoint to create an add-on. + +### Request + +### Response + +### Parameters + +`id` _mandatory_ +: `string` The Subscription id to which the add-on is being added. + +### Parameters + +. + + `description` _optional_ + : `string` Description for the add-on. For example, `1 extra oil fried appala with meals`. + +`quantity` _optional_ +: `integer` This specifies the number of units of the add-on to be charged to the customer. For example, `2`. Defaults to `1`. The total amount is calculated as `amount` * `quantity`. + +### Parameters + +`id` +: `string` The unique identifier of the created add-on. For example, `ao_00000000000001`. + +`quantity` +: `integer` This specifies the number of units of the add-on to be charged to the customer. For example, `2`. The total amount is calculated as `amount` * `quantity`. + +`created_at` +: `integer` The timestamp, in Unix format, when the add-on was created. For example, `1581597318`. + +`subscription_id` +: `string` The unique identifier of the subscription to which the add-on is being added. For example, `sub_00000000000001`. + +`invoice_id` +: `string` The add-on is added to the **next** invoice that is generated after the add-on is created. This field is populated only after the invoice is generated. Until then, it is `null`. Once the add-on is linked to an invoice, it cannot be deleted. + +### Errors + +Add-ons can't be added for Subscriptions when payment mode is upi +* code: 400 +* description: This error occurs when you are trying to create add-ons for a Subscription authorised via UPI. +* solution: You cannot create add-ons for a Subscription authorized via UPI. Currently, add-ons are only available for Subscription authorised using cards. diff --git a/llm-content/api/payments/subscriptions/create-plan.md b/llm-content/api/payments/subscriptions/create-plan.md new file mode 100644 index 00000000..e40855e3 --- /dev/null +++ b/llm-content/api/payments/subscriptions/create-plan.md @@ -0,0 +1,299 @@ +--- +title: Create a Plan +description: Create a plan with basic details such as amount and currency +--- + +# Create a Plan + +## Create a Plan + +Use this endpoint to create a plan. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/plans \ +-H "Content-Type: application/json" \ +-d '{ + "period": "weekly", + "interval": 1, + "item": { + "name": "Test plan - Weekly", + "amount": 69900, + "currency": "", + "description": "Description for the test plan" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject planRequest = new JSONObject(); +planRequest.put("period","weekly"); +planRequest.put("interval",1); +JSONObject item = new JSONObject(); +item.put("name","Test plan - Weekly"); +item.put("amount",69900); +item.put("currency",""); +item.put("description","Description for the test plan"); +planRequest.put("item",item); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +planRequest.put("notes",notes); + +Plan plan = razorpay.plans.create(planRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->plan->create(array('period' => 'weekly', 'interval' => 1, 'item' => array('name' => 'Test Weekly 1 plan', 'description' => 'Description for the weekly 1 plan', 'amount' => 600, 'currency' => ''),'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.plans.create({ + period: "weekly", + interval: 1, + item: { + name: "Test plan - Weekly", + amount: 69900, + currency: "", + description: "Description for the test plan" + }, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.plan.create({ + 'period': 'weekly', + 'interval': 1, + 'item': { + 'name': 'Test plan - Weekly', + 'amount': 69900, + 'currency': '', + 'description': 'Description for the test plan', + }, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "period": "weekly", + "interval": 1, + "item": { + "name": "Test plan - Weekly", + "amount": 69900, + "currency": "", + "description": "Description for the test plan" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Plan.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "period": "weekly", + "interval": 1, + "item": map[string]interface{}{ + "name": "Test plan - Weekly", + "amount": 69900, + "currency": "", + "description": "Description for the test plan", + }, + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} +body, err := client.Plan.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary planRequest = new Dictionary(); +planRequest.Add("period", "weekly"); +planRequest.Add("interval", 1); +Dictionary item = new Dictionary(); +item.Add("name", "Test plan - Weekly"); +item.Add("amount", 69900); +item.Add("currency", ""); +item.Add("description", "Description for the test plan"); +planRequest.Add("item", item); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +planRequest.Add("notes", notes); + +Plan plan = client.Plan.Create(planRequest); +``` + +### Response + +```json: Success +{ + "id":"plan_00000000000001", + "entity":"plan", + "interval":1, + "period":"weekly", + "item":{ + "id":"item_00000000000001", + "active":true, + "name":"Test plan - Weekly", + "description":"Description for the test plan - Weekly", + "amount":69900, + "unit_amount":69900, + "currency":"", + "type":"plan", + "unit":null, + "tax_inclusive":false, + "hsn_code":null, + "sac_code":null, + "tax_rate":null, + "tax_id":null, + "tax_group_id":null, + "created_at":1580219935, + "updated_at":1580219935 + }, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1580219935 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "offer_id is/are not required and should not be sent" + } +} +``` + +### Parameters + +`period` _mandatory_ +: `string` This, combined with `interval`, defines the frequency of the plan. Possible values: + - `daily` + - `weekly` + - `monthly` + - `quarterly` + - `yearly` + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can create custom frequencies while creating a plan. For example, once in 3 weeks. +> - For UPI, all undefined frequencies except `daily`, `weekly`, `monthly`, `quarterly` and `yearly` are considered `as-presented`. +> - For domestic cards, all undefined frequencies except `weekly`, `monthly` and `yearly` are considered `as-presented` while registering the mandate with banks. +> - For Emandate, all defined and undefined frequencies are considered `as-presented` while registering the mandate with banks. +> + + + +`interval` _mandatory_ +: `integer` This, combined with `period`, defines the frequency of the plan. If the billing cycle is 2 months, the value should be `2`. For daily plans, the minimum value should be `7`. + +`item` +: `object` Details of the plan. + + `name` _mandatory_ + : `string` Name of the plan. For example, `Test Plan`. + + `amount` _mandatory_ + : `integer` Amount for the plan that is to be charged to the subscription in the next billing cycle. For example, `69900` translates to . + + `currency` _mandatory_ + : `string` Currency for the payment. For example, `INR`. You can accept payment in any of the [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `description` _optional_ + : `string` Description for the plan. For example, `Description for the test plan`. + +`notes` _optional_ +: `object` Notes you can enter of the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Monthly gym membership"`. + +### Parameters + +`id` +: `string` The unique identifier linked to a plan. For example, `plan_00000000000001`. This ID is used when creating a subscription for a customer. + +`entity` +: `string` The entity being created. Here, it is `plan`. + +`interval` +: `integer` Used together with `period` to define how often the customer should be charged. + +`period` +: `string` Used together with `interval` to define how often the customer should be charged. Possible values: + - `daily` + - `weekly` + - `monthly` + - `yearly` + +`item` +: `array` Details of the plan. + + `id` + : `string` The unique identifier linked to an item. For example, `item_00000000000001`. + + `name` + : `string` Name of the plan. For example, `Test Plan`. + + `amount` + : `integer` Amount for the plan. When you use this plan to create a subscription, the customer will be charged this amount periodically. + + `currency` + : `string` Currency for the payment. You can accept payment in any of the [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `description` + : `string` Description for the plan. For example, `Description for the test plan`. + +`notes` +: `object` Notes you can enter of the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Monthly Gym"`. + +`created_at` +: `integer` The Unix timestamp at which the plan was created. + +### Errors + +Authentication failed +* code: 401 +* description: This error occurs when you use incorrect or invalid API Keys. +* solution: Use the right set of API keys. + +`offer_id` is/are not required and should not be sent +* code: 400 +* description: This error occurs when you are passing `offer_id` parameter in the request body. +* solution: `offer_id` should not be passed in the request body. + + +The amount must be at least INR 1.00. +* code: 400 +* description: The amount specified is less than the minimum amount. Currency subunits, such as paise (in the case of INR), should always be greater than 100. +* solution: Enter an amount equal to or greater than the minimum amount, that is 100. diff --git a/llm-content/api/payments/subscriptions/create-subscription-link.md b/llm-content/api/payments/subscriptions/create-subscription-link.md new file mode 100644 index 00000000..26850648 --- /dev/null +++ b/llm-content/api/payments/subscriptions/create-subscription-link.md @@ -0,0 +1,409 @@ +--- +title: Create a Subscription Link +description: Create a Subscription link using the Razorpay API. +--- + +# Create a Subscription Link + +## Create a Subscription Link + +Use this endpoint to create a Subscription link. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/subscriptions \ +-H "Content-Type: application/json" \ +-d '{ + "plan_id": "plan_00000000000001", + "total_count": 12, + "quantity": 1, + "start_at": 1561852800, + "expire_by": 1561939199, + "customer_notify": true, + "addons": [ + { + "item": { + "name": "Delivery charges", + "amount": 30000, + "currency": "" + } + } + ], + "offer_id":"offer_JHD834hjbxzhd38d", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "notify_info":{ + "notify_phone": "", + "notify_email": "" + } +}' + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +Dictionary subscriptionRequest = new Dictionary(); +subscriptionRequest.Add("plan_id", "plan_Z6t7VFTb9xHeOs"); +subscriptionRequest.Add("total_count", 12); +subscriptionRequest.Add("quantity", 1); +subscriptionRequest.Add("customer_notify", true); +subscriptionRequest.Add("start_at", 1580453311); +subscriptionRequest.Add("expire_by", 1580626111); +List> addons = new List>(); +Dictionary linesItem = new Dictionary(); +Dictionary item = new Dictionary(); +item.Add("name", "Delivery charges"); +item.Add("amount", 30000); +item.Add("currency", ""); +linesItem.Add("item", item); +addons.Add(linesItem); +subscriptionRequest.Add("addons", addons); +subscriptionRequest.Add("offer_id", "offer_Z6t7VFTb9xHeOs"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +subscriptionRequest.Add("notes", notes); +Dictionary notifyInfo = new Dictionary(); +notifyInfo.Add("notify_phone", ""); +notifyInfo.Add("notify_email", ""); +subscriptionRequest.Add("notify_info", notifyInfo); + +Subscription subscription = client.Subscription.Create(subscriptionRequest); + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject subscriptionRequest = new JSONObject(); +subscriptionRequest.put("plan_id", "plan_HoYg68p5kmuvzD"); +subscriptionRequest.put("total_count", 12); +subscriptionRequest.put("quantity", 1); +subscriptionRequest.put("customer_notify", true); +subscriptionRequest.put("start_at", 1580453311); +subscriptionRequest.put("expire_by", 1580626111); +List addons = new ArrayList<>(); +JSONObject linesItem = new JSONObject(); +JSONObject item = new JSONObject(); +item.put("name","Delivery charges"); +item.put("amount",30000); +item.put("currency",""); +linesItem.put("item",item); +addons.add(linesItem); +subscriptionRequest.put("addons",addons); +subscriptionRequest.put("offer_id","offer_JTUADI4ZWBGWur"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +subscriptionRequest.put("notes", notes); +JSONObject notifyInfo = new JSONObject(); +notifyInfo.put("notify_phone",""); +notifyInfo.put("notify_email",""); +subscriptionRequest.put("notify_info",notifyInfo); + +Subscription subscription = razorpay.subscriptions.create(subscriptionRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->create(array('plan_id' => 'plan_HoYg68p5kmuvzD','total_count' => 12,'quantity' => 1,'expire_by' => 1633237807,'customer_notify' => true, 'addons' => array(array('item'=>array('name' => 'Delivery charges','amount' => 30000,'currency' => ''))),'notes'=>array('notes_key_1'=>'Tea, Earl Grey, Hot','notes_key_2'=>'Tea, Earl Grey… decaf.'),'notify_info'=>array('notify_phone' => '','notify_email'=> ''))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.create({ + plan_id: "plan_HoYg68p5kmuvzD", + total_count: 12, + quantity: 1, + expire_by: 1633237807, + customer_notify: true, + addons: [ + { + item: { + name: "Delivery charges", + amount: 30000, + currency: "" + } + } + ], + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + }, + notify_info: { + notify_phone: "", + notify_email: "" + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.create({ + 'plan_id': 'plan_HoYg68p5kmuvzD', + 'total_count': 12, + 'quantity': 1, + 'expire_by': 1633237807, + 'customer_notify': True, + 'addons': [{'item': {'name': 'Delivery charges', 'amount': 30000, + 'currency': ''}}], + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey\xe2\x80\xa6 decaf.'}, + 'notify_info': {'notify_phone': '', + 'notify_email': ''} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "plan_id": "plan_HoYg68p5kmuvzD", + "total_count": 12, + "quantity": 1, + "expire_by": 1633237807, + "customer_notify": 1, + "addons": [ + { + "item": { + "name": "Delivery charges", + "amount": 30000, + "currency": "" + } + } + ], + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "notify_info": { + "notify_phone": "", + "notify_email": "" + } +} + +Razorpay::Subscription.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "plan_id": "plan_00000000000001", + "total_count": 12, + "quantity": 1, + "start_at": 1561852800, + "expire_by": 1561939199, + "customer_notify": true, + "addons": []interface{}{ + map[string]interface{}{ + "item": map[string]interface{}{ + "name": "Delivery charges", + "amount": 30000, + "currency": "", + }, + }, + }, + "offer_id":"offer_JHD834hjbxzhd38d", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, + "notify_info":map[string]interface{}{ + "notify_phone": "", + "notify_email": "", + }, +} +body, err := client.Subscription.Create(data, nil) +``` + +### Response + +```json: Success +{ + "id":"sub_00000000000002", + "entity":"subscription", + "plan_id":"plan_00000000000001", + "status":"created", + "current_start":null, + "current_end":null, + "ended_at":null, + "quantity":1, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "charge_at":1580453311, + "start_at":1580453311, + "end_at":1587061800, + "auth_attempts":0, + "total_count":12, + "paid_count":0, + "customer_notify":true, + "created_at":1580283117, + "expire_by":1581013800, + "short_url":"https://rzp.io/i/m0y0f", + "has_scheduled_changes":false, + "change_scheduled_at":null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count":12 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Link expire by cannot be lesser than the current time." + } +} +``` + +### Parameters + +`plan_id` _mandatory_ +: `string` The unique identifier of a plan that should be linked to the Subscription. For example, `plan_00000000000001`. + +`total_count` _mandatory_ +: `integer` The number of billing cycles for which the customer should be charged. For example, if a customer is buying a 1-year subscription billed on a bi-monthly basis, this value should be `6`. + +`quantity` _optional_ +: `integer` The number of times the customer should be charged the plan amount per invoice. For example, a customer subscribes to use software. The charges are /month/license. The customer wants 5 licenses. You should pass `5` as the quantity. The customer is charged (5 x ) monthly. By default, this value is set to `1`. + +`start_at` _optional_ +: `integer` Unix timestamp that indicates from when the Subscription should start. If not passed, the Subscription starts immediately after the authorisation payment. For example, `1581013800`. For Subscriptions with a future start_date, frequency is considered `as_presented`. + +`expire_by` _optional_ +: `integer` Unix timestamp that indicates till when the customer can make the authorisation payment. For example, `1581013800`. The default value is 30 years. Do not pass any value if you do not want to set an expiry date. + +`customer_notify` _optional_ +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. Possible values: + - `true` (default): Communication handled by Razorpay. + - `false`: Communication handled by businesses. + +`addons` +: `object` Array that contains details of any upfront amount you want to collect as part of the authorisation transaction. + + `item` + : `object` Details of the upfront amount you want to charge your customer. + + `name` _optional_ + : `string` A name for the upfront amount you want to charge the customer. For example, `Delivery Fee`. + + `amount` _optional_ + : `integer` The upfront amount in the currency subunit you want to charge the customer. For example ,`30000`. + + `currency` _optional_ + : `string` The currency in which you want to charge the customer. This has to match the plan currency. For example, `INR`. + +`offer_id` _optional_ +: `string` The unique identifier of the offer that is linked to the Subscription. You can obtain this from the Dashboard. For example, `offer_JHD834hjbxzhd38d`. + +`notes` _optional_ +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`notify_info` +: `object` The customer's email and phone number to which notifications are to be sent. Use this array only if you have set the `customer_notify` parameter to `true`. That is, Razorpay sends notifications to the customer. The customer details entered in the API request are only to notify the customer about the Subscription. The same will not be prefilled in the checkout as per the government guidelines. + + `notify_phone` _optional_ + : `string` The customer's phone number. + + `notify_email` _optional_ + : `string` The customer's email. + +You can perform various actions related to Subscriptions using the Dashboard. + +### Parameters + +`id` +: `string` The unique identifier of the subscription created. For example, `sub_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `subscription`. + +`plan_id` +: `string` The unique identifier for a plan that is linked to the created subscription. For example, `plan_00000000000001`. + +`customer_id` +: `string` The unique identifier of the customer linked to the subscription. This is populated automatically once the customer completes the authorisation transaction. For example, `cust_00000000000001`. + +`status` +: `string` Status of the subscription. Refer to the [life cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) for more details. Possible values: + - `created` + - `authenticated` + - `active` + - `pending` + - `halted` + - `cancelled` + - `completed` + - `expired` + +`current_start` +: `integer` Unix timestamp. The start time of the current billing cycle of the subscription. For example, `1581013800`. + +`current_end` +: `integer` Unix timestamp. The end time of the current billing cycle of the subscription. For example, `1581013800`. + +`ended_at` +: `integer` The timestamp, in Unix format, when the subscription was completed or was cancelled. For example, `1581013800`. + +`quantity` +: `integer` The number of times the plan should be linked to the subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass 5 as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to 1. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`charge_at` +: `integer` Unix timestamp. This indicates when the next charge on the subscription should be made. For example, `1581013800`. + +`offer_id` +: `string` The unique identifier of the offer that should be linked to the subscription. For example, `offer_JHD834hjbxzhd38d`. + +`start_at` +: `integer` The timestamp, in Unix format, when the subscription should start. If not passed, the subscription starts immediately after the authorisation payment. For example, `1581013800`. + +`end_at` +: `integer` The timestamp, in Unix format, when the subscription should end. For example, `1581013800`. + +`auth_attempts` +: `integer` The number of times that the charge for the current billing cycle has been attempted on the card. For example, `2`. + +`total_count` +: `integer` The number of billing cycles for which the customer should be charged. For example, `2`. We support subscriptions for a maximum duration of 100 years. The number of billing cycles depends if the subscription is daily, weekly, monthly or yearly. + +`paid_count` +: `integer` This indicates the number of billing cycles for which the customer has already been charged. For example, `2`. + +`customer_notify` +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. + - `true`: Communication handled by Razorpay. Defaults to `true`. + - `false`: Communication handled by businesses. + +`created_at` +: `integer` The timestamp, in Unix format, when the subscription was created. For example, `1581013800`. + +`expire_by` +: `integer` The timestamp, in Unix format, till when the customer can make the authorisation payment. For example, `1581013800`. + +`short_url` +: `string` URL that can be used to make the authorisation payment. For example, `https://rzp.io/i/PWtAiEo`. + +`has_scheduled_changes` +: `boolean` Indicates if the subscription has any scheduled changes. Possible values: + - `true`: Subscription has scheduled changes. + - `false`: Subscription does not have scheduled changes. + +`schedule_change_at` +: `string` Represents when the subscription should be updated. Possible values: + - `now` (default): Updates the subscription immediately. + - `cycle_end`: Updates the subscription at the end of the current billing cycle. + +`remaining_count` +: `integer` This indicates the number of billing cycles remaining on the subscription. For example, `2`. + +### Errors + +Link expire by cannot be lesser than the current time. +* code: 400 +* description: This error occurs when the time mentioned in the `expire_by` parameter has already passed. For example, if today's date is December 12, 2022, but the expiry date is mentioned as December 10, 2022. +* solution: Ensure that the time passed in the `expiry_by` parameter occurs after the current time at the time of creating the Subscription link. diff --git a/llm-content/api/payments/subscriptions/create-subscription.md b/llm-content/api/payments/subscriptions/create-subscription.md new file mode 100644 index 00000000..b40e9e74 --- /dev/null +++ b/llm-content/api/payments/subscriptions/create-subscription.md @@ -0,0 +1,388 @@ +--- +title: Create a Subscription +description: Create a Subscription using the Razorpay API. +--- + +# Create a Subscription + +## Create a Subscription + +Use this endpoint to create a Subscription. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/subscriptions \ +-H "Content-Type: application/json" \ +-d '{ + "plan_id":"plan_00000000000001", + "total_count":6, + "quantity":1, + "customer_notify": true, + "start_at":1773461489, + "expire_by":1773547889, + "addons":[ + { + "item":{ + "name":"Delivery charges", + "amount":3000, + "currency":"" + } + } + ], + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary subscriptionRequest = new Dictionary(); +subscriptionRequest.Add("plan_id", "plan_Z6t7VFTb9xHeOs"); +subscriptionRequest.Add("total_count", 6); +subscriptionRequest.Add("quantity", 1); +subscriptionRequest.Add("customer_notify", true); +subscriptionRequest.Add("start_at", 1773461489); +subscriptionRequest.Add("expire_by", 1773547889); +Dictionary linesItem = new Dictionary(); +Dictionary item = new Dictionary(); +item.Add("name", "Delivery charges"); +item.Add("amount", 30000); +item.Add("currency", ""); +linesItem.Add("item", item); +object[] addons = new object[]{ linesItem }; +subscriptionRequest.Add("addons", addons); +subscriptionRequest.Add("offer_id", "offer_LFw2SqDBi8kf53"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +subscriptionRequest.Add("notes", notes); + +Subscription subscription = client.Subscription.Create(subscriptionRequest); +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject subscriptionRequest = new JSONObject(); +subscriptionRequest.put("plan_id", "plan_7wAosPWtrkhqZw"); +subscriptionRequest.put("total_count", 6); +subscriptionRequest.put("quantity", 1); +subscriptionRequest.put("customer_notify", true); +subscriptionRequest.put("start_at", 1773461489); +subscriptionRequest.put("expire_by", 1773547889); +List addons = new ArrayList<>(); +JSONObject linesItem = new JSONObject(); +JSONObject item = new JSONObject(); +item.put("name","Delivery charges"); +item.put("amount",30000); +item.put("currency",""); +linesItem.put("item",item); +addons.add(linesItem); +subscriptionRequest.put("addons",addons); +subscriptionRequest.put("offer_id","offer_JHD834hjbxzhd38d"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +subscriptionRequest.put("notes", notes); + +Subscription order = razorpay.subscriptions.create(subscriptionRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->create(array('plan_id' => 'plan_7wAosPWtrkhqZw', 'customer_notify' => true,'quantity'=>5, 'total_count' => 6, 'start_at' => 1773461489, 'addons' => array(array('item' => array('name' => 'Delivery charges', 'amount' => 30000, 'currency' => ''))),'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.create({ + plan_id: "plan_7wAosPWtrkhqZw", + customer_notify: true, + quantity: 5, + total_count: 6, + start_at: 1773461489, + addons: [ + { + item: { + name: "Delivery charges", + amount: 30000, + currency: "" + } + } + ], + notes: { + key1: "value3", + key2: "value2" + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.create({ + 'plan_id': 'plan_7wAosPWtrkhqZw', + 'customer_notify': True, + 'quantity': 5, + 'total_count': 6, + 'start_at': 1773461489, + 'addons': [{'item': {'name': 'Delivery charges', 'amount': 30000, + 'currency': ''}}], + 'notes': {'key1': 'value3', 'key2': 'value2'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "plan_id": "plan_7wAosPWtrkhqZw", + "customer_notify": 1, + "quantity": 5, + "total_count": 6, + "start_at": 1773461489, + "addons": [ + { + "item": { + "name": "Delivery charges", + "amount": 30000, + "currency": "" + } + } + ], + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Subscription.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "plan_id":"plan_JCPs6ZkAutbaCe", + "total_count":3, + "quantity": 1, + "customer_notify": true, + "start_at":1773461489, + "expire_by":1773547889, + "addons":[]interface{}{ + map[string]interface{}{ + "item":map[string]interface{}{ + "name":"Delivery charges", + "amount":3000, + "currency":"", + }, + }, + }, + "notes":map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Subscription.Create(data, nil) +``` + +### Response + +```json: Success +{ + "id": "sub_00000000000001", + "entity": "subscription", + "plan_id": "plan_00000000000001", + "customer_email": null, + "status": "created", + "current_start": null, + "current_end": null, + "ended_at": null, + "quantity": 1, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "charge_at": 1773461489, + "start_at": 1773461489, + "end_at": 1776450600, + "auth_attempts": 0, + "total_count": 6, + "paid_count": 0, + "customer_notify": true, + "created_at": 1773394958, + "expire_by": 1773547889, + "short_url": "https://rzp.io/rzp/Dqdqx3h", + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "remaining_count": 6 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The requested URL was not found on the server.", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`plan_id` _mandatory_ +: `string` The unique identifier of a plan that should be linked to the Subscription. For example, `plan_00000000000001`. + +`total_count` _mandatory_ +: `integer` The number of billing cycles for which the customer should be charged. For example, if a customer is buying a 1-year subscription billed on a bi-monthly basis, this value should be `6`. + +`quantity` _optional_ +: `integer` The number of times the customer should be charged the plan amount per invoice. For example, a customer subscribes to use software. The charges are /month/license. The customer wants 5 licenses. You should pass `5` as the quantity. The customer is charged (5 x ) monthly. By default, this value is set to `1`. + +`start_at` _optional_ +: `integer` Unix timestamp that indicates from when the Subscription should start. If not passed, the Subscription starts immediately after the authorisation payment. For example, `1581013800`. For Subscriptions with a future start_date, frequency is considered `as_presented`. + +`expire_by` _optional_ +: `integer` Unix timestamp that indicates till when the customer can make the authorisation payment. For example, `1581013800`. The default value is 30 years. Do not pass any value if you do not want to set an expiry date. + +`customer_notify` _optional_ +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. Possible values: + - `true` (default): Communication handled by Razorpay. + - `false`: Communication handled by businesses. + +`addons` +: `object` Array that contains details of any upfront amount you want to collect as part of the authorisation transaction. + + `item` + : `object` Details of the upfront amount you want to charge your customer. + + `name` _optional_ + : `string` A name for the upfront amount you want to charge the customer. For example, `Delivery Fee`. + + `amount` _optional_ + : `integer` The upfront amount in the currency subunit you want to charge the customer. For example ,`30000`. + + `currency` _optional_ + : `string` The currency in which you want to charge the customer. This has to match the plan currency. For example, `INR`. + +`offer_id` _optional_ +: `string` The unique identifier of the offer that is linked to the Subscription. You can obtain this from the Dashboard. For example, `offer_JHD834hjbxzhd38d`. + +`notes` _optional_ +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier of the subscription created. For example, `sub_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `subscription`. + +`plan_id` +: `string` The unique identifier for a plan that is linked to the created subscription. For example, `plan_00000000000001`. + +`customer_id` +: `string` The unique identifier of the customer linked to the subscription. This is populated automatically once the customer completes the authorisation transaction. For example, `cust_00000000000001`. + +`status` +: `string` Status of the subscription. Refer to the [life cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) for more details. Possible values: + - `created` + - `authenticated` + - `active` + - `pending` + - `halted` + - `cancelled` + - `completed` + - `expired` + +`current_start` +: `integer` Unix timestamp. The start time of the current billing cycle of the subscription. For example, `1581013800`. + +`current_end` +: `integer` Unix timestamp. The end time of the current billing cycle of the subscription. For example, `1581013800`. + +`ended_at` +: `integer` The timestamp, in Unix format, when the subscription was completed or was cancelled. For example, `1581013800`. + +`quantity` +: `integer` The number of times the plan should be linked to the subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass 5 as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to 1. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`charge_at` +: `integer` Unix timestamp. This indicates when the next charge on the subscription should be made. For example, `1581013800`. + +`offer_id` +: `string` The unique identifier of the offer that should be linked to the subscription. For example, `offer_JHD834hjbxzhd38d`. + +`start_at` +: `integer` The timestamp, in Unix format, when the subscription should start. If not passed, the subscription starts immediately after the authorisation payment. For example, `1581013800`. + +`end_at` +: `integer` The timestamp, in Unix format, when the subscription should end. For example, `1581013800`. + +`auth_attempts` +: `integer` The number of times that the charge for the current billing cycle has been attempted on the card. For example, `2`. + +`total_count` +: `integer` The number of billing cycles for which the customer should be charged. For example, `2`. We support subscriptions for a maximum duration of 100 years. The number of billing cycles depends if the subscription is daily, weekly, monthly or yearly. + +`paid_count` +: `integer` This indicates the number of billing cycles for which the customer has already been charged. For example, `2`. + +`customer_notify` +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. + - `true`: Communication handled by Razorpay. Defaults to `true`. + - `false`: Communication handled by businesses. + +`created_at` +: `integer` The timestamp, in Unix format, when the subscription was created. For example, `1581013800`. + +`expire_by` +: `integer` The timestamp, in Unix format, till when the customer can make the authorisation payment. For example, `1581013800`. + +`short_url` +: `string` URL that can be used to make the authorisation payment. For example, `https://rzp.io/i/PWtAiEo`. + +`has_scheduled_changes` +: `boolean` Indicates if the subscription has any scheduled changes. Possible values: + - `true`: Subscription has scheduled changes. + - `false`: Subscription does not have scheduled changes. + +`schedule_change_at` +: `string` Represents when the subscription should be updated. Possible values: + - `now` (default): Updates the subscription immediately. + - `cycle_end`: Updates the subscription at the end of the current billing cycle. + +`remaining_count` +: `integer` This indicates the number of billing cycles remaining on the subscription. For example, `2`. + +### Errors + +The requested URL was not found on the server. +* code: 400 +* description: This error occurs when the Subscriptions feature is not enabled. +* solution: Ensure that the [Subscriptions feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md#flash-checkout) is enabled both in the test and live modes before creating a Subscription. + +The id provided does not exist +* code: 400 +* description: This error occurs when passing an incorrect `plan_id`. +* solution: Ensure that you are passing the correct `plan_id`. The plan should be active and created using the same API key and Secret. + +Offer Not Found +* code: 400 +* description: This error occurs when you are linking an invalid/expired offer to a Subscription. +* solution: Ensure that the Subscription offer created on the Dashboard is valid and has not expired. + +Offer not applicable for this Subscription +* code: 400 +* description: This error occurs when you are linking/passing an `offer_id` to a Subscription on which the offer doesn't apply. +* solution: Ensure that the plan amount is greater than the minimum amount set for the offer. diff --git a/llm-content/api/payments/subscriptions/delete-an-add-on.md b/llm-content/api/payments/subscriptions/delete-an-add-on.md new file mode 100644 index 00000000..ba318500 --- /dev/null +++ b/llm-content/api/payments/subscriptions/delete-an-add-on.md @@ -0,0 +1,110 @@ +--- +title: Delete an Add-on +description: Delete an Add-on by its unique ID. +--- + +# Delete an Add-on + +## Delete an Add-on + +Use this endpoint to delete an add-on. + +**Handy Tips** + +You cannot delete an add-on associated with an invoice. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/addons/ao_00000000000001 \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String addonId = "ao_00000000000001"; + +List addon = razorpay.addons.delete(addonId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->addon->fetch($addonId)->delete(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.addons.delete(addonId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.addon.delete(addonId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Addon.delete("ao_00000000000001") + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +addonId := "ao_Jey1r0000000" +body, err := client.Addon.Delete(addonId, nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string addonId = "ao_00000000000001"; + +List addon = client.Addon.Fetch(addonId).Delete(); +``` + +### Response + +```json: Success +[] +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of an add-on. For example, `ao_00000000000001`. + +### Parameters + +`id` +: `string` The unique identifier of the created add-on. For example, `ao_00000000000001`. + +`quantity` +: `integer` This specifies the number of units of the add-on to be charged to the customer. For example, `2`. The total amount is calculated as `amount` * `quantity`. + +`created_at` +: `integer` The Unix timestamp, indicates when the add-on was created. For example, `1581597318`. + +`subscription_id` +: `string` The unique identifier of the Subscription to which the add-on is being added. For example, `sub_00000000000001`. + +`invoice_id` +: `string` The add-on is added to the next invoice that is generated after it is created. This field is populated only after the invoice is generated. Until then, it is `null`. Once the add-on is linked to an invoice, it cannot be deleted. + +### Errors + +The API key/secret provided is invalid. +* code: 4xx +* description: This error occurs due to a mismatch between the API credentials passed in the API call and those generated on the Dashboard. +* solution: Ensure that the API keys are active and correctly entered, with no whitespaces before or after the keys. diff --git a/llm-content/api/payments/subscriptions/delete-offer.md b/llm-content/api/payments/subscriptions/delete-offer.md new file mode 100644 index 00000000..91c32430 --- /dev/null +++ b/llm-content/api/payments/subscriptions/delete-offer.md @@ -0,0 +1,214 @@ +--- +title: Delete an Offer Linked to a Subscription +description: Delete an Offer linked to a Subscription using the Razorpay API. +--- + +# Delete an Offer Linked to a Subscription + +## Delete an Offer Linked to a Subscription + +Use this endpoint to delete an Offer linked to a Subscription. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/subscriptions/sub_00000000000001/offer_JHD834hjbxzhd38d \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +String offerId = "offer_JHD834hjbxzhd38d"; + +Subscription subscription = razorpay.subscription.deleteSubscriptionOffer(subscriptionId, offerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->deleteOffer($offerId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.deleteOffer(subscriptionId, offerId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.delete_offer(subscriptionId, offerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +offerId = "offer_JHD834hjbxzhd38d" + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Subscription.DeleteOffer("", "", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_I3GGEs7Xgmnozy"; + +string offerId = "offer_JCTD1XMlUmzF6Z"; + +Subscription subscription = client.Subscription.Fetch(subscriptionId).DeleteOffer(offerId); +``` + +### Response + +```json: Success +{ + "id": "sub_00000000000001", + "entity": "subscription", + "plan_id": "plan_00000000000001", + "customer_id": "cust_D00000000000001", + "status": "active", + "current_start": 1577355871, + "current_end": 1582655400, + "ended_at": null, + "quantity": 1, + "notes":{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "charge_at": 1577385991, + "start_at": 1577385991, + "end_at": 1603737000, + "auth_attempts": 0, + "total_count": 6, + "paid_count": 1, + "customer_notify": true, + "created_at": 1577356081, + "expire_by": 1577485991, + "short_url": "https://rzp.io/i/z3b1R61A9", + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "offer_id": null, + "remaining_count": 5 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`sub_id` _mandatory_ +: `string` The unique identifier of the Subscription from which you want to remove the offer. For example, `sub_00000000000001`. + +`offer_id` _mandatory_ +: `string` The unique identifier of the offer you want remove from the Subscription. For example, `offer_JHD834hjbxzhd38d`. + +### Parameters + +`id` +: `string` The unique identifier of the subscription created. For example, `sub_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `subscription`. + +`plan_id` +: `string` The unique identifier for a plan that is linked to the created subscription. For example, `plan_00000000000001`. + +`customer_id` +: `string` The unique identifier of the customer linked to the subscription. This is populated automatically once the customer completes the authorisation transaction. For example, `cust_00000000000001`. + +`status` +: `string` Status of the subscription. Refer to the [life cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) for more details. Possible values: + - `created` + - `authenticated` + - `active` + - `pending` + - `halted` + - `cancelled` + - `completed` + - `expired` + +`current_start` +: `integer` Unix timestamp. The start time of the current billing cycle of the subscription. For example, `1581013800`. + +`current_end` +: `integer` Unix timestamp. The end time of the current billing cycle of the subscription. For example, `1581013800`. + +`ended_at` +: `integer` The timestamp, in Unix format, when the subscription was completed or was cancelled. For example, `1581013800`. + +`quantity` +: `integer` The number of times the plan should be linked to the subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass 5 as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to 1. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`charge_at` +: `integer` Unix timestamp. This indicates when the next charge on the subscription should be made. For example, `1581013800`. + +`offer_id` +: `string` The unique identifier of the offer that should be linked to the subscription. For example, `offer_JHD834hjbxzhd38d`. + +`start_at` +: `integer` The timestamp, in Unix format, when the subscription should start. If not passed, the subscription starts immediately after the authorisation payment. For example, `1581013800`. + +`end_at` +: `integer` The timestamp, in Unix format, when the subscription should end. For example, `1581013800`. + +`auth_attempts` +: `integer` The number of times that the charge for the current billing cycle has been attempted on the card. For example, `2`. + +`total_count` +: `integer` The number of billing cycles for which the customer should be charged. For example, `2`. We support subscriptions for a maximum duration of 100 years. The number of billing cycles depends if the subscription is daily, weekly, monthly or yearly. + +`paid_count` +: `integer` This indicates the number of billing cycles for which the customer has already been charged. For example, `2`. + +`customer_notify` +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. + - `true`: Communication handled by Razorpay. Defaults to `true`. + - `false`: Communication handled by businesses. + +`created_at` +: `integer` The timestamp, in Unix format, when the subscription was created. For example, `1581013800`. + +`expire_by` +: `integer` The timestamp, in Unix format, till when the customer can make the authorisation payment. For example, `1581013800`. + +`short_url` +: `string` URL that can be used to make the authorisation payment. For example, `https://rzp.io/i/PWtAiEo`. + +`has_scheduled_changes` +: `boolean` Indicates if the subscription has any scheduled changes. Possible values: + - `true`: Subscription has scheduled changes. + - `false`: Subscription does not have scheduled changes. + +`schedule_change_at` +: `string` Represents when the subscription should be updated. Possible values: + - `now` (default): Updates the subscription immediately. + - `cycle_end`: Updates the subscription at the end of the current billing cycle. + +`remaining_count` +: `integer` This indicates the number of billing cycles remaining on the subscription. For example, `2`. + +### Errors + +The API key/secret provided is invalid. +* code: 4xx +* description: This error occurs due to a mismatch between the API credentials passed in the API call and those generated on the Dashboard. +* solution: Ensure that the API keys are active and correctly entered, with no whitespaces before or after the keys. diff --git a/llm-content/api/payments/subscriptions/entity.md b/llm-content/api/payments/subscriptions/entity.md new file mode 100644 index 00000000..40e30a40 --- /dev/null +++ b/llm-content/api/payments/subscriptions/entity.md @@ -0,0 +1,182 @@ +--- +title: Subscriptions Entity +description: Know about the Subscription entity and the associated parameter descriptions. +--- + +# Subscriptions Entity + +## Subscriptions Entity + +The Subscriptions entity has the following parameters. + +### Response + +```json: Entity +{ + "entity":"collection", + "count":2, + "items":[ + { + "id":"sub_00000000000005", + "entity":"subscription", + "plan_id":"plan_00000000000004", + "customer_id":"cust_D00000000000006", + "status":"active", + "current_start":1577355873, + "current_end":1582655401, + "ended_at":null, + "quantity":1, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "charge_at":1577385995, + "offer_id":"offer_JHD834hjbxzhd38d", + "start_at":1577385995, + "end_at":1603737004, + "auth_attempts":0, + "total_count":6, + "paid_count":1, + "customer_notify":true, + "created_at":1577356088, + "expire_by":1577485999, + "short_url":"https://rzp.io/i/z3b1R61A9", + "has_scheduled_changes":false, + "change_scheduled_at":null, + "remaining_count":5 + }, + { + "id":"sub_00000000000006", + "entity":"subscription", + "plan_id":"plan_00000000000009", + "customer_id":"cust_D00000000000005", + "status":"active", + "current_start":1577355875, + "current_end":1577355875, + "ended_at":null, + "quantity":1, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "charge_at":1561852802, + "start_at":1561852802, + "end_at":1590777006, + "auth_attempts":0, + "total_count":12, + "paid_count":1, + "customer_notify":true, + "created_at":1560241237, + "expire_by":1561939197, + "short_url":"https://rzp.io/i/m0y0f", + "has_scheduled_changes":false, + "change_scheduled_at":null, + "source":"api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count":11 + } + ] +} +``` + +### Parameters + +`id` +: `string` The unique identifier linked to a Subscription. + +`entity` +: `string` The entity being created. Here, it is `subscription`. + +`plan_id` +: `string` The unique identifier of a plan that should be linked to the Subscription. For example, `plan_00000000000001`. + +`customer_id` +: `string` The unique identifier of the customer who is subscribing to a plan. This is populated automatically after the customer completes the authorisation transaction. + +`total_count` +: `integer` The number of billing cycles for which the customer should be charged. For example, if a customer is buying a 1-year subscription billed on a bi-monthly basis, this value should be `6`. + +`customer_notify` +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. Possible values: + - `true` (default): Communication handled by Razorpay. + - `false`: Communication handled by businesses. + +`start_at` +: `integer` The Unix timestamp, indicates from when the Subscription should start. If not passed, the Subscription starts immediately after the authorisation payment. For example, `1581013800`. For Subscriptions with a future start_date, frequency is considered `as_presented`. + +`quantity` +: `integer` The number of times the customer should be charged the plan amount per invoice. For example, a customer subscribes to use software. The charges are /month/license. The customer wants 5 licenses. You should pass 5 as the quantity. The customer is charged (5 x ) monthly. By default, this value is set to `1`. + +`notes` +: `object` Object consisting of key value pairs as notes. + +`status` +: `string` Status of the Subscription. Possible values: + - `created` + - `authenticated` + - `active` + - `pending` + - `halted` + - `cancelled` + - `completed` + - `expired` + + Know more about [Subscriptions States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md). + +`paid_count` +: `integer` Indicates the number of billing cycles the customer has already been charged. + +`current_start` +: `integer` Indicates the start time of the current billing cycle of a Subscription. + +`current_end` +: `integer` Indicates the end time of the current billing cycle of a Subscription. + +`ended_at` +: `integer` The Unix timestamp of when the Subscription has completed its period or has been cancelled midway. + +`charge_at` +: `integer` The Unix timestamp of when the next charge on the Subscription should be made. + +`auth_attempts` +: `integer` The number of times the charge for the current billing cycle has been attempted on the card. + +`expire_by` +: `integer` The Unix timestamp that indicates till when the customer can make the authorisation payment. For example, `1581013800`. The default value is 30 years. Do not pass any value if you do not want to set an expiry date. + +`addons` +: `array of objects` Array that contains details of any upfront amount you want to collect as part of the authorisation transaction. + + `item` + : `array` Details of the upfront amount you want to charge your customer. + + `name` + : `string` A name for the upfront amount you want to charge the customer. For example, `Delivery Fee`. + + `amount` + : `integer` The upfront amount in the currency subunit you want to charge the customer. For example ,`30000`. + + `currency` + : `string` The currency in which you want to charge the customer. This has to match the plan currency. For example, `INR`. + +`offer_id` +: `string` The unique identifier of the offer that is linked to the Subscription. You can obtain this from the Dashboard. For example, `offer_JHD834hjbxzhd38d`. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Gym Membership Plan`. + +`short_url` +: `string` URL that can be used to make the authorisation payment. For example, `https://rzp.io/i/PWtAiEo`. + +`has_scheduled_changes` +: `boolean` Indicates if the Subscription has any scheduled changes. Possible values: + - `true`: Subscription has scheduled changes. + - `false`: Subscription does not have scheduled changes. + +`schedule_change_at` +: `string` Represents when the Subscription should be updated. Possible values: + - `now` (default): Updates the Subscription immediately. + - `cycle_end`: Updates the Subscription at the end of the current billing cycle. + +`remaining_count` +: `integer` Indicates the number of billing cycles remaining on the Subscription. For example, `2`. diff --git a/llm-content/api/payments/subscriptions/fetch-a-plan.md b/llm-content/api/payments/subscriptions/fetch-a-plan.md new file mode 100644 index 00000000..5c93786d --- /dev/null +++ b/llm-content/api/payments/subscriptions/fetch-a-plan.md @@ -0,0 +1,158 @@ +--- +title: Fetch a Plan With ID +description: Fetch a plan using the unique identifier +--- + +# Fetch a Plan With ID + +## Fetch a Plan With ID + +Use this endpoint to retrieve the details of a plan using its unique identifier. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/plans/plan_00000000000001 \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String planId = "plan_00000000000001"; + +Plan plan = razorpay.plans.fetch(planId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->plan->fetch($planId); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.plans.fetch(planId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.plan.fetch(planId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +planId = "plan_00000000000001" + +Razorpay::Plan.fetch(planId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Plan.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String planId = "plan_00000000000001"; + +Plan plan = client.Plan.Fetch(planId); +``` + +### Response + +```json: Success +{ + "id":"plan_00000000000001", + "entity":"plan", + "interval":1, + "period":"weekly", + "item":{ + "id":"item_00000000000001", + "active":true, + "name":"Test plan - Weekly", + "description":"Description for the test plan - Weekly", + "amount":69900, + "unit_amount":69900, + "currency":"", + "type":"plan", + "unit":null, + "tax_inclusive":false, + "hsn_code":null, + "sac_code":null, + "tax_rate":null, + "tax_id":null, + "tax_group_id":null, + "created_at":1580220492, + "updated_at":1580220492 + }, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1580220492 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "an_id%7D is not a valid id" + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the plan. For example, `plan_00000000000001`. + +### Parameters + +`id` +: `string` The unique identifier linked to a plan. For example, `plan_00000000000001`. This ID is used when creating a subscription for a customer. + +`entity` +: `string` The entity being created. Here, it is `plan`. + +`interval` +: `integer` Used together with `period` to define how often the customer should be charged. + +`period` +: `string` Used together with `interval` to define how often the customer should be charged. Possible values: + - `daily` + - `weekly` + - `monthly` + - `yearly` + +`item` +: `array` Details of the plan. + + `id` + : `string` The unique identifier linked to an item. For example, `item_00000000000001`. + + `name` + : `string` Name of the plan. For example, `Test Plan`. + + `amount` + : `integer` Amount for the plan. When you use this plan to create a subscription, the customer will be charged this amount periodically. + + `currency` + : `string` Currency for the payment. You can accept payment in any of the [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `description` + : `string` Description for the plan. For example, `Description for the test plan`. + +`notes` +: `object` Notes you can enter of the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Monthly Gym"`. + +`created_at` +: `integer` The Unix timestamp at which the plan was created. + +### Errors + +an_id%7D is not a valid id +* code: 400 +* description: This error occurs when you are not passing the `plan_id` in the API endpoint to fetch a plan based on the id. +* solution: Ensure that you are passing the `plan_id` in the API endpoint. + For example, `https://api.razorpay.com/v1/plans/plan_K8lVuxetc2OGR8`. diff --git a/llm-content/api/payments/subscriptions/fetch-add-ons.md b/llm-content/api/payments/subscriptions/fetch-add-ons.md new file mode 100644 index 00000000..edea774f --- /dev/null +++ b/llm-content/api/payments/subscriptions/fetch-add-ons.md @@ -0,0 +1,52 @@ +--- +title: Fetch All Add-ons +description: Fetch all Add-ons using the Razorpay API. +--- + +# Fetch All Add-ons + +## Fetch All Add-ons + +Use this endpoint to retrieve all created add-ons. + +### Request + +### Response + +### Parameters + +`from` _optional_ +: `integer` The Unix timestamp from when add-ons are to be fetched. + +`to` _optional_ +: `integer` The Unix timestamp till when add-ons are to be fetched. + +`count` _optional_ +: `integer` The number of add-ons to be fetched. Default value is `10`. Maximum value is `100`. This can be used for pagination, in combination with `skip`. + +`skip` _optional_ +: `integer` The number of add-ons to be skipped. Default value is `0`. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` The unique identifier of the created add-on. For example, `ao_00000000000001`. + +`quantity` +: `integer` This specifies the number of units of the add-on to be charged to the customer. For example, `2`. The total amount is calculated as `amount` * `quantity`. + +`created_at` +: `integer` The timestamp, in Unix format, when the add-on was created. For example, `1581597318`. + +`subscription_id` +: `string` The unique identifier of the subscription to which the add-on is being added. For example, `sub_00000000000001`. + +`invoice_id` +: `string` The add-on is added to the **next** invoice that is generated after the add-on is created. This field is populated only after the invoice is generated. Until then, it is `null`. Once the add-on is linked to an invoice, it cannot be deleted. + +### Errors + +The API key/secret provided is invalid. +* code: 4xx +* description: This error occurs due to a mismatch between the API credentials passed in the API call and those generated on the Dashboard. +* solution: Ensure that the API keys are active and correctly entered, with no whitespaces before or after the keys. diff --git a/llm-content/api/payments/subscriptions/fetch-all-plans.md b/llm-content/api/payments/subscriptions/fetch-all-plans.md new file mode 100644 index 00000000..797ee88e --- /dev/null +++ b/llm-content/api/payments/subscriptions/fetch-all-plans.md @@ -0,0 +1,208 @@ +--- +title: Fetch All Plans +description: Fetch details of all plans created using the Razorpay API. +--- + +# Fetch All Plans + +## Fetch All Plans + +Use this endpoint to fetch details of all plans. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/plans \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List plans = razorpay.plans.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->plan->all($options); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.plans.all(options) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.plan.all(options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +options = {"count": 2} + +Razorpay::Plan.all(options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +options:= map[string]interface{}{ + "count": 1, + "skip": 1, +} +body, err := client.Plan.All(options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("count","1"); + +List plan = client.Plan.All(paramRequest); +``` + +### Response + +```json: Success +{ + "entity":"collection", + "count":2, + "items":[ + { + "id":"plan_00000000000001", + "entity":"plan", + "interval":1, + "period":"weekly", + "item":{ + "id":"item_00000000000001", + "active":true, + "name":"Test plan - Weekly", + "description":"Description for the test plan - Weekly", + "amount":69900, + "unit_amount":69900, + "currency":"", + "type":"plan", + "unit":null, + "tax_inclusive":false, + "hsn_code":null, + "sac_code":null, + "tax_rate":null, + "tax_id":null, + "tax_group_id":null, + "created_at":1580220492, + "updated_at":1580220492 + }, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1580220492 + }, + { + "id":"plan_00000000000002", + "entity":"plan", + "interval":1, + "period":"monthly", + "item":{ + "id":"item_00000000000002", + "active":true, + "name":"Test plan - Monthly", + "description":null, + "amount":79900, + "unit_amount":79900, + "currency":"", + "type":"plan", + "unit":null, + "tax_inclusive":false, + "hsn_code":null, + "sac_code":null, + "tax_rate":null, + "tax_id":null, + "tax_group_id":null, + "created_at":1580220483, + "updated_at":1580220483 + }, + "notes":[], + "created_at":1580220483 + } + ] +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`from` _optional_ +: `integer` The Unix timestamp from when plans are to be fetched. + +`to` _optional_ +: `integer` The Unix timestamp till when plans are to be fetched. + +`count` _optional_ +: `integer` The number of plans to be fetched. Default value is 10. Maximum value is 100. This can be used for pagination in combination with `skip`. + +`skip` _optional_ +: `integer` The number of plans to be skipped. Default value is 0. This can be used for pagination in combination with `count`. + +### Parameters + +`id` +: `string` The unique identifier linked to a plan. For example, `plan_00000000000001`. This ID is used when creating a subscription for a customer. + +`entity` +: `string` The entity being created. Here, it is `plan`. + +`interval` +: `integer` Used together with `period` to define how often the customer should be charged. + +`period` +: `string` Used together with `interval` to define how often the customer should be charged. Possible values: + - `daily` + - `weekly` + - `monthly` + - `yearly` + +`item` +: `array` Details of the plan. + + `id` + : `string` The unique identifier linked to an item. For example, `item_00000000000001`. + + `name` + : `string` Name of the plan. For example, `Test Plan`. + + `amount` + : `integer` Amount for the plan. When you use this plan to create a subscription, the customer will be charged this amount periodically. + + `currency` + : `string` Currency for the payment. You can accept payment in any of the [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `description` + : `string` Description for the plan. For example, `Description for the test plan`. + +`notes` +: `object` Notes you can enter of the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Monthly Gym"`. + +`created_at` +: `integer` The Unix timestamp at which the plan was created. + +### Errors + +The API key/secret provided is invalid. +* code: 4xx +* description: This error occurs due to a mismatch between the API credentials passed in the API call and those generated on the Dashboard. +* solution: Ensure that the API keys are active and correctly entered, with no whitespaces before or after the keys. diff --git a/llm-content/api/payments/subscriptions/fetch-an-add-on.md b/llm-content/api/payments/subscriptions/fetch-an-add-on.md new file mode 100644 index 00000000..d2f666fa --- /dev/null +++ b/llm-content/api/payments/subscriptions/fetch-an-add-on.md @@ -0,0 +1,43 @@ +--- +title: Fetch an Add-on With ID +description: Fetch an Add-on by its unique ID. +--- + +# Fetch an Add-on With ID + +## Fetch an Add-on With ID + +Use this endpoint to retrieve an Add-on by its unique identifier. + +### Request + +### Response + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of an add-on. For example, `ao_00000000000001`. + +### Parameters + +`id` +: `string` The unique identifier of the created add-on. For example, `ao_00000000000001`. + +`quantity` +: `integer` This specifies the number of units of the add-on to be charged to the customer. For example, `2`. The total amount is calculated as `amount` * `quantity`. + +`created_at` +: `integer` The timestamp, in Unix format, when the add-on was created. For example, `1581597318`. + +`subscription_id` +: `string` The unique identifier of the subscription to which the add-on is being added. For example, `sub_00000000000001`. + +`invoice_id` +: `string` The add-on is added to the **next** invoice that is generated after the add-on is created. This field is populated only after the invoice is generated. Until then, it is `null`. Once the add-on is linked to an invoice, it cannot be deleted. + +### Errors + +The API key/secret provided is invalid. +* code: 4xx +* description: This error occurs due to a mismatch between the API credentials passed in the API call and those generated on the Dashboard. +* solution: Ensure that the API keys are active and correctly entered, with no whitespaces before or after the keys. diff --git a/llm-content/api/payments/subscriptions/fetch-invoices.md b/llm-content/api/payments/subscriptions/fetch-invoices.md new file mode 100644 index 00000000..80eb9356 --- /dev/null +++ b/llm-content/api/payments/subscriptions/fetch-invoices.md @@ -0,0 +1,449 @@ +--- +title: Fetch All Invoices of a Subscription +description: Fetch all invoices of a Subscription using the Razorpay API. +--- + +# Fetch All Invoices of a Subscription + +## Fetch All Invoices of a Subscription + +Use this endpoint to retrieve all invoices of a Subscription. The `count` in the response indicates the number of invoices generated for a Subscription. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/invoices?subscription_id=sub_00000000000001 \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("subscription_id",subscriptionId); + +List invoices = razorpay.invoices.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->invoice->all(['subscription_id'=>$subscriptionId]); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.invoices.all({ + 'subscription_id':subscriptionId +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.invoice.all({'subscription_id': subscriptionId}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = {"subscription_id": "sub_00000000000001"} + +Razorpay::Invoice.all(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ "subscription_id": "sub_00000000000001" } +body, err := client.Invoice.All(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary param = new Dictionary(); +param.Add("subscription_id", "sub_Z6t7VFTb9xHeOs"); + +List subscription = client.Invoice.All(param); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "inv_00000000000003", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_00000000000001", + "customer_details": { + "id": "cust_00000000000001", + "name": null, + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": null, + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_00000000000002", + "subscription_id": "sub_00000000000001", + "line_items": [ + { + "id": "li_00000000000003", + "item_id": null, + "ref_id": null, + "ref_type": null, + "name": "Monthly Plan", + "description": null, + "amount": 99900, + "unit_amount": 99900, + "gross_amount": 99900, + "tax_amount": 0, + "taxable_amount": 99900, + "net_amount": 99900, + "currency": "", + "type": "plan", + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "unit": null, + "quantity": 1, + "taxes": [] + } + ], + "payment_id": "pay_00000000000002", + "status": "paid", + "expire_by": null, + "issued_at": 1593344888, + "paid_at": 1593344889, + "cancelled_at": null, + "expired_at": null, + "sms_status": null, + "email_status": null, + "date": 1593344888, + "terms": null, + "partial_payment": false, + "gross_amount": 99900, + "tax_amount": 0, + "taxable_amount": 99900, + "amount": 99900, + "amount_paid": 99900, + "amount_due": 0, + "currency": "", + "currency_symbol": "₹", + "description": null, + "notes": [], + "comment": null, + "short_url": "https://rzp.io/i/Ys4feGqEp", + "view_less": true, + "billing_start": 1594405800, + "billing_end": 1597084200, + "type": "invoice", + "group_taxes_discounts": false, + "created_at": 1593344888, + "idempotency_key": null + }, + { + "id": "inv_00000000000001", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_00000000000001", + "customer_details": { + "id": "cust_00000000000001", + "name": null, + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": null, + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_00000000000001", + "subscription_id": "sub_00000000000001", + "line_items": [ + { + "id": "li_00000000000001", + "item_id": null, + "ref_id": null, + "ref_type": null, + "name": "Monthly Plan", + "description": null, + "amount": 99900, + "unit_amount": 99900, + "gross_amount": 99900, + "tax_amount": 0, + "taxable_amount": 99900, + "net_amount": 99900, + "currency": "", + "type": "plan", + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "unit": null, + "quantity": 1, + "taxes": [] + }, + { + "id": "li_00000000000002", + "item_id": null, + "ref_id": null, + "ref_type": null, + "name": "Delivery charges", + "description": null, + "amount": 30000, + "unit_amount": 30000, + "gross_amount": 30000, + "tax_amount": 0, + "taxable_amount": 30000, + "net_amount": 30000, + "currency": "", + "type": "addon", + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "unit": null, + "quantity": 1, + "taxes": [] + } + ], + "payment_id": "pay_00000000000001", + "status": "paid", + "expire_by": null, + "issued_at": 1591878130, + "paid_at": 1591878210, + "cancelled_at": null, + "expired_at": null, + "sms_status": null, + "email_status": null, + "date": 1591878130, + "terms": null, + "partial_payment": false, + "gross_amount": 129900, + "tax_amount": 0, + "taxable_amount": 129900, + "amount": 129900, + "amount_paid": 129900, + "amount_due": 0, + "currency": "", + "currency_symbol": "₹", + "description": null, + "notes": [], + "comment": null, + "short_url": "https://rzp.io/i/nt5k3df", + "view_less": true, + "billing_start": 1591878205, + "billing_end": 1594405800, + "type": "invoice", + "group_taxes_discounts": false, + "created_at": 1591878130, + "idempotency_key": null + } + ] +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`subscription_id` _mandatory_ +: `string` The unique identifier linked to the Subscription. For example, `sub_00000000000001`. + +### Parameters + +`count` +: `integer` The number of invoices generated for the Subscription. + +`item` +: `array` List of invoices generated for the Subscription. + + `id` + : `string` The unique identifier of the invoice issued for the Subscription. + + `entity` + : `string` The entity being created. Here, it is `invoice`. + + `receipt` + : `string` Here, it is `null`. + + `invoice_number` + : `string` The invoice number. Here, it is `null`. + + `customer_id` + : `string` The unique identifier of the customer linked to the Subscription. + + `customer_details` + : `object` Details of the customer. + + `id` + : `string` The unique identifier of the customer linked to the Subscription. + + `name` + : `string` The customer's name. Know more [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's contact number. + + `billing_address` + : `string` The customer's billing address. + + `shipping_address` + : `string` The customer's shipping address. + + `customer_name` + : `string` The customer's name. + + `customer_email` + : `string` The customer's email address. + + `customer_contact` + : `string` The customer's contact number. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`subscription_id` +: `string` The unique identifier of the Subscription. For example, `sub_00000000000001`. + +`line_items` +: `array` Details of the line item that is billed in the invoice. Number of arrays = number of line items billed in the invoice. For example, if the Subscription starts immediately and has an upfront fee attached to it, the number of line items = 2. One for the Subscription charge and one for the upfront fee. + + `id` + : `string` The unique identifier linked to the item billed in the invoice. For example, `li_00000000000001`. + + `item_id` + : `string` Here, it is `null`. + + `name` + : `string` The item's name. For example, `Monthly Plan`. + + `description` + : `string` A brief description of the item. Here, it is `null`. + + `amount` + : `integer` The item's price, in currency subunits. For example, `99900`. + + `currency` + : `string` The currency for the amount charged for the item. + + `type` + : `string` The type of charge. Possible values: + - `plan` + - `addon` + + `quantity` + : `integer` The number of units of the item billed in the invoice. For example, `1`. + +`payment_id` +: `string` Unique identifier of the payment made by the customer using this invoice. For example, `pay_00000000000001`. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `expired` + - `cancelled` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp, indicates at which the invoice will expire. For example, `1593411509` + +`issued_at` +: `integer` The Unix timestamp, indicates at which the invoice was issued to the customer. For example, `1593411209` + +`paid_at` +: `integer` The Unix timestamp, indicates at which the payment was made. For example, `1593411325` + +`cancelled_at` +: `integer` The Unix timestamp, indicates at which the invoice was canceled by you. For example, `1593411209` + +`expired_at` +: `integer` The Unix timestamp, indicates at which the invoice has expired. For example, `1593411209` + +`sms_status` +: `string` Indicates whether the SMS notification for the invoice was sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` Indicates whether the email notification for the invoice was sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` The Unix timestamp, that indicates the date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Here, it is `null`. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. + - `true`: Customer can make partial payments. + - `false`: Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. This should be in the smallest unit of the currency. For example, `29995`. + +`amount_paid` +: `integer` Amount paid by the customer using the invoice. For example, `29995`. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the item. + +`description` +: `string` A brief description of the invoice. Here, it is `null`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`comment` +: `string` Any comments to be added in the invoice. Here, it is `null`. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with customers to accept payments. Once canceled, no payments can be accepted using the link. For example, `https://rzp.io/i/gb5827Hh`. + +`view_less` +: `boolean` Used when the link description is lengthy and you want to make the text collapsible. The text can be expanded by the customer using the **Show More** link. + - `true` (default): Link description appears collapsed, with a **Show More** link. + - `false`: Link description appears expanded. + +`type` +: `string` Here, it is `invoice`. + +`created_at` +: `integer` The Unix timestamp, that indicates when this invoice entity was created. For example, `1593411943`. + +### Errors + +The API key/secret provided is invalid. +* code: 4xx +* description: This error occurs due to a mismatch between the API credentials passed in the API call and those generated on the Dashboard. +* solution: Ensure that the API keys are active and correctly entered, with no whitespaces before or after the keys. diff --git a/llm-content/api/payments/subscriptions/fetch-pending-update-details.md b/llm-content/api/payments/subscriptions/fetch-pending-update-details.md new file mode 100644 index 00000000..029b6520 --- /dev/null +++ b/llm-content/api/payments/subscriptions/fetch-pending-update-details.md @@ -0,0 +1,212 @@ +--- +title: Fetch Details of a Pending Update +description: Fetch details of a pending update using the Razorpay API. +--- + +# Fetch Details of a Pending Update + +## Fetch Details of a Pending Update + +Use this endpoint to retrieve details of a pending update. This happens when a Subscription is updated using the `end of cycle` option for the `schedule_change_at` parameter. + +**Example** + +A Subscription is to be charged on the 1st of every month. It was charged on January 01, 2021. On January 15, 2021, it was updated using the `end of cycle` option for the `schedule_change_at` parameter. In this case, the update goes live after the Subscription is charged on February 01, 2021. Such updates are said to be scheduled updates and details of such updates can be fetched using this API. + +### Request + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/subscriptions/sub_00000000000001/retrieve_scheduled_changes \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +Subscription subscription = razorpay.subscription.fetchPendingUpdate(subscriptionId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->pendingUpdate() + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.pendingUpdate(subscriptionId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.pending_update(subscriptionId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +Razorpay::Subscription.fetch(subscriptionId).pending_update + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Subscription.PendingUpdate("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_00000000000001"; + +Subscription subscription = client.Subscription.Fetch(subscriptionId).FetchPendingUpdate(); + +``` + +### Response + +```json: Success +{ + "id":"sub_00000000000001", + "entity":"subscription", + "plan_id":"plan_00000000000003", + "customer_id":"cust_00000000000001", + "status":"active", + "current_start":1580284732, + "current_end":1580841000, + "ended_at":null, + "quantity":25, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "charge_at":1580841000, + "start_at":1580284732, + "end_at":1611081000, + "auth_attempts":0, + "total_count":6, + "paid_count":1, + "customer_notify":true, + "created_at":1580284702, + "expire_by":1580626111, + "short_url":"https://rzp.io/i/fFWTkbf", + "has_scheduled_changes":true, + "change_scheduled_at":1557253800, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count":5 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +### Parameters + +`id` +: `string` The unique identifier of the subscription created. For example, `sub_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `subscription`. + +`plan_id` +: `string` The unique identifier for a plan that is linked to the created subscription. For example, `plan_00000000000001`. + +`customer_id` +: `string` The unique identifier of the customer linked to the subscription. This is populated automatically once the customer completes the authorisation transaction. For example, `cust_00000000000001`. + +`status` +: `string` Status of the subscription. Refer to the [life cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) for more details. Possible values: + - `created` + - `authenticated` + - `active` + - `pending` + - `halted` + - `cancelled` + - `completed` + - `expired` + +`current_start` +: `integer` Unix timestamp. The start time of the current billing cycle of the subscription. For example, `1581013800`. + +`current_end` +: `integer` Unix timestamp. The end time of the current billing cycle of the subscription. For example, `1581013800`. + +`ended_at` +: `integer` The timestamp, in Unix format, when the subscription was completed or was cancelled. For example, `1581013800`. + +`quantity` +: `integer` The number of times the plan should be linked to the subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass 5 as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to 1. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`charge_at` +: `integer` Unix timestamp. This indicates when the next charge on the subscription should be made. For example, `1581013800`. + +`offer_id` +: `string` The unique identifier of the offer that should be linked to the subscription. For example, `offer_JHD834hjbxzhd38d`. + +`start_at` +: `integer` The timestamp, in Unix format, when the subscription should start. If not passed, the subscription starts immediately after the authorisation payment. For example, `1581013800`. + +`end_at` +: `integer` The timestamp, in Unix format, when the subscription should end. For example, `1581013800`. + +`auth_attempts` +: `integer` The number of times that the charge for the current billing cycle has been attempted on the card. For example, `2`. + +`total_count` +: `integer` The number of billing cycles for which the customer should be charged. For example, `2`. We support subscriptions for a maximum duration of 100 years. The number of billing cycles depends if the subscription is daily, weekly, monthly or yearly. + +`paid_count` +: `integer` This indicates the number of billing cycles for which the customer has already been charged. For example, `2`. + +`customer_notify` +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. + - `true`: Communication handled by Razorpay. Defaults to `true`. + - `false`: Communication handled by businesses. + +`created_at` +: `integer` The timestamp, in Unix format, when the subscription was created. For example, `1581013800`. + +`expire_by` +: `integer` The timestamp, in Unix format, till when the customer can make the authorisation payment. For example, `1581013800`. + +`short_url` +: `string` URL that can be used to make the authorisation payment. For example, `https://rzp.io/i/PWtAiEo`. + +`has_scheduled_changes` +: `boolean` Indicates if the subscription has any scheduled changes. Possible values: + - `true`: Subscription has scheduled changes. + - `false`: Subscription does not have scheduled changes. + +`schedule_change_at` +: `string` Represents when the subscription should be updated. Possible values: + - `now` (default): Updates the subscription immediately. + - `cycle_end`: Updates the subscription at the end of the current billing cycle. + +`remaining_count` +: `integer` This indicates the number of billing cycles remaining on the subscription. For example, `2`. + +### Errors + +The API key/secret provided is invalid. +* code: 4xx +* description: This error occurs due to a mismatch between the API credentials passed in the API call and those generated on the Dashboard. +* solution: Ensure that the API keys are active and correctly entered, with no whitespaces before or after the keys. diff --git a/llm-content/api/payments/subscriptions/fetch-subscription-id.md b/llm-content/api/payments/subscriptions/fetch-subscription-id.md new file mode 100644 index 00000000..71781093 --- /dev/null +++ b/llm-content/api/payments/subscriptions/fetch-subscription-id.md @@ -0,0 +1,205 @@ +--- +title: Fetch a Subscription With ID +description: Fetch a Subscription using the unique identifier. +--- + +# Fetch a Subscription With ID + +## Fetch a Subscription With ID + +Use this endpoint to fetch a Subscription by the unique identifier. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/subscriptions/sub_00000000000001 \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +Subscription subscription = razorpay.subscriptions.fetch(subscriptionId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.fetch(subscriptionId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.fetch(subscriptionId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +Razorpay::Subscription.fetch(subscriptionId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Subscription.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +Subscription subscription = client.Subscription.Fetch(subscriptionId); +``` + +### Response + +```json: Success +{ + "id": "sub_00000000000001", + "entity": "subscription", + "plan_id": "plan_00000000000001", + "customer_id": "cust_D00000000000001", + "status": "active", + "current_start": 1577355871, + "current_end": 1582655400, + "ended_at": null, + "quantity": 1, + "notes":{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "charge_at": 1577385991, + "start_at": 1577385991, + "end_at": 1603737000, + "auth_attempts": 0, + "total_count": 6, + "paid_count": 1, + "customer_notify": true, + "created_at": 1577356081, + "expire_by": 1577485991, + "short_url": "https://rzp.io/i/z3b1R61A9", + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count": 5 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "ub_id%7D is not a valid id" + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +### Parameters + +`id` +: `string` The unique identifier of the subscription created. For example, `sub_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `subscription`. + +`plan_id` +: `string` The unique identifier for a plan that is linked to the created subscription. For example, `plan_00000000000001`. + +`customer_id` +: `string` The unique identifier of the customer linked to the subscription. This is populated automatically once the customer completes the authorisation transaction. For example, `cust_00000000000001`. + +`status` +: `string` Status of the subscription. Refer to the [life cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) for more details. Possible values: + - `created` + - `authenticated` + - `active` + - `pending` + - `halted` + - `cancelled` + - `completed` + - `expired` + +`current_start` +: `integer` Unix timestamp. The start time of the current billing cycle of the subscription. For example, `1581013800`. + +`current_end` +: `integer` Unix timestamp. The end time of the current billing cycle of the subscription. For example, `1581013800`. + +`ended_at` +: `integer` The timestamp, in Unix format, when the subscription was completed or was cancelled. For example, `1581013800`. + +`quantity` +: `integer` The number of times the plan should be linked to the subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass 5 as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to 1. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`charge_at` +: `integer` Unix timestamp. This indicates when the next charge on the subscription should be made. For example, `1581013800`. + +`offer_id` +: `string` The unique identifier of the offer that should be linked to the subscription. For example, `offer_JHD834hjbxzhd38d`. + +`start_at` +: `integer` The timestamp, in Unix format, when the subscription should start. If not passed, the subscription starts immediately after the authorisation payment. For example, `1581013800`. + +`end_at` +: `integer` The timestamp, in Unix format, when the subscription should end. For example, `1581013800`. + +`auth_attempts` +: `integer` The number of times that the charge for the current billing cycle has been attempted on the card. For example, `2`. + +`total_count` +: `integer` The number of billing cycles for which the customer should be charged. For example, `2`. We support subscriptions for a maximum duration of 100 years. The number of billing cycles depends if the subscription is daily, weekly, monthly or yearly. + +`paid_count` +: `integer` This indicates the number of billing cycles for which the customer has already been charged. For example, `2`. + +`customer_notify` +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. + - `true`: Communication handled by Razorpay. Defaults to `true`. + - `false`: Communication handled by businesses. + +`created_at` +: `integer` The timestamp, in Unix format, when the subscription was created. For example, `1581013800`. + +`expire_by` +: `integer` The timestamp, in Unix format, till when the customer can make the authorisation payment. For example, `1581013800`. + +`short_url` +: `string` URL that can be used to make the authorisation payment. For example, `https://rzp.io/i/PWtAiEo`. + +`has_scheduled_changes` +: `boolean` Indicates if the subscription has any scheduled changes. Possible values: + - `true`: Subscription has scheduled changes. + - `false`: Subscription does not have scheduled changes. + +`schedule_change_at` +: `string` Represents when the subscription should be updated. Possible values: + - `now` (default): Updates the subscription immediately. + - `cycle_end`: Updates the subscription at the end of the current billing cycle. + +`remaining_count` +: `integer` This indicates the number of billing cycles remaining on the subscription. For example, `2`. + +### Errors + +ub_id%7D is not a valid id +* code: 400 +* description: This error occurs when you are not passing the right `subscription_id` in the API endpoint to fetch a plan based on the id. +* solution: Ensure that you are passing the right `subscription_id` in the API endpoint. + For example, `https://api.razorpay.com/v1/subscriptions/sub_KA8rfWnXwyEw0j`. diff --git a/llm-content/api/payments/subscriptions/fetch-subscriptions.md b/llm-content/api/payments/subscriptions/fetch-subscriptions.md new file mode 100644 index 00000000..0e189e1a --- /dev/null +++ b/llm-content/api/payments/subscriptions/fetch-subscriptions.md @@ -0,0 +1,273 @@ +--- +title: Fetch All Subscriptions +description: Fetch all Subscriptions using the Razorpay API. +--- + +# Fetch All Subscriptions + +## Fetch All Subscriptions + +Use this endpoint to fetch all the created Subscriptions. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/subscriptions \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List subscriptions = razorpay.subscriptions.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->all($options); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.all(options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +options = {"count": 1} + +Razorpay::Subscription.all(options) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.all(options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +options := map[string]interface{}{ + "count": 2, +} +body, err := client.Subscription.All(options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("count","1"); + +List subscription = client.Subscription.All(paramRequest); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "sub_00000000000001", + "entity": "subscription", + "plan_id": "plan_00000000000001", + "customer_id": "cust_D00000000000001", + "status": "active", + "current_start": 1577355871, + "current_end": 1582655400, + "ended_at": null, + "quantity": 1, + "notes":{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "charge_at": 1577385991, + "offer_id":"offer_JHD834hjbxzhd38d", + "start_at": 1577385991, + "end_at": 1603737000, + "auth_attempts": 0, + "total_count": 6, + "paid_count": 1, + "customer_notify": true, + "created_at": 1577356081, + "expire_by": 1577485991, + "short_url": "https://rzp.io/i/z3b1R61A9", + "has_scheduled_changes": false, + "change_scheduled_at": null, + "remaining_count": 5 + }, + { + "id": "sub_00000000000002", + "entity": "subscription", + "plan_id": "plan_00000000000001", + "customer_id":"cust_D00000000000001", + "status": "active", + "current_start": 1577355871, + "current_end": 1577355871, + "ended_at": null, + "quantity": 1, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "charge_at": 1561852800, + "start_at": 1561852800, + "end_at": 1590777000, + "auth_attempts": 0, + "total_count": 12, + "paid_count": 1, + "customer_notify": true, + "created_at": 1560241235, + "expire_by": 1561939199, + "short_url": "https://rzp.io/i/m0y0f", + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count": 11 + } + ] +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`plan_id` _optional_ +: `string` The unique identifier of the plan for which you want to retrieve all the Subscriptions. + +`from` _optional_ +: `integer` The Unix timestamp from when Subscriptions are to be fetched. + +`to` _optional_ +: `integer` The Unix timestamp till when Subscriptions are to be fetched. + +`count` _optional_ +: `integer` The number of Subscriptions to be fetched. Default value is `10`. Maximum value is 100. This can be used for pagination, in combination with `skip`. + +`skip` _optional_ +: `integer` The number of Subscriptions to be skipped. Default value is `0`. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` The unique identifier linked to a Subscription. + +`entity` +: `string` The entity being created. Here, it is `subscription`. + +`plan_id` +: `string` The unique identifier of a plan that should be linked to the Subscription. For example, `plan_00000000000001`. + +`customer_id` +: `string` The unique identifier of the customer who is subscribing to a plan. This is populated automatically after the customer completes the authorisation transaction. + +`total_count` +: `integer` The number of billing cycles for which the customer should be charged. For example, if a customer is buying a 1-year subscription billed on a bi-monthly basis, this value should be `6`. + +`customer_notify` +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. Possible values: + - `true` (default): Communication handled by Razorpay. + - `false`: Communication handled by businesses. + +`start_at` +: `integer` The Unix timestamp, indicates from when the Subscription should start. If not passed, the Subscription starts immediately after the authorisation payment. For example, `1581013800`. For Subscriptions with a future start_date, frequency is considered `as_presented`. + +`quantity` +: `integer` The number of times the customer should be charged the plan amount per invoice. For example, a customer subscribes to use software. The charges are /month/license. The customer wants 5 licenses. You should pass 5 as the quantity. The customer is charged (5 x ) monthly. By default, this value is set to `1`. + +`notes` +: `object` Object consisting of key value pairs as notes. + +`status` +: `string` Status of the Subscription. Possible values: + - `created` + - `authenticated` + - `active` + - `pending` + - `halted` + - `cancelled` + - `completed` + - `expired` + + Know more about [Subscriptions States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md). + +`paid_count` +: `integer` Indicates the number of billing cycles the customer has already been charged. + +`current_start` +: `integer` Indicates the start time of the current billing cycle of a Subscription. + +`current_end` +: `integer` Indicates the end time of the current billing cycle of a Subscription. + +`ended_at` +: `integer` The Unix timestamp of when the Subscription has completed its period or has been cancelled midway. + +`charge_at` +: `integer` The Unix timestamp of when the next charge on the Subscription should be made. + +`auth_attempts` +: `integer` The number of times the charge for the current billing cycle has been attempted on the card. + +`expire_by` +: `integer` The Unix timestamp that indicates till when the customer can make the authorisation payment. For example, `1581013800`. The default value is 30 years. Do not pass any value if you do not want to set an expiry date. + +`addons` +: `array of objects` Array that contains details of any upfront amount you want to collect as part of the authorisation transaction. + + `item` + : `array` Details of the upfront amount you want to charge your customer. + + `name` + : `string` A name for the upfront amount you want to charge the customer. For example, `Delivery Fee`. + + `amount` + : `integer` The upfront amount in the currency subunit you want to charge the customer. For example ,`30000`. + + `currency` + : `string` The currency in which you want to charge the customer. This has to match the plan currency. For example, `INR`. + +`offer_id` +: `string` The unique identifier of the offer that is linked to the Subscription. You can obtain this from the Dashboard. For example, `offer_JHD834hjbxzhd38d`. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Gym Membership Plan`. + +`short_url` +: `string` URL that can be used to make the authorisation payment. For example, `https://rzp.io/i/PWtAiEo`. + +`has_scheduled_changes` +: `boolean` Indicates if the Subscription has any scheduled changes. Possible values: + - `true`: Subscription has scheduled changes. + - `false`: Subscription does not have scheduled changes. + +`schedule_change_at` +: `string` Represents when the Subscription should be updated. Possible values: + - `now` (default): Updates the Subscription immediately. + - `cycle_end`: Updates the Subscription at the end of the current billing cycle. + +`remaining_count` +: `integer` Indicates the number of billing cycles remaining on the Subscription. For example, `2`. + +### Errors + +The API key/secret provided is invalid. +* code: 4xx +* description: This error occurs due to a mismatch between the API credentials passed in the API call and those generated on the Dashboard. +* solution: Ensure that the API keys are active and correctly entered, with no whitespaces before or after the keys. diff --git a/llm-content/api/payments/subscriptions/link-offer.md b/llm-content/api/payments/subscriptions/link-offer.md new file mode 100644 index 00000000..c5811f9f --- /dev/null +++ b/llm-content/api/payments/subscriptions/link-offer.md @@ -0,0 +1,398 @@ +--- +title: Link an Offer to a Subscription +description: Link an Offer to a Subscription using the Razorpay API. +--- + +# Link an Offer to a Subscription + +## Link an Offer to a Subscription + +Use this endpoint to link an existing [Offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers.md) by creating a new Subscription link. Pass the `offer_id: ` parameter in the request when creating a Subscription. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/subscriptions \ +-H "Content-Type: application/json" \ +-d '{ + "plan_id": "plan_00000000000001", + "total_count": 12, + "quantity": 1, + "start_at": 1561852800, + "expire_by": 1561939199, + "customer_notify": true, + "addons": [ + { + "item": { + "name": "Delivery charges", + "amount": 30000, + "currency": "" + } + } + ], + "offer_id":"offer_JHD834hjbxzhd38d", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "notify_info":{ + "notify_phone": "", + "notify_email": "" + } +}' + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +Dictionary subscriptionRequest = new Dictionary(); +subscriptionRequest.Add("plan_id", "plan_Z6t7VFTb9xHeOs"); +subscriptionRequest.Add("total_count", 12); +subscriptionRequest.Add("quantity", 1); +subscriptionRequest.Add("customer_notify", true); +subscriptionRequest.Add("start_at", 1580453311); +subscriptionRequest.Add("expire_by", 1580626111); +List> addons = new List>(); +Dictionary linesItem = new Dictionary(); +Dictionary item = new Dictionary(); +item.Add("name", "Delivery charges"); +item.Add("amount", 30000); +item.Add("currency", ""); +linesItem.Add("item", item); +addons.Add(linesItem); +subscriptionRequest.Add("addons", addons); +subscriptionRequest.Add("offer_id", "offer_Z6t7VFTb9xHeOs"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +subscriptionRequest.Add("notes", notes); +Dictionary notifyInfo = new Dictionary(); +notifyInfo.Add("notify_phone", ""); +notifyInfo.Add("notify_email", ""); +subscriptionRequest.Add("notify_info", notifyInfo); + +Subscription subscription = client.Subscription.Create(subscriptionRequest); + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject subscriptionRequest = new JSONObject(); +subscriptionRequest.put("plan_id", "plan_HoYg68p5kmuvzD"); +subscriptionRequest.put("total_count", 12); +subscriptionRequest.put("quantity", 1); +subscriptionRequest.put("customer_notify", true); +subscriptionRequest.put("start_at", 1580453311); +subscriptionRequest.put("expire_by", 1580626111); +List addons = new ArrayList<>(); +JSONObject linesItem = new JSONObject(); +JSONObject item = new JSONObject(); +item.put("name","Delivery charges"); +item.put("amount",30000); +item.put("currency",""); +linesItem.put("item",item); +addons.add(linesItem); +subscriptionRequest.put("addons",addons); +subscriptionRequest.put("offer_id","offer_JTUADI4ZWBGWur"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +subscriptionRequest.put("notes", notes); +JSONObject notifyInfo = new JSONObject(); +notifyInfo.put("notify_phone",""); +notifyInfo.put("notify_email",""); +subscriptionRequest.put("notify_info",notifyInfo); + +Subscription subscription = razorpay.subscriptions.create(subscriptionRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->create(array('plan_id' => 'plan_HoYg68p5kmuvzD','total_count' => 12,'quantity' => 1,'expire_by' => 1633237807,'customer_notify' => true, 'addons' => array(array('item'=>array('name' => 'Delivery charges','amount' => 30000,'currency' => ''))),'notes'=>array('notes_key_1'=>'Tea, Earl Grey, Hot','notes_key_2'=>'Tea, Earl Grey… decaf.'),'notify_info'=>array('notify_phone' => '','notify_email'=> ''))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.create({ + plan_id: "plan_HoYg68p5kmuvzD", + total_count: 12, + quantity: 1, + expire_by: 1633237807, + customer_notify: true, + addons: [ + { + item: { + name: "Delivery charges", + amount: 30000, + currency: "" + } + } + ], + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + }, + notify_info: { + notify_phone: "", + notify_email: "" + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.create({ + 'plan_id': 'plan_HoYg68p5kmuvzD', + 'total_count': 12, + 'quantity': 1, + 'expire_by': 1633237807, + 'customer_notify': True, + 'addons': [{'item': {'name': 'Delivery charges', 'amount': 30000, + 'currency': ''}}], + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey\xe2\x80\xa6 decaf.'}, + 'notify_info': {'notify_phone': '', + 'notify_email': ''} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "plan_id": "plan_HoYg68p5kmuvzD", + "total_count": 12, + "quantity": 1, + "expire_by": 1633237807, + "customer_notify": 1, + "addons": [ + { + "item": { + "name": "Delivery charges", + "amount": 30000, + "currency": "" + } + } + ], + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "notify_info": { + "notify_phone": "", + "notify_email": "" + } +} + +Razorpay::Subscription.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "plan_id": "plan_00000000000001", + "total_count": 12, + "quantity": 1, + "start_at": 1561852800, + "expire_by": 1561939199, + "customer_notify": true, + "addons": []interface{}{ + map[string]interface{}{ + "item": map[string]interface{}{ + "name": "Delivery charges", + "amount": 30000, + "currency": "", + }, + }, + }, + "offer_id":"offer_JHD834hjbxzhd38d", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, + "notify_info":map[string]interface{}{ + "notify_phone": "", + "notify_email": "", + }, +} +body, err := client.Subscription.Create(data, nil) +``` + +### Response + +```json: Success +{ + "id":"sub_00000000000002", + "entity":"subscription", + "plan_id":"plan_00000000000001", + "status":"created", + "current_start":null, + "current_end":null, + "ended_at":null, + "quantity":1, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "charge_at":1580453311, + "start_at":1580453311, + "end_at":1587061800, + "auth_attempts":0, + "total_count":12, + "paid_count":0, + "customer_notify":true, + "created_at":1580283117, + "expire_by":1581013800, + "short_url":"https://rzp.io/i/m0y0f", + "has_scheduled_changes":false, + "change_scheduled_at":null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count":12 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Link expire by cannot be lesser than the current time." + } +} +``` + +### Parameters + +`plan_id` _mandatory_ +: `string` The unique identifier of a plan that should be linked to the Subscription. For example, `plan_00000000000001`. + +`total_count` _mandatory_ +: `integer` The number of billing cycles for which the customer should be charged. For example, if a customer is buying a 1-year subscription billed on a bi-monthly basis, this value should be `6`. + +`quantity` _optional_ +: `integer` The number of times the customer should be charged the plan amount per invoice. For example, a customer subscribes to use software. The charges are /month/license. The customer wants 5 licenses. You should pass `5` as the quantity. The customer is charged (5 x ) monthly. By default, this value is set to `1`. + +`start_at` _optional_ +: `integer` Unix timestamp that indicates from when the Subscription should start. If not passed, the Subscription starts immediately after the authorisation payment. For example, `1581013800`. For Subscriptions with a future start_date, frequency is considered `as_presented`. + +`expire_by` _optional_ +: `integer` Unix timestamp that indicates till when the customer can make the authorisation payment. For example, `1581013800`. The default value is 30 years. Do not pass any value if you do not want to set an expiry date. + +`customer_notify` _optional_ +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. Possible values: + - `true` (default): Communication handled by Razorpay. + - `false`: Communication handled by businesses. + +`addons` +: `object` Array that contains details of any upfront amount you want to collect as part of the authorisation transaction. + + `item` + : `object` Details of the upfront amount you want to charge your customer. + + `name` _optional_ + : `string` A name for the upfront amount you want to charge the customer. For example, `Delivery Fee`. + + `amount` _optional_ + : `integer` The upfront amount in the currency subunit you want to charge the customer. For example ,`30000`. + + `currency` _optional_ + : `string` The currency in which you want to charge the customer. This has to match the plan currency. For example, `INR`. + +`offer_id` _optional_ +: `string` The unique identifier of the offer that is linked to the Subscription. You can obtain this from the Dashboard. For example, `offer_JHD834hjbxzhd38d`. + +`notes` _optional_ +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier of the subscription created. For example, `sub_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `subscription`. + +`plan_id` +: `string` The unique identifier for a plan that is linked to the created subscription. For example, `plan_00000000000001`. + +`customer_id` +: `string` The unique identifier of the customer linked to the subscription. This is populated automatically once the customer completes the authorisation transaction. For example, `cust_00000000000001`. + +`status` +: `string` Status of the subscription. Refer to the [life cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) for more details. Possible values: + - `created` + - `authenticated` + - `active` + - `pending` + - `halted` + - `cancelled` + - `completed` + - `expired` + +`current_start` +: `integer` Unix timestamp. The start time of the current billing cycle of the subscription. For example, `1581013800`. + +`current_end` +: `integer` Unix timestamp. The end time of the current billing cycle of the subscription. For example, `1581013800`. + +`ended_at` +: `integer` The timestamp, in Unix format, when the subscription was completed or was cancelled. For example, `1581013800`. + +`quantity` +: `integer` The number of times the plan should be linked to the subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass 5 as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to 1. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`charge_at` +: `integer` Unix timestamp. This indicates when the next charge on the subscription should be made. For example, `1581013800`. + +`offer_id` +: `string` The unique identifier of the offer that should be linked to the subscription. For example, `offer_JHD834hjbxzhd38d`. + +`start_at` +: `integer` The timestamp, in Unix format, when the subscription should start. If not passed, the subscription starts immediately after the authorisation payment. For example, `1581013800`. + +`end_at` +: `integer` The timestamp, in Unix format, when the subscription should end. For example, `1581013800`. + +`auth_attempts` +: `integer` The number of times that the charge for the current billing cycle has been attempted on the card. For example, `2`. + +`total_count` +: `integer` The number of billing cycles for which the customer should be charged. For example, `2`. We support subscriptions for a maximum duration of 100 years. The number of billing cycles depends if the subscription is daily, weekly, monthly or yearly. + +`paid_count` +: `integer` This indicates the number of billing cycles for which the customer has already been charged. For example, `2`. + +`customer_notify` +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. + - `true`: Communication handled by Razorpay. Defaults to `true`. + - `false`: Communication handled by businesses. + +`created_at` +: `integer` The timestamp, in Unix format, when the subscription was created. For example, `1581013800`. + +`expire_by` +: `integer` The timestamp, in Unix format, till when the customer can make the authorisation payment. For example, `1581013800`. + +`short_url` +: `string` URL that can be used to make the authorisation payment. For example, `https://rzp.io/i/PWtAiEo`. + +`has_scheduled_changes` +: `boolean` Indicates if the subscription has any scheduled changes. Possible values: + - `true`: Subscription has scheduled changes. + - `false`: Subscription does not have scheduled changes. + +`schedule_change_at` +: `string` Represents when the subscription should be updated. Possible values: + - `now` (default): Updates the subscription immediately. + - `cycle_end`: Updates the subscription at the end of the current billing cycle. + +`remaining_count` +: `integer` This indicates the number of billing cycles remaining on the subscription. For example, `2`. + +### Errors + +Link expire by cannot be lesser than the current time. +* code: 400 +* description: The link expiry time is less than the current time. +* solution: Ensure the link expiration time is greater than your current time. diff --git a/llm-content/api/payments/subscriptions/pause-subscription.md b/llm-content/api/payments/subscriptions/pause-subscription.md new file mode 100644 index 00000000..8a326955 --- /dev/null +++ b/llm-content/api/payments/subscriptions/pause-subscription.md @@ -0,0 +1,238 @@ +--- +title: Pause a Subscription +description: Pause a Subscription using the Razorpay API. +--- + +# Pause a Subscription + +## Pause a Subscription + +Use this endpoint to pause a Subscription. + +> **WARN** +> +> +> **Watch Out!** +> +> - You can only pause a Subscriptions in the `active` state. +> - If you pause a Subscription in the `authenticated` state, it goes to the `cancelled` state. +> + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/subscriptions/sub_00000000000001/pause \ +-H "Content-Type: application/json" \ +-d '{ + "pause_at":"now" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +JSONObject params = new JSONObject(); +params.put("pause_at","now"); + +Subscription subscription = razorpay.subscription.pause(SubscriptionId,params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->pause(array('pause_at'=>'now')) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.pause(subscriptionId,{ + pause_at : 'now' +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.pause(subscriptionId, {'pause_at': 'now'}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +options = {"pause_at": "now"} + +Razorpay::Subscription.pause(subscriptionId,options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +options := map[string]interface{}{ "pause_at" : "now" } +body, err := client.Subscription.Pause("", options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_00000000000001"; + +Dictionary param = new Dictionary(); +param.Add("pause_at","now"); + +Subscription subscription = client.Subscription.Fetch(subscriptionId).Pause(param); + +``` + +### Response + +```json: Success +{ + "id": "sub_00000000000001", + "entity": "subscription", + "plan_id": "plan_00000000000001", + "status": "paused", + "current_start": null, + "current_end": null, + "ended_at": null, + "quantity": 1, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "charge_at": null, + "start_at": 1580626111, + "end_at": 1583433000, + "auth_attempts": 0, + "total_count": 6, + "paid_count": 0, + "customer_notify": true, + "created_at": 1580280581, + "paused_at": 1590280581, + "expire_by": 1580626111, + "pause_initiated_by": "self", + "short_url": "https://rzp.io/i/z3b1R61A9", + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count": 6 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +### Parameters + +`pause_at` _optional_ +: `string` The value should be `now` to pause a Subscription immediately. + +### Parameters + +`id` +: `string` The unique identifier of the subscription created. For example, `sub_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `subscription`. + +`plan_id` +: `string` The unique identifier for a plan that is linked to the created subscription. For example, `plan_00000000000001`. + +`customer_id` +: `string` The unique identifier of the customer linked to the subscription. This is populated automatically once the customer completes the authorisation transaction. For example, `cust_00000000000001`. + +`status` +: `string` Status of the subscription. Refer to the [life cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) for more details. Possible values: + - `created` + - `authenticated` + - `active` + - `pending` + - `halted` + - `cancelled` + - `completed` + - `expired` + +`current_start` +: `integer` Unix timestamp. The start time of the current billing cycle of the subscription. For example, `1581013800`. + +`current_end` +: `integer` Unix timestamp. The end time of the current billing cycle of the subscription. For example, `1581013800`. + +`ended_at` +: `integer` The timestamp, in Unix format, when the subscription was completed or was cancelled. For example, `1581013800`. + +`quantity` +: `integer` The number of times the plan should be linked to the subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass 5 as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to 1. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`charge_at` +: `integer` Unix timestamp. This indicates when the next charge on the subscription should be made. For example, `1581013800`. + +`offer_id` +: `string` The unique identifier of the offer that should be linked to the subscription. For example, `offer_JHD834hjbxzhd38d`. + +`start_at` +: `integer` The timestamp, in Unix format, when the subscription should start. If not passed, the subscription starts immediately after the authorisation payment. For example, `1581013800`. + +`end_at` +: `integer` The timestamp, in Unix format, when the subscription should end. For example, `1581013800`. + +`auth_attempts` +: `integer` The number of times that the charge for the current billing cycle has been attempted on the card. For example, `2`. + +`total_count` +: `integer` The number of billing cycles for which the customer should be charged. For example, `2`. We support subscriptions for a maximum duration of 100 years. The number of billing cycles depends if the subscription is daily, weekly, monthly or yearly. + +`paid_count` +: `integer` This indicates the number of billing cycles for which the customer has already been charged. For example, `2`. + +`customer_notify` +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. + - `true`: Communication handled by Razorpay. Defaults to `true`. + - `false`: Communication handled by businesses. + +`created_at` +: `integer` The timestamp, in Unix format, when the subscription was created. For example, `1581013800`. + +`expire_by` +: `integer` The timestamp, in Unix format, till when the customer can make the authorisation payment. For example, `1581013800`. + +`short_url` +: `string` URL that can be used to make the authorisation payment. For example, `https://rzp.io/i/PWtAiEo`. + +`has_scheduled_changes` +: `boolean` Indicates if the subscription has any scheduled changes. Possible values: + - `true`: Subscription has scheduled changes. + - `false`: Subscription does not have scheduled changes. + +`schedule_change_at` +: `string` Represents when the subscription should be updated. Possible values: + - `now` (default): Updates the subscription immediately. + - `cycle_end`: Updates the subscription at the end of the current billing cycle. + +`remaining_count` +: `integer` This indicates the number of billing cycles remaining on the subscription. For example, `2`. + +### Errors + +The API key/secret provided is invalid. +* code: 4xx +* description: This error occurs due to a mismatch between the API credentials passed in the API call and those generated on the Dashboard. +* solution: Ensure that the API keys are active and correctly entered, with no whitespaces before or after the keys. diff --git a/llm-content/api/payments/subscriptions/plans-entity.md b/llm-content/api/payments/subscriptions/plans-entity.md new file mode 100644 index 00000000..fca811b7 --- /dev/null +++ b/llm-content/api/payments/subscriptions/plans-entity.md @@ -0,0 +1,181 @@ +--- +title: Plans Entity +description: Know about the Plan entity and the associated parameter descriptions. +--- + +# Plans Entity + +## Plans Entity + +The Plans entity has the following parameters. + +### Response + +```json: Entity +{ + "entity":"collection", + "count":2, + "items":[ + { + "id":"plan_00000000000008", + "entity":"plan", + "interval":1, + "period":"weekly", + "item":{ + "id":"item_00000000000005", + "active":true, + "name":"Test plan - Monthly", + "description":"Description for the test plan - Monthly", + "amount":89900, + "unit_amount":89900, + "currency":"", + "type":"plan", + "unit":null, + "tax_inclusive":false, + "hsn_code":null, + "sac_code":null, + "tax_rate":null, + "tax_id":null, + "tax_group_id":null, + "created_at":1580220461, + "updated_at":1580220481 + }, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1580220481 + }, + { + "id":"plan_00000000000009", + "entity":"plan", + "interval":1, + "period":"monthly", + "item":{ + "id":"item_00000000000002", + "active":true, + "name":"Test plan - Annual", + "description":null, + "amount":79900, + "unit_amount":79900, + "currency":"", + "type":"plan", + "unit":null, + "tax_inclusive":false, + "hsn_code":null, + "sac_code":null, + "tax_rate":null, + "tax_id":null, + "tax_group_id":null, + "created_at":1580220493, + "updated_at":1580220493 + }, + "notes":[ + + ], + "created_at":1580220493 + } + ] +} +``` + +### Parameters + +`id` +: `string` The unique identifier linked to a plan. This is used when creating a Subscription for customers. + +`entity` +: `string` The entity being created. Here, it is `plan`. + +`interval` +: `integer` This, combined with `period`, defines the frequency. If the billing cycle is 2 months, the value should be `2`. + +> **INFO** +> +> +> **Handy Tips** +> +> For daily plans, the minimum value should be `7`. +> + + +`period` +: `string` This, combined with `interval`, defines the frequency. Possible values: + - `daily` + - `weekly` + - `monthly` + - `quarterly` + - `yearly` + + If the billing cycle is 2 months, the value should be `monthly`. + + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> We allow custom frequencies while creating a plan (for example, once in 3 weeks). +> - For UPI, all undefined frequencies except `daily`, `weekly`, `monthly`, `quarterly` and `yearly` are considered `as-presented`. +> - For domestic cards, all undefined frequencies except `weekly`, `monthly` and `yearly` are considered `as-presented` while registering the mandate with banks. +> + + + +`item` +: `object` Details of the plan. + + `id` + : `string` The unique identifier linked to an item. For example, `item_00000000000001`. + + `name` + : `string` Name of the plan. For example, `Test Plan`. + + `amount` + : `integer` Amount for the plan. When you use this plan to create a Subscription, the customer will be charged this amount periodically. + + + + In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of `295.991`, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + + + `currency` + : `string` Currency for the payment. Defaults to `INR`. + + + + You can accept payment in any of the [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + + + `description` + : `string` Description of the plan. For example, `Description of the test plan`. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Monthly Gym"`. + +`created_at` +: `integer` The Unix timestamp at which the plan was created. diff --git a/llm-content/api/payments/subscriptions/resume-subscription.md b/llm-content/api/payments/subscriptions/resume-subscription.md new file mode 100644 index 00000000..61954a87 --- /dev/null +++ b/llm-content/api/payments/subscriptions/resume-subscription.md @@ -0,0 +1,228 @@ +--- +title: Resume a Subscription +description: Resume a Subscription using the Razorpay API. +--- + +# Resume a Subscription + +## Resume a Subscription + +Use this endpoint to resume a Subscription. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/subscriptions/sub_00000000000001/resume \ +-H "Content-Type: application/json" \ +-d '{ + "resume_at":"now" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String SubscriptionId = "sub_00000000000001"; + +JSONObject params = new JSONObject(); +params.put("resume_at","now"); + +Subscription subscription = razorpay.subscription.resume(SubscriptionId,requestJson); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->resume(array('resume_at'=>'now')) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.resume(subscriptionId,{ + resume_at : 'now' +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.resume(subscriptionId, {'resume_at': 'now'}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +options = {"resume_at": "now"} + +Razorpay::Subscription.resume(subscriptionId,options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +options := map[string]interface{}{ "resume_at" : "now" } +body, err := client.Subscription.Resume("", options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_00000000000001"; + +Dictionary param = new Dictionary(); +param.Add("resume_at","now"); + +Subscription subscription = client.Subscription.Fetch(subscriptionId).Resume(param); +``` + +### Response + +```json: Success +{ + "id": "sub_00000000000001", + "entity": "subscription", + "plan_id": "plan_00000000000001", + "status": "active", + "current_start": null, + "current_end": null, + "ended_at": null, + "quantity": 1, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "charge_at": 1580453311, + "start_at": 1580626111, + "end_at": 1583433000, + "auth_attempts": 0, + "total_count": 6, + "paid_count": 0, + "customer_notify": true, + "created_at": 1580280581, + "paused_at": 1590280581, + "expire_by": 1580626111, + "pause_initiated_by": null, + "short_url": "https://rzp.io/i/z3b1R61A9", + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count": 6 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +### Parameters + +`resume_at` _optional_ +: `string` The value should be `now` to resume a Subscription immediately. + +### Parameters + +`id` +: `string` The unique identifier of the subscription created. For example, `sub_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `subscription`. + +`plan_id` +: `string` The unique identifier for a plan that is linked to the created subscription. For example, `plan_00000000000001`. + +`customer_id` +: `string` The unique identifier of the customer linked to the subscription. This is populated automatically once the customer completes the authorisation transaction. For example, `cust_00000000000001`. + +`status` +: `string` Status of the subscription. Refer to the [life cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) for more details. Possible values: + - `created` + - `authenticated` + - `active` + - `pending` + - `halted` + - `cancelled` + - `completed` + - `expired` + +`current_start` +: `integer` Unix timestamp. The start time of the current billing cycle of the subscription. For example, `1581013800`. + +`current_end` +: `integer` Unix timestamp. The end time of the current billing cycle of the subscription. For example, `1581013800`. + +`ended_at` +: `integer` The timestamp, in Unix format, when the subscription was completed or was cancelled. For example, `1581013800`. + +`quantity` +: `integer` The number of times the plan should be linked to the subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass 5 as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to 1. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`charge_at` +: `integer` Unix timestamp. This indicates when the next charge on the subscription should be made. For example, `1581013800`. + +`offer_id` +: `string` The unique identifier of the offer that should be linked to the subscription. For example, `offer_JHD834hjbxzhd38d`. + +`start_at` +: `integer` The timestamp, in Unix format, when the subscription should start. If not passed, the subscription starts immediately after the authorisation payment. For example, `1581013800`. + +`end_at` +: `integer` The timestamp, in Unix format, when the subscription should end. For example, `1581013800`. + +`auth_attempts` +: `integer` The number of times that the charge for the current billing cycle has been attempted on the card. For example, `2`. + +`total_count` +: `integer` The number of billing cycles for which the customer should be charged. For example, `2`. We support subscriptions for a maximum duration of 100 years. The number of billing cycles depends if the subscription is daily, weekly, monthly or yearly. + +`paid_count` +: `integer` This indicates the number of billing cycles for which the customer has already been charged. For example, `2`. + +`customer_notify` +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. + - `true`: Communication handled by Razorpay. Defaults to `true`. + - `false`: Communication handled by businesses. + +`created_at` +: `integer` The timestamp, in Unix format, when the subscription was created. For example, `1581013800`. + +`expire_by` +: `integer` The timestamp, in Unix format, till when the customer can make the authorisation payment. For example, `1581013800`. + +`short_url` +: `string` URL that can be used to make the authorisation payment. For example, `https://rzp.io/i/PWtAiEo`. + +`has_scheduled_changes` +: `boolean` Indicates if the subscription has any scheduled changes. Possible values: + - `true`: Subscription has scheduled changes. + - `false`: Subscription does not have scheduled changes. + +`schedule_change_at` +: `string` Represents when the subscription should be updated. Possible values: + - `now` (default): Updates the subscription immediately. + - `cycle_end`: Updates the subscription at the end of the current billing cycle. + +`remaining_count` +: `integer` This indicates the number of billing cycles remaining on the subscription. For example, `2`. + +### Errors + +The API key/secret provided is invalid. +* code: 4xx +* description: This error occurs due to a mismatch between the API credentials passed in the API call and those generated on the Dashboard. +* solution: Ensure that the API keys are active and correctly entered, with no whitespaces before or after the keys. diff --git a/llm-content/api/payments/subscriptions/update-subscription.md b/llm-content/api/payments/subscriptions/update-subscription.md new file mode 100644 index 00000000..1f14cbbb --- /dev/null +++ b/llm-content/api/payments/subscriptions/update-subscription.md @@ -0,0 +1,275 @@ +--- +title: Update a Subscription +description: Update a Subscription using the Razorpay API. +--- + +# Update a Subscription + +## Update a Subscription + +Use this endpoint to update a Subscription. + +### Request + +```curl: Curl +curl -u : \ +-X PATCH https://api.razorpay.com/v1/subscriptions/sub_00000000000001 \ +-H "Content-Type: application/json" \ +-d '{ + "plan_id":"plan_00000000000002", + "offer_id":"offer_JHD834hjbxzhd38d", + "quantity":5, + "remaining_count":5, + "start_at":1496000432, + "schedule_change_at":"now", + "customer_notify": true +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000002"; + +JSONObject params = new JSONObject(); +params.put("plan_id","plan_00000000000002"); +params.put("offer_id","offer_JHD834hjbxzhd38d"); +params.put("quantity",5); +params.put("remaining_count",5); +params.put("start_at",1496000432); +params.put("schedule_change_at","now"); +params.put("customer_notify", true); + +Subscription subscription = razorpay.subscription.update(subscriptionId,params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->update($options); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.update(subscriptionId,options) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.update(subscriptionId, options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000002" + +options = { + "plan_id":"plan_00000000000002", + "offer_id":"offer_JHD834hjbxzhd38d", + "quantity":5, + "remaining_count":5, + "start_at":1496000432, + "schedule_change_at":"now", + "customer_notify":1 +} + +Razorpay::Subscription.fetch(subscriptionId).edit(options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Subscription.Update("", options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_00000000000002"; + +Dictionary param = new Dictionary(); +param.Add("plan_id","plan_00000000000002"); +param.Add("offer_id","offer_JHD834hjbxzhd38d"); +param.Add("quantity",5); +param.Add("remaining_count",5); +param.Add("start_at",1496000432); +param.Add("schedule_change_at","now"); +param.Add("customer_notify", true); + +Subscription subscription = client.Subscription.Fetch(subscriptionId).Edit(param); +``` + +### Response + +```json: Success +{ + "id":"sub_00000000000002", + "entity":"subscription", + "plan_id":"plan_00000000000002", + "customer_id":"cust_00000000000002", + "status":"authenticated", + "current_start":null, + "current_end":null, + "ended_at":null, + "quantity":3, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "charge_at":1580453311, + "start_at":1580453311, + "end_at":1606588200, + "auth_attempts":0, + "total_count":6, + "paid_count":0, + "customer_notify":true, + "created_at":1580283807, + "expire_by":1580626111, + "short_url":"https://rzp.io/i/yeDkUKy", + "has_scheduled_changes":false, + "change_scheduled_at":null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count":6 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "subscriptions cannot be updated when payment mode is UPI" + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +### Parameters + +`plan_id`_optional_ +: `string` The unique identifier of the new plan that should be linked to the Subscription. For example, `plan_00000000000001`. + +`offer_id` _optional_ +: `string` The unique identifier of the offer that should be linked to the Subscription. You can obtain this from the Dashboard. For example, `offer_JHD834hjbxzhd38d`. + +`quantity`_optional_ +: `integer` The number of times the plan should be linked to the Subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass `5` as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to `1`. + +`remaining_count`_optional_ +: `integer` This parameter is used to update the `total_count` for a Subscription. For example, let us consider a monthly Subscription with 12 billing cycles. The Subscription has been charged successfully 4 times and 3 more invoices have been issued, but have not been charged. The remaining count in such cases is 5. However, you can overwrite this value using this parameter. + +`start_at`_optional_ +: `integer` Unix timestamp. The new start date for the Subscription. + +`schedule_change_at`_optional_ +: `string` Represents when the Subscription should be updated. + - `now` (default): Updates the Subscription immediately. + - `cycle_end`: Updates the Subscription at the end of the current billing cycle. + +`customer_notify`_optional_ +: `boolean` Represents who sends notifications to the customer. Possible values: + - `true` (default): Notifications sent by Razorpay. + - `false`: Notifications sent by you. + +### Parameters + +`id` +: `string` The unique identifier of the subscription created. For example, `sub_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `subscription`. + +`plan_id` +: `string` The unique identifier for a plan that is linked to the created subscription. For example, `plan_00000000000001`. + +`customer_id` +: `string` The unique identifier of the customer linked to the subscription. This is populated automatically once the customer completes the authorisation transaction. For example, `cust_00000000000001`. + +`status` +: `string` Status of the subscription. Refer to the [life cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) for more details. Possible values: + - `created` + - `authenticated` + - `active` + - `pending` + - `halted` + - `cancelled` + - `completed` + - `expired` + +`current_start` +: `integer` Unix timestamp. The start time of the current billing cycle of the subscription. For example, `1581013800`. + +`current_end` +: `integer` Unix timestamp. The end time of the current billing cycle of the subscription. For example, `1581013800`. + +`ended_at` +: `integer` The timestamp, in Unix format, when the subscription was completed or was cancelled. For example, `1581013800`. + +`quantity` +: `integer` The number of times the plan should be linked to the subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass 5 as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to 1. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`charge_at` +: `integer` Unix timestamp. This indicates when the next charge on the subscription should be made. For example, `1581013800`. + +`offer_id` +: `string` The unique identifier of the offer that should be linked to the subscription. For example, `offer_JHD834hjbxzhd38d`. + +`start_at` +: `integer` The timestamp, in Unix format, when the subscription should start. If not passed, the subscription starts immediately after the authorisation payment. For example, `1581013800`. + +`end_at` +: `integer` The timestamp, in Unix format, when the subscription should end. For example, `1581013800`. + +`auth_attempts` +: `integer` The number of times that the charge for the current billing cycle has been attempted on the card. For example, `2`. + +`total_count` +: `integer` The number of billing cycles for which the customer should be charged. For example, `2`. We support subscriptions for a maximum duration of 100 years. The number of billing cycles depends if the subscription is daily, weekly, monthly or yearly. + +`paid_count` +: `integer` This indicates the number of billing cycles for which the customer has already been charged. For example, `2`. + +`customer_notify` +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. + - `true`: Communication handled by Razorpay. Defaults to `true`. + - `false`: Communication handled by businesses. + +`created_at` +: `integer` The timestamp, in Unix format, when the subscription was created. For example, `1581013800`. + +`expire_by` +: `integer` The timestamp, in Unix format, till when the customer can make the authorisation payment. For example, `1581013800`. + +`short_url` +: `string` URL that can be used to make the authorisation payment. For example, `https://rzp.io/i/PWtAiEo`. + +`has_scheduled_changes` +: `boolean` Indicates if the subscription has any scheduled changes. Possible values: + - `true`: Subscription has scheduled changes. + - `false`: Subscription does not have scheduled changes. + +`schedule_change_at` +: `string` Represents when the subscription should be updated. Possible values: + - `now` (default): Updates the subscription immediately. + - `cycle_end`: Updates the subscription at the end of the current billing cycle. + +`remaining_count` +: `integer` This indicates the number of billing cycles remaining on the subscription. For example, `2`. + +### Errors + +Subscriptions cannot be updated when payment mode is UPI +* code: 400 +* description: This error occurs when you are trying to update a Subscription authorised via UPI. +* solution: You cannot update a Subscription authorised via UPI mode or Emandate. + + +Can't update Subscription when Subscription is not in Authenticated or Active state +* code: 400 +* description: This error occurs when you are trying to update a Subscription in the created state. +* solution: Ensure that the Subscription status is either in the authenticated or active state. diff --git a/llm-content/api/payments/tpap-pro/complaints-flow.md b/llm-content/api/payments/tpap-pro/complaints-flow.md new file mode 100644 index 00000000..f76fba9a --- /dev/null +++ b/llm-content/api/payments/tpap-pro/complaints-flow.md @@ -0,0 +1,31 @@ +--- +title: Complaints +description: Know about raising and tracking complaints in TPAP Pro using APIs. +--- + +# Complaints + +Razorpay TPAP Pro - Complaints APIs allow you to raise, track, and receive resolution updates for disputes related to UPI transactions. + +Below are the steps to integrate and manage complaints with TPAP Pro. You can also refer to our comprehensive [TPAP Pro integration guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md). + +1. [Customer Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/customer-onboarding.md) +2. [Manage Funds and Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/funds-account-management.md) +3. [Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/payments-flow.md) +4. [Mandates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/mandate-flow.md) +5. Complaints +6. [UPI Numbers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/upi-number.md) +7. [UPI Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/fundsource-lite.md) + +### Related Guides + +[About TPAP Pro](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro.md) +[Integrate With TPAP Pro](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md) + +### Endpoints + +- **post** `/v1/complaints/raise` - Raise a Complaint: +Registers a complaint related to a UPI payment transaction. + +- **get** `/v1/complaints` - Fetch Complaints: +Fetches the status of a specific complaint or lists all complaints for a customer. diff --git a/llm-content/api/payments/tpap-pro/complaints-flow/fetch-complaints.md b/llm-content/api/payments/tpap-pro/complaints-flow/fetch-complaints.md new file mode 100644 index 00000000..aa14823f --- /dev/null +++ b/llm-content/api/payments/tpap-pro/complaints-flow/fetch-complaints.md @@ -0,0 +1,171 @@ +--- +title: Fetch Complaints +description: Retrieve the status of a specific complaint or fetch all complaints for a customer. +--- + +# Fetch Complaints + +## Fetch Complaints + +Use this endpoint to fetch the status of a specific complaint or retrieve a list of complaints. + +### Request + +```curl: Curl +curl -X GET 'https://api.rzp..com/v1/complaints?upi_transaction_id=1232341412&refresh=true&limit=4&offset=10&status=success' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "Authorization: Bearer " \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +``` + + + +### Response + +```json: Success +{ + "entity": "collection", + "count": 1, + "items": [ + { + "entity": "upi.complaint", + "reference_id": "123214121", + "upi_reference_id": "123214121", + "request_adjustment_amount": 500, + "request_adjustment_code": "U010", + "request_adjustment_flag": "PBRB", + "upi_customer_reference_number": "CRN987654321", + "adjustment_amount": 500, + "adjustment_code": "102", + "adjustment_flag": "PR2C", + "payee": { + "vpa": "acme.corp@rzp", + "name": "AcmeCorp Pvt. Ltd." + }, + "status": "success", + "description": "Complaint for failed transaction under review", + "upi_transaction_id": "1232341412", + "upi_original_transaction_id": "1232341412", + "created_at": 1705411200 + } + ] +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "upi_original_transaction_id is mandatory", + "source": "internal", + "step": "", + "reason": "", + "field": "upi_original_transaction_id", + "metadata": null + } +} +``` + + + +### Parameters + +`upi_transaction_id` +: `string` Fetch the complaint status for the specific transaction id. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +`refresh` +: `boolean` Determines whether to fetch payment status from NPCI. Possible values: + - `true`: If set to true, fetch payment status from NPCI. + - `false` (default): If set to false, return payment from the local database. + +`limit` +: `integer` Maximum number of records to return. Used for pagination. + +`offset` +: `integer` Offset value for pagination. + +`status` +: `string` The status of the complaint. Possible values: + - `initiated` + - `success` + - `failure` + +### Parameters + +`entity` +: `string` The entity type. Here, it is `collection`. + +`count` +: `integer` Indicates the number of items in the entity type. + +`items` +: `object` The complaint details. + + `entity` + : `string` Entity type. Here it is `upi.complaint`. + + `reference_id` + : `string` Business-generated complaint reference id. + + `upi_reference_id` + : `string` Identifier returned by Razorpay for the complaint. + + `request_adjustment_amount` + : `integer` The amount of the transaction sent by NPCI (in paise), when the complaint was raised. + + `request_adjustment_code` + : `string` Code representing complaint reason from NPCI, when the complaint was raised.. + + `request_adjustment_flag` + : `string` Flag associated with the complaint reason from NPCI, when the complaint was raised.. + + `upi_customer_reference_number` + : `string` Complaint id shared by NPCI. + + `adjustment_amount` + : `integer` The amount of the transaction sent by NPCI, in paise. + + `adjustment_code` + : `string` Code representing complaint reason from NPCI. + + `adjustment_flag` + : `string` Flag associated with the complaint reason from NPCI. + + `payee` + : `object` The payee details. + + `vpa` + : `string` The VPA of the payee. + + `name` + : `string` The name of the payee. + + `status` + : `string` Indicates the complaint status. Possible values: + - `initiated` + - `active` + - `completed` + - `paused` + - `failed` + + `description` + : `string` Acknowledgement or status description. + + `upi_transaction_id` + : `string` UPI transaction id related to the complaint. + + `upi_original_transaction_id` + : `string` Original UPI transaction id used at the time of payment. + + `created_at` + : `string` The UNIX timestamp at which the complaint was created. diff --git a/llm-content/api/payments/tpap-pro/complaints-flow/raise-complaints.md b/llm-content/api/payments/tpap-pro/complaints-flow/raise-complaints.md new file mode 100644 index 00000000..dcb6ad2e --- /dev/null +++ b/llm-content/api/payments/tpap-pro/complaints-flow/raise-complaints.md @@ -0,0 +1,178 @@ +--- +title: Raise a Complaint +description: Register a complaint related to a UPI payment transaction. +--- + +# Raise a Complaint + +## Raise a Complaint + +Use this endpoint to register a complaint for a failed or unsatisfactory UPI transaction. + +### Request + +```curl: Curl +curl -X POST 'https://api.rzp..com/v1/complaints/raise' \ +-u [YOUR_KEY_id]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "Authorization: Bearer " \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "reference_id": "123214121", + "upi_transaction_id": "1234567890", + "upi_original_transaction_id": "1231312321412", + "upi_initiation_mode": "00", + "upi_purpose_code": "01", + "upi_reference_category": "00", + "upi_reference_url": "https://www.abcxyz.com/", + "request_adjustment_amount": "500", + "request_adjustment_code": "U010", + "request_adjustment_flag": "PBRB", + "description": "Amount not credited" +}' +``` + + + +### Response + +```json: Success +{ + "entity": "upi.complaint", + "reference_id": "123214121", + "upi_reference_id": "123214121", + "upi_transaction_id": "1234567890", + "upi_response_code": "01", + "upi_customer_reference_number": "123214121", + "payee": { + "vpa": "acme.corp@rzp", + "name": "AcmeCorp Pvt. Ltd." + }, + "description": "Your Complaint is Raised", + "status": "initiated", + "request_adjustment_amount": "500", + "request_adjustment_code": "U010", + "request_adjustment_flag": "PBRB" +} +``` + + + +### Parameters + +`reference_id` _mandatory_ +: `string` Unique id generated by the business for the complaint. + +`upi_transaction_id` _mandatory_ +: `string` Unique transaction id on which the complaint is raised. + +`upi_original_transaction_id` _mandatory_ +: `string` Original UPI transaction id used at the time of payment. + +`upi_initiation_mode` _optional_ +: `enum` Indicates the 2-digit code defined by NPCI. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` _optional_ +: `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`upi_reference_category` _mandatory_ +: `string` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: NULL + - `01`: Advertisement + - `02`: Invoice + +`upi_reference_url` _optional_ +: `string` Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details, and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction. + +`request_adjustment_amount` +: `integer` Complaint amount in paisa. + +`request_adjustment_code` +: `string` NPCI-defined reason code for complaint. + +`request_adjustment_flag` +: `string` NPCI-defined flag associated with the complaint reason. + +`description` +: `string` Description for the complaint. + +### Parameters + +`entity` +: `string` Entity type. Here it is `upi.complaint`. + +`reference_id` +: `string` Business-generated complaint reference id. + +`upi_reference_id` +: `string` Identifier returned by Razorpay for the complaint. + +`upi_transaction_id` +: `string` UPI transaction id related to the complaint. + +`upi_response_code` +: `string` Code returned by NPCI indicating complaint status. + +`upi_customer_reference_number` +: `string` Complaint id shared by NPCI. + +`payee` +: `object` The payee details. + + `vpa` + : `string` The VPA of the payee. + + `name` + : `string` The name of the payee. + +`description` +: `string` Acknowledgement or status description. + +`status` +: `string` Indicates the complaint status. Possible values: + - `initiated` + - `active` + - `completed` + - `paused` + - `failed` + +`request_adjustment_amount` +: `integer` The adjustment amount for the complaint, in paise. + +`request_adjustment_code` +: `string` Code representing complaint reason from NPCI. + +`request_adjustment_flag` +: `string` Flag associated with the complaint reason from NPCI. diff --git a/llm-content/api/payments/tpap-pro/customer-onboarding.md b/llm-content/api/payments/tpap-pro/customer-onboarding.md new file mode 100644 index 00000000..995ef2c9 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/customer-onboarding.md @@ -0,0 +1,56 @@ +--- +title: Customer Onboarding +description: Know about customer onboarding and list of endpoints. +--- + +# Customer Onboarding + +Explore Razorpay's TPAP Pro - Customer Onboarding APIs, which facilitate the registration of devices and the management of payment sources, such as bank accounts, RuPay credit cards and credit lines, to enhance your UPI onboarding process. As part of this process, you need to create a unique identifier called a [fingerprint](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md#create-a-device-fingerprint) using various device attributes. + + + + + Below are the steps to integrate TPAP Pro. You can also refer to our comprehensive [TPAP Pro integration guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md). + +1. Customer Onboarding +2. [Manage Funds and Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/funds-account-management.md) +3. [Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/payments-flow.md) +4. [Mandates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/mandate-flow.md) +5. [Complaints](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/complaints-flow.md) +6. [UPI Numbers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/upi-number.md) +7. [UPI Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/fundsource-lite.md) + + +### Related Guides + +[About TPAP Pro](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro.md) +[Integrate With TPAP Pro](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md) + +### Endpoints + +- **post** `/v1/upi/tpap/mobile/verification` - Get a Mobile Number Verification Token: + Gets the verification token. + +- **post** `/v1/upi/tpap/devices/bind` - Bind the Device: + Binds the device. + +- **post** `/v1/upi/tpap/devices/token` - Get NPCI Token: + Gets the NPCI token. + +- **get** `/v1/upi/tpap/fundsource_providers?skip=0&count=10&refresh=true` - Fetch Banks: + Retrieves the list of banks. + +- **get** `/v1/upi/tpap/fundsources?refresh=true&linked=true&upi_iin=7078129&skip=0&count=10&device_ip=198.1.1.1&device_geocode=1234.1213` - Fetch Payment Sources: + Retrieves the list of payment sources. + +- **post** `/v1/upi/tpap/vpa/available` - Check VPA Availability: + Checks if the VPA is available. + +- **post** `/v1/upi/tpap/vpa/link?expand[]=fundsources` - Create VPA and Link to Payment Sources: + Creates a VPA and links to a payment source. + +- **post** `/v1/upi/tpap/fundsources/:id/otp` - Generate OTP: + Generates an OTP. + +- **post** `/v1/upi/tpap/fundsources/:id/upi_pin?expand[]=vpas` - Set or Reset UPI PIN: + Sets or resets UPI PIN. diff --git a/llm-content/api/payments/tpap-pro/customer-onboarding/bind-device.md b/llm-content/api/payments/tpap-pro/customer-onboarding/bind-device.md new file mode 100644 index 00000000..367714ac --- /dev/null +++ b/llm-content/api/payments/tpap-pro/customer-onboarding/bind-device.md @@ -0,0 +1,120 @@ +--- +title: Bind the Device +description: Bind the device using the Razorpay TPAP Pro API. +--- + +# Bind the Device + +## Bind the Device + +Use this endpoint to bind the device. + +### Request + +```curl: Request +curl -X POST 'api.rzp..com/v1/upi/tpap/devices/bind' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "mobile":"91999999999", + "verification_type":"sms", + "sms":{ + "content":"UPIACT ad56ef90396348bac56099" + }, + "uuid":"", + "app":"test.merchant.upi.com", + "ssid":"123456789", + "manufacturer":"samsung", + "model":"Galaxy S23", + "os":"android", + "os_version":"Dev12345" +}' +``` + +### Response + +```json: Response +{ + "entity":"upi.device", + "mobile":"999999999", + "uuid":"", + "app":"test.merchant.upi.com", + "ssid":"123456789", + "manufacturer":"samsung", + "model":"Galaxy S23", + "os":"android", + "os_version":"Dev12345", + "status":"verified" +} +``` + +### Parameters + +`mobile` _mandatory_ +: `string` Mobile number of the customer. + +`verification_type` _mandatory_ +: `string` The verification type. Possible value is `sms`. + +`sms` _mandatory_ +: `object` The device details. + + `content` + : `string` SMS content to be used for device binding of this token as returned by the [Get Verification Token API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/customer-onboarding/verification-token.md). + +`device` _mandatory_ +: `object` The device information. This should be the same information sent when you [get the verification token api](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/customer-onboarding/verification-token.md). + + `uuid` + : `string` The unique identifier of the device. For example, `advertising_id` or `android_id`. + + `app` + : `string` The package name for the app. + + `ssid` + : `string` The service set identifier (unique network identifier). + + `manufacturer` + : `string` The phone manufacturer. + + `model` + : `string` The phone model. For example, `Galaxy S23`. + + `os` + : `string` The operating system running on the device. + + `os_version` + : `string` The version of the operating system. + +### Parameters + +`entity` +: `string` Indicates the type of entity. Here it is, `device`. + +`mobile` +: `string` The mobile number of the customer. + +`uuid` +: `string` The unique identifier of the device. For example, `advertising_id` or `android_id`. + +`app` +: `string` The package name for the app. + +`ssid` +: `string` The service set identifier (unique network identifier). + +`manufacturer` +: `string` The phone manufacturer. + +`model` +: `string` The phone model. For example, `Galaxy S23`. + +`os` +: `string` The operating system running on the device. + +`os_version` +: `string` The version of the operating system. + +`status` +: `string` Device binding status. Know more about the [device binding status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md#device-binding-status). diff --git a/llm-content/api/payments/tpap-pro/customer-onboarding/create-vpa.md b/llm-content/api/payments/tpap-pro/customer-onboarding/create-vpa.md new file mode 100644 index 00000000..cd27daa2 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/customer-onboarding/create-vpa.md @@ -0,0 +1,198 @@ +--- +title: Create a VPA and Link to Payment Source +description: Create a VPA and link it to the payment source using the Razorpay TPAP Pro API. +--- + +# Create a VPA and Link to Payment Source + +## Create a VPA and Link to Payment Source + +If not already linked, create a VPA and link it with a list of payment sources. The expansion in the request URL returns the expanded payment source if it is passed in the query parameters. Use this endpoint to create a VPA and link it to a payment source. + +### Request + +```curl: Curl +curl -X POST 'api.rzp..com/v1/upi/tpap/vpa/link?expand[]=fundsources' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "vpa":"customer@handle", + "fundsources":[ + { + "fundsource_id":"fs_1234", + "primary":true + } + ] +}' +``` + +### Response + +```json: Response +{ + "entity":"upi.vpa", + "customer_reference":"cust_1234", + "mobile":"999999999", + "address":"kunal-1@rzpa", + "status":"active", + "fundsources":{ + "entity":"collection", + "count":2, + "items":[ + { + "id":"fs_1234", + "customer_name":"kunal1", + "masked_account_number":"xxxxxx8990", + "account_reference_number":"999988126236990", + "type":"savings", + "ifsc":"SBI00001", + "upi_pin_set":true, + "upi_pin_length":4, + "otp_length":4, + "atm_pin_length":6, + "fundsource_provider":{ + "name":"HDFC Bank", + "upi_iin":"600007", + "upi_enabled":false, + "mobile_registration_format":"format1", + "logo_url":"" + }, + "primary":true + }, + { + "id":"dummyfs1111111", + "customer_name":"kunal1", + "masked_account_number":"xxxxxx8990", + "account_reference_number":"999988126236990", + "type":"savings", + "ifsc":"SBI00001", + "upi_pin_set":true, + "upi_pin_length":4, + "otp_length":4, + "atm_pin_length":6, + "fundsource_provider":{ + "name":"HDFC Bank", + "upi_iin":"600007", + "upi_enabled":false, + "mobile_registration_format":"format1", + "logo_url":"" + } + } + ] + } +} +``` + +### Parameters + +`vpa` _mandatory_ +: `string` The VPA that should be linked. + +`fundsources` _mandatory_ +: `array` The list of payment sources that should be linked with the requested VPA. + + `fundsource_id` _mandatory_ + : `string` The payment source identifier. + + `primary` _optional_ + : `boolean` The field to set the given VPA payment source link as primary. + - `true`: VPA is linked to the payment source. + - `false`: VPA is not linked to the payment source. + +### Parameters + +`entity` +: `string` The name of the entity. Here, it is `upi.vpa`. + +`customer_reference` +: `string` The customer identifier. You must pass the customer identifier at the TPAP end in this attribute. + +`mobile` +: `string` The mobile number of the VPA linked to the payment source. + +`address` +: `string` The VPA of the customer. + +`status` +: `string` The VPA and payment source linking status. Possible values: + - `active` + - `inactive` + +`fundsources` +: `object` Collection of payment sources. + + `entity` + : `string` Indicates the name of the entity. + + `count` + : `integer` Indicates the number of items in the entity type. + + `items` + : `object` Payment source and payment source provider details. + + `primary` + : `boolean` Indicates whether VPA payment source is linked primary. + - `true`: VPA is linked to the payment source. + - `false`: VPA is not linked to the payment source. + + `id` + : `string` Unique identifier of the payment source. + + `customer_name` + : `string` Customer name. + + `masked_account_number` + : `string` Masked account number of the payment source. + + `account_reference_number` + : `string` The account reference number. + + `type` + : `enum` Type of the payment source. Possible values: + - `savings` + - `current` + - `non resident ordinary` + - `non resident ordinary` + - `secured overdraft` + - `credit` + - `ppi` + + `ifsc` + : `string` IFSC of the bank. + + `upi_pin_set` + : `boolean` Indicates whether UPI PIN is set for payment source. Possible values: + - `true`: UPI PIN is set. + - `false`: UPI PIN is not set. + + `upi_pin_length` + : `integer` Length of the UPI PIN of the payment source allowed. + + `otp_length` + : `integer` Length of the OTP PIN of the payment source allowed. + + `atm_pin_length` + : `integer` ATM PIN length of the payment source allowed. + + `fundsource_provider` + : `object` Payment source provider details. + + `upi_iin` + : `string` UPI Issuer Identification Numbers (iin) of the payment source provider issued by NPCI. + + `name` + : `string` Name of the payment source (bank account) provider. + + `upi_enabled` + : `boolean` Indicates whether UPI is enabled to the payment source provider. Possible values: + - `true`: UPI is enabled. + - `false`: UPI is not enabled. + + `mobile_registration_format` + : `string` Indicates the format as defined by NPCI: `format1`, `format2` and so on. + + `logo_url` + : `string` Indicates the URL of the bank logo. diff --git a/llm-content/api/payments/tpap-pro/customer-onboarding/device-entity.md b/llm-content/api/payments/tpap-pro/customer-onboarding/device-entity.md new file mode 100644 index 00000000..68d3fed9 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/customer-onboarding/device-entity.md @@ -0,0 +1,67 @@ +--- +title: Device Entity +description: Know about device entity parameters and their description. +--- + +# Device Entity + +## Device Entity + +The Device entity has the following parameters. + +### Response + +```json: Entity +{ + "entity":"device", + "mobile":"999999999", + "uuid":"", + "app":"test.merchant.upi.com", + "ssid":"123456789", + "manufacturer":"samsung", + "model":"Galaxy S23", + "os":"android", + "os_version":"Dev12345", + "ip":"ip of the device", + "geocode":"geocode of the device", + "status":"mobile_verification_pending" +} +``` + +### Parameters + +`entity` +: `string` Indicates the type of entity. Here, it is `device`. + +`mobile` +: `string` The mobile number of the customer. + +`uuid` +: `string` A unique identifier for the device. For example, `advertising_id` or `android_id`. + +`app` +: `string` The package name for the app. + +`ssid` +: `string` Identifier of the SIM used to send the SMS. + +`manufacturer` +: `string` Manufacturer of the device. + +`model` +: `string` The device model. + +`os` +: `string` The operating system running on the device. + +`os_version` +: `string` Version of the operating system on the device. + +`ip` +: `string` The IP address of the device. + +`geocode` +: `string` The geocode of the device. + +`status` +: `string` The device binding status. diff --git a/llm-content/api/payments/tpap-pro/customer-onboarding/fetch-banks.md b/llm-content/api/payments/tpap-pro/customer-onboarding/fetch-banks.md new file mode 100644 index 00000000..b85da771 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/customer-onboarding/fetch-banks.md @@ -0,0 +1,129 @@ +--- +title: Fetch Banks +description: Fetch banks using the Razorpay TPAP Pro API. +--- + +# Fetch Banks + +## Fetch Banks + +NPCI will maintain the list of all fund source providers connected via a unified interface. A fund source provider is a Bank, Payment Bank, PPI, or any other RBI-regulated entity that is allowed to provide payment (credit/debit) services to individuals and entities. Use this endpoint to fetch banks or fundsource providers. Know more about the [Header information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md#header-information). + +### Request + +```curl: Curl +curl -X GET 'api.rzp..com/v1/upi/tpap/fundsource_providers?skip=0&count=10&refresh=true' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +``` + +### Response + +```json: Response +{ + "entity":"collection", + "count":1, + "items":[ + { + "entity":"upi.fundsource_provider", + "name":"HDFC Bank", + "id":"psp generated id of fundsource provider", + "upi_iin":"600007", + "ifsc":"HDFC0000486", + "upi_enabled":true, + "logo_url":"", + "products":[ + "nfs", + "upi" + ], + "mobile_registration_format":"format1", + "upi_versions_supported":[ + { + "version":"1.0", + "mandatory":false + } + ] + }, + { + "entity":"upi.fundsource_provider", + "name":"ICICI Bank", + "id":"psp generated id of fundsource provider", + "upi_iin":"600008", + "ifsc":"ICIC0000486", + "upi_enabled":true, + "logo_url":"", + "products":[ + "nfs | upi" + ], + "mobile_registration_format":"format1", + "upi_versions_supported":[ + { + "version":"1.0", + "mandatory":false + } + ] + } + ] +} +``` + +### Parameters + +`count` _optional_ +: `integer` Number of entities to fetch. Default is `10`. You can use this parameter for pagination in combination with `count`. + +`skip` _optional_ +: `integer` Number of entities to skip. Default is `0`. You can use this parameter for pagination in combination with `skip`. + +### Parameters + +`entity` +: `string` This refers to the collection of entity. Here, it is `collection`. + +`count` +: `integer` Indicates the number of items in the entity type. + +`items` +: `array` Indicates a list of objects. + + `entity` + : `string` Indicates the entity type name. In this case `fundsource_provider`. + + `name` + : `string` Indicates the fund source name. For example, HDFC bank. + + `upi_iin` + : `string` Indicates the UPI Issuer Identification Numbers (IIN) of the fundsource provider issued by NPCI. + + `ifsc` + : `string` IFSC of the bank. + + `upi_enabled` + : `boolean` Indicates if UPI is enabled for the bank. Possible values: + - `true`: UPI is enabled. + - `false`: UPI is not enabled. + + `logo_url` + : `string` The bank logo URL. + + `products` + : `array` Indicates the list of products supported by the bank separated by a comma. For example, `aeps`, `imps`, `card` and `nfs`. + + `mobile_registration_format` + : `string` Indicates the format as defined by NPCI - format1 and format2. This field is required when setting the UPI PIN. + + `upi_versions_supported` + : `object` UPI version supported details. + + `version` + : `string` The version of UPI supported. Possible values: + - `1.0` + - `2.0` + + `mandatory` + : `boolean` Indicates that the PSP should be live in this version before going live with the next or any child versions. Possible values: + - `true`: PSP is live. + - `false`: PSP is not live. diff --git a/llm-content/api/payments/tpap-pro/customer-onboarding/fetch-fundsources.md b/llm-content/api/payments/tpap-pro/customer-onboarding/fetch-fundsources.md new file mode 100644 index 00000000..7a6d77b7 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/customer-onboarding/fetch-fundsources.md @@ -0,0 +1,178 @@ +--- +title: Fetch Payment Sources +description: Fetch payment sources using the Razorpay TPAP Pro API. +--- + +# Fetch Payment Sources + +## Fetch Payment Sources + +Payment sources are any payment account (Bank Account, PPI, Wallets, Mobile Money, and so on) offered by a regulated entity where money can be held, debited, and credited. Use this endpoint to fetch banks or fundsource providers. After a customer selects a bank, TPAP uses this API to fetch a list of payment sources. Based on the query parameters, the TPAP has the option to get fundsources in real time for NPCI, or get only VPA-linked fundsource or get only fundsources for a particular bank. + +### Request + +```curl: Curl +curl -X GET 'api.rzp..com/v1/upi/tpap/fundsources?refresh=true&linked=true&upi_iin=7078129&skip=0&count=10&device_ip=198.1.1.1&device_geocode=1234.1213' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +``` + +### Response + +```json: Response +{ + "entity":"collection", + "count":1, + "items":[ + { + "id":"fs_1234", + "entity":"upi.fundsource", + "type":"savings", + "customer_name":"Gaurav Kumar", + "masked_account_number":"XXXXXX5199", + "account_reference_number":"999988126236990", + "ifsc":"HDFC000001", + "upi_pin_set":true, + "upi_pin_length":6, + "otp_length":6, + "atm_pin_length":4, + "fundsource_provider":{ + "name":"HDFC Bank", + "upi_iin":"600007", + "upi_enabled":false, + "mobile_registration_format":"format1", + "logo_url":"" + }, + "vpas":{ + "entity":"upi.collection", + "count":1, + "items":[ + { + "mobile":"9999999999", + "address":"vpa@handle", + "status":"active", + "primary":true + } + ] + } + } + ] +} +``` + +### Parameters + +`refresh` _optional_ +: `boolean` Possible values: + - `true`: If set to `true`, data is fetched via NPCI. We recommend passing this as `true` when customers are trying to link their bank accounts. + - `false`: Data stored at PSP is fetched. + +`upi_iin` _mandatory_ +: `string` IIN of the bank returned in the response of the Fetch Fund Source Providers API. Use the IIN of the bank selected by the customer. IIN is not mandatory if this parameter value is `false`. + +`skip` _optional_ +: `integer` Number of entities to skip. Default is `10`. You can use this parameter for pagination in combination with skip. + +`count` _optional_ +: `integer` Number of entities to fetch. Default is `0`. You can use this parameter for pagination in combination with count. + +`device_ip` _optional_ +: `string` IP address of the device. For example, `123.456.123.123`. + +`device_geocode` _optional_ +: `string` Location coordinates of the device. For example, `12.9667,77.5667`. + +### Parameters + +`entity` +: `string` This refers to the collection of entity. Here, it is `collection`. + +`count` +: `integer` Indicates the number of items in the entity type. + +`items` +: `array` Indicates a list of objects. + + `entity` + : `string` Indicates the entity type name. In this case `fundsource`. + + `id` + : `string` A unique identifier of the entity. + + `type` + : `string` Type of account. For example, savings, credit and so on. + + `customer_name` + : `string` Account holder's name. + + `masked_account_number` + : `string` Masked account number. + + `account_reference_number` + : `string` Indicates the account reference number. + + `ifsc` + : `string` IFSC of the bank. + + `upi_pin_set` + : `boolean` Indicates if the UPI PIN is set. Possible values: + - `true`: PIN is set. + - `false`: PIN is not set. + + `upi_pin_length` + : `integer` Indicates the length of the UPI PIN. + + `otp_length` + : `integer` Indicates the length of the OTP. + + `atm_pin_length` + : `integer` Indicates the length of the ATM PIN. + + `fundsource_provider` + : `object` Payment sources provider details. If the payment source is a bank, payment source providers will be bank account information. + + `name` + : `string` Name of the payment source (bank account) provider. + + `upi_iin` + : `string` The UPI Issuer Identification Numbers (IIN) of the payment source provider issued by NPCI. + + `upi_enabled` + : `boolean` Indicates if UPI is enabled. Possible values: + - `true`: UPI is enabled. + - `false`: UPI is not enabled. + + `mobile_registration_format` + : `string` Indicates the format as defined by NPCI - `format1`, `format2` and so on. + + `logo_url` + : `string` Field to take the bank URL input. + + `vpas` + : `array` The collection of the VPAs linked to the payment source. + + `entity` + : `string` The entity type name. Here, it is `collection`. + + `count` + : `integer` Indicates the number of items in the entity type. + + `items` + : `array` UPI details. + + `mobile` + : `string` The mobile number of the VPA linked to the payment source. + + `address` + : `string` The address of the VPA linked to the payment source. + + `status` + : `string` The status of the VPA linked to the payment source. + + `primary` + : `boolean` Indicates if the VPA is linked to the payment source marked as primary. Possible values: + - `true`: VPA is linked to the payment source. + - `false`: VPA is not linked to the payment source. diff --git a/llm-content/api/payments/tpap-pro/customer-onboarding/generate-otp.md b/llm-content/api/payments/tpap-pro/customer-onboarding/generate-otp.md new file mode 100644 index 00000000..2526363e --- /dev/null +++ b/llm-content/api/payments/tpap-pro/customer-onboarding/generate-otp.md @@ -0,0 +1,191 @@ +--- +title: Generate OTP for Payment Source +description: Generate OTP for payment source using the Razorpay TPAP Pro API. +--- + +# Generate OTP for Payment Source + +## Generate OTP for Payment Source + +Use this endpoint to generate the OTP via the remitter bank while setting the UPI PIN. + +### Request + +```curl: Curl +curl -X POST 'api.rzp..com/v1/upi/tpap/fundsources/:id/otp' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "vpa":"vpa@handle", + "card":{ + "last6":"123456", + "expiry_month":"02", + "expiry_year":"26" + }, + "upi_transaction_id":"123456", + "device":{ + "geocode":"1234.1213", + "ip":"198.1.1.1" + } + }' +``` + +### Response + +```json: Response +{ + "entity":"upi.fundsource", + "id":"fs_1234", + "type":"savings", + "customer_name":"name", + "masked_account_number":"xx9987", + "ifsc":"IFSC001", + "upi_pin_set":true, + "upi_pin_length":4, + "otp_length":4, + "atm_pin_length":4, + "fundsource_provider":{ + "name":"HDFC Bank", + "upi_iin":"600007", + "upi_enabled":false, + "mobile_registration_format":"format1", + "logo_url":"" + }, + "vpas":{ + "entity":"collection", + "count":1, + "items":[ + { + "mobile":"9999999999", + "address":"anc@handle", + "status":"active", + "primary":true + } + ] + }, + "upi_transaction_id":"123456" +} +``` + +### Parameters + +`id` +: `string` The payment source identifier generated as a response from the Create VPA API. + +### Parameters + +`vpa` _mandatory_ +: `string` The VPA linked to the payment source. + +`card` _mandatory_ +: `object` The card details. + + `last6` + : `string` The last 6 digits of the card, which the fund source provider will verify before setting the PIN. + + `expiry_month` + : `string` The expiry month of the card in `MM` format. + + `expiry_year` + : `string` The expiry year of the card in `YY` format. + +`upi_transaction_id` _mandatory_ +: `string` The UPI transaction identifier. For example, `123456`. + +`device` _optional_ +: `object` The device details. + + `ip` + : `string` The IP address of the device. + + `geocode` + : `string` The location coordinates of the device. For example, `12.9667,77.5667`. + +### Parameters + +`entity` +: `string` Name of the entity. Here, it is `fundsource`. + +`id` +: `string` Unique identifier of the entity. + +`type` +: `string` Type of account. + +`customer_name` +: `string` Name of the account holder. + +`masked_account_number` +: `string` Masked account number of the customer. + +`ifsc` +: `string` IFSC of the bank. + +`upi_iin` +: `string` UPI Issuer Identification Numbers (iin) of the payment source provider issued by NPCI. + +`upi_pin_set` +: `boolean` Indicates whether the UPI PIN is set. Possible values: + - `true`: UPI PIN is set. + - `false`: UPI PIN is not set. + +`upi_pin_length` +: `integer` Length of the UPI PIN. + +`otp_length` +: `integer` Length of the OTP. + +`atm_pin_length` +: `integer` Length of the ATM PIN. + +`fundsource_provider` +: `object` Payment source provider details. Here, if the payment source is a bank, payment source providers will be bank information. + + `name` + : `string` Name of the payment source. + + `upi_iin` + : `string` UPI Issuer Identification Numbers (upi_iin) of the payment source provider issued by NPCI. + + `upi_enabled` + : `boolean` Indicates whether the provider has UPI enabled. Possible values: + - `true`: UPI is enabled. + - `false`: UPI is not enabled. + + `mobile_registration_format` + : `string` Indicates the format as defined by NPCI - `format1`, `format2` and so on. + + `logo_url` + : `string` The URL of the bank logo. + +`vpas` +: `array` Details of the VPAs linked to the payment source. + + `entity` + : `string` The entity type name. Here, it is `collection`. + + `count` + : `integer` Indicates the number of items in the entity type. + + `items` + : `object` VPA details. + + `mobile` + : `string` The mobile number of the VPA linked to the payment source. + + `address` + : `string` The address of the VPA linked to the payment source. + + `status` + : `string` The status of the VPA linked to the payment source. + + `primary` + : `boolean` Indicates if the VPA linked to the payment source marked as primary. + - `true`: VPA is linked to the payment source. + - `false`: VPA is not linked to the payment source. + +`upi_transaction_id` +: `string` Transaction ID of the outgoing request to gateway. diff --git a/llm-content/api/payments/tpap-pro/customer-onboarding/get-npci-token.md b/llm-content/api/payments/tpap-pro/customer-onboarding/get-npci-token.md new file mode 100644 index 00000000..02e2c03d --- /dev/null +++ b/llm-content/api/payments/tpap-pro/customer-onboarding/get-npci-token.md @@ -0,0 +1,50 @@ +--- +title: Get the NPCI Token +description: Get the NPCI token using the Razorpay TPAP Pro API. +--- + +# Get the NPCI Token + +## Get the NPCI Token + +Use this endpoint to get the NPCI token. + +### Request + +```curl: Request +curl -X POST 'api.rzp..com/v1/upi/tpap/devices/token' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "upi_transaction_id": "123qwert12", + "challenge": "challenge received from CL" +}' +``` + +### Response + +```json: Response +{ + "mobile": "string", + "token": "string" +} +``` + +### Parameters + +`upi_transaction_id` _mandatory_ +: `string` The unique identifier of the transaction across all UPI entities created by the originator. + +`challenge` _mandatory_ +: `string` TPAP when executing **Get Challenge** in CL to receive a challenge from the common library. You can fetch the NPCI token using this challenge. + +### Parameters + +`token` +: `string` The NPCI token received for the challenge. TPAP uses this token to register the application and communicate securely with CL and NPCI. + +`mobile` +: `string` The mobile number of the customer. diff --git a/llm-content/api/payments/tpap-pro/customer-onboarding/set-reset-upi-pin.md b/llm-content/api/payments/tpap-pro/customer-onboarding/set-reset-upi-pin.md new file mode 100644 index 00000000..fff69b0b --- /dev/null +++ b/llm-content/api/payments/tpap-pro/customer-onboarding/set-reset-upi-pin.md @@ -0,0 +1,199 @@ +--- +title: Set Or Reset UPI PIN +description: Set or reset UPI PIN using the Razorpay TPAP Pro API. +--- + +# Set Or Reset UPI PIN + +## Set Or Reset UPI PIN + +Customer’s card details and OTP are required to set or reset UPI PIN. These details are validated at the payment source provider’s (bank) end before allowing to set the PIN. Use this endpoint to generate the OTP via the remitter bank while setting the UPI PIN. + +### Request + +```curl: Curl +curl -X POST 'api.rzp..com/v1/upi/tpap/fundsources/:id/upi_pin?expand[]=vpas' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "action":"set", + "upi_credentials":{ + // credentials received from CL + }, + "upi_transaction_id":"123qwert12", + "vpa":"abc@upiexample", + "card":{ + "last6":"123456", + "expiry_month":"02", + "expiry_year":"26" + }, + "device":{ + "geocode":"1234.1213", + "ip":"198.1.1.1" + } + }' +``` + +### Response + +```json: Response +{ + "entity":"upi.fundsource", + "id":"fs_1234", + "type":"savings", + "customer_name":"name", + "masked_account_number":"xx9987", + "ifsc":"IFSC001", + "upi_pin_set":true, + "upi_pin_length":4, + "otp_length":4, + "atm_pin_length":4, + "fundsource_provider":{ + "name":"HDFC Bank", + "upi_iin":"600007", + "upi_enabled":false, + "mobile_registration_format":"FORMAT1", + "logo_url":"" + }, + "vpas":{ + "entity":"collection", + "count":1, + "items":[ + { + "mobile":"9999999999", + "address":"anc@handle", + "status":"active", + "primary":true + } + ] + } +} +``` + +### Parameters + +`id` +: `string` The payment source identifier. + +### Parameters + +`action` _mandatory_ +: `enum` Indicates whether the action is a set or reset. Both set and reset happen from the same API, so we should specify the action to distinguish between them. Possible values: + - `set` + - `reset` + +`upi_credentials` _mandatory_ +: `string` The encrypted UPI PIN. NPCI credentials is the output from the WebCL page. + +`upi_transaction_id` _mandatory_ +: `string` The unique identifier of the transaction across all entities, created by the originator. + +`card` _mandatory_ +: `object` Card details. + + `last6` + : `string` Last 6 digits of the card which the fundsource provider will verify before setting the PIN. + + `expiry_month` + : `string` Expiry month of the card in `MM` format. + + `expiry_year` + : `string` Expiry year of the card in `YY` format. + +`vpa` _mandatory_ +: `string` VPA of the customer for which the PIN is set. + +`device` _optional_ +: `string` Device details. + + `ip` + : `string` The IP address of the device. + + `geocode` + : `string` The location coordinates of the device. For example, `12.9667,77.5667`. + +### Parameters + +`entity` +: `string` Name of the entity. Here, it is `fundsource`. + +`id` +: `string` Unique identifier of the entity. + +`type` +: `string` Type of account. + +`customer_name` +: `string` Name of the account holder. + +`masked_account_number` +: `string` Masked account number. + +`ifsc` +: `string` IFSC of the bank. + +`upi_iin` +: `string` UPI Issuer Identification Numbers (iin) of the payment source provider issued by NPCI. + +`upi_pin_set` +: `boolean` Indicates whether the UPI PIN is set. Possible values: + - `true`: UPI PIN is set. + - `false`: UPI PIN is not set. + +`upi_pin_length` +: `integer` Length of the UPI PIN. + +`otp_length` +: `integer` Length of the OTP. + +`atm_pin_length` +: `integer` Length of the ATM PIN. + +`fundsource_provider` +: `object` Payment source provider details. Here, if the payment source is a bank, payment source providers will be bank information. + + `name` + : `string` Name of the payment source. + + `upi_iin` + : `string` UPI Issuer Identification Numbers (upi_iin) of the payment source provider issued by NPCI. + + `upi_enabled` + : `boolean` Indicates whether the provider has UPI enabled. Possible values: + - `true`: UPI is enabled. + - `false`: UPI is not enabled. + + `mobile_registration_format` + : `string` Indicates the format as defined by NPCI - `format1`, `format2` and so on. + + `logo_url` + : `string` The URL of the bank logo. + +`vpas` +: `array` Details of the VPAs linked to the payment source. + + `entity` + : `string` The entity type name. Here, it is `collection`. + + `count` + : `integer` Indicates the number of items in the entity type. + + `items` + : `object` VPA details. + + `mobile` + : `string` The mobile number of the VPA linked to the payment source. + + `address` + : `string` The address of the VPA linked to the payment source. + + `status` + : `string` The status of the VPA linked to the payment source. + + `primary` + : `boolean` Indicates if the VPA linked to the payment source marked as primary. + - `true`: VPA is linked to the payment source. + - `false`: VPA is not linked to the payment source. diff --git a/llm-content/api/payments/tpap-pro/customer-onboarding/verification-token.md b/llm-content/api/payments/tpap-pro/customer-onboarding/verification-token.md new file mode 100644 index 00000000..10188cfc --- /dev/null +++ b/llm-content/api/payments/tpap-pro/customer-onboarding/verification-token.md @@ -0,0 +1,124 @@ +--- +title: Get a Mobile Number Verification Token +description: Get a mobile number verification token using the Razorpay API. +--- + +# Get a Mobile Number Verification Token + +## Get a Mobile Number Verification Token + +Use this endpoint to get a mobile number verification token. + +### Request + +```curl: Request +curl -X POST 'api.rzp..com/v1/upi/tpap/mobile/verification' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-customer-reference: 919999999999" \ +-d '{ + "device":{ + "uuid":"", + "app":"app.merchant.upi.com", + "ssid":"123456789", + "manufacturer":"samsung", + "model":"Galaxy S23", + "os":"android", + "os_version":"Dev12345", + "ip":"ip of the device", + "geocode":"geographical code of the device" + }, + "verification_type":"sms", + "mobile":"91999999999", + "network_provider":"vodafone" +}' +``` + +### Response + +```json: Response +{ + "verification_type":"sms", + "sms":{ + "content":"UPIACT ad56ef90396348bac56099", + "receiver_number":[ + { + "network_provider":"vodafone", + "mobile":"09988776655" + }, + { + "network_provider":"airtel", + "mobile":"09876543210" + } + ] + }, + "expire_at":1715836058 +} +``` + +### Parameters + +`customer_reference` _mandatory_ +: `string` The unique identifier the merchant has created for the customer. This should be passed as a header. Know more about [headers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md#header-information). + +`device` _mandatory_ +: `object` The device details. + + `uuid` + : `string` The unique identifier of the device. For example, `advertising_id`. + + `app` + : `string` The package name for the app. + + `ssid` + : `string` The service set identifier (unique network identifier). + + `manufacturer` + : `string` The phone manufacturer. + + `model` + : `string` The phone model. For example, `Galaxy S23`. + + `os` + : `string` The operating system running on the device. + + `os_version` + : `string` The version of the operating system. + + `ip` + : `string` IP address of the device. + + `geocode` + : `string` The geocode of the device. + +`verification_type` _mandatory_ +: `string` The verification type. Possible value is `sms`. + +`mobile` _mandatory_ +: `string` The mobile number. + +`network_provider` _mandatory_ +: `string` Network provider on the selected mobile number. + +### Parameters + +`verification_type` +: `string` The verification type. + +`sms` +: `object` Details required for verification via SMS. + + `content` + : `string` The SMS token sent through customer's phone to verify the mobile number. + + `receiver_number` + : `list` Contains the data for receiver numbers to whom the SMS content should be sent to for verifying the mobile. + + `network_provider` + : `string` Information about the network provider who verifies the mobile number. + + `mobile` + : `string` The number of the network provider the SMS is sent to verify the mobile number. + +`expire_at` +: `string` The expiry time of the verification request in UNIX timestamp. diff --git a/llm-content/api/payments/tpap-pro/customer-onboarding/vpa-availability.md b/llm-content/api/payments/tpap-pro/customer-onboarding/vpa-availability.md new file mode 100644 index 00000000..ac60de1f --- /dev/null +++ b/llm-content/api/payments/tpap-pro/customer-onboarding/vpa-availability.md @@ -0,0 +1,56 @@ +--- +title: Check VPA Availability +description: Check if VPA is available using the Razorpay TPAP Pro API. +--- + +# Check VPA Availability + +## Check VPA Availability + +Use this endpoint to check if the VPA is available. If available, you can link it to the payment source. Otherwise, try searching for another available VPA before linking it. + +The default VPA logic is (mobile number)@handle. For example, `9000090000@airtelbank`. Multiple TPAPs can use the same logic. Hence, the requested VPA may be not available. Therefore, we need to expose a functionality to check whether a VPA is available. + +### Request + +```curl: Curl +curl -X GET 'api.rzp..com/v1/upi/tpap/vpa/available' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "vpa": "customer@handle" + }' +``` + +### Response + +```json: Response +{ + "available":true, + "mobile":"919999999999", + "vpa_suggestions":[ + "sample@vpa" + ] +} +``` + +### Parameters + +`vpa` _mandatory_ +: `string` The VPA. You must generate this VPA for customers and check if it is available before trying to link it to the payment source (bank account). + +### Parameters + +`available` +: `boolean` Indicates whether the VPA is available. Possible values: + - `true`: VPA is available. + - `false`: VPA is not available. + +`mobile` +: `string` Mobile number of the customer. + +`vpa_suggestions` +: `array` List of VPA suggestions. diff --git a/llm-content/api/payments/tpap-pro/funds-account-management.md b/llm-content/api/payments/tpap-pro/funds-account-management.md new file mode 100644 index 00000000..33a03d35 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/funds-account-management.md @@ -0,0 +1,45 @@ +--- +title: Accounts Management +description: Know about funds and accounts management and list of endpoints. +--- + +# Accounts Management + +Razorpay's TPAP Pro - Funds and Accounts Management APIs let you add more accounts, delete existing accounts, and change PINs for accounts for hassle-free transactions. + + + + Below are the steps to integrate TPAP Pro. You can also refer to our comprehensive [TPAP Pro integration guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md). + +1. [Customer Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/customer-onboarding.md) +2. Manage Funds and Account +3. [Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/payments-flow.md) +4. [Mandates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/mandate-flow.md) +5. [Complaints](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/complaints-flow.md) +6. [UPI Numbers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/upi-number.md) +7. [UPI Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/fundsource-lite.md) + +### Related Guides + +[About TPAP Pro](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro.md) +[Integrate With TPAP Pro](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md) + +### Endpoints + +- **patch** `/v1/upi/tpap/fundsources/:id/upi_pin?expand[]=vpas` - Change UPI PIN: + Changes the UPI PIN. + +- **patch** `/v1/upi/tpap/vpa` - Set the Primary Payment Source: + Sets the primary payment source. + +- **post** `/v1/upi/tpap/fundsources/:fundsource_id/balance` - Check Balance of a Payment Source: + Checks the balance of the payment source. + +- **post** `/v1/upi/tpap/devices/deregister` - De-register Devices: + De-registers the device. + +- **get** `/v1/upi/tpap/vpas?status=”active”&skip=0&count=10` - Fetch VPAs: + Retrieves the list of VPAs. + +- **delete** `/v1/upi/tpap/vpa?vpa=anitha@okhdfcbank` - Delete VPAs: + Checks if the VPA is available. diff --git a/llm-content/api/payments/tpap-pro/funds-account-management/change-pin.md b/llm-content/api/payments/tpap-pro/funds-account-management/change-pin.md new file mode 100644 index 00000000..f44e7fbf --- /dev/null +++ b/llm-content/api/payments/tpap-pro/funds-account-management/change-pin.md @@ -0,0 +1,181 @@ +--- +title: Change UPI PIN +description: Change UPI PIN using the Razorpay TPAP Pro API. +--- + +# Change UPI PIN + +## Change UPI PIN + +Use this endpoint to change the UPI PIN. + +> **WARN** +> +> +> **Watch Out!** +> +> The user should remember the current PIN. +> + +### Request + +```curl: Curl +curl -X PATCH 'api.rzp..com/v1/upi/tpap/fundsources/:id/upi_pin?expand[]=vpas' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "upi_transaction_id":"123qwert12", + "upi_credentials":{ + // credentials received from WebCL + }, + "vpa":"abc@upiexample", + "device":{ + "geocode":"1234.1213", + "ip":"198.1.1.1" + } + }' +``` + +### Response + +```json: Response +{ + "entity":"upi.fundsource", + "id":"fs_1234", + "type":"savings", + "customer_name":"name", + "masked_account_number":"xx9987", + "ifsc":"IFSC001", + "upi_pin_set":true, + "upi_pin_length":4, + "otp_length":4, + "atm_pin_length":4, + "fundsource_provider":{ + "name":"HDFC Bank", + "upi_iin":"600007", + "upi_enabled":false, + "mobile_registration_format":"format1", + "logo_url":"" + }, + "vpas":{ + "entity":"collection", + "count":1, + "items":[ + { + "mobile":"9999999999", + "address":"anc@handle", + "status":"active", + "primary":true + } + ] + } +} +``` + +### Parameters + +`id` +: `string` The payment source identifier. + +### Parameters + +`upi_credentials` _mandatory_ +: `string` The encrypted UPI PIN. NPCI credentials is the output from the WebCL page. + +`upi_transaction_id` _mandatory_ +: `string` The unique identifier of the transaction across all entities, created by the originator. + +`device` _optional_ +: `string` Device details. + + `ip` + : `string` The IP address of the device. + + `geocode` + : `string` The location coordinates of the device. For example, `12.9667,77.5667`. + +### Parameters + +`entity` +: `string` Name of the entity. Here, it is `fundsource`. + +`id` +: `string` Unique identifier of the entity. + +`type` +: `string` Type of account. + +`customer_name` +: `string` Name of the account holder. + +`masked_account_number` +: `string` Masked account number of the customer. + +`ifsc` +: `string` IFSC of the bank. + +`upi_iin` +: `string` UPI Issuer Identification Numbers (iin) of the payment source provider issued by NPCI. + +`upi_pin_set` +: `boolean` Indicates whether the UPI PIN is set. Possible values: + - `true`: UPI PIN is set. + - `false`: UPI PIN is not set. + +`upi_pin_length` +: `integer` Length of the UPI PIN. + +`otp_length` +: `integer` Length of the OTP. + +`atm_pin_length` +: `integer` Length of the ATM PIN. + +`fundsource_provider` +: `object` Payment source provider details. Here, if the payment source is a bank, payment source providers will be bank information. + + `name` + : `string` Name of the payment source. + + `upi_iin` + : `string` UPI Issuer Identification Numbers (upi_iin) of the payment source provider issued by NPCI. + + `upi_enabled` + : `boolean` Indicates whether the provider has UPI enabled. Possible values: + - `true`: UPI is enabled. + - `false`: UPI is not enabled. + + `mobile_registration_format` + : `string` Indicates the format as defined by NPCI - `format1`, `format2` and so on. + + `logo_url` + : `string` The URL of the bank logo. + +`vpas` +: `array` Details of the VPAs linked to the payment source. + + `entity` + : `string` The entity type name. Here, it is `collection`. + + `count` + : `integer` Indicates the number of items in the entity type. + + `items` + : `object` VPA details. + + `mobile` + : `string` The mobile number of the VPA linked to the payment source. + + `address` + : `string` The address of the VPA linked to the payment source. + + `status` + : `string` The status of the VPA linked to the payment source. + + `primary` + : `boolean` Indicates if the VPA linked to the payment source marked as primary. + - `true`: VPA is linked to the payment source. + - `false`: VPA is not linked to the payment source. diff --git a/llm-content/api/payments/tpap-pro/funds-account-management/check-balance.md b/llm-content/api/payments/tpap-pro/funds-account-management/check-balance.md new file mode 100644 index 00000000..a4b34433 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/funds-account-management/check-balance.md @@ -0,0 +1,102 @@ +--- +title: Check Balance of a Payment Source +description: Check balance of a payment source using the Razorpay TPAP Pro API. +--- + +# Check Balance of a Payment Source + +## Check Balance of a Payment Source + +Use this endpoint to check the balance of a payment source. + +### Request + +```curl: Curl +curl -X POST 'api.rzp..com/v1/upi/tpap/fundsources/:fundsource_id/balance' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "upi_credentials":{ + // credentials received from WebCL + }, + "upi_transaction_id":"123qwert12", + "vpa":"abc@upiexample", + "device":{ + "geocode":"1234.1213", + "ip":"198.1.1.1" + } + }' +``` + +### Response + +```json: Response +{ + "entity":"upi.fundsource.balance", + "fundsource_id":"string", + "currency":"string", + "amount":"80000", + "customer_reference":"SKALq2p", + "upi_transaction_id":"TxnSLALQPl", + "vpa":"string", + "masked_account_number":"XXXXXXXXX1234", + "upi_iin":"12MWKO02" +} +``` + +### Parameters + +`fundsource_id` _mandatory_ +: `string` The unique identifier of the payment source. + +### Parameters + +`upi_credentials` _mandatory_ +: `string` The encrypted UPI PIN. NPCI credentials is the output from the WebCL page. + +`upi_transaction_id` _mandatory_ +: `string` The unique identifier of the transaction across all entities, created by the originator. + +`vpa` _mandatory_ +: `string` The VPA of the customer requesting the balance. + +`device` _optional_ +: `object` Device details. + + `ip` + : `string` The IP address of the device. + + `geocode` + : `string` The location coordinates of the device. For example, `12.9667,77.5667`. + +### Parameters + +`entity` +: `string` Name of the entity. + +`fundsource_id` +: `string` Unique identifier of the payment source. + +`currency` +: `string` Currency of the balance. + +`amount` +: `string` The amount in the lowest denomination of the currency. + +`customer_reference` +: `string` The customer reference that requested the balance. + +`upi_transcation_id` +: `string` The transaction ID that brought the balance. + +`vpa` +: `string` The VPA of the customer. + +`masked_account_number` +: `string` The masked account number of the customer. + +`upi_iin` +: `string` UPI Issuer Identification Numbers (upi_iin) of the payment source provider issued by NPCI. diff --git a/llm-content/api/payments/tpap-pro/funds-account-management/delete-vpas.md b/llm-content/api/payments/tpap-pro/funds-account-management/delete-vpas.md new file mode 100644 index 00000000..260841cc --- /dev/null +++ b/llm-content/api/payments/tpap-pro/funds-account-management/delete-vpas.md @@ -0,0 +1,177 @@ +--- +title: Delete VPAs +description: Delete VPAs using the Razorpay TPAP Pro API. +--- + +# Delete VPAs + +## Delete VPAs + +Use this endpoint to delete a VPA of a customer. + +### Request + +```curl: Curl +curl -X DELETE 'api.rzp..com/v1/upi/tpap/vpa?vpa=gaurav@okhdfcbank' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +``` + +### Response + +```json: Response +{ + "entity":"upi.vpa", + "customer_reference":"PXYZ", + "vpa":"gaurav@okhdfcbank", + "status":"deleted", + "mobile":"999999999", + "fundsources_unlinked":{ + "entity":"collection", + "count":2, + "items":[ + { + "id":"dummyfs1111111", + "customer_name":"kunal1", + "masked_account_number":"xxxxxx8990", + "account_reference_number":"999988126236990", + "type":"savings", + "ifsc":"SBI00001", + "upi_pin_set":true, + "upi_pin_length":4, + "otp_length":4, + "atm_pin_length":6, + "fundsource_provider":{ + "name":"HDFC Bank", + "upi_iin":"600007", + "upi_enabled":false, + "mobile_registration_format":"format1", + "logo_url":"" + }, + "primary":true + }, + { + "id":"dummyfs1111111", + "customer_name":"kunal1", + "masked_account_number":"xxxxxx8990", + "account_reference_number":"999988126236990", + "type":"savings", + "ifsc":"SBI00001", + "upi_pin_set":true, + "upi_pin_length":4, + "otp_length":4, + "atm_pin_length":6, + "fundsource_provider":{ + "name":"HDFC Bank", + "upi_iin":"600007", + "upi_enabled":false, + "mobile_registration_format":"format2", + "logo_url":"" + }, + "primary":true + } + ] + } +} +``` + +### Parameters + +`vpa` _mandatory_ +: `string` The VPA that should be deleted. + +### Parameters + +`entity` +: `string` This refers to the collection of entity. Here, it is `vpa`. + +`customer_reference` +: `string` The customer identifier. + +`vpa` +: `string` This is the VPA which needs to be de-linked. + +`status` +: `enum` Status of the action. Possible value is `deleted` if the VPA is deleted. + +`mobile` +: `string` The mobile number of the customer. + +`fundsources_unlinked` +: `array` The unlinked payment source details. + + `entity` + : `string` The entity type. + + `count` + : `integer` Indicates number of item in the entity type. + + `items` + : `object` The items object. + + `id` + : `string` The unique identifier of the payment source. + + `customer_name` + : `string` Name of the customer. + + `masked_account_number` + : `string` The masked account number of the payment source. + + `account_reference_number` + : `string` The account reference number of the payment source. + + `type` + : `enum` Type of the payment source. Possible values: + - `savings` + - `current` + - `non_resident_ordinary` + - `non_resident_external` + - `secured_overdraft` + - `credit` + - `ppi` + + `ifsc` + : `string` IFSC of the payment source. + + `upi_pin_set` + : `boolean` Indicates if the UPI PIN is set for payment source. Possible values: + - `true`: UPI PIN is set. + - `false`: UPI PIN is not set. + + `upi_pin_length` + : `integer` Indicates the length of the UPI PIN allowed for the payment source. + + `otp_length` + : `integer` Indicates the length of the OTP allowed for the payment source. + + `atm_pin_length` + : `integer` Indicates the length of the ATM PIN allowed for the payment source. + + `fundsource_provider` + : `object` The payment source provider details. + + `upi_iin` + : `string` The UPI Issuer Identification Numbers (iin) of the payment source provider issued by NPCI. + + `name` + : `string` Name of the payment source (bank account) provider. + + `upi_enabled` + : `boolean` Indicates if the provider has UPI enabled. Possible values: + - `true`: UPI is enabled. + - `false`: UPI is not enabled. + + `mobile_registration_format` + : `string` The format as defined by NPCI - `format1`, `format2` and so on. + + `logo_url` + : `string` The URL of the bank logo. + + `primary` + : `boolean` Indicates if the VPA is linked to the payment source marked as primary. Possible values: + - `true`: VPA is linked to the payment source. + - `false`: VPA is not linked to the payment source. diff --git a/llm-content/api/payments/tpap-pro/funds-account-management/deregister-device.md b/llm-content/api/payments/tpap-pro/funds-account-management/deregister-device.md new file mode 100644 index 00000000..62e815d1 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/funds-account-management/deregister-device.md @@ -0,0 +1,98 @@ +--- +title: De-register Devices +description: De-register devices using the Razorpay TPAP Pro API. +--- + +# De-register Devices + +## De-register Devices + +TPAP should de-register the device at Razorpay's end by calling this API whenever the customer removes the SIM from their mobile application. It can also be used in general to de-register the device. On de-registration, the customer's device binding, all VPAs, all fund sources, and their mappings are deleted. Use this endpoint to de-register the device. + +### Request + +```curl: Curl +curl -X POST 'api.rzp..com/v1/upi/tpap/devices/deregister' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "uuid":"", + "app":"test.merchant.upi.com", + "ssid":"123456789", + "manufacturer":"samsung", + "model":"Galaxy S23", + "os":"android", + "os_version":"Dev12345" + }' +``` + +### Response + +```json: Response +{ + "status": "device_deregistered", + "mobile": "987654321", + "uuid": "", + "app": "test.merchant.upi.com", + "ssid": "123456789", + "manufacturer": "samsung", + "model": "Galaxy S23", + "os": "android", + "os_version": "Dev12345" +} + +``` + +### Parameters + +`uuid` _mandatory_ +: `string ` The unique identifier of the device. For example, `advertising_id` or `android_id`. + +`app` _mandatory_ +: `string` The application package name. + +`ssid` _mandatory_ +: `string` The SIM identifier. + +`manufacturer` _mandatory_ +: `string` The device manufacturer. + +`model` _mandatory_ +: `string` The model of the device. + +`os` _mandatory_ +: `string` The operating system running on the device. + +`os_version` _mandatory_ +: `string` The version of the operating system. + +### Parameters + +`status` +: `enum` Status of the de-registration. Possible values: + - `device_deregistered` + - `device_deregisteration_failed` + +`uuid` +: `string` The unique identifier of the device. For example, `advertising_id` or `android_id`. + +`app` +: `string` The application package name. + +`ssid` +: `string` The SIM identifier. + +`manufacturer` +: `string` The phone manufacturer. + +`model` +: `string` The model of the phone. + +`os` +: `string` The operating system running on the device. + +`os_version` +: `string` The version of the operating system on the device. diff --git a/llm-content/api/payments/tpap-pro/funds-account-management/fetch-vpas.md b/llm-content/api/payments/tpap-pro/funds-account-management/fetch-vpas.md new file mode 100644 index 00000000..5be84d28 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/funds-account-management/fetch-vpas.md @@ -0,0 +1,182 @@ +--- +title: Fetch VPAs +description: Fetch VPAs using the Razorpay TPAP Pro API. +--- + +# Fetch VPAs + +## Fetch VPAs + +Use this endpoint to fetch all VPAs of a customer. + +### Request + +```curl: Curl +curl -X GET 'api.rzp..com/v1/upi/tpap/vpas?status=”active”&skip=0&count=10' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +``` + +### Response + +```json: Response +{ + "entity":"collection", + "count":1, + "items":[ + { + "id":"id", + "entity":"vpa", + "mobile":"999999999", + "address":"kunal-1@rzpa", + "status":"active", + "fundsources":{ + "entity":"collection", + "count":2, + "items":[ + { + "id":"dummyfs1111111", + "customer_name":"kunal1", + "masked_account_number":"xxxxxx8990", + "account_reference_number":"999988126236990", + "type":"savings", + "ifsc":"SBI00001", + "upi_pin_set":true, + "upi_pin_length":4, + "otp_length":4, + "atm_pin_length":6, + "fundsource_provider":{ + "name":"HDFC Bank", + "upi_iin":"600007", + "upi_enabled":false, + "mobile_registration_format":"format1", + "logo_url":"" + }, + "primary":true + } + ] + } + } + ] +} +``` + +### Parameters + +`status` _optional_ +: `enum` Indicates the VPA and payment source linking status. Possible values: + - `active` + - `inactive` + +`skip` _optional_ +: `integer` The number of entities to skip. Default is `0`. You can use this parameter for pagination in combination with skip. + +`count` _optional_ +: `integer` The number of entities to fetch. Default is `10`. You can use this for pagination in combination with count. + +### Parameters + +`entity` +: `string` This refers to the collection of entity. Here, it is `collection`. + +`count` +: `integer` Indicates the number of items in the entity type. + +`items` +: `array` Indicates a list of objects. + + `id` + : `string` A unique identifier of the entity. + + `entity` + : `string` Name of the entity. + + `mobile` + : `string` The mobile number of customer. + + `address` + : `string` The address of the customer. + + `status` + : `string` The status of the VPA linked to the payment source. Possible values: + - `active` + - `inactive` + + `fundsources` + : `object` Payment source details. + + `entity` + : `string` The entity type. + + `count` + : `integer` Indicates number of item in the entity type. + + `items` + : `object` The items object. + + `id` + : `string` The unique identifier of the payment source. + + `customer_name` + : `string` Name of the customer. + + `masked_account_number` + : `string` The masked account number. + + `account_reference_number` + : `string` The account reference number. + + `type` + : `enum` Type of the payment source. Possible values: + - `savings` + - `current` + - `non_resident_ordinary` + - `non_resident_external` + - `secured_overdraft` + - `credit` + - `ppi` + + `ifsc` + : `string` IFSC of the payment source. + + `upi_pin_set` + : `boolean` Indicates if the UPI PIN is set for payment source. Possible values: + - `true`: UPI PIN is set. + - `false`: UPI PIN is not set. + + `upi_pin_length` + : `integer` Indicates the length of the UPI PIN allowed for the payment source. + + `otp_length` + : `integer` Indicates the length of the OTP allowed for the payment source. + + `atm_pin_length` + : `integer` Indicates the length of the ATM PIN allowed for the payment source. + + `fundsource_provider` + : `object` The payment source provider details. + + `upi_iin` + : `string` The UPI Issuer Identification Numbers (IIN) of the payment source provider issued by NPCI. + + `name` + : `string` Name of the payment source (bank account) provider. + + `upi_enabled` + : `boolean` Indicates if the provider has UPI enabled. Possible values: + - `true`: UPI is enabled. + - `false`: UPI is not enabled. + + `mobile_registration_format` + : `string` The format as defined by NPCI - `format1`, `format2` and so on. + + `logo_url` + : `string` The URL of the bank logo. + + `primary` + : `boolean` Indicates if the VPA is linked to the payment source marked as primary. Possible values: + - `true`: VPA is linked to the payment source. + - `false`: VPA is not linked to the payment source. diff --git a/llm-content/api/payments/tpap-pro/funds-account-management/set-primary-payment-source.md b/llm-content/api/payments/tpap-pro/funds-account-management/set-primary-payment-source.md new file mode 100644 index 00000000..3e2da9e9 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/funds-account-management/set-primary-payment-source.md @@ -0,0 +1,186 @@ +--- +title: Set the Primary Payment Source +description: Set the primary payment source using the Razorpay TPAP Pro API. +--- + +# Set the Primary Payment Source + +## Set the Primary Payment Source + +Use this endpoint to set the primary payment source for the VPA. + +### Request + +```curl: Curl +curl -X PATCH 'api.rzp..com/v1/upi/tpap/vpa' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "vpa": "customer@handle", + "primary_fundsource_id": "fs_1234" + }' +``` + +### Response + +```json: Response +{ + "entity":"upi.vpa", + "customer_reference":"cust_1234", + "mobile":"999999999", + "address":"kunal-1@rzpa", + "status":"active", + "fundsources":{ + "entity":"collection", + "count":2, + "items":[ + { + "id":"fs_1234", + "customer_name":"kunal1", + "masked_account_number":"xxxxxx8990", + "account_reference_number":"999988126236990", + "type":"savings", + "ifsc":"SBI00001", + "upi_pin_set":true, + "upi_pin_length":4, + "otp_length":4, + "atm_pin_length":6, + "fundsource_provider":{ + "name":"HDFC Bank", + "upi_iin":"600007", + "upi_enabled":false, + "mobile_registration_format":"format1", + "logo_url":"" + }, + "primary":true + }, + { + "id":"dummyfs1111112", + "customer_name":"kunal1", + "masked_account_number":"xxxxxx8990", + "account_reference_number":"999988126236990", + "type":"savings", + "ifsc":"SBI00001", + "upi_pin_set":true, + "upi_pin_length":4, + "otp_length":4, + "atm_pin_length":6, + "fundsource_provider":{ + "name":"HDFC Bank", + "upi_iin":"600007", + "upi_enabled":false, + "mobile_registration_format":"format1", + "logo_url":"" + }, + "primary":false + } + ] + } +} +``` + +### Parameters + +`vpa` _mandatory_ +: `string ` The VPA whose link needs to be updated. + +`primary_fundsource_id` _mandatory_ +: `string` The unique identifier of the payment source. + +### Parameters + +`entity` +: `string` This refers to the collection of entity. Here, it is `vpa`. + +`customer_reference` +: `string` The customer identifier. Pass this parameter at the TPAP end in this attribute. + +`mobile` +: `string` The mobile number of the VPA linked to the payment source. + +`address` +: `string` The VPA of the customer. + +`status` +: `enum` Indicates the VPA and payment source linking status. Possible values: + - `active` + - `inactive` + +`fundsources` +: `object` The payment source details. + + `entity` + : `string` The type of entity. + + `count` + : `integer` Indicates the number of item in the entity. + + `items` + : `object` The payment source object. + + `id` + : `string` Unique identifier of the payment source. + + `customer_name` + : `string` Name of the customer. + + `masked_account_number` + : `string` Masked account number of the payment source. + + `account_reference_number` + : `string` Account reference number of the payment source. + + `type` + : `enum` Type of the payment source. Possible values: + - `savings` + - `current` + - `non resident ordinary` + - `non resident external` + - `secured overdraft` + - `credit` + - `ppi` + + `ifsc` + : `string` IFSC of the payment source. + + `fundsource_provider` + : `object` The payment source provider details. + + `upi_iin` + : `string` The UPI Issuer Identification Numbers (iin) of the payment source provider issued by NPCI. + + `name` + : `string` Name of the payment source provider. + + `upi_enabled` + : `boolean` Indicates if the payment source provider has UPI enabled. + - `true`: UPI enabled. + - `false`: UPI not enabled. + + `mobile_registration_format` + : `string` Field to take the bank URL input. + + `logo_url` + : `string` The URL of the bank logo. + + `upi_pin_set` + : `boolean` Indicates if UPI PIN is set for payment source. Possible values: + - `true`: UPI PIN is set. + - `false`: UPI PIN is not set. + + `upi_pin_length` + : `integer` The length of the UPI PIN allowed for payment source. + + `otp_length` + : `integer` The length of the OTP PIN allowed for payment source. + + `atm_pin_length` + : `integer` The ATM PIN length allowed for payment source. + + `primary` + : `boolean` Indicates if vpa-payment source link is primary. + - `true`: VPA is linked to the payment source. + - `false`: VPA is not linked to the payment source. diff --git a/llm-content/api/payments/tpap-pro/fundsource-lite.md b/llm-content/api/payments/tpap-pro/fundsource-lite.md new file mode 100644 index 00000000..56489be7 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/fundsource-lite.md @@ -0,0 +1,43 @@ +--- +title: UPI Lite +description: Know how to activate, top-up, pay, deregister, and manage UPI Lite accounts using APIs. +--- + +# UPI Lite + +Razorpay TPAP Pro UPI Lite APIs let you create and manage UPI Lite accounts for low-value transactions. You can register, top up, make payments, deregister, and fetch details for UPI Lite accounts via APIs. + +Below are the steps to integrate and manage complaints with TPAP Pro. You can also refer to our comprehensive [TPAP Pro integration guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md). + +1. [Customer Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/customer-onboarding.md) +2. [Manage Funds and Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/funds-account-management.md) +3. [Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/payments-flow.md) +4. [Mandates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/mandate-flow.md) +5. [Complaints](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/complaints-flow.md) +6. [UPI Numbers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/upi-number.md) +7. UPI Lite + +### Related Guides + +[About TPAP Pro](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro.md) +[Integrate With TPAP Pro](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md) + +### Endpoints + +- **post** `/v1/upi/tpap/fundsource_lite` - Register Fundsource Lite: +Activates a UPI Lite account for a fundsource. + +- **post** `/v1/upi/tpap/payments/pay` - Top-Up Fundsource Lite: +Adds money to the Lite account using a fundsource. + +- **post** `/v1/upi/tpap/payments/pay` - Make Payment via Fundsource Lite: +Initiates a payment from a Fundsource Lite account to a VPA. + +- **post** `/v1/upi/tpap/fundsource_lite/:liteId/deregister` - Deregister Fundsource Lite (With Balance): +Moves the balance back to the user’s account and deregisters the Lite account. + +- **delete** `/v1/upi/tpap/fundsource_lite/:liteId/deregister` - Deregister Fundsource Lite (No Balance): +Deregisters an active Fundsource Lite account with zero balance. + +- **get** `/v1/upi/tpap/fundsource_lite/:liteId` - Fetch Fundsource Lite: +Fetches details of the Fundsource Lite account. diff --git a/llm-content/api/payments/tpap-pro/fundsource-lite/deregister-balance.md b/llm-content/api/payments/tpap-pro/fundsource-lite/deregister-balance.md new file mode 100644 index 00000000..a33cb8bc --- /dev/null +++ b/llm-content/api/payments/tpap-pro/fundsource-lite/deregister-balance.md @@ -0,0 +1,262 @@ +--- +title: Deregister Fundsource Lite with Balance +description: Move balance back to user account and deregister Fundsource Lite account using Razorpay Fundsource Lite API. +--- + +# Deregister Fundsource Lite with Balance + +## Deregister Fundsource Lite with Balance + +Use this endpoint to deregister a Fundsource Lite account with balance and move the remaining balance to the user's bank account. + +### Request + +```curl: Curl +curl -X POST 'https://api.rzp..com/v1/upi/tpap/fundsource_lite/{:lite_id}/deregister' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: cust_ref" \ +-d '{ + "upi_transaction_id": "RZP1KuSUGrp2l6MmPuT0163789452QPAY02", + "reference_id": "RSKwpINfSkdEvtdxf", + "initiation_mode": "00", + "device": { + "geocode": "12.9667,77.5668", + "ip": "198.1.1.3" + }, + "currency": "INR", + "amount": 100, + "description": "Deregister active Lite account", + "upi_credentials": { + "ARQC": "{\"type\":\"ARQC\",\"subType\":\"initial\",\"data\":{\"encryptedBase64String\":\"encrypted_string\",\"code\":\"NPCI-LITE\"}}" + }, + "payees": [ + { + "fundsource_id": "fs_Mock14charID" + } + ] +}' +``` + +### Response + +```json: Success +{ + "entity": "upi.fundsource_lite", + "id": "lite_id", + "upi_lite_reference_number": "1234567890", + "upi_transaction_id": "RZPc2ed455b797e4add8392110cfc528acc", + "status": "deregistered", + "upi_lite_credentials": { + "ARQC": "string" + }, + "fundsource": { + "id": "fs_1234", + "entity": "upi.fundsource", + "type": "savings", + "customer_name": "Gaurav Kumar", + "masked_account_number": "XXXXXX5199", + "account_reference_number": "999988126236990", + "ifsc": "HDFC000001", + "upi_pin_set": true, + "upi_pin_length": 6, + "otp_length": 6, + "atm_pin_length": 4, + "fundsource_provider": { + "name": "HDFC Bank", + "upi_iin": "600007", + "upi_enabled": false, + "mobile_registration_format": "format1", + "logo_url": "", + "upi_lite_allowed": true + }, + "vpas": { + "entity": "collection", + "count": 1, + "items": [ + { + "mobile": "9999999999", + "address": "vpa@handle", + "status": "active", + "primary": true + } + ] + } + } +} +``` + +### Parameters + +`upi_transaction_id` _mandatory_ +: `string` Unique UPI transaction id. + +`reference_id` _optional_ +: `string` Merchant reference id. + +`upi_initiation_mode` _optional_ +: `enum` Indicates the 2-digit code defined by NPCI. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`device` _mandatory_ +: `object` The device details. + + `ip` _mandatory_ + : `string` The IP address of the device. + + `geocode` _mandatory_ + : `string` The location coordinates of the device. For example, `12.9667,77.5667`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. For example, `INR`. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `10000` + +`description` _optional_ +: `string` Description of the payment. + +`upi_credentials` _mandatory_ +: `object` ARQC encrypted credential for authorisation. + + `ARPC` + : `string` Authentication Response Code credential. + +payees _mandatory_ +: `string` Payee details. + + `fundsource_id` _mandatory_ + : `string` Fundsource id of the payee. + +### Parameters + +`entity` +: `string` Name of the entity. Here it is `upi.fundsource_lite`. + +`id` +: `string` Unique identifier for the Fundsource Lite entity. + +`upi_lite_reference_number` +: `string` Reference number for the Lite account, assigned by the originator. + +`upi_transaction_id` +: `string` Unique UPI transaction identifier. + +`status` +: `string` Current status of the UPI Lite account. Possible values: + - `initiated` + - `active` + - `deregistered` + +`upi_lite_credentials` +: `object` ARQC encrypted credential for authorisation. + + `ARPC` + : `string` Authentication Response Code credential. + +`fundsource` +: `object` The fundsource for which Lite is enabled. + + `id` + : `string` Unique identifier of the fundsource. + + `entity` + : `string` Name of the entity. Here it is `fundsource`. + + `type` + : `string` Account type. + + `customer_name` + : `string` Name of the customer. + + `masked_account_number` + : `string` Masked version of the customer's account number. + + `account_reference_number` + : `string` Reference number assigned to the customer's account. + + `ifsc` + : `string` IFSC code of the account. + + `upi_pin_set` + : `boolean` Indicates whether UPI PIN is already set. + - `true`: UPI PIN is already set. + - `false`: UPI PIN is not set. + + `upi_pin_length` + : `integer` Length of UPI PIN. + + `otp_length` + : `integer` OTP length used during registration. + + `atm_pin_length` + : `integer` ATM PIN length of the account. + + `fundsource_provider` + : `object` Details of the bank. + + `name` + : `string` Name of the bank. + + `upi_iin` + : `string` UPI IIN code assigned to the provider by NPCI. + + `upi_enabled` + : `boolean` Indicates whether UPI is enabled for the provider. Possible values: + - `true`: UPI is enabled. + - `false`: UPI is not enabled. + + `mobile_registration_format` + : `string` Mobile registration format supported. + + `logo_url` + : `string` URL to the provider's logo. + + `upi_lite_allowed` + : `boolean` Indicates whether the UPI Lite is allowed by the bank. Possible values: + - `true`: UPI Lite is allowed. + - `false`: UPI Lite is not allowed. + + `vpas` + : `object` Collection of VPAs for the fundsource. + + `entity` + : `string` Name of the entity. Here it is `collection`. + + `count` + : `integer` Total number of VPA items. + + `items` + : `array` Array of VPA objects. + + `mobile` + : `string` Registered mobile number. + + `address` + : `string` UPI VPA address. + + `status` + : `string` Status of the VPA. Possible values: + - `active` + - `inactive` + + `primary` + : `boolean` Indicates where the VPA is primary. + - `true`: VPA is primary. + - `false`: VPA is not primary. diff --git a/llm-content/api/payments/tpap-pro/fundsource-lite/deregister-zero-balance.md b/llm-content/api/payments/tpap-pro/fundsource-lite/deregister-zero-balance.md new file mode 100644 index 00000000..22eb48fc --- /dev/null +++ b/llm-content/api/payments/tpap-pro/fundsource-lite/deregister-zero-balance.md @@ -0,0 +1,191 @@ +--- +title: Deregister Fundsource Lite with Zero Balance +description: Deregister an active Fundsource Lite account with zero balance using Razorpay Fundsource Lite API. +--- + +# Deregister Fundsource Lite with Zero Balance + +## Deregister Fundsource Lite with Zero Balance + +Use this endpoint to deregister a Fundsource Lite account when the balance is zero. + +### Request + +```curl: Curl +curl -X DELETE 'https://api.rzp..com/v1/upi/tpap/fundsource_lite/{lite_id}/deregister' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: cust_ref" +``` + +### Response + +```json: Success +{ + "entity": "upi.fundsource_lite", + "id": "lite_id", + "upi_lite_reference_number": "1234567890", + "upi_transaction_id": "RZPc2ed455b797e4add8392110cfc528acc", + "status": "deregistered", + "upi_lite_credentials": { + "ARPC": "string" + }, + "fundsource": { + "id": "fs_1234", + "entity": "upi.fundsource", + "type": "savings", + "customer_name": "Gaurav Kumar", + "masked_account_number": "XXXXXX5199", + "account_reference_number": "999988126236990", + "ifsc": "HDFC000001", + "upi_pin_set": true, + "upi_pin_length": 6, + "otp_length": 6, + "atm_pin_length": 4, + "fundsource_provider": { + "name": "HDFC Bank", + "upi_iin": "600007", + "upi_enabled": false, + "mobile_registration_format": "format1", + "logo_url": "", + "upi_lite_allowed": true + }, + "vpas": { + "entity": "collection", + "count": 1, + "items": [ + { + "mobile": "9999999999", + "address": "vpa@handle", + "status": "active", + "primary": true + } + ] + } + } +} +``` + +### Parameters + +`lite_id` _mandatory_ +: `string` Unique identifier of the Fundsource Lite account to be deregistered. + +### Parameters + +`entity` +: `string` Name of the entity. Here it is `upi.fundsource_lite`. + +`id` +: `string` Unique identifier for the Fundsource Lite entity. + +`upi_lite_reference_number` +: `string` Reference number for the Lite account, assigned by the originator. + +`upi_transaction_id` +: `string` Unique UPI transaction identifier. + +`status` +: `string` Current status of the UPI Lite account. Possible values: + - `initiated` + - `active` + - `deregistered` + +`upi_lite_credentials` +: `object` ARPC encrypted credential for authorisation. + + `ARPC` + : `string` Authentication Response Code credential. + +`fundsource` +: `object` The fundsource for which Lite is enabled. + + `id` + : `string` Unique identifier of the fundsource. + + `entity` + : `string` Name of the entity. Here it is `fundsource`. + + `type` + : `string` Account type. + + `customer_name` + : `string` Name of the customer. + + `masked_account_number` + : `string` Masked version of the customer's account number. + + `account_reference_number` + : `string` Reference number assigned to the customer's account. + + `ifsc` + : `string` IFSC code of the account. + + `upi_pin_set` + : `boolean` Indicates whether UPI PIN is already set. + - `true`: UPI PIN is already set. + - `false`: UPI PIN is not set. + + `upi_pin_length` + : `integer` Length of UPI PIN. + + `otp_length` + : `integer` OTP length used during registration. + + `atm_pin_length` + : `integer` ATM PIN length of the account. + + `fundsource_provider` + : `object` Details of the bank. + + `name` + : `string` Name of the bank. + + `upi_iin` + : `string` UPI IIN code assigned to the provider by NPCI. + + `upi_enabled` + : `boolean` Indicates whether UPI is enabled for the provider. Possible values: + - `true`: UPI is enabled. + - `false`: UPI is not enabled. + + `mobile_registration_format` + : `string` Mobile registration format supported. + + `logo_url` + : `string` URL to the provider's logo. + + `upi_lite_allowed` + : `boolean` Indicates whether UPI Lite is allowed by the bank. Possible values: + - `true`: UPI Lite is allowed. + - `false`: UPI Lite is not allowed. + + `vpas` + : `object` Collection of VPAs for the fundsource. + + `entity` + : `string` Name of the entity. Here it is `collection`. + + `count` + : `integer` Total number of VPA items. + + `items` + : `array` Array of VPA objects. + + `mobile` + : `string` Registered mobile number. + + `address` + : `string` UPI VPA address. + + `status` + : `string` Status of the VPA. Possible values: + - `active` + - `inactive` + + `primary` + : `boolean` Indicates where the VPA is primary. + - `true`: VPA is primary. + - `false`: VPA is not primary. diff --git a/llm-content/api/payments/tpap-pro/fundsource-lite/fetch.md b/llm-content/api/payments/tpap-pro/fundsource-lite/fetch.md new file mode 100644 index 00000000..576a5133 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/fundsource-lite/fetch.md @@ -0,0 +1,190 @@ +--- +title: Fetch Fundsource Lite Details +description: Fetch Fundsource Lite account details using Razorpay Fundsource Lite API. +--- + +# Fetch Fundsource Lite Details + +## Fetch Fundsource Lite Details + +Use this endpoint to fetch the details of a Fundsource Lite account. + +### Request + +```curl: Curl +curl -X GET 'https://api.rzp..com/v1/upi/tpap/fundsource_lite/{lite_id}' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: cust_ref" +``` + +### Response + +```json: Success +{ + "entity": "upi.fundsource_lite", + "id": "lite_id", + "upi_lite_reference_number": "1234567890", + "upi_transaction_id": "RZPc2ed455b797e4add8392110cfc528acc", + "status": "active", + "upi_lite_credentials": { + "ARPC": "string" + }, + "fundsource": { + "id": "fs_1234", + "type": "savings", + "customer_name": "Gaurav Kumar", + "masked_account_number": "XXXXXX5199", + "account_reference_number": "999988126236990", + "ifsc": "HDFC000001", + "upi_pin_set": true, + "upi_pin_length": 6, + "otp_length": 6, + "atm_pin_length": 4, + "fundsource_provider": { + "name": "HDFC Bank", + "upi_iin": "600007", + "upi_enabled": false, + "mobile_registration_format": "format1", + "logo_url": "", + "upi_lite_allowed": true + }, + "vpas": { + "entity": "collection", + "count": 1, + "items": [ + { + "mobile": "9999999999", + "address": "vpa@handle", + "status": "active", + "primary": true + } + ] + } + } +} +``` + +### Parameters + +`lite_id` _mandatory_ +: `string` Unique identifier of the Fundsource Lite account to be retrieved for deregistration. + +### Parameters + +`entity` +: `string` Name of the entity. Here it is `upi.fundsource_lite`. + +`id` +: `string` Unique identifier for the Fundsource Lite entity. + +`upi_lite_reference_number` +: `string` Reference number for the Lite account, assigned by the originator. + +`upi_transaction_id` +: `string` Unique UPI transaction identifier. + +`status` +: `string` Current status of the UPI Lite account. Possible values: + - `initiated` + - `active` + - `deregistered` + +`upi_lite_credentials` +: `object` ARQC encrypted credential for authorisation. + + `ARPC` + : `string` Authentication Response Code credential. + +`fundsource` +: `object` The fundsource for which Lite is enabled. + + `id` + : `string` Unique identifier of the fundsource. + + `entity` + : `string` Name of the entity. Here it is `fundsource`. + + `type` + : `string` Account type. + + `customer_name` + : `string` Name of the customer. + + `masked_account_number` + : `string` Masked version of the customer's account number. + + `account_reference_number` + : `string` Reference number assigned to the customer's account. + + `ifsc` + : `string` IFSC code of the account. + + `upi_pin_set` + : `boolean` Indicates whether UPI PIN is already set. + - `true`: UPI PIN is already set. + - `false`: UPI PIN is not set. + + `upi_pin_length` + : `integer` Length of UPI PIN. + + `otp_length` + : `integer` OTP length used during registration. + + `atm_pin_length` + : `integer` ATM PIN length of the account. + + `fundsource_provider` + : `object` Details of the bank. + + `name` + : `string` Name of the bank. + + `upi_iin` + : `string` UPI IIN code assigned to the provider by NPCI. + + `upi_enabled` + : `boolean` Indicates whether UPI is enabled for the provider. Possible values: + - `true`: UPI is enabled. + - `false`: UPI is not enabled. + + `mobile_registration_format` + : `string` Mobile registration format supported. + + `logo_url` + : `string` URL to the provider's logo. + + `upi_lite_allowed` + : `boolean` Indicates whether UPI Lite is allowed by the bank. Possible values: + - `true`: UPI Lite is allowed. + - `false`: UPI Lite is not allowed. + + `vpas` + : `object` Collection of VPAs for the fundsource. + + `entity` + : `string` Name of the entity. Here it is `collection`. + + `count` + : `integer` Total number of VPA items. + + `items` + : `array` Array of VPA objects. + + `mobile` + : `string` Registered mobile number. + + `address` + : `string` UPI VPA address. + + `status` + : `string` Status of the VPA. Possible values: + - `active` + - `inactive` + + `primary` + : `boolean` Indicates where the VPA is primary. + - `true`: VPA is primary. + - `false`: VPA is not primary. diff --git a/llm-content/api/payments/tpap-pro/fundsource-lite/payments.md b/llm-content/api/payments/tpap-pro/fundsource-lite/payments.md new file mode 100644 index 00000000..8f2e8f84 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/fundsource-lite/payments.md @@ -0,0 +1,320 @@ +--- +title: Pay from Fundsource Lite Account +description: Send a payment from the Fundsource Lite account using the Razorpay TPAP Pro Fundsource Lite API. +--- + +# Pay from Fundsource Lite Account + +## Pay from Fundsource Lite Account + +Use this endpoint to send a payment from a Fundsource Lite account to a VPA. + +### Request + +```curl: Curl +curl -X POST 'https://api.rzp..com/v1/upi/tpap/payments/pay' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: cust_ref" \ +-d '{ + "upi_transaction_id": "RZP1KuSUGrp2l6MmPuT0163789452QPAY02", + "reference_id": "RSKwpINfSkdEvtdxf", + "initiation_mode": "QR Code", + "purpose": "UPI Lite Send Money", + "upi_purpose_code": "44", + "device": { + "geocode": "12.9667,77.5667", + "ip": "198.1.1.2" + }, + "currency": "INR", + "amount": 50, + "type": "pay", + "description": "Lite-Pay", + "payer": { + "fundsource_lite_id": "fs_Mock14charID" + }, + "upi_credentials": { + "ARQC": "{\"type\":\"ARQC\",\"subType\":\"initial\",\"data\":{\"encryptedBase64String\":\"encrypted_string\",\"code\":\"NPCI-LITE\"}}" + }, + "payees": [ + { + "vpa": "acme.corp@rzp" + } + ] +}' + +``` + +### Response + +```json: Success +{ + "entity": "upi.payment", + "upi_transaction_id": "RZPc2ed455b797e4add8392110cfc528acc", + "reference_id": "ord_somfv432nsa", + "upi_customer_reference_number": "804813039157", + "upi_reference_url": "https://www.test.com", + "upi_reference_category": "00", + "upi_initiation_mode": "00", + "upi_purpose_code": "44", + "currency": "INR", + "amount": 100, + "type": "pay", + "description": "flight tickets", + "payer": { + "fundsource_lite": { + "fundsource_lite_id": "lite_Mock14charID", + "upi_lite_reference_number": "1234567890", + "upi_lite_credentials": { + "ARQC": "string" + } + }, + "name": "Gaurav Kumar", + "mcc": "0000", + "response_code": "00", + "reversal_response_code": "00" + }, + "payees": [ + { + "vpa": "acme.corp@rzp", + "fundsource": { + "ifsc": "HDFC0000058", + "masked_account_number": "XXXXXXXXXXX6000" + }, + "name": "AcmeCorp Pvt. Ltd.", + "mcc": "6765", + "upi_response_code": "00", + "upi_reversal_response_code": "00" + } + ], + "status": "success", + "created_at": "1653915355", + "updated_at": "1691097057" +} +``` + +### Parameters + +`upi_transaction_id` _mandatory_ +: `string` Unique UPI transaction id. + +`reference_id` _optional_ +: `string` Merchant reference id. + +`upi_initiation_mode` _optional_ +: `enum` Indicates the 2-digit code defined by NPCI. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` _optional_ +: `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`purpose` _mandatory_ +: `string` The purpose of the payout. + +`device` _optional_ +: `object` The device details. + + `ip` + : `string` The IP address of the device. + + `geocode` + : `string` The location coordinates of the device. For example, `12.9667,77.5667`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. For example, `INR`. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `10000` + +`type` _mandatory_ +: `string` Type of transaction. Always `pay`. + +`description` _optional_ +: `string` Description of the payment. + +`payer` _mandatory_ +: `string` Payer details. + + `fundsource_lite_id` _mandatory_ + : `string` Fundsource Lite id of the sender. + +`upi_credentials` _mandatory_ +: `object` ARQC encrypted credential for authorisation. + + `ARPC` + : `string` Authentication Response Code credential. + +payees _mandatory_ +: `string` Payee details. + + vpa _mandatory_ + : `string` Target recipient's VPA address. + +### Parameters + +`entity` +: `string` Name of entity. Here it is, `upi.payment`. + +`upi_transaction_id` +: `string` UPI transaction id generated. + +`reference_id` +: `string` Merchant reference id. + +`upi_customer_reference_number` +: `string` Customer Reference number at NPCI. + +`upi_reference_url` +: `string` URL for the payment reference. + +`upi_reference_category` +: `string` UPI Reference Category Code. + +`upi_initiation_mode` +: `enum` Indicates the 2-digit code defined by NPCI. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` +: `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`currency` +: `string` Currency for transaction (INR). + +`amount` +: `string` Transaction amount in paisa. + +`type` +: `string` Transaction type. + +`description` +: `string` Payment description. + +`payer` +: `object` Payer details. + + `fundsource_lite` + : `string` Indicates the Lite details. + + `fundsource_lite_id` + : `string` Fundsource Lite id. + + `upi_lite_reference_number` + : `string` Reference number of Lite. + + `upi_lite_credentials` + : `string` Contains encrypted ARPC proof. + + `ARPC` + : `string` Authentication Response Code credential. + + `name` + : `string` Payer name. + + `mcc` + : `string` Merchant Category Code. + + `response_code` + : `string` Response code from UPI. + + `reversal_response_code` + : `string` Reversal response code. + +`payees` +: `array` List of payee objects. + + `vpa` + : `string` Payee's VPA. + + `fundsource` + : `object` Payee's bank fundsource. + + `ifsc` + : `string` Payee's IFSC code. + + `masked_account_number` + : `string` Masked account number. + + `name` + : `string` Payee name. + + `mcc` + : `string` Merchant Category Code for payee. + + `upi_response_code` + : `string` UPI response code for payee. + + `upi_reversal_response_code` + : `string` Reversal response code. + +`status` +: `string` Transaction status. Possible values: + - `created` + - `pending` + - `success` + - `failed` + +`created_at` +: `integer` UNIX timestamp at which the payment was created. + +`updated_at` +: `integer` UNIX timestamp at which the payment was updated. diff --git a/llm-content/api/payments/tpap-pro/fundsource-lite/register.md b/llm-content/api/payments/tpap-pro/fundsource-lite/register.md new file mode 100644 index 00000000..6b01ab5c --- /dev/null +++ b/llm-content/api/payments/tpap-pro/fundsource-lite/register.md @@ -0,0 +1,203 @@ +--- +title: Register Fundsource Lite +description: Activate a UPI Lite service account using the Razorpay Fundsource Lite API. +--- + +# Register Fundsource Lite + +## Register Fundsource Lite + +Use this endpoint to activate a Fundsource Lite account. + +### Request + +```curl: Curl +curl -X POST 'https://api.rzp..com/v1/upi/tpap/fundsource_lite' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: cust_ref" \ +-d '{ + "upi_transaction_id": "123qwert12", + "operation_type": "registration", + "challenge": "string", + "fundsource_id": "fs_id" +}' +``` + +### Response + +```json: Success +{ + "entity": "upi.fundsource_lite", + "id": "lite_id", + "upi_lite_reference_number": "1234567890", + "upi_transaction_id": "RZP1KuSUGrp2l6MmPuT0163789452QPAY02", + "status": "active", + "upi_keys": "xml keys from NPCI without tampering", + "fundsource": { + "id": "fs_1234", + "entity": "upi.fundsource", + "type": "savings", + "customer_name": "Gaurav Kumar", + "masked_account_number": "XXXXXX5199", + "account_reference_number": "999988126236990", + "ifsc": "HDFC000001", + "upi_pin_set": true, + "upi_pin_length": 6, + "otp_length": 6, + "atm_pin_length": 4, + "fundsource_provider": { + "name": "HDFC Bank", + "upi_iin": "600007", + "upi_enabled": false, + "mobile_registration_format": "format1", + "logo_url": "", + "upi_lite_allowed": true + }, + "vpas": { + "entity": "collection", + "count": 1, + "items": [ + { + "mobile": "9999999999", + "address": "vpa@handle", + "status": "active", + "primary": true + } + ] + } + } +} +``` + +### Parameters + +`upi_transaction_id` _mandatory_ +: `string` Unique identifier of the transaction across UPI entities. Must start with a Switch-issued prefix. For example, `123qwert12`. + +`operation_type` _mandatory_ +: `enum` Type of operation being performed. Possible values: + - `registration` + - `rotation` + +`challenge` _mandatory_ +: `string` Challenge received from common library during get challenge process. + +`fundsource_id` _mandatory_ +: `string` Fundsource id for which Lite is to be enabled. + +### Parameters + +`entity` +: `string` Name of the entity. Here it is `upi.fundsource_lite`. + +`id` +: `string` Unique identifier for the Fundsource Lite entity. + +`upi_lite_reference_number` +: `string` Reference number for the Lite account, assigned by the originator. + +`upi_transaction_id` +: `string` Unique UPI transaction identifier. + +`status` +: `string` Current status of the UPI Lite account. Possible values: + - `initiated` + - `active` + - `deregistered` + +`upi_keys` +: `string` XML credentials from NPCI used by common library. + +`fundsource` +: `object` The fundsource for which Lite is enabled. + + `id` + : `string` Unique identifier of the fundsource. + + `entity` + : `string` Name of the entity. Here it is `fundsource`. + + `type` + : `string` Account type. + + `customer_name` + : `string` Name of the customer. + + `masked_account_number` + : `string` Masked version of the customer's account number. + + `account_reference_number` + : `string` Reference number assigned to the customer's account. + + `ifsc` + : `string` IFSC code of the account. + + `upi_pin_set` + : `boolean` Indicates whether UPI PIN is already set. + - `true`: UPI PIN is already set. + - `false`: UPI PIN is not set. + + `upi_pin_length` + : `integer` Length of UPI PIN. + + `otp_length` + : `integer` OTP length used during registration. + + `atm_pin_length` + : `integer` ATM PIN length of the account. + + `fundsource_provider` + : `object` Details of the bank. + + `name` + : `string` Name of the bank. + + `upi_iin` + : `string` UPI IIN code assigned to the provider by NPCI. + + `upi_enabled` + : `boolean` Indicates whether UPI is enabled for the provider. Possible values: + - `true`: UPI is enabled. + - `false`: UPI is not enabled. + + `mobile_registration_format` + : `string` Mobile registration format supported. + + `logo_url` + : `string` URL to the provider's logo. + + `upi_lite_allowed` + : `boolean` Indicates whether the UPI Lite is allowed by the bank. Possible values: + - `true`: UPI Lite is allowed. + - `false`: UPI Lite is not allowed. + + `vpas` + : `object` Collection of VPAs for the fundsource. + + `entity` + : `string` Name of the entity. Here it is `collection`. + + `count` + : `integer` Total number of VPA items. + + `items` + : `array` Array of VPA objects. + + `mobile` + : `string` Registered mobile number. + + `address` + : `string` UPI VPA address. + + `status` + : `string` Status of the VPA. Possible values: + - `active` + - `inactive` + + `primary` + : `boolean` Indicates where the VPA is primary. + - `true`: VPA is primary. + - `false`: VPA is not primary. diff --git a/llm-content/api/payments/tpap-pro/fundsource-lite/top-up.md b/llm-content/api/payments/tpap-pro/fundsource-lite/top-up.md new file mode 100644 index 00000000..ece9c54f --- /dev/null +++ b/llm-content/api/payments/tpap-pro/fundsource-lite/top-up.md @@ -0,0 +1,297 @@ +--- +title: Top-up Fundsource Lite +description: Add balance to a UPI Lite account using the Razorpay TPAP Pro Fundsource Lite API +--- + +# Top-up Fundsource Lite + +## Top-up Fundsource Lite + +Use this endpoint to add balance to Fundsource Lite account. + +### Request + +```curl: Curl +curl -X POST 'https://api.rzp..com/v1/upi/tpap/payments/pay' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: cust_ref" \ +-d '{ + "upi_transaction_id": "RZP1KuSUGrp2l6MmPuT0163789452QPAY02", + "reference_id": "RSKwpINfSkdEvtdxf", + "initiation_mode": "QR Code", + "upi_purpose_code": "42", + "purpose": "UPI Lite Top Up", + "device": { + "geocode": "12.9667,77.5667", + "ip": "198.1.1.1" + }, + "currency": "INR", + "amount": 100, + "type": "pay", + "description": "Upi-lite registration", + "payer": { + "vpa": "9560137963.stage@rzp", + "fundsource_id": "fs_Mock14charID" + }, + "upi_credentials": { + "MPIN": "{\"type\":\"PIN\",\"subType\":\"MPIN\",\"data\":{\"encryptedBase64String\":\"encrypted_string\",\"code\":\"NPCI\"}}", + "ARQC": "{\"type\":\"ARQC\",\"subType\":\"initial\",\"data\":{\"encryptedBase64String\":\"encrypted_string\",\"code\":\"NPCI-LITE\"}}" + }, + "payees": [ + { + "fundsource_lite_id": "lite_id" + } + ] +}' +``` + +### Response + +```json: Success +{ + "entity": "upi.payment", + "upi_transaction_id": "RZPc2ed455b797e4add8392110cfc528acc", + "reference_id": "ord_somfv432nsa", + "upi_customer_reference_number": "804813039157", + "upi_reference_url": "https://www.test.com", + "upi_reference_category": "00", + "upi_initiation_mode": "00", + "upi_purpose_code": "42", + "currency": "INR", + "amount": 100, + "type": "pay", + "description": "flight tickets", + "payer": { + "vpa": "gaurav.kumar@exampleupi", + "fundsource": { + "ifsc": "AXIS0000058", + "masked_account_number": "XXXXXXXXXXX3000" + }, + "name": "Gaurav Kumar", + "mcc": "0000", + "upi_response_code": "00", + "upi_reversal_response_code": "00" + }, + "payees": [ + { + "fundsource_lite": { + "id": "lite_id", + "upi_lite_reference_number": "1234567890", + "upi_lite_credentials": { + "ARPC": "string" + } + }, + "name": "Gaurav Kumar", + "mcc": "0000", + "response_code": "00", + "reversal_response_code": "00" + } + ], + "status": "created", + "created_at": "1653915355", + "updated_at": "1691097057" +} +``` + +### Parameters + +`upi_transaction_id` _mandatory_ +: `string` Unique UPI transaction id. + +`reference_id` _optional_ +: `string` Merchant reference id. + +`upi_initiation_mode` _optional_ +: `enum` Indicates the 2-digit code defined by NPCI. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` _optional_ +: `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`purpose` _mandatory_ +: `string` The purpose of the payout. + +`device` _optional_ +: `object` The device details. + + `ip` + : `string` The IP address of the device. + + `geocode` + : `string` The location coordinates of the device. For example, `12.9667,77.5667`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. For example, `INR`. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `10000` + +`type` _mandatory_ +: `string` Type of transaction. Should be `pay`. + +`description` _optional_ +: `string` Description of the transaction. + +`payer` _mandatory_ +: `string` Payer details. + + `vpa` _mandatory_ + : `string` Payer’s VPA. + + `fundsource_id` _mandatory_ + : `string` Fundsource id of payer. + +`upi_credentials` _mandatory_ +: `object` MPIN and ARQC encrypted credentials. + +`payees` _mandatory_ +: `string` Payee details. + + `fundsource_lite_id` _mandatory_ + : `string` Fundsource Lite id of the payee. + +### Parameters + +`entity` +: `string` Name of entity. Here it is, `upi.payment`. + +`upi_transaction_id` +: `string` UPI transaction id generated. + +`reference_id` +: `string` Merchant reference id. + +`upi_customer_reference_number` +: `string` Customer Reference number at NPCI. + +`upi_reference_url` +: `string` URL for the payment reference. + +`upi_reference_category` +: `string` UPI Reference Category Code. + +`upi_initiation_mode` +: `enum` Indicates the 2-digit code defined by NPCI. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` +: `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`currency` +: `string` Currency for transaction (INR). + +`amount` +: `string` Transaction amount in paisa. + +`type` +: `string` Transaction type. + +`description` +: `string` Payment description. + +`payer` +: `object` Payer details. + + `vpa` + : `string` Payer's VPA. + + `fundsource` + : `object` Payer's bank fundsource. + + `ifsc` + : `string` Payer's IFSC code. + + `masked_account_number` + : `string` Masked account number. + +`payees` +: `array` List of payee objects. + + `fundsource_lite` + : `string` Indicates the Lite details. + + `id` + : `string` Fundsource Lite id. + + `upi_lite_reference_number` + : `string` Reference number of Lite. + + `upi_lite_credentials` + : `string` Contains encrypted ARPC proof. + + `ARPC` + : `string` Authentication Response Code credential. + +`status` +: `string` Transaction status. Possible values: + - `created` + - `pending` + - `success` + - `failed` + +`created_at` +: `integer` UNIX timestamp at which the payment was created. + +`updated_at` +: `integer` UNIX timestamp at which the payment was updated. diff --git a/llm-content/api/payments/tpap-pro/mandate-flow.md b/llm-content/api/payments/tpap-pro/mandate-flow.md new file mode 100644 index 00000000..d0420680 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/mandate-flow.md @@ -0,0 +1,47 @@ +--- +title: Mandates +description: Know about managing TPAP Pro mandates and list of endpoints. +--- + +# Mandates + +Razorpay's TPAP Pro - Mandate APIs let you create and manage your mandates. You can create, update, pause/resume, approve, reject and fetch mandates using APIs. + + + + + Below are the steps to integrate TPAP Pro. You can also refer to our comprehensive [TPAP Pro integration guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md). + +1. [Customer Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/customer-onboarding.md) +2. [Manage Funds and Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/funds-account-management.md) +3. [Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/payments-flow.md) +4. Mandates +5. [Complaints](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/complaints-flow.md) +6. [UPI Numbers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/upi-number.md) +7. [UPI Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/fundsource-lite.md) + + +### Related Guides + +[About TPAP Pro](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro.md) +[Integrate With TPAP Pro](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md) + +### Endpoints + +- **post** `/v1/upi/tpap/mandates` - Create Mandates: + Creates a mandate. + +- **patch** `/v1/upi/tpap/mandates/:umn` - Update or Revoke a Mandate: + Updates or revokes a payment. + +- **patch** `/v1/upi/tpap/mandates/:umn` - Pause or Resume a Mandate: + Pauses or resumes a mandate. + +- **post** `/v1/mandates/:umn` - Approve a Mandate: + Approves a collect request. + +- **post** `/v1/mandates/:umn` - Reject Mandates: + Rejects a Mandate. + +- **get** `/v1/upi/tpap/mandate?umn=&refresh=true` - Fetch Mandates: + Fetch all mandates. diff --git a/llm-content/api/payments/tpap-pro/mandate-flow/approve-mandates.md b/llm-content/api/payments/tpap-pro/mandate-flow/approve-mandates.md new file mode 100644 index 00000000..98759073 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/mandate-flow/approve-mandates.md @@ -0,0 +1,275 @@ +--- +title: Approve a Mandate +description: Approve a mandate using the Razorpay TPAP Pro API. +--- + +# Approve a Mandate + +## Approve a Mandate + +Use this endpoint to approve a mandate. + +### Request + +```curl: Curl +curl -X POST 'api.rzp..com/v1/mandates/:umn' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "reference_id": "TXN1234567", + "upi_transaction_id": "RZP1KuSUGrp2l6MmPuT0163789452QPAY02", + "device": { + "geocode": "1234.1213", + "ip": "198.1.1.1" + }, + "upi_credentials": {} // Upi credentials received from WebCL +}' +``` + +### Response + +```json: Success +{ + "entity":"upi.mandate", + "reference_id":"TXN1234567", + "upi_transaction_id":"RZP1KuSUGrp2l6MmPuT0163789452QPAY02", + "amount":100, + "amount_rule":"exact | max", + "currency":"inr", + "payee":{ + "vpa":"acme.corp@rzp", + "name":"AcmeCorp Pvt. Ltd.", + "mcc":"6765" + }, + "payer":{ + "vpa":"7262093972.stage@rzp" + }, + "name":"Name of the Mandate", + "expire_at":1728193657, + "block_fund":false, + "revocable_by_payer":true, + "recurrence":{ + "period":"onetime|daily|weekly|fortnightly|monthly|bimonthly|quarterly|halfyearly|yearly|aspresented", + "rule":"on | before | after", + "value":1 + }, + "validity":{ + "start_at":1722317078, + "end_at":1722317078 + }, + "upi_reference_category":"02", + "upi_reference_url":"https://www.abcxyz.com/", + "description":"Sample Mandate Request", + "upi_initiation_mode":"00", + "upi_purpose_code":"00", + "upi_response_code":"00", + "umn":"umn", + "share_to_payee":true, + "status":"pending | success | failed", + "created_at":1728193657 +} +``` + +### Parameters + +`reference_id` _mandatory_ +: `string` The mandate identifier created by the payer. + +`upi_transaction_id` _mandatory_ +: `string` The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +`device` _mandatory_ +: `object` The device details. + + `geocode` + : `string` The location coordinates of the device. + + `ip` + : `string` The IP address of the device. + +`upi_credentials` _mandatory_ +: `string` The encrypted UPI credentials with the user's MPIN. + +### Parameters + +`entity` +: `string` The entity type. + +`reference_id` +: `string` Indicates the merchant reference ID. In mandates, it is mandate id stored at the merchant side. + +`upi_transaction_id` +: `string` The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +`amount` +: `integer` The amount of the mandate. + +`amount_rule` _mandatory_ +: `string` If this parameter value is max, the mandated amount can be less than or equal to the specified amount. If it is set to exact, the mandated amount should be the exact amount specified. + +`currency` +: `string` The currency of the mandate. Here, it is `INR`. + +`payee` +: `object` The payee details. + + `vpa` + : `string` The VPA of the payee. + + `name` + : `string` The name of the payee. + + `mcc` + : `string` The merchant categorisation code of the payee. + +`payer` +: `object` The payer details. + + `vpa` + : `string` The VPA of the payer. + +`name` +: `string` The name of the mandate. + +`expire_at` +: `integer` The UNIX timestamp indicating the expiry date of the mandate. + +`block_fund` +: `boolean` Indicates whether the customer's funds should be blocked. This is applicable only for one-time mandates. For recurring, it should always be set to false. For one-time mandates, it can be either true or false. Default is false. + - `true`: The customer should be blocked. + - `false`: The customer should not be blocked. + +`revocable_by_payer` +: `boolean` Indicates whether the payer can revoke the mandate. This is applicable only for one-time mandates. For recurring, it should always be set to true. For one-time mandates, it can be either true or false. Default is true. + - `true`: The payer can revoke the mandate. + - `false`: The payer cannot revoke the mandate. + +`recurrence` +: `object` The recurring details of the mandate. + + `period` + : `string` Indicates how often you can execute the mandate. Possible values: + - `onetime`: This is for a one-time mandate. The customer provides authorisation to debit their account a single time for a specific amount. + - `daily`: Recurring mandate. The customer provides authorisation to debit their account daily for a specific amount. + - `weekly`: Recurring mandate. Authorisation given by a customer to debit their account weekly once for a specified amount. + - `fortnightly`: Recurring mandate. The customer provides authorisation to debit their account fortnightly for a specific amount. + - `monthly`: Recurring mandate. The customer provides authorisation to debit their account monthly for a specific amount. + - `bimonthly`: Recurring mandate. The customer provides authorisation to debit their account bimonthly for a specific amount. + - `quarterly`: Recurring mandate. The customer provides authorisation to debit their account quarterly for a specific amount. + - `halfyearly`: Recurring mandate. The customer provides authorisation to debit their account once in every 6 months for a specific amount. + - `yearly`: Recurring mandate. The customer provides authorisation to debit their account once a year for a specific amount. + - `aspresented`: In this case the mandates are triggered by merchants when they want to. The customer provides authorisation to debit their account whenever there is an execution request. + + `rule` + : `string` Indicates the recurrence rule of the mandate. This rule is not required for `onetime`, `daily`, and `aspresented` recurrence patterns. Possible values: + - `on` + - `before` + - `after` + + `value` + : `integer` The recurrence value of the mandate. It is not required for `onetime`, `daily` and `aspresented` frequencies. Possible values: + - `weekly`: The value should be 1-Monday to 7-Sunday. + - `fortnightly`: The value should be 1 to 15/16 days. + - `monthly`, `bimonthly`, `quarterly`, `halfyearly` or `yearly`: The value should be 1 to 30/31 days. + +`validity` +: `object` The mandate validity details. + + `start_at` + : `integer` The UNIX timestamp indicating the start date of the mandate. + + `end_at` + : `integer` The UNIX timestamp indicating the end date of the mandate. + +`upi_reference_category` +: `string` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: NULL + - `01`: Advertisement + - `02`: Invoice + +`upi_reference_url` +: `string` Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction. + +`description` +: `string` The description of the mandate. + +`upi_initiation_mode` +: `enum` Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` +: `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`upi_response_code` +: `string` The response code issued by NPCI to the payer. + +`umn` +: `string` The Unique Mandate Number, assigned to each mandate, used to track, manage, and reference specific mandates. The switch will create a UUID-based UMN of 32 characters. The UMN should be random, non-guessable and active. For example, `XYZa977ccabb11e7abc4cec278b6b50a@mypsp`. The total length of the UMN address should be 70digit. + +`share_to_payee` +: `boolean` Indicates whether the mandate is shared with the payee. This is required only for onetime mandates initiated by the payer. For recurring mandates, you must set it to true. For onetime mandates, it can be either true or false. Default is true. Possible values: + - `true`: Mandate is shared. + - `false`: Mandate is not shared. + +`status` +: `string` Indicates the mandate status. Possible values: + - `initiated`: The mandate has been created and is awaiting a status update from NPCI. + - `active`: The mandate creation is successful. The mandate becomes active when NPCI sends a successful response in RespMandate. + - `completed`: This is a terminal state. The mandate can be completed in two cases. + - If the mandate reaches its validity end date. + - If the mandate has been revoked by a payer or a payee. + - `paused`: The customer has paused the mandate. + - `failed`: The mandate creation was unsuccessful. This is a terminal state, the client has to create a new mandate if failed. + +`created_at` +: `string` The UNIX timestamp at which the mandate request was created. diff --git a/llm-content/api/payments/tpap-pro/mandate-flow/create-mandates.md b/llm-content/api/payments/tpap-pro/mandate-flow/create-mandates.md new file mode 100644 index 00000000..1aaa6fab --- /dev/null +++ b/llm-content/api/payments/tpap-pro/mandate-flow/create-mandates.md @@ -0,0 +1,466 @@ +--- +title: Create a Mandate +description: Create a mandate using the Razorpay TPAP Pro API. +--- + +# Create a Mandate + +## Create a Mandate + +Payers can use this endpoint to request a mandate to the switch. + +### Request + +```curl: Curl +curl -X POST 'api.rzp..com/v1/upi/tpap/mandates' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "reference_id": "TXN1234567", + "upi_transaction_id": "RZP1KuSUGrp2l6MmPuT0163789452QPAY02", + "amount": 1722, + "amount_rule": "exact | max", + "currency": "inr", + "device": { + "geocode": "1234.1213", + "ip": "198.1.1.1" + }, + "payee": { + "vpa": "acme.corp@rzp", + "name": "AcmeCorp Pvt. Ltd.", + "mcc": "6765" + }, + "payer": { + "vpa": "7262093972.stage@rzp", + "fundsource": { + "id": "fs_1234567" + } + }, + "name": "Name of the Mandate", + "expire_at": 1722317078, + "block_fund": false, + "revocable_by_payer": true, + "recurrence": { + "period": "onetime|daily|weekly|fortnightly|monthly|bimonthly|quarterly|halfyearly|yearly|aspresented", + "rule": "on | before | after", + "value": 1 + }, + "validity": { + "start_at": 1722317078, + "end_at": 1722317078 + }, + "upi_reference_category": "02", + "upi_reference_url": "https://www.abcxyz.com/", + "description": "Sample Mandate Request", + "upi_credentials": {}, + "upi_initiation_mode": "00", + "upi_purpose_code": "00", + "share_to_payee": true +}' +``` + +### Response + +```json: Success +{ + "entity":"upi.mandate", + "umn":"umn", + "reference_id":"TXN1234567", + "upi_transaction_id":"RZP1KuSUGrp2l6MmPuT0163789452QPAY02", + "amount":1722, + "amount_rule":"exact | max", + "currency":"inr", + "device":{ + "geocode":"1234.1213", + "ip":"198.1.1.1" + }, + "payee":{ + "vpa":"acme.corp@rzp", + "name":"AcmeCorp Pvt. Ltd.", + "mcc":"6765" + }, + "payer":{ + "vpa":"7262093972.stage@rzp" + }, + "name":"Name of the Mandate", + "expire_at":1722317078, + "block_fund":false, + "revocable_by_payer":true, + "recurrence":{ + "period":"onetime|daily|weekly|fortnightly|monthly|bimonthly|quarterly|halfyearly|yearly|aspresented", + "rule":"on | before | after", + "value":1 + }, + "validity":{ + "start_at":1722317078, + "end_at":1722317078 + }, + "upi_reference_category":"02", + "upi_reference_url":"https://www.abcxyz.com/", + "description":"Sample Mandate Request", + "upi_initiation_mode":"00", + "upi_purpose_code":"00", + "upi_response_code":"00", + "share_to_payee":true, + "status":"initiated", + "created_at":1722317078 +} +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount if mandatory", + "source":"internal", + "step":"", + "reason":"Amount must be greater than 0", + "field":"amount", + "metadata":null + } +} +``` + +### Parameters + +`reference_id` _mandatory_ +: `string` Indicates the merchant reference identifier. In mandate, this will be a mandate id stored at the merchant side. + +`upi_transaction_id` _mandatory_ +: `string` The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +`amount` _mandatory_ +: `integer` The amount in paisa for which the mandate is requested. + +`amount_rule` _mandatory_ +: `string` If this parameter value is max, the mandated amount can be less than or equal to the specified amount. If it is set to exact, the mandated amount should be the exact amount specified. + +`currency` _optional_ +: `string` The currency of the mandate amount. + +`device` _mandatory_ +: `object` The device details. + + `geocode` + : `string` The location coordinates of the device. + + `ip` + : `string` The IP address of the device. + +`payee` _mandatory_ +: `object` The payee details. + + `vpa` + : `string` The VPA of the payee. + + `name` + : `string` The name of the payee. + + `mcc` + : `string` The merchant categorisation code of the payee. + +`payer` _mandatory_ +: `object` The payer details. + + `vpa` + : `string` The VPA of the payer. + +`name` _optional_ +: `string` The name of the mandate. + +`expire_at` _mandatory_ +: `integer` The UNIX timestamp indicating the time of the mandate expiration. + +`block_fund` _optional_ +: `boolean` Indicates whether the customer's funds should be blocked. This is applicable only for one-time mandates. For recurring, it should always be set to false. For one-time mandates, it can be either true or false. Default is false. + - `true`: The customer should be blocked. + - `false`: The customer should not be blocked. + +`revocable_by_payer` _mandatory_ +: `boolean` Indicates whether the payer can revoke the mandate. This is applicable only for one-time mandates. For recurring, it should always be set to true. For one-time mandates, it can be either true or false. Default is true. + - `true`: The payer can revoke the mandate. + - `false`: The payer cannot revoke the mandate. + +`recurrence` +: `object` The recurring details of the mandate. + + `period` _mandatory_ + : `string` Indicates how often you can execute the mandate. Possible values: + - `onetime`: This is for a one-time mandate. The customer provides authorisation to debit their account a single time for a specific amount. + - `daily`: Recurring mandate. The customer provides authorisation to debit their account daily for a specific amount. + - `weekly`: Recurring mandate. Authorisation given by a customer to debit their account weekly once for a specified amount. + - `fortnightly`: Recurring mandate. The customer provides authorisation to debit their account fortnightly for a specific amount. + - `monthly`: Recurring mandate. The customer provides authorisation to debit their account monthly for a specific amount. + - `bimonthly`: Recurring mandate. The customer provides authorisation to debit their account bimonthly for a specific amount. + - `quarterly`: Recurring mandate. The customer provides authorisation to debit their account quarterly for a specific amount. + - `halfyearly`: Recurring mandate. The customer provides authorisation to debit their account once in every 6 months for a specific amount. + - `yearly`: Recurring mandate. The customer provides authorisation to debit their account once a year for a specific amount. + - `aspresented`: In this case the  mandates are triggered by merchants when they want to. The customer provides authorisation to debit their account whenever there is an execution request. + + `rule` _conditional_ + : `string` Indicates the recurrence rule of the mandate. This rule is not required for `onetime`, `daily`, and `aspresented` recurrence patterns. Possible values: + - `on` + - `before` + - `after` + + `value` _conditional_ + : `integer` The recurrence Value of the mandate. It is not required for `onetime`, `daily` and `aspresented` frequencies. Possible values: + - `weekly`: The value should be 1-Monday to 7-Sunday. + - `fortnightly`: The value should be 1 to 15/16 days. + - `monthly`, `bimonthly`, `quarterly`, `halfyearly` or `yearly`: The value should be 1 to 30/31 days. + +`validity` _mandatory_ +: `object` The mandate validity details. + + `start_at` + : `integer` The UNIX timestamp indicating the start date of the mandate. + + `end_at` + : `integer` The UNIX timestamp indicating the end date of the mandate. + +`upi_reference_category` _optional_ +: `string` Indicates the UPI reference URL. Possible values: + - `00`: Default + - `01`: Advertisement + - `02`: Invoice + +`upi_reference_url` _optional_ +: `string` The invoice as sent by the merchant or a reference to the mandate in the form of a URL. If you do not pass this, a default value will be set, and the same will be populated in response. + +`description` _optional_ +: `string` The description of the mandate. + +`upi_credentials` _mandatory_ +: `string` The encrypted UPI credentials with the user's MPIN. + +`upi_initiation_mode` _mandatory_ +: `string` Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` _optional_ +: `string` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`share_to_payee` _optional_ +: `boolean` Indicates whether the mandate is shared with the payee. This is required only for onetime mandates initiated by the payer. For recurring mandates, you must set it to true. For onetime mandates, it can be either true or false. Default is true. Possible values: + - `true`: Mandate is shared. + - `false`: Mandate is not shared. + +### Parameters + +`entity` +: `string` The entity type. + +`umn` +: `string` The Unique Mandate Number, assigned to each mandate, used to track, manage, and reference specific mandates. The switch will create a UUID-based UMN of 32 characters. The UMN should be random, non-guessable and active. For example, `XYZa977ccabb11e7abc4cec278b6b50a@mypsp`. The total length of the UMN address should be 70digit. + +`reference_id` +: `string` Indicates the merchant reference ID. In mandates, it is mandate id stored at the merchant side. + +`upi_transaction_id` +: `string` The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +`amount` +: `integer` The amount of the mandate. + +`amount_rule` _mandatory_ +: `string` If this parameter value is max, the mandated amount can be less than or equal to the specified amount. If it is set to exact, the mandated amount should be the exact amount specified. + +`currency` +: `string` The currency of the mandate. Here, it is `INR`. + +`device` +: `object` The device details. + + `geocode` + : `string` The location coordinates of the device. + + `ip` + : `string` The IP address of the device. + +`payee` +: `object` The payee details. + + `vpa` + : `string` The VPA of the payee. + + `name` + : `string` The name of the payee. + + `mcc` + : `string` The merchant categorisation code of the payee. + +`payer` +: `object` The payer details. + + `vpa` + : `string` The VPA of the payer. + +`name` +: `string` The name of the mandate. + +`expire_at` +: `integer` The UNIX timestamp indicating the expiry date of the mandate. + +`block_fund` +: `boolean` Indicates whether the customer's funds should be blocked. This is applicable only for one-time mandates. For recurring, it should always be set to false. For one-time mandates, it can be either true or false. Default is false. + - `true`: The customer should be blocked. + - `false`: The customer should not be blocked. + +`revocable_by_payer` +: `boolean` Indicates whether the payer can revoke the mandate. This is applicable only for one-time mandates. For recurring, it should always be set to true. For one-time mandates, it can be either true or false. Default is true. + - `true`: The payer can revoke the mandate. + - `false`: The payer cannot revoke the mandate. + +`recurrence` +: `object` The recurring details of the mandate. + + `period` + : `string` Indicates how often you can execute the mandate. Possible values: + - `onetime`: This is for a one-time mandate. The customer provides authorisation to debit their account a single time for a specific amount. + - `daily`: Recurring mandate. The customer provides authorisation to debit their account daily for a specific amount. + - `weekly`: Recurring mandate. Authorisation given by a customer to debit their account weekly once for a specified amount. + - `fortnightly`: Recurring mandate. The customer provides authorisation to debit their account fortnightly for a specific amount. + - `monthly`: Recurring mandate. The customer provides authorisation to debit their account monthly for a specific amount. + - `bimonthly`: Recurring mandate. The customer provides authorisation to debit their account bimonthly for a specific amount. + - `quarterly`: Recurring mandate. The customer provides authorisation to debit their account quarterly for a specific amount. + - `halfyearly`: Recurring mandate. The customer provides authorisation to debit their account once in every 6 months for a specific amount. + - `yearly`: Recurring mandate. The customer provides authorisation to debit their account once a year for a specific amount. + - `aspresented`: In this case the mandates are triggered by merchants when they want to. The customer provides authorisation to debit their account whenever there is an execution request. + + `rule` + : `string` Indicates the recurrence rule of the mandate. This rule is not required for `onetime`, `daily`, and `aspresented` recurrence patterns. Possible values: + - `on` + - `before` + - `after` + + `value` + : `integer` The recurrence Value of the mandate. It is not required for `onetime`, `daily` and `aspresented` frequencies. Possible values: + - `weekly`: The value should be 1-Monday to 7-Sunday. + - `fortnightly`: The value should be 1 to 15/16 days. + - `monthly`, `bimonthly`, `quarterly`, `halfyearly` or `yearly`: The value should be 1 to 30/31 days. + +`validity` +: `object` The mandate validity details. + + `start_at` + : `integer` The UNIX timestamp indicating the start date of the mandate. + + `end_at` + : `integer` The UNIX timestamp indicating the end date of the mandate. + +`upi_reference_category` +: `string` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: NULL + - `01`: Advertisement + - `02`: Invoice + +`upi_reference_url` +: `string` Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction. + +`description` +: `string` The description of the mandate. + +`upi_initiation_mode` +: `enum` Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` +: `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`upi_response_code` +: `string` The response code issued by NPCI to the payer. + +`share_to_payee` +: `boolean` Indicates whether the mandate is shared with the payee. This is required only for onetime mandates initiated by the payer. For recurring mandates, you must set it to true. For onetime mandates, it can be either true or false. Default is true. Possible values: + - `true`: Mandate is shared. + - `false`: Mandate is not shared. + +`status` +: `string` Indicates the mandate status. Possible values: + - `initiated`: The mandate has been created and is awaiting a status update from NPCI. + - `active`: The mandate creation is successful. The mandate becomes active when NPCI sends a successful response in RespMandate. + - `completed`: This is a terminal state. The mandate can be completed in two cases. + - If the mandate reaches its validity end date. + - If the mandate has been revoked by a payer or a payee. + - `paused`: The customer has paused the mandate. + - `failed`: The mandate creation was unsuccessful. This is a terminal state, the client has to create a new mandate if failed. + +`created_at` +: `string` The UNIX timestamp at which the mandate request was created. diff --git a/llm-content/api/payments/tpap-pro/mandate-flow/fetch-mandates.md b/llm-content/api/payments/tpap-pro/mandate-flow/fetch-mandates.md new file mode 100644 index 00000000..8aa38193 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/mandate-flow/fetch-mandates.md @@ -0,0 +1,253 @@ +--- +title: Fetch Mandates +description: Fetch mandates using the Razorpay TPAP Pro API. +--- + +# Fetch Mandates + +## Fetch Mandates + +&refresh=true"> +Use this endpoint to fetch all mandates. + +### Request + +```curl: Curl +curl -X GET 'api.rzp..com/v1/upi/tpap/mandate?umn=&refresh=true' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +``` + +### Response + +```json: Success +{ + "entity": "upi.mandate", + "reference_id": "TXN1234567", + "upi_transaction_id": "RZP1KuSUGrp2l6MmPuT0163789452QPAY02", + "amount": 1722, + "amount_rule": "exact | max", + "currency": "inr", + "payee": { + "vpa": "acme.corp@rzp", + "name": "AcmeCorp Pvt. Ltd.", + "mcc": "6765" + }, + "payer": { + "vpa": "7262093972.stage@rzp", + "fundsource": { + "id": "fs_1234567" + } + }, + "name": "Name of the Mandate", + "expire_at": 1722317078, + "block_fund": false, + "revocable_by_payer": true, + "recurrence": { + "period": "onetime|daily|weekly|fortnightly|monthly|bimonthly|quarterly|halfyearly|yearly|aspresented", + "rule": "on | before | after", + "value": 1 + }, + "validity": { + "start_at": 1722317078, + "end_at": 1722317078 + }, + "upi_reference_category": "02", + "upi_reference_url": "https://www.abcxyz.com/", + "description": "Sample Mandate Request", + "upi_credentials": {}, // Upi credentials received from WebCL + "upi_initiation_mode": "00", + "upi_purpose_code": "00", + "share_to_payee": true, + "umn": "umn" +} +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount if mandatory", + "source":"internal", + "step":"", + "reason":"Amount must be greater than 0", + "field":"amount", + "metadata":null + } +} +``` + +### Parameters + +`umn` _mandatory_ +: `string` The Unique Mandate Number returned in the create mandate API response. + +### Parameters + +`entity` +: `string` The entity type. + +`umn` +: `string` The Unique Mandate Number, assigned to each mandate, used to track, manage, and reference specific mandates. The switch will create a UUID-based UMN of 32 characters. The UMN should be random, unique, secure, and active. For example, `XYZa977ccabb11e7abc4cec278b6b50a@mypsp`. The total length of the UMN address should be 70 digits. + +`reference_id` +: `string` Indicates your reference ID. In mandates, it is mandate id stored at the business side. + +`upi_transaction_id` +: `string` The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value must start with a prefix given by NPCI to Switch. +> + +`amount` +: `integer` The amount of the mandate. + +`amount_rule` _mandatory_ +: `string` If this parameter value is max, the mandated amount can be less than or equal to the specified amount. If it is set to exact, the mandated amount should be the exact amount specified. + +`currency` +: `string` The currency of the mandate. Here, it is `INR`. + +`payee` +: `object` The payee details. + + `vpa` + : `string` The VPA of the payee. + + `name` + : `string` The name of the payee. + + `mcc` + : `string` The merchant categorisation code of the payee. + +`payer` +: `object` The payer details. + + `vpa` + : `string` The VPA of the payer. + +`name` +: `string` The name of the mandate. + +`expire_at` +: `integer` The UNIX timestamp indicating the expiry date of the mandate. + +`block_fund` +: `boolean` Indicates whether the customer's funds should be blocked. This is applicable only for one-time mandates. For recurring, it always must be set to false. For one-time mandates, it can be either true or false. The default is. + - `true`: The customer must be blocked. + - `false`: The customer must not be blocked. + +`revocable_by_payer` +: `boolean` Indicates whether the payer can revoke the mandate. This is applicable only for one-time mandates. For recurring, it always must be set to true. For one-time mandates, it can be either true or false. Default is true. + - `true`: The payer can revoke the mandate. + - `false`: The payer cannot revoke the mandate. + +`recurrence` +: `object` The recurring details of the mandate. + + `period` + : `string` Indicates how often you can execute the mandate. Possible values: + - `onetime`: This is for a one-time mandate. The customer provides authorisation to debit their account a single time for a specific amount. + - `daily`: Recurring mandate. The customer provides authorisation to debit their account daily for a specific amount. + - `weekly`: Recurring mandate. Authorisation given by a customer to debit their account weekly once for a specified amount. + - `fortnightly`: Recurring mandate. The customer provides authorisation to debit their account fortnightly for a specific amount. + - `monthly`: Recurring mandate. The customer provides authorisation to debit their account monthly for a specific amount. + - `bimonthly`: Recurring mandate. The customer provides authorisation to debit their account bimonthly for a specific amount. + - `quarterly`: Recurring mandate. The customer provides authorisation to debit their account quarterly for a specific amount. + - `halfyearly`: Recurring mandate. The customer provides authorisation to debit their account once in every 6 months for a specific amount. + - `yearly`: Recurring mandate. The customer provides authorisation to debit their account once a year for a specific amount. + - `aspresented`: In this case the  mandates are triggered by merchants when they want to. The customer provides authorisation to debit their account whenever there is an execution request. + + `rule` + : `string` Indicates the recurrence rule of the mandate. This rule is not required for `onetime`, `daily`, and `aspresented` recurrence patterns. Possible values: + - `on` + - `before` + - `after` + + `value` + : `integer` The recurrence value of the mandate. It is not required for `onetime`, `daily` and `aspresented` frequencies. Possible values: + - `weekly`: The value should be 1-Monday to 7-Sunday. + - `fortnightly`: The value should be 1 to 15/16 days. + - `monthly`, `bimonthly`, `quarterly`, `halfyearly` or `yearly`: The value should be 1 to 30/31 days. + +`validity` +: `object` The mandate validity details. + + `start_at` + : `integer` The UNIX timestamp indicating the start date of the mandate. + + `end_at` + : `integer` The UNIX timestamp indicating the end date of the mandate. + +`upi_reference_category` +: `string` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: NULL + - `01`: Advertisement + - `02`: Invoice + +`upi_reference_url` +: `string` Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details, and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction. + +`description` +: `string` The description of the mandate. + +`upi_initiation_mode` +: `enum` Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` +: `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`upi_response_code` +: `string` The response code issued by NPCI to the payer. + +`share_to_payee` +: `boolean` Indicates whether the mandate is shared with the payee. This is required only for onetime mandates initiated by the payer. For recurring mandates, you must set it to true. For onetime mandates, it can be either `true` or `false`. Default is true. Possible values: + - `true`: Mandate is shared. + - `false`: Mandate is not shared. + +`status` +: `string` Indicates the mandate status. Possible values: + - `initiated`: The mandate has been created and is awaiting a status update from NPCI. + - `active`: The mandate creation is successful. The mandate becomes active when NPCI sends a successful response in RespMandate. + - `completed`: This is a terminal state. The mandate can be completed in two cases. + - If the mandate reaches its validity end date. + - If the mandate has been revoked by a payer or a payee. + - `paused`: The customer has paused the mandate. + - `failed`: The mandate creation was unsuccessful. This is a terminal state, the client has to create a new mandate if failed. diff --git a/llm-content/api/payments/tpap-pro/mandate-flow/pause-resume-mandate.md b/llm-content/api/payments/tpap-pro/mandate-flow/pause-resume-mandate.md new file mode 100644 index 00000000..85c251e9 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/mandate-flow/pause-resume-mandate.md @@ -0,0 +1,320 @@ +--- +title: Pause or Resume a Mandate +description: Pause or resume a mandate using the Razorpay TPAP Pro API. +--- + +# Pause or Resume a Mandate + +## Pause or Resume a Mandate + +Use this endpoint to pause or resume a mandate. + +### Request + +```curl: Curl +curl -X PATCH 'api.rzp..com/v1/upi/tpap/mandates/:umn' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "reference_id": "TXN1234567", + "upi_transaction_id": "RZP1KuSUGrp2l6MmPuT0163789452QPAY02", + "expire_at": 1722317078, + "action": "pause | unpause", + "pause": { + "start_at": 1722317078, + "end_at": 1722317078 + }, + "device": { + "geocode": "1234.1213", + "ip": "198.1.1.1" + }, + "upi_credentials": {}, // Upi credentials received from WebCL + "description": "Sample Mandate Pause Request" +}' +``` + +### Response + +```json: Success +{ + "entity":"upi.mandate", + "reference_id":"TXN1234567", + "umn":"umn", + "upi_transaction_id":"RZP1KuSUGrp2l6MmPuT0163789452QPAY02", + "amount":1722, + "amount_rule":"exact | max", + "currency":"inr", + "payee":{ + "vpa":"acme.corp@rzp", + "name":"AcmeCorp Pvt. Ltd.", + "mcc":"6765" + }, + "payer":{ + "vpa":"7262093972.stage@rzp" + }, + "name":"Name of the Mandate", + "expire_at":1722317078, + "block_fund":false, + "revocable_by_payer":true, + "recurrence":{ + "period":"onetime|daily|weekly|fortnightly|monthly|bimonthly|quarterly|halfyearly|yearly|aspresented", + "rule":"on | before | after", + "value":1 + }, + "validity":{ + "start_at":1722317078, + "end_at":1722317078 + }, + "pause":{ + "start_at":1722317078, + "end_at":1722317078 + }, + "upi_reference_category":"02", + "upi_reference_url":"https://www.abcxyz.com/", + "description":"Sample Mandate Request", + "upi_initiation_mode":"00", + "upi_purpose_code":"00", + "upi_response_code":"00", + "share_to_payee":true, + "status":"initiated" +} +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount if mandatory", + "source":"internal", + "step":"", + "reason":"Amount must be greater than 0", + "field":"amount", + "metadata":null + } +} +``` + +### Parameters + +`reference_id` _mandatory_ +: `string` Indicates the merchant reference identifier. In mandate, this will be a mandate id stored at the merchant side. + +`upi_transaction_id` _mandatory_ +: `string` The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +`expire_at` _mandatory_ +: `integer` The UNIX timestamp indicating the time of the mandate expiration. + +`action` _mandatory_ +: `string` The type of the action of a mandate. Possible values: + - `update` + - `revoke` + +`pause` +: `object` The mandate action details. + + `start_at` _optional_ + : `string` The UNIX timestamp indicates when the mandate should be paused. + + `end_at` _optional_ + : `string` The UNIX timestamp indicates when the mandate should be resumed. + +`device` _optional_ +: `object` The device details. + + `ip` + : `string` The IP address of the device. + + `geocode` + : `string` The location coordinates of the device. For example, `12.9667,77.5667`. + +`upi_credentials` _mandatory_ +: `string` The encrypted UPI credentials with the user's MPIN. + +### Parameters + +`entity` +: `string` The entity type. + +`reference_id` +: `string` Indicates the merchant reference ID. In mandates, it is mandate id stored at the merchant side. + +`umn` +: `string` The Unique Mandate Number, assigned to each mandate, used to track, manage, and reference specific mandates. The switch will create a UUID-based UMN of 32 characters. The UMN should be random, non-guessable and active. For example, `XYZa977ccabb11e7abc4cec278b6b50a@mypsp`. The total length of the UMN address should be 70digit. + +`upi_transaction_id` +: `string` The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +`amount` +: `integer` The amount of the mandate. + +`amount_rule` _mandatory_ +: `string` If this parameter value is max, the mandated amount can be less than or equal to the specified amount. If it is set to exact, the mandated amount should be the exact amount specified. + +`currency` +: `string` The currency of the mandate. Here, it is `INR`. + +`payee` +: `object` The payee details. + + `vpa` + : `string` The VPA of the payee. + + `name` + : `string` The name of the payee. + + `mcc` + : `string` The merchant categorisation code of the payee. + +`payer` +: `object` The payer details. + + `vpa` + : `string` The VPA of the payer. + +`name` +: `string` The name of the mandate. + +`expire_at` +: `integer` The UNIX timestamp indicating the expiry date of the mandate. + +`block_fund` +: `boolean` Indicates whether the customer's funds should be blocked. This is applicable only for one-time mandates. For recurring, it should always be set to false. For one-time mandates, it can be either true or false. Default is false. + - `true`: The customer should be blocked. + - `false`: The customer should not be blocked. + +`revocable_by_payer` +: `boolean` Indicates whether the payer can revoke the mandate. This is applicable only for one-time mandates. For recurring, it should always be set to true. For one-time mandates, it can be either true or false. Default is true. + - `true`: The payer can revoke the mandate. + - `false`: The payer cannot revoke the mandate. + +`recurrence` +: `object` The recurring details of the mandate. + + `period` + : `string` Indicates how often you can execute the mandate. Possible values: + - `onetime`: This is for a one-time mandate. The customer provides authorisation to debit their account a single time for a specific amount. + - `daily`: Recurring mandate. The customer provides authorisation to debit their account daily for a specific amount. + - `weekly`: Recurring mandate. Authorisation given by a customer to debit their account weekly once for a specified amount. + - `fortnightly`: Recurring mandate. The customer provides authorisation to debit their account fortnightly for a specific amount. + - `monthly`: Recurring mandate. The customer provides authorisation to debit their account monthly for a specific amount. + - `bimonthly`: Recurring mandate. The customer provides authorisation to debit their account bimonthly for a specific amount. + - `quarterly`: Recurring mandate. The customer provides authorisation to debit their account quarterly for a specific amount. + - `halfyearly`: Recurring mandate. The customer provides authorisation to debit their account once in every 6 months for a specific amount. + - `yearly`: Recurring mandate. The customer provides authorisation to debit their account once a year for a specific amount. + - `aspresented`: In this case the mandates are triggered by merchants when they want to. The customer provides authorisation to debit their account whenever there is an execution request. + + `rule` + : `string` Indicates the recurrence rule of the mandate. This rule is not required for `onetime`, `daily`, and `aspresented` recurrence patterns. Possible values: + - `on` + - `before` + - `after` + + `value` + : `integer` The recurrence Value of the mandate. It is not required for `onetime`, `daily` and `aspresented` frequencies. Possible values: + - `weekly`: The value should be 1-Monday to 7-Sunday. + - `fortnightly`: The value should be 1 to 15/16 days. + - `monthly`, `bimonthly`, `quarterly`, `halfyearly` or `yearly`: The value should be 1 to 30/31 days. + +`validity` +: `object` The mandate validity details. + + `start_at` + : `integer` The UNIX timestamp indicating the start date of the mandate. + + `end_at` + : `integer` The UNIX timestamp indicating the end date of the mandate. + +`pause` +: `object` The mandate action details. + + `start_at` + : `string` The UNIX timestamp indicates when the mandate should be paused. + + `end_at` + : `string` The UNIX timestamp indicates when the mandate should be resumed. + +`upi_reference_category` +: `string` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: NULL + - `01`: Advertisement + - `02`: Invoice + +`upi_reference_url` +: `string` Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details, and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction. + +`description` +: `string` The description of the mandate. + +`upi_initiation_mode` +: `enum` Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` +: `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`upi_response_code` +: `string` The response code issued by NPCI to the payer. + +`share_to_payee` +: `boolean` Indicates whether the mandate is shared with the payee. This is required only for onetime mandates initiated by the payer. For recurring mandates, you must set it to true. For onetime mandates, it can be either true or false. Default is true. Possible values: + - `true`: Mandate is shared. + - `false`: Mandate is not shared. + +`status` +: `string` Indicates the mandate status. Possible values: + - `initiated`: The mandate has been created and is awaiting a status update from NPCI. + - `active`: The mandate creation is successful. The mandate becomes active when NPCI sends a successful response in RespMandate. + - `completed`: This is a terminal state. The mandate can be completed in two cases. + - If the mandate reaches its validity end date. + - If the mandate has been revoked by a payer or a payee. + - `paused`: The customer has paused the mandate. + - `failed`: The mandate creation was unsuccessful. This is a terminal state, the client has to create a new mandate if failed. diff --git a/llm-content/api/payments/tpap-pro/mandate-flow/reject-mandates.md b/llm-content/api/payments/tpap-pro/mandate-flow/reject-mandates.md new file mode 100644 index 00000000..c64502bf --- /dev/null +++ b/llm-content/api/payments/tpap-pro/mandate-flow/reject-mandates.md @@ -0,0 +1,274 @@ +--- +title: Reject Mandates +description: Reject mandates using the Razorpay TPAP Pro API. +--- + +# Reject Mandates + +## Reject Mandates + +Use this endpoint to reject a mandate. + +### Request + +```curl: Curl +curl -X POST 'api.rzp..com/v1/mandates/:umn' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-D '{ + "reference_id": "TXN1234567", + "upi_transaction_id": "RZP1KuSUGrp2l6MmPuT0163789452QPAY02", + "device": { + "geocode": "1234.1213", + "ip": "198.1.1.1" + } +}' +``` + +### Response + +```json: Success +{ + "entity":"upi.mandate", + "reference_id":"TXN1234567", + "upi_transaction_id":"RZP1KuSUGrp2l6MmPuT0163789452QPAY02", + "amount":100, + "amount_rule":"exact | max", + "currency":"inr", + "payee":{ + "vpa":"acme.corp@rzp", + "name":"AcmeCorp Pvt. Ltd.", + "mcc":"6765" + }, + "payer":{ + "vpa":"7262093972.stage@rzp" + }, + "name":"Name of the Mandate", + "expire_at":1728193657, + "block_fund":false, + "revocable_by_payer":true, + "recurrence":{ + "period":"onetime|daily|weekly|fortnightly|monthly|bimonthly|quarterly|halfyearly|yearly|aspresented", + "rule":"on | before | after", + "value":1 + }, + "validity":{ + "start_at":1722317078, + "end_at":1722317078 + }, + "upi_reference_category":"02", + "upi_reference_url":"https://www.abcxyz.com/", + "description":"Sample Mandate Request", + "upi_initiation_mode":"00", + "upi_purpose_code":"00", + "upi_response_code":"00", + "umn":"umn", + "share_to_payee":true, + "status":"pending|success|failed", + "created_at":1728193657 +} +``` + +### Parameters + +`reference_id` _mandatory_ +: `string` The mandate identifier created by the payer. + +`upi_transaction_id` _mandatory_ +: `string` The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +`device` _optional_ +: `object` The device details. + + `ip` + : `string` The IP address of the device. + + `geocode` + : `string` The location coordinates of the device. For example, `12.9667,77.5667`. + +### Parameters + +`entity` +: `string` The entity type. + +`reference_id` +: `string` Indicates the merchant reference ID. In mandates, it is mandate id stored at the merchant side. + +`upi_transaction_id` +: `string` The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +`amount` +: `integer` The amount of the mandate. + +`amount_rule` _mandatory_ +: `string` If this parameter value is max, the mandated amount can be less than or equal to the specified amount. If it is set to exact, the mandated amount should be the exact amount specified. + +`currency` +: `string` The currency of the mandate. Here, it is `INR`. + +`payee` +: `object` The payee details. + + `vpa` + : `string` The VPA of the payee. + + `name` + : `string` The name of the payee. + + `mcc` + : `string` The merchant categorisation code of the payee. + +`payer` +: `object` The payer details. + + `vpa` + : `string` The VPA of the payer. + +`name` +: `string` The name of the mandate. + +`expire_at` +: `integer` The UNIX timestamp indicating the expiry date of the mandate. + +`block_fund` +: `boolean` Indicates whether the customer's funds should be blocked. This is applicable only for one-time mandates. For recurring, it should always be set to false. For one-time mandates, it can be either true or false. Default is false. + - `true`: The customer should be blocked. + - `false`: The customer should not be blocked. + +`revocable_by_payer` +: `boolean` Indicates whether the payer can revoke the mandate. This is applicable only for one-time mandates. For recurring, it should always be set to true. For one-time mandates, it can be either true or false. Default is true. + - `true`: The payer can revoke the mandate. + - `false`: The payer cannot revoke the mandate. + +`recurrence` +: `object` The recurring details of the mandate. + + `period` + : `string` Indicates how often you can execute the mandate. Possible values: + - `onetime`: This is for a one-time mandate. The customer provides authorisation to debit their account a single time for a specific amount. + - `daily`: Recurring mandate. The customer provides authorisation to debit their account daily for a specific amount. + - `weekly`: Recurring mandate. Authorisation given by a customer to debit their account weekly once for a specified amount. + - `fortnightly`: Recurring mandate. The customer provides authorisation to debit their account fortnightly for a specific amount. + - `monthly`: Recurring mandate. The customer provides authorisation to debit their account monthly for a specific amount. + - `bimonthly`: Recurring mandate. The customer provides authorisation to debit their account bimonthly for a specific amount. + - `quarterly`: Recurring mandate. The customer provides authorisation to debit their account quarterly for a specific amount. + - `halfyearly`: Recurring mandate. The customer provides authorisation to debit their account once in every 6 months for a specific amount. + - `yearly`: Recurring mandate. The customer provides authorisation to debit their account once a year for a specific amount. + - `aspresented`: In this case the  mandates are triggered by merchants when they want to. The customer provides authorisation to debit their account whenever there is an execution request. + + `rule` + : `string` Indicates the recurrence rule of the mandate. This rule is not required for `onetime`, `daily`, and `aspresented` recurrence patterns. Possible values: + - `on` + - `before` + - `after` + + `value` + : `integer` The recurrence Value of the mandate. It is not required for `onetime`, `daily`, and `aspresented` frequencies. Possible values: + - `weekly`: The value should be 1-Monday to 7-Sunday. + - `fortnightly`: The value should be 1 to 15/16 days. + - `monthly`, `bimonthly`, `quarterly`, `halfyearly` or `yearly`: The value should be 1 to 30/31 days. + +`validity` +: `object` The mandate validity details. + + `start_at` + : `integer` The UNIX timestamp indicating the start date of the mandate. + + `end_at` + : `integer` The UNIX timestamp indicating the end date of the mandate. + +`upi_reference_category` +: `string` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: NULL + - `01`: Advertisement + - `02`: Invoice + +`upi_reference_url` +: `string` Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details, and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction. + +`description` +: `string` The description of the mandate. + +`upi_initiation_mode` +: `enum` Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` +: `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`upi_response_code` +: `string` The response code issued by NPCI to the payer. + +`umn` +: `string` The Unique Mandate Number, assigned to each mandate, used to track, manage, and reference specific mandates. The switch will create a UUID-based UMN of 32 characters. The UMN should be random, non-guessable and active. For example, `XYZa977ccabb11e7abc4cec278b6b50a@mypsp`. The total length of the UMN address should be 70digit. + +`share_to_payee` +: `boolean` Indicates whether the mandate is shared with the payee. This is required only for onetime mandates initiated by the payer. For recurring mandates, you must set it to true. For onetime mandates, it can be either true or false. Default is true. Possible values: + - `true`: Mandate is shared. + - `false`: Mandate is not shared. + +`txn_type` +: `string` The type of mandate creation. + +`status` +: `string` Indicates the mandate status. Possible values: + - `initiated`: The mandate has been created and is awaiting a status update from NPCI. + - `active`: The mandate creation is successful. The mandate becomes active when NPCI sends a successful response in RespMandate. + - `completed`: This is a terminal state. The mandate can be completed in two cases. + - If the mandate reaches its validity end date. + - If the mandate has been revoked by a payer or a payee. + - `paused`: The customer has paused the mandate. + - `failed`: The mandate creation was unsuccessful. This is a terminal state, the client has to create a new mandate if failed. + +`created_at` +: `string` The UNIX timestamp at which the mandate request was created. diff --git a/llm-content/api/payments/tpap-pro/mandate-flow/update-revoke-mandate.md b/llm-content/api/payments/tpap-pro/mandate-flow/update-revoke-mandate.md new file mode 100644 index 00000000..743111d3 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/mandate-flow/update-revoke-mandate.md @@ -0,0 +1,329 @@ +--- +title: Update or Revoke a Mandate +description: Update or revoke a mandate using the Razorpay TPAP Pro API. +--- + +# Update or Revoke a Mandate + +## Update or Revoke a Mandate + +Use this endpoint to update or revoke a mandate. + +### Request + +```curl: Curl +curl -X PATCH 'api.rzp..com/v1/upi/tpap/mandates/:umn' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "reference_id": "TXN1234567", + "upi_transaction_id": "RZP1KuSUGrp2l6MmPuT0163789452QPAY02", + "amount": 1722, + "expire_at": 1722317078, + "action": "update | revoke", + "device": { + "geocode": "1234.1213", + "ip": "198.1.1.1" + }, + "validity": { + "end_at": 1722317078 + }, + "upi_credentials": {},// Upi credentials received from WebCL + "description": "Sample Mandate Update Request" +}' +``` + +### Response + +```json: Success +{ + "entity":"upi.mandate", + "reference_id":"TXN1234567", + "umn":"umn", + "upi_transaction_id":"RZP1KuSUGrp2l6MmPuT0163789452QPAY02", + "amount":1722, + "amount_rule":"exact | max", + "currency":"inr", + "payee":{ + "vpa":"acme.corp@rzp", + "name":"AcmeCorp Pvt. Ltd.", + "mcc":"6765" + }, + "payer":{ + "vpa":"7262093972.stage@rzp" + }, + "name":"Name of the Mandate", + "expire_at":1722317078, + "block_fund":false, + "revocable_by_payer":true, + "recurrence":{ + "period":"onetime|daily|weekly|fortnightly|monthly|bimonthly|quarterly|halfyearly|yearly|aspresented", + "rule":"on | before | after", + "value":1 + }, + "validity":{ + "start_at":1722317078, + "end_at":1722317078 + }, + "pause":{ + "start_at":1722317078, + "end_at":1722317078 + }, + "upi_reference_category":"02", + "upi_reference_url":"https://www.abcxyz.com/", + "description":"Sample Mandate Request", + "upi_initiation_mode":"00", + "upi_purpose_code":"00", + "upi_response_code":"00", + "share_to_payee":true, + "status":"initiated" +} +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount if mandatory", + "source":"internal", + "step":"", + "reason":"Amount must be greater than 0", + "field":"amount", + "metadata":null + } +} +``` + +### Parameters + +`reference_id` _mandatory_ +: `string` Indicates the merchant reference identifier. In mandate, this will be a mandate id stored at the merchant side. + +`upi_transaction_id` _mandatory_ +: `string` The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +`amount` _conditional_ +: `integer` The amount of the mandate. This parameter is required when the mandated amount needs to be updated, and the request_type is set to update. Either the validity_end or the amount must be provided. + +`expire_at` _mandatory_ +: `integer` The UNIX timestamp indicating the time of the mandate expiration. + +`action` _mandatory_ +: `string` The type of the action of a mandate. Possible values: + - `update` + - `revoke` + +`device` _optional_ +: `object` The device details. + + `ip` + : `string` The IP address of the device. + + `geocode` + : `string` The location coordinates of the device. For example, `12.9667,77.5667`. + +`validity` +: `object` The mandate validity details. + + `end_at` _conditional_ + : `integer` The UNIX timestamp before which the mandate can be executed. This is required only when the validity end date needs to be updated and the request_type is updated. Either the validity_end or the amount must be provided. + +`pause` +: `object` The mandate action details. + + `start_at` _optional_ + : `string` The UNIX timestamp indicates when the mandate should be paused. + + `end_at` _optional_ + : `string` The UNIX timestamp indicates when the mandate should be resumed. + +`description` _optional_ +: `string` The description of the mandate. + +### Parameters + +`entity` +: `string` The entity type. + +`reference_id` +: `string` Indicates the merchant reference ID. In mandates, it is mandate id stored at the merchant side. + +`umn` +: `string` The Unique Mandate Number, assigned to each mandate, used to track, manage, and reference specific mandates. The switch will create a UUID-based UMN of 32 characters. The UMN should be random, non-guessable and active. For example, `XYZa977ccabb11e7abc4cec278b6b50a@mypsp`. The total length of the UMN address should be 70digit. + +`upi_transaction_id` +: `string` The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +`amount` +: `integer` The amount of the mandate. + +`amount_rule` _mandatory_ +: `string` If this parameter value is max, the mandated amount can be less than or equal to the specified amount. If it is set to exact, the mandated amount should be the exact amount specified. + +`currency` +: `string` The currency of the mandate. Here, it is `INR`. + +`payee` +: `object` The payee details. + + `vpa` + : `string` The VPA of the payee. + + `name` + : `string` The name of the payee. + + `mcc` + : `string` The merchant categorisation code of the payee. + +`payer` +: `object` The payer details. + + `vpa` + : `string` The VPA of the payer. + +`name` +: `string` The name of the mandate. + +`expire_at` +: `integer` The UNIX timestamp indicating the expiry date of the mandate. + +`block_fund` +: `boolean` Indicates whether the customer's funds should be blocked. This is applicable only for one-time mandates. For recurring, it should always be set to false. For one-time mandates, it can be either true or false. Default is false. + - `true`: The customer should be blocked. + - `false`: The customer should not be blocked. + +`revocable_by_payer` +: `boolean` Indicates whether the payer can revoke the mandate. This is applicable only for one-time mandates. For recurring, it should always be set to true. For one-time mandates, it can be either true or false. Default is true. + - `true`: The payer can revoke the mandate. + - `false`: The payer cannot revoke the mandate. + +`recurrence` +: `object` The recurring details of the mandate. + + `period` + : `string` Indicates how often you can execute the mandate. Possible values: + - `onetime`: This is for a one-time mandate. The customer provides authorisation to debit their account a single time for a specific amount. + - `daily`: Recurring mandate. The customer provides authorisation to debit their account daily for a specific amount. + - `weekly`: Recurring mandate. Authorisation given by a customer to debit their account weekly once for a specified amount. + - `fortnightly`: Recurring mandate. The customer provides authorisation to debit their account fortnightly for a specific amount. + - `monthly`: Recurring mandate. The customer provides authorisation to debit their account monthly for a specific amount. + - `bimonthly`: Recurring mandate. The customer provides authorisation to debit their account bimonthly for a specific amount. + - `quarterly`: Recurring mandate. The customer provides authorisation to debit their account quarterly for a specific amount. + - `halfyearly`: Recurring mandate. The customer provides authorisation to debit their account once in every 6 months for a specific amount. + - `yearly`: Recurring mandate. The customer provides authorisation to debit their account once a year for a specific amount. + - `aspresented`: In this case the  mandates are triggered by merchants when they want to. The customer provides authorisation to debit their account whenever there is an execution request. + + `rule` + : `string` Indicates the recurrence rule of the mandate. This rule is not required for `onetime`, `daily`, and `aspresented` recurrence patterns. Possible values: + - `on` + - `before` + - `after` + + `value` + : `integer` The recurrence Value of the mandate. It is not required for onetime, daily and aspresented frequencies. Possible values: + - `weekly`: The value should be 1-Monday to 7-Sunday. + - `fortnightly`: The value should be 1 to 15/16 days. + - `monthly`, `bimonthly`, `quarterly`, `halfyearly` or `yearly`: The value should be 1 to 30/31 days. + +`validity` +: `object` The mandate validity details. + + `start_at` + : `integer` The UNIX timestamp indicating the start date of the mandate. + + `end_at` + : `integer` The UNIX timestamp indicating the end date of the mandate. + +`pause` +: `object` The mandate action details. + + `start_at` + : `string` The UNIX timestamp indicates when the mandate should be paused. + + `end_at` + : `string` The UNIX timestamp indicates when the mandate should be resumed. + +`upi_reference_category` +: `string` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: NULL + - `01`: Advertisement + - `02`: Invoice + +`upi_reference_url` +: `string` Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details, and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction. + +`description` +: `string` The description of the mandate. + +`upi_initiation_mode` +: `enum` Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` +: `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`upi_response_code` +: `string` The response code issued by NPCI to the payer. + +`share_to_payee` +: `boolean` Indicates whether the mandate is shared with the payee. This is required only for onetime mandates initiated by the payer. For recurring mandates, you must set it to true. For onetime mandates, it can be either true or false. Default is true. Possible values: + - `true`: Mandate is shared. + - `false`: Mandate is not shared. + +`status` +: `string` Indicates the mandate status. Possible values: + - `initiated`: The mandate has been created and is awaiting a status update from NPCI. + - `active`: The mandate creation is successful. The mandate becomes active when NPCI sends a successful response in RespMandate. + - `completed`: This is a terminal state. The mandate can be completed in two cases. + - If the mandate reaches its validity end date. + - If the mandate has been revoked by a payer or a payee. + - `paused`: The customer has paused the mandate. + - `failed`: The mandate creation was unsuccessful. This is a terminal state, the client has to create a new mandate if failed. diff --git a/llm-content/api/payments/tpap-pro/payments-flow.md b/llm-content/api/payments/tpap-pro/payments-flow.md new file mode 100644 index 00000000..ca49d9ec --- /dev/null +++ b/llm-content/api/payments/tpap-pro/payments-flow.md @@ -0,0 +1,47 @@ +--- +title: Payments +description: Know about TPAP Pro payments flow and list of endpoints. +--- + +# Payments + +Razorpay's TPAP Pro - Payments APIs lets you manage different transactions such as make and collect payments, approve and reject collect requests. You can also fetch the list of transactions using the API. + + + + + Below are the steps to integrate TPAP Pro. You can also refer to our comprehensive [TPAP Pro integration guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md). + +1. [Customer Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/customer-onboarding.md) +2. [Manage Funds and Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/funds-account-management.md) +3. Payments +4. [Mandates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/mandate-flow.md) +5. [Complaints](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/complaints-flow.md) +6. [UPI Numbers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/upi-number.md) +7. [UPI Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/fundsource-lite.md) + + +### Related Guides + +[About TPAP Pro](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro.md) +[Integrate With TPAP Pro](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md) + +### Endpoints + +- **post** `/v1/upi/tpap/vpa/resolve` - Resolve VPAs: + Resolves a VPA. + +- **post** `/v1/payments/pay` - Make a Payment: + Makes a payment. + +- **post** `/v1/payments/collect` - Collect a Payment: + Collects a payment. + +- **post** `/v1/payments/:upi_transaction_id/approve` - Approve a Collect Request: + Approves a collect request. + +- **post** `/v1/payments/:upi_transaction_id/reject` - Reject a Collect Request: + Rejects a collect request. + +- **get** `/v1/upi/tpap/paymentsrefresh=true&upi_transaction_id=RZPkbnkb98scbkhbnj89b&reference_id=RSKwpINfSkdEvtdxf&type=collect&status=deemed` - Fetch Payments: + Fetch a list of payments. diff --git a/llm-content/api/payments/tpap-pro/payments-flow/approve-collect-requests.md b/llm-content/api/payments/tpap-pro/payments-flow/approve-collect-requests.md new file mode 100644 index 00000000..1fd62fef --- /dev/null +++ b/llm-content/api/payments/tpap-pro/payments-flow/approve-collect-requests.md @@ -0,0 +1,245 @@ +--- +title: Approve a Collect Request +description: Approve a collect request using the Razorpay TPAP Pro API. +--- + +# Approve a Collect Request + +## Approve a Collect Request + +Use this endpoint to approve a collect request.  A collect request is approved if this API returns the Success 200 response code. The response contains the payment `status` returned by NPCI. Status can be `pending`, `successful` or `failed`. + +### Request + +```curl: Curl +curl -X POST 'api.rzp..com/v1/payments/:upi_transaction_id/approve' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "device": { + "geocode": "1234.1213", + "ip": "198.1.1.1" + }, + "upi_credentials": {} +}' +``` + +### Response + +```json: Response +{ + "entity":"upi.payment", + "upi_transaction_id":"RZPc2ed455b797e4add8392110cfc528acc", + "reference_id":"ord_somfv432nsa", + "upi_customer_reference_number":"804813039157", + "upi_reference_url":"https://www.test.com", + "upi_reference_category":"00", + "upi_initiation_mode":"00", + "upi_purpose_code":"00", + "currency":"INR", + "amount":10024, + "type":"pay | collect", + "description":"flight tickets", + "payer":{ + "vpa":"gaurav.kumar@exampleupi", + "fundsource":{ + "ifsc":"AXIS0000058", + "masked_account_number":"XXXXXXXXXXX3000" + }, + "name":"Gaurav Kumar", + "mcc":"0000", + "upi_response_code":"00", + "upi_reversal_response_code":"string" + }, + "payees":[ + { + "vpa":"acme.corp@rzp", + "fundsource":{ + "ifsc":"HDFC0000058", + "masked_account_number":"XXXXXXXXXXX6000" + }, + "name":"AcmeCorp Pvt. Ltd.", + "mcc":"6765", + "upi_response_code":"00", + "upi_reversal_response_code":"string" + } + ], + "status":"pending | success | failed", + "created_at":"1722317078", + "expire_at":"1722317078" +} +``` + +### Parameters + +`upi_transaction_id` _mandatory_ +: `string` The unique identifier of the transaction across all entities in UPI created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +### Parameters + +`device` _mandatory_ +: `object` The device details. + + `geocode` + : `string` The location coordinates of the device. + + `ip` + : `string` The IP address of the device. + +`upi_credentials` _mandatory_ +: `object` Encrypted credentials as created by NPCI. + +### Parameters + +`entity` +: `string` The entity type. Here, it is `payment`. + +`upi_transaction_id` +: `string` The unique identifier of the transaction across all entities in UPI created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +`reference_id` +: `string` Indicates the transaction ID used by merchants for their reference. It is used at the business level and not in the UPI ecosystem. This value should be alphanumeric and between 1 and 35 characters. + +`upi_customer_reference_number` +: `string` Indicates the UPI customer reference number. This is present in bank account statements as UTR. Additionally, this ID is shared with customers on TPAPs. + +`upi_reference_url` +: `string` Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details, and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction. + +`upi_reference_category` +: `string` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: NULL + - `01`: Advertisement + - `02`: Invoice + +`upi_initiation_mode` +: `enum` Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` +: `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`currency` +: `string` The currency of the amount. Here, it is `INR`. + +`amount` +: `integer` The amount in paise. + +`type` +: `string` The type of the payment. Possible values: + - `pay` + - `collect` + +`description` +: `string` The description of the payment. + +`payer` +: `object` The payer details. + + `vpa` + : `string` The VPA of the payer. + + `fundsource` + : `object` The payer's payment source details. + + `ifsc` + : `string` The IFSC of the payment source. + + `masked_account_number` + : `string` The masked account number of the payment source. + + `name` + : `string` The name of the payer. + + `upi_response_code` + : `string` The response code issued by NPCI to the payer. + + `upi_reversal_response_code` + : `string` The reversal response code issued by NPCI to the payer. This is an optional parameter received as a response. + +`payees` +: `object` The payee details. + + `vpa` + : `string` The VPA of the payee. + + `fundsource` + : `object` The payer's payment source details. + + `ifsc` + : `string` The IFSC of the payment source. + + `masked_account_number` + : `string` The masked account number of the payment source. + + `name` + : `string` The name of the payee. + + `upi_response_code` + : `string` The response code issued by NPCI to the payee. + + `upi_reversal_response_code` + : `string` The reversal response code issued by NPCI to the payee. This is an optional parameter received as a response. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `initiated` + - `pending` + - `success` + - `failed` + +`created_at` +: `integer` The UNIX timestamp of the payment creation. + +`expire_at` +: `integer` The UNIX timestamp of the collect request. diff --git a/llm-content/api/payments/tpap-pro/payments-flow/collect-payments.md b/llm-content/api/payments/tpap-pro/payments-flow/collect-payments.md new file mode 100644 index 00000000..e062d595 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/payments-flow/collect-payments.md @@ -0,0 +1,261 @@ +--- +title: Collect a Payment +description: Collect a payment using the Razorpay API. +--- + +# Collect a Payment + +## Collect a Payment + +UPI allows a customer or a payee to request a payment from another person or entity. This API is the same as the make payments API. The type of payment changes to collect and no credentials are required to be captured by the customer requesting the payment. Use this endpoint to collect a payment. + +### Request + +```curl: Curl +curl -X POST 'api.rzp..com/v1/payments/collect' \ + -u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "reference_id": "RSKwpINfSkdEvtdxf", + "upi_initiation_mode": "00", + "upi_purpose_code": "00", + "upi_reference_url": "https://www.test.com", + "upi_reference_category": "00", + "device": { + "geocode": "1234.1213", + "ip": "198.1.1.1" + }, + "currency": "INR", + "amount": 100, + "description": "UPI transaction", + "payer": { + "vpa": "7262093972.stage@rzp" + }, + "payees": [ + { + "vpa": "9560137963.stage@rzp" + } + ], + "expire_at": 150603365 +}' +``` + +### Response + +```json: Response +{ + "entity":"upi.payment", + "upi_transaction_id":"RZPc2ed455b797e4add8392110cfc528acc", + "reference_id":"ord_somfv432nsa", + "upi_customer_reference_number":"804813039157", + "upi_reference_url":"https://www.test.com", + "upi_reference_category":"00", + "upi_initiation_mode":"00", + "upi_purpose_code":"00", + "currency":"INR", + "amount":10024, + "type":"pay | collect", + "description":"flight tickets", + "payer":{ + "vpa":"gaurav.kumar@exampleupi", + "fundsource":{ + "ifsc":"AXIS0000058", + "masked_account_number":"XXXXXXXXXXX3000" + }, + "name":"Gaurav Kumar", + "mcc":"0000", + "upi_response_code":"00", + "upi_reversal_response_code":"string" + }, + "payees":[ + { + "vpa":"acme.corp@rzp", + "fundsource":{ + "ifsc":"HDFC0000058", + "masked_account_number":"XXXXXXXXXXX6000" + }, + "name":"AcmeCorp Pvt. Ltd.", + "mcc":"6765", + "upi_response_code":"00", + "upi_reversal_response_code":"string" + } + ], + "status":"initiated| success | failed", + "created_at":"1722317078", + "expire_at":"1722317078" +} +``` + +### Parameters + +`reference_id` _optional_ +: `string` Indicates the transaction ID used by merchants for their reference. It is used at the business level and not in the UPI ecosystem. This value should be alphanumeric and between 1 and 35 characters. + +`upi_initiation_mode` _optional_ +: `enum` Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` _optional_ +: `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`upi_reference_url` _optional_ +: `string` Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details, and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction. + +`upi_reference_category` _mandatory_ +: `string` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: NULL + - `01`: Advertisement + - `02`: Invoice + +`device` _mandatory_ +: `object` The device details. + + `geocode` + : `string` The location coordinates of the device. + + `ip` + : `string` The IP address of the device. + +`currency` _mandatory_ +: `string` The currency of the amount. Here, it is `INR`. + +`amount` _mandatory_ +: `integer` The amount in paise. + +`description` _optional_ +: `string` The description of the payment. + +`payer` _mandatory_ +: `object` The payer details. + + `vpa` + : `string` The VPA of the payer. + +`payees` _mandatory_ +: `array` The payee details. + + `vpa` + : `string` The VPA of the payee. + +### Parameters + +`entity` +: `string` The entity type. Here, it is `upi.payment`. + +`reference_id` +: `string` Indicates the transaction ID used by merchants for their reference. It is used at the business level and not in the UPI ecosystem. This value should be alphanumeric and between 1 and 35 characters. + +`upi_reference_url` +: `string` Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details, and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction. + +`upi_reference_category` +: `string` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: NULL + - `01`: Advertisement + - `02`: Invoice + +`upi_initiation_mode` +: `enum` Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` +: `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`device` +: `object` The device details. + + `geocode` + : `string` The location coordinates of the device. + + `ip` + : `string` The IP address of the device. + +`currency` +: `string` The currency of the amount. Here, it is `INR`. + +`amount` +: `integer` The amount in paise. + +`type` +: `string` The type of the payment. Possible values: + - `pay` + - `collect` + +`description` +: `string` The description of the payment. + +`payer` +: `object` The payer details. + + `vpa` + : `string` The VPA of the payer. + +`payees` +: `object` The payee details. + + `vpa` + : `string` The VPA of the payee. + +`expire_at` +: `integer` The UNIX timestamp of the collect request. diff --git a/llm-content/api/payments/tpap-pro/payments-flow/fetch-payments.md b/llm-content/api/payments/tpap-pro/payments-flow/fetch-payments.md new file mode 100644 index 00000000..985e1535 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/payments-flow/fetch-payments.md @@ -0,0 +1,255 @@ +--- +title: Fetch Payments +description: Fetch payments using the Razorpay TPAP Pro API. +--- + +# Fetch Payments + +## Fetch Payments + +Use this endpoint to list all customer payments. You can use various query parameters to filter the list of payments. + +### Request + +```curl: Curl +curl -X GET 'api.rzp..com/v1/upi/tpap/paymentsrefresh=true&upi_transaction_id=RZPkbnkb98scbkhbnj89b&reference_id=RSKwpINfSkdEvtdxf&type=collect&status=deemed' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +``` + +### Response + +```json: Response +{ + "entity":"collection", + "count":1, + "items":[ + { + "entity":"upi.payment", + "upi_transaction_id":"RZPc2ed455b797e4add8392110cfc528acc", + "reference_id":"ord_somfv432nsa", + "upi_customer_reference_number":"804813039157", + "upi_reference_url":"https://www.test.com", + "upi_reference_category":"00", + "upi_initiation_mode":"00", + "upi_purpose_code":"00", + "currency":"INR", + "amount":10024, + "type":"pay | collect", + "description":"flight tickets", + "payer":{ + "vpa":"gaurav.kumar@exampleupi", + "fundsource":{ + "ifsc":"AXIS0000058", + "masked_account_number":"XXXXXXXXXXX3000" + }, + "name":"Gaurav Kumar", + "mcc":"0000", + "upi_response_code":"00", + "upi_reversal_response_code":"string" + }, + "payees":[ + { + "vpa":"acme.corp@rzp", + "fundsource":{ + "ifsc":"HDFC0000058", + "masked_account_number":"XXXXXXXXXXX6000" + }, + "name":"AcmeCorp Pvt. Ltd.", + "mcc":"6765", + "upi_response_code":"00", + "upi_reversal_response_code":"string" + } + ], + "status":"created | initiated | pending | success | failed", + "created_at":"1722317078", + "expire_at":"1722317078" + } + ] +} +``` + +### Parameters + +`refresh` _optional_ +: `boolean` Determines whether to fetch payment status from NPCI. Possible values: + - `true`: If set to true, fetch payment status from NPCI. + - `false` (default): If set to false, return payment from the local database. + +`upi_transaction_id` _optional_ +: `string` The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +`reference_id` _optional_ +: `string` Indicates the transaction ID used by merchants for their reference. It is used at the business level and not in the UPI ecosystem. This value should be alphanumeric and between 1 and 35 characters. + +`type` _optional_ +: `string` The type of the payment. Possible values: + - `pay` + - `collect` + +`status` _optional_ +: `string` The status of the payment. Possible values: + - `created` + - `initiated` + - `pending` + - `success` + - `failed` + +### Parameters + +`entity` +: `string` The entity type. Here, it is `collection`. + +`count` +: `integer` Indicates the number of items in the entity type. + +`items` +: `object` The payment details. + + `upi_transaction_id` + : `string` The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + + `reference_id` + : `string` Indicates the transaction ID used by merchants for their reference. It is used at the business level and not in the UPI ecosystem. This value should be alphanumeric and between 1 and 35 characters. + + `upi_customer_reference_number` + : `string` Indicates the UPI customer reference number. This is present in bank account statements as UTR. Additionally, this ID is shared with customers on TPAPs. + + `upi_reference_url` + : `string` Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details, and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction. + + `upi_reference_category` + : `string` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: NULL + - `01`: Advertisement + - `02`: Invoice + + `upi_initiation_mode` + : `enum` Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + + `upi_purpose_code` + : `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + + `currency` + : `string` The currency of the amount. Here, it is `INR`. + + `amount` + : `integer` The amount in paise. + + `type` + : `string` The type of the payment. Possible values: + - `pay` + - `collect` + + `description` + : `string` The description of the payment. + + `payer` + : `object` The payer details. + + `vpa` + : `string` The VPA of the payer. + + `fundsource` + : `object` The payer's payment source details. + + `ifsc` + : `string` The IFSC of the payment source. + + `masked_account_number` + : `string` The masked account number of the payment source. + + `name` + : `string` The name of the payer. + + `upi_response_code` + : `string` The response code issued by NPCI to the payer. + + `upi_reversal_response_code` + : `string` The reversal response code issued by NPCI to the payer. This is an optional parameter received as a response. + + `payees` + : `object` The payee details. + + `vpa` + : `string` The VPA of the payee. + + `fundsource` + : `object` The payer's payment source details. + + `ifsc` + : `string` The IFSC of the payment source. + + `masked_account_number` + : `string` The masked account number of the payment source. + + `name` + : `string` The name of the payee. + + `upi_response_code` + : `string` The response code issued by NPCI to the payee. + + `upi_reversal_response_code` + : `string` The reversal response code issued by NPCI to the payee. This is an optional parameter received as a response. + + `status` + : `string` The status of the payment. Possible values: + - created + - initiated + - pending + - success + - failed + + `created_at` + : `integer` The UNIX timestamp of the payment creation. diff --git a/llm-content/api/payments/tpap-pro/payments-flow/make-payments.md b/llm-content/api/payments/tpap-pro/payments-flow/make-payments.md new file mode 100644 index 00000000..742b26b2 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/payments-flow/make-payments.md @@ -0,0 +1,332 @@ +--- +title: Make a Payment +description: Make a payment using the Razorpay API. +--- + +# Make a Payment + +## Make a Payment + +Use this endpoint to make payments from a payer to a payee. The first step of making a payment is to capture the UPI PIN. + +### Request + +```curl: Curl +curl -X POST 'api.rzp..com/v1/payments/pay' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "upi_transaction_id": "RZP1KuSUGrp2l6MmPuT0163789452QPAY02", + "reference_id": "RSKwpINfSkdEvtdxf", + "upi_initiation_mode": "00", + "upi_purpose_code": "00", + "upi_reference_url": "https://www.test.com", + "upi_reference_category": "00", + "device": { + "geocode": "1234.1213", + "ip": "198.1.1.1" + }, + "currency": "INR", + "amount": 100, + "description": "UPI transaction", + "payer": { + "fundsource_id": "fs_Mock14charID" + }, + "upi_credentials": {}, + "payees": [ + { + "vpa": "9560137963.stage@rzp" + } + ] +}' +``` + +### Response + +```json: Response +{ + "entity":"upi.payment", + "upi_transaction_id":"RZPc2ed455b797e4add8392110cfc528acc", + "reference_id":"ord_somfv432nsa", + "upi_customer_reference_number":"804813039157", + "upi_reference_url":"https://www.test.com", + "upi_reference_category":"00", + "upi_initiation_mode":"00", + "upi_purpose_code":"00", + "currency":"INR", + "amount":10024, + "type":"pay | collect", + "description":"flight tickets", + "payer":{ + "vpa":"gaurav.kumar@exampleupi", + "fundsource":{ + "ifsc":"AXIS0000058", + "masked_account_number":"XXXXXXXXXXX3000" + }, + "name":"Gaurav Kumar", + "mcc":"0000", + "upi_response_code":"00", + "upi_reversal_response_code":"string" + }, + "payees":[ + { + "vpa":"acme.corp@rzp", + "fundsource":{ + "ifsc":"HDFC0000058", + "masked_account_number":"XXXXXXXXXXX6000" + }, + "name":"AcmeCorp Pvt. Ltd.", + "mcc":"6765", + "upi_response_code":"00", + "upi_reversal_response_code":"string" + } + ], + "status":"pending | success | failed", + "created_at":"1722317078" +} +``` + +### Parameters + +`upi_transaction_id` _mandatory_ +: `string` The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +`reference_id` _optional_ +: `string` Indicates the transaction ID used by businesses for their reference. It is used at the business level and not in the UPI ecosystem. This value should be alphanumeric and between 1 and 35 characters. + +`upi_initiation_mode` _optional_ +: `enum` Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` _optional_ +: `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`upi_reference_url` _mandatory_ +: `string` Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details, and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction. + +`upi_reference_category` _mandatory_ +: `string` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: NULL + - `01`: Advertisement + - `02`: Invoice + +`device` _mandatory_ +: `object` The device details. + + `geocode` + : `string` The location coordinates of the device. + + `ip` + : `string` The IP address of the device. + +`currency` _mandatory_ +: `string` The currency of the amount. Here, it is `INR`. + +`amount` _mandatory_ +: `integer` The amount in paise. + +`description` _optional_ +: `string` The description of the payment. + +`payer` _mandatory_ +: `object` The payer details. + + `fundsource_id` + : `string` The payment source identifier used to make the payment. + +`upi_credentials` _mandatory_ +: `object` Encrypted credentials as created by NPCI. + +`payees` _mandatory_ +: `array` The payee details. + +`vpa` +: `string` The VPA of the payee. + +### Parameters + +`entity` +: `string` The entity type. Here, it is `payment`. + +`upi_transaction_id` +: `string` The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +`reference_id` +: `string` Indicates the transaction ID used by merchants for their reference. It is used at the business level and not in the UPI ecosystem. This value should be alphanumeric and between 1 and 35 characters. + +`upi_customer_reference_number` +: `string` Indicates the UPI customer reference number. This is present in bank account statements as UTR. Additionally, this ID is shared with customers on TPAPs. + +`upi_reference_url` +: `string` Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details, and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction. + +`upi_reference_category` +: `string` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: NULL + - `01`: Advertisement + - `02`: Invoice + +`upi_initiation_mode` +: `enum` Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` +: `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`currency` +: `string` The currency of the amount. Here, it is `INR`. + +`amount` +: `integer` The amount in paise. + +`type` +: `string` The type of the payment. Possible values: + - `pay` + - `collect` + +`description` +: `string` The description of the payment. + +`payer` +: `object` The payer details. + + `vpa` + : `string` The VPA of the payer. + + `fundsource` + : `object` The payer's payment source details. + + `ifsc` + : `string` The IFSC of the payment source. + + `masked_account_number` + : `string` The masked account number of the payment source. + + `name` + : `string` The name of the payer. + + `mcc` + : `string` The merchant categorisation code of the payer. + + `upi_response_code` + : `string` The response code issued by NPCI to the payer. + + `upi_reversal_response_code` + : `string` The reversal response code issued by NPCI to the payer. This is an optional parameter received as a response. + +`payees` +: `object` The payee details. + + `vpa` + : `string` The VPA of the payee. + + `fundsource` + : `object` The payer's payment source details. + + `ifsc` + : `string` The IFSC of the payment source. + + `masked_account_number` + : `string` The masked account number of the payment source. + + `name` + : `string` The name of the payee. + + `mcc` + : `string` The merchant categorisation code of the payee. + + `upi_response_code` + : `string` The response code issued by NPCI to the payee. + + `upi_reversal_response_code` + : `string` The reversal response code issued by NPCI to the payee. This is an optional parameter received as a response. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `initiated` + - `pending` + - `success` + - `failed` + +`created_at` +: `integer` The UNIX timestamp of the payment creation. diff --git a/llm-content/api/payments/tpap-pro/payments-flow/reject-collect-requests.md b/llm-content/api/payments/tpap-pro/payments-flow/reject-collect-requests.md new file mode 100644 index 00000000..289fcb6d --- /dev/null +++ b/llm-content/api/payments/tpap-pro/payments-flow/reject-collect-requests.md @@ -0,0 +1,224 @@ +--- +title: Reject a Collect Request +description: Reject a collect request using the Razorpay TPAP Pro API. +--- + +# Reject a Collect Request + +## Reject a Collect Request + +Use this endpoint to review and take action on a pending payment request.  The status returned in this API lets you know whether a collect request is rejected or not. The status can be `pending`, `successful` or `failed`. + +### Request + +```curl: Curl +curl -X POST 'api.rzp..com/v1/payments/:upi_transaction_id/reject' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +``` + +### Response + +```json: Response +{ + "entity":"upi.payment", + "upi_transaction_id":"RZPc2ed455b797e4add8392110cfc528acc", + "reference_id":"ord_somfv432nsa", + "upi_customer_reference_number":"804813039157", + "upi_reference_url":"https://www.test.com", + "upi_reference_category":"00", + "upi_initiation_mode":"00", + "upi_purpose_code":"00", + "currency":"INR", + "amount":10024, + "type":"pay | collect", + "description":"flight tickets", + "payer":{ + "vpa":"gaurav.kumar@exampleupi", + "fundsource":{ + "ifsc":"AXIS0000058", + "masked_account_number":"XXXXXXXXXXX3000" + }, + "name":"Gaurav Kumar", + "mcc":"0000", + "upi_response_code":"00", + "upi_reversal_response_code":"string" + }, + "payees":[ + { + "vpa":"acme.corp@rzp", + "fundsource":{ + "ifsc":"HDFC0000058", + "masked_account_number":"XXXXXXXXXXX6000" + }, + "name":"AcmeCorp Pvt. Ltd.", + "mcc":"6765", + "upi_response_code":"00", + "upi_reversal_response_code":"string" + } + ], + "status":"failed", + "created_at":"1722317078", + "expire_at":"1722317078" +} +``` + +### Parameters + +`upi_transaction_id` _mandatory_ +: `string` The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +### Parameters + +`entity` +: `string` The entity type. Here, it is `upi.payment`. + +`upi_transaction_id` +: `string` The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID. + + +> **WARN** +> +> +> **Watch Out!** +> +> This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch. +> + +`reference_id` +: `string` Indicates the transaction ID used by merchants for their reference. It is used at the business level and not in the UPI ecosystem. This value should be alphanumeric and between 1 and 35 characters. + +`upi_customer_reference_number` +: `string` Indicates the UPI customer reference number. This is present in bank account statements as UTR. Additionally, this ID is shared with customers on TPAPs. + +`upi_reference_url` +: `string` Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details, and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction. + +`upi_reference_category` +: `string` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: NULL + - `01`: Advertisement + - `02`: Invoice + +`upi_initiation_mode` +: `enum` Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `00`: Default - When no specific code is assigned or for general default scenarios. + - `01`: QR Code - For making payments by scanning a standard QR code. + - `02`: Secure QR Code - For payments that require additional security with QR codes. + - `03`: Bharat QR Code - For interoperable payments across various payment networks using Bharat QR. + - `04`: Intent - For payments initiated by an intent from an application or browser. + - `05`: Secure Intent - For payments initiated by a secure intent from an app or browser. + - `06`: NFC (Near Field Communication) - For contactless payments using NFC technology. + - `07`: BLE (Bluetooth) - For payments made through Bluetooth Low Energy technology. + - `08`: UHF (Ultra High Frequency) - For payments made using UHF technology, typically for toll payments. + - `09`: Aadhaar - For payments authenticated using an Aadhaar number and biometric verification. + - `10`: SDK (Software Development Kit) - For payments initiated through an SDK embedded in an app. + - `11`: UPI-Mandate - For setting up recurring payments or mandates using UPI. + - `12`: FIR (Foreign Inward Remittance) - For receiving remittances from foreign countries. + - `13`: QR Mandate - For setting up recurring payments using a QR code. + - `14`: BBPS - For making bill payments through the Bharat Bill Payment System. + +`upi_purpose_code` +: `enum` The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values: + - `01`: SEBI + - `02`: AMC + - `03`: Travel + - `04`: Hospitality + - `05`: Hospital + - `06`: Telecom + - `07`: Insurance + - `08`: Education + - `09`: Gifting + - `10`: BBPS + - `11`: Global UPI + - `12`: Metro ATM QR + - `13`: Non-metro ATM QR + - `14`: Standing Instruction + - `15`: Corporate disbursement + +`currency` +: `string` The currency of the amount. Here, it is `INR`. + +`amount` +: `integer` The amount in paise. + +`type` +: `string` The type of the payment. Possible values: + - `pay` + - `collect` + +`description` +: `string` The description of the payment. + +`payer` +: `object` The payer details. + + `vpa` + : `string` The VPA of the payer. + + `fundsource` + : `object` The payer's payment source details. + + `ifsc` + : `string` The IFSC of the payment source. + + `masked_account_number` + : `string` The masked account number of the payment source. + + `name` + : `string` The name of the payer. + + `upi_response_code` + : `string` The response code issued by NPCI to the payer. + + `upi_reversal_response_code` + : `string` The reversal response code issued by NPCI to the payer. This is an optional parameter received as a response. + +`payees` +: `object` The payee details. + + `vpa` + : `string` The VPA of the payee. + + `fundsource` + : `object` The payer's payment source details. + + `ifsc` + : `string` The IFSC of the payment source. + + `masked_account_number` + : `string` The masked account number of the payment source. + + `name` + : `string` The name of the payee. + + `upi_response_code` + : `string` The response code issued by NPCI to the payee. + + `upi_reversal_response_code` + : `string` The reversal response code issued by NPCI to the payee. This is an optional parameter received as a response. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `initiated` + - `pending` + - `success` + - `failed` + +`created_at` +: `integer` The UNIX timestamp of the payment creation. + +`expire_at` +: `integer` The UNIX timestamp of the collect request. diff --git a/llm-content/api/payments/tpap-pro/payments-flow/resolve-vpa.md b/llm-content/api/payments/tpap-pro/payments-flow/resolve-vpa.md new file mode 100644 index 00000000..cc1b62a4 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/payments-flow/resolve-vpa.md @@ -0,0 +1,175 @@ +--- +title: Resolve VPAs +description: Resolve VPAs using the Razorpay API. +--- + +# Resolve VPAs + +## Resolve VPAs + +TPAP resolves a VPA address to find the name of the entity to which the VPA belongs and its source before collecting a payment. Below are the expected responses: +- Payment source information such as `name`, `ifsc` and `upi_iin` are sent in response only when NPCI responds to switch as the VPA is verified. +- `isMerchantVerified`, `mcc` and `merchantType` are sent in response only when the VPA of a merchant is verified. + +Use this endpoint to Resolve a VPA. + +### Request + +```curl: Curl +curl -X POST 'api.rzp..com/v1/upi/tpap/vpa/resolve' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: customer-id-from-customer" \ +-d '{ + "vpa": "pay2me@okhdfbank", + "device": { + "geocode": "1234.1213", + "ip": "198.1.1.1" + } +}' +``` + +### Response + +```json: Response +{ + "entity":"upi.vpa", + "upi_transaction_id":"TXNxmms", + "address":"kunal-1@rzpa", + "fundsource":{ + "customer_name":"kunal1", + "ifsc":"SBI00001", + "upi_iin":"" + }, + "is_merchant_vpa":true, + "is_merchant_verified":true, + "mcc":"string", + "merchant":{ + "identifier":{ + "subcode":"string", + "mid":"string", + "sid":"string", + "tid":"string", + "merchant_type":"string", + "merchant_genre":"string", + "onboarding_type":"string" + }, + "name":{ + "brand":"string", + "legal":"string", + "franchise":"string" + }, + "ownership":{ + "type":"string" + } + }, + "feature_tags":[ + "string" + ] +} +``` + +### Parameters + +`vpa` _mandatory_ +: `string` VPA that is to be resolved. + +`device` _optional_ +: `string` Device details. + + `ip` + : `string` The IP address of the device. + + `geocode` + : `string` The location coordinates of the device. For example, `12.9667,77.5667`. + +### Parameters + +`entity` +: `string` Name of the entity. + +`upi_transaction_id` +: `string` The transaction identifier of UPI. + +`address` +: `string` The VPA address being resolved. + +`fundsource` +: `object` The payment source details. + + `customer_name` + : `string` Name of the account holder. + + `ifsc` + : `string` IFSC of the account linked to the VPA. + + `upi_iin` + : `string` UPI Issuer Identification Numbers (IIN) of the payment source provider issued by NPCI. + +`is_merchant_vpa` +: `boolean` Indicates whether the VPA belongs to merchant. Possible values: + - `true`: Merchant VPA. + - `false`: Not merchant VPA. + +`is_merchant_verified` +: `boolean` Indicates whether merchant is verified. Possible values: + - `true`: Merchant is verified. + - `false`: Merchant is not verified. + +`mcc` +: `string` The merchant category code for the merchant. + +`merchant` +: `object` Business details. + + `identifier` + : `object` Merchant identifier details. + + `subcode` + : `string` The merchant sub code. This is populated only when the VPA is from the merchant. + + `mid` + : `string` The merchant identifier. This is populated only when the VPA is from the merchant. + + `sid` + : `string` The SID of the merchant. This is populated only when the VPA is from the merchant. + + `tid` + : `string` The TID of the merchant. This is populated only when the VPA is from the merchant. + + `merchant_type` + : `string` Type of the merchant. This is populated only when the VPA is from the merchant. + + `merchant_genre` + : `string` This is populated only when the VPA is from the merchant. + + `onboarding_type` + : `string` The onboarding type. This is populated only when the VPA is from the merchant. + + `name` + : `object` The merchant business details. + + `brand` + : `string` The merchant brand. This is populated only when the VPA is from the merchant. + + `legal` + : `string` The merchant legal information. This is populated only when the VPA is from the merchant. + + `franchise` + : `string` The merchant franchise. This is populated only when the VPA is from the merchant. + + `ownership` + : `object` The ownership details. + + `type` + : `string` The ownership type. + +`feature_tags` +: `string` Indicates an array of feature values. Each has its significance as decided by NPCI. Possible values: + - `mandate` + - `credit` + - `ppi` + - `uod` + - `voucher` diff --git a/llm-content/api/payments/tpap-pro/upi-number.md b/llm-content/api/payments/tpap-pro/upi-number.md new file mode 100644 index 00000000..cb52ed11 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/upi-number.md @@ -0,0 +1,41 @@ +--- +title: UPI Number +description: Know about managing TPAP Pro UPI Numbers and list of endpoints. +--- + +# UPI Number + +Razorpay's TPAP Pro - UPI Number APIs let you check availability, create, port, update, resolve, and fetch UPI Numbers for your customers. + +Below are the steps to integrate TPAP Pro. You can also refer to our comprehensive [TPAP Pro integration guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md). + +1. [Customer Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/customer-onboarding.md) +2. [Manage Funds and Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/funds-account-management.md) +3. [Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/payments-flow.md) +4. [Manage Mandates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/mandate-flow.md) +5. [Manage Complaints](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/complaints-flow.md) +6. Manage UPI Numbers +7. [Manage Fundsource Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/fundsource-lite.md) + + +### Related Guides + +[About TPAP Pro](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro.md) +[Integrate With TPAP Pro](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md) + +### Endpoints + +- **post** `/v1/upi/tpap/upi_number/available` - Check UPI Number Availability: +Check if a UPI number is available to create or port. + +- **post** `/v1/upi/tpap/upi_number` - Create or Port UPI Number: +Create a new UPI number or port an existing one to your VPA. + +- **patch** `/v1/upi/tpap/upi_number` - Update UPI Number: +Update or deactivate a UPI number. + +- **get** `/v1/upi/tpap/upi_number` - Fetch UPI Numbers: +Fetch all UPI numbers linked to a customer. + +- **post** `/v1/upi/tpap/upi_number/resolve` - Resolve UPI Number: +Resolve UPI number to fetch linked VPA and merchant info. diff --git a/llm-content/api/payments/tpap-pro/upi-number/available.md b/llm-content/api/payments/tpap-pro/upi-number/available.md new file mode 100644 index 00000000..072edfe9 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/upi-number/available.md @@ -0,0 +1,93 @@ +--- +title: Check UPI Number Availability +description: Check if a mobile UPI number is available. +--- + +# Check UPI Number Availability + +## Check UPI Number Availability + + Use this endpoint to check if a specific Mobile UPI Number is available. + +### Request + +```curl: Curl +-X POST 'https://api.rzp..com/v1/upi/tpap/upi_number/available' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-Type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: cust_ref" \ +-d '{ + "upi_number": "1234567890", + "vpa": "gaurav.kumar@exampleupi", + "action": "create", + "consent": true +}' +``` + +### Response + +```json: Success +{ + "upi_number": "1234567890", + "type": "mobile", + "vpa": "gaurav.kumar@exampleupi", + "upi_transaction_id": "123qwert12", + "available": true, + "existing_vpa": "olduser@upi" +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Consent is mandatory", + "source": "internal", + "step": "", + "reason": "user consent must be true", + "field": "consent", + "metadata": null + } +} +``` + +### Parameters + +`upi_number` _mandatory_ +: `string` The UPI number to check for availability (mobile or numeric id). + +`vpa` _mandatory_ +: `string` VPA to which the number is mapped. + +`action` _mandatory_ +: `string` Action to be performed on UPI Number. Possible values: + - `create` + - `port` + +`consent` _mandatory_ +: `boolean` Consent of the user to check the UPI number is available. Possible values: + - `true`: The user has given the consent. + - `false`: The user has not given the consent. + +### Parameters + +`upi_number` +: `string` Unique id mapped to the customer's VPA. + +`type` +: `string` Type of number. For example, mobile or numeric. + +`vpa` +: `string` VPA linked to the UPI number. + +`upi_transaction_id` +: `string` Unique transaction id created by the originator. + +`available` +: `boolean` Indicates if the number is available. + - `true`: Number is available. + - `false`: Number is not available. + +`existing_vpa` +: `string` VPA linked with the UPI number. diff --git a/llm-content/api/payments/tpap-pro/upi-number/create-port.md b/llm-content/api/payments/tpap-pro/upi-number/create-port.md new file mode 100644 index 00000000..232ce24b --- /dev/null +++ b/llm-content/api/payments/tpap-pro/upi-number/create-port.md @@ -0,0 +1,97 @@ +--- +title: Create or Port UPI Number +description: Create a new UPI Number or port an existing mobile number from another TPAP. +--- + +# Create or Port UPI Number + +## Create or Port UPI Number + + Use this endpoint to create a new UPI Number or port a mobile number to a new VPA. + +### Request + +```curl: Curl +-X POST 'https://api.rzp..com/v1/upi/tpap/upi_number' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-Type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: cust_ref" \ +-d '{ + "upi_number": "1234567890", + "vpa": "gaurav.kumar@exampleupi", + "action": "create", + "existing_vpa": "olduser@upi", + "consent": true +}' +``` + +### Response + +```json: Response +{ + "entity": "upi_number", + "upi_transaction_id": "123qwert12", + "upi_number": "1234567890", + "type": "mobile", + "status": "initiated", + "vpa": "gaurav.kumar@exampleupi" +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Consent is mandatory", + "source": "internal", + "step": "", + "reason": "user consent must be true", + "field": "consent", + "metadata": null + } +} +``` + +### Parameters + +`upi_number` _mandatory_ +: `string` The UPI number to check for availability (mobile or numeric id). + +`vpa` _mandatory_ +: `string` VPA to which the UPI number has to be linked. + +`action` _optional_ +: `string` Action to be performed on UPI Number. Possible values: + - `create` + - `port` + +`existing_vpa` _optional_ +: `string` VPA linked with the UPI number (Only in case of PORT). + +`consent` _mandatory_ +: `boolean` Consent of the user to create a new UPI Number or port a mobile number to a new VPA. Possible values: + - `true`: The user has given the consent. + - `false`: The user has not given the consent. + +### Parameters + +`entity` +: `string` Collection of entity. Here it is `upi_number`. + +`upi_transaction_id` +: `string` Unique transaction id created by the originator. + +`upi_number` +: `string` Unique id mapped to the customer's VPA. + +`type` +: `string` Type of number. For example, mobile or numeric. + +`status` +: `string` Status of the UPI number. Possible values: + - `initiated` + - `active` + +`vpa` +: `string` VPA linked to the UPI number. diff --git a/llm-content/api/payments/tpap-pro/upi-number/fetch.md b/llm-content/api/payments/tpap-pro/upi-number/fetch.md new file mode 100644 index 00000000..370f3e70 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/upi-number/fetch.md @@ -0,0 +1,86 @@ +--- +title: Fetch UPI Numbers +description: Retrieve all UPI numbers associated with a customer, along with their statuses and available slots. +--- + +# Fetch UPI Numbers + +## Fetch UPI Numbers + + Use this endpoint to retrieve the list of UPI numbers mapped to a customer along with their statuses and available slots. + +### Request + +```curl: Curl +-X GET 'https://api.rzp..com/v1/upi/tpap/upi_number' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-Type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: cust_ref" \ +``` + +### Response + +```json: Response +{ + "entity": "collection", + "mobile_linked": true, + "available_slots": 1, + "upi_numbers": [ + { + "number": "9234567890", + "type": "mobile", + "vpa": "dummyuser2@upi", + "status": "active" + }, + { + "number": "123456780", + "type": "numeric", + "vpa": "gaurav.kumar@exampleupi", + "status": "inactive" + } + ] +} + +```json: Failure +{ + "error": { + "code": "INTERNAL_SERVER_ERROR", + "description": "record not found", + "source": "internal", + "reason": "record not found" + } +} +``` + +### Parameters + +`entity` +: `string` Collection of entity. Here it is `upi_number`. + +`mobile_linked` +: `boolean` Indicates if a mobile number is already linked. + - `true`: Mobile number is linked. + - `false`: Mobile number is not linked. + +`available_slots` +: `integer` Number of available slots left (maximum is 3 per customer). + +`upi_number` +: `string` Unique id mapped to the customer's VPA. + + `number` + : `string` The UPI number. + + `type` + : `string` Type of number. For example, mobile or numeric. + + `status` + : `string` Status of the UPI number. Possible values: + - `active` + - `inactive` + - `deregistered` + + `vpa` + : `string` VPA linked to the UPI number. diff --git a/llm-content/api/payments/tpap-pro/upi-number/resolve.md b/llm-content/api/payments/tpap-pro/upi-number/resolve.md new file mode 100644 index 00000000..c322c770 --- /dev/null +++ b/llm-content/api/payments/tpap-pro/upi-number/resolve.md @@ -0,0 +1,179 @@ +--- +title: Resolve UPI Number +description: Resolve a UPI number to its VPA, customer name, and merchant information. +--- + +# Resolve UPI Number + +## Resolve UPI Number + + Use this endpoint to resolve a UPI number into VPA, name, IFSC, and business information. + +### Request + +```curl: Curl +-X POST 'https://api.rzp..com/v1/upi/tpap/upi_number/resolve' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-Type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: cust_ref" \ +-d '{ + "upi_number": "9898989898", + "device": { + "geocode": "12.34,77.13", + "ip": "198.1.1.1" + } +}' +``` + +### Response + +```json: Response +{ + "entity": "upi_number", + "number": "9898989898", + "upi_transaction_id": "TXNxmms", + "vpa": "gaurav.kumar@rzpa", + "fundsource": { + "customer_name": "kunal1", + "ifsc": "SBI00001", + "upi_iin": "" + }, + "is_merchant_vpa": true, + "is_merchant_verified": true, + "mcc": "6765", + "merchant": { + "identifier": { + "subcode": "string", + "mid": "string", + "sid": "string", + "tid": "string", + "merchant_type": "string", + "merchant_genre": "string", + "onboarding_type": "string" + }, + "name": { + "brand": "Brand Name", + "legal": "Legal Name", + "franchise": "Franchise Name" + }, + "ownership": { + "type": "Private" + } + }, + "feature_tags": [ + "mandate", + "credit" + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Device Ip is mandatory", + "source": "internal", + "reason": "Device Ip is required", + "field": "ip" + } +} +``` + +### Parameters + +`upi_number` _mandatory_ +: `string` The UPI number to check for availability (mobile or numeric id). + +`device` _mandatory_ +: `object` The device details. + + `geocode` + : `string` The location coordinates of the device. + + `ip` + : `string` The IP address of the device. + +### Parameters + +`entity` +: `string` Collection of entity. Here it is `upi_number`. + +`number` +: `string` The UPI number. + +`upi_transaction_id` +: `string` Unique transaction id created by the originator. + +`vpa` +: `string` VPA linked to the UPI number. + +`fundsource` +: `string` The fundsource details. + + `customer_name` + : `string` Name of the customer. + + `ifsc` + : `string` IFSC code of the account linked to the VPA. + + `upi_iin` + : `string` The UPI Issuer Identification Numbers (IIN) of the payment source provider issued by NPCI. + +`is_merchant_vpa` +: `boolean` Indicates if the VPA is a business VPA. + - `true`: VPA is a business VPA. + - `false`: VPA is not a business VPA. + +`is_merchant_verified` +: `boolean` Indicates if the merchant is verified. + - `true`: Merchant is verified. + - `false`: Merchant is not verified. + +`mcc` +: `string` Merchant Category Code. + +`merchant` +: `object` Merchant details. + + `identifier` + : `string` Unique merchant identifiers. + + `mid` + : `string` Merchant id. + + `sid` + : `string` Sub-merchant id. + + `tid` + : `string` Terminal id. + + `merchant_type` + : `string` Type of merchant. + + `merchant_genre` + : `string` Business vertical or segment. + + `onboarding_type` + : `string` How the merchant was onboarded. + + `name` + : `object` Merchant's business and legal names. + + `brand` + : `string` Merchant's brand name. + + `legal` + : `string` Merchant's legal registered name. + + `franchise` + : `string` Franchise name if applicable. + + `ownership` + : `object` Merchant ownership details. + + `type` + : `string` Type of ownership. + +`feature` +: `array` List of special features tagged with this VPA. diff --git a/llm-content/api/payments/tpap-pro/upi-number/update.md b/llm-content/api/payments/tpap-pro/upi-number/update.md new file mode 100644 index 00000000..a8f821df --- /dev/null +++ b/llm-content/api/payments/tpap-pro/upi-number/update.md @@ -0,0 +1,96 @@ +--- +title: Update UPI Number +description: Update, deactivate, deregister, or activate a UPI Number. +--- + +# Update UPI Number + +## Update UPI Number + + Use this endpoint to change VPA, deactivate, deregister, or activate an existing UPI number. + +### Request + +```curl: Curl +-X PATCH 'https://api.rzp..com/v1/upi/tpap/upi_number' \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H "Content-Type: application/json" \ +-H "x-device-fingerprint: " \ +-H "x-device-fingerprint-timestamp: 1496918882000" \ +-H "x-customer-reference: cust_ref" \ +-d '{ + "upi_number": "1234567890", + "vpa": "newuser@upi", + "action": "change_vpa", + "consent": true +}' +``` + +### Response + +```json: Response +{ + "entity": "upi_number", + "upi_transaction_id": "123qwert12", + "upi_number": "1234567890", + "type": "mobile", + "status": "active", + "vpa": "gaurav.kumar@exampleupi" +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Consent is mandatory", + "source": "internal", + "step": "", + "reason": "user consent must be true", + "field": "consent", + "metadata": null + } +} +``` + +### Parameters + +`upi_number` _mandatory_ +: `string` The UPI number to be updated. + +`vpa` _mandatory_ +: `string` VPA to which the number is mapped. + +`action` _mandatory_ +: `string` Action to be performed on UPI number. Possible values: + - `change_vpa` + - `inactivate` + - `deregister` + - `activate` + +`consent` _mandatory_ +: `boolean` Consent of the user to update the UPI number. + - `true`: The user has given the consent. + - `false`: The user has not given the consent. + +### Parameters + +`entity` +: `string` Collection of entity. Here it is `upi_number`. + +`upi_transaction_id` +: `string` Unique transaction id created by the originator. + +`upi_number` +: `string` Unique id mapped to the customer's VPA. + +`type` +: `string` Type of number. For example, mobile or numeric. + +`status` +: `string` Status of the UPI number. Possible values: + - `active` + - `inactive` + - `deregistered` + +`vpa` +: `string` VPA linked to the UPI number. diff --git a/llm-content/api/payments/update.md b/llm-content/api/payments/update.md new file mode 100644 index 00000000..c03cd926 --- /dev/null +++ b/llm-content/api/payments/update.md @@ -0,0 +1,271 @@ +--- +title: Update a Payment +description: Update a Payment using Razorpay Payments API. +--- + +# Update a Payment + +## Update a Payment + +Use this endpoint to modify the `notes` field for a particular payment. + +You can modify an existing payment to update the `Notes` field **only**. Notes can be used to record additional information about the payment. You can add up to 15 key-value pairs with each value of the key not exceeding 256 characters. + +### Response + +```json: Success +{ + "id": "pay_KbCVlLqUbb3VhA", + "entity": "payment", + "amount": 400000, + "currency": "INR", + "status": "authorized", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "emi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": "Test Transaction", + "card_id": "card_KbCVlPnxWRlOpH", + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "key1": "value1", + "key2": "value2" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "205480" + }, + "emi_plan": { + "issuer": "HDFC", + "type": "credit", + "rate": 1500, + "duration": 24 + }, + "created_at": 1667398779, + "upi": { + "payer_account_type": "credit_card", + "vpa": "gaurav.kumar@examplebank", + "flow": "intent" + } +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the payment for which the `Notes` field should be updated. + +### Parameters + +`notes` _mandatory_ +: `json object` Contains user-defined fields and is stored for reference purposes. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. This attribute will not be set for the card issued by a foreign bank. + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + + + Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + - `credit_line` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible values: + - `intent`: When a UPI app is selected and user is redirected to it. + - `collect`: The user enters their UPI ID and receives a notification from the UPI app. They open the app and complete the payment. + - `in_app`: In case of Turbo UPI Payments. + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. diff --git a/llm-content/api/qr-codes.md b/llm-content/api/qr-codes.md new file mode 100644 index 00000000..a0e85212 --- /dev/null +++ b/llm-content/api/qr-codes.md @@ -0,0 +1,50 @@ +--- +title: API | QR Codes +heading: QR Codes +description: API Documentation for Razorpay QR Codes. Create, Close and Fetch QR Codes using APIs. Check the various use cases and code samples. +--- + +# QR Codes + +You can use Razorpay [QR Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes.md) to create QR Codes and share them with customers to accept digital payments. You can create and manage QR Codes using APIs or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/create.md). + + +Refer to the [QR Code Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/how-it-works.md) and [Integration Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/apis.md#integration-checklist) before you begin integrating with the APIs for QR Codes. + + Fork the Razorpay Postman Public Workspace and try the QR Codes APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/f960539b-c56c-41e5-810b-63d2a89d447e/folder/12492020-90436eef-f17f-4bc1-9d13-b622a4270125) + + +### Related Guides + +[About QR Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes.md) + +### Endpoints + +- **post** `/v1/payments/qr_codes` - Create a QR Code: + Creates a QR Code. + +- **post** `/v1/payments/qr_codes/:id/close` - Close a QR Code: + Closes a QR Code. + +- **get** `/v1/payments/qr_codes?count=2` - Fetch All QR Codes: + Retrieves details of all QR Codes. + +- **get** `/v1/payments/qr_codes/:id` - Fetch a QR Code with ID: + Retrieves details of a specific QR Code using id. + +- **get** `/v1/payments/qr_codes?customer_id={customer_id}` - Fetch QR Codes for a Customer ID: + Retrieves QR Codes generated for a Customer id. + +- **get** `/v1/payments/qr_codes?payment_id={payment_id}` - Fetch QR Codes for a Payment ID: + Retrieves QR Codes by Payment id. + +- **get** `/v1/payments/qr_codes/:id/payments` - Fetch Payments for a QR Code: + Retrieves payments made on a QR Code. + +- **patch** `/v1/payments/qr_codes/:id/payments` - Update a QR Code: + Updates payments made on a QR Code. + +- **post** `/v1/payments/:id/refund` - Refund Payments: + Creates a refund for a payment. diff --git a/llm-content/api/qr-codes/close.md b/llm-content/api/qr-codes/close.md new file mode 100644 index 00000000..9112d6ee --- /dev/null +++ b/llm-content/api/qr-codes/close.md @@ -0,0 +1,234 @@ +--- +title: Close a QR Code +description: Close QR Codes with this endpoint. +--- + +# Close a QR Code + +## Close a QR Code + +Use this endpoint to close a QR Code. + +### Request + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/qr_codes/qr_HMsVL8HOpbMcjU/close + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String qrCodeId = "qr_HMsVL8HOpbMcjU"; + +QrCode qrcode = razorpay.qrCode.close(qrCodeId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->fetch($qrCodeId)->close() + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.close(qrCodeId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.qrcode.close(qrCodeId); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +qrCodeId = "qr_HMsVL8HOpbMcjU" + +body, err := client.QrCode.Close(qrCodeId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +qrCodeId = "qr_HMsVL8HOpbMcjU" + +Razorpay::QrCode.fetch(qrCodeId).close + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string qrCodeId = "qr_Z6t7VFTb9xHeOs"; + +QrCode qrcode = client.QrCode.Fetch(qrCodeId).Close(); +``` + +### Response + +```json: Success +{ + "id": "qr_HMsVL8HOpbMcjU", + "entity": "qr_code", + "created_at": 1623660301, + "name": "Store_1", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/BWcUVrLp", + "payment_amount": 300, + "status": "closed", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "closed_at": 1623660445, + "close_reason": "on_demand" +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The requested URL was not found on the server.", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the QR Code. + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. For example, `qr_HMsVL8HOpbMcjU`. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`created_at` +: `integer` Unix timestamp at which the QR Code is created. + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`type` +: `string` The type of the QR Code. Possible value is `upi_qr`, which creates a QR Code that accepts only UPI payments. + + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. to get this feature activated on your account. +> + +`image_url` +: `string` The URL of the QR Code. For example, `http://rzp.io/l6MS`. Click the link to download the code. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active`: Indicates that the QR Code has been created and is ready to accept payments. + - `closed`: Indicates that the QR Code has been closed. + +`description` +: `string` A brief description about the QR Code. + +`fixed_amount` +: `boolean` Indicates if the QR Code should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR code accepts any amount. + + + +> **WARN** +> +> +> **Watch Out!** +> +> When setting the `usage` to `single_use`, ensure that `fixed_amount` is `true` to generate the QR Code successfully. +> + +`payments_amount_received` +: `integer` The total amount received on the QR Code. Only captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` The unique identifier of the customer the QR Code is linked with. Know more about the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` Unix timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in Unix timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **INFO** +> +> +> **Handy Tips** +> +> - Any request beyond 2147483647 Unix timestamp will fail. +> + + +> **WARN** +> +> +> **Watch Out!** +> +> - This parameter is only available for QR codes with `usage` set as `single_use`. You will not be able to use this parameter for `multiple_use` QR codes as it will generate an error. +> - For `single_use` QR codes, the `close_by` date can be set for a maximum of 45 days. If no `close_by` date is specified, the QR code will automatically become inactive after 45 days. Conversely, `multiple_use` QR codes do not have an expiration date. +> + +`closed_at` +: `integer` Unix timestamp at which the QR Code is automatically closed. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The id provided does not exist +* code: 400 +* description: The QR Code id was created on a different key and secret. +* solution: Ensure that you use the same keys while creating and closing a QR Code. + +We are facing some trouble completing your request at the moment. Please try again shortly. +* code: 400 +* description: There is an error in the QR Code id. It may be incorrect or invalid. +* solution: Check if you have used a valid QR Code id. + +The requested URL was not found on the server. +* code: 400 +* description: Possible reasons: - A POST API is executed by GET Method. +- The QR Code id is not passed. + +* solution: Use the correct method (POST) and QR Code id while running the API. diff --git a/llm-content/api/qr-codes/create.md b/llm-content/api/qr-codes/create.md new file mode 100644 index 00000000..dde02035 --- /dev/null +++ b/llm-content/api/qr-codes/create.md @@ -0,0 +1,399 @@ +--- +title: Create a QR Code +description: Create QR Codes with this endpoint and share with your customers. +--- + +# Create a QR Code + +## Create a QR Code + +Use this endpoint to create a QR Code. + +- You can share the short URL with customers to accept payments. +- You can print and download it. +- You can create QR Codes for single or multiple use and for specific or all customers. + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/qr_codes \ +-H "Content-Type: application/json" \ +-d '{ + "type": "upi_qr", + "name": "Store Front Display", + "usage": "single_use", + "fixed_amount": true, + "payment_amount": 300, + "description": "For Store 1", + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "notes": { + "purpose": "Test UPI QR Code notes" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject qrRequest = new JSONObject(); +qrRequest.put("type","upi_qr"); +qrRequest.put("name","Store Front Display"); +qrRequest.put("usage","single_use"); +qrRequest.put("fixed_amount",true); +qrRequest.put("payment_amount",300); +qrRequest.put("description","For Store 1"); +qrRequest.put("customer_id","cust_HKsR5se84c5LTO"); +qrRequest.put("close_by",1681615838); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +qrRequest.put("notes",notes); + +QrCode qrcode = razorpay.qrCode.create(qrRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->create(array("type" => "upi_qr","name" => "Store Front Display", "usage" => "single_use","fixed_amount" => true,"payment_amount" => 300,"customer_id" => "cust_HKsR5se84c5LTO","description" => "For Store 1","close_by" => 1681615838,"notes" => array("purpose" => "Test UPI QR code notes"))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.create({ + type: "upi_qr", + name: "Store Front Display", + usage: "single_use", + fixed_amount: true, + payment_amount: 300, + description: "For Store 1", + customer_id: "cust_HKsR5se84c5LTO", + close_by: 1681615838, + notes: { + purpose: "Test UPI QR Code notes" + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.qrcode.create({ + "type": "upi_qr", + "name": "Store Front Display", + "usage": "single_use", + "fixed_amount": True, + "payment_amount": 300, + "description": "For Store 1", + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "notes": { + "purpose": "Test UPI QR Code notes" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +notes := map[string]interface{}{ + "purpose": "Test UPI QR Code notes", +} + +data := map[string]interface{}{ + "type": "upi_qr", + "name": "Store Front Display", + "usage": "single_use", + "fixed_amount": true, + "payment_amount": 300, + "description": "For Store 1", + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "notes": notes, +} +body, err := client.QrCode.create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "type": "upi_qr", + "name": "Store Front Display", + "usage": "single_use", + "fixed_amount": true, + "payment_amount": 300, + "description": "For Store 1", + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "notes": { + "purpose": "Test UPI QR Code notes" + } +} +Razorpay::QrCode.create(para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary qrRequest = new Dictionary(); +qrRequest.Add("type", "upi_qr"); +qrRequest.Add("name", "Store_1"); +qrRequest.Add("usage", "single_use"); +qrRequest.Add("fixed_amount", true); +qrRequest.Add("payment_amount", 300); +qrRequest.Add("description", "For Store 1"); +qrRequest.Add("customer_id", "cust_MHYe2dVX323WYD"); +qrRequest.Add("close_by", 1681615838); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +qrRequest.Add("notes", notes); + +QrCode qrcode = client.QrCode.Create(qrRequest); + +``` + +### Response + +```json: Success +{ + "id": "qr_HMsVL8HOpbMcjU", + "entity": "qr_code", + "created_at": 1623660301, + "name": "Store Front Display", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/BWcUVrLp", + "payment_amount": 300, + "status": "active", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The requested URL was not found on the server.", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`type` _mandatory_ +: `string` The type of the QR Code. + - `upi_qr`: Create a QR Code that accepts only UPI payments. + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. to get this feature activated on your account. +> + + +`name` _optional_ +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` _mandatory_ +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`fixed_amount` _optional_ +: `boolean` Indicates if the QR should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR Code accepts any amount. + + +> **WARN** +> +> +> **Watch Out!** +> +> When setting the `usage` to `single_use`, ensure that `fixed_amount` is `true` to generate the QR Code successfully. +> + +`payment_amount` _mandatory if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`description`_optional_ +: `string` A brief description about the QR Code. + +`customer_id` _optional_ +: `string` The unique identifier of the customer the QR Code is linked with. Know more about the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` _optional_ +: `integer` Unix timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 2 minutes after the current time. + + +> **WARN** +> +> +> **Watch Out!** +> +> This parameter is available for single use QR codes only. You should ideally send a `close_by` value (expiry time less than or equal to 2 hours from QR generation). +> - The QR code has a minimum expiration time of 2 minutes and a maximum of 2 hours. +> - If `close_by` is `NULL`, the system sets a 2-hour expiry (returned in the response). +> - If `close_by` is greater than 2 hours, the system overrides it to 2 hours (returned in the response). +> - Use the returned `close_by` value for QR expiry. QR codes expire after the `close_by` time; you must regenerate them. +> - This parameter is only available for QR codes with `usage` set as `single_use`. You will not be able to use this parameter for `multiple_use` QR codes as it will generate an error. +> + + + + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. For example, `qr_HMsVL8HOpbMcjU`. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`created_at` +: `integer` Unix timestamp at which the QR Code is created. + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`type` +: `string` The type of the QR Code. Possible value is `upi_qr`, which creates a QR Code that accepts only UPI payments. + + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. to get this feature activated on your account. +> + +`image_url` +: `string` The URL of the QR Code. For example, `http://rzp.io/l6MS`. Click the link to download the code. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active`: Indicates that the QR Code has been created and is ready to accept payments. + - `closed`: Indicates that the QR Code has been closed. + +`description` +: `string` A brief description about the QR Code. + +`fixed_amount` +: `boolean` Indicates if the QR Code should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR code accepts any amount. + + +> **WARN** +> +> +> **Watch Out!** +> +> When setting the `usage` to `single_use`, ensure that `fixed_amount` is `true` to generate the QR Code successfully. +> + +`payments_amount_received` +: `integer` The total amount received on the QR Code. Only captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` The unique identifier of the customer the QR Code is linked with. Know more about the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` Unix timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 2 minutes after the current time. + + +> **WARN** +> +> +> **Watch Out!** +> +> This parameter is available for single use QR codes only. You should ideally send a `close_by` value (expiry time less than or equal to 2 hours from QR generation). +> - The QR code has a minimum expiration time of 2 minutes and a maximum of 2 hours. +> - If `close_by` is `NULL`, the system sets a 2-hour expiry (returned in the response). +> - If `close_by` is greater than 2 hours, the system overrides it to 2 hours (returned in the response). +> - Use the returned `close_by` value for QR expiry. QR codes expire after the `close_by` time; you must regenerate them. +> - This parameter is only available for QR codes with `usage` set as `single_use`. You will not be able to use this parameter for `multiple_use` QR codes as it will generate an error. +> + +`closed_at` +: `integer` Unix timestamp at which the QR Code is automatically closed. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The selected \{field name\} is invalid. +* code: 400 +* description: Data sent for a field is invalid. For example, when the data sent for `type` is `abc`, instead of the acceptable value. +* solution: Ensure that the data sent for a field is valid. Re-check the acceptable values for that request parameter. + +The \{field name\} is required. +* code: 400 +* description: A mandatory field is missing. +* solution: Ensure all mandatory fields are present. + +The payment amount must be at least 1. +* code: 400 +* description: The amount specified is less than the minimum amount. +* solution: Enter an amount equal to or greater than the minimum amount, that is 1. + +\{Customer_id\} is not a valid id. +* code: 400 +* description: Data entered for the Customer id field is invalid. +* solution: Ensure that the Customer id is correct and valid. + +type, usage, fixed_amount, payment_amount, description, close_by is/are not required and should not be sent +* code: 400 +* description: A POST API is executed by GET Method. +* solution: Use the correct method, that is, POST. + +\{close_by\} must be between 946684800 and 4765046400 +* code: 400 +* description: A wrong close by date is passed. +* solution: Ensure you pass the correct close by date(Unix timestamp). It must be between 946684800 and 4765046400. + +\{any extra field\} ajshdas is/are not required and should not be sent +* code: 400 +* description: An additional or unrequired parameter is passed. +* solution: Ensure that you only pass the required parameters in the request body. diff --git a/llm-content/api/qr-codes/entity.md b/llm-content/api/qr-codes/entity.md new file mode 100644 index 00000000..56c07070 --- /dev/null +++ b/llm-content/api/qr-codes/entity.md @@ -0,0 +1,144 @@ +--- +title: QR Codes Entity +description: Know about QR Codes entity parameters and their description. +--- + +# QR Codes Entity + +## QR Codes Entity + +The QR Codes entity has the following parameters: + +### Response + +```json: Entity +{ + "id":"qr_HMsVL8HOpbMcjU", + "entity":"qr_code", + "created_at":1623660301, + "name":"Store Front Display", + "usage":"single_use", + "type":"upi_qr", + "image_url":"https://rzp.io/i/BWcUVrLp", + "payment_amount":300, + "status":"closed", + "description":"For Store 1", + "fixed_amount":true, + "payments_amount_received":0, + "payments_count_received":0, + "notes":{ + "purpose":"Test UPI QR Code notes" + }, + "customer_id":"cust_HKsR5se84c5LTO", + "close_by":1681615838, + "closed_at":1623660445, + "close_reason":"on_demand" +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. For example, `qr_HMsVL8HOpbMcjU`. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`created_at` +: `integer` Unix timestamp at which the QR Code is created. + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`type` +: `string` The type of the QR Code. Possible value is `upi_qr`, which creates a QR Code that accepts only UPI payments. + + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. to get this feature activated on your account. +> + +`image_url` +: `string` The URL of the QR Code. For example, `http://rzp.io/l6MS`. Click the link to download the code. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active`: Indicates that the QR Code has been created and is ready to accept payments. + - `closed`: Indicates that the QR Code has been closed. + +`description` +: `string` A brief description about the QR Code. + +`fixed_amount` +: `boolean` Indicates if the QR Code should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR code accepts any amount. + + +> **WARN** +> +> +> **Watch Out!** +> +> When setting the `usage` to `single_use`, ensure that `fixed_amount` is `true` to generate the QR Code successfully. +> + +`payments_amount_received` +: `integer` The total amount received on the QR Code. Only captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` The unique identifier of the customer the QR Code is linked with. Know more about the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` Unix timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in Unix timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **INFO** +> +> +> **Handy Tips** +> +> Any request beyond 2147483647 Unix timestamp will fail. +> + + +> **WARN** +> +> +> **Watch Out!** +> +> This parameter is available for single use QR codes only. You should ideally send a `close_by` value (expiry time less than or equal to 2 hours from QR generation). +> - The QR code has a minimum expiration time of 2 minutes and a maximum of 2 hours. +> - If `close_by` is `NULL`, the system sets a 2-hour expiry (returned in the response). +> - If `close_by` is greater than 2 hours, the system overrides it to 2 hours (returned in the response). +> - Use the returned `close_by` value for QR expiry. QR codes expire after the `close_by` time; you must regenerate them. +> - This parameter is only available for QR codes with `usage` set as `single_use`. You will not be able to use this parameter for `multiple_use` QR codes as it will generate an error. +> +> + +`closed_at` +: `integer` Unix timestamp at which the QR Code is automatically closed. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. diff --git a/llm-content/api/qr-codes/fetch-all.md b/llm-content/api/qr-codes/fetch-all.md new file mode 100644 index 00000000..60dbaf33 --- /dev/null +++ b/llm-content/api/qr-codes/fetch-all.md @@ -0,0 +1,282 @@ +--- +title: Fetch All QR Codes +description: Fetch the details of multiple QR Codes using this endpoint. +--- + +# Fetch All QR Codes + +## Fetch All QR Codes + +Use this endpoint to retrieve the details of multiple QR Codes. + +### Request + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/qr_codes \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List qrcode = razorpay.qrCode.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->all($options) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.all() + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.qrcode.all() + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "count": "2", +} + +body, err := client.QrCode.All(nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "count": 1 +} + +Razorpay::QrCode.all(para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("count", "1"); + +List paymentlink = client.QrCode.All(paramRequest); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "qr_HO2jGkWReVBMNu", + "entity": "qr_code", + "created_at": 1623914648, + "name": "Store_1", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/w2CEwYmkAu", + "payment_amount": 300, + "status": "active", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "closed_at": null, + "close_reason": null + }, + { + "id": "qr_HO2e0813YlchUn", + "entity": "qr_code", + "created_at": 1623914349, + "name": "Acme Groceries", + "usage": "multiple_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/X6QM7LL", + "payment_amount": null, + "status": "closed", + "description": "Buy fresh groceries", + "fixed_amount": false, + "payments_amount_received": 200, + "payments_count_received": 1, + "notes": { + "Branch": "Bangalore - Rajaji Nagar" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1625077799, + "closed_at": 1623914515, + "close_reason": "on_demand" + } + ] +} + +```json: Failure +{ + "error": { + "code": "SERVER_ERROR", + "description": "We are facing some trouble completing your request at the moment. Please try again shortly.", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`from` _optional_ +: `integer` Unix timestamp, in seconds, from when QR Codes are to be retrieved. + +`to` _optional_ +: `integer` Unix timestamp, in seconds, till when QR Codes are to be retrieved. + +`count` _optional_ +: `integer` Number of QR Codes to be retrieved. + - Default value: 10 + - Maximum value: 100 + - This can be used for pagination, in combination with `skip`. + +`skip` _optional_ +: `integer` Number of records to be skipped while fetching the QR Codes. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. For example, `qr_HMsVL8HOpbMcjU`. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`created_at` +: `integer` Unix timestamp at which the QR Code is created. + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`type` +: `string` The type of the QR Code. Possible value is `upi_qr`, which creates a QR Code that accepts only UPI payments. + + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. to get this feature activated on your account. +> + + +`image_url` +: `string` The URL of the QR Code. For example, `http://rzp.io/l6MS`. Click the link to download the code. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active`: Indicates that the QR Code has been created and is ready to accept payments. + - `closed`: Indicates that the QR Code has been closed. + +`description` +: `string` A brief description about the QR Code. + +`fixed_amount` +: `boolean` Indicates if the QR Code should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR code accepts any amount. + + +> **WARN** +> +> +> **Watch Out!** +> +> When setting the `usage` to `single_use`, ensure that `fixed_amount` is `true` to generate the QR Code successfully. +> + +`payments_amount_received` +: `integer` The total amount received on the QR Code. Only captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` The unique identifier of the customer the QR Code is linked with. Know more about the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` Unix timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in Unix timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **INFO** +> +> +> **Handy Tips** +> +> - Any request beyond 2147483647 Unix timestamp will fail. +> + + +> **WARN** +> +> +> **Watch Out!** +> +> - This parameter is only available for QR codes with `usage` set as `single_use`. You will not be able to use this parameter for `multiple_use` QR codes as it will generate an error. +> - For `single_use` QR codes, the `close_by` date can be set for a maximum of 45 days. If no `close_by` date is specified, the QR code will automatically become inactive after 45 days. Conversely, `multiple_use` QR codes do not have an expiration date. +> + +`closed_at` +: `integer` Unix timestamp at which the QR Code is automatically closed. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The id provided does not exist. +* code: 400 +* description: Possible reasons: - The URL is wrong or is missing something. +- A GET API is executed by POST Method. + +* solution: Suggested solutions: - Ensure you have the correct and complete URL. +- Use the right method, that is, GET. + + +We are facing some trouble completing your request at the moment. Please try again shortly. +* code: 400 +* description: A GET API is executed by POST Method. +* solution: Use the correct method, that is, GET. + +The requested URL was not found on the server. +* code: 400 +* description: The URL is wrong or missing something. +* solution: Use the correct and complete URL. diff --git a/llm-content/api/qr-codes/fetch-customer-id.md b/llm-content/api/qr-codes/fetch-customer-id.md new file mode 100644 index 00000000..b388aa8a --- /dev/null +++ b/llm-content/api/qr-codes/fetch-customer-id.md @@ -0,0 +1,250 @@ +--- +title: Fetch QR Codes for a Customer ID +description: Fetch the details of a QR Codes using a Customer id. +--- + +# Fetch QR Codes for a Customer ID + +## Fetch QR Codes for a Customer ID + +Use this endpoint to retrieve the details of a QR Code by using a Customer Id. + +### Request + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/qr_codes?customer_id=cust_HKsR5se84c5LTO \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("customer_id","cust_HKsR5se84c5LTO"); + +List qrcodes = razorpay.qrCode.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->all(["customer_id" => $customerId]) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.all({"customer_id":customerId}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.qrcode.all({"customer_id":customerId}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "customer_id" : "cust_HKsR5se84c5LTO", +} + +body, err := client.QrCode.All(para_attr, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = {"customer_id":customerId} + +Razorpay::QrCode.all(para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string CustomerId = cust_JDdNazagOgg9Ig + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("customer_id", CustomerId); + +List paymentlink = client.QrCode.All(paramRequest); + +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "qr_HMsgvioW64f0vh", + "entity": "qr_code", + "created_at": 1623660959, + "name": "Store_1", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/DTa2eQR", + "payment_amount": 300, + "status": "active", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838 + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "_HKsR5se84c5LTO} is not a valid id", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_HKsR5se84c5LTO`. + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. For example, `qr_HMsVL8HOpbMcjU`. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`created_at` +: `integer` Unix timestamp at which the QR Code is created. + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`type` +: `string` The type of the QR Code. Possible value is `upi_qr`, which creates a QR Code that accepts only UPI payments. + + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. to get this feature activated on your account. +> + +`image_url` +: `string` The URL of the QR Code. For example, `http://rzp.io/l6MS`. Click the link to download the code. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active`: Indicates that the QR Code has been created and is ready to accept payments. + - `closed`: Indicates that the QR Code has been closed. + +`description` +: `string` A brief description about the QR Code. + +`fixed_amount` +: `boolean` Indicates if the QR Code should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR code accepts any amount. + + +> **WARN** +> +> +> **Watch Out!** +> +> When setting the `usage` to `single_use`, ensure that `fixed_amount` is `true` to generate the QR Code successfully. +> + +`payments_amount_received` +: `integer` The total amount received on the QR Code. Only captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` The unique identifier of the customer the QR Code is linked with. Know more about the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` Unix timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in Unix timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **INFO** +> +> +> **Handy Tips** +> +> - Any request beyond 2147483647 Unix timestamp will fail. +> + + +> **WARN** +> +> +> **Watch Out!** +> +> - This parameter is only available for QR codes with `usage` set as `single_use`. You will not be able to use this parameter for `multiple_use` QR codes as it will generate an error. +> - For `single_use` QR codes, the `close_by` date can be set for a maximum of 45 days. If no `close_by` date is specified, the QR code will automatically become inactive after 45 days. Conversely, `multiple_use` QR codes do not have an expiration date. +> + +`closed_at` +: `integer` Unix timestamp at which the QR Code is automatically closed. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +We are facing some trouble completing your request at the moment. Please try again shortly. +* code: 400 +* description: A GET API is executed by POST Method. +* solution: Use the correct method, that is, GET. + +\{Customer_id\} is not a valid id. +* code: 400 +* description: A wrong Customer id is provided. +* solution: Check if you have used a valid Customer id. + +\{parameter\} “cusomer_id” is/are not required and should not be sent +* code: 400 +* description: - The URL is wrong or is missing something. +- The Customer id has a spelling error in the URL. + +* solution: - Ensure that you use the correct and complete URL. +- Check for spelling mistakes in the Customer id. + +The id provided does not exist. +* code: 400 +* description: The URL is wrong or is missing something. +* solution: Use the correct and complete URL. diff --git a/llm-content/api/qr-codes/fetch-payment-id.md b/llm-content/api/qr-codes/fetch-payment-id.md new file mode 100644 index 00000000..eaaf359b --- /dev/null +++ b/llm-content/api/qr-codes/fetch-payment-id.md @@ -0,0 +1,248 @@ +--- +title: Fetch QR Codes for a Payment ID +description: Fetch the details of a QR Codes using a Payment Id. +--- + +# Fetch QR Codes for a Payment ID + +## Fetch QR Codes for a Payment ID + +Use this endpoint to retrieve the details of a QR Code by using a Payment Id. + +### Request + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/qr_codes?payment_id=pay_Di5iqCqA1WEHq6 \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("payment_id","pay_Di5iqCqA1WEHq6"); + +List qrcodes = razorpay.qrCode.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->all(["payment_id" => $paymentId]) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.all({"payment_id":paymentId}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.qrcode.all({"payment_id":paymentId}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "payment_id" : "pay_HMtDKn3TnF4D8x", +} + +body, err := client.QrCode.All(para_attr, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = {"payment_id":paymentId} + +Razorpay::QrCode.all(para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paramRequest = new Dictionary(); +params.Add("payment_id","pay_Z6t7VFTb9xHeOs"); + +List paymentlink = client.QrCode.All(paramRequest); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "qr_HMsqRoeVwKbwAF", + "entity": "qr_code", + "created_at": 1623661499, + "name": "Fresh Groceries", + "usage": "multiple_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/eI9XD54Q", + "payment_amount": null, + "status": "active", + "description": "Buy fresh groceries", + "fixed_amount": false, + "payments_amount_received": 1000, + "payments_count_received": 1, + "notes": [], + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1624472999, + "close_reason": null + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api secret provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the payment. + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. For example, `qr_HMsVL8HOpbMcjU`. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`created_at` +: `integer` Unix timestamp at which the QR Code is created. + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`type` +: `string` The type of the QR Code. Possible value is `upi_qr`, which creates a QR Code that accepts only UPI payments. + + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. to get this feature activated on your account. +> + +`image_url` +: `string` The URL of the QR Code. For example, `http://rzp.io/l6MS`. Click the link to download the code. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active`: Indicates that the QR Code has been created and is ready to accept payments. + - `closed`: Indicates that the QR Code has been closed. + +`description` +: `string` A brief description about the QR Code. + +`fixed_amount` +: `boolean` Indicates if the QR Code should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR code accepts any amount. + + +> **WARN** +> +> +> **Watch Out!** +> +> When setting the `usage` to `single_use`, ensure that `fixed_amount` is `true` to generate the QR Code successfully. +> + +`payments_amount_received` +: `integer` The total amount received on the QR Code. Only captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` The unique identifier of the customer the QR Code is linked with. Know more about the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` Unix timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in Unix timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **INFO** +> +> +> **Handy Tips** +> +> - Any request beyond 2147483647 Unix timestamp will fail. +> + + +> **WARN** +> +> +> **Watch Out!** +> +> - This parameter is only available for QR codes with `usage` set as `single_use`. You will not be able to use this parameter for `multiple_use` QR codes as it will generate an error. +> - For `single_use` QR codes, the `close_by` date can be set for a maximum of 45 days. If no `close_by` date is specified, the QR code will automatically become inactive after 45 days. Conversely, `multiple_use` QR codes do not have an expiration date. +> + +`closed_at` +: `integer` Unix timestamp at which the QR Code is automatically closed. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +We are facing some trouble completing your request at the moment. Please try again shortly. +* code: 400 +* description: A GET API is executed by POST Method. +* solution: Use the correct method, that is, GET. + +\{Payment_id\} is not a valid id. +* code: 400 +* description: A wrong Payment id is provided. +* solution: Check if you have used a valid Payment id. + +\{Payment_id\} is/are not required and should not be sent +* code: 400 +* description: The URL is wrong or is missing something. +* solution: Ensure that you use the correct and complete URL without any spelling mistakes. + +The requested URL was not found on the server. +* code: 400 +* description: The URL is wrong or is missing something. +* solution: Ensure that you use the correct and complete URL without any spelling mistakes. + +"count": 0 +* code: 400 +* description: No QR Code is found for the search criteria. +* solution: There is no data for a particular Payment id. Try a different Payment id. diff --git a/llm-content/api/qr-codes/fetch-payments.md b/llm-content/api/qr-codes/fetch-payments.md new file mode 100644 index 00000000..c84e4035 --- /dev/null +++ b/llm-content/api/qr-codes/fetch-payments.md @@ -0,0 +1,405 @@ +--- +title: Fetch Payments for a QR Code +description: Fetch payments made on a particular QR Code using this endpoint. +--- + +# Fetch Payments for a QR Code + +## Fetch Payments for a QR Code + +Use this endpoint to fetch the payments made on a QR Code using this endpoint. + +### Request + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/qr_codes/qr_FuZIYx6rMbP6gs/payments \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String qrCodeId = "qr_FuZIYx6rMbP6gs"; + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List qrcode = razorpay.qrCode.fetchAllPayments(qrCodeId, params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->fetch($qrCodeId)->fetchAllPayments($options) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.fetchAllPayments(qrCodeId, options) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.qrcode.fetch_all_payments(qrCodeId, options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +QrCodeID = "qr_FuZIYx6rMbP6gs" + +body, err := client.QrCode.FetchPayments(QrCodeID, nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "count" : 1 +} +Razorpay::QrCode.fetch(qrCodeId).fetch_payments(para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string qrCodeId = "qr_Z6t7VFTb9xHeOs"; + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("count","1"); + +List qrcode = client.QrCode.FetchAllPayments(qrCodeId, paramRequest); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "pay_HMtDKn3TnF4D8x", + "entity": "payment", + "amount": 500, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "QRv2 Payment", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gauri.kumari@okhdfcbank", + "email": "gauri.kumari@example.com", + "contact": "+919000090000", + "customer_id": "cust_HKsR5se84c5LTO", + "notes": [], + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "116514257019" + }, + "created_at": 1623662800 + }, + { + "id": "pay_HMsr242ZnaLumA", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "refunded", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 1000, + "refund_status": "full", + "captured": true, + "description": "QRv2 Payment", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gauri.kumari@okhdfcbank", + "email": "gauri.kumari@example.com", + "contact": "+919000090000", + "customer_id": "cust_HKsR5se84c5LTO", + "notes": [], + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "116514090501" + }, + "created_at": 1623661533 + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the QR Code. + +### Parameters + +`from` _optional_ +: `integer` Unix timestamp, in seconds, from when payments are to be retrieved. + +`to` _optional_ +: `integer` Unix timestamp, in seconds, till when payments are to be fetched. + +`count` _optional_ +: `integer` Number of payments to be fetched. + - Default value: 10 + - Maximum value: 100 + - This can be used for pagination, in combination with `skip`. + +`skip` +: `integer` Number of records to be skipped while fetching the payments. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of ₹1, enter 100. + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `upi` + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. + + +> **INFO** +> +> +> **Handy Tips** +> +> This attribute will not be set for the card issued by a foreign bank. +> + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + + +> **INFO** +> +> +> **Handy Tips** +> +> Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). +> + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible value `in_app`. + +> **INFO** +> +> +> **Handy Tips** +> +> The field `flow` is present only in the case of Turbo UPI Payments. +> + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +\{Qr code id\} is not a valid id. +* code: 400 +* description: A wrong QR Code id is provided. +* solution: Check if you have used a valid QR Code id. + +The requested URL was not found on the server. +* code: 400 +* description: - The URL is wrong or is missing something. +- A GET API is executed by POST Method. + +* solution: - Ensure that the URL is correct and complete. +- Use the correct method, that is GET. + +"count": 0 +* code: 400 +* description: No QR Code is found for the search criteria. +* solution: There is no data for a particular Payment id. Try a different Payment id. diff --git a/llm-content/api/qr-codes/fetch-with-id.md b/llm-content/api/qr-codes/fetch-with-id.md new file mode 100644 index 00000000..16a4b9b4 --- /dev/null +++ b/llm-content/api/qr-codes/fetch-with-id.md @@ -0,0 +1,232 @@ +--- +title: Fetch a QR Code +description: Fetch the details of a QR Code by Id. +--- + +# Fetch a QR Code + +## Fetch a QR Code + +Use this endpoint to fetch the details of a QR Code. + +### Request + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/qr_codes/qr_FuZIYx6rMbP6gs \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String qrCodeId = "qr_FuZIYx6rMbP6gs"; + +QrCode qrcode = razorpay.qrCode.fetch(qrCodeId); + +```php: PHP +$api = new Api($key_id, $secret); +$api->qrCode->fetch($qrCodeId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.fetch(qrCodeId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.qrcode.fetch(qrCodeId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +qrCodeId := "qr_FuZIYx6rMbP6gs" + +body, err := client.QrCode.fetch(qrCodeId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +qrCodeId = "qr_FuZIYx6rMbP6gs" + +Razorpay::QrCode.fetch(qrCodeId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string qrCodeId = "qr_Z6t7VFTb9xHeOs"; + +QrCode qrcode = client.QrCode.Fetch(qrCodeId); +``` + +### Response + +```json: Success +{ + "id": "qr_FuZIYx6rMbP6gs", + "entity": "qr_code", + "created_at": 1623915088, + "name": "Store_1", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/oCswTOcCo", + "payment_amount": 300, + "status": "active", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "closed_at": null, + "close_reason": null +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "KbWhkDGrmxw is not a valid id", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the QR Code. + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. For example, `qr_HMsVL8HOpbMcjU`. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`created_at` +: `integer` Unix timestamp at which the QR Code is created. + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`type` +: `string` The type of the QR Code. Possible value is `upi_qr`, which creates a QR Code that accepts only UPI payments. + + + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. to get this feature activated on your account. +> + + + +`image_url` +: `string` The URL of the QR Code. For example, `http://rzp.io/l6MS`. Click the link to download the code. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active`: Indicates that the QR Code has been created and is ready to accept payments. + - `closed`: Indicates that the QR Code has been closed. + +`description` +: `string` A brief description about the QR Code. + +`fixed_amount` +: `boolean` Indicates if the QR Code should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR code accepts any amount. + + +> **WARN** +> +> +> **Watch Out!** +> +> When setting the `usage` to `single_use`, ensure that `fixed_amount` is `true` to generate the QR Code successfully. +> + +`payments_amount_received` +: `integer` The total amount received on the QR Code. Only captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` The unique identifier of the customer the QR Code is linked with. Know more about the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` Unix timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in Unix timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **INFO** +> +> +> **Handy Tips** +> +> - Any request beyond 2147483647 Unix timestamp will fail. +> + + +> **WARN** +> +> +> **Watch Out!** +> +> - This parameter is only available for QR codes with `usage` set as `single_use`. You will not be able to use this parameter for `multiple_use` QR codes as it will generate an error. +> - For `single_use` QR codes, the `close_by` date can be set for a maximum of 45 days. If no `close_by` date is specified, the QR code will automatically become inactive after 45 days. Conversely, `multiple_use` QR codes do not have an expiration date. +> + +`closed_at` +: `integer` Unix timestamp at which the QR Code is automatically closed. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The id provided does not exist. +* code: 400 +* description: - The URL is wrong or is missing something. +- A GET API is executed by POST Method. + +* solution: - Ensure you have the correct and complete URL. +- Use the right method, that is, GET. + + +\{Qr code id\} is not a valid id. +* code: 400 +* description: A wrong QR Code id is provided. +* solution: Check if you have used a valid QR Code id. diff --git a/llm-content/api/qr-codes/gst.md b/llm-content/api/qr-codes/gst.md new file mode 100644 index 00000000..7a3428d7 --- /dev/null +++ b/llm-content/api/qr-codes/gst.md @@ -0,0 +1,36 @@ +--- +title: QR Codes GST APIs +description: List of Razorpay APIs for QR Codes GST. +--- + +# QR Codes GST APIs + +You can use Razorpay QR Codes to create QR Codes and share them with customers to accept digital payments. + +## How it Works + +Given below is the flow: +1. You create a QR Code. +1. A short URL is generated. +1. Share the URL with your customers. +1. Customers scan the QR Code with their preferred UPI PSP app and complete the payment. + +## List of Endpoints + +API Endpoint | Description +--- +[Create a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/gst/create.md) | Creates a QR Code. +--- +[Close a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/gst/close.md) | Closes a QR Code. +--- +[Fetch all QR Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/gst/fetch-all.md) | Retrieves details of all QR Codes. +--- +[Fetch a QR Code with Id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/gst/fetch-with-id.md) | Retrieves details of a specific QR Code using id. +--- +[Fetch QR Codes for a Customer ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/gst/fetch-customer-id.md) | Retrieves QR Codes generated for a Customer id. +--- +[Fetch QR Codes for a Payment ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/gst/fetch-payment-id.md) | Retrieves QR Codes by Payment id. +--- +[Fetch Payments for a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/gst/fetch-payments.md) | Retrieves payments made on a QR Code. +--- +[Refund Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/gst/refunds.md) | Refunds payments made on a QR Code. diff --git a/llm-content/api/qr-codes/gst/close.md b/llm-content/api/qr-codes/gst/close.md new file mode 100644 index 00000000..91e3c3d8 --- /dev/null +++ b/llm-content/api/qr-codes/gst/close.md @@ -0,0 +1,221 @@ +--- +title: Close a QR Code +description: Close QR Codes with this endpoint. +--- + +# Close a QR Code + +## Close a QR Code + +Use this endpoint to close a QR Code. + +### Request + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/qr_codes/qr_HMsVL8HOpbMcjU/close + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String qrCodeId = "qr_HMsVL8HOpbMcjU"; + +QrCode qrcode = razorpay.qrCode.close(qrCodeId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->fetch($qrCodeId)->close() + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.close(qrCodeId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.qrcode.close(qrCodeId); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +qrCodeId = "qr_HMsVL8HOpbMcjU" + +body, err := client.QrCode.Close(qrCodeId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +qrCodeId = "qr_HMsVL8HOpbMcjU" + +Razorpay::QrCode.fetch(qrCodeId).close + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string qrCodeId = "qr_Z6t7VFTb9xHeOs"; + +QrCode qrcode = client.QrCode.Fetch(qrCodeId).Close(); +``` + +### Response + +```json: Success +{ + "id": "qr_HMsVL8HOpbMcjU", + "entity": "qr_code", + "created_at": 1623660301, + "name": "Store_1", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/BWcUVrLp", + "payment_amount": 300, + "status": "closed", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "closed_at": 1623660445, + "close_reason": "on_demand", + "tax_invoice": { + "number": "INV001", + "date": 1589994898, + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9605R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate" + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the QR Code. + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`tax_invoice` +: `json object` This block contains information about the invoices. If not provided, the transaction will default to non-GST compliant UPI flow. + + `number` + : `string` This is the invoice number against which the payment is collected. If not provided, the transaction will default to non-GST compliant UPI flow. + + `date` + : `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. For example. `1589994898`. If not provided, it will default to the current date. + + `customer_name` + : `string` Customer name on the invoice. If not provided, the transaction will default to non-GST compliant UPI flow. + + `gst_amount` + : `integer` GST amount on the invoice in paise. If not provided, the transaction will default to the non-GST compliant UPI flow. + + `cess_amount` + : `integer` CESS Amount on the invoice in paise. If not provided, the transaction will default to the non-GST compliant UPI flow. + + `supply_type` + : `string` Indicates whether the transaction is interstate or intrastate. Possible values: + - `interstate` + - `intrastate` + + If not provided, the transaction will default to the non-GST compliant UPI flow. + + `business_gstin` + : `string` The GSTIN mentioned on the invoice. For example, `06AABCU9603R1ZR`. If not passed, it will be picked up from the database. + + +> **INFO** +> +> +> **Handy Tips** +> +> 1. This parameter is only available for UPI QR Codes. + +> 2. This is an optional parameter. + +> 3. The business is responsible for the completeness and correctness of the data and not Razorpay. +> + + +`type` +: `string` The type of the QR Code. Possible values: + - `upi_qr`: Create a QR Code that accepts only UPI payments. + +`image_url` +: `string` The URL of the QR Code. A sample short URL looks like this `http://rzp.io/l6MS`. Click the link to download the code. + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`fixed_amount` +: `boolean` Indicates if the QR should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR Code accepts any amount. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active` + - `closed` + +`description` +: `string` A brief description about the QR Code. + +`payments_amount_received` +: `integer` The total amount received on the QR Code. All captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` Unique identifier of the customer the QR Code is linked with. Know more about to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` UNIX timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out** +> +> Any request beyond 2147483647 UNIX timestamp will fail. +> + +`closed_at` +: `integer` UNIX timestamp at which the QR Code is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the QR Code was created. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. diff --git a/llm-content/api/qr-codes/gst/create.md b/llm-content/api/qr-codes/gst/create.md new file mode 100644 index 00000000..b07267e1 --- /dev/null +++ b/llm-content/api/qr-codes/gst/create.md @@ -0,0 +1,446 @@ +--- +title: Create a QR Code +description: Create QR Codes with this endpoint and share with your customers. +--- + +# Create a QR Code + +## Create a QR Code + +Use this endpoint to create a QR Code. + +- You can share the short URL with customers to accept payments. +- You can print and download it. +- You can create QR Codes for single or multiple use and for specific or all customers. + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/qr_codes \ +-H "Content-Type: application/json" \ +-d '{ + "type": "upi_qr", + "name": "Store_1", + "usage": "single_use", + "fixed_amount": true, + "payment_amount": 300, + "description": "For Store 1", + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "tax_invoice": { + "number": "INV001", + "date": 1589994898, + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9605R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject qrRequest = new JSONObject(); +qrRequest.put("type","upi_qr"); +qrRequest.put("name","Store_1"); +qrRequest.put("usage","single_use"); +qrRequest.put("fixed_amount",true); +qrRequest.put("payment_amount",300); +qrRequest.put("description","For Store 1"); +qrRequest.put("customer_id","cust_HKsR5se84c5LTO"); +qrRequest.put("close_by",1681615838); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +qrRequest.put("notes",notes); +JSONObject taxInvoice = new JSONObject(); +taxInvoice.put("number","INV001"); +taxInvoice.put("date",1589994898); +taxInvoice.put("customer_name","Gaurav Kumar"); +taxInvoice.put("business_gstin","06AABCU9605R1ZR"); +taxInvoice.put("gst_amount",4000); +taxInvoice.put("cess_amount",0); +taxInvoice.put("supply_type","interstate"); +qrRequest.put("tax_invoice",taxInvoice); + +QrCode qrcode = razorpay.qrCode.create(qrRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->create(array("type" => "upi_qr","name" => "Store_1", "usage" => "single_use","fixed_amount" => 1,"payment_amount" => 300,"customer_id" => "cust_HKsR5se84c5LTO","description" => "For Store 1","close_by" => 1681615838,"notes" => array("purpose" => "Test UPI QR Code notes"),"tax_invoice" => array("number" => "INV001", "date" => 1589994898,"customer_name" => "Gaurav Kumar", "business_gstin"=> "06AABCU9605R1ZR","gst_amount" => 4000, "cess_amount" => 0, "supply_type" => "interstate"))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.create({ + type: "upi_qr", + name: "Store_1", + usage: "single_use", + fixed_amount: true, + payment_amount: 300, + description: "For Store 1", + customer_id: "cust_HKsR5se84c5LTO", + close_by: 1681615838, + notes: { + purpose: "Test UPI QR Code notes" + }, + tax_invoice: { + number: "INV001", + date: 1589994898, + customer_name: "Gaurav Kumar", + business_gstin: "06AABCU9605R1ZR", + gst_amount: 4000, + cess_amount: 0, + supply_type: "interstate" + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.qrcode.create({ + "type": "upi_qr", + "name": "Store_1", + "usage": "single_use", + "fixed_amount": True, + "payment_amount": 300, + "description": "For Store 1", + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "tax_invoice": { + "number": "INV001", + "date": 1589994898, + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9605R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +notes = map[string]interface{}{ + "purpose": "Test UPI QR Code notes", + } + +tax_invoice = map[string]interface{}{ + "number": "INV001", + "date": 1589994898, + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9605R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate", + } + +data := map[string]interface{}{ + "type": "upi_qr", + "name": "Store_1", + "usage": "single_use", + "fixed_amount": true, + "payment_amount": 300, + "description": "For Store 1", + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "notes": notes, + "tax_invoice": tax_invoice, +}) + +body, err := client.QrCode.create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "type": "upi_qr", + "name": "Store_1", + "usage": "single_use", + "fixed_amount": true, + "payment_amount": 300, + "description": "For Store 1", + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "tax_invoice": { + "number": "INV001", + "date": 1589994898, + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9605R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate" + } +} + +Razorpay::QrCode.create(para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary qrRequest = new Dictionary(); +qrRequest.Add("type","upi_qr"); +qrRequest.Add("name","Store_1"); +qrRequest.Add("usage","single_use"); +qrRequest.Add("fixed_amount",true); +qrRequest.Add("payment_amount",300); +qrRequest.Add("description","For Store 1"); +qrRequest.Add("customer_id","cust_JDdNazagOgg9Ig"); +qrRequest.Add("close_by",1681615838); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +qrRequest.Add("notes",notes); +Dictionary taxInvoice = new Dictionary(); +taxInvoice.Add("number","INV001"); +taxInvoice.Add("date",1589994898); +taxInvoice.Add("customer_name","Gaurav Kumar"); +taxInvoice.Add("business_gstin","06AABCU9605R1ZR"); +taxInvoice.Add("gst_amount",4000); +taxInvoice.Add("cess_amount",0); +taxInvoice.Add("supply_type","interstate"); +qrRequest.Add("tax_invoice",taxInvoice); + +QrCode qrcode = client.QrCode.Create(qrRequest); +``` + +### Response + +```json: Success +{ + "id": "qr_HMsVL8HOpbMcjU", + "entity": "qr_code", + "created_at": 1623660301, + "name": "Store_1", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/BWcUVrLp", + "payment_amount": 300, + "status": "active", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "tax_invoice": { + "number": "INV001", + "date": 1589994898, + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9605R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate" + } +} +``` + +### Parameters + +`type` _mandatory_ +: `string` The type of the QR Code. Possible values: + - `upi_qr`: Create a QR Code that accepts only UPI payments. + +`name` _optional_ +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` _mandatory_ +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`fixed_amount` _optional_ +: `boolean` Indicates if the QR should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR Code accepts any amount. + +`payment_amount` _mandatory if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. This is a mandatory parameter if **fixed_amount** is selected. + +`description` _optional_ +: `string` A brief description about the QR Code. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` _optional_ +: `string` Unique identifier of the customer the QR Code is linked with. Know more about to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` _optional_ +: `integer` UNIX timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 2 minutes after the current time. The date range can be set to `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). Any request beyond 2147483647 UNIX timestamp will fail. + +`tax_invoice` _optional_ +: `json object` This block contains information about the invoices. If not provided, the transaction will default to non-GST compliant UPI flow. + + `number` _optional_ + : `string` This is the invoice number against which the payment is collected. If not provided, the transaction will default to non-GST compliant UPI flow. + + `date` _optional_ + : `integer` Unix Timestamp that indicates the issue date of the invoice. For example. `1589994898`. If not provided, it will default to the current date. + + `customer_name` _optional_ + : `string` Customer name on the invoice. If not provided, the transaction will default to non-GST compliant UPI flow. + + `gst_amount` _optional_ + : `integer` GST amount on the invoice in paise. If not provided, the transaction will default to the non-GST compliant UPI flow. + + `cess_amount` _optional_ + : `integer` CESS Amount on the invoice in paise. If not provided, the transaction will default to the non-GST compliant UPI flow. + + `supply_type` _optional_ + : `string` Indicates whether the transaction is interstate or intrastate. Possible values: + - `interstate` + - `intrastate` + + If not provided, the transaction will default to the non-GST compliant UPI flow. + + `business_gstin` _optional_ + : `string` The GSTIN mentioned on the invoice. For example, `06AABCU9603R1ZR`. If not passed, it is picked up from the database. + + +> **INFO** +> +> +> **Handy Tips** +> +> 1. This parameter is only available for UPI QR Codes. + +> 2. This is an optional parameter. + +> 3. The business is responsible for the completeness and correctness of the data and not Razorpay. +> + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`tax_invoice` +: `json object` This block contains information about the invoices. If not provided, the transaction will default to non-GST compliant UPI flow. + + `number` + : `string` This is the invoice number against which the payment is collected. If not provided, the transaction will default to non-GST compliant UPI flow. + + `date` + : `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. For example. `1589994898`. If not provided, it will default to the current date. + + `customer_name` + : `string` Customer name on the invoice. If not provided, the transaction will default to non-GST compliant UPI flow. + + `gst_amount` + : `integer` GST amount on the invoice in paise. If not provided, the transaction will default to the non-GST compliant UPI flow. + + `cess_amount` + : `integer` CESS Amount on the invoice in paise. If not provided, the transaction will default to the non-GST compliant UPI flow. + + `supply_type` + : `string` Indicates whether the transaction is interstate or intrastate. Possible values: + - `interstate` + - `intrastate` + + If not provided, the transaction will default to the non-GST compliant UPI flow. + + `business_gstin` + : `string` The GSTIN mentioned on the invoice. For example, `06AABCU9603R1ZR`. If not passed, it will be picked up from the database. + + +> **INFO** +> +> +> **Handy Tips** +> +> 1. This parameter is only available for UPI QR Codes. + +> 2. This is an optional parameter. + +> 3. The business is responsible for the completeness and correctness of the data and not Razorpay. +> + + +`type` +: `string` The type of the QR Code. Possible values: + - `upi_qr`: Create a QR Code that accepts only UPI payments. + +`image_url` +: `string` The URL of the QR Code. A sample short URL looks like this `http://rzp.io/l6MS`. Click the link to download the code. + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`fixed_amount` +: `boolean` Indicates if the QR should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR Code accepts any amount. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active` + - `closed` + +`description` +: `string` A brief description about the QR Code. + +`payments_amount_received` +: `integer` The total amount received on the QR Code. All captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` Unique identifier of the customer the QR Code is linked with. Know more about to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` UNIX timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out** +> +> Any request beyond 2147483647 UNIX timestamp will fail. +> + +`closed_at` +: `integer` UNIX timestamp at which the QR Code is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the QR Code was created. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. diff --git a/llm-content/api/qr-codes/gst/fetch-all.md b/llm-content/api/qr-codes/gst/fetch-all.md new file mode 100644 index 00000000..454e2229 --- /dev/null +++ b/llm-content/api/qr-codes/gst/fetch-all.md @@ -0,0 +1,291 @@ +--- +title: Fetch All QR Codes +description: Fetch the details of multiple QR Codes using this endpoint. +--- + +# Fetch All QR Codes + +## Fetch All QR Codes + +Use this endpoint to retrieve the details of multiple QR Codes. + +### Request + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/qr_codes \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List qrcode = razorpay.qrCode.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->all($options) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.all() + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.qrcode.all() + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "count": "2", +} + +body, err := client.QrCode.All(nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "count": 1 +} + +Razorpay::QrCode.all(para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("count", "1"); + +List paymentlink = client.QrCode.All(paramRequest); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "qr_HO2jGkWReVBMNu", + "entity": "qr_code", + "created_at": 1623914648, + "name": "Store_1", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/w2CEwYmkAu", + "payment_amount": 300, + "status": "active", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "closed_at": null, + "close_reason": null, + "tax_invoice": { + "number": "INV001", + "date": 1589994898, + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9605R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate", + "tax_invoice": { + "number": "INV001", + "date": 1589994898, + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9604R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate" + } + } + }, + { + "id": "qr_HO2e0813YlchUn", + "entity": "qr_code", + "created_at": 1623914349, + "name": "Acme Groceries", + "usage": "multiple_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/X6QM7LL", + "payment_amount": null, + "status": "closed", + "description": "Buy fresh groceries", + "fixed_amount": false, + "payments_amount_received": 200, + "payments_count_received": 1, + "notes": { + "Branch": "Bangalore - Rajaji Nagar" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1625077799, + "closed_at": 1623914515, + "close_reason": "on_demand", + "tax_invoice": { + "number": "INV001", + "date": "1589994898", + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9604R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate", + "tax_invoice": { + "number": "INV001", + "date": 1589994898, + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9605R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate" + } + } + } + ] +} +``` + +### Parameters + +`from` +: `integer` Timestamp, in seconds, from when QR Codes are to be retrieved. + +`to` +: `integer` Timestamp, in seconds, till when QR Codes are to be retrieved. + +`count` +: `integer` Number of QR Codes to be retrieved. The default value is `10` and the maximum value is `100`. This can be used for pagination, in combination with `skip`. + +`skip` +: `integer` Number of records to be skipped while fetching the QR Codes. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`tax_invoice` +: `json object` This block contains information about the invoices. If not provided, the transaction will default to non-GST compliant UPI flow. + + `number` + : `string` This is the invoice number against which the payment is collected. If not provided, the transaction will default to non-GST compliant UPI flow. + + `date` + : `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. For example. `1589994898`. If not provided, it will default to the current date. + + `customer_name` + : `string` Customer name on the invoice. If not provided, the transaction will default to non-GST compliant UPI flow. + + `gst_amount` + : `integer` GST amount on the invoice in paise. If not provided, the transaction will default to the non-GST compliant UPI flow. + + `cess_amount` + : `integer` CESS Amount on the invoice in paise. If not provided, the transaction will default to the non-GST compliant UPI flow. + + `supply_type` + : `string` Indicates whether the transaction is interstate or intrastate. Possible values: + - `interstate` + - `intrastate` + + If not provided, the transaction will default to the non-GST compliant UPI flow. + + `business_gstin` + : `string` The GSTIN mentioned on the invoice. For example, `06AABCU9603R1ZR`. If not passed, it will be picked up from the database. + + +> **INFO** +> +> +> **Handy Tips** +> +> 1. This parameter is only available for UPI QR Codes. + +> 2. This is an optional parameter. + +> 3. The business is responsible for the completeness and correctness of the data and not Razorpay. +> + + +`type` +: `string` The type of the QR Code. Possible values: + - `upi_qr`: Create a QR Code that accepts only UPI payments. + +`image_url` +: `string` The URL of the QR Code. A sample short URL looks like this `http://rzp.io/l6MS`. Click the link to download the code. + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`fixed_amount` +: `boolean` Indicates if the QR should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR Code accepts any amount. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active` + - `closed` + +`description` +: `string` A brief description about the QR Code. + +`payments_amount_received` +: `integer` The total amount received on the QR Code. All captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` Unique identifier of the customer the QR Code is linked with. Know more about to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` UNIX timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out** +> +> Any request beyond 2147483647 UNIX timestamp will fail. +> + +`closed_at` +: `integer` UNIX timestamp at which the QR Code is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the QR Code was created. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. diff --git a/llm-content/api/qr-codes/gst/fetch-customer-id.md b/llm-content/api/qr-codes/gst/fetch-customer-id.md new file mode 100644 index 00000000..32375d02 --- /dev/null +++ b/llm-content/api/qr-codes/gst/fetch-customer-id.md @@ -0,0 +1,232 @@ +--- +title: Fetch QR Codes for a Customer ID +description: Fetch the details of a QR Codes using a Customer id. +--- + +# Fetch QR Codes for a Customer ID + +## Fetch QR Codes for a Customer ID + +Use this endpoint to retrieve the details of a QR Code by using a Customer id. + +### Request + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/qr_codes?customer_id=cust_HKsR5se84c5LTO \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("customer_id","cust_HKsR5se84c5LTO"); + +List qrcodes = razorpay.qrCode.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->all(["customer_id" => $customerId]) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.all({"customer_id":customerId}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.qrcode.all({"customer_id":customerId}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "customer_id" : "cust_HKsR5se84c5LTO", +} + +body, err := client.QrCode.All(para_attr, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = {"customer_id":customerId} + +Razorpay::QrCode.all(para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string CustomerId = cust_JDdNazagOgg9Ig + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("customer_id", CustomerId); + +List paymentlink = client.QrCode.All(paramRequest); + +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "qr_HMsgvioW64f0vh", + "entity": "qr_code", + "created_at": 1623660959, + "name": "Store_1", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/DTa2eQR", + "payment_amount": 300, + "status": "active", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "tax_invoice": { + "number": "INV001", + "date": 1589994898, + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9605R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate" + } + } + ] +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_FUEQArey3YFi9R`. + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`tax_invoice` +: `json object` This block contains information about the invoices. If not provided, the transaction will default to non-GST compliant UPI flow. + + `number` + : `string` This is the invoice number against which the payment is collected. If not provided, the transaction will default to non-GST compliant UPI flow. + + `date` + : `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. For example. `1589994898`. If not provided, it will default to the current date. + + `customer_name` + : `string` Customer name on the invoice. If not provided, the transaction will default to non-GST compliant UPI flow. + + `gst_amount` + : `integer` GST amount on the invoice in paise. If not provided, the transaction will default to the non-GST compliant UPI flow. + + `cess_amount` + : `integer` CESS Amount on the invoice in paise. If not provided, the transaction will default to the non-GST compliant UPI flow. + + `supply_type` + : `string` Indicates whether the transaction is interstate or intrastate. Possible values: + - `interstate` + - `intrastate` + + If not provided, the transaction will default to the non-GST compliant UPI flow. + + `business_gstin` + : `string` The GSTIN mentioned on the invoice. For example, `06AABCU9603R1ZR`. If not passed, it will be picked up from the database. + + +> **INFO** +> +> +> **Handy Tips** +> +> 1. This parameter is only available for UPI QR Codes. + +> 2. This is an optional parameter. + +> 3. The business is responsible for the completeness and correctness of the data and not Razorpay. +> + + +`type` +: `string` The type of the QR Code. Possible values: + - `upi_qr`: Create a QR Code that accepts only UPI payments. + +`image_url` +: `string` The URL of the QR Code. A sample short URL looks like this `http://rzp.io/l6MS`. Click the link to download the code. + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`fixed_amount` +: `boolean` Indicates if the QR should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR Code accepts any amount. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active` + - `closed` + +`description` +: `string` A brief description about the QR Code. + +`payments_amount_received` +: `integer` The total amount received on the QR Code. All captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` Unique identifier of the customer the QR Code is linked with. Know more about to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` UNIX timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out** +> +> Any request beyond 2147483647 UNIX timestamp will fail. +> + +`closed_at` +: `integer` UNIX timestamp at which the QR Code is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the QR Code was created. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. diff --git a/llm-content/api/qr-codes/gst/fetch-payment-id.md b/llm-content/api/qr-codes/gst/fetch-payment-id.md new file mode 100644 index 00000000..801b3049 --- /dev/null +++ b/llm-content/api/qr-codes/gst/fetch-payment-id.md @@ -0,0 +1,228 @@ +--- +title: Fetch QR Codes for a Payment ID +description: Fetch the details of a QR Codes using a Payment id. +--- + +# Fetch QR Codes for a Payment ID + +## Fetch QR Codes for a Payment ID + +Use this endpoint to retrieve the details of a QR Code by using a Payment id. + +### Request + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/qr_codes?payment_id=pay_Di5iqCqA1WEHq6 \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("payment_id","pay_Di5iqCqA1WEHq6"); + +List qrcodes = razorpay.qrCode.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->all(["payment_id" => $paymentId]) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.all({"payment_id":paymentId}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.qrcode.all({"payment_id":paymentId}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "payment_id" : "pay_HMtDKn3TnF4D8x", +} + +body, err := client.QrCode.All(para_attr, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = {"payment_id":paymentId} + +Razorpay::QrCode.all(para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paramRequest = new Dictionary(); +params.Add("payment_id","pay_Z6t7VFTb9xHeOs"); + +List paymentlink = client.QrCode.All(paramRequest); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "qr_HMsqRoeVwKbwAF", + "entity": "qr_code", + "created_at": 1623661499, + "name": "Fresh Groceries", + "usage": "multiple_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/eI9XD54Q", + "payment_amount": null, + "status": "active", + "description": "Buy fresh groceries", + "fixed_amount": false, + "payments_amount_received": 1000, + "payments_count_received": 1, + "notes": [], + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1624472999, + "close_reason": null, + "tax_invoice": { + "number": "INV001", + "date": 1589994898, + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9605R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate" + } + } + ] +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the payment. + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`tax_invoice` +: `json object` This block contains information about the invoices. If not provided, the transaction will default to non-GST compliant UPI flow. + + `number` + : `string` This is the invoice number against which the payment is collected. If not provided, the transaction will default to non-GST compliant UPI flow. + + `date` + : `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. For example. `1589994898`. If not provided, it will default to the current date. + + `customer_name` + : `string` Customer name on the invoice. If not provided, the transaction will default to non-GST compliant UPI flow. + + `gst_amount` + : `integer` GST amount on the invoice in paise. If not provided, the transaction will default to the non-GST compliant UPI flow. + + `cess_amount` + : `integer` CESS Amount on the invoice in paise. If not provided, the transaction will default to the non-GST compliant UPI flow. + + `supply_type` + : `string` Indicates whether the transaction is interstate or intrastate. Possible values: + - `interstate` + - `intrastate` + + If not provided, the transaction will default to the non-GST compliant UPI flow. + + `business_gstin` + : `string` The GSTIN mentioned on the invoice. For example, `06AABCU9603R1ZR`. If not passed, it will be picked up from the database. + + +> **INFO** +> +> +> **Handy Tips** +> +> 1. This parameter is only available for UPI QR Codes. + +> 2. This is an optional parameter. + +> 3. The business is responsible for the completeness and correctness of the data and not Razorpay. +> + + +`type` +: `string` The type of the QR Code. Possible values: + - `upi_qr`: Create a QR Code that accepts only UPI payments. + +`image_url` +: `string` The URL of the QR Code. A sample short URL looks like this `http://rzp.io/l6MS`. Click the link to download the code. + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`fixed_amount` +: `boolean` Indicates if the QR should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR Code accepts any amount. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active` + - `closed` + +`description` +: `string` A brief description about the QR Code. + +`payments_amount_received` +: `integer` The total amount received on the QR Code. All captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` Unique identifier of the customer the QR Code is linked with. Know more about to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` UNIX timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out** +> +> Any request beyond 2147483647 UNIX timestamp will fail. +> + +`closed_at` +: `integer` UNIX timestamp at which the QR Code is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the QR Code was created. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. diff --git a/llm-content/api/qr-codes/gst/fetch-payments.md b/llm-content/api/qr-codes/gst/fetch-payments.md new file mode 100644 index 00000000..68402634 --- /dev/null +++ b/llm-content/api/qr-codes/gst/fetch-payments.md @@ -0,0 +1,367 @@ +--- +title: Fetch Payments for a QR Code +description: Fetch payments made on a particular QR Code using this endpoint. +--- + +# Fetch Payments for a QR Code + +## Fetch Payments for a QR Code + +Use this endpoint to fetch the payments made on a QR Code using this endpoint. + +### Request + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/qr_codes/qr_FuZIYx6rMbP6gs/payments \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String qrCodeId = "qr_FuZIYx6rMbP6gs"; + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List qrcode = razorpay.qrCode.fetchAllPayments(qrCodeId, params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->fetch($qrCodeId)->fetchAllPayments($options) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.fetchAllPayments(qrCodeId, options) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.qrcode.fetch_all_payments(qrCodeId, options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +QrCodeID = "qr_FuZIYx6rMbP6gs" + +body, err := client.QrCode.FetchPayments(QrCodeID, nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "count" : 1 +} +Razorpay::QrCode.fetch(qrCodeId).fetch_payments(para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string qrCodeId = "qr_Z6t7VFTb9xHeOs"; + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("count","1"); + +List qrcode = client.QrCode.FetchAllPayments(qrCodeId, paramRequest); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "pay_HMtDKn3TnF4D8x", + "entity": "payment", + "amount": 500, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "QRv2 Payment", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gauri.kumari@okhdfcbank", + "email": "gauri.kumari@example.com", + "contact": "+919000090000", + "customer_id": "cust_HKsR5se84c5LTO", + "notes": [], + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "116514257019" + }, + "created_at": 1623662800 + }, + { + "id": "pay_HMsr242ZnaLumA", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "refunded", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 1000, + "refund_status": "full", + "captured": true, + "description": "QRv2 Payment", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gauri.kumari@okhdfcbank", + "email": "gauri.kumari@example.com", + "contact": "+919000090000", + "customer_id": "cust_HKsR5se84c5LTO", + "notes": [], + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "116514090501" + }, + "created_at": 1623661533 + } + ] +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the QR Code. + +### Parameters + +`from` +: `integer` Timestamp, in seconds, from when payments are to be fetched. + +`to` +: `integer` Timestamp, in seconds, till when payments are to be fetched. + +`count` +: `integer` Number of payments to be fetched. The default value is `10` and the maximum value is `100`. This can be used for pagination, in combination with `skip`. + +`skip` +: `integer` Number of records to be skipped while fetching the payments. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. + + +> **INFO** +> +> +> **Handy Tips** +> +> This attribute will not be set for the card issued by a foreign bank. +> + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + +> **INFO** +> +> +> **Handy Tips** +> +> Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). +> + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible value `in_app`. + +> **INFO** +> +> +> **Handy Tips** +> +> The field `flow` is present only in the case of Turbo UPI Payments. +> + + + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. diff --git a/llm-content/api/qr-codes/gst/fetch-with-id.md b/llm-content/api/qr-codes/gst/fetch-with-id.md new file mode 100644 index 00000000..7d511039 --- /dev/null +++ b/llm-content/api/qr-codes/gst/fetch-with-id.md @@ -0,0 +1,220 @@ +--- +title: Fetch a QR Code +description: Fetch the details of a QR Code by Id. +--- + +# Fetch a QR Code + +## Fetch a QR Code + +Use this endpoint to fetch the details of a QR Code. + +### Request + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/qr_codes/qr_FuZIYx6rMbP6gs \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String qrCodeId = "qr_FuZIYx6rMbP6gs"; + +QrCode qrcode = razorpay.qrCode.fetch(qrCodeId); + +```php: PHP +$api = new Api($key_id, $secret); +$api->qrCode->fetch($qrCodeId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.fetch(qrCodeId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.qrcode.fetch(qrCodeId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +qrCodeId := "qr_FuZIYx6rMbP6gs" + +body, err := client.QrCode.fetch(qrCodeId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +qrCodeId = "qr_FuZIYx6rMbP6gs" + +Razorpay::QrCode.fetch(qrCodeId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string qrCodeId = "qr_Z6t7VFTb9xHeOs"; + +QrCode qrcode = client.QrCode.Fetch(qrCodeId); +``` + +### Response + +```json: Success +{ + "id": "qr_HO2r1MDprYtWRT", + "entity": "qr_code", + "created_at": 1623915088, + "name": "Store_1", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/oCswTOcCo", + "payment_amount": 300, + "status": "active", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "closed_at": null, + "close_reason": null, + "tax_invoice": { + "number": "INV001", + "date": 1589994898, + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9605R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate" + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the QR Code. + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`tax_invoice` +: `json object` This block contains information about the invoices. If not provided, the transaction will default to non-GST compliant UPI flow. + + `number` + : `string` This is the invoice number against which the payment is collected. If not provided, the transaction will default to non-GST compliant UPI flow. + + `date` + : `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. For example. `1589994898`. If not provided, it will default to the current date. + + `customer_name` + : `string` Customer name on the invoice. If not provided, the transaction will default to non-GST compliant UPI flow. + + `gst_amount` + : `integer` GST amount on the invoice in paise. If not provided, the transaction will default to the non-GST compliant UPI flow. + + `cess_amount` + : `integer` CESS Amount on the invoice in paise. If not provided, the transaction will default to the non-GST compliant UPI flow. + + `supply_type` + : `string` Indicates whether the transaction is interstate or intrastate. Possible values: + - `interstate` + - `intrastate` + + If not provided, the transaction will default to the non-GST compliant UPI flow. + + `business_gstin` + : `string` The GSTIN mentioned on the invoice. For example, `06AABCU9603R1ZR`. If not passed, it will be picked up from the database. + + +> **INFO** +> +> +> **Handy Tips** +> +> 1. This parameter is only available for UPI QR Codes. + +> 2. This is an optional parameter. + +> 3. The business is responsible for the completeness and correctness of the data and not Razorpay. +> + + +`type` +: `string` The type of the QR Code. Possible values: + - `upi_qr`: Create a QR Code that accepts only UPI payments. + +`image_url` +: `string` The URL of the QR Code. A sample short URL looks like this `http://rzp.io/l6MS`. Click the link to download the code. + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`fixed_amount` +: `boolean` Indicates if the QR should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR Code accepts any amount. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active` + - `closed` + +`description` +: `string` A brief description about the QR Code. + +`payments_amount_received` +: `integer` The total amount received on the QR Code. All captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` Unique identifier of the customer the QR Code is linked with. Know more about to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` UNIX timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out** +> +> Any request beyond 2147483647 UNIX timestamp will fail. +> + +`closed_at` +: `integer` UNIX timestamp at which the QR Code is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the QR Code was created. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. diff --git a/llm-content/api/qr-codes/gst/refunds.md b/llm-content/api/qr-codes/gst/refunds.md new file mode 100644 index 00000000..5e5b9b7c --- /dev/null +++ b/llm-content/api/qr-codes/gst/refunds.md @@ -0,0 +1,189 @@ +--- +title: Refund Payments +description: Refund payments made on a QR Code with this endpoint. +--- + +# Refund Payments + +## Refund Payments + +Use this endpoint to refund payments made on a QR Code. + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/pay_HKrqmsgBHbaeIM/refund \ +-H "Content-Type: application/json" \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_29QQoUBi66xm2f"; + +JSONObject refundRequest = new JSONObject(); +refundRequest.put("amount",100); +refundRequest.put("speed","normal"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +refundRequest.put("notes",notes); +refundRequest.put("receipt","Receipt No. #31"); + +Payment payment = razorpay.payments.refund(paymentId,refundRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId)->refund(array("amount"=> "100", "speed"=>"normal", "notes"=>array("notes_key_1"=>"Beam me up Scotty.", "notes_key_2"=>"Engage"), "receipt"=>"Receipt No. 31")); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.refund(paymentId,{ + "amount": "100", + "speed": "normal", + "notes": { + "notes_key_1": "Beam me up Scotty.", + "notes_key_2": "Engage" + }, + "receipt": "Receipt No. 31" +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "speed": "normal", + "notes": map[string]interface{}{ + "key_1": "value1", + "key_2": "value2", + }, +} +body, err := client.Payment.Refund("",1200, data, nil) + +```ruby: Ruby +require 'razorpay' + +Razorpay.setup("YOUR_KEY_ID", "YOUR_KEY_SECRET") +Razorpay::Payment.fetch("pay_29QQoUBi66xm2f").refund() + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.refund(paymentId,{ + "amount": "100", + "speed": "normal", + "notes": { + "notes_key_1": "Beam me up Scotty.", + "notes_key_2": "Engage" + }, + "receipt": "Receipt No. 31" +}) + +```csharp: .NET +//initialize the SDK client +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +// payment to be refunded, payment must be a captured payment +Payment payment = client.Payment.Fetch(paymentId); + +//Full Refund +Refund refund = payment.Refund(); + +//Partial Refund +Dictionary data = new Dictionary(); +data.Add("amount", "500100"); +Refund refund = payment.Refund(data); +``` + +### Response + +```json: Response +{ + "id": "rfnd_HMtH2fBtD60QkX", + "entity": "refund", + "amount": 200, + "currency": "INR", + "payment_id": "pay_HKrqmsgBHbaeIM", + "notes": [], + "receipt": null, + "acquirer_data": { + "rrn": null + }, + "created_at": 1623663010, + "batch_id": null, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "normal" +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the payment to be refunded. + +### Parameters + +`amount` _optional_ +: `string` Amount to be refunded. If no value is passed, a full refund is issued. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` Unique identifier of the refund. + +`entity` +: `string` Indicates the type of entity. Here, it is `refund`. + +`amount` +: `integer` The amount to be refunded (in the smallest unit of currency). + For example, refund in INR, a value of 100 means 100 paise (equivalent to ₹1). + +`currency` +: `string` The currency of the amount for which refund is initiated. + +`payment_id` +: `string` Unique identifier of the payment for which the refund is initiated. + +`created_at` +: `integer` Timestamp, in Unix format, when the refund was created. + +`batch_id` +: `string` This parameter is populated if the refund was created as part of a batch upload. For example, `batch_00000000000001`. + +`notes` +: `json object` Key-value store for storing your reference data. A maximum of 15 key-value pairs can be included. + +`receipt` +: `string` A unique identifier provided by you for your internal reference. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + +`status` +: `string` Indicates the state of the refund. Possible values: + - `pending`: This state indicates that Razorpay is attempting to process the refund. + - `processed`: This is the final state of the refund. + - `failed`: A refund can attain the failed state in the following scenarios: + + - Normal refund is not possible for a payment which is more than 6 months old. + +`speed_requested` +: `string` The processing mode of the refund seen in the refund response. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. +Possible value is `normal`, which indicates that the refund will be processed via the normal speed. That is, the refund will take 5-7 working days. Know more about [normal refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md#create-a-normal-refund). + +`speed_processed` +: `string` This is a parameter in the response which describes the mode used to process a refund. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. Possible value is `normal`, which indicates that the refund has been processed by the payment processing partner. The refund will take 5-7 working days. + + Know more about [Refunds API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md) to perform other refund-related operations: + - Fetch a particular refund or a list of refunds for a payment ID. + - Update a refund to modify the Notes field. diff --git a/llm-content/api/qr-codes/image-content.md b/llm-content/api/qr-codes/image-content.md new file mode 100644 index 00000000..c2c85cfb --- /dev/null +++ b/llm-content/api/qr-codes/image-content.md @@ -0,0 +1,49 @@ +--- +title: QR Codes (Image Content) +--- + +# QR Codes (Image Content) + +Create Razorpay [QR Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes.md) and share them with customers to accept digital payments. + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> + +Fork the Razorpay Postman Public Workspace and try the QR Codes (Image Content) APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-90436eef-f17f-4bc1-9d13-b622a4270125) + +### Related Guides + +[About QR Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes.md) + +### Endpoints + +- **post** `/v1/payments/qr_codes` - Create a QR Code: + Creates a QR Code. + +- **post** `/v1/payments/qr_codes/:qr_id/close` - Close a QR Code: + Closes a QR Code. + +- **get** `/v1/payments/qr_codes?count=2` - Fetch All QR Codes: + Retrieves details of all QR Codes. + +- **get** `/v1/payments/qr_codes/:qr_id` - Fetch a QR Code With ID: + Retrieves details of a QR Code using id. + +- **get** `/v1/payments/qr_codes?customer_id={customer_id}` - Fetch QR Codes for a Customer ID: + Retrieves QR Codes generated for a Customer id. + +- **get** `/v1/payments/qr_codes?payment_id={payment_id}` - Fetch QR Codes for a Payment ID: + Retrieves QR Codes by Payment id. + +- **get** `/v1/payments/qr_codes/:qr_id/payments` - Fetch Payments for a QR Code: + Retrieves payments made on a QR Code. + +- **post** `/v1/payments/:id/refund` - Refund Payments: + Refunds payments made on a QR Code. diff --git a/llm-content/api/qr-codes/image-content/close.md b/llm-content/api/qr-codes/image-content/close.md new file mode 100644 index 00000000..fc7fc254 --- /dev/null +++ b/llm-content/api/qr-codes/image-content/close.md @@ -0,0 +1,213 @@ +--- +title: Close a QR Code | Image Content +description: Close QR Codes with this endpoint. +--- + +# Close a QR Code | Image Content + +## Close a QR Code + +Use this endpoint to close a QR Code. + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/qr_codes/qr_HMsVL8HOpbMcjU/close + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String qrCodeId = "qr_HMsVL8HOpbMcjU"; + +QrCode qrcode = razorpay.qrCode.close(qrCodeId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->fetch($qrCodeId)->close() + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.close(qrCodeId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.qrcode.close(qrCodeId); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +qrCodeId = "qr_HMsVL8HOpbMcjU" + +body, err := client.QrCode.Close(qrCodeId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +qrCodeId = "qr_HMsVL8HOpbMcjU" + +Razorpay::QrCode.fetch(qrCodeId).close + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string qrCodeId = "qr_Z6t7VFTb9xHeOs"; + +QrCode qrcode = client.QrCode.Fetch(qrCodeId).Close(); +``` + +### Response + +```json: Success +{ + "id": "qr_HMsVL8HOpbMcjU", + "entity": "qr_code", + "created_at": 1623660301, + "name": "Store_1", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/BWcUVrLp", + "image_content": "upi://pay?pa=qmart.razorpay@hdfcbank&pn=TestAccount&tr=RZPGT5viB4WHeoUuuqrv2&tn=TestAccountRaftarSoft&am=100&cu=INR&mc=5411", + "payment_amount": 300, + "status": "closed", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "closed_at": 1623660445, + "close_reason": "on_demand" +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The requested URL was not found on the server.", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the QR Code. + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`type` +: `string` The type of the QR Code. Possible values: + - `upi_qr`: Create a QR Code that accepts only UPI payments. + - `bharat_qr`: Create a QR Code that accepts UPI and card payments. This is an on-demand feature. Learn more about [Bharat QR](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bharatqr.md). + +`image_url` +: `string` The URL of the QR Code. For example, `http://rzp.io/l6MS`. Click the link to download the code. + +`image_content` +: `string` The link encoded to the payable QR Code using any QR Code generator. For example: + - For UPI QR: `upi://pay?pa=dmart.razorpay@hdfcbank&pn=TestAccount&tr=RZPGT5viB4WHeoUuuqrv2&tn=TestAccountRaftarSoft&am=100&cu=INR&mc=5411` + - For Bharat QR: `000201010212021643926300000000850415540461000000008061661005900000000890827YESB0CMSNOC222333004882700126430010A0000005240117razorpaybqr@icici02041.1027350010A0000005240117RZPGT8ildsFTgS5Sp52047531530335654041.105802IN5906zxcbmn6005Delhi610611008562300514GT8ildsFTgS5Sp070838R004506304B6A9` + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`fixed_amount` +: `boolean` Indicates if the QR should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR Code accepts any amount. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active` + - `closed` + +`description` +: `string` A brief description about the QR Code. + +`payments_amount_received` +: `integer` The total amount received on the QR Code. All captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` Unique identifier of the customer the QR Code is linked with. Know more about to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` Unix timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in Unix timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> Any request beyond 2147483647 Unix timestamp will fail. +> + +`closed_at` +: `integer` Unix timestamp at which the QR Code is automatically closed. + +`created_at` +: `integer` Unix timestamp at which the QR Code was created. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The id provided does not exist +* code: 400 +* description: The QR Code id was created on a different key and secret. +* solution: Ensure that you use the same keys while creating and closing a QR Code. + +We are facing some trouble completing your request at the moment. Please try again shortly. +* code: 400 +* description: There is an error in the QR Code id. It may be incorrect or invalid. +* solution: Check if you have used a valid QR Code id. + +The requested URL was not found on the server. +* code: 400 +* description: Possible reasons: - A POST API is executed by GET Method. +- The QR Code id is not passed. + +* solution: Use the correct method (POST) and QR Code id while running the API. diff --git a/llm-content/api/qr-codes/image-content/create.md b/llm-content/api/qr-codes/image-content/create.md new file mode 100644 index 00000000..2fedfa64 --- /dev/null +++ b/llm-content/api/qr-codes/image-content/create.md @@ -0,0 +1,370 @@ +--- +title: Create a QR Code | Image Content +description: Create QR Codes with this endpoint and share with your customers. +--- + +# Create a QR Code | Image Content + +## Create a QR Code + +Use this endpoint to create a QR Code. + +- You can share the short URL with customers to accept payments. +- You can print and download it. +- You can create QR Codes for single or multiple use and for specific or all customers. + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/qr_codes \ +-H "Content-Type: application/json" \ +-d '{ + "type": "upi_qr", + "name": "Store_1", + "usage": "single_use", + "fixed_amount": true, + "payment_amount": 300, + "description": "For Store 1", + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "notes": { + "purpose": "Test UPI QR Code notes" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject qrRequest = new JSONObject(); +qrRequest.put("type","upi_qr"); +qrRequest.put("name","Store Front Display"); +qrRequest.put("usage","single_use"); +qrRequest.put("fixed_amount",true); +qrRequest.put("payment_amount",300); +qrRequest.put("description","For Store 1"); +qrRequest.put("customer_id","cust_HKsR5se84c5LTO"); +qrRequest.put("close_by",1681615838); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +qrRequest.put("notes",notes); + +QrCode qrcode = razorpay.qrCode.create(qrRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->create(array("type" => "upi_qr","name" => "Store Front Display", "usage" => "single_use","fixed_amount" => 1,"payment_amount" => 300,"customer_id" => "cust_HKsR5se84c5LTO","description" => "For Store 1","close_by" => 1681615838,"notes" => array("purpose" => "Test UPI QR code notes"))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.create({ + type: "upi_qr", + name: "Store Front Display", + usage: "single_use", + fixed_amount: true, + payment_amount: 300, + description: "For Store 1", + customer_id: "cust_HKsR5se84c5LTO", + close_by: 1681615838, + notes: { + purpose: "Test UPI QR Code notes" + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.qrcode.create({ + "type": "upi_qr", + "name": "Store Front Display", + "usage": "single_use", + "fixed_amount": true, + "payment_amount": 300, + "description": "For Store 1", + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "notes": { + "purpose": "Test UPI QR Code notes" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +notes := map[string]interface{}{ + "purpose": "Test UPI QR Code notes", +} + +data := map[string]interface{}{ + "type": "upi_qr", + "name": "Store Front Display", + "usage": "single_use", + "fixed_amount": true, + "payment_amount": 300, + "description": "For Store 1", + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "notes": notes, +} +body, err := client.QrCode.create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "type": "upi_qr", + "name": "Store Front Display", + "usage": "single_use", + "fixed_amount": true, + "payment_amount": 300, + "description": "For Store 1", + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "notes": { + "purpose": "Test UPI QR Code notes" + } +} +Razorpay::QrCode.create(para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary qrRequest = new Dictionary(); +qrRequest.Add("type", "upi_qr"); +qrRequest.Add("name", "Store_1"); +qrRequest.Add("usage", "single_use"); +qrRequest.Add("fixed_amount", true); +qrRequest.Add("payment_amount", 300); +qrRequest.Add("description", "For Store 1"); +qrRequest.Add("customer_id", "cust_MHYe2dVX323WYD"); +qrRequest.Add("close_by", 1681615838); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +qrRequest.Add("notes", notes); + +QrCode qrcode = client.QrCode.Create(qrRequest); + +``` + +### Response + +```json: Success +{ + "id": "qr_HMsVL8HOpbMcjU", + "entity": "qr_code", + "created_at": 1623660301, + "name": "Store_1", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/BWcUVrLp", + "image_content": "upi://pay?pa=qmart.razorpay@hdfcbank&pn=TestAccount&tr=RZPGT5viB4WHeoUuuqrv2&tn=TestAccountRaftarSoft&am=100&cu=INR&mc=5411", + "payment_amount": 300, + "status": "active", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The requested URL was not found on the server.", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`type` _mandatory_ +: `string` The type of the QR Code. Possible values: + - `upi_qr`: Create a QR Code that accepts only UPI payments. + - `bharat_qr`: Create a QR Code that accepts UPI and card payments. + + +> **INFO** +> +> +> **Handy Tips** +> +> This is an on-demand feature. Learn more about [Bharat QR](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bharatqr.md). +> + + + +`name` _optional_ +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` _mandatory_ +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`fixed_amount` _optional_ +: `boolean` Indicates if the QR should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR Code accepts any amount. + +`payment_amount` _mandatory if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`description`_optional_ +: `string` A brief description about the QR Code. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` _optional_ +: `string` Unique identifier of the customer the QR Code is linked with. Know more about to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` _optional_ +: `integer` Unix timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in Unix timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> Any request beyond 2147483647 Unix timestamp will fail. +> + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`type` +: `string` The type of the QR Code. Possible values: + - `upi_qr`: Create a QR Code that accepts only UPI payments. + - `bharat_qr`: Create a QR Code that accepts UPI and card payments. This is an on-demand feature. Learn more about [Bharat QR](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bharatqr.md). + +`image_url` +: `string` The URL of the QR Code. For example, `http://rzp.io/l6MS`. Click the link to download the code. + +`image_content` +: `string` The link encoded to the payable QR Code using any QR Code generator. For example: + - For UPI QR: `upi://pay?pa=dmart.razorpay@hdfcbank&pn=TestAccount&tr=RZPGT5viB4WHeoUuuqrv2&tn=TestAccountRaftarSoft&am=100&cu=INR&mc=5411` + - For Bharat QR: `000201010212021643926300000000850415540461000000008061661005900000000890827YESB0CMSNOC222333004882700126430010A0000005240117razorpaybqr@icici02041.1027350010A0000005240117RZPGT8ildsFTgS5Sp52047531530335654041.105802IN5906zxcbmn6005Delhi610611008562300514GT8ildsFTgS5Sp070838R004506304B6A9` + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`fixed_amount` +: `boolean` Indicates if the QR should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR Code accepts any amount. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active` + - `closed` + +`description` +: `string` A brief description about the QR Code. + +`payments_amount_received` +: `integer` The total amount received on the QR Code. All captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` Unique identifier of the customer the QR Code is linked with. Know more about to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` Unix timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in Unix timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> Any request beyond 2147483647 Unix timestamp will fail. +> + +`closed_at` +: `integer` Unix timestamp at which the QR Code is automatically closed. + +`created_at` +: `integer` Unix timestamp at which the QR Code was created. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The selected \{field name\} is invalid. +* code: 400 +* description: Data sent for a field is invalid. For example, when the data sent for `type` is `abc`, instead of the acceptable value. +* solution: Ensure that the data sent for a field is valid. Re-check the acceptable values for that request parameter. + +The \{field name\} is required. +* code: 400 +* description: A mandatory field is missing. +* solution: Ensure all mandatory fields are present. + +The payment amount must be at least 1. +* code: 400 +* description: The amount specified is less than the minimum amount. +* solution: Enter an amount equal to or greater than the minimum amount, that is 1. + +\{Customer_id\} is not a valid id. +* code: 400 +* description: Data entered for the Customer id field is invalid. +* solution: Ensure that the Customer id is correct and valid. + +type, usage, fixed_amount, payment_amount, description, close_by is/are not required and should not be sent +* code: 400 +* description: A POST API is executed by GET Method. | Use the correct method, that is, POST. +* solution: Use the correct method, that is, POST. + +\{close_by\} must be between 946684800 and 4765046400 +* code: 400 +* description: A wrong close by date is passed. +* solution: Ensure you pass the correct close by date(Unix timestamp). It must be between 946684800 and 4765046400. + +\{any extra field\} ajshdas is/are not required and should not be sent +* code: 400 +* description: An additional or unrequired parameter is passed. +* solution: Ensure that you only pass the required parameters in the request body. diff --git a/llm-content/api/qr-codes/image-content/entity.md b/llm-content/api/qr-codes/image-content/entity.md new file mode 100644 index 00000000..3236efde --- /dev/null +++ b/llm-content/api/qr-codes/image-content/entity.md @@ -0,0 +1,152 @@ +--- +title: QR Codes (Image Content) Entity +description: Know about QR Codes (Image Content) entity parameters and their description. +--- + +# QR Codes (Image Content) Entity + +## QR Codes (Image Content) Entity + +The QR Codes (Image Content) entity has the following parameters: + +### Response + +```json: Entity +{ + "id":"qr_I39xhFWWLO4wjM", + "entity":"qr_code", + "created_at":1632892063, + "name":"Store_3", + "usage":"single_use", + "type":"upi_qr", + "image_url":"https://rzp.io/i/67FsPSHWvw", + "payment_amount":300, + "status":"active", + "description":"For Store 4", + "fixed_amount":true, + "payments_amount_received":0, + "payments_count_received":0, + "notes":{ + "purpose":"Test UPI QR Code notes" + }, + "customer_id":"cust_HjSs5QuKahsnng", + "close_by":1632922955, + "image_content":"upi://pay?pa=rzr.qrfoodapp54462255833@icic&pn=FoodApp&tr=RZPI39xhFWWLO4wjMqrv2&tn=PaymenttoFoodApp&cu=INR&mc=5811&am=3&invoiceNo=INV001&invoiceDate=2021-09-29T13:42:35+05:30&invoiceName=GauravKumar&gstIn=22AAAAA0000A1Z5&gstBrkUp=GST:40%7CSGST:20%7CCGST:20%7CCESS:0", + "tax_invoice":{ + "number":"INV001", + "date":1632922955, + "customer_name":"Gaurav Kumar", + "business_gstin":"22AAAAA0000A1Z5", + "gst_amount":4000, + "cess_amount":0, + "supply_type":"intrastate" + } +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`type` +: `string` The type of the QR Code. Possible values: + - `upi_qr`: Create a QR Code that accepts only UPI payments. + - `bharat_qr`: Create a QR Code that accepts UPI and card payments. This is an on-demand feature. Learn more about [Bharat QR](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bharatqr.md). + +`image_url` +: `string` The URL of the QR Code. For example, `http://rzp.io/l6MS`. Click the link to download the code. + +`image_content` +: `string` The link encoded to the payable QR Code using any QR Code generator. For example: + - For UPI QR: `upi://pay?pa=dmart.razorpay@hdfcbank&pn=TestAccount&tr=RZPGT5viB4WHeoUuuqrv2&tn=TestAccountRaftarSoft&am=100&cu=INR&mc=5411` + - For Bharat QR: `000201010212021643926300000000850415540461000000008061661005900000000890827YESB0CMSNOC222333004882700126430010A0000005240117razorpaybqr@icici02041.1027350010A0000005240117RZPGT8ildsFTgS5Sp52047531530335654041.105802IN5906zxcbmn6005Delhi610611008562300514GT8ildsFTgS5Sp070838R004506304B6A9` + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`fixed_amount` +: `boolean` Indicates if the QR should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR Code accepts any amount. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active` + - `closed` + +`description` +: `string` A brief description about the QR Code. + +`payments_amount_received` +: `integer` The total amount received on the QR Code. All captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` Unique identifier of the customer the QR Code is linked with. Know more about to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` Unix timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in Unix timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> Any request beyond 2147483647 Unix timestamp will fail. +> + +`closed_at` +: `integer` Unix timestamp at which the QR Code is automatically closed. + +`created_at` +: `integer` Unix timestamp at which the QR Code was created. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. + +```json: Sample Entity +{ + "id": "qr_HMsVL8HOpbMcjU", + "entity": "qr_code", + "created_at": 1623660301, + "name": "Store_1", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/BWcUVrLp", + "image_content": "upi://pay?pa=qmart.razorpay@hdfcbank&pn=TestAccount&tr=RZPGT5viB4WHeoUuuqrv2&tn=TestAccountRaftarSoft&am=100&cu=INR&mc=5411", + "payment_amount": 300, + "status": "closed", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "closed_at": 1623660445, + "close_reason": "on_demand" +} +``` diff --git a/llm-content/api/qr-codes/image-content/fetch-all.md b/llm-content/api/qr-codes/image-content/fetch-all.md new file mode 100644 index 00000000..722f07ee --- /dev/null +++ b/llm-content/api/qr-codes/image-content/fetch-all.md @@ -0,0 +1,262 @@ +--- +title: Fetch All QR codes | Image Content +description: Fetch the details of multiple QR Codes using this endpoint. +--- + +# Fetch All QR codes | Image Content + +## Fetch All QR Codes + +Use this endpoint to retrieve the details of multiple QR Codes. + +### Request + +```Curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/qr_codes \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List qrcode = razorpay.qrCode.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->all($options) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.all() + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.qrcode.all() + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "count": "2", +} + +body, err := client.QrCode.All(nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "count": 1 +} + +Razorpay::QrCode.all(para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("count", "1"); + +List paymentlink = client.QrCode.All(paramRequest); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "qr_HO2jGkWReVBMNu", + "entity": "qr_code", + "created_at": 1623914648, + "name": "Store_1", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/w2CEwYmkAu", + "image_content": "upi://pay?pa=qmart.razorpay@hdfcbank&pn=TestAccount&tr=RZPGT5viB4WHeoUuuqrv2&tn=TestAccountRaftarSoft&am=100&cu=INR&mc=5411", + "payment_amount": 300, + "status": "active", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "closed_at": null, + "close_reason": null + }, + { + "id": "qr_HO2e0813YlchUn", + "entity": "qr_code", + "created_at": 1623914349, + "name": "Acme Groceries", + "usage": "multiple_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/X6QM7LL", + "image_content": "upi://pay?pa=smart.razorpay@hdfcbank&pn=TestAccount&tr=RZPGT5viB4WHeoUuuqrv2&tn=TestAccountRaftarSoft&am=100&cu=INR&mc=5411", + "payment_amount": null, + "status": "closed", + "description": "Buy fresh groceries", + "fixed_amount": false, + "payments_amount_received": 200, + "payments_count_received": 1, + "notes": { + "Branch": "Bangalore - Rajaji Nagar" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1625077799, + "closed_at": 1623914515, + "close_reason": "on_demand" + } + ] +} + +```json: Failure +{ + "error": { + "code": "SERVER_ERROR", + "description": "We are facing some trouble completing your request at the moment. Please try again shortly.", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`from` +: `integer` Unix timestamp, in seconds, from when QR Codes are to be retrieved. + +`to` +: `integer` Unix timestamp, in seconds, till when QR Codes are to be retrieved. + +`count` +: `integer` Number of QR Codes to be retrieved. + - Default value: 10 + - Maximum value: 100 + - This can be used for pagination, in combination with `skip`. + +`skip` +: `integer` Number of records to be skipped while fetching the QR Codes. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`type` +: `string` The type of the QR Code. Possible values: + - `upi_qr`: Create a QR Code that accepts only UPI payments. + - `bharat_qr`: Create a QR Code that accepts UPI and card payments. This is an on-demand feature. Learn more about [Bharat QR](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bharatqr.md). + +`image_url` +: `string` The URL of the QR Code. For example, `http://rzp.io/l6MS`. Click the link to download the code. + +`image_content` +: `string` The link encoded to the payable QR Code using any QR Code generator. For example: + - For UPI QR: `upi://pay?pa=dmart.razorpay@hdfcbank&pn=TestAccount&tr=RZPGT5viB4WHeoUuuqrv2&tn=TestAccountRaftarSoft&am=100&cu=INR&mc=5411` + - For Bharat QR: `000201010212021643926300000000850415540461000000008061661005900000000890827YESB0CMSNOC222333004882700126430010A0000005240117razorpaybqr@icici02041.1027350010A0000005240117RZPGT8ildsFTgS5Sp52047531530335654041.105802IN5906zxcbmn6005Delhi610611008562300514GT8ildsFTgS5Sp070838R004506304B6A9` + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`fixed_amount` +: `boolean` Indicates if the QR should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR Code accepts any amount. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active` + - `closed` + +`description` +: `string` A brief description about the QR Code. + +`payments_amount_received` +: `integer` The total amount received on the QR Code. All captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` Unique identifier of the customer the QR Code is linked with. Know more about to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` Unix timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in Unix timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> Any request beyond 2147483647 Unix timestamp will fail. +> + +`closed_at` +: `integer` Unix timestamp at which the QR Code is automatically closed. + +`created_at` +: `integer` Unix timestamp at which the QR Code was created. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The id provided does not exist. +* code: 400 +* description: Possible reasons: - The URL is wrong or is missing something. +- A GET API is executed by POST Method. + +* solution: Suggested solutions: - Ensure you have the correct and complete URL. +- Use the right method, that is, GET. + + +We are facing some trouble completing your request at the moment. Please try again shortly. +* code: 400 +* description: A GET API is executed by POST Method. +* solution: Use the correct method, that is, GET. + +The requested URL was not found on the server. +* code: 400 +* description: The URL is wrong or missing something. +* solution: Use the correct and complete URL. diff --git a/llm-content/api/qr-codes/image-content/fetch-customer-id.md b/llm-content/api/qr-codes/image-content/fetch-customer-id.md new file mode 100644 index 00000000..632c5057 --- /dev/null +++ b/llm-content/api/qr-codes/image-content/fetch-customer-id.md @@ -0,0 +1,229 @@ +--- +title: Fetch QR Codes for a Customer ID | Image Content +description: Fetch the details of a QR Codes using a Customer id. +--- + +# Fetch QR Codes for a Customer ID | Image Content + +## Fetch QR Codes for a Customer ID + +Use this endpoint to retrieve the details of a QR Code by using a Customer Id. + +### Request + +```Curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/qr_codes?customer_id=cust_HKsR5se84c5LTO \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("customer_id","cust_HKsR5se84c5LTO"); + +List qrcodes = razorpay.qrCode.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->all(["customer_id" => $customerId]) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.all({"customer_id":customerId}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.qrcode.all({"customer_id":customerId}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "customer_id" : "cust_HKsR5se84c5LTO", +} + +body, err := client.QrCode.All(para_attr, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = {"customer_id":customerId} + +Razorpay::QrCode.all(para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string CustomerId = cust_JDdNazagOgg9Ig + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("customer_id", CustomerId); + +List paymentlink = client.QrCode.All(paramRequest); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "qr_HMsgvioW64f0vh", + "entity": "qr_code", + "created_at": 1623660959, + "name": "Store_1", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/DTa2eQR", + "image_content": "upi://pay?pa=qmart.razorpay@hdfcbank&pn=TestAccount&tr=RZPGT5viB4WHeoUuuqrv2&tn=TestAccountRaftarSoft&am=100&cu=INR&mc=5411", + "payment_amount": 300, + "status": "active", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838 + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "_HKsR5se84c5LTO} is not a valid id", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_FUEQArey3YFi9R`. + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`type` +: `string` The type of the QR Code. Possible values: + - `upi_qr`: Create a QR Code that accepts only UPI payments. + - `bharat_qr`: Create a QR Code that accepts UPI and card payments. This is an on-demand feature. Learn more about [Bharat QR](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bharatqr.md). + +`image_url` +: `string` The URL of the QR Code. For example, `http://rzp.io/l6MS`. Click the link to download the code. + +`image_content` +: `string` The link encoded to the payable QR Code using any QR Code generator. For example: + - For UPI QR: `upi://pay?pa=dmart.razorpay@hdfcbank&pn=TestAccount&tr=RZPGT5viB4WHeoUuuqrv2&tn=TestAccountRaftarSoft&am=100&cu=INR&mc=5411` + - For Bharat QR: `000201010212021643926300000000850415540461000000008061661005900000000890827YESB0CMSNOC222333004882700126430010A0000005240117razorpaybqr@icici02041.1027350010A0000005240117RZPGT8ildsFTgS5Sp52047531530335654041.105802IN5906zxcbmn6005Delhi610611008562300514GT8ildsFTgS5Sp070838R004506304B6A9` + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`fixed_amount` +: `boolean` Indicates if the QR should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR Code accepts any amount. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active` + - `closed` + +`description` +: `string` A brief description about the QR Code. + +`payments_amount_received` +: `integer` The total amount received on the QR Code. All captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` Unique identifier of the customer the QR Code is linked with. Know more about to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` Unix timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in Unix timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> Any request beyond 2147483647 Unix timestamp will fail. +> + +`closed_at` +: `integer` Unix timestamp at which the QR Code is automatically closed. + +`created_at` +: `integer` Unix timestamp at which the QR Code was created. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +We are facing some trouble completing your request at the moment. Please try again shortly. +* code: 400 +* description: A GET API is executed by POST Method. +* solution: Use the correct method, that is, GET. + +\{Customer_id\} is not a valid id. +* code: 400 +* description: A wrong Customer id is provided. +* solution: Check if you have used a valid Customer id. + +\{parameter\} “cusomer_id” is/are not required and should not be sent +* code: 400 +* description: Possible reasons: - The URL is wrong or is missing something. +- The Customer id has a spelling error in the URL. + +* solution: Suggested solutions: - Ensure that you use the correct and complete URL. +- Check for spelling mistakes in the Customer id. + +The id provided does not exist. +* code: 400 +* description: The URL is wrong or is missing something. +* solution: Use the correct and complete URL. diff --git a/llm-content/api/qr-codes/image-content/fetch-payment-id.md b/llm-content/api/qr-codes/image-content/fetch-payment-id.md new file mode 100644 index 00000000..d70e48b2 --- /dev/null +++ b/llm-content/api/qr-codes/image-content/fetch-payment-id.md @@ -0,0 +1,228 @@ +--- +title: Fetch QR Codes for a Payment ID +description: Fetch the details of a QR Codes using a Payment Id. +--- + +# Fetch QR Codes for a Payment ID + +## Fetch QR Codes for a Payment ID + +Use this endpoint to retrieve the details of a QR Code by using a Payment Id. + +### Request + +```Curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/qr_codes?payment_id=pay_Di5iqCqA1WEHq6 \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("payment_id","pay_Di5iqCqA1WEHq6"); + +List qrcodes = razorpay.qrCode.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->all(["payment_id" => $paymentId]) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.all({"payment_id":paymentId}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.qrcode.all({"payment_id":paymentId}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "payment_id" : "pay_HMtDKn3TnF4D8x", +} + +body, err := client.QrCode.All(para_attr, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = {"payment_id":paymentId} + +Razorpay::QrCode.all(para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paramRequest = new Dictionary(); +params.Add("payment_id","pay_Z6t7VFTb9xHeOs"); + +List paymentlink = client.QrCode.All(paramRequest); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "qr_HMsqRoeVwKbwAF", + "entity": "qr_code", + "created_at": 1623661499, + "name": "Fresh Groceries", + "usage": "multiple_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/eI9XD54Q", + "image_content": "upi://pay?pa=qmart.razorpay@hdfcbank&pn=TestAccount&tr=RZPGT5viB4WHeoUuuqrv2&tn=TestAccountRaftarSoft&am=100&cu=INR&mc=5411", + "payment_amount": null, + "status": "active", + "description": "Buy fresh groceries", + "fixed_amount": false, + "payments_amount_received": 1000, + "payments_count_received": 1, + "notes": [], + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1624472999, + "close_reason": null + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api secret provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the payment. + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`type` +: `string` The type of the QR Code. Possible values: + - `upi_qr`: Create a QR Code that accepts only UPI payments. + - `bharat_qr`: Create a QR Code that accepts UPI and card payments. This is an on-demand feature. Learn more about [Bharat QR](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bharatqr.md). + +`image_url` +: `string` The URL of the QR Code. For example, `http://rzp.io/l6MS`. Click the link to download the code. + +`image_content` +: `string` The link encoded to the payable QR Code using any QR Code generator. For example: + - For UPI QR: `upi://pay?pa=dmart.razorpay@hdfcbank&pn=TestAccount&tr=RZPGT5viB4WHeoUuuqrv2&tn=TestAccountRaftarSoft&am=100&cu=INR&mc=5411` + - For Bharat QR: `000201010212021643926300000000850415540461000000008061661005900000000890827YESB0CMSNOC222333004882700126430010A0000005240117razorpaybqr@icici02041.1027350010A0000005240117RZPGT8ildsFTgS5Sp52047531530335654041.105802IN5906zxcbmn6005Delhi610611008562300514GT8ildsFTgS5Sp070838R004506304B6A9` + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`fixed_amount` +: `boolean` Indicates if the QR should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR Code accepts any amount. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active` + - `closed` + +`description` +: `string` A brief description about the QR Code. + +`payments_amount_received` +: `integer` The total amount received on the QR Code. All captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` Unique identifier of the customer the QR Code is linked with. Know more about to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` Unix timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in Unix timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> Any request beyond 2147483647 Unix timestamp will fail. +> + +`closed_at` +: `integer` Unix timestamp at which the QR Code is automatically closed. + +`created_at` +: `integer` Unix timestamp at which the QR Code was created. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +We are facing some trouble completing your request at the moment. Please try again shortly. +* code: 400 +* description: A GET API is executed by POST Method. +* solution: Use the correct method, that is, GET. + +\{Payment_id\} is not a valid id. +* code: 400 +* description: A wrong Payment id is provided. +* solution: Check if you have used a valid Payment id. + +\{Payment_id\} is/are not required and should not be sent +* code: 400 +* description: The URL is wrong or is missing something. +* solution: Ensure that you use the correct and complete URL without any spelling mistakes. + +The requested URL was not found on the server. +* code: 400 +* description: The URL is wrong or is missing something. +* solution: Ensure that you use the correct and complete URL without any spelling mistakes. + +"count": 0 +* code: 400 +* description: No QR Code is found for the search criteria. +* solution: There is no data for a particular Payment id. Try a different Payment id. diff --git a/llm-content/api/qr-codes/image-content/fetch-payments.md b/llm-content/api/qr-codes/image-content/fetch-payments.md new file mode 100644 index 00000000..142df876 --- /dev/null +++ b/llm-content/api/qr-codes/image-content/fetch-payments.md @@ -0,0 +1,407 @@ +--- +title: Fetch Payments for a QR Code +description: Fetch payments made on a particular QR Code using this endpoint. +--- + +# Fetch Payments for a QR Code + +## Fetch Payments for a QR Code + +Use this endpoint to fetch the payments made on a QR Code using this endpoint. + +### Request + +```Curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/qr_codes/qr_FuZIYx6rMbP6gs/payments \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String qrCodeId = "qr_FuZIYx6rMbP6gs"; + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List qrcode = razorpay.qrCode.fetchAllPayments(qrCodeId, params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->qrCode->fetch($qrCodeId)->fetchAllPayments($options) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.fetchAllPayments(qrCodeId, options) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.qrcode.fetch_all_payments(qrCodeId, options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +QrCodeID = "qr_FuZIYx6rMbP6gs" + +body, err := client.QrCode.FetchPayments(QrCodeID, nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "count" : 1 +} +Razorpay::QrCode.fetch(qrCodeId).fetch_payments(para_attr) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string qrCodeId = "qr_Z6t7VFTb9xHeOs"; + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("count","1"); + +List qrcode = client.QrCode.FetchAllPayments(qrCodeId, paramRequest); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "pay_HMtDKn3TnF4D8x", + "entity": "payment", + "amount": 500, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "QRv2 Payment", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gauri.kumari@okhdfcbank", + "email": "gauri.kumari@example.com", + "contact": "+919000090000", + "customer_id": "cust_HKsR5se84c5LTO", + "notes": [], + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "116514257019" + }, + "created_at": 1623662800 + }, + { + "id": "pay_HMsr242ZnaLumA", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "refunded", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 1000, + "refund_status": "full", + "captured": true, + "description": "QRv2 Payment", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gauri.kumari@okhdfcbank", + "email": "gauri.kumari@example.com", + "contact": "+919000090000", + "customer_id": "cust_HKsR5se84c5LTO", + "notes": [], + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "116514090501" + }, + "created_at": 1623661533 + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the QR Code. + +### Parameters + +`from` +: `integer` Timestamp, in seconds, from when payments are to be fetched. + +`to` +: `integer` Timestamp, in seconds, till when payments are to be fetched. + +`count` +: `integer` Number of payments to be fetched. + - Default value: 10 + - Maximum value: 100 + - This can be used for pagination, in combination with `skip`. + +`skip` +: `integer` Number of records to be skipped while fetching the payments. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`order_id` +: `string` Order id, if provided. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md). + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if `amount_refunded = 100`, it is equal to . + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. + + +> **INFO** +> +> +> **Handy Tips** +> +> This attribute will not be set for the card issued by a foreign bank. +> + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + +> **INFO** +> +> +> **Handy Tips** +> +> Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). +> + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible value `in_app`. + +> **INFO** +> +> +> **Handy Tips** +> +> The field `flow` is present only in the case of Turbo UPI Payments. +> + + + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +\{Qr code id\} is not a valid id. +* code: 400 +* description: A wrong QR Code id is provided. +* solution: Check if you have used a valid QR Code id. + +The requested URL was not found on the server. +* code: 400 +* description: - The URL is wrong or is missing something. +- A GET API is executed by POST Method. + +* solution: - Ensure that the URL is correct and complete. +- Use the correct method, that is GET. + +"count": 0 +* code: 400 +* description: No QR Code is found for the search criteria. +* solution: There is no data for a particular Payment id. Try a different Payment id. diff --git a/llm-content/api/qr-codes/image-content/fetch-with-id.md b/llm-content/api/qr-codes/image-content/fetch-with-id.md new file mode 100644 index 00000000..316a40d3 --- /dev/null +++ b/llm-content/api/qr-codes/image-content/fetch-with-id.md @@ -0,0 +1,209 @@ +--- +title: Fetch a QR Code With ID | Image Content +description: Fetch the details of a QR Code with id. +--- + +# Fetch a QR Code With ID | Image Content + +## Fetch a Qr Code With ID + +Use this endpoint to fetch the details of a QR Code. + +### Request + +```Curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/qr_codes/qr_FuZIYx6rMbP6gs \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String qrCodeId = "qr_FuZIYx6rMbP6gs"; + +QrCode qrcode = razorpay.qrCode.fetch(qrCodeId); + +```php: PHP +$api = new Api($key_id, $secret); +$api->qrCode->fetch($qrCodeId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.qrCode.fetch(qrCodeId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.qrcode.fetch(qrCodeId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +qrCodeId := "qr_FuZIYx6rMbP6gs" + +body, err := client.QrCode.fetch(qrCodeId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +qrCodeId = "qr_FuZIYx6rMbP6gs" + +Razorpay::QrCode.fetch(qrCodeId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string qrCodeId = "qr_Z6t7VFTb9xHeOs"; + +QrCode qrcode = client.QrCode.Fetch(qrCodeId); +``` + +### Response + +```json: Success +{ + "id": "qr_HO2r1MDprYtWRT", + "entity": "qr_code", + "created_at": 1623915088, + "name": "Store_1", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/oCswTOcCo", + "image_content": "upi://pay?pa=qmart.razorpay@hdfcbank&pn=TestAccount&tr=RZPGT5viB4WHeoUuuqrv2&tn=TestAccountRaftarSoft&am=100&cu=INR&mc=5411", + "payment_amount": 300, + "status": "active", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR Code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "closed_at": null, + "close_reason": null +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api secret provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the QR Code. + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`type` +: `string` The type of the QR Code. Possible values: + - `upi_qr`: Create a QR Code that accepts only UPI payments. + - `bharat_qr`: Create a QR Code that accepts UPI and card payments. This is an on-demand feature. Learn more about [Bharat QR](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bharatqr.md). + +`image_url` +: `string` The URL of the QR Code. For example, `http://rzp.io/l6MS`. Click the link to download the code. + +`image_content` +: `string` The link encoded to the payable QR Code using any QR Code generator. For example: + - For UPI QR: `upi://pay?pa=dmart.razorpay@hdfcbank&pn=TestAccount&tr=RZPGT5viB4WHeoUuuqrv2&tn=TestAccountRaftarSoft&am=100&cu=INR&mc=5411` + - For Bharat QR: `000201010212021643926300000000850415540461000000008061661005900000000890827YESB0CMSNOC222333004882700126430010A0000005240117razorpaybqr@icici02041.1027350010A0000005240117RZPGT8ildsFTgS5Sp52047531530335654041.105802IN5906zxcbmn6005Delhi610611008562300514GT8ildsFTgS5Sp070838R004506304B6A9` + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`fixed_amount` +: `boolean` Indicates if the QR should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR Code accepts any amount. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active` + - `closed` + +`description` +: `string` A brief description about the QR Code. + +`payments_amount_received` +: `integer` The total amount received on the QR Code. All captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` Unique identifier of the customer the QR Code is linked with. Know more about to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` Unix timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in Unix timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + + +> **WARN** +> +> +> **Watch Out!** +> +> Any request beyond 2147483647 Unix timestamp will fail. +> + +`closed_at` +: `integer` Unix timestamp at which the QR Code is automatically closed. + +`created_at` +: `integer` Unix timestamp at which the QR Code was created. + +`close_reason` +: `string` The reason for the closure of the QR Code. Possible values: + - `on_demand`: When you close the QR Code using the APIs or the Dashboard. + - `paid`: If the QR Code is created with the `usage=single_payment` parameter, the QR Code closes automatically once the customer makes the payment, with the reason marked as `paid`. + - `null`: The QR Code has not been closed yet. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The id provided does not exist. +* code: 400 +* description: - The URL is wrong or is missing something. +- A GET API is executed by POST Method. + +* solution: - Ensure you have the correct and complete URL. +- Use the right method, that is, GET. + + +\{Qr code id\} is not a valid id. +* code: 400 +* description: A wrong QR Code id is provided. +* solution: Check if you have used a valid QR Code id. diff --git a/llm-content/api/qr-codes/image-content/refunds.md b/llm-content/api/qr-codes/image-content/refunds.md new file mode 100644 index 00000000..22289aca --- /dev/null +++ b/llm-content/api/qr-codes/image-content/refunds.md @@ -0,0 +1,221 @@ +--- +title: Refund Payments +description: Refund payments made on a QR Code with this endpoint. +--- + +# Refund Payments + +## Refund Payments + +Use this endpoint to refund payments made on a QR Code. + +### Request + +```Curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/pay_HKrqmsgBHbaeIM/refund \ +-H "Content-Type: application/json" \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_29QQoUBi66xm2f"; + +JSONObject refundRequest = new JSONObject(); +refundRequest.put("amount",100); +refundRequest.put("speed","normal"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +refundRequest.put("notes",notes); +refundRequest.put("receipt","Receipt No. #31"); + +Payment payment = razorpay.payments.refund(paymentId,refundRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId)->refund(array("amount"=> "100", "speed"=>"normal", "notes"=>array("notes_key_1"=>"Beam me up Scotty.", "notes_key_2"=>"Engage"), "receipt"=>"Receipt No. 31")); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.refund(paymentId,{ + "amount": "100", + "speed": "normal", + "notes": { + "notes_key_1": "Beam me up Scotty.", + "notes_key_2": "Engage" + }, + "receipt": "Receipt No. 31" +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "speed": "normal", + "notes": map[string]interface{}{ + "key_1": "value1", + "key_2": "value2", + }, +} +body, err := client.Payment.Refund("",1200, data, nil) + +```ruby: Ruby +require 'razorpay' + +Razorpay.setup("YOUR_KEY_ID", "YOUR_KEY_SECRET") +Razorpay::Payment.fetch("pay_29QQoUBi66xm2f").refund() + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.refund(paymentId,{ + "amount": "100", + "speed": "normal", + "notes": { + "notes_key_1": "Beam me up Scotty.", + "notes_key_2": "Engage" + }, + "receipt": "Receipt No. 31" +}) + +```csharp: .NET +//initialize the SDK client +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +// payment to be refunded, payment must be a captured payment +Payment payment = client.Payment.Fetch(paymentId); + +//Full Refund +Refund refund = payment.Refund(); + +//Partial Refund +Dictionary data = new Dictionary(); +data.Add("amount", "500100"); +Refund refund = payment.Refund(data); +``` + +### Response + +```json: Success +{ + "id": "rfnd_HMtH2fBtD60QkX", + "entity": "refund", + "amount": 200, + "currency": "INR", + "payment_id": "pay_HKrqmsgBHbaeIM", + "notes": [], + "receipt": null, + "acquirer_data": { + "rrn": null + }, + "created_at": 1623663010, + "batch_id": null, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "normal" +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Kbrq5xxQHR8 is not a valid id", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the payment to be refunded. + +### Parameters + +`amount` _optional_ +: `string` Amount to be refunded. If no value is passed, a full refund is issued. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier of the refund. + +`entity` +: `string` Indicates the type of entity. Here, it is `refund`. + +`amount` +: `integer` The amount to be refunded (in the smallest unit of currency). + For example, refund in INR, a value of 100 means 100 paise (equivalent to ₹1). + +`currency` +: `string` The currency of the amount for which refund is initiated. + +`payment_id` +: `string` Unique identifier of the payment for which the refund is initiated. + +`created_at` +: `integer` Timestamp, in Unix format, when the refund was created. + +`batch_id` +: `string` This parameter is populated if the refund was created as part of a batch. upload. For example, `batch_00000000000001` + +`notes` +: `json object` Key-value store for storing your reference data. A maximum of 15 key-value pairs can be included. + +`receipt` +: `string` A unique identifier provided by you for your internal reference. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + +`status` +: `string` Indicates the state of the refund. Possible values: + - `pending`: This state indicates that Razorpay is attempting to process the refund. + - `processed`: This is the final state of the refund. + - `failed`: A refund can attain the failed state in the following scenarios: + + - Normal refund is not possible for a payment which is more than 6 months old. + +`speed_requested` +: `string` The processing mode of the refund seen in the refund response. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. +Possible value is `normal`, which indicates that the refund will be processed via the normal speed. That is, the refund will take 5-7 working days. Know more about [normal refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md#create-a-normal-refund). + +`speed_processed` +: `string` This is a parameter in the response which describes the mode used to process a refund. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. Possible value is `normal`, which indicates that the refund has been processed by the payment processing partner. The refund will take 5-7 working days. + +Know more about [Refunds API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md) to perform other refund-related operations: +- Fetch a particular refund or a list of refunds for a payment ID. +- Update a refund to modify the Notes field. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +\{Payment_id\} is not a valid id. +* code: 400 +* description: A wrong Payment id is provided. +* solution: Check if you have used a valid Payment id. + +The requested URL was not found on the server. +* code: 400 +* description: - The URL is wrong or is missing something. +- A POST API is executed by GET Method. + +* solution: - Ensure that the URL is correct and complete. +- Use the correct method, that is, POST. diff --git a/llm-content/api/qr-codes/update.md b/llm-content/api/qr-codes/update.md new file mode 100644 index 00000000..f593fe5b --- /dev/null +++ b/llm-content/api/qr-codes/update.md @@ -0,0 +1,129 @@ +--- +title: Update a QR Code +description: Update QR Codes with this endpoint and share with your customers. +--- + +# Update a QR Code + +## Update a QR Code + +Use this endpoint to update a QR Code. + +### Response + +```json: Success +{ + "id":"qr_HMsVL8HOpbMcjU", + "entity":"qr_code", + "created_at":1623660301, + "name":"Store Front Display", + "usage":"single_use", + "type":"upi_qr", + "image_url":"https://rzp.io/i/BWcUVrLp", + "payment_amount":300, + "status":"closed", + "description":"For Store 1", + "fixed_amount":true, + "payments_amount_received":0, + "payments_count_received":0, + "notes":{ + "key1": "value1", + "key2": "value2" + }, + "customer_id":"cust_HKsR5se84c5LTO", + "close_by":1681615838, +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the QR Code. For example, `qr_HMsVL8HOpbMcjU`. + +### Parameters + +`notes` _mandatory_ +: `json object` Contains user-defined fields and is stored for reference purposes. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). + +### Parameters + +`id` +: `string` The unique identifier of the QR Code. For example, `qr_HMsVL8HOpbMcjU`. + +`entity` +: `string` Indicates the type of entity. Here, it is `qr_code`. + +`created_at` +: `integer` Unix timestamp at which the QR Code is created. + +`name` +: `string` Label entered to identify the QR Code. For example, `Store Front Display`. + +`usage` +: `string` Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR Code will accept only one payment and then close automatically. + - `multiple_use` (default): QR Code will accept multiple payments. + +`type` +: `string` The type of the QR Code. Possible value is `upi_qr`, which creates a QR Code that accepts only UPI payments. + + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. to get this feature activated on your account. +> + +`image_url` +: `string` The URL of the QR Code. For example, `http://rzp.io/l6MS`. Click the link to download the code. + +`payment_amount` _if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of an amount less than or more than this value is not allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + +`status` +: `string` Indicates the status of the QR Code. Possible values: + - `active`: Indicates that the QR Code has been created and is ready to accept payments. + - `closed`: Indicates that the QR Code has been closed. + +`description` +: `string` A brief description about the QR Code. + +`fixed_amount` +: `boolean` Indicates if the QR Code should accept payments of specific amounts or any amount. Possible values: + - `true`: QR Code accepts only a specific amount. + - `false` (default): QR code accepts any amount. + +`payments_amount_received` +: `integer` The total amount received on the QR Code. Only captured payments are considered. + +`payments_count_received` +: `integer` The total number of payments received on the QR Code. All captured payments are considered. + +`notes` +: `object` Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`customer_id` +: `string` The unique identifier of the customer the QR Code is linked with. Know more about the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` +: `integer` Unix timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set to `2147483647` in Unix timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. diff --git a/llm-content/api/refunds.md b/llm-content/api/refunds.md new file mode 100644 index 00000000..91099b33 --- /dev/null +++ b/llm-content/api/refunds.md @@ -0,0 +1,48 @@ +--- +title: Razorpay Refunds APIs +heading: Refunds +description: Initiate normal and instant refunds to your customers using Razorpay Refund APIs. View and update refund using APIs. +--- + +# Refunds + +Make full or partial refunds to customers. You can initiate refunds only on those payments that are in `captured` state. A payment in `authorized` state is auto-refunded if not `captured` within 3 days of creation. You can create and manage refunds using APIs or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#dashboard-actions). + +Fork the Razorpay Postman Public Workspace and try the Refunds APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-49fdb1f6-7e7d-426c-b7b4-3dd468d8565e) + +### Related Guides + +[About Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) +[Sample Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/refunds.md) + +### Endpoints + +- **post** `/v1/payments/:id/refund` - Create a Normal Refund: + Creates a normal refund for a payment. + +- **post** `/v1/payments/:id/refund` - Create a Normal Refund (Idempotent Request): + Retry or send the same normal refund request multiple times safely by creating a normal refund idempotency request. + +- **post** `/v1/payments/:id/refund` - Create an Instant Refund: + Creates an instant refund for a payment. + +- **post** `/v1/payments/:id/refund` - Create an Instant Refund (Idempotent Request): + Retry or send the same instant refund request multiple times safely by creating an instant refund idempotency request. + +- **get** `/v1/payments/:id/refunds` - Fetch Multiple Refunds for a Payment: + Retrieves multiple refunds for a payment. + +- **get** `/v1/payments/:payment_id/refunds/:refund_id` - Fetch a Specific Refund for a Payment: + Retrieves details of a specific refund made for a payment. + +- **get** `/v1/refunds/` - Fetch All Refunds: + Retrieves details of all refunds. + +- **get** `/v1/refunds/:id` - Fetch Refund With ID: + Retrieves the refund using the id. + +- **patch** `/v1/refunds/:id/` - Update a Refund: + Updates the `notes` parameter for a refund. diff --git a/llm-content/api/refunds/create-instant.md b/llm-content/api/refunds/create-instant.md new file mode 100644 index 00000000..337567c4 --- /dev/null +++ b/llm-content/api/refunds/create-instant.md @@ -0,0 +1,186 @@ +--- +title: Create an Instant Refund +description: Create an Instant Refund using Razorpay Refunds API. +--- + +# Create an Instant Refund + +## Create an Instant Refund + +Use this endpoint to process refunds instantaneously to your customers. The instant refund is enabled by default for your account. You should set the refund speed to `optimum` when creating a refund request to ensure refunds are processed instantly. We will consider the default speed if you do not specify the same during the refund request. Know more about [setting the default speed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/refund-speed.md) from the Dashboard. + +- Refunds will be processed at an optimal speed based on Razorpay's internal fund transfer logic. +- If the refund can be processed instantly, Razorpay will do so irrespective of the payment method used to make the payment. + +**`speed` attribute in Request** | **`speed_processed` attribute in Response** | **Description** +--- +`normal` | `normal` | Refund processed via `normal` speed. +--- +`optimum` | `normal` | A faster speed was not available, so processed via `normal` speed. + +Once the refund moves to the `processed` state, the refund response displays the `speed_processed` parameter, the final state of the refund. + +### Response + +```json: Success +{ + "id": "rfnd_FP8R8EGjGbPkVb", + "entity": "refund", + "amount": 500100, + "currency": "INR", + "payment_id": "pay_29QQoUBi66xm2f", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "receipt": "Receipt No. 31", + "acquirer_data": { + "arn": null + }, + "created_at": 1597078914, + "batch_id": null, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "optimum" +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "_29QQoUBi66xm2f is not a valid id", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the payment which needs to be refunded. + +### Parameters + +`amount` _optional_ +: `integer` The amount to be refunded. Amount should be in the smallest unit of the currency in which the payment was made. **Required in case of partial refund**. + - For a **partial refund**, enter a value lesser than the payment amount. For example, if the payment amount is ₹1200, and you want to refund only ₹200, you must pass `20000`. + - In case of a **full refund**, enter the full payment amount. If `amount` parameter is not passed, the entire payment amount will be refunded. + + + +> **SUCCESS** +> +> +> **What's New** +> +> Refund amounts of ₹1 or lower are now supported. +> +> + + + +`speed` _mandatory_ +: `string` Here, it must be `optimum`. Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. + - If the refund can be processed instantly, Razorpay will do so, irrespective of the payment method used to make the payment. + - If an instant refund is not possible, Razorpay will initiate a refund that is processed at the normal speed. + +`notes` _optional_ +: `json object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` _optional_ +: `string` A unique identifier provided by you for your internal reference. + +### Parameters + +`id` +: `string` The unique identifier of the refund. For example, `rfnd_FgRAHdNOM4ZVbO`. + +`entity` +: `string` Indicates the type of entity. Here, it is `refund`. + +`amount` +: `integer` The amount to be refunded (in the smallest unit of currency). + For example, if the refund value is it will be `3000`. + +`currency` +: `string` The currency of payment amount for which the refund is initiated. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`payment_id` +: `string` The unique identifier of the payment for which a refund is initiated. For example, `pay_FgR9UMzgmKDJRi`. + +`created_at` +: `integer` Unix timestamp at which the refund was created. For example, `1600856650`. + +`batch_id` +: `string` This parameter is populated if the refund was created as part of a batch upload. For example, `batch_00000000000001`. + +`notes` +: `json object` Key-value store for storing your reference data. A maximum of 15 key-value pairs can be included. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A unique identifier provided by you for your internal reference. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + +`status` +: `string` Indicates the state of the refund. Possible values: + - `pending`: This state indicates that Razorpay is attempting to process the refund. + - `processed`: This is the final state of the refund. + - `failed`: A refund can attain the failed state in the following scenarios: + + - Normal refund is not possible for a payment which is more than 6 months old. + + - Instant Refund can sometimes fail because of customer's account or bank-related issues. + +`speed_requested` +: `string` The processing mode of the refund seen in the refund response. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. +Possible values: + - `normal`: Indicates that the refund will be processed via the normal speed. The refund will take 5-7 working days. + - `optimum`: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. + - If the refund can be processed instantly, Razorpay will do so, irrespective of the payment method used to make the payment. + - If an instant refund is not possible, Razorpay will initiate a refund that is processed at the normal speed. + +`speed_processed` +: `string` This is a parameter in the response which describes the mode used to process a refund. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. Possible values: + - `instant`: Indicates that the refund has been processed instantly via fund transfer. + - `normal`: Indicates that the refund has been processed by the payment processing partner. The refund will take 5-7 working days. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +\{Payment_id\} is not a valid id. +* code: 400 +* description: The `payment_id` provided is invalid. +* solution: Use a valid `payment_id`. + +The requested URL was not found on the server. +* code: 400 +* description: Possible reasons: - The URL is wrong or is missing something. +- A POST API is executed by GET method. + +* solution: - Ensure that the URL is correct and complete. +- Use the correct method, that is, POST. + +\{any Extra field\} is/are not required and should not be sent. +* code: 400 +* description: An additional or unrequired parameter is passed. +* solution: Ensure that you only pass the required parameters in the request body. + +The refund amount provided is greater than amount captured. +* code: 400 +* description: The refund amount entered is more than the amount captured. +* solution: Enter an amount equal to or less than the amount captured. + +The payment has been fully refunded already. +* code: 400 +* description: The `payment_id` has already been refunded fully. +* solution: Use a `payment_id` that has not been fully refunded. diff --git a/llm-content/api/refunds/create-normal.md b/llm-content/api/refunds/create-normal.md new file mode 100644 index 00000000..e8434ba2 --- /dev/null +++ b/llm-content/api/refunds/create-normal.md @@ -0,0 +1,280 @@ +--- +title: Create a Normal Refund +description: Create a Normal Refund using Razorpay Refunds API. +--- + +# Create a Normal Refund + +## Create a Normal Refund + +Use this endpoint to create a normal refund for a payment. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/pay_29QQoUBi66xm2f/refund \ +-H 'Content-Type: application/json' \ +-d '{ + "amount": 500100 +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_29QQoUBi66xm2f"; + +JSONObject refundRequest = new JSONObject(); +refundRequest.put("amount",100); +refundRequest.put("speed","normal"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +refundRequest.put("notes",notes); +refundRequest.put("receipt","Receipt No. #31"); + +Payment payment = razorpay.payments.refund(paymentId,refundRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId)->refund(array("amount"=> "100", "speed"=>"normal", "notes"=>array("notes_key_1"=>"Beam me up Scotty.", "notes_key_2"=>"Engage"), "receipt"=>"Receipt No. 31")); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.refund(paymentId,{ + "amount": "100", + "speed": "normal", + "notes": { + "notes_key_1": "Beam me up Scotty.", + "notes_key_2": "Engage" + }, + "receipt": "Receipt No. 31" +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "speed": "normal", + "notes": map[string]interface{}{ + "key_1": "value1", + "key_2": "value2" + }, +} +body, err := client.Payment.Refund("",1200, data, nil) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.refund(paymentId,{ + "amount": "100", + "speed": "normal", + "notes": { + "notes_key_1": "Beam me up Scotty.", + "notes_key_2": "Engage" + }, + "receipt": "Receipt No. 31" +}) + +```csharp: .NET +//initialize the SDK client +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Dictionary refundRequest = new Dictionary(); +refundRequest.Add("amount", 200); +refundRequest.Add("speed", "normal"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +refundRequest.Add("notes", notes); +refundRequest.Add("receipt", "Receipt No. #32"); + +Refund refund = client.Payment.Fetch(paymentId).Refund(refundRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_29QQoUBi66xm2f" + +para_attr = { + "amount": "100", + "speed": "normal", + "notes": { + "notes_key_1": "Beam me up Scotty.", + "notes_key_2": "Engage" + }, + "receipt": "Receipt No. 31" +} + +Razorpay::Payment.fetch(paymentId).refund(para_attr) +``` + +### Response + +```json: Success +{ + "id": "rfnd_FP8QHiV938haTz", + "entity": "refund", + "amount": 500100, + "receipt": "Receipt No. 31", + "currency": "", + "payment_id": "pay_29QQoUBi66xm2f", + "notes": [], + "receipt": null, + "acquirer_data": { + "arn": null + }, + "created_at": 1597078866, + "batch_id": null, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "normal" +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least 1.00", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the payment which needs to be refunded. + +### Parameters + +`amount` _optional_ +: `integer` The amount to be refunded. Amount should be in the smallest unit of the currency in which the payment was made. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as `295`. + - For a **partial refund**, enter a value lesser than the payment amount. For example, if the payment amount is and you want to refund only , you must pass `50000`. + - For **full refund**, enter the entire payment amount. If the `amount` parameter is not passed, the entire payment amount will be refunded. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`speed` _optional_ +: `string` The speed at which the refund is to be processed. The default value is `normal`. Refund will be processed via the normal speed, and the customer will receive the refund within 5-7 working days. + +`notes` _optional_ +: `json object` Key-value pairs used to store additional information. A maximum of 15 key-value pairs can be included. + +`receipt` _optional_ +: `string` A unique identifier provided by you for your internal reference. + +### Parameters + +`id` +: `string` The unique identifier of the refund. For example, `rfnd_FgRAHdNOM4ZVbO`. + +`entity` +: `string` Indicates the type of entity. Here, it is `refund`. + +`amount` +: `integer` The amount to be refunded (in the smallest unit of currency). + For example, if the refund value is it will be `3000`. + +`currency` +: `string` The currency of payment amount for which the refund is initiated. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`payment_id` +: `string` The unique identifier of the payment for which a refund is initiated. For example, `pay_FgR9UMzgmKDJRi`. + +`created_at` +: `integer` Unix timestamp at which the refund was created. For example, `1600856650`. + +`batch_id` +: `string` This parameter is populated if the refund was created as part of a batch upload. For example, `batch_00000000000001`. + +`notes` +: `json object` Key-value store for storing your reference data. A maximum of 15 key-value pairs can be included. For example, `"note_key": "Beam me up Scotty"`. + +`receipt` +: `string` A unique identifier provided by you for your internal reference. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + +`status` +: `string` Indicates the state of the refund. Possible values: + - `pending`: This state indicates that Razorpay is attempting to process the refund. + - `processed`: This is the final state of the refund. + - `failed`: A refund can attain the failed state in the following scenarios: + + - Normal refund is not possible for a payment which is more than 6 months old. + + - Instant Refund can sometimes fail because of customer's account or bank-related issues. + +`speed_requested` +: `string` The processing mode of the refund seen in the refund response. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. +Possible values: + - `normal`: Indicates that the refund will be processed via the normal speed. The refund will take 5-7 working days. + - `optimum`: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. + - If the refund can be processed instantly, Razorpay will do so, irrespective of the payment method used to make the payment. + - If an instant refund is not possible, Razorpay will initiate a refund that is processed at the normal speed. + +`speed_processed` +: `string` This is a parameter in the response which describes the mode used to process a refund. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. Possible values: + - `instant`: Indicates that the refund has been processed instantly via fund transfer. + - `normal`: Indicates that the refund has been processed by the payment processing partner. The refund will take 5-7 working days. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +\{Payment_id\} is not a valid id. +* code: 400 +* description: The `payment_id` provided is invalid. +* solution: Use a valid `payment_id`. + +The requested URL was not found on the server. +* code: 400 +* description: Possible reasons: - The URL is wrong or is missing something. +- A POST API is executed by GET method. + +* solution: - Ensure that the URL is correct and complete. +- Use the correct method, that is, POST. + +\{any Extra field\} is/are not required and should not be sent. +* code: 400 +* description: An additional or unrequired parameter is passed. +* solution: Ensure that you only pass the required parameters in the request body. + +The refund amount provided is greater than amount captured. +* code: 400 +* description: The refund amount entered is more than the amount captured. +* solution: Enter an amount equal to or less than the amount captured. + +The amount must be at least INR 1.00. +* code: 400 +* description: The refund amount entered is less than . +* solution: Enter an amount of at least . + +The payment has been fully refunded already. +* code: 400 +* description: The `payment_id` has already been refunded fully. +* solution: Use a `payment_id` that has not been fully refunded. diff --git a/llm-content/api/refunds/entity.md b/llm-content/api/refunds/entity.md new file mode 100644 index 00000000..cb2a0eb4 --- /dev/null +++ b/llm-content/api/refunds/entity.md @@ -0,0 +1,114 @@ +--- +title: Refunds Entity +description: Know about refunds entity parameters and their description. +--- + +# Refunds Entity + +## Refunds Entity + +The Refunds entity has the following parameters: + +### Response + +```json: Entity +{ + "id":"rfnd_FgRAHdNOM4ZVbO", + "entity":"refund", + "amount":10000, + "currency":"", + "payment_id":"pay_FgR9UMzgmKDJRi", + "notes":{ + "notes_key_1":"Beam me up Scotty.", + "notes_key_2":"Engage" + }, + "receipt":null, + "acquirer_data":{ + "arn":"10000000000000" + }, + "created_at":1600856650, + "batch_id":null, + "status":"processed", + "speed_processed":"normal", + "speed_requested":"normal" +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the refund. For example, `rfnd_FgRAHdNOM4ZVbO`. + +`entity` +: `string` Indicates the type of entity. Here, it is `refund`. + +`amount` +: `integer` The amount to be refunded (in the smallest unit of currency). For example, if the refund value is it will be `3000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` +: `string` The currency of payment amount for which the refund is initiated. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`payment_id` +: `string` The unique identifier of the payment for which a refund is initiated. For example, `pay_FgR9UMzgmKDJRi`. + +`notes` +: `json object` Key-value store for storing your reference data. A maximum of 15 key-value pairs can be included. For example, `"note_key": "Beam me up Scotty”`. + +`speed` +: `string` Speed at which the refund is to be processed. Possible value is `normal`, which indicates that the refund will be processed via the normal speed. The refund will take 5-7 working days. + +`receipt` +: `string` A unique identifier provided by you for your internal reference. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + +`created_at` +: `integer` Unix timestamp at which the refund was created. For example, `1600856650`. + +`batch_id` +: `string` This parameter is populated if the refund was created as part of a batch upload. For example, `batch_00000000000001`. + +`status` +: `string` Indicates the state of the refund. Possible values: + - `pending`: This state indicates that Razorpay is attempting to process the refund. + - `processed`: This is the final state of the refund. + - `failed`: A refund can attain the failed state in the following scenarios: + + - Normal refund is not possible for a payment which is more than 6 months old. + + - Instant Refund can sometimes fail because of customer's account or bank-related issues. + +`speed_requested` +: `string` The processing mode of the refund seen in the refund response. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. +Possible values: + - `normal`: Indicates that the refund will be processed via the normal speed. The refund will take 5-7 working days. + - `optimum`: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. + - If the refund can be processed instantly, Razorpay will do so, irrespective of the payment method used to make the payment. + - If an instant refund is not possible, Razorpay will initiate a refund that is processed at the normal speed. + +`speed_processed` +: `string` This is a parameter in the response which describes the mode used to process a refund. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. Possible values: + - `instant`: Indicates that the refund has been processed instantly via fund transfer. + - `normal`: Indicates that the refund has been processed by the payment processing partner. The refund will take 5-7 working days. diff --git a/llm-content/api/refunds/fetch-all.md b/llm-content/api/refunds/fetch-all.md new file mode 100644 index 00000000..f9b15683 --- /dev/null +++ b/llm-content/api/refunds/fetch-all.md @@ -0,0 +1,214 @@ +--- +title: Fetch All Refunds +description: Fetch all Refunds using Razorpay Refunds API. +--- + +# Fetch All Refunds + +## Fetch All Refunds + +Use this endpoint to retrieve details of all refunds. However, by default, only the last 10 refunds are returned. You can use count and skip query parameters to change that behaviour. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/refunds + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List refund = razorpay.refunds.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->refund->all($options); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.refund.all(options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +option := map[string]interface{}{ + "count" : 2 +} +body, err := client.Payment.All(option, nil) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.refunds.all(options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +options = {"count":1} + +Razorpay::Refund.all(options) + +```csharp: .NET +//initialize the SDK client +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("count", "1"); + +List refund = client.Refund.All(paramRequest); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "rfnd_FFX6AnnIN3puqW", + "entity": "refund", + "amount": 88800, + "currency": "INR", + "payment_id": "pay_FFX5FdEYx8jPwA", + "notes": { + "comment": "Issuing an instant refund" + }, + "receipt": null, + "acquirer_data": {}, + "created_at": 1594982363, + "batch_id": null, + "status": "processed", + "speed_processed": "optimum", + "speed_requested": "optimum" + }, + { + "id": "rfnd_EqWThTE7dd7utf", + "entity": "refund", + "amount": 6000, + "currency": "INR", + "payment_id": "pay_EpkFDYRirena0f", + "notes": { + "comment": "Issuing a normal refund" + }, + "receipt": null, + "acquirer_data": { + "arn": "10000000000000" + }, + "created_at": 1589521675, + "batch_id": null, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "normal" + } + ] +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The payment id field is required.", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "payment_id" + } +} +``` + +### Parameters + +`from` _optional_ +: `integer` Unix timestamp at which the refunds were created. + +`to` _optional_ +: `integer` Unix timestamp till which the refunds were created. + +`count` _optional_ +: `integer` The number of refunds to fetch. You can fetch a maximum of 100 refunds. + +`skip` _optional_ +: `integer` The number of refunds to be skipped. + +### Parameters + +`id` +: `string` The unique identifier of the refund. For example, `rfnd_FgRAHdNOM4ZVbO`. + +`entity` +: `string` Indicates the type of entity. Here, it is `refund`. + +`amount` +: `integer` The amount to be refunded (in the smallest unit of currency). For example, if the refund value is , it will be `3000`. + +`currency` +: `string` The currency of a payment amount for which the refund is initiated. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`payment_id` +: `string` The unique identifier of the payment for which a refund is initiated. For example, `pay_FgR9UMzgmKDJRi`. + +`created_at` +: `integer` Unix timestamp at which the refund was created. For example, `1600856650`. + +`batch_id` +: `string` This parameter is populated if the refund was created as part of a batch upload. For example, `batch_00000000000001`. + +`notes` +: `json object` Key-value store for storing your reference data. A maximum of 15 key-value pairs can be included. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A unique identifier provided by you for your internal reference. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + +`status` +: `string` Indicates the state of the refund. Possible values: + - `pending`: This state indicates that Razorpay is attempting to process the refund. + - `processed`: This is the final state of the refund. + - `failed`: A refund can attain the failed state in the following scenarios: + + - Normal refund is not possible for a payment which is more than 6 months old. + + - Instant Refund can sometimes fail because of customer's account or bank-related issues. + +`speed_requested` +: `string` The processing mode of the refund seen in the refund response. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. +Possible values: + - `normal`: Indicates that the refund will be processed via the normal speed. The refund will take 5-7 working days. + - `optimum`: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. + - If the refund can be processed instantly, Razorpay will do so, irrespective of the payment method used to make the payment. + - If an instant refund is not possible, Razorpay will initiate a refund that is processed at the normal speed. + +`speed_processed` +: `string` This is a parameter in the response which describes the mode used to process a refund. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. Possible values: + - `instant`: Indicates that the refund has been processed instantly via fund transfer. + - `normal`: Indicates that the refund has been processed by the payment processing partner. The refund will take 5-7 working days. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The requested URL was not found on the server. +* code: 400 +* description: The URL is wrong or is missing something. +* solution: Ensure that the URL is correct and complete. + +The payment id field is required. +* code: 400 +* description: A GET API is executed by POST method. +* solution: Use the correct method, that is, GET. diff --git a/llm-content/api/refunds/fetch-multiple-refund-payment.md b/llm-content/api/refunds/fetch-multiple-refund-payment.md new file mode 100644 index 00000000..7816c7a8 --- /dev/null +++ b/llm-content/api/refunds/fetch-multiple-refund-payment.md @@ -0,0 +1,236 @@ +--- +title: Fetch Multiple Refunds for a Payment +description: Fetch Multiple Refunds for a Payment using Razorpay Refunds API. +--- + +# Fetch Multiple Refunds for a Payment + +## Fetch Multiple Refunds for a Payment + +Use this endpoint to retrieve multiple refunds for a payment. By default, only the last 10 refunds are returned. You can use `count` and `skip` parameters to change that behaviour. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/payments/pay_29QQoUBi66xm2f/refunds?from=1500826740&to=1500826760 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_29QQoUBi66xm2f"; + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List payments = razorpay.payments.fetchAllRefunds(paymentId,params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId)->fetchMultipleRefund($option); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch_multiple_refund(paymentId,option) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +option := map[string]interface{}{ + "count" : 1, +} +body, err := client.Payment.FetchMultipleRefund("",option, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_29QQoUBi66xm2f" + +option = {"count":1} + +Razorpay::Payment.fetch_multiple_refund(paymentId,option) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetchMultipleRefund(paymentId,option) + +```csharp: .NET +//initialize the SDK client +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_Z6t7VFTb9xHeOs"; + +Dictionary paramRequest = new Dictionary(); +paramRequest.add("count","1"); + +List refund = client.Payment.Fetch(paymentId).AllRefunds(paramRequest) +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "rfnd_FP8DDKxqJif6ca", + "entity": "refund", + "amount": 300100, + "currency": "INR", + "payment_id": "pay_29QQoUBi66xm2f", + "notes": { + "comment": "Comment for refund" + }, + "receipt": null, + "acquirer_data": { + "arn": "10000000000000" + }, + "created_at": 1597078124, + "batch_id": null, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "optimum" + }, + { + "id": "rfnd_FP8DRfu3ygfOaC", + "entity": "refund", + "amount": 200000, + "currency": "INR", + "payment_id": "pay_29QQoUBi66xm2f", + "notes": { + "comment": "Comment for refund" + }, + "receipt": null, + "acquirer_data": { + "arn": "10000000000000" + }, + "created_at": 1597078137, + "batch_id": null, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "optimum" + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The id provided does not exist", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the payment for which refund has been requested. + +### Parameters + +`from` _optional_ +: `integer` Unix timestamp at which the refunds were created. + +`to` _optional_ +: `integer` Unix timestamp till which the refunds were created. + +`count` _optional_ +: `integer` The number of refunds to fetch for the payment. + +`skip` _optional_ +: `integer` The number of refunds to be skipped for the payment. + +### Parameters + +`id` +: `string` The unique identifier of the refund. For example, `rfnd_FgRAHdNOM4ZVbO`. + +`entity` +: `string` Indicates the type of entity. Here, it is `refund`. + +`amount` +: `integer` The amount to be refunded (in the smallest unit of currency). + For example, if the refund value is , it will be `3000`. + +`currency` +: `string` The currency of payment amount for which the refund is initiated. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`payment_id` +: `string` The unique identifier of the payment for which a refund is initiated. For example, `pay_FgR9UMzgmKDJRi`. + +`created_at` +: `integer` Unix timestamp at which the refund was created. For example, `1600856650`. + +`batch_id` +: `string` This parameter is populated if the refund was created as part of a batch upload. For example, `batch_00000000000001`. + +`notes` +: `json object` Key-value store for storing your reference data. A maximum of 15 key-value pairs can be included. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A unique identifier provided by you for your internal reference. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + +`status` +: `string` Indicates the state of the refund. Possible values: + - `pending`: This state indicates that Razorpay is attempting to process the refund. + - `processed`: This is the final state of the refund. + - `failed`: A refund can attain the failed state in the following scenarios: + + - Normal refund is not possible for a payment which is more than 6 months old. + + - Instant Refund can sometimes fail because of customer's account or bank-related issues. + +`speed_requested` +: `string` The processing mode of the refund seen in the refund response. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. +Possible values: + - `normal`: Indicates that the refund will be processed via the normal speed. The refund will take 5-7 working days. + - `optimum`: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. + - If the refund can be processed instantly, Razorpay will do so, irrespective of the payment method used to make the payment. + - If an instant refund is not possible, Razorpay will initiate a refund that is processed at the normal speed. + +`speed_processed` +: `string` This is a parameter in the response which describes the mode used to process a refund. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. Possible values: + - `instant`: Indicates that the refund has been processed instantly via fund transfer. + - `normal`: Indicates that the refund has been processed by the payment processing partner. The refund will take 5-7 working days. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The requested URL was not found on the server. +* code: 400 +* description: Possible reasons: - The URL is wrong or is missing something. +- A POST API is executed by GET method. + +* solution: - Ensure that the URL is correct and complete. +- Use the correct method, that is, POST. + +_id is not a valid id +* code: 400 +* description: The `payment_id` entered is invalid or incomplete. +* solution: Use a valid `payment_id`. + +The id provided does not exist +* code: 400 +* description: The `payment_id` is not entered. +* solution: Use a valid `payment_id`. diff --git a/llm-content/api/refunds/fetch-specific-refund-payment.md b/llm-content/api/refunds/fetch-specific-refund-payment.md new file mode 100644 index 00000000..d7abcdd2 --- /dev/null +++ b/llm-content/api/refunds/fetch-specific-refund-payment.md @@ -0,0 +1,210 @@ +--- +title: Fetch a Specific Refund for a Payment +description: Fetch a Specific Refund for a Payment using Razorpay Refunds API. +--- + +# Fetch a Specific Refund for a Payment + +## Fetch a Specific Refund for a Payment + +Use this endpoint to retrieve details of a specific refund made for a payment. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/payments/pay_29QQoUBi66xm2f/refunds/rfnd_AABBdHIieexn5c + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_29QQoUBi66xm2f"; + +String refundId = "rfnd_AABBdHIieexn5c"; + +Payment payment = razorpay.payments.fetchRefund(paymentId,refundId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId)->fetchRefund($refundId); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch_refund_id(paymentId,refundId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.FetchRefund("","", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_29QQoUBi66xm2f" + +refundId = "rfnd_AABBdHIieexn5c" + +Razorpay::Payment.fetch(paymentId).fetch_refund(refundId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetchRefund('pay_JTVtDcN1uRYb5n','rfnd_JTvPLzbhq92ZWD') + "notes": { + "notes_key_1": "Beam me up Scotty.", + "notes_key_2": "Engage" + } +}) +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +Payment payment = client.Payment.Fetch(paymentId); + +Refund refund = payment.Refunds.Fetch(refundId); + +} + +```csharp: .NET +//initialize the SDK client +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +string refundId = "rfnd_Z6t7VFTb9xHeOs"; + +Refund refund = client.Payment.Fetch(paymentId).FetchRefund(refundId); + +``` + +### Response + +```json: Success +{ + "id": "rfnd_AABBdHIieexn5c", + "entity": "refund", + "amount": 300100, + "currency": "INR", + "payment_id": "pay_FIKOnlyii5QGNx", + "notes": { + "comment": "Comment for refund" + }, + "receipt": null, + "acquirer_data": { + "arn": "10000000000000" + }, + "created_at": 1597078124, + "batch_id": null, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "optimum" +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "AABBdHIieex is not a valid id", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Parameters + +`payment_id` _mandatory_ +: `string` Unique identifier of the payment for which the refund has been made. + +`refund_id` _mandatory_ +: `string` Unique identifier of the refund to be retrieved. + +### Parameters + +`id` +: `string` The unique identifier of the refund. For example, `rfnd_FgRAHdNOM4ZVbO`. + +`entity` +: `string` Indicates the type of entity. Here, it is `refund`. + +`amount` +: `integer` The amount to be refunded (in the smallest unit of currency). + For example, if the refund value is , it will be `3000`. + +`currency` +: `string` The currency of payment amount for which the refund is initiated. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`payment_id` +: `string` The unique identifier of the payment for which a refund is initiated. For example, `pay_FgR9UMzgmKDJRi`. + +`created_at` +: `integer` Unix timestamp at which the refund was created. For example, `1600856650`. + +`batch_id` +: `string` This parameter is populated if the refund was created as part of a batch upload. For example, `batch_00000000000001`. + +`notes` +: `json object` Key-value store for storing your reference data. A maximum of 15 key-value pairs can be included. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A unique identifier provided by you for your internal reference. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + +`status` +: `string` Indicates the state of the refund. Possible values: + - `pending`: This state indicates that Razorpay is attempting to process the refund. + - `processed`: This is the final state of the refund. + - `failed`: A refund can attain the failed state in the following scenarios: + + - Normal refund is not possible for a payment which is more than 6 months old. + + - Instant Refund can sometimes fail because of customer's account or bank-related issues. + +`speed_requested` +: `string` The processing mode of the refund seen in the refund response. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. +Possible values: + - `normal`: Indicates that the refund will be processed via the normal speed. The refund will take 5-7 working days. + - `optimum`: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. + - If the refund can be processed instantly, Razorpay will do so, irrespective of the payment method used to make the payment. + - If an instant refund is not possible, Razorpay will initiate a refund that is processed at the normal speed. + +`speed_processed` +: `string` This is a parameter in the response which describes the mode used to process a refund. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. Possible values: + - `instant`: Indicates that the refund has been processed instantly via fund transfer. + - `normal`: Indicates that the refund has been processed by the payment processing partner. The refund will take 5-7 working days. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The requested URL was not found on the server. +* code: 400 +* description: Possible reasons: - The URL is wrong or is missing something. +- A GET API is executed by POST method. + +* solution: - Ensure that the URL is correct and complete. +- Use the correct method, that is, GET. + +_id is not a valid id +* code: 400 +* description: - The refund or payment id entered is invalid or incomplete. +- There is an extra space in the URL. + +* solution: Use valid refund and payment ids without any spaces. + +The id provided does not exist +* code: 400 +* description: The refund id entered is incomplete or invalid. +* solution: Use a complete and valid refund id. diff --git a/llm-content/api/refunds/fetch-with-id.md b/llm-content/api/refunds/fetch-with-id.md new file mode 100644 index 00000000..7d869053 --- /dev/null +++ b/llm-content/api/refunds/fetch-with-id.md @@ -0,0 +1,187 @@ +--- +title: Fetch Refund With ID +description: Fetch Refund With id using Razorpay Refunds API. +--- + +# Fetch Refund With ID + +## Fetch Refund With ID + +Use this endpoint to retrieve the refund using the id. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + +-X GET https://api.razorpay.com/v1/refunds/rfnd_DfjjhJC6eDvUAi + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String refundId = "rfnd_DfjjhJC6eDvUAi"; + +List refund = razorpay.refunds.fetch(refundId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->refund->fetch($refundId); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.refund.fetch(refundId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +refundId = "rfnd_DfjjhJC6eDvUAi" + +Razorpay::Refund.fetch(refundId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Refund.Fetch("", nil, nil) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.refunds.fetch(refundId) + +```csharp: .NET +//initialize the SDK client +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string refundId = "rfnd_Z6t7VFTb9xHeOs"; + +Refund refund = client.Refund.Fetch(refundId); +``` + +### Response + +```json: Success +{ + "id": "rfnd_DfjjhJC6eDvUAi", + "entity": "refund", + "amount": 6000, + "currency": "INR", + "payment_id": "pay_EpkFDYRirena0f", + "notes": { + "comment": "Issuing an instant refund" + }, + "receipt": null, + "acquirer_data": { + "arn": "10000000000000" + }, + "created_at": 1589521675, + "batch_id": null, + "status": "processed", + "speed_processed": "optimum", + "speed_requested": "optimum" +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The requested URL was not found on the server.", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the refund which is to be retrieved. + +### Parameters + +`id` +: `string` The unique identifier of the refund. For example, `rfnd_FgRAHdNOM4ZVbO`. + +`entity` +: `string` Indicates the type of entity. Here, it is `refund`. + +`amount` +: `integer` The amount to be refunded (in the smallest unit of currency). + For example, if the refund value is , it will be `3000`. + +`currency` +: `string` The currency of payment amount for which the refund is initiated. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`payment_id` +: `string` The unique identifier of the payment for which a refund is initiated. For example, `pay_FgR9UMzgmKDJRi`. + +`created_at` +: `integer` Unix timestamp at which the refund was created. For example, `1600856650`. + +`batch_id` +: `string` This parameter is populated if the refund was created as part of a batch upload. For example, `batch_00000000000001`. + +`notes` +: `json object` Key-value store for storing your reference data. A maximum of 15 key-value pairs can be included. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A unique identifier provided by you for your internal reference. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + +`status` +: `string` Indicates the state of the refund. Possible values: + - `pending`: This state indicates that Razorpay is attempting to process the refund. + - `processed`: This is the final state of the refund. + - `failed`: A refund can attain the failed state in the following scenarios: + + - Normal refund is not possible for a payment which is more than 6 months old. + + - Instant Refund can sometimes fail because of customer's account or bank-related issues. + +`speed_requested` +: `string` The processing mode of the refund seen in the refund response. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. +Possible values: + - `normal`: Indicates that the refund will be processed via the normal speed. The refund will take 5-7 working days. + - `optimum`: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. + - If the refund can be processed instantly, Razorpay will do so, irrespective of the payment method used to make the payment. + - If an instant refund is not possible, Razorpay will initiate a refund that is processed at the normal speed. + +`speed_processed` +: `string` This is a parameter in the response which describes the mode used to process a refund. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. Possible values: + - `instant`: Indicates that the refund has been processed instantly via fund transfer. + - `normal`: Indicates that the refund has been processed by the payment processing partner. The refund will take 5-7 working days. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The requested URL was not found on the server. +* code: 400 +* description: Possible reasons: - The URL is wrong or is missing something. +- A GET API is executed by POST method. + +* solution: - Ensure that the URL is correct and complete. +- Use the correct method, that is, GET. + +_id is not a valid id +* code: 400 +* description: The refund id entered is invalid. +* solution: Use a valid refund id. + +The id provided does not exist +* code: 400 +* description: The refund id entered is incomplete or invalid. +* solution: Use a complete and valid refund id. diff --git a/llm-content/api/refunds/instant-refunds-idempotent.md b/llm-content/api/refunds/instant-refunds-idempotent.md new file mode 100644 index 00000000..d49cd6bc --- /dev/null +++ b/llm-content/api/refunds/instant-refunds-idempotent.md @@ -0,0 +1,200 @@ +--- +title: Create an Instant Refund (Idempotent Request) +description: Retry or send the same instant refund request multiple times safely using the Razorpay API. +--- + +# Create an Instant Refund (Idempotent Request) + +## Create an Instant Refund (Idempotent Request) + +Idempotency allows you to safely retry or send the same request multiple times without fear of repeating the instant refund request more than once. + +- When you try to create an instant refund, in some cases due to network downtimes, you may not get a response from our servers. As a consequence, you will not be aware of the refund id or its state. In such cases, you can safely retry the transaction using the same idempotency key without risk of double-refund or duplication. +- To make an instant refund request idempotent, add the header `X-Refund-Idempotency` to the request and pass an idempotency key against it. The idempotency key must be at least 10 character long and can contain alphabets, numbers, hyphens and underscores only. For example, `550e8400-e29b-41d4-a716-446655440000`. +- Idempotency is supported for both Normal and Instant Refunds APIs. + +> **INFO** +> +> +> **Handy Tips** +> +> - When retrying a request, the request body must be the same as the first request for idempotency to work. A different payload will be rejected as a `BAD_REQUEST`. +> - The idempotency key in retries must be the same as the original request. +> - Use unique idempotency keys for each unique request. +> - If a request is received while a prior request is still being processed, the system will return a 409 Conflict status code. You may retry the request upon receiving this response. +> + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/pay_29QQoUBi66xm2f/refund \ +-H 'Content-Type: application/json' \ +-H 'X-Refund-Idempotency: 550e8400-e29b-41d4-a716-446655440000' \ +-d '{ + "amount":500100, + "speed":"optimum", + "receipt":"Receipt No. 31", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' +``` + +### Response + +```json: Success +{ + "id": "rfnd_FP8R8EGjGbPkVb", + "entity": "refund", + "amount": 500100, + "currency": "INR", + "payment_id": "pay_29QQoUBi66xm2f", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "receipt": "Receipt No. 31", + "acquirer_data": { + "arn": null + }, + "created_at": 1597078914, + "batch_id": null, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "optimum" +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Different request with the same idempotency key has already been processed.", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} + +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the payment which needs to be refunded. + +### Parameters + +`amount` _optional_ +: `integer` The amount to be refunded. Amount should be in the smallest unit of the currency in which the payment was made. **Required in case of partial refund**. + - For a **partial refund**, enter a value lesser than the payment amount. For example, if the payment amount is ₹1200 and you want to refund only ₹200, you must pass `20000`. + - In case of a **full refund**, enter the full payment amount. If `amount` parameter is not passed, the entire payment amount will be refunded. + +`speed` _mandatory_ +: `string` Here, it must be `optimum`. Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. + - If the refund can be processed instantly, Razorpay will do so, irrespective of the payment method used to make the payment. + - If an instant refund is not possible, Razorpay will initiate a refund that is processed at the normal speed. + +`notes` _optional_ +: `json object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` _optional_ +: `string` A unique identifier provided by you for your internal reference. + +### Parameters + +`id` +: `string` The unique identifier of the refund. For example, `rfnd_FgRAHdNOM4ZVbO`. + +`entity` +: `string` Indicates the type of entity. Here, it is `refund`. + +`amount` +: `integer` The amount to be refunded (in the smallest unit of currency). + For example, if the refund value is it will be `3000`. + +`currency` +: `string` The currency of payment amount for which the refund is initiated. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`payment_id` +: `string` The unique identifier of the payment for which a refund is initiated. For example, `pay_FgR9UMzgmKDJRi`. + +`created_at` +: `integer` Unix timestamp at which the refund was created. For example, `1600856650`. + +`batch_id` +: `string` This parameter is populated if the refund was created as part of a batch upload. For example, `batch_00000000000001`. + +`notes` +: `json object` Key-value store for storing your reference data. A maximum of 15 key-value pairs can be included. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A unique identifier provided by you for your internal reference. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + +`status` +: `string` Indicates the state of the refund. Possible values: + - `pending`: This state indicates that Razorpay is attempting to process the refund. + - `processed`: This is the final state of the refund. + - `failed`: A refund can attain the failed state in the following scenarios: + + - Normal refund is not possible for a payment which is more than 6 months old. + + - Instant Refund can sometimes fail because of customer's account or bank-related issues. + +`speed_requested` +: `string` The processing mode of the refund seen in the refund response. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. +Possible values: + - `normal`: Indicates that the refund will be processed via the normal speed. The refund will take 5-7 working days. + - `optimum`: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. + - If the refund can be processed instantly, Razorpay will do so, irrespective of the payment method used to make the payment. + - If an instant refund is not possible, Razorpay will initiate a refund that is processed at the normal speed. + +`speed_processed` +: `string` This is a parameter in the response which describes the mode used to process a refund. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. Possible values: + - `instant`: Indicates that the refund has been processed instantly via fund transfer. + - `normal`: Indicates that the refund has been processed by the payment processing partner. The refund will take 5-7 working days. + +### Errors + +Different request with the same idempotency key has already been processed. +* code: 409 +* description: Another refund request with different parameters has been processed using the same idempotency key. +* solution: Use a unique idempotency key for the new request and retry. + +Another request with the same idempotency key is still in progress. +* code: 409 +* description: A refund request with the same idempotency key is currently being processed and has not yet returned a response. +* solution: Wait for the previous request to complete or use a different idempotency key. + +Internal server error - Failed to fetch idempotency record +* code: 500 +* description: The server encountered an error while retrieving the idempotency record. +* solution: Retry the request after some time. If the issue persists, contact [Razorpay Support](https://razorpay.com/support). + +Internal server error - Failed to parse request body +* code: 500 +* description: The server failed to parse the request body to generate the request hash. +* solution: Ensure the request body is properly formatted as valid JSON. If the issue persists, contact [Razorpay Support](https://razorpay.com/support). + +The idempotency key must be at least 10 characters long. + +* code: 400 +* description: The idempotency key provided is less than 10 characters in length. +* solution: Use an idempotency key that is at least 10 characters long. + +The idempotency key must only contain alphanumeric characters, underscores and hyphens. + +* code: 400 +* description: The idempotency key contains invalid special characters. +* solution: Ensure the idempotency key only contains alphanumeric characters (A-Z, a-z, 0-9), underscores (_) and hyphens (-). + +Merchant id not found in authentication +* code: 500 +* description: The request contains an idempotency key but the merchant authentication is invalid or missing. +* solution: Ensure you are using valid API credentials (Key ID and Key Secret) for authentication. If the issue persists, [Razorpay Support](https://razorpay.com/support). diff --git a/llm-content/api/refunds/normal-refunds-idempotent.md b/llm-content/api/refunds/normal-refunds-idempotent.md new file mode 100644 index 00000000..2c2eef4d --- /dev/null +++ b/llm-content/api/refunds/normal-refunds-idempotent.md @@ -0,0 +1,233 @@ +--- +title: Create a Normal Refund (Idempotent Request) +description: Retry or send the same normal refund request multiple times safely using the Razorpay API. +--- + +# Create a Normal Refund (Idempotent Request) + +## Create a Normal Refund (Idempotent Request) + +Idempotency allows you to safely retry or send the same request multiple times without fear of repeating the normal refund request more than once. + +- When you try to create a normal refund, in some cases due to network downtimes, you may not get a response from our servers. As a consequence, you will not be aware of the refund id or its state. In such cases, you can safely retry the transaction using the same idempotency key without risk of double-refund or duplication. +- To make a normal refund request idempotent, add the header `X-Refund-Idempotency` to the request and pass an idempotency key against it. The idempotency key must be at least 10 character long and can contain alphabets, numbers, hyphens and underscores only. For example, `550e8400-e29b-41d4-a716-446655440000`. +- Idempotency is supported for both Normal and Instant Refunds APIs. + +> **INFO** +> +> +> **Handy Tips** +> +> - When retrying a request, the request body must be the same as the first request for idempotency to work. A different payload will be rejected as a `BAD_REQUEST`. +> - The idempotency key in retries must be the same as the original request. +> - Use unique idempotency keys for each unique request. +> - If a request is received while a prior request is still being processed, the system will return a 409 Conflict status code. You may retry the request upon receiving this response. +> + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/pay_29QQoUBi66xm2f/refund \ +-H 'Content-Type: application/json' \ +-H 'X-Refund-Idempotency: 550e8400-e29b-41d4-a716-446655440000' \ +-d '{ + "amount": 500100 +}' +``` + +### Response + +```json: Success +{ + "id": "rfnd_FP8QHiV938haTz", + "entity": "refund", + "amount": 500100, + "receipt": "Receipt No. 31", + "currency": "", + "payment_id": "pay_29QQoUBi66xm2f", + "notes": {}, + "acquirer_data": { + "arn": null + }, + "created_at": 1597078866, + "batch_id": null, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "normal" +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Different request with the same idempotency key has already been processed.", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the payment which needs to be refunded. + +### Parameters + +`amount` _optional_ +: `integer` The amount to be refunded. Amount should be in the smallest unit of the currency in which the payment was made. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as `295`. + - For a **partial refund**, enter a value lesser than the payment amount. For example, if the payment amount is and you want to refund only , you must pass `50000`. + - For **full refund**, enter the entire payment amount. If the `amount` parameter is not passed, the entire payment amount will be refunded. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`speed` _optional_ +: `string` The speed at which the refund is to be processed. The default value is `normal`. Refund will be processed via the normal speed, and the customer will receive the refund within 5-7 working days. + +`notes` _optional_ +: `json object` Key-value pairs used to store additional information. A maximum of 15 key-value pairs can be included. + +`receipt` _optional_ +: `string` A unique identifier provided by you for your internal reference. + +### Parameters + +`id` +: `string` The unique identifier of the refund. For example, `rfnd_FgRAHdNOM4ZVbO`. + +`entity` +: `string` Indicates the type of entity. Here, it is `refund`. + +`amount` +: `integer` The amount to be refunded (in the smallest unit of currency). + For example, if the refund value is it will be `3000`. + +`currency` +: `string` The currency of payment amount for which the refund is initiated. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`payment_id` +: `string` The unique identifier of the payment for which a refund is initiated. For example, `pay_FgR9UMzgmKDJRi`. + +`created_at` +: `integer` Unix timestamp at which the refund was created. For example, `1600856650`. + +`batch_id` +: `string` This parameter is populated if the refund was created as part of a batch upload. For example, `batch_00000000000001`. + +`notes` +: `json object` Key-value store for storing your reference data. A maximum of 15 key-value pairs can be included. For example, `"note_key": "Beam me up Scotty"`. + +`receipt` +: `string` A unique identifier provided by you for your internal reference. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + +`status` +: `string` Indicates the state of the refund. Possible values: + - `pending`: This state indicates that Razorpay is attempting to process the refund. + - `processed`: This is the final state of the refund. + - `failed`: A refund can attain the failed state in the following scenarios: + + - Normal refund is not possible for a payment which is more than 6 months old. + + - Instant Refund can sometimes fail because of customer's account or bank-related issues. + +`speed_requested` +: `string` The processing mode of the refund seen in the refund response. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. +Possible values: + - `normal`: Indicates that the refund will be processed via the normal speed. The refund will take 5-7 working days. + - `optimum`: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. + - If the refund can be processed instantly, Razorpay will do so, irrespective of the payment method used to make the payment. + - If an instant refund is not possible, Razorpay will initiate a refund that is processed at the normal speed. + +`speed_processed` +: `string` This is a parameter in the response which describes the mode used to process a refund. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. Possible values: + - `instant`: Indicates that the refund has been processed instantly via fund transfer. + - `normal`: Indicates that the refund has been processed by the payment processing partner. The refund will take 5-7 working days. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +\{Payment_id\} is not a valid id. +* code: 400 +* description: The `payment_id` provided is invalid. +* solution: Use a valid `payment_id`. + +The requested URL was not found on the server. +* code: 400 +* description: Possible reasons: - The URL is wrong or is missing something. +- A POST API is executed by GET method. + +* solution: - Ensure that the URL is correct and complete. +- Use the correct method, that is, POST. + +\{any Extra field\} is/are not required and should not be sent. +* code: 400 +* description: An additional or unrequired parameter is passed. +* solution: Ensure that you only pass the required parameters in the request body. + +The refund amount provided is greater than amount captured. +* code: 400 +* description: The refund amount entered is more than the amount captured. +* solution: Enter an amount equal to or less than the amount captured. + +The amount must be at least INR 1.00. +* code: 400 +* description: The refund amount entered is less than . +* solution: Enter an amount of at least . + +The payment has been fully refunded already. +* code: 400 +* description: The `payment_id` has already been refunded fully. +* solution: Use a `payment_id` that has not been fully refunded. + +Different request with the same idempotency key has already been processed. +* code: 409 +* description: Another refund request with different parameters has been processed using the same idempotency key. +* solution: Use a unique idempotency key for the new request and retry. + +Another request with the same idempotency key is still in progress. +* code: 409 +* description: A refund request with the same idempotency key is currently being processed and has not yet returned a response. +* solution: Wait for the previous request to complete or use a different idempotency key. + +Internal server error - Failed to fetch idempotency record +* code: 500 +* description: The server encountered an error while retrieving the idempotency record. +* solution: Retry the request after some time. If the issue persists, contact [Razorpay Support](https://razorpay.com/support). + +Internal server error - Failed to parse request body +* code: 500 +* description: The server failed to parse the request body to generate the request hash. +* solution: Ensure the request body is properly formatted as valid JSON. If the issue persists, contact [Razorpay Support](https://razorpay.com/support). + +The idempotency key must be at least 10 characters long. +* code: 400 +* description: The idempotency key provided is less than 10 characters in length. +* solution: Use an idempotency key that is at least 10 characters long. + +The idempotency key must only contain alphanumeric characters, underscores, and hyphens +* code: 400 +* description: The idempotency key contains invalid special characters. +* solution: Ensure the idempotency key only contains alphanumeric characters (A-Z, a-z, 0-9), underscores (_), and hyphens (-). + +Merchant id not found in authentication +* code: 500 +* description: The request contains an idempotency key but the merchant authentication is invalid or missing. +* solution: Ensure you are using valid API credentials (Key ID and Key Secret) for authentication. If the issue persists, contact [Razorpay Support](https://razorpay.com/support). diff --git a/llm-content/api/refunds/update.md b/llm-content/api/refunds/update.md new file mode 100644 index 00000000..5e41f95b --- /dev/null +++ b/llm-content/api/refunds/update.md @@ -0,0 +1,239 @@ +--- +title: Update a Refund +description: Update a Refund using Razorpay Refunds API. +--- + +# Update a Refund + +## Update a Refund + +Use this endpoint to update the `notes` parameter for a refund. You can modify an existing refund to update the `notes` field **only**. +- Notes can be used to record additional information about the payment. +- You can add up to 15 key-value pairs with each value of the key not exceeding 256 characters. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PATCH https://api.razorpay.com/v1/refunds/rfnd_DfjjhJC6eDvUAi \ +-H 'Content-Type: application/json' \ +-d '{ + "notes": { + "notes_key_1":"Beam me up Scotty.", + "notes_key_2":"Engage" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String refundId = "rfnd_DfjjhJC6eDvUAi"; + +JSONObject refundRequest = new JSONObject(); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +refundRequest.put("notes",notes); + +Refund refund = razorpay.refunds.edit(refundId,refundRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->refund->fetch($refundId)->edit(array('notes'=> array('notes_key_1'=>'Beam me up Scotty.', 'notes_key_2'=>'Engage'))); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.refund.edit(refundId,{ + "notes": { + "notes_key_1": "Beam me up Scotty.", + "notes_key_2": "Engage" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "notes": map[string]interface{}{ + "notes_key_1":"Beam me up Scotty.", + "notes_key_2":"Engage", + }, +} + +body, err := client.Refund.Update("", data, nil) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.refunds.edit(refundId,{ + "notes": { + "notes_key_1": "Beam me up Scotty.", + "notes_key_2": "Engage" + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +refundId = "rfnd_DfjjhJC6eDvUAi" + +para_attr = { + "notes": { + "notes_key_1": "Beam me up Scotty.", + "notes_key_2": "Engage" + } +} + +Razorpay::Refund.fetch(refundId).edit(para_attr) + +```csharp: .NET +//initialize the SDK client +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string refundId = "rfnd_Z6t7VFTb9xHeOs"; + +Dictionary refundRequest = new Dictionary(); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot update"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +refundRequest.Add("notes", notes); + +Refund refund = client.Refund.Fetch(refundId).Edit(refundRequest); +``` + +### Response + +```json: Success +{ + "id": "`rfnd_DfjjhJC6eDvUAi`", + "entity": "refund", + "amount": 300100, + "currency": "INR", + "payment_id": "pay_FIKOnlyii5QGNx", + "notes": { + "notes_key_1": "Beam me up Scotty.", + "notes_key_2": "Engage" + }, + "receipt": null, + "acquirer_data": { + "arn": "10000000000000" + }, + "created_at": 1597078124, + "batch_id": null, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "optimum" +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "{rfnd_id} is not a valid id", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` Unique identifier of the refund for which the `notes` field should be updated. + +### Parameters + +`notes` _mandatory_ +: `json object` Additional information to be modified or added as part of `notes` field in key-pair format. Know more about [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). + +### Parameters + +`id` +: `string` The unique identifier of the refund. For example, `rfnd_FgRAHdNOM4ZVbO`. + +`entity` +: `string` Indicates the type of entity. Here, it is `refund`. + +`amount` +: `integer` The amount to be refunded (in the smallest unit of currency). + For example, if the refund value is , it will be `3000`. + +`currency` +: `string` The currency of payment amount for which the refund is initiated. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`payment_id` +: `string` The unique identifier of the payment for which a refund is initiated. For example, `pay_FgR9UMzgmKDJRi`. + +`created_at` +: `integer` Unix timestamp at which the refund was created. For example, `1600856650`. + +`batch_id` +: `string` This parameter is populated if the refund was created as part of a batch upload. For example, `batch_00000000000001`. + +`notes` +: `json object` Key-value store for storing your reference data. A maximum of 15 key-value pairs can be included. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A unique identifier provided by you for your internal reference. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + +`status` +: `string` Indicates the state of the refund. Possible values: + - `pending`: This state indicates that Razorpay is attempting to process the refund. + - `processed`: This is the final state of the refund. + - `failed`: A refund can attain the failed state in the following scenarios: + + - Normal refund is not possible for a payment which is more than 6 months old. + + - Instant Refund can sometimes fail because of customer's account or bank-related issues. + +`speed_requested` +: `string` The processing mode of the refund seen in the refund response. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. +Possible values: + - `normal`: Indicates that the refund will be processed via the normal speed. The refund will take 5-7 working days. + - `optimum`: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. + - If the refund can be processed instantly, Razorpay will do so, irrespective of the payment method used to make the payment. + - If an instant refund is not possible, Razorpay will initiate a refund that is processed at the normal speed. + +`speed_processed` +: `string` This is a parameter in the response which describes the mode used to process a refund. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. Possible values: + - `instant`: Indicates that the refund has been processed instantly via fund transfer. + - `normal`: Indicates that the refund has been processed by the payment processing partner. The refund will take 5-7 working days. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The requested URL was not found on the server. +* code: 400 +* description: Possible reasons: - A PATCH API is executed by POST method. +- The URL is wrong or is missing something. +- The refund id is not entered. + +* solution: - Use the correct method, that is, PATCH. +- Ensure that the URL is correct and complete. +- Use a valid refund id. + +\{rfnd_id\} is not a valid id +* code: 400 +* description: The refund id entered is invalid or incomplete. +* solution: Use a valid and complete refund id. + +The notes field is required +* code: 400 +* description: The request body does not include the `notes` parameter. +* solution: Ensure you enter the `notes` parameter in the request body. diff --git a/llm-content/api/sandbox-setup.md b/llm-content/api/sandbox-setup.md new file mode 100644 index 00000000..224514ad --- /dev/null +++ b/llm-content/api/sandbox-setup.md @@ -0,0 +1,113 @@ +--- +title: API Sandbox Setup +description: Sandbox setup for testing Razorpay APIs. +--- + +# API Sandbox Setup + +The Razorpay Sandbox environment allows you to test your integration without using real money. It is a crucial step before going live with your Razorpay integration. + +## Steps + +Follow these steps to set up the sandbox environment. + + +### 1. Generate API Keys + + Follow these [steps to generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + + +### 2. Use Sandbox URL & Client Libraries + + The base URL for the Razorpay Sandbox and production API is the same - `https://api.razorpay.com/v1/`. In case of certain APIs, it is `https://api.razorpay.com/v2`. + + For testing APIs in the sandbox environment, use the test API keys. + + How you use them depends on the programming language and the Razorpay SDK you are using. Refer to the relevant SDK documentation for specific instructions. The SDK documentation will have clear examples of how to initialise the Razorpay client with your Key ID and Key Secret. + + **Client Libraries** + + For Razorpay Payments, the client SDK libraries are available on GitHub. You can use the API keys generated above to try out the API sample codes: + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + + + + +### 3. Go live + + After testing is complete, generate [Live API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#live-mode-api-keys) from the dashboard. Ensure to replace the Test API keys in your integration with the Live API keys before going live. You can accept real money payments using the Live API Keys. + + +### Related Information + +- [Understand Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md) +- [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) +- [Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/best-practices.md) +- [Glossary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/glossary.md) diff --git a/llm-content/api/settlements.md b/llm-content/api/settlements.md new file mode 100644 index 00000000..490431ce --- /dev/null +++ b/llm-content/api/settlements.md @@ -0,0 +1,16 @@ +--- +title: Settlements +description: Fetch Settlements and Settlements Recon information using Razorpay APIs. +--- + +# Settlements + +Razorpay [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md) is the process in which the money received from your customers is settled to your bank account. You can manage settlements using APIs or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/dashboard.md). + +Captured payments are automatically settled to the bank account submitted to us as part of your KYC verification as per your [settlement cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md#settlement-cycle). + + Fork the Razorpay Postman Public Workspace and try the Settlements APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + +### Related Guides + +[About Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md) diff --git a/llm-content/api/settlements/entity.md b/llm-content/api/settlements/entity.md new file mode 100644 index 00000000..59c9b4f5 --- /dev/null +++ b/llm-content/api/settlements/entity.md @@ -0,0 +1,52 @@ +--- +title: Settlements Entity +description: Know about the settlements entity parameters and their descriptions. +--- + +# Settlements Entity + +The Settlements entity has the following parameters: + +### Response + +```json: Entity +{ + "id":"setl_7IZKKI4Pnt2kEe", + "entity":"settlement", + "amount":50000, + "status":"processed", + "fees":0, + "tax":0, + "utr":"1597813219e1pq6w", + "created_at":1509622307 +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the settlement transaction. For example, `setl_7IZKKI4Pnt2kEe` + +`entity` +: `string` Indicates the type of entity. Here, it is `settlement`. + +`amount` +: `integer` The amount to be settled (in the smallest unit of currency). For example, will be `50000`. + +`status` +: `string` Indicates the [state of the settlement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md#settlement-states). Possible values: + - `created` + - `processed` + - `failed` + +`fees` +: `integer` This is the total fee charged for processing all payments received from customers settled to you in this settlement transaction. In case of a normal settlement the fee charge will be `0`. + +`tax` +: `integer` The total tax, in currency subunits, charged on the fees collected to process all payments received from customers settled to you in this settlement transaction. In case of a normal settlement the tax charge will be `0`. + +`utr` +: `string` The Unique Transaction Reference (UTR) number available across banks, which can be used to track a particular settlement in your bank account. For example, `1597813219e1pq6w`. + +`created_at` +: `integer` Unix timestamp at which the settlement transaction was created. diff --git a/llm-content/api/settlements/fetch-all.md b/llm-content/api/settlements/fetch-all.md new file mode 100644 index 00000000..ec9d03f2 --- /dev/null +++ b/llm-content/api/settlements/fetch-all.md @@ -0,0 +1,176 @@ +--- +title: Fetch All Settlements +description: Fetch All Settlements using Razorpay Settlements API. +--- + +# Fetch All Settlements + +## Fetch All Settlements + +Use this endpoint to retrieve details of all settlements. + +### Request + +```cURL: Curl +curl -u :\ +- X GET \ +https://api.razorpay.com/v1/settlements/ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +List settlements = razorpay.settlement.fetchAll(); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.settlement.all(options) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->settlement->all($options); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.settlements.all(options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = {"count": 2} + +Razorpay::Settlement.all(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +options:= map[string]interface{}{ + "count": 2, + "skip": 1, +} +body, err := client.Settlement.All(options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +List payment = client.Settlement.All(); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "setl_DGlQ1Rj8os78Ec", + "entity": "settlement", + "amount": 9973635, + "status": "processed", + "fees": 0, + "tax": 0, + "utr": "1568176960vxp0rj", + "created_at": 1568176960 + }, + { + "id": "setl_4xbSwsPABDJ8oK", + "entity": "settlement", + "amount": 50000, + "status": "processed", + "fees": 0, + "tax": 0, + "utr": "RZRP173069230702", + "created_at": 1509622306 + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The count must be at least 1.", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "count" + } +} +``` + +### Parameters + +`from` _optional_ +: `integer` Unix timestamp (in seconds) from when settlements are to be fetched. + +`to` _optional_ +: `integer` Unix timestamp (in seconds) till when settlements are to be fetched. + +`count` _optional_ +: `integer` Number of settlement records to be fetched. + - Default value: `10`. + - Possible value: `1` to `100`. + - This can be used for pagination, in combination with `skip`. + +`skip` _optional_ +: `integer` Number of settlement records to be skipped. + - Default value: `0` + - This can be used for pagination, in combination with `count`. + +### Parameters + + `id` +: `string` The unique identifier of the settlement transaction. For example, `setl_7IZKKI4Pnt2kEe` + +`entity` +: `string` Indicates the type of entity. Here, it is `settlement`. + +`amount` +: `integer` The amount to be settled (in the smallest unit of currency). For example, will be `50000`. + +`status` +: `string` Indicates the [settlement states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md#settlement-states). Possible values: + - `created` + - `processed` + - `failed` + +`fees` +: `integer` This is the total fee charged for processing all payments received from customers settled to you in this settlement transaction. In case of a normal settlement the fee charge will be `0`. + +`tax` +: `integer` The total tax, in currency subunits, charged on the fees collected to process all payments received from customers settled to you in this settlement transaction. In case of a normal settlement the tax charge will be `0`. + +`utr` +: `string` The Unique Transaction Reference (UTR) number available across banks, which can be used to track a particular settlement in your bank account. For example, `1597813219e1pq6w`. + +`created_at` +: `integer` Unix timestamp at which the settlement transaction was created. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +from must be between 946684800 and 4765046400. +* code: 400 +* description: The `from` UNIX timestamp is not between `946684800` and `4765046400`. +* solution: Use a valid UNIX timestamp between `946684800` and `4765046400`. + +to must be between 946684800 and 4765046400. +* code: 400 +* description: The `to` UNIX timestamp is not between `946684800` and `4765046400`. +* solution: Use a valid UNIX timestamp between `946684800` and `4765046400`. + +The count must be at least 1. +* code: 400 +* description: The count passed is `0`. +* solution: Ensure that count is at least `1`. diff --git a/llm-content/api/settlements/fetch-recon.md b/llm-content/api/settlements/fetch-recon.md new file mode 100644 index 00000000..0b4ec1ec --- /dev/null +++ b/llm-content/api/settlements/fetch-recon.md @@ -0,0 +1,366 @@ +--- +title: Fetch Settlement Recon Details +description: Settlement Recon using Razorpay Settlements API. +--- + +# Fetch Settlement Recon Details + +## Fetch Settlement Recon Details + +Use this endpoint to return a list of all transactions such as payments, refunds, transfers and adjustments settled to your account on a particular day or month. In the example request and response, we are fetching the settlement report for a particular day, that is `11/06/2022`. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET \ +https://api.razorpay.com/v1/settlements/recon/combined?year=2022&month=06&day=11 \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("year", 2022); +params.put("month", 6); +params.put("day",11); + +List settlements = razorpay.settlement.reports(params); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.settlement.report({ + "year": 2022, + "month": 06, + "day": 11 +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->settlement->settlementRecon(array('year' => 2022, 'month' => 06, 'day'=>11)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.settlements.settlementRecon({ + "year": 2022, + "month": 06, + "day": 11 +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "year": 2022, + "month": 6, + "day":11 +} +Razorpay::Settlement.reports(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "year": 2022, + "month": 6, +} +body, err := client.Settlement.Reports(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary settlementRequest = new Dictionary(); +settlementRequest.Add("year", "2022"); +settlementRequest.Add("month", "6"); +settlementRequest.Add("day", "11"); + +List settlement = client.Settlement.Reports(settlementRequest); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 4, + "items": [ + { + "entity_id": "pay_DEXrnipqTmWVGE", + "type": "payment", + "debit": 0, + "credit": 97100, + "amount": 100000, + "currency": "INR", + "fee": 2900, + "tax": 0, + "on_hold": false, + "settled": true, + "created_at": 1567692556, + "settled_at": 1568176960, + "settlement_id": "setl_DGlQ1Rj8os78Ec", + "posted_at": null, + "credit_type": "default", + "description": "Recurring Payment via Subscription", + "notes": "Beam me up Scotty.", + "payment_id": null, + "settlement_utr": "1568176960vxp0rj", + "order_id": "order_DEXrnRiR3SNDHA", + "order_receipt": null, + "method": "card", + "card_network": "MasterCard", + "card_issuer": "KARB", + "card_type": "credit", + "dispute_id": null + }, + { + "entity_id": "rfnd_DGRcGzZSLyEdg1", + "type": "refund", + "debit": 242500, + "credit": 0, + "amount": 242500, + "currency": "INR", + "fee": 0, + "tax": 0, + "on_hold": false, + "settled": true, + "created_at": 1568107224, + "settled_at": 1568176960, + "settlement_id": "setl_DGlQ1Rj8os78Ec", + "posted_at": null, + "credit_type": "default", + "description": null, + "notes": "Beam me up Scotty.", + "payment_id": "pay_DEXq1pACSqFxtS", + "settlement_utr": "1568176960vxp0rj", + "order_id": "order_DEXpmZgffXNvuI", + "order_receipt": null, + "method": "card", + "card_network": "MasterCard", + "card_issuer": "KARB", + "card_type": "credit", + "dispute_id": null + }, + { + "entity_id": "trf_DEUoCEtdsJgvl7", + "type": "transfer", + "debit": 100296, + "credit": 0, + "amount": 100000, + "currency": "INR", + "fee": 296, + "tax": 46, + "on_hold": false, + "settled": true, + "created_at": 1567681786, + "settled_at": 1568176960, + "settlement_id": "setl_DGlQ1Rj8os78Ec", + "posted_at": null, + "credit_type": "default", + "description": null, + "notes": null, + "payment_id": "pay_DEApNNTR6xmqJy", + "settlement_utr": "1568176960vxp0rj", + "order_id": null, + "order_receipt": null, + "method": null, + "card_network": null, + "card_issuer": null, + "card_type": null, + "dispute_id": null + }, + { + "entity_id": "adj_EhcHONhX4ChgNC", + "type": "adjustment", + "debit": 0, + "credit": 1012, + "amount": 1012, + "currency": "INR", + "fee": 0, + "tax": 0, + "on_hold": false, + "settled": true, + "created_at": 1567681786, + "settled_at": 1568176960, + "settlement_id": "setl_DGlQ1Rj8os78Ec", + "posted_at": null, + "description": "test reason", + "notes": null, + "payment_id": null, + "settlement_utr": null, + "order_id": null, + "order_receipt": null, + "method": null, + "card_network": null, + "card_issuer": null, + "card_type": null, + "dispute_id": null + } + ] +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The month is not a valid month.", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "month" + } +} +``` + +### Parameters + +`year` _mandatory_ +: `integer` The year the settlement was received in the `YYYY` format. For example, `2022`. + +`month` _mandatory_ +: `integer` The month the settlement was received in the `MM` format. For example, `06`. + +`day` _optional_ +: `integer` The date on which the settlement was received in the `DD` format. For example, `11`. + +`count` _optional_ +: `integer` Specifies the number of available settlements to be fetched. Possible values: `1` to `1000`. + +`skip` _optional_ +: `integer` Specifies the number of available settlements to be skipped when fetching a count. + +### Parameters + +`entity_id` +: `string` The unique identifier of the transaction that has been settled. + +`type` +: `string` Indicates the type of transaction. Possible values: + - `payment` + - `refund` + - `transfer` + - `adjustment` + +`debit` +: `integer` The amount, in currency subunits, that has been debited from your account. + +`credit` +: `integer` The amount, in currency subunits, that has been credited to your account. + +`amount` +: `integer` The total amount, in currency subunits, debited or credited from your account. + +`currency` +: `string` The 3-letter ISO currency code for the transaction. + +`fee` +: `integer` The fees, in currency subunits, charged to process the transaction. + +`tax` +: `integer` The tax on the fee, in currency subunits, charged to process the transaction. + +`on_hold` +: `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: The settlement for transfer is on hold. + - `false`: The settlement for transfer is released. + +`settled` +: `boolean` Indicates whether the transaction has been settled or not. Possible values: + - `true` + - `false` + +`created_at` +: `integer` Unix timestamp at which the transaction was created. + +`settled_at` +: `integer` Unix timestamp when the transaction was settled. + +`settlement_id` +: `string` The unique identifier of the settlement transaction. + +`description` +: `string` Brief description about the transaction. + +`notes` +: `object` Notes for the transaction. For example, `Beam me up Scotty.` + +`payment_id` +: `string` The unique identifier of the payment linked to `refund` or `transfer` that has been settled. For example, `pay_DEApNNTR6xmqJy`. It is `null` for `payments`. + +`settlement_utr` +: `string` The unique reference number linked to the settlement. For example, `KKBKH14156891582`. + +`order_id` +: `string` Order id linked to the payment made by the customer that has been settled. For example, `order_DEXrnRiR3SNDHA`. + +`order_receipt` +: `string` Receipt number entered while [creating the Order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#create-an-order). + +`method` +: `string` The payment method used to complete the payment. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`card_network` +: `string` The card network used to process the payment. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Visa` + - `unknown` + +`card_issuer` +: `string` This is a 4-character code denoting the issuing bank. For example, `KARB`. + + This attribute will not be set for international cards, that is, for cards issued by foreign banks. + +`card_type` +: `string` The card type used to process the payment. Possible values: + - `credit` + - `debit` + +`dispute_id` +: `string` The unique identifier of any dispute, if any, for this transaction. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The year must be 4 digits. +* code: 400 +* description: An invalid year is entered. +* solution: Ensure that the year has exactly 4 digits. + +The month is not a valid month. +* code: 400 +* description: An invalid month is entered. +* solution: Enter a valid month between `01` and `12`. + +The day must be between 1 and 2 digits. +* code: 400 +* description: An invalid day is entered. +* solution: Ensure that the day has only 1 or 2 digits. Possible values: `1` to `31`. + +The count must be at least 1. +* code: 400 +* description: The count passed is `0`. +* solution: Ensure that count is at least `1`. diff --git a/llm-content/api/settlements/fetch-with-id.md b/llm-content/api/settlements/fetch-with-id.md new file mode 100644 index 00000000..5d8f9bee --- /dev/null +++ b/llm-content/api/settlements/fetch-with-id.md @@ -0,0 +1,135 @@ +--- +title: Fetch Settlements With ID +description: Fetch Settlements with Razorpay Settlements id. +--- + +# Fetch Settlements With ID + +## Fetch Settlements With ID + +Use this endpoint to retrieve details of a settlement with its id. + +### Request + +```cURL: Curl +curl -u :\ +- X GET \ +https://api.razorpay.com/v1/settlements/setl_DGlQ1Rj8os78Ec + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String settlementId = "setl_DGlQ1Rj8os78Ec"; + +Settlement settlement = razorpay.settlement.fetch(settlementId); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) +The following endpoint retrieves the +client.settlement.fetch(settlementId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->settlement->fetch($settlementId); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.settlements.fetch(settlementId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +settlementId = "setl_DGlQ1Rj8os78Ec" + +Razorpay::Settlement.fetch(settlementId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Settlement.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string settlementId = "setl_Z6t7VFTb9xXXXX"; + +Settlement settlement = client.Settlement.Fetch(settlementId); +``` + +### Response + +```json: Success +{ + "id": "setl_DGlQ1Rj8os78Ec", + "entity": "settlement", + "amount": 9973635, + "status": "processed", + "fees": 0, + "tax": 0, + "utr": "1568176960vxp0rj", + "created_at": 1568176960 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier of the settlement to be retrieved. + +### Parameters + + `id` +: `string` The unique identifier of the settlement transaction. For example, `setl_7IZKKI4Pnt2kEe` + +`entity` +: `string` Indicates the type of entity. Here, it is `settlement`. + +`amount` +: `integer` The amount to be settled (in the smallest unit of currency). For example, will be `50000`. + +`status` +: `string` Indicates the [settlement states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md#settlement-states). Possible values: + - `created` + - `processed` + - `failed` + +`fees` +: `integer` This is the total fee charged for processing all payments received from customers settled to you in this settlement transaction. In case of a normal settlement, the fee charge will be `0`. + +`tax` +: `integer` The total tax, in currency subunits, charged on the fees collected to process all payments received from customers settled to you in this settlement transaction. In case of a normal settlement, the tax charge will be `0`. + +`utr` +: `string` The Unique Transaction Reference (UTR) number available across banks, which can be used to track a particular settlement in your bank account. For example, `1597813219e1pq6w`. + +`created_at` +: `integer` Unix timestamp at which the settlement transaction was created. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The id provided does not exist. +* code: 400 +* description: The settlement id does not belong to the requestor or does not exist. +* solution: Use a valid settlement id that belongs to the requestor. diff --git a/llm-content/api/settlements/instant.md b/llm-content/api/settlements/instant.md new file mode 100644 index 00000000..aa386b10 --- /dev/null +++ b/llm-content/api/settlements/instant.md @@ -0,0 +1,52 @@ +--- +title: API | Instant Settlements +heading: Instant Settlements +description: Check Razorpay Capital Instant Settlement APIs (On-demand Settlement APIs). +--- + +# Instant Settlements + +This section has information on APIs used as part of Razorpay Capital. With [Instant Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/instant.md) (earlier known as On-demand Settlement APIs), you get access to your funds as and when you want. You can manage Instant Settlements using APIs or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/instant.md#initiate-an-instant-settlement). + + + + + + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> + + Fork the Razorpay Postman Public Workspace and try the Instant Settlements APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-dbf2da3b-c795-4e57-b910-cf9a838ee5ea) + + +### Related Guides + +[About Instant Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/instant.md) + +### Endpoints + + - **post** `https://api.razorpay.com/v1/settlements/ondemand` - Create an Instant Settlement: + Creates an instant settlement. + + + - **get** `/v1/settlements/ondemand` - Fetch All Instant Settlements: + Retrieves all instant settlements. + + + - **get** `/v1/settlements/ondemand/:setlod_id` - Fetch Instant Settlement With ID: + Retrieves instant settlements using id. + + + - **get** `/v1/settlements/ondemand/?expand[]=ondemand_payouts` - Fetch All Instant Settlements With Payout Details: + Retrieves payout details as part of the response for all instant settlements. + + + - **get** `/v1/settlements/ondemand/:id?expand[]=ondemand_payouts` - Fetch Instant Settlement With ID With Payout Details: + Retrieves payout details as part of the response for a specific instant settlement. diff --git a/llm-content/api/settlements/instant/create.md b/llm-content/api/settlements/instant/create.md new file mode 100644 index 00000000..28ada0ff --- /dev/null +++ b/llm-content/api/settlements/instant/create.md @@ -0,0 +1,313 @@ +--- +title: Create an Instant Settlement +description: Create an Instant Settlement using Razorpay Payments API. +--- + +# Create an Instant Settlement + +## Create an Instant Settlement + +Use this endpoint to create an Instant Settlement. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/settlements/ondemand \ +-H "content-type: application/json" \ +-d '{ + "amount": 200000, + "settle_full_balance": false, + "description": "Need this to make vendor payments.", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject settlementRequest = new JSONObject(); +settlementRequest.put("amount", 200000); +settlementRequest.put("settle_full_balance", false); +settlementRequest.put("description", "Need this to make vendor payments."); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +settlementRequest.put("notes", notes); + +Settlement settlement = razorpay.settlement.create(settlementRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.settlement.create_ondemand_settlement({ + "amount": 200000, + "settle_full_balance": False, + "description": "Need this to make vendor payments.", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "amount": 200000, + "settle_full_balance": false, + "description": "Need this to make vendor payments.", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} +body, err := client.Settlement.CreateOnDemandSettlement(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->settlement->createOndemandSettlement(array("amount"=> 200000, "settle_full_balance"=> false, "description"=>"Need this to make vendor payments.","notes" => array("notes_key_1"=> "Tea, Earl Grey, Hot","notes_key_2"=> "Tea, Earl Grey… decaf."))); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +param_attr = { + "amount": 200000, + "settle_full_balance": 0, + "description": "Need this to make vendor payments.", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} +Razorpay::Settlement.create(param_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.settlements.createOndemandSettlement({ + "amount": 200000, + "settle_full_balance": false, + "description": "Need this to make vendor payments.", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary settlementRequest = new Dictionary(); +settlementRequest.Add("amount", 100); +settlementRequest.Add("settle_full_balance", false); +settlementRequest.Add("description", "Testing"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey� decaf."); +settlementRequest.Add("notes", notes); + +Settlement settlement = client.Settlement.Create(settlementRequest); +``` + +### Response + +```json: Success +{ + "id": "setlod_FNj7g2YS5J67Rz", + "entity": "settlement.ondemand", + "amount_requested": 200000, + "amount_settled": 0, + "amount_pending": 199410, + "amount_reversed": 0, + "fees": 590, + "tax": 90, + "currency": "INR", + "settle_full_balance": false, + "status": "initiated", + "description": "Need this to make vendor payments.", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1596771429, + "ondemand_payouts": { + "entity": "collection", + "count": 1, + "items": [ + { + "id": "setlodp_FNj7g2cbvw8ueO", + "entity": "settlement.ondemand_payout", + "initiated_at": null, + "processed_at": null, + "reversed_at": null, + "amount": 200000, + "amount_settled": null, + "fees": 590, + "tax": 90, + "utr": null, + "status": "created", + "created_at": 1596771429 + } + ] + } +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Minimum amount that can be settled is ₹ 1.", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`amount` _mandatory_ +: `integer` The amount, in paise, you want to instantly settle. + + + +> **SUCCESS** +> +> +> **What's New** +> +> Settlement amounts of ₹1 or lower are now supported. +> +> + + + +`settle_full_balance` _optional_ +: `boolean` Indicates whether full balance is settled. Possible values: + - `true`: Razorpay will settle the maximum amount possible. Values passed in the `amount` parameter are ignored. + - `false` (default): Razorpay will settle the amount requested in the `amount` parameter. + +`description` _optional_ +: `string` This is a custom note you can pass for the instant settlement for your reference. For example, `Need this to make vendor payments.`. + - Maximum length: 30 characters. + - Allowed characters: a-z, A-Z, 0-9 and space. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `Beam me up Scotty`. + +### Parameters + +`id` +: `string` The unique identifier of the instant settlement transaction. For example, `setlod_FNj7g2YS5J67Rz`. + +`entity` +: `string` Indicates the type of entity. Here it is `settlement.ondemand`. + +`amount_requested` +: `integer` The settlement amount, in paise, requested by you. For example, `200000`. + +`amount_settled` +: `integer` Total amount (minus fees and tax), in paise, settled to the bank account. For example, `199410`. + +`amount_pending` +: `integer` Portion of the requested amount, in paise, yet to be settled to you. + +`amount_reversed` +: `integer` Portion of the requested amount, in paise, that was not settled to you. This amount is reversed to your PG current balance. + +`fees` +: `integer` Total amount (fees+tax), in paise, deducted for the instant settlement. For example, `590`. + +`tax` +: `integer` Total tax, in paise, charged for the fee component. For example, `90`. + +`currency` +: `string` The 3-letter ISO currency code for the settlement. Here it is `INR`. + +`settle_full_balance` +: `boolean` Indicates whether full balance is settled. Possible values: + - `true`: Razorpay will settle the maximum amount possible. Values passed in the `amount` parameter are ignored. + - `false` (default): Razorpay will settle the amount requested in the `amount` parameter. + +`status` +: `string` Indicates the state of the instant settlement. Possible values: + - `created`: The instant settlement request has been created. + - `initiated`: The instant settlement process has been initiated. + - `partially_processed`: The instant settlement is being processed. + - `processed`: The instant settlement has been processed and the amount has been transferred to your bank account. + - `reversed`: The instant settlement could not be processed for some reason and the amount has been transferred back to your PG balance. + +`description` +: `string` This is a custom note you can pass for the instant settlement for your reference. For example, `Need this to make vendor payments.`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Unix timestamp at which the instant settlement was created. For example, `1596771429`. + +`ondemand_payouts` +: `object` List of payouts created for the instant settlement. + + `entity` + : `string` Indicates the type of `ondemand_payouts` entity. Here it is `collection`. + + `count` + : `integer` The number of items in the array. For example, `1`. + + `items` + : `array` List of payouts created for the instant settlement. + + `id` + : `string` The unique identifier for the payout. For example, `setlodp_FNj7g2cbvw8ueO`. + + `entity` + : `string` Indicates the type of `items` entity. Here it is `settlement.ondemand_payout`. + + `initiated_at` + : `integer` Unix timestamp at which the payout was initiated. For example, `1596771430`. + + `processed_at` + : `integer` Unix timestamp at which the payout was processed. For example, `1596778752`. + + `reversed_at` + : `integer` Unix timestamp at which the payout was reversed. For example, `1596778752`. + + `amount` + : `integer` The amount, in paise, settled through this payout. For example, `200000`. + + `amount_settled` + : `integer` Amount (minus fees and tax), in paise, settled through this payout. For example, `199410`. + + `fees` + : `integer` Amount (fees+tax), in paise, deducted for this payout. For example, `590`. + + `tax` + : `integer` Tax charged, in paise, for the fee component. For example, `90`. + + `utr` + : `string` The unique transaction number linked to a payout. + + `status` + : `string` Status of the payout. Possible values: + - `created`: The payout has been created. + - `initiated`: The payout has been initiated. + - `processed`: The payout has been processed. The amount has been transferred to your bank account. + - `reversed`: The payout has been reversed. The amount has been transferred back to your PG balance. + + `created_at` + : `integer` Unix timestamp at which the payout was created. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. diff --git a/llm-content/api/settlements/instant/entity.md b/llm-content/api/settlements/instant/entity.md new file mode 100644 index 00000000..64304d50 --- /dev/null +++ b/llm-content/api/settlements/instant/entity.md @@ -0,0 +1,155 @@ +--- +title: Instant Settlements Entity +description: Know about the instant settlements entity parameters and their descriptions. +--- + +# Instant Settlements Entity + +The Instant Settlements entity has the following parameters: + +### Response + +```json: Entity +{ + "id":"setlod_FNj7g2YS5J67Rz", + "entity":"settlement.ondemand", + "amount_requested":200000, + "amount_settled":0, + "amount_pending":199410, + "amount_reversed":0, + "fees":590, + "tax":90, + "currency":"INR", + "settle_full_balance":false, + "status":"initiated", + "description":"Need this to make vendor payments.", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1596771429, + "ondemand_payouts":{ + "entity":"collection", + "count":1, + "items":[ + { + "id":"setlodp_FNj7g2cbvw8ueO", + "entity":"settlement.ondemand_payout", + "initiated_at":null, + "processed_at":null, + "reversed_at":null, + "amount":200000, + "amount_settled":null, + "fees":590, + "tax":90, + "utr":null, + "status":"created", + "created_at":1596771429 + } + ] + } +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the instant settlement transaction. For example, `setlod_FNj7g2YS5J67Rz`. + +`entity` +: `string` Indicates the type of entity. Here it is `settlement.ondemand`. + +`amount_requested` +: `integer` The settlement amount, in paise, requested by you. For example, `200000`. + +`amount_settled` +: `integer` Total amount (minus fees and tax), in paise, settled to the bank account. For example, `199410`. + +`amount_pending` +: `integer` Portion of the requested amount, in paise, yet to be settled to you. + +`amount_reversed` +: `integer` Portion of the requested amount, in paise, that was not settled to you. This amount is reversed to your PG current balance. + +`fees` +: `integer` Total amount (fees+tax), in paise, deducted for the instant settlement. For example, `590`. + +`tax` +: `integer` Total tax, in paise, charged for the fee component. For example, `90`. + +`currency` +: `string` The 3-letter ISO currency code for the settlement. Here it is `INR`. + +`settle_full_balance` +: `boolean` Indicates whether Razorpay will settle maximum amount or not. Possible values: + - `true`: Razorpay will settle the maximum amount possible. Values passed in the `amount` parameter are ignored. + - `false` (default): Razorpay will settle the amount requested in the `amount` parameter. + +`status` +: `string` Indicates the state of the instant settlement. Possible values: + - `created`: The instant settlement request has been created. + - `initiated`: The instant settlement process has been initiated. + - `partially_processed`: The instant settlement is being processed. + - `processed`: The instant settlement has been processed and the amount has been transferred to your bank account. + - `reversed`: The instant settlement could not be processed for some reason and the amount has been transferred back to your PG balance. + +`description` +: `string` This is a custom note you can pass for the instant settlement for your reference. For example, `Need this to make vendor payments.`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Unix timestamp at which the instant settlement was created. For example, `1596771429`. + +`ondemand_payouts` +: `object` List of payouts created for the instant settlement. + + `entity` + : `string` Indicates the type of `ondemand_payouts` entity. Here it is `collection`. + + `count` + : `integer` The number of items in the array. For example, `1`. + + `items` + : `array` List of payouts created for the instant settlement. + + `id` + : `string` The unique identifier for the payout. For example, `setlodp_FNj7g2cbvw8ueO`. + + `entity` + : `string` Indicates the type of `items` entity. Here it is `settlement.ondemand_payout`. + + `initiated_at` + : `integer` Unix timestamp at which the payout was initiated. For example, `1596771430`. + + `processed_at` + : `integer` Unix timestamp at which the payout was processed. For example, `1596778752`. + + `reversed_at` + : `integer` Unix timestamp at which the payout was reversed. For example, `1596778752`. + + `amount` + : `integer` The amount, in paise, settled through this payout. For example, `200000`. + + `amount_settled` + : `integer` Amount (minus fees and tax), in paise, settled through this payout. For example, `199410`. + + `fees` + : `integer` Amount (fees+tax), in paise, deducted for this payout. For example, `590`. + + `tax` + : `integer` Tax charged, in paise, for the fee component. For example, `90`. + + `utr` + : `string` The unique transaction number linked to a payout. + + `status` + : `string` Status of the payout. Possible values: + - `created`: The payout has been created. + - `initiated`: The payout has been initiated. + - `processed`: The payout has been processed. The amount has been transferred to your bank account. + - `reversed`: The payout has been reversed. The amount has been transferred back to your PG balance. + + `created_at` + : `integer` Unix timestamp at which the payout was created. diff --git a/llm-content/api/settlements/instant/fetch-all-payout.md b/llm-content/api/settlements/instant/fetch-all-payout.md new file mode 100644 index 00000000..a2cb3d9b --- /dev/null +++ b/llm-content/api/settlements/instant/fetch-all-payout.md @@ -0,0 +1,313 @@ +--- +title: Fetch All Instant Settlements With Payout Details +description: Fetch All Instant Settlements with Payout Details using Razorpay Payments API. +--- + +# Fetch All Instant Settlements With Payout Details + +## Fetch All Instant Settlements With Payout Details + +Use this endpoint to retrieve payout details as part of the response for all instant settlements. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ +- X GET \ +https://api.razorpay.com/v1/settlements/ondemand?expand[]=ondemand_payouts + +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject option = new JSONObject(); +option("expand[], "ondemand_payouts"); + +List settlement = instance.settlement.fetchAllDemand(options); + +```ruby: Ruby + +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = {"expand[]": "ondemand_payouts"} + +Razorpay::Settlement.fetch_all_ondemand_settlement(para_attr) + +```php: PHP + +$api = new Api($key_id, $secret); + +$api->settlement->fetchAllOndemandSettlement(["expand[]"=> "ondemand_payouts"]); + +```javascript: Node.js + +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +options = {"expand[]": "ondemand_payouts"} + +instance.settlements.fetchAllOndemandSettlement(options) + +```python: Python + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +param = { + "expand[]": "ondemand_payouts" +} + +client.settlement.fetch_all_ondemand_settlement(options) + +```go: Go + +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +param:= map[string]interface{}{ + "expand[]": "ondemand_payouts", +} + +body, err := client.Settlement.FetchAllOnDemandSettlement(param, nil) + +```csharp: .NET + +RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + +Dictionary settlementRequest = new Dictionary(); +settlementRequest.Add("expand[]", "ondemand_payouts"); + +List settlement = client.Settlement.FetchAllDemand(settlementRequest); +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "setlod_FNj7g2YS5J67Rz", + "entity": "settlement.ondemand", + "amount_requested": 200000, + "amount_settled": 199410, + "amount_pending": 0, + "amount_reversed": 0, + "fees": 590, + "tax": 90, + "currency": "INR", + "settle_full_balance": false, + "status": "processed", + "description": "Need this to make vendor payments.", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey, decaf." + }, + "created_at": 1596771429, + "ondemand_payouts": { + "entity": "collection", + "count": 1, + "items": [ + { + "id": "setlodp_FNj7g2cbvw8ueO", + "entity": "settlement.ondemand_payout", + "initiated_at": 1596771430, + "processed_at": 1596778752, + "reversed_at": null, + "amount": 200000, + "amount_settled": 199410, + "fees": 590, + "tax": 90, + "utr": "022011173948", + "status": "processed", + "created_at": 1596771429 + } + ] + } + }, + { + "id": "setlod_FJOp0jOWlalIvt", + "entity": "settlement.ondemand", + "amount_requested": 300000, + "amount_settled": 299114, + "amount_pending": 0, + "amount_reversed": 0, + "fees": 886, + "tax": 136, + "currency": "INR", + "settle_full_balance": false, + "status": "processed", + "description": "Need this to buy stock.", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey, decaf." + }, + "created_at": 1595826576, + "ondemand_payouts": { + "entity": "collection", + "count": 1, + "items": [ + { + "id": "setlodp_FJOp0jTqoZdGen", + "entity": "settlement.ondemand_payout", + "initiated_at": 1595826577, + "processed_at": 1595826588, + "reversed_at": null, + "amount": 300000, + "amount_settled": 299114, + "fees": 886, + "tax": 136, + "utr": "020910199316", + "status": "processed", + "created_at": 1595826576 + } + ] + } + } + ] +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`expand[]=ondemand_payouts` _optional_ +: `string` Pass this if you want to fetch payout details as part of the response for all instant settlements. + +`from` _optional_ +: `integer` Unix timestamp (in seconds) from when instant settlements are to be retrieved. + +`to` _optional_ +: `integer` Unix timestamp (in seconds) till when instant settlements are to be retrieved. + +`count` _optional_ +: `integer` Number of instant settlement records to be retrieved. + - Default value: `10`. + - Possible values: `1` to `100`. + - This can be used for pagination, in combination with `skip`. + +`skip` _optional_ +: `integer` Number of instant settlement records to be skipped. + - Default value: `0`. + - This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` The unique identifier of the instant settlement transaction. For example, `setlod_FNj7g2YS5J67Rz`. + +`entity` +: `string` Indicates the type of entity. Here it is `settlement.ondemand`. + +`amount_requested` +: `integer` The settlement amount, in paise, requested by you. For example, `200000`. + +`amount_settled` +: `integer` Total amount (minus fees and tax), in paise, settled to the bank account. For example, `199410`. + +`amount_pending` +: `integer` Portion of the requested amount, in paise, yet to be settled to you. + +`amount_reversed` +: `integer` Portion of the requested amount, in paise, that was not settled to you. This amount is reversed to your PG current balance. + +`fees` +: `integer` Total amount (fees+tax), in paise, deducted for the instant settlement. For example, `590`. + +`tax` +: `integer` Total tax, in paise, charged for the fee component. For example, `90`. + +`currency` +: `string` The 3-letter ISO currency code for the settlement. Here it is `INR`. + +`settle_full_balance` +: `boolean` Possible values: + - `true`: Razorpay will settle the maximum amount possible. Values passed in the `amount` parameter are ignored. + - `false` (default): Razorpay will settle the amount requested in the `amount` parameter. + +`status` +: `string` Indicates the state of the instant settlement. Possible values: + - `created`: The instant settlement request has been created. + - `initiated`: The instant settlement process has been initiated. + - `partially_processed`: The instant settlement is being processed. + - `processed`: The instant settlement has been processed and the amount has been transferred to your bank account. + - `reversed`: The instant settlement could not be processed for some reason and the amount has been transferred back to your PG balance. + +`description` +: `string` This is a custom note you can pass for the instant settlement for your reference. For example, `Need this to make vendor payments.`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Unix timestamp at which the instant settlement was created. For example, `1596771429`. + +`ondemand_payouts` +: `object` List of payouts created for the instant settlement. + + `entity` + : `string` Indicates the type of `ondemand_payouts` entity. Here it is `collection`. + + `count` + : `integer` The number of items in the array. For example, `1`. + + `items` + : `array` List of payouts created for the instant settlement. + + `id` + : `string` The unique identifier for the payout. For example, `setlodp_FNj7g2cbvw8ueO`. + + `entity` + : `string` Indicates the type of `items` entity. Here it is `settlement.ondemand_payout`. + + `initiated_at` + : `integer` Unix timestamp at which the payout was initiated. For example, `1596771430`. + + `processed_at` + : `integer` Unix timestamp at which the payout was processed. For example, `1596778752`. + + `reversed_at` + : `integer` Unix timestamp at which the payout was reversed. For example, `1596778752`. + + `amount` + : `integer` The amount, in paise, settled through this payout. For example, `200000`. + + `amount_settled` + : `integer` Amount (minus fees and tax), in paise, settled through this payout. For example, `199410`. + + `fees` + : `integer` Amount (fees+tax), in paise, deducted for this payout. For example, `590`. + + `tax` + : `integer` Tax charged, in paise, for the fee component. For example, `90`. + + `utr` + : `string` The unique transaction number linked to a payout. + + `status` + : `string` Status of the payout. Possible values: + - `created`: The payout has been created. + - `initiated`: The payout has been initiated. + - `processed`: The payout has been processed. The amount has been transferred to your bank account. + - `reversed`: The payout has been reversed. The amount has been transferred back to your PG balance. + + `created_at` + : `integer` Unix timestamp at which the payout was created. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. diff --git a/llm-content/api/settlements/instant/fetch-all.md b/llm-content/api/settlements/instant/fetch-all.md new file mode 100644 index 00000000..41b5f57d --- /dev/null +++ b/llm-content/api/settlements/instant/fetch-all.md @@ -0,0 +1,230 @@ +--- +title: Fetch All Instant Settlements +description: Fetch All Instant Settlements using Razorpay Payments API. +--- + +# Fetch All Instant Settlements + +## Fetch All Instant Settlements + +Use this endpoint to retrieve the details of all Instant Settlements. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ +- X GET \ +https://api.razorpay.com/v1/settlements/ondemand + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +List settlement = razorpay.settlement.fetchAllDemand(options) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.settlement.fetch_all_ondemand_settlement(options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = {"count":1} + +Razorpay::Settlement.fetch_all_ondemand_settlement(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Settlement.FetchAllOnDemandSettlement(options, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->settlement->fetchAllOndemandSettlement($options); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.settlements.fetchAllOndemandSettlement(options) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +List settlement = client.Settlement.FetchAllDemand(); + +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "setlod_FNj7g2YS5J67Rz", + "entity": "settlement.ondemand", + "amount_requested": 200000, + "amount_settled": 199410, + "amount_pending": 0, + "amount_reversed": 0, + "fees": 590, + "tax": 90, + "currency": "INR", + "settle_full_balance": false, + "status": "processed", + "description": "Need this to make vendor payments.", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey, decaf." + }, + "created_at": 1596771429 + }, + { + "id": "setlod_FJOp0jOWlalIvt", + "entity": "settlement.ondemand", + "amount_requested": 300000, + "amount_settled": 299114, + "amount_pending": 0, + "amount_reversed": 0, + "fees": 886, + "tax": 136, + "currency": "INR", + "settle_full_balance": false, + "status": "processed", + "description": "Need this to buy stock.", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey, decaf." + }, + "created_at": 1595826576 + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the instant settlement transaction. For example, `setlod_FNj7g2YS5J67Rz`. + +`entity` +: `string` Indicates the type of entity. Here it is `settlement.ondemand`. + +`amount_requested` +: `integer` The settlement amount, in paise, requested by you. For example, `200000`. + +`amount_settled` +: `integer` Total amount (minus fees and tax), in paise, settled to the bank account. For example, `199410`. + +`amount_pending` +: `integer` Portion of the requested amount, in paise, yet to be settled to you. + +`amount_reversed` +: `integer` Portion of the requested amount, in paise, that was not settled to you. This amount is reversed to your PG current balance. + +`fees` +: `integer` Total amount (fees+tax), in paise, deducted for the instant settlement. For example, `590`. + +`tax` +: `integer` Total tax, in paise, charged for the fee component. For example, `90`. + +`currency` +: `string` The 3-letter ISO currency code for the settlement. Here it is `INR`. + +`settle_full_balance` +: `boolean` Possible values: + - `true`: Razorpay will settle the maximum amount possible. Values passed in the `amount` parameter are ignored. + - `false` (default): Razorpay will settle the amount requested in the `amount` parameter. + +`status` +: `string` Indicates the state of the instant settlement. Possible values: + - `created`: The instant settlement request has been created. + - `initiated`: The instant settlement process has been initiated. + - `partially_processed`: The instant settlement is being processed. + - `processed`: The instant settlement has been processed and the amount has been transferred to your bank account. + - `reversed`: The instant settlement could not be processed for some reason and the amount has been transferred back to your PG balance. + +`description` +: `string` This is a custom note you can pass for the instant settlement for your reference. For example, `Need this to make vendor payments.`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Unix timestamp at which the instant settlement was created. For example, `1596771429`. + +`ondemand_payouts` +: `object` List of payouts created for the instant settlement. + + `entity` + : `string` Indicates the type of `ondemand_payouts` entity. Here it is `collection`. + + `count` + : `integer` The number of items in the array. For example, `1`. + + `items` + : `array` List of payouts created for the instant settlement. + + `id` + : `string` The unique identifier for the payout. For example, `setlodp_FNj7g2cbvw8ueO`. + + `entity` + : `string` Indicates the type of `items` entity. Here it is `settlement.ondemand_payout`. + + `initiated_at` + : `integer` Unix timestamp at which the payout was initiated. For example, `1596771430`. + + `processed_at` + : `integer` Unix timestamp at which the payout was processed. For example, `1596778752`. + + `reversed_at` + : `integer` Unix timestamp at which the payout was reversed. For example, `1596778752`. + + `amount` + : `integer` The amount, in paise, settled through this payout. For example, `200000`. + + `amount_settled` + : `integer` Amount (minus fees and tax), in paise, settled through this payout. For example, `199410`. + + `fees` + : `integer` Amount (fees+tax), in paise, deducted for this payout. For example, `590`. + + `tax` + : `integer` Tax charged, in paise, for the fee component. For example, `90`. + + `utr` + : `string` The unique transaction number linked to a payout. + + `status` + : `string` Status of the payout. Possible values: + - `created`: The payout has been created. + - `initiated`: The payout has been initiated. + - `processed`: The payout has been processed. The amount has been transferred to your bank account. + - `reversed`: The payout has been reversed. The amount has been transferred back to your PG balance. + + `created_at` + : `integer` Unix timestamp at which the payout was created. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. diff --git a/llm-content/api/settlements/instant/fetch-with-id-payout.md b/llm-content/api/settlements/instant/fetch-with-id-payout.md new file mode 100644 index 00000000..88ff0283 --- /dev/null +++ b/llm-content/api/settlements/instant/fetch-with-id-payout.md @@ -0,0 +1,244 @@ +--- +title: Fetch Instant Settlement With ID and Payout Details +description: Fetch Instant Settlement with ID and Payout Details using Razorpay Payments API. +--- + +# Fetch Instant Settlement With ID and Payout Details + +## Fetch Instant Settlement With ID and Payout Details + +Use this endpoint to retrieve payout details as part of the response for a specific instant settlements. + +### Request + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ +- X GET \ +https://api.razorpay.com/v1/settlements/ondemand/setlod_FNj7g2YS5J67Rz?expand[]=ondemand_payouts + +```csharp: .NET + +RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + +Dictionary param = new Dictionary(); +param.Add("expand[]", "ondemand_payouts") + +string settlementId = "setlodp_Z6t7VFTb9xHeOs"; + +Settlement settlement = client.Settlement.FetchDemandSettlement(settlementId, param); + +```php: PHP + +$api = new Api($key_id, $secret); + +$settlementId = "setlod_MI0c34SIRVT25W"; + +$api->settlement->fetchOndemandSettlementById($settlementId,["expand[]"=> "ondemand_payouts"]); + +```javascript: Node.js + +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var settlementId = "setlod_FNj7g2YS5J67Rz"; + +instance.settlements.fetchOndemandSettlementById(settlementId, {"expand[]" : "ondemand_payouts"}); + +```python: Python + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +settlementId = "setlod_FNj7g2YS5J67Rz" +client.settlement.fetch_ondemand_settlement_id(settlementId, {"expand[]" : "ondemand_payouts"}) + +```go: Go + +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +param:= map[string]interface{}{ + "expand[]": "ondemand_payouts", +} + +body, err := client.Settlement.FetchOnDemandSettlementById("", param, nil) +``` + +### Response + +```json: Success +{ + "id": "setlod_FNj7g2YS5J67Rz", + "entity": "settlement.ondemand", + "amount_requested": 200000, + "amount_settled": 199410, + "amount_pending": 0, + "amount_reversed": 0, + "fees": 590, + "tax": 90, + "currency": "INR", + "settle_full_balance": false, + "status": "processed", + "description": "Need this to buy stock.", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey, decaf." + }, + "created_at": 1596771429, + "ondemand_payouts": { + "entity": "collection", + "count": 1, + "items": [ + { + "id": "setlodp_FNj7g2cbvw8ueO", + "entity": "settlement.ondemand_payout", + "initiated_at": 1596771430, + "processed_at": 1596778752, + "reversed_at": null, + "amount": 200000, + "amount_settled": 199410, + "fees": 590, + "tax": 90, + "utr": "022011173948", + "status": "processed", + "created_at": 1596771429 + } + ] + } +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier for the instant settlement transaction. For example, `setlod_FNj7g2YS5J67Rz`. + +### Parameters + +`expand[]=ondemand_payouts` _optional_ +: `string` Pass this if you want to fetch payout details as part of the response for a specific instant settlements. + +### Parameters + +`id` +: `string` The unique identifier of the instant settlement transaction. For example, `setlod_FNj7g2YS5J67Rz`. + +`entity` +: `string` Indicates the type of entity. Here it is `settlement.ondemand`. + +`amount_requested` +: `integer` The settlement amount, in paise, requested by you. For example, `200000`. + +`amount_settled` +: `integer` Total amount (minus fees and tax), in paise, settled to the bank account. For example, `199410`. + +`amount_pending` +: `integer` Portion of the requested amount, in paise, yet to be settled to you. + +`amount_reversed` +: `integer` Portion of the requested amount, in paise, that was not settled to you. This amount is reversed to your PG current balance. + +`fees` +: `integer` Total amount (fees+tax), in paise, deducted for the instant settlement. For example, `590`. + +`tax` +: `integer` Total tax, in paise, charged for the fee component. For example, `90`. + +`currency` +: `string` The 3-letter ISO currency code for the settlement. Here it is `INR`. + +`settle_full_balance` +: `boolean` Possible values: + - `true`: Razorpay will settle the maximum amount possible. Values passed in the `amount` parameter are ignored. + - `false` (default): Razorpay will settle the amount requested in the `amount` parameter. + +`status` +: `string` Indicates the state of the instant settlement. Possible values: + - `created`: The instant settlement request has been created. + - `initiated`: The instant settlement process has been initiated. + - `partially_processed`: The instant settlement is being processed. + - `processed`: The instant settlement has been processed and the amount has been transferred to your bank account. + - `reversed`: The instant settlement could not be processed for some reason and the amount has been transferred back to your PG balance. + +`description` +: `string` This is a custom note you can pass for the instant settlement for your reference. For example, `Need this to make vendor payments.`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Unix timestamp at which the instant settlement was created. For example, `1596771429`. + +`ondemand_payouts` +: `object` List of payouts created for the instant settlement. + + `entity` + : `string` Indicates the type of `ondemand_payouts` entity. Here it is `collection`. + + `count` + : `integer` The number of items in the array. For example, `1`. + + `items` + : `array` List of payouts created for the instant settlement. + + `id` + : `string` The unique identifier for the payout. For example, `setlodp_FNj7g2cbvw8ueO`. + + `entity` + : `string` Indicates the type of `items` entity. Here it is `settlement.ondemand_payout`. + + `initiated_at` + : `integer` Unix timestamp at which the payout was initiated. For example, `1596771430`. + + `processed_at` + : `integer` Unix timestamp at which the payout was processed. For example, `1596778752`. + + `reversed_at` + : `integer` Unix timestamp at which the payout was reversed. For example, `1596778752`. + + `amount` + : `integer` The amount, in paise, settled through this payout. For example, `200000`. + + `amount_settled` + : `integer` Amount (minus fees and tax), in paise, settled through this payout. For example, `199410`. + + `fees` + : `integer` Amount (fees+tax), in paise, deducted for this payout. For example, `590`. + + `tax` + : `integer` Tax charged, in paise, for the fee component. For example, `90`. + + `utr` + : `string` The unique transaction number linked to a payout. + + `status` + : `string` Status of the payout. Possible values: + - `created`: The payout has been created. + - `initiated`: The payout has been initiated. + - `processed`: The payout has been processed. The amount has been transferred to your bank account. + - `reversed`: The payout has been reversed. The amount has been transferred back to your PG balance. + + `created_at` + : `integer` Unix timestamp at which the payout was created. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The id provided does not exist +* code: 400 +* description: The settlement id does not belong to the requestor or does not exist. +* solution: Use a valid settlement id that belongs to the requestor. diff --git a/llm-content/api/settlements/instant/fetch-with-id.md b/llm-content/api/settlements/instant/fetch-with-id.md new file mode 100644 index 00000000..1cce32f2 --- /dev/null +++ b/llm-content/api/settlements/instant/fetch-with-id.md @@ -0,0 +1,222 @@ +--- +title: Fetch Instant Settlement With ID +description: Fetch Instant Settlement with ID using Razorpay Payments API. +--- + +# Fetch Instant Settlement With ID + +## Fetch Instant Settlement With ID + +Use this endpoint to retrieve the details of a particular Instant Settlement. + +### Request + +```cURL: Curl +curl -u :\ +- X GET \ +https://api.razorpay.com/v1/settlements/ondemand/setlod_FNj7g2YS5J67Rz + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String settlementId = "setlod_FNj7g2YS5J67Rz"; + +Settlement settlement = razorpay.settlement.fetchDemandSettlement(settlementId); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.settlement.fetch_ondemand_settlement_id(settlementId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +settlementId = "setlod_FNj7g2YS5J67Rz" + +para_attr = { + "expand[]": "ondemand_payouts" +} + +Razorpay::Settlement.fetch_ondemand_settlement_by_id(settlementId, para_attr); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Settlement.FetchOnDemandSettlementById("", nil, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->settlement->fetch($settlementId)->fetchOndemandSettlementById(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.settlements.fetchOndemandSettlementById(settlementId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string settlementId = "setl_Z6t7VFTb9xXXXX"; + +Settlement settlement = client.Settlement.FetchDemandSettlement(settlementId); +``` + +### Response + +```json: Success +{ + "id": "setlod_FNj7g2YS5J67Rz", + "entity": "settlement.ondemand", + "amount_requested": 200000, + "amount_settled": 199410, + "amount_pending": 0, + "amount_reversed": 0, + "fees": 590, + "tax": 90, + "currency": "INR", + "settle_full_balance": false, + "status": "processed", + "description": "Need this to make vendor payments.", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey, decaf." + }, + "created_at": 1596771429 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The id provided does not exist", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier for the instant settlement transaction. For example, `setlod_FNj7g2YS5J67Rz`. + +### Parameters + +`id` +: `string` The unique identifier of the instant settlement transaction. For example, `setlod_FNj7g2YS5J67Rz`. + +`entity` +: `string` Indicates the type of entity. Here it is `settlement.ondemand`. + +`amount_requested` +: `integer` The settlement amount, in paise, requested by you. For example, `200000`. + +`amount_settled` +: `integer` Total amount (minus fees and tax), in paise, settled to the bank account. For example, `199410`. + +`amount_pending` +: `integer` Portion of the requested amount, in paise, yet to be settled to you. + +`amount_reversed` +: `integer` Portion of the requested amount, in paise, that was not settled to you. This amount is reversed to your PG current balance. + +`fees` +: `integer` Total amount (fees+tax), in paise, deducted for the instant settlement. For example, `590`. + +`tax` +: `integer` Total tax, in paise, charged for the fee component. For example, `90`. + +`currency` +: `string` The 3-letter ISO currency code for the settlement. Here it is `INR`. + +`settle_full_balance` +: `boolean` Possible values: + - `true`: Razorpay will settle the maximum amount possible. Values passed in the `amount` parameter are ignored. + - `false` (default): Razorpay will settle the amount requested in the `amount` parameter. + +`status` +: `string` Indicates the state of the instant settlement. Possible values: + - `created`: The instant settlement request has been created. + - `initiated`: The instant settlement process has been initiated. + - `partially_processed`: The instant settlement is being processed. + - `processed`: The instant settlement has been processed and the amount has been transferred to your bank account. + - `reversed`: The instant settlement could not be processed for some reason and the amount has been transferred back to your PG balance. + +`description` +: `string` This is a custom note you can pass for the instant settlement for your reference. For example, `Need this to make vendor payments.`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Unix timestamp at which the instant settlement was created. For example, `1596771429`. + +`ondemand_payouts` +: `object` List of payouts created for the instant settlement. + + `entity` + : `string` Indicates the type of `ondemand_payouts` entity. Here it is `collection`. + + `count` + : `integer` The number of items in the array. For example, `1`. + + `items` + : `array` List of payouts created for the instant settlement. + + `id` + : `string` The unique identifier for the payout. For example, `setlodp_FNj7g2cbvw8ueO`. + + `entity` + : `string` Indicates the type of `items` entity. Here it is `settlement.ondemand_payout`. + + `initiated_at` + : `integer` Unix timestamp at which the payout was initiated. For example, `1596771430`. + + `processed_at` + : `integer` Unix timestamp at which the payout was processed. For example, `1596778752`. + + `reversed_at` + : `integer` Unix timestamp at which the payout was reversed. For example, `1596778752`. + + `amount` + : `integer` The amount, in paise, settled through this payout. For example, `200000`. + + `amount_settled` + : `integer` Amount (minus fees and tax), in paise, settled through this payout. For example, `199410`. + + `fees` + : `integer` Amount (fees+tax), in paise, deducted for this payout. For example, `590`. + + `tax` + : `integer` Tax charged, in paise, for the fee component. For example, `90`. + + `utr` + : `string` The unique transaction number linked to a payout. + + `status` + : `string` Status of the payout. Possible values: + - `created`: The payout has been created. + - `initiated`: The payout has been initiated. + - `processed`: The payout has been processed. The amount has been transferred to your bank account. + - `reversed`: The payout has been reversed. The amount has been transferred back to your PG balance. + + `created_at` + : `integer` Unix timestamp at which the payout was created. + +### Errors + +The API \{key/secret\} provided is invalid. +* code: 4xx +* description: The API credentials passed in the API call differ from the ones generated on the Dashboard. +* solution: The API keys must be active and entered correctly with no whitespace before or after. + +The id provided does not exist +* code: 400 +* description: The settlement id does not belong to the requestor or does not exist. +* solution: Use a valid settlement id that belongs to the requestor. diff --git a/llm-content/api/understand.md b/llm-content/api/understand.md new file mode 100644 index 00000000..a1c078c4 --- /dev/null +++ b/llm-content/api/understand.md @@ -0,0 +1,281 @@ +--- +title: Understand Razorpay APIs +description: Explanation of Razorpay API structure and the various components such as HTTP methods, status codes, data types and parameter types. Details on versioning, rate limiting and pagination. +--- + +# Understand Razorpay APIs + +Razorpay APIs provide businesses with a seamless way to accept payments, manage transactions, and automate financial workflows. Built on RESTful principles, they offer flexibility, scalability, and support for various payment methods. This guide will help you understand the fundamentals of Razorpay APIs, equipping you with the knowledge needed for a successful implementation. + +## REST APIs + +REST is an architectural style or design pattern for APIs. When a client request is made through a RESTful API, it transfers a representation of the state of the requested resource. Web services that follow the REST architectural style are called RESTful web services. + +A RESTful web application exposes information in the form of information about its resources. It also enables the client to take actions on those resources, such as creating new resources (for example, creating a new user) or changing existing resources (for example, editing a post). + +## Resources + +A resource is any piece of data that an API can provide, modify, or interact with. It represents an entity or object, such as a customer, payment, order, invoice, or refund. + +Each resource is identified by a unique URL (endpoint) and is typically manipulated using HTTP methods. + +## HTTP Methods + +HTTP defines a set of request methods, also known as HTTP verbs, to indicate the desired action for a given resource. + +Given below is the list of methods commonly adopted by Razorpay APIs: + +Verb | Description | Example +--- +GET | Requests a representation of the specified resource. Requests using GET should only retrieve data. | [Fetch all payments received by you](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) +--- +POST | Submits an entity to the specified resource, often causing a change in state or side effects on the server. | [Create a Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md#create-payment-link) +--- +PUT | Replaces all current representations of the target resource with the request payload. | [Edit customer details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md#edit-customer-details) +--- +DELETE | Deletes the specified resource. | [Delete an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices.md#delete-an-invoice) +--- +PATCH | Applies partial modifications to a resource. | [Update Order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#update-order) + + +### Example + + Use the Razorpay Payments API to fetch specific payment (the resource) details. The API response returns the payment state, including payment amount, currency, payment method and more. The representation of the state can be in a JSON format. + + /payments/:id + + + + + + ```json: Response + { + "id": "pay_DG4ZdRK8ZnXC3k", + "entity": "payment", + "amount": 5000, + "currency": "", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Test Transaction", + "card_id": "card_LPpN6ubeosLH4g", + "card": { + "id": "card_LPpN6ubeosLH4g", + "entity": "card", + "name": "", + "last4": "0153", + "network": "Visa", + "type": "debit", + "issuer": null, + "international": false, + "sub_type": "consumer", + "token_iin": null + }, + "bank": null, + "wallet": null, + "email": "", + "contact": "", + "notes": { + "address": "Corporate Office" + }, + "fee": 100, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "878694" + }, + "created_at": 1678452635 + } + ``` + + +## HTTPS Status Codes + +HTTP response status codes indicate whether a specific HTTP request is successfully completed. Responses are grouped into five classes: + +- Informational responses (100–199) +- Successful responses (200–299) +- Redirection messages (300–399) +- Client error responses (400–499) +- Server error responses (500–599) + +Refer to [Mozilla docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status) to know about status codes. Let us look at the success and error response status codes. + + +### Success Responses + + Given below is the list of the most commonly encountered success responses: + + + Status Codes | Description + --- + **201 Created** | The request succeeded, and a new resource was created. This is typically the response sent after POST requests or some PUT requests. + --- + **202 Accepted** | The request has been received but not yet acted upon. It is non-committal since there is no way in HTTP to send an asynchronous response later indicating the outcome of the request. It is intended for cases where another process or server handles the request or batch processing. + + + + +### Error Responses + + Following is the list of the most commonly encountered error responses: + + + Status Codes | Description + --- + **400 Bad Request** | The server cannot or will not process the request due to something that is perceived to be a client error. + --- + **401 Unauthorized** | Although the HTTP standard specifies "unauthorized", semantically, this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. + --- + **404 Not Found** | The server can not find the requested resource. In the browser, this means the URL is not recognised. In an API, this can also mean that the endpoint is valid, but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorised client. This response code is probably the most well known due to its frequent occurrence on the web. + --- + **429 Throttling Error** | The server is processing too many requests at once and is unable to process your request. Retry the request after some time. Know more about [Rate Limiting](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#rate-limits). + --- + **500 Internal Server Error** | The server has encountered a situation it does not know how to handle. + --- + **502 Bad Gateway** | This error response means that the server got an invalid response while working as a gateway to get a response needed to handle the request. + --- + **503 Service Unavailable** | The server is not ready to handle the request. Common causes are a server that is down for maintenance or is overloaded. + --- + **504 Gateway Timeout** | This error response is given when the server acts as a gateway and cannot get a timely response. + + + +## Parameter Types + +Following table lists the various parameter types with examples: + +Parameter Type | Description | Example +--- +Query | Parameters appended to the URL in GET requests to filter or modify data. | `?count=5` +--- +Path | Parameters included in the URL path to specify a resource. | `/payments/{payment_id}` +--- +Request | Parameters sent in the request body, typically in JSON format, for creating or updating resources. | `{ "amount": 5000 }` +--- +Response | Parameters returned in the API response, providing information about the requested resource. | `{ "id": "pay_29QQoUBi66xm2f", "status": "captured" }` + +The following images highlight the different types of API parameters. + +![API Path and Query Parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/api-path-query-parameters.jpg.md) + +![API Path and Request Parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/api-path-request-parameters.jpg.md) + +## Data Types + +Razorpay APIs use standard data types to represent different kinds of information in API requests and responses. The following table outlines the primary data types used: + +Data Type | Description | Example +--- +String | A sequence of characters. Used for textual data, such as IDs, names, and descriptions. | `pay_29QQoUBi66xm2f` +--- +Integer | A whole number without decimals. Used for values like amount, timestamps and counts. | `1623456789` (Unix timestamp) +--- +Float/Decimal | A number with decimal precision. Used for amounts and fees. | `499.99` +--- +Boolean | A value that is either `true` or `false`. Used for flags such as payment status. | `true` +--- +Array | A list of values, typically enclosed in square brackets. | `["card", "upi", "netbanking"]` +--- +Object | A collection of key-value pairs enclosed in curly braces. Used for structured data. | `{"name": "Gaurav Kumar", "email": "gaurav@example.com"}` +--- +Entity | The name of the API resource. | `"entity": "invoice"` + +## Conventions + +Following are some conventions followed in Razorpay APIs: + +### Entity + +All Razorpay API responses carry this attribute with the value being the name of the API resource. For example, `"entity: "order"`. There are some common attributes for every entity. + +`entity` +: `string` Indicates the type of the entity. + +`id` +: `integer` A unique identifier of the entity. + +In an entity, the attributes can be used to make entity-specific API calls. For example, you can fetch the payment ID from the `order.paid` webhook and use it to initiate a refund for that payment. + +### Collection + +A list of objects/entities is called collection. Usually, when fetching an API resource using the GET method, multiple entities are expected in the result. In this case, it is returned in a collection form. For the `collection entity`, the following parameters are common. + +`entity` +: `string` Indicates the type of the entity. For example, `collection`. + +`count` +: `integer` Indicates the number of `items` are returned. For example, `2`. + +`items` +: `array` The list of entities. + +### Notes + +The `notes` object is a set of key-value pairs that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +The majority of the entities allow the `notes` object to store additional information and preserve data relevant to your integration. Razorpay does not use it for any operational purposes. + +You can store the notes related to: +- Billing or shipping address of the initiated payment. +- Reference id generated for an order. + +### Identifier + +Razorpay attributes are uniquely identified by their identifier which is mostly present in the attribute `id`. The identifier is of 14 characters, alphanumeric and case-sensitive. + +## Response Body + +When you make a request to the Razorpay API, the server responds with a JSON object containing relevant data. The response body structure varies depending on the API endpoint and the type of request. + +![API Response Parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/api-conventions-response-parameters.jpg.md) + +## Versioning + +All Razorpay APIs are backwards-compatible. If an API or its parameters are deprecated, we add a warning note for the same for a specific period of time. + +## Rate Limiting + +Razorpay uses a request **Rate Limiter** to limit the number of requests received by the API within a time frame. Rate Limiter helps maintain system stability during heavy traffic loads. + +- While integrating with any APIs, watch for HTTP status code 429 and build the retry mechanism based on the requirement. +- Use an exponential backoff/stepped backoff strategy to reduce request volume and stay within the limit. +- Add some randomisation within the backoff schedule to avoid the [thundering herd effect](https://en.wikipedia.org/wiki/Thundering_herd_problem). + +## Pagination + +Usually, when you make calls to the Razorpay APIs, there will be a large volume of responses. You can paginate the results to ensure that these responses are easier to handle, using a combination of the query parameters given below to receive a specific number of records in the API response. + +`from` +: `integer` Timestamp, in Unix, after which the entities are created. + +`to` +: `integer` Timestamp, in Unix, before which the entities are created. + +`count` +: `integer` Number of entities to fetch. Default is 10. This can be used for pagination, in combination with `skip`. + +`skip` +: `integer` Number of entities to skip. Default is 0. This can be used for pagination, in combination with `count`. + + +### Example + + If you want to get information on all the payments received from customers, the result could be a massive response with hundreds of payments. + + +### Related Information + +- [Authentication](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md) +- [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) +- [Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/best-practices.md) +- [Glossary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/glossary.md) diff --git a/llm-content/api/x.md b/llm-content/api/x.md new file mode 100644 index 00000000..6fa4b77b --- /dev/null +++ b/llm-content/api/x.md @@ -0,0 +1,132 @@ +--- +title: RazorpayX | Payout APIs +heading: Get Started +description: Create Payouts using APIs. +--- + +# Get Started + +Post sign up, account activation and KYC verification you can start using APIs to make payouts. To make a payout, you must: + +1. Create a Contact +1. Add a Fund Account for a contact. +1. Create a Payout. + +> **WARN** +> +> +> +> **Watch Out!** +> +> According to PCI regulations, payout processing is allowed on **TLS version 1.2** or higher. +> RazorpayX will not acknowledge APIs if they are triggered without **TLS version 1.2** or higher. +> +> + +Watch the below video to know how to create Payouts using our APIs. + +[Video: https://www.youtube-nocookie.com/embed/SiViFEyyS6o] + +> **INFO** +> +> +> +> **Handy Tips** +> +> It is assumed that you have already added funds to your business account. This action **cannot** be performed via APIs and has to be done before you can make a payout. Refer to the business account section to know [ how to add funds to your business account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types.md#add-funds). +> + +## Payout APIs + +You can try the Payout APIs on the Razorpay Postman Public Workspace. + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-fcd32a4a-0c53-41a7-a879-d771de7e2804) + +Know more about [API parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/apis.md). + +## Test Mode + +RazorpayX test mode is a replication of RazorpayX in a sandbox environment. It allows you to test all aspects of your integration before you go live. + +Actions taken in the test mode have no consequences in your live environment. Test mode has its own dummy balance. **No real money is used in the test mode**. + +Contacts, fund accounts and payouts created in the test mode do not appear in the live environment. You can create contacts and fund accounts using real-world or dummy data. + +For example, a contact created in the test mode does not carry over to the live mode and vice versa. Payouts made to a fund account in the test mode uses funds from the test account balance, which is not real money. + +Know more about [Test Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md). + +## API Gateway URL + +For most of the Razorpay APIs, the Gateway URL is `https://api.razorpay.com/v1`. You need to include this before each API endpoint to make API calls. However, certain APIs are on V2. Hence, the gateway URL may differ for certain APIs. + + +### Example + + + + - Use the URL `https://api.razorpay.com/v1/payments` to access payment resources. + + - Use the URL `https://api.razorpay.com/v2/accounts` to access Route (Linked Account)-related resources. + + + + + + +## API Authentication + +All our APIs are authenticated using Basic Auth. Basic auth requires the following: + +- `[YOUR_KEY_ID]` +- `[YOUR_KEY_SECRET]` + +### Generate API Key + +> **INFO** +> +> +> +> **Handy Tips** +> +> If you are an existing Razorpay merchant, you can use your existing API key with RazorpayX. +> + +To generate your API Keys: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +1. Navigate to the user icon on the top-right of the screen, and to **My Account & Settings** → **Developer Controls**. +1. In the **API Keys** section, click **GENERATE KEY**, or **REGENERATE KEY** if you want to generate your API Keys again. +1. API Keys are generated for your business account. Click **Download Key Details** to download your API Keys for future reference. + +Watch the short animation below for more information. + +![](/docs/assets/images/RZPX-RZPX-api-keys.gif) + +> **WARN** +> +> +> +> **Watch Out!** +> +> After generating the keys from the Dashboard, download and save them securely. Razorpay does not store ``. This is visible only at the time of key generation. +> +> If you have already generated your API Keys and do not remember it, you must regenerate the keys from the [RazorpayX Dashboard](https://x.razorpay.com/settings/developer-controls)/[Razorpay Dashboard](https://dashboard.razorpay.com/app/keys) and replace it in your integration code for RazorpayX and Razorpay Payment Gateway. +> + +## Rate Limits + +Razorpay employs a **request rate limiter** that limits the number of requests received by the API within a time window. This is to maintain system stability in the event of unintentional high traffic loads. + +While integrating with APIs, watch for `HTTP status code 429` and build the retry mechanism based on the requirement. + +To make the best use of the limits, it is recommended to use an Exponential backoff/stepped backoff strategy to reduce request volume and stay within the limit. It is also recommended to have some randomization within the backoff schedule to avoid the [thundering herd effect](https://en.wikipedia.org/wiki/Thundering_herd_problem). + +## Webhooks +[Set up Payout Webhooks ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md)to configure and receive notifications when a [specific event occurs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md#available-events). When one of these events is triggered, we send an HTTP POST [payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) in JSON to the webhook's configured URL. + +### Related Information + +- [Set up your RazorpayX account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/set-up.md) +- [RazorpayX Account Types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types.md) +- [Test Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md) diff --git a/llm-content/api/x/account-validation.md b/llm-content/api/x/account-validation.md new file mode 100644 index 00000000..d4450134 --- /dev/null +++ b/llm-content/api/x/account-validation.md @@ -0,0 +1,48 @@ +--- +title: Fund/Bank Account Validation +heading: Account Validation +description: Overview of Account Validation for RazorpayX, APIs and webhook payload. Validate customer's bank account before you make payouts. +--- + +# Account Validation + +[Account Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-account-validation.md) validates your Contact's Fund Account details (such as bank account or virtual payment address (VPA) details) to verify the account number where the user wants to receive the amount. Account Validation is not available in test mode and is possible only for RazorpayX Lite. + +To make an account validation transaction, you must [allowlist your IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md), [Create a Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation/create-contact.md) and Create a Fund Account for the Contact using either [bank account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation/bank-account/create-fund-account.md) or [VPA details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation/vpa/create-fund-account.md). + +Fork the Razorpay Postman Public Workspace and try the Account Validation APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-62befdac-a937-4ee9-8bc4-943801ce2368) + +### Related Guides + +[About Fund Account Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-account-validation.md) +[Set up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) +[Webhooks Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/account-validation.md) + +### Endpoints + + +- **post** `/v1/contacts` - Create Contact: +Creates a Contact using customer's contact details such a phone number or email id. + +- **post** `/v1/fund_accounts` - Create a Fund Account of Type Bank Account: +Creates a Fund Account for an existing Contact using customer's bank account details. + +- **post** `/v1/fund_accounts/validations` - Validate a Bank Account: +Validates the contact's bank account. + +- **post** `/v1/fund_accounts` - Create a Fund Account of Type VPA: +Creates a Fund Account for an existing Contact using customer's virtual payment address or UPI. + +- **post** `/v1/fund_accounts/validations` - Validate a VPA: +Validates the contact's virtual payment address or UPI fund account. + +- **post** `/v1/fund_accounts/validations` - Validate VPA using Reverse Penny Drop: +Validates the contact's virtual payment address or UPI fund account via Reverse Penny Drop. + +- **get** `/v1/fund_accounts/validations?account_number={account number}` - Fetch All Account Validation Transactions: +Retrieves the details of all Fund Account Validation transactions you have made. + +- **get** `/v1/fund_accounts/validations/:id` - Fetch Account Validation Transactions With ID: +Retrieves particular Fund Account Validation transaction with its id. diff --git a/llm-content/api/x/account-validation/balance-fetch.md b/llm-content/api/x/account-validation/balance-fetch.md new file mode 100644 index 00000000..962d93b0 --- /dev/null +++ b/llm-content/api/x/account-validation/balance-fetch.md @@ -0,0 +1,197 @@ +--- +title: Fetch Balance +description: Fetch Account Balances +--- + +# Fetch Balance + +## Fetch Account Balances + +Use this endpoint to retrieve the balances of all accounts. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/banking_balances +``` + +### Response + +```json: Success + +{ + "entity": "collection", + "count": 4, + "items": [ + { + "entity": "banking_balance", + "currency": "INR", + "account_number": "409001396356", + "account_type": "current_account", + "bank_name": "RBL Bank", + "bank_code": "RATN", + "amount": 186682638, + "available_amount": 186682638, + "refreshed_at": 1721889110 + }, + { + "entity": "banking_balance", + "currency": "INR", + "account_number": "002281300049209", + "account_type": "current_account", + "bank_name": "Yes Bank", + "bank_code": "YESB", + "amount": 10489829, + "available_amount": 186682638, + "refreshed_at": 1696419847 + }, + { + "entity": "banking_balance", + "currency": "INR", + "account_number": "002281300012871", + "account_type": "fixed_deposit", + "bank_name": "Yes Bank", + "bank_code": "YESB", + "amount": 10489829, + "available_amount": 186682638, + "refreshed_at": 1696419847 + }, + { + "entity": "banking_balance", + "currency": "INR", + "account_number": "984539953520846", + "account_type": "razorpayx_lite", + "bank_name": null, + "bank": null, + "amount": 1029, + "available_amount": 1029, + "refreshed_at": 1729847660 + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The selected account type is invalid.", + "source": "business", + "step": null, + "reason": "input_validation_failed", + "metadata": {}, + "field": "account_type" + } +} +``` + +### Parameters + +`account_type` +: `string` Filters account based on type. Possible values are `current_account` or `razorpayx_lite`. The parameter is case sensitive. + - `current_account`: Current Accounts and Escrow Accounts + - `razorpayx_lite`: RazorpayX Lite Accounts + +`bank_code` +: `string` Filters based on bank name. This should be the first four characters of IFSC for any bank. + For example, `RATN`or `YESB`. The parameter is case sensitive. + +`count` +: `integer` Number of accounts to be fetched based on the most recently refreshed balance. + This can be used for pagination, in combination with skip. + - Default value : `10` + - Maximum value : `100` + +`skip` +: `integer` Numbers of balances to be skipped. This can be used for pagination, in combination with count. + Default value is `0`. + +### Parameters + +`entity` +: `string` The entity being returned. For example, `banking_balance`. + +`count` +: `integer` Count of items being returned. For example `2`. + +`items` +: `object` Array of all accounts and their balances. + +`currency` +: `string` Returns the currency in which the balance amount is relayed. For example, `INR`. + +`amount` +: `long` The total INR balance amount in paise. For example, `6358629`. + +`account_number` +: `string` Associated account number. For example, `123456789281`. + +`account_type` +: `string` Returns associated account type. For example, `current_account`. + +`bank_name` +: `string` Returns the full name of the bank. +For example `YESB`. + +`bank_code` +: `string` Returns bank code. This will be the first four characters of IFSC for any bank. +For example `YESB`. + +`refreshed_at` +: `long` The latest timestamp of Razorpay fetching balance from the bank in epoch format. For example `1729847660`. + +`available_amount` +: `long` The net withdrawable INR balance amount in paise. This will deduct any lien balance and include any OD balance on the account. For example, `6358629`. + +### Errors + + +`The selected account type is invalid` +* code: 400 +* description: Query parameter `account_type` is incorrectly passed. +* solution: Enter the `account_type` as `current_account` or `razorpayx_lite` only. The query parameter is case sensitive. + +`Invalid channel name: rbl` +* code: 400 +* description: Query parameter `bank_code` is incorrectly passed. +* solution: Enter the `bank_code` in the correct format. This should be the first four characters of IFSC for any bank, and is case sensitive. + +`The count may not be greater than 100` +* code: 400 +* description: The `count` passed in the query parameter is greater than 100. +* solution: The maximum value that can be passed here is `100`. + +`The count must be an integer` +* code: 400 +* description: The `count` passed in the query parameter is not an integer +* solution: Enter only integer values. + +`Authentication failed` +* code: 401 +* description: Incorrect Key or Secret. +* solution: Enter the correct Key and Secret as per the request body. + +`Throttling Error` +* code: 429 +* description: The server is processing too many requests at once and is unable to process your request. +* solution: Retry the request after some time. + +`We are facing some trouble completing your request at the moment. Please try again shortly.` +* code: 500 +* description: Internal Server Error. The server has encountered a situation it does not know how to handle. +* solution: Retry the request after some time. + +`Bad Gateway` +* code: 502 +* description: The server got an invalid response while working as a gateway to get a response needed to handle the request. +* solution: Retry the request after some time. + +`Service Unavailable` +* code: 503 +* description: The server is not ready to handle the request. Common causes are a server that is down for maintenance or is overloaded. +* solution: Retry the request after some time. + +`Gateway Timeout` +* code: 504 +* description: This error response is given when the server acts as a gateway and cannot get a timely response. +* solution: Retry the request after some time. diff --git a/llm-content/api/x/account-validation/bank-account.md b/llm-content/api/x/account-validation/bank-account.md new file mode 100644 index 00000000..a1cfa14a --- /dev/null +++ b/llm-content/api/x/account-validation/bank-account.md @@ -0,0 +1,283 @@ +--- +title: Validate a Bank Account +description: Validate Fund Account of type bank account via API. +--- + +# Validate a Bank Account + +## Validate a Bank Account + +Use this endpoint to create a bank account validation transaction. + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/fund_accounts/validations \ +-H "Content-Type: application/json" \ +-d '{ + "account_number": "7878780080316316", + "fund_account": { + "id": "fa_00000000000001" + }, + "amount": 100, + "currency": "INR", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + } +}' +``` + +### Response + +```json: Created +{ + "id": "fav_00000000000001", + "entity": "fund_account.validation", + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "account_type": "bank_account", + "bank_account": { + "name": "Gaurav Kumar", + "bank_name": "HDFC", + "ifsc": "HDFC0000053", + "account_number": "765432123456789" + }, + "batch_id": null, + "active": true, + "created_at": 1567064019 + }, + "status": "created", + "amount": 100, + "currency": "INR", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "results": { + "account_status": null, + "registered_name": null + }, + "created_at": 1547566278, + "utr": null +} +```json: Completed +{ + "id": "fav_00000000000001", + "entity": "fund_account.validation", + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "account_type": "bank_account", + "bank_account": { + "name": "Gaurav Kumar", + "bank_name": "HDFC", + "ifsc": "HDFC0000053", + "account_number": "765432123456789" + }, + "batch_id": null, + "active": true, + "created_at": 1567064019 + }, + "status": "completed", + "amount": 100, + "currency": "INR", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "results": { + "account_status": "active", + "registered_name": "Gaurav Kumar" + }, + "created_at": 1547566278, + "utr": "XXXXR7310682908954385XX" +} +```json: Failed +{ + "id": "fav_Fa6RwlxjoX0xeO", + "entity": "fund_account.validation", + "fund_account": { + "id": "fa_Fa6Rq1WwNrpMoK", + "entity": "fund_account", + "contact_id": "cont_FYSVUV5EeJKkKb", + "account_type": "bank_account", + "bank_account": { + "name": "Gaurav Kumar", + "bank_name": "HDFC", + "ifsc": "HDFC0000053", + "account_number": "1121431121541121" + }, + "batch_id": null, + "active": true, + "created_at": 1599652242 + }, + "status": "failed", + "amount": 127, + "currency": "INR", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "results": { + "account_status": "", + "registered_name": "" + }, + "created_at": 1599473659, + "utr": null +} +``` + +### Parameters + +`account_number` _mandatory_ +: `string` The account from which money should be deducted for the account validation transaction. + - Pass your customer identifier if you want money to be deducted from RazorpayX Lite. + +> **WARN** +> +> +> **Watch Out!** +> +> - This is **not** your contact's bank account number. Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - This value is different for Test Mode and Live Mode. +> + +`fund_account`_mandatory_ +: `object` The fund account id you want to validate. + + `id` _mandatory_ + : `string` The unique identifier linked to a fund account. For example, `fa_00000000000001`. + +`amount`_mandatory_ +: `integer` The amount, in paise, to be transferred. For example, pass `100` for ₹1. The default value for this parameter is `100`. + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency`_optional_ +: `string` The currency for the transfer. The value has to be `INR`. If no value is passed, it is assumed to be `INR`. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account validation. For example, `fav_0000000001`. + +`entity` +: `string` Here it is `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`validation_results` +: `object` Details extracted from the results of the fund account validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar` or `null`. + + `details` + : `string` Brief description of the validation. + + `name_match_score` + : `string` The percentage score indicating how closely the account holder's name matches the records. + +`validated_account_type` +: `string` Here it is `bank_account`. + + `bank_account` + : `object` The contact's bank account details. + + `bank_routing_code` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `account_type` + : `string` The account type being validated. For example `savings`, `current`. + +`status_details` +: `object` Status of the fund account validation. + + `description` + : `string` A brief description stating if the validation is complete or not. + + `source` + : `string` The source from which validation was done. For example, `beneficiary_bank` + + `reason` + : `string` Reason for validation. + +`reference_id` +: `string` Unique reference_id generated for the validation transaction. + +`fund_account` +: `object` The details of the fund account which was validated. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it is `fund_account`. + + `account_type` + : `string` Fund account type. + +`vpa` +: `object` The details associated with the account holder's virtual payment address. + + `address` + : `string` The virtual payment address of the contact whose account is validated. For example, `gaurav.kumar@exampleupi` + +`active` +: `boolean` Possible values of fund account status: + - `true`: active + - `false`: inactive + +`created_at` +: `integer` Timestamp, in unix, when the fund account was created. For example, `1543650891`. + +`contact` +: `object` The contact's details. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` Here it is `contact` + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `email` + : `string` Email address of the contact. + + `contact` + : `string` Phone number of the contact. + + `type` + : `string` Contact Type. For example, `employee`, `contractor`. + + `reference_id` + : `string` Reference id associated with the contact. + + `active` + : `boolean` Possible values of contact status: + - `true`: active + - `false`: inactive diff --git a/llm-content/api/x/account-validation/bank-account/create-fund-account.md b/llm-content/api/x/account-validation/bank-account/create-fund-account.md new file mode 100644 index 00000000..77ab18db --- /dev/null +++ b/llm-content/api/x/account-validation/bank-account/create-fund-account.md @@ -0,0 +1,189 @@ +--- +title: Create a Fund Account of Type Bank Account +description: Create a Fund Account of the type bank account via API. +--- + +# Create a Fund Account of Type Bank Account + +## Create a Fund Account of Type Bank Account + +Use this endpoint to create a fund account with bank account details.- A new fund account is created if any combination of the following details is unique: `contact_id`, `bank_account.name`, `bank_account.ifsc` and `bank_account.account_number`. +- If **all** the above details match the details of an existing fund account, the API returns details of the existing fund account. +- You cannot edit the details of a fund account. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/fund_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "contact_id":"cont_00000000000001", + "account_type":"bank_account", + "bank_account":{ + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053", + "account_number":"765432123456789" + } +}' +``` + +### Response + +```json: Success +{ + "id" : "fa_00000000000001", + "entity": "fund_account", + "contact_id" : "cont_00000000000001", + "account_type": "bank_account", + "bank_account": { + "ifsc": "HDFC0000053", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "765432123456789", + "notes": [] + }, + "active": true, + "batch_id": null, + "created_at": 1543650891 +} +``` + +### Parameters + +`contact_id`_mandatory_ +: `string` This is the unique identifier linked to a contact. For example, `cont_00000000000001`. + +`account_type`_mandatory_ +: `string` The account type you want to link to the contact ID. Here it is `bank_account`. + +`bank_account`_mandatory_ +: `object` The contact's bank account details. + + `name`_mandatory_ + : `string` Account holder's name. Name must be between 3 - 120 characters. This field is case-sensitive. Name cannot end with a special character, except `.`. Supported characters: `a-z`, `A-Z`, `0-9`, `space`, `’` , `-` , `_` , `/` , `(` , `)` and , `.`. For example,`Gaurav Kumar`. + + `ifsc`_mandatory_ + : `string` Beneficiary bank IFSC. Has to be 11 characters. Unique identifier of a bank branch. For example, `HDFC0000053`. + + `account_number`_mandatory_ + : `string` Beneficiary account number. Between 5 and 35 characters. Supported characters: `a-z`, `A-Z` and `0-9`. Beneficiary account number. For example, `765432123456789`. + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account validation. For example, `fav_0000000001`. + +`entity` +: `string` Here it is `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`validation_results` +: `object` Details extracted from the results of the fund account validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar` or `null`. + + `details` + : `string` Brief description of the validation. + + `name_match_score` + : `string` The percentage score indicating how closely the account holder's name matches the records. + +`validated_account_type` +: `string` Here it is `bank_account`. + + `bank_account` + : `object` The contact's bank account details. + + `bank_routing_code` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `account_type` + : `string` The account type being validated. For example `savings`, `current`. + +`status_details` +: `object` Status of the fund account validation. + + `description` + : `string` A brief description stating if the validation is complete or not. + + `source` + : `string` The source from which validation was done. For example, `beneficiary_bank` + + `reason` + : `string` Reason for validation. + +`reference_id` +: `string` Unique reference_id generated for the validation transaction. + +`fund_account` +: `object` The details of the fund account which was validated. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it is `fund_account`. + + `account_type` + : `string` Fund account type. + +`vpa` +: `object` The details associated with the account holder's virtual payment address. + + `address` + : `string` The virtual payment address of the contact whose account is validated. For example, `gaurav.kumar@exampleupi` + +`active` +: `boolean` Possible values of fund account status: + - `true`: active + - `false`: inactive + +`created_at` +: `integer` Timestamp, in unix, when the fund account was created. For example, `1543650891`. + +`contact` +: `object` The contact's details. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` Here it is `contact` + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `email` + : `string` Email address of the contact. + + `contact` + : `string` Phone number of the contact. + + `type` + : `string` Contact Type. For example, `employee`, `contractor`. + + `reference_id` + : `string` Reference id associated with the contact. + + `active` + : `boolean` Possible values of contact status: + - `true`: active + - `false`: inactive diff --git a/llm-content/api/x/account-validation/create-contact.md b/llm-content/api/x/account-validation/create-contact.md new file mode 100644 index 00000000..306a9cf5 --- /dev/null +++ b/llm-content/api/x/account-validation/create-contact.md @@ -0,0 +1,115 @@ +--- +title: Create a Contact +description: Create a Contact via API. +--- + +# Create a Contact + +## Create a Contact + +Use this endpoint to create a new contact.- A new contact is created if any combination of the following details is unique: `name`, `email`, `contact`, `type` and `reference_id`. +- If **all** the above details match the details of an existing contact, the API returns details of the existing contact. + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/contacts \ +-H "Content-Type: application/json" \ +-d '{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9000090000", + "type":"employee", + "reference_id":"Acme Contact ID 12345", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' +``` + +### Response + +```json: Success +{ + "id": "cont_00000000000001", + "entity": "contact", + "name": "Gaurav Kumar", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1545320320 +} +``` + +### Parameters + +`name`_mandatory_ +: `string` The contact's name. This field is case-sensitive. A minimum of 3 characters and a maximum of 50 characters are allowed. Name cannot end with a special character, except `.`. Supported characters: `a-z`, `A-Z`, `0-9`, `space`, `’` , `-` , `_` , `/` , `(` , `)` and , `.`. For example, `Gaurav Kumar`. + +`email`_optional_ +: `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`contact`_optional_ +: `string` The contact's phone number. For example, `9000090000`. + +`type`_optional_ +: `string` Maximum 40 characters. Classification for the contact being created. For example, `employee`. The following classifications are available by default: + - `vendor` + - `customer` + - `employee` + - `self` + + + Additional classifications can be created via the [Dashboard](https://x.razorpay.com/) and then used in APIs. It is not possible to create new classifications via API. + +`reference_id`_optional_ +: `string` Maximum 40 characters. A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + +`entity` +: `string` The entity being created. Here, it is `contact`. + +`name` +: `string` The contact's name. For example, `Gaurav Kumar`. + +`contact` +: `string` The contact's phone number. For example, `9000090000`. + +`email` +: `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`type` +: `string` A classification for the contact being created. For example, `employee`. + +`reference_id` +: `string` A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`active` +: `boolean` Possible values: + - `true` (default) : active + - `false` : inactive + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. diff --git a/llm-content/api/x/account-validation/entity.md b/llm-content/api/x/account-validation/entity.md new file mode 100644 index 00000000..a592403b --- /dev/null +++ b/llm-content/api/x/account-validation/entity.md @@ -0,0 +1,165 @@ +--- +title: Fund/Bank Account Validation +heading: Account Validation Entity +description: Overview of Account Validation for RazorpayX, APIs and webhook payload. Validate customer's bank account before you make payouts. +--- + +# Account Validation Entity + +The Account Validation entity has the following parameters: + +### Response + +```json: Sample Entity +{ + "id": "fav_00000000000001", + "entity": "fund_account.validation", + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "account_type": "bank_account", + "bank_account": { + "name": "Gaurav Kumar", + "bank_name": "HDFC", + "ifsc": "HDFC0000053", + "account_number": "765432123456789" + }, + "batch_id": null, + "active": true, + "created_at": 1567064019 + }, + "status": "completed", + "amount": 100, + "currency": "INR", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "results": { + "account_status": "active", + "registered_name": "Gaurav Kumar" + }, + "created_at": 1547566278, + "utr": "XXXXR7310682908954385XX" +} +``` + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account validation. For example, `fav_0000000001`. + +`entity` +: `string` Here it is `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`validation_results` +: `object` Details extracted from the results of the fund account validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar` or `null`. + + `details` + : `string` Brief description of the validation. + + `name_match_score` + : `string` The percentage score indicating how closely the account holder's name matches the records. + +`validated_account_type` +: `string` Here it is `bank_account`. + + `bank_account` + : `object` The contact's bank account details. + + `bank_routing_code` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `account_type` + : `string` The account type being validated. For example `savings`, `current`. + +`status_details` +: `object` Status of the fund account validation. + + `description` + : `string` A brief description stating if the validation is complete or not. + + `source` + : `string` The source from which validation was done. For example, `beneficiary_bank` + + `reason` + : `string` Reason for validation. + +`reference_id` +: `string` Unique reference_id generated for the validation transaction. + +`fund_account` +: `object` The details of the fund account which was validated. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it is `fund_account`. + + `account_type` + : `string` Fund account type. + +`vpa` +: `object` The details associated with the account holder's virtual payment address. + + `address` + : `string` The virtual payment address of the contact whose account is validated. For example, `gaurav.kumar@exampleupi` + +`active` +: `boolean` Possible values of fund account status: + - `true`: active + - `false`: inactive + +`created_at` +: `integer` Timestamp, in unix, when the fund account was created. For example, `1543650891`. + +`contact` +: `object` The contact's details. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` Here it is `contact` + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `email` + : `string` Email address of the contact. + + `contact` + : `string` Phone number of the contact. + + `type` + : `string` Contact Type. For example, `employee`, `contractor`. + + `reference_id` + : `string` Reference id associated with the contact. + + `active` + : `boolean` Possible values of contact status: + - `true`: active + - `false`: inactive diff --git a/llm-content/api/x/account-validation/fetch-all-transactions.md b/llm-content/api/x/account-validation/fetch-all-transactions.md new file mode 100644 index 00000000..e092462b --- /dev/null +++ b/llm-content/api/x/account-validation/fetch-all-transactions.md @@ -0,0 +1,230 @@ +--- +title: Fetch All Account Validation Transactions +description: Retrieve all account validations transactions via API. +--- + +# Fetch All Account Validation Transactions + +## Fetch All Account Validation Transactions + +Use this endpoint to retrieve the details of all Fund Account Validation transactions you have made. + +### Request + +```curl: Curl +curl -u : \ + -X GET https://api.razorpay.com/v1/fund_accounts/validations?account_number=7878780080316316 +``` + +### Response + +```json: Success +{ + "entity":"collection", + "count":2, + "items":[ + { + "id": "fav_00000000000001", + "entity": "fund_account.validation", + "fund_account":{ + "id": "fa_00000000000001", + "entity": "fund_account", + "contact_id":"cont_00000000000001", + "account_type": "bank_account", + "bank_account":{ + "name": "Gaurav Kumar", + "bank_name": "HDFC", + "ifsc": "HDFC0000053", + "account_number": "765432123456789" + }, + "batch_id": null, + "active": true, + "created_at": 1567064019 + }, + "status": "completed", + "amount": 100, + "currency": "INR", + "notes":{ + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "results":{ + "account_status": "active", + "registered_name": "Gaurav Kumar" + }, + "created_at": 1547566278, + "utr": "XXXXR7310682908954385XX" + }, + { + "id":"fav_00000000000002", + "entity":"fund_account.validation", + "fund_account":{ + "id":"fa_00000000000002", + "entity":"fund_account", + "contact_id":"cont_00000000000001", + "account_type":"vpa", + "vpa":{ + "username": "gaurav.kumar", + "handle": "exampleupi", + "address":"gaurav.kumar@exampleupi" + }, + "batch_id": null, + "active":true, + "created_at":1573110860 + }, + "status":"completed", + "amount":null, + "currency":null, + "notes":{ + "random_key_1":"Make it so.", + "random_key_2":"Tea. Earl Grey. Hot." + }, + "results":{ + "account_status":"active", + "registered_name":"Gaurav Kumar" + }, + "created_at":1574244676, + "utr": null + } + ] +} +``` + +### Parameters + +`account_number`_mandatory_ +: `string` The account that was used to debit money for validation transaction. +Account details can be found on the RazorpayX Dashboard. For example, `7878780080316316`. + - Pass your Customer Identifier (RazorpayX Lite number) if money was deducted from RazorpayX Lite. + - This is an alphanumeric or numeric value. + +`from`_optional_ +: `integer` Timestamp in Unix from when you want to fetch payouts. + +`to`_optional_ +: `integer` Timestamp in Unix till when you want to fetch payouts. + +`count`_optional_ +: `integer` Number of payouts to be fetched. Default value is `10`. Maximum value is `100`. This can be used for pagination, in combination with `skip`. + +`skip`_optional_ +: `integer` Numbers of payouts to be skipped. Default value is `0`. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account validation. For example, `fav_0000000001`. + +`entity` +: `string` Here it is `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`validation_results` +: `object` Details extracted from the results of the fund account validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar` or `null`. + + `details` + : `string` Brief description of the validation. + + `name_match_score` + : `string` The percentage score indicating how closely the account holder's name matches the records. + +`validated_account_type` +: `string` Here it is `bank_account`. + + `bank_account` + : `object` The contact's bank account details. + + `bank_routing_code` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `account_type` + : `string` The account type being validated. For example `savings`, `current`. + +`status_details` +: `object` Status of the fund account validation. + + `description` + : `string` A brief description stating if the validation is complete or not. + + `source` + : `string` The source from which validation was done. For example, `beneficiary_bank` + + `reason` + : `string` Reason for validation. + +`reference_id` +: `string` Unique reference_id generated for the validation transaction. + +`fund_account` +: `object` The details of the fund account which was validated. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it is `fund_account`. + + `account_type` + : `string` Fund account type. + +`vpa` +: `object` The details associated with the account holder's virtual payment address. + + `address` + : `string` The virtual payment address of the contact whose account is validated. For example, `gaurav.kumar@exampleupi` + +`active` +: `boolean` Possible values of fund account status: + - `true`: active + - `false`: inactive + +`created_at` +: `integer` Timestamp, in unix, when the fund account was created. For example, `1543650891`. + +`contact` +: `object` The contact's details. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` Here it is `contact` + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `email` + : `string` Email address of the contact. + + `contact` + : `string` Phone number of the contact. + + `type` + : `string` Contact Type. For example, `employee`, `contractor`. + + `reference_id` + : `string` Reference id associated with the contact. + + `active` + : `boolean` Possible values of contact status: + - `true`: active + - `false`: inactive diff --git a/llm-content/api/x/account-validation/fetch-transactions-with-id.md b/llm-content/api/x/account-validation/fetch-transactions-with-id.md new file mode 100644 index 00000000..4fe6d8b0 --- /dev/null +++ b/llm-content/api/x/account-validation/fetch-transactions-with-id.md @@ -0,0 +1,178 @@ +--- +title: Fetch Account Validation Transaction With ID +description: Retrieve account validations transactions with its id via API. +--- + +# Fetch Account Validation Transaction With ID + +## Fetch Account Validation Transactions With ID + +Use this endpoint to retrieve a particulae Fund Account Validation transaction with its id. + +### Request + +```curl: Curl +curl -u : \ + -X GET https://api.razorpay.com/v1/fund_accounts/validations/fav_00000000000001 +``` + +### Response + +```json: Success +{ + "id": "fav_00000000000001", + "entity": "fund_account.validation", + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "account_type": "bank_account", + "bank_account": { + "name": "Gaurav Kumar", + "bank_name": "HDFC", + "ifsc": "HDFC0000053", + "account_number": "765432123456789" + }, + "batch_id": null, + "active": true, + "created_at": 1567064019 + }, + "status": "completed", + "amount": 100, + "currency": "INR", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "results": { + "account_status": "active", + "registered_name": "Gaurav Kumar" + }, + "created_at": 1547566278, + "utr": "XXXXR7310682908954385XX" +} +``` + +### Parameters + +`id`_mandatory_ +: `string` This is the unique identifier linked to the account validation transaction. For example, `fav_00000000000001`. + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account validation. For example, `fav_0000000001`. + +`entity` +: `string` Here it is `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`validation_results` +: `object` Details extracted from the results of the fund account validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar` or `null`. + + `details` + : `string` Brief description of the validation. + + `name_match_score` + : `string` The percentage score indicating how closely the account holder's name matches the records. + +`validated_account_type` +: `string` Here it is `bank_account`. + + `bank_account` + : `object` The contact's bank account details. + + `bank_routing_code` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `account_type` + : `string` The account type being validated. For example `savings`, `current`. + +`status_details` +: `object` Status of the fund account validation. + + `description` + : `string` A brief description stating if the validation is complete or not. + + `source` + : `string` The source from which validation was done. For example, `beneficiary_bank` + + `reason` + : `string` Reason for validation. + +`reference_id` +: `string` Unique reference_id generated for the validation transaction. + +`fund_account` +: `object` The details of the fund account which was validated. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it is `fund_account`. + + `account_type` + : `string` Fund account type. + +`vpa` +: `object` The details associated with the account holder's virtual payment address. + + `address` + : `string` The virtual payment address of the contact whose account is validated. For example, `gaurav.kumar@exampleupi` + +`active` +: `boolean` Possible values of fund account status: + - `true`: active + - `false`: inactive + +`created_at` +: `integer` Timestamp, in unix, when the fund account was created. For example, `1543650891`. + +`contact` +: `object` The contact's details. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` Here it is `contact` + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `email` + : `string` Email address of the contact. + + `contact` + : `string` Phone number of the contact. + + `type` + : `string` Contact Type. For example, `employee`, `contractor`. + + `reference_id` + : `string` Reference id associated with the contact. + + `active` + : `boolean` Possible values of contact status: + - `true`: active + - `false`: inactive diff --git a/llm-content/api/x/account-validation/reverse-penny-drop.md b/llm-content/api/x/account-validation/reverse-penny-drop.md new file mode 100644 index 00000000..bd6723eb --- /dev/null +++ b/llm-content/api/x/account-validation/reverse-penny-drop.md @@ -0,0 +1,188 @@ +--- +title: Validate Bank Account (VPA) via Reverse Penny Drop +description: Validate your contact's bank account instantly via Reverse Penny Drop. +--- + +# Validate Bank Account (VPA) via Reverse Penny Drop + +## Validate VPA using Reverse Penny Drop + +Use this endpoint to validate the bank account details via Reverse Penny Drop. + +### Request + +```curl: Curl +curl -u [YOUR_KEY]:[YOUR_SECRET] \ +-X POST https://api.razorpay.com/v1/fund_accounts/validations \ +-H "Content-Type: application/json" \ +-d '{ + "source_account_number": "7878780080316316", + "validation_type": "upi_intent", + "reference_id": "112233", + "notes": { + "random_key_1": "Make it so", + "random_key_2": "Tea. Earl Grey. Hot." + } +}' +``` + +### Response + +```json: Response - Initial +{ + "id": "fav_00000000000001", + "entity": "fund_account.validation", + "status": "created", + "utr": "123456789012", + "upi_intent": { + "intent_url": "upi://pay?pa=razorpayx@citibank&pn=RZPX%20PRIVATE%20LTD&mc=7413&cu=INR&am=1.00&tn=BAV&ver=01&mode=04&qrMedium=02&tr=RjY7anDJFuKQOB", + "phonepe_url": "phonepe://upi/pay?pa=razorpayx@citibank&pn=RZPX%20PRIVATE%20LTD&mc=7413&cu=INR&am=1.00&tn=BAV&ver=01&mode=04&qrMedium=02&tr=RjY7anDJFuKQOB", + "gpay_url": "tez://upi/pay?pa=razorpayx@citibank&pn=RZPX%20PRIVATE%20LTD&mc=7413&cu=INR&am=1.00&tn=BAV&ver=01&mode=04&qrMedium=02&tr=RjY7anDJFuKQOB", + "paytm_url": "paytmmp://upi/pay?pa=razorpayx@citibank&pn=RZPX%20PRIVATE%20LTD&mc=7413&cu=INR&am=1.00&tn=BAV&ver=01&mode=04&qrMedium=02&tr=RjY7anDJFuKQOB", + "bhim_url": "bhim://upi/pay?pa=razorpayx@citibank&pn=RZPX%20PRIVATE%20LTD&mc=7413&cu=INR&am=1.00&tn=BAV&ver=01&mode=04&qrMedium=02&tr=RjY7anDJFuKQOB", + "encoded_qr_code": "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAABlBMVEX///8AAABVwtN+AAACWUlEQVR42uyYy3E7LRDEe4sDR0IglM1sH+" + }, + "validation_results": { + "account_status": null, + "registered_name": null, + "details": null, + "name_match_score": null, + "validated_account_type": null, + "bank_account": { + "bank_routing_code": null, + "account_number": null, + "bank_name": null, + "account_type": null + } + }, + "status_details": { + "description": "Validation request is created", + "source": "internal", + "reason": "validation_request_created" + }, + "reference_id": "112233", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + } +} +```json: Response - After Payment +{ + "id": "fav_00000000000001", + "entity": "fund_account.validation", + "status": "completed", + "utr": "123456789012", + "validation_results": { + "account_status": "active", + "registered_name": "GAURAV KUMAR", + "validated_account_type": "Bank_Account", + "name_match_score": "00", + "bank_account": { + "bank_routing_code": "HDFC0000053", + "account_number": "765432123456789", + "bank_name": "HDFC Bank", + "account_type": "SAVINGS" + }, + "upi_intent": { + "vpa": "example@upi" + } + } +} +``` + +### Parameters + +`source_account_number` _mandatory_ +: `string` Bank account number being validated. For example, `765432123456789`. + +`validation_type` _mandatory_ +: `string` The method used for validating the bank account. Here, it is `upi_intent`. + +`reference_id` _optional_ +: `string` Unique reference id of the fund account being validated. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`entity` +: `string` Here it will be `fund_account.validation`. + +`status` +: `string` The status of the fund account validation. For example, in the initial response, it could be `created` and in the after payment response, `completed`. + +`utr` +: `string` The Unique Transaction Reference number assigned to the ₹1 UPI payment made by the end user. Use this to track or reconcile the transaction. + +`upi_intent` +: `object` Contains deep links to launch specific UPI apps directly on the user's device, allowing them to complete the ₹1 payment without manually entering details. + + `intent_url` + : `string` A generic UPI deep link that opens the user's default or available UPI app to initiate the payment. + + `phonepe_url` + : `string` A deep link that launches the PhonePe app directly to complete the payment. + + `gpay_url` + : `string` A deep link that launches Google Pay directly to complete the payment. + + `paytm_url` + : `string` A deep link that launches the Paytm app directly to complete the payment. + + `bhim_url` + : `string` A deep link that launches the BHIM app directly to complete the payment. + + `encoded_qr_code` + : `string` A Base64-encoded QR code image. Display this on your interface so users can scan it using any UPI app to complete the ₹1 payment. + +`validation_results` +: `object` Contains the verified account details extracted from the payer's bank after the ₹1 payment is received. + + `account_status` + : `string` Indicates whether the bank account is active and valid. Possible values: `active`, `inactive`. + + `registered_name` + : `string` The account holder's full name as registered with their bank. + + `validated_account_type` + : `string` The type of account validated during the transaction. Possible values: `bank_account`, `vpa`. + + `name_match_score` + : `integer` A numeric score indicating how closely the account holder's registered name matches the name provided during the request. + +`bank_account` +: `object` Contains the verified bank account details of the payer. + + `bank_routing_code` + : `string` The IFSC code of the payer's bank branch, used to identify and route transactions to the correct bank. + + `account_number` + : `string` The payer's bank account number, as retrieved from the bank. + + `bank_name` + : `string` The name of the payer's bank. + + `account_type` + : `string` The type of bank account held by the payer. Possible values: `Savings`, `Current`. + +`status_details` +: `object` Contains details about the status of the validation. + + `description` + : `string` A short note about the validation status. + + `source` + : `string` The source from which the validation was done. + + `reason` + : `string` Reason for the validation. + +`reference_id` +: `string` Unique reference id generated for the validation. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. diff --git a/llm-content/api/x/account-validation/vpa.md b/llm-content/api/x/account-validation/vpa.md new file mode 100644 index 00000000..7b3bdd68 --- /dev/null +++ b/llm-content/api/x/account-validation/vpa.md @@ -0,0 +1,301 @@ +--- +title: Validate a VPA +description: Validate Fund Account of type VPA via API. +--- + +# Validate a VPA + +## Validate a VPA + +Use this endpoint to create a VPA (UPI) account validation transaction. + +### Request + +```curl: Curl +curl -u : \ + -X POST https://api.razorpay.com/v1/fund_accounts/validations \ + -H "Content-Type: application/json" \ + -d '{ + "source_account_number": "7878780080316316", + "validation_type": "pennydrop", + "reference_id": "112233", + "notes": { + "key_1": "value_1", + "key_2": "value_2" + }, + "fund_account": { + "account_type": "vpa", + "vpa": { + "address": "gaurav.kumar@exampleupi" + }, + "contact": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "type": "employee", + "reference_id": "Contact_12345" + } + } + }' +``` + +### Response + +```json: Success +{ + "id": "fav_00000000000001", + "entity": "fund_account.validation", + "status": "completed", + "validation_results": { + "account_status": "active", + "registered_name": "Gaurav Kumar", + "details": "The beneficiary account is valid", + "name_match_score": 100, + "validated_account_type": "bank_account", + "bank_account": { + "bank_routing_code": "ICIC0000047", + "account_number": "XXXXXXXX5599", + "bank_name": "ICICI Bank", + "account_type": "savings" + } + }, + "status_details": { + "description": "Validation request is completed", + "source": "beneficiary_bank", + "reason": "validation_completed" + }, + "reference_id": "112233", + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "account_type": "vpa", + "vpa": { + "address": "gaurav.kumar@exampleupi" + }, + "active": true, + "created_at": 1567064019, + "contact": { + "id": "cont_00000000000001", + "entity": "contact", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "type": "employee", + "reference_id": "Contact_12345", + "active": true + } + } +} + +```json: Failure +{ + "id": "fav_00000000000002", + "entity": "fund_account.validation", + "status": "failed", + "validation_results": { + "account_status": "", + "registered_name": "", + "details": "The beneficiary account is valid", + "name_match_score": 100, + "validated_account_type": + "bank_account": { + "bank_routing_code": null, + "account_number": null, + "bank_name": null, + "account_type": null + } + }, + "fund_account": { + "id": "fa_00000000000002", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "account_type": "vpa", + "vpa": { + "username": "gaurav.kumar", + "handle": "exampleupi", + "address": "gaurav.kumar@exampleupi" + }, + "batch_id": null, + "active": true, + "created_at": 1573110860 + }, + "amount": null, + "currency": null, + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + }, + "created_at": 1574244676, + "utr": null +} +``` + +### Parameters + +`source_account_number` _mandatory_ +: `string` The account from which money should be deducted for the account validation transaction. + - Pass your customer identifier if you want money to be deducted from RazorpayX Lite. + +> **WARN** +> +> +> **Watch Out!** +> +> - This is **not** your contact's bank account number. Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - This value is different for Test Mode and Live Mode. +> + +`validation_type` _mandatory_ +: `string` The method used for validating the bank account. In this case, `pennydrop`. + +`reference_id` _optional_ +: `string` Maximum 40 characters. A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fund_account` _mandatory_ +: `object` The fund account id you want to validate. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `vpa` _mandatory_ + : `string` Target recipient's VPA address. + +`contact` _mandatory_ +: `object` The details of the contact. + +`name`_optional_ +: `string` The customer’s name. For example, Gaurav Kumar. + +`email` _optional_ +: `string` The customer’s email address. For example, gaurav.kumar@example.com. + +`contact`_optional_ +: `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `+919000090000`. + +`type`_optional_ +: `string` Defines the contact type . For example, `employee` + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account validation. For example, `fav_0000000001`. + +`entity` +: `string` Here it is `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`validation_results` +: `object` Details extracted from the results of the fund account validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar` or `null`. + + `details` + : `string` Brief description of the validation. + + `name_match_score` + : `string` The percentage score indicating how closely the account holder's name matches the records. + +`validated_account_type` +: `string` Here it is `bank_account`. + + `bank_account` + : `object` The contact's bank account details. + + `bank_routing_code` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `account_type` + : `string` The account type being validated. For example `savings`, `current`. + +`status_details` +: `object` Status of the fund account validation. + + `description` + : `string` A brief description stating if the validation is complete or not. + + `source` + : `string` The source from which validation was done. For example, `beneficiary_bank` + + `reason` + : `string` Reason for validation. + +`reference_id` +: `string` Unique reference_id generated for the validation transaction. + +`fund_account` +: `object` The details of the fund account which was validated. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it is `fund_account`. + + `account_type` + : `string` Fund account type. + +`vpa` +: `object` The details associated with the account holder's virtual payment address. + + `address` + : `string` The virtual payment address of the contact whose account is validated. For example, `gaurav.kumar@exampleupi` + +`active` +: `boolean` Possible values of fund account status: + - `true`: active + - `false`: inactive + +`created_at` +: `integer` Timestamp, in unix, when the fund account was created. For example, `1543650891`. + +`contact` +: `object` The contact's details. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` Here it is `contact` + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `email` + : `string` Email address of the contact. + + `contact` + : `string` Phone number of the contact. + + `type` + : `string` Contact Type. For example, `employee`, `contractor`. + + `reference_id` + : `string` Reference id associated with the contact. + + `active` + : `boolean` Possible values of contact status: + - `true`: active + - `false`: inactive diff --git a/llm-content/api/x/account-validation/vpa/create-fund-account.md b/llm-content/api/x/account-validation/vpa/create-fund-account.md new file mode 100644 index 00000000..5be46e02 --- /dev/null +++ b/llm-content/api/x/account-validation/vpa/create-fund-account.md @@ -0,0 +1,179 @@ +--- +title: Create a Fund Account of Type VPA +description: Create a Fund Account of the type VPA via API. +--- + +# Create a Fund Account of Type VPA + +## Create a Fund Account of Type VPA + +Use this endpoint to create a fund account with VPA details.- A new fund account is created if any combination of the following details is unique: `contact_id` and `vpa.address`. +- If **all** the above details match the details of an existing fund account, the API returns details of the existing fund account. +- You cannot edit the details of a fund account. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/fund_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "account_type":"vpa", + "contact_id":"cont_00000000000001", + "vpa":{ + "address":"gaurav.kumar@exampleupi" + } +}' +``` + +### Response + +```json: Success +{ + "id": "fa_00000000000002", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "account_type": "vpa", + "vpa": { + "username": "gaurav.kumar", + "handle": "exampleupi", + "address": "gaurav.kumar@exampleupi" + }, + "active": true, + "batch_id": null, + "created_at": 1545223741 +} +``` + +### Parameters + +`contact_id`_mandatory_ +: `string` This is the unique identifier linked to a contact. For example, `cont_00000000000001`. + +`account_type`_mandatory_ +: `string` The fund account type you want to link to the contact ID. Here it is `vpa`. + +`vpa`_mandatory_ +: `object` The contact's virtual payment address (VPA) details. + + `address`_mandatory_ + : `string` Between 3 and 100 characters. Supported characters: `a-z`, `A-Z`, `0-9`, `.`, `-` and one `@`. The virtual payment address. For example, `gauravkumar@exampleupi`. + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account validation. For example, `fav_0000000001`. + +`entity` +: `string` Here it is `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`validation_results` +: `object` Details extracted from the results of the fund account validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar` or `null`. + + `details` + : `string` Brief description of the validation. + + `name_match_score` + : `string` The percentage score indicating how closely the account holder's name matches the records. + +`validated_account_type` +: `string` Here it is `bank_account`. + + `bank_account` + : `object` The contact's bank account details. + + `bank_routing_code` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `account_type` + : `string` The account type being validated. For example `savings`, `current`. + +`status_details` +: `object` Status of the fund account validation. + + `description` + : `string` A brief description stating if the validation is complete or not. + + `source` + : `string` The source from which validation was done. For example, `beneficiary_bank` + + `reason` + : `string` Reason for validation. + +`reference_id` +: `string` Unique reference_id generated for the validation transaction. + +`fund_account` +: `object` The details of the fund account which was validated. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it is `fund_account`. + + `account_type` + : `string` Fund account type. + +`vpa` +: `object` The details associated with the account holder's virtual payment address. + + `address` + : `string` The virtual payment address of the contact whose account is validated. For example, `gaurav.kumar@exampleupi` + +`active` +: `boolean` Possible values of fund account status: + - `true`: active + - `false`: inactive + +`created_at` +: `integer` Timestamp, in unix, when the fund account was created. For example, `1543650891`. + +`contact` +: `object` The contact's details. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` Here it is `contact` + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `email` + : `string` Email address of the contact. + + `contact` + : `string` Phone number of the contact. + + `type` + : `string` Contact Type. For example, `employee`, `contractor`. + + `reference_id` + : `string` Reference id associated with the contact. + + `active` + : `boolean` Possible values of contact status: + - `true`: active + - `false`: inactive diff --git a/llm-content/api/x/composite-account-validation.md b/llm-content/api/x/composite-account-validation.md new file mode 100644 index 00000000..44181efb --- /dev/null +++ b/llm-content/api/x/composite-account-validation.md @@ -0,0 +1,40 @@ +--- +title: Fund/Bank Account Validation Composite +heading: Account Validation Composite +description: Composite Account Validation for RazorpayX, APIs and webhook payload. Validate your customers’ bank account or VPA with a single API before you make payouts. +--- + +# Account Validation Composite + +Composite Account Validation API allows you to create a Contact [Linked Text](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/create.md), the contact's Fund Account (bank account or UPI) and validate it in a single API call. + +> **WARN** +> +> +> **Watch Out!** +> +> Account Validation is not available in test mode and is possible only for RazorpayX Lite. +> + +To make an account validation transaction, you must [allowlist your IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md), [Create a Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation/create-contact.md) and Create a Fund Account for the Contact using either [bank account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation/bank-account/create-fund-account.md) or [VPA details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation/vpa/create-fund-account.md). + +### Related Guides + +[About Fund Account Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-account-validation.md) +[Set up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) +[Webhooks Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/account-validation.md) + +### Endpoints + + +- **post** `/v1/fund_accounts/validations` - Validate a Bank Account: +Creates and validates the contact's bank account. + +- **post** `/v1/fund_accounts/validations` - Validate a VPA: +Creates and validates the contact's virtual payment address or UPI fund account. + +- **get** `/v1/fund_accounts/validations?account_number={account number}` - Fetch All Account Validation Transactions: +Retrieves the details of all Fund Account Validation transactions you have made. + +- **get** `/v1/fund_accounts/validations/:id` - Fetch Account Validation Transactions With ID: +Retrieves particular Fund Account Validation transaction with its id. diff --git a/llm-content/api/x/composite-account-validation/bank-account.md b/llm-content/api/x/composite-account-validation/bank-account.md new file mode 100644 index 00000000..1ca02a4b --- /dev/null +++ b/llm-content/api/x/composite-account-validation/bank-account.md @@ -0,0 +1,391 @@ +--- +title: Validate a Bank Account +description: Create Contact, Fund account and Validate Fund Account of type bank account via a single API. +--- + +# Validate a Bank Account + +## Validate a Bank Account + +Use this endpoint to create contact, fund account and validate the bank account in a single API call. + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/fund_accounts/validations \ +-H "Content-Type: application/json" \ +-d '{ + "source_account_number": "7878780080316316", + "validation_type": "optimized", + "reference_id": "112233", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "fund_account": { + "account_type":"bank_account", + "bank_account":{ + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053", + "account_number":"765432123456789" + }, + "contact": { + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456789", + "type":"employee", + "reference_id":"Acme Contact ID 12345", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } + } + } +}' +``` + +### Response + +```json: Created +{ + "id": "fav_00000000000001", + "entity": "fund_account.validation", + "status": "created", + "utr" : "123456789012", + "validation_results": { + "account_status": null, + "registered_name": null, + "details": null, + "name_match_score": null + }, + "status_details": { + "description": "Validation request is created", + "source": "internal", + "reason": "validation_request_created" + }, + "reference_id": "112233", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "account_type": "bank_account", + "bank_account": { + "name": "Gaurav Kumar", + "bank_name": "HDFC", + "ifsc": "HDFC0000053", + "account_number": "765432123456789" + }, + "active": true, + "created_at": 1567064019, + "contact": { + "id": "cont_00000000000001", + "entity": "contact", + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456789", + "type":"employee", + "reference_id":"Acme Contact ID 12345", + "active": true, + "created_at": 1567064019, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } + } + } +} +```json: Completed +{ + "id": "fav_00000000000001", + "entity": "fund_account.validation", + "status": "completed", + "utr" : "123456789012", + "validation_results": { + "account_status": "active", + "registered_name": "Gaurav Kumar", + "details": "The beneficiary account is valid." , + "name_match_score": 100 + }, + "status_details": { + "description": "Validation request is completed", + "source": "beneficiary_bank", + "reason": "validation_completed" + }, + "reference_id": "112233", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "account_type": "bank_account", + "bank_account": { + "name": "Gaurav Kumar", + "bank_name": "HDFC", + "ifsc": "HDFC0000053", + "account_number": "765432123456789" + }, + "active": true, + "created_at": 1567064019, + "contact": { + "id": "cont_00000000000001", + "entity": "contact", + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456789", + "type":"employee", + "reference_id":"Acme Contact ID 12345", + "active": true, + "created_at": 1567064019, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } + } + } +} +```json: Failed +{ + "id": "fav_00000000000001", + "entity": "fund_account.validation", + "status": "failed", + "validation_results": { + "account_status": "", + "registered_name": "", + "details": null, + "name_match_score": null + }, + "status_details": { + "description": "Validation failed due to a temporary technical issue at the partner bank. Please retry after 30 min.", + "source": "gateway", + "reason": "gateway_technical_error" + }, + "reference_id": "112233", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "account_type": "bank_account", + "bank_account": { + "name": "Gaurav Kumar", + "bank_name": "HDFC", + "ifsc": "HDFC0000053", + "account_number": "765432123456789" + }, + "active": true, + "created_at": 1567064019, + "contact": { + "id": "cont_00000000000001", + "entity": "contact", + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456789", + "type":"employee", + "reference_id":"112233", + "active": true, + "created_at": 1567064019, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } + } + } +} +``` + +### Parameters + +`source_account_number` _mandatory_ +: `string` The account from which money should be deducted for the account validation transaction. + +`validation_type` _optional_ +: `string` The chosen type of validation. Possible values: - `pennydrop`: Razorpay will make a transaction for validation. +- `penniless`: Razorpay will validate the account without a transaction. +- `optimized` (default): Razorpay will decide whether the validation requires a transaction or not. + +`fund_account` _mandatory_ +: `object` Fund account details to which the payout was made. + + `account_type` _mandatory_ + : `string` The fund account type being created. Here it will be `bank_account`. + + `bank_account` _mandatory_ + : `object` The contact's bank account details. + + `name` _optional_ + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` _mandatory_ + : `string` Beneficiary account number. For example, `765432123456789`. + +`contact` _mandatory_ +: `object` Contact details to which the payout was made. + + `name` _mandatory_ + : `string` The contact's name. For example, `Gaurav Kumar`. + + `email` _optional_ + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `contact` _optional_ + : `string` The contact's phone number. For example, `9000090000`. + + `type` _optional_ + : `string` A classification for the contact being created. For example, `employee`. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`reference_id` _optional_ +: `string` A user-generated reference given to the payout. Maximum length is 40 characters. For example, `112233`. You can use this field to store your own transaction ID, if any. + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account. For example, `fav_000000000001`. + +`entity` +: `string` Here it will be `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`utr` +: `string` A 12-digit unique identifier for the successful IMPS fund account validation transaction. For example, `123456789012`. + +`validation_results` +: `object` Result of the validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar`. + + `details` + : `string` Details of the beneficiary account depending on the validation result. + + `name_match_score` + : `string` A score between 0 - 100. - `100`: The name provided by you and the bank registered name are the same. +- `0`: There is no match between the name provided by you and the bank registered name. +- Between `0` & `100`: There is a partial match between the name provided by you and the bank registered name. + + `validated_account_type` + : `string` Returns the underlying account type for the UPI ID, this can be a bank account, wallet, card or credit line. + + `bank_account` + : `object` Returns the details of validated bank account. + + `bank_routing_code` + : `string` Returns the IFSC of the account number. For example, `ICIC0000047`. + + `account_number` + : `string` Returns the primary account number linked to the VPA (UPI). + + `bank_name` + : `string` Returns the financial institution/bank name of the primary account linked to the UPI ID. For example, `ICICI Bank`. + + `account_type` + : `string` Returns the account type. For example, `saving` or `current`. + + +`status_details` +: `object` This parameter returns the current status of the customer's bank account. + + `description` + : `string` A description for the status. For example, `Validation request is completed`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The reason for the status, based on the description. For example, `validation_completed`. + +`fund_account` +: `object` Fund account details to which the payout was made. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it will be `fund_account`. + + `account_type` + : `string` The fund account type being created. Here it will either be `bank_account` or `vpa`. + + `bank_account` + : `object` The contact's bank account details. + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `ifsc` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `vpa` + : `object` The contact's virtual payment address (VPA) details. + + `address` + : `string` The virtual payment address. For example, `gaurav.kumar@exampleupi`. + +`contact` +: `object` Contact details to which the payout was made. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `type` + : `string` A classification for the contact being created. For example, `employee`. + + `reference_id` + : `string` A user-generated reference given to the payout. Maximum length is 40 characters. For example, `112233`. You can use this field to store your own transaction ID, if any. + + `active` + : `boolean` Possible values of Fund Account status: + - `true`: active + - `false`: inactive + + `created_at` + : `integer` Timestamp, in Unix, when the fund account was created. For example, `1543650891`. + + `notes` + : `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty"`. diff --git a/llm-content/api/x/composite-account-validation/entity.md b/llm-content/api/x/composite-account-validation/entity.md new file mode 100644 index 00000000..09559bfc --- /dev/null +++ b/llm-content/api/x/composite-account-validation/entity.md @@ -0,0 +1,203 @@ +--- +title: Composite Fund/Bank Account Validation +heading: Composite Account Validation Entity +description: Overview of Composite Account Validation for RazorpayX, APIs and webhook payload. Validate your customers’ bank account or VPA with a single API before you make payouts. +--- + +# Composite Account Validation Entity + +The Account Validation entity has the following parameters: + +### Response + +```json: Sample Entity +{ + "id": "fav_00000000000001", + "entity": "fund_account.validation", + "status": "completed", + "validation_results": { + "account_status": "valid", + "registered_name": "Gaurav Kumar", + "details": "The beneficiary account is valid." , + "name_match_score": 100 + }, + "status_details": { + "description": "Validation request is completed", + "source": "beneficiary_bank", + "reason": "validation_completed" + }, + "reference_id": "112233", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "account_type": "bank_account", + "bank_account": { + "name": "Gaurav Kumar", + "bank_name": "HDFC", + "ifsc": "HDFC0000053", + "account_number": "765432123456789" + }, + "active": true, + "created_at": 1567064019, + "contact": { + "id": "cont_00000000000001", + "entity": "contact", + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456789", + "type":"employee", + "reference_id":"Acme Contact ID 12345", + "active": true, + "created_at": 1567064019, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } + } + } +} +``` + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account. For example, `fav_000000000001`. + +`entity` +: `string` Here it will be `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`utr` +: `string` A 12-digit unique identifier for the successful IMPS fund account validation transaction. For example, `123456789012`. + +`validation_results` +: `object` Result of the validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar`. + + `details` + : `string` Details of the beneficiary account depending on the validation result. + + `name_match_score` + : `string` A score between 0 - 100. - `100`: The name provided by you and the bank registered name are the same. +- `0`: There is no match between the name provided by you and the bank registered name. +- Between `0` & `100`: There is a partial match between the name provided by you and the bank registered name. + + `validated_account_type` + : `string` Returns the underlying account type for the UPI ID, this can be a bank account, wallet, card or credit line. + + `bank_account` + : `object` Returns the details of validated bank account. + + `bank_routing_code` + : `string` Returns the IFSC of the account number. For example, `ICIC0000047`. + + `account_number` + : `string` Returns the primary account number linked to the VPA (UPI). + + `bank_name` + : `string` Returns the financial institution/bank name of the primary account linked to the UPI ID. For example, `ICICI Bank`. + + `account_type` + : `string` Returns the account type. For example, `saving` or `current`. + + +`status_details` +: `object` This parameter returns the current status of the customer's bank account. + + `description` + : `string` A description for the status. For example, `Validation request is completed`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The reason for the status, based on the description. For example, `validation_completed`. + +`fund_account` +: `object` Fund account details to which the payout was made. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it will be `fund_account`. + + `account_type` + : `string` The fund account type being created. Here it will either be `bank_account` or `vpa`. + + `bank_account` + : `object` The contact's bank account details. + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `ifsc` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `vpa` + : `object` The contact's virtual payment address (VPA) details. + + `address` + : `string` The virtual payment address. For example, `gaurav.kumar@exampleupi`. + +`contact` +: `object` Contact details to which the payout was made. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `type` + : `string` A classification for the contact being created. For example, `employee`. + + `reference_id` + : `string` A user-generated reference given to the payout. Maximum length is 40 characters. For example, `112233`. You can use this field to store your own transaction ID, if any. + + `active` + : `boolean` Possible values of Fund Account status: + - `true`: active + - `false`: inactive + + `created_at` + : `integer` Timestamp, in Unix, when the fund account was created. For example, `1543650891`. + + `notes` + : `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty"`. diff --git a/llm-content/api/x/composite-account-validation/fetch-all-transactions.md b/llm-content/api/x/composite-account-validation/fetch-all-transactions.md new file mode 100644 index 00000000..39bf5e40 --- /dev/null +++ b/llm-content/api/x/composite-account-validation/fetch-all-transactions.md @@ -0,0 +1,297 @@ +--- +title: Fetch All Account Validation Transactions +description: Retrieve all account validations transactions via API. +--- + +# Fetch All Account Validation Transactions + +## Fetch All Account Validation Transactions + +Use this endpoint to retrieve the details of all Fund Account Validation transactions you have made. + +### Request + +```curl: Curl +curl -u : \ + -X GET https://api.razorpay.com/v1/fund_accounts/validations?account_number=7878780080316316 +``` + +### Response + +```json: Success +{ + "entity":"collection", + "count":2, + "items":[ + { + "id": "fav_00000000000001", + "entity": "fund_account.validation", + "status": "completed", + "validation_results": { + "account_status": "active", + "registered_name": "Gaurav Kumar", + "details": "The beneficiary account is valid." , + "name_match_score": 100 + }, + "status_details": { + "description": "Validation request is completed", + "source": "beneficiary_bank", + "reason": "validation_completed" + }, + "reference_id": "112233", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "account_type": "bank_account", + "bank_account": { + "name": "Gaurav Kumar", + "bank_name": "HDFC", + "ifsc": "HDFC0000053", + "account_number": "765432123456789" + }, + "active": true, + "created_at": 1567064019, + "contact": { + "id": "cont_00000000000001", + "entity": "contact", + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456789", + "type":"employee", + "reference_id":"Acme Contact ID 12345", + "active": true, + "created_at": 1567064019, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } + } + } + }, + { + "id": "fav_00000000000002", + "entity": "fund_account.validation", + "status": "completed", + "validation_results": { + "account_status": "active", + "registered_name": "Gauri Kumari", + "details": "The beneficiary account is valid." , + "name_match_score": 100 + }, + "status_details": { + "description": "Validation request is completed", + "source": "beneficiary_bank", + "reason": "validation_completed" + }, + "reference_id": "112244", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "fund_account": { + "id": "fa_00000000000002", + "entity": "fund_account", + "account_type": "bank_account", + "bank_account": { + "name": "Gauri Kumari", + "bank_name": "HDFC", + "ifsc": "HDFC0000054", + "account_number": "765432123456798" + }, + "active": true, + "created_at": 1567064019, + "contact": { + "id": "cont_00000000000002", + "entity": "contact", + "name":"Gauri Kumari", + "email":"gauri.kumari@example.com", + "contact":"9999999999", + "type":"employee", + "reference_id":"Acme Contact ID 12354", + "active": true, + "created_at": 1567064120, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } + } + } + } + ] +} +``` + +### Parameters + +`account_number`_mandatory_ +: `string` The account that was used to debit money for validation transaction. +Account details can be found on the RazorpayX Dashboard. For example, `7878780080316316`. + - Pass your Customer Identifier (RazorpayX Lite number) if money was deducted from RazorpayX Lite. + - Pass your Current Account number if money was deducted from your Current Account. + - This is an alphanumeric or numeric value. + + +> **WARN** +> +> +> **Watch Out!** +> +> - Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - This value is different for Test Mode and Live Mode. +> + +`from`_optional_ +: `integer` Timestamp in Unix from when you want to fetch payouts. + +`to`_optional_ +: `integer` Timestamp in Unix till when you want to fetch payouts. + +`count`_optional_ +: `integer` Number of payouts to be retrieved. Default value is `10`. Maximum value is `100`. This can be used for pagination, in combination with `skip`. + +`skip`_optional_ +: `integer` Number of payouts to be skipped. Default value is `0`. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account. For example, `fav_000000000001`. + +`entity` +: `string` Here it will be `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`utr` +: `string` A 12-digit unique identifier for the successful IMPS fund account validation transaction. For example, `123456789012`. + +`validation_results` +: `object` Result of the validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar`. + + `details` + : `string` Details of the beneficiary account depending on the validation result. + + `name_match_score` + : `string` A score between 0 - 100. - `100`: The name provided by you and the bank registered name are the same. +- `0`: There is no match between the name provided by you and the bank registered name. +- Between `0` & `100`: There is a partial match between the name provided by you and the bank registered name. + + `validated_account_type` + : `string` Returns the underlying account type for the UPI ID, this can be a bank account, wallet, card or credit line. + + `bank_account` + : `object` Returns the details of validated bank account. + + `bank_routing_code` + : `string` Returns the IFSC of the account number. For example, `ICIC0000047`. + + `account_number` + : `string` Returns the primary account number linked to the VPA (UPI). + + `bank_name` + : `string` Returns the financial institution/bank name of the primary account linked to the UPI ID. For example, `ICICI Bank`. + + `account_type` + : `string` Returns the account type. For example, `saving` or `current`. + + +`status_details` +: `object` This parameter returns the current status of the customer's bank account. + + `description` + : `string` A description for the status. For example, `Validation request is completed`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The reason for the status, based on the description. For example, `validation_completed`. + +`fund_account` +: `object` Fund account details to which the payout was made. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it will be `fund_account`. + + `account_type` + : `string` The fund account type being created. Here it will either be `bank_account` or `vpa`. + + `bank_account` + : `object` The contact's bank account details. + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `ifsc` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `vpa` + : `object` The contact's virtual payment address (VPA) details. + + `address` + : `string` The virtual payment address. For example, `gaurav.kumar@exampleupi`. + +`contact` +: `object` Contact details to which the payout was made. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `type` + : `string` A classification for the contact being created. For example, `employee`. + + `reference_id` + : `string` A user-generated reference given to the payout. Maximum length is 40 characters. For example, `112233`. You can use this field to store your own transaction ID, if any. + + `active` + : `boolean` Possible values of Fund Account status: + - `true`: active + - `false`: inactive + + `created_at` + : `integer` Timestamp, in Unix, when the fund account was created. For example, `1543650891`. + + `notes` + : `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty"`. diff --git a/llm-content/api/x/composite-account-validation/fetch-transactions-with-id.md b/llm-content/api/x/composite-account-validation/fetch-transactions-with-id.md new file mode 100644 index 00000000..3b0047b6 --- /dev/null +++ b/llm-content/api/x/composite-account-validation/fetch-transactions-with-id.md @@ -0,0 +1,216 @@ +--- +title: Fetch Account Validation Transaction With ID +description: Retrieve account validations transactions with its id via API. +--- + +# Fetch Account Validation Transaction With ID + +## Fetch Account Validation Transactions With ID + +Use this endpoint to retrieve a particular Fund Account Validation transaction with its id. + +### Request + +```curl: Curl +curl -u : \ + -X GET https://api.razorpay.com/v1/fund_accounts/validations/fav_00000000000001 +``` + +### Response + +```json: Success +{ + "id": "fav_00000000000001", + "entity": "fund_account.validation", + "status": "completed", + "validation_results": { + "account_status": "valid", + "registered_name": "Gaurav Kumar", + "details": "The beneficiary account is valid.", + "name_match_score": 100 + }, + "status_details": { + "description": "Validation request is completed", + "source": "beneficiary_bank", + "reason": "validation_completed" + }, + "reference_id": "112233", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "account_type": "bank_account", + "bank_account": { + "name": "Gaurav Kumar", + "bank_name": "HDFC", + "ifsc": "HDFC0000053", + "account_number": "765432123456789" + }, + "active": true, + "created_at": 1567064019, + "contact": { + "id": "cont_00000000000001", + "entity": "contact", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "active": true, + "created_at": 1567064019, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + } + } + } +} +``` + +### Parameters + +`id`_mandatory_ +: `string` This is the unique identifier linked to the account validation transaction. For example, `fav_00000000000001`. + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account. For example, `fav_000000000001`. + +`entity` +: `string` Here it will be `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`utr` +: `string` A 12-digit unique identifier for the successful IMPS fund account validation transaction. For example, `123456789012`. + +`validation_results` +: `object` Result of the validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar`. + + `details` + : `string` Details of the beneficiary account depending on the validation result. + + `name_match_score` + : `string` A score between 0 - 100. - `100`: The name provided by you and the bank registered name are the same. +- `0`: There is no match between the name provided by you and the bank registered name. +- Between `0` & `100`: There is a partial match between the name provided by you and the bank registered name. + + `validated_account_type` + : `string` Returns the underlying account type for the UPI ID, this can be a bank account, wallet, card or credit line. + + `bank_account` + : `object` Returns the details of validated bank account. + + `bank_routing_code` + : `string` Returns the IFSC of the account number. For example, `ICIC0000047`. + + `account_number` + : `string` Returns the primary account number linked to the VPA (UPI). + + `bank_name` + : `string` Returns the financial institution/bank name of the primary account linked to the UPI ID. For example, `ICICI Bank`. + + `account_type` + : `string` Returns the account type. For example, `saving` or `current`. + + +`status_details` +: `object` This parameter returns the current status of the customer's bank account. + + `description` + : `string` A description for the status. For example, `Validation request is completed`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The reason for the status, based on the description. For example, `validation_completed`. + +`fund_account` +: `object` Fund account details to which the payout was made. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it will be `fund_account`. + + `account_type` + : `string` The fund account type being created. Here it will either be `bank_account` or `vpa`. + + `bank_account` + : `object` The contact's bank account details. + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `ifsc` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `vpa` + : `object` The contact's virtual payment address (VPA) details. + + `address` + : `string` The virtual payment address. For example, `gaurav.kumar@exampleupi`. + +`contact` +: `object` Contact details to which the payout was made. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `type` + : `string` A classification for the contact being created. For example, `employee`. + + `reference_id` + : `string` A user-generated reference given to the payout. Maximum length is 40 characters. For example, `112233`. You can use this field to store your own transaction ID, if any. + + `active` + : `boolean` Possible values of Fund Account status: + - `true`: active + - `false`: inactive + + `created_at` + : `integer` Timestamp, in Unix, when the fund account was created. For example, `1543650891`. + + `notes` + : `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty"`. diff --git a/llm-content/api/x/composite-account-validation/vpa.md b/llm-content/api/x/composite-account-validation/vpa.md new file mode 100644 index 00000000..889ca672 --- /dev/null +++ b/llm-content/api/x/composite-account-validation/vpa.md @@ -0,0 +1,370 @@ +--- +title: Validate a VPA +description: Create Contact, Fund account and validate Fund Account of type VPA via a single API. +--- + +# Validate a VPA + +## Validate a VPA + +Use this endpoint to create contact, fund account and validate VPA (UPI) in a single API call. + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/fund_accounts/validations \ +-H "Content-Type: application/json" \ +-d '{ + "source_account_number": "7878780080316316", + "reference_id": "112233", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "fund_account": { + "account_type":"vpa", + "vpa":{ + "address":"gaurav.kumar@exampleupi" + } + "contact": { + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456789", + "type":"employee", + "reference_id":"Acme Contact ID 12345", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } + } + } + } +}' +``` + +### Response + +```json: Created +{ + "id": "fav_00000000000001", + "entity": "fund_account.validation", + "status": "created", + "utr" : "123456789012", + "validation_results": { + "account_status": null, + "registered_name": null, + "details": null, + "name_match_score": null + }, + "status_details": { + "description": "Validation request is created", + "source": "internal", + "reason": "validation_request_created" + }, + "reference_id": "112233", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "account_type":"vpa", + "vpa":{ + "address":"gaurav.kumar@exampleupi" + }, + "active": true, + "created_at": 1567064019, + "contact": { + "id": "cont_00000000000001", + "entity": "contact", + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456789", + "type":"employee", + "reference_id":"Acme Contact ID 12345", + "active": true, + "created_at": 1567064019, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } + } + } +} +```json: Completed +{ + "id": "fav_00000000000001", + "entity": "fund_account.validation", + "status": "completed", + "utr": "123456789012", + "validation_results": { + "account_status": "active", + "registered_name": "Gaurav Kumar", + "details": "The beneficiary account is valid.", + "name_match_score": 100, + "validated_account_type" : "bank account", + "bank_account": { + "bank_routing_code": "ICIC0000047", + "account_number": "1121431121541121", + "bank_name": "ICICI Bank", + "account_type": "saving" + } + }, + "status_details": { + "description": "Validation request is completed", + "source": "beneficiary_bank", + "reason": "validation_completed" + }, + "reference_id": "112233", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "account_type": "vpa", + "vpa": { + "address": "gaurav.kumar@exampleupi" + }, + "active": true, + "created_at": 1567064019, + "contact": { + "id": "cont_00000000000001", + "entity": "contact", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "active": true, + "created_at": 1567064019, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + } + } + } +} + +```json: Failed +{ + "id": "fav_00000000000002", + "entity": "fund_account.validation", + "fund_account": { + "id": "fa_00000000000002", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "account_type": "vpa", + "vpa": { + "username": "gaurav.kumar", + "handle": "exampleupi", + "address": "gaurav.kumar@exampleupi" + }, + "batch_id": null, + "active": true, + "created_at": 1573110860 + }, + "status": "failed", + "amount": null, + "currency": null, + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "validation_results": { + "account_status": "", + "registered_name": "", + "details": null, + "name_match_score": null, + "bank_account": { + "bank_name": null, + "ifsc": null, + "account_number": null, + "account_type": null + } + }, + "created_at": 1574244676, + "utr": null +} +``` + +### Parameters + +`source_account_number` _mandatory_ +: `string` The account from which money should be deducted for the account validation transaction. + +`fund_account` _mandatory_ +: `object` Fund account details to which the payout was made. + + `account_type` _mandatory_ + : `string` The fund account type being created. Here it will be `vpa`. + + `vpa` + : `object` The contact's virtual payment address (VPA) details. + + `address` + : `string` The virtual payment address. For example, `gaurav.kumar@exampleupi`. + + `contact` _optional_ + : `object` Contact details to which the payout was made. + + `name` _optional_ + : `string` The contact's name. For example, `Gaurav Kumar`. + + `email` _optional_ + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `contact` _optional_ + : `string` The contact's phone number. For example, `9000090000`. + + `type` _optional_ + : `string` A classification for the contact being created. For example, `employee`. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`reference_id` _optional_ +: `string` A user-generated reference given to the payout. Maximum length is 40 characters. For example, `112233`. You can use this field to store your own transaction ID, if any. + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account. For example, `fav_000000000001`. + +`entity` +: `string` Here it will be `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`utr` +: `string` A 12-digit unique identifier for the successful IMPS fund account validation transaction. For example, `123456789012`. + +`validation_results` +: `object` Result of the validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar`. + + `details` + : `string` Details of the beneficiary account depending on the validation result. + + `name_match_score` + : `string` A score between 0 - 100. - `100`: The name provided by you and the bank registered name are the same. +- `0`: There is no match between the name provided by you and the bank registered name. +- Between `0` & `100`: There is a partial match between the name provided by you and the bank registered name. + + `validated_account_type` + : `string` Returns the underlying account type for the UPI ID, this can be a bank account, wallet, card or credit line. + + `bank_account` + : `object` Returns the details of validated bank account. + + `bank_routing_code` + : `string` Returns the IFSC of the account number. For example, `ICIC0000047`. + + `account_number` + : `string` Returns the primary account number linked to the VPA (UPI). + + `bank_name` + : `string` Returns the financial institution/bank name of the primary account linked to the UPI ID. For example, `ICICI Bank`. + + `account_type` + : `string` Returns the account type. For example, `saving` or `current`. + + +`status_details` +: `object` This parameter returns the current status of the customer's bank account. + + `description` + : `string` A description for the status. For example, `Validation request is completed`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The reason for the status, based on the description. For example, `validation_completed`. + +`fund_account` +: `object` Fund account details to which the payout was made. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it will be `fund_account`. + + `account_type` + : `string` The fund account type being created. Here it will either be `bank_account` or `vpa`. + + `bank_account` + : `object` The contact's bank account details. + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `ifsc` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `vpa` + : `object` The contact's virtual payment address (VPA) details. + + `address` + : `string` The virtual payment address. For example, `gaurav.kumar@exampleupi`. + +`contact` +: `object` Contact details to which the payout was made. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `type` + : `string` A classification for the contact being created. For example, `employee`. + + `reference_id` + : `string` A user-generated reference given to the payout. Maximum length is 40 characters. For example, `112233`. You can use this field to store your own transaction ID, if any. + + `active` + : `boolean` Possible values of Fund Account status: + - `true`: active + - `false`: inactive + + `created_at` + : `integer` Timestamp, in Unix, when the fund account was created. For example, `1543650891`. + + `notes` + : `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty"`. diff --git a/llm-content/api/x/contacts.md b/llm-content/api/x/contacts.md new file mode 100644 index 00000000..68bff000 --- /dev/null +++ b/llm-content/api/x/contacts.md @@ -0,0 +1,37 @@ +--- +title: Contacts +description: List of Contacts APIs to create, retrieve, update and delete RazorpayX Contacts. +--- + +# Contacts + +A contact is an entity to whom payouts can be made through various supported modes like UPI, IMPS, NEFT and RTGS, Cards and more. Know more about [Contacts and Fund Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md). + + +It is mandatory to [allowlist the IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) that you use while making payouts via APIs, else the request will fail. In case of errors, you can refer to the error codes in the respective API endpoint pages. + +Fork the Razorpay Postman Public Workspace and try the Contacts APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-46855750-fa22-46cd-9fa2-2f294507ec22) + +### Related Guides + +[About Contacts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) + +### Endpoints + +- **post** `/v1/contacts` - Create a Contact: +Creates a new Contact with phone number/email id. + +- **patch** `/v1/contacts/:id` - Update a Contact: +Updates a particular Contact's details. + +- **get** `/v1/contacts` - Retrieve All Contacts: +Retrieves all Contacts created in your RazorpayX account. + +- **get** `/v1/contacts/:id` - Retrieve Contact With ID: +Retrieves a single Contact with ID. + +- **patch** `/v1/contacts/:id` - Activate or Deactivate a Contact: +Activates or deactivates an existing contact. diff --git a/llm-content/api/x/contacts/activate-or-deactivate.md b/llm-content/api/x/contacts/activate-or-deactivate.md new file mode 100644 index 00000000..fe740043 --- /dev/null +++ b/llm-content/api/x/contacts/activate-or-deactivate.md @@ -0,0 +1,113 @@ +--- +title: Activate or Deactivate a Contact +description: Activate or Deactivate a Contact using APIs. +--- + +# Activate or Deactivate a Contact + +## Activate or Deactivate a Contact + +Use this endpoint to activate or deactivate a contact. This helps you block payouts to certain contacts, as and when required. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PATCH https://api.razorpay.com/v1/contacts/cont_00000000000001 \ +-H "Content-Type: application/json" \ +-d '{ + "active": false +}' +``` + +### Response + +```json: Success +{ + "id": "cont_00000000000001", + "entity": "contact", + "name": "Gaurav Kumar", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": false, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1545320320 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "cont_00000000000001 is not a valid id.", + "source": "business", + "step": null, + "reason": "input_validation_failed", + "metadata": {}, + "field": "id" + } +} +``` + +### Parameters + +`id`_mandatory_ +: `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + +### Parameters + +`active`_mandatory_ +: `boolean` Represents the state to which you want to move the contact. A contact can have the following two states: + - `true` (default) : active + - `false` : inactive + + Pass `false` to deactivate an active contact and pass `true` to activate a deactivated contact. + +### Parameters + +`id` +: `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + +`entity` +: `string` The entity being created. Here, it is `contact`. + +`name` +: `string` The contact's name. For example, `Gaurav Kumar`. + +`contact` +: `string` The contact's phone number. For example, `9000090000`. + +`email` +: `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`type` +: `string` A classification for the contact being created. For example, `employee`. + +`reference_id` +: `string` A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`active` +: `boolean` Possible values: + - `true` (default) : active + - `false` : inactive + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + +### Errors + +`` is not a valid id. +* code: 4xx +* description: The contact id entered in the request body is invalid/does not exist. +* solution: Enter the correct Contact ID. You can find the Contact ID: - In the response body of [create a Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/create.md) API. +- On the [RazorpayX Dashboard.](http://x.razorpay.com/auth) diff --git a/llm-content/api/x/contacts/create.md b/llm-content/api/x/contacts/create.md new file mode 100644 index 00000000..f0290453 --- /dev/null +++ b/llm-content/api/x/contacts/create.md @@ -0,0 +1,147 @@ +--- +title: Create a Contact +description: Create a Contact using API. +--- + +# Create a Contact + +## Create a Contact + +Use this endpoint to create a new contact.- A new contact is created if any combination of the following details is unique: `name`, `email`, `contact`, `type` and `reference_id`. +- If **all** the above details match the details of an existing contact, the API returns details of the existing contact. + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/contacts \ +-H "Content-Type: application/json" \ +-d '{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9000090000", + "type":"employee", + "reference_id":"Acme Contact ID 12345", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' +``` + +### Response + +```json: Success +{ + "id": "cont_00000000000001", + "entity": "contact", + "name": "Gaurav Kumar", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1545320320 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Invalid type: employee", + "source": "business", + "step": null, + "reason": "input_validation_failed", + "metadata": {}, + "field": "type" + } +} +``` + +### Parameters + +`name`_mandatory_ +: `string` The contact's name. This field is case-sensitive. A minimum of 3 characters and a maximum of 50 characters are allowed. Name cannot end with a special character, except `.`. Supported characters: `a-z`, `A-Z`, `0-9`, `space`, `’` , `-` , `_` , `/` , `(` , `)` and , `.`. For example, `Gaurav Kumar`. + +`email`_optional_ +: `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`contact`_optional_ +: `string` The contact's phone number. For example, `9000090000`. + +`type`_optional_ +: `string` Maximum 40 characters. Classification for the contact being created. For example, `employee`. The following classifications are available by default: + - `vendor` + - `customer` + - `employee` + - `self` + + + Additional classifications can be created via the [Dashboard](https://x.razorpay.com/) and then used in APIs. It is not possible to create new classifications via API. + +`reference_id`_optional_ +: `string` Maximum 40 characters. A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + +`entity` +: `string` The entity being created. Here, it is `contact`. + +`name` +: `string` The contact's name. For example, `Gaurav Kumar`. + +`contact` +: `string` The contact's phone number. For example, `9000090000`. + +`email` +: `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`type` +: `string` A classification for the contact being created. For example, `employee`. + +`reference_id` +: `string` A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`active` +: `boolean` Possible values: + - `true` (default) : active + - `false` : inactive + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + +### Errors + +The `name` field is required. +* code: 4xx +* description: The `name` field is missing in the request body. +* solution: Enter the details in the recommended format as per the request body. + +The `name` field is invalid. +* code: 4xx +* description: There are special characters used in the `name` field. +* solution: Enter details as per the format recommended for Create a Contact request for `name` field. + +Invalid type: `contact_typeA` +* code: 4xx +* description: - There are special characters in the `type` field. +- Casing does not match as per the `type`. `type` is case-sensitive. +- Contact type sent in the request does not match the types present in the Dashboard. + +* solution: Enter the correct contact type in the request body. You cannot create new contact types via API. You must create them via the [RazorpayX Dashboard](http://x.razorpay.com/auth). diff --git a/llm-content/api/x/contacts/entity.md b/llm-content/api/x/contacts/entity.md new file mode 100644 index 00000000..66e9c440 --- /dev/null +++ b/llm-content/api/x/contacts/entity.md @@ -0,0 +1,70 @@ +--- +title: Contacts Entity +description: Check the entity code for Contacts APIs. +--- + +# Contacts Entity + +## Contacts Entity + +The Contacts Entity has the following parameters: + + + +### Response + +```json: Entity +{ + "id": "cont_00000000000001", + "entity": "contact", + "name": "Gaurav Kumar", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1545320320 +} +``` + +### Parameters + +`id` +: `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + +`entity` +: `string` The entity being created. Here, it is `contact`. + +`name` +: `string` The contact's name. For example, `Gaurav Kumar`. + +`contact` +: `string` The contact's phone number. For example, `9000090000`. + +`email` +: `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`type` +: `string` A classification for the contact being created. For example, `employee`. + +`reference_id` +: `string` A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`active` +: `boolean` Possible values: + - `true` (default) : active + - `false` : inactive + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. diff --git a/llm-content/api/x/contacts/fetch-all.md b/llm-content/api/x/contacts/fetch-all.md new file mode 100644 index 00000000..48408c58 --- /dev/null +++ b/llm-content/api/x/contacts/fetch-all.md @@ -0,0 +1,151 @@ +--- +title: Fetch All Contacts +description: Fetch all Contacts using API. +--- + +# Fetch All Contacts + +## Fetch All Contacts + +Use this endpoint to retrieve the details of all contacts. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/contacts +``` + +### Response + +```json: Success +{ +"entity": "collection", +"count": 1, +"items": [ + { + "id": "cont_00000000000001", + "entity": "contact", + "name": "Gaurav Kumar", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "type": "self", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at": 1545322986 + } + ] +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The name field is required.", + "source": "business", + "step": null, + "reason": "input_validation_failed", + "metadata": {}, + "field": "name" + } +} +``` + +### Parameters + +`name` _optional_ +: `string` Name by which results should be filtered. For example, `Gaurav`. + +`email` _optional_ +: `string` Email address by which results should be filtered. For example, `gaurav.kumar@example.com`. + +`contact` _optional_ +: `string` Phone number by which results should be filtered. For example, `9000090000`. + +`reference_id` _optional_ +: `string` The user-generated reference by which results should be filtered. For example, `Acme Contact ID 12345`. Maximum length is 40 characters. + +`active` _optional_ +: `boolean` The state by which results should be filtered. Possible values: + - `1`: active + - `0`: inactive + +`type` _optional_ +: `string` The classification by which results should be filtered. Possible values: + - `vendor` + - `customer` + - `employee` + - `self` + +`from` _optional_ +: `integer` Timestamp, in Unix, from when contacts are to be retrieved. + +`to` _optional_ +: `integer` Timestamp, in Unix, till when contacts are to be retrieved. + +`count` _optional_ +: `integer` The number of contacts to be retrieved. Default = `10`. Maximum = `100`. This can be used for pagination, in combination with `skip`. + +`skip` _optional_ +: `integer` The number of contacts to be skipped. Default = `0`. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + +`entity` +: `string` The entity being created. Here, it is `contact`. + +`name` +: `string` The contact's name. For example, `Gaurav Kumar`. + +`contact` +: `string` The contact's phone number. For example, `9000090000`. + +`email` +: `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`type` +: `string` A classification for the contact being created. For example, `employee`. + +`reference_id` +: `string` A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`active` +: `boolean` Possible values: + - `true` (default) : active + - `false` : inactive + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + +### Errors + +The `name` field is required. +* code: 4xx +* description: The `name` field is missing in the request body. +* solution: Enter the details in the recommended format as per the request body. + +The `name` field is invalid. +* code: 4xx +* description: There are special characters used in the `name` field. +* solution: Enter details as per the format recommended for Create a Contact request for `name` field. + +Invalid type: `contact_typeA` +* code: 4xx +* description: - There are special characters in the `type` field. +- Casing does not match as per the `type`. `type` is case-sensitive. +- Contact type sent in the request does not match the types present in the Dashboard. + +* solution: Enter the correct contact type in the request body. You cannot create new contact types via API. You must create them via the [RazorpayX Dashboard](http://x.razorpay.com/auth). diff --git a/llm-content/api/x/contacts/fetch-with-id.md b/llm-content/api/x/contacts/fetch-with-id.md new file mode 100644 index 00000000..68c6d92c --- /dev/null +++ b/llm-content/api/x/contacts/fetch-with-id.md @@ -0,0 +1,100 @@ +--- +title: Fetch Contact With ID +description: Fetch Contact with ID using APIs. +--- + +# Fetch Contact With ID + +## Fetch Contact With ID + +Use this endpoint to retrieve the details of a specific contact. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/contacts/cont_00000000000001 +``` + +### Response + +```json: Success +{ + "id": "cont_00000000000001", + "entity": "contact", + "name": "Gaurav Kumar", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "type": "self", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at": 1545322986 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "cont_00000000000001 is not a valid id.", + "source": "business", + "step": null, + "reason": "input_validation_failed", + "metadata": {}, + "field": "id" + } +} +``` + +### Parameters + +`id`_mandatory_ +: `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + +### Parameters + +`id` +: `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + +`entity` +: `string` The entity being created. Here, it is `contact`. + +`name` +: `string` The contact's name. For example, `Gaurav Kumar`. + +`contact` +: `string` The contact's phone number. For example, `9000090000`. + +`email` +: `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`type` +: `string` A classification for the contact being created. For example, `employee`. + +`reference_id` +: `string` A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`active` +: `boolean` Possible values: + - `true` (default) : active + - `false` : inactive + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + +### Errors + +`` is not a valid id. +* code: 4xx +* description: The contact id entered in the request body is invalid/does not exist. +* solution: Enter the correct Contact ID. You can find the Contact ID: - In the response body of [create a Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/create.md) API. +- On the [RazorpayX Dashboard](http://x.razorpay.com/auth). diff --git a/llm-content/api/x/contacts/update.md b/llm-content/api/x/contacts/update.md new file mode 100644 index 00000000..375eb06e --- /dev/null +++ b/llm-content/api/x/contacts/update.md @@ -0,0 +1,151 @@ +--- +title: Update a Contact +description: Update a Contact using APIs. +--- + +# Update a Contact + +## Update a Contact + +Use this endpoint to update the details for an existing contact. Send only those parameters that you want to change in the request body. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PATCH https://api.razorpay.com/v1/contacts/cont_00000000000001 \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "type": "self", + "reference_id": "Acme Contact ID 12345", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' +``` + +### Response + +```json: Success +{ + "id": "cont_00000000000001", + "entity": "contact", + "name": "Gaurav Kumar", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "type": "self", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at": 1545320320 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Invalid type: self", + "source": "business", + "step": null, + "reason": "input_validation_failed", + "metadata": {}, + "field": "type" + } +} +``` + +### Parameters + +`id`_mandatory_ +: `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + +### Parameters + +`name`_optional_ +: `string` The contact's name. This field is case-sensitive. Minimum 3 characters. Maximum 50 characters. Supported characters: `a-z`, `A-Z`, `0-9`, `space`, `’` , `-` , `_` , `/` , `(` , `)` and , `.`. For example, `Gaurav Kumar`. + +`email`_optional_ +: `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`contact`_optional_ +: `string` The contact's phone number. For example, `9000090000`. + +`type`_optional_ +: `string` Maximum 40 characters. Classification for the contact being created. For example, `employee`. The following classifications are available by default: + - `vendor` + - `customer` + - `employee` + - `self` + + + Additional classifications can be created via the [Dashboard](https://x.razorpay.com/) and then used in APIs. It is not possible to create new classifications via API. + +`reference_id`_optional_ +: `string` Maximum 40 characters. A user-generated reference given to the contact. For example, `Acme Contact ID 12345`. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + +`entity` +: `string` The entity being created. Here, it is `contact`. + +`name` +: `string` The contact's name. For example, `Gaurav Kumar`. + +`contact` +: `string` The contact's phone number. For example, `9000090000`. + +`email` +: `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`type` +: `string` A classification for the contact being created. For example, `employee`. + +`reference_id` +: `string` A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`active` +: `boolean` Possible values: + - `true` (default) : active + - `false` : inactive + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + +### Errors + +The `name` field is required. +* code: 4xx +* description: The `name` field is missing in the request body. +* solution: Enter the details in the recommended format as per the request body. + +The `name` field is invalid. +* code: 4xx +* description: There are special characters used in the `name` field. +* solution: Enter details as per the format recommended for Create a Contact request for `name` field. + +Invalid type: `contact_typeA` +* code: 4xx +* description: - There are special characters in the `type` field. +- Casing does not match as per the `type`. `type` is case-sensitive. +- Contact type sent in the request does not match the types present in the Dashboard. + +* solution: Enter the correct contact type in the request body. You cannot create new contact types via API. You must create them via the [RazorpayX Dashboard](http://x.razorpay.com/auth). diff --git a/llm-content/api/x/error-codes.md b/llm-content/api/x/error-codes.md new file mode 100644 index 00000000..e28f5196 --- /dev/null +++ b/llm-content/api/x/error-codes.md @@ -0,0 +1,81 @@ +--- +title: Error Codes +description: Check the API Error Codes, their meaning and steps to resolve the errors. +--- + +# Error Codes + +RazorpayX aims to make all transaction successful for its customers. However, errors might still occur in the financial ecosystem because of intermittent communication and technical issues at multiple hops. Hence, it becomes critical for businesses to identify the `source` of the error and the `reason` for the error. This enables you to minimize or fix errors to reduce any losses. + +API error codes are sent to you when an API cannot be fired. We return a JSON error response that contains the reason for the failure. You can use this response to make changes to the API request body and try to fire them again. + +> **INFO** +> +> +> **Handy Tips** +> +> The error object in the payouts' API response gives more details about the exact reason for a payout failure and the suggested next steps. You can enable these changes from the RazorpayX Dashboard. +> + +> Please share this information with your developers and make sure to check if there is any hard mapping for parameters before making this change. Once enabled, these changes cannot be reverted back. +> + +## Sample Code + +```json: Sample Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The id provided does not exist", + "source": "business", + "reason": "input_validation_failed", + "step": "NA", + "metadata": {} + } +} +``` + +`code` +: `string` Type of the error. For example, `BAD_REQUEST_ERROR`. + +`description` +: `string` A description for the error. For example, `The id provided does not exist`. + +`source` +: `string` Possible values: + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + +`reason` +: `string` The error reason. For example, `input_validation_failed`. + +`step` +: `NA` Not applicable for API Error Codes, value displayed to maintain consistency of error object. + +`metadata` +: `Null value` Not applicable for API Error Codes, value displayed to maintain consistency of error object. + +## API Error Source + +Source | Explanation +--- +`business` | Merchant action required. +--- +`internal` | Technical error at Razorpay's server. + +## API Error Reason and Next Steps + +The table below lists the various API error reasons, explains the likely reason for the error and suggests the next steps you can take to fix the error. + +Reason | Explanation | Next Step +--- +#### input_validation_failed | Failed due to wrong request or input sent in the request parameter. Check the error `description` parameter for more information about the error. | Make the necessary changes and retry. Know about the [API response paremeters](https://razorpay.com/docs). +--- +#### insufficient_funds | You do not have enough funds in your account to make the transaction. | Add funds to your account or use different account and retry. +--- +#### server_error | Technical error at Razorpay's server. This usually occurs when there is some server issue at Razorpay's end. | Retry after some time or reach out to RazorpayX Support from the Dashboard. + +### Related Information + +- [About Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x.md) +- [Payout Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) diff --git a/llm-content/api/x/fund-accounts.md b/llm-content/api/x/fund-accounts.md new file mode 100644 index 00000000..8a896f03 --- /dev/null +++ b/llm-content/api/x/fund-accounts.md @@ -0,0 +1,39 @@ +--- +title: Fund Accounts +description: List of Fund Accounts APIs to create, retrieve and activate Fund Accounts. +--- + +# Fund Accounts + +Every Contact has an associated Fund Account. When you [make payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) to a Contact, they receive the amount in their Fund Account. Fund Accounts can be of [four types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md#fund-account-types), and a Contact can have multiple Fund Accounts. + + +You must [create a Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/create.md) to create a Fund Account. We recommend you to create Contacts and Fund Accounts beforehand to improve the [payout processing time](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/status-details.md). When making payouts, ensure to [allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md), else the request will fail. + + +Fork the Razorpay Postman Public Workspace and try the Fund Accounts APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-47aa8c0b-d897-48d2-aa5a-5d5c10c5c2b1) + +### Related Guides + +[About Fund Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/account-validation.md) + +### Endpoints + +- **post** `/v1/fund_accounts` - Create Bank Account type Fund Account: +Creates a new Fund Account using bank account details. + +- **post** `/v1/fund_accounts` - Create VPA type Fund Account: +Creates a new Fund Account using VPA details. + +- **get** `/v1/fund_accounts` - Fetch All Fund Account: +Retrieves all the Fund Accounts. + +- **get** `/v1/fund_accounts/:id` - Fetch a Fund Account with ID: +Retrieves a single Fund Account with ID. + +- **patch** `/v1/fund_accounts/:id` - Activate/Deactivate a Fund Account: +Activates or deactivates an existing Fund Account. diff --git a/llm-content/api/x/fund-accounts/activate-or-deactivate.md b/llm-content/api/x/fund-accounts/activate-or-deactivate.md new file mode 100644 index 00000000..595e28b6 --- /dev/null +++ b/llm-content/api/x/fund-accounts/activate-or-deactivate.md @@ -0,0 +1,181 @@ +--- +title: Activate or Deactivate a Fund Account +description: Activate or Deactivate a Fund Account using API. +--- + +# Activate or Deactivate a Fund Account + +## Activate or Deactivate a Fund Account + +Use this endpoint to activate or deactivate a fund account. This helps you block payouts to certain fund accounts, as and when required. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PATCH https://api.razorpay.com/v1/fund_accounts/fa_00000000000001 \ +-H "Content-Type: application/json" \ +-d '{ + "active": false + }' +``` + +### Response + +```json: Success +{ + "id": "fa_00000000000001", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "account_type": "bank_account", + "bank_account": { + "ifsc": "HDFC0000053", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "765432123456789" + }, + "active": false, + "batch_id": null, + "created_at": 1545312598 +} +``` + +### Parameters + +`id`_mandatory_ +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +### Parameters + +`active`_mandatory_ +: `boolean` The state to which you want to move the fund account. Possible values: + - `true` (default): active + - `false`: inactive +Pass `false` to deactivate an account and pass `true` to activate an account. + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account validation. For example, `fav_0000000001`. + +`entity` +: `string` Here it is `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`validation_results` +: `object` Details extracted from the results of the fund account validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar` or `null`. + + `details` + : `string` Brief description of the validation. + + `name_match_score` + : `string` The percentage score indicating how closely the account holder's name matches the records. + +`validated_account_type` +: `string` Here it is `bank_account`. + + `bank_account` + : `object` The contact's bank account details. + + `bank_routing_code` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `account_type` + : `string` The account type being validated. For example `savings`, `current`. + +`status_details` +: `object` Status of the fund account validation. + + `description` + : `string` A brief description stating if the validation is complete or not. + + `source` + : `string` The source from which validation was done. For example, `beneficiary_bank` + + `reason` + : `string` Reason for validation. + +`reference_id` +: `string` Unique reference_id generated for the validation transaction. + +`fund_account` +: `object` The details of the fund account which was validated. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it is `fund_account`. + + `account_type` + : `string` Fund account type. + +`vpa` +: `object` The details associated with the account holder's virtual payment address. + + `address` + : `string` The virtual payment address of the contact whose account is validated. For example, `gaurav.kumar@exampleupi` + +`active` +: `boolean` Possible values of fund account status: + - `true`: active + - `false`: inactive + +`created_at` +: `integer` Timestamp, in unix, when the fund account was created. For example, `1543650891`. + +`contact` +: `object` The contact's details. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` Here it is `contact` + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `email` + : `string` Email address of the contact. + + `contact` + : `string` Phone number of the contact. + + `type` + : `string` Contact Type. For example, `employee`, `contractor`. + + `reference_id` + : `string` Reference id associated with the contact. + + `active` + : `boolean` Possible values of contact status: + - `true`: active + - `false`: inactive + +### Errors + +`` is not a valid id. +* code: 4xx +* description: The fund account ID entered is invalid. +* solution: Re-check or find the Fund Account ID: - In the response body of [create a Fund Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts.md) API. +- On the [Contacts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md) Dashboard. diff --git a/llm-content/api/x/fund-accounts/create/bank-account.md b/llm-content/api/x/fund-accounts/create/bank-account.md new file mode 100644 index 00000000..558030d7 --- /dev/null +++ b/llm-content/api/x/fund-accounts/create/bank-account.md @@ -0,0 +1,207 @@ +--- +title: Create a Fund Account of Type Bank Account +description: Create a Fund Account with Bank Account details using APIs. +--- + +# Create a Fund Account of Type Bank Account + +## Create a Fund Account of Type Bank Account + +Use this endpoint to create a fund account with bank account details.- A new fund account is created if any combination of the following details is unique: `contact_id`, `bank_account.name`, `bank_account.ifsc` and `bank_account.account_number`. +- If **all** the above details match the details of an existing fund account, the API returns details of the existing fund account. +- You cannot edit the details of a fund account. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/fund_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "contact_id":"cont_00000000000001", + "account_type":"bank_account", + "bank_account":{ + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053", + "account_number":"765432123456789" + } +}' +``` + +### Response + +```json: Success +{ + "id" : "fa_00000000000001", + "entity": "fund_account", + "contact_id" : "cont_00000000000001", + "account_type": "bank_account", + "bank_account": { + "ifsc": "HDFC0000053", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "765432123456789", + "notes": [] + }, + "active": true, + "batch_id": null, + "created_at": 1543650891 +} +``` + +### Parameters + +`contact_id`_mandatory_ +: `string` This is the unique identifier linked to a contact. For example, `cont_00000000000001`. + +`account_type`_mandatory_ +: `string` The account type you want to link to the contact ID. Here it is `bank_account`. + +`bank_account`_mandatory_ +: `object` The contact's bank account details. + + `name`_mandatory_ + : `string` Account holder's name. Name must be between 3 - 120 characters. This field is case-sensitive. Name cannot end with a special character, except `.`. Supported characters: `a-z`, `A-Z`, `0-9`, `space`, `’` , `-` , `_` , `/` , `(` , `)` and , `.`. For example,`Gaurav Kumar`. + + `ifsc`_mandatory_ + : `string` Beneficiary bank IFSC. Has to be 11 characters. Unique identifier of a bank branch. For example, `HDFC0000053`. + + `account_number`_mandatory_ + : `string` Beneficiary account number. Between 5 and 35 characters. Supported characters: `a-z`, `A-Z` and `0-9`. Beneficiary account number. For example, `765432123456789`. + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account validation. For example, `fav_0000000001`. + +`entity` +: `string` Here it is `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`validation_results` +: `object` Details extracted from the results of the fund account validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar` or `null`. + + `details` + : `string` Brief description of the validation. + + `name_match_score` + : `string` The percentage score indicating how closely the account holder's name matches the records. + +`validated_account_type` +: `string` Here it is `bank_account`. + + `bank_account` + : `object` The contact's bank account details. + + `bank_routing_code` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `account_type` + : `string` The account type being validated. For example `savings`, `current`. + +`status_details` +: `object` Status of the fund account validation. + + `description` + : `string` A brief description stating if the validation is complete or not. + + `source` + : `string` The source from which validation was done. For example, `beneficiary_bank` + + `reason` + : `string` Reason for validation. + +`reference_id` +: `string` Unique reference_id generated for the validation transaction. + +`fund_account` +: `object` The details of the fund account which was validated. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it is `fund_account`. + + `account_type` + : `string` Fund account type. + +`vpa` +: `object` The details associated with the account holder's virtual payment address. + + `address` + : `string` The virtual payment address of the contact whose account is validated. For example, `gaurav.kumar@exampleupi` + +`active` +: `boolean` Possible values of fund account status: + - `true`: active + - `false`: inactive + +`created_at` +: `integer` Timestamp, in unix, when the fund account was created. For example, `1543650891`. + +`contact` +: `object` The contact's details. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` Here it is `contact` + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `email` + : `string` Email address of the contact. + + `contact` + : `string` Phone number of the contact. + + `type` + : `string` Contact Type. For example, `employee`, `contractor`. + + `reference_id` + : `string` Reference id associated with the contact. + + `active` + : `boolean` Possible values of contact status: + - `true`: active + - `false`: inactive + +### Errors + +The contact id provided does not exist. +* code: 4xx +* description: The contact ID provided is incorrect. +* solution: Enter the correct Contact ID. Check if this contact already exists in your RazorpayX account using [Fetch Contact id API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/fetch-with-id.md) or use the [search option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/global-search.md) on the Dashboard. Or find the Contact ID: - In the response body of [create a Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/create.md) API. +- On the [Contacts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md) Dashboard. + +The IFSC must be 11 characters. +* code: 4xx +* description: The IFSC code provided is either incorrect or does not have 11 characters. +* solution: Check and pass the correct 11 characters IFSC. + +The account number format is invalid. +* code: 4xx +* description: The account number is incorrect. +* solution: Enter the beneficiary account number between 5 and 35 characters. Supported characters- a-z, A-Z, and 0-9. diff --git a/llm-content/api/x/fund-accounts/create/vpa.md b/llm-content/api/x/fund-accounts/create/vpa.md new file mode 100644 index 00000000..b97d7489 --- /dev/null +++ b/llm-content/api/x/fund-accounts/create/vpa.md @@ -0,0 +1,187 @@ +--- +title: Create a Fund Account of Type VPA +description: Create a Fund Account with VPA details using APIs. +--- + +# Create a Fund Account of Type VPA + +## Create a Fund Account of Type VPA + +Use this endpoint to create a fund account with VPA details.- A new fund account is created if any combination of the following details is unique: `contact_id` and `vpa.address`. +- If **all** the above details match the details of an existing fund account, the API returns details of the existing fund account. +- You cannot edit the details of a fund account. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/fund_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "account_type":"vpa", + "contact_id":"cont_00000000000001", + "vpa":{ + "address":"gaurav.kumar@exampleupi" + } +}' +``` + +### Response + +```json: Success +{ + "id": "fa_00000000000002", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "account_type": "vpa", + "vpa": { + "username": "gaurav.kumar", + "handle": "exampleupi", + "address": "gaurav.kumar@exampleupi" + }, + "active": true, + "batch_id": null, + "created_at": 1545223741 +} +``` + +### Parameters + +`contact_id`_mandatory_ +: `string` This is the unique identifier linked to a contact. For example, `cont_00000000000001`. + +`account_type`_mandatory_ +: `string` The fund account type you want to link to the contact ID. Here it is `vpa`. + +`vpa`_mandatory_ +: `object` The contact's virtual payment address (VPA) details. + + `address`_mandatory_ + : `string` Between 3 and 100 characters. Supported characters: `a-z`, `A-Z`, `0-9`, `.`, `-` and one `@`. The virtual payment address. For example, `gauravkumar@exampleupi`. + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account validation. For example, `fav_0000000001`. + +`entity` +: `string` Here it is `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`validation_results` +: `object` Details extracted from the results of the fund account validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar` or `null`. + + `details` + : `string` Brief description of the validation. + + `name_match_score` + : `string` The percentage score indicating how closely the account holder's name matches the records. + +`validated_account_type` +: `string` Here it is `bank_account`. + + `bank_account` + : `object` The contact's bank account details. + + `bank_routing_code` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `account_type` + : `string` The account type being validated. For example `savings`, `current`. + +`status_details` +: `object` Status of the fund account validation. + + `description` + : `string` A brief description stating if the validation is complete or not. + + `source` + : `string` The source from which validation was done. For example, `beneficiary_bank` + + `reason` + : `string` Reason for validation. + +`reference_id` +: `string` Unique reference_id generated for the validation transaction. + +`fund_account` +: `object` The details of the fund account which was validated. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it is `fund_account`. + + `account_type` + : `string` Fund account type. + +`vpa` +: `object` The details associated with the account holder's virtual payment address. + + `address` + : `string` The virtual payment address of the contact whose account is validated. For example, `gaurav.kumar@exampleupi` + +`active` +: `boolean` Possible values of fund account status: + - `true`: active + - `false`: inactive + +`created_at` +: `integer` Timestamp, in unix, when the fund account was created. For example, `1543650891`. + +`contact` +: `object` The contact's details. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` Here it is `contact` + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `email` + : `string` Email address of the contact. + + `contact` + : `string` Phone number of the contact. + + `type` + : `string` Contact Type. For example, `employee`, `contractor`. + + `reference_id` + : `string` Reference id associated with the contact. + + `active` + : `boolean` Possible values of contact status: + - `true`: active + - `false`: inactive + +### Errors + +The contact ID provided does not exist. +* code: 4xx +* description: The contact id provided is incorrect. +* solution: Enter the correct Contact ID. Check if this contact already exists in your RazorpayX account using [Fetch Contact id API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/fetch-with-id.md) or use the [search option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/global-search.md) on the Dashboard. Or find the Contact ID: - In the response body of [create a Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/create.md) API. +- On the [Contacts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md) Dashboard. diff --git a/llm-content/api/x/fund-accounts/entity.md b/llm-content/api/x/fund-accounts/entity.md new file mode 100644 index 00000000..0e310d5a --- /dev/null +++ b/llm-content/api/x/fund-accounts/entity.md @@ -0,0 +1,150 @@ +--- +title: Fund Accounts Entity +description: Check the entity code for Fund Accounts APIs. +--- + +# Fund Accounts Entity + +## Fund Accounts Entity + +The Fund Accounts Entity has the following parameters: + +### Response + +```json: Sample Entity +{ + "id" : "fa_00000000000001", + "entity": "fund_account", + "contact_id" : "cont_00000000000001", + "account_type": "bank_account", + "bank_account": { + "ifsc": "HDFC0000053", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "765432123456789", + "notes": [] + }, + "active": true, + "batch_id": null, + "created_at": 1543650891 +} +``` + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account validation. For example, `fav_0000000001`. + +`entity` +: `string` Here it is `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`validation_results` +: `object` Details extracted from the results of the fund account validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar` or `null`. + + `details` + : `string` Brief description of the validation. + + `name_match_score` + : `string` The percentage score indicating how closely the account holder's name matches the records. + +`validated_account_type` +: `string` Here it is `bank_account`. + + `bank_account` + : `object` The contact's bank account details. + + `bank_routing_code` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `account_type` + : `string` The account type being validated. For example `savings`, `current`. + +`status_details` +: `object` Status of the fund account validation. + + `description` + : `string` A brief description stating if the validation is complete or not. + + `source` + : `string` The source from which validation was done. For example, `beneficiary_bank` + + `reason` + : `string` Reason for validation. + +`reference_id` +: `string` Unique reference_id generated for the validation transaction. + +`fund_account` +: `object` The details of the fund account which was validated. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it is `fund_account`. + + `account_type` + : `string` Fund account type. + +`vpa` +: `object` The details associated with the account holder's virtual payment address. + + `address` + : `string` The virtual payment address of the contact whose account is validated. For example, `gaurav.kumar@exampleupi` + +`active` +: `boolean` Possible values of fund account status: + - `true`: active + - `false`: inactive + +`created_at` +: `integer` Timestamp, in unix, when the fund account was created. For example, `1543650891`. + +`contact` +: `object` The contact's details. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` Here it is `contact` + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `email` + : `string` Email address of the contact. + + `contact` + : `string` Phone number of the contact. + + `type` + : `string` Contact Type. For example, `employee`, `contractor`. + + `reference_id` + : `string` Reference id associated with the contact. + + `active` + : `boolean` Possible values of contact status: + - `true`: active + - `false`: inactive diff --git a/llm-content/api/x/fund-accounts/fetch-all.md b/llm-content/api/x/fund-accounts/fetch-all.md new file mode 100644 index 00000000..8aa15118 --- /dev/null +++ b/llm-content/api/x/fund-accounts/fetch-all.md @@ -0,0 +1,224 @@ +--- +title: Fetch All Fund Accounts +description: Fetch all Fund Accounts using API. +--- + +# Fetch All Fund Accounts + +## Fetch All Fund Accounts + +Use this endpoint to retrieve all fund accounts. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/fund_accounts +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 3, + "items": [ + { + "id": "fa_00000000000001", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "account_type": "bank_account", + "bank_account": { + "ifsc": "HDFC0000053", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "765432123456789", + "notes": [] + }, + "active": false, + "batch_id": null, + "created_at": 1545312598 + }, + { + "id": "fa_00000000000002", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "account_type": "vpa", + "vpa": { + "username": "gaurav.kumar", + "handle": "exampleupi", + "address": "gaurav.kumar@exampleupi" + }, + "active": true, + "batch_id": null, + "created_at": 1545313478 + }, + { + "id": "fa_00000000000001", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "account_type": "card", + "card": { + "name": "Gaurav Kumar", + "last4": "6789", + "network": "Visa", + "type": "credit", + "issuer": "HDFC" + }, + "active": false, + "batch_id": null, + "created_at": 1545312598 + } + ] +} +``` + +### Parameters + +`account_type` _optional_ +: `string` The fund account type to be retrieved. Possible values: + - `bank_account` + - `vpa` + - `card` (if [payouts to cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/cards.md) is enabled on your account) + +`contact_id` _optional_ +: `string` The unique contact ID for which fund accounts are to be retrieved. For example, `cont_00000000000001`. + +`from` _optional_ +: `integer` Timestamp, in Unix, from when fund accounts are to be retrieved. + +`to` _optional_ +: `integer` Timestamp, in Unix, till when fund accounts are to be retrieved. + +`count` _optional_ +: `integer` The number of fund accounts to be retrieved. Default = `10`. Maximum = `100`. This can be used for pagination, in combination with `skip`. + +`skip` _optional_ +: `integer` The number of fund accounts to be skipped. Default = `0`. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account validation. For example, `fav_0000000001`. + +`entity` +: `string` Here it is `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`validation_results` +: `object` Details extracted from the results of the fund account validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar` or `null`. + + `details` + : `string` Brief description of the validation. + + `name_match_score` + : `string` The percentage score indicating how closely the account holder's name matches the records. + +`validated_account_type` +: `string` Here it is `bank_account`. + + `bank_account` + : `object` The contact's bank account details. + + `bank_routing_code` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `account_type` + : `string` The account type being validated. For example `savings`, `current`. + +`status_details` +: `object` Status of the fund account validation. + + `description` + : `string` A brief description stating if the validation is complete or not. + + `source` + : `string` The source from which validation was done. For example, `beneficiary_bank` + + `reason` + : `string` Reason for validation. + +`reference_id` +: `string` Unique reference_id generated for the validation transaction. + +`fund_account` +: `object` The details of the fund account which was validated. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it is `fund_account`. + + `account_type` + : `string` Fund account type. + +`vpa` +: `object` The details associated with the account holder's virtual payment address. + + `address` + : `string` The virtual payment address of the contact whose account is validated. For example, `gaurav.kumar@exampleupi` + +`active` +: `boolean` Possible values of fund account status: + - `true`: active + - `false`: inactive + +`created_at` +: `integer` Timestamp, in unix, when the fund account was created. For example, `1543650891`. + +`contact` +: `object` The contact's details. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` Here it is `contact` + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `email` + : `string` Email address of the contact. + + `contact` + : `string` Phone number of the contact. + + `type` + : `string` Contact Type. For example, `employee`, `contractor`. + + `reference_id` + : `string` Reference id associated with the contact. + + `active` + : `boolean` Possible values of contact status: + - `true`: active + - `false`: inactive + +### Errors + +`` is not a valid id. +* code: 4xx +* description: The fund account ID entered is invalid. +* solution: Re-check or find the Fund Account ID: - In the response body of [create a Fund Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts.md) API. +- On the [RazorpayX Dashboard](https://x.razorpay.com/auth). diff --git a/llm-content/api/x/fund-accounts/fetch-with-id.md b/llm-content/api/x/fund-accounts/fetch-with-id.md new file mode 100644 index 00000000..465bdcac --- /dev/null +++ b/llm-content/api/x/fund-accounts/fetch-with-id.md @@ -0,0 +1,170 @@ +--- +title: Fetch a Fund Account With ID +description: Fetch a Fund Account with ID using API. +--- + +# Fetch a Fund Account With ID + +## Fetch a Fund Account With ID + +Use this endpoint to retrieve a fund account with id. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X GET https://api.razorpay.com/v1/fund_accounts/fa_00000000000001 +``` + +### Response + +```json: Success +{ + "id": "fa_00000000000001", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "account_type": "bank_account", + "bank_account": { + "ifsc": "HDFC0000053", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "765432123456789", + "notes": [] + }, + "active": false, + "batch_id": null, + "created_at": 1545312598 +} +``` + +### Parameters + +`id`_mandatory_ +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account validation. For example, `fav_0000000001`. + +`entity` +: `string` Here it is `fund_account.validation`. + +`status` +: `string` The status of the account validation transaction. + Possible values: - `created` +- `completed` +- `failed` + +`validation_results` +: `object` Details extracted from the results of the fund account validation. + + `account_status` + : `string` Displays if the account is valid or not. + Possible values: - `active` +- `invalid` + + `registered_name` + : `string` The name linked to the account. For example,`Gaurav Kumar` or `null`. + + `details` + : `string` Brief description of the validation. + + `name_match_score` + : `string` The percentage score indicating how closely the account holder's name matches the records. + +`validated_account_type` +: `string` Here it is `bank_account`. + + `bank_account` + : `object` The contact's bank account details. + + `bank_routing_code` + : `string` Beneficiary bank IFSC. For example, `HDFC0000053`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `account_type` + : `string` The account type being validated. For example `savings`, `current`. + +`status_details` +: `object` Status of the fund account validation. + + `description` + : `string` A brief description stating if the validation is complete or not. + + `source` + : `string` The source from which validation was done. For example, `beneficiary_bank` + + `reason` + : `string` Reason for validation. + +`reference_id` +: `string` Unique reference_id generated for the validation transaction. + +`fund_account` +: `object` The details of the fund account which was validated. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it is `fund_account`. + + `account_type` + : `string` Fund account type. + +`vpa` +: `object` The details associated with the account holder's virtual payment address. + + `address` + : `string` The virtual payment address of the contact whose account is validated. For example, `gaurav.kumar@exampleupi` + +`active` +: `boolean` Possible values of fund account status: + - `true`: active + - `false`: inactive + +`created_at` +: `integer` Timestamp, in unix, when the fund account was created. For example, `1543650891`. + +`contact` +: `object` The contact's details. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` Here it is `contact` + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `email` + : `string` Email address of the contact. + + `contact` + : `string` Phone number of the contact. + + `type` + : `string` Contact Type. For example, `employee`, `contractor`. + + `reference_id` + : `string` Reference id associated with the contact. + + `active` + : `boolean` Possible values of contact status: + - `true`: active + - `false`: inactive + +### Errors + +`` is not a valid id. +* code: 4xx +* description: The fund account ID entered is invalid. +* solution: Re-check or find the Fund Account ID: - In the response body of [create a Fund Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts.md) API. +- On the [Contacts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md) Dashboard. diff --git a/llm-content/api/x/payout-composite.md b/llm-content/api/x/payout-composite.md new file mode 100644 index 00000000..3fd16ab3 --- /dev/null +++ b/llm-content/api/x/payout-composite.md @@ -0,0 +1,32 @@ +--- +title: Payout Composite +description: Explore composite APIs to make a payout using a single API call. +--- + +# Payout Composite + +Composite API allows you to make three requests in a single API call. No OTP authorization is required when creating a payout using APIs. Ensure you [allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) and pass the [idempotency key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) to make a successful payout. + +You can either create a new Contact and its Fund Account while making the payout, or use an existing Contact and Fund Account details to make the payout. Using the Contact and Fund Account details instead of IDs will not create duplicate Contacts or Fund Accounts in your system. However, we recommend that you create the Contact and Fund Account before making a payout to help **improve payout processing time**. + +Fork the Razorpay Postman Public Workspace and try the Payout Composite APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-d81df592-f496-49f0-a3b1-e8cf62855d50) + +### Related Guides + +[About Payouts API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) +[Payouts Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/best-practices.md) + +### Endpoints + +- **post** `/v1/payouts` - Create a Payout to a Bank Account: + Creates a payout along with the Contact and Fund Account with of the type bank account. + +- **post** `/v1/payouts` - Create a Payout to a VPA: + Creates a payout along with the Contact and Fund Account of the type VPA. + +- **post** `/v1/payouts` - Create a Payout to a Card: + Creates a payout along with the Contact and Fund Account of the type card. diff --git a/llm-content/api/x/payout-composite/create/bank-account.md b/llm-content/api/x/payout-composite/create/bank-account.md new file mode 100644 index 00000000..27c1c000 --- /dev/null +++ b/llm-content/api/x/payout-composite/create/bank-account.md @@ -0,0 +1,468 @@ +--- +title: Create a Payout to Bank Account Using Composite API +description: Create a Payout to Bank Account using the Composite API. +--- + +# Create a Payout to Bank Account Using Composite API + +## Create a Payout to a Bank Account Using Composite API + +Use this endpoint to create a payout to bank account using Composite Payout API. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you [allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) and pass the [idempotency key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) to make a successful payout. +> + + Consider the points given below before firing this API: + +- Contact + - A new contact is created if any combination of the following details is unique: + - `fund_account.contact.name` + - `fund_account.contact.email` + - `fund_account.contact.contact` + - `fund_account.contact.type` + - `fund_account.contact.reference_id` + - If **all** the above details match the details of an existing contact, the API returns details of the existing contact. + - Use the [Update Contact API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/update.md) if you want to make changes to an existing contact. +- Fund Account + - A new fund account is created if any combination of the following details is unique: + - `fund_account.card.name` + - `fund_account.card.number` + - `fund_account.contact.name` + - `fund_account.contact.email` + - `fund_account.contact.contact` + - `fund_account.contact.type` + - `fund_account.contact.reference_id` + - If **all** the above details match the details of an existing fund account, the API returns details of the existing fund account. + - You cannot edit the details of a fund account. + +To understand the status of the payouts, refer to [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payouts \ +-H "Content-Type: application/json" \ +-H "X-Payout-Idempotency: 53cda91c-8f81-4e77-bbb9-7388f4ac6bf4" \ +-d '{ + "account_number": "7878780080316316", + "amount": 1000000, + "currency": "INR", + "mode": "NEFT", + "purpose": "refund", + "fund_account": { + "account_type": "bank_account", + "bank_account": { + "name": "Gaurav Kumar", + "ifsc": "HDFC0001234", + "account_number": "1121431121541121" + }, + "contact": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "type": "vendor", + "reference_id": "Acme Contact ID 12345", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + }, + "queue_if_low_balance": true, + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + } +}' +``` + +### Response + +```json: Success +{ + "id": "pout_F681qslJ3ba70q", + "entity": "payout", + "fund_account_id": "fa_F681qr6Bqy1Je7", + "fund_account": { + "id": "fa_F681qr6Bqy1Je7", + "entity": "fund_account", + "contact_id": "cont_F681qmU11CfPDl", + "contact": { + "id": "cont_F681qmU11CfPDl", + "entity": "contact", + "name": "Gaurav Kumar", + "contact": "9876543210", + "email": "gaurav.kumar@example.com", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1592929016 + }, + "account_type": "bank_account", + "bank_account": { + "ifsc": "HDFC0001234", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "notes": [], + "account_number": "1121431121541121" + }, + "batch_id": null, + "active": true, + "created_at": 1592929016 + }, + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "fees": 590, + "tax": 90, + "status": "processed", + "purpose": "refund", + "utr": null, + "mode": "NEFT", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "status_details": null, + "created_at": 1592929017, + "fee_type": "", + "error": { + "description": null, + "source": null, + "reason": null + } +} +``` + +### Parameters + +`account_number`_mandatory_ +: `string` The account from which you want to make the payout. +Account details can be found on the RazorpayX Dashboard. For example, `7878780080316316`. + - Pass your customer identifier if you want money to be deducted from RazorpayX Lite. + - Pass your Current Account number if you want money to be deducted from your Current Account. + +> **WARN** +> +> +> **Watch Out!** +> +> - This is **not** your contact's bank account number. Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - This value is different for Test Mode and Live Mode. +> + +`amount`_mandatory_ +: `integer` The payout amount, in paise. For example, pass `1000000` to transfer an amount of ₹10,000. Minimum value is `100`. + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency`_mandatory_ +: `string` The payout currency. Here, it is `INR`. + +`mode`_mandatory_ +: `string` The mode to be used to create the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `card` + + + The payout modes are case-sensitive. When creating payouts using APIs, ensure payout modes are entered in upper case. + +`purpose`_mandatory_ +: `string` The purpose of the payout. Classifications available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`fund_account`_mandatory_ +: `object` Details of the contact and fund account to which the payout should be made. + + `account_type`_mandatory_ + : `string` The type of account to be linked to the contact ID. Here, the value has to be `bank_account`. + + `bank_account`_mandatory_ + : `object` The contact's bank account details. + + `name`_mandatory_ + : `string` Account holder's name. Between 4 and 120 characters. This field is case-sensitive. Supported characters: `a-z`, `A-Z`, `0-9`, `space`, `’` , `-` , `_` , `/` , `(` , `)` and , `.`. For example,`Gaurav Kumar`. + + `ifsc`_mandatory_ + : `string` Beneficiary bank IFSC. Has to be 11 characters. Unique identifier of a bank branch. For example, `HDFC0000053`. + + `account_number`_mandatory_ + : `string` Beneficiary bank account number. Between 5 and 35 characters. Supported characters: `a-z`, `A-Z` and `0-9`. Beneficiary account number. For example, `765432123456789`. + + `contact`_mandatory_ + : `object` Details of the contact to whom the payout should be made. + + `name`_mandatory_ + : `string` Contact's name. Minimum 3 characters. Maximum 50 characters. This field is case-sensitive. Supported characters: `a-z`, `A-Z`, `0-9`, `space`, `’` , `-` , `_` , `/` , `(` , `)` and , `.`. For example, `Gaurav Kumar`. + + `email`_optional_ + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `contact`_optional_ + : `string` The contact's phone number. For example, `9000090000`. + + `type`_optional_ + : `string` Classification for the contact. For example, `employee`. Classifications are available by default: + - `vendor` + - `customer` + - `employee` + - `self` + + Additional classifications can be created via the [Dashboard](https://x.razorpay.com/) and then used in APIs. It is not possible to create new classifications via the API. + + `reference_id`_optional_ + : `string` Maximum length is 40 characters. A reference you enter for the contact. For example, `Acme Contact ID 12345`. + + `notes`_optional_ + : `object` Notes you can enter for the contact for future reference. This is a key-value pair. For example, `"note_key": "Beam me up Scotty"`. + +`queue_if_low_balance`_optional_ +: `boolean` Possible values: + - `true`: The payout is queued when your business account does not have sufficient balance to process the payout. + - `false` (default): The payout is never queued. The payout fails if your business account does not have sufficient balance to process the payout. + +`reference_id`_optional_ +: `string` Maximum length is 40 characters. A reference you enter for the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration`_optional_ +: `string` Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and `space`. This is a custom note that also appears on the bank statement. If no value is passed for this parameter, it defaults to the Merchant Billing Label. + + Enter the important text in the first 9 characters as banks truncate the rest as per their standards. + +`notes`_optional_ +: `array` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier linked to the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`fund_account` +: `object` Contact and fund account details to which the payout was made. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it will be `fund_account`. + + `contact_id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `contact` + : `object` Details of the contact to whom the payout is being made. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `type` + : `string` Classification for the contact being created. For example, `employee`. Classifications are available by default: + - `vendor` + - `customer` + - `employee` + - `self` + + `reference_id` + : `string` A reference you entered for the contact. For example, `Acme Contact ID 12345`. + + `batch_id` + : `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true`: active + - `false`: inactive + + `notes` + : `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + + `account_type` + : `string` The type of fund account being created. It can be a `bank_account`, `vpa`, `card`. + + `bank_account` + : `object` The contact's bank account details. + + `ifsc` + : `string` Unique identifier of a bank branch. For example, `HDFC0000053`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `notes` + : `object` User-entered notes for internal reference. + + `vpa` + : `object` The contact's virtual payment address (VPA) details. + + `username` + : `string` The user name from the virtual payment address. For example, `gauravkumar`. + + `handle` + : `string` The handle from the virtual payment address. For example, `exampleupi`. + + `address` + : `string` The virtual payment address. For example, `gauravkumar@exampleupi`. + + `card` + : `object` Details of the credit card that is being used to create the fund account. + + `name` + : `string` The credit card holder's name. For example,`Gaurav Kumar`. + + `last4` + : `string` The last four digits of the credit card. For example, `0001`. + + `network` + : `string` The credit card issuing network. Possible values are: + - `Visa` + - `Mastercard` + - `American Express` + - `Diners Club` + + `type` + : `string` Currently, this can only be `credit`. + + `issuer` + : `string` The name of bank that issued the card. For example, `HDFC`. Refer to the [Supported Banks and Payout Modes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards.md#supported-banks-and-payout-modes) section for more details. + + `batch_id` + : `string` This value is returned if the fund account was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true`: active + - `false`: inactive + + `created_at` + : `integer` Timestamp, in Unix, when the fund account was created. For example, `1545320320`. + +`amount` +: `integer` Minimum value `100`. The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. +The value passed here does not include fees and tax. Fee and tax, if any, is deducted from your account balance. + +`currency` +: `string` The payout currency. Here, it is `INR`. + +`notes` +: `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The payout status. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + - `failed` + +`purpose` +: `string` The purpose of the payout. Classifications available by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Refer to the [Payouts section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#payout-modes) for more details. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `UPI` + - `card` + +`reference_id` +: `string` A reference you entered for the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` +: `string` This is a custom note that also appears on the bank statement. + +If no value is passed for this parameter, it defaults to the Merchant Billing Label. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Timestamp, in Unix, at which the payout was created. For example, `1545320320`. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible value is `free_payout`. diff --git a/llm-content/api/x/payout-composite/create/card.md b/llm-content/api/x/payout-composite/create/card.md new file mode 100644 index 00000000..9fe8cb88 --- /dev/null +++ b/llm-content/api/x/payout-composite/create/card.md @@ -0,0 +1,469 @@ +--- +title: Create a Payout to Card Using Composite API +description: Create a Composite Payout using Card using API. +--- + +# Create a Payout to Card Using Composite API + +## Create a Payout to Card Using Composite API + +Use this endpoint to create a payout to card using Composite Payout API, without saving the details. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you [allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) and pass the [idempotency key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) to make a successful payout. +> + + Payout to Cards is only available for PCI DSS compliant merchants. To enable the feature, [raise a request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) on the RazorpayX Dashboard. Refer to the [payouts to cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards.md) documentation. + + + +Consider the points given below before firing this API: + +- Contact + - A new contact is created if any combination of the following details is unique: + - `fund_account.contact.name` + - `fund_account.contact.email` + - `fund_account.contact.contact` + - `fund_account.contact.type` + - `fund_account.contact.reference_id` + - If **all** the above details match the details of an existing contact, the API returns details of the existing contact. + - Use the [Update Contact API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/update.md) if you want to make changes to an existing contact. + +- Fund Account + - A new fund account is created if any combination of the following details is unique: + - `fund_account.card.name` + - `fund_account.card.number` + - `fund_account.contact.name` + - `fund_account.contact.email` + - `fund_account.contact.contact` + - `fund_account.contact.type` + - `fund_account.contact.reference_id` + - If **all** the above details match the details of an existing fund account, the API returns details of the existing fund account. + - You cannot edit the details of a fund account. + +To understand the status of the payouts, refer to [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payouts \ +-H "Content-Type: application/json" \ +-H "X-Payout-Idempotency: 53cda91c-8f81-4e77-bbb9-7388f4ac6bf4" \ +-d '{ + "account_number": "7878780080316316", + "amount": 1000000, + "currency": "INR", + "mode": "NEFT", + "purpose": "refund", + "fund_account": { + "account_type": "card", + "card": { + "number": "765432123456789", + "name": "Gaurav Kumar", + "input_type": "card" + }, + "contact": { + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + }, + "queue_if_low_balance": true, + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + } +}' +``` + +### Response + +```json: Success +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "contact": { + "id": "cont_00000000000001", + "entity": "contact", + "contact": "9876543210", + "email": "gaurav.kumar@example.com", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1580817353 + }, + "account_type": "card", + "card": { + "last4": "6789", + "network": "Visa", + "type": "credit", + "issuer": "HDFC", + "input_type": "card" + }, + "batch_id": null, + "active": true, + "created_at": 1581080272 + }, + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "fees": 590, + "tax": 90, + "status": "processed", + "purpose": "payout", + "utr": null, + "mode": "NEFT", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "failure_reason": null, + "created_at": 1581499319, + "fee_type": "", + "error": { + "description": null, + "source": null, + "reason": null + } +} +``` + +### Parameters + +`account_number`_mandatory_ +: `string` The account from which you want to make the payout. +Account details can be found on the RazorpayX Dashboard. For example, `7878780080316316`. + - Pass your customer identifier if you want money to be deducted from RazorpayX Lite. + - Pass your Current Account number if you want money to be deducted from your Current Account. + +> **WARN** +> +> +> **Watch Out!** +> +> - This is **not** your contact's bank account number. Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - This value is different for Test Mode and Live Mode. +> + +`amount` _mandatory_ +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10000, pass `1000000`. Minimum value is `100`. + +`currency` _mandatory_ +: `string` The payout currency. Here, it is `INR`. + +`mode`_mandatory_ +: `string` The mode to be used to create the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `UPI` + - `card` + + The payout modes are case-sensitive. When creating payouts using APIs, ensure payout modes are entered in upper case. + +`purpose`_mandatory_ +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`queue_if_low_balance`_optional_ +: `boolean` Possible values: + - `true` : The payout is queued when your business account does not have sufficient balance to process the payout. + - `false` (default) : The payout is never queued. The payout fails if your business account does not have sufficient balance to process the payout. + +`fund_account` _mandatory_ +: `object` The account to which you want to make the payout. + + `account_type` _mandatory_ + : `string` The type of account linked to the contact id. Here, it will be `card`. + + `card` _mandatory_ + : `object` The details of the card used. + + `input_type` _mandatory_ + : `string` Here, the value is `card`. + + `number` _mandatory_ + : `string` Same field can accept card numbers or card tokens. + + `name` _optional_ + : `string` The name on the card. + + `expiry_month` _optional_ + : `string` The expiry month of the entered card. + + `expiry_year` _optional_ + : `string` The expiry year of the entered card. + + `contact` _mandatory_ + : `object` The Contact's details. + + `name` _mandatory_ + : `string` Name of the contact. This field is case-sensitive. A minimum of 3 characters and a maximum of 50 characters are allowed. Name cannot end with a special character, except `.`. Supported characters: a-z, A-Z, 0-9, space, `’` , `-` , `_` , `/ `, `( , )` and `.`. For example, `Gaurav Kumar`. + + `email` _optional_ + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `contact` _optional_ + : `string` The contact's phone number. For example, `9000090000`. + + `type` _optional_ + : `string` Classification for the contact being created. For example, employee. Possible values: `vendor`, `customer`, `employee`, `self`. + + `reference_id` _optional_ + : `string` A user-generated reference given to the contact. For example, `Acme Contact ID 12345`. This field can have a maximum length of 40 characters. + + `notes` _optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`reference_id` _optional_ +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` _optional_ +: `string` Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. This is a custom note that also appears on the bank statement. If no value is passed for this parameter, it defaults to the Merchant Billing Label. + + Enter the important text in the first 9 characters as banks truncate the rest as per their standards. + +`notes` _optional_ +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier linked to the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`fund_account` +: `object` Contact and fund account details to which the payout was made. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it will be `fund_account`. + + `contact_id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `contact` + : `object` Details of the contact to whom the payout is being made. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `type` + : `string` Classification for the contact being created. For example, `employee`. Classifications are available by default: + - `vendor` + - `customer` + - `employee` + - `self` + + `reference_id` + : `string` A reference you entered for the contact. For example, `Acme Contact ID 12345`. + + `batch_id` + : `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true`: active + - `false`: inactive + + `notes` + : `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + + `account_type` + : `string` The type of fund account being created. It can be a `bank_account`, `vpa`, `card`. + + `bank_account` + : `object` The contact's bank account details. + + `ifsc` + : `string` Unique identifier of a bank branch. For example, `HDFC0000053`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `notes` + : `object` User-entered notes for internal reference. + + `vpa` + : `object` The contact's virtual payment address (VPA) details. + + `username` + : `string` The user name from the virtual payment address. For example, `gauravkumar`. + + `handle` + : `string` The handle from the virtual payment address. For example, `exampleupi`. + + `address` + : `string` The virtual payment address. For example, `gauravkumar@exampleupi`. + + `card` + : `object` Details of the credit card that is being used to create the fund account. + + `name` + : `string` The credit card holder's name. For example,`Gaurav Kumar`. + + `last4` + : `string` The last four digits of the credit card. For example, `0001`. + + `network` + : `string` The credit card issuing network. Possible values are: + - `Visa` + - `Mastercard` + - `American Express` + - `Diners Club` + + `type` + : `string` Currently, this can only be `credit`. + + `issuer` + : `string` The name of bank that issued the card. For example, `HDFC`. Refer to the [Supported Banks and Payout Modes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards.md#supported-banks-and-payout-modes) section for more details. + + `batch_id` + : `string` This value is returned if the fund account was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true`: active + - `false`: inactive + + `created_at` + : `integer` Timestamp, in Unix, when the fund account was created. For example, `1545320320`. + +`amount` +: `integer` Minimum value `100`. The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. +The value passed here does not include fees and tax. Fee and tax, if any, is deducted from your account balance. + +`currency` +: `string` The payout currency. Here, it is `INR`. + +`notes` +: `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The payout status. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + - `failed` + +`purpose` +: `string` The purpose of the payout. Classifications available by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Refer to the [Payouts section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#payout-modes) for more details. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `UPI` + - `card` + +`reference_id` +: `string` A reference you entered for the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` +: `string` This is a custom note that also appears on the bank statement. + +If no value is passed for this parameter, it defaults to the Merchant Billing Label. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Timestamp, in Unix, at which the payout was created. For example, `1545320320`. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible value is `free_payout`. diff --git a/llm-content/api/x/payout-composite/create/phone-number.md b/llm-content/api/x/payout-composite/create/phone-number.md new file mode 100644 index 00000000..8a79e1ea --- /dev/null +++ b/llm-content/api/x/payout-composite/create/phone-number.md @@ -0,0 +1,486 @@ +--- +title: Create a Payout to a Mobile Number Using Composite API +description: Create a Payout to Mobile Number using the Composite API. +--- + +# Create a Payout to a Mobile Number Using Composite API + +## Create a Payout to a Mobile Number Using the Composite API + +Use this endpoint to create a payout to a mobile number using Composite Payout API. + +> **WARN** +> +> +> +> **Watch Out!** +> +> - Ensure you [allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) and pass the [idempotency key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) to make a successful payout. +> - You can send payouts to VPA (UPI) linked mobile numbers only. +> +> + + Consider the points given below before firing this API: + +- Contact + - A new contact is created if any combination of the following details is unique: + - `fund_account.contact.name` + - `fund_account.contact.email` + - `fund_account.contact.contact` + - `fund_account.contact.type` + - `fund_account.contact.reference_id` + - If **all** the above details match the details of an existing contact, the API returns details of the existing contact. + - Use the [Update Contact API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/update.md) if you want to make changes to an existing contact. +- Fund Account + - A new fund account is created if any combination of the following details is unique: + - `fund_account.card.name` + - `fund_account.card.number` + - `fund_account.contact.name` + - `fund_account.contact.email` + - `fund_account.contact.contact` + - `fund_account.contact.type` + - `fund_account.contact.reference_id` + - If **all** the above details match the details of an existing fund account, the API returns details of the existing fund account. + - You cannot edit the details of a fund account. + +To understand the status of the payouts, refer to [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +### Request + +```curl: Curl +curl -u : +-X POST https://api.razorpay.com/v1/payouts +-H "Content-Type: application/json" +-H "X-Payout-Idempotency: 53cda91c-8f81-4e77-bbb9-7388f4ac6bf4" +-d '{ + "account_number": "7878780080316316", + "amount": 1000, + "currency": "INR", + "mode": "UPI", + "purpose": "cashback", + "fund_account": { + "account_type": "mobile", + "mobile": { + "number": "9876543210", + "account_holder_name": "Gaurav Kumar" + }, + "contact": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "type": "self", + "reference_id": "Acme Contact ID 12345", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + }, + "queue_if_low_balance": true, + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + } +}' + +``` + +### Response + +```json: Success + + { + "id": "pout_F681qslJ3ba70q", + "entity": "payout", + "fund_account_id": "fa_F681qr6Bqy1Je7", + "fund_account": { + "id": "fa_F681qr6Bqy1Je7", + "entity": "fund_account", + "contact_id": "cont_F681qmU11CfPDl", + "contact": { + "id": "cont_F681qmU11CfPDl", + "entity": "contact", + "name": "Gaurav Kumar", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1592929016 + }, + "account_type": "mobile", + "mobile": { + "number": "9876543210", + "account_holder_name": "Gaurav Kumar" + }, + "vpa": { + "username": null, + "handle": "exampleupi", + "address": null, + }, + "batch_id": null, + "active": true, + "created_at": 1592929016 + }, + "amount": 1000, + "currency": "INR", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + "VPA_HANDLE": "okhdfcbank" + }, + "fees": 59, + "tax": 9, + "status": "processed", + "purpose": "refund", + "utr": "UPI2928292020", + "mode": "UPI", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "failure_reason": null, + "created_at": 1592929017, + "fee_type": null, + "status_details": { + "reason": "pending_approval", + "description": "Workflow for the payout is pending approval from the approver(s)", + "source": "business" + }, + "merchant_id": "Pup4LDLiA1DssX", + "status_details_id": "R7aA38hQzg5TDj", + "error": { + "description": null, + "source": null, + "reason": null, + "code": "NA", + "step": "NA", + "metadata": {} + } +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "No linked account details found", + "source": "customer", + "step": "fetch_account_details", + "reason": "no_linked_account_found", + "metadata": {}, + "field": "number" + } +} +``` + +### Parameters + +`account_number` _mandatory_ +: `string` The account from which you want to make the payout. +Account details can be found on the RazorpayX Dashboard. For example, `7878780080316316`. + - Pass your customer identifier if you want money to be deducted from RazorpayX Lite. + - Pass your Current Account number if you want money to be deducted from your Current Account. + +> **WARN** +> +> +> **Watch Out!** +> +> - This is **not** your contact's bank account number. Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier.** +> - This value is different for Test Mode and Live Mode. +> + +`amount` _mandatory_ +: `integer` The payout amount, in paise. For example, pass `1000000` to transfer an amount of ₹10,000. Minimum value is `100`. + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` _mandatory_ +: `string` The payout currency. Here, it is `INR`. + +`mode` _mandatory_ +: `string` The mode to be used to create the payout. Here, it is `UPI`. + + The payout modes are case-sensitive. When creating payouts using APIs, ensure payout modes are entered in upper case. + +`purpose` _mandatory_ +: `string` The purpose of the payout. Classifications available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`fund_account` _mandatory_ +: `object` Details of the contact and fund account to which the payout should be made. + + `account_type` _mandatory_ + : `string` The type of account linked to the contact ID. Here, the value has to be `mobile`. + + `mobile` _mandatory_ + : `object` Object for capturing phone number and the name linked to it (optional). + + `number` _mandatory_ + : `string` The contact's 10-digit mobile number (without country code) to which you wish to send the payout. This has to be linked to a VPA (UPI). For example, `9876543210`. + + `account_holder_name` _optional_ + : `string` The name linked to the mobile number. This, if provided, will be validated against the linked UPI/bank account name. This will not be validated if not entered. For example, `Gaurav Kumar`. + + `contact` _mandatory_ + : `object` Details of the contact to whom the payout should be made. + + `name` _mandatory_ + : `string` Contact's name. Minimum 3 characters. Maximum 50 characters. This field is case-sensitive. Supported characters: `a-z`, `A-Z`, `0-9`, `space`, `’` , `-` , `_` , `/` , `(` , `)` and , `.`. For example, `Gaurav Kumar`. + + `email` _optional_ + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `contact` _optional_ + : `string` The contact's phone number. For example, `9000090000`. This can be same or different from the number passed to the `mobile` object for payout. + + `type` _optional_ + : `string` Classification for the contact. For example, `employee`. Classifications are available by default: + - `vendor` + - `customer` + - `employee` + - `self` + + Additional classifications can be created via the [Dashboard](https://x.razorpay.com/) and then used in APIs. It is not possible to create new classifications via the API. + + `reference_id` _optional_ + : `string` Maximum length is 40 characters. A reference you enter for the contact. For example, `Acme Contact ID 12345`. + + `notes` _optional_ + : `object` Notes you can enter for the contact for future reference. This is a key-value pair. For example, `"note_key": "Beam me up Scotty"`. + +`queue_if_low_balance` _optional_ +: `boolean` Possible values: + - `true`: The payout is queued when your business account does not have sufficient balance to process the payout. + - `false` (default): The payout is never queued. The payout fails if your business account does not have sufficient balance to process the payout. + +`reference_id` _optional_ +: `string` Maximum length is 40 characters. A reference you enter for the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` _optional_ +: `string` Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and `space`. This is a custom note that also appears on the bank statement. If no value is passed for this parameter, it defaults to the Merchant Billing Label. + Enter the important text in the first 9 characters as banks truncate the rest as per their standards. + +`notes` _optional_ +: `array` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier linked to the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`fund_account` +: `string` Contact and fund account details to which the payout was made. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it will be `fund_account`. + + `contact_id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `contact` + : `string` Details of the contact to whom the payout is being made. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `type` + : `string` Classification for the contact being created. For example, `employee`. Classifications are available by default: + - `vendor` + - `customer` + - `employee` + - `self` + + Additional Classifications can be created via the [Dashboard](https://x.razorpay.com/) and then used in APIs. It is not possible to create new Classifications via API. + + `reference_id` + : `string` A reference you entered for the contact. For example, `Acme Contact ID 12345`. + + `batch_id` + : `string` This parameter is populated if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true`: active + - `false`: inactive + + `notes` + : `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + + `account_type` + : `string` The type of fund account being created. Here, it will be `mobile`. + + `mobile` + : `object` The contact's mobile number to which you wish to make a payout. + + `number` _mandatory_ + : `string` Account holder's mobile number containing 10 digits. + + `account_holder_name` _optional_ + : `string` The name linked to the mobile number. + + `vpa` + : `string` The contact's VPA (UPI) details. + + `username` + : `string` The user name from the VPA (UPI). For example, `gauravkumar`. + + `handle` + : `string` The handle from the VPA (UPI) address. For example, `exampleupi`. + + `address` + : `string` The VPA (UPI) address. For example, `gauravkumar@exampleupi`. + + `batch_id` + : `string` This parameter is populated if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true`: active + - `false`: inactive + + `created_at` + : `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + +`amount` +: `integer` The payout amount, in paise. For example, if the amount transferred is ₹100, it will display 10000. +This value does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout currency. Here, it is `INR`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This field is populated only when the payout moves to the `processing` state. For example, `59` + +`tax` +: `integer` The tax that is applicable for the fee being charged. This field is populated only when the payout moves to the `processing` state. For example, `9` + +`status` +: `string` The payout status. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + +`purpose` +: `string` The purpose of the payout. Classifications available by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + +`utr` +: `string` The unique transaction number linked to a payout. For example, `UPI2928292020`. + +`mode` +: `string` Here, it is `UPI`. + +`reference_id` +: `string` A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` +: `string` This is a custom note that also appears on the bank statement. + +If no value is passed for this parameter, it defaults to the Merchant Billing Label. + +`batch_id` +: `string` This parameter is populated if the contact was created as part of a bulk upload. For example, `batch_00000000000001` + +`failure_reason` +: `string` The reason why the payout has failed (only in case of a failure, else it will return a null value). + +`merchant_id` +: `string` This parameter returns the merchant id. For example, `Pup4LDLiA1DssX` + +`status_details_id` +: `string` This parameter returns the status id of the payout. For example, `R7aA38hQzg5TDj` + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` Reason for the current status. For example, `imps_not_allowed`. [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Timestamp, in Unix, when the payout was created. For example, `1545320320`. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible values is `free_payout`. + +### Errors + + +No linked account details found +* code: 400 +* description: No linked VPA (UPI) found for the entered mobile number. +* solution: Enter a mobile number which is linked to a VPA. + +Account holder name not matching with bank provided name +* code: 400 +* description: Account holder name is not matching with the name fetched from the bank. +* solution: `account_holder_name` is optional. Enter this only if you are sure of the name linked to the phone number, as per bank records. System will validate the name only if entered. + +Mobile number should be 10-digit long +* code: 400 +* description: Entered mobile number is not 10-digit long. +* solution: Enter the correct 10-digit mobile number, without country code. + +We are facing trouble fetching account details. Please try again shortly +* code: 500 +* description: Server error. Unable to fetch account details from the server. +* solution: This is due to the NPCI mapper API being unresponsive. Retry the request after sometime. diff --git a/llm-content/api/x/payout-composite/create/vpa.md b/llm-content/api/x/payout-composite/create/vpa.md new file mode 100644 index 00000000..28e96e1e --- /dev/null +++ b/llm-content/api/x/payout-composite/create/vpa.md @@ -0,0 +1,454 @@ +--- +title: Create a Payout to VPA Using Composite API +description: Create a Composite Payout using VPA via APIs. +--- + +# Create a Payout to VPA Using Composite API + +## Create a Payout to VPA Using Composite API + +Use this endpoint to create a payout to VPA using Composite API. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you [allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) and pass the [idempotency key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) to make a successful payout. +> + + Consider the points given below before firing this API: + +- Contact + - A new contact is created if any combination of the following details is unique: + - `fund_account.contact.name` + - `fund_account.contact.email` + - `fund_account.contact.contact` + - `fund_account.contact.type` + - `fund_account.contact.reference_id` + - If **all** the above details match the details of an existing contact, the API returns details of the existing contact. + - Use the [Update Contact API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/update.md) if you want to make changes to an existing contact. +- Fund Account + - A new fund account is created if any combination of the following details is unique: + - `fund_account.card.name` + - `fund_account.card.number` + - `fund_account.contact.name` + - `fund_account.contact.email` + - `fund_account.contact.contact` + - `fund_account.contact.type` + - `fund_account.contact.reference_id` + - If **all** the above details match the details of an existing fund account, the API returns details of the existing fund account. + - You cannot edit the details of a fund account. + +To understand the status of the payouts, refer to [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payouts \ +-H "Content-Type: application/json" \ +-H "X-Payout-Idempotency: 53cda91c-8f81-4e77-bbb9-7388f4ac6bf4" \ +-d '{ + "account_number": "7878780080316316", + "amount": 1000000, + "currency": "INR", + "mode": "UPI", + "purpose": "refund", + "fund_account": { + "account_type": "vpa", + "vpa": { + "address": "gauravkumar@exampleupi" + }, + "contact": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "type": "self", + "reference_id": "Acme Contact ID 12345", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + }, + "queue_if_low_balance": true, + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + } +}' +``` + +### Response + +```json: Success +{ + "id": "pout_F6891rdxBLZ6AN", + "entity": "payout", + "fund_account_id": "fa_F6891pR3KFnaY2", + "fund_account": { + "id": "fa_F6891pR3KFnaY2", + "entity": "fund_account", + "contact_id": "cont_F681qmU11CfPDl", + "contact": { + "id": "cont_F681qmU11CfPDl", + "entity": "contact", + "name": "Gaurav Kumar", + "contact": "9876543210", + "email": "gaurav.kumar@example.com", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1592929016 + }, + "account_type": "vpa", + "batch_id": null, + "vpa": { + "username": "gauravkumar", + "handle": "exampleupi", + "address": "gauravkumar@exampleupi" + }, + "active": true, + "created_at": 1592929424 + }, + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "fees": 590, + "tax": 90, + "status": "processed", + "purpose": "payout", + "utr": null, + "mode": "UPI", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "status_details": null, + "created_at": 1592929424, + "fee_type": "", + "error": { + "description": null, + "source": null, + "reason": null + } +} +``` + +### Parameters + +`account_number`_mandatory_ +: `string` The account from which you want to make the payout. +Account details can be found on the RazorpayX Dashboard. For example, `7878780080316316`. + - Pass your customer identifier if you want money to be deducted from RazorpayX Lite. + - Pass your Current Account number if you want money to be deducted from your Current Account. + +> **WARN** +> +> +> **Watch Out!** +> +> - This is **not** your contact's bank account number. Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - This value is different for Test Mode and Live Mode. +> + +`amount`_mandatory_ +: `integer` The payout amount, in paise. For example, pass `1000000` to transfer an amount of ₹10,000. Minimum value `100`. +The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency`_mandatory_ +: `string` The payout currency. Here, it is `INR`. + +`mode`_mandatory_ +: `string` Here, it has to be `UPI`. + + The payout modes are case-sensitive. When creating payouts using APIs, ensure payout modes are entered in upper case. + +`purpose`_mandatory_ +: `string` The purpose of the payout. Classifications available by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`fund_account`_mandatory_ +: `object` Details of the contact and fund account to which the payout should be made. + + `account_type`_mandatory_ + : `string` The type of account to be linked to the contact ID. Here, it is `vpa`. + + `vpa`_mandatory_ + : `object` The contact's virtual payment address (VPA) details. + + `address`_mandatory_ + : `string` Between 3 and 100 characters. Supported characters: `a-z`, `A-Z`, `0-9`, `.`, `-` and one `@`. The virtual payment address. For example, `gauravkumar@exampleupi`. + + `contact`_mandatory_ + : `object` Details of the contact to whom the payout should be made. + + `name`_mandatory_ + : `string` The contact's name. This field is case-sensitive. A minimum of 3 characters and a maximum of 50 characters are allowed. Name cannot end with a special character, except `.`. Supported characters: `a-z`, `A-Z`, `0-9`, `space`, `’` , `-` , `_` , `/` , `(` , `)` and , `.`. For example, `Gaurav Kumar`. + + `email`_optional_ + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `contact`_optional_ + : `string` The contact's phone number. For example, `9000090000`. + + `type`_optional_ + : `string` Classification for the contact being created. For example, `employee`. Classifications available by default: + - `vendor` + - `customer` + - `employee` + - `self` + + + Additional Classifications can be created via the [Dashboard](https://x.razorpay.com/) and then used in APIs. It is not possible to create new Classifications via API. + + `reference_id`_optional_ + : `string` Maximum length is 40 characters. A reference you enter for the contact. For example, `Acme Contact ID 12345`. + + `notes`_optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`queue_if_low_balance`_optional_ +: `boolean` Possible values: + - `true`: The payout is queued when your business account does not have sufficient balance to process the payout. + - `false` (default): The payout is never queued. The payout fails if your business account does not have sufficient balance to process the payout. + +`reference_id`_optional_ +: `string` Maximum length is 40 characters. A reference you enter for the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration`_optional_ +: `string` Maximum length 30 characters. Allowed characters: a-z, A-Z, 0-9 and space. This is a custom note that also appears on the bank statement. If no value is passed for this parameter, it defaults to the Merchant Billing Label. + + Enter the important text in the first 9 characters as banks truncate the rest as per their standards. + +`notes`_optional_ +: `array` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier linked to the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`fund_account` +: `object` Contact and fund account details to which the payout was made. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it will be `fund_account`. + + `contact_id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `contact` + : `object` Details of the contact to whom the payout is being made. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `type` + : `string` Classification for the contact being created. For example, `employee`. Classifications are available by default: + - `vendor` + - `customer` + - `employee` + - `self` + + `reference_id` + : `string` A reference you entered for the contact. For example, `Acme Contact ID 12345`. + + `batch_id` + : `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true`: active + - `false`: inactive + + `notes` + : `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + + `account_type` + : `string` The type of fund account being created. It can be a `bank_account`, `vpa`, `card`. + + `bank_account` + : `object` The contact's bank account details. + + `ifsc` + : `string` Unique identifier of a bank branch. For example, `HDFC0000053`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `notes` + : `object` User-entered notes for internal reference. + + `vpa` + : `object` The contact's virtual payment address (VPA) details. + + `username` + : `string` The user name from the virtual payment address. For example, `gauravkumar`. + + `handle` + : `string` The handle from the virtual payment address. For example, `exampleupi`. + + `address` + : `string` The virtual payment address. For example, `gauravkumar@exampleupi`. + + `card` + : `object` Details of the credit card that is being used to create the fund account. + + `name` + : `string` The credit card holder's name. For example,`Gaurav Kumar`. + + `last4` + : `string` The last four digits of the credit card. For example, `0001`. + + `network` + : `string` The credit card issuing network. Possible values are: + - `Visa` + - `Mastercard` + - `American Express` + - `Diners Club` + + `type` + : `string` Currently, this can only be `credit`. + + `issuer` + : `string` The name of bank that issued the card. For example, `HDFC`. Refer to the [Supported Banks and Payout Modes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards.md#supported-banks-and-payout-modes) section for more details. + + `batch_id` + : `string` This value is returned if the fund account was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true`: active + - `false`: inactive + + `created_at` + : `integer` Timestamp, in Unix, when the fund account was created. For example, `1545320320`. + +`amount` +: `integer` Minimum value `100`. The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. +The value passed here does not include fees and tax. Fee and tax, if any, is deducted from your account balance. + +`currency` +: `string` The payout currency. Here, it is `INR`. + +`notes` +: `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The payout status. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + - `failed` + +`purpose` +: `string` The purpose of the payout. Classifications available by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Refer to the [Payouts section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#payout-modes) for more details. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `UPI` + - `card` + +`reference_id` +: `string` A reference you entered for the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` +: `string` This is a custom note that also appears on the bank statement. + +If no value is passed for this parameter, it defaults to the Merchant Billing Label. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Timestamp, in Unix, at which the payout was created. For example, `1545320320`. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible value is `free_payout`. diff --git a/llm-content/api/x/payout-composite/entity.md b/llm-content/api/x/payout-composite/entity.md new file mode 100644 index 00000000..5aa64588 --- /dev/null +++ b/llm-content/api/x/payout-composite/entity.md @@ -0,0 +1,286 @@ +--- +title: Payout Composite Entity +description: Check the entity code for Payout Composite APIs. +--- + +# Payout Composite Entity + +## Payout Composite Entity + +The Payout Composite Entity has the following parameters: + +### Response + +```json: Sample Entity +{ + "id": "pout_F681qslJ3ba70q", + "entity": "payout", + "fund_account_id": "fa_F681qr6Bqy1Je7", + "fund_account": { + "id": "fa_F681qr6Bqy1Je7", + "entity": "fund_account", + "contact_id": "cont_F681qmU11CfPDl", + "contact": { + "id": "cont_F681qmU11CfPDl", + "entity": "contact", + "name": "Gaurav Kumar", + "contact": "9876543210", + "email": "gaurav.kumar@example.com", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1592929016 + }, + "account_type": "bank_account", + "bank_account": { + "ifsc": "HDFC0001234", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "notes": [], + "account_number": "1121431121541121" + }, + "batch_id": null, + "active": true, + "created_at": 1592929016 + }, + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "fees": 590, + "tax": 90, + "status": "processed", + "purpose": "refund", + "utr": null, + "mode": "NEFT", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "status_details": null, + "created_at": 1592929017, + "fee_type": "", + "error": { + "description": null, + "source": null, + "reason": null + } +} +``` + +### Parameters + +`id` +: `string` The unique identifier linked to the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`fund_account` +: `object` Contact and fund account details to which the payout was made. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it will be `fund_account`. + + `contact_id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `contact` + : `object` Details of the contact to whom the payout is being made. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `type` + : `string` Classification for the contact being created. For example, `employee`. Classifications are available by default: + - `vendor` + - `customer` + - `employee` + - `self` + + `reference_id` + : `string` A reference you entered for the contact. For example, `Acme Contact ID 12345`. + + `batch_id` + : `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true`: active + - `false`: inactive + + `notes` + : `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + + `account_type` + : `string` The type of fund account being created. It can be a `bank_account`, `vpa`, `card`. + + `bank_account` + : `object` The contact's bank account details. + + `ifsc` + : `string` Unique identifier of a bank branch. For example, `HDFC0000053`. + + `bank_name` + : `string` The contact's bank name. For example, `HDFC`. + + `name` + : `string` Account holder's name. For example,`Gaurav Kumar`. + + `account_number` + : `string` Beneficiary account number. For example, `765432123456789`. + + `notes` + : `object` User-entered notes for internal reference. + + `vpa` + : `object` The contact's virtual payment address (VPA) details. + + `username` + : `string` The user name from the virtual payment address. For example, `gauravkumar`. + + `handle` + : `string` The handle from the virtual payment address. For example, `exampleupi`. + + `address` + : `string` The virtual payment address. For example, `gauravkumar@exampleupi`. + + `card` + : `object` Details of the credit card that is being used to create the fund account. + + `name` + : `string` The credit card holder's name. For example,`Gaurav Kumar`. + + `last4` + : `string` The last four digits of the credit card. For example, `0001`. + + `network` + : `string` The credit card issuing network. Possible values are: + - `Visa` + - `Mastercard` + - `American Express` + - `Diners Club` + + `type` + : `string` Currently, this can only be `credit`. + + `issuer` + : `string` The name of bank that issued the card. For example, `HDFC`. Refer to the [Supported Banks and Payout Modes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards.md#supported-banks-and-payout-modes) section for more details. + + `batch_id` + : `string` This value is returned if the fund account was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true`: active + - `false`: inactive + + `created_at` + : `integer` Timestamp, in Unix, when the fund account was created. For example, `1545320320`. + +`amount` +: `integer` Minimum value `100`. The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. +The value passed here does not include fees and tax. Fee and tax, if any, is deducted from your account balance. + +`currency` +: `string` The payout currency. Here, it is `INR`. + +`notes` +: `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The payout status. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + - `failed` + +`purpose` +: `string` The purpose of the payout. Classifications available by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Refer to the [Payouts section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#payout-modes) for more details. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `UPI` + - `card` + +`reference_id` +: `string` A reference you entered for the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` +: `string` This is a custom note that also appears on the bank statement. + +If no value is passed for this parameter, it defaults to the Merchant Billing Label. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Timestamp, in Unix, at which the payout was created. For example, `1545320320`. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible value is `free_payout`. diff --git a/llm-content/api/x/payout-idempotency.md b/llm-content/api/x/payout-idempotency.md new file mode 100644 index 00000000..f24132a3 --- /dev/null +++ b/llm-content/api/x/payout-idempotency.md @@ -0,0 +1,57 @@ +--- +title: Payout Idempotency +description: Use the Payout Idempotency API to retry a request without duplication. +--- + +# Payout Idempotency + +Razorpay uses Idempotency Key for payout API requests, so that the requests can be retried safely. The Idempotency Key is a unique value that you generate which will be used to recognize subsequent retries of the same request. This is useful when an API request is disrupted during transit. Razorpay saves the response to the first request made with an Idempotency Key. Subsequent requests using the same key will return the saved result, thereby avoiding duplication. Hence we recommend you to use the same Idempotency Key for all attempts of the same payout until it is `processed` or `failed`. + + + + + + + Consider that you are attempting a payout. + - You have generated an Idempotency Key and initiated the payout. + - There is a network issue and the system does not return a `processed` value. + - After sometime, you retry the payout using the same Idempotency Key. + - The system maps both attempts to a single payout because of the same Idempotency Key used. + - The payout is `processed` only once. There is no duplication because of the same Idempotency Key used. + - If the payout returns a `failed` state, it means all attempts using the same Idempotency Key are failed. + - You generate a new key to retry the payout. + + +> **WARN** +> +> +> **Watch Out!** +> +> - Idempotency key has been made mandatory for all payout requests since March 15, 2025. +> - Ensure that you do not retry the same payout using a fresh Idempotency Key when the first attempt is still `processing`. The system will treat them as different payouts and will process both resulting in duplication. +> + + + + + To use the Payout Idempotency API, you must [create a Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/create.md) and create a Fund Account (using [bank account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts/create/bank-account.md) details or [VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts/create/vpa.md)). Ensure to [allowlist the IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) that you use while making payouts via APIs or the request will fail. + + + Fork the Razorpay Postman Public Workspace and try the Payout Idempotency API using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md). + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-122ae23d-c682-44b1-904f-a56871286f94) + + + +### Related Guides + + [About Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) + [Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) + [Payouts APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts.md) + + + +### Endpoints + + - **post** `/v1/payouts` - Make an Idempotent Request: + Requests for an idempotent payout. diff --git a/llm-content/api/x/payout-idempotency/make-request.md b/llm-content/api/x/payout-idempotency/make-request.md new file mode 100644 index 00000000..f5de5819 --- /dev/null +++ b/llm-content/api/x/payout-idempotency/make-request.md @@ -0,0 +1,253 @@ +--- +title: Make a Request Idempotent +description: Make a Request Idempotent using API. +--- + +# Make a Request Idempotent + +## Make a Request Idempotent + +To make a request idempotent, add the header `X-Payout-Idempotency` to the request and pass an idempotency key against it. Currently, idempotency is supported only on the Create Payout API and the Composite APIs. + +> **WARN** +> +> +> **Watch Out!** +> +> Idempotency key has been made mandatory for all payout requests since March 15, 2025 +> + +**Points to Consider**: + +- An idempotency key is a unique value generated by you. Our servers use this key to recognise subsequent retries of the same request. +- The idempotency key (4-36 characters) can only contain alphabets, numbers, hyphens, underscores and space. For example, `53cda91c-8f81-4e77-bbb9-7388f4ac6bf4` is an idempotency key. +- When retrying a request, the request body must be the same as the first request for idempotency to work. A different payload will be rejected as a `BAD_REQUEST`. +- The idempotency key in retries must be the same as the original request. +- Use unique idempotency keys for each unique request. + +We recommend you generate the key using a **version 4 (random) UUID generator**. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payouts \ +-H "Content-Type: application/json" \ +-H "X-Payout-Idempotency: 53cda91c-8f81-4e77-bbb9-7388f4ac6bf4" \ +-d '{ + "account_number": "7878780080316316", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "mode": "IMPS", + "purpose": "refund", + "queue_if_low_balance": true, + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' +``` + +### Response + +```json: Success +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fees": 0, + "tax": 0, + "status": "queued", + "utr": null, + "mode": "IMPS", + "purpose": "refund", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "status_details": null, + "created_at": 1545383037 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Idempotency key is missing. Include idempotency header and key in the request.", + "source": "business", + "step": null, + "reason": "null", + "metadata": {}, + "field": "X-Payout-Idempotency" + } +} +``` + +### Parameters + +`account_number`_mandatory_ +: `string` The account from which you want to make the payout. For example, `7878780080316316`. + - Pass your customer identifier if you want money to be deducted from RazorpayX Lite. + - Pass your Current Account number if you want money to be deducted from your Current Account. + +> **WARN** +> +> +> **Watch Out!** +> +> - This is **not** your Contact's bank account number. Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - This value is different for Test Mode and Live Mode. +> + +`fund_account_id`_mandatory_ +: `string` The unique identifier linked to a fund account. For example, `fa_00000000000001`. + +`amount`_mandatory_ +: `integer` The payout amount, in paise. For example, pass `1000000` to transfer an amount of ₹10,000. Minimum value `100`. + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency`_mandatory_ +: `string` The payout currency. Here, it is `INR`. + +`mode`_mandatory_ +: `string` The mode to be used to create the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `card` + + + The payout modes are case-sensitive. When creating payouts using APIs, ensure payout modes are entered in upper case. + +`purpose`_mandatory_ +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`queue_if_low_balance`_optional_ +: `boolean` Possible values: + - `true`: The payout is queued when your business account does not have sufficient balance to process the payout. + - `false` (default): The payout is never queued. The payout fails if your business account does not have sufficient balance to process the payout. + +`reference_id`_optional_ +: `string` A user-generated reference given to the payout. Maximum length is 40 characters. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration`_optional_ +: `string` Custom note that also appears on the bank statement. Maximum length 30 characters. Allowed characters: a-z, A-Z, 0-9 and space. + If no value is passed for this parameter, it defaults to the Merchant Billing Label. Ensure that the most important text forms the first 9 characters as banks may truncate the rest as per their standards. + +`notes`_optional_ +: `array of objects` Multiple key-value pairs that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier of the order. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`amount` +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. Minimum value `100`. The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout's currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + - `failed` + + Know more about [Payout statuses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md) and [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `card` + + + The payout modes are case-sensitive. + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + +`reference_id` +: `string` A user-generated reference given to the payout. Maximum length is 40 characters. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` +: `string` This is a custom note that also appears on the bank statement. Maximum length 30 characters. Allowed characters: a-z, A-Z, 0-9 and space. + If no value is passed for this parameter, it defaults to the Merchant Billing Label. Ensure that the **most important text** forms the first 9 characters as banks may truncate the rest as per their standards. + +`batch_id` +: `string` This value is returned if the Contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode`. + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible values is `free_payout`. + +### Errors + +Idempotency key is missing. Include idempotency header and key in the request. +* code: 400 +* description: Idempotency key is mandatory. +* solution: Include the X-Payout-Idempotency header and the idempotency key in your request to make a successful payout. Generate a key using the version 4 (random) UUID generator. diff --git a/llm-content/api/x/payout-links.md b/llm-content/api/x/payout-links.md new file mode 100644 index 00000000..9332c1dc --- /dev/null +++ b/llm-content/api/x/payout-links.md @@ -0,0 +1,45 @@ +--- +title: Payout Links +description: List of Payout Links API endpoints to create, retrieve and cancel Payout Links. +--- + +# Payout Links + +[Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md) enable you to make payouts to those Contacts whose Fund Account details are not available. Allowlisting your IP is mandatory for using the Payout Link APIs. Know how to [allowlist your IP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md). + + + Fork the Razorpay Postman Public Workspace and try the Payout Links APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md). + + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-60f1103d-eb2b-454b-8b17-7911e3c9d2f5) + + + +### Related Guides + + [About Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md) + [Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) + [Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payout-links.md) + + + +### Endpoints + + - **post** `/v1/payout-links` - Create a Payout Link (Contact Details): + Creates a Payout Link using contact details like email id/mobile number. + + + - **post** `/v1/payout-links` - Create a Payout Link (Contact ID): + Creates a Payout Link using Contact ID. + + + - **get** `/v1/payout-links` - Fetch All Payout Links: + Retrieves all Payout Links created. + + + - **get** `/v1/payout-links/:id/` - Fetch Payout Links With ID: + Retrieves a particular Payout Link. + + + - **post** `/v1/payout-links/:id/post` - Cancel a Payout Link: + Cancels a Payout Link. diff --git a/llm-content/api/x/payout-links/cancel.md b/llm-content/api/x/payout-links/cancel.md new file mode 100644 index 00000000..043eadac --- /dev/null +++ b/llm-content/api/x/payout-links/cancel.md @@ -0,0 +1,155 @@ +--- +title: Cancel a Payout Link +description: Cancel a Payout Link via API. +--- + +# Cancel a Payout Link + +## Cancel a Payout Link + +Use this endpoint to cancel a Payout Link. You can only cancel Payout Links in the `issued` state. Know more about the [Payout Link Life Cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md). + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/payout-links/poutlk_00000000000003/cancel +``` + +### Response + +```json: Success +{ + "id": "poutlk_00000000000001", + "entity": "payout_link", + "contact_id": "cont_00000000000001", + "contact": { + "name": "Gaurav Kumar", + "type": "customer", + "contact": "912345678", + "email": "gaurav.kumar@example.com" + }, + "fund_account_id": null, + "payout_id": null, + "purpose": "refund", + "status": "cancelled", + "amount": 1000, + "currency": "INR", + "description": "Payout Link for Gaurav Kumar", + "attempt_count": 0, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "short_url": "https://rzp.io/i/3b1Tw6", + "send_sms": true, + "send_email": true, + "cancelled_at": 1596122334, // + "created_at": 1545383037, + "expire_by": 1545384058, //This value is returned only if you have enabled and set expiry for Payout Links. + "expired_at": 1545384658 //This value is returned only if you have enabled and set expiry for Payout Links. +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier for the Payout Link you want to cancel. For example, `poutlk_00000000000003`. + +### Parameters + +`id` +: `string` The unique identifier of the Payout Link that was created. For example, `poutlk_00000000000001`. + +`entity` +: `string` The entity created. Here it will be `payout_link`. + +`contact` +: `object` Details of the contact to whom the Payout Link was to be sent. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `type` + : `string` Classification of the contact created. For example, `employee`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`purpose` +: `string` The purpose of the payout. For example, `refund`, `cashback` or `payout`. + +`status` +: `string` The Payout Link status. Possible values: + - `pending` + - `issued` + - `processing` + - `processed` + - `cancelled` + - `rejected` + +Refer to the [Payout Link Life Cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md) for more details. + +`amount` +: `integer` The amount, in paise, that was to be transferred from the business account to the contact's fund account. + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The currency in which the payout was to be made. Here, it is `INR`. + +`description` +: `string` A user-entered description for the Payout Link. For example, `Payout Link for Gaurav Kumar`. + +`short_url` +: `string` A short link for the Payout Link that was created. This is the link shared with the contact. + +`created_at` +: `integer` Timestamp, in Unix, when the Payout Link was created. + +`contact_id` +: `string` The unique identifier of the contact to whom the Payout Link was sent. For example, `cont_00000000000001`. + +`send_sms` +: `boolean` Possible values: + - `true`: SMS sent to the provided contact number. + - `false`: SMS could not be sent to the provided contact number. This could be because the contact number provided was wrong. + +`send_email` +: `boolean` Possible values: + - `true`: Email sent to the provided email address. + - `false`: Email could not be sent to the provided email address. This could be because the email address provided was wrong. + +`fund_account_id` +: `string` The unique identifier of the contact's fund account to which the payout will be made. For example, `fa_00000000000001`. + + Fund Account id is returned only when the Payout Link moves to the [`processing` state](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md) after the contact provides their account details. + +`payout_id` +: `string` The unique identifier for the payout made to the contact. For example, `pout_00000000000001`. + + This value is returned only when the Payout Link moves to the [`processed` state](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md) after the contact would receive the amount in their account. + +`cancelled_at` +: `integer` Timestamp, in Unix, when the Payout Link was cancelled by you. This value is returned only when the Payout Link moves to the `cancelled` state. + +`attempt_count` +: `integer` The number of attempts to complete the payout. For example, `0`. + +`receipt` +: `string` A user-entered receipt number for the payout. For example, `Receipt No. 1`. + +`notes` +: `object` User-entered notes for internal reference. This is a key-value pair. For example, `"note_key": "Beam me up Scotty”`. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payout Link was to expire. This is set at the time of creation of the Payout Link and is set at least 15 minutes ahead of the current time. + + This value is returned only if you have enabled the expiry feature for Payout Links. Know how to [set expiry](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md) to Payout Links. + +`expired_at` +: `integer` Timestamp, in Unix, when the Payout Link expired. This is set at the time of creation of the Payout Link. diff --git a/llm-content/api/x/payout-links/create/use-contact-details.md b/llm-content/api/x/payout-links/create/use-contact-details.md new file mode 100644 index 00000000..973ce398 --- /dev/null +++ b/llm-content/api/x/payout-links/create/use-contact-details.md @@ -0,0 +1,263 @@ +--- +title: Create Payout Links Using Contact Details +description: Create Payout Links via API using recipient's contact details. +--- + +# Create Payout Links Using Contact Details + +## Create Payout Links Using Contact Details + +Use this endpoint to create a Payout Link using customer's contact details such as email id or mobile number. You can choose to send the Payout Link to either contact details. Know more about [Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md). + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payout-links \ +-H "Content-Type: application/json" \ +-d '{ + "account_number": "7878780080857996", + "contact": { + "name": "Gaurav Kumar", + "contact": "912345678", + "email": "gaurav.kumar@example.com", + "type": "customer" + }, // Only applicable when you have the contact details of the recipient. + "amount": 1000, + "currency": "INR", + "purpose": "refund", + "description": "Payout link for Gaurav Kumar", + "receipt": "Receipt No. 1", + "send_sms": true, + "send_email": true, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "expire_by": 1545384058 // This parameter can be used only if you have enabled the expiry feature for Payout Links. +}' +``` + +### Response + +```json: Success +{ + "id": "poutlk_00000000000001", + "entity": "payout_link", + "contact": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "912345678" + }, + + "purpose": "refund", + "status": "issued", + "amount": 1000, + "currency": "INR", + "description": "Payout link for Gaurav Kumar", + "short_url": "https://rzp.io/i/3b1Tw6", + "created_at": 1545383037, + "contact_id": "cont_00000000000001", + "send_sms": true, + "send_email": true, + "fund_account_id": null, + "cancelled_at": null, + "attempt_count": 0, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "expire_by": 1545384058, + "expired_at": 1545384658 +} +``` + +### Parameters + +`account_number`_mandatory_ +: `string` The account from which you want to make the payout. +Account details can be found on the [RazorpayX Dashboard](https://x.razorpay.com/settings/banking). For example, `7878780080316316`. + - Pass your customer identifier if you want money to be deducted from RazorpayX Lite. + - Pass your current account number if you want money to be deducted from your current account. + +> **WARN** +> +> +> **Watch Out!** +> +> - This is **NOT** your contact's bank account number. Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - This value is different for Test Mode and Live Mode. +> + +`contact`_mandatory_ +: `object` Details of the contact to whom the Payout Link is to be sent. Do not pass the `id` parameter. + + `name`_mandatory_ + : `string` + +**Use this only if you are not using the `id` parameter.** + +The contact's name. This field is case-sensitive. A minimum of 3 characters and a maximum of 50 characters are allowed. Name cannot end with a special character, except `.`. Supported characters: `a-z`, `A-Z`, `0-9`, `space`, `’` , `-` , `_` , `/` , `(` , `)` and , `.`. For example, `Gaurav Kumar`.For example, `Gaurav Kumar`. + + `contact`_either_ + : `string` Use this only if you are not using the `id` parameter. The contact's phone number. For example, `9000090000`. + + `email`_either contact or email mandatory if id is not used_ + : `string` Use this only if you are not using the `id` parameter. The contact's email address. For example, `gaurav.kumar@example.com`. + + `type`_optional_ + : `string` Use this only if you are not using the `id` parameter. Classification for the contact being created. For example, `employee`. + +The following classifications are available by default: + - `vendor` + - `customer` + - `employee` + - `self` + + + Additional classifications can be created via the [Dashboard](https://x.razorpay.com/) and then used in APIs. It is not possible to create new classifications via the API. + +`amount`_mandatory_ +: `integer` The amount, in paise, to be transferred from the business account to the contact's fund account. For example, pass `1000000` to transfer an amount of ₹10,000. The minimum value that can be passed is `100`. + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency`_mandatory_ +: `string` The currency in which the payout is being made. Here, it is `INR`. + +`purpose`_mandatory_ +: `string` The purpose of the payout that is being created via the Payout Link. For example, `refund`. + +Classifications available by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. You cannot create new payout purposes via the API. + +`description`_mandatory_ +: `string` Add a description to communicate the context of the Payout Link to the recipient. For example, `Cashback for Mr. Gaurav Kumar on the purchase on Earl Grey Tea`. + +`receipt`_optional_ +: `string` A user-entered receipt number for the payout. For example, `Receipt No. 1`. + +`send_sms`_optional_ +: `boolean` Possible values: + - `true`: Razorpay sends the Payout Link to the provided contact number via SMS. + - `false` (default): You send the Payout Link to the contact via SMS. + +`send_email`_optional_ +: `boolean` Possible values: + - `true`: Razorpay sends the Payout Link to the provided email address via email. + - `false` (default): You send the Payout Link to the contact via email. + +`notes`_optional_ +: `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`expire_by`_optional_ +: `integer` Timestamp, in Unix, when the Payout Link was to expire. This is set at the time of creation of the Payout Link and is set at least 15 minutes ahead of the current time. + + This value is returned only if you have enabled expiry feature for Payout Links. Know more about how to [set expiry](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md) to Payout Links. + +### Parameters + +`id` +: `string` The unique identifier of the Payout Link that is created. For example, `poutlk_00000000000001`. + +`entity` +: `string` The entity being created. Here it will be `payout_link`. + +`contact` +: `object` Details of the contact to whom the Payout Link is to be sent. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `type` + : `string` Classification of the contact being created. For example, `employee`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`purpose` +: `string` The purpose of the payout. For example, `refund`, `cashback` or `payout`. + +`status` +: `string` The Payout Link status. Possible values: + - `pending` + - `issued` + - `processing` + - `processed` + - `cancelled` + - `rejected` + + + Refer to the [Payout Link Life Cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md) for more details. + +`amount` +: `integer` The amount, in paise, to be transferred from the business account to the contact's fund account. + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The currency in which the payout is being made. Here, it is `INR`. + +`description` +: `string` A user-entered description for the Payout Link. For example, `Payout link for Gaurav Kumar`. + +`short_url` +: `string` A short link for the Payout Link that was created. This is the link that is shared with the contact. + +`created_at` +: `integer` Timestamp, in Unix, when the Payout Link was created. + +`contact_id` +: `string` The unique identifier of the contact to whom the Payout Link has to be sent. For example, `cont_00000000000001`. + +`send_sms` +: `boolean` Possible values: + - `true`: SMS sent to the provided contact number. + - `false`: SMS could not be sent to the provided contact number. This could be because the contact number provided was wrong. + +`send_email` +: `boolean` Possible values: + - `true`: Email sent to the provided email address. + - `false`: Email could not be sent to the provided email address. This could be because the email address provided was wrong. + +`fund_account_id` _when the contact provides their account details_ +: `string` The unique identifier of the contact's fund account to which the payout will be made. For example, `fa_00000000000001`. + + Fund Account id is returned only when the Payout Link moves to the [`processing` state](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md). + +`payout_id` _only if the contact receives the amount in their account_ +: `string` The unique identifier for the payout made to the contact. For example, `pout_00000000000001`. + + This value is returned only when the Payout Link moves to the [`processed` state](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md). + +`cancelled_at` +: `integer` Timestamp, in Unix, when the Payout Link was cancelled by you. This value is returned only when the Payout Link moves to the `cancelled` state. + +`attempt_count` +: `integer` The number of attempts to complete the payout. For example, `0`. + +`receipt` +: `string` A user-entered receipt number for the payout. For example, `Receipt No. 1`. + +`notes` +: `object` User-entered notes for internal reference. This is a key-value pair. For example, `"note_key": "Beam me up Scotty”`. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payout Link was to expire. This is set at the time of creation of the Payout Link and is set at least 15 minutes ahead of the current time. + + This value is returned only if you have enabled the expiry feature for Payout Links. Know how to [set expiry](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md) to Payout Links. + +`expired_at` +: `integer` Timestamp, in Unix, when the Payout Link expired. This is set at the time of creation of the Payout Link. diff --git a/llm-content/api/x/payout-links/create/use-contact-id.md b/llm-content/api/x/payout-links/create/use-contact-id.md new file mode 100644 index 00000000..0294d85f --- /dev/null +++ b/llm-content/api/x/payout-links/create/use-contact-id.md @@ -0,0 +1,239 @@ +--- +title: Create Payout Links Using Contact ID +description: Create Payout Links via API using RazorpayX Contact id. +--- + +# Create Payout Links Using Contact ID + +## Create Payout Links Using Contact ID + +Use this endpoint to create a Payout Link using the Contact id of the recipient. [Create a Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#create-a-contact) to generate the Contact id/Customer id. + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payout-links \ +-H "Content-Type: application/json" \ +-d '{ + "account_number": "7878780080857996", + "contact": { + "id": "cont_00000000000001" + }, // Only applicable when you have the bank account details of the recipient saved as a RazorpayX Contact. + "amount": 1000, + "currency": "INR", + "purpose": "refund", + "description": "Payout link for Gaurav Kumar", + "receipt": "Receipt No. 1", + "send_sms": true, + "send_email": true, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "expire_by": 1545384058 // This parameter can be used only if you have enabled the expiry feature for Payout Links. +}' +``` + +### Response + +```json: Success +{ + "id": "poutlk_00000000000001", + "entity": "payout_link", + "contact": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "912345678" + }, + "purpose": "refund", + "status": "issued", + "amount": 1000, + "currency": "INR", + "description": "Payout link for Gaurav Kumar", + "short_url": "https://rzp.io/i/3b1Tw6", + "created_at": 1545383037, + "contact_id": "cont_00000000000001", + "send_sms": true, + "send_email": true, + "fund_account_id": null, + "cancelled_at": null, + "attempt_count": 0, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "expire_by": 1545384058, + "expired_at": 1545384658 +} +``` + +### Parameters + +`account_number`_mandatory_ +: `string` The account from which you want to make the payout. +Account details can be found on the [RazorpayX Dashboard](https://x.razorpay.com/settings/banking). For example, `7878780080316316`. + - Pass your customer identifier if you want money to be deducted from RazorpayX Lite. + - Pass your current account number if you want money to be deducted from your current account. + +> **WARN** +> +> +> **Watch Out!** +> +> - This is **NOT** your contact's bank account number. Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - This value is different for Test Mode and Live Mode. +> + +`contact`_mandatory_ +: `object` Details of the contact to whom the Payout Link is to be sent. + + `id`_mandatory_ + : `string` The unique identifer for the contact. For example, `cont_00000000000001`. + + If you are using this, do not use the other parameters in the array. + +`amount`_mandatory_ +: `integer` The amount, in paise, to be transferred from the business account to the contact's fund account. For example, pass `1000000` to transfer an amount of ₹10,000. The minimum value that can be passed is `100`. + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency`_mandatory_ +: `string` The currency in which the payout is being made. Here, it is `INR`. + +`purpose`_mandatory_ +: `string` The purpose of the payout that is being created via the Payout Link. For example, `refund`. + +Classifications available by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. You cannot create new payout purposes via the API. + +`description`_mandatory_ +: `string` Add a description to communicate the context of the Payout Link to the recipient. For example, `Cashback for Mr. Gaurav Kumar on the purchase on Earl Grey Tea`. + +`receipt`_optional_ +: `string` A user-entered receipt number for the payout. For example, `Receipt No. 1`. + +`send_sms`_optional_ +: `boolean` Possible values: + - `true`: Razorpay sends the Payout Link to the provided contact number via SMS. + - `false` (default): You send the Payout Link to the contact via SMS. + +`send_email`_optional_ +: `boolean` Possible values: + - `true`: Razorpay sends the Payout Link to the provided email address via email. + - `false` (default): You send the Payout Link to the contact via email. + +`notes`_optional_ +: `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`expire_by`_optional_ +: `integer` Timestamp, in Unix, when the Payout Link was to expire. This is set at the time of creation of the Payout Link and is set at least 15 minutes ahead of the current time. + + This value is returned only if you have enabled the expiry feature for Payout Links. Know how to [set expiry](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md) to Payout Links. + +### Parameters + +`id` +: `string` The unique identifier of the Payout Link that is created. For example, `poutlk_00000000000001`. + +`entity` +: `string` The entity being created. Here it will be `payout_link`. + +`contact` +: `object` Details of the contact to whom the Payout Link is to be sent. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `type` + : `string` Classification of the contact being created. For example, `employee`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`contact_id` +: `string` The unique identifier of the contact to whom the Payout Link has to be sent. For example, `cont_00000000000001`. + +`fund_account_id` _only if contact provides their account details_ +: `string` The unique identifier of the contact's fund account to which the payout will be made. For example, `fa_00000000000001`. + + Fund Account id is returned only when the Payout Link moves to the [`processing` state](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md). + +`payout_id` _only if the contact receives the amount in their account_ +: `string` The unique identifier for the payout made to the contact. For example, `pout_00000000000001`. + + This value is returned only when the Payout Link moves to the [`processed` state](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md). + +`purpose` +: `string` The purpose of the payout. For example, `refund`, `cashback` or `payout`. + +`status` +: `string` The Payout Link status. Possible values: + - `pending` + - `issued` + - `processing` + - `processed` + - `cancelled` + - `rejected` + + + Refer to the [Payout Link Life Cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md) for more details. + +`amount` +: `integer` The amount, in paise, to be transferred from the business account to the contact's fund account. + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The currency in which the payout is being made. Here, it is `INR`. + +`description` +: `string` A user-entered description for the Payout Link. For example, `Payout link for Gaurav Kumar`. + +`attempt_count` +: `integer` The number of attempts to complete the payout. + +`receipt` +: `string` A user-entered receipt number for the payout. For example, `Receipt No. 1`. + +`notes` +: `object` User-entered notes for internal reference. This is a key-value pair. For example, `"note_key": "Beam me up Scotty”`. + +`short_url` +: `string` A short link for the Payout Link that was created. This is the link that is shared with the contact. + +`send_sms` +: `boolean` Possible values: + - `true`: SMS sent to the provided contact number. + - `false`: SMS could not be sent to the provided contact number. This could be because the contact number provided was wrong. + +`send_email` +: `boolean` Possible values: + - `true`: Email sent to the provided email address. + - `false`: Email could not be sent to the provided email address. This could be because the email address provided was wrong. + +`created_at` +: `integer` Timestamp, in Unix, when the Payout Link was created. + +`cancelled_at` +: `integer` Timestamp, in Unix, when the Payout Link was cancelled by you. This value is returned only when the Payout Link moves to the `cancelled` state. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payout Link was to expire. This is set at the time of creation of the Payout Link and is set at least 15 minutes ahead of the current time. + + This value is returned only if you have enabled the expiry feature for Payout Links. Know more about how to [set expiry](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md) to Payout Links. + +`expired_at` +: `integer` Timestamp, in Unix, when the Payout Link expired. This is set at the time of creation of the Payout Link. diff --git a/llm-content/api/x/payout-links/entity.md b/llm-content/api/x/payout-links/entity.md new file mode 100644 index 00000000..00eca336 --- /dev/null +++ b/llm-content/api/x/payout-links/entity.md @@ -0,0 +1,143 @@ +--- +title: Payout Links Entity +description: Check the entity code for Payout Links APIs. +--- + +# Payout Links Entity + +## Payout Links Entity + + The Payout Links Entity has the following parameters: + + +### Response + +```json: Entity +{ + "id": "poutlk_00000000000001", + "entity": "payout_link", + "contact": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "912345678" + }, + "purpose": "refund", + "status": "issued", + "amount": 1000, + "currency": "INR", + "description": "Payout link for Gaurav Kumar", + "short_url": "https://rzp.io/i/3x1Tw6", + "created_at": 1545383037, + "contact_id": "cont_00000000000001", + "send_sms": true, + "send_email": true, + "fund_account_id": null, + "cancelled_at": null, + "attempt_count": 0, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "expire_by": 1545384058, + "expired_at": 1545384658 +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the Payout Link that is created. For example, `poutlk_00000000000001`. + +`entity` +: `string` The entity being created. Here it will be `payout_link`. + +`contact` +: `object` Details of the contact to whom the Payout Link is to be sent. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `type` + : `string` Classification of the contact being created. For example, `employee`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`contact_id` +: `string` The unique identifier of the contact to whom the Payout Link has to be sent. For example, `cont_00000000000001`. + +`fund_account_id` _only if contact provides their account details_ +: `string` The unique identifier of the contact's fund account to which the payout will be made. For example, `fa_00000000000001`. + + Fund Account id is returned only when the Payout Link moves to the [`processing` state](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md). + +`payout_id` _only if the contact receives the amount in their account_ +: `string` The unique identifier for the payout made to the contact. For example, `pout_00000000000001`. + + This value is returned only when the Payout Link moves to the [`processed` state](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md). + +`purpose` +: `string` The purpose of the payout. For example, `refund`, `cashback` or `payout`. + +`status` +: `string` The Payout Link status. Possible values: + - `pending` + - `issued` + - `processing` + - `processed` + - `cancelled` + - `rejected` + + + Refer to the [Payout Link Life Cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md) for more details. + +`amount` +: `integer` The amount, in paise, to be transferred from the business account to the contact's fund account. + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The currency in which the payout is being made. Here, it is `INR`. + +`description` +: `string` A user-entered description for the Payout Link. For example, `Payout link for Gaurav Kumar`. + +`attempt_count` +: `integer` The number of attempts to complete the payout. + +`receipt` +: `string` A user-entered receipt number for the payout. For example, `Receipt No. 1`. + +`notes` +: `object` User-entered notes for internal reference. This is a key-value pair. For example, `"note_key": "Beam me up Scotty”`. + +`short_url` +: `string` A short link for the Payout Link that was created. This is the link that is shared with the contact. + +`send_sms` +: `boolean` Possible values: + - `true`: SMS sent to the provided contact number. + - `false`: SMS could not be sent to the provided contact number. This could be because the contact number provided was wrong. + +`send_email` +: `boolean` Possible values: + - `true`: Email sent to the provided email address. + - `false`: Email could not be sent to the provided email address. This could be because the email address provided was wrong. + +`created_at` +: `integer` Timestamp, in Unix, when the Payout Link was created. + +`cancelled_at` +: `integer` Timestamp, in Unix, when the Payout Link was cancelled by you. This value is returned only when the Payout Link moves to the `cancelled` state. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payout Link was to expire. This is set at the time of creation of the Payout Link and is set at least 15 minutes ahead of the current time. + + This value is returned only if you have enabled the expiry feature for Payout Links. Know more about how to [set expiry](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md) to Payout Links. + +`expired_at` +: `integer` Timestamp, in Unix, when the Payout Link expired. This is set at the time of creation of the Payout Link. diff --git a/llm-content/api/x/payout-links/fetch-all.md b/llm-content/api/x/payout-links/fetch-all.md new file mode 100644 index 00000000..8f2e7498 --- /dev/null +++ b/llm-content/api/x/payout-links/fetch-all.md @@ -0,0 +1,236 @@ +--- +title: Fetch All Payout Links +description: Fetch all the Payout Links using the API. +--- + +# Fetch All Payout Links + +## Fetch All Payout Links + +Use this endpoint to retrieve all the Payout Links created. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X GET https://api.razorpay.com/v1/payout-links +``` + +### Response + +```json: Success +{ + "entity":"collection", + "count":2, + "items":[ + { + "id":"poutlk_00000000000001", + "entity":"payout_link", + "contact_id":"cont_00000000000001", + "contact":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"912345678" + }, + "fund_account_id":"fa_00000000000001", + "purpose":"refund", + "status":"processed", + "amount":1000, + "currency":"INR", + "description":"Payout link for Gaurav Kumar", + "attempt_count": 1, + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "short_url":"https://rzp.io/i/3b1Tw6", + "send_sms": true, + "send_email": true, + "cancelled_at":null, + "created_at":1545383037, + "expire_by": 1545384058, + "expired_at": 1545384658 + }, + { + "id":"poutlk_00000000000002", + "entity":"payout_link", + "contact_id":"cont_00000000000001", + "contact":{ + "name":"Gaurav Kumar", + "contact":"912345678", + "email":"gaurav.kumar@example.com" + }, + "fund_account_id":null, + "purpose":"refund", + "status":"issued", + "amount":1000, + "currency":"INR", + "description":"Payout link for Gaurav Kumar", + "attempt_count": 0, + "receipt":"Receipt No. 2", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "short_url":"https://rzp.io/i/3b1Tw6", + "send_sms": true, + "send_email": true, + "cancelled_at":null, + "created_at":1545383037, + "expire_by": 1545384058, + "expired_at": 1545384658 + } + ] +} +``` + +### Parameters + +Pass any of the following parameters as required to retrieve Payout Links as necessary. + +`from` _optional_ +: `integer` Timestamp, in Unix, from when Payout Links are to be retrieved. + +`to` _optional_ +: `integer` Timestamp, in Unix, till when Payout Links are to be retrieved. + +`count` _optional_ +: `integer` The number of Payout Links to be retrieved. The default value is 10. The maximum value is 100. This can be used for pagination in combination with `skip`. + +`skip` _optional_ +: `integer` The numbers of Payout Links to be skipped. The default value is 0. This can be used for pagination in combination with `count`. + +`id` _optional_ +: `string` The unique identifier for the Payout Link. For example, `poutlk_00000000000001`. + +`contact_id` _optional_ +: `string` The unique identifier of the contact to whom the Payout Link was sent to. For example, `cont_00000000000001`. + +`contact_phone_number` _optional_ +: `string` The contact's phone number. For example, `9000090000`. + +`contact_email` _optional_ +: `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`fund_account_id` _optional_ +: `string` The unique identifier of the contact's fund account to which the payout was made. For example, `fa_00000000000001`. + +`purpose` _optional_ +: `string` The purpose of the payout that was created. For example, `refund`. + +`status` _optional_ +: `string` The Payout Link status. Possible values: + - `issued` + - `processing` + - `processed` + - `cancelled` + +`receipt` _optional_ +: `string` A user-entered receipt number for the payout. For example, `Receipt No. 1`. + +`short_url` _optional_ +: `string` A short link for the Payout Link that was created. This was the link shared with the contact. + +### Parameters + +`count` +: `integer` The number of Payout Links you requested to retrieve. + +`entity` +: `string` The entity created. Here it is `collection`. + +`id` +: `string` The unique identifier of the Payout Link created. For example, `poutlk_00000000000001`. + +`entity` +: `string` The entity created. Here it is `payout_link`. + +`contact` +: `object` Details of the contact to whom the Payout Link was sent to. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `type` + : `string` Classification of the contact created. For example, `employee`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`purpose` +: `string` The purpose of the payout. For example, `refund`, `cashback` or `payout`. + +`status` +: `string` The Payout Link status. Possible values: + - `pending` + - `issued` + - `processing` + - `processed` + - `cancelled` + - `rejected` + +Refer to the [Payout Link Life Cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md) for more details. + +`amount` +: `integer` The amount, in paise, transferred from the business account to the contact's fund account. + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The currency in which the payout was made. Here, it is `INR`. + +`description` +: `string` A user-entered description for the Payout Link. For example, `Payout link for Gaurav Kumar`. + +`short_url` +: `string` A short link for the Payout Link that was created. This is the link that was shared with the contact. + +`created_at` +: `integer` Timestamp, in Unix, when the Payout Link was created. + +`contact_id` +: `string` The unique identifier of the contact to whom the Payout Link was sent. For example, `cont_00000000000001`. + +`send_sms` +: `boolean` Possible values: + - `true`: SMS sent to the provided contact number. + - `false`: SMS could not be sent to the provided contact number. This could be because the contact number provided was wrong. + +`send_email` +: `boolean` Possible values: + - `true`: Email sent to the provided email address. + - `false`: Email could not be sent to the provided email address. This could be because the email address provided was wrong. + +`fund_account_id` +: `string` The unique identifier of the contact's fund account to which the payout was made. For example, `fa_00000000000001`. + + Fund Account id is returned only when the Payout Link moves to the [`processing` state](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md) after the contact provides their account details. + +`payout_id` +: `string` The unique identifier for the payout made to the contact. For example, `pout_00000000000001`. + + This value is returned only when the Payout Link moves to the [`processed` state](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md) after the contact receives the amount in their account. + +`cancelled_at` +: `integer` Timestamp, in Unix, if the Payout Link was cancelled by you. This value is returned only when the Payout Link moves to the `cancelled` state. + +`attempt_count` +: `integer` The number of attempts to complete the payout. For example, `0`. + +`receipt` +: `string` A user-entered receipt number for the payout. For example, `Receipt No. 1`. + +`notes` +: `object` User-entered notes for internal reference. This is a key-value pair. For example, `"note_key": "Beam me up Scotty”`. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payout Link was to expire. This is set at the time of creation of the Payout Link and is set at least 15 minutes ahead of the current time. + + This value is returned only if you have enabled the expiry feature for Payout Links. Know how to [set expiry](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md) to Payout Links. + +`expired_at` +: `integer` Timestamp, in Unix, when the Payout Link expired. This is set at the time of creation of the Payout Link. diff --git a/llm-content/api/x/payout-links/fetch-with-id.md b/llm-content/api/x/payout-links/fetch-with-id.md new file mode 100644 index 00000000..841ff0e8 --- /dev/null +++ b/llm-content/api/x/payout-links/fetch-with-id.md @@ -0,0 +1,153 @@ +--- +title: Fetch a Payout Link With ID +description: Fetch a Payout Links with its ID using the API. +--- + +# Fetch a Payout Link With ID + +## Fetch a Payout Link With ID + +Use this endpoint to retrieve the payout details of a Payout Link using its id. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X GET https://api.razorpay.com/v1/payout-links/poutlk_00000000000001?expand[l=payouts +``` + +### Response + +```json: Success +{ + "id": "poutlk_00000000000001", + "entity": "payout_link", + "contact_id": "cont_00000000000001", + "contact": { + "name": "Gaurav Kumar", + "contact": "912345678", + "email": "gaurav.kumar@example.com" + }, + "fund_account_id": "fa_00000000000001", + "purpose": "refund", + "status": "processed", + "amount": 1000, + "currency": "INR", + "description": "Payout link for Gaurav Kumar", + "attempt_count": 1, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "short_url": "https://rzp.io/i/3b1Tw6", + "send_sms": true, + "send_email": true, + "cancelled_at": null, + "created_at": 1545383037, + "expire_by": 1545384058, + "expired_at": 1545384658 +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier for the Payout Link. For example, `poutlk_00000000000001`. + +### Parameters + +`id` +: `string` The unique identifier of the Payout Link created. For example, `poutlk_00000000000001`. + +`entity` +: `string` The entity created. Here it will be `payout_link`. + +`contact` +: `object` Details of the contact to whom the Payout Link is to be sent. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `type` + : `string` Classification of the contact created. For example, `employee`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`purpose` +: `string` The purpose of the payout. For example, `refund`, `cashback` or `payout`. + +`status` +: `string` The Payout Link status. Possible values: + - `pending` + - `issued` + - `processing` + - `processed` + - `cancelled` + - `rejected` + +Refer to the [Payout Link Life Cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md) for more details. + +`amount` +: `integer` The amount, in paise, that was transferred from the business account to the contact's fund account. + + The value passed here does not include fees and tax. Fees and tax, if any, would have been deducted from your account balance. + +`currency` +: `string` The currency in which the payout was made. Here, it is `INR`. + +`description` +: `string` A user-entered description for the Payout Link. For example, `Payout link for Gaurav Kumar`. + +`short_url` +: `string` A short link for the Payout Link that was created. This is the link that is shared with the contact. + +`created_at` +: `integer` Timestamp, in Unix, when the Payout Link was created. + +`contact_id` +: `string` The unique identifier of the contact to whom the Payout Link was sent to. For example, `cont_00000000000001`. + +`send_sms` +: `boolean` Possible values: + - `true`: SMS sent to the provided contact number. + - `false`: SMS could not be sent to the provided contact number. This could be because the contact number provided was wrong. + +`send_email` +: `boolean` Possible values: + - `true`: Email sent to the provided email address. + - `false`: Email could not be sent to the provided email address. This could be because the email address provided was wrong. + +`fund_account_id` +: `string` The unique identifier of the contact's fund account to which the payout will be made. For example, `fa_00000000000001`. + + Fund Account id is returned only when the Payout Link moves to the [`processing` state](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md) after the contact provides their account details. + +`payout_id` +: `string` The unique identifier for the payout made to the contact. For example, `pout_00000000000001`. + + This value is returned only when the Payout Link moves to the [`processed` state](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md) after the contact receives the amount in their account. + +`cancelled_at` +: `integer` Timestamp, in Unix, if the Payout Link was cancelled by you. This value is returned only when the Payout Link moves to the `cancelled` state. + +`attempt_count` +: `integer` The number of attempts to complete the payout. For example, `0`. + +`receipt` +: `string` A user-entered receipt number for the payout. For example, `Receipt No. 1`. + +`notes` +: `object` User-entered notes for internal reference. This is a key-value pair. For example, `"note_key": "Beam me up Scotty”`. + +`expire_by` +: `integer` Timestamp, in Unix, when the Payout Link was to expire. This is set at the time of creation of the Payout Link and is set at least 15 minutes ahead of the current time. + + This value is returned only if you have enabled the expiry feature for Payout Links. Know how to [set expiry](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md) to Payout Links. + +`expired_at` +: `integer` Timestamp, in Unix, when the Payout Link expired. This is set at the time of creation of the Payout Link. diff --git a/llm-content/api/x/payout-wallet.md b/llm-content/api/x/payout-wallet.md new file mode 100644 index 00000000..44bf2c1b --- /dev/null +++ b/llm-content/api/x/payout-wallet.md @@ -0,0 +1,37 @@ +--- +title: Payout Wallet - Amazon +description: Find APIs to make payouts via an Amazon Pay Gift Card. +--- + +# Payout Wallet - Amazon + +With Payout Wallet APIs, make payouts to your Contact's Amazon Pay Gift Card wallet from [RazorpayX Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/razorpayx-lite.md). You can process payouts up to ₹10,000 per transaction multiple times in a day. Know more about [Amazon Gift Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-wallet/amazon.md). + +Creating the Contact and Fund account before making a payout helps you improve payout processing time. You can continue to use the Contact and Fund account details (instead of Ids) in the composite API to make payouts. This does not create duplicate Contacts or Fund accounts in your system. + +Idempotency allows you to safely retry or send the same request multiple times without the fear of performing the same action more than once. Know more about [Payout Idempotency](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency.md). + +Fork the Razorpay Postman Public Workspace and try the Payout Wallet API using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-1706cd68-1bcc-4879-ba60-90b4289449bd) + +### Related Guides + +[About Amazon Payout Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-wallet/amazon.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) +[Amazon Brand Guidelines](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-wallet/amazon/branding-guidelines.md) + +### Endpoints + +- **post** `/v1/contacts` - Create a Contact: + Creates contact for Amazon Pay Gift Card. + +- **post** `/v1/fund-accounts/` - Create a Fund Account of type `wallet`: + Creates a `wallet` fund account for your Contact to receive Amazon Pay Gift Card. + +- **post** `/v1/payouts` - Create a Payout: + Creates a normal payout to your Contact's Amazon Pay Gift Card. + +- **post** `/v1/payouts` - Make Payouts to Amazon Pay Wallet Using Composite API: + Create a Contact, Fund Account and make the payout to your Contact's Amazon Pay Gift Card in a single API call. diff --git a/llm-content/api/x/payout-wallet/create/contact.md b/llm-content/api/x/payout-wallet/create/contact.md new file mode 100644 index 00000000..45b93700 --- /dev/null +++ b/llm-content/api/x/payout-wallet/create/contact.md @@ -0,0 +1,136 @@ +--- +title: Create a Contact +description: Create a Contact via API. +--- + +# Create a Contact + +## Create a Contact + +Use this endpoint to create a Contact using the Contact details of the Amazon Pay wallet holder. + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/contacts \ +-H "Content-Type: application/json" \ +-d '{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9000090000", + "type":"employee", + "reference_id":"Acme Contact ID 12345", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' +``` + +### Response + +```json: Success +{ + "id": "cont_00000000000001", + "entity": "contact", + "name": "Gaurav Kumar", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1545320320 +} +``` + + + +### Parameters + +`name`_mandatory_ +: `string` The contact's name. This field is case-sensitive. A minimum of 3 characters and a maximum of 50 characters are allowed. Name cannot end with a special character, except `.`. Supported characters: `a-z`, `A-Z`, `0-9`, `space`, `’` , `-` , `_` , `/` , `(` , `)` and , `.`. For example, `Gaurav Kumar`. + +`email`_optional_ +: `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`contact`_optional_ +: `string` The contact's phone number. For example, `9000090000`. + +`type`_optional_ +: `string` Maximum 40 characters. Classification for the contact being created. For example, `employee`. The following classifications are available by default: + - `vendor` + - `customer` + - `employee` + - `self` + + + Additional classifications can be created via the [Dashboard](https://x.razorpay.com/) and then used in APIs. It is not possible to create new classifications via API. + +`reference_id`_optional_ +: `string` Maximum 40 characters. A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + +`entity` +: `string` The entity being created. Here, it is `contact`. + +`name` +: `string` The contact's name. For example, `Gaurav Kumar`. + +`contact` +: `string` The contact's phone number. For example, `9000090000`. + +`email` +: `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`type` +: `string` A classification for the contact being created. For example, `employee`. + +`reference_id` +: `string` A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`active` +: `boolean` Possible values: + - `true` (default) : active + - `false` : inactive + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + +### Errors + +The `name` field is required. +* code: 4xx +* description: The `name` field is missing in the request body. +* solution: Enter the details in the recommended format as per the request body. + +The `name` field is invalid. +* code: 4xx +* description: There are special characters used in the `name` field. +* solution: Enter details as per the format recommended for Create a Contact request for `name` field. + +Invalid type: `contact_typeA` +* code: 4xx +* description: - There are special characters in the `type` field. +- Casing does not match as per the `type`. `type` is case-sensitive. +- Contact type sent in the request does not match the types present in the Dashboard. + +* solution: Enter the correct contact type in the request body. You cannot create new contact types via API. You must create them via the [RazorpayX Dashboard](http://x.razorpay.com/auth). diff --git a/llm-content/api/x/payout-wallet/create/fund-account.md b/llm-content/api/x/payout-wallet/create/fund-account.md new file mode 100644 index 00000000..feafbfd8 --- /dev/null +++ b/llm-content/api/x/payout-wallet/create/fund-account.md @@ -0,0 +1,114 @@ +--- +title: Create a Fund Account of Type Wallet +description: Create a Fund Account of type the wallet via API. +--- + +# Create a Fund Account of Type Wallet + +## Create a Fund Account of Type Wallet + +Use this endpoint to create a Fund Account of the type `wallet`. A new Fund Account is created if any combination of the following details is unique: `contact_id`, `wallet.phone.number`, `wallet.phone.country_code`, and `wallet.email`. + + - If **all** the above details match the details of an existing Fund Account, the API returns details of the existing Fund Account. + - You cannot edit the details of a Fund Account. + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/fund_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "contact_id": "cont_00000000000001", + "account_type": "wallet", + "wallet": { + "provider": "amazonpay", + "phone": "+919876543210", + "email": "gaurav.kumar@example.com", + "name": "Gaurav Kumar" + } +}' +``` + +### Response + +```json: Success +{ + "id": "fa_00000000000001", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "account_type": "wallet", + "wallet": { + "provider": "amazonpay", + "phone": "+919876543210", + "email": "gaurav.kumar@example.com", + "name": "Gaurav Kumar" + }, + "active": true, + "batch_id": null, + "created_at": 1543650891 +} +``` + +### Parameters + +`contact_id` _mandatory_ +: `string` The unique identifier linked to a contact. For example, `cont_00000000000001`. + +`account_type` _mandatory_ +: `string` The account type you want to link to the contact ID. Here, it is `wallet`. + +`wallet` _mandatory_ +: `object` The contact's wallet details. + + `provider` _mandatory_ + : `string` The wallet provider. Here, it is `amazonpay`. + + `phone` _mandatory_ + : `string` Beneficiary phone details. 10 digit beneficiary phone number with the country code. For example, `+919876543210 `. + + `email` _optional_ + : `string` Beneficiary email address. For example, `gaurav.kumar@example.com`. + + `name ` _optional_ + : `string` Wallet holder's name. Name must be between 4 - 120 characters. This field is case-sensitive. Name cannot end with a special character, except `.`. Supported characters: `a-z`, `A-Z`, `0-9`, `space`, `’` , `-` , `_` , `/` , `(` , `)` and , `.`. For example, `Gaurav Kumar`. + +### Parameters + +`id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`entity` +: `string` Here it will be `fund_account`. + +`contact_id` +: `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + +`account_type` +: `string` The fund account type created. Here it is `wallet`. + +`wallet` +: `object` The contact's wallet details. + + `provider` + : `string` The wallet provider. Here, it is `amazonpay`. + + `phone` + : `string` 10 digit beneficiary phone number with the country code. For example, `+919876543210 `. + + `email` + : `string` Beneficiary email address. For example, `gaurav.kumar@example.com`. + + `name ` + : `string` Wallet holder's name. For example, `Gaurav Kumar`. + +`active` +: `boolean` Possible values: + - `true`: active + - `false`: inactive + +`batch_id` +: `string` This parameter is populated if the fund account was created as part of a bulk upload. For example, `batch_00000000000001`. + +`created_at` +: `integer` Timestamp, in Unix, when the fund account was created. For example, `1545320320`. diff --git a/llm-content/api/x/payout-wallet/create/payout-composite.md b/llm-content/api/x/payout-wallet/create/payout-composite.md new file mode 100644 index 00000000..bf5bbb79 --- /dev/null +++ b/llm-content/api/x/payout-wallet/create/payout-composite.md @@ -0,0 +1,398 @@ +--- +title: Make Payouts to Amazon Pay Wallet Using Composite API +description: Make Payout to wallet via Composite API. +--- + +# Make Payouts to Amazon Pay Wallet Using Composite API + +## Make Payouts to Amazon Pay Wallet Using Composite API + +Use this endpoint to create a payout to a Fund Account of type wallet. Know more about [RazorpayX Composite API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-composite.md). + +Composite API gives you the flexibility to either create a new Contact and Fund Account or use the existing Contact and Fund Account details (`contact_id` and `fund_account_id`) to make a payout. + +Ensure you [allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) and pass the [idempotency key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) to make a successful payout. + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payouts \ +-H "Content-Type: application/json" \ +-H "X-Payout-Idempotency: 53cda91c-8f81-4e77-bbb9-7388f4ac6bf4" \ +-d '{ + "account_number": "7878780080316316", + "amount": 1000000, + "currency": "INR", + "mode": "amazonpay", + "purpose": "refund", + "fund_account": { + "account_type": "wallet", + "wallet": { + "provider": "amazonpay", + "phone": "+919876543210", + "email": " gaurav.kumar@example.com", + "name": "Gaurav Kumar" + }, + "contact": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + }, + "queue_if_low_balance": true, + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + } +}' +``` + +### Response + +```json: Success +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "contact": { + "id": "cont_00000000000001", + "entity": "contact", + "name": "Gaurav Kumar", + "contact": "9876543210", + "email": "gaurav.kumar@example.com", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1580817353 + }, + "account_type": "wallet", + "wallet": { + "provider": "amazonpay", + "phone": "+919876543210", + "email": " gaurav.kumar@example.com", + "name": "Gaurav Kumar" + }, + "batch_id": null, + "active": true, + "created_at": 1581080272 + }, + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "fees": 590, + "tax": 90, + "status": "processed", + "purpose": "payout", + "utr": "GCID1234567", + "mode": "amazonpay", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "status_details": null, + "created_at": 1581499319 +} +``` + +### Parameters + +`account_number`_mandatory_ +: `string` Your customer identifier. +Account details can be found on the RazorpayX Dashboard. For example, `7878780080316316`. + +> **WARN** +> +> +> **Watch Out!** +> +> - This is **not** your contact's bank account number. Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - This value is different for Test Mode and Live Mode. +> + +`amount`_mandatory_ +: `integer` The payout amount, in paise. For example, pass `1000000` to transfer an amount of ₹10,000. Minimum value is `100` (₹1). Maximum value `1000000` (₹10,000). + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency`_mandatory_ +: `string` The payout currency. Here, it is `INR`. + +`mode`_mandatory_ +: `string` The mode to be used to create the payout. Here, it has to be `amazonpay`. + + The payout modes are case-sensitive. When creating payouts using APIs, ensure payout modes are entered in upper case. + +`purpose`_mandatory_ +: `string` The purpose of the payout. Classifications available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`fund_account`_mandatory_ +: `object` Details of the contact and fund account to which the payout should be made. + + `account_type`_mandatory_ + : `string` The type of account to be linked to the contact id. Here, the value has to be `wallet`. + + `wallet`_mandatory_ + : `object` The contact's wallet details. + + `provider` _mandatory_ + : `string` The wallet provider. Here, it is `amazonpay`. + + `phone` _mandatory_ + : `string` 10 digit beneficiary phone number with the country code. For example, `+919876543210`. + + `email` _optional_ + : `string` Beneficiary email address. For example, `gaurav.kumar@example.com`. + + `name ` _optional_ + : `string` Wallet holder's name. Between 4 and 120 characters. This field is case-sensitive. Supported characters: `a-z`, `A-Z`, `0-9`, `space`, `’` , `-` , `_` , `/` , `(` , `)` and , `.`. For example, `Gaurav Kumar`. + + `contact`_mandatory_ + : `object` Details of the contact to whom the payout should be made. + + `name`_mandatory_ + : `string` Contact's name. Minimum 3 characters. Maximum 50 characters. This field is case-sensitive. Supported characters: `a-z`, `A-Z`, `0-9`, `space`, `’` , `-` , `_` , `/` , `(` , `)` and , `.`. For example, `Gaurav Kumar`. + + `email`_optional_ + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `contact`_optional_ + : `string` The contact's phone number. For example, `9000090000`. + + `type`_optional_ + : `string` Classification for the contact. For example, `employee`. Classifications are available by default: + - `vendor` + - `customer` + - `employee` + - `self` + + + + Additional classifications can be created via the [Dashboard](https://x.razorpay.com/) and then used in APIs. It is not possible to create new classifications via the API. + + `reference_id`_optional_ + : `string` A reference you enter for the contact. Maximum length is 40 characters. For example, `Acme Contact ID 12345`. + + `notes`_optional_ + : `object` Notes you can enter for the contact for future reference. This is a key-value pair. For example, `"note_key": "Beam me up Scotty"`. + +`queue_if_low_balance`_optional_ +: `boolean` Possible values: + - `true`: The payout is queued when your business account does not have sufficient balance to process the payout. + - `false` (default): The payout is never queued. The payout fails if your business account does not have sufficient balance to process the payout. + +`reference_id`_optional_ +: `string` Maximum length is 40 characters. A reference you enter for the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration`_optional_ +: `string` Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and `space`. This custom note also appears on the bank statement. If no value is passed for this parameter, it defaults to the Merchant Billing Label. + + Enter the important text in the first 9 characters as banks truncate the rest as per their standards. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier of the order. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`fund_account` +: `object` Contact and fund account details to which the payout was made. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it will be `fund_account`. + + `contact_id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `contact` + : `object` Details of the contact to whom the payout is being made. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `type` + : `string` Classification for the contact being created. For example, `employee`. Classifications are available by default: + - `vendor` + - `customer` + - `employee` + - `self` + + + + Additional Classifications can be created via the [Dashboard](https://x.razorpay.com/) and then used in APIs. It is not possible to create new Classifications via API. + + `reference_id` + : `string` A reference you entered for the contact. For example, `Acme Contact ID 12345`. + + `batch_id` + : `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true`: active + - `false`: inactive + + `notes` + : `object` User-entered notes for internal reference. This is a key-value pair. For example, `"note_key": "Beam me up Scotty"`. + + `created_at` + : `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + + `account_type` + : `string` The type of fund account being created. Here, it will be `wallet`. + + `wallet` + : `object` The contact's wallet details. + + `provider` + : `string` The wallet provider. Here, it is `amazonpay`. + + `phone` + : `string` 10 digit beneficiary phone number with the country code. For example, `+919876543210`. + + `email` + : `string` Beneficiary email address. For example, `gaurav.kumar@example.com`. + + `name ` + : `string` Wallet holder's name. Between 4 and 120 characters. This field is case-sensitive. Supported characters: `a-z`, `A-Z`, `0-9`, `space`, `’` , `-` , `_` , `/` , `(` , `)` and , `.`. For example, `Gaurav Kumar`. + + `active` + : `boolean` Possible values: + - `true`: active + - `false`: inactive + + `batch_id` + : `string` This value is returned if the fund account was created as part of a bulk upload. For example, `batch_00000000000001`. + + `created_at` + : `integer` Timestamp, in Unix, when the fund account was created. For example, `1545320320`. + +`amount` +: `integer` The payout amount, in paise. For example, pass `1000000` to transfer an amount of ₹10,000. Minimum value `100`. + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout's currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + + Refer to [Payout Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md). + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + + Additional purposes for payouts can be created via the [RazorpayX Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`utr` +: `string` The unique transaction number linked to a payout. For example, `GCID1234567`. + +`mode` +: `string` The mode used to make the payout. Available modes is `amazonpay`. The payout modes are case-sensitive. + +`reference_id` +: `string` A user-generated reference given to the payout. Maximum length is 40 characters. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` +: `string` Custom note that also appears on the bank statement. Maximum length 30 characters. Allowed characters: a-z, A-Z, 0-9 and space. + + You cannot enter a custom narration when creating a payout via Amazon Pay. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode`. + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. For example, `1545320320`. diff --git a/llm-content/api/x/payout-wallet/create/payout.md b/llm-content/api/x/payout-wallet/create/payout.md new file mode 100644 index 00000000..2129dc87 --- /dev/null +++ b/llm-content/api/x/payout-wallet/create/payout.md @@ -0,0 +1,202 @@ +--- +title: Create a Payout to Amazon Pay Wallet +description: Create a Payout to wallet via API. +--- + +# Create a Payout to Amazon Pay Wallet + +## Create a Payout to Amazon Pay Wallet + +Use this endpoint to create a payout to a wallet. You cannot enter a custom narration when creating a payout via Amazon Pay. Know more about [RazorpayX Payout API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts.md). + +Ensure you [allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) and pass the [idempotency key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) to make a successful payout. + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payouts \ +-H "Content-Type: application/json" \ +-H "X-Payout-Idempotency: 53cda91c-8f81-4e77-bbb9-7388f4ac6bf4" \ +-d '{ + "account_number": "7878780080316316", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "mode": "amazonpay", + "purpose": "refund", + "queue_if_low_balance": true, + "reference_id": "Acme Transaction ID 12345", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' +``` + +### Response + +```json: Success +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fees": 0, + "tax": 0, + "status": "queued", + "utr": "GCID1234567", + "mode": "amazonpay", + "purpose": "refund", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "status_details": null, + "created_at": 1545383037 +} +``` + +### Parameters + +`account_number`_mandatory_ +: `string` Your customer identifier. +Account details can be found on the [RazorpayX Dashboard](https://x.razorpay.com/settings/banking). For example, `7878780080316316`. + +> **WARN** +> +> +> +> **Watch Out!** +> +> - This is **not** your contact's bank account number. Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - This value is different for Test Mode and Live Mode. +> +> + +`fund_account_id`_mandatory_ +: `string` The unique identifier linked to a fund account. For example, `fa_00000000000001`. + +`amount`_mandatory_ +: `integer` The payout amount, in paise. For example, pass `1000000` to transfer an amount of ₹10,000. Minimum value `100` (₹1). Maximum value `1000000` (₹10,000). + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency`_mandatory_ +: `string` The payout currency. Here, it is `INR`. + +`mode`_mandatory_ +: `string` The mode to be used to create the payout. Here it has to be `amazonpay`. + + Payout modes are case-sensitive. Ensure the payout mode is entered in upper case. + +`purpose`_mandatory_ +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`queue_if_low_balance`_optional_ +: `boolean` Possible values: + - `true`: The payout is queued when your business account does not have sufficient balance to process the payout. + - `false` (default): The payout is never queued. The payout fails if your business account does not have sufficient balance to process the payout. + +`reference_id`_optional_ +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier linked to the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`amount` +: `integer` The payout amount, in paise. + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout currency. Here, it is `INR`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This field is populated only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This field is populated only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + + + Refer to [Payout Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md). + +`utr` +: `string` Here, it will be the Amazon Pay gift card ID. For example, `GCID1234567`. + +`mode` +: `string` The mode used to make the payout. Here it will be `amazonpay`. Payout modes are case-sensitive. + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + +`reference_id` +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` +: `string` Defaults to the Merchant Billing Label. You cannot enter a custom narration when creating a payout via Amazon Pay. Contact RazorpayX support for more information. + +`batch_id` +: `string` This parameter is populated if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. diff --git a/llm-content/api/x/payout-wallet/entity.md b/llm-content/api/x/payout-wallet/entity.md new file mode 100644 index 00000000..cd4ed811 --- /dev/null +++ b/llm-content/api/x/payout-wallet/entity.md @@ -0,0 +1,244 @@ +--- +title: Payout Wallet - Amazon Entity +description: Check the entity code for Payout Wallet APIs. +--- + +# Payout Wallet - Amazon Entity + +## Payout Wallet Entity + +The Contact, Fund Account and Payout Entities have the following parameters: + +### Response + +```json: Sample Entity (Composite Payout) +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "contact": { + "id": "cont_00000000000001", + "entity": "contact", + "name": "Gaurav Kumar", + "contact": "9876543210", + "email": "gaurav.kumar@example.com", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1580817353 + }, + "account_type": "wallet", + "wallet": { + "provider": "amazonpay", + "phone": "+919876543210", + "email": " gaurav.kumar@example.com", + "name": "Gaurav Kumar" + }, + "batch_id": null, + "active": true, + "created_at": 1581080272 + }, + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "fees": 590, + "tax": 90, + "status": "processed", + "purpose": "payout", + "utr": "GCID1234567", + "mode": "amazonpay", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "status_details": null, + "created_at": 1581499319 +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the order. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`fund_account` +: `object` Contact and fund account details to which the payout was made. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `entity` + : `string` Here it will be `fund_account`. + + `contact_id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `contact` + : `object` Details of the contact to whom the payout is being made. + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `type` + : `string` Classification for the contact being created. For example, `employee`. Classifications are available by default: + - `vendor` + - `customer` + - `employee` + - `self` + + + + Additional Classifications can be created via the [Dashboard](https://x.razorpay.com/) and then used in APIs. It is not possible to create new Classifications via API. + + `reference_id` + : `string` A reference you entered for the contact. For example, `Acme Contact ID 12345`. + + `batch_id` + : `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true`: active + - `false`: inactive + + `notes` + : `object` User-entered notes for internal reference. This is a key-value pair. For example, `"note_key": "Beam me up Scotty"`. + + `created_at` + : `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + + `account_type` + : `string` The type of fund account being created. Here, it will be `wallet`. + + `wallet` + : `object` The contact's wallet details. + + `provider` + : `string` The wallet provider. Here, it is `amazonpay`. + + `phone` + : `string` 10 digit beneficiary phone number with the country code. For example, `+919876543210`. + + `email` + : `string` Beneficiary email address. For example, `gaurav.kumar@example.com`. + + `name ` + : `string` Wallet holder's name. Between 4 and 120 characters. This field is case-sensitive. Supported characters: `a-z`, `A-Z`, `0-9`, `space`, `’` , `-` , `_` , `/` , `(` , `)` and , `.`. For example, `Gaurav Kumar`. + + `active` + : `boolean` Possible values: + - `true`: active + - `false`: inactive + + `batch_id` + : `string` This value is returned if the fund account was created as part of a bulk upload. For example, `batch_00000000000001`. + + `created_at` + : `integer` Timestamp, in Unix, when the fund account was created. For example, `1545320320`. + +`amount` +: `integer` The payout amount, in paise. For example, pass `1000000` to transfer an amount of ₹10,000. Minimum value `100`. + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout's currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + + Refer to [Payout Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md). + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + + Additional purposes for payouts can be created via the [RazorpayX Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`utr` +: `string` The unique transaction number linked to a payout. For example, `GCID1234567`. + +`mode` +: `string` The mode used to make the payout. Available modes is `amazonpay`. The payout modes are case-sensitive. + +`reference_id` +: `string` A user-generated reference given to the payout. Maximum length is 40 characters. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` +: `string` Custom note that also appears on the bank statement. Maximum length 30 characters. Allowed characters: a-z, A-Z, 0-9 and space. + + You cannot enter a custom narration when creating a payout via Amazon Pay. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode`. + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. For example, `1545320320`. diff --git a/llm-content/api/x/payouts-approval.md b/llm-content/api/x/payouts-approval.md new file mode 100644 index 00000000..ee7e7a9e --- /dev/null +++ b/llm-content/api/x/payouts-approval.md @@ -0,0 +1,39 @@ +--- +title: Payouts Approval +description: List of Payouts Approval API endpoints to approve/reject payout requests. +--- + +# Payouts Approval + +In Payouts Approval API, the payout can be reviewed by multiple approvers from your [team](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams.md) on the same level of approval. However, the payout is not processed until the [owner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/create-user-role.md) approves it. + + + Payouts Approval API is not available by default. [Contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) to get this feature activated on your account. To use the Approvals APIs, it is mandatory to be a [Technology Partner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/existing-merchant.md#become-a-razorpay-partner) and [integrate with OAuth](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth.md). Only then you can make payouts. + + + + Fork the Razorpay Postman Public Workspace and try the Payouts Approval APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md). + + + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-117c93d1-1a79-4958-9067-eb97a3459f08) + + + +### Related Guides + + [About Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) + [Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) + [Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) + [Make Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts.md) + + + +### Endpoints + + - **post** `/v1/payouts/:id/approve` - Approve Payouts: + Approves the Payout. + + + - **post** `/v1/payouts/:id/reject` - Reject Payouts: + Rejects the Payout. diff --git a/llm-content/api/x/payouts-approval/approve.md b/llm-content/api/x/payouts-approval/approve.md new file mode 100644 index 00000000..0db9b871 --- /dev/null +++ b/llm-content/api/x/payouts-approval/approve.md @@ -0,0 +1,167 @@ +--- +title: Approve Payouts +description: Approve payouts using APIs. +--- + +# Approve Payouts + +## Approve a Payout + +This endpoint approves the payout. + +If you face errors during the process, refer to our [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x.md#http-errors) documentation for HTTP, 5xx and other errors. + +### Request + +```curl: Request +curl -X POST https://api.razorpay.com/v1/payouts/:id/approve \ +-H "Content-Type: application/json" \ +-H "Authorization: Bearer " \ +-d '{ + "remarks": "Payout approved for loan disbursal", +}' + +``` + +### Response + +```json: Response +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "notes": { + "note_key": "Beam me up Scotty" + }, + "fees": 590, + "tax": 90, + "status": "processing", + "purpose": "payout", + "utr": null, + "mode": "NEFT", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "failure_reason": null, + "created_at": 1630261800, + "fee_type": "", + "status_details": { + "reason": "beneficiary_bank_confirmation_pending", + "description": "Payout is pending confirmation from the beneficiary bank. Payout status will be confirmed by end of day 1st July, 2023", + "source": "beneficiary_ban" + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to the payout. For example, `pout_00000000000001`. + +### Parameters + +`remarks` _mandatory_ +: `string` This field contains the remarks entered by the approver during the payout approval or rejection. + +### Parameters + +`id` +: `string` The unique identifier of the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`amount` +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. Minimum value `100`. +The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout's currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + - `failed` + + Know more about [Payout States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md) and [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `card` + + + The payout modes are case-sensitive. + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`reference_id` +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`debit_account_number` +: `string` The account from which the payout was processed. For example, `002281300012871`. + +`narration` +: `string` Custom note that also appears on the bank statement. Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. + + If no value is passed for this parameter, it defaults to the Merchant Billing Label. Ensure that the most important text forms the first 9 characters as banks may truncate the rest as per their standards. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. Know more about [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Indicates the Unix timestamp when this payout was created. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible values is `free_payout`. diff --git a/llm-content/api/x/payouts-approval/entity.md b/llm-content/api/x/payouts-approval/entity.md new file mode 100644 index 00000000..be1f724f --- /dev/null +++ b/llm-content/api/x/payouts-approval/entity.md @@ -0,0 +1,144 @@ +--- +title: Payouts Approval Entity +description: Check the entity code for Payouts Approval APIs. +--- + +# Payouts Approval Entity + +## Payouts Approval Entity + + The Payouts Approval Entity has the following parameters: + + +### Response + +```json: Entity +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "notes": { + "note_key": "Beam me up Scotty" + }, + "fees": 590, + "tax": 90, + "status": "processing", + "purpose": "payout", + "utr": null, + "mode": "NEFT", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "failure_reason": null, + "created_at": 1630261800, + "fee_type": "", + "status_details": { + "reason": "beneficiary_bank_confirmation_pending", + "description": "Payout is pending confirmation from the beneficiary bank. Payout status will be confirmed by end of day 1st July, 2023", + "source": "beneficiary_ban" + } +} +``` + +### Parameters + + `id` +: `string` The unique identifier of the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`amount` +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. Minimum value `100`. +The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout's currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + - `failed` + + Know more about [Payout States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md) and [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `card` + + + The payout modes are case-sensitive. + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`reference_id` +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`debit_account_number` +: `string` The account from which the payout was processed. For example, `002281300012871`. + +`narration` +: `string` Custom note that also appears on the bank statement. Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. + + If no value is passed for this parameter, it defaults to the Merchant Billing Label. Ensure that the most important text forms the first 9 characters as banks may truncate the rest as per their standards. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. Know more about [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Indicates the Unix timestamp when this payout was created. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible values is `free_payout`. diff --git a/llm-content/api/x/payouts-approval/reject.md b/llm-content/api/x/payouts-approval/reject.md new file mode 100644 index 00000000..ec75d5a5 --- /dev/null +++ b/llm-content/api/x/payouts-approval/reject.md @@ -0,0 +1,166 @@ +--- +title: Reject Payouts +description: Reject a payout using API. +--- + +# Reject Payouts + +## Reject a Payout + +This endpoint rejects the payout. + +If you face errors during the process, refer to our [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x.md#http-errors) documentation for HTTP, 5xx and other errors. + +### Request + +```curl: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/payouts/:id/reject \ +-H "Content-Type: application/json" \ +-d '{ + "remarks": "Payout limit exceeded for loan disbursal", +}' +``` + +### Response + +```json: Response +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "notes": { + "note_key": "Beam me up Scotty" + }, + "fees": 590, + "tax": 90, + "status": "rejected", + "purpose": "payout", + "utr": null, + "mode": "NEFT", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "failure_reason": null, + "created_at": 1630261800, + "fee_type": "", + "status_details": { + "reason": "payout_rejected", + "description": "Workflow for the payout was rejected by the approver (s)", + "source": "business" + } +} +``` + +### Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to the payout. For example, `pout_00000000000001`. + +### Parameters + +`remarks` _mandatory_ +: `string` This field contains the remarks entered by the approver during the payout approval or rejection. + +### Parameters + +`id` +: `string` The unique identifier of the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`amount` +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. Minimum value `100`. +The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout's currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + - `failed` + + Know more about [Payout States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md) and [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `card` + + + The payout modes are case-sensitive. + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`reference_id` +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`debit_account_number` +: `string` The account from which the payout was processed. For example, `002281300012871`. + +`narration` +: `string` Custom note that also appears on the bank statement. Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. + + If no value is passed for this parameter, it defaults to the Merchant Billing Label. Ensure that the most important text forms the first 9 characters as banks may truncate the rest as per their standards. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. Know more about [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Indicates the Unix timestamp when this payout was created. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible values is `free_payout`. diff --git a/llm-content/api/x/payouts-cards.md b/llm-content/api/x/payouts-cards.md new file mode 100644 index 00000000..dc5903b1 --- /dev/null +++ b/llm-content/api/x/payouts-cards.md @@ -0,0 +1,50 @@ +--- +title: API | X - Payouts to Cards +heading: Payouts to Cards +description: Make payouts directly to a credit, debit or prepaid card using APIs. +--- + +# Payouts to Cards + +With Payouts to Cards APIs, you can make payouts directly to a credit card, debit card or prepaid card. Payouts via **Visa Direct** and **MasterCard Send** are temporarily unavailable. Know more about the [supported networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/cards.md#supported-networks-and-banks). + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature and available only to PCI-compliant merchants. To enable this feature, raise a request using the [support form](https://razorpay.com/support/) on the RazorpayX Dashboard. +> + +Adhering to the RBI guidelines, you can either make a payout without saving card details or save a card details with a tokenisation service - [Razorpay TokenHQ](https://razorpay.com/card-tokenisation/) or any external token provider. Payouts to these tokenised cards can be made using the mode `card`. + +[Allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) that you use while making payouts via APIs and pass the [idempotency key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency.md). [Create a Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/create.md) and [Fund Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts.md) before creating payouts. + +Fork the Razorpay Postman Public Workspace and try the Payouts to Cards APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/f960539b-c56c-41e5-810b-63d2a89d447e/folder/12492020-0a7f8d61-ca43-439c-80db-a6fb08877a5f) + +### Related Guides + +[About Payout to Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/cards.md) +[Set up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) +[Webhooks Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) +[Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) + +### Endpoints + + +- **post** `/v1/payouts` - Create a Payout: +Make a payout to a card without saving the card details. + +- **post** `/v1/fund_accounts` - Create Fund Account: +Creates a fund account for a card tokenised by external token providers. + +- **post** `/v1/payouts` - Create a Payout: +Makes a payout to a card tokenised by external token providers. + +- **post** `/v1/fund_accounts` - Create Fund Account: +Creates a fund account for a card tokenised by Razorpay TokenHQ. + +- **post** `/v1/payouts` - Create a Payout: +Makes a payout to a card tokenised by Razorpay TokenHQ. diff --git a/llm-content/api/x/payouts-cards/create/save-card/external-token/fund-account.md b/llm-content/api/x/payouts-cards/create/save-card/external-token/fund-account.md new file mode 100644 index 00000000..89a88d5b --- /dev/null +++ b/llm-content/api/x/payouts-cards/create/save-card/external-token/fund-account.md @@ -0,0 +1,240 @@ +--- +title: Create a Fund Account for Externally Tokenised Card +description: Create a Fund Account for saving an external Tokenised Card using API. +--- + +# Create a Fund Account for Externally Tokenised Card + +## Create a Fund Account for Externally Tokenised Card + +Use this endpoint to create a fund account type `card` by saving the card as an external token. + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/fund_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "contact_id": "cont_00000000000001", + "account_type": "card", + "card": { + "number": "4854980604708430", + "expiry_month": "12", + "expiry_year": "21", + "token_provider": "payu", + "input_type": "service_provider_token" + } +}' +``` + +### Response + +```json: Success +{ + "id": "fa_00000000000001", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "account_type": "card", + "card": { + "last4": "8430", + "network": "Visa", + "type": "credit", + "issuer": "HDFC", + "input_type": "service_provider_token", + }, + "active": true, + "batch_id": null, + "created_at": 1543650891 +} +``` + +### Parameters + +`contact_id` _mandatory_ +: `string` The unique identifier of the contact for which you want to fetch payouts. For example, `cont_00000000000001`. + +`account_type` _mandatory_ +: `string` The type of account linked to the contact id. Here, it will be `card`. + +`card` _mandatory_ +: `object` The details of the card used. + + `number` _mandatory_ + : `string` Same field can accept card numbers or card tokens. Here, the value is card token. + + `expiry_month` _mandatory_ + : `string` The expiry month of the card numbers or card token. Here, the value is of card token. + + `expiry_year` _mandatory_ + : `string` The expiry year of the card numbers or card token. Here, the value is of card token. + + `input_type` _mandatory_ + : `string` Here, the value is `service_provider_token`. + + `token_provider` _mandatory_ + : `string` The name of the aggregator that provided the token. + +### Parameters + +`id` +: `string` The unique identifier linked to the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. For example, `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`fund_account` +: `object` The account to which you want to make the payout. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `account_type` + : `string` The type of account linked to the contact id. Here, it will be `card`. + + `contact_id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `contact` + : `object` + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `type` + : `string` A classification for the contact being created. For example, `employee`. + + `reference_id` + : `string` A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + + `batch_id` + : `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true` (default): active + - `false`: inactive + + `notes` + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + + `card` + : `object` The details of the card used. + + `last4` + : `string` The last 4 digits of the card number. If the input_type = `service_provider_token` then it is the last 4 digits of the card token. + + `network` + : `string` The network operator that has issued the card. For example, `Mastercard`, `Visa`. + + `type` + : `string` The type of card. For example, `credit` or `debit`. + + `issuer` + : `string` The bank that has issued the card. For example, `ICIC`, `HDFC`. + + `input_type` + : `string` Possible values:- `service_provider_token` : When the token number used is provided by an external service. +- `card` : When a card number is provided. +- `razorpay_token` : When the token id used is provided by Razorpay. + + +`amount` +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. Minimum value `100`. + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `UPI` + - `card` + + The payout modes are case-sensitive. + +`reference_id` +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` +: `string` Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. This is a custom note that also appears on the bank statement. If no value is passed for this parameter, it defaults to the Merchant Billing Label. + + Enter the important text in the first 9 characters as banks truncate the rest as per their standards. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. Know more about [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible value is `free_payout`. diff --git a/llm-content/api/x/payouts-cards/create/save-card/external-token/payout.md b/llm-content/api/x/payouts-cards/create/save-card/external-token/payout.md new file mode 100644 index 00000000..9bd50ca9 --- /dev/null +++ b/llm-content/api/x/payouts-cards/create/save-card/external-token/payout.md @@ -0,0 +1,295 @@ +--- +title: Create a Payout to Externally Tokenised Card +description: Create a Payout by saving an external Tokenised Card using API. +--- + +# Create a Payout to Externally Tokenised Card + +## Create a Payout to Externally Tokenised Card + +Use this endpoint to create a payout to fund account type `card` by saving the card as an external token. + +To understand the status of the payouts, refer to [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you [allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) and pass the [idempotency key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) to make a successful payout. +> + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payouts \ +-H "Content-Type: application/json" \ +-H "X-Payout-Idempotency: 53cda91c-8f81-4e77-bbb9-7388f4ac6bf4" \ +-d '{ + "account_number": "7878780080316316", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "mode": "card", + "purpose": "refund", + "queue_if_low_balance": true, + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' +``` + +### Response + +```json: Success +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "fees": 590, + "tax": 90, + "status": "processed", + "utr": null, + "mode": "card", + "purpose": "refund", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "failure_reason": null, + "created_at": 1545383037, + "fee_type": "", + "error": { + "description": null, + "source": null, + "reason": null + } +} +``` + +### Parameters + +`account_number` _mandatory_ +: `string` The account from which you want to make the payout. Account details can be found on the RazorpayX Dashboard. For example, `7878780080316316`. + +> **WARN** +> +> +> **Watch Out!** +> +> - This is **not** your contact's bank account number. Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - This value is different for Test Mode and Live Mode. +> + +`amount` _mandatory_ +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10000, pass `1000000`. Minimum value is `100`. + +`currency` _mandatory_ +: `string` The payout currency. Here, it is `INR`. + +`mode` _mandatory_ +: `string` The mode to be used to create the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `UPI` + - `card` + +`purpose` _mandatory_ +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`fund_account_id` _mandatory_ +: `string` The unique identifier linked to the fund account. + +`reference_id` _optional_ +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` _optional_ +: `string` Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. This is a custom note that also appears on the bank statement. If no value is passed for this parameter, it defaults to the Merchant Billing Label. + + Enter the important text in the first 9 characters as banks truncate the rest as per their standards. + +`queue_if_low_balance` _optional_ +: `boolean` The payout is automatically queued if the account balance is low. + +### Parameters + +`id` +: `string` The unique identifier linked to the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. For example, `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`fund_account` +: `object` The account to which you want to make the payout. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `account_type` + : `string` The type of account linked to the contact id. Here, it will be `card`. + + `contact_id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `contact` + : `object` + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `type` + : `string` A classification for the contact being created. For example, `employee`. + + `reference_id` + : `string` A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + + `batch_id` + : `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true` (default): active + - `false`: inactive + + `notes` + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + + `card` + : `object` The details of the card used. + + `last4` + : `string` The last 4 digits of the card number. If the input_type = `service_provider_token` then it is the last 4 digits of the card token. + + `network` + : `string` The network operator that has issued the card. For example, `Mastercard`, `Visa`. + + `type` + : `string` The type of card. For example, `credit` or `debit`. + + `issuer` + : `string` The bank that has issued the card. For example, `ICIC`, `HDFC`. + + `input_type` + : `string` Possible values:- `service_provider_token` : When the token number used is provided by an external service. +- `card` : When a card number is provided. +- `razorpay_token` : When the token id used is provided by Razorpay. + + +`amount` +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. Minimum value `100`. + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `UPI` + - `card` + + The payout modes are case-sensitive. + +`reference_id` +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` +: `string` Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. This is a custom note that also appears on the bank statement. If no value is passed for this parameter, it defaults to the Merchant Billing Label. + + Enter the important text in the first 9 characters as banks truncate the rest as per their standards. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. Know more about [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible value is `free_payout`. diff --git a/llm-content/api/x/payouts-cards/create/save-card/razorpay-tokenhq/fund-account.md b/llm-content/api/x/payouts-cards/create/save-card/razorpay-tokenhq/fund-account.md new file mode 100644 index 00000000..127c08ea --- /dev/null +++ b/llm-content/api/x/payouts-cards/create/save-card/razorpay-tokenhq/fund-account.md @@ -0,0 +1,232 @@ +--- +title: Create a Fund Account for Card with Razorpay TokenHQ +description: Create a Fund Account for saving a card using Razorpay TokenHQ using API. +--- + +# Create a Fund Account for Card with Razorpay TokenHQ + +## Create a Fund Account for Card with Razorpay TokenHQ + +Use this endpoint to create a fund account type `card` by saving the card with [Razorpay TokenHQ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens.md). + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/fund_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "contact_id": "cont_00000000000001", + "account_type": "card", + "card": { + "token_id": "token_4lsdksD31GaZ09", + "input_type": "razorpay_token", + "token_provider": "razorpay" + } +}' +``` + +### Response + +```json: Success +{ + "id": "fa_00000000000001", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "account_type": "card", + "card": { + "last4": "8430", + "network": "Visa", + "type": "credit", + "issuer": "HDFC", + "input_type": "razorpay_token", + }, + "active": true, + "batch_id": null, + "created_at": 1543650891 +} +``` + +### Parameters + +`contact_id` _mandatory_ +: `string` The unique identifier of the contact for which you want to fetch payouts. For example, `cont_00000000000001`. + +`account_type` _mandatory_ +: `string` The type of account linked to the contact id. Here, it will be `card`. + +`card` _mandatory_ +: `object` The details of the card used. + + `input_type` _mandatory_ + : `string` Here, the value is `razorpay_token`. + + `token_provider` _mandatory_ + : `string` The name of the aggregator that provided the token. + + `token_id` _mandatory_ + : `string` The unique identifier of the token to which the payout has to be made. If it is `razorpay_token` then the `token_id` must be present. + +### Parameters + +`id` +: `string` The unique identifier linked to the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. For example, `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`fund_account` +: `object` The account to which you want to make the payout. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `account_type` + : `string` The type of account linked to the contact id. Here, it will be `card`. + + `contact_id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `contact` + : `object` + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `type` + : `string` A classification for the contact being created. For example, `employee`. + + `reference_id` + : `string` A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + + `batch_id` + : `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true` (default): active + - `false`: inactive + + `notes` + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + + `card` + : `object` The details of the card used. + + `last4` + : `string` The last 4 digits of the card number. If the input_type = `service_provider_token` then it is the last 4 digits of the card token. + + `network` + : `string` The network operator that has issued the card. For example, `Mastercard`, `Visa`. + + `type` + : `string` The type of card. For example, `credit` or `debit`. + + `issuer` + : `string` The bank that has issued the card. For example, `ICIC`, `HDFC`. + + `input_type` + : `string` Possible values:- `service_provider_token` : When the token number used is provided by an external service. +- `card` : When a card number is provided. +- `razorpay_token` : When the token id used is provided by Razorpay. + + +`amount` +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. Minimum value `100`. + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `UPI` + - `card` + + The payout modes are case-sensitive. + +`reference_id` +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` +: `string` Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. This is a custom note that also appears on the bank statement. If no value is passed for this parameter, it defaults to the Merchant Billing Label. + + Enter the important text in the first 9 characters as banks truncate the rest as per their standards. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. Know more about [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible value is `free_payout`. diff --git a/llm-content/api/x/payouts-cards/create/save-card/razorpay-tokenhq/payout.md b/llm-content/api/x/payouts-cards/create/save-card/razorpay-tokenhq/payout.md new file mode 100644 index 00000000..83c14bf9 --- /dev/null +++ b/llm-content/api/x/payouts-cards/create/save-card/razorpay-tokenhq/payout.md @@ -0,0 +1,294 @@ +--- +title: Create a Payout to Card with Razorpay TokenHQ +description: Create a Payout to Card with Razorpay TokenHQ using API. +--- + +# Create a Payout to Card with Razorpay TokenHQ + +## Create a Payout to Card with Razorpay TokenHQ + +Use this endpoint to create a payout to fund account type `card` by saving the card with [Razorpay TokenHQ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens.md). + +To understand the status of the payouts, refer to [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you [allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) and pass the [idempotency key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) to make a successful payout. +> + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payouts \ +-H "Content-Type: application/json" \ +-H "X-Payout-Idempotency: 53cda91c-8f81-4e77-bbb9-7388f4ac6bf4" \ +-d '{ + "account_number": "7878780080316316", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "mode": "card", + "purpose": "refund", + "queue_if_low_balance": true, + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' +``` + +### Response + +```json: Success +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "fees": 590, + "tax": 90, + "status": "processed", + "utr": null, + "mode": "card", + "purpose": "refund", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "failure_reason": null, + "created_at": 1545383037, + "fee_type": "", + "error": { + "description": null, + "source": null, + "reason": null + } +} +``` + +### Parameters + +`account_number` _mandatory_ +: `string` The account from which you want to make the payout. Account details can be found on the RazorpayX Dashboard. For example, `7878780080316316`. + +> **WARN** +> +> +> **Watch Out!** +> +> - This is **not** your contact's bank account number. Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - This value is different for Test Mode and Live Mode. +> + +`amount` _mandatory_ +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10000, pass `1000000`. Minimum value is `100`. + +`currency` _mandatory_ +: `string` The payout currency. Here, it is `INR`. + +`mode` _mandatory_ +: `string` The mode to be used to create the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `UPI` + - `card` + +`purpose` _mandatory_ +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`fund_account_id` _mandatory_ +: `string` The unique identifier linked to the fund account. + +`reference_id` _optional_ +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` _optional_ +: `string` Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. This is a custom note that also appears on the bank statement. If no value is passed for this parameter, it defaults to the Merchant Billing Label. + + Enter the important text in the first 9 characters as banks truncate the rest as per their standards. + +`queue_if_low_balance` _optional_ +: `boolean` The payout is automatically queued if the account balance is low. + +### Parameters + +`id` +: `string` The unique identifier linked to the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. For example, `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`fund_account` +: `object` The account to which you want to make the payout. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `account_type` + : `string` The type of account linked to the contact id. Here, it will be `card`. + + `contact_id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `contact` + : `object` + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `type` + : `string` A classification for the contact being created. For example, `employee`. + + `reference_id` + : `string` A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + + `batch_id` + : `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true` (default): active + - `false`: inactive + + `notes` + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + + `card` + : `object` The details of the card used. + + `last4` + : `string` The last 4 digits of the card number. If the input_type = `service_provider_token` then it is the last 4 digits of the card token. + + `network` + : `string` The network operator that has issued the card. For example, `Mastercard`, `Visa`. + + `type` + : `string` The type of card. For example, `credit` or `debit`. + + `issuer` + : `string` The bank that has issued the card. For example, `ICIC`, `HDFC`. + + `input_type` + : `string` Possible values:- `service_provider_token` : When the token number used is provided by an external service. +- `card` : When a card number is provided. +- `razorpay_token` : When the token id used is provided by Razorpay. + + +`amount` +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. Minimum value `100`. + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `UPI` + - `card` + + The payout modes are case-sensitive. + +`reference_id` +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` +: `string` Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. This is a custom note that also appears on the bank statement. If no value is passed for this parameter, it defaults to the Merchant Billing Label. + + Enter the important text in the first 9 characters as banks truncate the rest as per their standards. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. Know more about [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible value is `free_payout`. diff --git a/llm-content/api/x/payouts-cards/create/without-saving-card.md b/llm-content/api/x/payouts-cards/create/without-saving-card.md new file mode 100644 index 00000000..90136ca7 --- /dev/null +++ b/llm-content/api/x/payouts-cards/create/without-saving-card.md @@ -0,0 +1,394 @@ +--- +title: Create a Payout Without Saving Card +description: Create a Payout without Saving Card using API. +--- + +# Create a Payout Without Saving Card + +## Create a Payout Without Saving Card + +Use this endpoint to create a payout to fund account type `card` without saving the card. + +To understand the status of the payouts, refer to [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you [allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) and pass the [idempotency key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) to make a successful payout. +> + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payouts \ +-H "Content-Type: application/json" \ +-H "X-Payout-Idempotency: 53cda91c-8f81-4e77-bbb9-7388f4ac6bf4" \ +-d '{ + "account_number": "7878780080316316", + "amount": 1000000, + "currency": "INR", + "mode": "NEFT", + "purpose": "refund", + "fund_account": { + "account_type": "card", + "card": { + "number": "765432123456789", + "name": "Gaurav Kumar", + "input_type": "card" + }, + "contact": { + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + }, + "queue_if_low_balance": true, + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + } +}' +``` + +### Response + +```json: Success +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "contact": { + "id": "cont_00000000000001", + "entity": "contact", + "contact": "9876543210", + "email": "gaurav.kumar@example.com", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1580817353 + }, + "account_type": "card", + "card": { + "last4": "6789", + "network": "Visa", + "type": "credit", + "issuer": "HDFC", + "input_type": "card" + }, + "batch_id": null, + "active": true, + "created_at": 1581080272 + }, + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "fees": 590, + "tax": 90, + "status": "processed", + "purpose": "payout", + "utr": null, + "mode": "NEFT", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "failure_reason": null, + "created_at": 1581499319, + "fee_type": "", + "error": { + "description": null, + "source": null, + "reason": null + } +} +``` + +### Parameters + +`account_number`_mandatory_ +: `string` The account from which you want to make the payout. +Account details can be found on the RazorpayX Dashboard. For example, `7878780080316316`. + - Pass your customer identifier if you want money to be deducted from RazorpayX Lite. + - Pass your Current Account number if you want money to be deducted from your Current Account. + +> **WARN** +> +> +> **Watch Out!** +> +> - This is **not** your contact's bank account number. Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - This value is different for Test Mode and Live Mode. +> + +`amount` _mandatory_ +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10000, pass `1000000`. Minimum value is `100`. + +`currency` _mandatory_ +: `string` The payout currency. Here, it is `INR`. + +`mode`_mandatory_ +: `string` The mode to be used to create the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `UPI` + - `card` + + The payout modes are case-sensitive. When creating payouts using APIs, ensure payout modes are entered in upper case. + +`purpose`_mandatory_ +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`queue_if_low_balance`_optional_ +: `boolean` Possible values: + - `true` : The payout is queued when your business account does not have sufficient balance to process the payout. + - `false` (default) : The payout is never queued. The payout fails if your business account does not have sufficient balance to process the payout. + +`fund_account` _mandatory_ +: `object` The account to which you want to make the payout. + + `account_type` _mandatory_ + : `string` The type of account linked to the contact id. Here, it will be `card`. + + `card` _mandatory_ + : `object` The details of the card used. + + `input_type` _mandatory_ + : `string` Here, the value is `card`. + + `number` _mandatory_ + : `string` Same field can accept card numbers or card tokens. + + `name` _optional_ + : `string` The name on the card. + + `expiry_month` _optional_ + : `string` The expiry month of the entered card. + + `expiry_year` _optional_ + : `string` The expiry year of the entered card. + + `contact` _mandatory_ + : `object` The Contact's details. + + `name` _mandatory_ + : `string` Name of the contact. This field is case-sensitive. A minimum of 3 characters and a maximum of 50 characters are allowed. Name cannot end with a special character, except `.`. Supported characters: a-z, A-Z, 0-9, space, `’` , `-` , `_` , `/ `, `( , )` and `.`. For example, `Gaurav Kumar`. + + `email` _optional_ + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `contact` _optional_ + : `string` The contact's phone number. For example, `9000090000`. + + `type` _optional_ + : `string` Classification for the contact being created. For example, employee. Possible values: `vendor`, `customer`, `employee`, `self`. + + `reference_id` _optional_ + : `string` A user-generated reference given to the contact. For example, `Acme Contact ID 12345`. This field can have a maximum length of 40 characters. + + `notes` _optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`reference_id` _optional_ +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` _optional_ +: `string` Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. This is a custom note that also appears on the bank statement. If no value is passed for this parameter, it defaults to the Merchant Billing Label. + + Enter the important text in the first 9 characters as banks truncate the rest as per their standards. + +`notes` _optional_ +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier linked to the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. For example, `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`fund_account` +: `object` The account to which you want to make the payout. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `account_type` + : `string` The type of account linked to the contact id. Here, it will be `card`. + + `contact_id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `contact` + : `object` + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `type` + : `string` A classification for the contact being created. For example, `employee`. + + `reference_id` + : `string` A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + + `batch_id` + : `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true` (default): active + - `false`: inactive + + `notes` + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + + `card` + : `object` The details of the card used. + + `last4` + : `string` The last 4 digits of the card number. If the input_type = `service_provider_token` then it is the last 4 digits of the card token. + + `network` + : `string` The network operator that has issued the card. For example, `Mastercard`, `Visa`. + + `type` + : `string` The type of card. For example, `credit` or `debit`. + + `issuer` + : `string` The bank that has issued the card. For example, `ICIC`, `HDFC`. + + `input_type` + : `string` Possible values:- `service_provider_token` : When the token number used is provided by an external service. +- `card` : When a card number is provided. +- `razorpay_token` : When the token id used is provided by Razorpay. + + +`amount` +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. Minimum value `100`. + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `UPI` + - `card` + + The payout modes are case-sensitive. + +`reference_id` +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` +: `string` Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. This is a custom note that also appears on the bank statement. If no value is passed for this parameter, it defaults to the Merchant Billing Label. + + Enter the important text in the first 9 characters as banks truncate the rest as per their standards. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. Know more about [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible value is `free_payout`. diff --git a/llm-content/api/x/payouts-cards/entity.md b/llm-content/api/x/payouts-cards/entity.md new file mode 100644 index 00000000..cbb726d6 --- /dev/null +++ b/llm-content/api/x/payouts-cards/entity.md @@ -0,0 +1,238 @@ +--- +title: Payouts to Cards Entity +description: Check the entity code for Payouts to Cards APIs. +--- + +# Payouts to Cards Entity + +## Payouts to Cards Entity + +The Payouts to Cards Entity has the following parameters: + +### Response + +```json: Sample Entity +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "fund_account": { + "id": "fa_00000000000001", + "entity": "fund_account", + "contact_id": "cont_00000000000001", + "contact": { + "id": "cont_00000000000001", + "entity": "contact", + "contact": "9876543210", + "email": "gaurav.kumar@example.com", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1580817353 + }, + "account_type": "card", + "card": { + "last4": "6789", + "network": "Visa", + "type": "credit", + "issuer": "HDFC", + "input_type": "card" + }, + "batch_id": null, + "active": true, + "created_at": 1581080272 + }, + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "fees": 590, + "tax": 90, + "status": "processed", + "purpose": "payout", + "utr": null, + "mode": "NEFT", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "failure_reason": null, + "created_at": 1581499319, + "fee_type": "", + "error": { + "description": null, + "source": null, + "reason": null + } +} +``` + +### Parameters + +`id` +: `string` The unique identifier linked to the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. For example, `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`fund_account` +: `object` The account to which you want to make the payout. + + `id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + + `account_type` + : `string` The type of account linked to the contact id. Here, it will be `card`. + + `contact_id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `contact` + : `object` + + `id` + : `string` The unique identifier linked to the contact. For example, `cont_00000000000001`. + + `entity` + : `string` The entity being created. Here, it will be `contact`. + + `name` + : `string` The contact's name. For example, `Gaurav Kumar`. + + `contact` + : `string` The contact's phone number. For example, `9000090000`. + + `email` + : `string` The contact's email address. For example, `gaurav.kumar@example.com`. + + `type` + : `string` A classification for the contact being created. For example, `employee`. + + `reference_id` + : `string` A user-entered reference for the contact. For example, `Acme Contact ID 12345`. + + `batch_id` + : `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + + `active` + : `boolean` Possible values: + - `true` (default): active + - `false`: inactive + + `notes` + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + + `card` + : `object` The details of the card used. + + `last4` + : `string` The last 4 digits of the card number. If the input_type = `service_provider_token` then it is the last 4 digits of the card token. + + `network` + : `string` The network operator that has issued the card. For example, `Mastercard`, `Visa`. + + `type` + : `string` The type of card. For example, `credit` or `debit`. + + `issuer` + : `string` The bank that has issued the card. For example, `ICIC`, `HDFC`. + + `input_type` + : `string` Possible values:- `service_provider_token` : When the token number used is provided by an external service. +- `card` : When a card number is provided. +- `razorpay_token` : When the token id used is provided by Razorpay. + + +`amount` +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. Minimum value `100`. + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `UPI` + - `card` + + The payout modes are case-sensitive. + +`reference_id` +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` +: `string` Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. This is a custom note that also appears on the bank statement. If no value is passed for this parameter, it defaults to the Merchant Billing Label. + + Enter the important text in the first 9 characters as banks truncate the rest as per their standards. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. Know more about [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Timestamp, in Unix, when the contact was created. For example, `1545320320`. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible value is `free_payout`. diff --git a/llm-content/api/x/payouts-cards/security-risks.md b/llm-content/api/x/payouts-cards/security-risks.md new file mode 100644 index 00000000..847e622c --- /dev/null +++ b/llm-content/api/x/payouts-cards/security-risks.md @@ -0,0 +1,33 @@ +--- +title: Security Risks - PCI DSS Non-Compliance +description: Check the security risks involved when using a public API to create a Fund Account for a Contact's card. Understand the benefits of being PCI-DSS compliant. +--- + +# Security Risks - PCI DSS Non-Compliance + +> **WARN** +> +> +> **Watch Out!** +> +> - You must ensure that no two fund accounts have the same `fund_account_id`. The below mentioned security risks can be avoided if this is ensured. +> - If you are **not** PCI DSS compliant, ensure card details do not pass through or are saved on your server. +> + +There are security risks involved when using public APIs. When using a public API in the front end to create a fund account using a customer's card, there is a possibility that a malicious user can tamper with the response data before it reaches you. + +The malicious user could have full control over the request and/or response and make changes to the data. They could change the contact's card number sent by you in the request to another card number. + +They could also create a fund account with their details on your website or app. When you try to create a fund account for your contact, they could replace the `fund_account_id` returned by Razorpay with the `fund_account_id` linked to their account. This means you could end up making payouts to the malicious user instead of the intended contact. + +It is advised you take all required precautions when making public API calls. Ensure you store the `fund_account_id` returned by Razorpay in your database and make payouts only to fund account ids and card numbers you recognize. + +If the data is tampered in anyway, the liability lies on malicious user as it is considered a malicious attempt by the user. + +> **INFO** +> +> +> **Handy Tips** +> +> We highly recommend you get PCI DSS compliance and make private API calls that are authenticated using your API Key. This helps reduce risks related to security. +> diff --git a/llm-content/api/x/payouts.md b/llm-content/api/x/payouts.md new file mode 100644 index 00000000..15cda293 --- /dev/null +++ b/llm-content/api/x/payouts.md @@ -0,0 +1,49 @@ +--- +title: RazorpayX Payouts API Documentation +heading: Payouts +description: Create, fetch and cancel Payouts using APIs. Set up webhooks for notifications. +--- + +# Payouts + +A [payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) is a transfer of funds from your business account to a Contact's Fund Account(s). You can create and process payouts both on the RazorpayX Dashboard and via the Payouts API. Ensure to [create a contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/create.md) and add a [fund account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts.md). + +> **SUCCESS** +> +> +> **What's New** +> +> [Idempotency Key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency.md) is mandatory for all payout requests starting March 15, 2025. +> + +To make payouts, you must [allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) and pass the [idempotency key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency.md). + +Making payouts from [RazorpayX Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/razorpayx-lite.md) account to RazorpayX Lite Customer Identifiers or Razorpay [Customer identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) is not supported. + +Fork the Razorpay Postman Public Workspace and try the Payouts APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md). +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-117c93d1-1a79-4958-9067-eb97a3459f08) + +### Related Guides + +[About Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) +[Set up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) +[Webhooks Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) + +### Endpoints + +- **post** ` +/v1/payouts` - Creates a Payout to a Bank Account: +Create a payout to a bank account. + +- **post** ` +/v1/payouts` - Create a Payout to a VPA: +Creates a payout to a VPA. + +- **get** `/v1/payouts?account_number=\{account number\}` - Fetch all Payouts: +Retrieves details of all the payouts. + +- **get** `/v1/payouts/:id` - Fetch a Payout with ID: +Retrieves details of one payout via ID. + +- **patch** `/v1/payouts/:id/cancel` - Cancel a Queued Payout: +Cancels a payout in `queued` state. diff --git a/llm-content/api/x/payouts/cancel.md b/llm-content/api/x/payouts/cancel.md new file mode 100644 index 00000000..69a97751 --- /dev/null +++ b/llm-content/api/x/payouts/cancel.md @@ -0,0 +1,157 @@ +--- +title: Cancel a Queued Payout +description: Cancel a Queued Payout using API. +--- + +# Cancel a Queued Payout + +## Cancel a Queued Payout + +Use this endpoint to cancel a queued payout, without saving the details. You can only cancel payouts that are in the `queued` state. It is not possible to cancel payouts that have any other status. + +To understand the status of the payouts, refer to [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payouts/pout_00000000000001/cancel \ +``` + +### Response + +```json: Success +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "fees": 0, + "tax": 0, + "status": "failed", + "utr": "null", + "mode": "NEFT", + "purpose": "refund", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "status_details": { + "description": "The NEFT 24*7 limits for your account has been exhausted. Please retry after some time", + "source": "business", + "reason": "amount_limit_exhausted" + } + "created_at": 1545383037, + "fee_type": "free_payout" +} +``` + +### Parameters + +`id`_mandatory_ +: `string` This is the unique identifier linked to the payout. For example, `pout_00000000000001`. + +### Parameters + +`id` +: `string` The unique identifier of the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`amount` +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. Minimum value `100`. +The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout's currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + - `failed` + + Know more about [Payout States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md) and [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `card` + + + The payout modes are case-sensitive. + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`reference_id` +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`debit_account_number` +: `string` The account from which the payout was processed. For example, `002281300012871`. + +`narration` +: `string` Custom note that also appears on the bank statement. Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. + + If no value is passed for this parameter, it defaults to the Merchant Billing Label. Ensure that the most important text forms the first 9 characters as banks may truncate the rest as per their standards. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. Know more about [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Indicates the Unix timestamp when this payout was created. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible values is `free_payout`. diff --git a/llm-content/api/x/payouts/create/bank-account.md b/llm-content/api/x/payouts/create/bank-account.md new file mode 100644 index 00000000..a150171e --- /dev/null +++ b/llm-content/api/x/payouts/create/bank-account.md @@ -0,0 +1,238 @@ +--- +title: Create a Payout to a Bank Account +description: Create a Payout to a Bank Account using APIs. +--- + +# Create a Payout to a Bank Account + +## Create a Payout to a Bank Account + +Use this endpoint to create a payout to fund account type `bank_account`. + +To understand the status of the payouts, refer to [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you [allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) and pass the [idempotency key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) to make a successful payout. +> + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payouts \ +-H "Content-Type: application/json" \ +-H "X-Payout-Idempotency: 53cda91c-8f81-4e77-bbb9-7388f4ac6bf4" \ +-d '{ + "account_number": "7878780080316316", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "mode": "IMPS", + "purpose": "refund", + "queue_if_low_balance": true, + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' +``` + +### Response + +```json: Success +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fees": 0, + "tax": 0, + "status": "queued", + "utr": null, + "mode": "IMPS", + "purpose": "refund", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "status_details": { + "description": "Payout is queued as there is insufficient balance in your business account to process the payout", + "source": "business", + "reason": "low_balance" + } + "created_at": 1545383037 +} +``` + +### Parameters + +`account_number`_mandatory_ +: `string` The account from which you want to make the payout. For example, `7878780080316316`. + - Pass your customer identifier if you want money to be deducted from RazorpayX Lite. + - Pass your Current Account number if you want money to be deducted from your Current Account + +> **WARN** +> +> +> **Watch Out!** +> +> - This is **not** your contact's bank account number. Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - This value is different for Test Mode and Live Mode. +> + +`fund_account_id`_mandatory_ +: `string` The unique identifier linked to a fund account. For example, `fa_00000000000001`. + +`amount`_mandatory_ +: `integer` The payout amount, in paise. For example, pass `1000000` to transfer an amount of ₹10,000. Minimum value `100`. + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency`_mandatory_ +: `string` The payout currency. Here, it is `INR`. + +`mode`_mandatory_ +: `string` The mode to be used to create the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `card` + + Ensure you enter the payout modes in upper case as the payout modes are case-sensitive. + +`purpose`_mandatory_ +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`queue_if_low_balance`_optional_ +: `boolean` Possible values: + - `true`: The payout is queued when your business account does not have sufficient balance to process the payout. + - `false` (default): The payout is never queued. The payout fails if your business account does not have sufficient balance to process the payout. + +`reference_id`_optional_ +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration`_optional_ +: `string` Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. This is a custom note that also appears on the bank statement. If no value is passed for this parameter, it defaults to the Merchant Billing Label. + + Enter the important text in the first 9 characters as banks truncate the rest as per their standards. + +`notes`_optional_ +: `array of objects` Multiple key-value pairs that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier of the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`amount` +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. Minimum value `100`. +The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout's currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + - `failed` + + Know more about [Payout States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md) and [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `card` + + + The payout modes are case-sensitive. + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`reference_id` +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`debit_account_number` +: `string` The account from which the payout was processed. For example, `002281300012871`. + +`narration` +: `string` Custom note that also appears on the bank statement. Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. + + If no value is passed for this parameter, it defaults to the Merchant Billing Label. Ensure that the most important text forms the first 9 characters as banks may truncate the rest as per their standards. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. Know more about [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Indicates the Unix timestamp when this payout was created. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible values is `free_payout`. diff --git a/llm-content/api/x/payouts/create/vpa.md b/llm-content/api/x/payouts/create/vpa.md new file mode 100644 index 00000000..a3c89784 --- /dev/null +++ b/llm-content/api/x/payouts/create/vpa.md @@ -0,0 +1,232 @@ +--- +title: Create a Payout to a VPA +description: Create a Payout to a VPA using API. +--- + +# Create a Payout to a VPA + +## Create a Payout to a VPA + +Use this endpoint to create a payout to fund account type `vpa`. + +To understand the status of the payouts, refer to [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you [allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) and pass the [idempotency key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) to make a successful payout. +> + +### Request + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payouts \ +-H "Content-Type: application/json" \ +-H "X-Payout-Idempotency: 53cda91c-8f81-4e77-bbb9-7388f4ac6bf4" \ +-d '{ + "account_number": "7878780080316316", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "mode": "UPI", + "purpose": "refund", + "queue_if_low_balance": true, + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' +``` + +### Response + +```json: Success +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fees": 0, + "tax": 0, + "status": "queued", + "utr": null, + "mode": "UPI", + "purpose": "refund", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "status_details": { + "description": "Payout is queued as there is insufficient balance in your business account to process the payout", + "source": "business", + "reason": "low_balance" + } + "created_at": 1545383037 +} +``` + +### Parameters + +`account_number`_mandatory_ +: `string` The account from which you want to make the payout. For example, `7878780080316316`. + - Pass your customer identifier if you want money to be deducted from RazorpayX Lite. + - Pass your Current Account number if you want money to be deducted from your Current Account. + +> **WARN** +> +> +> **Watch Out!** +> +> - This is **not** your contact's bank account number. Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - This value is different for Test Mode and Live Mode. +> + +`fund_account_id`_mandatory_ +: `string` The unique identifier linked to a fund account. For example, `fa_00000000000001`. + +`amount`_mandatory_ +: `integer` The payout amount, in paise. For example, pass `1000000` to transfer an amount of ₹10,000. Minimum value `100`. + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency`_mandatory_ +: `string` The payout currency. Here, it is `INR`. + +`mode`_mandatory_ +: `string` The mode to be used to create the payout. Available mode is `UPI`. Ensure you enter the payout modes in upper case as the payout modes are case-sensitive. + +`purpose`_mandatory_ +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`queue_if_low_balance`_optional_ +: `boolean` Possible values: + - `true`: The payout is queued when your business account does not have sufficient balance to process the payout. + - `false` (default): The payout is never queued. The payout fails if your business account does not have sufficient balance to process the payout. + +`reference_id`_optional_ +: `string` A user-generated reference given to the payout. Maximum length is 40 characters. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration`_optional_ +: `string` Maximum length 30 characters. Allowed characters: a-z, A-Z, 0-9 and space. This is a custom note that also appears on the bank statement. If no value is passed for this parameter, it defaults to the Merchant Billing Label. + + Enter the important text in the first 9 characters as banks truncate the rest as per their standards. + +`notes`_optional_ +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Parameters + +`id` +: `string` The unique identifier of the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`amount` +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. Minimum value `100`. +The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout's currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + - `failed` + + Know more about [Payout States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md) and [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `card` + + + The payout modes are case-sensitive. + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`reference_id` +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`debit_account_number` +: `string` The account from which the payout was processed. For example, `002281300012871`. + +`narration` +: `string` Custom note that also appears on the bank statement. Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. + + If no value is passed for this parameter, it defaults to the Merchant Billing Label. Ensure that the most important text forms the first 9 characters as banks may truncate the rest as per their standards. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. Know more about [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Indicates the Unix timestamp when this payout was created. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible values is `free_payout`. diff --git a/llm-content/api/x/payouts/entity.md b/llm-content/api/x/payouts/entity.md new file mode 100644 index 00000000..a611783a --- /dev/null +++ b/llm-content/api/x/payouts/entity.md @@ -0,0 +1,142 @@ +--- +title: Payouts Entity +description: View RazorpayX Payouts entity parameters and descriptions. +--- + +# Payouts Entity + +## Payouts Entity + +The Payouts' Entity has the following parameters: + +### Response + +```json: Sample Entity +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fees": 0, + "tax": 0, + "status": "queued", + "utr": null, + "mode": "IMPS", + "purpose": "refund", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "status_details": { + "description": "Payout is queued as there is insufficient balance in your business account to process the payout", + "source": "business", + "reason": "low_balance" + } + "created_at": 1545383037 +} +``` + +### Parameters + +`id` +: `string` The unique identifier of the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`amount` +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. Minimum value `100`. +The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout's currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + - `failed` + + Know more about [Payout States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md) and [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `card` + + + The payout modes are case-sensitive. + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`reference_id` +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`debit_account_number` +: `string` The account from which the payout was processed. For example, `002281300012871`. + +`narration` +: `string` Custom note that also appears on the bank statement. Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. + + If no value is passed for this parameter, it defaults to the Merchant Billing Label. Ensure that the most important text forms the first 9 characters as banks may truncate the rest as per their standards. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. Know more about [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Indicates the Unix timestamp when this payout was created. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible values is `free_payout`. diff --git a/llm-content/api/x/payouts/fetch-all.md b/llm-content/api/x/payouts/fetch-all.md new file mode 100644 index 00000000..aafcbd40 --- /dev/null +++ b/llm-content/api/x/payouts/fetch-all.md @@ -0,0 +1,258 @@ +--- +title: Fetch All Payouts +description: Fetch All Payouts using API. +--- + +# Fetch All Payouts + +## Fetch All Payouts + +Use this endpoint to retrieve the details of all the available payouts in the system. + +To understand the status of the payouts, refer to [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +> **WARN** +> +> +> +> **Watch Out!** +> +> We do not recommend using the Fetch Payout API to check the status of the payouts. Instead, we recommend that you subscribe to our [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/apis/subscribe.md) to get instant notifications. Whenever the status of your payouts change, you will be notified via these webhooks. +> + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X GET https://api.razorpay.com/v1/payouts?account_number=7878780080316316 +``` + +### Response + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "fees": 590, + "tax": 90, + "status": "processed", + "purpose": "payout", + "utr": null, + "mode": "NEFT", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "debit_account_number": "002281300012871", + "batch_id": null, + "status_details": { + "description": "Payout is processed and the money has been credited into the beneficiaries account", + "source": "beneficiary_bank", + "reason": "payout_processed" + } + "created_at": 1545382870, + "fee_type": "", + }, + { + "id": "pout_00000000000002", + "entity": "payout", + "fund_account_id": "fa_00000000000002", + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "fees": 590, + "tax": 90, + "status": "reversed", + "purpose": "refund", + "utr": null, + "mode": "NEFT", + "reference_id": "Acme Transaction ID 123456", + "narration": "Acme Corp Fund Transfer", + "debit_account_number": "002281300012999", + "batch_id": null, + "status_details": { + "description": "The NEFT 24*7 limits for your account has been exhausted. Please retry after sometime", + "source": "business", + "reason": "amount_limit_exhausted" + } + "created_at": 1545382870, + "fee_type": "", + } + ] +} +``` + +### Parameters + +`account_number`_mandatory_ +: `string` The account from which the payouts were done. For example, `7878780080316316`. + - Pass your Customer Identifier(RazorpayX Lite number) if money was deducted from it. + - Pass your Current Account number if money was deducted from your Current Account. + - This is a numeric or alphanumeric value + +> **WARN** +> +> +> **Watch Out!** +> +> - To view your Customer Identifier, log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - Customer Identifier value is different for Test Mode and Live Mode. +> + +`contact_id` _optional_ +: `string` The unique identifier of the contact for which you want to fetch payouts. For example, `cont_00000000000001`. + +`fund_account_id` _optional_ +: `string` The unique identifier of the fund account for which you want to fetch payouts. For example, `fa_00000000000001`. + +`mode` _optional_ +: `string` The mode for which payouts are to be fetched. You can use one of the following payout modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `UPI` + - `card` + - `amazonpay` + + The payout modes are case-sensitive. Ensure payout modes are entered in upper case. + +`reference_id` _optional_ +: `string` Maximum length is 40 characters. The user-generated reference for which payouts are to be fetched. For example, `Acme Transaction ID 12345`. + +`status` _optional_ +: `string` The payout status. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + - `failed` + + Know more about [Payout statuses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md) and [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`from` _optional_ +: `integer` Timestamp, in Unix, from when you want to fetch payouts. + +`to` _optional_ +: `integer` Timestamp, in Unix, till when you want to fetch payouts. + +`count` _optional_ +: `integer` Number of payouts to be fetched. Default value is `10`. Maximum value is `100`. This can be used for pagination, in combination with `skip`. + +`skip` _optional_ +: `integer` Numbers of payouts to be skipped. Default value is `0`. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` The unique identifier of the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`amount` +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. Minimum value `100`. +The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout's currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + - `failed` + + Know more about [Payout States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md) and [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `card` + + + The payout modes are case-sensitive. + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`reference_id` +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`debit_account_number` +: `string` The account from which the payout was processed. For example, `002281300012871`. + +`narration` +: `string` Custom note that also appears on the bank statement. Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. + + If no value is passed for this parameter, it defaults to the Merchant Billing Label. Ensure that the most important text forms the first 9 characters as banks may truncate the rest as per their standards. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. Know more about [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Indicates the Unix timestamp when this payout was created. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible values is `free_payout`. diff --git a/llm-content/api/x/payouts/fetch-with-id.md b/llm-content/api/x/payouts/fetch-with-id.md new file mode 100644 index 00000000..be42173e --- /dev/null +++ b/llm-content/api/x/payouts/fetch-with-id.md @@ -0,0 +1,157 @@ +--- +title: Fetch Payout With ID +description: Fetch Payout with ID using API. +--- + +# Fetch Payout With ID + +## Fetch Payout With ID + +Use this endpoint to retrieve the details of a particular payout in the system. + +To understand the status of the payouts, refer to [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X GET https://api.razorpay.com/v1/payouts/pout_00000000000001 +``` + +### Response + +```json: Success +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "notes": { + "note_key": "Beam me up Scotty" + }, + "fees": 590, + "tax": 90, + "status": "processed", + "purpose": "payout", + "utr": null, + "mode": "NEFT", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "debit_account_number" : "002281300012871", + "batch_id": null, + "status_details": { + "description": "Payout is processed and the money has been credited into the beneficiaries account", + "source": "beneficiary_bank", + "reason": "payout_processed" + } + "created_at": 1545382870, + "fee_type": "" +} +``` + +### Parameters + +`id`_mandatory_ +: `string` This is the unique identifier linked to the payout. For example, `pout_00000000000001`. + +### Parameters + +`id` +: `string` The unique identifier of the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `payout`. + +`fund_account_id` +: `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + +`amount` +: `integer` The payout amount, in paise. For example, if you want to transfer ₹10,000, pass `1000000`. Minimum value `100`. +The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The payout's currency. Here, it is `INR`. + +`notes` +: `array of objects` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` The fees for the payout. This value is returned only when the payout moves to the `processing` state. For example, `5`. + +`tax` +: `integer` The tax that is applicable for the fee being charged. This value is returned only when the payout moves to the `processing` state. For example, `1`. + +`status` +: `string` The status of the payout. Possible payout states: + - `queued` + - `pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `rejected` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled) + - `processing` + - `processed` + - `cancelled` + - `reversed` + - `failed` + + Know more about [Payout States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md) and [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`utr` +: `string` The unique transaction number linked to a payout. For example, `HDFCN00000000001`. + +`mode` +: `string` The mode used to make the payout. Available modes: + - `NEFT` + - `RTGS` + - `IMPS` + - `card` + + + The payout modes are case-sensitive. + +`purpose` +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + + + Additional purposes for payouts can be created via the [Dashboard](https://x.razorpay.com/) and then used in the API. However, it is not possible to create a new purpose for the payout via the API. + +`reference_id` +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`debit_account_number` +: `string` The account from which the payout was processed. For example, `002281300012871`. + +`narration` +: `string` Custom note that also appears on the bank statement. Maximum length 30 characters. Allowed characters: `a-z`, `A-Z`, `0-9` and space. + + If no value is passed for this parameter, it defaults to the Merchant Billing Label. Ensure that the most important text forms the first 9 characters as banks may truncate the rest as per their standards. + +`batch_id` +: `string` This value is returned if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`status_details` +: `object` This parameter returns the current status of the payout. For example, `IMPS is not enabled on beneficiary account, Retry with different mode.` + + `description` + : `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, please retry with different mode`. + + `source` + : `string` Possible values: + - `gateway`: Technical error at Razorpay Partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `imps_not_allowed`. Know more about [Payout Status Details and Next Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md). + +`created_at` +: `integer` Indicates the Unix timestamp when this payout was created. + +`fee_type` +: `string` Indicates the fee type charged for the payout. Possible values is `free_payout`. diff --git a/llm-content/api/x/transactions.md b/llm-content/api/x/transactions.md new file mode 100644 index 00000000..376992f9 --- /dev/null +++ b/llm-content/api/x/transactions.md @@ -0,0 +1,26 @@ +--- +title: Transactions +description: List of Transactions APIs to retrieve transactions. +--- + +# Transactions + +Transactions are the records of inflow of funds to your business account, and payouts to a Contact's Fund Account and reversals. You can retrieve the details of a particular transaction or the details of all transactions using the Transactions APIs. + +Fork the Razorpay Postman Public Workspace and try the Transactions APIs using your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-a9f166e4-bfee-48ae-bfc3-3a5baaa67f1c) + +### Related Guides + +[About Account Statement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-statement.md) +[Set Up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) +[Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/transactions.md) + +### Endpoints + +- **get** `/v1/transactions?account_number=\{account number\}` - Fetch All Transactions: +Retrieves all the transactions made from your business account. + +- **get** `/v1/transactions/:id` - Fetch a Transaction with ID: +Retrieves a transaction using its ID. diff --git a/llm-content/api/x/transactions/entity.md b/llm-content/api/x/transactions/entity.md new file mode 100644 index 00000000..9c20872b --- /dev/null +++ b/llm-content/api/x/transactions/entity.md @@ -0,0 +1,154 @@ +--- +title: Transactions Entity +description: Check the entity code of the Transactions API. +--- + +# Transactions Entity + +## Transactions Entity + +The Transactions Entity has the following parameters: + + +### Response + +```json: Sample Entity +{ + "id": "txn_00000000000002", + "entity": "transaction", + "account_number": "7878780080316316", + "amount": 1000000, + "currency": "INR", + "credit": 0, + "debit": 1000000, + "balance": 9000000, + "source": { + // if source entity = bank_transfer, the system returns the following values. + "id":"bt_00000000000001", + "entity":"bank_transfer", + "payer_name":"Saurav Kumar", + "payer_account":"6543266545411243", + "payer_ifsc":"UTIB0000002", + "mode":"NEFT", + "bank_reference":"AXIR000000000001", + // end of source entity = bank_transfer. + // start of source entity = payout (default source). + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "fees": 3, + "tax": 1, + "status": "processed", + "utr": "000000000001", + "mode": "NEFT", + "created_at": 1545224066, + "fee_type": null + }, + "created_at": 1545224066 +} +``` + +### Parameters + +`id` +: `string` The unique identifier linked to the transaction. For example, `txn_00000000000001`. + +`entity` +: `string` The entity created. Here, it is `transaction`. + +`account_number` +: `string` The business account from which the payout was made. For example, `7878780080316316`. + +`amount` +: `integer` The amount transferred, in paise. The transfer can either be a credit (when you add funds to your account) or a debit (when you make a payout). + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The transaction currency. Here, it is `INR`. + +`credit` +: `integer` The amount, in paise, credited to your account. Is `0` for debit transactions (when making payouts). + +`debit` +: `integer` The amount, in paise, debited to your account. Is `0` for credit transactions (when adding funds to your account). + +`balance` +: `integer` The remaining amount, in paise, in your account after the debit or credit transaction. + +`source` +: `object` Details of the payout made or details of the bank account from which money was added to your business account. + + `id` + : `string` The payout id when making payouts or the bank transfer id when adding funds to your account. + + `entity` + : `string` The entity for which the transaction was created. Possible values: + - `payout` + - `bank_transfer` + + `amount` + : `integer` The amount transferred, in paise. + + `fund_account_id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + This value is returned only when the source entity is `payout`. + + `notes` + : `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + + This value is returned only when the source entity is `payout`. + + `payer_name` + : `string` Name linked to the account making the transfer. For example, `Saurav Kumar`. + This value is returned only when the source entity is `bank_transfer`. + + `payer_account` + : `string` The account number from which money is transferred to your business bank account. For example, `6543266545411243`. + This value is returned only when the source entity is `bank_transfer`. + + `payer_ifsc` + : `string` The branch IFSC from where the transfer is being made. For example, `UTIB0000002`. This value is returned only when the source entity is `bank_transfer`. + + `mode` + : `string` The mode used to transfer money to your business bank account. For example, `NEFT`. This value is returned only when the source entity is `bank_transfer`. + + `bank_reference` + : `string` Reference from the bank from which money was transferred to your business bank account. For example, `AXIR000000000001`. + This value is returned only when the source entity is `bank_transfer`. + +`fees` +: `integer` The fees, in paise, for the transaction. This field is populated only when the transaction moves to the `processing` state. For example, `5`. + This value is returned only when the source entity is `payout`. + +`tax` +: `integer` The tax, in paise, for the fee being charged. This field is populated only when the transaction moves to the `processing` state. For example, `1`. + This value is returned only when the source entity is `payout`. + +`status` +: `string` The status of the transaction. A transaction can be in any of the following states: + - `pending` + - `queued` + - `processing` + - `processed` + - `reversed` + - `cancelled` + - `rejected` + + This value is returned only when the source entity is `payout`. + +`utr` +: `string` The unique transaction number for the transaction. For example, `HDFCN00000000001`. + This value is returned only when the source entity is `payout`. + +`mode` +: `string` The payout mode. Refer to the [Supported Banks and Payout Modes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards.md#supported-banks-and-payout-modes) for more details. + This value is returned only when the source entity is `payout`. + +`created_at` +: `integer` Timestamp, in Unix, when the source entity or transaction entity was created. For example, `1545320320`. diff --git a/llm-content/api/x/transactions/fetch-all.md b/llm-content/api/x/transactions/fetch-all.md new file mode 100644 index 00000000..68918868 --- /dev/null +++ b/llm-content/api/x/transactions/fetch-all.md @@ -0,0 +1,208 @@ +--- +title: Fetch All Transactions +description: Retrieve the details of all transactions from your account using the API. +--- + +# Fetch All Transactions + +## Fetch All Transactions + +Use this endpoint to retrieve the details of all transactions. + +### Request + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X GET https://api.razorpay.com/v1/transactions?account_number=7878780080316316 +``` + +### Response + +```json: Success +{ + "entity":"collection", + "count":2, + "items":[ + { + "id":"txn_00000000000001", + "entity":"transaction", + "account_number":"1121431121541121", + "amount":10000000, + "currency":"INR", + "credit":10000000, + "debit":0, + "balance":10000000, + "source":{ + "id":"bt_00000000000001", + "entity":"bank_transfer", + "payer_name":"Saurav Kumar", + "payer_account":"6543266545411243", + "payer_ifsc":"UTIB0000002", + "mode":"NEFT", + "bank_reference":"AXIR000000000001", + "amount":10000000 + }, + "created_at":1545125568 + }, + { + "id":"txn_00000000000003", + "entity":"transaction", + "account_number":"7878780080316316", + "amount":1000000, + "currency":"INR", + "credit":0, + "debit":1000000, + "balance":9000000, + "source":{ + "id":"pout_00000000000001", + "entity":"payout", + "fund_account_id":"fa_00000000000001", + "amount":1000000, + "notes":{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "fees":3, + "tax":1, + "status":"processed", + "utr":"000000000001", + "mode":"NEFT", + "created_at":1545224066, + "fee_type": null + }, + "created_at":1545224066 + } + ] +} +``` + +### Parameters + +`account_number`_mandatory_ +: `string` The account for which you want to view the transactions. +Account details can be found on the RazorpayX Dashboard. For example, `7878780080316316`. + - Pass your Customer Identifier (RazorpayX Lite number) if the transaction was done through it. + - Pass your Current Account number if the transaction was done through it. + - This is an alphanumeric or numeric value. + +> **WARN** +> +> +> **Watch Out!** +> +> - Log in to your [**RazorpayX Dashboard**](https://x.razorpay.com/auth/?intent=current_account) and go to **My Account & Settings → Banking → Customer Identifier**. +> - This value is different for Test Mode and Live Mode. +> +> + +`from`_optional_ +: `integer` Timestamp, in Unix, from when you want to fetch transactions. + +`to`_optional_ +: `integer` Timestamp, in Unix, till when you want to fetch transactions. + +`count`_optional_ +: `integer` Number of payouts to be fetched. Default value is `10`. Maximum value is `100`. This can be used for pagination, in combination with `skip`. + +`skip`_optional_ +: `integer` Numbers of payouts to be skipped. Default value is `0`. This can be used for pagination, in combination with `count`. + +### Parameters + +`id` +: `string` The unique identifier linked to the transaction. For example, `txn_00000000000001`. + +`entity` +: `string` The entity created. Here, it is `transaction`. + +`account_number` +: `string` The business account from which the payout was made. For example, `7878780080316316`. + +`amount` +: `integer` The amount transferred, in paise. The transfer can either be a credit (when you add funds to your account) or a debit (when you make a payout). + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The transaction currency. Here, it is `INR`. + +`credit` +: `integer` The amount, in paise, credited to your account. Is `0` for debit transactions (when making payouts). + +`debit` +: `integer` The amount, in paise, debited to your account. Is `0` for credit transactions (when adding funds to your account). + +`balance` +: `integer` The remaining amount, in paise, in your account after the debit or credit transaction. + +`source` +: `object` Details of the payout made or details of the bank account from which money was added to your business account. + + `id` + : `string` The payout id when making payouts or the bank transfer id when adding funds to your account. + + `entity` + : `string` The entity for which the transaction was created. Possible values: + - `payout` + - `bank_transfer` + + `amount` + : `integer` The amount transferred, in paise. + + `fund_account_id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + This value is returned only when the source entity is `payout`. + + `notes` + : `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + + This value is returned only when the source entity is `payout`. + + `payer_name` + : `string` Name linked to the account making the transfer. For example, `Saurav Kumar`. + This value is returned only when the source entity is `bank_transfer`. + + `payer_account` + : `string` The account number from which money is transferred to your business bank account. For example, `6543266545411243`. + This value is returned only when the source entity is `bank_transfer`. + + `payer_ifsc` + : `string` The branch IFSC from where the transfer is being made. For example, `UTIB0000002`. This value is returned only when the source entity is `bank_transfer`. + + `mode` + : `string` The mode used to transfer money to your business bank account. For example, `NEFT`. This value is returned only when the source entity is `bank_transfer`. + + `bank_reference` + : `string` Reference from the bank from which money was transferred to your business bank account. For example, `AXIR000000000001`. + This value is returned only when the source entity is `bank_transfer`. + +`fees` +: `integer` The fees, in paise, for the transaction. This field is populated only when the transaction moves to the `processing` state. For example, `5`. + This value is returned only when the source entity is `payout`. + +`tax` +: `integer` The tax, in paise, for the fee being charged. This field is populated only when the transaction moves to the `processing` state. For example, `1`. + This value is returned only when the source entity is `payout`. + +`status` +: `string` The status of the transaction. A transaction can be in any of the following states: + - `pending` + - `queued` + - `processing` + - `processed` + - `reversed` + - `cancelled` + - `rejected` + + This value is returned only when the source entity is `payout`. + +`utr` +: `string` The unique transaction number for the transaction. For example, `HDFCN00000000001`. + This value is returned only when the source entity is `payout`. + +`mode` +: `string` The payout mode. Refer to the [Supported Banks and Payout Modes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards.md#supported-banks-and-payout-modes) for more details. + This value is returned only when the source entity is `payout`. + +`created_at` +: `integer` Timestamp, in Unix, when the source entity or transaction entity was created. For example, `1545320320`. diff --git a/llm-content/api/x/transactions/fetch-with-id.md b/llm-content/api/x/transactions/fetch-with-id.md new file mode 100644 index 00000000..908198e9 --- /dev/null +++ b/llm-content/api/x/transactions/fetch-with-id.md @@ -0,0 +1,166 @@ +--- +title: Fetch Transactions With ID +description: Retrieve the details of a transaction with its id using the API. +--- + +# Fetch Transactions With ID + +## Fetch Transactions With ID + +Use this endpoint to retrieve details of a specific transaction using its id. + +### Request + +```curl: Curl + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X GET https://api.razorpay.com/v1/transactions/txn_00000000000002 +``` + +### Response + +```json: Success +{ + "id":"txn_00000000000002", + "entity":"transaction", + "account_number":"7878780080316316", + "amount":1000000, + "currency":"INR", + "credit":0, + "debit":1000000, + "balance":9000000, + "source":{ + // if source entity = payout, the system returns the following values. + "id":"pout_00000000000001", + "entity":"payout", + "fund_account_id":"fa_00000000000001", // end of source entity = payout. + // if source entity = bank_transfer, the system returns the following values. + "id":"bt_00000000000001", + "entity":"bank_transfer", + "payer_name":"Saurav Kumar", + "payer_account":"6543266545411243", + "payer_ifsc":"UTIB0000002", + "mode":"NEFT", + "bank_reference":"AXIR000000000001", + // end of source entity = bank_transfer. + "amount":1000000, + "notes":{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "fees":3, + "tax":1, + "status":"processed", + "utr":"000000000001", + "mode":"NEFT", + "created_at":1545224066, + "fee_type": null + }, + "created_at":1545224066 +} +``` + +### Parameters + +`id`_mandatory_ +: `string` The unique identifier linked to the transaction. For example, `txn_00000000000002`. + +### Parameters + +`id` +: `string` The unique identifier linked to the transaction. For example, `txn_00000000000001`. + +`entity` +: `string` The entity created. Here, it is `transaction`. + +`account_number` +: `string` The business account from which the payout was made. For example, `7878780080316316`. + +`amount` +: `integer` The amount transferred, in paise. The transfer can either be a credit (when you add funds to your account) or a debit (when you make a payout). + + The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance. + +`currency` +: `string` The transaction currency. Here, it is `INR`. + +`credit` +: `integer` The amount, in paise, credited to your account. Is `0` for debit transactions (when making payouts). + +`debit` +: `integer` The amount, in paise, debited to your account. Is `0` for credit transactions (when adding funds to your account). + +`balance` +: `integer` The remaining amount, in paise, in your account after the debit or credit transaction. + +`source` +: `object` Details of the payout made or details of the bank account from which money was added to your business account. + + `id` + : `string` The payout id when making payouts or the bank transfer id when adding funds to your account. + + `entity` + : `string` The entity for which the transaction was created. Possible values: + - `payout` + - `bank_transfer` + + `amount` + : `integer` The amount transferred, in paise. + + `fund_account_id` + : `string` The unique identifier linked to the fund account. For example, `fa_00000000000001`. + This value is returned only when the source entity is `payout`. + + `notes` + : `object` User-entered notes for internal reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + + This value is returned only when the source entity is `payout`. + + `payer_name` + : `string` Name linked to the account making the transfer. For example, `Saurav Kumar`. + This value is returned only when the source entity is `bank_transfer`. + + `payer_account` + : `string` The account number from which money is transferred to your business bank account. For example, `6543266545411243`. + This value is returned only when the source entity is `bank_transfer`. + + `payer_ifsc` + : `string` The branch IFSC from where the transfer is being made. For example, `UTIB0000002`. This value is returned only when the source entity is `bank_transfer`. + + `mode` + : `string` The mode used to transfer money to your business bank account. For example, `NEFT`. This value is returned only when the source entity is `bank_transfer`. + + `bank_reference` + : `string` Reference from the bank from which money was transferred to your business bank account. For example, `AXIR000000000001`. + This value is returned only when the source entity is `bank_transfer`. + +`fees` +: `integer` The fees, in paise, for the transaction. This field is populated only when the transaction moves to the `processing` state. For example, `5`. + This value is returned only when the source entity is `payout`. + +`tax` +: `integer` The tax, in paise, for the fee being charged. This field is populated only when the transaction moves to the `processing` state. For example, `1`. + This value is returned only when the source entity is `payout`. + +`status` +: `string` The status of the transaction. A transaction can be in any of the following states: + - `pending` + - `queued` + - `processing` + - `processed` + - `reversed` + - `cancelled` + - `rejected` + + This value is returned only when the source entity is `payout`. + +`utr` +: `string` The unique transaction number for the transaction. For example, `HDFCN00000000001`. + This value is returned only when the source entity is `payout`. + +`mode` +: `string` The payout mode. Refer to the [Supported Banks and Payout Modes section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards.md#supported-banks-and-payout-modes) for more details. + This value is returned only when the source entity is `payout`. + +`created_at` +: `integer` Timestamp, in Unix, when the source entity or transaction entity was created. For example, `1545320320`. diff --git a/llm-content/app-store.md b/llm-content/app-store.md new file mode 100644 index 00000000..bbd02f93 --- /dev/null +++ b/llm-content/app-store.md @@ -0,0 +1,18 @@ +--- +title: Razorpay App Store - Discover App Integrations and Extensions +description: Discover Razorpay App Store integrations with popular platforms like Integromat, Slack, and Zapier. Extend your payment capabilities and streamline business workflows. +--- + +# Razorpay App Store - Discover App Integrations and Extensions + +Razorpay App Store is a platform that houses multiple applications that you can use. The App Store provides an ecosystem where you can discover partner and non-partner platforms. This helps businesses grow while extending Razorpay capabilities. + +![Razorpay App Store dashboard showing available app integrations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/app-store.jpg.md) + +## Integrations Available + +You can integrate Razorpay with the below apps: + +- [Integromat](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/app-store/integromat.md) +- [Slack](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/app-store/slack.md) +- [Zapier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/app-store/zapier.md) diff --git a/llm-content/app-store/integromat.md b/llm-content/app-store/integromat.md new file mode 100644 index 00000000..249a0eac --- /dev/null +++ b/llm-content/app-store/integromat.md @@ -0,0 +1,59 @@ +--- +title: Integromat Integration +description: Know how to integrate Razorpay triggers with Integromat to automate your workflows. +--- + +# Integromat Integration + +Integromat is a powerful workflow automation tool that automates manual tasks with a simple drag and drop interface. It enables you to connect multiple web apps to automate your workflows. + + +> **WARN** +> +> +> **Watch Out!** +> +> Only Owners can install this OAuth App and perform the integration. +> + +With the Integromat app, users can integrate Razorpay with other web apps by moving the data automatically using triggers and actions. + +## Use Cases + +Following are a few examples where you can use the Razorpay-Integromat integration: + +- Add newly-captured Razorpay payments to rows in Google Sheets. +- Get an alert through Slack when a payment fails. +- Sync information seamlessly between your accounting apps like Zoho Books or Tally. +- Update your customer data in your CRM tools like Hubspot or Salesforce without any hassle. +- Send automated notifications for new Razorpay payments from popular email automation tools like Mailchimp or Gmail. +- Send SMS messages for new payments made through Razorpay through messaging tools. + +## Prerequisites + +1. Sign up for a [Razorpay account](https://dashboard.razorpay.com/signup). +2. Sign up for an [Integromat account](https://www.make.com/en?fromImt=1). + +## Video Tutorial + +Watch this video to know how to integrate Razorpay Payment Gateway with your Integromat app. + +[Video: https://www.youtube.com/embed/bulBZQZMBEg] + +## Integration Steps + +Follow these steps to integrate your Integromat application with Razorpay: + +1. Click **Create a new scenario** on the top-left of the Integromat Dashboard page. +2. Name your newly created scenario as per your preference. +3. Click the **+** icon and select **Razorpay**. +4. In the available list of triggers, select a trigger based on your use case. For example, **Watch Payment Page Paid**, **Watch Payment Captured**, and so on. +5. On the **Razorpay** webhook event pop-up, select and add a webhook option. +6. On the **Add a hook** pop-up page, provide a webhook name. Click **Add** to provide a connection name. +7. Click **Continue** to connect to your Razorpay account through OAuth. Integromat redirects you to the Razorpay login page. +8. Log in to your Razorpay account. +8. Read through the terms and conditions and select the check box. +9. Click **Authorize**. Once authorised, Razorpay redirects you to the Integromat page. You have successfully linked your account. +10. Click **Save** and **OK**. + +You can repeat the process by choosing from a range of various apps. diff --git a/llm-content/app-store/slack.md b/llm-content/app-store/slack.md new file mode 100644 index 00000000..c97aea66 --- /dev/null +++ b/llm-content/app-store/slack.md @@ -0,0 +1,76 @@ +--- +title: Slack Integration +description: Know how to integrate Slack with Razorpay and get real-time updates regarding payment downtimes. +--- + +# Slack Integration + +Slack is a business communication platform widely used by organisations to communicate with each other. It has multiple channels organised based on teams or topics. The participants can send messages, images, internet links, or videos in the channels. + +> **WARN** +> +> +> **Watch Out!** +> +> - Only Owners can install this OAuth App and perform integration. +> - If other [standard user roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md#standard-user-roles) need to get notifications, they can be added to the Slack channel(s). +> + +You can integrate Razorpay with Slack to get real-time updates regarding payment downtimes. + +## Use Cases + +Get real-time notifications whenever there is payment downtime or when the payment downtime is resolved. + +## Video Tutorial + +Watch this video to know how to integrate your Slack application with Razorpay. + +[Video: https://www.youtube.com/embed/fCncEZiN1xc] + +## Prerequisites + +1. Sign up for a [Razorpay account](https://dashboard.razorpay.com/signup). +2. Sign up for a [Slack account](https://slack.com/intl/en-in/). + +## Integration Steps + +Follow these steps to integrate your Slack application with Razorpay: + +1. Click on the **Slack App** within the Razorpay Appstore. +2. Click **Get Started**. +3. You will be taken to the Slack workspace page, where you need to select the workspace you want to install this app. +4. Select the appropriate workspace and click **Allow**. + + +> **INFO** +> +> +> **Handy Tips** +> +> To proceed further, you need admin access to your workspace. If you are not an admin, you would see a window to request your admin to allow access. +> + +5. After you click **Allow**, you will see a redirection window to your Slack desktop app. +6. Click **Open Slack**. +7. You will see that Razorpay is now officially added as an app to your workspace under Apps section. +8. Now, you need to connect your Razorpay account with your Slack account. +9. Select any of the Slack channels and enter the command `/razorpay connect`. +10. After you enter the command, you will receive a **"Hello"** message along with a **Connect** button. +11. Click **Connect**. You will be redirected to the Razorpay OAuth page. +12. If not logged in, log in to Razorpay OAuth page and click on **Authorize**. + + +> **INFO** +> +> +> **Handy Tips** +> +> To authorise this page, you need to have Owner account access to Razorpay. +> + +14. Once authorised, you will be redirected back to the Slack app where you will see a welcome message which says, "**You have successfully linked your account with Razorpay's Slack app**". +15. Your one time setup is now completed. +16. Enter the command `/razorpay subscribe payment-downtimes` in the channel from which you want to get downtime notifications. + +You will now receive updates from Razorpay in the Slack channel about payment downtimes, downtimes being resolved or any other updates. diff --git a/llm-content/app-store/zapier.md b/llm-content/app-store/zapier.md new file mode 100644 index 00000000..e5c1a0b0 --- /dev/null +++ b/llm-content/app-store/zapier.md @@ -0,0 +1,68 @@ +--- +title: Zapier Integration +description: Know how to integrate Razorpay triggers with Zapier to automate your workflows. +--- + +# Zapier Integration + +Zapier is a powerful tool that allows you to automate tedious tasks by connecting multiple web apps without the need to write a single line of code. + + +> **WARN** +> +> +> **Watch Out!** +> +> Only Owners can install this OAuth App and perform integration. +> + +With the Zapier app, users can integrate Razorpay with other web apps by moving the data automatically using triggers and actions. + +## Use Cases + +Following are a few examples where you can use Razorpay-Zapier integration: + +1. Send automated notifications from popular email automation tools like Mailchimp or Gmail for new Razorpay payments. +2. Update your customer data in your CRM tools like Hubspot or Salesforce without any hassle. +3. Sync information seamlessly between your accounting apps like Zoho Books or Tally. +4. Enrol students in learning courses with new successful payments on Razorpay. +5. Add newly-captured Razorpay payments to rows in Google Sheets. +6. Send SMS messages through messaging tools for new payments made through Razorpay. + +## Video Tutorial + +Watch this video to know how to integrate Razorpay Payment Gateway with your Zapier app. + +[Video: https://www.youtube.com/embed/8dVBLa8PEZs] + +## Prerequisites + +1. Sign up for a [Razorpay account](https://dashboard.razorpay.com/signup). +2. Sign up for a [Zapier account](https://zapier.com/). + +## Integration Steps + +Follow these steps to integrate your Zapier application with Razorpay: + +1. Click **Create Zap** on the top-left of the Zapier Dashboard page. +2. Name your Zap. +3. Search for the Razorpay option in the list of triggers. +4. Select an event based on your use case. +5. Click on **Continue**. +6. Click **Sign in to Razorpay** to connect to your Razorpay account through OAuth. +7. You will see this screen if you are logged in, or else you will be prompted to log in. +8. Once authorised, you will be redirected back to the Zapier page. You are now linked to your account. +9. Click **Continue** to get a sample test trigger. + + +> **INFO** +> +> +> **Handy Tips** +> +> Test trigger is a sample payment that Zapier will pull from your account so that you can continue with the rest of your workflow. +> + +10. To get a test trigger, you need to have at least one successfully captured payment from the recent 1000 payments. + +You can repeat the process by choosing from a range of various apps. diff --git a/llm-content/datasync/faq.md b/llm-content/datasync/faq.md new file mode 100644 index 00000000..817afa79 --- /dev/null +++ b/llm-content/datasync/faq.md @@ -0,0 +1,694 @@ +--- +title: Razorpay DataSync FAQs +description: FAQs on DataSync +--- + +# Razorpay DataSync FAQs + +## Razorpay DataSync - Frequently Asked Questions + +Find answers to common questions about Razorpay DataSync, including technical details, troubleshooting guidance, and operational information. + + +### FAQ 1 + + your answer + + + +### FAQ 2 + + your answer + + +### What is Razorpay DataSync? + +Razorpay DataSync is a data streaming platform that enables businesses to transfer payment, transaction, and settlement data directly to their data warehouses, either in real-time (for unprocessed data) or with latency (for processed data). + +DataSync automates data handling, reduces operational overhead, and eliminates the need for manual report downloads and uploads. + +### How does Razorpay DataSync work? + +DataSync streams both raw and processed data from Razorpay's systems to your data warehouse (Snowflake, Redshift, BigQuery, or Kafka). + +**For Processed Data:** +- Razorpay processes and structures the data +- System shares data to your warehouse via secure private network +- System delivers updates with 24-hour latency +- Zero integration effort required from your end + +**For Real-time Data:** +- System captures raw transaction events in real-time +- Kafka infrastructure streams data +- Data available in less than 1 minute +- Requires ETL setup if consuming from Kafka + +This process automates data handling, reduces latency, and ensures data security, accuracy, and integrity. + +### What capabilities does DataSync provide? + +**For Real-time Data Sync:** +- Instantaneous access to data (less than 1 minute) +- No API integration needed +- Real-time transaction monitoring +- Fraud detection capabilities + +**For Processed Data Sync:** +- Zero integration effort (no engineering/DevOps support needed) +- Quick setup: Less than an hour for POC, less than a day for full setup +- No manual downloads/uploads from dashboard or S3 +- Automated report delivery +- Secure data transfer process + +### How does DataSync differ from manual processes? + +**Manual Process:** +- Download reports from dashboard +- Manually upload to data warehouse +- Process and clean data +- High manual effort +- Significant operational overhead + +**DataSync:** +- Direct streaming to warehouse +- Automated processing and delivery +- Minimal human intervention +- Real-time access option available +- Secure private network transfer + +DataSync provides data streaming directly to your warehouse, reducing manual errors, operational complexity, and processing overheads. + +--- + +## Technical Questions + +### What types of data can DataSync stream? + +**Processed Datasets:** +- Reporting data and fact files +- Optimiser data +- Reconciliation SaaS data +- Settlement information +- Custom reporting datasets + +**Real-time Raw Data:** +- Payment events +- Transaction data +- Settlement events +- Status updates +- Refund information +- Dispute data + +Stream all data to Snowflake, Redshift, BigQuery, or Kafka based on your preference. + +### Which data warehouses and destinations does DataSync support? + +**For Processed Data:** +- Snowflake (self-serve onboarding) +- Redshift (self-serve onboarding) +- BigQuery (manual setup via support) + +**For Real-time Data:** +- Kafka cluster +- Snowflake +- Redshift +- BigQuery + +### How does DataSync handle data security? + +DataSync implements multiple layers of security: + +**Encryption:** +- Razorpay encrypts data in transit using TLS 1.2+ +- Razorpay encrypts data at rest in your warehouse +- System uses secure private network for all transfers + +**Authentication:** +- Warehouse-level authentication protocols +- Role-based access control +- Dedicated data isolation per merchant + +**Privacy:** +- No PII (Personally Identifiable Information) transmitted +- Data ownership remains with merchant +- GDPR and data protection compliant +- Complete audit trail for compliance + +**Network Security:** +- Transfer over secure private network +- No data exposure to public internet +- Dedicated connections for enterprise customers + +### What latency does DataSync provide for data streaming? + +**Processed Data:** 24-hour delay from transaction time + +**Real-time Data:** Less than 1 minute from transaction occurrence + +Latency depends on whether you need processed (structured and cleaned) or raw (unprocessed) data. + +### What system requirements must I meet to use DataSync? + +**For Processed Data (Must Have):** + +**Snowflake:** +- Active Snowflake account +- Account ID +- Permission to accept data shares + +**Redshift:** +- AWS Account ID +- Cluster must be: + - Serverless, OR + - ra3 instance type with encryption enabled +- Permission for cross-account access + +**BigQuery:** +- Active BigQuery account +- Ability to deploy a script (minimal DevOps effort) +- Contact support for setup + +**For Real-time Data:** + +**Kafka Option:** +- Dedicated Kafka cluster +- ETL jobs to extract data from cluster +- Development resources for integration + +**Warehouse Option:** +- Same requirements as processed data above +- No additional ETL infrastructure needed + +--- + +## Implementation Questions + +### How long does DataSync implementation take? + +**Processed Data Sync:** +- POC setup: Less than 1 hour +- Full setup: Less than 1 day +- First data delivery: Within 24 hours of activation +- Engineering effort from your end: Zero + +**Real-time Data Sync:** +- Full implementation: 2-3 weeks +- Includes: Initial setup, configuration, testing, and go-live +- First data delivery: Immediate after go-live +- Engineering effort: ETL setup required if using Kafka + +Timeline may vary based on specific requirements, existing infrastructure, and customisation needs. + +### How does the integration process work? + +**For Processed Data (Self-Serve):** +1. Access DataSync from Razorpay Dashboard +2. Select warehouse destination (Snowflake/Redshift) +3. Enter warehouse credentials +4. Select datasets and MIDs +5. Accept sample data share in your warehouse +6. Verify connection and activate +7. Data sync begins within 24 hours + +Razorpay's technical team handles all backend configuration automatically. + +**For Real-time Data (Manual Setup):** +1. Contact DataSync support team +2. Share warehouse details or Kafka cluster information +3. Technical team configures streaming pipeline +4. Connection testing with sample data +5. ETL setup (if consuming from Kafka) +6. Full activation after successful testing + +For BigQuery syncs, deploy a script at your end (minimal DevOps effort). + +### Can I customise DataSync configuration? + +Yes, DataSync offers flexibility in several areas: + +**Customisable Options:** +- Dataset selection (reporting, optimiser, reconciliation, settlements, etc.) +- MID selection for multi-account organisations +- Data retention periods +- Sync frequency +- Data encryption options + +**Enterprise Customisation:** +- Custom data transformations +- Advanced filtering logic +- Multi-region support +- Custom approval workflows +- Integration with internal systems + +Contact support to discuss specific customisation requirements. Additional costs may apply for advanced customisations. + +### Does DataSync offer a trial period or POC? + +Yes, DataSync offers a **1-month Proof of Concept (POC)** for evaluation. + +**POC Details:** +- Full feature access +- Sample data sync to your warehouse +- Technical support included +- No long-term commitment +- Evaluate setup and data quality + +**POC Timeline:** +- Processed data: POC setup in less than 1 hour +- Real-time data: POC setup in 2-3 weeks + +Contact support to request a POC. + +--- + +## Use Cases + +### What are common use cases for DataSync? + +**Real-time Transaction Monitoring** +- Monitor payment success rates +- Track settlement timelines +- Alerts for failed transactions + +**E-commerce Order Processing** +- Verify payment before order fulfilment +- Reduce COD failures +- Automated order confirmation + +**Fraud Detection** +- Build custom fraud detection models +- Monitor suspicious patterns in real-time +- Immediate corrective actions + +**Reconciliation** +- Automated daily reconciliation +- Eliminate manual downloads and uploads +- Faster financial closing + +**Data Access & Analytics** +- Direct access in existing BI tools +- Custom SQL queries on payment data +- Build dashboards without data migration +- Real-time reporting + +**Infrastructure Optimisation** +- No API integration maintenance +- Reduced ETL pipeline costs +- Lower operational overhead + +--- + +## Pricing & Commercial Questions + +### What pricing model does DataSync use? + +Contact Support to know about the different subscription plans and pricing. + +Pricing depends on: +- Transaction volume +- Selected datasets +- Destination warehouse +- Subscription duration + +Reach out to your account manager or DataSync support for detailed pricing information based on your specific requirements. + +### Are there additional costs associated with DataSync? + +Additional costs may apply for: +- Advanced customisation beyond standard features +- Enhanced support packages +- Extended data retention periods +- Historical data backfill +- Multi-region deployments +- Custom data transformations + +Standard pricing covers: +- Self-serve onboarding +- Standard dataset syncs +- 90-day data retention +- Standard support +- Regular feature updates + +Contact support for detailed pricing on additional features. + +### How does billing work? + +**Payment Integration:** +- System automatically deducts fees from monthly settlements or merchant balance with Razorpay +- Seamless integration with existing billing + +**Billing Cycles:** +- Monthly or annual subscriptions available +- Annual subscriptions typically offer discounts +- Flexible billing terms for enterprise customers + +**Invoicing:** +- Monthly invoices via Razorpay Dashboard +- Detailed usage breakdown +- GST included in all pricing + +--- + +## Support & Troubleshooting + +### Who should I contact for issues, queries, or support? + +**Primary Contacts:** + +**Product Team:** +- Aditi Maheshwari: aditi.maheshwari@razorpay.com + +**Data Engineering Team:** +- Narendra Kumar: narendra.kumar@razorpay.com + +**Escalations:** +- Vivek Agarwal: vivek.agarwal@razorpay.com +- Anand A: anand.na@razorpay.com +- Vijaypal Singh: vijaypal.singh@razorpay.com + +**General Support:** +- Email: datasync-support@razorpay.com +- Dashboard: Raise tickets directly from DataSync dashboard + +### What support does Razorpay provide? + +**During Implementation:** +- Setup assistance +- Configuration guidance +- Testing support +- Sample data validation +- Connection troubleshooting +- Documentation and training materials + +**Post-Implementation:** +- Ongoing technical assistance +- Troubleshooting and debugging +- Performance optimisation guidance +- Configuration change support +- Regular product updates +- Feature enhancement guidance + +**Support Channels:** +- Email support +- Dashboard-based ticket system +- Documentation portal +- For enterprise: Dedicated account manager + +### What should I do if my sync fails? + +**Immediate Steps:** + +1. **Check Dashboard Status:** + - View error message in DataSync dashboard + - Review sync history logs + - Check for pattern in failures + +2. **Verify Warehouse Connectivity:** + - Ensure warehouse is accessible + - Check credentials haven't changed + - Verify network connectivity + +3. **Review Recent Changes:** + - Check if warehouse configuration changed + - Verify permissions remain valid + - Confirm no infrastructure changes + +4. **Retry Connection:** + - Dashboard provides retry option + - System automatically retries transient failures + - Manual retry available for persistent issues + +5. **Contact Support:** + - If issue persists after retries + - Provide error logs from dashboard + - Share recent configuration changes + +**Common Causes:** +- Warehouse credentials expired or changed +- Network connectivity issues +- Warehouse capacity or performance issues +- Permission changes in warehouse +- Maintenance windows + +### Why am I not seeing expected data in my warehouse? + +**Troubleshooting Checklist:** + +1. **Verify Configuration:** + - Check that expected MIDs are selected + - Confirm datasets include the data you need + - Review sync frequency settings + +2. **Check Sync Status:** + - Ensure sync completed successfully + - Review last successful sync timestamp + - Check for failed syncs in history + +3. **Confirm Data Timing:** + - Processed data has 24-hour latency + - Check transaction timestamps vs sync time + - Verify data falls within selected date range + +4. **Review Warehouse:** + - Verify you're querying correct database/schema + - Check data share was accepted properly + - Confirm permissions to view data + +5. **Validate Data Retention:** + - Check if data exceeds retention period + - Review retention policy in configuration + +**Still Not Resolved?** + +Contact support with: +- Missing data details (date range, MIDs, dataset) +- Sync history logs +- Example query you're running + +### How do I optimise DataSync performance? + +**Best Practices:** + +**1. Select Only Needed Datasets:** +- Reduce sync scope to essential datasets +- Remove unused datasets from configuration +- Improves sync speed and reduces costs + +**2. Optimise Warehouse:** +- Ensure adequate warehouse capacity +- Optimise table structures and indexes +- Consider warehouse scaling for large volumes + +**3. Configure Appropriate Sync Frequency:** +- Align frequency with business needs +- More frequent syncs increase load +- Daily is recommended for most use cases + +**4. Monitor Usage Metrics:** +- Review dashboard performance metrics +- Track sync duration trends +- Identify and address anomalies + +**5. Manage MID Selection:** +- Include only active merchant accounts +- Remove dormant MIDs +- Reduces data volume and improves performance + +**For Enterprise:** +- Contact support for performance review +- Discuss infrastructure optimisation +- Consider dedicated sync infrastructure + +### What happens if my warehouse is temporarily unavailable? + +**Automatic Retry:** +- DataSync automatically retries failed deliveries +- Multiple retry attempts over several hours +- Exponential backoff to avoid overwhelming warehouse + +**Data Queuing:** +- System queues data during warehouse downtime +- System delivers data once warehouse becomes available +- No data loss during temporary outages + +**Notification:** +- System sends alert when sync failures occur +- Status visible in dashboard +- Email notification for extended outages + +**Resolution:** +- Once warehouse is back online, acknowledge in dashboard +- System automatically resumes sync +- System delivers backfill for missed data in next cycle + +**Best Practices:** +- Schedule warehouse maintenance during low-activity periods +- Notify DataSync support of planned downtime +- Monitor sync status after maintenance + +--- + +## Data & Configuration Questions + +### Can I sync to multiple warehouses simultaneously? + +No, each Razorpay account syncs to only one warehouse destination at a time. + +**To Switch Warehouses:** +1. Delete existing DataSync configuration +2. Data syncing stops immediately +3. Create new configuration for different warehouse +4. Complete setup and activation process +5. Sync begins to new destination + +**Important Notes:** +- Historical data remains in old warehouse +- No automatic migration of data between warehouses +- New sync starts fresh in new destination +- Consider backfill options for historical data (contact support) + +### Can I customise which data fields DataSync syncs? + +**Dataset-Level Selection:** Yes, select which datasets to sync (payments, settlements, refunds, etc.) + +**Field-Level Customisation:** Limited in self-serve. For specific field selection or custom transformations, contact support for enterprise customisation options. + +**MID-Level Filtering:** Yes, select specific merchant IDs to include in sync. + +### What data retention period does DataSync provide? + +**Standard Retention:** 90 days in your warehouse + +**Extended Retention:** Available upon request (additional costs may apply) + +**In Your Warehouse:** Data persists according to your warehouse's own retention policies after DataSync delivers it. + +**Historical Backfill:** Contact support for access to historical data beyond the standard retention period. + +### Can I get historical data backfilled? + +Yes, historical data backfill is available. + +**Process:** +1. Contact DataSync support +2. Specify date range needed +3. Receive pricing quote (based on data volume) +4. Approve and schedule backfill +5. System delivers data to your warehouse + +**Use Cases:** +- New DataSync setup requiring historical context +- Switching warehouses +- Data loss or migration scenarios +- Building historical analytics models + +### How do I handle sensitive data or PII? + +**DataSync Privacy Measures:** +- No PII transmitted through streaming process +- System masks payment instrument details +- System excludes customer personal information +- Compliance with GDPR and data protection regulations + +**In Your Warehouse:** +- You control access to synced data +- Implement warehouse-level security policies +- Apply encryption and access controls +- Follow your organisation's data governance policies + +**For Additional Security:** +- Contact support for custom data masking +- Discuss field-level encryption options +- Implement row-level security in warehouse + +--- + +## Future Developments + +### What new features does Razorpay plan for DataSync? + +**Upcoming Enhancements:** + +**Additional Destinations:** +- More cloud platforms and regions +- Additional BI tools integration +- Extended warehouse support + +**Self-Serve Improvements:** +- BigQuery self-serve onboarding +- Kafka self-serve setup +- Enhanced UI for configuration management + +**Feature Additions:** +- Improved customisation options +- Advanced filtering and transformation +- Real-time monitoring dashboards +- Enhanced alerting capabilities + +**Optimisation:** +- Further reduction in latency +- Improved data transfer efficiency +- Enhanced scalability +- Performance improvements for high-volume merchants + +The product roadmap evolves based on merchant feedback and market needs. + +--- + +## Getting Started + +### How do I get started with DataSync? + +**Step-by-Step:** + +1. **Verify Prerequisites:** + - Ensure you have Snowflake, Redshift, BigQuery, or Kafka + - Confirm your infrastructure meets technical requirements + - Gather necessary credentials + +2. **Access Dashboard:** + - Log in to Razorpay Dashboard + - Navigate to Settings → Data & Reports → DataSync + +3. **Start Onboarding:** + - Click "Get Started" + - Follow self-serve wizard for Snowflake/Redshift + - For BigQuery/Kafka, contact support + +4. **Complete Setup:** + - Enter warehouse credentials + - Select datasets and MIDs + - Accept sample data share + - Verify and activate + +5. **Monitor & Use:** + - Data available within 24 hours + - Access from your warehouse + - Build analytics and reports + +**Need Help?** +- Email: datasync-support@razorpay.com +- Request demo or POC +- Contact your account manager + +--- + +## Additional Resources + +### Where can I find more information? + +**Documentation:** +- [DataSync Overview](#) +- [Dashboard Guide](#) +- Technical specifications (contact support) + +**Support:** +- Email: datasync-support@razorpay.com +- Dashboard: Raise ticket from DataSync section +- Account manager for enterprise customers + +**Learning Resources:** +- Best practices guide (contact support) +- Integration examples and templates + +For questions not covered here, contact the DataSync support team. diff --git a/llm-content/developer-tools.md b/llm-content/developer-tools.md new file mode 100644 index 00000000..950c8be6 --- /dev/null +++ b/llm-content/developer-tools.md @@ -0,0 +1,37 @@ +--- +title: Developer Tools +description: Discover essential developer tools documentation, including webhooks, security, and error handling. Optimise integration and ensure data integrity effortlessly. +--- + +# Developer Tools + +Set up and use the Razorpay Model Context Protocol (MCP) server to integrate Razorpay APIs with AI tools. + + + + Install the Razorpay n8n Community Node to automate payment workflows and integrate Razorpay APIs with n8n. + + + + Access the llms.txt file for LLM agents to understand and integrate with Razorpay documentation. + + + + Understand API error reasons and how to resolve them using our comprehensive Error documentation. + + + + Set up Razorpay Webhooks to receive real-time notifications about specific events that occur within your Razorpay account. + + + + Know about the security measures Razorpay takes to ensure data safety and confidentiality. + + +Access the llms.txt file for LLM agents to understand and integrate with Razorpay documentation. + +Understand API error reasons and how to resolve them using our comprehensive Error documentation. + +Set up Razorpay Webhooks to receive real-time notifications about specific events that occur within your Razorpay account. + +Know about the security measures Razorpay takes to ensure data safety and confidentiality. diff --git a/llm-content/engage.md b/llm-content/engage.md new file mode 100644 index 00000000..62b0aac3 --- /dev/null +++ b/llm-content/engage.md @@ -0,0 +1,97 @@ +--- +title: Razorpay Engage +description: Razorpay Engage transforms your customer acquisition and retention strategy through an integrated loyalty ecosystem. +--- + +# Razorpay Engage + +The **Razorpay Engage** suite of products is a comprehensive customer engagement and loyalty platform designed to address rising customer acquisition costs and retention challenges in a sustainable and efficient way. It is aimed at enabling merchants, banks and payment service providers to acquire and retain customers through targeted incentives and rewards. Its three-way network enables merchants to reach bank customers, banks to promote services at merchant touchpoints and brands to cross-engage with complementary audiences. + +The **Engage** suite encompasses 2 primary product categories - **Engage Retention Engine** and **Gift Cards**, which work together to create a powerful customer engagement ecosystem. + + - **Engage Retention Engine**: Credit redeemable loyalty points to customer wallets using Engage Retention Engine + + - **Gift Cards**: Issue, distribute and manage Gift Cards across multiple channels using Razorpay Gift Cards. + +## Engage Retention Engine + +The [Engage Retention Engine](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/engage/retention-engine.md) consists of 2 sub-products, Wallets and Loyalty Rewards, which operate by crediting redeemable loyalty points to customer wallets. It is a customer retention mechanism wherein the system automatically creates digital wallets at first purchase and credits loyalty points for each transaction to retain customers. + +### How Retention Engine Works + + 1. Submit a [request form](https://razorpay.typeform.com/Engage?typeform-source=razorpay.com), get your eligibility assessed and receive custom wallet program configurations tailored to your business needs. + + 2. Choose your preferred integration method (API, Standard/Magic Checkout or POS System) to enable wallet functionality in your business ecosystem. + + 3. Create different wallet types, define rules and set up credit distribution through refunds, promotions or event-based triggers. + + 4. Enable customers to view their wallet balance, receive credit notifications and use wallet payments during checkout, optionally combined with other payment methods. + + 5. Track wallet usage, redemption rates and program performance through the Razorpay Dashboard to continuously improve your retention strategies. + + +### Features + + - Instant Wallet credits. + - Option to redeem accumulated Loyalty Points during checkout. + - Frictionless checkout experience for repeat customers. + - Consistency across all sales channels (online, in-app and in-store), making it easy to maintain Wallet balances seamlessly across touchpoints. + - Direct Wallet recharge or top-up option for customers, imparting a better checkout experience. + + + +### Advantages + + - Integrate seamlessly with your existing Razorpay Payment Gateway to incentivise repeat purchases, streamline refunds and reward loyalty points. + - Create branded wallet systems that serve as a store of value for refunds, cashbacks and promotional credits, enabling seamless payments and loyalty experiences. + - Recapture potentially lost revenue by redirecting refunds to customer Wallets instead of their original payment method, keeping funds within your ecosystem. + - Deliver instant refunds, eliminating the wait and hassle of tracking refund status or bank credits. + - Design personalised promotional campaigns for your customers rather than generic discount codes for everyone, without the hassle of copy-pasting discount codes. + - Create event-based rewards that automatically credit your customers; with explicit rules for credits, debits and expiration for specific customer behaviours and actions. + + + +## Gift Cards + +**Gift Cards** is an end-to-end automated Gift Card lifecycle management system offering a comprehensive platform that helps businesses to create and manage gift card programs for their customers. It helps reduce operational costs by up to 70% while expanding distribution reach through Razorpay's network of 5M+ business owners and 160M+ consumers. + +> **WARN** +> +> +> **Watch Out!** +> +> Please submit a [request](https://razorpay.typeform.com/Engage?typeform-source=razorpay.com) to avail the Gift Cards feature. Our support team will reach out to you. +> + +### How Gift Card Works + + 1. Submit a [request](https://razorpay.typeform.com/Engage?typeform-source=razorpay.com) and get your eligibility assessed. + + 2. Configure Gift Card programs with categories, denominations, validity periods and business rules through the intuitive dashboard interface. + + 3. Onboard resellers with dedicated portals, fund allocations and automated approval workflows for streamlined partner management. + + 4. Handle bulk Gift Card orders through automated workflows with CSV upload capabilities and customisable messaging for recipients. + + 5. Automatically distribute Gift Cards via multiple channels and link them directly to recipient wallets for instant accessibility. + + 6. Monitor real-time analytics including issuance patterns, utilisation rates, breakage analysis and reseller profitability for continuous optimisation. + + + +### Features + + - Centralised business dashboards for brands and resellers with role-based access control, enabling secure management across different user personas and organisational levels. + - Comprehensive analytics on your dashboard with breakage analysis, reseller profitability insights, effective discount calculations and program performance metrics. + - Automated approval processes with exception handling, preventing accidental errors and ensuring proper authorisation for high-value transactions and discount changes. + - Automated generation of issuance, redemption, fund utilisation and commission reports with downloadable formats and scheduled email delivery options. + + +### Advantages + + - Streamline bulk Gift Card creation with batch processing capabilities, eliminating manual touchpoints and reducing processing time from days to minutes. + - Create customised Gift Card programs tailored to specific business lines and categories, with configurable denomination ranges, validity periods and discount parameters. + - Manage escrow funds with real-time tracking, virtual accounts for faster settlements and automated budget utilisation monitoring across resellers. + - Analyse behaviour, detect fraud and prevent gift card abuse by setting automated alerts for suspicious activities. + - Integrate seamlessly with native checkout systems, digital wallet linking and multi-channel delivery via email, SMS and WhatsApp for seamless user experience. + - Enable resellers to independently manage programs, update configurations and access reports through dedicated portals, reducing operational overhead. diff --git a/llm-content/engage/retention-engine.md b/llm-content/engage/retention-engine.md new file mode 100644 index 00000000..d8502b2b --- /dev/null +++ b/llm-content/engage/retention-engine.md @@ -0,0 +1,75 @@ +--- +title: Razorpay Engage Retention Engine for Shopify +heading: Engage Retention Engine +description: Know more about the Razorpay Engage Retention Engine for Shopify merchants. +--- + +# Engage Retention Engine + +The **Razorpay Engage Retention Engine** is a customer retention mechanism consisting of **Digital Wallets** and **Loyalty Points**, helping you to retain customers in your ecommerce ecosystem. This powerful platform seamlessly integrates with your existing Razorpay Payment Gateway to incentivise repeat purchases, retain customers, streamline refunds and reward loyalty points while enhancing payment experiences and transforming one-time buyers into loyal customers. + +### How Wallets Work + +- Branded Store Wallets are created automatically for customers during the first purchase. +- During an instance of refund, the customer gets an option to choose between refund to wallet or source account. Choosing refund to wallet makes the process quicker and seamless as the customer is spared from checking the bank account and waiting for refund credits. Refunds are instant whereas refund to source may take up to 7 days. +- Wallet balance appears as payment option during purchase which saves the time and process of having to route payments through cards, netbanking or UPI. + +### How Loyalty Points Work + +- Customer wallets are credited with reward points for each purchase based on the campaign rules set through your Dashboard. +- Cashback credits are added to customer wallets for reviews and engagement as per the rules you set. +- Customers redeem the accumulated points for future purchases during checkout. + +> **WARN** +> +> +> **Watch Out!** +> +> This feature is currently enabled for Shopify merchants only. +> + +### Get Started + +1. Request access through our [eligibility form](https://razorpay.typeform.com/Engage?typeform-source=razorpay.com). +2. Configure Wallet programs based on your business needs. +3. Receive program ids for your custom retention strategy. +4. Enable in Shopify through Magic Checkout integration. +5. Launch and monitor performance through the Razorpay Dashboard. + +### Features + + + Create personalised promotional campaigns with one-click redemption of points, improving checkout experience and conversion rates over traditional discount codes. + - Launch targeted wallet-based campaigns that deliver 25-30% higher conversion rates than traditional discount codes, with controlled stacking to prevent double discounts. + - Enable bulk crediting of points through batch actions and set customised expiration periods (30–90 days) to drive urgency. + - Enhance tracking with clear visibility into promotional credit usage and ROI. + + + Seamlessly integrate our Magic Checkout with existing Shopify setup to automate reward distribution, tracking and eliminate manual intervention. + - Automatically display wallet option at checkout with real-time balance updates during the customer journey. + - Support split payments (wallet + card/UPI) for partial redemption. + - Provide a seamless, mobile-optimised experience across all devices. + - Enable wallet usage across online stores, apps and physical locations. + + + Transform refunds from lost revenue into future sales opportunities. When customers request refunds, redirect funds to their branded wallet instead of their original payment method. + - Increase customer retention by supporting refunds to wallets for purchases made via any payment method. + - Enhance customer experience with immediate store credit, instant refunds to wallets and wallet recharge/top-up option, with support for multiple balance types (example, Cash Wallet, Promotional Wallet). + - Set validity period (recommended 180+ days) with minimal usage restrictions. + + + Create dynamic reward systems that automatically credit customers for specific behaviours without manual intervention. Reward customers automatically for key actions: + + **Event-based Rewards** + - Set Event-based rewards including welcome bonuses, purchase cashback (for example - 2%) and engagement incentives for reviews, app downloads and profile completion. + - Set milestone rewards for spending thresholds or purchase frequency, with real-time processing and instant reward crediting. + + **Advanced Features** + - Offer predictive rewards that show potential earnings before purchase and support multi-balance structures for different reward types. + - Run seasonal campaigns with time-bound reward multipliers. + + +Contact our [Support Team ](https://razorpay.com/support/)to explore how the Engage Retention Engine can transform your Shopify store's customer loyalty strategy. + + ### Related Information + [Shopify Wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/engage/retention-engine/shopify-wallets.md) diff --git a/llm-content/engage/retention-engine/shopify-wallets.md b/llm-content/engage/retention-engine/shopify-wallets.md new file mode 100644 index 00000000..b2b2030b --- /dev/null +++ b/llm-content/engage/retention-engine/shopify-wallets.md @@ -0,0 +1,149 @@ +--- +title: Set Wallet Campaigns for Shopify Merchants +heading: Shopify Wallets +description: Set up Wallet Campaigns for yours customers in your Shopify Dashboard. +--- + +# Shopify Wallets + +You can create branded Digital Wallets for your customers to enhance payment experience, streamline refunds and transforming one-time buyers into loyal customers. + +Wallets are created when the customer makes the first purchase. Post purchase, if the customer wants to return the product and claim refund, wallets help in making refunds quicker and seamless. It also helps recapture lost revenue by parking funds in a wallet which the customer can use for subsequent purchases. + +In addition to this, you can also create campaigns and set rules to credit customer wallets with loyalty points. + +> **WARN** +> +> +> **Watch Out!** +> +> This feature is currently enabled for Shopify merchants only. +> + +## Set Up Campaigns +Set up loyalty rewards campaigns, add loyalty points and set rules for earning and using points in your Shopify Dashboard. + +1. Log in to the Dashboard. +2. Go to the Payments tab and click **Wallets** under **Loyalty Products**. +4. Click **+ New Campaign** in the **Campaigns** tab. +5. Enter the campaign name of your choice. For example, `Freedom Sale`. + ![Create Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/newcampaign.jpg.md) +6. Choose **Trigger Based Campaign**. **Trigger Based Campaign** adds points whenever a particular event is triggered. For example, if you want to credit your customer with points based on the order value and set redemption rules, you can set it up using the **Trigger Based Campaign** feature. + ![Campaign Trigger](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/triggerhome.jpg.md) +6. Click **Create Campaign** to go to the **Trigger Based** campaign home page and set up the rules for the campaign. + +### Trigger Based Campaign + Set up a Trigger-Based campaign by performing the following steps: + + + +### 1. Trigger & Action + + Follow the steps below to set up an event which triggers an action. All fields in **Trigger** and **Action** are mandatory. Check the example tab for detailed illustration. + + + 1. Under **If this happens**, choose one of the events (`order_placed`, `order_fulfilled` or `wallet_credited`) from the dropdown list. + 2. Click **+ Add Attributes**, if required, to create additional attributes (conditions) to the selected event to ensure that points get added only if all the conditions are fulfilled. + - You can add one or more attributes for a particular event. + - You can also have nil attributes. + 3. After setting up the trigger event, you can now set up the action to follow under **Do this**. + + + 1. Click **+ Action** under **Do this**. + 2. Select the default container and program combination `Credit_Wallet` and `Container_PPI_Program`. The other fields are displayed. + 3. Select `Flat` or `Percentage` in **Credit Type** depending on your choice. + - Select **Flat** to credit a fixed amount to the customer wallet for every trigger event (and attributes, if any) + - Select **Percentage** if you wish to credit the wallet with a percentage of the trigger event value. + 4. Enter the flat/percentage value of your choice in the **Credit Amount** field. Event is auto-populated. Select the required attribute from the adjacent dropdown list. + 5. Enter a value of your choice in the **Max credit** field if you wish to cap the maximum points that can be credited to the customer wallet per transaction to control your wallet budget. Select **No Max Limit** checkbox if you do not wish to keep a limit. The **Max credit** field will be disabled automatically. + 6. Click **Next** to go to **Burn Rules**. + + + Consider you want to ensure that all orders above ₹1,000 qualify for reward points. You also want 1% of all order values of the customer to be credited to the wallet, with a maximum cap of 100 points per order. Here placing of the order acts as the event which triggers the action of crediting the customer wallet. + 1. In the **Trigger Event**, under **If this happens**, select `order_placed` event and click **+ Add Attributes** to add `order.amount`, `is greater than` and `1000` as attributes. + 2. In **Action**, under **Do this**, select the default options `Credit_Wallet` and `Container_PPI_Program`. + 3. Select **Credit type** as **Percentage**. + 4. In the **Credit amount** field, enter 1. The next field automatically populates the event you had set up, that is, `order_placed`. + 5. Select the attribute `order_amount` from the next dropdown and click **Next**. + You have now succesfully set up a trigger event and action where the customer wallet will be credited with 1% of order amount, wherever the order value exceeds ₹1000, upto a maximum of 100 points per order transaction. + + + + + +### 2. Burn Rules + + Follow the steps below to set rules for burning (using) the points acquired by your customer. The unused points/amount accumulated in the customer wallet expire after the validity period you set here. You can also set a minimum order value above which the wallet amount can be used. + 1. Under **Points expire after**, enter the number of days/months/years in the first field and select one of `Days/Months/Years` from the dropdown list. + 2. Enter a value of your choice in the **Minimum order value** field (>= ). This ensures that the customer can use the points only for a minimum order value set by you. Click **Next**. + ![Burn Rules](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/burn.jpg.md) + + + +### 3. Campaign Settings + + Set campaign start and end time, campaign amount limits and user limits by following the steps below. There are 3 sections here, namely, **Campaign Schedule**, **Campaign Limits** and **User Limits**. + + + + Set the preferred schedule of your campaign. All wallet credit actions will take place only within the schedule set here. + 1. Select a date of your choice in the **Starts From** field, click **Apply**, and select a time from the **At** dropdown list. + 2. Select the **Start Immediately** checkbox if you want to start the campaign immediately. Selecting this option disables the **Starts From** and **At** fields. + 3. Select a date of your choice in the **Ends On** field, click **Apply**, and select a time from the **At** dropdown list. + 4. Select the **No End Date** checkbox if you want the campaign to continue throughout. Selecting this option disables the **Ends On** and **At** fields. + ![Campaign Schedule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/campaignschedule.jpg.md) + + + **These limits are applicable for the consolidated amount and actions for all the customer wallets, and not for individual ones.** Once set, these limits apply to the entire campaign. The campaign will pause if one of these limits are breached and no further rewards will be credited. Setting limits helps to keep your wallet budget in check and also put a check on large number of small value transactions customers may do to avail campaign benefits. + 5. Click the **Limit total amount credited** checkbox to if you wish to cap the total wallet amount. The **Max amount** and **Applies** fields gets enabled. + 6. Enter an amount of your choice in the **Max amount** field, limiting the maximum amount that can be accumulated in all the wallets put together. + 7. Select one from `Daily/Weekly/Monthly/Yearly/Till Campaign Ends` in the **Applies** dropdown list to set this limit for a period. + 8. Click the **Limit no.of actions performed** checkbox if you wish to cap the number of total wallet credit transactions. The **Max actions** and **Applies** fields gets enabled. + 9. Enter a figure of your choice in the **Max actions** field, limiting the maximum number of transactions. + 10. Select one from `Daily/Weekly/Monthly/Yearly/Till Campaign Ends` in the **Applies** dropdown list to set the limit for a period. + ![Campaign Limits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/campaignlimits.jpg.md) + + + These limits apply to individual users. When breached, the campaign will stop crediting rewards to that user. + 1. Select the **Limit total amount credited per user** checkbox if you wish to cap wallet points accumulation per customer. The **Max amount** and **Applies** fields gets enabled. + 2. Enter an amount of your choice in the **Max amount**. The customer wallet will not be credited beyond this limit even if eligible otherwise. + 3. Select one from `Daily/Weekly/Monthly/Yearly/Till Campaign Ends` in the **Applies** dropdown list to set this limit per period. + 4. Click the **Limit no.of actions per user** checkbox if you wish to cap the number of wallet credits for a customer and put a check on large number of small value transactions customers may do to avail campaign benefits. The **Max actions** and **Applies** fields gets enabled. + 5. Enter a figure of your choice in the **Max actions** field, limiting the maximum number of transactions per user. + 6. Select one from `Daily/Weekly/Monthly/Yearly/Till Campaign Ends` in the **Applies** dropdown list to set this limit per period and Click **Next**. + ![Campaign User Limitse](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/campaignuserlimits.jpg.md) + + + + + + +### 4. Review & Publish + + Review the set campaign rules and publish the campaign. + 1. Check the **Trigger & Action** section to review the trigger events and actions you set for the campaign. + 2. Review the rules set for burning the points under the **Burn Rules** section. + 3. Review the campaign schedule, campaign limits and user wise limits under the **Campaign Settings** section. + 4. Click **Publish Campaign** once you verify all of the above and confirm on the pop-up modal. + + + +### Pause or Stop Campaign + + Once you have published the campaign, it is listed in your Wallets home page. + Use the pause or stop button against the campaign to either pause your campaign temporarily or stop it permanently. + + + +> **WARN** +> +> +> **Watch Out!** +> - Paused campaigns can be restarted anytime by clicking the resume button against them. +> - Campaigns once stopped cannot be restarted. +> + +### Related Information + +- [Razorpay Engage](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/engage.md) +- [Engage Retention Engine](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/engage/retention-engine.md) diff --git a/llm-content/errors.md b/llm-content/errors.md new file mode 100644 index 00000000..8195a590 --- /dev/null +++ b/llm-content/errors.md @@ -0,0 +1,72 @@ +--- +title: About Errors +description: Check the errors returned in the API responses from Razorpay. +--- + +# About Errors + +Razorpay APIs, when fired, can have either a successful response or a failure response. All successful Razorpay API responses return with HTTP Status code 200. In case of failure, a JSON error response is returned with the relevant error parameters. + +This error response helps to: +- Map and analyse top failure reasons. +- Identify the source of failure. It can be due to customer action or external factors (Razorpay, Gateway, Bank or Network). +- Identify the payment step and the exact failure reason. Display valid responses and provide meaningful next steps to your customers. + +## Error Structure + +The error response contains `code`, `description`, `field`, `source`, `step`, `reason` and `metadata` parameters that help diagnose and solve the error. + +### Sample Code + +In this sample code, see the `description`, `source`, `step` and `reason`, indicating that the API failed due to authentication failure for incorrect OTP. + +You can notify your customer and ask them to retry the payment with the correct OTP at Razorpay Checkout. + +```json: Sample Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect otp", + "field": null, + "source": "customer", + "step": "payment_authentication", + "reason": "invalid_otp", + "metadata": { + "payment_id": "pay_EDNBKIP31Y4jl8", + "order_id": "order_DBJKIP31Y4jl8" + } + } +} +``` + +### Response Parameters + +`error` +: `object` The error object. + +`code` +: `string` Type of the error. + +`description` +: `string` Descriptive text about the error. + +`field` +: `string` Name of the parameter in the API request that caused the error. + +`source` +: `string` The point of failure in the specific operation (payment in this case). Check the [card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md#cards), [netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md#netbanking), [wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md#wallet), [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md#intent-flow), [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md#cardless-emi) and [Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md#emandate) sections to know about the possible values for each method. + +`step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. Check the [card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md#cards), [netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md#netbanking), [wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md#wallet), [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md#intent-flow), [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md#cardless-emi) and [Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md#emandate) sections to know about the possible values for each method. + +`reason` +: `string` The exact error reason. It can be handled programmatically. + +`metadata` +: `object` Contains additional information about the request. + + `payment_id` + : `string` Unique identifier of the payment. + + `order_id` + : `string` Unique identifier of the order associated with the payment. diff --git a/llm-content/errors/common.md b/llm-content/errors/common.md new file mode 100644 index 00000000..dba42deb --- /dev/null +++ b/llm-content/errors/common.md @@ -0,0 +1,59 @@ +--- +title: List of Common Errors +heading: Common Errors +description: Check the list of common errors returned in the API responses from Razorpay and their solutions. Also, check the steps to view API errors. +--- + +# Common Errors + +View the list of common errors and their solutions below: + + +### Error 1: The requested URL was not found on the server + + **Cause**: + + - Incorrect API method while calling the API. + - Feature required for the API call is not enabled on your account. + + **Solution**: + + + - Check and use the correct API method. + + - Contact our [Support team](https://razorpay.com/support/) to enable the feature on your account. + + + + + + +### Error 2: Access Denied + + **Cause**: Whitelisted IPs on your account. + + **Solution**: Contact our [Support team](https://razorpay.com/support/) to verify and confirm if any IPs are currently whitelisted on your account. If yes, remove the whitelisted IPs for both test and live modes. + + + + +> **INFO** +> +> +> **Handy Tips** +> +> If you are using [our SDKs for integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration.md), the error responses result in exceptions that need to be handled in your integration. +> + +## View API Errors + +For API error codes, including their reasons, descriptions, and resolution steps, please refer to the respective endpoint page. + +**Example** + +To view the errors related to the Create an Order API: +1. Go to the [Create an Order API endpoint page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +2. Click the errors capsule. The list of errors is displayed. + +Watch the short animation below on how to view API-related errors. +![API Errors on respective endpoint page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/api-error.gif.md) diff --git a/llm-content/errors/payments/cards.md b/llm-content/errors/payments/cards.md new file mode 100644 index 00000000..39d4b195 --- /dev/null +++ b/llm-content/errors/payments/cards.md @@ -0,0 +1,145 @@ +--- +title: Cards Error Codes +description: Explore errors related to card payments, discover reasons, merchant descriptions, and actionable next steps. +--- + +# Cards Error Codes + +Below are the top error codes associated with card payments, along with their reasons, descriptions and subsequent steps for resolution. + + +### payment_timed_out + + - **Description**: The payment could not be completed as the customer exceeded the time limit for payment processing. This time limit is typically 10 minutes unless otherwise specified. + - **Next Steps**: Please request your customer to pay within the specified time limits for the payment. + + + +### gateway_technical_error + + - **Description**: There was a downtime on our partner bank due to which the payment has failed. + - **Next Steps**: Payment Aggregators depend on partner banks for payment processing, and instances of failure like these are beyond our control. + + Nevertheless, there is a proactive solution to address these issues. Inquire with your Customer Support Executive/ Sales Executive about implementing multi-terminal routing. + + + +### payment_cancelled + + + + Customer Cancelled Transaction + + - **Description**: The payment could not be completed because the customer cancelled the transaction or pressed the back button during the payment processing period. + - **Next Steps**: Please suggest to your customers to make another attempt or complete the payment at a later time. + + + +### Bank Downtime + + - **Description**: There was a downtime on the customer's bank due to which the payment has failed. + - **Next Steps**: In the case of Standard Checkout, please guide your customers on interpreting downtime information during the checkout process. Encourage them to consider using a different bank to complete the transaction successfully. + + In the case of Custom/S2S checkout, if you have not done so already, integrate the [Downtime API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) into your checkout system. This will allow you to showcase downtime information directly on your checkout interface. + + + + + + +### card_declined + + - **Description**: The payment was declined by the customer's bank, resulting in the transaction being unsuccessful. + - **Next Steps**: Razorpay may not have access to specific details regarding the failure reason, as customer banks typically do not provide such information. To understand the cause and address the issue, we recommend customers reach out directly to their banks. + + Please advise your customer to attempt the payment again using another card. + + + +### insufficient_funds + + - **Description**: The payment did not go through because the customer's bank account did not have enough funds to complete the transaction. + - **Next Steps**: We recommend informing your customers to ensure they have an adequate balance before initiating a transaction. Additionally, customers can verify their account balance through the Banking Partner app prior to proceeding with any transactions. + + + +### card_not_enrolled + + - **Description**: The payment was unsuccessful as the card was not activated or enabled by the customer for online transactions. + - **Next Steps**: We recommend guiding your customers to enable online transaction functionality for their card through their Card Control page. This can be easily accomplished either through their Banking App or by logging in via their net banking portal. + + + +### bank_technical_error + + - **Description**: There was a downtime on the customer's bank due to which the payment has failed. + - **Next Steps**: In the case of Standard Checkout, please guide your customers on interpreting downtime information during the checkout process. Encourage them to consider using a different bank to complete the transaction successfully. + + In the case of Custom/S2S checkout, if you have not done so already, integrate the [Downtime API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) into your checkout system. This will allow you to showcase downtime information directly on your checkout interface. + + + +### card_disabled_for_online_payments + + - **Description**: The payment was unsuccessful as the card was not activated or enabled by the customer for online transactions. + - **Next Steps**: We recommend guiding your customers to enable online transaction functionality for their card through their Card Control page. This can be easily accomplished either through their Banking App or by logging in via their net banking portal. + + + +### authentication_failed + + - **Description**: The payment did not go through as the customer entered incorrect OTP/verification details or accidentally closed the browser/pressed the back button during the authentication stage of the transaction. + - **Next Steps**: Please ensure customers correctly enter the OTP during transactions and avoid closing the browser during authentication. If the card supports [Native OTP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/native-otp.md), encourage its use to prevent errors. + + + +### payment_risk_check_failed + + - **Description**: The transaction was unsuccessful as the customer's bank declined the payment, citing it as fraudulent. + - **Next Steps**: Razorpay may not have access to specific details regarding the failure reason, as customer banks typically do not provide such information. To understand the cause and address the issue, we recommend customers reach out directly to their bank. + + Please advise your customer to attempt the payment again using another card. + + + +### payment_failed + + - **Description**: The payment was declined by the customer's bank, resulting in the transaction being unsuccessful. + - **Next Steps**: Razorpay may not have access to specific details regarding the failure reason, as customer banks typically do not provide such information. To understand the cause and address the issue, we recommend customers reach out directly to their bank. + + Please advise your customer to attempt the payment again using another card. + + + +### incorrect_cvv + + - **Description**: The payment was unsuccessful as the customer entered an incorrect CVV during the payment process. + - **Next Steps**: Additionally, you can promote the convenience of saving their card details at checkout, which can enable a [CVV-less flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/cvv-less-flow.md) and simplify the payment process for future transactions. + + + +### debit_instrument_inactive + + - **Description**: The payment was unsuccessful as the card was not activated or enabled by the customer for online transactions. + - **Next Steps**: We recommend guiding your customers to enable online transaction functionality for their card through their card control page. This can be easily accomplished either through their banking app or by logging in via their net banking portal. + + + +### debit_instrument_blocked + + - **Description**: The payment could not be processed due to the card being blocked, either by the customer or their bank. + - **Next Steps**: We suggest informing customers to reach out to their bank to resolve the issues and unblock their cards. However, they can attempt the transaction again using an active card. + + + +### card_expired + + - **Description**: The payment could not be completed because the customer's card is expired. + - **Next Steps**: We suggest urging customers to reach out to their bank to resolve the issues and unblock their cards. Alternatively, they can attempt the transaction again using an active card. + + + +### transaction_limit_exceeded + + - **Description**: The payment did not go through because the customer has already reached the maximum transaction limit on their card for the day. + - **Next Steps**: We recommend suggesting to your customer to retry the payment using a different card or alternative payment methods to complete the payment. diff --git a/llm-content/errors/payments/list.md b/llm-content/errors/payments/list.md new file mode 100644 index 00000000..ed25fe21 --- /dev/null +++ b/llm-content/errors/payments/list.md @@ -0,0 +1,264 @@ +--- +title: List of Errors +description: List of payment errors with descriptions and next steps. +--- + +# List of Errors + +Below are the top error codes associated with various payment methods, along with their reasons, descriptions and steps for resolution. + +## Bad Request Errors + +Error Reason [columWidth="25"] | Detailed Error Description [columWidth="50"] | Next Steps [columWidth="25"] +--- +amount_less_than_minimum_amount | Amount in the payment request is less than the minimum amount. Transacting through some banks have fixed fees. If the payment amount is less than the fixed fee then this error shows up. | Please make sure that the payment amount is more than the minimum fees associated with the bank. +--- +authentication_failed | The payment failed as 3D secure, or OTP authentication failed. This could happen if the user cancels the payment on the authentication (OTP submit) screen or enters incorrect authentication details such as OTP. | The customer must enter correct authentication details to complete the payment. +--- +bank_account_invalid | The bank account is not valid. The customer or bank could have closed the account. | The customer must try using a valid bank account or another method. +--- +bank_account_validation_failed | The third party validation failed as the given bank account details were incorrect or could not be verified. | The customer should check the bank account details provided and try again. +--- +bank_not_enabled | The selected bank to complete the transaction is not enabled for your business. | Please reach out to Razorpay to enable the selected bank. +--- +bank_technical_error | The issuing bank was facing technical problems at the moment the payment was attempted. This usually occurs when the Core Banking System encounters a technical error while processing the payment. | The customer must try using another bank account or another method. +--- +capture_failed | Payment capture has failed. | Please reach out to Razorpay. +--- +card_expired | The card has expired. | The customer must retry with a valid card. +--- +card_network_not_enabled | The card's network (Visa, Mastercard, etc.) is not enabled for the merchant. | Please reach out to Razorpay to enable the card network. +--- +card_not_enrolled | The card is not enrolled for this payment method. | Customer needs to enroll the card for this payment method or use another card. +--- +card_number_invalid | The card number is invalid. | Customer needs to enter a valid card number. +--- +card_type_invalid | The card type is invalid. | Customer needs to use a valid card type. +--- +compliance_violation | The payment violates compliance requirements. | Please ensure the payment meets all compliance requirements. +--- +debit_instrument_blocked | The customer is using a blocked card to complete the payment. The card could have been blocked by the issuer or by customers themselves. | The customer must retry with a different card or method. +--- +duplicate_refund_id | A refund with this ID already exists. | Please use a unique refund ID. +--- +duplicate_request | A duplicate request has been submitted. | Please avoid duplicate requests. +--- +emi_greater_than_max_amount | The EMI amount is greater than the maximum allowed amount. | Please reduce the EMI amount or use another payment method. +--- +emi_plan_unavailable | The EMI plan is not available. | Please choose another EMI plan or payment method. +--- +incorrect_atm_pin | Incorrect ATM PIN entered. | Customer needs to enter the correct ATM PIN. +--- +incorrect_card_details | Incorrect card details entered. | Customer needs to enter correct card details. +--- +incorrect_card_expiry_date | Incorrect card expiry date entered. | Customer needs to enter the correct card expiry date. +--- +incorrect_cardholder_name | Incorrect cardholder name entered. | Customer needs to enter the correct cardholder name. +--- +incorrect_cvv | The customer has entered an incorrect CVV to complete the payment. | The customer must retry and enter the correct CVV. +--- +incorrect_otp | The customer has entered an incorrect OTP to complete the payment. | The customer must retry and enter the correct OTP. +--- +incorrect_pin | Incorrect PIN entered. | Customer needs to enter the correct PIN. +--- +input_validation_failed | Payment failed due to wrong request or input sent in the payment request. This is also seen while creating a payment with incorrect parameter values on the Dashboard. | Rectify the validation issues and try again. Check the error description and field parameters for more information about the error. Check your integration/payment request or reach out to Razorpay. Refer to the API Reference Guide. +--- +insufficient_funds | The customer does not have sufficient funds in the account to complete the payment. | The customer must retry with a different card or method. +--- +international_transaction_not_allowed | International transactions are not allowed. | Customer needs to use a domestic payment method or enable international transactions. +--- +invalid_amount | The amount provided is invalid. | Please provide a valid amount. +--- +invalid_currency | The currency passed is not supported or is invalid. | Check the list of supported currencies and use the correct currency code. +--- +invalid_device | The device used is invalid for this transaction. | Customer needs to use a valid device. +--- +invalid_email | The email address provided is invalid. | Please provide a valid email address. +--- +invalid_mobile_number | The mobile number provided is not valid. | Customer needs to provide a valid mobile number and retry. +--- +invalid_order_id | Order ID required in the payment request is either missing or is invalid. Order ID is mandatory for every payment. | Make sure the correct order ID is always passed while initiating a new payment. +--- +invalid_request | The request is invalid. | Please check the request format and retry. +--- +invalid_user_details | Invalid user details provided. | Customer needs to provide valid user details. +--- +invalid_vpa | The customer has entered an incorrect VPA to complete the payment. | The customer must check and enter the correct VPA. +--- +live_mode_not_enabled | Live mode is not enabled for your business. This error generally arises when you use test mode keys to make a live payment. | Generate the live mode keys in the Dashboard and use them in your integration. +--- +merchant_not_activated | The merchant account is not activated. | Please contact Razorpay to activate the merchant account. +--- +mismatch_in_transaction_details | There is a mismatch in transaction details. | Please check and correct the transaction details. +--- +mobile_number_invalid | The mobile number is invalid. | Customer needs to provide a valid mobile number. +--- +order_already_paid | There can only be one successful payment for each order ID. This error arises when you are trying to use an order ID where a payment is already completed. | Check for order status before initiating a new payment attempt on the order. You can also evaluate using a different order ID for each payment. +--- +order_payment_method_mismatch | This error arises when the method mentioned in the order request is different from the method mentioned in the payment request. | Do not pass method in the create order request. +--- +order_amount_mismatch | This error arises when the amount mentioned in the order request is different from the amount mentioned in the payment request. | Please make sure that the same amount is passed in both payment and order request. +--- +otp_attempts_exceeded | OTP attempts have been exceeded. | Customer needs to wait and retry after some time. +--- +otp_expired | The OTP has expired. | Customer needs to request a new OTP. +--- +payment_cancelled | The customer has explicitly cancelled the payment due to which the authentication failed to complete. | The customer must retry to complete the payment. +--- +payment_failed | Payment processing failed due to error at bank or wallet gateway. No specific error code received from gateway in this case. | Please retry with a different payment method. +--- +payment_method_not_enabled | The selected payment method is not enabled for your business. This error occurs when your customer tries to complete a transaction using a method that is not enabled for you. | Reach out to Razorpay to enable payment method. +--- +payment_method_not_enabled | UPI is not enabled however merchant has hit the UPI Payment request on API. | Please enable the payment method. +--- +payment_pending_approval | The payment is currently pending approval by the concerned authority as part of the maker-checker flow. | Please reach out to the approver in your organization to get the transaction approved. +--- +payment_risk_check_failed | Payment declined due to risk checks. Risk checks are performed by Razorpay, Gateway, and Issuer Bank. The source parameter would give additional clarity where the risk check failed. | The customer must retry with a different card or method. +--- +payment_timed_out | The customer did not complete the transaction within the specified time. This error may also happen when no response is received from the gateway. | The customer must retry and complete the transaction within the time. +--- +pin_attempts_exceeded | PIN attempts have been exceeded. | Customer needs to wait and retry after some time. +--- +pin_not_set | PIN is not set for the payment method. | Customer needs to set a PIN for the payment method. +--- +record_not_found | The requested record was not found. | Please check the details and retry. +--- +recurring_payment_not_enabled | Recurring payments are not enabled. | Please enable recurring payments for your account. +--- +refund_limit_crossed | The refund limit has been crossed. | Please contact Razorpay for assistance. +--- +server_error | Technical error at Razorpay's server. This usually occurs when there is some server issue at Razorpay's end. | Please retry after some time or reach out to Razorpay. +--- +transaction_daily_limit_exceeded | The customer has exceeded the daily transaction limit set on the card. Some of the cards allow customers to set a limit or have a default limit set. | The customer must retry using a different instrument or wait 24 hours to complete the payment. +--- +transaction_limit_exceeded | The customers have exceeded the credit or debit limit set on their cards. This error usually arises while doing high value transactions. | The customer must retry using a different bank's card or method. +--- +transaction_frequency_limit_exceeded | NPCI has a transaction limit both on the amount and the frequency per day. Customer has exhausted the frequency limit. | Please retry using another payment method. +--- +transaction_on_vpa_restricted | Transaction on this VPA has been temporarily / permanently blocked by the PSP. | The customer to retry with another UPI ID. +--- +upi_app_technical_error | Technical error occurred at the customer's PSP due to which the payment failed. | The customer must retry the payment. If the error persists then the customer should try using another UPI app. +--- +upi_autopay_not_supported_on_psp | UPI Autopay is not supported on PSP. | Please retry with another PSP app. +--- +upi_collect_not_enabled | UPI Collect flow is not enabled however merchant has hit the Collect payment request on API. | Please enable collect flow. +--- +upi_intent_not_enabled | UPI Intent flow is not enabled however merchant has hit the Intent Payment request on API. | Please enable intent flow. +--- +user_not_eligible | The customer failed the eligibility check and is not eligible for credit. This error may arise when the customer has a poor credit score or incomplete / insufficient documents. | The customer must retry using a different payment method. +--- +user_not_registered_for_netbanking | The customer's bank account is not registered for netbanking. | The customer should register their account with the issuing bank for netbanking. +--- +verification_failed | Verification of the payment using the status check API has failed. | This is a temporary error. The customer must retry. +--- + +## Gateway Errors + +Error Reason [columWidth="25"] | Detailed Error Description [columWidth="50"] | Next Steps [columWidth="25"] +--- +authentication_failed | The payment failed as 3D secure, or OTP authentication failed. This could happen if the user cancels the payment on the authentication (OTP submit) screen or enters incorrect authentication details such as OTP. | The customer must enter correct authentication details to complete the payment. +--- +authorisation_declined_by_psp | PSP app has rejected the authorisation request. This can happen when there is an issue/downtime with the PSP or there's an issue with the customer's VPA. | Recheck the customer's VPA and retry. If this is recurring, then the customer can choose another PSP app and retry. +--- +bank_cutoff_in_progress | Bank CBS cutoff is in progress. This is a periodic event at the bank's end. | The customer must retry. +--- +bank_not_available | Bank is not available due to a downtime or a technical issue. | The customer must retry. +--- +bank_technical_error | The issuing bank was facing technical problems at the moment the payment was attempted. This usually occurs when the Core Banking System encounters a technical error while processing the payment. | The customer must try using another bank account or another method. +--- +beneficiary_account_does_not_exist | An issue with the beneficiary account which does not exist. | Please reach out to Razorpay. +--- +beneficiary_account_dormant | An issue with the beneficiary account which is dormant. | Please reach out to Razorpay. +--- +card_declined | The card has been declined. | The customer must retry with a different card or method. +--- +collect_on_mcc_blocked | UPI Collect is blocked for this MCC (Merchant Category Code). | Please contact Razorpay for assistance. +--- +collect_request_pending | A collect request is already pending for this transaction. | Please wait for the current request to complete or retry after some time. +--- +credit_limit_exceeded | The customer's credit limit has been exceeded. | Customer needs to reduce the amount or use another payment method. +--- +credit_limit_expired | The customer's credit limit has expired. | Customer needs to renew their credit limit or use another payment method. +--- +credit_limit_inactive | The customer's credit limit is inactive. | Customer needs to activate their credit limit or use another payment method. +--- +credit_limit_not_approved | The customer's credit limit is not approved. | Customer needs to get their credit limit approved or use another payment method. +--- +credit_not_permitted | Credit transactions are not permitted for this customer. | Customer needs to use another payment method. +--- +credit_failed | Credit processing has failed. | Please retry or use another payment method. +--- +debit_declined | The debit transaction has been declined. | Customer needs to retry with another payment method. +--- +deemed_transaction | The transaction is deemed and cannot be processed. | Please contact Razorpay for assistance. +--- +debit_instrument_blocked | The customer is using a blocked card to complete the payment. The card could have been blocked by the issuer or by customers themselves. | The customer must retry with a different card or method. +--- +debit_instrument_inactive | The debit instrument is inactive. | Customer needs to activate the instrument or use another payment method. +--- +duplicate_rrn_found | A duplicate RRN (Retrieval Reference Number) was found. | Please retry with a new transaction. +--- +funds_blocked_by_mandate | Funds are blocked by an existing mandate. | Customer needs to release the mandate or use another account. +--- +gateway_technical_error | Technical error occurred at the gateway. | Please retry after some time. +--- +invalid_response_from_gateway | Invalid response received from the gateway. | Please retry the transaction. +--- +invalid_vpa | The customer has entered an incorrect VPA to complete the payment. | The customer must check and enter the correct VPA. +--- +issuer_technical_error | Technical error occurred at the card issuer. | Please retry after some time or use another card. +--- +mandate_creation_declined | Mandate creation has been declined. | Customer needs to retry mandate creation or use another payment method. +--- +mandate_creation_expired | Mandate creation has expired. | Customer needs to retry mandate creation. +--- +mandate_creation_failed | Mandate creation has failed. | Customer needs to retry mandate creation or use another payment method. +--- +mandate_creation_timeout | Mandate creation has timed out. | Customer needs to retry mandate creation. +--- +mcc_amount_limit_exceeded | The amount limit for this MCC (Merchant Category Code) has been exceeded. | Please reduce the amount or contact Razorpay. +--- +payment_amount_tampered | The payment amount has been tampered. | The customer must retry with the correct amount. +--- +payment_cancelled | The customer has explicitly cancelled the payment due to which the authentication failed to complete. | The customer must retry to complete the payment. +--- +payment_collect_request_expired | The payment collect request has expired. | Customer needs to retry the payment. +--- +payment_declined | The payment has been declined. | Customer needs to retry with another payment method. +--- +payment_declined_due_to_high_traffic | Payment declined due to high traffic at the gateway. | Please retry after some time. +--- +payment_failed | Payment processing failed due to error at bank or wallet gateway. No specific error code received from gateway in this case. | Please retry with a different payment method. +--- +payment_pending | The payment is pending and has not been completed yet. | Please wait for the payment to complete or retry. +--- +payment_risk_check_failed | Payment declined due to risk checks. Risk checks are performed by Razorpay, Gateway, and Issuer Bank. The source parameter would give additional clarity where the risk check failed. | The customer must retry with a different card or method. +--- +payment_session_expired | The payment session has expired. | Customer needs to start a new payment session. +--- +payment_timed_out | The customer did not complete the transaction within the specified time. This error may also happen when no response is received from the gateway. | The customer must retry and complete the transaction within the time. +--- +psp_app_not_available | PSP app is not available. This can be because of a downtime with the PSP. | The customer must retry with another PSP app. +--- +psp_app_not_supported | UPI App is not supported. This is a rare error used when a particular app is blacklisted. | Please choose another PSP app and try again. +--- +psp_not_available | PSP is not available. | Customer needs to retry with another PSP. +--- +psp_not_registered | PSP is not registered. | Customer needs to register with a PSP or use another PSP. +--- +reqauth_mandate_not_acknowledged | Request authentication mandate is not acknowledged. | Customer needs to acknowledge the mandate. +--- +request_timed_out | The request has timed out. | Please retry the request. +--- +server_error | Technical error at Razorpay's server. This usually occurs when there is some server issue at Razorpay's end. | Please retry after some time or reach out to Razorpay. +--- +transaction_daily_count_exceeded | The daily transaction count has been exceeded. | Customer needs to wait for the next day or use another payment method. +--- +transaction_daily_limit_exceeded | The customer has exceeded the daily transaction limit set on the card. Some of the cards allow customers to set a limit or have a default limit set. | The customer must retry using a different instrument or wait 24 hours to complete the payment. +--- +transaction_frequency_limit_exceeded | NPCI has a transaction limit both on the amount and the frequency per day. Customer has exhausted the frequency limit. | Please retry using another payment method. +--- +user_not_eligible | The customer failed the eligibility check and is not eligible for credit. This error may arise when the customer has a poor credit score or incomplete/insufficient documents. | The customer must retry using a different payment method. +--- +vpa_resolution_failed | The UPI network failed to validate the VPA. This is a technical error when the resolution fails. | The customer must retry using a different bank account or method. +--- diff --git a/llm-content/errors/payments/payment-methods-error-parameters.md b/llm-content/errors/payments/payment-methods-error-parameters.md new file mode 100644 index 00000000..ddb43973 --- /dev/null +++ b/llm-content/errors/payments/payment-methods-error-parameters.md @@ -0,0 +1,387 @@ +--- +title: Payment Method Error Parameters +description: List of values for Source and Step parameters for each payment method supported by Razorpay. +--- + +# Payment Method Error Parameters + +There are certain error codes specific for each payment method supported by Razorpay. To understand the errors and their `reasons`, it is recommended to know the `source` (stakeholders) and the `steps` involved in the payment flows: + +- [Cards](#cards) +- [UPI](#upi) +- [Netbanking](#netbanking) +- [Wallet](#wallet) +- [Cardless EMI](#cardless-emi) +- [Emandate](#emandate) + +## Cards + +The payment flow for **Card** payments is illustrated below. + +![Errors Payment Methods Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-flow-card.jpg.md) + + + The possible values for the `source` parameter for cards are listed below: + + - `customer` + - `business` + - `internal` + - `gateway` + - `issuer_bank` + + + The possible values for the `step` parameter, along with the description, are listed below: + + 1. `payment_initiation` + + Your system initiates and sends the payment request to our server. Our server validates your request, creates the payment flow and forwards the request to the Gateway. + + 1. `card_enrollment_check` + + Upon receiving a request from Razorpay, Gateway sends the enrollment check request to the bank for the enrollment of the card check. + + 1. `payment_authentication` + + The bank verifies the enrollment of the card, and then requests the authentication of the customer by sending 3DS URL and OTP to the customer. + + - 3DS URL + + Bank sends the Authentication (3DS URL), which is routed through Gateway > Razorpay > Customer. + + - OTP + + The bank sends the OTP to the customer’s mobile directly. The customer enters the valid OTP within the time on the bank's OTP page. + + 1. `payment_authorization` + + Once the customer has completed the authentication, the bank authorises the release of the funds. The authorisation status is communicated to the Gateway which in turn communicates the same to Razorpay. + + 1. `payment_capture` + + Once the payment is successfully authorised, Razorpay sends the capture request to the Gateway which in turn sends the same to the bank to capture the authorised payment. + + +## UPI + +**UPI** payments can be made using the following: + + +### Intent Flow + + The payment flow for UPI Intent payments is illustrated below. + + ![](/docs/assets/images/payment-flow-upi_intent.jpg) + + + + + The possible values for the `source` parameter for both collect and intent flows in UPI are as follows: + + - `customer` + - `business` + - `internal` + - `customer_psp` + - `gateway` + - `network` + - `issuer_bank` + - `beneficiary_bank` + + + The possible values for the `step` parameter for UPI Intent flow, along with the description, are listed below: + + 1. `mandate_creation` + + Request to create a new UPI mandate. + + 1. `payment_initiation` + + Your system initiates and sends the payment request to our server. + + 1. `payment_creation` + + Razorpay creates an intent URL and passes it back to you. + + 1. `payment_authentication` + + Payer clicks on the pay button (pointing to the intent url), which prompts the payer to open the PSP App. After the App opens, the payer enters the M-PIN on the PSP App, and then authenticates the transaction. + + 1. `payment_request` + + Payer PSP sends the payment request to the UPI network. + + 1. `payment_request_beneficiary_details` + + The UPI network requests the beneficiary details from the Payee PSP. + + 1. `payment_response_beneficiary_details` + + Payee PSP sends the beneficiary details to the UPI network. + + 1. `payment_debit_request` + + The UPI network requests a debit of the given payment amount from the customer's bank. + + 1. `payment_debit_response` + + Customer’s bank sends the debit response to the NPCI. + + 1. `payment_credit_request` + + The UPI network sends the payment credit request to your account maintained with Razorpay. + + 1. `payment_credit_response` + + The beneficiary bank sends the credit response to the UPI network. + + 1. `payment_status_request` + + UPI network requests the transaction confirmation status from Payee PSP which acts as the gateway in UPI transactions. + + 1. `payment_status_response` + + Payee PSP sends the transaction confirmation response to the UPI Network. + + 1. `payment_response` + + Payee PSP sends the callback to our server. This will contain the final transaction status. + + 1. `refund_request` + + Request to initiate a refund. + + + + + +### Collect Flow + + The payment flow for UPI Collect payments is illustrated below. + + ![](/docs/assets/images/payment-flow-upi_collect.jpg) + + + The possible values for the `source` parameter for both collect and intent flows in UPI are as follows: + - `customer` + - `business` + - `internal` + - `customer_psp` + - `gateway` + - `network` + - `issuer_bank` + - `beneficiary_bank` + + + The possible values for the `step` parameter for the UPI Collect flow, along with the description, are listed below: + + 1. `mandate_creation` + + Request to create a new UPI mandate. + + 1. `payment_initiation` + + Your system initiates and sends the payment request to our server. + + 1. `payment_creation` + + Razorpay creates the payment and sends the collect request via Payee PSP (Gateway). + + 1. `payment_request` + + Payee PSP sends the payment request to the UPI network. + + 1. `payment_authentication_request` + + The UPI network sends an authentication request for the given payment amount to the Payer PSP. + + 1. `payment_authentication` + + Customer clicks on the payment notification received on mobile which opens the PSP App. After the App opens, the customer enters the M-PIN on the PSP App, and then authenticates the transaction. + + 1. `payment_authentication_response` + + Payer PSP sends the authentication details to the UPI network. + + 1. `payment_debit_request` + + Upon successful authentication, the UPI network requests a debit of the given payment amount from the customer's bank. + + 1. `payment_debit_response` + + Customer’s bank sends the debit response to the UPI Network. + + 1. `payment_credit_request` + + The UPI network sends the payment credit request to your account maintained with Razorpay. + + 1. `payment_credit_response` + + The beneficiary bank sends the credit response to the UPI network. + + 1. `payment_status_request` + + UPI network sends the transaction confirmation request to payer PSP (Google Pay). + + 1. `payment_status_response` + + Payer PSP (Google Pay) sends acknowledge, informs the customer and sends the response to NPCI. + + 1. `payment_response` + + Payee PSP sends the callback to our server. This will contain the final transaction status. + + 1. `refund_request` + + Request to initiate a refund. + + + + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/standard-integration.md). +> + +## Netbanking + +The payment flow for **Netbanking** payments is illustrated below: + +![Errors Payment Methods Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-flow-netbanking.jpg.md) + + + The possible values for the `source` parameter for netbanking are listed below: + + - `customer` + - `business` + - `internal` + - `issuer_bank` + + + The possible values for the `step` parameter, along with the description, are listed below: + + 1. `payment_initiation` + + Your system initiates and sends the payment request to our server. Razorpay sends the bank URL back to you. + + 1. `payment_authentication` + + The customer logs into his netbanking account and completes the transaction. + + 1. `payment_authorization` + + Upon successful authentication, bank authorises the release of funds and notifies Razorpay. Razorpay in turn, notifies the business. + + + +## Wallet + +The payment flow for **Wallet** payments is illustrated below: + +![Errors Payment Methods Wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-flow-wallet.jpg.md) + +The payment flow for **Wallet** payments is illustrated below: + +![Errors Payment Methods Wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-flow-wallet.jpg.md) + + + The possible values for the `source` parameter for wallet are listed below: + + - `customer` + - `business` + - `internal` + - `issuer` + + + The possible values for the `step` parameter, along with the description, are listed below: + + 1. `payment_initiation` + + Your system initiates and sends the payment request to our server. Our server sends the same request to the Bank/Gateway. + + 2. `payment_eligibility_check` + + Razorpay sends the eligibility check request to the issuer to determine if the entered customer information is correct. + + 3. `payment_authentication` + + Customer authenticates the payment using OTP provided by the issuer. + + 4. `payment_authorization` + + Issuer authorises the release of funds and sends confirmation to Razorpay. + + +## Cardless EMI + +The payment flow for **Cardless EMI** payments is illustrated below: + +![Errors Payment Methods Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-flow-cardless_emi.jpg.md) + + + The possible values for the `source` parameter for Cardless EMI flow are: + + - `customer` + - `business` + - `internal` + - `network` + - `issuer` + + + The possible values for the `step` parameter, along with the description, are listed below: + + 1. `payment_initiation` + + Your system initiates and sends the payment request to our server. Our server sends the same request to the Bank/Gateway. + + 1. `payment_eligibility_check` + + Razorpay sends the eligibility check request to the issuer to determine if the entered customer information is correct and to determine the credit eligibility of the customer. + + 1. `payment_authentication` + + Customer authenticates the payment using OTP provided by the issuer. + + 1. `payment_authorization` + + Issuer authorizes the release of funds and sends confirmation to Razorpay. + + +## Emandate + + + The possible values for the `source` parameter for Emandate are listed below: + + - `customer` + - `bank` + - `business` + - `internal` + - `gateway` + - `issuer_bank` + + + The possible values for the `step` parameter, along with the description, are listed below: + + 1. `payment_initiation` + + Your system initiates and sends the payment request to our server. Our server validates your request, creates the payment flow and forwards the request to the Gateway. + + 1. `payment_authentication` + + The bank verifies the enrollment of the Emandate by asking customers to authenticate themselves. + + 1. `payment_authorization` + + Once the customer has completed the authentication, the bank authorizes the release of the funds. The authorization status is communicated to the Gateway which in turn communicates the same to Razorpay. diff --git a/llm-content/errors/payments/upi.md b/llm-content/errors/payments/upi.md new file mode 100644 index 00000000..75672b63 --- /dev/null +++ b/llm-content/errors/payments/upi.md @@ -0,0 +1,132 @@ +--- +title: UPI Error Codes +description: Explore errors related to UPI payments, discover reasons, merchant descriptions, and actionable next steps. +--- + +# UPI Error Codes + +Below are the top error codes associated with UPI payments, along with their reasons, descriptions, and subsequent steps for resolution. + + +### bank_technical_error + + - **Description**: The payment failed due to a downtime on the UPI provider. + - **Next Steps**: In the case of Standard Checkout, please guide your customers in interpreting downtime information during the checkout process and encourage them to consider using a UPI App to successfully complete the transaction. + + In the case of Custom/S2S Checkout, we recommend integrating the [Downtime API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) into your checkout system. This will allow you to showcase downtime information directly on your checkout interface. + + + +### credit_failed + + + + Customer Bank Account Mismatch + + - **Description**: The payment was unsuccessful because the customer selected a different bank account that was not used during the time of registration with your business. + - **Next Steps**: Please ask your customers to use the bank account they initially registered with your business to make the payment. + + + +### Partner Bank Downtime + + - **Description**: The payment failed due to a downtime on our partner bank. + - **Next Steps**: Payment Aggregators depend on partner banks for payment processing, and instances of failure like these are beyond our control. + + However, reach out to your Customer Support Executive/Sales Executive about implementing multi-terminal routing. + + + + + + + +### gateway_technical_error + + + + Partner Bank Technical Issues + + - **Description**: The payment could not be completed due to technical issues from the partner bank. + - **Next Steps**: Payment Aggregators depend on partner banks for payment processing, and instances of failure like these are beyond our control. + + We recommend advising your customers to attempt the transaction again after some time. + + + +### Partner Bank Downtime + + - **Description**: The payment failed due to a downtime on our partner bank. + - **Next Steps**: Payment Aggregators depend on the partner banks for payment processing, and instances of failure like these are beyond our control. + + However, reach out to your Customer Support Executive/Sales Executive about implementing multi-terminal routing. + + + + + + + +### insufficient_funds + + - **Description**: The payment did not go through because the customer's bank account did not have enough funds to complete the transaction. + - **Next Steps**: Notify your customers to confirm they have sufficient funds before initiating a transaction or choosing a different bank account with adequate balance. Additionally, customers can check their account balance on the UPI App using the Check balance feature. + + + +### invalid_vpa + + - **Description**: The payment was unsuccessful due to the customer not being a valid user on the UPI App. + - **Next Steps**: Guide your customers in finalising the registration process by linking their bank account with the VPA on the UPI App. Please request customers to re-attempt the payment after completing the registration steps. + + + +### payment_cancelled + + - **Description**: The payment could not be completed because the customer cancelled the transaction or pressed the back button during the payment processing period. + - **Next Steps**: Please suggest to your customers to make another attempt. + + + +### payment_collect_request_expired + + - **Description**: The payment could not be completed as the customer exceeded the time limit for payment processing. This time limit is typically 10 minutes unless otherwise specified. + - **Next Steps**: Please request the customer to complete the payment within the specified time limit. + + + +### payment_declined + + - **Description**: The payment did not go through because the funds could not be debited from the customer's bank account. + - **Next Steps**: Please suggest to your customers to make another attempt. + + + +### payment_timed_out + + + + Customer Exceeded Payment Time Limit + + - **Description**: The payment could not be completed as the customer exceeded the time limit for payment processing. This time limit is typically 10 minutes unless otherwise specified. + - **Next Steps**: Please request the customer to complete the payment within the specified time limit. + + + +### Partner Bank Downtime + + - **Description**: The payment failed due to a downtime at our partner bank. + - **Next Steps**: Payment Aggregators depend on partner banks for payment processing, and instances of failure like these are beyond our control. + + However, reach out to your Customer Support Executive/Sales Executive about implementing multi-terminal routing. + + + + + + + +### vpa_resolution_failed + + - **Description**: The payment was unsuccessful due to a failure to process the transaction using the customer's UPI ID. + - **Next Steps**: Please raise a ticket with the Technical support team to address and resolve these issues. diff --git a/llm-content/errors/x.md b/llm-content/errors/x.md new file mode 100644 index 00000000..cfd0f46a --- /dev/null +++ b/llm-content/errors/x.md @@ -0,0 +1,225 @@ +--- +title: Error Types +description: Explore the RazorpayX Error Codes and know how to troubleshoot and understand them. +--- + +# Error Types + +RazorpayX aims to make all transactions successful for its customers. Even then, errors might still occur in the financial ecosystem due to intermittent communication and technical issues at multiple levels. + +In RazorpayX, you can identify error codes at the `source` of the response, along with the `reason` for such errors. This will help in minimising the errors reducing the losses. + +- [API Error Codes](#api-error-codes)*: These are returned to you when the API does not fire as expected. +- [**Contact Error Codes**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/contacts.md): These are returned when an error occurs during contact creation. +- [**Fund Account Error Codes**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/fund-account.md): These are returned when Fund Account creation fails. +- [**Payout Status Details**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md): These provide the reason for a payouts' state and the next steps to be taken. These are returned in the API response and webhook payloads and are available on the Dashboard. + + +### Advantages of Error Codes + + Error codes can help you build your own logic and take further remedial action at your end, wherever possible. Deriving these insights can help your business to: + + - Map and analyse top failure reasons. + - Identify the source of failure. + - Narrow down and understand the cause of the failure (could be due to actions taken by your contact or external factors such as the beneficiary bank or network connectivity). + - Identify the exact reason of the failure. + - Handle actionable error codes. + - Avoid possible integration errors. + + +## API Error Codes + +API error codes are sent to you when an API cannot be fired. All successful Razorpay API responses return with HTTP Status code 200. + +Razorpay Errors API identifies two types of errors: +- Business: Errors where merchant action is required. +- Internal: Technical errors at Razorpay's server. + +In case of a failure, we return a JSON error response that contains the reason for the failure. You can use this response to make changes to the API request body and try to fire them again. + +Check [API Error Reason and Next Steps](#api-error-reason-and-next-steps) to understand the reason and troubleshooting procedure. + + +### Sample Code for API Errors + + API errors appear in the format shown below. You can refer to the [API errors troubleshooting steps](#api-error-reason-and-next-steps) to resolve them. + + Here is an example of how an error code appears when an API does not fire. + + ```json: Sample Error Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The account number field is required", + "source": "business", + "step": "null", + "reason": "input_validation_failed", + "metadata": {}, + "field": "account_number" + } + } + ```json: Complete Error Response + { + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "fees": 0, + "tax": 0, + "status": "failed", + "utr": null, + "mode": "IMPS", + "purpose": "refund", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "failure_reason": "IMPS is not enabled on Beneficiary Account", + "created_at": 1545383037, + "error": { + "description": "IMPS is not enabled on beneficiary account, Retry with different mode", + "source": "beneficiary_bank", + "reason": "imps_not_allowed", + "code": "NA", + "step": "NA", + "metadata": {} + } + } + ``` + + `code` + : `string` Type of the error. For example, `BAD_REQUEST_ERROR`. + + `description` + : `string` A description for the error. For example, `The id provided does not exist`. + + `source` + : `string` Possible values: + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + + `reason` + : `string` The error reason. For example, `input_validation_failed`. + + `step` + : `NA` Not applicable for API Error Codes, value displayed to maintain consistency of error object. + + `metadata` + : `Null value` Not applicable for API Error Codes, value displayed to maintain consistency of error object. + + + +### API Error Reasons and Next Steps + +The below tables lists the API error reasons and the steps to fix them. + +Error Description | Next Steps +--- +The requested URL was not found on the server. | Occurs when wrong URL or HTTPS method is passed. Enter the correct URL as per the respective API request. Know more about [API gateway URLs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x.md#api-gateway-url). If the issue persists, [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md). +--- +Transactions from this IP are not allowed. Contact support for help. | Occurs when the API call is sent from an IP whose server/node is not allowlisted. Always [allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md). +--- +Different request body sent for the same Idempotency Header. | Occurs when the system receives a different payout request body for an existing idempotent header. Ensure that every payout body has a [unique idempotency header](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md). +--- +We are facing some trouble completing your request at the moment. Please try again shortly. | Occurs in exceptional cases when there is a server issue at Razorpay's end. Retry safely using an [idempotency request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) or [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md). +--- + +## HTTP Errors + +Given below is a list of HTTP error codes, reasons and next steps to fix them. + + +### HTTP Code 400: BAD_REQUEST ERROR + + - **Error Description**: Payout is not in pending state and cannot be approved or rejected. + + - **Source**: business + + - **Reason**: `payout_approval_not_allowed` + + - **Next Steps**: Payout approval is no longer required. No further action required. + + + + +### HTTP Code 401: BAD_REQUEST_AUTHENTICATION_ERROR + + + + The OAuth token used in the request was invalid or has expired + + - **Source**: business + + - **Reason**: `authentication_failed` + + - **Next Steps**: Please check the OAuth token being used and retry again. + + + + +### The OAuth token used does not have sufficient permissions for this request + + - **Source**: business + + - **Reason**: `authentication_failed` + + - **Next Steps**: Please check the OAuth token being used and retry again. + + + + + + + +### Handling 5XX Errors + +5xx errors occur when servers fail to connect causing network issues during an ongoing payout process. The [idempotency feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) is specifically built to handle such network issues. In case of any network issue like timeouts/5xx, you can safely fire the same request again using the same idempotency key and the request body as the original timed out request within 7 calendar days. Razorpay will ensure that the request does not get processed again if it has already been processed on our end. + +### Reducing 5XX Errors + +If the payout was created in the first request to the RazorpayX system using the same idempotency key, you get the created payout details along with the current [status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md#payout-states) in the response to the new request. + +> **WARN** +> +> +> **Watch Out!** +> +> The current status of the payout can be returned as `pending` `processing` or `failed`. +> + +- When retrying a request, the [request body](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) must be the same as the first request for idempotency to work. A different payload will be rejected as a `BAD_REQUEST`. +- If the payout gets created in the new request, you will receive the payout details with the current status in response to the new request. +- If the retry request times out, you can again retry using the same idempotency key. We recommend doing 3 retries at an interval of 1, 2 and 5 mins for each retry. + +### Mark Failed Status of a Payout request with 5XX error + +If 5XX error is received on the request or retried request: + +1. Check the status of payout using `reference_id` (the same `reference_id` you passed as part of the request) after 5 minutes using [Fetch all payouts API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts/fetch-all.md) up to 1 hour from payout creation time, in case you do not receive webhook within 5 minutes. +2. If you do not receive any status for the payouts using Fetch Payout API for the reference ID provided after 1 hour, then `fail` the payout after 1 hour. + +> **INFO** +> +> +> **Handy Tips** +> +> After 3 retries, there will be no payout for 1 hour. +> + +## Webhooks + +We recommend you to enable webhooks so that you are alerted of the status updates in any process. By enabling alerts for errors, you can reduce the delay in troubleshooting. + +- You can [Set Up Payout Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) to configure and receive instant notifications. +- They are sent whenever a specific [event](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) occurs. +- When the configured events are triggered, we send an HTTP POST [payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payouts.md) in JSON to the webhook's configured URL. + +### Related Information + +- [Contact Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/contacts.md) +- [Fund Account Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/fund-account.md) +- [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) diff --git a/llm-content/errors/x/contacts.md b/llm-content/errors/x/contacts.md new file mode 100644 index 00000000..4942f83c --- /dev/null +++ b/llm-content/errors/x/contacts.md @@ -0,0 +1,52 @@ +--- +title: Contact Error Codes +description: RazorpayX Contacts Error Codes. Understand why they occur and the steps to resolve them. +--- + +# Contact Error Codes + +When firing [Contact APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts.md), you might run into errors for various reasons. These error codes are returned in an error body, which you can use to understand the reason for the error and the steps to resolve it. + +## Error Sample Code and Description + +Here is an example of how an error code appears when any Contact API fails. + +```json: Sample Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The name field is required.", + "source": "business", + "step": null, + "reason": "input_validation_failed", + "metadata": {}, + "field": "name" + } +} +``` + +`code` +: `string` Not applicable for Error Codes. The value is displayed to maintain consistency of the error object. + +`description` +: `string` A description for the error. For example, `The name field is required.`. + +`source` +: `string` Possible value is `business`. The error can be fixed from your end. + +`step` +: `string` Not applicable for API Error Codes. The value is displayed to maintain consistency of the error object. + +`reason` +: `string` The error reason. For example, `input_validation_failed`. + +`metadata` +: `Null Value` Not applicable for API Error Codes. The value displayed to maintain consistency of the error object. + +`field` +: The Contact details in the [Contact entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts.md#contact-entity) such as `name`, `email`, `type` and so on. + +### Related Information + +- [Contact APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts.md) +- [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) diff --git a/llm-content/errors/x/fund-account.md b/llm-content/errors/x/fund-account.md new file mode 100644 index 00000000..8d930e1f --- /dev/null +++ b/llm-content/errors/x/fund-account.md @@ -0,0 +1,52 @@ +--- +title: Fund Account Error Codes +description: RazorpayX Fund Account Error Codes. Understand why they occur and the steps to resolve them. +--- + +# Fund Account Error Codes + +Fund Account error codes are returned when a fund account creation fails for some reason. You can identify when a Fund Account API has failed with the response or webhooks. + +## Errors Sample Code and Description + +Here is an example of how an error code appears when a fund account creation fails. + +### Sample Code + +```json: Sample Error Response +{ + "error": + { + "code": "BAD_REQUEST_ERROR", + "description": "The id provided does not exist", + "source": "business", + "step": null, + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +`code` +: `string` Not applicable for Error Codes, value displayed to maintain consistency of error object. + +`description` +: `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, Retry with different mode`. + +`source` +: `string` Possible values: + - `business`: The error can be fixed from your end. + +`step` +: `string` Not applicable for API Error Codes, value displayed to maintain consistency of error object. + +`reason` +: `string` The error reason. For example, `input_validation_failed`. + +`metadata` +: `Null Value` Not applicable for API Error Codes, value displayed to maintain consistency of error object. + +### Related Information + +- [Fund Account APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts.md) +- [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) diff --git a/llm-content/errors/x/payout-status-details.md b/llm-content/errors/x/payout-status-details.md new file mode 100644 index 00000000..de359dc9 --- /dev/null +++ b/llm-content/errors/x/payout-status-details.md @@ -0,0 +1,423 @@ +--- +title: Payout Status Details +description: Know the status of your payouts using the Payout Status Details API. +--- + +# Payout Status Details + +Payout Status details are returned when a payout is created and moves to another state. + +> **WARN** +> +> +> **Watch Out!** +> +> The `failure_reason`, `queueing_details` and `cancellation_details` fields along with the error object would be deprecated from the API response. Please move to Payout status details to understand the status of your payout. +> + +## About Status Details + +Status details are sent as part of the fetch payout API response and webhook payloads. You can also check the status details on the [dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/status-details.md). It provides additional details about each payout status including intermediate status like `pending`, `processing`, `queued` and terminal states like `reversed` and `failed`. The details will include payout clearance SLA and why payout is in `processing` state. A payout update webhook is fired every time an attribute in status details changes. + +You can check status details of a payout to know why it is in the `processing` state. It maybe due to: + +- [Deemed Success](https://razorpay.com/blog/business-banking/payout-processing-imps-upi-transactions-deemed-success-npci/) +- NEFT/RTGS off hours +- Partner bank or beneficiary bank issues +- Other bank or server issues + +You can use this information to keep your beneficiaries informed. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - The status details object in the payouts' API response gives details about the exact reason for a payout state and the next steps to be taken. Please share this information with your developers. +> - You can subscribe to daily reports to receive a detailed document on the status, reason for status and SLA for the payouts in `processing state`. [Raise a support ticket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) from the Dashboard, with a list of recipient email IDs. We will enable the function for you in 3 working days. +> + +## Status Details API Response + +Below is the sample status details response that appears as part of the status details object. + +### Sample Code + +```json: Sample Status Details Response Code +{ + "status_details": { + "description": "IMPS is not enabled on beneficiary account, Retry with different mode", + "source": "beneficiary_bank", + "reason": "imps_not_allowed", + } +} +```json: Complete Status Details Response Code +{ + "id": "pout_00000000000001", + "entity": "payout", + "fund_account_id": "fa_00000000000001", + "amount": 1000000, + "currency": "INR", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "fees": 0, + "tax": 0, + "status": "failed", + "utr": null, + "mode": "IMPS", + "purpose": "refund", + "reference_id": "Acme Transaction ID 12345", + "narration": "Acme Corp Fund Transfer", + "batch_id": null, + "created_at": 1545383037, + "status_details": { + "description": "IMPS is not enabled on beneficiary account, Retry with different mode", + "source": "beneficiary_bank", + "reason": "imps_not_allowed", + } +} +``` + +`description` +: `string` A description for the error. For example, `IMPS is not enabled on beneficiary account, Retry with different mode`. + +`source` +: `string` Possible values: + - `gateway`: Technical error at Razorpay partner bank. + - `beneficiary_bank`: Technical error at beneficiary bank. + - `business`: Merchant action required. + - `internal`: Technical error at Razorpay's server. + +`reason` +: `string` The error reason. For example, `imps_not_allowed`. + +All the reasons for any payout state appear at the [source parameter](#sample-code) of the code. The error reason, source, description and steps to be taken for various payout statuses are given below. + + +### Status: reversed/failed + + + + bank_account_closed + + - **Description**: Payout failed as the beneficiary account is closed. Please contact the beneficiary bank. + - **Source**: beneficiary_bank + - **Next Steps**: NA + + + +### bank_account_frozen + + - **Description**: Payout failed as beneficiary account is frozen. Please contact the beneficiary bank. + - **Source**: beneficiary_bank + - **Next Steps**: NA + + + +### bank_account_invalid + + - **Description**: Payout failed due to invalid beneficiary account details. + - **Source**: beneficiary_bank + - **Next Steps**: NA + + + +### beneficiary_account_dormant + + - **Description**: Payout failed as beneficiary account is dormat. Please contact the beneficiary bank. + - **Source**: beneficiary_bank + - **Next Steps**: NA + + + +### beneficiary_bank_failure + + - **Description**: Payout failed at the beneficiary bank due to a technical issue. Please retry after 30 min. + - **Source**: beneficiary_bank + - **Next Steps**: Retry + + + +### beneficiary_bank_offline + + - **Description**: Beneficiary bank systems are offline. Please retry after 30 min. + - **Source**: beneficiary_bank + - **Next Steps**: Retry + + + +### beneficiary_bank_rejected + + - **Description**: Payout rejected by the beneficiary bank. Please contact the beneficiary bank. + - **Source**: beneficiary_bank + - **Next Steps**: NA + + + +### beneficiary_bank_technical_error + + - **Description**: Payout failed due to a technical issue at the beneficiary bank. Please retry after 30 min. + - **Source**: beneficiary_bank + - **Next Steps**: Retry + + + +### beneficiary_psp_offline + + - **Description**: Beneficiary PSP systems are offline. Please retry after 30 min. + - **Source**: beneficiary_bank + - **Next Steps**: Retry + + + +### imps_not_allowed + + - **Description**: IMPS is not enabled on beneficiary account. Please retry with different mode. + - **Source**: beneficiary_bank + - **Next Steps**: Retry with a different payment mode. + + + +### invalid_ifsc_code + + - **Description**: Payout failed as the IFSC code is invalid. Please correct the IFSC code and retry. + - **Source**: beneficiary_bank + - **Next Steps**: Retry with correct IFSC code. + + + +### npci_beneficiary_timeout + + - **Description**: Temporary technical issue between NPCI and the beneficiary bank. Please retry after 30 min. + - **Source**: beneficiary_bank + - **Next Steps**: Retry + + + +### transaction_limit_exceeded + + - **Description**: Payout amount greater than the limit supported by the beneficiary account. + - **Source**: beneficiary_bank + - **Next Steps**: NA + + + +### amount_limit_exhausted_neft + + - **Description**: The NEFT 24*7 limits for your account has been exhausted. Please retry after sometime. + - **Source**: business + - **Next Steps**: Retry + + + +### beneficiary_account_invalid + + - **Description**: Payout failed due to invalid beneficiary account number. + - **Source**: business + - **Next Steps**: NA + + + +### beneficiary_vpa_invalid + + - **Description**: UPI validation failed. If the UPI ID is valid, please retry after sometime. + - **Source**: business + - **Next Steps**: Ensure UPI ID is valid and retry. + + + +### insufficient_funds + + - **Description**: Payout failed due to insufficient funds in your account. + - **Source**: business + - **Next Steps**: Add funds to your account and retry. + + + +### invalid_beneficiary + + - **Description**: Customer account does not exist with the wallet provider for the given phone number. + - **Source**: business + - **Next Steps**: NA + + + +### gateway_down + + - **Description**: Payout failed as the partner bank is facing technical issues. Please retry. + - **Source**: gateway + - **Next Steps**: Retry + + + +### gateway_technical_error + + - **Description**: Payout failed due to a temporary technical issue at the partner bank. Please retry after 30 min. + - **Source**: gateway + - **Next Steps**: Retry + + + +### gateway_timeout + + - **Description**: Payout timed out at the partner bank. Please retry after 30 min. + - **Source**: gateway + - **Next Steps**: Retry + + + +### server_error + + - **Description**: Payout failed. Contact support for help. + - **Source**: internal + - **Next Steps**: Contact support to find out the exact issue. + + + +### server_error_temporary + + - **Description**: Payout failed due to temporary technical issue. Please retry. + - **Source**: internal + - **Next Steps**: Retry + + + + + + + +### Status: processing + + + + beneficiary_bank_confirmation_pending + + - **Description**: Confirmation of credit to the beneficiary is pending from `beneficiary_bank`. Please check the status after (date,time). + - **Source**: beneficiary_bank + - **Next Steps**: Inform the customer of the delay, reason for the same and by when it will be cleared. + + + +### bank_window_closed + + - **Description**: The `mode` window for the day is closed. Please check the status after (date,time). + - **Source**: gateway + - **Next Steps**: Inform the customer of the delay, reason for the same and by when it will be cleared. + + + +### payout_bank_processing + + - **Description**: Payout is being processed by the partner bank. Please check the final status after (date,time). + - **Source**: gateway + - **Next Steps**: Inform the customer of the delay, reason for the same and by when it will be cleared. + + + +### amount_limit_exhausted + + - **Description**: The (mode) 24*7 limits for your account has been exhausted. Please check the status after (date,time). + - **Source**: business + - **Next Steps**: Inform the customer of the delay, reason for the same and by when it will be cleared. + + + +### partner_bank_pending + + - **Description**: Payout is being processed by our partner bank. Please check the final status after (date,time). + - **Source**: internal + - **Next Steps**: Inform the customer of the delay, reason for the same and by when it will be cleared. + + + + + + + +### Status: processed + + + + payout_processed + + - **Description**: Payout is processed and the money has been credited into the beneficiary's account. + - **Source**: beneficiary_bank + - **Next Steps**: NA + + + + + + + +### Status: pending + + + + pending_approval + + - **Description**: Workflow for the payout is pending approval from the approver(s). + - **Source**: business + - **Next Steps**: NA + + + + + + + +### Status: queued + + + + gateway_degraded + + - **Description**: Payout is queued as Partner bank systems are down. + - **Source**: gateway + - **Next Steps**: NA + + + +### beneficiary_bank_down + + - **Description**: Beneficiary bank's systems are not working. Payout will be processed after the system starts working else it will be failed after the pre-defined time limit. + - **Source**: gateway + - **Next Steps**: NA + + + +### low_balance + + - **Description**: Payout is queued as there is insufficient balance in your account to process the payout. + - **Source**: business + - **Next Steps**: NA + + + +### syncing_balance + + - **Description**: Payout is queued as your balance is being synced with the bank. Please check the status after some time. + - **Source**: gateway + - **Next Steps**: Check status after some time. + + + +### fee_recovery_pending + + - **Description**: Payout is queued as you have a pending fee recovery payout. It will get processed after the fee recovery payout is cleared. + - **Source**: business + - **Next Steps**: NA + + + + + + +### Related Information + +- [About Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) +- [Payout Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/best-practices.md) +- [Status Details via Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/status-details.md) diff --git a/llm-content/faqs.md b/llm-content/faqs.md new file mode 100644 index 00000000..bab66139 --- /dev/null +++ b/llm-content/faqs.md @@ -0,0 +1,270 @@ +--- +title: Get Started | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to some Frequently Asked Questions (FAQs) about Razorpay. +--- + +# Frequently Asked Questions (FAQs) + +### Common + + +### 1. What is Razorpay? + + Razorpay is an RBI-approved payment aggregator that empowers businesses to accept online customer payments easily. It manages the settlement of these payments, ensuring that funds collected from customers are securely transferred to online businesses. Razorpay supports a variety of payment methods, including debit cards, credit cards, cardless EMIs, UPI, bank transfers, e-wallets, and e-mandates, offering businesses flexible options to enhance customer experience. + + List of [Razorpay Products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md). + + + +### 2. How can I start using Razorpay products? + + To start using any Razorpay products, you need to sign up with Razorpay. Know more about [setting up your Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md). + + + +### 3. If I have created an account for Razorpay Payment products, do I still need to create an account with RazorpayX? + + If you have an existing Razorpay account for Razorpay Payment products, you can use the same user id and password for RazorpayX. Know more about [getting started with RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/set-up.md). + + + +### 4. There are so many Razorpay products. How do I know which one is best for my business? + + Please read the section about [choosing the Razorpay products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md) as per your business needs. You can also raise a [support request](https://razorpay.com/support/#request/) for an expert opinion. + + + +### 5. I have signed up now. What do I do next? + + You can log in to the Dashboard, fill out the activation form and submit the same. Know more about [account set up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md). + + + +### 6. How long can I access the features on the test mode? Is there a trial period? + + You can access the Dashboard in test mode for as long as you like. However, you would need to submit your activation form to accept live payments from customers. + + + +### 7. Does Razorpay support payments via bank transfers? + + Yes, you can accept payments via bank transfers using the [Bank Transfers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) payment method on Razorpay Checkout. If you do not have a website or app, you can use our product [Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md). + + + +### 8. I have not received a verification email from Razorpay. How do I proceed? + + An email with the subject line **Confirm Your Email** is sent to your registered email address. If you cannot locate it in your inbox, please check your spam or junk folder. + + If the email is not available in the spam folder, reach out to the [Razorpay support team](https://razorpay.com/support/). + + + +### 9. I do not have a website. Can I still use Razorpay? + + Yes, you can use Razorpay to accept payments even if you do not have a website or mobile app. Check out our [range of products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md). + + + +### 10. How do I sign up for a test or sandbox account? + + After logging in, you can sign up for an account on the Dashboard and use [test mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/test-live-modes.md#test-mode-vs-live-mode) to try out the products. + + + +### 11. Does Razorpay provide Invoices? + + Yes, you can use Razorpay Invoices to create and send invoices to customers and accept payments. Know more about [invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md). + + + +### 12. How can I collect subscriptions from my customers? + + You can offer subscription plans to your customers with automated recurring transactions on various payment modes. Know more about [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md). + + + +### 13. Can I know more about the split payments solution? + + Razorpay Route allows you to split payments between third parties, sellers or bank accounts. Using Route, you can easily manage settlements, refunds, reconciliations and make vendor payments. It is helpful for businesses that disburse payments in a one-to-many model. Know more about [Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route.md). + + + +### 14. How can I earn money from Razorpay? + + We are a payment solutions provider and help businesses to accept payments online. If you have a business venture and are looking to accept payments online, you can [sign up](https://razorpay.com/partners/) with us. Also, we offer a referral program wherein you can refer a business to Razorpay. Know more about [Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners.md). + + + +### 15. How do I apply for a job at Razorpay? + + Thank you, for your interest in being a part of the Razorpay team. Know more about the [current openings](https://razorpay.com/jobs/) at Razorpay. + + + +### 16. I have noticed a bug in your product, how do I report it? + + If you have discovered any security vulnerabilities associated with any of our Razorpay services, we do appreciate your help in disclosing them to us in a responsible manner. Know more about [responsible disclosure](https://razorpay.com/responsible-disclosure/). + + + +### 17. Can I delete my Razorpay account? + + You can only suspend your Razorpay account by contacting [Support Team](https://razorpay.com/in/support/), it cannot be deleted. + + +### Integrations + + +### 1. What are the ecommerce plugins supported by Razorpay? How do we integrate it on our end? + + We support the following ecommerce platforms: + + Payment Gateway Ecommerce Plugins | Other Ecommerce Plugins + --- + - [Arastta Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/arastta.md) +- [BigCommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/bigcommerce.md) +- [CS-Cart Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/cs-cart.md) +- [Easy Digital Download Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/easy-digital-downloads.md) +- [ Magento Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/magento.md) +- [OpenCart Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/open-cart.md) +- [PrestaShop Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/prestashop.md) +- [Shopify Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify.md) +- [WHMCS Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/whmcs.md) +- [Wix Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/wix.md) +- [WooCommerce Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce.md) +- [WordPress Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/wordpress.md) + | [Razorpay Direct - Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/razorpay-direct-credit-card.md) + + + + +### 2. How do I find my Razorpay credentials? + + The email/password is only used to log in to the Dashboard. To authenticate against the API, you will need to generate a KeyID, and KeySecret. Know how to generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + + +### 3. How do I find the base URL for Razorpay API? + + The current Razorpay API is versioned at v1, so all requests should be made here `https://api.razorpay.com/v1/`. + + + +### 4. How do I find sample code for my server language? + + The sample applications are hosted on GitHub. You can find the links to these under the Sample Application section on our [integrations page](http://razorpay.com/integrations/). + + + +### 5. How to create a Razorpay API instance? + + The instance creation method differs based on the platform. Refer to the relevant [SDK Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration.md). + + + +### 6. Where can I find the API references? + + Refer to the [API Reference guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + +### 7. Can I accept customer payments using Paytm wallet? + + Yes, you can provide Paytm as a payment method for your customers via Razorpay. Know more about [Paytm Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paytm.md) as a payment method. + + + +### 8. What are the platforms supported by Razorpay? + + We support a range of web and mobile platforms. Refer to the [integration list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md#integration-types). + + + +### 9. Do you support cryptocurrency business models? + + No. As per RBI regulations, we do not support online payments for crypto businesses. + + + +### 10. The platform I am integrating with is not listed on your webpage. Can I still integrate? + + If the required platform/plugin is not listed, you can try integrating it on your own using this [method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/build-your-own.md). + + +### Pricing + + +### 1. How much does Razorpay charge per transaction? + + Know more about [pricing](https://razorpay.com/pricing/). + + + +### 2. Can the pricing be negotiated? + + We offer custom pricing under the Enterprise plan. Raise a request with the [support team](https://razorpay.com/support) to know more. + + + +### 3. What are the charges involved? Do you charge any set-up-fee? + + Refer to our [pricing policy](https://razorpay.com/pricing/). + + +### International Payments + + +### 1. Can I avail the early settlement feature for international payments and reduce my settlement period from T+7 working days? + + Yes, you can apply for early settlement on international payments at an additional charge. Please reach out to our [support team](https://razorpay.com/support/#request/merchant/international-payment-acceptance). + + + +### 2. Can NGOs accept international payments via Razorpay? + + No, due to compliance guidelines, NGOs cannot accept international payments via Razorpay. + + + +### 3. Does Razorpay support companies registered outside India? + + Yes, Razorpay serves businesses registered in India and [Malaysia](http://curlec.com/). + + + +### 4. How I do display different currencies (other than INR) on the Razorpay Checkout to my customers? + + - You must get the [international payments feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#application-process) enabled on your Razorpay account to accept payments in currencies other than INR. + - The native currencies like USD and SGD, which are a part of the [list of currencies supported by Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies), can be updated as a part of the **currency** parameter on the payment request. + - Raise a request with the [support team](https://razorpay.com/support/#request/merchant/international-payment-acceptance) to display any currencies that are not a part of the above list. + + +### Related Information + +- [Razorpay Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md) +- [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md) +- [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard.md) +- [RazorpayX and Banking Plus](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) + +. + + + +### 2. Can the pricing be negotiated? + + We offer custom pricing under the Enterprise plan. Raise a request with the to know more. + + + +### 3. What are the charges involved? Do you charge any set-up-fee? + + Refer to our . + + +### Related Information + +- [Razorpay Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md) +- [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md) +- [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard.md) diff --git a/llm-content/home.md b/llm-content/home.md new file mode 100644 index 00000000..1441a21d --- /dev/null +++ b/llm-content/home.md @@ -0,0 +1,7 @@ +--- +title: Docs Home Page +--- + +# Docs Home Page + + diff --git a/llm-content/llms-txt.md b/llm-content/llms-txt.md new file mode 100644 index 00000000..e4d1c242 --- /dev/null +++ b/llm-content/llms-txt.md @@ -0,0 +1,10 @@ +--- +title: LLMs.txt +description: Machine-readable documentation index for LLM agents to integrate with Razorpay APIs. +--- + +# LLMs.txt + +We host an [llms.txt](https://razorpay.com/docs/llms.txt) file which instructs AI tools and agents how to retrieve the plain text versions of our pages. + +The llms.txt file is an emerging standard for making websites and content more accessible to LLMs. It provides a structured index of our documentation that AI assistants can use to better understand and integrate with Razorpay APIs. diff --git a/llm-content/mcp-server.md b/llm-content/mcp-server.md new file mode 100644 index 00000000..4c339a68 --- /dev/null +++ b/llm-content/mcp-server.md @@ -0,0 +1,87 @@ +--- +title: About Razorpay MCP Server +description: Set up and use the Razorpay Model Context Protocol (MCP) server to integrate Razorpay APIs with AI tools. +--- + +# About Razorpay MCP Server + +- **Razorpay MCP Server Changelog**: Discover new releases and updates regarding Razorpay MCP Server. + +The Razorpay MCP Server implements the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) to provide seamless integration between Razorpay payment APIs and AI tools. This server enables AI assistants to execute Razorpay API operations, empowering developers to build AI-powered payment applications. + +### About Model Context Protocol (MCP) + +The Model Context Protocol (MCP) is a standard that allows AI models to interact with external tools and services. This allows AI assistants such as Claude to perform tasks on payment platforms like Razorpay using a common connection, which helps create smart, automated payment processes. + + +### Advantages + + - **Zero Infrastructure Overhead**: Use the hosted Remote MCP Server for instant setup. + - **AI-Powered Automation**: Transform payment workflows with natural language commands. + - **Optimised Development**: Build payment applications faster with AI assistance. + - **Real-time Operations**: Execute Razorpay API operations directly through AI assistants. + - **Seamless Integration**: Works with popular AI tools like Claude Desktop, Cursor, and Visual Studio Code. + + + +### Features + + Transform your payment operations with AI-powered automation: + + - **Generate Payment Links**: Create and share Payment Links instantly with natural language commands. + - **Access Transaction Data**: Retrieve order details, settlement information, and payment status in real-time. + - **Analyse Payment Issues**: Get intelligent insights on failed transactions and payment trends. + - **Optimise Development**: Build payment-enabled applications with AI assistance. + - **Generate Standard Checkout Integration Code**: Quickly produce end-to-end Razorpay Standard Checkout integration code for supported frameworks. + + Explore [Use Cases & Examples](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/use-cases.md). + + +## Available Tools + +The Razorpay MCP Server provides comprehensive access to Razorpay APIs through 35+ tools covering: + +- **Payments**: Capture, fetch, and manage payment transactions +- **Orders**: Create and manage orders +- **Payment Links**: Generate and share Payment Links +- **Refunds**: Process and track refunds +- **QR Codes**: Create and manage QR code payments +- **Settlements**: Access settlement and reconciliation data +- **Payouts**: Manage payout operations +- **Standard Checkout**: Integrate Razorpay Standard Checkout for supported frameworks + +View [Complete Tools Reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/tools-reference.md). + +## Deployment Options + +The Razorpay MCP Server offers two deployment models to suit different needs: + + +### Remote MCP Server (Recommended) + + - **Hosted solution** with zero infrastructure overhead. + - **Automatic updates** and high availability. + - **Quick setup** using `npx`. + - **Best for** users who want instant setup and automatic maintenance. + + Get Started with [Razorpay Remote MCP Server](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/remote.md). + + + +### Local MCP Server + + - **Self-hosted** using Docker. + - **Complete control** over infrastructure. + - **Access to all tools** without restrictions. + - **Best for** users who need full control or have specific security requirements. + + Get Started with [Razorpay Local MCP Server](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/local.md). + + +## Get Started + +1. **Choose Your Deployment**: Select between [Remote (recommended)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/remote.md) or [Local MCP Server](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/local.md). +2. **Set Up Prerequisites**: Install required tools (Node.js for Remote, Docker for Local). +3. **Get API Keys**: Generate Razorpay API keys from your Razorpay Dashboard. Alternatively, use [OAuth](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/oauth.md).. +4. **Configure Your AI Tool**: Add the MCP server configuration to Claude Desktop, Cursor, or VS Code. +5. **Start Building**: Begin using AI-powered payment operations. diff --git a/llm-content/mcp-server/configuration.md b/llm-content/mcp-server/configuration.md new file mode 100644 index 00000000..03db49fa --- /dev/null +++ b/llm-content/mcp-server/configuration.md @@ -0,0 +1,42 @@ +--- +title: Razorpay MCP Server Configuration +description: Detailed configuration options and advanced setup for the Razorpay MCP Server. +--- + +# Razorpay MCP Server Configuration + +The Razorpay MCP Server requires the following environment variables for configuration: + +Variable | Type | Required | Description +--- +`RAZORPAY_KEY_ID` | string | Yes | Your Razorpay API key ID +--- +`RAZORPAY_KEY_SECRET` | string | Yes | Your Razorpay API key secret +--- +`LOG_FILE` | string | No | Path to log file for server logs +--- +`TOOLSETS` | string | No | Comma-separated list of toolsets to enable (default: `all`) +--- +`READ_ONLY` | boolean | No | Run server in read-only mode (default: `false`) + +## Command Line Flags + +When running the Local MCP Server binary directly, you can use the following command line flags: + +Flag (Short) | Description +--- +`--key` (`-k`) | Your Razorpay API key ID +--- +`--secret` (`-s`) | Your Razorpay API key secret +--- +`--log-file` (`-l`) | Path to log file +--- +`--toolsets` (`-t`) | Comma-separated list of toolsets to enable +--- +`--read-only` | Enable read-only mode + +## Related Information + +- [Use Cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/use-cases.md) +- [Tools Reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/tools-reference.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/faqs.md) diff --git a/llm-content/mcp-server/faqs.md b/llm-content/mcp-server/faqs.md new file mode 100644 index 00000000..91d550eb --- /dev/null +++ b/llm-content/mcp-server/faqs.md @@ -0,0 +1,34 @@ +--- +title: Frequently Asked Questions (FAQs) +description: Common issues, debugging techniques, and solutions for the Razorpay MCP Server. +--- + +# Frequently Asked Questions (FAQs) + +### 1. What is MCP (Model Context Protocol)? + + The Model Context Protocol (MCP) is an open standard that allows AI models to interact with external tools and services. It enables AI assistants like Claude to execute operations on platforms like Razorpay through a standardised interface, allowing for seamless integration and natural language interactions with payment systems. + + + +### 2. Can I use the Razorpay MCP Server in production? + + Yes, the Razorpay MCP Server is an official integration designed for production use. Make sure to use appropriate API keys based on your environment (test keys for development, live keys for production) and follow security best practices for API key management. + + + +### 3. How do I switch between test and live modes? + + Use the corresponding [Razorpay API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) for your desired environment. For test mode, use test environment API keys (starting with rzp_test_). For live mode, use production API keys (starting with rzp_live_). The MCP Server automatically detects the environment based on your API keys. + + + +### 4. What is the difference between Remote and Local MCP Server? + + Remote MCP Server is hosted by Razorpay with zero infrastructure management, automatic updates, and quick setup using npx. Local MCP Server is self-hosted using Docker, providing complete control over infrastructure and access to all tools without restrictions. We recommend Remote MCP Server for most use cases. + + + +### 5. Which AI-assisted applications are supported? + + The Razorpay MCP Server works with Claude Desktop, Cursor, Visual Studio Code (with MCP extension), and other MCP-compatible tools. Each application has slightly different configuration requirements, but all follow the same MCP standard. diff --git a/llm-content/mcp-server/local.md b/llm-content/mcp-server/local.md new file mode 100644 index 00000000..b0301f96 --- /dev/null +++ b/llm-content/mcp-server/local.md @@ -0,0 +1,164 @@ +--- +title: Razorpay Local MCP Server Setup +description: Complete guide to set up and run the Razorpay MCP Server locally using Docker. +--- + +# Razorpay Local MCP Server Setup + +The Razorpay Local MCP Server is a self-hosted solution that provides complete control over your infrastructure and access to all available tools without restrictions. Choose this option if you need full functionality or have specific security requirements. + +## Setup Options + +Refer to the [Prerequisites](#prerequisites) section and then choose a setup method to proceed. You can use [Docker (recommended)](#docker-setup-instructions-recommended) or [build from source](#build-from-source-instructions). + + +### Prerequisites + + Before setting up the Razorpay Local MCP Server, ensure you have: + - **Docker**: Container platform for running the MCP server. + - **Git**: Version control system for cloning repositories (if building from source). + - **Golang (Go)**: Programming language runtime (if building from source). + - **Razorpay API Keys**: Generate [API keys](https://razorpay.com/docs/payments/dashboard/account-settings/api-keys/#generate-api-keys) from your Dashboard. + - **AI-assisted Application**: Claude Desktop, VS Code, or similar AI-assisted application. + + + +### Docker Setup Instructions (Recommended) + + 1. Clone the repository: + ```bash: Clone Repo + git clone https://github.com/razorpay/razorpay-mcp-server.git + cd razorpay-mcp-server + ``` + 2. Build the Docker image: + ```bash: Build Docker Image + docker build -t razorpay-mcp-server:latest + ``` + The resulting image `razorpay-mcp-server:latest` will be available in your local Docker registry. + + + +### Build From Source Instructions + + 1. Clone the repository: + ```bash: Clone Repo + git clone https://github.com/razorpay/razorpay-mcp-server.git + cd razorpay-mcp-server + ``` + 2. Build the Go binary: + ```bash: Build Go Binary + go build -o razorpay-mcp-server ./cmd/razorpay-mcp-server + ``` + + The resulting binary `razorpay-mcp-server` will be created in your current directory. + + +## Integration Steps + +### Step 1: Configure Application + +Follow the integration steps given below: + + + To use the Razorpay MCP Server with Claude Desktop: + 1. Install [Claude Desktop](https://claude.ai/download). + 2. Go to **Settings** → **Developer** → **Edit Config**. + 3. Add the following to your `claude_desktop_config.json` file: + + ```json + { + "mcpServers": { + "razorpay-mcp-server": { + "command": "docker", + "args": [ + "run", + "--rm", + "-i", + "-e", + "RAZORPAY_KEY_ID", + "-e", + "RAZORPAY_KEY_SECRET", + "razorpay-mcp-server:latest" + ], + "env": { + "RAZORPAY_KEY_ID": "your_razorpay_key_id", + "RAZORPAY_KEY_SECRET": "your_razorpay_key_secret" + } + } + } + } + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> - **Replace** `your_razorpay_key_id` and `your_razorpay_key_secret` with your actual Razorpay API credentials. +> - [Configure MCP servers in Claude Desktop](https://modelcontextprotocol.io/quickstart/user) +> + + + + 1. Open **Visual Studio Code**. + 2. Open Command Palette and type **Preferences: Open User Settings (JSON)**. + 3. Select it from the dropdown to open the settings file. + 4. Paste the following configuration: + + ```json + { + "mcp": { + "inputs": [ + { + "type": "promptString", + "id": "razorpay_key_id", + "description": "Razorpay Key ID", + "password": false + }, + { + "type": "promptString", + "id": "razorpay_key_secret", + "description": "Razorpay Key Secret", + "password": true + } + ], + "servers": { + "razorpay": { + "command": "docker", + "args": [ + "run", + "-i", + "--rm", + "-e", + "RAZORPAY_KEY_ID", + "-e", + "RAZORPAY_KEY_SECRET", + "razorpay-mcp-server:latest" + ], + "env": { + "RAZORPAY_KEY_ID": "${input:razorpay_key_id}", + "RAZORPAY_KEY_SECRET": "${input:razorpay_key_secret}" + } + } + } + } + } + ``` + + Learn more about MCP servers in VS Code's [agent mode documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers). + + +## Step 2: Restart Application + +Restart your AI assistant application after configuration. You should see [Razorpay MCP tools](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/tools-reference.md) become available. Test the connection by asking: **Show me available Razorpay tools**. + +If successful, you should see the complete list of Razorpay MCP tools, including tools that are restricted in the Remote MCP Server. + +## Next Steps + +Once your Local MCP Server is running: + +1. **Explore Advanced Features**: Access all tools including refunds and settlements. +2. **Configure Advanced Options**: See [Configuration Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/configuration.md) for detailed settings. +3. **Review Use Cases**: Check [practical examples](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/use-cases.md) that leverage local-only tools. diff --git a/llm-content/mcp-server/oauth.md b/llm-content/mcp-server/oauth.md new file mode 100644 index 00000000..ed6450b1 --- /dev/null +++ b/llm-content/mcp-server/oauth.md @@ -0,0 +1,435 @@ +--- +title: Integrate OAuth 2.0 with Razorpay MCP Server +description: Enable granular permissions and user-based authorisation using OAuth 2.0 with Razorpay MCP Server. +--- + +# Integrate OAuth 2.0 with Razorpay MCP Server + +The Razorpay MCP Server uses OAuth 2.0 to authenticate MCP clients securely. OAuth provides enhanced security compared to using secret keys directly, as it enables granular permissions and user-based authorisation. + + +### Benefits + + - **Enhanced Security**: No need to share API secret keys directly. + - **Granular Permissions**: Control access at a more detailed level. + - **User-Based Authorisation**: Individual user consent and access management. + - **Token Expiration**: Temporary access tokens that can be refreshed or revoked. + + +## Client Registration Methods + +Razorpay MCP Server supports two methods for registering OAuth clients: + + +### Dynamic Client Registration (DCR) + + Your application registers itself programmatically by calling the `/register` endpoint. This is the recommended approach for MCP clients. + + **How it works** + + DCR allows MCP clients to register themselves programmatically with the Razorpay authorisation server, instead of requiring manual creation of client credentials. + + When a client sends a registration request to the `/register` endpoint, the authorisation server creates a new client with a unique `client_id` and `client_secret`. + + + +### Manual Registration + + Write to the [Razorpay Support Team](mailto:n8n-node-support@razorpay.com) to generate a Client id and secret manually. + + +## OAuth Flow + +The Razorpay MCP Server implements the OAuth 2.0 Authorisation Code flow. Here is how the integration works: + +1. **Discover Endpoints**: Retrieve OAuth endpoints from the well-known configuration. +2. **Register Client**: Register your application using Dynamic Client Registration. +3. **Request Authorisation**: Direct users to the authorisation endpoint. +4. **Receive Authorisation Code**: Handle the callback with the temporary code. +5. **Exchange for Access Token**: Trade the authorisation code for an access token. +6. **Access MCP Tools**: Use the access token to call Razorpay MCP Server tools. + +## Integration Steps + + +### Step 1: Discover OAuth Endpoints + + Before starting the OAuth flow, retrieve the available endpoints and supported configurations using the well-known endpoint. + + https://mcp.razorpay.com/.well-known/oauth-authorization-server + + ```curl: Request + curl -X GET https://mcp.razorpay.com/.well-known/oauth-authorization-server + ```json: Response + { + "issuer": "https://mcp.razorpay.com", + "authorization_endpoint": "https://mcp.razorpay.com/authorize", + "token_endpoint": "https://mcp.razorpay.com/token", + "registration_endpoint": "https://mcp.razorpay.com/register", + "scopes_supported": [ + "read_only" + ], + "response_types_supported": [ + "code" + ], + "grant_types_supported": [ + "authorization_code", + "client_credentials", + "refresh_token" + ], + "token_endpoint_auth_methods_supported": [ + "client_secret_post" + ], + "code_challenge_methods_supported": [ + "S256" + ] + } + ``` + + + Response Parameters + +`issuer` +: `string` The OAuth 2.0 issuer identifier. + +`authorization_endpoint` +: `string` The URL for requesting user authorisation. + +`token_endpoint` +: `string` The URL for exchanging authorisation codes for tokens. + +`registration_endpoint` +: `string` The URL for [Dynamic Client Registration](#step-2-register-your-client). MCP clients use this endpoint to register programmatically and obtain client credentials. + +`scopes_supported` +: `array` List of available OAuth scopes. + +`response_types_supported` +: `array` Supported OAuth response types. + +`grant_types_supported` +: `array` Supported OAuth grant types. + +`token_endpoint_auth_methods_supported` +: `array` Supported methods for authenticating at the token endpoint. For example, `client_secret_post` indicates that the client secret is sent in the request body. + +`code_challenge_methods_supported` +: `array` PKCE (Proof Key for Code Exchange) challenge methods. `S256` indicates SHA-256. + + + + + + +### Step 2: Register Your Client + + Register your application to obtain a Client id and secret. You can use either of the following methods: + - **Dynamic Client Registration (Recommended)**: Your application registers itself programmatically by sending a `POST` request to the `/register` endpoint. + - **Manual Registration**: Write to the [Razorpay Support Team](mailto:n8n-node-support@razorpay.com) to generate client credentials. + + ### Dynamic Client Registration + + Send a `POST` request to the registration endpoint with your client details. + + https://mcp.razorpay.com/register + + ```curl: Request + curl -H 'Content-Type: application/json' \ + -X POST https://mcp.razorpay.com/register \ + -d '{ + "client_name": "MCP Inspector", + "redirect_uris": [ + "http://localhost:6274/oauth/callback/debug" + ], + "grant_types": [ + "authorization_code", + "refresh_token" + ], + "response_types": [ + "code" + ], + "scope": "read_only", + "token_endpoint_auth_method": "none", + "client_uri": "https://github.com/modelcontextprotocol/inspector" + }' + ```json: Response + { + "client_id": "xxxxxxxxxxxx", + "client_secret": "xxxxxxxxxxxx", + "client_id_issued_at": 1770803945, + "client_name": "MCP Inspector", + "redirect_uris": [ + "http://localhost:6274/oauth/callback/debug" + ], + "grant_types": [ + "authorization_code", + "refresh_token" + ], + "response_types": [ + "code" + ], + "token_endpoint_auth_method": "client_secret_post", + "application_type": "public", + "scope": "read_only", + "application_id": "xxxxxxxxxxxxx" + } + ``` + + + Request Parameters + +`client_name` _mandatory_ +: `string` A human-readable name for your client application. + +`redirect_uris` _mandatory_ +: `array` List of redirect URIs to which the authorisation server redirects the user after an authorisation grant. These must exactly match the `redirect_uri` parameter used in authorisation requests. + +`grant_types` _mandatory_ +: `array` OAuth 2.0 grant types the client will use. Supported values: `authorization_code`, `refresh_token`. + +`response_types` _mandatory_ +: `array` OAuth 2.0 response types the client will use. Use `code` for the authorisation code flow. + +`scope` _optional_ +: `string` Requested OAuth scopes. For example, `read_only`. + +`token_endpoint_auth_method` _optional_ +: `string` Authentication method for the token endpoint. Use `none` for public clients. + +`client_uri` _optional_ +: `string` URL of the client application's home page. + + + + + +### Response Parameters + +`client_id` +: `string` Unique identifier assigned to your client. Use this in authorisation and token requests. + +`client_secret` +: `string` Secret key for your client. Store this securely and use it when exchanging authorisation codes for tokens. + +`client_id_issued_at` +: `integer` Unix timestamp indicating when the client credentials were issued. + +`client_name` +: `string` The registered name of your client application. + +`redirect_uris` +: `array` The registered redirect URIs for your client. + +`grant_types` +: `array` The grant types your client is authorised to use. + +`response_types` +: `array` The response types your client is authorised to use. + +`token_endpoint_auth_method` +: `string` The authentication method assigned for the token endpoint. For example, `client_secret_post`. + +`application_type` +: `string` The type of client created. For example, `public`. + +`scope` +: `string` The scopes granted to your client. + +`application_id` +: `string` Unique identifier for the application associated with the client. + + + + + + +### Step 3: Request User Authorisation + + Redirect users to the authorisation endpoint to grant access to your application. + + https://mcp.razorpay.com/authorize + + ```curl: Request + https://mcp.razorpay.com/authorize?response_type=code&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT_URI}&scope=read_only&state={RANDOM_STATE_VALUE}&code_challenge={CODE_CHALLENGE}&code_challenge_method=S256 + ```curl: Example Request + https://mcp.razorpay.com/authorize?response_type=code&client_id=xyz123&redirect_uri=https://cli.tool/callback&scope=read_only&state=random_state_string&code_challenge=hashed_code_verifier&code_challenge_method=S256 + ``` + + + Query Parameters + +`response_type` _mandatory_ +: `string` Must be `code` for authorisation code flow. + +`client_id` _mandatory_ +: `string` Your registered client identifier, obtained from [Step 2](#step-2-register-your-client). + +`redirect_uri` _mandatory_ +: `string` URL where the user will be redirected after authorisation. Must match a URI registered during client registration. + +`scope` _mandatory_ +: `string` Requested permissions. For example, `read_only`. + +`code_challenge` _recommended_ +: `string` PKCE code challenge. Generate a random string (code verifier), then compute its SHA-256 hash and Base64 URL-encode the result. + +`code_challenge_method` _recommended_ +: `string` Must be `S256` when using PKCE. + +`state` _recommended_ +: `string` Random string to prevent CSRF attacks. + + + + + +### User Experience + + When users visit this URL, they: + 1. Log in to their Razorpay account. + 2. Review the permissions your application is requesting. + 3. Approve or deny access. + + + + + + +### Step 4: Handle Authorisation Callback + + After the user approves access, Razorpay redirects them to your `redirect_uri` with an authorisation code. + + **Callback URL Format** + + `https://cli.tool/callback?code={AUTHORIZATION_CODE}&state={STATE_VALUE}` + + + + Callback Parameters + +`code` +: `string` Temporary authorisation code (single-use). + +`state` +: `string` The same state value you sent in the authorisation request. + + + + + +> **WARN** +> +> +> **Security Check** +> +> Always verify that the `state` parameter matches the value you sent in the initial request to prevent CSRF attacks. +> + + + + +### Step 5: Exchange Authorisation Code for Access Token + + Use the authorisation code to obtain an access token from the token endpoint. + + https://mcp.razorpay.com/token + + ```curl: Request + curl -X POST https://mcp.razorpay.com/token \ + -H "Content-Type: application/x-www-form-urlencoded" \ + -d "grant_type=authorization_code" \ + -d "client_id=xyz123" \ + -d "client_secret=secret456" \ + -d "code=authCodeXYZ" \ + -d "redirect_uri=https://cli.tool/callback" \ + -d "code_verifier=rawRandomStringUsedEarlier" + ```json: Response + { + "access_token": "mcp_access_token_abc123", + "token_type": "Bearer", + "expires_in": 3600, + "scope": "read_only" + } + ``` + + + Request Parameters + +`grant_type` _mandatory_ +: `string` Must be `authorization_code`. + +`client_id` _mandatory_ +: `string` Your registered client identifier. + +`client_secret` _conditional_ +: `string` Required for confidential clients. Send this in the request body (`client_secret_post` method). + +`code` _mandatory_ +: `string` The authorisation code from [Step 4](#step-4-handle-authorisation-callback). + +`redirect_uri` _mandatory_ +: `string` Must match the URI used in the authorisation request. + +`code_verifier` _conditional_ +: `string` Required if a `code_challenge` was sent in the authorisation request. This is the original random string used to generate the code challenge. + + + + + +### Response Parameters + +`access_token` +: `string` OAuth bearer token for accessing MCP tools. Use this token in the Authorization header for all API requests. + +`token_type` +: `string` Always `Bearer`. This indicates the type of token returned. + +`expires_in` +: `integer` Token lifetime in seconds. For example, 3600 = 1 hour. Track this value to refresh tokens before expiration. + +`scope` +: `string` Granted permissions. Indicates which scopes were approved by the user. + + + + + + +### Step 6: Use Access Token to Call MCP Tools + + Include the access token in the Authorisation header when making requests to Razorpay MCP Server tools. + + https://mcp.razorpay.com/api/tool-endpoint + + ```curl: Request + curl -X GET https://mcp.razorpay.com/api/tool-endpoint \ + -H "Authorization: Bearer mcp_access_token_abc123" + ```curl: Example Request + curl -X GET https://mcp.razorpay.com/api/payments/pay_123456 \ + -H "Authorization: Bearer mcp_access_token_abc123" + ``` + + +## Token Management + + +### Token Expiration + + Access tokens expire after a set period. Monitor the `expires_in` value and implement token refresh logic in your application. + + + +### Token Storage + + Store access tokens securely: + - Never commit tokens to version control. + - Use environment variables or secure vaults. + - Encrypt tokens at rest. + - Clear tokens from memory after use. + + + +### Token Revocation + + If you need to revoke a token before expiration, contact [Razorpay Support team](mailto:n8n-node-support@razorpay.com) or implement token management in your application settings. diff --git a/llm-content/mcp-server/remote.md b/llm-content/mcp-server/remote.md new file mode 100644 index 00000000..7dab6b2c --- /dev/null +++ b/llm-content/mcp-server/remote.md @@ -0,0 +1,223 @@ +--- +title: Razorpay Remote MCP Server Setup +description: Step-by-step guide to set up the Razorpay Remote MCP Server with zero infrastructure overhead. +--- + +# Razorpay Remote MCP Server Setup + +The Razorpay Remote MCP Server is a hosted solution that provides zero infrastructure overhead with automatic updates and high availability. This is the **recommended deployment option** for most users. + +## Prerequisites + +Before installing the Razorpay Remote MCP Server, ensure you have: + +- **AI Assistant**: Claude Desktop, Cursor, Visual Studio Code, or similar AI-assisted application. +- **Razorpay Account**: Active Razorpay account with API access. +- **Authentication**: Generate [Razorpay API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. Alternatively, you can use [OAuth](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/oauth.md). + +## Step 1: Install Node.js + +The Remote MCP Server requires Node.js and `npm`. Choose the installation method for your operating system: + +### For Mac + + + 1. Go to [nodejs.org](http://nodejs.org/). + 2. Download the LTS (Long Term Support) version. + 3. Run the installer (.pkg file). + 4. Follow the installation prompts. + + + Run the following command on terminal: + ```bash: Install Node.js + brew install node + ``` + + +### For Windows + + + 1. Go to [nodejs.org](http://nodejs.org/). + 2. Download the LTS version for Windows. + 3. Run the installer (.msi file). + 4. Follow the installation wizard. + 5. Make sure to check **Add to PATH** during installation. + + + Run the following command: + ```bash: Install Node.js + choco install nodejs + ``` + + + Run the following command: + ```bash: Install Node.js + winget install OpenJS.NodeJS + ``` + + +## Step 2: Verify Installation + +After installing Node.js, open your terminal/command prompt and verify the installation: + +```bash: Verify Installation +node --version +npm --version +npx --version +``` + +You should see version numbers for all three commands. + +## Step 3: Authenticate Razorpay Account + +Generate API keys and create a merchant token. + +### Generate API Keys + +Follow these steps to generate the API keys: + +1. Log in to your [Razorpay Dashboard](https://dashboard.razorpay.com/). +2. Navigate to **Account & Settings** → **API Keys**. +3. Generate your API keys (Key ID and Key Secret). +4. Copy both the Key ID and Key Secret. + +### Encode Merchant Token +Encode your merchant token by running the following command in your terminal: + +```bash: Encode Merchant Token +echo : | base64 +# Output: cnpwX3Rlc3RfYWJjMTIzOnNlY3JldF9kZWY0NTY= +``` + +> **WARN** +> +> +> **Watch Out!** +> +> Replace `` and `` with your actual credentials. +> + +Save this base64-encoded token as you will need it for configuration. + +## Step 4: Configure Your AI-assisted Application + +Choose your AI-assisted application and follow the corresponding configuration steps. + +> **WARN** +> +> +> **Deprecation Notice** +> +> Effective **August 13, 2025**, the endpoint `https://mcp.razorpay.com/sse` is deprecated and replaced by `https://mcp.razorpay.com/mcp`, which supports streamable HTTP responses for improved performance. Update your integrations immediately to avoid service disruptions. Refer to the [changelog](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/changelog.md). +> + + +### Claude Desktop Configuration + + 1. Open **Claude Desktop**. + 2. Navigate to **Settings** → **Developer** → **Edit Config**. + 3. Paste the following configuration and save the file: + + ```json: Claude Desktop Configuration + { + "mcpServers": { + "rzp-mcp-server": { + "command": "npx", + "args": [ + "mcp-remote", + "https://mcp.razorpay.com/mcp", + "--header", + "Authorization: Basic " + ] + } + } + } + ``` + + **Replace** `` with the base64 token generated in Step 3. + + + + +### Cursor Configuration + + 1. Open **Cursor**. + 2. Navigate to **Settings** → **Cursor Settings**. + 3. Go to **MCP tools** and click **Add Custom MCP** (or edit existing MCP.json file). + 4. Paste the following configuration: + + ```json: Cursor Configuration + { + "mcpServers": { + "rzp-mcp-server": { + "command": "npx", + "args": [ + "mcp-remote", + "https://mcp.razorpay.com/mcp", + "--header", + "Authorization:${AUTH_HEADER}" + ], + "env": { + "AUTH_HEADER": "Basic " + } + } + } + } + ``` + + **Replace** `` with your base64-encoded token. + + + + +### Visual Studio Code Configuration + + 1. Open **Visual Studio Code** + 2. Open Command Palette and type **Preferences: Open User Settings (JSON)** + 3. Select it from the dropdown to open the settings file + 4. Paste the following configuration: + + ```json: Visual Studio Code Configuration + { + "mcp": { + "inputs": [ + { + "type": "promptString", + "id": "merchant_token", + "description": "Razorpay Merchant Token", + "password": true + } + ], + "servers": { + "razorpay-remote": { + "command": "npx", + "args": [ + "mcp-remote", + "https://mcp.razorpay.com/mcp", + "--header", + "Authorization: Basic ${input:merchant_token}" + ] + } + } + } + } + ``` + + Learn about MCP servers in VS Code's [agent mode documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers). + + + +## Step 5: Restart Application + +Restart your AI assistant application after adding the configuration. You should see Razorpay MCP tools become available. Test the connection by asking: **Show me available Razorpay tools**. + +If successful, you should see a list of available Razorpay MCP tools. + +## Next Steps + +Once your Remote MCP Server is set up: + +1. **Explore Use Cases**: Review [practical examples](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/use-cases.md) of AI-powered payment operations. +2. **Learn Available Tools**: Check the [Tools Reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/tools-reference.md) for complete capabilities. +3. **Advanced Configuration**: See [Configuration Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/configuration.md) for additional options. +4. **Start Building**: Begin using natural language commands to interact with Razorpay APIs diff --git a/llm-content/mcp-server/tools-reference.md b/llm-content/mcp-server/tools-reference.md new file mode 100644 index 00000000..4c8abb21 --- /dev/null +++ b/llm-content/mcp-server/tools-reference.md @@ -0,0 +1,112 @@ +--- +title: Razorpay MCP Tools Reference +description: Complete reference of all available tools in the Razorpay MCP Server with API mappings. +--- + +# Razorpay MCP Tools Reference + +The Razorpay MCP Server provides comprehensive access to Razorpay APIs through the following tools. Each tool corresponds to specific Razorpay API endpoints and enables AI assistants to perform payment operations seamlessly. + +## Tools Overview + +The MCP server provides **35+ tools** organised across the following categories: + +- **Payments** (5 tools): Core payment operations +- **Payment Links** (6 tools): Payment link management +- **Orders** (5 tools): Order lifecycle management +- **Refunds** (6 tools): Refund processing and tracking +- **QR Codes** (7 tools): QR code payment operations +- **Settlements** (6 tools): Settlement and reconciliation +- **Payouts** (2 tools): Payout management +- **Standard Checkout**: Integrate Razorpay Standard Checkout for supported frameworks + +## Complete Tools List + +Tool | Description | API Link | Remote Server Support +--- +`capture_payment` | Change the Payment status from authorised to captured. | [API](https://razorpay.com/docs/api/payments/capture/) | ✓ +--- +`fetch_payment` | Fetch Payment details with id. | [API](https://razorpay.com/docs/api/payments/fetch-with-id/) | ✓ +--- +`fetch_payment_card_details` | Fetch card details used for a Payment. | [API](https://razorpay.com/docs/api/payments/fetch-payment-expanded-card/) | ✓ +--- +`fetch_all_payments` | Fetch all Payments with filtering and pagination. | [API](https://razorpay.com/docs/api/payments/fetch-all-payments/) | ✓ +--- +`update_payment` | Update the notes field of a Payment. | [API](https://razorpay.com/docs/api/payments/update/) | ✓ +--- +`create_payment_link` | Creates a new Standard Payment Link. | [API](https://razorpay.com/docs/api/payments/payment-links/create-standard/) | ✓ +--- +`create_payment_link_upi` | Creates a new UPI Payment Link. | [API](https://razorpay.com/docs/api/payments/payment-links/create-upi/) | ✓ +--- +`fetch_all_payment_links` | Fetch all the Payment Links. | [API](https://razorpay.com/docs/api/payments/payment-links/fetch-all-standard/) | ✓ +--- +`fetch_payment_link` | Fetch details of a Payment Link. | [API](https://razorpay.com/docs/api/payments/payment-links/fetch-id-standard/) | ✓ +--- +`send_payment_link` | Send a Payment Link via SMS or email. | [API](https://razorpay.com/docs/api/payments/payment-links/resend/) | ✓ +--- +`update_payment_link` | Updates a new standard Payment Link. | [API](https://razorpay.com/docs/api/payments/payment-links/update-standard/) | ✓ +--- +`create_order` | Creates an Order. | [API](https://razorpay.com/docs/api/orders/create/) | ✓ +--- +`fetch_order` | Fetch Order with id. | [API](https://razorpay.com/docs/api/orders/fetch-with-id/) | ✓ +--- +`fetch_all_orders` | Fetch all Orders. | [API](https://razorpay.com/docs/api/orders/fetch-all/) | ✓ +--- +`update_order` | Update an Order. | [API](https://razorpay.com/docs/api/orders/update/) | ✓ +--- +`fetch_order_payments` | Fetch all Payments for an Order. | [API](https://razorpay.com/docs/api/orders/fetch-payments/) | ✓ +--- +`create_refund` | Creates a Refund. | [API](https://razorpay.com/docs/api/refunds/create-instant/) | ❌ +--- +`fetch_refund` | Fetch Refund details with id. | [API](https://razorpay.com/docs/api/refunds/fetch-with-id/) | ✓ +--- +`fetch_all_refunds` | Fetch all Refunds. | [API](https://razorpay.com/docs/api/refunds/fetch-all/) | ✓ +--- +`update_refund` | Update Refund notes with id. | [API](https://razorpay.com/docs/api/refunds/update/) | ✓ +--- +`fetch_multiple_refunds_for_payment` | Fetch multiple Refunds for a Payment. | [API](https://razorpay.com/docs/api/refunds/fetch-multiple-refund-payment/) | ✓ +--- +`fetch_specific_refund_for_payment` | Fetch a specific Refund for a Payment. | [API](https://razorpay.com/docs/api/refunds/fetch-specific-refund-payment/) | ✓ +--- +`create_qr_code` | Creates a QR Code. | [API](https://razorpay.com/docs/api/qr-codes/create/) | ✓ +--- +`fetch_qr_code` | Fetch QR Code with id. | [API](https://razorpay.com/docs/api/qr-codes/fetch-with-id/) | ✓ +--- +`fetch_all_qr_codes` | Fetch all QR Codes. | [API](https://razorpay.com/docs/api/qr-codes/fetch-all/) | ✓ +--- +`fetch_qr_codes_by_customer_id` | Fetch QR Codes with Customer id. | [API](https://razorpay.com/docs/api/qr-codes/fetch-customer-id/) | ✓ +--- +`fetch_qr_codes_by_payment_id` | Fetch QR Codes with Payment id. | [API](https://razorpay.com/docs/api/qr-codes/fetch-payment-id/) | ✓ +--- +`fetch_payments_for_qr_code` | Fetch Payments for a QR Code. | [API](https://razorpay.com/docs/api/qr-codes/fetch-payments/) | ✓ +--- +`close_qr_code` | Closes a QR Code. | [API](https://razorpay.com/docs/api/qr-codes/close/) | ❌ +--- +`fetch_all_settlements` | Fetch all Settlements. | [API](https://razorpay.com/docs/api/settlements/fetch-all/) | ✓ +--- +`fetch_settlement_with_id` | Fetch Settlement details. | [API](https://razorpay.com/docs/api/settlements/fetch-with-id/) | ✓ +--- +`fetch_settlement_recon_details` | Fetch Settlement reconciliation report. | [API](https://razorpay.com/docs/api/settlements/fetch-recon/) | ✓ +--- +`create_instant_settlement` | Create an Instant Settlement. | [API](https://razorpay.com/docs/api/settlements/instant/create/) | ❌ +--- +`fetch_all_instant_settlements` | Fetch all Instant Settlements. | [API](https://razorpay.com/docs/api/settlements/instant/fetch-all/) | ✓ +--- +`fetch_instant_settlement_with_id` | Fetch Instant Settlement with id. | [API](https://razorpay.com/docs/api/settlements/instant/fetch-with-id/) | ✓ +--- +`fetch_all_payouts` | Fetch all Payout details with account number. | [API](https://razorpay.com/docs/api/x/payouts/fetch-all/) | ✓ +--- +`fetch_payout_by_id` | Fetch the Payout details with Payout id. | [API](https://razorpay.com/docs/api/x/payouts/fetch-with-id/) | ✓ +--- +`detect_stack` | Detect project language/framework for checkout integration. | N/A (MCP Integration Helper) | ✓ +--- +`integrate_razorpay_checkout` | Generate end-to-end Razorpay Standard Checkout integration code for supported frameworks. | N/A (MCP Integration Helper) | ✓ + +- ✓ **Supported**: Available in both Remote and Local MCP servers. +- ❌ **Local Only**: Only available in Local MCP server deployment. + +## Next Steps + +- [Remote MCP Server](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/remote.md) (recommended) +- [Local MCP Server](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/local.md) +- [View Use Cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/use-cases.md) diff --git a/llm-content/mcp-server/use-cases.md b/llm-content/mcp-server/use-cases.md new file mode 100644 index 00000000..73af10e4 --- /dev/null +++ b/llm-content/mcp-server/use-cases.md @@ -0,0 +1,42 @@ +--- +title: Razorpay MCP Server Use Cases +description: Real-world examples and use cases for integrating Razorpay APIs with AI tools using MCP. +--- + +# Razorpay MCP Server Use Cases + +Transform your payment workflows with AI-powered automation. Here is what you can achieve with the Razorpay MCP Server: + +## Instant Payment Operations + +**Create a Payment Link for ₹25,000 for Acme Enterprises** + +Generate Payment Links instantly without dashboards or developer involvement. Perfect for support teams handling customer calls or sales teams creating quotes on the fly. + +Watch this video to know how to generate a Payment Link from Claude Desktop using Razorpay MCP Server. + +![Create Payment Link from Claude Desktop using Razorpay MCP Server](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-payment-link-mcp-server-claude.gif.md) + +**Show me settlement details for last week** + +Access transaction data immediately instead of navigating multiple dashboards. Finance teams can reconcile accounts in seconds, not hours. + +## Intelligent Payment Analysis + +**Can you share trend for failed payments in the last 30 days?** + +Generate comprehensive failure reports with trends and patterns. Identify systemic issues before they impact more customers. + +Watch this video to know how to generate payment failure reports for a specific time period from Claude Desktop using Razorpay MCP Server. + +![Payment Failure Trend Analysis from Claude Desktop using Razorpay MCP Server](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-failure-analysis-claude-mcp-server.gif.md) + +**Why did Gaurav Kumar's payment fail yesterday?** + +Get instant failure analysis with specific reasons and suggested fixes. No more hunting through logs or waiting for technical teams. + +## Related Information + +- [Remote MCP Server](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/remote.md) (recommended) +- [Local MCP Server](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/local.md) +- [Available tools](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server/tools-reference.md) diff --git a/llm-content/partners.md b/llm-content/partners.md new file mode 100644 index 00000000..b6e2931a --- /dev/null +++ b/llm-content/partners.md @@ -0,0 +1,93 @@ +--- +title: Refer and Earn as a Razorpay Partner +heading: About Partners +description: Know about Razorpay Partnership program and the different partnership types. Check how to enroll as a Partner. +--- + +# About Partners + +The Razorpay Partnership Program is a referral program through which you can offer the Razorpay product suite to your clients or customers and get rewarded. This program is a source of additional income for Razorpay Partners. + +## Who Can Become a Partner + +To become a partner you must meet the following requirements. + + +### Partner Location Requirements + + The Razorpay Partnership Program welcomes partners from anywhere in the world. + + - Whether you are based in India, the United States, Indonesia, Canada or any other country, you can join Razorpay's global partner network. For example, if you operate a business like Acme Corp from the United States, you can become a Razorpay partner. + - Partners can sign up for programs in India and/or Malaysia. For instance, if you operate Acme Corp from the United States, you have the flexibility to become a Razorpay partner in India, Malaysia or both markets simultaneously. + - You can only onboard merchants operating in the country where you have registered as a partner. For example, if you have joined the Razorpay Partnership Program exclusively in India, you can refer only Indian businesses. Similarly, if you have registered as a partner only in Malaysia, you can refer only Malaysian businesses. + + + +### Business Requirements + + Any business, ranging from an enterprise to an individual with a client base that needs online payment solutions for their business, can be a part of this program. Here are some of the popular categories amongst existing Razorpay Partners: + + + - Web and app developers + - Bloggers and influencers + - Freelancers + - E-commerce consultants + - Individuals and students + + + - Digital marketing service providers + - Web hosting services + - Enterprise Resource Planning software + + + + +#### Advantages +- **Fast & seamless onboarding**: Get started with Razorpay in less than 5 minutes with 100% paperless onboarding. +- **Lucrative rewards for all**: Earn [commissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions.md) for every transaction carried out by your affiliate accounts. +- **Extensive partner support**: Get features like bulk email, chatbot support, refund tracking system along with a dedicated account manager. +- **Powerful dashboard**: Take better business decisions by analysing detailed reports about payments, settlements and refunds. +- **API driven products**: Save on time by using our ready-to-use integration kits for leading service providers like Magento, WooCommerce, Shopify and so on. +- **Multi-currency support**: Razorpay supports over 100 foreign currencies. +- **Robust product suite**: Get a solution to all your payment issues on one platform: Payment Links, GST-compliant invoicing, Payment Gateway, subscriptions and a lot more. + +## Partner Types + +Razorpay supports the following types of Partners where each Partner type has different levels of control on Sub-merchants and gets access to different types of data. All partners are onboarded as Service partners. Based on your requirement, you can request to switch to Technology partner. + +- [Service Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/service-partners.md) +Businesses or individuals who refer and/or integrate Razorpay for their clients. Service partners are not involved in managing transactions for clients. +- [Technology Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners.md) +Marketplaces or platforms who refer and/or integrate Razorpay for their clients. Technology partners might be involved in managing funds for clients. + +## Products for Partnership + +You can be a Partner for the following products: +- Payments +- RazorpayX +- [POS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/pos.md) + +## Supported Platforms + +Razorpay Partnerships is supported on the following platforms: + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + +## Next Steps + +Whether you are new to the Razorpay ecosystem or are an existing Razorpay merchant, enrolling for the Razorpay Partnership program is quite simple. The process slightly differs if you are: +- [**New to Razorpay**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/new-to-razorpay.md) +- [**An existing Razorpay merchant**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/existing-merchant.md) diff --git a/llm-content/partners/aggregators.md b/llm-content/partners/aggregators.md new file mode 100644 index 00000000..8c287f33 --- /dev/null +++ b/llm-content/partners/aggregators.md @@ -0,0 +1,147 @@ +--- +title: About Aggregators +description: Razorpay Aggregators are the Partners who provide managed services to their clients through digital offerings such as an online platform and manage their transactions including payments, refunds and settlements. +--- + +# About Aggregators + +Razorpay Aggregator Partners are businesses that: +- Provide a platform to their clients. +- Manage their transactions. +- Collect payments. +- Create refunds. +- View settlements on behalf of their clients via API and Dashboard access. + +### Example + +Acme Corp wants to manage payments on its application for its client *Gekko & Co*. Since *Acme* cannot natively do so, it signs up with Razorpay as a Partner and creates a sub-merchant account (affiliate account) for *Gekko*. +Once the account for *Gekko* is activated, *Acme Corp* can use its account credentials to access *Gekko's* Dashboard and create and manage transactions on behalf of *Gekko*. As a Razorpay merchant, *Gekko* can also transact and access account details using its own API keys and Dashboard. + +## Become an Aggregator + +After onboarding as a Razorpay Partner, you need to request a Partner type switch to [become an Aggregator](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/become-aggregator.md). + +## Add Sub-merchants + +You can add your affiliate partners/sub-merchants directly using the Dashboard. Know more about [adding sub-merchants](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/add-submerchants.md). + +### Sub-merchant Account Activation + +You or the sub-merchant can activate the sub-merchant account. + +The newly added sub-merchants will appear on the Partner Dashboard merchant list with a default **Activation Status** as **Not Submitted**. +![partner 2](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partn_2.jpg.md) + +The activation will follow the standard process according to which the **Activation Status** will move from **Under Review** to **Activated**. + +![partner 4](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partn_4.jpg.md) + +> **INFO** +> +> +> **Failed Account Activation** +> +> If the account activation has failed due to some invalidation, it must be rectified and resubmitted. +> + +## Switch Dashboards + +After a sub-merchant is added, you can anytime switch to the sub-merchant Dashboard. To switch to a Dashboard of a particular sub-merchant: +1. Log in to the Dashboard. +2. Click on **Switch Merchant** on the top right. +3. Search the sub-merchant using: + 1. **Merchant ID** + 2. **Merchant Name** + 3. **Mail ID** + +4. On the merchant list, click the merchant you want switch to and go to the Dashboard of that sub-merchant. + +> **INFOR** +> +> +> **Switch between Dashboards Quickly** +> +> You can also quickly switch between Dashboards from the **Switch Merchant** drop-down list. The drop-down list displays the list of all your sub-merchants. +> ![partner 8](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partn_8.jpg.md) +> + +## User Access + +As an Aggregator Partner, you will have **owner** access to the sub-merchant's Dashboard. + +Know more about [user roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md#standard-user-roles). + +## Settings + +Under the **Settings** option, you have **Partner Credentials** and **Webhooks** settings for the sub-merchant account. + +> **WARN** +> +> +> +> **Watch Out!** +> +> In the Aggregator model, you will receive the commission only when your sub-merchants will use your partner key and not their own account key. +> +> + +![partner 7](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partn_ag_7.jpg.md) + +### Partner Credentials + +You can use partner credentials to make API requests to Razorpay on behalf of the sub-merchant account. The Partner credentials will have a different format from the regular account. + +![partner 8](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partn_ag_8.jpg.md) + +Two sets of credentials are provided, one for **Test** and **Live** mode. + +Know more about [using the Partner credentials](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/partner-auth.md). + +> **INFO** +> +> +> **Handy Tips** +> +> The mode here corresponds to the sub-merchant’s mode. You can call a Fetch a Payment API using Partner’s test credentials, which will attribute to the sub-merchant’s test mode account. +> + +### Webhooks + +You can also set up webhooks for specific events on the sub-merchant account. Know more about [webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + +1. Log in to your Dashboard. +2. Click **Partner** on the Dashboard. + ![partner ag](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-partn_ag_0000.jpg.md) +3. Under the **Affiliated Accounts** tab, click **Settings**. + ![partner 2](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-aggregators-partners-2.jpg.md) +4. In the Webhooks section, you can set up webhooks from your Dashboard for live mode and test mode. +5. Enter the **Webhook URL** where you will receive the webhook payload when the event is triggered. +6. Enter **Secret**. This field is optional. +7. Select appropriate events from the list of **Active Events** you would like to activate. + ![webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-aggregators-webhook.jpg.md) +8. Click **Save** to enable the webhook. + +## Reports + +Razorpay provides various reports that help you monitor your business's money flow. You can export all your transaction data for a particular day using one of the reports listed in the below table. + +Report Name| Description +--- +Combined Report| This report helps you reconcile all your transactions. It provides details of transactions (payments, refunds, adjustments and transfers) and settlements made in the selected period. The transaction may or may not be settled. Refer to the `Settled at` column for the date on which the settlement was or will be initiated. The report includes transaction type, id, date, amount, Razorpay fee, tax and more. +--- +Settlement Recon| This report helps you reconcile your transactions and corresponding settlements. It provides a detailed list of transactions (payments, refunds, adjustments and transfers) related to every settlement for the selected period. The report includes details such as transaction type, id, method, settlement id, settlement date, settlement UTR and more. +--- +Daily Earnings| This report provides details of your daily earnings from referred accounts. Base earnings indicate the amount you earn from the platform fee, while Add-on earnings show any additional platform charge that may have been added to your accounts. +--- +Per Transaction Earnings Report | This report provides details of your earnings from each transaction on your referred accounts. +--- +Payments| This report provides details of payments created in the selected period. It includes details such as payment id, status, method, issuer name, date, amount and more. +--- +Settlements| This report provides a list of the settlements for the selected period. However, it does not include details of the transactions that were settled. The report includes details such as settlement id, date, UTR and more. +--- +Refunds| This report provides details of refunds initiated in the selected period. It includes details such as refund id, amount, date, corresponding payment id and more. + +### Related Information + +- [Aggregators - Add Sub-merchants](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/add-submerchants.md) +- [Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners.md) diff --git a/llm-content/partners/aggregators/add-submerchants.md b/llm-content/partners/aggregators/add-submerchants.md new file mode 100644 index 00000000..c000a318 --- /dev/null +++ b/llm-content/partners/aggregators/add-submerchants.md @@ -0,0 +1,43 @@ +--- +title: Aggregators - Add Sub-merchants +description: As an Aggregator, you can add sub-merchants using their email ids or by sharing a referral link from the Razorpay Dashboard (Razorpay Partnership). +--- + +# Aggregators - Add Sub-merchants + +As an Aggregator, you provide managed services to your clients (sub-merchants or affiliate accounts) through your digital offerings. Along with providing a platform to your clients, you are also involved in managing the client's transactions. You can collect payments, create refunds and view settlements on behalf of your clients via API and Dashboard access. + +In addition to this, you can also invite your affiliates to open Current Account with RazorpayX. + +## Who is a Sub-merchant + +Sub-merchants are the merchants who get onboarded on the Razorpay platform by a Partner. For example, Acme Corp. wants to manage payments on its application for its client *Gekko & Co*. Since *Acme* cannot natively do so, it signs up with Razorpay as a Partner and creates a sub-merchant account (affiliate account) for *Gekko*. In this scenario, "Gekko" is Acme's sub-merchant. + +After *Gekko* account is activated, *Acme Corp* can use its account credentials to create and manage transactions on behalf of *Gekko*. It can also access Gekko’s Dashboard. Since *Gekko* is also a registered Razorpay merchant, it will have the ability to transact and access account details using its own set of API keys and Dashboard. + +## Add a Sub-merchant + +You can add a sub-merchant from the Dashboard or using our [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md). + +To add a sub-merchant from the Dashboard: + +1. Log in to your Dashboard. +1. Click **Partner Dashboard**. + ![partner ag](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-partn_ag_0000.jpg.md) +1. Under the **Affiliate Accounts** tab, click **+ Add New Clients**. + ![partner 2](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-partners-2.jpg.md) +1. In the input-form, enter the: + 1. **Merchant Name** or the name of the business. + 1. **Merchant Email** address registered in your application. Razorpay will send a sign-up link to the specified email. + ![partner 2_2](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partn_2_2.jpg.md) + +The newly added sub-merchants will appear on the Partner Dashboard merchant list. + +![partner_2](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partn_2.jpg.md) + +### Related Information + +- [About Aggregators](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators.md) +- [Testing Operations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/testing.md) +- [Know Your Commission](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions.md) +- [Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners.md) diff --git a/llm-content/partners/aggregators/become-aggregator.md b/llm-content/partners/aggregators/become-aggregator.md new file mode 100644 index 00000000..2303eb50 --- /dev/null +++ b/llm-content/partners/aggregators/become-aggregator.md @@ -0,0 +1,41 @@ +--- +title: Become a Razorpay Aggregator +heading: Become an Aggregator +description: Submit a request to become a Razorpay Aggregator to manage your sub-merchants' transactions. +--- + +# Become an Aggregator + +All Partners are onboarded as Service Partners by default. You can request a switch if you have a use case for the Aggregator Partner type. Know how to become a [Razorpay Partner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/new-to-razorpay.md). + +## Request a Switch + +To request a Partner type switch: + +1. Log in to the Dashboard. +2. Navigate to **Partner** → **Home**. +3. Click **Explore Now**. + ![Initiate Partner type switch](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-type-switch-explore-now.jpg.md) +4. On the **Tell us more about the services you provide** page, select the relevant business type and click **Next**. + ![Partner type switch - What services do you offer?](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-type-switch-services-offered.jpg.md) +5. If your business type is best suited for the Service Partner type, you will see the below screen. + ![Partner type switch denied](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-type-switch-denied.jpg.md) +6. If a different Partner type is more suitable for your business, you will see the below screen. + ![Partner type switch - evaluate business use case](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-type-switch-evaluate-usecase.jpg.md) +7. Select **Yes** if you have a product to manage payments for your sub-merchants and click **Next**. +8. Enter your phone number, website URL, and business details, and click **Next**. + ![Partner type switch - fill in details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-type-switch-business-details.jpg.md) + +You have successfully submitted a request for a Partner type switch. Our team will reach out to you with further instructions. + +> **WARN** +> +> +> **Watch Out!** +> +> Filling out the form does not guarantee a Partner type switch. Our team will evaluate your use case and contact you for more information. This process can take around 2 to 3 weeks. +> + +## Related Information + +- [About Aggregators](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators.md) diff --git a/llm-content/partners/aggregators/bulk-onboarding.md b/llm-content/partners/aggregators/bulk-onboarding.md new file mode 100644 index 00000000..575a55df --- /dev/null +++ b/llm-content/partners/aggregators/bulk-onboarding.md @@ -0,0 +1,186 @@ +--- +title: Bulk Submerchant Upload +description: Create sub-merchants (Razorpay Partnership) in bulk using the upload feature successfully. You can format data and avoid failures using this checklist. +--- + +# Bulk Submerchant Upload + +With our Bulk Submerchant Upload feature, sub-merchants can be created with all details by uploading a CSV file. It is essential to provide the sub-merchant data in the correct format to upload the CSV file successfully. + +You will need to download a Text Editor - [Sublime Text](https://www.sublimetext.com/), to identify and fix any formatting issues in the CSV file. + +## CSV File Format + +The table provides the data format to be followed for each sub-merchant: + +Attribute | Description +--- +reference1 | +--- +merchant_name | Merchant Name. Example: Acme Corp +--- +merchant_email | Merchant Email. Example: gaurav.kumar@example.com +--- +contact_name | Contact Name. Example: Acme Corp Pvt Ltd +--- +contact_email | Contact email. Example: gaurav.kumar@example.com +--- +transaction_report_email | Email for Transaction Reports. Example: support@acmecorp.com +--- +contact_mobile | Contact phone number. Example: 9000090000 +--- +organization_type | Choose **Business Type** from the list in Appendix. For example: `3`. +--- +business_name | Business Name. Example: Crowdera +--- +billing_label | Billing Label. Example: Crowdera Ventures Private Limited +--- +international | International Payments. Following are the options: +- `1` - Enabled +- `0` - Disabled. +--- +payments_for | Payments For. Example: Non-Profit Organisation +--- +business_model | Choose **Business Model** from amongst the 3 values - 'B2B', 'B2C' or 'B2B+B2C'. This field is optional if `business_category` is `others`. +--- +business_category | Choose **Business Category** from the list in Appendix. Example: not_for_profit +--- +business_sub_category | Choose **Business Sub Category** from the list in Appendix. Example: charity +--- +registered_address | Registered Address Details. Example: 78 Cuddalore Road Vriddhachalam Cuddalore District +--- +registered_city | City. Example: Vriddhachalam +--- +registered_state | State. Example: Tamil Nadu +--- +registered_pincode | Postal Code. Example: 606001 +--- +operational_address | Operational Address Details. Example: 78 Cuddalore Road Vriddhachalam Cuddalore District +--- +operational_city | City. Example: Vriddhachalam +--- +operational_state | State. Example: Tamil Nadu +--- +operational_pincode | Postal Code. Example: 606001 +--- +doe | Business date of Establishment. This is an optional field. Example: 2005-10-23 +--- +gstin | GST Number. This is an optional field. Example: 12AAAAA0000A1Z5 +--- +promoter_pan | PAN Number of Promoter. Example: ADIPI5352E +--- +promoter_pan_name | PAN Name of Promoter. Example: Saurav Kumar +--- +website | Business Website. Example: https://acmecorp.com +--- +bank_account_name | Bank Account Name. Example: Acme +--- +bank_branch_ifsc | IFSC Code of Bank. Example: KVBL0001210 +--- +bank_account_number | Bank Account Number. Example: 12101245623456 +--- +company_cin | Corporate Identity Number or Limited Liability Partnership Identification Number (LLPIN). CIN required if `organization_type` is not Public, Private or LLP. Example: U12345DL2020PLC098765 +--- +company_pan | PAN Number of the Business. For `proprietorship` business type, this is an optional field. Example: AARCA5484G + +--- +company_pan_name | PAN Name of Business. Example: Acme + +## Bulk Submerchant Onboard Data Checklist + +Use this checklist and avoid data format issues to upload the CSV file successfully: + +- Each row of the CSV file must contain one sub-merchant record. +- All email fields must have unique entries. This is applicable even if partner email is used. +- Correct header row must be present in the CSV file. +- Date should be in YYYY-MM-DD format. +- Use lower case wherever applicable. As the business category and sub-category are case-sensitive, use given values' list. For example, the value for the business category should be 'others' and not 'Others'. +- Do not use commas anywhere in the data. +- Business category `others` must have no entry for Business sub_category. +- All the Promoter PAN numbers must have P as the fourth letter and the Company PAN numbers must have either of these letters - C,H,F,A,T,B,L,J,G. +- Remove any additional comments from the file before uploading. +- Numeric fields must not be truncated or expressed in the exponential format (Pincode, Bank Account Number, and more). + +## Formatting Errors + +Ensure that there are no formatting errors present on the CSV file. To check the file for these errors, open the file using the [Sublime Text Editor](https://www.sublimetext.com/). Given below is the checklist you must run through: + +- Check whether each line contains one record and no record is split across two lines + +> **INFO** +> +> +> **Handy Tips** +> +> You must disable the Word Wrap under View → Word Wrap to view one record in one line. +> + +- Check for unrequired new line character inside a record. +- Remove blank rows. +- Remove the rows with invalid or unrequired data. +- Remove any default data apart from the merchant data. + +## Appendix + +Please refer the following table for **Business Type** and **Business Category** values: + +Attribute | Values +--- +Business Type | 1 = `proprietorship`; +2 = `individual`; +3 = `partnership`;? +4 = `private_limited`; +5 = `public_limited`; +6 = `llp`; +7 = `ngo`; +8 = `educational_institutes`; +9 = `trust`; +10 = `society`; +11 = `not_yet_registered`; +12 = `other` +--- +Business Category | `financial_services`; `education`; `healthcare`; `utilities`; `government`; `logistics`; `tours_and_travel`; `transport`; `ecommerce`; `food`; `it_and_software`; `gaming`; `media_and_entertainment`; `services`; `housing`; `not_for_profit`; `social`; `others` + +Please refer the following table for **Business Sub Category** values: + +Attribute | Values +--- +FINANCIAL_SERVICES | mutual_fund, lending, cryptocurrency, insurance, nbfc, cooperatives, pension_fund, forex, securities, commodities, accounting, financial_advisor, crowdfunding, trading, betting, get_rich_schemes, moneysend_funding, wire_transfers_and_money_orders, tax_preparation_services, tax_payments, digital_goods, atms +--- +EDUCATION | college, schools, university, professional_courses, distance_learning, day_care, coaching, elearning, vocational_and_trade_schools, sporting_clubs, dance_halls_studios_and_schools, correspondence_schools, +--- +HEALTHCARE | pharmacy, clinic, hospital, lab, dietician, fitness, health_coaching, health_products, drug_stores, healthcare_marketplace, osteopaths, medical_equipment_and_supply_stores, podiatrists_and_chiropodists, dentists_and_orthodontists, hardware_stores, ophthalmologists, orthopedic_goods_stores, testing_laboratories, doctors, health_practitioners_medical_services, testing_laboratories +--- +ECOMMERCE | ecommerce_marketplace, agriculture, books, electronics_and_furniture, coupons, rental, fashion_and_lifestyle, gifting, grocery, baby_products, office_supplies, wholesale, religious_products, pet_products, sports_products, arts_and_collectibles, sexual_wellness_products, drop_shipping, crypto_machinery, tobacco, weapons_and_ammunitions, stamps_and_coins_stores, office_equipment, automobile_parts_and_equipements, garden_supply_stores, household_appliance_stores, non_durable_goods, pawn_shops, electrical_parts_and_equipment, wig_and_toupee_shops, gift_novelty_and_souvenir_shops, duty_free_stores, office_and_commercial_furniture, dry_goods, books_and_publications, camera_and_photographic_stores, record_shops, meat_supply_stores, leather_goods_and_luggage, snowmobile_dealers, men_and_boys_clothing_stores, paint_supply_stores, automotive_parts, jewellery_and_watch_stores, auto_store_home_supply_stores, tent_stores, shoe_stores_retail,petroleum_and_petroleum_products, department_stores, automotive_tire_stores, sport_apparel_stores, variety_stores, chemicals_and_allied_products, commercial_equipments,fireplace_parts_and_accessories, family_clothing_stores, fabric_and_sewing_stores, home_supply_warehouse, art_supply_stores, camper_recreational_and_utility_trailer_dealers, clocks_and_silverware_stores, discount_stores,school_supplies_and_stationery, second_hand_stores, watch_and_jewellery_repair_stores, liquor_stores, boat_dealers, opticians_optical_goods_and_eyeglasse_stores, wholesale_footwear_stores, cosmetic_stores, home_furnishing_stores, antique_stores, plumbing_and_heating_equipment, telecommunication_equipment_stores, women_clothing, florists, computer_software_stores, building_matrial_stores, candy_nut_confectionery_shops, glass_and_wallpaper_stores,commercial_photography_and_graphic_design_services, video_game_supply_stores, fuel_dealers,drapery_and_window_coverings_stores, hearing_aids_stores, automotive_paint_shops, durable_goods_stores,uniforms_and_commercial_clothing_stores, fur_shops, industrial_supplies, bicycle_stores, second_hand_stores, +motorcycle_shops_and_dealers, children_and_infants_wear_stores, women_accessory_stores, construction_materials, +books_periodicals_and_newspaper, floor_covering_stores, crystal_and_glassware_stores, accessory_and_apparel_stores,hardware_equipment_and_supply_stores, computers_peripheral_equipment_software, automobile_and_truck_dealers, aircraft_and_farm_equipment_dealers, antique_shops_sales_and_repairs, hearing_aids_stores, music_stores, furniture_and_home_furnishing_store +--- +SERVICES | repair_and_cleaning, interior_design_and_architect, movers_and_packers, legal, event_planning, service_centre, consulting, ad_and_marketing, services_classifieds, multi_level_marketing, construction_services, architectural_services, car_washes, motor_home_rentals, stenographic_and_secretarial_support_services, chiropractors, automotive_service_shops, shoe_repair_shops, telecommunication_service, fines, security_agencies, tailors,type_setting_and_engraving_services, small_appliance_repair_shops, photography_labs, dry_cleaners, massage_parlors,electronic_repair_shops, cleaning_and_sanitation_services, nursing_care_facilities, direct_marketing, lottery,veterinary_services, affliated_auto_rental, alimony_and_child_support, airport_flying_fields, golf_courses, tire_retreading_and_repair_shops, television_cable_services, recreational_and_sporting_camps, barber_and_beauty_shops, agricultural_cooperatives, carpentry_contractors, wrecking_and_salvaging_services, automobile_towing_services, video_tape_rental_stores, miscellaneous_repair_shops, motor_homes_and_parts, horse_or_dog_racing, laundry_services,electrical_contractors, debt_marriage_personal_counseling_service, air_conditioning_and_refrigeration_repair_shops, credit_reporting_agencies, heating_and_plumbing_contractors, carpet_and_upholstery_cleaning_services, swimming_pools, roofing_and_metal_work_contractors, internet_service_providers, recreational_camps, masonry_contractors, +exterminating_and_disinfecting_services, ambulance_services, funeral_services_and_crematories, metal_service_centres, +copying_and_blueprinting_services, fuel_dispensers, welding_repair, mobile_home_dealers, concrete_work_contractors, +boat_rentals, personal_shoppers_and_shopping_clubs, door_to_door_sales, travel_related_direct_marketing, lottery_and_betting, bands_orchestras_and_miscellaneous_entertainers, furniture_repair_and_refinishing, contractors, +direct_marketing_and_subscription_merchants, typewriter_stores_sales_service_and_rentals, recreation_services, direct_marketing_insurance_services, business_services, inbound_telemarketing_merchants, public_warehousing, outbound_telemarketing_merchants, clothing_rental_stores, transportation_services, electric_razor_stores, service_stations, photographic_studio, professional_services +--- +HOUSING | developer, facility_management, rwa, coworking, realestate_classifieds, space_rental, +--- +NOT_FOR_PROFIT | charity, educational, religious, personal +--- +SOCIAL | matchmaking, social_network, messaging, professional_network, neighbourhood_network, political_organizations, automobile_associations_and_clubs, country_and_athletic_clubs, associations_and_membership, +--- +MEDIA_AND_ENTERTAINMENT | video_on_demand, music_streaming, multiplex, content_and_publishing, ticketing, news, video_game_arcades, video_tape_production_and_distribution, bowling_alleys, billiard_and_pool_establishments, amusement_parks_and_circuses, ticket_agencies +--- +GAMING | game_developer, esports, online_casino, fantasy_sports, gaming_marketplace +--- +IT_AND_SOFTWARE | saas, paas, iaas, consulting_and_outsourcing, web_development, technical_support, data_processing +--- +FOOD | online_food_ordering, restaurant, food_court, catering, alcohol, restaurant_search_and_booking, dairy_products, bakeries +--- +UTILITIES | electricity, gas, telecom, water, cable, broadband, dth, internet_provider, bill_and_recharge_aggregators +--- +GOVERNMENT | central, state, intra_government_purchases, goverment_postal_services, +--- +LOGISTICS | freight, courier, warehousing, distribution, end_to_end_logistics, courier_services +--- +TOURS_AND_TRAVEL | aviation, accommodation, ota, travel_agency, tourist_attractions_and_exhibits, timeshares, aquariums_dolphinariums_and_seaquariums +--- +TRANSPORT | cab_hailing, bus, train_and_metro, automobile_rentals, cruise_lines, parking_lots_and_garages, transportation, bridge_and_road_tolls, freight_transport, truck_and_utility_trailer_rentals diff --git a/llm-content/partners/aggregators/onboarding-api.md b/llm-content/partners/aggregators/onboarding-api.md new file mode 100644 index 00000000..aa512e19 --- /dev/null +++ b/llm-content/partners/aggregators/onboarding-api.md @@ -0,0 +1,291 @@ +--- +title: Aggregator Partners | Sub-Merchant Onboarding APIs +heading: Sub-Merchant Onboarding APIs +description: Use various Sub-Merchant Onboarding APIs to seamlessly onboard merchants from your platform. +--- + +# Sub-Merchant Onboarding APIs + +As a Partner, you can use the Sub-Merchant Onboarding APIs to onboard merchants from your platform. The sub-merchants can complete the KYC process in the Partner's platform itself and need not log in to Razorpay's platform. + +- Razorpay Sub-Merchant Onboarding APIs are RESTful. All our responses are returned in JSON. +- You can use Razorpay APIs in two modes, Test and Live. The [API key](#generate-api-key) is different for each mode. +- To complete the onboarding process for the sub-merchant, check the [KYC document requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#kyc-requirements). +- You can try out our APIs on the Razorpay Postman Public Workspace. + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-983cba7e-7605-4fbe-ad85-9c4529ba7392) + +## Video Tutorial + +Watch this video to know how you can onboard sub-merchants using the Sub-Merchant Onboarding APIs. + +[Video: https://www.youtube.com/embed/_a9XP-7x3X4] + +## API Gateway URL + +The Razorpay API Gateway URL is `https://api.razorpay.com/v2`. You need to include this before each API endpoint to make API calls. + +> **INFO** +> +> +> **Handy Tips** +> +> While sending API requests to Razorpay servers, it is recommended to honor the TTL of the entries and not cache the DNS aggressively at your end. This is applicable when you are not using Razorpay SDKs. However, if you are using Razorpay SDKs, be informed that our SDKs can handle DNS caching and honor the TTLs set in the records. +> + +## API Authentication + +You can use Partners APIs using either [Partner Auth](#use-partner-auth) or [OAuth](#use-oauth). + +> **WARN** +> +> +> **Watch Out!** +> +> Do not share your API Key secret or access token with anyone or on any public platforms. This can pose security threats for your Razorpay account. +> + +### Use Partner Auth + +Partner Auth uses `Basic Auth`. Basic auth requires the following: +- `[YOUR_KEY_ID]` +- `[YOUR_KEY_SECRET]` + +Basic auth expects an `Authorization` header for each request in the `Basic base64token` format. Here, `base64token` is a base64 encoded string of `YOUR_KEY_ID:YOUR_KEY_SECRET`. + +> **WARN** +> +> +> **Watch Out!** +> +> The `Authorization` header value should strictly adhere to the format mentioned above. Invalid formats will result in authentication failures. +> Few examples of **invalid** headers are: `BASIC base64token`, `basic base64token`, `Basic "base64token"` and `Basic $base64token`. +> + +Watch this video to see how to generate the API keys. + +[Video: https://www.youtube.com/embed/AwooCt4ezQ4] + +Follow these steps to generate API Keys: + +1. Log in to your Dashboard with appropriate credentials. +2. Select the mode (**Test** or **Live**) for which you want to generate the API key. + +> **INFO** +> +> +> **Handy Tips** +> +> You have to generate separate Partner Credentials for the test and live modes. No real money is used in test mode. +> + +3. Navigate to **Settings** section to generate the key for the selected mode. + +### Use OAuth + +OAuth uses `Bearer Auth`. Know more about [OAuth](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth.md). + +To use OAuth for Partners APIs: +1. [Enable cobranded_onboarding](#1-enable-cobranded-onboarding) +2. [Generate Access Token](#2-generate-access-token) +3. [Use Access Token to Authenticate](#3-use-access-token-to-authenticate) + +#### 1. Enable cobranded_onboarding + +Raise a request with our [Support team](https://razorpay.com/support/#request) to get the **cobranded_onboarding** feature activated on your account. The cobranded_onboarding feature also enables: +- Access to [sub-merchant account status webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/status.md). +- [Onboarding UI configurator](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/settings.md) on Partner Dashboard. + +#### 2. Generate Access Token + +Generate your access token using the below endpoint. You can generate it for test or live mode. Use the `client_id` and `client_secret` of the **OAuth application** for test and live modes. + +`https://auth.razorpay.com/token` + +```curl: Request +curl --location 'https://auth.razorpay.com/token' \ +--header 'Content-Type: application/json' \ +--data '{ + "grant_type": "client_credentials", + "mode": "test", + "client_id": "", + "client_secret": "" +}' + +```json: Response +{ + "public_token": "rzp_test_oauth_XXXXXXXXXXXXXX", + "razorpay_account_id": "acc_Dhk2qDbmu6FwZH", + "token_type": "Bearer", + "expires_in": 7862400, + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IkY1Z0NQYkhhRzRjcUpnIn0.eyJhdWQiOiJGNFNNeEgxanMxbkpPZiIsImp0aSI6IkY1Z0NQYkhhRzRjcUpnIiwiaWF0IjoxNTkyODMxMDExLCJuYmYiOjE1OTI4MzEwMTEsInN1YiI6IiIsImV4cCI6MTYwMDc3OTgxMSwidXNlcl9pZCI6IkYycVBpejJEdzRPRVFwIiwibWVyY2hhbnRfaWQiOiJGMnFQaVZ3N0lNV01GSyIsInNjb3BlcyI6WyJyZWFkX29ubHkiXX0.Wwqt5czhoWpVzP5_aoiymKXoGj-ydo-4A_X2jf_7rrSvk4pXdqzbA5BMrHxPdPbeFQWV6vsnsgbf99Q3g-W4kalHyH67LfAzc3qnJ-mkYDkFY93tkeG-MCco6GJW-Jm8xhaV9EPUak7z9J9jcdluu9rNXYMtd5qxD8auyRYhEgs" +} +``` + + +### Request Parameters + +`grant_type` _mandatory_ +: `string` Defines the grant type for the request. Possible value is `client_credentials`. + +`mode` _optional_ +: `string` The type of mode. Possible values: + - `test` + - `live` (default) + +`client_id` _mandatory_ +: `string` Unique client identifier. Use the `client_id` of the **OAuth application**. + +`client_secret` _mandatory_ +: `string` Client secret string. Use the `client_secret` of the **OAuth application**. + + + +### Response Parmeters + +`expires_in` +: `integer` Represents the TTL of the access token in seconds. You will have to regenerate the access token after expiry. + +`token_type` +: `string` Defines the type of access token. Possible value is `Bearer`. + +`public_token` +: `string` A public key is used only for public routes such as Checkout or Payments. + +`razorpay_account_id` +: `string` Razorpay account id for which the access token is generated. + +`access_token` +: `string` A private key used to authenticate for Razorpay APIs. + + +#### 3. Use Access Token to Authenticate + +You can use your OAuth access token to authenticate and use Partners APIs. + +Given below is a sample code for the [Fetch an Account API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/fetch.md). + +```curl: Request +curl -X GET https://api.razorpay.com/v2/accounts/acc_GP4lfNA0iIMn5B +-H "Authorization: Bearer " + +```js: Response +{ + "id": "acc_GP4lfNA0iIMn5B", + "type": "standard", + "status": "created", + "email": "gauri@example.org", + "profile": { + "category": "healthcare", + "subcategory": "clinic", + "addresses": { + "registered": { + "street1": "507, Koramangala 1st block", + "street2": "MG Road-1", + "city": "Bengalore", + "state": "KARNATAKA", + "postal_code": "560034", + "country": "IN" + } + } + }, + "notes": [], + "created_at": 1610603081, + "phone": "9000090000", + "reference_id": "randomId", + "business_type": "partnership", + "legal_business_name": "Acme Corp", + "customer_facing_business_name": "Example Pvt. Ltd." +} +``` + +## List of Sub-Merchant Onboarding APIs + +You can use the Sub-Merchant Onboarding APIs to perform various actions. + +API | Description +--- +[Account APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding.md) | Create, view, update and delete sub-merchant accounts. +--- +[Stakeholders APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder.md) | Create, view and update stakeholders. +--- +[Product Configuration APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration.md) | Request, view and update a product configuration. +--- +[Documents APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/upload-document.md) | Upload and view account and stakeholder documents. +--- +[Webhooks APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/webhooks.md) | Create, view, update and delete webhook events. +--- +[Terms and Conditions APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/terms-conditions.md) | View and accept terms and conditions. + +## Account Activation + + + Given below is the complete end-to-end flow explaining the transition among statuses: + ![Account Activation Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-activation-flow.jpg.md) + + + +Status | Description +--- +Created | The account is created. +--- +Under Review | Your account moves to **Under Review** when all the required details are submitted. Our team will review the details and reach out for clarifications. +--- +Needs Clarification | We might require clarifications regarding the KYC details submitted during the review process. All the details about fields that need clarification will be present in the product configuration API. +--- +Activated | Your account will be activated once all of the information provided has been approved. You will be able to start accepting payments and receive settlements in your registered bank accounts. +--- +Suspended | During the KYC review, your account can be suspended if it is identified as potentially fraudulent. Please reach out to our [support team](https://razorpay.com/support/#request) for the next steps. +--- +Rejected | The account attains this status when the KYC details submitted by the merchant are rejected during manual review. + + + +## Product Activation Status and Updates Permitted + +For the following APIs, the updates permitted depend on the product activation status: +- [Update Settlement Account Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/update-settlement-account-details.md) +- [Update a Stakeholder](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/update.md) + +- [Upload Documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/upload-document.md) + +Activation Status | Update Permitted +--- +`requested` | You can update the details for all the fields. +--- +`needs_clarification` | The fields you can update depend on the reason_code mentioned in the requirements object in the [Request a Product Activation API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/request.md): - **document_missing** or **field_missing**: You can update all the fields. +- **needs_clarification**: You can update only the specific field for which Razorpay is seeking clarification for. + +--- +`under_review` | You cannot update any fields. +--- +`activated` | You cannot use this API to update any fields as your account is already active. + +### Use Cases to Update a Product Configuration + +You can update the following details for Payment Gateway and Payment Links using the Update a Product Configuration API. However, whether the details can be updated or not depends upon the [**product activation status**](#product-activation-status-and-updates-permitted). + +- Settlement Bank Account Details: You can update the `settlement` object with the new bank account details based on the product activation status. + +- Request Additional Payment Methods: You can request various payment methods and related instruments to be enabled using the `payment_methods` object. However, you can request for only one payment method at a time. For example, if you want to enable HDFC Netbanking and Rupay Domestic Card payment methods, you should send two separate API requests. You cannot send a consolidated request using this API. + +- Update Notifications Settings: You can update the email, WhatsApp and SMS settings using the `notifications` object. + +- Configure Checkout Features: You can change the checkout theme colour, add a logo and enable the saving of customer card details using the `checkout` object. + +- Configure Refund Speed: You can configure the default refund speed using the `refund` object. + +- Accept of Terms and Conditions: You can accept Razorpay terms and conditions. + +## Terms and Conditions Workflow + +Given below is the workflow: +1. As a partner, it is your responsibility to show respective terms and conditions to the sub-merchants before you start onboarding to a product. The APIs used for it will be [Fetch Terms and Conditions for a Sub-Merchant](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/terms-conditions/fetch.md). +2. You should display these web pages to your sub-merchants on your interface. +3. Record the acceptance of terms and transmit that to Razorpay using either [Request a Product Configuration API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/request.md) or [Update a Product Configuration API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/update-settlement-account-details.md). + +### Related Information + +- [Sub-Merchant Onboarding APIs Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/workflow.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/webhooks.md) +- [Appendix](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md) diff --git a/llm-content/partners/aggregators/onboarding-api/appendix.md b/llm-content/partners/aggregators/onboarding-api/appendix.md new file mode 100644 index 00000000..84cde4f2 --- /dev/null +++ b/llm-content/partners/aggregators/onboarding-api/appendix.md @@ -0,0 +1,1657 @@ +--- +title: Sub-merchant Onboarding APIs Appendix +description: Additional information, such as Business Types, Business Category and Business Sub-Category required to use the Partners APIs. +--- + +# Sub-merchant Onboarding APIs Appendix + +Refer to the following information while using the Sub-merchant Onboarding APIs. + +## Business Type + +List of supported business types: + +Business Type | Code +--- +PROPRIETORSHIP | 1 +--- +INDIVIDUAL | 2 +--- +PARTNERSHIP| 3 +--- +PRIVATE_LIMITED | 4 +--- +PUBLIC_LIMITED | 5 +--- +LLP | 6 +--- +NGO | 7 +--- +EDUCATIONAL_INSTITUTES | 8 +--- +TRUST | 9 +--- +SOCIETY | 10 +--- +NOT_YET_REGISTERED | 11 +--- +OTHER | 12 +--- +HUF | 13 +--- +GOVERNMENT | 14 +--- +JUDICIAL_PERSON | 15 +--- +LOCAL_AUTHORITY | 16 +--- +SECTION_8_COMPANY | 17 + +## Business Category + +The following table lists the possible values for Business Category: + +Values +--- +`financial_services` +--- +`education` +--- +`healthcare` +--- +`utilities` +--- +`government` +--- +`logistics` +--- +`tours_and_travel` +--- +`transport` +--- +`ecommerce` +--- +`food` +--- +`it_and_software` +--- +`gaming` +--- +`media_and_entertainment` +--- +`services` +--- +`housing` +--- +`not_for_profit` +--- +`social` +--- +`others` + +## Business Sub-Category + +Following are the possible values for Business Sub-Category for respective Business Categories: + + +### Financial Services + + + Values + --- + mutual_fund + --- + lending + --- + cryptocurrency + --- + insurance + --- + nbfc + --- + cooperatives + --- + pension_fund + --- + forex + --- + securities + --- + commodities + --- + accounting + --- + financial_advisor + --- + crowdfunding + --- + trading + --- + betting + --- + get_rich_schemes + --- + moneysend_funding + --- + wire_transfers_and_money_orders + --- + tax_preparation_services + --- + tax_payments + --- + digital_goods + --- + atms + + + + +### Education + + + Values + --- + college + --- + schools + --- + university + --- + professional_courses + --- + distance_learning + --- + day_care + --- + coaching + --- + elearning + --- + vocational_and_trade_schools + --- + sporting_clubs + --- + dance_halls_studios_and_schools + --- + correspondence_schools + + + + +### Healthcare + + + Values + --- + pharmacy + --- + clinic + --- + hospital + --- + lab + --- + dietician + --- + fitness + --- + health_coaching + --- + health_products + --- + drug_stores + --- + healthcare_marketplace + --- + osteopaths + --- + medical_equipment_and_supply_stores + --- + podiatrists_and_chiropodists + --- + dentists_and_orthodontists + --- + hardware_stores + --- + ophthalmologists + --- + orthopedic_goods_stores + --- + testing_laboratories + --- + doctors + --- + health_practitioners_medical_services + + + + +### Ecommerce + + + Values + --- + ecommerce_marketplace + --- + agriculture + --- + books + --- + electronics_and_furniture + --- + coupons + --- + rental + --- + fashion_and_lifestyle + --- + gifting + --- + grocery + --- + baby_products + --- + office_supplies + --- + wholesale + --- + religious_products + --- + pet_products + --- + sports_products + --- + arts_and_collectibles + --- + sexual_wellness_products + --- + drop_shipping + --- + crypto_machinery + --- + tobacco + --- + weapons_and_ammunitions + --- + stamps_and_coins_stores + --- + office_equipment + --- + automobile_parts_and_equipements + --- + garden_supply_stores + --- + household_appliance_stores + --- + non_durable_goods + --- + pawn_shops + --- + electrical_parts_and_equipment + --- + wig_and_toupee_shops + --- + gift_novelty_and_souvenir_shops + --- + duty_free_stores + --- + office_and_commercial_furniture + --- + dry_goods + --- + books_and_publications + --- + camera_and_photographic_stores + --- + record_shops + --- + meat_supply_stores + --- + leather_goods_and_luggage + --- + snowmobile_dealers + --- + men_and_boys_clothing_stores + --- + paint_supply_stores + --- + automotive_parts + --- + jewellery_and_watch_stores + --- + auto_store_home_supply_stores + --- + tent_stores + --- + shoe_stores_retail + --- + petroleum_and_petroleum_products + --- + department_stores + --- + automotive_tire_stores + --- + sport_apparel_stores + --- + variety_stores + --- + chemicals_and_allied_products + --- + commercial_equipments + --- + fireplace_parts_and_accessories + --- + family_clothing_stores + --- + fabric_and_sewing_stores + --- + home_supply_warehouse + --- + art_supply_stores + --- + camper_recreational_and_utility_trailer_dealers + --- + clocks_and_silverware_stores + --- + discount_stores + --- + school_supplies_and_stationery + --- + second_hand_stores + --- + watch_and_jewellery_repair_stores + --- + liquor_stores + --- + boat_dealers + --- + opticians_optical_goods_and_eyeglasse_stores + --- + wholesale_footwear_stores + --- + cosmetic_stores + --- + home_furnishing_stores + --- + antique_stores + --- + plumbing_and_heating_equipment + --- + telecommunication_equipment_stores + --- + women_clothing + --- + florists + --- + computer_software_stores + --- + building_matrial_stores + --- + candy_nut_confectionery_shops + --- + glass_and_wallpaper_stores + --- + commercial_photography_and_graphic_design_services + --- + video_game_supply_stores + --- + fuel_dealers + --- + drapery_and_window_coverings_stores + --- + hearing_aids_stores + --- + automotive_paint_shops + --- + durable_goods_stores + --- + uniforms_and_commercial_clothing_stores + --- + fur_shops + --- + industrial_supplies + --- + bicycle_stores + --- + second_hand_stores + --- + motorcycle_shops_and_dealers + --- + children_and_infants_wear_stores + --- + women_accessory_stores + --- + construction_materials + --- + books_periodicals_and_newspaper + --- + floor_covering_stores + --- + crystal_and_glassware_stores + --- + accessory_and_apparel_stores + --- + hardware_equipment_and_supply_stores + --- + computers_peripheral_equipment_software + --- + automobile_and_truck_dealers + --- + aircraft_and_farm_equipment_dealers + --- + antique_shops_sales_and_repairs + --- + hearing_aids_stores + --- + music_stores + --- + furniture_and_home_furnishing_store + + + + +### Services + + + Values + --- + repair_and_cleaning + --- + interior_design_and_architect + --- + movers_and_packers + --- + legal + --- + event_planning + --- + service_centre + --- + consulting + --- + ad_and_marketing + --- + services_classifieds + --- + multi_level_marketing + --- + construction_services + --- + architectural_services + --- + car_washes + --- + motor_home_rentals + --- + stenographic_and_secretarial_support_services + --- + chiropractors + --- + automotive_service_shops + --- + shoe_repair_shops + --- + telecommunication_service + --- + fines + --- + security_agencies + --- + tailors + --- + type_setting_and_engraving_services + --- + small_appliance_repair_shops + --- + photography_labs + --- + dry_cleaners + --- + massage_parlors + --- + electronic_repair_shops + --- + cleaning_and_sanitation_services + --- + nursing_care_facilities + --- + direct_marketing + --- + lottery + --- + veterinary_services + --- + affliated_auto_rental + --- + alimony_and_child_support + --- + airport_flying_fields + --- + golf_courses + --- + tire_retreading_and_repair_shops + --- + television_cable_services + --- + recreational_and_sporting_camps + --- + barber_and_beauty_shops + --- + agricultural_cooperatives + --- + carpentry_contractors + --- + wrecking_and_salvaging_services + --- + automobile_towing_services + --- + video_tape_rental_stores + --- + miscellaneous_repair_shops + --- + motor_homes_and_parts + --- + horse_or_dog_racing + --- + laundry_services + --- + electrical_contractors + --- + debt_marriage_personal_counseling_service + --- + air_conditioning_and_refrigeration_repair_shops + --- + credit_reporting_agencies + --- + heating_and_plumbing_contractors + --- + carpet_and_upholstery_cleaning_services + --- + swimming_pools + --- + roofing_and_metal_work_contractors + --- + internet_service_providers + --- + recreational_camps + --- + masonry_contractors + --- + exterminating_and_disinfecting_services + --- + ambulance_services + --- + funeral_services_and_crematories + --- + metal_service_centres + --- + copying_and_blueprinting_services + --- + fuel_dispensers + --- + welding_repair + --- + mobile_home_dealers + --- + concrete_work_contractors + --- + boat_rentals + --- + personal_shoppers_and_shopping_clubs + --- + door_to_door_sales + --- + travel_related_direct_marketing + --- + lottery_and_betting + --- + bands_orchestras_and_miscellaneous_entertainers + --- + furniture_repair_and_refinishing + --- + contractors + --- + direct_marketing_and_subscription_merchants + --- + typewriter_stores_sales_service_and_rentals + --- + recreation_services + --- + direct_marketing_insurance_services + --- + business_services + --- + inbound_telemarketing_merchants + --- + public_warehousing + --- + outbound_telemarketing_merchants + --- + clothing_rental_stores + --- + transportation_services + --- + electric_razor_stores + --- + service_stations + --- + photographic_studio + --- + professional_services + + + + +### Housing + + + Values + --- + developer + --- + facility_management + --- + rwa + --- + coworking + --- + realestate_classifieds + --- + space_rental + + + + +### Not for Profit + + + Values + --- + charity + --- + educational + --- + religious + --- + personal + + + + +### Social + + + Values + --- + matchmaking + --- + social_network + --- + messaging + --- + professional_network + --- + neighbourhood_network + --- + political_organizations + --- + automobile_associations_and_clubs + --- + country_and_athletic_clubs + --- + associations_and_membership + + + + +### Media & Entertainment + + + Values + --- + video_on_demand + --- + music_streaming + --- + multiplex + --- + content_and_publishing + --- + ticketing + --- + news + --- + video_game_arcades + --- + video_tape_production_and_distribution + --- + bowling_alleys + --- + billiard_and_pool_establishments + --- + amusement_parks_and_circuses + --- + ticket_agencies + + + + +### Gaming + + + Values + --- + game_developer + --- + esports + --- + online_casino + --- + fantasy_sports + --- + gaming_marketplace + + + + +### IT & Software + + + Values + --- + saas + --- + paas + --- + iaas + --- + consulting_and_outsourcing + --- + web_development + --- + technical_support + --- + data_processing + + + + +### Food + + + Values + --- + online_food_ordering + --- + restaurant + --- + food_court + --- + catering + --- + alcohol + --- + restaurant_search_and_booking + --- + dairy_products + --- + bakeries + + + + +### Utilities + + + Values + --- + electricity + --- + gas + --- + telecom + --- + water + --- + cable + --- + broadband + --- + dth + --- + internet_provider + --- + bill_and_recharge_aggregators + + + + +### Government + + + Values + --- + central + --- + state + --- + intra_government_purchases + --- + goverment_postal_services + + + + +### Logistics + + + Values + --- + freight + --- + courier + --- + warehousing + --- + distribution + --- + end_to_end_logistics + --- + courier_services + + + + +### Tours and Travels + + + Values + --- + aviation + --- + accommodation + --- + ota + --- + travel_agency + --- + tourist_attractions_and_exhibits + --- + timeshares + --- + aquariums_dolphinariums_and_seaquariums + + + + +### Transportation + + + Values + --- + cab_hailing + --- + bus + --- + train_and_metro + --- + automobile_rentals + --- + cruise_lines + --- + parking_lots_and_garages + --- + transportation + --- + bridge_and_road_tolls + --- + freight_transport + --- + truck_and_utility_trailer_rentals + + + +## Document Type +The following table lists the possible values for Document Types: + +Document Type | Proof Type +--- +PERSONAL_PAN | individual_proof_of_identification +--- +BUSINESS_PAN_URL | business_proof_of_identification +--- +BUSINESS_PROOF_URL | business_proof_of_identification +--- +SHOP_ESTABLISHMENT_CERTIFICATE | business_proof_of_identification +--- +GST_CERTIFICATE | business_proof_of_identification +--- +MSME_CERTIFICATE | business_proof_of_identification +--- +FORM_12A_URL | additional_documents +--- +FORM_80G_URL | additional_documents +--- +AADHAR_FRONT | individual_proof_of_address +--- +AADHAR_BACK | individual_proof_of_address +--- +PASSPORT_FRONT | individual_proof_of_address +--- +PASSPORT_BACK | individual_proof_of_address +--- +VOTER_ID_FRONT | individual_proof_of_address +--- +VOTER_ID_BACK | individual_proof_of_address +--- +BANK_STATEMENT | additional_documents +--- +CANCELLED_CHEQUE | additional_documents +--- +SEBI_REGISTRATION_CERTIFICATE | additional_documents +--- +SLA_SEBI_REGISTRATION_CERTIFICATE | additional_documents +--- +FFMC_LICENSE | additional_documents +--- +SLA_FFMC_LICENSE | additional_documents +--- +IRDAI_REGISTRATION_CERTIFICATE | additional_documents +--- +SLA_IRDAI_REGISTRATION_CERTIFICATE | additional_documents +--- +NBFC_REGISTRATION_CERTIFICATE | additional_documents +--- +SLA_NBFC_REGISTRATION_CERTIFICATE | additional_documents +--- +AMFI_CERTIFICATE | additional_documents +--- +SLA_AMFI_CERTIFICATE | additional_documents +--- +IATA_CERTIFICATE | additional_documents +--- +SLA_IATA_CERTIFICATE | additional_documents +--- +AFFILIATION_CERTIFICATE | additional_documents + +## KYC Requirements + +Given below are the KYC Requirements for Sub-Merchant Onboarding APIs. + +KYC Requirements | Number/Document | API Name | Individuals | Proprietorship | Public Limited | Private Limited | LLP | Partnership | Trust | NGO | Society +--- +Owner PAN/Signatory PAN | Number | Stakeholder | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes +--- +Business PAN | Number | Account Onboarding | NA | NA | Yes | Yes | Yes | Yes | Yes | Yes | Yes +--- +Bank Account | Number | Product Configuration | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes +--- +GST | Number | Account Onboarding | NA | Optional | Optional | Optional | Optional | Optional | Optional | Optional | Optional +--- +CIN/LLPIN | Number | Account Onboarding | NA | NA | CIN | CIN | LLPIN | NA | NA | NA | NA +--- +Owner PAN/Signatory PAN document | Document | Upload Document | NA | Yes | NA | NA | NA | NA | NA | NA | NA +--- +Business PAN document | Document | Upload Document | NA | NA | Yes | Yes | Yes | Yes | Yes | Yes | Yes +--- +POA | Document | Upload Document | Aadhar/Passport/Voter's ID | Aadhar/Passport/Voter's ID | Aadhar/Passport/Voter's ID | Aadhar/Passport/Voter's ID | Aadhar/Passport/Voter's ID | Aadhar/Passport/Voter's ID | Aadhar/Passport/Voter's ID | Aadhar/Passport/Voter's ID | Aadhar/Passport/Voter's ID +--- +Business Proof | Document | Upload Document | NA | GST / MSME / Shops Establishment | COI (Certificate of Incorporation) | COI (Certificate of Incorporation) | COI (Certificate of Incorporation) | Partnershipd Deed | Trust Certificate | NGO certificate | Society Certificate +--- +Other Documents | Document | Upload Document | NA | NA | NA | NA | NA | NA | If they collect Donations, then Yes | 80G / 12A | If they collect Donations, then Yes + +## Country List + +Given below is a list of Country Codes and country names that can be used during account activation. + +Country Code | Country Name +--- +`BD` | `bangladesh` +--- +`BE` | `belgium` +--- +`BF` | `burkina faso` +--- +`BG` | `bulgaria` +--- +`BA` | `bosnia and herzegovina` +--- +`BB` | `barbados` +--- +`WF` | `wallis and futuna` +--- +`BL` | `saint barthelemy` +--- +`BM` | `bermuda` +--- +`BN` | `brunei` +--- +`BO` | `bolivia` +--- +`BH` | `bahrain` +--- +`BI` | `burundi` +--- +`BJ` | `benin` +--- +`BT` | `bhutan` +--- +`JM` | `jamaica` +--- +`BV` | `bouvet island` +--- +`BW` | `botswana` +--- +`WS` | `samoa` +--- +`BQ` | `bonaire saint eustatius and saba` +--- +`BR` | `brazil` +--- +`BS` | `bahamas` +--- +`JE` | `jersey` +--- +`BY` | `belarus` +--- +`BZ` | `belize` +--- +`RU` | `russia` +--- +`RW` | `rwanda` +--- +`RS` | `serbia` +--- +`TL` | `east timor` +--- +`RE` | `reunion` +--- +`TM` | `turkmenistan` +--- +`TJ` | `tajikistan` +--- +`RO` | `romania` +--- +`TK` | `tokelau` +--- +`GW` | `guinea bissau` +--- +`GU` | `guam` +--- +`GT` | `guatemala` +--- +`GS` | `south georgia and the south sandwich islands` +--- +`GR` | `greece` +--- +`GQ` | `equatorial guinea` +--- +`GP` | `guadeloupe` +--- +`JP` | `japan` +--- +`GY` | `guyana` +--- +`GG` | `guernsey` +--- +`GF` | `french guiana` +--- +`GE` | `georgia` +--- +`GD` | `grenada` +--- +`GB` | `united kingdom` +--- +`GA` | `gabon` +--- +`SV` | `el salvador` +--- +`GN` | `guinea` +--- +`GM` | `gambia` +--- +`GL` | `greenland` +--- +`GI` | `gibraltar` +--- +`GH` | `ghana` +--- +`OM` | `oman` +--- +`TN` | `tunisia` +--- +`JO` | `jordan` +--- +`HR` | `croatia` +--- +`HT` | `haiti` +--- +`HU` | `hungary` +--- +`HK` | `hong kong` +--- +`HN` | `honduras` +--- +`HM` | `heard island and mcdonald islands` +--- +`VE` | `venezuela` +--- +`PR` | `puerto rico` +--- +`PS` | `palestinian territory` +--- +`PW` | `palau` +--- +`PT` | `portugal` +--- +`SJ` | `svalbard and jan mayen` +--- +`PY` | `paraguay` +--- +`IQ` | `iraq` +--- +`PA` | `panama` +--- +`PF` | `french polynesia` +--- +`PG` | `papua new guinea` +--- +`PE` | `peru` +--- +`PK` | `pakistan` +--- +`PH` | `philippines` +--- +`PN` | `pitcairn` +--- +`PL` | `poland` +--- +`PM` | `saint pierre and miquelon` +--- +`ZM` | `zambia` +--- +`EH` | `western sahara` +--- +`EE` | `estonia` +--- +`EG` | `egypt` +--- +`ZA` | `south africa` +--- +`EC` | `ecuador` +--- +`IT` | `italy` +--- +`VN` | `vietnam` +--- +`SB` | `solomon islands` +--- +`ET` | `ethiopia` +--- +`SO` | `somalia` +--- +`ZW` | `zimbabwe` +--- +`SA` | `saudi arabia` +--- +`ES` | `spain` +--- +`ER` | `eritrea` +--- +`ME` | `montenegro` +--- +`MD` | `moldova` +--- +`MG` | `madagascar` +--- +`MF` | `saint martin` +--- +`MA` | `morocco` +--- +`MC` | `monaco` +--- +`UZ` | `uzbekistan` +--- +`MM` | `myanmar` +--- +`ML` | `mali` +--- +`MO` | `macao` +--- +`MN` | `mongolia` +--- +`MH` | `marshall islands` +--- +`MK` | `macedonia` +--- +`MU` | `mauritius` +--- +`MT` | `malta` +--- +`MW` | `malawi` +--- +`MV` | `maldives` +--- +`MQ` | `martinique` +--- +`MP` | `northern mariana islands` +--- +`MS` | `montserrat` +--- +`MR` | `mauritania` +--- +`IM` | `isle of man` +--- +`UG` | `uganda` +--- +`TZ` | `tanzania` +--- +`MY` | `malaysia` +--- +`MX` | `mexico` +--- +`IL` | `israel` +--- +`FR` | `france` +--- +`IO` | `british indian ocean territory` +--- +`SH` | `saint helena` +--- +`FI` | `finland` +--- +`FJ` | `fiji` +--- +`FK` | `falkland islands` +--- +`FM` | `micronesia` +--- +`FO` | `faroe islands` +--- +`NI` | `nicaragua` +--- +`NL` | `netherlands` +--- +`NO` | `norway` +--- +`NA` | `namibia` +--- +`VU` | `vanuatu` +--- +`NC` | `new caledonia` +--- +`NE` | `niger` +--- +`NF` | `norfolk island` +--- +`NG` | `nigeria` +--- +`NZ` | `new zealand` +--- +`NP` | `nepal` +--- +`NR` | `nauru` +--- +`NU` | `niue` +--- +`CK` | `cook islands` +--- +`XK` | `kosovo` +--- +`CI` | `ivory coast` +--- +`CH` | `switzerland` +--- +`CO` | `colombia` +--- +`CN` | `china` +--- +`CM` | `cameroon` +--- +`CL` | `chile` +--- +`CC` | `cocos islands` +--- +`CA` | `canada` +--- +`CG` | `republic of the congo` +--- +`CF` | `central african republic` +--- +`CD` | `democratic republic of the congo` +--- +`CZ` | `czech republic` +--- +`CY` | `cyprus` +--- +`CX` | `christmas island` +--- +`CR` | `costa rica` +--- +`CW` | `curacao` +--- +`CV` | `cape verde` +--- +`CU` | `cuba` +--- +`SZ` | `swaziland` +--- +`SY` | `syria` +--- +`SX` | `sint maarten` +--- +`KG` | `kyrgyzstan` +--- +`KE` | `kenya` +--- +`SS` | `south sudan` +--- +`SR` | `suriname` +--- +`KI` | `kiribati` +--- +`KH` | `cambodia` +--- +`KN` | `saint kitts and nevis` +--- +`KM` | `comoros` +--- +`ST` | `sao tome and principe` +--- +`SK` | `slovakia` +--- +`KR` | `south korea` +--- +`SI` | `slovenia` +--- +`KP` | `north korea` +--- +`KW` | `kuwait` +--- +`SN` | `senegal` +--- +`SM` | `san marino` +--- +`SL` | `sierra leone` +--- +`SC` | `seychelles` +--- +`KZ` | `kazakhstan` +--- +`KY` | `cayman islands` +--- +`SG` | `singapore` +--- +`SE` | `sweden` +--- +`SD` | `sudan` +--- +`DO` | `dominican republic` +--- +`DM` | `dominica` +--- +`DJ` | `djibouti` +--- +`DK` | `denmark` +--- +`VG` | `british virgin islands` +--- +`DE` | `germany` +--- +`YE` | `yemen` +--- +`DZ` | `algeria` +--- +`US` | `united states` +--- +`UY` | `uruguay` +--- +`YT` | `mayotte` +--- +`UM` | `united states minor outlying islands` +--- +`LB` | `lebanon` +--- +`LC` | `saint lucia` +--- +`LA` | `laos` +--- +`TV` | `tuvalu` +--- +`TW` | `taiwan` +--- +`TT` | `trinidad and tobago` +--- +`TR` | `turkey` +--- +`LK` | `sri lanka` +--- +`LI` | `liechtenstein` +--- +`LV` | `latvia` +--- +`TO` | `tonga` +--- +`LT` | `lithuania` +--- +`LU` | `luxembourg` +--- +`LR` | `liberia` +--- +`LS` | `lesotho` +--- +`TH` | `thailand` +--- +`TF` | `french southern territories` +--- +`TG` | `togo` +--- +`TD` | `chad` +--- +`TC` | `turks and caicos islands` +--- +`LY` | `libya` +--- +`VA` | `vatican` +--- +`VC` | `saint vincent and the grenadines` +--- +`AE` | `united arab emirates` +--- +`AD` | `andorra` +--- +`AG` | `antigua and barbuda` +--- +`AF` | `afghanistan` +--- +`AI` | `anguilla` +--- +`VI` | `us virgin islands` +--- +`IS` | `iceland` +--- +`IR` | `iran` +--- +`AM` | `armenia` +--- +`AL` | `albania` +--- +`AO` | `angola` +--- +`AQ` | `antarctica` +--- +`AS` | `american samoa` +--- +`AR` | `argentina` +--- +`AU` | `australia` +--- +`AT` | `austria` +--- +`AW` | `aruba` +--- +`IN` | `india` +--- +`AX` | `aland islands` +--- +`AZ` | `azerbaijan` +--- +`IE` | `ireland` +--- +`ID` | `indonesia` +--- +`UA` | `ukraine` +--- +`QA` | `qatar` +--- +`MZ` | `mozambique` + +## Netbanking Bank Codes + +Given below is the list of banks supporting netbanking payments. + +Bank Code | Bank Name +--- +airp | Airtel Payments Bank +--- +alla | Allahabad Bank +--- +andb | Andhra Bank +--- +aubl | AU Small Finance Bank +--- +barb_r | Bank of Baroda - Retail Banking +--- +bbkm | Bank of Bahrain and Kuwait +--- +bcbm | Bharat Co-Operative Bank +--- +bdbl | Bandhan Bank +--- +bkdn | Dena Bank +--- +bkid | Bank of India +--- +cbin | Central Bank of India +--- +ciub | City Union Bank +--- +cnrb | Canara Bank +--- +corp | Corporation Bank +--- +cosb | Cosmos Co-operative Bank +--- +csbk | Catholic Syrian Bank +--- +dbss | Development Bank of Singapore +--- +dcbl | DCB Bank +--- +deut | Deutsche Bank +--- +dlxb | Dhanlaxmi Bank +--- +esaf | ESAF Small Finance Bank +--- +esfb | Equitas Small Finance Bank +--- +fdrl | Federal Bank +--- +fsfb | Fincare Small Finance Bank +--- +hdfc | HDFC Bank +--- +hsbc | HSBC +--- +ibkl | IDBI +--- +icic | ICICI Bank +--- +idfb | IDFC FIRST Bank +--- +idib | Indian Bank +--- +indb | Indusind Bank +--- +ioba | Indian Overseas Bank +--- +jaka | Jammu and Kashmir Bank +--- +jsbp | Janata Sahakari Bank (Pune) +--- +jsfb | Jana Small Finance Bank +--- +karb | Karnataka Bank +--- +kccb | The Kalupur Commercial Co-Operative Bank +--- +kjsb | Kalyan Janata Sahakari Bank +--- +kkbk | Kotak Mahindra Bank +--- +kvbl | Karur Vysya Bank +--- +lavb_r | Lakshmi Vilas Bank - Retail Banking +--- +mahb | Bank of Maharashtra +--- +msnu | Mehsana Urban Bank +--- +nesf | North East Small Finance Bank +--- +nkgs | NKGSB Co-operative Bank +--- +nspb | NSDL Payments Bank +--- +orbc | Oriental Bank of Commerce +--- +pmcb | Punjab & Maharashtra Co-operative Bank +--- +psib | Punjab & Sind Bank +--- +punb_r | Punjab National Bank - Retail Banking +--- +ratn | RBL Bank +--- +sbbj | State Bank of Bikaner and Jaipur +--- +sbhy | State Bank of Hyderabad +--- +sbin | State Bank of India +--- +sbmy | State Bank of Mysore +--- +sbtr | State Bank of Travancore +--- +scbl | Standard Chartered Bank +--- +sibl | South Indian Bank +--- +srcb | Saraswat Co-operative Bank +--- +stbp | State Bank of Patiala +--- +sury | Suryoday Small Finance Bank +--- +svcb | Shamrao Vithal Co-operative Bank +--- +synb | Syndicate Bank +--- +tjsb | Thane Janata Sahakari Bank +--- +tmbl | Tamilnadu Mercantile Bank +--- +tnsc | Tamilnadu State Apex Co-operative Bank +--- +ubin | Union Bank of India +--- +ucba | UCO Bank +--- +utbi | United Bank of India +--- +utib | Axis Bank +--- +vara | Varachha Co-operative Bank Limited +--- +yesb | Yes Bank diff --git a/llm-content/partners/aggregators/onboarding-api/instant-activation.md b/llm-content/partners/aggregators/onboarding-api/instant-activation.md new file mode 100644 index 00000000..a489fc3f --- /dev/null +++ b/llm-content/partners/aggregators/onboarding-api/instant-activation.md @@ -0,0 +1,171 @@ +--- +title: Instantly Activate Sub-Merchant Accounts +description: Instantly activate sub-merchant accounts and enable them to start accepting customer payments before KYC submission (Razorpay Partnership). +--- + +# Instantly Activate Sub-Merchant Accounts + +With our Instant Activation feature, you can cut down the account activation wait time and enable sub-merchants to start accepting customer payments immediately after signing up. + +## Features + +With this feature: +- The sub-merchants can accept payments **up to ₹15,000** without KYC completion, using Payment Gateway and/or Payment Links products. + +- In case of the ₹15,000 transaction volume breach, Razorpay disables payments till the KYC process is completed. There is no change in the product's status when payments are disabled. + +- When a sub-merchant completes their KYC, the product status moves to `under_review` and they can start accepting payments. + +- Razorpay settles the transaction amount only after successful KYC verification. + +- You can configure webhook events to receive notifications on transaction volume levels. For example, alerts are sent to the sub-merchants when their transaction volume breaches ₹12,000 and so on. + +## Workflow + +Given below is an illustration of the workflow: + +![Instant Activation Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-onboarding-api-instant-activation-flow.jpg.md) + +## Webhook Events and Payloads + +Event Name | Description +--- +`account.instant_activation_gmv_limit_warning` | Triggered after the sub-merchant's transaction volume crosses one of these levels: - ₹5000 +- ₹10,000 +- ₹15,000 + +### Sample Payload: Volume Hits ₹10,000 + +```json: instant_activation_gmv_limit_warning +{ + "entity": "event", + "account_id": "acc_K7UEVHASFftJfL", + "event": "account.instant_activation_gmv_limit_warning", + "contains": [ + "acc_id", + "gmv_limit", + "current_gmv", + "message" + ], + "payload": { + "acc_id": "K7UEVHASFftJfL", + "gmv_limit": 15000, + "current_gmv": 10000, + "message": "You can accept payments upto INR 5000. In order to remove this limit and settle the amount to your account, fill in the remaining details" + }, + "created_at": 1660911446 +} +``` + +### Sample Payload: Volume Breached ₹15,000 + +```json: instant_activation_gmv_limit_warning +{ + "entity": "event", + "account_id": "acc_K7U7hK1PeatxIs", + "event": "account.instant_activation_gmv_limit_warning", + "contains": [ + "acc_id", + "gmv_limit", + "current_gmv", + "message" + ], + "payload": { + "acc_id": "K7U7hK1PeatxIs", + "gmv_limit": 15000, + "current_gmv": 15200, + "message": "You can no longer accept payments as you have breached the INR 15,000 limit. Kindly fill in the remaining details to re-activate your account." + }, + "created_at": 1660937354 +} +``` + +## API Response Code Changes + +The sub-merchant can accept payments only up to ₹15,000. When they breach this limit, Razorpay sends a description in the **Fetch a Product Configuration API** response's `requirement` parameter, urging the sub-merchant to submit the remaining details and complete KYC. + +```json: API Response +{ + "requested_configuration": [], + "active_configuration": { + "payment_capture": { + "mode": "automatic", + "refund_speed": "normal", + "automatic_expiry_period": 7200 + }, + "settlements": { + "account_number": null, + "ifsc_code": null, + "beneficiary_name": null + }, + "checkout": { + "theme_color": "#FFFFFF", + "flash_checkout": true + }, + "refund": { + "default_refund_speed": "normal" + }, + "notifications": { + "whatsapp": false, + "sms": false, + "email": [ + "testcreateaccount4147apr@razorpay.com" + ] + } + }, + "requirements": [ + { + "field_reference": "business_proof_of_identification.business_pan_url", + "resolution_url": "/accounts/acc_KB87VG5MDvcIpl/documents", + "status": "required", + "reason_code": "document_missing", + "description": "You can no longer accept payments as you have breached the INR 15,000 limit. Kindly fill in the remaining details to re-activate your account." + }, + { + "field_reference": "business_proof_of_identification.business_proof_url", + "resolution_url": "/accounts/acc_KB87VG5MDvcIpl/documents", + "status": "required", + "reason_code": "document_missing", + "description": "You can no longer accept payments as you have breached the INR 15,000 limit. Kindly fill in the remaining details to re-activate your account." + }, + { + "field_reference": "individual_proof_of_address", + "resolution_url": "/accounts/acc_KB87VG5MDvcIpl/stakeholders/sth_KB88x5dxpYtSdw/documents", + "status": "required", + "reason_code": "document_missing", + "description": "You can no longer accept payments as you have breached the INR 15,000 limit. Kindly fill in the remaining details to re-activate your account." + }, + { + "field_reference": "settlements.beneficiary_name", + "resolution_url": "/accounts/acc_KB87VG5MDvcIpl/products/acc_prd_KB8AggJtFqqQiJ", + "reason_code": "field_missing", + "status": "required", + "description": "You can no longer accept payments as you have breached the INR 15,000 limit. Kindly fill in the remaining details to re-activate your account." + }, + { + "field_reference": "settlements.account_number", + "resolution_url": "/accounts/acc_KB87VG5MDvcIpl/products/acc_prd_KB8AggJtFqqQiJ", + "reason_code": "field_missing", + "status": "required", + "description": "You can no longer accept payments as you have breached the INR 15,000 limit. Kindly fill in the remaining details to re-activate your account." + }, + { + "field_reference": "settlements.ifsc_code", + "resolution_url": "/accounts/acc_KB87VG5MDvcIpl/products/acc_prd_KB8AggJtFqqQiJ", + "reason_code": "field_missing", + "status": "required", + "description": "You can no longer accept payments as you have breached the INR 15,000 limit. Kindly fill in the remaining details to re-activate your account." + } + ], + "tnc": { + "id": "tnc_KB89LFr5vuo3GQ", + "accepted": true, + "accepted_at": 1661706575 + }, + "id": "acc_prd_KB8AggJtFqqQiJ", + "product_name": "payment_gateway", + "activation_status": "instantly_activated", + "account_id": "acc_KB87VG5MDvcIpl", + "requested_at": 1661706652 +} +``` diff --git a/llm-content/partners/aggregators/onboarding-api/product-activation.md b/llm-content/partners/aggregators/onboarding-api/product-activation.md new file mode 100644 index 00000000..726398f2 --- /dev/null +++ b/llm-content/partners/aggregators/onboarding-api/product-activation.md @@ -0,0 +1,43 @@ +--- +title: Product Activation Status +description: View the product activation status for your sub-merchant (Razorpay Partnership). +--- + +# Product Activation Status + +Product Activation Status is the current status of the product for the account that the account that partners create for their customers. It notifies the partner about what stage of processing the product requested for the account is in. + +## Product Activation Flow + +Given below is the complete end-to-end flow explaining the transition among statuses: + +![product-activation-status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/product-activ-status-new.jpg.md) + +Once the partner creates an account and fills in the necessary business, stakeholder and bank details, the partner has to request specific products for the merchant using the [Request Product Configuration API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/request.md). + +As a part of the response to this request, as well as any request containing the [Product Configuration entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration.md#product-configuration-entity), the `activation status` parameter informs the partner about the product's activation status. + +## Product Activation States + +The table below lists the various Product Activation states with a brief description of each state: + +Status | Description +--- +Requested | This state represents that the requested details have been submitted, awaiting the next step of processing. +--- +Needs Clarification | The product configuration API will tell the merchant about fields where we need clarification. +--- +Under Review | Razorpay's support team is verifying the details submitted. +--- +Activated | Indicates that the product is fully activated. +--- +Suspended | Indicates that the product has been suspended. + +### Related Information + +- [Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners.md) +- [About Aggregators](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators.md) +- [Sub-Merchant Onboarding APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md) +- [Sub-Merchant Onboarding APIs Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/workflow.md) +- [List of Partner APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/webhooks.md) diff --git a/llm-content/partners/aggregators/onboarding-api/webhooks.md b/llm-content/partners/aggregators/onboarding-api/webhooks.md new file mode 100644 index 00000000..f5af2382 --- /dev/null +++ b/llm-content/partners/aggregators/onboarding-api/webhooks.md @@ -0,0 +1,117 @@ +--- +title: Partners | Onboarding APIs - Subscribe to Webhooks +heading: Subscribe to Webhooks +description: Use webhooks to get notified about Transaction events and Sub-Merchant Onboarding events. +--- + +# Subscribe to Webhooks + +Subscribe to webhook events relevant to partners to receive notifications (in the form of a webhook payload) when these events occur. + +## Subscribe to Webhooks + +Watch this video to see how you can subscribe to Partner Webhooks. + +[Video content] + +To subscribe to webhook events: +1. Log in to the Dashboard. +2. Navigate to **Partner's Dashboard** → **Settings** → **Webhooks** to subscribe to any of the events mentioned in the following section. +3. Click on **Manage** settings. +4. In the **Webhook Setup** pop-up page: + 1. Enter the **URL** where you want to receive the webhook payload when an event is triggered. We recommended using an HTTPS URL. + 1. Enter a **Secret** for the webhook endpoint. The secret is used to validate that the webhook is from Razorpay. + 1. In the **Alert Email** field, enter the email address to which the notifications should be sent in case of webhook failure. + 1. Select the required events from the list of **Active Events**. +1. Click **Create Webhook**. + +### Webhook Events and Descriptions + +There are 2 types of events: + +1. **Transaction Events**: These are events related to payment transactions performed by the sub-merchants. The partner at a sub-merchant level can configure these events. +2. **Sub-Merchant Onboarding Events**: These events are related to the onboarding status of the sub-merchant. This is subscribed at the partner level and not configurable at the sub-merchant level. Subscribing to this event will enable the partner to get the onboarding status of all sub-merchants. + +Know more about [Aggregators Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners.md). + +#### Transaction Events + +Event Category | Event Name | Description +--- +Payment Events | payment.authorized | Triggered when a payment is authorized. +--- +Payment Events| payment.failed | Triggered when a payment fails. +--- +Payment Events | payment.captured | Triggered when a payment is captured. +--- +Payment Events | payment.dispute.created | Triggered when a dispute for a payment is created. +--- +Payment Events | payment.dispute.won | Triggered when a dispute for a payment is won. +--- +Payment Events | payment.dispute.lost | Triggered when a dispute for a payment is lost. +--- +Payment Events | payment.dispute.closed | Triggered when a dispute for a payment is closed. +--- +Payment Events | payment.downtime.started | Triggered when the downtime for a payment starts. +--- +Payment Events | payment.downtime.resolved | Triggered when the downtime for a payment is resolved. +--- +Order Events | order.paid | Triggered when a payment is successfully made against an order. +--- +Invoice Events | invoice.paid | Triggered when an invoice is successfully paid. +--- +Invoice Events | invoice.partially_paid | Triggered when a partial payment is made for an invoice. +--- +Invoice Events | invoice.expired | Triggered when an invoice expires. +--- +Fund_account Events | fund_account.validation.completed | Triggered when the validation for a fund account is completed. +--- +Fund_account Events | fund_account.validation.failed | Triggered when the validation for a fund account fails. +--- +Refund Events | refund.speed_changed | Triggered when the speed of a refund is changed. +--- +Refund Events | refund.processed | Triggered when a refund is processed. +--- +Refund Events | refund.failed | Triggered when the a refund fails. +--- +Refund Events| refund.created | Triggered when the a refund is created. +--- +Payment_link Events | payment_link.paid | Triggered when a Payment Link is paid. +--- +Payment_link Events | payment_link.partially_paid | Triggered when a partial payment is made on a Payment Link. +--- +Payment_link Events | payment_link.expired | Triggered when a Payment Link expires. +--- +Payment_link Events | payment_link.cancelled | Triggered when a Payment Link is cancelled by you. + +Check the [sample payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) for the above-mentioned webhook events. + +#### Sub-Merchant Onboarding Events + +Event Category | Event Name | Description +--- +PG Product Status | product.payment_gateway.under_review | Triggered when the status for a Payment Gateway product is `under_review`. +--- +PG Product Status | product.payment_gateway.needs_clarification | Triggered when the status for a Payment Gateway product is `needs clarification`. +--- +PG Product Status | product.payment_gateway.activated | Triggered when the status for a Payment Gateway product is `activated`. +--- +PG Product Status | product.payment_gateway.rejected | Triggered when the status for a Payment Gateway product is `rejected`. +--- +PL Product Status | product.payment_link.under_review | Triggered when the status for a Payment Link product is `under_review`. +--- +PL Product Status | product.payment_link.needs_clarification | Triggered when the status for a Payment Link product is `needs clarification`. +--- +PL Product Status | product.payment_link.activated | Triggered when the status for a Payment Link product is `activated`. +--- +PL Product Status | product.payment_link.rejected | Triggered when the status for a Payment Link product is `rejected`. +--- +Account | account.suspended | Triggered when the Partner's account gets suspended. + +You can check the events and sample payloads of [Sub-Merchant Onboarding Events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners.md). Know more about [Webhook APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/webhooks.md). + +### Related Information +- [Sub-Merchant Onboarding APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md) +- [Sub-Merchant Onboarding APIs Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/workflow.md) +- [List of Partner APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md) +- [Appendix](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md) diff --git a/llm-content/partners/aggregators/onboarding-api/workflow.md b/llm-content/partners/aggregators/onboarding-api/workflow.md new file mode 100644 index 00000000..395f6c72 --- /dev/null +++ b/llm-content/partners/aggregators/onboarding-api/workflow.md @@ -0,0 +1,68 @@ +--- +title: Sub-Merchant Onboarding APIs Flow +description: Seamlessly onboard merchants using the Sub-Merchant Onboarding APIs. +--- + +# Sub-Merchant Onboarding APIs Flow + +To use the Sub-Merchant Onboarding APIs, you need to enroll in the Razorpay Partner Program. + +The following illustration depicts the Sub-merchant Onboarding APIs flow to help Partners onboard merchants from their platform: + +![Partners API Workflow diagram](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-api-onboarding-workflow.jpg.md) + +Follow the steps given below: + +1. Sign in to your Partner Dashboard to obtain your `client_id` and `client_secret` to authenticate API calls. You can obtain `client_id` and `client_secret` depending on the test mode or live mode. +2. Create a webhook related to desired events such as payments, orders, invoices and so on. +3. Create an account for the sub-merchant using the [Create an Account API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/create.md). +4. An account is created and the `account_id` is provided in the response. For example, `acc_Hbu4sC0O4GOGSN`. Use this `account_id` to fetch, update, delete the account and upload account documents. +5. Use the [Create a Stakeholder API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/create.md) to add a stakeholder for an account. Each stakeholder needs to update the KYC. +6. A `stakeholder_id` is provided in the response as a stakeholder is created. For example, `sth_Hbu4sC0O4GOGSK`. Use this stakeholder id to complete stakeholder-related KYC details while onboarding a product. Also, use this `stakeholder_id` to fetch and update a stakeholder. +7. Before activating the sub-merchant and requesting for relevant product configurations, the sub-merchant needs to view and accept Terms and Conditions. The partner can fetch Terms and Conditions links to show to the sub-merchant using [Fetch Terms and Conditions API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/terms-conditions/fetch.md). +8. As requested, the partner will get a link to the relevant Terms and Conditions. +9. Create a product (for example, `payment_gateway`) and accept Terms and Conditions for the sub-merchant using the [Request a Product Configuration API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/request.md). A product is created with default configurations. To update configurations, you can use the [Update a Product Configuration API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/update-settlement-account-details.md) (For Payment gateway product, settlement details (bank account) have to be sent in the Update Config API). +10. As the product is created, the `merchant_product_id` and the list of pending requirements are provided in the response. +11. Cater to the pending account requirements using the [Update an Account API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/update.md). +12. As the requested account details criteria is met, an updated account response will be provided. +13. Using the [Documents APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/upload-document.md), upload the required sub-merchant's business documents. +14. Once the required documents are uploaded, the uploaded details of a document (S3 URL) are provided in the response based on the entity, that is, account. +15. Fill in the stakeholder requirements using the [Update a Stakeholder API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/update.md). For example, KYC requirements such as PAN is the type of document required to establish the stakeholder's identity. +16. After the KYC requirements for a stakeholder are met, the response for the stakeholder is updated. +17. Using the [Documents APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/upload-document.md), upload the required sub-merchant's stakeholder's signatory documents. +18. Once the required documents are uploaded, the uploaded document details (S3 URL) are provided in the response based on the entity, that is, stakeholder. +19. Using the [Product Configuration Request APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/fetch.md), fetch the account product. +20. The [product activation status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/product-activation.md) changes to `under_review` when all the requirements are met. At this point, the status for a Payment Gateway product changes to `under_review` and the webhook event `product.payment_gateway.under_review` is triggered. +21. When the [product status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/product-activation.md#product-activation-states) is changed to `needs_clarification`, the webhook event `product.payment_gateway.needs_clarification` is triggered. + +> **INFO** +> +> +> **Handy Tips** +> +> Repeat steps 11 to 18 till the account status changes to **Terminal state** (either activated or rejected). +> + +22. The webhook event `product.payment_gateway.activated` is triggered when the Payment Gateway product status is `activated`. + +> **WARN** +> +> +> **Watch Out!** +> +> Currently, we do not support making concurrent requests to the following Onboarding APIs including their combination on the same `account_id`: +> - [Update Account API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/update.md) +> - [Update Product Configuration API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/update-settlement-account-details.md) +> - [Update Stakeholder API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/update.md) +> +> Please wait for the response of these APIs before making subsequent requests. +> + +### Related Information + +- [Product Activation Status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/product-activation.md) +- [Sub-Merchant Onboarding APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api.md) +- [Partners Account APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding.md) +- [Product Configuration APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration.md) +- [Stakeholder APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder.md) +- [Partners API Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) diff --git a/llm-content/partners/aggregators/onboarding-ui.md b/llm-content/partners/aggregators/onboarding-ui.md new file mode 100644 index 00000000..2bc87e89 --- /dev/null +++ b/llm-content/partners/aggregators/onboarding-ui.md @@ -0,0 +1,41 @@ +--- +title: About Merchant Onboarding UI +description: Integrate with the Merchant Onboarding UI to build a seamless onboarding flow for your sub-merchants. +--- + +# About Merchant Onboarding UI + +Merchant Onboarding UI is a set of pre-built UI components for Razorpay Partners that assists in building a native business onboarding flow. This allows Partners to onboard their sub-merchants to Razorpay right from their platform. + +Merchant Onboarding UI offers customisation wherein Partners can configure colour theme, logo and brand name to mimic the platform theme. + + to get this feature activated on your Razorpay account. + +## Prerequisites +- [Sign up as Partner](https://razorpay.com/partners/) and complete KYC to activate your account. +- Get the Merchant Onboarding UI capability enabled for your account. +- Keep a redirect URL ready. Razorpay will redirect users to this URL after they complete the onboarding process. + +## How it Works + +Given below is the workflow: + +1. Sign up as a Razorpay partner. +2. Configure the merchant onboarding theme as per your platform branding. +3. Subscribe to account creation webhooks to receive real time notifications about merchant onboarding status. +4. Embed the signup link in your platform, to enable merchants to complete Razorpay onboarding and start accepting payments. +5. After the merchant authorises to connect your platform/account, we add the merchant as a sub-merchant under your Razorpay Partner account. +6. You can start managing the merchant account and payments on their behalf after the account is activated. + +![Onboarding flow for Aggregators](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/platforms-and-marketplaces-how-onboarding-works.gif.md) + +## Integration Steps + +Follow these steps to complete the integration: + +1. [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-ui/build-integration.md): Perform the steps on your website/app and the Razorpay Dashboard. +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-ui/test-integration.md): Test the integration before going live with the integration. + +### Related Information + +- [Fetch Merchant Account Onboarding Status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-ui/status.md) diff --git a/llm-content/partners/aggregators/onboarding-ui/build-integration.md b/llm-content/partners/aggregators/onboarding-ui/build-integration.md new file mode 100644 index 00000000..8ebe358f --- /dev/null +++ b/llm-content/partners/aggregators/onboarding-ui/build-integration.md @@ -0,0 +1,54 @@ +--- +title: Merchant Onboarding UI | Build Integration +heading: 1. Build Integration +description: Steps to integrate the Merchant Onboarding UI with your website or app. +--- + +# 1. Build Integration + +Complete these steps to integrate with the Merchant Onboarding UI components and ensure a seamless flow: + +1. [Embed the Merchant Onboarding UI link in your website/app.](#1-embed-merchant-onboarding-ui-link-in-your) +2. [Configure the UI appearance on the Razorpay Dashboard.](#2-configure-onboarding-ui-theme-on-razorpay-dashboard) + +## 1. Embed Merchant Onboarding UI Link in Your Website/App + +1. Embed `https://easy.razorpay.com/sub-merchant` on your platform to redirect your merchants to the Razorpay onboarding page. +2. Pass the `partnerId`, `phoneNumber` and `redirectUrl` parameters in the request while redirecting merchants to Razorpay. + +`partnerId` _mandatory_ +: `string` The Razorpay partner MID. For example, `BouVWhEiuKOvfc`. + +`phoneNumber` _optional_ +: `string` The phone number of the merchant to be onboarded. For example, `+919988998899`. + +`redirectUrl` _mandatory_ +: `string` The URL that the merchant should be redirected to after completing the onboarding. + +### Sample URL + +Here is a sample URL after adding the parameters: `https://easy.razorpay.com/sub-merchant?partnerId=ABC45&phoneNumber=XXXXXXXXXX&redirectUrl=https://google.com` + +## 2. Configure Onboarding UI Theme on Razorpay Dashboard + +Configure the theme colour and logo as per your platform theme to provide a seamless onboarding experience for your sub-merchants. + +Follow these steps: + +1. Log in to the Dashboard. +2. Navigate to **Partners** → **Settings** → **Configuration**. +3. Provide the following details: + - Theme Color: Enter your brand theme colour's HEX value. For example, "#3399cc". This is the primary colour for the onboarding flow UI. + - Your Logo: Click **Upload File** to add your brand logo. Ensure the file meets these requirements: + - Height: Width ratio should be 1:1 (square shape). + - Maximum file size: 1 MB. + - Maximum dimension: 256x256px. + - Enter Your Brand Name: Enter the name that should be shown on the onboarding flow UI. The maximum character limit is 100. + +4. Check the preview of the onboarding UI on the right (desktop and phone) and click **Save**. + +![Configure Onboarding UI theme on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-onboarding-ui-configurator.jpg.md) + +## Next Step + +[2. Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-ui/test-integration.md) diff --git a/llm-content/partners/aggregators/onboarding-ui/status.md b/llm-content/partners/aggregators/onboarding-ui/status.md new file mode 100644 index 00000000..5ee1a64d --- /dev/null +++ b/llm-content/partners/aggregators/onboarding-ui/status.md @@ -0,0 +1,48 @@ +--- +title: Merchant Onboarding Status +description: Check the merchant's onboarding status through API and webhooks. +--- + +# Merchant Onboarding Status + +You can retrieve a merchant's account onboarding status. Using this information, you can: +- Nudge your sub-merchants to complete their onboarding and get payments enabled. +- Know when the merchant account is activated to manage their payments. + +There are two ways to fetch the status of merchant onboarding: + +- [Using API](#using-apis) +- [Using Webhooks](#using-webhooks) + +## Using API + +Use the [Fetch account API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/fetch.md) to get the onboarding status of the sub-merchant. + +## Using Webhooks + +[Subscribe to webhook events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/webhooks.md) to receive real-time notifications about the merchant account activation status. + + + Webhook Event | Payload + --- + `account.activated` | [Sample Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/activated.md#account-activated) + --- + `account.under_review` | [Sample Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/under-review.md#account-under-review) + --- + `account.needs_clarification` | [Sample Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/needs-clarification.md#account-needs-clarification) + --- + `account.suspended` | [Sample Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/suspended.md#account-suspended) + --- + `account.rejected` | [Sample Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/rejected.md#account-rejected) + --- + `account.activated_kyc_pending` | [Sample Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/activated-kyc-pending.md#account-activated-kyc-pending) + --- + `account.funds_hold` | [Sample Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/funds-onhold.md#account-funds-on-hold) + --- + `account.funds_unhold` | [Sample Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/funds-unhold.md#account-funds-unhold) + --- + `account.activated_kyc_pending` | [Sample Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/activated-kyc-pending.md#account-activated-kyc-pending) + --- + `account.instantly_activated` | [Sample Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/instantly-activated.md#account-instantly-activated) + --- + `account.payments_enabled` | [Sample Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/payment-enabled.md#account-payment-enabled) diff --git a/llm-content/partners/aggregators/onboarding-ui/test-integration.md b/llm-content/partners/aggregators/onboarding-ui/test-integration.md new file mode 100644 index 00000000..c2727589 --- /dev/null +++ b/llm-content/partners/aggregators/onboarding-ui/test-integration.md @@ -0,0 +1,23 @@ +--- +title: Merchant Onboarding UI | Test Integration +heading: 2. Test Integration +description: Peruse this checklist to test if the integration is successful. +--- + +# 2. Test Integration + +Given below is a checklist to test if the integration was successful: + +1. When you click on the embedded link on your platform, you should be redirected to Razorpay onboarding and a welcome screen should be displayed. + +2. If you have configured the colour theme, the welcome screen should reflect the same. + +3. If you see this message `Something went wrong! We could not process your request. Try Again.` instead of the welcome screen, it could be due to any of the reasons below: + - You do not have access to this feature. In this case, please reach out to Razorpay support to enable this feature. + - Your integration is incomplete, you might have missed providing either the `partnerID` or the `redirectUrl` in the request. + +After testing the integration, you can go live with the changes. + +### Related Information + +- [Fetch Merchant Account Onboarding Status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-ui/status.md) diff --git a/llm-content/partners/aggregators/partner-auth.md b/llm-content/partners/aggregators/partner-auth.md new file mode 100644 index 00000000..2a69c266 --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth.md @@ -0,0 +1,66 @@ +--- +title: About Partner Auth +description: Use the Partner Auth credentials while using Razorpay product APIs to accept customer payments on behalf of your sub-merchants. +--- + +# About Partner Auth + +You need to use Partner Auth credentials to accept payments from customers on behalf of your sub-merchants. You can use these Razorpay products to accept payments: + +- [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/partner-auth/payment-gateway.md) +- [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/partner-auth/payment-links.md) +- [QR Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/partner-auth/qr-codes.md) +- [Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/partner-auth/smart-collect.md) +- [Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/partner-auth/subscriptions.md) +- [Recurring Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/partner-auth/recurring-payments.md) + +## Get Partner Auth Credentials + +Use the Partner credentials as described in the [Dashboard Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators.md#partner-credentials). + +Watch this video to see how to access your Partner credentials. + +[Video: https://www.youtube.com/embed/TS1Z4CS5GGM?si=uWzzpNy7nJ3klw29] + +> **INFOR** +> +> +> **Handy Tips** +> +> - We use `Basic Auth` for authorising Partner requests. +> - These credentials are mode-specific. In addition to the API Key ID and Secret, provide the sub-merchant identification in the API requests in the header. +> + +## How to Use Partner Auth in APIs + +To your API request: +1. Add the basic auth with partner credentials (client_id and client_secret). +2. Add the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. + +You can use Partner Auth for all [Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + +Below is an example for [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +```Curl: GET Request +curl -u [CLIENT_ID]:[CLIENT_SECRET] \ +-X GET https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-H "X-Razorpay-Account: acc_Ef7ArAsdU5t0XL" \ + +```Curl: POST Request +curl -u [CLIENT_ID]:[CLIENT_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-H "X-Razorpay-Account: acc_Ef7ArAsdU5t0XL" \ +-d '{ + "amount": 10000, + "currency": "INR", + "receipt": "1" +}' +``` + +### Related Information + +- [About Aggregators](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators.md) +- [Add Sub-merchants](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/add-submerchants.md) +- [Testing Operations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/testing.md) diff --git a/llm-content/partners/aggregators/partner-auth/payment-gateway-import-flow-lrs.md b/llm-content/partners/aggregators/partner-auth/payment-gateway-import-flow-lrs.md new file mode 100644 index 00000000..80a59557 --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/payment-gateway-import-flow-lrs.md @@ -0,0 +1,1097 @@ +--- +title: Partner Auth | Payment Gateway (Import Flow - LRS) +heading: Payment Gateway (Import Flow - Liberalised Remittance Scheme) +description: Integrate Razorpay Payment Gateway using Partner Auth. +--- + +# Payment Gateway (Import Flow - Liberalised Remittance Scheme) + +Follow these steps to integrate the standard checkout form on your website: + +**1.1** [Create a customer in server](#11-create-a-customer-in-server) + +**1.2** [Create an order in server](#12-create-an-order-in-server) + +**1.3** [Integrate with checkout on client-side](#13-integrate-with-checkout-on-client-side) + +**1.4** [Handle payment success and failure](#14-handle-payment-success-and-failure) + +**1.5** [Store fields in server](#15-store-fields-in-your-server) + +**1.6** [Verify payment signature](#16-verify-payment-signature) + +**1.7** [Verify payment status](#17-verify-payment-status) + +## 1.1 Create a Customer in Server + +Creating a customer generates a unique `customer_id` by collecting basic details such as name, email and contact details. This `customer_id` must be included when creating a payment request to link the payment to the customer. Use the following API to create a customer. + +You can try out our APIs on the Razorpay Postman Public Workspace. Fork the workspace and test the APIs with your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#test-mode-api-keys). + +/customers + +```cURL: Curl + +curl -u [CLIENT_ID]:[CLIENT_SECRET] \ //This will be Partners Key and Secret. +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-H "X-Razorpay-Account: acc_Ef7ArBsdU5t9XL" //Sub-merchant’s account number (acc_xxxxxxxx) must be passed in the header. +-d '{ + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[CLIENT_ID]", "[CLIENT_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +headers.put("X-Razorpay-Account","acc_Ef7ArBsdU5t9XL"); +instance.addHeaders(headers); +customerRequest.put("name","Gaurav Kumar"); +customerRequest.put("contact","+919000090000"); +customerRequest.put("email","gaurav.kumar@example.com"); +customerRequest.put("fail_existing", "0"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("CLIENT_ID", "CLIENT_SECRET")) + +headers = {"headers": {"X-Razorpay-Account": "acc_Ef7ArBsdU5t9XL"}} + +client.customer.create({ + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("CLIENT_ID", "CLIENT_SECRET") + +extraHeaders:= map[string]string{ + "X-Razorpay-Account": "acc_Ef7ArBsdU5t9XL", + } + +data := map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} + +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($client_id, $secret); + +$api->setHeader("X-Razorpay-Account","acc_Ef7ArBsdU5t9XL"); + +$api->customer->create(array('name' => 'Gaurav Kumar', 'email' => 'gaurav.kumar@example.com','contact'=>'+919000090000','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[CLIENT_ID]", "[CLIENT_SECRET]"); + +client.addHeader("X-Razorpay-Account", "acc_Ef7ArBsdU5t9XL"); + +Dictionary options = new Dictionary(); + +options.Add("name", "Gaurav Kumar"); +options.Add("contact", "+919000090000"); +options.Add("email", "gaurav.kumar@example.com"); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('CLIENT_ID', 'CLIENT_SECRET') + +Razorpay.headers = {"X-Razorpay-Account" => "acc_Ef7ArBsdU5t9XL"} + +Razorpay::Customer.create({ + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'CLIENT_ID', key_secret: 'CLIENT_SECRET' }) +var instance = new Razorpay({headers: {"X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL"}) + +instance.customers.create({ + name: "Gaurav Kumar", + contact: "+919000090000", + email: "gaurav.kumar@example.com", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +``` + +```json: Success +{ + "id": "cust_MpINfSkdEvtdxb", + "entity": "customer", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "gstin": null, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1697550382 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } +} +``` + + +### Request Parameters + + `name` _mandatory_ + : `string` Customer's name. + - **Character length**: Between 5 and 50 characters. + - **Allowed characters**: Uppercase letters (A-Z), lowercase letters (a-z) and spaces (not at the beginning). + - **Not allowed characters**: Numbers, special characters (For example, @, ", ,, . and so on.), Unicode characters, emojis and non-Latin scripts or regional languages. + - **Prohibited names**: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (For example, aaa, xyz, kkk kk). + - Names like "litri litri", "Hfg Gh" or "husi husi" are not permitted. + - Curse words or offensive names are not prohibited. + - **Example**: `Gaurav Kumar`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `email` _mandatory_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `fail_existing` _optional_ + : `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + `gstin` _optional_ + : `string` Customer's GST number, if available. + For example, `29XAbbA4369J1PA`. + + `notes` _optional_ + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `entity` + : `string` Indicates the type of entity. + + `name` + : `string` Customer's name. + - **Character length**: Between 5 and 50 characters. + - **Allowed characters**: Uppercase letters (A-Z), lowercase letters (a-z) and spaces (not at the beginning). + - **Not allowed characters**: Numbers, special characters (For example, @, ", ,, . and so on.), Unicode characters, emojis and non-Latin scripts or regional languages. + - **Prohibited names**: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (For example, aaa, xyz, kkk kk). + - Names like "litri litri", "Hfg Gh" or "husi husi" are not permitted. + - Curse words or offensive names are not prohibited. + - **Example**: `Gaurav Kumar`. + + `contact` + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `email` + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `gstin` + : `string` GST number linked to the customer. + For example, `29XAbbA4369J1PA`. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. Know how to [Generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + --- + Contact number should be at least 8 digits, including country code. | The contact number is less than 8 digits. | Enter contact number that meets the validation criteria. It should have at least 8 digits, including the country code. For example, "+919000090000". + + + +## 1.2 Create an Order in Server + +After a customer is created, an order needs to be generated using the Orders API. This order contains details such as the payment amount, currency, customer details, tax-related information and other custom notes. + +After the order is created, an `order_id` is generated, for example, `order_NGrgEcmYJsfUyl`. You must pass this `order_id` in the checkout code to associate this order with the payment. Learn more about [Order and Payment states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md#order-states). + +Use the API sample code given below to create an order. + +/orders + +```cURL: Curl +curl -u [CLIENT_ID]:[CLIENT_SECRET] \ //This will be Partners Key and Secret. +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-H "X-Razorpay-Account: acc_Ef7ArBsdU5t9XL" //Sub-merchant’s account number (acc_xxxxxxxx) must be passed in the header. +-d '{ + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "customer_id": "cust_MpINfSkdEvtdxb", + "customer_details": { + "name": "" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "line_items": [ + { + "type": "lrs_hotel", + "name": "Acme hotel", + "description": "hotel booking", + "quantity": 1 + } + ] +}' +``` + +```json: Success +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} + +```json: Failure - Amount +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +```json: Failure - Customer Name +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "customer name is invalid", + "metadata": {}, + "reason": "input_validation_failed", + "source": "business", + "step": "payment_initiation" + } +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - **Customer Information Collection**: PAN, DOB and TCS declaration will be collected from customers at checkout. +> - **TCS Calculation**: Razorpay will automatically calculate TCS based on the line items passed in the Create Order API and apply the required TCS on customer payments according to the following slabs: +> +> +> Payment Purpose | LRS Limit --- +> Travel Booking | 0% | 20% +> --- +> Tour Booking | 5% | 20% +> --- +> Education (Loan-funded) | 0% | 0% +> --- +> Education (Self-funded) | 0% | 5% +> --- +> +> + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. Payment can only be made for this amount against the Order. + +`currency` _mandatory_ +: `string` The currency code. The default length is 3 characters. For example, `INR`. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Can have a maximum length of 40 characters and has to be unique. + +`customer_id` _optional_ +: `string` Unique identifier of customer. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z) and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (For example, @, ", ,, ., etc.), Unicode characters, emojis and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (For example, aaa, xyz, kkk kk). + - Names like "litri litri", "Hfg Gh" or "husi husi" are not permitted. + - Curse words or offensive names are prohibited. + - Example: `Gaurav Kumar`. + +`notes` _optional_ +: `json object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`line_items` _mandatory_ +: `object` Contains the details of the booking itinerary. + + `type` _mandatory_ + : `string` Contains the type of item of booking. Possible values: + - `lrs_travel` + - `lrs_experience` + - `lrs_hotel` + + `name` _optional_ + : `string` Contains the name of the booking. For example, the name of the hotel, flight and so on. + + `description` _optional_ + : `string` Contains the description of the booking. + + `quantity` _optional_ + : `integer` Contains the quantity of the booking. For example, 1 flight or 2 rooms. + + + +### Response Parameters + + `amount` + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` Indicates the Unix timestamp when this order was created. + + `currency` + : `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + + `offer_id` + : `string` The unique identifier of the offer. For example, `offer_JHD834hjbxzhd38d`. + + `receipt` + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order changes to the `attempted` state following the first payment attempt and remains in this state until at least one payment is successfully processed and captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. + The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. + --- + The amount must be at least INR 1.00. | The amount specified is less than the minimum amount. Currency subunits, such as paise (in the case of INR), should always be greater than 100. | Enter an amount equal to or greater than the minimum amount, that is 100. + --- + The **field name** is required. | A mandatory field is missing. | Ensure all mandatory fields and values are present. + --- + Only english alphabets are allowed in customer name. | The customer name provided in the request contains characters other than English alphabets, such as numbers, special characters, regional language characters or emojis. | Ensure that the name field in the request contains only English letters (A-Z, a-z) and meets the validation criteria: - Verify that the name does not include numerical characters, special characters (For example, @, #, $, etc.) or non-Latin scripts. +- Confirm that there are no extra spaces at the beginning or end of the name. + + --- + Customer name should be between 5 and 50 characters. | The `name` field provided in the request does not meet the required character length. It is either shorter than 5 characters or exceeds 50 characters. | - Ensure that the `name` field in the request is between 5 and 50 characters long. +- Check that no extra spaces are included at the beginning or end of the name, which might affect the character count. + + --- + Customer name is invalid. | The `name` field provided in the request does not meet the validation requirements. This could be due to the presence of disallowed characters, such as special characters, numbers, regional language characters or the use of non-Latin scripts. | - Ensure that the `name` field only contains English letters (A-Z, a-z) and spaces (not at the beginning). +- Verify that the name does not include special characters, numerical digits, emojis or regional language characters. +- Check for unintended characters that may have been included by mistake (For example, trailing spaces or special symbols). + + + + +## 1.3 Integrate with Checkout on Client-Side + +Add the Pay button on your web page using the checkout code, Handler Function or Callback URL. + + +### Handler Function or Callback URL + +**Handler Function** | **Callback URL** +--- +When you use this: - On successful payment, the customer is shown your web page. +- On failure, the customer is notified of the failure and asked to retry the payment. + | When you use this: - On successful payment, the customer is redirected to the specified URL, for example, a payment success page. +- On failure, the customer is asked to retry the payment. + + + +### Code to Add Pay Button + +Copy-paste the parameters as `options` in your code: + +```html: Callback URL (JS) Checkout Code +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Partners Dashboard. + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", //your business name. + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "customer_id": "cust_MpINfSkdEvtdxb", + "order_id": "order_NGrgEcmYJsfUyl", //This is a sample Order ID. Pass the `id` obtained in the response of Step 2. + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information especially their phone number. + "name": "", //your customer's name. + "email": "", + "contact": "" //Provide the customer's phone number for better conversion rates. + }, + "notes": { + "invoice_number": "IRS1245", + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +```html: Handler Functions (JS) Checkout Code +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard. + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", //your business name. + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "customer_id": "cust_MpINfSkdEvtdxb", + "order_id": "order_NGrgEcmYJsfUyl", //This is a sample Order ID. Pass the `id` obtained in the response of Step 2. + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information, especially their phone number. + "name": "", //your customer's name. + "email": "", + "contact": "" //Provide the customer's phone number for better conversion rates. + }, + "notes": { + "invoice_number": "IRS1245", + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); +}); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> Test your integration using these [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/test-integration.md#Cards). +> + +> **WARN** +> +> +> **Watch Out!** +> +> - The `invoice_number` field is mandatory for all payment methods. Ensure each payment has a unique invoice number. +> - The `createPayment` method should be called within an event listener triggered by user action to prevent the popup from being blocked. For example: +> ```js +> $('button').click( function (){ razorpay.createPayment(...) }) +> ``` +> + +#### Supported Payment Methods + +Following payment methods are supported under the Import Flow: +- Netbanking +- UPI +- Cards +- [Recurring](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments.md) + +For recurring payments, additional integration is needed. Cards, UPI and UPI with TPV are supported as a payment methods. + + +### Checkout Parameters + + `key` _mandatory_ +: `string` API Key ID generated from the Razorpay Dashboard. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `50000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: “contact": "+919000090000"). +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + + `name` _optional_ + : `string` Cardholder's name to be pre-filled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also pre-filled. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#save-card-details). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and net banking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments with the suggested next best option. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment with the suggested next best option. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the invoice generated. Ensure each payment has a unique invoice number. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> The open method of Razorpay object (`rzp1.open()`) must be invoked by your site's JavaScript, which may or may not be a user-driven action such as a click. +> + + +### Errors + +Given below is a list of errors you may face while integrating with checkout on the client-side. + +Error | Cause | Solution +--- +The id provided does not exist. | Occurs when there is a mismatch between the API keys used while creating the `order_id`/`customer_id` and the API key passed in the checkout. | Make sure that the API keys passed in the checkout are the same as the API keys used while creating the `order_id`/`customer_id`. +--- +Blocked by CORS policy. | Occurs when the server-to-server request is hit from the front end instead. | Make sure that the API calls are made from the server side and not the client side. + + + +### Configure Payment Methods (Optional) + +Multiple payment methods are available on the Razorpay Web Standard Checkout. +- The payment methods are **fixed** and cannot be changed. +- You can configure the order or make certain payment methods prominent. Know more about [configuring payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + +## 1.4 Handle Payment Success and Failure + +The way the Payment Success and Failure scenarios are handled depends on the [Checkout Sample Code](#code-to-add-pay-button) you used in the last step. + + +### Checkout with Handler Function + +If you used the sample code with the handler function: + + + The customer sees your website page. The checkout returns the response object of the successful payment (**razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature**). Collect these and send them to your server. + + + + + The customer is notified about payment failure and asked to retry the payment. Know about the [error parameters.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md#response-parameters) + + ```js: Failure Handling Code + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + } + ``` + + + + + +### Checkout with Callback URL + +If you used the sample code with the callback URL: + + + + Razorpay makes a POST call to the callback URL with the **razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature** in the response object of the successful payment. Only successful authorisations are auto-submitted. + + + + + In case of failed payments, the checkout is displayed again to facilitate payment retry. + + + + +## 1.5 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +## 1.6 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +Here are the links to our [SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#client-libraries) for the supported platforms. + +## 1.7 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +### Related information + +- [Invoice Collection](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/standard-integration/invoice-collection.md) +- [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/standard-integration/test-integration.md) diff --git a/llm-content/partners/aggregators/partner-auth/payment-gateway-import-flow.md b/llm-content/partners/aggregators/partner-auth/payment-gateway-import-flow.md new file mode 100644 index 00000000..94076b07 --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/payment-gateway-import-flow.md @@ -0,0 +1,1147 @@ +--- +title: Partner Auth | Payment Gateway (Import Flow) +heading: Payment Gateway (Import Flow) +description: Integrate Razorpay Payment Gateway using Partner Auth. +--- + +# Payment Gateway (Import Flow) + +Follow these steps to integrate the standard checkout form on your website: + +**1.1** [Create a customer in server](#11-create-a-customer-in-server) + +**1.2** [Create an order in server](#12-create-an-order-in-server) + +**1.3** [Integrate with checkout on client-side](#13-integrate-with-checkout-on-client-side) + +**1.4** [Handle payment success and failure](#14-handle-payment-success-and-failure) + +**1.5** [Store fields in server](#15-store-fields-in-your-server) + +**1.6** [Verify payment signature](#16-verify-payment-signature) + +**1.7** [Verify payment status](#17-verify-payment-status) + +## 1.1 Create a Customer in Server + +Creating a customer generates a unique `customer_id` by collecting basic details such as name, email, and contact details. This `customer_id` must be included when creating a payment request to link the payment to the customer. Use the following API to create a customer. + +You can try out our APIs on the Razorpay Postman Public Workspace. Fork the workspace and test the APIs with your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#test-mode-api-keys). + +/customers + +```cURL: Curl + +curl -u [CLIENT_ID]:[CLIENT_SECRET] \ //This will be Partners Key and Secret. +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-H "X-Razorpay-Account: acc_Ef7ArBsdU5t9XL" //Sub-merchant’s account number (acc_xxxxxxxx) must be passed in the header. +-d '{ + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[CLIENT_ID]", "[CLIENT_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +headers.put("X-Razorpay-Account","acc_Ef7ArBsdU5t9XL"); +instance.addHeaders(headers); +customerRequest.put("name","Gaurav Kumar"); +customerRequest.put("contact","+919000090000"); +customerRequest.put("email","gaurav.kumar@example.com"); +customerRequest.put("fail_existing", "0"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("CLIENT_ID", "CLIENT_SECRET")) + +headers = {"headers": {"X-Razorpay-Account": "acc_Ef7ArBsdU5t9XL"}} + +client.customer.create({ + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("CLIENT_ID", "CLIENT_SECRET") + +extraHeaders:= map[string]string{ + "X-Razorpay-Account": "acc_Ef7ArBsdU5t9XL", + } + +data := map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} + +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($client_id, $secret); + +$api->setHeader("X-Razorpay-Account","acc_Ef7ArBsdU5t9XL"); + +$api->customer->create(array('name' => 'Gaurav Kumar', 'email' => 'gaurav.kumar@example.com','contact'=>'+919000090000','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[CLIENT_ID]", "[CLIENT_SECRET]"); + +client.addHeader("X-Razorpay-Account", "acc_Ef7ArBsdU5t9XL"); + +Dictionary options = new Dictionary(); + +options.Add("name", "Gaurav Kumar"); +options.Add("contact", "+919000090000"); +options.Add("email", "gaurav.kumar@example.com"); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('CLIENT_ID', 'CLIENT_SECRET') + +Razorpay.headers = {"X-Razorpay-Account" => "acc_Ef7ArBsdU5t9XL"} + +Razorpay::Customer.create({ + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'CLIENT_ID', key_secret: 'CLIENT_SECRET' }) +var instance = new Razorpay({headers: {"X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL"}) + +instance.customers.create({ + name: "Gaurav Kumar", + contact: "+919000090000", + email: "gaurav.kumar@example.com", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +``` + +```json: Success +{ + "id": "cust_MpINfSkdEvtdxb", + "entity": "customer", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "gstin": null, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1697550382 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } +} +``` + + +### Request Parameters + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (For example, @, ", ,, ., and so on.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (For example, aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `email` _mandatory_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `fail_existing` _optional_ + : `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + `gstin` _optional_ + : `string` Customer's GST number, if available. + For example, `29XAbbA4369J1PA`. + + `notes` _optional_ + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `entity` + : `string` Indicates the type of entity. + + `name` + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (For example, @, ", ,, ., and so on.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (For example, aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `contact` + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `email` + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `gstin` + : `string` GST number linked to the customer. + For example, `29XAbbA4369J1PA`. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. Know how to [Generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + --- + Contact number should be at least 8 digits, including country code. | The contact number is less than 8 digits. | Enter contact number that meets the validation criteria. It should have at least 8 digits, including the country code. For example, "+919000090000". + + + +## 1.2 Create an Order in Server + +After a customer is created, an order needs to be generated using the Orders API. This order contains details such as the payment amount, currency, customer details, tax-related information and other custom notes. After the order is created, an `order_id` is generated, for example, `order_NGrgEcmYJsfUyl`. You must pass this `order_id` in the checkout code to associate this order with the payment. Learn more about [Order and Payment states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md#order-states). + +Use the API sample code given below to create an order. + +/orders + +```cURL: Curl +curl -u [CLIENT_ID]:[CLIENT_SECRET] \ //This will be Partners Key and Secret. +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-H "X-Razorpay-Account: acc_Ef7ArBsdU5t9XL" //Sub-merchant’s account number (acc_xxxxxxxx) must be passed in the header. +-d '{ + "amount": 10000, + "currency": "INR", + "receipt": "receipt#1", + "customer_id": "cust_OwZZseNBf9Uqsi", + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "identity": [ + { + "type": "tax_id", + "id": "HSCPE4563G" + } + ] + }, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +``` + +```json: Success +{ + "amount": 10000, + "amount_due": 10000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1703569876, + "currency": "INR", + "entity": "order", + "id": "order_NGrgEcmYJsfUyl", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "receipt": "receipt#1", + "status": "created" +} + +```json: Failure - Amount +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +```json: Failure - Customer Name +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "customer name is invalid", + "metadata": {}, + "reason": "input_validation_failed", + "source": "business", + "step": "payment_initiation" + } +} +```json: Failure - Address Line +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Address line 1 and line 2 can only contain aplhanumeric characters and limited special characters", + "metadata": {}, + "reason": "input_validation_failed", + "source": "business", + "step": "payment_initiation" + } +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> The PAN object is necessary for transactions greater than ₹2.5 lakhs. +> + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. Payment can only be made for this amount against the Order. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. For example, `INR`. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Can have a maximum length of 40 characters and has to be unique. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (For example, @, ", ,, ., and so on.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (For example, aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `identity` _optional_ + : `array` A list of identity objects containing customer identification details. + + +> **WARN** +> +> +> **Watch Out!** +> +> The PAN object is necessary for transactions greater than ₹2.5 lakhs. +> + + `type` _optional_ + : `string` The type of identification document. For example, `tax_id`. + + `id` _optional_ + : `string` The identification number or value corresponding to the `type` provided. For example, `ABCDE1234F`. + +`notes` _optional_ +: `json object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + + + +### Response Parameters + + `amount` + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` Indicates the Unix timestamp when this order was created. + + `currency` + : `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + + `offer_id` + : `string` The unique identifier of the offer. For example, `offer_JHD834hjbxzhd38d`. + + `receipt` + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order changes to the `attempted` state following the first payment attempt and remains in this state until at least one payment is successfully processed and captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. + The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. + --- + The amount must be at least INR 1.00. | The amount specified is less than the minimum amount. Currency subunits, such as paise (in the case of INR), should always be greater than 100. | Enter an amount equal to or greater than the minimum amount, that is 100. + --- + The **field name** is required. | A mandatory field is missing. | Ensure all mandatory fields and values are present. + --- + Only english alphabets are allowed in customer name. | The customer name provided in the request contains characters other than English alphabets letters, such as numbers, special characters, regional language characters, or emojis. | Ensure that the name field in the request contains only English alphabets letters (A-Z, a-z) and meets the validation criteria: - Verify that the name does not include numerical characters, special characters (For example, @, #, $, and so on.), or non-Latin scripts. +- Confirm that there are no extra spaces at the beginning or end of the name. + + --- + Customer name should be between 5 and 50 characters. | The `name` field provided in the request does not meet the required character length. It is either shorter than 5 characters or exceeds 50 characters. | - Ensure that the `name` field in the request is between 5 and 50 characters long. +- Check that no extra spaces are included at the beginning or end of the name, which might affect the character count. + + --- + Customer name is invalid. | The `name` field provided in the request does not meet the validation requirements. This could be due to the presence of disallowed characters, such as special characters, numbers, regional language characters, or the use of non-Latin scripts. | - Ensure that the `name` field only contains English letters (A-Z, a-z) and spaces (not at the beginning). +- Verify that the name does not include special characters, numerical digits, emojis, or regional language characters. +- Check for unintended characters that may have been included by mistake (For example., trailing spaces or special symbols). + + --- + Only English alphabet is allowed in City and State. | The `city` or `state` field in the request contains invalid characters such as numbers, special characters, or regional language text. | - Ensure that the `city` and `state` fields only contain English letters (A-Z, a-z) and spaces. +- Verify that these fields do not include numerical characters, special characters, or regional language scripts. + + --- + Address line 1 and line 2 can only contain alphanumeric characters and limited special characters. | The `Address line1` or `Address line2` field in the request contains invalid characters that are not allowed, such as unsupported symbols or regional language characters. | - Ensure that `Address line1` and `Address line2` only include alphanumeric characters (A-Z, a-z, 0-9) and allowed special characters (For example, *&/-()#_+{}[]:'".,). +- Verify that no unsupported symbols or regional language scripts are included. + + + + +## 1.3 Integrate with Checkout on Client-Side + +Add the Pay button on your web page using the checkout code, Handler Function or Callback URL. + +### Handler Function or Callback URL + +**Handler Function** | **Callback URL** +--- +When you use this: - On successful payment, the customer is shown your web page. +- On failure, the customer is notified of the failure and asked to retry the payment. + | When you use this: - On successful payment, the customer is redirected to the specified URL, for example, a payment success page. +- On failure, the customer is asked to retry the payment. + +### Code to Add Pay Button + +Copy-paste the parameters as `options` in your code: + +```html: Callback URL (JS) Checkout Code +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Partners Dashboard. + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", //your business name. + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "account_id": "acc_Ef7ArBsdU5t9XL", + "customer_id": "cust_MpINfSkdEvtdxb", + "order_id": "order_NGrgEcmYJsfUyl", //This is a sample Order ID. Pass the `id` obtained in the response of Step 2. + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information especially their phone number. + "name": "", //your customer's name. + "email": "", + "contact": "" //Provide the customer's phone number for better conversion rates. + }, + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp", + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +```html: Handler Functions (JS) Checkout Code +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard. + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", //your business name. + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "customer_id": "cust_MpINfSkdEvtdxb", + "order_id": "order_NGrgEcmYJsfUyl", //This is a sample Order ID. Pass the `id` obtained in the response of Step 2. + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information, especially their phone number. + "name": "", //your customer's name. + "email": "", + "contact": "" //Provide the customer's phone number for better conversion rates. + }, + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp", + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); +}); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> Test your integration using these [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/test-integration.md#Cards). +> + +> **WARN** +> +> +> **Watch Out!** +> +> - The `invoice_number` field is mandatory for all payment methods. Ensure each payment has a unique invoice number. +> - The `createPayment` method should be called within an event listener triggered by user action to prevent the popup from being blocked. For example: +> ```js +> $('button').click( function (){ razorpay.createPayment(...) }) +> ``` +> + +#### Supported Payment Methods + +Following payment methods are supported under the Import Flow: +- Netbanking +- UPI +- Cards +- [Recurring](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments.md) + +For recurring payments, additional integration is needed. Cards, UPI, and UPI with TPV are supported as a payment methods. + + +### Checkout Parameters + + `key` _mandatory_ +: `string` API Key ID generated from the Razorpay Dashboard. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `50000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: “contact": "+919000090000"). +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + + `name` _optional_ + : `string` Cardholder's name to be pre-filled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also pre-filled. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#save-card-details). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and net banking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments with the suggested next best option. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment with the suggested next best option. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the invoice generated. Ensure each payment has a unique invoice number. + + `goods_description` _mandatory_ + : `string` Description of the goods. For example, `Digital Lamp`. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> The open method of Razorpay object (`rzp1.open()`) must be invoked by your site's JavaScript, which may or may not be a user-driven action such as a click. +> + +## Errors + +Given below is a list of errors you may face while integrating with checkout on the client-side. + +Error | Cause | Solution +--- +The id provided does not exist. | Occurs when there is a mismatch between the API keys used while creating the `order_id`/`customer_id` and the API key passed in the checkout. | Make sure that the API keys passed in the checkout are the same as the API keys used while creating the `order_id`/`customer_id`. +--- +Blocked by CORS policy. | Occurs when the server-to-server request is hit from the front end instead. | Make sure that the API calls are made from the server side and not the client side. + +### Configure Payment Methods (Optional) + +Multiple payment methods are available on the Razorpay Web Standard Checkout. +- The payment methods are **fixed** and cannot be changed. +- You can configure the order or make certain payment methods prominent. Know more about [configuring payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + +## 1.4 Handle Payment Success and Failure + +The way the Payment Success and Failure scenarios are handled depends on the [Checkout Sample Code](#code-to-add-pay-button) you used in the last step. + +### Checkout with Handler Function + +If you used the sample code with the handler function: + + + The customer sees your website page. The checkout returns the response object of the successful payment (**razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature**). Collect these and send them to your server. + + + + + The customer is notified about payment failure and asked to retry the payment. Know about the [error parameters.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md#response-parameters) + + ```js: Failure Handling Code + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + } + ``` + + +### Checkout with Callback URL + +If you used the sample code with the callback URL: + + + + Razorpay makes a POST call to the callback URL with the **razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature** in the response object of the successful payment. Only successful authorisations are auto-submitted. + + + + + In case of failed payments, the checkout is displayed again to facilitate payment retry. + + +## 1.5 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +## 1.6 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +Here are the links to our [SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#client-libraries) for the supported platforms. + +## 1.7 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +### Related information + +- [Invoice Collection](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/invoice-collection.md) +- [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/test-integration.md) diff --git a/llm-content/partners/aggregators/partner-auth/payment-gateway.md b/llm-content/partners/aggregators/partner-auth/payment-gateway.md new file mode 100644 index 00000000..6cde949a --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/payment-gateway.md @@ -0,0 +1,770 @@ +--- +title: Partner Auth | Payment Gateway +heading: Payment Gateway +description: Integrate Razorpay Payment Gateway using Partner Auth. +--- + +# Payment Gateway + +Follow these steps to integrate with the Razorpay Payment Gateway: + +1. [Create an order using Orders API](#step-1-create-an-order-using-orders-api). +2. [Add the Razorpay Checkout code to your website](#step-2-add-razorpay-checkout-code-to-website). +3. [Store fields in your server](#step-3-store-fields-in-your-server). +4. [Verify payment signature](#step-4-verify-payment-signature). +5. [Verify payment status](#step-5-verify-payment-status). + +## Step 1: Create an Order Using Orders API + +Integrate with [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create an order. Given below is the sample code for Create an Order API. Pass the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders \ +-u [CLIENT_ID]:[CLIENT_SECRET] \ +-H 'content-type:application/json' \ +-H 'X-Razorpay-Account: acc_Ef7ArAsdU5t0XL' \ +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11" +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +headers.put("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); +instance.addHeaders(headers); +orderRequest.put("amount", 50000); // amount in the smallest currency unit +orderRequest.put("currency", "INR"); +orderRequest.put("receipt", "receipt#1"); + +Order order = razorpay.orders.create(orderRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +headers = {"headers": {"X-Razorpay-Account": "acc_ImoLtoiOGXlyEi"}} + +client.order.create(data={ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11" +,}, **headers) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->setHeader("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); + +$api->order->create(array('receipt' => 'receipt#1', 'amount' => 50000, 'currency' => 'INR')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + +client.addHeader("X-Razorpay-Account", "acc_Ef7ArAsdU5t0XL"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); + +Order order = client.Order.Create(orderRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay.headers = {"X-Razorpay-Account" => "acc_Ef7ArAsdU5t0XL"} + +order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1' + +```javascript: Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_KEY_SECRET", + headers: {"X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL"} +}); + +instance.orders.create({ +"amount": 50000, +"currency": "INR", +"receipt": "rcptid_11" +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +extraHeaders:= map[string]string{ + "X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL", + } + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + } +} +body, err := client.Order.Create(data, extraHeaders) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr:= map[string]interface{}{ + "amount": "50000", + "currency": "INR", + "receipt": "rcptid_11", +} + +headers:= map[string]string{ + "X-Razorpay-Account": "acc_ImoLtoiOGXlyEi", +} + +body, err := client.Order.Create(para_attr, headers) + +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunits. For example, for an actual amount of , the value of this field should be `30000`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +## Step 2: Add Razorpay Checkout Code to Website + +Copy-paste the parameters as `options` in your code. This creates a Pay button on the website, which the customer can use to invoke Checkout and complete the payment. Pass the `order_id` received in the response of [step 1](#step-1-create-an-order-using-orders-api) to the checkout code. + +```html: Checkout with Handler Functions (JavaScript) +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise. + "currency": "INR", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "account_id": "acc_Ef7ArAsdU5t0XL", + "order_id": "order_DBJOWzybf0sJbb", //This is a sample Order id. Pass the `id` obtained in the response of Step 1. + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); +}); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +```html: Manual Checkout with Callback URL (JavaScript) +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise. + "currency": "INR", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "account_id": "acc_Ef7ArAsdU5t0XL", + "order_id": "order_DBJOWzybf0sJbb", //This is a sample Order id. Pass the `id` obtained in the response of Step 1. + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +``` + +> **INFO** +> +> +> **Handy Tips** +> +> Test your integration using these [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#2-test-integration). +> + +### Checkout Options + +`key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + +## Step 3: Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +## Step 4: Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +Check [our SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration.md) for the supported platforms. + +## Step 5: Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +You can view the payments received from customers on the sub-merchant's Dashboard. Also, you can retrieve the status of the payments by polling our [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + +Given below is the APIs used to fetch payments. You must pass the sub-merchant account identifier as a header while retrieving details using GET requests. + +### Fetch Payments of Sub-Merchants API + +You can fetch the details of the payments received by sub-merchant using the endpoint given below. Pass the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. + +/payments + +```curl: Curl +curl -X GET https://api.razorpay.com/v1/payments \ +-u : \ +-H 'X-Razorpay-Account: acc_Ef7ArAsdU5t0XL' \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient([YOUR_KEY_ID],[YOUR_KEY_SECRET]); +try { + JSONObject orderRequest = new JSONObject(); + headers.put("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); + instance.addHeaders(headers); + + //supported option filters (from, to, count, skip) + + List payments = razorpay.Payments.fetchAll(paymentRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} + +```php: PHP +$api = new Api($key_id, $secret); + +$api->setHeader("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); + +$api->payment->all($options) + +```js:Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_KEY_SECRET", + headers: {"X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL"} +}); + +instance.payments.all(option) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay.headers = {"X-Razorpay-Account" => "acc_Ef7ArAsdU5t0XL"} + +Razorpay::Payment.all + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +extraHeaders:= map[string]string{ + "X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL", + } + +body, err := client.Payment.All(nil, extraHeaders) +```json: Response +{ + "id": "pay_EfXir8l3TPO9zw", + "entity": "payment", + "amount": 10000, + "currency": "MYR", + "status": "authorized", + "order_id": "order_EfXfUWQzL1YyI4", + "invoice_id": null, + "international": false, + "method": "wallet", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": "Test transaction", + "card_id": null, + "bank": null, + "wallet": "touchngo", + "email": "gaurav.kumar@example.com", + "contact": "+919988776644", + "notes": [], + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "created_at": 1587124317 +} +``` + +### Related Information + +- [Razorpay Payment Gateway: Web Standard Integration Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). diff --git a/llm-content/partners/aggregators/partner-auth/payment-links.md b/llm-content/partners/aggregators/partner-auth/payment-links.md new file mode 100644 index 00000000..1165655c --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/payment-links.md @@ -0,0 +1,612 @@ +--- +title: Partner Auth | Payment Links +heading: Payment Links +description: Integrate with Payment Links API using partner auth. +--- + +# Payment Links + +Use Payment Links to receive online payments from your customers. Create Payment Links from the Dashboard or using the APIs and share them with your customers. Customers open the links, select the payment method and make the payment. + +## Create a Payment Link API + +Given below is the sample code for Create a Payment Link API. You should send the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. Refer to the [Payment Links API documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md). + +/payment_links + +### Standard Payment Links + +Given below are the sample codes for Standard Payment Links. Pass the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payment_links/ \ +-H 'Content-type: application/json' \ +-H 'X-Razorpay-Account: acc_Ef7ArAsdU5t0XL' \ +-d '{ + "amount": 1000, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "expire_by": 1691097057, + "reference_id": "TS1989", + "description": "Payment for policy no #23456", + "customer": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "notes": { + "policy_name": "Jeevan Bima" + }, + "callback_url": "https://example-callback-url.com/", + "callback_method": "get" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentLinkRequest = new JSONObject(); +headers.put("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); +instance.addHeaders(headers); +paymentLinkRequest.put("amount",1000); +paymentLinkRequest.put("currency","INR"); +paymentLinkRequest.put("accept_partial",true); +paymentLinkRequest.put("first_min_partial_amount",100); +paymentLinkRequest.put("expire_by",1691097057); +paymentLinkRequest.put("reference_id","TS1989"); +paymentLinkRequest.put("description","Payment for policy no #23456"); +JSONObject customer = new JSONObject(); +customer.put("name","+919000090000"); +customer.put("contact","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +paymentLinkRequest.put("customer",customer); +JSONObject notify = new JSONObject(); +notify.put("sms",true); +notify.put("email",true); +paymentLinkRequest.put("reminder_enable",true); +JSONObject notes = new JSONObject(); +notes.put("policy_name","Jeevan Bima"); +paymentLinkRequest.put("notes",notes); +paymentLinkRequest.put("callback_url","https://example-callback-url.com/"); +paymentLinkRequest.put("callback_method","get"); + +PaymentLink payment = razorpay.paymentLink.create(paymentLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->setHeader("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); + +$api->paymentLink->create(array('amount'=>500, 'currency'=>'INR', 'accept_partial'=>true, +'first_min_partial_amount'=>100, 'description' => 'For XYZ purpose', 'customer' => array('name'=>'Gaurav Kumar', +'email' => 'gaurav.kumar@example.com', 'contact'=>'+919000090000'), 'notify'=>array('sms'=>true, 'email'=>true) , +'reminder_enable'=>true ,'notes'=>array('policy_name'=> 'Jeevan Bima'),'callback_url' => 'https://example-callback-url.com/', +'callback_method'=>'get')); + +```js: Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_KEY_SECRET", + headers: {"X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL"} +}); +instance.paymentLink.create({ + amount: 500, + currency: "INR", + accept_partial: true, + first_min_partial_amount: 100, + description: "For XYZ purpose", + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: "+919000090000" + }, + notify: { + sms: true, + email: true + }, + reminder_enable: true, + notes: { + policy_name: "Jeevan Bima" + }, + callback_url: "https://example-callback-url.com/", + callback_method: "get" +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') +Razorpay.headers = {"X-Razorpay-Account" => "acc_Ef7ArAsdU5t0XL"} + +para_attr = { + "amount": 500, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "description": "For XYZ purpose", + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "notes": { + "policy_name": "Jeevan Bima" + }, + "callback_url": "https://example-callback-url.com/", + "callback_method": "get" +} + +Razorpay::PaymentLink.create(para_attr.to_json) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +extraHeaders:= map[string]string{ + "X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL", + } + +data := map[string]interface{}{ + "amount": 1000, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "expire_by": 1691097057, + "reference_id": "TS1989", + "description": "Payment for policy no #23456", + "customer": map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + }, + "notify": map[string]interface{}{ + "sms": true, + "email": true, + }, + "reminder_enable": true, + "notes": map[string]interface{}{ + "policy_name": "Jeevan Bima", + }, + "callback_url": "https://example-callback-url.com/", + "callback_method": "get", +} +body, err := client.PaymentLink.Create(data, extraHeaders) + +```json: Response +{ + "accept_partial": true, + "amount": 1000, + "amount_paid": 0, + "callback_method": "get", + "callback_url": "https://example-callback-url.com/", + "cancelled_at": 0, + "created_at": 1591097057, + "currency": "INR", + "customer": { + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "name": "Gaurav Kumar" + }, + "description": "Payment for policy no #23456", + "expire_by": 1691097057, + "expired_at": 0, + "first_min_partial_amount": 100, + "id": "plink_ExjpAUN3gVHrPJ", + "notes": { + "policy_name": "Jeevan Bima" + }, + "notify": { + "email": true, + "sms": true + }, + "payments": null, + "reference_id": "TS1989", + "reminder_enable": true, + "reminders": [], + "short_url": "https://rzp.io/i/nxrHnLJ", + "status": "created", + "updated_at": 1591097057, + "user_id": "" +} +``` + +### UPI Payment Links + +Given below are the sample codes for UPI Payment Links. Pass the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/payment_links/ \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H 'Content-type: application/json' \ +-H 'X-Razorpay-Account: acc_Ef7ArAsdU5t0XL' \ +-d '{ + "upi_link": "true", + "amount": 1000, + "currency": "INR", + "accept_partial": true, + "first_min_partial_amount": 100, + "expire_by": 1691097057, + "reference_id": "TS1989", + "description": "Payment for policy no #23456", + "customer": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "notes": { + "policy_name": "Jeevan Bima" + }, + "callback_url": "https://example-callback-url.com/", + "callback_method": "get" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentLinkRequest = new JSONObject(); +headers.put("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); +instance.addHeaders(headers); +paymentLinkRequest.put("upi_link",true); +paymentLinkRequest.put("amount",1000); +paymentLinkRequest.put("currency","INR"); +paymentLinkRequest.put("accept_partial",true); +paymentLinkRequest.put("first_min_partial_amount",100); +paymentLinkRequest.put("description","Payment for policy no #23456"); +JSONObject customer = new JSONObject(); +customer.put("name","+919000090000"); +customer.put("contact","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +paymentLinkRequest.put("customer",customer); +JSONObject notify = new JSONObject(); +notify.put("sms",true); +notify.put("email",true); +paymentLinkRequest.put("reminder_enable",true); +JSONObject notes = new JSONObject(); +notes.put("policy_name","Jeevan Bima"); +paymentLinkRequest.put("notes",notes); + +PaymentLink payment = instance.paymentLink.create(paymentLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->setHeader("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); + +$api->paymentLink->create(array('upi_link'=>true,'amount'=>500, 'currency'=>'INR', 'accept_partial'=>true, +'first_min_partial_amount'=>100, 'description' => 'For XYZ purpose', 'customer' => array('name'=>'Gaurav Kumar', +'email' => 'gaurav.kumar@example.com', 'contact'=>'+919000090000'), 'notify'=>array('sms'=>true, 'email'=>true) , +'reminder_enable'=>true ,'notes'=>array('policy_name'=> 'Jeevan Bima'))); + +```js: Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_KEY_SECRET", + headers: {"X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL"} +}); + +instance.paymentLink.create({ + upi_link: true, + amount: 500, + currency: "INR", + accept_partial: true, + first_min_partial_amount: 100, + description: "For XYZ purpose", + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: "+919000090000" + }, + notify: { + sms: true, + email: true + }, + reminder_enable: true, + notes: { + policy_name: "Jeevan Bima" + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') +Razorpay.headers = {"X-Razorpay-Account" => "acc_Ef7ArAsdU5t0XL"} + +para_attr = { + "upi_link": true, + "amount": 500, + "currency": "INR", + "description": "For XYZ purpose", + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000" + }, + "notify": { + "sms": true, + "email": true + }, + "reminder_enable": true, + "notes": { + "policy_name": "Jeevan Bima" + } +} + +Razorpay::PaymentLink.create(para_attr.to_json) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +extraHeaders:= map[string]string{ + "X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL", + } + +data := map[string]interface{}{ + "upi_link": "true", + "amount": 1000, + "currency": "INR", + "accept_partial": false, + "expire_by": 1691097057, + "reference_id": "TS1989", + "description": "Payment for policy no #23456", + "customer": map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "mudududla.sony@razorpay.com", + }, + "notify": map[string]interface{}{ + "sms": true, + "email": true, + }, + "reminder_enable": true, + "notes": map[string]interface{}{ + "policy_name": "Jeevan Bima", + }, +} +body, err := client.PaymentLink.Create(data, extraHeaders) + +```json: Response +{ + "accept_partial": false, + "amount": 1000, + "amount_paid": 0, + "cancelled_at": 0, + "created_at": 1584524459, + "currency": "INR", + "customer": { + "contact": "9912650835", + "email": "gaurav.kumar@razorpay.com", + "name": "Gaurav Kumar" + }, + "description": "Payment for policy no #23456", + "expire_by": 0, + "expired_at": 0, + "first_min_partial_amount": 0, + "id": "plink_ETbyWrRHW2oXVt", + "upi_link": "true", + "notes": { + "policy_name": "Jeevan Bima" + }, + "payments": null, + "reference_id": "#456", + "reminder_enable": true, + "reminders": [], + "short_url": "https://rzp.io/i/AiGGmnh", + "status": "created", + "updated_at": null, + "user_id": "API" +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount to be paid using the Payment Link. Must be in the smallest unit of the currency. For example, if you want to receive a payment of , you must enter the value `30000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to refund a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to refund a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to refund a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _optional_ +: `string` A three-letter ISO code for the currency in which you want to accept the payment. For example, INR. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. + +. For example, if an amount of is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. Must be passed along with `accept_partial` parameter. + +`upi_link` _mandatory for creating UPI Payment Link_ +: `boolean` Must be set to `true` for creating UPI Payment Link. If the `upi_link` parameter is not passed or passed with value as false, a Standard Payment Link will be created. Possible values: + - `true`: Creates a UPI Payment Link. + - `false`: Creates a Standard Payment Link. + + +`description` _optional_ +: `string` A brief description of the Payment Link. The maximum character limit supported is 2048. + +`reference_id` _optional_ +: `string` Reference number tagged to a Payment Link. Must be a unique number for each Payment Link. The maximum character limit supported is 40. + +`customer` _optional_ +: `json object` Customer details + + `name` _optional_ + : `string` The customer's name. + + `email` _optional_ + : `string` The customer's email address. + + `contact` _optional_ + : `string` The customer's phone number. + +`expire_by` _optional_ +: `integer` Timestamp, in Unix, at which the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. Please note that the expire by date cannot exceed more than six months from the date of creation. + +`notify` _optional_ +: `array` Defines who handles Payment Link notification. + + `sms` _optional_ + : `boolean` Defines who handles the SMS notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + + `email` _optional_ + : `boolean` Defines who handles the email notification. Possible values: + - `true`: Razorpay handles the notification. + - `false`: You handle the notification. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Payment Link for Groceries.”`. + +`callback_url` _optional_ +: `string` If specified, adds a redirect URL to the Payment Link. Once customers completes the payment, they are redirected to the specified URL. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> If the `callback_url` is passed, it must be passed in the correct format. That is, it should contain a URL. +> +> + +`callback_method` _conditionally mandatory_ +: `string` If `callback_url` parameter is passed, callback_method must be passed with the value `get`. + +`reminder_enable` _optional_ +: `boolean` Used to send [reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) for the Payment Link. Possible values: + - `true`: To send reminders. + - `false`: To disable reminders. + +## Fetch all Payment Links + +Given below is the sample code for Fetch all Payment Links API. Pass the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. + +/payment_links + +```cURL: Curl +curl -u [CLIENT_ID]:[CLIENT_SECRET] \ +-X GET https://api.razorpay.com/v1/payment_links \ +-H "Content-Type: application/json" \ +-H "X-Razorpay-Account: acc_Ef7ArAsdU5t0XL" \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +headers.put("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); +instance.addHeaders(headers); +params.put("reference_id","TS1989"); + +List paymentlink = instance.paymentLink.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); +$api->setHeader("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); +$api->paymentLink->all($options) + +```js: Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_KEY_SECRET", + headers: {"X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL"} +}); + +instance.paymentLink.all() + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') +Razorpay.headers = {"X-Razorpay-Account" => "acc_Ef7ArAsdU5t0XL"} + +Razorpay::PaymentLink.all() + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +extraHeaders:= map[string]string{ + "X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL", + } + +body, err := client.PaymentLink.All(nil, extraHeaders) + +```json: Response +{ + "accept_partial": false, + "amount": 100, + "amount_paid": 100, + "cancelled_at": 0, + "created_at": 1602522293, + "currency": "INR", + "customer": { + "contact": "9000090000", + "email": "gaurav.kumar@razorpay.com" + }, + "description": "Payment for Acme Inc", + "expire_by": 0, + "expired_at": 0, + "first_min_partial_amount": 0, + "id": "plink_Fo48rl281ENAg9", + "notes": { + "policy_name": "Jivan Asha" + }, + "notify": { + "email": true, + "sms": true + }, + "order_id": "order_Fo491cL6NGAjkI", + "payments": [ + { + "amount": 100, + "created_at": 1602522351, + "method": "upi", + "payment_id": "pay_Fo49sHbQ78PCMI", + "status": "captured" + } + ], + "reference_id": "TS1989", + "reminder_enable": false, + "reminders": [], + "short_url": "https://rzp.io/i/XQiMe4w", + "status": "paid", + "updated_at": 1602522351, + "upi_link": true, + "user_id": "FmjfFPCOUOAcSH" +} +``` + +### Related Information + +- [Payment Links API documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md). diff --git a/llm-content/partners/aggregators/partner-auth/qr-codes.md b/llm-content/partners/aggregators/partner-auth/qr-codes.md new file mode 100644 index 00000000..79302f59 --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/qr-codes.md @@ -0,0 +1,304 @@ +--- +title: Partner Auth | QR Codes +heading: QR Codes +description: Integrate with QR Codes API using partner auth. +--- + +# QR Codes + +Use Razorpay QR Codes to receive UPI payments from your customers. Create QR Codes from the Dashboard or using our APIs and share them with your customers. Customers can scan these codes and make payments. + +> **INFO** +> +> +> **Handy Tips** +> +> Consider these [prerequisites](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes.md#prerequisites) before getting started with QR Codes. +> + +## Create a QR Code API + +Given below is the sample code for Create a QR Code API. Pass the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. Refer to the [QR Codes API documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes.md). + +payments/qr_codes + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/payments/qr_codes \ +-u : \ +-H "Content-Type: application/json" \ +-H 'X-Razorpay-Account: acc_Ef7ArAsdU5t0XL' \ +-d '{ + "type": "upi_qr", + "name": "Store_1", + "usage": "single_use", + "fixed_amount": true, + "payment_amount": 300, + "description": "For Store 1", + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "notes": { + "purpose": "Test UPI QR code notes" + }, +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject qrRequest = new JSONObject(); +headers.put("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); +instance.addHeaders(headers); +qrRequest.put("type","upi_qr"); +qrRequest.put("name","Store_1"); +qrRequest.put("usage","single_use"); +qrRequest.put("fixed_amount",true); +qrRequest.put("payment_amount",300); +qrRequest.put("description","For Store 1"); +qrRequest.put("customer_id","cust_JDdNazagOgg9Ig"); +qrRequest.put("close_by",1681615838); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +qrRequest.put("notes",notes); + +QrCode qrcode = instance.qrCode.create(qrRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->setHeader("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); + +$api->qrCode->create(array("type" => "upi_qr","name" => "Store_1", "usage" => "single_use","fixed_amount" => true,"payment_amount" => 300,"customer_id" => "cust_HKsR5se84c5LTO","description" => "For Store 1","close_by" => 1681615838,"notes" => array("purpose" => "Test UPI QR code notes"))); + +```javascript: Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_KEY_SECRET", + headers: {"X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL"} +}); + +instance.qrCode.create({ + type: "upi_qr", + name: "Store_1", + usage: "single_use", + fixed_amount: true, + payment_amount: 300, + description: "For Store 1", + customer_id: "cust_HKsR5se84c5LTO", + close_by: 1681615838, + notes: { + purpose: "Test UPI QR code notes" + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') +Razorpay.headers = {"X-Razorpay-Account" => "acc_Ef7ArAsdU5t0XL"} + +para_attr = { + "type": "upi_qr", + "name": "Store_1", + "usage": "single_use", + "fixed_amount": true, + "payment_amount": 300, + "description": "For Store 1", + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "notes": { + "purpose": "Test UPI QR code notes" + } +} +Razorpay::QrCode.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +extraHeaders:= map[string]string{ + "X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL", + } + +notes := map[string]interface{}{ + "purpose": "Test UPI QR code notes", +} + +data := map[string]interface{}{ + "type": "upi_qr", + "name": "Store_1", + "usage": "single_use", + "fixed_amount": true, + "payment_amount": 300, + "description": "For Store 1", + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "notes": notes, +} +body, err := client.QrCode.create(data, extraHeaders) +```json: Response +{ + "id": "qr_HMsVL8HOpbMcjU", + "entity": "qr_code", + "created_at": 1623660301, + "name": "Store_1", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/BWcUVrLp", + "payment_amount": 300, + "status": "active", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838 +} +``` + +### Request Parameters + +`type` _mandatory_ +: `string` The type of QR code. Possible values: + - `upi_qr`: Create a QR code that accepts only UPI payments. + - `bharat_qr`: Create a QR code that accepts UPI and card payments. This is an on-demand feature. Know more about [Bharat QR](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bharatqr.md). + +`name` _optional_ +: `string` Label entered to identify the QR code. For example, Store Front Display. + +`usage` _mandatory_ +: `string` Indicates if the QR code should be allowed to accept single payment or multiple payments. Possible values: + - `single_use`: QR code will accept only one payment and then close automatically. + - `multiple_use` (default): QR code will accept multiple payments. + +`fixed_amount` _optional_ +: `boolean` Indicates if the QR should accept payments of specific amounts or any amount. Possible values: + - `true`: QR code accepts only a specific amount. + - `false` (default): QR code will accept any amount. + +`payment_amount`_mandatory if fixed_amount=true_ +: `integer` The amount allowed for a transaction. If this is specified, then any transaction of amount less than or more than this value will not be allowed. For example, if this amount is set as 500000, the customer cannot pay an amount less than or more than ₹5000. + +`description` _optional_ +: `string` A brief description about the QR code. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the QR code. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`customer_id` _optional_ +: `string` Unique identifier of the customer the QR code is linked with. Know more about the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by` _optional_ +: `integer` UNIX timestamp at which the QR code is scheduled to be automatically closed. The time must be at least 2 minutes after the current time. The date range can be set to 2147483647 in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + +> **WARN** +> +> +> **Watch Out!** +> +> Any request beyond 2147483647 UNIX timestamp will fail. +> + +### Response Parameters + +Descriptions for the response parameters are present in the [QR Codes Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes.md#qr-code-entity) parameters table. + +### Error Response Parameters + +Error codes and descriptions are present in the [Error Response Parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes.md#error-response-parameters) table. + +## Fetch all QR Codes API + +Given below is the sample code for Fetch all QR Codes API. Pass the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. + +payments/qr_codes + +```cURL: Curl +curl -u [CLIENT_ID]:[CLIENT_SECRET] \ +-X GET https://api.razorpay.com/v1/payments/qr_codes \ +-H "Content-Type: application/json" \ +-H "X-Razorpay-Account: acc_Ef7ArAsdU5t0XL" \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +headers.put("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); +instance.addHeaders(headers); +params.put("count","1"); + +List qrcode = instance.qrCode.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->setHeader("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); + +$api->qrCode->all($options) + +```javascript: Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_KEY_SECRET", + headers: {"X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL"} +}); + +instance.qrCode.all() + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') +Razorpay.headers = {"X-Razorpay-Account" => "acc_Ef7ArAsdU5t0XL"} + +para_attr = { + "count": 1 +} + +Razorpay::QrCode.all(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +extraHeaders:= map[string]string{ + "X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL", + } + +body, err := client.QrCode.All(nil, extraHeaders) + +```json: Response +{ + "id": "qr_HO2r1MDprYtWRT", + "entity": "qr_code", + "created_at": 1623915088, + "name": "Store_1", + "usage": "single_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/oCswTOcCo", + "payment_amount": 300, + "status": "active", + "description": "For Store 1", + "fixed_amount": true, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "purpose": "Test UPI QR code notes" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1681615838, + "closed_at": null, + "close_reason": null +} +``` +### Response Parameters + +Descriptions for the response parameters are present in the [QR Codes Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes.md#qr-code-entity) parameters table. + +### Error Response Parameters + +Error codes and descriptions are present in the [Error Response Parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes.md#error-response-parameters-2) table. + +### Related Information + +- [QR Codes API documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes.md) diff --git a/llm-content/partners/aggregators/partner-auth/recurring-payments.md b/llm-content/partners/aggregators/partner-auth/recurring-payments.md new file mode 100644 index 00000000..12384090 --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/recurring-payments.md @@ -0,0 +1,133 @@ +--- +title: About Recurring Payments for Partners +description: Accept recurring payments using payment methods such as cards, emandate and UPI. +--- + +# About Recurring Payments for Partners + +Partner Auth is Razorpay's framework that enables partners (aggregators) to authorise payment requests on behalf of sub-merchants. For recurring card transactions, this system leverages industry-standard card tokenisation with token sharing capabilities to create a seamless payment experience across multiple business units. + +## Initial Setup: Card Token Creation and Sharing +When customers make their first card payment on a sub-merchant's platform, they can opt to save their card for future transactions. Razorpay immediately tokenises their card details according to RBI and card network guidelines, ensuring actual card numbers are never stored or transmitted after the initial transaction. + +For businesses operating multiple sub-merchants under a parent entity, each sub-merchant maintains a unique Razorpay account identifier (MID). The token sharing feature enables cards saved with one sub-merchant to be automatically available across all related sub-merchants within the same parent entity. This eliminates the need for customers to re-enter card details when purchasing from different brands under the same parent company. + +## Processing Recurring Payments +The recurring payment flow operates as follows: +- Partners initiate payment requests to Razorpay using Partner Auth credentials through Basic Authentication, providing their `client_id` and `client_secret`. Each API request must specify the target sub-merchant's `account_id` in the `X-Razorpay-Account header`, along with the customer's payment token. +- Razorpay processes the transaction using the stored token, charging the customer's card without requiring card details to be re-entered. This process relies on the customer's prior consent for recurring charges. + +## Security and Compliance Framework +The system maintains strict security standards through comprehensive tokenisation. + +- All card information is tokenised according to RBI mandates and industry standards. Tokens remain restricted to approved businesses within the same legal entity and cannot be shared across different payment aggregators. +- PCI compliance requirements vary based on whether Razorpay or the partner serves as the token requestor. +- Token lifecycle management (including creation, updates and deletion) follows strict access controls. When a token is deleted, it becomes unavailable across all sub-merchants within the entity. + +#### Customer Payment Journey Example +Consider a typical recurring payment scenario: + +1. A customer saves their card during an initial purchase with sub-merchant A. +2. Razorpay generates and securely stores a token representing the card. +3. When the customer makes a subsequent purchase from sub-merchant B (under the same parent company), the partner uses Partner Auth to submit the existing token. +4. Razorpay processes the payment without exposing the actual card details. + +This approach ensures that customers enjoy a frictionless payment experience across all brands while maintaining the highest security standards. + + +### Key Benefits + + Partner Auth combined with tokenisation delivers several advantages: + - **Enhanced Security**: Card details are never exposed after initial tokenisation. + - **Improved Customer Experience**: One-time card entry works across all related businesses. + - **Regulatory Compliance**: Meets RBI guidelines and card network requirements. + - **Operational Efficiency**: Simplified payment processing for multi-brand businesses. + + +Through this combination of API security via Partner Auth headers and card network tokenisation, Razorpay enables secure, compliant recurring payments that balance customer convenience with robust data protection. + +## API Authentication Using Partner Auth + +Use the Partner credentials as described in the [Dashboard Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators.md#partner-credentials) as Basic Auth. + +In the API request: +- The authorisation information is expressed using the `Authorization` header with Basic auth scheme. +- The sub-merchant account is specified using the `X-Razorpay-Account` header. + +For example: + +```curl: Partner Auth +curl -X GET 'https://api.razorpay.com/v1/payments/pay_KjtVtO37KdpfjG' \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H 'X-Razorpay-Account: acc_KBrJAIEqre5ucn' +``` + +## Integration Flow + + +### Using Razorpay S2S APIs (Cards Only) + + Following is the integration flow to [collect recurring card payments using Razorpay payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/partner-auth/recurring-payments/cards/payment-api.md): + 1. Create a Customer for your sub-merchant. This returns a `customer_id`. + 2. Create a registration payment using card details with our Composite Orders and Payments API. This API returns a URL where customers can complete registration by submitting the OTP. At the end of this registration, the recurring token is generated. + 3. Fetch the recurring token: + - Using the Fetch Payments API. + - By subscribing to the `payment.authorized` webhook event and verify if the token is created. + - By subscribing to the `token.confirmed` webhook event and verify if the token is activated. + 4. Subscribe to the `token.service_provider_token.activated` webhook event to retrieve the saved card token. + 5. Create registration payment using the saved card token with our Composite Orders and Payments API. This API returns a URL where customers can complete registration by submitting the OTP. + 6. To initiate subsequent payments, you must create an order using the Orders API. Send the `customer_id` along with the other parameters in the API request. + 7. Create a subsequent payment using the Recurring Payment API. Pass the `order_id` (received in the response of the previous step), the `token_id` and the `customer_id` in the request body. Subscribe to the `payment.captured` webhook event to confirm the payment. You may also subscribe to the `token.rejected` webhook to get notified in case the token is rejected. + + + +### Using Razorpay Standard Checkout (Emandate and UPI) + + You can integrate Recurring Payments using Razorpay Standard Checkout via APIs. + + Following is the integration flow to collect recurring payments using the Razorpay Standard Checkout: + 1. Create a Customer for your sub-merchant. This returns a `customer_id`. + 2. Create an Order for your sub-merchant. This returns an `order_id`. The minimum order amount for: + - Emandate: ₹0. + - UPI: ₹1. + 3. Create an Authorisation Transaction. Pass the `customer_id`, `order_id`, `account_id` and a few additional parameters in your Checkout to create the authorisation payment. The customer completes the authorisation payment, which generates a token. This payment can be authorised using one of the following instruments: + - Emandate + - UPI + 4. Retrieve and check the status of the token. After the token status changes to `confirmed`, you can create and charge subsequent payments. + 5. Create and charge subsequent payments. To do this, you have to manually: + 1. Create a new order. + 2. Create a recurring payment. + + + +### Using a Registration Link + + You can create registration links from the Dashboard or using APIs. + Following is the integration flow to collect recurring payments using a registration link: + 1. Create a registration link and send it to your customer. The customer completes the authorisation payment, which generates a token. This payment can be authorised using one of the following instruments: + - [Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/partner-auth/recurring-payments/emandate/registration.md) + - [Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/partner-auth/recurring-payments/cards/registration-links/create-authorisation-transaction.md) + - [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/partner-auth/recurring-payments/upi/create-authorisation-transaction.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> There is no need to create a customer and order separately if you use a registration link to create the authorisation transaction. Razorpay automatically creates a customer and the order on your behalf. +> + + 2. Retrieve and check the token status. After the token status changes to `confirmed`, you can create and charge subsequent payments. + 3. Create and charge subsequent payments. To do this, you have to manually: + 1. Create a new order. + 2. Create a recurring payment. + + + +#### Related Information + +- [Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/partner-auth/recurring-payments/emandate/registration.md) +- [Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/partner-auth/recurring-payments/cards/payment-api.md) +- [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/partner-auth/recurring-payments/upi/create-authorisation-transaction.md) +- [UPI with TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/partner-auth/recurring-payments/upi-tpv/create-authorisation-transaction.md) diff --git a/llm-content/partners/aggregators/partner-auth/recurring-payments/cards/payment-api.md b/llm-content/partners/aggregators/partner-auth/recurring-payments/cards/payment-api.md new file mode 100644 index 00000000..c94be38f --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/recurring-payments/cards/payment-api.md @@ -0,0 +1,1393 @@ +--- +title: Create Recurring Card Payments with Partner Auth +description: Steps to integrate Recurring Card Payments with Partner Auth using Razorpay APIs. +--- + +# Create Recurring Card Payments with Partner Auth + +Use Razorpay [Recurring Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments.md) APIs to seamlessly schedule and manage recurring card payments for your customers, with full control over payment intervals and frequency. + +### Token Sharing for Partnership Auth Model + +Token sharing eliminates the need for customers to re-enter card details when making purchases across different businesses under the same legal entity, creating a seamless payment experience. This feature allows tokens created under any merchant ID (MID) to be automatically shared across all MIDs within the same entity, significantly improving customer convenience and reducing checkout friction. Know more about [token sharing for partnership auth model](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/partner-auth/token-sharing.md#token-sharing-in-partnership-model). + +## Integration Steps + +Given below are the integration steps. + +> **INFO** +> +> +> **Handy Tips** +> +> To use Partner Auth in APIs, you must: +> - Add the basic auth with partner credentials (client_id and client_secret). +> - Add the `account_id` of the sub-merchant using X-Razorpay-Account in the header. For example, `-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn"` +> + +### 1. Create a Customer +Razorpay links recurring tokens to customers via a unique identifier. You can generate this identifier using the Customer API. + +You can create customers with basic information such as email and contact and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + +```curl: Request +curl -X POST https://api.razorpay.com/v1/customers \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "fail_existing": "0", + "notes":{ + "note_key_1": "November Rains.", + "note_key_2": "Snow on the beach." + } +}' +```json: Response +{ + "id": "cust_KhOZydVZbcThjW", + "entity": "customer", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "notes": { + "note_key_1": "November Rains.", + "note_key_2": "Snow on the beach." + }, + "created_at": 1668751317 +} +``` + + +### Request Parameters + +`name` _mandatory_ +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` _mandatory_ +: `string` The email id of the customer. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key_1": November Rains". + + + +### Response Parameters + +`id` +: `string` The unique identifier of the customer. For example, `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email id of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, For example, "note_key_1": November Rains". + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + + +### 2. Create a Registration Payment + +You can create the registration payment using: +- Consolidated Orders and Payments API +- Individual [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/authorization-transaction.md#112-create-an-order) and [Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/authorization-transaction.md#113-create-an-authorization-payment) APIs + +Given below is the sample code for the **Consolidated Orders and Payments API**. + +/orders + +```curl: Request +curl -X POST https://api.razorpay.com/v1/orders \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET] \ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "customer_id": "cust_KhOZydVZbcThjW", + "notes": { + "key1": "notes debugging 1", + "key2": "notes debugging 2" + }, + "token": { + "max_amount": 200, + "expire_at": 2709971120, + "frequency": "monthly" + }, + "payment": { + "amount": 100, + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "method": "card", + "notes": { + "key1": "paymentvalue3", + "key2": "paymentvalue2" + }, + "customer_id": "cust_KhOZydVZbcThjW", + "recurring": 1, + "card": { + "name": "Gaurav Kumar", + "number": "4718609108204366", + "cvv": "092", + "expiry_month": "11", + "expiry_year": "30" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.107.107.100", + "referer": "https://merchansite.com/example/paybill" + } +}' +```json: Response +{ + "amount": 100, + "amount_due": 100, + "amount_paid": 0, + "attempts": 1, + "created_at": 1753362819, + "currency": "INR", + "entity": "order", + "id": "order_Qwuuv0jAsYfLuR", + "method": null, + "notes": { + "key1": "notes debugging 1", + "key2": "notes debugging 2" + }, + "offer_id": null, + "payment_workflow": { + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/pg_router/v1/payments/QwuuwwlU9Ggkwp/authenticate" + }, + { + "action": "otp_generate", + "url": "https://api.razorpay.com/pg_router/v1/payments/pay_QwuuwwlU9Ggkwp/otp_generate?key_id=rzp_live_partner_XXXXXXXXXXXXXX-acc_HoWj8Mya219s8Z" + } + ], + "razorpay_payment_id": "pay_QwuuwwlU9Ggkwp" + }, + "receipt": null, + "status": "attempted", + "token": { + "expire_at": 2709971120, + "frequency": null, + "max_amount": 200 + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the amount should be `100` (₹1). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. We support INR only. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer to be charged. For example, cust_D0cs04OIpPPU1F. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. + +`token` _mandatory_ +: `json object` Details related to the authorisation such as max amount and bank account information. + + `max_amount` _optional_ + : `integer` The maximum amount in paise a customer can be charged in a transaction. The value can range from 500 to 100000000. The default value is 9999900 (₹99,999). + + `expire_at` _optional_ + : `integer` The Unix timestamp to indicate till when you can use the token (authorisation on the payment method) to charge the customer upcoming payments. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Currently supported frequencies are `as_presented` and `monthly`. The support for other frequencies is expected to be live soon. + +`payment` _mandatory_ +: `json object` Details related to the payment. + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency unit. For example, paise for INR. + + `email` _mandatory_ + : `string` Customer's email address for payment notifications and receipts. + + `contact` _mandatory_ + : `string` Customer's phone number. + + `method` _mandatory_ + : `string` Payment method used for the payment. Here, it is `card`. + + `notes` _optional_ + : `json object` Key-value pairs for storing custom metadata related to the payment. + + `customer_id` _optional_ + : `string` Unique identifier of the customer. + + `recurring` _optional_ + : `integer` Indicates whether the payment is of recurring nature. Possible values are: + - `1`: Recurring payment. + - `0`: One-time payment. + + `card` _conditional_ + : `json object` Card details object (required when method is card). + + `name` _mandatory_ + : `string` Cardholder's name as printed on the card. + + `number` _mandatory_ + : `string` The card number. + + `cvv` _mandatory_ + : `string` 3-digit number printed at the back of the card. + + `expiry_month` _mandatory_ + : `string` Card expiry month in `MM` format. + + `expiry_year` _mandatory_ + : `string` Card expiry year in `YY` format. + +`authentication` _optional_ +: `json object` Authentication parameters for enhanced security. + + `authentication_channel` _optional_ + : `string` Channel used for authentication. Possible values are `browser` and `app`. + +`browser` _mandatory_ +: `json object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + +`ip` _mandatory_ +: `string` Client's browser IP address. For example, **117.217.74.98**. + +`referer` _mandatory_ +: `string` Value of `referer` header passed by the client's browser. For example, **https://example.com/**. + + + +### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example order_1Aa00000000001. + +`entity` +: `string` The entity that has been created. Here it is order. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. For example, `1`. + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be 100 (₹1). + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, rcptid #1. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`method` +: `string` The authorisation method. Here, it is `card`. + +`customer_id` +: `string` The unique identifier of the customer. For example, cust_4xbQrmEoA5WJ01. + +`offer_id` +: `string` Unique identifier of the offer. + +`payment_workflow` +: `json object` Details of the payment workflow. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available for payment processing. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate the OTP. + - `redirect`: Use this URL to redirect the customer to payment page to complete the payment. + + `url` + : `string` URL to be used for the action indicated. + + +### 3. Fetch Recurring token + +You can fetch the recurring token using the Fetch Payments API or by subscribing to the `payment.authorized` and `token.confirmed` webhook events. Use this recurring token to initiate subsequent debits. + +#### Fetch Payments API +Use this endpoint to fetch the payment details with the `payment_id` generated in the response of the previous step. + +/v1/payments/:id + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/payments/pay_QwuuwwlU9Ggkwp +```json: Response +{ + "id": "pay_QwuuwwlU9Ggkwp", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_Qwuuv0jAsYfLuR", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Payment for Adidas shoes", + "card_id": "card_KOdY30ajbuyOYN", + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "customer_id": "cust_KhOZydVZbcThjW", + "token_id": "token_KOdY$DBYQOv08n", + "notes": [], + "fee": 1, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "064381", + "arn": "74119663031031075351326", + "rrn": "303107535132" + }, + "created_at": 1605871409 +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of ₹1.00 enter 100. + +`currency` +: `string` The currency in which the payment is made. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`method` +: `string` The payment method used for making the payment. Here, it is `card`. + +`order_id` +: `string` Order id, if provided. + +`description` +: `string` Description of the payment, if any. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`amount_refunded` +: `integer` The amount refunded in currency subunits. For example, if amount_refunded = 100, it is equal to ₹1.00. + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `string` Customer contact number used for the payment. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error which occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`created_at` +: `integer` Timestamp, in UNIX format, at which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`customer_id` +: `string` Unique identifier of the customer created in step 1. + +`token_id` +: `string` Unique identifier of the token. + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, UTIB for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `json object` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `auth_code` + : `string` Authorisation code from the issuing bank indicating transaction approval or decline status. Used to verify that the transaction was authorised by the bank. + + `arn` + : `string` A unique reference number provided by the banking partner. + + +#### Subscribe to payment.authorized Webhook Event + +The `token_id` is also present in the `payment.authorized` webhook event payload. + +```json: payment.authorized payload +{ + "entity": "event", + "account_id": "acc_Mry13iaFNn27XW", + "event": "payment.authorized", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_QwuuwwlU9Ggkwp", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "authorized", + "order_id": "order_QloPPTNjf8WjPQ", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": false, + "description": "CallHippo", + "card_id": "card_QloPRIDXIi8dNw", + "card": { + "id": "card_QloPRIDXIi8dNw", + "entity": "card", + "name": "Gaurav Kumar", + "iin": "471860", + "last4": "4366", + "network": "Visa", + "type": "credit", + "issuer": "SBIN", + "international": false, + "emi": false, + "sub_type": "consumer" + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "CONTACT_MASKED", + "customer_id": "cust_Qj2d4VFyopkOSI", + "token_id": "token_KOdY$DBYQOv08n", + "notes": [], + "fee": 0, + "tax": 0, + "error_code": "", + "error_description": "", + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "071340", + "rrn": "517717392745" + }, + "created_at": 1750938160 + } + } + }, + "created_at": 1750938245 +} +``` + +#### Subscribe to token.confirmed Webhook Event + +Check the token activation status from the `token.confirmed` webhook event payload. + +```json: token.confirmed payload +{ + "payload": { + "entity": "event", + "account_id": "acc_4bnk7yysqr5Wx5", + "event": "token.confirmed", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_Qno09XPByBrRUI", + "entity": "token", + "token": "B50RIktG4yQUIz", + "bank": null, + "wallet": null, + "method": "card", + "card": { + "entity": "card", + "name": "", + "iin": "999999", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "ICIC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "482028343", + "expiry_month": "01", + "expiry_year": "2099", + "flows": { + "otp": true, + "recurring": true + }, + "cobranding_partner": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1751373404, + "created_at": 1751373404, + "expired_at": 1896114599, + "status": "active", + "notes": [], + "error_description": null, + "source": "business", + "entity_id": null, + "dcc_enabled": false, + "max_amount": 87500, + "error_code": null, + "compliant_with_tokenisation_guidelines": true + } + } + }, + "created_at": 1751373407 + } +} +``` + +### 4. Retrieve Saved Card Token by Subscribing to Webhooks + +Subscribe to the `token.service_provider_token.activated` webhook event to automatically retrieve saved card tokens. These tokens streamline the card addition process across sub-merchant accounts and reduce user friction. When triggered, this webhook notifies the parent account, which can then cascade the information to all associated child accounts. + +- Partner has to retrieve the card network information to assess if it is a Visa, Mastercard or Rupay card. +- If the card is of Visa or Mastercard network, then partner can enable the composite API using the saved card token id received in this webhook, +- If the network is Rupay, the partner should follow the normal Composite Order API flow shared above in Step 2 as Rupay does not support mandate registration using saved card token. + +```json: token.service_provider_token.activated +{ + "entity": "event", + "account_id": "acc_4bnk7yysqr5Wx5", + "event": "token.service_provider_token.activated", + "contains": [ + "service_provider_token", + "token" + ], + "payload": { + "service_provider_token": { + "entity": { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "active", + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "card_reference_number": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2028 + } + }, + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "active", + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "card_reference_number": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2028 + } + }, + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "aggregator", + "provider_name": "razorpay", + "interoperable": false, + "status": "activated", + "provider_data": { + "expired_at": 1748716199 + } + } + ], + "expired_at": 1748716199, + "status": "active", + "notes": [] + } + } + } + } +} +``` + +### 5. Create a Registration Payment using Saved Card Token with Composite Order API + +Use the Composite Order API to create a registration payment using saved card token. + +> **WARN** +> +> +> **Watch Out!** +> +> Rupay does not support registration payment using a saved card token. +> +> + +/orders + +```curl: Request +curl -X POST https://api.razorpay.com/v1/orders \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET] \ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d'{ + "amount": 100, + "currency": "INR", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "payment": { + "amount": 100, + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "method": "card", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "customer_id": "cust_P6BCqqddZzNkJa", + "recurring": 1, + "token": "token_QqsJMAhHRmIPio", + "save": 1, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill" + } +}' +``` + +```json: Success Response +{ + "amount": 100, + "amount_due": 100, + "amount_paid": 0, + "attempts": 1, + "created_at": 1752043784, + "currency": "INR", + "entity": "order", + "id": "order_QqsMZ12p7MytBA", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "payment_workflow": { + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/authorize" + }, + { + "action": "otp_generate", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate?track_id=FVmAtLUe9XZSGM&key_id=" + } + ], + "razorpay_payment_id": "pay_QqsMa9GhrUxvtx" + }, + "receipt": null, + "status": "attempted" +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Mandate registrations through tokenised card is not allowed for Rupay. Please register using the full card number.", + "source": "internal", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the amount should be `100` (₹1). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. We support INR only. + +`notes` _optional_ +: `json object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + +`payment` _mandatory_ +: `json object` Details related to the payment. + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency unit. For example, paise for INR. + + `email` _mandatory_ + : `string` Customer's email address for payment notifications and receipts. + + `contact` _mandatory_ + : `string` Customer's phone number. + + `method` _mandatory_ + : `string` Payment method used for the payment. Here, it is `card`. + + `notes` _optional_ + : `json object` Key-value pairs for storing custom metadata related to the payment. + + `customer_id` _optional_ + : `string` Unique identifier of the customer. + + `recurring` _optional_ + : `integer` Indicates whether the payment is of recurring nature. Possible values are: + - `1`: Recurring payment. + - `0`: One-time payment. + + `token_id` _mandatory_ + : `string` Unique identifier of the token. + + `save` _mandatory_ + : `integer` Determines whether to save the card details. Possible values: + - `1`: Save the card details. + - `0`: Do not save the card details. + +`authentication` _optional_ +: `json object` Authentication parameters for enhanced security. + + `authentication_channel` _optional_ + : `string` Channel used for authentication. Possible values: browser, mobile_app, api. + +`browser` _mandatory_ +: `json object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + +`ip` _mandatory_ +: `string` Client's browser IP address. For example, **117.217.74.98**. + +`referer` _mandatory_ +: `string` Value of `referer` header passed by the client's browser. For example, **https://example.com/**. + + + +### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example order_1Aa00000000001. + +`entity` +: `string` The entity that has been created. Here it is order. + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be 100 (₹1). + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. We support INR only. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, rcptid #1. You must map this parameter to the order_id sent by Razorpay. + +`status` +: `string` The status of the order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`method` +: `string` The authorisation method. Here, it is `card`. + +`customer_id` +: `string` The unique identifier of the customer. For example, cust_4xbQrmEoA5WJ01. + +`payment_workflow` +: `json object` Details of the payment workflow. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available for payment processing. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate the OTP. + - `redirect`: Use this URL to redirect the customer to payment page to complete the payment. + + `url` + : `string` URL to be used for the action indicated. + + + +### Error Response Parameters + +`error` +: `json object` The error object. + + `code` + : `string` The type of error. Here, it is `BAD_REQUEST_ERROR`. + + `description` + : `string` Descriptive text about the error. + + `source` + : `string` The point of failure in the specific operation (payment in this case). + + `step` + : `string` The stage where the transaction failure occurred. + + `reason` + : `string` The exact error reason. + + `metadata` + : `json object` Contains additional information about the request. + + +**Submit OTP/Complete Redirection Flow for Successful Payment** + +Ensure the payment is completed successfully via OTP submission or redirection to the bank's OTP page. Razorpay supports both Native OTP (via Composite API response) and Non-Native OTP (bank's OTP page). + +### 6. Create a Subsequent Payment + +To create subsequent payments, you need to +1. Create an Order using Orders API. +2. Create a Payment using Recurring Payments API. + +#### 6.1 Create an Order + +Create an Order using the Orders API. Pass the `customer_id` in the request body along with the other parameters. + +/orders + +```curl: Request +curl -X POST https://api.razorpay.com/v1/orders \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET] \ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "customer_id": "cust_QqZY02dRJtOUEi" +}' +```json: Response +{ + "amount": 100, + "amount_due": 100, + "amount_paid": 0, + "attempts": 0, + "created_at": 1752237170, + "currency": "INR", + "entity": "order", + "id": "order_QrlHEejkEUxseS", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "receipt": null, + "status": "created" +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. + +`receipt` +: `string` Receipt number that corresponds to this order, set for your internal reference. Can have a maximum length of 40 characters and has to be unique. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in step 1. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of ₹295.00, enter 29500. + +`entity` +: `string` Name of the entity. Here, it is order. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` The 3-digit ISO code for the currency in which you want to accept the payment. + +`receipt` +: `string` Receipt number that corresponds to this order. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the created state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from created to attempted state when a payment is first attempted on it. It remains in the attempted state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the paid state. No further payment requests are permitted once the order moves to the paid state. The order stays in the paid state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + + +#### 6.2 Create a Payment + +Create a Payment using the Recurring Payments API. Use the recurring token fetched in step 3. + +/payments/create/recurring + +```curl: Request +curl -X POST https://api.razorpay.com/v1/payments/create/recurring \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET] \ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "amount": 100, + "currency": "INR", + "order_id": "order_QrlHEejkEUxseS", + "customer_id": "cust_QqZY02dRJtOUEi", + "token": "token_QqcPbYVLtQdbKh", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "razorpay_payment_id": "pay_QrlM7jtb4oblN4", + "razorpay_order_id": "order_QrlHEejkEUxseS", + "razorpay_signature": "4cc00ec4744e200473a909759e3db53047a9150d7ccf00ae89d288beaa2cd456" +} +``` + + +### Request Parameters + +`email` _mandatory_ +: `string` The customer's email address. + +`contact` _mandatory_ +: `string` The customer's phone number. + +`amount` _mandatory_ +: `integer` The payment amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-digit ISO code for the currency in which you want to accept the payment. + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the previous step. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in step 1. + +`token` _mandatory_ +: `string` Unique identifier of the token. + +`recurring` _optional_ +: `boolean` Indicates whether the payment is of recurring nature. Possible values are: + - `true`: Recurring payment. + - `false`: One-time payment. + +`description` +: `string` Description of the payment, if any. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. + + + +### Response Parameters + +`razorpay_payment_id` +: `string` Unique identifier of the payment. + +`razorpay_order_id` +: `string` Unique identifier of the order. + +`razorpay_signature` +: `string` The signature generated for the payment. + + +#### 6.3 Subscribe to Webhook Events to Verify Payment Status + +Subscribe to the `payment.captured` webhook event to confirm the payment. You may also subscribe to the `token.rejected` webhook to get notified in case the token is rejected. + +#### payment.captured Webhook Event payload +Given below is the webhook payload for the `payment.captured` event. + +```json: payment.captured +{ + "account_id": "acc_E7tq4f47sTz3Aw", + "contains": [ + "payment" + ], + "created_at": 1751876065, + "entity": "event", + "event": "payment.captured", + "payload": { + "payment": { + "entity": { + "acquirer_data": { + "auth_code": "000132", + "rrn": "518808059702" + }, + "amount": 100, + "amount_refunded": 0, + "amount_transferred": 0, + "bank": null, + "base_amount": 100, + "captured": true, + "card": { + "emi": false, + "entity": "card", + "id": "card_Qq6j0s9wJMtcZa", + "iin": "999999", + "international": false, + "issuer": "HSBC", + "last4": "8825", + "name": "", + "network": "Visa", + "sub_type": "consumer", + "type": "credit" + }, + "card_id": "card_Qq6j0s9wJMtcZa", + "contact": "+919876543210", + "created_at": 1751876022, + "currency": "INR", + "description": null, + "email": "gaurav.kumar@example.com", + "entity": "payment", + "error_code": null, + "error_description": null, + "error_reason": null, + "error_source": null, + "error_step": null, + "fee": 2, + "id": "pay_Qq6j0s9wJMtcZa", + "international": false, + "invoice_id": null, + "method": "card", + "notes": { + "key1": "OTP - Using Partner Key ", + "key2": "value2" + }, + "order_id": "order_Qq6j0iO7BmuXbq", + "refund_status": null, + "status": "captured", + "tax": 0, + "token_id": "token_Qq6jgr6xmNQWs0", + "vpa": null, + "wallet": null + } + } + } +} +``` + +#### token.rejected Webhook Event payload +Given below is the webhook payload for the `token.rejected` event. + +```json: token.rejected +{ + "entity": "event", + "account_id": "acc_QAacr3KpeJigFb", + "event": "token.rejected", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_QrGgCeVyxl4v15", + "entity": "token", + "token": "GBogvBJ1iOAnxk", + "bank": null, + "wallet": null, + "method": "card", + "card": { + "entity": "card", + "name": "", + "last4": "5513", + "network": "Visa", + "type": "credit", + "issuer": "INDB", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "462003186", + "expiry_month": "01", + "expiry_year": "2099", + "flows": { + "otp": true, + "recurring": true, + "iframe": false + }, + "cobranding_partner": null + }, + "recurring": true, + "recurring_details": { + "status": "rejected", + "failure_reason": "Failed to tokenised the card" + }, + "auth_type": null, + "mrn": null, + "used_at": 1752129420, + "created_at": 1752129418, + "customer": { + "id": "cust_QrGgCAqdYytSZI", + "entity": "customer", + "name": null, + "email": "gaurav.kumar@example.com", + "contact": "CONTACT_MASKED", + "gstin": null, + "notes": [], + "created_at": 1752129418 + }, + "expired_at": 1853951399, + "status": null, + "notes": [], + "error_description": null, + "source": "business", + "entity_id": "QrGeNBOZIZdd0W", + "dcc_enabled": false, + "max_amount": null, + "error_code": null, + "compliant_with_tokenisation_guidelines": false + } + } + }, + "created_at": 1752129649 +} +``` diff --git a/llm-content/partners/aggregators/partner-auth/recurring-payments/cards/registration-links/create-authorisation-transaction.md b/llm-content/partners/aggregators/partner-auth/recurring-payments/cards/registration-links/create-authorisation-transaction.md new file mode 100644 index 00000000..43797f60 --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/recurring-payments/cards/registration-links/create-authorisation-transaction.md @@ -0,0 +1,522 @@ +--- +title: 1. Create Authorisation Transaction +description: Create an authorisation transaction for cards using Razorpay APIs. +--- + +# 1. Create Authorisation Transaction + +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the API or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. + +A registration link should always have an order amount (in paise) the customer will be charged when making the authorisation payment. This amount should be **1** in the case of cards. + +## 1.1 Create a Registration Link +The following endpoint creates a registration link. + +/subscription_registration/auth_links + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/subscription_registration/auth_links \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET] \ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780" + }, + "type":"link", + "amount":"100", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":{ + "method":"card", + "max_amount":"500", + "expire_at":1609423824 + }, + "receipt":"Receipt No. 1", + "email_notify":true, + "sms_notify":true, + "expire_by":1732202345, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrXGIpd3N17DX", + "entity": "invoice", + "receipt": "Receipt No. 24", + "invoice_number": "Receipt No. 24", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrXGJNngJyEAe", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1732202345, + "issued_at": 1595491014, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491014, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/VSriCfn", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491014, + "idempotency_key": null +} +``` + +#### Request Parameters + +`customer` +: Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact` _mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, only INR is supported. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. For example, 12:30 p.m. Thali meals (Gaurav Kumar). + +`subscription_registration` +: Details of the authorisation payment. + + `method` _mandatory_ + : `string` The authorization method. Here, it is `card`. + + `max_amount` _optional_ + : `integer` The maximum amount, in paise, a customer can be charged in a transaction. This value can range from 500 to 99999900. The default value is 9900000 (₹99,000). + + `expire_at` _optional_ + : `integer` The Unix timestamp indicates till when you can use the token (authorisation on the payment method) to charge the customer their subsequent payments. + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, Receipt No. 1. You must map this parameter to the order_id sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. + +#### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is invoice. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, cust_BMB3EwbqnqZ2EI. + +`customer_details` +: Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is ₹299.95, pass the value as 29995. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. You should mandatorily pass this parameter if you are accepting international payments. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is invoice. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +### 1.2 Send/Resend Notifications +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/invoices/inv_FHrfRupD2ouKIt/notify_by/sms \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET] \ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "success": true +} +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, inv_FHrfRupD2ouKIt. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +#### Response Parameter + +`success` +: `boolean` Indicates whether the notifications were sent successfully. Possible values: + - `true`: The notifications were successfully sent via SMS, email or both. + - `false`: The notifications were not sent. + +### 1.3 Cancel a Registration Link + +The following endpoint cancels a registration link. + +> **WARN** +> +> +> **Watch Out!** +> +> You can only cancel a registration link that is in the issued state. +> + +/invoices/:id/cancel + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/invoices/inv_FHrfRupD2ouKIt/cancel \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET] \ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, inv_1Aa00000000001. + +#### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is invoice. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, cust_BMB3EwbqnqZ2EI. + +`customer_details` +: Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is ₹299.95, pass the value as 29995. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. You should mandatorily pass this parameter if you are accepting international payments. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is invoice. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters diff --git a/llm-content/partners/aggregators/partner-auth/recurring-payments/cards/registration-links/create-subsequent-payments.md b/llm-content/partners/aggregators/partner-auth/recurring-payments/cards/registration-links/create-subsequent-payments.md new file mode 100644 index 00000000..b8a0867e --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/recurring-payments/cards/registration-links/create-subsequent-payments.md @@ -0,0 +1,194 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. +--- + +# 3. Create Subsequent Payments + +Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. + +You should perform the following steps to create and charge subsequent payments to your customers: +1. Create an order to charge the customer +2. Create a recurring payment + +## 3.1. Create an Order to Charge the Customer +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "receipt":"Receipt No. 1", + "method": "card", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } +}' +```json: Response +{ + "id":"order_KmZQcRzcp2LroX", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"INR", + "receipt":"Receipt No. 1", + "method": "card", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + }, + "created_at":1579782776 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is 100 (₹1). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, Receipt No. 1. You must map this parameter to the order_id sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, "note_key": "Beam me up Scotty”. + +`method` _mandatory_ +: `string` The payment method used. Here, it is `card`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether tha payment status should be changed to captured automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. + +#### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example order_1Aa00000000001. + +`entity` +: `string` The entity that has been created. Here it is order. + +`amount` +: `integer` Amount in currency subunits. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, rcptid #1. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, "note_key": "Beam me up Scotty”. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`method` +: `string` The payment method used. Here, it is `card`. + +## 3.2. Create a Recurring Payment +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +- You will get a `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` as a response after the payment request is successfully processed. +- In the case of some banks, such as HDFC Bank and Axis Bank, the payment entity is in the `created` state since the charging system of these banks is file-based and can take some time. + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/payments/create/recurring \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "amount": 71000, + "currency": "INR", + "order_id": "order_KhUvbWvROaN5cu", + "customer_id": "cust_KhOZydVZbcThjW", + "token": "token_KhT8dzSCFruvfj", + "recurring": true, + "description": "Creating recurring payment for Kay Say", + "notes": { + "note_key 1": "i dare you", + "note_key 2": "i double dare you" + } +}' +```json: Response +{ + "razorpay_payment_id" : "pay_JnYhfTyEOagtYa", + "razorpay_order_id" : "order_KhUvbWvROaN5cu", + "razorpay_signature" : "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +#### Request Parameters + +`email` _mandatory_ +: `string` The customer's email address. For example, gaurav.kumar@example.com. + +`contact` _mandatory_ +: `integer` The customer's phone number. For example, 9876543210. + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`currency` _mandatory_ +: `string` 3-letter ISO currency code for the payment. Currently, only INR is allowed. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created. For example, order_1Aa00000000002. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, cust_1Aa00000000002. + +`token` _mandatory_ +: `string` The token_id generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different token_id. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`description` _optional_ +: `string` A user-entered description for the payment. For example, Creating recurring payment for Gaurav Kumar. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty"`. + +#### Response Parameters + +`razorpay_payment_id` +: `string` The unique identifier of the payment that is created. For example, pay_1Aa00000000001. + +`razorpay_order_id` +: `string` The unique identifier of the order that is created. For example, order_1Aa00000000001. + +`razorpay_signature` +: `string` The signature generated by the Razorpay. For example, 9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d diff --git a/llm-content/partners/aggregators/partner-auth/recurring-payments/cards/registration-links/fetch-manage-tokens.md b/llm-content/partners/aggregators/partner-auth/recurring-payments/cards/registration-links/fetch-manage-tokens.md new file mode 100644 index 00000000..6bcb31ec --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/recurring-payments/cards/registration-links/fetch-manage-tokens.md @@ -0,0 +1,536 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the token_id, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` in the following ways: +- API +- [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) + +Know more about [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/integrate.md#fetch-card-mandate-registration-details). + +## 2.1. Fetch Token by Payment id +The following endpoint retrieves the `token_id` using a `payment_id`. + +/payments/:id + +```curl: Curl +curl -X GET https://api.razorpay.com/v1/payments/pay_FHfqtkRzWvxky4 \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "541898" + }, + "created_at": 1595449871 +} +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, pay_1Aa00000000002. + +#### Response Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. Here, it is payment. + +`amount` +: `integer` The payment amount represented in smallest unit of the currency passed. For example, amount = 100 translates to 100 paise, that is ₹1 (default currency is INR). + +`currency` +: `string` The currency in which the payment is made. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`order_id` +: `string` The unique identifier of the order. + +`invoice_id` +: `string` The unique identifier of the invoice. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`amount_refunded` +: `integer` The amount refunded in smallest unit of the currency passed. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string` Description of the payment, if any. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `integer` Customer contact number used for the payment. + +`customer_id` +: `string` The unique identifier of the customer. + +`token_id` +: `string` The unique identifier of the token. + +`notes` +: `object` Contains user-defined fields, stored for reference purposes. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, BAD_REQUEST_ERROR. + +`error_description` +: `string` Description of the error that occurred during payment. For example, Payment processing failed because of incorrect OTP. + +`error_source` +: `string` The point of failure. For example, customer. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, payment_authentication. + +`error_reason` +: string The exact error reason. For example, incorrect_otp. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +## 2.2. Fetch All Tokens by Customer id +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves all tokens linked to a customer. + +/customers/:id/tokens + +```curl: Curl +curl -X GET https://api.razorpay.com/v1/customers/cust_DtHaBuooGHTuyZ/tokens \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_HouA2OQR5Z2jTL", + "entity": "token", + "token": "2JPRk664pZHUWG", + "bank": null, + "wallet": null, + "method": "card", + "card": { + "entity": "card", + "name": "Gaurav Kumar", + "last4": "8950", + "network": "Visa", + "type": "credit", + "issuer": "STCB", + "international": false, + "emi": false, + "sub_type": "consumer", + "expiry_month": 12, + "expiry_year": 2021, + "flows": { + "otp": true, + "recurring": true + } + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1629779657, + "created_at": 1629779657, + "expired_at": 1640975399, + "dcc_enabled": false, + "billing_address": null + } + ] +} +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, cust_1Aa00000000002. + +#### Response Parameters + +`entity` +: `string` The entity being created. Here, it is a collection. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: Details related to token such as token id and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is token_id. + + `entity` + : `string` The entity being created. Here, it is a token. + + `token` + : `string` The token is being fetched. + + `bank` + : `string` Card issuing bank details. + + `wallet` + : `string` Provides wallet information. + + `method` + : `string` The payment method used to make the transaction. + + `card` + : Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is card. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is Visa. + + `type` + : `string` Card type (debit or credit). In this example, it is credit. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `string` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + `vpa` + : `string` The VPA details. There are no VPA details in this example. + +`recurring` +: `string` This represents whether recurring is enabled for this token or not. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + +`auth_type` +: `string` The authorization type details. + +`mrn` +: `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + +`used_at` +: `integer` The card usage timestamp. + +`created_at` +: `integer` The card creation timestamp. + +`expired_at` +: `integer` The card expiry date timestamp. + +`dcc_enabled` +: `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + +## 2.3 Fetch a Token by Customer id + +The following endpoint fetches a particular token linked to a customer. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -X GET https://api.razorpay.com/v1/customers/cust_IjsVsJ7d27hxOs/tokens/token_J0BgMu8YDVusZa \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "id": "token_J0BgMu8YDVusZa", + "entity": "token", + "token": "ya5olMAYU0ap4F", + "bank": null, + "wallet": null, + "method": "card", + "card": { + "entity": "card", + "name": "Maitreyi Bodake", + "last4": "7558", + "network": "Visa", + "type": "credit", + "issuer": "FDRL", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": null, + "expiry_month": 1, + "expiry_year": 2027, + "flows": { + "recurring": true + } + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1645780406, + "created_at": 1645780188, + "expired_at": 2709971120, + "status": null, + "notes": [], + "dcc_enabled": false, + "compliant_with_tokenisation_guidelines": false +} +``` + +#### Path Parameters + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, cust_IjsVsJ7d27hxOs. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that should be retrieved. For example, token_J0BgMu8YDVusZa. + +#### Response Parameters + +`id` +: `string` The unique identifier of the token. + +`entity` +: `string` The entity being created. Here, it is token. + +`items` +: Details related to token such as token id and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is token_id. + + `entity` + : `string` The entity being created. Here, it is a token. + + `token` + : `string` The token is being fetched. + + `bank` + : `string` Card issuing bank details. + + `wallet` + : `string` Provides wallet information. + + `method` + : `string` The payment method used to make the transaction. + + `card` + : Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is card. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is Visa. + + `type` + : `string` Card type (debit or credit). In this example, it is credit. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `string` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + +`vpa` +: `string` The VPA details. There are no VPA details in this example. + +`recurring` +: `string` This represents whether recurring is enabled for this token or not. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + +`auth_type` +: `string` The authorization type details. + +`mrn` +: `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + +`used_at` +: `integer` The card usage timestamp. + +`created_at` +: `integer` The card creation timestamp. + +`expired_at` +: `integer` The card expiry date timestamp. + +`dcc_enabled` +: `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + +## 2.4 Delete Tokens +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -X DELETE https://api.razorpay.com/v1/customers/cust_DtHaBuooGHTuyZ/tokens/token_FHf94Uym9tdYFJ \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "deleted": true +} +``` + +#### Path Parameters + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, cust_1Aa00000000002. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, token_1Aa00000000001. + +#### Response Parameters + +`deleted` +: `boolean` Indicates whether the token is deleted. Possible values: + - `true`: The token is deleted successfully. + - `false`: The token was not deleted. diff --git a/llm-content/partners/aggregators/partner-auth/recurring-payments/emandate/create-subsequent-payments.md b/llm-content/partners/aggregators/partner-auth/recurring-payments/emandate/create-subsequent-payments.md new file mode 100644 index 00000000..d8aeefc8 --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/recurring-payments/emandate/create-subsequent-payments.md @@ -0,0 +1,177 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. +--- + +# 3. Create Subsequent Payments + +Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. + +You should perform the following steps to create and charge your customer subsequent payments: +1. Create an order to charge the customer +2. Create a recurring payment + +## 3.1. Create an Order to Charge the Customer +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } +}' +```json: Response +{ + "id":"order_KmZQcRzcp2LroX", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"INR", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + }, + "created_at":1579782776 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is 100 (₹1). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, Receipt No. 1. You must map this parameter to the order_id sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, "note_key": "Beam me up Scotty”. + +`payment_capture` _mandatory_ +: `boolean` Determines whether tha payment status should be changed to captured automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. + +#### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example order_1Aa00000000001. + +`entity` +: `string` The entity that has been created. Here it is order. + +`amount` +: `integer` Amount in currency subunits. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, rcptid #1. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, "note_key": "Beam me up Scotty”. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +## 3.2. Create a Recurring Payment +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/payments/create/recurring \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "amount": 71000, + "currency": "INR", + "order_id": "order_KhUvbWvROaN5cu", + "customer_id": "cust_KhOZydVZbcThjW", + "token": "token_KhT8dzSCFruvfj", + "recurring": true, + "description": "Creating recurring payment for Kay Say", + "notes": { + "note_key 1": "i dare you", + "note_key 2": "i double dare you" + } +}' +```json: Response +{ + "razorpay_payment_id" : "pay_JnYhfTyEOagtYa", + "razorpay_order_id" : "order_KhUvbWvROaN5cu", + "razorpay_signature" : "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +#### Request Parameters + +`email` _mandatory_ +: `string` The customer's email address. For example, gaurav.kumar@example.com. + +`contact` _mandatory_ +: `integer` The customer's phone number. For example, 9876543210. + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`currency` _mandatory_ +: `string` 3-letter ISO currency code for the payment. Currently, only INR is allowed. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created. For example, order_1Aa00000000002. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, cust_1Aa00000000002. + +`token` _mandatory_ +: `string` The token_id generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different token_id. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`description` _optional_ +: `string` A user-entered description for the payment. For example, Creating recurring payment for Gaurav Kumar. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty"`. + +#### Response Parameters + +`razorpay_payment_id` +: `string` The unique identifier of the payment that is created. For example, pay_1Aa00000000001. diff --git a/llm-content/partners/aggregators/partner-auth/recurring-payments/emandate/fetch-manage-tokens.md b/llm-content/partners/aggregators/partner-auth/recurring-payments/emandate/fetch-manage-tokens.md new file mode 100644 index 00000000..d9ae7265 --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/recurring-payments/emandate/fetch-manage-tokens.md @@ -0,0 +1,381 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the token_id, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` in the following ways: +- API +- [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) + +Know more about [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md#fetch-emandate-registration-details). + +## 2.1. Fetch Token by Payment id +The following endpoint retrieves the `token_id` using a `payment_id`. + +/payments/:id + +```curl: Curl +curl -X GET https://api.razorpay.com/v1/payments/pay_FHf9a7AO0iXM9I \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "id": "pay_FHf9a7AO0iXM9I", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_FHf9OwSeyetnKC", + "invoice_id": "inv_FHf9P2hhXEti7i", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHf9aAZR9hWJkq", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595447410 +} +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, pay_1Aa00000000002. + +#### Response Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. Here, it is payment. + +`amount` +: `integer` The payment amount represented in smallest unit of the currency passed. For example, amount = 100 translates to 100 paise, that is ₹1 (default currency is INR). + +`currency` +: `string` The currency in which the payment is made. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`order_id` +: `string` The unique identifier of the order. + +`invoice_id` +: `string` The unique identifier of the invoice. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`amount_refunded` +: `integer` The amount refunded in smallest unit of the currency passed. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string` Description of the payment, if any. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `integer` Customer contact number used for the payment. + +`customer_id` +: `string` The unique identifier of the customer. + +`token_id` +: `string` The unique identifier of the token. + +`notes` +: `object` Contains user-defined fields, stored for reference purposes. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, BAD_REQUEST_ERROR. + +`error_description` +: `string` Description of the error that occurred during payment. For example, Payment processing failed because of incorrect OTP. + +`error_source` +: `string` The point of failure. For example, customer. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, payment_authentication. + +`error_reason` +: string The exact error reason. For example, incorrect_otp. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +## 2.2. Fetch All Tokens by Customer id +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves all tokens linked to a customer. + +/customers/:id/tokens + +```curl: Curl +curl -X GET https://api.razorpay.com/v1/customers/cust_DtHaBuooGHTuyZ/tokens \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "token_FHf94Uym9tdYFJ", + "entity": "token", + "token": "2wDPM7VAlXtjAR", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "netbanking", + "mrn": null, + "used_at": 1595447381, + "created_at": 1595447381, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 1689971140, + "dcc_enabled": false + }, + { + "id": "token_FHf9aAZR9hWJkq", + "entity": "token", + "token": "AwAwIFBmDSJ4p6", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "debitcard", + "mrn": null, + "used_at": 1595447410, + "created_at": 1595447410, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 4102444799, + "dcc_enabled": false + } + ] +} +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, cust_1Aa00000000002. + +#### Response Parameters + +`entity` +: `string` The entity being created. Here, it is a collection. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: Details related to token such as token id and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is token_id. + + `entity` + : `string` The entity being created. Here, it is a token. + + `token` + : `string` The token is being fetched. + + `bank` + : `string` Card issuing bank details. + + `wallet` + : `string` Provides wallet information. + + `method` + : `string` The payment method used to make the transaction. + + `card` + : Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is card. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is Visa. + + `type` + : `string` Card type (debit or credit). In this example, it is credit. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `string` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + +`vpa` +: `string` The VPA details. There are no VPA details in this example. + +`recurring` +: `string` This represents whether recurring is enabled for this token or not. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + +`auth_type` +: `string` The authorization type details. + +`mrn` +: `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + +`used_at` +: `integer` The card usage timestamp. + +`created_at` +: `integer` The card creation timestamp. + +`expired_at` +: `integer` The card expiry date timestamp. + +`dcc_enabled` +: `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + +## 2.3. Delete Tokens +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -X DELETE https://api.razorpay.com/v1/customers/cust_DtHaBuooGHTuyZ/tokens/token_FHf94Uym9tdYFJ \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "deleted": true +} +``` + +#### Path Parameters + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, cust_1Aa00000000002. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, token_1Aa00000000001. + +#### Response Parameters + +`deleted` +: `boolean` Indicates whether the token is deleted. Possible values: + - `true`: The token is deleted successfully. + - `false`: The token was not deleted. diff --git a/llm-content/partners/aggregators/partner-auth/recurring-payments/emandate/registration.md b/llm-content/partners/aggregators/partner-auth/recurring-payments/emandate/registration.md new file mode 100644 index 00000000..73f37c80 --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/recurring-payments/emandate/registration.md @@ -0,0 +1,1289 @@ +--- +title: 1. Emandate Registration +description: Know how to create an authorisation transaction with emandate as a payment method. +--- + +# 1. Emandate Registration + +Emandate registration is a process of creating a payment checkout form for customers to make the authorisation transaction and register their Emandate. A token will be generated once a customer makes this transaction. + +Using this authorisation transaction, we can authenticate the customer's Emandate and ensure that we can charge them recurring payments. The authorisation transaction can be created using: +1. Razorpay APIs +2. Registration Link + +## 1.1 Using Razorpay APIs + +### 1.1.1. Create a Customer +Razorpay links recurring tokens to customers via a unique identifier. You can generate this identifier using the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as email and contact and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/customers \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "fail_existing":"0", + "notes":{ + "note_key_1": "November Rains.", + "note_key_2": "Snow on the beach." + } +}' +```json: Response +{ + "id": "cust_KhOZydVZbcThjW", + "entity": "customer", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "notes": { + "note_key_1": "November Rains.", + "note_key_2": "Snow on the beach." + }, + "created_at": 1668751317 +} +``` + +#### Request Parameters + +`name` _mandatory_ +: `string` The name of the customer. For example, Gaurav Kumar. + +`email` _mandatory_ +: `string` The email ID of the customer. For example, gaurav.kumar@example.com. + +`contact` _mandatory_ +: `string` The phone number of the customer. For example, 9876543210. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. + +#### Response Parameters + +`id` +: `string` The unique identifier of the customer. For example cust_1Aa00000000001. + +`entity` +: `string` The name of the entity. Here, it is customer. + +`name` +: `string` The name of the customer. For example, Gaurav Kumar. + +`email` +: `string` The email ID of the customer. For example, gaurav.kumar@example.com. + +`contact` +: `string` The phone number of the customer. For example, 9876543210. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +### 1.1.2. Create an Order +You can use the Orders API to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +```curl: Emandate via Netbanking +curl -X POST https://api.razorpay.com/v1/orders \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100000, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_KhOZydVZbcThjW", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 1692444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "33369611360", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}' +```json: Response +{ + "id": "order_KmZIiMV6xHZOWO", + "entity": "order", + "amount": 100000, + "amount_paid": 0, + "amount_due": 100000, + "currency": "INR", + "receipt": "Receipt No. 1", + "payments": { + "entity": "collection", + "count": 0, + "items": [] + }, + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1669880775, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "netbanking", + "expire_at": 1692444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "33369611360", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 0 + } +} +``` + +```curl: Emandate via Debit Card +curl -X POST https://api.razorpay.com/v1/orders \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_KhOZydVZbcThjW", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "debitcard", + "max_amount": 9999900, + "expire_at": 1692444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "33369611360", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}' +```json: Response +{ + "id": "order_KmZOwLd9Roh8il", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "payments": { + "entity": "collection", + "count": 0, + "items": [] + }, + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1669881129, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "debitcard", + "expire_at": 1692444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "33369611360", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 0 + } +} +``` + +```curl: Emandate via Aadhaar +curl -X POST https://api.razorpay.com/v1/orders \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_KhOZydVZbcThjW", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "aadhaar", + "max_amount": 9999900, + "expire_at": 1692444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "33369611360", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}' +```json: Response +{ + "id": "order_KmZQcRzcp2LroX", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "payments": { + "entity": "collection", + "count": 0, + "items": [] + }, + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1669881224, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "aadhaar", + "expire_at": 1692444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "33369611360", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 0 + } +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For emandate, the amount should be 0. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`payment_capture` _mandatory_ +: `boolean` Determines whether tha payment status should be changed to captured automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the Manually Capture Payments API. + +`method` _mandatory_ +: `string` The authorization method. Here, it is emandate. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer to be charged. For example, cust_D0cs04OIpPPU1F. + +`receipt` _optional_ +: `string` A user-entered unique identifier of the order. For example, rcptid #1. You must map this parameter to the order_id sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. + +`token` +: Details related to the authorization such as max amount and bank account information. + + `auth_type` _optional_ + : `string` Emandate type used to make the authorisation payment. Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + + `max_amount` _optional_ + : `integer` The maximum amount in paise a customer can be charged in a transaction. Know about the [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` _optional_ + : `integer` The Unix timestamp to indicate till when you can use the token (authorization on the payment method) to charge the customer subsequent payments. The default value is 10 years for emandate. This value can range from the current date to 31-12-2099 (4102444799). + + `notes` _optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. + + `bank_account` + : Customer's bank account details that should be pre-filled on the checkout. + + `account_number` _optional_ + : `string` Customer's bank account number. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` _optional_ + : `string` Customer's bank IFSC. For example UTIB0000001. + + `beneficiary_name` _optional_ + : `string` Name of the beneficiary. For example, Gaurav Kumar. + +#### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example order_1Aa00000000001. + +`entity` +: `string` The entity that has been created. Here it is order. + +`amount` +: `integer` Amount in currency subunits. For emandate, the amount should be 0. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, rcptid #1. You must map this parameter to the order_id sent by Razorpay. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`token` +: Details related to the authorization such as max amount and bank account information. + + `auth_type` + : `string` Emandate type used to make the authorisation payment. Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + + `max_amount` + : `integer` The maximum amount in paise a customer can be charged in a transaction. Know about the [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` + : `integer` The Unix timestamp to indicate till when you can use the token (authorization on the payment method) to charge the customer subsequent payments. The default value is 10 years for emandate. This value can range from the current date to 31-12-2099 (4102444799). + + `notes` + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + + `bank_account` + : Customer's bank account details that should be pre-filled on the checkout. + + `account_number` + : `string` Customer's bank account number. + + `account_type` + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` + : `string` Customer's bank IFSC. For example, UTIB0000001. + + `beneficiary_name` + : `string` Name of the beneficiary. For example, Gaurav Kumar. + +> **INFO** +> +> +> **Handy Tips** +> +> You can register a customer's mandate and charge them the first recurring payment as part of the same transaction. Know more about how to [charge first payment automatically after emandate registration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/auto-debit.md). +> + +### 1.1.3. Create an Authorisation Payment +Create a payment checkout form for customers to make authorisation transaction and register their mandate. You can use the Handler Function or Callback URL. + +Handler Function | Callback URL +--- +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. | When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. + +```javascript: Checkout with Handler Function + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": "1", + "handler": function (response) { + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature); + }, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + + +```javascript: Checkout with Callback URL + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": "1", + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +``` + +#### 1.1.3.1. Additional Checkout Fields +You should send the following additional parameters along with the existing checkout options as a part of the authorisation transaction. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the first step. + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the second step. + +`account_id` _mandatory_ +: `string` Unique identifier of the submerchant. + +`recurring` _mandatory_ +: `string` Indicates whether the recurring should be enabled or not. Possible values: + - 1: Recurring is enabled. + - 0: Recurring is not enabled. + - preferred: Use this when you want to support recurring payments and one-time payment in the same flow. + +## 1.2. Using Registration Link +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the API or Dashboard. + +> **INFO** +> +> +> **Handy Tips** +> +> You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. + +A registration link should always have an order amount (in paise) the customer will be charged when making the authorisation payment. This amount should be 0 in the case of emandate. + +### 1.2.1. Create a Registration Link +The following endpoint creates a registration link. + +/subscription_registration/auth_links + +```curl: Emandate with Netbanking +curl -X POST https://api.razorpay.com/v1/subscription_registration/auth_links \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "method": "emandate", + "auth_type": "netbanking", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrY6tDtVP2dHg", + "entity": "invoice", + "receipt": "Receipt no. 25", + "invoice_number": "Receipt no. 25", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrY6tiC2y7NNN", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491063, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491063, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/DxEcNtR", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491063, + "idempotency_key": null +} +``` + +```curl: Emandate via Debit Card +curl -X POST https://api.razorpay.com/v1/subscription_registration/auth_links \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "method": "emandate", + "auth_type": "debitcard", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrZAOeCuB9HtK", + "entity": "invoice", + "receipt": "Receipt no. 26", + "invoice_number": "Receipt no. 26", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZAPOStKd4xS", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491123, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491123, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/RllVOmA", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491123, + "idempotency_key": null +} +``` + +```curl: Emandate via Aadhaar +curl -X POST https://api.razorpay.com/v1/subscription_registration/auth_links \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d ' +{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "method": "emandate", + "auth_type": "aadhaar", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrZAOeCuB9HtK", + "entity": "invoice", + "receipt": "Receipt no. 26", + "invoice_number": "Receipt no. 26", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZAPOStKd4xS", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491123, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491123, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/RllVOmA", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491123, + "idempotency_key": null +} +``` + +#### Request Parameters + +`customer` +: Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact` _mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is link. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, only INR is supported. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. For example, 12:30 p.m. Thali meals (Gaurav Kumar). + +`subscription_registration` +: Details of the authorisation payment. + + `method` _mandatory_ + : `string` The authorization method. Here, it is emandate. + + `auth_type` _optional_ + : `string` Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + + `max_amount` _optional_ + : `integer` The maximum amount, in paise, a customer can be charged in a transaction. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` _optional_ + : `integer` The Unix timestamp indicates till when you can use the token (authorization on the payment method) to charge the customer their subsequent payments. The default value is 10 years for emandate. This value can range from the current date to 31-12-2099 (4101580799). + + `bank_account` + : The customer's bank account details. + + `beneficiary_name` _optional_ + : `string` Name on the beneficiary. For example Gaurav Kumar. + + `account_number` _optional_ + : `string` Customer's bank account number. For example 11214311215411. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` _optional_ + : `string` Customer's bank IFSC. For example HDFC0000001. + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default) : Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, Receipt No. 1. You must map this parameter to the order_id sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. + +#### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is invoice. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, cust_BMB3EwbqnqZ2EI. + +`customer_details` +: Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is ₹299.95, pass the value as 29995. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. You should mandatorily pass this parameter if you are accepting international payments. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is invoice. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +### 1.2.2 Send/Resend Notifications +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/invoices/inv_FHrfRupD2ouKIt/notify_by/sms \ +u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "success": true +} +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_FHrfRupD2ouKIt`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +#### Response Parameters + +`success` +: `boolean` Indicates whether the notifications were sent successfully. Possible values: + - `true`: The notifications were successfully sent via SMS, email or both. + - `false`: The notifications were not sent. + +### 1.2.3 Cancel a Registration Link +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/invoices/inv_FHrfRupD2ouKIt/cancel \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, inv_1Aa00000000001. + +#### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is invoice. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, cust_BMB3EwbqnqZ2EI. + +`customer_details` +: Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is ₹299.95, pass the value as 29995. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. You should mandatorily pass this parameter if you are accepting international payments. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is invoice. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters + +> **WARN** +> +> +> **Watch Out!** +> +> You can only cancel a registration link that is in the issued state. +> diff --git a/llm-content/partners/aggregators/partner-auth/recurring-payments/upi-tpv/create-authorisation-transaction.md b/llm-content/partners/aggregators/partner-auth/recurring-payments/upi-tpv/create-authorisation-transaction.md new file mode 100644 index 00000000..c204804f --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/recurring-payments/upi-tpv/create-authorisation-transaction.md @@ -0,0 +1,858 @@ +--- +title: 1. Create Authorisation Transaction +description: Create an authorisation transaction for UPI with TPV using Razorpay APIs. +--- + +# 1. Create Authorisation Transaction + +You can create an authorisation transaction using: +- Razorpay APIs +- Registration Link + +## 1.1 Razorpay APIs + +### 1.1.1. Create a Customer +Razorpay links recurring tokens to customers via a unique identifier. You can generate this identifier using the Customer API. + +You can create customers with basic information such as email and contact and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/customers \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9999999999", + "fail_existing": "0", + "notes":{ + "note_key_1": "November Rains.", + "note_key_2": "Snow on the beach." + } +}' +```json: Response +{ + "id": "cust_KhOZydVZbcThjW", + "entity": "customer", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9999999999", + "gstin": null, + "notes": { + "note_key_1": "November Rains.", + "note_key_2": "Snow on the beach." + }, + "created_at": 1668751317 +} +``` + +#### Request Parameters + +`name` _mandatory_ +: `string` The name of the customer. For example, Gaurav Kumar. + +`email` _mandatory_ +: `string` The email ID of the customer. For example, gaurav.kumar@example.com. + +`contact` _mandatory_ +: `string` The phone number of the customer. For example, 9876543210. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. + +#### Response Parameters + +`id` +: `string` The unique identifier of the customer. For example cust_1Aa00000000001. + +`entity` +: `string` The name of the entity. Here, it is customer. + +`name` +: `string` The name of the customer. For example, Gaurav Kumar. + +`email` +: `string` The email ID of the customer. For example, gaurav.kumar@example.com. + +`contact` +: `string` The phone number of the customer. For example, 9876543210. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +### 1.1.2. Create an Order +You can use the Orders API to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +> **INFO** +> +> +> **Handy Tips** +> +> The subsequent payment frequency is displayed on your customer's Payment Service Provider App. They can select the required frequency while registering for the mandate. +> +> + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET] \ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "amount":100, + "currency":"INR", + "customer_id":"cust_KhOZydVZbcThjW", + "method":"upi", + "token": { + "max_amount": 1500000, + "expire_at": 1732202345, + "frequency": "monthly" + }, + "bank_account":{ + "account_number":"123456789012345", + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + }, + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } +}' +```json: Response +{ + "id":"order_KjRaVFx9VQsL30", + "entity":"order", + "amount":100, + "amount_paid":0, + "amount_due":100, + "currency":"INR", + "receipt":"Receipt No. 1", + "description":null, + "customer_id":"cust_KhOZydVZbcThjW", + "offer_id":null, + "method": "upi", + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + }, + "created_at":1565172642 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For emandate, the amount should be 0. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `upi`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer to be charged. For example, cust_D0cs04OIpPPU1F. + +`method` _mandatory_ +: `string` Payment method for the authorisation transaction. Here, the value should be `upi`. + +`bank_account` _mandatory_ +: Details of the bank account of the customer. + + `account_number` _mandatory_ + : `integer` The bank account number of the customer. For example, 123456789012345. + + `name` _mandatory_ + : `string` The name of the bank account holder. + + `ifsc` _mandatory_ + : `string` The IFSC of the bank. For example, HDFC0000053. + +`receipt` _optional_ +: `string` A user-entered unique identifier of the order. For example, rcptid #1. You must map this parameter to the order_id sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. + +`token` +: Details related to the authorization such as max amount and bank account information. + + `max_amount` _optional_ + : `integer` The maximum amount in paise a customer can be charged in a transaction. The value can range from 500 to 100000000. The default value is 9999900 (₹99,999). + + `expire_at` _optional_ + : `integer` The Unix timestamp to indicate till when you can use the token (authorization on the payment method) to charge the customer subsequent payments. The default value is 10 years for emandate. This value can range from the current date to 31-12-2099 (4102444799). + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Currently supported frequencies are as_presented and monthly. The support for other frequencies is expected to be live soon. + +#### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example order_1Aa00000000001. + +`entity` +: `string` The entity that has been created. Here it is order. + +`amount` +: `integer` Amount in currency subunits. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, rcptid #1. You must map this parameter to the order_id sent by Razorpay. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`customer_id` +: `string` The unique identifier of the customer. For example, cust_4xbQrmEoA5WJ01. + +`method` _mandatory_ +: `string` Payment method for the authorisation transaction. Here, the value should be `upi` + +### 1.1.3. Create an Authorisation Payment +Create a payment checkout form for customers to make authorisation transaction and register their mandate. You can use the Handler Function or Callback URL. + +Handler Function | Callback URL +--- +When you use the handler function, the response object of the successful payment (razorpay_payment_id, razorpay_order_id and razorpay_signature) is submitted to the Checkout Form. You need to collect these and send them to your server.| When you use a Callback URL, the response object of the successful payment (razorpay_payment_id, razorpay_order_id and razorpay_signature) is submitted to the Callback URL. + +```javascript: Checkout with Handler Functions + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": "1", + "handler": function (response) { + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature); + }, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + + +```javascript: Checkout with Callback URL + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": "1", + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +``` + +#### 1.1.3.1. Additional Checkout Fields +You should send the following additional parameters along with the existing checkout options as a part of the authorisation transaction. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the first step. + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the second step. + +`account_id` _mandatory_ +: `string` Unique identifier of the submerchant. + +`recurring` _mandatory_ +: `string` Indicates whether the recurring should be enabled or not. Possible values: + - `1`: Recurring is enabled. + - `0`: Recurring is not enabled. + - `preferred`: Use this when you want to support recurring payments and one-time payment in the same flow. + +## 1.2. Using a Registration Link +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the API or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. + +A registration link should always have an order amount (in paise) the customer will be charged when making the authorisation payment. This amount should be **₹1** in the case of UPI. + +### 1.2.1. Create a Registration Link +The following endpoint creates a registration link. + +/subscription_registration/auth_links + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/subscription_registration/auth_links \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET] \ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780" + }, + "type":"link", + "amount":"100", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":{ + "method":"upi", + "max_amount":"500", + "expire_at":4102444799, + "frequency": "monthly", + "bank_account":{ + "account_number":"123456789012345", + "name":"Gaurav Kumar", + "ifsc_code":"HDFC0000053" + } + }, + "receipt":"Receipt No. 1", + "email_notify":true, + "sms_notify":true, + "expire_by":1732202345, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrXGIpd3N17DX", + "entity": "invoice", + "receipt": "Receipt No. 24", + "invoice_number": "Receipt No. 24", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrXGJNngJyEAe", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1732202345, + "issued_at": 1595491014, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491014, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/VSriCfn", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491014, + "idempotency_key": null +} +``` + +#### Request Parameters + +`customer` +: Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact` _mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, only INR is supported. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. For example, 12:30 p.m. Thali meals (Gaurav Kumar). + +`subscription_registration` +: Details of the authorisation payment. + + `method` _mandatory_ + : `string` The authorisation method. Here, it is `upi`. + + `max_amount` _optional_ + : `integer` The maximum amount, in paise, a customer can be charged in a transaction. This value can range from 500 to 99999900. The default value is 9900000 (₹99,000). + + `expire_at` _optional_ + : `integer` The Unix timestamp indicates till when you can use the token (authorization on the payment method) to charge the customer their subsequent payments. The default value is 10 years for emandate. This value can range from the current date to 31-12-2099 (4101580799). + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. + + `bank_account` _mandatory_ + : Details of the bank account of the customer. + + `account_number` _mandatory_ + : `integer` The bank account number of the customer. For example, 123456789012345. + + `name` _mandatory_ + : `string` The name of the bank account holder. + + `ifsc` _mandatory_ + : `string` The IFSC of the bank. For example, HDFC0000053. + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, Receipt No. 1. You must map this parameter to the order_id sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. + +#### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is invoice. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, cust_BMB3EwbqnqZ2EI. + +`customer_details` +: Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is ₹299.95, pass the value as 29995. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. You should mandatorily pass this parameter if you are accepting international payments. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is invoice. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +### 1.2.2. Send/Resend Notifications +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/invoices/inv_FHrfRupD2ouKIt/notify_by/sms \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET] \ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "success": true +} +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, inv_FHrfRupD2ouKIt. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +#### Response Parameter + +`success` +: `boolean` Indicates whether the notifications were sent successfully. Possible values: + - `true`: The notifications were successfully sent via SMS, email or both. + - `false`: The notifications were not sent. + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +> **WARN** +> +> +> **Watch Out!** +> +> You can only cancel a registration link that is in the issued state. +> + +/invoices/:id/cancel + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/invoices/inv_FHrfRupD2ouKIt/cancel \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET] \ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, inv_1Aa00000000001. + +#### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is invoice. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, cust_BMB3EwbqnqZ2EI. + +`customer_details` +: Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is ₹299.95, pass the value as 29995. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. You should mandatorily pass this parameter if you are accepting international payments. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is invoice. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters diff --git a/llm-content/partners/aggregators/partner-auth/recurring-payments/upi-tpv/create-subsequent-payments.md b/llm-content/partners/aggregators/partner-auth/recurring-payments/upi-tpv/create-subsequent-payments.md new file mode 100644 index 00000000..8cfaaf77 --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/recurring-payments/upi-tpv/create-subsequent-payments.md @@ -0,0 +1,201 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. +--- + +# 3. Create Subsequent Payments + +Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. + +You should perform the following steps to create and charge your customer subsequent payments: +1. Create an order to charge the customer +2. Create a recurring payment + +## 3.1. Create an Order to Charge the Customer +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"INR", + "payment_capture":true, + "method":"upi", + "bank_account":{ + "account_number":"123456789012345", + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + }, + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } +}' +```json: Response +{ + "id":"order_KmZQcRzcp2LroX", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"INR", + "receipt":"Receipt No. 1", + "offer_id":null, + "method": "upi", + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + }, + "created_at":1579782776 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is 100 (₹1). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, Receipt No. 1. You must map this parameter to the order_id sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, "note_key": "Beam me up Scotty". + +`method` _optional_ +: `string` The payment method used. Here, it is `upi`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether tha payment status should be changed to captured automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. + +#### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example order_1Aa00000000001. + +`entity` +: `string` The entity that has been created. Here it is order. + +`amount` +: `integer` Amount in currency subunits. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, rcptid #1. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, "note_key": "Beam me up Scotty". + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`method` +: `string` The payment method used. Here, it is `card`. + +## 3.2. Create a Recurring Payment +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +- For UPI, it may take between 24-36 hours for the subsequent payment to reflect on your Dashboard. +- This is because of the failure of pre-debit notification and/or any retries that we attempt for the payment. +- Do not create another subsequent payment until you get the status of the previous one. +- For UPI, **do not** create subsequent payments on the last day of the cycle. This will cause the payment to fail. + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/payments/create/recurring \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "amount": 71000, + "currency": "INR", + "order_id": "order_KhUvbWvROaN5cu", + "customer_id": "cust_KhOZydVZbcThjW", + "token": "token_KhT8dzSCFruvfj", + "recurring": true, + "description": "Creating recurring payment for Kay Say", + "notes": { + "note_key 1": "i dare you", + "note_key 2": "i double dare you" + } +}' +```json: Response +{ + "razorpay_payment_id" : "pay_JnYhfTyEOagtYa", + "razorpay_order_id" : "order_KhUvbWvROaN5cu", + "razorpay_signature" : "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +#### Request Parameters + +`email` _mandatory_ +: `string` The customer's email address. For example, gaurav.kumar@example.com. + +`contact` _mandatory_ +: `integer` The customer's phone number. For example, 9876543210. + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`currency` _mandatory_ +: `string` 3-letter ISO currency code for the payment. Currently, only INR is allowed. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created. For example, order_1Aa00000000002. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, cust_1Aa00000000002. + +`token` _mandatory_ +: `string` The token_id generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different token_id. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`description` _optional_ +: `string` A user-entered description for the payment. For example, Creating recurring payment for Gaurav Kumar. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty"`. + +#### Response Parameters + +`razorpay_payment_id` +: `string` The unique identifier of the payment that is created. For example, pay_1Aa00000000001. + +`razorpay_order_id` +: `string` The unique identifier of the order that is created. For example, order_1Aa00000000001. + +`razorpay_signature` +: `string` The signature generated by the Razorpay. For example, 9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d diff --git a/llm-content/partners/aggregators/partner-auth/recurring-payments/upi-tpv/fetch-manage-tokens.md b/llm-content/partners/aggregators/partner-auth/recurring-payments/upi-tpv/fetch-manage-tokens.md new file mode 100644 index 00000000..594f7e6d --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/recurring-payments/upi-tpv/fetch-manage-tokens.md @@ -0,0 +1,351 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the token_id, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` in the following ways: +- API +- [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) + +Know more about [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/integrate.md#fetch-emandate-registration-details). + +## 2.1. Fetch Token by Payment id +The following endpoint retrieves the `token_id` using a `payment_id`. + +/payments/:id + +```curl: Curl +curl -X GET https://api.razorpay.com/v1/payments/pay_FHfqtkRzWvxky4 \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595449871 +} +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, pay_1Aa00000000002. + +#### Response Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. Here, it is payment. + +`amount` +: `integer` The payment amount represented in smallest unit of the currency passed. For example, amount = 100 translates to 100 paise, that is ₹1 (default currency is INR). + +`currency` +: `string` The currency in which the payment is made. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`order_id` +: `string` The unique identifier of the order. + +`invoice_id` +: `string` The unique identifier of the invoice. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`amount_refunded` +: `integer` The amount refunded in smallest unit of the currency passed. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string` Description of the payment, if any. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `integer` Customer contact number used for the payment. + +`customer_id` +: `string` The unique identifier of the customer. + +`token_id` +: `string` The unique identifier of the token. + +`notes` +: `object` Contains user-defined fields, stored for reference purposes. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, BAD_REQUEST_ERROR. + +`error_description` +: `string` Description of the error that occurred during payment. For example, Payment processing failed because of incorrect OTP. + +`error_source` +: `string` The point of failure. For example, customer. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, payment_authentication. + +`error_reason` +: string The exact error reason. For example, incorrect_otp. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +## 2.2. Fetch All Tokens by Customer id +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves all tokens linked to a customer. + +/customers/:id/tokens + +```curl: Curl +curl -X GET https://api.razorpay.com/v1/customers/cust_DtHaBuooGHTuyZ/tokens \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, cust_1Aa00000000002. + +#### Response Parameters + +`entity` +: `string` The entity being created. Here, it is a collection. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: Details related to token such as token id and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is token_id. + + `entity` + : `string` The entity being created. Here, it is a token. + + `token` + : `string` The token is being fetched. + + `bank` + : `string` Card issuing bank details. + + `wallet` + : `string` Provides wallet information. + + `method` + : `string` The payment method used to make the transaction. + + `card` + : Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is card. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is Visa. + + `type` + : `string` Card type (debit or credit). In this example, it is credit. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `string` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + `vpa` + : `string` The VPA details. There are no VPA details in this example. + +`recurring` +: `string` This represents whether recurring is enabled for this token or not. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + +`auth_type` +: `string` The authorization type details. + +`mrn` +: `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + +`used_at` +: `integer` The VPA usage timestamp. + +`created_at` +: `integer` The VPA creation timestamp. + +`dcc_enabled` +: `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + +## 2.3 Delete Tokens +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -X DELETE https://api.razorpay.com/v1/customers/cust_DtHaBuooGHTuyZ/tokens/token_FHf94Uym9tdYFJ \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "deleted": true +} +``` + +#### Path Parameters + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, cust_1Aa00000000002. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, token_1Aa00000000001. + +#### Response Parameters + +`deleted` +: `boolean` Indicates whether the token is deleted. Possible values: + - `true`: The token is deleted successfully. + - `false`: The token was not deleted. diff --git a/llm-content/partners/aggregators/partner-auth/recurring-payments/upi/create-authorisation-transaction.md b/llm-content/partners/aggregators/partner-auth/recurring-payments/upi/create-authorisation-transaction.md new file mode 100644 index 00000000..27e0df56 --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/recurring-payments/upi/create-authorisation-transaction.md @@ -0,0 +1,808 @@ +--- +title: 1. Create Authorisation Transaction +description: Create an authorisation transaction for UPI using Razorpay APIs. +--- + +# 1. Create Authorisation Transaction + +You can create an authorisation transaction using: +- Razorpay APIs +- Registration Link + +## 1.1 Razorpay APIs + +### 1.1.1. Create a Customer +Razorpay links recurring tokens to customers via a unique identifier. You can generate this identifier using the Customer API. + +You can create customers with basic information such as email and contact and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/customers \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9999999999", + "fail_existing": "0", + "notes":{ + "note_key_1": "November Rains.", + "note_key_2": "Snow on the beach." + } +}' +```json: Response +{ + "id": "cust_KhOZydVZbcThjW", + "entity": "customer", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9999999999", + "gstin": null, + "notes": { + "note_key_1": "November Rains.", + "note_key_2": "Snow on the beach." + }, + "created_at": 1668751317 +} +``` + +#### Request Parameters + +`name` _mandatory_ +: `string` The name of the customer. For example, Gaurav Kumar. + +`email` _mandatory_ +: `string` The email ID of the customer. For example, gaurav.kumar@example.com. + +`contact` _mandatory_ +: `string` The phone number of the customer. For example, 9876543210. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. + +#### Response Parameters + +`id` +: `string` The unique identifier of the customer. For example cust_1Aa00000000001. + +`entity` +: `string` The name of the entity. Here, it is customer. + +`name` +: `string` The name of the customer. For example, Gaurav Kumar. + +`email` +: `string` The email ID of the customer. For example, gaurav.kumar@example.com. + +`contact` +: `string` The phone number of the customer. For example, 9876543210. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +### 1.1.2. Create an Order +You can use the Orders API to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET] \ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "amount":100, + "currency":"INR", + "customer_id":"cust_KhOZydVZbcThjW", + "method":"upi", + "token": { + "max_amount": 1500000, + "expire_at": 1732202345, + "frequency": "monthly" + }, + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } +}' +```json: Response +{ + "id":"order_KjRaVFx9VQsL30", + "entity":"order", + "amount":100, + "amount_paid":0, + "amount_due":100, + "currency":"INR", + "receipt":"Receipt No. 1", + "description":null, + "customer_id":"cust_KhOZydVZbcThjW", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + }, + "created_at":1565172642 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For emandate, the amount should be 0. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `upi`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer to be charged. For example, cust_D0cs04OIpPPU1F. + +`receipt` _optional_ +: `string` A user-entered unique identifier of the order. For example, rcptid #1. You must map this parameter to the order_id sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. + +`token` +: Details related to the authorization such as max amount and bank account information. + + `max_amount` _optional_ + : `integer` The maximum amount in paise a customer can be charged in a transaction. The value can range from 500 to 100000000. The default value is 9999900 (₹99,999). + + `expire_at` _optional_ + : `integer` The Unix timestamp to indicate till when you can use the token (authorization on the payment method) to charge the customer subsequent payments. The default value is 10 years for emandate. This value can range from the current date to 31-12-2099 (4102444799). + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Currently supported frequencies are as_presented and monthly. The support for other frequencies is expected to be live soon. + +#### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example order_1Aa00000000001. + +`entity` +: `string` The entity that has been created. Here it is order. + +`amount` +: `integer` Amount in currency subunits. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, rcptid #1. You must map this parameter to the order_id sent by Razorpay. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`customer_id` +: `string` The unique identifier of the customer. For example, cust_4xbQrmEoA5WJ01. + +### 1.1.3. Create an Authorisation Payment +Create a payment checkout form for customers to make authorisation transaction and register their mandate. You can use the Handler Function or Callback URL. + +Handler Function | Callback URL +--- +When you use the handler function, the response object of the successful payment (razorpay_payment_id, razorpay_order_id and razorpay_signature) is submitted to the Checkout Form. You need to collect these and send them to your server.| When you use a Callback URL, the response object of the successful payment (razorpay_payment_id, razorpay_order_id and razorpay_signature) is submitted to the Callback URL. + +```javascript: Checkout with Handler Functions + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": "1", + "handler": function (response) { + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature); + }, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + + +```javascript: Checkout with Callback URL + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": "1", + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +``` + +#### 1.1.3.1. Additional Checkout Fields +You should send the following additional parameters along with the existing checkout options as a part of the authorisation transaction. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the first step. + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the second step. + +`account_id` _mandatory_ +: `string` Unique identifier of the submerchant. + +`recurring` _mandatory_ +: `string` Indicates whether the recurring should be enabled or not. Possible values: + - `1`: Recurring is enabled. + - `0`: Recurring is not enabled. + - `preferred`: Use this when you want to support recurring payments and one-time payment in the same flow. + +## 1.2. Using a Registration Link +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the API or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. + +A registration link should always have an order amount (in paise) the customer will be charged when making the authorisation payment. This amount should be **₹1** in the case of UPI. + +### 1.2.1. Create a Registration Link +The following endpoint creates a registration link. + +/subscription_registration/auth_links + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/subscription_registration/auth_links \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET] \ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780" + }, + "type":"link", + "amount":"100", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":{ + "method":"upi", + "max_amount":"500", + "expire_at":4102444799, + "frequency": "monthly" + }, + "receipt":"Receipt No. 1", + "email_notify":true, + "sms_notify":true, + "expire_by":1732202345, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrXGIpd3N17DX", + "entity": "invoice", + "receipt": "Receipt No. 24", + "invoice_number": "Receipt No. 24", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrXGJNngJyEAe", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1732202345, + "issued_at": 1595491014, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491014, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/VSriCfn", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491014, + "idempotency_key": null +} +``` + +#### Request Parameters + +`customer` +: Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact` _mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, only INR is supported. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. For example, 12:30 p.m. Thali meals (Gaurav Kumar). + +`subscription_registration` +: Details of the authorisation payment. + + `method` _mandatory_ + : `string` The authorisation method. Here, it is `upi`. + + `max_amount` _optional_ + : `integer` The maximum amount, in paise, a customer can be charged in a transaction. This value can range from 500 to 99999900. The default value is 9900000 (₹99,000). + + `expire_at` _optional_ + : `integer` The Unix timestamp indicates till when you can use the token (authorization on the payment method) to charge the customer their subsequent payments. The default value is 10 years for emandate. This value can range from the current date to 31-12-2099 (4101580799). + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, Receipt No. 1. You must map this parameter to the order_id sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”. + +#### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is invoice. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, cust_BMB3EwbqnqZ2EI. + +`customer_details` +: Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is ₹299.95, pass the value as 29995. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. You should mandatorily pass this parameter if you are accepting international payments. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is invoice. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + +### 1.2.2. Send/Resend Notifications +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/invoices/inv_FHrfRupD2ouKIt/notify_by/sms \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET] \ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "success": true +} +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, inv_FHrfRupD2ouKIt. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +#### Response Parameter + +`success` +: `boolean` Indicates whether the notifications were sent successfully. Possible values: + - `true`: The notifications were successfully sent via SMS, email or both. + - `false`: The notifications were not sent. + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +> **WARN** +> +> +> **Watch Out!** +> +> You can only cancel a registration link that is in the issued state. +> + +/invoices/:id/cancel + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/invoices/inv_FHrfRupD2ouKIt/cancel \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET] \ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, inv_1Aa00000000001. + +#### Response Parameters + +`id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is invoice. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, cust_BMB3EwbqnqZ2EI. + +`customer_details` +: Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is ₹299.95, pass the value as 29995. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. You should mandatorily pass this parameter if you are accepting international payments. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is invoice. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters diff --git a/llm-content/partners/aggregators/partner-auth/recurring-payments/upi/create-subsequent-payments.md b/llm-content/partners/aggregators/partner-auth/recurring-payments/upi/create-subsequent-payments.md new file mode 100644 index 00000000..7c6999ce --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/recurring-payments/upi/create-subsequent-payments.md @@ -0,0 +1,191 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. +--- + +# 3. Create Subsequent Payments + +Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. + +You should perform the following steps to create and charge your customer subsequent payments: +1. Create an order to charge the customer +2. Create a recurring payment + +## 3.1. Create an Order to Charge the Customer +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } +}' +```json: Response +{ + "id":"order_KmZQcRzcp2LroX", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"INR", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + }, + "created_at":1579782776 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is 100 (₹1). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, Receipt No. 1. You must map this parameter to the order_id sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, "note_key": "Beam me up Scotty”. + +`payment_capture` _mandatory_ +: `boolean` Determines whether tha payment status should be changed to captured automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. + +#### Response Parameters + +`id` +: `string` A unique identifier of the order created. For example order_1Aa00000000001. + +`entity` +: `string` The entity that has been created. Here it is order. + +`amount` +: `integer` Amount in currency subunits. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, rcptid #1. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, "note_key": "Beam me up Scotty”. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`method` +: `string` The payment method used. Here, it is `card`. + +## 3.2. Create a Recurring Payment +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +- For UPI, it may take between 24-36 hours for the subsequent payment to reflect on your Dashboard. +- This is because of the failure of pre-debit notification and/or any retries that we attempt for the payment. +- Do not create another subsequent payment until you get the status of the previous one. +For UPI, do not create subsequent payments on the last day of the cycle. This will cause the payment to fail. + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/payments/create/recurring \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +-H "Content-Type: application/json" \ +-d '{ + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "amount": 71000, + "currency": "INR", + "order_id": "order_KhUvbWvROaN5cu", + "customer_id": "cust_KhOZydVZbcThjW", + "token": "token_KhT8dzSCFruvfj", + "recurring": true, + "description": "Creating recurring payment for Kay Say", + "notes": { + "note_key 1": "i dare you", + "note_key 2": "i double dare you" + } +}' +```json: Response +{ + "razorpay_payment_id" : "pay_JnYhfTyEOagtYa", + "razorpay_order_id" : "order_KhUvbWvROaN5cu", + "razorpay_signature" : "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +#### Request Parameters + +`email` _mandatory_ +: `string` The customer's email address. For example, gaurav.kumar@example.com. + +`contact` _mandatory_ +: `integer` The customer's phone number. For example, 9876543210. + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`currency` _mandatory_ +: `string` 3-letter ISO currency code for the payment. Currently, only INR is allowed. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created. For example, order_1Aa00000000002. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, cust_1Aa00000000002. + +`token` _mandatory_ +: `string` The token_id generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different token_id. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`description` _optional_ +: `string` A user-entered description for the payment. For example, Creating recurring payment for Gaurav Kumar. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty"`. + +#### Response Parameters + +`razorpay_payment_id` +: `string` The unique identifier of the payment that is created. For example, pay_1Aa00000000001. + +`razorpay_order_id` +: `string` The unique identifier of the order that is created. For example, order_1Aa00000000001. + +`razorpay_signature` +: `string` The signature generated by the Razorpay. For example, 9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d diff --git a/llm-content/partners/aggregators/partner-auth/recurring-payments/upi/fetch-manage-tokens.md b/llm-content/partners/aggregators/partner-auth/recurring-payments/upi/fetch-manage-tokens.md new file mode 100644 index 00000000..7f8423c9 --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/recurring-payments/upi/fetch-manage-tokens.md @@ -0,0 +1,351 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the token_id, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` in the following ways: +- API +- [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) + +Know more about [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/integrate.md#fetch-emandate-registration-details). + +## 2.1. Fetch Token by Payment id +The following endpoint retrieves the `token_id` using a `payment_id`. + +/payments/:id + +```curl: Curl +curl -X GET https://api.razorpay.com/v1/payments/pay_FHfqtkRzWvxky4 \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595449871 +} +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, pay_1Aa00000000002. + +#### Response Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. Here, it is payment. + +`amount` +: `integer` The payment amount represented in smallest unit of the currency passed. For example, amount = 100 translates to 100 paise, that is ₹1 (default currency is INR). + +`currency` +: `string` The currency in which the payment is made. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`order_id` +: `string` The unique identifier of the order. + +`invoice_id` +: `string` The unique identifier of the invoice. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`amount_refunded` +: `integer` The amount refunded in smallest unit of the currency passed. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string` Description of the payment, if any. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `integer` Customer contact number used for the payment. + +`customer_id` +: `string` The unique identifier of the customer. + +`token_id` +: `string` The unique identifier of the token. + +`notes` +: `object` Contains user-defined fields, stored for reference purposes. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, BAD_REQUEST_ERROR. + +`error_description` +: `string` Description of the error that occurred during payment. For example, Payment processing failed because of incorrect OTP. + +`error_source` +: `string` The point of failure. For example, customer. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, payment_authentication. + +`error_reason` +: string The exact error reason. For example, incorrect_otp. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +## 2.2. Fetch All Tokens by Customer id +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves all tokens linked to a customer. + +/customers/:id/tokens + +```curl: Curl +curl -X GET https://api.razorpay.com/v1/customers/cust_DtHaBuooGHTuyZ/tokens \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, cust_1Aa00000000002. + +#### Response Parameters + +`entity` +: `string` The entity being created. Here, it is a collection. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: Details related to token such as token id and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is token_id. + + `entity` + : `string` The entity being created. Here, it is a token. + + `token` + : `string` The token is being fetched. + + `bank` + : `string` Card issuing bank details. + + `wallet` + : `string` Provides wallet information. + + `method` + : `string` The payment method used to make the transaction. + + `card` + : Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is card. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is Visa. + + `type` + : `string` Card type (debit or credit). In this example, it is credit. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `string` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + `vpa` + : `string` The VPA details. There are no VPA details in this example. + +`recurring` +: `string` This represents whether recurring is enabled for this token or not. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + +`auth_type` +: `string` The authorisation type details. + +`mrn` +: `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + +`used_at` +: `integer` The VPA usage timestamp. + +`created_at` +: `integer` The VPA creation timestamp. + +`dcc_enabled` +: `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + +## 2.3 Delete Tokens +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -X DELETE https://api.razorpay.com/v1/customers/cust_DtHaBuooGHTuyZ/tokens/token_FHf94Uym9tdYFJ \ +-u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +-H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +```json: Response +{ + "deleted": true +} +``` + +#### Path Parameters + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, cust_1Aa00000000002. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, token_1Aa00000000001. + +#### Response Parameters + +`deleted` +: `boolean` Indicates whether the token is deleted. Possible values: + - `true`: The token is deleted successfully. + - `false`: The token was not deleted. diff --git a/llm-content/partners/aggregators/partner-auth/refunds.md b/llm-content/partners/aggregators/partner-auth/refunds.md new file mode 100644 index 00000000..c460db81 --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/refunds.md @@ -0,0 +1,431 @@ +--- +title: Partner Auth | Refunds +heading: Refunds +description: Integrate with Refunds API using partner auth. +--- + +# Refunds + +You can make full or partial refunds to customers. +Know more about [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md). + +> **INFO** +> +> +> **Refunds Can be Made Only on Captured Payments** +> +> You can initiate refunds only on those payments that are in `captured` state. A payment in `authorized` state is auto-refunded if not `captured` within 5 days of creation. +> + +## Create a Refund API + +Given below are the sample codes to create a full refund. You should send the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. Refer to the [Refunds API documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md). + +/payments/:id/refund + +```curl: Curl +curl -u [CLIENT_ID]:[CLIENT_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-H "X-Razorpay-Account: acc_Ef7ArAsdU5t0XL" \ +-d '{ + "amount": 500100 +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[CLIENT_ID]", "[CLIENT_SECRET]"); +headers.put("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); + +String paymentId = "pay_29QQoUBi66xm2f"; + +JSONObject refundRequest = new JSONObject(); +refundRequest.put("amount",100); +refundRequest.put("speed","normal"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +refundRequest.put("notes",notes); +refundRequest.put("receipt","Receipt No. #31"); + +Payment payment = razorpay.payments.refund(paymentId,refundRequest); + +```php: PHP +$api = new Api($CLIENT_ID, $CLIENT_SECRET); +$api->setHeader("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); + +$api->payment->fetch($paymentId)->refund(array("amount"=> "100", "speed"=>"normal", "notes"=>array("notes_key_1"=>"Beam me up Scotty.", "notes_key_2"=>"Engage"), "receipt"=>"Receipt No. 31")); + +```python: Python +import razorpay +client = razorpay.Client(auth=("CLIENT_ID", "CLIENT_SECRET")) +Razorpay.headers = {"X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL"} + +client.payment.refund(paymentId,{ + "amount": "100", + "speed": "normal", + "notes": { + "notes_key_1": "Beam me up Scotty.", + "notes_key_2": "Engage" + }, + "receipt": "Receipt No. 31" +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("CLIENT_ID", "CLIENT_SECRET") + +extraHeaders:= map[string]string{ + "X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL", + } + +data := map[string]interface{}{ + "speed": "normal", + "notes": map[string]interface{}{ + "key_1": "value1", + "key_2": "value2", + }, +} +body, err := client.Payment.Refund("",1200, data, nil) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'CLIENT_ID', key_secret: 'CLIENT_SECRET' }) +headers: {"X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL"} + +instance.payments.refund(paymentId,{ + "amount": "100", + "speed": "normal", + "notes": { + "notes_key_1": "Beam me up Scotty.", + "notes_key_2": "Engage" + }, + "receipt": "Receipt No. 31" +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('CLIENT_ID', 'CLIENT_SECRET') +Razorpay.headers = {"X-Razorpay-Account" => "acc_Ef7ArAsdU5t0XL"} + +paymentId = "pay_29QQoUBi66xm2f" + +para_attr = { + "amount": "100", + "speed": "normal", + "notes": { + "notes_key_1": "Beam me up Scotty.", + "notes_key_2": "Engage" + }, + "receipt": "Receipt No. 31" +} + +Razorpay::Payment.fetch(paymentId).refund(para_attr) + +```json: Success +{ + "id": "rfnd_FP8QHiV938haTz", + "entity": "refund", + "amount": 500100, + "receipt": "Receipt No. 31", + "currency": "INR", + "payment_id": "pay_29QQoUBi66xm2f", + "notes": [] + "receipt": null, + "acquirer_data": { + "arn": null + }, + "created_at": 1597078866, + "batch_id": null, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "normal" +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + +### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier of the payment which needs to be refunded. + +### Request Parameters + +`amount` _optional_ +: `integer` The amount to be refunded. Amount should be in the smallest unit of the currency in which the payment was made. + - For a **partial refund**, enter a value lesser than the payment amount. For example, if the payment amount is and you want to refund only , you must pass `50000`. + - For **full refund**, enter the entire payment amount. If the `amount` parameter is not passed, the entire payment amount will be refunded. + +`speed` _optional_ +: `string` The speed at which the refund is to be processed. The default value is `normal`. Refund will be processed via the normal speed, and the customer will receive the refund within 5-7 working days. Pass `optimum` for instant refunds. + - If the refund can be processed instantly, Razorpay will do so, irrespective of the payment method used to make the payment. + - If an instant refund is not possible, Razorpay will initiate a refund that is processed at the normal speed. + +`notes` _optional_ +: `json object` Key-value pairs used to store additional information. A maximum of 15 key-value pairs can be included. + +`receipt` _optional_ +: `string` A unique identifier provided by you for your internal reference. + +### Response Parameters + +`id` +: `string` The unique identifier of the refund. For example, `rfnd_FgRAHdNOM4ZVbO`. + +`entity` +: `string` Indicates the type of entity. Here, it is `refund`. + +`amount` +: `integer` The amount to be refunded (in the smallest unit of currency). + For example, if the refund value is it will be `3000`. + +`currency` +: `string` The currency of payment amount for which the refund is initiated. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`payment_id` +: `string` The unique identifier of the payment for which a refund is initiated. For example, `pay_FgR9UMzgmKDJRi`. + +`created_at` +: `integer` Unix timestamp at which the refund was created. For example, `1600856650`. + +`batch_id` +: `string` This parameter is populated if the refund was created as part of a batch upload. For example, `batch_00000000000001`. + +`notes` +: `json object` Key-value store for storing your reference data. A maximum of 15 key-value pairs can be included. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A unique identifier provided by you for your internal reference. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + +`status` +: `string` Indicates the state of the refund. Possible values: + - `pending`: This state indicates that Razorpay is attempting to process the refund. + - `processed`: This is the final state of the refund. + - `failed`: A refund can attain the failed state in the following scenarios: + + - Normal refund is not possible for a payment which is more than 6 months old. + + - Instant Refund can sometimes fail because of customer's account or bank-related issues. + +`speed_requested` +: `string` The processing mode of the refund seen in the refund response. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. +Possible values: + - `normal`: Indicates that the refund will be processed via the normal speed. The refund will take 5-7 working days. + - `optimum`: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. + - If the refund can be processed instantly, Razorpay will do so, irrespective of the payment method used to make the payment. + - If an instant refund is not possible, Razorpay will initiate a refund that is processed at the normal speed. + +`speed_processed` +: `string` This is a parameter in the response which describes the mode used to process a refund. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. Possible values: + - `instant`: Indicates that the refund has been processed instantly via fund transfer. + - `normal`: Indicates that the refund has been processed by the payment processing partner. The refund will take 5-7 working days. + +## Fetch All Refunds API + +Given below is the sample code for Fetch all Refunds API. Pass the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. Know more about [Fetch all Refunds API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-all.md). + +By default, only the last 10 refunds are returned. You can use count and skip query parameters to change that behaviour. + +/refunds/ + +```curl: Curl +curl -u [CLIENT_ID]:[CLIENT_SECRET] \ +-X GET https://api.razorpay.com/v1/refunds +-H "X-Razorpay-Account: acc_Ef7ArAsdU5t0XL" \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[CLIENT_ID]", "[CLIENT_SECRET]"); +headers.put("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List refund = razorpay.refunds.fetchAll(params); + +```php: PHP +$api = new Api($CLIENT_ID, $CLIENT_SECRET); +$api->setHeader("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); + +$api->refund->all($options); + +```python: Python +import razorpay +client = razorpay.Client(auth=("CLIENT_ID", "CLIENT_SECRET")) +Razorpay.headers = {"X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL"} + +client.refund.all(options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("CLIENT_ID", "CLIENT_SECRET") + +extraHeaders:= map[string]string{ + "X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL", + } + +option := map[string]interface{}{ + "count" : 2 +} +body, err := client.Payment.All(option, nil) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'CLIENT_ID', key_secret: 'CLIENT_SECRET' }) +headers.put("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); + +instance.refunds.all(options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('CLIENT_ID', 'YOUR_SECRET') +Razorpay.headers = {"X-Razorpay-Account" => "acc_Ef7ArAsdU5t0XL"} + +options = {"count":1} + +Razorpay::Refund.all(options) + +```json: Success +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "rfnd_FFX6AnnIN3puqW", + "entity": "refund", + "amount": 88800, + "currency": "INR", + "payment_id": "pay_FFX5FdEYx8jPwA", + "notes": { + "comment": "Issuing an instant refund" + }, + "receipt": null, + "acquirer_data": {}, + "created_at": 1594982363, + "batch_id": null, + "status": "processed", + "speed_processed": "optimum", + "speed_requested": "optimum" + }, + { + "id": "rfnd_EqWThTE7dd7utf", + "entity": "refund", + "amount": 6000, + "currency": "INR", + "payment_id": "pay_EpkFDYRirena0f", + "notes": { + "comment": "Issuing a normal refund" + }, + "receipt": null, + "acquirer_data": { + "arn": "10000000000000" + }, + "created_at": 1589521675, + "batch_id": null, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "normal" + } + ] +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The payment id field is required.", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "payment_id" + } +} +``` + +### Query Parameters + +`from` _optional_ +: `integer` Unix timestamp at which the refunds were created. + +`to` _optional_ +: `integer` Unix timestamp till which the refunds were created. + +`count` _optional_ +: `integer` The number of refunds to fetch. You can fetch a maximum of 100 refunds. + +`skip` _optional_ +: `integer` The number of refunds to be skipped. + +### Response Parameters + +`id` +: `string` The unique identifier of the refund. For example, `rfnd_FgRAHdNOM4ZVbO`. + +`entity` +: `string` Indicates the type of entity. Here, it is `refund`. + +`amount` +: `integer` The amount to be refunded (in the smallest unit of currency). + For example, if the refund value is it will be `3000`. + +`currency` +: `string` The currency of payment amount for which the refund is initiated. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`payment_id` +: `string` The unique identifier of the payment for which a refund is initiated. For example, `pay_FgR9UMzgmKDJRi`. + +`created_at` +: `integer` Unix timestamp at which the refund was created. For example, `1600856650`. + +`batch_id` +: `string` This parameter is populated if the refund was created as part of a batch upload. For example, `batch_00000000000001`. + +`notes` +: `json object` Key-value store for storing your reference data. A maximum of 15 key-value pairs can be included. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A unique identifier provided by you for your internal reference. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + +`status` +: `string` Indicates the state of the refund. Possible values: + - `pending`: This state indicates that Razorpay is attempting to process the refund. + - `processed`: This is the final state of the refund. + - `failed`: A refund can attain the failed state in the following scenarios: + + - Normal refund is not possible for a payment which is more than 6 months old. + + - Instant Refund can sometimes fail because of customer's account or bank-related issues. + +`speed_requested` +: `string` The processing mode of the refund seen in the refund response. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. +Possible values: + - `normal`: Indicates that the refund will be processed via the normal speed. The refund will take 5-7 working days. + - `optimum`: Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. + - If the refund can be processed instantly, Razorpay will do so, irrespective of the payment method used to make the payment. + - If an instant refund is not possible, Razorpay will initiate a refund that is processed at the normal speed. + +`speed_processed` +: `string` This is a parameter in the response which describes the mode used to process a refund. + This attribute is seen in the refund response only if the `speed` parameter is set in the refund request. Possible values: + - `instant`: Indicates that the refund has been processed instantly via fund transfer. + - `normal`: Indicates that the refund has been processed by the payment processing partner. The refund will take 5-7 working days. + +### Related Information + +- [Refunds API documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md) diff --git a/llm-content/partners/aggregators/partner-auth/smart-collect.md b/llm-content/partners/aggregators/partner-auth/smart-collect.md new file mode 100644 index 00000000..e7d57bc9 --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/smart-collect.md @@ -0,0 +1,330 @@ +--- +title: Partner Auth | Smart Collect +heading: Smart Collect +description: Integrate with Smart Collect APIs using partner auth. +--- + +# Smart Collect + +Razorpay Smart Collect enables you to create virtual accounts to accept large payments from your customers in the form of bank transfers via NEFT, RTGS and IMPS. + +Virtual accounts are similar to bank accounts wherein customers can transfer payments. You can create, retrieve and close virtual accounts using the Smart Collect APIs. + +> **INFO** +> +> +> **Handy Tips** +> +> Consider these [prerequisites](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md#prerequisites) before getting started with Smart Collect. +> + +## Create a Virtual Account API + +Given below is the sample code for the Create a Virtual Account API. Pass the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. Refer to the [Smart Collect API documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md). + +/virtual_accounts + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/virtual_accounts \ +-u [CLIENT_ID]:[CLIENT_SECRET] \ +-H "Content-Type: application/json" \ +-H 'X-Razorpay-Account: acc_Ef7ArAsdU5t0XL' \ +-d '{ + "receivers": { + "types": [ + "bank_account" + ] + }, + "description": "Virtual Account created for Raftar Soft", + "customer_id": "cust_CaVDm8eDRSXYME", + "close_by": 1681615838, + "notes": { + "project_name": "Banking Software" + }, +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[CLIENT_ID]", "[CLIENT_SECRET]"); + +JSONObject request = new JSONObject(); +headers.put("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); +instance.addHeaders(headers); +JSONArray receiverTypeArray = new JSONArray(); +receiverTypeArray.put("bank_account"); +request.put("receiver_types", receiverTypeArray); +JSONObject notes = new JSONObject(); +notes.put("receiver_key", "receiver_value"); +request.put("notes", notes); +request.put("description", "First Virtual Account"); + +VirtualAccount virtualAccount = razorpayClient.VirtualAccounts.create(request); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->setHeader("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); + +$api->virtualAccount->create(array('receivers' => array('types'=> array('bank_account')),'allowed_payers' => array(array('type'=>'bank_account','bank_account'=>array('ifsc'=>'RATN0VAAPIS','account_number'=>'2223330027558515'))),'description' => 'Virtual Account created for Raftar Soft','customer_id' => 'cust_HssUOFiOd2b1TJ', 'notes' => array('project_name' => 'Banking Software'))); + +```javascript: Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_KEY_SECRET", + headers: {"X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL"} +}); + +instance.virtualAccounts.create({ + receivers: { + types: [ + "bank_account" + ] + }, + description: "Virtual Account created for Raftar Soft", + customer_id: "cust_CaVDm8eDRSXYME", + close_by: 1681615838, + notes: { + project_name: "Banking Software" + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') +Razorpay.headers = {"X-Razorpay-Account" => "acc_Ef7ArAsdU5t0XL"} + +para_attr = { + "receivers": { + "types": [ + "bank_account" + ] + }, + "description": "Virtual Account created for Raftar Soft", + "customer_id": "cust_CaVDm8eDRSXYME", + "close_by": 1681615838, + "notes": { + "project_name": "Banking Software" + } +} + +Razorpay::VirtualAccount.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("CLIENT_ID", "CLIENT_SECRET") + +extraHeaders:= map[string]string{ + "X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL", + } + +types := make(map[string]interface{}) +types["0"] = "bank_account" + +data:= map[string]interface{}{ + "receivers": map[string]interface{}{ + "types": types, + }, + "description": "Virtual Account created for Raftar Soft", + "customer_id": "cust_CaVDm8eDRSXYME", + "close_by": 1681615838, + "notes": map[string]interface{}{ + "project_name": "Banking Software", + }, +} + +body, err := client.VirtualAccount.Create(data, extraHeaders) + +```json: Response +{ + "id":"va_DlGmm7jInLudH9", + "name":"Acme Corp", + "entity":"virtual_account", + "status":"active", + "description":"Virtual Account created for Raftar Soft", + "amount_expected":null, + "notes":{ + "project_name":"Banking Software" + }, + "amount_paid":0, + "customer_id":"cust_CaVDm8eDRSXYME", + "receivers":[ + { + "id":"ba_DlGmm9mSj8fjRM", + "entity":"bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name":"Acme Corp", + "notes":[], + "account_number":"2223330099089860" + } + ], + "close_by":1681615838, + "closed_at":null, + "created_at":1574837626 +} +``` + +### Request Parameters + +`receivers` _mandatory_ +: `json object` Configuration of desired receivers for the virtual account. + + `types` + : `array` List of desired receiver types. Possible values: + - `bank_account` + - `vpa` + - `qr_code` + + `vpa` _optional_ + : `json object` Descriptor details for the virtual UPI ID. This is to be passed only when `vpa` is passed as the receiver `types`. + + `descriptor` + : `string` You can provide a custom descriptor for the UPI ID. This is a unique identifier provided by you to identify the customer. For example, `gaurikumari` and `akashkumar` are the descriptors in the usernames `rpy.payto00000gaurikumari` and `rpy.payto00000akashkumar` respectively. The combination of merchant prefix and descriptor must be 20 characters. The length of the merchant prefix can vary between 4-10 characters, and the length of descriptor from 10-16 characters. + + `qr_code` _optional_ + : `json object` Descriptor details for the QR code. This is to be passed only when `qr_code` is passed as the receiver `types`. [Know about the request parameters to be passed to create a QR code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes.md). + +`description` _optional_ +: `string` A brief description of the virtual account. + +`customer_id` _optional_ +: `string` Unique identifier of the customer to whom the virtual account must be tagged. Refer to the [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) documentation to learn how to create a customer. + +`notes` _optional_ +: `json object` Any custom notes you might want to add to the virtual account can be entered here. Refer to the [Notes section of the API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to know more. + +`close_by` _optional_ +: `integer` UNIX timestamp at which the virtual account is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + +> **INFO** +> +> **Note**: +Any request beyond `2147483647` UNIX timestamp will fail. + +> **INFO** +> +> +> **Handy Tips** +> +> While sharing the details of VAs (created using RBL bank) with the customers, ensure that the fifth character in the IFSC is number `0` and not the letter O. For example, valid IFSC is `RATN0VAAPIS` and not `RATNOVAAPIS`. +> + +## Fetch All Virtual Accounts + +Given below is the sample code for Fetch all Virtual Accounts API. Pass the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. + +/virtual_accounts + +```cURL: Curl +curl -u [CLIENT_ID]:[CLIENT_SECRET] \ +-X GET https://api.razorpay.com/v1/virtual_accounts \ +-H "X-Razorpay-Account: acc_Ef7ArAsdU5t0XL" \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[CLIENT_ID]", "[CLIENT_SECRET]"); + +JSONObject request = new JSONObject(); +headers.put("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); +instance.addHeaders(headers); + +List virtualAccountList = razorpayClient.VirtualAccounts.fetchAll(options); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->setHeader("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); + +$api->virtualAccount->all($options); + +```javascript: Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_KEY_SECRET", + headers: {"X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL"} +}); + +instance.virtualAccounts.all(options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') +Razorpay.headers = {"X-Razorpay-Account" => "acc_Ef7ArAsdU5t0XL"} + +options = {"count":1} + +Razorpay::VirtualAccount.all(options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("CLIENT_ID", "CLIENT_SECRET") + +extraHeaders:= map[string]string{ + "X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL", + } + +body, err := client.VirtualAccount.All(nil, extraHeaders) + +```json:Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "va_Di5gbNptcWV8fQ", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "closed", + "description": "Virtual Account created for M/S ABC Exports", + "amount_expected": 2300, + "notes": { + "material": "teakwood" + }, + "amount_paid": 239000, + "customer_id": "cust_DOMUFFiGdCaCUJ", + "receivers": [ + { + "id": "ba_Di5gbQsGn0QSz3", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "1112220061746877" + } + ], + "close_by": 1574427237, + "closed_at": 1574164078, + "created_at": 1574143517 + }, + { + "id": "va_Dho86Avmdw6h09", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Virtual Account created for Raftar Soft", + "amount_expected": null, + "notes": { + "material": "oakwood" + }, + "amount_paid": 0, + "customer_id": "cust_DOMUFFiGdCaDNK", + "receivers": [ + { + "id": "ba_Dho86DoV16LqiO", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "1112220046254840" + } + ], + "close_by": 1574427237, + "closed_at": null, + "created_at": 1574081690 + } + ] +} +``` + +### Related Information + +- [Smart Collect API documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md). diff --git a/llm-content/partners/aggregators/partner-auth/subscriptions.md b/llm-content/partners/aggregators/partner-auth/subscriptions.md new file mode 100644 index 00000000..86e55327 --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/subscriptions.md @@ -0,0 +1,310 @@ +--- +title: Partner Auth | Subscriptions +heading: Subscriptions +description: Integrate with Subscriptions API using partner auth. +--- + +# Subscriptions + +You can use Razorpay Subscriptions to set up and manage recurring payments. These recurring payments are payments that: + +- You can charge as per a billing model defined that you define. +- Do not require any intervention from the customer as the process is automated. + +You can automatically charge customers based on a billing cycle that you control. It allows you to easily create and manage Subscriptions and get instant alerts on payment activity as well as the status of Subscriptions. + +## Create a Subscription API + +Given below is the sample code for the Create a Subscription API. Pass the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. + +> **WARN** +> +> +> **Handy Tips** +> +> +> You should [create a plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/create-plan.md) before creating a subscription. +> +> + +/subscriptions + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/subscriptions \ +-u [CLIENT_ID]:[CLIENT_SECRET] \ +-H "Content-Type: application/json" \ +-H 'X-Razorpay-Account: acc_Ef7ArAsdU5t0XL' \ +-d '{ + "plan_id":"plan_00000000000001", + "total_count":6, + "quantity": 1, + "customer_notify": true, + "start_at":1773461489, + "expire_by":1773547889, + "addons":[ + { + "item":{ + "name":"Delivery charges", + "amount":30000, + "currency":"" + } + } + ], + "offer_id":"offer_JHD834hjbxzhd38d", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject subscriptionRequest = new JSONObject(); +headers.put("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); +instance.addHeaders(headers); +subscriptionRequest.put("plan_id", "plan_Ja4unjXZUeCT3g"); +subscriptionRequest.put("total_count", 6); +subscriptionRequest.put("quantity", 1); +subscriptionRequest.put("customer_notify", true); +subscriptionRequest.put("start_at", 1773461489); +subscriptionRequest.put("expire_by", 1773547889); +List addons = new ArrayList<>(); +JSONObject linesItem = new JSONObject(); +JSONObject item = new JSONObject(); +item.put("name","Delivery charges"); +item.put("amount",30000); +item.put("currency","INR"); +linesItem.put("item",item); +addons.add(linesItem); +subscriptionRequest.put("addons",addons); +subscriptionRequest.put("offer_id","offer_JHD834hjbxzhd38d"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +subscriptionRequest.put("notes", notes); + +Subscription order = instance.subscriptions.create(subscriptionRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->setHeader("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); + +$api->subscription->create(array('plan_id' => 'plan_7wAosPWtrkhqZw', 'customer_notify' => true,'quantity'=>5, 'total_count' => 6, 'start_at' => 1773461489, 'addons' => array(array('item' => array('name' => 'Delivery charges', 'amount' => 30000, 'currency' => 'INR'))),'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_KEY_SECRET", + headers: {"X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL"} +}); + +instance.subscriptions.create({ + plan_id: "plan_7wAosPWtrkhqZw", + customer_notify: true, + quantity: 5, + total_count: 6, + start_at: 1773461489, + addons: [ + { + item: { + name: "Delivery charges", + amount: 30000, + currency: "INR" + } + } + ], + notes: { + key1: "value3", + key2: "value2" + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') +Razorpay.headers = {"X-Razorpay-Account" => "acc_Ef7ArAsdU5t0XL"} + +para_attr = { + "plan_id": "plan_7wAosPWtrkhqZw", + "customer_notify": 1, + "quantity": 5, + "total_count": 6, + "start_at": 1773461489, + "addons": [ + { + "item": { + "name": "Delivery charges", + "amount": 30000, + "currency": "INR" + } + } + ], + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Subscription.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +extraHeaders:= map[string]string{ + "X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL", + } + +data := map[string]interface{}{ + "plan_id":"plan_JCPs6ZkAutbaCe", + "total_count":3, + "quantity": 1, + "customer_notify": true, + "start_at":1773461489, + "expire_by":1773547889, + "addons":[]interface{}{ + map[string]interface{}{ + "item":map[string]interface{}{ + "name":"Delivery charges", + "amount":3000, + "currency":"INR", + }, + }, + }, + "notes":map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Subscription.Create(data, extraHeaders) +```json: Response +{ + "id": "sub_00000000000001", + "entity": "subscription", + "plan_id": "plan_00000000000001", + "customer_email": null, + "status": "created", + "current_start": null, + "current_end": null, + "ended_at": null, + "quantity": 1, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "charge_at": 1773461489, + "start_at": 1773461489, + "end_at": 1776450600, + "auth_attempts": 0, + "total_count": 6, + "paid_count": 0, + "customer_notify": true, + "created_at": 1773394958, + "expire_by": 1773547889, + "short_url": "https://rzp.io/rzp/Dqdqx3h", + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "remaining_count": 6 +} +``` + +## Fetch All Subscriptions API + +Given below is the sample code for Fetch all Subscriptions API. Pass the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. + +```curl: Curl +curl -u [CLIENT_ID]:[CLIENT_SECRET] \ +-X POST https://api.razorpay.com/v1/subscriptions/sub_00000000000001 \ +-H "Content-Type: application/json" \ +-H "X-Razorpay-Account: acc_Ef7ArAsdU5t0XL" \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +headers.put("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); +instance.addHeaders(headers); +params.put("count","1"); + +List subscriptions = instance.subscriptions.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->setHeader("X-Razorpay-Account","acc_Ef7ArAsdU5t0XL"); + +$api->subscription->all($options); +```js: Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_KEY_SECRET", + headers: {"X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL"} +}); + +instance.subscriptions.all(options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('key_id', 'key_secret') +Razorpay.headers = {"X-Razorpay-Account" => "acc_Ef7ArAsdU5t0XL"} + +options = {"count": 1} + +Razorpay::Subscription.all(options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("CLIENT_ID", "CLIENT_SECRET") + +extraHeaders:= map[string]string{ + "X-Razorpay-Account": "acc_Ef7ArAsdU5t0XL", + } + +options := map[string]interface{} + +body, err := client.Subscription.All(options, extraHeaders) + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "sub_00000000000001", + "entity": "subscription", + "plan_id": "plan_00000000000001", + "customer_id": "cust_D00000000000001", + "status": "active", + "current_start": 1577355871, + "current_end": 1582655400, + "ended_at": null, + "quantity": 1, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "charge_at": 1577385991, + "offer_id": "offer_JHD834hjbxzhd38d", + "start_at": 1577385991, + "end_at": 1603737000, + "auth_attempts": 0, + "total_count": 6, + "paid_count": 1, + "customer_notify": true, + "created_at": 1577356081, + "expire_by": 1577485991, + "short_url": "https://rzp.io/i/z3b1R61A9", + "has_scheduled_changes": false, + "change_scheduled_at": null, + "remaining_count": 5 + } + ] +} +``` + +### Related Information + +- [Subscriptions API documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md). diff --git a/llm-content/partners/aggregators/partner-auth/token-sharing.md b/llm-content/partners/aggregators/partner-auth/token-sharing.md new file mode 100644 index 00000000..d5b2b4a0 --- /dev/null +++ b/llm-content/partners/aggregators/partner-auth/token-sharing.md @@ -0,0 +1,979 @@ +--- +title: Token Sharing for Partner Auth Model +description: Provide a superior card payments experience to customers using the Token Sharing feature available under Partner Auth model. +--- + +# Token Sharing for Partner Auth Model + +According to new [Card-on-File tokenisation guidelines from RBI](https://razorpay.com/blog/card-on-file-tokenisation-all-you-need-to-know/), businesses cannot save their customer's card credentials (card number and other card data) on their own servers. + +Razorpay has introduced an end-to-end RBI-compliant solution, [TokenHQ](https://razorpay.com/card-tokenisation/), that allows you to save customer credentials **as tokens** with card networks and card-issuing banks. Customers can then make repeat purchases on your website without re-entering card details. + +## Token Sharing in Partnership Model + +- If you are a single legal entity with multiple businesses, you can get onboarded as a Razorpay partner. For example, consider Acme Corp as a legal entity which runs the businesses Acme Groceries, Acme Fashions and Acme Beauty. All these businesses will have unique Razorpay merchant identifiers (MIDs). + +- Currently, if a customer makes an online purchase from Acme Groceries, they would need to enter their card details. If they want to purchase form Acme Fashions, the customer will have to re-enter their card details, though both Acme Groceries and Acme Fashions belong to the same main entity, Acme Corp. + +- With Razorpay's **Token Sharing** feature, while each business under your entity will have a unique MID to accept payments, tokens issued under any one MID will be automatically shared across all MIDs under that entity. + +- This means that if a customer has made a card payment to Acme Beauty, they need not enter their card details to make a payment at Acme Fashions or Acme Groceries. By saving the customer's card details as a token, you can provide them a smooth payment experience on subsequent transactions. + +> **INFO** +> +> +> **Handy Tips** +> +> - Token sharing is only possible if you have multiple lines of businesses under the same legal entity. For example, ABC corp can be operating through 3 business lines under the one legal entity of ABC corp. Then, ABC corp can share a token and use it for processing payments for any of its MIDs with Razorpay. +> - Token Sharing between MIDs will not work if you wish to use another PA/PG as the token requestor. +> + +> **INFO** +> +> +> **Feature Enablement** +> +> This is an on-demand feature that is available only to businesses that operate through multiple lines of businesses under a single legal entity. [Get in touch](https://razorpay.com/support) with us to get this feature enabled on your account. +> + +## Partner Auth + +You need to create tokens and accept payments from customers as a parent merchant on behalf of your sub-merchants. Razorpay TokenHQ helps you create, manage and use tokens for sub-merchants' payments. + +### Token Sharing Structure + +![Token Sharing Model](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-token-sharing.jpg.md) + +### Token Lifecycle + +A token goes through various states in its lifecycle. + +> **INFO** +> +> +> **Handy Tips** +> +> - Status will be available for the service provider token and the overall token entity. +> - The status of overall token entity is derived from the individual service provider tokens. +> - You may choose to consume the status of either the overall token entity or the individual service provider token, based on your integration. +> + +Given below is a diagram representing the token lifecycle: + +![Token Lifecycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-token-hq-token-lifecycle.jpg.md) + +#### Overall Token States + + +### Token statuses + +Status | Description +--- +`initiated` | This is the token's primary state. This status indicates that Razorpay is working with token service providers to create the token. It may take a few seconds for the token to move to the active state. +--- +`active` | The token reaches the active state when the token is successfully created and activated by a token service provider, that is, card networks. A token in active status can be used for payment processing. +--- +`suspended` | The status changes to suspended when the token is suspended temporarily by the card issuing bank or network. A suspended token may become active later. A suspended token cannot be used for payment processing. +--- +`failed` | The token status changes to failed when Razorpay fails to create the token with the token service providers due to: - The card not being eligible. +- The issue not being supported. +- An invalid card number. + +--- +`deactivated` | Status will be deactivated when:- The token has expired. +- The token is deactivated by the bank. + + A deactivated token cannot become active again, and cannot be used for payment processing. + + + +## Business as the Token Requestor APIs + +In this flow, you are onboarded with card networks and Issuers as token requestors as well as a merchant. This requires PCI compliance. + +### Create Token on Behalf of a Sub-Merchant + +Use this API to create a token using customer card details, on behalf of a sub-merchant. + +/tokens + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/tokens +-H "content-type: application/json" +-d'{ + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "number": "4386289407660153", + "cvv": "123", + "expiry_month": "12", + "expiry_year": "21", + "name": "Gaurav Kumar" + }, + "authentication": { + "provider": "razorpay", + "provider_reference_id": "pay_123wkejnsakd", + "authentication_reference_number": "100222021120200000000742753928" + }, + "notes": [] +}' +```json: Response +{ + "id": "token_IJmat4GwYATMtx", + "entity": "token", + "method": "card", + "card": { + "last4": "0153", + "network": "Visa", + "type": "credit", + "issuer": "IDFB", + "international": false, + "emi": false, + "sub_type": "consumer" + }, + "customer": { + "id": "cust_1Aa00000000001", + "entity": "customer", + "name": "Bob", + "email": "bob@gmail.com", + "contact": "9000090000", + "gstin": null, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1658390470 + }, + "expired_at": 1701368999, + "customer_id": "cust_1Aa00000000001", + "compliant_with_tokenisation_guidelines": true, + "status": "active", + "notes": [] +} +``` + +#### Request Parameters + +`customer_id` _optional_ +: `string` The unique identifier of the customer created using [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md). + +`method` _mandatory_ +: `string` The type of object that needs to be tokenised. Currently, `card` is the only supported value. + +`card` _mandatory_ +: `object` The card details. + + `number` + : `string` The card number. If the card number has spaces, it will be trimmed by Razorpay for further processing. + + `cvv` + : `string` The card CVV. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `expiry_month` + : `string` The card expiry month in `mm` format. + + `expiry_year` + : `string` The card expiry year in `yy` or `yyyy` format. + + `name` + : `string` The cardholder's name. + +`authentication` +: `object` Token authentication details. + + `provider` + : `string` The platform through which authentication was processed. Possible values: + - `amex` + - `axis_migs` + - `cashfree` + - `ccavenue` + - `cybersource` + - `first_data` + - `fss` + - `hdfc` + - `mpgs` + - `paysecure` + - `paytm` + - `payu` + - `zakpay` + + `provider_reference_id` + : `string` The unique payment identifier of the payment used to collect AFA on any PA/PG. + + `authentication_reference_number` _conditional_ + : `string` A unique reference number generated when authentication is initiated. The maximum length supported is 26 characters. This field is mandatory for RuPay cards only after June 30, 2022. + +> **WARN** +> +> +> **Watch Out!** +> +> For tokenising RuPay cards, you will need to provide the authRefNo provided by NPCI during the payment where AFA was collected from card_holder for tokenising the card. The validity of authRefNo is up to a few minutes. +> + +### Initiate Payment on Behalf of a Sub-Merchant + +Use this API to initiate payment on behalf of a sub-merchant. + +/payments/create/json + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "order_id": "order_Fg6IGePNMKDICF", + "contact": "9090909090", + "method": "card", + "token": "token_IJr7WSRFECVBSX", + "customer_id": "cust_K3ZhflPARDyCf3", + "card": { + "cvv": "" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + }, + "account_id": "acc_Ef7ArAsdU5t0XM" +}' +```json: Response +{ + "razorpay_payment_id": "pay_IFCxyfBO08Lmb4", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/IFCxyfBO08Lmb4/authenticate" + } + ] +} +``` + +#### Request Parameters + +`key_id` _mandatory_ +: `string` API Key ID that must generated from Dashboard. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is ₹100, enter `10000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`order_id` _mandatory_ +: `string` Order ID generated via [Razorpay Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`email` _mandatory_ +: `string` Email address of the customer. + +`contact` _mandatory_ +: `string` Phone number of the customer. + +`method` _mandatory_ +: `string` Name of the payment method. Possible values are: + - `card` (default) + - `netbanking` (default) + - `wallet` (default) + - `emi` (default) + - `upi` (default) + - `bank_transfer` (requires [approval](https://razorpay.com/support/#request) and [integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md)) + - `cardless_emi` (requires [approval](https://razorpay.com/support/#request) and [integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md)) + - `paylater` (requires [approval](https://razorpay.com/support/#request) and [integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)) + - `emandate` (requires [approval](https://razorpay.com/support/#request) and integration) + +`card` +: The details of the card that should be entered while making the payment. + + `number` _mandatory if method=card/emi_ + : `integer` Unformatted card number. + + `name` _mandatory if method=card/emi_ + : `string` The name of the cardholder. + + `expiry_month` _mandatory if method=card/emi_ + : `integer` Expiry month for card in MM format. + + `expiry_year` _mandatory if method=card/emi_ + : `integer` Expiry year for card in YY format. + + `cvv` _mandatory if method=card/emi_ + : `integer` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `emi_duration` _mandatory if method=card/emi_ + : `integer` Defines the number of months in the EMI plan. + +`bank` _mandatory if method=netbanking_ +: `string` Bank code. List of available banks enabled for your account can be fetched via [**methods**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md#step-3-fetch-payment-methods). + +`bank_account` _mandatory if method=emandate_ +: The details of the bank account that should be passed in the request. Required if the `method` is `emandate`. + + `account_number` _mandatory if method=emandate_ + : `string` Bank account number used to initiate the payment. + + `ifsc` _mandatory if method=emandate_ + : `string` IFSC of the bank used to initiate the payment. + + `name` _mandatory if method=emandate_ + : `string` Name associated with the bank account used to initiate the payment. + +`vpa` _mandatory if method=upi_ +: `string` UPI ID of the customer. Required if the method is `upi`. + +`wallet` _mandatory if method=wallet_ +: `string` Wallet code for the wallet used for the payment. Possible values: + - `payzapp` (default) + - `olamoney` (requires [approval](https://razorpay.com/support/#request)) + - `phonepe` (requires [approval](https://razorpay.com/support/#request)) + - `airtelmoney` (requires [approval](https://razorpay.com/support/#request)) + - `mobikwik` (requires [approval](https://razorpay.com/support/#request)) + - `jiomoney` (requires [approval](https://razorpay.com/support/#request)) + - `amazonpay` (requires [approval](https://razorpay.com/support/#request) and [integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/amazon-pay.md)) + - `paypal` (requires [approval](https://razorpay.com/support/#request). [Learn more](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paypal.md)) + - `phonepeswitch` (requires [approval](https://razorpay.com/support/#request) and [integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md)) + +`provider` _mandatory if method=cardless_emi_ +: `string` Name of the cardless EMI provider partnered with Razorpay. Required if `method` is `cardless_emi`. Available options are: + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `zestmoney` + - `earlysalary` + - `walnut369` + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`ip` _optional_ +: `string` Customer IP Address. + +`referrer` _optional_ +: `string` Customer referrer. + +`user_agent` _optional_ +: `string` Customer user-agent. + +### Delete a Token + +Use this API to delete a token. + +/tokens/delete + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X https://api.razorpay.com/v1/tokens/delete +-H "content-type: application/json" +-d '{ + "id" : "token_4lsdksD31GaZ09" +}' +```json: Response +[] +``` + +#### Request Parameter + +`id` _mandatory_ +: `string` The unique identifier of the token to be deleted. + +> **WARN** +> +> +> **Watch Out!** +> +> Token deletion applies at a global level. That is, once you delete a token, you cannot use the token any longer under any of the MIDs. +> + +### Fetch Card Properties of an Existing Token + +Use this API to fetch the card properties of an existing token. + +/tokens/fetch + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/tokens/fetch +-H "content-type: application/json" +-d'{ + "id": "token_4lsdksD31GaZ09" +}' +```json: Response +{ + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "customer": { + "id": "cust_1Aa00000000001", + "entity": "customer", + "name": "Bob", + "email": "bob@gmail.com", + "contact": "9000090000", + "gstin": null, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1658390470 + }, + "customer_id": "cust_1Aa00000000001", + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "active", + "status_reason": null, + "notes": [] +} +``` + +#### Request Parameter + +`id` _mandatory_ +: `string` The unique identifier of the token whose details are to be fetched. + +## Razorpay as the Token Requestor APIs + +In this flow, you will be onboarded with card networks and Issuers as a merchant with Razorpay as the token requestor. You need not be PCI compliant for this solution. + +### Create Token During Payment on Behalf of a Sub-Merchant + +You can create the token when your customer opts to save their card on your checkout during the first payment. As per RBI guidelines, you must collect customer consent to save their card. + +Use the following API to save the customer card details and create a token. +- Pass an additional field save=true to save and tokenise the card. +- Pass the account_id of the sub-merchant in the payment request. + +```curl: Request +curl -u [CLIENT_ID]:[CLIENT_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "card": { + "number": "4854980604708430", + "cvv": "123", + "expiry_month": "12", + "expiry_year": "21", + "name": "Gaurav Kumar" + }, + "save": true, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + }, + "account_id": "acc_Ef7ArAsdU5t0XM" +}' +```json: Response +{ + { + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/FVmAstJWfsD3SO/authenticate" + } + ] +} +``` + +#### Request Parameters + +Same as the request parameters for [this API](#initiate-payment-on-behalf-of-a-sub-merchant). + +### Initiate Payment Using Saved Token + +Use this API to create a payment using an existing token. + +/payments/create/json + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "token": "token_4lsdksD31GaZ09", + "customer_id": "cust_1Aa00000000001", + "card": { + "cvv": "123" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + }, + "account_id": "acc_Ef7ArAsdU5t0XM" +}' +```json: Response +{ + { + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/FVmAstJWfsD3SO/authenticate" + } +] +} +``` + +#### Request Parameters + +`token` _mandatory_ +: `string` Pass the unique token id created when the customer made the first payment. + +`account_id` _mandatory_ +: `string` Pass the sub-merchant's unique identifier. + +### Delete a Token + +Use this API to delete a token. + +/tokens/delete + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X https://api.razorpay.com/v1/tokens/delete +-H "content-type: application/json" +-d '{ + "id" : "token_4lsdksD31GaZ09" +}' +```json:Response +[] +``` + +#### Request Parameter + +`token` _mandatory_ +: `string` Pass the unique identifier of the token to be deleted. + +### Fetch Card Properties of an Existing Token + +Use this API to fetch the card properties of an existing token. + +/tokens/fetch + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/tokens/fetch +-H "content-type: application/json" +-d'{ + "id": "token_4lsdksD31GaZ09" +}' +```json: Response +{ + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "customer": { + "id": "cust_1Aa00000000001", + "entity": "customer", + "name": "Bob", + "email": "bob@gmail.com", + "contact": "9000090000", + "gstin": null, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1658390470 + }, + "customer_id": "cust_1Aa00000000001", + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "active", + "status_reason": null, + "notes": [] +} +``` + +#### Request Parameter + +`token` _mandatory_ +: `string` Pass the unique identifier of the token whose details are to be fetched. + +## Webhooks + +Use Razorpay Webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. + +The table below lists the webhook events available for tokens. + +Event | Description +--- +`token.initiated` | Triggered when the tokenisation request is initiated. +--- +`token.activated` | Triggered when: - The token status is changed to active for the first time. +- The token status for a previously suspended token is changed to active again. + +--- +`token.suspended` | Triggered when the issuing bank temporarily suspends a token. +--- +`token.deactivated` | Triggered when the token is permanently deactivated. +--- +`token.expiry_updated` | Triggered when the issuing bank updates the expiry date for a token. + +### token.initiated + +```json: Initiated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.initiated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "initiated", + "notes": [] + } + } + } +} +``` + +### token.activated + +```json: Activated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.activated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "active", + "notes": [] + } + } + } +} +``` + +#### Sample Payload for token.activated as part of payment + +```json: Token activated as part of payment +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.activated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "active", + "notes": [] + } + }, + "payment": { + "entity": { + "id": "pay_FPoJKWQQ8lK13n", + "entity": "payment", + "amount": 500000, + "currency": "INR", + "base_amount": 500000, + "status": "captured", + "order_id": "order_FPoIeimWki9j8A", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 190000, + "amount_transferred": 0, + "refund_status": "partial", + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 11800, + "tax": 1800, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "4827433" + }, + "created_at": 1597226379 + } + } + } +} +``` + +### token.suspended + +```json: Suspended +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.suspended", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "suspended", + "notes": [] + } + } + } +} +``` + +### token.deactivated + +```json: Deactivated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.deactivated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "deactivated", + "notes": [] + } + } + } +} +``` + +### token.expiry_updated + +```json: Expiry updated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.expiry_updated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "active", + "notes": [] + } + } + } +} +``` + +### Other Token APIs +- [Token IIN API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/iin-validation.md) +- [PAR API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/cards/fingerprints.md) +- [Fetch Card IIN Information API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/cards/iin-api.md) + +## FAQs + + +### 1. Do I have to be PCI compliant for Token Sharing? + + Not necessarily. If you wish to be the token requestor (to create and store tokens), then yes, you will require PCI compliance. If Razorpay is the token requestor, compliance is not required. + + + +### 2. Can I use Token Sharing while using another PA/PG as a token requestor? + + No, tokens cannot be shared within MIDs with another PA/PG as the token requestor. + + + +### 3. Can I use Token Sharing while using another PA/PG as a payment processor? + + No, token creation and payment initiation has to be with Razorpay. + + + +### 4. Is this feature enabled automatically for me if I am a Razorpay partner? + + No, this feature will be enabled only upon request and is subject to the following conditions: + - You are a Razorpay partner under the Partner Auth model. + - You are a single legal entity that operates with multiple sub-merchants with unique Razorapy MIDs. + + + +### 5. How can I get this feature enabled for my MIDs? + + Get in [touch with us](https://razorpay.com/support) to get this feature enabled on your account. + + + +### 6. Can I migrate to the partnership model without any changes to my existing tokens across my MIDs? + + Yes, you can migrate to the partnership model without any integration effort. We would recommend that you get in touch with your sales POC to assist you with the token migration process. diff --git a/llm-content/partners/aggregators/testing.md b/llm-content/partners/aggregators/testing.md new file mode 100644 index 00000000..d59ff233 --- /dev/null +++ b/llm-content/partners/aggregators/testing.md @@ -0,0 +1,28 @@ +--- +title: Testing Operations +description: Create or manage transactions on behalf of your sub-merchant as an Aggregator (Razorpay Partnership). +--- + +# Testing Operations + +As a Razorpay Partner you can create or manage transactions on behalf of your sub-merchant in two modes: **Test** and **Live**. + +## Test + +The test mode is used for testing purposes and involves no actual money transactions. + +## Live + +After you test the flow of funds end-to-end in test mode, you can take your integration live. Once you are confident that the integration is working fine, you can switch to the live mode and start creating and managing transactions on behalf of the sub-merchant. + +You should use the live keys in the **Live** mode. You can find the live keys in **Account & Settings**. + +![aggregator settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-aggregators-aggregator-settings.jpg.md) + +Once you use the live keys, you can manage real money transactions on behalf of your sub-merchant. For example, if you make an API call to fetch payments using the live credentials, it would return sub-merchant’s live mode payment details. + +### Related Information + +- [About Aggregators](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators.md) +- [Add Sub-merchants](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/add-submerchants.md) +- [Checkout and API Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/partner-auth.md) diff --git a/llm-content/partners/aggregators/xpress-onboarding.md b/llm-content/partners/aggregators/xpress-onboarding.md new file mode 100644 index 00000000..27d06ed2 --- /dev/null +++ b/llm-content/partners/aggregators/xpress-onboarding.md @@ -0,0 +1,270 @@ +--- +title: Xpress Onboarding +description: Enable sub-merchants to start accepting payments faster with minimal KYC. +--- + +# Xpress Onboarding + +Xpress onboarding allows partners to quickly onboard sub-merchants to accept payments on Razorpay with minimal KYC. + +## How it Works + +Razorpay partially activates the account after verifying the KYC submitted. + +- The sub-merchant needs to submit the following minimum KYC details along with the other business details : + + + Business Type | Minimal KYC Details + --- + Individuals | - Personal PAN +- Bank Account Details (IFSC Code, A/C No., Beneficiary Name) + + --- + Proprietorship | - Personal PAN +- Bank Account Details (IFSC Code, A/C No., Beneficiary Name) +- Business PAN (Optional) + + --- + Other Registered Business | - Personal PAN +- Bank Account Details (IFSC Code, A/C No., Beneficiary Name) +- Business PAN +- Signatory PAN + + + +- Razorpay verifies the KYC details and partially activates the sub-merchant account. The account moves to `activated_kyc_pending` state. The sub-merchant can start accepting payments up to GMV (Gross Merchandise Value) limit of ₹50,000 (or ₹5,00,000 if GST verified) using Payment Links and QR Codes. + +- The sub-merchant can submit the rest of the KYC documents while the account is in `activated_kyc_pending` state. + +- Razorpay team reviews the submitted details. Based on the evaluation, the account can move to either of these states: + - `needs_clarification` and `under_review`: Your sub-merchant can accept payments and receive settlements, upto the GMV limit. If limits are breached, the payments and settlements are put on hold. + + - `activated`: If account is successfully activated, the breach limits are removed for payments and settlements. + + - `suspended`: Payments and settlements are put on hold. Please reach out to [Razorpay support](https://razorpay.com/support/) for the next steps. + +> **WARN** +> +> +> **Watch Out!** +> +> - If the documents are not submitted and the limit is breached, the account moves to `needs_clarification` state, with the requirements array showing the documents that need to be submitted. The settlements and payments are put on hold. +> - In some scenarios, the sub-merchant's account is not partially activated. The sub-merchant should submit all the other KYC documents and go through the standard onboarding flow: +> - **Duplicate Primary Details**: If the sub-merchant's primary details, such as phone number, PAN (business PAN or company PAN) already exist in the system, Razorpay provides one retry to update the field value and changes the status to `needs_clarification`. +- **Verification Failure**: Given below are two types of verification failure situations: If the PAN or Bank Account verification fails, the account moves to `needs_clarification` state. The sub-merchant cannot proceed with Xpress Onboarding. Razorpay provides one retry to update the field value before the merchant is moved to the standard onboarding flow. + - If the GSTIN exists for a sub-merchant and the verification fails, then the status changes to `needs_clarification`. + +> + +Given below is a diagram which explains the different states the account moves to during its lifecycle: + +![Account States in Xpress Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-xpress-onboarding-flow.jpg.md) + +### Example + +ABC Inc. is an ERP software company, that wants to onboard their customer Acme Corp (an ecommerce business that sells books) as a sub-merchant to accept payments. ABC Inc. should sign up as a Razorpay partner and then use our onboarding APIs to create Acme Corp's sub-merchant account by providing the relevant details and documents. + +Our team will review the submitted details and change the account state as applicable. + +## Prerequisites + +1. [Sign up as Partner](https://razorpay.com/partners/) and complete KYC to activate your account. +2. Generate `client_id` and `client_secret` to authenticate APIs calls for both test mode or live mode. + +Watch this video to see how to generate the API keys. + +[Video: https://www.youtube.com/embed/AwooCt4ezQ4] + +## Workflow + +Given below is a diagram that illustrates the various steps in the workflow. The document requirements are visible in the array. + +![Xpress Onboarding Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-aggregators-xpress-onboarding-flow.png.md) + +> **WARN** +> +> +> **Watch Out!** +> +> - Currently, we do not support making concurrent requests to the following Onboarding APIs including their combination on the same `account_id`: +> - [Update Account API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/update.md) +> - [Update Stakeholder API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/update.md) +> - [Update Product Configuration API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration-xpress-onboarding.md#update-a-product-configuration) +> +> Please wait for the response of these APIs before making subsequent requests. +> + +### 1. Create an Account + +Create an account for the sub-merchant using the [Create an Account API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/create.md) by passing the `no_doc_onboarding=true` parameter. This triggers the Xpress Onboarding flow. + + +### Available Account APIs + +API | Description +--- +[Create an account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/create.md) | API to create a sub-merchant account. +--- +[Fetch an account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/fetch.md) | API to view sub-merchant account details. +--- +[Update an account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/update.md) | API to update the sub-merchant account details. +--- +[Delete an account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/delete.md) | API to delete a sub-merchant account. + + + +### 2. Create a Stakeholder + +Use the [Create a Stakeholder API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/create.md) to add a stakeholder for an account. Each stakeholder needs to update the KYC. + + +### Available Stakeholder APIs + +API | Description +--- +[Create a stakeholder](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/create.md) | API to create a stakeholder. +--- +[Fetch a stakeholder ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/fetch-with-id.md) | API to retrieve and view the stakeholder account details. +--- +[Fetch all stakeholders ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/fetch-all.md) | API to retrieve all stakeholders for a given account. +--- +[Update a Stakeholder](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/update.md) | API to update the stakeholder account details. + + + +### 3. View and Accept Terms and Conditions + +Before activating the sub-merchant and requesting for relevant product configurations, the sub-merchant needs to view and accept the Terms and Conditions. You can fetch these Terms and Conditions links using the [Fetch Terms and Conditions API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/terms-conditions/fetch.md) to share them with the sub-merchant. + +You can also accept Terms and Conditions for the sub-merchant using the [Request a Product Configuration API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration-xpress-onboarding.md#request-a-product-configuration). + + +### Available Terms and Conditions APIs + +API | Description +--- +[Accept Terms and Conditions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration-xpress-onboarding.md#request-a-product-configuration) | API to accept terms and conditions. +--- +[Fetch Terms and Conditions ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/terms-conditions/fetch.md) | API to retrieve terms and conditions. + + + +### 4. Configure Products to Accept Payments + +You can use the [Product Configuration APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration-xpress-onboarding.md) to configure and activate Razorpay products for a sub-merchant account according to their requirements. + + +### Available Product Configuration APIs + +API | Description +--- +[Request a Product Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration-xpress-onboarding.md#request-a-product-configuration) | API to request a product configuration. +--- +[Update a product configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration-xpress-onboarding.md#update-a-product-configuration) | API to update a configured product. +--- +[Fetch a Product](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration-xpress-onboarding.md#fetch-a-product) | API to fetch a configured product. + + + +### 5. Upload Supporting Documents + +You can submit the required documents for sub-merchant onboarding using the [Documents APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/upload-document.md) listed in the table below. + + +### Available Documents APIs + +API | Description +--- +[Upload account documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/upload-document/upload-account-documents.md) | API to upload sub-merchant's business documents. +--- +[Upload stakeholder documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/upload-document/upload-stakeholder-documents.md) | API to upload stakeholder's signatory documents. +--- +[Fetch account documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/upload-document/fetch-account-documents.md) | API to fetch account documents. +--- +[Fetch stakeholder documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/upload-document/fetch-stakeholder-documents.md) | API to fetch stakeholder documents. + + + +### 6. Subscribe to Webhooks + +Subscribe to relevant webhook events to receive notifications (in the form of a webhook payload) when these events occur. + +There are 2 types of events: + +- **Transaction Events**: These are events related to payment transactions performed by the sub-merchants. You can configure these events at a sub-merchant level. View [webhook events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/webhooks.md#transaction-events) and [payload details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + +- **Sub-Merchant Onboarding Events**: These events are related to the onboarding status of the sub-merchant. You should configure these at your end. Subscribing to these events will enable you to get the onboarding status of all sub-merchants. + + +### Available Webhook Events and Descriptions + + + Event Name | Description + --- + product.payment_link.under_review | Triggered when the status for a Payment Link product is `under_review`. + --- + product.payment_link.needs_clarification | Triggered when the status for a Payment Link product is `needs_clarification`. + --- + product.payment_link.activated | Triggered when the status for a Payment Link product is `activated`. + --- + product.payment_link.rejected | Triggered when the status for a Payment Link product is `rejected`. + + + View [payload details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners.md#onboarded-using-apis). + + +Watch this video to see how you can subscribe to Partner Webhooks. + +[Video content] + + +### To subscribe to webhook events: + + 1. Log in to the Dashboard. + 2. Navigate to **Partner's Dashboard** → **Settings** → **Webhooks** to subscribe to any of the events mentioned in the following section. + 3. Click **Manage**. + 4. In the **Webhook Setup** pop-up page: + 1. Enter the **URL** where you want to receive the webhook payload when an event is triggered. We recommended using an HTTPS URL. + 1. Enter a **Secret** for the webhook endpoint. The secret is used to validate that the webhook is from Razorpay. + 1. In the **Alert Email** field, enter the email address to which the notifications should be sent in case of webhook failure. + 1. Select the required events from the list of **Active Events**. + 5. Click **Create Webhook**. + + +### Alerts + +Razorpay sends alerts once the sub-merchant GMV is breached. The first webhook event will be triggered when 90% of the GMV is breached. After that, at an increment of 1% a webhook event will be triggered. + +Given below is the event name and description: + +Event Name | Description +--- +account.no_doc_onboarding_gmv_limit_warning | Triggered when the sub-merchant breaches the GMV. + +```json: Sample Payload +{ + "acc_id": "xxxx", + "gmv_limit": "500000", + "current_gmv": "xxxx", + "message": "You can accept payments upto INR X (remaining GMV limit). In order to remove this limit, kindly submit the KYC documents." +} +``` + +### Webhooks APIs + +You can use the [Webhooks APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/webhooks.md) to receive event notifications or subscribe to events happening in a sub-merchant's account, such as payments, orders, invoices and so on. + + +### Available Webhooks APIs + +API | Description +--- +[Create a Webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/webhooks/create.md) | API to create a webhook. +--- +[Fetch a Webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/webhooks/fetch-with-id.md) | API to retrieve and view the webhook details. +--- +[Fetch all Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/webhooks/fetch-all.md) | API to retrieve all webhooks. +--- +[Update a Webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/webhooks/update.md) | API to update the webhook details. +--- +[Delete a Webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/webhooks/delete.md) | API to delete a webhook. diff --git a/llm-content/partners/apis.md b/llm-content/partners/apis.md new file mode 100644 index 00000000..a724c0c1 --- /dev/null +++ b/llm-content/partners/apis.md @@ -0,0 +1,65 @@ +--- +title: Razorpay Partners APIs +heading: About Partners APIs +description: List of APIs available to onboard sub-merchants/businesses to your platform. +--- + +# About Partners APIs + +You can use our APIs to onboard businesses (sub-merchants) to your platform. + +## List of Account APIs + +The table below lists the various APIs and gives a brief description of each API: + +API | Description +--- +[Create an Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/create.md) | Creates a new sub-merchant account. +--- +[Fetch an Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/fetch.md) | Retrieves an existing Account. +--- +[Update an Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/update.md) | Updates an existing account. +--- +[Delete an Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/delete.md) | Deletes the account. + +## List of Product Configuration APIs + +The table below lists the various APIs and gives a brief description of each API: + +API | Description +--- +[Request a Product Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/request.md) | Requests a product configuration for Payment Gateway or Payment Links. +--- +[Fetch a Product Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/fetch.md) | Retrieves the details of a product for a given sub-merchant's account. +--- +[Update Settlement Account Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/update-settlement-account-details.md) | Updates a product's configuration. +--- +[Request Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/update-request-payment-methods.md) | Updates a product's configuration and request payment methods like UPI, netbanking and card. + +## List of Stakeholder APIs + +The table below lists the various APIs and gives a brief description of each API: + +API | Description +--- +[Create a Stakeholder](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/create.md) | Creates a stakeholder. +--- +[Fetch a Stakeholder With ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/fetch-with-id.md) | Retrieves the details of a stakeholder. +--- +[Fetch All Stakeholders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/fetch-all.md) | Retrieves the details of all stakeholders for a given account. +--- +[Update a Stakeholder](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/update.md) | Updates the details of a stakeholder. + +## List of Document APIs + +The table below lists the various APIs and gives a brief description of each API: + +API | Description +--- +[Upload Account Documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/upload-document/upload-account-documents.md) | Uploads business documents for a sub-merchant's account. +--- +[Upload Stakeholder Documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/upload-document/upload-stakeholder-documents.md) | Uploads signatory documents for a stakeholder. +--- +[Fetch Account Documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/upload-document/fetch-account-documents.md) | Retrieves the documents uploaded for an account. +--- +[Fetch Stakeholder Documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/upload-document/fetch-stakeholder-documents.md) | Retrieves the documents uploaded for a stakeholder. diff --git a/llm-content/partners/capital.md b/llm-content/partners/capital.md new file mode 100644 index 00000000..eeb9fec3 --- /dev/null +++ b/llm-content/partners/capital.md @@ -0,0 +1,247 @@ +--- +title: Capital Partnership +description: Become a Razorpay Capital Partner. Refer Line of Credit to businesses via Razorpay Dashboard upload or referral links, track application status and earn rewards. +--- + +# Capital Partnership + +[Razorpay Capital](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) is a lending platform enabling businesses to meet their cash flow challenges. With the Partnership program for Capital, you can refer businesses to Razorpay [Line of Credit](https://razorpay.com/x/line-of-credit/) and earn lucrative rewards when your leads use the product. + +> **SUCCESS** +> +> +> **Available Now** +> +> At the moment, you can only refer the [Line of Credit](https://razorpay.com/x/line-of-credit/) product to your customer base. +> + +## How it Works + +Watch this video to see how you can refer leads to Razorpay Capital. + +[Video: https://www.youtube.com/embed/6xj9HxlM7Y8] + +1. Sign up or log in to your Dashboard. + - [New to Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/new-to-razorpay.md). + - [Existing Razorpay Merchant](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/existing-merchant.md#become-a-razorpay-partner). +2. Enable the Capital Dashboard. +3. Refer leads for Line of Credit using [Referral links](#refer-businesses-via-referral-link) or [Dashboard bulk upload](#refer-businesses-via-dashboard-upload). + +## Partner Eligibility + +An ideal profile for the Razorpay Capital business is: + + +### Direct Sales Agent + + If you are a direct sales agent having experience in reselling banking products such as corporate cards or business loans, you are a suitable partner for Capital Partnership. + + + +### B2B Business + + If you are a B2B business owner looking to provide credit access to your customers, consider Partnerships for Capital. This additional credit will improve the purchasing power of your customers and increase your revenue. + + + +### Professional Services Provider + + If you are a Professional Services Provider who provides services such as chartered accounting and company incorporation services, you should consider partnership with Razorpay Capital. Your customer base could be interested in lending products like corporate cards to manage their professional expenses, or may be looking for a flexible loan and repayment option. + + +## Become a Partner for Capital + +The Razorpay Capital Partner program is a closed group program with an invite-only access. You can apply to become a Partner for Capital by following these steps: + +1. Fill the [interest for Capital Partnerships](https://form.typeform.com/to/s6XX4Uxx) form to communicate your interest in the program. One of our associates will get in touch with you. +1. Once picked as a [suitable profile](#partner-eligibility), you receive a mail from Razorpay with an exclusive invite link. +1. Open the link and [sign up for the Partner Program](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners.md#next-steps). +1. After signing up, share your merchant ID (MID) with the sales associate. Your merchant ID is available at the top-right corner of the screen on your Dashboard. + ![Razorpay Dashboard with MID highlighted](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/capital-partnerships-mid.jpg.md) + +After you share your MID, your Capital Referral Dashboard is enabled in a day. You have successfully become a Partner for Razorpay Capital. + +## Refer Product to Businesses + +You can refer your customer base to avail Line of Credit in two ways: +- [Via Referral Link](#refer-businesses-via-referral-link) +- [Via Dashboard Upload](#refer-businesses-via-dashboard-upload) + +### Refer Businesses Via Referral Link + +Refer and invite your customers to apply for Razorpay Line of Credit. This option is suitable if you want to broadcast the link on your website or social channels. Businesses can voluntarily sign up for the product using your link. + + +### To copy the referral link: + + 1. Log in to the Dashboard and navigate to your Partner Dashboard. + ![Navigate to Partner to the top-left on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/capital-partnerships-partner-dashboard.jpg.md) + 2. In the left menu, navigate to **Affiliate Accounts**. + 3. Shift to the **Line Of Credit** tab. + 4. Click **Share Referral Link**. + ![Switch to Line of Credit tab in Affiliate Accounts and click Share referral link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/capital-partnerships-loc.jpg.md) + + If you do not see the **Line of Credit** option, reach out to the sales POC. + 5. In the **Share Referral Link** pop-up, copy the referral link. + ![Copy the referral link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/capital-partnerships-share-link.jpg.md) + + After you have copied the referral link, share it directly on social media or your website. After the referred business (the lead) signs up and uses the product, you receive the referral bonus. + + + +### Refer Businesses Via Dashboard Upload + +You can personally refer and invite your leads to Razorpay Capital in bulk via the Partner Dashboard. Enter their email addresses in the sample file and share the leads with us. + + +### To upload leads on the Dashboard: + + 1. Log in to the Dashboard and navigate to your Partner Dashboard. + ![Navigate to Partner to the top left on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/capital-partnerships-partner-dashboard.jpg.md) + 2. In the left menu, navigate to **Affiliate Accounts**. + 3. Shift to the **Line Of Credit** tab. + 4. Click **+ Add New Clients**. + ![Add new account on the Affiliate Accounts Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/capital-partnerships-dashboard-upload.jpg.md) + + If you do not see the **Line of Credit** option, reach out to the sales POC. + 5. The **Add New Merchants - Line of Credit** pop-up window appears. + ![Add New Merchants window showing upload details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/capital-partnerships-bulk-dashboard-upload.jpg.md) + 6. Click **Download sample file** and enter your leads' email addresses and details. The sample file contains the required fields along with the recommended formats and values. + + **Fields and Descriptions** + + +> **WARN** +> +> +> **Watch Out!** +> +> When you add details to fields in the sample template (both mandatory as well as optional), ensure that the details match the allowed values as explained in the table below. +> + + + + Field | Allowed Values + --- + `business_name` [Mandatory]| 0-100 alphanumeric characters + --- + `account_name` [Mandatory] | 0-100 alphabet characters + --- + `contact_mobile` [Mandatory] | 10 digit mobile number with +91 extension + --- + `email` [Mandatory] | Standard valid email address + --- + `annual_turnover_min` [Mandatory] | Integer in Rupees. For example, ₹1,00,000 + --- + `annual_turnover_max` [Mandatory] | Integer in Rupees. For example, ₹20,00,000 + --- + `business_type` [Mandatory] | Types allowed: - `PROPRIETORSHIP` +- `INDIVIDUAL` +- `PARTNERSHIP` +- `PRIVATE_LIMITED` +- `PUBLIC_LIMITED` +- `LLP` +- `NGO` +- `EDUCATIONAL_INSTITUTES` +- `TRUST` +- `SOCIETY` +- `NOT_YET_REGISTERED` +- `OTHER` + + --- + `promoter_pan` [Optional] | Standard PAN format + --- + `business_vintage` [Optional] | - `LESS_THAN_3MONTHS` +- `BETWEEN_3MONTHS_6MONTHS` +- `BETWEEN_6MONTHS_12MONTHS` +- `GREATER_THAN_12MONTHS` +- `UNKNOWN` + + --- + `gstin` [Optional] | Standard GSTIN format + --- + `company_address_line_1` [Optional] | Standard address format + --- + `company_address_line_2` [Optional] | Standard address format + --- + `company_address_city` [Optional] | Standard address format + --- + `company_address_state` [Optional] | Standard address format + --- + `company_address_country` [Optional] | Standard address format + --- + `company_address_pincode` [Optional] | Standard address format + + + - You cannot enter more than 500 number of accounts in the file. + - Enter the details in the template format only. Do not modify the template. + 6. Verify your entries for any discrepancies and upload the file in the same window. You can upload both a `.csv` or a `.xls` file. + + After you successfully upload the file, the file is processed and the leads details are displayed under **Affiliate Accounts** → **Line of Credit** tab. + + ![Leads from your upload or referral links appear on your Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/capital-partnerships-loc-leads.jpg.md) + + Some leads may be missing from the Dashboard due to failures. Please check for Razorpay's status email in your inbox. This mail contains the details of the failed leads. + + +## Track Leads Status + +As a Partner, you can track the status of the lead's application status under the **Line Of Credit** tab in your Partner Dashboard. It is displayed under the **Activation Status** column. + +![Activation status to track application of leads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/capital-partnerships-activation-status.jpg.md) + +The values of this column change as the lead's application passes each stage. + + +### Application Status and Action Required + + Listed below are the different stages and details of an application and the corresponding action required. + + + + Status | Action Required by Merchant + --- + **In Process** | No action required. + --- + **Bureau Submission** | Merchant must complete Bureau submission in their application form. Complete the application on the [RazorpayX Dashboard](https://x.razorpay.com/). + --- + **Income Proof Submission** | Merchant must complete KYC submission in their application form. Complete the application on the [RazorpayX Dashboard](https://x.razorpay.com/). + --- + **Post Offer Docs Collection** | Offer is created. Merchant must accept the offer and submit the KYC documents in their application form. Complete the application on the [RazorpayX Dashboard](https://x.razorpay.com/). + --- + **Pre Offer Docs Resubmission** | There are issues with the submitted documents or new documents requested. Merchant must follow the steps in the application form. Complete the application on the [RazorpayX Dashboard](https://x.razorpay.com/). + --- + **Merchant ESign Pending** | Merchant must e-sign the document shared over email. + --- + **Merchant Nach Pending** | NACH requested from the merchant is pending. Complete the application on the [RazorpayX Dashboard](https://x.razorpay.com/). + --- + **CPV Pending** | 'Contact Person Verification' is pending. + --- + **Offer Acceptance** | Merchant yet to accept the offer. + --- + **Go Live** | Application is approved and the line of credit is now available. + --- + **Rejection** | Application is rejected. + --- + **Application Closed** | Application is closed. No action is required. + + + + +## Referral Bonus Credit + +For the leads converted in the previous month, you earn a referral bonus in the following month. We collect your bank details and credit the amount through a manual payout. + +1. When any of your leads get converted, our associate reaches out to you to collect your bank account details. +1. Using those details, the payout is created. +1. We share an invoice with you that you can verify and approve. +1. After verification, the payout is processed. You receive the amount within 7 business days. + +## Support + +For queries or assistance in any of the steps mentioned above, reach out to the sales POC. + +### Related Information + +- [Top 10 Advantages of a Business Line of Credit](https://razorpay.com/learn/business-banking/why-is-line-of-credit-necessary-for-businesses/) +- [Line of Credit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit.md) diff --git a/llm-content/partners/changelog.md b/llm-content/partners/changelog.md new file mode 100644 index 00000000..557151bc --- /dev/null +++ b/llm-content/partners/changelog.md @@ -0,0 +1,31 @@ +--- +title: Partners Changelog +description: List of updates on Razorpay partnerships. +--- + +# Partners Changelog + +- **API Changelog**: Discover new releases and updates regarding Razorpay APIs. + + - **Payments Changelog**: Discover new releases and updates regarding Razorpay Payments products. + +The following table records changes in Partnerships since Jan 2024: + +Month-Year | Feature | Description +--- +Apr 2025 | Custom Onboarding SDK | Added `PHP` codes to [Custom Onboarding SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/onboarding-sdk.md) +--- +Mar 2025 | Custom Onboarding SDK | Added `Node.js` codes to [Custom Onboarding SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/onboarding-sdk.md) +--- +May 2024 | New Product | Added [POS for Partnerships](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/pos.md). +--- +Mar 2024 | Partner Persona | - Resellers are now called [**Service Partners**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/service-partners.md). +- Platform Partners are called [**Technology Partners**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners.md). + +--- +Mar 2024 | Onboarding SDK | - Added `Java`, `.NET`, `Ruby` codes to [Request Product Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/onboarding-sdk.md#22-request-product-configuration). +- Added `curl` to [Upload Stakeholder Documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/onboarding-sdk.md#24-upload-documents). +- Added [Onboarding URL generation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/onboarding-sdk.md#generate-onboarding-url). + +--- +Feb 2024 | KYC for Service Partners | You can now [request Partner KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/service-partners/perform-kyc.md). diff --git a/llm-content/partners/commissions.md b/llm-content/partners/commissions.md new file mode 100644 index 00000000..f43073a5 --- /dev/null +++ b/llm-content/partners/commissions.md @@ -0,0 +1,69 @@ +--- +title: Earn commission as a Razorpay Partner +heading: Commission for Payment Products +description: Check how you can earn Partner commissions and how the commission is calculated for Payments products. +--- + +# Commission for Payment Products + +You can become a Razorpay Partner, offer your customers a complete suite of payment and payout solutions and get rewarded for it in the form of commissions. You can earn commissions by charging an additional fee in the invoice raised on the customer, either as a flat amount or a percentage of the transaction value. + +## How it Works + +Let us assume you are **Acme Corporation**, an ERP solution provider for colleges, and have partnered with Razorpay. You work with various colleges, who use your ERP and allow students to make fee payments online using Razorpay Payment Gateway. + +In Razorpay terminology, you are the Partner, the college is the Sub-merchant (affiliate account) and the college student is the customer. Acme Corporation can charge a service fee to ABC College. The ABC College can charge this service fee to the students. This service fee is the commission received by Acme Corporation. + +Partner | Merchant | Customer +--- +`Acme Corporation` | `ABC College` | `Saurav Kumar` (Student) + +## Commission Calculation + +By default, the commission is offered as a percentage of the transaction value. If you have a use case for a flat-rate commission model, contact our [Partnerships team](mailto:partnerships@razorpay.com). + +### Commission Charged as a Percentage Transaction Value +*(Say 0.1%)* + +Let us assume that the term fee is . The following charges apply: + +Term Fees + +(A) | Payment Gateway Fee + +(B) | Service Fee +(Percentage of Transaction Value) +(C) | GST + +(D) | Total Amount + +(A)+(B)+(C)+(D) +--- +₹10000 | 10000\*2% = ₹200 | 10000\*0.1% = ₹10 | (200+10)\*18% = ₹37.8 | **₹10247.8** + +### Commission as a Flat Rate +*(Say )* + +Let us assume that the term fee is . The following charges apply: + +Term Fees + +(A) | Payment Gateway Fee + +(B) | Service Fee +(Flat) +(C) | GST + +(D) | Total Amount + +(A)+(B)+(C)+(D) +--- +₹10000 | 10000\*2% = ₹200 | ₹10 | (200+100)\*18% = ₹37.8 | **₹10247.8** + +## Refunds Post Commission Payouts +In cases, where there is a refund after the commission has been paid out, it is entered as a negative commission in your account in the corresponding cycle. No commission is paid out for refund cases. + +### Related Information +- [Commission Settlement Process](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions/settlement-process.md) +- [Commission Reports and Auto-generated Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions/reports-invoices.md) +- [Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners.md) diff --git a/llm-content/partners/commissions/referral-bonus.md b/llm-content/partners/commissions/referral-bonus.md new file mode 100644 index 00000000..21f88961 --- /dev/null +++ b/llm-content/partners/commissions/referral-bonus.md @@ -0,0 +1,44 @@ +--- +title: Referral Bonus for RazorpayX powered Current Accounts +description: Know how you can earn referral bonus for every referral to RazorpayX. +--- + +# Referral Bonus for RazorpayX powered Current Accounts + +You can become a Razorpay Partner, refer your customers for RazorpayX powered Current Accounts and payout solutions, and get rewarded for it in the form of referral bonus. + +## How it Works + +Let us assume you are **Acme Corporation**, an ERP solution provider for colleges, and have partnered with Razorpay. You work with various colleges, that use your ERP. Also, you have been using the RazorpayX Banking Solution for managing payouts. + +In Razorpay terminology, you are the Partner, the college is the sub-merchant (affiliate account). Acme Corporation gets referral bonus, every time a college (sub-merchant) signs up with us for a RazorpayX powered Current Account. + +## Referral Bonus Calculation + +Here is how incentives are paid out for Current Accounts referred to us: + +Current Accounts per month | Incentive per account +--- +1 - 10 | ₹1500 +--- +11 - 20 | ₹2000 +--- +21 - 30 | ₹3000 +--- + +> **INFO** +> +> +> +> **Handy Tips** +> +> - RazorpayX referral bonus calculation and disbursal happens manually. +> - Partner commission is payable only after RazorpayX powered Current account activation. +> - The Sub-merchants should complete a minimum of 5 payouts for RazorpayX powered Current Account. +> - Current Accounts are serviceable in the selected pin code based on the bank’s availability. +> - For any queries, send an email to our [Partnerships team](mailto:partnerships@razorpay.com) or contact our [Support team](https://razorpay.com/support/#request). +> + +### Related Information +- [Commission for Payment Products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions.md) +- [Commission Settlement Process](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions/settlement-process.md) diff --git a/llm-content/partners/commissions/reports-invoices.md b/llm-content/partners/commissions/reports-invoices.md new file mode 100644 index 00000000..f0831f61 --- /dev/null +++ b/llm-content/partners/commissions/reports-invoices.md @@ -0,0 +1,64 @@ +--- +title: Razorpay Partners | Reports and Invoices +heading: Commission Reports and Auto-generated Invoices +description: View the commission settlement reports and the various states of commission payouts. +--- + +# Commission Reports and Auto-generated Invoices + +Under the **Earnings** tab, there are three sections under which you can view detailed commission reports and auto-generated invoices on the **3rd day of every month** on the Razorpay Partner Dashboard. + +> **WARN** +> +> +> +> **Watch Out!** +> +> RazorpayX referral bonus calculation and disbursal happens manually. For any queries, send an email to our [Partnerships team](mailto:partnerships@razorpay.com) or contact our [Support team](https://razorpay.com/support/#request). +> +> + +## View Commission Reports + +#### Requirements for Commission Data to be Displayed + +The commission data under the **Earnings** tab is based on the Partner type and the following factors: + + + The commission data is displayed under the **Earnings** tab if at least 3 sub-merchants are added. + + + The commission data is displayed if the third-party application with Razorpay is created (for client credentials) and [OAuth](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth.md) integration is necessary. + + +## Daily Earnings + +This report displays the earnings generated from referred accounts by you on a day-to-day basis. There are two columns in this report: + +- **Base Earnings**: This is the amount you earn from the platform fee. +- **Add-on Earnings**: This is the additional commission you charged your customers. For example, platform fees. + +![partner daily earnings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-daily-earnings.jpg.md) + +## Transactional Details + +You can view the earnings details from each transaction made by your affiliate accounts. This report is available only for the partner types `Aggregator` and `Technology Partner`. + +![partner transactions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-transactions.jpg.md) + +## Check Auto-generated Invoices + +The **Invoices** section is available for partners who have commissions processed using the [Commission Payout with Auto-generated Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions/settlement-process.md#automated-invoice-commission-payout) process. The following columns are displayed: + +- **Invoice ID**: This is the unique identifier of the invoice. Click **Invoice Id** to view **Commission Period**, **Invoice Date**, **Status** and detailed commission **Amount Breakup** displayed in the side panel. +- **Amount**: This is the commission receivable balance (Base Commission + GST - TDS). +- **Created Date**: The date at which the invoice is created. +- **Status**: The status of the invoice. Possible states are **Issued**, **Under Review** and **Processed**. + +You can download the commission invoice details in PDF format. +![download invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-download-invoice.jpg.md) + +### Related Information +- [Commission for Payment Products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions.md) +- [Referral Bonus for RazorpayX powered Current Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions/referral-bonus.md) +- [Commission Settlement Process](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions/settlement-process.md) diff --git a/llm-content/partners/commissions/settlement-process.md b/llm-content/partners/commissions/settlement-process.md new file mode 100644 index 00000000..95af5513 --- /dev/null +++ b/llm-content/partners/commissions/settlement-process.md @@ -0,0 +1,90 @@ +--- +title: Razorpay Partner Commission Settlement Process +heading: Commission Settlement Process +description: Understand the automatic and manual commission settlement processes. Check the various states of commission payouts. +--- + +# Commission Settlement Process + +There are 2 ways in which the partnership commissions can be processed. + +> **WARN** +> +> +> +> **Watch Out!** +> +> RazorpayX referral bonus calculation and disbursal happens manually. For any queries, send an email to our [Partnerships team](mailto:partnerships@razorpay.com) or contact our [Support team](https://razorpay.com/support/#request). +> + +## Automated Invoice Commission Payout (Recommended) + +If you can see the **Invoices** section under the **Earnings** tab, the invoices are auto-generated and displayed under the **Earnings** → **Invoices** section. The invoices are auto-generated on the **3rd of every month**. You just have to verify and approve the invoice to receive the commission. + +The automated process provides better visibility towards commissions earned, faster payouts and reduce the manual effort that is required in the manual invoice generation process. Know more about [invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions/reports-invoices.md#check-auto-generated-invoices). + +### Steps + +The Automatic Invoice Commission generation process has the following steps: + + +1. The auto-generated commission invoice is available on the 3rd day of every month under the **Earnings** → **Invoices** tab. The PDF file includes transactions happening from 1st to last day of the previous month. The status of the Commission Invoice is **Issued**. + ![Partner commission settlement - invoices issued](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-invoices-issue.jpg.md) +2. Click the **Invoice ID** to open a side panel with that specific invoice's details. To process the invoice, click the **Process Invoice** button. + ![Partner commission settlement - process invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-process-invoice.jpg.md) +3. A pop-up is displayed to confirm if you want to process the invoice. Click **Yes, Process**. The commission balance is settled automatically. +4. After the commission payment process is successfully initiated, an email is triggered with an attached invoice to your registered email address and concerned Razorpay teams for reference, compliance and tax purposes. The invoice status at this stage is **Under Review**. + ![Partner commission settlement - invoice under review](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-invoice-underreview.jpg.md) +5. Razorpay team validates the commission amount data. After performing the necessary verification, the team approves or reaches out to you seeking clarifications. + - If the commission amount data is consistent, the Razorpay team processes the invoice and the commission is paid to your registered bank account. After the payout is complete, the status of the invoice changes to **Processed**. An email is sent notifying that the Commission Payout Invoice is processed. You will receive the commission balance in the next settlement cycle. + ![Partner commission settlement - invoice processed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-invoice-processed.jpg.md) + - If the commission amount data is inconsistent, the Razorpay team reaches out to you via email for further clarifications. + + +> **INFO** +> +> +> **Handy Tips** +> +> - Invoices are generated for a particular month only if the monthly commission is greater than . +> - Invoice is generated if there is any commission balance for the previous month. +> - For issues related to Commission Invoices, contact our [Support team](https://razorpay.com/support/#request), with a copy of the invoice. +> + +### Commission Payout States + +During the Auto Payment Commission process, the Commission Payout can go through the below states: + +`Issued` +: The commission payout is in the `issued` state after the invoice file is auto-generated on the third day of every month. + +`Under Review` +: When the invoice is generated and commission payout is initiated, the Razorpay team validates the commission amount data. The commission payout is in the `under review` state. + +`Processed` +: The commission payout is in the `processed` state after the Razorpay team processes the invoice and pays out the commission to your registered bank account. + +## Manual Invoice Commission Payout + +If you cannot see the **Invoices** section, you need to manually send invoices to process your partnership commission. After the customer completes the payment, Razorpay receives the amount. This reflects in the Daily Earnings and Per Transactions Earnings reports. Know more about [commission reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions/reports-invoices.md#view-commission-reports). + +### Steps +The Manual Invoice Commission Payout process has the following steps: + +1. On the first day of the next month, calculate the commission amount receivable for the month and create an invoice. For example, on September 1, 2020, create an invoice for the commission receivable for August. You can obtain these details from the [commission reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions/reports-invoices.md#view-commission-reports). +2. Raise a [Support Request](https://razorpay.com/support/#request) from the Dashboard and share the invoice copy. Watch this video to raise a request from your Dashboard. + ![Raise support ticket from Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/support_dashboard.gif.md) +3. After we receive the invoice, we will process it and settle the amount within 1-2 weeks to your bank account. + +> **WARN** +> +> +> **Watch Out!** +> +> - Commissions will be paid out only if you have configured how the commission will be charged to your merchant. You should send an email to the [Razorpay Partnerships team](mailto:partnerships@razorpay.com) at the time of merchant onboarding. +> - In case of any discrepancy in the commission amount, that is, the amount quoted by you does not match with our reports, we will send you an email seeking clarifications. +> + +### Related Information +- [Know Your Commission](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions.md) +- [Commission Reports and Auto-generated Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions/reports-invoices.md) diff --git a/llm-content/partners/earnings.md b/llm-content/partners/earnings.md new file mode 100644 index 00000000..9ff85109 --- /dev/null +++ b/llm-content/partners/earnings.md @@ -0,0 +1,96 @@ +--- +title: Partner Earnings +description: Learn how to increase your revenue with the Razorpay Partner Earnings program. +--- + +# Partner Earnings + +Partnering with Razorpay helps you offer your customers a complete suite of payments solutions and get rewarded for it in the form of earnings. + +As a partner, you can resell Razorpay payment solutions to merchants at a higher rate. The difference between Razorpay Fee and your sales price is your earnings. + +Therefore, Partner Earnings = Sales Price set for Merchant - Razorpay Fees + +Let us assume you are Acme Corporation, an ERP solution provider for restaurants. You work with various restaurants and resell Razorpay payment gateway to them, to accept digital payments from online food-ordering patrons. + +In Razorpay parlance, you are the Partner, the restaurant is the Merchant and the patron is the customer. + +Partner | Merchant | Customer +--- +`Acme Corporation` | `ABC Restaurant` | `Gaurav Kumar` (Patron) + +When Gaurav Kumar orders food online from ABC Restaurant and pays the restaurant bill via Razorpay Gateway, you receive a percentage of the transaction value. + +## How it Works + +Transaction Discount Rate (TDR) is the sales price you quote to merchants. +TDR = Razorpay Fee + Partner Earnings +Let's assume Razorpay Transaction Debit Rate = 2% + +Acme can partner with Razorpay to identify pricing plans that will maximize their earnings. + +Acme's Partner Earnings Plan examples: + +### Plan A + +TDR | Razorpay Fees | Partner Earnings +--- +2% | 1.9% | 0.1% + +**Total Earnings for Partner = Partner Earnings = 0.1%.** + +Therefore, for a transaction amount of ₹1000, the **Partner Earnings is (₹1000 * 0.1%) = ₹1.** + +### Plan B + +TDR | Razorpay Fees | Partner Earnings | Service Charges +--- +2% | 1.9% | 0.1% | 0.4% + +**Total Earnings for Partner = Partner Earnings + Service Charges** + +Therefore, for a transaction amount of ₹1000, the **Partner Earnings is (₹1000 * 0.1%) + (₹1000 * 0.4%) = ₹5.** + +## Earnings Settlement Process +Once the customer completes the payment, the amount is received by Razorpay. + +Follow these steps to complete the earnings settlement process: +1. On the first day of the next month, calculate and create an invoice for the earnings amount receivable for the month. For example, on 1st September, you must create an invoice for the earnings receivable for the month of August. You can obtain these details from the Earnings reports. +2. Raise a Support Request from the Dashboard and share the invoice copy with it. Here is a short animation to raise a request from your Dashboard. + ![Raise a support request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/support_dashboard.gif.md) +3. Once we receive the invoice, we will process it and settle the amount within 1-2 Weeks to your bank account. + +> **INFO** +> +> +> **Handy Tips** +> +> - Earnings will be paid out only if you have configured how they will be charged to your merchant. This should be done by sending an email to the [Razorpay Partnership Team](mailto:partnerships@razorpay.com) at the time of merchant onboarding. +> - In case of any discrepancy in the earnings amount, that is, the amount quoted by you does not match with our reports, we will send you an email seeking clarifications. +> + +## View Commission Reports on Dashboard + +You can view detailed commission reports on the Dashboard. There are two reports available for your reference: + +### Daily Earnings +This report provides details of your daily earnings from referred accounts. Base earnings indicate the amount you earn from the platform fee, while Add-on earnings show any additional platform charge that may be added on your accounts. + +![partner daily earnings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-daily-earnings.jpg.md) + +### Per Transaction Earnings Report +This report provides details of your earnings from each transaction on your referred accounts. + +![partner transactions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-transactions.jpg.md) + +> **INFO** +> +> +> +> **Handy Tips** +> +> This report is available only for Aggregators and Technology partner types. +> + +## Enable Partner Earnings +To enable earnings for your account, send an email to [partnerships@razorpay.com](mailto:partnerships@razorpay.com). diff --git a/llm-content/partners/existing-merchant.md b/llm-content/partners/existing-merchant.md new file mode 100644 index 00000000..6912bf58 --- /dev/null +++ b/llm-content/partners/existing-merchant.md @@ -0,0 +1,62 @@ +--- +title: Existing Razorpay Merchant +description: Become a Razorpay Partner from the Partners webpage or the Razorpay Dashboard. +--- + +# Existing Razorpay Merchant + +You can become a Razorpay Partner, offer your customers a complete suite of payment solutions and get rewarded for it in the form of [commissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions.md). As an existing Razorpay merchant, you can join the Razorpay Partnership program by completing a few simple steps. + +## Become a Razorpay Partner + +> **INFO** +> +> +> **Handy Tips** +> +> - Review the [eligibility requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners.md#who-can-become-a-partner) for the Razorpay Partnership Program. +> - All Partners are onboarded as Service Partners by default. If you have a use case, you can request a Partner type switch to [Technology Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/become-technology-partner.md). +> + +You can join the program either from the Razorpay Partners Webpage or the Dashboard. + + + To become a Partner: + 1. Navigate to the [Razorpay Partners webpage](https://razorpay.com/partners) and click **Become a Partner**. + ![Sign up as a Razorpay Partner from Mobile Web](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-mobile-sign-up.jpg.md) + 2. On the sign up page, enter your mobile number and click **Get Started**. + ![Enter Mobile Number to Sign Up as Partner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-mobile-sign-up-phone.jpg.md) + 3. If you were previously logged into the Dashboard, you will be redirected to it. If not, you will be redirected to the **Welcome Back!** page. Click the **Login Now** button to navigate to the Dashboard. + ![Partner Onboarding - Existing Merchant Login](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-onboarding-existing-merchant.jpg.md) + 3. Once logged in, navigate to the top-right menu. Click the drop-down list next to the merchant name. + ![existing merchant partner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-existing-merchant-partner.jpg.md) + 4. Click **Explore Partner Program**. + 5. On the **Welcome to your Partner Dashboard** dialog box, click **Next**. + ![welcome partner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-welcome-partner.jpg.md) + 6. On the next page, the details regarding the commissions are displayed. Click **Next**. + 8. In the **Terms and Conditions** modal, click **Accept and Get Started**. + + + To become a Partner: + 1. Log in to the Dashboard with your existing credentials. + 2. Once logged in, navigate to the top-right menu. Click the drop-down menu next to the merchant name. + ![existing merchant partner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-existing-merchant-partner.jpg.md) + 3. Click **Explore Partner Program**. + 4. On the **Welcome to your Partner Dashboard** dialog box, click **Next**. + ![welcome partner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-welcome-partner.jpg.md) + 5. On the next page, the details regarding the commissions are displayed. Click **Next**. + 6. In the **Terms and Conditions** modal, click **Accept and Get Started**. + + +## Enable Partner Commissions + +To enable commissions on your account, send an email to the [Razorpay Partnerships team](mailto:partnerships@razorpay.com). + +## Add Sub-Merchants + +Know how to [add new sub-merchants](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/service-partners/add-submerchants.md) on your Dashboard. + +### Related Information + +- [Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners.md) +- [Become a Partner - New to Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/new-to-razorpay.md) diff --git a/llm-content/partners/faqs.md b/llm-content/partners/faqs.md new file mode 100644 index 00000000..67a63885 --- /dev/null +++ b/llm-content/partners/faqs.md @@ -0,0 +1,111 @@ +--- +title: Partners | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Partners. +--- + +# Frequently Asked Questions (FAQs) + +## General + + +### 1. Who can become a Partner? + + Razorpay Partnership Program is for anyone who can offer or advocate online payments, including SaaS or ERP companies, developers, designers, agencies, incubators, evangelists, investors or freelancers. + + + +### 2. What is Razorpay Partnership program? + + Razorpay Partnership program is a medium where you can offer the complete suite of Razorpay services to your merchant and get rewarded. + + + +### 4. I have a merchant account with Razorpay. Can I use the same account to refer my clients? + + Yes. As a Razorpay customer, you will manage your transactions. Once approved as a Razorpay partner, you can keep track of the clients you onboarded using this account. + + + +### 5. What changes will I face when I move to Partner Program? + + In terms of integrations, nothing changes by default. + + On the Dashboard, however, the Partners section is displayed. The Partner Dashboard allows you to see the list of all your sub-account and add new accounts as well from the **Affiliated accounts** tab. + + + +> **WARN** +> +> +> **Watch Out!** +> +> We are discontinuing the referral view in the Account & Settings tab shortly. +> + + + + +### 6. How to track the status of my referrals? + + You can check the status of your referrals under the **Affiliate Accounts** tab on your Partner Dashboard. + + + +### 7. What will be the payout cycle of the commission amount? + + If you are a Service Partner, you need to add a minimum of 3 sub-merchants. After 3 sub-merchants are added, the commission payout is made. In the meanwhile, the commission is calculated in the backend for the first and second merchant. After you are eligible for the payout, you can download the commission payout amount, raise an invoice and share it with the [Support team](https://razorpay.com/support). After Razorpay receives and verifies the invoices, the payout is made in 30 days. + + + +### 8. How should we go ahead with the new integrations change? + + The API docs for the integrations are linked [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/onboarding-sdk.md). + + +## Service Partners + + +### 1. Who can become a Razorpay Service Partner? + + An individual or an organisation who can refer merchants to use the Razorpay suite of services can become a Razorpay Service Partner. + + + +### 2. How do I become a Razorpay Service Partner and refer a Client? + + Once the sign up is complete, you will get access to the Partner Dashboard from where you can start referring it to merchants. Know more about [becoming a Razorpay Partner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/new-to-razorpay.md). + + + +### 3. I have not registered my company yet. Can I sign up as a Razorpay Service Partner? + + Yes. This program is offered to both individuals and organisations who want to be part of the Partner platform. + + + +### 4. What documents will be required to register as a Razorpay Service Partner? + + No physical documents are needed for registering as a Partner. However, for commission payouts, we need your company’s (or your own) name, PAN details, address, bank a/c details, scanned copy of the canceled cheque, and the details of an authorized signatory or SPOC (name, email, PAN, and address). + + +## Technology Partners + + +### 1. Who can become a Razorpay Technology Partner? + + The following can become a Razorpay Technology Partner: + - **Marketplaces**: Businesses that connect sellers and service providers with buyers. + - **Softwares**: Platforms offering software services like ERP, CRM, storefront creation, and accounting. + + + +### 2. How do I become a Razorpay Technology Partner and refer a Client? + + Visit our website and complete the [Partner Signup](https://razorpay.com/partners/). Once the signup is complete, you are onboarded as a Service Partner by default.[Request a switch](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/become-technology-partner.md#request-a-switch) to become a Technology Partner. Know more about [becoming a Razorpay Partner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/new-to-razorpay.md). + + + +### 4. What documents will be required to register as a Razorpay Technology Partner? + + No physical documents are needed for registering as a Partner. However, for commission payouts, we need your company’s (or your own) name, PAN details, address, bank a/c details, scanned copy of the canceled cheque, and the details of an authorised signatory or SPOC (name, email, PAN, and address). diff --git a/llm-content/partners/glossary.md b/llm-content/partners/glossary.md new file mode 100644 index 00000000..19155993 --- /dev/null +++ b/llm-content/partners/glossary.md @@ -0,0 +1,23 @@ +--- +title: Partners | Glossary +heading: Glossary +description: Important terms related to Razorpay Partner Program. +--- + +# Glossary + +The following table lists all the commonly used terms and their definitions used in Razorpay Partnership Program: + +Term | Definition +--- +Partner | A Partner is a Razorpay merchant who onboards clients on Razorpay platform as its sub-merchants. There are two types of partners: Service Partner and Technology Partner. +--- +Aggregator Partner | Razorpay Aggregator Partners are businesses who provide managed services to their clients, through their digital offerings. Along with providing a platform to their clients, they are also involved in managing their transactions. +--- +Technology Partners | Technology Partners are companies that build products and want to enable their customers to collect payments using these products. For example, you might be a company offering an end-to-end inventory management solution to your clients. As part of the solution, you want to allow your customers to accept online payments using your solution. You can do this by signing up as a Technology Partner. +--- +Service Partners | Service Partners are businesses or individuals who refer and/or integrate Razorpay for their clients. Service Partners are typically not involved in managing transactions on behalf of their clients. +--- +Sub-merchant +or +Affiliate Account | Sub-merchants are the clients who get onboarded on the Razorpay platform by a Partner. A sub-merchant can access and manage their own Dashboard. Once on-boarded, sub-merchant accounts must be activated for them to start collecting payments. diff --git a/llm-content/partners/new-to-razorpay.md b/llm-content/partners/new-to-razorpay.md new file mode 100644 index 00000000..35e9cd36 --- /dev/null +++ b/llm-content/partners/new-to-razorpay.md @@ -0,0 +1,100 @@ +--- +title: Create a Razorpay Account and join the Partnership Program +heading: New to Razorpay +description: Steps to sign up as a Razorpay Partner and activate your account by completing KYC. +--- + +# New to Razorpay + +You can join the Razorpay Partnership program by signing up on the Partners webpage and completing a few simple steps on the Dashboard. + + - **1. Sign Up**: Steps to sign up for the Razorpay Partnership Program. + + - **2. KYC**: Complete the account activation and KYC process to receive commissions. + +## Become a Razorpay Partner + +> **INFO** +> +> +> **Handy Tips** +> +> - Review the [eligibility requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners.md#who-can-become-a-partner) for the Razorpay Partnership Program. +> - All Partners are onboarded as Service Partners by default. If you have a use case for Technology Partner type, you can request a Partner type switch to [Technology Partner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/become-technology-partner.md). +> + +### Sign Up and KYC + + +### 1. Sign up on Razorpay Partners Page + + If you are new to Razorpay, you must first sign up for a Razorpay account. + + Follow these steps: + 1. Navigate to the [Partners](https://razorpay.com/partners) webpage and click **Become a Partner** or **Sign Up**. + + + Sign up using email ID + + 2. Enter your email id and click **Continue**. + 3. Enter a password and click **Create Password**. + ![partners - enter password](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-onboarding-new-password.jpg.md) + 4. Enter the OTP sent to your registered email and click **Verify**. + 5. Enter your name and optionally, your number. Click **Continue**. + ![partners - enter name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-onboarding-new-name.jpg.md) + + This completes the account creation process. + + + +### Sign up using phone number + + 2. Enter your phone number and click **Continue**. + 3. Enter the OTP sent to your registered phone number and click **Verify**. + ![partners - enter otp](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-onboarding-new-otp.jpg.md) + 4. Enter your name and optionally, your email. Click **Continue**. + + This completes the account creation process. + + + + + + +### 2. Complete KYC on Razorpay Dashboard + + As a Razorpay Partner, you are eligible to receive [commissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions.md) from Razorpay. You must complete the account activation and KYC process to receive the commission. We recommend you perform this step using a desktop computer. + + To activate your account: + 1. Log in to the Dashboard and navigate to **Partner** → **Home**. + 2. Click **Submit KYC**. + ![Complete Partner KYC on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-dashboard-submit-kyc.jpg.md) + 3. In the **CONTACT DETAILS** section, fill in your name, email and number. Click **Save & Next**. + ![Partners KYC Contact Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-kyc-contact-details.jpg.md) + 4. In the **BUSINESS DETAILS** section, select your **Business Type** and fill relevant details. Click **Save & Next**. + ![Partners KYC Business Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-kyc-business-details.jpg.md) + 5. Fill the **ADDRESS DETAILS** section. Click **Save**. + ![Partners KYC Address Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-kyc-address-details.jpg.md) + 6. Read and agree to the **Razorpay Terms and Conditions**. Click **Submit and Verify**. + + After you submit the details, our team will review the KYC form. + - We will notify you via email, SMS and WhatsApp if we need further information. + - The review process takes 4-5 days. + - Upon successful verification: + - Razorpay displays the **Settlements Enabled** success message on the Dashboard. + - Razorpay deposits the settlement amount in your bank account per your settlement schedule. + + +## Commissions + +Commissions on your account are enabled instantly after successful completion of KYC. Know how the [commission is calculated](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions.md). In case of any queries, contact our [Partnerships team](mailto:partnerships@razorpay.com). + +## Add Sub-Merchants + +Know how to [add new sub-merchants](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/service-partners/add-submerchants.md) on your Dashboard. + +### Related Information + +- [Know Your Commissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions.md) +- [Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners.md) +- [Become a Partner - Existing Razorpay Merchant](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/existing-merchant.md) diff --git a/llm-content/partners/playbook.md b/llm-content/partners/playbook.md new file mode 100644 index 00000000..d33e3a7c --- /dev/null +++ b/llm-content/partners/playbook.md @@ -0,0 +1,48 @@ +--- +title: Razorpay Partners | Playbook +heading: Partner Playbook +description: Access resources, discover actions, streamline onboarding and grow as a Razorpay Partner. +--- + +# Partner Playbook + +As a Partner, you serve as an ambassador for Razorpay when interacting with clients. This means you perform multiple functions like being a consultant, tech architect, marketer and more, which can be challenging. The Razorpay Partner Playbook empowers you to navigate these challenges with ease. + +## About Partner Playbook + +The Razorpay Partner Playbook is your one-stop, 24x7 library of ready-to-use resources to help you succeed as a Razorpay Partner and accelerate your business growth. It consists 3 sections: + +1. **Get Started** + + This section contains everything you need to begin your journey as a Razorpay Partner. This includes detailed videos and documents related to your KYC, client onboarding, client KYC, commission settlement, and more. +2. **Grow Your Business** + + This section will help you make the most of your partnership with Razorpay and onboard more clients convincingly. You can access marketing collaterals, sales pitch decks, product brochures and videos. Find tips to identify the best prospects, ready-to-share responses to client objections throughout the entire process, and more. +3. **Help & Support** + + This section helps you handle your clients' queries and assist them during the onboarding process to create a delightful experience. + +## Advantages + +With Razorpay Partner Playbook, you will have all the tools you will need to become unbeatable as a Razorpay Partner. You can: + +- Build your brand +- Attract more clients +- Service your clients better + +## How it Works + +The Partner Playbook is available to all Partners. To access the Razorpay Partner Playbook: + +1. Log in to the Dashboard. +2. Navigate to **Partner** → **Partner Playbook**. + ![Partner Playbook on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-playbook-dashboard.jpg.md) + +All the available resources are listed. You can view or download the required file or video. You can also use the search bar to find specific items. + ![Download or view Partner Playbook resources](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/download-partner-playbook-item.jpg.md) + +### Related Information + +- [Razorpay Partner Program](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners.md) +- [Service Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/service-partners.md) +- [Perform Sub-merchant KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/service-partners/perform-kyc.md) diff --git a/llm-content/partners/pos.md b/llm-content/partners/pos.md new file mode 100644 index 00000000..a311016b --- /dev/null +++ b/llm-content/partners/pos.md @@ -0,0 +1,194 @@ +--- +title: Partners for Razorpay POS +heading: POS Partnership +description: Become a Razorpay POS Partner. Refer POS to clients via Razorpay Dashboard upload or referral links and track application status. +--- + +# POS Partnership + +[Razorpay POS](https://razorpay.com/pos/) is a point-of-sale payments solution that allows business to accept payments using UPI, credit and debit cards, wallets, contactless, EMI and more with superfast processing and high transaction success rate. + +Razorpay POS offers advanced security features, real-time reporting, and the convenience to accept payments anytime, anywhere. Additionally, it provides a range of value-added services to enhance business operations. + +## How it Works + +1. Sign up or log in to your Dashboard. + - [New to Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/new-to-razorpay.md) + - [Existing Razorpay Merchant](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/existing-merchant.md#become-a-razorpay-partner) +2. Refer leads for POS using [Email](#refer-clients-using-email), [Referral links](#refer-clients-using-referral-link) or [Dashboard bulk upload](#refer-clients-using-bulk-upload). + +## Partner Eligibility + +You would be an ideal partner to refer Razorpay POS if you are a system integrator who primarily serves businesses that operate in the offline sector, such as retail establishments and restaurants. You may offer services like inventory management, billing solutions, delivery management, and integrated payment solutions to streamline operations of your clients. + +## Add Agents + +You can manage POS onboarding yourself or add agents to your account to assist you. Agents can invite clients, perform client KYC and track activation status. You can create separate logins by creating a distinct role within your Partner Dashboard. An agent can only view the POS section under **Affiliate Accounts**. + +To add agents: +1. Log in to the Dashboard. +2. Click **+ Add POS Agent** under **Refer clients to Razorpay POS!**. + ![Add POS agent from Partner Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-pos-agent.jpg.md) +3. Enter the email id of the agent and select the **Role** as **POS Partner Agent**. + ![Enter POS Agent Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-pos-agent-details.jpg.md) +4. Click **Send Invitation**. + +## Refer Product to Clients + +You can refer your clients for POS in three ways: +- [Using Referral Link](#refer-clients-using-referral-link) +- [Using Email](#refer-clients-using-email) +- [Using Dashboard Upload](#refer-clients-using-bulk-upload) + +### Refer Clients Using Referral Link + +Refer and invite your customers to apply for Razorpay POS. This option is suitable if you want to broadcast the link on your website or social media channels. Clients can voluntarily sign up for the product using your link. + + +### To Refer Clients Using Referral Link: + + 1. Log in to the Dashboard. + 2. In the **Partner** section, navigate to **Affiliate Accounts**. + 3. Click **Share Referral Link**. + ![POS Partners - share referral link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-share-referral-link.jpg.md) + 4. Select **Razorpay POS**. + 5. If you want to perform KYC for your client, select **Yes, I will assist my client with their KYC**. + ![POS - share referral link with KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pos-referral-link-with-kyc.jpg.md) + 6. You can share the link using: + - Copy button: This copies the referral link. You can copy-paste this link and send it via email or instant messaging apps such as WhatsApp. + - Facebook: Click the Facebook icon to share the referral link as a post on your Facebook account. + - X(Formerly Twitter): Click the X/Twitter icon to send a tweet with the referral link. + - WhatsApp: Click the WhatsApp icon to send a message with the referral link. + 7. If you do not want to perform KYC for your clients, select **No, my client will perform KYC on their own**. A **different** referral link will be displayed. You can share this link usinsg the above options. + ![POS Partners - share referral link without KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pos-referral-link-without-kyc.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> We recommended you to perform KYC for your clients as it decreases onboarding time by 50% and acts as a value-added service. During onboarding, your client will see a consent screen to allow you access to perform KYC. They need to approve it for you to submit the KYC form on their behalf. +> ![KYC consent form during client onboarding.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-consent-screen.jpg.md) +> + + + Clients can click on this referral link and sign up as an Affiliate account. + + +### Refer Clients Using Email + +You can invite clients for Razorpay POS using their email id to sign up and register on Razorpay. + + +### To Refer Clients Using Email: + + 1. Log in to the Dashboard. + 2. Click **Partner** and navigate to **Affiliate Accounts**. + 3. Go to the **POS** tab and click **+ Add New Clients**. + ![POS Partners - add new clients](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-pos-add-client.jpg.md) + 4. Under the **Using Email** tab, enter the **Client Name**, **Email ID** and **Contact number** _(optional)_ to which the invite link must be sent. Click **Next**. + ![POS Partners - enter client details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pos-partners-add-client.jpg.md) + 5. If you want to perform KYC for your client, select **Yes, I will assist my client with their KYC**. If not, select **No, my client will perform KYC on their own**. Click **Send Invite**. + ![POS Partners - perform client KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pos-partners-add-sumb-do-kyc.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> We recommended you to perform KYC for your clients as it decreases onboarding time by 50% and acts as a value-added service. During onboarding, your client will see a consent screen to allow you access to perform KYC. They need to approve it for you to submit the KYC form on their behalf. +> ![KYC consent form during client onboarding.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-consent-screen.jpg.md) +> + + + +### Refer Clients Using Bulk Upload + +You can send invites to multiple users using the **Bulk Upload** option. Upload an XLSX or CSV file with the Dashboard's required data. This sends a single sign up invitation link to multiple clients in bulk. + + +### Bulk Upload Template + + To view and understand the file format requirements, download the [sample template](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample_invite_submerchant_batch.xlsx.md). The account creation template contains the following headers. + + `name` _mandatory_ + : Name of the client's account. + + `email` _mandatory_ + : The email address of the client. + + `contact_mobile` _optional_ + : The contact number of the client. + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - Do not modify field names/headers (`name`, `email` and `contact_mobile`) in a batch as it might result in an upload failure. +> - There should be **only 1** sheet in the file. +> - The size of the file can be up to 50 MB. You can add up to 5,000 rows in a particular file. The links will be processed in the same sequence as listed in the file. +> + + + + +### To Refer Clients Using Bulk Upload: + + 1. Log in to the Dashboard. + 2. Click **Partner** and navigate to **Affiliate Accounts**. + 3. Go to the **POS** tab and click **+ Add New Clients**. + ![POS Partners - add new clients](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-pos-add-client.jpg.md) + 4. Go to the **Bulk Upload** tab. + 5. Upload the file. You can drag and drop or **click to upload**. + ![POS Partners - Refer add multiple clients](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pos-partners-add-bulk.jpg.md) + 6. The file is validated for any associated errors and uploaded to the Razorpay server. Click **Next**. + ![POS partners - bulk upload clients](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pos-partners-send-invite-bulk.jpg.md) + 7. If you want to perform KYC for your client, select **Yes, I will assist my client with their KYC**. If not, select **No, my client will perform KYC on their own**. Click **Send Invites** to send invites to your clients via email. + ![POS Partners - perform client KYC in bulk upload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pos-partners-add-sumb-do-kyc-bulk.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> We recommended you to perform KYC for your client as it decreases onboarding time by 50% and acts as a value-added service. During onboarding, your client will see a consent screen to allow you access to perform KYC. They need to approve it for you to submit the KYC form on their behalf. +> ![KYC consent form during client onboarding.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-consent-screen.jpg.md) +> + + Some leads may be missing from the Dashboard due to failures. Please check for Razorpay's status email in your inbox. This mail contains the details of the failed leads. + + +## Track Leads Status + +As a Partner, you can track the status of the lead's application status under the **POS** tab in your Partner Dashboard. It is displayed under the **KYC Status** column. + + +### KYC Status and Description + + +Status | Description +--- +Not Submitted | When you invite the client, and your affiliate account is successfully added, the activation status by default is `Not submitted`. This is the default status. +--- +Instantly Activated | Your affiliate account sets the Razorpay account password and provides contact details, business details, and account details. Once these details are fully verified, the activation status moves to `Instantly Activated`. The clients can start accepting payments once the account is instantly activated. However, the settlements will not be enabled. +--- +Under Review| Your affiliate account submits business documents to Razorpay depending on their business type. Razorpay then starts with the KYC review process. This changes the activation status to `Under Review`. +--- +Activated | The account activation status is `Activated` once the KYC documents are successfully verified. The payments made by the affiliate accounts before they submitted the KYC form and documents will be settled to your account. + + + +## Support + +For queries or assistance in any of the steps mentioned above, reach out to your sales POC. + +### Related Information + +- [Razorpay POS](https://razorpay.com/pos/) +- [About Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners.md) diff --git a/llm-content/partners/service-partners.md b/llm-content/partners/service-partners.md new file mode 100644 index 00000000..38498d89 --- /dev/null +++ b/llm-content/partners/service-partners.md @@ -0,0 +1,35 @@ +--- +title: About Service Partners +description: Know about Razorpay Service Partners. +--- + +# About Service Partners + +Service Partners are businesses or individuals who refer and/or integrate Razorpay for their clients. Service Partners are typically not involved in managing transactions on behalf of their clients. + +The Service Partner model focuses mainly on the commissions earned by the sub-merchant for their transactions. Know more about [partnership commission](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions.md). + +#### Example +- A blogging platform company, *Acme*, registers as a Service Partner with Razorpay and refers a sub-merchant (affiliate account), *Gekko & Co*. After *Gekko & Co* account is activated, *Acme* earns commissions based on the transactions *Gekko & Co* performs using the Razorpay products. +- *Gekko & Co* manages all their transactions, such as collecting payments, creating refunds and viewing settlements themselves. *Gekko & Co* can perform all these actions using the Dashboard or APIs. +- *Acme* earns commissions based on the transactions performed by the sub-merchants added on its Dashboard. +- *Acme* can add multiple sub-merchants directly from the Dashboard and view the list of referred sub-merchants and their activation statuses. + +[Become a Service Partner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/new-to-razorpay.md#1-sign-up-on-razorpay-partners-page). + +## Add Sub-merchants + +You can add your affiliate partners/sub-merchants directly using the Dashboard. There are 2 ways to add sub-merchants: + +- [Add Using a Sub Merchant’s Email ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/service-partners/add-submerchants.md#add-sub-merchants-using-email-id) +- [Add by Sharing a Referral Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/service-partners/add-submerchants.md#add-sub-merchants-using-a-referral-link) + +## Perform KYC + +Service Partners can perform KYC for the sub-merchants from the Partner Dashboard after receiving an approval from the sub-merchant. This way, the sub-merchant's account gets activated quickly and saves time. Know how to [ submit KYC documents for your sub-merchants](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/service-partners/perform-kyc.md). + +### Related Information +- [Add Sub-merchants](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/service-partners/add-submerchants.md) +- [Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners.md) +- [Know Your Commissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions.md) +- [Razorpay KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#2-submit-kyc-details/) diff --git a/llm-content/partners/service-partners/add-submerchants.md b/llm-content/partners/service-partners/add-submerchants.md new file mode 100644 index 00000000..783ed3db --- /dev/null +++ b/llm-content/partners/service-partners/add-submerchants.md @@ -0,0 +1,263 @@ +--- +title: Service Partners | Add Sub-merchants from Partner Dashboard +heading: Add Sub-merchants +description: Service Partners can invite Sub-merchants using their email IDs or by sharing a referral link from the Razorpay Dashboard. +--- + +# Add Sub-merchants + +As a Service Partner, you can invite your affiliates to use Razorpay Payments products and RazorpayX powered Current Account. You get a partnership commission when the Sub-merchants perform any transaction using Razorpay products. Know more about [partnership commission](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions.md). + +> **INFO** +> +> +> **Handy Tips** +> +> You can invite your clients to use Razorpay payments. To become a Sub-merchant, the invitee has to accept the invite and create a Razorpay account. +> + +## Who is a Sub-merchant + +Sub-merchants are the merchants who get onboarded on the Razorpay platform by a Partner. For example, *Acme* wants to provide an order management solution for its client company "Gekko". In this scenario, "Gekko" is Acme's Sub-merchant. + +Once onboarded, Sub-merchant accounts (Affiliate accounts) must be activated to start collecting or disbursing payments. + +You can invite your Affiliate partners/Sub-merchants directly using the Dashboard. You can also encourage businesses to sign up for Razorpay products by sharing referral links on social media and instant messengers. + +## Add Sub-merchants Using Email Id + +You can invite Sub-merchants using their email id to sign up and register on Razorpay. You can send an invite link to an individual account or multiple accounts. + +> **INFO** +> +> +> **Handy Tips** +> +> You can send a maximum of 1,00,000 invites/day. This could be individual invites, bulk invites or a combination of both. +> + +### Add One Sub-merchant + + +### To invite a new Sub-merchant using email id: + + 1. Log in to the Dashboard. + 2. Click **Partner** and navigate to **Affiliate Accounts**. + 3. Select the **Payments** or **RazorpayX** tab depending on the product you want to refer your affiliate. + 4. Click **+ Add New Clients**. + ![Service Partners - add new clients](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-reseller-add-client.jpg.md) + 5. Under the **Using Email** tab, enter the **Client Name**, **Email ID** and **Contact number** (_optional_) to which the invite link must be sent. Click **Next**. + ![Service Partners - enter client details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-add_sub_merchant.jpg.md) + 6. If you want to perform KYC for your client, select **Yes, I will assist my client with their KYC** and click **Send Invite**. + ![Service Partners - perform client KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-add-sumb-do-kyc.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> We recommended you to perform KYC for your Sub-merchants as it decreases onboarding time by 50% and acts as a value added service. Know how to [perform KYC for your Sub-merchants](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/service-partners/perform-kyc.md). During onboarding, your client will see a consent screen to allow you access to perform KYC. They need to approve it for you to submit the KYC form on their behalf. +> ![KYC consent form during Sub-merchant onboarding.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-consent-screen.jpg.md) +> + + + +### Bulk Upload Multiple Sub-merchants + +You can send invites to multiple users using the **Bulk Upload** option. Upload an XLSX or CSV file with the Dashboard's required data. This sends a single sign up invitation link to multiple affiliate accounts in bulk. This enables your Sub-merchants to sign up and register on Razorpay. + + +### Bulk Upload Template + + To view and understand the file format requirements, download the [sample template](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample_invite_submerchant_batch.xlsx.md). The account creation template contains the following headers. + + `account_name` _optional_ + : Name of the Sub-merchant's account. + + `email` _mandatory_ + : The email address of the Sub-merchant. + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - Do not modify field names/headers (`account_name` and `email`) in a batch as it might result in an upload failure. +> - There should be **only 1** sheet in the file. +> - The size of the file can be up to 50 MB. You can add up to 5,000 rows in a particular file. The links will be processed in the same sequence as listed in the file. +> + + + + +### Add Multiple Accounts Using Bulk Upload Template + + 1. Log in to the Dashboard. + 2. Click **Partner** and navigate to **Affiliate Accounts**. + 3. Select the **Payments** or **RazorpayX** tab depending on the product you want to refer your affiliate. + 4. Click **+ Add New Clients**. + 5. Shift to the **Bulk Upload** tab. + 6. Upload the file. You can drag and drop or **click to upload**. + ![add multiple account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-add-multiple-account.jpg.md) + 7. The file is validated for any associated errors and uploaded to the Razorpay server. Click **Next**. + ![send invite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-send-invite.jpg.md) + 8. If you want to perform KYC for your client, select **Yes, I will assist my client with their KYC** and click **Send Invites** to send invites to your clients via email. + ![Reseller Partners - perform client KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-add-sumb-do-kyc-bulk.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> We recommended you to perform KYC for your Sub-merchants as it decreases onboarding time by 50% and acts as a value added service. Know how to [perform KYC for your Sub-merchants](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/service-partners/perform-kyc.md). During onboarding, your client will see a consent screen to allow you access to perform KYC. They need to approve it for you to submit the KYC form on their behalf. +> ![KYC consent form during Sub-merchant onboarding.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-consent-screen.jpg.md) +> + + + +#### What Happens Next + +Once the file is successfully processed, you will receive the account creation status via email. The email attachment will include both success and/or failure details for each account, including the error code and exact reason for the failure. + + + - The newly added Payments Sub-merchants will appear on your list on the Partner Dashboard with a default **Activation Status** as **Not Submitted**. + - To get started, the Sub-merchants must proceed to complete the [Account Set Up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md) and [KYC Verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#2-submit-kyc-details) processes by using their Razorpay account credentials. + ![email sent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-email-sent.jpg.md) + + + - RazorpayX Affiliates will appear with a default CA status as **Application not initiated**. + - To get started, Sub-merchants must log in to their [RazorpayX Dashboard](https://x.razorpay.com/auth) and initiate Current Account application. + + + +## Add Sub-merchants Using a Referral Link + +Share a referral link with potential Sub-merchants via social media or instant messengers. You can also copy the referral link and send it via email. + + +### To add Sub-merchants using a referral link: + + 1. Log in to the Dashboard. + 2. In the **Partner** section, navigate to **Affiliate Accounts**. + 3. Click **Share Referral Link**. + ![Service Partners - share referral link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-share-referral-link.jpg.md) + 4. For Partner accounts on which X referrals have been activated in the **Share Referral Link** modal, select Razorpay Payments or RazorpayX depending on the product you want to refer an affiliate. + 5. If you want to perform KYC for your client, select **Yes, I will assist my client with their KYC**. + ![Service Partners - share referral link with KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/referral-link-with-kyc.jpg.md) + 6. A drop-down page appears where you can share the link using: + - Copy button: This copies the referral link. You can copy-paste this link and send it via email or instant messaging apps such as WhatsApp. + - Facebook: Click the Facebook icon to share the referral link as a post on your Facebook account. + - Twitter: Click the Twitter icon to send a tweet with the referral link. + - WhatsApp: Click the WhatsApp icon to send a message with the referral link. + 7. If you do not want to perform KYC for your Sub-merchants, select **No, my client will perform KYC on their own**. A **different** referral link will be displayed. You can share this link using the above options. + ![Service Partners - share referral link without KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/referral-link-without-kyc.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> We recommended you to perform KYC for your Sub-merchants as it decreases onboarding time by 50% and acts as a value added service. Know how to [perform KYC for your Sub-merchants](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/service-partners/perform-kyc.md). During onboarding, your affiliate will see a consent screen to allow you access to perform KYC. They need to approve it for you to submit the KYC form on their behalf. +> ![KYC consent form during Sub-merchant onboarding.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-consent-screen.jpg.md) +> + + + Businesses can click on this referral link and sign up as an Affiliate account. As a Service Partner, you will get 0.1% commission for every transaction done by the Affiliate accounts who sign up using this link. + + +## Actions After Inviting + + + Your contact will receive an invite via email and SMS to create a Razorpay account. To get started, the contacts invited for `Payment` products, must proceed to create a Razorpay account and complete account activation and [KYC Verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#2-submit-kyc-details). Sub-merchants invited for `Payments` can be seen under **Payments**. + + **All Invites** + + You can check all the invites sent in the **All Invites** tab. You can resend invites to your contacts. + ![Service Partners - All invites sent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/resellers-all-invites.jpg.md) + + **Accepted Invites** + + To see the contacts that have accepted your invite, switch to the **Accepted Invites** tab. You can check the activation status and request for KYC. + ![Service Partners - Accepted invites](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/resellers-accepted-invites.jpg.md) + + + A RazorpayX affiliate will be displayed with a default CA status as **Application not initiated**. Sub-merchants referred for `RazorpayX powered Current Account` must log in to their [RazorpayX Dashboard ](https://x.razorpay.com/auth) and initiate Current Account application. + + Sub-merchants invited for `Current Account` can be seen under **RazorpayX**: + ![Service Partners - List of affiliate account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/resellers-affiliate-accounts-x.jpg.md) + + +## Sub-merchant Activation Status + +You can track the account activation status of the Sub-merchant on your Dashboard under the **Affiliate Accounts** tab. + +--- +Activated | The account activation status is `Activated` once the KYC documents are successfully verified. The payments made by the affiliate accounts before they submitted the KYC form and documents will be settled to your account. + + + + + + Status | Description + --- + Not Submitted | When you invite the Sub-merchant, and your affiliate account is successfully added, the activation status by default is `Not submitted`. This is the default status. + --- + Instantly Activated | Your affiliate account sets the Razorpay account password and provides contact details, business details, and account details. Once these details are fully verified, the activation status moves to `Instantly Activated`. The Sub-merchants can start accepting payments once the account is instantly activated. However, the settlements will not be enabled. + --- + Under Review| Your affiliate account submits business documents to Razorpay depending on their business type. Razorpay then starts with the KYC review process. This changes the activation status to `Under Review`. + --- + Activated | The account activation status is `Activated` once the KYC documents are successfully verified. The payments made by the affiliate accounts before they submitted the KYC form and documents will be settled to your account. + + + + + + Current Account Status | Description + --- + Application not initiated | Affiliate has not initiated a Current Account application yet. + --- + Application completion pending | Complete CA application is yet to be submitted. + --- + PAN verification in progress | We are verifying the PAN details submitted by your affiliate. Takes about 5-10 minutes to complete. + --- + PAN Verification Failed | Direct your affiliate to enter a valid PAN number that is registered with their business to submit KYC. + --- + Telephonic verification | RazorpayX executive will call the affiliate in a few days for verification. + --- + Razorpay processing | RazorpayX team is verifying the application internally. + --- + Documents pick up pending | Our partner bank’s executive will help the affiliate to fill the forms and collect them. Details will be shared soon. + --- + Account opening in progress | We are working with our partner bank to get the account opened and activated. + --- + Account opened | Current Account is opened. Our team is working on activating the account on RazorpayX. This usually takes 3-5 working days. + --- + Account activated | Current account is now active. + --- + Request Cancelled | Current Account request has been cancelled. + --- + Unserviceable | We are unable to service the Current Account opening request. + --- + Request Rejected | Current Account opening request has been rejected by RazorpayX/partner bank's team. + --- + On hold | Current Account opening request has been put on hold. + --- + Request Received | We have received your request and will contact you to understand your requirements and help you gather the documents required to open a current account. + --- + Process Started | We inform our partner bank RBL to contact you, collect the required documents and take the process further. Documents required to open a Current Account will differ based on your business type. + --- + Bank KYC in progress | Our partner bank has received the documents required to process your request and complete KYC. A Relationship Manager from RBL will contact you if further clarification is needed. + + + + +### Related Information + +- [Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners.md) +- [About Service Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/service-partners.md) +- [Partner Commissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions.md) diff --git a/llm-content/partners/service-partners/add-submerchants/changes.md b/llm-content/partners/service-partners/add-submerchants/changes.md new file mode 100644 index 00000000..b6345dd0 --- /dev/null +++ b/llm-content/partners/service-partners/add-submerchants/changes.md @@ -0,0 +1,43 @@ +--- +title: New Sub-Merchant Invite Flow +description: Know how the process of adding sub-merchants has changed with Razorpay's new update. +--- + +# New Sub-Merchant Invite Flow + +We have recently rolled out a new process for Service Partners to add sub-merchants. This document highlights the major changes in the invitation process. + +> **INFO** +> +> +> **Changes Only for Payments** +> +> These changes are only for referrals of `Payment` products and **NOT** for `Current Account`. The invitation process for RazorpayX remains the same. +> + +## Create Account Link vs Invite Link + +Before | Now +--- +- After inviting your contacts, they received a **Create a Password** link via email to reset the password. +- The sub-merchant's Razorpay account is already created and they just have to log in. Their account will be linked to you as a sub-merchant instantly. + | - After inviting your contacts, they receive a **Create Account** link that will take them to our onboarding page. +- The invitees/contacts should complete the onboarding process with Razorpay by verifying mobile number. The accounts will be added as your sub-merchant after this verification. + +--- +![Service Partners - add sub-merchants - create password link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/resellers-add-subm-create-password.jpg.md) | ![Service Partners - add sub-merchants - create account link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/resellers-add-subm-create-account.jpg.md) + +## Invite Link via SMS + +Before | Now +--- +The invite and **Create a Password** link was sent to the contact only via email. | Providing mobile number while inviting your contacts is still optional. If a mobile number is provided, invite link is sent via SMS as well. + +## View Sent Invites + +Before | Now +--- +The **Affiliate Accounts** section contained a list of all sub-merchants added with the activation state. | The **Affiliate Accounts** section is split into 2: - **All Invites**: Contains a list of all contacts invited. It does not show the activation status. +- **Accepted Invites**: Contains a list of all contacts that have accepted your invite and created a Razorpay account. You can view the activation status and take KYC related actions. + +![Service Partners - Accepted invites](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/resellers-accepted-invites.jpg.md) diff --git a/llm-content/partners/service-partners/perform-kyc.md b/llm-content/partners/service-partners/perform-kyc.md new file mode 100644 index 00000000..0752a8bc --- /dev/null +++ b/llm-content/partners/service-partners/perform-kyc.md @@ -0,0 +1,126 @@ +--- +title: Razorpay Partners | Client KYC +heading: Perform Client KYC +description: Know how to perform KYC for your clients from the Partner Dashboard. +--- + +# Perform Client KYC + +Offer a smooth onboarding experience by assisting your client with their KYC. +You can request KYC access from your client: +- [When sending an invite](#request-kyc-access-when-sending-an-invite) +- [During client onboarding](#request-kyc-access-during-client-onboarding) + +After the client approves your request, you can [perform their KYC](#perform-kyc). + +#### Advantages + +- **Decreases Onboarding Time by 50%** + + Partner performing KYC for sub-merchants decreases onboarding time by half and ensures a seamless onboarding experience. +- **Value Added Service** + + Partner performing KYC acts as a delight feature for your clients. + +## Request KYC Access When Sending an Invite + +You can request to perform KYC for your client when inviting them. During onboarding, your client will see a consent screen to allow you the access to perform KYC. They need to approve it for you to submit the KYC form on their behalf. + +![KYC consent form during client onboarding.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-consent-screen.jpg.md) + +### Invite Using Email + +When inviting a client using email, you can opt in to assist their KYC by selecting **Yes, I will assist my client with their KYC** in the **Assist the client with their KYC screen**. + +![Service Partners - perform client KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-add-sumb-do-kyc-bulk.jpg.md) + + +### To request KYC access when sending an invite using an email: + + 1. Log in to the Dashboard. + 2. Click **Partner** and navigate to **Affiliate Accounts**. + 3. Select the **Payments** or **RazorpayX** tab depending on the product you want to refer your affiliate. + 4. Click **+ Add New Clients**. + ![Service Partners - add new clients](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-reseller-add-client.jpg.md) + 5. Under the **Using Email** tab, enter the **Client Name**, **Email ID** and **Contact number** (_optional_) to which the invite link must be sent. Click **Next**. + ![Service Partners - enter client details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-add_sub_merchant.jpg.md) + 6. Select **Yes, I will assist my client with their KYC** and click **Send Invite**. + + +### Invite using Referral Link + +When inviting a client using referral link, you can opt-in to assist their KYC by selecting **Yes, I will assist my client with their KYC**. This will generate a new link initiating a request for KYC access from the client during the onboarding process + +![Service Partners - share referral link with KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/referral-link-with-kyc.jpg.md) + + +### To request KYC access when inviting using referral link: + + 1. Log in to the Dashboard. + 2. In the **Partner** section, navigate to **Affiliate Accounts**. + 3. Click **Share Referral Link**. + ![Service Partners - share referral link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-share-referral-link.jpg.md) + 4. For Partner accounts on which X referrals have been activated in the **Share Referral Link** modal, select Razorpay Payments or RazorpayX depending on the product you want to refer an affiliate. + 5. Select **Yes, I will assist my client with their KYC**. + 6. A drop-down page appears where you can share the link using: + - Copy button: This copies the referral link. You can copy-paste this link and send it via email or instant messaging apps such as WhatsApp. + - Facebook: Click the Facebook icon to share the referral link as a post on your Facebook account. + - Twitter: Click the Twitter icon to send a tweet with the referral link. + - WhatsApp: Click the WhatsApp icon to send a message with the referral link. + + +## Request KYC Access During Client Onboarding + +You can request and re-request KYC access during your client's onboarding journey. + +> **WARN** +> +> +> **Watch Out** +> +> You can only raise 3 requests per client for completing the KYC on their behalf. If the client declines all the 3 requests, you cannot send any more requests. +> + +To request KYC access: + +1. In the **Affiliate Accounts** section of your Dashboard, click **Request for KYC** under the **Actions** column for the client you want to perform KYC. + ![request kyc](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-dashboard-affiliates.jpg.md) +2. After you click on **Request for KYC**, a side panel opens. Click **Request for KYC access** to raise a request. You can also find link to documentation for documents required for KYC in the side panel. + ![request kyc access](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/request-kyc.jpg.md) + +## Perform KYC + +After you request for KYC access: + +1. The client receives an email to approve or reject the KYC request. + ![](/docs/assets/images/x-partnerships-approval-email.jpg) +2. If the client approves the request, you can fill in the KYC details from the Partner Dashboard by clicking on **Perform KYC**. You can check the [KYC access request status](#check-kyc-access-request-status) on the Partner Dashboard. + ![Business Details - Submit KYC Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/easy-submit.jpg.md) +3. You can view the activation statuses as shown here: + ![activation status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-activation-status.jpg.md) + +## Check KYC Access Request Status + +You can view the status of request on the Partner Dashboard under the **Actions** tab. Refer to the table below for all statuses and their description. + +Action | Description +--- +Request Merchant for KYC access | Approval required to view Merchant KYC +--- +Request approved by Merchant | Merchant has approved the KYC access request +--- +Request expired | New KYC access request needs to be initiated by Partner +--- +Waiting for Merchant approval | Merchant approval for KYC access is pending +--- +Request rejected by Merchant once | Merchant has rejected your KYC access request +--- +Request rejected by Merchant twice | Merchant has rejected your KYC access request 2 times. You can request for access only one more time, if the merchant still doesn't approve, you wont be able to send the request again. +--- +Request rejected by Merchant thrice | Merchant has rejected your KYC access request multiple times. Now, only the merchant can perform their KYC through their Dashboard. +--- + +### Related Information + +- [Add clients](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/service-partners/add-submerchants.md) +- [About Service Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/service-partners.md) diff --git a/llm-content/partners/technology-partners.md b/llm-content/partners/technology-partners.md new file mode 100644 index 00000000..c35973c8 --- /dev/null +++ b/llm-content/partners/technology-partners.md @@ -0,0 +1,42 @@ +--- +title: Technology Partners for Platforms & Marketplaces +heading: Technology Partners +description: Offer end-to-end payment solutions to businesses on your platform. +--- + +# Technology Partners + +You can become a Razorpay Technology partner if you are a marketplace or a platform that connects buyers with sellers. You must complete the below steps to start earning commissions as a Technology Partner. + +## Example + +Assume the following: +- acmecorp.in is a marketplace & Razorpay Technology Partner. +- Gekko & Co is a business that sells ceramics online. + +acmecorp.in gives the option of accepting payments via Razorpay products to Gekko & Co. In case Gekko & Co chooses to use Razorpay, acmecorp.in earns commissions. + +## Get Started + +To make referrals: + +1. **Become a Technology Partner** + [Create a Partner account](https://razorpay.com/partners/) and request for a partner type [switch to Technology Partner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/become-technology-partner.md). + +2. **Complete KYC** + [Complete KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/kyc.md) by submitting the necessary documents. + +3. **Integrate with our APIs** + Integrate with our APIs using [Razorpay OAuth](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth.md). + +4. **Test the flow** + Create a sample sub-merchant account and test the end-to-end flow based on your use case. Contact our [integrations team](mailto:integrations@razorpay.com) for any issues during testing. + +5. **Go live** + Launch the integration on your platform and enable your businesses to reap the benefits of a powerful payments system. + +You are now a successful Razorpay Technology Partner. You can start referring clients to Razorpay. Know more about your [Earnings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/commissions.md). + +### Embedded Payments + +You can further choose to integrate with Embedded Payments. Using this, you can onboard businesses, process payments and control the flow of funds from within your platform. Know more about [Embedded Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/embedded-payments.md). diff --git a/llm-content/partners/technology-partners/become-technology-partner.md b/llm-content/partners/technology-partners/become-technology-partner.md new file mode 100644 index 00000000..6bc8f6b7 --- /dev/null +++ b/llm-content/partners/technology-partners/become-technology-partner.md @@ -0,0 +1,46 @@ +--- +title: Become a Razorpay Technology Partner +heading: Become a Technology Partner +description: Submit a request to become a Razorpay Technology Partner to offer a seamless payment experience for your clients within your website/app. +--- + +# Become a Technology Partner + +All Partners are onboarded as Service Partners by default. You can request a switch if you have a use case for the Technology Partner type. Know how to become a [Razorpay Partner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/new-to-razorpay.md). + +## Request a Switch + +To request a Partner type switch: + +1. Log in to the Dashboard. +2. Navigate to **Partner** → **Home**. +3. Click **Explore Now**. + ![Initiate Partner type switch](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-type-switch-explore-now.jpg.md) +4. On the **Tell us more about the services you provide** page, select the relevant business type and click **Next**. + ![Partner type switch - What services do you offer?](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-type-switch-services-offered.jpg.md) +5. If your business type is best suited for the Service Partner type, you will see the below screen. + ![Partner type switch denied](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-type-switch-denied.jpg.md) +6. If a different Partner type is more suitable for your business, you will see the below screen. + ![Partner type switch - evaluate business use case](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-type-switch-evaluate-usecase.jpg.md) +7. Select **Yes** if you have a product to manage payments for your sub-merchants and click **Next**. +8. Enter your phone number, website URL, and business details, and click **Next**. + ![Partner type switch - fill in details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partner-type-switch-business-details.jpg.md) + +You have successfully submitted a request for a Partner type switch. Our team will reach out to you with further instructions. + +## Next Steps + +If your switch request is approved, you will have to complete [full KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/kyc.md) to start receiving commissions. + +> **WARN** +> +> +> **Watch Out!** +> +> Filling out the form does not guarantee a Partner type switch. Our team will evaluate your use case and contact you for more information. This process can take around 2 to 3 weeks. +> + +### Related Information + +- [About Embedded Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners.md) +- [Submit KYC Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/kyc.md) diff --git a/llm-content/partners/technology-partners/control-of-funds.md b/llm-content/partners/technology-partners/control-of-funds.md new file mode 100644 index 00000000..c0ae7a05 --- /dev/null +++ b/llm-content/partners/technology-partners/control-of-funds.md @@ -0,0 +1,109 @@ +--- +title: Control Flow of Funds for Embedded Payments for Platforms & Marketplaces +heading: Control Flow of Funds +description: Collect platform and third-party fees from your customers and route them to third-parties. +--- + +# Control Flow of Funds + +As a platform with a multi-party business model, you can charge a fee for your platform or any third parties involved. Your sub-merchants may or may not have multiple third-parties involved for their processes. The money movement differs based on the number of parties involved. Control of Funds enables the sub-merchant to seamlessly disburse money, per order, with reports, avoiding the hassle and confusion with settlements. The examples explain the money movement in the presence and absence of a third-party. + + +### Example #1 + + Assume the following: + + - _AcmeShop_ is a marketplace for clothes. - **Razorpay Technology Partner** + - _Rani Wear_ is one of the many sellers on _AcmeShop_. - **Sub-Merchant** + - _Deldel_ is a delivery service. - **Third-party Service** + - _Gauri Kumari_ is a buyer. + + Scenario: + + - _Gauri_ buys a scarf from _AcmeShop_. She pays a sum of ₹ 1200 for her order. + - The payment is processed and accepted by _Rani Wear_'s Razorpay account and then the sum is divided and credited to the following: + - _AcmeShop_ Fee = ₹ 50 + - Delivery Fee for _Deldel_ = ₹ 200 + - Razorpay Charges = ₹ 20 + - _Rani Wear_ Bank Account = ₹ 930 + + +Below image illustrates the money movement when a third-party is involved. + +![money movement flow with third-party](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cof-partners-third-party-fees.jpg.md) + + +### Example #2 + + Assume the following: + + - _AcmeBook_ is an accounting platform that enables payment acceptance. - **Razorpay Technology Partner** + - _Mulchand Kirana_ is one of the users on _AcmeBook_. - **Sub-Merchant** + - _Gauri Kumari_ is a buyer. + + Scenario: + + - _Gauri_ buys some kitchen groceries from _Mulchand Kirana_. She pays a sum of ₹ 1000 for her order. + - The payment is processed and accepted by _Mulchand Kirana_'s Razorpay account and then the sum is divided and credited to the following: + - _AcmeBook_ Fee = ₹ 50 + - Razorpay Charges = ₹ 20 + - _Mulchand Kirana_ Bank Account = ₹ 930 + + +Below image illustrates the money movement only with partner fee, when no third-party is involved. + +![money movement flow with partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cof-partners-partner-fee.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> Razorpay deducts TDS for platform charges. Any GST implication for the sale of products/services has to be borne by the sellers and partners. +> + +## Use Cases + +Below are some of the most common use cases for control of funds with embedded payments. + + +### Education + + AcmeVidya is an e-learning platform that offers certifications and diplomas to students and working professionals. It hosts a range of courses provided by different institutions and instructors. + + - AcmeVidya becomes Razorpay's Technology partner. + - The instructors and institutes are added as sub-merchants. + + Assume a student pays ₹ 6000 for a diploma course provided by an instructor, _Sarah Will_. + Sarah receives the amount on her Razorpay account. After transferring Razorpay's platform fee of ₹ 120 and any other third-party fee (maybe an exam center), of ₹ 1500, Razorpay settles the remaining amount of ₹ 4380 to Sarah's bank account. + + + +### Hospitality & Travel + + AcmeTrips is a air-tickets and hotel booking platform. It lists the best offers along with other amenities provided by hotels and airlines. + + - AcmeTrips becomes Razorpay's Technology partner. + - The airlines and hotel groups are added as sub-merchants. + - Other vendors, like outsourcing cab service - are third-parties. + + Assume you pay ₹ 4000 for a room for one night in Mumbai's Presidency hotel. You have opted for the hotel's pick-up and drop services. The hotel receives the amount on their Razorpay account. After transferring Razorpay's platform fee of ₹ 80 and a charge of ₹ 1000 to an out-sourced cab company, Razorpay settles the remaining amount of ₹ 2920 to the hotel's bank account. + + +## Prerequisites + +To support the money movement flow: +1. Get the `platforms_marketplaces` tag enabled on your Partner account through your sales point of contact. +2. If you are charging a Platform fee, create a Linked Account for your merchant account and add your bank account details. +3. Create a Linked Account for your third-party service providers, if any (for example, logistics partners). Add their bank account details. + +## Collect Platform and Third-Party Fees + +After creating Linked Accounts, you can create payments on your sub-merchant accounts with your platform fees. + +To collect platform and third-party fees: + +1. [Set up Platform and Third-Party Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/control-of-funds/set-up-accounts.md) +2. [Process Platform and Third-Party Fees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/control-of-funds/process-fees.md) + +You can also create [refunds and reversals](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/control-of-funds/refunds-and-reversals.md) for transactions. diff --git a/llm-content/partners/technology-partners/control-of-funds/process-fees.md b/llm-content/partners/technology-partners/control-of-funds/process-fees.md new file mode 100644 index 00000000..760a4294 --- /dev/null +++ b/llm-content/partners/technology-partners/control-of-funds/process-fees.md @@ -0,0 +1,207 @@ +--- +title: Process Platform and Third-Party Fees | Technology Partners +heading: Process Platform and Third-Party Fees +description: Process platform and third-party fees and transfer them to your Linked Accounts. +--- + +# Process Platform and Third-Party Fees + +After setting up the platform and third-party accounts, you can deduct your platform and third-party fees from the transaction amount while creating an order. After the payment is captured and the order is paid, transfers are automatically created and settled to the respective Linked Accounts. + +## Create Transfers from Orders + +You can transfer platform and third-party fees when creating an order using the Orders API. Pass the `transfers` parameters as a part of the Order API request body. + +Use the `access_token` generated in the [build integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps.md#22-get-access-token) step to authenticate using `Bearer Auth`. + +The following endpoint lets you transfer the funds while creating an order. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders \ +-H 'Authorization: Bearer ' \ +-H 'content-type: application/json' +-d '{ + "amount": 1000000, + "currency": "INR", + "transfers": [ + { + "account": "acc_KD088uBnQf0XeK", + "amount": 800000, + "currency": "INR", + "notes": { + "account": "Seller Account" + }, + "linked_account_notes": [ + "account" + ] + }, + { + "account": "acc_KD097GTiIju5WG", + "amount": 150000, + "currency": "INR", + "on_hold": true, + "notes": { + "account": "3PL Account" + }, + "linked_account_notes": [ + "account" + ] + }, + { + "account": "acc_KD09wcp6WYoLkC", + "amount": 50000, + "currency": "INR", + "on_hold": true, + "notes": { + "account": "Acme Account" + }, + "linked_account_notes": [ + "account" + ] + } + ] +}' + +```json: Response +{ + "id": "order_KIXh9qnUDSP2w1", + "entity": "order", + "amount": 1000000, + "amount_paid": 0, + "amount_due": 1000000, + "currency": "INR", + "receipt": null, + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1663324917, + "transfers": [ + { + "id": "trf_KIXh9v2aie0iPT", + "entity": "transfer", + "status": "created", + "source": "order_KIXh9qnUDSP2w1", + "recipient": "acc_KD088uBnQf0XeK", + "amount": 800000, + "currency": "INR", + "amount_reversed": 0, + "notes": { + "account": "Seller Account" + }, + "linked_account_notes": [ + "account" + ], + "on_hold": false, + "on_hold_until": null, + "recipient_settlement_id": null, + "created_at": 1663324917, + "processed_at": null, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_KIXh9v2aie0iPT", + "source": null, + "metadata": null + } + }, + { + "id": "trf_KIXh9xbsUUaFwz", + "entity": "transfer", + "status": "created", + "source": "order_KIXh9qnUDSP2w1", + "recipient": "acc_KD097GTiIju5WG", + "amount": 150000, + "currency": "INR", + "amount_reversed": 0, + "notes": { + "account": "3PL Account" + }, + "linked_account_notes": [ + "account" + ], + "on_hold": true, + "on_hold_until": null, + "recipient_settlement_id": null, + "created_at": 1663324917, + "processed_at": null, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_KIXh9xbsUUaFwz", + "source": null, + "metadata": null + } + }, + { + "id": "trf_KIXh9yfD5pSrmg", + "entity": "transfer", + "status": "created", + "source": "order_KIXh9qnUDSP2w1", + "recipient": "acc_KD09wcp6WYoLkC", + "amount": 50000, + "currency": "INR", + "amount_reversed": 0, + "notes": { + "account": "Acme Account" + }, + "linked_account_notes": [ + "account" + ], + "on_hold": true, + "on_hold_until": null, + "recipient_settlement_id": null, + "created_at": 1663324917, + "processed_at": null, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_KIXh9yfD5pSrmg", + "source": null, + "metadata": null + } + } + ] +} +``` + +Pass the Linked Account id of the receiver of the transfer in the `account` parameter under the `transfers` object. +- To transfer the platform fees, add the Linked Account id of your platform. +- To transfer the third-party fees, add the Linked Account id of the corresponding third party. + +The parameter descriptions and errors are present in the [Create Transfers from Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md) documentation. + +## Set Up Webhooks + +To receive notifications on when a transfer is processed, set up the [`transfer.processed` webhook event](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md). Check the [sample payload for Transfer Processed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/route.md#transfer-processed). + +> **WARN** +> +> +> **Watch Out!** +> +> - You cannot create transfers on an order which has `partial_payment` parameter enabled. Ensure that this parameter is set to `0`. +> - You cannot create transfers on an order for international currencies. Currently, this feature is available for INR only. +> - If a **Transfer via Order** initiated by you fails, we will retry this transfer starting from the next day on consecutive days. There will be a maximum of 3 retries. +> + +## Related Information + +- [Set up Platform and Third-Party Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/control-of-funds/set-up-accounts.md) +- [Refunds and Reversals](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/control-of-funds/refunds-and-reversals.md) diff --git a/llm-content/partners/technology-partners/control-of-funds/refunds-and-reversals.md b/llm-content/partners/technology-partners/control-of-funds/refunds-and-reversals.md new file mode 100644 index 00000000..0cbfd186 --- /dev/null +++ b/llm-content/partners/technology-partners/control-of-funds/refunds-and-reversals.md @@ -0,0 +1,33 @@ +--- +title: Refunds and Reversals | Technology Partners +heading: Refunds and Reversals +description: Process refunds and reversals using APIs. Refund the base transaction amount and reverse platform and third-party fees. +--- + +# Refunds and Reversals + +You can create refunds and reversals in 2 cases: +- **The base transaction amount is refunded** + + You can refund the base transaction amount with or without reversing the platform and third-party fees. + +- **The platform and third-party fees are reversed** + + You can reverse the platform and third-party fees with or without refunding the base transaction amount. + +### Create Refund Without Reversals + +To create refunds without reversals, you can process [Normal Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md#create-a-normal-refund) or [Instant Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md#create-an-instant-refund ) using our APIs. Know more about [Instant Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/instant.md). + +### Create Refund With Reversals + +Sub-merchants can process refunds from their Dashboards. Alternatively, you (the Platform) can process refunds on behalf of sub-merchants. If you are processing the refund, you can specify whether the platform fees should also be refunded or not using the [Refund Payments and Reverse Transfer from a Linked Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md) API. + +### Create Reversals Only for Platform or Third-Party Fees + +Every platform fee or third-party fee is linked with a Transfer. To reverse the platform or third-party fees, use the [Reverse a Transfer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/reverse-a-transfer.md). + +## Related Information + +- [Set up Platform and Third-Party Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/control-of-funds/set-up-accounts.md) +- [Process Platform and Third-Party Fees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/control-of-funds/process-fees.md) diff --git a/llm-content/partners/technology-partners/control-of-funds/set-up-accounts.md b/llm-content/partners/technology-partners/control-of-funds/set-up-accounts.md new file mode 100644 index 00000000..5b1b2e54 --- /dev/null +++ b/llm-content/partners/technology-partners/control-of-funds/set-up-accounts.md @@ -0,0 +1,111 @@ +--- +title: Set up Platform and Third-Party Accounts | Technology Partners +heading: Set up Platform and Third-Party Accounts +description: Set up platform and third-party accounts and collect fees from customers. +--- + +# Set up Platform and Third-Party Accounts + +To transfer funds to various third parties, sub-merchants, bank accounts or vendors, you need to add them as Linked Accounts. + +You can create Linked Accounts using [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md#add-and-manage-linked-accounts) and [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md). + +When you add a Linked Account, you gain complete visibility and control of all the fund movements such as transfers, reversals and refunds for each of your Linked Accounts. + +Every Linked Account has a unique `account_id` which should be stored in your database. This ID should be sent in the various APIs described in other sections to identify the Linked Account. + +> **WARN** +> +> +> **Watch Out!** +> +> After being added, the Linked Account gets activated immediately and funds can be transferred right away. However, it takes 2 working days for Linked Account settlements, irrespective of your settlement schedule. +> + +## Penny Testing + +To avoid settlement failure, we will penny test Linked Accounts when added. Razorpay will transfer a nominal amount to the bank account details submitted to verify them. Transfers are allowed only on successful validation. This will be performed on the newly created Linked Accounts and the existing accounts when the bank account details are updated via the Dashboard. + +Know more about [penny testing](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/faqs.md#penny-testing). + +## Required Details + +We collect the following details while adding the account: + +`Primary details` +: - Linked Account name + - Contact number + +`Bank details` +: - Account number + - Account type + - IFSC + - Beneficiary name + +## Add and Manage Linked Accounts + +Watch this video to see how to add Linked Accounts. + +[Video: https://www.youtube.com/embed/aLLI9UwNMl0?si=59o-Z7p8Z2gdvhl8] + +> **WARN** +> +> +> **Watch Out!** +> +> For Mutual Funds Distributors (MFDs), Linked Accounts with their Asset Management Company (AMC) details are automatically created after they get access to the Route. MFDs do not need to create any Linked Accounts from the Dashboard. Please get in touch with our [support team](https://razorpay.com/support/) for any help on creating Linked Accounts. +> + +To create a Linked Account: + +1. Log in to the Dashboard and click **Route** under **PAYMENT PRODUCTS**. +2. Click **Accounts** tab, and then click **+ Add Account**. + + ![](/docs/assets/images/route-account.jpg) +3. Enter the **Account Name** and **Account Email** in the **Add Account** pop-up page. +4. If you want to enable the Dashboard access for the Linked Account, turn on the toggle bar. +5. Click **Add**. + + ![](/docs/assets/images/route-add-linked-account.jpg) + +6. On the **KYC Form** pop-up page, enter **Business Details** and **Bank Account Details**, and then click **Submit Form**. + + ![](/docs/assets/images/route-add-account-kyc.jpg) + +The Linked Account is added successfully. + +## Grant Dashboard Access to Linked Accounts + +You can grant Dashboard access to your Linked Accounts. The Linked Account can log in to the Dashboard with the email address provided at the onboarding time. + +The recipient Linked Account is notified via an email along with a password reset option. + +> **WARN** +> +> +> **Watch Out!** +> +> - While you can create a Linked Account without adding their email, you cannot grant them Dashboard access. The access can be granted or provided only after you add the email address of the Linked Account. +> ![](/docs/assets/images/route-la-email.jpg) +> - As a Linked Account user, you cannot access the Linked Account Dashboard unless the primary account owner adds you as a team member from their Linked Account Dashboard. +> + +## Enable Refunds Capability + +Due to government regulations, in certain cases, the Linked Accounts need to directly process refunds to customers. You can enable refunds capability while adding a new account. + +To enable refunds capability for an existing account: +1. Navigate to the **Accounts** tab. +2. Turn on the **Allow Refunds** toggle against the relevant account. + +## Enable Refund Credits + +Refund Credits help the Linked Account to process customer refunds from a dedicated funds than using the unsettled balance. You can enable Refund Credits for a Linked Account by sending an email to your Razorpay account manager with these details: +- Linked account name +- Email ID +- Balance type (Refund Credit) + +## Related Information + +- [Process Platform and Third-Party Fees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/control-of-funds/process-fees.md) +- [Refunds and Reversals](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/control-of-funds/refunds-and-reversals.md) diff --git a/llm-content/partners/technology-partners/embedded-payments.md b/llm-content/partners/technology-partners/embedded-payments.md new file mode 100644 index 00000000..82a03ceb --- /dev/null +++ b/llm-content/partners/technology-partners/embedded-payments.md @@ -0,0 +1,82 @@ +--- +title: Embedded Payments for Platforms & Marketplaces +heading: Embedded Payments +description: Offer end-to-end payment solutions to businesses on your platform. +--- + +# Embedded Payments + +With Embedded Payments, you can onboard businesses, process payments and control the flow of funds from within your platform. + +Watch this video to know more about Embedded Payments: + +[Video: https://www.youtube.com/embed/90WY0Gb8Pdc] + +## Use Cases + +Embedded Payments is best suited for businesses with a multi-party business model as it optimises the money movement flow for all the parties involved. + + + Platforms offering software services like ERP, CRM, storefront creation, and accounting can use Embedded Payments to unify payment processing. + + Example: Shopify allows sellers to set up online stores and accept payments from their customers using Razorpay. Shopify can charge a fixed monthly fee or a percentage fee on transactions through its platform. + + + Businesses that connect sellers and service providers with buyers can use Embedded Payments to accept payments from buyers and route them to different third-party vendors. + + Example: Etsy enables artists to sell their artwork online. From the amount received from customers, Etsy charges their fee, routes the delivery fees to the logistics partner, and the remaining to the artists. + + + You can monetise your social or content platform using Embedded Payments. + + Examples: Conversational platforms like WhatsApp, intermediary content platforms like Medium, and other sub-stacks. WhatsApp Business allows businesses to sell on its platform. WhatsApp can onboard businesses, accept customer payments, and control the flow of funds from their platform. + + +![Money movement flow on Embedded Payments for Platforms & Marketplaces](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rzp-marketplaces-money-movement-flow.jpg.md) + +## Why Embedded Payments + +Embedded Payments enables you to control all components of payment processing without having to build complex payment systems or worry about compliance. + + + - Onboard businesses seamlessly to Razorpay Payments. + - Add your branding elements, like colour and logo using our **Co-branded UI**. + - Our conversion-optimised UI simplifies the onboarding of sub-merchants. + - Works on all web and mobile applications like iOS, Android, React, and so on. + - Go to market quicker with lightweight integration. + + Know more about [onboarding businesses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses.md). + + + - Enable businesses on your platform to accept payments through multiple payment methods and channels. + - Provide a smooth payment experience across different devices and channels, supporting over 100 payment methods. + - Offer a robust checkout experience with features like saved cards, native OTP, custom sub-merchant branding, and more. + - Achieve industry-leading success rate with dynamic routing across acquirers. + - Expand your sub-merchant's customer base with our [EMI² Suite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi².md). Offer Cardless EMI and Pay Later payment methods. + + Know more about [processing payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/process-payments.md). + + + - Control settlements to sub-merchants based on the delivery of goods or services. + - Split funds with third parties involved. For example, the sub-merchant, logistics partner and the platform. + - Leverage pre-built workflows and APIs to manage Refunds, Disputes and Chargebacks. + - Track Settlements via APIs, Dashboard and scheduled reports using UTR (Unique Transaction Reference). + + Know more about [controlling the flow of funds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/control-of-funds.md). + + + - APIs and custom reports for the platform to reconcile Payments, Refunds, and Settlements across all stakeholders. + - Enable Sub-merchant to view and manage Payments, Settlements, Refunds and more from the Dashboard. + - Dashboard for third-parties to view and manage their fees and commissions. + - sub-merchant and third-parties can receive scheduled reports in their inboxes. + + Know more about [reports and reconciliation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/reports-and-reconciliation/partner.md). + + + +### Related Information + +- [Onboarding Businesses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses.md) +- [Process Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/process-payments.md) +- [Control the Flow of Funds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/control-of-funds.md) +- [Reports and Reconciliation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/reports-and-reconciliation/partner.md) diff --git a/llm-content/partners/technology-partners/kyc.md b/llm-content/partners/technology-partners/kyc.md new file mode 100644 index 00000000..4d00c329 --- /dev/null +++ b/llm-content/partners/technology-partners/kyc.md @@ -0,0 +1,90 @@ +--- +title: Submit KYC | Technology Partners +heading: Submit KYC Details +description: Submit KYC details to complete the onboarding process. Check how to provide clarifications and successfully activate your account. +--- + +# Submit KYC Details + +After becoming a Technology Partner, you need to submit KYC details. The commission is settled in your account only after completing the KYC process. + +> **INFO** +> +> +> **Handy Tips** +> +> - In the KYC verification process, you can provide the required information in any order you prefer. +> - You can view the details submitted during account creation and make changes if required. +> - Review the details provided during the sign-up process. You can edit the fields and make necessary changes if required. +> + +![Complete KYC Verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/easy-kyc.jpg.md) + +## Activate Your Account + +Follow the steps given below to activate your account: + +> **WARN** +> +> +> **Watch Out!** +> +> The fields under Bank Details, GST Details, and Business Documents will differ based on your business type. +> + +1. **Bank Details**: Fill in your bank account details such as **Account Number** and **IFSC Code**. This is the account to which Razorpay will settle your funds. +. Click **Done**. + ![Business Details - Enter Bank Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/easy-account.jpg.md) +2. **GST Details**: This will be auto-filled if your [PAN verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/business-types-kyc-documents.md) is successful. If not, add your GST details for taxation and compliance. Select the check box if you do not have a GSTIN. Click **Done**. + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot claim GST input credit if GSTIN is not shared. +> + + ![Business Details - Enter CIN and GSTIN](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/easy-gst.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> Extra fields may appear based on your business type. +> - For LLP: LLPIN (Limited Liability Partnership Identification Number) +> - For Public and Private Ltd: CIN (Corporate Identification Number) +> + + +3. **Identity Proof** or **Address Proof**: You can scan and upload your **Aadhaar**, **Passport** or **Voter ID** as proof of identity or address. + +4. **Business Documents**: Upload the relevant [business documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/business-types-kyc-documents.md) based on your business type. + ![Add business documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/easy-documents.jpg.md) +5. **Business Address**: Add your business address. Select the check box if your **Operational address is same as your Business address**. This will be verified against your business documents. + +> **INFO** +> +> +> **Handy Tips** +> +> Operational Address is the current address from where you are operating your business. On the other hand, a Business Address is the address you register while starting your business. +> + + ![Add your registered business address](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/easy-address.jpg.md) +6. Click **Done**. +7. Click **Submit KYC** after providing all the required verification details. + ![Business Details - Submit KYC Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/easy-submit.jpg.md) + +Our team will review the information submitted by you. It takes approximately 3-4 working days to complete the review process. + +## Provide Clarification + +During the review process, we may reach out to you for clarifications. You can address these queries on the Dashboard. + +### Related Information + +- [About Embedded Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners.md) +- [KYC Documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/business-types-kyc-documents.md) diff --git a/llm-content/partners/technology-partners/onboard-businesses.md b/llm-content/partners/technology-partners/onboard-businesses.md new file mode 100644 index 00000000..a2b643ea --- /dev/null +++ b/llm-content/partners/technology-partners/onboard-businesses.md @@ -0,0 +1,96 @@ +--- +title: Onboard Businesses for Embedded Payments +heading: Onboard Businesses +description: Use Razorpay's Co-branded Onboarding UI and seamlessly onboard businesses to your Platform or Marketplace. +--- + +# Onboard Businesses + +Co-branded onboarding is a pre-built UI for Razorpay Partners that assists in building a native business onboarding flow. It enables Partners to onboard clients to Razorpay right from their platform. + +Co-branded Onboarding UI offers customisation for Partners to configure colour, theme, logo and brand name to mimic your platform environment. + +You can integrate with: +- [Standard Co-Branded Onboarding](#standard-co-branded-onboarding) +- [Custom Onboarding SDK](#custom-onboarding-sdk) + +> **INFO** +> +> +> **Feature Request** +> +> This feature is enabled on demand. Raise a request with our [Partnerships team](mailto:partners@razorpay.com) or your Razorpay point-of-contact to get this feature activated. +> + +![Custom onboarding experiences - Embedded Payments for Platforms & Marketplaces](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/platforms-and-market-places-custom-onboarding-exp.jpg.md) + +## Prerequisites + +- [Sign up as Partner](https://razorpay.com/partners/) and complete KYC to activate your account. Request for a partner type [switch to Technology Partner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/become-technology-partner.md). +- Get the Co-branded UI capability enabled for your account by contacting our [Partnerships team](mailto:partners@razorpay.com). +- [Register your application](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps.md#1-create-an-application) on Razorpay. +- Embed a button redirecting the user to the Razorpay OAuth page on the front-end interface for your app. +- Keep a redirect URL ready. Razorpay will redirect users to this URL after they complete the onboarding process. + +## Standard Co-Branded Onboarding + +Standard co-branded onboarding is the simplest and quickest way to onboard customers using Razorpay embedded onboarding. + +You need to embed a Razorpay hosted co-branded onboarding URL within your platform. The user uses this URL to initiate the onboarding process. + +### How it Works + +The onboarding starts and ends within your platform while taking the user through a Razorpay-hosted onboarding journey that you can customise per your needs. + +Watch the video below to see how the co-branded onboarding journey looks for your client. + +[Video: https://www.youtube.com/embed/-232gU8kB9Q?si=bq8eV1xj5MCFnayj] + + +### Workflow for Standard Co-Branded Onboarding + +1. As a Partner, you create an application on your Dashboard and download your client credentials. +2. The client visits the section of your platform with the embedded Razorpay Payments setup. +3. They click **Connect with Razorpay** and visit the Razorpay authorisation URL you initiated with the client credentials downloaded in Step 1. +4. The user can log in or sign up. + 1. **Log in**: If the user is an existing Razorpay customer, they can log in and connect thieir account without additional KYC details. + 2. **Sign up**: If the user is new to Razorpay, they can create an account using the **Create Account** option. They need to submit KYC details to proceed. +5. After the necessary details are submitted, the user is prompted to authorise your platform to access data and create payments and refunds. +6. The client gives authorisation, which allows Razorpay to connect their client account to your Partner account. +7. On successful authorisation, Razorpay redirects the user back to the URL configured by you in your application settings. Razorpay shares an authentication code while redirecting. You need to use this Auth code in the token API request to generate an Auth token. + +![Sample Authorisation Interface](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/oauth-authorize.jpg.md) + +This completes the connection setup. Use this token to start accepting payments on behalf of the client. + + +#### Integration Steps + +To integrate with Standard Co-branded UI: + +1. [Integrate with Razorpay OAuth](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth.md) +2. [Customise client Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/settings.md) + +## Custom Onboarding SDK + +Custom Onboarding SDK enables you to onboard customers to Razorpay Payments within your platform. You can create a customer account using APIs and pre-fill KYC details, or have your client sign up and complete KYC verification. + +All the KYC details and documents except the Terms and Conditions can be pre-filled using the Onboarding SDK. You have two options: +- Collect end-to-end KYC details and redirect users to the Razorpay co-branded flow to accept terms and conditions. +- Collect and submit KYC partially (for example, contact details and business details), and let the user complete KYC on the Razorpay Co-branded Onboarding page. + +> **INFO** +> +> +> **Feature Request** +> +> Ensure that **Onboarding APIs** are enabled for your account. This feature is enabled on demand. Raise a request with our [Support team](https://razorpay.com/support/#request) or your Razorpay point-of-contact to get this feature activated. +> + +#### Integration Steps + +[Integrate with Custom Onboarding SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/onboarding-sdk.md) to create a customer account using APIs and pre-fill KYC details. + +### Related Information + +- [Track Onboarding Status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/status.md) diff --git a/llm-content/partners/technology-partners/onboard-businesses/add-on-features/add-submerchants-from-dashboard.md b/llm-content/partners/technology-partners/onboard-businesses/add-on-features/add-submerchants-from-dashboard.md new file mode 100644 index 00000000..da7ff81c --- /dev/null +++ b/llm-content/partners/technology-partners/onboard-businesses/add-on-features/add-submerchants-from-dashboard.md @@ -0,0 +1,135 @@ +--- +title: Add Submerchants from Dashboard | Technology Partners +heading: Add Submerchants from Dashboard +description: Invite submerchants using email IDs from the Razorpay Partner Dashboard. +--- + +# Add Submerchants from Dashboard + +You can invite submerchants for different apps from the Partner Dashboard. + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. Please raise a request with your Razorpay point-of-contact to get it activated on your Razorpay account. +> + +You can send an invite link to an individual account or multiple accounts. + +## Add One Sub-Merchant + +To invite a new sub-merchant using email ID: +1. Log in to the Dashboard. +2. Click **Partner** and navigate to **Affiliate Accounts**. +3. Select the **Payments** or **RazorpayX** tab depending on the product you want to refer a client to. +4. Click **+ Add New Clients**. + ![Technology Partners - add new clients](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-platform-add-client.jpg.md) +5. Select the app for which you want to add a client. +6. Under the **Using Email** tab, enter your contact's details. Click **Send Invite**. + ![Technology Partners - enter client details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-platform-add_sub_merchant.jpg.md) + + +## Bulk Upload Sub-Merchants + +You can send invites to multiple users using the **Bulk Upload** option. Upload an XLSX or CSV file with the Dashboard's required data. +This sends a single sign up invitation link to multiple affiliate accounts in bulk. This enables your sub-merchants to sign up and register on Razorpay. + +### Bulk Upload Template + +To view and understand the file format requirements, download the [sample template](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample_invite_submerchant_batch.xlsx.md). The account creation template contains the following headers. + +`account_name` _optional_ +: Name of the sub-merchant's account. + +`email` _mandatory_ +: The Email address of the sub-merchant. + +> **WARN** +> +> +> +> **Watch Out!** +> +> - Do not modify field names/headers (`account_name` and `email`) in a batch as it might result in an upload failure. +> - There should be **only 1** sheet in the file. +> - The size of the file can be up to 50 MB. You can add up to 5,000 rows in a particular file. The links will be processed in the same sequence as listed in the file. +> + +To add multiple accounts using the bulk upload template: + +1. Log in to the Dashboard. +2. Click **Partner** and navigate to **Affiliate Accounts**. +3. Select the **Payments** or **RazorpayX** tab depending on the product you want to refer a client to. +4. Click **+ Add New Clients**. + ![Technology Partners - add new clients](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-platform-add-client.jpg.md) +5. Select the app for which you want to add a client. +6. Shift to the **Bulk Upload** tab. +7. Upload the file. You can drag and drop or **click to upload**. + ![Technology Partners - add multiple accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-platform-add-multiple-account.jpg.md) +8. The file is validated for any associated errors and uploaded to the Razorpay server. Click **Next**. + ![Technology Partners - validate bulk upload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-send-invite.jpg.md) + +Once the file is successfully processed, you will receive the account creation status via email. The email attachment will include both success and/or failure details for each account, including the error code and exact reason for the failure. + +## Add Sub-Merchants Using a Referral Link + +Share a referral link with potential sub-merchants via social media or instant messengers. You can also copy the referral link and send it via email. + +To add sub-merchants using a referral link: + +1. Log in to the Dashboard. +2. In the **Partner** section, navigate to **Affiliate Accounts**. +3. Select the **Payments** or **RazorpayX** tab depending on the product you want to refer a client to. +4. Click **+ Add New Clients**. + ![Technology Partners - add new clients](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-platform-add-client.jpg.md) +5. Select the app for which you want to add a client. +6. Switch to the **Public Link** tab. + ![Technology Partners copy referral link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/platform-referral-link.jpg.md) +7. You can share the link using: + 1. Copy button: This copies the referral link. You can copy-paste this link and send it via email or instant messaging apps such as WhatsApp. + 2. Facebook: Click the Facebook icon to share the referral link as a post on your Facebook account. + 3. Twitter: Click the Twitter icon to send a tweet with the referral link. + 4. WhatsApp: Click the WhatsApp icon to send a message with the referral link. + +Businesses can click on this referral link and sign up as an affiliate account. As a Service Partner, you will get 0.1% commission for every transaction done by the affiliate accounts who sign up using this link. + +## Actions After Inviting + +The actions after inviting differs based on the product referred. +- [Payments](#payments) +- [RazorpayX](#razorpayx) + +### Payments + +Your contact will receive an invite via email and SMS to create a Razorpay account. To get started, the contacts invited for `Payment` products, must proceed to create a Razorpay account and complete account activation and [KYC Verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#2-submit-kyc-details). + +The newly added Payments sub-merchants will appear on your list on the Partner Dashboard with a default **Activation Status** as **Not Submitted**. + + +### + All Invites and Accepted Invites + + + Sub-merchants invited for `Payments` can be seen under **Payments**. + - You can check all the invites sent in the **All Invites** tab. Here you can resend invites to your contacts. + ![Technology Partners - All invites sent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/resellers-all-invites.jpg.md) + - To see the contacts that have accepted your invite, switch to the **Accepted Invites** tab. Here you can check the activation status and request for KYC. + ![Technology Partners - Accepted invites](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/platform-accepted-invites.jpg.md) + + +You can use the `Switch` option to access the sub-merchant's account. Once you are on the sub-merchant's Dashboard, you can perform all the actions that the sub-merchant can perform. Know more about [switching to sub-merchant Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/add-on-features/switch-dashboard.md). + +### RazorpayX + +A RazorpayX affiliate will be displayed with a default CA status as **Application not initiated**. Sub-merchants referred for `RazorpayX powered Current Account` must log in to their [RazorpayX Dashboard ](https://x.razorpay.com/auth) and initiate Current Account application. + +Sub-merchants invited for `Current Account` can be seen under **RazorpayX**: + ![Service Partners - List of affiliate account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/resellers-affiliate-accounts-x.jpg.md) + +### Related Information + +- [About Embedded Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners.md) +- [Perform Sub-merchant KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/add-on-features/perform-submerchant-kyc.md) +- [Switch to Sub-merchant Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/add-on-features/switch-dashboard.md) diff --git a/llm-content/partners/technology-partners/onboard-businesses/add-on-features/perform-submerchant-kyc.md b/llm-content/partners/technology-partners/onboard-businesses/add-on-features/perform-submerchant-kyc.md new file mode 100644 index 00000000..d1e47ec7 --- /dev/null +++ b/llm-content/partners/technology-partners/onboard-businesses/add-on-features/perform-submerchant-kyc.md @@ -0,0 +1,49 @@ +--- +title: Perform Sub-Merchant KYC from Dashboard +heading: Perform Sub-Merchant KYC +description: Know how to perform KYC for your sub-merchants from the Partner Dashboard. +--- + +# Perform Sub-Merchant KYC + +You can perform KYC for your sub-merchants from the Dashboard. The sub-merchant can skip KYC during onboarding. After getting this feature enabled, you would not require approval from your sub-merchants to perform their KYC. + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. Please raise a request with your Razorpay point-of-contact to get it activated on your Razorpay account. +> + +#### Advantages + +- **Decreases Onboarding Time by 50%** + + Partner performing KYC for sub-merchants decreases onboarding time by half and ensures a seamless onboarding experience. +- **Value Added Service** + + Partner performing KYC acts as a delight feature for your clients. + +## Perform KYC + +You can perform KYC for sub-merchants by following the steps given below: + +1. Log in to the Dashboard. +2. Click **Partner** and navigate to **Affiliate Accounts**. +3. Click the **Account Name** of the sub-merchant for whom your want to perform KYC. +4. In the tab that opens, click **Perform KYC**. + ![Perform sub-merchant KYC from Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/platform-performkyc.jpg.md) +5. Fill in the KYC details on the form and upload the necessary files. + ![Perform sub-merchant KYC - fill KYC form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-partnerships-enter-kyc-details.jpg.md) + +You can view the activation status on the Partner Dashboard. +![](/docs/assets/images/partners-submerchant-kyc-activation-status.jpg) + +You can request to switch off KYC updates communications to sub-merchants. + +### Related Information + +- [About Embedded Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners.md) +- [Add sub-merchants from Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/add-on-features/add-submerchants-from-dashboard.md) +- [Get switch access to submerchant Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/add-on-features/switch-dashboard.md) diff --git a/llm-content/partners/technology-partners/onboard-businesses/add-on-features/switch-dashboard.md b/llm-content/partners/technology-partners/onboard-businesses/add-on-features/switch-dashboard.md new file mode 100644 index 00000000..b5391a0a --- /dev/null +++ b/llm-content/partners/technology-partners/onboard-businesses/add-on-features/switch-dashboard.md @@ -0,0 +1,41 @@ +--- +title: Partner Switch to Sub-merchant Dashboard +heading: Switch Dashboard +description: Perform actions on behalf of sub-merchants by switching Razorpay Dashboard. +--- + +# Switch Dashboard + +You can switch to a sub-merchant's Dashboard and perfrom certain functions. The Dashboard access will be available only after sub-merchant has given OAuth access. + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. Please raise a request with your Razorpay point-of-contact to get it activated on your Razorpay account. +> + +## Actions Allowed + +You will receive a `Partner` role with the below capabilities. + +Actions Allowed | Actions Not Allowed +--- +- Create and manage Payment Links and Payment Pages. +- View the **Payments**, **Payment Links**, **Payment Pages** and **Settlements** tabs. +- Create refunds. +- View all transactions and settlements. +- Capture Payments. +- View and share the payment handle. +- Create Offers. +- Generate Referral links. + | - Add or edit linked account details. +- Edit settlement account details. +- Configure settings. +- Partner section on the sub-merchant Dashboard. + +### Related Information + +- [Add sub-merchants from Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/add-on-features/add-submerchants-from-dashboard.md) +- [Perform submerchant KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/add-on-features/perform-submerchant-kyc.md) diff --git a/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth.md b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth.md new file mode 100644 index 00000000..28dcfd8c --- /dev/null +++ b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth.md @@ -0,0 +1,49 @@ +--- +title: Integrate with Razorpay OAuth | Technology Partners +heading: About OAuth +description: Use OAuth to integrate your applications and securely access Razorpay and RazorpayX client resources via token-based authentication. +--- + +# About OAuth + +**OAuth** or **Open Authorisation** is an authorisation standard that allows you to access resources hosted by other web apps on behalf of a user. + +Razorpay OAuth is a token-based authentication method where you can obtain an access token with the consent of the user, without them having to compromise their API key secret. OAuth lets the user decide who can access what level of resources within their Razorpay account. + +As Razorpay Technology Partners, you must use OAuth to securely access and manage the Razorpay accounts of businesses on your platform, without them having to share sensitive credentials. This contributes to better user experience. + +#### Example + +Assume you are a marketplace that signs up as Razorpay's Technology Partner - **_Corpfy_**. + +You onboard a sub-merchant that wants to sell clothes on your platform - **_Acme_**. + +- You integrate with Razorpay OAuth after signing up. +- You create an application via Razorpay Partner Dashboard, to onboard _Acme_ as a sub-merchant. + - During onboarding, you request _Acme_ to give you their account access. + - On authorising, you can access the payments, refunds, disputes etcetra on _Acme_'s Razorpay account, but the security information however, remains safe with Razorpay. + +After _Acme_ authorises you to access their account, a `code` is generated. You must use this code to generate `access_token` which you can use to trigger APIs on _Acme_'s behalf. + +![oauth token process](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/oauth-process.jpg.md) + +## Prerequisites + +Sign up with Razorpay as a Technology Partner by reaching out to our [support team](https://razorpay.com/support/). You require this to register your application on the Dashboard. + +## Video Tutorial + +Watch this video to know how to integrate Razorpay OAuth as a Technology Partner. + +[Video: https://www.youtube.com/embed/_qWjer8Rw8Q?si=L4XN-lPME7cGGgcF] + +## Next Steps + +1. [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps.md) +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/test-integration.md) +3. [Go-live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/go-live-checklist.md) + +### Related Information + +- [Revoke Access to Application](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/revoke-access.md) +- [Track Onboarding Status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/status.md) diff --git a/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/errors.md b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/errors.md new file mode 100644 index 00000000..c0b63d38 --- /dev/null +++ b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/errors.md @@ -0,0 +1,94 @@ +--- +title: Partners OAuth Integration Errors +heading: Errors +description: List of errors that could arise during Razorpay OAuth integration. +--- + +# Errors + +Given below is a list of errors you might face while integrating with Razorpay OAuth. + +## Initiate Authorisation Using URL + +Error | Cause | Solution +--- +The authorization grant type is not supported by the authorization server. | - The `response_type` is not provided or is not `code`. +- The `client_id` is not provided. + | - Ensure that you pass the `response_type` as `code`. +- Provide your application `client_id`. + +--- +A server error occurred while serving this error. | One or more of the following is not provided: - State +- Scope +- Redirect URI + | Ensure that you enter the state, scope and `redirect_uri`. +--- +The requested scope is invalid, unknown or malformed | The scope entered is invalid. | Use a valid scope. Possible values are `read_only` and `read_write`. +--- +Client authentication failed | The `client_id` or `redirect_uri` provided is wrong. | Use a valid `client_id` and `redirect_uri`. +--- +Access is forbidden | The scope entered is invalid. | Use a valid scope. Possible values are `read_only` and `read_write`. + +## Token APIs + +Error | Cause | Solution +--- +Check the `client_id` parameter | The `client_id` is not provided. | Provide your application `client_id`. +--- +Check the `client_secret` parameter | The `client_secret` provided is not a string. | Ensure that the `client_secret` is a string. +--- +Invalid Client or Grant type | The `client_id` does not exist. | Use a valid `client_id`. +--- +Access denied | The `client_secret` provided is wrong. | Use a valid `client_secret`. +--- +Check that all required parameters have been provided | - The `grant_type` provided is invalid. +- The `authorization_code` is not provided. + | - Use a valid `grant_type`. +- Ensure that you enter the authorisation code. + +--- +Check the `redirect_uri` parameter | The `redirect_uri` is not provided or is not a string. | Ensure that the `redirect_uri` is a valid string. +--- +Client authentication failed | The `redirect_uri` provided does not match the one configured with the client. | Use the `redirect_uri` that is configured with the client. +--- +Only allowed modes are test or live | The mode used is not valid. | Only use either live or test mode. +--- +Mode can be only set to live for production clients | A production client is using test mode API keys. | Ensure that you only use live API keys if you are a production client. +--- +Cannot decrypt the authorization code | The `authorization_code` provided is invalid. | Use a valid authorisation code. +--- +Authorization code has expired | The `authorization_code` provided has expired. | Use a valid authorisation code. +--- +Authorization code has been revoked | The `authorization_code` provided has been revoked. | Use a valid authorisation code. +--- +Authorization code was not issued to this client | The `authorization_code` provided does not belong to the client id used. | Ensure that the `authorization_code` belongs to the client id used. +--- +Invalid redirect URI | The `redirect_uri` entered is incorrect. | Ensure that the `redirect_uri` entered matches the one added in the application settings. + +### Refresh Token API + +In addition to the [Token API errors](#token-apis), you may also face the below errors when refreshing a token. + +Error | Cause | Solution +--- +Check the `refresh_token` parameter | The refresh token is not provided. | Ensure that you enter the refresh token in the request. +--- +Cannot decrypt the refresh token | An invalid refresh token is provided. | Use a valid refresh token. +--- +Token is not linked to client | The refresh token provided: - Does not belong to the client id. +- Has expired. + | Use a valid refresh token that belongs to the client id provided. +--- +Token has been revoked | The refresh token provided has been revoked. | Use a valid refresh token. + +### Revoke Token API + +Error | Cause | Solution +--- +Could not validate the token provided | - The access token used is invalid, has expired or has already been revoked. +- The access token used does not belong to the OAuth client id provided. + | - Use a valid access token that has not been revoked yet. +- Ensure that the access token belongs to the OAuth client id provided. + +--- +The server encountered an error. The incident has been reported to admins | The server was not able to process the request. | Retry after some time. diff --git a/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/go-live-checklist.md b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/go-live-checklist.md new file mode 100644 index 00000000..2e00a612 --- /dev/null +++ b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/go-live-checklist.md @@ -0,0 +1,15 @@ +--- +title: Partners | OAuth | Go-live Checklist +heading: Go-live Checklist +description: Steps to complete before going live with OAuth Integration. +--- + +# Go-live Checklist + +Consider this step before taking the integration live. + +## Switch Development Client Keys with Production Client Keys + +After your testing is complete, use the production client keys to go live. + +![View Production and Development Credentials for Application](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-oauth-create-application-prod-dev-credentials.jpg.md) diff --git a/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps.md b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps.md new file mode 100644 index 00000000..0bef7dfa --- /dev/null +++ b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps.md @@ -0,0 +1,744 @@ +--- +title: Partners | OAuth | Build Integration +heading: Build Integration +description: Steps to integrate Razorpay OAuth with your application. +--- + +# Build Integration + +To access the necessary information from your sub-merchant's account, you must integrate with OAuth. Follow the steps below for the integration. + +1. [Create an Application](#1-create-an-application) +2. [Get Authorisation from Sub-merchant](#2-get-authorisation-from-sub-merchant) +3. [Access Resources](#3-access-resources-using-access-token) +4. [Process Payments](#4-process-payments) +4. [Subscribe to Authorization Revoked Webhook](#5-subscribe-to-authorization-revoked-webhook) + +## 1. Create an Application + +The first step towards building an OAuth integration is creating an application on the Razorpay Partner Dashboard. Here, an application refers to a software entity that you register on Razorpay to facilitate OAuth-based authentication and authorisation for businesses on your platform. +It acts as an intermediary between you and Razorpay. Internally, Razorpay OAuth identifies the applications by their `client_id`. + +- When you create an application on Razorpay, we generate two clients linked to the application: development and production clients. +- Each client has its own `client_id` and `client_secret`. +- You can use the development client in your sandbox environment or during the integration phase, and the production client once you go live. + +### Development and Production Clients + +Given below is a comparison of the development and production clients: + +Particulars | Development Client | Production Client +--- +**Redirect URI** | Can have any type of Redirect URIs whitelisted, including non-HTTP and localhost. | Cannot use non-HTTPS Redirect URIs. +--- +**Test and Live Mode Access** | Can access both modes. | Can access only live mode data. + +> **WARN** +> +> +> **Watch Out!** +> +> Only an **Owner** user can create applications on the Dashboard. +> + + +### To create an application: + + 1. Log in to the Dashboard and navigate to **Applications** under **Partners**. + ![Create Application](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-create-application.jpg.md) + 2. Click **Create Application** under **Created Applications**. + 3. Provide the following details and click **Save**. + - **Name**: The application name provided here is displayed on the Razorpay authorisation interface. + - **Website**: Enter the URL of the application's website. + - **Logo**: Upload a square image for application logo. If logo is absent, a default logo is used. + ![Add Application Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-oauth-create-application-details.jpg.md) + + The following fields are displayed after the application is created, for development and production clients. These are read-only: + - **Client ID**: Publicly exposed identifier of the client which is generated uniquely. It helps identify your application on Razorpay. + - **Client Secret**: Privately shared string between the application and Razorpay. It helps to authenticate the identity of the application on server-to-server API calls. Do not expose the client secret publicly. + - **Redirect URIs**: A whitelisted set of URIs defined during creation. Production clients can only use secure HTTPS URIs to prevent man-in-the-middle attacks. You can define multiple redirect URIs. + + ![View Production and Development Credentials for Application](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-unmask-client-id.gif.md) + 4. Edit the Redirect URIs for your clients if needed. + 5. Click **Save**. + + +## 2. Get Authorisation from Sub-merchant + +Following the steps to receive sub-merchant authorisation. + +### 2.1 Initiate Authorisation Using URL + +A request is sent to redirect your sub-merchants to Razorpay's authorisation service. You will receive a code upon authorisation from the sub-merchant. You can exchange this code for an access token. + +#### Example + +```curl: Request +https://auth.razorpay.com/authorize + ?client_id=8DXCMTshWSWECc + &response_type=code + &redirect_uri=https://example.com/razorpay_callback + &scope=read_write + &state=NOBYtv8r6c75ex6WZ +```json: Success Response +{ + "code": "def502004bd206ce8bea64a73bbaff9586e4bf4f1d247e25de748174a977220bab48ab04b3e5a931afee2d125f3e567bd2a036fb25a62c55ab333429d203c5ba725abfadc520f49358f710362dc1f37abda854b20efbdcb540a00ec902afb8ee047ffb38df4316f83365267a0fc2fada1bcf2e212e0e450df9afd6581358faa343a1daebef4a1c041669ff1e9bebeee960f6963d19a8cc4c884ec5dfc8325a163d3ece880d5def3c84dcbb2d51e618667a1fbf1990fb798a41c4c4581738e3e1d7b6763ac6293c1bbf876e4294fb5b6fcd5b47200ef66e26b4e38016292175ecbd695d6cba7c1ea3155ef70f3326347aa541c4d4d83362619ef42c0178d538e6cc92682a43a36c946ad176d158a2c0d515da1d8a3be1ec5efd37f77ae4b11784318c705b0feeea8a7f06199bf21efc4a9b0bf70c63804339eafc970697bed03b763c63516da776c0403e42798e582deaea3fd385dba7fb6e80b5c6977f3b8d1001bdf5926d582ef79fda5d0b2c", + "state": "ACVD2346" +} +```json: Access Denied +state=ACVD2346 +error=access_denied +error_description=The resource owner or authorization server denied the request +hint=The user denied the request +message=The resource owner or authorization server denied the request +```json: Merchant Rejected +state=ACVD2346 +error=merchant _rejected +error_description=The merchant account is not compliant for payments processing +hint=Non compliant user +message=The merchant account is not compliant for payments processing +``` + + +### Query Parameters + + Define the following query parameters in the URL. All parameters are mandatory unless specified as optional: + + `client_id` + : `string` The unique client identifier. You can find it on your application. + + `response_type` + : `string` Specifies that the application is requesting an authorisation code grant. Possible value is `code`. + + `redirect_uri` + : `string` Callback URL used by Razorpay to redirect after the user approves or denies the authorisation request. The client should whitelist `redirect_uri`. + + `scope` + : `string` Defines the kind of access your application is requesting from the user. You can request multiple scopes by specifying each scope name separately in the URL using array notation. For example: `scope[]=read_only&scope[]=rx_read_write`. Possible values: + - `read_only`: Provides read access to all resources. That is, all `GET` API requests. This means you can only view the payments, refunds and so on. + - `read_write`: Provides read and write access to all resources on the API. This means you can view and create payments, refunds and so on. + - `rx_read_only`: Provides read access to all RazorpayX resources. That is, all `GET` API requests. This means you can only view the payouts, contacts and so on. + - `rx_read_write`: Provides read and write access to all RazorpayX resources on the API. This means you can view and create payouts, contacts and so on. + - `rx_partner_read_write`: Provides access to fetch payouts, contacts, fund accounts, transactions, as well as approve or reject a payout. + + `state` + : `string` A random string generated by your service. This parameter helps prevent cross-site request forgery (CSRF) attacks. State validation has to be implemented by your application and should work as described below: + 1. Your application should generate a unique random string and save it in the database. + 1. Send the random string to Razorpay in the authorisation request in the `state` parameter. + 1. Razorpay sends back the same `state` value as query params on your redirect URI. + 1. In your backend, you validate that the state value stored in your database matches the one you received for the `client_id` and the user that initiated the authorisation. + + + +### Success Response Parameters + + We send the following parameters if the user approves the request: + + `code` + : URL-encoded authorisation code. This is sent to you once the sub-merchant authorises. You can exchange this code for an access token. + + `state` + : The value of the `state` parameter sent in the authorisation request. + + +#### Authorisation Response + +After completion, the sub-merchant's browser is redirected to URI specified in the `redirect_uri` parameter. Once the [sub-merchant authorises](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps/sub-merchants.md), you can proceed with the steps ahead. + +### 2.2 Get Access Token + +Exchange the authorisation code received in the previous step for an access token. + +> **INFO** +> +> +> **Handy Tips** +> +> The authorisation code is URL-encoded. Decode it before sending in this request. +> + +`https://auth.razorpay.com/token` + +Given below is the sample request to be made from the application's backend server. + +```curl: Request +curl -X POST https://auth.razorpay.com/token +-H "Content-type: application/json" +-d '{ + "client_id": "", + "client_secret": "", + "grant_type": "authorization_code", + "redirect_uri": "http://example.com/razorpay_callback", + "code": "def50200d844dc80cc44dce2c665d07a374d76802", + "mode": "test" +}' +```json: Response +{ + "public_token": "rzp_test_oauth_XXXXXXXXXXXXXX", + "token_type": "Bearer", + "expires_in": 7862400, + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IkY1Z0NQYkhhRzRjcUpnIn0.eyJhdWQiOiJGNFNNeEgxanMxbkpPZiIsImp0aSI6IkY1Z0NQYkhhRzRjcUpnIiwiaWF0IjoxNTkyODMxMDExLCJuYmYiOjE1OTI4MzEwMTEsInN1YiI6IiIsImV4cCI6MTYwMDc3OTgxMSwidXNlcl9pZCI6IkYycVBpejJEdzRPRVFwIiwibWVyY2hhbnRfaWQiOiJGMnFQaVZ3N0lNV01GSyIsInNjb3BlcyI6WyJyZWFkX29ubHkiXX0.Wwqt5czhoWpVzP5_aoiymKXoGj-ydo-4A_X2jf_7rrSvk4pXdqzbA5BMrHxPdPbeFQWV6vsnsgbf99Q3g-W4kalHyH67LfAzc3qnJ-mkYDkFY93tkeG-MCco6GJW-Jm8xhaV9EPUak7z9J9jcdluu9rNXYMtd5qxD8auyRYhEgs", + "refresh_token": "def50200f42e07aded65a323f6c53181d802cc797b62cc5e78dd8038d6dff253e5877da9ad32f463a4da0ad895e3de298cbce40e162202170e763754122a6cb97910a1f58e2378ee3492dc295e1525009cccc45635308cce8575bdf373606c453ebb5eb2bec062ca197ac23810cf9d6cf31fbb9fcf5b7d4de9bf524c89a4aa90599b0151c9e4e2fa08acb6d2fe17f30a6cfecdfd671f090787e821f844e5d36f5eacb7dfb33d91e83b18216ad0ebeba2bef7721e10d436c3984daafd8654ed881c581d6be0bdc9ebfaee0dc5f9374d7184d60aae5aa85385690220690e21bc93209fb8a8cc25a6abf1108d8277f7c3d38217b47744d7", + "razorpay_account_id": "acc_Dhk2qDbmu6FwZH" +} +``` + + +### Request Parameters + + `client_id` _mandatory_ + : `string` Unique client identifier. + + `client_secret` _mandatory_ + : `string` Client secret string. + + `grant_type` _mandatory_ + : `string` Defines the grant type for the request. Possible value is `authorization_code`. + + `redirect_uri` _mandatory_ + : `string` Specifies the same `redirect_uri` used in the authorisation request. + + `code` _mandatory_ + : `string` Decoded authorisation code received in the last step. + + `mode` _optional_ + : `string` The type of mode. Possible values: + - `test` + - `live` (default) + + +> **INFO** +> +> +> **Handy Tips** +> +> Clients on production can only make requests for live mode. +> + + + + +### Response Parameters + + Once the sub-merchant authorises, the following tokens become available to both you and the sub-merchant. You can use these tokens later to create API requests on behalf of the sub-merchant. Know more [about tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps/sub-merchants.md#about-tokens). + + `token_type` + : `string` Defines the type of access token. Possible value is `Bearer`. + + `expires_in` + : `integer` Integer representing the TTL of the access token in seconds. + + `access_token` + : `string` A private key used to access sub-merchant resources on Razorpay. Used for server-to-server calls only. You must use this token instead of `key_id` and `key_secret` to call API requests for the respective sub-merchant. Each sub-merchant has a unique `access_token`. It expires every 90 days. + + `public_token` + : `string` A public key is used for Payments. For example: `rzp_test_oauth_XXXXXXXXXXXXXX`. + + `refresh_token` + : `string` Used to refresh the access token when it expires. + + +> **WARN** +> +> +> **Watch Out!** +> +> The `refresh_token` expires in 180 days from the day of generation and must be used to generate a new `refresh_token` before expiry. +> + + + `razorpay_account_id` + : `string` Identifies the sub-merchant ID who granted the authorisation. + + +Store the `access_token` received above on your server. Using this token, you can access the sub-merchant's data on Razorpay APIs based on the level of access granted. + +For using RazorpayX as a resource, check [Access Resources using Access Token](#razorpayx). + +### About Tokens + + +### Refresh Token API + + You can use refresh tokens to generate a new access token. If your access token expires, you will receive a 4XX response from the API. You can make a request using your refresh token to generate a new (`access_token` and `refresh_token`) pair. + + Refer to the following API request on how to request a new token: + + `https://auth.razorpay.com/token` + + +> **WARN** +> +> +> **Watch Out!** +> +> You should make this request from the application's backend server only. +> + + Given below is the sample code: + + ```curl: Request + curl -X POST https://auth.razorpay.com/token + -H "Content-type: application/json" + -d '{ + "client_id": "", + "client_secret": "", + "grant_type": "refresh_token", + "refresh_token": "def5020096e1c470c901d34cd60fa53abdaf3662sa0" + }' + ```json: Response + { + "public_token": "rzp_test_oauth_XXXXXXXXXXXXXX", + "token_type": "Bearer", + "expires_in": 7862400, + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ijl4dTF", + "refresh_token": "def5020096e1c470c901d34cd60fa53abdaf36620e823ffa53" + } + ``` + + + + Request Parameters + + Send the following parameters in the request: + + `client_id` _mandatory_ + : `string` Unique client identifier. + + `client_secret` _mandatory_ + : `string` Client secret string. + + `grant_type` _mandatory_ + : `string` The type of grant for the request. Possible value is `refresh_token`. + + `refresh_token` _mandatory_ + : `string` The previously-stored refresh token value which is about to expire. + + + +### Response Parameters + + The server will respond with the following parameters: + + `token_type` + : `string` Defines the type of access token. Possible value is `Bearer`. + + `expires_in` + : `string` Integer representing the TTL of the access token in seconds. + + `access_token` + : `string` Used to access sub-merchant resources on Razorpay. `access_token` is a private token and should only be used for server-to-server calls. + + `public_token` + : `string` Token used only for Payments. For example: `rzp_test_oauth_XXXXXXXXXXXXXX`. + + `refresh_token` + : `string` The new refresh token. The old refresh token will be expired automatically from this point. + + + + + + +### Revoke Token API + + Use the following endpoint to revoke a token. + + `https://auth.razorpay.com/revoke` + + + ```Curl: Request + curl -X POST https://auth.razorpay.com/revoke + -H "Content-type: application/json" + -d '{ + "client_id": "JA1p85ntMrHJhA", + "client_secret": "DcTFepYebC7FuNk39C8M3yl2", + "token_type_hint": "access_token", + "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJKQTFwODVudE1ySEpoQSIsImp0aSI6IkpPZkd0aHFDTmhqQUhTIiwiaWF0IjoxNjUxMTI0NTU0LCJuYmYiOjE2NTExMjQ1NTQsInN1YiI6IiIsImV4cCI6MTY1ODk4Njk1MiwidXNlcl9pZCI6bnVsbCwibWVyY2hhbnRfaWQiOiJKOWpoSTdzZkM1S1V0NiIsInNjb3BlcyI6WyJyZWFkX3dyaXRlIl19.h1oL_Tik642Q18DdyEnIVziW1kgw6k09K8ALuI4uWQBH3jE4R8p1e6ysQq-Et4E_MZd7ADfC1W6kFwe3PXlkLC6emaZAKESZghbtTBM6RYnhieErAOcD7ytc0P8c75aNRlC6MWwlWaH20OFYuSay7iGFyw2jp4by4xDFlYweVLc" + }' + + ```json: Success Response + { + "message": "Token Revoked" + } + + ```json: Failure Response + { + "error": { + "code": "SERVER_ERROR", + "description": "The server encountered an error. The incident has been reported to admins" + } + } + ``` + + + + + Request Parameters + + Send the following parameters in the request: + + `client_id` _mandatory_ + : `string` Unique client identifier. + + `client_secret` _mandatory_ + : `string` Client secret string. + + `token_type_hint` _mandatory_ + : `string` The type of token for the request. Possible value: + - `access_token` + - `refresh_token` + + `token` _mandatory_ + : `string` The token whose access should be revoked. + + + +### Response Parameters + + The server will respond with the following parameters: + + `message` + : `string` The confirmation message of the token revoke. + + + + + + +### Error Response Parameters + +Refer to our [errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/errors.md#revoke-token-api) page for the list of errors and solutions. + +## 3. Access Resources using Access Token + +After you obtain an access token, you can use it to access the sub-merchant's data on Razorpay APIs. The access is controlled based on the scope requested for and granted by the user during the authorisation process. + + +### For Payments + + Provide the access token in the `Bearer` authorisation header while requesting [Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + Given below is a sample code for the [Fetch all Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments). + + + + + ```Curl: Request + curl -X GET https://api.razorpay.com/v1/payments + -H "Authorization: Bearer " + ```json: Response + { + "entity": "collection", + "count": 2, + "items": [ + { + "id": "pay_G8VaL2Z68LRtDs", + "entity": "payment", + "amount": 900, + "currency": "INR", + "status": "captured", + "order_id": "order_G8VXfKDWDEOHHd", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Purchase Shoes", + "card_id": null, + "bank": "KKBK", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_DitrYCFtCIokBO", + "notes": [], + "fee": 22, + "tax": 4, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "0125836177" + }, + "created_at": 1606985740 + }, + { + "id": "pay_G8VQzjPLoAvm6D", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "captured", + "order_id": "order_G8VPOayFxWEU28", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "#G8VPNzYJsQWMvY", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_DitrYCFtCIokBO", + "notes": [], + "fee": 24, + "tax": 4, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "033814379298" + }, + "created_at": 1606985209 + } + ] + } + ``` + + + + + + + +### For RazorpayX + + [Subscribing to webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/subscribe-to-webhooks.md) is a mandatory step if you want to access the user's RazorpayX data. Once you [generate the `access_token`](#22-get-access-token), the user's RazorpayX `account_id` will be sent to the webhook URL specified while creating your application. + + Below is a sample payload. + + ```json: Sample Payload: User's RazorpayX Account Details + { + "entity": "event", + "account_id": "acc_FoM4gv3Gn6NKrM", + "event": "banking_accounts.issued", + "contains": [ + "accounts" + ], + "payload": { + "accounts": { + "virtual": { + "account_number": "3434360450562835" + }, + "current": [ + { + "channel": "rbl", + "account_number": "409000768239" + } + ] + } + }, + "created_at": 1604920603 + } + ``` + + +## 4. Process Payments + +As a Technology Partner, you can allow sub-merchants to accept payments through various Payment Methods and channels. after getting `access_token`. + + +### 1. Access Payment APIs using OAuth + + You can process payments on behalf of your sub-merchants using [Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). Use the tokens generated during [OAuth integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps.md). + + Use the `access_token` generated in the [build integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps.md#22-get-access-token) step to authenticate using `Bearer Auth`. + + Below is a sample code to create an Order and process payments. + + /orders + + + ```curl: Request + curl -H "Authorization: Bearer " \ + -X POST https://api.razorpay.com/v1/orders \ + -H "content-type: application/json" \ + -d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } + }' + + ```json: Success Response + { + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071 + } + + ```js: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + + The parameter descriptions and errors are present in the [Create an Order API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md) documentation. + + + +### 2. Public Token + + Using the `public_token` for authorisation can secure a public-facing implementation such as Razorpay Checkout. In such cases, the `public_token` can replace the `key_id` field as shown below: + + ```js: Checkout + Pay + + + var options = { + "key": "rzp_test_oauth_XXXXXXXXXXXXXX", // Public Token + "amount": "29900", // Amount is in currency subunits. Default currency is INR. + "currency": "INR", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_9A33XWu170gUtm", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information especially their phone number + "name": "Gaurav Kumar", //your customer's name + "email": "gaurav.kumar@example.com", + "contact": "9000090000" //Provide the customer's phone number for better conversion rates + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ``` + + Know more about [Web Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + + + +### 3. Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `client_secret`: Available in your server. The `client_secret` that was generated from the [RazorpayDashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, client_secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + #### Generate Signature on Your Server + + Given below is the sample code for payment signature verification: + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[CLIENT_KEY_ID]", "[CLIENT_KEY_SECRET]"); + + String secret = "EnLs21M47BllR3X8PSFtjtbd"; + + JSONObject options = new JSONObject(); + options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); + options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); + options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + + boolean status = Utils.verifyPaymentSignature(options, secret); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } + Razorpay::Utility.verify_payment_signature(payment_response) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[CLIENT_KEY_ID]", "[CLIENT_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + options.Add("razorpay_order_id", "order_IEIaMR65"); + options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); + options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + + Utils.verifyPaymentSignature(options); + ``` + + #### Post Signature Verification + + With this, your integration is complete. Test the integration before going live. Replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +## 5. Subscribe to Authorization Revoked Webhook + +Sub-merchants can revoke access to your application from the Dashboard at any time. Once revoked, your application will no longer have the capability to perform any operations on the sub-merchant account. + +We recommend subscribing to the `account.app.authorization_revoked` webhook event. This ensures that you receive real-time notifications whenever a sub-merchant revokes access to your connected application. + +Follow these steps to [subscribe to webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/subscribe-to-webhooks.md). + +Given below is the sample payload: + +```json: account.app.authorization_revoked +{ + "event": "account.app.authorization_revoked", + "account_id": "acc_Dhk2qDbmu6FwZH", // merchant account id + "contains": [], + "created_at": 1678282666 +} +``` + +## Next Step + +[2. Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/test-integration.md) + +### Related Information + +- [Revoke Access to Application](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/revoke-access.md) +- [Standard Web Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md) +- [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/errors.md) diff --git a/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps/partners-import-flow.md b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps/partners-import-flow.md new file mode 100644 index 00000000..35757695 --- /dev/null +++ b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps/partners-import-flow.md @@ -0,0 +1,827 @@ +--- +title: Partners | OAuth | Build Integration +heading: Build Integration +description: Steps to integrate Razorpay OAuth with your application. +--- + +# Build Integration + +To access the necessary information from your sub-merchant's account, you must integrate with OAuth. Follow the steps below for the integration. + +1. [Create an Application](#1-create-an-application) +2. [Get Authorisation from Sub-merchant](#2-get-authorisation-from-sub-merchant) +3. [Access Resources](#3-access-resources-using-access-token) +4. [Process Payments](#4-process-payments) +4. [Subscribe to Authorization Revoked Webhook](#5-subscribe-to-authorization-revoked-webhook) + +## 1. Create an Application + +The first step towards building an OAuth integration is creating an application on the Razorpay Partner Dashboard. Here, an application refers to a software entity that you register on Razorpay to facilitate OAuth-based authentication and authorisation for businesses on your platform. +It acts as an intermediary between you and Razorpay. Internally, Razorpay OAuth identifies the applications by their `client_id`. + +- When you create an application on Razorpay, we generate two clients linked to the application: development and production clients. +- Each client has its own `client_id` and `client_secret`. +- You can use the development client in your sandbox environment or during the integration phase, and the production client once you go live. + +### Development and Production Clients + +Given below is a comparison of the development and production clients: + +Particulars | Development Client | Production Client +--- +**Redirect URI** | Can have any type of Redirect URIs whitelisted, including non-HTTP and localhost. | Cannot use non-HTTPS Redirect URIs. +--- +**Test and Live Mode Access** | Can access both modes. | Can access only live mode data. + +> **WARN** +> +> +> **Watch Out!** +> +> Only an **Owner** user can create applications on the Dashboard. +> + + +### To create an application: + + 1. Log in to the Dashboard and navigate to **Applications** under **Partners**. + ![Create Application](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-create-application.jpg.md) + 2. Click **Create Application** under **Created Applications**. + 3. Provide the following details and click **Save**. + - **Name**: The application name provided here is displayed on the Razorpay authorisation interface. + - **Website**: Enter the URL of the application's website. + - **Logo**: Upload a square image for application logo. If logo is absent, a default logo is used. + ![Add Application Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-oauth-create-application-details.jpg.md) + + The following fields are displayed after the application is created, for development and production clients. These are read-only: + - **Client ID**: Publicly exposed identifier of the client which is generated uniquely. It helps identify your application on Razorpay. + - **Client Secret**: Privately shared string between the application and Razorpay. It helps to authenticate the identity of the application on server-to-server API calls. Do not expose the client secret publicly. + - **Redirect URIs**: A whitelisted set of URIs defined during creation. Production clients can only use secure HTTPS URIs to prevent man-in-the-middle attacks. You can define multiple redirect URIs. + + ![View Production and Development Credentials for Application](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-unmask-client-id.gif.md) + 4. Edit the Redirect URIs for your clients if needed. + 5. Click **Save**. + + +## 2. Get Authorisation from Sub-merchant + +Following the steps to receive sub-merchant authorisation. + +### 2.1 Initiate Authorisation Using URL + +A request is sent to redirect your sub-merchants to Razorpay's authorisation service. You will receive a code upon authorisation from the sub-merchant. You can exchange this code for an access token. + +#### Example + +```curl: Request +https://auth.razorpay.com/authorize + ?client_id=8DXCMTshWSWECc + &response_type=code + &redirect_uri=https://example.com/razorpay_callback + &scope=read_write + &state=NOBYtv8r6c75ex6WZ +```json: Success Response +{ + "code": "def502004bd206ce8bea64a73bbaff9586e4bf4f1d247e25de748174a977220bab48ab04b3e5a931afee2d125f3e567bd2a036fb25a62c55ab333429d203c5ba725abfadc520f49358f710362dc1f37abda854b20efbdcb540a00ec902afb8ee047ffb38df4316f83365267a0fc2fada1bcf2e212e0e450df9afd6581358faa343a1daebef4a1c041669ff1e9bebeee960f6963d19a8cc4c884ec5dfc8325a163d3ece880d5def3c84dcbb2d51e618667a1fbf1990fb798a41c4c4581738e3e1d7b6763ac6293c1bbf876e4294fb5b6fcd5b47200ef66e26b4e38016292175ecbd695d6cba7c1ea3155ef70f3326347aa541c4d4d83362619ef42c0178d538e6cc92682a43a36c946ad176d158a2c0d515da1d8a3be1ec5efd37f77ae4b11784318c705b0feeea8a7f06199bf21efc4a9b0bf70c63804339eafc970697bed03b763c63516da776c0403e42798e582deaea3fd385dba7fb6e80b5c6977f3b8d1001bdf5926d582ef79fda5d0b2c", + "state": "ACVD2346" +} +```json: Access Denied +state=ACVD2346 +error=access_denied +error_description=The resource owner or authorization server denied the request +hint=The user denied the request +message=The resource owner or authorization server denied the request +```json: Merchant Rejected +state=ACVD2346 +error=merchant _rejected +error_description=The merchant account is not compliant for payments processing +hint=Non compliant user +message=The merchant account is not compliant for payments processing +``` + + +### Query Parameters + + Define the following query parameters in the URL. All parameters are mandatory unless specified as optional: + + `client_id` + : `string` The unique client identifier. You can find it on your application. + + `response_type` + : `string` Specifies that the application is requesting an authorisation code grant. Possible value is `code`. + + `redirect_uri` + : `string` Callback URL used by Razorpay to redirect after the user approves or denies the authorisation request. The client should whitelist `redirect_uri`. + + `scope` + : `string` Defines the kind of access your application is requesting from the user. You can request multiple scopes by specifying each scope name separately in the URL using array notation. For example: `scope[]=read_only&scope[]=read_write`. Possible values: + - `read_only`: Provides read access to all resources. That is, all `GET` API requests. This means you can only view the payments, refunds and so on. + - `read_write`: Provides read and write access to all resources on the API. This means you can view and create payments, refunds and so on. + + `state` + : `string` A random string generated by your service. This parameter helps prevent cross-site request forgery (CSRF) attacks. State validation has to be implemented by your application and should work as described below: + 1. Your application should generate a unique random string and save it in the database. + 1. Send the random string to Razorpay in the authorisation request in the `state` parameter. + 1. Razorpay sends back the same `state` value as query params on your redirect URI. + 1. In your backend, you validate that the state value stored in your database matches the one you received for the `client_id` and the user that initiated the authorisation. + + + +### Success Response Parameters + + We send the following parameters if the user approves the request: + + `code` + : URL-encoded authorisation code. This is sent to you once the sub-merchant authorises. You can exchange this code for an access token. + + `state` + : The value of the `state` parameter sent in the authorisation request. + + +#### Authorisation Response + +After completion, the sub-merchant's browser is redirected to URI specified in the `redirect_uri` parameter. Once the [sub-merchant authorises](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps/sub-merchants.md), you can proceed with the steps ahead. + +### 2.2 Get Access Token + +Exchange the authorisation code received in the previous step for an access token. + +> **INFO** +> +> +> **Handy Tips** +> +> The authorisation code is URL-encoded. Decode it before sending in this request. +> + +`https://auth.razorpay.com/token` + +Given below is the sample request to be made from the application's backend server. + +```curl: Request +curl -X POST https://auth.razorpay.com/token +-H "Content-type: application/json" +-d '{ + "client_id": "", + "client_secret": "", + "grant_type": "authorization_code", + "redirect_uri": "http://example.com/razorpay_callback", + "code": "def50200d844dc80cc44dce2c665d07a374d76802", + "mode": "test" +}' +```json: Response +{ + "public_token": "YOUR_KEY_ID", + "token_type": "Bearer", + "expires_in": 7862400, + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IkY1Z0NQYkhhRzRjcUpnIn0.eyJhdWQiOiJGNFNNeEgxanMxbkpPZiIsImp0aSI6IkY1Z0NQYkhhRzRjcUpnIiwiaWF0IjoxNTkyODMxMDExLCJuYmYiOjE1OTI4MzEwMTEsInN1YiI6IiIsImV4cCI6MTYwMDc3OTgxMSwidXNlcl9pZCI6IkYycVBpejJEdzRPRVFwIiwibWVyY2hhbnRfaWQiOiJGMnFQaVZ3N0lNV01GSyIsInNjb3BlcyI6WyJyZWFkX29ubHkiXX0.Wwqt5czhoWpVzP5_aoiymKXoGj-ydo-4A_X2jf_7rrSvk4pXdqzbA5BMrHxPdPbeFQWV6vsnsgbf99Q3g-W4kalHyH67LfAzc3qnJ-mkYDkFY93tkeG-MCco6GJW-Jm8xhaV9EPUak7z9J9jcdluu9rNXYMtd5qxD8auyRYhEgs", + "refresh_token": "def50200f42e07aded65a323f6c53181d802cc797b62cc5e78dd8038d6dff253e5877da9ad32f463a4da0ad895e3de298cbce40e162202170e763754122a6cb97910a1f58e2378ee3492dc295e1525009cccc45635308cce8575bdf373606c453ebb5eb2bec062ca197ac23810cf9d6cf31fbb9fcf5b7d4de9bf524c89a4aa90599b0151c9e4e2fa08acb6d2fe17f30a6cfecdfd671f090787e821f844e5d36f5eacb7dfb33d91e83b18216ad0ebeba2bef7721e10d436c3984daafd8654ed881c581d6be0bdc9ebfaee0dc5f9374d7184d60aae5aa85385690220690e21bc93209fb8a8cc25a6abf1108d8277f7c3d38217b47744d7", + "razorpay_account_id": "acc_Dhk2qDbmu6FwZH" +} +``` + + +### Request Parameters + + `client_id` _mandatory_ + : `string` Unique client identifier. + + `client_secret` _mandatory_ + : `string` Client secret string. + + `grant_type` _mandatory_ + : `string` Defines the grant type for the request. Possible value is `authorization_code`. + + `redirect_uri` _mandatory_ + : `string` Specifies the same `redirect_uri` used in the authorisation request. + + `code` _mandatory_ + : `string` Decoded authorisation code received in the last step. + + `mode` _optional_ + : `string` The type of mode. Possible values: + - `test` + - `live` (default) + + +> **INFO** +> +> +> **Handy Tips** +> +> Clients on production can only make requests for live mode. +> + + + + +### Response Parameters + + Once the sub-merchant authorises, the following tokens become available to both you and the sub-merchant. You can use these tokens later to create API requests on behalf of the sub-merchant. Know more [about tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps/sub-merchants.md#about-tokens). + + `token_type` + : `string` Defines the type of access token. Possible value is `Bearer`. + + `expires_in` + : `integer` Integer representing the TTL of the access token in seconds. + + `access_token` + : `string` A private key used to access sub-merchant resources on Razorpay. Used for server-to-server calls only. You must use this token instead of `key_id` and `key_secret` to call API requests for the respective sub-merchant. Each sub-merchant has a unique `access_token`. It expires every 90 days. + + `public_token` + : `string` A public key is used for Payments. For example: `YOUR_KEY_ID`. + + `refresh_token` + : `string` Used to refresh the access token when it expires. + + +> **WARN** +> +> +> **Watch Out!** +> +> The `refresh_token` expires in 180 days from the day of generation and must be used to generate a new `refresh_token` before expiry. +> + + + `razorpay_account_id` + : `string` Identifies the sub-merchant id who granted the authorisation. + + +Store the `access_token` received above on your server. Using this token, you can access the sub-merchant's data on Razorpay APIs based on the level of access granted. + +For using RazorpayX as a resource, check [Access Resources using Access Token](#razorpayx). + +#### About Tokens + + +### Refresh Token API + + You can use refresh tokens to generate a new access token. If your access token expires, you will receive a 4XX response from the API. You can make a request using your refresh token to generate a new (`access_token` and `refresh_token`) pair. + + Refer to the following API request on how to request a new token: + + `https://auth.razorpay.com/token` + + +> **WARN** +> +> +> **Watch Out!** +> +> You should make this request from the application's backend server only. +> + + Given below is the sample code: + + ```curl: Request + curl -X POST https://auth.razorpay.com/token + -H "Content-type: application/json" + -d '{ + "client_id": "", + "client_secret": "", + "grant_type": "refresh_token", + "refresh_token": "def5020096e1c470c901d34cd60fa53abdaf3662sa0" + }' + ```json: Response + { + "public_token": "YOUR_KEY_ID", + "token_type": "Bearer", + "expires_in": 7862400, + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ijl4dTF", + "refresh_token": "def5020096e1c470c901d34cd60fa53abdaf36620e823ffa53" + } + ``` + + + + Request Parameters + + Send the following parameters in the request: + + `client_id` _mandatory_ + : `string` Unique client identifier. + + `client_secret` _mandatory_ + : `string` Client secret string. + + `grant_type` _mandatory_ + : `string` The type of grant for the request. Possible value is `refresh_token`. + + `refresh_token` _mandatory_ + : `string` The previously-stored refresh token value which is about to expire. + + + +### Response Parameters + + The server will respond with the following parameters: + + `token_type` + : `string` Defines the type of access token. Possible value is `Bearer`. + + `expires_in` + : `integer` Integer representing the TTL of the access token in seconds. + + `access_token` + : `string` Used to access sub-merchant resources on Razorpay. `access_token` is a private token and should only be used for server-to-server calls. + + `public_token` + : `string` Token used only for Payments. For example: `YOUR_KEY_ID`. + + `refresh_token` + : `string` The new refresh token. The old refresh token will be expired automatically from this point. + + + +### Error Response Parameters + + Refer to our [errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/errors.md#revoke-token-api) page for the list of errors and solutions. + + + + + + +### Revoke Token API + + Use the following endpoint to revoke a token. + + `https://auth.razorpay.com/revoke` + + ```Curl: Request + curl -X POST https://auth.razorpay.com/revoke + -H "Content-type: application/json" + -d '{ + "client_id": "JA1p85ntMrHJhA", + "client_secret": "DcTFepYebC7FuNk39C8M3yl2", + "token_type_hint": "access_token", + "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJKQTFwODVudE1ySEpoQSIsImp0aSI6IkpPZkd0aHFDTmhqQUhTIiwiaWF0IjoxNjUxMTI0NTU0LCJuYmYiOjE2NTExMjQ1NTQsInN1YiI6IiIsImV4cCI6MTY1ODk4Njk1MiwidXNlcl9pZCI6bnVsbCwibWVyY2hhbnRfaWQiOiJKOWpoSTdzZkM1S1V0NiIsInNjb3BlcyI6WyJyZWFkX3dyaXRlIl19.h1oL_Tik642Q18DdyEnIVziW1kgw6k09K8ALuI4uWQBH3jE4R8p1e6ysQq-Et4E_MZd7ADfC1W6kFwe3PXlkLC6emaZAKESZghbtTBM6RYnhieErAOcD7ytc0P8c75aNRlC6MWwlWaH20OFYuSay7iGFyw2jp4by4xDFlYweVLc" + }' + + ```json: Success Response + { + "message": "Token Revoked" + } + + ```json: Failure Response + { + "error": { + "code": "SERVER_ERROR", + "description": "The server encountered an error. The incident has been reported to admins" + } + } + ``` + + + + Request Parameters + + Send the following parameters in the request: + + `client_id` _mandatory_ + : `string` Unique client identifier. + + `client_secret` _mandatory_ + : `string` Client secret string. + + `token_type_hint` _mandatory_ + : `string` The type of token for the request. Possible value: + - `access_token` + - `refresh_token` + + `token` _mandatory_ + : `string` The token whose access should be revoked. + + + +### Response Parameters + + The server will respond with the following parameters: + + `message` + : `string` The confirmation message of the token revoke. + + + +### Error Response Parameters + + Refer to our [errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/errors.md#revoke-token-api) page for the list of errors and solutions. + + + + + + +## 3. Access Resources using Access Token + +After you obtain an access token, you can use it to access the sub-merchant's data on Razorpay APIs. The access is controlled based on the scope requested for and granted by the user during the authorisation process. + + +### For Payments + + Provide the access token in the `Bearer` authorisation header while requesting [Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + Given below is a sample code for the [Fetch all Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments). + + + + ```Curl: Request + curl -X GET https://api.razorpay.com/v1/payments + -H "Authorization: Bearer " + ```json: Response + { + "entity": "collection", + "count": 2, + "items": [ + { + "id": "pay_G8VaL2Z68LRtDs", + "entity": "payment", + "amount": 900, + "currency": "INR", + "status": "captured", + "order_id": "order_G8VXfKDWDEOHHd", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Purchase Shoes", + "card_id": null, + "bank": "KKBK", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_DitrYCFtCIokBO", + "notes": [], + "fee": 22, + "tax": 4, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "0125836177" + }, + "created_at": 1606985740 + }, + { + "id": "pay_G8VQzjPLoAvm6D", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "captured", + "order_id": "order_G8VPOayFxWEU28", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "#G8VPNzYJsQWMvY", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_DitrYCFtCIokBO", + "notes": [], + "fee": 24, + "tax": 4, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "033814379298" + }, + "created_at": 1606985209 + } + ] + } + ``` + + + + + + +### For RazorpayX + + [Subscribing to webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/subscribe-to-webhooks.md) is a mandatory step if you want to access the user's RazorpayX data. Once you [generate the `access_token`](#22-get-access-token), the user's RazorpayX `account_id` will be sent to the webhook URL specified while creating your application. + + Below is a sample payload. + + ```json: Sample Payload: User's RazorpayX Account Details + { + "entity": "event", + "account_id": "acc_FoM4gv3Gn6NKrM", + "event": "banking_accounts.issued", + "contains": [ + "accounts" + ], + "payload": { + "accounts": { + "virtual": { + "account_number": "3434360450562835" + }, + "current": [ + { + "channel": "rbl", + "account_number": "409000768239" + } + ] + } + }, + "created_at": 1604920603 + } + ``` + + +## 4. Process Payments + +As a Technology Partner, you can allow sub-merchants to accept payments through various Payment Methods and channels. after getting `access_token`. + + +### 1. Access Customer APIs using OAuth + + You can process payments on behalf of your sub-merchants using [Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). Use the tokens generated during [OAuth integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps/partners-import-flow.md). + + Use the `access_token` generated in the [build integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps/partners-import-flow.md#22-get-access-token) step to authenticate using `Bearer Auth`. + + Below is a sample code to create a customer in server. + + /customers + ```curl: Curl + curl -H "Authorization: Bearer " \ + -X POST https://api.razorpay.com/v1/customers \ + -H "content-type: application/json" \ + -d '{ + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + }' + + ```json: Success + { + "id": "cust_MpINfSkdEvtdxb", + "entity": "customer", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "gstin": null, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1697550382 + } + + ```json: Failure + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } + } + ``` + + The parameter descriptions and errors are present in the [Create a Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/build-integration.md#11-create-a-customer-in-server). + + + +### 2. Access Order APIs using OAuth + + You can process payments on behalf of your sub-merchants using [Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). Use the tokens generated during [OAuth integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps/partners-import-flow.md). + + Use the `access_token` generated in the [build integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps/partners-import-flow.md#22-get-access-token) step to authenticate using `Bearer Auth`. + + Below is a sample code to create an Order and process payments. + + /orders + + ```curl: Curl + curl -H "Authorization: Bearer " \ + -X POST https://api.razorpay.com/v1/orders \ + -H "content-type: application/json" \ + -d '{ + "amount": 10000, + "currency": "INR", + "receipt": "receipt#1", + "customer_id": "cust_OwZZseNBf9Uqsi", + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "identity": [ + { + "type": "tax_id", + "id": "HSCPE4563G" + } + ] + }, + "notes": { + "key1": "value3", + "key2": "value2" + } + }' + + ```json: Success + { + "amount": 10000, + "amount_due": 10000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1703569876, + "currency": "INR", + "entity": "order", + "id": "order_NGrgEcmYJsfUyl", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "receipt": "receipt#1", + "status": "created" + } + + ```json: Failure + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + The parameter descriptions and errors are present in the [Create an Order API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/build-integration.md#12-create-an-order-in-server). + + + +### 3. Integrate with Checkout on Client-Side Using OAuth + + Using the `public_token` for authorisation can secure a public-facing implementation such as Razorpay Checkout. In such cases, the `public_token` can replace the `key_id` field as shown below: + + ```js: Checkout + Pay + + + var options = { + "key": "YOUR_KEY_ID", // Public Token + "amount": "29900", // Amount is in currency subunits. Default currency is INR. + "currency": "INR", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "customer_id": "cust_MpINfSkdEvtdxb", + "order_id": "order_9A33XWu170gUtm", + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information especially their phone number + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000" + }, + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp", + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ``` + + Know more about [Web Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + + + +### 4. Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `client_secret`: Available in your server. The `client_secret` that was generated from the [RazorpayDashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, client_secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + #### Generate Signature on Your Server + + Given below is the sample code for payment signature verification: + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[CLIENT_KEY_ID]", "[CLIENT_KEY_SECRET]"); + + String secret = "EnLs21M47BllR3X8PSFtjtbd"; + + JSONObject options = new JSONObject(); + options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); + options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); + options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + + boolean status = Utils.verifyPaymentSignature(options, secret); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } + Razorpay::Utility.verify_payment_signature(payment_response) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[CLIENT_KEY_ID]", "[CLIENT_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + options.Add("razorpay_order_id", "order_IEIaMR65"); + options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); + options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + + Utils.verifyPaymentSignature(options); + ``` + + #### Post Signature Verification + + With this, your integration is complete. Test the integration before going live. Replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +## 5. Subscribe to Authorization Revoked Webhook + +Sub-merchants can revoke access to your application from the Dashboard at any time. Once revoked, your application will no longer have the capability to perform any operations on the sub-merchant account. + +We recommend subscribing to the `account.app.authorization_revoked` webhook event. This ensures that you receive real-time notifications whenever a sub-merchant revokes access to your connected application. + +Follow these steps to [subscribe to webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/subscribe-to-webhooks.md). + +Given below is the sample payload: + +```json: account.app.authorization_revoked +{ + "event": "account.app.authorization_revoked", + "account_id": "acc_Dhk2qDbmu6FwZH", // merchant account id + "contains": [], + "created_at": 1678282666 +} +``` + +## Next Step + +[2. Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/test-integration.md) + +### Related Information + +- [Revoke Access to Application](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/revoke-access.md) +- [Standard Web Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md) +- [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/errors.md) diff --git a/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps/sub-merchants.md b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps/sub-merchants.md new file mode 100644 index 00000000..c2c4f69d --- /dev/null +++ b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps/sub-merchants.md @@ -0,0 +1,41 @@ +--- +title: Partners - Sub-merchants | OAuth +heading: OAuth for Sub-Merchants +description: Steps to safely authorise access to your Razorpay account. +--- + +# OAuth for Sub-Merchants + +When the sub-merchant tries to connect their Razorpay account with yours: + +1. A front-end interface for your app with a button redirects the sub-merchant to the Razorpay OAuth page. +2. A redirect URL points to your application. Razorpay redirects the sub-merchants to this URL. + +> **WARN** +> +> +> **Watch Out!** +> +> Only the person with [Owner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md#owner) credentials of the sub-merchant account can authorise the access. +> + +## Workflow + +Given below is the overall flow: +1. The sub-merchant logs in to the application. +1. The sub-merchant clicks **Connect with Razorpay** and is shown the authorisation page. The sub-merchant clicks **Authorize** to proceed. + ![Sample Authorisation Interface](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/oauth-authorize.jpg.md) +2. The application redirects to the Razorpay authorisation URL. This URL requests the sub-merchant's approval for granting access to the requested resource on Razorpay. +3. The user is shown the approval page where they can accept or reject the grant of this access. +4. After the user approves or rejects the request, Razorpay redirects to the `redirect_url` specified. + - If approved, an `authorization_code` is included as a query parameter. + - If denied, the error reason is sent in the query parameter. + +> **INFO** +> +> +> **Handy Tips** +> +> - Razorpay OAuth supports the standard [authorisation code grant](https://tools.ietf.org/html/rfc6749#section-4.1). +> - Implement the flow described below to obtain an authorisation code and then exchange it for an access token. The [implicit grant](https://tools.ietf.org/html/rfc6749#section-4.2) is currently not supported. +> diff --git a/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/revoke-access.md b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/revoke-access.md new file mode 100644 index 00000000..ded9b0c6 --- /dev/null +++ b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/revoke-access.md @@ -0,0 +1,18 @@ +--- +title: Revoke Access to Application +description: Sub-merchant can revoke access from the Razorpay Dashboard. +--- + +# Revoke Access to Application + +Revoking access to a particular application restricts all permissions to access sub-merchant data and thereby removes it from the list of **Connected Applications**. + +## Revoke Application Access From Dashboard + +To revoke access to a connected application, the sub-merchant should follow these steps: + +1. Log in to the Dashboard. +2. Navigate to **Applications** and click **Revoke** beside the application. + ![Revoke Access](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-oauth-revoke-access.jpg.md) +3. Confirm the action by clicking **Revoke Access**. + ![Click Revoke](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/oauth_test_6.jpg.md) diff --git a/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/subscribe-to-webhooks.md b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/subscribe-to-webhooks.md new file mode 100644 index 00000000..43afab1e --- /dev/null +++ b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/subscribe-to-webhooks.md @@ -0,0 +1,62 @@ +--- +title: Subscribe to Webhooks | Embedded Payments for Platforms & Marketplaces +heading: Subscribe to Webhooks +description: Setup and manage webhooks for your client application from the Razorpay Dashboard. +--- + +# Subscribe to Webhooks + +Webhooks allow you to build or set up integrations that subscribe to certain Razorpay events on merchant resources. When one of those events is triggered, we send an HTTP POST payload in JSON to a specific URL. + +Webhooks can be configured and managed independently for each application you create on your Dashboard, thereby giving you greater control over your notifications. + +Know more about [Razorpay Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + +## Set Up Webhooks + +Managing webhooks for individual applications follows the same procedure as managing account webhooks. + +> **INFO** +> +> +> **Handy Tips** +> +> If you are just starting off and have not created an application yet, refer the [create application section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps.md#1-create-an-application) to create an app. +> + +To set up webhooks: + +1. Log in to the Dashboard. +2. Navigate to **Applications**. +3. On a created application, click **Manage Webhook**. + ![Manage Webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/oauth_test_7.jpg.md) +4. Enter the **Webhook URL** where you will receive the webhook payload when the event is triggered. + ![Edit Webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/oauth_test_8.jpg.md) +5. Create a new **Secret**. This field is optional. + +> **INFO** +> +> +> **Handy Tips** +> +> The **Secret** can be used to validate that the webhook is from Razorpay, thus it should not be exposed publicly. On the UI, the **Secret** will not be shown after creation. You can leave the **Secret** blank to leave it unedited. +> + +6. Select the event(s) you want to activate the webhook for from the list of available events. +7. Click **Save** to enable the webhook. + +To validate your webhook signature, refer the [Validation section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#validate-webhooks). + +> **INFO** +> +> +> **Handy Tips** +> +> Use the Test mode on the Dashboard to test webhooks. +> + +## Webhook Retries + +The webhook responses must return a status code in the range 2XX within a window of 5 seconds. If we receive response codes other than this or if the request times out, it is considered a failure. + +On failure, a webhook is retried at progressive intervals of time. diff --git a/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/test-integration.md b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/test-integration.md new file mode 100644 index 00000000..1df13e12 --- /dev/null +++ b/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/test-integration.md @@ -0,0 +1,94 @@ +--- +title: Partners | OAuth | Test Integration +heading: Test Integration +description: Test your Razorpay OAuth integration by creating test application and authorising it. +--- + +# Test Integration + +You can test the full Razorpay OAuth flow by creating a sample application to obtain access to the sub-merchant's data securely. Below are the steps to grant access to your application for your account: + +1. [Create the test application on Dashboard](#1-create-the-test-application). +2. [Preview the OAuth page and authorise the test application](#2-preview-oauth-page-and-authorise-test-application). + +## 1. Create The Test Application + +To create the test application: + +1. On your Dashboard, click **Partner**. + ![Select Partner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-oauth-select_partner.jpg.md) +2. Click **Applications** to open the Applications tab. This tab displays a list of created applications. + ![Click Applications](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-oauth-select_applications.jpg.md) +3. Click **Create Application** and provide these details: + 1. Enter the **Name** of your application. For example, "Acme Corp". This would appear on Razorpay's authorisation page. + 2. Enter the **Website** URL of the application. + 3. Click **Upload App Icon** to upload the app's logo. Razorpay displays this icon to your users on the Razorpay Connect screens. It is also displayed in the Connected Applications list. + +> **INFO** +> +> +> **Handy Tips** +> +> Upload only square images as the App Icon. +> + + 4. Click **Save**. + ![Click Applications](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-oauth-create-application-details.jpg.md) + - Razorpay creates an application that appears on the list of created applications. The **Edit Application** page shows the application settings for both **Development** and **Production** clients. + - **Client ID** and **Client Secret** are predefined for both Development and Production clients. Use them to make request calls to Razorpay servers. + ![Application created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-oauth-create-application-prod-dev-credentials.jpg.md) +4. Enter the Redirect URIs in comma-separated format. + +> **INFO** +> +> +> **Handy Tips** +> +> For production clients, only URLs with `https` are supported. For example, `https://acmecorp.com`. +> + +5. Click **Save**. + +## 2. Preview OAuth Page and Authorise Test Application + +Follow these steps: + +1. Click **Preview OAuth Page**. Razorpay redirects you to the authorisation page, where you can authorise or decline access to your test application for your account. + +> **INFO** +> +> +> **Handy Tips** +> +> For development clients, we support `https://localhost` as a `redirect_uri` on **Preview**. However, you can replace it with any valid URLs specified in the **Development** client settings and reload the page. +> + + ![](/docs/assets/images/partners-oauth-preview-auth-page.jpg) + +2. Click **Authorize**. Razorpay redirects you to the `redirect_uri` sent in the request URL, along with the auth code. + +3. Copy the auth `code` from the URL and use it to obtain the new [access token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps.md#22-get-access-token). + + +> **INFO** +> +> +> **Handy Tips** +> +> While making the API request, pass `mode=test`. This will fetch you an access token for the test mode. Although the default is **Live** mode, testing with a live token would not help much unless your account is activated. +> + + For both production and development clients, you can control the accessibility of the application using the `scope` parameter. + - `read_write` (`scope=read_write`) would grant edit access to the application. + - `read_only` (`scope=read_only`) would allow only view access. + - `rx_read_only` would grant view access to all RazorpayX resources. That is, all `GET` API requests. This means you can only view the payouts, contacts and so on. + - `rx_read_write` would allow read and write access to all RazorpayX resources on the API. This means you can view and create payouts, contacts and so on. + - `rx_partner_read_write` would grant access to fetch payouts, contacts, fund accounts, transactions, as well as approve or reject a payout. + +Your test application appears on the **Created Applications** list on the sub-merchant's Dashboard. + +![](/docs/assets/images/partners-oauth-app-created.jpg) + +## Next Step + +[3. Go-live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/go-live-checklist.md) diff --git a/llm-content/partners/technology-partners/onboard-businesses/onboarding-sdk.md b/llm-content/partners/technology-partners/onboard-businesses/onboarding-sdk.md new file mode 100644 index 00000000..26fd3489 --- /dev/null +++ b/llm-content/partners/technology-partners/onboard-businesses/onboarding-sdk.md @@ -0,0 +1,1046 @@ +--- +title: Technology Partners | Integrate with Custom Onboarding SDK +heading: Custom Onboarding SDK +description: Integrate with Custom Onboarding SDK to create client accounts using APIs and prefill KYC details. +--- + +# Custom Onboarding SDK + +With the Custom Onboarding SDK, you can streamline sub-merchant enrollment by handling the process on their behalf — they do not need to create individual accounts or complete KYC verification themselves. Use the APIs and generate access token for your sub-merchants. You can onboard multiple sub-merchants with a single application unless there is a difference of commissions amongst the sub-merchants. + +To integrate with Custom Onboarding SDK: +1. [Create an Application](#1-create-an-application) +2. [Generate Token](#2-generate-token) +3. [Create accounts and upload KYC details using onboarding APIs](#3-create-account-and-upload-kyc-details) +4. [Generate Onboarding URL and redirect users](#4-generate-onboarding-url) +5. [Fetch access token associated with the merchant](#5-fetch-access-token) +6. [Access resources using access token](#6-access-resources-using-access-token) +7. [Process Payments](#7-process-payments) +8. [Subscribe to onboarding webhooks to receive account activation updates](#8-subscribe-to-onboarding-webhooks) + +## 1. Create an Application + +The first step towards building an integration is creating an application on the Razorpay Partner Dashboard. Here, an application refers to a software entity that you register on Razorpay to facilitate OAuth-based authentication and authorisation for businesses on your platform. +It acts as an intermediary between you and Razorpay. Internally, Razorpay OAuth identifies the applications by their `client_id`. + +- When you create an application on Razorpay, we generate two clients linked to the application: development and production clients. +- Each client has its own `client_id` and `client_secret`. +- You can use the development client in your sandbox environment or during the integration phase, and the production client once you go live. + +### Development and Production Clients + +Given below is a comparison of the development and production clients: + +Particulars | Development Client | Production Client +--- +**Redirect URI** | Can have any type of Redirect URIs whitelisted, including non-HTTP and localhost. | Cannot use non-HTTPS Redirect URIs. +--- +**Test and Live Mode Access** | Can access both modes. | Can access only live mode data. + +> **WARN** +> +> +> **Watch Out!** +> +> Only an **Owner** user can create applications on the Dashboard. +> + + +### To create an application: + + 1. Log in to the Dashboard and navigate to **Applications** under **Partners**. + ![Create Application](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-create-application.jpg.md) + 2. Click **Create Application** under **Created Applications**. + 3. Provide the following details and click **Save**. + - **Name**: The application name provided here is displayed on the Razorpay authorisation interface. + - **Website**: Enter the URL of the application's website. + - **Logo**: Upload a square image for application logo. If logo is absent, a default logo is used. + ![Add Application Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-oauth-create-application-details.jpg.md) + + The following fields are displayed after the application is created, for development and production clients. These are read-only: + - **Client ID**: Publicly exposed identifier of the client which is generated uniquely. It helps identify your application on Razorpay. + - **Client Secret**: Privately shared string between the application and Razorpay. It helps to authenticate the identity of the application on server-to-server API calls. Do not expose the client secret publicly. + - **Redirect URIs**: A whitelisted set of URIs defined during creation. Production clients can only use secure HTTPS URIs to prevent man-in-the-middle attacks. You can define multiple redirect URIs. + + ![View Production and Development Credentials for Application](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-unmask-client-id.gif.md) + 4. Edit the Redirect URIs for your clients if needed. + 5. Click **Save**. + + +## 2. Generate Token + +The next step is to generate a bearer token to access onboarding APIs. You must use the access token generated in the response to hit the [onboarding APIs](#3-create-account-and-upload-kyc-details). Below is a sample code to generate a bearer token using Onboarding SDK. + +```curl: Curl +curl --location 'https://auth.razorpay.com/token' \ +--header 'Content-Type: application/json' \ +--form 'client_id=""' \ +--form 'client_secret=""' \ +--form 'grant_type="client_credentials"' \ +--form 'mode=""' + +```java: Java +JSONObject accessTokenRequest = new JSONObject(); +accessTokenRequest.put("client_id", "") +accessTokenRequest.put("client_secret", "") +accessTokenRequest.put("grant_type", "client_credentials") +accessTokenRequest.put("redirect_uri", "") +accessTokenRequest.put("mode", "test|live") + +OAuthTokenClient oAuth = new OAuthTokenClient(); +OAuthToken oAuthToken = oAuth.getAccessToken(accessTokenRequest) +String accessToken = oAuthToken.get("access_token") + +// Initialize the client +RazorpayClient instance = new RazorpayClient("access_token"); + +```php: PHP +use Razorpay\Api\Api; +use Razorpay\Api\OAuth; + +$oauth = new OAuth(); + +$oauthToken = $oauth->oauthClient->getAccessToken([ + "client_id" => "", + "client_secret" => "", + "grant_type" => "client_credentials", + "redirect_uri" => "https://example.com", + "code" => "def50200d844dc80cc44dce2c665d07a374d76802", + "mode" => "test" +]); + +$api = new Api(null, null, $oauthToken["access_token"]); + +```csharp: .NET +Dictionary accessTokenRequest = new Dictionary(); +accessTokenRequest.Add("client_id",""); +accessTokenRequest.Add("client_secret",""); +accessTokenRequest.Add("redirect_uri",""); +accessTokenRequest.Add("grant_type","client_credentials"); +accessTokenRequest.Add("mode","test|live"); + +OAuthTokenClient oAuth = new OAuthTokenClient(); +OAuthTokenClient oAuthToken = oAuth.GetAccessToken(accessTokenRequest); +String accessToken = oAuthToken["access_token"]; + +// Initialize the client +RazorpayClient instance = new RazorpayClient(accessToken); + +```ruby: Ruby +options = { + 'client_id' => '', + 'client_secret' => '', + 'grant_type' => 'client_credentials', + 'redirect_uri' => '', + 'mode' => 'test' +} +oauth_token = Razorpay::OAuthToken.get_access_token(options) + +#Initialize the client +Razorpay.setup_with_oauth(oauth_token.access_token) + +```javascript: Node.js +const Razorpay = require("razorpay") +const OAuthTokenClient = require("razorpay/dist/oAuthTokenClient") + +async function getAccessToken() { + try { + const oAuth = new OAuthTokenClient(); + const token = await oAuth.getAccessToken({ + "client_id": "", + "client_secret": "", + "grant_type": "authorization_code", + "redirect_uri": "https://example.com", + "code": "def50200d844dc80cc44dce2c665d07a374d76802", + "mode": "test" + }); + + const instance = new Razorpay({ + oauthToken: token.access_token + }); + + console.log("OAuth Token:", token.access_token); + return instance; + } catch (error) { + console.error("Error getting access token:", error); + } +} + +// Call the function +getAccessToken(); + +```json: Response +{ + "public_token": "rzp_test_oauth_XXXXXXXXXXXXXX", + "razorpay_account_id": "", + "token_type": "Bearer", + "expires_in": 7775997, + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJhdWQiOiJLdVRiTWxTM3FiQWFNNSIsImp0aSI6Ik5YNzJLYWJwWnZzdHliIiwiaWF0IjoxNzA3MTE3NDAwLCJuYmYiOjE3MDcxMTc0MDAsInN1YiI6IiIsImV4cCI6MTcxNDg5MzM5NywidXNlcl9pZCI6bnVsbCwibWVyY2hhbnRfaWQiOiJKWDFTYW5iU2JJaWRuZyIsInNjb3BlcyI6WyJyZWFkX3dyaXRlIl19.FLSvsKc03hzJ4vksAjnk3m8MHZDkWPoyGJsn0m32dZxE7OfT0Qet8kUFny7liTVqTvZsFUKSBo0euv-dE0YuXg" +} +``` + +The `access_token` is valid for 90 days. After your access token expires, you will receive a 4XX error response. Regenerate the access token using your credentials. + +## 3. Create Account and Upload KYC Details + +Use onboarding APIs to add KYC details of your clients. You can pre-fill all or a few KYC details using APIs and let the users fill in the remaining on the onboarding form. + +Below are the APIs available to onboard clients. + +API | Action +--- +[Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/create.md) | Create and update a client account. Add basic details like name, phone number, email ID and KYC details like business name, type and business PAN details. Check the [Account API Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/account-onboarding/entity.md) for the complete list of fields. +--- +[Product Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/request.md) | Configure products for an account. Update payment methods, settlement details and refund settings. Check the [Product Configuration API Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/product-configuration/entity.md) for the complete list of fields. +--- +[Stakeholder](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/create.md) | Add the KYC details of the authorised signatory or the owner of the business. Check the [Stakeholder API Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/stakeholder/entity.md) for the list of fields. +--- +[Document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/upload-document/upload-account-documents.md) | Upload KYC documents for accounts and stakeholders. Know more about [Document APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/upload-document.md). + +[List of required KYC documents as per business type.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/business-types-kyc-documents.md#kyc-documents) + +## 4. Generate Onboarding URL + +Below is the sample code to generate the onboarding URL. + +```java: Java +// Initialize client +OAuthTokenClient oAuth = new OAuthTokenClient(); + +JSONObject authUrlRequest = new JSONObject(); +authUrlRequest.put("client_id",""); +authUrlRequest.put("redirect_uri",""); + +JSONArray scopes = new JSONArray(); +scopes.put("read_write"); + +authUrlRequest.put("scopes", scopes); +authUrlRequest.put("state",""); + +authUrlRequest.put("onboarding_signature", ""); + +String authUrl = oAuth.getAuthURL(authUrlRequest); + +```php: PHP +use Razorpay\Api\OAuth; +use Razorpay\Api\Utility; + +// Initialize client +$oauth = new OAuth(); +$utility = new Utility(); + +$attributes = [ + "submerchant_id" => "", + "timestamp" => floor(microtime(true)) +]; + +$onboarding_signature = $utility->generateOnboardingSignature($attributes, ""); + +$authUrl = $oauth->oauthClient->getAuthURL([ + "client_id" => "", + "response_type" => "code", + "redirect_uri" => "https://example.com/razorpay_callback", + "scopes" => ["read_write"], + "state" => "NOBYtv8r6c75ex6WZ", + "onboarding_signature" => $onboarding_signature +]); + +```javascript: Node.js +const OAuthTokenClient = require("razorpay/dist/oAuthTokenClient"); +const { + generateOnboardingSignature, +} = require("razorpay/dist/utils/razorpay-utils"); + +// Initialize client +let oAuth = new OAuthTokenClient(); + +let attributes = { + submerchant_id: "", + timestamp: Math.floor(Date.now() / 1000), +}; + +let onboarding_signature = generateOnboardingSignature( + attributes, + "", +); + +// Not a promise +const authUrl = oAuth.generateAuthUrl({ + client_id: "", + response_type: "code", + redirect_uri: "https://example.com/razorpay_callback", + scope: ["read_write"], + state: "NOBYtv8r6c75ex6WZ", + onboarding_signature: onboarding_signature, +}); + +```csharp: .NET +// Initialize client +OAuthTokenClient oAuth = new OAuthTokenClient(); + +Dictionary authUrlRequest = new Dictionary(); +authUrlRequest.Add("client_id",""); +authUrlRequest.Add("redirect_uri",""); +authUrlRequest.Add("scopes", new List {"read_only", "read_write"}); +authUrlRequest.Add("state",""); +authUrlRequest.Add("onboarding_signature", ""); + +String authUrl = oAuth.GetAuthUrl(authUrlRequest); + +```ruby: Ruby +options = { + 'client_id' => '', + 'redirect_uri' => '', + 'scopes' => ["read_write"], + 'state' => '', + 'onboarding_signature' => '' +} +authorize_url = Razorpay::OAuthToken.get_auth_url(options) + +```json: Response +{ + "amount": 100, + "currency": "INR" +} +``` + +### Sample Onboarding URL + +```json: Sample Onboarding URL +https://auth.razorpay.com/authorize + ?client_id=8DXCMTshWSWECc + &response_type=code + &redirect_uri=https://example.com/razorpay_callback + &scope=read_write + &state=NOBYtv8r6c75ex6WZ + &onboarding_signature=MUOkjashBYtv8r6c75ex6WZ +``` + + +### Query Parameters + +Define the following query parameters in the URL. + +`client_id` _mandatory_ +: `string` The unique client identifier. + +`response_type` _mandatory_ +: `string` Specifies that the application is requesting an authorisation code grant. Possible value is `code`. + +`redirect_uri` _mandatory_ +: `string` Callback URL used by Razorpay to redirect after the user approves or denies the authorisation request. The client should whitelist the `redirect_uri`. + +`scope` _mandatory_ +: `string` Defines what access your application is requesting from the user. You can request multiple scopes by specifying each scope name separately in the URL using array notation. For example: `scope[]=read_only&scope[]=read_write`. Possible values: + - `read_only`: Provides read access to all resources. That is, all `GET` API requests. + - `read_write`: Provides read and write access to all resources on the API. + +`state` _mandatory_ +: `string` A random string generated by your service. This parameter helps prevent cross-site request forgery (CSRF) attacks. State validation has to be implemented by your application and should work as described below: + 1. Your application should generate a unique random string and save it in the database. + 1. Send the random string to Razorpay in the authorisation request in the `state` parameter. + 1. Razorpay sends back the same `state` value as query params on your redirect URI. + 1. In your backend, you validate that the state value stored in your database matches the one you received for the `client_id` and the user that initiated the authorisation. + +`onboarding_signature` _conditionally mandatory_ +: `string` This parameter is applicable only for accounts created using KYC pre-fill. This will reduce sub-merchant onboarding time. Know more about [onboarding signature](#onboarding-signature). + + + +### Success Response Parameters + +We send the following query parameters if the user approves the authorisation request: + +`code` +: URL-encoded authorisation code. You can exchange this code for an access token in the next step. + +`state` +: The value of the `state` parameter sent in the authorisation request. + + + +### Error Response Parameters + +Error | Cause | Solution +--- +phone number unverified | - You are using an expired `onboarding_signature`. +- `onboarding_signature` is not provided or is invalid. + | Use a valid `onboarding_signature`. An onboarding signature is valid for 24 hours. You can regenerate it using the same code. + +Refer to our [errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/errors.md#initiating-authorisation-using-url) page for the complete list of errors and solutions. + + +### Redirect Users to Onboarding + +You need to share the Razorpay-hosted co-branded onboarding URL with your clients. Clients use this URL to continue the onboarding process. + +1. The user will be redirected to the co-branded onboarding form when they click the embedded onboarding button on your platform. The user has to enter any pending KYC details and verify the pre-filled information. +2. After the necessary details are submitted, the user is prompted to authorise your platform to access data and create payments and refunds. +3. The client gives authorisation, which allows Razorpay to connect their client account to your Partner account. +4. On successful authorisation, Razorpay redirects the user back to a URL configured by you in your application settings. While redirecting, Razorpay shares an authentication code. You need to use this Auth code in the token API request to generate an Auth token. + +### Onboarding Signature + +`onboarding_signature` is a mandatory parameter if you are pre-filling KYC details. The onboarding signature is used to verify the identity of the partner initiating the onboarding URL. + +Use the below sample code to generate an `onboarding_signature`. + +```java: Java +long timestamp = System.currentTimeMillis()/1000L; +JSONObject options = new JSONObject(); +options.put("submerchant_id", "HQVlm3bnPmccC0"); +options.put("timestamp", timestamp); +String signature = Utils.generateOnboardingSignature(options, ""); + +```php: PHP +use Razorpay\Api\Utility; + +$utility = new Utility(); +$attributes = [ + "submerchant_id" => "", + "timestamp" => floor(microtime(true)) +]; +$onboarding_signature = $utility->generateOnboardingSignature($attributes, ""); + +```javascript: Node.js +const { + generateOnboardingSignature, +} = require("razorpay/dist/utils/razorpay-utils"); + +// Initialize client +let oAuth = new OAuthTokenClient(); + +let attributes = { + submerchant_id: "", + timestamp: Math.floor(Date.now() / 1000), +}; + +let onboarding_signature = generateOnboardingSignature( + attributes, + "", +); + +```csharp: .NET +long timestamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); +Dictionary data = new Dictionary(); +data.Add("submerchant_id", "HQVlm3bnPmccC0"); +data.Add("timestamp", timestamp); +string signature = Utils.GenerateOnboardingSignature(data, ""); + +```ruby: Ruby +body = { + submerchant_id: "HQVlm3bnPmccC0", + timestamp: Time.now.to_i +} +signature = Razorpay::Utility.generate_onboarding_signature(body, "") + +```json: Response +44813a7db24e30c65f10d5b06751f5cddfd5d9094033bd5e899d709f8f13361fff5eecf4d39ebb7c4547af3898a633f71f62196a8e06f85aa0272e6cc3e9faba470abbb0d8441e3864af + +``` + +> **WARN** +> +> +> **Watch Out!** +> +> The response of the account creation API, returns id as `acc_HQVlm3bnPmccC0`. However, for the onboarding signature, the sub-merchant id must be entered without the 'acc_' which means `acc_HQVlm3bnPmccC0` must be entered as `HQVlm3bnPmccC0`. +> + +### Authorisation Response + +After completion, the browser is redirected to URI specified in the `redirect_uri` parameter. + +## 5. Fetch Access Token + +You require an access token to create payments and refunds on behalf of your clients using APIs. Exchange the authorisation code received in the previous step for an access token. + +> **INFO** +> +> +> **Handy Tips** +> +> The authorisation code is URL-encoded. Decode it before sending in this request. +> + +Given below is a sample request to be made from the application's backend server. + +```curl: Curl +curl --location 'https://auth.razorpay.com/token' \ +--header 'Content-Type: application/json' \ +'{ + "client_id": "", + "client_secret": "", + "grant_type": "authorization_code", + "redirect_uri": "http://example.com/razorpay_callback", + "code": "def50200d844dc80cc44dce2c665d07a374d76802", + "mode": "test" +}' + +```java: Java +JSONObject accessTokenRequest = new JSONObject(); +accessTokenRequest.put("client_id", "") +accessTokenRequest.put("client_secret", "") +accessTokenRequest.put("grant_type", "authorization_code") +accessTokenRequest.put("redirect_uri", "") +accessTokenRequest.put("code", "") +accessTokenRequest.put("mode", "test|live") + +OAuthTokenClient oAuth = new OAuthTokenClient(); +OAuthToken oAuthToken = oAuth.getAccessToken(accessTokenRequest) +String accessToken = oAuthToken.get("access_token") + +```php: PHP +use Razorpay\Api\Api; +use Razorpay\Api\OAuth; + +$oauth = new OAuth(); + +$oauthToken = $oauth->oauthClient->getAccessToken([ + "client_id" => "", + "client_secret" => "", + "grant_type" => "authorization_code", + "redirect_uri" => "https://example.com", + "code" => "def50200d844dc80cc44dce2c665d07a374d76802", + "mode" => "test" +]); + +$api = new Api(null, null, $oauthToken["access_token"]); + +```javascript:Node.js +const Razorpay = require("razorpay") +const OAuthTokenClient = require("razorpay/dist/oAuthTokenClient") + +async function getAccessToken() { + try { + const oAuth = new OAuthTokenClient(); + const token = await oAuth.getAccessToken({ + "client_id": "", + "client_secret": "", + "grant_type": "authorization_code", + "redirect_uri": "https://example.com", + "code": "def50200d844dc80cc44dce2c665d07a374d76802", + "mode": "test" + }); + + const instance = new Razorpay({ + oauthToken: token.access_token + }); + + console.log("OAuth Token:", token.access_token); + return instance; + } catch (error) { + console.error("Error getting access token:", error); + } +} + +// Call the function +getAccessToken(); + +```csharp: .NET +Dictionary accessTokenRequest = new Dictionary(); +accessTokenRequest.Add("client_id",""); +accessTokenRequest.Add("client_secret",""); +accessTokenRequest.Add("redirect_uri",""); +accessTokenRequest.Add("grant_type","authorization_code"); +accessTokenRequest.Add("code", "") +accessTokenRequest.Add("mode","test|live"); + +OAuthTokenClient oAuth = new OAuthTokenClient(); +OAuthTokenClient oAuthToken = oAuth.GetAccessToken(accessTokenRequest); +String accessToken = oAuthToken["access_token"]; + +// Initialize the client +RazorpayClient instance = new RazorpayClient(accessToken); + +```ruby: Ruby +options = { + 'client_id' => '', + 'client_secret' => '', + 'grant_type' => 'authorization_code', + 'redirect_uri' => '', + 'code' => '' + 'mode' => 'test|live' +} +oauth_token = Razorpay::OAuthToken.get_access_token(options) + +# Initialize the client +Razorpay.setup_with_oauth(oauth_token.access_token) + +```json: Response +{ + "public_token": "rzp_test_oauth_XXXXXXXXXXXXXX", + "token_type": "Bearer", + "expires_in": 7862400, + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IkY1Z0NQYkhhRzRjcUpnIn0.eyJhdWQiOiJGNFNNeEgxanMxbkpPZiIsImp0aSI6IkY1Z0NQYkhhRzRjcUpnIiwiaWF0IjoxNTkyODMxMDExLCJuYmYiOjE1OTI4MzEwMTEsInN1YiI6IiIsImV4cCI6MTYwMDc3OTgxMSwidXNlcl9pZCI6IkYycVBpejJEdzRPRVFwIiwibWVyY2hhbnRfaWQiOiJGMnFQaVZ3N0lNV01GSyIsInNjb3BlcyI6WyJyZWFkX29ubHkiXX0.Wwqt5czhoWpVzP5_aoiymKXoGj-ydo-4A_X2jf_7rrSvk4pXdqzbA5BMrHxPdPbeFQWV6vsnsgbf99Q3g-W4kalHyH67LfAzc3qnJ-mkYDkFY93tkeG-MCco6GJW-Jm8xhaV9EPUak7z9J9jcdluu9rNXYMtd5qxD8auyRYhEgs", + "refresh_token": "def50200f42e07aded65a323f6c53181d802cc797b62cc5e78dd8038d6dff253e5877da9ad32f463a4da0ad895e3de298cbce40e162202170e763754122a6cb97910a1f58e2378ee3492dc295e1525009cccc45635308cce8575bdf373606c453ebb5eb2bec062ca197ac23810cf9d6cf31fbb9fcf5b7d4de9bf524c89a4aa90599b0151c9e4e2fa08acb6d2fe17f30a6cfecdfd671f090787e821f844e5d36f5eacb7dfb33d91e83b18216ad0ebeba2bef7721e10d436c3984daafd8654ed881c581d6be0bdc9ebfaee0dc5f9374d7184d60aae5aa85385690220690e21bc93209fb8a8cc25a6abf1108d8277f7c3d38217b47744d7", + "razorpay_account_id": "acc_Dhk2qDbmu6FwZH" +} +``` + + +### Request Parameters + +`client_id` _mandatory_ +: `string` Unique client identifier. + +`client_secret` _mandatory_ +: `string` Client secret string. + +`grant_type` _mandatory_ +: `string` Defines the grant type for the request. Possible value is `authorization_code`. + +`redirect_uri` _mandatory_ +: `string` Specifies the same `redirect_uri` used in the authorisation request. + +`code` _mandatory_ +: `string` Decoded authorisation code received in the last step. + +`mode` _optional_ +: `string` The type of mode. Possible values: + - `test` + - `live` (default) + + +> **INFO** +> +> +> **Handy Tips** +> +> Clients on production can only make requests for live mode. +> + + + + +### Response Parameters + +The server responds with the following parameters: + +`token_type` +: `string` Defines the type of access token. Possible value is `Bearer`. + +`expires_in` +: `integer` Integer representing the TTL of the access token in seconds. + +`access_token` +: `string` A private key used to access sub-merchant resources on Razorpay. Used for server-to-server calls only. + +`public_token` +: `string` A public key is used only for public routes such as Checkout or Payments. + +`refresh_token` +: `string` Used to refresh the access token when it expires. + +`razorpay_account_id` +: `string` Identifies the sub-merchant ID who granted the authorisation. + + + +### Error Response Parameters + + Refer to our [errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/errors.md#token-apis) page for the list of errors and solutions. + + +Store the `access_token` received above on your server. Using this token, you can access the sub-merchant's data, create payments and refunds using Razorpay APIs. + +#### Regenerate Access Token + +The `access_token` is valid for 90 days. After your access token expires, you will receive a 4XX error response. Use a refresh token to generate a new access token. You can make a request using your refresh token to generate a new (access_token and refresh_token) pair. + +Below is a sample API request to request a new token. + +```curl: Curl +curl -X POST https://auth.razorpay.com/token +-H "Content-type: application/json" +-d '{ + "client_id": "", + "client_secret": "", + "grant_type": "refresh_token", + "refresh_token": "def5020096e1c470c901d34cd60fa53abdaf3662sa0" +}' + +```csharp: .NET +Dictionary refreshTokenRequest = new Dictionary(); refreshTokenRequest.Add("client_id",""); refreshTokenRequest.Add("client_secret",""); refreshTokenRequest.Add("refresh_token",""); + +OAuthTokenClient oAuth = new OAuthTokenClient(); OAuthTokenClient oAuthToken = oAuth.RefreshToken(refreshTokenRequest); String accessToken = oAuthToken["access_token"]; + +// Initialize the client RazorpayClient instance = new RazorpayClient(accessToken); + +```ruby: Ruby +options = { + 'client_id' => '', + 'client_secret' => '', + 'refresh_token' => '' +} +oauth_token = Razorpay::OAuthToken.refresh_token(options) + +#Initialize the client +Razorpay.setup_with_oauth(oauth_token.access_token) + +```java: Java +JSONObject refreshTokenRequest = new JSONObject(); +refreshTokenRequest.put("client_id", "") +refreshTokenRequest.put("client_secret", "") +refreshTokenRequest.put("refresh_token", "") + +OAuthTokenClient oAuth = new OAuthTokenClient(); +OAuthToken oAuthToken = oAuth.refreshToken(refreshTokenRequest) +String accessToken = oAuthToken.get("access_token") + +// Initialize the client +RazorpayClient instance = new RazorpayClient(accessToken); + +```php: PHP +use Razorpay\Api\Api; +use Razorpay\Api\OAuth; + +$oauth = new OAuth(); + +$oauthToken = $oauth->oauthClient->getRefreshToken([ + "client_id" => "", + "client_secret" => "", + "grant_type" => "refresh_token", + "refresh_token" => "def50200d844dc80cc44dce2c665d07a374d76802" +]); + +$api = new Api(null, null, $oauthToken["access_token"]); + +```javascript: Node.js +const Razorpay = require("razorpay") +const OAuthTokenClient = require("razorpay/dist/oAuthTokenClient") + +async function refreshToken() { + try { + const oAuth = new OAuthTokenClient(); + const token = await oAuth.refreshToken({ + "client_id": "", + "client_secret": "", + "refresh_token": "def50200d844dc80cc44dce2c665d07a374d76802" + }); + + const instance = new Razorpay({ + oauthToken: token.access_token + }); + + console.log("OAuth Token:", token); + return instance; + } catch (error) { + console.error("Error getting access token:", error); + } +} + +// Call the function +refreshToken(); + +```json: Response +{ + "public_token": "rzp_test_oauth_XXXXXXXXXXXXXX", + "token_type": "Bearer", + "expires_in": 7862400, + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ijl4dTF", + "refresh_token": "def5020096e1c470c901d34cd60fa53abdaf36620e823ffa53" +} +``` + +## 6. Access Resources Using Access Token + +After you obtain an access token, you can use it to access the sub-merchant's data on Razorpay APIs. The access is controlled based on the scope requested for and granted by the user during the authorisation process. + +Provide the access token in the `Bearer` authorisation header while requesting [Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + +Given below is a sample code for the [Fetch all Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments). + +```Curl: Curl +curl -X GET https://api.razorpay.com/v1/payments +-H "Authorization: Bearer " + +```java: Java +RazorpayClient instance = new RazorpayClient(""); + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List payment = instance.payments.fetchAll(params); + +```php: PHP +$api = new Api(null, null, ""); + +$api->payment->all(array("count"=> "1")); + +```csharp: .NET +RazorpayClient instance = new RazorpayClient(""); + +Dictionary params = new Dictionary(); +params.Add("count","1"); + +List payment = instance.Payment.All(params); + +```ruby: Ruby +Razorpay.setup_with_oauth('') + +option = {"count":1} + +payments = Razorpay::Payment.all(option) + +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "pay_G8VaL2Z68LRtDs", + "entity": "payment", + "amount": 900, + "currency": "INR", + "status": "captured", + "order_id": "order_G8VXfKDWDEOHHd", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Purchase Shoes", + "card_id": null, + "bank": "KKBK", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_DitrYCFtCIokBO", + "notes": [], + "fee": 22, + "tax": 4, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "0125836177" + }, + "created_at": 1606985740 + }, + { + "id": "pay_G8VQzjPLoAvm6D", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "captured", + "order_id": "order_G8VPOayFxWEU28", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "#G8VPNzYJsQWMvY", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_DitrYCFtCIokBO", + "notes": [], + "fee": 24, + "tax": 4, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "033814379298" + }, + "created_at": 1606985209 + } + ] +} +``` + +After you obtain an access token, you can use it to access the sub-merchant's data on Razorpay APIs. The access is controlled based on the scope requested for and granted by the user during the authorisation process. + +## 7. Process Payments + +As a Technology Partner, you can allow sub-merchants to accept payments through various Payment Methods and channels. after getting `access_token`. + + +### 1. Access Payment APIs using OAuth + + You can process payments on behalf of your sub-merchants using [Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). Use the tokens generated during [OAuth integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps.md). + + Use the `access_token` generated in the [build integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps.md#22-get-access-token) step to authenticate using `Bearer Auth`. + + Below is a sample code to create an Order and process payments. + + /orders + + + ```curl: Request + curl -H "Authorization: Bearer " \ + -X POST https://api.razorpay.com/v1/orders \ + -H "content-type: application/json" \ + -d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } + }' + + ```json: Success Response + { + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071 + } + + ```js: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + + The parameter descriptions and errors are present in the [Create an Order API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md) documentation. + + + +### 2. Public Token + + Using the `public_token` for authorisation can secure a public-facing implementation such as Razorpay Checkout. In such cases, the `public_token` can replace the `key_id` field as shown below: + + ```js: Checkout + Pay + + + var options = { + "key": "rzp_test_oauth_XXXXXXXXXXXXXX", // Public Token + "amount": "29900", // Amount is in currency subunits. Default currency is INR. + "currency": "INR", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_9A33XWu170gUtm", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information especially their phone number + "name": "Gaurav Kumar", //your customer's name + "email": "gaurav.kumar@example.com", + "contact": "9000090000" //Provide the customer's phone number for better conversion rates + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ``` + + Know more about [Web Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + + + +### 3. Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `client_secret`: Available in your server. The `client_secret` that was generated from the [RazorpayDashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, client_secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + #### Generate Signature on Your Server + + Given below is the sample code for payment signature verification: + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[CLIENT_KEY_ID]", "[CLIENT_KEY_SECRET]"); + + String secret = "EnLs21M47BllR3X8PSFtjtbd"; + + JSONObject options = new JSONObject(); + options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); + options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); + options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + + boolean status = Utils.verifyPaymentSignature(options, secret); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } + Razorpay::Utility.verify_payment_signature(payment_response) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[CLIENT_KEY_ID]", "[CLIENT_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + options.Add("razorpay_order_id", "order_IEIaMR65"); + options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); + options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + + Utils.verifyPaymentSignature(options); + ``` + + #### Post Signature Verification + + With this, your integration is complete. Test the integration before going live. Replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +## 8. Subscribe to Onboarding Webhooks + +Subscribe to webhook events to receive real time notifications on the onboarding status of your clients. Check the available [Partner Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/status.md). + +With this, your integration is complete. Test the integration before going live. + +### Related Information + +- [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/partners/errors.md) +- [Razorpay Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) diff --git a/llm-content/partners/technology-partners/onboard-businesses/settings.md b/llm-content/partners/technology-partners/onboard-businesses/settings.md new file mode 100644 index 00000000..22428dcf --- /dev/null +++ b/llm-content/partners/technology-partners/onboard-businesses/settings.md @@ -0,0 +1,31 @@ +--- +title: Co-branded Onboarding Settings | Embedded Payments +heading: Co-branded Onboarding Settings +description: Customise your theme, logo and brand name to mimic your platform environment while onboarding sub-merchants. +--- + +# Co-branded Onboarding Settings + +You can configure the theme colour and logo as per your platform theme to provide a seamless onboarding experience for your sub-merchants. + +## Configure Theme and Logo + +To customise the theme and logo: + +1. Log in to the Dashboard. +2. Navigate to **Partners** → **Settings** → **Configuration**. +3. Provide the following details: + - Theme Color: Enter your brand theme colour's HEX value. For example, "#3399cc". This is the primary colour for the onboarding flow UI. + - Your Logo: Click **Upload File** to add your brand logo. Ensure the file meets these requirements: + - Height: Width ratio should be 1:1 (square shape). + - Maximum file size: 1 MB. + - Maximum dimension: 256x256px. + - Enter Your Brand Name: Enter the name that should be shown on the onboarding flow UI. The maximum character limit is 100. + +4. Check the preview of the onboarding UI on the right (desktop and phone) and click **Save**. + +![Customise Onboarding Flow - Embedded Payments for Platforms & Marketplaces](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/platforms-and-marketplaces-customise-onboarding.jpg.md) + +## Related Information + +- [Track Onboarding Status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/status.md) diff --git a/llm-content/partners/technology-partners/onboard-businesses/status.md b/llm-content/partners/technology-partners/onboard-businesses/status.md new file mode 100644 index 00000000..e444c302 --- /dev/null +++ b/llm-content/partners/technology-partners/onboard-businesses/status.md @@ -0,0 +1,25 @@ +--- +title: Onboarding Status | Razorpay Partners Embedded Payments +heading: Onboarding Status +description: Track your sub-merchant's onboarding status through webhooks. +--- + +# Onboarding Status + +You can [subscribe to webhook events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/subscribe-to-webhooks.md) to receive real-time notifications about a merchant's account activation status. Using this information, you can: +- Nudge your sub-merchants to complete their onboarding and get payments enabled. +- Know when a sub-merchant's account is activated to manage their payments. + +## Available Webhook Events + +Webhook Event | Description | Payload +--- +`account.activated` | Triggered when an account is successfully activated and ready for use. |[Sample Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/activated.md#account-activated) +--- +`account.under_review` | Triggered when an account is under review for verification or compliance checks. | [Sample Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/under-review.md#account-under-review) +--- +`account.needs_clarification` | Triggered when additional information is required to complete account verification. | [Sample Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/needs-clarification.md#account-needs-clarification) +--- +`account.suspended` | Triggered when an account is disabled due to policy or compliance violations. | [Sample Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/suspended.md#account-suspended) +--- +`account.rejected` | Triggered when an account application is declined and cannot be activated. | [Sample Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/rejected.md#account-rejected) diff --git a/llm-content/partners/technology-partners/process-payments.md b/llm-content/partners/technology-partners/process-payments.md new file mode 100644 index 00000000..3ff2ead2 --- /dev/null +++ b/llm-content/partners/technology-partners/process-payments.md @@ -0,0 +1,197 @@ +--- +title: Process Payments for Embedded Payments for Platforms & Marketplaces +heading: Process Payments +description: Process payments on behalf of your customers using multiple Payment Methods. +--- + +# Process Payments + +As a Technology Partner, you can allow sub-merchants on your platform to accept payments through various Payment Methods and channels. + +![Process payments using Razorpay products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/platforms-and-marketplaces-payments-processing.jpg.md) + + +### 1. Access Payment APIs using OAuth + + You can process payments on behalf of your sub-merchants using [Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). Use the tokens generated during [OAuth integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps.md). + + Use the `access_token` generated in the [build integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/onboard-businesses/integrate-oauth/integration-steps.md#22-get-access-token) step to authenticate using `Bearer Auth`. + + Below is a sample code to create an Order and process payments. + + /orders + + + ```curl: Request + curl -H "Authorization: Bearer " \ + -X POST https://api.razorpay.com/v1/orders \ + -H "content-type: application/json" \ + -d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } + }' + + ```json: Success Response + { + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071 + } + + ```js: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + + The parameter descriptions and errors are present in the [Create an Order API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md) documentation. + + + +### 2. Public Token + + Using the `public_token` for authorisation can secure a public-facing implementation such as Razorpay Checkout. In such cases, the `public_token` can replace the `key_id` field as shown below: + + ```js: Checkout + Pay + + + var options = { + "key": "rzp_test_oauth_XXXXXXXXXXXXXX", // Public Token + "amount": "29900", // Amount is in currency subunits. Default currency is INR. + "currency": "INR", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_9A33XWu170gUtm", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information especially their phone number + "name": "Gaurav Kumar", //your customer's name + "email": "gaurav.kumar@example.com", + "contact": "9000090000" //Provide the customer's phone number for better conversion rates + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ``` + + Know more about [Web Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + + + +### 3. Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `client_secret`: Available in your server. The `client_secret` that was generated from the [RazorpayDashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, client_secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + #### Generate Signature on Your Server + + Given below is the sample code for payment signature verification: + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[CLIENT_KEY_ID]", "[CLIENT_KEY_SECRET]"); + + String secret = "EnLs21M47BllR3X8PSFtjtbd"; + + JSONObject options = new JSONObject(); + options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); + options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); + options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + + boolean status = Utils.verifyPaymentSignature(options, secret); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } + Razorpay::Utility.verify_payment_signature(payment_response) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[CLIENT_KEY_ID]", "[CLIENT_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + options.Add("razorpay_order_id", "order_IEIaMR65"); + options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); + options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + + Utils.verifyPaymentSignature(options); + ``` + + #### Post Signature Verification + + With this, your integration is complete. Test the integration before going live. Replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +## List of Available Payment Products + +Below is a list of Razorpay products available to you to accept payments. + +Product and Use +--- +[Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md): Integrate our Payment Gateway with your website or app to accept payments from customers. +--- +[Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout.md): Integrate Razorpay Magic Checkout to help customers complete prepaid and cash-on-delivery (COD) transactions on your website/app and reduce your COD RTOs. +--- +[Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md): Share payment link via an email, SMS, messenger or chatbot and get paid immediately. +--- +[Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md): Create and send GST-compliant invoices that your customers can pay online instantly. Get paid faster and improve your cash flow. +--- +[Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md): Offer your customers subscription plans with automated recurring transactions on various payment modes. +--- +[Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md): Generate virtual bank accounts and UPI IDs on demand and accept payments using NEFT, RTGS, IMPS and UPI. Get notified for each incoming payment and automate the tedious reconciliation process. diff --git a/llm-content/partners/technology-partners/reports-and-reconciliation/partner.md b/llm-content/partners/technology-partners/reports-and-reconciliation/partner.md new file mode 100644 index 00000000..e15c2e0d --- /dev/null +++ b/llm-content/partners/technology-partners/reports-and-reconciliation/partner.md @@ -0,0 +1,63 @@ +--- +title: Reports and Reconciliation for Embedded Payments for Platforms & Marketplaces +heading: Partner +description: Check the list of available reports as a Partner and the steps to download them. +--- + +# Partner + +You can download reports from your Partner and Linked Account Dashboards and reconcile payments. + +## Platform Fee Reports + +If you have processed platform fees, you can download additional reports from your Linked Account where the platform fees are settled. + +### Provide Dashboard Access + +To download reports, the Platform must provide Dashboard access to your Linked Accounts. To provide Dashboard access: +1. Log in to the Dashboard. +2. Navigate to **Route** under **Products**. + ![Partners Dashboard select Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-dashboard-route.jpg.md) +3. In the **Accounts** tab, enable **Dashboard Access** for the required **Account Id**. + ![Enable Razorpay Dashboard access for Technology Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/enable-dashboard-access-platform.jpg.md) +4. Once the Dashboard access is granted, a password reset link is sent to the Linked Account's registered email id. +5. Reset the password and log in to the Linked Account Dashboard. + +### Download Platform Fee Reports + +Watch this video to see how to generate the Linked Account Transfers Report. + +[Video: https://www.youtube.com/embed/UgqBLfX4xBM] + +To download reports: +1. Log in to the Dashboard. + +> **INFO** +> +> +> **Handy Tips** +> +> If your Linked Account is created with the same email as your Partner account, log in to your Partner account and **Switch Merchant**. If the email is different, log in to the Linked Account [set up earlier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/technology-partners/control-of-funds/set-up-accounts.md). +> + +2. In the left menu, navigate to **Reports**. + ![Partners Dashboard Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/reports-partners-dashboard.jpg.md) +3. Select the report type, period and format. +4. Click **Generate Report**. +5. It can take a few minutes to a couple of hours to generate a report depending on the data size. Once the report is ready, you can download it from the **Recent Reports** tab. + +### Available Reports + +Below is the list of Linked Account reports available to you. + +Report | Description +--- +Transfers Report | List of transactions collecting Platform fees from your clients. +--- +Settlements Report | List of all Settlements made to your bank account. Settlement refers to amount credited to your account. +--- +Settlements Recon Report | List of Settlements made to your bank account and the associated transfers. You can use this to reconcile your settlements with your platform fees. +--- +Combined Report | List of all debits and credits of your account. +--- +Reversals Report | List of platform fee reversals made from a Linked Account. diff --git a/llm-content/partners/technology-partners/reports-and-reconciliation/sub-merchant.md b/llm-content/partners/technology-partners/reports-and-reconciliation/sub-merchant.md new file mode 100644 index 00000000..6e4ae441 --- /dev/null +++ b/llm-content/partners/technology-partners/reports-and-reconciliation/sub-merchant.md @@ -0,0 +1,27 @@ +--- +title: Reports and Reconciliation for Sub-merchants | Technology Partners +heading: Sub-merchants +description: List of reports that can be downloaded from a sub-merchant Razorpay Dashboard view and the steps to download them. +--- + +# Sub-merchants + +Razorpay offers a range of reports that enable you to track the cash flow of your business. You can download all of your transaction data for a specific day, month or any time frame as per your business requirements. This information can be downloaded as a CSV, XLS, or XLSX file, or sent via email to the intended recipients. + +## Download Reports + +Know how to [download reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md#download-reports) from the Dashboard. + +## List of Reports + +Sub-merchants can download reports for all Razorpay products used by them. Check the [list of reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md#list-of-reports) available. + +### Related Reports + +Additionally, sub-merchants can download the following reports from the Dashboards: + +Report | Description | Fields +--- +Platform Fee Report | List of all Platform fee entries. | Platform_fee, Tax, Transfer id, Source id, Recipient id, Amount, Created at, Transfer Status, Settlement Status, Settled at, Settlement id, Settlement UTR, Payment id and Tax. +--- +Monthly Invoice Report | List of all Platform fee entries associated with an invoice for the selected month. | Platform_fee, Tax, Transfer id, Source id, Recipient id, Amount, Created at, Transfer Status, Settlement Status, Settled at, Settlement id, Settlement UTR, Payment id and Tax. diff --git a/llm-content/partners/technology-partners/reports-and-reconciliation/third-party.md b/llm-content/partners/technology-partners/reports-and-reconciliation/third-party.md new file mode 100644 index 00000000..19ba7eac --- /dev/null +++ b/llm-content/partners/technology-partners/reports-and-reconciliation/third-party.md @@ -0,0 +1,50 @@ +--- +title: Reports and Reconciliation for Third-Party Service Providers | Technology Partners +heading: Third-Party Service Providers +description: Steps to download reports from Linked Account Dashboard and the list of available reports. +--- + +# Third-Party Service Providers + +Third-party service providers can download reports from their Linked Account Dashboards and reconcile transactions. + +## Get Dashboard Access + +To download reports, the Platform must provide Dashboard access to your Linked Accounts. To provide Dashboard access: +1. Log in to the Dashboard. +2. Navigate to **Route** under **Products**. + ![Partners Dashboard select Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/partners-dashboard-route.jpg.md) +3. In the **Accounts** tab, enable **Dashboard Access** for the required **Account Id**. + ![Enable Razorpay Dashboard access for Technology Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/enable-dashboard-access-platform.jpg.md) +4. Once the Dashboard access is granted, a password reset link is sent to the Linked Account's registered email id. +5. Reset the password and log in to the Linked Account Dashboard. + +## Download Reports + +Watch this video to see how to generate the Linked Account Transfers Report. + +[Video: https://www.youtube.com/embed/UgqBLfX4xBM] + +To download reports: +1. Log in to the Dashboard. +2. In the left menu, navigate to **Reports**. + ![Partners Dashboard Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/reports-partners-dashboard.jpg.md) +3. Select the report type, period and format. +4. Click **Generate Report**. +5. It can take a few minutes to a couple of hours to generate a report depending on the data size. Once the report is ready, you can download it from the **Recent Reports** tab. + +## Available Reports + +Below is the list of reports available to you. + +Report | Description +--- +Transfers Report | List of transactions collecting Platform fees from your clients. +--- +Settlements Report | List of all Settlements made to your bank account. Settlement refers to amount credited to your account. +--- +Settlements Recon Report | List of Settlements made to your bank account and the associated transfers. You can use this to reconcile your settlements with your platform fees. +--- +Combined Report | List of all debits and credits of your account. +--- +Reversals Report | List of platform fee reversals made from a Linked Account. diff --git a/llm-content/payments.md b/llm-content/payments.md new file mode 100644 index 00000000..a64f341b --- /dev/null +++ b/llm-content/payments.md @@ -0,0 +1,263 @@ +--- +title: Razorpay Payments Suite +description: Explore Razorpay Payment Gateway and the entire suite of products available as part of Razorpay Payments Suite. +--- + +# Razorpay Payments Suite + +Razorpay enables businesses to accept, process, and disburse payments seamlessly across multiple channels. Whether you are running an online store, managing subscriptions or facilitating marketplace transactions, Razorpay provides the tools and infrastructure to handle payments at scale. + + + Set up payment gateways, process transactions and manage customer payments across multiple channels. + + + + Send bulk payouts, vendor payments and instant transfers with automated reconciliation. + + + + Advanced solutions, including payment optimisation, EMI options, business trust badges and buyer protection features. + + + + Find tailored payment solutions for ecommerce, SaaS, marketplaces and enterprise businesses. + + + + Integrate with e-commerce plugins, SDKs for mobile and web and comprehensive APIs for custom builds. + + +## Try Ray: Our Product Recommender + + + Use [Ray](https://razorpay.com), the Razorpay chatbot, to select the right product that meets your unique business needs. + + + + Watch this video to know how Ray can help you choose Razorpay products. + + +### Accept Payments + + + Accept payments through websites, apps or without any technical setup. + + + + Seamless checkout experience with 100+ payment modes for your website or app. + + + + One-click checkout experience with pre-filled customer details and automated address detection. + + + + Generate and share unique Payment Links instantly via WhatsApp, SMS or email - no website or coding required. + + + + Collect payments for events, courses or donations with branded hosted pages. + + + + Add a ready-to-use Payment Button to your website with a simple HTML copy-and-paste. + + + + Display QR codes at checkout for quick, touch-free mobile payments. + + + + Generate customer identifiers and VPAs on demand and accept payments using NEFT, RTGS, IMPS and UPI. + + + + Create and send GST-compliant invoices that customers can pay online instantly. + + + + + + #### Razorpay POS + ![Accept offline payments with Razorpay POS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pos.jpg.md) + + Accept in-person payments at physical locations with [Razorpay POS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos.md). + + + + #### Subscriptions + + ![Accept recurring payments with Razorpay Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/plan-subscriptions.jpg.md) + Automate recurring billing with [Razorpay Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md). + + + +### Disburse Payments + +Use Razorpay products to split and transfer payments collected from customers and make payouts to customers. + + + Automatically split incoming payments among multiple parties. Perfect for marketplaces, platforms and franchises. + + + + Complete business banking platform with Payouts, Current Account, Escrow Account and Tax Payments. + + +### Advanced Products + + + Route transactions across multiple payment gateways with a single integration - optimise costs and boost success rates effortlessly. + + + + Increase order values and conversions with flexible EMI payment options from leading banks and NBFCs. + + + + Build customer trust with a verified business badge and transparent checkout experience. + + + + Enhanced customer confidence with purchase protection and dispute resolution support. + + +## Solutions by Industry + + + Payment Gateway for online stores, Route for marketplaces, Payment Links for quick checkouts and Subscriptions for recurring billing. + + + + Third-Party Validation (TPV) for SEBI compliance, Route for fund splits across multiple accounts, Subscriptions for SIPs and loan repayments. + + + + Payment Gateway with high success rates, Payment Links for bookings, international payments and multi-currency settlement support. + + +## Solutions by Platform + +Razorpay offers a wide range of integrations as given below: + + + + + - **Razorpay Standard Checkout**: + + + - **Razorpay Custom Checkout**: + + + + + - **PHP**: + + + - **Ruby**: + + + - **Python**: + + + - **NodeJS**: + + + - **.NET**: + + + - **Java**: + + + - **Go**: + + + + + + + + + + - **Arastta**: + + + - **BigCommerce**: + + + - **Drupal**: + + + - **CS-Cart**: + + + - **Gravity Forms**: + + + - **Easy Digital Download**: + + + - **Magento**: + + + - **OpenCart**: + + + - **PrestaShop**: + + + - **Shopify**: + + + - **WHMCS**: + + + - **Wix**: + + + - **WooCommerce**: + + + - **WordPress**: + + + + + - **Razorpay Direct - Credit Card**: + + + + + + + + + - **Android SDK**: + + + - **iOS SDK**: + + + - **Cordova SDK**: + + + - **React Native SDK**: + + + - **Flutter SDK**: + + + - **Capacitor SDK**: + + + + + + +### Related Information + +- [Quickstart Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/quickstart.md) + +- [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md) + +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) diff --git a/llm-content/payments/account-activation-support.md b/llm-content/payments/account-activation-support.md new file mode 100644 index 00000000..f0d0417e --- /dev/null +++ b/llm-content/payments/account-activation-support.md @@ -0,0 +1,417 @@ +--- +title: Account Activation Support +description: List of commonly used terms and details about certificates related to Razorpay Account activation. +--- + +# Account Activation Support + +Check all the documents, certificates and additional documents that you need to complete the KYC process depending upon your business type. + +## Personal Details +Given below are a few personal documents you need for your account activation or KYC process. + + +### Personal PAN + + Personal PAN is the Permanent Account Number belonging to an individual who owns the business or is a shareholder, proprietor, partner, or promoter in the business. It typically has the fourth letter as `P`. This document is used to verify your identity. + + + +### Contact Email + + In order to verify your account and to receive account-related updates, transactional notifications, and any other important information, you must provide a valid email address. + + + +### Aadhaar Front + + As part of our verification process, we require a clear scanned copy or photograph of the front side of the Aadhaar card belonging to the individual whose personal PAN has been shared. You can also use a one-page Aadhaar copy downloaded from the UIDAI website. + + + +### Aadhaar Back + + As part of our verification process, we require a clear scanned copy or photograph of the back side of the Aadhaar card belonging to the individual whose personal PAN has been shared. You can also use a one-page Aadhaar copy downloaded from the UIDAI website. + + +## Bank-Account Related +Given below are a few tips and commonly used terms and their definitions for bank account-related information you need for your account activation or KYC process. + + +### Bank Branch IFSC + + To find the IFSC code of your bank, simply Google your bank and branch name. For example,`HDFC Bank Lower Parel Mumbai IFSC Code`. + + + +### Bank Account Number + + This is the account in which we will deposit payments you have collected and process settlements. If your business is registered with the Government of India, please Current Account number registered with your business. If you are not registered or are a sole proprietor, you may provide your personal bank account details. You can find your bank account number in your passbook, netbanking portal, cheque book, or mobile banking app. Indian bank account numbers usually consist of 11 to 16 digits. + + + +### Bank Account Name + + You can find the name associated with your registered bank account in your passbook, netbanking portal, chequebook, or mobile banking app. Make sure to enter the right details for your first name, surname, and middle name (if any). + + +## Business-Related +Given below are a few tips and the details of various business-related certificates or terminologies you need for your account activation or KYC process. + + +### Business Name + + Business name refers to the official or legal name present on your business registration certificate or on your business PAN. This is the name that will be used for your Dashboard. + + + +### GST Certificate + + The GST Certificate contains your GST registration details with the Government of India and helps us verify your business. Follow these steps give below to get the GST certificate: + 1. Visit the [GST India portal](https://www.gst.gov.in/). + 2. Login using your username and password. + 3. Download the GST certificate under the **Services** section. + + +## Certificates and Other Documents + +Given below are a few tips and the details of various certificates and documents you need for your account activation or KYC process. + + +### AYUSH Certificate + + The AYUSH certificate is mandatory for all retail ayurvedic-related businesses. To get your AYUSH certificate, follow the steps below: + 1. Visit the official website for AYUSH online registration. + 2. Fill out the AYUSH registration form. + 3. Provide the required documents, pay the AYUSH certification cost and submit the form. + + + +### FSSAI Certificate + + This document is required for all food manufacturing and serving businesses based in India. If you don't have it, you can register on the [FSSAI website](https://foscos.fssai.gov.in/). + + + +### SEBI Certificate + + SEBI certification is mandatory for anyone wishing to provide investment advisory services to clients. Follow the steps below to get your SEBI certification: + 1. Pay the initial registration fee to access the SEBI Intermediary portal. + 2. Fill out the RIA registration form on the SEBI Intermediary portal and upload the relevant documents. + 3. Pay the registration fee after SEBI approves the application. + + + +### FEMA Registration/FFMC Certificate + + Merchants involved in businesses that require foreign currency exchange with a foreign country must obtain a FEMA/FFMC certificate. Follow the steps given below to get the FEMA registration/FFMC Certificate: + 1. Submit an application for the FFMC License to the concerned regional office of RBI. + 2. RBI will review the director of the applicant entity under the **fit and proper** criteria. + 3. If everything is to the satisfaction of the RBI, then an FFMC certificate is issued. + + + +### NBFC Registration Certificate + + If your business involves a non-banking financial institution, you are required to obtain an NBFC License. You can apply for the license online or offline with the necessary documents to the Regional Office of the Reserve Bank of India. To be eligible for the certificate, your business must meet the following criteria: + - The company must be registered in India (Private Limited Company or Limited Company). + - The company must have at least ₹ 200 lakhs in net-owned funds.  + + + +### 916 Hallmark/BIS Certificate + + If your business involves the sale of precious gems or jewellery, you are required to have a BIS Certificate. + Follow the steps given below to get the BIS Certificate: + 1. Visit [the official site](https://www.bis.gov.in/system-certification-overview/download-approach-forms/). + 2. Download the application form and questionnaire for additional information. + 3. Attach the required documents. + 4. Submit the application form along with the requisite fee. + + + +### IRDA Certificate + + If you are in the insurance industry or an insurance agent, then you will be required to submit the IRDA certificate for verification. To download the IRDA Certificate: + 1. Visit the official IRDA Portal. + 2. In the top-right corner, select the **PAN Lookup** option. + 3. Fill in your **PAN or Aadhaar Number** and click on **Submit**. + 4. Download the certificates that are available to you. + + + +### AMFI Certificate + + If you work as a mutual fund distribution professional, you are required to have the AMFI certification by passing an entry-level exam. To download the AMFI Certificate: + 1. Visit the official website of AMFI. + 2. Select the document of your choice and click **download**. + + + +### IATA Certificate + + + The IATA certification program is designed to acknowledge workplace learning practices and ensure compliance with international and industry training standards in airlines and travel offices. Follow the steps given below to get an IATA Certificate: + 1. Register with the [IATA customer portal](https://portal.iata.org/). + 2. Submit the application form. + 3. Pay the registration fee to process the application. + + + +### DOT Certificate + + If you are running an OSP centre or IT-enabled services (such as Teletrading or Tele-education), you need this certificate. The DOT Certificate is required for policy, licensing, and coordination matters related to telegraphs, telephones, wireless communication, data, facsimile, telematic services, and other forms of communication. Follow the steps given below to get the DOT Certificate: + 1. Log in to the [official DOT portal](https://dot.gov.in/infrastructure-provider). + 2. Choose your category from the list available. + 3. Click **download** to initiate your application. + + +> **INFO** +> +> +> **Handy Tips** +> +> DOT processes the application to obtain telemarketing registration. +> + + + + +### TRAI Certificate + + + A TRAI certificate refers to a licence issued by the Telecom Regulatory Authority of India for doing business. Follow the steps given below to get a TRAI Certificate: + 1. Incorporate your company. + 2. Gather the required documents and apply for telemarketing registration. + 3. Pay the TRAI registration fee. + + + +### RBI Certificate + + It is mandatory for a company to obtain a **Certificate of Registration (CoR)** from the Reserve Bank of India (RBI) before commencing or carrying on the business of a non-banking financial institution (NBFI). + Follow the steps given below to get a RBI Certificate: + 1. Apply online and submit a physical copy of the application along with the necessary documents to the Regional Office of the Reserve Bank of India.  + 2. The application can be submitted online. + + + +### DGCA Certificate + + The DGCA Certification is an airline certificate issued by the DGCA. To obtain this certificate, one must comply with the civil aviation requirements and airworthiness standards mandated by the Government of India. Know more about [the civil aviation requirements](http://164.100.60.133/aircraft/air-ind.htm). + + + +### GII Certificate + + A GII Certificate is issued by the Gemological Institute of India for the identification and certification of all gems. Know more about the [GII certificate](https://giionline.com/colour-stone-identification-and-certification/). + + + +### Form 20B/21B Certificate + + A Form 20B/21B Certificate is a wholesale drug license. To become a drug wholesaler, you must have permission from the State Licensing Authority (SLA) to distribute or sell drugs covered by the 1940 Drugs and Cosmetics Act. + + + +### Certificate Issued by NHB + + The National Housing Board helps in validating and regulating companies that are in the housing finance business. You can download the application form for the certificate from the [online portal](https://nhb.org.in/) and submit it to the respective NHB office near you. + + + +### Affiliation certificate issued by UGC /ICSE/CBSE/AICTE + + This certification is issued to various educational institutions in India. The UGC is the apex body that approves universities in the country. To obtain permanent affiliation, a college must apply to the University in the prescribed proforma along with the required fee in the form of a **Demand Draft** drawn in favour of the University Registrar. The application can be made any time after completing five years of temporary affiliation. + + + +### AOC Certificate/PCI-DSS + + The Attestation of Compliance (AoC) is a declaration of an organization's compliance with the PCI DSS. A Qualified Security Assessor (QSA) completes this document, indicating the business's PCI DSS AoC compliance status. + + To receive an AoC, the organization needs to complete a self-assessment of their compliance through a Self-Assessment Questionnaire (SAQ). This is then reviewed by a QSA to determine the organization's compliance status with PCI DSS. + + + +### GIA Certificate + + If you are a merchant selling precious stones or gems, you need this certificate. The term "GIA certified" is commonly used in the jewellery industry to refer to diamonds that have undergone GIA's rigorous grading process and to the reports that accompany them. Know more about [how to apply for GIA certification](https://www.giaindia.in/instructions-procedure-to-apply/) in India. + + + +### PESO Certificate + + The Petroleum and Explosives Safety Organization (PESO) of India issues the PESO license. Formerly known as the Department of Explosives, this institute is responsible for formulating a framework for working with the oil industry. + You can apply for a PESO certificate at [https://www.peso.gov.in/](https://www.peso.gov.in/). + + + +### Import-Export Certificate + + An Importer-Exporter Code (IEC) is a key business identification number that is mandatory for exports from or imports into India. Follow the steps given below to apply for the certificate:  + 1. Register/Login on the [DGFT website](https://www.dgft.gov.in/CP/). + 2. Click on the **Apply for IEC** option on the DGFT website. Fill out the application form (ANF 2A format) and upload the required documents. + 3. Pay the required fees. + 4. Click the **Submit and Generate IEC Certificate** button. + + + +### MMTC PAMP Certificate + + If your business is registered with MMTC PAMP you will obtain a certificate for the same. Your business should be in advanced precious metals or gold. + You can register for MMTC PAMP at [https://shop.mmtcpamp.com/register](https://shop.mmtcpamp.com/register). + + + +### RERA + + A RERA certificate is a legal document that acts as proof that a property, project, or property agent has been registered under a state-level RERA authority or tribunal. + You can apply for a RERA certificate at the [E-Startup India](https://www.e-startupindia.com/rera-registration.html) site. + + + +### Copyright Certificate + + A copyright grants the subject's owner exclusive ownership of his work. If a work is protected by copyright, no one can imitate, copy, or reproduce the original work in any other way.  + To register for copyright certification, visit [https://www.copyright.gov/](https://www.copyright.gov/). + + + +### Shop Establishment Certificate (SEC) + + The shop establishment certificate (SEC) is required for all businesses registered under the Shop Establishment Act or Labour Department (depending on each state). Follow the steps below to download the shop establishment certificate. + 1. Visit your state’s shop establishment website. + 2. Register with a username and password. + 3. Check the application status and click on **download certificate**. + + + +### MSME Certificate + + An MSME certificate is a valid proof of registration for small and medium-sized businesses. This is issued after successful registration for each business. If a proprietor or individual has multiple enterprises, they must register each of these individually and obtain different certificates for each of them. To download your MSME certificate, visit [https://udyamregistration.gov.in/Government-India/Ministry-MSME-registration.htm](https://udyamregistration.gov.in/Government-India/Ministry-MSME-registration.htm) and login with your details. + + + +### MSO/Local Cable Operator + + A multiple-system operator (MSO) is an operator of multiple cable or direct-broadcast satellite television systems. If you are into providing cable or DTH services to households, this certificate is mandatory for you. + Know more about [how to get a MSO certification](https://www.registrationwala.com/mso-license). + + + +### SLA/Dealership Agreement + + A service level agreement (SLA) is a contract between a provider and the end user that states the level of service that the customer should expect from that service provider. + + + +### Reseller Agreement + + A reseller agreement is an arrangement between the supplier and the reseller of goods or services that is ultimately sold to the end customer. + + + +### IRCTC Agents Agreement + + The Agents Agreement is mandatory for verification if you are a travel agent licenced by the IRCTC. Know more about the [rules and regulations for reserved rail e-ticketing service providers](https://contents.irctc.co.in/en/Rules%20&%20Regulations%20for%20the%20Agents.pdf). + + + +### Dealership Rights + + A business is considered a dealership if its owner is authorised to sell a certain item. If you are in a business that operates under a dealership model, you will require a certificate or document authorising the same, which will be issued by the supplier. + + + +### Pharmacy or Retail/ Wholesale Drug License + + To start a pharmacy business, a drug licence is required, which is issued by the Central Drugs Standard Control Organization and the State Directorate of Drug Control. Each state has its own government website that mentions the requirements for granting drug sales licenses. + + + +### Brewery addendum or Liquor license + + If you are in the business of dealing with liquor, you need this license. A liquor License granted by a state’s excise department allows licensed individuals to manufacture, transport, and sell alcoholic beverages within the boundaries of the state. Know more about [how to apply for a liquor license in India](https://vakilsearch.com/blog/how-to-obtain-liquor-license-in-india/). + + + +### Business Correspondent + + Business Correspondents are bank representatives who raise customer awareness and conduct banking transactions. This certificate was issued by Banks. + + + +### PPI License + + Pre-paid Payment Instruments (PPIs) are defined in the RBI Guidelines as payment instruments that facilitate the purchase of goods and services, including funds transfers, against the value stored on such instruments. + + + +### Tie Up Agreement + + A tie-up agreement is a contract between two or more companies or organisations to become business partners. + + + +### FDA License + + FDA licences are issued by the Food and Drug Administration (FDA) to businesses involved in food, drug products, dietary supplements, beverages, etc. + + + +### MSA + + A Master Services Agreement (MSA) is a contract that details the responsibilities and obligations of two parties toward each other. This comprehensive contract generally includes detailed rates, services, and terms for each functional area of the partnership. + + + +### Legal Opinion + + A legal opinion is created by your lawyer, and it allows parties to obtain a qualified third-party opinion on the subject, object, and other issues related to the conclusion of a transaction. + + + +### Manufacturing License + + A manufacturing license means all licenses necessary for or in connection with the manufacture of the products at the manufacturing site(s). + + + +### Trade license + + A trade license is a document or certificate that grants permission to an individual seeking to open a business, to commence a particular trade or business in a specific area or location. The application for a trade license registration must be made to the concerned state government, corporation, or municipality, and the application procedure may vary depending on state regulations. + + + +### IATO + + + If you are in the business of offering tourism services, you are required to be an IATO member. IATO is the association of expert inbound tour operators whose members are recognised or approved by the Ministry of Tourism, Government of India. You can register to be a member of IATO at [https://iato.in/](https://iato.in/). + + + +### BBPS + + This is required of businesses that currently provide or wish to provide bill payment services to their customers via physical (agents, bank branches, business correspondents) or digital (website, Internet banking, mobile app) channels. To get the BBPS, submit the **Agent-Institution Consent** form to the concerned BBPOU and complete the required documentation and onboarding process. + + + +### Authorization letter + + A letter of authorization is a type of contract in which one person, known as the principal, authorizes another, known as the agent, to perform particular activities to carry out the principal's duties. + + +## Others +Given below are the commonly used terms and their definitions used for Razorpay account activation or KYC process. + + +### Average Order Value + + Add the average order value for your business to proceed with verification. To obtain the average order value, use the formula: `Total revenue / number of orders = average order value`. + + +### Related Information + +- [KYC Documents for Companies and Businesses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/business-types-kyc-documents.md) +- [Frequently Asked Questions (FAQs)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/faqs.md) diff --git a/llm-content/payments/axis-wallet.md b/llm-content/payments/axis-wallet.md new file mode 100644 index 00000000..9e435685 --- /dev/null +++ b/llm-content/payments/axis-wallet.md @@ -0,0 +1,81 @@ +--- +title: Wallet Management Portal +description: Manage your Axis Bank wallet by viewing balance, adding funds, setting up beneficiaries, withdrawing and tracking funds all in one place. +--- + +# Wallet Management Portal + +The Axis Bank Wallet Management System is a sophisticated platform tailored for financial management. It offers the following functionalities: + +- Offers swift balance checks. +- Allows easy fund additions. +- Enables seamless setup of beneficiary accounts for quick transactions. +- Facilitates secure withdrawals to specific accounts for users transferring funds. +- Features an integrated transaction tracker for real-time monitoring. +- Ensures transparency in wallet activities. +- Aids in diligent record-keeping. +- Prioritises a user-friendly experience for effective wallet management. + +## Sign in to Your Account + +To sign in: + +1. Click on the link on the business website to launch the Wallet management portal. +2. Log in to your Dashboard using your registered email or mobile number and click **Sign In**. The Customer ID is pre-populated. + ![Axis Bank Wallet Customisation Login Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/axis-wallet-dashboard-login.jpg.md) +4. You will be prompted to enter a One-Time Password (OTP) which will be sent to your registered email id and mobile number. +5. Enter the OTP and click **Submit**. + ![Axis Wallet OTP Screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/axis-wallet-otp.jpg.md) +6. Alternatively, you can also update your PIN by clicking on **My Account** → **Update Pin**. +7. Enter and re-enter a 4-digit PIN of your choice and click **Submit**. From this point forward, you'll need to enter this PIN to access your account. + ![Pin change for Axis Bank Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/axis-wallet-pin-change.jpg.md) + +## Add a Bank Account + +To transfer funds to your wallet, you must add a bank account to your Wallet and create a Customer Identifier. + +To add a Bank Account: + +1. On the Axis Bank Wallet Dashboard, click **Add Bank Account**. +2. Fill out the details of your bank account such as the Account Name, Account Number and the IFSC Code and click **Proceed**. + ![Bank Account addition to the Axis Bank Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/axis-wallet-account-add.jpg.md) +3. Validate your bank account details and click **Submit**. + ![Validate bank account details beofre confirmation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/axis-wallet-validate.jpg.md) + +## Transfer Funds + +Once you have added a bank account, you can add and withdraw money to your Wallet. + +### Add a Customer Identifier + +1. In order to transfer funds to your Wallet, you must create a Customer Identifier. Know more about [Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md). +2. On the Wallet Dashboard, click **Create Customer Identifier**. + ![Wallet - Create Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/wallet-add-ci.jpg.md) + +### Add Money to Wallet + +To add money to your Wallet, you can use the Customer Identifier details of your Wallet: + +1. On the Wallet Dashboard, click **View Details**. + ![Axis Wallet Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/axis-wallet-ci-details.jpg.md) +2. You can add money to the Wallet using bank transfer methods such as NEFT and RTGS with the bank account you have added. + ![Axis Wallet Customer Identifer Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/axis-wallet-ci-full-details.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> At least one bank account should be added to transfer funds. +> + +### Withdraw Money from Wallet + +To withdraw money from your Wallet: +1. On the Wallet Dashboard, click **Transfer Balance**. +2. Choose the bank account to transfer funds from. +3. Enter the Amount. +4. You can also add a Remark for this transfer. +5. After adding all the details, click **Proceed**. + ![Axis Wallet: Transfer Balance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/wallet-transfer-funds.jpg.md) diff --git a/llm-content/payments/business-types-kyc-documents.md b/llm-content/payments/business-types-kyc-documents.md new file mode 100644 index 00000000..f452e19e --- /dev/null +++ b/llm-content/payments/business-types-kyc-documents.md @@ -0,0 +1,458 @@ +--- +title: KYC Documents for Business Types +heading: KYC Documents for Companies and Businesses +description: List of required KYC Documents for companies and business types to register with Razorpay under the 2026 Master KYC guidelines. +--- + +# KYC Documents for Companies and Businesses + +Below are the business types supported by Razorpay and the KYC documents required for various businesses. + +> **SUCCESS** +> +> +> **Understanding CKYC Verification** +> +> Central KYC Registry (CKYC) is a centralised government database maintained by CERSAI (Central Registry of Securitisation Asset Reconstruction and Security Interest of India) containing verified KYC records of individuals and entities across all financial institutions. +> +> **CKYC Consent Process** +> +> +> +> 1. Enter your Business PAN. +> 2. Enter Date of Incorporation. +> 3. Documents are auto-fetched. +> +> +> 4. Enter your Personal PAN. +> 5. If CKYC record exists → Enter the mobile number linked to the CKYC. +> 6. Enter the OTP from CKYC system. +> 7. Documents are auto-fetched. +> +> +> +> + +## Business Types + + +### Razorpay supports the following business types: + + + Business Type | Description [columWidth="60"] | Example + --- + LLP | LLP stands for Limited Liability Partnership. It is a combination of partnership and corporation. The partners have limited liability, which means that the partners' personal assets are not used for paying off the company's debts. | Dental offices, auditing firms, financial advising services, business consultancies and so on. + --- + Partnership | A partnership is an arrangement between two or more people who agree to be the co-owners, distribute responsibilities for running an organisation and share the income or losses the business generates. | Law firms, physician groups, real estate investment firms and so on. + --- + Private Limited | A private limited company is a business entity held by a small number of people. It does not offer stocks for sale to the general public. | Google India Pvt. Ltd., Parle Products Pvt. Ltd., Malabar Gold Pvt. Ltd. and so on. + --- + Public Limited | A public limited company is a business entity that has limited liability and offers shares to the general public. | Bharat Heavy Electricals Ltd., Steel Authority of India Ltd., Oil and Natural gas Corporation Ltd. and so on. + --- + Sole Proprietorship | This business entity is owned, controlled and operated by a single individual who is the sole beneficiary of all profits or losses and responsible for all risks. | Small businesses such as a local grocery store, a local clothes store, an artist, freelance writer, IT consultant, freelance graphic designer and so on. + --- + Trust | A trust is a [fiduciary relationship](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/glossary.md#fiduciary-relationship) in which a [trustor](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/glossary.md#trustor) gives the [trustee](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/glossary.md#trustee) the right to hold title to property or assets for the benefit of a third party, the [beneficiary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/glossary.md#beneficiary). Trusts are established to provide legal protection for the trustor’s assets. | A beneficiary may transfer property to a trustee and grant them the right to manage it. + --- + HUF | HUF stands for Hindu Undivided Family, which consists of all persons directly descended from a common ancestor, including their wives and unmarried daughters. A HUF cannot be created under a contract, it is created automatically in a Hindu Family.| Haldiram's Private Limited. + --- + Government Entity | A government entity includes an organisation owned or controlled by the central or state government or UTs. | Ministries, departments, PSUs and regulatory bodies like RBI or SEBI. + --- + Judicial Person | A judicial person is a non-natural entity recognised by law as having the capacity to have rights and obligations, similar to a human being. | Deities, universities or corporations established under special status. + --- + Local Authority | A local authority is a self-governing body responsible for local administration in a city, town or village. | Municipal corporations, panchayats and development authorities. + --- + Section 8 Company | A 'Section 8' Company is a type of non-profit company registered under Section 8 of the Companies Act, 2013 in India. | Tata Trusts, Infosys Foundation and Reliance Foundation. + --- + Individual/Unregistered Businesses | Small businesses being run by individuals that are not yet formally registered. | Professionals, freelancers, influencers, small offline stores or similar entities. + --- + Society | A society is an organisation formed by a group of individuals for the promotion of charitable, educational, religious or literary purposes. They are typically registered under the Societies Registration Act, 1860 in India. | Educational societies running schools/colleges, cultural societies, sports clubs or charitable organisations. + + + +## KYC Documents + +Following is the list of Know Your Customer (KYC) documents Razorpay requires, to verify your KYC. +You need to upload scanned photocopies (soft copies) of these documents. + +> **INFO** +> +> +> **Handy Tips** +> +> The PAN Card details and [authorised signatory](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/glossary.md#authorised-signatory) address proof, that is, Aadhar Card and Passport should be of the same person. +> + + +### Individual/Unregistered Businesses + + + Proof Required | Supporting Documents + --- + Proof of Identity | **Auto-fetched from CKYC**. However, if CKYC fails, you must provide: - PAN card +- Mobile number + + --- + Proof of Address| **Auto-fetched from CKYC**. However, if CKYC fails, you must provide: - Digilocker verification or +- Aadhaar/Photo id/Passport soft copies + + --- + Bank Details | - `Mandatory` Bank Account Number +- `Mandatory` IFSC Code + If bank verification fails, a video of a cancelled cheque must be provided. + + + + +### Proprietorship + + + Proof Required | Supporting Documents + --- + Proof of Business Identity and Date of Incorporation | MUST upload 2 from: - MSME/UDYAM Certificate +- GST Certificate +- Shop & Establishment Certificate +- Import Export Code (IEC) +- Postpaid Mobile Bill + + --- + Bank Details | - `Mandatory` Bank Account Number +- `Mandatory` IFSC Code + If bank verification fails, a video of a cancelled cheque must be provided. + --- + Proof of Identity of Business Owners | PAN Card + --- + Proof of Identity and Address of Business Owners | - Government-approved Proprietor address proof (like Aadhar Card/Voter id/Passport) +- `Mandatory` Power of Attorney (POA) + + + + + +### Private Limited/Public Limited + + + Proof Required | Supporting Documents + --- + Proof of Business Identity | **Auto-fetched from CKYC**. However, if CKYC fails, you must provide: - Certificate of Incorporation +- CIN +- `Mandatory` Memorandum of Association (MOA) +- `Mandatory` Articles of Association (AOA) + + --- + Proof of Business Existence | Business PAN + --- + Bank Details | - `Mandatory` Bank Account Number +- `Mandatory` IFSC Code + If bank verification fails, a video of a cancelled cheque must be provided. + --- + Proof of Identity of Business Owners and Authorised Signatory | **For Authorised Signatory**: - Authorised signatory PAN Card details +- Government-approved [authorised signatory](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/glossary.md#authorised-signatory) address proof (like Aadhar Card/Voter id/Passport) +- `Mandatory` Board Resolution (BR) or Power of Attorney (POA) + **For Business Owners (Self-Declaration)**: - `Mandatory` Ultimate Beneficial Owner (UBO) Declaration (Each UBO's PAN, Aadhar and Ownership % declaration) +- `Mandatory` Declare all natural persons with **>10%** shareholding + + + + + +### Partnership + + + Proof Required | Supporting Documents + --- + Proof of Business Identity | - `Mandatory` Partnership Deed +- `Mandatory` Partnership Registration Certificate (If Partnership is registered) + + --- + Proof of Business Existence | Business PAN + --- + Bank Details | - `Mandatory` Bank Account Number +- `Mandatory` IFSC Code + If bank verification fails, a video of a cancelled cheque must be provided. + --- + Proof of Identity of Business Owners and Authorised Signatory | **For Authorised Signatory**: - Authorised signatory PAN Card details +- Government-approved [authorised signatory](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/glossary.md#authorised-signatory) address proof (like Aadhar Card/Voter id/Passport) +- `Mandatory` Power of Attorney (POA) + **For Business Owners (Self-Declaration)**: - `Mandatory` Ultimate Beneficial Owner (UBO) Declaration (Each UBO's PAN and Aadhar) +- `Mandatory` Declare all natural persons with **>10%** shareholding + + + + + +### LLP + + + Proof Required | Supporting Documents + --- + Proof of Business Identity | - `Mandatory` Certificate of Incorporation/LLPIN/LLP Deed +- LLP Partnership Deed + + --- + Proof of Business Existence | LLP PAN Card + --- + Bank Details | - `Mandatory` Bank Account Number +- `Mandatory` IFSC Code + If bank verification fails, a video of a cancelled cheque must be provided. + --- + Proof of Identity of Business Owners and Authorised Signatory | **For Authorised Signatory**: - Authorised signatory PAN Card details +- Government-approved [authorised signatory](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/glossary.md#authorised-signatory) address proof (like Aadhar Card/Voter id/Passport) +- `Mandatory` Power of Attorney (POA) + **For Business Owners (Self-Declaration)**: - `Mandatory` Ultimate Beneficial Owner (UBO) Declaration (Each UBO's PAN, Aadhar and Ownership % declaration) +- `Mandatory` Declare all natural persons with **>10%** shareholding + + + + + +### Government + + + Proof Required | Supporting Documents + --- + Proof of Business Identity and Existence | - `Mandatory` Gazette Notification Certificate +- `Mandatory` Power of Attorney (POA) + + --- + Proof of Business Existence | Business PAN Card + --- + Bank Details | - `Mandatory` Bank Account Number +- `Mandatory` IFSC Code + If bank verification fails, a video of a cancelled cheque must be provided. + --- + Proof of Identity of Business Owners and Authorised Signatory | - Government-approved [authorised signatory](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/glossary.md#authorised-signatory) identity proof (like Aadhar Card/Voter id/Passport) +- Authorised signatory PAN Card details + + + + + +### Trust + + + Proof Required | Supporting Documents + --- + Proof of Business Identity and Existence | - Trust Deed +- `Mandatory` Trust Registration Certificate (If Trust is registered) + + --- + Proof of Business Existence | Trust PAN Card + --- + Bank Details | - `Mandatory` Bank Account Number +- `Mandatory` IFSC Code + If bank verification fails, a video of a cancelled cheque must be provided. + --- + Proof of Identity of Business Owners and Authorised Signatory | **For Authorised Signatory**: - Authorised signatory PAN Card details +- Government-approved [authorised signatory](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/glossary.md#authorised-signatory) address proof (like Aadhar Card/Voter id/Passport) +- `Mandatory` Power of Attorney (POA) + **For Business Owners (Self-Declaration)**: - `Mandatory` Ultimate Beneficial Owner (UBO) Declaration (Each UBO's PAN and Aadhar) +- `Mandatory` Declare all natural persons with **>10%** shareholding + + + + + +### HUF + + + Proof Required | Supporting Documents + --- + Proof of Business Identity and Existence | - `Mandatory` Registered HUF Deed +- `Mandatory` Power of Attorney (POA) + + --- + Proof of Business Existence | Business PAN Card + --- + Bank Details | - `Mandatory` Bank Account Number +- `Mandatory` IFSC Code + If bank verification fails, a video of a cancelled cheque must be provided. + --- + Proof of Identity of Business Owners and Authorised Signatory | - Government-approved [authorised signatory](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/glossary.md#authorised-signatory) identity proof (like Aadhar Card/Voter id/Passport) +- Authorised signatory PAN Card details + + + + + +### Judicial Person + + + Proof Required | Supporting Documents + --- + Proof of Business Identity and Existence | - `Mandatory` Gazette Notification Certificate +- `Mandatory` Power of Attorney (POA) + + --- + Proof of Business Existence | Business PAN Card + --- + Bank Details | - `Mandatory` Bank Account Number +- `Mandatory` IFSC Code + If bank verification fails, a video of a cancelled cheque must be provided. + --- + Proof of Identity of Business Owners and Authorised Signatory | - Government-approved [authorised signatory](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/glossary.md#authorised-signatory) identity proof (like Aadhar Card/Voter id/Passport) +- Authorised signatory PAN Card details + + + + + +### Local Authority + + + Proof Required | Supporting Documents + --- + Proof of Business Identity and Existence | - `Mandatory` Gazette Notification Certificate +- `Mandatory` Power of Attorney (POA) + + --- + Proof of Business Existence | Business PAN Card + --- + Bank Details | - `Mandatory` Bank Account Number +- `Mandatory` IFSC Code + If bank verification fails, a video of a cancelled cheque must be provided. + --- + Proof of Identity of Business Owners and Authorised Signatory | - Government-approved [authorised signatory](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/glossary.md#authorised-signatory) identity proof (like Aadhar Card/Voter id/Passport) +- Authorised signatory PAN Card details + + + + + +### Section 8 Company + + + Proof Required | Supporting Documents + --- + Proof of Business Identity | **Auto-fetched from CKYC**. However, if CKYC fails, you must provide: - Certificate of Incorporation +- CIN +- `Mandatory` Memorandum of Association (MOA) +- `Mandatory` Articles of Association (AOA) + + --- + Proof of Business Existence | Business PAN + --- + Bank Details | - `Mandatory` Bank Account Number +- `Mandatory` IFSC Code + If bank verification fails, a video of a cancelled cheque must be provided. + --- + Proof of Identity of Business Owners and Authorised Signatory | **For Authorised Signatory**: - Authorised signatory PAN Card details +- Government-approved [authorised signatory](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/glossary.md#authorised-signatory) address proof (like Aadhar Card/Voter id/Passport) +- `Mandatory` Board Resolution (BR) or Power of Attorney (POA) + **For Business Owners (Self-Declaration)**: - `Mandatory` Ultimate Beneficial Owner (UBO) Declaration (Each UBO's PAN, Aadhar and Ownership % declaration) +- `Mandatory` Declare all natural persons with **>10%** shareholding + + + + + +### Society + + + Proof Required | Supporting Documents + --- + Proof of Business Identity and Existence | - Society Registration Certificate + + --- + Proof of Business Existence | Society PAN Card + --- + Bank Details | - `Mandatory` Bank Account Number +- `Mandatory` IFSC Code + If bank verification fails, a video of a cancelled cheque must be provided. + --- + Proof of Identity of Business Owners and Authorised Signatory | **For Authorised Signatory**: - Authorised signatory PAN Card details +- Government-approved [authorised signatory](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/glossary.md#authorised-signatory) address proof (like Aadhar Card/Voter id/Passport) +- `Mandatory` Power of Attorney (POA) + **For Business Owners (Self-Declaration)**: - `Mandatory` Ultimate Beneficial Owner (UBO) Declaration (Each UBO's PAN, Aadhar and Ownership % declaration) +- `Mandatory` Declare all natural persons with **>15%** shareholding + + + + +## Additional Documents + +Depending on the line of business, we may also ask for additional certifications. + + +### List of additional certificates depending on your business category + + + Business Category | Certificate + --- + OTC Products | FSSAI (Ayurveda, Health supplements) documents: Drug license/Pharma license/Form 20/Form 21/Form 20B/Form 21B and AYUSH + --- + Food Industry | FSSAI + --- + Herbal (Medicinal Purpose) | AYUSH (Manufacturing license - Form 24D) + --- + Advisory Firm (Stock Market) | SEBI (Certificate should be in the business name, not an individual’s name)/If the business type is proprietorship in this case - SEBI can be accepted in the proprietor's name. + --- + Venture Capital Fund Co. | SEBI (Certificate should be in the business name, not an individual’s name) + --- + Merchant Banking Co. | SEBI (Certificate should be in the business name, not an individual’s name) + --- + FOREX | FEMA Registration, FFMC Certificate (State-wise) + --- + Trust | 12A/80G or 10AC Income Tax link (Verify PAN number and entity name). Preferred: 80G or 10AC.- If 10AC is provided: Accept with email consent. +- If 10A is provided: Undertaking letter required. + + --- + Finance Support (Society Members) | NBFC + --- + Gold | 916 Hallmark/BIS Hallmark + --- + Silver | 925 Hallmark/Related Certification + --- + Platinum | PGI Certificate + --- + Diamond | GIA/SGL/IGI/HRD Certificate + --- + Gemstone | GII/IGI Certificate + --- + Insurance | IRDAI- Life Insurance +- General Insurance +- Health Insurance +- Broker: Sample arrangement with any insurer. + + --- + Mutual Fund | AMFI (Certificate should be in the business name, not an individual’s name) + --- + International Travel/Hotel | IATA + --- + Travel Agency: International | IATA/Signed copy of the service level agreement with an IATA-certified company + --- + Travel Agency: Train Tickets | IRCTC Agency Certificate (Required if not selling flight tickets and IATA not available) + --- + Internet Service Provider | TRAI/PMWANI/SLA + --- + SMS/Email/Telemarketing Co. | TRAI (For mobile network)/TRAI/PMWANI/SLA + --- + Banks/NBFCs/Money Lending | NBFC (Not applicable for Banks)/All types of Banks (including Payment Banks) + --- + Pre-paid/E-wallet, Cash/Smart Card | Non-bank PPI, Bank PPI + --- + Paper/Gift Voucher | RBI + --- + Aircraft Maintenance Related Service | DGCA + --- + Flight Operators | Scheduled Operators/Non-Scheduled Operators + --- + Chit Funds | Operated by Government or PSU companies post approval from Risk + --- + Housing Finance Companies | National Housing Banks + --- + Nidhi Companies | Nidhi Certification + --- + Gaming | Independent Legal Opinion stating it is a ‘Game of Skill,’ not ‘Game of Luck.’ /Gaming MSA + Undertaking + --- + University/Education Sector | UGC Certificate/ICSE/CBSE/AICTE affiliation certificate. + --- + Web host/Domain seller | PCI-DSS + --- + Prescription basis medicines | Pharmacy or Retail/wholesale Drug License, Form 20/21/20B/21B (whichever is applicable). + + + +### Related Information + +- [Submit KYC details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#2-submit-kyc-details) +- [Frequently Asked Questions (FAQs)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/faqs.md) diff --git a/llm-content/payments/changelog.md b/llm-content/payments/changelog.md new file mode 100644 index 00000000..63a09c1f --- /dev/null +++ b/llm-content/payments/changelog.md @@ -0,0 +1,709 @@ +--- +title: Payments Changelog +description: List of updates in Razorpay products, including server SDKs, mobile SDKs and plugins. +--- + +# Payments Changelog + +- **API Changelog**: Discover new releases and updates regarding Razorpay APIs. + + - **RazorpayX Changelog**: Discover new releases and updates regarding RazorpayX products. + +Expand each section to view the changelog since Jan 2024. + + +### Products + + + Month-Year | Product | Description + --- + Mar 2026 | Payment Methods | Change in interest rates for [SBI Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#-11). + --- + Feb 2026 | Payment Methods | [UPI Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md#upi-payment-flow) flow is being deprecated effective 28 February 2026. Existing users must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. + --- + Feb 2026 | Magic Checkout | Introduced [Order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/order.md) and [Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/conversion.md) analytics on Razorpay Dashboard. + --- + Jan 2026 | Payment Methods | Added new [card numbers and error scenario test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md) to improve payment failure testing. + --- + Jan 2026 | Dashboard | Introduced new user roles on the Dashboard: [Pseudo Owner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md#pseudo-owner) for delegated owner access, [View-Only (Auditor)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md#view-only-auditor) for read-only access and [Dispute Manager](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md#dispute-manager) for focused dispute handling. + --- + Jan 2026 | Payments Onboarding | Introduction of [Central KYC Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#set-up-a-razorpay-account-and-complete-kyc) to enable complete account activation within minutes. + --- + Jan 2026 | Payment Methods | Change in interest rates for [SBI Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#-11). + --- + Dec 2025 | Magic Checkout | Introduced [Orders and Checkout Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/reports.md) on Magic Checkout. + --- + Nov 2025 | Optimizer | Introduced [Airpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/airpay.md) payment provider on Optimizer. + --- + Nov 2025 | Payment Method | Introduced [Customer Fee Bearer (CFB) feature on Credit Card on UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/cc-on-upi.md#customer-fee-bearer) payment method. + --- + Oct 2025 | Payment Method | Introduced [UPI Reserve Pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi-reserve-pay.md), a new variant under UPI Autopay that enables businesses to block funds in customer accounts upfront and automatically debit exact amounts as products or services are delivered. + --- + Sep 2025 | Payment Method | Introduced [Apple Pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/apple-pay.md) payment method that allows international customers to pay using their Apple devices. + --- + Sep 2025 | Payment Methods | Change in interest rates for [SBI Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#-11) and [IDFB Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#-7). + --- + Sep 2025 | Payment Methods | Freecharge is disabled as a payment provider. + --- + Aug 2025 | Route for Direct Settlements | Introduced [Route for Direct Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/direct/route.md) to help automate payment splits for DS transactions, letting businesses auto-distribute funds to linked accounts. + --- + Aug 2025 | Payment Methods | CASHe, KreditBee, TVS Credit and Bank of Baroda has been deprecated as Cardless EMI provider. + --- + Aug 2025 | Payment Methods | IndusInd Bank has been deprecated as a Debit Card EMI provider. + --- + Aug 2025 | Custom Reports | Introduced [Custom Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports/custom-reports.md) to help businesses gain deeper financial insights. + --- + Jul 2025 | Optimizer | Introduced [CAMSPay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/camspay.md) payment provider on Optimizer. + --- + Jul 2025 | Payment Methods | Change in interest rates for [SBI Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#-11) and [IndusInd Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#for-1). + --- + Jul 2025 | Optimizer | Introduced [ShopSe](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/shopse.md) and [Snapmint](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/snapmint.md) as Cardless EMI payment providers. + --- + Jun 2025 | Payment Methods | [LazyPay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md#supported-payment-partners) is re-enabled as Pay Later provider. + --- + Jun 2025 | Payment Metods | Introduced [Cash on Delivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md) as a payment method on the checkout page. + --- + Jun 2025 | Payment Methods | Introduced [Cash on Delivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md) as a payment method on the checkout page. + --- + Jun 2025 | Payment Metods | Introduced [Cash on Delivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md) as a payment method on the checkout page. + --- + Jun 2025 | Magic Checkout | Introduced [Customer Analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/login-with-razorpay/customer-analytics.md) on Shopify to track customer login activity, account creation and checkout behaviour. + --- + May 2025 | Magic Checkout | Introduced [Automatic Customer Tagging for Retargeting](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/login-with-razorpay/automation-tags.md) on Shopify to enable personalised retargeting campaigns. + --- + May 2025 | Magic Checkout | Introduced [Login with Razorpay (SSO)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/login-with-razorpay.md) on Shopify for a seamless login experience. + --- + Apr 2025 | Optimizer | [Simpl PayLater (Pay-in-3)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/simpl.md) is now available on Optimizer as a payment provider. + --- + Apr 2025 | Magic Checkout | Added [Abandoned Cart Webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/abandoned-cart.md) option to track when a customer drops off during the checkout journey and retarget them. + --- + Apr 2025 | Webstore | Razorpay Storefront Pages is now renamed to Razorpay Webstore. + --- + Apr 2025 | Hosted Checkout | Hosted Integration has been deprecated and is no longer supported. + --- + Mar 2025 | Checkout | New [payment configurations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-configuration.md) available on the Dashboard, offering enhanced control over payment options on checkout. + --- + Mar 2025 | Checkout | Introduced [Order Milestones Badge](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features.md) on Razorpay Checkout. + --- + Mar 2025 | Checkout | Introduced [Biometric Authentication](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features.md) (fingerprint login to access saved cards) on Razorpay Checkout. + --- + Mar 2025 | Payment Methods | Change in interest rates for [SBI Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#-11). + --- + Mar 2025 | Smart Settlements | Introduced [Smart Settlement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/instant.md#initiate-smart-settlements), a sub-feature of Instant Settlements, which enables you to settle amounts upto ₹50 Cr instantly, as a single entry, using the RTGS channel. + --- + Mar 2025 | International Payments | Added support for accepting international payments via [Amazon Marketplace](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-bank-transfer/connect-platforms.md) with Razorpay as an approved PSP. + --- + Feb 2025 | International Payments | Added the [Forex Holiday Calendar 2025](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#forex-holiday-calendar-2025), which highlights days when forex trading is impacted by holidays in India and the United States. + --- + Feb 2025 | Smart Collect 2.0 | Use the enhanced features of [Smart Collect 2.0](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) to collect your payments in a quicker and smarter way. + --- + Feb 2025 | Buyer Protection | Introducing [Razorpay Buyer Protection on Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/buyer-protection/shopify.md). + --- + Jan 2025 | Buyer Protection | Introducing [Razorpay Buyer Protection Program](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/buyer-protection.md) designed to safeguard your customers' purchases. + --- + Jan 2025 | Optimizer | [ZaakPay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/zaakpay.md) is now available on Optimizer as a payment provider. + --- + Dec 2024 | Checkout | Introduced [festive theme](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-styling.md#festive-theme) on Razorpay Checkout. + --- + Dec 2024 | Checkout | Improved [autofill capabilities](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features.md) available on Razorpay Checkout. + --- + Dec 2024 | TPAP Pro | Introduced [Razorpay TPAP Pro](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro.md), a SaaS offering that empowers businesses to transform into UPI Third Party Application Providers (TPAPs). + --- + Nov 2024 | EMI² | The Razorpay Affordability Suite is rebranded as [EMI² Suite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi².md). + --- + Nov 2024 | Account Creation | You can [create multiple new accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#create-multiple-accounts) with the same mobile number and email id. + --- + Oct 2024 | Checkout | New [checkout configurations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#checkout-settings) available on the Dashboard, offering enhanced control over customisations. + --- + Oct 2024 | Payment Methods | Change in minimum order amount for [ZestMoney Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md#supported-payment-partners). + --- + Oct 2024 | Optimizer | - [PhonePe](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/phonepe.md) is now available on Optimizer as a payment provider. +- You can now [collect convenience fee specific to a payment gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/gateway-convenience-fees.md) on Optimizer. + + --- + Sep 2024 | Optimizer | - [Pay10](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/pay10.md) is now available on Optimizer as a payment provider. +- [RuPay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/native-otp.md#supported-payment-methods-cards-networks-and-payment-gateways) is now supported as a card network for Paytm, Cashfree, Easebuzz, PineLabs and PayU for Optimizer Native OTP. +- [CCAvenue](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/native-otp.md#supported-payment-methods-cards-networks-and-payment-gateways) is now supported as a payment gateway for Optimizer Native OTP. +- [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/easebuzz.md#supported-payment-methods) is now available on Easebuzz as a payment method. + + --- + Sep 2024 | Smart Collect 2.0 | Introduced [Smart Collect 2.0](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) to create Customer Identifiers (CIs) on demand and accept direct payments via multiple payment modes in a single account. + --- + Sep 2024 | Magic Checkout | [Coupon auto-application is now available on Coupon Engine.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#method-1-razorpay-dashboard-2) + --- + Sep 2024 | QuickBuy | Introduced QuickBuy, a 1-click payment experience on [Standard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features/quickbuy.md) and [Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/features/quickbuy.md). + --- + Jul 2024 | Optimizer | [Integration Audit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/integration-audit.md) is now available on Optimizer. + --- + Jul 2024 | Payment Methods | Change in interest rates for [Federal bank Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#1-what-are-the-standard-credit-card-interest). + --- + Jun 2024 | Payment Methods | You can now accept payments from customers using [ICICI Debit Card EMIs.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md#supported-banks-for-debit-card-emis) + --- + Jun 2024 | Turbo UPI | Added a library dependency to enable Turbo UPI integration for the [Flutter SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/standard/payment-methods/turbo-upi.md#library-dependencies). + --- + Jul 2024 | Instant Settlements | Introduced [daily settlement limits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/instant.md) to make instant settlements more predictable and to enjoy higher success rate. + --- + May 2024 | International Payments | You can now accept payments in [zero–decimal currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) such as JPY. + --- + May 2024 | Third Party Validation | Added support for additional banks for [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/bank-list.md#list-of-banks-supporting-tpv-for-netbanking) and [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/bank-list.md#list-of-banks-supporting-tpv-for-upi) TPV. + --- + May 2024 | Optimizer | You can now [collect convenience fee](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/convenience-fees.md) from your customers. + --- + Apr 2024 | Subscriptions | [RuPay cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) from all major banks are supported for Subscriptions. + --- + Apr 2024 | Magic Checkout | - Zipcode shipping option is added on [WooCommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce/configuration.md#shipping-options) and [Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#shipping-options). +- [Convert COD orders to prepaid is now available on WooCommerce.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce/configuration.md#convert-cod-orders-to-prepaid) +- [Additional conversion options to convert COD orders to prepaid on Shopify.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/prepay-cod.md) +- [ClickPost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/clickpost.md) is added as another logistics provider. + + --- + Apr 2024 | Optimizer | - [CVV-less flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/cvv-less-flow.md) for card payments is now available on Optimizer. +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/refunds.md) are now available on Optimizer. +- [Easebuzz](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/easebuzz.md) is now available on Optimizer. +- [ Visa, MasterCard, Diners, Amex and Rupay card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/tokenisation.md#supported-payment-gateways-and-card-networks) have now been enabled for tokenization in Optimizer with Easebuzz. +- [Diners and Amex card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/tokenisation.md#supported-payment-gateways-and-card-networks) have now been enabled for tokenization in Optimizer with Billdesk. +- [Rupay and Amex card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/tokenisation.md#supported-payment-gateways-and-card-networks) have now been enabled for tokenization in Optimizer with Cashfree. +- [Diners and Amex card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/tokenisation.md#supported-payment-gateways-and-card-networks) have now been enabled for tokenization in Optimizer with Paytm. +- [Diners and Amex card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/tokenisation.md#supported-payment-gateways-and-card-networks) have now been enabled for tokenization in Optimizer with Paytm and PineLabs. +- [Diners card network](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/tokenisation.md#supported-payment-gateways-and-card-networks) has now been enabled for tokenization in Optimizer with PayU. + + --- + Apr 2024 | Payment Methods | Change in interest rates for [Bank of Baroda, Citibank and IDFC bank Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#1-what-are-the-standard-credit-card-interest). + --- + Mar 2024 | Payment Methods | - [Bajaj Finserv and ZestMoney](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md#supported-payment-partners) are re-enabled as Cardless EMI providers. +- [Bank of Baroda](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md#supported-payment-partners) has been deprecated as a Cardless EMI provider. + + --- + Mar 2024 | Magic Checkout | [Coupons feature improvements on Shopify.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#method-1-razorpay-dashboard-2) + --- + Feb 2024 | Magic Checkout| [Coupons is now available on Shopify.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#method-1-razorpay-dashboard-2) + --- + Feb 2024 | Turbo UPI | - Removed dependency on bank and NPCI environments to simplify integration testing in [Android Standard Mock SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/integration-mock.md). +- Third-party bank account validation for BFSI businesses is now mandatory in [Android Standard TPV SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/integration-tpv.md) and [Cordova Standard TPV SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/cordova-integration/payment-methods/integration-tpv.md). + + --- + Feb 2024 | Smart Collect | [VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) is now deprecated from Smart Collect. + --- + Feb 2024 | Payment Methods | Change in interest rates for [HSBC Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#1-what-are-the-standard-credit-card-interest). + --- + Jan 2024 | Payment Methods | - Change in interest rates for [SBI Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#1-what-are-the-standard-credit-card-interest). +- [PayPal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md#supported-pay-later-providers) is added as another Pay Later payment method provider. + + --- + Jan 2024 | Turbo UPI | You can now integrate [Turbo UPI using Cordova Standard SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/cordova-integration/payment-methods/turbo-upi.md). + + + + +### Server SDKs + + + + + Month-Year | Version | Description + --- + Oct 2024 | [1.4.8](https://github.com/razorpay/razorpay-java/releases/tag/v1.4.8) | **Feature**: Added support for fetch methods to retrieve payment details. + --- + Sep 2024 | [1.4.7](https://github.com/razorpay/razorpay-java/releases/tag/v1.4.7) | **Bug Fix**: Updated JSON dependency to address a security vulnerability. + --- + Apr 2024 | [1.4.6](https://github.com/razorpay/razorpay-java/releases/tag/v1.4.6) | **Feature**: - Added `addBankAccount`, `deleteBankAccount`, `requestEligibilityCheck` and `fetchEligibility` to Customers API. +- Added `viewRtoReview` and `editFulfillment` to Orders API. +- Added Fetch IINs supporting native OTPs and Fetch all IINs with business sub-type to IIN API. +- Added `uploadStakeholderDoc`, `fetchStakeholderDoc` to Stakeholder API. +- Added `uploadAccountDoc`, `fetchAccountDoc` to Accounts API. +- Added Disputes API. + + --- + Feb 2024 | [1.4.5](https://github.com/razorpay/razorpay-java/releases/tag/v1.4.5) | **Feature**: - Added OAuth APIs. +- Added access token-based authentication mechanism. +- Added onboarding signature generation. + + + + ### Python + + + Month-Year | Version | Description + --- + Mar 2026 | [2.0.1](https://github.com/razorpay/razorpay-python/releases/tag/v2.0.1) | **Feature**: Added support for cancel token. + --- + Sep 2025 | [2.0.0](https://github.com/razorpay/razorpay-python/releases/tag/v2.0.0) | **Feature**: - Added retry mechanism for failed API calls with `enable_retry (True)` method. +- Enhanced error handling for network connectivity issues. + **Bug Fix**: `pkg_resources` deprecation warning on runtime. + --- + Aug 2025 | [1.5.0](https://github.com/razorpay/razorpay-python/releases/tag/v1.5.0) | **Feature**: - Added create and `get_status` methods with device_mode parameter for POS gateway integration. +- All APIs now support wired and wireless communication modes. +- Automatic `key_id-only` authentication for enhanced security. +- Complete test suite with device mode validation and error handling. +- Ready for Point-of-Sale (POS) system integration with flexible deployment options. + + --- + Mar 2024 | [1.4.2](https://github.com/razorpay/razorpay-python/releases/tag/v1.4.2) | **Feature**: - Added `addBankAccount`, `deleteBankAccount`, `requestEligibilityCheck` and `fetchEligibility` to Customers API. +- Added `viewRtoReview` and `editFulfillment` to Orders API. +- Added Fetch IINs supporting native OTPs and Fetch all IINs with business sub-type to IIN API. +- Added Disputes API. + + + + + + + Month-Year | Version | Description + --- + Jun 2025 | [1.4.0](https://github.com/razorpay/razorpay-go/releases/tag/v1.4.0 )| **Bug Fix**: Removed the use of a global request variable. + --- + May 2025 | [1.3.4](https://github.com/razorpay/razorpay-go/releases/tag/v1.3.4 )| **Bug Fix**: Handling of query parameter arrays in API requests. + --- + May 2025 | [1.3.3](https://github.com/razorpay/razorpay-go/releases/tag/v1.3.3 )| **Feature**: Added `fetch payout by id` and `fetch all`. + --- + Apr 2024 | [1.3.2](https://github.com/razorpay/razorpay-go/releases/tag/v1.3.2 )| **Feature**: - Added `AddBankAccount`, `DeleteBankAccount`, `RequestEligibilityCheck` and `FetchEligibility` to Customers API. +- Added `ViewRtoReview` and `EditFulfillment` to Orders API. +- Added Fetch IINs supporting native OTPs and Fetch all IINs with business sub-type to IIN API. +- Added Disputes API. + + + + + + Month-Year | Version | Description + --- + Aug 2025 | [2.9.2](https://github.com/razorpay/razorpay-php/releases/tag/2.9.2)| **Bug Fix**: - Content-Type header leakage in `Order::create()` where setting application/json globally affected subsequent API calls. +- Replaced deprecated `get_class()` usage in the `ErrorCode::exists()` method with the `__CLASS__` constant to resolve PHP deprecation warnings. + + --- + Mar 2025 | [2.9.1](https://github.com/razorpay/razorpay-php/releases/tag/2.9.1)| **Feature**: - Added support for `access token` - based authentication mechanism. +- Introduced OAuth APIs: `getAuthURL`, `getAccessToken`, `refreshToken` and `revokeToken`. +- Added support for onboarding signature generation. + + + + ### Ruby + + + Month-Year | Version | Description + --- + May 2024 | [3.2.3](https://github.com/razorpay/razorpay-ruby/releases/tag/v3.2.3 ) | **Feature**: - Added `add_bank_account`, `delete_bank_account`, `request_eligibility_check` and `fetch_eligibility` to Customers API. +- Added `view_rto` and `edit_fulfillment` to Orders API. +- Added `expand_details` to Payments API. +- Added Fetching Reversals for a transfer API. +- Added Disputes API. + + --- + Apr 2024 | [3.2.2](https://github.com/razorpay/razorpay-ruby/releases/tag/v3.2.2 ) | **Feature**: - Added OAuth APIs. +- Added access token-based authentication mechanism. +- Added onboarding signature generation. + + + + + ### Node JS + + + Month-Year | Version | Description + --- + Feb 2025 | [2.9.6](https://github.com/razorpay/razorpay-node/releases/tag/v2.9.6) | **Feature**: - Added support for `access token` - based authentication mechanism. +- Introduced OAuth APIs: `getAuthURL`, `getAccessToken`, `refreshToken` and `revokeToken`. +- Added support for onboarding signature generation via `generateOnboardingSignature`. + + --- + Oct 2024 | [2.9.5](https://github.com/razorpay/razorpay-node/releases/tag/v2.9.5) | **Bug Fix**: `cancelAtCycleEnd` now supports both boolean (true/false) and numeric (0/1) values as expected for subscription cancellation. + --- + May 2024 | [2.9.4](https://github.com/razorpay/razorpay-node/releases/tag/v2.9.4 ) | **Bug Fix**: Resolve SSRF vulnerability in request handling. + **Feature**: - Added `addBankAccount`, `deleteBankAccount`, `requestEligibilityCheck` and `fetchEligibility` to Customers API. +- Added `viewRtoReview` and `editFulfillment` to Orders API. +- Added Fetch IINs supporting native OTPs and Fetch all IINs with business sub-type to IIN API. +- Added `uploadStakeholderDoc`, `fetchStakeholderDoc` to Stakeholders API. +- Added Disputes API. + + --- + Apr 2024 | [2.9.3](https://github.com/razorpay/razorpay-node/releases/tag/v2.9.3 ) | **Bug Fix:** Updated the type definition for product and customer + + + + + + Month-Year | Version | Description + --- + Sep 2025 | [3.3.1](https://github.com/razorpay/razorpay-dot-net/releases/tag/v3.3.1 ) | **Bug Fix**: NuGet package README and modernised packaging. + --- + Dec 2024 | [3.1.4](https://github.com/razorpay/razorpay-dot-net/releases/tag/3.1.4 ) | **Bug Fix**: Updated HTTP response handling to validate success. + --- + Jun 2024 | [3.1.3](https://github.com/razorpay/razorpay-dot-net/releases/tag/3.1.3 ) | **Feature**: Added support for .NET 4.8. + --- + May 2024 | [3.1.2](https://github.com/razorpay/razorpay-dot-net/releases/tag/3.1.2 ) | **Feature**: - Added `AddBankAccount`, `DeleteBankAccount`, `RequestEligibilityCheck` and `FetchEligibility` to Customers API. +- Added `ViewRtoReview` and `EditFulfillment` to Orders API. +- Added Fetch IINs supporting native OTPs and Fetch all IINs with business sub-type to IIN API. +- Added Disputes API. + + --- + Feb 2024 | [3.1.1](https://github.com/razorpay/razorpay-dot-net/releases/tag/3.1.1 ) | **Feature**: - Added OAuth APIs. +- Added access token-based authentication mechanism. +- Added onboarding signature generation. + + + + + + + +### Mobile SDKs + + + + + Month-Year | Version | Description + --- + Aug 2024 | [1.6.41](https://mvnrepository.com/artifact/com.razorpay/checkout/1.6.41) | **Bug Fix:** `package-name` duplication error. + --- + Aug 2024 | [1.6.40](https://mvnrepository.com/artifact/com.razorpay/checkout/1.6.40) | **Feature:** Implemented Gradle bill-of-materials for Razorpay Plugins. + --- + May 2024 | [1.6.39](https://mvnrepository.com/artifact/com.razorpay/checkout/1.6.39) | **Bug Fix:** `RECEIVER_EXPORTED` flag implementation for OTP Auto Read on Android 34(Tiramisu) devices. + --- + Mar 2024 | [1.6.38](https://mvnrepository.com/artifact/com.razorpay/checkout/1.6.39) | **Bug Fix:** Rectified clearUserData for user data deletion. + + + ### iOS + + + Month-Year | Version | Framework Compiled With | Description + --- + Dec 2025 | [1.5.2](https://github.com/razorpay/razorpay-pod/releases/tag/1.5.2) | Swift 5.4.2+ | **Bug Fix**: Checkout page not opening in Simulator. + **Improvement**: Extended SPM support to latest releases with new SDK architectural changes. + --- + Dec 2025 | [1.5.1](https://github.com/razorpay/razorpay-pod/releases/tag/1.5.1) | Swift 5.4.2+ | **Feature**: Enabled Quickbuy support. + --- + Nov 2025 | [1.5.0](https://github.com/razorpay/razorpay-pod/releases/tag/1.5.0) | Swift 5.4.2+ | **Feature**: SDK modularisation to allow Razorpay custom and standard SDKs in the same app. + **Improvement**: Shared components moved to a common Core module for better maintainability and reduced code duplication. + --- + Nov 2025 | [1.4.7](https://github.com/razorpay/razorpay-pod/releases/tag/1.4.7) | Swift 5.4.2+ | **Feature**: Added preload webview functionality to improve Checkout load times. + **Bug Fix**: Split-second black screen issue when redirecting to Razorpay Checkout `ViewController`. + --- + Oct 2025 | [1.4.6](https://github.com/razorpay/razorpay-pod/releases/tag/1.4.6) | Swift 5.4.2+ | **Bug Fix**: Removed `genesis.yml` workflow. + --- + Sep 2025 | [1.4.5](https://github.com/razorpay/razorpay-pod/releases/tag/1.4.5) | Swift 5.4.2+ | **Bug Fix**: Updated the signing certificate for `Razorpay.xcframework`. + --- + Aug 2025 | [1.4.4](https://github.com/razorpay/razorpay-pod/releases/tag/1.4.4) | Swift 5.4.2+ | **Feature**: Added missing test target to `Package.swift` for Swift Package Manager code coverage. + --- + Jul 2025 | [1.4.3](https://github.com/razorpay/razorpay-pod/releases/tag/1.4.3) | Swift 5.4.2+ | **Bug Fix**:`dSYM` mismatch issue. + --- + Jun 2025 | [1.4.2](https://github.com/razorpay/razorpay-pod/releases/tag/1.4.2) | Swift 5.4.2+ | **Feature**: Added Hosted Optimizer support. + --- + May 2025 | [1.4.1](https://github.com/razorpay/razorpay-pod/releases/tag/1.4.1) | Swift 5.4.2+ | **Feature**: Enabled Turbo UPI on Razorpay Standard Checkout. + --- + Dec 2024 | [1.3.14](https://github.com/razorpay/razorpay-pod/releases/tag/1.3.14) | Swift 5.4.2+ | **Feature**: MagicX integration with Storefront URL. + --- + Oct 2024 | [1.3.13](https://github.com/razorpay/razorpay-pod/releases/tag/1.3.13) | Swift 5.4.2+ | **Bug Fix**: UPI application detection issue. + --- + Oct 2024 | [1.3.12](https://github.com/razorpay/razorpay-pod/releases/tag/1.3.12) | Swift 5.4.2+ | **Bug Fix**: FPX login page issue. + --- + Sep 2024 | [1.3.11](https://github.com/razorpay/razorpay-pod/releases/tag/1.3.11) | Swift 5.4.2+ | **Improvement**: Optimised load time with enhanced internal metrics. + --- + Jul 2024 | [1.3.10](https://github.com/razorpay/razorpay-pod/releases/tag/1.3.10) | Swift 5.4.2+ | **Bug Fix**: Resolved `NSURLDomainError` - 999 in webview. + --- + May 2024 | [1.3.8](https://github.com/razorpay/razorpay-pod/releases/tag/1.3.8) | Swift 5.4.2+ | **Bug Fix**: Resolved swift package manager binary target issue. + --- + Apr 2024 | [1.3.7](https://github.com/razorpay/razorpay-pod/releases/tag/1.3.7) | Swift 5.4.2+ | **Feature**- Privacy Manifest included in the xcframework library. +- xcframework signed with Razorpay's Apple Account. +**Bug Fix**: Transparent Nav Bar issue after triggering Razorpay Checkout fixed. + --- + Jan 2024 | [1.3.6](https://github.com/razorpay/razorpay-pod/releases/tag/1.3.6) | Swift 5.4.2+ | Generic fixes for UPI Intent payments. + + + + ### React Native + + + Month-Year | Version | Description + --- + Nov 2025 | [2.3.1](https://github.com/razorpay/react-native-razorpay/releases/tag/v2.3.1) | **Feature**: Added support for unified Checkout experience.versions. + + + + ### Flutter + + + Month-Year | Version | Description + --- + Feb 2026 | [1.4.1](https://github.com/razorpay/razorpay-flutter/releases/tag/v1.4.1) | **Bug Fix**: Removed redundant `fluttertoast` package dependency. + --- + Feb 2025 | [1.4.0](https://github.com/razorpay/razorpay-flutter/releases/tag/v1.4.0) | **Bug Fix**: Removed Registrar implementation to resolve the `Registrar not found` error in the latest versions. + --- + May 2024 | [1.3.7](https://github.com/razorpay/razorpay-flutter/releases/tag/v1.3.7) | Internal tech bug fixes. + --- + Jan 2024 | [1.3.6](https://github.com/razorpay/razorpay-flutter/releases/tag/v1.3.6) | Internal tech bug fixes. + + + + ### Capacitor + + + Month-Year | Version | Description + --- + Sep 2025 | [1.3.0](https://github.com/razorpay/razorpay-capacitor/releases/tag/v1.3.0) | **Feature**: Updated genesis workflow. + --- + Aug 2024 | [1.2.1](https://github.com/razorpay/razorpay-capacitor/releases/tag/v1.2.1) | **Feature**: Added supported for capacitor v6. + + + + ### Cordova + + There have been no changes to this SDK since Jan 2024. + + + + + + +### Plugins + + + + Shopify + + + Month-Year | Version | Description + --- + Mar 2024 |-| The Razorpay Shopify plugin, which was previously called **Razorpay Secure**, is now renamed to **1Razorpay**. + + + + +### WooCommerce + + **List of Razorpay for WooCommerce Plugin Releases** + + + Month-Year | Version | Description + --- + Mar 2026 | [**4.8.1**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.8.1) | Internal tech bug fixes. + --- + Jan 2026 | [**4.8.0**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.8.0) | Added support for store location–specific title and description configuration. + --- + Jan 2026 | [**4.7.9**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.7.9) | Internal tech improvements. + --- + Nov 2025 | [**4.7.8**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.7.8) | Internal tech bug fixes. + --- + Aug 2025 | [**4.7.7**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.7.7) | **Feature:** - Added support for WooCommerce Cart Blocks. + - Fixed script enqueue issue for Magic Checkout. + - Fixed guest checkout issue for existing users in Magic Checkout. + + --- + Jul 2025 | [**4.7.6**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.7.6) | Internal tech bug fixes. + --- + Jul 2025 | [**4.7.5**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.7.5) | **Feature:** Added instrumentation for alert monitoring. + +Internal tech bug fixes. + --- + May 2025 | [**4.7.4**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.7.4) | **Feature:** - Added instrumentation to monitor and debug cron jobs. + - Improved webhook failure handling by updating order status in the webhook log on callback failure. + + --- + Apr 2025 | [**4.7.3**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.7.3) | **Feature:** Enhanced webhook cron. + --- + Apr 2025 | [**4.7.2**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.7.2) | **Feature:** Added a cron job to automate webhook processing. + --- + Mar 2025 | [**4.7.1**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.7.1) | Internal tech improvements. + --- + Jan 2025 | [**4.7.0**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.7.0) | Internal tech improvements. + --- + Sep 2024 | [**4.6.9**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.6.9) | Internal tech improvements. + --- + Aug 2024 | [**4.6.8**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.6.8) | Internal tech bug fixes. + --- + Jun 2024 | [**4.6.7**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.6.7) & [**4.6.6**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.6.6) | Internal tech bug fixes. + --- + May 2024 | [**4.6.5**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.6.5) | Internal tech bug fixes. + --- + Apr 2024 |[**4.6.4**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.6.4) & [**4.6.3**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.6.3) | Internal tech bug fixes. + --- + Mar 2024 | [**4.6.2**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.6.2) | **Feature:** Shipping Method Name for Shipping Engine. + +Internal tech bug fixes. + --- + Feb 2024 | [**4.6.1**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.6.1) | **Feature:** Checkout Blocks on WooCommerce. + + Internal tech bug fixes. + --- + Feb 2024 | [**4.6.0**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.6.0) | **Feature** - Tera Wallet + - RTB widget + + --- + Jan 2024 | [**4.5.8**](https://github.com/razorpay/razorpay-woocommerce/releases/tag/v4.5.8) | Internal tech bug fixes. + + + **List of Razorpay for WooCommerce Subscription plugin releases** + + + Month-Year | Version | Description + --- + Aug 2024 | [**2.4.1**](https://github.com/razorpay/razorpay-woocommerce-subscriptions/releases/tag/v2.4.1) | Internal tech bug fixes. + --- + Apr 2024 | [**2.4.0**](https://github.com/razorpay/razorpay-woocommerce-subscriptions/releases/tag/v2.4.0) | **Feature:** Added Checkout blocks. + +Internal tech bug fixes. + --- + Feb 2024 | [**2.3.9**](https://github.com/razorpay/razorpay-woocommerce-subscriptions/releases/tag/v2.3.9) | Internal tech bug fixes. + + + + +### Magento + + + Month-Year | Version | Description + --- + Jan 2026 | [**4.2.1**](https://github.com/razorpay/razorpay-magento/releases/tag/4.2.1) | Internal bug fixes. + --- + Dec 2025 | [**4.2.0**](https://github.com/razorpay/razorpay-magento/releases/tag/4.2.0) | Internal tech improvements. + --- + Jul 2025 | [**4.1.9**](https://github.com/razorpay/razorpay-magento/releases/tag/4.1.9) | **Feature:** Added instrumentation for alert monitoring. + --- + Feb 2025 | [**4.1.8**](https://github.com/razorpay/razorpay-magento/releases/tag/4.1.8) | **Feature:** Added `CsrfAwareActionInterface` for Webhook to improve security. + --- + Dec 2024 | [**4.1.7**](https://github.com/razorpay/razorpay-magento/releases/tag/4.1.7) | **Feature:** Added a new configuration entry in Razorpay settings: `Pending Orders Maximum Age` for the Cancel Pending Orders Cron. + +Internal tech bug fixes. + --- + Jun 2024 | [**4.1.6**](https://github.com/razorpay/razorpay-magento/releases/tag/4.1.6) | Internal tech bug fixes. + --- + Apr 2024 | [**4.1.5**](https://github.com/razorpay/razorpay-magento/releases/tag/4.1.5) & [**4.1.4**](https://github.com/razorpay/razorpay-magento/releases/tag/4.1.4) | Internal tech bug fixes. + --- + Feb 2024 | [**4.1.3**](https://github.com/razorpay/razorpay-magento/releases/tag/4.1.3) | Internal tech bug fixes. + + + + +### WHMCS + + + Month-Year | Version | Description + --- + Apr 2024 | [**2.2.1**](https://github.com/razorpay/razorpay-whmcs/releases/tag/2.2.1) | Internal tech bug fixes. + + + + +### Gravity Forms + + + Month-Year | Version | Description + --- + Nov 2024 | [**1.3.6**](https://github.com/razorpay/razorpay-gravity-forms/releases/tag/v1.3.6) | **Feature:** Added a cron job to automate webhook processing. + --- + Mar 2024 | [**1.3.5**](https://github.com/razorpay/razorpay-gravity-forms/releases/tag/v1.3.5) | **Feature:** Added currency code for INR. + + + + +### OpenCart + + + **List of Razorpay for OpenCart 3 Plugin Releases** + + + Month-Year | Version | Description + --- + May 2024 | [**5.1.8**](https://github.com/razorpay/razorpay-opencart/releases/tag/opencart3-5.1.8) | **Feature:** PHP 8 compatibility with OpenCart 3. + --- + Apr 2024 | [**5.1.7**](https://github.com/razorpay/razorpay-opencart/releases/tag/opencart3-5.1.7) | Internal tech bug fixes. + --- + Mar 2024 | [**5.1.6**](https://github.com/razorpay/razorpay-opencart/releases/tag/opencart3-5.1.6) | Internal tech bug fixes. + --- + Feb 2024 | [**5.1.5**](https://github.com/razorpay/razorpay-opencart/releases/tag/opencart3-5.1.5) | Internal tech bug fixes. + --- + Jan 2024 | [**5.1.4**](https://github.com/razorpay/razorpay-opencart/releases/tag/opencart3-5.1.4) & [**5.1.3**](https://github.com/razorpay/razorpay-opencart/releases/tag/opencart3-5.1.3) | Internal tech bug fixes. + + + **List of Razorpay for OpenCart 4 Plugin Releases** + + + Month-Year | Version | Description + --- + Feb 2024 | [**6.0.3**](https://github.com/razorpay/razorpay-opencart/releases/tag/opencart4-6.0.3) | Internal tech bug fixes. + + + + +### Arastta + + There have been no changes to this SDK since Jan 2024. + + + +### BigCommerce + + There have been no changes to this SDK since Jan 2024. + + + +### Drupal Commerce + + There have been no changes to this SDK since Jan 2024. + + + +### Easy Digital Downloads + + There have been no changes to this SDK since Jan 2024. + + + +### CS-Cart + + There have been no changes to this SDK since Jan 2024. + + + +### PrestaShop + + + Month-Year | Version | Description + --- + Sep 2025 | [**2.5.6**](https://github.com/razorpay/razorpay-prestashop/releases/tag/2.5.6) | Internal tech bug fixes. + --- + Sep 2024 | [**2.5.5**](https://github.com/razorpay/razorpay-prestashop/releases/tag/2.5.5) | Internal tech bug fixes. + + + + +### Wix + + There have been no changes to this SDK since Jan 2024. + + + +### WordPress + + + Month-Year | Version | Description + --- + Aug 2024 | [**1.3.0**](https://github.com/razorpay/razorpay-quick-payments/releases/tag/v1.3.0) | **Feature:** Added support for international two decimal currencies. + +Internal tech bug fixes. + + + + + + + +### Widgets + + + Month-Year | Product | Description + --- + Feb 2024 | Widgets | [Launched Razorpay Trusted Business Widget for WooCommerce.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/trusted-business/rtb-widget-woocommerce.md) + --- + Jan 2024 | Widgets | [Launched Razorpay Trusted Business Widget for Shopify.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/trusted-business/rtb-widget-shopify.md) + + + + +### General + + + Month-Year | Product | Description + --- + Oct 2025 | SSL Certificates | [Issued new SSL certificates for `api.razorpay.com` for 2025 - 2026.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#ssl-certificates) + --- + Jan 2024 | SSL Certificates | [Issued new SSL certificates for `api.razorpay.com` for 2024 - 2025.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#ssl-certificates) diff --git a/llm-content/payments/cod-magic-checkout.md b/llm-content/payments/cod-magic-checkout.md new file mode 100644 index 00000000..f4981c1e --- /dev/null +++ b/llm-content/payments/cod-magic-checkout.md @@ -0,0 +1,62 @@ +--- +title: COD & Magic Checkout +heading: COD & Magic Checkout (formerly Checkout360) +description: Enhance payment speed, security and personalisation with Razorpay COD & Magic Checkout for a seamless digital payment experience. +--- + +# COD & Magic Checkout (formerly Checkout360) + +Razorpay COD & Magic Checkout is designed to enhance the payment experience with features like auto-prefilled contact and delivery details and a configurable COD setup for added control. Built to improve conversion rates, it supports fast, reliable payments for diverse business needs across India’s digital landscape. + +> **WARN** +> +> +> **Feature Request** +> +> This is an on-demand feature and available only to Shopify users. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> + +## Advantages + +- **COD Configurations with RTO Protection**: Supports Cash on Delivery with smart COD configurations, including built-in Return to Origin (RTO) prediction to minimise losses. +- **Fast Checkout**: Enables address pre-fill and custom coupon options to accelerate the buying journey on your Shopify checkout. +- **Trusted Checkout**: Implements Razorpay’s Trusted badge and widget to increase customer trust and improve conversion rates. +- **High Performance**: Optimised for speed with fast loading times and quick payment processing, even on slower networks. +- **Flexible Payment Options**: Automatically applies relevant discounts and payment offers (EMIs, deals) to enhance purchase intent. +- **Safe and Secure**: Supports various payment methods, including saved cards and UPI, with top-tier security and compliance. +- **Personalised Payments Experience**: Provides a tailored payment experience for each customer, including recommended payment methods, best available deals and optimised delivery addresses for a smooth transaction journey. + +## Offerings + +Razorpay COD & Magic Checkout offers: + + +### Enhance add-to-cart rates + + - **RTB**: Integrate the Razorpay Trusted Business (RTB) widget and badge on your checkout page. This enhances customer trust by providing transparent information about your business’s credibility, effectively reducing doubts and minimising cart abandonment. Know more about [RTB](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/trusted-business.md). + - **Affordability Widget**: Promote payment options like EMI, Cardless EMI, and Pay Later to offer customers flexible solutions early in their shopping journey, reducing cart abandonment. The widget lets customers check eligibility and complete purchases directly, with automatic selection of their chosen payment option at checkout. Know more about [Affordability Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/shopify.md). + + + +### Increase conversion rates + + - **Auto Login**: Enable automatic customer log in using saved credentials, which will make the shopping experience more convenient and encourage repeat purchases. + - **Address Prefill**: Utilise over 100 million pre-saved addresses to automatically fill in customer shipping details, speeding up the checkout process. + - **Branded Themes**: Customise the look and feel of your store with branded themes that reflect your brand's identity. + - **Coupons**: Automatically suggest and apply the best discount codes at checkout, encouraging purchases by offering attractive deals and rewards. + - **Offers**: Attract customers and improve sales by providing discounts or cashback on your website or apps. + - **Custom Banner**: Create and display custom banners on your website to communicate special offers, promotions, or important messages. It allows you to engage with your customers effectively and drive targeted actions. + - **Industry Leading Method Coverage**: Display over 100+ payment methods, including preferred methods, saved cards and EMI² options, for a smoother checkout experience. + + + +### Increase prepaid orders + + - **Risk Detection Engine, RTO Protection and Intelligent COD**: Leverage insights to manage Cash on Delivery (COD) transactions, encourage prepayments, apply differential COD fees, and recover reverse shipping costs for RTOs with risk protection. Disable COD for high-risk users and enable it for medium-risk orders. + - **WhatsApp Commerce Kit**: Leverage Razorpay’s WhatsApp Engagement suite to recover abandoned carts and enhance customer interaction through conversational commerce. + - **Gift cards and wallets**: Issue and redeem gift cards at scale and enhance retention by enabling customers to spend with wallets. + + +## Next Steps + +[Integrate COD & Magic Checkout with your Shopify Store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify.md) diff --git a/llm-content/payments/cod-magic-checkout/shopify.md b/llm-content/payments/cod-magic-checkout/shopify.md new file mode 100644 index 00000000..72c78781 --- /dev/null +++ b/llm-content/payments/cod-magic-checkout/shopify.md @@ -0,0 +1,89 @@ +--- +title: Integrate COD & Magic Checkout With Shopify Store | Razorpay COD & Magic Checkout +heading: Integration Steps +description: Steps to integrate COD & Magic Checkout on your Shopify Store. +--- + +# Integration Steps + +Integrate Razorpay - COD & Magic Checkout to deliver a seamless and powerful checkout experience on your Shopify store. Leverage key features like smart COD, RTO prediction, address prefill and smart coupons to optimise sales performance. Enhance customer trust and intent with discount markers on product pages and enable fast, secure payments using over 100+ payment methods. + +## Prerequisites +- Create a [Shopify account](https://www.shopify.in). +- Log in to the Dashboard and complete the KYC requirements. During the KYC review process, we may reach out to you for clarifications. You can address these queries on the Razorpay Dashboard. + + +> **WARN** +> +> +> **Watch Out!** +> +> Avoid using Razorpay **COD & Magic Checkout** and its dependent apps on multiple Shopify stores with the same Razorpay merchant ID. +> + +## Steps + +Follow the steps given below: + + +### 1. Install Apps + + After submitting your KYC details and receiving approval to accept payments, you will receive a confirmation via WhatsApp, SMS and email and be redirected to the COD & Magic Checkout sign-up page. + 1. Install the [Razorpay - COD & Magic Checkout](https://apps.shopify.com/razorpay-checkout) app on the Shopify app store. + + +> **INFO** +> +> +> **Handy Tips** +> +> If you have multiple stores, select a store for which you want to install the following apps. +> + + 2. You will be redirected to the Shopify app store, click **Install**. + 3. You will then be redirected to the Shopify admin, click **Install**. After installation, you will be redirected to the Razorpay Dashboard. + 4. Click **Start** to select the features for your store, install and activate the necessary apps and configure settings like COD, checkout, RTO and more. + 5. In the **Build your buying experience** screen, select the features based on your requirement and click **Continue**. + - **Smart COD Configurations**: Show/hide the COD payment option based on 15+ criteria, such as order value, product SKU, or shipping location to reduce COD orders from high RTO risk customers and charge a COD fee to offset potential losses. + - **Payments & Checkout**: Combine a fast, efficient checkout process with Razorpay's payment gateway, offering 100+ payment modes and features like login, address pre-fill and smart coupons to streamline checkout experience. + - **Affordability Widget**: Display discounts and EMI options directly on the product screen, increasing customer interest and boosting purchase intent. + ![select features to enable COD & Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-checkout-features.jpg.md) + 6. In the **Install Apps** section, install the required apps based on the selected features. For each app installation, you will be redirected to the Shopify app store and admin. Once the installation is complete, you will be returned to onboarding. + ![Install remaining apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-checkout-install-apps.jpg.md) + 1. **Razorpay COD Payments App**: Enables a safe and seamless checkout process and lets you configure COD availability based on pincodes and customer details to reduce RTO. Know more about [Razorpay COD Payments App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-cod.md). + 2. **1 Razorpay App**: Enhance conversions with superior checkout, 100+ payment methods and leading success rates. Know more about [1 Razorpay App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify.md). + + + +### 2. Activate Apps + + You must activate the selected features to complete the payment setup. In the **Activate Apps on Shopify** section, activate the following apps: + ![Activate installed apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-checkout-activate-app.jpg.md) + 1. **Razorpay COD & Magic Checkout App** + 1. Click **Activate Now** in the bottom right corner. + 2. You will be redirected to the Shopify theme editor page to inject the Checkout script on your checkout, click **Save** in the top right corner. + 3. After saving the script, close this tab, return to the Razorpay Dashboard and refresh the page to complete the remaining activations. + 2. **Razorpay COD Payments App** + 1. Click **Activate Now** in the bottom right corner. + 2. You will be redirected to the Shopify payments settings page to activate COD as a payment method, click **Activate** in the top right corner. + 3. After activation, close this tab, return to the Razorpay Dashboard and refresh the page to complete the remaining activations. + 3. **1 Razorpay App** + 1. Click **Activate Now** in the bottom right corner. + 2. You will be redirected to the Shopify payments settings page to activate Razorpay as a payment option, click **Activate** in the top right corner. + 3. After activation, close this tab, return to the Razorpay Dashboard and refresh the page to complete the remaining activations. + 4. **Affordability & Trust Badges** + 1. Click **Activate Now** in the bottom right corner. + 2. You will be redirected to the Shopify product configuration page. Under the **Template** section, click **Add block** → **Apps**. + 3. Select **Affordability widget** and **RTB widget**. + 4. Click **Save** in the top right corner. + 5. After activation, close this tab, return to the Razorpay Dashboard and refresh the page. + + +You have successfully integrated Razorpay COD & Magic Checkout with your Shopify Store. Click **Explore the dashboard** to manage and configure COD rules, checkout settings, RTO prediction and more. + +## Next Steps + +Navigate to **Control Center** on the Razorpay Dashboard and configure the following +- [COD Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/configure-cod.md) +- [RTO Prediction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence.md) +- [Checkout Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/magic-checkout.md) diff --git a/llm-content/payments/cod-magic-checkout/shopify/configure-cod.md b/llm-content/payments/cod-magic-checkout/shopify/configure-cod.md new file mode 100644 index 00000000..17d85ff2 --- /dev/null +++ b/llm-content/payments/cod-magic-checkout/shopify/configure-cod.md @@ -0,0 +1,371 @@ +--- +title: Configure COD | Razorpay COD & Magic Checkout +heading: Configure COD +description: Configure COD for shipping and payment methods created on your Shopify store. +--- + +# Configure COD + +After successfully onboarding with COD & Magic Checkout, you can configure COD for the shipping and payment methods created on your Shopify store. + +To configure COD: +1. On the Dashboard, navigate to **Magic Checkout** → **Setup and Settings** → **COD Settings**. +2. Toggle on **Enable COD as a payment option** to allow customers to choose COD at checkout. Click **Yes, enable** in the confirmation pop-up modal. + ![Enable COD as a payment option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-checkout-cod-enable.jpg.md) +3. Turn on **Enable RTO Intelligence** to check customer eligibility for COD based on their purchase history. If a customer is ineligible, the COD option is hidden, displaying only prepaid options at checkout. Click **Enable COD Intelligence** in the confirmation pop-up modal. + + ![Enable RTO Intelligence](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-checkout-cod-rto-intelligence.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> To enable RTO Intelligence, you must activate Magic Checkout. +> +> +> +> To activate Magic Checkout: +> +> 1. Click **Activate** under **Enable RTO Intelligence**. +> ![Activate Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-cod-activate-magic.jpg.md) +> 1. On the **Checkout Settings** page, turn on **Enable Magic Checkout**. +> 1. Click **Save Settings**. +> ![Enable Magic Checkout to activate RTO Intelligence](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-checkout-cod-enable-magic.jpg.md) +> +> +> +> + +4. Select the type of setting: +- [Basic](#basic) +- [Advanced](#advanced) *(Recommended)* + +## Basic + +Configure COD for the shipping methods synced from your Shopify store. These methods are based on the profiles you have set up on Shopify to manage shipping locations and costs at checkout. Know more about [shipping options on Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/shipping-options.md). + + +### Follow the steps given below: + + 1. In **COD Settings**, click **Configure COD** under **Configure COD for Shopify Shipping Methods** to select the payment methods allowed for the shipping method synced from Shopify. + + +> **INFO** +> +> +> **Handy Tips** +> +> Click **Sync Again** to sync shipping methods from Shopify. +> + + + ![Configure COD for shopify shipping methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-config-cod.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> You can configure the shipping method rate only on your Shopify store. Know more about how to create [shipping options on Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/shipping-options.md). +> + + + 2. In the **Allowed Payment Method** section, select the relevant option: + + - **COD**: Select the **COD** check box. You can either apply COD to all orders or define a range by specifying a minimum and maximum order value. For example, you can set a minimum order value of ₹100 and a maximum of ₹500. If a customer's order subtotal falls within this range, the COD option will be available for that shipping method. + + +> **INFO** +> +> +> **How to charge extra for COD orders?** +> +> You can either create a new shipping method or update an existing shipping profile on Shopify. Configure the shipping rate to include both shipping and COD charges. For example, if the shipping cost is ₹50 and COD is ₹30, set the shipping rate to ₹80 to cover both. +> + + - **Prepaid**: Select the **Prepaid** check box to allow only prepaid options for that shipping method. + 3. Click **Submit** to save your settings. + ![Configure COD for shopify shipping methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-config-cod-edit.jpg.md) + + +## Advanced *(Recommended)* + +Set up advanced rules to customise the shipping and payment methods displayed at checkout. You can create conditions based on weight, cart total, discount percentage, phone number, and more. + +Depending on these conditions, you can choose to show or hide specific shipping or payment options. You can also combine multiple conditions to create more specific rules. + +> **INFO** +> +> +> **Handy Tips** +> +> This feature is enabled by default for new users. In case you are an existing user, you must update the **Razorpay COD & Magic Checkout** app to get this feature on your account. +> +> +> To update the app: +> +> 1. Log in to your [Shopify Dashboard](https://www.shopify.com/in/login?ui_locales=en-IN). +> 2. Navigate to **Apps** → **Razorpay COD & Magic Checkout**. +> 3. Click **Update**. +> ![Update Razorpay COD & Magic Checkout app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-update-app.jpg.md) +> +> +> +> + +Follow the steps given below to set up Shipping and Payment Rules: + + +### Shipping Rule + + Customise shipping methods you want to display on checkout. For example, if the cart total is less than ₹1000, you can choose to hide free shipping. + ![Shipping methods on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-shipping-methods.jpg.md) + + 1. Select **Shipping Rule**. + 2. Enter the **Rule Name** and **Description**. + 3. You can create various shipping conditions: + + + Automate Actions Based on Simple Conditions + + Define **When** and **Then** conditions to automate actions. + + For example, when the **Quantity is less than 20 units**, then **Hide Free Shipping Methods*. + ![define when then conditions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-when-then-condition.jpg.md) + + + +### Combine Multiple Conditions + + Combine multiple conditions based on AND and OR logic. + + + Combine multiple **When** conditions to trigger actions **only if all** conditions are true. Click **+Add another block** and select **AND** to add another **When** condition. + + For example, when the **Quantity is less than 20 units** and the **Weight is less than 500 grams**, then **Hide Free Shipping Methods*. + ![combine when and when-then condition](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-when-when-then-condition.jpg.md) + + + Use **When** conditions to trigger actions **if any** of the conditions are true. Click **+Add another block** and select **OR** to add another **When** condition. + + For example, when the **Quantity is less than 20 units** or the **Weight is less than 500 grams**, then **Hide Free Shipping Methods*. + ![combine when or when-then condition](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-when-or-when-then-condition.jpg.md) + + + + + +### Combine Multiple Complex Conditions + + Combine multiple complex conditions based on AND and OR logic. + + + Combine **When OR** conditions to handle more complex scenarios. Click **+Add another condition** and select **AND** to define a **When OR** condition. + + For example, when the **Quantity is less than 20 units** or the **Cart Total is less than or equal to ₹3000** and the **Weight is less than 500 grams**, then **Hide Free Shipping Methods*. + ![combine when or condition](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-combine-when-or-condition.jpg.md) + + + +> **INFO** +> +> +> **Handy Tips** +> +> You can include multiple AND blocks and OR conditions to create flexible and dynamic rules. +> +> For example, when the **Quantity is less than 20 units** or the **Cart Total is less than or equal to ₹3000** and the **Weight is less than 500 grams** or the **Cart Total Before Discount equals to ₹3000**, then **Hide Free Shipping Methods*. +> + + + + Combine **When AND** conditions to handle more complex scenarios. Click **+Add another condition** and select **AND** to define a **When AND** condition. + + For example, when the **Quantity is less than 20 units** and the **Cart Total is less than or equal to ₹3000** or the **Weight is less than 500 grams**, then **Hide Free Shipping Methods*. + ![combine when and condition](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-combine-when-and-condition.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> You can include multiple OR blocks and AND conditions to create flexible and dynamic rules. +> +> For example, when the **Quantity is less than 20 units** and the **Cart Total is less than or equal to ₹3000** or the **Weight is less than 500 grams** and the **Cart Total Before Discount equals to ₹3000**, then **Hide Free Shipping Methods*. +> + + + + + + + + 4. Click **Submit**. + + + +### Payment Rule + + Customise payment methods you want to display on checkout. For example, if the cart total is less than ₹1000, you can choose to show specific payment methods based on your preference. + + ![Payment methods on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-payment-methods.jpg.md) + + 1. Select **Payment Rule**. + 2. Enter the **Rule Name** and **Description**. + 3. You can create various payment conditions: + + + Automate Actions Based on Simple Conditions + + Define **When** and **Then** conditions to automate actions. + + For example, when the **Cart Total is less than ₹2000**, then **Hide COD Methods*. + ![define when then conditions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-when-then-payment-condition.jpg.md) + + + +### Combine Multiple Conditions + + Combine multiple conditions based on AND and OR logic. + + + Combine multiple **When** conditions to trigger actions **only if all** conditions are true. Click **+Add another block** and select **AND** to add another **When** condition. + + For example, when the **Cart Total is less than ₹2000** and **Quantity is less than or equal to 10 units**, then **Hide COD Methods*. + ![combine when and when-then condition](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-when-when-then-payment-condition.jpg.md) + + + Use **When** conditions to trigger actions **if any** of the conditions are true. Click **+Add another block** and select **OR** to add another **When** condition. + + For example, when the **Cart Total is less than ₹2000** or **Quantity is less than or equal to 10 units**, then **Hide COD Methods*. + ![combine when or when-then condition](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-when-or-when-then-payment-condition.jpg.md) + + + + + +### Combine Multiple Complex Conditions + + Combine multiple complex conditions based on AND and OR logic. + + + Combine **When OR** conditions to handle more complex scenarios. Click **+Add another condition** and select **AND** to define a **When OR** condition. + + For example, when the **Cart Total is less than ₹2000** or the **Weight is less than 500 grams** and **Quantity is less than or equal to 10 units**, then **Hide COD Methods*. + ![combine when or condition](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-combine-when-or-payment-condition.jpg.md) + + + +> **INFO** +> +> +> **Handy Tips** +> +> You can include multiple AND blocks and OR conditions to create flexible and dynamic rules. +> +> For example, when the **Cart Total is less than ₹2000** or the **Weight is less than 500 grams** and **Quantity is less than or equal to 10 units** or the **Cart Total equals to ₹2000**, then **Hide COD Methods*. +> + + + + Combine **When AND** conditions to handle more complex scenarios. Click **+Add another condition** and select **AND** to define a **When AND** condition. + + For example, when the **Cart Total is less than ₹2000** and the **Weight is less than 500 grams** or **Quantity is less than or equal to 10 units**, then **Hide COD Methods*. + ![combine when and condition](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-combine-when-and-payment-condition.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> You can include multiple OR blocks and AND conditions to create flexible and dynamic rules. +> +> For example, when the **Cart Total is less than ₹2000** and the **Weight is less than 500 grams** or **Quantity is less than or equal to 10 units** and the **Cart Total equals to ₹2000**, then **Hide COD Methods*. +> + + + + + + + + 4. Click **Submit**. + + + +> **WARN** +> +> +> **Watch Out!** +> +> The **Allowed Rule Size** at the bottom indicates the maximum size of rules you can input. For example, if you select **Email** as one of the **When** conditions, you must provide a comma-separated list of customer email IDs. The rule size determines how many email IDs you can include. +> + +### List of Conditions and Values + + +### When Conditions + + The list below includes conditions for both Shipping and Payment rules. + + + Conditions | Values + --- + Quantity | Enter the total number of product units. + --- + Weight | Enter the total weight of the products in grams. + --- + Discount Percentage | Enter the discount offered in percentage. + --- + Cart Total | Enter the total cart amount in rupees. + --- + Cart Contains Discount | Indicates whether the cart includes a discount. Select **True** or **False**. + --- + Cart Total Before Discount | Enter the cart total amount in rupees before any discount is applied. + --- + Email | Enter customer email IDs as a comma-separated list. + --- + Phone | Enter customer phone numbers with the country code as a comma-separated list. For example, `+919000090000`. + --- + Zipcode | Enter customer ZIP codes as a comma-separated list. + + + + +### Then Conditions + + + + Shipping Rule + + + Conditions | Value + --- + Hide Free Shipping Methods | NA + --- + Hide Paid Shipping Methods | NA + --- + Show Specific Shipping Methods | Select shipping methods from the drop-down list. + --- + Hide Specific Shipping Methods | Select shipping methods from the drop-down list. + + + + +### Payment Rule + + + Conditions | Value + --- + Hide COD Methods | NA + --- + Hide Prepaid Methods | NA + --- + Show Specific Payment Methods | Enter payment methods as a comma-separated list. + --- + Hide Specific Payment Methods | Enter payment methods as a comma-separated list. diff --git a/llm-content/payments/cod-magic-checkout/shopify/coupons.md b/llm-content/payments/cod-magic-checkout/shopify/coupons.md new file mode 100644 index 00000000..94cdf239 --- /dev/null +++ b/llm-content/payments/cod-magic-checkout/shopify/coupons.md @@ -0,0 +1,592 @@ +--- +title: Coupons | Razorpay COD & Magic Checkout +heading: Coupons +description: Add various types of coupons to offer discounts to your customers using the Razorpay Dashboard. +--- + +# Coupons + +You can choose to offer discounts to your customers by adding coupons using Razorpay Dashboard. + +> **WARN** +> +> +> **Watch Out!** +> +> - Coupons created on both the Razorpay Dashboard and Shopify are not auto-applied. Customers are required to manually apply them at checkout. +> - **Automatic discount** coupons created on Shopify are applied automatically, while **Discount code** coupons require manual application. +> + +To create coupons: + +1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Checkout Settings**. +2. Click **Edit**, enable **Auto fetch coupon** and click **Save settings**. This step is mandatory and allows you to display coupons to your customers at checkout. Even if you enable **Display this coupon at checkout** in the next steps, you must still enable Auto fetch coupon. +3. Navigate to **Coupons** → **Setup**. + + +> **WARN** +> +> +> **Watch Out!** +> +> When you create coupons on the Razorpay Dashboard, all the coupons created on Shopify will not apply unless they are synced. To sync all coupons, navigate to **Setup** on the Razorpay Dashboard and click **Sync now** next to the **Coupons from Shopify** section. Set the sync duration and click **Start sync**. +> +> - By default, all the coupons synced from Shopify are in the `created` state. You must manually configure and publish the coupons. To configure a coupon, identify the one you want to publish, click the options icon, and click **View and Edit** *(if required)*, or click **Publish**. +> +> +> Watch the GIF below: +> +> ![publish the coupons synced from Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-publish-sync-shopify.gif.md) +> +> +> +> - All newly created coupons will be automatically synced after the initial sync. You must manually configure and publish the coupons. +> - Only the following coupons will be synced from Shopify: (currently, multiple collections are not synced) +> - Amount discounted on orders +> - Amount discounted on products +> - Buy X Get Y (if minimum quantity configured) +> + +4. Navigate to **All Coupons**, click **+ Create Coupon** and **Select a Coupon Type** based on your requirement. Alternatively, you can click **+ Create Coupon** next to **Coupons on Magic** in the **Setup** section and **Select a Coupon Type**. + + +> **INFO** +> +> +> **Handy Tips** +> +> - The steps from 5 to 7 given below are common for all types of coupons. +> - You can preview how customers will view the coupon summary at checkout as you configure the details. +> +> +> Preview Coupon Summary +> +> ![Preview Coupon Summary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-preview-coupon.jpg.md) +> +> +> +> + + +5. Enter the **Coupon Code**. Your customers can view the coupon code at checkout. +6. Enter the **Coupon description**. Your customers can view the coupon description at checkout. +7. Select the **Display this coupon at checkout** check box to display the coupon at checkout for your customers. + 1. After selecting the above check box, the **Enable coupon as an unavailable coupon** check box appears. + 2. Select this check box if you want to display the coupon as unavailable (in a disabled state) when users do not meet the cart or eligibility conditions. Once the conditions are met, the coupon is automatically enabled. + ![Enter the coupon code and description](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magicx-shopify-coupon-code.jpg.md) + +### Coupon Type + +Select a coupon type from the following: + + +### Amount discounted on orders + + Apply a discount to the total order amount, you can set conditions based on the cart value. For example, offer ₹200 discount from the total order amount when the cart value exceeds ₹2,000. + + +> **INFO** +> +> +> **Handy Tips** +> +> Before you begin, follow steps 5 to 7 given above, which are common for all coupon types. +> + + + 1. **Discount Details**: Select the **Discount type**. + + + In this type, a fixed amount is deducted from the original amount. + + **Discount amount**: Enter an amount by which the original price should be reduced. For example, if ₹150 is the flat discount applied, ₹150 is deducted from the original price. + ![Configure the fixed discount details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-discount.jpg.md) + + + This type deducts a set percentage of the amount from the original amount. + - **Discount percentage**: The percentage by which the original price should be reduced. For example, if 10% discount is applied, on an order amount of ₹900, ₹90 will be deducted. + - **Upto (Max Discount)**: The maximum amount that can be deducted from the bill amount. For example, if the max discount is ₹300, and the order amount is ₹800, you can ensure that the customer cannot avail of a discount higher than ₹300. + ![Configure the percentage discount details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-discount-percentage.jpg.md) + + + 2. Select the **Purchase requirements** based on your preference to set eligibility criteria for the customers to use the coupon. + + + By default, the coupon is visible to all the customers irrespective of the quantity or amount. + ![Configure purchase requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-pur-req.jpg.md) + + + You can set a minimum quantity for customers to access the coupon. For example, if you set the minimum quantity as 2, the customers can use the coupon only if there are 2 or more items in their cart. + ![Configure minimum quantity requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-qt.jpg.md) + + + You can set a minimum amount for customers to use the coupon. For example, if you set the minimum amount requirements as ₹300, the customers can use the coupon only if the cart value is ₹300 or above. + ![Configure minimum amount requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-amt.jpg.md) + + + 3. **Coupon validity**: Set the duration for the coupon. + 1. **Active dates**: Set the **Start date** and **Start time**. + 1. Select the **Set an end date** check box and set the **End date** and **End time**. *(optional)* + 1. **Total maximum budget** *(Optional)*: Set an amount to expire the coupon when the total discount to be offered to all your customers is reached. For example, if you set ₹10,000 as the total maximum budget, once the budget limit is reached, the coupon code gets expired and is not visible at checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> The coupon will never expire if you do not set an end date or a total maximum budget. +> + + + ![Configure the coupon validity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-validity.jpg.md) + 4. **Coupon eligibility**: Create the coupon for **All customers** or **Specific customers**. If you want to create coupons for specific customers: + 1. Click **+ Add Customers**. + ![Configure the coupon eligibility](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-eligibility.jpg.md) + 1. You can upload a list of **Mobile Number** or **Email ID** based on your requirement. + + +> **WARN** +> +> +> **Watch Out!** +> +> If you want to create specific coupons based on the **Email ID**, ensure the **Email** field on checkout is not set as optional and is not hidden from checkout. +> + + 1. Click **Download Sample File** and add the required data to the sample file. Ensure the data is formatted correctly and save the file. + + +> **INFO** +> +> +> **To Upload File:** +> +> - Enter the values in a valid format as given below: +> - Mobile number: +919000090000 +> - Email id: gauravkumar@example.com +> - CSV file should not have any header/column title. +> - Maximum acceptable rows in the file is 1 million. +> - Upload the file in CSV format. Maximum file size supported is 50 MB. +> + + + 1. Select **click to upload** and choose the file you want to import. Click **Confirm**. + 5. **Usage restriction**: Set the maximum limit to which a coupon is redeemed in total and per customer. + 1. Select the **Number of times discount can be used in total** check box and set the number. For example, 100. + 1. Select the **Number of times the coupon can be used per customer** check box and set the number. For example, 2. Select **By mobile no.** or **By email id** via which the customer can use the coupon. + ![configure coupon restriction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-restriction.jpg.md) + 6. **Coupon combinations** *(optional)*: You can combine this coupon with various other coupons as follows: + - **Amount off product coupons**: Combine this coupon with a coupon created in the **Amount discounted on products** category to offer a discount on the total order amount and specific products or collections of products. + - **Other Amount off order coupons**: Combine this coupon with other coupons created in the same category to offer multiple discounts on the total order amount. + ![Combine coupons created with other categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magicx-shopify-coupon-order-combine.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> - You can combine two coupons only if you select the same check box in both coupons. For example: +> +> +> If you want to combine two coupons created in the **Amount discounted on orders** category, you must select the **Other Amount off order coupons** check box in both coupons. +> +> +> If you want to combine a coupon from the **Amount discounted on orders** category with a coupon from the **Amount discounted on products** category, you need to select the appropriate check boxes: +> - Select the **Amount off product coupons** check box in the **Amount discounted on orders** category coupon. +> - Select the **Amount off order coupons** check box in the **Amount discounted on products** category coupon. +> +> +> - You cannot combine specific coupons selectively within a category or across categories. For example: +> +> +> If you have coupons C1, C2, and C3 created in the **Amount discounted on orders** category and you select the **Other Amount off order coupons** check box for all three, all three coupons will be combined. You cannot choose to combine only C1 and C2 without including C3. +> +> +> If you have coupons B1 and B2 created in the **Amount discounted on products** category and C1 and C2 created in the **Amount discounted on orders** category, and you select: +> - **Other Amount off product coupons** and **Amount discounted on orders** check boxes for B1 and B2. +> - **Other Amount off order coupons** and **Amount off product coupons** check boxes for C1 and C2. +> +> Then B1, B2, C1, and C2 will all be combined. You cannot selectively combine only B1 and C1 if the respective check boxes are selected for all the coupons created. +> +> +> +> - In summary, selecting the check box allows all coupons within the same or different category to be combined, rather than combining specific coupons selectively. +> + + 7. Click **Create and Publish**. + + + +### Amount discounted on products + + Apply discounts to specific products or a collection of products. You can target individual items or grouped categories. For example, apply a 20% discount on Wireless Earbuds during a limited-time sale or offer a 15% discount on all items in the Winter Wear collection. + + +> **INFO** +> +> +> **Handy Tips** +> +> Before you begin, follow steps 5 to 7 given above, which are common for all coupon types. +> + + 1. **Discount Details**: Select the **Discount type**. + + + In this type, a fixed amount is deducted from the original amount. + + **Discount amount**: Enter an amount by which the original price should be reduced. For example, if ₹150 is the flat discount applied, ₹150 is deducted from the original price. + ![Configure the fixed discount details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-discount.jpg.md) + + + This type deducts a set percentage of the amount from the original amount. + - **Discount percentage**: The percentage by which the original price should be reduced. For example, if 10% discount is applied, on an order amount of ₹900, ₹90 will be deducted. + - **Upto (Max Discount)**: The maximum amount that can be deducted from the bill amount. For example, if the max discount is ₹300, and the order amount is ₹800, you can ensure that the customer cannot avail of a discount higher than ₹300. + ![Configure the percentage discount details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-discount-percentage.jpg.md) + + + 2. Select **Products** or **Collections** to limit the discount to specific products or collections. Click **+ Add Products** or **+ Add Collections** respectively. Select the products or collections based on your requirement and click **Confirm**. You can add multiple products or collections. + + ![configure the discount details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-discount-det.jpg.md) + + 3. Select the **Purchase requirements** based on your preference to set eligibility criteria for the customers to use the coupon. + + + By default, the coupon is visible to all the customers irrespective of the quantity or amount. + ![Configure purchase requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-pur-req.jpg.md) + + + You can set a minimum quantity for customers to access the coupon. For example, if you set the minimum quantity as 2, the customers can use the coupon only if there are 2 or more items in their cart. + ![Configure minimum quantity requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-qt.jpg.md) + + + You can set a minimum amount for customers to use the coupon. For example, if you set the minimum amount requirements as ₹300, the customers can use the coupon only if the cart value is ₹300 or above. + ![Configure minimum amount requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-amt.jpg.md) + + + 4. **Coupon validity**: Set the duration for the coupon. + 1. **Active dates**: Set the **Start date** and **Start time**. + 1. Select the **Set an end date** check box and set the **End date** and **End time**. *(optional)* + 1. **Total maximum budget** *(Optional)*: Set an amount to expire the coupon when the total discount to be offered to all your customers is reached. For example, if you set ₹10,000 as the total maximum budget, once the budget limit is reached, the coupon code gets expired and is not visible at checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> The coupon will never expire if you do not set an end date or a total maximum budget. +> + + ![Configure the coupon validity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-validity.jpg.md) + 5. **Coupon eligibility**: Create the coupon for **All customers** or **Specific customers**. If you want to create coupons for specific customers: + 1. Click **+ Add Customers**. + ![Configure the coupon eligibility](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-eligibility.jpg.md) + 1. You can upload a list of **Mobile Number** or **Email ID** based on your requirement. + + +> **WARN** +> +> +> **Watch Out!** +> +> If you want to create specific coupons based on the **Email ID**, ensure the **Email** field on checkout is not set as optional and is not hidden from checkout. +> + + 1. Click **Download Sample File** and add the required data to the sample file. Ensure the data is formatted correctly and save the file. + + +> **INFO** +> +> +> **To Upload File:** +> +> - Enter the values in a valid format as given below: +> - Mobile number: +919000090000 +> - Email id: gauravkumar@example.com +> - CSV file should not have any header/column title. +> - Maximum acceptable rows in the file is 1 million. +> - Upload the file in CSV format. Maximum file size supported is 50 MB. +> + + 1. Select **click to upload** and choose the file you want to import. Click **Confirm**. + 6. **Usage restriction**: Set the maximum limit to which a coupon is redeemed in total and per customer. + 1. Select the **Number of times discount can be used in total** check box and set the number. For example, 100. + 1. Select the **Number of times the coupon can be used per customer** check box and set the number. For example, 2. Select **By mobile no.** or **By email id** via which the customer can use the coupon. + ![configure coupon restriction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-restriction.jpg.md) + 7. **Coupon combinations** *(optional)*: You can combine this coupon with various other coupons as follows: + - **Amount off order coupons**: Combine this coupon with a coupon created in the **Amount discounted on order** category to offer a discount on the total order amount and specific products or collections of products. + - **Other Amount off product coupons**: Combine this coupon with other coupons created in the same category to offer multiple discounts on specific products or collections of products. + ![Combine coupons created with other categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magicx-shopify-coupon-prod-combine.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> - You can combine two coupons only if you select the same check box in both coupons. For example: +> +> +> If you want to combine two coupons created in the **Amount discounted on products** category, you must select the **Other Amount off product coupons** check box in both coupons. +> +> +> If you want to combine a coupon from the **Amount discounted on orders** category with a coupon from the **Amount discounted on products** category, you need to select the appropriate check boxes: +> - Select the **Amount off product coupons** check box in the **Amount discounted on orders** category coupon. +> - Select the **Amount off order coupons** check box in the **Amount discounted on products** category coupon. +> +> +> - You cannot combine specific coupons selectively within a category or across categories. For example: +> +> +> If you have coupons B1, B2, and B3 created in the **Amount discounted on products** category and you select the **Other Amount off product coupons** check box for all three, all three coupons will be combined. You cannot choose to combine only B1 and B2 without including B3. +> +> +> If you have coupons B1 and B2 created in the **Amount discounted on products** category and C1 and C2 created in the **Amount discounted on orders** category, and you select: +> - **Other Amount off product coupons** and **Amount discounted on orders** check boxes for B1 and B2. +> - **Other Amount off order coupons** and **Amount off product coupons** check boxes for C1 and C2. +> +> Then B1, B2, C1, and C2 will all be combined. You cannot selectively combine only B1 and C1 if the respective check boxes are selected for all the coupons created. +> +> +> +> - In summary, selecting the check box allows all coupons within the same or different category to be combined, rather than combining specific coupons selectively. +> + + 8. Click **Create and Publish**. + + + +### Buy X Get Y + + In the Buy X Get Y scenario, you must convey to your customers that to use this coupon, both the X and Y products should be present in their cart. For example, if the coupon offers a discount on a cap or provides it for free when you buy a t-shirt, both items must be in your cart for the discount to apply. To discount products based on customer's purchase: + + +> **INFO** +> +> +> **Handy Tips** +> +> Before you begin, follow steps 5 to 7 given above, which are common for all coupon types. +> + + 1. Configure the **Purchase requirements** for X products based on your preference to set eligibility criteria for the customers to avail of the coupon offer. + + + You can set a minimum quantity for customers. For example, if you set the minimum quantity as 3, the customers can use the coupon only if there are 3 or more items in their cart. + ![Configure minimum quantity requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-qt-buy.jpg.md) + + + You can set a minimum purchase amount for customers. For example, if you set the minimum purchase amount as ₹300, the customers can use the coupon only if the cart value is ₹300 and above. + ![Configure minimum amount requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-amt-buy.jpg.md) + + + + 2. Select **Products** or **Collections** to limit the discount to specific products or collections. Click **+ Add Products** or **+ Add Collections** respectively. Select the products or collections based on your requirement and click **Confirm**. You can add multiple products or collections. + + ![Configure coupon products purchased](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-product-config.jpg.md) + + 3. Configure the **Additional products offered** for Y products based on your preference. For example, if you set the purchase requirement as 3 and additional products offered quantity as 2, the customers can buy 3 products and get a discount on 2 additional products. + 4. Select **Products** or **Collections** for Y products as well. Refer to step 2. + ![Configure coupon discount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-discount-offered.jpg.md) + 5. **Discount type**: Select the **Discount type** applicable on Y products. + + + - **Fixed Discount**: In this type, a fixed amount is deducted from the original amount of the Y product. + - **Discount amount**: Enter an amount by which the original price should be reduced. For example, if ₹150 is the flat discount applied, ₹150 is deducted from the original price. + ![configure fixed discount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-fixed-dis.jpg.md) + - **Percentage discount**: In this type, a set percentage of the amount is deducted from the original amount of the Y product. + - **Discount percentage**: The percentage by which the original price should be reduced. For example, if 10% discount is applied, on an order amount of ₹900, ₹90 will be deducted. + ![configure percentage discount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-percentage-dis.jpg.md) + + + In this type, customers can get the Y product for free. + ![configure free discount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-free-discount.jpg.md) + + + 6. **Usage Limit**: Specify the maximum number of Y products that qualify for a discount. For instance, if the customer adds 2 Y products to the cart and you set the usage limit at 1, the discount applies to only 1 of the Y products. + 7. **Coupon validity**: Set the duration for the coupon. + 1. **Active dates**: Set the **Start date** and **Start time**. + 1. Select the **Set an end date** check box and set the **End date** and **End time**. *(optional)* + 1. **Total maximum budget** *(Optional)*: Set an amount to expire the coupon when the total discount to be offered to all your customers is reached. For example, if you set ₹10,000 as the total maximum budget, once the budget limit is reached, the coupon code gets expired and is not visible at checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> The coupon will never expire if you do not set an end date or a total maximum budget. +> + + ![Configure the coupon validity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-validity.jpg.md) + 8. **Coupon eligibility**: Create the coupon for **All customers** or **Specific customers**. If you want to create coupons for specific customers: + 1. Click **+ Add Customers**. + ![Configure the coupon eligibility](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-eligibility.jpg.md) + 1. You can upload a list of **Mobile Number** or **Email ID** based on your requirement. + + +> **WARN** +> +> +> **Watch Out!** +> +> If you want to create specific coupons based on the **Email ID**, ensure the **Email** field on checkout is not set as optional and is not hidden from checkout. +> + + 1. Click **Download Sample File** and add the required data to the sample file. Ensure the data is formatted correctly and save the file. + + +> **INFO** +> +> +> **To Upload File:** +> +> - Enter the values in a valid format as given below: +> - Mobile number: +919000090000 +> - Email id: gauravkumar@example.com +> - CSV file should not have any header/column title. +> - Maximum acceptable rows in the file is 1 million. +> - Upload the file in CSV format. Maximum file size supported is 50 MB. +> + + 1. Select **click to upload** and choose the file you want to import. Click **Confirm**. + 9. Click **Create and Publish**. + + + +### Freebie Item + + Create coupons to offer a free gift to customers when their cart meets specific conditions. For example, offer a free item when the cart value exceeds ₹1,000. + + +> **INFO** +> +> +> **Handy Tips** +> +> Before you begin, follow steps 5 to 7 given above, which are common for all coupon types. +> + + 1. Configure the **Purchase requirements** for products based on your preference to set eligibility criteria for the customers to avail of the coupon offer. + + + You can set a minimum quantity for customers. For example, if you set the minimum quantity as 3, the customers can use the coupon only if there are 3 or more items in their cart. + ![Configure minimum quantity requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-qt-buy.jpg.md) + + + You can set a minimum purchase amount for customers. For example, if you set the minimum purchase amount as ₹300, the customers can use the coupon only if the cart value is ₹300 and above. + ![Configure minimum amount requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-amt-buy.jpg.md) + + + + 2. Select **Products** or **Collections** to limit the discount to specific products or collections. Click **+ Add Products** or **+ Add Collections** respectively. Select the products or collections based on your requirement and click **Confirm**. You can add multiple products or collections. + + ![Configure coupon products purchased](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-product-config.jpg.md) + + 3. **Discount Offered**: Select one product variant to offer as a free gift when the purchase requirements are met: + + +> **WARN** +> +> +> **Watch Out!** +> +> You must maintain sufficient inventory of the free product to ensure the coupon works smoothly and provides a seamless experience for your customers. +> + + + 1. Click **+Add Products**. + ![Select a product to offer free item discount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-freebie-discount.jpg.md) + 1. Select the product of your choice and click **Confirm**. + 4. **Usage Limit**: Select the **Maximum uses per order** check box and specify the maximum number of products that qualify for a discount. For instance, if the customer adds 2 products to the cart and you set the usage limit at 1, the discount applies to only 1 of the products. + 5. **Coupon validity**: Set the duration for the coupon. + 1. **Active dates**: Set the **Start date** and **Start time**. + 1. Select the **Set an end date** check box and set the **End date** and **End time**. *(optional)* + 1. **Total maximum budget** *(Optional)*: Set an amount to expire the coupon when the total discount to be offered to all your customers is reached. For example, if you set ₹10,000 as the total maximum budget, once the budget limit is reached, the coupon code gets expired and is not visible at checkout. + + +> **WARN** +> +> +> **Watch Out!** +> - For Freebie coupons, the budget will be calculated based on the total price of the free products. +> - The coupon will never expire if you do not set an end date or a total maximum budget. +> + + ![Configure the coupon validity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-validity.jpg.md) + 6. **Coupon eligibility**: Create the coupon for **All customers** or **Specific customers**. If you want to create coupons for specific customers: + 1. Click **+ Add Customers**. + ![Configure the coupon eligibility](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-eligibility.jpg.md) + 1. You can upload a list of **Mobile Number** or **Email ID** based on your requirement. + + +> **WARN** +> +> +> **Watch Out!** +> +> If you want to create specific coupons based on the **Email ID**, ensure the **Email** field on checkout is not set as optional and is not hidden from checkout. +> + + 1. Click **Download Sample File** and add the required data to the sample file. Ensure the data is formatted correctly and save the file. + + +> **INFO** +> +> +> **To Upload File:** +> +> - Enter the values in a valid format as given below: +> - Mobile number: `+919000090000` +> - Email id: `gauravkumar@example.com` +> - CSV file should not have any header/column title. +> - Maximum acceptable rows in the file is 1 million. +> - Upload the file in CSV format. Maximum file size supported is 50 MB. +> + + 1. Select **click to upload** and choose the file you want to import. Click **Confirm**. + 7. Click **Create and Publish**. + + +### Show Coupons on Checkout + +After you publish a coupon, navigate to **Coupons** → **Setup** and toggle on **Enable Coupons** option to make the coupons accessible on checkout for your customers. Click **Save settings** post which all the coupons created on Shopify will stop working immediately. + +#### Coupon Statuses + +The table below lists the various coupon states and their descriptions: + + +### States and Descriptions + + + Status | Description + --- + Created | Indicates that the coupon is in the draft stage of the creation process. + --- + Active | Indicates that the coupon is available for customers to use. + --- + Inactive | Indicates that the coupon is manually deactivated. + --- + Expired | Indicates that the coupon expired based on the coupon validity (expiry time). + --- + Published | Indicates that the coupon is currently published for a future activation date. + + + + + +### Manage Coupons + +You can perform the following actions based on your requirement on the Razorpay Dashboard. Navigate to **Checkoout360** → **Coupons** → **All Coupons**. + +- You can activate an inactive coupon if it has not expired. Identify the coupon you want to activate, navigate to the options icon and click **Activate**. +- You can only delete coupons in created and inactive states. Identify the coupon you want to delete, navigate to the options icon and click **Delete**. +- You can only deactivate coupons in active and published states and not delete them. Identify the coupon you want to deactivate, navigate to the options icon and click **Deactivate**. +- If a coupon has expired and you want to offer the coupon again, you can duplicate the coupon. Identify the expired coupon, navigate to the options icon and click **Duplicate**. +- You cannot create multiple coupons with the same coupon code. However, you can reuse a coupon code once a coupon with a similar code expires. +- Once a coupon is active, you cannot edit the **Coupon Code**, **Coupon eligibility file**, **Coupon start date** and **Total Maximum budget**. +- You can edit the **Display this coupon at checkout** configuration in all states except expired. After editing, the coupons will not appear to the customer. diff --git a/llm-content/payments/cod-magic-checkout/shopify/login-with-razorpay.md b/llm-content/payments/cod-magic-checkout/shopify/login-with-razorpay.md new file mode 100644 index 00000000..b02b0750 --- /dev/null +++ b/llm-content/payments/cod-magic-checkout/shopify/login-with-razorpay.md @@ -0,0 +1,169 @@ +--- +title: Login With Razorpay Setup | Razorpay COD & Magic Checkout +heading: Login With Razorpay Setup (SSO) +description: Boost conversions and gain customer insights with Magic SSO. Simplify login and create personalised shopping experiences for your Shopify store. +--- + +# Login With Razorpay Setup (SSO) + +Razorpay Magic SSO (Single Sign-On) offers a seamless login experience, helping you enhance conversions and gain valuable insights into user behaviour. + + +### Advantages + + - **Seamless Login and Personalisation**: OTP-based login with incentives like discounts, enabling auto-login across stores for a frictionless and personalised experience. + - **Expanded Customer Data and Insights**: Higher login rates provide you with deep insights into customer behaviour before checkout, improving engagement and retention. + - **Improved Conversion Rates**: Pre-logged-in users experience smoother checkouts, early coupon discovery, and personalised offers, driving higher sales. + - **Stronger Abandoned Cart Recovery**: Captures abandoned carts before checkout, allowing you to re-engage users who showed purchase intent. + - **Customisable and Compliant**: Fully brandable UI with explicit consent collection for retargeting, ensuring compliance and trust. + + +## Prerequisites + +Follow the steps given below: +1. Log in to the [Shopify Store](https://accounts.shopify.com/store-login) and navigate to **Settings** → **Customer accounts**. +2. In the **Login Links** section, select **Legacy**. +3. Click **Switch to legacy customer accounts** to confirm. + ![Switch to legacy customer accounts on shopify store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-sso-legacy-account.gif.md) +4. On the home page, navigate to **Online Store** → **Preferences** in the **Sales channels** section. +5. Scroll down to the **Spam Protection** section and disable the captcha settings: + - **Enable on contact and comment forms** + - **Enable on login, create account and password recovery pages** +6. Click **Save**. + ![Disable captcha settings on shopify store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-sso-captcha-disable.gif.md) + +## Enable Login with Razorpay Setup + +Set up easy login into your website with single sign-on for your customers across the Razorpay network. To enable login with Razorpay setup: + +1. Log in to the Dashboard navigate to **Magic Checkout** → **Setup & Settings**. +2. Navigate to **Login with Razorpay Setup**. +3. Turn on **Enable Login with Razorpay**. + ![Enable Login with Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-enable.jpg.md) +4. You will be able to view the following options for the SSO widget: + - [Settings](#settings) + - [Customise](#customise) +![Settings and customisation options on SSO](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-settings.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> If you have added a custom domain for the account page, SSO will not work. You must revert to the default domain for the SSO settings to function. +> + +### Settings + +You can configure the following: + + +### Where should we display login screen? + + Select where you want to show the login screen, if the user is not logged in. + + +> **WARN** +> +> +> **Watch Out!** +> +> This is a multi select configuration, if a customer does not login the first time a login screen is dispayed, the login screen will reappear based on the options you select below. +> + + + - **The first page your customer sees**: Useful for encouraging early login during browsing. Select the checkbox and schedule when the login widget shows up (in seconds). For example, show the login widget 5 seconds after the page loads. + - **When a customer adds their very first item to the cart**: Prompt login after the customer adds their first item to the cart. Select the checkbox and schedule when the login widget should show up (in seconds). + - **When a customer begins the checkout process**: Display the login screen when they proceed to checkout, just before payment. Select the checkbox. + - **Make Login mandatory pre-Checkout**: Ensure that users cannot proceed to checkout without logging in. Select the checkbox to enforce mandatory login. + ![Display login screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-display-login.jpg.md) + + + +### Ask consent from customer for marketing communication + + Select how you want to seek permission from your customer for marketing communication. + + - **Single selector for Email, WhatsApp, and SMS**: Use one unified checkbox to capture consent for all three channels together. + - **Separate selectors for Email, WhatsApp, and SMS**: Use separate checkboxes to capture consent for each channel individually. + - **Do not ask for consent**: No explicit consent prompt is displayed for marketing communications. + ![Ask consent from customer for marketing communication](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-ask-consent.jpg.md) + + + +### Collect missing emails from everyone + + You can choose to collect missing emails during the login. + - **Email-Less Customers**: Allow users to log in without providing an email address. + - **Collect Missing Emails (recommended)**: Prompt users to enter their email during login if it is not already available. + ![Collect missing emails](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-collect-emails.jpg.md) + + +After completing the configuration, click **Save Changes** to apply the updates. + +> **INFO** +> +> +> **Handy Tips** +> +> The widget includes a consent prompt for users at the bottom, with terms and conditions listed. +> + +### Customise + +Customise the widget to suit your brand. The default configuration flows from the configurations on checkout settings. + +1. In the **Customise** section, The preview turns into edit mode. You can edit the following: + + + Enter the widget heading as per your preference. + ![Edit widget heading](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-widget-heading.gif.md) + + + Hover over the emoji you want to change and click the edit icon. Press `Command + Control + Space` to open the emoji picker and select your preferred emoji. + ![change emojis](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-emoji.gif.md) + + + Click **Change Background Colour** and choose a colour of your choice. + ![Customise background colour](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-background-colour.gif.md) + + + Click **Change Button Colour** and choose a colour of your choice. + ![Customise button colour](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-button-colour.gif.md) + + + Click **Change Font** and choose a font of your choice from the drop-down list. + ![Change Font](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-font.gif.md) + + +2. Click **Save**. + +> **INFO** +> +> +> **Handy Tips** +> +> - You can switch between mobile and desktop views to preview changes. +> - You can also preview how the widget will appear on **Live Mode**. +> ![Mobile/Desktop view and Live Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-view-mode.jpg.md) +> + +## Login Rewards + +You can offer discounts or coupons to encourage customers to log in to your website. + +> **INFO** +> +> +> **Handy Tips** +> +> This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. Ensure your coupon is created on the [Coupon Engine](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/coupons.md) and include the following details in your request: +> - Coupon code +> - A brief description +> - Any additional message you want to display +> + +### Related Information + +- [Automatic Customer Tagging for Retargeting](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/login-with-razorpay/automation-tags.md) +- [Customer Analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/login-with-razorpay/customer-analytics.md) diff --git a/llm-content/payments/cod-magic-checkout/shopify/login-with-razorpay/automation-tags.md b/llm-content/payments/cod-magic-checkout/shopify/login-with-razorpay/automation-tags.md new file mode 100644 index 00000000..5bfda0c9 --- /dev/null +++ b/llm-content/payments/cod-magic-checkout/shopify/login-with-razorpay/automation-tags.md @@ -0,0 +1,88 @@ +--- +title: Automatic Customer Tagging for Retargeting | Razorpay COD & Magic Checkout +heading: Automatic Customer Tagging for Retargeting +description: Razorpay SSO automatically tags customers in Shopify to enable personalised retargeting campaigns and targeted marketing workflows. +--- + +# Automatic Customer Tagging for Retargeting + +When customers authenticate through [Login with Razorpay (SSO)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/login-with-razorpay.md) on your Shopify store, specific tags are automatically assigned to their profiles. These tags provide automation capabilities that enhance your marketing efforts and improve customer engagement. + + +### Advantages + + - **Zero Additional Cost**: This feature is included with your Magic Checkout integration. + - **Boost Revenue**: Create targeted marketing campaigns that convert more effectively. + - **Time Saving**: Automate customer journeys that would otherwise require manual segmentation. + - **Seamless Integration**: Works with your existing marketing tools and Shopify workflows. + + +## List of Tags + +**Login with Razorpay** automatically applies the following tags to customer profiles in Shopify: + +Tag | Description +--- +**MAGIC_LOGIN_AUTO** | Applied when returning customers are automatically identified without additional input. +--- +**MAGIC_LOGIN_MANUAL** | Applied when customers manually authenticate using an OTP. +--- +**LOGIN_TIMESTAMP** | Records the exact store visit time in ISO format. +--- +**MAGIC_CUSTOMER** | Identifies customers whose accounts were created through Razorpay Magic. + +### Example: Customer Journey with Tags + +These tags enable automation possibilities for your store. Create personalised retargeting flows based on login behaviour: + +- Send WhatsApp messages to customers tagged with `MAGIC_LOGIN_AUTO` who have not completed a purchase in 7 days. +- Offer special promotions to customers with `MAGIC_LOGIN_MANUAL` tags who abandoned their carts. +- Use `LOGIN_TIMESTAMP` to trigger time-sensitive offers after login events. + +#### Example Setup + +This example demonstrates how to create an automated campaign to re-engage customers who have not placed orders recently. + +[Video: https://www.youtube.com/embed/hrXRNUWjIyU] + +Follow the steps given below: + +1. **Customer Identification**: + - Customer logs in (automatically/manually through Magic). + - System automatically assigns `Magic_login` tag. +2. **Segment Creation**: + - Create segment: Customers who have not placed an order since February. + - This segment dynamically updates as customer behaviour changes. +3. **Campaign Rule**: If customer has **Magic_login** tag and customer belongs to **No orders since February** segment then send an **Email**. + +#### Additional Campaign Possibilities + +The system supports unlimited automation combinations based on your requirements. Common use cases include: + + + - Customer identified + viewed specific items → send targeted coupon. + - Customer identified + browsed category multiple times → send category-specific offers. + + + - Customer identified + no order in 3 days → send premium re-engagement message. + - Customer identified + high purchase frequency + recent inactivity → send personalised offers. + + + - Customer identified + 4 website visits in 7 days + abandoned checkout + no order in 5 days → send discount coupon. + - Customer identified + repeated product views + no purchase → send limited-time offer. + + +## Compatible Automation Tools + +Leverage Razorpay Shopify tags with various automation platforms: + +- **Shopify Flow**: Create conditional workflows using the login tags as triggers. +- **Zapier**: Connect to hundreds of apps based on tag events. +- **WhatsApp Business Solutions**: Trigger customer communications based on tag status. +- **Email Marketing Tools**: Create segments based on login behaviour. + +For advanced use cases, combine multiple tags to create targeted customer segments with specific behaviours and attributes. + +### Related Information + +[Customer Analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/login-with-razorpay/customer-analytics.md) diff --git a/llm-content/payments/cod-magic-checkout/shopify/login-with-razorpay/customer-analytics.md b/llm-content/payments/cod-magic-checkout/shopify/login-with-razorpay/customer-analytics.md new file mode 100644 index 00000000..58f3e1fc --- /dev/null +++ b/llm-content/payments/cod-magic-checkout/shopify/login-with-razorpay/customer-analytics.md @@ -0,0 +1,60 @@ +--- +title: Login with Razorpay Analytics | Razorpay COD & Magic Checkout +heading: Customer Analytics +description: Track customer login activity, account creation, and checkout behaviour with the Customer Analytics Dashboard. Export detailed user data to drive targeted marketing and engagement campaigns. +--- + +# Customer Analytics + +When customers authenticate through [Login with Razorpay (SSO)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/login-with-razorpay.md), their activity is captured in the **Customer Analytics** dashboard. It displays login metrics, account creation data, and customer-level insights to help you track engagement, understand user behaviour, and retarget high-intent customers across marketing channels. + + +### Advantages + + - **Understand customer behaviour**: View detailed metrics on login patterns, account creation, and last order placed. + - **Enable targeted outreach**: Identify users who dropped off during checkout and re-engage them via custom campaigns. + - **Drive marketing automation**: Export data seamlessly into third-party tools for automated messaging and performance ads. + - **Consolidate key metrics**: Access all customer login and engagement data in a single, streamlined dashboard view. + + +## Get Started + +Follow the steps given below to view insights about the various activities: + +1. Log in to the Dashboard. +2. Navigate to **Magic Checkout** → **Reports & Analytics** → **Customer Analytics**. + +![SSO Customer Analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-sso-analytics.jpg.md) + +## Dashboard Overview + +The **Customer Analytics** dashboard provides the following widgets: + +- **Total Logged-in Users**: Displays the cumulative number of users who have logged in using [Login with Razorpay (SSO)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/login-with-razorpay.md). This gives you a glipmse of how many unique users have engaged with your store through SSO. +- **New Account Creations**: Displays the number of new customer accounts created via SSO during the selected date range. This helps track how many users are converting from guest visitors to registered customers. +- **Login Trends - Total Login vs New Users**: Displays daily login activity, comparing total logins to new users. This helps identify patterns in user engagement and determine whether returning customers or new visitors are driving traffic. +- **Customer Login Data**: A detailed table of all users who have logged in via SSO. You can view key attributes for each user and use this data to build segments or trigger marketing actions. It includes the following fields: + - **Customer Details**: Customer id. + - **Phone**: Phone number associated with the customer's SSO profile. + - **Email**: Email address used during login or account creation. + - **First Login**: Date when the customer first logged in using **Login with Razorpay**. + - **Last Login**: Most recent date the customer logged in in the selected time range. + - **Frequency**: Total number of times the customer has logged in in the selected time range. This helps identify highly engaged users. + - **UTM Source**: Captures the marketing source (like a campaign or referral link) that led to the user login. + - **Last order**: Date of the customer's most recent successful order. + - **Abandoned Checkout**: Indicates whether the customer initiated checkout but did not complete the payment. This helps in identifying high-intent users who may be open to retargeting. + ![Customer details for retargeting](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-sso-analytics-customer-details.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> - Select a customer id to view a detailed breakdown of their login activity, contact information, order history, and checkout behaviour. +> ![Customer detail view in Login with Razorpay dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-sso-analytics-customer-details-view.jpg.md) +> - Click **Export** to download customer data. You can then upload the file to platforms like Google Ads, Facebook, or a WhatsApp solution to automate retargeting or run manual campaigns. +> + +### Related Information + +[Automatic Customer Tagging for Retargeting](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/login-with-razorpay/automation-tags.md) diff --git a/llm-content/payments/cod-magic-checkout/shopify/magic-checkout.md b/llm-content/payments/cod-magic-checkout/shopify/magic-checkout.md new file mode 100644 index 00000000..80307929 --- /dev/null +++ b/llm-content/payments/cod-magic-checkout/shopify/magic-checkout.md @@ -0,0 +1,29 @@ +--- +title: Magic Checkout | Razorpay COD & Magic Checkout +heading: Magic Checkout +description: Use Magic Checkout to pre-fill shipping info, apply coupons automatically, and reduce RTO rates for a seamless purchasing experience on your Shopify Store. +--- + +# Magic Checkout + +After successfully activating COD & Magic Checkout, enable Magic Checkout to enhance your customers' purchasing experience. + +This feature pre-fills shipping info from saved addresses for faster checkout, automatically applies coupons, and helps predict RTO by identifying non-serviceable addresses, reducing RTO rates. Know more about [RTO Intelligence](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence.md). + +## Enable Magic Checkout + +1. Log in to the Dashboard. +2. Navigate to **Magic Checkout** → **Setup and Settings** → **Checkout Settings**. +3. Turn on **Enable Magic Checkout** to enable Magic Checkout. +4. Additionally, you can also configure the following: + - **Email Field**: Configure email address collection based on your requirement: + - **Hidden**: Customers will not be shown this field on checkout. + - **Mandatory**: Customers must enter their email address to proceed. + - **Optional**: Customers can choose to enter their email address or skip this step. + - **Theme Color**: Enter the HEX code of your brand colour. + - **Mandatory OTP**: Enable secure access with one-time password (OTP) login. +5. Click **Save Settings**. + ![Enable Magic Checkout to activate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-checkout-cod-enable-magic.jpg.md) +6. You will be redirected to the theme page on your Shopify store. Click **Save** in the top right corner to complete the setup. + +You have successfully enabled Magic Checkout. You can test the checkout process on your Shopify store by clicking **Checkout** on your cart page or **Buy Now** on any product page to ensure everything functions smoothly. diff --git a/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence.md b/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence.md new file mode 100644 index 00000000..21f79b2c --- /dev/null +++ b/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence.md @@ -0,0 +1,43 @@ +--- +title: RTO Intelligence | Razorpay COD & Magic Checkout +heading: RTO Intelligence +description: Detect non-serviceable addresses, optimise cash on delivery, and reduce RTO rates with RTO Intelligence. +--- + +# RTO Intelligence + +Use RTO Intelligence to detect incorrect/non-serviceable addresses. This allows COD & Magic Checkout to decide whether to show a particular customer the cash on delivery option based on their buying history, thus increasing the delivery percentage and reducing RTO rates. + +## Steps + +To use RTO intelligence: + +1. Log in to the Dashboard. +2. Navigate to **Magic Checkout** → **Setup and Settings** → **RTO Settings**. +3. Turn on **Enable RTO Intelligence**. This automatically disables the cash on delivery option in case of high-risk customers who often return products on delivery resulting in damaged products during transit, high returns, refund issues, and so on. +4. Click **Enable RTO Intelligence** in the confirmation pop-up modal. + +> **WARN** +> +> +> **Watch Out!** +> +> To enable RTO Intelligence, you must activate Magic Checkout. +> +> +> +> To activate Magic Checkout: +> +> 1. Click **Activate** under **Enable RTO Intelligence**. +> ![Activate Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-cod-activate-magic.jpg.md) +> 1. On the **Checkout Settings** page, turn on **Enable Magic Checkout**. +> 1. Click **Save Settings**. +> ![Enable Magic Checkout to activate RTO Intelligence](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-checkout-cod-enable-magic.jpg.md) +> +> +> +> + +## Next Steps + +Integrate with [Logistics Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners.md) like Shiprocket, Delhivery, iThink Logistics, Unicommerce and ClickPost to easily fetch order status. diff --git a/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners.md b/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners.md new file mode 100644 index 00000000..6e55a646 --- /dev/null +++ b/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners.md @@ -0,0 +1,29 @@ +--- +title: Logistics Partners Integration | Razorpay COD & Magic Checkout +heading: About Logistics Partners Integration +description: Integrate with Logistics Partners like Shiprocket, Delhivery, iThink Logistics, Unicommerce and ClickPost to easily fetch order status. +--- + +# About Logistics Partners Integration + +Your logistics partner is responsible for delivering orders to your customers. You can integrate with Logistics Partners like **Shiprocket**, **Delhivery**, **iThink Logistics**, **Unicommerce** and **ClickPost** with COD & Magic Checkout to easily fetch order status. + +#### Features + +- Get the delivery status update periodically. +- Eliminate the need to send these updates or bulk upload them via Dashboard manually. + +#### Advantages + +- Improve the RTO Intelligence you receive in filtering out high RTO risk COD orders. +- Orders processed will be eligible for RTO Insurance (if opted). + +## Available Logistics Partners + +You can integrate with the following logistics partners: + +- [Shiprocket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/shiprocket.md) +- [Delhivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/delhivery.md) +- [iThink Logistics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/ithink-logistics.md) +- [Unicommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/unicommerce.md) +- [ClickPost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/clickpost.md) diff --git a/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/clickpost.md b/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/clickpost.md new file mode 100644 index 00000000..f1132b14 --- /dev/null +++ b/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/clickpost.md @@ -0,0 +1,22 @@ +--- +title: ClickPost Integration | Razorpay COD & Magic Checkout +heading: Integrate COD & Magic Checkout with ClickPost +description: Integrate ClickPost with Razorpay COD & Magic Checkout to easily fetch delivery status details. +--- + +# Integrate COD & Magic Checkout with ClickPost + +ClickPost is India's largest ecommerce shipping and courier integration platform. It operates as a multi-carrier integration system, a courier tracking system, and an overall logistics solution. + +## Integration Steps + +Follow these steps on the Razorpay Dashboard: + +1. Log in to the Dashboard. +2. Navigate to **Magic Checkout** → **Setup and Settings**. +3. Navigate to **RTO Settings** → **Delivery Tracking** and click **Connect** next to **ClickPost**. +4. Enter the same **Username** and **Key** as provided by ClickPost during the registration. +5. Click **Connect to ClickPost**. + ![Paste the API Keys on the Razorpay Dashboard and connect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-logistics-clickpost-creds.jpg.md) + +You have successfully integrated COD & Magic Checkout with ClickPost. In case you want to disconnect ClickPost, click **Disconnect**. diff --git a/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/delhivery.md b/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/delhivery.md new file mode 100644 index 00000000..6fe3c6bc --- /dev/null +++ b/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/delhivery.md @@ -0,0 +1,22 @@ +--- +title: Delhivery Integration | Razorpay COD & Magic Checkout +heading: Integrate COD & Magic Checkout with Delhivery +description: Integrate Delhivery with Razorpay COD & Magic Checkout to easily fetch delivery status details. +--- + +# Integrate COD & Magic Checkout with Delhivery + +Delhivery is an Indian supply chain and logistics company aiming to build an operating system for commerce. + +## Integration Steps + +Follow these steps on the Razorpay Dashboard: + +1. Log in to the Dashboard. +2. Navigate to **Magic Checkout** → **Setup and Settings**. +3. Navigate to **RTO Settings** → **Delivery Tracking** and click **Connect** next to **Delhivery**. +4. Send an email to the Delhivery team at `de.onb@delhivery.com` requesting the **Production Authentication Token**. +5. Enter the token once you receive it and click **Connect**. + ![Enter the production authentication token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-delhivery-connect.jpg.md) + +You have successfully integrated COD & Magic Checkout with Delhivery. In case you want to disconnect Delhivery, click **Disconnect**. diff --git a/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/ithink-logistics.md b/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/ithink-logistics.md new file mode 100644 index 00000000..863b846b --- /dev/null +++ b/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/ithink-logistics.md @@ -0,0 +1,34 @@ +--- +title: iThink Logistics Integration | Razorpay COD & Magic Checkout +heading: Integrate COD & Magic Checkout with iThink Logistics +description: Integrate iThink Logistics with Razorpay COD & Magic Checkout to easily fetch delivery status details. +--- + +# Integrate COD & Magic Checkout with iThink Logistics + +iThink logistics is a third-party logistics service provider that makes your ecommerce shipping process easier. + +## Integration Steps + + +### 1. Copy the API Keys + + 1. Log in to the [iThink Logistics Dashboard](https://my.ithinklogistics.com/login) and hover over the settings icon on the bottom left. + 2. Click **API Key**. + ![Navigate to API keys section on the iThink logistics Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-logistics-ithink.jpg.md) + 3. Copy the **API Key** and **Secret Key**. + ![Copy the API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-logistics-ithink-keys.jpg.md) + + + +### 2. Enable iThink Logistics on Razorpay Dashboard + + 1. Log in to the Dashboard. + 2. Navigate to **Magic Checkout** → **Setup and Settings**. + 3. Navigate to **RTO Settings** → **Delivery Tracking**. + 4. Click **Connect** next to **iThink Logistics**. + 5. Paste the **API Key** and **Secret Key** copied from the iThink Logistics Dashboard. + 6. Click **Connect to iThink Logistics**. + ![Paste the API Keys on the Razorpay Dashboard and connect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-logistics-ithink-creds.jpg.md) + + You have successfully integrated COD & Magic Checkout with iThink Logistics. In case you want to disconnect iThink Logistics, click **Disconnect**. diff --git a/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/shiprocket.md b/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/shiprocket.md new file mode 100644 index 00000000..793c832e --- /dev/null +++ b/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/shiprocket.md @@ -0,0 +1,44 @@ +--- +title: Shiprocket Integration | Razorpay COD & Magic Checkout +heading: Integrate COD & Magic Checkout with Shiprocket +description: Integrate Shiprocket with Razorpay COD & Magic Checkout to easily fetch delivery status details. +--- + +# Integrate COD & Magic Checkout with Shiprocket + +Shiprocket is India's leading logistics software, offering automated shipping solutions. + +## Integration Steps + + +### 1. Configure Settings on Shiprocket Dashboard + + +> **INFO** +> +> +> **Handy Tips** +> +> This step is required only if you are generating the API credentials for the first time. If you have already generated the API credentials, please skip this step. +> + + 1. Log in to the [Shiprocket Dashboard](https://app.shiprocket.in/login) and navigate to **Setup and Settings** → **API** on the bottom right. + 2. Click **Configure**. + ![Navigate to Configure section on the Shiprocket Dashboard.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shiprocket-login.jpg.md) + 3. In the **API User** section, click **Create an API User**. + 4. Enter your **Email ID** and **password**. + 5. Click **Generate API Credential**. + ![Enter the credentials and generate the API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shiprocket-api.jpg.md) + + + +### 2. Enable Shiprocket on Razorpay Dashboard + + 1. Log in to the Dashboard. + 2. Navigate to **Magic Checkout** → **Setup and Settings**. + 3. Navigate to **RTO Settings** → **Delivery Tracking** and click **Connect** next to **Shiprocket**. + 4. Enter your **API User Email ID** and **API User Password** generated on the Shiprocket Dashboard. + 5. Click **Connect to Shiprocket**. + ![Enter your API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shiprocket-credentials.jpg.md) + + You have successfully integrated COD & Magic Checkout with Shiprocket. In case you want to disconnect Shiprocket, click **Disconnect**. diff --git a/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/unicommerce.md b/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/unicommerce.md new file mode 100644 index 00000000..73990629 --- /dev/null +++ b/llm-content/payments/cod-magic-checkout/shopify/rto-intelligence/logistics-partners/unicommerce.md @@ -0,0 +1,30 @@ +--- +title: Unicommerce Integration | Razorpay COD & Magic Checkout +heading: Integrate COD & Magic Checkout with Unicommerce +description: Integrate Unicommerce with Razorpay COD & Magic Checkout to easily fetch delivery status details. +--- + +# Integrate COD & Magic Checkout with Unicommerce + +Unicommerce eSolutions is India's largest ecommerce-focused SaaS technology supply chain platform. It is designed to meet the business needs of ecommerce-focused across various industries. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you have a Unicommerce account with an **Admin** role and Shopify access. If you do not have access, follow [these steps](https://documentation.unicommerce.com/docs/faq-uniware.html#5-how-to-give-facility-access-to-a-user) to set it up. +> + +## Integration Steps + +Follow these steps on the Razorpay Dashboard: + +1. Log in to the Dashboard. +2. Navigate to **Magic Checkout** → **Setup and Settings**. +3. Navigate to **RTO Settings** → **Delivery Tracking** and click **Connect** next to **Unicommerce**. +4. Enter the same **Username** and **Password** as your Unicommerce admin account login credentials. +5. Enter **Tenant** from the Unicommerce domain URL. For example, if the Unicommerce Dashboard URL after you log in is `acmecorp.unicommerce.com`, **acmecorp** is the tenant. + ![Paste the API Keys on the Razorpay Dashboard and connect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-logistics-unicommerce-creds.jpg.md) + +You have successfully integrated COD & Magic Checkout with Unicommerce. In case you want to disconnect Unicommerce, click **Disconnect**. diff --git a/llm-content/payments/cod-magic-checkout/shopify/shipping-options.md b/llm-content/payments/cod-magic-checkout/shopify/shipping-options.md new file mode 100644 index 00000000..41d98a9e --- /dev/null +++ b/llm-content/payments/cod-magic-checkout/shopify/shipping-options.md @@ -0,0 +1,49 @@ +--- +title: Shipping Options | Razorpay COD & Magic Checkout +heading: Shipping Options +description: Configure Shipping options on your Shopify store. +--- + +# Shipping Options + +You can configure the shipping rates and create shipping zones on your Shopify Dashboard. + +Follow the steps given below: + +1. Log in to the [Shopify Store](https://accounts.shopify.com/store-login) and navigate to **Settings** → **Shipping and delivery**. + ![Shopify shipping](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-shipping.jpg.md) +1. Create a profile under general or custom shipping rates and add the required details. + - **General Shipping Rates**: Create a profile for all products. With this, you charge a standard shipping rate on certain products. + - **Custom Shipping Rates**: Create an individual shipping rate for a certain product. + + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot list the same products under general and custom shipping rates. You can list a product under only one shipping rate. +> + + ![Profile for general or custom shipping rates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-profile.jpg.md) +1. After creating a profile, click **Manage** to navigate to the shipping settings under that profile. + ![Edit shipping settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-manage.jpg.md) +1. Click **Create shipping zone** and add zones of your choice. Click **Done**. + ![Shipping zones](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-shipping-zone.jpg.md) +1. Click **Add rate** to add the shipping rates. YYou can create multiple shipping rates or options to display at checkout. + ![Add shipping rates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-add-rate.jpg.md) +1. Select **Set up your own rates**. Follow the steps given below: + 1. Enter your **Rate name**, for example, Standard Shipping Charges. Customers will view this at Checkout. + 1. Enter the **Price**. + 1. Add conditions if required. You can add conditions based on **item weight** or **order price**. Enter the required details. + 1. Click **Done**. + ![Set up your own rates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-own-rate.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> Ensure all shipping methods from Shopify are listed on the Dashboard. In **COD Settings**, click **Sync Again** to update and sync the latest shipping methods from Shopify. +> ![Configure COD for shopify shipping methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-config-cod.jpg.md) +> diff --git a/llm-content/payments/customers.md b/llm-content/payments/customers.md new file mode 100644 index 00000000..9d4c131f --- /dev/null +++ b/llm-content/payments/customers.md @@ -0,0 +1,46 @@ +--- +title: Create Customers +heading: About Customers +description: Create and edit Customers from the Razorpay Dashboard or using APIs. +--- + +# About Customers + +You can create customers with basic details such as name and contact details and use them for various Razorpay solution offerings. You can perform the following actions using the Dashboard: +- [Create a customer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md#create-a-customer) +- [Edit a customer's details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md#edit-customer-details) + +## Create a Customer + +Watch this video to see how to create a customer from the Dashboard. + +[Video: https://www.youtube.com/embed/8xys_p8-Vzg?si=D1_IUXuElhCIMtoT] + +To create a customer from the Dashboard: +1. Log in to the Dashboard. +1. Navigate to **Customers**. +1. Click **+ New Customer**. +1. Fill details and click **Save**. + +## Edit Customer Details + +Watch this video to see how to edit the details of an existing customer from the Dashboard. + +[Video: https://www.youtube.com/embed/K_MGRI9X_Kg] + +To edit a customer from the Dashboard: +1. Log in to the Dashboard. +1. Navigate to **Customers**. +1. Select the customer you want to edit. +1. Click **Edit** available under **Actions**. +1. Edit details and click **Save**. + +## APIs +You can do the following using APIs: +- [Create a Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers/create.md) +- [Edit Customer Details API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers/edit.md) +- [Fetch All Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers/fetch-all.md) +- [Fetch Customers by ID API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers/fetch-with-id.md) + +### Related Information +[Customer Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers/customer-refunds.md) diff --git a/llm-content/payments/customers/customer-refunds.md b/llm-content/payments/customers/customer-refunds.md new file mode 100644 index 00000000..07192a88 --- /dev/null +++ b/llm-content/payments/customers/customer-refunds.md @@ -0,0 +1,276 @@ +--- +title: Track Refunds with Razorpay +heading: Customer Refunds +description: Request refund if you are a customer of businesses using Razorpay. Track refunds using payment, order, booking or refund id or raise a dispute chargeback. +--- + +# Customer Refunds + +If you have made payments to a business that uses Razorpay and are looking for a refund: + + + + + +> **INFO** +> +> +> **Handy Tips** +> +> Razorpay is a payment solution provider and **cannot make refunds on behalf of the business**. +> + +Watch this video to see how to request for refund. + + - **Customer Refunds (In English)**: Watch this video to know about customer refunds for payments made using Razorpay(In English). + + - **Customer Refunds (In Hindi)**: Watch this video to know about customer refunds for payments made using Razorpay(In Hindi). + +## 1. Contact Business for Refund + +If you have not received the products or services or are dissatisfied with the products or services received and want a refund, contact the business and request for a refund. + + +### If you have made the payment on the business website or app, you can find the support details on their contact us/support page. + + ![Refund Id tracking - Sample Contact Us Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/customer-refunds-contact-us-website.jpg.md) + + + +### If you have made payments using a Payment Link or a Payment Page, you can view the support details on the same page. + + + ![Refund Id tracking - Sample Support Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/customer-refunds-payment-page-contact-us.jpg.md) + + +### Refund Communication + +If a customer is asking for a refund, the banking partner provides a unique reference number (either RRN, ARN or UTR) when a refund is processed. The customer can use this reference number to track the refund status with the bank. + +As a customer, you will be notified of the specific payment to be refunded in 7-10 working days. Razorpay sends the following email communications for refunds: + + +### Refund Mailer + + After the business processes the refund, Razorpay sends you an email with the refund id and a unique reference number provided by the bank (ARN, RRN or UTR). This mail also contains the [Razorpay link for refund tracker](#track-your-refund-using-refund-tracker). + + ![Refund Mailer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/Normal_refund_mailer_customer.jpg.md) + + + +### ARN Update Mailer + + If you want a refund for a credit card payment, the banking partner will send an ARN to Razorpay. Razorpay sends you an email with this ARN number. You can use this ARN number to trace your transaction with your card issuer. + + ![ARN Update Mailer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/normal_arn_mailer_customer.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> Razorpay sends the **Refund** and **RRN/ARN Update** emailers only if the customer email is passed to us. +> + +## 2. Track Your Refund Using Refund Tracker + +After a business initiates the refund, it can take 7-10 days to reach your account, depending on your bank. Read blog about [why refunds take time.](https://razorpay.com/blog/why-do-refunds-take-time/) + +You can use our tracking tool to check the status of the refund. Watch this video to see how to track refunds using the Refund Tracker. + +[Video: https://www.youtube.com/embed/FzvxNsL_ZAA?si=b7wj7ZtyqiuFIjBs] + + +### To track your refund: + + 1. Visit [Razorpay Refund Tracker](https://razorpay.com/support/#refund) and click **Customer**. + ![Refund Tracker](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/refund-tracker.jpg.md) + 2. In the **Track Payments** form on the right, enter one of the following IDs: + - Payment ID + - Refund ID + - Order ID + - Booking ID + You can find the relevant ID in the payment confirmation email or booking history. + ![Refund Id tracking - Track Payments form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/customer-refund.jpg.md) + 3. Perform the CAPTCHA step and click **Check Status**. The refund details are displayed as shown below: + ![Refund Id tracking - Sample Refund Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/tracking-status.jpg.md) + + +## 3. Raise a Dispute (Chargeback) + +If you are unable to contact the business or their response is not satisfactory, contact your bank to raise a dispute. + +A customer can raise a dispute against a particular transaction and contact the bank through which the customer has made the payment. The bank will raise the dispute with Razorpay. We will work with the bank and assist in resolving the issue amicably. + +> **INFO** +> +> +> **Handy Tips** +> - Please wait at least 7 days from the date of payment to escalate a dispute for an item not received. Ensure that you have given the business enough time before opening a dispute. +> - Please provide complete details about the issue to help us decide on the best solution to resolve it. +> + + +## Frequently Asked Questions (FAQs) + + +### 1. What are some tips to ensure hassle-free transactions with a business? + + Follow these best practices as a customer to ensure hassle-free transactions: + 1. Understand the product/service description before purchasing. + 2. Review the policies for return, refund and cancellation on the business' website. + 3. Only enter details on `https`-secure sites and keep your antivirus software and browsers updated. + 4. After receiving the product, contact the manufacturer for warranty-related defects, if any. + 5. Wait for 5-7 business days for issues related to bank processing and refunds. + + + +### 2. What should I do if I have not received my refund even after 10-12 working days? + + Ideally, refunds are credited in 10-12 working days. In case you have not received your refund, check the refund status in the [ Razorpay Refund Tracker](https://razorpay.com/support/#refund/). Know more about [tracking your refund using Refund Tracker](#2-track-your-refund-using-refund-tracker). + + + +### 3. How do I check my order status after the amount is deducted from my account? + + Upon a successful transaction, you will receive a confirmation email from Razorpay Payment Aggregator and only facilitate business with online payments. For the status of the order, contact the business. + + + +### 4. How do I cancel my order? + + All the queries related to full or partial cancellation of orders should be routed to the business. Razorpay is a payment solution provider and does not ship or dispatch orders. Please get in touch with business for queries regarding cancellation or returns. + + After the business cancels the order and initiates the refund, the amount will be credited to your account in 7-10 days. You can check the status of your refund using the [Razorpay Refund Tracker](https://razorpay.com/support/#refund/). Know more about [tracking your refund using Refund Tracker](#2-track-your-refund-using-refund-tracker). + + + +### 5. Can I file a complaint if I have not received my order? + + We suggest you wait for 7-10 business days for physical goods and one business day for digital goods. If you have still not received the items, or if the items received are materially different, defective, or damaged, contact the business to resolve the issue. + + Include the following details while sending an email to the business: + - Date of transaction. + - Amount of transaction. + - Order ID shared by the business. + - Payment ID shared by Razorpay(pay_9uxxxxxxx34z). + - Description of the problem. + + If the business does not respond to your emails and phone calls within 3-5 working days, contact your bank to [raise a dispute](#raise-a-dispute-chargeback). + + + +### 6. How do I report a fraudulent transaction? + + Please [raise a Razorpay support request](https://razorpay.com/contact/) with the transaction details and our team will investigate this further. + + + +### 7. I do not recognise the transaction that I have been charged for. Can you help me? + + Please raise a [support request](https://razorpay.com/contact/#request) and provide the following details: + - A common email id you use for making online transactions. + - Amount and date of debit. + - Screenshot of the debit, in case it was a netbanking or wallet transaction. + - The last four digits of the card were used in case this was a card transaction. + + We will get back to you at the earliest. + + + +### 8. I have done duplicate transactions towards the same order/service. How do I get a refund? + + Razorpay is a Payment Aggregator and only facilitate the seller with online payments. We request you to contact the seller with the transaction details for a refund. + + + +### 9. What should I do if I do not receive a payment confirmation mail from Razorpay? + + You can raise a [support request](https://razorpay.com/contact/#request). + 1. Select the category as `I am a customer`. + 2. Choose the nature of your request. + 3. Provide your email id, the screenshot of the debit and transaction ID received from the seller. + + We will get back to you at the earliest. + + + +### 10. Why does it take so long for a refund to be credited to my account? + + Several factors and processes are involved during a refund. Hence, we recommend waiting for 10-12 working days. Know more about [why refunds take time](https://razorpay.com/blog/why-do-refunds-take-time/). + + + +### 11. Can I share my card details or passwords with the Razorpay support staff? + + No, do not share your card details, CVV number, OTP, PIN, UPI PIN, or Netbanking password with anyone, including Razorpay support staff. + + Only in the rare case of a dispute does Razorpay support ask you for the first six and last four digits of your card number to locate a particular payment id. + + + +### 12. What should I do if I have not received a refund confirmation mail from Razorpay? + + After every successful refund, you receive a refund confirmation email from Razorpay. Check between 7-10 days for the refund to reflect. + + Contact the business if you have not received the email, as only businesses can initiate refunds. + + + + +### Related Information + +[Why do refunds take a long time](https://razorpay.com/blog/why-do-refunds-take-time/) + + with the transaction details and our team will investigate this further. + + + +### 7. I do not recognise the transaction that I have been charged for. Can you help me? + + Please raise a request with the Razorpay and provide the following details: + - A common email id you use for making online transactions. + - Amount and date of debit. + - The last four digits of the card were used in case this was a card transaction. + + We will get back to you at the earliest. + + + +### 8. I have done duplicate transactions towards the same order/service. How do I get a refund? + + Razorpay is a Payment Aggregator and only facilitate the seller with online payments. We request you to contact the seller with the transaction details for a refund. + + + +### 9. What should I do if I do not receive a payment confirmation mail from Razorpay? + + You can raise a : + 1. Select the category as `I am a customer`. + 2. Choose the nature of your request. + 3. Provide your email id, the screenshot of the debit and transaction ID received from the seller. + + We will get back to you at the earliest. + + + +### 10. Why does it take so long for a refund to be credited to my account? + + Several factors and processes are involved during a refund. Hence, we recommend waiting for 10-12 working days. + + + +### 11. Can I share my card details or passwords with the Razorpay support staff? + + No, do not share your card details, CVV number, OTP or PIN with anyone, including Razorpay support staff. + + Only in the rare case of a dispute does Razorpay support ask you for the first six and last four digits of your card number to locate a particular payment id. + + + +### 12. What should I do if I have not received a refund confirmation mail from Razorpay? + + After every successful refund, you receive a refund confirmation email from Razorpay. Check between 7-10 days for the refund to reflect. + + Contact the business if you have not received the email, as only businesses can initiate refunds. diff --git a/llm-content/payments/dashboard.md b/llm-content/payments/dashboard.md new file mode 100644 index 00000000..a0e972c1 --- /dev/null +++ b/llm-content/payments/dashboard.md @@ -0,0 +1,252 @@ +--- +title: About Dashboard +description: Overview of the Razorpay Dashboard home page with key features including payments overview, insights, and product recommendations for managing your payment operations. +--- + +# About Dashboard + +The Dashboard Home page serves as your central command center for managing payment operations on Razorpay. It provides a comprehensive overview of your account status, recent payment activity, key insights and personalised product recommendations to help you optimise your payment infrastructure. + +The Dashboard offers a wide range of features, such as: +- **Analytics** and **real-time charts** that provide valuable insight into your business performance. +- List of **recent activities** that may require your action. +- **Configure, operate, and manage** your Payment Gateway (PG) account and other Razorpay products. +- An overview of recent **payments, settlements and refunds**. + +![Razorpay Dashboard Home page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-dashboard-in-home.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> +> +> You must have a Razorpay account to access the Dashboard. Do not have a Razorpay account? [Set up a Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md). +> +> +> +> Dashboard account to access the Dashboard. +> +> +> +> +> +> + +## Key Sections of Payments Dashboard Home Page + + +### AI-Powered Assistant + + The dashboard features an AI assistant that greets you personally and provides contextual help. You can ask questions or search for anything related to your Razorpay account using the search bar. The assistant also offers quick actions like: + - Show me all recent failed payments + - Check the status of (refund ID / RRN) + - Lookup payment from screenshot + + + +### Account Overview + + The overview section displays critical account information at a glance: + - **Current Balance**: Shows your available account balance. + - **Last Settlement**: Displays recent settlement information including amount and processing status. + - **Settlement Details**: Shows when funds were deposited to your bank account with links to view all settlements. + + + +### Key Updates + + This section highlights important account updates and new features: + - **Feature Announcements**: Notifications about newly enabled features like international payments. + - **Action Items**: Important updates that may require your attention + + + +### Payments Overview + + A comprehensive view of your payment activity over a selected time period (default: last 7 days): + - **Collected Amount**: Total amount successfully collected. + - **Refunds**: Total amount refunded to customers. + - **Orders**: Total number of orders processed. + - **Interactive Chart**: Visual representation of payment trends with date-wise breakdown. + - **Time Period Selection**: Customisable date range picker for detailed analysis. + + + +### Top Insights + + Key performance metrics displayed in an easy-to-scan format: + - **Payment Count**: Total number of payment attempts in the selected period. + - **Payment Failure Count**: Number of failed payment attempts. + - **Refund Count**: Total refunds processed. + - **Refund Failure Count**: Number of failed refund attempts. + Each metric includes a **View Details** link for deeper analysis. + + + +### Payment Method Split + + Visual breakdown of payment methods used by customers: + - **Credit Cards**: Number of credit card transactions. + - **UPI**: UPI transaction count. + - **Netbanking**: Netbanking payment attempts. + - **Others**: Other payment methods (wallets and so on.) + Displays both numerical data and a pie chart visualisation for quick understanding of customer payment preferences. + + + +### Products for You + + Personalised product recommendations based on your business needs: + - **Cross Border Payments**: Accept payments from 200+ countries with multi-currency support (USD, EUR, AED, SGD) + - **QR Code**: Generate branded QR codes for contactless payments. + - **Payment Links**: Create shareable payment links for email, text and social media. + - **Razorpay POS**: Seamless payment acceptance solutions for physical stores. + Each product card includes brief descriptions and visual previews of the functionality. + + +## Key Tabs of Payments Dashboard + +Following are the key tabs of the Payments Dashboard. + + +### Transactions + + Given below are the tabs present under Transactions and the supported actions: + + + Tab | Actions + --- + Payments | - [Manually capture a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments) +- [Issue full and partial refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#issue-a-refund) +- [View details of a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#view-payment-details) + + --- + Refunds | [View details of a refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/view.md) + --- + Orders | [View details of an order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders/dashboard.md#view-order-details) + --- + Disputes | [View a list of disputes raised](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/dashboard.md#view-disputes) + --- + Success Rate | [View Success Rate of payments and its details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/success-rate-analytics.md) + + + + +### Settlements + + Given below are the actions supported for Settlements: + - [Enable a Settlement placed on Hold](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/dashboard.md#enable-settlements-placed-on-hold) + - [View details of a settlement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/dashboard.md#view-settlements-using-dashboard) + - [View detailed breakup of a settlement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/dashboard.md#settlements-break-up-description) + + + +### Reports + + Given below are the actions supported for [Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md): + - [Download a Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md#download-reports) + - [Increase report generation limit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md#limit-on-reports) + + + +### Account & Settings + + Given below are the [Account & Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md) sections and supported actions: + + + Tabs and Actions + --- + **Website and app settings** + + - [Add or update business website/app details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/business-website-details.md) +- [Generate or regenerate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md) +- [Configure Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/webhooks.md) + + --- + **Business settings** + + - [Update account details such as email, phone and more](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/account-details.md) +- [View business details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/business-details.md) +- [Add or update customer support details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/customer-support-details.md) +- [View account activation details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/activation-details.md) +- [Raise support ticket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/support-tickets.md) +- [Manage team](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md) + + --- + **Payments and refunds** + + - [View and add credits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/credits.md) +- [View and add balances](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/balances.md) +- [Set reminders for Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) +- [Update transaction limits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/transaction-limits.md) +- [Configure payments capture and refund settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/capture-refund.md) + + --- + **Bank accounts and settlements** + + - [Update bank account details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/bank-account-details.md) +- [View settlement details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/settlement-details.md) + + --- + **Notification Settings** + + - [Configure email settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/email-sms-whatsapp.md#manage-email-notifications) +- [Configure SMS settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/email-sms-whatsapp.md#manage-sms-notifications) +- [Configure WhatsApp settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/email-sms-whatsapp.md#manage-whatsapp-notifications) + + --- + **Checkout Settings** + + - [Configure branding-related settings for Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-styling.md) +- [Configure flash checkout settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout) +- [Configure mandate summary page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#mandatory-summary-page) +- [Check eligibility for Razorpay Trusted Business badge](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features/trusted-business.md) + + --- + **International Payment Settings** + + - [Generate FIRS certificate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/firs.md) +- [Configure international payment codes (purpose code, IEC code, HS code)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/international-payment-codes.md) + + --- + **Payment Methods** + + - [Request for and manage payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md) + + + + + +### Payments Products + + Given below are the payments products and the supported actions: + + + Product | Actions + --- + Offers | [Create and manage offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md) + --- + Invoices | [Create and manage Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/create.md) + --- + Payment Button | [Create and manage Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) + --- + Payment Links | [Create and manage Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md) + --- + Route | [Create linked accounts and transfer funds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route.md#get-started) + --- + Subscriptions | [Create and manage Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) + --- + Smart Collect | [Create and manage Virtual Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) + + + + + + +### Customers + + Given below are the actions supported for Customers: + - [Create a Customer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md#create-a-customer) + - [Edit Customer Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md#edit-customer-details) diff --git a/llm-content/payments/dashboard/account-settings.md b/llm-content/payments/dashboard/account-settings.md new file mode 100644 index 00000000..21a2795d --- /dev/null +++ b/llm-content/payments/dashboard/account-settings.md @@ -0,0 +1,180 @@ +--- +title: About Account & Settings +description: Check the various Account & Settings options on the Razorpay Dashboard. +--- + +# About Account & Settings + +You can perform multiple configurations using **Account & Settings** on the Dashboard. + +![Settings on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-new-accounts-settings.jpg.md) + + 1. Log in to the Dashboard. + 2. Click **Account & Settings** and click **Edit** next to **Phone number**. + 3. Enter the **2-Step Verification** code sent to your registered email. + 4. Enter the new mobile number and click **Continue**. + 5. Enter the OTP sent to your new number and click **Confirm**. + + You have successfully changed your registered phone number. + + + +## Update Login Email + +You can change your registered email address after full activation of your account. You can either change it from your profile or navigate to [account details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/account-details.md#update-login-email). + + +### Update login mail: + + You can change your registered email address after full activation of your account. + + 1. Log in to the Dashboard. + 2. Click **Account & Settings** and click **Edit** next to **Login email**. + 3. Enter the new email address select the check box to receive all the updates on the new email id. Click **Continue**. + 4. A verification email is sent to your new email id. Open the email and complete the verification process. + 5. Click **Okay, got it**. + + You have successfully changed your registered email address. + + + +### Update password: + + 1. Log in to the Dashboard. + 2. Click **Account & Settings** and click **Edit** next to **Password**. + 3. Enter the **2-Step Verification** code sent to your registered mobile number. + 4. Enter your current password and press the enter/return key. + 5. Enter the new password and press the enter/return key. + 6. Re-enter your new password and click **Change Password**. + + You have successfully changed your password. + + + +### Enable 2-step verification: + + 1. Log in to the Dashboard. + 2. Navigate to the **Account & Settings**. + 3. Enable the **2-Step Verification to the team** option. + 4. Enter the OTP sent to your registered mobile number. (This step is not required if you had already performed OTP verification during login.) + 5. Enter your account password and confirm. + + You have successfully enable 2-step verification for your account. + + +## Settings and Actions + +Following are the settings available under **Account & Settings** and the actions you can perform: + + + + - [Add or update business website/app details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/business-website-details.md) + + - [Generate or regenerate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md) + + - [Configure Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/webhooks.md) + + + + + + + - [Update account details such as email, phone and more](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/account-details.md) + + + - [View business details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/business-details.md) + + - [Add or update customer support details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/customer-support-details.md) + + + + - [View account activation details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/activation-details.md) + + + + - [View GST details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/gst-details.md) + + + - [Raise support ticket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/support-tickets.md) + + - [Manage team](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md) + + + + + + + + - [View and add credits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/credits.md) + + + - [View and add balances](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/balances.md) + + - [Set reminders for Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) + + - [Update transaction limits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/transaction-limits.md) + + - [Configure payments capture and refund settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/capture-refund.md) + + + + + + + - [Update bank account details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/bank-account-details.md) + + - [View settlement details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/settlement-details.md) + + + + + + + + - [Configure email settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/email-sms-whatsapp.md#manage-email-notifications) + + - [Configure SMS settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/email-sms-whatsapp.md#manage-sms-notifications) + + - [Configure WhatsApp settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/email-sms-whatsapp.md#manage-whatsapp-notifications) + + + + + + + + + - [Checkout Styling](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-styling.md) + + - [Checkout Features](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md) + + - [Payment Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-configuration.md) + + + + + + + + + - [Generate FIRS certificate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/firs.md) + + - [Configure international payment codes (purpose code, IEC code, HS code)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/international-payment-codes.md) + + + + + + + + + - [Manage payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md) + + + + + + +### Related Information +- [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard.md) +- [Frequently Asked Questions (FAQs)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/faqs.md) diff --git a/llm-content/payments/dashboard/account-settings/account-details.md b/llm-content/payments/dashboard/account-settings/account-details.md new file mode 100644 index 00000000..eae678ea --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/account-details.md @@ -0,0 +1,115 @@ +--- +title: Account Details +description: Steps to update account details on the Razorpay Dashboard. You can update display name, profile name, email and phone number. +--- + +# Account Details + +You can update account details such as display name, profile name, email and phone number on the Dashboard. + +## Update Display Name + +You can update the business display name on the Dashboard. The new display name will reflect immediately on your Dashboard after you update it. It will be visible to you and your team on the Dashboard. + + +### To update the display name: + + 1. Log in to the Dashboard. + 2. Click **Account & Settings** and navigate to **Account details** under **Business Settings**. + 3. Click the edit icon next to **Display Name**. + 4. Enter the new display name and click **Update**. + + +## Update Profile Name + +You can update the profile name on the Dashboard. The new profile name will reflect immediately on your Dashboard after you update it. It will be visible to you in your profile section + + +### To update the profile name: + + 1. Log in to the Dashboard. + 2. Click **Account & Settings** and navigate to **Account details** under **Business Settings**. + 3. Click the edit icon next to **Name**. + 4. Enter the new profile name and click **Update**. + + +## Update Phone Number + +You can update the phone number on the Dashboard. The new phone number will reflect on your Dashboard only after OTP-verification. + + +### To update the phone number: + + 1. Log in to the Dashboard. + 2. Click **Account & Settings** and navigate to **Account details** under **Business Settings**. + 3. Click the edit icon next to **Phone Number**. + 4. Enter the OTP sent to the currently registered phone number and click **Confirm**. + 5. Enter the new phone number and click **Continue**. + + Proceed with the phone number confirmation process to complete the update. + + +## Update Login Email + +You can update the login email from the Dashboard. You can: +- [Update your own email id](#update-your-email). +- [Add a team member's email id](#add-a-team-member-s-email). + +**Handy Tips** + +If you add a non-user's email id, they will have to sign up for an account. + +### Update Your Email + +As an account owner, you can update your login email from the Dashboard. + +**Example** + +You can replace your current email id with another email. For example, if you earlier had signed up with the email id `info@acmecorp.in`, you can now update it as `gaurav.kumar@acmecorp.in`. + + +### To update the login email: + + + + + 1. Log in to the Dashboard. + 1. Click **Account & Settings** and navigate to **Account details** under **Business Settings**. + 1. Click the edit icon next to **Email**. + ![Update email id from Razorpay Dashboard profile](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-profile-update-email.jpg.md) + 1. Complete the 2-factor authentication process. + 1. On the pop-up page, enter the new email id. Re-enter the email id. Select the check box if you want Razorpay to send all communication details to this email id. + ![enter new email id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-profile-email-id-repeat.jpg.md) + 1. A verification email is sent to your new email id. Open the email and complete the verification process. + ![Complete verification process from your email id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-profile-verification.jpg.md) + ![Verification email from Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-profile-verify-email.jpg.md) + + The email id has been updated. + ![Email updated successfully on Dashboard profile](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-profile-updated-email.jpg.md) + + + + + + + + +### Add a Team Member's Email + +You can make another member from your team the Razorpay account owner and add their email address as the login email id. + +**Example** + +- You can add another team member's email id. You will need to change the user role of the team member to `owner`. For example, you can provide your manager's email id and upgrade them to the `owner` role. +- You can add the email id of a Razorpay user who is not a member of your team. For example, Gauri Kumari is the manager of a Razorpay account, ABC Co. You want to add her as the `owner` of your Razorpay account, Acme Corp. Once you update her email address on the Dashboard, Gauri Kumari will become the `owner` of the Acme Corp account. However, she will still be the manager of the ABC Co Razorpay account. + + +### To add a team member's email: + + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings** and click **Manage Team** under **Business settings**. + 3. On the **Manage Team** page, click **Change** next to the **Owner**. + 4. Select the team member whose role is to be upgraded and click **Change Owner**. + + The email id has been updated. + ![user role and email id changed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-profile-user-role-changed.jpg.md) diff --git a/llm-content/payments/dashboard/account-settings/activation-details.md b/llm-content/payments/dashboard/account-settings/activation-details.md new file mode 100644 index 00000000..9e670303 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/activation-details.md @@ -0,0 +1,20 @@ +--- +title: Account Activation Details +description: Steps to view account activation details on the Razorpay Dashboard. +--- + +# Account Activation Details + +Your account moves to **Activated** state upon successful completion of the sign-up and KYC verification process. You can find details regarding the account activation on the Dashboard. + +## View Account Activation Details + +To view account activation details: + +1. Log in to the Dashboard. +2. Click **Account & Settings** and navigate to **Activation details** under **Business Settings**. +3. Click View Activation Form to view the details you had submitted at the time of KYC verification. In case you want any changes to be made to these details, contact [Razorpay Support](https://razorpay.com/support/). + +You can also view details such as account activated on date and account access status on this page. + +![View Account Activation Details on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-dashboard-account-settings-activation-details.jpg.md) diff --git a/llm-content/payments/dashboard/account-settings/api-keys.md b/llm-content/payments/dashboard/account-settings/api-keys.md new file mode 100644 index 00000000..b361fd44 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/api-keys.md @@ -0,0 +1,156 @@ +--- +title: API Keys Generator on Razorpay Dashboard +heading: API Keys +description: Generate and regenerate Test and Live API Keys using the Razorpay Dashboard. +--- + +# API Keys + +API keys are unique identifiers that let you securely connect your application to Razorpay's services. An API key is a combination of the `key_id` and `key_secret`, which are required to make any API request to Razorpay. You will need to add this API key to your code as part of your integration process, ensuring secure access to Razorpay's payment services while protecting your data. Essentially, API keys act like passwords for your app, providing safe access to Razorpay's payment and other services while protecting your data. + +> **WARN** +> +> +> **Watch Out!** +> +> To generate API keys in **Live Mode**, you must provide the website details where you will collect payments. If you do not have the option to generate API keys in **Live Mode**. It may be because you are yet to provide your website details. We collect website information during the onboarding process. +> +> - If you have not shared your website yet, . We will verify your website within 3 working days. Once the verification is complete, you can generate API keys in **Live Mode**. +> +> - If you have already shared your website details, and they have been verified, you can find the details on your Dashboard. Navigate to **Account & Settings** → **Website and app settings**. +> +> - You can generate API keys in **Test Mode** without adding a website. +> +> +> +> +> +> + +## Generate API Keys + +Follow these steps to generate API keys: + + + Watch this video to see how to generate API keys in the Test mode. + + +[Video: https://www.youtube.com/embed/VOn8JlGPG2I?si=WTAbAeLB3Hnp1n3r] + + + + + Watch this video to see how to generate API keys in the Live mode. + + +[Video: https://www.youtube.com/embed/Cer8UfBGX_E?si=Libr1RXoFSEDfY1c] + + + +1. Log in to your Dashboard with the appropriate credentials. +2. Select the mode (**Test** or **Live**) for which you want to generate the API key. + - **Test Mode**: The test mode is a simulation mode that you can use to test your integration flow. **Your customers will not be able to make payments in this mode**. + - **Live Mode**: When your integration is complete, switch to live mode and generate live mode API keys. In the integration, **replace test mode keys with live mode keys to accept customer payments**. +3. Navigate to **Account & Settings** → **API Keys** (under **Website and app settings**) → **Generate Key** to generate key for the selected mode. + +> **WARN** +> +> +> **Watch Out!** +> +> - After generating the keys from the Dashboard, download and save them securely. You can use only one set of API keys. If you do not remember your API keys, you must [regenerate them](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#regenerate-api-keys) from the Dashboard and update them wherever the previous keys were used for payment gateway integrations. +> - API Keys are universal; that is, they are applicable to all websites and apps that you have whitelisted for your Merchant ID. +> - **Do not share your API Key secret** with anyone or on any public platforms. **This can pose security threats to your Razorpay account**. +> - Once you generate the API Keys, only the **Key Id** is visible on the Dashboard, **not the Key secret**, as it can pose security threats to your Razorpay account. +> - Use the **Live API Keys** to accept live payments and the **Test API Keys** for test transactions. +> + +## Regenerate API Keys + +You also have the option to regenerate the key if required. + +> **INFO** +> +> +> **Two-Factor Authentication** +> +> To regenerate API keys, you must validate your identity via OTP and send it to your registered mobile number. However, this step is skipped if you already performed OTP validation while logging in to the Dashboard. +> +> If you have not set up two-factor authentication, you will be prompted to verify your mobile number before regenerating keys. +> + +To regenerate API key: + +1. Log in to the Dashboard. +1. Select the mode from the menu ribbon for which you want to generate the API key. +1. Navigate to **Account & Settings** → **API Keys** (under **Website and app settings**) → **Generate new key** to generate key for the selected mode. + +![Live mode API keys generated on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/settings-4.jpg.md) + +This allows you to deactivate the old key immediately or within 24 hours. + +## Frequently Asked Questions (FAQs) + +### Common + + +### 1. Can I generate multiple API keys if I have only one MID? + + No, if you have only one MID, you can generate only one API key. + + + +### 2. Can I generate multiple API keys if I have multiple MIDs? + + Yes, you can generate one API key for each MID if you have multiple MIDs. + + + +### 3. Can I use my existing API key when expanding to new Razorpay platforms? + + Yes, if your existing API key is saved, you can continue using the same keys as you expand to new platforms. + + + +### 4. What should I do if I do not have the previous API key saved? + + If you do not have the previous API key saved, you must [regenerate new API keys](#regenerate-api-keys) and relaunch all previous products or apps with the updated keys. + + + +### 5. My account is activated but I cannot generate API keys as my website is not verified. What do I do? + + Website details are required to generate API keys. If you do not have the option to generate API keys, it may be because website details are yet to be provided. If you have not shared your website yet, . We will verify your website within 3 working days, and once the verification is complete, you can generate API keys. + + + +### 6. Why am I unable to generate the API keys? + + Your website or app link must be verified to generate an API key. This step ensures that only verified sources (website/app) can collect payments through the payment gateway. + + + +### 7. Who has access to the API Keys? + + Only users with the **Owner** or **Admin** role have access to the API keys. Know more about [standard user roles & permissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md#standard-user-roles). + + + +### 8. Can I use the same Razorpay API Keys on multiple websites or domains? + + Yes, you can use the same set of Live Mode API Keys on multiple websites or domains. + + The Live Mode keys are tied to your single Razorpay account, allowing them to process live transactions from any domain where they are implemented. Using the same keys on a new website **will not impact** the live payments running on your existing, whitelisted website. + + **For Testing:** + + We strongly recommend using your **Test Mode API Keys** when integrating Razorpay on any new website. Test payments are simulated and ensure that your live payment processing on existing sites remains unaffected during development. + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure your new website's domain is whitelisted in your Razorpay account to avoid payment disruptions once you switch to Live Mode. +> diff --git a/llm-content/payments/dashboard/account-settings/balances.md b/llm-content/payments/dashboard/account-settings/balances.md new file mode 100644 index 00000000..0a55c492 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/balances.md @@ -0,0 +1,287 @@ +--- +title: Balances +description: Details about various balances available and how you can add funds and maintain them from the Razorpay Dashboard. +--- + +# Balances + +There are two types of balances available on the Dashboard: + +- [Available Balance](#available-balance) + - [Negative Available Balance](#negative-available-balance) +- [Reserve Balance](#reserve-balance) + +## Available Balance + +After the deduction of fees and tax, the payments received from your customers are added to your **Available Balance**. +- This accumulated amount is settled to your bank account as per your settlement cycle. +- We use your available balance to process chargebacks, refunds to your customers and settlements to your linked accounts. + +Always maintain sufficient available balance in your account to ensure your transactions do not fail. + +Your available balance is now segregated based on the channel type that is, **Online (Domestic transactions + International Cards), In-person and International**. + +![account settings balances razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-balances.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> - Refunds processed using your available balance incur no extra charges. We only deduct the refund amount. +> - Fees and taxes from the original transaction are not reversed in you refund. As a result, you refund amount can be lesser than the original transaction. +> + +#### Negative Available Balance + +Negative available balance is when your available balance becomes less than zero. +- If opening balance is ₹0, your negative balance is -₹500 (due to 0-500). +- If opening balance is ₹300, your negative balance is -₹200 (due to 300-500). + +Negative balance impacts your customer satisfaction. Ensure you maintain sufficient available balance or add Reserve Balance. + +## Reserve Balance + +Reserve Balance allows you to process refunds or settlements to linked accounts when you do not have a sufficient available balance/have [negative available balance](#negative-current-balance). The amount you add as the reserve balance becomes the maximum negative limit for your account. Your transactions up to this limit do not fail. + +### How does Reserve Balance Work + +When your available balance becomes 0, we use your reserve balance to process transactions up to this limit, that is, ₹1000. Your transactions will not fail. + +- To increase your negative balance limit, you can [add funds to your reserve balance](#add-funds-to-reserve-balance) from the Dashboard. You will have to transfer funds to your reserve balance only once in most cases. +- You can add funds to Reserve Balance using the Dashboard through either [UPI](#add-funds-to-reserve-balance) or [Bank Transfer](#add-funds-to-reserve-balance). + +> **WARN** +> +> +> **Watch Out!** +> +> Add funds only through the settlement account registered with us. +> + +## Example of Available Balance and Reserve Balance + +Let us say you have an available balance of ₹0 and a reserve balance of ₹1,000 + +Scenario | Without Reserve Balance | With Reserve Balance +--- +Opening Balance | Available Balance → ₹0 +Reserve Balance → ₹0| Available Balance → ₹0 +Reserve Balance → ₹1,000 +--- +You receive and capture payment of ₹1000. + +Let us say we charge a fee of ₹5 to process this transaction. | Available Balance → ₹995 +Reserve Balance → ₹0| Available Balance → ₹995 +Reserve Balance → ₹1,000 +--- +You process a full refund of ₹1000 for the above payment. | The refund fails since you do not have a sufficient available balance. | The refund is successfully processed. + +Available Balance → negative ₹5 +Reserve Balance → ₹1,000 + +### Add Funds to Reserve Balance + +You can add funds to Reserve balance through UPI or bank transfer payment methods. + + + To add funds to Reserve balance using UPI: + 1. Log in to the Dashboard. + 2. Click **Account & Settings** in the left navigation. + 3. Click **Balances** under **Payments and refunds** section. + 4. Click **Add Funds**. + + ![Add Reserve balance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/reserve-balance.jpg.md) + + 5. Select **UPI**. + 6. Enter the description and amount to be added. + 7. Click **Add Credits**. + 8. Enter the email and contact number on the checkout pop-up page and click **Proceed**. + 9. Select UPI, enter UPI ID or scan the QR, click **Pay Now** and complete the payment. + + Your Reserve balance is updated. + +> **INFO** +> +> +> **Handy Tips** +> +> It may take 2-3 hours for the Reserve balance to reflect in your Account. +> + + + + To add funds to Reserve balance using bank transfer: + 1. Log in to the Dashboard. + 2. Click **Account & Settings** in the left navigation. + 3. Click **Balances** under **Payments and refunds** section. + 4. Click **Add Funds**. + 5. Select **Bank Transfer**. + 6. Copy the account number and IFSC code. + + ![Copy IFSC and account number](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/copy-ifsc.jpg.md) + + 7. Open your netbanking portal, create a beneficiary with these details and transfer the amount. + + +> **INFO** +> +> +> **Handy Tips** +> +> It may take 2-3 hours for the Reserve balance to reflect in your Account. +> + + + + 300 is applicable. + +- If Opening balance is 0, your Negative balance is - 500 (due to 0-500). +- If Opening balance is 300, your Negative balance is - 200 (due to 300-500). + +Because Negative balance impacts your customer satisfaction, ensure you maintain sufficient Current balance. + +## Add Funds to Current Balance + +To add funds to your Current balance: + +1. Log in to the Dashboard. +1. Navigate to **Account & Settings** and click **Balances** under **Payments and refunds** section. +1. Click **Add Funds** in the Current Balance section and follow the on-screen instructions. + +> **INFO** +> +> +> **Handy Tips** +> +> When you add funds to your Current balance, fees and tax are deducted and the remaining amount is added to your Current balance. The fees and tax charged are the same as what is charged on payments received from customers. +> +> For example, according to your pricing plan for a 1,000 payment, the fees and tax is 5. When you add 1,000 to your current balance, 5 (fees and tax) is deducted and 995 is added to your current balance. +> + +**Example 1** + +Let us say you have a Current balance of 1,000. + +Scenario | Current Balance +--- +Opening balance | 1,000 +--- +You receive and capture a payment of 1,000. + +Let us assume we charge a fee of 5 to process this transaction. | 1995 + +( 1,000 + ( 1,000 - 5)) +--- +You process a full refund of 1,000 for the above payment. | 995 + +( 1995 - 1,000) + +**Example 2** + +Let us say you have a Current balance of 0. + +Scenario | Current Balance +--- +Opening balance | 0 +--- +You receive and capture a payment of 1,000. + +Let us say a fee of 5 is charged by us to process this transaction. | 995 + +( 0 + ( 1,000 - 5)) +--- +You try to process a full refund of 1,000 for the above payment. | The refund fails since you do not have a sufficient Current balance. + +## Segregated Balances + +Razorpay now supports balance segregation based on payment channel type. If you are an omni-channel business (PG + POS) or a cross-border business, your balances are maintained separately for each channel type. + + +### Benefits + + - **No cross-channel fund mixing**: Complete isolation between Online (Domestic transactions + International Cards), In-Person and APM International funds. + - **Regulatory compliance**: Adherence to RBI guidelines on fund segregation. + - **Zero settlement failures**: Settlements never fail due to cross-channel balance issues. + - **Instant Settlements for all businesses**: Instant Settlements now available for omni-channel and cross-border businesses. + - **Automated POS rental collection**: Device rentals deducted only from In-Person balance. + - **Better visibility**: Clear channel-wise and balance view. + + +### Types of Segregated Balances + +Channel Type | Description | Transactions Included | Additional Details +--- +Online (Domestic transactions + International Cards) | Domestic online payments and international card transactions | PG domestic transactions (cards, UPI, netbanking and wallets), international card payments | Supports Instant Settlements. +--- +In-Person | POS terminal transactions | All POS/offline transactions | POS device rentals are automatically collected from this balance. Operates independently from online transactions. +--- +Alternate Payment Method (International) | Balance from international payment methods such as PayPal, Stripe and other cross-border payment methods | International bank transfers, cross-border payments via supported APM providers | Settled separately from domestic balances. Subject to forex conversion and international settlement timelines. + +### How Segregated Balances Work + +With balance segregation: + +- **Credit Operations**: When a payment is captured, it is credited to the appropriate balance based on the payment channel: + - Domestic online payment → Online balance + - International card payment → Online balance + - POS transaction → In-Person balance + - International APM payment → APM (International) balance +- **Debit Operations**: Settlements, refunds, chargebacks and adjustments are processed only from the respective balance account. A refund for a POS payment will only debit from your PG In-Person balance. +- **Independent Settlements**: Each balance account has its own settlement cycle and can have Instant Settlements enabled independently. + +### View Segregated Balances + +You can view your segregated balances on the Dashboard: + +1. Log in to the Dashboard. +2. On the Home Page, you will see separate balance cards for each active balance account. +3. Navigate to **Account & Settings** → **Balances** for a detailed view. + +Each balance card displays: + +- Current balance amount. +- Channel type (Online (Domestic transactions + International Cards), In-Person or APM International). +- Next settlement date. +- Link to view settlement history. + +> **INFO** +> +> +> +> **Handy Tips** +> +> With segregated balances, your POS operations and online payments work completely independently. A high volume of online refunds will never affect your POS settlements and vice versa. +> +> + +## FAQs + + +### 1. Can I transfer funds between my segregated balances? + + No, inter-channel fund transfers are not supported to maintain regulatory compliance and fund isolation. + + + +### 2. How are refunds handled with segregated balances? + + Refunds are debited from the same balance where the original payment was credited. For example, an In-Person payment refund will debit from your In-Person balance, not your Online (Domestic transactions + International Cards) balance. + + + +### 3. Why are international card payments in the Online balance but international APM in a separate balance? + + International card transactions flow through similar payment rails as domestic cards, so they are grouped in the Online (Domestic transactions + International Cards) balance. International Alternate Payment Methods use different payment flows and are therefore maintained in a separate APM (International) balance for proper fund isolation. + + + +### 4. Will my Reserve Balance work with segregated balances? + + Reserve Balance functionality remains available. Contact our [support team](https://razorpay.com/support/) for specific configuration based on your balance structure. + + +### Related Information + +- [About Account and Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md) +- [About Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard.md) diff --git a/llm-content/payments/dashboard/account-settings/bank-account-details.md b/llm-content/payments/dashboard/account-settings/bank-account-details.md new file mode 100644 index 00000000..042e0f23 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/bank-account-details.md @@ -0,0 +1,55 @@ +--- +title: Bank Account Details +description: Steps to update your bank account details on the Razorpay Dashboard. +--- + +# Bank Account Details + +You can request a change to your settlement (bank) account linked to your account. After you provide the necessary details and documents, we will verify the account and update the information. We will contact you if further clarifications are required. + +## Change Bank Account Details + +To request a bank account change: + +1. Log in to your Dashboard. +1. Click **Account & Settings** in the left navigation. +1. Click **Bank account details** under **Bank accounts and settlements** section and click **Change bank account**. +1. Enter the OTP sent to your registered mobile device on the **2-Step Verification** pop-up page. +1. Enter the details of the new bank account you want to link with your account. The new bank account will be your new settlement account. +1. Upload a copy of your account statement and click **Save**. + +> **INFO** +> +> +> **Handy Tips** +> +> - You will receive email notifications for the following: +> - When you initiate a request to update the settlement bank account details. +> - When the bank account details are successfully updated. +> - We may reach out to you for clarification via email, SMS, and the Dashboard during the verification process. Navigate to **Account & Settings** and submit the necessary information in the appropriate section. Our team will go through the information you provide and help you resolve the issue. +> + +### Resolve Bank Account Update Issues + +If you are unable to update your bank account details, you may contact our [support team](https://razorpay.com/support). To expedite the resolution, we require a short video of a **cancelled cheque**. This video helps us verify your bank details. + +[Video content] + +Please ensure the below information is **clearly visible**: + +- **Beneficiary Name**: This must precisely match your business name as registered on Razorpay. + - **Proprietorships**: The name can also match your promoter's PAN name. +- **IFSC Code** +- **Bank Account Number** + +> **WARN** +> +> +> **Watch Out!** +> +> **If the beneficiary name on your existing bank account does not match with your Razorpay-registered business name (or promoter's PAN name for proprietorship)**, you have two options: +> +> - **Open a new bank account** where the beneficiary name accurately reflects your registered business name or your promoter's PAN name on Razorpay. +> - Or, you can **provide a letter on your bank's official letterhead**. This letter must be signed and sealed by your bank manager, explicitly affirming that the bank account number associated with the IFSC code belongs to your registered business name. +> +> diff --git a/llm-content/payments/dashboard/account-settings/branding.md b/llm-content/payments/dashboard/account-settings/branding.md new file mode 100644 index 00000000..e75cdd02 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/branding.md @@ -0,0 +1,90 @@ +--- +title: Branding +--- + +# Branding + +You can modify the Checkout to reflect your brand colour and logos. You can also make customer email an optional field on Checkout. These configurations can be done on the Dashboard. + +## Update Brand Name + +You can update the brand name displayed to your customers in the following places: +- On transaction and refund emails sent to customers. +- On the links sent to customers for **Payment Links**, **Payment Pages**, **Invoices** and **Subscriptions**. + +#### Example +While creating the account, you provided the name as **Acme Corp**; now, you want to change it to **Acme Co**. + +> **INFO** +> +> +> **Handy Tips** +> +> - This feature is available only for the registered Razorpay users. +> - Only users with 'Owner' or 'Admin' roles can update the brand name. +> - Bank-related SMS or credit card statements sent to customers will not have the brand name since these are managed by the banks and not Razorpay. Such communication will display the billing name provided by you during account creation and activation process. +> + + +### To update your brand name: + + 1. Log in to the Dashboard. + 2. Click **Account & Settings** in the left navigation. + 3. Click **Branding** under the **Checkout settings** section. + 4. Click the edit icon in the **Brand Name** field. + 5. A list of recommended brand names appear. + - Select one of the names from the list, or + - Enter a custom brand name. Ensure that the custom name you are entering is similar to the business name or your business website domain. + 6. Click **Save Changes**. + + The brand name appears updated on the Dashboard and will reflect on all the above-mentioned places. + + +## Change Theme Color on Checkout + + +### To change theme color on the Checkout: + + 1. Log in to the Dashboard + 1. Click **Accounts & Settings** and go to **Branding** under **Checkout settings**. + 1. In the **Theme Color** field, enter the HEX code of your brand color. For example, `#005CF0`. Alternatively, click on the color box and enter the RGB code. + 1. Click **Save**. + + +## Upload Company Logo + + +### To upload company logo on the Checkout: + + 1. Log in to the Dashboard. + 1. Click **Accounts & Settings** and go to **Branding** under **Checkout settings**. + 1. Click **Choose File** to upload your company logo. + + +> **INFO** +> +> +> **Handy Tips** +> +> - The logo file size should not exceed 1MB. +> - Upload a square image of minimum dimensions 256x256 px. +> + + + +## Configure Email Address +By default, the email address field is hidden on checkout. You can choose to configure the email address field based on your requirement. + + +### To configure email address: + + 1. Log in to Dashboard. + 2. Navigate to **Account & Settings** + 3. Click **Branding** under the **Checkout settings** section. + 4. In the **Collect email address from users on Checkout page** field, you can select: + - **No (Default)**: Customers will not be shown this field on checkout. + - **As an optional field**: Customers can either enter their email address or choose to skip it. + - **As a mandatory field**: Customers have to enter their email address to proceed. + + ![Email-less checkout configuration on dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-emailess-checkout.jpg.md) + 5. Click **Save**. diff --git a/llm-content/payments/dashboard/account-settings/business-details.md b/llm-content/payments/dashboard/account-settings/business-details.md new file mode 100644 index 00000000..9f1e4734 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/business-details.md @@ -0,0 +1,22 @@ +--- +title: Business Details +description: Steps to view business details on the Razorpay Dashboard. +--- + +# Business Details + +While signing up for an account, you are required to provide information about your business, such as your Business Name and Type. These details are recorded on the Dashboard. + +## View Business Details + +To view business details: + +1. Log in to the Dashboard. +2. Click **Account & Settings** and navigate to **Business details** under **Business Settings**. +3. The following information is listed: + - **Business Name** + - **Business Type** + - **Registration Date** + - **Registered By** + +![Razorpay Dashboard - Account & Settings - Business Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-dashboard-business-details.jpg.md) diff --git a/llm-content/payments/dashboard/account-settings/business-website-details.md b/llm-content/payments/dashboard/account-settings/business-website-details.md new file mode 100644 index 00000000..9e077e39 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/business-website-details.md @@ -0,0 +1,141 @@ +--- +title: Business Website Details +description: Steps to add or update your business website or app details on the Razorpay Dashboard. You can also add or update additional website details. +--- + +# Business Website Details + +You must provide your live website or mobile app details during account activation. +- Without these details, you will not be able to access live mode API keys and hence **cannot accept payments from your website or app**. +- You can still accept payments from customers using **Invoices** and **Payment Links** generated via the Dashboard. + +## Add and Edit Website/App/Additional Websites + + + + + + + + + To update website or mobile app details: + 1. Log in to the Dashboard. + 2. Click **Account & Settings** in the left navigation. + 3. Click **Business website detail** under **Website and app settings** section. + 4. Click **Edit** next to the website/app that you want to edit. ![add website/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-edit-business-website-details.jpg.md) + 5. Click **Proceed to update website/app**. ![add website/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-proceed-edit-business-website-details.jpg.md) + 6. Select **Website** or **App**, based on what you want to update. + + +### Follow these steps if you own a website: + + 1. Select **Website**. + 2. Enter the **Website URL**. + 3. Provide the links for these pages: **About us**, **Contact us**, **Pricing details**, **Terms and conditions**, **Privacy policy** and **Refunds policy**. + 4. Upload a sample invoice. The accepted file formats are PNG, JPG and PDF. + 5. Provide your website's **Test Account credentials** if required or select **No** for **Does your website require login from user to complete payment?** if logging in is not required. + 6. Click **Submit website for review**. + ![Enter Website URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/update-website.jpg.md) + + After the details are provided, our team will review the request. We will update the details on the Dashboard. + + + +### Follow these steps if you own an app: + + 1. Select **App**. + 2. Enter the **App URL**. + 3. Provide your website's **Test Account credentials** if required or select **No** for **Does your app require login from user to complete payment?** if logging in is not required. + 4. Click **Submit app for review**. + ![Enter App URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/update-app.jpg.md) + + After the details are provided, our team will review the request. We will update the details on the Dashboard. + + + + + + + + + + +> **INFO** +> +> +> **Handy Tips** +> +> We may reach out to you for clarifications via email, WhatsApp, SMS and Dashboard during the verification process. +> Navigate to **Account & Settings** and submit the necessary information in the appropriate section. Our team will go through the information you provide and help you resolve the issue. +> + + + + + + + + You can accept payments using your account on multiple websites. To do this, you need to share the details of the additional web pages with us. You can add one main website and five additional websites. + + +> **INFO** +> +> +> **Handy Tips** +> +> This feature is available only if your services/products fall under the e-commerce business category. +> + + To add an additional website: + 1. Log in to the Dashboard. + 1. Click **Account & Settings** in the left navigation. + 1. Click **Business website detail** under **Website and app settings** section. + 1. Click **Add additional website/app details**. + 1. Click **Proceed to update website/app**. + ![add website/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/proceed-update-biz-website-details.jpg.md) + 1. Provide the website or app details: + + +### Follow these steps if you own a website: + + - Select **Website**. + + - Enter the **Website URL**. + + - Provide the links for these pages: **About us**, **Contact us**, **Pricing details**, **Terms and conditions**, **Privacy policy** and **Cancellation/Refund policy**. + + - **Upload invoice**: Upload a sample invoice. The accepted file formats are PNG, JPG and PDF. + + - **Reason for adding new website**: Enter the reason for adding a new website. Enter a minimum of 50 words. + + - Provide your website's **Test Account credentials** if required or select **No** for **Does your website require login from user to complete payment?** if logging in is not required. + + - Click **Submit website for review**. + ![add website/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-additional-website-details.jpg.md) + + + +### Follow these steps if you own an app: + + 1. Select **App**. + 2. Enter the **App URL**. + 3. **Reason for adding new website**: Enter the reason for adding a new website. Enter a minimum of 50 words. + 4. Provide your website's **Test Account credentials** if required or select **No** for **Does your app require login from user to complete payment?** if logging in is not required. + 5. Click **Submit app for review**. + + ![add website/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-additional-app-details.jpg.md) + + After you provide the details, our team will review the request. We will update the details on the Dashboard. + + + + + + + + +- If you add or update your **primary website**, instant checks are run to validate your website, policy pages and business industry. In case the website requirements are not met, you can re-check and enter the valid URLs as prompted or create policy pages with Razorpay. + +![Update website checks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/website-dashboard-checks.jpg.md) + +- If you add or update **additional websites**, our team will review manually and notify you. diff --git a/llm-content/payments/dashboard/account-settings/capture-refund.md b/llm-content/payments/dashboard/account-settings/capture-refund.md new file mode 100644 index 00000000..a1166d47 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/capture-refund.md @@ -0,0 +1,41 @@ +--- +title: Capture and Refund Settings +description: Steps to configure payment capture and refund settings on the Razorpay Dashboard. +--- + +# Capture and Refund Settings + +You can accept online payments from your customers. When a customer makes a payment, it usually flows through different [payment states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#payment-life-cycle). Check how to [capture payments](/payments/dashboard/account-settings/capture-refund/#payment-capture-settings) and [set refunds](/payments/dashboard/account-settings/capture-refund/#choose-refund-speed). + +## Payments in Authorised state + +By default, once your customer completes a payment, it is automatically moved to the `captured` state. However, the payment can remain in the `authorized` state in the following scenarios: + +- **Late authorization**: Due to external factors such as network issues or technical errors, Razorpay may not immediately receive payment status from the bank. In this case, Razorpay polls the APIs intermittently for 3 days to check the status. If we receive the payment status as successful, the payment is moved to the `authorized` state. Know more about [late authorization](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md). +- **Specific business use case**: Some businesses such as those in the Ecommerce industry, may retain the payment in the `authorized` state and later move them to the `captured` state. + +> **WARN** +> +> +> **Watch Out!** +> +> - For businesses which have the **Direct Settlement** feature enabled, payments will be auto-captured irrespective of the configuration. +> - You must ensure that all payments in the authorized state are moved to the captured state within 3 days of creation. This is mandatory because payments that are not captured within this period will be refunded automatically to customers. +> + +## Payment Capture Settings + +You can configure **Payment Capture settings** on the Dashboard. You can choose to: + +- [Auto-capture all payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) +- [Auto-capture with set timeouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-with-custom-timeouts) +- [Manually capture timeout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#manual-capture-timeout) + +## Choose Refund Speed + +You can make Normal Refunds or Instant Refunds. You can also issue refunds in batches. Know more about [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md). + +1. Log in to the Dashboard. +2. Click **Account & Settings**. +3. Click **Capture and refund settings** under **Payments and refunds**. +4. You can choose the type of refund you wish to make a default setting. diff --git a/llm-content/payments/dashboard/account-settings/checkout-features.md b/llm-content/payments/dashboard/account-settings/checkout-features.md new file mode 100644 index 00000000..0ae22d53 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/checkout-features.md @@ -0,0 +1,155 @@ +--- +title: Checkout Features +description: Customise your checkout experience with options for language settings, email collection, quick flash checkout, personalised banners and more on the Razorpay Dashboard. +--- + +# Checkout Features + +Customise your checkout experience on the Dashboard by setting a default language, enabling email collection , activating flash checkout, making the summary page mandatory and adding a custom banner message to enhance customer engagement. + + + + Set the default language for your checkout page when customers don't specify one. + + + + + Configure the email address field to collect customer email addresses on checkout. + + + + + Let customers securely save their card details for faster transactions. + + + + + Show custom messages to highlight offers, discounts or important updates. + + + + + Display the mandate summary screen for card payments to your users. + + + + + Find answers to frequently asked questions about checkout settings. + + +> **INFO** +> +> +> **Handy Tips** +> +> - All the below changes will reflect on [Checkout page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md), [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md), [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md), [Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore.md), [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md) and [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md). +> - You can switch between mobile and desktop views to preview changes. +> + +## Default Language + +The customers can view the Checkout page in their preferred language. If the customer does not specify a language, the default language will be used on the checkout page. + + +### To select the default checkout language: + + 1. Log in to the Dashboard. + 2. Navigate to **Accounts & Settings** → **Checkout Features** in the **Checkout settings** section. + 3. Select the default language from the drop-down list. For example, **English**. + 4. Click **Save all changes**. + ![select default language](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/checkout-default-language.gif.md) + + +## Collect Email Address From Customers + +By default, the email address field is hidden on checkout. You can choose to configure the email address field based on your requirement. + + +### To configure email address field: + + 1. Log in to the Dashboard. + 2. Navigate to **Accounts & Settings** → **Checkout Features** in the **Checkout settings** section. + 3. Turn on **Collect email from customers**. + 4. Select either of the following options: + - **Optional (Default)**: Customers can either enter their email address or choose to skip it. + - **Mandatory**: Customers have to enter their email address to proceed. + 5. Click **Save all changes**. + ![Configure email address field](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/checkout-collect-email.jpg.md) + + +## Flash Checkout + +Use Flash Checkout to let your customers securely save their credit and/or debit card details with Razorpay, thereby reducing transaction time. + +- Customers need to authenticate themselves only once on their mobile devices. Razorpay is PCI-DSS compliant. All the card information is securely saved on our servers. +- After the one-time authentication, customers' saved cards are available to accept payments online via Razorpay. + + +### To enable flash checkout: + + 1. Log in to the Dashboard. + 2. Navigate to **Accounts & Settings** → **Checkout Features** in the **Checkout settings** section. + 3. Toggle on the **Flash checkout** field. + 4. Click **Save all changes**. + ![Enable flash checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/checkout-flash-checkout.jpg.md) + + +## Message Banner + +Show a custom message to your customers on checkout to highlight promotional offers, discounts or important updates, enhancing their shopping experience. + + +### To show a message banner: + + 1. Log in to the Dashboard. + 2. Navigate to **Accounts & Settings** → **Checkout Features** in the **Checkout settings** section. + 3. Toggle on the **Message banner** field. + 4. Enter your custom message. + 5. Click **Edit** to select the banner color as preferred. + 6. Click **Save all changes**. + ![Show a message banner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/checkout-message-banner.gif.md) + + +## Mandate Summary Page + +You can display the mandate summary screen for credit and debit card payments to your users. + + +### To show mandate summary page: + + 1. Log in to the Dashboard. + 2. Navigate to **Accounts & Settings** → **Checkout Features** in the **Checkout settings** section. + 3. Toggle on the **Mandate summary page** field. + 4. Click **Save all changes**. + ![Show mandate summary page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/checkout-summary-page.jpg.md) + + +## Order Banner + +Display order milestone badges at checkout to boost customer trust and credibility. These badges highlight real order volumes, reassuring customers of your reliability and encouraging them to complete their purchase. + +For example, if your store has processed 10,000+ successful orders, the badge showcases this achievement, reinforcing trust. + + +### To display order milestone banner: + + 1. Log in to the Dashboard. + 2. Navigate to **Accounts & Settings** → **Checkout Features** in the **Checkout settings** section. + 3. Toggle on the **Order banner** field. + 4. Click **Save all changes**. + ![Display order banner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/order-banner.jpg.md) + + + +> **WARN** +> +> +> **Watch Out!** +> +> - This feature is automatically enabled and currently available only for businesses with [RTB](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/trusted-business.md) enabled. +> - If a [message banner](#message-banner) exists on the checkout page, the badge information seamlessly integrates within the same section using vertical scrolling. +> + +### Related Information + +[FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/faqs.md#checkout-settings) diff --git a/llm-content/payments/dashboard/account-settings/checkout-styling.md b/llm-content/payments/dashboard/account-settings/checkout-styling.md new file mode 100644 index 00000000..245e1a96 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/checkout-styling.md @@ -0,0 +1,190 @@ +--- +title: Checkout Styling +description: Customise your checkout with your brand's colours, logos, fonts, and more on the Razorpay Dashboard. +--- + +# Checkout Styling + +Customise your Checkout to match your brand's identity by adjusting colours, logos, brand name and logo, fonts, border styles and sidebar graphics. Additionally, you can show the Razorpay Trusted Business Badge to enhance customer trust in your brand. + + + Customise your checkout with festive-themed animations and graphics according to the seasonal celebrations. + + + + Customise the checkout background colour according to your brand colour. + + + + Decide how you want to display your brand name and logo on checkout. + + + + Choose the border style for various elements on your checkout. + + + + Select a font for your brand to apply to all text on the checkout. + + + + Enhance your checkout sidebar with a decorative graphic. + + + + + Show the Razorpay Trusted Badge to build credibility as a trusted business. + + + + + Find answers to frequently asked questions about checkout settings. + + +> **INFO** +> +> +> **Handy Tips** +> +> - All the below changes will reflect on **Checkout** page, **Invoices**, **Payment Button**, **Webstore**, **Payment Links** and **Payment Pages** +> - You can switch between mobile and desktop views to preview changes. +> + +## Festive Theme + +Customise your checkout with festive-themed animations and graphics according to the seasonal celebrations. + + +### To add festive theme: + + 1. Log in to the Dashboard. + 2. Navigate to **Accounts & Settings** → **Checkout Styling** under **Checkout settings** section. + 3. Toggle on the **Festive Theme** field. + 4. Click **Save all changes**. + ![Enable festive theme](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/checkout-festive-theme.gif.md) + + +## Background Colour + +You can customise the checkout background colour according to your brand colour. + + +### To edit background colour: + + 1. Log in to the Dashboard. + 2. Navigate to **Accounts & Settings** → **Checkout Styling** under **Checkout settings** section. + 3. In the **Background Color** field, click **Edit**. + 4. You can choose to enter the RGB, HSL or HEX code of your brand colour. + 5. Click **Save all changes**. + ![Edit background colour](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/checkout-background-colour.gif.md) + + +## Brand Name and Logo + +Decide how you want to display your brand name and logo on checkout. You can update the brand name displayed to your customers in the following places: + +- On transaction and refund emails sent to customers. + +- On the links sent to customers for Payment Links, Payment Pages. + +- As the beneficiary name when you create a Smart Collect Customer Identifier. Know more about [Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md). + +> **INFO** +> +> +> **Handy Tips** +> +> - You can update the brand name only to one that is at least 80% similar to the company name or domain name. +> - This feature is available for both registered and individual businesses. +> - Only users with 'Owner' or 'Admin' roles can update the brand name. +> - Bank-related SMS or credit card statements sent to customers will not have the brand name since these are managed by the banks and not . Such communication will display the billing name provided by you during account creation and activation process. +> + + +### To edit brand name and logo: + + 1. Log in to the Dashboard. + 2. Navigate to **Accounts & Settings** → **Checkout Styling** under **Checkout settings** section. + 3. In the **Brand name and logo** field, click **Edit**. + ![Edit brand name and logo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/checkout-title-style.jpg.md) + 4. Choose a title style based on your requirement. + ![Select title style](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/checkout-title-style-select.jpg.md) + + + + Best for square logos, displaying both your logo and brand name. + 1. Click **Continue to upload**. + 2. Enter your brand name or business name. + 3. Drag the file or click **Upload** to add your logo. + 4. Click **Save and continue**. + + + Ideal for long, word-based logos, focusing on your brand's name as the main identifier. + 1. Click **Continue to upload**. + 2. Drag the file or click **Upload** to add your logo. + 3. Click **Save and continue**. + + + Displays only your brand name in text format, without a logo. + 1. Click **Continue to upload**. + 2. Enter your brand name or business name. + 3. Click **Save and continue**. + + + 5. Click **Save all changes**. + + +## Border Style + +Choose the border style for various elements on your checkout, such as the checkout, logo, account and payment options. + + +### To edit border style: + + 1. Log in to the Dashboard. + 2. Navigate to **Accounts & Settings** → **Checkout Styling** under **Checkout settings** section. + 3. In the **Border style** field, you can select **rounded** or **sharp** border style based on your requirement. + 4. Click **Save all changes**. + ![Edit border style](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/checkout-border-style.gif.md) + + +## Font + +Select a font for your brand based on your requirement. + + +### To edit font: + + 1. Log in to the Dashboard. + 2. Navigate to **Accounts & Settings** → **Checkout Styling** under **Checkout settings** section. + 3. In the **Font** field, select a font for your brand from the drop-down list to apply it to all text on the checkout. + 4. Click **Save all changes**. + ![Edit font](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/checkout-font.gif.md) + + +## Sidebar Graphic + +Enhance your checkout sidebar with a decorative graphic. This setting is available only in desktop view. + + +### To add sidebar graphic: + + 1. Log in to the Dashboard. + 2. Navigate to **Accounts & Settings** → **Checkout Styling** under **Checkout settings** section. + 3. Toggle on the **Sidebar graphic** field and select a design pattern that fits your needs. + 4. Click **Save all changes**. + ![Add sidebar graphic](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/checkout-sidebar-graphic.gif.md) + + +## Razorpay Trusted Badge + +Show the Razorpay trusted badge on your checkout to build credibility as a trusted business. This reassures your customers (who otherwise might have dropped off due to lack of trust) that they can safely transact with your brand. Know more about [Razorpay trusted badge](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features/trusted-business.md#how-razorpay-trusted-business-badge-works). + + +### To enable Razorpay trusted badge: + + 1. Log in to the Dashboard. + 2. Navigate to **Accounts & Settings** → **Checkout Styling** under **Checkout settings** section. + 3. Toggle on the **Razorpay trusted badge** field. + 4. Click **Save all changes**. + ![Show Razorpay trusted badge on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/checkout-rtb.jpg.md) diff --git a/llm-content/payments/dashboard/account-settings/configuration.md b/llm-content/payments/dashboard/account-settings/configuration.md new file mode 100644 index 00000000..4c2c1841 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/configuration.md @@ -0,0 +1,173 @@ +--- +title: Configuration +description: Manage notifications, Checkout themes, payment capture and more under the Configuration tab on the Razorpay Dashboard. +--- + +# Configuration + +You can use the **Configuration** tab to perform the following operations: + +- [Change Color on Checkout Page](#change-color-on-checkout-page) +- [Upload Company Logo](#upload-company-logo) +- [Select Default Language](#select-default-language) +- [Configure Email Address](#configure-e-mail-address) +- [Enable Flash Checkout](#enable-flash-checkout) +- [Manage Saved Cards](#manage-saved-cards) +- [Manage Fee Bearer Model](#manage-fee-bearer-model) +- [Enable International Payments](#enable-international-payments) +- [Manage Email Notifications](#manage-email-notifications) +- [Manage SMS Notifications](#manage-sms-notifications) +- [Manage WhatsApp Notifications](#manage-whatsapp-notifications) +- [Configure Payment Capture Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) + +## Change Color on Checkout Page + +To change color on the Checkout page: + +1. Log in to the Dashboard. +2. In the **Theme Color** field, enter the HEX code of your brand color. Alternatively, click on the color box and enter the RGB code. +3. Click **Save**. + +## Upload Company Logo + +1. Log in to the Dashboard. +2. Click **Choose File** to upload your company logo. + +> **INFO** +> +> +> **Handy Tips** +> +> - The logo file size should not exceed 1MB. +> - Upload a square image of minimum dimensions 256x256 px. +> + +## Select Default Language +The customers can view the Checkout page in their preferred language. + +If the customer does not specify a language, the default language will be used on the checkout page. To select the default checkout language: + +1. Log in to the Dashboard. +2. Use the drop-down list to view the language options. +3. Select the default language. For example, **English**. +4. Click **Save**. + +![customise checkout theme](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settings-checkout-theme1.jpg.md) + +## Configure Email Address +By default, the email address field is hidden on checkout. You can choose to configure the email address field based on your requirement. + + +### To configure email address: + + 1. Log in to Dashboard. + 2. Navigate to **Account & Settings** + 3. Click **Branding** under the **Checkout settings** section. + 4. In the **Collect email address from users on Checkout page** field, you can select: + - **No (Default)**: Customers will not be shown this field on checkout. + - **As an optional field**: Customers can either enter their email address or choose to skip it. + - **As a mandatory field**: Customers have to enter their email address to proceed. + + ![Email-less checkout configuration on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-emailess-checkout.jpg.md) + 5. Click **Save**. + + +Watch this video to see how to enable or disable Flash Checkout: + +[Video: https://www.youtube.com/embed/sGSfOP5qtVw?si=nyQ1w-rubPqIycFn] + +## Manage Saved Cards + +Customers can manage their saved card details stored as tokens using our portal. +- [Manage Global Saved Cards](https://razorpay.com/flashcheckout/manage/) by following the on-screen instructions. +- [Manage Local Saved Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md). + +## Manage Fee Bearer Model +Razorpay charges nominal platform fee for every payment that passes through the Razorpay Payment Gateway. You can choose to charge a Convenience Fee to your customers for the use of technology infrastructure. Convenience Fees are seamlessly added at the Checkout without disrupting the checkout experience. If a refund is initiated, your customers receive the Convenience Fees along with the actual payment amount. + +> **WARN** +> +> +> **Watch Out!** +> +> Changes made to the fee bearer model in test mode will automatically apply to live mode. For example, choosing to charge a convenience fee to your customers in test mode will also apply in live mode. +> + + +### To manage fee bearer model: + + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings**. + 3. Select the **Convenience Fee Model** option on the **Settings** → **Fee Bearer** section of the Dashboard. + + ![Customer pays the fee](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settings-fee-bearer-customer-fee-bearer.jpg.md) + Know more about the [Convenience Fee Model](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/configuration/convenience-fees.md). + + +## Enable International Payments + +By default, you can accept payments in various [international currencies supported by Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +If you do not want to accept payments in currencies apart from INR (₹), you can turn it off using the toggle button. Watch this video to see how to enable international payments. + +[Video: https://www.youtube.com/embed/lPvasqEJqK8] + +## Manage Email Notifications +You can configure the email addresses to receive email notifications like payments received, daily payment reports and webhooks. You will also receive an email notification for both successful and failed settlements. + +> **INFO** +> +> +> **Handy Tips** +> +> Settlement emails will be sent to the email addresses provided on the Dashboard. Know more about [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md). +> + + +### To enable email notifications: + + 1. Log in to the Dashboard. + 2. On the left navigation, click **Accounts & Settings**. + 3. Navigate to **Notification settings → Email**. + 4. Enter email addresses under **Email Notifications**. If you want to enter multiple email addresses, separate them by a comma. + + +## Manage SMS Notifications + +You can enable **SMS Notifications** to receive SMS notifications for successful and failed settlements. + + +### To enable SMS notifications: + + 1. Log in to the Dashboard. + 2. Click **Accounts & Settings** and go to **Notification settings → SMS**. + 3. Enable **SMS Notifications**. + + + ![Manage SMS Notifications](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/manage-sms-notifications.jpg.md) + + After SMS notifications are enabled, you start receiving notifications on the registered phone number. By default, this feature is set to **Enabled**. You can disable it using the toggle button. + + +## Manage WhatsApp Notifications +You can receive WhatsApp notifications regarding settlements, account configuration changes and more on your registered contact number. You can enable this feature during the sign up process or later from the Dashboard. + +> **INFO** +> +> +> +> **Handy Tips** +> +> This feature is available only to the owner user role. Know about the various [user roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md). +> + + +### To enable WhatsApp notifications: + + 1. Log in to the Dashboard. + 2. Click **Accounts & Settings** and go to **Notification settings → WhatsApp**. + 3. Enable **WhatsApp Notifications**. + + ![Manage WhatsApp Notifications](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/manage-whatsApp-notifications.jpg.md) + + After WhatsApp notifications are enabled, you start receiving notifications on the registered number. You can disable the WhatsApp notifications from the Dashboard. diff --git a/llm-content/payments/dashboard/account-settings/configuration/convenience-fees.md b/llm-content/payments/dashboard/account-settings/configuration/convenience-fees.md new file mode 100644 index 00000000..1228e7f7 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/configuration/convenience-fees.md @@ -0,0 +1,77 @@ +--- +title: Collect Convenience Fees from Customers +description: Collect convenience fees from your customers for using your technology and infrastructure. +--- + +# Collect Convenience Fees from Customers + +For every payment done using Razorpay, we levy a nominal platform fees. You can choose to charge a Convenience Fee to your customers for the use of technology infrastructure. Convenience Fees are seamlessly added at Razorpay Checkout without disrupting the checkout experience for your customers. In case a refund is initiated, your customers receive the Convenience Fees along with the actual payment amount. + +![Fees breakup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settings-fee-bearer-fee-breakup-v2.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> Changes made to the fee bearer model in test mode will automatically apply to live mode. For example, choosing to charge a convenience fee to your customers in test mode will also apply in live mode. +> + +> **INFO** +> +> +> **Handy Tips** +> +> - This feature is currently supported for specific business cases only. You can contact our [Support team](https://razorpay.com/support) to get this feature activated on your account. +> - **INR** is the only supported currency. This feature is not available for international payments. +> - This feature is **not available** for: +> - Smart Collect (via VA, VPA and QR Codes) +> - Route +> - Subscriptions (via Emandate, Paper NACH) +> - Invoices +> + +## How it Works + +Given below is the workflow: + +1. Log in to the Dashboard. +2. You select the **Convenience Fee Model** option on the **Settings** → **Fee Bearer** section of the Dashboard. + + ![Customer pays the fee](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settings-fee-bearer-customer-fee-bearer.jpg.md) + +3. The customer selects an item on your website/Payment Link/Payment Page and clicks the pay button. + + ![Customer clicks pay button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settings-fee-bearer-payment-page.jpg.md) + +4. The checkout pop-up page is displayed. +5. The customer selects the payment mode and clicks the **Pay** button. +6. The **Fees Breakup** page containing the Convenience Fee appears, and the customer clicks **Continue and pay**. + + ![Fees breakup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settings-fee-bearer-fee-breakup-v2.jpg.md) + +7. The customer is redirected to the bank page with the total amount, including the Convenience Fee. + +> **INFO** +> +> +> **Handy Tips** +> +> Convenience Fees are collected in a similar fashion at Custom UI Checkout. +> + +## Reports + +Convenience Fees reflect on all the reports in the same format as on the checkout. The charge is added to the total amount in the reports. Reports can be generated from the Dashboard under the **Reports** tab. + +## Communication + +You should inform the customers about the Convenience Fees. We do not notify the customer of the Convenience Fees except at checkout. In the Razorpay Payment Acknowledgement email on successful payment, the Convenience Fees are added to the total amount. + +> **WARN** +> +> +> **Watch Out!** +> +> The email does not contain the payment breakup to indicate the Convenience Fees separately but is added to the total amount. +> diff --git a/llm-content/payments/dashboard/account-settings/configuration/convenience-fees/international-payments.md b/llm-content/payments/dashboard/account-settings/configuration/convenience-fees/international-payments.md new file mode 100644 index 00000000..f50fd892 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/configuration/convenience-fees/international-payments.md @@ -0,0 +1,81 @@ +--- +title: Collect Convenience Fees on International Payments +description: Charge convenience fees on international payments. +--- + +# Collect Convenience Fees on International Payments + +For every international payment done using Razorpay, we levy a nominal platform fee. You can choose to charge a Convenience Fee to your international customers for the use of technology infrastructure. Using the Convenience Fee Model, you can allow customers to pay in their native or any other currency and view the applicable Convenience Fee on the Checkout page. + +> **INFO** +> +> +> +> **Handy Tips** +> +> This feature is currently supported for specific business cases only. You can contact our [Support team](https://razorpay.com/support/) to get this feature enabled on your account. +> + +## How it Works + +Given below is the workflow: + +1. Log in to the Dashboard. +2. Select the **Convenience Fee Model** option on the **Settings → Fee Bearer** section of the Dashboard. +3. The customer selects an item on your website/Payment Link/Payment Page and clicks **Pay** button. +4. The checkout pop-up page is displayed. The customer enters the **Phone number and Email**. + ![customer details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cfb-dcc-phone-no-details.jpg.md) + +5. The customer selects the payment method on the checkout page and tries to make the payment. + ![card details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cfb-dcc-card-details.jpg.md) + +6. The customers also get the option to change the currency as per their choice. Based on the selected currency, the **Fees Breakup** page containing the **Convenience Fee** appears, and the customer clicks **Continue**. + ![Fees breakup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cfb-dcc-charges-breakup.jpg.md) + +7. The customer is redirected to the bank page with the total amount, including the Convenience Fee. + +## Reports + +Convenience Fees on international payments will reflect on all the reports in the same format as on the checkout. The charge is added to the total amount in the reports. Reports can be generated from the Dashboard under the **Reports** tab. + +## Communication + +You should inform the customers about the Convenience Fee on international payments. We do not notify the customers of the Convenience Fee except at checkout. In the Razorpay Payment Acknowledgement email on successful payment, the Convenience Fee are added to the total amount. + +## Frequently asked questions (FAQs) + +#### 1. What is a customer fee bearer or Convenience Fee model? +For every payment done using Razorpay, we levy a nominal platform fee. You can choose to charge a Convenience Fee from customers, which is called the Convenience Fee model. + +#### 2. How does Razorpay collect Convenience Fee from the customer? +Convenience Fees are seamlessly added on the Razorpay Checkout without disrupting the checkout experience for the customers. + +#### 3. Which all currencies are supported? +Refer to the [list of currencies ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that support the Convenience Fee model. + +#### 4. How to enable this feature? +Follow these steps to enable the feature: +1. Log in to the Dashboard. +2. Navigate to Settings → Configurations. +3. Select the Convenience Fee Model option in the Fee Bearer section. + +#### 5. How does a refund work? +If a refund is initiated, your customers receive the Convenience Fees and the actual payment amount. + +#### 6. Do I qualify for such a feature? +This feature is supported for most international businesses on Standard Checkout, provided they meet the necessary business requirements. You can contact our [Support team](https://razorpay.com/support/) to get this feature activated on your account. +However, if your account has PayPal enabled, this feature will not be supported. + +#### 7. What all payment methods are supported? +We support this feature on the following methods: +- International debit / credit cards +- Instant bank transfer (Trustly, Poli, Sofort and Giropay) +- We do not support Paypal on Convenience Fee bearer as Razorpay does not charge any platform fee for PayPal transactions. Hence this fee can not be passed on to customers from Razorpay. + +#### 8. Which integrations are supported? +Currently, this feature is available on Standard Checkout only. + +### Related Information + +- [Convenience Fee Model](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/configuration/convenience-fees.md) +- International Payment Support diff --git a/llm-content/payments/dashboard/account-settings/credits.md b/llm-content/payments/dashboard/account-settings/credits.md new file mode 100644 index 00000000..160ace9f --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/credits.md @@ -0,0 +1,309 @@ +--- +title: Credits +description: Know about the Amount credits, Fee credits and Refund credits available to you. Manage them and configure alerts from the Razorpay Dashboard. +--- + +# Credits + +There are three types of credits [Amount credits](#amount-credits), [Fee credits](#fee-credits) and [Refund credits](#refund-credits). You can view and add funds to these credits from the Dashboard. Also, you can [configure alerts](#credit-alerts) to receive email notifications when your credits fall below the set threshold. + +![Manage Credits on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/credits-overview.jpg.md) + +## Amount Credits + +Amount credits are the credits against which you can receive payments without any fee deduction. + +> **WARN** +> +> +> **Amount credits availablility for businesses** +> +> - **Registered Businesses**: Cannot use Amount credits for prepaid cards or corporate credit cards. +> - **Unregistered Businesses**: Cannot use Amount credits for prepaid cards, credit cards or corporate credit cards. +> + + +### Example + + If you have a credit of , you will not be charged any fees for payments up to . However, if a transaction exceeds (for example, ), fees apply to the entire amount, and you cannot use your credits for this transaction. Amount credits might be assigned to your account during sign-up if runs promotional campaigns. + + + +### View Amount Credits + + You can view the Amount credits assigned to your Dashboard account. However, you cannot add any funds to this credit. + + + + To view Amount credits history: + + 1. Log in to the Dashboard. + 2. Click **Account & Settings** in the left navigation. + 3. Click **Credits** under **Payments and refunds** section. + 4. Click **Past Coupons** under **Amount Credits**. + + ![View amount credits on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-credits-amount-credits.jpg.md) + + A list of Amount credits assigned to the account in the past is displayed. + + + + +## Fee Credits + +Fee credits are the credits using which businesses can receive the full settlement amount without any fee deduction. Specific business categories use these credits to help them meet regulatory requirements. + + +### Example + + If you have a fee credit of , all the transactions will be settled in full, and the fees for these payments will be deducted from the ₹100 fee credit. + + + +### Add Fee Credits + + + + You can add funds to Fee credits using the Dashboard through UPI or Bank Transfer. + + +> **WARN** +> +> +> **Watch Out!** +> +> You should add funds only through the settlement account registered with us. +> + + + + + + To add Fee Credits using UPI: + 1. Log in to the Dashboard. + 2. Click **Account & Settings** in the left navigation. + 3. Click **Credits** under **Payments and refunds** section. + 4. Click **Add Fee Credits**. + ![Add Fee Credits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-fee-credits.jpg.md) + 5. Select **UPI**. + 6. Enter the description and amount to be added. + 7. Click **Add Credits**. + 8. Enter the email and contact number on the checkout pop-up page and click **Proceed**. + 9. Select UPI, enter UPI ID or scan the QR, click **PayNow** and complete the payment. + + Your Fee credits balance is updated. + + +> **INFO** +> +> +> **Handy Tips** +> +> It may take 2-3 hours for the credits to reflect in your account. +> + + + + To add Fee Credits using Bank Transfer: + + 1. Log in to the Dashboard. + 2. Click **Account & Settings** in the left navigation. + 3. Click **Credits** under **Payments and refunds** section. + 4. Click **Add Fee Credits**. + ![Add fee credits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-fee-credits.jpg.md) + 5. Select **Bank Transfer**. + 6. Copy the account number and IFSC code. + ![Copy IFSC and account number](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/copy-ifsc.jpg.md) + 7. Open your netbanking portal, create a beneficiary with these details and transfer the amount. + + +> **INFO** +> +> +> **Handy Tips** +> +> It may take 2-3 hours for the credits to reflect in your account. +> + + + + + + + + + Your Fee credits balance is updated. + + + +### View Fee Credit History + + You can view the Fee credits previously added by you. + + + + To view Fee credit history: + + 1. Log in to the Dashboard. + 2. Click **Account & Settings** in the left navigation. + 3. Click **Credits** under **Payments and refunds** section. + 4. Click **View History** under **Fee Credits**. + + A list of Fee credits previously added by you is displayed. + + ![View fee credit history](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-credits-fee-credit-history.jpg.md) + + + + + + +## Refund Credits + +Refund credits are the credits you can use to make refunds to customers. This ensures that the refunds are not made from your settlement amount but from a separate credit pool. + + +### Example + + If you have a Refund credit of , any refunds to be processed will be deducted from this credit and not from the actual payment. + + + +### Add Refund Credits + + + + You can add funds to Refund credits using the Dashboard through either UPI or Bank Transfer. + + +> **WARN** +> +> +> **Watch Out!** +> +> You should add funds only through the settlement account registered with us. +> + + + + + + To add Refund credits using UPI: + + 1. Log in to the Dashboard. + 2. Click **Account & Settings** in the left navigation. + 3. Click **Credits** under **Payments and refunds** section. + 4. Click **Add Refund Credits**. + ![Add refund credits from the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-refund-credits.jpg.md) + 5. Select **UPI**. + 6. Enter the description and amount to be added. + 7. Click **Add Credits**. + 8. Enter the email and contact number on the checkout pop-up page and click **Proceed**. + 9. Select UPI, enter UPI ID or scan the QR, click **PayNow** and complete the payment. + + Your Refund credits balance is updated. + + +> **INFO** +> +> +> **Handy Tips** +> +> It may take 2-3 hours for the credits to reflect in your Razorpay account. +> + + + + To add Refund credits using bank transfer: + + 1. Log in to the Dashboard. + 2. Click **Account & Settings** in the left navigation. + 3. Click **Credits** under **Payments and refunds** section. + 4. Click **Add Refund Credits**. + ![Add refund credits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-refund-credits.jpg.md) + 5. Select **Bank Transfer**. + 6. Copy the account number and IFSC code. + ![Copy IFSC and account number](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/copy-ifsc.jpg.md) + 7. Open your netbanking portal, create a beneficiary with these details and transfer the amount. + + +> **INFO** +> +> +> **Handy Tips** +> +> It may take 2-3 hours for the credits to reflect in your Razorpay account. +> + + + + + + + + + + +### View Refund Credit History + + You can view the Refund credits previously added by you. + + + + To view Refund credit history: + 1. Log in to the Dashboard. + 2. Click **Account & Settings** in the left navigation. + 3. Click **Credits** under **Payments and refunds** section. + 4. Click **View History** under **Refund Credits**. + + A list of Refund credits previously added by you is displayed. + + ![View refund credit history](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-credits-refund-credit-history.jpg.md) + + + + + + +## Credit Alerts + +You can configure alerts to receive email notifications when any of your credits fall below the set threshold amount. This helps you monitor your credit balance and add funds to them whenever necessary. + +You can set three alert levels, wherein: + +- Alert Level 1: Level set by you on the Dashboard. +- Alert Level 2: Automatically set as 50% of Alert Level 1. +- Alert Level 3: Automatically set as 25% of Alert Level 1. + + +### Example + + You can set your Refunds credit alert as . This means that whenever your Refund credits balance falls below: + - : The first email is sent to your registered email address. + - : The second email is sent. + - : The third and final email is sent. + + + +### Configure Credit Alerts + + + + You can configure credit alerts using the Dashboard. + + To configure alerts: + + 1. Log in to the Dashboard. + 2. Click **Account & Settings** in the left navigation. + 3. Click **Credits** under **Payments and refunds** section. + 4. Click **Manage Alerts**. + 5. Set up the alerts for each credit type. You need to enter the value of Alert Level 1 only. + + +> **INFO** +> +> +> **Handy Tips** +> +> If you do not want to receive any alerts, set the value to `0`. +> diff --git a/llm-content/payments/dashboard/account-settings/customer-support-details.md b/llm-content/payments/dashboard/account-settings/customer-support-details.md new file mode 100644 index 00000000..e911c617 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/customer-support-details.md @@ -0,0 +1,29 @@ +--- +title: Customer Support Details +description: Steps to add or update your business' customer support details on the Razorpay Dashboard. +--- + +# Customer Support Details + +You can add your support details to the transaction emails sent to your customers. This will help your customers know how to reach you for any queries. + +## Add Support Details + +To add support details: +1. Log in to the Dashboard. +2. Click **Account & Settings** and navigate to **Customer support details** under **Business settings** section. + ![Add Customer Support Details on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-dashboard-customer-support-details-add.jpg.md) +3. Click **Add** and enter: + - Phone Number + - Email + - Website/ Contact Us Link +4. Click **Submit**. + +## Edit Support Details + +To edit support details: +1. Log in to the Dashboard. +2. Click **Account & Settings** and navigate to **Customer support details** under **Business settings** section. +3. Navigate to the phone number, email or website/contact us link field and click **Edit**. + ![Edit Customer Support Details on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-dashboard-customer-support-details-edit.jpg.md) +4. Click **Submit**. diff --git a/llm-content/payments/dashboard/account-settings/email-sms-whatsapp.md b/llm-content/payments/dashboard/account-settings/email-sms-whatsapp.md new file mode 100644 index 00000000..d39c501f --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/email-sms-whatsapp.md @@ -0,0 +1,65 @@ +--- +title: Email, SMS and WhatsApp Notifications +description: Steps to add or update notification settings on the Razorpay Dashboard. +--- + +# Email, SMS and WhatsApp Notifications + +You can configure email, SMS and WhatsApp notification settings on the Dashboard. + +## Manage Email Notifications +You can configure the email addresses to receive email notifications like payments received, daily payment reports and webhooks. You will also receive an email notification for both successful and failed settlements. + +> **INFO** +> +> +> **Handy Tips** +> +> Settlement emails will be sent to the email addresses provided on the Dashboard. +> + + +### To enable email notifications: + + 1. Log in to the Dashboard. + 2. Click **Accounts & Settings** and go to **Email** under **Notification settings**. + 3. Enter email addresses under **Email Notifications**. If you want to enter multiple email addresses, separate them by a comma. + + +## Manage SMS Notifications + +You can enable **SMS Notifications** to receive SMS notifications for successful and failed settlements. + + +### To enable SMS notifications: + + 1. Log in to the Dashboard. + 2. Click **Accounts & Settings** and go to **SMS** under **Notification settings**. + 3. Enable **SMS Notifications**. + + ![Manage SMS Notifications](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/manage-sms-notifications.jpg.md) + After SMS notifications are enabled, you start receiving notifications on the registered phone number. By default, this feature is set to **Enabled**. You can disable it using the toggle button. + + +## Manage WhatsApp Notifications +You can receive WhatsApp notifications regarding settlements, account configuration changes and more on your registered contact number. You can enable this feature during the sign-up process or later from the Dashboard. + +> **INFO** +> +> +> +> **Handy Tips** +> +> This feature is available only to the owner user role. Know about the various [user roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md). +> + + +### To enable WhatsApp notifications: + + 1. Log in to the Dashboard. + 2. Click **Accounts & Settings** and go to **WhatsApp** under **Notification settings**. + 3. Enable **WhatsApp Notifications**. + + ![Manage WhatsApp Notifications](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/manage-whatsApp-notifications.jpg.md) + + After WhatsApp notifications are enabled, you start receiving notifications on the registered number. You can disable the WhatsApp notifications from the Dashboard. diff --git a/llm-content/payments/dashboard/account-settings/firs.md b/llm-content/payments/dashboard/account-settings/firs.md new file mode 100644 index 00000000..fcfeecfd --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/firs.md @@ -0,0 +1,44 @@ +--- +title: FIRS +description: Steps to generate FIRS certificate from the Razorpay Dashboard. +--- + +# FIRS + +FIRS Certificate is a document that acts as evidence that you have received funds from a foreign country. The document is recognised as proof in scenarios such as getting GST refunds, claiming drawbacks from the government, or being required by beneficiary banks for compliance purposes. You can now generate FIRS from the Dashboard. Know more about [FIRS Automated Process](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/firs-automated-process.md). + +## Generate FIRS Certificate + +All new and existing users accepting international payments can easily obtain the FIRS certificate on the Dashboard in a downloadable format. + +To generate FIRS certificate: + +1. Log in to the Dashboard and navigate to **Account & Settings**. +2. Under **International payment settings** click **Foreign inward remittance statement (FIRS)**. +3. You can view a list of FIRS certificates based on your monthly transactions in a downloadable format. + ![List of FIRS certificates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-ip-firs-view-new.jpg.md) +4. There are two sections. + - The FIRS certificates provided by the bank. + - Razorpay-generated statements. + +> **INFO** +> +> +> **Handy Tips** +> +> Razorpay-generated statements act as an alternative to FIRS certificates provided by banks. +> + +![List of FIRS certificates downloadable format](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-ip-firs6.jpg.md) + +If the FIRS is not generated from the bank or you need a consolidated list of FIRS, click on **Request for Razorpay Statement**. You can view or download the FIRS certificate from your Dashboard. +![FIRS request screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-no-firs.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> Generating reports can take up to 1 hour. +> ![FIRS request sent screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-firs-request-new.jpg.md) +> diff --git a/llm-content/payments/dashboard/account-settings/gst-details.md b/llm-content/payments/dashboard/account-settings/gst-details.md new file mode 100644 index 00000000..eb79c668 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/gst-details.md @@ -0,0 +1,54 @@ +--- +title: GST Details +description: Steps to view your business' GST details on the Razorpay Dashboard. +--- + +# GST Details + +While signing up for a Razorpay account you are required to provide GST-related information. You can find these details recorded on the Dashboard. + +## View GST Details + +To view GST details: + +1. Log in to the Dashboard. +2. Click **Account & Settings** and navigate to **GST Details** under **Business settings** section. +3. The following information is listed: + - **GST Number** + - **Registered Address** + - **Status** + - **Razorpay's GST Number** + +## Add or Update GST details + +You can add or update your GST details from the Dashboard. Your account details like name, business name and registered address will change as per the updated GST details. + +> **INFO** +> +> +> **Handy Tips** +> +> - This feature is available only for registered Razorpay users. +> - Only users with 'Owner' or 'Admin' roles can add or update the GST details. +> + +To add or update GST details: +1. Log in to the Dashboard. +2. Click **Account & Settings** in the left navigation. +3. Click **GST details** under **Business settings** section. + - To add your GST details, click **Add GST details**. + ![Add GST details on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-profile-add-gst-details.jpg.md) + - To update your GST details, click **Update GST details**. +4. In the **Add GST details** pop-up page: + - Enter the GSTIN. This will appear on the invoices sent by Razorpay. + - Upload a copy of the GSTIN Certificate and click **Submit**. + ![Submit GST details on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-profile-add-gst.jpg.md) + +After you provide the details, our team will review the request. During the verification process, we may reach out to you for clarifications. + +### Frequently Asked Question (FAQs) + + +### 1. After updating the GST details, will the older invoices still be associated with my old GST value? + + Yes, invoices downloaded before updating the GST details will have the older value of GSTIN associated with them. diff --git a/llm-content/payments/dashboard/account-settings/international-payment-codes.md b/llm-content/payments/dashboard/account-settings/international-payment-codes.md new file mode 100644 index 00000000..eeabb50d --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/international-payment-codes.md @@ -0,0 +1,61 @@ +--- +title: International Payment Codes +description: Steps to configure international payment codes (purpose code, IEC code, HS code) on the Razorpay Dashboard. +--- + +# International Payment Codes + +allows foreign (non-Indian) businesses to accept payments from Indian customers without any additional paperwork or registration. + +## Accept Payments From Indian Customers + +Follow the steps given below to onboard and accept payments from Indian customers: + +1. Log in to the Dashboard. +2. Navigate to **Account & Settings**. +3. You must provide the Purpose Code information when applying for international payments. + 1. Click **International Payment Codes** under **International payment settings**. + ![International payment codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/firs-purpose-code-update-new.jpg.md) + 2. Update your purpose code under the **International Payment Codes** section. + ![Purpose code update](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/firs-purpose-code-update2-new.jpg.md) + 3. Select the appropriate **Purpose Code**. + + Based on your business requirements, you also need to provide your **HS Code** or **IEC Code**. + + + 1. Click **International Payment Codes** under **International payment settings**. + 2. Update your HS Code under the **International Payment Codes** section. + 3. Select the appropriate **Harmonised System Code**, also known as HS Code. + +> **INFO** +> +> +> **Handy Tips** +> - For Software: HSCode is **85238020** and HSDescription is **Other Information technology software**. +> - For Goods: Refer to the list from the [DGFT website](https://www.dgft.gov.in/CP/). +> + + + + 1. Click **International Payment Codes** under **International payment settings**. + 2. Update your **IEC Code** under the **International Payment Codes** section. + 3. Select the appropriate **Purpose Code**. + 4. Enter the 10-digit Importer/Exporter Code (IEC) and click **Next**. + ![Import Export Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/import-export-code.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> The IEC is a code issued by the Indian Director General of Foreign Trade (DGFT) to Indian companies that intend to export from India. You can apply for an IEC at the [DGFT website](https://www.dgft.gov.in/CP/). +> +> The IEC code input screen appears for specific purpose codes, (P0103) being one of them. +> + + + + +4. Review and click **Confirm**. The Razorpay Activation/Operations team verifies the selected **Purpose Code**. + +As consumers or buyers, you get an option to make payments through the Razorpay Payment Gateway. On selecting Razorpay, various payment methods will be displayed on Razorpay checkout to complete the payment. diff --git a/llm-content/payments/dashboard/account-settings/manage-team.md b/llm-content/payments/dashboard/account-settings/manage-team.md new file mode 100644 index 00000000..2455d530 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/manage-team.md @@ -0,0 +1,691 @@ +--- +title: Payments Dashboard | Manage Team +heading: Manage Team +description: Manage your team, add or remove users and provide appropriate roles to control access on the Razorpay Dashboard. +--- + +# Manage Team + +Manage your team of users who can access the Dashboard. You can provide specific access to a user or a set of users. + +**Example** + +You need someone in your organisation to perform day-to-day operations such as handling refunds and settlements. In this case, you can give Dashboard access to a person and assign the **Operations** role. This limits their access to actions related to refunds and settlements only. + +## Standard User Roles + +There are some predefined user roles that you can assign to your team members. You can use these roles to limit a user's access to the Dashboard. Check each role and the permissions associated with it. + + +### Owner + + **Actions Allowed** + + - Generate API keys + + - Create and manage webhooks + + - Manage teams + + - Update brand name + + - Edit activation form details, including bank account details and GST number, before submission + + - View all transactions and settlements + + + + + - Configure payment capture settings + + - Configure payment methods + + - Capture transactions + + + - Create and manage Payment Pages and Payment Links. + + + - Create and upload batch files + + - Download and email reports + + + + + - View and download API/webhooks logs (Developers > APIs/Webhooks) + + + + + +### Pseudo Owner + + The Pseudo Owner role provides full owner-level access to trusted team members for business continuity when the primary owner is unavailable (on leave, travel or emergencies). This role has identical permissions to the Owner role with enhanced audit tracking. + + **Actions Allowed** + + - All permissions identical to Owner role + + - Generate API keys + + - Create and manage webhooks + + - Manage teams (invite, modify, deactivate users) + + - Update brand name + + - Edit activation form details, including bank account details and GST number + + - View and modify settlement bank account details + + - View all transactions + + + + + - Configure payment capture settings + + - Configure payment methods + + - Capture transactions + + + - Create and manage Payment Pages and Payment Links. + + + - Create and upload batch files + + - Download and email reports + + + + + - View and download API/Webhooks logs + + + + **Actions Not Allowed** + + - Delete the primary owner account + + + + +> **WARN** +> +> +> **Watch Out!** +> +> - Maximum of 2 Pseudo Owners allowed per Razorpay account. +> - Assignment requires additional authentication (OTP/2FA). +> - Owner receives email confirmation when a Pseudo Owner is assigned. +> - All actions are logged with "Pseudo Owner" designation for audit purposes. +> +> + + + + + +### View-Only (Auditor) + + The View-Only role provides complete visibility into all Dashboard data without any ability to perform actions or make changes. This role is designed for stakeholders who need to monitor, review or audit your payment operations. + + **Actions Allowed** + + - View all transactions + + + - View analytics and insights + + - View configuration and settings pages (read-only) + + - Navigate all Dashboard sections + + + + **Actions Not Allowed** + + - Generate API keys + + - Create and manage webhooks + + - Manage teams + + - Capture transactions + + + + - Create and manage Razorpay Invoices, Payment Pages, Payment Links + + - Edit activation form details, including bank account details + + - Create and upload batch files + + - Download or export files + + - Edit any settings or configurations + + + - Modify API keys or webhook URLs + + - Change account settings, bank details or KYC information + + + + +> **WARN** +> +> +> **Watch Out!** +> +> +> - All operational buttons (Refund, Create Payout, Edit Settings, Save) are hidden or disabled. + +> - Form fields on configuration pages are displayed in read-only mode. + +> - Attempting any restricted action displays: "Permission Denied. Please contact the owner." + +> - All page views are logged for audit and compliance purposes. + +> +> + + + +> **INFO** +> +> +> **View-Only (Auditor) Role is Best For** +> +> +> - Internal and external auditors + +> - Compliance officers + +> - Senior management and executives + +> - Business analysts + +> - Regulatory reviewers + +> +> + + + + + +### Admin + + **Actions Allowed** + + - Generate API Keys + + - Create and manage webhooks + + - Update brand name + + - Edit activation form details, including bank account details and GST number, before submission. + + - Configure payment methods + + - View all transactions + + + + + - Capture transactions + + + - Create and manage Payment Pages and Payment Links. + + - Create and upload batch files + + - Download and email reports + + + + + + **Actions Not Allowed** + - Manage Teams + + + +### Manager + + **Actions Allowed** + + - Create and manage webhooks + + - Edit activation form details, including GST number, before submission + + - Configure payment capture settings + + - Configure payment methods + + - View all transactions + + + + + - Capture transactions + + + - Create and manage Payment Pages and Payment Links. + + - Create and upload batch files + + - Download and email reports + + + + + **Actions Not Allowed** + + - Generate API Keys + + - Manage Teams + + + + + + +### Operations + + **Actions Allowed** + + - View all transactions + + + + + - Capture transactions + + + - Create Payment Links and Payment Pages. + + - Create and upload batch files + + - Download and email reports + + + + + **Actions Not Allowed** + + - Generate API Keys + + - Manage Teams + + - Edit activation form details, including bank account details and GST number, before submission + + + + + + +### Finance + + **Actions Allowed** + + - Edit activation form details including GST number, before submission + + - View all transactions + + + + + - Create and upload batch files + + - Download and email reports + + + **Actions Not Allowed** + + - Generate API Keys + + - Create and manage webhooks + + - Manage Teams + + - Capture transactions + + + - Create and manage Payment Pages and Payment Links. + + + + + + +### ePos + + **Actions Allowed** + + - Create Payment Links in INR only + + + - Create, view and edit Payment Page + + + + + + **Actions Not Allowed** + + - Generate API Keys + + - Edit activation form details including GST number, before submission + + - Create and manage webhooks + + - Manage Teams + + - View all transactions + + + + + - Capture transactions + + + + - Create and upload batch files + + - Download and email reports + + + - View Payment Pages, Payment Links created by other users + + + + + +### Dispute Manager + + The Dispute Manager role is designed for team members who handle chargebacks and payment disputes. This role provides focused access to dispute management functions while restricting access to sensitive financial operations. + + **Actions Allowed** + + - View all disputes and dispute details + + - Accept disputes + + - Contest disputes and submit evidence + + - Download dispute reports + + - Search and filter disputes + + - View dispute summary metrics (pending, accepted, contested) + + + + **Actions Not Allowed** + + - Generate API keys + + - Create and manage webhooks + + - Manage teams + + - View transactions (except dispute-related context) + + - View settlements + + - View or edit bank account details + + - Create refunds + + - Capture transactions + + - Edit activation form details + + - Edit Razorpay account or business settings + + - Create and manage Razorpay Invoices, Payment Pages, Payment Links + + - Create and upload batch files (non-dispute) + + - Download reports (except dispute reports) + + + + + + +> **INFO** +> +> +> **Dispute Manager Role is Best For** +> +> - Dedicated chargeback teams. +> - Customer support specialists handling dispute cases. +> - Third-party dispute management agencies. +> + + + + + +### Support + + **Actions Allowed** + + - View all transactions + + + + - Download and email reports other than the monthly invoice report + + + + **Actions Not Allowed** + + - Generate API Keys + + - Create and manage webhooks + + - Manage Teams + + - Edit activation form details, including bank account details and GST number, before submission + + - Capture transactions + + + - Create and manage Payment Pages and Payment Links. + + + - Create and upload batch files + + - Access monthly invoice report + + + + +> **INFO** +> +> +> **Handy Tips** +> +> A team member can be assigned only one role, as each role is tied to a specific email address. A user can have multiple roles if they have different email addresses. +> + +> **INFO** +> +> +> **Handy Tips** +> +> - A team member should be assigned a role as the role is tied to an email address. A user can have multiple roles if they have different email ids. +> - Use the [Dispute Manager](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md#dispute-manager) role for team members who only need to handle chargebacks without access to refunds or bank details. +> - Use the [Pseudo Owner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md#pseudo-owner) role sparingly for trusted individuals who need to manage the account when the Owner is unavailable. +> - Use the [View-Only](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md#view-only-auditor) role for auditors and stakeholders who need visibility without operational access. +> + + +### Invite a Registered User + + 1. Log in to the Dashboard. + 2. Navigate to the **Account & Settings** → **Business settings** and click **Manage Team**. + 3. Click **Invite New Member**. + 4. Type in the email address of the user whom you want to invite. Select a role from the drop-down list. + 5. Click **Send Invitation** to invite the user. A list of accepted and pending invitations is displayed on the same page. + 6. Click **Resend** to re-invite the user or **Cancel** to cancel the invitation. + + + + +### Accept Invite - Existing User + + To accept an invitation: + + 1. Log in to the Dashboard. + 2. Navigate to the **Account & Settings** → **Business settings** and click **Invitations**. + 3. Click **Accept** next to the invite. + + + + ![Accept invite to be team member (for an existing Razorpay user)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-accept-invitation.jpg.md) + + + + +> **INFO** +> +> +> +> **Switching Accounts** +> +> After accepting the invite, the invited user can switch between their and your account using the **Switch Merchant** option available on the Dashboard header. +> You cannot access their account unless they invite you to join their team. +> + + + + +### Invite a New User + + You can invite a user who is not registered with to join your team. Such users are sent an invitation link via email. + + To invite a new user: + + 1. Log in to the Dashboard. + 2. Navigate to the **Account & Settings** → **Business settings** and click **Manage Team**. + 3. Click **Invite New Member**. + 4. Enter the member's email id and select the user role to be assigned. + 5. Click **Send Invitation**. + + + + ![Send invite to new member (for a new Razorpay user)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-invite-new-user.jpg.md) + + + + + +### Update Role of a User + + You can change the user's role after the invitation is sent to the user or after the invitation is accepted by the user. + + To update a user's role: + + 1. Log in to the Dashboard. + 2. Navigate to the **Account & Settings** → **Business settings** and click **Manage Team**. + 3. Select the new role for the user from the drop-down. + 4. Click **Update**. + + + +### Remove a User + + You can remove a user from your team to remove their complete access from your Dashboard. + + To remove a user from your team: + + 1. Log in to the Dashboard. + 2. Navigate to the **Account & Settings** → **Business settings** and click **Manage Team**. + 3. Click **Remove** to remove a user from the **Team Member** list. Once removed, the user can no longer access your Dashboard. + 4. Click **Cancel** to remove a user from the **Pending Invitations** list. + + + +### Enable 2-Step Verification (2FA at Team Level) + + You can set 2-step verification for your entire team for enhanced security and protection of your Dashboard data thus preventing malicious attacks or misuse of your sensitive business data. + + To enable 2-step verification for your team: + + 1. Log in to the Dashboard. + 2. Navigate to the **Account & Settings** → **Business settings** and click **Manage Team**. + 3. Enable the **2-Step Verification to the team** option. + 4. Enter the OTP sent to your registered mobile device. (This step is not required if you had already performed OTP verification during login.) + 5. Enter your account password and confirm. + + You have now set up 2FA for your entire team. + + +## Frequently Asked Questions (FAQs) + + +### 1. What to do if a user account is locked? + + If a user enters the wrong OTP 9 times, their account will be locked for security reasons. In such scenarios, the user should contact their respective account owner. The account owner can unlock the users' accounts. + + + +### 2. What to do if a user loses their mobile device? + + If a user loses their mobile device, they should reach out to their respective account owner. The account owner can **Invalidate 2FA** for the user, that is reset 2FA for the user. The user will be asked to enter their mobile number the next time they log in to the Dashboard. + + + +### 3. What to do if the account owner is locked? + + If you are the account owner and have entered the wrong OTP 9 times, your account will be locked for security reasons. In such scenarios, contact our [Support Team](https://razorpay.com/support/#request) to **Reset 2FA** for your account. + + + +### 4. What to do if the account owner loses their mobile device? + + If you are the account owner and have lost your mobile device, contact our [Support Team](https://razorpay.com/support/#request) to **Reset 2FA** for your account. + + + + +### 5. What is the Dispute Manager role? + + The Dispute Manager role is designed for team members who handle chargebacks and payment disputes. Users with this role can view, accept and contest disputes and download dispute reports. They cannot create refunds or access settlement/bank details. This role is ideal for dedicated chargeback teams or third-party dispute management agencies. + + + +### 6. What is the Pseudo Owner role? + + The Pseudo Owner role provides full owner-level access to trusted team members for business continuity. It is useful when the primary owner is unavailable (on leave, travel or emergencies). Pseudo Owner role has the same permissions as the Owner role except they cannot delete the primary owner account. A maximum of 2 Pseudo Owners can be assigned per account and assignment requires additional authentication. + + + +### 7. What is the View-Only (Auditor) role? + + The View-Only role provides read-only access to all Dashboard data. Users with this role can view transactions, settlements, disputes and settings but cannot perform any actions or make changes. This role is ideal for auditors, compliance officers and senior management who need visibility without operational access. All page views are logged for audit purposes. + + + +### 8. How many Pseudo Owners can I have? + + You can provide Pseudo Owner access to a maximum of 2 users for each Razorpay account. If you need more, contact [Razorpay support](https://razorpay.com/support/#request) to discuss your requirements. + + + +### 9. Can a Dispute Manager issue refunds? + + No, Dispute Managers cannot create refunds. If a refund is needed to resolve a dispute, the Dispute Manager must coordinate with a team member who has refund permissions (Owner, Pseudo Owner, Admin, Manager or Operations roles). + + + +### 10. Can a View-Only user download reports? + + No, users with view-only access can only view reports and data on the Dashboard. They cannot download or export files. This restriction helps maintain data security for audit and compliance purposes. diff --git a/llm-content/payments/dashboard/account-settings/payment-configuration.md b/llm-content/payments/dashboard/account-settings/payment-configuration.md new file mode 100644 index 00000000..09684df4 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/payment-configuration.md @@ -0,0 +1,138 @@ +--- +title: Payment Configuration +description: Select the payment methods and instruments you want to display, rearrange them to customise your checkout and create custom payment blocks for different customers. +--- + +# Payment Configuration + +Perform multiple configurations related to the payment methods and instruments that you want to show on your checkout page. + +- Choose the payment methods and instruments you want to display at checkout +- Arrange them in your preferred order +- Create custom payment blocks for specific customer segments, ensuring they see the most relevant options. + +This enhances the user experience, improves discoverability and boosts conversion rates. + +> **INFO** +> +> +> **Handy Tips** +> +> - You can hide, show, create custom blocks and rearrange payment methods and instruments as required, but you cannot enable or disable them from this setting. Know more about how to [enable/disable payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md#enable-payment-methods). +> - You can switch between mobile and desktop views to preview changes. +> + +## View Default Configuration + +To view Razorpay's default payment configuration: +1. Navigate to **Accounts & Settings** → **Payment Configuration** under **Checkout settings** section. +2. Click **View** against the **Standard Payment Options** section. This setting is read-only and cannot be edited. +![Navigate to payment config and view the standard payment options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/editor-view-std.gif.md) + +## Configure Payment Options + +Follow these steps to configure your payment options: + +1. Log in to the Dashboard. +2. Navigate to **Accounts & Settings** → **Payment Configuration** under **Checkout settings** section. Following are the types of configurations: + + +### Basic Configuration + + You can customise the payment options to display only the methods you want your customers to see, instead of Razorpay's default configuration. + 1. Click **Create a custom payment configuration**. + 2. Enter the **Configuration name** and click **Save**. + ![Create custom config on Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/editor-custom-config.gif.md) + 3. By default, all payment methods available on your account are enabled. You can show or hide payment methods as needed. Additionally, you can rearrange them in your preferred order by dragging and dropping, based on customer preferences, success rates, or usage frequency. + ![Hide/Show and Rearrange Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/editor-hide-rearrange.gif.md) + 4. Click **Save all changes**. + + + +### Advanced Configuration + + Create custom blocks to highlight specific payment methods or instruments above other options. You can create multiple custom blocks as required. + 1. Click the plus icon next to **Create a custom payment block** + 2. Enter a block name. For example, **Preferred Methods**. This appears at checkout as a separate section above the default standard payment options. + 3. Click **+ Add a single payment instrument** to highlight a specific instrument. + 4. Select a payment method from the drop-down and choose a payment instrument. + 5. Click **Save**. + ![Create Custom Blocks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/editor-custom-block.gif.md) + 6. You can further customise the following payment methods. Select a payment method: + + + Show/hide UPI QR Code, UPI Apps and UPI ID/Number. + ![Configure UPI payment option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/editor-customise-upi.gif.md) + + + Show/hide specific banks. + ![Configure Netbanking payment option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/editor-customise-netbanking.gif.md) + + + Configure card payment options based on: + - **Card Type**: Show/hide debit and credit cards. + - **Card Provider**: Choose from available card networks. + - **Card Issuer**: Select specific issuers. + - **BIN Number**: Add one or multiple BINs (first 6-8 digits of a card number) to filter eligible cards. The system validates and saves the BINs, ensuring only specified cards are allowed for transactions. + ![Configure card payment options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/editor-customise-card.gif.md) + + + Configure EMI payment options based on: + - **Card Type**: Show/hide debit and credit cards. + - **Card Provider**: Select the EMI card networks from the list. + - **Card Issuer**: Select the card issuer from the list. + - **BIN Number**: Add one or multiple BINs (first 6-8 digits of a card number) to filter eligible cards. The system validates and saves the BINs, ensuring only the specified cards are eligible for EMI plans. + ![Configure EMI payment options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/editor-customise-emi.gif.md) + + + Show/hide various providers of wallets. + ![Configure wallet payment option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/editor-customise-wallet.gif.md) + + + Show/hide various providers of pay later. + ![Configure pay later payment option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/editor-customise-pay-later.gif.md) + + + Show/hide cash on delivery. + ![Configure COD payment option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/editor-customise-cod.jpg.md) + + + 7. Click **Save all changes**. If you have multiple custom blocks, drag and drop them to rearrange them in your preferred order. + ![Rearrange multiple custom blocks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/editor-rearrange-custom-blocks.gif.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> To delete a block, navigate to your saved payment configurations. Identify the block, scroll to the bottom and click **Delete block** → **Delete** → **Save all changes**. +> + + + + + +### Save Configuration as Default + +If needed, you can save a configuration as the default, which displays the payment methods to your customers based on this setup. + +1. Identify the configuration you want to set as default and click on the options icon → **Save as Default**. Click **Save all changes**. +2. Once saved, this configuration will be displayed to your customers at checkout. + ![Save configuration as default](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/editor-set-default.gif.md) +3. All the changes will reflect on the **Checkout** page, **Invoices**, **Payment Button**, **Webstore**, **Payment Links** and **Payment Pages**. +4. Share the Configuration ID with your developer to integrate this setup. You can also define conditions for displaying this configuration to a particular set of customers by using the Configuration ID. + +### Sample Configuration + +By default, the checkout displays payment options in the following order: + + + ![Payment options order on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/editor-sample-config.jpg.md) + + + + + - **Recommended Methods**: These are automatically determined based on the customer's phone number, prioritising their most frequently used or preferred payment methods. This order cannot be modified or disabled. + - **Custom Blocks**: Payment methods/instruments configured within a custom block, if any. + - **All Payment Methods**: The remaining payment methods displayed based on your configuration. diff --git a/llm-content/payments/dashboard/account-settings/payment-methods.md b/llm-content/payments/dashboard/account-settings/payment-methods.md new file mode 100644 index 00000000..6616af81 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/payment-methods.md @@ -0,0 +1,128 @@ +--- +title: Dashboard | Payment Methods +heading: Payment Methods +description: Enable and disable different Payment Methods from the Razorpay Dashboard. Check how to respond to Action Required statuses. +--- + +# Payment Methods + +Check the available payment methods, enable and disable payment methods or request for new payment methods. + +## View Available Payment Methods + +You can view the payment methods enabled for your account from the **Account & Settings → Payment Methods** tab. You can raise requests for additional payment methods. The requests initiated from this panel are raised with our partner banks and the onboarding process for the payment method is started. + +> **INFO** +> +> +> **Handy Tips** +> +> - This feature is available only on the Live mode of the Dashboard. +- Users with the following User Roles can configure the payment methods: Owner, Admin and Manager. +- You can also accept [international payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#get-started). + +> + +## Enable Payment Methods + +Activation of each of the payment methods involves onboarding with our partner banks. The average activation time is 10 working days, which can vary based on the payment method and banks. + +## Request Payment Methods + + +### To raise a request for a payment method: + + 1. Log in to the Dashboard and select **Account & Settings** on the left navigation. + 2. Click the payment method you want to request under the **Payment Methods** tab, for example, **Cards**. + 3. Click the drop-down on the **Additional details required** tab and click **Add now** to update the business website or GSTIN details. + ![Payment methods - cards - add additional details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-request-payment-method-additional-details.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> The **Additional details required** tab must be updated to request any payment method. +> + + 4. Fill in the business website/app details and click **Proceed to update website/app**. Know more about [how to add website details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/business-website-details.md). + 5. Fill in the GSTIN details and click **Submit**. Know more about [how to add GSTIN details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/gst-details.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> The **Additional details** are requested by our banking partners and are specific to the payment method. +> + + 6. Once you submit all the required information, the status of the information provided changes to **Under Review**. + ![Payment methods under review](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-payment-method-request-under-review.jpg.md) + 7. Once the required information is reviewed and updated, click **Request**. + 8. Fill in the required details and click **Next**. + 9. Click **Submit Request**. + 10. The status of the payment method changes to **Requested**. + + +## Payment Method Request States + +To view the status of your payment method request: + +1. Log in to the Dashboard and navigate to **Account & Settings**. +2. Click any payment method under **Payment methods**. +3. You can view the list of payment methods and providers and their status. + +![Payment methods tab on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-payment-methods-setting_1.jpg.md) + +Some payment methods are enabled by default, while you need to raise a request for others. Below are the various statuses your request can go through. + +Status | Description +--- +**Under Review** | Our team is validating the information provided. +--- +**Updated** | The provided information is verified successfully. +--- +**Requested** | A request has been raised, but no action has been taken yet. +--- +**Cancelled** | A request was initially raised but was later cancelled by you or your team member. +--- +**Pending** | The request has been taken up for onboarding by our partner banks. +--- +**Action Required** | In some cases, we may not be able to fulfil a request as our banking partners seek certain clarifications. For example, there may be some missing information in the activation form. In such cases, the request is placed in the `Action Required` state, along with a comment indicating the actions required from your end. You can [respond to the Action Required](#respond-to-action-required) status. +--- +**Rejected** | The request is rejected for your account. This generally happens due to category restrictions. See the Comments for more information. +--- +**Re-initiated** | The previous request in the `Action Required` state has now been re-initiated after the action is complete. +--- +**Activated** | This indicates that the method is now live and available on standard checkout. + +## Respond to Action Required + +You can respond to any discrepancies or clarifications raised for payment method requests with comments, attachments, or both. + +Our Banking Ops team validates your payment method request. If they find any discrepancies or need further clarification regarding the website or documents, we change the request status from **Pending** to **Action Required**. You can provide these details from the Dashboard. + +To respond to the discrepancies or clarifications requested: +1. On the Dashboard, navigate to **Account & Settings → Payment Methods**. +2. Look for the payment method you requested and click **Update Request Form**. +3. Provide the requested clarifications. +4. Fill in the required details, add attachments if requested, and click **Submit Form**. +5. The status of your request changes from **Action Required** to **Reinitiated**. + +Razorpay re-reviews requests and responds within 7 days. + +## Disable Payment Methods + +## Coverage +The **Payment Methods** tab shows most payment instruments that can be enabled for your account. Keep an eye on this page as we continue to add more payment methods. If you have questions about specific payment methods, please reach out to our +[Support team](https://razorpay.com/support/#request) + +. + +## Pricing + +All methods requested via the Payment Methods tab will be enabled for your account using [Standard Pricing](https://razorpay.com/pricing/) or the default pricing configured for the payment method for your account. + + Sales SPOC for all pricing-related queries. diff --git a/llm-content/payments/dashboard/account-settings/settlement-details.md b/llm-content/payments/dashboard/account-settings/settlement-details.md new file mode 100644 index 00000000..20ede642 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/settlement-details.md @@ -0,0 +1,74 @@ +--- +title: Settlement Details +description: Steps to view your settlement details on the Razorpay Dashboard. +--- + +# Settlement Details + +You can view details regarding your settlement cycle and next settlement date on the Dashboard. + +## View Settlement Details + +To view settlement details: +1. Log in to the Dashboard. +2. Click **Account & Settings** and navigate to **Settlement details** under **Business accounts and settlements** section. +3. You can view the following information: + - **Settlement Details**: Click **View Settlement Cycle** to view default and other settlement cycles. + - **Available Balance**: After the deduction of fees and tax, the payments received from your customers are added to your Available Balance. + - **Next Settlement**: Date and time of next settlement. + +![razorpay settlements details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-settlements-details.jpg.md) + +## Segregated Balances + +If you are an omni-channel business (using both Payment Gateway and POS) or a cross-border business, your balances are **segregated by channel type (Online (Domestic transactions + International Cards), In-person and Alternate Payment Method (International))**. This ensures complete fund isolation and regulatory compliance. + +![razorpay settlements details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-settlements-details-segg-bal.jpg.md) + +### Types of Segregated Balances + +Razorpay maintains separate balances based on your payment channels: + +Channel Type | Description | Transactions Included | Additional Details +--- +Online (Domestic transactions + International Cards) | Domestic online payments and international card transactions | PG domestic transactions (cards, UPI, netbanking and wallets), international card payments | Supports Instant Settlements. +--- +In-Person | POS terminal transactions | All POS/offline transactions | POS device rentals are automatically collected from this balance. Operates independently from online transactions. +--- +Alternate Payment Method (International) | Balance from international payment methods such as PayPal, Stripe and other cross-border payment methods | International bank transfers, cross-border payments via supported APM providers | Settled separately from domestic balances. Subject to forex conversion and international settlement timelines. + +### View Channel-Wise Balances + +To view your segregated balances: + +1. Log in to the Dashboard. +2. Navigate to **Account & Settings → Settlement details**. +3. You will see balance cards for each channel type such as: + + - **Online (Domestic transactions + International Cards)**: Balance from domestic online payments and international card transactions. + - **In-Person**: Balance from POS terminal transactions (all POS/offline transactions). + - **Alternate Payment Method (International)**: Balance from international bank transfers. + +Each balance card displays: + +- Current available balance. +- Next settlement date and amount. +- Settlement cycle applicable to that balance. + +### How Segregated Settlements Work + +With balance segregation: + +- Each channel type (Online (Domestic transactions + International Cards), POS, Cross-border) maintains its own isolated balance. +- Settlements are processed separately for each balance account. +- Refunds and chargebacks are debited only from the respective channel balance. +- Instant Settlements can be enabled independently for each balance account. + +> **INFO** +> +> +> +> **Handy Tips** +> +> Balance segregation ensures that your POS settlements never fail due to online refunds consuming your funds and vice versa. Each channel operates independently. +> diff --git a/llm-content/payments/dashboard/account-settings/support-tickets.md b/llm-content/payments/dashboard/account-settings/support-tickets.md new file mode 100644 index 00000000..420bdd6f --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/support-tickets.md @@ -0,0 +1,61 @@ +--- +title: Your Support Tickets +description: Raise a support ticket and view details of existing tickets raised by you on the Razorpay Dashboard. +--- + +# Your Support Tickets + +You can track the tickets raised by you on the Dashboard under the **Support Tickets** tab. This makes it easier to find the tickets and saves time spent on searching for ticket details in your emails. + +> **INFO** +> +> +> **Handy Tips** +> +> - Only the last three tickets in Open state are displayed. Closed tickets do not appear here. +> - The **Support Tickets** tab is available for both Live and Test modes of the Dashboard. +> - Only **Owner** and **Admin** can raise support tickets using this tab. +> - You can view only those tickets that were raised using the Dashboard. +> + +## Track Status of Open Tickets + +You can view only those tickets that were raised using the Dashboard. To track the status of your open support tickets: + +1. Log in to the Dashboard. +2. On the left navigation, click **Accounts & Settings**. +3. Navigate to **Business settings** → **Support Tickets**. +4. A list of the last three tickets in open status pops up. Click on the ticket ID to view details. + + ![Click Ticket ID to view ticket details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/support-tickets-raise-new-query.jpg.md) + +5. You can request an update, provide information or add attachments such as an error screenshot. Provide the details and click **Send a Reply**. + + ![Reply to Support Ticket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-support-tickets-send-reply.jpg.md) + +## Raise New Support Tickets + +You can create a new support ticket from the Dashboard. + +To raise a new ticket: + +1. Log in to the Dashboard. +2. Click **Help & Support**. + ![Raise a Ticket - Help and Support pop-up - Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-support.jpg.md) +3. Check the FAQs for common concerns. If the FAQs can not resolve your concern, click **Contact Us**. +4. You have the following options in the **Contact Us** section: + - Create ticket: Check existing queries or raise a new support ticket. + - Chat or Request for callback: Start a live chat with us or request a callback for quicker resolution (selected users only). + ![Raise a Ticket - Help and Support pop-up - Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-support-options-new.jpg.md) +5. Select the nature of the request. Check out the existing information before raising the ticket. If you do not find relevant information, please explain your issue, attach relevant documents or screenshots if possible, and click **Create support ticket**. + ![Select the topic of a new query](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-support-ticket-details.jpg.md) + +Our Support team will get back to you at the earliest. However, reply to the same ticket in case of a follow-up instead of raising a new ticket. + +> **INFO** +> +> +> **Handy Tips** +> +> A list of the last three tickets in open status pops up. Click the ticket id to view details. +> diff --git a/llm-content/payments/dashboard/account-settings/transaction-limits.md b/llm-content/payments/dashboard/account-settings/transaction-limits.md new file mode 100644 index 00000000..5fdf7a18 --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/transaction-limits.md @@ -0,0 +1,77 @@ +--- +title: Transaction Limits | Razorpay Dashboard +heading: Transaction Limits +description: Steps to update transaction limits on the Razorpay Dashboard. +--- + +# Transaction Limits + +You can update transaction limits on the Dashboard for both [domestic](/payments/dashboard/account-settings/transaction-limits/#update-domestic-transaction-limits) and [international](/payments/dashboard/account-settings/transaction-limits/#update-limit-per-international-transaction) transactions. + +## Update Domestic Transaction Limits + +You can update the domestic transaction limit for your account. For example, if you could accept only per transaction, you can update it to a higher amount, such as . + +> **WARN** +> +> +> **Watch Out** +> +> The maximum transaction limit depends on your business category. +> + +To update your per domestic transaction limit: +1. Log in to the Dashboard. +2. Click **Account & Settings** in the left navigation. +3. Click **Transaction limits** under **Payment and refund** section. +4. Click the edit icon next to the **Limit per domestic transaction** field. +5. In the pop-up page that is displayed, provide the following information: + 1. **Required Limit**: Enter the desired per transaction limit amount. + 2. **Why do you want to increase limit?**: Enter the reason you want to increase the per domestic transaction limit. You should enter a minimum of 100 words. + 3. **Upload invoice**: Upload a sample invoice. The accepted file formats are PNG, JPG and PDF. + 4. Click **Submit Details**. + ![Provide invoice to update the limit per domestic transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-myaccount-profile-transaction-limit-submit.jpg.md) + +After the details are provided, our team will review the request. We will update the details on the Dashboard. + +> **INFO** +> +> +> **Handy Tips** +> +> We may reach out to you for clarifications on email, WhatsApp, SMS, and Dashboard during the verification process. +> Navigate to **Account & Settings** and submit the necessary information in the appropriate section. Our team will go through the information you provide and help you resolve the issue. +> + +## Update Limit per International Transaction + +You can update the international transaction limit for your Razorpay account. For example, if you could accept only ₹5,000 per transaction, you can update it to a higher amount, such as ₹10,000. + +> **WARN** +> +> +> **Watch Out** +> +> The maximum transaction limit depends on your business category. +> + +To update your per international transaction limit: +1. Log in to the Dashboard. +2. Click **Account & Settings** and go to **Transaction limits** under **Payment and refund** section. +3. Click the edit icon next to the **Limit per international transaction** field. +4. In the pop-up page that is displayed, provide the following information: + 1. **Required Limit**: Enter the desired per transaction limit amount. + 2. **Why do you want to increase limit?**: Enter the reason you want to increase the per international transaction limit. You should enter a minimum of 100 words. + 3. **Upload invoice**: Upload a sample invoice. The accepted file formats are PNG, JPG and PDF. + 4. Click **Submit Details**. + +After the details are provided, our team will review the request. We will update the details on the Dashboard. + +> **INFO** +> +> +> **Handy Tips** +> +> We may reach out to you for clarifications on email, WhatsApp, SMS, and Dashboard during the verification process. +> Navigate to **Account & Settings** and submit the necessary information in the appropriate section. Our team will go through the information you provide and help you resolve the issue. +> diff --git a/llm-content/payments/dashboard/account-settings/webhooks.md b/llm-content/payments/dashboard/account-settings/webhooks.md new file mode 100644 index 00000000..2bd5024b --- /dev/null +++ b/llm-content/payments/dashboard/account-settings/webhooks.md @@ -0,0 +1,131 @@ +--- +title: Webhooks +description: Steps to set up webhooks on the Razorpay Dashboard. +--- + +# Webhooks + +You can [set up](#set-up-webhooks), [edit](#edit-a-webhook), [enable/disable](#enabledisable-a-webhook) and [delete](#delete-a-webhook) webhooks from the Dashboard. + +## Set Up Webhooks + +Watch this video to see how to set up a webhook. + +[Video: https://www.youtube.com/embed/Xiikw4_CcQk?si=b6kYHKIp1xikPrJZ] + +To set up webhooks: + +1. Log in to the Dashboard and navigate to **Accounts & Settings**. +2. Click **Webhooks** under **Website and app settings**. +3. Click the **+ Add New Webhook** button. + + ![Add a new webhooks button on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-1.jpg.md) +4. In the **Webhook Setup** pop-up page: + - Enter the **URL** where you want to receive the webhook payload when an event is triggered. We recommend using an HTTPS URL. + + +> **INFO** +> +> +> **Handy Tips** +> +> - You can set up to **30 URLs** to receive Webhook notifications. Webhooks can only be delivered to public URLs. +> - If your URL contains `razorpay` as a domain, you will not be able to add the URL and will receive an error. +> - If you attempt to save a localhost endpoint as part of a webhook setup, you will notice an error. Know more about [testing Webhooks on an application running on localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#application-running-on-localhost). +> + + + - Enter a **Secret** for the webhook endpoint. The secret is used to validate that the webhook is from Razorpay. Do not expose the secret publicly. Know more about [how to validate webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> - When setting up the webhook, specify a secret. Use this secret to validate that the webhook is from Razorpay. Entering the secret is optional but recommended. The secret should never be exposed publicly. +> - The webhook secret does not need to be the Razorpay API key secret. +> + + + + - In the **Alert Email** field, enter the email address to which the notifications should be sent in case of webhook failure. You will receive webhook related notifications like failures, deactivation and so on. + - Select the required events from the list of **Active Events**. + ![List of active webhook events on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-2.jpg.md) + +5. Click **Create Webhook**. After you set up a webhook, it appears on the list of webhooks. + ![List of webhooks on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhooks-list.jpg.md) +6. You can select the webhook and click **Edit** to make more changes. + +> **INFO** +> +> +> +> **Next Step - Validate and Test Your Webhooks** +> +> You should validate and test your webhooks before you go live. Know more about [validating and testing your webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). +> + +## Edit a Webhook + +You can edit your webhook to replace the webhook URL, modify the secret, change the alert email and add or remove events. + +To edit webhooks: +1. Log in to the Dashboard and navigate to **Accounts & Settings**. +1. Click **Webhooks** under **Website and app settings**. +1. In the list, select the webhook you want to edit. +1. In the right panel, click **Edit**. +1. The **Webhook Setup** pop-up page is displayed. You can modify the following: + - Webhook URL + - Secret + - Alert Email + - Active Events + ![Edit Webhooks on Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-edit-2.jpg.md) +1. Click **Save Webhook** to save changes. + +> **INFO** +> +> +> +> **Next Step - Validate and Test Your Webhooks** +> +> You should validate and test your webhooks before you go live. Know more about [validating and testing your webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). +> + +## Deactivation + +All webhook responses must return a status code in the range `2XX` within a window of 5 seconds. If we receive response codes other than this or the request times out, it is considered a failure. + +On failure, a webhook is re-tried at progressive intervals of time, defined in the exponential back-off policy, for 24 hours. If the failures continue for 24 hours, the webhook is disabled. You need to enable the webhook from the Dashboard after fixing the errors at your end. Know more about [enabling Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md#enabledisable-a-webhook). + +> **INFO** +> +> +> **Handy Tips** +> +> When a webhook gets disabled, you receive an email notification on the email id you configured while setting up the webhooks. +> + +## Enable/Disable a Webhook + +To enable or disable a webhook: + +1. Log in to the Dashboard and navigate to **Accounts & Settings**. +2. Click **Webhooks** under **Website and app settings**. +3. In the list, select the webhook you want to edit. +4. Change the status to **Enabled** or **Disabled** in the right panel as required. + +## Delete a Webhook + +To delete a webhook: + +1. Log in to the Dashboard and navigate to **Accounts & Settings**. +1. Click **Webhooks** under **Website and app settings**. +1. In the list, select the webhook that you want to delete. +1. In the right panel, click **Delete**. Click **Yes, Delete** in the dialogue box to confirm. + +### Related Information + +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) +- [Set Up and Edit Payout Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) +- [Validate and Test Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md) diff --git a/llm-content/payments/dashboard/buyers-address-details.md b/llm-content/payments/dashboard/buyers-address-details.md new file mode 100644 index 00000000..c8e4f8f4 --- /dev/null +++ b/llm-content/payments/dashboard/buyers-address-details.md @@ -0,0 +1,44 @@ +--- +title: Add Buyer's Address +description: Add buyer's address for international transactions on the Razorpay Dashboard. +--- + +# Add Buyer's Address + +You should provide the buyer's address details according to the invoice copy raised to initiate the settlement. The following information is needed: + +- Name of Business +- Address +- City +- Postal Code +- Country +- State + +> **WARN** +> +> +> **Watch Out!** +> +> Without a valid invoice/airway bill and buyer's address details: +> +> - The settlement is put on hold. +> - The payment is not captured and is not included in the settlement. +> The payment is settled after you share a valid invoice/airway bill and buyer's address details. +> + +## Add a Buyer's Address on the Dashboard + +Follow these steps to add and share the buyer's address of all the payments collected via Dashboard: + +1. Log in to the Dashboard. +2. Navigate to the **Transactions** tab. +3. Click the **Invoices** tab. +4. Under the **Actions** tab, click **+Add Buyer Address**. Add the buyer's address for all the payments to capture the transactions. + ![Dashboard Add Buyer's Address](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-add-buyers-address.jpg.md) +5. Fill in the following details per your invoice copy. Click **Close**. + ![Dashboard Buyer's Address Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-buyers-address-details.jpg.md) + +### Related Information + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-bank-transfer.md#frequently-asked-questions-faqs) +- [International Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-bank-transfer.md) diff --git a/llm-content/payments/dashboard/faqs.md b/llm-content/payments/dashboard/faqs.md new file mode 100644 index 00000000..81235644 --- /dev/null +++ b/llm-content/payments/dashboard/faqs.md @@ -0,0 +1,537 @@ +--- +title: Payments Dashboard | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Dashboard. +--- + +# Frequently Asked Questions (FAQs) + +## Edit Login Information + + +### 1. How do I change the login/registered email ID of my account? + + You can change your login/registered email ID from **Account & Settings** on the Dashboard. Know more about [Updating Login Email](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/account-details.md#update-login-email). + + + +### 2. How do I change the password of my account? + + To change your password, enter your email ID on the Forgot Password page and complete the password reset process. + + + +### 3. How do I change the phone number registered with my account? + + Follow these steps to change the phone number: + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings**. + 3. Click the edit icon next to the **Phone number** field. + ![Edit contact number on Razorpay Dashboard.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settings-edit-phone-number.jpg.md) + 4. Enter the OTP sent to your registered email address and click **Confirm**. + ![Enter the otp received on email](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settings-enter-email-otp.jpg.md) + 5. Enter the new phone number and click **Update**. + ![Enter the new phone number](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settings-enter-new-phone-number.jpg.md) + + + +### 4. How can I change the email ID where I receive the transaction-related mail? + + You can add the email ID from the Dashboard by following these steps: + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings**. + 3. Click **Email** under the **Notification settings** section. + ![Update email notifications](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-email-notifications.jpg.md) + 4. Add the email ID in the **Email Notifications**. + 5. Click **Save Changes**. + + +## Edit Business Information + + +### 1. How do I change the account details displayed on the Dashboard? + + You change your account details such as display name, your name, email and phone number from the [Account Details section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/account-details.md) on **Account & Settings** on the Dashboard. + + + +### 2. How do I change my business Website URL? + + To change your business website URL, navigate to **Account & Settings** → **Business website details** and click the edit icon in the **Business Website/App details field**. Know more about how to [edit your business website/app URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/business-website-details.md). + + + +### 3. How can I update my bank account information? + + You can request a change in bank account details from the Dashboard. Watch the video explaining [how to change bank account details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/bank-account-details.md). + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings**. + 3. Click **Bank account details** details under the **Bank accounts and settlements** section. + 4. Click **Change bank account**. + 5. Enter the OTP sent to your registered mobile device on the **2-Step Verification** pop-up page. + 6. On the **Change Bank Account Details** pop-up page, add bank details such as branch IFSC, bank account number, and beneficiary name and upload your business' bank statement or a cancelled cheque. + 7. Click **Save**. + + For security reasons, only the Owner or Admin of the account will be able to access this option from the Dashboard. After the request is placed, the beneficiary details will be validated and updated within one business day. + + + +### 4. How can I update my business name on the payment confirmation mail sent to customers by Razorpay? + + You can change the billing label on the automated emails sent by Razorpay to your customers. + +> **INFO** +> +> +> **Handy Tips** +> +> The billing label must match your registered business name or the domain name. +> + + - If you are a registered business or individual business, you can use the [brand name and logo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-styling.md#brand-name-and-logo) feature on the Dashboard to update the business name. + + + +### 5. How can I change my GSTIN? + + You can use the [Add or Update GST details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/gst-details.md) feature on the Dashboard to update the GST details. + + + +### 6. How do I change the KYC details provided during account activation? + + To change your KYC details, please raise a request with our [support team](https://razorpay.com/support/). + + + +### 7. How long does it take to get a new or updated website/domain approved? + + The approval process takes about 24-48 hours. + + When you submit a new or updated website domain for approval, the process involves two main stages: + + 1. **Bank Verification System (BVS) Checks:** These initial automated checks typically take **3–5 minutes**. + 2. **Agent Resolution/Final Approval:** Once the BVS checks are complete and the workflow is created, it takes an agent approximately **24–48 hours** for final review and resolution. + + The approval status will be updated on your Razorpay Dashboard. + + + +### 8. My website verification request has been pending for a long time. What should I do? + + If your website verification request has been pending for an extended period, contact Razorpay support with the following details: + + - Your Razorpay account id/Merchant id. + - Website URL submitted for verification. + - Date of submission. + + The support team will review your request and expedite the verification process. Once approved, you will receive confirmation and can proceed with generating API keys for integration. + + +. + + + +### 5. How long does it take to get a new or updated website/domain approved? + + When you submit a new or updated website domain for approval, the process involves two main stages: + + 1. **Bank Verification System (BVS) Checks:** These initial automated checks typically take **3–5 minutes**. + 2. **Agent Resolution/Final Approval:** Once the BVS checks are complete and the workflow is created, it takes an agent approximately **24–48 hours** for final review and resolution. + + The approval status will be updated on your Razorpay Dashboard. + + + +### 6. My website verification request has been pending for a long time. What should I do? + + If your website verification request has been pending for an extended period, contact Razorpay support with the following details: + + - Your Razorpay account id/Merchant id. + - Website URL submitted for verification. + - Date of submission. + + The support team will review your request and expedite the verification process. Once approved, you will receive confirmation and can proceed with generating API keys for integration. + + + + + +### 2. How do I change my business Website URL? + + To change your business website URL, navigate to **Account & Settings** → **Business website details** and click the edit icon in the **Business Website/App details field**. + + + +### 3. How can I update my bank account information? + + You can request a change in bank account details from the Dashboard. Watch the video explaining [how to change bank account details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#change-bank-account-details). + 1. Log in to the Dashboard and navigate to **Account & Settings**. + 2. Go to **Bank account details**. + 3. Click **Change bank account**. + 4. Enter the OTP sent to your registered mobile device on the **2-Step Verification** pop-up page. + 5. On the **Change Bank Account Details** pop-up page, add bank details such as branch IFSC, bank account number, and beneficiary name and upload your business' bank statement or a cancelled cheque. + 6. Click **Save**. + + For security reasons, only the Owner or Admin of the account will be able to access this option from the Dashboard. After the request is placed, the beneficiary details will be validated and updated within one business day. + + + +### 4. How can I update my business name on the payment confirmation mail sent to customers by you? + + You can change the billing label on the automated emails sent by us to your customers. + +> **INFO** +> +> +> **Handy Tips** +> +> The billing label must match your registered business name or the domain name. +> + + - If you are a registered business, you can use the Update Brand Name feature on the Dashboard to update the business name. + + - If you are an individual, for example, a freelancer, . + + + +### 5. How can I change my GSTIN? + + You can use the [Add or Update GST details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#add-or-update-gst-details) feature on the Dashboard to update the GST details. + + + +### 6. How long does it take to get a new or updated website/domain approved? + + When you submit a new or updated website domain for approval, the process involves two main stages: + + 1. **Bank Verification System (BVS) Checks:** These initial automated checks typically take **3–5 minutes**. + 2. **Agent Resolution/Final Approval:** Once the BVS checks are complete and the workflow is created, it takes an agent approximately **24–48 hours** for final review and resolution. + + The approval status will be updated on your Razorpay Dashboard. + + + +### 7. My website verification request has been pending for a long time. What should I do? + + If your website verification request has been pending for an extended period, contact Razorpay support with the following details: + + - Your Razorpay account id/Merchant id. + - Website URL submitted for verification. + - Date of submission. + + The support team will review your request and expedite the verification process. Once approved, you will receive confirmation and can proceed with generating API keys for integration. + + +## Integration Related + + +### 1. What is Razorpay Dashboard? + + Razorpay Dashboard is a user interface for you to configure and operate your Razorpay account. The Dashboard home page provides all information about the activity on your account. + + It includes a wide range of analytics and real-time charts that provide insight into the business performance and any action you may need to take, such as unanswered disputes or auto-refunds. + + + +### 2. Is a GST certificate mandatory for using Razorpay Payment Gateway? + + No, a GST certificate is not mandatory for businesses with an annual turnover below ₹20 lakhs. + + + +### 3. I have added my Razorpay account to my website domain. Can I also add it to a sub-domain? + + To add your Razorpay account to your sub-domain, raise a request with our [Support Team](https://razorpay.com/support/#request). + + + +### 4. How do I integrate Razorpay? + + You can integrate Razorpay with your website or app using SDKs and plugins. Refer to our [list of integrations](https://razorpay.com/integrations/). You can also accept payments without integrations using our range of [products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md). + + + +### 5. What is a webhook? How do I use it? + + Webhooks enable a web application to send information to another application in real-time when a specific event happens after integration. Use Razorpay Webhooks to configure and receive notifications when a specific event occurs. Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + + + +### 6. How to provide a clarification requested by Razorpay? + + During the verification process, we may contact you for clarifications on email, WhatsApp, SMS, and the Dashboard. Navigate to **Account & Settings** and submit the necessary information in the appropriate section. Our team will review the information you provide and help resolve the issue. + + + +### 7. How do I close my Razorpay account? + + Log in to the Dashboard and [raise a support request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/support.md#raise-a-new-ticket) to close your Razorpay account. + + + +### 8. I already have one website integrated. How do I add a second (additional) website for payments? + + Before integrating, you must register your additional website or app details on the Dashboard. You can add **one main website** and up to **five additional websites**. + + Follow these steps to register your second website: + + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings** → **Business website detail**. + 3. Click **Add additional website/app details**. + + Know more about the complete process, required documentation (for example, policy links, reason for adding) and review time by referring to the [Additional Website/Mobile App documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/business-website-details.md#additional-website-mobile-app). + + + Dashboard? + + Dashboard is a user interface for you to configure and operate your account. The Dashboard home page provides all information about the activity on your account. + + It includes a wide range of analytics and real-time charts that provide insight into the business performance and any action you may need to take, such as unanswered disputes or auto-refunds. + + + +### 2. I have added my account to my website domain. Can I also add it to a sub-domain? + + To add your account to your sub-domain, . + + + +### 3. How do I integrate ? + + You can integrate with your website or app using SDKs and plugins. You can also accept payments without integrations using our range of [products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md). + + + +### 4. What is a webhook? How do I use it? + + Webhooks enable a web application to send information to another application in real-time when a specific event happens after integration. Use webhooks to configure and receive notifications when a specific event occurs. Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + + + +### 5. How do I close my account? + + + + + +### 6. I already have one website integrated. How do I add a second (additional) website for payments? + + Before integrating, you must register your additional website or app details on the Dashboard. You can add **one main website** and up to **five additional websites**. + + Follow these steps to register your second website: + + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings** → **Business website detail**. + 3. Click **Add additional website/app details**. + + Know more about the complete process, required documentation (for example, policy links, reason for adding) and review time by referring to the [Additional Website/Mobile App documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/business-website-details.md#additional-website-mobile-app). + + +## Reports + + +### 1. How can I generate reports? + + All of your transaction data can be exported as reports in CSV format and can be mailed to yourself. You can also download a monthly or a daily report from the Reports Section of the Dashboard. + + + +### 2. Can I generate an annual report? + + No. You cannot generate an annual report at the moment. You can only generate reports for the last 90 days. + + +## Checkout Settings + + +### 1. I am unable to save my new brand name. Why? + + Ensure your new brand name is at least 80% similar to the company name or domain name. + + + +### 2. I am unable to upload the wordmark. Why? + + Ensure you are adding only a wordmark and not a logo. A wordmark consists solely of text with a transparent background, whereas a logo may include both text and symbols. + + + +### 3. Can I add a custom sidebar graphic? + + No, you cannot add a custom sidebar graphic. + + + +### 4. Can I customise the text colour on the message banner? + + No, text colour customisation for the message banner is not currently supported. + + + +### 5. How does Bank Identification Number (BIN) based customisation help? + + BIN based customisation allows you to control payment method eligibility by specifying one or more BINs (first 6-8 digits of a card number). The system validates and saves these BINs, ensuring that only selected cards are allowed for transactions. This helps you restrict or enable specific card types based on your business needs. Know how to [customise the card payment option based on BIN](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-configuration.md#customise-payment-methods). + + + +### 6. How does displaying UPI QR Code at checkout help? + + On Desktop-web, displaying the UPI QR Code simplifies checkout experience by eliminating manual UPI ID entry. After customers scan the QR code with their mobile UPI app, the system automatically extracts their linked UPI ID using their registered phone number. Know how to [show/hide UPI QR Code on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-configuration.md#customise-payment-methods). + + + +### 7. How does displaying the UPI ID/Number field at checkout help? + + Displaying the UPI ID field improves the checkout experience on both Mobile-web and Desktop-web. Customers can manually enter their UPI ID, offering greater flexibility—especially if they cannot scan a QR code. The system instantly validates the UPI ID, reducing errors and improving transaction success rates. Know how to [show/hide UPI ID/Number field on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-configuration.md#customise-payment-methods). + + +## Miscellaneous + + +### 1. How can I apply for my TDS reimbursement? + + To apply for your TDS reimbursement, raise a request with our [Support Team](https://razorpay.com/support/#request), sharing your merchant ID and TDS certificate. + + + +### 2. My account is activated. How do I switch to live mode? + + You can switch between the **Test and Live** modes using the drop-down option at the top of the Dashboard. + ![Switch between Test and Live modes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-live-1.jpg.md) + + + +### 3. I cannot generate Live mode API keys even though my account is activated. How do I generate the API keys? + + You can generate the Live mode API keys by providing your live website details. Follow these steps: + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings**. + 3. Click **Business website details** under the **Website and app settings** section. + ![Account and settings on Razorpay Dashboard.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-profile-profile.jpg.md) + 4. Click the edit icon. + ![Add website/app details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-website-app-details.jpg.md) + 5. Enter your website URL and click **Add Details**. + ![Enter website/app URL on Razorpay Dashboard.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-profile-enter-url.jpg.md) + 6. Our team will review your website/app URL details. Post review, your website details are updated, and you should be able to generate API keys in the Live Mode. + + + +### 4. What is a Chargeback? + + Chargeback is a refund claim initiated by the customers with their issuer banks. In such cases, the bank starts an official inquiry. Know more about [Chargebacks](https://razorpay.com/chargeback/). + + + +### 5. How do I report a fraud/cybercrime? + + Please raise a [Support Ticket](https://razorpay.com/support/) and our team will get back to you at the earliest. + + + +### 6. Where can I find my Account ID/Merchant ID on the Dashboard? + + You can find your Account ID/Merchant ID at the top-right corner of your Dashboard in alpha-numeric characters. + ![image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-mid.jpg.md) + + + +### 7. Why is my payment not visible on the dashboard? + + Refresh your dashboard and follow the steps to [view payment details](https://razorpay.com/docs/payments/payments/dashboard/#view-payment-details) : + 1. Ensure you are on the right mode (test/live) and check the Payments section again. + 2. Use the right filtering options to view payments. + 3. You can also search using the payment ID. + + + +### 8. Why are my payments failing? + + Payment failure reasons are displayed on the dashboard against each transaction. To check the reason for each failed payment, navigate to **Transactions → Payments → Details**. + + + +### 9. When will the payments be deposited in my bank account? + + The settlement date and time is stated on dashboard. To check, you can go to **Dashboard → Transactions → Settlements**. + + + +### 10. How can email and SMS notifications be enabled? + + You can configure your email and SMS notifications from your Dashboard. To know more, check [notification settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/email-sms-whatsapp.md). + + + + + + +### 6. Where can I find my Account ID/Merchant ID on the Dashboard? + + You can find your Account ID/Merchant ID at the top-right corner of your Dashboard in alpha-numeric characters. + + + + + +### 2. My account is activated. How do I switch to live mode? + + You can switch between the **Test and Live** modes using the drop-down option at the top of the Dashboard. + + + +### 3. I cannot generate Live mode API keys even though my account is activated. How do I generate the API keys? + + You can generate the Live mode API keys by providing your live website details. Follow these steps: + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings**. + 3. In the Business Website/App details field, click **Add Website/App URL for Full Access**. Once you successfully add the URL, you can able to generate the API keys in live mode. + 4. Enter your website URL and click **Add Details**. + 5. Our team will review your website/app URL details. + 6. After our team's review, your website details are updated, and you should be able to generate API keys in the **live** mode. + + + +### 4. What is a Chargeback? + + Chargeback is a refund claim initiated by the customers with their issuer banks. In such cases, the bank starts an official inquiry. Know more about [Chargebacks](https://razorpay.com/chargeback/). + + + +### 5. How do I report a fraud/cybercrime? + + and our team will get back to you at the earliest. + + + +### 6. Where can I find my Account ID/Merchant ID on the Dashboard? + + You can find your Account ID/Merchant ID at the top-right corner of your Dashboard in alpha-numeric characters. + ![image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-mid.jpg.md) + + + + + +### 2. My account is activated. How do I switch to live mode? + + You can switch between the **Test and Live** modes using the drop-down option at the top of the Dashboard. + + + +### 3. What is a Chargeback? + + Chargeback is a refund claim initiated by the customers with their issuer banks. In such cases, the bank starts an official inquiry. Know more about [Chargebacks](https://razorpay.com/chargeback/). + + + +### 4. How do I report a fraud/cybercrime? + + Send an email to your dedicated support POC and our team will get back to you at the earliest. + + + +### 5. Where can I find my Account ID/Merchant ID on the Dashboard? + + You can find your Account ID/Merchant ID at the top-right corner of your Dashboard in alpha-numeric characters. + ![image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-mid.jpg.md) diff --git a/llm-content/payments/dashboard/razorpay-home.md b/llm-content/payments/dashboard/razorpay-home.md new file mode 100644 index 00000000..129e520d --- /dev/null +++ b/llm-content/payments/dashboard/razorpay-home.md @@ -0,0 +1,112 @@ +--- +title: Razorpay Home Page | Unified Dashboard +heading: Razorpay Home +description: Razorpay home page with visual representation of all your transactions and activities on Payments, RazorpayX, Payroll, Partners or Rize Dashboard. +--- + +# Razorpay Home + +The Dashboard Home page provides a consolidated view of your business activity across Razorpay Payments and Banking Plus services. Use this page to monitor transactions, view earnings and spends, gain insights into payment performance, and take action directly through quick-access cards. + +## Navigation + +Use the navigation bar on the top of the page to navigate between different Razorpay suite of products such as Payments, Banking Plus, Payroll, Partners program and more. + +![razorpay home dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/razorpay-home.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> - The unified dashboard gives you a visual summary of all the Razorpay services you use. However, the actual data for each service is stored securely within the specific Razorpay group entity that provides it, not centrally on the dashboard. +> - The dashboard presents insights with respect to the products you use. Hence, the descriptions are only relevant for your products. You can choose to use the other products directly from Razorpay Home. +> + +Log in to your [Razorpay account](https://accounts.razorpay.com) to access Razorpay Home. + +## Critical Actions + +Razorpay displays system-wide alerts at the top of the page to keep you informed. These alerts will notify you of any important announcements or actions you need to take. For instance, you might see an alert if your funds are on hold or if there are pending tasks related to your international payments. + +## Quick Actions + + + Use these shortcuts to navigate to commonly used features related to payment collection and reporting: + + - **Transactions**: View all payment transactions. + - **Settlements**: Track the settlement of collected payments to your account. + - **Payment Links**: Create shareable links to collect payments without a website or app. + - **Reports**: Generate and download detailed reports. + + + Use these shortcuts to manage disbursals and financial statements: + - **Payouts**: Send money to vendors, employees or customers. + - **A/c Statement**: View or download your Razorpay Current Account statement. + + +## Your Business with Razorpay + +This section shows a snapshot of your financial flows within Razorpay: + + + Displays the total amount received via Razorpay Payments during the selected date range. + + - **Online (Domestic transactions + International Cards)**: Breaks down domestic and international payments. + - **Offline payments with POS**: Link available to set up or view POS-based payments. + + + Displays the total money disbursed via Razorpay Banking Plus. + + - **API and Bulk Payouts** – Payouts made via integrations or dashboard. + - **S2P** | **Vendor Payouts** – Payments made to suppliers or vendors. + - **Pay salaries with Razorpay Payroll** – Shortcut to Razorpay’s Payroll service. + + + Displays the balance amount for Razorpay Payments/RazorpayX. + + - **Settlement A/c Balance**: Shows the real-time balance available for settlements in your Razorpay account. + - **Current Account Balance**: Shows the real-time balance available in your RazorpayX powered current account. + - **View breakup**: Shows a balance breakup across payment channels (Online (Domestic transactions + International Cards), In-person, International) + + +## Payment Insights + +This widget helps track how well your payments are performing. + +![payments insights](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-insights-razorpay-home.jpg.md) + +Metric | Description +--- +Payments Collected | Total money collected through Razorpay. +--- +Success Rate | The percentage of successful transactions vs. total attempts. +--- +Refunds | Value and count of refunded transactions. + +Each widget includes: + +- Percentage change from the previous week. +- A link to Insight by RAY for data-backed recommendations to improve performance. + +You can filter data using the time range dropdown: + +- Yesterday +- Last Week +- Last Month + +Click [**See detailed insights**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard.md) for a more granular view on the Payments home page. + +## Other Insights + +This section covers operational and growth-related widgets. + +![other insights](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/other-insights-razorpay-home.jpg.md) + +Term | Description +--- +Payouts | Displays total amount disbursed via Payouts with insights by RAY. +--- +Employees and Payroll | Set up Razorpay Payroll and disburse salaries. +--- +Customers | This area will provide tools to acquire and retain customers using Razorpay solutions. diff --git a/llm-content/payments/dashboard/re-kyc.md b/llm-content/payments/dashboard/re-kyc.md new file mode 100644 index 00000000..0849aca1 --- /dev/null +++ b/llm-content/payments/dashboard/re-kyc.md @@ -0,0 +1,114 @@ +--- +title: Razorpay Re-KYC | RBI Compliance +heading: Re-KYC +description: Ensure compliance with RBI guidelines by completing your Re-KYC process. Update your KYC details securely to avoid service disruptions. +--- + +# Re-KYC + +Understand what is Re-KYC and why it is needed. The frequency of Re-KYC updates and timelines depend upon the risk classification of your business. + +## What is Re-KYC + +Re-KYC (Re-Know Your Customer) is a mandatory periodic process where financial institutions must update and verify their customers' information to maintain regulatory compliance. + +This procedure ensures your account details remain current and helps protect the financial system from fraud and security threats. Unlike the initial KYC completed during account setup, Re-KYC is an ongoing process to ensure that your profile remains accurate and up-to-date. + +The Reserve Bank of India (RBI) mandates this process to maintain the integrity of the banking system and ensure customer information reflects any life changes, such as address updates, employment changes or contact information modifications. + +## Business Risk Classifications and Re-KYC Timelines + +Your business falls into any one of these risk classification based on the nature of your business. + + + + Business Risk Classification|Nature of Business| Re-KYC Timeline + --- + **High-Risk Business**|Complex financial activities, frequent large transactions or from specific geographic regions. Require stringent monitoring and regular updates to mitigate potential risks|Re-KYC is required every 2 years. + --- + **Medium-Risk Business**|Moderate financial activity levels, such as salaried employees with stable incomes. Require periodic updates less frequently than high-risk businesses, but more often than low-risk profiles.|Re-KYC is required every 8 years. + --- + **Low-Risk Business**|Simple financial profiles with stable income sources. Often include pensioners and individuals with long-standing, stable accounts who require the least frequent updates.|Re-KYC is required every 8 years. + +## Complete Re-KYC Process + +Razorpay periodically collects and updates Re-KYC data from businesses as per [RBI guidelines](https://www.rbi.org.in/commonman/English/scripts/notification.aspx?id=2607#18). + +#### When to Complete Re-KYC + +A **Re-KYC completion deadline** and banner will appear on your dashboard when action is needed. Please complete the process by the date shown to ensure uninterrupted use of all Razorpay products. + +### How to Complete Re-KYC + +To complete Re-KYC: + +1. Click **Update KYC**. +2. A new tab with your **Basic details** opens up. Review the details to ensure they are up-to-date. If you need to change any information, click the **pencil icon** to edit the details. Once everything is correct, click **Continue**. For example, to edit your name: + 1. Click the **pencil** icon next to your name. + 2. You will be able to edit your name. Make the required changes and click **Continue**. +3. Verify your business type, PAN and other relevant documents. In case the details are incorrect or not up-to date, click the **pencil** icon to make changes and upload your latest documents. +4. Click **Continue**. You can upload `.pdf`, `.jpeg`, `.png` or `.jpg`. Ensure that the file size does not exceed 25 MB. Know more about [KYC Documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/business-types-kyc-documents.md#kyc-documents). +5. Complete all the steps, select the check box and click **Submit Application**. + +> **WARN** +> +> +> **Watch Out!** +> +> If your Re-KYC documents are non-compliant or require clarification, we will move your account to the **Needs Clarification** state. You must then re-upload or re-submit the necessary documents. Check the various Re-KYC statuses and the actions required based on your account ownership. +> +> + +#### Actions and Consequences if Re-KYC is Not Completed + +Timeline|Action| +--- +**30 Days Before Re-KYC Deadline**|Your **settlements will be put on hold 30 days before the deadline** if your Re-KYC is not completed. You must update your KYC details before the due date to ensure continuous service.| +--- +**30 Days After Re-KYC Deadline**|If your Re-KYC remains incomplete 30 days after the deadline, your settlements will stay on hold. We will then notify you that your account status will be updated to **Live Disabled**.| +--- +**60 Days After Re-KYC Deadline**|If your Re-KYC remains incomplete 60 days after the deadline, your account status will be changed to **Live Disabled**.| + + +#### Example + +This example demonstrates the critical actions and consequences if the Re-KYC process is not completed. + +Let's say your business's **Re-KYC Deadline is January 30th**. + +Date|Status/Action Required|Consequence if Incomplete| +--- +**December 31st**| **30 Days Before Re-KYC Deadline**|If Re-KYC is still pending, your daily settlements will be put on hold to prevent the use of non-compliant funds.| +--- +**March 1st**|**30 Days After Re-KYC Deadline**|Settlements remain on hold. You will be formally notified that your account status is being updated to **Live Disabled.**| +--- +**March 31st**|**60 Days After Re-KYC Deadline**|Your account status is changed to **Live Disabled**.| + + +### Re-KYC Status for Account Owners + +- **Pending**: As per RBI guidelines, you must verify your KYC periodically to validate the information shared during onboarding and update it if required. Please ensure all the necessary tasks are completed on time to avoid future disruptions. It will take 5-10 minutes to complete the process. + +- **In Progress**: You have made progress on your re-KYC, but it is not complete yet. Please review your details and upload any remaining documents to finish the process. + +- **Under Review**: We are currently working on your case. We will notify you within [X hours, starting value = 72 hours] with a status update, or if we need any other details. + +- **Needs Clarification**: Some submitted documents/details are incorrect or incomplete. Please resolve them at the earliest to complete your re-KYC process. + +- **Rejected**: Based on your re-KYC details, your business does not meet our terms of service. Please reach out to [our support team](https://razorpay.com/support/) for further assistance. + +- **Approved**: You can continue doing your business with Razorpay. + +### Re-KYC Status for Non-Owners + +- **Pending**: As per RBI guidelines, the account owner must verify the KYC periodically to validate the information shared during onboarding and update it if required. Please ensure all the necessary tasks are completed on time to avoid future disruptions. It will take 5-10 minutes for them to complete the process. + +- **In Progress**: The account owner is currently updating the KYC details. Please ensure that they update all the details. + +- **Under Review**: We are currently working on your case. We will notify you within [X hours, starting value = 72 hours] with a status update, or if we need any other details. (If ETA is breached, this changes to: "It is taking more time to work on your case than we expected. Please bear with us. Please reach out to [our support team](https://razorpay.com/support/) for assistance.") + +- **Needs Clarification**: Some documents/details submitted by the account owner are incorrect/incomplete. Please ensure that they are able to resolve them to complete the re-KYC process. + +- **Rejected**: Based on the re-KYC, your business does not meet our terms of service. Please reach out to [our support team](https://razorpay.com/support/) for further assistance. + +- **Approved**: You can continue doing your business with Razorpay. diff --git a/llm-content/payments/dashboard/reports.md b/llm-content/payments/dashboard/reports.md new file mode 100644 index 00000000..d0ea628d --- /dev/null +++ b/llm-content/payments/dashboard/reports.md @@ -0,0 +1,100 @@ +--- +title: About Reports +description: Download and schedule various types of reports from the Razorpay Dashboard. +--- + +# About Reports + +We offer many reports to track the cash flow of your business. +- **Download** all your transaction data for a specific day, month, or time frame according to your business requirements as a CSV, XLS, or XLSX file or emailed to the intended recipients. +- **Schedule** reports you want to receive. Select the desired delivery frequency (daily, weekly, monthly), and specify the email address where the reports will be sent using the Dashboard. + +## Download Reports + + +### To download a report: + + 1. Log in to the Dashboard and click **Reports**. + ![Schedule Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/schedule-report-left-nav.jpg.md) + 2. Click **Download Report**. + 3. Click **What report is this?** to select the report type and format. + ![Download Reports Type and Format](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/download-report-type-format2.jpg.md) + 4. To select the time frame of the report, click **What will you receive in this report?**. You can also select a custom time range by clicking the **Custom** button and selecting your preferred time and date. + ![Download Reports Timeframe](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/download-report-time-select.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> You can select a maximum time frame of 95 days to download a report. +> + + + 5. Click **Yes** on the **Do you want this report in an email?** section to add the email recipients with whom you want to share the report and click **Start Download**. + ![Download Reports Add Email](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/download-report-add-email.jpg.md) + 6. Your report request will begin processing. You can track the status and download the report in the **Downloads** section. + ![Download Reports Add Email](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/downloads-section3.jpg.md) + + + + +## Schedule Reports + +Scheduling reports offers numerous advantages. It guarantees punctual and regular data provision, streamlining decision-making with timely information. + + +### To schedule a report: + + 1. Log in to the Dashboard and click **Reports**. + 2. Click **Schedule Report**. + 3. In the **What report is this?** section, select the type of report and enter the Schedule Name Select the format in which you want to receive the report. + 4. In the **What will you receive in this report?** section: + - Select the time duration for which you want to schedule the report. + + +> **INFO** +> +> +> **Handy Tips** +> +> When selecting the duration for a scheduled report, it is important to ensure that you choose the **T+1** date. The **T+1** date refers to the day immediately following the current date. +> + + + - Select the Data Duration from the drop-down. + - Select the frequency of the report schedule. + - Select the time of the day to schedule your report. + + 5. Click **Who will receive this report?** section to add the email recipients with whom you want to share the report and click **Create Schedule**. + + + +Your report will be scheduled. You can track and manage all your schedules in the **Schedules** section. +![schedule Reports section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/schedule-section2.jpg.md) + +## View and Edit Schedules +You can also access and review previous schedules associated with a specific scheduled report. This allows you to view the scheduled report's history and corresponding configuration. You can also modify a scheduled report's configuration as per your requirements. + + +### To view and edit schedules: + + 1. Log in to the Dashboard and click **Reports**. + 2. Click **Schedules** and click **Open** on the schedule you want to view under **View Activity**. + 3. Click **Edit Schedule** to modify the existing settings of the scheduled report. + 4. Click **Edit Schedule** to save the changes. + ![save edit schedule reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/save-edit-activity.jpg.md) + + +## Limit on Reports + +There is a limit on the number of concurrent reports that can be generated from the Dashboard. Once the maximum threshold is reached, new reports will only be created after at least one of the reports in the **processing** state has been generated. + +> **INFO** +> +> +> **Handy Tips** +> +> You can generate a maximum of 3 reports at the same time. for increasing this limit for your account. +> diff --git a/llm-content/payments/dashboard/reports/custom-reports.md b/llm-content/payments/dashboard/reports/custom-reports.md new file mode 100644 index 00000000..9ef61e07 --- /dev/null +++ b/llm-content/payments/dashboard/reports/custom-reports.md @@ -0,0 +1,47 @@ +--- +title: Custom Reports +heading: About Custom Reports +description: Custom reports empower you to tailor data analysis, gain deeper insights and meet specific business needs with personalised financial reporting tools. +--- + +# About Custom Reports + +Custom Reports enables you to build personalised reports precisely tailored to your business requirements. This feature offers deeper insights and streamlines your reconciliation and overall business analysis. + +## Standard Reports vs Custom Reports + +Custom Reports lets users select and combine specific data fields from various Razorpay entities (e.g., payments, refunds, settlements). Generate customised reports that provide precise data configurations, moving beyond standard predefined formats to suit operational requirements. + +Start with Standard Reports to understand your data and establish reporting routines. Use Custom Reports when: + +- You are manually combining data from 2+ Standard Reports regularly. +- Your business complexity requires multi-entity analysis. +- Strategic decision-making needs deeper, correlated insights. + +## Use Cases + +Here are a few use cases of Custom Reports. + + +### Enhanced Financial Reconciliation + + With access to detailed fields across all transaction types, you can build reports that streamline your reconciliation processes by: + + - Matching payments to settlements with precise timing data + - Tracking refunds against original transactions + - Monitoring fee structures and tax implications + - Analysing transaction flows across different payment methods + + + +### Comprehensive Tax and Compliance Support + + The schema includes extensive tax and fee tracking across all entities, enabling you to: + + - Generate tax reports with precise breakdowns by transaction type + - Track GST implications through vendor data + - Monitor TDS categories and compliance requirements + - Create audit trails with detailed transaction histories + + +Here is a [**sample use case for using Custom Reports**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports/custom-reports/create-custom-reports.md#sample-use-case). diff --git a/llm-content/payments/dashboard/reports/custom-reports/create-custom-reports.md b/llm-content/payments/dashboard/reports/custom-reports/create-custom-reports.md new file mode 100644 index 00000000..97a44e14 --- /dev/null +++ b/llm-content/payments/dashboard/reports/custom-reports/create-custom-reports.md @@ -0,0 +1,96 @@ +--- +title: Create Custom Reports +description: Build Custom Reports from your Razorpay data. Gain deeper insights, streamlining financial operations for your business. +--- + +# Create Custom Reports + +Custom Reports lets you build personalised reports that precisely match your business needs. This feature offers deeper insights, streamlining your reconciliation and overall business analysis. + +## Create a Custom Report + +1. Log in to the Dashboard. +2. Go to **Reports**. +3. Click **Create Custom Report**. +4. Select a report type from the **Select Base Report Type** field. ![create custom report select base report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-reports-create-custom-report-select-base.jpg.md) +5. Enter a report name for your custom report in the **Report Name** field. +6. Add a description for your custom report in the **Report Description** for this report. Click **Next**. ![create custom report select base report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-reports-create-custom-report-name-desc.jpg.md) +7. In the **Column selection and arrangement** view, drag and drop the columns to rearrange them in the order you want them to appear in your report. Click **Next**. ![select and adjust columns](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-custom-reports-column-slt-adj.jpg.md) +8. Rename column names for each selected column. Remove a column if required. Click **Create**. ![rename custom report column](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-custom-reports-column-rename.jpg.md) +9. Once your custom report is created, select **Custom Reports** in the **Filter** dropdown. ![filter custom report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-custom-reports-find-report.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> You can only modify reports you have created. You can make 15 custom reports, with up to 50 columns each. +> +> + +You have successfully created a custom report. + +## Download a Custom Report + +1. Click the **download** icon on your custom report's card. +2. Use the **Select report** option to choose which report you wish to download. +3. Enter a preferred file name in the **Save Report As** field (optional). +4. Select your preferred file format: **CSV, Excel or Txt** (optional). +5. Select a linked account in the **Select an Account** field. ![add basic details for custom report download](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-custom-reports-download-basic-details.jpg.md) +6. **Select duration** for the data coverage of the report from these options: + - Today + - Yesterday + - Past Week + - Past 15 days + - Past Month + - Past Quarter + + Toggle the **Custom** option to select a custom date range. ![add duration for custom report download](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-custom-reports-download-duration.jpg.md) +7. To receive your custom report via email, toggle **Yes** for the **Do you want this report in an email?** section. ![add email for custom report download](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-custom-reports-download-email.jpg.md) +8. Click **Start Download**. +9. Navigate to the **Downloads** tab and click **Download**. ![add email for custom report download](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-custom-reports-downloads-tab.jpg.md) + +You have successfully downloaded your custom report. + +## Sample Use Case + +Here is a sample use case to demonstrate how you can use custom reports: + + +### Business Analysis Report + + + - **Company**: Acme Gadgets - An online electronics retailer + - **Challenge**: The finance team spends 15+ hours monthly compiling data from multiple Standard Reports for board presentations + - **Goal**: Create a unified custom report for comprehensive monthly business analysis + + #### Report Configuration + + - **Report Name**: Monthly Business Performance Dashboard + - **Base Report Type**: Payments + - **Reporting Period**: Past Month + + #### Selected Data Fields + + + + Entity | Selected Columns | Business Purpose + --- + Payments | Payment ID, Amount, Currency, Status, Method, Customer Email, Customer Contact, Created At, Captured At, Fee, Tax, Net Amount, Order ID | Core transaction analysis + --- + Orders | Order ID, Amount, Status, Amount Paid, Amount Due, Created At | Order completion tracking + --- + Refunds | Refund ID, Payment ID, Amount, Status, Created At, Fees, Tax | Refund impact analysis + --- + Settlements | Settlement ID, Amount, Status, Created At, Fees, Tax, UTR | Cash flow tracking + --- + Customers | Customer ID, Name, Email, Contact | Customer segmentation + --- + Cards | Card Type, Network, Issuer, Last 4 Digits | Payment method insights + + + + +## Fields and Columns + +To find details about the available list of fields, columns and fields go through the [**Custom Reports Data Schema documentation**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports/data-schema.md). diff --git a/llm-content/payments/dashboard/reports/data-schema.md b/llm-content/payments/dashboard/reports/data-schema.md new file mode 100644 index 00000000..06318a67 --- /dev/null +++ b/llm-content/payments/dashboard/reports/data-schema.md @@ -0,0 +1,360 @@ +--- +title: Reports Data Schema +description: Explore reporting data schema on payments, refunds, settlements and more to build insightful reports. +--- + +# Reports Data Schema + +Create standard and custom reports from your data. Utilise our schema documentation for all entities, columns and their descriptions. + +## Refunds + +Records details of amounts returned to customers from processed payments. + +Details of the available columns are listed below: + +Column Name | Type | Description | Is Nullable? +--- +Unique Transaction Reference| String | - **UPI**: NPCI UPI transaction ID (RRN) + - **E-mandate**: Unique Transaction Reference (UTR) + - **Cards/Netbanking**: Acquirer Reference Number (ARN) + | Yes +--- +Settled By | String | Indicates the entity responsible for settling the refund. | Yes +--- +Notes | String | Additional notes or comments related to the refund. | Yes +--- +Refund ID | Integer | Unique identifier for the refund. | No +--- +Fees | Integer | The processing fees associated with the refund. | No +--- +Tax | Integer | The tax amount applied to the refund. | No +--- +Amount | Integer | The total amount of the refund. | No +--- +Receipt | String | The unique receipt number for the refund. | Yes +--- +Currency | String | The currency in which the refund was processed (for example, 'INR'). | No +--- +Created At | Date/Time | Timestamp when the refund record was created. | No +--- +Payment ID | String | The ID of the original payment to which the refund is linked. | No +--- +Speed Requested | String | The requested processing speed for the refund. | No +--- +Status | String | The current status of the refund (for example, `processed`, `pending`, `failed`). | No + +## Transactions + +Captures comprehensive records of all financial movements, including debits, credits and associated fees. + +Column Name | Type | Description | Is Nullable? +--- +Tax | Integer | The tax amount associated with the transaction. | Yes +--- +Debit | Integer | The debit amount the transaction. | No +--- +Amount | Integer | The total amount of the transaction. | No +--- +Credit | Integer | The credit amount of the transaction. | No +--- +Currency | String | The currency of the transaction. | No +--- +Entity ID | Integer | The ID of the entity related to this transaction (for example, payment ID, refund ID). | No +--- +Created At | Date/Time | Timestamp when the transaction record was created. | No +--- +Type | String | The type of transaction (for example, 'payment', 'refund', 'settlement'). | No +--- +Settled | Boolean | Indicates if the transaction has been settled (True/False). | No +--- +Fees | Integer | The total fees associated with the transaction. | No +--- +On Hold | Boolean | Indicates if the transaction amount is currently on hold (True/False). | Yes +--- +Settled At | Date/Time | Timestamp when the transaction record was settled. | Yes +--- +Settlement ID | String | The ID of the settlement associated with this transaction. | Yes + +## Orders + +Represents the initial request or intent to collect a payment, often preceding the actual payment capture. + +Column Name | Type | Description | Is Nullable? +--- +Order ID | String | Unique identifier for the order. | No +--- +Notes | String | Additional notes or comments for the order. | Yes +--- +Receipt | String | The unique receipt number for the order. | Yes +--- +Offer ID | String | The ID of any offer applied to the order. | Yes +--- +Updated At | Date/Time | Timestamp when the order record was last updated. | No +--- +Amount Paid | Integer | The total amount paid for the order. | Yes +--- +Amount | Integer | The total amount of the order. | No +--- +Status | String | The current status of the order (for example, `created`, `paid`, `fulfilled`). | No +--- +Attempts | Integer | The number of payment attempts made for the order. | No +--- +Currency | String | The currency of the order. | No +--- +Created At | Date/Time | Timestamp when the order was created. | No + +## UPI Metadata + +Stores additional details and technical information related to UPI (Unified Payments Interface) transactions. + +Column Name | Type | Description | Is Nullable? +--- +Settled By | String | The tax amount associated with the transaction. | Yes + +## Disputes + +Manages details and statuses of chargebacks or disagreements initiated by customers regarding transactions. + +Column Name | Type | Description | Is Nullable? +--- +Dispute ID | String | Unique identifier for the dispute. | No +--- +Reason Description | String | A detailed description of the reason for the dispute. | No +--- +Created At | Date/Time | Timestamp when the dispute record was created. | No + +## Settlements + +Tracks the process of transferring accumulated funds from Razorpay to your linked bank account. + +Column Name | Type | Description | Is Nullable? +--- +Created At | Date/Time | Timestamp when the settlement record was created. | No +--- +Settlement ID | String | Unique identifier for the settlement. | No +--- +UTR (Unique Transaction Reference) | String | The Unique Transaction Reference number for the settlement. | Yes +--- +Status | String | The current status of the settlement (for example, `processed`, `pending`, `failed`). | No +--- +Amount | Integer | The total amount of the settlement. | No +--- +Tax | Integer | The tax amount associated with the settlement. | Yes +--- +Fees | Integer | The total fees deducted from the settlement amount. | No + +## Payments + +Holds the core information about successful and failed payment attempts, including amount, method and customer details. + +Column Name | Type | Description | Is Nullable? +--- +Settled By | String | Indicates the entity that settled the payment. | Yes +--- +Notes | String | Additional notes or comments for the payment. | Yes +--- +Payment Method | String | The method used for the payment (for example, 'card', 'netbanking', 'upi', 'wallet'). | Yes +--- +Captured At | Date/Time | Timestamp when the payment was captured. | No +--- +Payment ID | String | Unique identifier for the payment. | No +--- +Customer Email | String | The email address of the customer who made the payment. | Yes +--- +Customer Contact | String | The contact number of the customer who made the payment. | Yes +--- +Currency | String | The currency in which the payment was made. | No +--- +Order ID | String | The ID of the order associated with this payment. | Yes +--- +Created At | Date/Time | Timestamp when the payment record was created. | No +--- +Status | String | The current status of the payment (for example, `captured`, `failed`, `refunded`). | No +--- +Amount | Integer | The total amount of the payment. | No +--- +Fee | Integer | The fee associated with the payment. | Yes +--- +Tax | Integer | The tax amount applied to the payment. | Yes +--- +Receiver ID | String | The ID of the receiver of the payment. | Yes +--- +Error Code | String | The error code if the payment failed. | Yes +--- +Invoice ID | String | The ID of the invoice associated with this payment. | Yes +--- +VPA | String | The Virtual Payment Address (VPA) used for UPI payments. | Yes +--- +Error Description | String | A detailed description of the error if the payment failed. | Yes +--- +Receiver Type | String | The type of the receiver of the payment. | Yes +--- +Bank | String | The bank used for the payment. | Yes +--- +Wallet | String | The wallet used for the payment. | Yes +--- +Card ID | String | The ID of the card used for the payment. | Yes +--- +Description | String | A general description of the payment. | Yes +--- +International | Boolean | Indicates if the payment was an international transaction (True/False). | Yes +--- +Refund Status | String | The status of any refund associated with this payment. | Yes +--- +Amount Refunded | Integer | The amount that has been refunded from this payment. | No +--- +Amount Transferred | Integer | The amount transferred out of this payment. | Yes +--- +Primary Transaction ID | String | Stores the main transaction identifier from payment gateways. - **Netbanking**: bank_transaction_id + - **UPI**: upi_transaction_id + - **Cards/EMI**: ARN (Acquirer Reference Number) for recon + - **Wallet**: Transaction ID + - **Pay Later/Cardless EMI**: Transaction ID +| Yes +--- +Retrieval Reference Number | String | **RRN** (Retrieval Reference Number) + + +Mainly used for UPI transactions as a unique identifier for reconciliation and sometimes for Cards/EMI | Yes +--- +Auth Code | String | - **Cards/EMI**: Auth code (auth_code) + - **Wallet**: ARN (Acquirer Reference Number) + - **Various gateways**: Secondary transaction identifiers + | Yes +--- +Updated At | Date/Time | Timestamp when the payment record was last updated. | No + +## Transfers + +Records the movement of funds from one account or entity to another within the Razorpay ecosystem. + +Column Name | Type | Description | Is Nullable? +--- +Transfer ID | String | Unique identifier for the transfer. | No +--- +Amount | Integer | The total amount of the transfer. | No +--- +Currency | String | The currency of the transfer. | No +--- +Created At | Date/Time | Timestamp when the transfer record was created. | No +--- +Amount Reversed | Integer | The amount reversed from this transfer. | Yes +--- +Notes | String | Additional notes or comments for the transfer. | Yes +--- +Source Type | String | The type of the source for the transfer (for example, 'payment'). | No +--- +Source ID | String | The ID of the source entity for the transfer. | No +--- +Tax | Integer | The tax amount applied to the transfer. | Yes +--- +Fees | Integer | The fees associated with the transfer. | Yes +--- +On Hold | Boolean | Indicates if the transferred amount is currently on hold (True/False). | No +--- +To ID | String | The ID of the recipient of the transfer. | No +--- +On Hold Until | Date/Time | The timestamp until which the transferred amount is on hold. | Yes + +## Reversals + +Documents the reversal of previously completed transfers or other financial movements. + +Column Name | Type | Description | Is Nullable? +--- +Reversal ID | String | Unique identifier for the reversal. | No +--- +Currency | String | The currency of the reversal. | No +--- +Created At | Date/Time | Timestamp when the reversal record was created. | No +--- +Amount | Integer | The amount of the reversal. | No +--- +Notes | String | Additional notes or comments for the reversal. | Yes + +## Customers + +Contains demographic and contact information for the individuals or businesses making payments or associated with transactions. + +Column Name | Type | Description | Is Nullable? +--- +Customer ID | String | Unique identifier for the customer. | No +--- +Customer Name | String | The full name of the customer. | Yes +--- +Customer Email | String | The email address of the customer. | Yes +--- +Customer Contact | String | The contact number of the customer. | Yes + +## Payment Links + +Enables the creation and management of shareable web links for collecting payments. + +Column Name | Type | Description | Is Nullable? +--- +Payment Link ID | String | Unique identifier for the payment link. | No +--- +Title | String | The title or name of the payment link. | Yes + +## Contacts + +Stores general contact information for various entities or individuals relevant to your business operations. + +Column Name | Type | Description | Is Nullable? +--- +Contact ID | String | Unique identifier for the contact. | No +--- +Contact Name | String | The name of the contact. | No +--- +Contact Type | String | The type of contact (for example, 'customer', 'vendor'). | Yes +--- +Contact Email | String | The email address of the contact. | Yes +--- +Notes | String | Additional notes or comments for the contact. | No +--- +Contact Number | String | The contact number of the entity. | Yes +--- +Created At | Date/Time | Timestamp when the contact record was created. | No +--- +Reference ID | String | An external reference ID for the contact. | Yes + +## Fund Accounts + +Consists of details of the bank accounts or other financial instruments used for payouts and settlements. + +Column Name | Type | Description | Is Nullable? +--- +Fund Account ID | String | Unique identifier for the fund account. | No +--- +Account Type | String | The type of fund account (for example, `bank_account`, `vpa`). | No + +## Credits + +Represents a form of balance or credit available to a merchant or customer. + +Column Name | Type | Description | Is Nullable? +--- +Credit Type | String | The type of credit. | No + +## Credit Transactions + +Records the specific actions where credits are used or adjusted. + +Column Name | Type | Description | Is Nullable? +--- +Credits Used | Integer | The number of credits used in the transaction. | No + +## Payment Link (Customers) + +Stores customer-specific information related to interactions with payment links. + +Column Name | Type | Description | Is Nullable? +--- +Customer ID | String | Unique identifier of the customer associated with a payment link. | Yes +--- +Customer Name | String | The name of the customer. | Yes +--- +Customer Email | String | The email address of the customer. | Yes +--- +Customer Contact | String | The contact number of the customer. | Yes diff --git a/llm-content/payments/dashboard/reports/list-of-reports.md b/llm-content/payments/dashboard/reports/list-of-reports.md new file mode 100644 index 00000000..3084d398 --- /dev/null +++ b/llm-content/payments/dashboard/reports/list-of-reports.md @@ -0,0 +1,77 @@ +--- +title: List of Standard Reports +description: Check and download the various types of Reports available on the Razorpay Dashboard. +--- + +# List of Standard Reports + +The table below lists the various reports supplied as default and gives a brief description of each report. Click the report name to download the sample report of that product. Know [how to download reports.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md#download-reports) + +## Payment Gateway + +Report Name | Description +--- +[Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-settlements-report.xlsx.md) | This report provides a list of the settlement(s) in the selected time range. +--- +[Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-payments-report.xlsx.md) | This report provides details of all payments created within the selected time range. It also helps you verify whether a payment is international or domestic. +--- +[Combined Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-combined-report.xlsx.md) | This report provides all transactions (payments, refunds, adjustments and transfers) and settlements made in the selected time range. +--- +[Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-orders-report.xlsx.md) | This report provides details of all orders that were created in the selected time range. +--- +[Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-refunds-report.xlsx.md) | This report provides details of all refunds that were initiated in the selected time range. +--- +[Instant Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-instant-refunds-report.xlsx.md) | This report provides details of all the instant refunds initiated in the selected time range. +--- +[Settlement Recon](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-settlements-recon-report.xlsx.md) | This report provides a detailed list of all transactions (payments, refunds, and adjustments) against every settlement in the selected time range. +--- +[Monthly Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-monthly-invoice-report.xlsx.md) | An invoice for transactions and the corresponding payments. +> **INFO** +> +> **Handy Tips** You can currently download only the Monthly Invoices report. + +## Route + +Report Name | Description +--- +[Transfers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-transfers-report.xlsx.md) | This report provides details of all transfers made to your linked accounts in the selected time range. +--- +[Reversals](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-reversals-report.xlsx.md) | This report provides details of all reversals that were made against any linked account transfers. +--- +[Custom Transfers with Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-custom-transfers-report.xlsx.md) | This report provides details of all transfers (including the custom notes added) that were made to your linked accounts in the selected time range. + +## Payment Links + +Report Name | Description +--- +[Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-payment-links-report.xlsx.md) | This report provides details of all the standard payment links that were created in the selected time range. + +## Payment Button + +Report Name | Description +--- +[Payment Buttons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-payment-buttton-report.xlsx.md) | This report provides details of all the payment buttons that were created in the selected time range. + +## Payment Pages + +Report Name | Description +--- +[Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-payment-page-report.xlsx.md) | This report provides details of all the payment pages that were created in the selected time range. + +## Subscriptions + +Report Name | Description +--- +[Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-subsciptions-report.xlsx.md) | This report provides details of all subscriptions that were created in the selected time range. + +## QR Codes + +Report Name | Description +--- +[QR Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-qrcode-report.xlsx.md) | This report provides details of all QR Codes that were created in the selected time range. + +## International Business - Import Flow + +Report Name | Description +--- +[Offshore Remittance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-offshore-remittance-report.xlsx.md) | This report contains the details of the transactions settled to your bank account, along with the foreign currency amount details. diff --git a/llm-content/payments/dashboard/support.md b/llm-content/payments/dashboard/support.md new file mode 100644 index 00000000..46f81f5e --- /dev/null +++ b/llm-content/payments/dashboard/support.md @@ -0,0 +1,111 @@ +--- +title: Razorpay Support +heading: Support +description: If you are a business using Razorpay products or exploring Razorpay solutions, contact our Support Team for all your technical and product queries. +--- + +# Support + +If you are a registered Razorpay user and need help, connect with [Razorpay Support team](https://razorpay.com/support/). Refer to [Razorpay Docs](https://razorpay.com/docs) for details about each of Razorpay products, integrations, like [Payment Gateway](https://razorpay.com/docs/payments/payment-gateway) and [API Reference Guide](https://razorpay.com/docs/api/). + +> **INFO** +> +> +> **You are a registered Razorpay User** +> +> If you have a Razorpay User ID (Merchant ID/MID), and you: +> - Run a business or are a freelancer. +> - Use Razorpay products to receive payments from your end-users and/or make payouts for business purposes. +> +> Not registered yet? [Sign up with Razorpay](https://easy.razorpay.com/) +> + +## Contact Razorpay Support + + +### To contact the Razorpay Support team: + + 1. Log in to the Dashboard. + 2. Click **Help** for **Quick actions** or to **Get in touch**. + ![Raise a Ticket - Help and Support pop-up - Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-support.jpg.md) + + 3. You have the following options in the **Get in touch** section: + - [Create support ticket](#create-support-ticket): Check existing queries or raise a new support ticket + - [Contact Us](#contact-us): Start a live chat with us or request a callback for quicker resolution (selected users only) + + ![Raise a Ticket - Help and Support pop-up - Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-support-options-new.jpg.md) + + You can also scroll further down and click **Documentation** to know about the various Razorpay offerings, integrations and APIs. + + +## Create Support Ticket + +You can check existing queries or raise a new support ticket through the Dashboard. Watch this video to know how to raise a ticket. + +[Video: https://www.youtube.com/embed/02WXIXGhHIQ?si=WyY-Y68JZVvDynzk] + + +### To raise a new ticket: + + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings** → **Support tickets** (under Business settings). + 3. Click **Support tickets**. + 4. Click **+ Raise New Query** and select the relevant topic and sub-topic. + 5. Enter the details of your query and **Upload file** if necessary. Click **Create support ticket**. + 6. **Confirm** your phone number. The support ticket is created and details are sent to your registered email id. Click **Done**. + + +### Track Status of Existing Tickets + +Know how to [track your support tickets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/support-tickets.md) on the Dashboard. + +> **INFO** +> +> +> +> **Handy Tips** +> +> For a faster support experience, reply to the relevant existing ticket instead of creating a new ticket. +> + +## Contact Us + +This feature is available for selected users only. If it is visible for your account, you can chat with a member of the Support Team between 10 a.m. and 10 p.m. on all working days for instant communication. + +![Contact Razorpay Support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-support-contact-us.jpg.md) + + +### To start a live chat with us: + + 1. Log in to the Dashboard. + 2. Click **Help**, in the **Get in touch** section, click **Contact Us**. + 3. Select the relevant topics and sub-topics. + 4. On the pop-up, click **Start Chat** for a live chat or **Request for callback**. + + + for any issues and more information. + +> **INFO** +> +> +> +> **Customer Looking for Refunds** +> +> If you are a customer who has used one of the Razorpay products to make payments and looking for a refund, read about [Customer Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers/customer-refunds.md). +> + +## Escalate a Support Ticket + +Escalating a ticket moves your ticket to a priority resolution queue. A representative will then contact you by phone within the next two hours to address your issue. + +The **Escalate Now** button appears on your support ticket within the Dashboard when we do not meet our committed Turnaround Time (TAT) or Service Level Agreement (SLA) for ticket resolution. + +To escalate a support ticket: + +1. Locate the **Escalate Now** button on the Dashboard. ![Dashboard - Escalate Ticket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/escalation-tool-escalate-now.jpg.md) + + - You can find this button in the help chat as shown below: ![Dashboard - Escalate Ticket on Help Chat](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/escalation-tool-help-chat.jpg.md) + + - This button will also show up on the **Account & Settings > Support Tickets** page: ![Dashboard - Escalate Now on Support Tickets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/escalation-tool-support-tickets.jpg.md) + +2. Click **Escalate Now**. The ticket is now escalated and is moved to a priority resolution queue. ![Dashboard - Escalated Ticket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/escalation-tool-escalated-ticket.jpg.md) diff --git a/llm-content/payments/dashboard/test-live-modes.md b/llm-content/payments/dashboard/test-live-modes.md new file mode 100644 index 00000000..5c90dde5 --- /dev/null +++ b/llm-content/payments/dashboard/test-live-modes.md @@ -0,0 +1,40 @@ +--- +title: Test and Live Modes +description: Check the Test (sandbox environment) and Live modes available on the Razorpay Dashboard and the difference between them. +--- + +# Test and Live Modes + +> **WARN** +> +> +> **Watch Out!** +> +> The Dashboard offers two modes: **Test** and **Live**. Both modes provide the same functionalities, except that real payments cannot be accepted in **Test** mode. Refer the [table below](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/test-live-modes.md#test-mode-vs-live-mode) for more details. +> + +## Test Mode Vs Live Mode + +Test Mode | Live Mode [columWidth="50"] +--- +The Test mode is a replica of your account in a sandbox environment. This allows you to test all aspects of your integration before you go live. | After thoroughly testing your integration, you can switch to the Live mode and start accepting payments from customers. +--- +The Test mode is available to you as soon as you complete the sign-up process. You can use Test mode as long as you want.|The Live mode is available after you activate your account from the Dashboard. +--- +Generate API keys in Test mode to use the API keys in Test mode.| Generate API keys in Live mode to use the API keys in Live mode. +--- +Actions taken in the test mode have no consequences in your live environment. Transactions and entities created in the test mode do not appear in the live mode. **No real money is used in the test mode**. | Payments made by your customers are settled to your account according to your settlement cycle. + +> **INFO** +> +> +> **Separate Set of API Keys in Test and Live Mode** +> +> You have to generate a separate set of API keys for Live and Test modes. Know more about [Generating API Keys on Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md). +> + +## Enable Test Mode + +You can turn on **Test Mode** using the toggle on your Razorpay Dashboard. + +![Switch between Test and Live modes on Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-mode-new.jpg.md) diff --git a/llm-content/payments/disputes.md b/llm-content/payments/disputes.md new file mode 100644 index 00000000..cbc8b9bc --- /dev/null +++ b/llm-content/payments/disputes.md @@ -0,0 +1,89 @@ +--- +title: About Disputes +description: Create Disputes and Chargebacks from the Razorpay Dashboard. Check the notifications and how disputes are handled for international payments. +--- + +# About Disputes + +A dispute is a situation where a customer or the issuing bank questions the validity of payments. It may arise due to unauthorised charges, failure to deliver the promised merchandise or excessive charges levied by the business. + +## Dispute Phases + +A dispute can be in any of the following phases: + +Phase | Description +--- +**Fraud** | A dispute is raised by the bank when it suspects a transaction to be fraudulent based on the risk analysis. +--- +**Retrieval** | A request is initiated by the customer with their issuer bank for additional information about a transaction. This is essentially a "soft" chargeback. +--- +**Chargeback** | A refund claim initiated by the customers with their issuer banks. In such cases, the bank starts an official inquiry. +--- +**Pre-Arbitration** | A chargeback that you have won and is again challenged by the customer for the second time. +--- +**Arbitration** | A chargeback that you have won and is rechallenged for the third time by the customer, and the card networks directly get involved. These disputes are usually costly. + +> **INFO** +> +> +> **Handy Tips** +> +> The pre-arbitration and arbitration dispute phases are usually long-drawn, complicated, and challenging. It is advised to take remedial action during the retrievals and chargeback phases to avoid complications. +> + +## Dispute States + +A dispute can have any of the following statuses (in the Razorpay system). + +![Dispute States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dispute-status.jpg.md) + +Status | Description +--- +**Open** | Indicates that the dispute has been created. +--- +**Under Review** | Indicates that the issuing bank has reviewed the dispute. +--- +**Won** | Indicates that the bank has accepted the remedial documents, and you have won the chargeback. +--- +**Lost** | Indicates that the bank did not accept the remedial documents and you have lost the chargeback. +--- +**Closed** | Indicates the state when a fraudulent transaction is closed after you provide details of the transaction or make a refund to the customer. This is seen in fraudulent transactions only. + +## Disputes Process Flow + +Following is the process flow for disputes: + +1. A dispute can be initiated in any of the following ways: + 1. **Initiated by the issuing bank**: The issuing bank suspects a fraudulent transaction and asks for your justification. + 1. **Initiated by the customer**: The customer claims that the transaction was unauthorised and raises it with the issuing bank. + +2. You will be [notified about the dispute.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md#notifications) + - **Accept** the dispute. The customer is refunded. In the case of fraud, you must refund the amount. In other cases, Razorpay will auto-refund the amount. + - [ Contest the dispute by submitting evidence](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/submit-evidence.md) to prove that the transaction was fair. + - If you contest, the documents are sent to the customer’s bank. The bank reviews the case and provides a verdict. + - If you lose the dispute, the amount would be deducted from your account and is sent to the customer. + +## Notifications + +Notifications are sent when disputes are created. These notifications are in the form of: +- **Emails** +You will receive an email notification when a dispute is created. The email contains details of the transaction, amount and cause of dispute. +- **Webhooks** +You can [subscribe to Webhook events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/dashboard.md#subscribe-to-webhook-events) to receive alerts whenever a dispute is created or there is a change in status. + +## Dashboard Actions + +You can perform the following actions using the Dashboard: +- [View disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/dashboard.md#view-disputes-using-dashboard) +- [Accept disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/dashboard.md#accept-disputes-using-dashboard) +- [Contest disputes and submit evidence](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/dashboard.md#contest-disputes-using-dashboard) +- [ Subscribe to Webhook Events related to disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/dashboard.md#subscribe-to-webhook-events) + +### Related Information + +- [Submit Evidence](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/submit-evidence.md) +- [View Disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/dashboard.md#view-disputes-using-dashboard) +- [Disputes - Dashboard Actions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/dashboard.md) +- [Dispute FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/faqs.md) +- [Dispute APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/apis.md) +- [Contact Support](https://razorpay.com/support/#request) for additional help with disputes. diff --git a/llm-content/payments/disputes/apis.md b/llm-content/payments/disputes/apis.md new file mode 100644 index 00000000..facb2254 --- /dev/null +++ b/llm-content/payments/disputes/apis.md @@ -0,0 +1,26 @@ +--- +title: Disputes APIs +description: List of Dispute APIs to perform actions like viewing, accepting and contesting Disputes. +--- + +# Disputes APIs + +You can use the Dispute APIs to view all disputes or view a dispute by its id. You can also perform these actions from the Dashboard. + +## List of Disputes APIs + +The table below lists the various Disputes APIs and gives a brief description of each API: + +API | Description +--- +[View all disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/disputes/fetch-all.md) | API to fetch all disputes. +--- +[View a dispute by dispute id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/disputes/fetch.md) | API to view dispute details by providing the dispute id. +--- +[Accept a dispute](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/disputes/accept.md) | API to accept a dispute. +--- +[Contest a dispute](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/disputes/contest.md) | API to contest a dispute. + +### Related Information +- [ About Disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md) +- [Disputes - Dashboard Actions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/dashboard.md) diff --git a/llm-content/payments/disputes/dashboard.md b/llm-content/payments/disputes/dashboard.md new file mode 100644 index 00000000..e0db483f --- /dev/null +++ b/llm-content/payments/disputes/dashboard.md @@ -0,0 +1,116 @@ +--- +title: Disputes - Dashboard Actions +description: View, accept, contest Disputes and download Disputes reports from the Razorpay Dashboard. Subscribe to webhook events for realtime updates on your disputes. +--- + +# Disputes - Dashboard Actions + +You can use the Dashboard to perform the following actions: +- [View Disputes](#view-disputes-using-dashboard) +- [Accept Disputes](#accept-disputes-using-dashboard) +- [Contest Disputes](#contest-disputes) +- [Download Disputes Report](#download-disputes-report) +- [Subscribe to Webhook Events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/subscribe-to-webhooks.md) + +## View Disputes + +Follow the steps given below to view dispute details from the Dashboard. + + +### To view disputes: + + 1. Log in to the Dashboard. + 2. Select **Transactions** from the left menu and click **Disputes**. + ![select disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/select-disputes.jpg.md) + 3. A list of all the disputes is displayed. Click **Details** to view the details of the dispute. + ![List of disputes under dispute tab](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/listed-disputes.jpg.md) + ![dispute-description](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dispute-description.jpg.md) + + +### View Disputes Using APIs + +- View all the disputes raised by your customer using [Fetch All Disputes API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/disputes/fetch-all.md) +- View the details of a dispute by providing the dispute id using [Fetch a Dispute API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/disputes/fetch.md) + +## Accept Disputes + +In case the customer's dispute is valid, you can accept the dispute. + +When you accept a dispute: + +1. The corresponding amount will be deducted from your Razorpay account balance. +2. The dispute's status will be changed to **lost**. + +> **INFO** +> +> +> **Handy Tips** +> +> You can accept only those disputes that are in `open` state and fall within the respond by date. +> + +Follow the steps given below to accept disputes from the Dashboard. + + +### To accept disputes: + + 1. Log in to the Dashboard. + 2. Select **Transactions** from the left menu and click **Disputes**. + 3. A list of all the disputes is displayed. Click **Details** for the required Dispute id. + 4. Click **Accept Dispute** on the right pane. + + 5. Click **Yes, Accept** to confirm. The amount will be deducted from your Razorpay account balance. + + +### Accept Disputes Using API + +Accept a dispute using the [Accept a Dispute API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/disputes/accept.md). + +## Contest Disputes + +In case the goods or services have been provided to the customer, you can contest the dispute and submit the proof of deliveries, invoices or any other authorised proof of product/service delivery as evidence. + +Follow the steps given below to contest disputes and submit evidence from the Dashboard. + + +### To contest disputes: + + 1. Log in to the Dashboard. + 2. Select **Transactions** from the left menu and click **Disputes**. + ![select disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/select-disputes.jpg.md) + 3. A list of all disputes is displayed. Click **Details** for any dispute ID to open the right-side pane. + ![List of disputes under dispute tab](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/listed-disputes.jpg.md) + 4. Click **Contest & upload evidence**. + ![contest and upload dispute](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/disputes_contest_upload.jpg.md) + 5. You can choose to contest the dispute for the full payment amount or a partial amount. To contest for partial amount, click **Edit** and enter the amount you want to contest. + ![edit amount dispute](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/disputes_edit.jpg.md) + 6. In the **Explanation** field, provide the reason why the dispute is invalid. + ![add explanation for amount change](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/disputes_edit_amount.jpg.md) + 7. In the **Supporting Evidence** section, select the evidence type in the **Add Document** field and upload the document. You can upload multiple documents to support your claim. The supported document types are, PDF, PNG and JPG. + ![submit evidence](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/disputes_submit_evidence.jpg.md) + 8. Click **Submit Evidence**. + 9. Click **Yes Contest** to confirm. + ![confirm contest evidence](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/disputes_confirm_contest.jpg.md) + + +### Contest Disputes Using API + +- Contest a dispute using [Contest a Dispute API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/disputes/contest.md) +- Upload supporting documents using [Documents API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/documents.md) + +## Download Disputes Report + +You can download disputes as a file from the Dashboard. To download disputes report: + +1. Log in to the Dashboard. +2. Select **Transactions** from the left menu and click **Disputes**. +3. A list of all the disputes is displayed. Apply the required filters for disputes and click the download icon on the right. + + ![filter and download disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/filter-download-disputes.jpg.md) + +### Related Information + +- [About Disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md) +- [Submit Evidence](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/submit-evidence.md) +- [Dispute FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/faqs.md) +- [Contact Support](https://razorpay.com/support/#request) for additional help with disputes. diff --git a/llm-content/payments/disputes/faqs.md b/llm-content/payments/disputes/faqs.md new file mode 100644 index 00000000..7f973ea0 --- /dev/null +++ b/llm-content/payments/disputes/faqs.md @@ -0,0 +1,9 @@ +--- +title: Payments | Disputes - FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Payment Disputes. +--- + +# Frequently Asked Questions (FAQs) + + diff --git a/llm-content/payments/disputes/presentments.md b/llm-content/payments/disputes/presentments.md new file mode 100644 index 00000000..5dacce2f --- /dev/null +++ b/llm-content/payments/disputes/presentments.md @@ -0,0 +1,1299 @@ +--- +title: Disputes +description: Manage Disputes raised by customers using the Dispute APIs. +--- + +# Disputes + +A dispute arises when your customer or the issuing bank questions the validity of a payment. It could be raised due to reasons such as unauthorized charges, failure to deliver promised merchandise or excessive charges levied by you. The chargeback raised by your customer can be filed as a dispute with Razorpay. + +Using Razorpay APIs, you can manage disputes raised by your customers. + +## Dispute Presentment + +The process of submitting various evidence/documents to banks and gateways for contesting a dispute is called Dispute Presentment. Razorpay enables you to manage disputes on the Dashboard as well as through APIs, ensuring a seamless dispute management experience. In addition to the existing capabilities of fetching all disputes and fetching details of a specific dispute, now you can: + +- **Accept a Dispute** + + Allows you to accept the dispute against the payment. + +- **Contest a Dispute** + + Allows you to respond to the dispute with explanation and supporting evidence documents. + + - **Contest Partial or Full Amount** - You can specify whether you choose to contest the full amount or specify the partial amount that you want to contest. The default choice is contesting the full amount. + + - **Provide Evidence (Text/ Documents)** - You can submit evidence for contesting the dispute. In addition to evidence in the form of a written explanation, you can upload documents such as shipping proof, billing proof and so on. + +## Dispute Entity + +`id` +: `string` Unique identifier of the dispute generated by Razorpay. + +`entity` +: `string` Indicates the type of entity. In this case, it is `dispute`. + +`payment_id` +: `string` Unique identifier of the payment against which the dispute was created. + +`amount` +: `integer` Amount, in currency subunits, for which the dispute was created. + +`currency` +: `string` 3-letter ISO currency code associated with the amount. List of [ supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`amount_deducted` +: `integer` The amount, in currency subunits, deducted from your Razorpay current balance when the dispute is `lost`. This amount will be `0` unless the status of dispute is updated to `lost`. Learn about the different[ states of disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md#dispute-states). + +`reason_code` +: `string` Code associated with the reason for dispute. + +`reason_description` +: `string` Text associated with the reason. + +`respond_by` +: `integer` Timestamp (in Unix) by which a response should be sent to the customer. + +`status` +: `string` The status of the dispute. Possible statuses are: + - `open`: Indicates that the dispute has been created. + - `under_review`: Indicates that the dispute is being reviewed by the issuing bank. + - `won`: Indicates that the bank has accepted the remedial documents and you have won the chargeback. + - `lost`: Indicates that the bank did not accept the remedial documents and you have lost the chargeback. + - `closed`: Indicates that the fraudulent transaction is closed after you provide either the details of the transaction or make a refund to the customer. + +`phase` +: `string` Phase that is associated with the dispute. Possible values are: + - `fraud`: A dispute raised by the bank when it suspects a transaction to be fraudulent based on the risk analysis. + - `retrieval`: A request initiated by the customer with their issuer bank for additional information about a transaction. + - `chargeback`: A refund claim initiated by the customers with their issuer banks. In such cases, the bank starts an official inquiry. + - `pre_arbitration`: A chargeback that you have won is challenged by the customer for the second time. + - `arbitration`: A chargeback that you have won is challenged for a third time by the customer and the card networks directly get involved. + +`created_at` +: `integer` Timestamp (in Unix) when dispute was created. + +`evidence` +: `object` Provides details of the evidence submitted/saved for contesting a dispute. Use the [Documents API ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/documents.md) to securely share documents with Razorpay. + + `amount` + : `integer` The contested amount in currency subunits, for which evidence is provided. The value can vary from `0` to the dispute amount. The default value is the dispute amount. + + `summary` + : `string` The explanation provided by you for contesting the dispute. Can have a maximum length of 1000 characters. + + `shipping_proof` + : `list` (List of document ids) [Document(s)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/documents.md) which serves as proof that the product was shipped to the customer at the customer provided address. It should show the customer’s full shipping address, if possible. + + `billing_proof` + : `list` (List of document ids) Document(s) which serves as proof of order confirmation such as receipt. + + `cancellation_proof` + : `list` (List of document ids) Document(s) that serves as a proof that this product/service was cancelled. + + `customer_communication` + : `list` (List of document ids) Document(s) listing any written/email communication from the customer confirming that the customer received the product/service or is satisfied with the product/service. + + `proof_of_service` + : `list` (List of document ids) Document(s) showing proof of service provided to the customer. + + `explanation_letter` + : `list` (List of document ids) Any explanation letter(s) from you specifying information pertinent to the dispute/payment that needs to be taken into consideration for processing the dispute. + + `refund_confirmation` + : `list` (List of document ids) Document(s) showing proof that the refund was provided to the customer. + + `access_activity_log` + : `list` (List of document ids) Document(s) of any server or activity logs which prove that the customer accessed or downloaded the purchased digital product. + + `refund_cancellation_policy` + : `list` (List of document ids) Document(s) listing your refund and/or cancellation policy, as shown to the customer. + + `term_and_conditions` + : `list` (List of document ids) Document(s) listing your sales terms and conditions, as shown to the customer. + + `others` + : `list` Specifies the evidence documents to be uploaded as a part of contesting a dispute. It is a list of tuple consisting of the following: + + `type` + : `string` Describes the custom type of evidence document(s) provided + + `document_ids` + : `list` (List of document ids) Document(s) corresponding to the customer evidence type. + + ```json: Example + [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH7", + "doc_EFtmUsbwpXwBH6" + ] + } + ] + ``` + + `submitted_at` + : `integer` Timestamp (in Unix) when the dispute was last submitted by you (for review) to Razorpay. Default value is `null`. + +## Dispute States + +The state diagram below lists the possible states of disputes during its life cycle. + +![](/docs/assets/images/disputes-presentment-dispute-states.jpg) + +## APIs + +The following API operations can be performed: +- [Fetch All Disputes](#fetch-all-disputes) +- [Fetch a Dispute](#fetch-a-dispute) +- [Accept a dispute](#accept-a-dispute) +- [Contest a dispute](#contest-a-dispute) + - Draft + - Submit + +All Razorpay APIs are authenticated using Basic Authentication. While authenticating your API requests, you must send API Keys, a combination of `Key_Id` and `Key_Secret` in the authentication header. Generate the API keys from the Dashboard, if you have not done already. + +### Fetch all Disputes + +You can fetch all the disputes raised by your customers using the below endpoint. + +/disputes + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/disputes \ +-H "Content-Type: application/json" +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "disp_Esz7KAitoYM7PJ", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "pre_arbitration", + "respond_by": 1590604200, + "status": "open", + "phase": "pre_arbitration", + "created_at": 1590059211, + "evidence": { + "amount": 10000, + "summary": null, + "shipping_proof": null, + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": null, + "submitted_at": null + } + }, + { + "id": "disp_Esyvk3kZj0isXk", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 5000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "warning_bulletin_or_exception_file", + "respond_by": 1590604200, + "status": "won", + "phase": "chargeback", + "created_at": 1590058554, + "evidence": { + "amount": 5000, + "summary": null, + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": null, + "submitted_at": 1590604100 + } + } + ] +} +``` + +### Fetch a Dispute + +Use the below endpoint to fetch the details of a specific dispute. + +/disputes/:id + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/disputes/disp_AHfqOvkldwsbqt \ +-H "Content-Type: application/json" +```json: Open State & Not Contested +{ + "id": "disp_AHfqOvkldwsbqt", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "pre_arbitration", + "respond_by": 1590604200, + "status": "open", + "phase": "pre_arbitration", + "created_at": 1590059211, + "evidence": { + "amount": 10000, + "summary": "goods delivered", + "shipping_proof": null, + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": null, + "submitted_at": null + } +} +```json: Open State & In-progress Contest +{ + "id": "disp_AHfqOvkldwsbqt", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "chargeback", + "respond_by": 1590604200, + "status": "open", + "phase": "chargeback", + "created_at": 1590059211, + "evidence": { + "amount": 9000, + "summary": "goods delivered", + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": [ + "doc_EFtmUsbwpXwBG9", + "doc_EFtmUsbwpXwBG8" + ], + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "submitted_at": null + } +} +```json: Under Review +{ + "id": "disp_AHfqOvkldwsbqt", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "chargeback", + "respond_by": 1590604200, + "status": "under_review", + "phase": "chargeback", + "created_at": 1590059211, + "evidence": { + "amount": 9000, + "summary": "goods delivered", + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": [ + "doc_EFtmUsbwpXwBG9", + "doc_EFtmUsbwpXwBG8" + ], + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "submitted_at": 1590603200 + } +} +```json: Lost +{ + "id": "disp_AHfqOvkldwsbqt", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 10000, + "reason_code": "chargeback", + "respond_by": 1590604200, + "status": "lost", + "phase": "chargeback", + "created_at": 1590059211, + "evidence": { + "amount": 10000, + "summary": null, + "shipping_proof": null, + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": null, + "submitted_at": null + } +} +```json: Won +{ + "id": "disp_AHfqOvkldwsbqt", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 1000, + "reason_code": "chargeback", + "respond_by": 1590604200, + "status": "won", + "phase": "chargeback", + "evidence": { + "amount": 9000, + "summary": "goods delivered", + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": [ + "doc_EFtmUsbwpXwBG9", + "doc_EFtmUsbwpXwBG8" + ], + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "submitted_at": 1590603200 + }, + "created_at": 1590059211 +} +```json: Closed +{ + "id": "disp_AHfqOvkldwsbqt", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "chargeback", + "respond_by": 1590604200, + "status": "closed", + "phase": "chargeback", + "created_at": 1590059211, + "evidence": { + "amount": 10000, + "summary": "goods delivered", + "shipping_proof": null, + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": null, + "submitted_at": null + } +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the dispute. + +### Accept a Dispute + +Accepting a dispute charge indicates that you do not wish to contest the dispute, acknowledging it as lost. + +The status of the dispute will change from open to lost. Accepting a dispute is irreversible. + +/disputes/:id/accept + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/disputes/disp_AHfqOvkldwsbqt/accept \ +-H "Content-Type: application/json" +```json: Response +{ + "id": "disp_AHfqOvkldwsbqt", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 10000, + "reason_code": "pre_arbitration", + "respond_by": 1590604200, + "status": "lost", + "phase": "pre_arbitration", + "created_at": 1590059211, + "evidence": { + "amount": 10000, + "summary": null, + "shipping_proof": null, + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": null, + "submitted_at": null + } +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the dispute. + +### Contest a Dispute + +Contesting a dispute indicates that you would like to challenge the dispute raised against a payment. In addition to explicitly contesting a dispute, the contest process can also be triggered by: +- Attaching an evidence document (A document uploaded to the Razorpay ecosystem using [Documents API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/documents.md) having purpose set to `dispute_evidence`). +- Providing the evidence in textual format. +- Specifying the contest amount (partial or full) +. + In case, the contest amount is not specifically mentioned, it is assumed to be a full dispute contest. + +**Handy Tips** + +- Ensure you pass the `action` parameter as `submit` to confirm the contest of the dispute. Dispute evidence draft does not get auto-submitted. + +- Ensure you provide a minimum of one document for contesting a dispute. Add as many relevant documents as possible to maximise the chances of dispute resolution in your favor. + +/disputes/:id/contest + +```curl: Draft +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X PATCH https://api.razorpay.com/v1/disputes/disp_AHfqOvkldwsbqt/contest \ +-H "Content-Type: application/json" +-d'{ + "amount": 5000, + "summary": "goods delivered", + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "others": [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "action": "draft" +}' +```json: Response +{ + "id": "disp_AHfqOvkldwsbqt", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "chargeback", + "respond_by": 1590604200, + "status": "open", + "phase": "chargeback", + "created_at": 1590059211, + "evidence": { + "amount": 5000, + "summary": "goods delivered", + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "submitted_at": null + } +} +```curl: Submit +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X PATCH https://api.razorpay.com/v1/disputes/disp_AHfqOvkldwsbqt/contest \ +-H "Content-Type: application/json" +-d'{ + "billing_proof": [ + "doc_EFtmUsbwpXwBG9", + "doc_EFtmUsbwpXwBG8" + ], + "action": "submit" +}' +```json: Response +{ + "id": "disp_AHfqOvkldwsbqt", + "entity": "dispute", + "payment_id": "pay_EsyWjHrfzb59eR", + "amount": 10000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "chargeback", + "respond_by": 1590604200, + "status": "under_review", + "phase": "chargeback", + "created_at": 1590059211, + "evidence": { + "amount": 5000, + "summary": "goods delivered", + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": [ + "doc_EFtmUsbwpXwBG9", + "doc_EFtmUsbwpXwBG8" + ], + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "submitted_at": 1590603200 + } +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the dispute. + +#### Request Parameters + +`amount` _optional_ +: `integer` The amount being contested. In case, the contest amount is not mentioned, we will assume it to be a full dispute contest. + +`summary` +: `string` The explanation provided by you for contesting the dispute. Can have a maximum length of 1000 characters. + +`shipping_proof` +: `list` (List of document ids) [Document(s)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/documents.md) which serves as proof that the product was shipped to the customer at the customer provided address. It should show the customer’s full shipping address, if possible. + +`billing_proof` +: `list` (List of document ids) Document(s) which serves as proof of order confirmation such as receipt. + +`cancellation_proof` +: `list` (List of document ids) Document(s) that serves as a proof that this product/service was cancelled. + +`customer_communication` +: `list` (List of document ids) Document(s) listing any written/email communication from the customer confirming that the customer received the product/service or is satisfied with the product/service. + +`proof_of_service` +: `list` (List of document ids) Document(s) showing proof of service provided to the customer. + +`explanation_letter` +: `list` (List of document ids) Any explanation letter(s) from you specifying information pertinent to the dispute/payment that needs to be taken into consideration for processing the dispute. + +`refund_confirmation` +: `list` (List of document ids) Document(s) showing proof that the refund was provided to the customer. + +`access_activity_log` +: `list` (List of document ids) Document(s) of any server or activity logs which prove that the customer accessed or downloaded the purchased digital product. + +`refund_cancellation_policy` +: `list` (List of document ids) Document(s) listing your refund and/or cancellation policy, as shown to the customer. + +`term_and_conditions` +: `list` (List of document ids) Document(s) listing your sales terms and conditions, as shown to the customer. + +`others` +: `list` Specifies the evidence documents to be uploaded as a part of contesting a dispute. It is a list of tuple consisting of the following: + + `type` + : `string` Describes the custom type of evidence document(s) provided. + + `document_ids` + : `list` (List of document ids) Document(s) corresponding to the customer evidence type. + + ```json: Example + [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH7", + "doc_EFtmUsbwpXwBH6" + ] + } + ] + ``` + +`action` _optional_ +: `string` The action to be taken for this contest. Possible values: + - `draft` - Allows you to contest the dispute by updating the dispute entity. This action does not submit the dispute yet. The absence of the key action or a corresponding value would default the action to `draft`. + - `submit` - Allows you to contest the dispute by updating the dispute entity and also submits the same to Razorpay. You need to provide a minimum of one document id (across any of the evidence object attributes) for a successful submission. Submit for review would change the status of your dispute from `open` to `under_review`. This would also trigger the webhook event `payment.dispute.under_review`. + + + **Handy Tips** + + Add as many relevant documents as possible to maximise the chances of dispute resolution in your favor. + + +### Error Codes + +All successful responses are returned with HTTP Status code 200. In case of failure, Razorpay API returns a JSON error response with the parameters that detail the reason for the failure. + +[Learn more about error codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md). + +## Webhooks + +The webhook events related to disputes are listed below: + +Webhook Event | Description +--- +`payment.dispute.created` | Triggered when a dispute is raised by the customer's issuing bank against a payment. +--- +`payment.dispute.won` | Triggered when you win a dispute against a payment. +--- +`payment.dispute.lost` | Triggered when you lose a dispute against a payment. +--- +`payment.dispute.closed` | Triggered when a dispute is closed. +--- +`payment.dispute.under_review` | Triggered when you contest a dispute and submit the evidence for review. +--- +`payment.dispute.action_required` | Triggered when the evidence submitted is insufficient, unreadable or does not correspond to the contested amount. Please update/add evidences before contesting the dispute again. + +### Payment Dispute Created + +```json: Payment Dispute Created +{ + "entity": "event", + "account_id": "acc_CFvOKjkTwf3GQy", + "event": "payment.dispute.created", + "contains": [ + "payment", + "dispute" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EFtmUsbwpXwBHI", + "entity": "payment", + "amount": 5297600, + "currency": "INR", + "base_amount": 5297600, + "status": "captured", + "order_id": "order_EFtkA6f5jdkfud", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 700000, + "amount_transferred": 0, + "refund_status": "partial", + "captured": true, + "description": null, + "card_id": "card_EADblPSDnnk5ZG", + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919900000000", + "notes": [], + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1581525157 + } + }, + "dispute": { + "entity": { + "id": "disp_EsIAlDcoUr8CaQ", + "entity": "dispute", + "payment_id": "pay_EFtmUsbwpXwBHI", + "amount": 39000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "processed_invalid_expired_card", + "respond_by": 1590431400, + "status": "open", + "evidence": { + "amount": 39000, + "summary": null, + "shipping_proof": null, + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": null, + "submitted_at": null + }, + "phase": "chargeback", + "created_at": 1589907957 + } + } + }, + "created_at": 1589907977 +} +``` + +### Payment Dispute Won + +```json: Payment Dispute Won +{ + "entity": "event", + "account_id": "acc_CFvOKjkTwf3GQy", + "event": "payment.dispute.won", + "contains": [ + "payment", + "dispute" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EsIStomuIwFQ6U", + "entity": "payment", + "amount": 1000000, + "currency": "INR", + "base_amount": 1000000, + "status": "authorized", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": "card_EFEmBYkUF2ZzYw", + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919900000000", + "notes": [], + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "created_at": 1589909038 + } + }, + "dispute": { + "entity": { + "id": "disp_EsIUyp8XlaZOUt", + "entity": "dispute", + "payment_id": "pay_EsIStomuIwFQ6U", + "amount": 130000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "non_matching_account_number", + "respond_by": 1590431400, + "status": "won", + "phase": "chargeback", + "created_at": 1589909126, + "evidence": { + "amount": 130000, + "summary": "goods delivered", + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": [ + "doc_EFtmUsbwpXwBG9", + "doc_EFtmUsbwpXwBG8" + ], + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "submitted_at": 1589909726 + } + } + } + }, + "created_at": 1589909172 +} +``` + +### Payment Dispute Lost + +```json: Payment Dispute Lost +{ + "entity": "event", + "account_id": "acc_CFvOKjkTwf3GQy", + "event": "payment.dispute.lost", + "contains": [ + "payment", + "dispute" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EFtmUsbwpXwBHI", + "entity": "payment", + "amount": 5297600, + "currency": "INR", + "base_amount": 5297600, + "status": "captured", + "order_id": "order_EFtkA6f5jdkfud", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 700000, + "amount_transferred": 0, + "refund_status": "partial", + "captured": true, + "description": null, + "card_id": "card_EADblPSDnnk5ZG", + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "++919900000000", + "notes": [], + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "created_at": 1581525157 + } + }, + "dispute": { + "entity": { + "id": "disp_EsIAlDcoUr8CaQ", + "entity": "dispute", + "payment_id": "pay_EFtmUsbwpXwBHI", + "amount": 39000, + "currency": "INR", + "amount_deducted": 39000, + "reason_code": "processed_invalid_expired_card", + "respond_by": 1590431400, + "status": "lost", + "phase": "chargeback", + "evidence": { + "amount": 39000, + "summary": null, + "shipping_proof": null, + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": null, + "submitted_at": null + }, + "created_at": 1589907977 + } + } + }, + "created_at": 1589908238 +} +``` + +### Payment Dispute Closed + +```json: Payment Dispute Closed +{ + "entity": "event", + "account_id": "acc_CFvOKjkTwf3GQy", + "event": "payment.dispute.closed", + "contains": [ + "payment", + "dispute" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EsIKS2bpFiWghA", + "entity": "payment", + "amount": 10000, + "currency": "INR", + "base_amount": 10000, + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_ECijxX3uDiBYJ4", + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919900000000", + "notes": [], + "fee": 100, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "created_at": 1589908559 + } + }, + "dispute": { + "entity": { + "id": "disp_EsIMubKldQtcu5", + "entity": "dispute", + "payment_id": "pay_EsIKS2bpFiWghA", + "amount": 10000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "goods_or_services_not_received_or_partially_received", + "respond_by": 1590431400, + "status": "closed", + "phase": "fraud", + "evidence": { + "amount": 10000, + "summary": null, + "shipping_proof": null, + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": null, + "submitted_at": null + }, + "created_at": 1589908667 + } + } + }, + "created_at": 1589908856 +} +``` + +### Payment Dispute Under Review + +```json: Payment Dispute Under Review +{ + "entity": "event", + "account_id": "acc_CFvOKjkTwf3GQy", + "event": "payment.dispute.under_review", + "contains": [ + "payment", + "dispute" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EsIStomuIwFQ6U", + "entity": "payment", + "amount": 1000000, + "currency": "INR", + "base_amount": 1000000, + "status": "authorized", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": "card_EFEmBYkUF2ZzYw", + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919900000000", + "notes": [], + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "created_at": 1589909038 + } + }, + "dispute": { + "entity": { + "id": "disp_EsIUyp8XlaZOUt", + "entity": "dispute", + "payment_id": "pay_EsIStomuIwFQ6U", + "amount": 130000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "non_matching_account_number", + "respond_by": 1590431400, + "status": "under_review", + "phase": "chargeback", + "created_at": 1589909126, + "evidence": { + "amount": 100000, + "summary": "goods delivered", + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": [ + "doc_EFtmUsbwpXwBG9", + "doc_EFtmUsbwpXwBG8" + ], + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "submitted_at": 1589909726 + } + } + } + }, + "created_at": 1589909172 +} +``` + +### Payment Dispute Action Required + +```json: Payment Dispute Action Required +{ + "entity": "event", + "account_id": "acc_CFvOKjkTwf3GQy", + "event": "payment.dispute.action_required", + "contains": [ + "payment", + "dispute" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EFtmUsbwpXwBHI", + "entity": "payment", + "amount": 5297600, + "currency": "INR", + "base_amount": 5297600, + "status": "captured", + "order_id": "order_EFtkA6f5jdkfud", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 700000, + "amount_transferred": 0, + "refund_status": "partial", + "captured": true, + "description": null, + "card_id": "card_EADblPSDnnk5ZG", + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919900000000", + "notes": [], + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1581525157 + } + }, + "dispute": { + "entity": { + "id": "disp_EsIAlDcoUr8CaQ", + "entity": "dispute", + "payment_id": "pay_EFtmUsbwpXwBHI", + "amount": 390000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "processed_invalid_expired_card", + "respond_by": 1590431400, + "status": "open", + "phase": "chargeback", + "created_at": 1589907977 + }, + "evidence": { + "amount": 130000, + "summary": "goods delivered", + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": [ + "doc_EFtmUsbwpXwBG9", + "doc_EFtmUsbwpXwBG8" + ], + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "submitted_at": null + } + } + }, + "created_at": 1589907977 +} +``` + +### Related Information + +- [Documents API ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/documents.md) to securely share documents with Razorpay. diff --git a/llm-content/payments/disputes/submit-evidence.md b/llm-content/payments/disputes/submit-evidence.md new file mode 100644 index 00000000..02447bd7 --- /dev/null +++ b/llm-content/payments/disputes/submit-evidence.md @@ -0,0 +1,1280 @@ +--- +title: Submit Evidence +description: Check the details required by the Issuing Bank for Dispute Representment. +--- + +# Submit Evidence + +The process of submitting various evidence documents to banks and gateways for contesting a payment dispute is known as **Dispute Representment**. If you want to successfully contest the chargeback and show the transaction was legitimate, you must submit supporting **chargeback evidence documents**. Know more about [dispute process flow.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md#disputes-process-flow) + +## Chargeback Reason Codes & Evidence Documents for Dispute Resolution + +Every major payment processing network uses multiple dispute reason codes (also called chargeback reason codes). These codes indicate why customers initiated payment disputes and are assigned by the issuing bank. + +The chargeback reason codes are segregated based on the network and are further categorised into common types: + +Category | Description +--- +**Customer Disputes** | Customer claims goods/services are not received, defective or the transaction was not recognised. +--- +**Fraud** | Customer claims an unauthorised transaction occurred or the card was used without their knowledge. +--- +**Authorisation Error** | Transaction processed without proper authorisation or with declined/expired approval. +--- +**Processing Error** | Technical mistakes, such as a wrong amount, duplicate charge or incorrect details. + +Here is a list of the required evidence documents to submit against each specific chargeback reason code to help you win the dispute. + +### UPI + + + + +### 1061 - Credit Not Processed + + - **Reason Description**: The business failed to process the credit after the customer cancelled or returned the goods or services. + - **Suggested Documents**: + - Proof of refund generation + - Bank statement showing refund amount which should match the payment amount + - Customer communication showing refund confirmation + - Refund policies + + + +### 1062 - Goods/Services Not As Described + + - **Reason Description**: The business delivered a product or service that significantly differed from what they advertised or described. + - **Suggested Documents**: + - Product description/image screenshots + - Proof of product/service delivery + - Customer communication showcasing dissatisfaction + - Return policies + + + +### 1064 - Goods/Services Not Received + + - **Reason Description**: The business failed to deliver the product or service to the customer despite receiving payment for the purchase. + - **Suggested Documents**: + - Proof of service/product delivery + - Customer interaction showcasing product/service related enquiries + - Terms & Conditions showcasing refund & fulfillment policies + + + + + + + +### 128 - Fraudulent Transaction + + - **Reason Description**: The business debited the customer's account fraudulently. + - **Suggested Documents**: + - Internal logs to show authorisation was obtained + - Invoicing details along with detailed price breakdown for the debited amount + - Proof of service/goods delivery clearly mentioning customer name and address details + + + + + + + +### 108 - Remiter Debited but Beneficiary Not Credited + + - **Reason Description**: The customer's account was debited the authorised amount, but the beneficiary did not receive the credit. + - **Suggested Documents**: + - Proof of service/product delivery + - Customer interaction showcasing product/service related enquiries + - Customer Withdrawn letter + - Terms & Conditions showcasing refund & fulfillment policies + + + +### 1065 - Debit on Failed Transaction + + - **Reason Description**: The system debited the account, yet the business did not receive confirmation of the payment. + - **Suggested Documents**: + - Proof of service/product delivery + - Customer interaction showcasing product/service related enquiries + - Customer Withdrawn letter + - Terms & Conditions showcasing refund & fulfillment policies + + + +### 121 - TCC Raised but Beneficiary is Not Credited + + - **Reason Description**: The customer raised a dispute because the TCC was issued, but the beneficiary's account has not been credited. + - **Suggested Documents**: + - Proof of service/product delivery + - Customer interaction showcasing product/service related enquiries + - Customer Withdrawn letter + - Terms & Conditions showcasing refund & fulfillment policies + + + + + + + +### 1063 - Paid by Other Means + + - **Reason Description**: The customer paid via cash or another method, yet the business still charged this card in error. + - **Suggested Documents**: + - Proof showing payment was not received using any other method + - Refund proof if amount was refunded for duplicate charge + - Proof to show the claimed transaction was for a different product/service + + + +### 1084 - Duplicate Processing + + - **Reason Description**: The business processed the same transaction multiple times, incorrectly charging the customer twice or more for a single purchase. + - **Suggested Documents**: + - System logs to prove only one transaction was processed for single authorisation + - Invoicing to prove each transaction was for separate service/product + + + +### 1085 - Charge Amount Exceeds Authorisation Amount + + - **Reason Description**: The business processed a charge that exceeded the amount the customer authorised. + - **Suggested Documents**: + - Invoice with detailed price breakdown (price, taxes, fee, discount and so on) prove amount charged was correct + - Screenshot of product/service along with the price details + - Authorisation proof showing final amount was authorised by cardholder + - System logs to show correct amount was charged + + + +### 1081 - Not Settled Within Timeline + + - **Reason Description**: The payment failed because the business did not process the transaction within the stipulated time limit. + - **Suggested Documents**: + - Internal logs to prove that charge was submitted within allowed time frame + - Time stamp of transaction and processing of the payment showing debit amount + - In case of re-auth, please provide proof of same + - Customer authorisation proof + - Masked card details and invoice of the transaction + + + + + +### Visa + + + + +### 13.1 - Merchandise/Services Not Received + + - **Reason Description**: The customer paid for the order but did not receive the product/service because the business failed to deliver the goods/service. + - **Suggested Documents**: + - Delivery confirmation with signature + - Tracking information + - Service completion records + - Digital delivery logs + - Customer acknowledgement + + + +### 13.2 - Cancelled Recurring Transaction + + - **Reason Description**: The business charged the customer for the subscription in a subsequent billing cycle, despite the customer having already cancelled the recurring billing. + - **Suggested Documents**: + - Cancellation policy + - No cancellation request received + - Continued usage logs + - Terms of service + - Cancellation window proof + + + +### 13.3 - Not as Described or Defective + + - **Reason Description**: The customer received a damaged or defective item (or a service of poor quality), as the product significantly differed from the description. + - **Suggested Documents**: + - Product description/images + - Quality control records + - No return received + - Customer did not contact for resolution + - Terms and conditions + + + +### 13.4 - Counterfeit Merchandise + + - **Reason Description**: The business delivered fake or counterfeit goods to the customer; the product was an imitation or unauthorised reproduction of a branded item. + - **Suggested Documents**: + - Authenticity certificates + - Supplier verification + - Brand authorisation + - Product source documentation + - Quality guarantees + + + +### 13.5 - Misrepresentation + + - **Reason Description**: The business misrepresented the terms of the sale by making false claims about the product's features or the sales conditions. + - **Suggested Documents**: + - Accurate marketing materials + - Clear terms display + - Customer acknowledgement + - No misleading claims proof + - Contract terms + + + +### 13.6 - Credit Not Processed + + - **Reason Description**: The business failed to process the promised refund or credit to the customer's account. + - **Suggested Documents**: + - Refund processing proof + - Credit timestamp + - Return not received + - Refund policy compliance + - Transaction reversal records + + + +### 13.7 - Cancelled Merchandise/Services + + - **Reason Description**: The business charged the customer for the order even though the customer had cancelled it before shipment or service delivery. + - **Suggested Documents**: + - No cancellation received + - Cancellation policy terms + - Order already processed/shipped + - Cancellation window missed + - Terms agreement + + + +### 13.8 - Original Credit Transaction Not Accepted + + - **Reason Description**: The card network rejected the Original Credit Transaction (OCT) that the business submitted for the refund or payout. + - **Suggested Documents**: + - Valid account verification + - Compliance with OCT rules + - Alternative refund method + - Transaction approval records + + + + + + + +### 10.1 - EMV Liability Shift – Counterfeit Fraud + + - **Reason Description**: A counterfeit card was used at a terminal that did not support chip technology, so the business takes the liability. + - **Suggested Documents**: + - EMV compliance certificate + - Terminal capability proof + - Transaction receipt showing chip read + - Authorisation approval + - Card-present evidence + + + +### 10.2 - EMV Liability Shift – Non-Counterfeit Fraud + + - **Reason Description**: A legitimate card was used fraudulently at a terminal that did not support chip technology, meaning the business takes the liability. + - **Suggested Documents**: + - EMV compliance documentation + - Terminal logs + - Chip transaction data + - Authorisation records + - PIN verification (if applicable) + + + +### 10.3 - Other Fraud – Card-Present Environment + + - **Reason Description**: The cardholder denies authorising this in-person transaction; these claims usually involve stolen or cloned cards used at a physical shop or business. + - **Suggested Documents**: + - Signed receipt + - EMV/chip data + - Security footage timestamp + - PIN verification + - Authorisation approval + - Card imprint (if manual) + + + +### 10.4 - Other Fraud – Card-Absent Environment + + - **Reason Description**: An unauthorised online, phone or mail transaction has occurred, which the cardholder denies authorising. This frequently causes e-commerce chargebacks. + - **Suggested Documents**: + - AVS match results + - CVV2/CVC2 verification + - IP address & device fingerprint + - Order history + - Shipping proof to billing address + - 3D Secure authentication + + + +### 10.5 - Visa Fraud Monitoring Program + + - **Reason Description**: Visa's fraud detection system flagged the transaction. Visa issues this when the business exceeds the fraud thresholds set in their monitoring program. + - **Suggested Documents**: + - Fraud prevention measures documentation + - Transaction authentication records + - Compliance improvements + - Risk assessment protocols + + + + + + + +### 11.1 - Card Recovery Bulletin + + - **Reason Description**: The business failed to decline or retain the card, allowing the transaction to proceed despite the card appearing on Visa's restricted card bulletin. + - **Suggested Documents**: + - Confirmation that the authorisation was not flagged on a bulletin/warning list + - Proof card was valid at transaction time + - Terminal records + - CRB check documentation + + + +### 11.2 - Declined Authorisation + + - **Reason Description**: The business violated authorisation rules by overriding the decline response and forcing the transaction through. + - **Suggested Documents**: + - Valid authorisation approval code + - Proof of subsequent approval + - Terminal logs showing approved status + - Authorisation reversal records + + + + + + + +### 12.2 - Incorrect Transaction Code + + - **Reason Description**: The business used the wrong code, processing the transaction type differently than intended (for example, a refund captured/processed wrongly as a sale). + - **Suggested Documents**: + - Correct transaction records + - Processing logs + - Customer agreement for transaction type + - System configuration proof + + + +### 12.3 - Incorrect Currency Code + + - **Reason Description**: The customer was charged in an incorrect currency because the business processed the transaction using the wrong one. + - **Suggested Documents**: + - Original currency agreement + - Display screenshots + - Exchange rate disclosure + - Customer consent for currency + + + +### 12.4 - Incorrect Account Number + + - **Reason Description**: A data entry error caused the business to post the transaction to the incorrect cardholder account. + - **Suggested Documents**: + - Correct account verification + - Customer confirmation + - Order records matching account + - Payment method selection proof + + + +### 12.5 - Incorrect Amount + + - **Reason Description**: The business charged the customer an amount that differed from the original purchase price they had authorised. + - **Suggested Documents**: + - Original receipt/invoice + - Authorisation for exact amount + - Price agreement documentation + - Shopping cart screenshot + + + +### 12.6.1 - Duplicate Processing – Single Authorisation + + - **Reason Description**: The business incorrectly processed multiple transactions by using the same authorisation code from a single original authorisation. + - **Suggested Documents**: + - Authorisation logs + - Processing records + - Transaction IDs + - Batch reports showing unique transactions. + + + +### 12.6.2 - Paid by Other Means + + - **Reason Description**: The business incorrectly charged this card after the customer had already paid using a different method, such as cash, cheque or another card. + - **Suggested Documents**: + - Proof of single payment method + - No alternative payment records + - Customer communication + - Payment reconciliation + + + +### 12.7 - Invalid Data + + - **Reason Description**: The system failed to capture valid transaction data, rendering critical information unreadable or missing. + - **Suggested Documents**: + - Corrected transaction data + - Valid processing records + - Resubmission documentation + - Data integrity proof + + + + + +### Mastercard + + + + +### 4841 - Cancelled Recurring or Digital Goods Transaction + + - **Reason Description**: The business charged the customer for the subscription or digital goods despite the customer having already cancelled the recurring billing or service. + - **Suggested Documents**: + - Cancellation policy + - No cancellation received + - Service usage after date + - Terms of service + - Digital access logs + + + +### 4850 - Installment Billing Dispute + + - **Reason Description**: The business violated the agreed terms or payment schedule of the instalment plan. + - **Suggested Documents**: + - Installment agreement + - Payment schedule + - Terms compliance + - Customer consent + - Billing records + + + +### 4853 - Cardholder Dispute + + - **Reason Description**: This general dispute covers quality issues where the customer did not receive the goods or service, or the product was defective or misrepresented. + - **Suggested Documents**: + - Depends on specific dispute - delivery proof, quality records, product description, return policy, customer communication + + + +### 4854 - Cardholder Dispute - Not Elsewhere Classified (NEC) + + - **Reason Description**: The dispute is valid, but the details do not fit any of the specific reason code categories. + - **Suggested Documents**: + - Varies by dispute type - general proof of valid transaction/delivery/service/authorisation/customer agreement + + + + + + + +### 4837 - No Cardholder Authorisation + + - **Reason Description**: The cardholder claims they did not authorise or participate in the transaction. + - **Suggested Documents**: + - Cardholder verification + - AVS/CVV match + - 3D Secure + - Delivery proof + - IP geolocation + - Purchase history + + + +### 4840 - Fraudulent Processing of Transactions + + - **Reason Description**: The business knowingly processed a fraudulent transaction despite the presence of clear fraud indicators. + - **Suggested Documents**: + - Fraud screening results + - Legitimate transaction proof + - Authentication records + - Risk assessment + - Customer verification + + + +### 4849 - Questionable Business Activity + + - **Reason Description**: The transaction appears fraudulent, indicating that the business is engaged in suspicious or deceptive practices. + - **Suggested Documents**: + - Business legitimacy proof + - Clear terms + - Customer agreement + - Delivery confirmation + - Service completion + + + +### 4870 - Chip Liability Shift + + - **Reason Description**: The business failed to use EMV chip technology, making it liable for the fraud when the chip card was processed on a magnetic stripe terminal. + - **Suggested Documents**: + - EMV terminal capability + - Chip transaction data + - Fallback reason + - Terminal certification + - Authorisation records + + + +### 4871 - Chip/PIN Liability Shift + + - **Reason Description**: A Chip and PIN card was processed without proper verification, thus shifting the fraud liability to the business. + - **Suggested Documents**: + - PIN verification records + - Chip + PIN terminal proof + - Transaction authentication + - Terminal compliance + - Fallback documentation + + + + + + + +### 4808 - Authorisation-Related Chargeback + + - **Reason Description**: The business encountered multiple authorisation issues, which includes both failing to secure necessary approval and exceeding the authorised transaction amount. + - **Suggested Documents**: + - Valid authorisation code + - Correct amount authorisation + - Multiple auth prevention + - Terminal records + - Approval documentation + + + + + + + +### 4834 - Duplicate Processing + + - **Reason Description**: The business processed the transaction repeatedly, which resulted in the customer being charged multiple times for the same purchase or service. + - **Suggested Documents**: + - Single transaction proof + - Void/refund for duplicates + - Transaction logs + - Unique reference numbers + - System timestamps + + + + + +### Rupay + + + + +### 1061 - Credit Not Processed + + - **Reason Description**: The business failed to process the credit after the customer cancelled or returned the goods and services. + - **Suggested Documents**: + - Proof of refund generation + - Bank statement showing refund amount which should match the payment amount + - Customer communication showing refund confirmation + - Refund policies + + + +### 1062 - Goods/Services Not As Described + + - **Reason Description**: The business delivered goods or services that significantly differed from the description or were defective. + - **Suggested Documents**: + - Product description/image screenshots + - Proof of product delivery + - Customer communication showcasing dissatisfaction + - Return policies + + + +### 1064 - Goods/Services Not Received + + - **Reason Description**: The business failed to provide or deliver the goods or services that the customer purchased. + - **Suggested Documents**: + - Proof of service/product delivery + - Customer interaction showcasing product/service related enquiries + - Terms & Conditions showcasing refund & fulfillment policies + + + +### 1101 - Illegible Fulfilment + + - **Reason Description**: The business submitted illegible documents in response to the retrieval request. + - **Suggested Documents**: + - Proof of service/product delivery + - Customer interaction showcasing product/service related enquiries + - Terms & Conditions showcasing refund & fulfillment policies + + + +### 1102 - Retrieval Request Not Fulfilled + + - **Reason Description**: The acquiring partner failed to fulfil the retrieval request within the timeframe or responded with a non-fulfillment message. + - **Suggested Documents**: + - Proof of service/product delivery + - Customer interaction showcasing product/service related enquiries + - Terms & Conditions showcasing refund & fulfillment policies + + + +### 1103 - Invalid Fulfilment + + - **Reason Description**: The business submitted invalid documents in response to the retrieval request. + - **Suggested Documents**: + - Proof of service/product delivery + - Customer interaction showcasing product/service related enquiries + - Terms & Conditions showcasing refund & fulfillment policies + + + + + + + +### 1104 - Cardholder Does Not Recognise the Transaction + + - **Reason Description**: The cardholder does not recognise the transaction appearing on their statement. + - **Suggested Documents**: + - Invoice with masked card details to prove correct account was charged + - Authorisation logs to support the above + - Invoice with detailed price breakdown (price, taxes, fee, discount and so on) prove amount charged was correct + - Screenshot of product/service along with the price details + - System logs to show correct amount was charged + + + +### 1141 - Fraudulent Card-Present Transaction + + - **Reason Description**: The cardholder asserts they did not make the in-person payment at the business's premises. + - **Suggested Documents**: + - Transaction details of at least 2 payments by the same customer which were not reported for fraud (if available) + - Invoices confirming customer details such as name, phone number, address and so on + - Delivery proof showing product/service was delivered as per T&C + + + +### 1142 - Fraudulent Card-Not-Present Transaction + + - **Reason Description**: The cardholder denies authorising the remote transaction, asserting they did not make the purchase without the card present (a Card-Not-Present or CNP transaction). + - **Suggested Documents**: + - Transaction details of at least 2 payments by the same customer which were not reported for fraud + - At least 2 parameters (device ID, fingerprint, IP address) of above payments should match for the disputed payment + - Invoices confirming customer details such as name, phone number, address and so on + - Delivery proof showing product was delivered as per T&C + + + +### 1143 - Fraudulent Multiple Transactions + + - **Reason Description**: The same card was subjected to multiple fraudulent transactions. + - **Suggested Documents**: + - Transaction details of at least 2 payments by the same customer which were not reported for fraud + - At least 2 parameters (device ID, fingerprint, IP address) of above payments should match for the disputed payment + - Invoices confirming customer details such as name, phone number, address and so on + - Delivery proof showing product was delivered as per T&C + + + + + + + +### 1065 - Debit on Failed Transaction + + - **Reason Description**: The system debited the account, but the transaction failed to confirm at the business's premises. + - **Suggested Documents**: + - Proof of service/product delivery + - Customer interaction showcasing product/service related enquiries + - Customer Withdrawn letter + - Terms & Conditions showcasing refund & fulfillment policies + + + +### 1121 - Transaction Received Declined Authorisation Response + + - **Reason Description**: The business violated authorisation rules by overriding the decline response and forcing the transaction through. + - **Suggested Documents**: + - Documents to show cardholder authorised the transaction + - Internal logs to show the correct amount was debited along with invoices + - Timestamp of auth creation and approval from customer + - Proof of delivery for goods/services + + + +### 1122 - Transaction Not Authorised + + - **Reason Description**: The customer claims the transaction was unauthorised, as it occurred when they were not present. + - **Suggested Documents**: + - Internal logs to prove cardholder authorisation of the transaction along with the final debit amount + - Invoicing with price breakdown and customer details + - Masked card information + + + +### 1123 - Invalid Card Number + + - **Reason Description**: The business processed the transaction using an invalid card number and either failed to obtain authorisation or processed the credit using the incorrect number. + - **Suggested Documents**: + - Invoice with masked card details, customer name and contact details + - Authorisation logs to support the above + + + + + + + +### 1063 - Paid by Other Means + + - **Reason Description**: The business incorrectly charged this card despite the customer having already settled the transaction using a different method, such as cash, cheque or another card. + - **Suggested Documents**: + - Proof showing payment was not received using any other method + - Refund proof if amount was refunded for duplicate charge + - Proof to show the claimed transaction was for a different product/service + + + +### 1081 - Not Settled Within Timeline + + - **Reason Description**: The business failed to settle the transaction within the specified timeframes. + - **Suggested Documents**: + - Internal logs to prove that charge was submitted within allowed time frame + - Time stamp of transaction and processing of the payment showing debit amount + - In case of re-auth, please provide proof of same + - Customer authorisation proof + - Masked card details and invoice of the transaction + + + +### 1082 - Credit Posted as Debit + + - **Reason Description**: The business incorrectly processed the credit as a debit on the customer's account. + - **Suggested Documents**: + - Internal transaction logs proving correct debit was done + - Refund/Invoice details in case there was attempt to correct the wrong debit + - Invoice for the debit that was done on the cardholder + + + +### 1083 - Incorrect Transaction Details + + - **Reason Description**: The business incorrectly entered either the account number or the transaction amount used in the payment. + - **Suggested Documents**: + - Invoice with masked card details to prove correct account was charged + - Authorisation logs to support the above + - Invoice with detailed price breakdown (price, taxes, fee, discount and so on) prove amount charged was correct + - Screenshot of product/service along with the price details + - System logs to show correct amount was charged + + + +### 1084 - Duplicate Processing + + - **Reason Description**: The business processed the same transaction multiple times, incorrectly charging the customer twice or more for a single purchase. + - **Suggested Documents**: + - System logs to prove only one transaction was processed for single auth + - Invoicing to prove each transaction was for separate service/product + + + + + +### American Express + + + + +### C02 - Credit Not Processed + + - **Reason Description**: The business failed to process the promised credit or refund to the customer's account. + - **Suggested Documents**: + - Credit issuance proof + - Refund date/amount + - Return not received + - Policy compliance + - Processing confirmation + + + +### C04 - Goods/Services Returned or Refused + + - **Reason Description**: Customer returned product or refused service. Goods were sent back or service was rejected but no refund issued. + - **Suggested Documents**: + - Return not received + - Refusal not documented + - Restocking completed + - Return policy terms + - Delivery confirmation + + + +### C05 - Goods/Services Cancelled + + - **Reason Description**: The customer returned the product or refused the service, but the business failed to issue the corresponding refund. + - **Suggested Documents**: + - No cancellation received + - Cancellation policy + - Already shipped/provided + - Cancellation deadline passed + - Terms proof + + + +### C08 - Goods/Services Not Received + + - **Reason Description**: The business failed to deliver the product or service to the customer, despite having already received payment for the purchase. + - **Suggested Documents**: + - Delivery confirmation + - Tracking proof + - Service completion + - Digital delivery logs + - Customer signature + + + +### C14 - Paid by Other Means + + - **Reason Description**: The business charged the American Express card despite the customer having already settled the transaction using a different payment method. + - **Suggested Documents**: + - Single payment proof + - No alternative payment + - Payment reconciliation + - Customer communication + - Order records + + + +### C18 - No Show + + - **Reason Description**: The business charged the customer a no-show fee after the customer failed to appear for the hotel or rental car reservation. + - **Suggested Documents**: + - No-show policy disclosure + - Cancellation window + - Policy agreement + - Reservation confirmation + - Terms acceptance + + + +### C28 - Cancellation of Recurring Goods/Services + + - **Reason Description**: The business continued the recurring billing and charged the customer for the subscription, despite the customer having cancelled the service. + - **Suggested Documents**: + - No cancellation received + - Cancellation policy + - Continued usage + - Service access logs + - Terms of service + + + +### C31 - Goods/Services Not As Described + + - **Reason Description**: Quality/description issues. Product or service significantly different from what was advertised or described. + - **Suggested Documents**: + - Accurate description + - Photos/specifications + - Quality standards met + - No complaint received + - Terms compliance + + + +### C32 - Goods/Services Damaged or Defective + + - **Reason Description**: The business delivered a product or service that significantly differed from what they advertised or described. + - **Suggested Documents**: + - Quality control records + - No damage claim + - Shipping insurance + - Packaging adequacy + - No return received + + + +### M01 - Chargeback Authorisation + + - **Reason Description**: The business previously agreed to the chargeback and authorised the reversal of this transaction. + - **Suggested Documents**: + - No prior agreement + - Chargeback authorisation invalid + - Documentation of dispute + - No consent given + + + +### M10 - Vehicle Rental – Capital Damages + + - **Reason Description**: The customer is disputing the damage charges that the rental company applied to the vehicle. + - **Suggested Documents**: + - Damage documentation + - Pre-rental inspection + - Photos with timestamp + - Rental agreement + - Insurance coverage + + + +### M49 - Vehicle Rental – Theft or Loss of Use + + - **Reason Description**: The rental company charged the customer for the theft or loss of use of the hired vehicle. + - **Suggested Documents**: + - Police report + - Theft documentation + - Contract terms + - Insurance claims + - Loss mitigation efforts + + + + + + + +### F10 - Missing Imprint + + - **Reason Description**: The business failed to provide the required manual imprint for the key-entered transaction. + - **Suggested Documents**: + - Card imprint + - Electronic authorisation + - Card-present proof + - Terminal records + - Manual processing logs + + + +### F14 - Missing Signature + + - **Reason Description**: The business failed to obtain the required signature on the transaction receipt for this card-present sale. + - **Suggested Documents**: + - Signed receipt + - Signature on file + - PIN verification + - Contactless approval + - Customer verification + + + +### F24 - No Card Member Authorisation + + - **Reason Description**: The cardholder denies authorising or participating in this transaction. + - **Suggested Documents**: + - Authorisation proof + - Cardholder verification + - AVS/CVV match + - 3D Secure + - Purchase history + + + +### F29 - Card Not Present + + - **Reason Description**: The cardholder disputes the card-not-present (CNP) transaction, claiming they did not authorise it. + - **Suggested Documents**: + - AVS/CVV verification + - IP address + - Device fingerprint + - Shipping to billing address + - Purchase patterns + + + +### F30 - EMV Counterfeit + + - **Reason Description**: A counterfeit chip card was used to complete a fraudulent transaction at a terminal that did not support EMV technology. + - **Suggested Documents**: + - EMV terminal proof + - Chip data + - Authentication records + - Terminal capability + - Fallback documentation + + + +### F31 - EMV Lost/Stolen/Never Received + + - **Reason Description**: The business accepted a transaction from an EMV card reported as lost or stolen because they used a non-chip terminal. + - **Suggested Documents**: + - EMV compliance + - Terminal capability + - Chip transaction attempt + - Authorisation records + - PIN verification + + + + + + + +### A01 - Charge Amount Exceeds Authorisation Amount + + - **Reason Description**: The business processed the transaction for an amount that exceeded the approved authorisation. + - **Suggested Documents**: + - Authorisation for full amount + - Incremental auth records + - Customer agreement for additional charges + - Receipt showing total + + + +### A02 - No Valid Authorisation + + - **Reason Description**: The business processed the transaction without obtaining the required authorisation from American Express. + - **Suggested Documents**: + - Valid authorisation code + - Approval records + - Emergency authorisation + - Manual approval documentation + + + +### A03 - Authorisation Approval Expired + + - **Reason Description**: The business used an expired authorisation when they submitted the transaction for settlement. + - **Suggested Documents**: + - Current authorisation + - Reauthorisation records + - Timeline documentation + - Settlement timing proof + + + + + + + +### P01 - Unassigned Card Number + + - **Reason Description**: The transaction failed because the business used a card number that American Express does not recognise. + - **Suggested Documents**: + - Valid card verification + - Account confirmation + - Authorisation approval + - Card authenticity + - Number validation + + + +### P03 - Credit Processed as Charge + + - **Reason Description**: The business incorrectly processed the refund transaction as a new charge on the customer's statement. + - **Suggested Documents**: + - Transaction type proof + - System records + - Processing logs + - Refund intention + - Correction documentation + + + +### P04 - Charge Processed as Credit + + - **Reason Description**: The business incorrectly processed the sale transaction as a refund, causing the charge to appear as a credit on the customer's statement. + - **Suggested Documents**: + - Correct transaction type + - Processing records + - Sale documentation + - System logs + - Authorisation type + + + +### P05 - Incorrect Charge Amount + + - **Reason Description**: The business processed the transaction for an amount that differed from what the customer agreed to pay. + - **Suggested Documents**: + - Correct amount proof + - Receipt/invoice + - Customer agreement + - Authorisation for amount + - Pricing documentation + + + +### P07 - Late Submission + + - **Reason Description**: The business submitted the transaction late, having exceeded the time limit for processing. + - **Suggested Documents**: + - Timely submission proof + - System delays + - Original date documentation + - Processing timeline + - Batch records + + + +### P08 - Duplicate Charge + + - **Reason Description**: The business processed the same transaction multiple times, incorrectly charging the customer's account repeatedly. + - **Suggested Documents**: + - Single charge proof + - Transaction logs + - Void/refund records + - Unique identifiers + - System timestamps + + + +### P22 - Non-Matching Card Number + + - **Reason Description**: The business processed the transaction using a card number that does not match the cardholder's account on file. + - **Suggested Documents**: + - Card number verification + - Account match proof + - Customer confirmation + - Order records + - Authorisation match + + + +### P23 - Currency Discrepancy + + - **Reason Description**: The business processed the transaction using an incorrect currency, which was different from the currency the customer agreed to. + - **Suggested Documents**: + - Currency agreement + - Exchange rate disclosure + - Original pricing + - Customer consent + - Display proof + + + + + +### Razorpay + + + + +### RZP06 - Business Not Responding + + - **Reason Description**: The business has failed to respond to the customer's queries following the transaction. + - **Suggested Documents**: + - Proof of service/goods delivery to the customer's address in committed timeline + - Invoicing details showing transaction amount and date-time + - Customer communications over email (not WhatsApp) + + + +### RZP05 - Account Debited but No Confirmation + + - **Reason Description**: The customer's account was debited, but the system failed to send confirmation of the transaction. + - **Suggested Documents**: + - Service/Product invoice in case payment was captured successfully + - Internal logs to prove the payment failed and no money was credited hence no service/goods were provided + - Customer interaction showcasing product/service related enquiries + - Terms & Conditions showcasing refund & fulfillment policies + + + +### RZP01 - Goods/Services not Provided + + - **Reason Description**: The customer paid for the order, but the business never provided the goods or services. + - **Suggested Documents**: + - Proof of service/product delivery + - Customer interaction showcasing product/service related enquiries + - Terms & Conditions showcasing refund & fulfillment policies + + + +### RZP04 - Refund not Processed + + - **Reason Description**: The business promised a refund but did not process the credit to the customer's account. + - **Suggested Documents**: + - Proof of refund generation + - Bank statement showing refund amount which should match the payment amount + - Customer communication showing refund confirmation + - Refund policies + + + +### RZP00 - Not Available + + - **Reason Description**: This dispute does not fit into any of the existing, specific categories. + - **Suggested Documents**: + - Proof of service/goods delivery to the customer's address in committed timeline + - Invoicing details showing transaction amount and date-time + - Customer communications over email (not WhatsApp) + - Refund details in case you have already generated a successful refund to the customer + + + + + + + +### RZP03 - Potential Fraud + + - **Reason Description**: The business has potentially committed fraud. + - **Suggested Documents**: + - System logs to prove the payment was authorised + - Invoicing details of the product/services + - Additionally in case of card not present scenario, you will have to submit compelling evidence; details of at least 2 prior transactions done by the same customer (with at least 2 parameters matching out of IP/device fingerprint/device ID) which are not reported as fraud + - Additionally in case of card present scenario, present EMV transaction data proving customer participation + + + + + + + +### RZP02 - Unauthorised Transaction + + - **Reason Description**: The cardholder denies authorising the transaction, claiming it occurred in their absence. + - **Suggested Documents**: + - System logs to prove the payment was authorised + - Invoicing details of the product/services along with delivery proof + - Additionally in case of card not present scenario, you will have to submit compelling evidence; details of at least 2 prior transactions done by the same customer (with at least 2 parameters matching out of IP/device fingerprint/device ID) which are not reported as fraud + - Additionally in case of card present scenario, submit EMV transaction data proving customer participation + + + + + + + +### RZP07 - Invalid Data + + - **Reason Description**: The system failed to process the transaction because the business's data was invalid. + - **Suggested Documents**: + - Data showing the transaction was authorised by processor using valid data + - Valid data includes masked card details, 2FA details for domestic transactions, customer name and date-time + + + + + +## Next Steps in Dispute Representment + +If you contest the chargeback using the required evidence documents, those documents are sent to the issuing bank for review. The issuing bank reviews the dispute representment case and provides a verdict within **15 to 30 days**. + +If you lose the payment dispute, the amount of the chargeback is deducted from your account and is credited back to the customer's account. + +If you win the dispute, no amount will be deducted from your balance, successfully resolving the chargeback. + +### Related Information + +- [About Disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md) +- [Disputes - Dashboard Actions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/dashboard.md) +- [Dispute FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/faqs.md) +- [Contact Support](https://razorpay.com/support/#request) for additional help with disputes. diff --git a/llm-content/payments/disputes/subscribe-to-webhooks.md b/llm-content/payments/disputes/subscribe-to-webhooks.md new file mode 100644 index 00000000..fbc7699b --- /dev/null +++ b/llm-content/payments/disputes/subscribe-to-webhooks.md @@ -0,0 +1,37 @@ +--- +title: Disputes | Subscribe to Webhooks +heading: Subscribe to Webhooks +description: Subscribe to various webhook events related to disputes to receive instant notifications. +--- + +# Subscribe to Webhooks + +Subscribe to webhook events available for disputes to get notifications. + +To subscribe to webhook events: +1. Log in to the Dashboard. +2. Navigate to **Account & Settings** → **Webhooks** to subscribe to any of the events listed below. + +## List of Webhook Events + +The table below lists the webhook events available for disputes. + +Webhook Event | Description +--- +`payment.dispute.created` | Triggered when a dispute is raised by the customer's issuing bank against a payment. +--- +`payment.dispute.won` | Triggered when you win a dispute against a payment. +--- +`payment.dispute.lost` | Triggered when you lose a dispute against a payment. +--- +`payment.dispute.closed` | Triggered when a dispute is closed. +--- +`payment.dispute.under_review` | Triggered when you contest a dispute and submit the evidence for review. +--- +`payment.dispute.action_required` | Triggered when the evidence submitted is insufficient, unreadable or does not correspond to the contested amount. Please update/add evidences before contesting the dispute again. + +Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) and check the [sample payloads.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/disputes.md) + +### Related Information +- [About Disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md) +- [Disputes APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes/apis.md) diff --git a/llm-content/payments/dynamic-convenience-fees.md b/llm-content/payments/dynamic-convenience-fees.md new file mode 100644 index 00000000..46241081 --- /dev/null +++ b/llm-content/payments/dynamic-convenience-fees.md @@ -0,0 +1,73 @@ +--- +title: Dynamic Convenience Fees +description: You can choose to charge dynamic convenience fees to your customers. Know how to send dynamic convenience fee details as part of Orders API. +--- + +# Dynamic Convenience Fees + +Razorpay charges a platform fee for every payment (from you). You can choose to charge this as a convenience fee to your customers for the use of technology. You can charge this fee dynamically to the customer; instead of a standard amount, you can split the charges dynamically for every payment. + +For example, the business can create a configuration wherein, if the total platform fee is ₹12, then the business will pay ₹6, and the customer will pay ₹6. + +Alternatively, the business can create a configuration wherein the customer will bear 20% of the total platform fee, and the business will bear the rest. + +You can perform this configuration at the method level. + +The modified convenience fee will be visible on the Razorpay Checkout and displayed to the customer ensuring complete transparency and no experience breakage. + +![Dynamic Convenience Fees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-dynamic-convenience-fees-v2.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> - This feature is currently supported for specific business cases only. You can contact our [Support team](https://razorpay.com/support) to get this feature activated on your account. +> - In case of a refund, the customer is refunded the Convenience fee along with the payment amount. +> - **INR** is the only supported currency. This feature is not available for international payments. +> - This feature is **not available** for: +> - Smart Collect (via VA, VPA and QR Codes) +> - Route +> - Subscriptions (via Emandate, Paper NACH) +> + +## Use Cases + +Given below are the various use cases for dynamic convenience fees: + +- An insurance company wants to waive off the transaction fee on customers when they pay within the **Premium Amount Due** period. However, once the period expires, the insurance company wants to pass on the transaction fee to the customers. +- A business wants to pass on the transaction fee (flat/percentage) to its customers based on the payment method and amount. The business wants to keep the flexibility of a flat/percentage-based model. + - In this use case, the business also wants to display a message on checkout to the customer informing them of the charges applicable to the payment method. + - For example, an additional convenience fee of INR xx.xx will be charged for this credit card payment towards the charges levied by your credit card issuing bank. To make the payment without any additional charges, please use UPI, netbanking or any debit card. + +## Prerequisites + +- [Create a Razorpay account](https://dashboard.razorpay.com/signup). +- Contact [Razorpay support](https://razorpay.com/support/#request) to enable this feature for your account. +- Generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) on the Dashboard. + +## Workflow + +To charge dynamic convenience fees: + +1. Create an order in your server using the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dynamic-convenience-fees/api.md#orders-api) and pass the convenience fee details. +2. Pass order_id to [Standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#12-integrate-with-checkout-on-client-side). +3. [Store fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#14-store-fields-in-your-server) in server. +4. [Verify payment signature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#15-verify-payment-signature). + +## Communication + +You should inform the customers about the convenience fees, as we do not notify the customer of the convenience fees except at checkout. The convenience fees are added to the total amount in the Razorpay Payment Acknowledgement email on successful payment. + +> **WARN** +> +> +> **Watch Out!** +> +> The email does not contain the payment breakup to indicate the convenience fees separately but is added to the total amount. +> + +### Related Information + +- [Dynamic Convenience Fees APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dynamic-convenience-fees/api.md) +- [Dynamic Convenience Fees FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dynamic-convenience-fees/faqs.md) diff --git a/llm-content/payments/dynamic-convenience-fees/api.md b/llm-content/payments/dynamic-convenience-fees/api.md new file mode 100644 index 00000000..aaca5c99 --- /dev/null +++ b/llm-content/payments/dynamic-convenience-fees/api.md @@ -0,0 +1,526 @@ +--- +title: Dynamic Convenience Fees API +description: API to charge dynamic convenience fees to customers. +--- + +# Dynamic Convenience Fees API + +You can send the convenience fee split details in the Orders API to override any pre-configured settings. + +> **INFO** +> +> +> **Handy Tips** +> +> You can configure the convenience fee based on: +> - Fixed amount/Percentage +> - From a customer/business perspective +> +> For example, the business can create a configuration wherein, if the total platform fee is ₹10, then the business will pay ₹5, and the customer will pay ₹5. +> +> Alternatively, the business can create a configuration wherein the customer will bear 20% of the total platform fee, and the business will bear the rest. +> +> You can perform this configuration at the method level. +> +> + +## Orders API + +Order is an essential step in the payment process. For every payment, you should create an order. You can create an order using Orders API and pass the convenience fee details. The order_id received in the response should be then passed to checkout. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "convenience_fee_config": { + "message": "To make payment without any additional charges, please use UPI or Net Banking", + "label": "Convenience Fee", + "rules": [ + { + "method": "card", + "card.type": [ + "credit", + "debit" + ], + "fee": { + "payee": "customer", + "percentage_value": "100" + } + }, + { + "method": "card", + "card.type": [ + "prepaid" + ], + "fee": { + "payee": "business", + "percentage_value": "50" + } + }, + { + "method": "netbanking", + "fee": { + "payee": "customer", + "flat_value": 100 + } + }, + { + "method": "upi", + "fee": { + "payee": "business", + "flat_value": 200 + } + }, + { + "method": "card", + "fee": { + "payee": "customer", + "percentage_value": "20.33" + } + } + ] + } +}' +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "convenience_fee_config": { + "message": "To make payment without any additional charges, please use UPI or Net Banking", + "label": "Convenience Fee", + "rules": [ + { + "method": "card", + "card.type": [ + "credit", + "debit" + ], + "fee": { + "payee": "customer", + "percentage_value": "100" + } + }, + { + "method": "card", + "card.type": [ + "prepaid" + ], + "fee": { + "payee": "business", + "percentage_value": "50" + } + }, + { + "method": "netbanking", + "fee": { + "payee": "customer", + "flat_value": 100 + } + }, + { + "method": "upi", + "fee": { + "payee": "business", + "flat_value": 200 + } + }, + { + "method": "card", + "fee": { + "payee": "customer", + "percentage_value": "20.33" + } + } + ] + } + }) +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + JSONObject config = new JSONObject(); + orderRequest.put("amount", 50000); + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "receipt#1"); + orderRequest.put("convenience_fee_config", config); + config.put("message","To make payment without any additional charges, please use UPI or Net Banking"); + config.put("label","GD"); + + ArrayList rules = new ArrayList(); + JSONObject method = new JSONObject(); + JSONObject method_param = new JSONObject(); + + rules.add(method); + rules.add(method_param); + + config.put("rules",rules); + method.put("method","card"); + ArrayList cards = new ArrayList(); + cards.add("credit"); + cards.add("debit"); + method.put("card.type",cards); + + JSONObject fee = new JSONObject(); + fee.put("payee","customer"); + fee.put("percentage_value","100"); + method.put("fee",fee); + + method_param.put("method","card"); + ArrayList cards_param = new ArrayList(); + cards_param.add("credit"); + cards_param.add("debit"); + method.put("card.type",cards_param); + + JSONObject fee_param = new JSONObject(); + fee_param.put("payee","customer"); + fee_param.put("percentage_value","100"); + method.put("fee",fee_param); + +Order order = razorpay.Orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array("amount" => 50000,"currency" => "INR","receipt" => "receipt#1","convenience_fee_config" => array("message" => "To make payment without any additional charges, please use UPI or Net Banking","label" => "Convenience Fee","rules" => array(array("method" => "card","card.type" => array("credit","debit"),"fee" => array("payee" => "customer","percentage_value" => "100")),array("method" => "card","card.type" => array("prepaid"),"fee" => array("payee" => "business","percentage_value" => "50")),array("method" => "netbanking","fee" => array("payee" => "customer","flat_value" => 100)),array("method" => "upi","fee" => array("payee" => "business","flat_value" => 200)),array("method" => "card","fee" => array("payee" => "customer","percentage_value" => "20.33")))))); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', convenience_fee_config: { + message: 'To make payment without any additional charges, please use UPI or Net Banking', + label: 'Convenience Fee', + rules: [ + { + method: 'card', + card.type: [ + 'credit', + 'debit' + ], + fee: { + payee: 'customer', + percentage_value: '100' + } + }, + { + method: 'card', + card.type: [ + 'prepaid' + ], + fee: { + payee: 'business', + percentage_value: '50' + } + }, + { + method: 'netbanking', + fee: { + payee: 'customer', + flat_value: 100 + } + }, + { + method: 'upi', + fee: { + payee: 'business', + flat_value: 200 + } + }, + { + method: 'card', + fee: { + payee: 'customer', + percentage_value: '20.33' + } + } + ] + } +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 50000, + currency: "INR", + receipt: "receipt#1", + convenience_fee_config: { + message: “To make payment without any additional charges, please use UPI or Net Banking”, + label: “Convenience Fee”, + rules: [ + { + method: “card”, + card.type: [ + “credit”, + “debit” + ], + fee: { + payee: “customer”, + percentage_value: “100” + } + }, + { + method: “card”, + card.type: [ + “prepaid” + ], + fee: { + payee: “business”, + percentage_value: “50” + } + }, + { + method: “netbanking”, + fee: { + payee: “customer”, + flat_value: 100 + } + }, + { + method: “upi”, + fee: { + payee: “business”, + flat_value: 200 + } + }, + { + method: “card”, + fee: { + payee: “customer”, + percentage_value: “20.33” + } + } + ] + } + +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "convenience_fee_config": { + "message": "To make payment without any additional charges, please use UPI or Net Banking", + "label": "Convenience Fee", + "rules": [ + { + "method": "card", + "card.type": [ + "credit", + "debit" + ], + "fee": { + "payee": "customer", + "percentage_value": "100" + } + }, + { + "method": "card", + "card.type": [ + "prepaid" + ], + "fee": { + "payee": "business", + "percentage_value": "50" + } + }, + { + "method": "netbanking", + "fee": { + "payee": "customer", + "flat_value": 100 + } + }, + { + "method": "upi", + "fee": { + "payee": "business", + "flat_value": 200 + } + }, + { + "method": "card", + "fee": { + "payee": "customer", + "percentage_value": "20.33" + } + } + ] + } +} +body, err := client.Order.Create(data) +```json: Response +{ + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071, + "convenience_fee_config": { + "rules": [ + { + "method": "card", + "card.type": [ + "credit", + "debit" + ], + "fee": { + "payee": "customer", + "percentage_value": "100" + } + }, + { + "method": "card", + "card.type": [ + "prepaid" + ], + "fee": { + "payee": "business", + "percentage_value": "50" + } + }, + { + "method": "netbanking", + "fee": { + "payee": "customer", + "flat_value": 100 + } + }, + { + "method": "upi", + "fee": { + "payee": "business", + "flat_value": 200 + } + }, + { + "method": "card", + "fee": { + "payee": "customer", + "percentage_value": "20.33" + } + } + ] + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of ₹295, enter `29500`. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. For example, `INR`. Dynamic convenience fee feature is supported only on `INR` transactions. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. It can have a maximum length of 40 characters and has to be unique. + +`notes` _optional_ +: `json object` Key-value pair used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: Customers can make a partial payment. + - `false`: Customers cannot make partial payments. + +`convenience_fee_config` _optional_ +: `json object` This parameter will contain information about the convenience fee split for the given order. + + `message` _optional_ + : `string` Message displayed at the checkout in case convenience fee is applicable. The maximum character limit is `120`. + + `label` _optional_ + : `string` Label shown at the checkout in case convenience fee is applicable. The maximum character limit is `20`. The default value is `Convenience Fee`. + + `rules` _mandatory_ + : `array` Conditions to determine the fee split for different payment methods. + + `method` _mandatory_ + : `string` Payment method for which the given rule will be applicable. Possible values: + - `card` + - `netbanking` + - `upi` + - `wallet` + + `card.type` _optional_ + : `array` Applicable only when the `method=card`. Possible values: + - `debit` + - `credit` + - `prepaid` + + `fee` _mandatory_ + : `json object` Contains information about the convenience fee split and payee details for the given order. + + `payee` _mandatory_ + : `string` The party that will be bearing the convenience fee. Possible values: + - `customer` + - `business` + + `percentage_value` _optional_ + : `string` The percentage of convenience fee that the customer or business will pay. Up to two decimal places are supported. Pass either `percentage_value` or `flat_value` to decide the final fee split. + + `flat_value` _optional_ + : `integer` Convenience fee value, in paisa, that the customer or business will pay. If this value exceeds the total platform fee, then the minimum amount will be considered. Pass either `percentage_value` or `flat_value` to decide the final fee split. + +## Error Responses + +Given below are some of the error responses: + +1. When the dynamic convenience fee feature is not enabled for your Razorpay account. +2. When an invalid value is sent for the `convenience_fee_config.rules.method` or `convenience_fee_config.rules.card.type` field in the request. +3. When the percentage value is not passed in string format. + +```json: Error #1 +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Convenience fee configurable for dynamic fee bearer users only", + "source": "business", + "step": "payment_initiation", + "reason": "invalid_convenience_fee_config", + "metadata": {}, + "field": "convenience_fee_config" + } +} +```json: Error #2 +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "emi is not a valid method", + "source": "business", + "step": "payment_initiation", + "reason": "invalid_convenience_fee_config", + "metadata": {}, + "field": "convenience_fee_config.rules.emi" + } +} +```json: Error #3 +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "percentage_value value should be string", + "source": "business", + "step": "payment_initiation", + "reason": "invalid_convenience_fee_config", + "metadata": {}, + "field": "convenience_fee_config.rules.percentage_value" + } +} +``` diff --git a/llm-content/payments/dynamic-convenience-fees/faqs.md b/llm-content/payments/dynamic-convenience-fees/faqs.md new file mode 100644 index 00000000..23499b87 --- /dev/null +++ b/llm-content/payments/dynamic-convenience-fees/faqs.md @@ -0,0 +1,17 @@ +--- +title: Dynamic Convenience Fees FAQs +description: List of frequently asked questions on dynamic convenience fees. +--- + +# Dynamic Convenience Fees FAQs + +#### 1. What is dynamic convenience fees? +You can use Dynamic Convenience fee to charge a flexible amount to your customers based on the payment method or the transaction amount. You can also choose to charge a percentage of the transaction or a flat fee. For example, a convenience fee of flat ₹20 on each transaction or 2% of the transaction amount. + +#### 2. How can I enable this feature for my account? + +This is an on-demand feature. Please reach out to the [Razorpay support](https://razorpay.com/support/#request) team to get this feature enabled on your account. + +#### 3. Is this feature available for international payments? + +No, the Dynamic Convenience fee cannot be used for international payments. It is available for domestic transactions and supports only INR. diff --git a/llm-content/payments/ecommerce-plugins/ghost-integration.md b/llm-content/payments/ecommerce-plugins/ghost-integration.md new file mode 100644 index 00000000..6c18e5b5 --- /dev/null +++ b/llm-content/payments/ecommerce-plugins/ghost-integration.md @@ -0,0 +1,75 @@ +--- +title: Integrate Razorpay Payment Button with Ghost CMS using Zapier +heading: Integrate Razorpay Payment Button with Ghost CMS +description: Integrate Razorpay Payment Buttons with Ghost CMS for automated member creation using Zapier. +--- + +# Integrate Razorpay Payment Button with Ghost CMS + +Integrate Razorpay Payment Buttons with Ghost CMS for automated member creation using [Zapier](https://zapier.com/). Zapier is a tool that connects your apps without requiring any code. + + +### Advantages + + - **Automated Member Management**: Automatically creates and updates members in Ghost upon successful payments, avoiding duplication of customer records. + - **Multiple Payment Methods**: Supports UPI, cards, netbanking and other payment modes available on Razorpay. + - **Location-based Pricing**: Displays pricing tailored for Indian and international customers. + - **Instant Customer Engagement**: Sends automated welcome emails to new members immediately after purchase. + + + +### How It Works + + 1. Customer visits the site, enters name, email, phone and completes the payment using Razorpay Payment Button. + 2. Razorpay detects a `payment.captured` [webhook event](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md). + 3. Razorpay makes an `HTTP POST` request to the Zapier `Catch Hook` URL. The request body contains payment and customer details. + 4. Zapier receives the webhook data (containing the customer payment and contact details) which triggers the workflow. + 5. Zapier performs a `GET` request to the Ghost Admin API by passing the customer email id and checks if the customer already exists. + 6. If the email id already exists, Zapier performs a `PUT` request to the Ghost Admin API to update the customer details. + 7. If the email id does not exist already, Zapier performs a `POST` request to the Ghost Admin API to create a new customer record. Here, the inputs for the Ghost API are name, email, phone and labels (for example, `lifetime access`). + 8. Zapier uses the email extracted from the webhook to send a welcome mail to the newly created/updated customer with the chosen email service (Gmail/Outlook) via its Email Service API. + + + + +### Prerequisites + +1. Sign up for a [Razorpay account](https://dashboard.razorpay.com/signup) (with Payment Links or Subscriptions set up). +2. Sign up for a [Zapier](https://zapier.com/sign-up) account (Pro plan recommended for webhook features). +3. Ensure you have a Ghost CMS account (self-hosted or Ghost Pro). + +### Integration Steps + +1. Set up your [Razorpay Webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md). + - You will need the [Zapier **Catch Hook** URL ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/ghost-integration/zapier-integration.md)to complete the webhook set up. + - Ensure to select at least `payment.captured` (for one-time payments) and `subscription.charged` (if you are using Razorpay Subscriptions) under **Active Events**. + +2. Create a [Razorpay Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/ghost-integration/add-payment-button.md). +You will get a Payment Button code as below. Save this code to add the Payment Button to your webpage(s). + + + ```json: Payment Button Code + + ``` + +3. Get your Ghost Admin API credentials: + 1. Go to your Ghost Admin Dashboard. + 2. Navigate to **Settings → Integrations → + Custom integration**. + 3. Give it a name (for example, Zapier Razorpay Integration). + 4. Ghost will generate an Admin API Key and an Admin API URL. Ensure to save these securely as these are required for Zapier integration. + +4. Create a [Zapier Zap](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/ghost-integration/zapier-integration.md). + +### Best Practices + +- **Secure Storage of Credentials**: Store all your API keys (your Razorpay API Key, Ghost Admin API Key) and webhook secrets securely as environment variables. **Never hardcode any of these.** +- **Mandatory HTTPS Communication**: Use HTTPS for all data transmissions (Razorpay to Zapier or your backend, backend to Ghost, frontend to backend) to ensure data encryption in transit. +- **IP/Port Allowlisting (Whitelisting)**: For environments requiring high security, it is best to implement IP address allowlisting (also known as whitelisting). Configure your firewall or webhook endpoint to only accept incoming webhook requests from approved Razorpay IP ranges. This limits exposure by preventing malicious parties from sending forged data to your Zapier or backend webhook URL. +- **Ensure Certificate Verification**: Always configure your application to enable [SSL/TLS certificate verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md) for all outgoing API calls. This prevents Man-in-the-Middle (MITM) attacks by ensuring you are communicating with the legitimate server. + +### Related Information + +- [Zapier Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/ghost-integration/zapier-integration.md) +- [Integrate a Payment Button with Ghost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/ghost-integration/add-payment-button.md) +- [Razorpay Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [Razorpay Webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) diff --git a/llm-content/payments/ecommerce-plugins/ghost-integration/add-payment-button.md b/llm-content/payments/ecommerce-plugins/ghost-integration/add-payment-button.md new file mode 100644 index 00000000..05813648 --- /dev/null +++ b/llm-content/payments/ecommerce-plugins/ghost-integration/add-payment-button.md @@ -0,0 +1,80 @@ +--- +title: Add Payment Button to Ghost CMS +description: Add Razorpay Payment Button to your Ghost CMS theme for seamless payment collection. +--- + +# Add Payment Button to Ghost CMS + +Given below are the steps to add Razorpay Payment Button in your website and integrate it with Ghost CMS. + +> **INFO** +> +> +> **Handy Tips** +> +> Ghost CMS themes use a templating language called Handlebars (`.hbs files`). Content is dynamically inserted. +> + + +### 1. Accessing Your Ghost Theme Files + + 1. Log in to your Ghost Admin Panel. + 2. On the left navigation, go to **Settings** → **Design**. + 3. Click on the three dots `...` next to your active theme and select **Download** to download a `.zip` file of your theme. + + + +### 2. Unzipping and Editing Your Theme File + + Locate the downloaded `.zip` file in your system, right-click on it and choose **Extract All** (Windows) or double-click (Mac) to unzip its contents into a new folder. + + + +### 3. Identify Where to Place the Button + + - If you want the button on every page (for example, in the footer or header), you may need to edit the `default.hbs` file in the **Theme** files folder. This file acts as the main template for your Ghost site. + - If you want the button on a specific type of page (for example, only on posts), you have to edit the `post.hbs` file. + - If you want it within a specific section that is reused (like a call-to-action that appears on multiple pages), you have to look for files in the partials folder (for example, `partials/footer.hbs`). + - Say, you want to place it on every page to appear prominently. Open the `.hbs` file with a Text Editor. + - Windows: Right-click on `default.hbs` (or your chosen file), select **Open with** and choose **Notepad** or a more advanced text editor like **Notepad++** or **VS Code** (highly recommended for coding). + - Mac: Right-click (or Control-click) on `default.hbs`, select **Open with** and choose **TextEdit** or **VS Code**. + + + +### 4. Inserting the Payment Button Code + + - Scroll through the `default.hbs`file. If you want it in the footer, look for a `footer` tag. If you want it in the main content area, find a suitable place of your choice within the content. A recommended good spot is just before the `body` tag (if you want it to load at the end). + - Once you have found your spot, paste the following code: + ```html: Insert Payment Button + + + + ``` + - Ensure to replace `pl_XXxXX6XxXXXXxx` with your actual Razorpay Payment Button id which you get when you create a Payment Button in your Razorpay Dashboard. + + + +### 5. Re-uploading Your Theme + + 1. Go back to the folder containing your edited theme files and select all the files and subfolders inside your theme folder (not the outer folder itself). + 2. Right-click and choose **Send to** → **Compressed (zipped) folder** (Windows) or **Compress X items** (Mac). This will create a new `.zip` file. + 3. Make sure the `.zip` file contains the root of your theme files (like `default.hbs`, `package.json`, `index.hbs`, assets folder, and so on) directly inside it. + + + +### 6. Go Back to Ghost Admin + + 1. In your browser, navigate to **Settings** → **Design** in your Ghost admin panel. + 2. Scroll down to the **Themes** section and click **Upload a theme**. + 3. Browse your system and select the `.zip` file you just created. Click **Open**. Ghost will upload and install your modified theme. Once uploaded, you will see a message. + 4. Click **Activate now** to apply your changes. + + +You have now successfully added a Payment Button to your website. To verify, check the page(s) where you expect the button to appear. You should now see your Razorpay Payment Button. + +### Related Information + +- [Ghost Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/ghost-integration.md) +- [Zapier Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/ghost-integration/zapier-integration.md) +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [Razorpay Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) diff --git a/llm-content/payments/ecommerce-plugins/ghost-integration/zapier-integration.md b/llm-content/payments/ecommerce-plugins/ghost-integration/zapier-integration.md new file mode 100644 index 00000000..0be0d78e --- /dev/null +++ b/llm-content/payments/ecommerce-plugins/ghost-integration/zapier-integration.md @@ -0,0 +1,206 @@ +--- +title: Zapier Integration for Ghost CMS +description: Connect your Razorpay Payment Button with Ghost CMS using Zapier to automate member management. +--- + +# Zapier Integration for Ghost CMS + +Zapier Integration consists of 2 sets of steps - **Trigger** and **Action**. +- A successful payment through the Razorpay Payment Button initiates the `payment.captured` webhook, which acts as the **Trigger** for Zapier. +- **Action** is the member creation done by Zapier in Ghost, following the **Trigger**. + +Follow these steps to integrate Zapier with your Payment Button and Ghost: + +### Trigger + +To create the trigger: + +1. Log in to your [Zapier account](https://zapier.com) and click **+ Create** button on the top-left of the Zapier Dashboard page. + +> **INFO** +> +> +> **Handy Tips** +> +> A Zap is an automated workflow that connects your apps and services together. Every Zap consists of a trigger step and one or more action steps. When you turn your Zap on, it will run the action steps every time the trigger event occurs. +> + +2. Select **Zaps** from the dropdown menu to create a new automated workflow. + ![Create and Zap](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-zap.jpg.md) + +3. Name your Zap as per your preference by clicking on **Untitled Zap** at the top of the editor and selecting **Rename**. + ![Rename zap](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rename-zap.jpg.md) + +4. Click **Trigger** step box to configure the trigger event. + +5. In the app selection panel, search for and select **Webhooks by Zapier** under **Popular built-in tools**. + +> **INFO** +> +> +> **Note** +> +> Webhooks by Zapier is a Premium feature. Ensure your Zapier plan supports Premium apps. +> + + ![select webhooks by zapier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/zap-webhook-premium.jpg.md) + +6. Choose **Catch Hook** as the Trigger Event from the available options and click **Continue** to proceed with the setup. + ![select catch hook on trigger](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/trigger-catchhook.jpg.md) + +7. (Optional) Configure the **Pick off a Child Key** field if you want Zapier to extract only a specific key from the webhook payload. Leave this blank to receive the entire payload. + +> **INFO** +> +> +> **Handy Tips** +> +> By default, Zapier gives you the entire payload of the webhook. If you specify a child key, Zapier will only grab that key from the object(s) sent to Zapier. For example, given `{"contact": {"name": "Gaurav"}}`, add "contact" here to only return `{"name": "Gaurav"}`. +> + +8. Click **Continue** to proceed to the Test step. + +9. Zapier generates a **Custom Webhook URL**. Copy and save this URL for later use. You will need this URL while creating the [Razorpay Webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md). + +> **INFO** +> +> +> **Important** +> +> Configure your Razorpay Dashboard to send the `payment.captured` webhook to this Zapier URL. Refer to [Razorpay Webhook Setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) for detailed instructions. +> + +10. Click **Test trigger** to verify the webhook connection. Once a test payment is captured, Zapier will display the received data. + ![Test Trigger](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-trigger.jpg.md) + +### Action + +To set up the action: + +1. In your Zapier Zap, click on the **Action** step box or the **+** button to add an Action Step. + +2. Search for and select **Webhooks by Zapier** again from the app selection panel. + +3. Choose **Custom Request** as the **Action Event** and click **Continue**. + ![Action select custom request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/custom-request-action.jpg.md) + +4. Configure the Custom Request to **Find Member**: + + Follow the steps in Zapier to fetch the customer email from Ghost. Here, you pass the customer email from Razorpay Webhook to check if it exists in your Ghost database. + ![configure custom request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/configure-custom-request.jpg.md) + + - **Method**: Select `GET` from the dropdown options (GET, PUT, POST, PATCH and DELETE). + - **URL**: Your Ghost Admin API URL. Replace `email` with the email field from your Razorpay webhook data (for example, `payload__payment__entity__email`). + URL example: `https://your-ghost-site.com/ghost/api/admin/members/?search=test@example.com` + - **Data Pass-Through?**: Select `True`. + - **Headers**: + - Authorisation: Ghost-Admin. Replace `your_admin_api_key` with the Ghost Admin API credentials you got while [setting up Ghost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/ghost-integration.md#integration-steps) (refer #3 under Integrations). + - Content-Type: application/json + - Accept-Version: v6.0 (or v5.0 depending on your Ghost version) + - **Data**: Enter the JSON structure as shown below: + + ```JSON + "members": + [ + { + "email": "{{email_from_razorpay}}", + "name": "{{optional_name_from_razorpay}}", + "status": "paid", + "labels": [ + { "name": "Razorpay Paid" } + ] + } + ] + ``` + + +5. Click **Continue** and then **Test step** to verify the configuration. + +6. Copy the member id from the response, if the array is not empty. Follow the steps in the **Update Existing Member** tab to check for existing members and update the details in Ghost. + +7. **Add Path/Filter** + + Check if the customer (member) already exists using email as a filter. For this, we recommend using **Paths by Zapier**, which enables you to apply conditional logic by defining **Path A** (update member, if already exists) and **Path B** (create new member, if non-existent). + + You will use the output from the **Find Member** steps for this. + + + + Define **Path A** to update an existing member. + - Conditions: + - Select the members array output from the steps in **Find Member** tab. + - `Does not exactly match []` (empty array). This means if the members array is not empty, the member exists. + - Action - Update Existing Member + - Choose App & Event: **Webhooks by Zapier** → **Custom Request**. + - Method: `PUT` + - URL: Your Ghost Admin API URL. Get the id from the **Find Member** step's output (for example, `members__0__id`). URL example: `https://your-ghost-site.com/ghost/api/admin/members/60f7e6f0a0b0c0d0e0f0g0h0` + - Headers: + - Authorisation: Ghost-Admin. Replace `your_admin_api_key` with the Ghost Admin API credentials you got while [setting up Ghost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/ghost-integration.md#integration-steps) (refer #3 under [Integrations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/ghost-integration.md#integration-steps)). + - Data Pass-Through: Yes + - Data: As given below: + + + ```JSON + "members": + [ + { + "id": "{{id_from_find_member_step}}", + "email": "{{email_from_razorpay}}", + "status": "paid", + "labels": [ + { "name": "Razorpay Paid" } + ] + } + ] + ``` + + + - Ensure to map `id` and `email` correctly from your Razorpay data. + - You can add specific labels to categorise members (for example, `Razorpay Paid`). + - Click **Continue** and **Test Action**. + + + + Define **Path B** to create a new member. + - Conditions: + - Select the members array output from the steps in **Find Member** tab. + - `Exactly matches []` (empty array). This means if the members array is empty, the member does not exist. + - Action - Create New Member + - Choose App & Event: **Webhooks by Zapier** → **Custom Request**. + - Method: `POST` + - URL: Your Ghost Admin API URL + /members/ + - Headers: + - Authorisation: Ghost-Admin. Replace `your_admin_api_key` with the Ghost Admin API credentials you got while [setting up Ghost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/ghost-integration.md#integration-steps) (refer #3 under [Integrations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/ghost-integration.md#integration-steps)). + - Data Pass-Through: Yes + - Data: As given below: + + ```JSON + "members": + [ + { + "email": "{{email_from_razorpay}}", + "name": "{{optional_name_from_razorpay}}", + "status": "paid", + "labels": [ + { "name": "Razorpay Paid" } + ] + } + ] + ``` + + + - Map `email` from your Razorpay data. + - You can map `name` if Razorpay provides it. + - You can add specific labels to categorise members (for example, `Razorpay Paid`). + - Click **Continue** and **Test Action**. + + + +8. Once all steps are configured and tested, click **Publish** in the top-right corner to activate your Zap. + +### Related Information + +- [Ghost Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/ghost-integration.md) +- [Integrate a Payment Button with Ghost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/ghost-integration/add-payment-button.md) +- [Razorpay Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [Razorpay Webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) diff --git a/llm-content/payments/ecommerce-plugins/razorpay-direct-credit-card.md b/llm-content/payments/ecommerce-plugins/razorpay-direct-credit-card.md new file mode 100644 index 00000000..c5996d0a --- /dev/null +++ b/llm-content/payments/ecommerce-plugins/razorpay-direct-credit-card.md @@ -0,0 +1,156 @@ +--- +title: Integrate With Razorpay Direct - Credit Card Plugin +heading: Integration Steps +description: Integrate your Shopify store with Razorpay Direct - Credit Card plugin and start accepting credit card payments directly on the checkout page. +--- + +# Integration Steps + +Follow the steps given below to integrate credit card payment with your Shopify store directly on the checkout page using Razorpay Direct - Credit Card plugin. + + - **1. Build Integration**: Install and configure the Razorpay Direct - Credit Card plugin. + + - **2. Test Integration**: Test the integration by making a test payment. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +## 1. Build Integration + + +### Install the plugin + + + 1. **Install** [Razorpay Direct - Credit Card](https://apps.shopify.com/razorpay-cc-prod) from the Shopify app store. + ![Activate Razorpay Direct - Credit Card plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-store-cc-plugin-install.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> If you have multiple stores, select the store for which you want to install the Razorpay Direct - Credit Card. +> + + 2. You will be redirected to the Shopify home screen. Click **Install app**. + ![Shopify install app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cc-installapp.jpg.md) + + 3. You will be redirected to a landing page. Click **I am an existing user** and log in to your Razorpay account. + ![Shopify auth for existing Razorpay user](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cc-auth.gif.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> - Ensure you log in with **owner** credentials to connect Razorpay with Shopify successfully. +> - If you are a new Razorpay user, click **I am new to Razorpay** and [set up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md) an account. +> + + 4. Click **Activate Razorpay Direct - Credit Card** on the activation screen on your Shopify Dashboard. + ![Activate Razorpay Direct - Credit Card plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-activate-cc-plugin.jpg.md) + + Razorpay Direct - Credit Card Plugin now appears as a payment method on your Shopify Store. + ![Enabled credit card plugin on shopify store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cc-plugin-store.jpg.md) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Webhooks is auto-configured. You need to verify if webhooks are enabled on your [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/razorpay-direct-credit-card/troubleshooting-faqs.md#7-how-can-i-verify-if-webhooks-are). +> - The `order.paid`, `payment.authorized`, `refund.processed` and `refund.failed` events are auto-configured. You do not have to configure it on the Dashboard. +> + + + +## 2. Test Integration + +After the integration is complete, you need to ensure that the integration is working as expected. You can start accepting actual payments from your customers once the test mode transaction is successful. + + +### Test Transaction in Test Mode + + Follow the steps given below to test a transaction in test mode: + + 1. Log in to your [Shopify store](https://accounts.shopify.com/lookup?rid=f19e1541-cd24-4856-a398-156d2ed5d56f). + 2. Navigate to **Settings** → **Payments**. + 3. Click **Manage** on the **Razorpay Direct - Credit Card** app. + ![edit settings on the plugin to enable test mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cc-test-navigation.jpg.md) + 4. At the bottom of the page, select the **Enable test mode** check box and click **Save**. + ![Enable test mode to test the flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cc-enable-test-mode.jpg.md) + 5. On your Shopify store, add an item to your cart and click **Buy it now**. + 6. Fill in your **contact** and **shipping** details and click **Continue to shipping**. + 7. Select the **Shipping method** and click **Continue to payment**. + 8. Select **Credit card** and enter the card details. + 9. Click **Pay now** and complete the order. + ![Test Razorpay Direct - Credit Card plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cc-test.gif.md) + + + + +### Verify Payment Status + + You can track the payment status from the Razorpay Dashboard or poll our APIs. + + + + + + + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +## 3. Go-live Checklist + +Follow these steps before taking the integration live: + + +### Switch from Test Mode to Live Mode + + You can perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the installation and integration is working as expected, switch to the Live Mode and start accepting payments from customers. + + To switch from Test Mode to Live Mode: + 1. Log in to your [Shopify store](https://accounts.shopify.com/lookup?rid=f19e1541-cd24-4856-a398-156d2ed5d56f). + 2. Navigate to **Settings** → **Payments**. + 3. On the **Supported payment methods** section, click **Manage** on the **Razorpay Direct - Credit Card** app. + 4. At the bottom of the page, clear the **Enable test mode** check box and click **Save**. + ![Disable test mode to start accepting payments from customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cc-live.jpg.md) + + You can now start accepting actual payments on your Shopify store. + + +## Refunds + +#### Initiate Refunds + +To initiate refunds using Shopify store: + +1. Log in to the [Shopify account](https://www.shopify.in). +2. After a payment is completed, navigate to **Orders**. +3. Select the order you want to initiate a refund. + ![Select the order to initiate refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cc-orders.jpg.md) +4. Click **Refund**. + ![Initiate refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cc-refund.jpg.md) +5. Select the quantity of the item and click **Refund**. +6. You can either issue a full refund or a partial refund. + - For a **full refund**, enter the entire payment amount. + - For a **partial refund**, enter a value lesser than the payment amount. + ![Refund the order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cc-refund-order.jpg.md) +7. You can verify the refund status from the Dashboard. Navigate to **Transactions** → **Refunds** and check if a **Refund Id** is generated for the relevant Payment Id. + ![Verify refund status on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cc-refund-verify.jpg.md) + + +## Support +If you have queries, raise a ticket on the [Razorpay Support Portal](https://razorpay.com/support/). + +### Related Information + +- [Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/razorpay-direct-credit-card/troubleshooting-faqs.md) +- [Ecommerce Plugins](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins.md) diff --git a/llm-content/payments/ecommerce-plugins/razorpay-direct-credit-card/troubleshooting-faqs.md b/llm-content/payments/ecommerce-plugins/razorpay-direct-credit-card/troubleshooting-faqs.md new file mode 100644 index 00000000..997df877 --- /dev/null +++ b/llm-content/payments/ecommerce-plugins/razorpay-direct-credit-card/troubleshooting-faqs.md @@ -0,0 +1,60 @@ +--- +title: Shopify | Razorpay Direct - Credit Card Plugin | Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common errors for Razorpay Direct - Credit Card Plugin Shopify integration. Find answers to frequently asked questions. +--- + +# Troubleshooting & FAQs + +### 1. Is this new plugin only for businesses who have moved to Shopify’s 1-page checkout? + + No, Razorpay Direct - Credit Card plugin is independent of Shopify's 1-page checkout, therefore, anyone can use this plugin. + + + +### 2. How can I install Razorpay Direct - Credit Card Plugin? + + Follow the [installation steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/razorpay-direct-credit-card.md#integration-steps) to install the plugin. + + + +### 3. Can I use the same MID for Razorpay Direct - Credit Card Plugin and the Razorpay Payment Gateway app? + + Yes, you can use the same MID for in-platform/onsite and other Payment Gateway apps (Razorpay Payment Gateway or other Payment Gateways). + + + +### 4. Can I use two in-platform/onsite apps for card transactions? + + No, a business can only use one in-platform/onsite app. All their card transactions will go through that in-platform/onsite app only. + + + +### 5. What will the UI look like when an in-platform/onsite app and multiple offsite Payment Gateway apps are installed? + + The in-platform/onsite cards app always takes precedence and is listed first. All other Payment Gateway apps are listed below, similar to Shopify’s checkout UI. + + + +### 6. What if I am not a Razorpay Payment Gateway user? How can I start using the Razorpay Direct - Credit Card Plugin? + + You can create a Razorpay account and use the [Razorpay Direct - Credit Card Plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/razorpay-direct-credit-card.md) for credit card payments even if you are not currently a [Razorpay Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md) user. + + + +### 7. How can I verify if webhooks are auto-configured? + + + To verify if webhooks are enabled: + 1. Log in to the Dashboard and navigate to **Account & Settings**. + 2. In the **Website and app settings** section, click **Webhooks**. + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 3. Select the relevant webhook **URL**. + 4. On the right panel, check if the status for `order.paid`, `payment.authorized`, `refund.processed` and `refund.failed` is enabled. + + + +### 8. How can I accept payments? + + + To accept **live** payments, follow the steps mentioned in the [Switch from Test Mode to Live Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/razorpay-direct-credit-card.md#22-switch-from-test-mode-to-live-mode) section. diff --git a/llm-content/payments/ecommerce-plugins/shopify-appmaker.md b/llm-content/payments/ecommerce-plugins/shopify-appmaker.md new file mode 100644 index 00000000..543ce02c --- /dev/null +++ b/llm-content/payments/ecommerce-plugins/shopify-appmaker.md @@ -0,0 +1,56 @@ +--- +title: Integrate Razorpay Shopify - Appmaker +heading: Integration Steps +description: Steps to integrate the Razorpay Payment Gateway with Shopify - Appmaker on your Shopify store. +--- + +# Integration Steps + +Appmaker allows you to create a custom mobile app for your Shopify store, providing a seamless shopping experience for your customers. Integrate with the Razorpay Shopify - Appmaker extension to offer a smooth payment experience to your customers on the app. + +Follow the steps given below to integrate the Razorpay Payment Gateway with Shopify - Appmaker on your Shopify store. + + - **Standard Checkout**: Integrate Razorpay Appmaker Extension With Shopify for Standard Checkout. + + - **Magic Checkout**: Integrate Razorpay Appmaker Extension With Shopify for Magic Checkout. + +## Integration Steps + +Follow the steps given below: + + +### 1. Integrate Razorpay Appmaker Extension With Shopify for Standard Checkout + + Follow these steps to proceed with the integration: + + 1. After adding AppMaker to your Shopify store, navigate to the AppMaker window. Click **Extensions**. + ![Appmaker window extension](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/appmaker-extension.jpg.md) + 2. On the Installed Extensions page, click **Explore Extensions**. + ![Explore extension](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/explore-extension.jpg.md) + 3. Search for Razorpay in the search bar on the All Extensions page. Select **Razorpay-Shopify-Appmaker** and click **Next**. + ![All extensions razorpay shopify appmaker](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/razorpay-shopify-appmaker.jpg.md) + 4. Click **Install & Activate**. + ![Install and activate razorpay shopify appmaker](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/install-activate-rsa.jpg.md) + + Appmaker extension is successfully installed and activated. + + + +### 2. Integrate Razorpay Appmaker Extension With Shopify for Magic Checkout + + Follow this step to proceed with the integration: + + You must do the [standard checkout integration](#1-integrate-razorpay-appmaker-extension-with-shopify-for) before proceeding with the Magic checkout integration. After you install the Razorpay Shopify Appmaker extension, navigate to **Settings** and enter the **Config Key**. Click **Save Changes**. + ![Razorpay shopify appmaker config key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rsa-config-key.jpg.md) + + Once you save the changes, the Appmaker extension will be available with Magic Checkout on the Native SDKs. + + +## Support + +If you have queries, raise a ticket on the [Razorpay Support Portal](https://razorpay.com/support/). + +### Related Information + +- [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md) +- [Razorpay Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify.md) diff --git a/llm-content/payments/faqs.md b/llm-content/payments/faqs.md new file mode 100644 index 00000000..c4b0f482 --- /dev/null +++ b/llm-content/payments/faqs.md @@ -0,0 +1,399 @@ +--- +title: Payments | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to some Frequently Asked Questions (FAQs) about Razorpay. +--- + +# Frequently Asked Questions (FAQs) + +## Master KYC & Account Verification + + +### 1. What is Central KYC Registry (CKYC) and how does it help me? + + **Central KYC Registry (CKYC)** is a centralised government database maintained by CERSAI (Central Registry of Securitisation Asset Reconstruction and Security Interest of India) containing verified KYC records from all financial institutions in India. + + **Benefits for businesses:** + - **Instant Verification:** If you have CKYC records (from bank, mutual fund, insurance), verification happens in seconds. + - **No Document Uploads:** Many required documents are auto-fetched from CKYC. + - **Skip Video KYC:** Businesses can bypass Video KYC completely. + - **Faster Activation:** Complete onboarding in minutes instead of days. + + + + +### 2. How do I give consent to download my CKYC records? + + The consent process differs for individuals and businesses: + + **For Individuals/Unregistered Businesses:** + + 1. Enter your Personal PAN. + 2. Razorpay checks if CKYC record exists. + 3. Enter mobile number linked to your CKYC record. + 4. Enter OTP sent by CKYC system. + 5. Your CKYC record is downloaded with documents. + + **For Registered Businesses:** + + 1. Enter Business PAN and upload PAN document. + 2. Date of Incorporation is extracted from PAN document. + 3. Razorpay checks CKYC using PAN and Date of Incorporation. + 4. Your business CKYC record is downloaded. + + +> **WARN** +> +> +> **Watch Out!** +> +> The mobile number must be the same one registered with your CKYC record (typically the same as the mobile number linked to Aadhaar). +> + + + + +### 3. What is Video KYC and when is it required? + + **Video KYC** is a live video call with a Razorpay agent to verify your identity when CKYC data is not available. + **Video KYC is NOT Required when:** + - CKYC data is successfully fetched for your entity. + - You can proceed directly with document submission. + + **Video KYC is Required when:** + - CKYC search returns no record for your business. + - CKYC OTP verification fails. + - You do not have existing CKYC records. + + Only the **Authorised Signatory** needs to complete Video KYC. Ultimate Beneficial Owners (UBOs) do NOT need Video KYC. + + + +### 4. Why must I show the original PAN card during Video KYC? + + RBI regulations require verification of original documents during Video KYC. + + The Authorised Signatory must physically hold and display the original PAN card on camera. This ensures: + + - Document authenticity. + - Prevention of fraudulent submissions. + - Compliance with regulatory requirements. + + **NOT Accepted:** + - Printed copies of PAN. + - Screenshots of PAN. + - E-PAN displayed on mobile screen. + + **Accepted:** + - Original physical PAN card only. + + + +### 5. Is UBO verification mandatory for my business type? + + **UBO verification is mandatory if your business type is:** + + - Private Limited Company (>10% shareholding) + - Public Limited Company (>10% shareholding) + - Section 8 Company (>10% shareholding) + - Partnership Firm (>10% holding) + - Limited Liability Partnership (>10% contribution) + - Trust (≥10% interest - includes exactly 10%) + - Society (>15% interest - higher threshold) + + **UBO Declaration is not required if your business type is:** + + - Individual/Unregistered Business (owner is the merchant) + - Sole Proprietorship (owner is the merchant) + - Hindu Undivided Family (HUF) + - Government Entity + - Judicial Person + - Local Authority + + **For Each UBO:** Provide PAN number (verified), Aadhaar document (front & back) and ownership percentage (self-declared). + + + +### 6. What if I do not have a CKYC record? + + If CKYC you do not have a CKYC record, follow the standard verification flow: + + **Your Onboarding Path:** + + 1. **Upload Required Documents:** Based on your business type. + 2. **Complete Video KYC:** Live video call with original PAN display. + 3. **Digilocker Verification:** Within 3 days of video call. + 4. **Review:** Our team reviews your submission (3-4 business days). + + **After Successful Onboarding:** + + Razorpay uploads your KYC data to CKYC for future use. This helps: + - Speed up any future KYC processes. + - Enable instant verification with other financial institutions. + - Reduce document resubmission across services. + + + + +### 7. Which business types can never be auto-activated? + + The following entity types always require manual review and can never be auto-activated via CKYC. They are identified by the **4th character** in their business PAN: + + - **Hindu Undivided Family (HUF)** - PAN 4th letter: **H** + - **Government Entity** - PAN 4th letter: **G** + - **Judicial Person** - PAN 4th letter: **J** + - **Local Authority** - PAN 4th letter: **L** + + These entities have **unique regulatory, legal and ownership structures** that require detailed manual verification regardless of CKYC availability. + + **All other business types** can be auto-activated if: + - CKYC data is successfully fetched. + - All required documents are present. + - Business category supports auto-activation. + + + +### 8. What documents are NEW requirements under Master KYC? + + New mandatory documents (Effective January 1, 2026): + + **For Private/Public Limited Companies:** + - **Memorandum of Association (MOA)** - NEW. + - **Articles of Association (AOA)** - NEW. + - **Board Resolution or Power of Attorney** - NEW (for Authorised Signatory). + - **UBO Declaration** - NEW (for shareholders >10%). + + **For Sole Proprietorship:** + - **2 Business Documents** - NEW requirement (from approved list). + - Previously only 1 document (GSTIN) was required. + + **For All Registered Businesses:** + - **Ultimate Beneficial Owner (UBO) Declaration** - NEW. + - **Power of Attorney** - NEW (if Authorised Signatory is not owner/director/partner). + + **Removed Requirements:** + - Website policies (Terms, Refund, Privacy) - No longer required at onboarding. + + + +### 9. Can I track my CKYC verification status? + + Yes, you can track CKYC verification status on your Dashboard. + + **Status Indicators:** + - **Checking CKYC:** System searching for your CKYC record. + - **Awaiting Consent:** Waiting for mobile OTP verification. + - **CKYC Fetched:** Records successfully downloaded. + - **CKYC Not Found:** No record exists, proceed with manual verification. + - **Consent Failed:** OTP verification failed, retry or use manual method. + + **If CKYC Fetch Fails:** + 1. System automatically switches to traditional verification. + 2. You will be prompted to upload documents. + 3. Video KYC requirement will be displayed. + 4. Proceed with Digilocker + Video KYC flow. + + Check your Dashboard notifications and email for real-time updates on your KYC status. + + + +### 10. What happens if my Video KYC verification fails? + + Common reasons for Video KYC failure: + + - Poor video quality (lighting, connection). + - Face mismatch between PAN, Aadhaar and live video. + - Original PAN card not shown (showing e-PAN or printout). + - Digilocker verification not completed within 3 days. + - Wrong person attended the call (not the Authorised Signatory). + + **What Happens Next:** + 1. You will receive notification of failure reason. + 2. Can retry Video KYC (no limit on retries). + 3. Ensure all requirements are met before retry. + + **How to Avoid Failure:** + - Use original physical PAN card. + - Ensure good lighting and stable internet. + - Authorised Signatory must attend (not someone else). + - Complete Digilocker verification first. + - Enable camera, microphone, GPS permissions. + - Schedule call during the **8 AM - 7 PM (Monday to Sunday)** window. + + Contact our [support team](https://razorpay.com/support/) if you face repeated failures. + + + +### 11. Do I need to complete separate CKYC for my business and myself? + + Yes, for registered businesses, entity CKYC and individual CKYC are separate. + + **Two Types of CKYC Records:** + + **1. Entity CKYC (Business)** + - For the registered business entity + - **Contains**: Business PAN, Certificate of Incorporation, MOA/AOA and so on. + - **Used for**: Business identity verification + + **2. Individual CKYC (Authorised Signatory)** + - For the person authorised to sign on behalf of business + - **Contains**: Personal PAN, Aadhaar, address proof + - **Used for**: Authorised Signatory verification + + **Example - Private Limited Company:** + - **Entity CKYC:** Company's CKYC record (Business PAN and Date of Incorporation) + - **Individual CKYC:** Director's CKYC record (Director's personal PAN) + + **For Individuals/Proprietorships:** + - Only one CKYC record (individual's record) + - Proprietorship may have separate entity CKYC in some cases + + Both records are checked during onboarding. If either is missing, that portion requires manual verification/Video KYC. + + +## Account Activation + + +### 1. Do you support freelancers or individuals? + + Yes, we do support freelancers/individual business entities. You can [sign up here](https://dashboard.razorpay.com/#/access/signup/) and submit your activation form. + + + +### 2. I submitted the activation form a while ago. How can I get my account activated? + + If you have already submitted the activation form but have not received any communication, please check your email inbox, including the spam or junk folders. Look for an email from Razorpay that would have been sent shortly after submitting the activation form. In case you don't find the email, please raise a request to [Razorpay Support](https://razorpay.com/support/) and our team will get back to you. + + + +### 3. I have signed up with Razorpay. How do I complete my activation form? + + Follow the steps given below to complete the activation process: + 1. Log in to your Dashboard. + 2. Complete Account Activation and KYC Verification steps. + 3. Submit the activation form. + + + +### 4. I have submitted my activation form, but my account is not activated. Can I start integrating? + + Yes, you can start integrating without your account getting activated. But you must have an active account for the [settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md). Check the [various integration options available](https://razorpay.com/integrations/) to you. If you face any issues during the integration, [raise a Razorpay Support request.](https://razorpay.com/support/#request) + + + +### 5. I have submitted my activation form. When will my account get activated? + + Activation of an account is subject to approval from our banking partners (Working days do not include Saturdays, Sundays and bank holidays). + + We will update your account status after receiving the bank's response. + + + +### 6. My account has not been activated; it has been too long since I got any update. What do I do? + + We try our best to have everyone's account activated on time. However, since you have not received an update on this, please raise a request with [Razorpay Support](https://razorpay.com/support/). Our team will update you at the earliest on the status of your account. + + + +### 7. What are the documents needed to sign-up? + + To ensure a smooth sign-up process, it is important to provide the necessary documents as per Razorpay's requirements. Check the [list of documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/business-types-kyc-documents.md#kyc-documents) required for signing up at Razorpay. + + + +### 8 . What payment methods are supported by Razorpay? + + Razorpay supports [various payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md#supported-payment-methods) to cater to diverse customer preferences. + + + +### 9. Why is my settlement on hold and my account under review after activation? + + Our compliance team and partner banks perform routine audits of your KYC documents. We might temporarily pause your settlements during this time. Look out for clarifications asked by our team on your registered email. Upon receiving your response, we will process the application within 2 days and re-enable settlements for you. + + +> **INFO** +> +> +> **Handy Tips** +> +> You can still accept payments from your customers. +> + + + + +### 10. Can I change my business type once my account is created? + + No, you cannot change your business type once the account is created. However, you can update the business type if you still need to submit your KYC details. + + + +### 11. I am unable to use my mobile number. It shows that the mobile number already exists. How can I create an account using the same number? + + You can refer to [Create Multiple Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#create-multiple-accounts). + + + +### 12. Can a UK company register with Razorpay? + + No, only Indian companies can register. You can refer to [Razorpay Curlec](https://curlec.com/) for Malasyia and [Razorpay](https://razorpay.com/sg/) for Singapore. + + + +### 13. I don’t have GST and a current account. It is a very small, new business. How can I proceed without the above details? + + Submitting GST and current account details is not mandatory. You can select **I don’t have GST** and proceed with a savings account. + + + +### 14. How do I know my KYC status? + + The status of your KYC is communicated on your Dashboard. + + + +### 15. How do I submit my HUF document? + + Select your business type as HUF during onboarding to submit your HUF document. You can edit all the fields if you still need to submit the form. + + + +### 16. I am unable to add comments to my activation form. It says "locked by admin". How can I resolve this? + + You cannot edit a KYC form once it is submitted. If more information is required, we will email you. + + + +### 17. Can I update my PAN Card details? + + Once your KYC is verified, you can contact our [Support Team](https://razorpay.com/in/support/) to update your PAN card details. + + + +## Account Configuration + + +### 1. Can I disable the customer receipt emails from Razorpay? + + Customers receive email receipts for the transactions on their account (payments or refunds). Unfortunately, this is mandated by our partner banks and hence cannot be disabled. + + + +### 2. I have signed up using my phone number. How do I setup my password? + + To setup a password: + 1. Enter your email address and click **Forgot?**. You will receive a verification link on your email ID. + ![dashboard password setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-password-reset.jpg.md) + 2. Click the verification link and setup your password. + + +## Account Rejection + + +### 1. Why has my account been rejected? + + Your account may have been rejected because we do not support your business sub-category. You can refer to our [terms](https://razorpay.com/terms/) to know more. + + + to know more. diff --git a/llm-content/payments/glossary.md b/llm-content/payments/glossary.md new file mode 100644 index 00000000..e93bddf2 --- /dev/null +++ b/llm-content/payments/glossary.md @@ -0,0 +1,73 @@ +--- +title: Payments | Glossary +heading: Glossary +description: A list of commonly used terms related to Razorpay Payments. +--- + +# Glossary + +The following table lists the commonly used terms in Razorpay Payments and their definitions: + +Term | Description +--- +2FA (Two Factor Authentication) | 2FA is an additional security layer that helps protect your account from unauthorised access. You need to provide an additional code to sign in. +--- +API | API (Application Programming Interface) is a software code using which two applications can talk to each other. +--- +Arbitration | Arbitration is a chargeback that the business has won and is rechallenged for the third time by the customer, and the card networks directly get involved. These disputes are usually costly. +--- +Authorisation | Authorisation is performed when the bank successfully authenticates customer's payment details. The money is deducted from the customer's account by Razorpay, but will not be settled to your account until the payment is captured, either manually or automatically. +--- +Authorised Signatory | A person who is given the right to sign documents on behalf of the authorising organisation. Managing Director or Director or Chief Executive Officer or any other authorised signatory designated by the Board of Directors. +--- +Beneficiary | A beneficiary is a person or an entity that you legally designate to receive the benefits from your financial product. For example, a will, an insurance policy and so on. In terms of netbanking, a beneficiary is someone to whom funds should be transferred. +--- +Captured | When the payment status is changed to `captured` by the business, the payment is verified as complete by Razorpay. After the capture, the amount is settled to the business's account as per the settlement schedule. +--- +Chargeback | Chargeback is a refund claim initiated by the customers with their issuer banks. In such cases, the bank starts an official inquiry. +--- +Checkout | Checkout is a secure, Razorpay-hosted payment form that lets the business collect payments quickly. It works across devices. +--- +Dispute | A dispute is when a customer or the issuing bank questions the validity of payments. It may arise due to unauthorised charges, failure to deliver the promised merchandise or excessive charges levied by the business. +--- +Fiduciary relationship | A fiduciary relationship is where one person places some type of trust, confidence, and reliance on another person. +--- +Fraud | A fraud is a dispute raised by the bank when it suspects a transaction to be fraudulent based on the risk analysis. +--- +Instant Refund | If an amount paid by a customer for a product is reversed, it is called a Refund. Depending on the bank's processing time, the refunds can take 5-7 business days to reflect in the customer's bank account or card balance. In Instant Refunds, businesses can almost instantly provide a refund to the customer. +--- +Late Authorisation | Late authorization is a situation that arises when a payment is interrupted by external factors, such as network issues or technical errors at the customer's or bank's end. In such cases, funds may or may not get debited from the customer's bank account, and Razorpay does not receive a payment status from the bank. +--- +Merchant | An individual or business that receives payments from customers in exchange for goods or services using the Razorpay Payment Gateway. +--- +Orders | A confirmed request by one party to another to buy, sell, deliver, or receive goods or services under specified terms and conditions. +--- + +Partner | As part of the Razorpay Partnership program, Partners offer the Razorpay product suite to their clients or customers and receive rewards. There are 3 types of Partners: Service Partners, Aggregators and Technology Partners. + +--- +Payments | A money transfer made by the customer (using any payment mode, such as a debit card, credit card, and so on) in exchange for a product or service is called a Payment. +--- +Payment Gateway | Payment Gateway is a technology used by businesses to accept payments from customers in exchange for products and services they offer to their customers. +--- +Payment Methods | Payment Methods are the ways in which customers pay for products or services. For example: Credit Cards, Debit Cards, Net Banking, Wallets, UPI and so on. +--- +Payment Processor | A payment processor is a company that handles the credit card and debit card transactions for a business. It moves the funds from one account to another. +--- +Pre-Arbitration | Pre-Arbitration is a chargeback that the business has won and is re-challenged by the customer for the second time. +--- +Refunds | If an amount paid by a customer for a product is reversed, it is called a Refund. +--- +Retrieval | Retrieval is a request initiated by the customer with their issuer bank for additional information about a transaction. This is essentially a "soft" chargeback. +--- +Settlement | Settlement is when the businesses receive the money paid by their customers for a particular product or service. +--- +Third-Party Validation (TPV) | Third-Party Validation (TPV) of bank accounts is a mandatory requirement for businesses in the BFSI (Banking, Financial Services and Insurance) sector dealing with Securities, Broking and Mutual Funds. As per Securities and Exchange Board of India (SEBI) guidelines, the customers must make transactions only from those bank accounts provided when they had registered with your business. +--- +Tokenisation | Tokenisation is a process through which sensitive information or data is replaced with a unique set of characters that retain all the essential information without compromising the security of sensitive information. A token is a unique digital identifier in mobile and online transactions. +--- +Transaction | A transaction is any activity on a business's account, including inflow of funds (payments received), payouts (payments made to employees, contractors and vendors) and refunds. +--- +Trustee | A trustee is a person or firm that holds and administers property or assets for the benefit of a third party. Trustees are trusted to make decisions regarding bankruptcy, charity, trust fund, or certain types of retirement plans or pensions in the beneficiary's best interests. +--- +Trustor | An entity that creates and opens up a trust. A trustor may be an individual, a married couple, or even an organisation. They generally make contributions of property to add to the trust by donating money, gifts, and assets to other individuals. diff --git a/llm-content/payments/insights.md b/llm-content/payments/insights.md new file mode 100644 index 00000000..bc2529fd --- /dev/null +++ b/llm-content/payments/insights.md @@ -0,0 +1,111 @@ +--- +title: About Insights +description: Discover Razorpay Insights and explore its advanced analytics features, AI-driven insights, and how to seamlessly integrate it into your business. +--- + +# About Insights + +Razorpay Insights is a cutting-edge analytics platform that empowers businesses with powerful data-driven insights. Seamlessly integrated within Razorpay's ecosystem, Insights offers businesses an intuitive interface to explore actionable data, AI-driven insights, and advanced analytics. + +With features like natural language processing and customisable workspaces, Insights enables users to make informed decisions without requiring specialised technical skills. This documentation will guide you through the features, functionalities, and best practices for leveraging Insights to optimise your business strategies and drive growth in today's competitive market. + +A quick glimpse of the Insights Dashboard. + +![Insights on Razorpay Dashboard View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/insightx-dashboard-view.jpg.md) + + +### Advantages + + 1. **Seamless Access**: Fully integrated within the Razorpay platform, allowing easy access to data. + + 2. **Intuitive Interface**: User-friendly design with customisable workspaces, enabling businesses to analyse data without technical expertise. + + 3. **Real-Time Analytics**: Access up-to-date data and insights to make informed decisions quickly. + + 4. **Scalability**: Designed to grow with your business, Insights handles increasing data volumes and complexity without compromising performance. + + 5. **Cost Efficiency**: Optimise resource allocation and reduce operational costs using data-backed decisions. + + +## Access Insights Dashboard + +To access the Insights Dashboard: + +1. Log in to the Dashboard. +2. Navigate to **Insights**. + + +### Using the Analytics Dashboard, you can: + + - Perform a detailed analysis of your recent transactions. + - Click on the respective payment method options, such as Cards, UPI, Netbanking and Wallets to view detailed information. You can also access the aggregated data for all payment methods combined. + - Correlate downtime with your success rate trends for specific methods. + + +## Date Range + +Choose the specific date and time range for which you want to view the analytics data. You can use a predefined range or opt for a custom range. + +> **INFO** +> +> +> **Handy Tips** +> +> - The default date range is 1 day. +> - You can select the date range from up to the last 30 days. +> + +Additionally, you can select a custom date range for which you want to view the analytics data. + +![Custom Time Range Selector](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/insightx-date-range.jpg.md) + +## All Payment Methods + +The Overview tab provides a high-level view of your transactions and recent performance at the method level (Cards, UPI, Netbanking, Wallets and Emandate). + +In the Overview tab, you can view the following data points: + + +### 1. **Payments Data** + + 1. **Payments Count**: The total number of individual payment transactions processed during a specific period. + 2. **Payments GMV (Gross Merchandise Value)**: The total monetary value of all the payments processed through the platform over a specific period, before deducting any fees, refunds or discounts. + 3. **Average Order Value (AOV)**: The average amount of money spent per transaction during a specific period. It is calculated by dividing the Payments GMV by the Payments Count. + 4. **Success Rate**: The percentage of payment transactions that were successfully completed out of the total attempted transactions during a specific period. + ![Overview Page High Level Points](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/insightx-overview-first-points.jpg.md) + + + +### 2. **Success Rate Trend** + + Indicates the success rate trend from the beginning to the end of the selected time frame. + ![Success Rate Trend](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/insightx-success-rate-trend.jpg.md) + + + +### 3. **SR, Payment Count and GMV by Method** + + 1. **Success Rates**: Indicates the success rates in percentage for all payment methods. + 2. **Payments Count by Method**: Indicates the payment count for all payment methods. + 3. **Payments GMV by Method**: Refers to the total monetary value of transactions processed through a payment platform, broken down by specific payment methods. + ![Payment Method View Trends](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/insightx-method-views.jpg.md) + + + +### 4. **Payments GMV, AOV and Loss by Source** + + 1. **Payments GMV by Status**: Indicates the flow of GMV across different payment methods, highlighting successful and failed transactions. + 2. **Average Order Value (by Method)**: Indicates the average transaction value for each payment method. + 3. **GMV Loss by Source**: Displays the distribution of GMV losses by different sources, such as customer, bank or gateway issues. + ![Loss Data by method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/insightx-gmv-data.jpg.md) + + +## Next Steps + +You can also view the analytics data for all the different payment methods listed below - + +- [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/upi.md) +- [Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/card.md) +- [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/netbanking.md) +- [Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/wallet.md) +- [Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/emandate.md) diff --git a/llm-content/payments/insights/card.md b/llm-content/payments/insights/card.md new file mode 100644 index 00000000..f7b747cb --- /dev/null +++ b/llm-content/payments/insights/card.md @@ -0,0 +1,88 @@ +--- +title: Cards +description: Explore card transaction details and analytics in Insights, including performance metrics and trends for optimising card payments. +--- + +# Cards + +The Cards tab in Insights offers a detailed overview of card transactions, including success rates, trends, and average order values. This data helps you understand customer behaviour, identify issues, and optimise card payment strategies to boost conversion rates and revenue. + +You can view analytics for cards based on the following parameters. + +1. **Card Type**: The type of card used for the transaction. For example, Credit, Debit and Prepaid. +2. **Card Network**: The type of card network used for the transaction. For example, Visa, MasterCard, RuPay, AMEX and Diners. +3. **Card Issuer**: The bank or entity that has issued the card. For example, HDFC Bank, SBI, ICICI Bank and so on. + +## Data Points + +You can view the following data points for card transactions. + + +### 1. **Cards Success Rate Trend** + + Indicates the success rate trend from the beginning to the end of the selected timeframe. + ![UPI Success Rate Trend](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-success-rate-trends.jpg.md) + + + +### 2. **Card Type** + + 1. **Card Type SR (Success Rate)**: Displays the success rate of transactions categorised by different card types, such as credit, debit and prepaid over time. + 2. **Card Type GMV (Gross Merchandise Value)**: This shows the distribution of total transaction value across different card types, such as credit, debit and prepaid. + ![Card Type Metrics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/card-type-metrics.jpg.md) + + + +### 3. **Cards Network** + + 1. **Cards Network - Success Rate**: Displays the success rate of transactions across different card networks, such as Visa, MasterCard, and American Express over time. + 2. **Cards Network - GMV (Gross Merchandise Value)**: Shows the distribution of total transaction value across various card networks, including Visa, MasterCard and RuPay. + ![Card Network Metrics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/card-networks.jpg.md) + + + +### 4. **Payments Count** + + 1. **Card Type - Payments Count**: Displays the total number of transactions processed through different card types, such as credit, debit, and prepaid. + + 2. **Cards Network - Payments Count**: Shows the distribution of transactions across different card networks, including Visa, MasterCard, and RuPay. + ![Payments Count for Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-payments-count.jpg.md) + + + +### 5. Card Issuer and Tokenised GMV + + 1. **Cards Issuer**: Lists the banks or institutions that issued the cards, along with their total transactions, GMV, success rate, AOV and percentage of total transactions. + 2. **Cards Tokenised GMV**: Displays the total transaction value (GMV) split between tokenised and non-tokenised card transactions, showing the adoption and impact of tokenisation on different card types. + ![Card Issuer Metrics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/card-issuer-metrics.jpg.md) + + + +### 6. **Card Authorisation Type SR** + + Displays the success rate of card transactions across different authorisation methods, such as headless OTP, 3DS and OTP over time. + ![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-authorisation-sr.jpg.md) + + + +### 7. **Cards - Tokenised SR (Success Rate)** + + Displays the success rate of tokenised versus non-tokenised card transactions across different card types, such as credit, debit, and prepaid, over time. + ![Cards Tokenised SR](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-tokenised-sr.jpg.md) + + + +### 8. Card Failure Reasons and Authorisation Type + + 1. **Cards Top Failure Reason**: Lists the primary reasons for card transaction failures, including their sources, number of failures, GMV impacted, AOV, and percentage of total failures. + 2. **Cards Authorisation Type GMV**: Displays the distribution of GMV across different card authorisation methods, such as headless OTP, 3DS, and so on. + ![Cards Failure Reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-failure-reasons.jpg.md) + + +### Related Information + +- [About Insights](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights.md) +- [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/upi.md) +- [Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/wallet.md) +- [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/netbanking.md) +- [Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/emandate.md) diff --git a/llm-content/payments/insights/checkout-analytics.md b/llm-content/payments/insights/checkout-analytics.md new file mode 100644 index 00000000..7e708a2f --- /dev/null +++ b/llm-content/payments/insights/checkout-analytics.md @@ -0,0 +1,35 @@ +--- +title: Checkout Analytics +description: Explore checkout analytics in Insights, including real-time data on transaction performance, customer engagement, and payment method effectiveness. +--- + +# Checkout Analytics + +The Checkout Analytics Dashboard is a game-changer for merchants aiming to enhance their Ecommerce performance. Businesses can make strategic, data-driven decisions that increase sales and improve customer experiences by analysing comprehensive insights into transaction data and customer behaviour. + + +### Key Features + + 1. **Real-Time Transaction Metrics**: Monitor real-time sales, conversion rates, and transaction success and gain immediate insights to make informed decisions quickly. + + 2. **Customer Behaviour Insights**: Analyse customer journey data to identify drop-off points and optimize the checkout process for a seamless user experience. + + 3. **Payment Method Performance**: Evaluate the effectiveness of various payment methods and tailor payment options to match customer preferences. + + 4. **Visual Analytics**: Utilise intuitive charts and graphs for trend analysis and highlight the key performance indicators for easy interpretation. + + + +### Advantages + + 1. **Enhanced Decision Making**: + - Actionable insights help optimise marketing strategies. + - Merchants can improve checkout efficiency based on real-time data. + + 2. **Increased Sales**: + - Identify and address friction points in the checkout process. + - Boost conversion rates and reduce cart abandonment. + + 3. **Customer Satisfaction**: + - Improve checkout experiences for higher customer satisfaction. + - Foster customer loyalty and drive repeat business. diff --git a/llm-content/payments/insights/checkout-analytics/magic.md b/llm-content/payments/insights/checkout-analytics/magic.md new file mode 100644 index 00000000..852c7ebc --- /dev/null +++ b/llm-content/payments/insights/checkout-analytics/magic.md @@ -0,0 +1,53 @@ +--- +title: Magic for Checkout Analytics +description: Explore Magic in checkout analytics with real-time insights into transaction performance, customer engagement, and the effectiveness of payment methods. +--- + +# Magic for Checkout Analytics + +The Magic tab in Checkout Analytics offers a detailed overview of checkout data and transaction stories. It provides insights into the checkout data points, the effectiveness of various payment methods, transaction drop-off points, customer engagement, average order value, and conversion rate. + +## Data Points + +You can view the following data points for Magic Checkout Analytics. + + +### 1. **Total Orders** + + Tracks the total number of orders placed within a given timeframe, helping merchants assess the volume of transactions, sales trends, and peak order periods. + ![Magic Total Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-total-orders.png.md) + + + +### 2. **Total Sales** + + Measures total revenue generated from completed transactions. + ![Magic Total Sales](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-total-sales.png.md) + + + +### 3. **Average Order Value (AOV)** + + Calculates the average transaction value by dividing total sales by total orders. + ![Magic Average Order Value](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-average-order-value.png.md) + + + +### 4. **Detailed Checkout Funnel** + + Analyses user flow through the checkout stages, highlighting drop-off points. + ![Magic Detailed Checkout Funnel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-detailed-funnel.png.md) + + + +### 5. **Address Pre-Fill Funnel** + + Examines the percentage of users who use address autofill vs. manual entry. + ![Magic Address Pre-fill Funnel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-address-funnel.png.md) + + + +### 6. **Overall Conversion Rate** + + Calculates the percentage of users who complete the checkout process. + ![Magic Overall Conversion Rate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-conversion-rate.png.md) diff --git a/llm-content/payments/insights/checkout-analytics/magicx.md b/llm-content/payments/insights/checkout-analytics/magicx.md new file mode 100644 index 00000000..e76a8bd5 --- /dev/null +++ b/llm-content/payments/insights/checkout-analytics/magicx.md @@ -0,0 +1,47 @@ +--- +title: MagicX for Checkout Analytics +description: Explore MagicX in checkout analytics with real-time insights into transaction performance, customer engagement, and the effectiveness of payment methods. +--- + +# MagicX for Checkout Analytics + +The MagicX tab in Checkout Analytics offers a detailed overview of checkout data and transaction stories. It provides insights into the checkout data points, the effectiveness of various payment methods, transaction drop-off points, customer engagement, average order value, and conversion rate. + +## Data Points + +You can view the following data points for MagicX Checkout Analytics. + + +### 1. **Total Orders** + + Tracks the total number of orders placed within a given timeframe, helping merchants assess the volume of transactions, sales trends, and peak order periods. + + + +### 2. **Total Sales** + + Measures total revenue generated from completed transactions. + + + +### 3. **Average Order Value (AOV)** + + Calculates the average transaction value by dividing total sales by total orders. + + + +### 4. **Detailed Checkout Funnel** + + Analyses user flow through the checkout stages, highlighting drop-off points. + + + +### 5. **Address Pre-Fill Funnel** + + Examines the percentage of users who use address autofill vs. manual entry. + + + +### 6. **Overall Conversion Rate** + + Calculates the percentage of users who complete the checkout process. diff --git a/llm-content/payments/insights/emandate.md b/llm-content/payments/insights/emandate.md new file mode 100644 index 00000000..80121377 --- /dev/null +++ b/llm-content/payments/insights/emandate.md @@ -0,0 +1,57 @@ +--- +title: Success Analytics for Emandates +heading: Emandate +description: Analyse emandate transaction details and performance metrics in Insights for optimising emandate payments. +--- + +# Emandate + +The Emandate tab in Insights offers a detailed overview of emandate transactions, including success rates, trends and average order values. This data helps you understand customer behaviour, identify issues and optimise emandate payment strategies to boost conversion rates and revenue. + +You can view analytics for cards based on the following parameters. + +1. **Emandate Bank**: The bank used for the transaction. For example, HDFC Bank, ICICI Bank, SBI and so on. +2. **Emandate Auth Type**: The authorisation used for the transaction. For example, netbanking, debit card and aadhar. + +## Data Points + +You can view the following data points for emandate transactions. + + +### 1. **Emandate Success Rate Trend** + + Indicates the success rate trend from the beginning to the end of the selected timeframe. + ![emandate euccess rate trend](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emandate-success-rate-trends.jpg.md) + + + +### 2. **Emandate Bank** + + 1. **Emandate Bank SR (Success Rate)**: Displays the success rate of transactions categorised by different banks paid over time. + 2. **Emandate Bank Payments Count**: Displays the success rate of transactions categorised by different banks paid over time. + 3. **Emandate Bank GMV (Gross Merchandise Value)**: This shows the distribution of total transaction value across different banks paid. + ![emandate bank metrics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emandate-bank-metrics.jpg.md) + + + +### 3. **Emandate Authorisation Type** + + 1. **Emandate Auth Type SR (Success Rate)**: Displays the success rate of emandate transactions across different authorisation methods like netbanking, debit card and aadhar over time. + 2. **Emandate Auth Type GMV (Gross Merchandise Value)**: Displays the distribution of GMV across different authorisation methods like netbanking, debit card and aadhar over time. + ![emandate auth type metrics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emandate-authorisation-sr.jpg.md) + + + +### 4. Emandate Top Failure Reason + + Lists the primary reasons for emandate transaction failures, including their sources, number of failures, GMV impacted, AOV and percentage of total failures. + ![emandate Failure Reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emandate-failure-reasons.jpg.md) + + +### Related Information + +- [About Insights](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights.md) +- [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/upi.md) +- [Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/wallet.md) +- [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/netbanking.md) +- [Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/card.md) diff --git a/llm-content/payments/insights/faqs.md b/llm-content/payments/insights/faqs.md new file mode 100644 index 00000000..289b6198 --- /dev/null +++ b/llm-content/payments/insights/faqs.md @@ -0,0 +1,47 @@ +--- +title: Razorpay Insights | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Insights. +--- + +# Frequently Asked Questions (FAQs) + +### 1. What is Insights, and how does it benefit me? + + Insights, Razorpay's analytics platform, provides you with valuable insights into your payment data. With interactive dashboards and infographics, you can easily visualise critical metrics like transaction trends and customer behaviours to optimise strategies, improve conversion rates, and drive growth. Insights also offers actionable recommendations, such as optimising checkouts, improving payment success rates, enhancing customer engagement, and maximising revenue. + + + +### 2. What are the key Insights features? + + Insights offers interactive dashboards, infographics, actionable recommendations, NLP capabilities, and a customisable workspace for creating custom data views. + + + +### 3. How can I access Insights? + + Insights is seamlessly integrated into your Razorpay portal, accessible directly from your Dashboard. This integration provides convenient access to valuable insights without the need for separate platforms or interfaces. + + + +### 4. How can I use Insights? + + Insights provides a comprehensive toolkit for exploring your payment ecosystem. You gain valuable business insights by analysing payment metrics, understanding customer behaviours, and identifying drop-off points. The platform’s cross-referencing capabilities help you uncover trends and patterns, enabling proactive decision-making. With Insights, you can fine-tune strategies, optimise conversions, and stay ahead in a competitive landscape. + + + +### 5. Is Insights easy to use? + + Yes, Insights features an intuitive interface with relevant infographics, making it easy to derive actionable insights without specialised technical skills. Its robust NLP capabilities also allow you to query data using everyday language, saving time and resources on data analysis and interpretation. + + + +### 6. Which business categories would benefit the most from Insights? + + Insights benefits businesses of all sizes, from startups to enterprises. Its user-friendly, self-serve features are ideal for small and medium-sized businesses, helping them grow without needing a specialised analytics team. For larger enterprises, Insights offers advanced automated insights and recommendations, optimising payment success rates and customer journey metrics by analysing demographics, geography, and time-series data. + + + +### 7. How does Insights provide actionable insights and recommendations? + + Insights uses advanced analytics and machine learning to analyse your payment data and identify patterns. It provides personalised recommendations to help you improve key performance indicators like conversion rates, customer retention, and average transaction value. diff --git a/llm-content/payments/insights/glossary.md b/llm-content/payments/insights/glossary.md new file mode 100644 index 00000000..7dd5c69a --- /dev/null +++ b/llm-content/payments/insights/glossary.md @@ -0,0 +1,18 @@ +--- +title: Glossary +description: List of all the commonly used terms related to Razorpay Insights. +--- + +# Glossary + +The following table lists all the commonly used terms and their definitions used in Insights: + +Term | Description +--- +Gross Merchandise Value (GMV) | Gross Merchandise Value (GMV) is the total sales value of all transactions processed through a platform over a specific period, before any deductions like fees or refunds. +--- +Average Order Value (AOV) | Average Order Value (AOV) is the average amount spent per transaction during a specific period, calculated by dividing total revenue by the number of orders. +--- +UPI Intent Flow | When a customer selects the UPI payment option during checkout on a website or app, the UPI app automatically launches on their mobile device. +--- +Success Rate | The percentage of payment transactions that were successfully completed out of the total attempted transactions during a specific period. diff --git a/llm-content/payments/insights/netbanking.md b/llm-content/payments/insights/netbanking.md new file mode 100644 index 00000000..5ce38e55 --- /dev/null +++ b/llm-content/payments/insights/netbanking.md @@ -0,0 +1,55 @@ +--- +title: Netbanking +description: View Netbanking transaction details and analytics in Insights, with insights into performance trends for optimising payment success. +--- + +# Netbanking + +The Netbanking tab in Insights provides detailed analysis of netbanking transactions, including success rates, volumes, and average order values. This data helps you monitor performance, identify trends, and optimise the customer experience, offering insights to enhance your payment strategy. + +You can view analytics for netbanking based on the following parameters. + +1. **Banks**: The bank through which the transaction was done. +2. **Gateway**: The bank gateway through which the transaction was done. + +## Data Points + +You can view the following data points for netbanking transactions. + + +### 1. **Netbanking Success Rate Trend** + + Indicates the success rate trend from the beginning to the end of the selected time frame. + ![UPI Success Rate Trend](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-success-rate-trends.jpg.md) + + + +### 2. **NB Banks SR and GMV** + + 1. **NB Banks SR (Success Rate)**: Displays the success rate of netbanking transactions across different banks over time. + 2. **NB Banks GMV (Gross Merchandise Value)**: Shows the distribution of total transaction value (GMV) across different banks for netbanking payments. + ![Netbanking SR Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/nb-banks-sr-details.jpg.md) + + + +### 3. **NB Gateways** + + 1. **NB Gateways SR (Success Rate)**: Displays the success rate of netbanking transactions across different payment gateways over time. + 2. **NB Gateways GMV (Gross Merchandise Value)**: Shows the distribution of total transaction value (GMV) across different payment gateways for netbanking transactions. + ![Netbanking Gateways SR Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/nb-gateways-sr-details.jpg.md) + + + +### 4. **Top Failure Reasons** + + Lists the primary reasons for netbanking transaction failures, detailing the source of failure, number of failures, GMV impacted, AOV, and percentage of total failures. + ![Netbanking Top Failure Reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/nb-top-failure-reasons.jpg.md) + + +### Related Information + +- [About Insights](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights.md) +- [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/upi.md) +- [Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/wallet.md) +- [Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/card.md) +- [Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/emandate.md) diff --git a/llm-content/payments/insights/upi.md b/llm-content/payments/insights/upi.md new file mode 100644 index 00000000..e4cfe57b --- /dev/null +++ b/llm-content/payments/insights/upi.md @@ -0,0 +1,42 @@ +--- +title: UPI +description: Explore UPI transaction details and analytics in Insights, including metrics on performance and trends for optimising UPI payments. +--- + +# UPI + +The UPI tab in Insights provides comprehensive analytics and insights on UPI transactions processed through your platform. Here, you can access detailed performance metrics, analyse transaction trends, and explore optimisation strategies specific to UPI payments. + +You can view the analytics data for UPI Payments. + +## Data Points + +You can view the following data points for UPI transactions. + + +### 1. **UPI Success Rate Trend** + + Indicates the success rate trend from the beginning to the end of the selected time frame. + ![UPI Success Rate Trend](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-success-rate-trend.jpg.md) + + + +### 2. **UPI Type Data** + + 1. **UPI Type SR (Success Rate)**: Displays the success rate of UPI transactions, comparing UPI flows over time. + 2. **UPI Type GMV (Gross Merchandise Value)**: Shows the total value of transactions processed through UPI. + + + +### 3. **Failure Reasons** + + **UPI Intent - Top Failure Reasons**: Displays the main causes of transaction failures in UPI Intent, detailing their sources, the number of failures, GMV affected, AOV, and percentage of total failures. + + +### Related Information + +- [About Insights](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights.md) +- [Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/card.md) +- [Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/wallet.md) +- [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/netbanking.md) +- [Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/emandate.md) diff --git a/llm-content/payments/insights/wallet.md b/llm-content/payments/insights/wallet.md new file mode 100644 index 00000000..92c90ebd --- /dev/null +++ b/llm-content/payments/insights/wallet.md @@ -0,0 +1,50 @@ +--- +title: Wallets +description: Analyse Wallet transaction details and performance metrics in Insights for optimising wallet payments. +--- + +# Wallets + +The Wallets tab in Insights offers detailed analytics on digital wallet transactions, including success rates, volumes, and average order values. This data helps you monitor and optimise wallet usage, compare providers, track trends, and make informed decisions to drive growth through wallet payments. + +## Data Points + +You can view the following data points for wallet transactions. + + +### 1. **Wallets Success Rate Trend** + + Indicates the success rate trend from the beginning to the end of the selected time frame. + ![Wallets SR Trends](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/wallet-sr-trends.jpg.md) + + + +### 2. **Wallets SR (Success Rate)** + + Displays the success rate of transactions made through various digital wallets over a specific period. + ![Wallet Success Rate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/wallet-sr-graph.jpg.md) + + + +### 3. **Wallets Payments Count, GMV and Failure Distribution** + + 1. **Wallets Payments Count**: Displays the total number of transactions processed through digital wallets. + 2. **Wallets GMV (Gross Merchandise Value)**: Shows the distribution of total transaction value across various digital wallets. + 3. **Wallets Failure Distribution**: Illustrates the proportion of failed transactions across digital wallets. + ![Wallet Payment Trends](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/walet-payment-trends.jpg.md) + + + +### 4. **Top Failure Reasons** + + Lists the primary reasons for wallet transaction failures, detailing the source of failure, number of failures, GMV impacted, AOV and percentage of total failures. + ![Wallet Failure Reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/wallet-failure-reason.jpg.md) + + +### Related Information + +- [About Insights](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights.md) +- [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/upi.md) +- [Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/card.md) +- [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/netbanking.md) +- [Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/insights/emandate.md) diff --git a/llm-content/payments/international-payments.md b/llm-content/payments/international-payments.md new file mode 100644 index 00000000..636fb832 --- /dev/null +++ b/llm-content/payments/international-payments.md @@ -0,0 +1,505 @@ +--- +title: International Payments Support from Razorpay +heading: About International Payments +description: Accept payments in international currencies, through international bank accounts and/or payments via cards issued by foreign banks. Check the list of supported purpose codes and currencies. +--- + +# About International Payments + +- **International Payments Changelog**: Discover new features, updates and deprecations related to Razorpay International Payments (since Jan 2024). + + - **International Payments**: Watch this video to know what Razorpay offers for International Payments. + +You can accept payments from your customers in more than 160+ foreign currencies using our Payment Gateway and other products such as Payment Pages, Payment Button, Payment Links and Invoices. Razorpay supports [3D Secure 2.0](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/3ds2.0.md) for international cards. + +- **List of Purpose Codes**: Download the list of transaction purpose codes. + +- **Supported Products**: List of products available for international payments. + +- **Supported Currencies**: List of supported currencies for international payments. + +## Get Started + +Check these steps to accept international payments from [Indian Businesses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#indian-businesses) and [International Businesses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#international-businesses). + +### Indian Businesses + +Indian businesses can easily activate international payment methods to expand their global reach. + + +### New Razorpay User + + If you are a new user, you will need to complete the following steps displayed on the onboarding screens to activate international payment methods. + 1. Sign up for an [account](https://accounts.razorpay.com/auth/). + 2. On the onboarding screen, select **Outside India (International)** and click **Start Onboarding**. + ![International Payments Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ip-onboarding.jpg.md) + 3. Fill up the following details to complete the onboarding: + - Basic Details: + - Name (Business or Individual). + - Phone number. + - Email address. + - Payment channels you want to enable. + - Business Details: + - Type of business: Individual, Sole Proprietorship, Partnership, Private Limited, Public Limited, LLP, NGO and so on. + - Personal PAN (for individuals) or Business PAN. + - Business Documents: + - GSTIN certificate (if GST registered). + - Udyam registration certificate (for MSMEs). + - Complete your KYC: + - Business address with proof. + - Authorised signatory details. + - Complete video KYC: + - Requires Aadhaar and PAN card. + - Live video verification with Razorpay agent. + - Takes approximately 3-4 minutes. + ![Onboarding flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ip-onborading-flow.jpg.md) + 4. Follow the on-screen instructions to provide any additional details or documentation required for activation. + + + +### Existing Razorpay User + + If you are an existing Razorpay user, to activate international payment methods, follow the steps given below. + + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings** → **International payments** (under Payment methods). + 3. Select the payment method you wish to activate, such as **International Cards** or **International Bank Transfers** and click **Activate** button corresponding to the payment method. + ![International cards and Bank transfer activate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ic-ibt-activate.jpg.md) + 4. Follow the on-screen instructions to provide any additional details or documentation required for activation. + + +Indian businesses can use **International Bank Transfer** to open **SWIFT accounts** and **Local bank accounts** to accept international payments. + + + **International Bank Transfer** (MoneySaver Export Account) enables the [Local Currency Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-bank-transfer.md) method and [Swift Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-bank-transfer.md) method to accept payments from buyers outside India without additional paperwork. The final settlement is done in the bank accounts of Indian businesses in INR. + + **Local Currency Bank Transfer**: Accept payments from buyers outside India without additional paperwork. The final settlement is done in the bank accounts of Indian businesses in INR. This significantly improves the customer experience by allowing international buyers to make local bank account transfer to Indian businesses. + + **Swift Transfers**: Accept payments from buyers outside India without additional paperwork. The final settlement is done in the bank accounts of Indian businesses in INR. This significantly improves the customer experience by allowing international buyers globally to make SWIFT Transfer to Indian businesses. + + + [Local Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/local-payment-methods.md) allows you to accept international payments from customers specific geographies in the form of online local payment method using the Razorpay Checkout form. + + - [Giropay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/giropay.md) for German customers. + - [Sofort](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/sofort.md) for European customers. + - [Trustly](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/trustly.md) for UK and European customers. + - [POLi](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/poli.md) for Australian customers. + + +### International Businesses + +Non-Indian businesses looking to accept payments from Indian customers via Razorpay and get their settlement in a foreign bank account. Check the list of supported purpose codes and [ currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +Razorpay allows foreign (non-Indian) businesses to accept payments from Indian customers without any additional paperwork or registration. Your Indian customers can make payments via local payment methods such as credit cards, debit cards, UPI and netbanking. The funds are settled in your overseas bank account. + +> **INFO** +> +> +> +> **Feature Request** +> +> This is an on-demand feature. Please fill out the [form](https://form.typeform.com/to/C5OlR4YQ) to get this feature activated on your account. +> +> + +> **WARN** +> +> +> +> **Watch Out!** +> +> Your international payment will fail if you send us a dummy email id and phone number of the customer. +> + +## Payment Methods for International Payments Based on Business Type + +Select the payment method based on your business type: + + + If you are an eligible registered business with a valid website, you can accept international payments made using: + + - [Cards issued by domestic banks or foreign banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-debit-credit-cards.md) + + - [International Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-bank-transfer.md) + + - [PayPal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paypal.md) + + - [Local Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/local-payment-methods.md) + + + + + + + + + +### List of Purpose Codes + + Download the complete list of transaction purpose codes that can be selected in the onboarding process. + + + + +### Supported Products + + The following products support international payments: + + Product | International Payments Supported + --- + Payment Gateway (Checkout) | Yes + --- + Invoices | Yes + --- + Payment Links | Yes + --- + Payment Pages | Yes + --- + Subscriptions | Yes + --- + Route | No + --- + Smart Collect | No + --- + RazorpayX | No + + + + +### Supported Currencies + + Following is the list of supported currencies: + + Currency Name | ISO Code | Exponent + --- + United Arab Emirates Dirham | AED | 2 + --- + Albanian lek | ALL | 2 + --- + Armenian dram | AMD | 2 + --- + Australian dollar | AUD | 2 + --- + Aruban florin | AWG | 2 + --- + Azerbaijan Manat | AZN | 2 + --- + Convertible Mark | BAM | 2 + --- + Barbadian dollar | BBD | 2 + --- + Bangladeshi taka | BDT | 2 + --- + Bulgarian Lev | BGN | 2 + --- + Bahraini Dinar | BHD | 3 + --- + Burundi Franc | BIF | 0 + --- + Bermudian dollar | BMD | 2 + --- + Brunei dollar | BND | 2 + --- + Bolivian boliviano | BOB | 2 + --- + Brazilian Real | BRL | 2 + --- + Bahamian dollar | BSD | 2 + --- + Bhutanese Ngultrum | BTN | 2 + --- + Botswana pula | BWP | 2 + --- + Belize dollar | BZD | 2 + --- + Canadian dollar | CAD | 2 + --- + Swiss franc | CHF | 2 + --- + Chilean Peso | CLP | 0 + --- + Chinese yuan renminbi | CNY | 2 + --- + Colombian peso | COP | 2 + --- + Costa Rican colon | CRC | 2 + --- + Cuban peso | CUP | 2 + --- + Cabo Verde Escudo | CVE | 2 + --- + Czech koruna | CZK | 2 + --- + Djibouti Franc | DJF | 0 + --- + Danish krone | DKK | 2 + --- + Dominican peso | DOP | 2 + --- + Algerian dinar | DZD | 2 + --- + Egyptian pound | EGP | 2 + --- + Ethiopian birr | ETB | 2 + --- + European euro | EUR | 2 + --- + Fijian dollar | FJD | 2 + --- + Pound sterling | GBP | 2 + --- + Ghanian Cedi | GHS | 2 + --- + Gibraltar pound | GIP | 2 + --- + Gambian dalasi | GMD | 2 + --- + Guinean Franc | GNF | 0 + --- + Guatemalan quetzal | GTQ | 2 + --- + Guyanese dollar | GYD | 2 + --- + Hong Kong dollar | HKD | 2 + --- + Honduran lempira | HNL | 2 + --- + Croatian kuna | HRK | 2 + --- + Haitian gourde | HTG | 2 + --- + Hungarian forint | HUF | 2 + --- + Indonesian rupiah | IDR | 2 + --- + Israeli new shekel | ILS | 2 + --- + Indian rupee | INR | 2 + --- + Iraqi Dinar | IQD | 3 + --- + Iceland Krona | ISK | 0 + --- + Jamaican dollar | JMD | 2 + --- + Jordanian Dinar | JOD | 3 + --- + Japanese Yen | JPY | 0 + --- + Kenyan shilling | KES | 2 + --- + Kyrgyzstani som | KGS | 2 + --- + Cambodian riel | KHR | 2 + --- + Comorian Franc | KMF | 0 + --- + Korean Won | KRW | 0 + --- + Kuwaiti Dinar | KWD | 3 + --- + Cayman Islands dollar | KYD | 2 + --- + Kazakhstani tenge | KZT | 2 + --- + Lao kip | LAK | 2 + --- + Sri Lankan rupee | LKR | 2 + --- + Liberian dollar | LRD | 2 + --- + Lesotho loti | LSL | 2 + --- + Moroccan dirham | MAD | 2 + --- + Moldovan leu | MDL | 2 + --- + Malagasy Ariary | MGA | 2 + --- + Macedonian denar | MKD | 2 + --- + Myanmar kyat | MMK | 2 + --- + Mongolian tugrik | MNT | 2 + --- + Macanese pataca | MOP | 2 + --- + Mauritian rupee | MUR | 2 + --- + Maldivian rufiyaa | MVR | 2 + --- + Malawian kwacha | MWK | 2 + --- + Mexican peso | MXN | 2 + --- + Malaysian ringgit | MYR | 2 + --- + Mozambique Metical | MZN | 2 + --- + Namibian dollar | NAD | 2 + --- + Nigerian naira | NGN | 2 + --- + Nicaraguan cordoba | NIO | 2 + --- + Norwegian krone | NOK | 2 + --- + Nepalese rupee | NPR | 2 + --- + New Zealand dollar | NZD | 2 + --- + Rial Omani | OMR | 3 + --- + Peruvian sol | PEN | 2 + --- + Papua New Guinean kina | PGK | 2 + --- + Philippine peso | PHP | 2 + --- + Pakistani rupee | PKR | 2 + --- + Polish Zloty | PLN | 2 + --- + Paraguayan Guarani | PYG | 0 + --- + Qatari riyal | QAR | 2 + --- + Romanian Leu | RON | 2 + --- + Serbian Dinar | RSD | 2 + --- + Russian ruble | RUB | 2 + --- + Rwanda Franc | RWF | 0 + --- + Saudi Arabian riyal | SAR | 2 + --- + Seychellois rupee | SCR | 2 + --- + Swedish krona | SEK | 2 + --- + Singapore dollar | SGD | 2 + --- + Sierra Leonean leone | SLL | 2 + --- + Somali shilling | SOS | 2 + --- + Salvadoran colón | SVC | 2 + --- + Swazi lilangeni | SZL | 2 + --- + Thai baht | THB | 2 + --- + Tunisian Dinar | TND | 3 + --- + Turkish Lira | TRY | 2 + --- + Trinidad and Tobago dollar | TTD | 2 + --- + New Taiwan Dollar | TWD | 2 + --- + Tanzanian shilling | TZS | 2 + --- + Ukrainian Hryvnia | UAH | 2 + --- + Uganda Shilling | UGX | 0 + --- + United States dollar | USD | 2 + --- + Uruguayan peso | UYU | 2 + --- + Uzbekistani so'm | UZS | 2 + --- + Vietnamese Dong | VND | 0 + --- + Vatu | VUV | 0 + --- + CFA Franc BEAC | XAF | 0 + --- + East Caribbean Dollar | XCD | 2 + --- + CFA Franc BCEAO | XOF | 0 + --- + CFP Franc | XPF | 0 + --- + Yemeni rial | YER | 2 + --- + South African rand | ZAR | 2 + --- + Zambian Kwacha | ZMW | 2 + + + - For any other additional currencies, which are not a part of the above list and that you might want us to support, . + + + + - When selling a product for ₹ 1000 in the domestic market, you pass `INR` in the `currency` parameter and `100000` in the `amount` parameter (since the amount should be in paise). + - When selling in the international market, you might want to charge $20 for the same product. In this case, you must pass `USD` in the `currency` parameter and `2000` in the `amount` parameter (since the amount should be in cents). + + For example: AED, AMD, INR and so on. + + + - When selling in the international market with a three-decimal unit, you might want to charge 99.999 KD for the same product. In this case, you must pass `KWD` in the `currency` parameter and `99999` in the `amount` parameter. + + + - When selling in the international market with a zero-decimal unit, such as Japanese Yen (JPY), which does not have a concept of decimal values, you might want to charge 99 JPY for the same product. In this case, you must pass `JPY` in the `currency` parameter and `99` in the `amount` parameter. + + + + + +### Forex Holiday Calendar 2026 + + Forex Holiday Calendar 2026 highlights days when forex trading is impacted due to holidays in India and the United States. + + [Download Forex Holiday Calendar 2026](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/forex-2026-holiday-calendar.pdf.md) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> - **INR Holidays (Orange-Shaded Days)**: USD/INR conversions will not be possible as the Indian forex market remains closed. These are Mumbai holidays when forex trading is unavailable. +> +> - **USD Holidays (Yellow-Shaded Days)**: Currency trading is available in India for Tom/Spot/Forwards, but USD nostro transfers will not be processed due to US bank closures. However, cash deals may be done on a selective basis. +> +> + + + + ![Forex Holiday Calendar Jan 2026](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/forex-holiday-calendar-jan-2026.jpg.md) + + + ![Forex Holiday Calendar Feb 2026](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/forex-holiday-calendar-feb-2026.jpg.md) + + + ![Forex Holiday Calendar Mar 2026](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/forex-holiday-calendar-mar-2026.jpg.md) + + + ![Forex Holiday Calendar Apr 2026](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/forex-holiday-calendar-apr-2026.jpg.md) + + + ![Forex Holiday Calendar May 2026](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/forex-holiday-calendar-may-2026.jpg.md) + + + ![Forex Holiday Calendar Jun 2026](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/forex-holiday-calendar-jun-2026.jpg.md) + + + ![Forex Holiday Calendar Jul 2026](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/forex-holiday-calendar-jul-2026.jpg.md) + + + ![Forex Holiday Calendar Aug 2026](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/forex-holiday-calendar-aug-2026.jpg.md) + + + ![Forex Holiday Calendar Sep 2026](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/forex-holiday-calendar-sep-2026.jpg.md) + + + ![Forex Holiday Calendar Oct 2026](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/forex-holiday-calendar-oct-2026.jpg.md) + + + ![Forex Holiday Calendar Nov 2026](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/forex-holiday-calendar-nov-2026.jpg.md) + + + ![Forex Holiday Calendar Dec 2026](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/forex-holiday-calendar-dec-2026.jpg.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers.md new file mode 100644 index 00000000..60e06e2e --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers.md @@ -0,0 +1,463 @@ +--- +title: Accept International Payments From Indian Customers +description: Non-Indian businesses looking to accept payments from Indian customers via Razorpay and get their settlement in a foreign bank account. Check the list of transaction purpose codes and supported currencies. +--- + +# Accept International Payments From Indian Customers + +Razorpay allows foreign (non-Indian) businesses to accept payments from Indian customers without any additional paperwork or registration. + +Your Indian customers can make payments via local payment methods such as credit cards, debit cards, UPI and netbanking. The funds are settled in your overseas bank account. + +[Video: https://www.youtube.com/embed/CkZeUU2q68s] + +> **INFO** +> +> +> +> **Feature Request** +> +> This is an on-demand feature. Please fill out the [form](https://form.typeform.com/to/C5OlR4YQ) to get this feature activated on your account. +> +> + +## Current Challenges + +- Limited payment methods are available to end customers. For example, UPI and recurring payments are not supported by most payment providers. +- Registration in India is a tedious and long process and is often subjected to regulations and reporting requirements. +- International card payments are convenient ways of remitting funds to India from abroad. However, it incurs huge costs, making them a less preferred method for accepting payments. + +## Advantages + + + + + - **No Card? No Problem!** + + Customers who do not have access to cards can use our **Import Flow** solution to pay through their bank account: through **UPI or Netbanking**, making it easy for them to buy products in foreign countries with lower card coverage. + + - **No Visit to Bank Branch** + + Currently, customers have to visit their bank branch to make an international bank transfer to the seller's account. This process heavily impacts the customer experience as it is time-consuming. Using the **Import Flow** method, you can make bank transfers in your local currency. + + - **The Most Affordable Solution to Transfer Funds Internationally** + + The customer can transfer funds to the seller's bank account. This incurs less cost than international card payments or SWIFT transfers. + + - **Faster Payments Experience** + + Accept payments without a website or app using other Razorpay products, such as Payment Links and Payment Pages. + + + + + + - **Wide Range of Domestic Payment Methods** + + + + + - **Better Success Rates** + + Card Payments are an expensive mode of payment. Also, international card payments have a lower success rate due to ever-increasing fraudulent attempts and extensive risk checks done by banks. + + - **No Indian Entity Required** + + International Businesses do not need to spend significant time and resources in setting up an Indian entity or opening a local bank account in India. Razorpay's hassle-free onboarding helps you to collect payments as soon as the KYC process is completed. + + - **Multi-currency Settlement Support** + + Razorpay supports a range of foreign currencies, including USD, SGD, AUD, CAD, EUR, GBP, HKD, INR and MYR, for transactions originating from India. + + - **Powerful Dashboard** + + Analyse detailed reports about payments, settlements, and refunds to make better business decisions. + + - **Maximum Compliance** + + Razorpay complies with the latest standards of compliance like Tokenisation and Mandate management and holds the Reserve Bank of India's PA/PG license. Businesses can thus stay on top of regulatory and compliance requirements seamlessly with Razorpay. + + +## Supported Merchant Categories + +Razorpay supports these merchant categories: + + + +### Import (Goods) + + + Category | Description + --- + S0101 | Advance payment against imports made to countries other than Nepal and Bhutan. + --- + S0102 | Payment towards imports - settlement of invoice other than Nepal and Bhutan. + --- + S0103 | Imports by diplomatic missions other than Nepal and Bhutan. + --- + S0104 | Intermediary trade/transit trade, that is third country export passing through India. + --- + S0108 | Goods acquired under merchanting/payment against import leg of merchanting trade. + --- + + + + +### Transport Services + + + Category | Description + --- + S0201 | Payments for surplus freight/passenger fare by foreign shipping companies operating in India. + --- + S0202 | Payment for operating expenses of Indian shipping companies operating abroad. + --- + S0203 | Freight on imports - Shipping companies. + --- + S0204 | Freight on exports - Shipping companies. + --- + S0205 | Operational leasing/rental of vessels (with crew) - Shipping companies. + --- + S0206 | Booking of passages abroad - Shipping companies. + --- + S0207 | Payments for surplus freight/passenger fare by foreign airlines companies operating in India. + --- + S0208 | Operating expenses of Indian airlines companies operating abroad. + --- + S0209 | Freight on imports - Airlines companies. + --- + S0210 | Freight on exports - Airlines companies. + --- + S0211 | Operational leasing/rental of vessels (with crew) - Airline companies. + --- + S0212 | Booking of passages abroad - Airlines companies. + --- + S0214 | Payments on account of stevedoring, demurrage and port handling charges (Shipping companies). + --- + S0215 | Payments on account of stevedoring, demurrage and port handling charges (Airlines companies). + --- + S0216 | Payments for passenger - Shipping companies. + --- + S0217 | Other payments by shipping companies. + --- + S0218 | Payments for passenger - Airlines companies. + --- + S0219 | Other payments by airlines companies. + --- + S0220 | Payments on account of freight under other modes of transport (Internal waterways, roadways, railways, pipeline transports and others). + --- + S0221 | Payments on account of passenger fare under other modes of transport (Internal waterways, roadways, railways, pipeline transports and others). + --- + S0222 | Postal and courier services by air. + --- + S0223 | Postal and courier services by sea. + --- + S0224 | Postal and courier services by others. + --- + + + + +### Travel Services + + + Category | Description + --- + S0301 | Business travel. + --- + S0303 | Travel for pilgrimage. + --- + S0304 | Travel for medical treatment. + --- + S0305 | Travel for education (including fees and hostel expenses). + --- + S0306 | Other travel (including holiday trips and payments for settling international credit cards transactions). + --- + + + + +### Insurance and Pension Services + + + Category | Description + --- + S0601 | Life insurance premium except term insurance. + --- + S0602 | Freight insurance - relating to import and export of goods. + --- + S0603 | Other general insurance premium including reinsurance premium and term life insurance premium. + --- + S0605 | Auxiliary services including commission on insurance. + --- + S0607 | Insurance claim settlement of non-life insurance and life insurance (only term insurance). + --- + S0608 | Life insurance claim settlements. + --- + S0610 | Premium for pension funds. + --- + S0611 | Periodic pension entitlements for example monthly, quarterly or yearly payments of pension amounts by Indian pension fund companies. + --- + + + + +### Telecommunication, Computer and Information Services + + + Category | Description + --- + S0801 | Hardware consultancy/implementation. + --- + S0802 | Software consultancy/implementation. + --- + S0803 | Database, data processing charges. + --- + S0804 | Repair and maintenance of computer and software. + --- + S0805 | News agency services. + --- + S0806 | Other information services - Subscription to newspapers and periodicals. + --- + S0807 | Off-site software imports. + --- + S0808 | Telecommunication services including electronic mail services and voice mail services. + --- + + + + +### Other Business Services + + + Category | Description + --- + S1003 | Operational leasing services (other than financial leasing) without operating crew, including charter hire - Airlines companies. + --- + S1004 | Legal services. + --- + S1005 | Accounting, auditing, book-keeping services. + --- + S1006 | Business and management consultancy and public relations services. + --- + S1007 | Advertising, trade fair service. + --- + S1008 | Research and development services. + --- + S1009 | Architectural services. + --- + S1013 | Environmental services. + --- + S1014 | Engineering services. + --- + S1015 | Tax consulting services. + --- + S1016 | Market research and public opinion polling service. + --- + S1017 | Publishing and printing services. + --- + S1020 | Commission agent services. + --- + S1021 | Wholesale and retailing trade services. + --- + S1022 | Operational leasing services (other than financial leasing) without operating crew, including charter hire - Shipping companies. + --- + S1023 | Other technical services including scientific/space services. + --- + + + + +### Personal, Cultural and Recreational Services + + + Category | Description + --- + S1101 | Audio-visual and related services like motion picture and video tape production, distribution and projection services. + --- + S1103 | Radio and television production, distribution and transmission services. + --- + S1104 | Entertainment services. + --- + S1105 | Museums, library and archival services. + --- + S1106 | Recreation and sporting activities services. + --- + S1107 | Education (for example fees for correspondence courses abroad). + --- + S1108 | Health service (payment towards services received from hospitals, doctors, nurses, paramedical and similar services rendered remotely or on-site). + --- + S1109 | Other personal, cultural and recreational services. + --- + + + + +### Manufacturing Services + + + Category | Description + --- + S1701 | Payments for processing of goods. + --- + + + +## Prerequisites + +You must meet the following prerequisites to accept payments from your Indian customers: +- +- Foreign businesses with goods and services that can accept payments using this solution are: + + 1. Digital Goods + + 2. Digital Services + + 3. Online Travel Agencies (OTA) + + 4. Physical Goods + + 5. Travel + + 6. Education + +## How it Works + +Follow the steps given below to onboard and accept payments from Indian customers: + +1. Log in to the Dashboard. +2. Navigate to **Account & Settings**. +3. You must provide the Purpose Code information when applying for international payments. + 1. Click **International Payment Codes** under **International payment settings**. + ![International payment codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/firs-purpose-code-update-new.jpg.md) + 2. Update your purpose code under the **International Payment Codes** section. + ![Purpose code update](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/firs-purpose-code-update2-new.jpg.md) + 3. Select the appropriate **Purpose Code**. + + Based on your business requirements, you also need to provide your **HS Code** or **IEC Code**. + + + 1. Click **International Payment Codes** under **International payment settings**. + 2. Update your HS Code under the **International Payment Codes** section. + 3. Select the appropriate **Harmonised System Code**, also known as HS Code. + +> **INFO** +> +> +> **Handy Tips** +> - For Software: HSCode is **85238020** and HSDescription is **Other Information technology software**. +> - For Goods: Refer to the list from the [DGFT website](https://www.dgft.gov.in/CP/). +> + + + + 1. Click **International Payment Codes** under **International payment settings**. + 2. Update your **IEC Code** under the **International Payment Codes** section. + 3. Select the appropriate **Purpose Code**. + 4. Enter the 10-digit Importer/Exporter Code (IEC) and click **Next**. + ![Import Export Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/import-export-code.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> The IEC is a code issued by the Indian Director General of Foreign Trade (DGFT) to Indian companies that intend to export from India. You can apply for an IEC at the [DGFT website](https://www.dgft.gov.in/CP/). +> +> The IEC code input screen appears for specific purpose codes, (P0103) being one of them. +> + + + + +4. Review and click **Confirm**. The Razorpay Activation/Operations team verifies the selected **Purpose Code**. + +As consumers or buyers, you get an option to make payments through the Razorpay Payment Gateway. On selecting Razorpay, various payment methods will be displayed on Razorpay checkout to complete the payment. + +## List of Purpose Codes + +Download the complete list of transaction purpose codes you can select during the onboarding process. + +## Documents and Details Required + +Given below is a list of documents required: +1. The Import/Export code is required when selling tangible goods. +2. All import transactions should be accompanied by invoices. +3. Airway bill is mandatory to import goods if and when required. + +## Frequently Asked Questions (FAQs) + + +### 1. What is the pricing for using this solution? + + + + + +### 2. What is the settlement TAT for international payments? + + The default settlement cycle is as per applicable law(s). You can view your settlement cycle on the Razorpay Dashboard. + + + +### 3. Do you support multiple settlement currencies? + + The funds will be settled in your local currency. The list of currencies currently supported are: USD, SGD, AUD, CAD, EUR, GBP, HKD, INR and MYR for transactions originating from India. + + + +### 4. Do you need any bills/invoices from me? + + You should provide invoices for all your import transactions if and when asked. In the case of physical goods, you should also share the airway bill, along with the invoices. + + + +### 5. Which card networks do you support? Is support for certain networks limited by geographical region? + + For Indian customers, following card networks are supported: + - Visa + - Mastercard + - Diners + - Rupay + - Amex + - Discover + +> **WARN** +> +> +> **Watch Out!** +> +> To enable Diners and Discover cards, . +> +> + + + + +### 6. What if my end customer raises a dispute with Razorpay? + + The chargeback will be handled as-is, which means that a dispute is raised between networks/issuing banks and the business, and the chargeback is processed based on the final decision taken by the networks/banks involved. + + + +### 7. Are refunds supported on these transactions? + + Yes, Razorpay supports refunds. You can enable it via your existing refund integration with Razorpay or via the Dashboard. + + + +### 8. Is this feature available on all Razorpay integrations? + + Yes, this feature is available on all . + + + +### 9. Do we need to collect the PAN details from customers? + + Yes, PAN details from the customers are necessary for security approval. + + + +### 10. Is there any restriction on maximum transaction value? + + Yes, the maximum transaction value is restricted to USD 30k across all the supported payment methods. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration.md new file mode 100644 index 00000000..9f609525 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration.md @@ -0,0 +1,28 @@ +--- +title: Integrate With Razorpay Import Flow - Custom Integration +description: Steps to integrate with Import Flow for a seamless payment solution for International Businesses. +--- + +# Integrate With Razorpay Import Flow - Custom Integration + +Import Flow is a payment solution designed for International (non-Indian) businesses to accept payments from Indian customers without any additional paperwork or registration. + +Your Indian customers can make payments using local payment methods such as credit cards, debit cards, UPI and netbanking. The funds are settled in your overseas bank account. Know more about [Import Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers.md). + +> **INFO** +> +> +> +> **Feature Request** +> +> This is an on-demand feature. Please fill out the [form](https://form.typeform.com/to/C5OlR4YQ) to get this feature activated on your account. +> +> + +## Integration Steps + +Follow these integration steps: + +1. [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/build-integration.md) +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/test-integration.md) +3. [Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/go-live-checklist.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/build-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/build-integration.md new file mode 100644 index 00000000..bb8df9c1 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/build-integration.md @@ -0,0 +1,1100 @@ +--- +title: 1. Build Integration +description: Steps to integrate with Import Flow APIs for a seamless payment solution for International Businesses. +--- + +# 1. Build Integration + +Given below are the steps to integrate Razorpay Custom Checkout in your site: + +## 1.1 Create a Customer in Server + +Creating a customer generates a unique `customer_id` by collecting basic details such as name, email, and contact details. This `customer_id` must be included when creating a payment request to link the payment to the customer. Use the following API to create a customer. + +You can try out our APIs on the Razorpay Postman Public Workspace. Fork the workspace and test the APIs with your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +/customers + +```cURL: Curl + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "contact": "9123456780", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name","Gaurav Kumar"); +customerRequest.put("contact","9123456780"); +customerRequest.put("email","gaurav.kumar@example.com"); +customerRequest.put("fail_existing","0"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} + +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->create(array('name' => 'Gaurav Kumar', 'email' => 'gaurav.kumar@example.com','contact'=>'9123456780','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", "Gaurav Kumar"); +options.Add("contact", "9123456780"); +options.Add("email", "gaurav.kumar@example.com"); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({ + name: "Gaurav Kumar", + contact: 9123456780, + email: "gaurav.kumar@example.com", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +``` + +```json: Success +{ + "id": "cust_MpINfSkdEvtdxb", + "entity": "customer", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1697550382 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } +} +``` + + +### Request Parameters + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919123456780`. + + `email` _mandatory_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `fail_existing` _optional_ + : `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + `gstin` _optional_ + : `string` Customer's GST number, if available. + For example, `29XAbbA4369J1PA`. + + `notes` _optional_ + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `entity` + : `string` Indicates the type of entity. + + `name` + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `contact` + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919123456780`. + + `email` + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `gstin` + : `string` GST number linked to the customer. + For example, `29XAbbA4369J1PA`. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. Know how to [Generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + --- + Contact number should be at least 8 digits, including country code. | The contact number is less than 8 digits. | Enter contact number that meets the validation criteria. It should have at least 8 digits, including the country code. For example, "+919123456780". + + + +## 1.2 Create an Order in Server + +After a customer is created, an order needs to be generated using the Orders API. This order contains details such as the payment amount, currency, customer details, tax-related information and other custom notes. After the order is created, an `order_id` is generated, for example, `order_NGrgEcmYJsfUyl`. You must pass this `order_id` in the checkout code to associate this order with the payment. Learn more about [Order and Payment states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md#order-states). + +/orders + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 10000, + "currency": "INR", + "receipt": "receipt#1", + "customer_id": "cust_OwZZseNBf9Uqsi", + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "identity": [ + { + "type": "tax_id", + "id": "HSCPE4563G" + } + ] + }, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +``` + +```json: Success +{ + "amount": 10000, + "amount_due": 10000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1703569876, + "currency": "INR", + "entity": "order", + "id": "order_NGrgEcmYJsfUyl", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "receipt": "receipt#1", + "status": "created" +} + +```json: Failure - Amount +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} + +```json: Failure - Customer Name +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "customer name is invalid", + "metadata": {}, + "reason": "input_validation_failed", + "source": "business", + "step": "payment_initiation" + } +} + +```json: Failure - Address Line +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Address line 1 and line 2 can only contain aplhanumeric characters and limited special characters", + "metadata": {}, + "reason": "input_validation_failed", + "source": "business", + "step": "payment_initiation" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. Payment can only be made for this amount against the Order. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. For example, `INR`. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Can have a maximum length of 40 characters and has to be unique. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919123456780`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `identity` _optional_ + : `array` A list of identity objects containing customer identification details. + + `type` _optional_ + : `string` The type of identification document. For example, `tax_id`. + + `id` _optional_ + : `string` The identification number or value corresponding to the `type` provided. For example, `ABCDE1234F`. + +`notes` _optional_ +: `json object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + + + +### Response Parameters + + `amount` + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` Indicates the Unix timestamp when this order was created. + + `currency` + : `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + + `offer_id` + : `string` The unique identifier of the offer. For example, `offer_JHD834hjbxzhd38d`. + + `receipt` + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order changes to the `attempted` state following the first payment attempt and remains in this state until at least one payment is successfully processed and captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. + The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. + --- + The amount must be at least INR 1.00. | The amount specified is less than the minimum amount. Currency subunits, such as paise (in the case of INR), should always be greater than 100. | Enter an amount equal to or greater than the minimum amount, that is 100. + --- + The **field name** is required. | A mandatory field is missing. | Ensure all mandatory fields and values are present. + --- + Only english alphabets are allowed in customer name. | The customer name provided in the request contains characters other than English alphabets, such as numbers, special characters, regional language characters, or emojis. | Ensure that the name field in the request contains only English letters (A-Z, a-z) and meets the validation criteria: - Verify that the name does not include numerical characters, special characters (e.g., @, #, $, etc.), or non-Latin scripts. +- Confirm that there are no extra spaces at the beginning or end of the name. + + --- + Customer name should be between 5 and 50 characters. | The `name` field provided in the request does not meet the required character length. It is either shorter than 5 characters or exceeds 50 characters. | - Ensure that the `name` field in the request is between 5 and 50 characters long. +- Check that no extra spaces are included at the beginning or end of the name, which might affect the character count. + + --- + Customer name is invalid. | The `name` field provided in the request does not meet the validation requirements. This could be due to the presence of disallowed characters, such as special characters, numbers, regional language characters, or the use of non-Latin scripts. | - Ensure that the `name` field only contains English letters (A-Z, a-z) and spaces (not at the beginning). +- Verify that the name does not include special characters, numerical digits, emojis, or regional language characters. +- Check for unintended characters that may have been included by mistake (e.g., trailing spaces or special symbols). + + --- + Only English alphabet is allowed in City and State. | The `city` or `state` field in the request contains invalid characters such as numbers, special characters, or regional language text. | - Ensure that the `city` and `state` fields only contain English letters (A-Z, a-z) and spaces. +- Verify that these fields do not include numerical characters, special characters, or regional language scripts. + + --- + Address line 1 and line 2 can only contain alphanumeric characters and limited special characters. | The `Address line1` or `Address line2` field in the request contains invalid characters that are not allowed, such as unsupported symbols or regional language characters. | - Ensure that `Address line1` and `Address line2` only include alphanumeric characters (A-Z, a-z, 0-9) and allowed special characters (e.g., *&/-()#_+{}[]:'".,). +- Verify that no unsupported symbols or regional language scripts are included. + + + + +## 1.3 Fetch Payment Methods + +When creating a custom checkout form, display only the activated methods to the customer. Use the below methods to fetch all payments methods available to you: + +```js: Request +var razorpay = new Razorpay({ + key: '', + // logo, displayed in the popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}); +razorpay.once('ready', function(response) { + console.log(response.methods); +}) +```js: Response +{ + "methods": { + "entity": "methods", + "card": true, + "debit_card": true, + "credit_card": true, + "prepaid_card": true, + "card_networks": { + "AMEX": 0, + "DICL": 1, + "MC": 1, + "MAES": 1, + "VISA": 1, + "JCB": 1, + "RUPAY": 1, + "BAJAJ": 0 + }, + "amex": false, + "netbanking": { + ... + ... + "HDFC": "HDFC Bank", + "ICIC": "ICICI Bank" + ... + ... + }, + "wallet": { + "payzapp": true + }, + "emi": true, + "upi": true, + "cardless_emi": [], + "paylater": [], + "emi_subvention": "customer", + "emi_options": { + ... + ... + "ICIC": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 150000 + }, + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 150000 + } + ...// rest of the emi plans + ], + "HDFC": [ + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 300000 + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 300000 + } + ... + ...// rest of the emi plans + ] + } + } +} +``` + +Know more about the various [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) offered by Razorpay. + +## 1.4 Invoke Checkout and Pass Order Id and Other Options + + +### 1.4.1 Include JavaScript code in your Webpage + +Include the following script, preferably in the `` section of your page: + +```html: Index HTML + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Include the script from `https://checkout.razorpay.com/v1/razorpay.js` instead of entering a copy from your server. This allows the library's new updates and bug fixes to fit your application automatically. +> - We always maintain backward compatibility with our code. +> + + + + +### 1.4.2 Instantiate Custom Checkout + +You can instantiate single instance or multiple instances of Custom Checkout on the same page. + +```js: Invoke a Single Instance +var razorpay = new Razorpay({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}); + +```js: Invoke Multiple Instances +Razorpay.configure({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}) +new Razorpay({}); // will inherit key and image from above. +``` + + + Request parameters + + While building a custom UI for accepting payments from your customers, you should be familiar with the fields supported in the `razorpay.js` script. + + `key` _mandatory_ + : `string` API Key ID generated from **Dashboard** → **Account & Settings** → [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + `image` _optional_ + : `string` Link to an image (usually your business logo) shown in the Checkout form. Can also be a **base64** string, if loading the image from a network is not desirable. + + + + + +### 1.4.3 Submit Payment Details + +After creating an order and obtaining the customer's payment details, send the information to Razorpay to complete the payment. You can do this by invoking `createPayment` method. The data that needs to be submitted depends on the customer's payment method. + +Know more about [sample codes for various payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md) and [supported payment methods](#supported-payment-methods). + +```js: createPayment with handler function +var data = { + amount: 1000, // in currency subunits. + currency: "",// Default is INR. We support more than 90 currencies. + email: '', + contact: '', + customer_id: 'cust_MpINfSkdEvtdxb', + notes: { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp", + }, + order_id: 'order_NGrgEcmYJsfUyl',// Replace with Order ID generated in Step 4 + method: 'netbanking', + + // method specific fields + bank: 'YESB' +}; + +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on('payment.success', function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + + razorpay.on('payment.error', function(resp){alert(resp.error.description)}); // will pass error object to error handler + +}) + +```js: createPayment with callback URL +var data = { + callback_url: 'https://www.examplecallbackurl.com/', + amount: 1000, // in currency subunits. + currency: "",// Default is INR. We support more than 90 currencies. + email: '', + contact: '', + customer_id: 'cust_MpINfSkdEvtdxb', + notes: { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp", + }, + order_id: 'order_NGrgEcmYJsfUyl',// Replace with Order ID generated in Step 4 + method: 'netbanking', + + // method specific fields + bank: 'HDFC' +}; + +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + +}) +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - The `invoice_number` field is mandatory for all payment methods. Ensure each payment has a unique invoice number. +> - The `createPayment` method should be called within an event listener triggered by user action to prevent the popup from being blocked. For example: +> + +> ```js +> $('button').click( function (){ razorpay.createPayment(...) }) +> ``` +> + + + Supported Payment Methods + + Following payment methods are supported under the Import Flow: + - Netbanking + - UPI + - Cards + - [Recurring](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments.md) + + For recurring payments, additional integration is needed. Cards, UPI, and UPI with TPV are supported as a payment methods. + + + +### Handler Function or Callback URL + +You can use Handler Function or Callback URL to send the payment details to us. Following is the difference between them. + + + + When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. + + + + + When you use a callback URL, Razorpay makes a post call to the callback URL, with the `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` in the response object of the successful payment (`razorpay_payment_id` and `razorpay_order_id`). + + + + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `10000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. For example, `INR`. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`email` _mandatory_ +: `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + +`contact` _mandatory_ +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919123456780`. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer. + +`description` _optional_ +: `string` Description of the product shown in the Checkout form. It must start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown in the Checkout form. Can also be a **base64** string, if loading the image from a network is not desirable. + +`order_id` _mandatory_ +: `string` Order ID generated via the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`method` _mandatory_ +: `string` The payment method used by the customer on Checkout. +Possible values: + - `card` (default) + - `upi` (default) + - `netbanking` (default) + - `wallet` (default) + - `emi` (default) + - `cardless_emi` (requires [approval](https://razorpay.com/support/#request)) + - `paylater` (requires [approval](https://razorpay.com/support/#request)) + - `emandate` (requires [approval](https://razorpay.com/support/#request)) + +`card` _mandatory if method=card/emi_ +: `object` The details of the card that should be entered while making the payment. + + `number` + : `integer` Unformatted card number. + + `name` + : `string` The name of the cardholder. + + `expiry_month` + : `integer` Expiry month for card in MM format. + + `expiry_year` + : `integer` Expiry year for card in YY format. + + `cvv` + : `integer` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `emi_duration` + : `integer` Defines the number of months in the EMI plan. + +`bank_account` _mandatory if method=emandate_ +: The details of the bank account that should be passed in the request. These details include bank account number, IFSC code and the name of the customer associated with the bank account. + + `account_number` + : `string` Bank account number used to initiate the payment. + + `ifsc` + : `string` IFSC of the bank used to initiate the payment. + + `name` + : `string` Name associated with the bank account used to initiate the payment. + +`bank` _mandatory if method=netbanking_ +: `string` Bank code. List of available banks enabled for your account can be fetched via [**methods**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#fetch-supported-methods). + +`wallet` _mandatory if method=wallet_ +: `string` Wallet code for the wallet used for the payment. Possible values: + - `payzapp` (default) + - `olamoney` (requires [approval](https://razorpay.com/support/#request)) + - `phonepe` (requires [approval](https://razorpay.com/support/#request)) + - `airtelmoney` (requires [approval](https://razorpay.com/support/#request)) + - `mobikwik` (requires [approval](https://razorpay.com/support/#request)) + - `jiomoney` (requires [approval](https://razorpay.com/support/#request)) + - `amazonpay` (requires [approval](https://razorpay.com/support/#request)) + - `paypal` (requires [approval](https://razorpay.com/support/#request)) + - `phonepeswitch` (requires [approval](https://razorpay.com/support/#request)) + +`provider` _mandatory if method=cardless_emi/paylater_ +: `string` Name of the cardless EMI provider partnered with Razorpay. + + Available options for Cardless EMI (requires [approval](https://razorpay.com/support/#request)): + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `zestmoney` + - `earlysalary` + - `walnut369` + + Available options for Pay Later: + - `lazypay` + - `paypal` + +`vpa` _mandatory if method=upi_ +: `string` UPI ID used for making the payment on the UPI app. + + +> **WARN** +> +> +> **Deprecation Notice** +> +> UPI Collect is deprecated effective 28 February 2026. This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [ migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md) to switch to UPI Intent. +> + +`callback_url` _optional_ +: `string` The URL to which the customer must be redirected upon completion of payment. The URL must accept incoming `POST` requests. The callback URL will have `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` as the request parameters for a successful payment. + +`redirect` _conditionally mandatory_ +: `boolean` Determines whether customer should be redirected to the URL mentioned in the +`callback_url` parameter. This is mandatory if `callback_url` parameter is used. Possible values: + - `true`: Customer will be redirected to the `callback_url`. + - `false`: Customer will not be redirected to the `callback_url` + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the invoice generated. Ensure each payment has a unique invoice number. + + `goods_description` _mandatory_ + : `string` Description of the goods. For example, `Digital Lamp`. + + + + + +## 1.5 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + +### Failure Response + +A failed payment returns an error response. + +```json: Sample Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect otp", + "field": null, + "source": "customer", + "step": "payment_authentication", + "reason": "invalid_otp", + "metadata": { + "payment_id": "pay_EDNBKIP31Y4jl8", + "order_id": "order_DBJKIP31Y4jl8" + } + } +} +``` + +Know more about [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md). + + +## 1.6 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +## 1.7 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/test-integration.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/business-onboarding.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/business-onboarding.md new file mode 100644 index 00000000..02581e56 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/business-onboarding.md @@ -0,0 +1,303 @@ +--- +title: Onboarding Documents for Razorpay Import Flow +description: List of Documents required for non-Indian companies and business types to onboard with Razorpay Import Flow. +--- + +# Onboarding Documents for Razorpay Import Flow + +Import Flow is a payment solution designed for International (non-Indian) businesses to accept payments from Indian customers. + +Your Indian customers can make payments using local payment methods such as UPI, credit cards, debit cards and netbanking. The funds are settled in your overseas bank account. Know more about [Import Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers.md). + +> **INFO** +> +> +> +> **Onboarding Request** +> +> Please fill out the [form](https://form.typeform.com/to/C5OlR4YQ) to sign up. Someone from our team will reach out to get this service activated on your account. +> + +> **WARNING** +> +> +> **Handy Tips** +> +> - SWIFT-enabled bank account is mandatory for international settlements. +> - All sections such as Privacy Policy, Pricing, About Us, Contact Us, Refund Policy and Shipping Policy (if selling physical goods) of your website must be updated with accurate and current information before submission. +> + +Below are the onboarding documents required for companies and businesses to activate Razorpay's Import Flow. + +## Document Categories + + +### KYC Documents Required for Account Activation + + + Document Type | Required Documents | Important Notes + --- + Bank Statement | Bank statement showing bank account information | SWIFT Code should be clearly visible. + --- + Proof of Identity of Authorised Signatory | Passport/Driving license of Authorised Signatory | Address must be clearly visible. + --- + Proof of Address of Authorised Signatory | Passport/Driving license of Authorised Signatory | Address must be clearly visible. + --- + Authorisation Documents | Power of Attorney or Board Resolution | Must explicitly authorise signatory for Razorpay services. + --- + Company Registration | Certificate of Incorporation | Must show complete company name and registration number. + + + +## Board Resolution Template or Power of Attorney + +- A Board Resolution is a formal record of the directors' approval granting that authority. +- A Power of Attorney is a legal document that allows someone to act or sign on behalf of a company. + + +### This template includes: + +- Explicit authorisation for international payment acceptance. +- Clear designation of authorised signatory for Razorpay Merchant Services. +- Authority to link bank accounts and handle transactional matters. +- Authority to submit KYC documentation and compliance requirements. + +Refer to the Board Resolution Template. + +> **INFO** +> +> +> **Handy Tip** +> +> The Board Resolution must explicitly mention Razorpay Merchant Services and authorisation for accepting international payments in India. Use the template and customise it with your company details. +> + + + +## Purpose Codes for International Transactions + +When accepting payments from Indian customers, you must select the appropriate purpose code. This code is mandatory per RBI regulations and categorises the nature of your transaction. + + +### Import (Goods) + + + Category | Description + --- + S0101 | Advance payment against imports made to countries other than Nepal and Bhutan. + --- + S0102 | Payment towards imports - settlement of invoice other than Nepal and Bhutan. + --- + S0103 | Imports by diplomatic missions other than Nepal and Bhutan. + --- + S0104 | Intermediary trade/transit trade, that is third country export passing through India. + --- + S0108 | Goods acquired under merchanting/payment against import leg of merchanting trade. + --- + + + + +### Transport Services + + + Category | Description + --- + S0201 | Payments for surplus freight/passenger fare by foreign shipping companies operating in India. + --- + S0202 | Payment for operating expenses of Indian shipping companies operating abroad. + --- + S0203 | Freight on imports - Shipping companies. + --- + S0204 | Freight on exports - Shipping companies. + --- + S0205 | Operational leasing/rental of vessels (with crew) - Shipping companies. + --- + S0206 | Booking of passages abroad - Shipping companies. + --- + S0207 | Payments for surplus freight/passenger fare by foreign airlines companies operating in India. + --- + S0208 | Operating expenses of Indian airlines companies operating abroad. + --- + S0209 | Freight on imports - Airlines companies. + --- + S0210 | Freight on exports - Airlines companies. + --- + S0211 | Operational leasing/rental of vessels (with crew) - Airline companies. + --- + S0212 | Booking of passages abroad - Airlines companies. + --- + S0214 | Payments on account of stevedoring, demurrage and port handling charges (Shipping companies). + --- + S0215 | Payments on account of stevedoring, demurrage and port handling charges (Airlines companies). + --- + S0216 | Payments for passenger - Shipping companies. + --- + S0217 | Other payments by shipping companies. + --- + S0218 | Payments for passenger - Airlines companies. + --- + S0219 | Other payments by airlines companies. + --- + S0220 | Payments on account of freight under other modes of transport (Internal waterways, roadways, railways, pipeline transports and others). + --- + S0221 | Payments on account of passenger fare under other modes of transport (Internal waterways, roadways, railways, pipeline transports and others). + --- + S0222 | Postal and courier services by air. + --- + S0223 | Postal and courier services by sea. + --- + S0224 | Postal and courier services by others. + --- + + + + +### Travel Services + + + Category | Description + --- + S0301 | Business travel. + --- + S0303 | Travel for pilgrimage. + --- + S0304 | Travel for medical treatment. + --- + S0305 | Travel for education (including fees and hostel expenses). + --- + S0306 | Other travel (including holiday trips and payments for settling international credit cards transactions). + --- + + + + +### Insurance and Pension Services + + + Category | Description + --- + S0601 | Life insurance premium except term insurance. + --- + S0602 | Freight insurance - relating to import and export of goods. + --- + S0603 | Other general insurance premium including reinsurance premium and term life insurance premium. + --- + S0605 | Auxiliary services including commission on insurance. + --- + S0607 | Insurance claim settlement of non-life insurance and life insurance (only term insurance). + --- + S0608 | Life insurance claim settlements. + --- + S0610 | Premium for pension funds. + --- + S0611 | Periodic pension entitlements for example monthly, quarterly or yearly payments of pension amounts by Indian pension fund companies. + --- + + + + +### Telecommunication, Computer and Information Services + + + Category | Description + --- + S0801 | Hardware consultancy/implementation. + --- + S0802 | Software consultancy/implementation. + --- + S0803 | Database, data processing charges. + --- + S0804 | Repair and maintenance of computer and software. + --- + S0805 | News agency services. + --- + S0806 | Other information services - Subscription to newspapers and periodicals. + --- + S0807 | Off-site software imports. + --- + S0808 | Telecommunication services including electronic mail services and voice mail services. + --- + + + + +### Other Business Services + + + Category | Description + --- + S1003 | Operational leasing services (other than financial leasing) without operating crew, including charter hire - Airlines companies. + --- + S1004 | Legal services. + --- + S1005 | Accounting, auditing, book-keeping services. + --- + S1006 | Business and management consultancy and public relations services. + --- + S1007 | Advertising, trade fair service. + --- + S1008 | Research and development services. + --- + S1009 | Architectural services. + --- + S1013 | Environmental services. + --- + S1014 | Engineering services. + --- + S1015 | Tax consulting services. + --- + S1016 | Market research and public opinion polling service. + --- + S1017 | Publishing and printing services. + --- + S1020 | Commission agent services. + --- + S1021 | Wholesale and retailing trade services. + --- + S1022 | Operational leasing services (other than financial leasing) without operating crew, including charter hire - Shipping companies. + --- + S1023 | Other technical services including scientific/space services. + --- + + + + +### Personal, Cultural and Recreational Services + + + Category | Description + --- + S1101 | Audio-visual and related services like motion picture and video tape production, distribution and projection services. + --- + S1103 | Radio and television production, distribution and transmission services. + --- + S1104 | Entertainment services. + --- + S1105 | Museums, library and archival services. + --- + S1106 | Recreation and sporting activities services. + --- + S1107 | Education (for example fees for correspondence courses abroad). + --- + S1108 | Health service (payment towards services received from hospitals, doctors, nurses, paramedical and similar services rendered remotely or on-site). + --- + S1109 | Other personal, cultural and recreational services. + --- + + + + +### Manufacturing Services + + + Category | Description + --- + S1701 | Payments for processing of goods. + --- + + + +### Related Information + +[Accept International Payments From Indian Customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/faqs.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/faqs.md new file mode 100644 index 00000000..983a787f --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/faqs.md @@ -0,0 +1,221 @@ +--- +title: Frequently Asked Questions +description: Troubleshoot common error scenarios and find answers to frequently asked questions about Import Flow integration. +--- + +# Frequently Asked Questions + +## Common + + +### 1. What payment methods does Razorpay support for my customers? + + Razorpay supports a comprehensive range of payment methods including UPI, Netbanking, Credit/Debit Cards (Visa, Mastercard, RuPay, Diners Club, American Express) and Recurring Payments to provide your customers with maximum payment flexibility. + + + +### 2. Do you offer no-code payment solutions or simple integration options? + + Currently, we do not offer a no-code payment button solution. However, our payment gateway integration requires minimal coding effort, and our technical team handles all the complex backend processing. If you are looking for low-code solutions, you can explore [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md) or [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md), depending on your use case and eligibility. These options allow you to start accepting payments with minimal setup. + + To understand the customer checkout experience, try our [interactive demo](https://razorpay.com/demopg3/). To get started with integration, refer to our [integration guide](https://razorpay.com/docs/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/build-integration/). + + + +### 3. Can Razorpay handle recurring payments for subscription-based businesses? + + Yes, under the recurring payments model, you can charge the customer any amount up to the maximum mandate limit, based on the customer's usage. However, increasing the maximum mandate amount is not permitted as per regulations. To charge a higher amount, you must create a new mandate with the revised limit. + + + +### 4. Does Razorpay support pro-rated billing when customers upgrade or downgrade subscription plans? + + Yes, you can request mandate updates whenever customers need to upgrade or downgrade their subscription plans, enabling flexible billing management for your business. + + + +### 5. What dispute and chargeback management tools does Razorpay provide? + + Razorpay provides comprehensive dispute management tools including a dedicated dashboard to track all dispute cases, automated email notifications with detailed transaction information and an online portal for submitting supporting evidence. Additionally, you can configure webhook notifications to receive real-time alerts about dispute status changes. Know more about [disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md). + + + +### 6. How does Razorpay handle customer refunds? + + Razorpay supports both full and partial refunds that you can process instantly through our merchant dashboard or via API integration. This gives you complete control over your refund operations. Know more about [refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md). + + + +### 7. Can I track transactions in real-time? + + Yes, Razorpay provides comprehensive real-time transaction monitoring through our dashboard, API endpoints, and webhook notifications. You can instantly track payment statuses, settlements, refunds and all transaction activities as they occur. + + + +### 8. What business analytics and reporting tools are available? + + The Razorpay merchant dashboard provides detailed visibility into your transaction data, payment status tracking, visual charts, and comprehensive business insights. You can also configure custom reports tailored to your business needs. Explore our [dashboard features](https://razorpay.com/docs/payments/dashboard/) for complete details. + + + +### 9. What communications will my customers receive from Razorpay? + + Your customers will receive email confirmations upon successful payment completion. For recurring payments, we send SMS notifications 24 hours before scheduled debits to keep customers informed about upcoming charges. + + + +### 10. Is Razorpay compliant with financial security standards? + + Yes, Razorpay is PCI-DSS compliant, ensuring the highest standards of payment security. We are also licensed and regulated by the Reserve Bank of India as a Payment Aggregator - Payment Gateway (PA PG) and Payment Aggregator - Cross Border (PA CB), providing you with complete regulatory compliance. + + + +### 11. Can international merchants access all Razorpay features? + + Yes, international merchants have full access to all Razorpay features including the merchant dashboard, dispute management functionality, and all payment processing capabilities. You do not need to be an Indian-registered business to access these features and the dashboard is available regardless of your business location. + + + +### 12. What are the requirements for setting up a Razorpay account and going live + + To go live with Razorpay, your website must include essential business pages: + - Bank Statement + - Passport of Authorised Signatory + - Board Resolution + - Certificate of Incorporation. + + + +### 13. Can I disable the email notifications that Razorpay sends to my customers for successful payments and refunds? + + Yes, you can control customer email notifications. For Server-to-Server (S2S) integrations, you can disable email notifications by setting the `email` parameter to "false" under the `notify` object in your API request. Refer to our [Payment Links customisation documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/customise-payment-methods.md) for more details. Alternatively, you can contact our [support team](https://razorpay.com/support/) to have this setting configured for your account. + + +## Anti-Money Laundering + + +### 1. Why are certain transactions being flagged for AML? + + Transactions are flagged by our Authorised Dealer (AD) bank's compliance team during mandatory AML checks. Screening is usually based on name matches with sanction/watchlists (OFAC, UN, EU, UK and internal/government lists). If there is a potential match, the bank requests additional information (for example, date of birth, place of birth, address, nationality). + + + +### 2. What information may be requested for flagged transactions? + + Depending on the case, banks may request the following information: + + - **For Individuals**: Full name, address, date of birth, place of birth, national id, passport number, nationality, citizenship. + + - **For Entities**: Full Name, registered address, nature of business, ownership with percentages, website, purpose of payment. + + + +### 3. What happens if we do not provide the requested details? + + The bank cannot settle the transaction without the required details. Funds are kept on hold and may eventually be reported to the Government as unclaimed. Customers are not automatically refunded. If required, refunds must be initiated by the platform/business (possibly up to 6 months). + + + +### 4. Will customers be refunded automatically if a transaction is rejected? + + No. Funds are not refunded automatically. Business/platforms may choose to initiate a refund to the customer. If information is provided later (even after the timeline), we can attempt to re-settle the transaction with the bank. + + + +### 5. What short-term measures can reduce AML flags? + + Mandating full names (first and last) at checkout reduces flagged transactions by 50%. Collecting date of birth at checkout reduces false positives by 70%+. Address capture, wherever possible, can also help. + + + +### 6. What are the long-term solutions? + + Razorpay is building real-time AML detection for the following: + + - **Hosted Checkout**: Users are asked for additional info (DOB and so on.) only if flagged. + + - **API/S2S flows**: The AML risk score is shared in the create order API response. + + + +### 7. What are the integration options for handling AML? + + a. **Fail upfront**: Razorpay fails orders at the create order API stage if a likely AML flag is detected. + + b. **Risk Score**: Razorpay provides a risk score. The partner can request DOB or block the order. + + c. **Post-flag data collection**: Partner collects additional information only for flagged cases and shares via API (PATCH Order). + + + +### 8. How quickly can AML solutions be enabled? + + Pre-screening/fail-at-order can be enabled within 1 business day of request. Reports on AML-flagged/fail transactions are currently shared manually (T+2), with automation in progress. + + + +### 9. Who bears liability if users refuse to share AML information? + + If AML information is not provided, the bank will not settle the funds. The platform/business can refund the user to revoke access to the service/product. Funds that are not refunded remain on hold until settled or reported to authorities. + + + +### 10. Are there cultural concerns in collecting DOB? + + In India, collecting DOB for payment verification is common and acceptable. However, in some geographies (for example, Japan), DOB collection may face user friction. In such cases, partners can rely on full name and address improvements to reduce AML hits while selectively using DOB collection only when flagged. + + +## Invoice Collection and Secure File Transfer Protocol (SFTP) + + +### 1. What key format should I use to upload invoices? + + You must use one of the supported SSH key formats mentioned in our documentation. Using an unsupported or incorrectly formatted key will result in authentication failure. + + **Supported formats**: + - RSA (2048-bit or higher). For example, `ssh-rsa`. + - ECDSA. For example, `ssh-ecdsa`. + - Ed25519. For example, `ssh-ed25519`. + + Ensure your public key is in the correct format before sharing it with Razorpay. + + + +### 2. Can I access the SFTP from any IP address? + + No. You can whitelist a maximum of 4 IP addresses. SFTP access will work only from the whitelisted IPs. Attempting to connect from any other IP address will result in connection failure. + + + +### 3. Which key should I use to access Razorpay's SFTP? + + You must use your private key to authenticate whilst connecting to Razorpay's SFTP. + + - **Public key**: Uploaded to Razorpay. + - **Private key**: Used by you to access SFTP. + + Never share your private key with anyone. If you have multiple public keys configured with Razorpay, ensure you use the correct corresponding private key for authentication. + + + +### 4. What is the correct folder path to upload invoices? + + Invoices must be uploaded to the following directory structure: + + `/invoiceUpload/automated///` + + For example: + `/invoiceUpload/automated/MDoeHNNpi0nB7m/2025-05-10/INV_09876.pdf` + + **Important**: + - You must include your Merchant ID (MID) in the path. + - You must include the date folder in `YYYY-MM-DD` format. + - Missing either component will result in upload failure. + + + +### 5. Can I delete or modify the uploaded invoices? + + No. Once an invoice is uploaded, it becomes read-only and cannot be edited, renamed or deleted via SFTP. This ensures invoice integrity and compliance with audit requirements. + + If you need to correct an invoice, upload a new file with a different invoice number. Do not attempt to upload the same invoice multiple times to the same path. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/go-live-checklist.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/go-live-checklist.md new file mode 100644 index 00000000..dfbbc3ba --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/go-live-checklist.md @@ -0,0 +1,49 @@ +--- +title: 3. Go-live Checklist +description: Check the go-live checklist for Razorpay Payment Gateway Custom Web integration. +--- + +# 3. Go-live Checklist + +Consider these steps before taking the integration live. + +## 1. Accept Live Payments + +You can perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. However, make sure that you **swap the Test API Key with the Live Key**. + +To generate an API Key in Live Mode: + +1. Log in to the Dashboard and switch to **Live Mode** on the menu. +2. Navigate to **Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +3. Download the keys and save them securely. +4. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + +## 2. Payment Capture + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/invoice-collection.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/invoice-collection.md new file mode 100644 index 00000000..30fc51b5 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/invoice-collection.md @@ -0,0 +1,191 @@ +--- +title: Invoice Collection +description: Automate invoice uploads and buyer details with seamless SFTP integration. +--- + +# Invoice Collection + +> **WARN** +> +> +> **Watch Out!** +> +> 1. Invoice collection is mandatory for any import payment to be eligible for settlement. +> 2. Turnaround Time (TAT) for settlement begins **only after a valid invoice** is uploaded. +> 3. Ensure each invoice contains the following details: +> - Unique invoice number (Partner's invoice ID or Razorpay Order ID). +> - Partner's or business name. +> - Partner's or business address. +> - Customer's complete address. +> - Description of goods/services. +> - Units sold (time period, quantity and so on). +> - Amount in INR (2 decimal places only. For example, ). +> - Taxes applied. +> + +## Invoice Submission via SFTP + +You can automate invoice uploads using **Secure File Transfer Protocol (SFTP)**, enabling streamlined, secure file transfer. + +### Steps to Connect with Razorpay via SFTP + + +### 1. Share Your Public Key + + - Required for setting up SFTP credentials and folder access. + - Submit your SSH public key to your Razorpay point of contact. + - **Supported SSH key formats**: + - RSA (2048-bit or higher). For example, `ssh-rsa`. + - ECDSA. For example, `ssh-ecdsa`. + - Ed25519. For example, `ssh-ed25519`. + - Ensure your key is in the correct format. Using an unsupported or incorrectly formatted key will result in authentication failure. + + +> **WARN** +> +> +> **Watch Out!** +> +> Never share your private key with anyone. Only the public key should be provided to Razorpay. +> + + + + +### 2. IP Whitelisting + + - Only requests from your whitelisted IPs will be accepted. + - Share a list of authorised outbound IPs to enable secure access. + - Maximum of 4 IP addresses can be whitelisted. + - SFTP access will work only from the whitelisted IPs. Attempting to connect from any other IP address will result in connection failure. + + + +### 3. Credentials & Access Details + + - Razorpay will provide: + - Hostname: `sftp.razorpay.com` + - Port: `22` + - Username + - Path prefix (based on your `MID`) + - Use your **private key** (corresponding to the public key you shared) to authenticate while connecting to Razorpay's SFTP. + - Use an SFTP client to connect. + - **Test your connection**: Run `telnet sftp.razorpay.com 22` to verify connectivity before attempting SFTP access. + + +## How to Share Invoices via SFTP + + +### File Path Format + +Use the following folder and file structure: +"/invoiceUpload/automated//YYYY-MM-DD/InvoiceNumber.pdf." + +For example: `/invoiceUpload/automated/MDoeHNNpi0nB7m/2025-05-10/INV_09876.pdf` + +> **WARN** +> +> +> **Watch Out!** +> +> - You must include your Merchant ID (MID) in the path. +> - You must include the date folder in `YYYY-MM-DD` format. +> - Missing either component will result in upload failure. +> - Once uploaded, invoices become read-only. You cannot edit, rename or delete files after you upload. +> - Do not attempt to upload the same invoice multiple times to the same path. +> + + + + +### File Types and Flows + +Direction | Filename Format | Description +--- +Client → Razorpay | `InvoiceNumber.pdf` | Inbound File: This will be the invoices submitted by you to Razorpay. It should always be in PDF format. Example: `INV_09876.pdf` + + + +## Invoice ID Validation Process + +Razorpay enforces strong validation rules to prevent duplicate or invalid invoice usage. + + +### Successful Payments + + - **Status**: `Captured` + - **Invoice Action**: Permanently blocked + - **Note**: Same invoice ID cannot be reused. + + + +### Failed Payments + + - **Status**: `Failed` + - **Invoice Action**: Released + - **Note**: Invoice ID can be reused. + + + +### Payments in Intermediate States + + - **Status**: `Created` or `Authorised` + - **Invoice Action**: Temporarily blocked + - **Note**: Invoice ID is reusable only after final status (`Failed` or `Captured`) is reached. + + +### Refunded Payments + + +### Auto-Refunded (Never Captured) + + - **Status**: `Refunded` + - **Action**: Invoice ID is released. + - **Note**: ID can be reused. + + + +### Merchant-Initiated Refund (Post-Capture) + + - **Status**: `Refunded` + - **Action**: Invoice ID is permanently blocked. + - **Note**: Cannot be reused. + + +Partial capture scenarios are not validated by default. Contact Razorpay [Support team](https://razorpay.com/support/). + +## AML Screening Process + +As per RBI regulations, payments to offshore accounts must undergo AML (Anti-Money Laundering) checks by Razorpay's Authorised Dealer (AD) Bank. + + +### Daily AML Communication + + - You will receive daily emails listing transactions **flagged** for additional details. + - **Subject Line**: `Additional Details Required - [Business Name]_MDoeHNNpi0nB7m`. + + + +### Turnaround Time + + - Share required information within **5 working days** to avoid auto-cancellation. + - Information may include: Full name, address, ownership, percentage of ownership, nature of business, purpose of payment, business website, company, date of birth/incorporation, place of birth/incorporation and so on. + + + +### Consequences of Delay + + Missing TAT results in: + - Razorpay lien-marking the funds or + - Refund initiation via Dashboard/API. + + +## Best Practices for Invoice IDs + +To ensure seamless experience and compliance: + +- **Always generate unique invoice IDs** per payment. +- Acceptable IDs: + - Razorpay `order_id`. + - Your internal unique invoice number. +- Do not reuse invoice IDs for different transactions unless the original payment has failed. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments.md new file mode 100644 index 00000000..9390cda8 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments.md @@ -0,0 +1,46 @@ +--- +title: Import Flow Recurring Payments API +description: Integrate Import Flow Recurring Payments using Razorpay APIs. +--- + +# Import Flow Recurring Payments API + +Import Flow is a payment solution designed for International (non-Indian) businesses to accept payments from Indian customers without any additional paperwork or registration. + +Your Indian customers can make recurring payments via local payment methods such as cards and UPI. The funds are settled in your overseas bank account. Know more about [Import Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers.md). + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Integration Steps + +Follow these integration steps: + +### Cards + +1. [Create the Authorisation Transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/cards/authorization-transaction.md) +2. [Fetch and Manage Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/cards/tokens.md) +3. [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/cards/subsequent-payments.md) + +### UPI + +1. [Create the Authorisation Transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi/authorization-transaction.md) +2. [Fetch and Manage Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi/tokens.md) +3. [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi/subsequent-payments.md) + +### UPI with TPV + +1. [Create the Authorisation Transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi-tpv/authorization-transaction.md) +2. [Fetch and Manage Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi-tpv/tokens.md) +3. [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi-tpv/subsequent-payments.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/cards/authorization-transaction.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/cards/authorization-transaction.md new file mode 100644 index 00000000..a02db75c --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/cards/authorization-transaction.md @@ -0,0 +1,588 @@ +--- +title: 1. Create the Authorisation Transaction +description: Create an authorisation transaction for cards using Razorpay APIs. +--- + +# 1. Create the Authorisation Transaction + +Given below are the steps to create an authorisation transaction using the Razorpay APIs. + +## 1.1 Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + +### Request Parameters + + `name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + + +## 1.2 Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +```cURL: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id": "cust_N8fv8Nftx5hato", + "method": "card", + "token": { + "max_amount": 100000000, + "expire_at": 1709971120, + "frequency": "monthly" + }, + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + } +}' +```json: Response +{ + "amount": 1000, + "amount_due": 1000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1707389202, + "currency": "INR", + "entity": "order", + "id": "order_NYMDbygGb1DuDd", + "method": "card", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + }, + "offer_id": null, + "receipt": "Receipt No. 1", + "status": "created", + "token": { + "expire_at": 1709971120, + "max_amount": 100000000 + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _optional_ +: `string` Payment method used to make the authorisation transaction. Here, it is `card`. + +`token` +: `object` Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be auto-debited in a single charge. The minimum value is `100` (₹1), and the maximum value is `100000000` (₹10,00,000). For an amount higher than this or the RBI limit of ₹15,000 (`1500000`), the cardholder should provide an Additional Factor of Authentication (AFA) as per RBI guidelines. + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The card's expiry year is considered a default value. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `weekly` + - `monthly` + - `yearly` + - `as_presented` + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + -` 1`: If the user is logged into the account. + - `0`: If the user is on guest + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`method` +: `string` Payment method used to make the authorisation transaction. Here, it is `card`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + +`token` +: `object` Details related to the authorisation such as max amount and bank account information. + + `expire_at` + : `integer` The Unix timestamp to indicate till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. The default value is 10 years for `emandate`. This value can range from the current date to 31-12-2099 (`4102444799`). + + `max_amount` + : `integer` The maximum amount in paise a customer can be charged in a transaction. The value can range from `500` to `100000000`. The default value is `9999900` (₹99,999). + +You can create a payment against the `order_id` after you create an order. + + +## 1.3 Create an Authorisation Payment + +> **INFO** +> +> +> **Handler Function vs Callback URL** +> +> - **Handler Function**: +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL**: +> +When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. +> + +```html: Custom checkout with handler functions + + + Pay + + const btn = document.querySelector("#btn"); + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + razorpay.once("ready", function(response) { + console.log(response.methods); + }) + var data = { + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR",// Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": "1", + "save": 1, + "consent_to_save_card": 1, + "method": "card", + "card[name]": "Gaurav Kumar", + "card[number]": "5104015555555558", + "card[cvv]": "123", + "card[expiry_month]": "10", + "card[expiry_year]": "25" + }; + btn.addEventListener("click", function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); // will pass error object to error handler + }) + + +```html: Custom checkout with Callback URL + + + Pay + + const btn = document.querySelector("#btn"); + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + razorpay.once("ready", function(response) { + console.log(response.methods); + }) + var data = { + "callback_url": "www.example-callback-url.com", + "amount": 100, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR",// Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": "1", + "save": 1, + "consent_to_save_card": 1, + "method": "card", + "card[name]": "Gaurav Kumar", + "card[number]": "5104015555555558", + "card[cvv]": "123", + "card[expiry_month]": "10", + "card[expiry_year]": "25" + }; + btn.addEventListener("click", function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + }) + + +``` + + +### Additional Checkout Fields + +You should send the following additional parameters along with the existing checkout options as a part of the authorisation transaction. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +`recurring` _mandatory_ +: `string` Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this when you want to support **recurring payments** and **one-time payment** in the same flow. + +`save` _mandatory_ +: `integer` Indicates whether to save the card details. Possible values: + - `1`: Save the card details. + - `0`: Do not save the card details. + +`consent_to_save_card` _mandatory_ +: `integer` Indicates whether you have taken the customer's consent for tokenising the card. Possible values: + - `1`: Taken the customer's consent. + - `0`: Not taken the customer's consent. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> For the Authorisation Payment to be successful in a day (for example, 5th June), you should create an Order and the Authorisation Transaction on the same day (5th June) before 11:59 pm. +> diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/cards/subsequent-payments.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/cards/subsequent-payments.md new file mode 100644 index 00000000..27896a75 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/cards/subsequent-payments.md @@ -0,0 +1,315 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. +--- + +# 3. Create Subsequent Payments + +Given below are the steps to create and charge your customer subsequent payments: + +## 3.1 Create an Order to Charge the Customer + +You must create a new order whenever you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id": "cust_N8fv8Nftx5hato", + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + } +}' +``` +```json: Success +{ + "amount":1000, + "amount_due":1000, + "amount_paid":0, + "attempts":0, + "created_at":1707389202, + "currency":"INR", + "entity":"order", + "id":"order_NYMDbygGb1DuDd", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + }, + "offer_id":null, + "receipt":"Receipt No. 1", + "status":"created" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + -` 1`: If the user is logged into the account. + - `0`: If the user is on guest + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + +You can create a payment against the `order_id` after you create an order. + + +## 3.2 Create a Recurring Payment + +Once you have generated an `order_id`, use it to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "amount": "1000", + "currency": "INR", + "order_id": "order_NYMDbygGb1DuDd", + "customer_id": "cust_N8fv8Nftx5hato", + "token": "token_NZveVUfP5fn0fq", + "recurring": true, + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + } +}' +``` +```json: Success +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is `100` (₹1). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in [Create an order to charge the customer](#21-create-an-order-to-charge-the-customer). + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer, obtained from the response of Customer API. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Possible values: + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `9000090000`. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/cards/tokens.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/cards/tokens.md new file mode 100644 index 00000000..9d8051ad --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/cards/tokens.md @@ -0,0 +1,281 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +## 2.1. Fetch Token by Payment ID + +Use the below endpoint to fetch `token_id` using the `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String Paymentid = "pay_FHfqtkRzWvxky4"; + +Payment payment = instance.payments.fetch(paymentids); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_FHfqtkRzWvxky4" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) +``` + +```json: Response +{ + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "", + "status": "captured", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "bank": null, + "wallet": null, + "vpa": null, + "email": "", + "contact": "", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "541898" + }, + "created_at": 1595449871 +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` from the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + + +## 2.2. Fetch Tokens by Customer ID + +Use the below endpoint to fetch all tokens linked to a customer. + +A customer can have multiple tokens tied to them. These tokens can be used to create subsequent payments for multiple products or services. + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_FHfn3rIiM1Z8nr"; + +Customer customer = instance.customers.fetchToken(customerId, tokenId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000002" + +tokenId = "token_FHfn3rIiM1Z8nr" + +Razorpay::Customer.fetch(customerId).fetchToken(tokenId) +``` + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfn3rIiM1Z8nr", + "entity": "token", + "token": "2aqzyte2EqvuDr", + "bank": null, + "wallet": null, + "method": "card", + "card": { + "entity": "card", + "name": "", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer", + "expiry_month": 5, + "expiry_year": 2030, + "flows": { + "otp": true, + "recurring": true + } + }, + "vpa": null, + "recurring": true, + "auth_type": null, + "mrn": null, + "used_at": 1595449871, + "created_at": 1595449652, + "expired_at": 1748716199, + "dcc_enabled": false + } + ] +} +``` + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + + +## 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi-tpv/authorization-transaction.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi-tpv/authorization-transaction.md new file mode 100644 index 00000000..940cdeea --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi-tpv/authorization-transaction.md @@ -0,0 +1,692 @@ +--- +title: 1. Create the Authorisation Transaction +description: Steps to create an authorisation transaction for UPI. +--- + +# 1. Create the Authorisation Transaction + +Given below are the steps to create an authorisation transaction using the Razorpay APIs. + +## 1.1 Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + +### Request Parameters + + `name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + + +## 1.2 Create an Order + +The Orders API allows you to create a unique Razorpay `order_id`, for example, `order_1Aa00000000001`, that would be tied to the authorisation transaction. Refer to our detailed [Order documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md) for more details. + +Use the below endpoint to create an order. + +/orders + +You can create a payment against the `order_id` once it is generated. + +```cURL: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id": "cust_N8fv8Nftx5hato", + "method": "upi", + "token": { + "max_amount": 200000, + "expire_at": 1709971120, + "frequency": "monthly", + "recurring_value": 9, + "recurring_type": "on" + }, + "bank_account": { + "account_number": "123456789012345", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' +``` +```json: Success +{ + "amount": 1000, + "amount_due": 1000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1707468938, + "currency": "INR", + "entity": "order", + "id": "order_NYirPLFPraZLtB", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "offer_id": null, + "receipt": "Receipt No. 1", + "status": "created" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `upi`. + +`token` +: `object` Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be debited in a single charge. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The default value is 10 years, and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + + `recurring_value` _optional_ + : `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + + `recurring_type` _optional_ + : `string` Determines when the recurring debit can be done. Possible values are: + - `on`: Recurring debit happens on the exact day of every month. + +> **INFO** +> +> +> **Handy Tips** +> +> For creating an order with `recurring_type`=`on`, set the `recurring_value` parameter to the current date. +> + + - `before`: Recurring debit can happen any time before the specified date. + - `after`: Recurring debit can happen any time after the specified date. + + For example, if the `frequency` is `monthly`, `recurring_value` is `17`, and `recurring_type` is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if `recurring_type` is `after`, recurring debit can only happen on or after the 17th of the month. + +`bank_account` _mandatory_ +: `object` Details of the bank account of the customer. + + `account_number` _mandatory_ + : `string` The bank account number of the customer. For example, `123456789012345`. + + `ifsc` _mandatory_ + : `string` The IFSC of the bank. For example, `HDFC0000053`. + + `name` _mandatory_ + : `string` The name of the bank account holder. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + `- 1`: If the user is logged into the account. + `- 0`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + + + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating an Order. + +Error | Cause | Solution +--- +The id provided does not exist | This error occurs when you enter an incorrect `customer_id.` | Make sure to enter a valid `customer_id`. +--- +The api key provided is invalid | This error occurs when you enter the wrong API key or secret. | Make sure to enter a valid API key and secret. +--- +The amount must be at least INR 1.00. | This error occurs when you enter an amount less than INR 1. | Make sure the entered amount is atleast INR 1.00. +--- +The currency should be INR when method is upi | This error occurs when you enter a currency other than INR | Make sure the currency is INR. +--- +The amount field is required. | This error occurs when you have not entered the amount or the `max_amount` value. | Make sure to enter the `max_amount` value. +--- +The minimum transaction amount allowed is Re. 5. | This error occurs when you enter the maximum amount less than the minimum amount. | Make sure the `max_amount` value is more than the `min_amount` value. +--- +The order amount cannot be greater than the token max amount for upi recurring. | This error occurs when the order amount exceeds the `token_max` amount passed in the API request payload. | Ensure the order amount is lesser than the `token_max` account. + + + +## 1.3 Create an Authorisation Payment + +> **INFO** +> +> +> **Handler Function vs Callback URL** +> +> - **Handler Function**: +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL**: +> +When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. +> + +```html: Custom checkout with handler functions + + + Pay + + const btn = document.querySelector("#btn"); + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + razorpay.once("ready", function(response) { + console.log(response.methods); + }) + var data = { + "amount": 300, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR",// Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": "1", + "method": "upi", + "upi[vpa]": "9000090000@paytm" //Payer VPA in case of collect request + }; + btn.addEventListener("click", function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); // will pass error object to error handler + }) + + +```html: Custom checkout with Callback URL + + + Pay + + const btn = document.querySelector("#btn"); + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + razorpay.once("ready", function(response) { + console.log(response.methods); + }) + var data = { + "callback_url": "www.example-callback-url.com", + "amount": 300, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR",// Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": "1", + "method": "upi", + "upi[vpa]": "9000090000@paytm" //Payer VPA in case of collect request + }; + btn.addEventListener("click", function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + }) + + +``` + + +### Additional Checkout Fields + +You should send the following additional parameters along with the existing checkout options as a part of the authorisation transaction. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#11-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#12-create-an-order). + +`recurring` _mandatory_ +: `string` Determines if the recurring payment is enabled or not. Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this if you want to allow **recurring payments** and **one-time payment** in the same flow. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. + + + +### Error Response Parameters + +Given below is a list of possible errors you may face while making the authorisation payment. + +Error | Cause | Solution +--- +transaction_limit_exceeded | The customers have exceeded their account's credit or debit limit. This error usually occurs during high-value transactions. | You have reached the maximum transaction limit for this account. You can try again with a lower amount or use a different bank account. +--- +payment_invalid_account | This error occurs when the customer's bank account is either closed or no longer valid. The customer or bank may have closed the account. | The payment could not be completed as the entered bank account details are incorrect. Try again with another account. +--- +account_closed | This error occurs when the customer's bank account is either closed or no longer valid. The customer or bank may have closed the account. | The payment could not be completed as your bank account is closed. You can try again with another account or contact your bank for details. +--- +invalid_withdrawer_data | This error occurs when the customer's bank account is either closed or no longer valid. The customer or bank may have closed the account. | The payment could not be completed as the customer's bank account is closed or blocked. You can try again with another account. +--- +validation_failure | The bank could not validate the customer registration for debiting the customer. | The payment is declined due to a mismatch in account details. Try again with the account registered with the business only. +--- +payment_account_withdrawal_frozen | The bank has temporarily blocked withdrawals on the customer's account. | The payment could not be completed as withdrawal for your bank account is locked. You can try again with another account or contact your bank for details. +--- +No_DR_allowed | The bank has temporarily blocked withdrawals on the customer's account. | The payment could not be completed as withdrawal for your bank account is locked. You can try again with another account or contact your bank for details. +--- +Payment_duplicate _request | A payment initiation request with the same parameters was passed to the gateway. The gateway is blocking duplicate requests. | You should retry after 30 minutes. +--- +Registration already in progress | A payment initiation request with the same parameters was passed to the gateway. The gateway is blocking duplicate requests. | Your mandate registration is already in progress. Check the status in some time. +--- +payment_risk_check_failed | Payment declined due to risk checks. Razorpay, Gateway and issuer bank perform these risk checks. The source parameter would give additional clarity on where the risk check failed. | The payment could not be completed due to a temporary technical issue. You can try again in sometime. +--- + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> For the Authorisation Payment to be successful in a day (for example, 5th June), you should create an Order and the Authorisation Transaction on the same day (5th June) before 11:59 pm. +> diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi-tpv/subsequent-payments.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi-tpv/subsequent-payments.md new file mode 100644 index 00000000..d7f9a0ce --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi-tpv/subsequent-payments.md @@ -0,0 +1,415 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is authorised. +--- + +# 3. Create Subsequent Payments + +Given below are the steps to create and charge your customer subsequent payments: + +## 3.1 Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id": "cust_N8fv8Nftx5hato", + "bank_account": { + "account_number": "123456789012345", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' +``` +```json: Success +{ + "amount": 1000, + "amount_due": 1000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1707468938, + "currency": "INR", + "entity": "order", + "id": "order_NYirPLFPraZLtB", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "offer_id": null, + "receipt": "Receipt No. 1", + "status": "created" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`bank_account` _mandatory_ +: `object` Details of the bank account of the customer. + + `account_number` _mandatory_ + : `string` The bank account number of the customer. For example, `123456789012345`. + + `ifsc` _mandatory_ + : `string` The IFSC of the bank. For example, `HDFC0000053`. + + `name` _mandatory_ + : `string` The name of the bank account holder. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + -` 1`: If the user is logged into the account. + - `0`: If the user is on guest + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + +You can create a payment against the `order_id` after you create an order. + + + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating an Order. + +Error | Cause | Solution +--- +The api key provided is invalid | This error occurs when you enter the wrong API key or secret. | Make sure to enter the valid API key and secret. +--- +The amount must be at least INR 1.00. | This error occurs when you enter an amount less than INR 1. | Make sure the entered amount is atleast INR 1.00. +--- +The currency should be INR when method is upi | This error occurs when you enter a currency other than INR | Make sure the currency is INR. +--- + + + +## 3.2 Create a Recurring Payment + +Once you have generated an `order_id`, use it to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "order_id": "order_NYMptG6ChGaFgj", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "customer_id": "cust_N8fv8Nftx5hato", + "token": "token_NZveVUfP5fn0fq", + "recurring": "1", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + } +}' +``` +```json: Success +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +> **INFO** +> +> +> **UPI Payments** +> +> - We recommend sending a pre-debit notification to the customer 48 hours before the debit date. +> - For UPI, it may take between 24-36 hours for the subsequent payment to reflect on your Dashboard. +> - This is because of the failure of pre-debit notification and/or any retries that we attempt for the payment. +> - Do not create another subsequent payment until you get the status of the previous one. +> + +> **WARN** +> +> +> **UPI Payments** +> +> For UPI, **do not** create subsequent payments on the last day of the cycle. This will cause the payment to fail. +> + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount associated with the payment in smallest unit of the supported currency. For example, `2000` means ₹20. Must match the amount in [Create an order to charge the customer](#21-create-an-order-to-charge-the-customer). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in [Create an order to charge the customer](#21-create-an-order-to-charge-the-customer). + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `9000090000`. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer, obtained from the response of Customer API. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `string` Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this when you want to support recurring payments and one-time payment in the same flow. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. + + + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating a Recurring Payment. + +Error | Cause | Solution +--- +Amount exceeds maximum amount allowed | This error occurs when you enter an amount greater than the authorized maximum amount. | Make sure the amount is equal to or less than the maximum amount for the particular token. +--- +Your payment amount is different from your order amount. To pay successfully, please try using right amount. | This error occurs when you enter a different amount while creating a subsequent payment. | Make sure the order and the subsequent payment amounts are the same. +--- +bank_account_invalid | This error occurs when The customer's bank account is either closed or no longer valid. The customer or bank may have closed the account. | The customer should re-register the mandate. +--- +bank_account_validation_failed | This error occurs when the bank could not validate the customer registration for debiting the customer. | You can retry after some time or reach out to Razorpay. +--- +bank_technical_error | The destination bank was facing technical problems at the time the payment was attempted. This error usually occurs when the Core Banking System encounters a technical error while processing the payment. | You can retry after some time or reach out to Razorpay. +--- +debit_instrument_blocked | This error occurs when the bank temporarily blocks withdrawals on the customer's account. | The customer should reach out to their bank to get the account unblocked. +--- +debit_instrument_inactive | This error occurs when the bank temporarily blocks withdrawals on the customer's account. | The customer should reach out to their bank to get the account unblocked. +--- +gateway_technical_error | The payment failed due to a technical error at the gateway. This error usually occurs when the gateway server encounters a technical error while processing the payment. | You can retry after some time or reach out to Razorpay. +--- +input_validation_failed | The payment failed due to the wrong request or input sent in the payment request. You can also get this error while creating a payment with incorrect parameter values on the Dashboard. | Rectify the validation issues and try again. Check the error description and field parameters for more information about the error. +Check your integration/payment request or reach out to Razorpay. Refer to the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). +--- +insufficient_funds | This error occurs when the customer does not have sufficient funds in the account to complete the payment. | You can retry after asking the customer to add funds to their bank account. +--- +invalid_amount | This error occurs when the amount or currency passed in the payment request is not supported or invalid. This can arise when you pass a different variable type in the amount field or pass an unsupported amount value. | You can check your integration and payment request. +--- +mandate_not_active | This error occurs when the registered mandate is no longer active. The customer or bank could have cancelled the mandate. | The customer should re-register the mandate. +--- +payment_cancelled | This error occurs when the customer has explicitly cancelled the payment. The customer could have given a cancellation instruction to their banks. | You can retry after informing the customer to remove the cancellation request. +--- +payment_declined | Destination Bank or Gateway has declined the payment due to business or technical reasons such as terminal and pricing. | You can retry after some time or reach out to Razorpay. +--- +payment_failed | This error occurs when the destination Bank or Gateway has declined the payment due to business or technical reasons such as terminal and pricing. | You can retry after some time or reach out to Razorpay. +--- +payment_mandate_not_active | This error occurs when the is not yet activated the registered mandate. Banks sometimes take longer to activate the mandates at their end. | You can retry after some time or reach out to Razorpay. +--- +payment_timed_out | This error occurs when the bank with the registered mandate could not debit the customer's account in time. | You can retry after some time or reach out to Razorpay. +--- +server_error | This error occurs when there is a technical error at Razorpay's server. | You can retry after some time or reach out to Razorpay. +--- +transaction_limit_exceeded | This error occurs when customers exceed their account's credit or debit limit during high-value transactions. | You can retry after some time by informing the customer to update their transaction limits. +--- diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi-tpv/tokens.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi-tpv/tokens.md new file mode 100644 index 00000000..8277d944 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi-tpv/tokens.md @@ -0,0 +1,362 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +Know about about [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/integrate.md#fetch-emandate-registration-details). + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_FHfAzEJ51k8NLj" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentid = "pay_FHfqtkRzWvxky4"; + +Payment payment = client.Payment.Fetch(paymentid); +``` + +```json: Debit Payment +{ + "id": "pay_FHfAzEJ51k8NLj", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfANdTUYeP8lb", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfAzGzREc1ug6", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595447490 +} +```json: Authorisation Payment +{ + "id": "pay_QDhVJ5M23wt4rh", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "failed", + "order_id": "order_QDhT2PqFJvtg4y", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "success@razorpay", + "email": "gaurav.kumar@example.com", + "contact": "+919123456780", + "customer_id": "cust_Q0g6LTYw3obZEn", + "token_id": "token_QDhVJHYr5m87fF", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey\u2026 decaf.", + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + "optimizer_provider_name": "razorpay" + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment was a dummy payment for one time mandate registration.", + "error_source": "business", + "error_step": "payment_initiation", + "error_reason": "upi_dummy_payment", + "acquirer_data": { + "rrn": null + }, + "gateway_provider": "Razorpay", + "created_at": 1743490280, + "upi": { + "vpa": "success@razorpay" + } +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` via the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + + +## 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> - This endpoint will not fetch the details of expired and unused tokens. +> - The UPI tokens are not populated in the API response if the `save_vpa` feature is not enabled in your account. Please raise a request with our Support team to get this activated. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +List tokens = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + + +## 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi/authorization-transaction.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi/authorization-transaction.md new file mode 100644 index 00000000..9a0b1902 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi/authorization-transaction.md @@ -0,0 +1,622 @@ +--- +title: 1. Create the Authorisation Transaction +description: Steps to create an authorisation transaction for UPI. +--- + +# 1. Create the Authorisation Transaction + +Given below are the steps to create an authorisation transaction using the Razorpay APIs. + +## 1.1 Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + +### Request Parameters + + `name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + + +## 1.2 Create an Order + +The Orders API allows you to create a unique Razorpay `order_id`, for example, `order_1Aa00000000001`, that would be tied to the authorisation transaction. Refer to our detailed [Order documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md) for more details. + +Use the below endpoint to create an order. + +/orders + +You can create a payment against the `order_id` once it is generated. + +```cURL: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id": "cust_N8fv8Nftx5hato", + "method": "upi", + "token": { + "max_amount": 200000, + "expire_at": 1709971120, + "frequency": "monthly", + "recurring_value": 8, + "recurring_type": "on" + }, + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' +``` +```json: Success +{ + "amount": 1000, + "amount_due": 1000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1707391377, + "currency": "INR", + "entity": "order", + "id": "order_NYMptG6ChGaFgj", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "offer_id": null, + "receipt": "Receipt No. 1", + "status": "created" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `upi`. + +`token` +: `object` Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be debited in a single charge. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The default value is 10 years, and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + + `recurring_value` _optional_ + : `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + + `recurring_type` _optional_ + : `string` Determines when the recurring debit can be done. Possible values are: + - `on`: Recurring debit happens on the exact day of every month. + +> **INFO** +> +> +> **Handy Tips** +> +> For creating an order with `recurring_type`=`on`, set the `recurring_value` parameter to the current date. +> + + - `before`: Recurring debit can happen any time before the specified date. + - `after`: Recurring debit can happen any time after the specified date. + + For example, if the `frequency` is `monthly`, `recurring_value` is `17`, and `recurring_type` is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if `recurring_type` is `after`, recurring debit can only happen on or after the 17th of the month. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + `- 1`: If the user is logged into the account. + `- 0`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + + +## 1.3 Create an Authorisation Payment + +> **INFO** +> +> +> **Handler Function vs Callback URL** +> +> - **Handler Function**: +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL**: +> +When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. +> + +```html: Custom checkout with handler functions + + + Pay + + const btn = document.querySelector("#btn"); + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + razorpay.once("ready", function(response) { + console.log(response.methods); + }) + var data = { + "amount": 300, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR",// Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": "1", + "method": "upi", + "upi[vpa]": "afrodog@upi" //Payer VPA in case of collect request + }; + btn.addEventListener("click", function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); // will pass error object to error handler + }) + + +```html: Custom checkout with Callback URL + + + Pay + + const btn = document.querySelector("#btn"); + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg" + }); + razorpay.once("ready", function(response) { + console.log(response.methods); + }) + var data = { + "callback_url": "www.example-callback-url.com", + "amount": 300, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + "currency": "INR",// Default is INR. We support more than 90 currencies. + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + }, + "order_id": "order_00000000000001", + "customer_id": "cust_00000000000001", + "recurring": "1", + "method": "upi", + "upi[vpa]": "afrodog@upi" //Payer VPA in case of collect request + }; + btn.addEventListener("click", function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + }) + + +``` + + +### Additional Checkout Fields + +You should send the following additional parameters along with the existing checkout options as a part of the authorisation transaction. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +`recurring` _mandatory_ +: `string` Determines if the recurring payment is enabled or not. Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this if you want to allow **recurring payments** and **one-time payment** in the same flow. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> For the Authorisation Payment to be successful in a day (for example, 5th June), you should create an Order and the Authorisation Transaction on the same day (5th June) before 11:59 pm. +> diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi/subsequent-payments.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi/subsequent-payments.md new file mode 100644 index 00000000..f8f9e91a --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi/subsequent-payments.md @@ -0,0 +1,334 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is authorised. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +## 3.1 Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id": "cust_N8fv8Nftx5hato", + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + } +}' +``` +```json: Success +{ + "amount": 1000, + "amount_due": 1000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1707389202, + "currency": "INR", + "entity": "order", + "id": "order_NYMDbygGb1DuDd", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + }, + "offer_id": null, + "receipt": "Receipt No. 1", + "status": "created" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + -` 1`: If the user is logged into the account. + - `0`: If the user is on guest + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + +You can create a payment against the `order_id` after you create an order. + + +## 3.2 Create a Recurring Payment + +Once you have generated an `order_id`, use it to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "order_id": "order_NYMptG6ChGaFgj", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "customer_id": "cust_N8fv8Nftx5hato", + "token": "token_NZveVUfP5fn0fq", + "recurring": "1", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + } +}' +``` +```json: Success +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +> **INFO** +> +> +> **UPI Payments** +> +> - We recommend sending a pre-debit notification to the customer 48 hours before the debit date. +> - For UPI, it may take between 24-36 hours for the subsequent payment to reflect on your Dashboard. +> - This is because of the failure of pre-debit notification and/or any retries that we attempt for the payment. +> - Do not create another subsequent payment until you get the status of the previous one. +> + +> **WARN** +> +> +> **UPI Payments** +> +> For UPI, **do not** create subsequent payments on the last day of the cycle. This will cause the payment to fail. +> + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount associated with the payment in smallest unit of the supported currency. For example, `2000` means ₹20. Must match the amount in [Create an order to charge the customer](#21-create-an-order-to-charge-the-customer). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in [Create an order to charge the customer](#21-create-an-order-to-charge-the-customer). + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `9000090000`. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer, obtained from the response of Customer API. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `string` Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this when you want to support recurring payments and one-time payment in the same flow. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi/tokens.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi/tokens.md new file mode 100644 index 00000000..325d40c2 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/recurring-payments/upi/tokens.md @@ -0,0 +1,233 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +## 2.1. Fetch Token by Payment ID + +Use the below endpoint to fetch the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); + +```json: Response +{ + "id": "pay_FHfAzEJ51k8NLj", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfANdTUYeP8lb", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfAzGzREc1ug6", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595447490 +} +``` + +> **INFO** +> +> +> **Note** +> +> You can also retrieve the `token_id` via the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + + +## 2.2. Fetch Tokens by Customer ID + +> **WARN** +> +> +> **Watch Out!** +> +> The UPI tokens are not populated in the API response if the `save_vpa` feature is not enabled in your account. Please raise a request with our Support team to get this activated. +> + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + + +## 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/test-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/test-integration.md new file mode 100644 index 00000000..8d8743ab --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/test-integration.md @@ -0,0 +1,179 @@ +--- +title: 2. Test Integration +description: Steps to test if the integration was successful and what features are supported in Razorpay's sandbox environment. +--- + +# 2. Test Integration + +This guide helps you understand how to test the integration using Razorpay. It outlines what features are supported in Test (sandbox) vs Live environments and how to simulate various scenarios effectively. + +You can make test payments using one of the payment methods configured at the Checkout. + +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API Keys generated in the Test Mode in the Checkout code. + +## Supported Payment Methods + + +### Netbanking + +You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + + +### UPI + +You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + +You can use one of the test cards to make transactions in the Test Mode. Use any valid expiration date in the future and any random CVV to create a successful payment. + +Card Network | Domestic / International | Card Number +--- +Mastercard | Domestic | 5267 3181 8797 5449 +--- +Visa | Domestic | 4386 2894 0766 0153 +--- +Mastercard | International | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 +--- +Visa | International | 4012 8888 8888 1881 + + + + +### Card BIN Information + +Currently, we do not have dummy card details for all card networks. However, you can refer to the BIN (Bank Identification Number) information below to simulate different card types: + +Card Network | BIN Start Digits +--- +Visa | Starts with **4** +--- +Mastercard | Starts with **51–55** or **2221–2720** +--- +Amex | Starts with **34** or **37** +--- +Diners Club | Starts with **36** or **38** +--- +RuPay | Starts with **60, 65, 81, or 82** +--- +Maestro | Varies, often starts with **50, 56–69** +--- + + + +## What You Can Test in Sandbox Mode + +The following features are supported in Test Mode using test cards, UPI ids, and mock data: + + +### Features supported in test mode + + + Feature | Supported in Test Mode | Notes + --- + Order Creation (/v1/orders) | Yes | Fully testable + --- + Customer Creation | Yes | Full flow supported + --- + Payment Creation (Simulated) | Yes | Use Razorpay-provided test cards or UPI ids + --- + Webhooks (Simulated) | Yes | Simulated event triggers can be tested + --- + Tokenisation API (Simulated) | Yes | Tokens are created but not persisted + --- + Refunds | Yes | Simulated refund flow + --- + Subscriptions | Yes | End-to-end test flow supported + --- + Auth & Capture API | Yes | Can mock Auth/Capture calls + --- + Charge at Will – API Structure | Yes | API structure works; mandate is mocked + + + +You can also test webhook events using failure VPAs like `failure@razorpay` to simulate failure scenarios. + +## What You Cannot Test in Sandbox Mode + +Some features require real payment instruments, user authentication, or live customer flows, and thus cannot be tested in Test Mode: + + +### Features not supported in test mode + + + Feature | Supported in Test Mode | Reason + --- + Saved Cards / Token Persistence | No | Requires RBI-compliant card & customer authentication (AFA) + --- + Saved UPI VPAs | No | Needs real UPI mandate approval + --- + Card/UPI Mandate Creation | No | Involves actual banking infrastructure + --- + CVV-less/Card Vault Flows | No | Needs real card and authentication + --- + UPI Intent + App Switch | No | Not supported by test apps + --- + Real Notifications (SMS/Email) | No | Suppressed in Test Mode + --- + Analytics and Smart Reports | No | Requires real traffic and transactions + --- + OTP / AFA Validations | No | Test cards skip 3D Secure/OTP flows + --- + Settlement Reports | No | Depends on real money movement and settlements + --- + Charge at Will (Recurring Flow) | No | Needs real mandate + live charge events + + + +## Testing Charge at Will (CAW) Flows + + + - You can simulate token creation and charge requests. + - Mandate registration and authentication are mocked. + - No real customer authentication (3DS, OTP) is involved. + + + - Real tokenisation with 3DS/OTP. + - Mandate is registered with customer’s issuing bank. + - Charges below ₹15,000 may work without AFA. + - Charges above ₹15,000 will require AFA as per RBI guidelines. + + +## Minimum Transaction Amounts (Live Environment) + +To ensure successful transaction processing in the Live environment, please refer to the following minimum amount requirements per payment method: + +Payment Method | Minimum Amount (INR) +--- +Credit Card – One-time | ₹1 +--- +Credit Card – Recurring | ₹1 +--- +UPI – One-time | ₹1 +--- +UPI – Recurring | Varies based on pricing/commercials set during onboarding +--- +Netbanking – One-time | ₹1 +--- + +## Next Steps + +[Step 3: Go Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration/go-live-checklist.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/import-flow/standard-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/import-flow/standard-integration.md new file mode 100644 index 00000000..98217e84 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/import-flow/standard-integration.md @@ -0,0 +1,38 @@ +--- +title: About Razorpay Import Flow Web Standard Integration +description: Steps to integrate with Import Flow for a seamless payment solution for International Businesses. +--- + +# About Razorpay Import Flow Web Standard Integration + +Import Flow is a payment solution designed for International (non-Indian) businesses to accept payments from Indian customers without any additional paperwork or registration. + +Your Indian customers can make payments using local payment methods such as credit cards, debit cards, UPI and netbanking. The funds are settled in your overseas bank account. Know more about [Import Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers.md). + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +## Integration Steps + +Follow these integration steps: + +1. [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/import-flow/standard-integration/build-integration.md) +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/import-flow/standard-integration/test-integration.md) +3. [Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/import-flow/standard-integration/go-live-checklist.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/import-flow/standard-integration/build-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/import-flow/standard-integration/build-integration.md new file mode 100644 index 00000000..e11a0d1b --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/import-flow/standard-integration/build-integration.md @@ -0,0 +1,1338 @@ +--- +title: 1. Build Integration +description: Steps to integrate with Razorpay Import Flow for a seamless payment solution for International Businesses. +--- + +# 1. Build Integration + +Follow these steps to integrate the standard checkout form on your website: + +**1.1** [Create a customer in server](#11-create-a-customer-in-server). + +**1.2** [Create an order in server](#12-create-an-order-in-server). + +**1.3** [Integrate with checkout on client-side](#13-integrate-with-checkout-on-client-side). + +**1.4** [Handle payment success and failure](#14-handle-payment-success-and-failure). + +**1.5** [Store fields in server](#15-store-fields-in-your-server). + +**1.6** [Verify payment signature](#16-verify-payment-signature). + +**1.7** [Verify payment status](#17-verify-payment-status). + +**1.8** [Invoice collection](#18-invoice-collection). + +## 1.1 Create a Customer in Server + +Use Customers API to create customers with basic details such as name, email and contact details. + +You can try out our APIs on the Razorpay Postman Public Workspace. Fork the workspace and test the APIs with your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#test-mode-api-keys). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-85efcb7a-1506-4539-b26e-892169fe46f8) + +/customers + +```cURL: Curl + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name","Gaurav Kumar"); +customerRequest.put("contact","+919000090000"); +customerRequest.put("email","gaurav.kumar@example.com"); +customerRequest.put("fail_existing","0"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + "name": "Gaurav Kumar", + "contact": +919000090000, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": +919000090000, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} + +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->create(array('name' => 'Gaurav Kumar', 'email' => 'gaurav.kumar@example.com','contact'=>'+919000090000','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", "Gaurav Kumar"); +options.Add("contact", "+919000090000"); +options.Add("email", "gaurav.kumar@example.com"); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "name": "Gaurav Kumar", + "contact": +919000090000, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({ + name: "Gaurav Kumar", + contact: +919000090000, + email: "gaurav.kumar@example.com", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +``` + +```json: Success +{ + "id": "cust_MpINfSkdEvtdxb", + "entity": "customer", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "gstin": null, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1697550382 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } +} +``` + + +### Request Parameters + + `name` _optional_ + : `string` Customer's name. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `fail_existing` _optional_ + : `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + `gstin` _optional_ + : `string` Customer's GST number, if available. + For example, `29XAbbA4369J1PA`. + + `notes` _optional_ + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `entity` + : `string` Indicates the type of entity. + + `name` + : `string` Customer's name. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + + `contact` + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `email` + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `gstin` + : `string` GST number linked to the customer. + For example, `29XAbbA4369J1PA`. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. Know how to [Generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + --- + Contact number should be at least 8 digits, including country code. | The contact number is less than 8 digits. | Enter contact number that meets the validation criteria. It should have at least 8 digits, including the country code. For example, "+919000090000". + + + +## 1.2 Create an Order in Server + +You can create an order using the following API and send the additional information required for Import Flow. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "customer_id": "cust_MpINfSkdEvtdxb", + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "hotel", + "sku": "1gr367", + "name": "Grand Palace Hotel", + "description": "2BHK villa", + "quantity": 2, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "hotel": { + "sub_type": "stay", + "checkin_date": "2019-07-16", + "checkout_date": "2019-07-16", + "property_type": "", + "star_rating": 5, + "brand": "Grand Mercure", + "address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "class": "business", + "identity": { + "unique_national_id": "ABCDE1234Z", + "tax_id": "ABCDE1234Z" + } + }, + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "class": "business", + "identity": { + "unique_national_id": "ABCDE1234Z", + "tax_id": "ABCDE1234Z" + } + } + ] + } + } + ], + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +``` + +```json: Success +{ + "amount": 50000, + "amount_due": 50000, + "amount_paid": 0, + "attempts": 11, + "created_at": 1706507580, + "currency": "INR", + "entity": "order", + "id": "order_NUJs9C1Luflzts", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "receipt": "receipt#1111", + "status": "attempted" +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`customer_id` _optional_ +: `string` Unique identifier of customer received in response of Create Customer API. This will be `mandatory` field if you are creating a customer using Create Customer API. This is an `optional` field if you are directly creating an order without creating a customer. + +`customer_details` _optional_ +: `json object` Details about the customer/user. + + `name` _optional_ + : `string` The customer’s name. For example, Gaurav Kumar. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, +919000090000. + + `email` _optional_ + : `string` The customer’s email address. For example, gaurav.kumar@example.com. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the merchant platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the merchant platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, 1234567890. + +`line_items_total` _optional_ +: `integer` Total sum of the cart value. + +`line_items` _mandatory_ +: `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e-commerce` + - `mutual_fund` + + `sku` _optional_ + : `string ` unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business is running any discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `hotel` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `sub_type` _optional_ + : `enum` The sub-type of the line item. Possible values: + - `stay` + - `breakfast` + - `dinner` + - `lunch` + - `early_checkin` + - `late_chechout` + - `others` + + `checkin_date` _optional_ + : `string` Represents an ISO 8601-encoded date string. For example, September 7, 2019 is represented as "2019-07-16". + + `checkout_date` _optional_ + : `string` Represents an ISO 8601-encoded date string. For example, September 7, 2019 is represented as "2019-07-16". + + `property_type` _optional_ + : `string` Represents the type of the property. Possible values: + - `resort` + - `hostel` + - `hotel` + - `inn` + - `lodge` + - `motel` + - `apartment` + - `bed_and_breakfast` + - `tent` + - `villa` + + `star_rating` _optional_ + : `integer` Denotes the star rating of the property. Possible values: 1 to 7. + + `brand` _optional_ + : `string` Brand name of the property. For example, Marriott Group. + + `address` _optional_ + : `json object` details of the property address. + + `line1` _optional_ + : `string` Address Line 1 of the address + + `line2` _optional_ + : `string` Address Line 2 of the address + + `city` _optional_ + : `string` city of the address. For example, Bengaluru + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, IND + + `state` _optional_ + : `string` Name of the state. For example, KA + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, 560001. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `travellers` _optional_ + : `JSON object` Details associated with passengers/travellers/beneficiaries. + + `name` _optional_ + : `string` Name of the passenger/traveler/beneficiary. + + `email` _optional_ + : `string` Email address of the passenger/traveler/beneficiary. + + `contact` _optional_ + : `JSON object` Details associated with passengers/travelers/beneficiaries. + + `age` _optional_ + : `integer` UNIX timestamp of the date of birth of the individual. For example, 1234567890. + + `class` _optional_ + : `string` Type of the flight ticket. Possible values: + - `Business` + - `Suite` + - `Premium` + - `Deluxe` + - `Standard` + + `identity` _optional_ + : `JSON object` Identity details of the passenger/beneficiary. + + `unique_national_id` _optional_ + : `string` National ID number. For example, Adhaar number for India. + + `tax_id` _optional_ + : `string` Passport number of the individual. + +`refund_allowed` _optional_ +: `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + +`campaign` _optional_ +: `JSON object` Details of the campaign. *Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, PQR12453. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Example values: google, newsletter. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: cpc, banner, etc. + +`notes` _mandatory_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `amount` + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` Indicates the Unix timestamp when this order was created. + + `currency` + : `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + + `offer_id` + : `string` The unique identifier of the offer. For example, `offer_JHD834hjbxzhd38d`. + + `receipt` + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order changes to the `attempted` state following the first payment attempt and remains in this state until at least one payment is successfully processed and captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. + The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. + --- + The amount must be at least INR 1.00. | The amount specified is less than the minimum amount. Currency subunits, such as paise (in the case of INR), should always be greater than 100. | Enter an amount equal to or greater than the minimum amount, that is 100. + --- + The **field name** is required. | A mandatory field is missing. | Ensure all mandatory fields and values are present. + + + +## 1.3 Integrate with Checkout on Client-Side + +Add the Pay button on your web page using the checkout code, Handler Function or Callback URL. + +### Handler Function or Callback URL + +**Handler Function** | **Callback URL** +--- +When you use this: - On successful payment, the customer is shown your web page. +- On failure, the customer is notified of the failure and asked to retry the payment. + | When you use this: - On successful payment, the customer is redirected to the specified URL, for example, a payment success page. +- On failure, the customer is asked to retry the payment. + +### Code to Add Pay Button + +Copy-paste the parameters as `options` in your code: + +```html: Callback URL (JS) Checkout Code +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise + "currency": "INR", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "customer_id": "cust_MpINfSkdEvtdxb", + "order_id": "order_NGrgEcmYJsfUyl", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "notes": { + "partner_reservation_id": "12345", + "invoice_number": "order_NGrgEcmYJsfUyl", + "partner_guest_id": "abcd" + }, +}; +var rzp1 = new Razorpay(options); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +```html: Handler Functions (JS) Checkout Code +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise + "currency": "INR", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "customer_id": "cust_MpINfSkdEvtdxb", + "order_id": "order_NGrgEcmYJsfUyl", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "notes": { + "partner_reservation_id": "12345", + "invoice_number": "order_NGrgEcmYJsfUyl" + }, +}; +var rzp1 = new Razorpay(options); +rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); +}); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> Test your integration using these [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#2-test-integration). +> + +#### Supported Payment Methods + +Following payment methods are supported under the Import Flow: +- Netbanking +- UPI +- Cards + + +### Request Parameters + + `key` _mandatory_ +: `string` API Key ID generated from the Razorpay Dashboard. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `50000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`customer_id` _optional_ +: `string` Unique identifier of the customer received in response of Create Customer API. This will be `mandatory` field if you are creating a customer using Create Customer API. This is an `optional` field if you are directly creating an order without creating a customer. + +`order_id` _mandatory_ +: `string` Unique identifier of the order received in response of Create Order API. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and net banking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments with the suggested next best option. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment with the suggested next best option. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `partner_reservation_id` _mandatory_ + : `string` unique identifier for reservation from the business. + + `invoice_number` _mandatory_ + : `string` Order ID received in response of the Create an Order API. Example `order_NGrgEcmYJsfUyl`. + + `partner_guest_id` _mandatory_ + : `string` Unique identifier from business end. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> The open method of Razorpay object (`rzp1.open()`) must be invoked by your site's JavaScript, which may or may not be a user-driven action such as a click. +> + +## Errors + +Given below is a list of errors you may face while integrating with checkout on the client-side. + +Error | Cause | Solution +--- +The id provided does not exist. | Occurs when there is a mismatch between the API keys used while creating the `order_id`/`customer_id` and the API key passed in the checkout. | Make sure that the API keys passed in the checkout are the same as the API keys used while creating the `order_id`/`customer_id`. +--- +Blocked by CORS policy. | Occurs when the server-to-server request is hit from the front end instead. | Make sure that the API calls are made from the server side and not the client side. + +### Configure Payment Methods (Optional) + +Multiple payment methods are available on the Razorpay Web Standard Checkout. +- The payment methods are **fixed** and cannot be changed. +- You can configure the order or make certain payment methods prominent. Know more about [configuring payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + +## 1.4 Handle Payment Success and Failure + +The way the Payment Success and Failure scenarios are handled depends on the [Checkout Sample Code](#code-to-add-pay-button) you used in the last step. + +### Checkout with Handler Function + +If you used the sample code with the handler function: + + + The customer sees your website page. The checkout returns the response object of the successful payment (**razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature**). Collect these and send them to your server. + + + + + The customer is notified about payment failure and asked to retry the payment. Know about the [error parameters.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md#response-parameters) + + ```js: Failure Handling Code + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + } + ``` + + +### Checkout with Callback URL + +If you used the sample code with the callback URL: + + + + Razorpay makes a POST call to the callback URL with the **razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature** in the response object of the successful payment. Only successful authorisations are auto-submitted. + + + + + In case of failed payments, the checkout is displayed again to facilitate payment retry. + + +## 1.5 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +## 1.6 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +Here are the links to our [SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#client-libraries) for the supported platforms. + +## 1.7 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## 1.8 Invoice Collection + +> **WARN** +> +> +> **Watch Out!** +> +> 1. Invoice collection is mandatory for any import payment to be eligible for settlement. +> 2. Turnaround Time (TAT) for settlement begins **only after a valid invoice** is uploaded. +> 3. Ensure each invoice contains the following details: +> - Unique invoice number (Partner's invoice ID or Razorpay Order ID). +> - Partner's or business name. +> - Partner's or business address. +> - Customer's complete address. +> - Description of goods/services. +> - Units sold (time period, quantity and so on). +> - Amount in INR (2 decimal places only. For example, ). +> - Taxes applied. +> + +## Invoice Submission via SFTP + +You can automate invoice uploads using **Secure File Transfer Protocol (SFTP)**, enabling streamlined, secure file transfer. + +### Steps to Connect with Razorpay via SFTP + + +### 1. Share Your Public Key + + - Required for setting up SFTP credentials and folder access. + - Submit your SSH public key to your Razorpay point of contact. + - **Supported SSH key formats**: + - RSA (2048-bit or higher). For example, `ssh-rsa`. + - ECDSA. For example, `ssh-ecdsa`. + - Ed25519. For example, `ssh-ed25519`. + - Ensure your key is in the correct format. Using an unsupported or incorrectly formatted key will result in authentication failure. + + +> **WARN** +> +> +> **Watch Out!** +> +> Never share your private key with anyone. Only the public key should be provided to Razorpay. +> + + + + +### 2. IP Whitelisting + + - Only requests from your whitelisted IPs will be accepted. + - Share a list of authorised outbound IPs to enable secure access. + - Maximum of 4 IP addresses can be whitelisted. + - SFTP access will work only from the whitelisted IPs. Attempting to connect from any other IP address will result in connection failure. + + + +### 3. Credentials & Access Details + + - Razorpay will provide: + - Hostname: `sftp.razorpay.com` + - Port: `22` + - Username + - Path prefix (based on your `MID`) + - Use your **private key** (corresponding to the public key you shared) to authenticate while connecting to Razorpay's SFTP. + - Use an SFTP client to connect. + - **Test your connection**: Run `telnet sftp.razorpay.com 22` to verify connectivity before attempting SFTP access. + + +## How to Share Invoices via SFTP + + +### File Path Format + +Use the following folder and file structure: +"/invoiceUpload/automated//YYYY-MM-DD/InvoiceNumber.pdf." + +For example: `/invoiceUpload/automated/MDoeHNNpi0nB7m/2025-05-10/INV_09876.pdf` + +> **WARN** +> +> +> **Watch Out!** +> +> - You must include your Merchant ID (MID) in the path. +> - You must include the date folder in `YYYY-MM-DD` format. +> - Missing either component will result in upload failure. +> - Once uploaded, invoices become read-only. You cannot edit, rename or delete files after you upload. +> - Do not attempt to upload the same invoice multiple times to the same path. +> + + + + +### File Types and Flows + +Direction | Filename Format | Description +--- +Client → Razorpay | `InvoiceNumber.pdf` | Inbound File: This will be the invoices submitted by you to Razorpay. It should always be in PDF format. Example: `INV_09876.pdf` + + + +## Invoice ID Validation Process + +Razorpay enforces strong validation rules to prevent duplicate or invalid invoice usage. + + +### Successful Payments + + - **Status**: `Captured` + - **Invoice Action**: Permanently blocked + - **Note**: Same invoice ID cannot be reused. + + + +### Failed Payments + + - **Status**: `Failed` + - **Invoice Action**: Released + - **Note**: Invoice ID can be reused. + + + +### Payments in Intermediate States + + - **Status**: `Created` or `Authorised` + - **Invoice Action**: Temporarily blocked + - **Note**: Invoice ID is reusable only after final status (`Failed` or `Captured`) is reached. + + +### Refunded Payments + + +### Auto-Refunded (Never Captured) + + - **Status**: `Refunded` + - **Action**: Invoice ID is released. + - **Note**: ID can be reused. + + + +### Merchant-Initiated Refund (Post-Capture) + + - **Status**: `Refunded` + - **Action**: Invoice ID is permanently blocked. + - **Note**: Cannot be reused. + + +Partial capture scenarios are not validated by default. Contact Razorpay [Support team](https://razorpay.com/support/). + +## AML Screening Process + +As per RBI regulations, payments to offshore accounts must undergo AML (Anti-Money Laundering) checks by Razorpay's Authorised Dealer (AD) Bank. + + +### Daily AML Communication + + - You will receive daily emails listing transactions **flagged** for additional details. + - **Subject Line**: `Additional Details Required - [Business Name]_MDoeHNNpi0nB7m`. + + + +### Turnaround Time + + - Share required information within **5 working days** to avoid auto-cancellation. + - Information may include: Full name, address, ownership, percentage of ownership, nature of business, purpose of payment, business website, company, date of birth/incorporation, place of birth/incorporation and so on. + + + +### Consequences of Delay + + Missing TAT results in: + - Razorpay lien-marking the funds or + - Refund initiation via Dashboard/API. + + +## Best Practices for Invoice IDs + +To ensure seamless experience and compliance: + +- **Always generate unique invoice IDs** per payment. +- Acceptable IDs: + - Razorpay `order_id`. + - Your internal unique invoice number. +- Do not reuse invoice IDs for different transactions unless the original payment has failed. + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/import-flow/standard-integration/test-integration.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/import-flow/standard-integration/go-live-checklist.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/import-flow/standard-integration/go-live-checklist.md new file mode 100644 index 00000000..cf65fe42 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/import-flow/standard-integration/go-live-checklist.md @@ -0,0 +1,53 @@ +--- +title: 3. Go-live Checklist +description: Check the go-live checklist for Razorpay Payment Gateway standard Web integration. +--- + +# 3. Go-live Checklist + +Consider these steps before taking the integration live. + +## Accept Live Payments + +You can perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. However, make sure that you **swap the Test API Key with the Live Key**. + +Watch this video to generate an API Key in Live Mode. + +[Video: https://www.youtube.com/embed/30REpNtYSak] + +To generate an API Key in Live Mode: + +1. Log in to the Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + +## Payment Capture + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/import-flow/standard-integration/test-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/import-flow/standard-integration/test-integration.md new file mode 100644 index 00000000..674f95dc --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/import-flow/standard-integration/test-integration.md @@ -0,0 +1,98 @@ +--- +title: 2. Test Integration +description: Steps to test if the custom Web integration was successful. +--- + +# 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +You can make test payments using one of the payment methods configured at the Checkout. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + + +### Supported Payment Methods + + Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others require approval from us. Raise a request from the Dashboard to enable such payment methods. + + + Payment Method | Code | Availability + --- + [Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ + --- + [Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ + --- + [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ + --- + [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ + + + #### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + #### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the following lists: + - [Supported UPI Flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + - [UPI Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/upi.md). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + #### Cards + + You can use one of the following test cards to test transactions for your integration in Test Mode. + + + + Card Network | Domestic / International | Card Number | CVV & Expiry Date + --- + Mastercard | Domestic | 5267 3181 8797 5449 | Use a random CVV and any future date ^^^^ + --- + Visa | Domestic | 4386 2894 0766 0153 | + --- + Mastercard | International | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | + --- + Visa | International | 4012 8888 8888 1881 | + + + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + - [Test Error Scenarios](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards). + + +## Next Steps + +[Step 3: Go Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/import-flow/standard-integration/go-live-checklist.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration.md new file mode 100644 index 00000000..7b422cc6 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration.md @@ -0,0 +1,28 @@ +--- +title: Integrate With Razorpay Import Flow - S2S Integration +description: Steps to integrate with Import Flow APIs for a seamless payment solution for International Businesses. +--- + +# Integrate With Razorpay Import Flow - S2S Integration + +Import Flow is a payment solution designed for International (non-Indian) businesses to accept payments from Indian customers without any additional paperwork or registration. + +Your Indian customers can make payments via local payment methods such as credit cards, debit cards, UPI and netbanking. The funds are settled in your overseas bank account. Know more about [Import Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers.md). + +> **INFO** +> +> +> +> **Feature Request** +> +> This is an on-demand feature. Please fill out the [form](https://form.typeform.com/to/C5OlR4YQ) to get this feature activated on your account. +> +> + +## Integration Steps + +Follow these integration steps: + +1. [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/build-integration.md) +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/test-integration.md) +3. [Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/go-live-checklist.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/aml.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/aml.md new file mode 100644 index 00000000..937e927c --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/aml.md @@ -0,0 +1,1068 @@ +--- +title: AML Integration Guide +description: Reduce settlement delays and enhance compliance for international payments with Razorpay’s AML solutions. +--- + +# AML Integration Guide + +Razorpay offers two Anti-Money Laundering (AML) solutions—Basic AML and Smart AML—designed to help businesses reduce settlement delays and minimise compliance-related transaction flags. Our risk prediction engine analyses historical transaction data and regulatory signals to accurately identify potential risks, reducing AML flags by up to 90% while maintaining compliance standards. + + +### Advantages + + - **Reduced AML Hits**: Up to 90% reduction in flagged transactions with proper implementation. + - **Faster Settlements**: Minimise manual reviews and accelerate fund availability. + - **Flexible Integration**: Choose between Basic AML for simplicity or Smart AML for intelligent risk management. + - **Improved Conversion**: Collect additional details only when necessary, reducing customer friction. + - **Regulatory Compliance**: Automatically meet RBI requirements for high-value transactions. + + +## Basic AML Integration + +Basic AML enables you to proactively provide additional customer information with every order, thereby reducing the likelihood that it will be flagged for AML review. + +You need to pass a few additional parameters related to AML in the Orders API. There is no other change in the rest of the [S2S integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/build-integration.md). + + +### Sample Code + +/orders + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 10000, + "currency": "", + "receipt": "receipt#1", + "customer_id": "cust_OwZZseNBf9Uqsi", + "customer_details": { + "business_type": "individual", + "name": "", + "email": "", + "contact": "", + "individual": { + "date_of_birth": { + "day": 27, + "month": 11, + "year": 1993 + }, + "place_of_birth": "Bengaluru", + "tax_identity": [ + { + "name": "PAN", + "value": "ABCDE1234F" + } + ] + } + } +}' +``` + +```json: Response +{ + "amount": 10000, + "amount_due": 10000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1703569876, + "currency": "INR", + "entity": "order", + "id": "order_NGrgEcmYJsfUyl", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "receipt": "receipt#1", + "status": "created" +} +``` + + + Request Parameters + + `amount` _mandatory_ + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. Payment can only be made for this amount against the Order. + + `currency` _mandatory_ + : `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. For example, `INR`. + + `receipt` _optional_ + : `string` Receipt number that corresponds to this order, set for your internal reference. Can have a maximum length of 40 characters and has to be unique. + + `customer_id` _mandatory_ + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `customer_details` _mandatory_ + : `object` This contains details about the customer. + + `business_type` _optional_ + : `string` Indicates whether the customer is an individual or business entity. Possible values: + - `company` + - `individual` + + +> **WARN** +> +> +> **Watch Out!** +> +> For transactions exceeding ₹2,50,000: +> - **Individual customers**: PAN is mandatory. +> - **Business customers**: GSTIN is mandatory. +> + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (For example, @, ", ,, ., and so on.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (For example, aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919123456780`. + + `individual` + : `object` Required when `business_type` is `individual`. + + `date_of_birth` + : `object` Customer's date of birth (individuals) or date of incorporation (businesses). + + `day` + : `integer` Day of birth/incorporation (1-31). + + `month` + : `integer` Month of birth/incorporation (1-12). + + `year` + : `integer` Year of birth/incorporation (4-digit format). + + `place_of_birth` + : `string` Place where the customer was born or place of incorporation for businesses. + + `tax_identity` + : `array` List of tax identifiers. + + `name` + : `string` Type of tax identifier. + + `value` + : `string` The identifier value matching the expected format. + + + +### Response Parameters + + `amount` + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` Indicates the Unix timestamp when this order was created. + + `currency` + : `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. For example, `offer_JHD834hjbxzhd38d`. + + `receipt` + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order changes to the `attempted` state following the first payment attempt and remains in this state until at least one payment is successfully processed and captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. + The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. + --- + The amount must be at least INR 1.00. | The amount specified is less than the minimum amount. Currency subunits, such as paise (in the case of INR), should always be greater than 100. | Enter an amount equal to or greater than the minimum amount, that is 100. + --- + The **field name** is required. | A mandatory field is missing. | Ensure all mandatory fields and values are present. + --- + Only english alphabets are allowed in customer name. | The customer name provided in the request contains characters other than English alphabets, such as numbers, special characters, regional language characters, or emojis. | Ensure that the name field in the request contains only English letters (A-Z, a-z) and meets the validation criteria: - Verify that the name does not include numerical characters, special characters (For example, @, #, $ and so on.), or non-Latin scripts. +- Confirm that there are no extra spaces at the beginning or end of the name. + + --- + Customer name should be between 5 and 50 characters. | The `name` field provided in the request does not meet the required character length. It is either shorter than 5 characters or exceeds 50 characters. | - Ensure that the `name` field in the request is between 5 and 50 characters long. +- Check that no extra spaces are included at the beginning or end of the name, which might affect the character count. + + --- + Customer name is invalid. | The `name` field provided in the request does not meet the validation requirements. This could be due to the presence of disallowed characters, such as special characters, numbers, regional language characters, or the use of non-Latin scripts. | - Ensure that the `name` field only contains English letters (A-Z, a-z) and spaces (not at the beginning). +- Verify that the name does not include special characters, numerical digits, emojis, or regional language characters. +- Check for unintended characters that may have been included by mistake (For example, trailing spaces or special symbols). + + --- + + + + + + +## Smart AML Integration + +Smart AML applies real-time risk assessment to determine whether additional customer information is required. It ensures minimal friction for low-risk transactions while maintaining strong compliance standards. + +### Workflow + + +Smart Screening allows you to receive risk assessments and decide whether to proceed, collect additional data or decline transactions based on your business logic. +1. Create Order with AML screening. +2. Fetch Order With Updated Risk Assessment (optional). +3. Patch Order (If High Risk). +4. Create a Payment. + + +Automatic Order Failure immediately declines high-risk transactions at the time of order creation, preventing any possibility of payment processing for flagged orders. +1. Create Order with AML screening. +2. If high risk detected: Order fails immediately. +3. No payment creation possible - transaction ends here. +4. Handle error and inform customer. + + + +### Smart Screening vs Automatic Order Failure Comparison + +Feature | Smart Screening | Automatic Order Failure +--- +**Best For** | - Maximising conversions. +- Customer-centric businesses. +- Businesses with technical resources. + | - Zero-tolerance compliance policy. +- Minimal integration resources. +- Simplified operations. + +--- +**Customer Experience** | - Can request additional information. +- Customers can complete payment after verification. + | - Transaction declined immediately. +- No opportunity for customer to provide clarification. + +--- +**Integration Effort** | - Moderate complexity. +- Patch Order API integration required. + | - Minimal effort. +- Simple binary logic. + +--- +**API Response** | - Success with risk assessment. +- Includes risk factors and recommendations. + | - Error response for high-risk. +- Transaction fails at order creation. + +--- +**Reporting** | - Real-time risk metrics. +- Detailed risk factor analysis. + | - T+1 failed transaction reports. +- Percentage of orders declined. + +--- + + + +### Integrate Smart Screening + +Enable real-time risk assessment in your S2S integration: + + +### Step 1: Create Order with AML Screening + +/orders + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 10000, + "currency": "", + "receipt": "receipt#1", + "customer_id": "cust_OwZZseNBf9Uqsi", + "reviews": { + "screening": ["aml"] + }, + "customer_details": { + "name": "", + "email": "", + "contact": "", + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032" + }, + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032" + } + } +}' +``` + +```json: Success +{ + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 10000, + "amount_paid": 0, + "amount_due": 10000, + "currency": "", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071, + "reviews": { + "entity": "collection", + "count": 1, + "items": [ + { + "screening": "aml", + "risk_tier": "high", + "risk_factors_count": 1, + "risk_factors": [ + { + "reason": "name_match_sanction_list", + "description": "Please share date of birth for better AML precision", + "source": "customer_details.name" + } + ] + } + ] + } +} +``` + + + Request Parameters + + `amount` _mandatory_ + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. Payment can only be made for this amount against the Order. + + `currency` _mandatory_ + : `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. For example, `INR`. + + `receipt` _optional_ + : `string` Receipt number that corresponds to this order, set for your internal reference. Can have a maximum length of 40 characters and has to be unique. + + `customer_id` _mandatory_ + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `reviews` _optional_ + : `object` Contains risk assessment features. + + `screening` _optional_ + : `array` Types of risk screening to perform. For example `aml`. + + `customer_details` _mandatory_ + : `object` This contains details about the customer. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (For example, @, ", ,, ., and so on.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (For example, aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919123456780`. + + `billing_address` _mandatory_ + : `object` This contains the billing address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + + +### Response Parameters + + `amount` + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` Indicates the Unix timestamp when this order was created. + + `currency` + : `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. For example, `offer_JHD834hjbxzhd38d`. + + `receipt` + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order changes to the `attempted` state following the first payment attempt and remains in this state until at least one payment is successfully processed and captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. + The order stays in the `paid` state even if the payment associated with the order is refunded. + + `reviews` + : `object` Contains all risk assessment results. + + `entity` + : `string` Type of object. Here it is `collection`. + + `count` + : `integer` Number of risk assessments performed. + + `items` + : `array` List of risk assessment results. + + `screening` + : `string` Type of screening performed. Here it is `aml`. + + `risk_tier` + : `string` Overall risk level of the transaction. Possible values: + - `high` + - `medium` + - `low` + - `pending` + + `risk_factors_count` + : `integer` Number of risk factors identified. + + `risk_factors` + : `array` Detailed risk factor information. + + `reason` + : `string` Identifier for the specific risk factor. For example `name_match_sanction_list`. + + `description` + : `string` Description of the risk factor. + + `source` + : `string` Field or data point that triggered the risk factor. For example, `customer_details.name`. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. + --- + The amount must be at least INR 1.00. | The amount specified is less than the minimum amount. Currency subunits, such as paise (in the case of INR), should always be greater than 100. | Enter an amount equal to or greater than the minimum amount, that is 100. + --- + The **field name** is required. | A mandatory field is missing. | Ensure all mandatory fields and values are present. + --- + Only english alphabets are allowed in customer name. | The customer name provided in the request contains characters other than English alphabets, such as numbers, special characters, regional language characters, or emojis. | Ensure that the name field in the request contains only English letters (A-Z, a-z) and meets the validation criteria: - Verify that the name does not include numerical characters, special characters (For example, @, #, $, and so on.), or non-Latin scripts. +- Confirm that there are no extra spaces at the beginning or end of the name. + + --- + Customer name should be between 5 and 50 characters. | The `name` field provided in the request does not meet the required character length. It is either shorter than 5 characters or exceeds 50 characters. | - Ensure that the `name` field in the request is between 5 and 50 characters long. +- Check that no extra spaces are included at the beginning or end of the name, which might affect the character count. + + --- + Customer name is invalid. | The `name` field provided in the request does not meet the validation requirements. This could be due to the presence of disallowed characters, such as special characters, numbers, regional language characters, or the use of non-Latin scripts. | - Ensure that the `name` field only contains English letters (A-Z, a-z) and spaces (not at the beginning). +- Verify that the name does not include special characters, numerical digits, emojis, or regional language characters. +- Check for unintended characters that may have been included by mistake (For example, trailing spaces or special symbols). + + --- + Only English alphabet is allowed in City and State. | The `city` or `state` field in the request contains invalid characters such as numbers, special characters, or regional language text. | - Ensure that the `city` and `state` fields only contain English letters (A-Z, a-z) and spaces. +- Verify that these fields do not include numerical characters, special characters, or regional language scripts. + + --- + Address line 1 and line 2 can only contain alphanumeric characters and limited special characters. | The `Address line1` or `Address line2` field in the request contains invalid characters that are not allowed, such as unsupported symbols or regional language characters. | - Ensure that `Address line1` and `Address line2` only include alphanumeric characters (A-Z, a-z, 0-9) and allowed special characters (For example, *&/-()#_+{}[]:'".,). +- Verify that no unsupported symbols or regional language scripts are included. + + + + + + + +### Step 2: Fetch Order With Updated Risk Assessment (optional) + +After creating an order, retrieve the updated risk assessment. + +/orders/:order_id?expand[]=order.reviews + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET "https://api.razorpay.com/v1/orders/order_EKwxwAgItmmXdp?expands[]=order.reviews" +``` + +```json: Success +{ + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071, + "reviews": { + "entity": "collection", + "count": 1, + "items": [ + { + "screening": "aml", + "risk_tier": "high", + "risk_factors_count": 1, + "risk_factors": [ + { + "reason": "name_match_sanction_list", + "description": "please share date of birth for better aml precision", + "source": "customer_details.name" + } + ] + } + ] + } +} +``` + + + Query Parameters + + `expands[]=order.reviews` + : `string` Use to expand the AML risk assessment details for an order. Returns the `reviews` object containing risk tier, risk factors count, and detailed risk factors with reasons, descriptions and sources. + + + +### Response Parameters + + `amount` + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` Indicates the Unix timestamp when this order was created. + + `currency` + : `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. For example, `offer_JHD834hjbxzhd38d`. + + `receipt` + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order changes to the `attempted` state following the first payment attempt and remains in this state until at least one payment is successfully processed and captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. + The order stays in the `paid` state even if the payment associated with the order is refunded. + + `reviews` + : `object` Contains all risk assessment results. + + `entity` + : `string` Type of object. Here it is `collection`. + + `count` + : `integer` Number of risk assessments performed. + + `items` + : `array` List of risk assessment results. + + `screening` + : `string` Type of screening performed. Here it is `aml`. + + `risk_tier` + : `string` Overall risk level of the transaction. Possible values: + - `high` + - `medium` + - `low` + - `pending` + + `risk_factors_count` + : `integer` Number of risk factors identified. + + `risk_factors` + : `array` Detailed risk factor information. + + `reason` + : `string` Identifier for the specific risk factor. For example `name_match_sanction_list`. + + `description` + : `string` Description of the risk factor. + + `source` + : `string` Field or data point that triggered the risk factor. For example, `customer_details.name`. + + + + + +### Step 3: Patch Order (If High Risk) + +Reduce the risk score by providing additional customer compliance information to the flagged order. + +/orders/:order_id + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PATCH https://api.razorpay.com/v1/orders/order_EKwxwAgItmmXdp \ +-H "Content-Type: application/json" \ +-d '{ + "customer_details": { + "type": "individual", + "name": "", + "email": "", + "contact": "", + "individual": { + "date_of_birth": { + "day": 27, + "month": 11, + "year": 1993 + }, + "place_of_birth": "Bengaluru", + "tax_identity": [ + { + "name": "PAN", + "value": "ABCDE1234F" + } + ] + } + } +}' +``` + +```json: Success +{ + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 2200, + "amount_paid": 0, + "amount_due": 2200, + "currency": "", + "receipt": "Receipt#211", + "offer_id": null, + "status": "attempted", + "attempts": 1, + "customer_details": { + "name": "", + "email": "", + "contact": "", + "business_type": "individual", + "individual": { + "date_of_birth": { + "day": 27, + "month": 11, + "year": 1993 + }, + "place_of_birth": "Bengaluru", + "tax_identity": [ + { + "name": "PAN", + "value": "ABCDE1234F" + } + ] + } + }, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "created_at": 1572505143, + "updated_at": 1723283456 +} +``` + + + Request Parameters + + `customer_details` _mandatory_ + : `object` This contains details about the customer. + + `type` _optional_ + : `string` Indicates whether the customer is an individual or business entity. Possible values: + - `company` + - `individual` + + +> **WARN** +> +> +> **Watch Out!** +> +> For transactions exceeding ₹2,50,000: +> - **Individual customers**: PAN is mandatory. +> - **Business customers**: GSTIN is mandatory. +> + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (For example, @, ", ,, ., and so on.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (For example, aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919123456780`. + + `individual` + : `object` Required when `business_type` is `individual`. + + `date_of_birth` + : `object` Customer's date of birth (individuals) or date of incorporation (businesses). + + `day` + : `integer` Day of birth/incorporation (1-31). + + `month` + : `integer` Month of birth/incorporation (1-12). + + `year` + : `integer` Year of birth/incorporation (4-digit format). + + `place_of_birth` + : `string` Place where the customer was born or place of incorporation for businesses. + + `tax_identity` + : `array` List of tax identifiers. + + `name` + : `string` Type of tax identifier. + + `value` + : `string` The identifier value matching the expected format. + + + +### Response Parameters + + `amount` + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` Indicates the Unix timestamp when this order was created. + + `currency` + : `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. For example, `offer_JHD834hjbxzhd38d`. + + `receipt` + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order changes to the `attempted` state following the first payment attempt and remains in this state until at least one payment is successfully processed and captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. + The order stays in the `paid` state even if the payment associated with the order is refunded. + + `customer_details` _mandatory_ + : `object` This contains details about the customer. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (For example, @, ", ,, ., and so on.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (For example, aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919123456780`. + + `business_type` _optional_ + : `string` Indicates whether the customer is an individual or business entity. Possible values: + - `company` + - `individual` + + +> **WARN** +> +> +> **Watch Out!** +> +> For transactions exceeding ₹2,50,000: +> - **Individual customers**: PAN is mandatory. +> - **Business customers**: GSTIN is mandatory. +> + + `individual` + : `object` Required when `business_type` is `individual`. + + `date_of_birth` + : `object` Customer's date of birth (individuals) or date of incorporation (businesses). + + `day` + : `integer` Day of birth/incorporation (1-31). + + `month` + : `integer` Month of birth/incorporation (1-12). + + `year` + : `integer` Year of birth/incorporation (4-digit format). + + `place_of_birth` + : `string` Place where the customer was born or place of incorporation for businesses. + + `tax_identity` + : `array` List of tax identifiers. + + `name` + : `string` Type of tax identifier. + + `value` + : `string` The identifier value matching the expected format. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. + --- + The amount must be at least INR 1.00. | The amount specified is less than the minimum amount. Currency subunits, such as paise (in the case of INR), should always be greater than 100. | Enter an amount equal to or greater than the minimum amount, that is 100. + --- + The **field name** is required. | A mandatory field is missing. | Ensure all mandatory fields and values are present. + --- + Only english alphabets are allowed in customer name. | The customer name provided in the request contains characters other than English alphabets, such as numbers, special characters, regional language characters, or emojis. | Ensure that the name field in the request contains only English letters (A-Z, a-z) and meets the validation criteria: - Verify that the name does not include numerical characters, special characters (For example, @, #, $ and so on.), or non-Latin scripts. +- Confirm that there are no extra spaces at the beginning or end of the name. + + --- + Customer name should be between 5 and 50 characters. | The `name` field provided in the request does not meet the required character length. It is either shorter than 5 characters or exceeds 50 characters. | - Ensure that the `name` field in the request is between 5 and 50 characters long. +- Check that no extra spaces are included at the beginning or end of the name, which might affect the character count. + + --- + Customer name is invalid. | The `name` field provided in the request does not meet the validation requirements. This could be due to the presence of disallowed characters, such as special characters, numbers, regional language characters, or the use of non-Latin scripts. | - Ensure that the `name` field only contains English letters (A-Z, a-z) and spaces (not at the beginning). +- Verify that the name does not include special characters, numerical digits, emojis, or regional language characters. +- Check for unintended characters that may have been included by mistake (For example, trailing spaces or special symbols). + + --- + Only English alphabet is allowed in City and State. | The `city` or `state` field in the request contains invalid characters such as numbers, special characters, or regional language text. | - Ensure that the `city` and `state` fields only contain English letters (A-Z, a-z) and spaces. +- Verify that these fields do not include numerical characters, special characters, or regional language scripts. + + --- + Address line 1 and line 2 can only contain alphanumeric characters and limited special characters. | The `Address line1` or `Address line2` field in the request contains invalid characters that are not allowed, such as unsupported symbols or regional language characters. | - Ensure that `Address line1` and `Address line2` only include alphanumeric characters (A-Z, a-z, 0-9) and allowed special characters (For example, *&/-()#_+{}[]:'".,). +- Verify that no unsupported symbols or regional language scripts are included. + + + + + + + +### Step 4: Create a Payment + +Once the order is created, pass the order_id from the Orders API response to the [Create a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/build-integration.md#13-create-a-payment). + + +### S2S API Integration with Automatic Order Failure + + +### Automatic Failure Implementation + +**How it works:** + - Razorpay automatically fails transactions predicted to be AML-positive at the Create Order step. + - Orders identified as high-risk are declined before payment processing. + - No additional data collection required from customers. + - Receive T+1 reports showing failed order statistics. + +**Best for:** + - Businesses prioritising zero AML risk. + - Use cases where declining high-risk transactions is acceptable. + - Businesses unable to implement additional data collection. + +**Reporting:** + - Daily T+1 reports showing: + - Number of orders failed due to AML. + - Percentage of total orders affected. + + +## Support + +For further assistance, reach out to our [Support team](https://razorpay.com/support) or email us at `import-mission@razorpay.com`. + +### Related Information + +[Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/test-integration.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/build-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/build-integration.md new file mode 100644 index 00000000..7c1f42ee --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/build-integration.md @@ -0,0 +1,959 @@ +--- +title: 1. Build Integration +description: Steps to integrate with Razorpay Import Flow for a seamless payment solution for International Businesses. +--- + +# 1. Build Integration + +Given below are the steps to integrate with the Import Flow APIs. + +## 1.1 Create a Customer + +Creating a customer generates a unique `customer_id` by collecting basic details such as name, email, and contact details. This `customer_id` must be included when creating a payment request to link the payment to the customer. Use the following API to create a customer. + +You can try out our APIs on the Razorpay Postman Public Workspace. Fork the workspace and test the APIs with your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +/customers + +```cURL: Curl + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "contact": "9123456780", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name","Gaurav Kumar"); +customerRequest.put("contact","9123456780"); +customerRequest.put("email","gaurav.kumar@example.com"); +customerRequest.put("fail_existing","0"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} + +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->create(array('name' => 'Gaurav Kumar', 'email' => 'gaurav.kumar@example.com','contact'=>'9123456780','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", "Gaurav Kumar"); +options.Add("contact", "9123456780"); +options.Add("email", "gaurav.kumar@example.com"); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({ + name: "Gaurav Kumar", + contact: 9123456780, + email: "gaurav.kumar@example.com", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +``` + +```json: Success +{ + "id": "cust_MpINfSkdEvtdxb", + "entity": "customer", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1697550382 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } +} +``` + + +### Request Parameters + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919123456780`. + + `email` _mandatory_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `fail_existing` _optional_ + : `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + `gstin` _optional_ + : `string` Customer's GST number, if available. + For example, `29XAbbA4369J1PA`. + + `notes` _optional_ + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `entity` _optional_ + : `string` Indicates the type of entity. + + `name` + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `contact` + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919123456780`. + + `email` + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `gstin` + : `string` GST number linked to the customer. + For example, `29XAbbA4369J1PA`. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. Know how to [Generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + --- + Contact number should be at least 8 digits, including country code. | The contact number is less than 8 digits. | Enter contact number that meets the validation criteria. It should have at least 8 digits, including the country code. For example, "+919123456780". + + + +## 1.2 Create an Order + +After a customer is created, an order needs to be generated using the Orders API. This order contains details such as the payment amount, currency, customer details, tax-related information and other custom notes. After the order is created, an `order_id` is generated, for example, `order_NGrgEcmYJsfUyl`. You must pass this `order_id` in the checkout code to associate this order with the payment. Learn more about [Order and Payment states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md#order-states). + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 10000, + "currency": "INR", + "receipt": "receipt#1", + "customer_id": "cust_OwZZseNBf9Uqsi", + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "identity": [ + { + "type": "tax_id", + "id": "HSCPE4563G" + } + ] + }, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +``` +```json: Success +{ + "amount": 10000, + "amount_due": 10000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1703569876, + "currency": "INR", + "entity": "order", + "id": "order_NGrgEcmYJsfUyl", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "receipt": "receipt#1", + "status": "created" +} + +```json: Failure - Amount +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} + +```json: Failure - Customer Name +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "customer name is invalid", + "metadata": {}, + "reason": "input_validation_failed", + "source": "business", + "step": "payment_initiation" + } +} + +```json: Failure - Address Line +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Address line 1 and line 2 can only contain aplhanumeric characters and limited special characters", + "metadata": {}, + "reason": "input_validation_failed", + "source": "business", + "step": "payment_initiation" + } +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. Payment can only be made for this amount against the Order. + + `currency` _mandatory_ + : `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. For example, `INR`. + + `receipt` _optional_ + : `string` Receipt number that corresponds to this order, set for your internal reference. Can have a maximum length of 40 characters and has to be unique. + + `customer_id` _mandatory_ + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `customer_details` _mandatory_ + : `string` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919123456780`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `identity` _optional_ + : `array` A list of identity objects containing customer identification details. + + `type` _optional_ + : `string` The type of identification document. For example, `tax_id`. + + `id` _optional_ + : `string` The identification number or value corresponding to the `type` provided. For example, `ABCDE1234F`. + + `notes` _optional_ + : `json object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `amount` + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` Indicates the Unix timestamp when this order was created. + + `currency` + : `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. For example, `offer_JHD834hjbxzhd38d`. + + `receipt` + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order changes to the `attempted` state following the first payment attempt and remains in this state until at least one payment is successfully processed and captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. + The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. + --- + The amount must be at least INR 1.00. | The amount specified is less than the minimum amount. Currency subunits, such as paise (in the case of INR), should always be greater than 100. | Enter an amount equal to or greater than the minimum amount, that is 100. + --- + The **field name** is required. | A mandatory field is missing. | Ensure all mandatory fields and values are present. + --- + Only english alphabets are allowed in customer name. | The customer name provided in the request contains characters other than English alphabets, such as numbers, special characters, regional language characters, or emojis. | Ensure that the name field in the request contains only English letters (A-Z, a-z) and meets the validation criteria: - Verify that the name does not include numerical characters, special characters (e.g., @, #, $, etc.), or non-Latin scripts. +- Confirm that there are no extra spaces at the beginning or end of the name. + + --- + Customer name should be between 5 and 50 characters. | The `name` field provided in the request does not meet the required character length. It is either shorter than 5 characters or exceeds 50 characters. | - Ensure that the `name` field in the request is between 5 and 50 characters long. +- Check that no extra spaces are included at the beginning or end of the name, which might affect the character count. + + --- + Customer name is invalid. | The `name` field provided in the request does not meet the validation requirements. This could be due to the presence of disallowed characters, such as special characters, numbers, regional language characters, or the use of non-Latin scripts. | - Ensure that the `name` field only contains English letters (A-Z, a-z) and spaces (not at the beginning). +- Verify that the name does not include special characters, numerical digits, emojis, or regional language characters. +- Check for unintended characters that may have been included by mistake (e.g., trailing spaces or special symbols). + + --- + Only English alphabet is allowed in City and State. | The `city` or `state` field in the request contains invalid characters such as numbers, special characters, or regional language text. | - Ensure that the `city` and `state` fields only contain English letters (A-Z, a-z) and spaces. +- Verify that these fields do not include numerical characters, special characters, or regional language scripts. + + --- + Address line 1 and line 2 can only contain alphanumeric characters and limited special characters. | The `Address line1` or `Address line2` field in the request contains invalid characters that are not allowed, such as unsupported symbols or regional language characters. | - Ensure that `Address line1` and `Address line2` only include alphanumeric characters (A-Z, a-z, 0-9) and allowed special characters (e.g., *&/-()#_+{}[]:'".,). +- Verify that no unsupported symbols or regional language scripts are included. + + + + +## 1.3 Create a Payment + + +### 1.3.1 Create a Payment Using Netbanking or Cards + +Create a payment using the S2S JSON Payments API. + +/payments/create/json + + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ + -d '{ + "amount": "10000", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "customer_id": "cust_MpINfSkdEvtdxb", + "order_id": "order_NGrgEcmYJsfUyl", + "ip": "192.168.0.103", + "method": "netbanking", + "bank": "YESB", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + } +}' + +```json: Success +{ + "razorpay_payment_id": "pay_Myff1gPuKp3035", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/Myff1gPuKp3035/authenticate" + } + ] +} +``` + + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ + -d '{ + "amount": "10000", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "customer_id": "cust_MpINfSkdEvtdxb", + "order_id": "order_NGrgEcmYJsfUyl", + "ip": "192.168.0.103", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 23, + "cvv": 100 + }, + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + } +}' + +```json: Success +{ + "razorpay_payment_id": "pay_Myff1gPuKp3035", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/Myff1gPuKp3035/authenticate" + } + ] +} +``` + + + + +### 1.3.2 Create a Payment Using UPI + +There are 2 UPI flows available for S2S. + +- **Intent Flow:** When a customer selects the UPI payment app on checkout, the app is launched automatically on the mobile device. Customers need not enter VPA or phone numbers as these details are prefilled and submitted along with the other payment details. +- **Collect Flow:** Customers enter their VPAs, open the respective UPI apps and complete the payment on their mobile devices. + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/s2s-integration.md). +> + +/payments/create/upi + + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/upi \ +-H "Content-Type: application/json" \ +-d '{ + "amount": "10000", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "customer_id": "cust_MpINfSkdEvtdxb", + "order_id": "order_NGrgEcmYJsfUyl", + "ip": "192.168.0.103", + "method": "upi", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + }, + "upi": { + "flow" : "intent" + } +}' + +```json: Success +{ + "link": "upi://pay?am=1.00&cu=INR&mc=6300&mode=04&pa=demo920134.rzp@rxaxis&pn=deeptanshu&tr=Qj0AKJ5fgbMBqZ", + "razorpay_payment_id": "pay_Qj0AKJ5fgbMBqZ" +} +``` + + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/upi \ +-H "Content-Type: application/json" \ +-d '{ + "amount": "10000", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "customer_id": "cust_MpINfSkdEvtdxb", + "order_id": "order_NGrgEcmYJsfUyl", + "ip": "192.168.0.103", + "method": "upi", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + }, + "upi": { + "flow": "collect", + "vpa": "gauravkumar@exampleupi", + "expiry_time": 5 + } +}' + +```json: Success +{ + "razorpay_payment_id": "pay_Myff1gPuKp3035", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/Myff1gPuKp3035/authenticate" + } + ] +} +``` + + + + +### Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. + + `currency` _mandatory_ + : `string` Currency code for the currency in which you want to accept the payment. For example, `INR`. + + `email` _mandatory_ + : `string` Email address of the customer. Maximum length supported is 40 characters. + + `contact` _mandatory_ + : `string` Phone number of the customer. For example, 9123456780. + + `customer_id` _mandatory_ + : `string` Unique identifier of the customer. + + `order_id` _mandatory_ + : `string` Unique identifier of the Order. + Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + `ip` _optional_ + : `string` Customer's IP address. + + `method` _mandatory_ + : `string` Name of the payment method. Possible values are: + - `card` + - `netbanking` + - `upi` + + `notes` _mandatory_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. + + + +### Response Parameters + + If the payment request is valid, the response contains the following fields. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + `next` + : `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. The value here is `redirect`. Use this URL to redirect customer to the bank page. + + `url` + : `string` URL to be used for the action indicated. + + +> **WARN** +> +> +> **Watch Out!** +> +> - The `invoice_number` field is mandatory for all payment methods. Ensure each payment has a unique invoice number. +> - Refer to the [Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md) section for other payment options request parameters. +> + +Following payment methods are supported under the Import Flow: +- Netbanking +- UPI +- Cards (Debit and Credit) +- [Recurring](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments.md) + +For recurring payments, additional integration is needed. Cards, UPI, and UPI with TPV are supported as a payment methods. + +## 1.4 Handle Payment Success and Error Events + +Once the payment is completed by the customer, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + + +### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + + + +### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) for details. + + +## 1.5 Verify Payment Signature +Signature verification is a mandatory step to ensure that the callback is sent by Razorpay. The `razorpay_signature` contained in the callback can be regenerated by your system and verified as follows. + +Create a string for hashing by combining the "razorpay_payment_id" from the callback and the Order ID generated in the initial step, separated by a `|`. Proceed to hash this string using SHA256 alongside your API Secret. + +``` +generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + +if (generated_signature == razorpay_signature) { + payment is successful +} +``` + +### Generate Signature on your Server + + +### Sample code + +```java: Java +/** +* This class defines common routines for generating +* authentication signatures for Razorpay Webhook requests. +*/ +public class Signature +{ + private static final String HMAC_SHA256_ALGORITHM = "HmacSHA256"; + /** + * Computes RFC 2104-compliant HMAC signature. + * * @param data + * The data to be signed. + * @param key + * The signing key. + * @return + * The Base64-encoded RFC 2104-compliant HMAC signature. + * @throws + * java.security.SignatureException when signature generation fails + */ + public static String calculateRFC2104HMAC(String data, String secret) + throws java.security.SignatureException + { + String result; + try { + + // get an hmac_sha256 key from the raw secret bytes + SecretKeySpec signingKey = new SecretKeySpec(secret.getBytes(), HMAC_SHA256_ALGORITHM); + + // get an hmac_sha256 Mac instance and initialize with the signing key + Mac mac = Mac.getInstance(HMAC_SHA256_ALGORITHM); + mac.init(signingKey); + + // compute the hmac on input data bytes + byte[] rawHmac = mac.doFinal(data.getBytes()); + + // base64-encode the hmac + result = DatatypeConverter.printHexBinary(rawHmac).toLowerCase(); + + } catch (Exception e) { + throw new SignatureException("Failed to generate HMAC : " + e.getMessage()); + } + return result; + } +} + +```php: PHP +use Razorpay\Api\Api; +$api = new Api($key_id, $key_secret); +$attributes = array('razorpay_signature' => '23233', 'razorpay_payment_id' => '332' , 'razorpay_order_id' => '12122'); +$order = $api->utility->verifyPaymentSignature($attributes) + +```ruby: Ruby +require 'razorpay' +Razorpay.setup('key_id', 'key_secret') +payment_response = { + 'razorpay_order_id': '12122', + 'razorpay_payment_id': '332', + 'razorpay_signature': '23233' +} + +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET + Dictionary attributes = new Dictionary(); + + attributes.Add("razorpay_payment_id", paymentId); + attributes.Add("razorpay_order_id", Request.Form["razorpay_order_id"]); + attributes.Add("razorpay_signature", Request.Form["razorpay_signature"]); + + Utils.verifyPaymentSignature(attributes); +```nodejs: Node.js +var { validatePaymentVerification } = require('./dist/utils/razorpay-utils'); + +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); +```Go: Go +import ( + "crypto/hmac" + "crypto/sha256" + "crypto/subtle" + "encoding/hex" + "fmt" +) + +func main() { + signature := "477d1cdb3f8122a7b0963704b9bcbf294f65a03841a5f1d7a4f3ed8cd1810f9b" + secret := "qp3zKxwLZxbMORJgEVWi3Gou" + data := "order_J2AeF1ZpvfqRGH|pay_J2AfAxNHgqqBiI" + //fmt.Printf("Secret: %s Data: %s\n", secret, data) + + // Create a new HMAC by defining the hash type and the key (as byte array) + h := hmac.New(sha256.New, []byte(secret)) + + // Write Data to it + _, err := h.Write([]byte(data)) + + if err != nil { + panic(err) + } + + // Get result and encode as hexadecimal string + sha := hex.EncodeToString(h.Sum(nil)) + + fmt.Printf("Result: %s\n", sha) + + if subtle.ConstantTimeCompare([]byte(sha), []byte(signature)) == 1 { + fmt.Println("Works") + } +} +``` + + +## 1.6 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/test-integration.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/business-onboarding.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/business-onboarding.md new file mode 100644 index 00000000..02581e56 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/business-onboarding.md @@ -0,0 +1,303 @@ +--- +title: Onboarding Documents for Razorpay Import Flow +description: List of Documents required for non-Indian companies and business types to onboard with Razorpay Import Flow. +--- + +# Onboarding Documents for Razorpay Import Flow + +Import Flow is a payment solution designed for International (non-Indian) businesses to accept payments from Indian customers. + +Your Indian customers can make payments using local payment methods such as UPI, credit cards, debit cards and netbanking. The funds are settled in your overseas bank account. Know more about [Import Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers.md). + +> **INFO** +> +> +> +> **Onboarding Request** +> +> Please fill out the [form](https://form.typeform.com/to/C5OlR4YQ) to sign up. Someone from our team will reach out to get this service activated on your account. +> + +> **WARNING** +> +> +> **Handy Tips** +> +> - SWIFT-enabled bank account is mandatory for international settlements. +> - All sections such as Privacy Policy, Pricing, About Us, Contact Us, Refund Policy and Shipping Policy (if selling physical goods) of your website must be updated with accurate and current information before submission. +> + +Below are the onboarding documents required for companies and businesses to activate Razorpay's Import Flow. + +## Document Categories + + +### KYC Documents Required for Account Activation + + + Document Type | Required Documents | Important Notes + --- + Bank Statement | Bank statement showing bank account information | SWIFT Code should be clearly visible. + --- + Proof of Identity of Authorised Signatory | Passport/Driving license of Authorised Signatory | Address must be clearly visible. + --- + Proof of Address of Authorised Signatory | Passport/Driving license of Authorised Signatory | Address must be clearly visible. + --- + Authorisation Documents | Power of Attorney or Board Resolution | Must explicitly authorise signatory for Razorpay services. + --- + Company Registration | Certificate of Incorporation | Must show complete company name and registration number. + + + +## Board Resolution Template or Power of Attorney + +- A Board Resolution is a formal record of the directors' approval granting that authority. +- A Power of Attorney is a legal document that allows someone to act or sign on behalf of a company. + + +### This template includes: + +- Explicit authorisation for international payment acceptance. +- Clear designation of authorised signatory for Razorpay Merchant Services. +- Authority to link bank accounts and handle transactional matters. +- Authority to submit KYC documentation and compliance requirements. + +Refer to the Board Resolution Template. + +> **INFO** +> +> +> **Handy Tip** +> +> The Board Resolution must explicitly mention Razorpay Merchant Services and authorisation for accepting international payments in India. Use the template and customise it with your company details. +> + + + +## Purpose Codes for International Transactions + +When accepting payments from Indian customers, you must select the appropriate purpose code. This code is mandatory per RBI regulations and categorises the nature of your transaction. + + +### Import (Goods) + + + Category | Description + --- + S0101 | Advance payment against imports made to countries other than Nepal and Bhutan. + --- + S0102 | Payment towards imports - settlement of invoice other than Nepal and Bhutan. + --- + S0103 | Imports by diplomatic missions other than Nepal and Bhutan. + --- + S0104 | Intermediary trade/transit trade, that is third country export passing through India. + --- + S0108 | Goods acquired under merchanting/payment against import leg of merchanting trade. + --- + + + + +### Transport Services + + + Category | Description + --- + S0201 | Payments for surplus freight/passenger fare by foreign shipping companies operating in India. + --- + S0202 | Payment for operating expenses of Indian shipping companies operating abroad. + --- + S0203 | Freight on imports - Shipping companies. + --- + S0204 | Freight on exports - Shipping companies. + --- + S0205 | Operational leasing/rental of vessels (with crew) - Shipping companies. + --- + S0206 | Booking of passages abroad - Shipping companies. + --- + S0207 | Payments for surplus freight/passenger fare by foreign airlines companies operating in India. + --- + S0208 | Operating expenses of Indian airlines companies operating abroad. + --- + S0209 | Freight on imports - Airlines companies. + --- + S0210 | Freight on exports - Airlines companies. + --- + S0211 | Operational leasing/rental of vessels (with crew) - Airline companies. + --- + S0212 | Booking of passages abroad - Airlines companies. + --- + S0214 | Payments on account of stevedoring, demurrage and port handling charges (Shipping companies). + --- + S0215 | Payments on account of stevedoring, demurrage and port handling charges (Airlines companies). + --- + S0216 | Payments for passenger - Shipping companies. + --- + S0217 | Other payments by shipping companies. + --- + S0218 | Payments for passenger - Airlines companies. + --- + S0219 | Other payments by airlines companies. + --- + S0220 | Payments on account of freight under other modes of transport (Internal waterways, roadways, railways, pipeline transports and others). + --- + S0221 | Payments on account of passenger fare under other modes of transport (Internal waterways, roadways, railways, pipeline transports and others). + --- + S0222 | Postal and courier services by air. + --- + S0223 | Postal and courier services by sea. + --- + S0224 | Postal and courier services by others. + --- + + + + +### Travel Services + + + Category | Description + --- + S0301 | Business travel. + --- + S0303 | Travel for pilgrimage. + --- + S0304 | Travel for medical treatment. + --- + S0305 | Travel for education (including fees and hostel expenses). + --- + S0306 | Other travel (including holiday trips and payments for settling international credit cards transactions). + --- + + + + +### Insurance and Pension Services + + + Category | Description + --- + S0601 | Life insurance premium except term insurance. + --- + S0602 | Freight insurance - relating to import and export of goods. + --- + S0603 | Other general insurance premium including reinsurance premium and term life insurance premium. + --- + S0605 | Auxiliary services including commission on insurance. + --- + S0607 | Insurance claim settlement of non-life insurance and life insurance (only term insurance). + --- + S0608 | Life insurance claim settlements. + --- + S0610 | Premium for pension funds. + --- + S0611 | Periodic pension entitlements for example monthly, quarterly or yearly payments of pension amounts by Indian pension fund companies. + --- + + + + +### Telecommunication, Computer and Information Services + + + Category | Description + --- + S0801 | Hardware consultancy/implementation. + --- + S0802 | Software consultancy/implementation. + --- + S0803 | Database, data processing charges. + --- + S0804 | Repair and maintenance of computer and software. + --- + S0805 | News agency services. + --- + S0806 | Other information services - Subscription to newspapers and periodicals. + --- + S0807 | Off-site software imports. + --- + S0808 | Telecommunication services including electronic mail services and voice mail services. + --- + + + + +### Other Business Services + + + Category | Description + --- + S1003 | Operational leasing services (other than financial leasing) without operating crew, including charter hire - Airlines companies. + --- + S1004 | Legal services. + --- + S1005 | Accounting, auditing, book-keeping services. + --- + S1006 | Business and management consultancy and public relations services. + --- + S1007 | Advertising, trade fair service. + --- + S1008 | Research and development services. + --- + S1009 | Architectural services. + --- + S1013 | Environmental services. + --- + S1014 | Engineering services. + --- + S1015 | Tax consulting services. + --- + S1016 | Market research and public opinion polling service. + --- + S1017 | Publishing and printing services. + --- + S1020 | Commission agent services. + --- + S1021 | Wholesale and retailing trade services. + --- + S1022 | Operational leasing services (other than financial leasing) without operating crew, including charter hire - Shipping companies. + --- + S1023 | Other technical services including scientific/space services. + --- + + + + +### Personal, Cultural and Recreational Services + + + Category | Description + --- + S1101 | Audio-visual and related services like motion picture and video tape production, distribution and projection services. + --- + S1103 | Radio and television production, distribution and transmission services. + --- + S1104 | Entertainment services. + --- + S1105 | Museums, library and archival services. + --- + S1106 | Recreation and sporting activities services. + --- + S1107 | Education (for example fees for correspondence courses abroad). + --- + S1108 | Health service (payment towards services received from hospitals, doctors, nurses, paramedical and similar services rendered remotely or on-site). + --- + S1109 | Other personal, cultural and recreational services. + --- + + + + +### Manufacturing Services + + + Category | Description + --- + S1701 | Payments for processing of goods. + --- + + + +### Related Information + +[Accept International Payments From Indian Customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/faqs.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/faqs.md new file mode 100644 index 00000000..983a787f --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/faqs.md @@ -0,0 +1,221 @@ +--- +title: Frequently Asked Questions +description: Troubleshoot common error scenarios and find answers to frequently asked questions about Import Flow integration. +--- + +# Frequently Asked Questions + +## Common + + +### 1. What payment methods does Razorpay support for my customers? + + Razorpay supports a comprehensive range of payment methods including UPI, Netbanking, Credit/Debit Cards (Visa, Mastercard, RuPay, Diners Club, American Express) and Recurring Payments to provide your customers with maximum payment flexibility. + + + +### 2. Do you offer no-code payment solutions or simple integration options? + + Currently, we do not offer a no-code payment button solution. However, our payment gateway integration requires minimal coding effort, and our technical team handles all the complex backend processing. If you are looking for low-code solutions, you can explore [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md) or [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md), depending on your use case and eligibility. These options allow you to start accepting payments with minimal setup. + + To understand the customer checkout experience, try our [interactive demo](https://razorpay.com/demopg3/). To get started with integration, refer to our [integration guide](https://razorpay.com/docs/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/build-integration/). + + + +### 3. Can Razorpay handle recurring payments for subscription-based businesses? + + Yes, under the recurring payments model, you can charge the customer any amount up to the maximum mandate limit, based on the customer's usage. However, increasing the maximum mandate amount is not permitted as per regulations. To charge a higher amount, you must create a new mandate with the revised limit. + + + +### 4. Does Razorpay support pro-rated billing when customers upgrade or downgrade subscription plans? + + Yes, you can request mandate updates whenever customers need to upgrade or downgrade their subscription plans, enabling flexible billing management for your business. + + + +### 5. What dispute and chargeback management tools does Razorpay provide? + + Razorpay provides comprehensive dispute management tools including a dedicated dashboard to track all dispute cases, automated email notifications with detailed transaction information and an online portal for submitting supporting evidence. Additionally, you can configure webhook notifications to receive real-time alerts about dispute status changes. Know more about [disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md). + + + +### 6. How does Razorpay handle customer refunds? + + Razorpay supports both full and partial refunds that you can process instantly through our merchant dashboard or via API integration. This gives you complete control over your refund operations. Know more about [refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md). + + + +### 7. Can I track transactions in real-time? + + Yes, Razorpay provides comprehensive real-time transaction monitoring through our dashboard, API endpoints, and webhook notifications. You can instantly track payment statuses, settlements, refunds and all transaction activities as they occur. + + + +### 8. What business analytics and reporting tools are available? + + The Razorpay merchant dashboard provides detailed visibility into your transaction data, payment status tracking, visual charts, and comprehensive business insights. You can also configure custom reports tailored to your business needs. Explore our [dashboard features](https://razorpay.com/docs/payments/dashboard/) for complete details. + + + +### 9. What communications will my customers receive from Razorpay? + + Your customers will receive email confirmations upon successful payment completion. For recurring payments, we send SMS notifications 24 hours before scheduled debits to keep customers informed about upcoming charges. + + + +### 10. Is Razorpay compliant with financial security standards? + + Yes, Razorpay is PCI-DSS compliant, ensuring the highest standards of payment security. We are also licensed and regulated by the Reserve Bank of India as a Payment Aggregator - Payment Gateway (PA PG) and Payment Aggregator - Cross Border (PA CB), providing you with complete regulatory compliance. + + + +### 11. Can international merchants access all Razorpay features? + + Yes, international merchants have full access to all Razorpay features including the merchant dashboard, dispute management functionality, and all payment processing capabilities. You do not need to be an Indian-registered business to access these features and the dashboard is available regardless of your business location. + + + +### 12. What are the requirements for setting up a Razorpay account and going live + + To go live with Razorpay, your website must include essential business pages: + - Bank Statement + - Passport of Authorised Signatory + - Board Resolution + - Certificate of Incorporation. + + + +### 13. Can I disable the email notifications that Razorpay sends to my customers for successful payments and refunds? + + Yes, you can control customer email notifications. For Server-to-Server (S2S) integrations, you can disable email notifications by setting the `email` parameter to "false" under the `notify` object in your API request. Refer to our [Payment Links customisation documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/customise-payment-methods.md) for more details. Alternatively, you can contact our [support team](https://razorpay.com/support/) to have this setting configured for your account. + + +## Anti-Money Laundering + + +### 1. Why are certain transactions being flagged for AML? + + Transactions are flagged by our Authorised Dealer (AD) bank's compliance team during mandatory AML checks. Screening is usually based on name matches with sanction/watchlists (OFAC, UN, EU, UK and internal/government lists). If there is a potential match, the bank requests additional information (for example, date of birth, place of birth, address, nationality). + + + +### 2. What information may be requested for flagged transactions? + + Depending on the case, banks may request the following information: + + - **For Individuals**: Full name, address, date of birth, place of birth, national id, passport number, nationality, citizenship. + + - **For Entities**: Full Name, registered address, nature of business, ownership with percentages, website, purpose of payment. + + + +### 3. What happens if we do not provide the requested details? + + The bank cannot settle the transaction without the required details. Funds are kept on hold and may eventually be reported to the Government as unclaimed. Customers are not automatically refunded. If required, refunds must be initiated by the platform/business (possibly up to 6 months). + + + +### 4. Will customers be refunded automatically if a transaction is rejected? + + No. Funds are not refunded automatically. Business/platforms may choose to initiate a refund to the customer. If information is provided later (even after the timeline), we can attempt to re-settle the transaction with the bank. + + + +### 5. What short-term measures can reduce AML flags? + + Mandating full names (first and last) at checkout reduces flagged transactions by 50%. Collecting date of birth at checkout reduces false positives by 70%+. Address capture, wherever possible, can also help. + + + +### 6. What are the long-term solutions? + + Razorpay is building real-time AML detection for the following: + + - **Hosted Checkout**: Users are asked for additional info (DOB and so on.) only if flagged. + + - **API/S2S flows**: The AML risk score is shared in the create order API response. + + + +### 7. What are the integration options for handling AML? + + a. **Fail upfront**: Razorpay fails orders at the create order API stage if a likely AML flag is detected. + + b. **Risk Score**: Razorpay provides a risk score. The partner can request DOB or block the order. + + c. **Post-flag data collection**: Partner collects additional information only for flagged cases and shares via API (PATCH Order). + + + +### 8. How quickly can AML solutions be enabled? + + Pre-screening/fail-at-order can be enabled within 1 business day of request. Reports on AML-flagged/fail transactions are currently shared manually (T+2), with automation in progress. + + + +### 9. Who bears liability if users refuse to share AML information? + + If AML information is not provided, the bank will not settle the funds. The platform/business can refund the user to revoke access to the service/product. Funds that are not refunded remain on hold until settled or reported to authorities. + + + +### 10. Are there cultural concerns in collecting DOB? + + In India, collecting DOB for payment verification is common and acceptable. However, in some geographies (for example, Japan), DOB collection may face user friction. In such cases, partners can rely on full name and address improvements to reduce AML hits while selectively using DOB collection only when flagged. + + +## Invoice Collection and Secure File Transfer Protocol (SFTP) + + +### 1. What key format should I use to upload invoices? + + You must use one of the supported SSH key formats mentioned in our documentation. Using an unsupported or incorrectly formatted key will result in authentication failure. + + **Supported formats**: + - RSA (2048-bit or higher). For example, `ssh-rsa`. + - ECDSA. For example, `ssh-ecdsa`. + - Ed25519. For example, `ssh-ed25519`. + + Ensure your public key is in the correct format before sharing it with Razorpay. + + + +### 2. Can I access the SFTP from any IP address? + + No. You can whitelist a maximum of 4 IP addresses. SFTP access will work only from the whitelisted IPs. Attempting to connect from any other IP address will result in connection failure. + + + +### 3. Which key should I use to access Razorpay's SFTP? + + You must use your private key to authenticate whilst connecting to Razorpay's SFTP. + + - **Public key**: Uploaded to Razorpay. + - **Private key**: Used by you to access SFTP. + + Never share your private key with anyone. If you have multiple public keys configured with Razorpay, ensure you use the correct corresponding private key for authentication. + + + +### 4. What is the correct folder path to upload invoices? + + Invoices must be uploaded to the following directory structure: + + `/invoiceUpload/automated///` + + For example: + `/invoiceUpload/automated/MDoeHNNpi0nB7m/2025-05-10/INV_09876.pdf` + + **Important**: + - You must include your Merchant ID (MID) in the path. + - You must include the date folder in `YYYY-MM-DD` format. + - Missing either component will result in upload failure. + + + +### 5. Can I delete or modify the uploaded invoices? + + No. Once an invoice is uploaded, it becomes read-only and cannot be edited, renamed or deleted via SFTP. This ensures invoice integrity and compliance with audit requirements. + + If you need to correct an invoice, upload a new file with a different invoice number. Do not attempt to upload the same invoice multiple times to the same path. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/go-live-checklist.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/go-live-checklist.md new file mode 100644 index 00000000..4703c43c --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/go-live-checklist.md @@ -0,0 +1,76 @@ +--- +title: 3. Go-live Checklist +description: Start accepting Live Payments through Razorpay Payment Gateway. +--- + +# 3. Go-live Checklist + +Consider these steps before taking the integration live. + +## 1. Accept Live Payments + +Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + +## 2. Payment Capture + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +## 3. Set Up Webhooks + +Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/invoice-collection.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/invoice-collection.md new file mode 100644 index 00000000..30fc51b5 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/invoice-collection.md @@ -0,0 +1,191 @@ +--- +title: Invoice Collection +description: Automate invoice uploads and buyer details with seamless SFTP integration. +--- + +# Invoice Collection + +> **WARN** +> +> +> **Watch Out!** +> +> 1. Invoice collection is mandatory for any import payment to be eligible for settlement. +> 2. Turnaround Time (TAT) for settlement begins **only after a valid invoice** is uploaded. +> 3. Ensure each invoice contains the following details: +> - Unique invoice number (Partner's invoice ID or Razorpay Order ID). +> - Partner's or business name. +> - Partner's or business address. +> - Customer's complete address. +> - Description of goods/services. +> - Units sold (time period, quantity and so on). +> - Amount in INR (2 decimal places only. For example, ). +> - Taxes applied. +> + +## Invoice Submission via SFTP + +You can automate invoice uploads using **Secure File Transfer Protocol (SFTP)**, enabling streamlined, secure file transfer. + +### Steps to Connect with Razorpay via SFTP + + +### 1. Share Your Public Key + + - Required for setting up SFTP credentials and folder access. + - Submit your SSH public key to your Razorpay point of contact. + - **Supported SSH key formats**: + - RSA (2048-bit or higher). For example, `ssh-rsa`. + - ECDSA. For example, `ssh-ecdsa`. + - Ed25519. For example, `ssh-ed25519`. + - Ensure your key is in the correct format. Using an unsupported or incorrectly formatted key will result in authentication failure. + + +> **WARN** +> +> +> **Watch Out!** +> +> Never share your private key with anyone. Only the public key should be provided to Razorpay. +> + + + + +### 2. IP Whitelisting + + - Only requests from your whitelisted IPs will be accepted. + - Share a list of authorised outbound IPs to enable secure access. + - Maximum of 4 IP addresses can be whitelisted. + - SFTP access will work only from the whitelisted IPs. Attempting to connect from any other IP address will result in connection failure. + + + +### 3. Credentials & Access Details + + - Razorpay will provide: + - Hostname: `sftp.razorpay.com` + - Port: `22` + - Username + - Path prefix (based on your `MID`) + - Use your **private key** (corresponding to the public key you shared) to authenticate while connecting to Razorpay's SFTP. + - Use an SFTP client to connect. + - **Test your connection**: Run `telnet sftp.razorpay.com 22` to verify connectivity before attempting SFTP access. + + +## How to Share Invoices via SFTP + + +### File Path Format + +Use the following folder and file structure: +"/invoiceUpload/automated//YYYY-MM-DD/InvoiceNumber.pdf." + +For example: `/invoiceUpload/automated/MDoeHNNpi0nB7m/2025-05-10/INV_09876.pdf` + +> **WARN** +> +> +> **Watch Out!** +> +> - You must include your Merchant ID (MID) in the path. +> - You must include the date folder in `YYYY-MM-DD` format. +> - Missing either component will result in upload failure. +> - Once uploaded, invoices become read-only. You cannot edit, rename or delete files after you upload. +> - Do not attempt to upload the same invoice multiple times to the same path. +> + + + + +### File Types and Flows + +Direction | Filename Format | Description +--- +Client → Razorpay | `InvoiceNumber.pdf` | Inbound File: This will be the invoices submitted by you to Razorpay. It should always be in PDF format. Example: `INV_09876.pdf` + + + +## Invoice ID Validation Process + +Razorpay enforces strong validation rules to prevent duplicate or invalid invoice usage. + + +### Successful Payments + + - **Status**: `Captured` + - **Invoice Action**: Permanently blocked + - **Note**: Same invoice ID cannot be reused. + + + +### Failed Payments + + - **Status**: `Failed` + - **Invoice Action**: Released + - **Note**: Invoice ID can be reused. + + + +### Payments in Intermediate States + + - **Status**: `Created` or `Authorised` + - **Invoice Action**: Temporarily blocked + - **Note**: Invoice ID is reusable only after final status (`Failed` or `Captured`) is reached. + + +### Refunded Payments + + +### Auto-Refunded (Never Captured) + + - **Status**: `Refunded` + - **Action**: Invoice ID is released. + - **Note**: ID can be reused. + + + +### Merchant-Initiated Refund (Post-Capture) + + - **Status**: `Refunded` + - **Action**: Invoice ID is permanently blocked. + - **Note**: Cannot be reused. + + +Partial capture scenarios are not validated by default. Contact Razorpay [Support team](https://razorpay.com/support/). + +## AML Screening Process + +As per RBI regulations, payments to offshore accounts must undergo AML (Anti-Money Laundering) checks by Razorpay's Authorised Dealer (AD) Bank. + + +### Daily AML Communication + + - You will receive daily emails listing transactions **flagged** for additional details. + - **Subject Line**: `Additional Details Required - [Business Name]_MDoeHNNpi0nB7m`. + + + +### Turnaround Time + + - Share required information within **5 working days** to avoid auto-cancellation. + - Information may include: Full name, address, ownership, percentage of ownership, nature of business, purpose of payment, business website, company, date of birth/incorporation, place of birth/incorporation and so on. + + + +### Consequences of Delay + + Missing TAT results in: + - Razorpay lien-marking the funds or + - Refund initiation via Dashboard/API. + + +## Best Practices for Invoice IDs + +To ensure seamless experience and compliance: + +- **Always generate unique invoice IDs** per payment. +- Acceptable IDs: + - Razorpay `order_id`. + - Your internal unique invoice number. +- Do not reuse invoice IDs for different transactions unless the original payment has failed. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments.md new file mode 100644 index 00000000..650e16e0 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments.md @@ -0,0 +1,46 @@ +--- +title: Import Flow Recurring Payments API +description: Integrate Import Flow Recurring Payments using Razorpay APIs. +--- + +# Import Flow Recurring Payments API + +Import Flow is a payment solution designed for International (non-Indian) businesses to accept payments from Indian customers without any additional paperwork or registration. + +Your Indian customers can make recurring payments via local payment methods such as cards and UPI. The funds are settled in your overseas bank account. Know more about [Import Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers.md). + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Integration Steps + +Follow these integration steps: + +### Cards + +1. [Create the Authorisation Transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/cards/authorization-transaction.md) +2. [Fetch and Manage Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/cards/tokens.md) +3. [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/cards/subsequent-payments.md) + +### UPI + +1. [Create the Authorisation Transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi/authorization-transaction.md) +2. [Fetch and Manage Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi/tokens.md) +3. [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi/subsequent-payments.md) + +### UPI with TPV + +1. [Create the Authorisation Transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi-tpv/authorization-transaction.md) +2. [Fetch and Manage Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi-tpv/tokens.md) +3. [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi-tpv/subsequent-payments.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/cards/authorization-transaction.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/cards/authorization-transaction.md new file mode 100644 index 00000000..6b99c684 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/cards/authorization-transaction.md @@ -0,0 +1,597 @@ +--- +title: 1. Create the Authorisation Transaction +description: Create an authorisation transaction for cards using Razorpay APIs. +--- + +# 1. Create the Authorisation Transaction + +Given below are the steps to create an authorisation transaction using the Razorpay APIs. + +> **INFO** +> +> +> **Handy Tips** +> +> Bank downtime can affect success rates when processing recurring payments via debit cards. +> + +## 1.1 Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + +### Request Parameters + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + + +## 1.2 Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +```cURL: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id": "cust_N8fv8Nftx5hato", + "method": "card", + "token": { + "max_amount": 100000000, + "expire_at": 1709971120, + "frequency": "monthly" + }, + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + } +}' +```json: Response +{ + "amount": 1000, + "amount_due": 1000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1707389202, + "currency": "INR", + "entity": "order", + "id": "order_NYMDbygGb1DuDd", + "method": "card", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + }, + "offer_id": null, + "receipt": "Receipt No. 1", + "status": "created", + "token": { + "expire_at": 1709971120, + "max_amount": 100000000 + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _optional_ +: `string` Payment method used to make the authorisation transaction. Here, it is `card`. + +`token` +: `object` Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be auto-debited in a single charge. The minimum value is `100` (₹1), and the maximum value is `100000000` (₹10,00,000). For an amount higher than this or the RBI limit of ₹15,000 (`1500000`), the cardholder should provide an Additional Factor of Authentication (AFA) as per RBI guidelines. + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The card's expiry year is considered a default value. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `weekly` + - `monthly` + - `yearly` + - `as_presented` + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + -` 1`: If the user is logged into the account. + - `0`: If the user is on guest + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`method` +: `string` Payment method used to make the authorisation transaction. Here, it is `card`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + +`token` +: `details` Details related to the authorisation such as max amount and bank account information. + + `expire_at` + : `integer` The Unix timestamp to indicate till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. The default value is 10 years for `emandate`. This value can range from the current date to 31-12-2099 (`4102444799`). + + `max_amount` + : `integer` The maximum amount in paise a customer can be charged in a transaction. The value can range from `500` to `100000000`. The default value is `9999900` (₹99,999). + +You can create a payment against the `order_id` after you create an order. + + +## 1.3 Create an Authorisation Payment + +Once an order is created, your next step is to create a payment. Use the below endpoint to create a payment with payment method `card`. + +/payments/create/json + +```curl: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ + -d '{ + "amount": "1000", + "currency": "INR", + "order_id": "order_NYMDbygGb1DuDd", + "recurring": true, + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "card", + "card": { + "number": "4854980604708430", + "cvv": "", + "expiry_month": "12", + "expiry_year": "25", + "name": "Gaurav Kumar" + }, + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + } +}' + +```json: Response +{ + "razorpay_payment_id": "pay_NYMDsWdiF5QIor", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/NYMDsWdiF5QIor/authenticate" + } + ] +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> - To process recurring transactions, customer card details will need to be secured/tokenised in accordance with the applicable laws. The merchant will be solely responsible for obtaining informed consent from customers for the processing of e-mandates and such consent shall be explicit and not by way of a forced/default/automatic selection of check box, radio button etc. +> - When the merchant is sharing `recurring: 1` or `preferred`, it is for tokenising the card as per applicable rules for recurring mandate creation. +> If such consent is not shared during the payment flow, then Razorpay will not tokenise the card or process the e-mandate/ recurring transaction. +> + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is `100` (₹1). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in [Step 1.2 Create an Order](#12-create-an-order). + +`recurring` _mandatory_ +: `boolean` Possible values: + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + + + +> **INFO** +> +> +> **Handy Tips** +> +> You can also pass the value as 'preferred' when you want to support recurring payments and one-time payment in the same flow. +> + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `9000090000`. + +`method` _mandatory_ +: `string` The payment method selected by the customer. Here, the value must be `card`. + +`card` +: `object` The attributes associated with a card. + + `number` _mandatory_ + : `integer` Unformatted card number. This field is required if value of `method` is `card`. Use one of our [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md) to try out the payment flow. + + `cvv` _mandatory_ + : `integer` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `expiry_month` _mandatory_ + : `integer` The expiry month of the card in `MM` format. For example, `01` for January and `12` for December. + + `expiry_year` _mandatory_ + : `integer` Expiry year for card in the `YY` format. For example, 2025 will be in format `25`. + + `name` _mandatory_ + : `string` The name of the cardholder. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. + + + +### Response Parameters + +If the payment request is valid, the response contains the following fields. Refer to the [S2S Json V2 integration document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2.md#step-2-create-a-payment) for more details. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. Possible values: + - `otp_generate` - Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect` - Use this URL to redirect the customer to submit the OTP on the bank page. + + `url` + : `string` URL to be used for the action indicated. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/cards/subsequent-payments.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/cards/subsequent-payments.md new file mode 100644 index 00000000..7078e142 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/cards/subsequent-payments.md @@ -0,0 +1,315 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +## 3.1 Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id": "cust_N8fv8Nftx5hato", + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + } +}' +``` +```json: Success +{ + "amount": 1000, + "amount_due": 1000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1707389202, + "currency": "INR", + "entity": "order", + "id": "order_NYMDbygGb1DuDd", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + }, + "offer_id": null, + "receipt": "Receipt No. 1", + "status": "created" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + -` 1`: If the user is logged into the account. + - `0`: If the user is on guest + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + +You can create a payment against the `order_id` after you create an order. + + +## 3.2 Create a Recurring Payment + +Once you have generated an `order_id`, use it to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "amount": "1000", + "currency": "INR", + "order_id": "order_NYMDbygGb1DuDd", + "customer_id": "cust_N8fv8Nftx5hato", + "token": "token_NZveVUfP5fn0fq", + "recurring": "1", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + } +}' +``` +```json: Success +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is `100` (₹1). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in [Create an order to charge the customer](#21-create-an-order-to-charge-the-customer). + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer, obtained from the response of Customer API. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `string` Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this when you want to support recurring payments and one-time payment in the same flow. + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `9000090000`. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/cards/tokens.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/cards/tokens.md new file mode 100644 index 00000000..6c7e76c5 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/cards/tokens.md @@ -0,0 +1,331 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay returns a `razorpay_payment_id` that can be used to fetch the `token_id`. This is a manual process and can be done using either APIs or Webhooks. This `token_id` is used to create and charge subsequent payments. + +> **INFO** +> +> +> **Handy Tips** +> +> You can also [search for the Token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) on your Dashboard. +> + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches a token id using the Payment id. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000001"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_1Aa00000000001" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.Fetch(paymentId); +``` + +```json: Response +{ + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "", + "status": "captured", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "bank": null, + "wallet": null, + "vpa": null, + "email": "", + "contact": "", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "541898" + }, + "created_at": 1595449871 +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` from the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + + +## 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint fetches tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> This endpoint will not fetch the details of expired, rejected and unused tokens. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +List customer = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customer.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000002" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity":"collection", + "count":1, + "items":[ + { + "id":"token_HouA2OQR5Z2jTL", + "entity":"token", + "token":"2JPRk664pZHUWG", + "bank":null, + "wallet":null, + "method":"card", + "card":{ + "entity":"card", + "name":"", + "last4":"8950", + "network":"Visa", + "type":"credit", + "issuer":"STCB", + "international":false, + "emi":false, + "sub_type":"consumer", + "expiry_month":12, + "expiry_year":2030, + "flows":{ + "otp":true, + "recurring":true + } + }, + "recurring":true, + "recurring_details":{ + "status":"confirmed", + "failure_reason":null + }, + "auth_type":null, + "mrn":null, + "used_at":1629779657, + "created_at":1629779657, + "expired_at":1640975399, + "dcc_enabled":false, + "billing_address":null + } + ] +} +``` + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + + +## 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi-tpv/authorization-transaction.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi-tpv/authorization-transaction.md new file mode 100644 index 00000000..20df1e5f --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi-tpv/authorization-transaction.md @@ -0,0 +1,723 @@ +--- +title: 1. Create the Authorisation Transaction +description: Steps to create an authorisation transaction for UPI. +--- + +# 1. Create the Authorisation Transaction + +Given below are the steps to create an authorisation transaction using the Razorpay APIs. + +## 1.1 Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + +### Request Parameters + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + + +## 1.2 Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +```cURL: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id": "cust_N8fv8Nftx5hato", + "method": "upi", + "token": { + "max_amount": 200000, + "expire_at": 1709971120, + "frequency": "monthly", + "recurring_value": 9, + "recurring_type": "on" + }, + "bank_account": { + "account_number": "123456789012345", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' +``` +```json: Success +{ + "amount": 1000, + "amount_due": 1000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1707468938, + "currency": "INR", + "entity": "order", + "id": "order_NYirPLFPraZLtB", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "offer_id": null, + "receipt": "Receipt No. 1", + "status": "created" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `upi`. + +`token` +: `object` Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be debited in a single charge. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The default value is 10 years, and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + + `recurring_value` _optional_ + : `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + + `recurring_type` _optional_ + : `string` Determines when the recurring debit can be done. Possible values are: + - `on`: Recurring debit happens on the exact day of every month. + +> **INFO** +> +> +> **Handy Tips** +> +> For creating an order with `recurring_type`=`on`, set the `recurring_value` parameter to the current date. +> + + - `before`: Recurring debit can happen any time before the specified date. + - `after`: Recurring debit can happen any time after the specified date. + + For example, if the `frequency` is `monthly`, `recurring_value` is `17`, and `recurring_type` is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if `recurring_type` is `after`, recurring debit can only happen on or after the 17th of the month. + +`bank_account` _mandatory_ +: `object` Details of the bank account of the customer. + + `account_number` _mandatory_ + : `string` The bank account number of the customer. For example, `123456789012345`. + + `ifsc` _mandatory_ + : `string` The IFSC of the bank. For example, `HDFC0000053`. + + `name` _mandatory_ + : `string` The name of the bank account holder. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + `- 1`: If the user is logged into the account. + `- 0`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + + + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating an Order. + +Error | Cause | Solution +--- +The id provided does not exist | This error occurs when you enter an incorrect `customer_id.` | Make sure to enter a valid `customer_id`. +--- +The api key provided is invalid | This error occurs when you enter the wrong API key or secret. | Make sure to enter a valid API key and secret. +--- +The amount must be at least INR 1.00. | This error occurs when you enter an amount less than INR 1. | Make sure the entered amount is atleast INR 1.00. +--- +The currency should be INR when method is upi | This error occurs when you enter a currency other than INR | Make sure the currency is INR. +--- +The amount field is required. | This error occurs when you have not entered the amount or the `max_amount` value. | Make sure to enter the `max_amount` value. +--- +The minimum transaction amount allowed is Re. 5. | This error occurs when you enter the maximum amount less than the minimum amount. | Make sure the `max_amount` value is more than the `min_amount` value. +--- +The order amount cannot be greater than the token max amount for upi recurring. | This error occurs when the order amount exceeds the `token_max` amount passed in the API request payload. | Ensure the order amount is lesser than the `token_max` account. + + + +## 1.3 Validate the VPA (UPI ID) + +Use the below endpoint to validate the customer's UPI ID. + +/payments/validate/vpa + +```curl: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/validate/vpa \ +-H "Content-Type: application/json" \ +-d '{ + "vpa": "9000090000@paytm" +}' +```json: Success +{ + "vpa": "9000090000@paytm", + "success": true, + "customer_name": "Gaurav Kumar" +} +``` + + +### Request Parameters + +`vpa` _mandatory_ +: `string` The UPI ID you want to validate. For example, `gauravkumar@exampleupi`. + + +## 1.4 Create an Authorisation Payment + +Once an order is created, your next step is to create a payment. Use the below endpoint to create a payment with payment method `upi`. + + + /payments/create/upi + ```curl: Request + curl -u : \ + -X POST https://api.razorpay.com/v1/payments/create/upi \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 200, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "customer_id": "cust_EIW4T2etiweBmG", + "recurring": "1", + "method": "upi", + "upi": { + "flow": "intent" + }, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + } + }' + ```json: Response + { + "razorpay_payment_id": "pay_EAm09NKReXi2e0", + "link": "upi://pay?pa=testmerchant@razorpay&pn=Test%20Merchant&tr=EAz4kjQJ95ucCY&tn=PaymenttotestmerchantforOrderIdorder_EAz4kjQJ95ucCY&am=1.00&cu=INR&mc=8931" + } + ``` + + + /payments/create/upi + + ```curl: Request + curl -u : \ + -X POST https://api.razorpay.com/v1/payments/create/upi \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 200, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "customer_id": "cust_EIW4T2etiweBmG", + "recurring": "1", + "method": "upi", + "upi": { + "flow": "collect", + "vpa": "9000090000@paytm", + "expiry_time": 5 + }, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "save": true, + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + } + }' + + ```json: Response + { + "razorpay_payment_id": "pay_EAm09NKReXi2e0" + } + ``` + + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount associated with the payment in smallest unit of the supported currency. For example, `2000` means ₹20. Must match the amount in [Step 1.2 Create an Order](#12-create-an-order). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in [Step 1.2 Create an Order](#12-create-an-order). + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `9123456780`. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer, obtained from the response of [Step 1.1 Create an Customer](#11-create-a-customer). + +`recurring` _mandatory_ +: `string` Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this when you want to support recurring payments and one-time payment in the same flow. + +`method` _mandatory_ +: `string` The payment method selected by the customer. Here, the value must be `upi`. + +`upi` +: `object` Details of the expiry of the UPI link + + `flow` _mandatory_ + : `string` Specify the type of the UPI payment flow. + Possible values are: + - `collect` (default) + - `intent` + + `vpa` _mandatory_ + : `string` VPA of the customer where the collect request will be sent. + + `expiry_time` _mandatory_ + : `integer` Period of time (in minutes) after which the link will expire. The default value is **5**. + +`ip` _mandatory_ +: `string` Client's browser IP address. For example, **117.217.74.98**. + +`referer` _mandatory_ +: `string` Value of `referer` header passed by the client's browser. For example, **https://example.com/** + +`user_agent` _mandatory_ +: `string` Value of `user_agent` header passed by the client's browser. +For example, **Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36** + +`description` _optional_ +: `string` Descriptive text of the payment. + +`save` _optional_ +: `boolean` Specifies if the VPA should be stored as a token. Possible values: + - `true`: Saves the VPA details. + - `false`(default): Does not save the VPA details. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. + + + +### Response Parameters + +`razorpay_payment_id` +: `string` Unique reference for the payment created. For example, `pay_EAm09NKReXi2e0`. + +`link` +: `string` UPI Intent deeplink that can be used to trigger UPI apps or displayed as a QR code. + + +If the payment request is valid, the response contains the following fields. Refer to the [UPI Collect Flow document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/collect.md#step-4-initiate-a-payment) for more details. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi-tpv/subsequent-payments.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi-tpv/subsequent-payments.md new file mode 100644 index 00000000..3ebf0290 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi-tpv/subsequent-payments.md @@ -0,0 +1,415 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is authorised. +--- + +# 3. Create Subsequent Payments + +Given below are the steps to create and charge your customer subsequent payments: + +## 3.1 Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id": "cust_N8fv8Nftx5hato", + "bank_account": { + "account_number": "123456789012345", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' +``` +```json: Success +{ + "amount": 1000, + "amount_due": 1000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1707468938, + "currency": "INR", + "entity": "order", + "id": "order_NYirPLFPraZLtB", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "offer_id": null, + "receipt": "Receipt No. 1", + "status": "created" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`bank_account` _mandatory_ +: `object` Details of the bank account of the customer. + + `account_number` _mandatory_ + : `string` The bank account number of the customer. For example, `123456789012345`. + + `ifsc` _mandatory_ + : `string` The IFSC of the bank. For example, `HDFC0000053`. + + `name` _mandatory_ + : `string` The name of the bank account holder. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + -` 1`: If the user is logged into the account. + - `0`: If the user is on guest + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + +You can create a payment against the `order_id` after you create an order. + + + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating an Order. + +Error | Cause | Solution +--- +The api key provided is invalid | This error occurs when you enter the wrong API key or secret. | Make sure to enter the valid API key and secret. +--- +The amount must be at least INR 1.00. | This error occurs when you enter an amount less than INR 1. | Make sure the entered amount is atleast INR 1.00. +--- +The currency should be INR when method is upi | This error occurs when you enter a currency other than INR | Make sure the currency is INR. +--- + + + +## 3.2 Create a Recurring Payment + +Once you have generated an `order_id`, use it to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "order_id": "order_NYMptG6ChGaFgj", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "customer_id": "cust_N8fv8Nftx5hato", + "token": "token_NZveVUfP5fn0fq", + "recurring": "1", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + } +}' +``` +```json: Success +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +> **INFO** +> +> +> **UPI Payments** +> +> - We recommend sending a pre-debit notification to the customer 48 hours before the debit date. +> - For UPI, it may take between 24-36 hours for the subsequent payment to reflect on your Dashboard. +> - This is because of the failure of pre-debit notification and/or any retries that we attempt for the payment. +> - Do not create another subsequent payment until you get the status of the previous one. +> + +> **WARN** +> +> +> **UPI Payments** +> +> For UPI, **do not** create subsequent payments on the last day of the cycle. This will cause the payment to fail. +> + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount associated with the payment in smallest unit of the supported currency. For example, `2000` means ₹20. Must match the amount in [Create an order to charge the customer](#21-create-an-order-to-charge-the-customer). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in [Create an order to charge the customer](#21-create-an-order-to-charge-the-customer). + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `9000090000`. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer, obtained from the response of Customer API. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `string` Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this when you want to support recurring payments and one-time payment in the same flow. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. + + + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating a Recurring Payment. + +Error | Cause | Solution +--- +Amount exceeds maximum amount allowed | This error occurs when you enter an amount greater than the authorized maximum amount. | Make sure the amount is equal to or less than the maximum amount for the particular token. +--- +Your payment amount is different from your order amount. To pay successfully, please try using right amount. | This error occurs when you enter a different amount while creating a subsequent payment. | Make sure the order and the subsequent payment amounts are the same. +--- +bank_account_invalid | This error occurs when The customer's bank account is either closed or no longer valid. The customer or bank may have closed the account. | The customer should re-register the mandate. +--- +bank_account_validation_failed | This error occurs when the bank could not validate the customer registration for debiting the customer. | You can retry after some time or reach out to Razorpay. +--- +bank_technical_error | The destination bank was facing technical problems at the time the payment was attempted. This error usually occurs when the Core Banking System encounters a technical error while processing the payment. | You can retry after some time or reach out to Razorpay. +--- +debit_instrument_blocked | This error occurs when the bank temporarily blocks withdrawals on the customer's account. | The customer should reach out to their bank to get the account unblocked. +--- +debit_instrument_inactive | This error occurs when the bank temporarily blocks withdrawals on the customer's account. | The customer should reach out to their bank to get the account unblocked. +--- +gateway_technical_error | The payment failed due to a technical error at the gateway. This error usually occurs when the gateway server encounters a technical error while processing the payment. | You can retry after some time or reach out to Razorpay. +--- +input_validation_failed | The payment failed due to the wrong request or input sent in the payment request. You can also get this error while creating a payment with incorrect parameter values on the Dashboard. | Rectify the validation issues and try again. Check the error description and field parameters for more information about the error. +Check your integration/payment request or reach out to Razorpay. Refer to the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). +--- +insufficient_funds | This error occurs when the customer does not have sufficient funds in the account to complete the payment. | You can retry after asking the customer to add funds to their bank account. +--- +invalid_amount | This error occurs when the amount or currency passed in the payment request is not supported or invalid. This can arise when you pass a different variable type in the amount field or pass an unsupported amount value. | You can check your integration and payment request. +--- +mandate_not_active | This error occurs when the registered mandate is no longer active. The customer or bank could have cancelled the mandate. | The customer should re-register the mandate. +--- +payment_cancelled | This error occurs when the customer has explicitly cancelled the payment. The customer could have given a cancellation instruction to their banks. | You can retry after informing the customer to remove the cancellation request. +--- +payment_declined | Destination Bank or Gateway has declined the payment due to business or technical reasons such as terminal and pricing. | You can retry after some time or reach out to Razorpay. +--- +payment_failed | This error occurs when the destination Bank or Gateway has declined the payment due to business or technical reasons such as terminal and pricing. | You can retry after some time or reach out to Razorpay. +--- +payment_mandate_not_active | This error occurs when the is not yet activated the registered mandate. Banks sometimes take longer to activate the mandates at their end. | You can retry after some time or reach out to Razorpay. +--- +payment_timed_out | This error occurs when the bank with the registered mandate could not debit the customer's account in time. | You can retry after some time or reach out to Razorpay. +--- +server_error | This error occurs when there is a technical error at Razorpay's server. | You can retry after some time or reach out to Razorpay. +--- +transaction_limit_exceeded | This error occurs when customers exceed their account's credit or debit limit during high-value transactions. | You can retry after some time by informing the customer to update their transaction limits. +--- diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi-tpv/tokens.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi-tpv/tokens.md new file mode 100644 index 00000000..fa00b297 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi-tpv/tokens.md @@ -0,0 +1,360 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_FHfAzEJ51k8NLj" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentid = "pay_FHfqtkRzWvxky4"; + +Payment payment = client.Payment.Fetch(paymentid); +``` + +```json: Debit Payment +{ + "id": "pay_FHfAzEJ51k8NLj", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfANdTUYeP8lb", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfAzGzREc1ug6", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595447490 +} +```json: Authorisation Payment +{ + "id": "pay_QDhVJ5M23wt4rh", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "failed", + "order_id": "order_QDhT2PqFJvtg4y", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "success@razorpay", + "email": "gaurav.kumar@example.com", + "contact": "+919123456780", + "customer_id": "cust_Q0g6LTYw3obZEn", + "token_id": "token_QDhVJHYr5m87fF", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey\u2026 decaf.", + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + "optimizer_provider_name": "razorpay" + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment was a dummy payment for one time mandate registration.", + "error_source": "business", + "error_step": "payment_initiation", + "error_reason": "upi_dummy_payment", + "acquirer_data": { + "rrn": null + }, + "gateway_provider": "Razorpay", + "created_at": 1743490280, + "upi": { + "vpa": "success@razorpay" + } +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` via the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + + +## 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> - This endpoint will not fetch the details of expired and unused tokens. +> - The UPI tokens are not populated in the API response if the `save_vpa` feature is not enabled in your account. Please raise a request with our Support team to get this activated. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +List tokens = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + + +## 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi/authorization-transaction.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi/authorization-transaction.md new file mode 100644 index 00000000..8e855e1a --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi/authorization-transaction.md @@ -0,0 +1,600 @@ +--- +title: 1. Create the Authorisation Transaction +description: Steps to create an authorisation transaction for UPI. +--- + +# 1. Create the Authorisation Transaction + +Given below are the steps to create an authorisation transaction using the Razorpay APIs. + +## 1.1 Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + +### Request Parameters + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + + +## 1.2 Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +```cURL: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id": "cust_N8fv8Nftx5hato", + "method": "upi", + "token": { + "max_amount": 200000, + "expire_at": 1709971120, + "frequency": "monthly", + "recurring_value": 8, + "recurring_type": "on" + }, + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' +``` +```json: Success +{ + "amount": 1000, + "amount_due": 1000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1707391377, + "currency": "INR", + "entity": "order", + "id": "order_NYMptG6ChGaFgj", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "offer_id": null, + "receipt": "Receipt No. 1", + "status": "created" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant id for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `upi`. + +`token` +: `object` Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be debited in a single charge. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The default value is 10 years, and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + + `recurring_value` _optional_ + : `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + + `recurring_type` _optional_ + : `string` Determines when the recurring debit can be done. Possible values are: + - `on`: Recurring debit happens on the exact day of every month. + +> **INFO** +> +> +> **Handy Tips** +> +> For creating an order with `recurring_type`=`on`, set the `recurring_value` parameter to the current date. +> + + - `before`: Recurring debit can happen any time before the specified date. + - `after`: Recurring debit can happen any time after the specified date. + + For example, if the `frequency` is `monthly`, `recurring_value` is `17`, and `recurring_type` is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if `recurring_type` is `after`, recurring debit can only happen on or after the 17th of the month. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + `- 1`: If the user is logged into the account. + `- 0`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + + +## 1.3 Create an Authorisation Payment + +Once an order is created, your next step is to create a payment. Use the below endpoint to create a payment with payment method `upi`. + +/payments/create/upi + +```curl: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/create/upi \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "order_id": "order_NYMptG6ChGaFgj", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "customer_id": "cust_N8fv8Nftx5hato", + "recurring": "1", + "method": "upi", + "upi": { + "flow": "intent" + }, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "save": true, + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + } +}' + +```json: Response +{ + "link": "upi://pay?am=1.00&cu=INR&mc=6300&mode=04&pa=demo920134.rzp@rxaxis&pn=deeptanshu&tr=Qj0AKJ5fgbMBqZ", + "razorpay_payment_id": "pay_Qj0AKJ5fgbMBqZ" +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount associated with the payment in smallest unit of the supported currency. For example, `2000` means ₹20. Must match the amount in [Step 1.2 Create an Order](#12-create-an-order). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in [Step 1.2 Create an Order](#12-create-an-order). + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `9000090000`. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer, obtained from the response of [Step 1.1 Create an Customer](#11-create-a-customer). + +`recurring` _mandatory_ +: `string` Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this when you want to support recurring payments and one-time payment in the same flow. + +`method` _mandatory_ +: `string` The payment method selected by the customer. Here, the value must be `upi`. + +`upi` +: `object` The type of UPI payment flow. + + `flow` _mandatory_ + : `string` Specify the type of the UPI payment flow. Here it is `intent`. + +`ip` _mandatory_ +: `string` Client's browser IP address. For example, **117.217.74.98**. + +`referer` _mandatory_ +: `string` Value of `referer` header passed by the client's browser. For example, **https://example.com/** + +`user_agent` _mandatory_ +: `string` Value of `user_agent` header passed by the client's browser. +For example, **Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36** + +`description` _optional_ +: `string` Descriptive text of the payment. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. + + + +### Response Parameters + +If the payment request is valid, the response contains the following fields. Refer to the [UPI Intent Flow document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md#step-2-initiate-a-payment) for more details. + +`razorpay_payment_id` +: `string` Unique reference for the payment created. For example, `pay_EAm09NKReXi2e0`. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi/subsequent-payments.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi/subsequent-payments.md new file mode 100644 index 00000000..3be388bb --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi/subsequent-payments.md @@ -0,0 +1,334 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is authorised. +--- + +# 3. Create Subsequent Payments + +Given below are the steps to create and charge your customer subsequent payments: + +## 3.1 Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id": "cust_N8fv8Nftx5hato", + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + } +}' +``` +```json: Success +{ + "amount": 1000, + "amount_due": 1000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1707389202, + "currency": "INR", + "entity": "order", + "id": "order_NYMDbygGb1DuDd", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + }, + "offer_id": null, + "receipt": "Receipt No. 1", + "status": "created" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + -` 1`: If the user is logged into the account. + - `0`: If the user is on guest + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + +You can create a payment against the `order_id` after you create an order. + + +## 3.2 Create a Recurring Payment + +Once you have generated an `order_id`, use it to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "order_id": "order_NYMptG6ChGaFgj", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "customer_id": "cust_N8fv8Nftx5hato", + "token": "token_NZveVUfP5fn0fq", + "recurring": "1", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + } +}' +``` +```json: Success +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +> **INFO** +> +> +> **UPI Payments** +> +> - We recommend sending a pre-debit notification to the customer 48 hours before the debit date. +> - For UPI, it may take between 24-36 hours for the subsequent payment to reflect on your Dashboard. +> - This is because of the failure of pre-debit notification and/or any retries that we attempt for the payment. +> - Do not create another subsequent payment until you get the status of the previous one. +> + +> **WARN** +> +> +> **UPI Payments** +> +> For UPI, **do not** create subsequent payments on the last day of the cycle. This will cause the payment to fail. +> + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount associated with the payment in smallest unit of the supported currency. For example, `2000` means ₹20. Must match the amount in [Create an order to charge the customer](#21-create-an-order-to-charge-the-customer). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in [Create an order to charge the customer](#21-create-an-order-to-charge-the-customer). + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `9000090000`. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer, obtained from the response of Customer API. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `string` Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this when you want to support recurring payments and one-time payment in the same flow. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi/tokens.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi/tokens.md new file mode 100644 index 00000000..ce136726 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/recurring-payments/upi/tokens.md @@ -0,0 +1,360 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_FHfAzEJ51k8NLj" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentid = "pay_FHfqtkRzWvxky4"; + +Payment payment = client.Payment.Fetch(paymentid); +``` + +```json: Debit Payment +{ + "id": "pay_FHfAzEJ51k8NLj", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfANdTUYeP8lb", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfAzGzREc1ug6", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595447490 +} +```json: Authorisation Payment +{ + "id": "pay_QDhVJ5M23wt4rh", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "failed", + "order_id": "order_QDhT2PqFJvtg4y", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "success@razorpay", + "email": "gaurav.kumar@example.com", + "contact": "+919123456780", + "customer_id": "cust_Q0g6LTYw3obZEn", + "token_id": "token_QDhVJHYr5m87fF", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey\u2026 decaf.", + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + "optimizer_provider_name": "razorpay" + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment was a dummy payment for one time mandate registration.", + "error_source": "business", + "error_step": "payment_initiation", + "error_reason": "upi_dummy_payment", + "acquirer_data": { + "rrn": null + }, + "gateway_provider": "Razorpay", + "created_at": 1743490280, + "upi": { + "vpa": "success@razorpay" + } +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` via the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + + +## 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> - This endpoint will not fetch the details of expired and unused tokens. +> - The UPI tokens are not populated in the API response if the `save_vpa` feature is not enabled in your account. Please raise a request with our Support team to get this activated. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +List tokens = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + + +## 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/test-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/test-integration.md new file mode 100644 index 00000000..aa909593 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/test-integration.md @@ -0,0 +1,179 @@ +--- +title: 2. Test Integration +description: Steps to test if the integration was successful and what features are supported in Razorpay's sandbox environment. +--- + +# 2. Test Integration + +This guide helps you understand how to test the integration using Razorpay. It outlines what features are supported in Test (sandbox) vs Live environments and how to simulate various scenarios effectively. + +You can make test payments using one of the payment methods configured at the Checkout. + +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API Keys generated in the Test Mode in the Checkout code. + +## Supported Payment Methods + + +### Netbanking + +You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + + +### UPI + +You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + +You can use one of the test cards to make transactions in the Test Mode. Use any valid expiration date in the future and any random CVV to create a successful payment. + +Card Network | Domestic / International | Card Number +--- +Mastercard | Domestic | 5267 3181 8797 5449 +--- +Visa | Domestic | 4386 2894 0766 0153 +--- +Mastercard | International | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 +--- +Visa | International | 4012 8888 8888 1881 + + + + +### Card BIN Information + +Currently, we do not have dummy card details for all card networks. However, you can refer to the BIN (Bank Identification Number) information below to simulate different card types: + +Card Network | BIN Start Digits +--- +Visa | Starts with **4** +--- +Mastercard | Starts with **51–55** or **2221–2720** +--- +Amex | Starts with **34** or **37** +--- +Diners Club | Starts with **36** or **38** +--- +RuPay | Starts with **60, 65, 81, or 82** +--- +Maestro | Varies, often starts with **50, 56–69** +--- + + + +## What You Can Test in Sandbox Mode + +The following features are supported in Test Mode using test cards, UPI ids, and mock data: + + +### Features supported in test mode + + + Feature | Supported in Test Mode | Notes + --- + Order Creation (/v1/orders) | Yes | Fully testable + --- + Customer Creation | Yes | Full flow supported + --- + Payment Creation (Simulated) | Yes | Use Razorpay-provided test cards or UPI ids + --- + Webhooks (Simulated) | Yes | Simulated event triggers can be tested + --- + Tokenisation API (Simulated) | Yes | Tokens are created but not persisted + --- + Refunds | Yes | Simulated refund flow + --- + Subscriptions | Yes | End-to-end test flow supported + --- + Auth & Capture API | Yes | Can mock Auth/Capture calls + --- + Charge at Will – API Structure | Yes | API structure works; mandate is mocked + + + +You can also test webhook events using failure VPAs like `failure@razorpay` to simulate failure scenarios. + +## What You Cannot Test in Sandbox Mode + +Some features require real payment instruments, user authentication, or live customer flows, and thus cannot be tested in Test Mode: + + +### Features not supported in test mode + + + Feature | Supported in Test Mode | Reason + --- + Saved Cards / Token Persistence | No | Requires RBI-compliant card & customer authentication (AFA) + --- + Saved UPI VPAs | No | Needs real UPI mandate approval + --- + Card/UPI Mandate Creation | No | Involves actual banking infrastructure + --- + CVV-less/Card Vault Flows | No | Needs real card and authentication + --- + UPI Intent + App Switch | No | Not supported by test apps + --- + Real Notifications (SMS/Email) | No | Suppressed in Test Mode + --- + Analytics and Smart Reports | No | Requires real traffic and transactions + --- + OTP / AFA Validations | No | Test cards skip 3D Secure/OTP flows + --- + Settlement Reports | No | Depends on real money movement and settlements + --- + Charge at Will (Recurring Flow) | No | Needs real mandate + live charge events + + + +## Testing Charge at Will (CAW) Flows + + + - You can simulate token creation and charge requests. + - Mandate registration and authentication are mocked. + - No real customer authentication (3DS, OTP) is involved. + + + - Real tokenisation with 3DS/OTP. + - Mandate is registered with customer’s issuing bank. + - Charges below ₹15,000 may work without AFA. + - Charges above ₹15,000 will require AFA as per RBI guidelines. + + +## Minimum Transaction Amounts (Live Environment) + +To ensure successful transaction processing in the Live environment, please refer to the following minimum amount requirements per payment method: + +Payment Method | Minimum Amount (INR) +--- +Credit Card – One-time | ₹1 +--- +Credit Card – Recurring | ₹1 +--- +UPI – One-time | ₹1 +--- +UPI – Recurring | Varies based on pricing/commercials set during onboarding +--- +Netbanking – One-time | ₹1 +--- + +## Next Steps + +[Step 3: Go Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/s2s-integration/go-live-checklist.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration.md new file mode 100644 index 00000000..209c269e --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration.md @@ -0,0 +1,32 @@ +--- +title: About Razorpay Import Flow Web Standard Integration +description: Steps to integrate with Import Flow for a seamless payment solution for International Businesses. +--- + +# About Razorpay Import Flow Web Standard Integration + +Import Flow is a payment solution designed for International (non-Indian) businesses to accept payments from Indian customers without any additional paperwork or registration. + +Your Indian customers can make payments using local payment methods such as credit cards, debit cards, UPI and netbanking. The funds are settled in your overseas bank account. Know more about [Import Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers.md). + +> **INFO** +> +> +> +> **Feature Request** +> +> This is an on-demand feature. Please fill out the [form](https://form.typeform.com/to/C5OlR4YQ) to get this feature activated on your account. +> +> + +## Integration Steps + +Follow these integration steps: + +1. [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/build-integration.md) +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/test-integration.md) +3. [Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/go-live-checklist.md) + +### Related Information + +[Integrate With Razorpay Import Flow - Custom Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/custom-integration.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/aml.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/aml.md new file mode 100644 index 00000000..17339750 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/aml.md @@ -0,0 +1,273 @@ +--- +title: AML Integration Guide +description: Reduce settlement delays and enhance compliance for international payments with Razorpay’s AML solutions. +--- + +# AML Integration Guide + +Razorpay offers an Anti-Money Laundering (AML) solution, such as Basic AML, designed to help businesses reduce settlement delays and minimize compliance-related transaction flags. Our risk prediction engine analyses historical transaction data and regulatory signals to accurately identify potential risks, reducing AML flags by up to 90% while maintaining compliance standards. + + +### Advantages + + - **Reduced AML Hits**: Up to 90% reduction in flagged transactions with proper implementation. + - **Faster Settlements**: Minimise manual reviews and accelerate fund availability. + - **Improved Conversion**: Collect additional details only when necessary, reducing customer friction. + - **Regulatory Compliance**: Automatically meet RBI requirements for high-value transactions. + + +## Basic AML Integration + +Basic AML enables you to proactively provide additional customer information with every order, thereby reducing the likelihood that it will be flagged for AML review. + +You need to pass a few additional parameters related to AML in the Orders API. There is no other change in the rest of the [Standard Checkout integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/build-integration.md). + + +### Sample Code + +/orders + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 10000, + "currency": "", + "receipt": "receipt#1", + "customer_id": "cust_OwZZseNBf9Uqsi", + "customer_details": { + "business_type": "individual", + "name": "", + "email": "", + "contact": "", + "individual": { + "date_of_birth": { + "day": 27, + "month": 11, + "year": 1993 + }, + "place_of_birth": "Bengaluru", + "tax_identity": [ + { + "name": "PAN", + "value": "ABCDE1234F" + } + ] + } + } +}' +``` + +```json: Success Response +{ + "amount": 10000, + "amount_due": 10000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1703569876, + "currency": "INR", + "entity": "order", + "id": "order_NGrgEcmYJsfUyl", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "receipt": "receipt#1", + "status": "created" +} +``` + + + Request Parameters + + `amount` _mandatory_ + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. Payment can only be made for this amount against the Order. + + `currency` _mandatory_ + : `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. For example, `INR`. + + `receipt` _optional_ + : `string` Receipt number that corresponds to this order, set for your internal reference. Can have a maximum length of 40 characters and has to be unique. + + `customer_id` _mandatory_ + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `customer_details` _mandatory_ + : `string` This contains details about the customer details of the order. + + `business_type` _optional_ + : `string` Indicates whether the customer is an individual or business entity. Possible values: + - `company` + - `individual` + + +> **WARN** +> +> +> **Watch Out!** +> +> For transactions exceeding ₹2,50,000: +> - **Individual customers**: PAN is mandatory. +> - **Business customers**: GSTIN is mandatory. +> + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (For example, @, ", ,, ., and so on.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (For example, aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919123456780`. + + `individual` + : `object` Required when `business_type` is `individual`. + + `date_of_birth` + : `object` Customer's date of birth (individuals) or date of incorporation (businesses). + + `day` + : `integer` Day of birth/incorporation (1-31). + + `month` + : `integer` Month of birth/incorporation (1-12). + + `year` + : `integer` Year of birth/incorporation (4-digit format). + + `place_of_birth` + : `string` Place where the customer was born or place of incorporation for businesses. + + `tax_identity` + : `array` List of tax identifiers. + + `name` + : `string` Type of tax identifier. + + `value` + : `string` The identifier value matching the expected format. + + + +### Response Parameters + + `amount` + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` Indicates the Unix timestamp when this order was created. + + `currency` + : `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. For example, `offer_JHD834hjbxzhd38d`. + + `receipt` + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order changes to the `attempted` state following the first payment attempt and remains in this state until at least one payment is successfully processed and captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. + The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. + --- + The amount must be at least INR 1.00. | The amount specified is less than the minimum amount. Currency subunits, such as paise (in the case of INR), should always be greater than 100. | Enter an amount equal to or greater than the minimum amount, that is 100. + --- + The **field name** is required. | A mandatory field is missing. | Ensure all mandatory fields and values are present. + --- + Only english alphabets are allowed in customer name. | The customer name provided in the request contains characters other than English alphabets, such as numbers, special characters, regional language characters, or emojis. | Ensure that the name field in the request contains only English letters (A-Z, a-z) and meets the validation criteria: - Verify that the name does not include numerical characters, special characters (For example, @, #, $ and so on.), or non-Latin scripts. +- Confirm that there are no extra spaces at the beginning or end of the name. + + --- + Customer name should be between 5 and 50 characters. | The `name` field provided in the request does not meet the required character length. It is either shorter than 5 characters or exceeds 50 characters. | - Ensure that the `name` field in the request is between 5 and 50 characters long. +- Check that no extra spaces are included at the beginning or end of the name, which might affect the character count. + + --- + Customer name is invalid. | The `name` field provided in the request does not meet the validation requirements. This could be due to the presence of disallowed characters, such as special characters, numbers, regional language characters, or the use of non-Latin scripts. | - Ensure that the `name` field only contains English letters (A-Z, a-z) and spaces (not at the beginning). +- Verify that the name does not include special characters, numerical digits, emojis, or regional language characters. +- Check for unintended characters that may have been included by mistake (For example, trailing spaces or special symbols). + + --- + + + + + + +### Standard Checkout + +Here is how AML works: +1. Razorpay screens each transaction in real-time. +2. Additional customer details are requested only for high-risk orders. +3. Low-risk orders proceed without extra fields. + +To enable Basic AML feature, contact your Key Account Manager or email us at `import-mission@razorpay.com`. + + +### Payment Flow For Customers + +When a transaction is flagged as high-risk, customers will see an additional screen on Razorpay Checkout: + + 1. Customer proceeds to payment. If flagged, **Submit PAN details** screen appears. + 2. Enter **PAN** and **Date of birth** details. + - Mobile + ![Submit PAN details screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/submit-pan-details.jpg.md) + - Web + ![Submit PAN details screen web](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/submit-pan-details-web.jpg.md) + 3. Click **Continue** to proceed with payment. + + +> **WARN** +> +> +> **Watch Out!** +> +> This screen appears only for transactions identified as high-risk, ensuring minimal friction for the majority of customers. +> + + + +## Support + +For further assistance, reach out to our [Support team](https://razorpay.com/support) or email us at `import-mission@razorpay.com`. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/build-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/build-integration.md new file mode 100644 index 00000000..cdc9988f --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/build-integration.md @@ -0,0 +1,1123 @@ +--- +title: 1. Build Integration +description: Steps to integrate with Razorpay Import Flow for a seamless payment solution for International Businesses. +--- + +# 1. Build Integration + +Given below are the steps to integrate Razorpay Standard Checkout on your website. + +> **INFO** +> +> +> **Handy Tips** +> +> You can try out our APIs on the Razorpay Postman Public Workspace. Fork the workspace and test the APIs with your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#test-mode-api-keys). +> + +## 1.1 Create a Customer in Server + +Creating a customer generates a unique `customer_id` by collecting basic details such as name, email and contact details. This `customer_id` must be included when creating a payment request to link the payment to the customer. Use the API sample code given below to create a customer. + +/customers + +```cURL: Curl + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name","Gaurav Kumar"); +customerRequest.put("contact","+919000090000"); +customerRequest.put("email","gaurav.kumar@example.com"); +customerRequest.put("fail_existing", "0"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + "name": "Gaurav Kumar", + "contact": +919000090000, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": +919000090000, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} + +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->create(array('name' => 'Gaurav Kumar', 'email' => 'gaurav.kumar@example.com','contact'=>'+919000090000','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", "Gaurav Kumar"); +options.Add("contact", "+919000090000"); +options.Add("email", "gaurav.kumar@example.com"); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "name": "Gaurav Kumar", + "contact": +919000090000, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({ + name: "Gaurav Kumar", + contact: +919000090000, + email: "gaurav.kumar@example.com", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +``` + +```json: Success +{ + "id": "cust_MpINfSkdEvtdxb", + "entity": "customer", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "gstin": null, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1697550382 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } +} +``` + + +### Request Parameters + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `email` _mandatory_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `fail_existing` _optional_ + : `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + `gstin` _optional_ + : `string` Customer's GST number, if available. + For example, `29XAbbA4369J1PA`. + + `notes` _optional_ + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `entity` + : `string` Indicates the type of entity. + + `name` + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `contact` + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `email` + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `gstin` + : `string` GST number linked to the customer. + For example, `29XAbbA4369J1PA`. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. Know how to [Generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + --- + Contact number should be at least 8 digits, including country code. | The contact number is less than 8 digits. | Enter contact number that meets the validation criteria. It should have at least 8 digits, including the country code. For example, "+919000090000". + + + +## 1.2 Create an Order in Server + +After a customer is created, an order needs to be generated using the Orders API. This order contains details such as the payment amount, currency, customer details, tax-related information and other custom notes. After the order is created, an `order_id` is generated, for example, `order_NGrgEcmYJsfUyl`. You must pass this `order_id` in the checkout code to associate this order with the payment. Learn more about [Order and Payment states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md#order-states). + +Use the API sample code given below to create an order. + +/orders + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 10000, + "currency": "INR", + "receipt": "receipt#1", + "customer_id": "cust_OwZZseNBf9Uqsi", + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "identity": [ + { + "type": "tax_id", + "id": "HSCPE4563G" + } + ] + }, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +``` + +```json: Success +{ + "amount": 10000, + "amount_due": 10000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1703569876, + "currency": "INR", + "entity": "order", + "id": "order_NGrgEcmYJsfUyl", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "receipt": "receipt#1", + "status": "created" +} + +```json: Failure - Amount +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} + +```json: Failure - Customer Name +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "customer name is invalid", + "metadata": {}, + "reason": "input_validation_failed", + "source": "business", + "step": "payment_initiation" + } +} + +```json: Failure - Address Line +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Address line 1 and line 2 can only contain aplhanumeric characters and limited special characters", + "metadata": {}, + "reason": "input_validation_failed", + "source": "business", + "step": "payment_initiation" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. Payment can only be made for this amount against the Order. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. For example, `INR`. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Can have a maximum length of 40 characters and has to be unique. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `identity` _optional_ + : `array` A list of identity objects containing customer identification details. + + `type` _optional_ + : `string` The type of identification document. For example, `tax_id`. + + `id` _optional_ + : `string` The identification number or value corresponding to the `type` provided. For example, `ABCDE1234F`. + +`notes` _optional_ +: `json object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + + + +### Response Parameters + + `amount` + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` Indicates the Unix timestamp when this order was created. + + `currency` + : `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + + `offer_id` + : `string` The unique identifier of the offer. For example, `offer_JHD834hjbxzhd38d`. + + `receipt` + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order changes to the `attempted` state following the first payment attempt and remains in this state until at least one payment is successfully processed and captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. + The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. + --- + The amount must be at least INR 1.00. | The amount specified is less than the minimum amount. Currency subunits, such as paise (in the case of INR), should always be greater than 100. | Enter an amount equal to or greater than the minimum amount, that is 100. + --- + The **field name** is required. | A mandatory field is missing. | Ensure all mandatory fields and values are present. + --- + Only english alphabets are allowed in customer name. | The customer name provided in the request contains characters other than English alphabets, such as numbers, special characters, regional language characters, or emojis. | Ensure that the name field in the request contains only English letters (A-Z, a-z) and meets the validation criteria: - Verify that the name does not include numerical characters, special characters (e.g., @, #, $, etc.), or non-Latin scripts. +- Confirm that there are no extra spaces at the beginning or end of the name. + + --- + Customer name should be between 5 and 50 characters. | The `name` field provided in the request does not meet the required character length. It is either shorter than 5 characters or exceeds 50 characters. | - Ensure that the `name` field in the request is between 5 and 50 characters long. +- Check that no extra spaces are included at the beginning or end of the name, which might affect the character count. + + --- + Customer name is invalid. | The `name` field provided in the request does not meet the validation requirements. This could be due to the presence of disallowed characters, such as special characters, numbers, regional language characters, or the use of non-Latin scripts. | - Ensure that the `name` field only contains English letters (A-Z, a-z) and spaces (not at the beginning). +- Verify that the name does not include special characters, numerical digits, emojis, or regional language characters. +- Check for unintended characters that may have been included by mistake (e.g., trailing spaces or special symbols). + + --- + Only English alphabet is allowed in City and State. | The `city` or `state` field in the request contains invalid characters such as numbers, special characters, or regional language text. | - Ensure that the `city` and `state` fields only contain English letters (A-Z, a-z) and spaces. +- Verify that these fields do not include numerical characters, special characters, or regional language scripts. + + --- + Address line 1 and line 2 can only contain alphanumeric characters and limited special characters. | The `Address line1` or `Address line2` field in the request contains invalid characters that are not allowed, such as unsupported symbols or regional language characters. | - Ensure that `Address line1` and `Address line2` only include alphanumeric characters (A-Z, a-z, 0-9) and allowed special characters (e.g., *&/-()#_+{}[]:'".,). +- Verify that no unsupported symbols or regional language scripts are included. + + + + +## 1.3 Integrate with Checkout on Client-Side + +Add the Pay button on your web page using the checkout code, Handler Function or Callback URL. + + +### Handler Function or Callback URL + +**Handler Function** | **Callback URL** +--- +When you use this: - On successful payment, the customer is shown your web page. +- On failure, the customer is notified of the failure and asked to retry the payment. + | When you use this: - On successful payment, the customer is redirected to the specified URL, for example, a payment success page. +- On failure, the customer is asked to retry the payment. + + + + +### Code to Add Pay Button + +Copy-paste the parameters as `options` in your code: + +```html: Callback URL (JS) Checkout Code +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "customer_id": "cust_MpINfSkdEvtdxb", + "order_id": "order_NGrgEcmYJsfUyl", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information especially their phone number + "name": "", //your customer's name + "email": "", + "contact": "" //Provide the customer's phone number for better conversion rates + }, + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp", + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +```html: Handler Functions (JS) Checkout Code +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "customer_id": "cust_MpINfSkdEvtdxb", + "order_id": "order_NGrgEcmYJsfUyl", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information, especially their phone number + "name": "", //your customer's name + "email": "", + "contact": "" //Provide the customer's phone number for better conversion rates + }, + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp", + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); +}); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> Test your integration using these [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/test-integration.md#Cards). +> + +> **WARN** +> +> +> **Watch Out!** +> +> - The `invoice_number` field is mandatory for all payment methods. Ensure each payment has a unique invoice number. +> - The `createPayment` method should be called within an event listener triggered by user action to prevent the popup from being blocked. For example: +> ```js +> $('button').click( function (){ razorpay.createPayment(...) }) +> ``` +> + + + + +### Supported Payment Methods + + Following payment methods are supported under the Import Flow: + - Netbanking + - UPI + - Cards + - [Recurring](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments.md) + + For recurring payments, additional integration is needed. Cards, UPI, and UPI with TPV are supported as a payment methods. + + + +### Checkout Parameters + + `key` _mandatory_ +: `string` API Key ID generated from the Razorpay Dashboard. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `50000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: “contact": "+919000090000"). +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + + `name` _optional_ + : `string` Cardholder's name to be pre-filled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also pre-filled. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#save-card-details). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and net banking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments with the suggested next best option. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment with the suggested next best option. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the invoice generated. Ensure each payment has a unique invoice number. + + `goods_description` _mandatory_ + : `string` Description of the goods. For example, `Digital Lamp`. + + + +### Errors + +Given below is a list of errors you may face while integrating with checkout on the client-side. + +Error | Cause | Solution +--- +The id provided does not exist. | Occurs when there is a mismatch between the API keys used while creating the `order_id`/`customer_id` and the API key passed in the checkout. | Make sure that the API keys passed in the checkout are the same as the API keys used while creating the `order_id`/`customer_id`. +--- +Blocked by CORS policy. | Occurs when the server-to-server request is hit from the front end instead. | Make sure that the API calls are made from the server side and not the client side. + + + + +### Configure Payment Methods (Optional) + + Multiple payment methods are available on the Razorpay Web Standard Checkout. + - The payment methods are **fixed** and cannot be changed. + - You can configure the order or make certain payment methods prominent. Know more about [configuring payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> The open method of Razorpay object (`rzp1.open()`) must be invoked by your site's JavaScript, which may or may not be a user-driven action such as a click. +> + +## 1.4 Handle Payment Success and Failure + +The way the Payment Success and Failure scenarios are handled depends on the [Checkout Sample Code](#code-to-add-pay-button) you used in the last step. + + +### Checkout with Handler Function + +If you used the sample code with the handler function: + + + The customer sees your website page. The checkout returns the response object of the successful payment (**razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature**). Collect these and send them to your server. + + + + + The customer is notified about payment failure and asked to retry the payment. Know about the [error parameters.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md#response-parameters) + + ```js: Failure Handling Code + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + } + ``` + + + + + +### Checkout with Callback URL + +If you used the sample code with the callback URL: + + + + Razorpay makes a POST call to the callback URL with the **razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature** in the response object of the successful payment. Only successful authorisations are auto-submitted. + + + + + In case of failed payments, the checkout is displayed again to facilitate payment retry. + + + + +## 1.5 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +## 1.6 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +Here are the links to our [SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#client-libraries) for the supported platforms. + +## 1.7 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/test-integration.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/business-onboarding.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/business-onboarding.md new file mode 100644 index 00000000..02581e56 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/business-onboarding.md @@ -0,0 +1,303 @@ +--- +title: Onboarding Documents for Razorpay Import Flow +description: List of Documents required for non-Indian companies and business types to onboard with Razorpay Import Flow. +--- + +# Onboarding Documents for Razorpay Import Flow + +Import Flow is a payment solution designed for International (non-Indian) businesses to accept payments from Indian customers. + +Your Indian customers can make payments using local payment methods such as UPI, credit cards, debit cards and netbanking. The funds are settled in your overseas bank account. Know more about [Import Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers.md). + +> **INFO** +> +> +> +> **Onboarding Request** +> +> Please fill out the [form](https://form.typeform.com/to/C5OlR4YQ) to sign up. Someone from our team will reach out to get this service activated on your account. +> + +> **WARNING** +> +> +> **Handy Tips** +> +> - SWIFT-enabled bank account is mandatory for international settlements. +> - All sections such as Privacy Policy, Pricing, About Us, Contact Us, Refund Policy and Shipping Policy (if selling physical goods) of your website must be updated with accurate and current information before submission. +> + +Below are the onboarding documents required for companies and businesses to activate Razorpay's Import Flow. + +## Document Categories + + +### KYC Documents Required for Account Activation + + + Document Type | Required Documents | Important Notes + --- + Bank Statement | Bank statement showing bank account information | SWIFT Code should be clearly visible. + --- + Proof of Identity of Authorised Signatory | Passport/Driving license of Authorised Signatory | Address must be clearly visible. + --- + Proof of Address of Authorised Signatory | Passport/Driving license of Authorised Signatory | Address must be clearly visible. + --- + Authorisation Documents | Power of Attorney or Board Resolution | Must explicitly authorise signatory for Razorpay services. + --- + Company Registration | Certificate of Incorporation | Must show complete company name and registration number. + + + +## Board Resolution Template or Power of Attorney + +- A Board Resolution is a formal record of the directors' approval granting that authority. +- A Power of Attorney is a legal document that allows someone to act or sign on behalf of a company. + + +### This template includes: + +- Explicit authorisation for international payment acceptance. +- Clear designation of authorised signatory for Razorpay Merchant Services. +- Authority to link bank accounts and handle transactional matters. +- Authority to submit KYC documentation and compliance requirements. + +Refer to the Board Resolution Template. + +> **INFO** +> +> +> **Handy Tip** +> +> The Board Resolution must explicitly mention Razorpay Merchant Services and authorisation for accepting international payments in India. Use the template and customise it with your company details. +> + + + +## Purpose Codes for International Transactions + +When accepting payments from Indian customers, you must select the appropriate purpose code. This code is mandatory per RBI regulations and categorises the nature of your transaction. + + +### Import (Goods) + + + Category | Description + --- + S0101 | Advance payment against imports made to countries other than Nepal and Bhutan. + --- + S0102 | Payment towards imports - settlement of invoice other than Nepal and Bhutan. + --- + S0103 | Imports by diplomatic missions other than Nepal and Bhutan. + --- + S0104 | Intermediary trade/transit trade, that is third country export passing through India. + --- + S0108 | Goods acquired under merchanting/payment against import leg of merchanting trade. + --- + + + + +### Transport Services + + + Category | Description + --- + S0201 | Payments for surplus freight/passenger fare by foreign shipping companies operating in India. + --- + S0202 | Payment for operating expenses of Indian shipping companies operating abroad. + --- + S0203 | Freight on imports - Shipping companies. + --- + S0204 | Freight on exports - Shipping companies. + --- + S0205 | Operational leasing/rental of vessels (with crew) - Shipping companies. + --- + S0206 | Booking of passages abroad - Shipping companies. + --- + S0207 | Payments for surplus freight/passenger fare by foreign airlines companies operating in India. + --- + S0208 | Operating expenses of Indian airlines companies operating abroad. + --- + S0209 | Freight on imports - Airlines companies. + --- + S0210 | Freight on exports - Airlines companies. + --- + S0211 | Operational leasing/rental of vessels (with crew) - Airline companies. + --- + S0212 | Booking of passages abroad - Airlines companies. + --- + S0214 | Payments on account of stevedoring, demurrage and port handling charges (Shipping companies). + --- + S0215 | Payments on account of stevedoring, demurrage and port handling charges (Airlines companies). + --- + S0216 | Payments for passenger - Shipping companies. + --- + S0217 | Other payments by shipping companies. + --- + S0218 | Payments for passenger - Airlines companies. + --- + S0219 | Other payments by airlines companies. + --- + S0220 | Payments on account of freight under other modes of transport (Internal waterways, roadways, railways, pipeline transports and others). + --- + S0221 | Payments on account of passenger fare under other modes of transport (Internal waterways, roadways, railways, pipeline transports and others). + --- + S0222 | Postal and courier services by air. + --- + S0223 | Postal and courier services by sea. + --- + S0224 | Postal and courier services by others. + --- + + + + +### Travel Services + + + Category | Description + --- + S0301 | Business travel. + --- + S0303 | Travel for pilgrimage. + --- + S0304 | Travel for medical treatment. + --- + S0305 | Travel for education (including fees and hostel expenses). + --- + S0306 | Other travel (including holiday trips and payments for settling international credit cards transactions). + --- + + + + +### Insurance and Pension Services + + + Category | Description + --- + S0601 | Life insurance premium except term insurance. + --- + S0602 | Freight insurance - relating to import and export of goods. + --- + S0603 | Other general insurance premium including reinsurance premium and term life insurance premium. + --- + S0605 | Auxiliary services including commission on insurance. + --- + S0607 | Insurance claim settlement of non-life insurance and life insurance (only term insurance). + --- + S0608 | Life insurance claim settlements. + --- + S0610 | Premium for pension funds. + --- + S0611 | Periodic pension entitlements for example monthly, quarterly or yearly payments of pension amounts by Indian pension fund companies. + --- + + + + +### Telecommunication, Computer and Information Services + + + Category | Description + --- + S0801 | Hardware consultancy/implementation. + --- + S0802 | Software consultancy/implementation. + --- + S0803 | Database, data processing charges. + --- + S0804 | Repair and maintenance of computer and software. + --- + S0805 | News agency services. + --- + S0806 | Other information services - Subscription to newspapers and periodicals. + --- + S0807 | Off-site software imports. + --- + S0808 | Telecommunication services including electronic mail services and voice mail services. + --- + + + + +### Other Business Services + + + Category | Description + --- + S1003 | Operational leasing services (other than financial leasing) without operating crew, including charter hire - Airlines companies. + --- + S1004 | Legal services. + --- + S1005 | Accounting, auditing, book-keeping services. + --- + S1006 | Business and management consultancy and public relations services. + --- + S1007 | Advertising, trade fair service. + --- + S1008 | Research and development services. + --- + S1009 | Architectural services. + --- + S1013 | Environmental services. + --- + S1014 | Engineering services. + --- + S1015 | Tax consulting services. + --- + S1016 | Market research and public opinion polling service. + --- + S1017 | Publishing and printing services. + --- + S1020 | Commission agent services. + --- + S1021 | Wholesale and retailing trade services. + --- + S1022 | Operational leasing services (other than financial leasing) without operating crew, including charter hire - Shipping companies. + --- + S1023 | Other technical services including scientific/space services. + --- + + + + +### Personal, Cultural and Recreational Services + + + Category | Description + --- + S1101 | Audio-visual and related services like motion picture and video tape production, distribution and projection services. + --- + S1103 | Radio and television production, distribution and transmission services. + --- + S1104 | Entertainment services. + --- + S1105 | Museums, library and archival services. + --- + S1106 | Recreation and sporting activities services. + --- + S1107 | Education (for example fees for correspondence courses abroad). + --- + S1108 | Health service (payment towards services received from hospitals, doctors, nurses, paramedical and similar services rendered remotely or on-site). + --- + S1109 | Other personal, cultural and recreational services. + --- + + + + +### Manufacturing Services + + + Category | Description + --- + S1701 | Payments for processing of goods. + --- + + + +### Related Information + +[Accept International Payments From Indian Customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/faqs.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/faqs.md new file mode 100644 index 00000000..983a787f --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/faqs.md @@ -0,0 +1,221 @@ +--- +title: Frequently Asked Questions +description: Troubleshoot common error scenarios and find answers to frequently asked questions about Import Flow integration. +--- + +# Frequently Asked Questions + +## Common + + +### 1. What payment methods does Razorpay support for my customers? + + Razorpay supports a comprehensive range of payment methods including UPI, Netbanking, Credit/Debit Cards (Visa, Mastercard, RuPay, Diners Club, American Express) and Recurring Payments to provide your customers with maximum payment flexibility. + + + +### 2. Do you offer no-code payment solutions or simple integration options? + + Currently, we do not offer a no-code payment button solution. However, our payment gateway integration requires minimal coding effort, and our technical team handles all the complex backend processing. If you are looking for low-code solutions, you can explore [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md) or [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md), depending on your use case and eligibility. These options allow you to start accepting payments with minimal setup. + + To understand the customer checkout experience, try our [interactive demo](https://razorpay.com/demopg3/). To get started with integration, refer to our [integration guide](https://razorpay.com/docs/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/build-integration/). + + + +### 3. Can Razorpay handle recurring payments for subscription-based businesses? + + Yes, under the recurring payments model, you can charge the customer any amount up to the maximum mandate limit, based on the customer's usage. However, increasing the maximum mandate amount is not permitted as per regulations. To charge a higher amount, you must create a new mandate with the revised limit. + + + +### 4. Does Razorpay support pro-rated billing when customers upgrade or downgrade subscription plans? + + Yes, you can request mandate updates whenever customers need to upgrade or downgrade their subscription plans, enabling flexible billing management for your business. + + + +### 5. What dispute and chargeback management tools does Razorpay provide? + + Razorpay provides comprehensive dispute management tools including a dedicated dashboard to track all dispute cases, automated email notifications with detailed transaction information and an online portal for submitting supporting evidence. Additionally, you can configure webhook notifications to receive real-time alerts about dispute status changes. Know more about [disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md). + + + +### 6. How does Razorpay handle customer refunds? + + Razorpay supports both full and partial refunds that you can process instantly through our merchant dashboard or via API integration. This gives you complete control over your refund operations. Know more about [refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md). + + + +### 7. Can I track transactions in real-time? + + Yes, Razorpay provides comprehensive real-time transaction monitoring through our dashboard, API endpoints, and webhook notifications. You can instantly track payment statuses, settlements, refunds and all transaction activities as they occur. + + + +### 8. What business analytics and reporting tools are available? + + The Razorpay merchant dashboard provides detailed visibility into your transaction data, payment status tracking, visual charts, and comprehensive business insights. You can also configure custom reports tailored to your business needs. Explore our [dashboard features](https://razorpay.com/docs/payments/dashboard/) for complete details. + + + +### 9. What communications will my customers receive from Razorpay? + + Your customers will receive email confirmations upon successful payment completion. For recurring payments, we send SMS notifications 24 hours before scheduled debits to keep customers informed about upcoming charges. + + + +### 10. Is Razorpay compliant with financial security standards? + + Yes, Razorpay is PCI-DSS compliant, ensuring the highest standards of payment security. We are also licensed and regulated by the Reserve Bank of India as a Payment Aggregator - Payment Gateway (PA PG) and Payment Aggregator - Cross Border (PA CB), providing you with complete regulatory compliance. + + + +### 11. Can international merchants access all Razorpay features? + + Yes, international merchants have full access to all Razorpay features including the merchant dashboard, dispute management functionality, and all payment processing capabilities. You do not need to be an Indian-registered business to access these features and the dashboard is available regardless of your business location. + + + +### 12. What are the requirements for setting up a Razorpay account and going live + + To go live with Razorpay, your website must include essential business pages: + - Bank Statement + - Passport of Authorised Signatory + - Board Resolution + - Certificate of Incorporation. + + + +### 13. Can I disable the email notifications that Razorpay sends to my customers for successful payments and refunds? + + Yes, you can control customer email notifications. For Server-to-Server (S2S) integrations, you can disable email notifications by setting the `email` parameter to "false" under the `notify` object in your API request. Refer to our [Payment Links customisation documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/customise-payment-methods.md) for more details. Alternatively, you can contact our [support team](https://razorpay.com/support/) to have this setting configured for your account. + + +## Anti-Money Laundering + + +### 1. Why are certain transactions being flagged for AML? + + Transactions are flagged by our Authorised Dealer (AD) bank's compliance team during mandatory AML checks. Screening is usually based on name matches with sanction/watchlists (OFAC, UN, EU, UK and internal/government lists). If there is a potential match, the bank requests additional information (for example, date of birth, place of birth, address, nationality). + + + +### 2. What information may be requested for flagged transactions? + + Depending on the case, banks may request the following information: + + - **For Individuals**: Full name, address, date of birth, place of birth, national id, passport number, nationality, citizenship. + + - **For Entities**: Full Name, registered address, nature of business, ownership with percentages, website, purpose of payment. + + + +### 3. What happens if we do not provide the requested details? + + The bank cannot settle the transaction without the required details. Funds are kept on hold and may eventually be reported to the Government as unclaimed. Customers are not automatically refunded. If required, refunds must be initiated by the platform/business (possibly up to 6 months). + + + +### 4. Will customers be refunded automatically if a transaction is rejected? + + No. Funds are not refunded automatically. Business/platforms may choose to initiate a refund to the customer. If information is provided later (even after the timeline), we can attempt to re-settle the transaction with the bank. + + + +### 5. What short-term measures can reduce AML flags? + + Mandating full names (first and last) at checkout reduces flagged transactions by 50%. Collecting date of birth at checkout reduces false positives by 70%+. Address capture, wherever possible, can also help. + + + +### 6. What are the long-term solutions? + + Razorpay is building real-time AML detection for the following: + + - **Hosted Checkout**: Users are asked for additional info (DOB and so on.) only if flagged. + + - **API/S2S flows**: The AML risk score is shared in the create order API response. + + + +### 7. What are the integration options for handling AML? + + a. **Fail upfront**: Razorpay fails orders at the create order API stage if a likely AML flag is detected. + + b. **Risk Score**: Razorpay provides a risk score. The partner can request DOB or block the order. + + c. **Post-flag data collection**: Partner collects additional information only for flagged cases and shares via API (PATCH Order). + + + +### 8. How quickly can AML solutions be enabled? + + Pre-screening/fail-at-order can be enabled within 1 business day of request. Reports on AML-flagged/fail transactions are currently shared manually (T+2), with automation in progress. + + + +### 9. Who bears liability if users refuse to share AML information? + + If AML information is not provided, the bank will not settle the funds. The platform/business can refund the user to revoke access to the service/product. Funds that are not refunded remain on hold until settled or reported to authorities. + + + +### 10. Are there cultural concerns in collecting DOB? + + In India, collecting DOB for payment verification is common and acceptable. However, in some geographies (for example, Japan), DOB collection may face user friction. In such cases, partners can rely on full name and address improvements to reduce AML hits while selectively using DOB collection only when flagged. + + +## Invoice Collection and Secure File Transfer Protocol (SFTP) + + +### 1. What key format should I use to upload invoices? + + You must use one of the supported SSH key formats mentioned in our documentation. Using an unsupported or incorrectly formatted key will result in authentication failure. + + **Supported formats**: + - RSA (2048-bit or higher). For example, `ssh-rsa`. + - ECDSA. For example, `ssh-ecdsa`. + - Ed25519. For example, `ssh-ed25519`. + + Ensure your public key is in the correct format before sharing it with Razorpay. + + + +### 2. Can I access the SFTP from any IP address? + + No. You can whitelist a maximum of 4 IP addresses. SFTP access will work only from the whitelisted IPs. Attempting to connect from any other IP address will result in connection failure. + + + +### 3. Which key should I use to access Razorpay's SFTP? + + You must use your private key to authenticate whilst connecting to Razorpay's SFTP. + + - **Public key**: Uploaded to Razorpay. + - **Private key**: Used by you to access SFTP. + + Never share your private key with anyone. If you have multiple public keys configured with Razorpay, ensure you use the correct corresponding private key for authentication. + + + +### 4. What is the correct folder path to upload invoices? + + Invoices must be uploaded to the following directory structure: + + `/invoiceUpload/automated///` + + For example: + `/invoiceUpload/automated/MDoeHNNpi0nB7m/2025-05-10/INV_09876.pdf` + + **Important**: + - You must include your Merchant ID (MID) in the path. + - You must include the date folder in `YYYY-MM-DD` format. + - Missing either component will result in upload failure. + + + +### 5. Can I delete or modify the uploaded invoices? + + No. Once an invoice is uploaded, it becomes read-only and cannot be edited, renamed or deleted via SFTP. This ensures invoice integrity and compliance with audit requirements. + + If you need to correct an invoice, upload a new file with a different invoice number. Do not attempt to upload the same invoice multiple times to the same path. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/go-live-checklist.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/go-live-checklist.md new file mode 100644 index 00000000..67919196 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/go-live-checklist.md @@ -0,0 +1,49 @@ +--- +title: 3. Go-live Checklist +description: Check the go-live checklist for Razorpay Payment Gateway Standard Web integration. +--- + +# 3. Go-live Checklist + +Consider these steps before taking the integration live. + +## 1. Accept Live Payments + +You can perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. However, make sure that you **swap the Test API Key with the Live Key**. + +To generate an API Key in Live Mode: + +1. Log in to the Dashboard and switch to **Live Mode** on the menu. +2. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +3. Download the keys and save them securely. +4. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + +## 2. Payment Capture + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/invoice-collection.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/invoice-collection.md new file mode 100644 index 00000000..30fc51b5 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/invoice-collection.md @@ -0,0 +1,191 @@ +--- +title: Invoice Collection +description: Automate invoice uploads and buyer details with seamless SFTP integration. +--- + +# Invoice Collection + +> **WARN** +> +> +> **Watch Out!** +> +> 1. Invoice collection is mandatory for any import payment to be eligible for settlement. +> 2. Turnaround Time (TAT) for settlement begins **only after a valid invoice** is uploaded. +> 3. Ensure each invoice contains the following details: +> - Unique invoice number (Partner's invoice ID or Razorpay Order ID). +> - Partner's or business name. +> - Partner's or business address. +> - Customer's complete address. +> - Description of goods/services. +> - Units sold (time period, quantity and so on). +> - Amount in INR (2 decimal places only. For example, ). +> - Taxes applied. +> + +## Invoice Submission via SFTP + +You can automate invoice uploads using **Secure File Transfer Protocol (SFTP)**, enabling streamlined, secure file transfer. + +### Steps to Connect with Razorpay via SFTP + + +### 1. Share Your Public Key + + - Required for setting up SFTP credentials and folder access. + - Submit your SSH public key to your Razorpay point of contact. + - **Supported SSH key formats**: + - RSA (2048-bit or higher). For example, `ssh-rsa`. + - ECDSA. For example, `ssh-ecdsa`. + - Ed25519. For example, `ssh-ed25519`. + - Ensure your key is in the correct format. Using an unsupported or incorrectly formatted key will result in authentication failure. + + +> **WARN** +> +> +> **Watch Out!** +> +> Never share your private key with anyone. Only the public key should be provided to Razorpay. +> + + + + +### 2. IP Whitelisting + + - Only requests from your whitelisted IPs will be accepted. + - Share a list of authorised outbound IPs to enable secure access. + - Maximum of 4 IP addresses can be whitelisted. + - SFTP access will work only from the whitelisted IPs. Attempting to connect from any other IP address will result in connection failure. + + + +### 3. Credentials & Access Details + + - Razorpay will provide: + - Hostname: `sftp.razorpay.com` + - Port: `22` + - Username + - Path prefix (based on your `MID`) + - Use your **private key** (corresponding to the public key you shared) to authenticate while connecting to Razorpay's SFTP. + - Use an SFTP client to connect. + - **Test your connection**: Run `telnet sftp.razorpay.com 22` to verify connectivity before attempting SFTP access. + + +## How to Share Invoices via SFTP + + +### File Path Format + +Use the following folder and file structure: +"/invoiceUpload/automated//YYYY-MM-DD/InvoiceNumber.pdf." + +For example: `/invoiceUpload/automated/MDoeHNNpi0nB7m/2025-05-10/INV_09876.pdf` + +> **WARN** +> +> +> **Watch Out!** +> +> - You must include your Merchant ID (MID) in the path. +> - You must include the date folder in `YYYY-MM-DD` format. +> - Missing either component will result in upload failure. +> - Once uploaded, invoices become read-only. You cannot edit, rename or delete files after you upload. +> - Do not attempt to upload the same invoice multiple times to the same path. +> + + + + +### File Types and Flows + +Direction | Filename Format | Description +--- +Client → Razorpay | `InvoiceNumber.pdf` | Inbound File: This will be the invoices submitted by you to Razorpay. It should always be in PDF format. Example: `INV_09876.pdf` + + + +## Invoice ID Validation Process + +Razorpay enforces strong validation rules to prevent duplicate or invalid invoice usage. + + +### Successful Payments + + - **Status**: `Captured` + - **Invoice Action**: Permanently blocked + - **Note**: Same invoice ID cannot be reused. + + + +### Failed Payments + + - **Status**: `Failed` + - **Invoice Action**: Released + - **Note**: Invoice ID can be reused. + + + +### Payments in Intermediate States + + - **Status**: `Created` or `Authorised` + - **Invoice Action**: Temporarily blocked + - **Note**: Invoice ID is reusable only after final status (`Failed` or `Captured`) is reached. + + +### Refunded Payments + + +### Auto-Refunded (Never Captured) + + - **Status**: `Refunded` + - **Action**: Invoice ID is released. + - **Note**: ID can be reused. + + + +### Merchant-Initiated Refund (Post-Capture) + + - **Status**: `Refunded` + - **Action**: Invoice ID is permanently blocked. + - **Note**: Cannot be reused. + + +Partial capture scenarios are not validated by default. Contact Razorpay [Support team](https://razorpay.com/support/). + +## AML Screening Process + +As per RBI regulations, payments to offshore accounts must undergo AML (Anti-Money Laundering) checks by Razorpay's Authorised Dealer (AD) Bank. + + +### Daily AML Communication + + - You will receive daily emails listing transactions **flagged** for additional details. + - **Subject Line**: `Additional Details Required - [Business Name]_MDoeHNNpi0nB7m`. + + + +### Turnaround Time + + - Share required information within **5 working days** to avoid auto-cancellation. + - Information may include: Full name, address, ownership, percentage of ownership, nature of business, purpose of payment, business website, company, date of birth/incorporation, place of birth/incorporation and so on. + + + +### Consequences of Delay + + Missing TAT results in: + - Razorpay lien-marking the funds or + - Refund initiation via Dashboard/API. + + +## Best Practices for Invoice IDs + +To ensure seamless experience and compliance: + +- **Always generate unique invoice IDs** per payment. +- Acceptable IDs: + - Razorpay `order_id`. + - Your internal unique invoice number. +- Do not reuse invoice IDs for different transactions unless the original payment has failed. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers.md new file mode 100644 index 00000000..1123024d --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers.md @@ -0,0 +1,41 @@ +--- +title: About Offers +description: Provide different types of Offers to customers at the Checkout. +--- + +# About Offers + +Attract customers and improve sales by providing discounts or cashback on your website or apps. Using Razorpay Offers, you can completely control the discounts offered to your customers. You can restrict the payment methods on which the Offers are applied and limit their usage to a defined period. + +> **WARN** +> +> +> **Watch Out!** +> +> We do not support offers on international currency and the CFB (Customer Fee Bearer) model. +> + + +### Advantages + + - Create and run attractive offers on your website, thereby increasing sales. + - Provide interest-free EMI options with No Cost EMI Offers. + - With the help of Low Cost EMI Offers, provide upfront discounts by splitting the interest cost with your customers. + - Grow conversions of price-sensitive customers. + - Enjoy customer loyalty by providing offers to returning customers. + - Incremental offers lead to higher average order value, thereby boosting sales. + + +## Customer Experience + +Customers have the opportunity to see the offers that you configure on checkout. They can assess and decide which offer best suits their needs and provides the most advantages or benefits. Additionally, Razorpay will automatically apply the most suitable offer to the chosen payment method, ensuring a seamless and optimised experience for the customer. + +![Display offers on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-apply-checkout.gif.md) + +Know more about the [flow of the payments in Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md). + +### Related Information + +- [Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md) +- [Tutorial On - How to Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/tutorial.md) +- [Offers FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/faqs.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md new file mode 100644 index 00000000..f7a3115e --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md @@ -0,0 +1,254 @@ +--- +title: Create Offers +description: Create and manage Offers for customers from the Razorpay Dashboard. +--- + +# Create Offers + +You can create offers from the Dashboard to promote your business. Some of the ways you can control offers at a granular level are: +- Configuring the payment methods permitted for the offer. +- Limiting the number of times the offer can be availed. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - You cannot edit an offer. To make changes, disable the previous offer and create a new one. +> - Only the owner and admin roles can create offers. +> - As per the RBI guidelines, the original card number is replaced with a surrogate value called a token. However, we will continue to support BIN-based offers post tokenisation, except BIN-based offers will not work on saved American Express (AMEX) cards. +> + +## Design Offers + +You should consider the following while creating offers: + +- Availability of the offer at Checkout. +- A maximum number of times an offer should be applied. +- Whether customers should be allowed to complete payments if validations are not met in the offers. +- Maximum discount that can be availed using the offer. +- The number of times a payment method, specifically cards, should be used to avail of an offer. + +You can review the offer configurations at the end under the **Overview** tab. + +### Offer Description + +In the **Description** section, enter the following details. All the fields are mandatory. + +1. **Offer Name**: Enter the name of the offer. For example, **Monsoon Offer**. This appears at Checkout. +2. **Display Text**: Enter a meaningful description for the offer. For example, **10% discount on netbanking payments**. This appears at Checkout. +3. **Terms**: Enter the terms and conditions for the offer. +4. **Offer Type**: Select the type of offer that you want to create. The possible values are: + - **Instant**: The offer is applied instantly. That is, the customer pays only the discounted amount while making the payment. + - **Cashback**: The customer pays the entire bill amount and receives the cashback to their account from the bank or the wallet provider later. Cashbacks need to be processed by the provider. Create Cashback Offers only if you have an agreement with them. + - **Already Discounted**: You can enforce discounts on customers. This one-time offer is applied to all the customers by default before Checkout. Since the offer has already been used, the amount will not change at checkout. For example, if you provide a 10% discount to all customers on the website, the discounted value will appear on the website and the amount will not change further at Checkout. +5. Click **Next**. +![Enter the offer details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-description.jpg.md) + +### Discount Type + +There are three types of discounts that can be offered: + +- [Instant](#instant) +- [Cashback](#cashback) +- [Already Discounted](#already-discounted) + +Choose one of these three and create the offer. + +The following sections explain their configuration in detail. + +#### Instant + +In the **Discount Type** section, enter the discount details that should be applied to the offer. + +1. In the **Discount Type** field, select the type of discount that should be applied to the offer: **Percentage** or **Flat** + - **Flat**: In this type, a fixed amount is deducted from the original amount. + 1. **Minimum Order amount**: Enter the minimum bill amount for which the offer can be applied. + 2. **Discount worth**: Enter an amount by which the original price should be reduced. For example, if **₹30** is the **Flat** discount applied, then an amount of **30** is deducted from the original price. + + - **Percentage**: In this type, the offer is calculated in terms of percentage. + 1. **Minimum Order amount**: Enter the minimum bill amount for which the offer can be applied. + 2. **Discount Worth**: The percentage by which the original price should be reduced. For example, if **10** is the **Percentage** discount to be applied, on an order amount of **300**, **30** will be deducted. + 3. **Maximum Discount**: The maximum amount that can be deducted from the bill amount. For example, you can ensure that the customer cannot avail a discount higher than **500**, irrespective of the order amount. +2. Click **Next**. +![Enter the discount details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-discount-type.jpg.md) + +#### Cashback + +In the **Discount Type** section, enter the details of the cashback that should be applied. + +**Cashback Offers** + +Cashbacks need to be processed by the provider (wallet providers, banks and so on). Create Cashback Offers only if you have an agreement with them. + +1. In the **Discount Type** field, select the type of cashback that should be applied to the offer: **Percentage** or **Flat** + - **Flat**: In this type, a fixed amount is paid out to the customer. + 1. **Minimum Order amount**: Enter the minimum bill amount for which the offer can be applied. + 2. **Discount worth**: Enter the amount to be paid out to the customer. + + - **Percentage**: In this type, the offer is calculated in terms of percentage. + 1. **Minimum Order amount**: Enter the minimum bill amount for which the offer can be applied. + 2. **Discount Worth**: The percentage of the order amount that must be paid out as cashback to the customer. For example, if 10% of the order amount is to be paid out to the customer and the amount is 100, the cashback amount will be ₹10. + 3. **Maximum Discount**: The maximum amount that can be offered as cashback. For example, you can ensure that the customer will not be paid more than **100**, irrespective of the order amount. +2. Click **Next**. + ![Create Cashback Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-cashback-1.jpg.md) + +#### Already Discounted + +This is a one-time offer applied to all customers by default before Checkout. Since the offer has already been applied, there will be no change in the amount at Checkout. For example, if you provide a 10% discount to all customers on the website, the discounted value will appear on the website and the amount will not change further at Checkout. + +In the **Discount Type** section, enter the details of the discount: + +1. In the **Discount Type** field, select the type of discount that should be applied to the offer: **Percentage** or **Flat** + - **Flat**: In this type, a fixed amount is deducted from the original amount. + 1. **Minimum Order amount**: Enter the minimum bill amount for which the offer can be applied. + 2. **Discount worth**: Enter an amount by which the original price should be reduced. For example, if **₹30** is the **Flat** discount applied, an amount of **30** is deducted from the original price. + + - **Percentage**: In this type, the offer is calculated in terms of percentage. + 1. **Minimum Order amount**: Enter the minimum bill amount for which the offer can be applied. + 2. **Discount Worth**: The percentage by which the original price should be reduced. For example, if **10** is the **Percentage** discount to be applied, on an order amount of **300**, **30** will be deducted. + 3. **Maximum Discount**: The maximum amount that can be deducted from the bill amount. For example, you can ensure that the customer cannot avail a discount higher than **500**, irrespective of the order amount. +2. Click **Next**. + +![Enter the already discounted details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-already-discounted.jpg.md) + +> **INFO** +> +> +> **Display Already Discounted Offer at Checkout** +> +> If you create an offer with the `Already Discounted` discount type, you must pass the Offer_id parameter while creating the order. This is mandatory for the offer to be available at Checkout. +> + +### Applicable On + +Under the **Applicable On** tab, enter details of the payment method you want to enable the offers. The fields depend upon the selected payment method. +1. Select the **Payment Method** and **Issuer**. + - **Payment Method**: The payment method for which the created offer can be applied. Select from the available options, which are configured for your account: + - **Card** + - **Netbanking** + - **Wallet** + - **UPI** + - **EMI** + - **Cardless EMI** + - **Pay Later** + - **Card or EMI**: If you choose the payment method as **Card** or **EMI**, enter the card-related details as described below: + - **Card Type**: Select the type of the card. The possible values are: + - **Debit Card** + - **Credit Card** + - **Both Debit and Credit Cards** (This is applicable only if you choose **Card** as the payment method) + - **Bank**: Select the bank that issued the card. + - **Network**: Select the network of the card. + - **Maximum Usage Per Card**: Enter the number of times the selected card can be used to avail the offer. + +> **WARN** +> +> +> **Watch Out!** +> +> Max usage offers will only work on Visa, MasterCard and Rupay cards post tokenisation. +> + + - **IINs**: Enter the first six digits of the card (that is printed on the front of the card). In the case of Rupay cards, enter the tokenised IIN only. + +> **INFO** +> +> +> **Handy Tips** +> +> We will use the network par(payment account reference) API to identify the max usage per card post tokenisation. In some cases, the offer may be invalid depending on the network of the card. +> + + - **Netbanking**: The bank for which the offer is applicable. + - **Issuer**: Select the required bank. + + - **Wallet**: Select the wallet provider that supports the offer. + - **Issuer**: Select the appropriate wallet provider. + +2. Click **Next**. + +![Enter the payment method details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-applicable-on.jpg.md) + +### Offer Validity + +Under the **Offer Validity** tab, set how long the offer should be valid and how you want to handle the payment failure situations: + +1. **Starting On**: Select the **Starts Immediately** check box for the offer to come into effect immediately. Alternatively, you can select the date and the time from which the created offer should become active. +2. **Expires On**: Select the date and time at which the offer should end. For example, **31 Oct 2020** at **11:59pm**. +3. **On Payment Failure**: Define how to handle payment failure. + - **Do not allow payment to go through**: The payment is failed. + - **Allow customer to pay without availing offer**: The payment is allowed even though the set validations are not met. However, the offer is not applied to the bill amount. The customer will be charged the entire order amount. + For this example, we will allow payments to go through. +4. **Max Usage**: Set the number of times the offer should be applied across all transactions. For example, **100**. +5. **Show Offer on Checkout**: Select this check box for the offer to be displayed for all Standard Checkout payments including [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md). Know more about the different ways to [display offers on Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/standard-integration.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> If you are not using products and plugins like Razorpay Magento, Shopify, WooCommerce, Payment Links, Payment Buttons, Payment Pages and Invoices to accept payments, you **should** integrate offers with the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) for the feature to work. +> + + +6. Click **Next**. + +![Enter the offer validity details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-offer-validity.jpg.md) + +### Offer Overview + +Click the **Overview** tab to view the summary of the offer that you just created. + +1. **Terms and Conditions**: Select the check box after you have read the disclaimer. +2. Click **Create Offer**. + + ![Check the terms and conditions and create an offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-overview.jpg.md) + +By default, all the created offers will be in the **enabled** state. + +## Test the Offer + +You can test the created offer for all Standard Checkout payments, including [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md), [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md), [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md) and so on. + +> **INFO** +> +> +> **Handy Tips** +> +> - You can toggle between Live and Test Modes on your **Dashboard**. Navigate to the top menu ribbon and click the drop-down icon against **Live Mode**. Toggle to **Test Mode** and test the offers enabled. +> +> - You can make test payments using one of the payment methods at the Checkout. No money is deducted from your account as this is a simulated transaction. +> + +For this example, we will test the offer on a valid Payment Link. Follow the steps given below: + +1. Select the **Payment Link Id** you wish to test the created offer from the Dashboard. +2. Copy the **Payment Link** URL and open it in your browser. + ![Payment Link Test Offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offer-dashboard-test.jpg.md) +3. Enter your contact details and click **Proceed**. The relevant offers appear upfront on checkout. +4. Select the offer you created from the Dashboard and click **Apply Offer**. +5. Select the payment option you created the offer on from the Dashboard. Enter the required [test details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md) and click **PAY**. +6. Select Success or Failure, depending on which flow you wish to test. +7. You should see a confirmation message depending on the flow you have selected. + +On successful payment, you should have received a discount on your payment. You can verify this by navigating to the Transactions → Payments tab and viewing the payment details. + +![Verifying transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offer-details.jpg.md) + +## Integrate Offer with Standard Checkout + +Now that an Offer is created, you should integrate Offers with Checkout for customers to avail the discounts and make payments. + +Know how to [integrate Offers with Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/standard-integration.md). + +## Next Steps + +After you create an offer, it needs to be integrated with Checkout for the customers to view and avail the offers while making payments. Know more about [integrating offers with Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/standard-integration.md). + +### Related Information + +- [Tutorial - How to Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/tutorial.md) +- [Integrate offers with Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/standard-integration.md) +- [Offers FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/faqs.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/custom-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/custom-integration.md new file mode 100644 index 00000000..81ab3f08 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/custom-integration.md @@ -0,0 +1,218 @@ +--- +title: Integrate Offers with Custom Checkout +description: Integrate Offers with Custom Checkout built using Razorpay.js. +--- + +# Integrate Offers with Custom Checkout + +In the Checkout form designed to meet your business needs and branding, you can display Offers so that customers can derive maximum advantage from them while you promote your business. + +> **INFO** +> +> +> **New to Custom Checkout Integration?** +> +> If yes, know more about the [custom integration flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). +> + +## Prerequisites + +Before integrating offers for your custom Checkout, run through this checklist: + +1. Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#payment-life-cycle). + +2. Generate the API keys from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys). + +> **WARN** +> +> +> **Watch Out!** +> +> A customer's payment information should never reach your servers unless you are PCI-DSS certified. +> + +## Steps to Integrate + +The procedure for integrating Custom Checkout on your website is explained in the [Custom Integration document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). However, the procedure varies while passing the offers in the payment details. + +1. [Create Offers on Dashboard](#step-1-create-offers-on-dashboard) +2. [Create Orders to include the Offers in the payment request](#step-2-create-orders-and-pass-offer_id) +3. [Submit the payment details to Razorpay](#step-3-submit-payment-details) + +### Step 1: Create Offers on Dashboard + +You can create offers from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md). + +### Step 2: Create Orders and Pass Offer_id + +After generating offers from the Dashboard, pass the `offer_id` in the order request attributes to the following endpoint: + +#### Sample Request + +Use the sample codes given below: + +/orders + +```curl: Sample Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "offer_id": "offer_DtEhEm3XslgfXE" +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("offers", "offer_DtEhEm3XslgfXE"); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": "offer_ANZoaxsOww2X53" +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 1000, 'currency' => 'INR', 'offer_id'=> 'offer_JTUADI4ZWBGWur')); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("offer_id", "offer_JTUADI4ZWBGWur"); +Order order = client.Order.Create(options); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 1000, currency: 'INR', receipt: 'receipt#1', offer_id: 'offer_ANZoaxsOww2X53' +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000, + currency: "INR", + receipt: "receipt#1", + offer_id: "offer_ANZoaxsOww2X53" +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_DtEkng132N71M8", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": null, + "order_id": "order_CjyltuCttYiMe8", + "offer_id": "offer_DtEhEm3XslgfXE", + "offers": [ + "offer_DtEhEm3XslgfXE" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1576577191 +} +``` + +#### Request Parameters + +Using the following attributes, send an order request using the Orders API. + +`amount` _mandatory_ +: `integer` Enter the amount for which the order is to be created. For example, if the amount to be charged is ₹299.95, then pass `29995` in this field. + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the order amount. For example,`INR`. + +`offer_id` _mandatory_ +: `string` Unique identifier of the offer. Pass the `offer_id` obtained from the response of the previous step. + + +> **INFO** +> +> +> **Handy Tips** +> +> This is mandatory only in cases where you want to associate an offer or offers with the Order or you had not selected the [Show Offer on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md#offer-validity) while creating the offer from the Dashboard. +> + +### Step 3: Submit Payment Details + +Once the order is created and the customer's payment details are obtained, the information should be sent to Razorpay to complete the payment. The data that needs to be submitted depends upon the payment method selected by the customer. + +While invoking the `createPayment` method, pass the `order_id` and the `offer_id` in the payment request as follows: + +```js: Checkout +var data = { + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR", // Default is INR. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + offer_id: 'offer_DtEhEm3XslgfXE', + order_id: 'order_DtEkng132N71M8', // pass the Order ID generated in Step 2 + method: 'netbanking', // method specific fields + bank: 'HDFC' +}; + +$btn.on('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on('payment.success', function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + + razorpay.on('payment.error', function(resp){alert(resp.error.description)}); // will pass error object to error handler + +}) +``` + +Know more about [Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). + +## Next Steps + +After the customer has availed the offers and made the payment at the Checkout, you can track the status of the payments: + +- From the Dashboard. +- By [configuring webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). +- By polling our [payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#fetch-payments-based-on-orders). + +### Related Information + +- [About Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers.md) +- [Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md) +- [Tutorial - How to Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/tutorial.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/faqs.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/faqs.md new file mode 100644 index 00000000..153c229b --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/faqs.md @@ -0,0 +1,35 @@ +--- +title: Offers - FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Payment Offers. +--- + +# Frequently Asked Questions (FAQs) + +### 1. How can I edit an Offer? + + You cannot edit an offer once you create it. To make changes, [disable](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md#disabling-offers) the previous offer and [create](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md) a new one. + + + +### 2. Who manages Offer usage limitations? + + You are expected to pass the appropriate Offer IDs at the time of creating an order to manage usage limitations. + + + +### 3. Can we create Offers on Customer Fee Bearer (CFB) model? + + No, we do not support offers on CFB model. + + + +### 4. How can I disable an Offer? + + To disable an offer: + + 1. Log in to the Dashboard. + 2. Navigate to **Offers** to view a summary of the existing offers. + 3. Select the required Offer_id. + 4. In the pane that appears, go to the **Status** field and click **Disable**. + 5. Click **Yes, Disable**. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi.md new file mode 100644 index 00000000..85b4bb64 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi.md @@ -0,0 +1,92 @@ +--- +title: About Low Cost EMI Offers +description: Provide Low Cost EMI Offers to customers at the Razorpay Checkout. +--- + +# About Low Cost EMI Offers + +With Low Cost EMI, you can now balance providing affordable financing to customers while maintaining a sustainable financial model. You can decide the cost to subvent for each EMI tenure, and the customer will bear the remaining cost. This approach ensures that customers enjoy the benefits of EMI at an affordable price, helping you minimise the overall cost. + +> **INFO** +> +> +> **Handy Tips** +> +> You can create Low Cost EMI Offers on Credit and Debit card EMIs only. +> + +## Advantages + + + - Attracts more customers put off by high upfront costs, resulting in up to 20% sales boost. + - Businesses maintain financial health by sharing EMI costs with customers, thus balancing their books effectively. + - Offering extended EMI plans encourages customers to afford and consider premium products, ultimately boosting the average order value by up to 30%. + - Razorpay's user-friendly offer engine streamlines Low Cost EMI implementation with a few clicks, reducing entry barriers for businesses. + + + - Customers can spread costs over time, making expensive items accessible to more people. + - Businesses covering part of the installments reduce the overall cost, easing customers' financial burden. + - Longer EMI terms offer budget flexibility, allowing customers to align plans with their financial goals. + + +> **INFO** +> +> +> **Handy Tips** +> +> An EMI discount will be applied to the customer's purchase to partially cover the interest the bank charges. For example, if the bank's interest is 4.5%, you can partially cover 3%, and the customer bears the remaining 1.5%. +> + +## Example + +Let us consider the example of a customer buying a mobile phone worth ₹15,000 on Low Cost EMI on a 3-month EMI period. The bank charges 16% interest per annum. + +### Calculation of EMI + +The Low Cost EMI calculation is given below: + + + + Components | Amount/Interest Rate/Months + --- + Cost of mobile phone | ₹15,000 + --- + Tenure | 3 months + --- + Annual interest rate | 16% + --- + Effective interest rate for 3 months | 2.61% + --- + Interest subvented by you | 2% + --- + Discount offered @ 2% | (-) ₹300 + --- + Amount paid to you after discount | ₹14,700 + + + + + Components | Amount/Interest Rate/Months + --- + Amount repaid to bank in EMI | ₹15,000 + --- + Effective interest paid to bank @ 0.61% for 3 months | ₹91.5 + --- + Net amount paid | ₹15,091.5 + + + +> **WARN** +> +> +> **Watch Out!** +> +> Razorpay pricing is not included in this. It is applied in addition to the above amount. +> + +### Related Information + +- [Create Low Cost EMI Offers from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/create.md) +- [Integrate Low Cost EMI Offers with Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/standard-integration.md) +- [Tutorial: How to Create Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/tutorial.md) +- [Low Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/faqs.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/create.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/create.md new file mode 100644 index 00000000..b202b174 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/create.md @@ -0,0 +1,109 @@ +--- +title: Create Low Cost EMI Offers +description: Create Low Cost EMI Offers from the Razorpay Dashboard. +--- + +# Create Low Cost EMI Offers + +A Low Cost EMI is an offer where you can decide the cost to subvent for each EMI tenure and the customer bears the remaining cost. +This approach ensures that customers enjoy the benefits of EMI at an affordable price, helping you minimise the overall cost. + +**Handy Tips** + +Once you create a Low Cost EMI offer, you cannot edit it. To make changes, disable the previous offer and create a new one. + +You can review the offer configurations at the end under the [**Overview**](#overview) tab. + +## Description + +In the **Description** section, enter the following details. All the fields are mandatory. + +1. **Offer Name**: Enter the name of the offer. For example, **Diwali Dhamaka**. This appears at the Checkout. +2. **Display Text**: Enter a meaningful description for the offer. For example, **Low Cost EMI Offers**. This appears at the Checkout. +3. **Terms**: Enter the terms and conditions for this offer. +4. Click **Next**. + ![Enter the offer details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-low-cost-emi-description.jpg.md) + +## Discount Type +In the **Discount Type** section, enter the discount details that should be applied to the offer. + +1. **Minimum Order amount**: Enter the minimum bill amount for which the Low Cost EMI Offer can be applied. For example, the offer can be applied to a minimum amount of **₹4,000**. This is a mandatory field. +2. **Maximum Order amount**: Enter the maximum bill amount for which the Low Cost EMI Offer can be applied. For example, the offer can be applied to a maximum amount of **₹1,00,000**. +3. Click **Next**. + ![Enter the discount details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-low-cost-emi-discount-type.jpg.md) + +## Applicable On + +Under the **Applicable On** tab, fill in the following details: + +1. **Issuer**: Select the bank issuing the Low Cost EMI and click **Next**. +2. **EMI Tenure**: Select the tenures to be listed at the Checkout. +3. **EMI Offer Type**: Select **Low Cost EMI** from the drop-down list and configure the interest rate that you will bear for each tenure. The remaining interest rate is auto-filled which is borne by the customer. +4. Click **Next**. + ![Enter the payment method details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-low-cost-emi-applicable-on.jpg.md) + +## Offer Validity + +In the **Offer Validity** tab, set how long the offer should be valid and how you want to handle the payment failure situations: + +1. **Starting On**: Select the **Starts Immediately** check box for the offer to come into effect immediately. Alternatively, you can select the date and time the created Offer should become active. +2. **Expires On**: Select the date and time the offer should end. +3. **On Payment Failure**: Define how to handle payment failure. + - **Do not allow payment to go through**: The payment has failed. + - **Allow customer to pay without availing offer**: The payment is allowed even though the set validations are not met. However, the offer is not applied to the bill amount. The customer will be charged the entire order amount. +4. **Max Usage**: Set the number of times the offer should be applied across all transactions. For example, **100**. +5. **Show Offer on Checkout**: Select this check box for the created offer to be displayed for all Standard Checkout payments including [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md). +6. Click **Next**. + + ![Enter the offer validity details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-low-cost-emi-offer-validity.jpg.md) + +## Overview + +Click the **Overview** tab to view the offer summary you just created. + +1. **Terms and Conditions**: Select the check box after you have read the disclaimer. +2. Click **Create EMI Offer**. + ![Check the terms and conditions and create an offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-low-cost-emi-overview.jpg.md) + +By default, all the created offers are in the **enabled** state. + +## Test the Low Cost EMI Offer + +You can test the created Low Cost EMI offer for all Standard Checkout payments, including [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md), [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md), [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md) and so on. + +> **INFO** +> +> +> **Handy Tips** +> +> - You can toggle between Live and Test Modes on your **Dashboard**. Navigate to the top menu ribbon and click the drop-down icon against **Live Mode**. Toggle to **Test Mode** and test the offers enabled. +> +> - You can make test payments using one of the payment methods at the Checkout. No money is deducted from your account as this is a simulated transaction. +> + +We will test the offer using a valid Payment Link for this example. Follow the steps given below: + +1. Select the **Payment Link Id** you wish to test the created offer from the Dashboard. + ![Payment Link Test Offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offer-dashboard-test.jpg.md) +2. Copy the **Payment Link** URL and open it in your browser. +3. Enter your contact details and click **Proceed**. +4. Select **EMI**. +5. Select the payment option you created for the offer on from the Dashboard. Select the EMI plan and enter the required [test details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md). +6. Click **Pay via EMI** +7. Select **Success** or **Failure**, depending on which flow you wish to test. +8. You should see a confirmation message depending on the flow you have selected. + +On successful payment, you should have received a discount on your payment. You can verify this by navigating to the **Transactions** → **Payments** tab and viewing the payment details. + +## Disabling Low Cost EMI Offers + +To disable Low Cost EMI offers: + +## Next Steps + +Now that the Low Cost EMI is created, you should integrate it with the Checkout for customers to avail the EMI scheme. +Know more about [integrating Low Cost EMI Offers with Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/standard-integration.md). + +### Related Information +- [Tutorial - How to Create Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/tutorial.md) +- [Low Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/faqs.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/custom-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/custom-integration.md new file mode 100644 index 00000000..6317ae30 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/custom-integration.md @@ -0,0 +1,243 @@ +--- +title: Integrate Low Cost EMI Offers with Custom Checkout +description: Integrate Low Cost EMI Offers with Custom Checkout built using Razorpay.js. +--- + +# Integrate Low Cost EMI Offers with Custom Checkout + +In the Checkout form designed to meet your business needs and branding, you can display Low Cost EMI Offers to attract a broader customer base by reducing the upfront cost barrier, leading to increased sales and higher average order values. + +You can decide the cost to subvent for each EMI tenure while [creating an offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/create.md) and the customer bears the remaining cost. This approach ensures that customers enjoy the benefits of EMI at an affordable cost, helping you minimise the overall cost. + +> **INFO** +> +> +> **New to Custom Checkout Integration?** +> +> If yes, know more about the [custom integration flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). +> + +## Prerequisites + +Before integrating Low Cost EMI offers for your custom Checkout, run through this checklist: + +1. Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#payment-life-cycle). +2. Generate the API keys from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys). + +> **WARN** +> +> +> **Watch Out!** +> +> A customer's payment information should never reach your servers unless you are PCI-DSS certified. +> + +## Integration Steps + +The procedure for integrating Custom Checkout on your website is explained in the [Custom Integration document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). However, the procedure varies while passing the offers in the payment details. + +1. [Create a Low Cost EMI Offer](#step-1-create-a-low-cost-emi-offer) +2. [Create an Order and Pass Offer_id](#step-2-create-an-order-and-pass-offer-id) +3. [Show the Offer on Checkout](#step-3-show-the-offer-on-checkout) +4. [Submit Payment Details](#step-4-submit-payment-details) + +## Step 1: Create a Low Cost EMI Offer + +You can create a Low Cost EMI offer from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md). + +> **WARN** +> +> +> **Watch Out!** +> +> After the offer creation, you need to save the breakdown of the interest rate percentage (subvented by you and your customer) and offer ID at your end. +> + +## Step 2: Create an Order and Pass Offer_id + +After generating the offer from the Dashboard, pass the `offer_id` in the order request attributes to the following endpoint: + +> **WARN** +> +> +> **Watch Out!** +> +> For Low Cost EMI, a separate `offer_id` is created for each tenure. +> + +### Sample Request + +Use the sample codes given below: + +/orders + +```curl: Sample Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "offer_id": "offer_DtEhEm3XslgfXE" +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("offers", "offer_DtEhEm3XslgfXE"); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": "offer_ANZoaxsOww2X53" +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 1000, 'currency' => 'INR', 'offer_id'=> 'offer_JTUADI4ZWBGWur')); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("offer_id", "offer_JTUADI4ZWBGWur"); +Order order = client.Order.Create(options); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 1000, currency: 'INR', receipt: 'receipt#1', offer_id: 'offer_ANZoaxsOww2X53' +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000, + currency: "INR", + receipt: "receipt#1", + offer_id: "offer_ANZoaxsOww2X53" +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_DtEkng132N71M8", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": null, + "order_id": "order_CjyltuCttYiMe8", + "offer_id": "offer_DtEhEm3XslgfXE", + "offers": [ + "offer_DtEhEm3XslgfXE" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1576577191 +} +``` + +### Request Parameters + +Using the following attributes, send an order request using the Orders API. + +`amount` _mandatory_ +: `integer` Enter the amount for which the order is to be created. For example, if the amount to be charged is ₹299.95, then pass `29995` in this field. + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the order amount. For example,`INR`. + +`offer_id` _mandatory_ +: `string` Unique identifier of the offer. Pass the `offer_id` obtained from the response of the previous step. + + +> **INFO** +> +> +> **Handy Tips** +> +> This is mandatory only in cases where you want to associate an offer or offers with the Order or you had not selected the [Show Offer on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md#offer-validity) while creating the offer from the Dashboard. +> + +## Step 3: Show the Offer on Checkout + +You need to show the availability of Low Cost EMI Offers on checkout. Customers should be able to view the discount on interest being given to them and how much interest they need to bear. + +For example, you can view the image below to see how Low Cost EMI offers appear on [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/low-cost-emi.md). + +![Low Cost EMI on Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/low-cost-emi-standard.jpg.md) + +## Step 4: Submit Payment Details + +Once the order is created and the customer's payment details are obtained, the information should be sent to Razorpay to complete the payment. The data that needs to be submitted depends upon the payment method the customer selects. + +While invoking the `createPayment` method, pass the `order_id` and the `offer_id` in the payment request as follows: + +```js: Checkout +var data = { + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR", // Default is INR. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + offer_id: 'offer_DtEhEm3XslgfXE', + order_id: 'order_DtEkng132N71M8', // pass the Order ID generated in Step 2 + method: 'netbanking', // method specific fields + bank: 'HDFC' +}; + +$btn.on('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on('payment.success', function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + + razorpay.on('payment.error', function(resp){alert(resp.error.description)}); // will pass error object to error handler + +}) +``` + +Know more about [Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). + +## Next Steps + +After the customer has availed the offer and made the payment at the Checkout, you can track the status of the payments: + +- From the Dashboard. +- By [configuring webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). +- By polling our [payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#fetch-payments-based-on-orders). + +### Related Information +- [About Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi.md) +- [Create Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/create.md) +- [Tutorial - How to Create Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/tutorial.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/faqs.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/faqs.md new file mode 100644 index 00000000..b4b44dc3 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/faqs.md @@ -0,0 +1,67 @@ +--- +title: Low Cost EMI - FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Low Cost EMI. +--- + +# Frequently Asked Questions (FAQs) + +### 1. Why should I run Low Cost EMI Offers? + + Running Low Cost EMI Offers helps you attract a wider customer base by reducing the upfront cost barrier. This leads to increased sales and higher average order values. + + Additionally, offering discount on interest for longer tenures sets you apart in a competitive market and opens opportunities for upselling, contributing to overall business growth and financial stability. + + + +### 2. Who bears the cost for the discount given in Low Cost EMI? + + As a business, you would bear the partial cost of Low Cost EMI, which appears as an upfront discount on the product cost to the end consumer. + + You can decide the cost to subvent for each tenure and the customer bears the remaining cost. The interest percentage will vary by the bank and the EMI tenure. Know more about the [EMI Calculation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi.md#calculation-of-emi). + + + +### 3. Which payment methods can be used for Low Cost EMI? + + Low Cost EMI is available on all credit and debit card EMIs. + + + +### 4. Will the customers' banks continue to charge them interest? + + Yes, the customers' banks will continue to charge them interest. However, partial interest subvented by you appears as an upfront discount to the customers at the time of purchase. + + + +### 5. Can I enable Low Cost EMIs at the Checkout? + + Yes. Razorpay enables you to display Low Cost EMIs at the Checkout. Know more about [Low Cost EMIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi.md). + + + +### 6. How can I know about the percentage discount of the Low Cost EMI that I bear? + + You can decide how much percentage of the total interest you want to subvent during offer creation. This appears as an upfront discount on the product cost and the customer bears the remaining cost. + + + +### 7. How does the Low Cost EMI settlement work? + + The order amount minus the discount subvented by you is settled in your bank account as per your [settlement cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md#settlement-cycle). + + +> **WARN** +> +> +> **Watch Out!** +> +> Razorpay pricing is not included in this settlement, it will be applied in addition to the above amount. +> + + + + +### 8. Can I create Low Cost EMI offers on Cardless EMI? + + No, we do not support Low Cost EMI offers on Cardless EMI. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/s2s-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/s2s-integration.md new file mode 100644 index 00000000..1d9aac80 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/s2s-integration.md @@ -0,0 +1,299 @@ +--- +title: Integrating Low Cost EMI Offers in Server-to-Server (S2S) +description: Integrate Low Cost EMI Offers in your payment flow while making direct API calls to Razorpay server. +--- + +# Integrating Low Cost EMI Offers in Server-to-Server (S2S) + +You can integrate Low Cost EMI offers with your payment flows while integrating directly with our APIs. + +## Prerequisites + +Generate the API keys to start your integration. The keys are required for authenticating API requests with our servers. + +Log in to the Dashboard to generate the API keys, if you have not done earlier. To make the direct API calls, you need the `Key_Secret`. + +## Integration Steps + +1. [Create a Low Cost EMI Offer](#step-1-create-a-low-cost-emi-offer) +2. [Create an Order and Pass Offer_id](#step-2-create-an-order-and-pass-offer-id) +3. [Create a Payment](#step-3-create-a-payment) +4. [Show the Offer on Checkout](#step-4-show-the-offer-on-checkout) +5. [Verify the Payment](#step-5-verify-the-payment) + +## Step 1: Create a Low Cost EMI Offer + +[Create a Low Cost EMI offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md) from the Dashboard. + +> **WARN** +> +> +> **Watch Out!** +> +> After the offer creation, you need to save the breakdown of the interest rate percentage (subvented by you and your customer) and offer ID for each tenure at your end to [show the offer on checkout](#step-4-show-the-offer-on-checkout). +> + +## Step 2: Create an Order and Pass Offer_id + +After generating the offer from the Dashboard, pass the `offer_id` in the order request attributes to the following endpoint: + +> **WARN** +> +> +> **Watch Out!** +> +> For Low Cost EMI, a separate `offer_id` is created for each tenure. +> + +/orders + +```curl: Sample Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "offer_id": "offer_DtEhEm3XslgfXE" +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("offers", "offer_DtEhEm3XslgfXE"); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": "offer_ANZoaxsOww2X53" +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => 'INR', 'offer_id'=> 'offer_JTUADI4ZWBGWur')); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("offer_id", "offer_JTUADI4ZWBGWur"); +Order order = client.Order.Create(options); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', offer_id: 'offer_ANZoaxsOww2X53' +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 50000, + currency: "INR", + receipt: "receipt#1", + offer_id: "offer_ANZoaxsOww2X53" +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_DtEkng132N71M8", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": null, + "order_id": "order_CjyltuCttYiMe8", + "offer_id": "offer_DtEhEm3XslgfXE", + "offers": [ + "offer_DtEhEm3XslgfXE" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1576577191 +} +``` + +## Step 3: Create a Payment + +Send the following attributes required to create a payment at the following endpoint: + +/payments/create/json + +### Sample Code + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ +-d'{ + "amount": 1000, + "currency": "INR", + "contact": 8888888888, + "email": "gaurav@gmail.com", + "order_id": "order_CjyltuCttYiMe8", + "method": "emi", + "emi_duration": 9, + "card":{ + "number": "4111111111111111", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + } +}' + +```curl: Response +{ + “razorpay_payment_id”: “pay_MfMzOzUwDKgznE”, + “next”: [ + { + “action”: “redirect”, + “url”: “https://api.razorpay.com/v1/payments/MfMzOzUwDKgznE/authenticate” + }, + { + “action”: “otp_generate”, + “url”: “https://api.razorpay.com/v1/payments/pay_MfMzOzUwDKgznE/otp_generate?track_id=MfMzOzUwDKgznE&key_id=rzp_test_XXXXXXXXXXXXXX” + } + ] +} +``` + +### Request Parameters + +`key_id` _mandatory_ +: `string` The key id that you have generated from the **API Keys** tab in the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, `INR`. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order. + Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`ip` _mandatory_ +: `string` Customer's IP address. + +`email` _mandatory_ +: `string` Email address of the customer. Maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. Maximum length supported is 15 characters, inclusive of country code. + +`method` _mandatory_ +: `string` Name of the payment method. Possible value is `emi`. + +`card` +: Details associated with the card. Required if the payment method is `card`. + + `number` _mandatory_ + : `string` Unformatted card number. Required if the method is `card`. + + `name` _mandatory_ + : `string` Name of the cardholder. Required if the method is `card`. + + `expiry_month` _mandatory_ + : `integer` Expiry month for card in `MM` format. Required if the method is `card`. + + `expiry_year` _mandatory_ + : `string` Expiry year for card in `YY` format. Required if the method is `card`. + + `cvv` _mandatory_ + : `string` CVV printed on the back of card. Required if the method is `card`. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +`emi_duration` +: `string` The EMI duration in months. Required if the method is `emi`. + +`notes` _optional_ +: `object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`referrer` _optional_ +: `string` Referrer header passed by the client's browser. + +`user_agent` _optional_ +: `string` Customer user-agent. + +### Response Parameters + +If the payment request is valid, the response contains the following fields. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + +`action` +: `string` An indication of the next step available to you to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the bank page. + +`url` +: `string` URL to be used for the action indicated. + +## Step 4: Show the Offer on Checkout + +You need to show the availability of Low Cost EMI Offers on checkout. Customers should be able to clearly view the discount on interest being given to them and how much interest they need to bear. + +For example, you can view the image below to see how Low Cost EMI offers appear on [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/low-cost-emi.md). + +![Low Cost EMI on Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/low-cost-emi-standard.jpg.md) + +## Step 5: Verify the Payment + +Once the customer completes the payment, a `POST` request is sent to the `callback_url` provided in the [payment create request](#step-3-create-a-payment). The data contained in the `POST` request depends on the **success** or **failure** of the payment made by the customer. + +## Next Steps + +After the customer has availed the offers and made the payment on the Checkout, you can track the status of the payments: + +- From the Dashboard. +- By [configuring webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). +- By polling our [payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#fetch-payments-based-on-orders). + +### Related Information +- [About Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi.md) +- [Create Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/create.md) +- [Tutorial - How to Create Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/tutorial.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/standard-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/standard-integration.md new file mode 100644 index 00000000..e321bfeb --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/standard-integration.md @@ -0,0 +1,242 @@ +--- +title: Integrate Low Cost EMI Offers with Standard Checkout +description: Display general or order specific Low Cost EMI Offers on Standard Checkout. +--- + +# Integrate Low Cost EMI Offers with Standard Checkout + +After creating [ Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/create.md) from the Dashboard, you have to integrate them with Razorpay Standard Checkout so that your customers can avail them while making payments. + +> **WARN** +> +> +> **Integrate Offers with Orders API** +> +> If you use our JS, SDK files or other ecommerce plugins, you **should** integrate offers with the Orders API. +> + +## Exception + +You need **not** integrate offers with Orders API, if you use any of the following Razorpay products or plugins to accept payments: + + - Plugins: Razorpay Magento, Shopify, or WooCommerce. + - Products: Payment Links, Payment Buttons, Payment Pages and Invoices. + +This is because Razorpay automatically creates orders for these products or plugins when customers initiate payment at the Checkout. + +## Validation Criteria + +Only those Low Cost EMI offers that pass the following validations are displayed at the Checkout: + +Criteria | Description +--- +**Amount Match** | Order amount should be more than or equal to the [Minimum Order Amount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/create.md) set in an offer. +--- +**EMI Offer Type** | Select **Low Cost EMI** as the offer type and configure the interest that you and your customer will bear. +--- +**Validity** | Offer should be in the active or enabled state. +--- +**Date Validation** | The current date lies within the range of the `start` and `end` date defined in the offer. +--- +**Usage** | You can define the maximum number of times an offer can be availed. If this limit is met, the offer will not be displayed on Checkout. +--- +**Show Offer on Checkout** | This option must be enabled while the offer is created. This determines whether the offer will be displayed at the Checkout or not. + +## Display Low Cost EMI Offers at Checkout + +There are two ways in which you can display Low Cost EMI offers at the Razorpay Checkout: + +- [Display Low Cost EMI Offers by Default](#method-1-display-low-cost-emi-offers-by-default) +- [Display Limited Low Cost EMI Offers](#method-2-display-limited-low-cost-emi-offers) + +## Method 1: Display Low Cost EMI Offers by Default + +This is the easiest way to display Low Cost EMI offers at the Checkout. While [creating the Low Cost EMI offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/create.md) from the Dashboard, enable the **Show Offer on Checkout** option. + +![Enter the offer validity details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-low-cost-emi-offer-validity.jpg.md) + +## Method 2: Display Limited Low Cost EMI offers + +To display a specific Low Cost EMI offer at Checkout, you should associate the offer with an order. You can pass the `offers` array as a request attribute in the Create Orders API. + +Some use cases: +- If you have multiple product lines running on the same account and have certain business logic on your side for displaying Low Cost EMI offers. +- The discount has already been applied, and you would like to restrict the payment method to avail the offer. + +To display offers: +1. [Create an Offer](#step-1-create-an-offer-from-the-dashboard). +2. [Pass offer_id in Orders API](#step-2-pass-offer-id-in-orders-api). +3. [Pass order_id and Trigger Checkout](#step-3-pass-order-id-and-trigger-the). + +### Step 1: Create an Offer from the Dashboard + +You can [create Low Cost EMI offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md#create-offers) from the Dashboard. + +Let us say you have created a Low Cost EMI offer `offer_ANZoaxsOww2X53`, such that a discount of ₹200 is applicable on all transactions done through AXIS netbanking only. + +### Step 2: Pass offer_id in Orders API + +Create an order using the Orders API and pass the `offer_id` as a request parameter. + +#### Sample Code + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000000, + "currency": "INR", + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("offers", Offer); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000000, + "currency": "INR", + "receipt": "receipt#1", + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 1000000, 'currency' => 'INR', 'offers'=> array('offer_JTUADI4ZWBGWur'))); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', offers: [ + 'offer_ANZoaxsOww2X53"' +] +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000000, + currency: "INR", + receipt: "receipt#1", + offers: [ + "offer_ANZoaxsOww2X53" + ] +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_CjyoZFRpB8r0AH", + "entity": "order", + "amount": 1000000, + "amount_paid": 0, + "amount_due": 1000000, + "currency": "INR", + "receipt": null, + "offer_id": "offer_ANZoaxsOww2X53", + "offers": [ + "offer_ANZoaxsOww2X53" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1561018912 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Enter the amount for which the order is to be created in currency subunits. For example, for an amount of ₹10000, enter `1000000`. + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the order amount. Here, it is `INR`. + +`offers` _mandatory_ +: `array` Unique identifier of the offer. Pass the `offer_id` obtained from the response of the previous step. + +### Step 3: Pass Order_id and Trigger the Checkout + +The `order_id` obtained in the previous step can be passed to the Checkout form as follows: + +```js: Checkout +Pay + +var options = { + "key": "[YOUR_KEY_ID]", + "amount": "1000000", + "currency": "INR", + "order_id":"order_FIL1vBOsWFllnO", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://cdn.razorpay.com/logos/F9Yhfb7ZXjXmIQ_medium.jpg", + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +``` + +Know more about [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + +## Next Steps + +After the customer has availed the offers and made the payment at the Checkout, you can track the status of the payments: + +- From the Dashboard. +- By [configuring webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). +- By polling our [payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md). + +### Related Information + +- [About Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi.md) +- [Create Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/create.md) +- [Tutorial - How to Create Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/tutorial.md) +- [Low Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/faqs.md) +- [Disable Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/create.md#disabling-low-cost-emi-offers) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/tutorial.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/tutorial.md new file mode 100644 index 00000000..c4cf9b2b --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/tutorial.md @@ -0,0 +1,31 @@ +--- +title: Tutorial - How to Create Low Cost EMI Offers +description: Create Low Cost EMI Offers from the Razorpay Dashboard. +--- + +# Tutorial - How to Create Low Cost EMI Offers + +Let us create an offer from the Dashboard. For example, let us assume you are the manager of Acme Mobiles and Accessories, an online smartphone store. You want to offer discounts on online purchases to attract customers and increase sales. + +You want to create a Diwali Offer with the following settings: + +Offer Criteria | Offer Information +--- +Offer Name | Diwali Dhamaka +--- +Display Text | Low Cost EMI Offers +--- +Offer Type | Instant +--- +Minimum Order Amount | ₹4,000 +--- +Maximum Order Amount | ₹1,00,000 +--- +Issuing Bank | ICICI Bank +--- +EMI Tenures | 6, 9 and 12 months + +### Related Information + +- [About Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi.md) +- [Low Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/faqs.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi.md new file mode 100644 index 00000000..c4b243fc --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi.md @@ -0,0 +1,92 @@ +--- +title: About No Cost EMI Offers +description: Provide No Cost EMI Offers to customers at the Razorpay Checkout. +--- + +# About No Cost EMI Offers + +No Cost EMI is an offer by which your customer pays the EMI provider only the product price, which is equally divided over the repayment timeline. Know more about [No Cost EMIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) as a Razorpay payment method. + +> **WARN** +> +> +> **Watch Out!** +> +> - We do not support offers on international currency and the CFB (Customer Fee Bearer) model. +> - We do not support No Cost EMI offers on Cardless EMI. +> + +> **INFO** +> +> +> **Handy Tips** +> +> An EMI discount will be applied to the customer's purchase to cover the interest the bank charges. For example, if the bank's interest is ₹100, an EMI discount of ₹100 will be applied to the order, thereby making the effective interest 0. +> +> The customer will be charged the GST on interest by the bank. This interest and GST will show up on the customer's bank statement. +> + +## Example + +Let us consider the example of a customer buying a mobile phone worth ₹15,000 on No Cost EMI on a 3-month EMI period. The bank charges 15% interest per annum. Additionally, the bank may charge the customer GST on the interest. + +``` +Cost of mobile phone: ₹15,000 +Tenure of No Cost EMI: 3 months +Interest Rate: 15% per annum +Interest Amount: ₹367.33 +No Cost EMI Amount: ₹5,000 +Actual loan amount charged on customer's card (Cost of Mobile Phone minus Interest Amount): ₹14,632.67 +``` + +The No Cost EMI calculation is given below: + +Month | Outstanding loan at the start of the month | EMI | Interest | Loan Principal Paid | Outstanding principal at the end of the month | GST on Interest at 18% | EMI + GST +--- +1 | 14632.67 | 5000 | 182.91 | 4817.09 | 9815.58 | 32.92 | 5032.92 +--- +2 | 9815.58 | 5000 | 122.69 | 4877.31 | 4938.27 | 22.09 | 5022.09 +--- +3 | 4938.27 | 5000 | 61.73 | 4938.27 | Nil | 11.11 | 5011.11 +--- +Total | | 15000 | 367.33 | 14632.67 | | 66.12 | 15066.12 + +> **INFO** +> +> +> **Customers Pay GST on Interest** +> +> In a no cost EMI, you provide a discount on the principal. The monthly installment paid by the customer consists of this principal and the interest. As the issuing banks still charge the interest, the customer will be charged the GST on interest by the bank. +> + +## Calculation of EMI + +EMI is generally calculated using the below formula: + +`EMI = [P x R x (1+R)ᴺ]/[(1+R)ᴺ⁻¹]` + +where + +**P** = Principal + +**R** = Interest rate per month + +**N** = Number of installations of the EMI + +For No Cost EMI, the EMI value is calculated as A/N, where **A** is the price of the product. + +From the above example, EMI is ₹15000/3 = ₹5000 + +We will replace this value in the above equation to calculate the value of P. + +`5000 = [P x (0.15/12) x (1+(0.15/12))³]/[(1+(0.15/12))³⁻¹]` + +**P** comes out to be ₹14632.67, and the discount borne by you is ₹367.33. This is equal to 2.45% of the original amount. + +### Related Information + +- [Create No Cost EMI Offers from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/create.md) +- [Integrate No Cost EMI Offers with Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/standard-integration.md) +- [Tutorial on How to Create No Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/tutorial.md) +- [No Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/faqs.md) +- [EMI²](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi².md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/create.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/create.md new file mode 100644 index 00000000..21c969f7 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/create.md @@ -0,0 +1,112 @@ +--- +title: Create No Cost EMI Offers +description: Create No Cost EMI Offers from the Razorpay Dashboard. +--- + +# Create No Cost EMI Offers + +A No cost EMI offer is a plan where your customers can pay for a product or service in affordable monthly installments with zero interest. This means that the customers are only paying for the product's total price, with no extra charges. + +You can create No Cost EMI offers from the Dashboard. + +**Handy Tips** + +Once you create a No Cost EMI offer, you cannot edit it. To make changes, disable the previous offer and create a new one. + +You can review the offer configurations at the end under the [**Overview**](#overview) tab. + +### Description + +In the **Description** section, enter the following details. All the fields are mandatory. + +1. **Offer Name**: Enter the name of the offer. For example, **Diwali Dhamaka**. This appears at the Checkout. +2. **Display Text**: Enter a meaningful description for the offer. For example, **No Cost EMI Offer**. This appears at the Checkout. +3. **Terms**: Enter the terms and conditions for this offer. +4. Click **Next**. + ![Enter the offer details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-no-cost-emi-description.jpg.md) + +### Discount Type + +In the **Discount Type** section, enter the discount details that should be applied for the offer. + +1. **Minimum Order amount**: Enter the minimum bill amount for which the No Cost EMI Offer can be applied. For example, the offer can be applied to a minimum amount of **₹3,000**. This is a mandatory field. +2. **Maximum Order amount**: Enter the maximum bill amount for which the No Cost EMI Offer can be applied. For example, the offer can be applied to a maximum amount of **₹4,00,000**. +3. Click **Next**. + ![Enter the discount details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-no-cost-emi-discount-type.jpg.md) + +### Applicable On + +Under the **Applicable On** tab, fill in the following details: + +1. **Issuer**: Select the bank issuing the No Cost EMI and click **Next**. +2. **EMI Tenure**: Select the tenures to be listed at the Checkout. +3. **EMI Offer Type**: Select **No Cost EMI** from the drop-down list. This also displays the discount that you will bear. +4. Click **Next**. + + ![Enter the payment method details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-no-cost-emi-applicable-on.jpg.md) + +### Offer Validity + +In the **Offer Validity** tab, set how long the offer should be valid and how you want to handle the payment failure situations: + +1. **Starting On**: Select the **Starts Immediately** check box for the offer to come into effect immediately. Alternatively, you can select the date and the time from which the created Offer should become active. +2. **Expires On**: Select the date and time at which the offer should end. For example, **31 Oct 2020** at **11:59pm**. +3. **On Payment Failure**: Define how to handle payment failure. + - **Do not allow payment to go through**: The payment is failed. + - **Allow customer to pay without availing offer**: The payment is allowed even though the set validations are not met. However, the offer is not applied to the bill amount. The customer will be charged the entire order amount. +4. **Max Usage**: Set the number of times the offer should be applied across all transactions. For example, **100**. +5. **Show Offer on Checkout**: Select this check box for the created offer to be displayed for all Standard Checkout payments, including [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md). +6. Click **Next**. + + ![Enter the offer validity details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-no-cost-emi-offer-validity.jpg.md) + +### Overview + +Click the **Overview** tab to view the summary of the offer that you just created. + +1. **Terms and Conditions**: Select the check box after you have read the disclaimer. +2. Click **Create EMI Offer**. + ![Check the terms and conditions and create an offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-no-cost-emi-overview.jpg.md) + +By default, all the created offers are in the **enabled** state. + +## Test the No Cost EMI Offer + +You can test the created No Cost EMI offer for all Standard Checkout payments, including [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md), [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md), [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md) and so on. + +> **INFO** +> +> +> **Handy Tips** +> +> - You can toggle between Live and Test Modes on your **Dashboard**. Navigate to the top menu ribbon and click the drop-down icon against **Live Mode**. Toggle to **Test Mode** and test the offers enabled. +> +> - You can make test payments using one of the payment methods at the Checkout. No money is deducted from your account as this is a simulated transaction. +> + +For this example, we will test the offer on a valid Payment Link. Follow the steps given below: + +1. Select the **Payment Link Id** you wish to test the created offer from the Dashboard. +2. Copy the **Payment Link** URL and open it in your browser. + ![Payment Link Test Offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/no-cost-offer-dashboard-test.jpg.md) +3. Enter your contact details and click **Proceed**. +4. Select **EMI**. +5. Select the payment option you created the offer on from the Dashboard. Enter the required [test details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md). +6. Select Success or Failure, depending on which flow you wish to test. +7. You should see a confirmation message depending on the flow you have selected. + +On successful payment, you should have received a discount on your payment. You can verify this by navigating to the Transactions → Payments tab and viewing the payment details. + +## Disabling No Cost EMI Offers + +To disable No Cost EMI offers: + +## Next Steps + +Now that the No Cost EMI is created, you should integrate it with the Checkout for customers to avail the EMI scheme. +Know more about [integrating No Cost EMI Offers with Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/standard-integration.md). + +### Related Information + +- [Tutorial - How to Create No Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/tutorial.md) +- [No Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/faqs.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/faqs.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/faqs.md new file mode 100644 index 00000000..b08f89ff --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/faqs.md @@ -0,0 +1,130 @@ +--- +title: No Cost EMI - FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about No Cost EMI. +--- + +# Frequently Asked Questions (FAQs) + +### 1. Who bears the cost for the discount given in No Cost EMI? + + You, as a merchant, would bear the cost of No Cost EMI. It will be given as an upfront discount on the product cost to the end consumer. The discount percentage will vary by the bank and period of EMI. + + + +### 2. Which payment methods can be used for No Cost EMI? + + No Cost EMI is available on all credit card and debit card EMI banks. + + + +### 3. Will the customers' banks continue to charge them interest? + + Yes, the customers' banks will continue to charge them interest. However, this interest charge has been provided to the customer as an upfront discount at the time of purchase, effectively giving them the benefit of a No Cost EMI. + + + +### 4. Can I enable No Cost EMIs at the Checkout? + + Yes. Razorpay enables you to display No Cost EMIs at the Checkout. Know more about [No Cost EMIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi.md). + + + +### 5. How can I know about the percentage discount of the No Cost EMI that I bear? + + +> **INFO** +> +> +> **Handy Tips** +> +> The banks charge GST to end consumers on the interest paid over and above the following amount. +> + + Calculations on the cost incurred by the merchant at all standard plan and tenures are listed below: + + + Amount (in INR) | Interest (in %) | Tenure (in Months) | Amount Paid by Customer | Monthly EMI | No Cost EMI Discount | Discount | Pricing | Total Cost (in %) + --- + 10000 | 11% | 3 | 9,819.43 | 3333.33 | 180.57 | 1.81% | 3% | 4.81% + --- + 10000 | 12% | 3 | 9,803.28 | 3333.33 | 196.72 | 1.97% | 3% | 4.97% + --- + 10000 | 13% | 3 | 9,787.18 | 3333.33 | 212.82 | 2.13% | 3% | 5.13% + --- + 10000 | 14% | 3 | 9,771.13 | 3333.33 | 228.87 | 2.29% | 3% | 5.29% + --- + 10000 | 15% | 3 | 9,755.11 | 3333.33 | 244.89 | 2.45% | 3% | 5.45% + --- + 10000 | 11% | 6 | 9686.85 | 1666.67 | 313.15 | 3.13% | 3% | 6.13% + --- + 10000 | 12% | 6 | 9659.13 | 1666.67 | 340.87 | 3.41% | 3% | 6.41% + --- + 10000 | 13% | 6 | 9631.53 | 1666.67 | 368.47 | 3.68% | 3% | 6.68% + --- + 10000 | 14% | 6 | 9604.04 | 1666.67 | 395.96 | 3.96% | 3% | 6.96% + --- + 10000 | 15% | 6 | 9576.68 | 1666.67 | 423.32 | 4.23% | 3% | 7.23% + --- + 10000 | 11% | 9 | 9556.66 | 1111.11 | 443.34 | 4.43% | 3% | 7.43% + --- + 10000 | 12% | 9 | 9517.80 | 1111.11 | 482.20 | 4.82% | 3% | 7.82% + --- + 10000 | 13% | 9 | 9479.17 | 1111.11 | 520.83 | 5.21% | 3% | 8.21% + --- + 10000 | 14% | 9 | 9440.77 | 1111.11 | 559.23 | 5.59% | 3% | 8.59% + --- + 10000 | 15% | 9 | 9402.61 | 1111.11 | 597.39 | 5.97% | 3% | 8.97% + --- + 10000 | 11% | 12 | 9428.80 | 833.33 | 571.20 | 5.71% | 3% | 8.71% + --- + 10000 | 12% | 12 | 9379.23 | 833.33 | 620.77 | 6.21% | 3% | 9.21% + --- + 10000 | 13% | 12 | 9330.04 | 833.33 | 669.96 | 6.70% | 3% | 9.70% + --- + 10000 | 14% | 12 | 9281.21 | 833.33 | 718.79 | 7.19% | 3% | 10.19% + --- + 10000 | 15% | 12 | 9232.76 | 833.33 | 767.24 | 7.67% | 3% | 10.67% + --- + 10000 | 11% | 18 | 9179.92 | 555.56 | 820.08 | 8.20% | 3% | 11.20% + --- + 10000 | 12% | 18 | 9110.15 | 555.56 | 889.85 | 8.90% | 3% | 11.90% + --- + 10000 | 13% | 18 | 9041.13 | 555.56 | 958.87 | 9.59% | 3% | 12.59% + --- + 10000 | 14% | 18 | 8972.85 | 555.56 | 1027.15 | 10.27% | 3% | 13.27% + --- + 10000 | 15% | 18 | 8905.30 | 555.56 | 1094.70 | 10.95% | 3% | 13.95% + --- + 10000 | 11% | 24 | 8939.84 | 416.67 | 1060.16 | 10.60% | 3% | 13.60% + --- + 10000 | 12% | 24 | 8851.41 | 416.67 | 1148.59 | 11.49% | 3% | 14.49% + --- + 10000 | 13% | 24 | 8764.21 | 416.67 | 1235.79 | 12.36% | 3% | 15.36% + --- + 10000 | 14% | 24 | 8678.23 | 416.67 | 1321.77 | 13.22% | 3% | 16.22% + --- + 10000 | 15% | 24 | 8593.43 | 416.67 | 1406.57 | 14.07% | 3% | 17.07% + + + + +### 6. How does the No Cost EMI settlement work? + + The order amount minus the entire interest subvented by you as a discount is settled in your bank account as per your [settlement cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md#settlement-cycle). + + +> **WARN** +> +> +> **Watch Out!** +> +> However, Razorpay pricing is not included in this settlement, it will be applied in addition to the above amount. +> + + + + +### 7. Can I create No Cost EMI offers on Cardless EMI? + + No, we do not support No Cost EMI offers on Cardless EMI. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/standard-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/standard-integration.md new file mode 100644 index 00000000..6bb1a4d5 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/standard-integration.md @@ -0,0 +1,241 @@ +--- +title: Integrate No Cost EMI Offers with Standard Checkout +description: Display general or order specific No Cost EMI Offers on Standard Checkout. +--- + +# Integrate No Cost EMI Offers with Standard Checkout + +After creating [ No Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/create.md) from the Dashboard, you must integrate them with the Razorpay Standard Checkout so your customers can avail of them while making payments. + +> **WARN** +> +> +> **Integrate Offers with Orders API** +> +> Using our JS, SDK files, or other Ecommerce plugins, you **should** integrate offers with the Orders API. +> + +## Exception + +You need **not** integrate offers with Orders API if you use any of the following Razorpay products or plugins to accept payments: + + - Plugins: Razorpay Magento, Shopify, or WooCommerce. + - Products: Payment Links, Payment Buttons, Payment Pages and Invoices. + +This is because Razorpay automatically creates orders for these products or plugins when customers initiate payment at the Checkout. + +## Validation Criteria + +Only those No Cost EMI offers that pass the following validations are displayed at the Checkout: + +Criteria | Description +--- +**Amount Match** | Order amount should be more than or equal to the [Minimum Order Amount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/create.md) set in an offer. +--- +**Validity** | Offer should be in the active or enabled state. +--- +**Date Validation** | The current date lies within the range of the offer's `start` and `end` dates. +--- +**Usage** | You can define the maximum number of times an offer can be availed. If this limit is met, the offer will not be displayed on Checkout. +--- +**Show Offer on Checkout** | This option must be enabled while the offer is created. This determines whether the offer will be displayed at the Checkout or not. + +## Display No Cost EMI Offers at Checkout + +There are two ways in which you can display No Cost EMI offers at the Razorpay Checkout: + +- [Display No Cost EMI Offers by Default](#method-1-display-no-cost-emi-offers-by-default) +- [Display Limited No Cost EMI Offers](#method-2-display-limited-no-cost-emi-offers) + +### Method 1: Display No Cost EMI Offers by Default + +This is the easiest way to display No Cost EMI offers at the Checkout. While [creating the No Cost EMI offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/create.md) from the Dashboard, enable the **Show Offer on Checkout** option. + +![Enable the Show Offer on Checkout option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-no-cost-emi-offer-validity.jpg.md) + +### Method 2: Display Limited No Cost EMI offers + +To display a specific No Cost EMI offer at the Checkout, you should associate the offer with an order. You can pass the `offers` array as a request attribute in the Create Orders API. + +Some use cases: +- If you have multiple product lines running on the same account and have certain business logic for displaying No Cost EMI offers. +- The discount has already been applied, and you would like to restrict the payment method to avail the offer. + +To display offers: +1. [Create an Offer](#step-1-create-an-offer-from-the-dashboard). +2. [Pass offer_id in Orders API](#step-2-pass-offer-id-in-orders-api). +3. [Pass order_id and Trigger Checkout](#step-3-pass-order-id-and-trigger-the). + +### Step 1: Create an Offer from the Dashboard + +You can [create No Cost EMI offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md#create-offers) from the Dashboard. + +Let us say you have created a No Cost EMI offer `offer_ANZoaxsOww2X53`, such that a discount of ₹200 is applicable on all transactions done through AXIS netbanking only. + +[Video: https://www.youtube.com/embed/aUThK0ADspM?si=4tsQ5odC1AGa-1Sh] + +### Step 2: Pass offer_id in Orders API + +Create an order using the Orders API and pass the `offer_id` as a request parameter. + +#### Sample Code + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000000, + "currency": "INR", + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("offers", Offer); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000000, + "currency": "INR", + "receipt": "receipt#1", + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 1000000, 'currency' => 'INR', 'offers'=> array('offer_JTUADI4ZWBGWur'))); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', offers: [ + 'offer_ANZoaxsOww2X53"' +] +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000000, + currency: "INR", + receipt: "receipt#1", + offers: [ + "offer_ANZoaxsOww2X53" + ] +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_CjyoZFRpB8r0AH", + "entity": "order", + "amount": 1000000, + "amount_paid": 0, + "amount_due": 1000000, + "currency": "INR", + "receipt": null, + "offer_id": "offer_ANZoaxsOww2X53", + "offers": [ + "offer_ANZoaxsOww2X53" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1561018912 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Enter the amount for which the order is to be created in currency subunits. For example, for an amount of ₹10000, enter `1000000`. + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the order amount. Here, it is `INR`. + +`offers` _mandatory_ +: `array` Unique identifier of the offer. Pass the `offer_id` obtained from the response of the previous step. + +### Step 3: Pass Order_id and Trigger the Checkout + +The `order_id` obtained in the previous step can be passed to the Checkout form as follows: + +```js: Checkout +Pay + +var options = { + "key": "[YOUR_KEY_ID]", + "amount": "1000000", + "currency": "INR", + "order_id":"order_FIL1vBOsWFllnO", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://cdn.razorpay.com/logos/F9Yhfb7ZXjXmIQ_medium.jpg", + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9999988999" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +``` + +Know more about [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + +## Next Steps + +After the customer has availed the offers and made the payment at the Checkout, you can track the status of the payments: + +- From the Dashboard. +- By [configuring webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). +- By polling our [payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md). + +### Related Information +- [About No Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi.md) +- [Create No Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/create.md) +- [Tutorial - How to Create No Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/tutorial.md) +- [No Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/faqs.md) +- [Disable Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/create.md#disabling-no-cost-emi-offers) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/tutorial.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/tutorial.md new file mode 100644 index 00000000..88227444 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi/tutorial.md @@ -0,0 +1,35 @@ +--- +title: Tutorial - How to Create No Cost EMI Offers +description: Create No Cost EMI Offers from the Razorpay Dashboard using an example. +--- + +# Tutorial - How to Create No Cost EMI Offers + +Let us create an offer from the Dashboard using an example. + +Assume you are the manager of Acme Mobiles and Accessories, an online smartphone store. You want to provide discounts on online purchases to attract customers and increase sales. + +You want to create a Diwali Offer with the following settings: + +Offer Criteria | Offer Information +--- +Offer Name | Diwali Dhamaka - No Cost EMI +--- +Display Text | No Cost EMI Offers +--- +Offer Type | Instant +--- +Minimum Order Amount | ₹3,000 +--- +Maximum Order Amount | ₹4,00,000 +--- +Issuing Bank | HDFC Bank +--- +EMI Tenures | 3, 6 and 9 months + +Let us create this offer. + +### Related Information + +- [About No Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/no-cost-emi.md) +- [No Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/low-cost-emi/faqs.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/s2s-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/s2s-integration.md new file mode 100644 index 00000000..d8450f58 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/s2s-integration.md @@ -0,0 +1,347 @@ +--- +title: Integrating Offers in Server-to-Server (S2S) +description: Integrate Offers in your payment flow while making direct API calls to Razorpay server. +--- + +# Integrating Offers in Server-to-Server (S2S) + +You can integrate offers with your payment flows while integrating directly with our APIs. This is particularly useful, if you are a business that is **not PCI-compliant** and would like to avail the offers that the issuer of network might provide. In such cases, validations must be done once the payment creation request is sent. Razorpay gives you the flexibility to design offers such that you can decide whether to pass the payments or not based on the set validations while creating the offers. + +## Prerequisites + +Generate the API keys to start your integration. The keys are required for authenticating API requests with our servers. + +Log in to the Dashboard to generate the API keys, if you have not done earlier. For making the direct API calls, you need the `Key_Secret` as well. + +## Workflow + +1. [Create Offers from Dashboard](#step-1-create-offers). +2. [Create Orders to include the Offers in the payment request](#step-2-create-an-order). +3. [Create a payment to be sent to the customer](#step-3-create-a-payment). +4. [Verify the payment made by the customer](#step-4-verify-the-payment). + +### Step 1: Create Offers + +[Create an offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md) from the Dashboard. + +![](/docs/assets/images/offers-offers-description.jpg) + +### Step 2: Create an Order + +After generating offers from the Dashboard, pass the `offer_id` in the order request attributes to the following endpoint: + +/orders + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "offer_id": "offer_DtEhEm3XslgfXE" +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("offers", "offer_DtEhEm3XslgfXE"); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": "offer_ANZoaxsOww2X53" +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => 'INR', 'offer_id'=> 'offer_JTUADI4ZWBGWur')); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("offer_id", "offer_JTUADI4ZWBGWur"); +Order order = client.Order.Create(options); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', offer_id: 'offer_ANZoaxsOww2X53' +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 50000, + currency: "INR", + receipt: "receipt#1", + offer_id: "offer_ANZoaxsOww2X53" +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Success +{ + "id": "order_DtEkng132N71M8", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": null, + "order_id": "order_CjyltuCttYiMe8", + "offer_id": "offer_DtEhEm3XslgfXE", + "offers": [ + "offer_DtEhEm3XslgfXE" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1576577191 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + +### Step 3: Create a Payment + +Send the following attributes required to create a payment at the following endpoint: + +/payments/create/json + +#### Sample Code + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ +-d'{ + "amount": 1000, + "currency": "INR", + "contact": 9000090000, + "email": "gaurav.kumar@example.com", + "order_id": "order_CjyltuCttYiMe8", + "offer_id": "offer_DtEhEm3XslgfXE", + "method": "netbanking", + "bank": "UTIB" +}' + +```json: Success +{ + "razorpay_payment_id": "pay_OsfBn07R1sgSXQ", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/OsfBn07R1sgSXQ/authenticate" + } + ] +} +``` json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Offer Maximum Usage limit exceeded" + } +} +``` + +#### Request Parameters + +`key_id` _mandatory_ +: `string` The key id that you have generated from the **API Keys** tab in the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, `INR`. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order. + Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`offer_id` +: `string` Unique identifier of the offer. + +`ip` _mandatory_ +: `string` Customer's IP address. + +`email` _mandatory_ +: `string` Email address of the customer. Maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. Maximum length supported is 15 characters, inclusive of country code. + +`authentication` _optional_ +: `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + +`browser` _mandatory_ +: `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `language` + : `string` Obtained from the payer's browser using the `navigator.language` HTML DOM property. Maximum limit of 8 characters. + +`method` _mandatory_ +: `string` Name of the payment method. Possible values are: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + - `cardless_emi` + - `paylater` + +`card` +: Details associated with the card. Required if the payment method is `card`. + + `number` _mandatory_ + : `string` Unformatted card number. Required if the method is `card`. + + `name` _mandatory_ + : `string` Name of the cardholder. Required if the method is `card`. + + `expiry_month` _mandatory_ + : `integer` Expiry month for card in `MM` format. Required if the method is `card`. + + `expiry_year` _mandatory_ + : `string` Expiry year for card in `YY` format. Required if the method is `card`. + + `cvv` _mandatory_ + : `string` CVV printed on the back of card. Required if the method is `card`. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for Visa and Amex tokenised cards. +> - To enable CVV-less flow for Rupay and Mastercard, contact our [support team](https://razorpay.com/support/#request). +> - CVV is mandatory for Diners tokenised cards. +> - CVV is an optional field. Skip passing the `cvv` parameter to Razorpay to implement this change. +> + +`bank` +: `string` Bank code of the bank used for the payment. Required if the method is `netbanking`. + +`bank_account` +: The details of the bank account that should be passed in the request. Required if the method is `emandate`. + + `account_number` _mandatory_ + : `string` Bank account number used to initiate the payment. + + `ifsc` _mandatory_ + : `string` IFSC of the bank used to initiate the payment. + + `name` _mandatory_ + : `string` Name associated with the bank account used to initiate the payment. + +`emi_duration` +: `string` The EMI duration in months. Required if the method is `emi`. + +`vpa` +: `string` Virtual payment address of the customer. Required if the method is `upi`. + +`wallet` +: `string` Wallet code for the wallet used for the payment. Required if the method is `wallet`. + +`notes` _optional_ +: `object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`referrer` _optional_ +: `string` Referrer header passed by the client's browser. + +`user_agent` _optional_ +: `string` Customer user-agent. + +#### Response Types + +`2OO OK` +: In this case, the response contains `200 OK` code and the HTML content that needs to be opened in the customer's browser. This HTML content contains form-fields, which will be automatically posted to the redirect URL for the customer to complete the payment. + +`400 Bad Request` +: This can happen when erroneous parameters are passed in the request. For example, when the limit set in Offers is exceeded: + +Know more about the [error codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#error-codes). + +The HTML form returned in the response should be opened in the customer's browser. The customer completes the payment on the displayed page. + +### Step 4: Verify the Payment + +Once the customer completes the payment, a `POST` request is sent to the `callback_url` provided in the [payment create request](#step-3-create-a-payment). The data contained in the `POST` request depends on the **success** or **failure** of the payment made by the customer. + +## Next Steps + +After the customer has availed the offers and made the payment on the Checkout, you can track the status of the payments: + +- From the Dashboard. +- By [configuring webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). +- By polling our [payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#fetch-payments-based-on-orders). + +### Related Information + +- [About Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers.md) +- [Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md) +- [Tutorial - How to Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/tutorial.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/standard-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/standard-integration.md new file mode 100644 index 00000000..a8444b97 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/standard-integration.md @@ -0,0 +1,270 @@ +--- +title: Integrate Offers with Standard Checkout +description: Display general or order-specific Offers on Standard Checkout. +--- + +# Integrate Offers with Standard Checkout + +After creating [offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md) from the Dashboard, you have to integrate them on Razorpay Standard Checkout so that your customers can avail them while making payments. + +> **WARN** +> +> +> **Integrate Offers with Orders API** +> +> If you use our JS, SDK files or other Ecommerce plugins, you **should** integrate offers with the Orders API. +> + +## Exception + +You need **not** integrate offers with Orders API if you use any of the following Razorpay products or plugins to accept payments: + + - Plugins: Razorpay Magento, Shopify, or WooCommerce. + - Products: Payment Links, Payment Buttons, Payment Pages and Invoices. + +This is because Razorpay automatically creates orders for these products or plugins when customers initiate payment at the Checkout. + +> **INFO** +> +> +> **Handy Tips** +> +> As per the RBI guidelines, the original card number is replaced with a surrogate value called a token. However, we will continue to support BIN-based offers post tokenisation. Note that BIN-based offers will not work on saved American Express (AMEX) cards. +> + +## Validation Criteria + +Only those offers that pass the following validations are be displayed at the Checkout: + +Criteria | Description +--- +**Amount Match** | Order amount should be more than or equal to the [Minimum Order Amount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md#instant) set in an offer. +--- +**Validity** | Offer should be in the active or enabled state. +--- +**Date Validation** | The current date lies within the range of the offer's `start` and `end` dates. +--- +**Usage** | You can define the maximum number of times an offer can be availed. The offer will not be displayed at the Checkout if this limit is met. +--- +**Show Offer on Checkout** | This option must be enabled while creating the offer. This determines whether the offer will be displayed at the Checkout. + +## Display Offers at Checkout + +There are two ways in which you can display offers at Razorpay Checkout: + +- [Display Offers by Default](#method-1-display-offers-by-default) +- [Display Limited Offers](#method-2-display-limited-offers) + +### Method 1: Display Offers by Default + +This is the easiest way to display offers at the Checkout. While creating the offer from the Dashboard, enable the **Show Offer on Checkout** option. The offer automatically appears at the Checkout. + +![Enable the Show Offer on Checkout option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-no-cost-emi-offer-validity.jpg.md) + +### Method 2: Display Limited Offers + +To display a specific offer at the Checkout, you should associate the offer with an order. You can pass the `offers` array as a request attribute in the Create Orders API. + +Some use cases: +- If you have multiple product lines running on the same account and certain business logic on your side for displaying offers. +- The discount has already been applied, and you would like to restrict the payment method to avail the offer. + +> **WARN** +> +> +> **Watch Out!** +> +> To display an Offer for a particular customer: + +> - **Do not** select the Show Offer on the Checkout check box while creating an Offer. + +> - Specify the offer_id; for example, `offer_ANZoaxsOww2X53` in the `offers` array while creating an order. +> + +To display offers: +1. [Create an Offer](#step-1-create-an-offer-from-the-dashboard). +2. [Pass the Offer in Orders API](#step-2-pass-the-offer-in-orders-api). +3. [Pass order_id and Trigger Checkout](#step-3-pass-order-id-and-trigger-the). + +### Step 1: Create an Offer from the Dashboard + +You can [create offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md#create-offers) from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md). + +![Create offers from the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offer-dashboard.jpg.md) + +Let us say you have created an offer `offer_ANZoaxsOww2X53`, such that a discount of ₹200 is applicable on all transactions done through AXIS netbanking only. + +### Step 2: Pass the Offer in Orders API + +Create an order and pass the offer in the `offers` array as a request parameter in the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +> **INFO** +> +> +> **Handy Tips** +> +> To display specific offers at checkout, pass them in the `offers` array (see the sample code below). If you don't include anything in the `offers` array, the default offers will automatically appear at checkout. +> + +#### Sample Code + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000000, + "currency": "INR", + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("offers", Offer); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000000, + "currency": "INR", + "receipt": "receipt#1", + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 1000000, 'currency' => 'INR', 'offers'=> array('offer_JTUADI4ZWBGWur'))); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', offers: [ + 'offer_ANZoaxsOww2X53"' +] +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000000, + currency: "INR", + receipt: "receipt#1", + offers: [ + "offer_ANZoaxsOww2X53" + ] +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_CjyoZFRpB8r0AH", + "entity": "order", + "amount": 1000000, + "amount_paid": 0, + "amount_due": 1000000, + "currency": "INR", + "receipt": null, + "offer_id": "offer_ANZoaxsOww2X53", + "offers": [ + "offer_ANZoaxsOww2X53" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1561018912 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Enter the amount for which the order is to be created in currency subunits. For example, for an amount of ₹10000, enter `1000000`. + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the order amount. Here, it is `INR`. + +`offers` _mandatory_ +: `array` Unique identifier of the offer. Pass the offer_id obtained from the response of the previous step. + +### Step 3: Pass Order_id and Trigger the Checkout + +The `order_id` obtained in the previous step can be passed to the Checkout form as follows: + +```js: Checkout +Pay + +var options = { + "key": "[YOUR_KEY_ID]", + "amount": "1000000", + "currency": "INR", + "order_id":"order_FIL1vBOsWFllnO", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://cdn.razorpay.com/logos/F9Yhfb7ZXjXmIQ_medium.jpg", + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9999988999" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +``` + +Know more about [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + +## Next Steps + +After the customer has availed the offers and made the payment at the Checkout, you can track the status of the payments: + +- From the Dashboard. +- By [configuring webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md). +- By polling our [payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md). + +### Related Information + +- [About Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers.md) +- [Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md) +- [Tutorial - How to Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/tutorial.md) +- [Disable Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/create.md#disabling-offers) +- [Offers FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/faqs.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/tutorial.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/tutorial.md new file mode 100644 index 00000000..a4500a43 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/tutorial.md @@ -0,0 +1,66 @@ +--- +title: Tutorial - How to Create Offers +description: Create Offers from the Razorpay Dashboard using an example. +--- + +# Tutorial - How to Create Offers + +Let us create an offer from the Dashboard using an example. + +Assume that you are the manager of Tea Factory, a beverage company that sells packaged teabags using your website. You want to provide discounts on online purchases to attract customers and increase sales. + +You want to create a Diwali Offer with the following settings: + +Offer Criteria | Offer Information +--- +Offer Name | Diwali Dhamaka +--- +Display Text | 10% discount on netbanking payments +--- +Offer Type | Discount - Percentage +--- +Payment Method | Netbanking +--- +Discount % | 10 +-- +Minimum Order Amount | ₹400 +--- +Maximum Discount Allowed | ₹500 + +Let us create this offer. + +> **INFO** +> +> +> **Handy Tips** +> +> - You can toggle between Live and Test Modes on your **Dashboard**. Navigate to the top menu ribbon and click the drop-down icon against **Live Mode**. Toggle to **Test Mode** and test the offers enabled. +> +> - You can make test payments using one of the payment methods at the Checkout. No money is deducted from your account as this is a simulated transaction. +> + +For this example, we will test the offer on a valid Payment Link. Follow the steps given below: + +1. Select the **Payment Link Id** you wish to test the created offer from the Dashboard. +2. Copy the **Payment Link** URL and open it in your browser. + ![Payment Link Test Offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offer-dashboard-test.jpg.md) +3. Enter your contact details and click **Proceed**. The relevant offers appear upfront on checkout. +4. Select the offer you created from the Dashboard and click **Apply Offer**. +5. Select the payment option you created the offer on from the Dashboard. Enter the required [test details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md) and click **PAY**. +6. Select Success or Failure, depending on which flow you wish to test. +7. You should see a confirmation message depending on the flow you have selected. + +On successful payment, you should have received a discount on your payment. You can verify this by navigating to the Transactions → Payments tab and viewing the payment details. + +![Verifying transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offer-details.jpg.md) + +## Integrate Offer with Standard Checkout + +Now that an Offer is created, you should integrate Offers in Checkout for customers to avail the discounts and make payments. + +Know how to integrate Offers in [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/standard-integration.md). + +### Related Information + +- [About Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers.md) +- [Offers FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/offers/faqs.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments.md new file mode 100644 index 00000000..ff53cc3b --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments.md @@ -0,0 +1,46 @@ +--- +title: Import Flow Recurring Payments API +description: Integrate Import Flow Recurring Payments using Razorpay APIs. +--- + +# Import Flow Recurring Payments API + +Import Flow is a payment solution designed for International (non-Indian) businesses to accept payments from Indian customers without any additional paperwork or registration. + +Your Indian customers can make recurring payments via local payment methods such as cards and UPI. The funds are settled in your overseas bank account. Know more about [Import Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers.md). + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Integration Steps + +Follow these integration steps: + +### Cards + +1. [Create the Authorisation Transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/cards/authorization-transaction.md) +2. [Fetch and Manage Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/cards/tokens.md) +3. [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/cards/subsequent-payments.md) + +### UPI + +1. [Create the Authorisation Transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi/authorization-transaction.md) +2. [Fetch and Manage Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi/tokens.md) +3. [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi/subsequent-payments.md) + +### UPI with TPV + +1. [Create the Authorisation Transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi-tpv/authorization-transaction.md) +2. [Fetch and Manage Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi-tpv/tokens.md) +3. [Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi-tpv/subsequent-payments.md) diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/cards/authorization-transaction.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/cards/authorization-transaction.md new file mode 100644 index 00000000..527df1fa --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/cards/authorization-transaction.md @@ -0,0 +1,567 @@ +--- +title: 1. Create the Authorisation Transaction +description: Create an authorisation transaction for cards using Razorpay APIs. +--- + +# 1. Create the Authorisation Transaction + +Given below are the steps to create an authorisation transaction using the Razorpay APIs. + +> **INFO** +> +> +> **Handy Tips** +> +> Bank downtime can affect success rates when processing recurring payments via debit cards. +> + +## 1.1 Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + +### Request Parameters + + `name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + + +## 1.2 Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +```cURL: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id": "cust_N8fv8Nftx5hato", + "method": "card", + "token": { + "max_amount": 100000000, + "expire_at": 1709971120, + "frequency": "monthly" + }, + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + } +}' +```json: Response +{ + "amount": 1000, + "amount_due": 1000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1707389202, + "currency": "INR", + "entity": "order", + "id": "order_NYMDbygGb1DuDd", + "method": "card", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + }, + "offer_id": null, + "receipt": "Receipt No. 1", + "status": "created", + "token": { + "expire_at": 1709971120, + "max_amount": 100000000 + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _optional_ +: `string` Payment method used to make the authorisation transaction. Here, it is `card`. + +`token` +: `object` Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be auto-debited in a single charge. The minimum value is `100` (₹1), and the maximum value is `100000000` (₹10,00,000). For an amount higher than this or the RBI limit of ₹15,000 (`1500000`), the cardholder should provide an Additional Factor of Authentication (AFA) as per RBI guidelines. + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The card's expiry year is considered a default value. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `weekly` + - `monthly` + - `yearly` + - `as_presented` + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + -` 1`: If the user is logged into the account. + - `0`: If the user is on guest + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`method` +: `string` Payment method used to make the authorisation transaction. Here, it is `card`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + +`token` +: `object` Details related to the authorisation such as max amount and bank account information. + + `expire_at` + : `integer` The Unix timestamp to indicate till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. The default value is 10 years for `emandate`. This value can range from the current date to 31-12-2099 (`4102444799`). + + `max_amount` + : `integer` The maximum amount in paise a customer can be charged in a transaction. The value can range from `500` to `100000000`. The default value is `9999900` (₹99,999). + + +You can create a payment against the `order_id` after you create an order. + +## 1.3 Create an Authorisation Payment + +Create a payment checkout form for customers to make Authorisation Transaction and register their mandate. You can use the Handler Function or Callback URL. + + +### Handler Function or Callback URL + +**Handler Function** | **Callback URL** +--- +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. | When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. + +> **WARN** +> +> +> +> **Watch Out!** +> +> The Callback URL is not supported for Recurring Payments created using the registration link. +> + + + + +### Sample Code + +```html: Checkout with handler functions + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": "1", + "handler": function (response) { + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature); + }, + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +```html: Manual checkout with Callback URL + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": "1", + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +``` + + + Additional Checkout Fields + +You should send the following additional parameters along with the existing checkout options as a part of the authorisation transaction. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +`recurring` _mandatory_ +: `string` Indicates whether the recurring should be enabled or not. Possible values: + - `1`: Recurring is enabled. + - `0`: Recurring is not enabled. + - `preferred`: Use this when you want to support **recurring payments** and **one-time payment** in the same flow. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. + + + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> For the Authorisation Payment to be successful in a day (for example, 5th June), you should create an Order and the Authorisation Transaction on the same day (5th June) before 11:59 pm. +> diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/cards/subsequent-payments.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/cards/subsequent-payments.md new file mode 100644 index 00000000..3e89dae4 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/cards/subsequent-payments.md @@ -0,0 +1,352 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. +--- + +# 3. Create Subsequent Payments + +Given below are the steps to create and charge your customer subsequent payments: + +## 3.1 Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id": "cust_N8fv8Nftx5hato", + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + } +}' +``` +```json: Success +{ + "amount": 100, + "amount_due": 100, + "amount_paid": 0, + "attempts": 0, + "created_at": 1707812194, + "currency": "INR", + "entity": "order", + "id": "order_NZvymM9zR5RErQ", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + }, + "offer_id": null, + "receipt": null, + "status": "created" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + -` 1`: If the user is logged into the account. + - `0`: If the user is on guest + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`method` +: `string` Payment method used to make the authorisation transaction. Here, it is `card`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + + +You can create a payment against the `order_id` after you create an order. + +## 3.2 Create a Recurring Payment + +Once you have generated an `order_id`, use it to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "amount": 100, + "currency": "INR", + "order_id": "order_NZvymM9zR5RErQ", + "customer_id": "cust_N8fv8Nftx5hato", + "token": "token_NZveVUfP5fn0fq", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "invoice_number": "IRS91246", + "goods_description": "Digital Lamp" + } +}' +``` +```json: Success +{ + "razorpay_payment_id": "pay_NaIzQ7tWUbI2J2", + "razorpay_order_id": "order_NZvymM9zR5RErQ", + "razorpay_signature": "0f74fc1b988d522e7b1f18d6e59300349166644bf527a9fff10d9428fc6fdcd0" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +- You will get a `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` as a response after the payment request is successfully processed. +- In the case of some banks, such as HDFC Bank and Axis Bank, the payment entity is in the `created` state since the charging system of these banks is file-based and can take some time. + + +### Request Parameters + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `9000090000`. + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is `100` (₹1). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in [Create an order to charge the customer](#21-create-an-order-to-charge-the-customer). + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Possible values: + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + + + +> **INFO** +> +> +> **Handy Tips** +> +> You can also pass the value as 'preferred' when you want to support recurring payments and one-time payment in the same flow. +> + + + +`description` _optional_ +: `string` A user-entered description for the payment. For example, `Creating recurring payment for Gaurav Kumar`. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. + + + +### Response Parameters + +`razorpay_payment_id` +: `string` The unique identifier of the payment that is created. For example, `pay_1Aa00000000001`. + +`razorpay_order_id` +: `string` The unique identifier of the order that is created. For example, `order_1Aa00000000001`. + +`razorpay_signature` +: `string` The signature generated by the Razorpay. For example, `9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d`. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/cards/tokens.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/cards/tokens.md new file mode 100644 index 00000000..e670d917 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/cards/tokens.md @@ -0,0 +1,822 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +Know more about [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/integrate.md#fetch-card-mandate-registration-details). + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches a token id using the Payment id. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000001"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_1Aa00000000001" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.Fetch(paymentId); +``` + +```json: Response +{ + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "", + "status": "captured", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "bank": null, + "wallet": null, + "vpa": null, + "email": "", + "contact": "", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "541898" + }, + "created_at": 1595449871 +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` from the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. Here, it is `payment`. + +`amount` +: `integer` The payment amount represented in smallest unit of the currency passed. For example, `amount = 100` translates to `100` subunits, that is . + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`order_id` +: `string` The unique identifier of the order. + +`invoice_id` +: `string` The unique identifier of the invoice. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`amount_refunded` +: `integer` The amount refunded in smallest unit of the currency passed. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string` Description of the payment, if any. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `integer` Customer contact number used for the payment. + +`customer_id` +: `string` The unique identifier of the customer. + +`token_id` +: `string` The unique identifier of the token. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + + +## 2.2. Fetch All Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint fetches tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> This endpoint will not fetch the details of expired, rejected and unused tokens. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +List customer = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customer.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000002" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity":"collection", + "count":1, + "items":[ + { + "id":"token_HouA2OQR5Z2jTL", + "entity":"token", + "token":"2JPRk664pZHUWG", + "bank":null, + "wallet":null, + "method":"card", + "card":{ + "entity":"card", + "name":"", + "last4":"8950", + "network":"Visa", + "type":"credit", + "issuer":"STCB", + "international":false, + "emi":false, + "sub_type":"consumer", + "expiry_month":12, + "expiry_year":2030, + "flows":{ + "otp":true, + "recurring":true + } + }, + "recurring":true, + "recurring_details":{ + "status":"confirmed", + "failure_reason":null + }, + "auth_type":null, + "mrn":null, + "used_at":1629779657, + "created_at":1629779657, + "expired_at":1640975399, + "dcc_enabled":false, + "billing_address":null + } + ] +} +``` + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + + + +### Response Parameters + +`entity` +: `string` The entity being created. Here, it is a `collection`. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: `object` Details related to token such as `token id` and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is `token_id`. + + `entity` + : `string` The entity being created. Here, it is a `token`. + + `token` + : `string` The token is being fetched. + + `bank` + : `string` Card issuing bank details. + + `wallet` + : `string` Provides wallet information. + + `method` + : `string` The payment method used to make the transaction. + + `card` + : `object` Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is `Visa`. + + `type` + : `string` Card type (debit or credit). In this example, it is `credit`. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `boolean` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : `object` The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + + `vpa` + : `object` The VPA details. + + `username` + : `string` The username of the VPA holder. For example, `gaurav.kumar`. + + `handle` + : `string` The VPA handle. Here it is `upi`. + + `name` + : `string` The name of the VPA holder. + + + `recurring` + : `string` This represents whether recurring is enabled for this token. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + `recurring_details` + : `object` Details of the recurring transaction. + + `status` + : `string` This represents the status of the recurring transaction. Possible values: + - `initiated` + - `confirmed` + - `rejected` + - `cancelled` + - `paused` + + `failure_reason` + : `string` This provides the reason why the recurring transaction failed. + + `auth_type` + : `string` The authorisation type details. + + `mrn` + : `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + + `used_at` + : `integer` The VPA usage timestamp. + + `created_at` + : `integer` The token creation timestamp. + + `expired_at` + : `integer` The token expiry date timestamp. + + `dcc_enabled` + : `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + + +## 2.3 Fetch a Token by Customer ID + +The following endpoint fetches a particular token linked to a customer. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_IjsVsJ7d27hxOs/tokens/token_J0BgMu8YDVusZa + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_IjsVsJ7d27hxOs"; + +String tokenId = "token_J0BgMu8YDVusZa"; + +List customer = razorpay.customers.fetchTokens(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->fetch($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customer.fetchTokens(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.fetch(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_IjsVsJ7d27hxOs" + +tokenId = "token_J0BgMu8YDVusZa" + +Razorpay::Customer.fetch(customerId).fetchToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token("", "", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_J0BgMu8YDVusZa" + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "id":"token_J0BgMu8YDVusZa", + "entity":"token", + "token":"ya5olMAYU0ap4F", + "bank":null, + "wallet":null, + "method":"card", + "card":{ + "entity":"card", + "name":"", + "last4":"7558", + "network":"Visa", + "type":"credit", + "issuer":"FDRL", + "international":false, + "emi":true, + "sub_type":"consumer", + "token_iin":null, + "expiry_month":1, + "expiry_year":2027, + "flows":{ + "recurring":true + } + }, + "recurring":true, + "recurring_details":{ + "status":"confirmed", + "failure_reason":null + }, + "auth_type":null, + "mrn":null, + "used_at":1645780406, + "created_at":1645780188, + "expired_at":2709971120, + "status":null, + "notes":[ + + ], + "dcc_enabled":false, + "compliant_with_tokenisation_guidelines":false +} +``` + + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_IjsVsJ7d27hxOs`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that should be retrieved. For example, `token_J0BgMu8YDVusZa`. + + + +### Response Parameters + +`entity` +: `string` The entity being created. Here, it is a `collection`. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: `object` Details related to token such as `token id` and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is `token_id`. + + `entity` + : `string` The entity being created. Here, it is a `token`. + + `token` + : `string` The token is being fetched. + + `bank` + : `string` Card issuing bank details. + + `wallet` + : `string` Provides wallet information. + + `method` + : `string` The payment method used to make the transaction. + + `card` + : `object` Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is `Visa`. + + `type` + : `string` Card type (debit or credit). In this example, it is `credit`. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `boolean` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : `object` The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + + `vpa` + : `object` The VPA details. + + `username` + : `string` The username of the VPA holder. For example, `gaurav.kumar`. + + `handle` + : `string` The VPA handle. Here it is `upi`. + + `name` + : `string` The name of the VPA holder. + + + `recurring` + : `string` This represents whether recurring is enabled for this token. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + `recurring_details` + : `object` Details of the recurring transaction. + + `status` + : `string` This represents the status of the recurring transaction. Possible values: + - `initiated` + - `confirmed` + - `rejected` + - `cancelled` + - `paused` + + `failure_reason` + : `string` This provides the reason why the recurring transaction failed. + + `auth_type` + : `string` The authorisation type details. + + `mrn` + : `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + + `used_at` + : `integer` The VPA usage timestamp. + + `created_at` + : `integer` The token creation timestamp. + + `expired_at` + : `integer` The token expiry date timestamp. + + `dcc_enabled` + : `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + + +## 2.4. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + + + +### Response Parameters + +`deleted` +: `boolean` Indicates whether the token is deleted. Possible values: + - `true`: The token is deleted successfully. + - `false`: The token was not deleted. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi-tpv/authorization-transaction.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi-tpv/authorization-transaction.md new file mode 100644 index 00000000..a50b90b2 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi-tpv/authorization-transaction.md @@ -0,0 +1,678 @@ +--- +title: 1. Create the Authorisation Transaction +description: Steps to create an authorisation transaction for UPI. +--- + +# 1. Create the Authorisation Transaction + +Given below are the steps to create an authorisation transaction using the Razorpay APIs. + +## 1.1 Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + +### Request Parameters + + `name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + + +## 1.2 Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +> **INFO** +> +> +> **Handy Tips** +> +> The subsequent payment frequency is displayed on your customer's PSP. They can select the required frequency while registering for the mandate. +> + +```cURL: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id": "cust_N8fv8Nftx5hato", + "method": "upi", + "token": { + "max_amount": 200000, + "expire_at": 1709971120, + "frequency": "monthly", + "recurring_value": 9, + "recurring_type": "on" + }, + "bank_account": { + "account_number": "123456789012345", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' +``` +```json: Success +{ + "amount": 1000, + "amount_due": 1000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1707468938, + "currency": "INR", + "entity": "order", + "id": "order_NYirPLFPraZLtB", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "offer_id": null, + "receipt": "Receipt No. 1", + "status": "created" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `upi`. + +`token` +: `object` Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be debited in a single charge. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The default value is 10 years, and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + + `recurring_value` _optional_ + : `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + + `recurring_type` _optional_ + : `string` Determines when the recurring debit can be done. Possible values are: + - `on`: Recurring debit happens on the exact day of every month. + +> **INFO** +> +> +> **Handy Tips** +> +> For creating an order with `recurring_type`=`on`, set the `recurring_value` parameter to the current date. +> + + - `before`: Recurring debit can happen any time before the specified date. + - `after`: Recurring debit can happen any time after the specified date. + + For example, if the `frequency` is `monthly`, `recurring_value` is `17`, and `recurring_type` is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if `recurring_type` is `after`, recurring debit can only happen on or after the 17th of the month. + +`bank_account` _mandatory_ +: `object` Details of the bank account of the customer. + + `account_number` _mandatory_ + : `string` The bank account number of the customer. For example, `123456789012345`. + + `ifsc` _mandatory_ + : `string` The IFSC of the bank. For example, `HDFC0000053`. + + `name` _mandatory_ + : `string` The name of the bank account holder. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + `- 1`: If the user is logged into the account. + `- 0`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + + + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating an Order. + +Error | Cause | Solution +--- +The id provided does not exist | This error occurs when you enter an incorrect `customer_id.` | Make sure to enter a valid `customer_id`. +--- +The api key provided is invalid | This error occurs when you enter the wrong API key or secret. | Make sure to enter a valid API key and secret. +--- +The amount must be at least INR 1.00. | This error occurs when you enter an amount less than INR 1. | Make sure the entered amount is atleast INR 1.00. +--- +The currency should be INR when method is upi | This error occurs when you enter a currency other than INR | Make sure the currency is INR. +--- +The amount field is required. | This error occurs when you have not entered the amount or the `max_amount` value. | Make sure to enter the `max_amount` value. +--- +The minimum transaction amount allowed is Re. 5. | This error occurs when you enter the maximum amount less than the minimum amount. | Make sure the `max_amount` value is more than the `min_amount` value. +--- +The order amount cannot be greater than the token max amount for upi recurring. | This error occurs when the order amount exceeds the `token_max` amount passed in the API request payload. | Ensure the order amount is lesser than the `token_max` account. + + + +## 1.3 Create an Authorisation Payment + +Create a payment checkout form for customers to make Authorisation Transaction and register their mandate. You can use the Handler Function or Callback URL. + +**Handler Function** | **Callback URL** +--- +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. | When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. + +> **WARN** +> +> +> +> **Watch Out!** +> +> The Callback URL is not supported for Recurring Payments created using the registration link. +> + +```html: Checkout with handler functions + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": "1", + "handler": function (response) { + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature); + }, + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +```html: Manual checkout with Callback URL + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": "1", + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +``` + + +### Additional Checkout Fields + +You should send the following additional parameters along with the existing checkout options as a part of the authorisation transaction. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#11-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#12-create-an-order). + +`recurring` _mandatory_ +: `string` Determines if the recurring payment is enabled or not. Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this if you want to allow **recurring payments** and **one-time payment** in the same flow. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. + + + +### Error Response Parameters + +Given below is a list of possible errors you may face while making the authorisation payment. + +Error | Cause | Solution +--- +transaction_limit_exceeded | The customers have exceeded their account's credit or debit limit. This error usually occurs during high-value transactions. | You have reached the maximum transaction limit for this account. You can try again with a lower amount or use a different bank account. +--- +payment_invalid_account | This error occurs when the customer's bank account is either closed or no longer valid. The customer or bank may have closed the account. | The payment could not be completed as the entered bank account details are incorrect. Try again with another account. +--- +account_closed | This error occurs when the customer's bank account is either closed or no longer valid. The customer or bank may have closed the account. | The payment could not be completed as your bank account is closed. You can try again with another account or contact your bank for details. +--- +invalid_withdrawer_data | This error occurs when the customer's bank account is either closed or no longer valid. The customer or bank may have closed the account. | The payment could not be completed as the customer's bank account is closed or blocked. You can try again with another account. +--- +validation_failure | The bank could not validate the customer registration for debiting the customer. | The payment is declined due to a mismatch in account details. Try again with the account registered with the business only. +--- +payment_account_withdrawal_frozen | The bank has temporarily blocked withdrawals on the customer's account. | The payment could not be completed as withdrawal for your bank account is locked. You can try again with another account or contact your bank for details. +--- +No_DR_allowed | The bank has temporarily blocked withdrawals on the customer's account. | The payment could not be completed as withdrawal for your bank account is locked. You can try again with another account or contact your bank for details. +--- +Payment_duplicate _request | A payment initiation request with the same parameters was passed to the gateway. The gateway is blocking duplicate requests. | You should retry after 30 minutes. +--- +Registration already in progress | A payment initiation request with the same parameters was passed to the gateway. The gateway is blocking duplicate requests. | Your mandate registration is already in progress. Check the status in some time. +--- +payment_risk_check_failed | Payment declined due to risk checks. Razorpay, Gateway and issuer bank perform these risk checks. The source parameter would give additional clarity on where the risk check failed. | The payment could not be completed due to a temporary technical issue. You can try again in sometime. +--- + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> For the Authorisation Payment to be successful in a day (for example, 5th June), you should create an Order and the Authorisation Transaction on the same day (5th June) before 11:59 pm. +> diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi-tpv/subsequent-payments.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi-tpv/subsequent-payments.md new file mode 100644 index 00000000..ab4e87a9 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi-tpv/subsequent-payments.md @@ -0,0 +1,418 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is authorised. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +## 3.1 Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id": "cust_N8fv8Nftx5hato", + "bank_account": { + "account_number": "123456789012345", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' +``` +```json: Success +{ + "amount": 1000, + "amount_due": 1000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1707468938, + "currency": "INR", + "entity": "order", + "id": "order_NYirPLFPraZLtB", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "offer_id": null, + "receipt": "Receipt No. 1", + "status": "created" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`bank_account` _mandatory_ +: `object` Details of the bank account of the customer. + + `account_number` _mandatory_ + : `string` The bank account number of the customer. For example, `123456789012345`. + + `ifsc` _mandatory_ + : `string` The IFSC of the bank. For example, `HDFC0000053`. + + `name` _mandatory_ + : `string` The name of the bank account holder. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + -` 1`: If the user is logged into the account. + - `0`: If the user is on guest + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`method` +: `string` Payment method used to make the authorisation transaction. Here, it is `card`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + +You can create a payment against the `order_id` after you create an order. + + + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating an Order. + +Error | Cause | Solution +--- +The api key provided is invalid | This error occurs when you enter the wrong API key or secret. | Make sure to enter the valid API key and secret. +--- +The amount must be at least INR 1.00. | This error occurs when you enter an amount less than INR 1. | Make sure the entered amount is atleast INR 1.00. +--- +The currency should be INR when method is upi | This error occurs when you enter a currency other than INR | Make sure the currency is INR. +--- + + + +## 3.2 Create a Recurring Payment + +Once you have generated an `order_id`, use it to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "order_id": "order_NYMptG6ChGaFgj", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "customer_id": "cust_N8fv8Nftx5hato", + "token": "token_NZveVUfP5fn0fq", + "recurring": "1", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + } +}' +``` +```json: Success +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +> **INFO** +> +> +> **UPI Payments** +> +> - We recommend sending a pre-debit notification to the customer 48 hours before the debit date. +> - For UPI, it may take between 24-36 hours for the subsequent payment to reflect on your Dashboard. +> - This is because of the failure of pre-debit notification and/or any retries that we attempt for the payment. +> - Do not create another subsequent payment until you get the status of the previous one. +> + +> **WARN** +> +> +> **UPI Payments** +> +> For UPI, **do not** create subsequent payments on the last day of the cycle. This will cause the payment to fail. +> + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount associated with the payment in smallest unit of the supported currency. For example, `2000` means ₹20. Must match the amount in [Create an order to charge the customer](#21-create-an-order-to-charge-the-customer). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in [Create an order to charge the customer](#21-create-an-order-to-charge-the-customer). + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `9000090000`. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer, obtained from the response of Customer API. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `string` Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this when you want to support recurring payments and one-time payment in the same flow. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. + + + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating a Recurring Payment. + +Error | Cause | Solution +--- +Amount exceeds maximum amount allowed | This error occurs when you enter an amount greater than the authorized maximum amount. | Make sure the amount is equal to or less than the maximum amount for the particular token. +--- +Your payment amount is different from your order amount. To pay successfully, please try using right amount. | This error occurs when you enter a different amount while creating a subsequent payment. | Make sure the order and the subsequent payment amounts are the same. +--- +bank_account_invalid | This error occurs when The customer's bank account is either closed or no longer valid. The customer or bank may have closed the account. | The customer should re-register the mandate. +--- +bank_account_validation_failed | This error occurs when the bank could not validate the customer registration for debiting the customer. | You can retry after some time or reach out to Razorpay. +--- +bank_technical_error | The destination bank was facing technical problems at the time the payment was attempted. This error usually occurs when the Core Banking System encounters a technical error while processing the payment. | You can retry after some time or reach out to Razorpay. +--- +debit_instrument_blocked | This error occurs when the bank temporarily blocks withdrawals on the customer's account. | The customer should reach out to their bank to get the account unblocked. +--- +debit_instrument_inactive | This error occurs when the bank temporarily blocks withdrawals on the customer's account. | The customer should reach out to their bank to get the account unblocked. +--- +gateway_technical_error | The payment failed due to a technical error at the gateway. This error usually occurs when the gateway server encounters a technical error while processing the payment. | You can retry after some time or reach out to Razorpay. +--- +input_validation_failed | The payment failed due to the wrong request or input sent in the payment request. You can also get this error while creating a payment with incorrect parameter values on the Dashboard. | Rectify the validation issues and try again. Check the error description and field parameters for more information about the error. +Check your integration/payment request or reach out to Razorpay. Refer to the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). +--- +insufficient_funds | This error occurs when the customer does not have sufficient funds in the account to complete the payment. | You can retry after asking the customer to add funds to their bank account. +--- +invalid_amount | This error occurs when the amount or currency passed in the payment request is not supported or invalid. This can arise when you pass a different variable type in the amount field or pass an unsupported amount value. | You can check your integration and payment request. +--- +mandate_not_active | This error occurs when the registered mandate is no longer active. The customer or bank could have cancelled the mandate. | The customer should re-register the mandate. +--- +payment_cancelled | This error occurs when the customer has explicitly cancelled the payment. The customer could have given a cancellation instruction to their banks. | You can retry after informing the customer to remove the cancellation request. +--- +payment_declined | Destination Bank or Gateway has declined the payment due to business or technical reasons such as terminal and pricing. | You can retry after some time or reach out to Razorpay. +--- +payment_failed | This error occurs when the destination Bank or Gateway has declined the payment due to business or technical reasons such as terminal and pricing. | You can retry after some time or reach out to Razorpay. +--- +payment_mandate_not_active | This error occurs when the is not yet activated the registered mandate. Banks sometimes take longer to activate the mandates at their end. | You can retry after some time or reach out to Razorpay. +--- +payment_timed_out | This error occurs when the bank with the registered mandate could not debit the customer's account in time. | You can retry after some time or reach out to Razorpay. +--- +server_error | This error occurs when there is a technical error at Razorpay's server. | You can retry after some time or reach out to Razorpay. +--- +transaction_limit_exceeded | This error occurs when customers exceed their account's credit or debit limit during high-value transactions. | You can retry after some time by informing the customer to update their transaction limits. +--- diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi-tpv/tokens.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi-tpv/tokens.md new file mode 100644 index 00000000..01bf4f95 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi-tpv/tokens.md @@ -0,0 +1,363 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +Know about about [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/integrate.md#fetch-emandate-registration-details). + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_FHfAzEJ51k8NLj" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentid = "pay_FHfqtkRzWvxky4"; + +Payment payment = client.Payment.Fetch(paymentid); +``` + +```json: Debit Payment +{ + "id": "pay_FHfAzEJ51k8NLj", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfANdTUYeP8lb", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfAzGzREc1ug6", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595447490 +} +```json: Authorisation Payment +{ + "id": "pay_QDhVJ5M23wt4rh", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "failed", + "order_id": "order_QDhT2PqFJvtg4y", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "success@razorpay", + "email": "gaurav.kumar@example.com", + "contact": "+919123456780", + "customer_id": "cust_Q0g6LTYw3obZEn", + "token_id": "token_QDhVJHYr5m87fF", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey\u2026 decaf.", + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + "optimizer_provider_name": "razorpay" + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment was a dummy payment for one time mandate registration.", + "error_source": "business", + "error_step": "payment_initiation", + "error_reason": "upi_dummy_payment", + "acquirer_data": { + "rrn": null + }, + "gateway_provider": "Razorpay", + "created_at": 1743490280, + "upi": { + "vpa": "success@razorpay" + } +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` via the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + + + +## 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> - This endpoint will not fetch the details of expired and unused tokens. +> - The UPI tokens are not populated in the API response if the `save_vpa` feature is not enabled in your account. Please raise a request with our Support team to get this activated. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +List tokens = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + + +## 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi/authorization-transaction.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi/authorization-transaction.md new file mode 100644 index 00000000..0c53e432 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi/authorization-transaction.md @@ -0,0 +1,672 @@ +--- +title: 1. Create the Authorisation Transaction +description: Steps to create an authorisation transaction for UPI. +--- + +# 1. Create the Authorisation Transaction + +Given below are the steps to create an authorisation transaction using the Razorpay APIs. + +## 1.1 Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + +### Request Parameters + + `name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + + +## 1.2 Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +```cURL: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id": "cust_N8fv8Nftx5hato", + "method": "upi", + "token": { + "max_amount": 200000, + "expire_at": 1709971120, + "frequency": "monthly", + "recurring_value": 8, + "recurring_type": "on" + }, + "customer_details": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": "123123", + "longitude": "1231231" + }, + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' +``` +```json: Success +{ + "amount": 1000, + "amount_due": 1000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1707391377, + "currency": "INR", + "entity": "order", + "id": "order_NYMptG6ChGaFgj", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "offer_id": null, + "receipt": "Receipt No. 1", + "status": "created" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> The subsequent payment frequency is displayed on your customer's PSP. They can select the required frequency while registering for the mandate. +> + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `upi`. + +`token` +: `object` Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be debited in a single charge. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The default value is 10 years, and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + + `recurring_value` _optional_ + : `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + + `recurring_type` _optional_ + : `string` Determines when the recurring debit can be done. Possible values are: + - `on`: Recurring debit happens on the exact day of every month. + +> **INFO** +> +> +> **Handy Tips** +> +> For creating an order with `recurring_type`=`on`, set the `recurring_value` parameter to the current date. +> + + - `before`: Recurring debit can happen any time before the specified date. + - `after`: Recurring debit can happen any time after the specified date. + + For example, if the `frequency` is `monthly`, `recurring_value` is `17`, and `recurring_type` is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if `recurring_type` is `after`, recurring debit can only happen on or after the 17th of the month. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + `- 1`: If the user is logged into the account. + `- 0`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + + + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating an Order. + +Error | Cause | Solution +--- +The id provided does not exist | This error occurs when you enter an incorrect `customer_id.` | Make sure to enter a valid `customer_id`. +--- +The api key provided is invalid | This error occurs when you enter the wrong API key or secret. | Make sure to enter a valid API key and secret. +--- +The amount must be at least INR 1.00. | This error occurs when you enter an amount less than INR 1. | Make sure the entered amount is atleast INR 1.00. +--- +The currency should be INR when method is upi | This error occurs when you enter a currency other than INR | Make sure the currency is INR. +--- +The amount field is required. | This error occurs when you have not entered the amount or the `max_amount` value. | Make sure to enter the `max_amount` value. +--- +The minimum transaction amount allowed is Re. 5. | This error occurs when you enter the maximum amount less than the minimum amount. | Make sure the `max_amount` value is more than the `min_amount` value. +--- +The order amount cannot be greater than the token max amount for upi recurring. | This error occurs when the order amount exceeds the `token_max` amount passed in the API request payload. | Ensure the order amount is lesser than the `token_max` account. + + + +## 1.3 Create an Authorisation Payment + +Create a payment checkout form for customers to make Authorisation Transaction and register their mandate. You can use the Handler Function or Callback URL. + + +### Handler Function or Callback URL + +**Handler Function** | **Callback URL** +--- +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. | When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. + +> **WARN** +> +> +> +> **Watch Out!** +> +> The Callback URL is not supported for Recurring Payments created using the registration link. +> + + + + +### Sample Code + +```html: Checkout with handler functions + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": "1", + "handler": function (response) { + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature); + }, + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +```html: Manual checkout with Callback URL + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": "1", + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +``` + + + Additional Checkout Fields + +You should send the following additional parameters along with the existing checkout options as a part of the authorisation transaction. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). + +`recurring` _mandatory_ +: `string` Determines if the recurring payment is enabled or not. Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this if you want to allow **recurring payments** and **one-time payment** in the same flow. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. + + + +### Error Response Parameters + +Given below is a list of possible errors you may face while making the authorisation payment. + +Error | Cause | Solution +--- +transaction_limit_exceeded | The customers have exceeded their account's credit or debit limit. This error usually occurs during high-value transactions. | You have reached the maximum transaction limit for this account. You can try again with a lower amount or use a different bank account. +--- +payment_invalid_account | This error occurs when the customer's bank account is either closed or no longer valid. The customer or bank may have closed the account. | The payment could not be completed as the entered bank account details are incorrect. Try again with another account. +--- +account_closed | This error occurs when the customer's bank account is either closed or no longer valid. The customer or bank may have closed the account. | The payment could not be completed as your bank account is closed. You can try again with another account or contact your bank for details. +--- +invalid_withdrawer_data | This error occurs when the customer's bank account is either closed or no longer valid. The customer or bank may have closed the account. | The payment could not be completed as the customer's bank account is closed or blocked. You can try again with another account. +--- +validation_failure | The bank could not validate the customer registration for debiting the customer. | The payment is declined due to a mismatch in account details. Try again with the account registered with the business only. +--- +payment_account_withdrawal_frozen | The bank has temporarily blocked withdrawals on the customer's account. | The payment could not be completed as withdrawal for your bank account is locked. You can try again with another account or contact your bank for details. +--- +No_DR_allowed | The bank has temporarily blocked withdrawals on the customer's account. | The payment could not be completed as withdrawal for your bank account is locked. You can try again with another account or contact your bank for details. +--- +Payment_duplicate _request | A payment initiation request with the same parameters was passed to the gateway. The gateway is blocking duplicate requests. | You should retry after 30 minutes. +--- +Registration already in progress | A payment initiation request with the same parameters was passed to the gateway. The gateway is blocking duplicate requests. | Your mandate registration is already in progress. Check the status in some time. +--- +payment_risk_check_failed | Payment declined due to risk checks. Razorpay, Gateway and issuer bank perform these risk checks. The source parameter would give additional clarity on where the risk check failed. | The payment could not be completed due to a temporary technical issue. You can try again in sometime. +--- + + + + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> For the Authorisation Payment to be successful in a day (for example, 5th June), you should create an Order and the Authorisation Transaction on the same day (5th June) before 11:59 pm. +> diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi/subsequent-payments.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi/subsequent-payments.md new file mode 100644 index 00000000..e29b9d93 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi/subsequent-payments.md @@ -0,0 +1,402 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is authorised. +--- + +# 3. Create Subsequent Payments + +Given below are the steps to create and charge your customer subsequent payments: + +## 3.1 Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"INR", + "merchant_id": "D2eavTHExqy97j", + "customer_id":"cust_N8fv8Nftx5hato", + "customer_details":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9000090000", + "shipping_address":{ + "line1":"Mantri apartment", + "line2":"Koramangala", + "city":"Bengaluru", + "country":"IND", + "state":"Karnataka", + "zipcode":"560032", + "latitude":"123123", + "longitude":"1231231" + }, + "insights":{ + "order_count":"22", + "chargeback_count":"4", + "tier":"gold", + "booking_channel":"agent", + "has_account":true, + "registered_at":1234567890 + } + }, + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } +}' +``` +```json: Success +{ + "amount":1000, + "amount_due":1000, + "amount_paid":0, + "attempts":0, + "created_at":1707389202, + "currency":"INR", + "entity":"order", + "id":"order_NYMDbygGb1DuDd", + "method":"card", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + }, + "offer_id":null, + "receipt":"Receipt No. 1", + "status":"created" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`merchant_id` _mandatory_ +: `string` This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon in the top right corner. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (e.g., @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (e.g., aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `email` _optional_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `shipping_address` _mandatory_ + : `object` This contains the shipping address of the order. + + `line1` _mandatory_ + : `string` Address Line 1 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `line2` _mandatory_ + : `string` Address Line 2 of the address. + - Character length: Must be between 3 and 100 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), spaces, and special characters (*&/-()#_+{}[]:'".,.). + - Not allowed characters: Regional languages. + + `city` _mandatory_ + : `string` Name of the city. Must be between 3 and 50 characters in length and can only include uppercase (A-Z) and lowercase (a-z) English letters, and spaces. + + `country` _mandatory_ + : `string` ISO3 country code of the billing address. Only `IND` is allowed. + + `state` _mandatory_ + : `string` Name of the state. It must be between 3 and 50 characters extended and can only include uppercase (A-Z) and lowercase (a-z) English letters and spaces. Please send the full name of the state, for example, Madhya Pradesh. + + `zipcode` _mandatory_ + : `string` The ZIP code must consist of 6-digit numeric characters. Only valid Indian ZIP codes will be accepted. Refer to the list of supported ZIP codes. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits to represent the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits to represent the precision of the coordinate. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `1`: If the user is logged into the account. + - `0`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created. For example, 1234567890. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100` (). + +`amount_due` +: `integer` The amount that the customer has yet to pay. + +`amount_paid` +: `integer` The amount that has been paid. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`method` +: `string` Payment method used to make the authorisation transaction. Here, it is `card`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`status` +: `string` The status of the order. + +You can create a payment against the `order_id` after you create an order. + + + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating an Order. + +Error | Cause | Solution +--- +The api key provided is invalid | This error occurs when you enter the wrong API key or secret. | Make sure to enter the valid API key and secret. +--- +The amount must be at least INR 1.00. | This error occurs when you enter an amount less than INR 1. | Make sure the entered amount is atleast INR 1.00. +--- +The currency should be INR when method is upi | This error occurs when you enter a currency other than INR | Make sure the currency is INR. +--- + + + +## 3.2 Create a Recurring Payment + +Once you have generated an `order_id`, use it to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "order_id": "order_NYMptG6ChGaFgj", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "customer_id": "cust_N8fv8Nftx5hato", + "token": "token_NZveVUfP5fn0fq", + "recurring": "1", + "notes": { + "invoice_number": "IRS1245", + "goods_description": "Digital Lamp" + } +}' +``` +```json: Success +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +> **INFO** +> +> +> **UPI Payments** +> +> - We recommend sending a pre-debit notification to the customer 48 hours before the debit date. +> - For UPI, it may take between 24-36 hours for the subsequent payment to reflect on your Dashboard. +> - This is because of the failure of pre-debit notification and/or any retries that we attempt for the payment. +> - Do not create another subsequent payment until you get the status of the previous one. +> + +> **WARN** +> +> +> **UPI Payments** +> +> For UPI, **do not** create subsequent payments on the last day of the cycle. This will cause the payment to fail. +> + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount associated with the payment in smallest unit of the supported currency. For example, `2000` means ₹20. Must match the amount in [Create an order to charge the customer](#21-create-an-order-to-charge-the-customer). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in [Create an order to charge the customer](#21-create-an-order-to-charge-the-customer). + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `9000090000`. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer, obtained from the response of Customer API. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `string` Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this when you want to support recurring payments and one-time payment in the same flow. + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the generated invoice. Ensure that each payment has a unique invoice number, with a length of fewer than 40 characters. + + `goods_description` _optional_ + : `string` Description of the goods. For example, `Digital Lamp`. + + + +### Error Response Parameters + +Given below is a list of possible errors you may face while creating a Recurring Payment. + +Error | Cause | Solution +--- +Amount exceeds maximum amount allowed | This error occurs when you enter an amount greater than the authorized maximum amount. | Make sure the amount is equal to or less than the maximum amount for the particular token. +--- +Your payment amount is different from your order amount. To pay successfully, please try using right amount. | This error occurs when you enter a different amount while creating a subsequent payment. | Make sure the order and the subsequent payment amounts are the same. +--- +bank_account_invalid | This error occurs when The customer's bank account is either closed or no longer valid. The customer or bank may have closed the account. | The customer should re-register the mandate. +--- +bank_account_validation_failed | This error occurs when the bank could not validate the customer registration for debiting the customer. | You can retry after some time or reach out to Razorpay. +--- +bank_technical_error | The destination bank was facing technical problems at the time the payment was attempted. This error usually occurs when the Core Banking System encounters a technical error while processing the payment. | You can retry after some time or reach out to Razorpay. +--- +debit_instrument_blocked | This error occurs when the bank temporarily blocks withdrawals on the customer's account. | The customer should reach out to their bank to get the account unblocked. +--- +debit_instrument_inactive | This error occurs when the bank temporarily blocks withdrawals on the customer's account. | The customer should reach out to their bank to get the account unblocked. +--- +gateway_technical_error | The payment failed due to a technical error at the gateway. This error usually occurs when the gateway server encounters a technical error while processing the payment. | You can retry after some time or reach out to Razorpay. +--- +input_validation_failed | The payment failed due to the wrong request or input sent in the payment request. You can also get this error while creating a payment with incorrect parameter values on the Dashboard. | Rectify the validation issues and try again. Check the error description and field parameters for more information about the error. +Check your integration/payment request or reach out to Razorpay. Refer to the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). +--- +insufficient_funds | This error occurs when the customer does not have sufficient funds in the account to complete the payment. | You can retry after asking the customer to add funds to their bank account. +--- +invalid_amount | This error occurs when the amount or currency passed in the payment request is not supported or invalid. This can arise when you pass a different variable type in the amount field or pass an unsupported amount value. | You can check your integration and payment request. +--- +mandate_not_active | This error occurs when the registered mandate is no longer active. The customer or bank could have cancelled the mandate. | The customer should re-register the mandate. +--- +payment_cancelled | This error occurs when the customer has explicitly cancelled the payment. The customer could have given a cancellation instruction to their banks. | You can retry after informing the customer to remove the cancellation request. +--- +payment_declined | Destination Bank or Gateway has declined the payment due to business or technical reasons such as terminal and pricing. | You can retry after some time or reach out to Razorpay. +--- +payment_failed | This error occurs when the destination Bank or Gateway has declined the payment due to business or technical reasons such as terminal and pricing. | You can retry after some time or reach out to Razorpay. +--- +payment_mandate_not_active | This error occurs when the is not yet activated the registered mandate. Banks sometimes take longer to activate the mandates at their end. | You can retry after some time or reach out to Razorpay. +--- +payment_timed_out | This error occurs when the bank with the registered mandate could not debit the customer's account in time. | You can retry after some time or reach out to Razorpay. +--- +server_error | This error occurs when there is a technical error at Razorpay's server. | You can retry after some time or reach out to Razorpay. +--- +transaction_limit_exceeded | This error occurs when customers exceed their account's credit or debit limit during high-value transactions. | You can retry after some time by informing the customer to update their transaction limits. +--- diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi/tokens.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi/tokens.md new file mode 100644 index 00000000..b26c2940 --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/recurring-payments/upi/tokens.md @@ -0,0 +1,608 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +Know more about [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/integrate.md#fetch-emandate-registration-details). + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_FHfAzEJ51k8NLj" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentid = "pay_FHfqtkRzWvxky4"; + +Payment payment = client.Payment.Fetch(paymentid); +``` + +```json: Debit Payment +{ + "id": "pay_FHfAzEJ51k8NLj", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfANdTUYeP8lb", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfAzGzREc1ug6", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595447490 +} +```json: Authorisation Payment +{ + "id": "pay_QDhVJ5M23wt4rh", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "failed", + "order_id": "order_QDhT2PqFJvtg4y", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "success@razorpay", + "email": "gaurav.kumar@example.com", + "contact": "+919123456780", + "customer_id": "cust_Q0g6LTYw3obZEn", + "token_id": "token_QDhVJHYr5m87fF", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey\u2026 decaf.", + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + "optimizer_provider_name": "razorpay" + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment was a dummy payment for one time mandate registration.", + "error_source": "business", + "error_step": "payment_initiation", + "error_reason": "upi_dummy_payment", + "acquirer_data": { + "rrn": null + }, + "gateway_provider": "Razorpay", + "created_at": 1743490280, + "upi": { + "vpa": "success@razorpay" + } +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` via the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. Here, it is `payment`. + +`amount` +: `integer` The payment amount represented in smallest unit of the currency passed. For example, `amount = 100` translates to `100` subunits, that is . + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`order_id` +: `string` The unique identifier of the order. + +`invoice_id` +: `string` The unique identifier of the invoice. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`amount_refunded` +: `integer` The amount refunded in smallest unit of the currency passed. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string` Description of the payment, if any. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `integer` Customer contact number used for the payment. + +`customer_id` +: `string` The unique identifier of the customer. + +`token_id` +: `string` The unique identifier of the token. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + + + +## 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> - This endpoint will not fetch the details of expired and unused tokens. +> - The UPI tokens are not populated in the API response if the `save_vpa` feature is not enabled in your account. Please raise a request with our Support team to get this activated. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +List tokens = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + + + +### Response Parameters + +`entity` +: `string` The entity being created. Here, it is a `collection`. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: `object` Details related to token such as `token id` and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is `token_id`. + + `entity` + : `string` The entity being created. Here, it is a `token`. + + `token` + : `string` The token is being fetched. + + `bank` + : `string` Card issuing bank details. + + `wallet` + : `string` Provides wallet information. + + `method` + : `string` The payment method used to make the transaction. + + `card` + : `object` Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is `Visa`. + + `type` + : `string` Card type (debit or credit). In this example, it is `credit`. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `boolean` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : `object` The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + + `vpa` + : `object` The VPA details. + + `username` + : `string` The username of the VPA holder. For example, `gaurav.kumar`. + + `handle` + : `string` The VPA handle. Here it is `upi`. + + `name` + : `string` The name of the VPA holder. + + + `recurring` + : `string` This represents whether recurring is enabled for this token. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + `recurring_details` + : `object` Details of the recurring transaction. + + `status` + : `string` This represents the status of the recurring transaction. Possible values: + - `initiated` + - `confirmed` + - `rejected` + - `cancelled` + - `paused` + + `failure_reason` + : `string` This provides the reason why the recurring transaction failed. + + `auth_type` + : `string` The authorisation type details. + + `mrn` + : `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + + `used_at` + : `integer` The VPA usage timestamp. + + `created_at` + : `integer` The token creation timestamp. + + `expired_at` + : `integer` The token expiry date timestamp. + + `dcc_enabled` + : `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + + +## 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + + + +### Response Parameters + +`deleted` +: `boolean` Indicates whether the token is deleted. Possible values: + - `true`: The token is deleted successfully. + - `false`: The token was not deleted. diff --git a/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/test-integration.md b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/test-integration.md new file mode 100644 index 00000000..314d44ca --- /dev/null +++ b/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/test-integration.md @@ -0,0 +1,179 @@ +--- +title: 2. Test Integration +description: Steps to test if the integration was successful and what features are supported in Razorpay's sandbox environment. +--- + +# 2. Test Integration + +This guide helps you understand how to test the integration using Razorpay. It outlines what features are supported in Test (sandbox) vs Live environments and how to simulate various scenarios effectively. + +You can make test payments using one of the payment methods configured at the Checkout. + +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API Keys generated in the Test Mode in the Checkout code. + +## Supported Payment Methods + + +### Netbanking + +You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + + +### UPI + +You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + +You can use one of the test cards to make transactions in the Test Mode. Use any valid expiration date in the future and any random CVV to create a successful payment. + +Card Network | Domestic / International | Card Number +--- +Mastercard | Domestic | 5267 3181 8797 5449 +--- +Visa | Domestic | 4386 2894 0766 0153 +--- +Mastercard | International | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 +--- +Visa | International | 4012 8888 8888 1881 + + + + +### Card BIN Information + +Currently, we do not have dummy card details for all card networks. However, you can refer to the BIN (Bank Identification Number) information below to simulate different card types: + +Card Network | BIN Start Digits +--- +Visa | Starts with **4** +--- +Mastercard | Starts with **51–55** or **2221–2720** +--- +Amex | Starts with **34** or **37** +--- +Diners Club | Starts with **36** or **38** +--- +RuPay | Starts with **60, 65, 81, or 82** +--- +Maestro | Varies, often starts with **50, 56–69** +--- + + + +## What You Can Test in Sandbox Mode + +The following features are supported in Test Mode using test cards, UPI ids, and mock data: + + +### Features supported in test mode + + + Feature | Supported in Test Mode | Notes + --- + Order Creation (/v1/orders) | Yes | Fully testable + --- + Customer Creation | Yes | Full flow supported + --- + Payment Creation (Simulated) | Yes | Use Razorpay-provided test cards or UPI ids + --- + Webhooks (Simulated) | Yes | Simulated event triggers can be tested + --- + Tokenisation API (Simulated) | Yes | Tokens are created but not persisted + --- + Refunds | Yes | Simulated refund flow + --- + Subscriptions | Yes | End-to-end test flow supported + --- + Auth & Capture API | Yes | Can mock Auth/Capture calls + --- + Charge at Will – API Structure | Yes | API structure works; mandate is mocked + + + +You can also test webhook events using failure VPAs like `failure@razorpay` to simulate failure scenarios. + +## What You Cannot Test in Sandbox Mode + +Some features require real payment instruments, user authentication, or live customer flows, and thus cannot be tested in Test Mode: + + +### Features not supported in test mode + + + Feature | Supported in Test Mode | Reason + --- + Saved Cards / Token Persistence | No | Requires RBI-compliant card & customer authentication (AFA) + --- + Saved UPI VPAs | No | Needs real UPI mandate approval + --- + Card/UPI Mandate Creation | No | Involves actual banking infrastructure + --- + CVV-less/Card Vault Flows | No | Needs real card and authentication + --- + UPI Intent + App Switch | No | Not supported by test apps + --- + Real Notifications (SMS/Email) | No | Suppressed in Test Mode + --- + Analytics and Smart Reports | No | Requires real traffic and transactions + --- + OTP / AFA Validations | No | Test cards skip 3D Secure/OTP flows + --- + Settlement Reports | No | Depends on real money movement and settlements + --- + Charge at Will (Recurring Flow) | No | Needs real mandate + live charge events + + + +## Testing Charge at Will (CAW) Flows + + + - You can simulate token creation and charge requests. + - Mandate registration and authentication are mocked. + - No real customer authentication (3DS, OTP) is involved. + + + - Real tokenisation with 3DS/OTP. + - Mandate is registered with customer’s issuing bank. + - Charges below ₹15,000 may work without AFA. + - Charges above ₹15,000 will require AFA as per RBI guidelines. + + +## Minimum Transaction Amounts (Live Environment) + +To ensure successful transaction processing in the Live environment, please refer to the following minimum amount requirements per payment method: + +Payment Method | Minimum Amount (INR) +--- +Credit Card – One-time | ₹1 +--- +Credit Card – Recurring | ₹1 +--- +UPI – One-time | ₹1 +--- +UPI – Recurring | Varies based on pricing/commercials set during onboarding +--- +Netbanking – One-time | ₹1 +--- + +## Next Steps + +[Step 3: Go Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/accept-international-payments-from-indian-customers/standard-integration/go-live-checklist.md) diff --git a/llm-content/payments/international-payments/accept-payments-from-international-customers.md b/llm-content/payments/international-payments/accept-payments-from-international-customers.md new file mode 100644 index 00000000..950ab4ba --- /dev/null +++ b/llm-content/payments/international-payments/accept-payments-from-international-customers.md @@ -0,0 +1,187 @@ +--- +title: Accept Payments from International Customers +description: Razorpay offers affordable solutions for Indian businesses to accept International Bank Transfers and International Card Payments, with funds settled directly to local bank accounts, ensuring minimal conversion loss and a smooth global payment experience. +--- + +# Accept Payments from International Customers + +Razorpay provides Indian businesses with a comprehensive suite of payment solutions to accept international payments effortlessly. Our platform supports various payment methods, allowing businesses to cater to global customers securely and efficiently. + +## Supported Payment Methods + + +### 1. International Cards + + Indian businesses can accept payments from international debit and credit cards issued across the globe. Our platform ensures a seamless experience for both businesses and customers. + + + + Use Cases / Challenges + + - **Ecommerce:** Accept payments from global customers for products or services. + - **Education:** Collect tuition fees from international students. + - **Challenges:** Exchange rate fluctuations, compliance with international regulations, and varying card acceptance rates. + + + +### Prerequisites + + To accept international payments, you need to meet the eligibility criteria established by our banking partners. Know more about the [prerequisites](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-debit-credit-cards.md#eligibility-and-prerequisites). + + + +### Onboarding Flow + + For detailed steps on the application process, refer to the [onboarding flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-debit-credit-cards.md#application-process). + + + +### Method Details + + - **Card Types:** Visa, MasterCard, American Express, and more. + - **Currencies:** Accept payments in multiple currencies, ensuring convenience for international customers. + - **Security:** PCI DSS compliance, 3D Secure, and robust fraud detection. + + + + + + + + +### 2. Local Payment Methods + + Razorpay enables Indian businesses to accept payments via local payment methods, ensuring better outreach and customer convenience in specific regions. + + + + Use Cases / Challenges + + **Uses Cases** + + - **Retail & Ecommerce:** Expand customer reach by accepting payments in local currencies, enhancing the purchasing experience for international buyers. + - **Subscription Services:** Provide flexible local payment options to subscribers in different countries. + - **B2B Transactions:** Facilitate cross-border partnerships by supporting convenient payment methods. + + **Challenges** + + - Ensuring payment method compatibility across various countries. + - Adapting to regional payment regulations and compliance. + - Navigating potential delays in settlement times for some local payment methods. + + + +### Prerequisites + + - You must have an active Razorpay account with KYC verification completed. + - Enablement of local payment features on the Dashboard. + - Business readiness to comply with local regulations and settlement timelines for international transactions. + + + +### Onboarding Flow + + You can accept payments from international customers in the form of online instant international bank transfers using the Razorpay Checkout form, refer to the [onboarding flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/local-payment-methods.md#request-local-payment-method). + + + +### Method Details + + - **Supported Payment Options:** Various local bank transfer methods, mobile wallet options, and region-specific payment services. + - **Supported Currencies:** Multiple local currencies that cater to the preferences of international customers. + - **Security Measures:** End-to-end encryption and multi-layered security protocols to protect payment data and reduce fraud risk. + + + + + + +### 3. International Bank Transfer (MoneySaver Export Account) + + Razorpay provides cost-effective solutions for Indian businesses to manage international payments and receive funds directly in their local bank accounts. This ensures minimal conversion loss and a seamless experience when dealing with global clients. + + + + Use Cases / Challenges + + **Use Cases:** + + - **Export Businesses:** Receive payments for goods or services sold to international clients, directly in your bank account. + - **Professional Services:** Simplify international payment collection for consulting or freelance work. + - **B2B Transactions:** Improve cash flow management for businesses dealing with overseas clients or suppliers. + + **Challenges:** + + - Exchange rate volatility and its impact on the final amount received. + - Compliance with international fund transfer regulations. + - Potential delays in receiving funds through certain transfer methods. + + + +### Prerequisites + + You must meet the following prerequisites set to accept payments from your international customers. + - Know more about the [ Local Currency Bank Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-bank-transfer.md#prerequisites) prerequisites. + - Know more about the [ SWIFT Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-bank-transfer.md#prerequisites) prerequisites. + + + +### Onboarding Flow + + For detailed steps on the activation process, refer to the [Local Currency Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-bank-transfer.md#prerequisites) and [SWIFT Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-bank-transfer.md#prerequisites) activation steps. + + + +### Method Details + + - ACH (Local USD Bank Transfer Rails) + - SEPA (Local EUR Bank Transfer Rails) + - FPS (Local GBP Bank Transfer Rails) + - SWIFT + + + + + + + businesses can accept payments from international debit and credit cards issued across the globe. Our platform ensures a seamless experience for both businesses and customers. + + + +### Use Cases / Challenges + + - **Ecommerce:** Accept payments from global customers for products or services. + - **Education:** Collect tuition fees from international students. + - **Challenges:** + + + +### Prerequisites + + To accept international payments, you need to meet the eligibility criteria established by our banking partners. Know more about the [prerequisites](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-debit-credit-cards.md#eligibility-and-prerequisites). + + + +### Onboarding Flow + + + . + + + +### Method Details + + + + + + + + + + +### Related Information + +- [Purpose Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/purpose-codes.md) +- [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) +- [FIRS Automated Process](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/firs-automated-process.md) diff --git a/llm-content/payments/international-payments/address-verification-system.md b/llm-content/payments/international-payments/address-verification-system.md new file mode 100644 index 00000000..61f9ef5c --- /dev/null +++ b/llm-content/payments/international-payments/address-verification-system.md @@ -0,0 +1,105 @@ +--- +title: Address Verification System - Service by Razorpay +heading: Address Verification System +description: Use Razorpay's AVS as an address verification service to identify and reduce the risk of fraud in international payments. +--- + +# Address Verification System + +The Address Verification System (AVS) verifies if a customer's billing address (postal code and the billing street address) matches the billing address on file with the card issuer. Based on the response from the issuer, Razorpay will accept or cancel the transaction. This helps prevent fraud in international payments. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +> **SUCCESS** +> +> +> **Availability** +> +> This feature is available only for US, UK, and Canada cards. +> + + +### Example + + Suppose an international customer, John Doe, uses a Wells Fargo credit card to make an online purchase on your website with the following address: + + ``` + 1304 Main Street, Anytown, Illinois, 60473 + ``` + The AVS will compare the numbers **1304** and/or **60473** with the address on file with Wells Fargo. + + If the match is successful, Razorpay authorises the transaction. In case of a mismatch, Razorpay declines the transaction. + + + +### Advantages + + The advantages of using the Address Verification System are: + - **Extra layer of security for your customers:** Your customer's lost or stolen credit card cannot be used for fraudulent transactions as the address entered during the transactions will not match the address in the card issuer's database. Razorpay will not authorize such transactions. This protects customers from credit card fraud to an extent. + - **Higher chances of winning cashback disputes**: Suppose your customer's stolen or lost card is + used for transactions, and the fraudulent party uses the customer's correct address. In that case, AVS cannot detect such transactions as fraudulent as there is no address mismatch. Razorpay authorises such transactions. If the customer files a chargeback dispute, you are more likely to win the dispute as the transaction passed the AVS check. + + + +### Prerequisites + + - [Integrate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md) with Razorpay Standard Checkout. This feature is available for all types of Standard Checkout, including server language SDKs, e-commerce plugins, and products such as Invoices, Payment Button, Payment Links and Payment Pages. + - Enable [international payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md) for your Razorpay account. + + +## How it Works + +Below is a diagram of the workflow: + +![AVS Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/international-payments-address-verification-system-flow.jpg.md) + +## How Customers Add Card and Address Details at Checkout + +Your customers can add their card and address details on the checkout pop-up page for address verification. + +1. The customer selects `card` as the payment method and enters the credit card details. + + ![Address Verification Service - Customer enters credit card details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/international-payments-avs-checkout-card.jpg.md) + +2. The customer is asked to enter their billing address. This is a one-time activity and Razorpay will save the address securely. Customer will not be asked to provide the address on repeat transactions. + + ![Address Verification Service - Customer enters address details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/international-payments-avs-address-details.jpg.md) + +3. The Address Verification System matches both addresses. There can be three types of matches: + - **Complete Match**: The address provided by the customer matches exactly with the address available with the card issuer. + - **Partial Match**: This indicates that the billing address being compared has the same ZIP code or the same numeric values in the street address, but not both. + - **No Match**: A `no match` response indicates that neither part of the billing address matches the card issuer data. This can act as a strong signal of potential fraud. +4. Based on the match, Razorpay takes the following actions: + - Authorise the transaction: The transaction is authorised, and the credit card is debited. + - Cancel the transaction: The transaction is declined. + +## Frequently Asked Questions (FAQs) + + +### 1. Do I need to make any changes to my integration? + + No, if you use Razorpay Standard Checkout, you do not need to make any change to your integration. This feature will work out-of-the-box once it is enabled for your account. + + + +### 2. Is this feature available for domestic payments? + + No, this feature is available only for international payments. + + + +### 3. Can my customer complete the payment in case of a partial match? + + Yes, your customer can complete the payment even if there is a partial match. diff --git a/llm-content/payments/international-payments/amazon-market-place.md b/llm-content/payments/international-payments/amazon-market-place.md new file mode 100644 index 00000000..efb71561 --- /dev/null +++ b/llm-content/payments/international-payments/amazon-market-place.md @@ -0,0 +1,68 @@ +--- +title: Accept International Payments via Amazon Market Place +description: Indian businesses can use Razorpay’s international payment solution to receive Amazon Global Selling payouts seamlessly in their local bank accounts with zero FX markup and fast settlements. +--- + +# Accept International Payments via Amazon Market Place + +Razorpay is an Amazon-approved Payment Service Provider(PSP), making it easier for you to receive international payouts from Amazon Global Selling. With Razorpay’s international bank transfer solution, you can enjoy fast settlements, transparent pricing and hassle-free compliance. + +## Prerequisites + +You must meet the following prerequisites to accept international payments from your customers: + +- You must have an Amazon Global Selling account. +- You must have an active Razorpay account with KYC verification completed. +- Import Export Code (IEC) of the beneficiary is mandatory for all purpose codes. +- You should be an Indian business that falls under the provided list of transaction purpose (export) codes. + +## Advantages + + + + - **Access to a Global Market** + + Sell on 18+ global marketplaces through Amazon Global Selling. + - **Secure and Trusted Payments** + + Amazon ensures payment protection, reducing financial risks. + - **Simplified Compliance Process** + + Razorpay helps you navigate regulatory requirements, ensuring seamless transactions. + + + + - **Seamless Fund Transfers** + + Receive international payouts directly to your bank account without intermediaries. + - **Zero FX Markup** + + Transparent pricing with no hidden charges. + - **Faster Settlements** + + Get funds settled in one day, improving cash flow. + - **Compliance Support** + + Hassle-free documentation, including FIRC and shipping bill regularisation. + - **Reliable Customer Support** + + Dedicated Indian support team to assist with queries and resolve issues. + + + +## Update Your Amazon Payment Account + +Follow the steps given below to change your deposit account in Amazon Seller Central: + +1. Log in to Amazon Seller Central account. +2. Navigate to **Settings** and click **Account Info**. + ![Amazon Account Info](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/amazon-account-info.jpg.md) +3. Navigate to the **Payment Information** tab and click **Deposit Methods**. + ![Amazon Payment Information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/amazon-payment-information.jpg.md) +4. Enter the relevant bank account details based on your selling region: + - ACH account – Amazon USA + - FPS account – Amazon UK + - SEPA account – Amazon Europe + ![Amazon Deposit Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/amazon-deposit-methods.jpg.md) +5. Select the **Default Account** check box (Under **Type of Account**) to make Razorpay as your primary deposit method and click **Set Deposit Method**. + ![Amazon Set the Deposit Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/amazon-set-deposit-methods.jpg.md) diff --git a/llm-content/payments/international-payments/currency-conversion.md b/llm-content/payments/international-payments/currency-conversion.md new file mode 100644 index 00000000..2497da95 --- /dev/null +++ b/llm-content/payments/international-payments/currency-conversion.md @@ -0,0 +1,171 @@ +--- +title: Currency Conversion +description: Know how currency conversion works in the APIs, Razorpay Dashboard and Settlements. +--- + +# Currency Conversion + +Razorpay Settlements occur in INR based on the conversion rate at the time of payment. + +## Checkout Form and APIs + +On the checkout form or when using APIs for Razorpay products such as Orders, Payment Links, Subscriptions or Invoices, you need to specify the desired currency and pass the amount in the currency subunit. + + +### Sample Code + + The following is a sample API request and response to create an order for $20: + + ```cURL: Request + curl -u : \ + -X POST https://api.razorpay.com/v1/orders \ + -H "content-type: application/json" + -d '{ + "amount": 2000, + "currency": "USD", + "receipt": "rcptid #11" + }' + + ```java: Java + try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 2000); // amount in the smallest currency unit + orderRequest.put("currency", "USD"); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + + ```Python: Python + order_amount = 2000 + order_currency = 'USD' + order_receipt = 'order_rcptid_11' + notes = {'Shipping address': 'Bommanahalli, Bangalore'} # OPTIONAL + + client.order.create(amount=order_amount, currency=order_currency, receipt=order_receipt, notes=notes) + + ```php: PHP + $order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 2000, // amount in the smallest currency unit + 'currency' => 'USD',// + ) + ]); + + ```csharp: .NET + Dictionary options = new Dictionary(); + options.Add("amount", 2000); // amount in the smallest currency unit + options.add("receipt", "order_rcptid_11"); + options.add("currency", "USD"); + Order order = client.Order.Create(options); + + ```ruby: Ruby + options = amount: 2000, currency: 'USD', receipt: '' + order = Razorpay::Order.create + + ```javascript: Node.js + var options = { + amount: 2000, // amount in the smallest currency unit + currency: "USD", + receipt: "order_rcptid_11" + }; + instance.orders.create(options, function(err, order) { + console.log(order); + }); + + ```json: Response + { + "id": "order_00000000000001", + "entity": "order", + "amount": 2000, + "currency": "USD", + "receipt": "order_rcptid_11", + "status": "created", + "attempts": 0, + "created_at": 1596208654, + "notes": [] + } + ``` + + `currency` _mandatory_ + : `string` Currency in which you want to accept the payment. For example, `GBP`. Check the [supported international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-products-and-currencies) + + `amount` _mandatory_ + : `integer` The amount to be charged in the specified currency subunit. + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + For example, when selling a product for in the domestic market, you pass INR in the `currency` parameter and `100000` in the `amount` parameter (since the amount should be in sub units). + + When selling in the international market, you might want to charge $20 for the same product. In this case, you must pass `USD` in the `currency` parameter and `2000` in the `amount` parameter (since the amount should be in sub units). + + + +### Payment Entity + + The [Payment entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#payment-entity) will contain additional fields when the currency is not INR to provide visibility into the conversion rate. + + **Example** + + The following is a sample payment entity for a $1 payment: + + ```json: Payment Entity + { + "id": "pay_Donb2t6WkJYhfU", + "entity": "payment", + "amount": 100, + "currency": "USD", + "base_amount": 7129, + "base_currency": "", + "status": "captured", + "order_id": "order_CjCr5oKh4AVC51", + "international": true, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "description": "Payment at the Dollar Store", + "card_id": "card_Donb2wk8eC8EDN", + "email": "", + "contact": "", + "notes": [], + "fee": 207, + "tax": 0, + "error_code": null, + "error_description": null, + "created_at": 1400826750 + } + ``` + + `base_currency` + : `string` The conversion currency that will be used to calculate fees and settlements. This currently defaults to INR and is present only if the `currency` is not INR. + + `base_amount` + : `integer` The converted payment amount that will be used to calculate fees and settlements. Represented in the smallest unit of the `base_currency`. This attribute is currently only present if the `currency` is not INR. + + + + +## Select International Currency + +When using products such as Payment Links or Subscription Links, ensure you select the desired currency from the currency drop-down list and add the amount in the selected currency. For example, if you want to charge $20 when selling in the international market, select `USD` in the **Currency** drop-down list and enter 20 in the **Amount** field. + +Watch this video to see how to select the international currency from the Dashboard. + +![Select the international currency from the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/select-international-currency-dashboard.gif.md) + +## Settlements + +After your customers have made the payment, the payment amount is converted to INR and settled to your Razorpay Payment Gateway (PG) account as per your settlement schedule. The exchange rate (according to the processing bank) on the date the payment was made is used to make the conversion. + +#### Example + +A customer made a payment of $10 on February 02, 2019. + +- **Settlement Schedule**: T+7 business days for domestic transactions, where T is the date of capture of payment. +- **Date of payment capture**: February 02, 2019 +- **Conversion Rate**: $1 = as on February 02, 2019 +- **Settlement Amount**: For $10 payment, $10 * = 700 (minus taxes and fees) is settled to your account on February 09, 2019. diff --git a/llm-content/payments/international-payments/faqs.md b/llm-content/payments/international-payments/faqs.md new file mode 100644 index 00000000..5f036a10 --- /dev/null +++ b/llm-content/payments/international-payments/faqs.md @@ -0,0 +1,82 @@ +--- +title: International Payments | FAQs +description: Find answers to frequently asked questions about Razorpay International Payments. +--- + +# International Payments | FAQs + +### 1. Can I avail the early settlement feature for international payments and reduce my settlement period from T+7 working days? + + Yes, you can apply for early settlement on international payments at an additional charge. Please reach out to our [support team](https://razorpay.com/support/). + + + +### 2. Can NGOs accept international payments via Razorpay? + + Due to certain compliance guidelines, we cannot provide the international payment feature to NGOs. + + + +### 3. Do you support companies registered outside India? + + Yes, Razorpay serves businesses registered in India and [Malaysia](http://curlec.com/). + + + +### 4. How do I display different currencies (other than INR) on the Razorpay Checkout to my customers? + + - You must get the [international payments feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#application-process) enabled on your Razorpay account to accept payments in currencies other than INR. + - The native currencies like USD and SGD, which are a part of the [list of currencies supported by Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies), can be updated as a part of the **currency** parameter on the payment request. + - to display any currencies that are not a part of the above list. + + + +### 5. Do you support wire transfers for international payments? + + No. Currently, we only support international payments made using cards issued by overseas banks for all the major networks, following are the supported card networks: + - Visa + - Mastercard + - Amex + - Diners + - Discover + +> **WARN** +> +> +> **Watch Out!** +> +> To enable Diners and Discover cards, . +> +> + + + + +### 6. What currencies do you support? + + Razorpay supports more than 100 international currencies. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + + +### 7. Is there a list of Razorpay products that support international payments? + + Yes. Know more about the [products that support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-products) international payments. + + + +### 8. Who handles the currency conversion? + + - [Supported Currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies): No currency conversion is required. You can pass the payment amount in the native currency. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#currency-conversion/). + - Non-supported Currencies: For the currencies we do not support, you will have to handle conversion at your end and pass it to Razorpay in INR. + + + +### 9. What is the settlement cycle for international payments? + + The default settlement cycle is as per applicable law(s). You can view your settlement cycle on the Razorpay Dashboard. + + + +### 10. How does the settlement happen for international payments? + + The Settlement currency is INR (Indian rupees) for all transactions made using Razorpay. Thus, international payments are settled in INR. The exchange rate at the time of the payment creation is considered for conversion. diff --git a/llm-content/payments/international-payments/firs-automated-process.md b/llm-content/payments/international-payments/firs-automated-process.md new file mode 100644 index 00000000..d15fcf24 --- /dev/null +++ b/llm-content/payments/international-payments/firs-automated-process.md @@ -0,0 +1,88 @@ +--- +title: FIRS Automated Process +description: Know about FIRS certificate, why you need it and how to obtain it from the Razorpay Dashboard. +--- + +# FIRS Automated Process + +FIRS Certificate is a document that acts as evidence that you have received funds from a foreign country. The document is recognised as proof in scenarios such as getting GST refunds, claiming drawbacks from the government, or being required by beneficiary banks for compliance purposes. You can now generate FIRS from the Dashboard. + + +### Why do you need FIRS Certificate + + FIRS certificate contains important information about inward remittance, such as: + + - Sender details + - Converted amount details + - Amount of foreign currency + - UTR and account number + - Date of certificate issuance + + +> **WARN** +> +> +> **Watch Out!** +> +> It is important to update your Purpose code to generate FIRS Certificates. +> + +## Purpose Code Update + +Follow the steps to update your purpose code: + +1. Log in to the Dashboard and navigate to **Accounts & Settings**. + +2. Click **International Payment Codes** under **International payment settings**. + ![International payment codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/firs-purpose-code-update-new.jpg.md) + +3. Update your purpose code under the **International Payment Codes** section. + ![Purpose code update](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/firs-purpose-code-update2-new.jpg.md) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> If you do not find your Transaction Purpose Code in the [Transaction Code list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/transaction_purpose_codes.xlsx.md), . +> + +4. The Razorpay Activation/Operations team checks whether the selected **Purpose Code** is correct. + +## Generate FIRS Certificate + +All new and existing users accepting international payments can easily obtain the FIRS certificate on the Dashboard in a downloadable format. + +To generate FIRS certificate: + +1. Log in to the Dashboard and navigate to **Account & Settings**. +2. Under **International payment settings** click **Foreign inward remittance statement (FIRS)**. +3. You can view a list of FIRS certificates based on your monthly transactions in a downloadable format. + ![List of FIRS certificates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-ip-firs-view-new.jpg.md) +4. There are two sections. + - The FIRS certificates provided by the bank. + - Razorpay-generated statements. + +> **INFO** +> +> +> **Handy Tips** +> +> Razorpay-generated statements act as an alternative to FIRS certificates provided by banks. +> + +![List of FIRS certificates downloadable format](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-ip-firs6.jpg.md) + +If the FIRS is not generated from the bank or you need a consolidated list of FIRS, click on **Request for Razorpay Statement**. You can view or download the FIRS certificate from your Dashboard. +![FIRS request screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-no-firs.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> Generating reports can take up to 1 hour. +> ![FIRS request sent screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-firs-request-new.jpg.md) +> diff --git a/llm-content/payments/international-payments/glossary.md b/llm-content/payments/international-payments/glossary.md new file mode 100644 index 00000000..879ebbfb --- /dev/null +++ b/llm-content/payments/international-payments/glossary.md @@ -0,0 +1,32 @@ +--- +title: International Payments | Glossary +heading: Glossary +description: List of commonly used terms related to Razorpay International Payments. +--- + +# Glossary + +The following table lists all the commonly used terms in international payments and their descriptions. + +Terms | Description +--- +International Payments | International payments are transactions where the payer and the payee are in different countries, involving cross-border funds transfer and currency conversion processes. +--- +Currency Conversion​ | The process of converting one currency into another during an international transaction. Razorpay Settlements occur in INR based on the conversion rate at the time of payment. +--- +Purpose Codes | Specific codes issued by the Reserve Bank of India (RBI) to denote the nature of foreign currency transactions. Each payment must be tagged with a purpose code to ensure compliance with regulations. +--- +SWIFT Transfer | An international payment method that uses the SWIFT network to transfer funds between banks globally. +--- +FIRS (Foreign Inward Remittance Statement) | A document that provides proof of funds received from a foreign country, essential for compliance, claiming GST refunds, and other regulatory purposes. +--- +Non-3DS Transactions | Payments processed without the 3D Secure protocol, often used for international card transactions. These transactions carry higher risk due to the lack of an additional authentication step. +--- +Address Verification System (AVS) | A security feature that verifies the customer's billing address against the address on file with the card issuer to prevent fraud. +--- +3D Secure (3DS) | An additional layer of security for online card transactions where the cardholder must authenticate the transaction using a password or a one-time code​. + + based on the conversion rate at the time of payment. +--- +Non-3DS Transactions | Payments processed without the 3D Secure protocol, often used for international card transactions. These transactions carry higher risk due to the lack of an additional authentication step. +--- diff --git a/llm-content/payments/international-payments/international-bank-transfer.md b/llm-content/payments/international-payments/international-bank-transfer.md new file mode 100644 index 00000000..9cb69667 --- /dev/null +++ b/llm-content/payments/international-payments/international-bank-transfer.md @@ -0,0 +1,634 @@ +--- +title: International Bank Transfer (MoneySaver Export Account) +description: Accept international payments through local currency bank accounts with Razorpay's International Bank Transfer. Open virtual accounts in US, UK, Europe, Australia, Canada and more to receive payments via ACH, FPS, SEPA, NPP, EFT, SWIFT and more. +--- + +# International Bank Transfer (MoneySaver Export Account) + +- **Activate International Bank Transfer**: Check the steps to activate International Bank Transfer. + +- **International Bank Transfer Dashboard**: International Bank Transfer dashboard homepage overview. + +International Bank Transfer enables Indian businesses to accept international payments through local currency bank accounts without the complexity of opening foreign bank accounts. Your international buyers can pay you using familiar local payment methods like ACH, FPS, SEPA and SWIFT, whilst you receive settlements directly in your Indian bank account in INR. + + +### Advantages + + + + - **Competitive Pricing** + + International bank tranfers cost only 1% with Zero Forex Markup vs traditional banks and other fintech platforms. + + - **Faster Settlement TAT** + + Receive your payments within 1 business day of the payment being captured vs traditional bank transfer that takes 5-7 business days. + + - **Complete Compliance** + + Receive your FIRC within minutes of the amount being credited to your INR account; built-in invoice management and buyer detail collection to ensure RBI and partner compliance. + + - **Hassle-free setup** + + Opening bank accounts in foreign countries typically requires extensive paperwork and physical presence. Razorpay offers a real-time, completely digital solution to activate foreign currency accounts across different geographies. + + - **Multi-currency support** + + Accept payments in 30+ currencies through USD, GBP and EUR virtual accounts, with support for ACH, FPS, SEPA and SWIFT transfers. + + - **Easy platform integration** + + Seamlessly connect your virtual accounts to Amazon Seller Central, Upwork, Deel and other marketplaces or freelancing platforms. + + - **Higher success rates** + + International card payments often fail due to fraud checks and risk validations. Bank transfers have significantly higher success rates, improving your conversion. + + - **No chargebacks** + + Bank transfers are authorised payments that cannot be reversed through chargebacks, protecting you from fraudulent disputes and providing better cash flow predictability. + + + + + - **No card required** + + Customers without access to international cards can pay through their bank accounts, making it easy for you to sell in countries with lower card penetration. + + - **No bank branch visit needed** + + Customers can make payments online through local bank transfers (like ACH) instead of visiting their bank branch for international wire transfers. This significantly improves the payment experience. + + - **Familiar payment experience** + + Buyers can pay in their local currency using payment methods they are already comfortable with, reducing friction and abandoned payments. + + - **Lower costs for buyers** + + Local ACH transfers incur lower fees compared to international card payments or SWIFT transfers, making your products more attractive. + + - **Faster payments** + + Local payment rails process faster than traditional international wire transfers, improving cash flow for your business. + + - **Currency flexibility** + + Customers can initiate payments in their native currency (USD, GBP, EUR), whilst you receive settlements in INR in your Indian bank account. + + + + +## How It Works + +1. Activate International Bank Transfer. + - New Razorpay user: Sign up for an [account](https://razorpay.com/accept-international-payments/bank-transfers/). + - Existing Razorpay user: Log in to the Dashboard. Navigate to **Account & Settings** → **International payments** (under Payment methods) → **International bank transfers** and click **Activate**. +2. Receive virtual bank account details for USD, GBP, EUR, AUD, CAD, SWIFT and more. +3. Share these account details with your international buyers. +4. Accept payments when buyers transfer money using local payment methods. +5. Upload invoices and buyer details for each transaction (not required for Amazon, Upwork and Freelancer platform transactions). +6. Track payments through detailed timelines on your dashboard. +7. Receive settlements in INR in your Indian bank account. + +## Supported Payment Methods + +International Bank Transfer supports the following payment methods: + +Currency Name [columWidth="30"] | Currency Code | Payment Method | Account Type +--- +United States Dollar | USD | ACH | Virtual USD Account +--- +Pound Sterling | GBP | FPS | Virtual GBP Account +--- +European Euro | EUR | SEPA | Virtual EUR Account +--- +Canadian Dollar | CAD | EFT | Virtual CAD Account +--- +Swiss Franc | CHF | SIC ACH/SIC RTGS | Virtual CHF Account +--- +Swedish Krona | SEK | RIX Instant/RIX RTGS | Virtual SEK Account +--- +Danish Krone | DKK | DKK Local | Virtual DKK Account +--- +Australian Dollar | AUD | NPP/Osko/BECS | Virtual AUD Account +--- +Bahrain Dinar | BHD | SWIFT ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | Virtual SWIFT Account ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +--- +Chinese Yuan | CNY | | +--- +Czech Koruna | CZK | | +--- +European Euro | EUR | | +--- +Pound Sterling | GBP | | +--- +Hong Kong Dollar | HKD | | +--- +Hungarian Forint | HUF | | +--- +Israeli Shekel | ILS | | +--- +Japanese Yen | JPY | | +--- +Kenyan Shilling | KES | | +--- +Kuwait Dinar | KWD | | +--- +Mexican Peso | MXN | | +--- +New Zealand Dollar | NZD | | +--- +Norwegian Krone | NOK | | +--- +Omani Rial | OMR | | +--- +Polish Zloty | PLN | | +--- +Qatar Rial | QAR | | +--- +Romanian Leu | RON | | +--- +Saudi Riyal | SAR | | +--- +Singapore Dollar | SGD | | +--- +South African Rand | ZAR | | +--- +Thai Baht | THB | | +--- +Turkish Lira | TRY | | +--- +Ugandan Shilling | UGX | | +--- +United Arab Emirates Dirham | AED | | +--- +United States Dollar | USD | | +--- + +## Use Cases + +International Bank Transfer is ideal for: + +- Freelancers and consultants providing services to international clients. +- SaaS companies selling software subscriptions globally. +- IT services providers working with overseas customers. +- Ecommerce sellers on Amazon, eBay, or their own websites. +- B2B exporters selling physical goods internationally. +- Digital content creators monetising international audiences. +- Professional services firms offering consulting, legal or accounting services globally. + +## Prerequisites + +Before activating International Bank Transfer, ensure you meet the following requirements: + +- Active Razorpay account with KYC verification completed. +- PAN details of your business provided during onboarding. +- You must be an Indian business that falls under one of the following export purpose codes to use MoneySaver Export Account: + + + Purpose Code | Description + --- + P0103 | Advance receipts against export contracts, which will be covered later by GR/PP/SOFTEX/SDF (other than Nepal and Bhutan). + --- + P1004 | Legal services. + --- + P1005 | Accounting, auditing and bookkeeping services. + --- + P1006 | Business and management consultancy and public relations. + --- + P1007 | Advertising, trade fair service. + --- + P1008 | Research and Development services. + --- + P1009 | Architectural services. + --- + P0802 | Software consultancy/implementation (other than those covered in SOFTEX form). + --- + P1020 | Wholesale and retailing trade services. + --- + P1002 | Trade related services - commission on exports/imports. + --- + P1104 | Entertainment services. + --- + P1015 | Tax consulting services. + --- + P1016 | Market research and public opinion polling service. + --- + P1017 | Publishing and printing services. + --- + P1019 | Commission agent services. + --- + P1107 | Educational services. + --- + P1109 | Other personal, cultural and recreational services. + --- + P1701 | Receipts on account of processing of goods. + --- + P0301 | Purchases towards travel (includes purchases of foreign TCs, currency notes over the counter, by hotels, emporiums, institutions, as well as amount received by TT/SWIFT transfers or debit to non-resident account). + --- + P0302 | Business travel. + --- + P0304 | Travel for medical treatment including TCs purchased by hospitals. + --- + P0305 | Travel for education including TCs purchased by educational institutions. + --- + P0306 | Other travel receipts. + --- + P0601 | Receipts of life insurance premium. + --- + P0602 | Receipts of freight insurance - relating to export of goods. + --- + P0603 | Receipts on account of other general insurance premium. + --- + P0605 | Receipts on account of auxiliary services (commission on insurance). + --- + P0607 | Insurance claim settlement of non-life insurance and life insurance (only term insurance). + --- + P0608 | Life insurance claim settlements (excluding insurance) received by residents in India. + --- + P0801 | Hardware consultancy/implementation. + --- + P0803 | Database, data processing charges. + --- + P0804 | Repair and maintenance of computer and software. + --- + P0805 | News agency services. + --- + P0806 | Other information services - subscription to newspapers, periodicals and so on. + --- + P0808 | Telecommunication services including electronic mail services and voice mail services. + --- + P1013 | Environmental services. + --- + P1014 | Engineering services. + --- + P1101 | Audio-visual and related service: Motion picture and video tape production, distribution & projection service. + --- + P1103 | Radio and television production, distribution and transmission services. + --- + P1105 | Museums, library and archival services. + --- + P1106 | Recreation and sporting activity services. + --- + P1108 | Health service (receipts on account of services provided by Indian hospitals, doctors, nurses, paramedical and similar services rendered remotely or on-site). + --- + + +- You should have international payment via Payment Link enabled on your account if you want to receive payment from customers in foreign currency, such as USD. The money will be settled in your Indian current account in INR. Know [how to enable international payments for your account](#activate-international-bank-transfer). + +## Activate International Bank Transfer + +The activation process differs based on whether you are a new or existing Razorpay user. + + +### New Razorpay User + + If you are new user, you will need to complete the following steps displayed on the onboarding screens to activate international payment methods. + 1. Sign up for a [Razorpay account](https://razorpay.com/accept-international-payments/bank-transfers/). + 2. On the onboarding screen, select **Outside India (International)** and click **Start Onboarding**. + 3. Fill up the following details to complete the onboarding: + - Basic Details: + - Name (Business or Individual). + - Phone number. + - Email address. + - Payment channels you want to enable. + - Business Details: + - Type of business: Individual, Sole Proprietorship, Partnership, Private Limited, Public Limited, LLP, NGO and so on. + - Personal PAN (for individuals) or Business PAN. + - Business Documents: + - GSTIN certificate (if GST registered). + - Udyam registration certificate (for MSMEs). + - Complete your KYC: + - Business address with proof. + - Authorised signatory details. + - Complete video KYC: + - Requires Aadhaar and PAN card. + - Live video verification with Razorpay agent. + - Takes approximately 3-4 minutes. + 4. Follow the on-screen instructions to provide any additional details or documentation required for activation. + + + +### Existing Razorpay User + + If you are an existing Razorpay user, to activate **Local Currency Bank Transfer** payment method, follow the steps given below: + + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings** → **International payments** (under Payment methods). + 3. In the **Local Currency Bank Transfer** section, under the International bank transfers tab, click **Activate**. + ![International bank transfer ACH activate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/intl-ach-request.jpg.md) + 4. On the **Purpose code** page, select the correct purpose code from the list and click **Continue**. + ![International bank transfer purpose code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ibt-purpose-code.jpg.md) + 5. On the **Importer - Exporter code** page: + - If you have an IE code, select **Yes**. Enter the 10-digit **IE code** and select **I agree to the Terms and Conditions**. Click **Continue**. + - If the IE code does not apply to you, select **No, because it is not applicable for me** and click **Continue**. + - If you do not have an IE code but want to apply, select **No, but I want to apply for it**, and click **Apply now**. + ![Import Export Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ibt-ie-code.jpg.md) + 6. On the Video KYC page, select **Yes, I am Gaurav Kumar**, and click **Start Video KYC** to proceed with the video KYC. + ![International bank transfer video kyc](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ibt-video-kyc.jpg.md) + 7. Your request submitted successfully, click **Okay, got it**. + ![Request submitted successfully](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/request-submitted.jpg.md) + + +## Accessing The Dashboard + +After the International Bank Transfer account is activated, you can access your dashboard: + +**If you are using only International Bank Transfer:** You will automatically land on the International Bank Transfer homepage when you log in with all the international payment tools. + +**If you are using multiple Razorpay products:** +1. Log in to the Dashboard. +2. On the left navigation, click **Intl Bank Transfer**. +3. You will land on the dashboard homepage with all the international payment tools. + +![International Bank Transfers homepage](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/intl-bank-transfer-home.jpg.md) + +### Dashboard Overview + +Dashboard homepage is organised into key sections: + + +### Virtual Bank Accounts + +At the top of your homepage, you will see cards for all your virtual bank accounts: + +- USD Account (ACH) +- GBP Account (FPS) +- EUR Account (SEPA) +- SWIFT Account +- SGD, AED, AUD, CHF, DKK, SEK and CAD Accounts (Coming soon) + +![Virtual accounts on homepage](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/international-account-home.jpg.md) + +#### Accessing Your Account Details + + + Virtual Account Details + + You can access your virtual account details in two locations: + + + + 1. Log in to the Dashboard. + 2. Navigate to **Intl Bank Transfer**. + 3. On the homepage, you will see cards for all your virtual accounts. + 4. Click on any account card to view complete details. + ![Virtual accounts on homepage](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/international-account-home.jpg.md) + + + 1. From the left navigation menu, click **International Accounts**. + 2. You will see a dedicated page with all your virtual account details. + 3. Click on any account card to view complete details. + ![Virtual accounts on International accounts tab](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/international-accounts.jpg.md) + + + + +#### Share Your Account Details + +There are two ways to share your virtual account details with customers, depending on your preference and their requirements. + + +### Manually Share Account Details + + This is the quickest method when you want to share details via your own email, WhatsApp or other messaging platforms. + + 1. On your dashboard homepage or International Bank Accounts page, locate the account you want to share. + 2. On account card. Click **Copy**. + ![Copy account details manually](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/manual-copy-details.jpg.md) + 3. Account details are copied to your clipboard. Paste the details into your email, WhatsApp message or other messaging platforms. + + + +### Share Account Details Directly Via Email From The Dashboard + + Use the built-in email sharing feature to share the account details. + + 1. On your dashboard homepage or International Bank Accounts page, locate the account you want to share. + 2. On account card. Click **Share**. + ![Share Account details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/share-account.jpg.md) + 3. Add Client details: + - In the **Client name** field, enter your client's full name. + - In the **Send to** field, enter your client's email address. + - (Optional) Click **+ Add CC** if you want to copy additional email addresses. + 4. Click **Send Email**. + ![Add details and send email](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/send-email.jpg.md) + + + + + +### Recent Transactions + + Below the virtual accounts section, you will see the most recent payment transactions: + + - Payment id and date. + - Amount in original currency. + - Payment status (Captured, Authorised, Failed). + - Amount saved compared to traditional methods. + - **+ Add Details** button for transactions requiring invoice upload. + ![Recent transactions section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/recent-payments.jpg.md) + + + +### Video Guide + + The dashboard includes comprehensive video guide to help you get started quickly: + + - Getting Started with MoneySaver Export Account. + - Accepting Your First Payment. + - Adding Invoices & Client Details. + - Tracking Payments. + - Managing Marketplace Payouts. + - Connecting to Freelancer Platforms. + + + +### Understanding Your Savings + +The **Savings Calculator** on the dashboard shows how much you can save using Razorpay International Bank Transfer compared to traditional banks and other platforms. + + + Savings Calculator + + Located on the dashboard homepage, the calculator helps you understand potential savings: + + **How to Use:** + 1. Use the slider to set your monthly payment volume. + 2. View real-time comparison across three options: + - Razorpay: Amount you receive (with zero FX markup). + - Fintech Platforms: Amount after fees. + - Traditional Banks: Amount after bank charges. + + **What It Shows:** + - Exact amount you will receive in INR with each option. + - Your savings compared to alternatives. + - Annual savings projection. + + **Example:** + For $10,000 monthly payments: + - **Razorpay**: ₹8,77,700 (Zero FX markup, Free FIRC) + - **Fintech Platforms**: ₹8,21,599 (₹66,101 less) + - **Banks**: ₹8,80,642 (₹7,706 less) + + ![Savings calculator](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/savings-calculator.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> The calculator uses current exchange rates and actual fee structures for accurate comparisons. Check regularly to see your savings. +> + + + + + + +### Platform Integration + + If you are selling on Ecommerce marketplaces or offering services on freelancing platforms, you can connect your Razorpay International Bank Transfer to receive payments directly from these platforms. + + International Bank Transfer integrates with: + + + + - Amazon.us (United States) - USD + - Amazon.co.uk (United Kingdom) - GBP + - Amazon EU (European Union) - EUR + - Amazon.com.au (Australia) - AUD + - Amazon DK (Denmark) - DKK + - SWIFT-based Marketplaces - Multiple currencies + - Amazon.ca (Canada) - CAD (Coming soon) + - Amazon.ae (United Arab Emirates) - AED (Coming soon) + - Amazon CH (Switzerland) - CHF (Coming soon) + - Amazon.se (Sweden) - SEK (Coming soon) + + + - Upwork (Global freelancing job marketplace) + - Deel (Freelance contracts & payouts) + - Toptal (Elite freelance talent network) + - Freelancer (Bid-based freelance jobs platform) + - Fiverr (Freelance services marketplace) + + + + +## Unsupported Merchant Categories + +International Bank Transfer does not support the following MCCs because of compliance reasons. + +MCC | Description +--- +5933 | Pawnbrokers (Pawn Shops) +--- +8651 | Political organisations +--- +5094 | Precious metals and stones, including diamond traders +--- +7995 | Gambling - Betting (including lottery tickets, casino gaming chips, off-track betting and wagers at race tracks) +--- +5813 | Alcohol - Drinking Places (Alcoholic Beverages, Bars, Taverns, Cocktail lounges, Nightclubs and Discotheques) +--- +5993 | Tobacco (Cigar Stores and Stands) +--- +5193 | Seeds or plants (Florists Supplies, Nursery Stock, and Flowers) +--- +5966 | Outbound telemarketing (Direct Marketing-Outbound Telemarketing Merchants) +--- + +In addition to the above categories, International Bank Transfer does not support businesses in the prohibited industries mentioned in [Razorpay Terms and Conditions (Part 17)](https://razorpay.com/terms). + +## Frequently Asked Questions (FAQs) + + +### 1. I have customers spread across the US, UK and Europe. I want to offer our customers a cheaper, more reliable, and better payment experience. Can I collect payments in USD, GBP or EUR currency? + + Yes, you can offer services to your international customers from the US and other countries by providing them with a local currency bank account, and they can pay in their respective currencies. + + + +### 2. How can I transfer money from the local currency bank accounts to my current account with an Indian bank? + + The money is settled in your current account in INR currency by Razorpay after deducting the appropriate charges. + + + +### 3. Can I keep funds in these local currency accounts for a month or more for other payouts in foreign currency? + + No, you cannot hold the funds in the local currency accounts. + + + +### 4. Do I need to share any bills/invoices with Razorpay? + + Yes. You must provide invoices for all the transactions accepted via MoneySaver account. Airway bill is mandatory for the export of physical goods. Our banking partners require this for audit purposes as mandated by RBI. The settlement will not be initiated without a valid invoice copy, airway bill (in case of delivery of physical goods) and buyer's address details. + + You should [upload the invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-bank-transfer/transactions-invoices.md#uploading-invoices-and-business-buyer-details) on the Dashboard to enable Razorpay to settle funds to the Indian bank account. + + + +### 5. Does Razorpay need the buyer's address details along with the invoices? + + Yes. You must provide the buyer's address details and invoices for all the transactions accepted via a MoneySaver account. You should [upload the buyer's address details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/buyers-address-details.md) on the Dashboard to enable Razorpay to settle funds to the Indian bank account. + + + +### 6. How can I provide invoices for these payment transactions? + + An invoice or airway bill (in case of delivery of physical goods) is mandatory for export transactions. You may [upload invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-bank-transfer/transactions-invoices.md#uploading-invoices-and-business-buyer-details) to your Dashboard. The payment is settled once you share a valid invoice. + + + +### 7. What is the pricing for using this method? + + Please refer to the pricing details mentioned [here](https://razorpay.com/accept-international-payments/bank-transfers/). + + + +### 8. What is the settlement TAT? + + The settlement cycle is T+1 from the time the invoice is captured or invoice details are shared against a payment. + + + +### 9. Does Razorpay support multiple settlement currencies for a seller? + + Yes, we support INR settlements to your current account in India and non-INR settlements to your EEFC account. + + + +### 10. Will I get FIRS for these transactions for tax purposes? + + FIRS will be sent to your contact email within 24 hours after settlement. + + + +### 11. What if my end customer raises a dispute with Razorpay? + + Disputes do not apply to these transactions as they are push transactions. + + + +### 12. Are refunds supported on these transactions? + + No, refunds are not supported for these transactions. + + + +### 13. What is the payment flow for the consumer/buyer? + + The payment flow is given below: + + 1. The customer receives your virtual bank account details shared by you via email, WhatsApp or invoice. + 2. The customer adds your virtual bank account details as a beneficiary in their bank account or online banking portal. + 3. The customer initiates a local bank transfer to your account using their preferred payment method. + 4. The payment amount reflects on your Razorpay dashboard within a few hours of the customer initiating the transfer. + + +### Related Information + +- [Connect Platforms](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-bank-transfer/connect-platforms.md) +- [Transactions and Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-bank-transfer/transactions-invoices.md) diff --git a/llm-content/payments/international-payments/international-bank-transfer/connect-platforms.md b/llm-content/payments/international-payments/international-bank-transfer/connect-platforms.md new file mode 100644 index 00000000..9afec799 --- /dev/null +++ b/llm-content/payments/international-payments/international-bank-transfer/connect-platforms.md @@ -0,0 +1,182 @@ +--- +title: Connect Online Marketplaces and Freelancing Platforms +description: Connect your Razorpay International Bank Transfer (MoneySaver) Account to Online Marketplaces like Amazon and Freelancing Platforms like Upwork, Deel, Toptal and Freelancer. +--- + +# Connect Online Marketplaces and Freelancing Platforms + +- **Online Marketplaces**: Check the steps to integrate with Online Marketplaces. + +- **Freelancing Platforms**: Check the steps to integrate with Freelancing Platforms. + +If you are selling on ecommerce marketplaces or offering services on freelancing platforms, you can connect your Razorpay International Bank Transfer to receive payments directly from these platforms. + +## Supported Platforms + +International Bank Transfer integrates with: + + + - Amazon.us (United States) - USD + - Amazon.co.uk (United Kingdom) - GBP + - Amazon EU (European Union) - EUR + - Amazon.com.au (Australia) - AUD + - Amazon DK (Denmark) - DKK + - SWIFT-based Marketplaces - Multiple currencies + - Amazon.ca (Canada) - CAD (Coming soon) + - Amazon.ae (United Arab Emirates) - AED (Coming soon) + - Amazon CH (Switzerland) - CHF (Coming soon) + - Amazon.se (Sweden) - SEK (Coming soon) + + + - Upwork (Global freelancing job marketplace) + - Deel (Freelance contracts & payouts) + - Toptal (Elite freelance talent network) + - Freelancer (Bid-based freelance jobs platform) + - Fiverr (Freelance services marketplace) + + +## Online Marketplaces + +### Amazon Marketplace Integration + +Amazon is one of the most popular platforms for Indian sellers. Here is how you can connect your Razorpay account to Amazon Seller Central. + +#### Prerequisites + +You must meet the following prerequisites to accept international payments from your customers: + +- You must have an Amazon Global Selling account. +- Active Razorpay account with KYC verification completed. +- You must have an active Razorpay account with KYC verification completed. +- You must be an Indian business that falls under one of the following export purpose codes to use MoneySaver Export Account: + + + Purpose Code | Description + --- + P0103 | Advance receipts against export contracts, which will be covered later by GR/PP/SOFTEX/SDF (other than Nepal and Bhutan). + --- + P1004 | Legal services. + --- + P1005 | Accounting, auditing and bookkeeping services. + --- + P1006 | Business and management consultancy and public relations. + --- + P1007 | Advertising, trade fair service. + --- + P1008 | Research and Development services. + --- + P1009 | Architectural services. + --- + P0802 | Software consultancy/implementation (other than those covered in SOFTEX form). + --- + P1020 | Wholesale and retailing trade services. + --- + P1002 | Trade related services - commission on exports/imports. + --- + P1104 | Entertainment services. + --- + P1015 | Tax consulting services. + --- + P1016 | Market research and public opinion polling service. + --- + P1017 | Publishing and printing services. + --- + P1019 | Commission agent services. + --- + P1107 | Educational services. + --- + P1109 | Other personal, cultural and recreational services. + --- + P1701 | Receipts on account of processing of goods. + --- + P0301 | Purchases towards travel (includes purchases of foreign TCs, currency notes over the counter, by hotels, emporiums, institutions, as well as amount received by TT/SWIFT transfers or debit to non-resident account). + --- + P0302 | Business travel. + --- + P0304 | Travel for medical treatment including TCs purchased by hospitals. + --- + P0305 | Travel for education including TCs purchased by educational institutions. + --- + P0306 | Other travel receipts. + --- + P0601 | Receipts of life insurance premium. + --- + P0602 | Receipts of freight insurance - relating to export of goods. + --- + P0603 | Receipts on account of other general insurance premium. + --- + P0605 | Receipts on account of auxiliary services (commission on insurance). + --- + P0607 | Insurance claim settlement of non-life insurance and life insurance (only term insurance). + --- + P0608 | Life insurance claim settlements (excluding insurance) received by residents in India. + --- + P0801 | Hardware consultancy/implementation. + --- + P0803 | Database, data processing charges. + --- + P0804 | Repair and maintenance of computer and software. + --- + P0805 | News agency services. + --- + P0806 | Other information services - subscription to newspapers, periodicals and so on. + --- + P0808 | Telecommunication services including electronic mail services and voice mail services. + --- + P1013 | Environmental services. + --- + P1014 | Engineering services. + --- + P1101 | Audio-visual and related service: Motion picture and video tape production, distribution & projection service. + --- + P1103 | Radio and television production, distribution and transmission services. + --- + P1105 | Museums, library and archival services. + --- + P1106 | Recreation and sporting activity services. + --- + P1108 | Health service (receipts on account of services provided by Indian hospitals, doctors, nurses, paramedical and similar services rendered remotely or on-site). + --- + + + +### Integration Steps + + Follow the steps given below to change your deposit account in Amazon Seller Central: + + 1. Log in to Amazon Seller Central account. + 2. Navigate to **Settings** and click **Account Info**. + ![Amazon Account Info](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/amazon-account-info.jpg.md) + 3. Navigate to the **Payment Information** tab and click **Deposit Methods**. + ![Amazon Payment Information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/amazon-payment-information.jpg.md) + 4. Enter the relevant bank account details based on your selling region: + - ACH account – Amazon USA + - FPS account – Amazon UK + - SEPA account – Amazon Europe + - NPP/Osko/BECS Account - Amazon Australia + - EFT Account - Amazon Canada + - RIX Account - Amazon Sweden + ![Amazon Deposit Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/amazon-deposit-methods.jpg.md) + 5. Select the **Default Account** check box (Under **Type of Account**) to make Razorpay as your primary deposit method and click **Set Deposit Method**. + ![Amazon Set the Deposit Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/amazon-set-deposit-methods.jpg.md) + + +## Freelancing Platforms + +If you are offering services on freelancing platforms, you can connect your Razorpay International Bank Transfer to receive payments directly from these platforms. + + +### Freelancing Platforms + + Detailed step-by-step integration guides for each freelancing platform are available on the dashboard: + + 1. Log in to the [Razorpay Dashboard](https://dashboard.razorpay.com/app/money-saver/connect-platforms). + 2. Navigate to **Connect Platforms** on the left navigation with Intl Bank Transfer. + 3. On Freelancing Platforms section. Click the platform you want to connect (**Upwork**, **Deel**, **Toptal** or **Freelancer**). + 5. Follow the on-screen instructions to integrate with the specific platform. + ![Freelancing platforms section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/freelancing-platforms.jpg.md) + + +### Related Information + +[Transactions and Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-bank-transfer/transactions-invoices.md) diff --git a/llm-content/payments/international-payments/international-bank-transfer/transactions-invoices.md b/llm-content/payments/international-payments/international-bank-transfer/transactions-invoices.md new file mode 100644 index 00000000..e4f55107 --- /dev/null +++ b/llm-content/payments/international-payments/international-bank-transfer/transactions-invoices.md @@ -0,0 +1,58 @@ +--- +title: Manage Invoices and Transactions +description: Managing Invoices, Tracking Payments and Monitoring Transactions with Razorpay International Bank Transfer. Know how to upload invoices and track payment status. +--- + +# Manage Invoices and Transactions + +For every international payment you receive through International Bank Transfer, you must upload an invoice and buyer details to comply with RBI and banking partner requirements. This guide explains how to manage invoices and track your transactions. + +> **WARN** +> +> +> **Watch Out!** +> +> Uploading invoices and business/buyer details is mandatory for all International Bank Transfer transactions (not required for Amazon, Upwork and Freelancer platform transactions). Without these documents, your payment cannot be settled to your Indian bank account. +> +> + +## Uploading Invoices and Business/Buyer Details + +There are two ways to add invoice and buyer details for your payments: + + + This is the quickest method when you are on your dashboard homepage: + + 1. Log in to the Dashboard and navigate to **Intl Bank Transfer**. + 2. On the homepage, scroll to the **Recent transactions** section. You will see the list of your most recent transactions. + 3. Look for payments with a CTA - **+ Add Details**. These payments require invoice details. + 4. On the right side, click **+ Add Details**. + ![Recent transactions section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-details.jpg.md) + 5. On the dialog box, you can drag and drop or click **Upload**. + ![Upload Invoice dialog box](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upload-invoice-box.jpg.md) + 6. Enter **Business/buyer name** and other required details. + 7. Click **Submit**. + + After the invoice is uploaded and the address details are added, payment will be captured within 60 minutes. + + + This method is useful when you want to see all pending invoices at once: + + 1. From the left navigation menu, click **Transactions**. You will see the list of all your transactions. + 2. At the top, you will see two filter tabs: + - **All**: Shows all transactions. + - **Pending Actions**: Shows only transactions that requires invoices. + 3. Look for payments with a CTA - **+ Add Details** and settlement status **Not Initiated**. These payments require invoice details. + 4. On the right side, click **+ Add Details**. + ![Recent transactions section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/transactions-add-details.jpg.md) + 5. On the dialog box, you can drag and drop or click **Upload**. + ![Upload Invoice dialog box](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upload-invoice-box.jpg.md) + 6. Enter **Business/buyer name** and other required details. + 7. Click **Submit**. + + After the invoice is uploaded and the address details are added, payment will be captured within 60 minutes. + + +### Related Information + +[International Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-bank-transfer.md) diff --git a/llm-content/payments/international-payments/international-debit-credit-cards.md b/llm-content/payments/international-payments/international-debit-credit-cards.md new file mode 100644 index 00000000..0cc09d41 --- /dev/null +++ b/llm-content/payments/international-payments/international-debit-credit-cards.md @@ -0,0 +1,81 @@ +--- +title: International Debit and Credit Cards +description: Enable/disable international payments using foreign cards. Check the eligibility criteria, prerequisites and the application process. +--- + +# International Debit and Credit Cards + +Accept international payments from foreign bank cards by enabling international payments on your Dashboard.. + +> **INFO** +> +> +> +> **Feature Enablement** +> +> International payments require special security and risk checks. We enable this feature only after our banking partners have approved it, ensuring compliance and protecting against fraud. +> + +## Enable Payments from International Debit and Credit Cards + +To enable international payments for the first time, place a request from the Dashboard. + + +### Eligibility and Prerequisites + + You must meet the following eligibility criteria set by our banking partners to accept international payments: + + - You must have an active Razorpay account with KYC verification completed. + - You must have a valid website with the following sections/pages clearly defined: + - **Terms and Conditions** + - **Privacy policy** + - **Refund and Cancellation policy** + - **Shipping policy** + +> **WARN** +> +> +> **Watch Out!** +> +> International payments cannot be enabled for your account without these sections/pages on your website. +> + + - Check the list for the [business categories not supported by Razorpay](https://razorpay.com/terms/). + + + +### Application Process + + + + To request international payments: + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings** → **International payments** (under Payment methods). + 3. Click **Activate** to enable the International cards. + ![Request activation for international card payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/international-cards-activate.jpg.md) + 4. Follow the on-screen instructions to provide any additional details or documentation required for activation. + + + + . + + + + + +### Documents and Details Required + + 1. In case of sales of tangible products, Import/Export code is required. + 2. If you have past international transaction experience, the following documents are accepted: + - Bank statement for inward remittance. + - Settlement record from the current payment partner. + + +## Disable Payments from International Debit and Credit Cards + +You can disable the **International payments** option on your account from your Dashboard. + +1. Log in to the Dashboard. +2. Navigate to **Account & Settings** → **International payments** (under Payment methods). +3. Use the toggle button to enable or disable international card payments. + ![Disable international card payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/disable-international-cards.jpg.md) diff --git a/llm-content/payments/international-payments/local-payment-methods.md b/llm-content/payments/international-payments/local-payment-methods.md new file mode 100644 index 00000000..757c7922 --- /dev/null +++ b/llm-content/payments/international-payments/local-payment-methods.md @@ -0,0 +1,99 @@ +--- +title: Local Payment Methods +description: Offer local payment methods as a payment method to customers at Razorpay Checkout. +--- + +# Local Payment Methods + +Razorpay supports the following local payment methods instruments to accept payments across different geographies and varied currencies. + +- [Giropay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/giropay.md) for German customers. +- [Sofort](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/sofort.md) for European customers. +- [Trustly](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/trustly.md) for UK and European customers. +- [POLi](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/poli.md) for Australian customers. + +You can accept international payments from customers in the form of online local payment methods using the Razorpay Checkout form. + +## Request Local Payment Method + +To request Local Payment Method, follow these steps: + +1. Log in to the Dashboard. +2. Navigate to **Account & Settings** → **International payments** (under Payment methods). +3. Click **Activate** beside **Local payment methods**. + +4. An **Instant Bank Transfers Activation** request form appears. Select the payment instrument to be enabled on your Checkout. Click **Save & Next**. + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use one or multiple payment instruments as per your needs. +> + + +5. Fill in the required details and click **Save & Next**. + + +> **INFO** +> +> +> **Handy Tips** +> - If you are an existing business, some of the required details will be auto-filled. +> - You can click the **Edit** button to fill in the incomplete details before submitting the form. +> + + + + +6. Fill in the **Management/Ownership** details in the form. When complete form details are filled, click **Submit form** button. + + + +7. After the form is submitted, the request is sent to activate the selected payment instruments. The feature enablement request goes to our banking partners and will take 15 - 20 business days to be approved. + + +After the payment instrument is enabled, you will see the **Activated** status beside the selected one. + +## Frequently Asked Questions (FAQs) + + +### 1. Am I eligible for this feature? + + All international-enabled businesses will have this feature on the Dashboard. + + + +### 2. What are the alternative payment methods available via Razorpay? + + Razorpay already supports PayPal, and has now launched POLi for Australians, Trustly for the UK and Europeans, Sofort for Europeans and Giropay for German customers. + + + +### 3. What are the prices for Alternative Payment Methods? + + You will be charged 3.0% Platform fee for accepting payments via the **Local Payment Methods**. + + + +### 4. Why is my request rejected? + + The request can be rejected due to multiple reasons: + - Risky business category: The respective payment method (lets say, Trustly) is not comfortable with your business model. + - Incorrect account details: The banking partner rejects your request if you have provided any incorrect information at the time of your application. + - Outdated website: The customer-facing website is thoroughly checked by our banking partners. The banking partner can reject your request if the website is not updated or has a limited information, including details such as **Terms & Conditions**, **Delivery timelines**, **Refund & Cancellation** policies and so on. + + + +### 5. Is this feature available on all Razorpay integrations? + + We will give early access to sellers on Razorpay Standard Checkout. The feature will be rolled out to custom and server-to-server (s2s) integration in the upcoming sprints. + + + +### 6. How much time will it take for my request to get approved? + + + The feature enablement request goes to our banking partners and will take 15 - 20 business days to be approved. diff --git a/llm-content/payments/international-payments/outward-remittances.md b/llm-content/payments/international-payments/outward-remittances.md new file mode 100644 index 00000000..70f7dbb7 --- /dev/null +++ b/llm-content/payments/international-payments/outward-remittances.md @@ -0,0 +1,134 @@ +--- +title: Outward Remittances for Education and Travel Payments +description: Enable customers to make international payments for education and travel while adhering to RBI's Liberalised Remittance Scheme guidelines. +--- + +# Outward Remittances for Education and Travel Payments + +Make travel (flight and hotel bookings) and education-related international payments hassle-free for your customers with Razorpay's Outward Remittance solution. Your customers can easily make payments using their preferred payment methods, such as Netbanking, Debit Card, and UPI, while adhering to RBI's Liberalised Remittance Scheme guidelines. + +## What is a Liberalised Remittance Scheme + +Under the Liberalised Remittance Scheme (LRS), all Indian **individuals** can remit up to **USD 2,50,000** per financial year to any current or capital account transaction towards study abroad, family maintenance, business/leisure travel, or foreign investments. + +- There are no restrictions on the frequency of remittances. However, the total amount of foreign exchange purchased from or remitted through all sources in India during a financial year should be within the cumulative limit of **USD 2,50,000**. +- The scheme enlists authorised dealers such as banks to facilitate foreign exchange between resident Indians and their beneficiaries abroad, using PAN card verification. +- This scheme is not available to corporates, partnership firms, HUF, or Charitable Trusts. + +## Advantages + + + - As an international business, you need not open an Indian entity to accept payments. + - Enable customers to make payments using local payment methods such Netbanking, Debit Card, and UPI. + - Easily integrate Razorpay Standard Checkout with your website to start accepting payments. + - Higher success rates. + - Real-time status for tracking remittance. + + + - Fully digital payment remittance solution. + - Customers do not need to visit banks physically to remit money. + - Reduces the remittance process from weeks to seconds. + + +## Use Cases + +The following businesses can use our Outward Remittance solutions to provide a seamless international payment experience to their customers: + +- Education + - Education consultants and remittance service platforms that enable Indian students to pay their foreign university admission payments and tuition fees. + - Foreign universities that want to collect payment from Indian students through local payment modes such as netbanking and UPI. + + Example: A student can easily pay tuition fees for university admission in the USA using this solution. + +- Travel + Online travel agencies and destination management companies that Indian travellers work with to book hotel and flight packages for international destinations. + + Example: If you want to book a hotel in Dubai for a vacation, you can use this solution to make payments. + +## How it Works + +Given below is the payment flow on Razorpay Standard Checkout: + +1. The customer clicks the **Pay** button to open Razorpay Checkout. + +> **INFO** +> +> +> **Handy Tips** +> +> - If a student is trying to pay their international university fees, which will be debited from their father’s account, then the father's PAN is needed. +> - Always enter the Payer's PAN information. +> + +2. They enter their contact details and click Proceed. + ![LRS contact details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-lrs-contact-details-new.jpg.md) +3. They provide relevant information and click **Proceed**: + - For Education-related Payment, the customer must provide: + 1. Payer information (PAN) and select the purpose of payment. + ![LRS Student Information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-lrs-student-details-new.jpg.md) + 2. Scanned copies of Passport (front and back), Admission Letter and Loan Sanction Letter. + ![LRS Documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-lrs-document-upload-new.jpg.md) +4. Customer selects the preferred payment method and completes the payment. + +> **WARN** +> +> +> **Watch Out!** +> +> - The transaction is subject to approval from our AD bank partner as per LRS guidelines. +> - In case LRS checks fail, Razorpay will initiate the refund. +> + +## FAQs + + +### 1. What is Outward Remittance? + + Outward remittance is the money transfer process from India to any foreign country for studying or traveling. + + + +### 2. What is Liberalised Remittance Scheme? + + According to RBI's Liberalised Remittance Scheme, all Indian individuals can freely remit up to USD 2,50,000 per financial year to any current or capital account transaction towards foreign education, family maintenance, business/leisure travel, or foreign investments. + + + +### 3. What is TCS? + + TCS stands for Tax Collected at Source. This tax can be collected in outward remittances when you send money abroad. Sending money does not necessarily mean sending it to a person. It could even mean travelling abroad, buying assets (shopping included), and investing abroad. + + + +### 4. What is the TCS limit for outward remittances? + + The TCS limit for foreign remittances in India is currently set at 5% for all foreign remittances exceeding ₹7 lakhs in a financial year (April-March). Suppose an individual sends foreign remittances of ₹7 lakhs or more in a financial year. In that case, the bank or authorised dealer will deduct 5% of the remittance amount as TCS before transferring. + + + +### 5. What is the new TCS rule in 2023? + + The Budget 2023 increased TCS for foreign remittances under LRS from 5% to 20%. This will apply to foreign trips, sending money abroad, and other remittances except for education and medical purposes. This new rule will come into effect from 1 July 2023.‍ + + + +### 6. Can we claim a TCS refund in ITR? + + Yes, you can claim a TCS refund in your Income Tax Return if you have paid more TCS than your actual tax liability. To claim the TCS refund, you must fill out relevant sections in the ITR form and provide supporting documentation. TCS is first offset against your total tax liability, and only the excess TCS amount can be claimed as a refund. Consulting a tax professional or a qualified chartered accountant is advisable if you need clarification or want to know more about claiming a TCS refund in your ITR. + + + +### 7. What is LRS Check? + + LRS Check validates the LRS guidelines by the AD bank for a given transaction. + + + +### 8. What is the TAT for this payment? + + The TAT for outward remittances is 48 hours or T+2 working days. + + +## Next Steps + +- [Integrate Outward Remittances - Education and Travel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/education.md). diff --git a/llm-content/payments/international-payments/outward-remittances/custom-integration.md b/llm-content/payments/international-payments/outward-remittances/custom-integration.md new file mode 100644 index 00000000..434d9171 --- /dev/null +++ b/llm-content/payments/international-payments/outward-remittances/custom-integration.md @@ -0,0 +1,36 @@ +--- +title: Integrate With Outward Remittance LRS Flow APIs - Custom Integration +description: Steps to integrate with Outward Remittance LRS Flow APIs for a seamless international payments solution for education and travel with custom integration. +--- + +# Integrate With Outward Remittance LRS Flow APIs - Custom Integration + +Make travel (flight and hotel bookings) and education-related international payments hassle-free for your customers with Razorpay's Outward Remittance solution. Your customers can easily make payments using their preferred payment methods, such as Netbanking, Debit Card, and UPI, while adhering to RBI's Liberalised Remittance Scheme (LRS) guidelines. + +For more details on Order and Payment state for LRS, see [Order and Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/education.md#order-and-payments-states). + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Integration Steps + +Follow these integration steps: + +1. [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/custom-integration/build-integration.md) +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/custom-integration/test-integration.md) +3. [Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/custom-integration/go-live-checklist.md) + +### Related Information + +[Outward Remittances](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances.md) diff --git a/llm-content/payments/international-payments/outward-remittances/custom-integration/build-integration.md b/llm-content/payments/international-payments/outward-remittances/custom-integration/build-integration.md new file mode 100644 index 00000000..9b15e741 --- /dev/null +++ b/llm-content/payments/international-payments/outward-remittances/custom-integration/build-integration.md @@ -0,0 +1,918 @@ +--- +title: 1. Build Integration +description: Steps to integrate with Outward Remittance LRS Flow APIs for a seamless international payments solution for education and travel with custom integration. +--- + +# 1. Build Integration + +Follow these steps to integrate with the Outward Remittance LRS Flow APIs. + +**1.1** [Fetch Forex Rates](#11-fetch-forex-rates) + +**1.2** [Create an Order](#12-create-an-order) + +**1.3** [Collect Documents](#13-collect-documents) + +**1.4** [Invoke Checkout and Pass Order Id and Other Options to it](#14-invoke-checkout-and-pass-order-id-and) + + **1.4.1** [Include JavaScript code in your Webpage](#141-include-javascript-code-in-your-webpage) + + **1.4.2** [Instantiate Custom Checkout](#142-instantiate-custom-checkout) + + **1.4.3** [Submit Payment Details](#143-submit-payment-details) + +**1.5** [Store Fields in Your Server](#15-store-fields-in-your-server) + +**1.6** [Verify Payment Signature](#16-verify-payment-signature) + +**1.7** [Verify Payment Status](#17-verify-payment-status) + +## 1.1 Fetch Forex Rates + +Use the following API to fetch the real-time conversion rate Razorpay will charge to facilitate the transaction. This includes additional charges within the LRS flow. + +/forex_charges + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET 'https://api.razorpay.com/v1/forex_charges?amount=1000&base_currency=USD&conversion_currency=INR +-H "Authorization: Bearer " +``` + +```json: Success +{ + "amount": 1000, + "base_currency": "USD", + "converted_amount": 83000, + "conversion_currency": "INR", + "expiry_time": 1590604500, + "fee": [ + { + "type": "bank", + "amount": "100" + }, + { + "type": "miscellaneous", + "amount": "100" + } + ], + "taxes": [ + { + "type": "tcs", + "amount": "1000" + }, + { + "type": "gst", + "amount": "1000" + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The id provided does not exist", + "source": "business", + "reason": "input_validation_failed", + "step": "NA", + "metadata": {}, + "field": "beneficiary_id" + } +} + +``` + + +### Query Parameters + +`amount` _mandatory_ +: `integer` The amount which needs to be converted in currency subunits. For example, for an amount of ₹295.00, enter 29500. + +`base_currency` _mandatory_ +: `string` Currency ISO code for the given amount. The default length is 3 characters. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`conversion_currency` _mandatory_ +: `string` ISO code for the currency to which the given amount should be converted, specified in currency subunits. If left blank, the conversion amount is provided for all supported currencies as a list. Otherwise, provides the conversion amount only for the requested currency. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + + +### Response Parameters + +`amount` +: `string` The amount which needs to be converted in currency subunits. + +`base_currency` +: `string` Currency ISO code for the given amount. + +`converted_amount` +: `string` Converted amount in the requested currency. + +`conversion_currency` +: `string` ISO code for the currency to which the given amount should be converted, specified in currency subunits. + +`expiry_time` +: `integer` Unix timestamp at which the conversion rate will expire. + +`fee` +: `integer` Fee charged by the bank. + + `type` + : `string` Type of identity information collected. Possible value is `bank`. + + `amount` + : `string` The amount which needs to be converted in currency subunits. + +`taxes` +: `integer` Taxes collected for the remittance. + + `type` + : `string` Type of identity information collected. Possible value is `tcs`. + + `amount` + : `string` The amount which needs to be converted in currency subunits. + + + +### Error Response Parameters + +Error | Cause | Solution +--- +`` is missing. | A mandatory field is missing. | Ensure all mandatory fields and values are present. + + + +## 1.2 Create an Order + +Create an order using the following API and send additional information such as customer details, identity and bank account details. + +### Prerequisites + +- The Bank Account of the Payer/Remitter is mandatory as TPV (Third Party Validation) needs to be done. +- You must provide the PAN details of the payer (PAN number of the payer from whose bank account the amount will be debited). +- Debit Card TPV is mandatory. +- Partial payments are not permitted. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "customer_details": { + "name": "Gaurav Kumar", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "identity": [ + { + "type": "tax_id", + "id": "AVOJB1111K" + } + ] + }, + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +``` + +```json: Success +{ + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The id provided does not exist", + "source": "business", + "reason": "input_validation_failed", + "step": "NA", + "metadata": {}, + "field": "beneficiary_id" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount for which the order is created, in currency subunits. For example, for an amount of , enter `29500`. Payment can only be made for this amount against the Order. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Can have a maximum length of 40 characters and has to be unique. + +`customer_details` _mandatory_ +: `json_object` Contains the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. Alphanumeric, with period (.), apostrophe (') and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + + `email` _mandatory_ + : `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `identity` _mandatory_ + : `array` Collect identity-related information from the customer. + + +> **WARN** +> +> +> **Watch Out!** +> +> This field is mandatory for all businesses using LRS, as we must collect PAN information to obtain TCS rates from the bank associated with that PAN. +> + + + `type` _mandatory_ + : `string` Type of identity information collected. Possible value is `tax_id`. + + `id` _mandatory_ + : `string` Unique identifier of the identity type. For example, for tax_id, the id is PAN Number, say, `AVOJB1111K`. + +`bank_account` +: `json_object` Details of the bank account to be passed in the request. Required if the method is `emandate`. + + `account_number` _mandatory_ + : `string` Bank account number used to initiate the payment. + + `ifsc` _mandatory_ + : `string` IFSC of the bank used to initiate the payment. + + `name` _mandatory_ + : `string` Name associated with the bank account used to initiate the payment. + +`notes` _optional_ +: `json object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + +`amount_due` +: `integer` The amount pending against the order. + +`amount_paid` +: `integer` The amount paid against the order. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` The unique identifier of the order. + +`notes` +: `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`offer_id` +: `string` The unique identifier of the offer. For example, `offer_JHD834hjbxzhd38d`. + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted. + - `attempted`: An order changes to the `attempted` state following the first payment attempt and remains in this state until at least one payment is successfully processed and captured. + - `paid`: After successfully capturing the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to this state. + The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + +Error | Cause | Solution +--- +`` is missing. | A mandatory field is missing. | Ensure all mandatory fields and values are present. +--- +The beneficiary id provided does not exist. | The beneficiary id provided is incorrect. | Use the correct `beneficiary_id`. +--- +The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. +--- +The amount must be at least INR 1.00. | The amount specified is less than the minimum amount. Currency subunits, such as paise (in the case of INR), should always be greater than 100. | Enter an amount equal to or greater than the minimum amount, that is 100. +--- +The **field name** is required. | A mandatory field is missing. | Ensure all mandatory fields and values are present. + + + +## 1.3 Collect Documents + +Collect the necessary documents in the LRS flow to facilitate the processing and settlement of payments by our AD Partner Bank. + +/order/:id/documents + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST 'https://api.razorpay.com/v1/order/:id/documents' \ +-H "Content-Type: multipart/form-data" \ +-F 'purpose=lrs_education' \ +-F 'file=@/Users/your_name/sample_uploaded.jpeg' \ +-F 'document_type=passport_front' \ +``` + +```json: Success +{ + "id": "doc_EsyWjHrfzb59Re", + "entity": "document", + "purpose": "lrs_education", + "name": "doc_19_12_2020.jpg", + "mime_type": "image/png", + "size": 2863, + "created_at": 1590604200 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The id provided does not exist", + "source": "business", + "reason": "input_validation_failed", + "step": "NA", + "metadata": {}, + "field": "order_id" + } +} + +``` + + +### Request Parameters + +`document_type` _mandatory_ +: `string` Type of document corresponding to the flow of LRS, that is Education or Travel. For example, it is `admission_letter` when the student’s admission letter is uploaded. Possible values: + - `admission_letter` + - `passport_front` + - `passport_back` + - `loan_sanction_letter` + - `booking_invoice` + +`purpose` _mandatory_ +: `string` The reason you are uploading this document. Possible values: + - `lrs_education` + - `lrs_travel` + + + +### Response Parameters + +`id` +: `string` The unique identifier of the document. + +`entity` +: `string` Name of the entity. Here, it is `document`. + +`purpose` +: `string` The reason you are uploading this document. Here, it is `lrs_education`. Possible values: + - `lrs_education` + - `lrs_travel` + +`size` +: `integer` Indicates the size of the document in bytes. + +`mime_type` +: `string` Indicates the nature and format in which the document is uploaded. Possible values include: + - `image/jpg` + - `image/jpeg` + - `image/png` + - `application/pdf` + +`created_at` +: `integer` Unix timestamp at which the document was uploaded. + + + +### Error Response Parameters + +Error | Cause | Solution +--- +`` is missing. | A mandatory field is missing. | Ensure all mandatory fields and values are present. +--- +The id provided does not exist. | The Order id provided is incorrect. | Use the correct `order_id`. + + + +## 1.4 Invoke Checkout and Pass Order Id and Other Options to it + +### 1.4.1 Include JavaScript code in your Webpage + +Include the following script, preferably in the `` section of your page: + +```html: Index HTML + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Include the script from `https://checkout.razorpay.com/v1/razorpay.js` instead of serving a copy from your server. This allows the library's new updates and bug fixes to fit your application automatically. +> - We always maintain backward compatibility with our code. +> + +### 1.4.2 Instantiate Custom Checkout + +#### Single Instance on a Page + +```js: Invoke a Single Instance +var razorpay = new Razorpay({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}); +``` + +#### Multiple Instances on Same Page + +If you need multiple Razorpay instances on the same page, you can globally set some of the options: + +```js: Invoke Multiple Instances +Razorpay.configure({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}) +new Razorpay({}); // will inherit key and image from above. +``` + +#### Checkout Options + +While building a custom UI for accepting payments from your customers, you should be familiar with the fields supported in the `razorpay.js` script. + +`key` _mandatory_ +: `string` API Key ID generated from **Dashboard** → **Account & Settings** → [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `10000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. For example, `INR`. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`description` _optional_ +: `string` Description of the product shown in the Checkout form. It must start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown in the Checkout form. Can also be a **base64** string, if loading the image from a network is not desirable. + +`order_id` _mandatory_ +: `string` Order ID generated via the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`method` _mandatory_ +: `string` The payment method used by the customer on Checkout. +Possible values: + - `card` (default) + - `upi` (default) + - `netbanking` (default) + - `wallet` (default) + - `emi` (default) + - `cardless_emi` (requires [approval](https://razorpay.com/support/#request)) + - `paylater` (requires [approval](https://razorpay.com/support/#request)) + - `emandate` (requires [approval](https://razorpay.com/support/#request)) + +`card` _mandatory if method=card/emi_ +: `object` The details of the card that should be entered while making the payment. + + `number` + : `integer` Unformatted card number. + + `name` + : `string` The name of the cardholder. + + `expiry_month` + : `integer` Expiry month for card in MM format. + + `expiry_year` + : `integer` Expiry year for card in YY format. + + `cvv` + : `integer` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `emi_duration` + : `integer` Defines the number of months in the EMI plan. + +`bank_account` _mandatory if method=emandate_ +: The details of the bank account that should be passed in the request. These details include bank account number, IFSC code and the name of the customer associated with the bank account. + + `account_number` + : `string` Bank account number used to initiate the payment. + + `ifsc` + : `string` IFSC of the bank used to initiate the payment. + + `name` + : `string` Name associated with the bank account used to initiate the payment. + +`bank` _mandatory if method=netbanking_ +: `string` Bank code. List of available banks enabled for your account can be fetched via [**methods**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#fetch-supported-methods). + +`wallet` _mandatory if method=wallet_ +: `string` Wallet code for the wallet used for the payment. Possible values: + - `payzapp` (default) + - `olamoney` (requires [approval](https://razorpay.com/support/#request)) + - `phonepe` (requires [approval](https://razorpay.com/support/#request)) + - `airtelmoney` (requires [approval](https://razorpay.com/support/#request)) + - `mobikwik` (requires [approval](https://razorpay.com/support/#request)) + - `jiomoney` (requires [approval](https://razorpay.com/support/#request)) + - `amazonpay` (requires [approval](https://razorpay.com/support/#request)) + - `paypal` (requires [approval](https://razorpay.com/support/#request)) + - `phonepeswitch` (requires [approval](https://razorpay.com/support/#request)) + +`provider` _mandatory if method=cardless_emi/paylater_ +: `string` Name of the cardless EMI provider partnered with Razorpay. + + Available options for Cardless EMI (requires [approval](https://razorpay.com/support/#request)): + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `zestmoney` + - `earlysalary` + - `walnut369` + + Available options for Pay Later: + - `lazypay` + - `paypal` + +`vpa` _mandatory if method=upi_ +: `string` UPI ID used for making the payment on the UPI app. + + +> **WARN** +> +> +> **Deprecation Notice** +> +> UPI Collect is deprecated effective 28 February 2026. This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [ migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md) to switch to UPI Intent. +> + +`callback_url` _optional_ +: `string` The URL to which the customer must be redirected upon completion of payment. The URL must accept incoming `POST` requests. The callback URL will have `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` as the request parameters for a successful payment. + +`redirect` _conditionally mandatory_ +: `boolean` Determines whether customer should be redirected to the URL mentioned in the +`callback_url` parameter. This is mandatory if `callback_url` parameter is used. Possible values: + - `true`: Customer will be redirected to the `callback_url`. + - `false`: Customer will not be redirected to the `callback_url` + +### 1.4.3 Submit Payment Details + +After creating an order and obtaining the customer's payment details, send the information to Razorpay to complete the payment. The data that needs to be submitted depends on the customer's payment method. You can do this by invoking `createPayment` method. + +Know more about [sample codes for various payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md). + +```js: createPayment with handler function +var data = { + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR",// Default is INR. We support more than 90 currencies. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + "payment_reason": "Tuition Fee", + }, + order_id: 'order_CuEzONfnOI86Ab',// Replace with Order ID generated in Step 2 + method: 'netbanking', + + // method specific fields + bank: 'HDFC' +}; + +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on('payment.success', function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + + razorpay.on('payment.error', function(resp){alert(resp.error.description)}); // will pass error object to error handler + +}) + +```js: createPayment with callback URL +var data = { + callback_url: 'https://www.examplecallbackurl.com/', + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR",// Default is INR. We support more than 90 currencies. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_CuEzONfnOI86Ab',// Replace with Order ID generated in Step 2 + method: 'netbanking', + + // method specific fields + bank: 'HDFC' +}; + +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + +}) +``` + +> **WARN** +> +> +> +> **Watch Out!** +> +> The `createPayment` method should be called within an event listener triggered by user action to prevent the popup from being blocked. For example: +> + +> ```js +> $('button').click( function (){ razorpay.createPayment(...) }) +> ``` +> + +> **INFO** +> +> +> +> **Handy Tips** +> +> - **Handler Function** +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL** +> +When you use a callback URL, Razorpay makes a post call to the callback URL, with the `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` in the response object of the successful payment (`razorpay_payment_id` and `razorpay_order_id`). +> + +## 1.5 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + +### Failure Response + +A failed payment returns an error response. + +```json: Sample Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect otp", + "field": null, + "source": "customer", + "step": "payment_authentication", + "reason": "invalid_otp", + "metadata": { + "payment_id": "pay_EDNBKIP31Y4jl8", + "order_id": "order_DBJKIP31Y4jl8" + } + } +} +``` + +Know more about [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md). + + +## 1.6 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +## 1.7 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/custom-integration/test-integration.md) diff --git a/llm-content/payments/international-payments/outward-remittances/custom-integration/go-live-checklist.md b/llm-content/payments/international-payments/outward-remittances/custom-integration/go-live-checklist.md new file mode 100644 index 00000000..db6edc7c --- /dev/null +++ b/llm-content/payments/international-payments/outward-remittances/custom-integration/go-live-checklist.md @@ -0,0 +1,75 @@ +--- +title: 3. Go-live Checklist +description: Start accepting Live Payments through Razorpay Payment Gateway. +--- + +# 3. Go-live Checklist + +Consider these steps before taking the integration live. + +## Accept Live Payments + +Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + +## Payment Capture + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + +### How to Capture Payments + +- **Auto-capture payments (recommended)** + +Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Dashboard. + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + +Know more about [Capture Settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + +## Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/international-payments/outward-remittances/custom-integration/test-integration.md b/llm-content/payments/international-payments/outward-remittances/custom-integration/test-integration.md new file mode 100644 index 00000000..1b241492 --- /dev/null +++ b/llm-content/payments/international-payments/outward-remittances/custom-integration/test-integration.md @@ -0,0 +1,54 @@ +--- +title: 2. Test Integration +description: Steps to test if the integration was successful. +--- + +# 2. Test Integration + +You can make test payments using one of the payment methods configured at the Checkout. + +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API Keys generated in the Test Mode in the Checkout code. + +## Netbanking + +You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + +## UPI + +You can enter one of the following UPI IDs: + +- `success@razorpay`: To make the payment successful. +- `failure@razorpay`: To fail the payment. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + +## Wallet + +You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + +## Cards + +You can use one of the test cards to make transactions in the Test Mode. Use any valid expiration date in the future and any random CVV to create a successful payment. + +Card Network | Domestic / International | Card Number +--- +Mastercard | Domestic | 5267 3181 8797 5449 +--- +Visa | Domestic | 4386 2894 0766 0153 +--- +Mastercard | International | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 +--- +Visa | International | 4012 8888 8888 1881 + +## Next Steps + +[Step 3: Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/custom-integration/go-live-checklist.md) diff --git a/llm-content/payments/international-payments/outward-remittances/education.md b/llm-content/payments/international-payments/outward-remittances/education.md new file mode 100644 index 00000000..1a18a707 --- /dev/null +++ b/llm-content/payments/international-payments/outward-remittances/education.md @@ -0,0 +1,101 @@ +--- +title: Outward Remittances - Education and Travel +description: Customers can make international payments for their foreign university admission, tuition, hostel fees and travel payments with our Outward Remittance solution. +--- + +# Outward Remittances - Education and Travel + +You can enable your customers to make payments to foreign universities towards fees payments such as admission, application, hostel, tuition, and travel (flight and hotel bookings) with our Outward Remittance solution. + +## Order and Payments States + +### Order States +Given below are the order states that an Outward Remittances transaction assumes: + +State | Description +--- +Created | When a new order is created, it is in the created state. It stays in this state until payment is attempted. +--- +Attempted | An order moves from created to attempted state when payment is first attempted on it. It remains in the attempted state until a payment associated with that order is captured. +--- +Paid | After successfully capturing the payment, the order moves to the paid state. No further payment requests are allowed once the order moves to the paid state. The order continues to be in the paid state even if the payment associated with the order is refunded. + +## Payment States +Given below are the payment states that an Outward Remittances transaction assumes: + +State | Description +--- +Created | When the customer initiates the payment, the payment_id is generated. +--- +Authorized | The payment moves from created to authorized once Razorpay receives success response from the gateway and the LRS check is pending. +--- +Captured | The payment moves to the Captured state when we receive confirmation on LRS check success from our AD banking partner. +--- +Refunded | The payment acquires this state when the refund request is initiated, or the LRS check has failed. +--- +Failed | The payment acquires this state when it fails. + +Given below is a diagram representing the relationship between order and payment states. + +![Order and Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/lrs-order-payment-states.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> Manual capture of payments is not allowed, as the payment cannot be captured until our banking partner completes an LRS check, which typically takes a minimum of 30 minutes. Payment will only be captured following the successful completion of the LRS check. +> + +## Refunds and Settlements + +### Refunds + +- You should maintain a separate refund balance in order for Razorpay to process any refund or chargeback. +- In case the refund or chargeback balance is insufficient, Razorpay fails the request. You should recharge the account for the refund to get processed. + +### Settlements + +The payment settlement will take T+2 working days (where T is the day of the transaction after which the payment is Captured.) + +> **WARN** +> +> +> +> **Watch Out!** +> +> Instant Settlements are not applicable for Outward Remittance transactions. +> + +## Integration Steps + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +After this feature is enabled for your Razorpay account, you can accept payments using: + +### Razorpay Standard Checkout + +Integrate with [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation.md#integration-flow). No additional integration is required for Outward Remittances. + +> **WARN** +> +> +> +> **Watch Out!** +> +> - Third-Party Validation (TPV) is mandatory for all LRS transactions. +> - Under this flow, capture of payments or auto-capture is not allowed. It is disabled by default. +> +> diff --git a/llm-content/payments/international-payments/outward-remittances/s2s-integration.md b/llm-content/payments/international-payments/outward-remittances/s2s-integration.md new file mode 100644 index 00000000..5b3f61d7 --- /dev/null +++ b/llm-content/payments/international-payments/outward-remittances/s2s-integration.md @@ -0,0 +1,37 @@ +--- +title: Integrate With Outward Remittance LRS Flow APIs - S2S Integration (Beta) +heading: Integrate With Outward Remittance LRS Flow APIs - S2S Integration +description: Steps to integrate with Outward Remittance LRS Flow APIs for a seamless international payments solution for education and travel. +--- + +# Integrate With Outward Remittance LRS Flow APIs - S2S Integration + +Make travel (flight and hotel bookings) and education-related international payments hassle-free for your customers with Razorpay's Outward Remittance solution. Your customers can easily make payments using their preferred payment methods, such as Netbanking, Debit Card and UPI while adhering to RBI's Liberalised Remittance Scheme (LRS) guidelines. + +For more details on Order and Payment state for LRS, see [Order and Payments States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/education.md#order-and-payments-states). + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Integration Steps + +Follow these integration steps: + +1. [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/s2s-integration/build-integration.md) +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/s2s-integration/test-integration.md) +3. [Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/s2s-integration/go-live-checklist.md) + +### Related Information + +- [Outward Remittances](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances.md) diff --git a/llm-content/payments/international-payments/outward-remittances/s2s-integration/build-integration.md b/llm-content/payments/international-payments/outward-remittances/s2s-integration/build-integration.md new file mode 100644 index 00000000..0ab3341c --- /dev/null +++ b/llm-content/payments/international-payments/outward-remittances/s2s-integration/build-integration.md @@ -0,0 +1,781 @@ +--- +title: 1. Build Integration +description: Steps to integrate with Outward Remittance LRS Flow APIs for a seamless international payments solution for education and travel. +--- + +# 1. Build Integration + +Follow these steps to integrate with the Outward Remittance LRS Flow APIs. + +**1.1** [Fetch Forex Rates](#11-fetch-forex-rates) + +**1.2** [Create an Order](#12-create-an-order) + +**1.3** [Collect Documents](#13-collect-documents) + +**1.4** [Create a Payment](#14-create-a-payment) + +**1.5** [Handle Payment Success and Error Events](#15-handle-payment-success-and-error-events) + +**1.6** [Verify Payment Signature](#16-verify-payment-signature) + +**1.7** [Verify Payment Status](#17-verify-payment-status) + +## 1.1 Fetch Forex Rates + +Use the following API to fetch the real-time conversion rate Razorpay will charge to facilitate the transaction. This includes additional charges within the LRS flow. + +/forex_charges + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET 'https://api.razorpay.com/v1/forex_charges?amount=1000&base_currency=USD&conversion_currency=INR +-H "Authorization: Bearer " +``` + +```json: Success +{ + "amount": 1000, + "base_currency": "USD", + "converted_amount": 83000, + "conversion_currency": "INR", + "expiry_time": 1590604500, + "fee": [ + { + "type": "bank", + "amount": "100" + }, + { + "type": "miscellaneous", + "amount": "100" + } + ], + "taxes": [ + { + "type": "tcs", + "amount": "1000" + }, + { + "type": "gst", + "amount": "1000" + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The id provided does not exist", + "source": "business", + "reason": "input_validation_failed", + "step": "NA", + "metadata": {}, + "field": "beneficiary_id" + } +} + +``` + + +### Query Parameters + +`amount` _mandatory_ +: `integer` The amount which needs to be converted in currency subunits. For example, for an amount of ₹295.00, enter 29500. + +`base_currency` _mandatory_ +: `string` Currency ISO code for the given amount. The default length is 3 characters. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`conversion_currency` _mandatory_ +: `string` ISO code for the currency to which the given amount should be converted, specified in currency subunits. If left blank, the conversion amount is provided for all supported currencies as a list. Otherwise, provides the conversion amount only for the requested currency. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + + +### Response Parameters + +`amount` +: `string` The amount which needs to be converted in currency subunits. + +`base_currency` +: `string` Currency ISO code for the given amount. + +`converted_amount` +: `string` Converted amount in the requested currency. + +`conversion_currency` +: `string` ISO code for the currency to which the given amount should be converted, specified in currency subunits. + +`expiry_time` +: `integer` Unix timestamp at which the conversion rate will expire. + +`fee` +: `integer` Fee charged by the bank. + + `type` + : `string` Type of identity information collected. Possible value is `bank`. + + `amount` + : `string` The amount which needs to be converted in currency subunits. + +`taxes` +: `integer` Taxes collected for the remittance. + + `type` + : `string` Type of identity information collected. Possible value is `tcs`. + + `amount` + : `string` The amount which needs to be converted in currency subunits. + + + +### Error Response Parameters + +Error | Cause | Solution +--- +`` is missing. | A mandatory field is missing. | Ensure all mandatory fields and values are present. + + + +## 1.2 Create an Order + +Create an order using the following API and send additional information such as customer details, identity and bank account details. + +### Prerequisites + +- The Bank Account of the Payer/Remitter is mandatory as TPV (Third Party Validation) needs to be done. +- You are required to provided the PAN details of the payer (PAN number of the payer from whose bank account the amount will be debited). +- Debit Card TPV is mandatory. +- Partial payments are not permitted. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "customer_details": { + "name": "Gaurav Kumar", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "identity": [ + { + "type": "tax_id", + "id": "AVOJB1111K" + } + ] + }, + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +``` + +```json: Success +{ + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The id provided does not exist", + "source": "business", + "reason": "input_validation_failed", + "step": "NA", + "metadata": {}, + "field": "beneficiary_id" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount for which the order is created, in currency subunits. For example, for an amount of , enter `29500`. Payment can only be made for this amount against the Order. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Can have a maximum length of 40 characters and has to be unique. + +`customer_details` _mandatory_ +: `json_object` Contains the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. Alphanumeric, with period (.), apostrophe (') and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + + `email` _mandatory_ + : `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `identity` _mandatory_ + : `array` Collect identity-related information from the customer. + + +> **WARN** +> +> +> **Watch Out!** +> +> This field is mandatory for all businesses using LRS, as we must collect PAN information to obtain TCS rates from the bank associated with that PAN. +> + + + `type` _mandatory_ + : `string` Type of identity information collected. Possible value is `tax_id`. + + `id` _mandatory_ + : `string` Unique identifier of the identity type. For example, for tax_id, the id is PAN Number, say, `AVOJB1111K`. + +`bank_account` +: `json_object` Details of the bank account to be passed in the request. Required if the method is `emandate`. + + `account_number` _mandatory_ + : `string` Bank account number used to initiate the payment. + + `ifsc` _mandatory_ + : `string` IFSC of the bank used to initiate the payment. + + `name` _mandatory_ + : `string` Name associated with the bank account used to initiate the payment. + +`notes` _optional_ +: `json object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + +`amount_due` +: `integer` The amount pending against the order. + +`amount_paid` +: `integer` The amount paid against the order. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`id` +: `string` The unique identifier of the order. + +`notes` +: `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`offer_id` +: `string` The unique identifier of the offer. For example, `offer_JHD834hjbxzhd38d`. + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order changes to the `attempted` state following the first payment attempt and remains in this state until at least one payment is successfully processed and captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to this state. + The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + +Error | Cause | Solution +--- +`` is missing. | A mandatory field is missing. | Ensure all mandatory fields and values are present. +--- +The beneficiary id provided does not exist. | The beneficiary id provided is incorrect. | Use the correct `beneficiary_id`. +--- +The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. +--- +The amount must be at least INR 1.00. | The amount specified is less than the minimum amount. Currency subunits, such as paise (in the case of INR), should always be greater than 100. | Enter an amount equal to or greater than the minimum amount, that is 100. +--- +The **field name** is required. | A mandatory field is missing. | Ensure all mandatory fields and values are present. + + + +## 1.3 Collect Documents + +Collect the necessary documents in the LRS flow to facilitate the processing and settlement of payments by our AD Partner Bank. + +/order/:id/documents + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST 'https://api.razorpay.com/v1/order/:id/documents' \ +-H "Content-Type: multipart/form-data" \ +-F 'purpose=lrs_education' \ +-F 'file=@/Users/your_name/sample_uploaded.jpeg' \ +-F 'document_type=passport_front' \ +``` + +```json: Success +{ + "id": "doc_EsyWjHrfzb59Re", + "entity": "document", + "purpose": "lrs_education", + "name": "doc_19_12_2020.jpg", + "mime_type": "image/png", + "size": 2863, + "created_at": 1590604200 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The id provided does not exist", + "source": "business", + "reason": "input_validation_failed", + "step": "NA", + "metadata": {}, + "field": "order_id" + } +} + +``` + + +### Request Parameters + +`document_type` _mandatory_ +: `string` Type of document corresponding to the flow of LRS, that is Education or Travel. For example, it is `admission_letter` when the student’s admission letter is uploaded. Possible values: + - `admission_letter` + - `passport_front` + - `passport_back` + - `loan_sanction_letter` + - `booking_invoice` + +`purpose` _mandatory_ +: `string` The reason you are uploading this document. Possible values: + - `lrs_education` + - `lrs_travel` + + + +### Response Parameters + +`id` +: `string` The unique identifier of the document. + +`entity` +: `string` Name of the entity. Here, it is `document`. + +`purpose` +: `string` The reason you are uploading this document. Here, it is `lrs_education`. Possible values: + - `lrs_education` + - `lrs_travel` + +`size` +: `integer` Indicates the size of the document in bytes. + +`mime_type` +: `string` Indicates the nature and format in which the document is uploaded. Possible values include: + - `image/jpg` + - `image/jpeg` + - `image/png` + - `application/pdf` + +`created_at` +: `integer` Unix timestamp at which the document was uploaded. + + + +### Error Response Parameters + +Error | Cause | Solution +--- +`` is missing. | A mandatory field is missing. | Ensure all mandatory fields and values are present. +--- +The id provided does not exist. | The Order id provided is incorrect. | Use the correct `order_id`. + + + +## 1.4 Create a Payment + +Create a payment using the S2S JSON Payments API. In this sample, a payment is created with the `netbanking` payment method. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure all valid documents are in place before initiating a payment. +> + +/payments/create/json + +```curl: Curl +curl -u [YOUR_KEY_id]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ + -d '{ + "amount": "1000", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "customer_id": "cust_MpINfSkdEvtdxb", + "order_id": "order_NGrgEcmYJsfUyl", + "ip": "192.168.0.103", + "method": "netbanking", + "bank": "YESB", + "notes": { + "payment_reason": "Tuition Fee", + } +}' + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson(array('amount' => 1000,'currency' => 'INR','email' => 'gaurav.kumar@example.com','contact' => '9000090000','order_id' => 'order_I6LVPRQ6upW3uh','method' => 'netbanking','bank' => 'YESB','ip' => '192.168.0.103','referer' => 'http','user_agent' => 'Mozilla/5.0','description' => 'Test payment','notes' => array('goods_description' => 'Tuition Fee'))); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createPaymentJson({ + amount: 1000, + currency: "INR", + order_id: "order_NGrgEcmYJsfUyl", + email: "gaurav.kumar@example.com", + contact: "9000090000", + method: "netbanking", + bank: "YESB", + ip: "192.168.0.103", + referer: "http", + user_agent: "Mozilla/5.0", + description: "Test payment", + notes: { + goods_description: "Tuition Fee", + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createPaymentJson({ + "amount": 1000, + "currency": "INR", + "order_id": "order_NGrgEcmYJsfUyl", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "netbanking", + "bank": "YESB", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "goods_description": "Tuition Fee", + } +}) + +```json: Response +{ + "razorpay_payment_id": "pay_Myff1gPuKp3035", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/Myff1gPuKp3035/authenticate" + } + ] +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, `INR`. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/s2s-integration/supported-currencies.md). Length must be of 3 characters. + +`email` _mandatory_ +: `string` Email address of the customer. Maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. For example, 9000090000. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order. + Know more about [Orders API](#12-create-an-order). + +`ip` _optional_ +: `string` Customer's IP address. + +`method` _mandatory_ +: `string` Name of the payment method. Possible values are: + - `card` + - `netbanking` + - `upi` + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `payment_reason` _optional_ + : `string` The reason you are making this payment. For example, `Tuition Fee`. + + + +### Response Parameters + +If the payment request is valid, the response contains the following fields. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. The value here is `redirect`. Use this URL to redirect customer to the bank page. + + `url` + : `string` URL to be used for the action indicated. + + +> **WARN** +> +> +> **Watch Out!** +> +> Refer to the [Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md) section for other payment options request parameters. +> + +## 1.5 Handle Payment Success and Error Events + +Once the payment is completed by the customer, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + +### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) for details. + +## 1.6 Verify Payment Signature +Signature verification is a mandatory step to ensure that the callback is sent by Razorpay. The `razorpay_signature` contained in the callback can be regenerated by your system and verified as follows. + +Create a string for hashing by combining the "razorpay_payment_id" from the callback and the Order id generated in the initial step, separated by a `|`. Proceed to hash this string using SHA256 alongside your API Secret. + +```js: Signature +generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + +if (generated_signature == razorpay_signature) { + payment is successful +} +``` + +### Generate Signature on your Server + + +### Sample code + +```java: Java +/** +* This class defines common routines for generating +* authentication signatures for Razorpay Webhook requests. +*/ +public class Signature +{ + private static final String HMAC_SHA256_ALGORITHM = "HmacSHA256"; + /** + * Computes RFC 2104-compliant HMAC signature. + * * @param data + * The data to be signed. + * @param key + * The signing key. + * @return + * The Base64-encoded RFC 2104-compliant HMAC signature. + * @throws + * java.security.SignatureException when signature generation fails + */ + public static String calculateRFC2104HMAC(String data, String secret) + throws java.security.SignatureException + { + String result; + try { + + // get an hmac_sha256 key from the raw secret bytes + SecretKeySpec signingKey = new SecretKeySpec(secret.getBytes(), HMAC_SHA256_ALGORITHM); + + // get an hmac_sha256 Mac instance and initialize with the signing key + Mac mac = Mac.getInstance(HMAC_SHA256_ALGORITHM); + mac.init(signingKey); + + // compute the hmac on input data bytes + byte[] rawHmac = mac.doFinal(data.getBytes()); + + // base64-encode the hmac + result = DatatypeConverter.printHexBinary(rawHmac).toLowerCase(); + + } catch (Exception e) { + throw new SignatureException("Failed to generate HMAC : " + e.getMessage()); + } + return result; + } +} + +```php: PHP +use Razorpay\Api\Api; +$api = new Api($key_id, $key_secret); +$attributes = array('razorpay_signature' => '23233', 'razorpay_payment_id' => '332' , 'razorpay_order_id' => '12122'); +$order = $api->utility->verifyPaymentSignature($attributes) + +```ruby: Ruby +require 'razorpay' +Razorpay.setup('key_id', 'key_secret') +payment_response = { + 'razorpay_order_id': '12122', + 'razorpay_payment_id': '332', + 'razorpay_signature': '23233' +} + +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET + Dictionary attributes = new Dictionary(); + + attributes.Add("razorpay_payment_id", paymentId); + attributes.Add("razorpay_order_id", Request.Form["razorpay_order_id"]); + attributes.Add("razorpay_signature", Request.Form["razorpay_signature"]); + + Utils.verifyPaymentSignature(attributes); +```nodejs: Node.js +var { validatePaymentVerification } = require('./dist/utils/razorpay-utils'); + +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); +```Go: Go +import ( + "crypto/hmac" + "crypto/sha256" + "crypto/subtle" + "encoding/hex" + "fmt" +) + +func main() { + signature := "477d1cdb3f8122a7b0963704b9bcbf294f65a03841a5f1d7a4f3ed8cd1810f9b" + secret := "qp3zKxwLZxbMORJgEVWi3Gou" + data := "order_J2AeF1ZpvfqRGH|pay_J2AfAxNHgqqBiI" + //fmt.Printf("Secret: %s Data: %s\n", secret, data) + + // Create a new HMAC by defining the hash type and the key (as byte array) + h := hmac.New(sha256.New, []byte(secret)) + + // Write Data to it + _, err := h.Write([]byte(data)) + + if err != nil { + panic(err) + } + + // Get result and encode as hexadecimal string + sha := hex.EncodeToString(h.Sum(nil)) + + fmt.Printf("Result: %s\n", sha) + + if subtle.ConstantTimeCompare([]byte(sha), []byte(signature)) == 1 { + fmt.Println("Works") + } +} +``` + + +## 1.7 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/s2s-integration/test-integration.md) diff --git a/llm-content/payments/international-payments/outward-remittances/s2s-integration/go-live-checklist.md b/llm-content/payments/international-payments/outward-remittances/s2s-integration/go-live-checklist.md new file mode 100644 index 00000000..db6edc7c --- /dev/null +++ b/llm-content/payments/international-payments/outward-remittances/s2s-integration/go-live-checklist.md @@ -0,0 +1,75 @@ +--- +title: 3. Go-live Checklist +description: Start accepting Live Payments through Razorpay Payment Gateway. +--- + +# 3. Go-live Checklist + +Consider these steps before taking the integration live. + +## Accept Live Payments + +Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + +## Payment Capture + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + +### How to Capture Payments + +- **Auto-capture payments (recommended)** + +Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Dashboard. + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + +Know more about [Capture Settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + +## Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/international-payments/outward-remittances/s2s-integration/supported-currencies.md b/llm-content/payments/international-payments/outward-remittances/s2s-integration/supported-currencies.md new file mode 100644 index 00000000..a0cda9a5 --- /dev/null +++ b/llm-content/payments/international-payments/outward-remittances/s2s-integration/supported-currencies.md @@ -0,0 +1,67 @@ +--- +title: List of Supported Currencies | Accept International Payments from India +heading: List of Supported Currencies +description: List of currencies in which international payments can be accepted from India. +--- + +# List of Supported Currencies + +Following is the list of supported currencies: + +Currency Name | Currency Code +--- +Australian dollar | AUD +--- +Bahamian dollar | BSD +--- +Brunei dollar | BND +--- +Canadian dollar | CAD +--- +Swiss franc | CHF +--- +Chinese yuan renminbi | CNY +--- +Colombian peso | COP +--- +Euro | EUR +--- +Pound sterling | GBP +--- +Ghanian Cedi | GHS +--- +Hong Kong dollar | HKD +--- +Hungarian forint | HUF +--- +Indonesian rupiah | IDR +--- +Israeli new shekel | ILS +--- +Indian rupee | INR +--- +Jamaican dollar | JMD +--- +Kenyan shilling | KES +--- +Sri Lankan rupee | LKR +--- +Moroccan dirham | MAD +--- +Mexican peso | MXN +--- +Malaysian ringgit | MYR +--- +New Zealand dollar | NZD +--- +Philippine peso | PHP +--- +Pakistani rupee | PKR +--- +Qatari riyal | QAR +--- +Saudi Arabian riyal | SAR +--- +Singapore dollar | SGD +--- +South African rand | ZAR diff --git a/llm-content/payments/international-payments/outward-remittances/s2s-integration/test-integration.md b/llm-content/payments/international-payments/outward-remittances/s2s-integration/test-integration.md new file mode 100644 index 00000000..9da1ca6b --- /dev/null +++ b/llm-content/payments/international-payments/outward-remittances/s2s-integration/test-integration.md @@ -0,0 +1,54 @@ +--- +title: 2. Test Integration +description: Steps to test if the integration was successful. +--- + +# 2. Test Integration + +You can make test payments using one of the payment methods configured at the Checkout. + +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API Keys generated in the Test Mode in the Checkout code. + +## Netbanking + +You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + +## UPI + +You can enter one of the following UPI IDs: + +- `success@razorpay`: To make the payment successful. +- `failure@razorpay`: To fail the payment. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + +## Wallet + +You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + +## Cards + +You can use one of the test cards to make transactions in the Test Mode. Use any valid expiration date in the future and any random CVV to create a successful payment. + +Card Network | Domestic / International | Card Number +--- +Mastercard | Domestic | 5267 3181 8797 5449 +--- +Visa | Domestic | 4386 2894 0766 0153 +--- +Mastercard | International | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 +--- +Visa | International | 4012 8888 8888 1881 + +## Next Steps + +[Step 3: Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/s2s-integration/go-live-checklist.md) diff --git a/llm-content/payments/international-payments/outward-remittances/standard-integration.md b/llm-content/payments/international-payments/outward-remittances/standard-integration.md new file mode 100644 index 00000000..f0a2db42 --- /dev/null +++ b/llm-content/payments/international-payments/outward-remittances/standard-integration.md @@ -0,0 +1,32 @@ +--- +title: Integrate With Outward Remittance LRS Flow APIs - Standard Integration +description: Steps to integrate with Outward Remittance LRS Flow APIs for a seamless international payments solution for education and travel. +--- + +# Integrate With Outward Remittance LRS Flow APIs - Standard Integration + +Make travel (flight and hotel bookings) and education-related international payments hassle-free for your customers with Razorpay's Outward Remittance solution. Your customers can easily make payments using their preferred payment methods, such as Netbanking, Debit Card and UPI while adhering to RBI's Liberalised Remittance Scheme (LRS) guidelines. + +For more details on Order and Payment state for LRS, see [Order and Payments States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/education.md#order-and-payments-states). + +> **INFO** +> +> +> +> **Feature Request** +> +> This is an on-demand feature. Please fill out the [form](https://form.typeform.com/to/C5OlR4YQ) to get this feature activated on your account. +> +> + +## Integration Steps + +Follow these integration steps: + +1. [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/standard-integration/build-integration.md) +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/standard-integration/test-integration.md) +3. [Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/standard-integration/go-live-checklist.md) + +### Related Information + +[Outward Remittances](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances.md) diff --git a/llm-content/payments/international-payments/outward-remittances/standard-integration/build-integration.md b/llm-content/payments/international-payments/outward-remittances/standard-integration/build-integration.md new file mode 100644 index 00000000..815863f3 --- /dev/null +++ b/llm-content/payments/international-payments/outward-remittances/standard-integration/build-integration.md @@ -0,0 +1,1357 @@ +--- +title: 1. Build Integration +description: Steps to integrate with Outward Remittance LRS Flow APIs for a seamless international payments solution for education and travel. +--- + +# 1. Build Integration + +Follow these steps to integrate the standard checkout form on your website: + +**1.1** [Create a customer in server](#11-create-a-customer-in-server). + +**1.2** [Create an order in server](#12-create-an-order-in-server). + +**1.3** [Integrate with checkout on client-side](#13-integrate-with-checkout-on-client-side). + +**1.4** [Handle payment success and failure](#14-handle-payment-success-and-failure). + +**1.5** [Store fields in server](#15-store-fields-in-your-server). + +**1.6** [Verify payment signature](#16-verify-payment-signature). + +**1.7** [Verify payment status](#17-verify-payment-status). + +## 1.1 Create a Customer in Server + +> **WARN** +> +> +> **Watch Out!** +> +> This step is `mandatory` if you are creating a customer using [Create Customer in Server API](#11-create-a-customer-in-server). This is an `optional` step if you are directly [Create an Order in Server API](#12-create-an-order-in-server) without creating a customer. +> + +Creating a customer generates a unique `customer_id` by collecting basic details such as name, email, and contact details. This `customer_id` must be included when creating a payment request to link the payment to the customer. Use the following API to create a customer. + +You can try out our APIs on the Razorpay Postman Public Workspace. Fork the workspace and test the APIs with your [Test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#test-mode-api-keys). + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-85efcb7a-1506-4539-b26e-892169fe46f8) + +/customers + +```cURL: Curl + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name","Gaurav Kumar"); +customerRequest.put("contact","+919000090000"); +customerRequest.put("email","gaurav.kumar@example.com"); +customerRequest.put("fail_existing","0"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + "name": "Gaurav Kumar", + "contact": +919000090000, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": +919000090000, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} + +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->create(array('name' => 'Gaurav Kumar', 'email' => 'gaurav.kumar@example.com','contact'=>'+919000090000','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", "Gaurav Kumar"); +options.Add("contact", "+919000090000"); +options.Add("email", "gaurav.kumar@example.com"); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "name": "Gaurav Kumar", + "contact": +919000090000, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({ + name: "Gaurav Kumar", + contact: +919000090000, + email: "gaurav.kumar@example.com", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +``` + +```json: Success +{ + "id": "cust_MpINfSkdEvtdxb", + "entity": "customer", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "gstin": null, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1697550382 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } +} +``` + + +### Request Parameters + + `name` _mandatory_ + : `string` Customer's name. + - Name must be unique. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (For example, @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (For example, aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are prohibited. + - Example: `Gaurav Kumar`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `email` _mandatory_ + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `fail_existing` _optional_ + : `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + `gstin` _optional_ + : `string` Customer's GST number, if available. + For example, `29XAbbA4369J1PA`. + + `notes` _optional_ + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` + : `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + + `entity` + : `string` Indicates the type of entity. + + `name` + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (For example, @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (For example, aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are not prohibited. + - Example: `Gaurav Kumar`. + + `contact` + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919000090000`. + + `email` + : `string` The customer's email address. A maximum length of 64 characters for the username. For example, in "gaurav.kumar@example.com", "gaurav.kumar" must not exceed 64 characters. + + `gstin` + : `string` GST number linked to the customer. + For example, `29XAbbA4369J1PA`. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `created_at` + : `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. Know how to [Generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + --- + Contact number should be at least 8 digits, including country code. | The contact number is less than 8 digits. | Enter contact number that meets the validation criteria. It should have at least 8 digits, including the country code. For example, "+919000090000". + + + +## 1.2 Create an Order in Server + +After a customer is created, an order needs to be generated using the Orders API. This order contains details such as the payment amount, currency, customer details and other custom notes. After the order is created, an `order_id` is generated, for example, `order_NGrgEcmYJsfUyl`. You must pass this `order_id` in the checkout code to associate this order with the payment. Know more about [Order and Payment states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md#order-states). + +Use the API sample code given below to create an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "customer_id": "cust_MpINfSkdEvtdxb", + "customer_details": { + "name": "" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "line_items": [ + { + "type": "lrs_hotel", + "name": "Acme hotel", + "description": "hotel booking", + "quantity": 1 + } + ] +}' +``` + +```json: Success +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} + +```json: Failure - Amount +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +```json: Failure - Customer Name +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "customer name is invalid", + "metadata": {}, + "reason": "input_validation_failed", + "source": "business", + "step": "payment_initiation" + } +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - **Customer Information Collection**: PAN, DOB and TCS declaration will be collected from customers at checkout. +> - **TCS Calculation**: Razorpay will automatically calculate TCS based on the line items passed in the Create Order API and apply the required TCS on customer payments according to the following slabs: +> +> +> Payment Purpose | LRS Limit --- +> Travel Booking | 0% | 20% +> --- +> Tour Booking | 5% | 20% +> --- +> Education (Loan-funded) | 0% | 0% +> --- +> Education (Self-funded) | 0% | 5% +> --- +> +> + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. Payment can only be made for this amount against the Order. + +`currency` _mandatory_ +: `string` The currency code. The default length is 3 characters. For example, `INR`. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Can have a maximum length of 40 characters and has to be unique. + +`customer_id` _optional_ +: `string` Unique identifier of customer. + +`customer_details` _mandatory_ +: `object` This contains details about the customer details of the order. + + `name` _mandatory_ + : `string` Customer's name. + - Character length: Between 5 and 50 characters. + - Allowed characters: Uppercase letters (A-Z), lowercase letters (a-z), and spaces (not at the beginning). + - Not allowed characters: Numbers, special characters (For example, @, ", ,, ., etc.), Unicode characters, emojis, and non-Latin scripts or regional languages. + - Prohibited names: Names must be meaningful and contextually appropriate. + - Avoid using repetitive patterns (For example, aaa, xyz, kkk kk). + - Names like litri litri, Hfg Gh, or husi husi are not permitted. + - Curse words or offensive names are prohibited. + - Example: `Gaurav Kumar`. + +`notes` _optional_ +: `json object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`line_items` _mandatory_ +: `object` Contains the details of the booking itinerary. + + `type` _mandatory_ + : `string` Contains the type of item of booking. Possible values: + - `lrs_travel` + - `lrs_experience` + - `lrs_hotel` + + `name` _optional_ + : `string` Contains the name of the booking. For example, the name of the hotel, flight and so on. + + `description` _optional_ + : `string` Contains the description of the booking. + + `quantity` _optional_ + : `integer` Contains the quantity of the booking. For example, 1 flight or 2 rooms. + + + +### Response Parameters + + `amount` + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` Indicates the Unix timestamp when this order was created. + + `currency` + : `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `object` Key-value pair used to store additional information about the entity. Holds 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + + `offer_id` + : `string` The unique identifier of the offer. For example, `offer_JHD834hjbxzhd38d`. + + `receipt` + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order changes to the `attempted` state following the first payment attempt and remains in this state until at least one payment is successfully processed and captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. + The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + + Error | Cause | Solution + --- + The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. + --- + The amount must be at least INR 1.00. | The amount specified is less than the minimum amount. Currency subunits, such as paise (in the case of INR), should always be greater than 100. | Enter an amount equal to or greater than the minimum amount, that is 100. + --- + The **field name** is required. | A mandatory field is missing. | Ensure all mandatory fields and values are present. + --- + Only english alphabets are allowed in customer name. | The customer name provided in the request contains characters other than English alphabets, such as numbers, special characters, regional language characters, or emojis. | Ensure that the name field in the request contains only English letters (A-Z, a-z) and meets the validation criteria: - Verify that the name does not include numerical characters, special characters (For example, @, #, $, etc.), or non-Latin scripts. +- Confirm that there are no extra spaces at the beginning or end of the name. + + --- + Customer name should be between 5 and 50 characters. | The `name` field provided in the request does not meet the required character length. It is either shorter than 5 characters or exceeds 50 characters. | - Ensure that the `name` field in the request is between 5 and 50 characters long. +- Check that no extra spaces are included at the beginning or end of the name, which might affect the character count. + + --- + Customer name is invalid. | The `name` field provided in the request does not meet the validation requirements. This could be due to the presence of disallowed characters, such as special characters, numbers, regional language characters, or the use of non-Latin scripts. | - Ensure that the `name` field only contains English letters (A-Z, a-z) and spaces (not at the beginning). +- Verify that the name does not include special characters, numerical digits, emojis, or regional language characters. +- Check for unintended characters that may have been included by mistake (For example, trailing spaces or special symbols). + + + + +## 1.3 Integrate with Checkout on Client-Side + +Add the Pay button on your web page using the checkout code, Handler Function or Callback URL. + +### Handler Function or Callback URL + +**Handler Function** | **Callback URL** +--- +When you use this: - On successful payment, the customer is shown your web page. +- On failure, the customer is notified of the failure and asked to retry the payment. + | When you use this: - On successful payment, the customer is redirected to the specified URL, for example, a payment success page. +- On failure, the customer is asked to retry the payment. + +### Code to Add Pay Button + +Copy-paste the parameters as `options` in your code: + +```html: Callback URL (JS) Checkout Code +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise + "currency": "", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "customer_id": "cust_MpINfSkdEvtdxb", + "order_id": "order_NGrgEcmYJsfUyl", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information especially their phone number + "name": "", //your customer's name + "email": "", + "contact": "" //Provide the customer's phone number for better conversion rates + }, + "notes": { + "invoice_number": "IRS1245", + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +```html: Handler Functions (JS) Checkout Code +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise + "currency": "", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "customer_id": "cust_MpINfSkdEvtdxb", + "order_id": "order_NGrgEcmYJsfUyl", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information, especially their phone number + "name": "", //your customer's name + "email": "", + "contact": "" //Provide the customer's phone number for better conversion rates + }, + "notes": { + "invoice_number": "IRS1245", + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); +}); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> Test your integration using these [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/standard-integration/test-integration.md#Cards). +> + +> **WARN** +> +> +> **Watch Out!** +> +> - The `invoice_number` field is mandatory for all payment methods. Ensure each payment has a unique invoice number. +> - The `createPayment` method should be called within an event listener triggered by user action to prevent the popup from being blocked. For example: +> ```js +> $('button').click( function (){ razorpay.createPayment(...) }) +> ``` +> + + +### Checkout Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `50000`. + +`currency` _mandatory_ +: `string` The currency code. The default length is 3 characters. For example, `INR`. + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: “contact": "+919000090000"). +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + + `name` _optional_ + : `string` Cardholder's name to be pre-filled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also pre-filled. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#save-card-details). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and net banking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments with the suggested next best option. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment with the suggested next best option. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + +`notes` _mandatory_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `invoice_number` _mandatory_ + : `string` Invoice number of the invoice generated. Ensure each payment has a unique invoice number. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> The open method of Razorpay object (`rzp1.open()`) must be invoked by your site's JavaScript, which may or may not be a user-driven action such as a click. +> + +## Errors + +Given below is a list of errors you may face while integrating with checkout on the client-side. + +Error | Cause | Solution +--- +The id provided does not exist. | Occurs when there is a mismatch between the API keys used while creating the `order_id`/`customer_id` and the API key passed in the checkout. | Make sure that the API keys passed in the checkout are the same as the API keys used while creating the `order_id`/`customer_id`. +--- +Blocked by CORS policy. | Occurs when the server-to-server request is hit from the front end instead. | Make sure that the API calls are made from the server side and not the client side. + +### Configure Payment Methods (Optional) + +Multiple payment methods are available on the Razorpay Web Standard Checkout. +- The payment methods are **fixed** and cannot be changed. +- You can configure the order or make certain payment methods prominent. Know more about [configuring payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + +## 1.4 Handle Payment Success and Failure + +The way the Payment Success and Failure scenarios are handled depends on the [Checkout Sample Code](#code-to-add-pay-button) you used in the last step. + +### Checkout with Handler Function + +If you used the sample code with the handler function: + + +### Handler Function + + + + The customer sees your website page. The checkout returns the response object of the successful payment (**razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature**). Collect these and send them to your server. + + + + + The customer is notified about payment failure and asked to retry the payment. Know about the [error parameters.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md#response-parameters) + + ```js: Failure Handling Code + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + } + ``` + + + + +### Checkout with Callback URL + +If you used the sample code with the callback URL: + + +### Callback URL + + + + Razorpay makes a POST call to the callback URL with the **razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature** in the response object of the successful payment. Only successful authorisations are auto-submitted. + + + + + In case of failed payments, the checkout is displayed again to facilitate payment retry. + + + + +## 1.5 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +## 1.6 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +Here are the links to our [SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#client-libraries) for the supported platforms. + +## 1.7 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Additional APIs + +### Fetch Payment Details With ID + +Use this API to retrieve the details of a specific payment using its `razorpay_payment_id`. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/payments/pay_DG4ZdRK8ZnXC3k + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_DG4ZdRK8ZnXC3k"; + +Payment payment = razorpay.payments.fetch(paymentId); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +paymentId := "pay_DG4ZdRK8ZnXC3k" + +body, err := client.Payment.Fetch(paymentId, nil, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_DG4ZdRK8ZnXC3k" + +Razorpay::Payment.fetch(paymentId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +Payment payment = client.Payment.Fetch(paymentId); +``` + +```json: Success +{ + "id": "pay_DG4ZdRK8ZnXC3k", + "entity": "payment", + "amount": 11000, + "currency": "INR", + "status": "captured", + "order_id": "order_RAcmPp7jezbvjT", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "success@razorpay", + "email": "", + "contact": "", + "notes": { + "invoice_number": "order_RAcmPp7jezbvjT", + "tcs_amount": 2200, + "tcs_percentage": 20 + }, + "fee": 156, + "tax": 24, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "392715558317", + "upi_transaction_id": "41CAC6648BFC65AAE036F8425078A8AA" + }, + "created_at": 1756355904, + "upi": { + "vpa": "success@razorpay" + } +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The id provided does not exist", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + + +### Query Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + + + +### Response Parameter + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. + +`amount` +: `integer` The payment amount in currency subunits. For example, for an amount of enter 100. + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + - `paylater` + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP` + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + + `invoice_number` + : `string` Invoice number of the invoice generated. Ensure each payment has a unique invoice number. + + `tcs_amount` + : `integer` The TCS (Tax Collected at Source) amount in the smallest currency unit. + + `tcs_percentage` + : `integer` The TCS percentage rate applied to the payment. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + +`card_id` +: `string` The unique identifier of the card used by the customer to make the payment. + +`card` +: `object` Details of the card used to make the payment. + + `id` + : `string` The unique identifier of the card used by the customer to make the payment. + + `entity` + : `string` The name of the entity. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` The last 4 digits of the card number. + + `network` + : `string` The card network. Possible values: + - `American Express` + - `Diners Club` + - `Maestro` + - `MasterCard` + - `RuPay` + - `Unknown` + - `Visa` + + `type` + : `string` The card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + + `issuer` + : `string` The card issuer. The 4-character code denotes the issuing bank. This attribute will not be set for the card issued by a foreign bank. + + `emi` + : `boolean` Indicates whether the card can be used for EMI payment method. Possible values: + - `true`: Card can be used for EMI payments. + - `false`: Card cannot be used for EMI payments. + + `sub_type` + : `string` The sub-type of the customer's card. Possible values: + - `customer` + - `business` + + + Know how to accept payments made by customers using [corporate cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/corporate-cards.md). + +`upi` +: `object` Details of the UPI payment received. Only applicable if `method` is `upi`. + + `payer_account_type` + : `string` The payment method used for making the payment. Possible values: + - `bank_account` + - `credit_card` + - `wallet` + - `credit_line` + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + + `flow` + : `string` The type of UPI flow. Possible values: + - `intent`: When a UPI app is selected and user is redirected to it. + - `collect`: The user enters their UPI ID and receives a notification from the UPI app. They open the app and complete the payment. + - `in_app`: In case of Turbo UPI Payments. + +`bank` +: `string` The 4-character bank code which the customer's account is associated with. For example, `UTIB` for Axis Bank. + +`vpa` +: `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, `gauravkumar@exampleupi`. + +`wallet` +: `string` The name of the wallet used by the customer to make the payment. For example, `payzapp`. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference numbers. + + `rrn` + : `string` A unique bank reference number provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + + `authentication_reference_number` + : `string` A unique reference number generated for RuPay card payments. + + `bank_transaction_id` + : `string` A unique reference number provided by the banking partner in case of netbanking payments. + + + +### Error Response Parameter + +Error | Cause | Solution +--- +The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. +--- + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/standard-integration/test-integration.md) diff --git a/llm-content/payments/international-payments/outward-remittances/standard-integration/go-live-checklist.md b/llm-content/payments/international-payments/outward-remittances/standard-integration/go-live-checklist.md new file mode 100644 index 00000000..db6edc7c --- /dev/null +++ b/llm-content/payments/international-payments/outward-remittances/standard-integration/go-live-checklist.md @@ -0,0 +1,75 @@ +--- +title: 3. Go-live Checklist +description: Start accepting Live Payments through Razorpay Payment Gateway. +--- + +# 3. Go-live Checklist + +Consider these steps before taking the integration live. + +## Accept Live Payments + +Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + +## Payment Capture + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + +### How to Capture Payments + +- **Auto-capture payments (recommended)** + +Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Dashboard. + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + +Know more about [Capture Settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + +## Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/international-payments/outward-remittances/standard-integration/invoice-collection.md b/llm-content/payments/international-payments/outward-remittances/standard-integration/invoice-collection.md new file mode 100644 index 00000000..30fc51b5 --- /dev/null +++ b/llm-content/payments/international-payments/outward-remittances/standard-integration/invoice-collection.md @@ -0,0 +1,191 @@ +--- +title: Invoice Collection +description: Automate invoice uploads and buyer details with seamless SFTP integration. +--- + +# Invoice Collection + +> **WARN** +> +> +> **Watch Out!** +> +> 1. Invoice collection is mandatory for any import payment to be eligible for settlement. +> 2. Turnaround Time (TAT) for settlement begins **only after a valid invoice** is uploaded. +> 3. Ensure each invoice contains the following details: +> - Unique invoice number (Partner's invoice ID or Razorpay Order ID). +> - Partner's or business name. +> - Partner's or business address. +> - Customer's complete address. +> - Description of goods/services. +> - Units sold (time period, quantity and so on). +> - Amount in INR (2 decimal places only. For example, ). +> - Taxes applied. +> + +## Invoice Submission via SFTP + +You can automate invoice uploads using **Secure File Transfer Protocol (SFTP)**, enabling streamlined, secure file transfer. + +### Steps to Connect with Razorpay via SFTP + + +### 1. Share Your Public Key + + - Required for setting up SFTP credentials and folder access. + - Submit your SSH public key to your Razorpay point of contact. + - **Supported SSH key formats**: + - RSA (2048-bit or higher). For example, `ssh-rsa`. + - ECDSA. For example, `ssh-ecdsa`. + - Ed25519. For example, `ssh-ed25519`. + - Ensure your key is in the correct format. Using an unsupported or incorrectly formatted key will result in authentication failure. + + +> **WARN** +> +> +> **Watch Out!** +> +> Never share your private key with anyone. Only the public key should be provided to Razorpay. +> + + + + +### 2. IP Whitelisting + + - Only requests from your whitelisted IPs will be accepted. + - Share a list of authorised outbound IPs to enable secure access. + - Maximum of 4 IP addresses can be whitelisted. + - SFTP access will work only from the whitelisted IPs. Attempting to connect from any other IP address will result in connection failure. + + + +### 3. Credentials & Access Details + + - Razorpay will provide: + - Hostname: `sftp.razorpay.com` + - Port: `22` + - Username + - Path prefix (based on your `MID`) + - Use your **private key** (corresponding to the public key you shared) to authenticate while connecting to Razorpay's SFTP. + - Use an SFTP client to connect. + - **Test your connection**: Run `telnet sftp.razorpay.com 22` to verify connectivity before attempting SFTP access. + + +## How to Share Invoices via SFTP + + +### File Path Format + +Use the following folder and file structure: +"/invoiceUpload/automated//YYYY-MM-DD/InvoiceNumber.pdf." + +For example: `/invoiceUpload/automated/MDoeHNNpi0nB7m/2025-05-10/INV_09876.pdf` + +> **WARN** +> +> +> **Watch Out!** +> +> - You must include your Merchant ID (MID) in the path. +> - You must include the date folder in `YYYY-MM-DD` format. +> - Missing either component will result in upload failure. +> - Once uploaded, invoices become read-only. You cannot edit, rename or delete files after you upload. +> - Do not attempt to upload the same invoice multiple times to the same path. +> + + + + +### File Types and Flows + +Direction | Filename Format | Description +--- +Client → Razorpay | `InvoiceNumber.pdf` | Inbound File: This will be the invoices submitted by you to Razorpay. It should always be in PDF format. Example: `INV_09876.pdf` + + + +## Invoice ID Validation Process + +Razorpay enforces strong validation rules to prevent duplicate or invalid invoice usage. + + +### Successful Payments + + - **Status**: `Captured` + - **Invoice Action**: Permanently blocked + - **Note**: Same invoice ID cannot be reused. + + + +### Failed Payments + + - **Status**: `Failed` + - **Invoice Action**: Released + - **Note**: Invoice ID can be reused. + + + +### Payments in Intermediate States + + - **Status**: `Created` or `Authorised` + - **Invoice Action**: Temporarily blocked + - **Note**: Invoice ID is reusable only after final status (`Failed` or `Captured`) is reached. + + +### Refunded Payments + + +### Auto-Refunded (Never Captured) + + - **Status**: `Refunded` + - **Action**: Invoice ID is released. + - **Note**: ID can be reused. + + + +### Merchant-Initiated Refund (Post-Capture) + + - **Status**: `Refunded` + - **Action**: Invoice ID is permanently blocked. + - **Note**: Cannot be reused. + + +Partial capture scenarios are not validated by default. Contact Razorpay [Support team](https://razorpay.com/support/). + +## AML Screening Process + +As per RBI regulations, payments to offshore accounts must undergo AML (Anti-Money Laundering) checks by Razorpay's Authorised Dealer (AD) Bank. + + +### Daily AML Communication + + - You will receive daily emails listing transactions **flagged** for additional details. + - **Subject Line**: `Additional Details Required - [Business Name]_MDoeHNNpi0nB7m`. + + + +### Turnaround Time + + - Share required information within **5 working days** to avoid auto-cancellation. + - Information may include: Full name, address, ownership, percentage of ownership, nature of business, purpose of payment, business website, company, date of birth/incorporation, place of birth/incorporation and so on. + + + +### Consequences of Delay + + Missing TAT results in: + - Razorpay lien-marking the funds or + - Refund initiation via Dashboard/API. + + +## Best Practices for Invoice IDs + +To ensure seamless experience and compliance: + +- **Always generate unique invoice IDs** per payment. +- Acceptable IDs: + - Razorpay `order_id`. + - Your internal unique invoice number. +- Do not reuse invoice IDs for different transactions unless the original payment has failed. diff --git a/llm-content/payments/international-payments/outward-remittances/standard-integration/test-integration.md b/llm-content/payments/international-payments/outward-remittances/standard-integration/test-integration.md new file mode 100644 index 00000000..7beb386b --- /dev/null +++ b/llm-content/payments/international-payments/outward-remittances/standard-integration/test-integration.md @@ -0,0 +1,54 @@ +--- +title: 2. Test Integration +description: Steps to test if the integration was successful. +--- + +# 2. Test Integration + +You can make test payments using one of the payment methods configured at the Checkout. + +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API Keys generated in the Test Mode in the Checkout code. + +## Netbanking + +You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + +## UPI + +You can enter one of the following UPI IDs: + +- `success@razorpay`: To make the payment successful. +- `failure@razorpay`: To fail the payment. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + +## Wallet + +You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + +## Cards + +You can use one of the test cards to make transactions in the Test Mode. Use any valid expiration date in the future and any random CVV to create a successful payment. + +Card Network | Domestic / International | Card Number +--- +Mastercard | Domestic | 5267 3181 8797 5449 +--- +Visa | Domestic | 4111 1111 1111 1111 +--- +Mastercard | International | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 +--- +Visa | International | 4012 8888 8888 1881 + +## Next Steps + +[Step 3: Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/outward-remittances/standard-integration/go-live-checklist.md) diff --git a/llm-content/payments/international-payments/purpose-codes.md b/llm-content/payments/international-payments/purpose-codes.md new file mode 100644 index 00000000..0f2141a1 --- /dev/null +++ b/llm-content/payments/international-payments/purpose-codes.md @@ -0,0 +1,132 @@ +--- +title: Purpose Codes +heading: About Purpose Codes +description: Learn about Purpose Codes (definition, list and selection) and enabling international payments. +--- + +# About Purpose Codes + +A purpose code is a unique identifier issued by a country's central bank that is necessary for the successful execution of international payments. These codes are assigned to each transaction involving foreign currency and specify the purpose for which the transaction is being made. + +The purpose codes are issued by the Reserve Bank of India (RBI) to specify the nature of foreign currency transactions. For Indian businesses, receiving payments from foreign customers is an **inward remittance**, and sending payments abroad for goods or services is an **outward remittance**. + +- Each payment must be tagged with an appropriate purpose code, with separate codes for import and export transactions. +- Export purpose codes begin with 'P', while import purpose codes start with 'S'. + +> **WARN** +> +> +> **Watch Out!** +> +> It is mandatory to add the purpose codes during international payment enablement. Failure to do so will result in compliance issues and delays in transactions. +> + +## Select Correct Purpose Code + +You must select the correct purpose code to avoid issues related to regulation compliance. + +For example, a software development startup in India exporting software to the United States should choose the appropriate purpose code, such as "P0802 - Software consultancy/implementation" when receiving payments. This ensures that the RBI and banks understand the exact nature of the transaction and aids in compliance with Indian regulations. + +To select the correct purpose code, make sure to: + +- **Check RBI Purpose code list**: Refer to RBI's comprehensive list of purpose codes and their corresponding descriptions to choose the correct purpose code. You can check with your bank for the purpose code list. + +- **Engage with Chartered Accountants (CAs)**: CAs can assist in identifying the correct purpose code for your specific business activities. + +> **WARN** +> +> +> **Watch Out!** +> +> Incorrect use of purpose codes can lead to non-compliance with Foreign Exchange Management Act (FEMA) regulations and reporting issues to regulatory agencies. For example, if the purpose of a transaction does not align with the assigned purpose code, it may result in errors when reporting to regulatory authorities. +> + +## List of Purpose Codes + +Download the complete list of transaction purpose codes you can select during the onboarding process. + +> **INFO** +> +> +> **Handy Tips** +> +> The purpose code selected will apply to all international business transactions. +> + +## Accept Payments from International Customers + + + Steps to accept payments from international customers if you are a new user. + + Steps to accept payments from international customers if you are an existing user. + +### New Razorpay User + +To enable international payments and accept payments from international customers for new users: + +1. Log in to the Dashboard. +2. Navigate to **Account & Settings** → **International payments** (under Payment methods). +3. Select the payment method you wish to activate, such as **International Cards** or **International Bank Transfers** and click **Activate** button corresponding to the payment method. +4. On the **International activation form** page, under Business Details, enter all the details based on the business requirements and click **Continue**. +5. On the Purpose code page, select the correct purpose code from the list and click **Continue**. + +6. On the **Importer - Exporter code** page: + - If you have an IE code, select **Yes**. Enter the 10-digit **IE code** and select **I agree to the Terms and Conditions**. Click **Continue**. + - If the IE code does not apply to you, select **No, because it is not applicable for me** and click **Continue**. + - If you do not have an IE code but want to apply, select **No, but I want to apply for it**, and click **Apply now**. +6. On **Supporting details** page, enter all the supporting details and click **Submit details**. + +Once the details are submitted, the Razorpay Activation/Operations team verifies them. After the verification process is complete, you can start accepting payments. + +### Existing Razorpay User + +To update purpose codes if you are an existing user and have already enabled international payments: + +1. Click **International Payments Codes** under **International payment settings**. +2. Update your purpose code under the **International Payment Codes** section. + +3. Select the appropriate **Purpose Code**. + + Based on your business requirements, you also need to provide your **HS Code** or **IEC Code**. + + + + 1. Click **International Payments Codes** under **International payment settings**. + 2. Update your HS Code under the **International Payment Codes** section. + + 3. Select the appropriate **Harmonised System Code**, also known as HS Code. + +> **INFO** +> +> +> **Handy Tips** +> +> - For Software: HSCode is **85238020** and HSDescription is **Other Information technology software**. +> - For Goods: Refer to the list from the [DGFT website](https://www.dgft.gov.in/CP/). +> + + + + 1. Click **International Payments Codes** under **International payment settings**. + 2. Update your **IEC Code** under the **International Payment Codes** section. + + 3. Select the appropriate **Purpose Code**. + 4. Enter the 10-digit Importer/Exporter Code (IEC) and click **Next**. + + +> **WARN** +> +> +> **Watch Out!** +> +> The IEC is a code issued by the Indian Director General of Foreign Trade (DGFT) to Indian companies that intend to export from India. You can apply for an IEC at the [DGFT website](https://www.dgft.gov.in/CP/). +> +> The IEC code input screen appears for specific purpose codes, (P0103) being one of them. +> + + + + +4. Review and click **Confirm**. The Razorpay Activation/Operations team verifies the selected **Purpose Code**. + +As consumers or buyers, you get the option to make payments through the [Razorpay payment gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md). On selecting Razorpay, various payment methods will be displayed at the Razorpay checkout to complete the payment. diff --git a/llm-content/payments/international-payments/risk-visibility-dashboard.md b/llm-content/payments/international-payments/risk-visibility-dashboard.md new file mode 100644 index 00000000..d28b6fc6 --- /dev/null +++ b/llm-content/payments/international-payments/risk-visibility-dashboard.md @@ -0,0 +1,41 @@ +--- +title: Risk Analytics Dashboard +description: The Risk Analytics Dashboard enables businesses to identify and analyse potential transaction risks. Organisations can make informed decisions and protect themselves from fraudsters by creating block rules to control fraudulent activities. +--- + +# Risk Analytics Dashboard + +Razorpay Risk Analytics Dashboard is a cutting-edge solution designed specifically for Indian exporters engaged in international payments. This innovative platform empowers you with comprehensive analytics, offering unparalleled visibility into potential transaction risks. By creating block rules to control fraudulent activities, you gain the authority to make informed decisions and protect your businesses. + +## Advantages + +- **Enhanced Control:** Empowers you with the ability to create block rules, enabling you to exercise greater control over your transactions and prevent suspicious transactions in real-time. + +- **Informed Decision-Making:** Provides comprehensive analytics to identify fraudulent patterns and make informed decisions. + +- **Financial Security:** Helps you to safeguard your financial interests by preventing fraud and minimising the risk of financial losses associated with fraudulent transactions. + +- **Seamless Integration:** Seamlessly integrates analytics and control features, providing a holistic solution to manage risk effectively and optimise your international trade operations. + +- **Personalised Oversight:** Allows you to fine-tune risk parameters according to your specific business requirements, ensuring a customised approach to risk management that aligns with your strategic objectives. + +## Dashboard Actions + +You can use the Risk Analytics Dashboard to perform a detailed analysis of your recent transactions. + +1. Log in to your Dashboard. +2. Navigate to **Risk and Fraud**. +3. View the details of the **Fraud-to-sales** ratio, **Disputes-to-sales** ratio, and **Risk decline rate** on the Dashboard. + ![Risk Analytics on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/risk-analytics-dashboard.jpg.md) + +### Fraud-to-Sales Ratio + +The fraud-to-sales ratio is a metric used to measure the extent of fraudulent activity in total sales or transactions. It helps assess the proportion of fraudulent transactions or activities occurring within the sales volume. Know more about the [fraud-to-sales ratio](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/risk-visibility-dashboard/fraud-sales-ratio.md). + +### Dispute-to-Sales Ratio + +The dispute-to-sales ratio is a metric used in financial analysis to measure the proportion of disputed transactions about total sales or transactions processed by a business within a specific period. It helps understand the frequency and magnitude of disputes relative to the overall sales volume. Know more about the [dispute-to-sales ratio](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/risk-visibility-dashboard/dispute-sales-ratio.md). + +### Risk Decline Rate + +The risk decline ratio is a metric used to measure the proportion of transactions declined by a system or a payment processor due to perceived risk factors against the total number of transactions processed or received. Know more about the [risk decline rate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/risk-visibility-dashboard/risk-decline-rate.md). diff --git a/llm-content/payments/international-payments/risk-visibility-dashboard/dispute-sales-ratio.md b/llm-content/payments/international-payments/risk-visibility-dashboard/dispute-sales-ratio.md new file mode 100644 index 00000000..f1fe5687 --- /dev/null +++ b/llm-content/payments/international-payments/risk-visibility-dashboard/dispute-sales-ratio.md @@ -0,0 +1,81 @@ +--- +title: Dispute-To-Sales Ratio +description: Know how to calculate dispute-to-sales ratio. Learn how the Risk Analytics Dashboard can help reduce your dispute-to-sales ratio effectively. +--- + +# Dispute-To-Sales Ratio + +A dispute is a situation where a customer or the issuing bank questions the validity of payments. It may arise due to unauthorised charges, failure to deliver the promised merchandise, or excessive charges levied by the business. Know more about the [disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md). + +The dispute-to-sales ratio is a metric used in financial analysis to measure the proportion of disputed transactions related to total sales or transactions processed by a business within a specific period. It helps understand disputes relative to the overall sales volume. + +Dispute-to-sales ratio is a dynamic indicator of financial health, customer satisfaction, operational efficiency, and risk management. Proactively monitoring and managing this ratio enables you to respond promptly to challenges, fostering a resilient and successful operation. + +## Calculating Dispute-To-Sales Ratio + +You can calculate the dispute-to-sales ratio by dividing the total number of disputed transactions within the selected period (as specified in the drop-down menu) by the total number of captured transactions for the current month. Then, multiply it by 100 to express it as a percentage. + ![How to calculate DTS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/calculate-dts.jpg.md) + +#### Example 1 + +Consider you have an e-commerce business. In a given month, you processed 10,000 transactions, and 50 of these transactions were disputed by customers. + +**Dispute-to-sales ratio** = 50/10000 x 100 = 0.5% + +The e-commerce business's dispute-to-sales ratio is 0.5%. This low ratio suggests that most transactions are completed without disputes, indicating high customer satisfaction and effective dispute resolution mechanisms. + +> **INFO** +> +> +> +> **Handy Tips** +> +> The dispute-to-sales ratio will be calculated based on your value selection (INR) versus absolute count. Depending on this selection, either the INR value ratio will be taken or the transaction count ratio will be considered. +> ![Dispute to sales ratio value](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dts-value-count.jpg.md) +> +> + +It is crucial to note that disputes may not be immediately reported and can take some time to be processed. Therefore, the dispute-to-sales ratio calculation is based on disputes reported within the given period divided by captured sales within the same period. However, the disputed transactions may have occurred before or outside the selected period. + +#### Example 2 + +Consider you have an e-commerce business and processed 10,000 transactions in April. In May, you received 50 dispute reports related to transactions in April. For calculating the dispute-to-sales ratio for May, you would consider these 50 disputes against the transactions processed in May, even though the disputed transactions occurred in April. This approach helps understand the ratio of disputes reported to sales within the same reporting period despite the actual timing of the transactions. + +## Dashboard Actions + +You can use the Dashboard to perform a detailed analysis of **Total sales value**, **Value of reported disputes**, **Disputes-to-sales** ratio, and **Number of reported disputes** over a selected period of time. + ![FTS graph](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dts-total-count.jpg.md) + +Let us explore how the Risk Analytics Dashboard can help you effectively reduce your Dispute-to-sales (DTS) ratio: + +**Identifying High-Risk Transaction/Customer Cohorts:** Using the Dashboard's array of custom charts and analytical tools, you can quickly identify transaction or customer cohorts that significantly contribute to dispute occurrences. + +For example, you may notice a spike in disputes from a particular country or Card BIN associated with specific product categories or IP addresses. Visualising this data through custom charts or analysing the parameters in the [downloadable list of disputes](#download-the-list-of-disputes) allows you to gain valuable insights into potential risk factors contributing to the DTS ratio. + +**Identifying Risky Cohorts:** Once you have identified a risky cohort, such as a group of transactions originating from a specific IP address, you can take targeted action to mitigate the risk. For example, suppose you observe many disputes linked to a single IP address. In that case, you can raise a request to blacklist transactions from this IP address to decline any future transactions coming from this IP address. + +**Taking Proactive Measures:** Using the Dashboard, you can request our risk team to [block future transactions](#block-highest-dispute-contributors) from this high-risk IP address. This proactive measure helps prevent further fraudulent activities associated with the identified cohort, reducing the likelihood of future fraud incidents. + +### Download List of Disputes + +You can download the list of disputes with parameters such as IP address, email, and phone number. To download the list, follow the steps given below: + + 1. Log in to your Dashboard. + 2. Navigate to **Risk and Fraud** and click **Download list**. + ![Disputes list download](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dts-download-list.jpg.md) + 3. On the **Download disputes transaction list** page, select the **duration** and add the **Recipient's Details**. Click **Send Request**. + ![Disputes list download send request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dts-send-request.jpg.md) + 4. After the request is sent, you will receive an email with the file containing the list of disputes for the selected duration. + +### Block Highest Dispute Contributors + +You can block the fraud contributors by requesting a blacklist which helps lower the number of frauds. To block the fraud contributors, follow the steps given below: + + 1. Log in to your Dashboard. + 2. Navigate to **Risk and Fraud** and click **Request blacklist**. + ![Disputes blacklist request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dts-request-blacklist.jpg.md) + 3. On the **Request blacklist** page. + - Select **Parameter**, add **Comments** about why you want to blacklist, enter the email id to which you want to get the updates. + - Upload an **XLS or XLSV** file of the list items. Click **Send request**. + ![Send request blacklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dts-blacklist-send-request1.jpg.md) + 4. After the request is sent successfully, you can track your request on the Dashboard. Navigate to **Account & Settings** → **Support tickets** (under **Business settings**). diff --git a/llm-content/payments/international-payments/risk-visibility-dashboard/fraud-sales-ratio.md b/llm-content/payments/international-payments/risk-visibility-dashboard/fraud-sales-ratio.md new file mode 100644 index 00000000..360d86f8 --- /dev/null +++ b/llm-content/payments/international-payments/risk-visibility-dashboard/fraud-sales-ratio.md @@ -0,0 +1,102 @@ +--- +title: Fraud-To-Sales Ratio +description: Know how to calculate fraud-to-sales ratio. Learn how the Risk Analytics Dashboard can help reduce your fraud-to-sales ratio. +--- + +# Fraud-To-Sales Ratio + +The fraud-to-sales ratio (FTS) is a percentage that helps you assess the volume of fraudulent transactions within your sales. It provides insights into the proportion of fraudulent transactions compared to your overall sales transactions. + +Network schemes like Visa and Mastercard use automated systems to monitor transactions and detect potential fraud. These systems flag suspicious transactions with unusual patterns, such as unexpected locations or atypical spending. Fraud reports generated this way help you identify and address security risks proactively without needing direct customer involvement. + +Understanding the fraud-to-sales ratio is crucial for several reasons: + +- **Risk assessment**: A higher fraud-to-sales ratio suggests a more significant risk exposure to fraudulent transactions. It signals potential vulnerabilities in the business's transaction processes, making evaluating and fortifying security measures vital. + +- **Financial impact**: A high ratio indicates potential financial losses due to fraud. You need to assess the extent of these losses, as they will impact profitability and overall financial health. + +- **Customer trust**: Fraud will weaken customer trust, and a high fraud-to-sales ratio will result in customer dissatisfaction and a loss of confidence. Addressing fraud will maintain a positive customer experience. + +- **Operational efficiency**: Monitoring the fraud ratio helps identify operational inefficiencies contributing to fraudulent activities. Improving operational processes can reduce the likelihood of fraudulent transactions. + +Risk Analytics Dashboard provides insights into the security and financial well-being of the business. It prompts proactive measures to mitigate risks, protect customer trust, and ensure the overall health and sustainability of the business. + +## Calculating Fraud-To-Sales Ratio + +You can calculate the fraud-to-sales ratio by dividing the number of reported fraudulent transactions by the total number of transactions and multiplying by 100 to express it as a percentage. + ![How to calculate FTS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/calculate-fts.jpg.md) + +Your fraud-to-sales ratio should be below 1%, which can vary by industry. It is important to consider industry standards when figuring out your fraud-to-sales ratio. + +### Example + +Consider you have an e-commerce business that processes thousands of transactions every month. You found that 20 of these transactions were reported as potentially fraudulent. To calculate the fraud-to-sales ratio, you have to divide the number of reported fraudulent transactions (20) by the total number of transactions (10,000) and then multiply by 100 to express it as a percentage: + +**Fraud-to-sales ratio** = 20/10000 x 100 = 0.2% + +In this example, the fraud-to-sales ratio for your e-commerce business is 0.2%, which is well below the industry standard of 1%. + +> **INFO** +> +> +> +> **Handy Tips** +> +> The fraud-to-sales ratio will be calculated based on your value selection (INR) versus absolute count. Depending on this selection, either the INR value ratio will be taken or the transaction count ratio will be considered. +> ![Fraud to sales ratio value](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/fts-value-count.jpg.md) +> +> + +It is essential to clarify two key points here: + +**Fraud Reporting Clarification:** Network schemes run extensive fraud monitoring programs to detect and flag potentially fraudulent transactions. More often than not, these fraud reports are generated by automated systems flagging what appears to them to be suspicious transactions. These systems look at defined parameters, and if purchasing characteristics differ from what is known or expected of a consumer, they flag the transaction. It is important to understand that not all reported fraud cases will necessarily result in fraud. These reports are intended to highlight overall suspicious behaviour and help you take proactive measures to enhance your security. + +**Time Lag Consideration:** Understanding that the division is based on reported frauds divided by captured sales within the month is crucial. However, fraud reports may take some time to be processed and reflected in the data. Consequently, it is possible that the associated payments have occurred before or are not included in the captured payment set used for analysis. + +## Dashboard Actions + +You can use the Dashboard to perform a detailed analysis of **Total sales value**, **Value of reported fraud**, **Fraud-to-sales** ratio, and **Number of reported frauds** over a selected period of time. + ![FTS graph](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/fts-total-count.jpg.md) + +Let us explore how the Risk Analytics Dashboard can help you effectively reduce your fraud-to-sales ratio: + +**Identifying High-Risk Transaction/Customer Cohorts:** Using the custom charts and analysis tools in the Risk Analytics Dashboard, you can quickly identify transaction or customer cohorts that significantly contribute to fraudulent activities. + +For example, you may notice a spike in fraudulent transactions from a particular country or Card BIN associated with specific product categories. By visualising this data through custom charts or analysing the parameters in the [downloadable list of fraudulent transactions](#download-the-list-of-fraudulent-transactions), you can gain valuable insights into potential risk factors contributing to the FTS ratio. + ![FTS spike graph](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/fraud-spike-example.jpg.md) + +**Identifying Risky Cohorts:** Once you have identified a risky cohort, such as a group of transactions originating from a specific IP address, you can take targeted action to mitigate the risk. For example, suppose you observe many fraudulent transactions linked to a single IP address. In that case, you can raise a request to blocklist transactions from this IP address to decline any future transactions coming from this IP address. + +**Taking Proactive Measures:** Using the Dashboard, you can request our risk team to [block future transactions](#block-highest-fraud-contributors) from this high-risk IP address. This proactive measure helps prevent further fraudulent activities associated with the identified cohort, reducing the likelihood of future fraud incidents. + +By leveraging the insights and functionalities offered by our Risk Analytics Dashboard, you can identify and address potential fraud risks, ultimately reducing the fraud-to-sales ratio. + +### Download List of Fraudulent Transactions + +You can download the list of fraudulent transactions with parameters such as IP address, email, and phone number. To download the list, follow the steps given below: + + 1. Log in to your Dashboard. + 2. Navigate to **Risk and Fraud** and click **Download list**. + ![Fraudulent list download](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/fts-download-list.jpg.md) + 3. On the **Download fraudulent transaction list** page, select the **duration** of fraudulent transactions and add the **Recipient's Details**. Click **Send Request**. + ![Fraudulent list download send request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/fts-send-request.jpg.md) + 4. After the request is sent, you will receive an email with the file containing the list of fraudulent transactions for the selected duration. + +### Block Highest Fraud Contributors + +Blacklisting is the process of identifying specific attributes, such as IP addresses, card BINs, or customer information, that are associated with fraudulent or high-risk transactions. Once identified, these attributes are added to a blacklist, effectively flagging them as risky. + +Razorpay's risk engine employs specific algorithms and machine learning techniques to analyse real-time transactions and identify potential risks. When a transaction is initiated, the risk engine checks it against the blacklist to see if any attributes match those flagged as high-risk. + +If the transaction contains attributes that are blacklisted, Razorpay's risk engine automatically declines or blocks the transaction, preventing it from being processed further. This proactive approach helps safeguard you from potential fraudulent transactions and reduces the likelihood of financial losses. + +You can block the fraud contributors by requesting a blacklist which helps lower the number of frauds. To block the fraud contributors, follow the steps given below: + + 1. Log in to your Dashboard. + 2. Navigate to **Risk and Fraud** and click **Request blacklist**. + ![Fraudulent blacklist request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/fts-request-blacklist.jpg.md) + 3. On the **Request blacklist** page. + - Select **Parameter** and add **Comments** about why you want to blacklist, enter the email id to which you want to get the updates. + - Upload an **XLS or XLSV** file of the list items. Click **Send request**. + ![Send request blacklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/fts-blacklist-send-request.jpg.md) + 4. After the request is sent successfully, Communication and confirmation regarding your request will be conducted through the support ticket. You can track your request on the Dashboard. Navigate to **Account & Settings** → **Support tickets** (under **Business settings**). diff --git a/llm-content/payments/international-payments/risk-visibility-dashboard/risk-decline-rate.md b/llm-content/payments/international-payments/risk-visibility-dashboard/risk-decline-rate.md new file mode 100644 index 00000000..149806b9 --- /dev/null +++ b/llm-content/payments/international-payments/risk-visibility-dashboard/risk-decline-rate.md @@ -0,0 +1,47 @@ +--- +title: Risk Decline Rate +description: Know how to calculate and manage the Risk Decline rate. +--- + +# Risk Decline Rate + +The risk decline rate refers to the percentage of transactions a payment system or processor declines due to perceived risks, including the perceived risk of fraudulent behaviour. It is a metric used to measure the proportion of transactions that are considered potentially risky and subsequently denied approval. + +> **WARN** +> +> +> +> **Watch Out!** +> +> It is important to note that transactions can be declined by the Razorpay risk engine and downstream layers, such as issuing banks, contributing to the overall risk decline rate. +> +> + +## Calculating Risk Decline Rate + +The risk decline rate can be calculated by dividing the declined transactions due to perceived risks by the total attempted transactions in the same period and multiplying by a hundred. It is important to note that this calculation has no lag, unlike the fraud-to-sales (FTS) and dispute-to-sales (DTS) ratios. Therefore, no caveats, such as delay in reporting, apply here. + ![How to calculate risk decline rate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/calculate-risk-decline.jpg.md) + +#### Example + +Consider that you are an online retailer and process transactions on your e-commerce platform. In a given month, you processed 1,00,000 transactions, and 2,000 were declined due to risk factors. + +**Risk decline rate** = 2000/100000 x 100 = 2% + +The online retailer's risk decline rate is 2% in this example. This rate indicates that 2% of transactions were declined due to perceived risk factors. It suggests that the retailer has implemented risk management measures to scrutinise transactions effectively while minimising the impact on genuine transactions. + +## Dashboard Actions + +You can use the Dashboard to perform a detailed analysis of **Total sales value**, **Value of risk declines**, **Risk decline rate**, and **Number of risk declines** over a selected period of time. + ![Risk decline rate graph](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/risk-decline-count.jpg.md) + +### Download List of Transactions Declined due to Risk + +You can download the list of transactions declined due to risk using parameters such as IP address, email, and phone number. To download the list, follow the steps given below: + + 1. Log in to your Dashboard. + 2. Navigate to **Risk and Fraud** and click **Download list**. + ![Risk decline list download](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/risk-decline-download-list.jpg.md) + 3. On the **Download risk declined list** page, select the **duration** and add the **Recipient's Details**. Click **Send Request**. + ![Risk decline list download send request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/risk-decline-send-request.jpg.md) + 4. After the request is sent, you will receive an email with the file containing the list of risks declined for the selected duration. diff --git a/llm-content/payments/international-payments/support-non-3ds.md b/llm-content/payments/international-payments/support-non-3ds.md new file mode 100644 index 00000000..5fac5673 --- /dev/null +++ b/llm-content/payments/international-payments/support-non-3ds.md @@ -0,0 +1,53 @@ +--- +title: Support for Non-3D Secure Transactions +description: Enable or disable Non-3DS international card payments from Razorpay Dashboard. +--- + +# Support for Non-3D Secure Transactions + +You can enable or disable Non-3D secure international card payments using your Dashboard.. + +## Prerequisites + +Following are the prerequisites to enable/disable Non-3D secure international card payments: + +- You must have an active account with KYC verification completed. +- You must have [international payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md) enabled for your account. + +## Enable/Disable Support for Non-3D Secure Transactions + +To enable/disable Non-3D Secure transactions, follow these steps: + + + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings** → **Payment Methods**. + 3. Select **International Payments** and click **Request** besides **Support for Non-3D Secure transactions** under **International Cards**. + ![Disable Non-3DS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/non-3ds-disable.jpg.md) + 4. A request pop-up is displayed to confirm if you want to enable the support for Non-3D Secure transactions. Click request. + + +> **INFO** +> +> +> **Feature Enablement** +> +> - The Razorpay Risk team analyses your request for support on Non-3D Secure transactions. The team can either accept or reject your request based on certain parameters. +> - **Non-3DS cards are processed without second-factor authentication**. These international card payments are prone to a higher risk of fraud and chargebacks. In case of any fraud or service-related chargeback, Razorpay does not take the responsibility and the liability lies with the seller. +> + + ![Enable Non-3DS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/non-3ds-enable.jpg.md) + + + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings** → **Payment Methods**. + 3. Select **International Payments** and click on the **Disable** button to disable the support for Non-3D Secure transactions. The **Request** button gets displayed once again. + + +> **INFO** +> +> +> **Feature Enablement** +> +> - The Razorpay Risk team analyses your request for support on Non-3D Secure transactions. The team can either accept or reject your request based on certain parameters. +> - **Non-3DS cards are processed without second-factor authentication**. These international card payments are prone to a higher risk of fraud and chargebacks. In case of any fraud or service-related chargeback, Razorpay does not take the responsibility and the liability lies with the seller. +> diff --git a/llm-content/payments/invoices.md b/llm-content/payments/invoices.md new file mode 100644 index 00000000..b1359024 --- /dev/null +++ b/llm-content/payments/invoices.md @@ -0,0 +1,107 @@ +--- +title: Invoices +heading: About Invoices +description: Issue Razorpay Invoices to your customers from the Razorpay Dashboard or using APIs and start accepting payments. Check the Payment Methods and International Currency support and more. +--- + +# About Invoices + +An Invoice is a digital document that summarises the details of an order or a transaction and allows customers to initiate payments. A typical invoice contains sale transaction information such as the name of the ordered products or services, quantities, price breakup, receipt number, customer information and so on. + +## About Razorpay Invoices + +Use Razorpay Invoices to create, issue and track invoices, both via Dashboard and APIs. Once an invoice is issued, the customer can make the payment. + +## Advantages +- Flexible invoicing + +Create and add items sold, add detailed taxes, offer discounts on the invoice or individual items and add terms and conditions. +- Unlimited invoices + +Create and send as many invoices as you want. You are charged when invoices get paid. +- GST-compliant invoices + +Add GST, discounts and shipping details in the invoice, and Razorpay Invoicing solution does the necessary calculations. +- Embedded payment link + +The customers receive a payment link on SMS or email using which they can easily pay. +- Set expiry date + +Set due dates for invoices after which the invoices expire. +- Partial payments + +You can allow your customers to make partial payments while creating the invoices from the Dashboard. +- Easy integration using APIs + +The invoicing solution can be seamlessly integrated with existing billing and order management systems using APIs. +- Download invoices + +Let your customers download a copy of the invoices for quick and easy references. +- Access control + +You can create roles/teams for different levels of actions on invoices (create, view, edit and so on). Know more about [roles and actions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md). + +You can perform all the actions on invoices from the Dashboard - create, issue, cancel, duplicate, search, update or delete. You can also subscribe to Webhook events for immediate notifications. You can perform most of these actions using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/apis.md). + +## List of Supported Payment Methods +- Online Payment + +Customers can make online payments using [Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md), [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md), [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md), [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md), and **wallets**. + +## International Currency Support + +You can create non-GST invoices in any of the [supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) using the Dashboard or APIs. + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot add tax rates for invoices created using international currencies. +> + +### Supported Platforms + +Razorpay Invoices is supported on the following platforms: + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + + + Web | Android | iOS | Webview + --- + x | x | x | x + + + +## Address Verification System + +If you are accepting international payments, you can use Razorpay's Address Verification System (AVS). AVS verifies if a customer's billing address (postal code and the billing street address) matches the billing address on file with the card issuer. Based on the response from the issuer, Razorpay will accept or cancel the transaction. This helps in the prevention of fraud in international payments. Know more about [Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md). + +## Get Started +Log in to the Dashboard and click **Invoices**. + +### Integrate With Existing Systems +You can easily integrate Razorpay Invoices with your existing order management and billing solution. You can integrate using the Dashboard or using APIs. With API integration, an invoice can be created as soon as an order is created on your order management system. + +### What Next +Understand [how you can use Razorpay Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/how-it-works.md) and the various [Invoice states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md). + +### Related Information +- [How Invoices Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/how-it-works.md) +- [Invoices States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md) +- [Create an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/create.md) +- [Issue an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/issue.md) +- [Search an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/search.md) +- [Update an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/update.md) +- [Duplicate an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/duplicate.md) +- [Delete an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/delete.md) +- [Cancel an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/cancel.md) +- [Download and Print an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/download-print.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/subscribe-to-webhooks.md) +- [Invoice APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/apis.md) diff --git a/llm-content/payments/invoices/apis.md b/llm-content/payments/invoices/apis.md new file mode 100644 index 00000000..a69061e6 --- /dev/null +++ b/llm-content/payments/invoices/apis.md @@ -0,0 +1,39 @@ +--- +title: Invoice APIs +description: List of Invoice APIs available to perform various actions. +--- + +# Invoice APIs + +## List of Invoice APIs +The table below lists the various invoice APIs and gives a brief description of each API: + +API | Description +--- +[Create an invoice with Customer ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/create-with-customer-id.md) | API to create a new invoice using Customer ID. +--- +[Create an invoice with details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/create-with-details.md) | API to create a new invoice using details. +--- +[Update an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/update.md) | API to update an existing invoice +--- +[Issue an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/issue.md) | API to issue a `draft` invoice to customers to make payments +--- +[Delete an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/delete.md) | API to delete an existing `draft` invoice +--- +[Cancel an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/cancel.md) | API to cancel an existing unpaid `issued` invoice +--- +[Fetch an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/fetch-with-id.md) | API to view invoice details by providing the invoice id +--- +[Fetch all invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/fetch-all.md) | API to view a list of all the invoices or a list of all the invoices raised for a customer +--- +[Send an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/resend.md) | API to resend `issued` invoices to customers to make payments + +### Related Information +- [Create an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/create.md) +- [Issue an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/issue.md) +- [Search an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/search.md) +- [Update an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/update.md) +- [Duplicate an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/duplicate.md) +- [Cancel an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/cancel.md) +- [Download and Print an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/download-print.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/subscribe-to-webhooks.md) diff --git a/llm-content/payments/invoices/cancel.md b/llm-content/payments/invoices/cancel.md new file mode 100644 index 00000000..a302c2d0 --- /dev/null +++ b/llm-content/payments/invoices/cancel.md @@ -0,0 +1,8 @@ +--- +title: Cancel an Invoice +description: Cancel an Invoice via Razorpay Dashboard or APIs. +--- + +# Cancel an Invoice + + diff --git a/llm-content/payments/invoices/create.md b/llm-content/payments/invoices/create.md new file mode 100644 index 00000000..42f17bb4 --- /dev/null +++ b/llm-content/payments/invoices/create.md @@ -0,0 +1,153 @@ +--- +title: Create an Invoice +description: Create and save an Invoice. +--- + +# Create an Invoice + +An Invoice is a digital document that summarises the details of an order or a transaction and allows customers to initiate payments. A typical invoice contains sale transaction information such as the name of the ordered products or services, quantities, price breakup, receipt number, customer information and so on. + +### GST and Non-GST Invoices + +You can generate both GST-compliant and non-GST invoices from the Dashboard. + +> **INFO** +> +> +> **Handy Tips** +> +> If GSTIN is not provided before creating an invoice, the option to display **Tax Rate** on the invoice as per the **HSN/SAC code** of each item is not available. However, you can create GST-compliant invoices at any time by clicking the **GST Details** button on the main menu. +> +![Add GSTIN](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/invoices-gstin-add.gif.md) +> + +### International Currency Support + +You can create non-GST invoices in any of the supported international currencies from the Dashboard. You cannot add tax rates for invoices created using international currencies. + +If the invoice is created using any of the supported international currencies, it is recommended to create the **Items** in the corresponding currency. + +#### Change Currency + +While creating an invoice, click **Change Currency** to select from the supported international currencies. On selecting the required currency, the rate of all the line items in the current invoice will be reset to 0. + +Know more about [List of supported international currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies/) + +## Create an Invoice From Dashboard + +> **INFO** +> +> +> **Configure Invoices** +> +> If you are using Razorpay Invoices for the first time, you need to set the Invoice Label as Step 1 and provide GSTIN number as Step 2 (for GST-compliant invoices) before you get started with creating your first invoice. You can create Non-GST compliant invoices if you do not provide GSTIN number. +> +> While creating an invoice, you can change the Invoice Label or create GST Enabled Invoices on the **New Invoice** page. +> + +Watch this video to know how to create an invoice. + +[Video: https://www.youtube.com/embed/tKZ2-s0LmXE?si=NGLVySsNDJPoz0X7] + +To create an invoice: + +1. Log in to the Dashboard. +1. Click **Invoices** → **+Create Invoice**. +1. A new invoice draft is displayed with your company name and logo. +1. Enter a unique **Invoice #**. Provide a brief description or summary of the invoice. +1. Under the **BILLING TO** field, select a customer by searching from the list of existing customers. You can also [create a new customer while creating an invoice](#create-a-new-customer-while-creating-invoice) +1. Enter the **ISSUE DATE** of the invoice. By default, it takes today's date. Use the calendar icon if you want to select a different date as Issue Date. +1. Click the calendar icon to select the **EXPIRY DATE** of the invoice. +The Expiry Date is the date after which the customer cannot pay for the invoice. You can keep this field blank, in such a case, there will not be any Expiry Date for the invoice. You cannot select an Expiry Date in past. +1. Under **BILLING ADDRESS**, the Billing Address as specified for the selected customer is displayed. You can change or remove this address and add a new address. +1. Under **SHIPPING ADDRESS**, click **Add Shipping Address**. The Shipping Address that was added while creating the customer is displayed. You can select the existing Shipping Address or click **Add new Address** to add a new Shipping Address. The newly added address is added to the list of saved Shipping Addresses for the customer. +1. Enter the **PLACE OF SUPPLY**. The Place of Supply is auto-populated based on the Shipping Address. +You can also select a different State or Union Territory from the drop-down list. +This field is displayed for GST-compliant invoices. This is a mandatory field as this determines the GST to be levied on the items. + +> **WARN** +> +> +> **Watch Out!** +> +> If the **PLACE OF SUPPLY**/**SHIPPING ADDRESS** is of a different state from the **BILLING ADDRESS**, the tax is computed as **IGST**, or it is divided into **CGST** and **SGST**. +> + +1. Under **DESCRIPTION**, select an item, add the rate/item and the quantity. Click **Add Line Item** to add multiple items to the invoice. You can also [create a new item while creating an invoice](#create-a-new-item-while-creating-invoice) +1. In the **Add Customer Notes (Optional)** field, you can enter additional details, if any. You can add a maximum of 2048 characters in this field. +1. In the **Add Terms and Conditions (Optional)** field, you can add terms, if any. You can add a maximum of 2048 characters in this field. +1. Select **Enable Partial Payments** to accept multiple payments for the invoice. +1. Click **Save Invoice** to save the invoice as `draft`. You can also click **Finalize and Issue** to save the invoice and `issue` it to the selected customer. + +![Create invoice from Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/inv_cus_5.jpg.md) + +Click **All Invoices** on the top ribbon to view the newly created invoice in the list of all the invoices. Know more about [invoice states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md). + +> **INFO** +> +> +> **Handy Tip** +> +> The GST details will be visible only if the **PLACE OF SUPPLY** is added. +> + +### Create a New Customer While Creating Invoice + +You can also create a customer while creating an invoice. Click **+Create New Customer** which opens up a pop-up page. +1. Specify details of the customer, such as **Company/Individual Name**, **Email**, +**Contact No.** and **GSTIN**. +2. Select the **Billing Address** check box to specify the Billing Address. +3. Next, specify the Shipping Address. If the Shipping Address is the same as Billing Address, select the **Same as Billing Address** check box. +4. Click **Create Customer**. + +The details of the newly created customer are auto-populated on the invoice draft. You can also click **Edit Customer** to make changes to the customer details. This customer will now be available to you for creating more invoices for this customer in future. This customer name is also displayed under the **Customers** menu. + +**Read More**: Know more about [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md). + +![](/docs/assets/images/invoices-inv_gst_1.jpg) + +### Create a New Item While Creating Invoice + +You can also create a new item while creating an invoice. Click **+Create new Item** on the draft invoice which opens up a pop-up page. Specify details of the item, such as **Name**, **Rate per unit** and **Description**. + +For GST-compliant invoices, specify additional details: +1. Select the applicable **Tax Rate** for the item from the drop-down list. You cannot add tax rates for items created using international currencies. +2. **Add Cess** to the order amount. +3. Select **Tax Inclusive** if the item rate per unit includes the tax amount. Select **Tax Exclusive** if the taxes are in addition to the item rate per unit. +4. Enter the 6-8 characters **HSN** or 2-6 characters **SAC** code of the item. +5. Click **Add Item**. + +![](/docs/assets/images/invoices-inv_gst_4.jpg) + +> **WARN** +> +> +> **Watch Out!** +> +> When an item's attributes are modified while creating an invoice, the modified item cannot be reused. The item will then be referred as a **Line item**. In other words, a **Line Item** is created when an **Item** is used as a template, in order to customise its attributes. +> + +## Create an Invoice Using API + +You can create an invoice for the items ordered on your website or app by a customer using +[this](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices.md#create-an-invoice/) API. +However, you can create only non-GST invoices using this API. + +## What Next +If you have saved the invoice as `draft`, you should next [issue it](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/issue.md) to the selected customer to receive payments. You can also choose to do any one of the following actions: + +- [Update invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/update.md) +- [Duplicate invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/duplicate.md) +- [Delete invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/delete.md) + +### Related information +- [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) +- [Invoice States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md) +- [How Invoices Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/how-it-works.md) +- [Download or Print an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/download-print.md) +- [Update an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/update.md) +- [Issue an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/issue.md) +- [Search an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/search.md) +- [Duplicate an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/duplicate.md) +- [Cancel an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/cancel.md) +- [Delete an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/delete.md) diff --git a/llm-content/payments/invoices/delete.md b/llm-content/payments/invoices/delete.md new file mode 100644 index 00000000..a9583be8 --- /dev/null +++ b/llm-content/payments/invoices/delete.md @@ -0,0 +1,10 @@ +--- +title: Delete an Invoice +description: Delete an Invoice using the Razorpay Dashboard or API. +--- + +# Delete an Invoice + +You can delete a `draft` invoice only. + +## Delete an Invoice From Dashboard diff --git a/llm-content/payments/invoices/download-print.md b/llm-content/payments/invoices/download-print.md new file mode 100644 index 00000000..fb9a01d7 --- /dev/null +++ b/llm-content/payments/invoices/download-print.md @@ -0,0 +1,37 @@ +--- +title: Download and Print an Invoice +description: Download Invoices in PDF format and print them. +--- + +# Download and Print an Invoice + +You can download an invoice in PDF format and print it. + +## Download and Print an Invoice + +To download an invoice as a PDF file or print it: +1. Log in to the Dashboard. +1. Click **Invoices** to open the list of invoices. +1. Copy the Payment Link ID of the invoice you want to download or print. +1. Paste it on the browser and open the invoice. +1. The invoice is displayed. Click any of the following: + - **Download Invoice**: This downloads the invoice in PDF format. + - **Print Invoice**: This opens the printer settings. Click the printer icon and complete the process. + +> **INFO** +> +> +> **Handy Tips** +> +> Customer details like name, mobile number, email, and so on will be hidden as Personal Identifiable Information (PII) when invoices are paid and downloaded in PDF format. +> + +### Related Information +- [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) +- [How Invoices Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/how-it-works.md) +- [Invoices States ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md) +- [Create an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/create.md) +- [Search an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/search.md) +- [Update an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/update.md) +- [Duplicate an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/duplicate.md) +- [Delete an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/delete.md) diff --git a/llm-content/payments/invoices/duplicate.md b/llm-content/payments/invoices/duplicate.md new file mode 100644 index 00000000..1ef932a1 --- /dev/null +++ b/llm-content/payments/invoices/duplicate.md @@ -0,0 +1,31 @@ +--- +title: Duplicate an Invoice +description: Create copies of existing Invoices to save time and reduce errors. +--- + +# Duplicate an Invoice + +You can duplicate an existing invoice to save time and reduce errors. + +## Duplicate an Invoice From Dashboard + +Watch this video to see how to create a duplicate of an invoice. + +[Video: https://www.youtube.com/embed/xJm010zbsKE] + +To duplicate an invoice: +1. Log in to the Dashboard. +1. Click on **Invoices**. +1. Search for the invoice for which you want to create a duplicate copy using the [search criteria](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/search.md). +1. Click on the **Invoice ID**. +1. On the right-hand side panel, click the **Duplicate Invoice** button. + +![Duplicate Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/duplicate_invoice.jpg.md) + +This duplicates the invoice. + +## Edit a Newly Created Invoice + +To edit a newly created invoice: +1. In the **New Invoice** draft view, make the necessary changes. For example, you can choose a different **Item** or change the **billing address**. +1. Click **Save** to save the invoice as a `draft` or click **Finalize and Issue** to save and issue the invoice to the customer. diff --git a/llm-content/payments/invoices/faqs.md b/llm-content/payments/invoices/faqs.md new file mode 100644 index 00000000..ff5dff12 --- /dev/null +++ b/llm-content/payments/invoices/faqs.md @@ -0,0 +1,87 @@ +--- +title: Invoices | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Invoices. +--- + +# Frequently Asked Questions (FAQs) + +### 1. Can I raise GST-compliant invoices using Razorpay Invoices? + + Yes, you can raise both non-GST and GST-compliant invoices using Razorpay Invoices. You can use the Dashboard to create non-GST and GST compliant invoices. Using APIs, you can only create a non-GST invoice. Know more about [creating an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/create.md). + + + +### 2. Can I raise invoices in international currency using Razorpay Invoices? + + Yes, you can create non-GST invoices in any of the [supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) using the Dashboard or APIs. + + + +### 3. I have raised an invoice. How do I make changes to it? + + You can make any changes to an invoice in `draft` status. Know more about [updating an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/update.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> If an invoice is issued to a customer, you can make only limited changes such as Expiry Date, Customer Comments and Terms and Conditions. If you need to make other changes to an `issued` invoice, [cancel the invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/cancel.md) and [create a new invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/create.md) with the revised details. However, you can cancel an **unpaid** issued invoice. +> + + + + +### 4. I want to set a date by which the customer should make the payment. How do I do that? + + You can set an Expiry Date for invoices. The customer should make a payment against the invoice within this Expiry Date. The customer cannot make payments for an expired invoice. Know more about [setting Expiry Date for an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/create.md#create-an-invoice-from-dashboard/). + + + +### 5. What is the difference between Issue Date and Expiry Date? + + See: [Glossary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/glossary.md) + + + +### 6. The customer wants to make payments in parts. How do I raise such invoices? + + You can allow partial payments on invoices while raising an invoice or updating an invoice. The customers can also view the history of partial payments they have made by clicking the invoice link shared with them. Know more about [creating an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/create.md) and [updating an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/update.md). + + + +### 7. What are the various payment methods available to the customer? + + A wide range of payment options is available to the customer. Know more about [list of supported payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md#list-of-supported-payment-methods/). + + + +### 8. Where do I track the invoices and their status? + + You get instant notifications about the invoices. You can also subscribe to webhook events and generate reports. Know more about [tracking invoices and viewing reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/how-it-works.md#step-4-track-invoices-and-reports/). + + + +### 9. The customer wants a hard copy of the invoice. + + Your customers can download a PDF copy of the invoice sent to them via email. Open the invoice and click **Download PDF**. + + + +### 10. Can I add more than one billing address for a customer? + + You can add a maximum of three billing addresses for one customer ID. + + + +### 11. What is the maximum permissible amount limit that can be accepted from payments across all Razorpay Invoices? + + The maximum permissible amount limit that can be accepted from payments across all Razorpay Invoices is ₹5,00,000, which cannot be increased. + + + +### 12. Can I use Razorpay to automatically generate invoices/receipts for customers after they complete payment on my mobile app or website? + + No, [Razorpay Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is designed to initiate and collect payments, not to generate accounting invoices or receipts after payment completion. diff --git a/llm-content/payments/invoices/glossary.md b/llm-content/payments/invoices/glossary.md new file mode 100644 index 00000000..fb3f8cc1 --- /dev/null +++ b/llm-content/payments/invoices/glossary.md @@ -0,0 +1,44 @@ +--- +title: Invoices | Glossary +heading: Glossary +description: A list of commonly used terms related to Razorpay Invoices. +--- + +# Glossary + +The following table lists all the commonly used terms and their definitions used in Invoices: + +Term | Definition +--- +Invoice | An Invoice is a digital document that summarises the details of an order or a transaction and allows customers to initiate payments. A typical invoice contains sale transaction information such as the name of the ordered products or services, quantities, price breakup, receipt number, customer information and so on. +--- +GSTIN | GST Identification Number +--- +CIN | Corporate Identity Number +--- +IGST | Integrated Goods and Service Tax +--- +SGST | State Goods and Service Tax +--- +CGST | Central Goods and Service Tax +--- +Expiry Date | The Expiry Date is the date after which the customer cannot pay for the invoice. +--- +Issue Date | The Issue Date is the date on which an invoice is issued and sent to the customer. +--- +Billing Address | The Billing Address is the address of the customer to be used for billing purposes. The Billing Address and Shipping Address may or may not be the same for a customer. +--- +Shipping Address | The Shipping Address is the address of the customer to which the ordered item will be shipped. The Billing Address and Shipping Address may or may not be the same for a customer. +--- +Place of Supply | The Place of Supply is the name of the state or the union territory to which the ordered item will be delivered. +--- +HSN Code | Harmonized System of Nomenclature code of a particular class of item/service under GST. HSN code is 8-character long +--- +SAC Code | Service Accounting Codes (SAC) of a particular class of item/service under GST. The character range of a SAC code can be from 2-6 characters. +--- +Tax Rate | The Tax Rate is the rate of tax applicable for a particular class of item as per the HSN/SAC code. +--- +Unit Price | The Unit Price is the price of a single item. +--- +Payment Link | A short URL added in the invoice notifications that are sent to the customers via email or SMS. The customers can click the link to make online payments. +--- diff --git a/llm-content/payments/invoices/how-it-works.md b/llm-content/payments/invoices/how-it-works.md new file mode 100644 index 00000000..a6a33f0b --- /dev/null +++ b/llm-content/payments/invoices/how-it-works.md @@ -0,0 +1,84 @@ +--- +title: How Invoices Work +description: Create Invoices, send them to customers to receive payments and perform other actions. +--- + +# How Invoices Work + +Given below is a complete end-to-end flow about how you can use Razorpay Invoices. + +![Invoices Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/invoices-invoices-flow-chart.jpg.md) + +### Step 1: Create an Invoice + +[Create an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/create.md) by providing all the required details. You can set an expiry date and enable partial payments. + +Save the invoice. The invoice is in `draft` status. Know more about [invoice states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md). + +> **INFO** +> +> +> **Handy Tips** +> +> - You can [update](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/update.md), [delete](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/delete.md), or [create a duplicate ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/duplicate.md) of an invoice in `draft` status. + +> - **Invoice APIs**: +> - [Create an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices.md#create-an-invoice) +> - [Update an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices.md#update-an-invoice) +> - [Delete an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices.md#delete-an-invoice) +> + +### Step 2: Issue an Invoice + +[Issue an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/issue.md) to a customer via email and/or sms. +The customer receives a notification by email or sms with a payment link using which the customer can pay using one of the available [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md#list-of-supported-payment-methods). + +> **INFO** +> +> +> **Handy Tips** +> +> Use the [Issue an Invoice API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices.md#issue-an-invoice). +> + +### Step 3: Receive Payments + +Customer clicks the payment link and tries to make the payment. +- If [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) payments was enabled, the customer chooses the amount to be paid. +- The customer chooses the mode of payment: Pay Online or Pay via Bank Transfer + +Customer makes a successful payment. The invoice is marked as `paid` or `partially paid`. You receive a notification about the payment. + +> **INFO** +> +> +> **Handy Tips** +> +> After the payment is captured, the amount is settled to your account as per the settlement schedule. Know more about [payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md), [settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md), [ refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) and [disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md). +> + +### Step 4: Track Invoices and Reports + +- Notifications + +You receive notifications regarding activity on invoices via SMS, emails and webhook. Know more about [subscribing to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/subscribe-to-webhooks.md). +- Track Payments + +Track payments made against the issued invoices on Dashboard. Click **Invoices** from the left menu. All the invoices are listed with their status under **Invoices**. +- Reports + +Detailed insights can be gained using reports and real-time data on the Dashboard. These reports can then be used for accounting and reconciliation purposes. Know more about [reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md). + +### Related Information +- [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) +- [Invoices States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md) +- [Create an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/create.md) +- [Issue an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/issue.md) +- [Search an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/search.md) +- [Update an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/update.md) +- [Duplicate an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/duplicate.md) +- [Delete an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/delete.md) +- [Cancel an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/cancel.md) +- [Download and Print an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/download-print.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/subscribe-to-webhooks.md) +- [Invoice APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/apis.md) diff --git a/llm-content/payments/invoices/issue.md b/llm-content/payments/invoices/issue.md new file mode 100644 index 00000000..611c31df --- /dev/null +++ b/llm-content/payments/invoices/issue.md @@ -0,0 +1,44 @@ +--- +title: Issue an Invoice +description: Issue Invoices to customers and receive payments. +--- + +# Issue an Invoice + +A `draft` invoice can be issued to any one of the listed customers. Know more about [invoice states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md). + +## Issue an Invoice From Dashboard + +Watch this video to see how to issue an invoice. + +[Video: https://www.youtube.com/embed/Ed4K_gNJ800] + +To issue an invoice: +1. Log in to the Dashboard. +2. Click **Invoices**. +3. Search for the **Draft** invoice that you want to issue using the [search criteria](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/search.md). +4. Select the **Invoice Id**. +5. On the right-hand side panel, click **Finalize and Issue**. +6. You can choose to send the invoice either by SMS or email or both by selecting the mobile number and email address. + ![Select Medium to Send Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/invoices-invoice-issue.jpg.md) +7. Click **Issue Invoice**. + +![Select Medium to Send Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/invoices-invoice-issue.jpg.md) + +This sends the invoice to the customer along with a short URL called **Payment Link** using which the customer can make the payment. + +## Issue an Invoice Using API +You can issue a `draft` invoice using [this](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices.md#issue-an-invoice/) API. + +### Related Information +- [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) +- [How Invoices Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/how-it-works.md) +- [Invoices States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md) +- [Create an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/create.md) +- [Search an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/search.md) +- [Update an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/update.md) +- [Duplicate an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/duplicate.md) +- [Delete an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/delete.md) +- [Cancel an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/cancel.md) +- [Download and Print an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/download-print.md) +- [Invoice APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/apis.md) diff --git a/llm-content/payments/invoices/items.md b/llm-content/payments/invoices/items.md new file mode 100644 index 00000000..670c2665 --- /dev/null +++ b/llm-content/payments/invoices/items.md @@ -0,0 +1,33 @@ +--- +title: Invoices | Items +heading: About Items +description: Create Items that can be billed using Razorpay Invoices. +--- + +# About Items + +Items are products or services that you can add to [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) and charge customers for. You can create an item on your Razorpay [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard.md) from **Invoice** → **Items** or using [Items API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/create-item.md). When an item is created, it appears on the list of items in the Dashboard. + +## Item Life Cycle + +Status | Description +--- +Active | Once created, an item is said to be in the active state. Items in this state can be added to an Invoice to be sent to customers. +--- +Inactive | An item can be marked inactive. Once in this state, the item cannot be added to an Invoice. +--- +Deleted | You cannot delete an item with which Invoices have been created already. You can only delete an item that has never been used before with an Invoice. + +## API and Dashboard Actions +You can perform the following actions using Items APIs and on the Dashboard. + +Actions | API Link | Dashboard Link +--- +Create an item | [Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/create-item.md) | [Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/create.md) +--- +Update details of an item | [Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/update-item.md) | [Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/update.md) +--- +Retrieve details of items | [All items](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/fetch-all-items.md) +[Specific item](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/fetch-with-id-item.md) | NA +--- +Delete an item | [Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices/delete-item.md) | [Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/delete.md) diff --git a/llm-content/payments/invoices/items/dashboard.md b/llm-content/payments/invoices/items/dashboard.md new file mode 100644 index 00000000..e78569f8 --- /dev/null +++ b/llm-content/payments/invoices/items/dashboard.md @@ -0,0 +1,55 @@ +--- +title: Items Dashboard +description: Create, update and delete Items using Razorpay Dashboard. +--- + +# Items Dashboard + +Items are products or services that you can add to [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) and charge to customers. You can create an item on your Dashboard from **Invoice** → **Items**. Once created, it appears on the list of items in the Dashboard. + +## Create an Item + +To create an item via Dashboard: + +1. Log in to the Dashboard. +1. Navigate to **Invoices** → **Items**. +1. Click **New Item**. +1. Enter the following: + 1. **Name** + 1. **Rate** + 1. **Description** + +![Create an item in dashboard fill details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/items-add-item.jpg.md) + +Once an item is created, it will appear on the list of created item and also in the drop-down menu at the time of invoice creation. + +![List of created items](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/items-item-list.jpg.md) + +## Edit an Item + +To update the details of an item: + +1. Navigate to **Invoices** → **Items**. +1. In the item list, click on the desired **Item Id**. + ![](/docs/assets/images/items-item-list.jpg) +1. In the **Edit Item** page, enter the following: + 1. **Name** + 1. **Rate** + 1. **Description** +1. Click **Save**. + +## Delete an Item + +To delete an item: +1. Navigate to **Invoices** → **Items**. +1. Hover over the desired item and click **delete**. + +![Delete items option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/items-delete-item.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot delete an item with which invoices have already been created. +> diff --git a/llm-content/payments/invoices/resend.md b/llm-content/payments/invoices/resend.md new file mode 100644 index 00000000..2652c9e4 --- /dev/null +++ b/llm-content/payments/invoices/resend.md @@ -0,0 +1,38 @@ +--- +title: Resend an Invoice +description: Resend Invoices as a payment reminder or if the customer has not received the link. +--- + +# Resend an Invoice + +You can resend an invoice as a payment reminder or just in case the customer has not received the link. + +## Resend an Invoice Using Dashboard + +Watch this video to see how to resend an invoice to a customer. + +[Video: https://www.youtube.com/embed/21fY3QlC4HE] + +1. Log in to the Dashboard. Click on **Invoices**. +1. Search for the **Draft** invoice that you want to resend using the [search criteria](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/search.md). +1. Select the **Invoice Id**. +1. An invoice in `issued` status cannot be updated. However, you can change the **EXPIRY DATE**, **CUSTOMER NOTES** and **TERMS AND CONDITIONS**. +1. On the right-hand side panel, click **Resend Invoice**. + +The invoice details along with the **Payment Link** is resent to the customer using which the customer can pay. + +## Resend an Invoice Using API +You can resend `issued` invoices using [this](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices.md#send-notifications/) API. + +### Related Information +- [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) +- [How Invoices Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/how-it-works.md) +- [Invoices States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md) +- [Create an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/create.md) +- [Search an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/search.md) +- [Update an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/update.md) +- [Duplicate an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/duplicate.md) +- [Delete an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/delete.md) +- [Cancel an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/cancel.md) +- [Download and Print an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/download-print.md) +- [Invoice APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/apis.md) diff --git a/llm-content/payments/invoices/search.md b/llm-content/payments/invoices/search.md new file mode 100644 index 00000000..f13ff256 --- /dev/null +++ b/llm-content/payments/invoices/search.md @@ -0,0 +1,33 @@ +--- +title: Search an Invoice +description: Search for an Invoice. +--- + +# Search an Invoice + +You can search for invoices (except those marked **Deleted**) on the Dashboard by specifying various filters. Know more about [invoice states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md). + +## Search an Invoice From Dashboard +1. Log in to the Dashboard. +2. Select **Invoices** from the left menu and search for an invoice under **Invoices** by specifying filters. + +![Invoice List](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/invoices-invoices-list-view.jpg.md) + +Filter | Description +--- +Invoice Status | The status of the invoice +--- +Invoice Id | Unique identifier of the invoice +--- +Receipt No. | Receipt number of the invoice +--- +Customer Contact | Registered contact of the customer +--- +Customer Email | Email address of the customer +--- +Notes | Additional information stored in the `Customer Notes` field while creating the invoice. +--- +Currency Type | The type of currency used for creating an invoice. + Indian Rupee or an international currency + +## Search an Invoice Using API diff --git a/llm-content/payments/invoices/states.md b/llm-content/payments/invoices/states.md new file mode 100644 index 00000000..3fcf86f1 --- /dev/null +++ b/llm-content/payments/invoices/states.md @@ -0,0 +1,11 @@ +--- +title: Invoice States +description: List of various Invoice states and their significance. +--- + +# Invoice States + +An invoice starts in the `draft` state and moves through several different states in its life cycle. + +## Invoice States and Descriptions +Given below is an illustration of the life cycle of an invoice. diff --git a/llm-content/payments/invoices/subscribe-to-webhooks.md b/llm-content/payments/invoices/subscribe-to-webhooks.md new file mode 100644 index 00000000..b4aa6f04 --- /dev/null +++ b/llm-content/payments/invoices/subscribe-to-webhooks.md @@ -0,0 +1,9 @@ +--- +title: Invoices | Subscribe to Webhooks +heading: Subscribe to Webhooks +description: Subscribe to various webhook events related to Invoices to receive instant notifications. +--- + +# Subscribe to Webhooks + +Subscribe to Webhook events relevant to invoices. diff --git a/llm-content/payments/invoices/update.md b/llm-content/payments/invoices/update.md new file mode 100644 index 00000000..73d8b367 --- /dev/null +++ b/llm-content/payments/invoices/update.md @@ -0,0 +1,56 @@ +--- +title: Update an Invoice +description: Edit an Invoice. +--- + +# Update an Invoice + +You can only update a `draft` invoice. Know more about [invoice states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md). + +## Update an Invoice From Dashboard + +Watch this video to see how to update an invoice. + +[Video: https://www.youtube.com/embed/mTtf9jlYXd4] + +To update an invoice: +1. Log in to the Dashboard. +1. Click on **Invoices**. +1. Search for the **Draft** invoice that you want to update using the [search criteria](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/search.md). +1. Select the **Invoice Id**. +1. The following information can be edited: + - Customer details + - Description + - Expiry date of the invoice + - Notes + - Billing Address + - Shipping Address + - Partial payments + - Label +1. Click **Save Invoice**. + +> **WARN** +> +> +> **Watch Out!** +> +> When an item's attributes are modified at the time of invoice creation, the modified item cannot be reused. The item will then be referred as a **Line item**. In other words, a **Line Item** is created when an **Item** is used as a template, in order to customise its attributes. +> + +The invoice now displays the updated details. + +## Update an Invoice Using API +You can update a `draft` invoice using [this](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices.md#update-an-invoice) API. + +### Related Information +- [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) +- [Invoices States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/states.md) +- [How Invoices Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/how-it-works.md) +- [Create an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/create.md) +- [Issue an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/issue.md) +- [Search an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/search.md) +- [Duplicate an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/duplicate.md) +- [Delete an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/delete.md) +- [Cancel an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/cancel.md) +- [Invoice APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/apis.md) +- [Download and Print an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices/download-print.md) diff --git a/llm-content/payments/invoices/use-cases.md b/llm-content/payments/invoices/use-cases.md new file mode 100644 index 00000000..ccd77054 --- /dev/null +++ b/llm-content/payments/invoices/use-cases.md @@ -0,0 +1,99 @@ +--- +title: Invoices Use Cases +description: Explore the diverse use cases of Razorpay Invoices. A robust system to issue invoices to your customers. +--- + +# Invoices Use Cases + +Unlock the potential of seamless invoicing with Razorpay Invoices, a comprehensive tool for creating, issuing, and tracking invoices with ease for businesses of all scales. + +Razorpay Invoices are engineered to streamline your billing process and are equipped with features to generate GST-compliant invoices, embed payment links, and offer detailed financial control. + + +### Freelance Services + + Acme at DesignWorks uses Razorpay Invoices to bill their clients for graphic design services, providing itemised invoices complete with taxes and discounts. + + **Benefits for Acme at DesignWorks**: + + + + Flexible Invoicing + + Craft detailed invoices with line items for different design services and applicable taxes. + + + +### Partial Payments + + Offer clients the convenience to pay in instalments for larger project fees. + + + +### GST-Compliant + + Automatically calculate and incorporate GST for compliant billing. + + + +### Embedded Payment Link + + Clients receive invoices with an integrated payment link via email, streamlining the payment process. + + + + + + +### Consulting Agencies + + Acme Consulting issues Razorpay Invoices for their advisory services, adding specific terms and conditions pertinent to their consultancy. + + **Benefits for Acme Consulting**: + + + + Access Control + + Assign roles within the team for invoice management, ensuring that only authorised personnel can create or modify invoices. + + + +### Downloadable Invoices + + Clients can download invoices for their records, facilitating ease of access and record-keeping. + + + +### Real-time Notifications + + Receive updates as soon as invoices are viewed or paid, keeping cash flow management timely and updated. + + + + + + +### Small to Medium Enterprises (SMEs) + + Acme Supply leverages Razorpay Invoices to bill clients for hardware supplies, with detailed descriptions and the flexibility to add discounts. + + **Benefits for Acme Supply**: + + + + GST-Compliant Invoicing + + Automatically handle GST calculations, discounts, and add shipping details in a compliant manner. + + + +### Downloadable Invoices + + Allow customers to download their invoices directly, ensuring transparency and trust. + + + +### Real-Time Invoice Tracking + + Stay on top of payments with real-time tracking and notifications upon receipt of payment. diff --git a/llm-content/payments/magic-checkout.md b/llm-content/payments/magic-checkout.md new file mode 100644 index 00000000..8707ca48 --- /dev/null +++ b/llm-content/payments/magic-checkout.md @@ -0,0 +1,106 @@ +--- +title: Razorpay Magic Checkout +heading: About Magic Checkout +description: Integrate Razorpay Magic Checkout for COD, faster checkouts, reduced RTOs, and gain order insights. Simplify payments with one gateway and accept payments using various plugins. +--- + +# About Magic Checkout + +- **Magic Checkout Changelog**: Discover new features, updates and deprecations related to the Razorpay Magic Checkout (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about Magic Checkout. + +Razorpay Magic Checkout enables seamless prepaid and COD transactions on your platform. It reduces COD RTOs by analysing customer shopping history and address quality. Customers can securely save addresses and payment details for future use across Razorpay network sites. You can efficiently run promotions with coupon-based discounts for your customers. + +> **INFO** +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please fill out the [form](https://share.hsforms.com/1l6lBAl5_S82QSEN8_HMYHg3b5b6) to get this feature activated on your Razorpay account. +> - At present, Magic Checkout is available only on [Web](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/web.md), [Android](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/android-integration.md), [iOS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/ios-integration.md), [React Native Android](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/react-native-android-integration.md), [React Native iOS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/react-native-ios-integration.md), [Flutter](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/flutter-integration.md), [Capacitor](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/capacitor-integration.md), [WooCommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md) and [Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify.md) integrations. +> + +Watch the video below to know more about Magic Checkout. + +[Video: https://www.youtube.com/embed/TdZa73eheww] + + +### Advantages + + - **Seamless Prepaid and COD Transactions** + + Magic Checkout offers flexible payment options for both prepaid and cash-on-delivery transactions, providing a smooth checkout experience for customers. + + - **Faster Checkout Experience** + + Streamlined checkout process ensures quicker and smoother transactions, enhancing customer satisfaction and boosting completed purchases. + + - **Increased conversions** + + Frictionless checkout experience reduces cart abandonment rates and increases sales. + + - **Save Customer Addresses and Payment Details** + + Securely store customer addresses and payment information during checkout, enabling faster and convenient future transactions. + + - **Reduced RTOs** + + - Prevent customers with past RTO behaviour from placing COD orders. Filter out COD orders with gibberish/incomplete addresses. + - You can manually review potential RTO orders and decide whether to provide customers COD option based on the insights we provide. + + - **Efficient Promotions** + + Easily run coupon-based discounts to foster customer loyalty and drive increased sales. + + + +### Prerequisites + + - Create a [Razorpay account](https://dashboard.razorpay.com/signup). + - [Generate test API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) on the Dashboard. + + +> **INFO** +> +> +> **Handy Tips** +> +> The test mode is a simulation mode that you can use to test your integration flow. Your customers will not be able to make payments in this mode. +> +> When your integration is complete, switch to live mode and generate live mode API keys. Replace test mode keys with live mode keys in the integration to accept payments from customers. +> + + + +## Try Our Checkout + +You can test our Checkout by clicking the **Pay with Magic Checkout** button. Provide your phone number, email address, select your preferred payment method and complete the test payment. + +[Try Magic Checkout](https://razorpay.com/demopg3/) + +## Supported Platforms + +Razorpay Magic Checkout is supported on the following platforms: + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + + + Web | Android | iOS | Webview + --- + x | x | x | x + + + +### Related Information + +- [How Magic Checkout Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/how-it-works.md) +- [Use Cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/use-cases.md) +- [Features](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/features.md) +- [Customisations and Extensions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/customisations-extensions.md) diff --git a/llm-content/payments/magic-checkout/abandoned-cart.md b/llm-content/payments/magic-checkout/abandoned-cart.md new file mode 100644 index 00000000..b6066c93 --- /dev/null +++ b/llm-content/payments/magic-checkout/abandoned-cart.md @@ -0,0 +1,99 @@ +--- +title: Abandoned Cart Webhook | Razorpay Magic Checkout +heading: Abandoned Cart Webhook +description: Enable the abandoned cart webhook to track drop-offs and retarget customers who leave without completing their purchase. +--- + +# Abandoned Cart Webhook + +An abandoned cart occurs when a customer adds items to their cart and initiates checkout but does not complete the purchase. For example, a customer might enter their shipping details but leave the site before making the payment. + +By enabling the abandoned cart webhook, you can track when a customer drops off during the checkout journey. This helps you retarget them using their contact information and recover potentially lost sales. + +## Enable Abandoned Cart Webhook + +1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. +2. Select **Shopify**, **WooCommerce** or **Custom E-Commerce Platform** from the **Platform** drop-down list. Enter the required information based on your selection. +3. Navigate to **Checkout Setup** and toggle on **Enable the Abandoned webhook to track**. +4. Enter the URL where you want to receive the abandoned checkout data. +5. Click **Save** → **Save settings**. + +![enable abandoned webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-abandoned-cart.jpg.md) + +### Sample Payload + +Given below is a sample payload: + +```json: Abandoned Cart Webhook Payload +{ + "utm_parameters": { + "fbclid": "test_fbclid", + "utm_campaign": "campaign_value", + "utm_content": "content_value", + "utm_medium": "medium_value", + "utm_source": "fb" + }, + "shop_id": "magic-checkout-test-store-1", + "platform": "shopify", + "token": "a9de14647f2c1e7b58cafeac93c4712c", + "cart_token": "c1-68be3bdc331cfec1e79d05d8c4caa7d7", + "email": "", + "phone": "+919999999999", + "abandoned_checkout_url": "https://magic-checkout-test-store-url", + "currency": "", + "line_items": [ + { + "image_url": "https://image_url", + "name": "test product 2", + "price": 5000, + "product_id": "7652090314919", + "quantity": 1, + "sku": "123-A", + "tax_amount": 0, + "taxable": true, + "variant_price": 5000, + "variant_id": "43306810998951", + "variant_title": "Default Title", + "store_name": "", + "gram": "212", + "title": "" + } + ], + "tax_details": { + "taxes_included": true, + "total_tax": 314 + }, + "line_items_total": "5000", + "promotions": [ + { + "code": "off12", + "value": 1200 + }, + { + "code": "nector_coins", + "value": 300 + } + ], + "customer": { + "email": "", + "first_name": "Gaurav", + "last_name": "Kumar", + "Shipping_address": { + "First_name": "Gaurav", + "Last_name": "Kumar", + "Address1": "Near Nehru Road", + "Address2": "Ram Krishna Colony", + "City": "Bengaluru", + "Province": "Karnataka", + "Country": "India", + "Zip": "829122", + "Phone": "+919999999999", + "Name": "", + "Province_code": "KA", + "Country_code": "IN", + "Country_name": "India" + }, + "created_at": "" + } +} +``` diff --git a/llm-content/payments/magic-checkout/analytics/conversion.md b/llm-content/payments/magic-checkout/analytics/conversion.md new file mode 100644 index 00000000..943ee20a --- /dev/null +++ b/llm-content/payments/magic-checkout/analytics/conversion.md @@ -0,0 +1,118 @@ +--- +title: Conversion Analytics | Razorpay Magic Checkout +heading: Conversion Analytics +description: Track Magic Checkout conversion performance with funnel analysis, checkout rates and user behavior insights on your dashboard. +--- + +# Conversion Analytics + +Magic Checkout's Conversion Analytics offers a detailed overview of your business's conversion activities and performance metrics. + +It offers insights into your conversion funnels, checkout completion rates and user behavior patterns to help you optimise your checkout experience via: + +- **Conversion Funnel Analysis**: Track user progression through checkout steps. +- **User Behaviour Insights**: Understand logged-in vs logged-out user performance. +- **Checkout Optimisation**: Identify drop-off points and improvement opportunities. + +> **WARN** +> +> +> **Watch Out!** +> +> This feature is available only for Shopify users. +> + +## Get Started + +Follow the steps given below to view insights about the various conversion activities: + +1. Log in to the Dashboard. +2. Navigate to **Magic Checkout** → **Analytics** and click **Conversion**. + +You can now view the **Conversion Analytics** on the Dashboard with conversion metrics. + +![View conversion analytics on dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-conversion.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> - Select the date range of your choice to view the data. +> - Use **Compared to** option to compare current data with a previous period or specific date range. Green indicators show improvements, while red indicators show declines. +> - Hover over the card headings to understand the calculation methodology. +> - Hover alongside the graph lines to view the exact values for specific time periods. +> - Download detailed reports including UTM attribution data (date, source, medium, campaign, orders, sales) and conversion funnel details (checkout render, address step reached, payment step reached, payment attempted, payment success, checkout conversion rates) for further analysis. +> + +## Compare Data Across Time Periods + +You can compare your current data against previous periods to track performance changes: + +1. In the **Compared to** field, select the date or time range you want to compare against. +2. View the results with clear indicators: + - **Green arrows** indicate improvements. + - **Red arrows** show declines. + - **Descriptive text** explains the changes. For example: `Conversion rate increased from 21.26% to 27.78%`. + - **Charts display overlapping lines** for visual comparison between the selected time periods, with date labels at the bottom showing which line represents which period. + +![Compare analytics data](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-conversion-comparison.jpg.md) + +## Conversion Metrics + +The Conversion Analytics dashboard displays the following metrics to track your Magic Checkout conversion performance: + +Field | Description | Calculation +--- +Checkout conversion rate | Percentage of sessions with one or more successful Magic Checkout order. A session begins when a user arrives at Magic Checkout and a new session is created after 30 minutes of inactivity. | Total sessions (minimum one successful Magic Checkout order) divided by total Magic Checkout sessions. +--- +Order conversion rate | Percentage of unique Magic Checkout orders placed within total number of sessions. | Total orders divided by total Magic Checkout sessions. +--- +Total orders | Total number of Magic Checkout orders placed. | Count of orders placed. +--- +Address pre-fill rate | Percentage of logged-in users who see their addresses prefilled at checkout. | Number of logged-in users with pre-filled addresses divided by number of logged in users. + +## Detailed View + +The **Detailed view** section displays charts that allow you to analyse trends and patterns in your conversion data: + +- **Checkout conversion funnel**: Bar chart showing user progression through each checkout step from initiation to order completion. + ![View checkout conversion funnel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-conversion-funnel.jpg.md) +- **Logged out conversion funnel**: Step-by-step funnel analysis for users who started as guests and logged in during checkout. +- **Logged in conversion funnel**: Performance breakdown for users who were already logged in when they started checkout. + ![View logged-in & logged-out conversion funnel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-conversion-logged-in-out.jpg.md) +- **Checkout conversion rate over time**: Line chart tracking overall conversion rate trends across your selected time period. + ![View checkout conversion rate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-conversion-rate.jpg.md) +- **Logged out conversion rate**: Line chart showing conversion trends for guest users over time. +- **Logged in conversion rate**: Line chart displaying conversion patterns for pre-logged users over time. + ![View logged-in & logged-out conversion funnel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-conversion-logged-in-out-rate.jpg.md) +- **Sales attribution**: Checkout performance segmented by UTM source, medium and campaign data showing how different traffic sources contribute to orders and revenue. + ![View sales attribution](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-conversion-sales-attribution.jpg.md) + +## Bar Chart Terms + +The following table explains each bar displayed in the conversion charts: + +Term | Description +--- +Checkout started | Number of sessions in which a user initiated checkout. Each session is counted once, even if the user enters checkout multiple times within the same session. +--- +Address step reached | Number of sessions in which a user reached the address or shipping details step. Each session is counted once, even if the step is revisited. +--- +Payment step reached | Number of sessions in which a user reached the payment details step. Each session is counted once, regardless of how many times the payment step is viewed. +--- +Payment attempted | Number of sessions in which a user attempted to complete payment. Each session is counted once, even if multiple payment attempts are made. +--- +Order placed | Number of sessions that resulted in at least one successful order. Each session is counted once, even if multiple orders are placed in the same session. + +> **WARN** +> +> +> **Watch Out!** +> +> - The **Order placed** metric in the checkout funnel reflects the number of sessions with at least one successful order, whereas **Total orders** counts every individual transaction. If a user completes multiple purchases within a single session, the funnel records it as one **Order placed** event. For instance, if 43 sessions result in 50 total orders, it indicates that 7 additional orders were placed by users during their existing sessions. +> +> - The **Order conversion rate** may appear higher because it accounts for every individual transaction. In contrast, the **Checkout conversion rate** is session-based and only tracks whether a session was successful, regardless of how many orders were placed. When users place multiple orders in a single visit, the **Order conversion rate** will be higher while the **Checkout conversion rate** remains stable. +> +> - The **Address pre-fill rate** counts all users who are logged in by the time they reach the address step. However, the logged-in funnel tracks **pre-logged** users who were already authenticated before starting the checkout process. +> diff --git a/llm-content/payments/magic-checkout/analytics/order.md b/llm-content/payments/magic-checkout/analytics/order.md new file mode 100644 index 00000000..345f24a7 --- /dev/null +++ b/llm-content/payments/magic-checkout/analytics/order.md @@ -0,0 +1,98 @@ +--- +title: Order Analytics | Razorpay Magic Checkout +heading: Order Analytics +description: Access detailed insights into your order activities with Razorpay Magic Checkout directly from the Razorpay Dashboard. +--- + +# Order Analytics + +Magic Checkout's Order Analytics offers a detailed overview of your business's order activities and performance metrics. + +It helps you optimise checkout performance and make data-driven business decisions by tracking: + +- **Order Volume Trends**: Monitor total orders and identify peak ordering times for campaign optimisation. +- **Sales Performance**: Track revenue trends, average order values and growth opportunities. +- **Payment Method Distribution**: Analyse prepaid vs COD patterns to reduce RTO risk and optimise payment options. + +> **WARN** +> +> +> **Watch Out!** +> +> This feature is available only for Shopify users. +> + +## Get Started + +Follow the steps given below to view insights about the various order activities: + +1. Log in to the Dashboard. +2. Navigate to **Magic Checkout** → **Analytics** and click **Order**. + +You can now view the **Order Analytics** on the Dashboard with order performance metrics. + +![View order analytics on dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-order.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> - Select the date range of your choice to view the data. +> - Use **Compared to** option to compare current data with a previous period or specific date range. Green indicators show improvements, while red indicators show declines. +> - Hover over the card headings to understand the calculation methodology. +> - Hover alongside the graph lines to view the exact values for specific time periods. +> - Download detailed reports with daily data including date, total orders, total sales (in INR), prepaid orders, prepaid sales (in INR), COD orders and COD sales (in INR) for further analysis. +> + +## Compare Data Across Time Periods + +You can compare your current data against previous periods to track performance changes: + +1. In the **Compared to** field, select the date or time range you want to compare against. +2. View the results with clear indicators: + - **Green arrows** indicate improvements. + - **Red arrows** show declines. + - **Descriptive text** explains the changes. For example: `Orders increased from 55 to 67`. + - **Charts display overlapping lines** for visual comparison between the selected time periods, with date labels at the bottom showing which line represents which period. + +![Compare analytics data](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-order-comparison.jpg.md) + +## Order Metrics + +The Order Analytics Dashboard displays the following metrics to track your Magic Checkout order performance: + +Field | Description | Calculation +--- +Total orders | Total number of Magic Checkout orders placed. | Count of orders placed. +--- +Total sales | Total sales amount from Magic Checkout order. | Sum of net sales, additional fees, duties, shipping and taxes. +--- +Average order value | Average value of Magic Checkout orders. | Total sales divided by total orders. +--- +Prepaid order share | Percentage of orders paid via prepaid methods. | Total prepaid orders divided by total orders. +--- +Address pre-fill rate | Percentage of logged-in users who see their addresses prefilled at checkout. | Number of logged-in users with pre-filled addresses divided by number of logged in users. +--- +Checkout conversion rate | Percentage of checkout sessions that resulted in an order. | Total sessions (minimum one successful Magic Checkout order) divided by total Magic Checkout sessions. + +> **WARN** +> +> +> **Watch Out!** +> +> **Address pre-fill rate** includes both users who were already logged in when they arrived at checkout and users who log in during the checkout process, provided they have saved addresses available. +> + +## Detailed View + +The **Detailed view** section displays charts that allow you to analyse trends and patterns in your order data: + +- **Total orders**: Line chart tracking total order volume trends throughout the selected time period. +- **Total sales**: Line chart showing total sales revenue patterns. + ![View total orders and sales](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-total-orders-sales.jpg.md) +- **Prepaid and COD share**: Comparative chart showing the distribution between prepaid and COD orders over time. +- **Prepaid and COD sales**: Comparative chart showing revenue distribution between prepaid and COD sales over time. + ![View prepaid and COD share and sales](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-prepaid-cod.jpg.md) +- **Average Order Value**: Line chart displaying AOV fluctuations with hover tooltips showing specific values at different times. + ![View average order value](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-avg-order-value.jpg.md) diff --git a/llm-content/payments/magic-checkout/analytics/reports.md b/llm-content/payments/magic-checkout/analytics/reports.md new file mode 100644 index 00000000..2ccc398c --- /dev/null +++ b/llm-content/payments/magic-checkout/analytics/reports.md @@ -0,0 +1,115 @@ +--- +title: Magic Checkout | View Reports +heading: View Reports +description: Generate and download Magic Checkout Order and Checkout Reports to analyse order performance, customer behaviour and abandoned cart recovery metrics. +--- + +# View Reports + +You can generate Magic Checkout reports from the Dashboard to analyse order performance and customer behaviour on your store. Magic Checkout offers two types of reports: + +- **Order Reports**: Track completed orders placed through Magic Checkout. Use these reports to calculate conversion rates, identify top-performing products and promotions and analyse payment method preferences. +- **Checkout Reports**: Analyse both completed orders and abandoned checkouts to understand the complete customer journey. Use these reports for abandoned cart recovery, checkout funnel analysis and identifying customer drop-off points. + +## Generate Reports + +To generate reports: + +1. Log in to the [Dashboard](https://dashboard.razorpay.com/app) and navigate to **Reports**. +2. In the **Overview** section, click **Download Report**. + ![Download Magic Checkout reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-reports-download.jpg.md) +3. Configure report settings: + 1. Select the report from the drop-down list. + - **Magic Checkout Orders Report** for completed orders only. + - **Magic Checkout Checkout Report** for completed orders and abandoned checkouts. + 2. Enter a file name *(optional)*. + 3. 3. Select the file format. Only `CSV` format is supported for Magic Checkout reports. + ![Configure report settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-reports-download-config.jpg.md) + 4. Choose the duration from the drop-down or toggle **Custom** to set a specific date range. + 5. To receive the report via email, toggle **Yes** in the **Do you want this report in an email?** section and enter email addresses for all recipients. +4. Click **Start Download**. + ![Download report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-reports-download-config-start.jpg.md) +5. Navigate to the **Downloads** section to track the download status and click the download icon to download the report. + ![View and download Magic Checkout reports from Downloads section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-reports-download-view.jpg.md) + +> **INFO** +> +> +> **Schedule Reports** +> +> You can also schedule reports to receive them automatically at regular intervals. This ensures you get timely data for consistent decision-making without manual downloads. Know more about how to [schedule reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md#schedule-reports). +> + +## Data Fields + +The reports contain the following data fields: + + +### Order Reports + + Order reports contain the following data fields: + + + Field | Description + --- + `order_id` | Unique identifier for the order in your system. + --- + `razorpay_order_id` | Unique Razorpay order identifier. + --- + `razorpay_payment_id` | Unique Razorpay payment identifier. + --- + `order_amount` | Total order amount in the smallest currency unit - paise for INR (for example: `12000` is ₹120). + --- + `order_status` | Status of the order. Know more about [Order Status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md#order-states). + --- + `payment_method` | Code of the payment method used. Know more about [Razorpay Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md). + --- + `payment_amount` | Amount paid through the payment method in smallest currency unit. + --- + `payment_status` | Status of payment. Know more about [Payment Status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#payment-life-cycle). + --- + `payment_currency` | Currency code for the payment. + --- + `payment_refund_status` | Refund status of the payment. + --- + `customer_contact` | Customer's contact number. + --- + `customer_email` | Customer's email address. + --- + `shipping_address` | JSON object containing shipping address details including name, contact, address lines, city, state, zipcode, country and landmark. + --- + `promotions` | Array of applied promotions with details like type, code, description, value and reference id. + --- + `utm_parameters` | JSON object containing UTM tracking parameters including source, campaign, medium, content, landing page URL and additional tracking ids like gclid. + --- + `line_items` | Array of product names included in the order. + --- + `line_items_total` | Total value of all line items in the smallest currency unit. + --- + `checkout_created_time` | Timestamp when the checkout was initiated. + --- + `checkout_closed_time` | Timestamp when the checkout was completed. + + + + +### Checkout Reports + + Checkout reports contain all the fields from Order reports plus one additional field: + + + Field | Description + --- + `abandoned_checkout_url` | URL to recover abandoned checkout. This is only populated for incomplete checkouts. + + + +> **INFO** +> +> +> **Handy Tips** +> +> - Checkout reports include both completed orders and abandoned checkouts, while order reports only show completed orders. +> - The `abandoned_checkout_url` field is only populated for customers who initiated checkout but did not complete the purchase. +> - For completed orders, the `abandoned_checkout_url` field will remain empty. +> diff --git a/llm-content/payments/magic-checkout/analytics/rto.md b/llm-content/payments/magic-checkout/analytics/rto.md new file mode 100644 index 00000000..84e06671 --- /dev/null +++ b/llm-content/payments/magic-checkout/analytics/rto.md @@ -0,0 +1,57 @@ +--- +title: RTO Analytics Dashboard | Razorpay Magic Checkout +heading: About RTO Analytics Dashboard +description: View in-depth information about the various RTO activities with Razorpay Magic Checkout on the Razorpay Dashboard. +--- + +# About RTO Analytics Dashboard + +Magic Checkout's RTO Analytics Dashboard provides an in-depth view of the RTO-related activities on the orders received. + +It offers insight into how Magic Intelligence protects the business from risky orders by showing the number of unsafe orders and why they are marked risky via: + + + On the Magic Checkout page, if the COD Intelligence detects a risky order, the Cash on Delivery (COD) payment option is disabled for the customer. This reduces the risk of RTO orders and reduces cost. + + + The Magic Intelligence flags some orders as risky that you can approve, cancel, put an order on hold and review it later manually. Know more about [Manual review of COD Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/review-cod-orders.md). + + +#### Features + +- The Dashboard widgets visualise data and provide insight into the order details. +- Widgets can be modified and customised by duration, such as days and weeks. +- Make smarter business decisions with timely, automated and accurate data. + +## Get Started + +Follow the steps given below to view insights about the various activities: + +1. Log in to the Dashboard. +2. Navigate to **Magic Checkout** → **RTO Analytics**. + +You can now view the **RTO Analytics** tab on the Dashboard. It has three views; [Overview](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto/overview.md), [Risk Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto/risk-report.md) and [RTO Insights](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto/insights.md). + +> **INFO** +> +> +> **Logistics Partners** +> +> We recommend integrating with logistics partners like [Shiprocket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/shiprocket.md), [Delhivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/delhivery.md), [Unicommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/unicommerce.md), [ClickPost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/clickpost.md) and [iThink Logistics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/ithink-logistics.md) to reflect the data on the widget. You can also upload the data in bulk via bulk upload. +> + +> **WARN** +> +> +> **Watch Out!** +> +> - The widgets provided on the RTO Analytics Dashboard are different for each option. +> - You can only view these widgets. +> +> + +### Related information + +- [Risk Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto/risk-report.md) +- [RTO Insights](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto/insights.md) +- [Manually Review COD Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/review-cod-orders.md) diff --git a/llm-content/payments/magic-checkout/analytics/rto/insights.md b/llm-content/payments/magic-checkout/analytics/rto/insights.md new file mode 100644 index 00000000..fcc86c41 --- /dev/null +++ b/llm-content/payments/magic-checkout/analytics/rto/insights.md @@ -0,0 +1,81 @@ +--- +title: RTO Insights | Razorpay Magic Checkout +heading: RTO Insights +description: Find insights about cost savings, risky ZIP codes and IP addresses. Take actions using Razorpay Magic Checkout. +--- + +# RTO Insights + +View information about cost savings, risky ZIP codes and IP Addresses and take specific actions as required. You can generate data for a selected period of up to the last 90 days. + +> **WARN** +> +> +> **Watch Out!** +> +> - We recommend integrating with logistics partners like [Shiprocket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/shiprocket.md), [Delhivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/delhivery.md), [Unicommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/unicommerce.md), [ClickPost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/clickpost.md) and [iThink Logistics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/ithink-logistics.md) to reflect the data on the widget. +> +> - You can only view these widgets. +> + +## Widgets + +The following widgets are available in the **RTO Insights** tab of the [RTO Analytics Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto.md). Check which widgets are applicable when you opt either for: +- COD Intelligence. +- Manual review of COD Orders. + +Widget | COD Intelligence | Manual review of COD Orders +--- +[Cost saved by COD Intelligence](#cost-saved-by-cod-intelligence) | ✓ | x +--- +[Cost Saved Due to Manual Review of COD Orders](#cost-saved-due-to-manual-review-of-cod-orders) | x | ✓ +--- +[RTO Orders by ZIP codes and IP Addresses](#rto-orders-by-ZIP codes-and-ip-addresses) | ✓ | ✓ + +## Cost Saved by COD Intelligence + +The following chart provides insights only when you opt for **COD Intelligence** in the **Settings** section. It displays how much shipping cost you have saved as COD Intelligence blocked risky RTO orders. + +You can filter the data to display it on a **Daily**, **Weekly** or **Monthly** basis. Hover over the graph for more details. + +![RTO Analytics cost saved by COD intelligence graph](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rto-cost-saved-cod.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> The default shipping charge is ₹75. You can enter your average shipping charge in the field. +> ![RTO Analytics customise shipping charge](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rto-cost-saved-cod-charges.jpg.md) +> + +## Cost Saved Due to Manual Review of COD Orders + +The following chart provides insights only when you opt for **Manual review of COD orders** in the **Settings** section. + +The **Cost saved due to manual review of COD orders** widget shows the trend of cost saved. You can view the data **Daily**, **Weekly** or **Monthly**. + +![RTO cost savings via manual review](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rto-manual-review-cost-saved.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> [Automate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/review-cod-orders/workflow.md#how-it-works) your manual review process or let COD Intelligence handle your COD Orders. Know more about the [RTO Analytics Dashboard for COD Intelligence](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto.md). +> + +## RTO Orders by ZIP codes and IP Addresses + +The following widget is available when you opt for either **COD Intelligence** or **Manual review of COD orders** in the **Settings** section. + +This tab displays the RTO orders at the zipcode (PIN code) and IP address level. These are sorted based on the **RTO risk %**. You can also view the total number of orders shipped and returned for each zipcode and IP address. + +![RTO Orders by ZIP codes and IP addresses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rto-zipcode-ip-address.jpg.md) + +You can block or unblock COD orders for a zipcode or an IP address. Orders from these ZIP codes or IP addresses will not be eligible for COD in the future. Click **next** to view more data. + +### Related information + +- [Risk Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto/risk-report.md) +- [Manually Review COD Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/review-cod-orders.md) diff --git a/llm-content/payments/magic-checkout/analytics/rto/overview.md b/llm-content/payments/magic-checkout/analytics/rto/overview.md new file mode 100644 index 00000000..f6b0804e --- /dev/null +++ b/llm-content/payments/magic-checkout/analytics/rto/overview.md @@ -0,0 +1,102 @@ +--- +title: RTO Overview | Razorpay Magic Checkout +heading: RTO Overview +description: Check the various RTO-related widgets available using Razorpay Magic Checkout on the RTO Analytics Dashboard. +--- + +# RTO Overview + +The **Overview** tab on the RTO Analytics Dashboard provides an in-depth view to understand the RTO rate for prepaid and COD orders made on Magic Checkout over a period of time. + +## Widgets + +The following widgets are available in the **Overview** tab of the [RTO Analytics Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto.md). Check which widgets are applicable when you opt for either: +- COD Intelligence. +- Manual review of COD Orders. + +Widget | COD Intelligence | Manual review of COD Orders +--- +[RTO Rate with Magic Checkout](#rto-rate-with-magic-checkout) | ✓ | ✓ +--- +[Delivery Data](#delivery-data) | ✓ | ✓ +--- +[Share of COD](#share-of-cod) | ✓ | ✓ +--- +[COD Order Review Report](#cod-order-review-report) | x | ✓ + +> **WARN** +> +> +> **Watch Out!** +> +> You can only view these widgets. +> + +## RTO Rate with Magic Checkout + +The following widget is commonly available if you opt for either **COD Intelligence** or **Manual Review of COD Orders** in the **Settings** section. + +This chart shows the percentage of RTOs to the total number of orders. You can identify how many RTOs were COD or prepaid. + +You can view the **Overall RTO %** or filter data for COD and prepaid RTOs. You can also compare all three by selecting **View all RTO %**. + +> **INFO** +> +> +> **Handy Tips** +> +> The default graph is for COD RTO %. This tab only considers data after Magic Checkout Integration. +> + +![RTO rate with Magic Checkout graph](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rto-rate-with-mc.jpg.md) + +You can filter data to display it on a **Weekly** or **Monthly** basis. + +## Delivery Data + +The following widget is commonly available when you opt for either **COD Intelligence** or **Manual Review of COD Orders** in the **Settings** section. + +This tab shows the percentage of orders for which you have shared order data. You can share more data with us by: + +- Uploading Data Manually: Click **data by uploading** to share the information manually. + Know how to [upload data manually](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/delivery-status.md#monthly-delivery-data). +- Integrating with Logistics Partners: Click **integrate with your delivery partner** to integrate with [Shiprocket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/shiprocket.md), [Delhivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/delhivery.md), [Unicommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/unicommerce.md), [ClickPost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/clickpost.md) and [iThink Logistics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/ithink-logistics.md) and share the data automatically. + +![RTO Analytics delivery data chart](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rto-delivery-data2.jpg.md) + +## Share of COD + +The following widget is commonly available when you opt for either **COD Intelligence** or **Manual Review of COD Orders** in the **Settings** section. + +This graph shows the percentage of COD orders in the total number of orders received. You can use this to analyse COD trends and take measures to increase the number of prepaid orders. + +You can filter data to display it on a **Daily**, **Weekly** or **Monthly** basis. Hover over the graph for details and the total number of orders. + +![RTO Analytics share of COD chart](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rto-share-of-cod.jpg.md) + +## COD Order Review Report + +The following widget is available only when you opt for **Manual Review of COD Orders** in the **Settings** section. + +The **COD Order Review Report** provides a break-up of orders received and the actions taken on them, that is, whether you have: +- Approved the order for COD payment. +- Cancelled the order for COD payment. +- Put it on hold for review. +- Are yet to take action on the order. + +You can view the data on a **Daily**, **Weekly** or **Monthly** basis for the last 90 days only. + + ![COD Order Review Report on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rto-cod-order-review-report.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> [Automate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/review-cod-orders/workflow.md#how-it-works) your manual review process or let COD Intelligence handle your COD Orders. Know more about the [RTO Analytics Dashboard for COD Intelligence](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto.md). +> + +### Related Information + +- [RTO Insights](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto/insights.md) +- [Manually Review COD Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/review-cod-orders.md) diff --git a/llm-content/payments/magic-checkout/analytics/rto/risk-report.md b/llm-content/payments/magic-checkout/analytics/rto/risk-report.md new file mode 100644 index 00000000..c716db1f --- /dev/null +++ b/llm-content/payments/magic-checkout/analytics/rto/risk-report.md @@ -0,0 +1,93 @@ +--- +title: Risk Report | Razorpay Magic Checkout +heading: Risk Report +description: View and compare users based on RTO Risk. Find reasons for risk flagging using Razorpay Magic Checkout. +--- + +# Risk Report + +You can compare the probability of risk associated with orders reviewed via COD Intelligence or manual review. View the graphs for a selected period up to the last 90 days. + +## Widgets + +The following widgets are available in the **Risk Report** tab of the [RTO Analytics Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto.md). Check which widgets are applicable when you opt either for: +- COD Intelligence. +- Manual review of COD Orders. + +Widget | COD Intelligence | Manual review of COD Orders +--- +[Safe vs Risky Users](#safe-vs-risky-users) | ✓ | x +--- +[RTO Risk Distribution](#rto-risk-distribution) | x | ✓ +--- +[Breakdown of Risky Users](#breakdown-of-risky-users) | ✓ | ✓ +--- +[Incremental Prepaid Orders Gained](#incremental-prepaid-orders-gained) | ✓ | x + +> **WARN** +> +> +> **Watch Out!** +> +> You can only view these widgets. +> + +## Safe vs Risky Users + +The following widget is available only if you opt for **COD Intelligence** in the **Settings** section. + +This graph shows the split between safe and risky users for the total users processed by Magic Intelligence. + +You can filter data to display it on a **Daily**, **Weekly** or **Monthly** basis. Hover over the graph for a breakdown of the data and the total number of users. + +![RTO Analytics safe vs risky users chart](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rto-safe-risky-users.jpg.md) + +## RTO Risk Distribution + +The following chart provides insights only when you opt for **Manual review of COD orders** in the **Settings** section. + +The **RTO risk distribution** bar graph provides a time-wise break-up of the orders' riskiness. You can view the graph **Daily**, **Weekly** or **Monthly**. + +![RTO Analytics Risk Distribution across orders bar graph](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rto-risk-dist.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> [Automate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/review-cod-orders/workflow.md#how-it-works) your manual review process or let COD Intelligence handle your COD Orders. Know more about the [RTO Analytics Dashboard for COD Intelligence](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto.md). +> + +## Breakdown of Risky Users + +The following widget is commonly available whether you opt for **COD Intelligence** or **Manual review of COD Orders** in the **Settings** section. + +This tab shows why the users are flagged as risky. The top reasons are displayed first, and the rest are listed under different categories. + +The intelligence flags the users as risky because: +- The address contains many symbols, gibberish, or does not contain commas. +- The user has a lower number of prepaid orders. +- The user or zip code has a high RTO percentage across many stores. + +![RTO Analytics breakdown of risky users](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rto-breakdown-risky-more.jpg.md) + +To view all the remaining reasons, click **View all reasons**. + +![RTO Analytics breakdown of risky users - view all reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rto-breakdown-risky.jpg.md) + +## Incremental Prepaid Orders Gained + +The following widget is available only when you opt for **COD Intelligence** in the **Settings** section. + +This chart shows the split between the **Regular orders** and the **Additional prepaid orders** received because of RTO intelligence. + +You can analyse how many potentially risky orders were converted to prepaid because of RTO intelligence. + +![RTO Analytics incremental prepaid orders gained chart](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rto-incremental-orders2.jpg.md) + +You can filter data to display it on a **Daily**, **Weekly** or **Monthly** basis. Hover over the graph for a breakdown of the data and the total number of orders. + +### Related information + +- [RTO Insights](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto/insights.md) +- [Manually Review COD Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/review-cod-orders.md) diff --git a/llm-content/payments/magic-checkout/android-integration.md b/llm-content/payments/magic-checkout/android-integration.md new file mode 100644 index 00000000..63099bd3 --- /dev/null +++ b/llm-content/payments/magic-checkout/android-integration.md @@ -0,0 +1,2387 @@ +--- +title: Integrate Razorpay Magic Checkout on Android App +heading: Integrate Magic Checkout on Android App +description: Steps to integrate Magic Checkout on your Android app using the Razorpay Android Standard SDK. +--- + +# Integrate Magic Checkout on Android App + +Follow these steps to integrate the Razorpay Magic Checkout on your Android application. + +#### Prerequisites + +- Create a Razorpay account. +- Generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **1. Build Integration**: Integrate with Android App. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +## 1. Build Integration + + +### 1.1 Enable/Disable Magic Checkout and Cash on Delivery + + + + Raise a request with your Razorpay SPOC to get this feature enabled on your account. + Once this feature is enabled, the customer address saving and coupon features are enabled. + + + Raise a request with our [Support team](https://razorpay.com/support/) to enable this feature for your account. + + + + + +### 1.2 Create Promotions and Shipping Info API Endpoints + + Follow the steps given below to create promotions and shipping info API endpoints: + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure that the URLs are publicly accessible, require no authentication and are hosted on your server. +> + + + 1. Log in to the Dashboard and navigate to **Magic Checkout**. + 2. In the **Platform Setup**, select **Custom E-Commerce Platform** from the drop-down list and click **Next**. + ![Choose custom platform](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-custom-platform.jpg.md) + 3. In the **Setup & Settings** section, click **Checkout Settings**. + 4. In the **Coupon Settings** section, enter the following: + 1. **URL for get promotions**: The API URL should return a list of promotions applicable to the specified order_id and customer. Magic Checkout uses this endpoint to fetch these promotions from your server and display them to your customers in the checkout modal. + 2. **URL for apply promotions**: The API URL validates the promotion code applied by the customer and should return the discount amount. Magic Checkout uses this endpoint to apply promotions via your server. + 5. Click **Save settings**. + ![Add promotion URLs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-web-promo-url.jpg.md) + 6. Navigate to **Shipping Setup**. + 7. Select **API** as the Shipping Service type from the drop-down list. + 8. Enter the **URL for shipping info**. The API URL should return shipping serviceability, COD serviceability, shipping fees and COD fees for a given list of customer addresses. Magic Checkout uses this endpoint to retrieve shipping information from your server. + 9. Click **Save Settings**. + ![Add shipping URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-web-shipping-url.jpg.md) + + + +### 1.3 Install Razorpay Android Standard SDK + + To install the SDK in your Android project, add the following code to your project's top-level build.gradle file. This provides access to the SDK library. + ```json: dependencies + repositories { + mavenCentral() + } + + dependencies { + implementation 'com.razorpay:checkout:1.6.41' + } + ``` + + + +### 1.4 Initialise Razorpay Android Standard SDK + + Use the `setKeyId()` method of the Checkout class to dynamically add your API key id. You can generate your API keys from the [Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + To ensure the Checkout form loads quickly, call the `preload()` method early in your payment flow. The time taken to load resources may vary based on your network bandwidth. + + ```java: Java + public class PaymentActivity extends Activity { + + // ... + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + /** + * Preload payment resources + */ + Checkout.preload(getApplicationContext()); + + // ... + + checkout.setKeyID(""); + + // ... + } + } + ```kotlin: kotlin + class PaymentActivity: Activity(), PaymentResultWithDataListener, ExternalWalletListener { + // ..... + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_payment) + /* + * To ensure faster loading of the Checkout form, + * call this method as early as possible in your checkout flow + * */ + Checkout.preload(applicationContext) + val co = Checkout() + // apart from setting it in AndroidManifest.xml, keyId can also be set + // programmatically during runtime + co.setKeyID("rzp_live_XXXXXXXXXXXXXX") + } + //...... + } + ``` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> It is recommended to send the API Key ID from your server-side as app-related metadata fetch. Do not add API Keys in the `AndroidManifest` file. +> + + + + +### 1.5 Create an Order + + You can create an order using the following API and send the additional information required for Magic Checkout. Pass the `order_id` received in response to the checkout code. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + // ... other line item details + } + ] +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 50000); +orderRequest.put("currency", "INR"); +orderRequest.put("receipt", "receipt#1"); +orderRequest.put("line_items_total", 50000); // Mandatory for Magic Checkout + +JSONArray lineItems = new JSONArray(); +JSONObject item = new JSONObject(); +item.put("sku", "1g234"); +item.put("variant_id", "12r34"); +item.put("price", 50000); +item.put("offer_price", 50000); +item.put("quantity", 1); +item.put("name", "Product Name"); +// ... other line item details +lineItems.put(item); +orderRequest.put("line_items", lineItems); + +Order order = razorpay.orders.create(orderRequest); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, # Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + # ... other line item details + } + ] +} + +client.order.create(data) +```go: Go +import ( + razorpay "github.com/razorpay/razorpay-go" +) + +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": []interface{}{ + map[string]interface{}{ + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name", + // ... other line item details + }, + }, +} + +body, err := client.Order.Create(para_attr, nil) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array( + 'amount' => 50000, + 'currency' => 'INR', + 'receipt' => 'receipt#1', + 'line_items_total' => 50000, // Mandatory for Magic Checkout + 'line_items' => array( + 0 => array( + 'sku' => '1g234', + 'variant_id' => '12r34', + 'price' => 50000, + 'offer_price' => 50000, + 'quantity' => 1, + 'name' => 'Product Name', + // ... other line item details + ), + ), +)); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, # Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + # ... other line item details + } + ] +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ + key_id: 'YOUR_KEY_ID', + key_secret: 'YOUR_SECRET' +}) + +var data = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + // ... other line item details + } + ] +} + +instance.orders.create(data); +```csharp: .Net +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +orderRequest.Add("line_items_total", 50000); // Mandatory for Magic Checkout + +List lineItem = new List(); +Dictionary lineItems = new Dictionary(); +lineItems.Add("sku", "1g234"); +lineItems.Add("variant_id", "12r34"); +lineItems.Add("price", 50000); +lineItems.Add("offer_price", 50000); +lineItems.Add("quantity", 1); +lineItems.Add("name", "Product Name"); +// ... other line item details +lineItem.Add(lineItems); +orderRequest.Add("line_items", lineItem); + +Order order = client.Order.Create(orderRequest); +``` +```json: Response +{ + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071, + "line_items_total": 50000 +} +``` + + + Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Default is `INR`. Length must be of 3 characters. + +`receipt` _mandatory_ +: `string` Your receipt id for this order should be passed here. Maximum length of 40 characters. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`line_items_total` _mandatory_ +: `integer` Total of `offer_price` for all line items added to the cart, in paise. For example, if a shoe worth ₹8,000 and a shirt worth ₹10,000 are added, the `line_item_total` will be `1800000`. This amount is post-tax. + + +> **WARN** +> +> +> **Watch Out!** +> +> To ensure the order is considered as a Magic Checkout order, you must pass this parameter. Otherwise, it will default to Standard Checkout order and customers will view the Standard Checkout UI instead of Magic Checkout. Know more about [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). +> + +`line_items` _mandatory_ +: `array` This will have the details about the specific items added to the cart. + + `sku` _mandatory_ + : `string` Unique product id defined by you. It can be alphanumeric. + + `variant_id` _mandatory_ + : `string` Unique variant id defined by you. It can be alphanumeric. + + `price` _mandatory_ + : `integer` Price of the product in paise. + + `offer_price` _mandatory_ + : `integer` Final price charged to the customer in paise, after applying any adjustments, such as product discounts. + + +> **INFO** +> +> +> **Handy Tips** +> +> If no discount is applied, `price` and `offer_price` will be the same. +> + + `quantity` _mandatory_ + : `integer` Number of units added in the cart. + + `name` _mandatory_ + : `string` Name of the product. + + `description` _mandatory_ + : `string` Description of the product. + + `weight` _optional_ + : `integer` Weight of the product in grams. + + `dimensions` _optional_ + : `object` The dimensions of the product. + + `length` _optional_ + : `string` The length of the product in centimeters. + + `width` _optional_ + : `string` The width of the product in centimeters. + + `height` _optional_ + : `string` The height of the product in centimeters. + + `image_url` _mandatory_ + : `string` The URL of the product image. This parameter is mandatory if you want to display product images on our iframe. + + `product_url` _optional_ + : `string` URL of the product's listing page. + + `notes` _optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is 299, then pass `29900` in this field. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + +`line_items_total` +: `integer` Total of `offer_price` for all line items added to the cart, in paise. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + +### Pre-discount Handling + + Line items total should equal the sum of individual item prices after your discounts are applied. When applying discounts, reduce both `amount` and `line_items_total` by the same amount: + ```json: Example + { + "amount": 45000, // ₹500 - ₹50 discount = ₹450 + "line_items_total": 45000, // Must match the discounted amount + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "prediscount_applied": "5000" // Track discount in paise + }, + "line_items": [ + // ... your line items with original prices + ] + } + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> Magic Checkout automatically handles all discount calculations on the UI. The system detects differences in checkout amounts and adjusts accordingly. +> + + + + + + +### 1.6 Interact with Shipping Info API + + This API should return shipping serviceability, COD serviceability, shipping fees and COD fees for a given list of customer addresses. + + /your-server-url/shipping-info-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // This is the receipt field set in the Razorpay order + "razorpay_order_id": "EKwxwAgItmmXdp", // This is the RZP order created without the `order_` prefix + "email": "", // Email field will be set if the customer enters an email + "contact": "+919900000000", // Customer phone number with country code + "addresses": [{ + "id": "0", + "zipcode": "560060", + "state_code": "KA", + "country": "IN" + }] + } + + ```json: Response + { + "addresses": [ + { + "id": "0", + "zipcode": "560000", + "state_code": "KA", + "country": "IN", + "shipping_methods": [ + { + "id": "1", + "description": "Free shipping", + "name": "Delivery within 5 days", + "serviceable": true, + "shipping_fee": 1000, // in paise. Here 1000 = 1000 paise, which equals to ₹10 + "cod": true, + "cod_fee": 1000 // in paise. Here 1000 = 1000 paise, which equals to ₹10 + }, + { + "id": "2", + "description": "Standard Delivery", + "name": "Delivered on the same day", + "serviceable": true, + "shipping_fee": 1000, // in paise. Here 1000 = 1000 paise, which equals to ₹10 + "cod": false, + "cod_fee": 0 // in paise. Here 1000 = 1000 paise, which equals to ₹10 + } + ] + } + ] + } + ``` + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#15-create-an-order). + +`razorpay_order_id` _mandatory_ +: `string` Unique identifier for the order returned by Checkout. + +`email` _optional_ +: `string` Customer's email address. + +`contact` _mandatory_ +: `string` Customer's phone number. + +`addresses` _mandatory_ +: `array` Customer's address details. + + `id` _mandatory_ + : `string` Unique identifier of the customer's address. + + `zipcode` _mandatory_ + : `string` Customer's ZIP code. + + `state_code` _optional_ + : `string` The code of the state where the customer resides. + + `country` _mandatory_ + : `string` Country where the customer resides. The length cannot exceed 2 characters. + + + +### Response Parameters + +`addresses` _mandatory_ +: `array` Customer's address details. + + `id` _mandatory_ + : `string` Unique identifier of the customer's address. + + `zipcode` _mandatory_ + : `string` Customer's ZIP code. + + `country` _mandatory_ + : `string` Country where the customer resides. The length cannot exceed 2 characters. + + `shipping_methods` _mandatory_ + : `array` Details regarding the shipping methods. + + `id` _mandatory_ + : `string` Unique identifier of the shipping method. + + `description` + : `integer` Brief description of the shipping method. + + `name` _mandatory_ + : `string` Name of the shipping method. + + `serviceable` _mandatory_ + : `boolean` Indicates whether you deliver orders to the zipcode entered by the customer. This is based on the ZIP codes you have added in the serviceability setting on the Razorpay Dashboard. Possible values: + - `true`: Orders can be delivered to the added ZIP codes. + - `false`: Orders cannot be delivered to the added ZIP codes. + + `shipping_fee` _mandatory_ + : `integer` Shipping charge in paise applicable to be paid by the customer. + + `cod` _mandatory_ + : `boolean` Indicates whether you support cash on delivery on this order. + - `true`: COD payment method is supported. + - `false`: COD payment method is not supported. + + `cod_fee` _mandatory_ : `integer` Cash on Delivery fee charged in paise. This amount is based on the COD settings configured in your Razorpay Dashboard. + + +> **INFO** +> +> +> **Handy Tips** +> +> If the `cod` field is false, set the `cod_fee` field to 0. +> + + + + + + + +### 1.7 Interact with Get Promotions API + + This API should return the list of promotions applicable for the given `order_id` and customer. + + /your-server-url/create-promotions-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // this is the receipt field set in Razorpay order + "contact": "+919000090000", + "email": "" + }' + ```json: Response + { + "promotions": [ + { + "code": "10%OFF", + "summary": "10% off on total cart value", + "description": "10% on total cart value upto ₹300" + }, + { + "code": "500OFF", + "summary": "₹500 off on total cart value", + "description": "₹500 off on a minimum cart value of ₹1500" + } + ] + } + ``` + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#15-create-an-order). + +`contact` _optional_ +: `string` Customer's phone number. + +`email` _optional_ +: `string` Customer's email address. + + + +### Response Parameters + +`promotions` _mandatory_ +: `array` Details of the promotions created. + + `code` _mandatory_ + : `string` Unique identifier of the promotion. + + `summary` _mandatory_ + : `string` Summary about the promotion. For example, 10% off on total cart value. + + `description` _optional_ + : `string` Brief description of the promotion. For example, 10% on total cart value upto ₹300. + + + +### 1.7.1 Interact with Apply Promotions API + + This API should validate the promotion code applied by the customer and return the discount amount. + + /your-server-url/create-promotions-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // this is the receipt field set in Razorpay order + "contact": "+919000090000", + "email": "", + "code": "500OFF" + }' + + ```json: Success Response + { + "promotion": { + "reference_id": "3rvff", + "type": "offer", + "code": "500OFF", + "value": 50000, + "value_type": "fixed_amount", + "description": "New Year Sale Offer" + } + } + ```json: Failure Response + { + "failure_code": "LOGIN_REQUIRED", + "failure_reason": “promotion Code has expired" + } + ``` + + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#15-create-an-order). + +`contact` _optional_ +: `string` Customer's phone number. + +`email` _optional_ +: `string` Customer's email address. + +`code` _mandatory_ +: `string` Promotion code used to avail discount on checkout. + + + +### Response Parameters + +`promotion` _mandatory_ +: `object` Used to pass all offer or discount-related information, including promotion code discount, method discount and so on. + + `reference_id` _mandatory_ + : `string` Identifier of the offer you create. + + `code` _optional_ + : `string` Promotion code used to avail discount on checkout. + + `type` _optional_ + : `string` Type of offer. Possible values: + - `coupon`: A discount applied by customers during checkout. For example, customers can use a coupon like `Diwali Sale 500 Off` to get ₹500 off the total cart value. + - `offer`: A promotion you create for your customers. For example, you create an offer `Buy 4 t-shirts and get 2 free`. In this case, when customers add 4 t-shirts to their cart, the 2 additional t-shirts will be automatically added for free. + + `value` _optional_ + : `integer` The offer value that needs to be applied in paise. For example, if you want to offer a discount of ₹500, enter 50000. + + `value_type` _optional_ + : `string` The type of value like: + - `fixed_amount`: A fixed amount discount value in the currency of the order. For example, ₹500. + - `percentage`: A percentage discount value. For example, 10%. + - `BXGY`: Buy X and Get Y. For example, if you buy 2 t-shirts, you a get a cap for free or at a discounted value. + + +> **INFO** +> +> +> **Handy Tips** +> +> Regardless of the `value_type`, the amount specified in the `value` parameter is applied as-is. For example, if `value_type` is percentage and the `value` is 5000, 5000 is considered in currency subunits (paise). +> + + + `description` _optional_ + : `string` Description of the promotion applied. For example, `New Year Sale Offer`. + + + +### Error Code, Description and Next Steps + + + Code | Description | Next Steps + --- + INVALID_PROMOTION | The specified promotion code is not recognised or does not exist in the system. | Please verify the code and try again. + --- + LOGIN_REQUIRED | This coupon is specifically assigned to a registered customer. | To redeem it, the customer must log in to their account and authenticate their identity. + --- + REQUIREMENT_NOT_MET | The current cart conditions do not meet the requirements for this promotion to be valid. For example, the promotion may require a minimum cart value of ₹1,000, but the cart total is ₹800. | Review the promotion's terms and adjust the cart contents accordingly. + + + + + + + + + + + +### 1.8 Initiate Payment and Display Checkout Form + + Create an instance of the `Checkout` and pass the payment details and options as a `JSONObject`. Ensure that you add the `order_id` generated in [Step 5](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/android-integration.md#15-create-an-order). + + ```java: Java + public void startPayment() { + checkout.setKeyID(""); + /** + * Instantiate Checkout + */ + Checkout checkout = new Checkout(); + + /** + * Set your logo here + */ + checkout.setImage(R.drawable.logo); + + /** + * Reference to current activity + */ + final Activity activity = this; + + /** + * Pass your payment options to the Razorpay Checkout as a JSONObject + */ + try { + JSONObject options = new JSONObject(); + + options.put("name", ""); + options.put("description", "Reference No. #123456"); + options.put("image", "http://example.com/image/rzp.jpg"); + options.put("order_id", "order_DBJOWzybf0sJbb");//from response of step 3. + options.put("theme.color", "#3399cc"); + options.put("currency", ""); + options.put("amount", "50000");//pass amount in currency subunits + options.put("prefill.email", ""); + options.put("prefill.contact",""); + c + JSONObject retryObj = new JSONObject(); + retryObj.put("enabled", true); + retryObj.put("max_count", 4); + options.put("retry", retryObj); + + checkout.open(activity, options); + + } catch(Exception e) { + Log.e(TAG, "Error in starting Razorpay Checkout", e); + } + } + ```java: Kotlin + private fun startPayment() { + /* + * You need to pass the current activity to let Razorpay create CheckoutActivity + * */ + val activity:Activity = this + val co = Checkout() + + try { + val options = JSONObject() + options.put("name","Razorpay Corp") + options.put("description","Demoing Charges") + //You can omit the image option to fetch the image from the Dashboard + options.put("image","http://example.com/image/rzp.jpg") + options.put("theme.color", "#3399cc"); + options.put("currency",""); + options.put("order_id", "order_DBJOWzybfXXXX"); + options.put("amount","50000")//pass amount in currency subunits + + val retryObj = new JSONObject(); + retryObj.put("enabled", true); + retryObj.put("max_count", 4); + options.put("retry", retryObj); + + val prefill = JSONObject() + prefill.put("email","") + prefill.put("contact","9876543210") + options.put("one_click_checkout",true) // magic checkout + options.put("show_coupons", true) // magic checkout + + options.put("prefill",prefill) + co.open(activity,options) + }catch (e: Exception){ + Toast.makeText(activity,"Error in payment: "+ e.message,Toast.LENGTH_LONG).show() + e.printStackTrace() + } + } + ``` + +> **INFO** +> +> +> **Handy Tips** +> +> When you paste the checkout options given above, the following error message appears: '`TAG` has private access in `androidx.fragment.app.FragmentActivity`'. You can resolve this by adding the following code: +> +> ```java: Resolve TAG has private access +> public class MainActivity extends AppCompatActivity implements PaymentResultListener { +> private static final String TAG = MainActivity.class.getSimpleName(); +> ``` +> + + `Checkout.open()` launches the Checkout form where the customer completes the payment and returns the payment result via appropriate callbacks on the `PaymentResultListener`. + + **Payment Options in JSONObject**: + All available options in the `Standard Web Checkout` are also available in Android. + + + + Checkout Options + + `key` _mandatory_ +: `string` API key id generated from the Dashboard. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `50000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. Length must be of 3 characters. + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order id generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `cod` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`show_coupons` _optional_ +: `boolean` Determines whether to show the coupons to customer on the checkout. Possible values: + - `true` (default): Enables the Coupon feature. + - `false`: Disables the Coupon feature. + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + +> **INFO** +> +> +> **Handy Tips** +> +> If you call the payment start method inside a fragment, ensure that the `fragment`'s parent `activity` implements the `PaymentResultListener` interface. +> + + + + + + + + +### 1.9 Handle Success and Error Events + + You have the option to implement `PaymentResultListener` or `PaymentResultWithDataListener` to receive callbacks for the payment result. + + - `PaymentResultListener` provides only `payment_id` as the payment result. + - `PaymentResultWithDataListener` provides additional payment data such as email and contact of the customer, along with the `order_id`, `payment_id`, `signature` and more. + + Use the code below to import the function in your `.java` file. This should be added at the beginning of the file. + + ```java: PaymentResultListener + import com.razorpay.PaymentResultListener + ```java: PaymentResultWithDataListener + import com.razorpay.PaymentResultWithDataListener; + ``` + + Given below are the sample codes for implementation: + + ```java: Java - PaymentResultListener + public class PaymentActivity extends Activity implements PaymentResultListener { + // ... + + @Override + public void onPaymentSuccess(String razorpayPaymentID) { + /** + * Add your logic here for a successful payment response + */ + } + + @Override + public void onPaymentError(int code, String response) { + /** + * Add your logic here for a failed payment response + */ + } + } + ```kotlin: Kotlin - PaymentResultListener + class PaymentActivity: Activity(), PaymentResultListener { + // ... + override fun onPaymentError(errorCode: Int, response: String?) { + /** + * Add your logic here for a failed payment response + */ + } + + override fun onPaymentSuccess(razorpayPaymentId: String?) { + /** + * Add your logic here for a successful payment response + */ + } + + ``` + + ```java: Java - PaymentResultWithDataListener + public class PaymentActivity extends Activity implements PaymentResultWithDataListener { + // ... + @Override + public void onPaymentSuccess(String razorpayPaymentID, PaymentData paymentData) { + /** + * Add your logic here for a successful payment response + */ + } + @Override + public void onPaymentError(int code, String response) { + /** + * Add your logic here for a failed payment response + */ + } + } + ```kotlin: Kotlin - PaymentResultWithDataListener + class PaymentActivity: Activity(), PaymentResultWithDataListener { + // ... + override fun onPaymentError(errorCode: Int, response: String?) { + /** + * Add your logic here for a failed payment response + */ + } + override fun onPaymentSuccess(razorpayPaymentId: String?, PaymentData: PaymentData) { + /** + * Add your logic here for a successful payment response + */ + } + ``` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - Razorpay's payment process takes place in a new activity. Since there are two activities involved, your activity can get corrupted or destroyed if the device is low on memory. These two methods should not depend on any variables not set through your life cycle hooks. +> - It is recommended that you test everything by enabling "Don't Keep Activities" in **Developer Options** under **Settings**. +> + + + + Error Codes + + The error codes are returned in the `onPaymentError` method: + + + Error_Code | Description + --- + `Checkout.NETWORK_ERROR` | There was a network error, for example, loss of internet connectivity. + --- + `Checkout.INVALID_OPTIONS` | An issue with options passed in `checkout.open`. + --- + `Checkout.PAYMENT_CANCELED` | The user canceled the payment. + --- + `Checkout.TLS_ERROR` | The device does not support TLS v1.1 or TLS v1.2. + + + + +### 1.9.1 Erase User Data from SDK + + The SDK stores customer-specific data such as email, contact number, and user-session cookies if the customer wants to make another payment in the same session. You can delete such sensitive information before another customer logs into the app. + + To erase customer data from the app, you can call the following method anywhere in your app. + + ```java: Erase Customer Data + Checkout.clearUserData(Context) + ``` + + + + + + +### 1.10 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.11 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + + +### 1.12 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +### 1.13 Perform Post Payment Processing + + Based on the response, you can handle post-payment processing on your end. + +> **WARN** +> +> +> **Timeout Handling** +> +> If no API call is made within 45 seconds, our background job will assume there is a network drop off and will proceed to place the order on Shopify automatically. +> + + + Fetch an Order + + Use the Fetch Orders API to retrieve order details, including customer information, address, shipping method and promotions of a particular order: + + v1/orders/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ + -X GET https://api.razorpay.com/v1/orders/order_R1yDkxyIuKXXXX \ + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + import com.razorpay.Order; + import com.razorpay.RazorpayClient; + import com.razorpay.RazorpayException; + try { + Order order = razorpay.Orders.fetch(""); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + # do easy_install razorpay or + # pip install razorpay + + import razorpay + razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]")) + + order_id = + resp = client.order.fetch(order_id) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->fetch($orderId); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('key_id', 'key_secret') + + order = Razorpay::Order.fetch('order_R1yDkxyIuKXXXX') + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.fetch(orderId) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("", "") + + body, err := client.Order.Fetch("", nil, nil) + ``` + ```json: Response: COD Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 507000, + "amount_paid": 0, + "amount_due": 507000, + "currency": "INR", + "receipt": "#30567", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "placed", + "attempts": 0, + "notes": { + "cart_id": "hWN2Am4BGnQrizKE3hzeQaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/hf5Q?key=14bbbce35b8", + "shopify_order_id": "6302119854247" + }, + "created_at": 1756045901, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 5000, + "shipping_fee": 7000, + "customer_details": { + "contact": "+919100000000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + }, + "billing_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + } + }, + "line_items_total": 600000, + "tax_details": { + "total_tax": 4128, + "taxes_included": true + } + } + ```json: Response: Prepaid Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 100700, + "amount_paid": 100700, + "amount_due": 0, + "currency": "INR", + "receipt": "#30414", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "paid", + "attempts": 1, + "notes": { + "cart_id": "hWN1TcwL?key=1a3a5a7c", + "storefront_id": "gid://shopify/Cart/hIkey=af7c7800", + "flits_cart_token": "hWcwL?key=1a3741dc_8740f5_175447", + "shopify_order_id": "6266036191399" + }, + "created_at": 1754466155, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 0, + "shipping_fee": 700, + "customer_details": { + "billing_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "billing_address", + "zipcode": "110057" + }, + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "shipping_address", + "zipcode": "110057" + } + }, + "line_items_total": 110000, + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + Know more about the [Orders API.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) + + +> **INFO** +> +> +> **Order Status** +> +> Check the order status for the following: +> +> - Prepaid orders: `paid`. +> - COD orders: `placed`. +> + + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the order to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the order. For example, `order_R1yDkxyIuKXXXX`. + +`entity` +: `string` Type of entity. Value is `order`. + +`amount` +: `integer` Total order amount in the smallest currency unit (paise). + +`amount_paid` +: `integer` Amount paid towards the order in paise. For prepaid orders, this shows the actual amount paid. For COD orders, this is `0` until payment is collected. + +`amount_due` +: `integer` Outstanding amount due in paise. For prepaid orders, this shows any remaining balance. For COD orders, this equals the `amount` field until payment is collected. + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`receipt` +: `string` Receipt identifier for internal reference. For example, `#30567`. + +`offers` +: `array` Array of offer IDs applied to the order. + +`status` +: `string` Current status of the order. Possible values: + - `placed`: Order placed but payment pending (COD orders). + - `paid`: Order placed and payment completed (prepaid orders). + - `cancelled`: Order cancelled. + - `refunded`: Order refunded. + +`attempts` +: `integer` Number of payment attempts made for this order. For example, `1`. + +`notes` +: `object` Custom notes added to the order containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `shopify_order_id` + : `string` Shopify order reference. + + `flits_cart_token` + : `string` Flits integration token (optional). + +`created_at` +: `integer` Unix timestamp indicating when the order was created. For example, `1756045901`. + +`description` +: `string|null` Order description. Returns `null` if no description is provided. + +`checkout` +: `string|null` Checkout identifier. Returns `null` if not applicable. + +`promotions` +: `array` Array of promotion objects applied to the order. + + `code` + : `string` Promotion code used. For example, `orderOff`. + + `type` + : `string` Type of promotion. For example, `cart_value`. + + `value` + : `integer` Discount value in paise. For example, `10000` for ₹100. + + `description` + : `string` Human-readable promotion description. + + `reference_id` + : `string` Internal reference for the promotion. + +`cod_fee` +: `integer` Cash on Delivery charges in paise. For COD orders, this contains the fee amount (for example, `5000` for ₹50). For prepaid orders, this is `0`. + +`shipping_fee` +: `integer` Shipping charges in paise. For example, `700` for ₹7. + +`customer_details` +: `object` Customer information. + + `contact` + : `string` Customer's phone number. + + `email` + : `string` Customer's email address. + + `shipping_address` + : `object` Complete shipping address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for delivery. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Recipient name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `shipping_address`. + + `zipcode` + : `string` Postal code. + + `billing_address` + : `object` Complete billing address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for billing. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Account holder name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `billing_address`. + + `zipcode` + : `string` Postal code. + +`line_items_total` +: `integer` Total value of line items in paise before adding shipping fees and COD fees, after applying promotions. For example, `60000` for ₹600. + +`tax_details` +: `object` Tax information. + + `total_tax` + : `integer` Total tax amount in paise. For example, `4128`. + + `taxes_included` + : `boolean` Indicates whether taxes are included in the item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### Fetch a Payment + + Use the Fetch Payments API to retrieve comprehensive payment details, including transaction status, payment method, customer information, settlement details, and the associated order information for a specific payment: + + v1/payments/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X GET https://api.razorpay.com/v1/payments/pay_R1yFlWQar3XXXX + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String paymentId = "pay_R1yFlWQar3XXXX"; + + Payment payment = razorpay.payments.fetch(paymentId); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.payment.fetch(paymentId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + paymentId := "pay_R1yFlWQar3XXXX" + + body, err := client.Payment.Fetch(paymentId, nil, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->payment->fetch($paymentId); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + paymentId = "pay_R1yFlWQar3XXXX" + + Razorpay::Payment.fetch(paymentId) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.payments.fetch(paymentId) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + Payment payment = client.Payment.Fetch(paymentId); + ``` + + ```json: Response: COD Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 55700, + "currency": "INR", + "status": "pending", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "cod", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919100000000", + "notes": { + "cart_id": "hWN2QaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/h?key=14bbf59ce35b8" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1756046099, + "receiver_type": null + } + ```json: Response: Prepaid Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 90630, + "currency": "INR", + "status": "captured", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "cart_id": "hWNsVrcwL?key=1a3a457ddc", + "storefront_id": "gid://shopify/Cart/hWv3e8?key=af707", + "flits_cart_token": "hWrcwL?key=1a3a5a70f5_17547", + "optimizer_provider_name": "razorpay" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "727947422583", + "upi_transaction_id": "1F723677C679EF578A95" + }, + "created_at": 1754466271, + "receiver_type": null, + "upi": { + "vpa": "gaurav.kumar@exampleupi" + } + } + ``` + + Know more about the [Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md). + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. For example, `pay_R1yFlWQar3XXXX`. + +`entity` +: `string` Type of entity. Value is `payment`. + +`amount` +: `integer` Payment amount in the smallest currency unit (paise). For COD payments, this includes the COD fee (for example, `55700` for ₹557). For prepaid payments, this equals the captured amount (for example, `90630` for ₹906.30). + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`status` +: `string` Current status of the payment. Possible values: + - `pending`: Payment pending collection (COD orders). + - `captured`: Payment successfully captured (prepaid orders). + - `authorized`: Payment authorized but not captured. + - `failed`: Payment attempt failed. + +`order_id` +: `string` Unique identifier of the associated order. For example, `order_R1yDkxyIuKXXXX`. + +`invoice_id` +: `string|null` Unique identifier of the associated invoice. Returns `null` if no invoice is linked. + +`international` +: `boolean` Indicates whether this is an international payment. Possible values: + - `true`: International payment. + - `false`: Domestic payment. + +`method` +: `string` Payment method used. Possible values include: + - `cod` + - `upi` + - `card` + - `netbanking` + - `wallet` + +`amount_refunded` +: `integer` Amount refunded in paise. For example, `0` indicates no refund has been processed. + +`refund_status` +: `string|null` Current refund status. Returns `null` if no refund is applicable. Possible values: + - `partial`: Partial refund processed. + - `full`: Full refund processed. + +`captured` +: `boolean` Indicates whether the payment has been captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string|null` Payment description. Returns `null` if no description is provided. + +`card_id` +: `string|null` Unique identifier of the card used for payment. Returns `null` for non-card payments. + +`bank` +: `string|null` Bank identifier for netbanking payments. Returns `null` for other payment methods. + +`wallet` +: `string|null` Wallet provider identifier. Returns `null` for non-wallet payments. + +`vpa` +: `string|null` Virtual Payment Address for UPI payments. For example, `gaurav.kumar@exampleupi`. Returns `null` for non-UPI payments. + +`email` +: `string` Customer's email address. + +`contact` +: `string` Customer's phone number. + +`notes` +: `object` Custom notes added to the payment containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `flits_cart_token` + : `string` Flits integration token (optional). + + `optimizer_provider_name` + : `string` Payment optimizer provider name (optional). + +`fee` +: `integer|null` Processing fee charged in paise. For example, `0` indicates no fee. Returns `null` for COD payments. + +`tax` +: `integer|null` Tax amount on processing fee in paise. For example, `0` indicates no tax. Returns `null` for COD payments. + +`error_code` +: `string|null` Error code if payment failed. Returns `null` for successful payments. + +`error_description` +: `string|null` Human-readable error description. Returns `null` for successful payments. + +`error_source` +: `string|null` Source of the error. Returns `null` for successful payments. + +`error_step` +: `string|null` Step at which error occurred. Returns `null` for successful payments. + +`error_reason` +: `string|null` Reason for the error. Returns `null` for successful payments. + +`acquirer_data` +: `object` Data from the payment acquirer. + + `rrn` + : `string` Retrieval Reference Number from the acquirer (optional). + + `upi_transaction_id` + : `string` UPI transaction identifier from the acquirer (optional). + +`created_at` +: `integer` Unix timestamp indicating when the payment was created. For example, `1756046099`. + +`receiver_type` +: `string|null` Type of receiver for the payment. Returns `null` if not applicable. + +`upi` +: `object` UPI-specific payment details (only present for UPI payments). + + `vpa` + : `string` Virtual Payment Address used for the UPI payment. + + + + + + + + + + +## 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +You can make test payments using one of the payment methods configured at the Checkout. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + + +### Supported Payment Methods + + Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + + + Payment Method | Code | Availability + --- + [Cash on Delivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md) | `cod` | Requires [Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md#prerequisites). + --- + [Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ + --- + [Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ + --- + [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ + --- + [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ + --- + EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ + --- + [Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ + --- + [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). + --- + [Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. + --- + [Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + + + ### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + ### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the following lists: + - [Supported UPI Flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + - [UPI Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/upi.md). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + ### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + #### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + - [Test Error Scenarios](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards). + + #### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + ### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## 3. Go-live Checklist + +Check the go-live checklist for Razorpay Magic Checkout integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + +## Related Information + +[Android Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard.md) diff --git a/llm-content/payments/magic-checkout/apis.md b/llm-content/payments/magic-checkout/apis.md new file mode 100644 index 00000000..d117fcdc --- /dev/null +++ b/llm-content/payments/magic-checkout/apis.md @@ -0,0 +1,11 @@ +--- +title: Magic Checkout APIs +description: List of Magic Checkout Coupon Code, Customer Address and Shipping Info APIs with relevant parameters. +--- + +# Magic Checkout APIs + +You can use the following APIs related to Magic Checkout: +- **Coupon Code**: Use the [Coupon Code APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/apis/coupon-code.md) to send coupon details to Razorpay. Razorpay will create the coupon codes, which you can then apply to transactions. +- **Customer Address**: Use the [Customer Address APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/apis/customer-address.md) to upload customers' billing and shipping addresses in bulk. +- **Shipping Information**: Use the [Shipping Information APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/apis/shipping-info.md) to send the customer's shipping information to Razorpay. diff --git a/llm-content/payments/magic-checkout/apis/coupon-code.md b/llm-content/payments/magic-checkout/apis/coupon-code.md new file mode 100644 index 00000000..3c8a0bed --- /dev/null +++ b/llm-content/payments/magic-checkout/apis/coupon-code.md @@ -0,0 +1,187 @@ +--- +title: Coupon Code +description: Send coupon details to Razorpay using this API. +--- + +# Coupon Code + +Use the Coupon Code APIs to send coupon details to Razorpay. Razorpay will create the coupon codes, which you can then apply to transactions. + +> **INFO** +> +> +> **Handy Tips** +> +> Use your webhook URL as the API endpoint for the Coupon Code APIs. +> + +## Sample Code + +Fetch the list of coupons available using this API. + +your-webhook-url + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://example-webhook-url.com \ +-H 'content-type : application/json' +-d '{ + "orderId": "FFADADADADASDAS", + "contact": "+919000090000", + "email": "" +}' +```json: Response +{ + "coupons": [ + { + "code": "coupon1", + "summary": "short summary", + "description": "long description- One time ", + "tnc": [ + "term1", + "term2" + ] + }, + { + "code": "coupon2", + "summary": "short summary", + "description": "long description- One time ", + "tnc": [ + "term1", + "term2" + ] + } + ] +} +``` + +### Request Parameters + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in the previous step. + +`email` _optional_ +: `string` The customer's email address. + +`contact` _optional_ +: `string` The customer's phone number. + +### Response Parameters + +`coupons` +: `array` Details of the coupons created. + + `code` + : `string` The unique identifier of the coupon. + + `summary` + : `string` A summary about the coupon. + + `description` + : `string` A brief description of the coupon. + + `tnc` + : `array` Terms and conditions about the coupon. + +## Apply Coupons API + +Apply a coupon on a transaction using this API. + +your-webhook-url + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://example-webhook-url.com \ +-H 'content-type : application/json' +-d '{ + "orderId": "FFADADADADASDAS", + "contact": "+919000090000", + "email": "", + "cart_value": 1000, + "shipping_charge": 24, + "cod_charge": 10, + "coupon_code": "coupon1" +}' +```json: Success Response +{ + "orderId": "AAAAAAAAA", + "status": true, + "methods": [ + "cards", + "netbanking" + ], + "new_cart_value": 230, + "discount": 10, + "new_shipping_charge": 0, + "items": { + "item": "item1", + "cost": 234 + }, + "cod_charge": 0 +} +```json: Failure Response +{ + "status": false, + "failure_reason": "Coupon Code has expired" / "Invalid Coupon Code" +} +``` + +### Request Parameters + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in the previous step. + +`email` _optional_ +: `string` The customer's email address. + +`contact` _optional_ +: `string` The customer's phone number. + +`cart_value` _mandatory_ +: `integer` The customer's cart value. + +`shipping_charge` _optional_ +: `integer` The shipping charge levied on the customer. + +`cod_charge` _optional_ +: `integer` The cash-on-delivery charge levied on the customer. + +`coupon_code` _mandatory_ +: `string` The coupon code to be applied on the transaction. + +### Response Parameters + +`order_id` +: `string` The unique identifier of the order created in the previous step. + +`status` +: `boolean` Indicates whether the coupon got applied successfully to the transaction. Possible values: + - `true`: The coupon was successfully applied. + - `false`: The coupon was not successfully applied. + +`methods` +: `array` The supported payment methods. + +`new_cart_value` +: `integer` The net cart value (original value minus coupon discount). + +`discount` +: `integer` The discount amount. + +`new_shipping_charge` +: `integer` The net shipping charge. + +`items` +: `object` Details of the items. + + `cost` + : `integer` The item cost. + + `item` + : `string` The unique identifier of the item. + +`cod_charge` +: `integer` The cash-on-delivery charge levied. + +`failure_reason` +: `string` The reason why the coupon did not get applied successfully. For example, `Coupon Code has expired`. diff --git a/llm-content/payments/magic-checkout/apis/customer-address.md b/llm-content/payments/magic-checkout/apis/customer-address.md new file mode 100644 index 00000000..6b7ee9c4 --- /dev/null +++ b/llm-content/payments/magic-checkout/apis/customer-address.md @@ -0,0 +1,198 @@ +--- +title: Customer Address +description: Upload customers' billing and shipping addresses in bulk using our API. +--- + +# Customer Address + +Use this API to upload customers' billing and shipping addresses in bulk. + +## Sample Code + + /customers/addresses + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/customers/addresses \ +-H 'content-type : application/json' +-d '{ + "contact": "+919000090000", + "email": "", + "shipping_address": { + "name": "", + "line1": "125/12, Rajaji Street,", + "line2": "Near Culverton Park", + "zipcode": "560068", + "city": "Bangalore", + "state": "Karnataka", + "tag": "home", + "landmark": "Culverton Park", + "primary": false + }, + "billing_address": { + "name": "", + "line1": "125/12, Rajaji Street,", + "line2": "Near Culverton Park", + "zipcode": "560068", + "city": "Bangalore", + "state": "Karnataka", + "tag": "home", + "landmark": "Culverton Park", + "primary": false + } +}' +```json: Success Response +{ + "shipping_address": { + "entity_type": "customer", + "entity_id": "HsEFUUDLtUqOy6", + "id": "HsEFUWzQWEE8dG" + }, + "billing_address": { + "entity_type": "customer", + "entity_id": "HsEFUUDLtUqOy6", + "id": "HsEFUWzQWEE8dG" + } +} +```json: Failure Response (500) +{ + "code": "SERVER_ERROR", + "description": "The server encountered an error. The incident has been reported to admins." +} +```json: Validation Failure Response (400) +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The line2 must be between 5 and 255 characters.", + "source": "business", + "step": "payment_initiation", + "metadata": {}, + "reason": "input_validation_failed", + "field": "line2" + } +} +``` + +### Request Parameters + +`email` _mandatory_ +: `string` The customer's email address. + +`contact` _mandatory_ +: `string` The customer's phone number. + +`shipping_address` _mandatory_ +: `object` The customer's shipping address details. + + `name` _mandatory_ + : `string` The customer's name. + + `line1` _mandatory_ + : `string` The customer's address. + + `line2` _optional_ + : `string` Additional line for the customer's address. + + `zipcode` _mandatory_ + : `string` The customer's ZIP code. + + `city` _mandatory_ + : `string` The name of the city. + + `state` _mandatory_ + : `string` The name of the state. + + `tag` _mandatory_ + : `string` The address tag. For example, `Home`, `Office`, and so on. + + `landmark` _optional_ + : `string` Nearest landmark to the delivery address. + + `primary` _optional_ + : `boolean` Indicates whether this is the customer's primary shipping address. Possible values: + - `true`: It is the customer's primary shipping address. + - `false`: It is not the customer's primary shipping address. + +`billing_address` _mandatory_ +: `object` The customer's billing address details. + + `name` _mandatory_ + : `string` The customer's name. + + `line1` _mandatory_ + : `string` The customer's address. + + `line2` _optional_ + : `string` Additional line for the customer's address. + + `zipcode` _mandatory_ + : `string` The customer's ZIP code. + + `city` _mandatory_ + : `string` The name of the city. + + `state` _mandatory_ + : `string` The name of the state. + + `tag` _mandatory_ + : `string` The address tag. For example, `Home`, `Office`, and so on. + + `landmark` _optional_ + : `string` Nearest landmark to the delivery address. + + `primary` _optional_ + : `boolean` Indicates whether this is the customer's primary billing address. Possible values: + - `true`: It is the customer's primary billing address. + - `false`: It is not the customer's primary billing address. + +### Response Parameters + +`shipping_address` +: `object` Details of the customer's shipping address. + + `entity_type` + : `string` The name of the entity. Here, it is `customer`. + + `entity_id` + : `string` The unique identifier of the entity. + + `id` + : `string` The unique identifier of the shipping address. + +`billing_address` +: `object` Details of the customer's billing address. + + `entity_type` + : `string` The name of the entity. Here, it is `customer`. + + `entity_id` + : `string` The unique identifier of the entity. + + `id` + : `string` The unique identifier of the billing address. + +### Validation Error Parameters + +`error` +: `object` The error object. + + `code` + : `string` Type of the error. + + `description` + : `string` Descriptive text about the error. + + `field` + : `string` Name of the parameter in the API request that caused the error. + + `source` + : `string` The point of failure in the specific operation (payment in this case). For example, customer, business. + + `step` + : `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. + + `reason` + : `string` The exact error reason. It can be handled programmatically. + + `metadata` + : `object` Contains additional information about the request. diff --git a/llm-content/payments/magic-checkout/apis/shipping-info.md b/llm-content/payments/magic-checkout/apis/shipping-info.md new file mode 100644 index 00000000..6c2189d5 --- /dev/null +++ b/llm-content/payments/magic-checkout/apis/shipping-info.md @@ -0,0 +1,114 @@ +--- +title: Shipping Information +description: Send customer shipping information to Razorpay easily using our API. +--- + +# Shipping Information + +Use this API to send the customer's shipping information to Razorpay. + +> **INFO** +> +> +> **Handy Tips** +> +> Use your webhook URL as the API endpoint for the Shipping Info and Coupon Code APIs. +> + +## Sample Code + +your-webhook-url + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://example-webhook-url.com \ +-H 'content-type : application/json' +-d '{ + "orderId": "FFADADADADASDAS", + "addresses": [ + { + "zipcode": "560060", + "state": "Karnataka", + "country": "IN" + } + ] +}' +```json: Response +{ + "addresses": [ + { + "zipcode": "560060", + "country": "IN", + "state": "Karnataka", + "serviceable": true, + "cod": false, + "cod_amount": 50, + "shipping_methods": [ + { + "id": "shipping_1", + "charge": 50, + "summary": "Free shipping", + "name": "Free Shipping" + } + ] + } + ] +} +``` + +### Request Parameters + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in the previous step. + +`addresses` _mandatory_ +: `array` The customer's address details. + + `zipcode` + : `string` The customer's ZIP code. + + `state` + : `string` The state where the customer resides. + + `country` + : `string` The country where the customer resides. The length cannot exceed 2 characters. + +### Response Parameters + +`addresses` _mandatory_ +: `array` The customer's address details. + + `zipcode` + : `string` The customer's ZIP code. + + `state` + : `string` The state where the customer resides. + + `country` + : `string` The country where the customer resides. The length cannot exceed 2 characters. + + `serviceable` + : `boolean` Indicates whether you deliver orders to the ZIP code entered by the customer. This is based on the ZIP codes you have added under the Serviceability setting on the Razorpay Dashboard. Possible values: + - `true`: Orders can be delivered to the added ZIP codes. + - `false`: Orders cannot be delivered to the added ZIP codes. + + `cod` + : `boolean` Indicates whether you support cash on delivery on this order. + + `cod_amount` + : `integer` The additional amount charged by for you COD. This is based on the amount you have added to the COD setting on the Razorpay Dashboard. + + `shipping_methods` + : `array` Details regarding the shipping methods. + + `id` + : `string` The unique identifier of the shipping method. + + `charge` + : `integer` The shipping charge applicable. + + `summary` + : `string` A brief description of the shipping method. + + `name` + : `string` The name of the shipping method. diff --git a/llm-content/payments/magic-checkout/capacitor-integration.md b/llm-content/payments/magic-checkout/capacitor-integration.md new file mode 100644 index 00000000..fd40679c --- /dev/null +++ b/llm-content/payments/magic-checkout/capacitor-integration.md @@ -0,0 +1,2332 @@ +--- +title: Integrate Razorpay Magic Checkout on Capacitor App +heading: Integrate Magic Checkout on Capacitor App +description: Steps to integrate Magic Checkout on your Capacitor app using the Razorpay Capacitor Standard SDK. +--- + +# Integrate Magic Checkout on Capacitor App + +Follow these steps to integrate the Razorpay Magic Checkout on your Capacitor application. + +#### Prerequisites + +- Create a Razorpay account. +- Generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **1. Build Integration**: Integrate with Capacitor App. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +> **WARN** +> +> +> **Watch Out!** +> +> If you use M1 MacBook, you need to make [these changes](#16-verify-payment-signature) in your `podfile`. Add the following code inside `post_install do |installer|`: +> +> ```js: podfile +> installer.pods_project.build_configurations.each do |config| +> config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" +> end +> ``` +> + +## 1. Build Integration + + +### 1.1 Enable/Disable Magic Checkout and Cash on Delivery + + + + Raise a request with your Razorpay SPOC to get this feature enabled on your account. + Once this feature is enabled, the customer address saving and coupon features are enabled. + + + Raise a request with our [Support team](https://razorpay.com/support/) to enable this feature for your account. + + + + + +### 1.2 Create Promotions and Shipping Info API Endpoints + + Follow the steps given below to create promotions and shipping info API endpoints: + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure that the URLs are publicly accessible, require no authentication and are hosted on your server. +> + + + 1. Log in to the Dashboard and navigate to **Magic Checkout**. + 2. In the **Platform Setup**, select **Custom E-Commerce Platform** from the drop-down list and click **Next**. + ![Choose custom platform](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-custom-platform.jpg.md) + 3. In the **Setup & Settings** section, click **Checkout Settings**. + 4. In the **Coupon Settings** section, enter the following: + 1. **URL for get promotions**: The API URL should return a list of promotions applicable to the specified `order_id` and customer. Magic Checkout uses this endpoint to fetch these promotions from your server and display them to your customers in the checkout modal. + 2. **URL for apply promotions**: The API URL validates the promotion code applied by the customer and should return the discount amount. Magic Checkout uses this endpoint to apply promotions via your server. + 5. Click **Save settings**. + ![Add promotion URLs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-web-promo-url.jpg.md) + 6. Navigate to **Shipping Setup**. + 7. Select **API** as the Shipping Service type from the drop-down list. + 8. Enter the **URL for shipping info**. The API URL should return shipping serviceability, COD serviceability, shipping fees and COD fees for a given list of customer addresses. Magic Checkout uses this endpoint to retrieve shipping information from your server. + 9. Click **Save Settings**. + ![Add shipping URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-web-shipping-url.jpg.md) + + + +### 1.3 Install Razorpay Capacitor Plugin + + Run the following command on your command prompt to install the plugin: + + ```yml: Install Capacitor + npm i -S https://github.com/razorpay/razorpay-capacitor.git #installs plugin that supports Capacitor 6.0 + ``` + + +> **WARN** +> +> +> **Watch Out!** +> +> We recommend you to use the latest plugin version (that works on Capacitor 6.0) as all the latest features will be made available only on this version. However, if you want to use the plugin that works on Capacitor 5.0, use the command given below: +> +> ```yml: Install Capacitor +> npm i -S https://github.com/razorpay/razorpay-capacitor.git#76fd7d6b59f631eb44e6ecebc9188b2425168beb #installs plugin that supports Capacitor 5.0 +> ``` +> +> If you want to use the plugin that works on other capacitor versions, refer to the [GitHub repository](https://github.com/razorpay/razorpay-capacitor). +> +> + + + + Proguard Rules + + If you are using Proguard for your builds, you must add the following lines to your `proguard-rules.pro` file. + + ```java: + -keepclassmembers class * { + @android.webkit.JavascriptInterface ; + } + + -keepattributes JavascriptInterface + -keepattributes *Annotation* + + -dontwarn com.razorpay.** + -keep class com.razorpay.** {*;} + + -optimizations !method/inlining/* + + -keepclasseswithmembers class * { + public void onPayment*(...); + } + ``` + + + + + + +### 1.4 Create an Order + + You can create an order using the following API and send the additional information required for Magic Checkout. Pass the `order_id` received in response to the checkout code. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + // ... other line item details + } + ] +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 50000); +orderRequest.put("currency", "INR"); +orderRequest.put("receipt", "receipt#1"); +orderRequest.put("line_items_total", 50000); // Mandatory for Magic Checkout + +JSONArray lineItems = new JSONArray(); +JSONObject item = new JSONObject(); +item.put("sku", "1g234"); +item.put("variant_id", "12r34"); +item.put("price", 50000); +item.put("offer_price", 50000); +item.put("quantity", 1); +item.put("name", "Product Name"); +// ... other line item details +lineItems.put(item); +orderRequest.put("line_items", lineItems); + +Order order = razorpay.orders.create(orderRequest); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, # Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + # ... other line item details + } + ] +} + +client.order.create(data) +```go: Go +import ( + razorpay "github.com/razorpay/razorpay-go" +) + +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": []interface{}{ + map[string]interface{}{ + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name", + // ... other line item details + }, + }, +} + +body, err := client.Order.Create(para_attr, nil) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array( + 'amount' => 50000, + 'currency' => 'INR', + 'receipt' => 'receipt#1', + 'line_items_total' => 50000, // Mandatory for Magic Checkout + 'line_items' => array( + 0 => array( + 'sku' => '1g234', + 'variant_id' => '12r34', + 'price' => 50000, + 'offer_price' => 50000, + 'quantity' => 1, + 'name' => 'Product Name', + // ... other line item details + ), + ), +)); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, # Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + # ... other line item details + } + ] +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ + key_id: 'YOUR_KEY_ID', + key_secret: 'YOUR_SECRET' +}) + +var data = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + // ... other line item details + } + ] +} + +instance.orders.create(data); +```csharp: .Net +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +orderRequest.Add("line_items_total", 50000); // Mandatory for Magic Checkout + +List lineItem = new List(); +Dictionary lineItems = new Dictionary(); +lineItems.Add("sku", "1g234"); +lineItems.Add("variant_id", "12r34"); +lineItems.Add("price", 50000); +lineItems.Add("offer_price", 50000); +lineItems.Add("quantity", 1); +lineItems.Add("name", "Product Name"); +// ... other line item details +lineItem.Add(lineItems); +orderRequest.Add("line_items", lineItem); + +Order order = client.Order.Create(orderRequest); +``` +```json: Response +{ + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071, + "line_items_total": 50000 +} +``` + + + Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Default is `INR`. Length must be of 3 characters. + +`receipt` _mandatory_ +: `string` Your receipt id for this order should be passed here. Maximum length of 40 characters. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`line_items_total` _mandatory_ +: `integer` Total of `offer_price` for all line items added to the cart, in paise. For example, if a shoe worth ₹8,000 and a shirt worth ₹10,000 are added, the `line_item_total` will be `1800000`. This amount is post-tax. + + +> **WARN** +> +> +> **Watch Out!** +> +> To ensure the order is considered as a Magic Checkout order, you must pass this parameter. Otherwise, it will default to Standard Checkout order and customers will view the Standard Checkout UI instead of Magic Checkout. Know more about [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). +> + +`line_items` _mandatory_ +: `array` This will have the details about the specific items added to the cart. + + `sku` _mandatory_ + : `string` Unique product id defined by you. It can be alphanumeric. + + `variant_id` _mandatory_ + : `string` Unique variant id defined by you. It can be alphanumeric. + + `price` _mandatory_ + : `integer` Price of the product in paise. + + `offer_price` _mandatory_ + : `integer` Final price charged to the customer in paise, after applying any adjustments, such as product discounts. + + +> **INFO** +> +> +> **Handy Tips** +> +> If no discount is applied, `price` and `offer_price` will be the same. +> + + `quantity` _mandatory_ + : `integer` Number of units added in the cart. + + `name` _mandatory_ + : `string` Name of the product. + + `description` _mandatory_ + : `string` Description of the product. + + `weight` _optional_ + : `integer` Weight of the product in grams. + + `dimensions` _optional_ + : `object` The dimensions of the product. + + `length` _optional_ + : `string` The length of the product in centimeters. + + `width` _optional_ + : `string` The width of the product in centimeters. + + `height` _optional_ + : `string` The height of the product in centimeters. + + `image_url` _mandatory_ + : `string` The URL of the product image. This parameter is mandatory if you want to display product images on our iframe. + + `product_url` _optional_ + : `string` URL of the product's listing page. + + `notes` _optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is 299, then pass `29900` in this field. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + +`line_items_total` +: `integer` Total of `offer_price` for all line items added to the cart, in paise. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + +### Pre-discount Handling + + Line items total should equal the sum of individual item prices after your discounts are applied. When applying discounts, reduce both `amount` and `line_items_total` by the same amount: + ```json: Example + { + "amount": 45000, // ₹500 - ₹50 discount = ₹450 + "line_items_total": 45000, // Must match the discounted amount + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "prediscount_applied": "5000" // Track discount in paise + }, + "line_items": [ + // ... your line items with original prices + ] + } + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> Magic Checkout automatically handles all discount calculations on the UI. The system detects differences in checkout amounts and adjusts accordingly. +> + + + + + + +### 1.5 Interact with Shipping Info API + + This API should return shipping serviceability, COD serviceability, shipping fees and COD fees for a given list of customer addresses. + + /your-server-url/shipping-info-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // This is the receipt field set in the Razorpay order + "razorpay_order_id": "EKwxwAgItmmXdp", // This is the RZP order created without the `order_` prefix + "email": "", // Email field will be set if the customer enters an email + "contact": "+919900000000", // Customer phone number with country code + "addresses": [ + { + "id": "0", + "zipcode": "560060", + "state_code": "KA", + "country": "IN" + } + ] + } + + ```json: Response + { + "addresses": [ + { + "id": "0", + "zipcode": "560000", + "state_code": "KA", + "country": "IN", + "shipping_methods": [ + { + "id": "1", + "description": "Free shipping", + "name": "Delivery within 5 days", + "serviceable": true, + "shipping_fee": 1000, // in paise. Here 1000 = 1000 paise, which equals to ₹10 + "cod": true, + "cod_fee": 1000 // in paise. Here 1000 = 1000 paise, which equals to ₹10 + }, + { + "id": "2", + "description": "Standard Delivery", + "name": "Delivered on the same day", + "serviceable": true, + "shipping_fee": 1000, // in paise. Here 1000 = 1000 paise, which equals to ₹10 + "cod": false, + "cod_fee": 0 // in paise. Here 1000 = 1000 paise, which equals to ₹10 + } + ] + } + ] + } + ``` + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#14-create-an-order). + +`razorpay_order_id` _mandatory_ +: `string` Unique identifier for the order returned by Checkout. + +`email` _optional_ +: `string` Customer's email address. + +`contact` _mandatory_ +: `string` Customer's phone number. + +`addresses` _mandatory_ +: `array` Customer's address details. + + `id` _mandatory_ + : `string` Unique identifier of the customer's address. + + `zipcode` _mandatory_ + : `string` Customer's ZIP code. + + `state_code` _optional_ + : `string` The code of the state where the customer resides. + + `country` _mandatory_ + : `string` Country where the customer resides. The length cannot exceed 2 characters. + + + +### Response Parameters + +`addresses` _mandatory_ +: `array` Customer's address details. + + `id` _mandatory_ + : `string` Unique identifier of the customer's address. + + `zipcode` _mandatory_ + : `string` Customer's ZIP code. + + `country` _mandatory_ + : `string` Country where the customer resides. The length cannot exceed 2 characters. + + `shipping_methods` _mandatory_ + : `array` Details regarding the shipping methods. + + `id` _mandatory_ + : `string` Unique identifier of the shipping method. + + `description` + : `integer` Brief description of the shipping method. + + `name` _mandatory_ + : `string` Name of the shipping method. + + `serviceable` _mandatory_ + : `boolean` Indicates whether you deliver orders to the zipcode entered by the customer. This is based on the ZIP codes you have added in the serviceability setting on the Razorpay Dashboard. Possible values: + - `true`: Orders can be delivered to the added ZIP codes. + - `false`: Orders cannot be delivered to the added ZIP codes. + + `shipping_fee` _mandatory_ + : `integer` Shipping charge in paise applicable to be paid by the customer. + + `cod` _mandatory_ + : `boolean` Indicates whether you support cash on delivery on this order. + - `true`: COD payment method is supported. + - `false`: COD payment method is not supported. + + `cod_fee` _mandatory_ : `integer` Cash on Delivery fee charged in paise. This amount is based on the COD settings configured in your Razorpay Dashboard. + + +> **INFO** +> +> +> **Handy Tips** +> +> If the `cod` field is false, set the `cod_fee` field to 0. +> + + + + + + + +### 1.6 Interact with Get Promotions API + + This API should return the list of promotions applicable for the given `order_id` and customer. + + /your-server-url/create-promotions-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // this is the receipt field set in Razorpay order + "contact": "+919000090000", + "email": "" + }' + ```json: Response + { + "promotions": [ + { + "code": "10%OFF", + "summary": "10% off on total cart value", + "description": "10% on total cart value upto ₹300", + ] + }, + { + "code": "500OFF", + "summary": "₹500 off on total cart value", + "description": "₹500 off on a minimum cart value of ₹1500", + ] + } + ] + } + ``` + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#14-create-an-order). + +`contact` _optional_ +: `string` Customer's phone number. + +`email` _optional_ +: `string` Customer's email address. + + + +### Response Parameters + +`promotions` _mandatory_ +: `array` Details of the promotions created. + + `code` _mandatory_ + : `string` Unique identifier of the promotion. + + `summary` _mandatory_ + : `string` Summary about the promotion. For example, 10% off on total cart value. + + `description` _optional_ + : `string` Brief description of the promotion. For example, 10% on total cart value upto ₹300. + + + +### 1.6.1 Interact with Apply Promotions API + + This API should validate the promotion code applied by the customer and return the discount amount. + + /your-server-url/create-promotions-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // this is the receipt field set in Razorpay order + "contact": "+919000090000", + "email": "", + "code": "500OFF" + }' + + ```json: Success Response + { + "promotion": { + "reference_id": "3rvff", + "type": "offer", + "code": "500OFF", + "value": 50000, + "value_type": "fixed_amount", + "description": "New Year Sale Offer" + } + } + ```json: Failure Response + { + "failure_code": "LOGIN_REQUIRED", + "failure_reason": "promotion Code has expired" + } + ``` + + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#14-create-an-order). + +`contact` _optional_ +: `string` Customer's phone number. + +`email` _optional_ +: `string` Customer's email address. + +`code` _mandatory_ +: `string` Promotion code used to avail discount on checkout. + + + +### Response Parameters + +`promotion` _mandatory_ +: `object` Used to pass all offer or discount-related information, including promotion code discount, method discount and so on. + + `reference_id` _mandatory_ + : `string` Identifier of the offer you create. + + `code` _optional_ + : `string` Promotion code used to avail discount on checkout. + + `type` _optional_ + : `string` Type of offer. Possible values: + - `coupon`: A discount applied by customers during checkout. For example, customers can use a coupon like `Diwali Sale 500 Off` to get ₹500 off the total cart value. + - `offer`: A promotion you create for your customers. For example, you create an offer `Buy 4 t-shirts and get 2 free`. In this case, when customers add 4 t-shirts to their cart, the 2 additional t-shirts will be automatically added for free. + + `value` _optional_ + : `integer` The offer value that needs to be applied in paise. For example, if you want to offer a discount of ₹500, enter 50000. + + `value_type` _optional_ + : `string` The type of value like: + - `fixed_amount`: A fixed amount discount value in the currency of the order. For example, ₹500. + - `percentage`: A percentage discount value. For example, 10%. + - `BXGY`: Buy X and Get Y. For example, if you buy 2 t-shirts, you a get a cap for free or at a discounted value. + + +> **INFO** +> +> +> **Handy Tips** +> +> Regardless of the `value_type`, the amount specified in the `value` parameter is applied as-is. For example, if `value_type` is percentage and the `value` is 5000, 5000 is considered in currency subunits (paise). +> + + + `description` _optional_ + : `string` Description of the promotion applied. For example, `New Year Sale Offer`. + + + +### Error Code, Description and Next Steps + + + Code | Description | Next Steps + --- + INVALID_PROMOTION | The specified promotion code is not recognised or does not exist in the system. | Please verify the code and try again. + --- + LOGIN_REQUIRED | This coupon is specifically assigned to a registered customer. | To redeem it, the customer must log in to their account and authenticate their identity. + --- + REQUIREMENT_NOT_MET | The current cart conditions do not meet the requirements for this promotion to be valid. For example, the promotion may require a minimum cart value of ₹1,000, but the cart total is ₹800. | Review the promotion's terms and adjust the cart contents accordingly. + + + + + + + + + + +### 1.7 Add Checkout Class in MainActivity.java (Android Only) + + Add the Checkout class to the ArrayList in the MainActivity class in `{{projectDir}}/android/src/main/MainActivity.java`. Below is the sample code: + + ```java: Add Checkout Class + import com.ionicframework.capacitor.Checkout; + + public class MainActivity extends BridgeActivity { + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + registerPlugin(Checkout.class); + } + } + ``` + + Check the [Capacitor 6.0 Official Updates](https://capacitorjs.com/docs/updating/6-0). + + + +### 1.8 Add Checkout Code + + Add the Pay button on your web page using the checkout code given below. The checkout page is displayed when the customers click the Pay button. + + + 1.8.1 Code to Add Pay Button + + Add the Checkout code to your project. Ensure that you pass the `order_id` that you received in response to the first step. + + ```js: Checkout Code + import { Checkout } from 'capacitor-razorpay'; + @Component({ + selector: 'app-home', + templateUrl: 'home.page.html', + styleUrls: ['home.page.scss'], + }) + export class HomePage { + constructor(private alertController: AlertController) {} + async payWithRazorpay(){ + const options = { + key: '[YOUR_KEY_ID]', + amount: '50000', + description: 'Great offers', + image: 'https://i.imgur.com/3g7nmJC.jpg', + order_id: 'order_Cp10EhSaf7wLbS',//Order ID generated in Step 1 + currency: '', + name: 'Acme Corp', + prefill: { + email: '', + contact: '9000090000' + }, + theme: { + color: '#3399cc' + }, + 'one_click_checkout': true, // magic checkout + 'show_coupons': true // magic checkout + } + try { + let data = (await Checkout.open(options)); + console.log(data.response+"AcmeCorp"); + console.log(JSON.stringify(data)) + } catch (error) { + //it's paramount that you parse the data into a JSONObject + let errorObj = JSON.parse(error['code']) + alert(errorObj.description); + alert(errorObj.code); + alert(errorObj.reason); + alert(errorObj.step); + alert(errorObj.source); + alert(errorObj.metadata.order_id); + alert(errorObj.metadata.payment_id); + } + async presentAlert(response: string){ + // let responseObj = JSON.parse(response) + console.log("message"+ response['razorpay_payment_id']); + const alert = await this.alertController.create({ + message:response['razorpay_payment_id'], + backdropDismiss: true, + }); + await alert.present(); + } + } + ``` + + + + + +### Checkout Options + + You must pass these parameters in Checkout to initiate the payment. + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + + + +### 1.8.2 Enable UPI Intent on iOS *(Optional)* + + Provide your customers with a better payment experience by enabling UPI Intent on your app's Checkout form. In the UPI Intent flow: +1. Customer selects UPI as the payment method in your iOS app. A list of UPI apps supporting the intent flow is displayed. For example, PhonePe, Google Pay and Paytm. +2. Customer selects the preferred app. The UPI app opens with pre-populated payment details. +3. Customer enters their UPI PIN to complete their transactions. +4. Once the payment is successful, the customer is redirected to your app or website. + +To enable this in your iOS integration, you must make the following changes in your app's info.plist file. + +```xml: info.plist +LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + +``` + +Know more about [UPI Intent and its benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). + +### UPI Intent on Recurring Payments + +Configure and initiate a recurring payment transaction on UPI Intent: + +```swift: ViewController.swift +let options: [String:Any] = [ + "key": "YOUR_KEY_ID", + "order_id": "order_DBJOWzybfXXXX", + "customer_id": "cust_BtQNqzmBlXXXX", + "prefill": [ + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + ], + "image": "https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + "amount": 10000, // Amount should match the order amount + "currency": "INR", + "recurring": 1 // This key value pair is mandatory for Intent Recurring Payment. +] +```objectivec: ViewController.m +NSDictionary *options = @{ + @"key": @"YOUR_KEY_ID", + @"order_id": @"order_DBJOWzybfXXXX", + @"customer_id": @"cust_BtQNqzmBlXXXX", + @"prefill": @{ + @"contact": @"+919000090000", + @"email": @"gaurav.kumar@example.com" + }, + @"image": @"https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + @"amount": @(10000), // Amount should match the order amount + @"currency": @"INR", + @"recurring": @(1) // This key value pair is mandatory for Intent Recurring Payment. +}; +``` + + + + + + + +### 1.9 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.10 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + + +### 1.11 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +### 1.12 Perform Post Payment Processing + + Based on the response, you can handle post-payment processing on your end. + +> **WARN** +> +> +> **Timeout Handling** +> +> If no API call is made within 45 seconds, our background job will assume there is a network drop off and will proceed to place the order on Shopify automatically. +> + + + Fetch an Order + + Use the Fetch Orders API to retrieve order details, including customer information, address, shipping method and promotions of a particular order: + + v1/orders/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ + -X GET https://api.razorpay.com/v1/orders/order_R1yDkxyIuKXXXX \ + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + import com.razorpay.Order; + import com.razorpay.RazorpayClient; + import com.razorpay.RazorpayException; + try { + Order order = razorpay.Orders.fetch(""); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + # do easy_install razorpay or + # pip install razorpay + + import razorpay + razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]")) + + order_id = + resp = client.order.fetch(order_id) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->fetch($orderId); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('key_id', 'key_secret') + + order = Razorpay::Order.fetch('order_R1yDkxyIuKXXXX') + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.fetch(orderId) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("", "") + + body, err := client.Order.Fetch("", nil, nil) + ``` + ```json: Response: COD Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 507000, + "amount_paid": 0, + "amount_due": 507000, + "currency": "INR", + "receipt": "#30567", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "placed", + "attempts": 0, + "notes": { + "cart_id": "hWN2Am4BGnQrizKE3hzeQaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/hf5Q?key=14bbbce35b8", + "shopify_order_id": "6302119854247" + }, + "created_at": 1756045901, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 5000, + "shipping_fee": 7000, + "customer_details": { + "contact": "+919100000000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + }, + "billing_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + } + }, + "line_items_total": 600000, + "tax_details": { + "total_tax": 4128, + "taxes_included": true + } + } + ```json: Response: Prepaid Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 100700, + "amount_paid": 100700, + "amount_due": 0, + "currency": "INR", + "receipt": "#30414", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "paid", + "attempts": 1, + "notes": { + "cart_id": "hWN1TcwL?key=1a3a5a7c", + "storefront_id": "gid://shopify/Cart/hIkey=af7c7800", + "flits_cart_token": "hWcwL?key=1a3741dc_8740f5_175447", + "shopify_order_id": "6266036191399" + }, + "created_at": 1754466155, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 0, + "shipping_fee": 700, + "customer_details": { + "billing_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "billing_address", + "zipcode": "110057" + }, + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "shipping_address", + "zipcode": "110057" + } + }, + "line_items_total": 110000, + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + Know more about the [Orders API.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) + + +> **INFO** +> +> +> **Order Status** +> +> Check the order status for the following: +> +> - Prepaid orders: `paid`. +> - COD orders: `placed`. +> + + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the order to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the order. For example, `order_R1yDkxyIuKXXXX`. + +`entity` +: `string` Type of entity. Value is `order`. + +`amount` +: `integer` Total order amount in the smallest currency unit (paise). + +`amount_paid` +: `integer` Amount paid towards the order in paise. For prepaid orders, this shows the actual amount paid. For COD orders, this is `0` until payment is collected. + +`amount_due` +: `integer` Outstanding amount due in paise. For prepaid orders, this shows any remaining balance. For COD orders, this equals the `amount` field until payment is collected. + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`receipt` +: `string` Receipt identifier for internal reference. For example, `#30567`. + +`offers` +: `array` Array of offer IDs applied to the order. + +`status` +: `string` Current status of the order. Possible values: + - `placed`: Order placed but payment pending (COD orders). + - `paid`: Order placed and payment completed (prepaid orders). + - `cancelled`: Order cancelled. + - `refunded`: Order refunded. + +`attempts` +: `integer` Number of payment attempts made for this order. For example, `1`. + +`notes` +: `object` Custom notes added to the order containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `shopify_order_id` + : `string` Shopify order reference. + + `flits_cart_token` + : `string` Flits integration token (optional). + +`created_at` +: `integer` Unix timestamp indicating when the order was created. For example, `1756045901`. + +`description` +: `string|null` Order description. Returns `null` if no description is provided. + +`checkout` +: `string|null` Checkout identifier. Returns `null` if not applicable. + +`promotions` +: `array` Array of promotion objects applied to the order. + + `code` + : `string` Promotion code used. For example, `orderOff`. + + `type` + : `string` Type of promotion. For example, `cart_value`. + + `value` + : `integer` Discount value in paise. For example, `10000` for ₹100. + + `description` + : `string` Human-readable promotion description. + + `reference_id` + : `string` Internal reference for the promotion. + +`cod_fee` +: `integer` Cash on Delivery charges in paise. For COD orders, this contains the fee amount (for example, `5000` for ₹50). For prepaid orders, this is `0`. + +`shipping_fee` +: `integer` Shipping charges in paise. For example, `700` for ₹7. + +`customer_details` +: `object` Customer information. + + `contact` + : `string` Customer's phone number. + + `email` + : `string` Customer's email address. + + `shipping_address` + : `object` Complete shipping address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for delivery. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Recipient name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `shipping_address`. + + `zipcode` + : `string` Postal code. + + `billing_address` + : `object` Complete billing address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for billing. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Account holder name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `billing_address`. + + `zipcode` + : `string` Postal code. + +`line_items_total` +: `integer` Total value of line items in paise before adding shipping fees and COD fees, after applying promotions. For example, `60000` for ₹600. + +`tax_details` +: `object` Tax information. + + `total_tax` + : `integer` Total tax amount in paise. For example, `4128`. + + `taxes_included` + : `boolean` Indicates whether taxes are included in the item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### Fetch a Payment + + Use the Fetch Payments API to retrieve comprehensive payment details, including transaction status, payment method, customer information, settlement details, and the associated order information for a specific payment: + + v1/payments/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X GET https://api.razorpay.com/v1/payments/pay_R1yFlWQar3XXXX + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String paymentId = "pay_R1yFlWQar3XXXX"; + + Payment payment = razorpay.payments.fetch(paymentId); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.payment.fetch(paymentId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + paymentId := "pay_R1yFlWQar3XXXX" + + body, err := client.Payment.Fetch(paymentId, nil, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->payment->fetch($paymentId); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + paymentId = "pay_R1yFlWQar3XXXX" + + Razorpay::Payment.fetch(paymentId) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.payments.fetch(paymentId) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + Payment payment = client.Payment.Fetch(paymentId); + ``` + + ```json: Response: COD Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 55700, + "currency": "INR", + "status": "pending", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "cod", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919100000000", + "notes": { + "cart_id": "hWN2QaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/h?key=14bbf59ce35b8" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1756046099, + "receiver_type": null + } + ```json: Response: Prepaid Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 90630, + "currency": "INR", + "status": "captured", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "cart_id": "hWNsVrcwL?key=1a3a457ddc", + "storefront_id": "gid://shopify/Cart/hWv3e8?key=af707", + "flits_cart_token": "hWrcwL?key=1a3a5a70f5_17547", + "optimizer_provider_name": "razorpay" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "727947422583", + "upi_transaction_id": "1F723677C679EF578A95" + }, + "created_at": 1754466271, + "receiver_type": null, + "upi": { + "vpa": "gaurav.kumar@exampleupi" + } + } + ``` + + Know more about the [Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md). + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. For example, `pay_R1yFlWQar3XXXX`. + +`entity` +: `string` Type of entity. Value is `payment`. + +`amount` +: `integer` Payment amount in the smallest currency unit (paise). For COD payments, this includes the COD fee (for example, `55700` for ₹557). For prepaid payments, this equals the captured amount (for example, `90630` for ₹906.30). + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`status` +: `string` Current status of the payment. Possible values: + - `pending`: Payment pending collection (COD orders). + - `captured`: Payment successfully captured (prepaid orders). + - `authorized`: Payment authorized but not captured. + - `failed`: Payment attempt failed. + +`order_id` +: `string` Unique identifier of the associated order. For example, `order_R1yDkxyIuKXXXX`. + +`invoice_id` +: `string|null` Unique identifier of the associated invoice. Returns `null` if no invoice is linked. + +`international` +: `boolean` Indicates whether this is an international payment. Possible values: + - `true`: International payment. + - `false`: Domestic payment. + +`method` +: `string` Payment method used. Possible values include: + - `cod` + - `upi` + - `card` + - `netbanking` + - `wallet` + +`amount_refunded` +: `integer` Amount refunded in paise. For example, `0` indicates no refund has been processed. + +`refund_status` +: `string|null` Current refund status. Returns `null` if no refund is applicable. Possible values: + - `partial`: Partial refund processed. + - `full`: Full refund processed. + +`captured` +: `boolean` Indicates whether the payment has been captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string|null` Payment description. Returns `null` if no description is provided. + +`card_id` +: `string|null` Unique identifier of the card used for payment. Returns `null` for non-card payments. + +`bank` +: `string|null` Bank identifier for netbanking payments. Returns `null` for other payment methods. + +`wallet` +: `string|null` Wallet provider identifier. Returns `null` for non-wallet payments. + +`vpa` +: `string|null` Virtual Payment Address for UPI payments. For example, `gaurav.kumar@exampleupi`. Returns `null` for non-UPI payments. + +`email` +: `string` Customer's email address. + +`contact` +: `string` Customer's phone number. + +`notes` +: `object` Custom notes added to the payment containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `flits_cart_token` + : `string` Flits integration token (optional). + + `optimizer_provider_name` + : `string` Payment optimizer provider name (optional). + +`fee` +: `integer|null` Processing fee charged in paise. For example, `0` indicates no fee. Returns `null` for COD payments. + +`tax` +: `integer|null` Tax amount on processing fee in paise. For example, `0` indicates no tax. Returns `null` for COD payments. + +`error_code` +: `string|null` Error code if payment failed. Returns `null` for successful payments. + +`error_description` +: `string|null` Human-readable error description. Returns `null` for successful payments. + +`error_source` +: `string|null` Source of the error. Returns `null` for successful payments. + +`error_step` +: `string|null` Step at which error occurred. Returns `null` for successful payments. + +`error_reason` +: `string|null` Reason for the error. Returns `null` for successful payments. + +`acquirer_data` +: `object` Data from the payment acquirer. + + `rrn` + : `string` Retrieval Reference Number from the acquirer (optional). + + `upi_transaction_id` + : `string` UPI transaction identifier from the acquirer (optional). + +`created_at` +: `integer` Unix timestamp indicating when the payment was created. For example, `1756046099`. + +`receiver_type` +: `string|null` Type of receiver for the payment. Returns `null` if not applicable. + +`upi` +: `object` UPI-specific payment details (only present for UPI payments). + + `vpa` + : `string` Virtual Payment Address used for the UPI payment. + + + + + + + + + + +## 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +You can make test payments using one of the payment methods configured at the Checkout. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + + +### Supported Payment Methods + + Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + + + Payment Method | Code | Availability + --- + [Cash on Delivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md) | `cod` | Requires [Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md#prerequisites). + --- + [Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ + --- + [Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ + --- + [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ + --- + [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ + --- + EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ + --- + [Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ + --- + [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). + --- + [Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. + --- + [Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + + + ### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + ### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the following lists: + - [Supported UPI Flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + - [UPI Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/upi.md). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + ### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + #### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + - [Test Error Scenarios](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards). + + #### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + ### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## 3. Go-live Checklist + +Check the go-live checklist for Razorpay Magic Checkout integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + +## Related Information + +[Capacitor Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/capacitor-integration.md) diff --git a/llm-content/payments/magic-checkout/customisations-extensions.md b/llm-content/payments/magic-checkout/customisations-extensions.md new file mode 100644 index 00000000..8a8e6dd6 --- /dev/null +++ b/llm-content/payments/magic-checkout/customisations-extensions.md @@ -0,0 +1,168 @@ +--- +title: Customisations and Extensions | Razorpay Magic Checkout +heading: Customisations and Extensions +description: Customise Razorpay Magic Checkout with third-party extensions. Add analytics, marketing automation, loyalty programs shipping solution and more. +--- + +# Customisations and Extensions + +Razorpay Magic Checkout offers extensive customisation options through third-party integrations and plugins. Extend functionality with analytics, marketing, loyalty and logistics tools tailored to your business needs. + +## Analytics and Tracking Solutions + +Track user behaviour, measure conversions and optimise the checkout funnel with the following tools: + +Tool | Description +--- +**Webengage** | Customer engagement and analytics +--- +**Moengage** | Customer engagement and retention analytics +--- +**Clevertap** | User analytics and behavioural insights +--- +**Mixpanel** | Event-based product analytics +--- +**Velocity Insights** | Checkout performance and conversion analytics +--- +**Freshsales/Freshdesk** | CRM and customer support analytics + +## Retargeting and Marketing Automation + +Re-engage customers and automate marketing workflows with these tools: + +Tool | Description | Integration Type +--- +**Omnisend** | Email and SMS marketing automation | Abandoned cart recovery +--- +**Contlo** | Customer data platform with marketing automation | Personalised retargeting +--- +**Klavio** | Email marketing and customer segmentation | Post-purchase campaigns +--- +**Zoko** | WhatsApp and multi-channel marketing | Cross-platform retargeting +--- +**Intelliticks** | AI-powered chatbot and customer engagement | Real-time customer support +--- +**BoB** | Behavioural targeting and personalisation | Dynamic content delivery +--- +**Bitespeed** | Customer journey automation | Multi-touchpoint engagement +--- +**Haptik** | Conversational AI and customer support | Interactive customer assistance + +Follow the best practices given below: + +- Sync customer and checkout data for effective targeting. +- Implement consent banners for compliant data usage. +- Trigger campaigns using checkout completion events. + +## Product Customisation and Variant Management + +Enable personalised products and advanced variant controls using: + +Solution | Description | Technical Requirements +--- +**BOLD Product Options** | Advanced product customisation interface | [Shopify App Store](https://apps.shopify.com/product-options) +--- +**Ymq Product Options** | Variant management with auto-complete | [Shopify Integration](https://apps.shopify.com/ymq-options?st_source=autocomplete) +--- +**Product Options and Customiser** | Comprehensive product personalisation | [Customiser App](https://apps.shopify.com/product-customizer) +--- +**Infinite Options** | Unlimited product variant creation | [Custom Options](https://apps.shopify.com/custom-options) +--- +**W3 Product Accessories** | Related product and accessory management | Custom integration required + +Check the list of features given below: + +- Dynamic pricing based on customer selections. +- Inventory syncing for selected variants. +- Custom fields with input validation. +- Responsive design across mobile and desktop. + +## Loyalty and Rewards Programs + +Incentivise purchases and improve retention with loyalty platforms: + +Platform | Functionality | Integration Method +--- +**Nector** | Points-based loyalty program | `API Integration` +--- +**FLits** | Cashback and reward management | `Webhook Integration` +--- +**Capillary** | Enterprise loyalty platform | `Custom API` +--- +**Smile** | Social loyalty and referral program | `JavaScript Widget` +--- +**BoN Rewards** | Comprehensive loyalty solution | `Plugin Integration` + +Follow the best practices given below: + +- Calculate and apply points during checkout. +- Update balances in real-time post-transaction. +- Validate redemption rules on Checkout. +- Ensure loyalty points sync across platforms. + +## Shipping and Logistics Integration + +Automate shipping, tracking and fulfilment using: + +Service | Description +--- +**Clickpost** | - Multi-carrier shipping management +- Rate comparison and selection +- Automated label generation + +--- +**Shiprocket** | - Automated shipping and tracking +- COD reconciliation +- Return management system + +--- +**Unicommerce** | - Inventory and order management +- Multi-channel fulfillment +- Warehouse management system + +--- +**iThink Logistics** | - End-to-end logistics solutions +- Real-time shipment tracking +- Multi-carrier network access + +--- +**Delhivery** | - Express logistics and supply chain +- Last-mile delivery optimisation +- Hyperlocal delivery services + + +Check to the list of features given below: + +- Calculate shipping rates dynamically at checkout. +- Enable automated courier selection based on criteria. +- Integrate tracking updates post order placement. +- Handle returns with pre-defined workflows. + +## Discount and Coupon Management + +Enable discounts and promotional strategies using these tools: + +Tool | Description | Use Case +--- +**Shopify Native Coupons** | Built-in discount management | Standard promotional codes +--- +**Farzi** | Advanced coupon and promotional tool | Complex discount rules +--- +**All In One Discount** | - Comprehensive discount management +- Volume discounts and quantity breaks +- BOGO and tiered pricing + | Plugin Integration + +The configuration options are given below: + +- Apply fixed or percentage-based discounts. +- Set minimum order values for eligibility. +- Enable user-specific or limited-time offers. +- Define discount tiers based on quantity or value. + +## Related Information + +- [Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout.md) +- [Magic Checkout Use Cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/use-cases.md) +- [Features](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/features.md) +- [Logistics Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners.md) diff --git a/llm-content/payments/magic-checkout/features.md b/llm-content/payments/magic-checkout/features.md new file mode 100644 index 00000000..1076d910 --- /dev/null +++ b/llm-content/payments/magic-checkout/features.md @@ -0,0 +1,47 @@ +--- +title: Features | Razorpay Magic Checkout +heading: Features +description: List of features that will help you build a first-class payments experience with Razorpay Magic Checkout. +--- + +# Features + +With Magic Checkout you can: + +- **Reduce RTOs and Improve COD Intelligence** + +Magic Checkout offers the following features to better RTO protection and improve COD intelligence. + - [Block or allow COD options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/allowlist-blocklist.md). + - [Upload order status data](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/delivery-status.md). + - [Manually review COD orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/review-cod-orders.md). + - [Automate the actions on COD orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/review-cod-orders/workflow.md). + +- **Convert COD Orders to Prepaid** + +Persuade customers who chose cash on delivery while placing an order to convert to prepaid by offering discounts or incentives post-order placement. You can do this by sending your customers a conversion link via WhatsApp. Know how to [convert COD orders to prepaid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/prepay-cod.md). + +- **RTO Analytics** + +View in-depth information about the various RTO activities on Magic Checkout and improve your overall business health. Know more about [RTO Analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto.md). + +- **Integrate with Logistics Partners** + +Seamlessly integrate with logistics partners to facilitate efficient order fulfillment and delivery processes. Know more about how to integrate with [Logistics Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners.md). + +- **Leverage Various Plugins** + +Access a range of plugins to customise and enhance your e-commerce platform, meeting specific business needs and improving functionality. Know more about how to integrate with [WooCommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md) and [Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify.md). + +- **Eliminate Multiple Payment Gateways** + +Simplify payment processing with a single gateway, reducing complexity and enhancing transaction efficiency through Magic Checkout. Know more about how to integrate on your [Custom-built Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/web.md). + +- **QuickBuy: Revolutionise Your Checkout Process** + +QuickBuy is a game-changing 1-click payment experience designed to simplify your checkout. Its intuitive half-page interface minimises steps, allowing customers to complete payments faster. + + Leveraging advanced personalisation algorithms, QuickBuy streamlines the checkout experience by minimising steps and simplifying decisions leading to quicker checkouts and higher conversion rates. This boosts customer satisfaction and drives business growth, making every transaction seamless. Know more about [QuickBuy](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/features/quickbuy.md). + +## Related Information + +[Customisations and Extensions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/customisations-extensions.md) diff --git a/llm-content/payments/magic-checkout/features/quickbuy.md b/llm-content/payments/magic-checkout/features/quickbuy.md new file mode 100644 index 00000000..3ad906d9 --- /dev/null +++ b/llm-content/payments/magic-checkout/features/quickbuy.md @@ -0,0 +1,67 @@ +--- +title: QuickBuy | Razorpay Magic Checkout Features +heading: QuickBuy +description: Streamline checkout with QuickBuy’s 1-click payment and order placement. Minimise steps and speed up transactions for a fast, seamless customer experience. +--- + +# QuickBuy + +QuickBuy is a one-click payment solution that streamlines checkout for returning customers. With a compact half-page interface, it intelligently displays preferred payment methods based on past transactions and automatically applies the best available offers, reducing friction and decision-making. + +This results in a faster, more efficient checkout experience that boosts conversion rates and enhances satisfaction for both customers and businesses. + +![QuickBuy on Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/quickbuy-magic.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> This feature is currently available only on mobile. +> + +## Features + +- **Quick Transactions**: 1-click payment process for returning users with minimal steps for faster checkouts, enhanced by a half-page overlay that provides a streamlined experience. +- **Clear Payment Details**: Transparent display of payment information, including savings and discounts. +- **Automatic Offer Application**: Automatic application of offers with visible savings to enhance customer satisfaction. +- **Smart Address and Shipping Method Selection**: Automatically selects the most suitable address and shipping option, minimising customer effort and ensuring a seamless checkout process. + +> **INFO** +> +> +> **Handy Tips** +> +> - Customers can use UPI intent, UPI Saved VPAs and Saved Cards through QuickBuy. +> - QuickBuy displays recommended payment methods based on past transactions for a faster checkout. If no recommendations exist, the full checkout flow is shown. +> + +## Advantages + + + - **Improved Conversion Rates**: Reduces drop-offs with minimal steps and pre-selected payment methods. + - **Enhanced User Experience**: Provides a faster, simpler payment process that encourages repeat transactions. + - **Efficient Checkout Process**: Offers advanced features like 1-click purchases, improving overall efficiency. + + + - **Simplified Payments**: Pre-selection of preferred payment methods for quicker transactions. + - **Automatic Offer Application:** Automatically applies the best available offers for cost savings. + + +## How it Works + +QuickBuy is ideal for returning users who are logged into Razorpay Checkout and making repeat purchases. The workflow includes: + +1. **Automatic coupon application**: The best available coupon is applied to the total. If they change the coupon, the system recalculates and updates the total amount. +2. **Default address selection**: The most recently used address is automatically selected. +3. **Pre-selected shipping method**: The default shipping method is free if available; otherwise, the lowest-cost option is chosen, with the option to change it if required. +4. **Preferred payment method**: The most frequently used payment method is pre-selected. If the user changes their payment method, the system recalculates and applies the best available offer to the new method, notifying them of the updated total. +5. **Single-click purchase**: Customers complete their purchases in a single click. + +> **INFO** +> +> +> **Disable QuickBuy** +> +> To disable QuickBuy on checkout, contact our [Support team](https://razorpay.com/support/#request). +> diff --git a/llm-content/payments/magic-checkout/flutter-integration.md b/llm-content/payments/magic-checkout/flutter-integration.md new file mode 100644 index 00000000..434e43b3 --- /dev/null +++ b/llm-content/payments/magic-checkout/flutter-integration.md @@ -0,0 +1,2340 @@ +--- +title: Integrate Razorpay Magic Checkout on Flutter App +heading: Integrate Magic Checkout on Flutter App +description: Steps to integrate Magic Checkout on your Flutter app using the Razorpay Flutter Standard SDK. +--- + +# Integrate Magic Checkout on Flutter App + +Follow these steps to integrate the Razorpay Magic Checkout on your Flutter application. + +#### Prerequisites + +- Create a Razorpay account. +- Generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **1. Build Integration**: Integrate with Flutter App. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +## 1. Build Integration + + +### 1.1 Enable/Disable Magic Checkout and Cash on Delivery + + + + Raise a request with your Razorpay SPOC to get this feature enabled on your account. + Once this feature is enabled, the customer address saving and coupon features are enabled. + + + Raise a request with our [Support team](https://razorpay.com/support/) to enable this feature for your account. + + + + + +### 1.2 Create Promotions and Shipping Info API Endpoints + + Follow the steps given below to create promotions and shipping info API endpoints: + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure that the URLs are publicly accessible, require no authentication and are hosted on your server. +> + + + 1. Log in to the Dashboard and navigate to **Magic Checkout**. + 2. In the **Platform Setup**, select **Custom E-Commerce Platform** from the drop-down list and click **Next**. + ![Choose custom platform](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-custom-platform.jpg.md) + 3. In the **Setup & Settings** section, click **Checkout Settings**. + 4. In the **Coupon Settings** section, enter the following: + 1. **URL for get promotions**: The API URL should return a list of promotions applicable to the specified `order_id` and customer. Magic Checkout uses this endpoint to fetch these promotions from your server and display them to your customers in the checkout modal. + 2. **URL for apply promotions**: The API URL validates the promotion code applied by the customer and should return the discount amount. Magic Checkout uses this endpoint to apply promotions via your server. + 5. Click **Save settings**. + ![Add promotion URLs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-web-promo-url.jpg.md) + 6. Navigate to **Shipping Setup**. + 7. Select **API** as the Shipping Service type from the drop-down list. + 8. Enter the **URL for shipping info**. The API URL should return shipping serviceability, COD serviceability, shipping fees and COD fees for a given list of customer addresses. Magic Checkout uses this endpoint to retrieve shipping information from your server. + 9. Click **Save Settings**. + ![Add shipping URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-web-shipping-url.jpg.md) + + + +### 1.3 Install Razorpay Flutter Plugin + + [Download the plugin](https://pub.dev/packages/razorpay_flutter) from Pub.dev. + + Add the below code to `dependencies` in your app's `pubspec.yaml` + + ```yml: Add Dependencies + razorpay_flutter: 1.4.0 + ``` + + + + Add Proguard Rules (Android Only) + + If you are using Proguard for your builds, you need to add the following lines to the Proguard files: + + ```java: Add Proguard Rules + -keepattributes *Annotation* + -dontwarn com.razorpay.** + -keep class com.razorpay.** {*;} + -optimizations !method/inlining/ + -keepclasseswithmembers class * { + public void onPayment*(...); + } + ``` + + Know more about [Proguard rules](https://github.com/razorpay/razorpay-flutter/issues/42#issuecomment-550161626). + + + +### Get Packages + + Run `flutter packages get` in the root directory of your app. + + +> **INFO** +> +> +> **Minimum Version Requirement** +> +> - For **Android**, ensure that the minimum API level for your app is 19 or higher. +> - For **iOS**, ensure that the minimum deployment target for your app is iOS 10.0 or higher. Also, do not forget to enable bitcode for your project. +> + + + + + + + +### 1.4 Import Package and Create Razorpay Instance + + Use the below code to import the `razorpay_flutter.dart` file to your project. + + ```yml: Import Package + import 'package:razorpay_flutter/razorpay_flutter.dart'; + ``` + + Use the below code to create a Razorpay instance. + + ```yml: Instantiate + _razorpay = Razorpay(); + ``` + + + +### 1.5 Attach Event Listeners + + The plugin uses event-based communication and emits events when payments fail or succeed. + + The event names are exposed via the constants `EVENT_PAYMENT_SUCCESS`, `EVENT_PAYMENT_ERROR` and `EVENT_EXTERNAL_WALLET` from the `Razorpay` class. + + Use the `on(String event, Function handler)` method on the `Razorpay` instance to attach event listeners. + + ```yml: Attach Event Listeners + _razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, _handlePaymentSuccess); + _razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, _handlePaymentError); + _razorpay.on(Razorpay.EVENT_EXTERNAL_WALLET, _handleExternalWallet); + ``` + + The handlers would be defined in the class as: + + ```yml: Handlers + void _handlePaymentSuccess(PaymentSuccessResponse response) { + // Do something when payment succeeds + } + + void _handlePaymentError(PaymentFailureResponse response) { + // Do something when payment fails + } + + void _handleExternalWallet(ExternalWalletResponse response) { + // Do something when an external wallet is selected + } + ``` + + To clear event listeners, use the `clear` method on the `Razorpay` instance. + + ```yml: Clear Event Listeners + _razorpay.clear(); // Removes all listeners + ``` + + + +### 1.6 Create an Order + + You can create an order using the following API and send the additional information required for Magic Checkout. Pass the `order_id` received in response to the checkout code. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + // ... other line item details + } + ] +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 50000); +orderRequest.put("currency", "INR"); +orderRequest.put("receipt", "receipt#1"); +orderRequest.put("line_items_total", 50000); // Mandatory for Magic Checkout + +JSONArray lineItems = new JSONArray(); +JSONObject item = new JSONObject(); +item.put("sku", "1g234"); +item.put("variant_id", "12r34"); +item.put("price", 50000); +item.put("offer_price", 50000); +item.put("quantity", 1); +item.put("name", "Product Name"); +// ... other line item details +lineItems.put(item); +orderRequest.put("line_items", lineItems); + +Order order = razorpay.orders.create(orderRequest); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, # Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + # ... other line item details + } + ] +} + +client.order.create(data) +```go: Go +import ( + razorpay "github.com/razorpay/razorpay-go" +) + +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": []interface{}{ + map[string]interface{}{ + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name", + // ... other line item details + }, + }, +} + +body, err := client.Order.Create(para_attr, nil) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array( + 'amount' => 50000, + 'currency' => 'INR', + 'receipt' => 'receipt#1', + 'line_items_total' => 50000, // Mandatory for Magic Checkout + 'line_items' => array( + 0 => array( + 'sku' => '1g234', + 'variant_id' => '12r34', + 'price' => 50000, + 'offer_price' => 50000, + 'quantity' => 1, + 'name' => 'Product Name', + // ... other line item details + ), + ), +)); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, # Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + # ... other line item details + } + ] +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ + key_id: 'YOUR_KEY_ID', + key_secret: 'YOUR_SECRET' +}) + +var data = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + // ... other line item details + } + ] +} + +instance.orders.create(data); +```csharp: .Net +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +orderRequest.Add("line_items_total", 50000); // Mandatory for Magic Checkout + +List lineItem = new List(); +Dictionary lineItems = new Dictionary(); +lineItems.Add("sku", "1g234"); +lineItems.Add("variant_id", "12r34"); +lineItems.Add("price", 50000); +lineItems.Add("offer_price", 50000); +lineItems.Add("quantity", 1); +lineItems.Add("name", "Product Name"); +// ... other line item details +lineItem.Add(lineItems); +orderRequest.Add("line_items", lineItem); + +Order order = client.Order.Create(orderRequest); +``` +```json: Response +{ + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071, + "line_items_total": 50000 +} +``` + + + Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Default is `INR`. Length must be of 3 characters. + +`receipt` _mandatory_ +: `string` Your receipt id for this order should be passed here. Maximum length of 40 characters. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`line_items_total` _mandatory_ +: `integer` Total of `offer_price` for all line items added to the cart, in paise. For example, if a shoe worth ₹8,000 and a shirt worth ₹10,000 are added, the `line_item_total` will be `1800000`. This amount is post-tax. + + +> **WARN** +> +> +> **Watch Out!** +> +> To ensure the order is considered as a Magic Checkout order, you must pass this parameter. Otherwise, it will default to Standard Checkout order and customers will view the Standard Checkout UI instead of Magic Checkout. Know more about [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). +> + +`line_items` _mandatory_ +: `array` This will have the details about the specific items added to the cart. + + `sku` _mandatory_ + : `string` Unique product id defined by you. It can be alphanumeric. + + `variant_id` _mandatory_ + : `string` Unique variant id defined by you. It can be alphanumeric. + + `price` _mandatory_ + : `integer` Price of the product in paise. + + `offer_price` _mandatory_ + : `integer` Final price charged to the customer in paise, after applying any adjustments, such as product discounts. + + +> **INFO** +> +> +> **Handy Tips** +> +> If no discount is applied, `price` and `offer_price` will be the same. +> + + `quantity` _mandatory_ + : `integer` Number of units added in the cart. + + `name` _mandatory_ + : `string` Name of the product. + + `description` _mandatory_ + : `string` Description of the product. + + `weight` _optional_ + : `integer` Weight of the product in grams. + + `dimensions` _optional_ + : `object` The dimensions of the product. + + `length` _optional_ + : `string` The length of the product in centimeters. + + `width` _optional_ + : `string` The width of the product in centimeters. + + `height` _optional_ + : `string` The height of the product in centimeters. + + `image_url` _mandatory_ + : `string` The URL of the product image. This parameter is mandatory if you want to display product images on our iframe. + + `product_url` _optional_ + : `string` URL of the product's listing page. + + `notes` _optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is 299, then pass `29900` in this field. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + +`line_items_total` +: `integer` Total of `offer_price` for all line items added to the cart, in paise. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + +### Pre-discount Handling + + Line items total should equal the sum of individual item prices after your discounts are applied. When applying discounts, reduce both `amount` and `line_items_total` by the same amount: + ```json: Example + { + "amount": 45000, // ₹500 - ₹50 discount = ₹450 + "line_items_total": 45000, // Must match the discounted amount + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "prediscount_applied": "5000" // Track discount in paise + }, + "line_items": [ + // ... your line items with original prices + ] + } + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> Magic Checkout automatically handles all discount calculations on the UI. The system detects differences in checkout amounts and adjusts accordingly. +> + + + + + + +### 1.7 Interact with Shipping Info API + + This API should return shipping serviceability, COD serviceability, shipping fees and COD fees for a given list of customer addresses. + + /your-server-url/shipping-info-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // This is the receipt field set in the Razorpay order + "razorpay_order_id": "EKwxwAgItmmXdp", // This is the RZP order created without the `order_` prefix + "email": "", // Email field will be set if the customer enters an email + "contact": "+919900000000", // Customer phone number with country code + "addresses": [ + { + "id": "0", + "zipcode": "560060", + "state_code": "KA", + "country": "IN" + } + ] + } + + ```json: Response + { + "addresses": [ + { + "id": "0", + "zipcode": "560000", + "state_code": "KA", + "country": "IN", + "shipping_methods": [ + { + "id": "1", + "description": "Free shipping", + "name": "Delivery within 5 days", + "serviceable": true, + "shipping_fee": 1000, // in paise. Here 1000 = 1000 paise, which equals to ₹10 + "cod": true, + "cod_fee": 1000 // in paise. Here 1000 = 1000 paise, which equals to ₹10 + }, + { + "id": "2", + "description": "Standard Delivery", + "name": "Delivered on the same day", + "serviceable": true, + "shipping_fee": 1000, // in paise. Here 1000 = 1000 paise, which equals to ₹10 + "cod": false, + "cod_fee": 0 // in paise. Here 1000 = 1000 paise, which equals to ₹10 + } + ] + } + ] + } + ``` + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#16-create-an-order). + +`razorpay_order_id` _mandatory_ +: `string` Unique identifier for the order returned by Checkout. + +`email` _optional_ +: `string` Customer's email address. + +`contact` _mandatory_ +: `string` Customer's phone number. + +`addresses` _mandatory_ +: `array` Customer's address details. + + `id` _mandatory_ + : `string` Unique identifier of the customer's address. + + `zipcode` _mandatory_ + : `string` Customer's ZIP code. + + `state_code` _optional_ + : `string` The code of the state where the customer resides. + + `country` _mandatory_ + : `string` Country where the customer resides. The length cannot exceed 2 characters. + + + +### Response Parameters + +`addresses` _mandatory_ +: `array` Customer's address details. + + `id` _mandatory_ + : `string` Unique identifier of the customer's address. + + `zipcode` _mandatory_ + : `string` Customer's ZIP code. + + `country` _mandatory_ + : `string` Country where the customer resides. The length cannot exceed 2 characters. + + `shipping_methods` _mandatory_ + : `array` Details regarding the shipping methods. + + `id` _mandatory_ + : `string` Unique identifier of the shipping method. + + `description` + : `integer` Brief description of the shipping method. + + `name` _mandatory_ + : `string` Name of the shipping method. + + `serviceable` _mandatory_ + : `boolean` Indicates whether you deliver orders to the zipcode entered by the customer. This is based on the ZIP codes you have added in the serviceability setting on the Razorpay Dashboard. Possible values: + - `true`: Orders can be delivered to the added ZIP codes. + - `false`: Orders cannot be delivered to the added ZIP codes. + + `shipping_fee` _mandatory_ + : `integer` Shipping charge in paise applicable to be paid by the customer. + + `cod` _mandatory_ + : `boolean` Indicates whether you support cash on delivery on this order. + - `true`: COD payment method is supported. + - `false`: COD payment method is not supported. + + `cod_fee` _mandatory_ : `integer` Cash on Delivery fee charged in paise. This amount is based on the COD settings configured in your Razorpay Dashboard. + + +> **INFO** +> +> +> **Handy Tips** +> +> If the `cod` field is false, set the `cod_fee` field to 0. +> + + + + + + + +### 1.8 Interact with Get Promotions API + + This API should return the list of promotions applicable for the given `order_id` and customer. + + /your-server-url/create-promotions-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // this is the receipt field set in Razorpay order + "contact": "+919000090000", + "email": "" + }' + ```json: Response + { + "promotions": [ + { + "code": "10%OFF", + "summary": "10% off on total cart value", + "description": "10% on total cart value upto ₹300", + ] + }, + { + "code": "500OFF", + "summary": "₹500 off on total cart value", + "description": "₹500 off on a minimum cart value of ₹1500", + ] + } + ] + } + ``` + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#16-create-an-order). + +`contact` _optional_ +: `string` Customer's phone number. + +`email` _optional_ +: `string` Customer's email address. + + + +### Response Parameters + +`promotions` _mandatory_ +: `array` Details of the promotions created. + + `code` _mandatory_ + : `string` Unique identifier of the promotion. + + `summary` _mandatory_ + : `string` Summary about the promotion. For example, 10% off on total cart value. + + `description` _optional_ + : `string` Brief description of the promotion. For example, 10% on total cart value upto ₹300. + + + +### 1.8.1 Interact with Apply Promotions API + + This API should validate the promotion code applied by the customer and return the discount amount. + + /your-server-url/create-promotions-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // this is the receipt field set in Razorpay order + "contact": "+919000090000", + "email": "", + "code": "500OFF" + }' + + ```json: Success Response + { + "promotion": { + "reference_id": "3rvff", + "type": "offer", + "code": "500OFF", + "value": 50000, + "value_type": "fixed_amount", + "description": "New Year Sale Offer" + } + } + ```json: Failure Response + { + "failure_code": "LOGIN_REQUIRED", + "failure_reason": "promotion Code has expired" + } + ``` + + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#16-create-an-order). + +`contact` _optional_ +: `string` Customer's phone number. + +`email` _optional_ +: `string` Customer's email address. + +`code` _mandatory_ +: `string` Promotion code used to avail discount on checkout. + + + +### Response Parameters + +`promotion` _mandatory_ +: `object` Used to pass all offer or discount-related information, including promotion code discount, method discount and so on. + + `reference_id` _mandatory_ + : `string` Identifier of the offer you create. + + `code` _optional_ + : `string` Promotion code used to avail discount on checkout. + + `type` _optional_ + : `string` Type of offer. Possible values: + - `coupon`: A discount applied by customers during checkout. For example, customers can use a coupon like `Diwali Sale 500 Off` to get ₹500 off the total cart value. + - `offer`: A promotion you create for your customers. For example, you create an offer `Buy 4 t-shirts and get 2 free`. In this case, when customers add 4 t-shirts to their cart, the 2 additional t-shirts will be automatically added for free. + + `value` _optional_ + : `integer` The offer value that needs to be applied in paise. For example, if you want to offer a discount of ₹500, enter 50000. + + `value_type` _optional_ + : `string` The type of value like: + - `fixed_amount`: A fixed amount discount value in the currency of the order. For example, ₹500. + - `percentage`: A percentage discount value. For example, 10%. + - `BXGY`: Buy X and Get Y. For example, if you buy 2 t-shirts, you a get a cap for free or at a discounted value. + + +> **INFO** +> +> +> **Handy Tips** +> +> Regardless of the `value_type`, the amount specified in the `value` parameter is applied as-is. For example, if `value_type` is percentage and the `value` is 5000, 5000 is considered in currency subunits (paise). +> + + + `description` _optional_ + : `string` Description of the promotion applied. For example, `New Year Sale Offer`. + + + +### Error Code, Description and Next Steps + + + Code | Description | Next Steps + --- + INVALID_PROMOTION | The specified promotion code is not recognised or does not exist in the system. | Please verify the code and try again. + --- + LOGIN_REQUIRED | This coupon is specifically assigned to a registered customer. | To redeem it, the customer must log in to their account and authenticate their identity. + --- + REQUIREMENT_NOT_MET | The current cart conditions do not meet the requirements for this promotion to be valid. For example, the promotion may require a minimum cart value of ₹1,000, but the cart total is ₹800. | Review the promotion's terms and adjust the cart contents accordingly. + + + + + + + + + + + +### 1.9 Add Checkout Options + + Pass the Checkout options. Ensure that you pass the `order_id` that you received in the response of the previous step. + + ```yml: Checkout Options + var options = { + 'key': '', + 'amount': 50000, + 'currency': '', + 'name': '', + 'order_id': 'order_EMBFqjDHEEn80l', // Generate order_id using Orders API + 'description': 'Fine T-Shirt', + 'timeout': 60, // in seconds + 'prefill': { + 'contact': '', + 'email': '' + }, + 'one_click_checkout': true, // magic checkout + 'show_coupons': true // magic checkout + }; + ``` + + + Checkout Options + + You must pass these parameters in Checkout to initiate the payment. + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + + + + +### 1.9.1 Enable UPI Intent on iOS *(Optional)* + + Provide your customers with a better payment experience by enabling UPI Intent on your app's Checkout form. In the UPI Intent flow: +1. Customer selects UPI as the payment method in your iOS app. A list of UPI apps supporting the intent flow is displayed. For example, PhonePe, Google Pay and Paytm. +2. Customer selects the preferred app. The UPI app opens with pre-populated payment details. +3. Customer enters their UPI PIN to complete their transactions. +4. Once the payment is successful, the customer is redirected to your app or website. + +To enable this in your iOS integration, you must make the following changes in your app's info.plist file. + +```xml: info.plist +LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + +``` + +Know more about [UPI Intent and its benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). + +### UPI Intent on Recurring Payments + +Configure and initiate a recurring payment transaction on UPI Intent: + +```swift: ViewController.swift +let options: [String:Any] = [ + "key": "YOUR_KEY_ID", + "order_id": "order_DBJOWzybfXXXX", + "customer_id": "cust_BtQNqzmBlXXXX", + "prefill": [ + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + ], + "image": "https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + "amount": 10000, // Amount should match the order amount + "currency": "INR", + "recurring": 1 // This key value pair is mandatory for Intent Recurring Payment. +] +```objectivec: ViewController.m +NSDictionary *options = @{ + @"key": @"YOUR_KEY_ID", + @"order_id": @"order_DBJOWzybfXXXX", + @"customer_id": @"cust_BtQNqzmBlXXXX", + @"prefill": @{ + @"contact": @"+919000090000", + @"email": @"gaurav.kumar@example.com" + }, + @"image": @"https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + @"amount": @(10000), // Amount should match the order amount + @"currency": @"INR", + @"recurring": @(1) // This key value pair is mandatory for Intent Recurring Payment. +}; +``` + + + + + + + + + +### 1.10 Open Checkout + + Use the below code to open the Razorpay checkout. + + ```yml: Open Razorpay Checkout + _razorpay.open(options); + ``` + + + +### 1.11 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.12 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + +### M1 MacBook Changes + + If you use M1 MacBook, you need to make the following changes in your podfile. + + +> **INFO** +> +> +> **Handy Tips** +> +> Add the following code inside `post_install do |installer|`. +> + + ```js: podfile + installer.pods_project.build_configurations.each do |config| + config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" + end + ``` + + + + + + +### 1.13 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +### 1.14 Perform Post Payment Processing + + Based on the response, you can handle post-payment processing on your end. + +> **WARN** +> +> +> **Timeout Handling** +> +> If no API call is made within 45 seconds, our background job will assume there is a network drop off and will proceed to place the order on Shopify automatically. +> + + + Fetch an Order + + Use the Fetch Orders API to retrieve order details, including customer information, address, shipping method and promotions of a particular order: + + v1/orders/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ + -X GET https://api.razorpay.com/v1/orders/order_R1yDkxyIuKXXXX \ + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + import com.razorpay.Order; + import com.razorpay.RazorpayClient; + import com.razorpay.RazorpayException; + try { + Order order = razorpay.Orders.fetch(""); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + # do easy_install razorpay or + # pip install razorpay + + import razorpay + razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]")) + + order_id = + resp = client.order.fetch(order_id) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->fetch($orderId); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('key_id', 'key_secret') + + order = Razorpay::Order.fetch('order_R1yDkxyIuKXXXX') + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.fetch(orderId) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("", "") + + body, err := client.Order.Fetch("", nil, nil) + ``` + ```json: Response: COD Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 507000, + "amount_paid": 0, + "amount_due": 507000, + "currency": "INR", + "receipt": "#30567", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "placed", + "attempts": 0, + "notes": { + "cart_id": "hWN2Am4BGnQrizKE3hzeQaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/hf5Q?key=14bbbce35b8", + "shopify_order_id": "6302119854247" + }, + "created_at": 1756045901, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 5000, + "shipping_fee": 7000, + "customer_details": { + "contact": "+919100000000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + }, + "billing_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + } + }, + "line_items_total": 600000, + "tax_details": { + "total_tax": 4128, + "taxes_included": true + } + } + ```json: Response: Prepaid Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 100700, + "amount_paid": 100700, + "amount_due": 0, + "currency": "INR", + "receipt": "#30414", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "paid", + "attempts": 1, + "notes": { + "cart_id": "hWN1TcwL?key=1a3a5a7c", + "storefront_id": "gid://shopify/Cart/hIkey=af7c7800", + "flits_cart_token": "hWcwL?key=1a3741dc_8740f5_175447", + "shopify_order_id": "6266036191399" + }, + "created_at": 1754466155, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 0, + "shipping_fee": 700, + "customer_details": { + "billing_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "billing_address", + "zipcode": "110057" + }, + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "shipping_address", + "zipcode": "110057" + } + }, + "line_items_total": 110000, + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + Know more about the [Orders API.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) + + +> **INFO** +> +> +> **Order Status** +> +> Check the order status for the following: +> +> - Prepaid orders: `paid`. +> - COD orders: `placed`. +> + + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the order to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the order. For example, `order_R1yDkxyIuKXXXX`. + +`entity` +: `string` Type of entity. Value is `order`. + +`amount` +: `integer` Total order amount in the smallest currency unit (paise). + +`amount_paid` +: `integer` Amount paid towards the order in paise. For prepaid orders, this shows the actual amount paid. For COD orders, this is `0` until payment is collected. + +`amount_due` +: `integer` Outstanding amount due in paise. For prepaid orders, this shows any remaining balance. For COD orders, this equals the `amount` field until payment is collected. + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`receipt` +: `string` Receipt identifier for internal reference. For example, `#30567`. + +`offers` +: `array` Array of offer IDs applied to the order. + +`status` +: `string` Current status of the order. Possible values: + - `placed`: Order placed but payment pending (COD orders). + - `paid`: Order placed and payment completed (prepaid orders). + - `cancelled`: Order cancelled. + - `refunded`: Order refunded. + +`attempts` +: `integer` Number of payment attempts made for this order. For example, `1`. + +`notes` +: `object` Custom notes added to the order containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `shopify_order_id` + : `string` Shopify order reference. + + `flits_cart_token` + : `string` Flits integration token (optional). + +`created_at` +: `integer` Unix timestamp indicating when the order was created. For example, `1756045901`. + +`description` +: `string|null` Order description. Returns `null` if no description is provided. + +`checkout` +: `string|null` Checkout identifier. Returns `null` if not applicable. + +`promotions` +: `array` Array of promotion objects applied to the order. + + `code` + : `string` Promotion code used. For example, `orderOff`. + + `type` + : `string` Type of promotion. For example, `cart_value`. + + `value` + : `integer` Discount value in paise. For example, `10000` for ₹100. + + `description` + : `string` Human-readable promotion description. + + `reference_id` + : `string` Internal reference for the promotion. + +`cod_fee` +: `integer` Cash on Delivery charges in paise. For COD orders, this contains the fee amount (for example, `5000` for ₹50). For prepaid orders, this is `0`. + +`shipping_fee` +: `integer` Shipping charges in paise. For example, `700` for ₹7. + +`customer_details` +: `object` Customer information. + + `contact` + : `string` Customer's phone number. + + `email` + : `string` Customer's email address. + + `shipping_address` + : `object` Complete shipping address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for delivery. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Recipient name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `shipping_address`. + + `zipcode` + : `string` Postal code. + + `billing_address` + : `object` Complete billing address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for billing. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Account holder name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `billing_address`. + + `zipcode` + : `string` Postal code. + +`line_items_total` +: `integer` Total value of line items in paise before adding shipping fees and COD fees, after applying promotions. For example, `60000` for ₹600. + +`tax_details` +: `object` Tax information. + + `total_tax` + : `integer` Total tax amount in paise. For example, `4128`. + + `taxes_included` + : `boolean` Indicates whether taxes are included in the item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### Fetch a Payment + + Use the Fetch Payments API to retrieve comprehensive payment details, including transaction status, payment method, customer information, settlement details, and the associated order information for a specific payment: + + v1/payments/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X GET https://api.razorpay.com/v1/payments/pay_R1yFlWQar3XXXX + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String paymentId = "pay_R1yFlWQar3XXXX"; + + Payment payment = razorpay.payments.fetch(paymentId); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.payment.fetch(paymentId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + paymentId := "pay_R1yFlWQar3XXXX" + + body, err := client.Payment.Fetch(paymentId, nil, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->payment->fetch($paymentId); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + paymentId = "pay_R1yFlWQar3XXXX" + + Razorpay::Payment.fetch(paymentId) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.payments.fetch(paymentId) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + Payment payment = client.Payment.Fetch(paymentId); + ``` + + ```json: Response: COD Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 55700, + "currency": "INR", + "status": "pending", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "cod", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919100000000", + "notes": { + "cart_id": "hWN2QaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/h?key=14bbf59ce35b8" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1756046099, + "receiver_type": null + } + ```json: Response: Prepaid Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 90630, + "currency": "INR", + "status": "captured", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "cart_id": "hWNsVrcwL?key=1a3a457ddc", + "storefront_id": "gid://shopify/Cart/hWv3e8?key=af707", + "flits_cart_token": "hWrcwL?key=1a3a5a70f5_17547", + "optimizer_provider_name": "razorpay" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "727947422583", + "upi_transaction_id": "1F723677C679EF578A95" + }, + "created_at": 1754466271, + "receiver_type": null, + "upi": { + "vpa": "gaurav.kumar@exampleupi" + } + } + ``` + + Know more about the [Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md). + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. For example, `pay_R1yFlWQar3XXXX`. + +`entity` +: `string` Type of entity. Value is `payment`. + +`amount` +: `integer` Payment amount in the smallest currency unit (paise). For COD payments, this includes the COD fee (for example, `55700` for ₹557). For prepaid payments, this equals the captured amount (for example, `90630` for ₹906.30). + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`status` +: `string` Current status of the payment. Possible values: + - `pending`: Payment pending collection (COD orders). + - `captured`: Payment successfully captured (prepaid orders). + - `authorized`: Payment authorized but not captured. + - `failed`: Payment attempt failed. + +`order_id` +: `string` Unique identifier of the associated order. For example, `order_R1yDkxyIuKXXXX`. + +`invoice_id` +: `string|null` Unique identifier of the associated invoice. Returns `null` if no invoice is linked. + +`international` +: `boolean` Indicates whether this is an international payment. Possible values: + - `true`: International payment. + - `false`: Domestic payment. + +`method` +: `string` Payment method used. Possible values include: + - `cod` + - `upi` + - `card` + - `netbanking` + - `wallet` + +`amount_refunded` +: `integer` Amount refunded in paise. For example, `0` indicates no refund has been processed. + +`refund_status` +: `string|null` Current refund status. Returns `null` if no refund is applicable. Possible values: + - `partial`: Partial refund processed. + - `full`: Full refund processed. + +`captured` +: `boolean` Indicates whether the payment has been captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string|null` Payment description. Returns `null` if no description is provided. + +`card_id` +: `string|null` Unique identifier of the card used for payment. Returns `null` for non-card payments. + +`bank` +: `string|null` Bank identifier for netbanking payments. Returns `null` for other payment methods. + +`wallet` +: `string|null` Wallet provider identifier. Returns `null` for non-wallet payments. + +`vpa` +: `string|null` Virtual Payment Address for UPI payments. For example, `gaurav.kumar@exampleupi`. Returns `null` for non-UPI payments. + +`email` +: `string` Customer's email address. + +`contact` +: `string` Customer's phone number. + +`notes` +: `object` Custom notes added to the payment containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `flits_cart_token` + : `string` Flits integration token (optional). + + `optimizer_provider_name` + : `string` Payment optimizer provider name (optional). + +`fee` +: `integer|null` Processing fee charged in paise. For example, `0` indicates no fee. Returns `null` for COD payments. + +`tax` +: `integer|null` Tax amount on processing fee in paise. For example, `0` indicates no tax. Returns `null` for COD payments. + +`error_code` +: `string|null` Error code if payment failed. Returns `null` for successful payments. + +`error_description` +: `string|null` Human-readable error description. Returns `null` for successful payments. + +`error_source` +: `string|null` Source of the error. Returns `null` for successful payments. + +`error_step` +: `string|null` Step at which error occurred. Returns `null` for successful payments. + +`error_reason` +: `string|null` Reason for the error. Returns `null` for successful payments. + +`acquirer_data` +: `object` Data from the payment acquirer. + + `rrn` + : `string` Retrieval Reference Number from the acquirer (optional). + + `upi_transaction_id` + : `string` UPI transaction identifier from the acquirer (optional). + +`created_at` +: `integer` Unix timestamp indicating when the payment was created. For example, `1756046099`. + +`receiver_type` +: `string|null` Type of receiver for the payment. Returns `null` if not applicable. + +`upi` +: `object` UPI-specific payment details (only present for UPI payments). + + `vpa` + : `string` Virtual Payment Address used for the UPI payment. + + + + + + + + + + +## 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +You can make test payments using one of the payment methods configured at the Checkout. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + + +### Supported Payment Methods + + Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + + + Payment Method | Code | Availability + --- + [Cash on Delivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md) | `cod` | Requires [Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md#prerequisites). + --- + [Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ + --- + [Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ + --- + [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ + --- + [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ + --- + EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ + --- + [Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ + --- + [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). + --- + [Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. + --- + [Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + + + ### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + ### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the following lists: + - [Supported UPI Flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + - [UPI Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/upi.md). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + ### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + #### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + - [Test Error Scenarios](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards). + + #### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + ### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## 3. Go-live Checklist + +Check the go-live checklist for Razorpay Magic Checkout integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + +## Related Information + +[Flutter Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/standard.md) diff --git a/llm-content/payments/magic-checkout/glossary.md b/llm-content/payments/magic-checkout/glossary.md new file mode 100644 index 00000000..d98a1e5f --- /dev/null +++ b/llm-content/payments/magic-checkout/glossary.md @@ -0,0 +1,35 @@ +--- +title: Magic Checkout | Glossary +heading: Glossary +description: List of commonly used terms related to Razorpay Magic Checkout. +--- + +# Glossary + +The following table lists all the commonly used terms and their definitions used in Magic Checkout: + +Terms | Description +--- +Magic Checkout | A seamless and secure payment experience that enables prepaid and COD transactions on your platform. It reduces cash on delivery (COD) RTOs by analysing customer shopping history and address quality. +--- +RTO | Return to Origin refers to returning an order to its place of origin for reasons such as non-delivery or customer rejection. +--- +COD Intelligence | A feature that analyses COD orders to reduce fraud and improve the efficiency of COD transactions. +--- +Logistics Partners | Organisations that provide shipping and delivery services for e-commerce businesses to streamline the order fulfilment process. +--- +Coupon Code | A code that customers can use during checkout to apply a discount or special offer to their purchase. +--- +Blocklist | A list of users prohibited from availing COD as they return products on delivery, resulting in damaged products during transit, high returns, and refund issues. +--- +Allowlist | A list of users explicitly permitted to avail COD, often loyal to your brand and contributing to increasing revenue. +--- +Prepaid | This refers to a payment method where the customer pays for goods or services before receiving them, as opposed to COD, where payment is made upon delivery. +--- +Convert COD to Prepaid | The process of changing a COD order to a prepaid order is often done to reduce the risk associated with COD transactions. +--- +Risky Users | The users flagged as potentially fraudulent or high-risk based on factors such as past behaviour or transaction patterns. +--- +Billing Address | The address associated with a payment method used for verification and billing purposes during checkout. +--- +Inactive Coupon | A coupon code that is no longer valid or usable, often because it has reached its usage limit or has been manually deactivated. diff --git a/llm-content/payments/magic-checkout/how-it-works.md b/llm-content/payments/magic-checkout/how-it-works.md new file mode 100644 index 00000000..d4292d1d --- /dev/null +++ b/llm-content/payments/magic-checkout/how-it-works.md @@ -0,0 +1,152 @@ +--- +title: Razorpay Magic Checkout Flow +heading: How Magic Checkout Works +description: Understand how Magic Checkout works on mobile and desktop for logged-in, logged-out and new customers with QuickBuy and One Page features. +--- + +# How Magic Checkout Works + +Given below is a complete end-to-end flow about how customers can use Magic Checkout. + +## Mobile + +Magic Checkout on mobile offers different experiences based on customer login status and purchase history: + + +### Logged In + + Customers who already are logged in have 2 ways to proceed with checkout: + + + QuickBuy is a one-click payment solution that streamlines checkout for returning customers. With a compact half-page interface, it intelligently displays preferred payment methods based on past transactions and automatically applies the best available offers, reducing friction and decision-making. + + This results in a faster, more efficient checkout experience that boosts conversion rates and enhances satisfaction for both customers and businesses. Know more about [Quickbuy](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features/quickbuy.md). + + QuickBuy is ideal for returning customers who are logged into Razorpay Checkout and making repeat purchases. + + ![QuickBuy on Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/quickbuy-magic.jpg.md) + + The workflow includes: + + 1. **Automatic coupon application**: The best available coupon is applied to the total. If they change the coupon, the system recalculates and updates the total amount. + 2. **Default address selection**: The most recently used address is automatically selected. + Pre-selected shipping method: The default shipping method is free if available; otherwise, the lowest-cost option is chosen, with the option to change it if required. + 3. **Preferred payment method**: The most frequently used payment method is pre-selected. If the user changes their payment method, the system recalculates and applies the best available offer to the new method, notifying them of the updated total. + 4. **Single-click purchase**: Customers complete their purchases in a single click. + + + Magic Checkout now features a **One Page Checkout** that consolidates all essential checkout elements onto one clean, intuitive page. Eligible customers can complete their entire purchase without navigating through multiple pages. The unified view brings together order summary, coupon application, address selection and payment options for a streamlined checkout process. + + The system automatically determines which checkout experience to show each customer: + - **One Page Checkout**: Automatically displayed to logged-in customers with saved addresses and payment methods for faster completion. + - **Multi-Step Flow**: Used for new customers or those without sufficient saved information, guiding them through the traditional step-by-step process. + + ### Customer Experience + + Customers select the products on your website or app and proceed to Checkout. + + ![Magic Checkout Flow on Mobile: Logged in customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-flow-mobile-logged-in.gif.md) + + On the Checkout page, logged-in customers: + + 1. Verify the order in the **Order Summary** tab. + 2. Click **Coupons** to view available offers. + 3. Enter the coupon code or select a preferred coupon and click **Apply**. + 4. Verify the pre-filled address or click **Add/Change** to view all saved addresses, select any existing address or add a new one. + 5. Choose a delivery option if applicable. + 6. Choose a preferred payment method, enter the required details and complete the purchase. + + + + + +### Logged Out + + Customers select the products on your website or app and proceed to Checkout. + + ![Magic Checkout Flow on Mobile: Logged out customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-flow-logged-out.gif.md) + + On the Checkout page, logged-out customers: + + 1. Enter their mobile number and click **Continue**. + 2. Enter the OTP to prefill their saved address and click **Continue**. + 3. Verify the order in the **Order Summary** tab. + 4. Click **Coupons** to view available offers. + 5. Enter the coupon code or select a preferred coupon and click **Apply**. + 6. Verify the pre-filled address or click **Add/Change** to view all saved addresses, select any existing address or add a new one. + 7. Choose a delivery option if applicable. + 8. Choose a preferred payment method, enter the required details and complete the purchase. + + + +### New customers + + Customers select the products on your website or app and proceed to Checkout. + + ![Magic Checkout Flow on Mobile: New customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-flow-mobile-new-user.gif.md) + + On the Checkout page, new customers: + 1. Enter their mobile number. + 2. Verify the order in the **Order Summary** tab. + 3. Click **Coupons and offers** to view available offers. + 4. Enter the coupon code or select a preferred coupon and click **Apply**. Click **Continue**. + 5. Enter the delivery address. + 6. Select the **Save my address as** check box to save the address and select the address type. + 7. Enter the OTP to securly save your address for future use and click **Continue**. + 8. In the **Payment Options** section, choose a preferred payment method. Enter the required details and complete the purchase. + + +## Desktop + +Magic Checkout on desktop provides a checkout interface optimised for larger screens with different flows based on customer login status: + + +### Logged In + + Customers select the products on your website or app and proceed to Checkout. + + ![Magic Checkout Flow on Desktop: Logged in customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-flow-desktop.gif.md) + + On the Checkout page, logged-in customers: + 1. Verify the order in the **Order Summary** tab on the left. + 2. Click **Coupons and offers** to view available offers. + 3. Enter the coupon code or select a preferred coupon and click **Apply**. + 4. Verify the pre-filled address or click **Add/Change** to view all saved addresses. Select any existing address or add a new one. + 5. Choose a delivery option if applicable and click **Continue**. + 6. In the **Payment Options** section, choose a preferred payment method. Enter the required details and complete the purchase. + + + +### Logged Out + + Customers select the products on your website or app and proceed to Checkout. + + ![Magic Checkout Flow on Desktop: Logged out customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-flow-desktop-logged-out.gif.md) + + On the Checkout page, logged-out customers: + 1. Enter their mobile number and click **Continue**. + 2. Enter the OTP to prefill their saved address and click **Continue**. + 3. Verify the order in the **Order Summary** tab on the left. + 4. Click **Coupons and offers** to view available offers. + 5. Enter the coupon code or select a preferred coupon and click **Apply**. + 6. Verify the pre-filled address. Select any existing address or add a new one. + 7. Choose a delivery option if applicable and click **Continue**. + 8. In the **Payment Options** section, choose a preferred payment method. Enter the required details and complete the purchase. + + + +### New customers + + Customers select the products on your website or app and proceed to Checkout. + + ![Magic Checkout Flow on Desktop: New customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-flow-desktop-new-user.gif.md) + + On the Checkout page, new customers: + 1. Enter their mobile number and click **Continue**. + 2. Verify the order in the **Order Summary** tab on the left. + 3. Click **Coupons and offers** to view available offers. + 4. Enter the coupon code or select a preferred coupon and click **Apply**. + 5. Enter the delivery address. + 6. Select the **Save my address as** check box to save the address and select the address type. + 7. Enter the OTP to securely save your address for future use and click **Continue**. + 8. In the **Payment Options** section, choose a preferred payment method. Enter the required details and complete the purchase. diff --git a/llm-content/payments/magic-checkout/ios-integration.md b/llm-content/payments/magic-checkout/ios-integration.md new file mode 100644 index 00000000..73c7a7ad --- /dev/null +++ b/llm-content/payments/magic-checkout/ios-integration.md @@ -0,0 +1,2411 @@ +--- +title: Integrate Razorpay Magic Checkout on iOS App +heading: Integrate Magic Checkout on iOS App +description: Steps to integrate Magic Checkout on your iOS app using the Razorpay iOS Standard SDK. +--- + +# Integrate Magic Checkout on iOS App + +Follow these steps to integrate the Razorpay Magic Checkout on your iOS application. + +#### Prerequisites + +- Create a Razorpay account. +- Generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **1. Build Integration**: Integrate with iOS App. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Enable/Disable Magic Checkout and Cash on Delivery + + + + Raise a request with your Razorpay SPOC to get this feature enabled on your account. + Once this feature is enabled, the customer address saving and coupon features are enabled. + + + Raise a request with our [Support team](https://razorpay.com/support/) to enable this feature for your account. + + + + + +### 1.2 Create Promotions and Shipping Info API Endpoints + + Follow the steps given below to create promotions and shipping info API endpoints: + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure that the URLs are publicly accessible, require no authentication and are hosted on your server. +> + + + 1. Log in to the Dashboard and navigate to **Magic Checkout**. + 2. In the **Platform Setup**, select **Custom E-Commerce Platform** from the drop-down list and click **Next**. + ![Choose custom platform](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-custom-platform.jpg.md) + 3. In the **Setup & Settings** section, click **Checkout Settings**. + 4. In the **Coupon Settings** section, enter the following: + 1. **URL for get promotions**: The API URL should return a list of promotions applicable to the specified order_id and customer. Magic Checkout uses this endpoint to fetch these promotions from your server and display them to your customers in the checkout modal. + 2. **URL for apply promotions**: The API URL validates the promotion code applied by the customer and should return the discount amount. Magic Checkout uses this endpoint to apply promotions via your server. + 5. Click **Save settings**. + ![Add promotion URLs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-web-promo-url.jpg.md) + 6. Navigate to **Shipping Setup**. + 7. Select **API** as the Shipping Service type from the drop-down list. + 8. Enter the **URL for shipping info**. The API URL should return shipping serviceability, COD serviceability, shipping fees and COD fees for a given list of customer addresses. Magic Checkout uses this endpoint to retrieve shipping information from your server. + 9. Click **Save Settings**. + ![Add shipping URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-web-shipping-url.jpg.md) + + + +### 1.3 Import Razorpay iOS Standard SDK Library + + You can import the Razorpay iOS Standard SDK library using any of these ways: + + + + Refer to our [Cocoapod](https://cocoapods.org/pods/razorpay-pod) (bitcode enabled) pod. + + + 1. Download the SDK and unzip it. + 2. Open your project in XCode and go to **file** under **Menu**. Select **Add files to "yourproject"**. + 3. Select **Razorpay.xcframework** in the directory you just unzipped. + 4. Select the **Copy items if needed** checkbox. + 5. Click **Add**. + 6. Navigate to **Target settings → General** and add the **Razorpay.xcframework** in both **Embedded Binaries** and **Linked Frameworks and Libraries**. + + + If you are building an **Objective-C** project, follow the steps given for Swift and the additional steps given below: + 1. Go to **Project Settings** and select **Build Settings - All and Combined**. + 2. Set the **Always Embed Swift Standard Libraries** option to **TRUE**. + + Ensure that you have the framework added in both **Embedded Binaries** and **Linked Frameworks and Libraries** under **Target settings - General**. + + + + + + Xcode 11 + + Ensure that you have the framework added in **Frameworks, Libraries, and Embed Content** under **Target settings - General**. Change `Embed status` from - `Do not Embed` to `Embed & Sign`. + + Watch the GIF to see how to add Frameworks, Libraries and Embed Content. + + ![add Frameworks, Libraries and Embed Content](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ios-embed-framework.gif.md) + + + + + + +### 1.4 Initialise Razorpay iOS Standard SDK + + To initialise Razorpay iOS Standard SDK, you need the following: + + - API keys. You can generate this from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + +> **WARN** +> +> +> **Watch Out!** +> +> API keys should not be hardcoded in the app. Must be sent from your backend as app-related metadata fetch. +> + + + - A delegate that implements `RazorpayPaymentCompletionProtocol` or `RazorpayPaymentCompletionProtocolWithData`. + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - For Swift version 5.1+, ensure that you declare `var razorpay: RazorpayCheckout!`. +> - For versions lower than 5.1, use `var razorpay: Razorpay!`. +> - Alternatively, you can use the following alias and retain the variable as Razorpay. + +> +> `typealias Razorpay = RazorpayCheckout` +> + + ```swift: ViewController.swift + + import Razorpay + + class ViewController: UIViewController, RazorpayPaymentCompletionProtocol { + + // typealias Razorpay = RazorpayCheckout + + var razorpay: RazorpayCheckout! + override func viewDidLoad() { + super.viewDidLoad() + razorpay = RazorpayCheckout.initWithKey(razorpayTestKey, andDelegate: self) + } + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + self.showPaymentForm() + } + } + ```objectivec: ViewController.m + #import + //- typedef RazorpayCheckout Razorpay; + + @interface ViewController () { + RazorpayCheckout *razorpay; + . + . + - (void)viewDidLoad { + [super viewDidLoad]; + . + . + razorpay = [RazorpayCheckout initWithKey:@"YOUR_PUBLIC_KEY" andDelegate:self]; + } + } + ``` + + + +### 1.5 Create an Order in Server + + You can create an order using the following API and send the additional information required for Magic Checkout. Pass the `order_id` received in response to the checkout code. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + // ... other line item details + } + ] +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 50000); +orderRequest.put("currency", "INR"); +orderRequest.put("receipt", "receipt#1"); +orderRequest.put("line_items_total", 50000); // Mandatory for Magic Checkout + +JSONArray lineItems = new JSONArray(); +JSONObject item = new JSONObject(); +item.put("sku", "1g234"); +item.put("variant_id", "12r34"); +item.put("price", 50000); +item.put("offer_price", 50000); +item.put("quantity", 1); +item.put("name", "Product Name"); +// ... other line item details +lineItems.put(item); +orderRequest.put("line_items", lineItems); + +Order order = razorpay.orders.create(orderRequest); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, # Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + # ... other line item details + } + ] +} + +client.order.create(data) +```go: Go +import ( + razorpay "github.com/razorpay/razorpay-go" +) + +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": []interface{}{ + map[string]interface{}{ + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name", + // ... other line item details + }, + }, +} + +body, err := client.Order.Create(para_attr, nil) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array( + 'amount' => 50000, + 'currency' => 'INR', + 'receipt' => 'receipt#1', + 'line_items_total' => 50000, // Mandatory for Magic Checkout + 'line_items' => array( + 0 => array( + 'sku' => '1g234', + 'variant_id' => '12r34', + 'price' => 50000, + 'offer_price' => 50000, + 'quantity' => 1, + 'name' => 'Product Name', + // ... other line item details + ), + ), +)); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, # Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + # ... other line item details + } + ] +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ + key_id: 'YOUR_KEY_ID', + key_secret: 'YOUR_SECRET' +}) + +var data = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + // ... other line item details + } + ] +} + +instance.orders.create(data); +```csharp: .Net +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +orderRequest.Add("line_items_total", 50000); // Mandatory for Magic Checkout + +List lineItem = new List(); +Dictionary lineItems = new Dictionary(); +lineItems.Add("sku", "1g234"); +lineItems.Add("variant_id", "12r34"); +lineItems.Add("price", 50000); +lineItems.Add("offer_price", 50000); +lineItems.Add("quantity", 1); +lineItems.Add("name", "Product Name"); +// ... other line item details +lineItem.Add(lineItems); +orderRequest.Add("line_items", lineItem); + +Order order = client.Order.Create(orderRequest); +``` +```json: Response +{ + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071, + "line_items_total": 50000 +} +``` + + + Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Default is `INR`. Length must be of 3 characters. + +`receipt` _mandatory_ +: `string` Your receipt id for this order should be passed here. Maximum length of 40 characters. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`line_items_total` _mandatory_ +: `integer` Total of `offer_price` for all line items added to the cart, in paise. For example, if a shoe worth ₹8,000 and a shirt worth ₹10,000 are added, the `line_item_total` will be `1800000`. This amount is post-tax. + + +> **WARN** +> +> +> **Watch Out!** +> +> To ensure the order is considered as a Magic Checkout order, you must pass this parameter. Otherwise, it will default to Standard Checkout order and customers will view the Standard Checkout UI instead of Magic Checkout. Know more about [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). +> + +`line_items` _mandatory_ +: `array` This will have the details about the specific items added to the cart. + + `sku` _mandatory_ + : `string` Unique product id defined by you. It can be alphanumeric. + + `variant_id` _mandatory_ + : `string` Unique variant id defined by you. It can be alphanumeric. + + `price` _mandatory_ + : `integer` Price of the product in paise. + + `offer_price` _mandatory_ + : `integer` Final price charged to the customer in paise, after applying any adjustments, such as product discounts. + + +> **INFO** +> +> +> **Handy Tips** +> +> If no discount is applied, `price` and `offer_price` will be the same. +> + + `quantity` _mandatory_ + : `integer` Number of units added in the cart. + + `name` _mandatory_ + : `string` Name of the product. + + `description` _mandatory_ + : `string` Description of the product. + + `weight` _optional_ + : `integer` Weight of the product in grams. + + `dimensions` _optional_ + : `object` The dimensions of the product. + + `length` _optional_ + : `string` The length of the product in centimeters. + + `width` _optional_ + : `string` The width of the product in centimeters. + + `height` _optional_ + : `string` The height of the product in centimeters. + + `image_url` _mandatory_ + : `string` The URL of the product image. This parameter is mandatory if you want to display product images on our iframe. + + `product_url` _optional_ + : `string` URL of the product's listing page. + + `notes` _optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is 299, then pass `29900` in this field. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + +`line_items_total` +: `integer` Total of `offer_price` for all line items added to the cart, in paise. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + +### Pre-discount Handling + + Line items total should equal the sum of individual item prices after your discounts are applied. When applying discounts, reduce both `amount` and `line_items_total` by the same amount: + ```json: Example + { + "amount": 45000, // ₹500 - ₹50 discount = ₹450 + "line_items_total": 45000, // Must match the discounted amount + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "prediscount_applied": "5000" // Track discount in paise + }, + "line_items": [ + // ... your line items with original prices + ] + } + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> Magic Checkout automatically handles all discount calculations on the UI. The system detects differences in checkout amounts and adjusts accordingly. +> + + + + + + +### 1.6 Interact with Shipping Info API + + This API should return shipping serviceability, COD serviceability, shipping fees and COD fees for a given list of customer addresses. + + /your-server-url/shipping-info-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // This is the receipt field set in the Razorpay order + "razorpay_order_id": "EKwxwAgItmmXdp", // This is the RZP order created without the `order_` prefix + "email": "", // Email field will be set if the customer enters an email + "contact": "+919900000000", // Customer phone number with country code + "addresses": [{ + "id": "0", + "zipcode": "560060", + "state_code": "KA", + "country": "IN" + }] + } + + ```json: Response + { + "addresses": [ + { + "id": "0", + "zipcode": "560000", + "state_code": "KA", + "country": "IN", + "shipping_methods": [ + { + "id": "1", + "description": "Free shipping", + "name": "Delivery within 5 days", + "serviceable": true, + "shipping_fee": 1000, // in paise. Here 1000 = 1000 paise, which equals to ₹10 + "cod": true, + "cod_fee": 1000 // in paise. Here 1000 = 1000 paise, which equals to ₹10 + }, + { + "id": "2", + "description": "Standard Delivery", + "name": "Delivered on the same day", + "serviceable": true, + "shipping_fee": 1000, // in paise. Here 1000 = 1000 paise, which equals to ₹10 + "cod": false, + "cod_fee": 0 // in paise. Here 1000 = 1000 paise, which equals to ₹10 + } + ] + } + ] + } + ``` + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#15-create-an-order). + +`razorpay_order_id` _mandatory_ +: `string` Unique identifier for the order returned by Checkout. + +`email` _optional_ +: `string` Customer's email address. + +`contact` _mandatory_ +: `string` Customer's phone number. + +`addresses` _mandatory_ +: `array` Customer's address details. + + `id` _mandatory_ + : `string` Unique identifier of the customer's address. + + `zipcode` _mandatory_ + : `string` Customer's ZIP code. + + `state_code` _optional_ + : `string` The code of the state where the customer resides. + + `country` _mandatory_ + : `string` Country where the customer resides. The length cannot exceed 2 characters. + + + +### Response Parameters + +`addresses` _mandatory_ +: `array` Customer's address details. + + `id` _mandatory_ + : `string` Unique identifier of the customer's address. + + `zipcode` _mandatory_ + : `string` Customer's ZIP code. + + `country` _mandatory_ + : `string` Country where the customer resides. The length cannot exceed 2 characters. + + `shipping_methods` _mandatory_ + : `array` Details regarding the shipping methods. + + `id` _mandatory_ + : `string` Unique identifier of the shipping method. + + `description` + : `integer` Brief description of the shipping method. + + `name` _mandatory_ + : `string` Name of the shipping method. + + `serviceable` _mandatory_ + : `boolean` Indicates whether you deliver orders to the zipcode entered by the customer. This is based on the ZIP codes you have added in the serviceability setting on the Razorpay Dashboard. Possible values: + - `true`: Orders can be delivered to the added ZIP codes. + - `false`: Orders cannot be delivered to the added ZIP codes. + + `shipping_fee` _mandatory_ + : `integer` Shipping charge in paise applicable to be paid by the customer. + + `cod` _mandatory_ + : `boolean` Indicates whether you support cash on delivery on this order. + - `true`: COD payment method is supported. + - `false`: COD payment method is not supported. + + `cod_fee` _mandatory_ : `integer` Cash on Delivery fee charged in paise. This amount is based on the COD settings configured in your Razorpay Dashboard. + + +> **INFO** +> +> +> **Handy Tips** +> +> If the `cod` field is false, set the `cod_fee` field to 0. +> + + + + + + + +### 1.7 Interact with Get Promotions API + + This API should return the list of promotions applicable for the given `order_id` and customer. + + /your-server-url/create-promotions-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // this is the receipt field set in Razorpay order + "contact": "+919000090000", + "email": "" + }' + ```json: Response + { + "promotions": [ + { + "code": "10%OFF", + "summary": "10% off on total cart value", + "description": "10% on total cart value upto ₹300" + }, + { + "code": "500OFF", + "summary": "₹500 off on total cart value", + "description": "₹500 off on a minimum cart value of ₹1500" + } + ] + } + ``` + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#15-create-an-order). + +`contact` _optional_ +: `string` Customer's phone number. + +`email` _optional_ +: `string` Customer's email address. + + + +### Response Parameters + +`promotions` _mandatory_ +: `array` Details of the promotions created. + + `code` _mandatory_ + : `string` Unique identifier of the promotion. + + `summary` _mandatory_ + : `string` Summary about the promotion. For example, 10% off on total cart value. + + `description` _optional_ + : `string` Brief description of the promotion. For example, 10% on total cart value upto ₹300. + + + +### 1.7.1 Interact with Apply Promotions API + + This API should validate the promotion code applied by the customer and return the discount amount. + + /your-server-url/create-promotions-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // this is the receipt field set in Razorpay order + "contact": "+919000090000", + "email": "", + "code": "500OFF" + }' + + ```json: Success Response + { + "promotion": { + "reference_id": "3rvff", + "type": "offer", + "code": "500OFF", + "value": 50000, + "value_type": "fixed_amount", + "description": "New Year Sale Offer" + } + } + ```json: Failure Response + { + "failure_code": "LOGIN_REQUIRED", + "failure_reason": “promotion Code has expired" + } + ``` + + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#15-create-an-order). + +`contact` _optional_ +: `string` Customer's phone number. + +`email` _optional_ +: `string` Customer's email address. + +`code` _mandatory_ +: `string` Promotion code used to avail discount on checkout. + + + +### Response Parameters + +`promotion` _mandatory_ +: `object` Used to pass all offer or discount-related information, including promotion code discount, method discount and so on. + + `reference_id` _mandatory_ + : `string` Identifier of the offer you create. + + `code` _optional_ + : `string` Promotion code used to avail discount on checkout. + + `type` _optional_ + : `string` Type of offer. Possible values: + - `coupon`: A discount applied by customers during checkout. For example, customers can use a coupon like `Diwali Sale 500 Off` to get ₹500 off the total cart value. + - `offer`: A promotion you create for your customers. For example, you create an offer `Buy 4 t-shirts and get 2 free`. In this case, when customers add 4 t-shirts to their cart, the 2 additional t-shirts will be automatically added for free. + + `value` _optional_ + : `integer` The offer value that needs to be applied in paise. For example, if you want to offer a discount of ₹500, enter 50000. + + `value_type` _optional_ + : `string` The type of value like: + - `fixed_amount`: A fixed amount discount value in the currency of the order. For example, ₹500. + - `percentage`: A percentage discount value. For example, 10%. + - `BXGY`: Buy X and Get Y. For example, if you buy 2 t-shirts, you a get a cap for free or at a discounted value. + + +> **INFO** +> +> +> **Handy Tips** +> +> Regardless of the `value_type`, the amount specified in the `value` parameter is applied as-is. For example, if `value_type` is percentage and the `value` is 5000, 5000 is considered in currency subunits (paise). +> + + + `description` _optional_ + : `string` Description of the promotion applied. For example, `New Year Sale Offer`. + + + +### Error Code, Description and Next Steps + + + Code | Description | Next Steps + --- + INVALID_PROMOTION | The specified promotion code is not recognised or does not exist in the system. | Please verify the code and try again. + --- + LOGIN_REQUIRED | This coupon is specifically assigned to a registered customer. | To redeem it, the customer must log in to their account and authenticate their identity. + --- + REQUIREMENT_NOT_MET | The current cart conditions do not meet the requirements for this promotion to be valid. For example, the promotion may require a minimum cart value of ₹1,000, but the cart total is ₹800. | Review the promotion's terms and adjust the cart contents accordingly. + + + + + + + + + + + +### 1.8 Pass Payment Options and Display Checkout Form + + Call `RazorpayCheckout.checkIntegration(withMerchantKey: )` to check the health of integration. This will also let you know if the SDK version is outdated. The opinionated alerting is displayed only when it is running on simulators. + + Add the following code to your `ViewController` or wherever you want to initialise payments: + + ```swift: ViewController.swift + internal func showPaymentForm(){ + let options: [String:Any] = [ + "key": "YOUR_KEY_ID", + "amount": "100", //This is in currency subunits. 100 = 100 paise= INR 1. + "currency": "",//We support more that 92 international currencies. + "description": "purchase description", + "order_id": "order_DBJOWzybf0sJbb", + "image": "https://url-to-image.jpg", + "name": "business or product name", + "prefill": [ + "contact": "", + "email": "" + ], + "one_click_checkout": true, //magic checkout + "show_coupons": true, //magic checkout + "theme": [ + "color": "#F37254" + ] + ] + razorpay.open(options) + } + ```objectivec: ViewController.m + - (void)showPaymentForm { // called by your app + NSDictionary *options = @{ + @"key": @"YOUR_KEY_ID", + @"amount": @"1000", //This is in currency subunits. 1000 = 1000 paise= INR 10. + // all optional other than amount. + @"currency": @"", //We support more that 92 international currencies. + @"image": @"https://url-to-image.jpg", + @"name": @"business or product name", + @"description": @"purchase description", + @"order_id": @"order_4xbQrmEoA5WJ0G", + @"prefill" : @{ + @"email": @"", + @"contact": @"" + }, + @"one_click_checkout": @"true", //magic checkout + @"show_coupons": @"true", //magic checkout + @"theme": @{ + @"color": @"#F37254" + } + }; + [razorpay open:options]; + } + ``` + +> **INFO** +> +> +> **Optional Parameter - displayController** +> +> When the optional parameter- displayController, is specified, the Razorpay controller is pushed onto this controller's navigation controller if present or presented on this controller if absent. +> +> ``` +> razorpay.open(options, displayController: self) +> ``` +> + + + + Checkout Options + + `key` _mandatory_ +: `string` API key id generated from the Dashboard. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `50000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. Length must be of 3 characters. + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order id generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `cod` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`show_coupons` _optional_ +: `boolean` Determines whether to show the coupons to customer on the checkout. Possible values: + - `true` (default): Enables the Coupon feature. + - `false`: Disables the Coupon feature. + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + You must pass these parameters in Checkout to initiate the payment. + + +> **WARN** +> +> +> +> **Watch Out!** +> +> To support theme colour in the progress bar, please pass HEX colour values only. +> + + + + +### 1.8.1 Enable UPI Intent on iOS *(Optional)* + + Provide your customers with a better payment experience by enabling UPI Intent on your app's Checkout form. In the UPI Intent flow: +1. Customer selects UPI as the payment method in your iOS app. A list of UPI apps supporting the intent flow is displayed. For example, PhonePe, Google Pay and Paytm. +2. Customer selects the preferred app. The UPI app opens with pre-populated payment details. +3. Customer enters their UPI PIN to complete their transactions. +4. Once the payment is successful, the customer is redirected to your app or website. + +To enable this in your iOS integration, you must make the following changes in your app's info.plist file. + +```xml: info.plist +LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + +``` + +Know more about [UPI Intent and its benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). + +### UPI Intent on Recurring Payments + +Configure and initiate a recurring payment transaction on UPI Intent: + +```swift: ViewController.swift +let options: [String:Any] = [ + "key": "YOUR_KEY_ID", + "order_id": "order_DBJOWzybfXXXX", + "customer_id": "cust_BtQNqzmBlXXXX", + "prefill": [ + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + ], + "image": "https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + "amount": 10000, // Amount should match the order amount + "currency": "INR", + "recurring": 1 // This key value pair is mandatory for Intent Recurring Payment. +] +```objectivec: ViewController.m +NSDictionary *options = @{ + @"key": @"YOUR_KEY_ID", + @"order_id": @"order_DBJOWzybfXXXX", + @"customer_id": @"cust_BtQNqzmBlXXXX", + @"prefill": @{ + @"contact": @"+919000090000", + @"email": @"gaurav.kumar@example.com" + }, + @"image": @"https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + @"amount": @(10000), // Amount should match the order amount + @"currency": @"INR", + @"recurring": @(1) // This key value pair is mandatory for Intent Recurring Payment. +}; +``` + + + + + + + +### 1.9 Handle Success and Error Events + + After completing payment, you can handle success or error events by implementing `onPaymentSuccess` and `onPaymentError` methods of the `RazorpayPaymentCompletionProtocol`. + + Alternatively, you can implement `onPaymentSuccess` and `onPaymentError` methods of `RazorpayPaymentCompletionProtocolWithData`. + + + + RazorpayPaymentCompletionProtocol + + ```swift: ViewController.swift + extension CheckoutViewController : RazorpayPaymentCompletionProtocol { + + func onPaymentError(_ code: Int32, description str: String) { + print("error: ", code, str) + self.presentAlert(withTitle: "Alert", message: str) + } + + func onPaymentSuccess(_ payment_id: String) { + print("success: ", payment_id) + self.presentAlert(withTitle: "Success", message: "Payment Succeeded") + } + } + ```objectivec: ViewController.m + - (void)onPaymentSuccess:(NSString *)payment_id { + [self showAlertWithTitle:SUCCESS_TITLE + andMessage:[NSString + stringWithFormat:SUCCESS_MESSAGE, payment_id]]; + } + + - (void)onPaymentError:(int)code description:(NSString *)str { + [self showAlertWithTitle:FAILURE_TITLE + andMessage:[NSString + stringWithFormat:FAILURE_MESSAGE, code, str]]; + } + ``` + + + +### RazorpayPaymentCompletionProtocolWithData + + ```swift: ViewController.swift + extension CheckoutViewController: RazorpayPaymentCompletionProtocolWithData { + + func onPaymentError(_ code: Int32, description str: String, andData response: [AnyHashable : Any]?) { + print("error: ", code) + self.presentAlert(withTitle: "Alert", message: str) + } + + func onPaymentSuccess(_ payment_id: String, andData response: [AnyHashable : Any]?) { + print("success: ", payment_id) + self.presentAlert(withTitle: "Success", message: "Payment Succeeded") + } + } + ```objectivec: ViewController.m + - (void)onPaymentError:(int32_t)code description:(NSString * _Nonnull)str andData:(NSDictionary * _Nullable)response { + NSLog(@"%@ %@",str, response); + } + - (void)onPaymentSuccess:(NSString * _Nonnull)payment_id andData:(NSDictionary * _Nullable)response { + NSLog(@"%@ %@",payment_id, response); + } + ``` + + + + + After completing the payment, add necessary actions based on success or error events. + + **Failure Codes**: + - 0: Network error + - 1: Initialization failure / Unexpected behaviour + - 2: Payment cancelled by the user + + Success handler receives `payment_id` that you can use later for capturing the payment. + + + +### 1.10 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.11 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + + +### 1.12 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +### 1.13 Perform Post Payment Processing + + Based on the response, you can handle post-payment processing on your end. + +> **WARN** +> +> +> **Timeout Handling** +> +> If no API call is made within 45 seconds, our background job will assume there is a network drop off and will proceed to place the order on Shopify automatically. +> + + + Fetch an Order + + Use the Fetch Orders API to retrieve order details, including customer information, address, shipping method and promotions of a particular order: + + v1/orders/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ + -X GET https://api.razorpay.com/v1/orders/order_R1yDkxyIuKXXXX \ + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + import com.razorpay.Order; + import com.razorpay.RazorpayClient; + import com.razorpay.RazorpayException; + try { + Order order = razorpay.Orders.fetch(""); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + # do easy_install razorpay or + # pip install razorpay + + import razorpay + razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]")) + + order_id = + resp = client.order.fetch(order_id) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->fetch($orderId); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('key_id', 'key_secret') + + order = Razorpay::Order.fetch('order_R1yDkxyIuKXXXX') + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.fetch(orderId) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("", "") + + body, err := client.Order.Fetch("", nil, nil) + ``` + ```json: Response: COD Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 507000, + "amount_paid": 0, + "amount_due": 507000, + "currency": "INR", + "receipt": "#30567", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "placed", + "attempts": 0, + "notes": { + "cart_id": "hWN2Am4BGnQrizKE3hzeQaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/hf5Q?key=14bbbce35b8", + "shopify_order_id": "6302119854247" + }, + "created_at": 1756045901, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 5000, + "shipping_fee": 7000, + "customer_details": { + "contact": "+919100000000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + }, + "billing_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + } + }, + "line_items_total": 600000, + "tax_details": { + "total_tax": 4128, + "taxes_included": true + } + } + ```json: Response: Prepaid Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 100700, + "amount_paid": 100700, + "amount_due": 0, + "currency": "INR", + "receipt": "#30414", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "paid", + "attempts": 1, + "notes": { + "cart_id": "hWN1TcwL?key=1a3a5a7c", + "storefront_id": "gid://shopify/Cart/hIkey=af7c7800", + "flits_cart_token": "hWcwL?key=1a3741dc_8740f5_175447", + "shopify_order_id": "6266036191399" + }, + "created_at": 1754466155, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 0, + "shipping_fee": 700, + "customer_details": { + "billing_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "billing_address", + "zipcode": "110057" + }, + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "shipping_address", + "zipcode": "110057" + } + }, + "line_items_total": 110000, + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + Know more about the [Orders API.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) + + +> **INFO** +> +> +> **Order Status** +> +> Check the order status for the following: +> +> - Prepaid orders: `paid`. +> - COD orders: `placed`. +> + + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the order to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the order. For example, `order_R1yDkxyIuKXXXX`. + +`entity` +: `string` Type of entity. Value is `order`. + +`amount` +: `integer` Total order amount in the smallest currency unit (paise). + +`amount_paid` +: `integer` Amount paid towards the order in paise. For prepaid orders, this shows the actual amount paid. For COD orders, this is `0` until payment is collected. + +`amount_due` +: `integer` Outstanding amount due in paise. For prepaid orders, this shows any remaining balance. For COD orders, this equals the `amount` field until payment is collected. + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`receipt` +: `string` Receipt identifier for internal reference. For example, `#30567`. + +`offers` +: `array` Array of offer IDs applied to the order. + +`status` +: `string` Current status of the order. Possible values: + - `placed`: Order placed but payment pending (COD orders). + - `paid`: Order placed and payment completed (prepaid orders). + - `cancelled`: Order cancelled. + - `refunded`: Order refunded. + +`attempts` +: `integer` Number of payment attempts made for this order. For example, `1`. + +`notes` +: `object` Custom notes added to the order containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `shopify_order_id` + : `string` Shopify order reference. + + `flits_cart_token` + : `string` Flits integration token (optional). + +`created_at` +: `integer` Unix timestamp indicating when the order was created. For example, `1756045901`. + +`description` +: `string|null` Order description. Returns `null` if no description is provided. + +`checkout` +: `string|null` Checkout identifier. Returns `null` if not applicable. + +`promotions` +: `array` Array of promotion objects applied to the order. + + `code` + : `string` Promotion code used. For example, `orderOff`. + + `type` + : `string` Type of promotion. For example, `cart_value`. + + `value` + : `integer` Discount value in paise. For example, `10000` for ₹100. + + `description` + : `string` Human-readable promotion description. + + `reference_id` + : `string` Internal reference for the promotion. + +`cod_fee` +: `integer` Cash on Delivery charges in paise. For COD orders, this contains the fee amount (for example, `5000` for ₹50). For prepaid orders, this is `0`. + +`shipping_fee` +: `integer` Shipping charges in paise. For example, `700` for ₹7. + +`customer_details` +: `object` Customer information. + + `contact` + : `string` Customer's phone number. + + `email` + : `string` Customer's email address. + + `shipping_address` + : `object` Complete shipping address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for delivery. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Recipient name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `shipping_address`. + + `zipcode` + : `string` Postal code. + + `billing_address` + : `object` Complete billing address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for billing. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Account holder name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `billing_address`. + + `zipcode` + : `string` Postal code. + +`line_items_total` +: `integer` Total value of line items in paise before adding shipping fees and COD fees, after applying promotions. For example, `60000` for ₹600. + +`tax_details` +: `object` Tax information. + + `total_tax` + : `integer` Total tax amount in paise. For example, `4128`. + + `taxes_included` + : `boolean` Indicates whether taxes are included in the item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### Fetch a Payment + + Use the Fetch Payments API to retrieve comprehensive payment details, including transaction status, payment method, customer information, settlement details, and the associated order information for a specific payment: + + v1/payments/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X GET https://api.razorpay.com/v1/payments/pay_R1yFlWQar3XXXX + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String paymentId = "pay_R1yFlWQar3XXXX"; + + Payment payment = razorpay.payments.fetch(paymentId); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.payment.fetch(paymentId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + paymentId := "pay_R1yFlWQar3XXXX" + + body, err := client.Payment.Fetch(paymentId, nil, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->payment->fetch($paymentId); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + paymentId = "pay_R1yFlWQar3XXXX" + + Razorpay::Payment.fetch(paymentId) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.payments.fetch(paymentId) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + Payment payment = client.Payment.Fetch(paymentId); + ``` + + ```json: Response: COD Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 55700, + "currency": "INR", + "status": "pending", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "cod", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919100000000", + "notes": { + "cart_id": "hWN2QaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/h?key=14bbf59ce35b8" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1756046099, + "receiver_type": null + } + ```json: Response: Prepaid Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 90630, + "currency": "INR", + "status": "captured", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "cart_id": "hWNsVrcwL?key=1a3a457ddc", + "storefront_id": "gid://shopify/Cart/hWv3e8?key=af707", + "flits_cart_token": "hWrcwL?key=1a3a5a70f5_17547", + "optimizer_provider_name": "razorpay" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "727947422583", + "upi_transaction_id": "1F723677C679EF578A95" + }, + "created_at": 1754466271, + "receiver_type": null, + "upi": { + "vpa": "gaurav.kumar@exampleupi" + } + } + ``` + + Know more about the [Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md). + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. For example, `pay_R1yFlWQar3XXXX`. + +`entity` +: `string` Type of entity. Value is `payment`. + +`amount` +: `integer` Payment amount in the smallest currency unit (paise). For COD payments, this includes the COD fee (for example, `55700` for ₹557). For prepaid payments, this equals the captured amount (for example, `90630` for ₹906.30). + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`status` +: `string` Current status of the payment. Possible values: + - `pending`: Payment pending collection (COD orders). + - `captured`: Payment successfully captured (prepaid orders). + - `authorized`: Payment authorized but not captured. + - `failed`: Payment attempt failed. + +`order_id` +: `string` Unique identifier of the associated order. For example, `order_R1yDkxyIuKXXXX`. + +`invoice_id` +: `string|null` Unique identifier of the associated invoice. Returns `null` if no invoice is linked. + +`international` +: `boolean` Indicates whether this is an international payment. Possible values: + - `true`: International payment. + - `false`: Domestic payment. + +`method` +: `string` Payment method used. Possible values include: + - `cod` + - `upi` + - `card` + - `netbanking` + - `wallet` + +`amount_refunded` +: `integer` Amount refunded in paise. For example, `0` indicates no refund has been processed. + +`refund_status` +: `string|null` Current refund status. Returns `null` if no refund is applicable. Possible values: + - `partial`: Partial refund processed. + - `full`: Full refund processed. + +`captured` +: `boolean` Indicates whether the payment has been captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string|null` Payment description. Returns `null` if no description is provided. + +`card_id` +: `string|null` Unique identifier of the card used for payment. Returns `null` for non-card payments. + +`bank` +: `string|null` Bank identifier for netbanking payments. Returns `null` for other payment methods. + +`wallet` +: `string|null` Wallet provider identifier. Returns `null` for non-wallet payments. + +`vpa` +: `string|null` Virtual Payment Address for UPI payments. For example, `gaurav.kumar@exampleupi`. Returns `null` for non-UPI payments. + +`email` +: `string` Customer's email address. + +`contact` +: `string` Customer's phone number. + +`notes` +: `object` Custom notes added to the payment containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `flits_cart_token` + : `string` Flits integration token (optional). + + `optimizer_provider_name` + : `string` Payment optimizer provider name (optional). + +`fee` +: `integer|null` Processing fee charged in paise. For example, `0` indicates no fee. Returns `null` for COD payments. + +`tax` +: `integer|null` Tax amount on processing fee in paise. For example, `0` indicates no tax. Returns `null` for COD payments. + +`error_code` +: `string|null` Error code if payment failed. Returns `null` for successful payments. + +`error_description` +: `string|null` Human-readable error description. Returns `null` for successful payments. + +`error_source` +: `string|null` Source of the error. Returns `null` for successful payments. + +`error_step` +: `string|null` Step at which error occurred. Returns `null` for successful payments. + +`error_reason` +: `string|null` Reason for the error. Returns `null` for successful payments. + +`acquirer_data` +: `object` Data from the payment acquirer. + + `rrn` + : `string` Retrieval Reference Number from the acquirer (optional). + + `upi_transaction_id` + : `string` UPI transaction identifier from the acquirer (optional). + +`created_at` +: `integer` Unix timestamp indicating when the payment was created. For example, `1756046099`. + +`receiver_type` +: `string|null` Type of receiver for the payment. Returns `null` if not applicable. + +`upi` +: `object` UPI-specific payment details (only present for UPI payments). + + `vpa` + : `string` Virtual Payment Address used for the UPI payment. + + + + + + + + + + +## 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +You can make test payments using one of the payment methods configured at the Checkout. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + + +### Supported Payment Methods + + Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + + + Payment Method | Code | Availability + --- + [Cash on Delivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md) | `cod` | Requires [Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md#prerequisites). + --- + [Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ + --- + [Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ + --- + [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ + --- + [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ + --- + EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ + --- + [Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ + --- + [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). + --- + [Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. + --- + [Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + + + ### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + ### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the following lists: + - [Supported UPI Flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + - [UPI Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/upi.md). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + ### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + #### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + - [Test Error Scenarios](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards). + + #### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + ### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## 3. Go-live Checklist + +Check the go-live checklist for Razorpay Magic Checkout integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + +## Related Information + +[iOS Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard.md) diff --git a/llm-content/payments/magic-checkout/login-with-razorpay.md b/llm-content/payments/magic-checkout/login-with-razorpay.md new file mode 100644 index 00000000..8d112869 --- /dev/null +++ b/llm-content/payments/magic-checkout/login-with-razorpay.md @@ -0,0 +1,226 @@ +--- +title: Login With Razorpay Setup | Razorpay Magic Checkout +heading: Login With Razorpay Setup (SSO) +description: Boost conversions and gain customer insights with Magic SSO. Simplify login and create personalised shopping experiences for your Shopify store. +--- + +# Login With Razorpay Setup (SSO) + +Razorpay Magic SSO (Single Sign-On) offers a seamless login experience, helping you enhance conversions and gain valuable insights into user behaviour. + +> **WARN** +> +> +> **Watch Out!** +> +> This feature is available only for Shopify users. +> + + +### Advantages + + - **Seamless Login and Personalisation**: OTP-based login with incentives like discounts, enabling auto-login across stores for a frictionless and personalised experience. + - **Expanded Customer Data and Insights**: Higher login rates provide you with deep insights into customer behaviour before checkout, improving engagement and retention. + - **Improved Conversion Rates**: Pre-logged-in users experience smoother checkouts, early coupon discovery, and personalised offers, driving higher sales. + - **Stronger Abandoned Cart Recovery**: Captures abandoned carts before checkout, allowing you to re-engage users who showed purchase intent. + - **Customisable and Compliant**: Fully brandable UI with explicit consent collection for retargeting, ensuring compliance and trust. + + +## Get Started + +Follow the steps given below: +1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings**. +2. Navigate to **Login with Razorpay Setup**. +3. We will verify the following eligibility requirements with your Shopify store: + + +### Shopify Store Eligibility + + If your store is on Shopify's base plan and is not eligible, you must upgrade your plan. Follow the steps given below: + 1. Log in to the [Shopify Store](https://accounts.shopify.com/store-login) and navigate to **Settings** → **Plan**. + 2. Choose an upgraded plan and complete the payment. + 3. Recheck the Razorpay Dashboard, you will now be eligible to enable Login with Razorpay. + + + +### Legacy Customer Accounts + + Follow the steps given below to configure your legacy customer settings: + 1. Log in to the [Shopify Store](https://accounts.shopify.com/store-login) and navigate to **Settings** → **Customer accounts**. + 2. In the **Login Links** section, select **Legacy**. + 3. Click **Switch to legacy customer accounts** to confirm. + 4. On the home page, navigate to **Online Store** → **Preferences** in the **Sales channels** section. + 5. Scroll down to the **Spam Protection** section and disable the **Enable on login, create account and password recovery pages** setting. + 6. Click **Save**. + + + +### Enable Login Settings + + Follow the steps given below to configure your Shopify login settings: + 1. Log in to the [Shopify Store](https://accounts.shopify.com/store-login) and navigate to **Online Store** → **Preferences** in the **Sales channels** section. + 2. Scroll down to the **Spam Protection** section and disable the **Enable on login, create account and password recovery pages** setting. + 3. Click **Save**. + + + +### Razorpay App Configuration + + Follow the steps given below if your Razorpay app is unable to create or merge customer: + 1. Log in to the [Shopify Store](https://accounts.shopify.com/store-login) and navigate to **App and Sales** in the **Sales channels** section. + 2. Click **Develop apps** and open the **Magic Checkout** app. + 3. Click **configuration** → **Edit Admin API Integration** + 4. Search for **customer** and select **Write_Customer** and **read_customer**. + 5. Search for **Merge** and select **Write_customer_merge** and **read_customer_merge**. + 6. Click **Save**. + + + + +## Video Tutorial + +Watch this video for a step-by-step walkthrough on enabling Login with Razorpay (SSO) on your Shopify store. + +[Video: https://www.youtube.com/embed/VodJW26ehYI] + +## Enable Login with Razorpay Setup + +Set up easy login into your website with single sign-on for your customers across the Razorpay network. To enable login with Razorpay setup: + +1. Log in to the Dashboard navigate to **Magic Checkout** → **Setup & Settings**. +2. Navigate to **Login with Razorpay Setup**. +3. Turn on **Enable Login with Razorpay**. + ![Enable Login with Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-enable.jpg.md) +4. You will be able to view the following options for the SSO widget: + - [Settings](#settings) + - [Customise](#customise) +![Settings and customisation options on SSO](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-settings.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> If you have added a custom domain for the account page, SSO will not work. You must revert to the default domain for the SSO settings to function. +> + +### Video Tutorial + +Watch this video to know how to customise the Login with Razorpay (SSO) widget. + +[Video: https://www.youtube.com/embed/8A7G7S0jUHA] + +### Settings + +You can configure the following: + + +### Where should we display login screen? + + Select where you want to show the login screen, if the user is not logged in. + + +> **WARN** +> +> +> **Watch Out!** +> +> This is a multi select configuration, if a customer does not login the first time a login screen is dispayed, the login screen will reappear based on the options you select below. +> + + + - **The first page your customer sees**: Useful for encouraging early login during browsing. Select the checkbox and schedule when the login widget shows up (in seconds). For example, show the login widget 5 seconds after the page loads. + - **When a customer adds their very first item to the cart**: Prompt login after the customer adds their first item to the cart. Select the checkbox and schedule when the login widget should show up (in seconds). + - **When a customer begins the checkout process**: Display the login screen when they proceed to checkout, just before payment. Select the checkbox. + - **Make Login mandatory pre-Checkout**: Ensure that users cannot proceed to checkout without logging in. Select the checkbox to enforce mandatory login. + ![Display login screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-display-login.jpg.md) + + + +### Ask consent from customer for marketing communication + + Select how you want to seek permission from your customer for marketing communication. + + - **Single selector for Email, WhatsApp, and SMS**: Use one unified checkbox to capture consent for all three channels together. + - **Separate selectors for Email, WhatsApp, and SMS**: Use separate checkboxes to capture consent for each channel individually. + - **Do not ask for consent**: No explicit consent prompt is displayed for marketing communications. + ![Ask consent from customer for marketing communication](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-ask-consent.jpg.md) + + + +### Collect missing emails from everyone + + You can choose to collect missing emails during the login. + - **Email-Less Customers**: Allow users to log in without providing an email address. + - **Collect Missing Emails (recommended)**: Prompt users to enter their email during login if it is not already available. + ![Collect missing emails](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-collect-emails.jpg.md) + + +After completing the configuration, click **Save Changes** to apply the updates. + +> **INFO** +> +> +> **Handy Tips** +> +> The widget includes a consent prompt for users at the bottom, with terms and conditions listed. +> + +### Customise + +Customise the widget to suit your brand. The default configuration flows from the configurations on checkout settings. + +1. In the **Customise** section, the preview turns into edit mode. You can edit the following: + + + Enter the widget heading as per your preference. + ![Edit widget heading](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-widget-heading.gif.md) + + + Hover over the emoji you want to change and click the edit icon. Press `Command + Control + Space` to open the emoji picker and select your preferred emoji. + ![change emojis](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-emoji.gif.md) + + + Click **Change Background Colour** and choose a colour of your choice. + ![Customise background colour](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-background-colour.gif.md) + + + Click **Change Button Colour** and choose a colour of your choice. + ![Customise button colour](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-button-colour.gif.md) + + + Click **Change Font** and choose a font of your choice from the drop-down list. + ![Change Font](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-font.gif.md) + + +2. Click **Save**. + +> **INFO** +> +> +> **Handy Tips** +> +> - You can switch between mobile and desktop views to preview changes. +> - You can also preview how the widget will appear on **Live Mode**. +> ![Mobile/Desktop view and Live Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-sso-view-mode.jpg.md) +> + +## Login Rewards + +You can offer discounts or coupons to encourage customers to log in to your website. + +> **INFO** +> +> +> **Handy Tips** +> +> This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. Ensure your coupon is created on the [Coupon Engine](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#coupons) and include the following details in your request: +> - Coupon code +> - A brief description +> - Any additional message you want to display +> + +### Related Information + +- [Automatic Customer Tagging for Retargeting](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/login-with-razorpay/automation-tags.md) +- [Customer Analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/login-with-razorpay/customer-analytics.md) diff --git a/llm-content/payments/magic-checkout/login-with-razorpay/automation-tags.md b/llm-content/payments/magic-checkout/login-with-razorpay/automation-tags.md new file mode 100644 index 00000000..117151bb --- /dev/null +++ b/llm-content/payments/magic-checkout/login-with-razorpay/automation-tags.md @@ -0,0 +1,88 @@ +--- +title: Automatic Customer Tagging for Retargeting | Razorpay Magic Checkout +heading: Automatic Customer Tagging for Retargeting +description: Razorpay SSO automatically tags customers in Shopify to enable personalised retargeting campaigns and targeted marketing workflows. +--- + +# Automatic Customer Tagging for Retargeting + +When customers authenticate through [Login with Razorpay (SSO)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/login-with-razorpay.md) on your Shopify store, specific tags are automatically assigned to their profiles. These tags provide automation capabilities that enhance your marketing efforts and improve customer engagement. + + +### Advantages + + - **Zero Additional Cost**: This feature is included with your Magic Checkout integration. + - **Boost Revenue**: Create targeted marketing campaigns that convert more effectively. + - **Time Saving**: Automate customer journeys that would otherwise require manual segmentation. + - **Seamless Integration**: Works with your existing marketing tools and Shopify workflows. + + +## List of Tags + +**Login with Razorpay** automatically applies the following tags to customer profiles in Shopify: + +Tag | Description +--- +**MAGIC_LOGIN_AUTO** | Applied when returning customers are automatically identified without additional input. +--- +**MAGIC_LOGIN_MANUAL** | Applied when customers manually authenticate using an OTP. +--- +**LOGIN_TIMESTAMP** | Records the exact store visit time in ISO format. +--- +**MAGIC_CUSTOMER** | Identifies customers whose accounts were created through Razorpay Magic. + +### Example: Customer Journey with Tags + +These tags enable automation possibilities for your store. Create personalised retargeting flows based on login behaviour: + +- Send WhatsApp messages to customers tagged with `MAGIC_LOGIN_AUTO` who have not completed a purchase in 7 days. +- Offer special promotions to customers with `MAGIC_LOGIN_MANUAL` tags who abandoned their carts. +- Use `LOGIN_TIMESTAMP` to trigger time-sensitive offers after login events. + +#### Example Setup + +This example demonstrates how to create an automated campaign to re-engage customers who have not placed orders recently. + +[Video: https://www.youtube.com/embed/hrXRNUWjIyU] + +Follow the steps given below: + +1. **Customer Identification**: + - Customer logs in (automatically/manually through Magic). + - System automatically assigns `Magic_login` tag. +2. **Segment Creation**: + - Create segment: Customers who have not placed an order since February. + - This segment dynamically updates as customer behaviour changes. +3. **Campaign Rule**: If customer has **Magic_login** tag and customer belongs to **No orders since February** segment then send an **Email**. + +#### Additional Campaign Possibilities + +The system supports unlimited automation combinations based on your requirements. Common use cases include: + + + - Customer identified + viewed specific items → send targeted coupon. + - Customer identified + browsed category multiple times → send category-specific offers. + + + - Customer identified + no order in 3 days → send premium re-engagement message. + - Customer identified + high purchase frequency + recent inactivity → send personalised offers. + + + - Customer identified + 4 website visits in 7 days + abandoned checkout + no order in 5 days → send discount coupon. + - Customer identified + repeated product views + no purchase → send limited-time offer. + + +## Compatible Automation Tools + +Leverage Razorpay Shopify tags with various automation platforms: + +- **Shopify Flow**: Create conditional workflows using the login tags as triggers. +- **Zapier**: Connect to hundreds of apps based on tag events. +- **WhatsApp Business Solutions**: Trigger customer communications based on tag status. +- **Email Marketing Tools**: Create segments based on login behaviour. + +For advanced use cases, combine multiple tags to create targeted customer segments with specific behaviours and attributes. + +### Related Information + +[Customer Analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/login-with-razorpay/customer-analytics.md) diff --git a/llm-content/payments/magic-checkout/login-with-razorpay/customer-analytics.md b/llm-content/payments/magic-checkout/login-with-razorpay/customer-analytics.md new file mode 100644 index 00000000..b24eefff --- /dev/null +++ b/llm-content/payments/magic-checkout/login-with-razorpay/customer-analytics.md @@ -0,0 +1,60 @@ +--- +title: Login with Razorpay Analytics | Razorpay Magic Checkout +heading: Customer Analytics +description: Track customer login activity, account creation, and checkout behaviour with the Customer Analytics Dashboard. Export detailed user data to drive targeted marketing and engagement campaigns. +--- + +# Customer Analytics + +When customers authenticate through [Login with Razorpay (SSO)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/login-with-razorpay.md), their activity is captured in the **Customer Analytics** dashboard. It displays login metrics, account creation data, and customer-level insights to help you track engagement, understand user behaviour, and retarget high-intent customers across marketing channels. + + +### Advantages + + - **Understand customer behaviour**: View detailed metrics on login patterns, account creation, and last order placed. + - **Enable targeted outreach**: Identify users who dropped off during checkout and re-engage them via custom campaigns. + - **Drive marketing automation**: Export data seamlessly into third-party tools for automated messaging and performance ads. + - **Consolidate key metrics**: Access all customer login and engagement data in a single, streamlined dashboard view. + + +## Get Started + +Follow the steps given below to view insights about the various activities: + +1. Log in to the Dashboard. +2. Navigate to **Magic Checkout** → **Reports & Analytics** → **Customer Analytics**. + +![SSO Customer Analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-sso-analytics.jpg.md) + +## Dashboard Overview + +The **Customer Analytics** dashboard provides the following widgets: + +- **Total Logged-in Users**: Displays the cumulative number of users who have logged in using [Login with Razorpay (SSO)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/login-with-razorpay.md). This gives you a glipmse of how many unique users have engaged with your store through SSO. +- **New Account Creations**: Displays the number of new customer accounts created via SSO during the selected date range. This helps track how many users are converting from guest visitors to registered customers. +- **Login Trends - Total Login vs New Users**: Displays daily login activity, comparing total logins to new users. This helps identify patterns in user engagement and determine whether returning customers or new visitors are driving traffic. +- **Customer Login Data**: A detailed table of all users who have logged in via SSO. You can view key attributes for each user and use this data to build segments or trigger marketing actions. It includes the following fields: + - **Customer Details**: Customer id. + - **Phone**: Phone number associated with the customer's SSO profile. + - **Email**: Email address used during login or account creation. + - **First Login**: Date when the customer first logged in using **Login with Razorpay**. + - **Last Login**: Most recent date the customer logged in in the selected time range. + - **Frequency**: Total number of times the customer has logged in in the selected time range. This helps identify highly engaged users. + - **UTM Source**: Captures the marketing source (like a campaign or referral link) that led to the user login. + - **Last order**: Date of the customer's most recent successful order. + - **Abandoned Checkout**: Indicates whether the customer initiated checkout but did not complete the payment. This helps in identifying high-intent users who may be open to retargeting. + ![Customer details for retargeting](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-sso-analytics-customer-details.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> - Select a customer id to view a detailed breakdown of their login activity, contact information, order history, and checkout behaviour. +> ![Customer detail view in Login with Razorpay dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-sso-analytics-customer-details-view.jpg.md) +> - Click **Export** to download customer data. You can then upload the file to platforms like Google Ads, Facebook, or a WhatsApp solution to automate retargeting or run manual campaigns. +> + +### Related Information + +[Automatic Customer Tagging for Retargeting](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/login-with-razorpay/automation-tags.md) diff --git a/llm-content/payments/magic-checkout/order-settings/prepay-cod.md b/llm-content/payments/magic-checkout/order-settings/prepay-cod.md new file mode 100644 index 00000000..914cc38b --- /dev/null +++ b/llm-content/payments/magic-checkout/order-settings/prepay-cod.md @@ -0,0 +1,177 @@ +--- +title: Convert COD Orders to Prepaid +description: Send your customers a Conversion Link via WhatsApp to convert COD orders to prepaid with Razorpay Magic Checkout. +--- + +# Convert COD Orders to Prepaid + +Cash on Delivery transactions are popular in India. However, they can result in a higher return rate due to less customer commitment. + +With Magic Checkout, you can urge customers who chose cash on delivery while placing an order to convert to prepaid by offering discounts or incentives post-order placement. You can do this by sending your customers a conversion link via WhatsApp to convert COD orders to prepaid. + +> **INFO** +> +> +> **Dependencies** +> +> - This is an on-demand feature. Write to us at [magic-checkout-support@razorpay.com](mailto:magic-checkout-support@razorpay.com) to get this feature enabled for your account. +> - This feature is available only if you use [Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify.md) or [WooCommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md) (v4.3.5 and above) plugin. +> + + +### Advantages + + - **Increase Order Commitment** + + Since customers have already paid upfront, prepaid orders reduce the likelihood of cancellations or returns. + + - **Reduce RTO** + + Customers who invest their money are more likely to be satisfied with their purchases, leading to a decrease in RTO orders. + + - **Streamline Operations** + + Shifting to prepaid orders simplifies order fulfillment, reducing operational burdens and errors associated with cash handling and returns management. + + - **Enhance Customer Trust** + + Offering discounts or incentives for prepaid orders builds customer trust and loyalty, fostering a positive brand impression and increasing the likelihood of repeat purchases. + + +## Configure Conversion Link + +Follow the steps given below: + +1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings**. +2. Navigate to **COD Setup** → **Convert COD to Prepaid**. +3. Click **Convert COD to Prepaid**. + ![Navigate to convert COD to prepaid on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-prepay-cod.jpg.md) + + +> **INFO** +> +> +> **Manually Review COD Orders** +> +> The **Enable conversion for** field will appear if you enable the [Manually review COD orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/review-cod-orders.md) feature. The COD conversion will be based on the type of RTO risk. +> ![Enable conversion field for manual review](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-prepay-cod-manual-review.jpg.md) +> + +4. Enable **Discount** to add a flat or percentage discount to the total COD order amount. Adding a discount increases the probability of conversion by up to 30%. Select the type of discount you want to apply: + + +> **WARN** +> +> +> **Watch Out!** +> +> Discount applied on the order amount excludes shipping and COD fee. +> + + + + In this type, a fixed amount is deducted from the original amount. + - **Discount value**: Enter an amount by which the original price should be reduced. For example, if ₹150 is the flat discount applied, ₹150 is deducted from the original price. + - **Minimum order value**: Enter the minimum bill amount for which the discount can be applied. For example, if you enter ₹800, the discount is applied to orders whose bill amount is ₹800 or above. + ![offer flat discount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-prepay-flat.jpg.md) + + + In this type, the offer is calculated in percentage. + - **Discount percentage**: The percentage by which the original price should be reduced. For example, if 10 is the percentage discount to be applied, on an order amount of ₹900, ₹90 will be deducted. + - **Maximum discount**: The maximum amount that can be deducted from the bill amount. For example, you can ensure that the customer cannot avail of a discount higher than ₹500, irrespective of the order amount. + - **Minimum order value**: Enter the minimum bill amount for which the offer can be applied. For example, if you enter ₹800, the discount is applied to orders whose bill amount is ₹800 or above. + ![offer percentage discount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-prepay-percentage.jpg.md) + + +5. Select the **Order conversion validity** based on your requirement. Customers will not be able to convert COD orders to prepaid post validity. For example, if you set the order conversion validity to 15 minutes, customers cannot convert COD orders to prepaid 15 minutes after sending the conversion link. + + +> **INFO** +> +> +> **Handy Tips** +> +> We recommend setting the order conversion validity below your average shipping start time. Customers should not be able to convert COD orders to prepaid after the order is shipped. +> + +6. You can convert orders only on **WhatsApp message**. Customers will receive the conversion link based on your selected option. + +7. Click **Save settings**. + + +> **WARN** +> +> +> **WooCommerce API Credentials** +> +> If you are a WooCommerce user and have not opted for the [Manually review COD orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/review-cod-orders.md) feature, you must provide your **WooCommerce API credentials** to enable us to send the conversion links to your customers. +> ![Submit API keys to enable conversion links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-submit-keys.jpg.md) +> + +> **WARN** +> +> +> **WhatsApp Message Limitations** +> +> - WhatsApp notifications for COD to prepaid conversion are subject to Meta's daily messaging limits of **5-6 marketing messages per customer**. +> - If customers have already received their daily limit of marketing messages from any WhatsApp Business account, COD to prepaid notifications may fail to deliver. +> - This is expected behavior due to Meta's WhatsApp Business API policies and affects all platforms using WhatsApp marketing messages, not specific to Razorpay. +> + +## Conversion States + +After you send the conversion link to your customers, you can filter the search by Order Id and track the conversion status on the Dashboard. Navigate to **Magic Checkout** → **COD Order Conversion**. + +![View order Id and conversion status on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-prepay-status.jpg.md) + + +### List of Conversion States + + The table below lists the various conversion states and their descriptions: + + + Status | Description + --- + Conversion Link Sent | Indicates that the conversion link is sent. + --- + Converted To Prepaid | Indicates that the customer successfully converted the order to prepaid. + --- + Auto Expired | Indicates that the link expired based on the order conversion validity (expiry time). + --- + Manually Expired | Indicates that you manually expired the link from the Dashboard. + --- + Failed To Send Link | Indicates that the link is not sent to the customer due to technical issues or since the customer is not on WhatsApp. + + + +> **INFO** +> +> +> **Conversion Link Sent State** +> +> When the link is in the **Conversion Link Sent** state, you can choose to expire the link manually. Follow the steps given below: +> 1. In the **COD Order Conversion** tab, select the **Order Id** for which you want to expire the conversion link. +> 2. Under **Actions**, click the clock icon. +> ![Manually expire the conversion link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-prepay-expire.jpg.md) +> 3. Click **Expire Link** to confirm your action. +> + + + +## Customer Experience + +Customers view the conversion link on WhatsApp sent via Razorpay's WhatsApp handle and can choose to prepay for the order. +![View Conversion link on WhatsApp](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-prepay-link.jpg.md) + +### Edit Display Name *(Optional)* + +You can change the business name displayed on the WhatsApp message to a name that your customers are familiar with. For example, if **Acme Corp's** official business name is XYZ Technologies, but customers know them as Acme Corp, we recommend using **Acme Corp** as the display name. + + +### To edit the display name: + + 1. Log in to the Dashboard and navigate to **Account & Settings**. + 2. In the **Business settings** section, select **Account details**. + ![Edit Account details on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-settings.jpg.md) + 3. Click **Edit** and modify the name. + ![Edit Display name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-setting-edit-display-name.jpg.md) diff --git a/llm-content/payments/magic-checkout/order-settings/review-cod-orders.md b/llm-content/payments/magic-checkout/order-settings/review-cod-orders.md new file mode 100644 index 00000000..2c5e6c56 --- /dev/null +++ b/llm-content/payments/magic-checkout/order-settings/review-cod-orders.md @@ -0,0 +1,135 @@ +--- +title: Manually Review COD Orders | Razorpay Magic Checkout +heading: About Manual Review of COD Orders +description: Manually review COD orders with Razorpay Magic Checkout and take necessary actions based on our recommendations post-order placement to reduce RTOs. +--- + +# About Manual Review of COD Orders + +You can manually review COD orders and take necessary actions based on our recommendations post-order placement to filter out potential RTOs. + +#### Features +- Manually review COD orders to filter out potential RTO orders. +- Take necessary actions on COD orders based on the insights. +- Evaluate orders on priority based on the risk levels. + +## How it Works + +Follow the steps given below: + +1. Log in to the Dashboard. +2. Navigate to **Magic Checkout**. +3. Select the platform of your e-commerce website, enter the relevant details and click **Next**. +4. Navigate to **RTO Reduction Setup** → **RTO Reduction**. +5. Toggle on **Manually review COD orders**. + +> **WARN** +> +> +> **Watch Out!** +> +> You can either opt for the automated option by enabling COD intelligence or manually review COD orders. +> + + ![Opt for Manual Review on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-enable-manual-review.jpg.md) +6. Enter the required details based on the platform of your e-commerce website to align your actions performed on the Razorpay Dashboard with your e-commerce platform. + + + No additional configuration is required to enable manual review. + + + Enter the **Consumer Key** and **Secret**. Follow the steps given below: + 1. Log in to the [WordPress account](https://wordpress.com/log-in) and navigate to **WooCommerce** → **Settings**. + 1. Navigate to **Advanced** → **REST API**. + 1. Click **Add key**. + ![REST APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-rest-api.jpg.md) + 1. Enter the required details and click **Generate API Key**. + ![Generate keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-generate-apis.jpg.md) + 1. Copy the API keys and paste them onto the Razorpay Dashboard. Click **Submit**. + ![Submit keys on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-submit-keys.jpg.md) + + + Enter the **URL to review orders API**, **User name** and **Password**. To generate the URL, click **instructions** and follow the steps. Copy the information and paste it on the Razorpay Dashboard. Click **Submit**. + ![Submit Keys on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-ecommerce-platform-submit.jpg.md) + + +6. Click **Enable manual review**. + +The COD option is enabled for all customers. You can now review the COD orders and take the necessary actions. + +## Review COD Orders +Once you enable manual review for orders, navigate to **Orders** → **COD Order Conversion** on the Razorpay Dashboard. +Under this section, you can review all the COD orders and take relevant actions. The list gets populated with orders as and when customers place an order for COD. +- You can view the **Razorpay Order ID**, **Receipt**, **Date** when the order was placed and **RTO risk** level. +- Click on a particular **Order ID** to view the **Risk Reasons**, **recommendations** and **Customer Details**. + +![Select order id to view the risk reasons, recommendations and customer details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-risk.jpg.md) + +Based on the **Risk Reasons** and our recommendation, you can take the following actions: + + +### Approve Order + + There are no changes in the order. It indicates that you have reviewed the order but chose not to take action. Click the **approve icon** to approve the order. + ![Approve order based on the risk level](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-approve-order.jpg.md) + + + +### Cancel Order + + You can cancel the order based on the risk level and our recommendation. For example, if we have noticed a high return behaviour associated with this order; we recommend cancelling the order. The order status will change to cancelled on the COD orders tab and your [e-commerce platform](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/review-cod-orders.md#e-commerce-platform). Click the **cancel icon** to cancel the order. + ![Cancel Order based on the risk level](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-cancel-order.jpg.md) + + + +### Mark Order On Hold + + It indicates that you have reviewed the order but have not decided what action to take. For example, if the address on order is incorrect, you might want to contact the customer and clarify the details. You can put the order on hold, review the order post clarification and decide if you want to approve or cancel the order. Click the **on hold icon** to put the order on hold. + ![On hold order based on the risk level](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-hold-order.jpg.md) + + +You can view the orders in the respective tabs, **Approved Orders**, **Canceled Orders** and **On Hold Orders**. +![View the order in the respective tabs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-review-orders-tabs.jpg.md) + +## E-Commerce Platform + +Based on the action on the Razorpay Dashboard, the order status changes on your e-commerce platform as well. + + +### WooCommerce Dashboard + + Refer to the order states given below: + + + Action on Razorpay Dashboard | Status on WooCommerce Dashboard + --- + Approved Orders | `Processing` + --- + Canceled Orders | `Failed` + --- + On Hold Orders | `On hold` + + + ![WooCommerce order status based on the actions on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-rto-orders-woocommerce-status.jpg.md) + + + +### Shopify Dashboard + + Refer to the order states given below: + + + Action on Razorpay Dashboard | Status on Shopify Dashboard + --- + Approved Orders | No change, remains `Paid` + --- + Canceled Orders | Strike through + --- + On Hold Orders | `hold` tag in the **Tags Section** + + + ![Shopify order status based on the actions on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-rto-orders-shopify-status.jpg.md) + + +### Related Information +[COD Review Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/review-cod-orders/workflow.md) diff --git a/llm-content/payments/magic-checkout/order-settings/review-cod-orders/workflow.md b/llm-content/payments/magic-checkout/order-settings/review-cod-orders/workflow.md new file mode 100644 index 00000000..cd5dd19c --- /dev/null +++ b/llm-content/payments/magic-checkout/order-settings/review-cod-orders/workflow.md @@ -0,0 +1,84 @@ +--- +title: COD Orders Review Workflow | Razorpay Magic Checkout +heading: COD Orders Review Workflow +description: Configure workflows to automate the actions on the COD orders based on the RTO risk level using Razorpay Magic Checkout. +--- + +# COD Orders Review Workflow + +Reviewing and acting upon COD orders manually can be time-consuming. With the automation feature, you can configure workflows to approve, hold or cancel COD orders based on the RTO risk levels. + +> **WARN** +> +> +> **Watch Out!** +> +> You can access the **COD Orders Review Workflow** feature only if you opt for [manual review of COD orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/review-cod-orders.md). +> + +## How it Works + +Follow the steps given below to configure the COD review workflow: + +1. Log in to the Dashboard. +2. Navigate to **Magic Checkout** → **Orders**. +3. In the **Manual Review of COD Orders** tab, click **Automate now**. This redirects you to the **COD Review Workflow** field in the **Setup & Settings** section. + + +> **INFO** +> +> +> **Handy Tips** +> +> **COD Review Workflow** section appears only if you opt for the manual review of COD orders. +> + +4. Select the **Type of RTO risk** and its corresponding action from the drop-down list. + ![Add risk and the corresponding action](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-automate-config.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> - You can only assign one action to each specific **Type of RTO risk**. For example, if you identify a risk as **High** and choose the action to **Cancel the order** to handle that risk, you cannot add any additional actions for that specific type of risk. +> - However, you can use the same action, such as **Cancel the order** for multiple types of RTO risks, such as **Medium risk**. +> + +5. Click **+ Add more conditions** to add more types of RTO risk and its corresponding action if required. +6. Click **Save settings**. + + +### Edit Workflow Conditions *(Optional)* + + Follow the steps given below to edit the conditions: + + 1. Log in to the Dashboard. + 2. Navigate to **Magic Checkout**. + 3. Select the platform of your ecommerce website from the drop-down list and click **Next**. + + +> **INFO** +> +> +> **Handy Tips** +> +> This feature is available for your Custom ecommerce platform, [WooCommerce website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md) and [Shopify store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md). +> + + + 3. Click **COD Review Workflow**. + 4. Click **Edit** to modify the conditions based on your requirement. + ![Edit automation conditions based on your requirement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-automate-edit.jpg.md) + 5. Click **Save settings**. + + + +### Remove a Workflow + + Follow the steps given below to remove the review workflow conditions: + + 1. In the **COD Review Workflow** section, click the cancel icon. + ![Remove Automation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-remove-automation.jpg.md) + 2. Click **Yes, Remove** to remove all the the COD review workflow conditions. diff --git a/llm-content/payments/magic-checkout/react-native-android-integration.md b/llm-content/payments/magic-checkout/react-native-android-integration.md new file mode 100644 index 00000000..b6b2132e --- /dev/null +++ b/llm-content/payments/magic-checkout/react-native-android-integration.md @@ -0,0 +1,2219 @@ +--- +title: Integrate Razorpay Magic Checkout on React Native Android App +heading: Integrate Magic Checkout on React Native Android App +description: Steps to integrate Magic Checkout on your React Native using the Razorpay React Native Android Standard SDK. +--- + +# Integrate Magic Checkout on React Native Android App + +Follow these steps to integrate the Razorpay Magic Checkout on your React Native Android application. + +#### Prerequisites + +- Create a Razorpay account. +- Generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +> **INFO** +> +> +> **Handy Tips** +> +> The **compileSdkVersion** is the version of Android. Increase the value of **minSdkVersion** to at least 19 in the build.gradle file in the Android folder to work with the latest Android SDK Build Tools version. Using it with a lower **minSdkVersion** version will lead to errors. +> + + - **1. Build Integration**: Integrate with React Native Android App. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +## 1. Build Integration + +Follow the steps given below: + +> **WARN** +> +> +> **Watch Out!** +> +> If you use M1 MacBook, you need to make [these changes](#m1-macbook-changes) in your `podfile`. +> + + +### 1.1 Enable/Disable Magic Checkout and Cash on Delivery + + + + Raise a request with your Razorpay SPOC to get this feature enabled on your account. + Once this feature is enabled, the customer address saving and coupon features are enabled. + + + Raise a request with our [Support team](https://razorpay.com/support/) to enable this feature for your account. + + + + + +### 1.2 Create Promotions and Shipping Info API Endpoints + + Follow the steps given below to create promotions and shipping info API endpoints: + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure that the URLs are publicly accessible, require no authentication and are hosted on your server. +> + + + 1. Log in to the Dashboard and navigate to **Magic Checkout**. + 2. In the **Platform Setup**, select **Custom E-Commerce Platform** from the drop-down list and click **Next**. + ![Choose custom platform](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-custom-platform.jpg.md) + 3. In the **Setup & Settings** section, click **Checkout Settings**. + 4. In the **Coupon Settings** section, enter the following: + 1. **URL for get promotions**: The API URL should return a list of promotions applicable to the specified order_id and customer. Magic Checkout uses this endpoint to fetch these promotions from your server and display them to your customers in the checkout modal. + 2. **URL for apply promotions**: The API URL validates the promotion code applied by the customer and should return the discount amount. Magic Checkout uses this endpoint to apply promotions via your server. + 5. Click **Save settings**. + ![Add promotion URLs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-web-promo-url.jpg.md) + 6. Navigate to **Shipping Setup**. + 7. Select **API** as the Shipping Service type from the drop-down list. + 8. Enter the **URL for shipping info**. The API URL should return shipping serviceability, COD serviceability, shipping fees and COD fees for a given list of customer addresses. Magic Checkout uses this endpoint to retrieve shipping information from your server. + 9. Click **Save Settings**. + ![Add shipping URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-web-shipping-url.jpg.md) + + + +### 1.3 Install Razorpay React Native SDK + + Install the SDK using the following `npm` command in the **Terminal** window. If you are using Windows, please use **Git Bash** instead of the **Command Prompt** window. Ensure that you run this code within your React Native project folder in the **Terminal** window. + + ```node:Installation Code + //using npm + $ npm install react-native-razorpay --save + ``` + + Additionally, run the code given below if you are using `yarn` or `expo`: + + ```node:Installation Code using yarn + // using yarn + $ yarn add react-native-razorpay + ``` + + ```node:Installation Code using expo + // for expo + $ npx expo install react-native-razorpay + ``` + + + +### 1.4 Run React Native App + + Run the React Native app. + + ```node: Run + npx react-native run-android + ``` + + This links the SDK with your React Native project. + + + + Expo Application + + After adding the `react-native-razorpay` package, use the option to prebuild the app. This generates the **android** platform folders in the project to use native-modules. + + ```node: Run + npx expo prebuild + ``` + + The application is installed on the device/emulator. + + ```node: + npx expo run:[android] --device + ``` + + + + + + +### 1.5 Create an Order in Server + + You can create an order using the following API and send the additional information required for Magic Checkout. Pass the `order_id` received in response to the checkout code. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + // ... other line item details + } + ] +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 50000); +orderRequest.put("currency", "INR"); +orderRequest.put("receipt", "receipt#1"); +orderRequest.put("line_items_total", 50000); // Mandatory for Magic Checkout + +JSONArray lineItems = new JSONArray(); +JSONObject item = new JSONObject(); +item.put("sku", "1g234"); +item.put("variant_id", "12r34"); +item.put("price", 50000); +item.put("offer_price", 50000); +item.put("quantity", 1); +item.put("name", "Product Name"); +// ... other line item details +lineItems.put(item); +orderRequest.put("line_items", lineItems); + +Order order = razorpay.orders.create(orderRequest); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, # Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + # ... other line item details + } + ] +} + +client.order.create(data) +```go: Go +import ( + razorpay "github.com/razorpay/razorpay-go" +) + +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": []interface{}{ + map[string]interface{}{ + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name", + // ... other line item details + }, + }, +} + +body, err := client.Order.Create(para_attr, nil) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array( + 'amount' => 50000, + 'currency' => 'INR', + 'receipt' => 'receipt#1', + 'line_items_total' => 50000, // Mandatory for Magic Checkout + 'line_items' => array( + 0 => array( + 'sku' => '1g234', + 'variant_id' => '12r34', + 'price' => 50000, + 'offer_price' => 50000, + 'quantity' => 1, + 'name' => 'Product Name', + // ... other line item details + ), + ), +)); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, # Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + # ... other line item details + } + ] +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ + key_id: 'YOUR_KEY_ID', + key_secret: 'YOUR_SECRET' +}) + +var data = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + // ... other line item details + } + ] +} + +instance.orders.create(data); +```csharp: .Net +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +orderRequest.Add("line_items_total", 50000); // Mandatory for Magic Checkout + +List lineItem = new List(); +Dictionary lineItems = new Dictionary(); +lineItems.Add("sku", "1g234"); +lineItems.Add("variant_id", "12r34"); +lineItems.Add("price", 50000); +lineItems.Add("offer_price", 50000); +lineItems.Add("quantity", 1); +lineItems.Add("name", "Product Name"); +// ... other line item details +lineItem.Add(lineItems); +orderRequest.Add("line_items", lineItem); + +Order order = client.Order.Create(orderRequest); +``` +```json: Response +{ + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071, + "line_items_total": 50000 +} +``` + + + Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Default is `INR`. Length must be of 3 characters. + +`receipt` _mandatory_ +: `string` Your receipt id for this order should be passed here. Maximum length of 40 characters. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`line_items_total` _mandatory_ +: `integer` Total of `offer_price` for all line items added to the cart, in paise. For example, if a shoe worth ₹8,000 and a shirt worth ₹10,000 are added, the `line_item_total` will be `1800000`. This amount is post-tax. + + +> **WARN** +> +> +> **Watch Out!** +> +> To ensure the order is considered as a Magic Checkout order, you must pass this parameter. Otherwise, it will default to Standard Checkout order and customers will view the Standard Checkout UI instead of Magic Checkout. Know more about [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). +> + +`line_items` _mandatory_ +: `array` This will have the details about the specific items added to the cart. + + `sku` _mandatory_ + : `string` Unique product id defined by you. It can be alphanumeric. + + `variant_id` _mandatory_ + : `string` Unique variant id defined by you. It can be alphanumeric. + + `price` _mandatory_ + : `integer` Price of the product in paise. + + `offer_price` _mandatory_ + : `integer` Final price charged to the customer in paise, after applying any adjustments, such as product discounts. + + +> **INFO** +> +> +> **Handy Tips** +> +> If no discount is applied, `price` and `offer_price` will be the same. +> + + `quantity` _mandatory_ + : `integer` Number of units added in the cart. + + `name` _mandatory_ + : `string` Name of the product. + + `description` _mandatory_ + : `string` Description of the product. + + `weight` _optional_ + : `integer` Weight of the product in grams. + + `dimensions` _optional_ + : `object` The dimensions of the product. + + `length` _optional_ + : `string` The length of the product in centimeters. + + `width` _optional_ + : `string` The width of the product in centimeters. + + `height` _optional_ + : `string` The height of the product in centimeters. + + `image_url` _mandatory_ + : `string` The URL of the product image. This parameter is mandatory if you want to display product images on our iframe. + + `product_url` _optional_ + : `string` URL of the product's listing page. + + `notes` _optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is 299, then pass `29900` in this field. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + +`line_items_total` +: `integer` Total of `offer_price` for all line items added to the cart, in paise. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + +### Pre-discount Handling + + Line items total should equal the sum of individual item prices after your discounts are applied. When applying discounts, reduce both `amount` and `line_items_total` by the same amount: + ```json: Example + { + "amount": 45000, // ₹500 - ₹50 discount = ₹450 + "line_items_total": 45000, // Must match the discounted amount + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "prediscount_applied": "5000" // Track discount in paise + }, + "line_items": [ + // ... your line items with original prices + ] + } + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> Magic Checkout automatically handles all discount calculations on the UI. The system detects differences in checkout amounts and adjusts accordingly. +> + + + + + + +### 1.6 Interact with Shipping Info API + + This API should return shipping serviceability, COD serviceability, shipping fees and COD fees for a given list of customer addresses. + + /your-server-url/shipping-info-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // This is the receipt field set in the Razorpay order + "razorpay_order_id": "EKwxwAgItmmXdp", // This is the RZP order created without the `order_` prefix + "email": "", // Email field will be set if the customer enters an email + "contact": "+919900000000", // Customer phone number with country code + "addresses": [{ + "id": "0", + "zipcode": "560060", + "state_code": "KA", + "country": "IN" + }] + } + + ```json: Response + { + "addresses": [ + { + "id": "0", + "zipcode": "560000", + "state_code": "KA", + "country": "IN", + "shipping_methods": [ + { + "id": "1", + "description": "Free shipping", + "name": "Delivery within 5 days", + "serviceable": true, + "shipping_fee": 1000, // in paise. Here 1000 = 1000 paise, which equals to ₹10 + "cod": true, + "cod_fee": 1000 // in paise. Here 1000 = 1000 paise, which equals to ₹10 + }, + { + "id": "2", + "description": "Standard Delivery", + "name": "Delivered on the same day", + "serviceable": true, + "shipping_fee": 1000, // in paise. Here 1000 = 1000 paise, which equals to ₹10 + "cod": false, + "cod_fee": 0 // in paise. Here 1000 = 1000 paise, which equals to ₹10 + } + ] + } + ] + } + ``` + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#15-create-an-order). + +`razorpay_order_id` _mandatory_ +: `string` Unique identifier for the order returned by Checkout. + +`email` _optional_ +: `string` Customer's email address. + +`contact` _mandatory_ +: `string` Customer's phone number. + +`addresses` _mandatory_ +: `array` Customer's address details. + + `id` _mandatory_ + : `string` Unique identifier of the customer's address. + + `zipcode` _mandatory_ + : `string` Customer's ZIP code. + + `state_code` _optional_ + : `string` The code of the state where the customer resides. + + `country` _mandatory_ + : `string` Country where the customer resides. The length cannot exceed 2 characters. + + + +### Response Parameters + +`addresses` _mandatory_ +: `array` Customer's address details. + + `id` _mandatory_ + : `string` Unique identifier of the customer's address. + + `zipcode` _mandatory_ + : `string` Customer's ZIP code. + + `country` _mandatory_ + : `string` Country where the customer resides. The length cannot exceed 2 characters. + + `shipping_methods` _mandatory_ + : `array` Details regarding the shipping methods. + + `id` _mandatory_ + : `string` Unique identifier of the shipping method. + + `description` + : `integer` Brief description of the shipping method. + + `name` _mandatory_ + : `string` Name of the shipping method. + + `serviceable` _mandatory_ + : `boolean` Indicates whether you deliver orders to the zipcode entered by the customer. This is based on the ZIP codes you have added in the serviceability setting on the Razorpay Dashboard. Possible values: + - `true`: Orders can be delivered to the added ZIP codes. + - `false`: Orders cannot be delivered to the added ZIP codes. + + `shipping_fee` _mandatory_ + : `integer` Shipping charge in paise applicable to be paid by the customer. + + `cod` _mandatory_ + : `boolean` Indicates whether you support cash on delivery on this order. + - `true`: COD payment method is supported. + - `false`: COD payment method is not supported. + + `cod_fee` _mandatory_ : `integer` Cash on Delivery fee charged in paise. This amount is based on the COD settings configured in your Razorpay Dashboard. + + +> **INFO** +> +> +> **Handy Tips** +> +> If the `cod` field is false, set the `cod_fee` field to 0. +> + + + + + + + +### 1.7 Interact with Get Promotions API + + This API should return the list of promotions applicable for the given `order_id` and customer. + + /your-server-url/create-promotions-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // this is the receipt field set in Razorpay order + "contact": "+919000090000", + "email": "" + }' + ```json: Response + { + "promotions": [ + { + "code": "10%OFF", + "summary": "10% off on total cart value", + "description": "10% on total cart value upto ₹300" + }, + { + "code": "500OFF", + "summary": "₹500 off on total cart value", + "description": "₹500 off on a minimum cart value of ₹1500" + } + ] + } + ``` + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#15-create-an-order). + +`contact` _optional_ +: `string` Customer's phone number. + +`email` _optional_ +: `string` Customer's email address. + + + +### Response Parameters + +`promotions` _mandatory_ +: `array` Details of the promotions created. + + `code` _mandatory_ + : `string` Unique identifier of the promotion. + + `summary` _mandatory_ + : `string` Summary about the promotion. For example, 10% off on total cart value. + + `description` _optional_ + : `string` Brief description of the promotion. For example, 10% on total cart value upto ₹300. + + + +### 1.7.1 Interact with Apply Promotions API + + This API should validate the promotion code applied by the customer and return the discount amount. + + /your-server-url/create-promotions-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // this is the receipt field set in Razorpay order + "contact": "+919000090000", + "email": "", + "code": "500OFF" + }' + + ```json: Success Response + { + "promotion": { + "reference_id": "3rvff", + "type": "offer", + "code": "500OFF", + "value": 50000, + "value_type": "fixed_amount", + "description": "New Year Sale Offer" + } + } + ```json: Failure Response + { + "failure_code": "LOGIN_REQUIRED", + "failure_reason": “promotion Code has expired" + } + ``` + + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#15-create-an-order). + +`contact` _optional_ +: `string` Customer's phone number. + +`email` _optional_ +: `string` Customer's email address. + +`code` _mandatory_ +: `string` Promotion code used to avail discount on checkout. + + + +### Response Parameters + +`promotion` _mandatory_ +: `object` Used to pass all offer or discount-related information, including promotion code discount, method discount and so on. + + `reference_id` _mandatory_ + : `string` Identifier of the offer you create. + + `code` _optional_ + : `string` Promotion code used to avail discount on checkout. + + `type` _optional_ + : `string` Type of offer. Possible values: + - `coupon`: A discount applied by customers during checkout. For example, customers can use a coupon like `Diwali Sale 500 Off` to get ₹500 off the total cart value. + - `offer`: A promotion you create for your customers. For example, you create an offer `Buy 4 t-shirts and get 2 free`. In this case, when customers add 4 t-shirts to their cart, the 2 additional t-shirts will be automatically added for free. + + `value` _optional_ + : `integer` The offer value that needs to be applied in paise. For example, if you want to offer a discount of ₹500, enter 50000. + + `value_type` _optional_ + : `string` The type of value like: + - `fixed_amount`: A fixed amount discount value in the currency of the order. For example, ₹500. + - `percentage`: A percentage discount value. For example, 10%. + - `BXGY`: Buy X and Get Y. For example, if you buy 2 t-shirts, you a get a cap for free or at a discounted value. + + +> **INFO** +> +> +> **Handy Tips** +> +> Regardless of the `value_type`, the amount specified in the `value` parameter is applied as-is. For example, if `value_type` is percentage and the `value` is 5000, 5000 is considered in currency subunits (paise). +> + + + `description` _optional_ + : `string` Description of the promotion applied. For example, `New Year Sale Offer`. + + + +### Error Code, Description and Next Steps + + + Code | Description | Next Steps + --- + INVALID_PROMOTION | The specified promotion code is not recognised or does not exist in the system. | Please verify the code and try again. + --- + LOGIN_REQUIRED | This coupon is specifically assigned to a registered customer. | To redeem it, the customer must log in to their account and authenticate their identity. + --- + REQUIREMENT_NOT_MET | The current cart conditions do not meet the requirements for this promotion to be valid. For example, the promotion may require a minimum cart value of ₹1,000, but the cart total is ₹800. | Review the promotion's terms and adjust the cart contents accordingly. + + + + + + + + + + + +### 1.8 Add Razorpay Checkout Options to .js File + + To integrate the Razorpay Checkout with your React Native app, you must add the Checkout Display Options in the **.js** file. + + Open the **.js** file in your project folder and perform the following: + + 1. Import the `RazorpayCheckout` module to your component. + + ```js: Import Razorpay Checkout Module + import RazorpayCheckout from 'react-native-razorpay'; + ``` + + 2. Call the `RazorpayCheckout.open` method with the payment options. The method returns a JS Promise where the `then` part corresponds to a successful payment and the `catch` part corresponds to payment failure. + + Add the following code: + + ```Javascript: Checkout Options + { + var options = { + description: 'Credits towards consultation', + image: 'https://i.imgur.com/3g7nmJC.jpg', + currency: '', + key: '', + amount: '50000', + name: 'Acme Corp', + order_id: 'order_DslnoIgkIDL8Zt',//Replace this with an order_id created using Orders API. + prefill: { + email: '', + contact: '9191919191', + name: '' + }, + one_click_checkout: true, // magic checkout + show_coupons: true, // magic checkout + theme: {color: '#53a20e'} + } + RazorpayCheckout.open(options).then((data) => { + // handle success + alert(`Success: ${data.razorpay_payment_id}`); + }).catch((error) => { + // handle failure + alert(`Error: ${error.code} | ${error.description}`); + }); + }}> + ``` + + + + Checkout Options + + `key` _mandatory_ +: `string` API key id generated from the Dashboard. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `50000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. Length must be of 3 characters. + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order id generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `cod` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`show_coupons` _optional_ +: `boolean` Determines whether to show the coupons to customer on the checkout. Possible values: + - `true` (default): Enables the Coupon feature. + - `false`: Disables the Coupon feature. + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + You must pass these parameters in Checkout to initiate the payment. + + +> **WARN** +> +> +> +> **Watch Out!** +> +> To support theme colour in the progress bar, please pass HEX colour values only. +> + + + + + + + +### 1.9 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.10 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + +### M1 MacBook Changes + + If you use M1 MacBook, you need to make the following changes in your podfile. + + +> **INFO** +> +> +> **Handy Tips** +> +> Add the following code inside `post_install do |installer|`. +> + + ```js: podfile + installer.pods_project.build_configurations.each do |config| + config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" + end + ``` + + + + + + +### 1.11 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +### 1.12 Perform Post Payment Processing + + Based on the response, you can handle post-payment processing on your end. + +> **WARN** +> +> +> **Timeout Handling** +> +> If no API call is made within 45 seconds, our background job will assume there is a network drop off and will proceed to place the order on Shopify automatically. +> + + + Fetch an Order + + Use the Fetch Orders API to retrieve order details, including customer information, address, shipping method and promotions of a particular order: + + v1/orders/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ + -X GET https://api.razorpay.com/v1/orders/order_R1yDkxyIuKXXXX \ + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + import com.razorpay.Order; + import com.razorpay.RazorpayClient; + import com.razorpay.RazorpayException; + try { + Order order = razorpay.Orders.fetch(""); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + # do easy_install razorpay or + # pip install razorpay + + import razorpay + razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]")) + + order_id = + resp = client.order.fetch(order_id) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->fetch($orderId); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('key_id', 'key_secret') + + order = Razorpay::Order.fetch('order_R1yDkxyIuKXXXX') + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.fetch(orderId) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("", "") + + body, err := client.Order.Fetch("", nil, nil) + ``` + ```json: Response: COD Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 507000, + "amount_paid": 0, + "amount_due": 507000, + "currency": "INR", + "receipt": "#30567", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "placed", + "attempts": 0, + "notes": { + "cart_id": "hWN2Am4BGnQrizKE3hzeQaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/hf5Q?key=14bbbce35b8", + "shopify_order_id": "6302119854247" + }, + "created_at": 1756045901, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 5000, + "shipping_fee": 7000, + "customer_details": { + "contact": "+919100000000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + }, + "billing_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + } + }, + "line_items_total": 600000, + "tax_details": { + "total_tax": 4128, + "taxes_included": true + } + } + ```json: Response: Prepaid Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 100700, + "amount_paid": 100700, + "amount_due": 0, + "currency": "INR", + "receipt": "#30414", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "paid", + "attempts": 1, + "notes": { + "cart_id": "hWN1TcwL?key=1a3a5a7c", + "storefront_id": "gid://shopify/Cart/hIkey=af7c7800", + "flits_cart_token": "hWcwL?key=1a3741dc_8740f5_175447", + "shopify_order_id": "6266036191399" + }, + "created_at": 1754466155, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 0, + "shipping_fee": 700, + "customer_details": { + "billing_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "billing_address", + "zipcode": "110057" + }, + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "shipping_address", + "zipcode": "110057" + } + }, + "line_items_total": 110000, + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + Know more about the [Orders API.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) + + +> **INFO** +> +> +> **Order Status** +> +> Check the order status for the following: +> +> - Prepaid orders: `paid`. +> - COD orders: `placed`. +> + + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the order to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the order. For example, `order_R1yDkxyIuKXXXX`. + +`entity` +: `string` Type of entity. Value is `order`. + +`amount` +: `integer` Total order amount in the smallest currency unit (paise). + +`amount_paid` +: `integer` Amount paid towards the order in paise. For prepaid orders, this shows the actual amount paid. For COD orders, this is `0` until payment is collected. + +`amount_due` +: `integer` Outstanding amount due in paise. For prepaid orders, this shows any remaining balance. For COD orders, this equals the `amount` field until payment is collected. + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`receipt` +: `string` Receipt identifier for internal reference. For example, `#30567`. + +`offers` +: `array` Array of offer IDs applied to the order. + +`status` +: `string` Current status of the order. Possible values: + - `placed`: Order placed but payment pending (COD orders). + - `paid`: Order placed and payment completed (prepaid orders). + - `cancelled`: Order cancelled. + - `refunded`: Order refunded. + +`attempts` +: `integer` Number of payment attempts made for this order. For example, `1`. + +`notes` +: `object` Custom notes added to the order containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `shopify_order_id` + : `string` Shopify order reference. + + `flits_cart_token` + : `string` Flits integration token (optional). + +`created_at` +: `integer` Unix timestamp indicating when the order was created. For example, `1756045901`. + +`description` +: `string|null` Order description. Returns `null` if no description is provided. + +`checkout` +: `string|null` Checkout identifier. Returns `null` if not applicable. + +`promotions` +: `array` Array of promotion objects applied to the order. + + `code` + : `string` Promotion code used. For example, `orderOff`. + + `type` + : `string` Type of promotion. For example, `cart_value`. + + `value` + : `integer` Discount value in paise. For example, `10000` for ₹100. + + `description` + : `string` Human-readable promotion description. + + `reference_id` + : `string` Internal reference for the promotion. + +`cod_fee` +: `integer` Cash on Delivery charges in paise. For COD orders, this contains the fee amount (for example, `5000` for ₹50). For prepaid orders, this is `0`. + +`shipping_fee` +: `integer` Shipping charges in paise. For example, `700` for ₹7. + +`customer_details` +: `object` Customer information. + + `contact` + : `string` Customer's phone number. + + `email` + : `string` Customer's email address. + + `shipping_address` + : `object` Complete shipping address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for delivery. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Recipient name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `shipping_address`. + + `zipcode` + : `string` Postal code. + + `billing_address` + : `object` Complete billing address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for billing. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Account holder name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `billing_address`. + + `zipcode` + : `string` Postal code. + +`line_items_total` +: `integer` Total value of line items in paise before adding shipping fees and COD fees, after applying promotions. For example, `60000` for ₹600. + +`tax_details` +: `object` Tax information. + + `total_tax` + : `integer` Total tax amount in paise. For example, `4128`. + + `taxes_included` + : `boolean` Indicates whether taxes are included in the item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### Fetch a Payment + + Use the Fetch Payments API to retrieve comprehensive payment details, including transaction status, payment method, customer information, settlement details, and the associated order information for a specific payment: + + v1/payments/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X GET https://api.razorpay.com/v1/payments/pay_R1yFlWQar3XXXX + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String paymentId = "pay_R1yFlWQar3XXXX"; + + Payment payment = razorpay.payments.fetch(paymentId); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.payment.fetch(paymentId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + paymentId := "pay_R1yFlWQar3XXXX" + + body, err := client.Payment.Fetch(paymentId, nil, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->payment->fetch($paymentId); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + paymentId = "pay_R1yFlWQar3XXXX" + + Razorpay::Payment.fetch(paymentId) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.payments.fetch(paymentId) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + Payment payment = client.Payment.Fetch(paymentId); + ``` + + ```json: Response: COD Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 55700, + "currency": "INR", + "status": "pending", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "cod", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919100000000", + "notes": { + "cart_id": "hWN2QaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/h?key=14bbf59ce35b8" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1756046099, + "receiver_type": null + } + ```json: Response: Prepaid Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 90630, + "currency": "INR", + "status": "captured", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "cart_id": "hWNsVrcwL?key=1a3a457ddc", + "storefront_id": "gid://shopify/Cart/hWv3e8?key=af707", + "flits_cart_token": "hWrcwL?key=1a3a5a70f5_17547", + "optimizer_provider_name": "razorpay" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "727947422583", + "upi_transaction_id": "1F723677C679EF578A95" + }, + "created_at": 1754466271, + "receiver_type": null, + "upi": { + "vpa": "gaurav.kumar@exampleupi" + } + } + ``` + + Know more about the [Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md). + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. For example, `pay_R1yFlWQar3XXXX`. + +`entity` +: `string` Type of entity. Value is `payment`. + +`amount` +: `integer` Payment amount in the smallest currency unit (paise). For COD payments, this includes the COD fee (for example, `55700` for ₹557). For prepaid payments, this equals the captured amount (for example, `90630` for ₹906.30). + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`status` +: `string` Current status of the payment. Possible values: + - `pending`: Payment pending collection (COD orders). + - `captured`: Payment successfully captured (prepaid orders). + - `authorized`: Payment authorized but not captured. + - `failed`: Payment attempt failed. + +`order_id` +: `string` Unique identifier of the associated order. For example, `order_R1yDkxyIuKXXXX`. + +`invoice_id` +: `string|null` Unique identifier of the associated invoice. Returns `null` if no invoice is linked. + +`international` +: `boolean` Indicates whether this is an international payment. Possible values: + - `true`: International payment. + - `false`: Domestic payment. + +`method` +: `string` Payment method used. Possible values include: + - `cod` + - `upi` + - `card` + - `netbanking` + - `wallet` + +`amount_refunded` +: `integer` Amount refunded in paise. For example, `0` indicates no refund has been processed. + +`refund_status` +: `string|null` Current refund status. Returns `null` if no refund is applicable. Possible values: + - `partial`: Partial refund processed. + - `full`: Full refund processed. + +`captured` +: `boolean` Indicates whether the payment has been captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string|null` Payment description. Returns `null` if no description is provided. + +`card_id` +: `string|null` Unique identifier of the card used for payment. Returns `null` for non-card payments. + +`bank` +: `string|null` Bank identifier for netbanking payments. Returns `null` for other payment methods. + +`wallet` +: `string|null` Wallet provider identifier. Returns `null` for non-wallet payments. + +`vpa` +: `string|null` Virtual Payment Address for UPI payments. For example, `gaurav.kumar@exampleupi`. Returns `null` for non-UPI payments. + +`email` +: `string` Customer's email address. + +`contact` +: `string` Customer's phone number. + +`notes` +: `object` Custom notes added to the payment containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `flits_cart_token` + : `string` Flits integration token (optional). + + `optimizer_provider_name` + : `string` Payment optimizer provider name (optional). + +`fee` +: `integer|null` Processing fee charged in paise. For example, `0` indicates no fee. Returns `null` for COD payments. + +`tax` +: `integer|null` Tax amount on processing fee in paise. For example, `0` indicates no tax. Returns `null` for COD payments. + +`error_code` +: `string|null` Error code if payment failed. Returns `null` for successful payments. + +`error_description` +: `string|null` Human-readable error description. Returns `null` for successful payments. + +`error_source` +: `string|null` Source of the error. Returns `null` for successful payments. + +`error_step` +: `string|null` Step at which error occurred. Returns `null` for successful payments. + +`error_reason` +: `string|null` Reason for the error. Returns `null` for successful payments. + +`acquirer_data` +: `object` Data from the payment acquirer. + + `rrn` + : `string` Retrieval Reference Number from the acquirer (optional). + + `upi_transaction_id` + : `string` UPI transaction identifier from the acquirer (optional). + +`created_at` +: `integer` Unix timestamp indicating when the payment was created. For example, `1756046099`. + +`receiver_type` +: `string|null` Type of receiver for the payment. Returns `null` if not applicable. + +`upi` +: `object` UPI-specific payment details (only present for UPI payments). + + `vpa` + : `string` Virtual Payment Address used for the UPI payment. + + + + + + + + + + +## 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +You can make test payments using one of the payment methods configured at the Checkout. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + + +### Supported Payment Methods + + Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + + + Payment Method | Code | Availability + --- + [Cash on Delivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md) | `cod` | Requires [Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md#prerequisites). + --- + [Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ + --- + [Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ + --- + [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ + --- + [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ + --- + EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ + --- + [Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ + --- + [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). + --- + [Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. + --- + [Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + + + ### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + ### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the following lists: + - [Supported UPI Flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + - [UPI Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/upi.md). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + ### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + #### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + - [Test Error Scenarios](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards). + + #### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + ### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## 3. Go-live Checklist + +Check the go-live checklist for Razorpay Magic Checkout integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + +## Related Information + +[React Native: Android Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/react-native-integration/standard/integration-steps-android.md) diff --git a/llm-content/payments/magic-checkout/react-native-ios-integration.md b/llm-content/payments/magic-checkout/react-native-ios-integration.md new file mode 100644 index 00000000..657caf8e --- /dev/null +++ b/llm-content/payments/magic-checkout/react-native-ios-integration.md @@ -0,0 +1,2296 @@ +--- +title: Integrate Razorpay Magic Checkout on React Native iOS App +heading: Integrate Magic Checkout on React Native iOS App +description: Steps to integrate Magic Checkout on your React Native iOS app using the Razorpay React Native iOS Standard SDK. +--- + +# Integrate Magic Checkout on React Native iOS App + +Follow these steps to integrate the Razorpay Magic Checkout on your React Native iOS application. + +#### Prerequisites + +- Create a Razorpay account. +- Generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **1. Build Integration**: Integrate with React Native iOS App. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +## 1. Build Integration + +Follow the steps given below: + +> **WARN** +> +> +> **Watch Out!** +> +> If you use M1 MacBook, you need to make [these changes](#m1-macbook-changes) in your `podfile`. +> + + +### 1.1 Enable/Disable Magic Checkout and Cash on Delivery + + + + Raise a request with your Razorpay SPOC to get this feature enabled on your account. + Once this feature is enabled, the customer address saving and coupon features are enabled. + + + Raise a request with our [Support team](https://razorpay.com/support/) to enable this feature for your account. + + + + + +### 1.2 Create Promotions and Shipping Info API Endpoints + + Follow the steps given below to create promotions and shipping info API endpoints: + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure that the URLs are publicly accessible, require no authentication and are hosted on your server. +> + + + 1. Log in to the Dashboard and navigate to **Magic Checkout**. + 2. In the **Platform Setup**, select **Custom E-Commerce Platform** from the drop-down list and click **Next**. + ![Choose custom platform](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-custom-platform.jpg.md) + 3. In the **Setup & Settings** section, click **Checkout Settings**. + 4. In the **Coupon Settings** section, enter the following: + 1. **URL for get promotions**: The API URL should return a list of promotions applicable to the specified order_id and customer. Magic Checkout uses this endpoint to fetch these promotions from your server and display them to your customers in the checkout modal. + 2. **URL for apply promotions**: The API URL validates the promotion code applied by the customer and should return the discount amount. Magic Checkout uses this endpoint to apply promotions via your server. + 5. Click **Save settings**. + ![Add promotion URLs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-web-promo-url.jpg.md) + 6. Navigate to **Shipping Setup**. + 7. Select **API** as the Shipping Service type from the drop-down list. + 8. Enter the **URL for shipping info**. The API URL should return shipping serviceability, COD serviceability, shipping fees and COD fees for a given list of customer addresses. Magic Checkout uses this endpoint to retrieve shipping information from your server. + 9. Click **Save Settings**. + ![Add shipping URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-web-shipping-url.jpg.md) + + + +### 1.3 Install Razorpay React Native SDK + + Install the SDK using the following `npm` command in the **Terminal** window. If you are using Windows, please use **Git Bash** instead of the **Command Prompt** window. Ensure that you run this code within your React Native project folder in **Terminal** window. + + ```node:Installation Code + //using npm + $ npm install react-native-razorpay --save + ``` + + Additionally, run the code given below if you are using `yarn` or `expo`: + + ```node:Installation Code using yarn + // using yarn + $ yarn add react-native-razorpay + ``` + + ```node:Installation Code using expo + // for expo + $ npx expo install react-native-razorpay + ``` + + + +### 1.4 Open Podfile and Update Platform Version + + Navigate to the **ios** folder and open **Podfile**. You can do this using the following code. + + ```node: Open Podfile + $ cd ios && open podfile + ``` + + Change the platform version from `9.0` to `10.0` in the Podfile. + + ![](/docs/assets/images/react-native-change_platform_version_podfile.jpg) + + + +### 1.5 Install Pods Using Cocoapods + + Install pods after updating the iOS platform. This will install all pods in the Podfile at the exact versions. + + ```node: Cocoapod Step + pod install && cd .. + ``` + + + +### 1.6 Run React Native App + + Run the React Native app. + + ```node: Run App + npx react-native run-ios + ``` + + + + Expo Application + + After adding the `react-native-razorpay` package, use the option to prebuild the app. This generates the **iOS** platform folders in the project to use native-modules. + + ```node: Run + npx expo prebuild + ``` + + The application is installed on the device/emulator. + + ```node: + npx expo run:[ios] --device + ``` + + + + + + +### 1.7 Create an Order in Server + + You can create an order using the following API and send the additional information required for Magic Checkout. Pass the `order_id` received in response to the checkout code. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + // ... other line item details + } + ] +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 50000); +orderRequest.put("currency", "INR"); +orderRequest.put("receipt", "receipt#1"); +orderRequest.put("line_items_total", 50000); // Mandatory for Magic Checkout + +JSONArray lineItems = new JSONArray(); +JSONObject item = new JSONObject(); +item.put("sku", "1g234"); +item.put("variant_id", "12r34"); +item.put("price", 50000); +item.put("offer_price", 50000); +item.put("quantity", 1); +item.put("name", "Product Name"); +// ... other line item details +lineItems.put(item); +orderRequest.put("line_items", lineItems); + +Order order = razorpay.orders.create(orderRequest); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, # Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + # ... other line item details + } + ] +} + +client.order.create(data) +```go: Go +import ( + razorpay "github.com/razorpay/razorpay-go" +) + +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": []interface{}{ + map[string]interface{}{ + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name", + // ... other line item details + }, + }, +} + +body, err := client.Order.Create(para_attr, nil) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array( + 'amount' => 50000, + 'currency' => 'INR', + 'receipt' => 'receipt#1', + 'line_items_total' => 50000, // Mandatory for Magic Checkout + 'line_items' => array( + 0 => array( + 'sku' => '1g234', + 'variant_id' => '12r34', + 'price' => 50000, + 'offer_price' => 50000, + 'quantity' => 1, + 'name' => 'Product Name', + // ... other line item details + ), + ), +)); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, # Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + # ... other line item details + } + ] +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ + key_id: 'YOUR_KEY_ID', + key_secret: 'YOUR_SECRET' +}) + +var data = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + // ... other line item details + } + ] +} + +instance.orders.create(data); +```csharp: .Net +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +orderRequest.Add("line_items_total", 50000); // Mandatory for Magic Checkout + +List lineItem = new List(); +Dictionary lineItems = new Dictionary(); +lineItems.Add("sku", "1g234"); +lineItems.Add("variant_id", "12r34"); +lineItems.Add("price", 50000); +lineItems.Add("offer_price", 50000); +lineItems.Add("quantity", 1); +lineItems.Add("name", "Product Name"); +// ... other line item details +lineItem.Add(lineItems); +orderRequest.Add("line_items", lineItem); + +Order order = client.Order.Create(orderRequest); +``` +```json: Response +{ + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071, + "line_items_total": 50000 +} +``` + + + Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Default is `INR`. Length must be of 3 characters. + +`receipt` _mandatory_ +: `string` Your receipt id for this order should be passed here. Maximum length of 40 characters. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`line_items_total` _mandatory_ +: `integer` Total of `offer_price` for all line items added to the cart, in paise. For example, if a shoe worth ₹8,000 and a shirt worth ₹10,000 are added, the `line_item_total` will be `1800000`. This amount is post-tax. + + +> **WARN** +> +> +> **Watch Out!** +> +> To ensure the order is considered as a Magic Checkout order, you must pass this parameter. Otherwise, it will default to Standard Checkout order and customers will view the Standard Checkout UI instead of Magic Checkout. Know more about [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). +> + +`line_items` _mandatory_ +: `array` This will have the details about the specific items added to the cart. + + `sku` _mandatory_ + : `string` Unique product id defined by you. It can be alphanumeric. + + `variant_id` _mandatory_ + : `string` Unique variant id defined by you. It can be alphanumeric. + + `price` _mandatory_ + : `integer` Price of the product in paise. + + `offer_price` _mandatory_ + : `integer` Final price charged to the customer in paise, after applying any adjustments, such as product discounts. + + +> **INFO** +> +> +> **Handy Tips** +> +> If no discount is applied, `price` and `offer_price` will be the same. +> + + `quantity` _mandatory_ + : `integer` Number of units added in the cart. + + `name` _mandatory_ + : `string` Name of the product. + + `description` _mandatory_ + : `string` Description of the product. + + `weight` _optional_ + : `integer` Weight of the product in grams. + + `dimensions` _optional_ + : `object` The dimensions of the product. + + `length` _optional_ + : `string` The length of the product in centimeters. + + `width` _optional_ + : `string` The width of the product in centimeters. + + `height` _optional_ + : `string` The height of the product in centimeters. + + `image_url` _mandatory_ + : `string` The URL of the product image. This parameter is mandatory if you want to display product images on our iframe. + + `product_url` _optional_ + : `string` URL of the product's listing page. + + `notes` _optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is 299, then pass `29900` in this field. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + +`line_items_total` +: `integer` Total of `offer_price` for all line items added to the cart, in paise. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + +### Pre-discount Handling + + Line items total should equal the sum of individual item prices after your discounts are applied. When applying discounts, reduce both `amount` and `line_items_total` by the same amount: + ```json: Example + { + "amount": 45000, // ₹500 - ₹50 discount = ₹450 + "line_items_total": 45000, // Must match the discounted amount + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "prediscount_applied": "5000" // Track discount in paise + }, + "line_items": [ + // ... your line items with original prices + ] + } + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> Magic Checkout automatically handles all discount calculations on the UI. The system detects differences in checkout amounts and adjusts accordingly. +> + + + + + + +### 1.8 Interact with Shipping Info API + + This API should return shipping serviceability, COD serviceability, shipping fees and COD fees for a given list of customer addresses. + + /your-server-url/shipping-info-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // This is the receipt field set in the Razorpay order + "razorpay_order_id": "EKwxwAgItmmXdp", // This is the RZP order created without the `order_` prefix + "email": "", // Email field will be set if the customer enters an email + "contact": "+919900000000", // Customer phone number with country code + "addresses": [{ + "id": "0", + "zipcode": "560060", + "state_code": "KA", + "country": "IN" + }] + } + + ```json: Response + { + "addresses": [ + { + "id": "0", + "zipcode": "560000", + "state_code": "KA", + "country": "IN", + "shipping_methods": [ + { + "id": "1", + "description": "Free shipping", + "name": "Delivery within 5 days", + "serviceable": true, + "shipping_fee": 1000, // in paise. Here 1000 = 1000 paise, which equals to ₹10 + "cod": true, + "cod_fee": 1000 // in paise. Here 1000 = 1000 paise, which equals to ₹10 + }, + { + "id": "2", + "description": "Standard Delivery", + "name": "Delivered on the same day", + "serviceable": true, + "shipping_fee": 1000, // in paise. Here 1000 = 1000 paise, which equals to ₹10 + "cod": false, + "cod_fee": 0 // in paise. Here 1000 = 1000 paise, which equals to ₹10 + } + ] + } + ] + } + ``` + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#17-create-an-order). + +`razorpay_order_id` _mandatory_ +: `string` Unique identifier for the order returned by Checkout. + +`email` _optional_ +: `string` Customer's email address. + +`contact` _mandatory_ +: `string` Customer's phone number. + +`addresses` _mandatory_ +: `array` Customer's address details. + + `id` _mandatory_ + : `string` Unique identifier of the customer's address. + + `zipcode` _mandatory_ + : `string` Customer's ZIP code. + + `state_code` _optional_ + : `string` The code of the state where the customer resides. + + `country` _mandatory_ + : `string` Country where the customer resides. The length cannot exceed 2 characters. + + + +### Response Parameters + +`addresses` _mandatory_ +: `array` Customer's address details. + + `id` _mandatory_ + : `string` Unique identifier of the customer's address. + + `zipcode` _mandatory_ + : `string` Customer's ZIP code. + + `country` _mandatory_ + : `string` Country where the customer resides. The length cannot exceed 2 characters. + + `shipping_methods` _mandatory_ + : `array` Details regarding the shipping methods. + + `id` _mandatory_ + : `string` Unique identifier of the shipping method. + + `description` + : `integer` Brief description of the shipping method. + + `name` _mandatory_ + : `string` Name of the shipping method. + + `serviceable` _mandatory_ + : `boolean` Indicates whether you deliver orders to the zipcode entered by the customer. This is based on the ZIP codes you have added in the serviceability setting on the Razorpay Dashboard. Possible values: + - `true`: Orders can be delivered to the added ZIP codes. + - `false`: Orders cannot be delivered to the added ZIP codes. + + `shipping_fee` _mandatory_ + : `integer` Shipping charge in paise applicable to be paid by the customer. + + `cod` _mandatory_ + : `boolean` Indicates whether you support cash on delivery on this order. + - `true`: COD payment method is supported. + - `false`: COD payment method is not supported. + + `cod_fee` _mandatory_ : `integer` Cash on Delivery fee charged in paise. This amount is based on the COD settings configured in your Razorpay Dashboard. + + +> **INFO** +> +> +> **Handy Tips** +> +> If the `cod` field is false, set the `cod_fee` field to 0. +> + + + + + + + +### 1.9 Interact with Get Promotions API + + This API should return the list of promotions applicable for the given `order_id` and customer. + + /your-server-url/create-promotions-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // this is the receipt field set in Razorpay order + "contact": "+919000090000", + "email": "" + }' + ```json: Response + { + "promotions": [ + { + "code": "10%OFF", + "summary": "10% off on total cart value", + "description": "10% on total cart value upto ₹300" + }, + { + "code": "500OFF", + "summary": "₹500 off on total cart value", + "description": "₹500 off on a minimum cart value of ₹1500" + } + ] + } + ``` + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#17-create-an-order). + +`contact` _optional_ +: `string` Customer's phone number. + +`email` _optional_ +: `string` Customer's email address. + + + +### Response Parameters + +`promotions` _mandatory_ +: `array` Details of the promotions created. + + `code` _mandatory_ + : `string` Unique identifier of the promotion. + + `summary` _mandatory_ + : `string` Summary about the promotion. For example, 10% off on total cart value. + + `description` _optional_ + : `string` Brief description of the promotion. For example, 10% on total cart value upto ₹300. + + + +### 1.9.1 Interact with Apply Promotions API + + This API should validate the promotion code applied by the customer and return the discount amount. + + /your-server-url/create-promotions-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // this is the receipt field set in Razorpay order + "contact": "+919000090000", + "email": "", + "code": "500OFF" + }' + + ```json: Success Response + { + "promotion": { + "reference_id": "3rvff", + "type": "offer", + "code": "500OFF", + "value": 50000, + "value_type": "fixed_amount", + "description": "New Year Sale Offer" + } + } + ```json: Failure Response + { + "failure_code": "LOGIN_REQUIRED", + "failure_reason": “promotion Code has expired" + } + ``` + + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#17-create-an-order). + +`contact` _optional_ +: `string` Customer's phone number. + +`email` _optional_ +: `string` Customer's email address. + +`code` _mandatory_ +: `string` Promotion code used to avail discount on checkout. + + + +### Response Parameters + +`promotion` _mandatory_ +: `object` Used to pass all offer or discount-related information, including promotion code discount, method discount and so on. + + `reference_id` _mandatory_ + : `string` Identifier of the offer you create. + + `code` _optional_ + : `string` Promotion code used to avail discount on checkout. + + `type` _optional_ + : `string` Type of offer. Possible values: + - `coupon`: A discount applied by customers during checkout. For example, customers can use a coupon like `Diwali Sale 500 Off` to get ₹500 off the total cart value. + - `offer`: A promotion you create for your customers. For example, you create an offer `Buy 4 t-shirts and get 2 free`. In this case, when customers add 4 t-shirts to their cart, the 2 additional t-shirts will be automatically added for free. + + `value` _optional_ + : `integer` The offer value that needs to be applied in paise. For example, if you want to offer a discount of ₹500, enter 50000. + + `value_type` _optional_ + : `string` The type of value like: + - `fixed_amount`: A fixed amount discount value in the currency of the order. For example, ₹500. + - `percentage`: A percentage discount value. For example, 10%. + - `BXGY`: Buy X and Get Y. For example, if you buy 2 t-shirts, you a get a cap for free or at a discounted value. + + +> **INFO** +> +> +> **Handy Tips** +> +> Regardless of the `value_type`, the amount specified in the `value` parameter is applied as-is. For example, if `value_type` is percentage and the `value` is 5000, 5000 is considered in currency subunits (paise). +> + + + `description` _optional_ + : `string` Description of the promotion applied. For example, `New Year Sale Offer`. + + + +### Error Code, Description and Next Steps + + + Code | Description | Next Steps + --- + INVALID_PROMOTION | The specified promotion code is not recognised or does not exist in the system. | Please verify the code and try again. + --- + LOGIN_REQUIRED | This coupon is specifically assigned to a registered customer. | To redeem it, the customer must log in to their account and authenticate their identity. + --- + REQUIREMENT_NOT_MET | The current cart conditions do not meet the requirements for this promotion to be valid. For example, the promotion may require a minimum cart value of ₹1,000, but the cart total is ₹800. | Review the promotion's terms and adjust the cart contents accordingly. + + + + + + + + + + + +### 1.10 Add Razorpay Checkout Options to .js File + + To integrate the Razorpay Checkout with your React Native app, you must add the Checkout Display Options in the **.js** file. + + Open the **.js** file in your project folder and perform the following: + + 1. Import the `RazorpayCheckout` module to your component. + + ```js: Import Razorpay Checkout Module + import RazorpayCheckout from 'react-native-razorpay'; + ``` + 2. Call the `RazorpayCheckout.open` method with the payment options. The method returns a JS Promise where the `then` part corresponds to a successful payment and the `catch` part corresponds to payment failure. + + ```Javascript: Checkout Options + { + var options = { + description: 'Credits towards consultation', + image: 'https://i.imgur.com/3g7nmJC.jpg', + currency: '', + key: '', + amount: '50000', + name: 'Acme Corp', + order_id: 'order_DslnoIgkIDL8Zt',// Replace this with an order_id created using Orders API. + prefill: { + email: '', + contact: '9191919191', + name: '' + }, + one_click_checkout: true, // magic checkout + show_coupons: true, // magic checkout + theme: {color: '#53a20e'} + } + RazorpayCheckout.open(options).then((data) => { + // handle success + alert(`Success: ${data.razorpay_payment_id}`); + }).catch((error) => { + // handle failure + alert(`Error: ${error.code} | ${error.description}`); + }); + }}> + ``` + + + Checkout Options + + `key` _mandatory_ +: `string` API key id generated from the Dashboard. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `50000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. Length must be of 3 characters. + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order id generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `cod` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`show_coupons` _optional_ +: `boolean` Determines whether to show the coupons to customer on the checkout. Possible values: + - `true` (default): Enables the Coupon feature. + - `false`: Disables the Coupon feature. + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + You must pass these parameters in Checkout to initiate the payment. + + + +### 1.10.1 Enable UPI Intent on iOS *(Optional)* + + Provide your customers with a better payment experience by enabling UPI Intent on your app's Checkout form. In the UPI Intent flow: +1. Customer selects UPI as the payment method in your iOS app. A list of UPI apps supporting the intent flow is displayed. For example, PhonePe, Google Pay and Paytm. +2. Customer selects the preferred app. The UPI app opens with pre-populated payment details. +3. Customer enters their UPI PIN to complete their transactions. +4. Once the payment is successful, the customer is redirected to your app or website. + +To enable this in your iOS integration, you must make the following changes in your app's info.plist file. + +```xml: info.plist +LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + +``` + +Know more about [UPI Intent and its benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). + +### UPI Intent on Recurring Payments + +Configure and initiate a recurring payment transaction on UPI Intent: + +```swift: ViewController.swift +let options: [String:Any] = [ + "key": "YOUR_KEY_ID", + "order_id": "order_DBJOWzybfXXXX", + "customer_id": "cust_BtQNqzmBlXXXX", + "prefill": [ + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + ], + "image": "https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + "amount": 10000, // Amount should match the order amount + "currency": "INR", + "recurring": 1 // This key value pair is mandatory for Intent Recurring Payment. +] +```objectivec: ViewController.m +NSDictionary *options = @{ + @"key": @"YOUR_KEY_ID", + @"order_id": @"order_DBJOWzybfXXXX", + @"customer_id": @"cust_BtQNqzmBlXXXX", + @"prefill": @{ + @"contact": @"+919000090000", + @"email": @"gaurav.kumar@example.com" + }, + @"image": @"https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + @"amount": @(10000), // Amount should match the order amount + @"currency": @"INR", + @"recurring": @(1) // This key value pair is mandatory for Intent Recurring Payment. +}; +``` + + + + + + + +### 1.11 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.12 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + +### M1 MacBook Changes + + If you use M1 MacBook, you need to make the following changes in your podfile. + + +> **INFO** +> +> +> **Handy Tips** +> +> Add the following code inside `post_install do |installer|`. +> + + ```js: podfile + installer.pods_project.build_configurations.each do |config| + config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" + end + ``` + + + + + + +### 1.13 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +### 1.14 Perform Post Payment Processing + + Based on the response, you can handle post-payment processing on your end. + +> **WARN** +> +> +> **Timeout Handling** +> +> If no API call is made within 45 seconds, our background job will assume there is a network drop off and will proceed to place the order on Shopify automatically. +> + + + Fetch an Order + + Use the Fetch Orders API to retrieve order details, including customer information, address, shipping method and promotions of a particular order: + + v1/orders/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ + -X GET https://api.razorpay.com/v1/orders/order_R1yDkxyIuKXXXX \ + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + import com.razorpay.Order; + import com.razorpay.RazorpayClient; + import com.razorpay.RazorpayException; + try { + Order order = razorpay.Orders.fetch(""); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + # do easy_install razorpay or + # pip install razorpay + + import razorpay + razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]")) + + order_id = + resp = client.order.fetch(order_id) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->fetch($orderId); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('key_id', 'key_secret') + + order = Razorpay::Order.fetch('order_R1yDkxyIuKXXXX') + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.fetch(orderId) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("", "") + + body, err := client.Order.Fetch("", nil, nil) + ``` + ```json: Response: COD Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 507000, + "amount_paid": 0, + "amount_due": 507000, + "currency": "INR", + "receipt": "#30567", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "placed", + "attempts": 0, + "notes": { + "cart_id": "hWN2Am4BGnQrizKE3hzeQaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/hf5Q?key=14bbbce35b8", + "shopify_order_id": "6302119854247" + }, + "created_at": 1756045901, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 5000, + "shipping_fee": 7000, + "customer_details": { + "contact": "+919100000000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + }, + "billing_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + } + }, + "line_items_total": 600000, + "tax_details": { + "total_tax": 4128, + "taxes_included": true + } + } + ```json: Response: Prepaid Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 100700, + "amount_paid": 100700, + "amount_due": 0, + "currency": "INR", + "receipt": "#30414", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "paid", + "attempts": 1, + "notes": { + "cart_id": "hWN1TcwL?key=1a3a5a7c", + "storefront_id": "gid://shopify/Cart/hIkey=af7c7800", + "flits_cart_token": "hWcwL?key=1a3741dc_8740f5_175447", + "shopify_order_id": "6266036191399" + }, + "created_at": 1754466155, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 0, + "shipping_fee": 700, + "customer_details": { + "billing_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "billing_address", + "zipcode": "110057" + }, + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "shipping_address", + "zipcode": "110057" + } + }, + "line_items_total": 110000, + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + Know more about the [Orders API.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) + + +> **INFO** +> +> +> **Order Status** +> +> Check the order status for the following: +> +> - Prepaid orders: `paid`. +> - COD orders: `placed`. +> + + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the order to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the order. For example, `order_R1yDkxyIuKXXXX`. + +`entity` +: `string` Type of entity. Value is `order`. + +`amount` +: `integer` Total order amount in the smallest currency unit (paise). + +`amount_paid` +: `integer` Amount paid towards the order in paise. For prepaid orders, this shows the actual amount paid. For COD orders, this is `0` until payment is collected. + +`amount_due` +: `integer` Outstanding amount due in paise. For prepaid orders, this shows any remaining balance. For COD orders, this equals the `amount` field until payment is collected. + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`receipt` +: `string` Receipt identifier for internal reference. For example, `#30567`. + +`offers` +: `array` Array of offer IDs applied to the order. + +`status` +: `string` Current status of the order. Possible values: + - `placed`: Order placed but payment pending (COD orders). + - `paid`: Order placed and payment completed (prepaid orders). + - `cancelled`: Order cancelled. + - `refunded`: Order refunded. + +`attempts` +: `integer` Number of payment attempts made for this order. For example, `1`. + +`notes` +: `object` Custom notes added to the order containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `shopify_order_id` + : `string` Shopify order reference. + + `flits_cart_token` + : `string` Flits integration token (optional). + +`created_at` +: `integer` Unix timestamp indicating when the order was created. For example, `1756045901`. + +`description` +: `string|null` Order description. Returns `null` if no description is provided. + +`checkout` +: `string|null` Checkout identifier. Returns `null` if not applicable. + +`promotions` +: `array` Array of promotion objects applied to the order. + + `code` + : `string` Promotion code used. For example, `orderOff`. + + `type` + : `string` Type of promotion. For example, `cart_value`. + + `value` + : `integer` Discount value in paise. For example, `10000` for ₹100. + + `description` + : `string` Human-readable promotion description. + + `reference_id` + : `string` Internal reference for the promotion. + +`cod_fee` +: `integer` Cash on Delivery charges in paise. For COD orders, this contains the fee amount (for example, `5000` for ₹50). For prepaid orders, this is `0`. + +`shipping_fee` +: `integer` Shipping charges in paise. For example, `700` for ₹7. + +`customer_details` +: `object` Customer information. + + `contact` + : `string` Customer's phone number. + + `email` + : `string` Customer's email address. + + `shipping_address` + : `object` Complete shipping address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for delivery. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Recipient name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `shipping_address`. + + `zipcode` + : `string` Postal code. + + `billing_address` + : `object` Complete billing address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for billing. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Account holder name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `billing_address`. + + `zipcode` + : `string` Postal code. + +`line_items_total` +: `integer` Total value of line items in paise before adding shipping fees and COD fees, after applying promotions. For example, `60000` for ₹600. + +`tax_details` +: `object` Tax information. + + `total_tax` + : `integer` Total tax amount in paise. For example, `4128`. + + `taxes_included` + : `boolean` Indicates whether taxes are included in the item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### Fetch a Payment + + Use the Fetch Payments API to retrieve comprehensive payment details, including transaction status, payment method, customer information, settlement details, and the associated order information for a specific payment: + + v1/payments/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X GET https://api.razorpay.com/v1/payments/pay_R1yFlWQar3XXXX + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String paymentId = "pay_R1yFlWQar3XXXX"; + + Payment payment = razorpay.payments.fetch(paymentId); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.payment.fetch(paymentId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + paymentId := "pay_R1yFlWQar3XXXX" + + body, err := client.Payment.Fetch(paymentId, nil, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->payment->fetch($paymentId); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + paymentId = "pay_R1yFlWQar3XXXX" + + Razorpay::Payment.fetch(paymentId) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.payments.fetch(paymentId) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + Payment payment = client.Payment.Fetch(paymentId); + ``` + + ```json: Response: COD Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 55700, + "currency": "INR", + "status": "pending", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "cod", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919100000000", + "notes": { + "cart_id": "hWN2QaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/h?key=14bbf59ce35b8" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1756046099, + "receiver_type": null + } + ```json: Response: Prepaid Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 90630, + "currency": "INR", + "status": "captured", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "cart_id": "hWNsVrcwL?key=1a3a457ddc", + "storefront_id": "gid://shopify/Cart/hWv3e8?key=af707", + "flits_cart_token": "hWrcwL?key=1a3a5a70f5_17547", + "optimizer_provider_name": "razorpay" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "727947422583", + "upi_transaction_id": "1F723677C679EF578A95" + }, + "created_at": 1754466271, + "receiver_type": null, + "upi": { + "vpa": "gaurav.kumar@exampleupi" + } + } + ``` + + Know more about the [Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md). + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. For example, `pay_R1yFlWQar3XXXX`. + +`entity` +: `string` Type of entity. Value is `payment`. + +`amount` +: `integer` Payment amount in the smallest currency unit (paise). For COD payments, this includes the COD fee (for example, `55700` for ₹557). For prepaid payments, this equals the captured amount (for example, `90630` for ₹906.30). + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`status` +: `string` Current status of the payment. Possible values: + - `pending`: Payment pending collection (COD orders). + - `captured`: Payment successfully captured (prepaid orders). + - `authorized`: Payment authorized but not captured. + - `failed`: Payment attempt failed. + +`order_id` +: `string` Unique identifier of the associated order. For example, `order_R1yDkxyIuKXXXX`. + +`invoice_id` +: `string|null` Unique identifier of the associated invoice. Returns `null` if no invoice is linked. + +`international` +: `boolean` Indicates whether this is an international payment. Possible values: + - `true`: International payment. + - `false`: Domestic payment. + +`method` +: `string` Payment method used. Possible values include: + - `cod` + - `upi` + - `card` + - `netbanking` + - `wallet` + +`amount_refunded` +: `integer` Amount refunded in paise. For example, `0` indicates no refund has been processed. + +`refund_status` +: `string|null` Current refund status. Returns `null` if no refund is applicable. Possible values: + - `partial`: Partial refund processed. + - `full`: Full refund processed. + +`captured` +: `boolean` Indicates whether the payment has been captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string|null` Payment description. Returns `null` if no description is provided. + +`card_id` +: `string|null` Unique identifier of the card used for payment. Returns `null` for non-card payments. + +`bank` +: `string|null` Bank identifier for netbanking payments. Returns `null` for other payment methods. + +`wallet` +: `string|null` Wallet provider identifier. Returns `null` for non-wallet payments. + +`vpa` +: `string|null` Virtual Payment Address for UPI payments. For example, `gaurav.kumar@exampleupi`. Returns `null` for non-UPI payments. + +`email` +: `string` Customer's email address. + +`contact` +: `string` Customer's phone number. + +`notes` +: `object` Custom notes added to the payment containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `flits_cart_token` + : `string` Flits integration token (optional). + + `optimizer_provider_name` + : `string` Payment optimizer provider name (optional). + +`fee` +: `integer|null` Processing fee charged in paise. For example, `0` indicates no fee. Returns `null` for COD payments. + +`tax` +: `integer|null` Tax amount on processing fee in paise. For example, `0` indicates no tax. Returns `null` for COD payments. + +`error_code` +: `string|null` Error code if payment failed. Returns `null` for successful payments. + +`error_description` +: `string|null` Human-readable error description. Returns `null` for successful payments. + +`error_source` +: `string|null` Source of the error. Returns `null` for successful payments. + +`error_step` +: `string|null` Step at which error occurred. Returns `null` for successful payments. + +`error_reason` +: `string|null` Reason for the error. Returns `null` for successful payments. + +`acquirer_data` +: `object` Data from the payment acquirer. + + `rrn` + : `string` Retrieval Reference Number from the acquirer (optional). + + `upi_transaction_id` + : `string` UPI transaction identifier from the acquirer (optional). + +`created_at` +: `integer` Unix timestamp indicating when the payment was created. For example, `1756046099`. + +`receiver_type` +: `string|null` Type of receiver for the payment. Returns `null` if not applicable. + +`upi` +: `object` UPI-specific payment details (only present for UPI payments). + + `vpa` + : `string` Virtual Payment Address used for the UPI payment. + + + + + + + + + + +## 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +You can make test payments using one of the payment methods configured at the Checkout. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + + +### Supported Payment Methods + + Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + + + Payment Method | Code | Availability + --- + [Cash on Delivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md) | `cod` | Requires [Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md#prerequisites). + --- + [Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ + --- + [Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ + --- + [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ + --- + [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ + --- + EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ + --- + [Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ + --- + [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). + --- + [Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. + --- + [Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + + + ### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + ### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the following lists: + - [Supported UPI Flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + - [UPI Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/upi.md). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + ### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + #### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + - [Test Error Scenarios](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards). + + #### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + ### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## 3. Go-live Checklist + +Check the go-live checklist for Razorpay Magic Checkout integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + +## Related Information + +[React Native: iOS Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/react-native-integration/standard/integration-steps-ios.md) diff --git a/llm-content/payments/magic-checkout/rto-intelligence.md b/llm-content/payments/magic-checkout/rto-intelligence.md new file mode 100644 index 00000000..ad87bcd7 --- /dev/null +++ b/llm-content/payments/magic-checkout/rto-intelligence.md @@ -0,0 +1,1658 @@ +--- +title: Razorpay RTO Intelligence +heading: RTO Intelligence +description: Reduce RTOs with the API-based solution to assess RTO risk for your orders and take necessary actions. +--- + +# RTO Intelligence + +With Razorpay Magic Checkout, you can lower RTO (Return To Origin) rates by assessing the likelihood of RTO for incoming orders in real time. Based on the data, you can make decisions during order placement, such as disabling the COD option. Additionally, you can use post-order data to determine whether to ship the order or take further action. + +> **INFO** +> +> +> **Handy Tips** +> +> This is an on-demand feature. Write to us at [magic-checkout-support@razorpay.com](mailto:magic-checkout-support@razorpay.com) to get this feature enabled on your account. +> + +## Use Cases + +Here are some examples of how you can leverage RTO Intelligence. + +- **Custom Checkout Experience** + +Businesses with custom-built stores and a dedicated checkout experience can greatly benefit from Magic Checkout. They can opt for RTO intelligence as it is a separate offering, allowing them to maintain complete control of the checkout process while effectively addressing their RTO challenges. + +- **Website or App** + +Businesses operating exclusively through websites, apps, or both can benefit substantially from RTO Intelligence. Smaller businesses with limited engineering resources can easily use RTO Intelligence, an API-based solution requiring minimal integration. + +- **Logistics Partners and Aggregators** + +These partners are essential for order fulfilment, processing a high volume of orders daily, and collecting customer data. While they have access to this data, they may need more expertise to build their own RTO solutions. This is where RTO Intelligence can help them enhance their capabilities. + +## Prerequisites + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Generate the [API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. You can use the **Test Mode** keys for testing and later switch to **Live Mode**, generate the [Live API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) and replace it with the test keys. + +## Integration Steps + +Perform the following integration steps: + +1. [Create an Order](#step-1-create-an-order). + +2. [View RTO/Risk Reasons](#step-2-view-rto-risk-reasons). + +3. [Update Fulfilment Details](#step-3-update-fulfilment-details). + +### Step 1: Create an Order + +You can create an order using the following API and send the additional information required for Magic Checkout. + +Pass the `order_id` received in response in the subsequent API calls as the identifier of the order. + +/orders + + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/orders \ + -H "content-type: application/json" \ + -d '{ + "amount": 50000, + "currency": "", + "receipt": "receipt#22", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "rto_review": true, + "line_items": [ + { + "type": "e-commerce", + "sku": "1g234", + "variant_id": "12r34", + "price": "3900", + "offer_price": "3800", + "tax_amount": 0, + "quantity": 1, + "name": "TEST", + "description": "TEST", + "weight": "1700", + "dimensions": { + "length": "1700", + "width": "1700", + "height": "1700" + }, + "image_url": "https://unsplash.com/s/photos/new-wallpaper", + "product_url": "https://unsplash.com/s/photos/new-wallpaper", + "notes": {} + } + ], + "line_items_total": "1200", + "shipping_fee": 100, + "cod_fee": 100, + "customer_details": { + "name": "", + "contact": "+919000090000", + "email": "", + "shipping_address": { + "name": "", + "line1": "84th floor, Millennium Tower", + "line2": "2nd main", + "zipcode": "560000", + "contact": "+919000090000", + "city": "Bangalore", + "state": "Karnataka", + "country": "IND", + "tag": "home", + "landmark": "XYZ Hospital" + }, + "billing_address": { + "name": "", + "line1": "84th floor, Millennium Tower", + "line2": "2nd main", + "zipcode": "560000", + "contact": "+919000090000", + "city": "Bangalore", + "state": "Karnataka", + "country": "IND", + "tag": "home", + "landmark": "XYZ Hospital" + } + }, + "promotions": [{ + "reference_id": "reference", + "code": "code", + "type": "discount", + "value": 20, + "value_type": "flat", + "description": "description" + }], + "device_details": { + "ip": "127.0.0.1", + "user_agent": "abc" + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject paymentRequest = new JSONObject(); + paymentRequest.put("amount", 50000); + paymentRequest.put("currency", ""); + paymentRequest.put("receipt", "receipt#22"); + + JSONObject notes = new JSONObject(); + notes.put("note_key", "value1"); + paymentRequest.put("notes", notes); + + paymentRequest.put("rto_review", true); + + List lines = new ArrayList<>(); + JSONObject lineItems = new JSONObject(); + lineItems.put("type", "e-commerce"); + lineItems.put("sku", "1g234"); + lineItems.put("variant_id", "12r34"); + lineItems.put("price", "3900"); + lineItems.put("offer_price", "3800"); + lineItems.put("tax_amount", "0"); + lineItems.put("quantity", "1"); + lineItems.put("name", "TEST"); + lineItems.put("description", "TEST"); + lineItems.put("weight", "1700"); + + JSONObject dimensions = new JSONObject(); + dimensions.put("length", "1700"); + dimensions.put("width", "1700"); + dimensions.put("height", "1700"); + lineItems.put("dimensions", dimensions); + + lineItems.put("image_url", "https://unsplash.com/s/photos/new-wallpaper"); + lineItems.put("product_url", "https://unsplash.com/s/photos/new-wallpaper"); + + JSONObject lineItemsNotes = new JSONObject(); + lineItems.put("notes", lineItemsNotes); + + lines.add(lineItems); + paymentRequest.put("line_items", lines); + + paymentRequest.put("line_items_total", "1200"); + paymentRequest.put("shipping_fee", "100"); + paymentRequest.put("cod_fee", "100"); + + JSONObject customerDetails = new JSONObject(); + customerDetails.put("name", ""); + customerDetails.put("email", ""); + customerDetails.put("contact", "+919000090000"); + + JSONObject shippingAddress = new JSONObject(); + shippingAddress.put("name", ""); + shippingAddress.put("line1", "84th floor, Millennium Tower"); + shippingAddress.put("line2", "2nd main"); + shippingAddress.put("zipcode", "560000"); + shippingAddress.put("contact", "+919000090000"); + shippingAddress.put("city", "Bangalore"); + shippingAddress.put("state", "Karnataka"); + shippingAddress.put("tag", "home"); + shippingAddress.put("landmark", "XYZ Hospital"); + + JSONObject billingAddress = new JSONObject(); + billingAddress.put("name", ""); + billingAddress.put("line1", "84th floor, Millennium Tower"); + billingAddress.put("line2", "2nd main"); + billingAddress.put("zipcode", "560000"); + billingAddress.put("contact", "+919000090000"); + billingAddress.put("city", "Bangalore"); + billingAddress.put("state", "Karnataka"); + billingAddress.put("tag", "home"); + billingAddress.put("landmark", "XYZ Hospital"); + + customerDetails.put("shipping_address", shippingAddress); + customerDetails.put("billing_address", billingAddress); + + paymentRequest.put("customer_details", customerDetails); + + List promotions = new ArrayList<>(); + + JSONObject promotionItems = new JSONObject(); + promotionItems.put("reference_id", "reference"); + promotionItems.put("code", "code"); + promotionItems.put("type", "discount"); + promotionItems.put("value", "20"); + promotionItems.put("value_type", "flat"); + promotionItems.put("description", "description"); + + promotions.add(promotionItems); + paymentRequest.put("promotions", promotions); + + JSONObject deviceDetails = new JSONObject(); + deviceDetails.put("ip", "127.0.0.1"); + deviceDetails.put("user_agent", "abc"); + paymentRequest.put("device_details", deviceDetails); + + Order order = instance.orders.create(paymentRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.order.create({ + "amount": 50000, + "currency": "", + "receipt": "receipt#22", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "rto_review": true, + "line_items": [ + { + "type": "e-commerce", + "sku": "1g234", + "variant_id": "12r34", + "price": "3900", + "offer_price": "3800", + "tax_amount": 0, + "quantity": 1, + "name": "TEST", + "description": "TEST", + "weight": "1700", + "dimensions": { + "length": "1700", + "width": "1700", + "height": "1700" + }, + "image_url": "https://unsplash.com/s/photos/new-wallpaper", + "product_url": "https://unsplash.com/s/photos/new-wallpaper", + "notes": {} + } + ], + "line_items_total": "1200", + "shipping_fee": 100, + "cod_fee": 100, + "customer_details": { + "name": "", + "contact": "+919000090000", + "email": "", + "shipping_address": { + "name": "", + "line1": "84th floor, Millennium Tower", + "line2": "2nd main", + "zipcode": "560000", + "contact": "+919000090000", + "city": "Bangalore", + "state": "Karnataka", + "country": "IND", + "tag": "home", + "landmark": "XYZ Hospital" + }, + "billing_address": { + "name": "", + "line1": "84th floor, Millennium Tower", + "line2": "2nd main", + "zipcode": "560000", + "contact": "+919000090000", + "city": "Bangalore", + "state": "Karnataka", + "country": "IND", + "tag": "home", + "landmark": "XYZ Hospital" + } + }, + "promotions": [ + { + "reference_id": "reference", + "code": "code", + "type": "discount", + "value": 20, + "value_type": "flat", + "description": "description" + } + ], + "device_details": { + "ip": "127.0.0.1", + "user_agent": "abc" + } + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + para_attr := map[string]interface{}{ + "amount": 50000, + "currency": "", + "receipt": "receipt#22", + "notes": map[string]interface{}{ + "key1": "value3", + "key2": "value2", + }, + "rto_review": true, + "line_items": []interface{}{ + map[string]interface{}{ + "type": "e-commerce", + "sku": "1g234", + "variant_id": "12r34", + "price": "3900", + "offer_price": "3800", + "tax_amount": 0, + "quantity": 1, + "name": "TEST", + "description": "TEST", + "weight": "1700", + "dimensions": map[string]interface{}{ + "length": "1700", + "width": "1700", + "height": "1700", + }, + "image_url": "https://unsplash.com/s/photos/new-wallpaper", + "product_url": "https://unsplash.com/s/photos/new-wallpaper", + "notes": map[string]interface{}{}, + }, + }, + "line_items_total": "1200", + "shipping_fee": 100, + "cod_fee": 100, + "customer_details": map[string]interface{}{ + "name": "", + "contact": "+919000090000", + "email": "", + "shipping_address": map[string]interface{}{ + "name": "", + "line1": "84th floor, Millennium Tower", + "line2": "2nd main", + "zipcode": "560000", + "contact": "+919000090000", + "city": "Bangalore", + "state": "Karnataka", + "country": "IND", + "tag": "home", + "landmark": "XYZ Hospital", + }, + "billing_address": map[string]interface{}{ + "name": "", + "line1": "84th floor, Millennium Tower", + "line2": "2nd main", + "zipcode": "560000", + "contact": "+919000090000", + "city": "Bangalore", + "state": "Karnataka", + "country": "IND", + "tag": "home", + "landmark": "XYZ Hospital", + }, + }, + "promotions": []interface{}{ + map[string]interface{}{ + "reference_id": "reference", + "code": "code", + "type": "discount", + "value": 20, + "value_type": "flat", + "description": "description", + }, + }, + "device_details": map[string]interface{}{ + "ip": "127.0.0.1", + "user_agent": "abc", + }, + } + + body, err := client.Order.Create(para_attr, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array( + 'amount' => 50000, + 'currency' => '', + 'receipt' => 'receipt#22', + 'notes' => array( + 'key1' => 'value3', + 'key2' => 'value2', + ), + 'rto_review' => true, + 'line_items' => array( + 0 => array( + 'type' => 'e-commerce', + 'sku' => '1g234', + 'variant_id' => '12r34', + 'price' => '3900', + 'offer_price' => '3800', + 'tax_amount' => 0, + 'quantity' => 1, + 'name' => 'TEST', + 'description' => 'TEST', + 'weight' => '1700', + 'dimensions' => array( + 'length' => '1700', + 'width' => '1700', + 'height' => '1700', + ), + 'image_url' => 'https://unsplash.com/s/photos/new-wallpaper', + 'product_url' => 'https://unsplash.com/s/photos/new-wallpaper', + 'notes' => array(), + ), + ), + 'line_items_total' => '1200', + 'shipping_fee' => 100, + 'cod_fee' => 100, + 'customer_details' => array( + 'name' => '', + 'contact' => '+919000090000', + 'email' => '', + 'shipping_address' => array( + 'name' => '', + 'line1' => '84th floor, Millennium Tower', + 'line2' => '2nd main', + 'zipcode' => '560000', + 'contact' => '+919000090000', + 'city' => 'Bangalore', + 'state' => 'Karnataka', + 'country' => 'IND', + 'tag' => 'home', + 'landmark' => 'XYZ Hospital', + ), + 'billing_address' => array( + 'name' => '', + 'line1' => '84th floor, Millennium Tower', + 'line2' => '2nd main', + 'zipcode' => '560000', + 'contact' => '+919000090000', + 'city' => 'Bangalore', + 'state' => 'Karnataka', + 'country' => 'IND', + 'tag' => 'home', + 'landmark' => 'XYZ Hospital', + ), + ), + 'promotions' => array( + 0 => array( + 'reference_id' => 'reference', + 'code' => 'code', + 'type' => 'discount', + 'value' => 20, + 'value_type' => 'flat', + 'description' => 'description', + ), + ), + 'device_details' => array( + 'ip' => '127.0.0.1', + 'user_agent' => 'abc', + ), + )); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "amount": 50000, + "currency": "", + "receipt": "receipt#22", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "rto_review": true, + "line_items": [ + { + "type": "e-commerce", + "sku": "1g234", + "variant_id": "12r34", + "price": "3900", + "offer_price": "3800", + "tax_amount": 0, + "quantity": 1, + "name": "TEST", + "description": "TEST", + "weight": "1700", + "dimensions": { + "length": "1700", + "width": "1700", + "height": "1700" + }, + "image_url": "https://unsplash.com/s/photos/new-wallpaper", + "product_url": "https://unsplash.com/s/photos/new-wallpaper", + "notes": {} + } + ], + "line_items_total": "1200", + "shipping_fee": 100, + "cod_fee": 100, + "customer_details": { + "name": "", + "contact": "+919000090000", + "email": "", + "shipping_address": { + "name": "", + "line1": "84th floor, Millennium Tower", + "line2": "2nd main", + "zipcode": "560000", + "contact": "+919000090000", + "city": "Bangalore", + "state": "Karnataka", + "country": "IND", + "tag": "home", + "landmark": "XYZ Hospital" + }, + "billing_address": { + "name": "", + "line1": "84th floor, Millennium Tower", + "line2": "2nd main", + "zipcode": "560000", + "contact": "+919000090000", + "city": "Bangalore", + "state": "Karnataka", + "country": "IND", + "tag": "home", + "landmark": "XYZ Hospital" + } + }, + "promotions": [{ + "reference_id": "reference", + "code": "code", + "type": "discount", + "value": 20, + "value_type": "flat", + "description": "description" + }], + "device_details": { + "ip": "127.0.0.1", + "user_agent": "abc" + } + } + + Razorpay::Order.create(para_attr) + + ```javascript: Node.JS + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + "amount": 50000, + "currency": "", + "receipt": "receipt#22", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "rto_review": true, + "line_items": [ + { + "type": "e-commerce", + "sku": "1g234", + "variant_id": "12r34", + "price": "3900", + "offer_price": "3800", + "tax_amount": 0, + "quantity": 1, + "name": "TEST", + "description": "TEST", + "weight": "1700", + "dimensions": { + "length": "1700", + "width": "1700", + "height": "1700" + }, + "image_url": "https://unsplash.com/s/photos/new-wallpaper", + "product_url": "https://unsplash.com/s/photos/new-wallpaper", + "notes": {} + } + ], + "line_items_total": "1200", + "shipping_fee": 100, + "cod_fee": 100, + "customer_details": { + "name": "", + "contact": "+919000090000", + "email": "", + "shipping_address": { + "name": "", + "line1": "84th floor, Millennium Tower", + "line2": "2nd main", + "zipcode": "560000", + "contact": "+919000090000", + "city": "Bangalore", + "state": "Karnataka", + "country": "IND", + "tag": "home", + "landmark": "XYZ Hospital" + }, + "billing_address": { + "name": "", + "line1": "84th floor, Millennium Tower", + "line2": "2nd main", + "zipcode": "560000", + "contact": "+919000090000", + "city": "Bangalore", + "state": "Karnataka", + "country": "IND", + "tag": "home", + "landmark": "XYZ Hospital" + } + }, + "promotions": [{ + "reference_id": "reference", + "code": "code", + "type": "discount", + "value": 20, + "value_type": "flat", + "description": "description" + }], + "device_details": { + "ip": "127.0.0.1", + "user_agent": "abc" + } + }); + + ```csharp: .NET + RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + + Dictionary paymentRequest = new Dictionary(); + paymentRequest.Add("amount", 50000); + paymentRequest.Add("currency", ""); + paymentRequest.Add("receipt", "receipt#22"); + + Dictionary notes = new Dictionary(); + notes.Add("note_key", "value1"); + paymentRequest.Add("notes", notes); + + paymentRequest.Add("rto_review", true); + List lines = new List(); + Dictionary lineItems = new Dictionary(); + lineItems.Add("type", "e-commerce"); + lineItems.Add("sku", "1g234"); + lineItems.Add("variant_id", "12r34"); + lineItems.Add("price", "3900"); + lineItems.Add("offer_price", "3800"); + lineItems.Add("tax_amount", "0"); + lineItems.Add("quantity", "1"); + lineItems.Add("name", "TEST"); + lineItems.Add("description", "TEST"); + lineItems.Add("weight", "1700"); + + Dictionary dimensions = new Dictionary(); + dimensions.Add("length", "1700"); + dimensions.Add("width", "1700"); + dimensions.Add("height", "1700"); + + lineItems.Add("image_url", "https://unsplash.com/s/photos/new-wallpaper"); + lineItems.Add("product_url", "https://unsplash.com/s/photos/new-wallpaper"); + + Dictionary lineItemsNotes = new Dictionary(); + lineItems.Add("notes", lineItemsNotes); + + lines.Add(lineItems); + paymentRequest.Add("line_items", lines); + + paymentRequest.Add("line_items_total", "1200"); + paymentRequest.Add("shipping_fee", "100"); + paymentRequest.Add("cod_fee", "100"); + + Dictionary customerDetails = new Dictionary(); + customerDetails.Add("name", ""); + customerDetails.Add("email", ""); + customerDetails.Add("contact", "+919000090000"); + + Dictionary shippingAddress = new Dictionary(); + shippingAddress.Add("name", ""); + shippingAddress.Add("line1", "84th floor, Millennium Tower"); + shippingAddress.Add("line2", "2nd main"); + shippingAddress.Add("zipcode", "560000"); + shippingAddress.Add("contact", "+919000090000"); + shippingAddress.Add("city", "Bangalore"); + shippingAddress.Add("state", "Karnataka"); + shippingAddress.Add("tag", "home"); + shippingAddress.Add("landmark", "XYZ Hospital"); + + Dictionary billingAddress = new Dictionary(); + billingAddress.Add("name", ""); + billingAddress.Add("line1", "84th floor, Millennium Tower"); + billingAddress.Add("line2", "2nd main"); + billingAddress.Add("zipcode", "560000"); + billingAddress.Add("contact", "+919000090000"); + billingAddress.Add("city", "Bangalore"); + billingAddress.Add("state", "Karnataka"); + billingAddress.Add("tag", "home"); + billingAddress.Add("landmark", "XYZ Hospital"); + + customerDetails.Add("shipping_address", shippingAddress); + customerDetails.Add("billing_address", billingAddress); + + paymentRequest.Add("customer_details", customerDetails); + + List promotions = new List(); + + Dictionary promotionItems = new Dictionary(); + promotionItems.Add("reference_id", "reference"); + promotionItems.Add("code", "code"); + promotionItems.Add("type", "discount"); + promotionItems.Add("value", "20"); + promotionItems.Add("value_type", "flat"); + promotionItems.Add("description", "description"); + + promotions.Add(promotionItems); + paymentRequest.Add("promotions", promotions); + + Dictionary deviceDetails = new Dictionary(); + deviceDetails.Add("ip", "127.0.0.1"); + deviceDetails.Add("user_agent", "abc"); + paymentRequest.Add("device_details", deviceDetails); + + Order order = client.Order.Create(paymentRequest); + ``` + + + ```json: Success Response + { + "amount": 50000, + "amount_due": 50000, + "amount_paid": 0, + "attempts": 0, + "cod_fee": 100, + "created_at": 1717661191, + "currency": "", + "customer_details": [ + { + "billing_address": { + "city": "Bangalore", + "contact": "+919000090000", + "country": "IND", + "landmark": "XYZ Hospital", + "latitude": null, + "line1": "84th floor, Millennium Tower", + "line2": "2nd main", + "longitude": null, + "name": "", + "state": "Karnataka", + "tag": "home", + "zipcode": "560000" + }, + "contact": "+919000090000", + "email": "", + "insights": null, + "name": "", + "shipping_address": { + "city": "Bangalore", + "contact": "+919000090000", + "country": "IND", + "landmark": "XYZ Hospital", + "latitude": null, + "line1": "84th floor, Millennium Tower", + "line2": "2nd main", + "longitude": null, + "name": "", + "state": "Karnataka", + "tag": "home", + "zipcode": "560000" + } + } + ], + "entity": "order", + "id": "order_OJP3jaTBAermFF", + "line_items_total": 1200, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offers": [ + "offer_NouLRGh19nXXXX", + "offer_M9ImgsqpDJnAAA", + ], + "promotions": [], + "receipt": "receipt#22", + "shipping_fee": 100, + "status": "created" + } + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } + } + ``` + + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the customer makes the transaction. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The default is `INR`, and the length must be 3 characters. + +`receipt` _mandatory_ +: `string` Your receipt id for this order should be passed here. Maximum length of 40 characters. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`rto_review` _mandatory_ +: `boolean` Identifier to mark the order eligible for RTO risk prediction. Possible values: + - `true`: You can get RTO risk prediction using the [orders/rto_review](#step-2-view-rtorisk-reasons) API. + - `false` (default): You can choose not to get RTO risk prediction for the order. + + +> **WARN** +> +> +> **Watch Out!** +> +> If you choose not to get RTO risk prediction for the order, that is, mark the `rto_review` parameter as false, then the `line_items_total` parameter will be optional. +> + + +`line_items` _optional_ +: `array` This will have the details about the specific items added to the cart. + + `type` _optional_ + : `string` Defines the category type. Possible values: + - `mutual_funds`: For mutual funds. + - `e-commerce`: For all other businesses. + + `sku` _optional_ + : `string` Unique alphanumeric product id defined by you. + + `variant_id` _optional_ + : `string` Unique alphanumeric variant id defined by you. + + `price` _optional_ + : `integer` Price of the product in paise. + + `offer_price` _optional_ + : `integer` Price charged to the customer in paise. This is after any adjustment, such as product discount. + + `tax_amount` _optional_ + : `integer` The tax levied on the product. + + `quantity` _optional_ + : `integer` Number of units added in the cart. + + `name` _optional_ + : `string` Name of the product. + + `description` _optional_ + : `string` Description of the product. + + `weight` _optional_ + : `integer` Weight of the product in grams. + + `dimensions` _optional_ + : `object` The dimensions of the product. + + `length` _optional_ + : `string` The length of the product in centimeters. + + `width` _optional_ + : `string` The width of the product in centimeters. + + `height` _optional_ + : `string` The height of the product in centimeters. + + `product_url` _optional_ + : `string` URL of the product's listing page. + + `image_url` _optional_ + : `string` URL of the product image. + + `notes` _optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`line_items_total` _mandatory_ +: `integer` Sum of `offer_price` for all line items added in the cart in paise. For example, if a bag worth ₹8,000 and a shoe worth ₹10,000 are added to the cart, the `line_item_total` will be `180000`. This is post-tax. + +`shipping_fee` _optional_ +: `integer` Shipping fee charged on the line items in paise. + +`cod_fee` _optional_ +: `integer` COD fee charged on the line items in paise. + +`promotions` _optional_ +: `array` Used to pass all offer or discount-related information, including coupon code discount, method discount and so on. + + `reference_id` _mandatory_ + : `string` Id of the Offer. + + `code` _mandatory_ + : `string` Coupon code used to avail discount. + + `type` _mandatory_ + : `string` Type of Offer. Possible values: + - `coupon` + - `offer` + + `value` _mandatory_ + : `decimal` The offer value that needs to be applied. In the case of `fixed_amount`, it is a flat discount. For example, ₹500. In the case of `percentage`, it is a percentage value. For example, 10%. + + `value_type` _mandatory_ + : `string` The type of value. Possible values: + - `fixed_amount`: A fixed amount discount value in the currency of the order. For example, ₹500. + - `percentage`: A percentage discount value. For example, 10%. + + `description` _optional_ + : `string` Description of the promotion applied. For example, `New Year Sale Offer`. + +`customer_details` _optional_ +: `object` Details of the customer. + + `name` _optional_ + : `string` Customer's name. Alphanumeric values with period (.), apostrophe (') and parentheses are allowed. The name must be between 3-50 characters in length. For example, Gaurav Kumar. + + `contact` _optional_ + : `string` The customer's phone number. Maximum length of 15 characters, including the country code. For example, +919000090000. + + `email` _optional_ + : `string` The customer's email address. Maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `shipping_address` _optional_ + : Details of the customer's shipping address. + + `name` _optional_ + : `string` The customer's name. + + `line1` _optional_ + : `string` The first line of the customer's address. + + `line2` _optional_ + : `string` The second line of the customer's address. + + `zipcode` _optional_ + : `string` The customer's ZIP code. + + `contact` _optional_ + : `string` The customer's email address. Maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `city` _optional_ + : `string` The name of the city. For example, `Bengaluru`. + + `state` _optional_ + : `string` The name of the state. For example, `Karnataka`. + + `country` _optional_ + : `string` ISO 3 country code of the shipping address. For example, `IND`. + + `tag` _optional_ + : `string` Address tags are additional short descriptors commonly used for filtering and searching. Maximum length of 40 characters. For example, `Home`, `Office`, and so on. + + `landmark` _optional_ + : `string` Nearest landmark to the delivery address. + + `billing_address` _mandatory_ + : Details of the customer's billing address. + + `name` _mandatory_ + : `string` The customer's name. + + `line1` _mandatory_ + : `string` The first line of the customer's address. + + `line2` _mandatory_ + : `string` The second line of the customer's address. + + `zipcode` _mandatory_ + : `string` The customer's ZIP code. + + `contact` _mandatory_ + : `string` The customer's email address. Maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `city` _mandatory_ + : `string` The name of the city. For example, `Bengaluru`. + + `state` _mandatory_ + : `string` The name of the state. For example, `Karnataka`. + + `country` _mandatory_ + : `string` ISO 3 country code of the billing address. For example, `IND`. + + `tag` _optional_ + : `string` Address tags are additional short descriptors commonly used for filtering and searching. Maximum length of 40 characters. For example, `Home`, `Office`, and so on. + + `landmark` _optional_ + : `string` Nearest landmark to the delivery address. + +`device_details` _optional_ +: `object` Details of the customer. + + `ip` _optional_ + : `string` Public IP Address of the device used to place the order. + + `user_agent` _optional_ + : `string` The user-agent header of the customer's browser. + + + +### Response Parameters + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of ₹295, enter `29500`. + +`amount_due` +: `integer` The amount pending against the order. + +`amount_paid` +: `string` The amount paid by the customer. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. For example, `1`. + +`cod_fee` +: `integer` COD fee charged on the line items in paise. + +`created_at` +: `string` The Unix timestamp when the order was created. + +`currency` +: `string` A 3 letter ISO code for the currency you want to accept the payment. For example, INR. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`customer_details` +: `object` Details of the customer. + + `contact` + : `string` The customer's phone number. Maximum length of 15 characters, including the country code. For example, +919000090000. + + `email` + : `string` The customer's email address. Maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `insights` + : `json object` Additional customer details including past transaction data. + + `name` + : `string` Customer's name. Alphanumeric values with period (.), apostrophe (') and parentheses are allowed. The name must be between 3-50 characters in length. For example, Gaurav Kumar. + + `shipping_address` + : Details of the customer's shipping address. + + `city` + : `string` The name of the city. For example, `Bengaluru`. + + `contact` + : `string` The customer's email address. Maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `country` + : `string` ISO 3 country code of the shipping address. For example, `IND`. + + `landmark` + : `string` Nearest landmark to the delivery address. + + `latitude` + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `longitude` + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `name` + : `string` The customer's name. + + `state` + : `string` The name of the state. For example, `Karnataka`. + + `tag` + : `string` Address tags are additional short descriptors commonly used for filtering and searching. Maximum length of 40 characters. For example, `Home`, `Office`, and so on. + + `zipcode` + : `string` The customer's ZIP code. + + `billing_address` + : Details of the customer's billing address. + + `city` + : `string` The name of the city. For example, `Bengaluru`. + + `contact` + : `string` The customer's email address. Maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + + `country` + : `string` ISO 3 country code of the billing address. For example, `IND`. + + `landmark` + : `string` Nearest landmark to the delivery address. + + `latitude` + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `line1` + : `string` The first line of the customer's address. + + `line2` + : `string` The second line of the customer's address. + + `longitude` + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `name` + : `string` The customer's name. + + `state` + : `string` The name of the state. For example, `Karnataka`. + + `tag` + : `string` Address tags are additional short descriptors commonly used for filtering and searching. Maximum length of 40 characters. For example, `Home`, `Office`, and so on. + + `zipcode` + : `string` The customer's ZIP code. + +`entity` +: `integer` Indicates the type of entity. Here, it is `order`. + +`id` +: `string` The unique identifier of the order. + +`line_items_total` +: `integer` Sum of `offer_price` for all line items added in the cart in paise. For example, if a bag worth ₹8,000 and a shoe worth ₹10,000 are added to the cart, the `line_item_total` will be `180000`. This is post-tax. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`offers` +: `array` Offers enabled on your account. + +`promotions` +: `array` Used to pass all offer or discount-related information, including coupon code discount, method discount and so on. + + `reference_id` + : `string` Id of the Offer. + + `code` + : `string` Coupon code used to avail discount. + + `type` + : `string` Type of Offer. Possible values: + - `coupon` + - `offer` + + `value` _mandatory_ + : `decimal` The offer value that is applied. In the case of `fixed_amount`, it is a flat discount. For example, ₹500. In the case of `percentage`, it is a percentage value. For example, 10%. + + `value_type` _mandatory_ + : `string` The type of value. Possible values: + - `fixed_amount`: A fixed amount discount value in the currency of the order. For example, ₹500. + - `percentage`: A percentage discount value. For example, 10%. + + `description` + : `string` Description of the promotion applied. For example, `New Year Sale Offer`. + +`receipt` +: `string` Receipt number that corresponds to this order. The maximum length of 40 characters and has to be unique. + +`shipping_fee` +: `integer` Shipping fee charged on the line items in paise. + +`status` +: `integer` The status of the order. Possible values: + - `created`: When you create an order, it is in the created state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from created to attempted state when a payment is first attempted. It remains in this state till the payment associated with the order is captured. + - `paid`: After successfully capturing the payment, the order moves to the paid state. The order stays in the paid state even if the payment associated with the order is refunded. + + +## Step 2: View RTO/Risk Reasons + +You can use the `order_id` obtained in the [previous step](#step-1-create-an-order) to view the RTO risk and reasons why a particular order is risky. This information can be consumed to: +- Disable COD as a payment method for a customer. +- Take necessary action on the order, like calling up the customer post-order placement to verify if they are a genuine customer. + +> **WARN** +> +> +> **Watch Out!** +> +> In the path parameter, do not include `order_`; add only the id returned. For example, if the order id is `order_EKwxwAgItXXXX`, include only `EKwxwAgItXXXX` in the path parameter. +> + +/orders/:order_id/rto_review + + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/orders/EKwxwAgItXXXX/rto_review \ + -H "content-type: application/json" \ + -d + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String orderId = "order_EKwxwAgItXXXX"; + + Order order = instance.orders.viewRtoReview(orderId); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + orderId = "order_EKwxwAgItXXXX"; + + client.order.viewRtoReview(orderId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + orderId = "order_EKwxwAgItXXXX" + + body, err := client.Order.ViewRtoReview(TestOrderID, nil, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $orderId = "order_EKwxwAgItXXXX"; + + $api->order->fetch($orderId)->viewRtoReview(); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + orderId = "order_EKwxwAgItXXXX" + + Razorpay::Order.view_rto(orderId) + + ```javascript: Node.JS + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + var orderId = "order_EKwxwAgItXXXX"; + + instance.orders.viewRtoReview(orderId); + + ```csharp: .NET + RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + + string orderId = "order_EKwxwAgItXXXX"; + + Order order = client.Order.Fetch(orderId).ViewRtoReview(); + ``` + + + ```json: Success Response + { + "risk_tier": "high", + "rto_reasons": [ + { + "reason": "short_shipping_address", + "description": "Short shipping address", + "bucket": "address" + }, + { + "reason": "address_pincode_state_mismatch", + "description": "Incorrect pincode state entered", + "bucket": "address" + } + ] + } + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } + } + ``` + + + +### Path Parameter + +`order_id` _mandatory_ +: `string` The unique identifier of an order to access the `rto_review` information. + + + +### Response Parameters + +`risk_tier` +: `string` Determines how risky the order is. Possible values: + - `high` + - `medium` + - `low` + +`rto_reasons` +: `array` Top 5 reasons for risky orders in descending order of importance. [Refer to the list of possible reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-intelligence/appendix.md) for risky orders. + + `reason` + : `string` Id of the Offer. + + `description` + : `string` A unique identifier for the RTO reason. + + `bucket` + : `string` Categorises the reason into a specific group. For example, both reasons in the code are categorised under the address bucket. + + + +### Error Response Parameters + + Given below is the list of errors for RTO review. + + + INVALID_ARGUMENT + + - **Error**: input_validation_failed + - **Description**: The id provided does not exist. + - **Error Status**: 400 + - **Source**: business + - **Step**: rto_review + - **Next Steps**: Try with the id shared back during order creation response (/v1/orders) + + + +### INVALID_ARGUMENT + + - **Error**: input_validation_failed + - **Description**: order_id: the length must be exactly 14 + - **Error Status**: 400 + - **Source**: business + - **Step**: rto_review + - **Next Steps**: Invalid order_id cannot be mapped back to an existing order. Try with the id shared back during order creation response (v1/orders) + + + +### INVALID_ARGUMENT + + - **Error**: input_validation_failed + - **Description**: Mandatory field shipping_address not present + - **Error Status**: 400 + - **Source**: business + - **Step**: rto_review + - **Next Steps**: Shipping address was not shared in order_create API (/v1/orders). Please try creating an order again with all the mandatory details. + + + +### INTERNAL + + - **Error**: NA + - **Description**: We are facing some trouble completing your request at the moment. Please try again shortly. + - **Error Status**: 500 + - **Source**: business + - **Step**: rto_review + - **Next Steps**: Please try in a while. + + + + + + +### Step 3: Update the Fulfillment Details + +Use the code below to update the Fulfilment details of the order and payment method used. + +> **WARN** +> +> +> **Watch Out!** +> +> You must update the payment method details if you are not a [Razorpay Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md) user. +> + +/orders/:order_id/fulfillment + + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/orders/EKwxwAgItXXXX/fulfillment \ + -H "content-type: application/json" \ + -d '{ + "payment_method": "upi", + "shipping": { + "waybill": "123456789", + "status": "rto", + "provider": "Bluedart" + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String orderId = "order_EKwxwAgItXXXX"; + + JSONObject request = new JSONObject(); + JSONObject shipping = new JSONObject(); + shipping.put("waybill", "123456789"); + shipping.put("status", "rto"); + shipping.put("provider", "Bluedart"); + + request.put("payment_method","upi"); + request.put("shipping","shipping"); + + Order order = instance.orders.editFulfillment(orderId, request); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + orderId = "order_EKwxwAgItXXXX"; + + request = { + "payment_method": "upi", + "shipping": { + "waybill": "123456789", + "status": "rto", + "provider": "Bluedart" + } + } + + client.order.editFulfillment(orderId, request) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + orderId = "order_EKwxwAgItXXXX" + + params := map[string]interface{}{ + "payment_method": "upi", + "shipping": map[string]interface{}{ + "waybill": "123456789", + "status": "rto", + "provider": "Bluedart", + }, + } + + body, err := client.Order.EditFulfillment(orderId, params, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $orderId = "order_EKwxwAgItXXXX"; + + $data = array( + 'payment_method' => 'upi', + 'shipping' => array( + 'waybill' => '123456789', + 'status' => 'rto', + 'provider' => 'Bluedart' + ) + ) + + $api->order->fetch($orderId)->editFulfillment($data); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + order_id = "order_EKwxwAgItXXXX" + + para_attr = { + "payment_method": "upi", + "shipping": { + "waybill": "123456789", + "status": "rto", + "provider": "Bluedart" + } + } + + Razorpay::Order.edit_fulfillment(order_id, para_attr) + + ```javascript: Node.JS + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + var orderId = "order_EKwxwAgItXXXX"; + + var data = { + "payment_method": "upi", + "shipping": { + "waybill": "123456789", + "status": "rto", + "provider": "Bluedart" + } + } + + instance.orders.editFulfillment(orderId, data); + + ```csharp: .NET + RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + + string orderId = "order_EKwxwAgItXXXX"; + + Dictionary param = new Dictionary(); + Dictionary shipping = new Dictionary(); + param.Add("payment_method", "upi"); + shipping.Add("waybill","12345678"); + shipping.Add("status","rto"); + shipping.Add("provider","Bluedart"); + param.Add("shipping", shipping); + + Order order = client.Order.Fetch(orderId).EditFulFillment(param); + ``` + + + ```json: Success Response + { + "entity": "order.fulfillment", + "order_id": "EKwxwAgItXXXX", + "payment_method": "upi", + "shipping": { + "waybill": "123456789", + "status": "rto", + "provider": "Bluedart" + } + } + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } + } + ``` + + + +### Path Parameter + +`order_id` _mandatory_ +: `string` The unique identifier of an order to access the fulfillment information. + + + +### Request Parameters + +`payment_method` _optional_ +: `string` Payment Method opted by the customer to complete the payment. Possible values: + - `upi` + - `card` + - `wallet` + - `netbanking` + - `cod` + - `emi` + - `cardless_emi` + - `paylater` + - `recurring` + - `other` + + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mandatory field if the payment object is present in the API. +> + +`shipping` _optional_ +: `object` Contains the shipping data. + + `waybill` _mandatory_ + : `string` AWB number of the order. It is null if `enable_tracking` is set to false. + + `status` + : `string` Fulfillment status of the shipment. Possible values: + - `rto`: Order returned to the origin or in the process of returning to origin. + - `delivered`: Order delivered successfully. + - `cancelled`: Order canceled before or after shipping. + - `lost`: Order lost during or before transit. + - `returned`: Order returned by the customer post delivery. + - `partially_delivered`: Delivered a part of the multi-package product. + - `created`: Order in transit or yet to be shipped. + + `provider` + : `string` Name of the shipping provider used for shipment. + + + +### Error Response Parameters + + Given below is the the list of errors for fulfillment details. + + + INVALID_ARGUMENT + + - **Error**: input_validation_failed + - **Description**: The id provided does not exist. + - **Error Status**: 400 + - **Source**: business + - **Step**: fulfillment_updates + - **Next Steps**: Try with another id shared as a response to (/v1/orders) + + + +### INVALID_ARGUMENT + + - **Error**: input_validation_failed + - **Description**: Mandatory fields are missing in payment object: ["order_id"] + - **Error Status**: 400 + - **Source**: business + - **Step**: fulfillment_updates + - **Next Steps**: Please send order_id in the URL to get RTO reviews for that order. + + + +### INVALID_ARGUMENT + + - **Error**: input_validation_failed + - **Description**: shipping_status: invalid shipping status entered, please pass a valid shipping status. + - **Error Status**: 400 + - **Source**: business + - **Step**: fulfillment_updates + - **Next Steps**: Please pass a valid shipping status. + + + +### INTERNAL + + - **Error**: NA + - **Description**: We are facing some trouble completing your request at the moment. Please try again shortly. + - **Error Status**: 500 + - **Source**: business + - **Step**: NA + - **Next Steps**: Please try in a while. diff --git a/llm-content/payments/magic-checkout/rto-intelligence/appendix.md b/llm-content/payments/magic-checkout/rto-intelligence/appendix.md new file mode 100644 index 00000000..947a49c4 --- /dev/null +++ b/llm-content/payments/magic-checkout/rto-intelligence/appendix.md @@ -0,0 +1,195 @@ +--- +title: Appendix | Magic Checkout - RTO Intelligence +heading: Appendix +description: Additional information required to use RTO Intelligence. +--- + +# Appendix + +Following is supplementary information required to use RTO Intelligence. + +### Reasons for Risky Orders + +Given below is the list of possible reasons for risky orders. + +Key to be exposed via API | Detailed copy | Internal short key +--- +rto_prone_phone | High RTOs detected by phone number | high_phone_rto_merchant +--- +rto_prone_email | High RTOs detected by email | high_email_rto_merchant +--- +rto_prone_ip | High RTOs detected by IP address | high_ip_rto_merchant +--- +rto_prone_device | High RTOs detected by device | high_device_rto_merchant +--- +rto_prone_phone | High RTOs detected by phone number | high_phone_rto_global +--- +rto_prone_email | High RTOs detected by email | high_email_rto_global +--- +rto_prone_ip | High RTOs detected by IP address | high_ip_rto_global +--- +rto_prone_device | High RTOs detected by device | high_device_rto_global +--- +rto_prone_pincode | High RTOs detected by pincode | high_zipcode_rto_merchant +--- +rto_prone_pincode | High RTOs detected by pincode | high_zipcode_rto_global +--- +short_shipping_address | Short shipping address | short_shipping _address +--- +gibberish_detected_in_address | Gibberish detected in address | address_monkey_typed +--- +invalid_email_domain | Invalid email domain | email_temp_domain +--- +incomplete_pincode | Incomplete pincode | short_zipcode +--- +dummy_address_detected | Dummy address detected | test_in_address +--- +dummy_name_detected | Dummy name detected | test_in_name +--- +invalid_email_address | Invalid email address | invalid_email +--- +gibberish_detected_in_email | Gibberish detected in email | monkey_typed_email +--- +invalid_phone | Invalid phone number | invalid_phone +--- +invalid_pincode | Invalid pincode | invalid_zipcode +--- +address_pincode_state_mismatch | Incorrect pincode state entered | zipcode_address_state_mismatch +--- +incomplete_shipping_address | Incomplete shipping address | incomplete_shipping_address +--- +customer_phone_blocklisted | Customer phone blocklisted by merchant | phone_blocklisted +--- +customer_ip_blocklisted | IP blocklisted by merchant | ip_blocklisted +--- +customer_pincode_blocklisted | Customer pincode blocklisted by merchant | zipcode_blocklisted +--- +customer_email_blocklisted | Customer email blocklisted by merchant | email_blocklisted +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_hasdigits +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_countdigits +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_lengthtodigitsratio +--- +address_line_2_missing | Address Line 2 missing | addressstaticfeatures_hassecondfield +--- +address_contains_invalid_characters | Address contains too many symbols | addressstaticfeatures_countsymbols +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_countwords +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_countcommas +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_hashousefield +--- +address_building_name_absent | Address does not contain building name | addressstaticfeatures_hasbuildingfield +--- +address_locality_name_absent | Address does not contain locality name | addressstaticfeatures_haslocalityfield +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_isdigitinshipaddress +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_counttokens +--- +address_incorrect_pincode | Incorrect pincode entered | addressstaticfeatures_iszipcodenotgood +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_isunitnumericinsociety +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_isinformative +--- +address_pincode_city_mismatch | Incorrect pincode city entered | addressstaticfeatures_iscorrect +--- +rto_prone_area | Order placed for high RTO area | citystaticfeatures_citytier +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_iscomplete +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_maxwordratio +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_maxwordsuccess +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_maxseqbiwordcount +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_maxseqbiwordratio +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_maxbiwordcount +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_maxbiwordratio +--- +address_is_less_detailed | Address is less detailed | addressstaticfeatures_mergescore +--- +short_email | Email is too short | emailstaticfeatures_length +--- +potential_fraud_email | Email has too many digits | emailstaticfeatures_countdigits +--- +order_placed_during_high_rto_period | Order placed during start/end of the month | generic_dayofmonth +--- +cod_prone_email | High COD orders from this email | emailmerchantfeatures_countcodorders +--- +cod_prone_email | Few prepaid orders from this email | emailmerchantfeatures_countprepaidorders +--- +cod_prone_email | Few prepaid orders from this email | emailglobalfeatures_countprepaidorders +--- +cod_prone_email | High COD orders from this email | emailglobalfeatures_countcodorders +--- +rto_prone_email | High RTOs from this email | emailglobalfeatures_rtopercent +--- +cod_prone_phone | High COD orders from this phone | phoneglobalfeatures_countcodorders +--- +rto_prone_phone | High RTO orders from this phone | phoneglobalfeatures_rtopercent +--- +rto_prone_phone | Less delivered orders from this phone | phoneglobalfeatures_deliveredpercent +--- +cod_prone_device | High COD orders from this device | deviceidglobalfeatures_countcodorders +--- +rto_prone_device | Less delivered orders from this device | deviceidglobalfeatures_deliveredpercent +--- +rto_prone_pincode | High RTOs from this pincode | zipcodeglobalfeatures_rtopercent +--- +rto_prone_pincode | Less delivered orders from this pincode | zipcodeglobalfeatures_deliveredpercent +--- +return_prone_pincode | High return orders from this pincode | zipcodeglobalfeatures_returnpercent +--- +rto_prone_pincode | Less delivered orders from this pincode | zipcodemerchantfeatures_deliveredpercent +--- +rto_prone_pincode | High RTOs from this pincode | zipcodemerchantfeatures_rtopercent +--- +rto_prone_pincode | High RTOs from this pincode | zipcodeglobalfeatures_countrtoitems +--- +return_prone_pincode | High return orders from this pincode | zipcodeglobalfeatures_countreturnitems +--- +rto_prone_pincode | Less delivered orders from this pincode | zipcodemerchantfeatures_countdelivereditems +--- +rto_prone_pincode | High RTOs from this pincode | zipcodemerchantfeatures_countrtoitems +--- +cod_prone_pincode | Less prepaid orders from this pincode | zipcodeglobalfeatures_countprepaidorders +--- +cod_prone_pincode | High COD orders from this pincode | zipcodeglobalfeatures_countcodorders +--- +cod_prone_city | Less delivered orders from this city | citymerchantfeatures_deliveredpercent +--- +rto_prone_city | High RTOs from this city | citymerchantfeatures_rtopercent +--- +rto_prone_city | High RTOs from this city | cityglobalfeatures_countrtoitems +--- +rto_prone_city | High return orders from this city | cityglobalfeatures_countreturnitems +--- +rto_prone_city | Less delivered orders from this city | citymerchantfeatures_countdelivereditems +--- +rto_prone_city | High RTOs from this city | citymerchantfeatures_countrtoitems +--- +cod_prone_city | High COD orders from this city | cityglobalfeatures_countcodorders +--- +rto_prone_city | High RTOs from this city | cityglobalfeatures_rtopercent +--- +rto_prone_city | Less delivered orders from this city | cityglobalfeatures_deliveredpercent +--- +returns_prone_city | High return orders from this city | cityglobalfeatures_returnpercent +--- +returns_prone_state | High return orders from this state | statemerchantfeatures_countreturnitems +--- +high_purchase_amount_in_an_hour | High purchase amount in one hour | emailmerchantfeatures_sumpurchaseamountinonehour +--- +high_purchase_amount_in_a_day | High purchase amount in one day | emailmerchantfeatures_sumpurchaseamountinoneday +--- +new_customer_on_your_store | First time customer on your store | generic_createaccounttimebucket +--- +high_purchase_amount_in_a_day | High purchase amount in one day | phonemerchantfeatures_sumpurchaseamountinoneday diff --git a/llm-content/payments/magic-checkout/rto-reduction/allowlist-blocklist.md b/llm-content/payments/magic-checkout/rto-reduction/allowlist-blocklist.md new file mode 100644 index 00000000..4b880ac3 --- /dev/null +++ b/llm-content/payments/magic-checkout/rto-reduction/allowlist-blocklist.md @@ -0,0 +1,120 @@ +--- +title: Block or Allow COD Orders | Razorpay Magic Checkout +heading: Allowlist & Blocklist +description: Configure COD settings on Razorpay Magic Checkout. +--- + +# Allowlist & Blocklist + +With Magic Checkout, you can determine which cash on delivery orders you would like to allow or block based on a set of parameters to reduce RTO. + +> **INFO** +> +> +> **Handy Tips** +> +> - Only the **Owner** and **Admin** roles have access to this feature. +> - Blocklist and Allowlist will work only if you enable COD Intelligence. To enable COD Intelligence, navigate to **Magic Checkout** → **Analytics** → **RTO** and enable **COD Intelligence**. +> + +## Blocklist + +You can create a blocklist in the case of high-risk customers who often return products on delivery resulting in damaged products during transit, high returns, refund issues, and so on. + +The customers mentioned in the blocklist based on the order phone number, email ID, device IP and shipping zip code will **not** be eligible for COD. + + +### Add Orders Under Blocklist + + The orders that fall under this list will not be eligible for COD. Follow the steps given below: + + 1. Log in to the Dashboard and navigate to **Magic Checkout**. + 2. Select the platform of your e-commerce website, enter the relevant details and click **Next**. + 3. Navigate to **RTO Reduction Setup** → **RTO Reduction**. + 4. Toggle on **COD Intelligence** and click **Enable COD Intelligence** in the confirmation pop-up modal. + ![Enable COD Intelligence](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-enable-cod.jpg.md) + 5. Navigate to the **Block List** tab and click **Add New Blocklist**. + ![Add Blocklist to block COD for customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-new-blocklist.jpg.md) + 6. You can either upload a list or enter it manually. + - **To upload a list**: + 1. Download the **sample file**. + 2. Add the required data to the file. A maximum of 1M rows are acceptable in the file. + 3. Upload the file in .CSV format. Maximum file size supported is 50 MB. + - **To manually enter the list**: + 1. Select the **Type** from the drop-down list. + 2. Enter the values. You can enter up to 20 values by separating them with a comma based on the **type**. + + +> **INFO** +> +> +> **Handy Tips** +> +> Enter the values in a valid format as given below: +> - **Phone number**: 10-digit phone number with the country code. For example, +919000090000. +> - **Zip code**: 6-digit zip code. +> - **Device IP**: For example, 123.123.123.123. +> + + 7. Click **Confirm**. + ![Confirm settings on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/blocklist-confirm.jpg.md) + 8. A pop-up page appears with the list of items added. Review the list and click **Add To Blocklist**. + + +## Allowlist + +You can create an allowlist in case of trusted customers who are loyal to your brand and contribute to increasing revenue. In addition to the other customers who can avail of the COD option, the customers mentioned in the allowlist based on the order phone number and email ID **will always be** eligible for COD irrespective of the RTO intelligence recommendation. + + +### Add Orders Under Allowlist + + The orders that fall under this list will be eligible for COD. Follow the steps given below: + + +> **WARN** +> +> +> **Watch Out!** +> +> Orders under the allowlist are not eligible for RTO insurance if they result in an RTO. +> + + 1. Log in to the Dashboard and navigate to **Magic Checkout**. + 2. Select the platform of your e-commerce website, enter the relevant details and click **Next**. + 3. Navigate to **RTO Reduction Setup** → **RTO Reduction**. + 4. Toggle on **COD Intelligence** and click **Enable COD Intelligence** in the confirmation pop-up modal. + ![Enable COD Intelligence](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-enable-cod.jpg.md) + 5. Navigate to the **Allow List** tab and click **Add New Allowlist**. + ![Add Allowlist to allow COD for customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-new-allowlist.jpg.md) + 6. You can either upload a list or enter it manually. + - **To upload a list**: + 1. Download the **sample file**. + 2. Add the required data to the file. A maximum of 1M rows are acceptable in the file. + 3. Upload the file in .CSV format. Maximum file size supported is 50 MB. + - **To manually enter the list**: + 1. Select the **Type** from the drop-down list. + 2. Enter the values. You can enter up to 20 values by separating them with a comma based on the **type**. + +> **INFO** +> +> +> **Handy Tips** +> +> Enter the value in a valid format as given below: +> - **Phone number**: 10-digit phone number with the country code. For example, +919000090000. +> + + 7. Click **Confirm**. + ![Confirm settings on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/allowlist-confirm.jpg.md) + 8. A pop-up page appears with the list of items added. Review the list and click **Add To Allowlist**. + + +> **INFO** +> +> +> **Handy Tips** +> +> Once added, you cannot edit the items in the list. You can only delete each item in the list. + +> ![Delete each item in the list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/delete-item.jpg.md) +> diff --git a/llm-content/payments/magic-checkout/rto-reduction/delivery-status.md b/llm-content/payments/magic-checkout/rto-reduction/delivery-status.md new file mode 100644 index 00000000..66a74808 --- /dev/null +++ b/llm-content/payments/magic-checkout/rto-reduction/delivery-status.md @@ -0,0 +1,140 @@ +--- +title: Delivery Status | Razorpay Magic Checkout +heading: Delivery Status +description: Share the order history (pre-Magic Checkout) and monthly delivery status for Razorpay Magic Checkout orders to improve intelligence and RTO protection. +--- + +# Delivery Status + +You can share your historical order data (pre-Magic Checkout) and delivery status with Razorpay Magic Checkout for improved COD intelligence and better RTO protection. You must upload the following: +- [Monthly Delivery Data](#monthly-delivery-data) for Magic Checkout orders. +- [Pre-Magic Delivery Data](#pre-magic-delivery-data). + +#### Advantages + +- Reduce the RTO rate in the long run. +- Get improved COD intelligence from day 1. +- Better RTO protection. + +## Monthly Delivery Data + +You can share the monthly delivery status data for Magic Checkout orders to be eligible for RTO protection and get improved COD intelligence. + +If you have not integrated with logistics partners like [Shiprocket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/shiprocket.md), [Delhivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/delhivery.md), [iThink Logistics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/ithink-logistics.md), [Unicommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/unicommerce.md) and [ClickPost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/clickpost.md), you must manually upload the data. + + +### To upload the delivery statuses: + + 1. Log in to the Dashboard and navigate to **Magic Checkout**. + 2. Select the platform of your e-commerce website, enter the relevant details and click **Next**. + 3. Navigate to **RTO Reduction Setup** → **Delivery Data Upload**. + 4. In the **RTO Reduction Setup** section, navigate to the **Delivery Data Upload** tab. + 5. Click **+ Upload Delivery Statuses**. + ![Monthly delivery data on the Razorpay Dashboard and upload the file](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-monthly-delivery.jpg.md) + 6. Download the **sample file** for the template. Enter the Order id, Status, Shipping Charges, AWB number and Shipping Provider to claim RTO Insurance. Upload the file. + +> **WARN** +> +> +> **Watch Out!** +> +> - Shipping provider and AWB number fields are mandatory. +> - Merchant_order_id should contain your platform order id as mentioned in the order. For example, `#BCA1011`. +> - The status should contain the shipping status against the order. For example, RTO, Delivered, Cancelled and so on. +> - Upload a `.csv` or an `.xlsx` file. +> - The maximum size of the file is 50MB. +> - The number of rows in the file should not exceed 1 million. +> + + ![download the sample file and enter the details required](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-delivery-upload.jpg.md) + + Here is a glimpse of the sample file: + + +## Pre-Magic Delivery Data + +You can share your shipping provider's pre-Magic Checkout order history on Razorpay Magic Checkout for the last 6 months to get improved COD intelligence and better RTO protection. +Follow the steps given below to share the order history: + + +### 1. Export Order History + + We recommend that you upload the data for the last 6 months. Currently, Magic Checkout supports order history upload for: + + + Shiprocket + + Follow the steps given below: + + 1. Log in to the [Shiprocket Dashboard](https://app.shiprocket.in/login) and navigate to **Orders**. + ![Navigate to orders on the Shiprocket Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shiprocket-orders.jpg.md) + 1. Under **All**, select **Custom** and filter the data for the last 6 months. Click **Apply**. + ![Filter the data for the last 6 months](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shiprocket-date.jpg.md) + 1. Click the download icon. + ![Download the data filtered](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shiprocket-download.jpg.md). + 1. Your report is sent to your email id or you can also download it from the **Reports Panel**. + + + +### Delhivery *(Old Dashboard)* + + Follow the steps given below: + + 1. Log in to the [Delhivery Dashboard](https://cl.delhivery.com/app/home) and click **Go to Dashboard**. + ![Navigate to the Delhivery Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-delhivery-dashboard.jpg.md) + 1. Click **APPLY FILTER**. + 1. Click **Custom Date Range** and select the **Start Date** and the **End Date**. Click **Apply Filter**. + ![Filter the data for the last 6 months](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-delhivery-date.jpg.md) + 1. Click **Download**. + ![Download the data filtered](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-delhivery-download.jpg.md) + + + +### Pickrr + + Follow the steps given below: + + 1. Log in to the Pickrr Dashboard. + 1. Navigate to **Reports** → **Advanced Report**. + ![Navigate to Advanced Reports on the Pickr Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-pickrr-reports.jpg.md) + 1. Select **Download By Data Range**. + 1. Select upload dates. + 1. Select the **File Type** as **MIS**. + 1. Select the **Status** as **All** from the drop-down list. + 1. Enter your **Email Address** and click **Download**. The report download link is sent to your email ID. + ![Download the data filtered](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-pickrr-download.jpg.md) + + + + + + +### 2. Upload Order History + + To upload order history: + 1. Log in to the Razorpay Dashboard and navigate to **Magic Checkout**. + 2. Select the platform of your e-commerce website, enter the relevant details and click **Next**. + 3. In the **RTO Reduction Setup** section, navigate to the **RTO History** tab. + 4. Click **+ Upload Order History**. + ![Upload order history on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-order-history.jpg.md) + 5. Select the **Shipping Provider** from the drop-down list. + 6. Upload the order history file you downloaded in the [previous step](#step-1-export-order-history). + + +> **WARN** +> +> +> **Watch Out!** +> +> - Upload a `.csv` file. Only one file upload is allowed. +> - The maximum size of the file is 50MB. +> - If you use multiple shipping providers, please upload the file from your most frequently used provider. +> + + 7. Click **Confirm**. + ![Upload the order history file](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-pre-magic.jpg.md) + + +### Related Information +- [RTO Analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto.md) +- [Integrate with Logistics Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners.md) diff --git a/llm-content/payments/magic-checkout/rto-reduction/logistics-partners.md b/llm-content/payments/magic-checkout/rto-reduction/logistics-partners.md new file mode 100644 index 00000000..00ad8acc --- /dev/null +++ b/llm-content/payments/magic-checkout/rto-reduction/logistics-partners.md @@ -0,0 +1,35 @@ +--- +title: Razorpay Magic Checkout | Logistics Partners Integration +heading: About Logistics Partners Integration +description: Integrate with Logistics Partners like Shiprocket, Delhivery, iThink Logistics, Unicommerce and ClickPost to easily fetch order status and provide RTO protection on COD orders. +--- + +# About Logistics Partners Integration + +- **Logistics Partners Integration Changelog**: Discover new features, updates and deprecations related to the Logistics Partners Integration (since Jan 2024). + +Your logistics partner is responsible for delivering orders to your customers. You can integrate with Logistics Partners like **Shiprocket**, **Delhivery**, **iThink Logistics**, **Unicommerce** and **ClickPost** with Magic Checkout to easily fetch order status and provide RTO protection on COD orders. + +#### Features + +- Get the delivery status update periodically. +- Eliminate the need to send these updates or bulk upload them via Dashboard manually. + +#### Advantages + +- Improve the COD Intelligence you receive in filtering out high RTO risk COD orders. +- Orders processed will be eligible for RTO Insurance (if opted). + +## Available Logistics Partners + +You can integrate with the following logistics partners: + +- [Shiprocket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/shiprocket.md) +- [Delhivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/delhivery.md) +- [iThink Logistics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/ithink-logistics.md) +- [Unicommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/unicommerce.md) +- [ClickPost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/clickpost.md) + +### Related Information +- [Upload Order Status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/delivery-status.md) +- [Customisations and Extensions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/customisations-extensions.md) diff --git a/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/clickpost.md b/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/clickpost.md new file mode 100644 index 00000000..3a0cc446 --- /dev/null +++ b/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/clickpost.md @@ -0,0 +1,24 @@ +--- +title: Razorpay Magic Checkout ClickPost Integration +heading: Integrate Magic Checkout with ClickPost +description: Integrate ClickPost with Razorpay Magic Checkout to easily fetch delivery status details. +--- + +# Integrate Magic Checkout with ClickPost + +ClickPost is India's largest ecommerce shipping and courier integration platform. It operates as a multi-carrier integration system, a courier tracking system, and an overall logistics solution. + +## Integration Steps + +Follow these steps on the Razorpay Dashboard: + +1. Log in to the Dashboard and navigate to **Magic Checkout**. +2. Select the platform of your e-commerce website, enter the relevant details and click **Next**. +3. In the **RTO Reduction Setup** section, navigate to the → **Delivery Tracking** tab. +4. Click **Connect** next to **ClickPost**. + ![Connect Magic Checkout with ClickPost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-logistics-connect.jpg.md) +5. Enter the same **Username** and **Key** as provided by ClickPost during the registration. +6. Click **Connect to ClickPost**. + ![Paste the API Keys on the Razorpay Dashboard and connect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-logistics-clickpost-creds.jpg.md) + +You have successfully integrated Magic Checkout with ClickPost. In case you want to disconnect ClickPost, click **Disconnect**. diff --git a/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/delhivery.md b/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/delhivery.md new file mode 100644 index 00000000..16b3523a --- /dev/null +++ b/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/delhivery.md @@ -0,0 +1,24 @@ +--- +title: Razorpay Magic Checkout Delhivery Integration +heading: Integrate Magic Checkout with Delhivery +description: Integrate Delhivery with Razorpay Magic Checkout to easily fetch delivery status details. +--- + +# Integrate Magic Checkout with Delhivery + +Delhivery is an Indian supply chain and logistics company aiming to build an operating system for commerce. + +## Integration Steps + +Follow these steps on the Razorpay Dashboard: + +1. Log in to the Dashboard and navigate to **Magic Checkout**. +2. Select the platform of your e-commerce website, enter the relevant details and click **Next**. +3. In the **RTO Reduction Setup** section, navigate to the → **Delivery Tracking** tab. +4. Click **Connect** next to **Delhivery**. + ![Connect Magic Checkout with Delhivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-logistics-connect.jpg.md) +5. Send an email to the **Delhivery team** on `de.onb@delhivery.com` requesting for the **Production Authentication Token**. +6. Enter the token once you receive it and click **Connect**. + ![Enter the production authentication token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-delhivery-connect.jpg.md) + +You have successfully integrated Magic Checkout with Delhivery. In case you want to disconnect Delhivery, click **Disconnect**. diff --git a/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/ithink-logistics.md b/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/ithink-logistics.md new file mode 100644 index 00000000..aa126445 --- /dev/null +++ b/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/ithink-logistics.md @@ -0,0 +1,35 @@ +--- +title: Razorpay Magic Checkout iThink Logistics Integration +heading: Integrate Magic Checkout with iThink Logistics +description: Integrate iThink Logistics with Razorpay Magic Checkout to easily fetch delivery status details. +--- + +# Integrate Magic Checkout with iThink Logistics + +iThink logistics is a third-party logistics service provider that makes your ecommerce shipping process easier. + +## Integration Steps + + +### 1. Copy the API Keys + + 1. Log in to the [iThink Logistics Dashboard](https://my.ithinklogistics.com/login) and hover over the settings icon on the bottom left. + 2. Click **API Key**. + ![Navigate to API keys section on the iThink logistics Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-logistics-ithink.jpg.md) + 3. Copy the **API Key** and **Secret Key**. + ![Copy the API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-logistics-ithink-keys.jpg.md) + + + +### 2. Enable iThink Logistics on Razorpay Dashboard + + 1. Log in to the Dashboard and navigate to **Magic Checkout**. + 2. Select the platform of your e-commerce website, enter the relevant details and click **Next**. + 3. In the **RTO Reduction Setup** section, navigate to the → **Delivery Tracking** tab. + 4. Click **Connect** next to **iThink Logistics**. + ![Connect Magic Checkout with iThink Logistics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-logistics-connect.jpg.md) + 5. Paste the **API Key** and **Secret Key** copied from the iThink Logistics Dashboard. + 6. Click **Connect to iThink Logistics**. + ![Paste the API Keys on the Razorpay Dashboard and connect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-logistics-ithink-creds.jpg.md) + + You have successfully integrated Magic Checkout with iThink Logistics. In case you want to disconnect iThink Logistics, click **Disconnect**. diff --git a/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/shiprocket.md b/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/shiprocket.md new file mode 100644 index 00000000..8140b746 --- /dev/null +++ b/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/shiprocket.md @@ -0,0 +1,55 @@ +--- +title: Razorpay Magic Checkout Shiprocket Integration +heading: Integrate Magic Checkout with Shiprocket +description: Integrate Shiprocket with Razorpay Magic Checkout to easily fetch delivery status details. +--- + +# Integrate Magic Checkout with Shiprocket + +Shiprocket is India's leading logistics software, offering automated shipping solutions. + +## Integration Steps + + +### 1. Configure Settings on Shiprocket Dashboard + + +> **INFO** +> +> +> **Handy Tips** +> +> This step is required only if you are generating the API credentials for the first time. If you have already generated the API credentials, please skip this step. +> + + 1. Log in to the [Shiprocket Dashboard](https://app.shiprocket.in/login) and navigate to **Settings** → **API** on the bottom right. + 2. Click **Configure**. + ![Navigate to Configure section on the Shiprocket Dashboard.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shiprocket-login.jpg.md) + 3. In the **API User** section, click **Create an API User**. + 4. Enter your **Email ID** and **password**. + 5. Click **Generate API Credential**. + ![Enter the credentials and generate the API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shiprocket-api.jpg.md) + + + +### 2. Enable Shiprocket on Razorpay Dashboard + + 1. Log in to the Dashboard and navigate to **Magic Checkout**. + 2. Select the platform of your e-commerce website, enter the relevant details and click **Next**. + 3. In the **RTO Reduction Setup** section, navigate to the → **Delivery Tracking** tab. + 4. Click **Connect** next to **Shiprocket**. + ![Connect Magic Checkout with Shiprocket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-logistics-connect.jpg.md) + 5. Enter your **API User Email ID** and **API User Password** generated on the Shiprocket Dashboard. + 6. Click **Connect to Shiprocket**. + ![Enter your API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shiprocket-credentials.jpg.md) + + You have successfully integrated Magic Checkout with Shiprocket. In case you want to disconnect Shiprocket, click **Disconnect**. + + +> **INFO** +> +> +> **Handy Tips** +> +> For Shiprocket integration issues, contact Shiprocket support directly as it is a third-party platform. +> diff --git a/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/unicommerce.md b/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/unicommerce.md new file mode 100644 index 00000000..3d13302a --- /dev/null +++ b/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/unicommerce.md @@ -0,0 +1,32 @@ +--- +title: Razorpay Magic Checkout Unicommerce Integration +heading: Integrate Magic Checkout with Unicommerce +description: Integrate Unicommerce with Razorpay Magic Checkout to easily fetch delivery status details. +--- + +# Integrate Magic Checkout with Unicommerce + +Unicommerce eSolutions is India's largest e-commerce-focused SaaS technology supply chain platform. It is designed to meet the business needs of e-commerce across various industries. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you have a Unicommerce account with an **Admin** role and Shopify access. If you do not have access, follow [these steps](https://documentation.unicommerce.com/docs/faq-uniware.html#5-how-to-give-facility-access-to-a-user) to set it up. +> + +## Integration Steps + +Follow these steps on the Razorpay Dashboard: + +1. Log in to the Dashboard and navigate to **Magic Checkout**. +2. Select the platform of your e-commerce website, enter the relevant details and click **Next**. +3. In the **RTO Reduction Setup** section, navigate to the → **Delivery Tracking** tab. +4. Click **Connect** next to **Unicommerce**. + ![Connect Magic Checkout with Unicommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-logistics-connect.jpg.md) +5. Enter the same **Username** and **Password** as your Unicommerce admin account login credentials. +6. Enter **Tenant** from the Unicommerce domain URL. For example, if the Unicommerce Dashboard URL after you log in is `acmecorp.unicommerce.com`, **acmecorp** is the tenant. + ![Paste the API Keys on the Razorpay Dashboard and connect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-logistics-unicommerce-creds.jpg.md) + +You have successfully integrated Magic Checkout with Unicommerce. In case you want to disconnect Unicommerce, click **Disconnect**. diff --git a/llm-content/payments/magic-checkout/shopify.md b/llm-content/payments/magic-checkout/shopify.md new file mode 100644 index 00000000..16551c06 --- /dev/null +++ b/llm-content/payments/magic-checkout/shopify.md @@ -0,0 +1,135 @@ +--- +title: Integrate Razorpay Magic Checkout With Shopify Store +heading: Integrate Magic Checkout With Shopify Store +description: Steps to integrate Magic Checkout on your Shopify Store. +--- + +# Integrate Magic Checkout With Shopify Store + +- **Shopify Integration Changelog**: Discover new features, updates and deprecations related to the Shopify Integration with Magic Checkout (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about Shopify Integration. + +Follow the steps given below to integrate Razorpay Magic Checkout with your Shopify Store. + + +### Video Tutorial + + Watch this video to know how to integrate Razorpay Magic Checkout with your Shopify Store. + +[Video: https://www.youtube.com/embed/Cr9IdCU5o8Q?si=CoVEyhxlrfkSSM9X] + + + +## Prerequisites + +Fill in the [form](https://razorpay.typeform.com/to/peQh9Pwx#name=xxxxx) and share the following details: +- Email address +- Mobile number +- Razorpay MID: You can find your MID on the top-right corner of the Dashboard. +- Razorpay API keys: Generate the [API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard by navigating to **Account & Settings** → **Website and app settings** → **API keys**. +- If you are a Shopify Native user +- If you offer COD +- 4 digit-Shopify collaborator code: + 1. Log in to the [Shopify Store](https://accounts.shopify.com/store-login) using your admin credentials. + 2. Navigate to **Settings** → **User and permissions**. + 3. Scroll down to the **Collaborators** section and copy the **Collaborator Request Code**. + ![Copy the collaborator request code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-collab-code.gif.md) +- Test Shopify theme name: Magic Checkout will be enabled on this test theme; you can then publish this on your live theme post-integration. + +> **INFO** +> +> +> **Handy Tips** +> +> Once you share the above details, it takes a maximum of 48 working hours to enable the feature on your account. +> + +## Integration Steps + +Follow the steps given below: + + +### 1. Shopify Dashboard + + 1. Log in to the [Shopify Store](https://accounts.shopify.com/store-login) and navigate to **Products**. + 2. Select all the products and click **Include in sales channels**. + ![Include products in sales channel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-sales-channel.jpg.md) + 3. Select the **Magic Checkout** check box and click **Include products**. + 4. Navigate to **Settings** → **Taxes and duties**. + 5. Scroll down to the **Global settings** section and select the **Include sales tax in product price and shipping rate** check box. Click **Save**. + ![Include sales tax GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-sales-tax1.gif.md) + 6. In the **Settings** section, navigate to **Checkout**. + 7. Scroll down to the **Order status page additional scripts** section and add the following code in the **Additional scripts** section: + ```js + + if (((document.getElementById("phone") && document.getElementById("phone").value) || (document.getElementById("email") && document.getElementById("email").value)) && document.getElementById("order_number") && document.getElementById("order_number").value) { + document.querySelector('form > div.section__content > div > button.btn').click(); + } + + ``` + + +> **WARN** +> +> +> **Watch Out!** +> +> After customers place their order, they are redirected to an order status page confirming the order placement. Shopify adds two fields and a login button for extra security: +> +> - Phone number or Email +> - Order number +> +> The above details are prefilled; customers only need to click the login button to view their address, order, and payment confirmation. If the script mentioned above is added, this login will be automated. +> +> For some users on the Shopify basic plan, the **Additional Scripts** tab is disabled. In this case, customers must manually click the login button. +> + + + + +### 2. Razorpay Dashboard + + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings**. + 3. In the **Checkout settings** section, you can customise the checkout style and features based on your requirement. + + +## Next Steps + +After successfully integrating your Shopify website with Magic Checkout, you can perform the following configurations on the Razorpay Dashboard to suit your business needs: +- [Cash on Delivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#cash-on-delivery): Enable COD and configure rules for specific locations, products, and order amounts, catering to customer preferences and logistical needs to increase sales. +- [Partial Cash on Delivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#partial-cash-on-delivery): Enable customers to pay a partial order amount online and use cash on delivery for the remaining balance to reduce order cancellation risk. +- [RTO](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#rto): Use automated COD intelligence or manual review to decide whether to offer COD based on customer buying history, thus reducing RTO rates. +- [Convert COD Orders to Prepaid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#convert-cod-orders-to-prepaid): Encourage COD customers to switch to prepaid by offering discounts or incentives, reducing cash handling risks. +- [Shipping Options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#shipping-options): Set up shipping rates at the product, zone and method levels to optimise costs and improve delivery efficiency. +- [International Shipping](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#international-shipping): Allow customers to enter international PIN codes, expanding your market reach globally. +- [Coupons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#coupons): Provide discounts via coupons to enhance engagement and reduce cart abandonment. +- [Login with Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#login-with-razorpay): Razorpay Magic SSO (Single Sign-On) offers a seamless login experience, helping you enhance conversions and gain valuable insights into user behaviour. +- [Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#offers): Create prepaid offers that appear on the Magic Checkout payment page, boosting conversions and average order value. +- [Google Analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#google-analytics): Integrate Google Analytics for insights into customer behaviour and optimised marketing strategies. +- [Google Ads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#google-ads): Integrate Google Ads to attract more visitors and increase sales. +- [Facebook Ads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#facebook-ads): Integrate Facebook Ads to expand your reach and drive traffic to your store. +- [Gift Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#gift-card-settings): Enable gift card settings to allow multiple gift cards or restrict their combination with coupons or COD, boosting sales through gift purchases. +- [Abandoned Cart Webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/abandoned-cart.md): Track when a customer drops off during the checkout journey and retarget them using their contact information, recovering potentially lost sales. + +> **WARN** +> +> +> **Watch Out!** +> +> Once the integration is successful: +> - Updates regarding conversions will only be visible in the [Order Analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/order-analytics.md) tab on the Razorpay Dashboard and not in Shopify Analytics. +> - You can edit order details like size, colour, and more on the Razorpay Dashboard using the **Action** tab. +> + +> **INFO** +> +> +> **Handy Tips** +> +> If you have any queries or are facing issues with the integration, write to us at [magic-checkout-support@razorpay.com](mailto:magic-checkout-support@razorpay.com). +> + +### Related Information +[Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#shopify) diff --git a/llm-content/payments/magic-checkout/shopify/configuration.md b/llm-content/payments/magic-checkout/shopify/configuration.md new file mode 100644 index 00000000..f1eb4a38 --- /dev/null +++ b/llm-content/payments/magic-checkout/shopify/configuration.md @@ -0,0 +1,1822 @@ +--- +title: Integrate Razorpay Magic Checkout With Shopify Store +heading: Integrate Magic Checkout With Shopify Store +description: Configure COD and shipping charges, COD intelligence, coupons, international shipping and more on your Razorpay Magic Checkout and Shopify Dashboard. +--- + +# Integrate Magic Checkout With Shopify Store + +After you successfully integrate your Shopify website with Magic Checkout, the following configurations are available on your Razorpay and Shopify Dashboard: + +- [Cash on Delivery](#cash-on-delivery) +- [Partial Cash on Delivery](#partial-cash-on-delivery) +- [RTO](#rto) +- [Convert COD Orders to Prepaid](#convert-cod-orders-to-prepaid) +- [Shipping Options](#shipping-options) +- [International Shipping](#international-shipping) +- [Coupons](#coupons) +- [Login with Razorpay](#login-with-razorpay) +- [Offers](#offers) +- [Separate Billing Address](#separate-billing-address) +- [Capture and Validate GSTIN](#capture-and-validate-gstin) +- [Capture Order Instructions](#capture-order-instructions) +- [Google Analytics](#google-analytics) +- [Google Ads](#google-ads) +- [Facebook Ads](#facebook-ads) +- [Gift Card Settings](#gift-card-settings) + +## Cash on Delivery + +You can choose to configure COD using the following methods: + + +### Method 1: Razorpay Dashboard *(Recommended)* + + You can use this setting to enable COD on your store and configure the rules for selectively showing COD to customers based on specific locations, products, order amounts and more. + + +> **WARN** +> +> +> **Watch Out!** +> +> If you configure the COD setting on the Razorpay Dashboard, any COD setting configured on the Shopify store or Advanced Cash on Delivery app will not apply. +> + + Follow the steps given below: + + 1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **Shopify** from the **Platform** drop-down list and enter your Shopify **Store ID**. + 3. Navigate to **COD Setup** → **COD Settings**. + 4. Enable **COD as a payment option**. + ![COD settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-cod-settings.jpg.md) + 5. Select the **Type of setting**. + + ### Type of Setting + + + + Basic + + Configure COD based on the cart value and zones applicable to **all** the products. Follow the steps given below: + + 1. Configure the **Cart order value** by selecting an option based on your requirement: + + + Charge a COD fee to customers who opt for the COD payment method. You can configure the order range and set a corresponding **Fee** accordingly. + 1. Click **+ Add slabs**. + 2. Enter the minimum and maximum order value for which the fee should apply. + 3. Enter the **Delivery price**. For example, if the **Min Order Value** is ₹400, the **Max Order Value** is ₹1000 and the fee is ₹50, a ₹50 COD fee is applied to any order value in this range. + 4. Click **Save slabs**. + ![Create COD eligibility slabs with COD charges](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-cod-slabs.jpg.md) + 5. Click **+ Add rate slabs** if you want to create more slabs. + + + No COD charge will apply within the configured order range. The customer cannot view the COD payment method if an order value does not fall within the configured range. + 1. Click **+ Add slabs**. + 2. Enter the minimum and maximum order value for which no COD charge should apply. For example, if the **Min Order Value** is ₹800 and the **Max Order Value** is ₹1200, the COD charge will not apply if the order value falls in this range. + 3. Click **Save slab**. + ![Create COD eligibility slabs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-free-cod.jpg.md) + 4. Click **+ Add rate slabs** to create more slabs. + + + + +> **WARN** +> +> +> **Watch Out!** +> +> In the **Basic** type of setting, you cannot create overlapping slabs. For example, if you have already set a slab with a minimum order value of ₹200 and a maximum order value of ₹600, you cannot add another slab within that range, such as a minimum order value of ₹300 and a maximum order value of ₹500. +> + + 2. In the **COD zones** section, click **+ Add zones** to create shipping zones where COD is applicable. + 3. Enter the **Zone name**. + 4. Select the country, state and city where the COD charges configured in the previous step should be applicable. Click **Confirm**. + ![Create COD zones](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-cod-zone.jpg.md) + 5. Click **Save & apply**. + 6. Navigate to **Manual Zipcode upload** and click **Upload ZIP codes** to offer COD only to specific ZIP codes. + ![Upload ZIP codes to offer COD only to specific ZIP codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-cod-shipping-pincode.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> - Download the sample CSV file. +> - Enter the ZIP codes as individual rows in column 1. +> - Upload the file in .CSV format. Maximum file size supported is 50 MB. +> - Uploaded ZIP codes are compatible only with Basic COD settings. +> + + 7. Drag the file or click **click to upload**. + + +> **WARN** +> +> +> **Watch Out!** +> +> - You can only upload one file at a time. Uploading another file will overwrite the older file. +> - You cannot edit an uploaded file; you can only delete it and upload a new file. +> + + + + +### Advanced + + Configure COD settings based on the cart value and zones applicable to specific product categories. Follow the steps given below: + + 1. In the **Cart order value** section, click **+ Add slabs**. + 2. Enter the minimum and maximum order value for which the fee should apply. + 3. Enter the **Delivery price**. For example, if the **Min Order Value** is ₹400, the **Max Order Value** is ₹1000 and the fee is ₹50, a ₹50 COD fee will apply to any order value in this range. + + +> **INFO** +> +> +> **Handy Tips** +> +> If you do not want to charge a COD fee, you can create slabs and enter ₹0 as the delivery price. +> + + + 4. Click **Save slab**. + ![Create advanced COD eligibility slabs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-advanced-cod-slabs.jpg.md) + 5. Click **+ Create more slabs** if you want to create more slabs. + 6. In the **COD zones** section, click **+ Add zones** to create shipping zones where COD is applicable. + 7. Enter the **Zone name**. + 8. Select the country, state and city where you want to apply COD charges configured in the previous step. Click **Confirm**. + 9. You can configure COD based on either the zone or product categories. + - **Zone Configuration**: Manage applicable COD slabs and rates for different zones. + 1. Click **+ Set zone configuration**. + ![Set zone configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopif-zone-config.jpg.md) + 2. Select the slabs based on your requirement and click **Save configuration**. It is mandatory to configure all the zones you create. The COD charge applies to each zone based on the slabs you select. + ![Select zone-wise COD slabs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-zone-cod-slabs.jpg.md) + 3. Click **Save & apply**. + - **Product categories**: Create **Product categories** to establish custom rates or zone restrictions for different categories. + 1. Enable the **Product categories** setting. Once you enable this setting, the **Zone configuration** field will not appear. + 2. Click **+ Add categories**. + ![Add product categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-product-cat.jpg.md) + 3. Enter the **Category name**. + 4. Select the products of your choice that you want to add to the category and click **Confirm**. You cannot add the same product in different categories. + 5. Click **+ Create more categories** if you want to add more product categories. + 6. Click **+ Set category configuration** to configure the zones and slabs for each category. + ![Set category configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-product-cat-config.jpg.md) + 7. Select the serviceable zone for the selected category and choose the slabs based on your requirements. For example, if you want to set configurations for the product category, Topwear, select the order range for this category on which COD should apply for each zone. + 8. Click **Save configuration**. It is mandatory to configure slabs for all the zones you create. + ![Config zone and slabs for each category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-category-config.jpg.md) + 9. Click **Save & apply**. + + + + ### Feature + + + +### Block List + + You can create a blocklist for high-risk customers who often return products on delivery, resulting in damaged products during transit, high returns, refund issues and more. + + The customers mentioned in the blocklist based on the order phone number, email ID, device IP and shipping zip code will **not** be eligible for COD. + + +> **INFO** +> +> +> **Handy Tips** +> +> - Only the **Owner** and **Admin** roles have access to this feature. +> - Blocklist will work only if you enable COD as a payment option. +> + + Follow the steps given below: + + 1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **Shopify** from the **Platform** drop-down list and enter your Shopify **Store ID**. + 3. Navigate to **COD Setup** → **Block List**. + 4. Click **+ Add New Blocklist**. + ![Add blocklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-blocklist.jpg.md) + 5. You can either upload a list or enter it manually. + - **To upload a list**: + 1. Download the **sample file**. + 2. Add the required data to the file. A maximum of 1M rows are acceptable in the file. + 3. Upload the file in .CSV format. Maximum file size supported is 50 MB. + - **To manually enter the list**: + 1. Select the **Type** from the drop-down list. + 2. Enter the values. You can enter up to 20 values by separating them with a comma based on the **type**. + + +> **INFO** +> +> +> **Handy Tips** +> +> Enter the values in a valid format as given below: +> - **Phone number**: 10-digit phone number with the country code. For example, +919000090000. +> - **Zip code**: 6-digit zip code. +> - **Device IP**: For example, 123.123.123.123. +> + + 6. Click **Confirm**. + ![Confirm](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-blocklist-confirm.jpg.md) + 7. A pop-up page appears with the list of items added. Review the list and click **Add To Blocklist**. + + The orders that fall under this list will not be eligible for COD. + + + + + + +### Method 2: Shopify Store + + This feature is an alternative to the Advanced Cash on Delivery App. It helps eliminate the dependency on the app to acquire details like COD rates and applicability. We recommend using this feature to configure COD on Shopify based on your requirement. + + 1. Log in to the [Shopify Store](https://accounts.shopify.com/store-login) and navigate to **Products**. + 2. Select the required products to add a COD tag. + ![Select the products to add a COD tag](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cod-configs.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> Considering this is a bulk operation, select products with similar COD rates rather than having to do this individually. For example, if you select 5 products, you can add a single tag that states the COD charge and applies to all 5 products. +> + + 3. Click the options icon below and click **Add tags**. + ![Add the required COD tags](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cod-add-tags.jpg.md) + 4. Enter the COD rate and click **Add CODXXXX**. + + +> **INFO** +> +> +> **Handy Tips** +> +> - The format of the tag is `CODXXXX` (in capital), where XXXX denotes the COD charges of the product. For example, `COD500`. +> - If you want to offer COD with no COD charge, use `COD0000`. +> + + + +> **WARN** +> +> +> **Watch Out!** +> +> Currently, we do not support pincode-based blocking of COD and slab-based rates using this method. +> + + 5. Click **Save**. + ![Enter the COD charge and save the changes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cod-tag-save.jpg.md) + 6. Select a product you added a tag to and view the COD tag under the **Product organization** field to verify the changes. + + + Customer Experience + + Your customers can view the COD charge applied to the product at checkout. + ![Customers view the tag at the checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cod-tag-customer.jpg.md) + + + + + + +## Partial Cash on Delivery + +Enable customers to pay a partial order amount online and use cash on delivery for the remaining balance to reduce order cancellation risk. + +> **WARN** +> +> +> **Watch Out!** +> +> This is an on-demand feature. Write to us at [magic-checkout-support@razorpay.com](mailto:magic-checkout-support@razorpay.com) to get this feature enabled for your account. +> + + +### To enable partial COD: + + 1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **Shopify** from the **Platform** drop-down list and enter your Shopify **Store ID**. + 3. Navigate to **COD Setup** → **Partial COD**. + 4. Turn on **Enable Partial COD** and click **Enable** to confirm. + ![Enable partial COD](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-config-partial-cod-enable.jpg.md) + 5. Select the appropriate check boxes to enable **Partial COD** for specific categories: + - **All Buyers**: Enables Partial COD for all buyers, regardless of risk level. + - **Low Risk Buyers**: Limits Partial COD to low-risk buyers, helping maintain low RTO rates by focusing on safer transactions. + - **Medium Risk Buyers**: Allows Partial COD for medium-risk buyers, providing flexibility while managing moderate RTO potential. + - **High Risk Buyers**: Enables Partial COD for high-risk buyers, which may increase RTO rates but offers selective COD availability for specific cases. + ![enable partial COD for specific categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-config-partial-cod-risk.jpg.md) + 6. You can select a default partial amount or set a custom amount for partial COD. + + + Choose a default amount that will be charged as a partial payment when customers opt for COD. + ![choose a default amount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-config-partial-cod-default-amt.jpg.md) + + + To set a custom amount: + 1. Click **Custom Value**. + 2. Select the value type and enter the value: + - **Custom Percentage**: Define a percentage of the order value the customer must pay upfront as a partial COD amount. For example, if the order value is ₹600 and the percentage is set to 20%, customers will pay ₹120 (20% of ₹600) upfront and the remaining ₹480 via COD. + - **Custom Amount**: Enter a fixed amount that the customer must pay upfront. For example, if the order value is ₹600 and the fixed partial COD amount is ₹150, customers will pay ₹150 online and the remaining amount via COD. + 3. Click **Save**. + ![Enter a custom value](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-config-partial-cod-custom-amt.jpg.md) + + + + +> **WARN** +> +> +> **Watch Out!** +> +> The partial amount cannot exceed 50% of the total order value. If it is higher than 50% of the order value, it will be set to 50%. +> +> For example, if the order value is ₹300 and the partial amount is set at ₹200, 50% of the order value (₹300) is ₹150. Since ₹200 exceeds 50% of ₹300, it will be capped at ₹150. Therefore, the customer will pay ₹150 (50% of ₹300) upfront instead of ₹200 and the remaining via COD. +> + + 6. Click **Save**. + + +> **INFO** +> +> +> **Handy Tips** +> +> Use [Advanced Partial COD Slabs](#set-advanced-partial-cod-slabs) to create price slabs for partial COD within specific order ranges, adjusting amounts based on customer risk categories. +> + + + + Set Advanced Partial COD Slabs + + Set price slabs for partial COD within specific order ranges, allowing different amounts based on customer risk categories. + 1. In the **Partial COD** section, click **Set advanced slabs**. + ![set advanced slabs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-config-partial-cod-set-advanced.jpg.md) + 2. Click **+ New Slab**. + 3. Enter the **Min** and **Max** cart values for which the partial COD amount should apply. + 4. Choose a **Customer Risk** category from the drop-down list: + - **All Buyers**: Enables Partial COD for all buyers, regardless of risk level. + - **Low Risk Buyers**: Limits Partial COD to low-risk buyers, helping maintain low RTO rates by focusing on safer transactions. + - **Medium Risk Buyers**: Allows Partial COD for medium-risk buyers, providing flexibility while managing moderate RTO potential. + - **High Risk Buyers**: Enables Partial COD for high-risk buyers, which may increase RTO rates but offers selective COD availability for specific cases. + 5. In the **Amount to pay** section, select the value type and enter the value: + - **Percentage**: Define a percentage of the order value the customer must pay upfront as a partial COD amount. For example, if you set the range as ₹300 to ₹600 and the percentage to 20%, customers will pay ₹120 (20% of ₹600) upfront and the remaining ₹480 via COD for any order within this range. + - **Amount**: Enter a fixed amount that the customer must pay upfront. For example, if you set the range as ₹300 to ₹600 and the fixed partial COD amount is ₹150, customers will pay ₹150 online and the remaining amount via COD for any order within this range. + + +> **WARN** +> +> +> **Watch Out!** +> +> - Ensure the partial amount set is within the specified order range and does not exceed the maximum order value. For example, if the range is ₹300 to ₹600, the partial amount should not exceed ₹600. +> +> - Avoid overlapping order ranges for each customer risk category. For instance, if you set a range of ₹300 to ₹600 for **Low Risk Buyers**, do not set another overlapping range, such as ₹500 to ₹700, for the same risk category. Each range should be distinct to prevent conflicts. +> + + + 6. Click **Confirm** to save the settings. + ![Partial COD advanced slab settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-config-partial-cod-advanced.jpg.md) + + + + + + +## RTO + +You can either opt for the automated option by enabling COD intelligence or manually review COD orders. + + +### COD Intelligence + + Enable **COD Intelligence** to detect incorrect/non-serviceable addresses. This allows Magic Checkout to decide whether to show a particular customer the cash-on-delivery option based on their buying history, thus increasing the delivery percentage and reducing RTO rates. To enable COD intelligence: + + 1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **Shopify** from the **Platform** drop-down list and enter your Shopify **Store ID**. + 3. Navigate to **RTO Reduction Setup** → **RTO Reduction**. + 4. Toggle on **COD Intelligence** and click **Enable COD Intelligence** in the confirmation pop-up modal. + + ![Enable COD intelligence](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-cod-enable.jpg.md) + + You can disable **COD Intelligence** if required. This will enable the COD option for all the customers, including those considered risky by Magic Checkout. Once you enable COD intelligence, the **RTO Analytics** tab will appear. Know more about [RTO Analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> - Magic Checkout automatically disables the cash on delivery option in case of high-risk customers who often return products on delivery resulting in damaged products during transit, high returns, refund issues and so on. +> - You must enable COD Intelligence if you opt for RTO protection. +> + + + + +### Manually Review COD Orders + + You can manually review COD orders to filter out potential RTO orders and decide whether to provide customers with the COD option based on the insights we provide regarding COD orders. To enable manual review: + + 1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **Shopify** from the **Platform** drop-down list and enter your Shopify **Store ID**. + 3. Navigate to **RTO Reduction Setup** → **RTO Reduction**. + 4. Toggle on **Manually review COD orders**. + ![Manual Review](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-manual-review-shopify.jpg.md) + + Once you enable manual review, you can review the COD orders and take necessary actions. Refer to the [COD Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/review-cod-orders.md#cod-orders) section for the next steps. + + +## Convert COD Orders to Prepaid + +With Magic Checkout, you can urge customers who chose cash on delivery while placing an order to convert COD orders to prepaid by offering discounts or incentives post-order placement. + +Converting orders to prepaid can help you increase order commitment, reduce RTO, streamline operations and enhance customer trust. Know how to [convert COD orders to prepaid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/prepay-cod.md). + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. Write to us at [magic-checkout-support@razorpay.com](mailto:magic-checkout-support@razorpay.com) to get this feature enabled for your account. +> + +## Shipping Options + +You can choose to configure the shipping options using the following methods: + + +### Method 1: Razorpay Dashboard *(Recommended)* + + You can use this setting to configure the shipping rates at a product, zone and method level for your customers. + + +> **WARN** +> +> +> **Watch Out!** +> +> If you configure the shipping setting on the Razorpay Dashboard, any shipping setting configured on any plugins or your ecommerce platform will not apply. +> + + To configure the shipping options based on your requirement: + 1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **Shopify** from the **Platform** drop-down list and enter your Shopify **Store ID**. + 3. Navigate to **Shipping Setup**. + 4. Click **Add Profile** in the **Custom Shipping Profile** section. + ![Navigate to Shipping settings on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-shipping-settings.jpg.md) + 5. Click **+ Add category** in the **Product categories** section. + ![Add product categories to configure shipping](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-wooc-shipping-category.jpg.md) + 6. Enter the **Category name** and select the products of your choice. You cannot add the same product in other categories. Click **Confirm**. + 7. Click **+ Add zones** in the **Shipping zone** section to create zones where shipping is applicable. + 8. Enter the **Zone name** and select the country, state and city of your choice. + ![Add shipping zones to determine the shipping charges for each zone](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-add-shipping-zone.jpg.md) + 9. Click **+ Upload ZIP codes** to offer shipping only to specific ZIP codes. You can either upload the ZIP codes in this profile or in the default shipping profile. + + +> **INFO** +> +> +> **Handy Tips** +> +> - Download the sample CSV file. +> - Enter the ZIP codes as individual rows in column 1. +> - Upload the file in .CSV format. Maximum file size supported is 50 MB. +> - Uploaded ZIP codes are compatible only with Basic COD settings. +> + + 10. Drag the file or click **click to upload**. + + +> **WARN** +> +> +> **Watch Out!** +> +> - You can only upload one file at a time. Uploading another file will overwrite the older file. +> - You cannot edit an uploaded file; you can only delete it and upload a new file. +> + + 11. Click **+ Add shipping method** and configure the **Shipping method & rate** for all the shipping zones added in the previous step. + ![Configure the shipping rates for each zone](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-shipping-method.jpg.md) + 12. Enter the **Delivery Name** and **Description** of your choice which will appear to your customers on Magic Checkout. + 13. Enter the **Rate** for the delivery and enable the **COD availability** if you want to show the cash on delivery payment option on checkout at the shipping method level. + 14. Configure the Shipping slab based on the **Amount** and **Weight** of the product and enter the minimum and maximum values respectively. For example, enter the minimum-maximum value as ₹500-₹900. If the amount of the product falls in that range, a shipping rate is applicable on the product. + ![Configure the shipping method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-configure-shipping-method.jpg.md) + 15. Enable **Display Delivery in** option to display the estimated timeline for the customers on checkout. + 16. Enter the estimated delivery timeline and click **Confirm**. + ![Configure the shipping method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-configure-shipping-delivery.jpg.md) + 17. Once you configure all the shipping zones, click **Go Back**. + 18. Click **+ Set Default Profile** in the **Default Shipping profile** section. Follow all the steps from 7 to 15 to configure the profile. + + +> **WARN** +> +> +> **Watch Out!** +> +> - It is mandatory to configure the default shipping profile. +> - By default, the shipping settings configured is applicable for products which **do not** belong to any other shipping profile. +> + + 19. Enable **Magic Shipping**. To confirm the action, click **Yes, enable**. + + +> **WARN** +> +> +> **Watch Out!** +> +> Once you enable **Magic Shipping**, it surpasses all shipping configurations from any plugins or your E-commerce platform and prioritises our configurations. +> + + ![Enable Shipping settings on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-magic-enable-shipping-settings.jpg.md) + + + +### Method 2: Shopify Store + + Follow the steps given below: + + 1. Log in to the [Shopify Store](https://accounts.shopify.com/store-login) and navigate to **Settings** → **Shipping and delivery**. + ![Shopify shipping](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-shipping.jpg.md) + 2. Create a profile under general or custom shipping rates and add the required details. + - **General Shipping Rates**: Create a profile for all products. With this, you charge a standard shipping rate on certain products. + - **Custom Shipping Rates**: Create an individual shipping rate for a certain product. + + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot list the same products under general and custom shipping rates. You can list a product under only one shipping rate. +> + + + ![Profile for general or custom shipping rates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-profile.jpg.md) + 3. After creating a profile, click **Manage** to navigate to the shipping settings under that profile. + ![Edit shipping settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-manage.jpg.md) + 4. Click **Create shipping zone** and add zones of your choice. Click **Done**. + ![Shipping zones](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-shipping-zone.jpg.md) + 5. Click **Add rate** to add the shipping rates. You can create multiple shipping rates/options you want to show to your customers on Magic Checkout. + ![Add shipping rates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-add-rate.jpg.md) + 6. Select **Set up your own rates**. Follow the steps given below: + 1. Enter your **Rate name**, for example, Standard Shipping Charges. Customers will view this at Checkout. + 1. Enter the **Price**. + 1. Add conditions if required. You can add conditions based on **item weight** or **order price**. Enter the required details. + 1. Click **Done**. + ![Set up your own rates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-own-rate.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> You can create multiple shipping options by charging extra for cash on delivery. Know how to [create multiple shipping rates](#cash-on-delivery-shipping-rates). +> + + + +## International Shipping + +You can allow customers to enter an international PIN code for delivery. + + +### To enable international shipping: + + 1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **Shopify** from the **Platform** drop-down list and enter your Shopify **Store ID**. + 3. Navigate to **Shipping Setup** and enable **International Shipping**. + ![International shipping](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-international.jpg.md) + + +## Coupons + +You can choose to offer discounts to your customers by adding coupons using the following methods: + + +### Method 1: Razorpay Dashboard + + + +> **WARN** +> +> +> **Watch Out!** +> +> - Coupons created on both the Razorpay Dashboard and Shopify can be auto-applied. +> - Coupons created on Shopify using its Discount Creation Dashboard flow can be auto-applied. +> - Coupons created on the Razorpay Dashboard cannot be synced on Shopify. +> + + + To create coupons: + + 1. Once the feature is enabled, log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. In the **Checkout Setup** tab, enable **Auto fetch coupon** and click **Save settings**. This step is mandatory and allows you to display coupons to your customers at checkout. Even if you enable **Display this coupon at checkout** in the next steps, you must still enable Auto fetch coupon. + ![enable auto fetch coupon to display coupons to customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-auto-fetch.jpg.md) + 3. Navigate to **Coupons** → **Setup**. + 4. Enable the following, as required: + 1. **Enable Coupons**: Allows customers to make the coupons accessible on checkout for your customers. Once you enable this all the coupons created on Shopify will stop working immediately if not synced. + 2. **Auto-apply best coupon**: Automatically applies the coupon with the best value from those available. + 3. **Let users combine coupons**: Lets customers apply multiple coupons at checkout. You can configure specific rules for each coupon. + ![Enable toggles to configure coupons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-toggle.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> When you create coupons on the Razorpay Dashboard, all the coupons created on Shopify will not apply unless they are synced. To sync all coupons, navigate to **Setup** on the Razorpay Dashboard and click **Sync now** next to the **Coupons from Shopify** section. Set the sync duration and click **Start sync**. +> +> - By default, all the coupons synced from Shopify are in the `created` state. You must manually configure and publish the coupons. To configure a coupon, identify the one you want to publish, click the options icon and click **View and Edit** *(if required)* or click **Publish**. +> +> +> Watch the GIF below: +> +> ![publish the coupons synced from Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-publish-sync-shopify.gif.md) +> +> +> +> - All newly created coupons will be automatically synced after the initial sync. You must manually configure and publish the coupons. +> - Only the following coupons will be synced from Shopify: (currently, multiple collections are not synced) +> - Amount discounted on orders +> - Amount discounted on products +> - Buy X Get Y (if minimum quantity configured) +> + + 5. Navigate to **All Coupons**, click **+ Create Coupon** and **Select a Coupon Type** based on your requirement. Alternatively, you can click **+ Create Coupon** next to **Coupons on Magic** in the **Setup** section and **Select a Coupon Type**. + ![Create a coupon](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-create.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> The steps from 6 to 10 given below are common for all types of coupons. +> + + + 6. Enter the **Coupon Code**. Your customers can view the coupon code at checkout. + 7. Enter the **Coupon description**. Your customers can view the coupon description at checkout. + 8. Select the **Display this coupon at checkout** check box to display the coupon at checkout for your customers. + 1. After selecting the above check box, the **Enable coupon as an unavailable coupon** check box appears. + 2. Select this check box if you want to display the coupon as unavailable (in a disabled state) when users do not meet the cart or eligibility conditions. Once the conditions are met, the coupon is automatically enabled. + 9. Select the **Enable this coupon code only for Prepaid Payment methods** check box to disable the COD payment option for customers and nudge them to pay via prepaid methods. *(optional)* + 10. Select the **Automatically apply this coupon for eligible users** check box to automatically apply the coupon with the best value from those available. + ![Enter the coupon code and description](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-code.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> To completely hide the COD payment option in a disabled state throughout the modal, navigate to **Setup & Settings** → **Platform Settings**. Enable the **Hide COD payment method when disabled** option and click **Save settings**. +> ![To hide COD payment method when disabled](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-coupons-hide-cod.jpg.md) +> + + #### Coupon Type + + Select a coupon type from the following: + + + + Amount discounted on orders + + To discount the total order amount: + + +> **INFO** +> +> +> **Handy Tips** +> +> Before you begin, follow steps 6 to 10 given above, which are common for all coupon types. +> + + + 1. **Discount Details**: Select the **Discount type**. + + + In this type, a fixed amount is deducted from the original amount. + + **Discount amount**: Enter an amount by which the original price should be reduced. For example, if ₹150 is the flat discount applied, ₹150 is deducted from the original price. + ![Configure the fixed discount details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-discount.jpg.md) + + + This type deducts a set percentage of the amount from the original amount. + - **Discount percentage**: The percentage by which the original price should be reduced. For example, if 10% discount is applied, on an order amount of ₹900, ₹90 will be deducted. + - **Upto (Max Discount)**: The maximum amount that can be deducted from the bill amount. For example, if the max discount is ₹300 and the order amount is ₹800, you can ensure that the customer cannot avail of a discount higher than ₹300. + ![Configure the percentage discount details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-discount-percentage.jpg.md) + + + 2. Select the **Purchase requirements** based on your preference to set eligibility criteria for the customers to use the coupon. + + + By default, the coupon is visible to all the customers irrespective of the quantity or amount. + ![Configure purchase requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-pur-req.jpg.md) + + + You can set a minimum quantity for customers to access the coupon. For example, if you set the minimum quantity as 2, the customers can use the coupon only if there are 2 or more items in their cart. + ![Configure minimum quantity requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-qt.jpg.md) + + + You can set a minimum amount for customers to use the coupon. For example, if you set the minimum amount requirements as ₹300, the customers can use the coupon only if the cart value is ₹300 or above. + ![Configure minimum amount requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-amt.jpg.md) + + + 3. **Coupon validity**: Set the duration for the coupon. + 1. **Active dates**: Set the **Start date** and **Start time**. + 1. Select the **Set an end date** check box and set the **End date** and **End time**. *(optional)* + 1. **Total maximum budget** *(Optional)*: Set an amount to expire the coupon when the total discount to be offered to all your customers is reached. For example, if you set ₹10,000 as the total maximum budget, once the budget limit is reached, the coupon code gets expired and is not visible at checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> The coupon will never expire if you do not set an end date or a total maximum budget. +> + + + ![Configure the coupon validity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-validity.jpg.md) + 4. **Coupon eligibility**: Create the coupon for **All customers** or **Specific customers**. If you want to create coupons for specific customers: + 1. Click **+ Add Customers**. + ![Configure the coupon eligibility](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-eligibility.jpg.md) + 1. You can upload a list of **Mobile Number** or **Email ID** based on your requirement. + + +> **WARN** +> +> +> **Watch Out!** +> +> If you want to create specific coupons based on the **Email ID**, ensure the **Email** field on checkout is not set as optional and is not hidden from checkout. +> + + 1. Click **Download Sample File** and add the required data to the sample file. Ensure the data is formatted correctly and save the file. + + +> **INFO** +> +> +> **To Upload File:** +> +> - Enter the values in a valid format as given below: +> - Mobile number: +919000090000 +> - Email id: gauravkumar@example.com +> - CSV file should not have any header/column title. +> - Maximum acceptable rows in the file is 1 million. +> - Upload the file in .CSV format. Maximum file size supported is 50 MB. +> + + + 1. Select **click to upload** and choose the file you want to import. Click **Confirm**. + 5. **Usage restriction**: Set the maximum limit to which a coupon is redeemed in total and per customer. + 1. Select the **Number of times discount can be used in total** check box and set the number. For example, 100. + 1. Select the **Number of times the coupon can be used per customer** check box and set the number. For example, 2. + 1. Select **By mobile no.** or **By email id** via which the customer can use the coupon. + ![configure coupon restriction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-restriction.jpg.md) + 6. **Coupon combinations** *(optional)*: You can combine this coupon with various other coupons as follows: + - **Amount off product coupons**: Combine this coupon with a coupon created in the **Amount discounted on products** category to offer a discount on the total order amount and specific products or collections of products. + - **Other Amount off order coupons**: Combine this coupon with other coupons created in the same category to offer multiple discounts on the total order amount. + - **Free shipping coupons**: Combine this coupon with **Free shipping coupons** to provide free shipping along with the discount. If you select **Free shipping coupons** in this category then you must select the **Amount off order coupons** check box in the **Free Shipping** category to combine the coupon. + ![Combine coupons created with other categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-order-combine.jpg.md) + + + +> **WARN** +> +> +> **Watch Out!** +> - This is an on-demand feature. Write to us at [magic-checkout-support@razorpay.com](mailto:magic-checkout-support@razorpay.com) to get this feature enabled for your account. +> - You can combine two coupons only if you select the same check box in both coupons. For example: +> +> +> If you want to combine two coupons created in the **Amount discounted on orders** category, you must select the **Other Amount off order coupons** check box in both coupons. +> +> +> If you want to combine a coupon from the **Amount discounted on orders** category with a coupon from the **Amount discounted on products** category, you need to select the appropriate check boxes: +> - Select the **Amount off product coupons** check box in the **Amount discounted on orders** category coupon. +> - Select the **Amount off order coupons** check box in the **Amount discounted on products** category coupon. +> +> +> - You cannot combine specific coupons selectively within a category or across categories. For example: +> +> +> If you have coupons C1, C2 and C3 created in the **Amount discounted on orders** category and you select the **Other Amount off order coupons** check box for all three, all three coupons will be combined. You cannot choose to combine only C1 and C2 without including C3. +> +> +> If you have coupons B1 and B2 created in the **Amount discounted on products** category and C1 and C2 created in the **Amount discounted on orders** category and you select: +> - **Other Amount off product coupons** and **Amount discounted on orders** check boxes for B1 and B2. +> - **Other Amount off order coupons** and **Amount off product coupons** check boxes for C1 and C2. +> +> Then B1, B2, C1 and C2 will all be combined. You cannot selectively combine only B1 and C1 if the respective check boxes are selected for all the coupons created. +> +> +> +> - In summary, selecting the check box allows all coupons within the same or different category to be combined, rather than combining specific coupons selectively. +> + + 7. Click **Create and Publish**. + + + +### Amount discounted on products + + To discount **specific** products or collection of products: + + +> **INFO** +> +> +> **Handy Tips** +> +> Before you begin, follow steps 6 to 10 given above, which are common for all coupon types. +> + + 1. **Discount Details**: Select the **Discount type**. + + + In this type, a fixed amount is deducted from the original amount. + + **Discount amount**: Enter an amount by which the original price should be reduced. For example, if ₹150 is the flat discount applied, ₹150 is deducted from the original price. + ![Configure the fixed discount details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-discount.jpg.md) + + + This type deducts a set percentage of the amount from the original amount. + - **Discount percentage**: The percentage by which the original price should be reduced. For example, if 10% discount is applied, on an order amount of ₹900, ₹90 will be deducted. + - **Upto (Max Discount)**: The maximum amount that can be deducted from the bill amount. For example, if the max discount is ₹300 and the order amount is ₹800, you can ensure that the customer cannot avail of a discount higher than ₹300. + ![Configure the percentage discount details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-discount-percentage.jpg.md) + + + 2. Select **Products** or **Collections** to limit the discount to specific products or collections. Click **+ Add Products** or **+ Add Collections** respectively. Select the products or collections based on your requirement and click **Confirm**. You can add multiple products or collections. + + ![configure the discount details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-discount-det.jpg.md) + + 3. Select the **Purchase requirements** based on your preference to set eligibility criteria for the customers to use the coupon. + + + By default, the coupon is visible to all the customers irrespective of the quantity or amount. + ![Configure purchase requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-pur-req.jpg.md) + + + You can set a minimum quantity for customers to access the coupon. For example, if you set the minimum quantity as 2, the customers can use the coupon only if there are 2 or more items in their cart. + ![Configure minimum quantity requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-qt.jpg.md) + + + You can set a minimum amount for customers to use the coupon. For example, if you set the minimum amount requirements as ₹300, the customers can use the coupon only if the cart value is ₹300 or above. + ![Configure minimum amount requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-amt.jpg.md) + + + 4. **Coupon validity**: Set the duration for the coupon. + 1. **Active dates**: Set the **Start date** and **Start time**. + 1. Select the **Set an end date** check box and set the **End date** and **End time**. *(optional)* + 1. **Total maximum budget** *(Optional)*: Set an amount to expire the coupon when the total discount to be offered to all your customers is reached. For example, if you set ₹10,000 as the total maximum budget, once the budget limit is reached, the coupon code gets expired and is not visible at checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> The coupon will never expire if you do not set an end date or a total maximum budget. +> + + ![Configure the coupon validity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-validity.jpg.md) + 5. **Coupon eligibility**: Create the coupon for **All customers** or **Specific customers**. If you want to create coupons for specific customers: + 1. Click **+ Add Customers**. + ![Configure the coupon eligibility](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-eligibility.jpg.md) + 1. You can upload a list of **Mobile Number** or **Email ID** based on your requirement. + + +> **WARN** +> +> +> **Watch Out!** +> +> If you want to create specific coupons based on the **Email ID**, ensure the **Email** field on checkout is not set as optional and is not hidden from checkout. +> + + 1. Click **Download Sample File** and add the required data to the sample file. Ensure the data is formatted correctly and save the file. + + +> **INFO** +> +> +> **To Upload File:** +> +> - Enter the values in a valid format as given below: +> - Mobile number: +919000090000 +> - Email id: gauravkumar@example.com +> - CSV file should not have any header/column title. +> - Maximum acceptable rows in the file is 1 million. +> - Upload the file in .CSV format. Maximum file size supported is 50 MB. +> + + 1. Select **click to upload** and choose the file you want to import. Click **Confirm**. + 6. **Usage restriction**: Set the maximum limit to which a coupon is redeemed in total and per customer. + 1. Select the **Number of times discount can be used in total** check box and set the number. For example, 100. + 1. Select the **Number of times the coupon can be used per customer** check box and set the number. For example, 2. + 1. Select **By mobile no.** or **By email id** via which the customer can use the coupon. + ![configure coupon restriction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-restriction.jpg.md) + 7. **Coupon combinations** *(optional)*: You can combine this coupon with various other coupons as follows: + - **Amount off order coupons**: Combine this coupon with a coupon created in the **Amount discounted on order** category to offer a discount on the total order amount and specific products or collections of products. + - **Other Amount off product coupons**: Combine this coupon with other coupons created in the same category to offer multiple discounts on specific products or collections of products. + - **Free shipping coupons**: Combine this coupon with **Free shipping coupons** to provide free shipping along with the discount. If you select **Free shipping coupons** in this category then you must select the **Amount off product coupons** check box in the **Free Shipping** category to combine the coupon. + ![Combine coupons created with other categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-prod-combine.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> - This is an on-demand feature. Write to us at [magic-checkout-support@razorpay.com](mailto:magic-checkout-support@razorpay.com) to get this feature enabled for your account. +> - You can combine two coupons only if you select the same check box in both coupons. For example: +> +> +> If you want to combine two coupons created in the **Amount discounted on products** category, you must select the **Other Amount off product coupons** check box in both coupons. +> +> +> If you want to combine a coupon from the **Amount discounted on orders** category with a coupon from the **Amount discounted on products** category, you need to select the appropriate check boxes: +> - Select the **Amount off product coupons** check box in the **Amount discounted on orders** category coupon. +> - Select the **Amount off order coupons** check box in the **Amount discounted on products** category coupon. +> +> +> - You cannot combine specific coupons selectively within a category or across categories. For example: +> +> +> If you have coupons B1, B2 and B3 created in the **Amount discounted on products** category and you select the **Other Amount off product coupons** check box for all three, all three coupons will be combined. You cannot choose to combine only B1 and B2 without including B3. +> +> +> If you have coupons B1 and B2 created in the **Amount discounted on products** category and C1 and C2 created in the **Amount discounted on orders** category and you select: +> - **Other Amount off product coupons** and **Amount discounted on orders** check boxes for B1 and B2. +> - **Other Amount off order coupons** and **Amount off product coupons** check boxes for C1 and C2. +> +> Then B1, B2, C1 and C2 will all be combined. You cannot selectively combine only B1 and C1 if the respective check boxes are selected for all the coupons created. +> +> +> +> - In summary, selecting the check box allows all coupons within the same or different category to be combined, rather than combining specific coupons selectively. +> + + 8. Click **Create and Publish**. + + + +### Buy X Get Y + + In the Buy X Get Y scenario, you must convey to your customers that to use this coupon, both the X and Y products should be present in their cart. For example, if the coupon offers a discount on a cap or provides it for free when you buy a tshirt, both items must be in your cart for the discount to apply. To discount products based on customer's purchase: + + +> **INFO** +> +> +> **Handy Tips** +> +> Before you begin, follow steps 6 to 10 given above, which are common for all coupon types. +> + + 1. Configure the **Purchase requirements** for X products based on your preference to set eligibility criteria for the customers to avail of the coupon offer. + + + You can set a minimum quantity for customers. For example, if you set the minimum quantity as 3, the customers can use the coupon only if there are 3 or more items in their cart. + ![Configure minimum quantity requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-qt-buy.jpg.md) + + + You can set a minimum purchase amount for customers. For example, if you set the minimum purchase amount as ₹300, the customers can use the coupon only if the cart value is ₹300 and above. + ![Configure minimum amount requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-amt-buy.jpg.md) + + + + 2. Select **Products** or **Collections** to limit the discount to specific products or collections. Click **+ Add Products** or **+ Add Collections** respectively. Select the products or collections based on your requirement and click **Confirm**. You can add multiple products or collections. + + ![Configure coupon products purchased](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-product-config.jpg.md) + + 3. Configure the **Additional products offered** for Y products based on your preference. For example, if you set the purchase requirement as 3 and additional products offered quantity as 2, the customers can buy 3 products and get a discount on 2 additional products. + 4. Select **Products** or **Collections** for Y products as well. Refer to step 2. + ![Configure coupon discount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-discount-offered.jpg.md) + 5. **Discount type**: Select the **Discount type** applicable on Y products. + + + - **Fixed Discount**: In this type, a fixed amount is deducted from the original amount of the Y product. + - **Discount amount**: Enter an amount by which the original price should be reduced. For example, if ₹150 is the flat discount applied, ₹150 is deducted from the original price. + ![configure fixed discount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-fixed-dis.jpg.md) + - **Percentage discount**: In this type, a set percentage of the amount is deducted from the original amount of the Y product. + - **Discount percentage**: The percentage by which the original price should be reduced. For example, if 10% discount is applied, on an order amount of ₹900, ₹90 will be deducted. + ![configure percentage discount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-percentage-dis.jpg.md) + + + In this type, customers can get the Y product for free. + ![configure free discount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-free-discount.jpg.md) + + + 6. **Usage Limit**: Specify the maximum number of Y products that qualify for a discount. For instance, if the customer adds 2 Y products to the cart and you set the usage limit at 1, the discount applies to only 1 of the Y products. + 7. **Coupon validity**: Set the duration for the coupon. + 1. **Active dates**: Set the **Start date** and **Start time**. + 1. Select the **Set an end date** check box and set the **End date** and **End time**. *(optional)* + 1. **Total maximum budget** *(Optional)*: Set an amount to expire the coupon when the total discount to be offered to all your customers is reached. For example, if you set ₹10,000 as the total maximum budget, once the budget limit is reached, the coupon code gets expired and is not visible at checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> The coupon will never expire if you do not set an end date or a total maximum budget. +> + + ![Configure the coupon validity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-validity.jpg.md) + 8. **Coupon eligibility**: Create the coupon for **All customers** or **Specific customers**. If you want to create coupons for specific customers: + 1. Click **+ Add Customers**. + ![Configure the coupon eligibility](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-eligibility.jpg.md) + 1. You can upload a list of **Mobile Number** or **Email ID** based on your requirement. + + +> **WARN** +> +> +> **Watch Out!** +> +> If you want to create specific coupons based on the **Email ID**, ensure the **Email** field on checkout is not set as optional and is not hidden from checkout. +> + + 1. Click **Download Sample File** and add the required data to the sample file. Ensure the data is formatted correctly and save the file. + + +> **INFO** +> +> +> **To Upload File:** +> +> - Enter the values in a valid format as given below: +> - Mobile number: +919000090000 +> - Email id: gauravkumar@example.com +> - CSV file should not have any header/column title. +> - Maximum acceptable rows in the file is 1 million. +> - Upload the file in .CSV format. Maximum file size supported is 50 MB. +> + + 1. Select **click to upload** and choose the file you want to import. Click **Confirm**. + 9. **Coupon combinations** *(optional)*: Combine this coupon with **Free shipping coupons** to provide free shipping along with the discount. If you select **Free shipping coupons** in this category then you must select the **BxGy discount coupons** check box in the **Free Shipping** category to combine the coupon. + ![Combine this coupon with free shipping](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-free-combine.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> This is an on-demand feature. Write to us at [magic-checkout-support@razorpay.com](mailto:magic-checkout-support@razorpay.com) to get this feature enabled for your account. +> + + + 10. Click **Create and Publish**. + + + +### Bulk discount + + To offer a discount on a bulk order: + + +> **INFO** +> +> +> **Handy Tips** +> +> Before you begin, follow steps 6 to 10 given above, which are common for all coupon types. +> + + 1. Configure the **Purchase requirements** for products based on your preference to set eligibility criteria for the customers to avail of the coupon offer. You can set a minimum quantity for customers. For example, if you set the minimum quantity as 20, the customers can use the coupon only if there are 20 or more items in their cart. + 2. Select **Products** or **Collections** to limit the discount to specific products or collections. Click **+ Add Products** or **+ Add Collections** respectively. Select the products or collections based on your requirement and click **Confirm**. You can add multiple products or collections. + + ![Configure coupon products purchased](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-product-config-bulk.jpg.md) + + 3. Select the **Discount type**. + + + - **Fixed Discount**: In this type, a fixed amount is deducted from the original amount of the Y product. + - **Discount amount**: Enter an amount by which the original price should be reduced. For example, if ₹150 is the flat discount applied, ₹150 is deducted from the original price. + ![configure fixed discount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-fixed-dis-bulk.jpg.md) + - **Percentage discount**: In this type, a set percentage of the amount is deducted from the original amount of the Y product. + - **Discount percentage**: The percentage by which the original price should be reduced. For example, if 10% discount is applied, on an order amount of ₹900, ₹90 will be deducted. + ![configure percentage discount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-percentage-dis-bulk.jpg.md) + + + In this type, you can define a flat pricing per product. + - **Price offered per product**: Enter a discounted product rate. For example, if a single product costs ₹500, you can define the discounted rate as ₹440. + ![configure rate per product discount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-rate-dis.jpg.md) + + + 4. **Usage Limit**: Specify the maximum number of products that qualify for a discount. For instance, if the customer adds 20 products to the cart and you set the usage limit at 8, the discount applies to only 8 of the products. + 5. **Coupon validity**: Set the duration for the coupon. + 1. **Active dates**: Set the **Start date** and **Start time**. + 1. Select the **Set an end date** check box and set the **End date** and **End time**. *(optional)* + 1. **Total maximum budget** *(Optional)*: Set an amount to expire the coupon when the total discount to be offered to all your customers is reached. For example, if you set ₹10,000 as the total maximum budget, once the budget limit is reached, the coupon code gets expired and is not visible at checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> The coupon will never expire if you do not set an end date or a total maximum budget. +> + + ![Configure the coupon validity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-validity-bulk.jpg.md) + 6. **Coupon eligibility**: Create the coupon for **All customers** or **Specific customers**. If you want to create coupons for specific customers: + 1. Click **+ Add Customers**. + ![Configure the coupon eligibility](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-eligibility.jpg.md) + 1. You can upload a list of **Mobile Number** or **Email ID** based on your requirement. + + +> **WARN** +> +> +> **Watch Out!** +> +> If you want to create specific coupons based on the **Email ID**, ensure the **Email** field on checkout is not set as optional and is not hidden from checkout. +> + + 1. Click **Download Sample File** and add the required data to the sample file. Ensure the data is formatted correctly and save the file. + + +> **INFO** +> +> +> **To Upload File:** +> +> - Enter the values in a valid format as given below: +> - Mobile number: +919000090000 +> - Email id: gauravkumar@example.com +> - CSV file should not have any header/column title. +> - Maximum acceptable rows in the file is 1 million. +> - Upload the file in .CSV format. Maximum file size supported is 50 MB. +> + + 1. Select **click to upload** and choose the file you want to import. Click **Confirm**. + 7. **Usage restriction**: Set the maximum limit to which a coupon can be redeemed in total and per customer. + 1. Select the **Number of times discount can be used in total** check box and set the number. For example, 100. + 1. Select the **Number of times the coupon can be used per customer** check box and set the number. For example, 2. + 1. Select **By mobile no.** or **By email id** via which the customer can use the coupon. + ![configure coupon restriction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-restriction.jpg.md) + 8. **Coupon combinations** *(optional)*: Combine this coupon with **Free shipping coupons** to provide free shipping along with the discount. If you select **Free shipping coupons** in this category then you must select the **Bulk discount coupons** check box in the **Free Shipping** category to combine the coupon. + ![Combine this coupon with free shipping](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-free-combine.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> This is an on-demand feature. Write to us at [magic-checkout-support@razorpay.com](mailto:magic-checkout-support@razorpay.com) to get this feature enabled for your account. +> + + 9. Click **Create and Publish**. + + + +### Free shipping + + To offer free shipping on an order: + + +> **INFO** +> +> +> **Handy Tips** +> +> Before you begin, follow steps 6 to 10 given above, which are common for all coupon types. +> + + + +> **WARN** +> +> +> **Watch Out!** +> +> We do not support country-based shipping if this coupon is created on the Razorpay Dashboard. If you provide international shipping, it will apply to all countries. +> + + 1. Select the **Purchase requirements** based on your preference to set eligibility criteria for the customers to use the coupon. + + + By default, the coupon is visible to all the customers irrespective of the quantity or amount. + ![Configure purchase requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-pur-req.jpg.md) + + + You can set a minimum quantity for customers to access the coupon. For example, if you set the minimum quantity as 2, the customers can use the coupon only if there are 2 or more items in their cart. + ![Configure minimum quantity requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-qt.jpg.md) + + + You can set a minimum amount for customers to use the coupon. For example, if you set the minimum amount requirements as ₹300, the customers can use the coupon only if the cart value is ₹300 or above. + ![Configure minimum amount requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-amt.jpg.md) + + + 2. **Coupon validity**: Set the duration for the coupon. + 1. **Active dates**: Set the **Start date** and **Start time**. + 1. Select the **Set an end date** check box and set the **End date** and **End time**. *(optional)* + 1. **Total maximum budget** *(Optional)*: Set an amount to expire the coupon when the total discount to be offered to all your customers is reached. For example, if you set ₹10,000 as the total maximum budget, once the budget limit is reached, the coupon code gets expired and is not visible at checkout. + 3. **Coupon eligibility**: Create the coupon for **All customers** or **Specific customers**. If you want to create coupons for specific customers: + 1. Click **+ Add Customers**. + 1. You can upload a list of **Mobile Number** or **Email ID** based on your requirement. + + +> **WARN** +> +> +> **Watch Out!** +> +> If you want to create specific coupons based on the **Email ID**, ensure the **Email** field on checkout is not set as optional and is not hidden from checkout. +> + + 1. Click **Download Sample File** and add the required data to the sample file. Ensure the data is formatted correctly and save the file. + + +> **INFO** +> +> +> **To Upload File:** +> +> - Enter the values in a valid format as given below: +> - Mobile number: +919000090000 +> - Email id: gauravkumar@example.com +> - CSV file should not have any header/column title. +> - Maximum acceptable rows in the file is 1 million. +> - Upload the file in .CSV format. Maximum file size supported is 50 MB. +> + + 1. Select **click to upload** and choose the file you want to import. Click **Confirm**. + ![Configure details for free shipping coupon](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-free.jpg.md) + 4. **Usage restriction**: Set the maximum limit to which a coupon can be redeemed in total and per customer. + 1. Select the **Number of times discount can be used in total** check box and set the number. For example, 100. + 1. Select the **Number of times the coupon can be used per customer** check box and set the number. For example, 2. + 1. Select **By mobile no.** or **By email id** via which the customer can use the coupon. + ![configure coupon restriction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-restriction.jpg.md) + 5. **Coupon combinations** *(optional)*: You can combine this coupon with various other coupons as follows: + - **Amount off product coupons**: Combine this coupon with a coupon created in the **Amount discounted on product coupons** category to offer a discount on the specific products or collect of products and free shipping. + - **Amount off order coupons**: Combine this coupon with a coupon created in the **Amount discounted on order coupons** category to offer a discount on the total order amount and free shipping. + - **Bulk discount coupons**: Combine this coupon with a coupon created in the **Amount discounted on product coupons** category to offer a discount on a bulk order and free shipping. + - **BxGy discount coupons**: Combine this coupon with a coupon created in the **Amount discounted on product coupons** category to offer a discount on products based on customer's purchase and free shipping. + - **Freebie item coupons**: Combine this coupon with a coupon created in the **Freebie item coupon** category to offer a free gift to customers when their cart meets specific conditions. + + ![Combine this coupon created with other categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupons-free-combine.jpg.md) + + + +> **WARN** +> +> +> **Watch Out!** +> +> - This is an on-demand feature. Write to us at [magic-checkout-support@razorpay.com](mailto:magic-checkout-support@razorpay.com) to get this feature enabled for your account. +> - If you select **Amount off product coupons**, **Amount off order coupons**, **Bulk discount coupons** or/and **BxGy discount coupons** in this category then you must select the **Free shipping coupons** check box in the respective category to combine the coupon. +> + + + 6. Click **Create and Publish**. + + + +### Freebie Item + + Create coupons to offer a free gift to customers when their cart meets specific conditions. For example, offer a free item when the cart value exceeds ₹1,000. + + +> **INFO** +> +> +> **Handy Tips** +> +> Before you begin, follow steps 5 to 7 given above, which are common for all coupon types. +> + + 1. Configure the **Purchase requirements** for products based on your preference to set eligibility criteria for the customers to avail of the coupon offer. + + + You can set a minimum quantity for customers. For example, if you set the minimum quantity as 3, the customers can use the coupon only if there are 3 or more items in their cart. + ![Configure minimum quantity requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-qt-buy.jpg.md) + + + You can set a minimum purchase amount for customers. For example, if you set the minimum purchase amount as ₹300, the customers can use the coupon only if the cart value is ₹300 and above. + ![Configure minimum amount requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-min-amt-buy.jpg.md) + + + + 2. Select **Products** or **Collections** to limit the discount to specific products or collections. Click **+ Add Products** or **+ Add Collections** respectively. Select the products or collections based on your requirement and click **Confirm**. You can add multiple products or collections. + + ![Configure coupon products purchased](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-product-config.jpg.md) + + 3. **Discount Offered**: Select one product variant to offer as a free gift when the purchase requirements are met: + + +> **WARN** +> +> +> **Watch Out!** +> +> You must maintain sufficient inventory of the free product to ensure the coupon works smoothly and provides a seamless experience for your customers. +> + + + 1. Click **+Add Products**. + ![Select a product to offer free item discount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-magic-freebie-discount.jpg.md) + 1. Select the product of your choice and click **Confirm**. + 4. **Usage Limit**: Select the **Maximum uses per order** check box and specify the maximum number of products that qualify for a discount. For instance, if the customer adds 2 products to the cart and you set the usage limit at 1, the discount applies to only 1 of the products. + 5. **Coupon validity**: Set the duration for the coupon. + 1. **Active dates**: Set the **Start date** and **Start time**. + 1. Select the **Set an end date** check box and set the **End date** and **End time**. *(optional)* + 1. **Total maximum budget** *(Optional)*: Set an amount to expire the coupon when the total discount to be offered to all your customers is reached. For example, if you set ₹10,000 as the total maximum budget, once the budget limit is reached, the coupon code gets expired and is not visible at checkout. + + +> **WARN** +> +> +> **Watch Out!** +> - For Freebie coupons, the budget will be calculated based on the total price of the free products. +> - The coupon will never expire if you do not set an end date or a total maximum budget. +> + + ![Configure the coupon validity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-validity.jpg.md) + 6. **Coupon eligibility**: Create the coupon for **All customers** or **Specific customers**. If you want to create coupons for specific customers: + 1. Click **+ Add Customers**. + ![Configure the coupon eligibility](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-eligibility.jpg.md) + 1. You can upload a list of **Mobile Number** or **Email ID** based on your requirement. + + +> **WARN** +> +> +> **Watch Out!** +> +> If you want to create specific coupons based on the **Email ID**, ensure the **Email** field on checkout is not set as optional and is not hidden from checkout. +> + + 1. Click **Download Sample File** and add the required data to the sample file. Ensure the data is formatted correctly and save the file. + + +> **INFO** +> +> +> **To Upload File:** +> +> - Enter the values in a valid format as given below: +> - Mobile number: +919000090000 +> - Email id: gauravkumar@example.com +> - CSV file should not have any header/column title. +> - Maximum acceptable rows in the file is 1 million. +> - Upload the file in CSV format. Maximum file size supported is 50 MB. +> + + 1. Select **click to upload** and choose the file you want to import. Click **Confirm**. + 7. **Usage restriction**: Set the maximum limit to which a coupon can be redeemed in total and per customer. + 1. Select the **Number of times discount can be used in total** check box and set the number. For example, 100. + 1. Select the **Number of times the coupon can be used per customer** check box and set the number. For example, 2. + 1. Select **By mobile no.** or **By email id** via which the customer can use the coupon. + ![configure coupon restriction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-restriction.jpg.md) + 8. **Coupon combinations** *(optional)*: You can combine this coupon with **Free shipping coupons** category to offer free shipping on an order. + ![Combine this coupon created with other categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-freebie-combine.jpg.md) + 9. Click **Create and Publish**. + + + + + #### Coupon Statuses + + The table below lists the various coupon states and their descriptions: + + + +### States and Descriptions + + + Status | Description + --- + Created | Indicates that the coupon is in the draft stage of the creation process. + --- + Active | Indicates that the coupon is available for customers to use. + --- + Inactive | Indicates that the coupon is manually deactivated. + --- + Expired | Indicates that the coupon expired based on the coupon validity (expiry time). + --- + Published | Indicates that the coupon is currently published for a future activation date. + + + + + + #### Manage Coupons + + You can perform the following actions based on your requirement on the Razorpay Dashboard. Navigate to **Magic Checkout** → **Coupons** → **All Coupons**. + + - You can activate an inactive coupon if it has not expired. Identify the coupon you want to activate, navigate to the options icon and click **Activate**. + - You can only delete coupons in created and inactive states. Identify the coupon you want to delete, navigate to the options icon and click **Delete**. + - You can only deactivate coupons in active and published states and not delete them. Identify the coupon you want to deactivate, navigate to the options icon and click **Deactivate**. + - If a coupon has expired and you want to offer the coupon again, you can duplicate the coupon. Identify the expired coupon, navigate to the options icon and click **Duplicate**. + - You cannot create multiple coupons with the same coupon code. However, you can reuse a coupon code once a coupon with a similar code expires. + - Once a coupon is active, you cannot edit the **Coupon Code**, **Coupon eligibility file**, **Coupon start date** and **Total Maximum budget**. + - You can edit the **Display this coupon at checkout** configuration in all states except expired. After editing, the coupons will not appear to the customer. + + + +### Method 2: Shopify Dashboard + + 1. Log in to the [Shopify Store](https://accounts.shopify.com/store-login). + 2. Navigate to **Discounts** and click **Create discount**. + ![Create discounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-discount.jpg.md) + 3. You can create four types of discounts: + 1. **Amount off products**: Discount specific products or collection of products. + 2. **Amount off order**: Discount the total order amount. + 3. **Buy X Get Y**: Discount products based on customer's purchase. + 4. **Free shipping**: Offer free shipping on an order. + ![Select discount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-select-discount.jpg.md) + 4. **Select discount type** of your choice and enter the following details: + 1. **Method**: Choose **Discount code** or **Automatic discount**. + 1. **Discount code**: Create a code-specific discount and click **Generate**. The customer must enter this code at checkout to avail of discounts. + 1. **Automatic discount**: Once a customer adds a product to the cart, the discount will be applied automatically. + 1. Select the **Value** of the discount based on your requirement. You can also choose to add a discount to **Specific collections** or **Specific products**. + ![Select the value of the discount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-config.jpg.md) + 1. In the **Minimum purchase requirements** section, you can decide whether the offer should be provided in case of minimum purchase in terms of rupees or quantity. + 1. In the **Customer eligibility** section, you can decide which customer or customer segments can avail discounts. + 1. Add **Maximum discount uses** to **Limit number of times this discount can be used in total** or **Limit to one use per customer**. + 1. Select the **Start date** and **Start time** for the coupons. You can also **Set end date** if required. + 1. Click **Save discount**. + ![Save Configs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-configs.jpg.md) + + + +### Disable Coupon Listing + + If you provide coupons to a select set of customers, we recommend disabling coupon listing from the Dashboard so that these personalised coupons are not visible to everyone. To disable coupon listing: + + 1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **Shopify** from the **Platform** drop-down list and enter your Shopify **Store ID**. + 3. Navigate to **Checkout Setup**, disable **Auto fetch coupon** and click **Save settings**. + ![Disable coupons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-coupon.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> When you create offers/coupons through the Razorpay Dashboard and apply them to Shopify orders, the captured amounts display differently across platforms: +> +> - **Shopify Dashboard**: Shows the full order amount as captured. +> - **Razorpay Dashboard**: Shows the actual discounted amount collected from the customer. +> +> This creates a refund limitation. You can only refund the amount that was actually captured (the discounted amount), not the full amount displayed in Shopify. We recommend processing refunds through the Razorpay Dashboard for accuracy. If you want to use Shopify, check the captured amount in your Razorpay Dashboard first, then process only that amount in Shopify. +> +> **Example**: +> - ₹100 order with ₹10 Razorpay offer. +> - Razorpay captures ₹90 (actual amount charged). +> - Shopify displays ₹100 as captured. +> - You can only refund ₹90. +> + +## Login With Razorpay + +Razorpay Magic SSO (Single Sign-On) offers a seamless login experience, helping you enhance conversions and gain valuable insights into user behaviour. Know more about how to setup [login with Razorpayt](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/login-with-razorpay.md) on your shopify store. + +## Offers + +You can offer discounts or cashback on Magic Checkout to attract customers and improve sales. Using Razorpay Offers, you can completely control the discounts offered to your customers. You create offers on prepaid methods, which will reflect on the Magic Checkout payment page. + +Know how to [create offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md). + +## Separate Billing Address + +You can collect the customer's **Billing Address** separately from the **Shipping address**. Customers can enter a separate billing address apart from the delivery address. + + +### To collect the billing address separately: + + 1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **Shopify** from the **Platform** drop-down list and enter your Shopify **Store ID**. + 3. Navigate to **Checkout Setup**, enable **Capture billing address** and click **Save settings**. + ![Capture separate billing address](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-billing.jpg.md) + + +## Capture and Validate GSTIN + +You can capture and validate your customer's GST details from the Dashboard. + + +### To capture and validate GSTIN details: + + 1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **Shopify** from the **Platform** drop-down list and enter your Shopify **Store ID**. + 3. Navigate to **Checkout Setup**, enable **Capture GSTIN** and click **Save settings**. + ![Capture customer's GSTIN](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-capture-gstin.jpg.md) + 4. To validate the GSTIN entered by your customers at checkout, contact our [Support team](https://razorpay.com/support/#request) to enable GSTIN validation for your account. + 5. After the customers place an order, you can view the GST details on the Shopify and the Razorpay Dashboard. + - **Shopify Dashboard**: On the Shopify Admin Dashboard, navigate to **Orders** and select the required order number to view the details. + - **Razorpay Dashboard**: On the Razorpay Dashboard, navigate to **Transactions** → **Orders** and select the required **Order Id** to view the details. + + + +### Customer Experience + + Once GSTIN validation is enabled for your account, your customers can validate their GST details directly at checkout: + + 1. On the order summary screen, the customer clicks **Add** next to **GST Number**. + 2. A **GSTIN Number** pop-up appears. + 3. The customer enters their GSTIN and clicks **Verify**. + - If the GSTIN is invalid, an error message is displayed asking the customer to enter a valid GSTIN number. + - If the GSTIN is valid, the GST-registered address is automatically set as the billing address. + ![GSTIN on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-config-gstin.jpg.md) + + +## Capture Order Instructions + +You can enable your customers to enter order instructions if any at the checkout. For example, customer may want a particular order to be expedited. + + +### To capture order instructions: + + 1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **Shopify** from the **Platform** drop-down list and enter your Shopify **Store ID**. + 3. Navigate to **Checkout Setup**, enable **Capture order instructions** and click **Save settings**. + ![Capture customers order instructions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shopify-order-inst.jpg.md) + 4. After the customers place an order, you can view the GST details on the Shopify and the Razorpay Dashboard. + - **Shopify Dashboard**: On the Shopify Admin Dashboard, navigate to **Orders** and select the required order number to view the details. + - **Razorpay Dashboard**: On the Razorpay Dashboard, navigate to **Transactions** → **Orders** and select the required **Order Id** to view the details. + + +## Google Analytics + +You can use Google Analytics to track orders based on your requirement. + + +### To activate Google analytics: + + 1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **Shopify** from the **Platform** drop-down list and enter your Shopify **Store ID**. + 3. Navigate to **Analytics and ads setup** → **Google Analytics**. + 4. Select the integration type from the drop-down list. + ![Select the integration type to configure GA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-ga-integration.jpg.md) + + + Integrate with frontend. Enable the events of your choice and click **Save events**. + ![Configure and save the events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-ga-events.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot add multiple GA accounts for this integration type. +> + + + + Integrate with backend to get a complete view of your website and customers. + + +> **INFO** +> +> +> **Handy Tips** +> +> You can add multiple GA accounts for this integration type. +> + + Follow the steps given below: + 1. Enter the **Measurement ID** and the **API secret value**. Follow the steps in the **Credentials** section to find this information. + 2. Click **Integrate backend →**. + ![Enter the GA credentials to integrate backend](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-ga-cred.jpg.md) + 3. Enable the events of your choice and click **Save events**. + ![Configure and save the events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-ga-events.jpg.md) + + + Credentials + + Follow the steps given below to get the **Measurement ID** and the **API secret value**: + + 1. Log in to the [GA 4 Dashboard](https://analytics.google.com/) and navigate to **Admin**, present at the bottom of the left nav. + 2. Under the **Admin** section, navigate to **Data Streams**. + 3. Select the relevant **Stream URL** and copy the **Measurement ID**. + 4. Under the **Events** section, click **Measurement Protocol API secrets**. + 5. Click **Create** on the top right. + 6. Enter a **Nickname** to create a new API secret and click **Create**. + 7. Copy the **Secret value**. + + + + + + + +### List of Events + + + Events | Description + --- + Checkout initiated | Triggered when customer initiates checkout. + --- + Add shipping info | Triggered when customer adds shipping info and continues to the next screen. + --- + Add payment info | Triggered when customer selects a payment option. + --- + Purchase | Triggered when customer places an order. + --- + Custom events | Triggered throughout the customer journey. + + + + + + + +## Google Ads + +Integrate Google Ads on your Shopify store based on your requirement. + + +### To integrate Google Ads: + + 1. Log in to the [Google Ads Dashboard.](https://ads.google.com/nav/login?subid=in-en-ha-awa-bk-c-c05!o3~Cj0KCQjw6uWyBhD1ARIsAIMcADodCLNnQEp30Xo_8hJPfEIAmsLCF-T9qKj-zqJIAuhv-t7gp8cY3fEaAln1EALw_wcB~140706620052~kwd-94527731~16862088904~592470418766_apac-ha&authuser=0) + 2. Navigate to **Goals** if you are using the newer version of the Google Ads Dashboard. If you are using an older version, navigate to **Tools & Settings**. + 3. Select the primary conversion action (purchase) you want to track. + 4. Click **Tag setup** and click **Install the tag yourself**. + 5. The second snippet code (Event snippet) is the Gtag code. Copy the code and share it with us at [magic-checkout-support@razorpay.com](mailto:magic-checkout-support@razorpay.com) to get this feature enabled on your Shopify store. + + +## Facebook Ads + +Integrate Facebook Ads on your Shopify store based on your requirement. + + +### To integrate Facebook ads: + + 1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **Shopify** from the **Platform** drop-down list and enter your Shopify **Store ID**. + 3. Navigate to **Analytics and ads setup** → **Facebooks Ads**. + 4. Select the integration type from the drop-down list. + ![Select the integration type to configure Facebook Ads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-facebook-integrations.jpg.md) + + + Integrate with frontend. Enable the events of your choice and click **Save events**. + ![Configure and save the events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-facebook-events.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot add multiple Facebook accounts for this integration type. +> + + + + Integrate with backend to get a complete view of your website and customers. + + +> **INFO** +> +> +> **Handy Tips** +> +> You can add multiple Facebook accounts for this integration type. +> + + Follow the steps given below: + 1. Enter the **Pixel ID** and the **Access token**. Follow the steps in the **Credentials** section to find this information. + 2. Click **Integrate backend →**. + ![Enter the GA credentials to integrate backend](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-facebook-creds.jpg.md) + 3. Enable the events of your choice and click **Save events**. + ![Configure and save the events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-facebook-events.jpg.md) + + + Credentials + + Follow the steps given below to get the credentials: + + 1. Log in to your [Facebook Business](https://analytics.google.com/) account and navigate to **All activity** → **Manage integration**. + 2. Click **Manage** in the **Conversion API** section. + 3. Select **Start sending events from server** from the drop-down list. + 4. Click **Generate Access Token** and click **Copy code to clipboard**. + + + + + + Integrate with both backend and frontend to get a complete view of your website and customers. + + +> **INFO** +> +> +> **Handy Tips** +> +> You can add multiple Facebook accounts for this integration type. +> + + Follow the steps given below: + 1. Enter the **Pixel ID** and the **Access token**. Follow the steps in the **Credentials** section to find this information. + 2. Click **Integrate backend →**. + ![Enter the GA credentials to integrate backend](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-facebook-creds.jpg.md) + 3. Enable the events of your choice and click **Save events**. + ![Configure and save the events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-facebook-events.jpg.md) + + +### Credentials + + Follow the steps given below to get the credentials: + + 1. Log in to your [Facebook Business](https://analytics.google.com/) account and navigate to **All activity** → **Manage integration**. + 2. Click **Manage** in the **Conversion API** section. + 3. Select **Start sending events from server** from the drop-down list. + 4. Click **Generate Access Token** and click **Copy code to clipboard**. + + + + + + + +### List of Events + + + Events | Description + --- + Checkout initiated | Triggered when customer initiates checkout. + --- + Add payment info | Triggered when customer selects a payment option. + --- + Purchase | Triggered when customer places an order. + --- + Custom events | Triggered throughout the customer journey. + + + + + + + +> **WARN** +> +> +> **Watch Out!** +> +> - Razorpay provides the technical capability to pass `fbclid` and event details to Facebook for campaign tracking and optimisation. +> - Razorpay cannot control impacts on campaign performance or optimisation caused by event quality, data health or Facebook's interpretation of the events. +> - Resolving discrepancies or optimisation challenges requires collaboration between you, Razorpay and Facebook. +> - Razorpay is not liable for campaign performance issues resulting from your integration of Facebook event tracking via the Razorpay dashboard. +> + +## Gift Card Settings + +You can enable various gift card options for your customers from the Dashboard. + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. Write to us at [magic-checkout-support@razorpay.com](mailto:magic-checkout-support@razorpay.com) to get this feature enabled for your account. +> + +> **WARN** +> +> +> **Watch Out!** +> +> This feature is not available for Shopify Basic and Advanced users. +> + + +### To enable gift card settings: + + 1. Log in to the Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **Shopify** from the **Platform** drop-down list and enter your Shopify **Store ID**. + 3. Navigate to **Checkout Setup** and enable **Pay with gift card**. + 4. Once you enable the gift card settings, you can also enable the following options **if required**: + - **Pay with multiple gift cards**: Allow your customers to pay with multiple gift cards at once. + - **Restrict paying with coupon and gift card together**: Restrict your customers from using both coupon and gift card together while making a payment. + - **Restrict buying gift cards with existing gift cards**: Restrict your customers from purchasing gift cards using existing gift cards. + - **Restrict customers from clubbing gift cards with COD**: Restrict the usage of gift cards if your customers avail of the cash on delivery option. + ![Configure the gift card options if required](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-gift-config.jpg.md) + 5. Click **Save Settings**. + + +### Related Information + +[Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#woocommerce) diff --git a/llm-content/payments/magic-checkout/shopify/custom/android-integration.md b/llm-content/payments/magic-checkout/shopify/custom/android-integration.md new file mode 100644 index 00000000..916eb725 --- /dev/null +++ b/llm-content/payments/magic-checkout/shopify/custom/android-integration.md @@ -0,0 +1,1636 @@ +--- +title: Integrate Razorpay Magic Checkout on Android App - Shopify +heading: Integrate Magic Checkout on Android App - Shopify +description: Steps to integrate Magic Checkout on your Android app using the Razorpay Android Standard SDK - Shopify integration. +--- + +# Integrate Magic Checkout on Android App - Shopify + +Follow these steps to integrate the Razorpay Magic Checkout on your Android application when using Shopify as your e-commerce platform. + +## Prerequisites + +- Ensure you enable [Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#3-how-do-i-check-if-magic-checkout) on your account. +- Integrate [Magic Checkout With Shopify Store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify.md). +- Integrate with [Android Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/android-integration.md). +- Generate [Live API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys) from the Dashboard. + + - **1. Build Integration**: Integrate with Android App for Shopify. + + - **2. Test Integration**: Test the integration by making a test payment. + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Create a Checkout id + + Generate a unique cart identifier to initiate the Magic Checkout process. + + +> **INFO** +> +> +> **Important** +> +> Ensure you create the Shopify cart before making this request as the cart token must be included in the payload. +> + + /magic/checkout/shopify?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/magic/checkout/shopify?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{ + "cart": { + "token": "ashgad?key=abasab", + "note": null, + "attributes": {}, + "item_count": 1, + "items": [ + { + "id": 100000000001, + "quantity": 1, + "product_id": 832938123321, + "variant_id": 100000000001, + "properties": {} + } + ] + } + }' + ```json: Response + { + "shopify_checkout_id": "gid://shopify/Cart/ashgad?key=abasab", + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + + + Request Parameters + +`cart` _mandatory_ +: `object` Complete cart object from Shopify. + +`cart.token` _mandatory_ +: `string` Unique cart token from Shopify cart creation. + +`cart.note` _optional_ +: `string|null` Customer notes or special instructions. + +`cart.attributes` _optional_ +: `object` Custom attributes for the cart (key-value pairs). + +`cart.item_count` _mandatory_ +: `integer` Total number of items in the cart. + +`cart.items` _mandatory_ +: `array` Array of cart items. + +`cart.items[].id` _mandatory_ +: `integer` Unique item identifier. + +`cart.items[].quantity` _mandatory_ +: `integer` Quantity of the item. + +`cart.items[].product_id` _mandatory_ +: `integer` Shopify product identifier. + +`cart.items[].variant_id` _mandatory_ +: `integer` Shopify variant identifier. + +`cart.items[].properties` _optional_ +: `object` Custom item properties. + + + +### Response Parameters + +`shopify_checkout_id` +: `string` Unique checkout identifier for Shopify integration. + +`tax_details` +: `object` Tax information for the checkout. + + `total_tax` + : `integer` Total tax amount in smallest currency unit (paise). + + `taxes_included` + : `boolean` Whether taxes are included in item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### 1.2 Create Order id on Server + + Create a Razorpay order id required for the payment modal. This API requires the `shopify_checkout_id` from [Step 1.1](#11-create-a-checkout-id). + + /magic/order/shopify?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/magic/order/shopify?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: */*" \ + -H "Origin: https://api.razorpay.com" \ + -d '{ + "shopify_checkout_id": "gid://shopify/Cart/ashgad?key=abasab", + "ga_id": "GA1.1.xxxxxxx.xxxxxxxx", + "fb_analytics": { + "external_id": "unique_fb_external_id", + "fbp": "fb.1.xxxxxxx.xxxxxxxx", + "fbc": "", + "event_source_url": "https://your-store.com/" + }, + "utm_parameters": { + "landing_page_url": "https://your-store.com/", + "user_agent": "Mozilla/5.0 (Linux; Android 12; SM-G991B)..." + }, + "analytics": { + "fb_analytics": { + "external_id": "unique_fb_external_id", + "fbp": "fb.1.xxxxxxx.xxxxxxxx", + "fbc": "" + }, + "ga4": { + "session_ids": { + "_ga_XXXXXXXXXX": "GS1.1.xxxxxxxx.x.x.x.x.x" + }, + "client_id": "GA1.1.xxxxxxxx.xxxxxxxx" + }, + "google_ads": { + "gclid": "", + "wbraid": "", + "gbraid": "" + }, + "source_url": "https://your-store.com/" + } + }' + ```json: Response + { + "preferences": null, + "order_id": "order_EKwxwAgItmmXdp" + } + ``` + + + + Request Parameters + +`shopify_checkout_id` _mandatory_ +: `string` Checkout id from [Step 1.1](#11-create-a-checkout-id). + +`ga_id` _optional_ +: `string` Google Analytics client identifier. + +`fb_analytics` _optional_ +: `object` Facebook Analytics parameters. + + `external_id` _optional_ + : `string` Unique external id for Facebook tracking. + + `fbp` _optional_ + : `string` Facebook browser pixel id. + + `fbc` _optional_ + : `string` Facebook click id. + + `event_source_url` _optional_ + : `string` Source URL for the event. + +`utm_parameters` _optional_ +: `object` UTM tracking parameters. + + `landing_page_url` _optional_ + : `string` Landing page URL. + + `user_agent` _optional_ + : `string` Browser user agent string. + +`analytics` _optional_ +: `object` Comprehensive analytics data. + + `fb_analytics` _optional_ + : `object` Facebook Analytics configuration. + + `external_id` _optional_ + : `string` Unique external id for Facebook tracking. + + `fbp` _optional_ + : `string` Facebook browser pixel id. + + `fbc` _optional_ + : `string` Facebook click id. + + `ga4` _optional_ + : `object` Google Analytics 4 configuration. + + `session_ids` _optional_ + : `object` GA4 session identifiers. + + `client_id` _optional_ + : `string` GA4 client identifier. + + `google_ads` _optional_ + : `object` Google Ads tracking parameters. + + `gclid` _optional_ + : `string` Google Click Identifier. + + `wbraid` _optional_ + : `string` Web-to-app measurement parameter. + + `gbraid` _optional_ + : `string` Google Ads Broad match parameter. + + `source_url` _optional_ + : `string` Source URL for analytics. + + + +### Response Parameters + +`preferences` +: `object|null` Customer preferences. Returns `null` if no preferences are set. + +`order_id` +: `string` Unique Razorpay order identifier. For example, `order_EKwxwAgItmmXdp`. + + + + + + +### 1.3 Install Razorpay Android Standard SDK + + To install the SDK in your Android project, add the following code to your project's top-level build.gradle file. This provides access to the SDK library. + ```json: dependencies + repositories { + mavenCentral() + } + + dependencies { + implementation 'com.razorpay:checkout:1.6.41' + } + ``` + + + +### 1.4 Initialise Razorpay Android Standard SDK + + Use the `setKeyId()` method of the Checkout class to dynamically add your API key id. You can generate your API keys from the [Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + To ensure the Checkout form loads quickly, call the `preload()` method early in your payment flow. The time taken to load resources may vary based on your network bandwidth. + + ```java: Java + public class PaymentActivity extends Activity { + + // ... + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + /** + * Preload payment resources + */ + Checkout.preload(getApplicationContext()); + + // ... + + checkout.setKeyID(""); + + // ... + } + } + ```kotlin: kotlin + class PaymentActivity: Activity(), PaymentResultWithDataListener, ExternalWalletListener { + // ..... + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_payment) + /* + * To ensure faster loading of the Checkout form, + * call this method as early as possible in your checkout flow + * */ + Checkout.preload(applicationContext) + val co = Checkout() + // apart from setting it in AndroidManifest.xml, keyId can also be set + // programmatically during runtime + co.setKeyID("rzp_live_XXXXXXXXXXXXXX") + } + //...... + } + ``` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> It is recommended to send the API Key id from your server-side as app-related metadata fetch. Do not add API Keys in the `AndroidManifest` file. +> + + + + +### 1.5 Coupon Handling + + Since this is an SDK integration, Shopify coupons will not auto-apply like they do on the website. You must explicitly pass coupon codes to Magic Checkout. When initialising Magic Checkout, include the coupon code in the prefill options: + + ```javascript + const options = { + key: 'rzp_live_XXXXXX', + order_id: 'order_EKwxwAgItmmXdp', + // ... other options + + prefill: { + coupon_code: 'MY_COUPON_NAME', // Coupon from your cart to auto-apply + }, + }; + + // Initialize Magic Checkout with options + MagicCheckout.open(options); + ``` + + Your app captures the coupon applied on the cart page, then passes the coupon code in the `prefill.coupon_code` field. The SDK internally calls `applyCoupon('MY_COUPON_NAME')`, and if the coupon is valid, it is automatically applied in Magic Checkout. + + + +### 1.6 Initiate Payment and Display Checkout Form + + Create an instance of the `Checkout` and pass the payment details and options as a `JSONObject`. Ensure that you add the `order_id` generated in [Step 5](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/android-integration.md#15-create-an-order). + + ```java: Java + public void startPayment() { + checkout.setKeyID(""); + /** + * Instantiate Checkout + */ + Checkout checkout = new Checkout(); + + /** + * Set your logo here + */ + checkout.setImage(R.drawable.logo); + + /** + * Reference to current activity + */ + final Activity activity = this; + + /** + * Pass your payment options to the Razorpay Checkout as a JSONObject + */ + try { + JSONObject options = new JSONObject(); + + options.put("name", ""); + options.put("description", "Reference No. #123456"); + options.put("image", "http://example.com/image/rzp.jpg"); + options.put("order_id", "order_DBJOWzybf0sJbb");//from response of step 3. + options.put("theme.color", "#3399cc"); + options.put("currency", ""); + options.put("amount", "50000");//pass amount in currency subunits + options.put("prefill.email", ""); + options.put("prefill.contact",""); + options.put("show_coupons", true); // magic checkout + + JSONObject retryObj = new JSONObject(); + retryObj.put("enabled", true); + retryObj.put("max_count", 4); + options.put("retry", retryObj); + + checkout.open(activity, options); + + } catch(Exception e) { + Log.e(TAG, "Error in starting Razorpay Checkout", e); + } + } + ```java: Kotlin + private fun startPayment() { + /* + * You need to pass the current activity to let Razorpay create CheckoutActivity + * */ + val activity:Activity = this + val co = Checkout() + + try { + val options = JSONObject() + options.put("name","Razorpay Corp") + options.put("description","Demoing Charges") + //You can omit the image option to fetch the image from the Dashboard + options.put("image","http://example.com/image/rzp.jpg") + options.put("theme.color", "#3399cc"); + options.put("currency",""); + options.put("order_id", "order_DBJOWzybfXXXX"); + options.put("amount","50000")//pass amount in currency subunits + + val retryObj = new JSONObject(); + retryObj.put("enabled", true); + retryObj.put("max_count", 4); + options.put("retry", retryObj); + + val prefill = JSONObject() + prefill.put("email","") + prefill.put("contact","9876543210") + options.put("show_coupons", true) // magic checkout + + options.put("prefill",prefill) + co.open(activity,options) + }catch (e: Exception){ + Toast.makeText(activity,"Error in payment: "+ e.message,Toast.LENGTH_LONG).show() + e.printStackTrace() + } + } + ``` + +> **INFO** +> +> +> **Handy Tips** +> +> When you paste the checkout options given above, the following error message appears: '`TAG` has private access in `androidx.fragment.app.FragmentActivity`'. You can resolve this by adding the following code: +> +> ```java: Resolve TAG has private access +> public class MainActivity extends AppCompatActivity implements PaymentResultListener { +> private static final String TAG = MainActivity.class.getSimpleName(); +> ``` +> + + `Checkout.open()` launches the Checkout form where the customer completes the payment and returns the payment result via appropriate callbacks on the `PaymentResultListener`. + + **Payment Options in JSONObject**: + All available options in the `Standard Web Checkout` are also available in Android. + + + + Checkout Options + + `key` _mandatory_ +: `string` API key id generated from the Dashboard. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `50000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. Length must be of 3 characters. + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order id generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `cod` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`show_coupons` _optional_ +: `boolean` Determines whether to show the coupons to customer on the checkout. Possible values: + - `true` (default): Enables the Coupon feature. + - `false`: Disables the Coupon feature. + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + +> **INFO** +> +> +> **Handy Tips** +> +> If you call the payment start method inside a fragment, ensure that the `fragment`'s parent `activity` implements the `PaymentResultListener` interface. +> + + + + + + + +### 1.7 Perform Post Payment Processing + + Based on the response, you can handle post-payment processing on your end. + +> **WARN** +> +> +> **Timeout Handling** +> +> If no API call is made within 45 seconds, our background job will assume there is a network drop off and will proceed to place the order on Shopify automatically. +> + + + Fetch an Order + + Use the Fetch Orders API to retrieve order details, including customer information, address, shipping method and promotions of a particular order: + + v1/orders/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ + -X GET https://api.razorpay.com/v1/orders/order_R1yDkxyIuKXXXX \ + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + import com.razorpay.Order; + import com.razorpay.RazorpayClient; + import com.razorpay.RazorpayException; + try { + Order order = razorpay.Orders.fetch(""); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + # do easy_install razorpay or + # pip install razorpay + + import razorpay + razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]")) + + order_id = + resp = client.order.fetch(order_id) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->fetch($orderId); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('key_id', 'key_secret') + + order = Razorpay::Order.fetch('order_R1yDkxyIuKXXXX') + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.fetch(orderId) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("", "") + + body, err := client.Order.Fetch("", nil, nil) + ``` + ```json: Response: COD Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 507000, + "amount_paid": 0, + "amount_due": 507000, + "currency": "INR", + "receipt": "#30567", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "placed", + "attempts": 0, + "notes": { + "cart_id": "hWN2Am4BGnQrizKE3hzeQaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/hf5Q?key=14bbbce35b8", + "shopify_order_id": "6302119854247" + }, + "created_at": 1756045901, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 5000, + "shipping_fee": 7000, + "customer_details": { + "contact": "+919100000000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + }, + "billing_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + } + }, + "line_items_total": 600000, + "tax_details": { + "total_tax": 4128, + "taxes_included": true + } + } + ```json: Response: Prepaid Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 100700, + "amount_paid": 100700, + "amount_due": 0, + "currency": "INR", + "receipt": "#30414", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "paid", + "attempts": 1, + "notes": { + "cart_id": "hWN1TcwL?key=1a3a5a7c", + "storefront_id": "gid://shopify/Cart/hIkey=af7c7800", + "flits_cart_token": "hWcwL?key=1a3741dc_8740f5_175447", + "shopify_order_id": "6266036191399" + }, + "created_at": 1754466155, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 0, + "shipping_fee": 700, + "customer_details": { + "billing_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "billing_address", + "zipcode": "110057" + }, + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "shipping_address", + "zipcode": "110057" + } + }, + "line_items_total": 110000, + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + Know more about the [Orders API.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) + + +> **INFO** +> +> +> **Order Status** +> +> Check the order status for the following: +> +> - Prepaid orders: `paid`. +> - COD orders: `placed`. +> + + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the order to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the order. For example, `order_R1yDkxyIuKXXXX`. + +`entity` +: `string` Type of entity. Value is `order`. + +`amount` +: `integer` Total order amount in the smallest currency unit (paise). + +`amount_paid` +: `integer` Amount paid towards the order in paise. For prepaid orders, this shows the actual amount paid. For COD orders, this is `0` until payment is collected. + +`amount_due` +: `integer` Outstanding amount due in paise. For prepaid orders, this shows any remaining balance. For COD orders, this equals the `amount` field until payment is collected. + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`receipt` +: `string` Receipt identifier for internal reference. For example, `#30567`. + +`offers` +: `array` Array of offer IDs applied to the order. + +`status` +: `string` Current status of the order. Possible values: + - `placed`: Order placed but payment pending (COD orders). + - `paid`: Order placed and payment completed (prepaid orders). + - `cancelled`: Order cancelled. + - `refunded`: Order refunded. + +`attempts` +: `integer` Number of payment attempts made for this order. For example, `1`. + +`notes` +: `object` Custom notes added to the order containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `shopify_order_id` + : `string` Shopify order reference. + + `flits_cart_token` + : `string` Flits integration token (optional). + +`created_at` +: `integer` Unix timestamp indicating when the order was created. For example, `1756045901`. + +`description` +: `string|null` Order description. Returns `null` if no description is provided. + +`checkout` +: `string|null` Checkout identifier. Returns `null` if not applicable. + +`promotions` +: `array` Array of promotion objects applied to the order. + + `code` + : `string` Promotion code used. For example, `orderOff`. + + `type` + : `string` Type of promotion. For example, `cart_value`. + + `value` + : `integer` Discount value in paise. For example, `10000` for ₹100. + + `description` + : `string` Human-readable promotion description. + + `reference_id` + : `string` Internal reference for the promotion. + +`cod_fee` +: `integer` Cash on Delivery charges in paise. For COD orders, this contains the fee amount (for example, `5000` for ₹50). For prepaid orders, this is `0`. + +`shipping_fee` +: `integer` Shipping charges in paise. For example, `700` for ₹7. + +`customer_details` +: `object` Customer information. + + `contact` + : `string` Customer's phone number. + + `email` + : `string` Customer's email address. + + `shipping_address` + : `object` Complete shipping address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for delivery. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Recipient name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `shipping_address`. + + `zipcode` + : `string` Postal code. + + `billing_address` + : `object` Complete billing address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for billing. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Account holder name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `billing_address`. + + `zipcode` + : `string` Postal code. + +`line_items_total` +: `integer` Total value of line items in paise before adding shipping fees and COD fees, after applying promotions. For example, `60000` for ₹600. + +`tax_details` +: `object` Tax information. + + `total_tax` + : `integer` Total tax amount in paise. For example, `4128`. + + `taxes_included` + : `boolean` Indicates whether taxes are included in the item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### Fetch a Payment + + Use the Fetch Payments API to retrieve comprehensive payment details, including transaction status, payment method, customer information, settlement details, and the associated order information for a specific payment: + + v1/payments/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X GET https://api.razorpay.com/v1/payments/pay_R1yFlWQar3XXXX + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String paymentId = "pay_R1yFlWQar3XXXX"; + + Payment payment = razorpay.payments.fetch(paymentId); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.payment.fetch(paymentId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + paymentId := "pay_R1yFlWQar3XXXX" + + body, err := client.Payment.Fetch(paymentId, nil, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->payment->fetch($paymentId); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + paymentId = "pay_R1yFlWQar3XXXX" + + Razorpay::Payment.fetch(paymentId) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.payments.fetch(paymentId) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + Payment payment = client.Payment.Fetch(paymentId); + ``` + + ```json: Response: COD Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 55700, + "currency": "INR", + "status": "pending", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "cod", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919100000000", + "notes": { + "cart_id": "hWN2QaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/h?key=14bbf59ce35b8" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1756046099, + "receiver_type": null + } + ```json: Response: Prepaid Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 90630, + "currency": "INR", + "status": "captured", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "cart_id": "hWNsVrcwL?key=1a3a457ddc", + "storefront_id": "gid://shopify/Cart/hWv3e8?key=af707", + "flits_cart_token": "hWrcwL?key=1a3a5a70f5_17547", + "optimizer_provider_name": "razorpay" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "727947422583", + "upi_transaction_id": "1F723677C679EF578A95" + }, + "created_at": 1754466271, + "receiver_type": null, + "upi": { + "vpa": "gaurav.kumar@exampleupi" + } + } + ``` + + Know more about the [Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md). + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. For example, `pay_R1yFlWQar3XXXX`. + +`entity` +: `string` Type of entity. Value is `payment`. + +`amount` +: `integer` Payment amount in the smallest currency unit (paise). For COD payments, this includes the COD fee (for example, `55700` for ₹557). For prepaid payments, this equals the captured amount (for example, `90630` for ₹906.30). + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`status` +: `string` Current status of the payment. Possible values: + - `pending`: Payment pending collection (COD orders). + - `captured`: Payment successfully captured (prepaid orders). + - `authorized`: Payment authorized but not captured. + - `failed`: Payment attempt failed. + +`order_id` +: `string` Unique identifier of the associated order. For example, `order_R1yDkxyIuKXXXX`. + +`invoice_id` +: `string|null` Unique identifier of the associated invoice. Returns `null` if no invoice is linked. + +`international` +: `boolean` Indicates whether this is an international payment. Possible values: + - `true`: International payment. + - `false`: Domestic payment. + +`method` +: `string` Payment method used. Possible values include: + - `cod` + - `upi` + - `card` + - `netbanking` + - `wallet` + +`amount_refunded` +: `integer` Amount refunded in paise. For example, `0` indicates no refund has been processed. + +`refund_status` +: `string|null` Current refund status. Returns `null` if no refund is applicable. Possible values: + - `partial`: Partial refund processed. + - `full`: Full refund processed. + +`captured` +: `boolean` Indicates whether the payment has been captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string|null` Payment description. Returns `null` if no description is provided. + +`card_id` +: `string|null` Unique identifier of the card used for payment. Returns `null` for non-card payments. + +`bank` +: `string|null` Bank identifier for netbanking payments. Returns `null` for other payment methods. + +`wallet` +: `string|null` Wallet provider identifier. Returns `null` for non-wallet payments. + +`vpa` +: `string|null` Virtual Payment Address for UPI payments. For example, `gaurav.kumar@exampleupi`. Returns `null` for non-UPI payments. + +`email` +: `string` Customer's email address. + +`contact` +: `string` Customer's phone number. + +`notes` +: `object` Custom notes added to the payment containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `flits_cart_token` + : `string` Flits integration token (optional). + + `optimizer_provider_name` + : `string` Payment optimizer provider name (optional). + +`fee` +: `integer|null` Processing fee charged in paise. For example, `0` indicates no fee. Returns `null` for COD payments. + +`tax` +: `integer|null` Tax amount on processing fee in paise. For example, `0` indicates no tax. Returns `null` for COD payments. + +`error_code` +: `string|null` Error code if payment failed. Returns `null` for successful payments. + +`error_description` +: `string|null` Human-readable error description. Returns `null` for successful payments. + +`error_source` +: `string|null` Source of the error. Returns `null` for successful payments. + +`error_step` +: `string|null` Step at which error occurred. Returns `null` for successful payments. + +`error_reason` +: `string|null` Reason for the error. Returns `null` for successful payments. + +`acquirer_data` +: `object` Data from the payment acquirer. + + `rrn` + : `string` Retrieval Reference Number from the acquirer (optional). + + `upi_transaction_id` + : `string` UPI transaction identifier from the acquirer (optional). + +`created_at` +: `integer` Unix timestamp indicating when the payment was created. For example, `1756046099`. + +`receiver_type` +: `string|null` Type of receiver for the payment. Returns `null` if not applicable. + +`upi` +: `object` UPI-specific payment details (only present for UPI payments). + + `vpa` + : `string` Virtual Payment Address used for the UPI payment. + + + + + + + + + +### 1.8 Complete Checkout Call + + After a successful payment, call the complete checkout API to create the order in Shopify. You must make the call from the callback handler implemented when importing the react SDK. Ensure you redirect the user to the `order_status_url` to show them the order success page on Shopify. + + /1cc/shopify/complete?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/1cc/shopify/complete?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{ + "razorpay_payment_id": "pay_Rk3b76fSqXXXXX", + "razorpay_order_id": "order_Rk3UmCXXW5XXXX" + }' + ```json: Response + { + "id": 65157213390123, + "order_id": "#32697", + "payment_id": "pay_Rk3b76fSqXXXXX", + "payment_method": "netbanking", + "payment_currency": "", + "total_amount": 659430, + "total_tax": "543.91", + "shipping_fee": 700, + "cod_fee": 0, + "promotions": [ + { + "reference_id": "Auto Order Amount Discount", + "code": "Auto Order Amount Discount", + "type": "automatic", + "value": 100000, + "source": "shopify" + } + ], + "shipping_country": "in", + "customer_details": { + "email": "", + "contact": "", + "shipping_address": { + "name": "", + "line1": "123 Main Street", + "city": "Bengaluru", + "state": "KARNATAKA", + "zipcode": "560049", + "country": "in" + } + }, + "order_status_url": "https://your-store.myshopify.com/orders/...", + "is_new_customer": false + } + ``` + + + + Request Parameters + +`razorpay_payment_id` _mandatory_ +: `string` Unique payment identifier. Format: `pay_` followed by 14 characters. + +`razorpay_order_id` _mandatory_ +: `string` Unique order identifier from Step 1.2. Format: `order_` followed by 14 characters. + + + +### Response Parameters + +`id` +: `integer` Unique Shopify order identifier. For example, `65157213390123`. + +`order_id` +: `string` Human-readable order number. For example, `#32697`. + +`payment_id` +: `string` Razorpay payment identifier. For example, `pay_Rk3b76fSqXXXXX`. + +`payment_method` +: `string` Payment method used. Possible values include: + - `netbanking` + - `upi` + - `card` + - `wallet` + +`payment_currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`total_amount` +: `integer` Total order amount in smallest currency unit (paise). For example, `659430` for ₹6594.30. + +`total_tax` +: `string` Total tax amount as string. For example, `543.91`. + +`shipping_fee` +: `integer` Shipping charges in smallest currency unit (paise). For example, `700` for ₹7. + +`cod_fee` +: `integer` Cash on Delivery fee in smallest currency unit (paise). For example, `0` indicates no COD fee. + +`promotions` +: `array` Array of applied promotions/discounts. + + `reference_id` + : `string` Internal reference for the promotion. + + `code` + : `string` Promotion code used. + + `type` + : `string` Type of promotion. Possible values: + - `automatic`: Automatically applied discount. + - `coupon`: Coupon-based discount. + + `value` + : `integer` Discount value in smallest currency unit (paise). For example, `100000` for ₹1000. + + `source` + : `string` Source of the promotion. For example, `shopify`. + +`shipping_country` +: `string` Country code for shipping destination. For example, `in`. + +`customer_details` +: `object` Complete customer information. + + `email` + : `string` Customer's email address. + + `contact` + : `string` Customer's phone number. + + `shipping_address` + : `object` Complete shipping address information. + + `name` + : `string` Recipient name. + + `line1` + : `string` Address line 1. + + `city` + : `string` City name. + + `state` + : `string` State name. + + `zipcode` + : `string` Postal code. + + `country` + : `string` Country code. For example, `in`. + +`order_status_url` +: `string` Shopify order status page URL for customer. + +`is_new_customer` +: `boolean` Whether this is a new customer's first order. Possible values: + - `true`: New customer's first order. + - `false`: Existing customer order. + + + + + + +#### Pass Additional Attributes to Shopify Orders + +Shopify orders support Tags and Additional Attributes (note attributes). Include the attributes in the Shopify cart's attributes object before initiating checkout: + +```javascript +// When creating/updating Shopify cart +const cartPayload = { + cart: { + token: "your_cart_token", + note: "Customer special instructions", + attributes: { + "Source": "Mobile App", + "App Version": "2.1.0", + "Campaign": "Summer Sale 2025", + "Custom Field": "Your custom value" + }, + item_count: 1, + items: [/* ... */] + }, + key: "rzp_live_XXXXXX" +}; +``` + +These attributes will flow through to the Shopify order and appear in the additional attributes section in Shopify Admin. + +## 2. Test Integration + +Check the following checklist below: + +- Shopify cart creation is working correctly. +- Checkout id is generated successfully. +- Order id is created with analytics parameters. +- Magic Checkout SDK opens without errors. +- Coupons apply correctly via prefill. +- Payment flow completes successfully. +- Complete Checkout API creates order in Shopify. +- Order appears in Shopify Admin with correct details. +- Additional attributes appear correctly in Shopify order. + +## Error Handling + +Error Scenario | Recommended Action +--- +Invalid cart token | Ensure Shopify cart exists before [Step 1.1](#11-create-a-checkout-id). +--- +Payment not captured | Verify payment status before complete checkout. +--- +Invalid signature | Regenerate signature using Razorpay's signature verification. +--- +Coupon invalid | Handle error callback and notify user. + +> **WARN** +> +> +> **Fallback to Shopify Checkout** +> +> If any Magic Checkout API fails, redirect users to the standard Shopify checkout to ensure customers can still complete their purchase. +> + +## Support + +For integration support, reach out to your Razorpay account manager or raise a request with our [support team](https://razorpay.com/support/#request). diff --git a/llm-content/payments/magic-checkout/shopify/custom/capacitor-integration.md b/llm-content/payments/magic-checkout/shopify/custom/capacitor-integration.md new file mode 100644 index 00000000..41c7aafd --- /dev/null +++ b/llm-content/payments/magic-checkout/shopify/custom/capacitor-integration.md @@ -0,0 +1,1632 @@ +--- +title: Integrate Razorpay Magic Checkout on Capacitor App - Shopify +heading: Integrate Magic Checkout on Capacitor App - Shopify +description: Steps to integrate Magic Checkout on your Capacitor app using the Razorpay Capacitor Standard SDK - Shopify integration. +--- + +# Integrate Magic Checkout on Capacitor App - Shopify + +Follow these steps to integrate the Razorpay Magic Checkout on your Capacitor application when using Shopify as your e-commerce platform. + +## Prerequisites + +- Ensure you enable [Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#3-how-do-i-check-if-magic-checkout) on your account. +- Integrate [Magic Checkout With Shopify Store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify.md). +- Integrate with [Capacitor Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/capacitor-integration.md). +- Generate [Live API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys) from the Dashboard. + + - **1. Build Integration**: Integrate with Capacitor App for Shopify. + + - **2. Test Integration**: Test the integration by making a test payment. + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Create a Checkout id + + Generate a unique cart identifier to initiate the Magic Checkout process. + + +> **INFO** +> +> +> **Important** +> +> Ensure you create the Shopify cart before making this request as the cart token must be included in the payload. +> + + /magic/checkout/shopify?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/magic/checkout/shopify?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{ + "cart": { + "token": "ashgad?key=abasab", + "note": null, + "attributes": {}, + "item_count": 1, + "items": [ + { + "id": 100000000001, + "quantity": 1, + "product_id": 832938123321, + "variant_id": 100000000001, + "properties": {} + } + ] + } + }' + ```json: Response + { + "shopify_checkout_id": "gid://shopify/Cart/ashgad?key=abasab", + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + + + Request Parameters + +`cart` _mandatory_ +: `object` Complete cart object from Shopify. + +`cart.token` _mandatory_ +: `string` Unique cart token from Shopify cart creation. + +`cart.note` _optional_ +: `string|null` Customer notes or special instructions. + +`cart.attributes` _optional_ +: `object` Custom attributes for the cart (key-value pairs). + +`cart.item_count` _mandatory_ +: `integer` Total number of items in the cart. + +`cart.items` _mandatory_ +: `array` Array of cart items. + +`cart.items[].id` _mandatory_ +: `integer` Unique item identifier. + +`cart.items[].quantity` _mandatory_ +: `integer` Quantity of the item. + +`cart.items[].product_id` _mandatory_ +: `integer` Shopify product identifier. + +`cart.items[].variant_id` _mandatory_ +: `integer` Shopify variant identifier. + +`cart.items[].properties` _optional_ +: `object` Custom item properties. + + + +### Response Parameters + +`shopify_checkout_id` +: `string` Unique checkout identifier for Shopify integration. + +`tax_details` +: `object` Tax information for the checkout. + + `total_tax` + : `integer` Total tax amount in smallest currency unit (paise). + + `taxes_included` + : `boolean` Whether taxes are included in item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### 1.2 Create Order id on Server + + Create a Razorpay order id required for the payment modal. This API requires the `shopify_checkout_id` from [Step 1.1](#11-create-a-checkout-id). + + /magic/order/shopify?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/magic/order/shopify?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: */*" \ + -H "Origin: https://api.razorpay.com" \ + -d '{ + "shopify_checkout_id": "gid://shopify/Cart/ashgad?key=abasab", + "ga_id": "GA1.1.xxxxxxx.xxxxxxxx", + "fb_analytics": { + "external_id": "unique_fb_external_id", + "fbp": "fb.1.xxxxxxx.xxxxxxxx", + "fbc": "", + "event_source_url": "https://your-store.com/" + }, + "utm_parameters": { + "landing_page_url": "https://your-store.com/", + "user_agent": "Mozilla/5.0 (Linux; Android 12; SM-G991B)..." + }, + "analytics": { + "fb_analytics": { + "external_id": "unique_fb_external_id", + "fbp": "fb.1.xxxxxxx.xxxxxxxx", + "fbc": "" + }, + "ga4": { + "session_ids": { + "_ga_XXXXXXXXXX": "GS1.1.xxxxxxxx.x.x.x.x.x" + }, + "client_id": "GA1.1.xxxxxxxx.xxxxxxxx" + }, + "google_ads": { + "gclid": "", + "wbraid": "", + "gbraid": "" + }, + "source_url": "https://your-store.com/" + } + }' + ```json: Response + { + "preferences": null, + "order_id": "order_EKwxwAgItmmXdp" + } + ``` + + + + Request Parameters + +`shopify_checkout_id` _mandatory_ +: `string` Checkout id from [Step 1.1](#11-create-a-checkout-id). + +`ga_id` _optional_ +: `string` Google Analytics client identifier. + +`fb_analytics` _optional_ +: `object` Facebook Analytics parameters. + + `external_id` _optional_ + : `string` Unique external id for Facebook tracking. + + `fbp` _optional_ + : `string` Facebook browser pixel id. + + `fbc` _optional_ + : `string` Facebook click id. + + `event_source_url` _optional_ + : `string` Source URL for the event. + +`utm_parameters` _optional_ +: `object` UTM tracking parameters. + + `landing_page_url` _optional_ + : `string` Landing page URL. + + `user_agent` _optional_ + : `string` Browser user agent string. + +`analytics` _optional_ +: `object` Comprehensive analytics data. + + `fb_analytics` _optional_ + : `object` Facebook Analytics configuration. + + `external_id` _optional_ + : `string` Unique external id for Facebook tracking. + + `fbp` _optional_ + : `string` Facebook browser pixel id. + + `fbc` _optional_ + : `string` Facebook click id. + + `ga4` _optional_ + : `object` Google Analytics 4 configuration. + + `session_ids` _optional_ + : `object` GA4 session identifiers. + + `client_id` _optional_ + : `string` GA4 client identifier. + + `google_ads` _optional_ + : `object` Google Ads tracking parameters. + + `gclid` _optional_ + : `string` Google Click Identifier. + + `wbraid` _optional_ + : `string` Web-to-app measurement parameter. + + `gbraid` _optional_ + : `string` Google Ads Broad match parameter. + + `source_url` _optional_ + : `string` Source URL for analytics. + + + +### Response Parameters + +`preferences` +: `object|null` Customer preferences. Returns `null` if no preferences are set. + +`order_id` +: `string` Unique Razorpay order identifier. For example, `order_EKwxwAgItmmXdp`. + + + + + + +### 1.3 Install Razorpay Capacitor Plugin + + Run the following command on your command prompt to install the plugin: + + ```yml: Install Capacitor + npm i -S https://github.com/razorpay/razorpay-capacitor.git #installs plugin that supports Capacitor 6.0 + ``` + + +> **WARN** +> +> +> **Watch Out!** +> +> We recommend you to use the latest plugin version (that works on Capacitor 6.0) as all the latest features will be made available only on this version. However, if you want to use the plugin that works on Capacitor 5.0, use the command given below: +> +> ```yml: Install Capacitor +> npm i -S https://github.com/razorpay/razorpay-capacitor.git#76fd7d6b59f631eb44e6ecebc9188b2425168beb #installs plugin that supports Capacitor 5.0 +> ``` +> +> If you want to use the plugin that works on other capacitor versions, refer to the [GitHub repository](https://github.com/razorpay/razorpay-capacitor). +> +> + + + + Proguard Rules + + If you are using Proguard for your builds, you must add the following lines to your `proguard-rules.pro` file. + + ```java: + -keepclassmembers class * { + @android.webkit.JavascriptInterface ; + } + + -keepattributes JavascriptInterface + -keepattributes *Annotation* + + -dontwarn com.razorpay.** + -keep class com.razorpay.** {*;} + + -optimizations !method/inlining/* + + -keepclasseswithmembers class * { + public void onPayment*(...); + } + ``` + + + + + + +### 1.4 Coupon Handling + + Since this is an SDK integration, Shopify coupons will not auto-apply like they do on the website. You must explicitly pass coupon codes to Magic Checkout. When initialising Magic Checkout, include the coupon code in the prefill options: + + ```javascript + const options = { + key: 'rzp_live_XXXXXX', + order_id: 'order_EKwxwAgItmmXdp', + // ... other options + + prefill: { + coupon_code: 'MY_COUPON_NAME', // Coupon from your cart to auto-apply + }, + }; + + // Initialize Magic Checkout with options + MagicCheckout.open(options); + ``` + + Your app captures the coupon applied on the cart page, then passes the coupon code in the `prefill.coupon_code` field. The SDK internally calls `applyCoupon('MY_COUPON_NAME')`, and if the coupon is valid, it is automatically applied in Magic Checkout. + + + +### 1.5 Add Checkout Class in MainActivity.java (Android Only) + + Add the Checkout class to the ArrayList in the MainActivity class in `{{projectDir}}/android/src/main/MainActivity.java`. Below is the sample code: + + ```java: Add Checkout Class + import com.ionicframework.capacitor.Checkout; + + public class MainActivity extends BridgeActivity { + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + registerPlugin(Checkout.class); + } + } + ``` + + Check the [Capacitor 6.0 Official Updates](https://capacitorjs.com/docs/updating/6-0). + + + +### 1.6 Add Checkout Code + + Add the Pay button on your web page using the checkout code given below. The checkout page is displayed when the customers click the Pay button. + + + 1.6.1 Code to Add Pay Button + + Add the Checkout code to your project. Ensure that you pass the `order_id` that you received in response to the first step. + + ```js: Checkout Code + import { Checkout } from 'capacitor-razorpay'; + @Component({ + selector: 'app-home', + templateUrl: 'home.page.html', + styleUrls: ['home.page.scss'], + }) + export class HomePage { + constructor(private alertController: AlertController) {} + async payWithRazorpay(){ + const options = { + key: '[YOUR_KEY_ID]', + amount: '50000', + description: 'Great offers', + image: 'https://i.imgur.com/3g7nmJC.jpg', + order_id: 'order_Cp10EhSaf7wLbS',//Order ID generated in Step 1 + currency: '', + name: 'Acme Corp', + prefill: { + email: '', + contact: '9000090000' + }, + theme: { + color: '#3399cc' + }, + 'show_coupons': true // magic checkout + } + try { + let data = (await Checkout.open(options)); + console.log(data.response+"AcmeCorp"); + console.log(JSON.stringify(data)) + } catch (error) { + //it's paramount that you parse the data into a JSONObject + let errorObj = JSON.parse(error['code']) + alert(errorObj.description); + alert(errorObj.code); + alert(errorObj.reason); + alert(errorObj.step); + alert(errorObj.source); + alert(errorObj.metadata.order_id); + alert(errorObj.metadata.payment_id); + } + async presentAlert(response: string){ + // let responseObj = JSON.parse(response) + console.log("message"+ response['razorpay_payment_id']); + const alert = await this.alertController.create({ + message:response['razorpay_payment_id'], + backdropDismiss: true, + }); + await alert.present(); + } + } + ``` + + + + + +### Checkout Options + + You must pass these parameters in Checkout to initiate the payment. + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + + + +### 1.6.2 Enable UPI Intent on iOS *(Optional)* + + Provide your customers with a better payment experience by enabling UPI Intent on your app's Checkout form. In the UPI Intent flow: + 1. Customer selects UPI as the payment method in your iOS app. A list of UPI apps supporting the intent flow is displayed. For example, PhonePe, Google Pay and Paytm. + 2. Customer selects the preferred app. The UPI app opens with pre-populated payment details. + 3. Customer enters their UPI PIN to complete their transactions. + 4. Once the payment is successful, the customer is redirected to your app or website. + + To enable this in your iOS integration, you must make the following changes in your app's info.plist file. + + ```xml: info.plist + LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + + ``` + + Know more about [UPI Intent and its benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). + + + + + + +### 1.7 Perform Post Payment Processing + + Based on the response, you can handle post-payment processing on your end. + +> **WARN** +> +> +> **Timeout Handling** +> +> If no API call is made within 45 seconds, our background job will assume there is a network drop off and will proceed to place the order on Shopify automatically. +> + + + Fetch an Order + + Use the Fetch Orders API to retrieve order details, including customer information, address, shipping method and promotions of a particular order: + + v1/orders/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ + -X GET https://api.razorpay.com/v1/orders/order_R1yDkxyIuKXXXX \ + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + import com.razorpay.Order; + import com.razorpay.RazorpayClient; + import com.razorpay.RazorpayException; + try { + Order order = razorpay.Orders.fetch(""); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + # do easy_install razorpay or + # pip install razorpay + + import razorpay + razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]")) + + order_id = + resp = client.order.fetch(order_id) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->fetch($orderId); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('key_id', 'key_secret') + + order = Razorpay::Order.fetch('order_R1yDkxyIuKXXXX') + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.fetch(orderId) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("", "") + + body, err := client.Order.Fetch("", nil, nil) + ``` + ```json: Response: COD Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 507000, + "amount_paid": 0, + "amount_due": 507000, + "currency": "INR", + "receipt": "#30567", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "placed", + "attempts": 0, + "notes": { + "cart_id": "hWN2Am4BGnQrizKE3hzeQaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/hf5Q?key=14bbbce35b8", + "shopify_order_id": "6302119854247" + }, + "created_at": 1756045901, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 5000, + "shipping_fee": 7000, + "customer_details": { + "contact": "+919100000000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + }, + "billing_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + } + }, + "line_items_total": 600000, + "tax_details": { + "total_tax": 4128, + "taxes_included": true + } + } + ```json: Response: Prepaid Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 100700, + "amount_paid": 100700, + "amount_due": 0, + "currency": "INR", + "receipt": "#30414", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "paid", + "attempts": 1, + "notes": { + "cart_id": "hWN1TcwL?key=1a3a5a7c", + "storefront_id": "gid://shopify/Cart/hIkey=af7c7800", + "flits_cart_token": "hWcwL?key=1a3741dc_8740f5_175447", + "shopify_order_id": "6266036191399" + }, + "created_at": 1754466155, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 0, + "shipping_fee": 700, + "customer_details": { + "billing_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "billing_address", + "zipcode": "110057" + }, + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "shipping_address", + "zipcode": "110057" + } + }, + "line_items_total": 110000, + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + Know more about the [Orders API.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) + + +> **INFO** +> +> +> **Order Status** +> +> Check the order status for the following: +> +> - Prepaid orders: `paid`. +> - COD orders: `placed`. +> + + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the order to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the order. For example, `order_R1yDkxyIuKXXXX`. + +`entity` +: `string` Type of entity. Value is `order`. + +`amount` +: `integer` Total order amount in the smallest currency unit (paise). + +`amount_paid` +: `integer` Amount paid towards the order in paise. For prepaid orders, this shows the actual amount paid. For COD orders, this is `0` until payment is collected. + +`amount_due` +: `integer` Outstanding amount due in paise. For prepaid orders, this shows any remaining balance. For COD orders, this equals the `amount` field until payment is collected. + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`receipt` +: `string` Receipt identifier for internal reference. For example, `#30567`. + +`offers` +: `array` Array of offer IDs applied to the order. + +`status` +: `string` Current status of the order. Possible values: + - `placed`: Order placed but payment pending (COD orders). + - `paid`: Order placed and payment completed (prepaid orders). + - `cancelled`: Order cancelled. + - `refunded`: Order refunded. + +`attempts` +: `integer` Number of payment attempts made for this order. For example, `1`. + +`notes` +: `object` Custom notes added to the order containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `shopify_order_id` + : `string` Shopify order reference. + + `flits_cart_token` + : `string` Flits integration token (optional). + +`created_at` +: `integer` Unix timestamp indicating when the order was created. For example, `1756045901`. + +`description` +: `string|null` Order description. Returns `null` if no description is provided. + +`checkout` +: `string|null` Checkout identifier. Returns `null` if not applicable. + +`promotions` +: `array` Array of promotion objects applied to the order. + + `code` + : `string` Promotion code used. For example, `orderOff`. + + `type` + : `string` Type of promotion. For example, `cart_value`. + + `value` + : `integer` Discount value in paise. For example, `10000` for ₹100. + + `description` + : `string` Human-readable promotion description. + + `reference_id` + : `string` Internal reference for the promotion. + +`cod_fee` +: `integer` Cash on Delivery charges in paise. For COD orders, this contains the fee amount (for example, `5000` for ₹50). For prepaid orders, this is `0`. + +`shipping_fee` +: `integer` Shipping charges in paise. For example, `700` for ₹7. + +`customer_details` +: `object` Customer information. + + `contact` + : `string` Customer's phone number. + + `email` + : `string` Customer's email address. + + `shipping_address` + : `object` Complete shipping address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for delivery. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Recipient name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `shipping_address`. + + `zipcode` + : `string` Postal code. + + `billing_address` + : `object` Complete billing address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for billing. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Account holder name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `billing_address`. + + `zipcode` + : `string` Postal code. + +`line_items_total` +: `integer` Total value of line items in paise before adding shipping fees and COD fees, after applying promotions. For example, `60000` for ₹600. + +`tax_details` +: `object` Tax information. + + `total_tax` + : `integer` Total tax amount in paise. For example, `4128`. + + `taxes_included` + : `boolean` Indicates whether taxes are included in the item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### Fetch a Payment + + Use the Fetch Payments API to retrieve comprehensive payment details, including transaction status, payment method, customer information, settlement details, and the associated order information for a specific payment: + + v1/payments/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X GET https://api.razorpay.com/v1/payments/pay_R1yFlWQar3XXXX + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String paymentId = "pay_R1yFlWQar3XXXX"; + + Payment payment = razorpay.payments.fetch(paymentId); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.payment.fetch(paymentId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + paymentId := "pay_R1yFlWQar3XXXX" + + body, err := client.Payment.Fetch(paymentId, nil, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->payment->fetch($paymentId); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + paymentId = "pay_R1yFlWQar3XXXX" + + Razorpay::Payment.fetch(paymentId) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.payments.fetch(paymentId) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + Payment payment = client.Payment.Fetch(paymentId); + ``` + + ```json: Response: COD Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 55700, + "currency": "INR", + "status": "pending", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "cod", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919100000000", + "notes": { + "cart_id": "hWN2QaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/h?key=14bbf59ce35b8" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1756046099, + "receiver_type": null + } + ```json: Response: Prepaid Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 90630, + "currency": "INR", + "status": "captured", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "cart_id": "hWNsVrcwL?key=1a3a457ddc", + "storefront_id": "gid://shopify/Cart/hWv3e8?key=af707", + "flits_cart_token": "hWrcwL?key=1a3a5a70f5_17547", + "optimizer_provider_name": "razorpay" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "727947422583", + "upi_transaction_id": "1F723677C679EF578A95" + }, + "created_at": 1754466271, + "receiver_type": null, + "upi": { + "vpa": "gaurav.kumar@exampleupi" + } + } + ``` + + Know more about the [Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md). + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. For example, `pay_R1yFlWQar3XXXX`. + +`entity` +: `string` Type of entity. Value is `payment`. + +`amount` +: `integer` Payment amount in the smallest currency unit (paise). For COD payments, this includes the COD fee (for example, `55700` for ₹557). For prepaid payments, this equals the captured amount (for example, `90630` for ₹906.30). + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`status` +: `string` Current status of the payment. Possible values: + - `pending`: Payment pending collection (COD orders). + - `captured`: Payment successfully captured (prepaid orders). + - `authorized`: Payment authorized but not captured. + - `failed`: Payment attempt failed. + +`order_id` +: `string` Unique identifier of the associated order. For example, `order_R1yDkxyIuKXXXX`. + +`invoice_id` +: `string|null` Unique identifier of the associated invoice. Returns `null` if no invoice is linked. + +`international` +: `boolean` Indicates whether this is an international payment. Possible values: + - `true`: International payment. + - `false`: Domestic payment. + +`method` +: `string` Payment method used. Possible values include: + - `cod` + - `upi` + - `card` + - `netbanking` + - `wallet` + +`amount_refunded` +: `integer` Amount refunded in paise. For example, `0` indicates no refund has been processed. + +`refund_status` +: `string|null` Current refund status. Returns `null` if no refund is applicable. Possible values: + - `partial`: Partial refund processed. + - `full`: Full refund processed. + +`captured` +: `boolean` Indicates whether the payment has been captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string|null` Payment description. Returns `null` if no description is provided. + +`card_id` +: `string|null` Unique identifier of the card used for payment. Returns `null` for non-card payments. + +`bank` +: `string|null` Bank identifier for netbanking payments. Returns `null` for other payment methods. + +`wallet` +: `string|null` Wallet provider identifier. Returns `null` for non-wallet payments. + +`vpa` +: `string|null` Virtual Payment Address for UPI payments. For example, `gaurav.kumar@exampleupi`. Returns `null` for non-UPI payments. + +`email` +: `string` Customer's email address. + +`contact` +: `string` Customer's phone number. + +`notes` +: `object` Custom notes added to the payment containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `flits_cart_token` + : `string` Flits integration token (optional). + + `optimizer_provider_name` + : `string` Payment optimizer provider name (optional). + +`fee` +: `integer|null` Processing fee charged in paise. For example, `0` indicates no fee. Returns `null` for COD payments. + +`tax` +: `integer|null` Tax amount on processing fee in paise. For example, `0` indicates no tax. Returns `null` for COD payments. + +`error_code` +: `string|null` Error code if payment failed. Returns `null` for successful payments. + +`error_description` +: `string|null` Human-readable error description. Returns `null` for successful payments. + +`error_source` +: `string|null` Source of the error. Returns `null` for successful payments. + +`error_step` +: `string|null` Step at which error occurred. Returns `null` for successful payments. + +`error_reason` +: `string|null` Reason for the error. Returns `null` for successful payments. + +`acquirer_data` +: `object` Data from the payment acquirer. + + `rrn` + : `string` Retrieval Reference Number from the acquirer (optional). + + `upi_transaction_id` + : `string` UPI transaction identifier from the acquirer (optional). + +`created_at` +: `integer` Unix timestamp indicating when the payment was created. For example, `1756046099`. + +`receiver_type` +: `string|null` Type of receiver for the payment. Returns `null` if not applicable. + +`upi` +: `object` UPI-specific payment details (only present for UPI payments). + + `vpa` + : `string` Virtual Payment Address used for the UPI payment. + + + + + + + + + +### 1.8 Complete Checkout Call + + After a successful payment, call the complete checkout API to create the order in Shopify. You must make the call from the callback handler implemented when importing the react SDK. Ensure you redirect the user to the `order_status_url` to show them the order success page on Shopify. + + /1cc/shopify/complete?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/1cc/shopify/complete?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{ + "razorpay_payment_id": "pay_Rk3b76fSqXXXXX", + "razorpay_order_id": "order_Rk3UmCXXW5XXXX" + }' + ```json: Response + { + "id": 65157213390123, + "order_id": "#32697", + "payment_id": "pay_Rk3b76fSqXXXXX", + "payment_method": "netbanking", + "payment_currency": "", + "total_amount": 659430, + "total_tax": "543.91", + "shipping_fee": 700, + "cod_fee": 0, + "promotions": [ + { + "reference_id": "Auto Order Amount Discount", + "code": "Auto Order Amount Discount", + "type": "automatic", + "value": 100000, + "source": "shopify" + } + ], + "shipping_country": "in", + "customer_details": { + "email": "", + "contact": "", + "shipping_address": { + "name": "", + "line1": "123 Main Street", + "city": "Bengaluru", + "state": "KARNATAKA", + "zipcode": "560049", + "country": "in" + } + }, + "order_status_url": "https://your-store.myshopify.com/orders/...", + "is_new_customer": false + } + ``` + + + + Request Parameters + +`razorpay_payment_id` _mandatory_ +: `string` Unique payment identifier. Format: `pay_` followed by 14 characters. + +`razorpay_order_id` _mandatory_ +: `string` Unique order identifier from Step 1.2. Format: `order_` followed by 14 characters. + + + +### Response Parameters + +`id` +: `integer` Unique Shopify order identifier. For example, `65157213390123`. + +`order_id` +: `string` Human-readable order number. For example, `#32697`. + +`payment_id` +: `string` Razorpay payment identifier. For example, `pay_Rk3b76fSqXXXXX`. + +`payment_method` +: `string` Payment method used. Possible values include: + - `netbanking` + - `upi` + - `card` + - `wallet` + +`payment_currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`total_amount` +: `integer` Total order amount in smallest currency unit (paise). For example, `659430` for ₹6594.30. + +`total_tax` +: `string` Total tax amount as string. For example, `543.91`. + +`shipping_fee` +: `integer` Shipping charges in smallest currency unit (paise). For example, `700` for ₹7. + +`cod_fee` +: `integer` Cash on Delivery fee in smallest currency unit (paise). For example, `0` indicates no COD fee. + +`promotions` +: `array` Array of applied promotions/discounts. + + `reference_id` + : `string` Internal reference for the promotion. + + `code` + : `string` Promotion code used. + + `type` + : `string` Type of promotion. Possible values: + - `automatic`: Automatically applied discount. + - `coupon`: Coupon-based discount. + + `value` + : `integer` Discount value in smallest currency unit (paise). For example, `100000` for ₹1000. + + `source` + : `string` Source of the promotion. For example, `shopify`. + +`shipping_country` +: `string` Country code for shipping destination. For example, `in`. + +`customer_details` +: `object` Complete customer information. + + `email` + : `string` Customer's email address. + + `contact` + : `string` Customer's phone number. + + `shipping_address` + : `object` Complete shipping address information. + + `name` + : `string` Recipient name. + + `line1` + : `string` Address line 1. + + `city` + : `string` City name. + + `state` + : `string` State name. + + `zipcode` + : `string` Postal code. + + `country` + : `string` Country code. For example, `in`. + +`order_status_url` +: `string` Shopify order status page URL for customer. + +`is_new_customer` +: `boolean` Whether this is a new customer's first order. Possible values: + - `true`: New customer's first order. + - `false`: Existing customer order. + + + + + +## 2. Test Integration + +Check the following checklist below: + +- Shopify cart creation is working correctly. +- Checkout id is generated successfully. +- Order id is created with analytics parameters. +- Magic Checkout SDK opens without errors. +- Coupons apply correctly via prefill. +- Payment flow completes successfully. +- Complete Checkout API creates order in Shopify. +- Order appears in Shopify Admin with correct details. +- Additional attributes appear correctly in Shopify order. + +## Error Handling + +Error Scenario | Recommended Action +--- +Invalid cart token | Ensure Shopify cart exists before [Step 1.1](#11-create-a-checkout-id). +--- +Payment not captured | Verify payment status before complete checkout. +--- +Invalid signature | Regenerate signature using Razorpay's signature verification. +--- +Coupon invalid | Handle error callback and notify user. + +> **WARN** +> +> +> **Fallback to Shopify Checkout** +> +> If any Magic Checkout API fails, redirect users to the standard Shopify checkout to ensure customers can still complete their purchase. +> + +## Support + +For integration support, reach out to your Razorpay account manager or raise a request with our [support team](https://razorpay.com/support/#request). diff --git a/llm-content/payments/magic-checkout/shopify/custom/flutter-integration.md b/llm-content/payments/magic-checkout/shopify/custom/flutter-integration.md new file mode 100644 index 00000000..24c183da --- /dev/null +++ b/llm-content/payments/magic-checkout/shopify/custom/flutter-integration.md @@ -0,0 +1,1656 @@ +--- +title: Integrate Razorpay Magic Checkout on Flutter App - Shopify +heading: Integrate Magic Checkout on Flutter App - Shopify +description: Steps to integrate Magic Checkout on your Flutter app using the Razorpay Flutter Standard SDK - Shopify integration. +--- + +# Integrate Magic Checkout on Flutter App - Shopify + +Follow these steps to integrate the Razorpay Magic Checkout on your Flutter application when using Shopify as your e-commerce platform. + +## Prerequisites + +- Ensure you enable [Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#3-how-do-i-check-if-magic-checkout) on your account. +- Integrate [Magic Checkout With Shopify Store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify.md). +- Integrate with [Flutter Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/flutter-integration.md). +- Generate [Live API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys) from the Dashboard. + + - **1. Build Integration**: Integrate with Flutter App for Shopify. + + - **2. Test Integration**: Test the integration by making a test payment. + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Create a Checkout id + + Generate a unique cart identifier to initiate the Magic Checkout process. + + +> **INFO** +> +> +> **Important** +> +> Ensure you create the Shopify cart before making this request as the cart token must be included in the payload. +> + + /magic/checkout/shopify?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/magic/checkout/shopify?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{ + "cart": { + "token": "ashgad?key=abasab", + "note": null, + "attributes": {}, + "item_count": 1, + "items": [ + { + "id": 100000000001, + "quantity": 1, + "product_id": 832938123321, + "variant_id": 100000000001, + "properties": {} + } + ] + } + }' + ```json: Response + { + "shopify_checkout_id": "gid://shopify/Cart/ashgad?key=abasab", + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + + + Request Parameters + +`cart` _mandatory_ +: `object` Complete cart object from Shopify. + +`cart.token` _mandatory_ +: `string` Unique cart token from Shopify cart creation. + +`cart.note` _optional_ +: `string|null` Customer notes or special instructions. + +`cart.attributes` _optional_ +: `object` Custom attributes for the cart (key-value pairs). + +`cart.item_count` _mandatory_ +: `integer` Total number of items in the cart. + +`cart.items` _mandatory_ +: `array` Array of cart items. + +`cart.items[].id` _mandatory_ +: `integer` Unique item identifier. + +`cart.items[].quantity` _mandatory_ +: `integer` Quantity of the item. + +`cart.items[].product_id` _mandatory_ +: `integer` Shopify product identifier. + +`cart.items[].variant_id` _mandatory_ +: `integer` Shopify variant identifier. + +`cart.items[].properties` _optional_ +: `object` Custom item properties. + + + +### Response Parameters + +`shopify_checkout_id` +: `string` Unique checkout identifier for Shopify integration. + +`tax_details` +: `object` Tax information for the checkout. + + `total_tax` + : `integer` Total tax amount in smallest currency unit (paise). + + `taxes_included` + : `boolean` Whether taxes are included in item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### 1.2 Create Order id on Server + + Create a Razorpay order id required for the payment modal. This API requires the `shopify_checkout_id` from [Step 1.1](#11-create-a-checkout-id). + + /magic/order/shopify?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/magic/order/shopify?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: */*" \ + -H "Origin: https://api.razorpay.com" \ + -d '{ + "shopify_checkout_id": "gid://shopify/Cart/ashgad?key=abasab", + "ga_id": "GA1.1.xxxxxxx.xxxxxxxx", + "fb_analytics": { + "external_id": "unique_fb_external_id", + "fbp": "fb.1.xxxxxxx.xxxxxxxx", + "fbc": "", + "event_source_url": "https://your-store.com/" + }, + "utm_parameters": { + "landing_page_url": "https://your-store.com/", + "user_agent": "Mozilla/5.0 (Linux; Android 12; SM-G991B)..." + }, + "analytics": { + "fb_analytics": { + "external_id": "unique_fb_external_id", + "fbp": "fb.1.xxxxxxx.xxxxxxxx", + "fbc": "" + }, + "ga4": { + "session_ids": { + "_ga_XXXXXXXXXX": "GS1.1.xxxxxxxx.x.x.x.x.x" + }, + "client_id": "GA1.1.xxxxxxxx.xxxxxxxx" + }, + "google_ads": { + "gclid": "", + "wbraid": "", + "gbraid": "" + }, + "source_url": "https://your-store.com/" + } + }' + ```json: Response + { + "preferences": null, + "order_id": "order_EKwxwAgItmmXdp" + } + ``` + + + + Request Parameters + +`shopify_checkout_id` _mandatory_ +: `string` Checkout id from [Step 1.1](#11-create-a-checkout-id). + +`ga_id` _optional_ +: `string` Google Analytics client identifier. + +`fb_analytics` _optional_ +: `object` Facebook Analytics parameters. + + `external_id` _optional_ + : `string` Unique external id for Facebook tracking. + + `fbp` _optional_ + : `string` Facebook browser pixel id. + + `fbc` _optional_ + : `string` Facebook click id. + + `event_source_url` _optional_ + : `string` Source URL for the event. + +`utm_parameters` _optional_ +: `object` UTM tracking parameters. + + `landing_page_url` _optional_ + : `string` Landing page URL. + + `user_agent` _optional_ + : `string` Browser user agent string. + +`analytics` _optional_ +: `object` Comprehensive analytics data. + + `fb_analytics` _optional_ + : `object` Facebook Analytics configuration. + + `external_id` _optional_ + : `string` Unique external id for Facebook tracking. + + `fbp` _optional_ + : `string` Facebook browser pixel id. + + `fbc` _optional_ + : `string` Facebook click id. + + `ga4` _optional_ + : `object` Google Analytics 4 configuration. + + `session_ids` _optional_ + : `object` GA4 session identifiers. + + `client_id` _optional_ + : `string` GA4 client identifier. + + `google_ads` _optional_ + : `object` Google Ads tracking parameters. + + `gclid` _optional_ + : `string` Google Click Identifier. + + `wbraid` _optional_ + : `string` Web-to-app measurement parameter. + + `gbraid` _optional_ + : `string` Google Ads Broad match parameter. + + `source_url` _optional_ + : `string` Source URL for analytics. + + + +### Response Parameters + +`preferences` +: `object|null` Customer preferences. Returns `null` if no preferences are set. + +`order_id` +: `string` Unique Razorpay order identifier. For example, `order_EKwxwAgItmmXdp`. + + + + + + +### 1.3 Install Razorpay Flutter Plugin + + [Download the plugin](https://pub.dev/packages/razorpay_flutter) from Pub.dev. + + Add the below code to `dependencies` in your app's `pubspec.yaml` + + ```yml: Add Dependencies + razorpay_flutter: 1.4.0 + ``` + + + + Add Proguard Rules (Android Only) + + If you are using Proguard for your builds, you need to add the following lines to the Proguard files: + + ```java: Add Proguard Rules + -keepattributes *Annotation* + -dontwarn com.razorpay.** + -keep class com.razorpay.** {*;} + -optimizations !method/inlining/ + -keepclasseswithmembers class * { + public void onPayment*(...); + } + ``` + + Know more about [Proguard rules](https://github.com/razorpay/razorpay-flutter/issues/42#issuecomment-550161626). + + + +### Get Packages + + Run `flutter packages get` in the root directory of your app. + + +> **INFO** +> +> +> **Minimum Version Requirement** +> +> - For **Android**, ensure that the minimum API level for your app is 19 or higher. +> - For **iOS**, ensure that the minimum deployment target for your app is iOS 10.0 or higher. Also, do not forget to enable bitcode for your project. +> + + + + + + + +### 1.4 Import Package and Create Razorpay Instance + + Use the below code to import the `razorpay_flutter.dart` file to your project. + + ```yml: Import Package + import 'package:razorpay_flutter/razorpay_flutter.dart'; + ``` + + Use the below code to create a Razorpay instance. + + ```yml: Instantiate + _razorpay = Razorpay(); + ``` + + + +### 1.5 Attach Event Listeners + + The plugin uses event-based communication and emits events when payments fail or succeed. + + The event names are exposed via the constants `EVENT_PAYMENT_SUCCESS`, `EVENT_PAYMENT_ERROR` and `EVENT_EXTERNAL_WALLET` from the `Razorpay` class. + + Use the `on(String event, Function handler)` method on the `Razorpay` instance to attach event listeners. + + ```yml: Attach Event Listeners + _razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, _handlePaymentSuccess); + _razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, _handlePaymentError); + _razorpay.on(Razorpay.EVENT_EXTERNAL_WALLET, _handleExternalWallet); + ``` + + The handlers would be defined in the class as: + + ```yml: Handlers + void _handlePaymentSuccess(PaymentSuccessResponse response) { + // Do something when payment succeeds + } + + void _handlePaymentError(PaymentFailureResponse response) { + // Do something when payment fails + } + + void _handleExternalWallet(ExternalWalletResponse response) { + // Do something when an external wallet is selected + } + ``` + + To clear event listeners, use the `clear` method on the `Razorpay` instance. + + ```yml: Clear Event Listeners + _razorpay.clear(); // Removes all listeners + ``` + + + +### 1.6 Coupon Handling + + Since this is an SDK integration, Shopify coupons will not auto-apply like they do on the website. You must explicitly pass coupon codes to Magic Checkout. When initialising Magic Checkout, include the coupon code in the prefill options: + + ```javascript + const options = { + key: 'rzp_live_XXXXXX', + order_id: 'order_EKwxwAgItmmXdp', + // ... other options + + prefill: { + coupon_code: 'MY_COUPON_NAME', // Coupon from your cart to auto-apply + }, + }; + + // Initialize Magic Checkout with options + MagicCheckout.open(options); + ``` + + Your app captures the coupon applied on the cart page, then passes the coupon code in the `prefill.coupon_code` field. The SDK internally calls `applyCoupon('MY_COUPON_NAME')`, and if the coupon is valid, it is automatically applied in Magic Checkout. + + + +### 1.7 Add Checkout Options + + Pass the Checkout options. Ensure that you pass the `order_id` that you received in the response of the previous step. + + ```yml: Checkout Options + var options = { + 'key': '', + 'amount': 50000, + 'currency': '', + 'name': '', + 'order_id': 'order_EMBFqjDHEEn80l', // Generate order_id using Orders API + 'description': 'Fine T-Shirt', + 'timeout': 60, // in seconds + 'prefill': { + 'contact': '', + 'email': '' + }, + 'show_coupons': true // magic checkout + }; + ``` + + + Checkout Options + + You must pass these parameters in Checkout to initiate the payment. + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + + + + +### 1.7.1 Enable UPI Intent on iOS *(Optional)* + + Provide your customers with a better payment experience by enabling UPI Intent on your app's Checkout form. In the UPI Intent flow: + 1. Customer selects UPI as the payment method in your iOS app. A list of UPI apps supporting the intent flow is displayed. For example, PhonePe, Google Pay and Paytm. + 2. Customer selects the preferred app. The UPI app opens with pre-populated payment details. + 3. Customer enters their UPI PIN to complete their transactions. + 4. Once the payment is successful, the customer is redirected to your app or website. + + To enable this in your iOS integration, you must make the following changes in your app's info.plist file. + + ```xml: info.plist + LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + + ``` + + Know more about [UPI Intent and its benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). + + + + + + + + +### 1.8 Open Checkout + + Use the below code to open the Razorpay checkout. + + ```yml: Open Razorpay Checkout + _razorpay.open(options); + ``` + + + +### 1.9 Perform Post Payment Processing + + Based on the response, you can handle post-payment processing on your end. + +> **WARN** +> +> +> **Timeout Handling** +> +> If no API call is made within 45 seconds, our background job will assume there is a network drop off and will proceed to place the order on Shopify automatically. +> + + + Fetch an Order + + Use the Fetch Orders API to retrieve order details, including customer information, address, shipping method and promotions of a particular order: + + v1/orders/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ + -X GET https://api.razorpay.com/v1/orders/order_R1yDkxyIuKXXXX \ + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + import com.razorpay.Order; + import com.razorpay.RazorpayClient; + import com.razorpay.RazorpayException; + try { + Order order = razorpay.Orders.fetch(""); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + # do easy_install razorpay or + # pip install razorpay + + import razorpay + razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]")) + + order_id = + resp = client.order.fetch(order_id) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->fetch($orderId); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('key_id', 'key_secret') + + order = Razorpay::Order.fetch('order_R1yDkxyIuKXXXX') + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.fetch(orderId) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("", "") + + body, err := client.Order.Fetch("", nil, nil) + ``` + ```json: Response: COD Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 507000, + "amount_paid": 0, + "amount_due": 507000, + "currency": "INR", + "receipt": "#30567", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "placed", + "attempts": 0, + "notes": { + "cart_id": "hWN2Am4BGnQrizKE3hzeQaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/hf5Q?key=14bbbce35b8", + "shopify_order_id": "6302119854247" + }, + "created_at": 1756045901, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 5000, + "shipping_fee": 7000, + "customer_details": { + "contact": "+919100000000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + }, + "billing_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + } + }, + "line_items_total": 600000, + "tax_details": { + "total_tax": 4128, + "taxes_included": true + } + } + ```json: Response: Prepaid Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 100700, + "amount_paid": 100700, + "amount_due": 0, + "currency": "INR", + "receipt": "#30414", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "paid", + "attempts": 1, + "notes": { + "cart_id": "hWN1TcwL?key=1a3a5a7c", + "storefront_id": "gid://shopify/Cart/hIkey=af7c7800", + "flits_cart_token": "hWcwL?key=1a3741dc_8740f5_175447", + "shopify_order_id": "6266036191399" + }, + "created_at": 1754466155, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 0, + "shipping_fee": 700, + "customer_details": { + "billing_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "billing_address", + "zipcode": "110057" + }, + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "shipping_address", + "zipcode": "110057" + } + }, + "line_items_total": 110000, + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + Know more about the [Orders API.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) + + +> **INFO** +> +> +> **Order Status** +> +> Check the order status for the following: +> +> - Prepaid orders: `paid`. +> - COD orders: `placed`. +> + + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the order to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the order. For example, `order_R1yDkxyIuKXXXX`. + +`entity` +: `string` Type of entity. Value is `order`. + +`amount` +: `integer` Total order amount in the smallest currency unit (paise). + +`amount_paid` +: `integer` Amount paid towards the order in paise. For prepaid orders, this shows the actual amount paid. For COD orders, this is `0` until payment is collected. + +`amount_due` +: `integer` Outstanding amount due in paise. For prepaid orders, this shows any remaining balance. For COD orders, this equals the `amount` field until payment is collected. + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`receipt` +: `string` Receipt identifier for internal reference. For example, `#30567`. + +`offers` +: `array` Array of offer IDs applied to the order. + +`status` +: `string` Current status of the order. Possible values: + - `placed`: Order placed but payment pending (COD orders). + - `paid`: Order placed and payment completed (prepaid orders). + - `cancelled`: Order cancelled. + - `refunded`: Order refunded. + +`attempts` +: `integer` Number of payment attempts made for this order. For example, `1`. + +`notes` +: `object` Custom notes added to the order containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `shopify_order_id` + : `string` Shopify order reference. + + `flits_cart_token` + : `string` Flits integration token (optional). + +`created_at` +: `integer` Unix timestamp indicating when the order was created. For example, `1756045901`. + +`description` +: `string|null` Order description. Returns `null` if no description is provided. + +`checkout` +: `string|null` Checkout identifier. Returns `null` if not applicable. + +`promotions` +: `array` Array of promotion objects applied to the order. + + `code` + : `string` Promotion code used. For example, `orderOff`. + + `type` + : `string` Type of promotion. For example, `cart_value`. + + `value` + : `integer` Discount value in paise. For example, `10000` for ₹100. + + `description` + : `string` Human-readable promotion description. + + `reference_id` + : `string` Internal reference for the promotion. + +`cod_fee` +: `integer` Cash on Delivery charges in paise. For COD orders, this contains the fee amount (for example, `5000` for ₹50). For prepaid orders, this is `0`. + +`shipping_fee` +: `integer` Shipping charges in paise. For example, `700` for ₹7. + +`customer_details` +: `object` Customer information. + + `contact` + : `string` Customer's phone number. + + `email` + : `string` Customer's email address. + + `shipping_address` + : `object` Complete shipping address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for delivery. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Recipient name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `shipping_address`. + + `zipcode` + : `string` Postal code. + + `billing_address` + : `object` Complete billing address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for billing. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Account holder name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `billing_address`. + + `zipcode` + : `string` Postal code. + +`line_items_total` +: `integer` Total value of line items in paise before adding shipping fees and COD fees, after applying promotions. For example, `60000` for ₹600. + +`tax_details` +: `object` Tax information. + + `total_tax` + : `integer` Total tax amount in paise. For example, `4128`. + + `taxes_included` + : `boolean` Indicates whether taxes are included in the item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### Fetch a Payment + + Use the Fetch Payments API to retrieve comprehensive payment details, including transaction status, payment method, customer information, settlement details, and the associated order information for a specific payment: + + v1/payments/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X GET https://api.razorpay.com/v1/payments/pay_R1yFlWQar3XXXX + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String paymentId = "pay_R1yFlWQar3XXXX"; + + Payment payment = razorpay.payments.fetch(paymentId); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.payment.fetch(paymentId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + paymentId := "pay_R1yFlWQar3XXXX" + + body, err := client.Payment.Fetch(paymentId, nil, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->payment->fetch($paymentId); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + paymentId = "pay_R1yFlWQar3XXXX" + + Razorpay::Payment.fetch(paymentId) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.payments.fetch(paymentId) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + Payment payment = client.Payment.Fetch(paymentId); + ``` + + ```json: Response: COD Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 55700, + "currency": "INR", + "status": "pending", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "cod", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919100000000", + "notes": { + "cart_id": "hWN2QaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/h?key=14bbf59ce35b8" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1756046099, + "receiver_type": null + } + ```json: Response: Prepaid Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 90630, + "currency": "INR", + "status": "captured", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "cart_id": "hWNsVrcwL?key=1a3a457ddc", + "storefront_id": "gid://shopify/Cart/hWv3e8?key=af707", + "flits_cart_token": "hWrcwL?key=1a3a5a70f5_17547", + "optimizer_provider_name": "razorpay" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "727947422583", + "upi_transaction_id": "1F723677C679EF578A95" + }, + "created_at": 1754466271, + "receiver_type": null, + "upi": { + "vpa": "gaurav.kumar@exampleupi" + } + } + ``` + + Know more about the [Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md). + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. For example, `pay_R1yFlWQar3XXXX`. + +`entity` +: `string` Type of entity. Value is `payment`. + +`amount` +: `integer` Payment amount in the smallest currency unit (paise). For COD payments, this includes the COD fee (for example, `55700` for ₹557). For prepaid payments, this equals the captured amount (for example, `90630` for ₹906.30). + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`status` +: `string` Current status of the payment. Possible values: + - `pending`: Payment pending collection (COD orders). + - `captured`: Payment successfully captured (prepaid orders). + - `authorized`: Payment authorized but not captured. + - `failed`: Payment attempt failed. + +`order_id` +: `string` Unique identifier of the associated order. For example, `order_R1yDkxyIuKXXXX`. + +`invoice_id` +: `string|null` Unique identifier of the associated invoice. Returns `null` if no invoice is linked. + +`international` +: `boolean` Indicates whether this is an international payment. Possible values: + - `true`: International payment. + - `false`: Domestic payment. + +`method` +: `string` Payment method used. Possible values include: + - `cod` + - `upi` + - `card` + - `netbanking` + - `wallet` + +`amount_refunded` +: `integer` Amount refunded in paise. For example, `0` indicates no refund has been processed. + +`refund_status` +: `string|null` Current refund status. Returns `null` if no refund is applicable. Possible values: + - `partial`: Partial refund processed. + - `full`: Full refund processed. + +`captured` +: `boolean` Indicates whether the payment has been captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string|null` Payment description. Returns `null` if no description is provided. + +`card_id` +: `string|null` Unique identifier of the card used for payment. Returns `null` for non-card payments. + +`bank` +: `string|null` Bank identifier for netbanking payments. Returns `null` for other payment methods. + +`wallet` +: `string|null` Wallet provider identifier. Returns `null` for non-wallet payments. + +`vpa` +: `string|null` Virtual Payment Address for UPI payments. For example, `gaurav.kumar@exampleupi`. Returns `null` for non-UPI payments. + +`email` +: `string` Customer's email address. + +`contact` +: `string` Customer's phone number. + +`notes` +: `object` Custom notes added to the payment containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `flits_cart_token` + : `string` Flits integration token (optional). + + `optimizer_provider_name` + : `string` Payment optimizer provider name (optional). + +`fee` +: `integer|null` Processing fee charged in paise. For example, `0` indicates no fee. Returns `null` for COD payments. + +`tax` +: `integer|null` Tax amount on processing fee in paise. For example, `0` indicates no tax. Returns `null` for COD payments. + +`error_code` +: `string|null` Error code if payment failed. Returns `null` for successful payments. + +`error_description` +: `string|null` Human-readable error description. Returns `null` for successful payments. + +`error_source` +: `string|null` Source of the error. Returns `null` for successful payments. + +`error_step` +: `string|null` Step at which error occurred. Returns `null` for successful payments. + +`error_reason` +: `string|null` Reason for the error. Returns `null` for successful payments. + +`acquirer_data` +: `object` Data from the payment acquirer. + + `rrn` + : `string` Retrieval Reference Number from the acquirer (optional). + + `upi_transaction_id` + : `string` UPI transaction identifier from the acquirer (optional). + +`created_at` +: `integer` Unix timestamp indicating when the payment was created. For example, `1756046099`. + +`receiver_type` +: `string|null` Type of receiver for the payment. Returns `null` if not applicable. + +`upi` +: `object` UPI-specific payment details (only present for UPI payments). + + `vpa` + : `string` Virtual Payment Address used for the UPI payment. + + + + + + + + + +### 1.10 Complete Checkout Call + + After a successful payment, call the complete checkout API to create the order in Shopify. You must make the call from the callback handler implemented when importing the react SDK. Ensure you redirect the user to the `order_status_url` to show them the order success page on Shopify. + + /1cc/shopify/complete?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/1cc/shopify/complete?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{ + "razorpay_payment_id": "pay_Rk3b76fSqXXXXX", + "razorpay_order_id": "order_Rk3UmCXXW5XXXX" + }' + ```json: Response + { + "id": 65157213390123, + "order_id": "#32697", + "payment_id": "pay_Rk3b76fSqXXXXX", + "payment_method": "netbanking", + "payment_currency": "", + "total_amount": 659430, + "total_tax": "543.91", + "shipping_fee": 700, + "cod_fee": 0, + "promotions": [ + { + "reference_id": "Auto Order Amount Discount", + "code": "Auto Order Amount Discount", + "type": "automatic", + "value": 100000, + "source": "shopify" + } + ], + "shipping_country": "in", + "customer_details": { + "email": "", + "contact": "", + "shipping_address": { + "name": "", + "line1": "123 Main Street", + "city": "Bengaluru", + "state": "KARNATAKA", + "zipcode": "560049", + "country": "in" + } + }, + "order_status_url": "https://your-store.myshopify.com/orders/...", + "is_new_customer": false + } + ``` + + + + Request Parameters + +`razorpay_payment_id` _mandatory_ +: `string` Unique payment identifier. Format: `pay_` followed by 14 characters. + +`razorpay_order_id` _mandatory_ +: `string` Unique order identifier from Step 1.2. Format: `order_` followed by 14 characters. + + + +### Response Parameters + +`id` +: `integer` Unique Shopify order identifier. For example, `65157213390123`. + +`order_id` +: `string` Human-readable order number. For example, `#32697`. + +`payment_id` +: `string` Razorpay payment identifier. For example, `pay_Rk3b76fSqXXXXX`. + +`payment_method` +: `string` Payment method used. Possible values include: + - `netbanking` + - `upi` + - `card` + - `wallet` + +`payment_currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`total_amount` +: `integer` Total order amount in smallest currency unit (paise). For example, `659430` for ₹6594.30. + +`total_tax` +: `string` Total tax amount as string. For example, `543.91`. + +`shipping_fee` +: `integer` Shipping charges in smallest currency unit (paise). For example, `700` for ₹7. + +`cod_fee` +: `integer` Cash on Delivery fee in smallest currency unit (paise). For example, `0` indicates no COD fee. + +`promotions` +: `array` Array of applied promotions/discounts. + + `reference_id` + : `string` Internal reference for the promotion. + + `code` + : `string` Promotion code used. + + `type` + : `string` Type of promotion. Possible values: + - `automatic`: Automatically applied discount. + - `coupon`: Coupon-based discount. + + `value` + : `integer` Discount value in smallest currency unit (paise). For example, `100000` for ₹1000. + + `source` + : `string` Source of the promotion. For example, `shopify`. + +`shipping_country` +: `string` Country code for shipping destination. For example, `in`. + +`customer_details` +: `object` Complete customer information. + + `email` + : `string` Customer's email address. + + `contact` + : `string` Customer's phone number. + + `shipping_address` + : `object` Complete shipping address information. + + `name` + : `string` Recipient name. + + `line1` + : `string` Address line 1. + + `city` + : `string` City name. + + `state` + : `string` State name. + + `zipcode` + : `string` Postal code. + + `country` + : `string` Country code. For example, `in`. + +`order_status_url` +: `string` Shopify order status page URL for customer. + +`is_new_customer` +: `boolean` Whether this is a new customer's first order. Possible values: + - `true`: New customer's first order. + - `false`: Existing customer order. + + + + + + +#### Pass Additional Attributes to Shopify Orders + +Shopify orders support Tags and Additional Attributes (note attributes). Include the attributes in the Shopify cart's attributes object before initiating checkout: + +```javascript +// When creating/updating Shopify cart +const cartPayload = { + cart: { + token: "your_cart_token", + note: "Customer special instructions", + attributes: { + "Source": "Mobile App", + "App Version": "2.1.0", + "Campaign": "Summer Sale 2025", + "Custom Field": "Your custom value" + }, + item_count: 1, + items: [/* ... */] + }, + key: "rzp_live_XXXXXX" +}; +``` + +These attributes will flow through to the Shopify order and appear in the additional attributes section in Shopify Admin. + +## 2. Test Integration + +Check the following checklist below: + +- Shopify cart creation is working correctly. +- Checkout id is generated successfully. +- Order id is created with analytics parameters. +- Magic Checkout SDK opens without errors. +- Coupons apply correctly via prefill. +- Payment flow completes successfully. +- Complete Checkout API creates order in Shopify. +- Order appears in Shopify Admin with correct details. +- Additional attributes appear correctly in Shopify order. + +## Error Handling + +Error Scenario | Recommended Action +--- +Invalid cart token | Ensure Shopify cart exists before [Step 1.1](#11-create-a-checkout-id). +--- +Payment not captured | Verify payment status before complete checkout. +--- +Invalid signature | Regenerate signature using Razorpay's signature verification. +--- +Coupon invalid | Handle error callback and notify user. + +> **WARN** +> +> +> **Fallback to Shopify Checkout** +> +> If any Magic Checkout API fails, redirect users to the standard Shopify checkout to ensure customers can still complete their purchase. +> + +## Support + +For integration support, reach out to your Razorpay account manager or raise a request with our [support team](https://razorpay.com/support/#request). diff --git a/llm-content/payments/magic-checkout/shopify/custom/ios-integration.md b/llm-content/payments/magic-checkout/shopify/custom/ios-integration.md new file mode 100644 index 00000000..7b40d2d0 --- /dev/null +++ b/llm-content/payments/magic-checkout/shopify/custom/ios-integration.md @@ -0,0 +1,1674 @@ +--- +title: Integrate Razorpay Magic Checkout on iOS App - Shopify +heading: Integrate Magic Checkout on iOS App - Shopify +description: Steps to integrate Magic Checkout on your iOS app using the Razorpay iOS Standard SDK - Shopify integration. +--- + +# Integrate Magic Checkout on iOS App - Shopify + +Follow these steps to integrate the Razorpay Magic Checkout on your iOS application when using Shopify as your e-commerce platform. + +## Prerequisites + +- Ensure you enable [Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#3-how-do-i-check-if-magic-checkout) on your account. +- Integrate [Magic Checkout With Shopify Store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify.md). +- Integrate with [iOS Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/ios-integration.md). +- Generate [Live API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys) from the Dashboard. + + - **1. Build Integration**: Integrate with iOS App for Shopify. + + - **2. Test Integration**: Test the integration by making a test payment. + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Create a Checkout id + + Generate a unique cart identifier to initiate the Magic Checkout process. + + +> **INFO** +> +> +> **Important** +> +> Ensure you create the Shopify cart before making this request as the cart token must be included in the payload. +> + + /magic/checkout/shopify?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/magic/checkout/shopify?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{ + "cart": { + "token": "ashgad?key=abasab", + "note": null, + "attributes": {}, + "item_count": 1, + "items": [ + { + "id": 100000000001, + "quantity": 1, + "product_id": 832938123321, + "variant_id": 100000000001, + "properties": {} + } + ] + } + }' + ```json: Response + { + "shopify_checkout_id": "gid://shopify/Cart/ashgad?key=abasab", + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + + + Request Parameters + +`cart` _mandatory_ +: `object` Complete cart object from Shopify. + +`cart.token` _mandatory_ +: `string` Unique cart token from Shopify cart creation. + +`cart.note` _optional_ +: `string|null` Customer notes or special instructions. + +`cart.attributes` _optional_ +: `object` Custom attributes for the cart (key-value pairs). + +`cart.item_count` _mandatory_ +: `integer` Total number of items in the cart. + +`cart.items` _mandatory_ +: `array` Array of cart items. + +`cart.items[].id` _mandatory_ +: `integer` Unique item identifier. + +`cart.items[].quantity` _mandatory_ +: `integer` Quantity of the item. + +`cart.items[].product_id` _mandatory_ +: `integer` Shopify product identifier. + +`cart.items[].variant_id` _mandatory_ +: `integer` Shopify variant identifier. + +`cart.items[].properties` _optional_ +: `object` Custom item properties. + + + +### Response Parameters + +`shopify_checkout_id` +: `string` Unique checkout identifier for Shopify integration. + +`tax_details` +: `object` Tax information for the checkout. + + `total_tax` + : `integer` Total tax amount in smallest currency unit (paise). + + `taxes_included` + : `boolean` Whether taxes are included in item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### 1.2 Create Order id on Server + + Create a Razorpay order id required for the payment modal. This API requires the `shopify_checkout_id` from [Step 1.1](#11-create-a-checkout-id). + + /magic/order/shopify?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/magic/order/shopify?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: */*" \ + -H "Origin: https://api.razorpay.com" \ + -d '{ + "shopify_checkout_id": "gid://shopify/Cart/ashgad?key=abasab", + "ga_id": "GA1.1.xxxxxxx.xxxxxxxx", + "fb_analytics": { + "external_id": "unique_fb_external_id", + "fbp": "fb.1.xxxxxxx.xxxxxxxx", + "fbc": "", + "event_source_url": "https://your-store.com/" + }, + "utm_parameters": { + "landing_page_url": "https://your-store.com/", + "user_agent": "Mozilla/5.0 (Linux; Android 12; SM-G991B)..." + }, + "analytics": { + "fb_analytics": { + "external_id": "unique_fb_external_id", + "fbp": "fb.1.xxxxxxx.xxxxxxxx", + "fbc": "" + }, + "ga4": { + "session_ids": { + "_ga_XXXXXXXXXX": "GS1.1.xxxxxxxx.x.x.x.x.x" + }, + "client_id": "GA1.1.xxxxxxxx.xxxxxxxx" + }, + "google_ads": { + "gclid": "", + "wbraid": "", + "gbraid": "" + }, + "source_url": "https://your-store.com/" + } + }' + ```json: Response + { + "preferences": null, + "order_id": "order_EKwxwAgItmmXdp" + } + ``` + + + + Request Parameters + +`shopify_checkout_id` _mandatory_ +: `string` Checkout id from [Step 1.1](#11-create-a-checkout-id). + +`ga_id` _optional_ +: `string` Google Analytics client identifier. + +`fb_analytics` _optional_ +: `object` Facebook Analytics parameters. + + `external_id` _optional_ + : `string` Unique external id for Facebook tracking. + + `fbp` _optional_ + : `string` Facebook browser pixel id. + + `fbc` _optional_ + : `string` Facebook click id. + + `event_source_url` _optional_ + : `string` Source URL for the event. + +`utm_parameters` _optional_ +: `object` UTM tracking parameters. + + `landing_page_url` _optional_ + : `string` Landing page URL. + + `user_agent` _optional_ + : `string` Browser user agent string. + +`analytics` _optional_ +: `object` Comprehensive analytics data. + + `fb_analytics` _optional_ + : `object` Facebook Analytics configuration. + + `external_id` _optional_ + : `string` Unique external id for Facebook tracking. + + `fbp` _optional_ + : `string` Facebook browser pixel id. + + `fbc` _optional_ + : `string` Facebook click id. + + `ga4` _optional_ + : `object` Google Analytics 4 configuration. + + `session_ids` _optional_ + : `object` GA4 session identifiers. + + `client_id` _optional_ + : `string` GA4 client identifier. + + `google_ads` _optional_ + : `object` Google Ads tracking parameters. + + `gclid` _optional_ + : `string` Google Click Identifier. + + `wbraid` _optional_ + : `string` Web-to-app measurement parameter. + + `gbraid` _optional_ + : `string` Google Ads Broad match parameter. + + `source_url` _optional_ + : `string` Source URL for analytics. + + + +### Response Parameters + +`preferences` +: `object|null` Customer preferences. Returns `null` if no preferences are set. + +`order_id` +: `string` Unique Razorpay order identifier. For example, `order_EKwxwAgItmmXdp`. + + + + + + +### 1.3 Import Razorpay iOS Standard SDK Library + + You can import the Razorpay iOS Standard SDK library using any of these ways: + + + + Refer to our [Cocoapod](https://cocoapods.org/pods/razorpay-pod) (bitcode enabled) pod. + + + 1. Download the SDK and unzip it. + 2. Open your project in XCode and go to **file** under **Menu**. Select **Add files to "yourproject"**. + 3. Select **Razorpay.xcframework** in the directory you just unzipped. + 4. Select the **Copy items if needed** checkbox. + 5. Click **Add**. + 6. Navigate to **Target settings → General** and add the **Razorpay.xcframework** in both **Embedded Binaries** and **Linked Frameworks and Libraries**. + + + If you are building an **Objective-C** project, follow the steps given for Swift and the additional steps given below: + 1. Go to **Project Settings** and select **Build Settings - All and Combined**. + 2. Set the **Always Embed Swift Standard Libraries** option to **TRUE**. + + Ensure that you have the framework added in both **Embedded Binaries** and **Linked Frameworks and Libraries** under **Target settings - General**. + + + + + + Xcode 11 + + Ensure that you have the framework added in **Frameworks, Libraries, and Embed Content** under **Target settings - General**. Change `Embed status` from - `Do not Embed` to `Embed & Sign`. + + Watch the GIF to see how to add Frameworks, Libraries and Embed Content. + + ![add Frameworks, Libraries and Embed Content](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ios-embed-framework.gif.md) + + + + + + +### 1.4 Initialise Razorpay iOS Standard SDK + + To initialise Razorpay iOS Standard SDK, you need the following: + + - API keys. You can generate this from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + +> **WARN** +> +> +> **Watch Out!** +> +> API keys should not be hardcoded in the app. Must be sent from your backend as app-related metadata fetch. +> + + + - A delegate that implements `RazorpayPaymentCompletionProtocol` or `RazorpayPaymentCompletionProtocolWithData`. + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - For Swift version 5.1+, ensure that you declare `var razorpay: RazorpayCheckout!`. +> - For versions lower than 5.1, use `var razorpay: Razorpay!`. +> - Alternatively, you can use the following alias and retain the variable as Razorpay. + +> +> `typealias Razorpay = RazorpayCheckout` +> + + ```swift: ViewController.swift + + import Razorpay + + class ViewController: UIViewController, RazorpayPaymentCompletionProtocol { + + // typealias Razorpay = RazorpayCheckout + + var razorpay: RazorpayCheckout! + override func viewDidLoad() { + super.viewDidLoad() + razorpay = RazorpayCheckout.initWithKey(razorpayTestKey, andDelegate: self) + } + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + self.showPaymentForm() + } + } + ```objectivec: ViewController.m + #import + //- typedef RazorpayCheckout Razorpay; + + @interface ViewController () { + RazorpayCheckout *razorpay; + . + . + - (void)viewDidLoad { + [super viewDidLoad]; + . + . + razorpay = [RazorpayCheckout initWithKey:@"YOUR_PUBLIC_KEY" andDelegate:self]; + } + } + ``` + + + +### 1.5 Coupon Handling + + Since this is an SDK integration, Shopify coupons will not auto-apply like they do on the website. You must explicitly pass coupon codes to Magic Checkout. When initialising Magic Checkout, include the coupon code in the prefill options: + + ```javascript + const options = { + key: 'rzp_live_XXXXXX', + order_id: 'order_EKwxwAgItmmXdp', + // ... other options + + prefill: { + coupon_code: 'MY_COUPON_NAME', // Coupon from your cart to auto-apply + }, + }; + + // Initialize Magic Checkout with options + MagicCheckout.open(options); + ``` + + Your app captures the coupon applied on the cart page, then passes the coupon code in the `prefill.coupon_code` field. The SDK internally calls `applyCoupon('MY_COUPON_NAME')`, and if the coupon is valid, it is automatically applied in Magic Checkout. + + + +### 1.6 Pass Payment Options and Display Checkout Form + + Call `RazorpayCheckout.checkIntegration(withMerchantKey: )` to check the health of integration. This will also let you know if the SDK version is outdated. The opinionated alerting is displayed only when it is running on simulators. + + Add the following code to your `ViewController` or wherever you want to initialise payments: + + ```swift: ViewController.swift + internal func showPaymentForm(){ + let options: [String:Any] = [ + "key": "YOUR_KEY_ID", + "amount": "100", //This is in currency subunits. 100 = 100 paise= INR 1. + "currency": "",//We support more that 92 international currencies. + "description": "purchase description", + "order_id": "order_DBJOWzybf0sJbb", + "image": "https://url-to-image.jpg", + "name": "business or product name", + "prefill": [ + "contact": "", + "email": "" + ], + "show_coupons": true, //magic checkout + "theme": [ + "color": "#F37254" + ] + ] + razorpay.open(options) + } + ```objectivec: ViewController.m + - (void)showPaymentForm { // called by your app + NSDictionary *options = @{ + @"key": @"YOUR_KEY_ID", + @"amount": @"1000", //This is in currency subunits. 1000 = 1000 paise= INR 10. + // all optional other than amount. + @"currency": @"", //We support more that 92 international currencies. + @"image": @"https://url-to-image.jpg", + @"name": @"business or product name", + @"description": @"purchase description", + @"order_id": @"order_4xbQrmEoA5WJ0G", + @"prefill" : @{ + @"email": @"", + @"contact": @"" + }, + @"show_coupons": @"true", //magic checkout + @"theme": @{ + @"color": @"#F37254" + } + }; + [razorpay open:options]; + } + ``` + +> **INFO** +> +> +> **Optional Parameter - displayController** +> +> When the optional parameter- displayController, is specified, the Razorpay controller is pushed onto this controller's navigation controller if present or presented on this controller if absent. +> +> ``` +> razorpay.open(options, displayController: self) +> ``` +> + + + + Checkout Options + + `key` _mandatory_ +: `string` API key id generated from the Dashboard. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `50000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. Length must be of 3 characters. + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order id generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `cod` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`show_coupons` _optional_ +: `boolean` Determines whether to show the coupons to customer on the checkout. Possible values: + - `true` (default): Enables the Coupon feature. + - `false`: Disables the Coupon feature. + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + You must pass these parameters in Checkout to initiate the payment. + + +> **WARN** +> +> +> +> **Watch Out!** +> +> To support theme colour in the progress bar, please pass HEX colour values only. +> + + + + +### 1.6.1 Enable UPI Intent on iOS *(Optional)* + + Provide your customers with a better payment experience by enabling UPI Intent on your app's Checkout form. In the UPI Intent flow: + 1. Customer selects UPI as the payment method in your iOS app. A list of UPI apps supporting the intent flow is displayed. For example, PhonePe, Google Pay and Paytm. + 2. Customer selects the preferred app. The UPI app opens with pre-populated payment details. + 3. Customer enters their UPI PIN to complete their transactions. + 4. Once the payment is successful, the customer is redirected to your app or website. + + To enable this in your iOS integration, you must make the following changes in your app's info.plist file. + + ```xml: info.plist + LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + + ``` + + Know more about [UPI Intent and its benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). + + + + + + +### 1.7 Perform Post Payment Processing + + Based on the response, you can handle post-payment processing on your end. + +> **WARN** +> +> +> **Timeout Handling** +> +> If no API call is made within 45 seconds, our background job will assume there is a network drop off and will proceed to place the order on Shopify automatically. +> + + + Fetch an Order + + Use the Fetch Orders API to retrieve order details, including customer information, address, shipping method and promotions of a particular order: + + v1/orders/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ + -X GET https://api.razorpay.com/v1/orders/order_R1yDkxyIuKXXXX \ + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + import com.razorpay.Order; + import com.razorpay.RazorpayClient; + import com.razorpay.RazorpayException; + try { + Order order = razorpay.Orders.fetch(""); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + # do easy_install razorpay or + # pip install razorpay + + import razorpay + razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]")) + + order_id = + resp = client.order.fetch(order_id) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->fetch($orderId); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('key_id', 'key_secret') + + order = Razorpay::Order.fetch('order_R1yDkxyIuKXXXX') + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.fetch(orderId) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("", "") + + body, err := client.Order.Fetch("", nil, nil) + ``` + ```json: Response: COD Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 507000, + "amount_paid": 0, + "amount_due": 507000, + "currency": "INR", + "receipt": "#30567", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "placed", + "attempts": 0, + "notes": { + "cart_id": "hWN2Am4BGnQrizKE3hzeQaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/hf5Q?key=14bbbce35b8", + "shopify_order_id": "6302119854247" + }, + "created_at": 1756045901, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 5000, + "shipping_fee": 7000, + "customer_details": { + "contact": "+919100000000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + }, + "billing_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + } + }, + "line_items_total": 600000, + "tax_details": { + "total_tax": 4128, + "taxes_included": true + } + } + ```json: Response: Prepaid Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 100700, + "amount_paid": 100700, + "amount_due": 0, + "currency": "INR", + "receipt": "#30414", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "paid", + "attempts": 1, + "notes": { + "cart_id": "hWN1TcwL?key=1a3a5a7c", + "storefront_id": "gid://shopify/Cart/hIkey=af7c7800", + "flits_cart_token": "hWcwL?key=1a3741dc_8740f5_175447", + "shopify_order_id": "6266036191399" + }, + "created_at": 1754466155, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 0, + "shipping_fee": 700, + "customer_details": { + "billing_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "billing_address", + "zipcode": "110057" + }, + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "shipping_address", + "zipcode": "110057" + } + }, + "line_items_total": 110000, + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + Know more about the [Orders API.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) + + +> **INFO** +> +> +> **Order Status** +> +> Check the order status for the following: +> +> - Prepaid orders: `paid`. +> - COD orders: `placed`. +> + + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the order to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the order. For example, `order_R1yDkxyIuKXXXX`. + +`entity` +: `string` Type of entity. Value is `order`. + +`amount` +: `integer` Total order amount in the smallest currency unit (paise). + +`amount_paid` +: `integer` Amount paid towards the order in paise. For prepaid orders, this shows the actual amount paid. For COD orders, this is `0` until payment is collected. + +`amount_due` +: `integer` Outstanding amount due in paise. For prepaid orders, this shows any remaining balance. For COD orders, this equals the `amount` field until payment is collected. + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`receipt` +: `string` Receipt identifier for internal reference. For example, `#30567`. + +`offers` +: `array` Array of offer IDs applied to the order. + +`status` +: `string` Current status of the order. Possible values: + - `placed`: Order placed but payment pending (COD orders). + - `paid`: Order placed and payment completed (prepaid orders). + - `cancelled`: Order cancelled. + - `refunded`: Order refunded. + +`attempts` +: `integer` Number of payment attempts made for this order. For example, `1`. + +`notes` +: `object` Custom notes added to the order containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `shopify_order_id` + : `string` Shopify order reference. + + `flits_cart_token` + : `string` Flits integration token (optional). + +`created_at` +: `integer` Unix timestamp indicating when the order was created. For example, `1756045901`. + +`description` +: `string|null` Order description. Returns `null` if no description is provided. + +`checkout` +: `string|null` Checkout identifier. Returns `null` if not applicable. + +`promotions` +: `array` Array of promotion objects applied to the order. + + `code` + : `string` Promotion code used. For example, `orderOff`. + + `type` + : `string` Type of promotion. For example, `cart_value`. + + `value` + : `integer` Discount value in paise. For example, `10000` for ₹100. + + `description` + : `string` Human-readable promotion description. + + `reference_id` + : `string` Internal reference for the promotion. + +`cod_fee` +: `integer` Cash on Delivery charges in paise. For COD orders, this contains the fee amount (for example, `5000` for ₹50). For prepaid orders, this is `0`. + +`shipping_fee` +: `integer` Shipping charges in paise. For example, `700` for ₹7. + +`customer_details` +: `object` Customer information. + + `contact` + : `string` Customer's phone number. + + `email` + : `string` Customer's email address. + + `shipping_address` + : `object` Complete shipping address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for delivery. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Recipient name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `shipping_address`. + + `zipcode` + : `string` Postal code. + + `billing_address` + : `object` Complete billing address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for billing. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Account holder name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `billing_address`. + + `zipcode` + : `string` Postal code. + +`line_items_total` +: `integer` Total value of line items in paise before adding shipping fees and COD fees, after applying promotions. For example, `60000` for ₹600. + +`tax_details` +: `object` Tax information. + + `total_tax` + : `integer` Total tax amount in paise. For example, `4128`. + + `taxes_included` + : `boolean` Indicates whether taxes are included in the item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### Fetch a Payment + + Use the Fetch Payments API to retrieve comprehensive payment details, including transaction status, payment method, customer information, settlement details, and the associated order information for a specific payment: + + v1/payments/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X GET https://api.razorpay.com/v1/payments/pay_R1yFlWQar3XXXX + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String paymentId = "pay_R1yFlWQar3XXXX"; + + Payment payment = razorpay.payments.fetch(paymentId); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.payment.fetch(paymentId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + paymentId := "pay_R1yFlWQar3XXXX" + + body, err := client.Payment.Fetch(paymentId, nil, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->payment->fetch($paymentId); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + paymentId = "pay_R1yFlWQar3XXXX" + + Razorpay::Payment.fetch(paymentId) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.payments.fetch(paymentId) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + Payment payment = client.Payment.Fetch(paymentId); + ``` + + ```json: Response: COD Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 55700, + "currency": "INR", + "status": "pending", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "cod", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919100000000", + "notes": { + "cart_id": "hWN2QaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/h?key=14bbf59ce35b8" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1756046099, + "receiver_type": null + } + ```json: Response: Prepaid Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 90630, + "currency": "INR", + "status": "captured", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "cart_id": "hWNsVrcwL?key=1a3a457ddc", + "storefront_id": "gid://shopify/Cart/hWv3e8?key=af707", + "flits_cart_token": "hWrcwL?key=1a3a5a70f5_17547", + "optimizer_provider_name": "razorpay" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "727947422583", + "upi_transaction_id": "1F723677C679EF578A95" + }, + "created_at": 1754466271, + "receiver_type": null, + "upi": { + "vpa": "gaurav.kumar@exampleupi" + } + } + ``` + + Know more about the [Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md). + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. For example, `pay_R1yFlWQar3XXXX`. + +`entity` +: `string` Type of entity. Value is `payment`. + +`amount` +: `integer` Payment amount in the smallest currency unit (paise). For COD payments, this includes the COD fee (for example, `55700` for ₹557). For prepaid payments, this equals the captured amount (for example, `90630` for ₹906.30). + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`status` +: `string` Current status of the payment. Possible values: + - `pending`: Payment pending collection (COD orders). + - `captured`: Payment successfully captured (prepaid orders). + - `authorized`: Payment authorized but not captured. + - `failed`: Payment attempt failed. + +`order_id` +: `string` Unique identifier of the associated order. For example, `order_R1yDkxyIuKXXXX`. + +`invoice_id` +: `string|null` Unique identifier of the associated invoice. Returns `null` if no invoice is linked. + +`international` +: `boolean` Indicates whether this is an international payment. Possible values: + - `true`: International payment. + - `false`: Domestic payment. + +`method` +: `string` Payment method used. Possible values include: + - `cod` + - `upi` + - `card` + - `netbanking` + - `wallet` + +`amount_refunded` +: `integer` Amount refunded in paise. For example, `0` indicates no refund has been processed. + +`refund_status` +: `string|null` Current refund status. Returns `null` if no refund is applicable. Possible values: + - `partial`: Partial refund processed. + - `full`: Full refund processed. + +`captured` +: `boolean` Indicates whether the payment has been captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string|null` Payment description. Returns `null` if no description is provided. + +`card_id` +: `string|null` Unique identifier of the card used for payment. Returns `null` for non-card payments. + +`bank` +: `string|null` Bank identifier for netbanking payments. Returns `null` for other payment methods. + +`wallet` +: `string|null` Wallet provider identifier. Returns `null` for non-wallet payments. + +`vpa` +: `string|null` Virtual Payment Address for UPI payments. For example, `gaurav.kumar@exampleupi`. Returns `null` for non-UPI payments. + +`email` +: `string` Customer's email address. + +`contact` +: `string` Customer's phone number. + +`notes` +: `object` Custom notes added to the payment containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `flits_cart_token` + : `string` Flits integration token (optional). + + `optimizer_provider_name` + : `string` Payment optimizer provider name (optional). + +`fee` +: `integer|null` Processing fee charged in paise. For example, `0` indicates no fee. Returns `null` for COD payments. + +`tax` +: `integer|null` Tax amount on processing fee in paise. For example, `0` indicates no tax. Returns `null` for COD payments. + +`error_code` +: `string|null` Error code if payment failed. Returns `null` for successful payments. + +`error_description` +: `string|null` Human-readable error description. Returns `null` for successful payments. + +`error_source` +: `string|null` Source of the error. Returns `null` for successful payments. + +`error_step` +: `string|null` Step at which error occurred. Returns `null` for successful payments. + +`error_reason` +: `string|null` Reason for the error. Returns `null` for successful payments. + +`acquirer_data` +: `object` Data from the payment acquirer. + + `rrn` + : `string` Retrieval Reference Number from the acquirer (optional). + + `upi_transaction_id` + : `string` UPI transaction identifier from the acquirer (optional). + +`created_at` +: `integer` Unix timestamp indicating when the payment was created. For example, `1756046099`. + +`receiver_type` +: `string|null` Type of receiver for the payment. Returns `null` if not applicable. + +`upi` +: `object` UPI-specific payment details (only present for UPI payments). + + `vpa` + : `string` Virtual Payment Address used for the UPI payment. + + + + + + + + + +### 1.8 Complete Checkout Call + + After a successful payment, call the complete checkout API to create the order in Shopify. You must make the call from the callback handler implemented when importing the react SDK. Ensure you redirect the user to the `order_status_url` to show them the order success page on Shopify. + + /1cc/shopify/complete?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/1cc/shopify/complete?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{ + "razorpay_payment_id": "pay_Rk3b76fSqXXXXX", + "razorpay_order_id": "order_Rk3UmCXXW5XXXX" + }' + ```json: Response + { + "id": 65157213390123, + "order_id": "#32697", + "payment_id": "pay_Rk3b76fSqXXXXX", + "payment_method": "netbanking", + "payment_currency": "", + "total_amount": 659430, + "total_tax": "543.91", + "shipping_fee": 700, + "cod_fee": 0, + "promotions": [ + { + "reference_id": "Auto Order Amount Discount", + "code": "Auto Order Amount Discount", + "type": "automatic", + "value": 100000, + "source": "shopify" + } + ], + "shipping_country": "in", + "customer_details": { + "email": "", + "contact": "", + "shipping_address": { + "name": "", + "line1": "123 Main Street", + "city": "Bengaluru", + "state": "KARNATAKA", + "zipcode": "560049", + "country": "in" + } + }, + "order_status_url": "https://your-store.myshopify.com/orders/...", + "is_new_customer": false + } + ``` + + + + Request Parameters + +`razorpay_payment_id` _mandatory_ +: `string` Unique payment identifier. Format: `pay_` followed by 14 characters. + +`razorpay_order_id` _mandatory_ +: `string` Unique order identifier from Step 1.2. Format: `order_` followed by 14 characters. + + + +### Response Parameters + +`id` +: `integer` Unique Shopify order identifier. For example, `65157213390123`. + +`order_id` +: `string` Human-readable order number. For example, `#32697`. + +`payment_id` +: `string` Razorpay payment identifier. For example, `pay_Rk3b76fSqXXXXX`. + +`payment_method` +: `string` Payment method used. Possible values include: + - `netbanking` + - `upi` + - `card` + - `wallet` + +`payment_currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`total_amount` +: `integer` Total order amount in smallest currency unit (paise). For example, `659430` for ₹6594.30. + +`total_tax` +: `string` Total tax amount as string. For example, `543.91`. + +`shipping_fee` +: `integer` Shipping charges in smallest currency unit (paise). For example, `700` for ₹7. + +`cod_fee` +: `integer` Cash on Delivery fee in smallest currency unit (paise). For example, `0` indicates no COD fee. + +`promotions` +: `array` Array of applied promotions/discounts. + + `reference_id` + : `string` Internal reference for the promotion. + + `code` + : `string` Promotion code used. + + `type` + : `string` Type of promotion. Possible values: + - `automatic`: Automatically applied discount. + - `coupon`: Coupon-based discount. + + `value` + : `integer` Discount value in smallest currency unit (paise). For example, `100000` for ₹1000. + + `source` + : `string` Source of the promotion. For example, `shopify`. + +`shipping_country` +: `string` Country code for shipping destination. For example, `in`. + +`customer_details` +: `object` Complete customer information. + + `email` + : `string` Customer's email address. + + `contact` + : `string` Customer's phone number. + + `shipping_address` + : `object` Complete shipping address information. + + `name` + : `string` Recipient name. + + `line1` + : `string` Address line 1. + + `city` + : `string` City name. + + `state` + : `string` State name. + + `zipcode` + : `string` Postal code. + + `country` + : `string` Country code. For example, `in`. + +`order_status_url` +: `string` Shopify order status page URL for customer. + +`is_new_customer` +: `boolean` Whether this is a new customer's first order. Possible values: + - `true`: New customer's first order. + - `false`: Existing customer order. + + + + + + +#### Pass Additional Attributes to Shopify Orders + +Shopify orders support Tags and Additional Attributes (note attributes). Include the attributes in the Shopify cart's attributes object before initiating checkout: + +```javascript +// When creating/updating Shopify cart +const cartPayload = { + cart: { + token: "your_cart_token", + note: "Customer special instructions", + attributes: { + "Source": "Mobile App", + "App Version": "2.1.0", + "Campaign": "Summer Sale 2025", + "Custom Field": "Your custom value" + }, + item_count: 1, + items: [/* ... */] + }, + key: "rzp_live_XXXXXX" +}; +``` + +These attributes will flow through to the Shopify order and appear in the additional attributes section in Shopify Admin. + +## 2. Test Integration + +Check the following checklist below: + +- Shopify cart creation is working correctly. +- Checkout id is generated successfully. +- Order id is created with analytics parameters. +- Magic Checkout SDK opens without errors. +- Coupons apply correctly via prefill. +- Payment flow completes successfully. +- Complete Checkout API creates order in Shopify. +- Order appears in Shopify Admin with correct details. +- Additional attributes appear correctly in Shopify order. + +## Error Handling + +Error Scenario | Recommended Action +--- +Invalid cart token | Ensure Shopify cart exists before [Step 1.1](#11-create-a-checkout-id). +--- +Payment not captured | Verify payment status before complete checkout. +--- +Invalid signature | Regenerate signature using Razorpay's signature verification. +--- +Coupon invalid | Handle error callback and notify user. + +> **WARN** +> +> +> **Fallback to Shopify Checkout** +> +> If any Magic Checkout API fails, redirect users to the standard Shopify checkout to ensure customers can still complete their purchase. +> + +## Support + +For integration support, reach out to your Razorpay account manager or raise a request with our [support team](https://razorpay.com/support/#request). diff --git a/llm-content/payments/magic-checkout/shopify/custom/react-native-android-integration.md b/llm-content/payments/magic-checkout/shopify/custom/react-native-android-integration.md new file mode 100644 index 00000000..711b619f --- /dev/null +++ b/llm-content/payments/magic-checkout/shopify/custom/react-native-android-integration.md @@ -0,0 +1,1565 @@ +--- +title: Integrate Razorpay Magic Checkout on React Native Android App - Shopify +heading: Integrate Magic Checkout on React Native Android App - Shopify +description: Steps to integrate Magic Checkout on your React Native Android app using the Razorpay React Native Android Standard SDK - Shopify integration. +--- + +# Integrate Magic Checkout on React Native Android App - Shopify + +Follow these steps to integrate the Razorpay Magic Checkout on your React Native Android application when using Shopify as your e-commerce platform. + +## Prerequisites + +- Ensure you enable [Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#3-how-do-i-check-if-magic-checkout) on your account. +- Integrate [Magic Checkout With Shopify Store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify.md). +- Integrate with [React Native: Android Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/react-native-android-integration.md). +- Generate [Live API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys) from the Dashboard. + +> **INFO** +> +> +> **Handy Tips** +> +> The **compileSdkVersion** is the version of Android. Increase the value of **minSdkVersion** to at least 19 in the build.gradle file in the Android folder to work with the latest Android SDK Build Tools version. Using it with a lower **minSdkVersion** version will lead to errors. +> + + - **1. Build Integration**: Integrate with React Native Android App for Shopify. + + - **2. Test Integration**: Test the integration by making a test payment. + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Create a Checkout id + + Generate a unique cart identifier to initiate the Magic Checkout process. + + +> **INFO** +> +> +> **Important** +> +> Ensure you create the Shopify cart before making this request as the cart token must be included in the payload. +> + + /magic/checkout/shopify?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/magic/checkout/shopify?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{ + "cart": { + "token": "ashgad?key=abasab", + "note": null, + "attributes": {}, + "item_count": 1, + "items": [ + { + "id": 100000000001, + "quantity": 1, + "product_id": 832938123321, + "variant_id": 100000000001, + "properties": {} + } + ] + } + }' + ```json: Response + { + "shopify_checkout_id": "gid://shopify/Cart/ashgad?key=abasab", + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + + + Request Parameters + +`cart` _mandatory_ +: `object` Complete cart object from Shopify. + +`cart.token` _mandatory_ +: `string` Unique cart token from Shopify cart creation. + +`cart.note` _optional_ +: `string|null` Customer notes or special instructions. + +`cart.attributes` _optional_ +: `object` Custom attributes for the cart (key-value pairs). + +`cart.item_count` _mandatory_ +: `integer` Total number of items in the cart. + +`cart.items` _mandatory_ +: `array` Array of cart items. + +`cart.items[].id` _mandatory_ +: `integer` Unique item identifier. + +`cart.items[].quantity` _mandatory_ +: `integer` Quantity of the item. + +`cart.items[].product_id` _mandatory_ +: `integer` Shopify product identifier. + +`cart.items[].variant_id` _mandatory_ +: `integer` Shopify variant identifier. + +`cart.items[].properties` _optional_ +: `object` Custom item properties. + + + +### Response Parameters + +`shopify_checkout_id` +: `string` Unique checkout identifier for Shopify integration. + +`tax_details` +: `object` Tax information for the checkout. + + `total_tax` + : `integer` Total tax amount in smallest currency unit (paise). + + `taxes_included` + : `boolean` Whether taxes are included in item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### 1.2 Create Order id on Server + + Create a Razorpay order id required for the payment modal. This API requires the `shopify_checkout_id` from [Step 1.1](#11-create-a-checkout-id). + + /magic/order/shopify?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/magic/order/shopify?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: */*" \ + -H "Origin: https://api.razorpay.com" \ + -d '{ + "shopify_checkout_id": "gid://shopify/Cart/ashgad?key=abasab", + "ga_id": "GA1.1.xxxxxxx.xxxxxxxx", + "fb_analytics": { + "external_id": "unique_fb_external_id", + "fbp": "fb.1.xxxxxxx.xxxxxxxx", + "fbc": "", + "event_source_url": "https://your-store.com/" + }, + "utm_parameters": { + "landing_page_url": "https://your-store.com/", + "user_agent": "Mozilla/5.0 (Linux; Android 12; SM-G991B)..." + }, + "analytics": { + "fb_analytics": { + "external_id": "unique_fb_external_id", + "fbp": "fb.1.xxxxxxx.xxxxxxxx", + "fbc": "" + }, + "ga4": { + "session_ids": { + "_ga_XXXXXXXXXX": "GS1.1.xxxxxxxx.x.x.x.x.x" + }, + "client_id": "GA1.1.xxxxxxxx.xxxxxxxx" + }, + "google_ads": { + "gclid": "", + "wbraid": "", + "gbraid": "" + }, + "source_url": "https://your-store.com/" + } + }' + ```json: Response + { + "preferences": null, + "order_id": "order_EKwxwAgItmmXdp" + } + ``` + + + + Request Parameters + +`shopify_checkout_id` _mandatory_ +: `string` Checkout id from [Step 1.1](#11-create-a-checkout-id). + +`ga_id` _optional_ +: `string` Google Analytics client identifier. + +`fb_analytics` _optional_ +: `object` Facebook Analytics parameters. + + `external_id` _optional_ + : `string` Unique external id for Facebook tracking. + + `fbp` _optional_ + : `string` Facebook browser pixel id. + + `fbc` _optional_ + : `string` Facebook click id. + + `event_source_url` _optional_ + : `string` Source URL for the event. + +`utm_parameters` _optional_ +: `object` UTM tracking parameters. + + `landing_page_url` _optional_ + : `string` Landing page URL. + + `user_agent` _optional_ + : `string` Browser user agent string. + +`analytics` _optional_ +: `object` Comprehensive analytics data. + + `fb_analytics` _optional_ + : `object` Facebook Analytics configuration. + + `external_id` _optional_ + : `string` Unique external id for Facebook tracking. + + `fbp` _optional_ + : `string` Facebook browser pixel id. + + `fbc` _optional_ + : `string` Facebook click id. + + `ga4` _optional_ + : `object` Google Analytics 4 configuration. + + `session_ids` _optional_ + : `object` GA4 session identifiers. + + `client_id` _optional_ + : `string` GA4 client identifier. + + `google_ads` _optional_ + : `object` Google Ads tracking parameters. + + `gclid` _optional_ + : `string` Google Click Identifier. + + `wbraid` _optional_ + : `string` Web-to-app measurement parameter. + + `gbraid` _optional_ + : `string` Google Ads Broad match parameter. + + `source_url` _optional_ + : `string` Source URL for analytics. + + + +### Response Parameters + +`preferences` +: `object|null` Customer preferences. Returns `null` if no preferences are set. + +`order_id` +: `string` Unique Razorpay order identifier. For example, `order_EKwxwAgItmmXdp`. + + + + + + +### 1.3 Install Razorpay React Native SDK + + Install the SDK using the following `npm` command in the **Terminal** window. If you are using Windows, use **Git Bash** instead of the **Command Prompt** window. Ensure you run this code within your React Native project folder in the **Terminal** window. + + ```node:Installation Code + //using npm + $ npm install react-native-razorpay --save + ``` + + Additionally, run the code given below if you are using `yarn` or `expo`: + + ```node:Installation Code using yarn + // using yarn + $ yarn add react-native-razorpay + ``` + + ```node:Installation Code using expo + // for expo + $ npx expo install react-native-razorpay + ``` + + + +### 1.4 Run React Native App + + Run the React Native app. + + ```node: Run + npx react-native run-android + ``` + + This links the SDK with your React Native project. + + + + Expo Application + + After adding the `react-native-razorpay` package, use the option to prebuild the app. This generates the **android** platform folders in the project to use native-modules. + + ```node: Run + npx expo prebuild + ``` + + The application is installed on the device/emulator. + + ```node: + npx expo run:[android] --device + ``` + + + + + + +### 1.5 Coupon Handling + + Since this is an SDK integration, Shopify coupons will not auto-apply like they do on the website. You must explicitly pass coupon codes to Magic Checkout. When initialising Magic Checkout, include the coupon code in the prefill options: + + ```javascript + const options = { + key: 'rzp_live_XXXXXX', + order_id: 'order_EKwxwAgItmmXdp', + // ... other options + + prefill: { + coupon_code: 'MY_COUPON_NAME', // Coupon from your cart to auto-apply + }, + }; + + // Initialize Magic Checkout with options + MagicCheckout.open(options); + ``` + + Your app captures the coupon applied on the cart page, then passes the coupon code in the `prefill.coupon_code` field. The SDK internally calls `applyCoupon('MY_COUPON_NAME')`, and if the coupon is valid, it is automatically applied in Magic Checkout. + + + +### 1.6 Add Razorpay Checkout Options to .js File + + To integrate the Razorpay Checkout with your React Native app, you must add the Checkout Display Options in the **.js** file. + + Open the **.js** file in your project folder and perform the following: + + 1. Import the `RazorpayCheckout` module to your component. + + ```js: Import Razorpay Checkout Module + import RazorpayCheckout from 'react-native-razorpay'; + ``` + + 2. Call the `RazorpayCheckout.open` method with the payment options. The method returns a JS Promise where the `then` part corresponds to a successful payment and the `catch` part corresponds to payment failure. + + Add the following code: + + ```Javascript: Checkout Options + { + var options = { + description: 'Credits towards consultation', + image: 'https://i.imgur.com/3g7nmJC.jpg', + currency: '', + key: '', + amount: '5000', + name: 'Acme Corp', + order_id: 'order_EKwxwAgItmmXdp',//Replace this with order_id from Step 1.2 + prefill: { + email: '', + contact: '', + name: '', + coupon_code: 'MY_COUPON_NAME' // Coupon from your cart to auto-apply (as explained in Step 1.6) + }, + show_coupons: true, // magic checkout + theme: {color: '#53a20e'} + } + RazorpayCheckout.open(options).then((data) => { + // handle success + alert(`Success: ${data.razorpay_payment_id}`); + }).catch((error) => { + // handle failure + alert(`Error: ${error.code} | ${error.description}`); + }); + }}> + ``` + + + + Checkout Options + + `key` _mandatory_ +: `string` API key id generated from the Dashboard. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `50000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. Length must be of 3 characters. + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order id generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `cod` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`show_coupons` _optional_ +: `boolean` Determines whether to show the coupons to customer on the checkout. Possible values: + - `true` (default): Enables the Coupon feature. + - `false`: Disables the Coupon feature. + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + You must pass these parameters in Checkout to initiate the payment. + + +> **WARN** +> +> +> +> **Watch Out!** +> +> To support theme colour in the progress bar, please pass HEX colour values only. +> + + + + + + + +### 1.7 Perform Post Payment Processing + + Based on the response, you can handle post-payment processing on your end. + +> **WARN** +> +> +> **Timeout Handling** +> +> If no API call is made within 45 seconds, our background job will assume there is a network drop off and will proceed to place the order on Shopify automatically. +> + + + Fetch an Order + + Use the Fetch Orders API to retrieve order details, including customer information, address, shipping method and promotions of a particular order: + + v1/orders/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ + -X GET https://api.razorpay.com/v1/orders/order_R1yDkxyIuKXXXX \ + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + import com.razorpay.Order; + import com.razorpay.RazorpayClient; + import com.razorpay.RazorpayException; + try { + Order order = razorpay.Orders.fetch(""); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + # do easy_install razorpay or + # pip install razorpay + + import razorpay + razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]")) + + order_id = + resp = client.order.fetch(order_id) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->fetch($orderId); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('key_id', 'key_secret') + + order = Razorpay::Order.fetch('order_R1yDkxyIuKXXXX') + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.fetch(orderId) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("", "") + + body, err := client.Order.Fetch("", nil, nil) + ``` + ```json: Response: COD Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 507000, + "amount_paid": 0, + "amount_due": 507000, + "currency": "INR", + "receipt": "#30567", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "placed", + "attempts": 0, + "notes": { + "cart_id": "hWN2Am4BGnQrizKE3hzeQaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/hf5Q?key=14bbbce35b8", + "shopify_order_id": "6302119854247" + }, + "created_at": 1756045901, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 5000, + "shipping_fee": 7000, + "customer_details": { + "contact": "+919100000000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + }, + "billing_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + } + }, + "line_items_total": 600000, + "tax_details": { + "total_tax": 4128, + "taxes_included": true + } + } + ```json: Response: Prepaid Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 100700, + "amount_paid": 100700, + "amount_due": 0, + "currency": "INR", + "receipt": "#30414", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "paid", + "attempts": 1, + "notes": { + "cart_id": "hWN1TcwL?key=1a3a5a7c", + "storefront_id": "gid://shopify/Cart/hIkey=af7c7800", + "flits_cart_token": "hWcwL?key=1a3741dc_8740f5_175447", + "shopify_order_id": "6266036191399" + }, + "created_at": 1754466155, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 0, + "shipping_fee": 700, + "customer_details": { + "billing_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "billing_address", + "zipcode": "110057" + }, + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "shipping_address", + "zipcode": "110057" + } + }, + "line_items_total": 110000, + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + Know more about the [Orders API.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) + + +> **INFO** +> +> +> **Order Status** +> +> Check the order status for the following: +> +> - Prepaid orders: `paid`. +> - COD orders: `placed`. +> + + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the order to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the order. For example, `order_R1yDkxyIuKXXXX`. + +`entity` +: `string` Type of entity. Value is `order`. + +`amount` +: `integer` Total order amount in the smallest currency unit (paise). + +`amount_paid` +: `integer` Amount paid towards the order in paise. For prepaid orders, this shows the actual amount paid. For COD orders, this is `0` until payment is collected. + +`amount_due` +: `integer` Outstanding amount due in paise. For prepaid orders, this shows any remaining balance. For COD orders, this equals the `amount` field until payment is collected. + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`receipt` +: `string` Receipt identifier for internal reference. For example, `#30567`. + +`offers` +: `array` Array of offer IDs applied to the order. + +`status` +: `string` Current status of the order. Possible values: + - `placed`: Order placed but payment pending (COD orders). + - `paid`: Order placed and payment completed (prepaid orders). + - `cancelled`: Order cancelled. + - `refunded`: Order refunded. + +`attempts` +: `integer` Number of payment attempts made for this order. For example, `1`. + +`notes` +: `object` Custom notes added to the order containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `shopify_order_id` + : `string` Shopify order reference. + + `flits_cart_token` + : `string` Flits integration token (optional). + +`created_at` +: `integer` Unix timestamp indicating when the order was created. For example, `1756045901`. + +`description` +: `string|null` Order description. Returns `null` if no description is provided. + +`checkout` +: `string|null` Checkout identifier. Returns `null` if not applicable. + +`promotions` +: `array` Array of promotion objects applied to the order. + + `code` + : `string` Promotion code used. For example, `orderOff`. + + `type` + : `string` Type of promotion. For example, `cart_value`. + + `value` + : `integer` Discount value in paise. For example, `10000` for ₹100. + + `description` + : `string` Human-readable promotion description. + + `reference_id` + : `string` Internal reference for the promotion. + +`cod_fee` +: `integer` Cash on Delivery charges in paise. For COD orders, this contains the fee amount (for example, `5000` for ₹50). For prepaid orders, this is `0`. + +`shipping_fee` +: `integer` Shipping charges in paise. For example, `700` for ₹7. + +`customer_details` +: `object` Customer information. + + `contact` + : `string` Customer's phone number. + + `email` + : `string` Customer's email address. + + `shipping_address` + : `object` Complete shipping address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for delivery. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Recipient name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `shipping_address`. + + `zipcode` + : `string` Postal code. + + `billing_address` + : `object` Complete billing address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for billing. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Account holder name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `billing_address`. + + `zipcode` + : `string` Postal code. + +`line_items_total` +: `integer` Total value of line items in paise before adding shipping fees and COD fees, after applying promotions. For example, `60000` for ₹600. + +`tax_details` +: `object` Tax information. + + `total_tax` + : `integer` Total tax amount in paise. For example, `4128`. + + `taxes_included` + : `boolean` Indicates whether taxes are included in the item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### Fetch a Payment + + Use the Fetch Payments API to retrieve comprehensive payment details, including transaction status, payment method, customer information, settlement details, and the associated order information for a specific payment: + + v1/payments/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X GET https://api.razorpay.com/v1/payments/pay_R1yFlWQar3XXXX + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String paymentId = "pay_R1yFlWQar3XXXX"; + + Payment payment = razorpay.payments.fetch(paymentId); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.payment.fetch(paymentId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + paymentId := "pay_R1yFlWQar3XXXX" + + body, err := client.Payment.Fetch(paymentId, nil, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->payment->fetch($paymentId); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + paymentId = "pay_R1yFlWQar3XXXX" + + Razorpay::Payment.fetch(paymentId) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.payments.fetch(paymentId) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + Payment payment = client.Payment.Fetch(paymentId); + ``` + + ```json: Response: COD Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 55700, + "currency": "INR", + "status": "pending", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "cod", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919100000000", + "notes": { + "cart_id": "hWN2QaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/h?key=14bbf59ce35b8" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1756046099, + "receiver_type": null + } + ```json: Response: Prepaid Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 90630, + "currency": "INR", + "status": "captured", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "cart_id": "hWNsVrcwL?key=1a3a457ddc", + "storefront_id": "gid://shopify/Cart/hWv3e8?key=af707", + "flits_cart_token": "hWrcwL?key=1a3a5a70f5_17547", + "optimizer_provider_name": "razorpay" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "727947422583", + "upi_transaction_id": "1F723677C679EF578A95" + }, + "created_at": 1754466271, + "receiver_type": null, + "upi": { + "vpa": "gaurav.kumar@exampleupi" + } + } + ``` + + Know more about the [Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md). + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. For example, `pay_R1yFlWQar3XXXX`. + +`entity` +: `string` Type of entity. Value is `payment`. + +`amount` +: `integer` Payment amount in the smallest currency unit (paise). For COD payments, this includes the COD fee (for example, `55700` for ₹557). For prepaid payments, this equals the captured amount (for example, `90630` for ₹906.30). + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`status` +: `string` Current status of the payment. Possible values: + - `pending`: Payment pending collection (COD orders). + - `captured`: Payment successfully captured (prepaid orders). + - `authorized`: Payment authorized but not captured. + - `failed`: Payment attempt failed. + +`order_id` +: `string` Unique identifier of the associated order. For example, `order_R1yDkxyIuKXXXX`. + +`invoice_id` +: `string|null` Unique identifier of the associated invoice. Returns `null` if no invoice is linked. + +`international` +: `boolean` Indicates whether this is an international payment. Possible values: + - `true`: International payment. + - `false`: Domestic payment. + +`method` +: `string` Payment method used. Possible values include: + - `cod` + - `upi` + - `card` + - `netbanking` + - `wallet` + +`amount_refunded` +: `integer` Amount refunded in paise. For example, `0` indicates no refund has been processed. + +`refund_status` +: `string|null` Current refund status. Returns `null` if no refund is applicable. Possible values: + - `partial`: Partial refund processed. + - `full`: Full refund processed. + +`captured` +: `boolean` Indicates whether the payment has been captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string|null` Payment description. Returns `null` if no description is provided. + +`card_id` +: `string|null` Unique identifier of the card used for payment. Returns `null` for non-card payments. + +`bank` +: `string|null` Bank identifier for netbanking payments. Returns `null` for other payment methods. + +`wallet` +: `string|null` Wallet provider identifier. Returns `null` for non-wallet payments. + +`vpa` +: `string|null` Virtual Payment Address for UPI payments. For example, `gaurav.kumar@exampleupi`. Returns `null` for non-UPI payments. + +`email` +: `string` Customer's email address. + +`contact` +: `string` Customer's phone number. + +`notes` +: `object` Custom notes added to the payment containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `flits_cart_token` + : `string` Flits integration token (optional). + + `optimizer_provider_name` + : `string` Payment optimizer provider name (optional). + +`fee` +: `integer|null` Processing fee charged in paise. For example, `0` indicates no fee. Returns `null` for COD payments. + +`tax` +: `integer|null` Tax amount on processing fee in paise. For example, `0` indicates no tax. Returns `null` for COD payments. + +`error_code` +: `string|null` Error code if payment failed. Returns `null` for successful payments. + +`error_description` +: `string|null` Human-readable error description. Returns `null` for successful payments. + +`error_source` +: `string|null` Source of the error. Returns `null` for successful payments. + +`error_step` +: `string|null` Step at which error occurred. Returns `null` for successful payments. + +`error_reason` +: `string|null` Reason for the error. Returns `null` for successful payments. + +`acquirer_data` +: `object` Data from the payment acquirer. + + `rrn` + : `string` Retrieval Reference Number from the acquirer (optional). + + `upi_transaction_id` + : `string` UPI transaction identifier from the acquirer (optional). + +`created_at` +: `integer` Unix timestamp indicating when the payment was created. For example, `1756046099`. + +`receiver_type` +: `string|null` Type of receiver for the payment. Returns `null` if not applicable. + +`upi` +: `object` UPI-specific payment details (only present for UPI payments). + + `vpa` + : `string` Virtual Payment Address used for the UPI payment. + + + + + + + + + +### 1.8 Complete Checkout Call + + After a successful payment, call the complete checkout API to create the order in Shopify. You must make the call from the callback handler implemented when importing the react SDK. Ensure you redirect the user to the `order_status_url` to show them the order success page on Shopify. + + /1cc/shopify/complete?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/1cc/shopify/complete?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{ + "razorpay_payment_id": "pay_Rk3b76fSqXXXXX", + "razorpay_order_id": "order_Rk3UmCXXW5XXXX" + }' + ```json: Response + { + "id": 65157213390123, + "order_id": "#32697", + "payment_id": "pay_Rk3b76fSqXXXXX", + "payment_method": "netbanking", + "payment_currency": "", + "total_amount": 659430, + "total_tax": "543.91", + "shipping_fee": 700, + "cod_fee": 0, + "promotions": [ + { + "reference_id": "Auto Order Amount Discount", + "code": "Auto Order Amount Discount", + "type": "automatic", + "value": 100000, + "source": "shopify" + } + ], + "shipping_country": "in", + "customer_details": { + "email": "", + "contact": "", + "shipping_address": { + "name": "", + "line1": "123 Main Street", + "city": "Bengaluru", + "state": "KARNATAKA", + "zipcode": "560049", + "country": "in" + } + }, + "order_status_url": "https://your-store.myshopify.com/orders/...", + "is_new_customer": false + } + ``` + + + + Request Parameters + +`razorpay_payment_id` _mandatory_ +: `string` Unique payment identifier. Format: `pay_` followed by 14 characters. + +`razorpay_order_id` _mandatory_ +: `string` Unique order identifier from Step 1.2. Format: `order_` followed by 14 characters. + + + +### Response Parameters + +`id` +: `integer` Unique Shopify order identifier. For example, `65157213390123`. + +`order_id` +: `string` Human-readable order number. For example, `#32697`. + +`payment_id` +: `string` Razorpay payment identifier. For example, `pay_Rk3b76fSqXXXXX`. + +`payment_method` +: `string` Payment method used. Possible values include: + - `netbanking` + - `upi` + - `card` + - `wallet` + +`payment_currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`total_amount` +: `integer` Total order amount in smallest currency unit (paise). For example, `659430` for ₹6594.30. + +`total_tax` +: `string` Total tax amount as string. For example, `543.91`. + +`shipping_fee` +: `integer` Shipping charges in smallest currency unit (paise). For example, `700` for ₹7. + +`cod_fee` +: `integer` Cash on Delivery fee in smallest currency unit (paise). For example, `0` indicates no COD fee. + +`promotions` +: `array` Array of applied promotions/discounts. + + `reference_id` + : `string` Internal reference for the promotion. + + `code` + : `string` Promotion code used. + + `type` + : `string` Type of promotion. Possible values: + - `automatic`: Automatically applied discount. + - `coupon`: Coupon-based discount. + + `value` + : `integer` Discount value in smallest currency unit (paise). For example, `100000` for ₹1000. + + `source` + : `string` Source of the promotion. For example, `shopify`. + +`shipping_country` +: `string` Country code for shipping destination. For example, `in`. + +`customer_details` +: `object` Complete customer information. + + `email` + : `string` Customer's email address. + + `contact` + : `string` Customer's phone number. + + `shipping_address` + : `object` Complete shipping address information. + + `name` + : `string` Recipient name. + + `line1` + : `string` Address line 1. + + `city` + : `string` City name. + + `state` + : `string` State name. + + `zipcode` + : `string` Postal code. + + `country` + : `string` Country code. For example, `in`. + +`order_status_url` +: `string` Shopify order status page URL for customer. + +`is_new_customer` +: `boolean` Whether this is a new customer's first order. Possible values: + - `true`: New customer's first order. + - `false`: Existing customer order. + + + + + + +#### Pass Additional Attributes to Shopify Orders + +Shopify orders support Tags and Additional Attributes (note attributes). Include the attributes in the Shopify cart's attributes object before initiating checkout: + +```javascript +// When creating/updating Shopify cart +const cartPayload = { + cart: { + token: "your_cart_token", + note: "Customer special instructions", + attributes: { + "Source": "Mobile App", + "App Version": "2.1.0", + "Campaign": "Summer Sale 2025", + "Custom Field": "Your custom value" + }, + item_count: 1, + items: [/* ... */] + }, + key: "rzp_live_XXXXXX" +}; +``` + +These attributes will flow through to the Shopify order and appear in the additional attributes section in Shopify Admin. + +## 2. Test Integration + +Check the following checklist below: + +- Shopify cart creation is working correctly. +- Checkout id is generated successfully. +- Order id is created with analytics parameters. +- Magic Checkout SDK opens without errors. +- Coupons apply correctly via prefill. +- Payment flow completes successfully. +- Complete Checkout API creates order in Shopify. +- Order appears in Shopify Admin with correct details. +- Additional attributes appear correctly in Shopify order. + +## Error Handling + +Error Scenario | Recommended Action +--- +Invalid cart token | Ensure Shopify cart exists before [Step 1.1](#11-create-a-checkout-id). +--- +Payment not captured | Verify payment status before complete checkout. +--- +Invalid signature | Regenerate signature using Razorpay's signature verification. +--- +Coupon invalid | Handle error callback and notify user. + +> **WARN** +> +> +> **Fallback to Shopify Checkout** +> +> If any Magic Checkout API fails, redirect users to the standard Shopify checkout to ensure customers can still complete their purchase. +> + +## Support + +For integration support, reach out to your Razorpay account manager or raise a request with our [support team](https://razorpay.com/support/#request). diff --git a/llm-content/payments/magic-checkout/shopify/custom/react-native-ios-integration.md b/llm-content/payments/magic-checkout/shopify/custom/react-native-ios-integration.md new file mode 100644 index 00000000..5e4d6a01 --- /dev/null +++ b/llm-content/payments/magic-checkout/shopify/custom/react-native-ios-integration.md @@ -0,0 +1,1614 @@ +--- +title: Integrate Razorpay Magic Checkout on React Native iOS App - Shopify +heading: Integrate Magic Checkout on React Native iOS App - Shopify +description: Steps to integrate Magic Checkout on your React Native iOS app using the Razorpay React Native iOS Standard SDK - Shopify integration. +--- + +# Integrate Magic Checkout on React Native iOS App - Shopify + +Follow these steps to integrate the Razorpay Magic Checkout on your React Native iOS application when using Shopify as your e-commerce platform. + +## Prerequisites + +- Ensure you enable [Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#3-how-do-i-check-if-magic-checkout) on your account. +- Integrate [Magic Checkout With Shopify Store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify.md). +- Integrate with [React Native: iOS Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/react-native-ios-integration.md). +- Generate [Live API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys) from the Dashboard. + + - **1. Build Integration**: Integrate with React Native iOS App for Shopify. + + - **2. Test Integration**: Test the integration by making a test payment. + +## 1. Build Integration + +Follow the steps given below: + +> **WARN** +> +> +> **Watch Out!** +> +> If you use M1 MacBook, you need to make [these changes](#m1-macbook-changes) in your `podfile`. +> + + +### 1.1 Create a Checkout id + + Generate a unique cart identifier to initiate the Magic Checkout process. + + +> **INFO** +> +> +> **Important** +> +> Ensure you create the Shopify cart before making this request as the cart token must be included in the payload. +> + + /magic/checkout/shopify?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/magic/checkout/shopify?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{ + "cart": { + "token": "ashgad?key=abasab", + "note": null, + "attributes": {}, + "item_count": 1, + "items": [ + { + "id": 100000000001, + "quantity": 1, + "product_id": 832938123321, + "variant_id": 100000000001, + "properties": {} + } + ] + } + }' + ```json: Response + { + "shopify_checkout_id": "gid://shopify/Cart/ashgad?key=abasab", + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + + + Request Parameters + +`cart` _mandatory_ +: `object` Complete cart object from Shopify. + +`cart.token` _mandatory_ +: `string` Unique cart token from Shopify cart creation. + +`cart.note` _optional_ +: `string|null` Customer notes or special instructions. + +`cart.attributes` _optional_ +: `object` Custom attributes for the cart (key-value pairs). + +`cart.item_count` _mandatory_ +: `integer` Total number of items in the cart. + +`cart.items` _mandatory_ +: `array` Array of cart items. + +`cart.items[].id` _mandatory_ +: `integer` Unique item identifier. + +`cart.items[].quantity` _mandatory_ +: `integer` Quantity of the item. + +`cart.items[].product_id` _mandatory_ +: `integer` Shopify product identifier. + +`cart.items[].variant_id` _mandatory_ +: `integer` Shopify variant identifier. + +`cart.items[].properties` _optional_ +: `object` Custom item properties. + + + +### Response Parameters + +`shopify_checkout_id` +: `string` Unique checkout identifier for Shopify integration. + +`tax_details` +: `object` Tax information for the checkout. + + `total_tax` + : `integer` Total tax amount in smallest currency unit (paise). + + `taxes_included` + : `boolean` Whether taxes are included in item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### 1.2 Create Order id on Server + + Create a Razorpay order id required for the payment modal. This API requires the `shopify_checkout_id` from [Step 1.1](#11-create-a-checkout-id). + + /magic/order/shopify?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/magic/order/shopify?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: */*" \ + -H "Origin: https://api.razorpay.com" \ + -d '{ + "shopify_checkout_id": "gid://shopify/Cart/ashgad?key=abasab", + "ga_id": "GA1.1.xxxxxxx.xxxxxxxx", + "fb_analytics": { + "external_id": "unique_fb_external_id", + "fbp": "fb.1.xxxxxxx.xxxxxxxx", + "fbc": "", + "event_source_url": "https://your-store.com/" + }, + "utm_parameters": { + "landing_page_url": "https://your-store.com/", + "user_agent": "Mozilla/5.0 (Linux; Android 12; SM-G991B)..." + }, + "analytics": { + "fb_analytics": { + "external_id": "unique_fb_external_id", + "fbp": "fb.1.xxxxxxx.xxxxxxxx", + "fbc": "" + }, + "ga4": { + "session_ids": { + "_ga_XXXXXXXXXX": "GS1.1.xxxxxxxx.x.x.x.x.x" + }, + "client_id": "GA1.1.xxxxxxxx.xxxxxxxx" + }, + "google_ads": { + "gclid": "", + "wbraid": "", + "gbraid": "" + }, + "source_url": "https://your-store.com/" + } + }' + ```json: Response + { + "preferences": null, + "order_id": "order_EKwxwAgItmmXdp" + } + ``` + + + + Request Parameters + +`shopify_checkout_id` _mandatory_ +: `string` Checkout id from [Step 1.1](#11-create-a-checkout-id). + +`ga_id` _optional_ +: `string` Google Analytics client identifier. + +`fb_analytics` _optional_ +: `object` Facebook Analytics parameters. + + `external_id` _optional_ + : `string` Unique external id for Facebook tracking. + + `fbp` _optional_ + : `string` Facebook browser pixel id. + + `fbc` _optional_ + : `string` Facebook click id. + + `event_source_url` _optional_ + : `string` Source URL for the event. + +`utm_parameters` _optional_ +: `object` UTM tracking parameters. + + `landing_page_url` _optional_ + : `string` Landing page URL. + + `user_agent` _optional_ + : `string` Browser user agent string. + +`analytics` _optional_ +: `object` Comprehensive analytics data. + + `fb_analytics` _optional_ + : `object` Facebook Analytics configuration. + + `external_id` _optional_ + : `string` Unique external id for Facebook tracking. + + `fbp` _optional_ + : `string` Facebook browser pixel id. + + `fbc` _optional_ + : `string` Facebook click id. + + `ga4` _optional_ + : `object` Google Analytics 4 configuration. + + `session_ids` _optional_ + : `object` GA4 session identifiers. + + `client_id` _optional_ + : `string` GA4 client identifier. + + `google_ads` _optional_ + : `object` Google Ads tracking parameters. + + `gclid` _optional_ + : `string` Google Click Identifier. + + `wbraid` _optional_ + : `string` Web-to-app measurement parameter. + + `gbraid` _optional_ + : `string` Google Ads Broad match parameter. + + `source_url` _optional_ + : `string` Source URL for analytics. + + + +### Response Parameters + +`preferences` +: `object|null` Customer preferences. Returns `null` if no preferences are set. + +`order_id` +: `string` Unique Razorpay order identifier. For example, `order_EKwxwAgItmmXdp`. + + + + + + +### 1.3 Install Razorpay React Native SDK + + Install the SDK using the following `npm` command in the **Terminal** window. If you are using Windows, please use **Git Bash** instead of the **Command Prompt** window. Ensure that you run this code within your React Native project folder in **Terminal** window. + + ```node:Installation Code + //using npm + $ npm install react-native-razorpay --save + ``` + + Additionally, run the code given below if you are using `yarn` or `expo`: + + ```node:Installation Code using yarn + // using yarn + $ yarn add react-native-razorpay + ``` + + ```node:Installation Code using expo + // for expo + $ npx expo install react-native-razorpay + ``` + + + +### 1.4 Open Podfile and Update Platform Version + + Navigate to the **ios** folder and open **Podfile**. You can do this using the following code. + + ```node: Open Podfile + $ cd ios && open podfile + ``` + + Change the platform version from `9.0` to `10.0` in the Podfile. + + ![](/docs/assets/images/react-native-change_platform_version_podfile.jpg) + + + +### 1.5 Install Pods Using Cocoapods + + Install pods after updating the iOS platform. This will install all pods in the Podfile at the exact versions. + + ```node: Cocoapod Step + pod install && cd .. + ``` + + + +### 1.6 Run React Native App + + Run the React Native app. + + ```node: Run App + npx react-native run-ios + ``` + + + + Expo Application + + After adding the `react-native-razorpay` package, use the option to prebuild the app. This generates the **iOS** platform folders in the project to use native-modules. + + ```node: Run + npx expo prebuild + ``` + + The application is installed on the device/emulator. + + ```node: + npx expo run:[ios] --device + ``` + + + + + + +### 1.7 Coupon Handling + + Since this is an SDK integration, Shopify coupons will not auto-apply like they do on the website. You must explicitly pass coupon codes to Magic Checkout. When initialising Magic Checkout, include the coupon code in the prefill options: + + ```javascript + const options = { + key: 'rzp_live_XXXXXX', + order_id: 'order_EKwxwAgItmmXdp', + // ... other options + + prefill: { + coupon_code: 'MY_COUPON_NAME', // Coupon from your cart to auto-apply + }, + }; + + // Initialize Magic Checkout with options + MagicCheckout.open(options); + ``` + + Your app captures the coupon applied on the cart page, then passes the coupon code in the `prefill.coupon_code` field. The SDK internally calls `applyCoupon('MY_COUPON_NAME')`, and if the coupon is valid, it is automatically applied in Magic Checkout. + + + +### 1.8 Add Razorpay Checkout Options to .js File + + To integrate the Razorpay Checkout with your React Native app, you must add the Checkout Display Options in the **.js** file. + + Open the **.js** file in your project folder and perform the following: + + 1. Import the `RazorpayCheckout` module to your component. + + ```js: Import Razorpay Checkout Module + import RazorpayCheckout from 'react-native-razorpay'; + ``` + 2. Call the `RazorpayCheckout.open` method with the payment options. The method returns a JS Promise where the `then` part corresponds to a successful payment and the `catch` part corresponds to payment failure. + + ```Javascript: Checkout Options + { + var options = { + description: 'Credits towards consultation', + image: 'https://i.imgur.com/3g7nmJC.jpg', + currency: '', + key: '', + amount: '50000', + name: 'Acme Corp', + order_id: 'order_DslnoIgkIDL8Zt',// Replace this with an order_id created using Orders API. + prefill: { + email: '', + contact: '9191919191', + name: '' + }, + show_coupons: true, // magic checkout + theme: {color: '#53a20e'} + } + RazorpayCheckout.open(options).then((data) => { + // handle success + alert(`Success: ${data.razorpay_payment_id}`); + }).catch((error) => { + // handle failure + alert(`Error: ${error.code} | ${error.description}`); + }); + }}> + ``` + + + Checkout Options + + `key` _mandatory_ +: `string` API key id generated from the Dashboard. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `50000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. Length must be of 3 characters. + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order id generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `cod` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`show_coupons` _optional_ +: `boolean` Determines whether to show the coupons to customer on the checkout. Possible values: + - `true` (default): Enables the Coupon feature. + - `false`: Disables the Coupon feature. + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as read-only. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + You must pass these parameters in Checkout to initiate the payment. + + + +### 1.8.1 Enable UPI Intent on iOS *(Optional)* + + Provide your customers with a better payment experience by enabling UPI Intent on your app's Checkout form. In the UPI Intent flow: + 1. Customer selects UPI as the payment method in your iOS app. A list of UPI apps supporting the intent flow is displayed. For example, PhonePe, Google Pay and Paytm. + 2. Customer selects the preferred app. The UPI app opens with pre-populated payment details. + 3. Customer enters their UPI PIN to complete their transactions. + 4. Once the payment is successful, the customer is redirected to your app or website. + + To enable this in your iOS integration, you must make the following changes in your app's info.plist file. + + ```xml: info.plist + LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + + ``` + + Know more about [UPI Intent and its benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). + + + + + + +### 1.9 Perform Post Payment Processing + + Based on the response, you can handle post-payment processing on your end. + +> **WARN** +> +> +> **Timeout Handling** +> +> If no API call is made within 45 seconds, our background job will assume there is a network drop off and will proceed to place the order on Shopify automatically. +> + + + Fetch an Order + + Use the Fetch Orders API to retrieve order details, including customer information, address, shipping method and promotions of a particular order: + + v1/orders/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ + -X GET https://api.razorpay.com/v1/orders/order_R1yDkxyIuKXXXX \ + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + import com.razorpay.Order; + import com.razorpay.RazorpayClient; + import com.razorpay.RazorpayException; + try { + Order order = razorpay.Orders.fetch(""); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + # do easy_install razorpay or + # pip install razorpay + + import razorpay + razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]")) + + order_id = + resp = client.order.fetch(order_id) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->fetch($orderId); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('key_id', 'key_secret') + + order = Razorpay::Order.fetch('order_R1yDkxyIuKXXXX') + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.fetch(orderId) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("", "") + + body, err := client.Order.Fetch("", nil, nil) + ``` + ```json: Response: COD Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 507000, + "amount_paid": 0, + "amount_due": 507000, + "currency": "INR", + "receipt": "#30567", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "placed", + "attempts": 0, + "notes": { + "cart_id": "hWN2Am4BGnQrizKE3hzeQaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/hf5Q?key=14bbbce35b8", + "shopify_order_id": "6302119854247" + }, + "created_at": 1756045901, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 5000, + "shipping_fee": 7000, + "customer_details": { + "contact": "+919100000000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + }, + "billing_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + } + }, + "line_items_total": 600000, + "tax_details": { + "total_tax": 4128, + "taxes_included": true + } + } + ```json: Response: Prepaid Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 100700, + "amount_paid": 100700, + "amount_due": 0, + "currency": "INR", + "receipt": "#30414", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "paid", + "attempts": 1, + "notes": { + "cart_id": "hWN1TcwL?key=1a3a5a7c", + "storefront_id": "gid://shopify/Cart/hIkey=af7c7800", + "flits_cart_token": "hWcwL?key=1a3741dc_8740f5_175447", + "shopify_order_id": "6266036191399" + }, + "created_at": 1754466155, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 0, + "shipping_fee": 700, + "customer_details": { + "billing_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "billing_address", + "zipcode": "110057" + }, + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "shipping_address", + "zipcode": "110057" + } + }, + "line_items_total": 110000, + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + Know more about the [Orders API.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) + + +> **INFO** +> +> +> **Order Status** +> +> Check the order status for the following: +> +> - Prepaid orders: `paid`. +> - COD orders: `placed`. +> + + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the order to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the order. For example, `order_R1yDkxyIuKXXXX`. + +`entity` +: `string` Type of entity. Value is `order`. + +`amount` +: `integer` Total order amount in the smallest currency unit (paise). + +`amount_paid` +: `integer` Amount paid towards the order in paise. For prepaid orders, this shows the actual amount paid. For COD orders, this is `0` until payment is collected. + +`amount_due` +: `integer` Outstanding amount due in paise. For prepaid orders, this shows any remaining balance. For COD orders, this equals the `amount` field until payment is collected. + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`receipt` +: `string` Receipt identifier for internal reference. For example, `#30567`. + +`offers` +: `array` Array of offer IDs applied to the order. + +`status` +: `string` Current status of the order. Possible values: + - `placed`: Order placed but payment pending (COD orders). + - `paid`: Order placed and payment completed (prepaid orders). + - `cancelled`: Order cancelled. + - `refunded`: Order refunded. + +`attempts` +: `integer` Number of payment attempts made for this order. For example, `1`. + +`notes` +: `object` Custom notes added to the order containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `shopify_order_id` + : `string` Shopify order reference. + + `flits_cart_token` + : `string` Flits integration token (optional). + +`created_at` +: `integer` Unix timestamp indicating when the order was created. For example, `1756045901`. + +`description` +: `string|null` Order description. Returns `null` if no description is provided. + +`checkout` +: `string|null` Checkout identifier. Returns `null` if not applicable. + +`promotions` +: `array` Array of promotion objects applied to the order. + + `code` + : `string` Promotion code used. For example, `orderOff`. + + `type` + : `string` Type of promotion. For example, `cart_value`. + + `value` + : `integer` Discount value in paise. For example, `10000` for ₹100. + + `description` + : `string` Human-readable promotion description. + + `reference_id` + : `string` Internal reference for the promotion. + +`cod_fee` +: `integer` Cash on Delivery charges in paise. For COD orders, this contains the fee amount (for example, `5000` for ₹50). For prepaid orders, this is `0`. + +`shipping_fee` +: `integer` Shipping charges in paise. For example, `700` for ₹7. + +`customer_details` +: `object` Customer information. + + `contact` + : `string` Customer's phone number. + + `email` + : `string` Customer's email address. + + `shipping_address` + : `object` Complete shipping address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for delivery. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Recipient name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `shipping_address`. + + `zipcode` + : `string` Postal code. + + `billing_address` + : `object` Complete billing address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for billing. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Account holder name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `billing_address`. + + `zipcode` + : `string` Postal code. + +`line_items_total` +: `integer` Total value of line items in paise before adding shipping fees and COD fees, after applying promotions. For example, `60000` for ₹600. + +`tax_details` +: `object` Tax information. + + `total_tax` + : `integer` Total tax amount in paise. For example, `4128`. + + `taxes_included` + : `boolean` Indicates whether taxes are included in the item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### Fetch a Payment + + Use the Fetch Payments API to retrieve comprehensive payment details, including transaction status, payment method, customer information, settlement details, and the associated order information for a specific payment: + + v1/payments/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X GET https://api.razorpay.com/v1/payments/pay_R1yFlWQar3XXXX + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String paymentId = "pay_R1yFlWQar3XXXX"; + + Payment payment = razorpay.payments.fetch(paymentId); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.payment.fetch(paymentId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + paymentId := "pay_R1yFlWQar3XXXX" + + body, err := client.Payment.Fetch(paymentId, nil, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->payment->fetch($paymentId); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + paymentId = "pay_R1yFlWQar3XXXX" + + Razorpay::Payment.fetch(paymentId) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.payments.fetch(paymentId) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + Payment payment = client.Payment.Fetch(paymentId); + ``` + + ```json: Response: COD Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 55700, + "currency": "INR", + "status": "pending", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "cod", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919100000000", + "notes": { + "cart_id": "hWN2QaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/h?key=14bbf59ce35b8" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1756046099, + "receiver_type": null + } + ```json: Response: Prepaid Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 90630, + "currency": "INR", + "status": "captured", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "cart_id": "hWNsVrcwL?key=1a3a457ddc", + "storefront_id": "gid://shopify/Cart/hWv3e8?key=af707", + "flits_cart_token": "hWrcwL?key=1a3a5a70f5_17547", + "optimizer_provider_name": "razorpay" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "727947422583", + "upi_transaction_id": "1F723677C679EF578A95" + }, + "created_at": 1754466271, + "receiver_type": null, + "upi": { + "vpa": "gaurav.kumar@exampleupi" + } + } + ``` + + Know more about the [Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md). + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. For example, `pay_R1yFlWQar3XXXX`. + +`entity` +: `string` Type of entity. Value is `payment`. + +`amount` +: `integer` Payment amount in the smallest currency unit (paise). For COD payments, this includes the COD fee (for example, `55700` for ₹557). For prepaid payments, this equals the captured amount (for example, `90630` for ₹906.30). + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`status` +: `string` Current status of the payment. Possible values: + - `pending`: Payment pending collection (COD orders). + - `captured`: Payment successfully captured (prepaid orders). + - `authorized`: Payment authorized but not captured. + - `failed`: Payment attempt failed. + +`order_id` +: `string` Unique identifier of the associated order. For example, `order_R1yDkxyIuKXXXX`. + +`invoice_id` +: `string|null` Unique identifier of the associated invoice. Returns `null` if no invoice is linked. + +`international` +: `boolean` Indicates whether this is an international payment. Possible values: + - `true`: International payment. + - `false`: Domestic payment. + +`method` +: `string` Payment method used. Possible values include: + - `cod` + - `upi` + - `card` + - `netbanking` + - `wallet` + +`amount_refunded` +: `integer` Amount refunded in paise. For example, `0` indicates no refund has been processed. + +`refund_status` +: `string|null` Current refund status. Returns `null` if no refund is applicable. Possible values: + - `partial`: Partial refund processed. + - `full`: Full refund processed. + +`captured` +: `boolean` Indicates whether the payment has been captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string|null` Payment description. Returns `null` if no description is provided. + +`card_id` +: `string|null` Unique identifier of the card used for payment. Returns `null` for non-card payments. + +`bank` +: `string|null` Bank identifier for netbanking payments. Returns `null` for other payment methods. + +`wallet` +: `string|null` Wallet provider identifier. Returns `null` for non-wallet payments. + +`vpa` +: `string|null` Virtual Payment Address for UPI payments. For example, `gaurav.kumar@exampleupi`. Returns `null` for non-UPI payments. + +`email` +: `string` Customer's email address. + +`contact` +: `string` Customer's phone number. + +`notes` +: `object` Custom notes added to the payment containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `flits_cart_token` + : `string` Flits integration token (optional). + + `optimizer_provider_name` + : `string` Payment optimizer provider name (optional). + +`fee` +: `integer|null` Processing fee charged in paise. For example, `0` indicates no fee. Returns `null` for COD payments. + +`tax` +: `integer|null` Tax amount on processing fee in paise. For example, `0` indicates no tax. Returns `null` for COD payments. + +`error_code` +: `string|null` Error code if payment failed. Returns `null` for successful payments. + +`error_description` +: `string|null` Human-readable error description. Returns `null` for successful payments. + +`error_source` +: `string|null` Source of the error. Returns `null` for successful payments. + +`error_step` +: `string|null` Step at which error occurred. Returns `null` for successful payments. + +`error_reason` +: `string|null` Reason for the error. Returns `null` for successful payments. + +`acquirer_data` +: `object` Data from the payment acquirer. + + `rrn` + : `string` Retrieval Reference Number from the acquirer (optional). + + `upi_transaction_id` + : `string` UPI transaction identifier from the acquirer (optional). + +`created_at` +: `integer` Unix timestamp indicating when the payment was created. For example, `1756046099`. + +`receiver_type` +: `string|null` Type of receiver for the payment. Returns `null` if not applicable. + +`upi` +: `object` UPI-specific payment details (only present for UPI payments). + + `vpa` + : `string` Virtual Payment Address used for the UPI payment. + + + + + + + + + +### 1.10 Complete Checkout Call + + After a successful payment, call the complete checkout API to create the order in Shopify. You must make the call from the callback handler implemented when importing the react SDK. Ensure you redirect the user to the `order_status_url` to show them the order success page on Shopify. + + /1cc/shopify/complete?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/1cc/shopify/complete?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{ + "razorpay_payment_id": "pay_Rk3b76fSqXXXXX", + "razorpay_order_id": "order_Rk3UmCXXW5XXXX" + }' + ```json: Response + { + "id": 65157213390123, + "order_id": "#32697", + "payment_id": "pay_Rk3b76fSqXXXXX", + "payment_method": "netbanking", + "payment_currency": "", + "total_amount": 659430, + "total_tax": "543.91", + "shipping_fee": 700, + "cod_fee": 0, + "promotions": [ + { + "reference_id": "Auto Order Amount Discount", + "code": "Auto Order Amount Discount", + "type": "automatic", + "value": 100000, + "source": "shopify" + } + ], + "shipping_country": "in", + "customer_details": { + "email": "", + "contact": "", + "shipping_address": { + "name": "", + "line1": "123 Main Street", + "city": "Bengaluru", + "state": "KARNATAKA", + "zipcode": "560049", + "country": "in" + } + }, + "order_status_url": "https://your-store.myshopify.com/orders/...", + "is_new_customer": false + } + ``` + + + + Request Parameters + +`razorpay_payment_id` _mandatory_ +: `string` Unique payment identifier. Format: `pay_` followed by 14 characters. + +`razorpay_order_id` _mandatory_ +: `string` Unique order identifier from Step 1.2. Format: `order_` followed by 14 characters. + + + +### Response Parameters + +`id` +: `integer` Unique Shopify order identifier. For example, `65157213390123`. + +`order_id` +: `string` Human-readable order number. For example, `#32697`. + +`payment_id` +: `string` Razorpay payment identifier. For example, `pay_Rk3b76fSqXXXXX`. + +`payment_method` +: `string` Payment method used. Possible values include: + - `netbanking` + - `upi` + - `card` + - `wallet` + +`payment_currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`total_amount` +: `integer` Total order amount in smallest currency unit (paise). For example, `659430` for ₹6594.30. + +`total_tax` +: `string` Total tax amount as string. For example, `543.91`. + +`shipping_fee` +: `integer` Shipping charges in smallest currency unit (paise). For example, `700` for ₹7. + +`cod_fee` +: `integer` Cash on Delivery fee in smallest currency unit (paise). For example, `0` indicates no COD fee. + +`promotions` +: `array` Array of applied promotions/discounts. + + `reference_id` + : `string` Internal reference for the promotion. + + `code` + : `string` Promotion code used. + + `type` + : `string` Type of promotion. Possible values: + - `automatic`: Automatically applied discount. + - `coupon`: Coupon-based discount. + + `value` + : `integer` Discount value in smallest currency unit (paise). For example, `100000` for ₹1000. + + `source` + : `string` Source of the promotion. For example, `shopify`. + +`shipping_country` +: `string` Country code for shipping destination. For example, `in`. + +`customer_details` +: `object` Complete customer information. + + `email` + : `string` Customer's email address. + + `contact` + : `string` Customer's phone number. + + `shipping_address` + : `object` Complete shipping address information. + + `name` + : `string` Recipient name. + + `line1` + : `string` Address line 1. + + `city` + : `string` City name. + + `state` + : `string` State name. + + `zipcode` + : `string` Postal code. + + `country` + : `string` Country code. For example, `in`. + +`order_status_url` +: `string` Shopify order status page URL for customer. + +`is_new_customer` +: `boolean` Whether this is a new customer's first order. Possible values: + - `true`: New customer's first order. + - `false`: Existing customer order. + + + + + + +#### Pass Additional Attributes to Shopify Orders + +Shopify orders support Tags and Additional Attributes (note attributes). Include the attributes in the Shopify cart's attributes object before initiating checkout: + +```javascript +// When creating/updating Shopify cart +const cartPayload = { + cart: { + token: "your_cart_token", + note: "Customer special instructions", + attributes: { + "Source": "Mobile App", + "App Version": "2.1.0", + "Campaign": "Summer Sale 2025", + "Custom Field": "Your custom value" + }, + item_count: 1, + items: [/* ... */] + }, + key: "rzp_live_XXXXXX" +}; +``` + +These attributes will flow through to the Shopify order and appear in the additional attributes section in Shopify Admin. + +## 2. Test Integration + +Check the following checklist below: + +- Shopify cart creation is working correctly. +- Checkout id is generated successfully. +- Order id is created with analytics parameters. +- Magic Checkout SDK opens without errors. +- Coupons apply correctly via prefill. +- Payment flow completes successfully. +- Complete Checkout API creates order in Shopify. +- Order appears in Shopify Admin with correct details. +- Additional attributes appear correctly in Shopify order. + +## Error Handling + +Error Scenario | Recommended Action +--- +Invalid cart token | Ensure Shopify cart exists before [Step 1.1](#11-create-a-checkout-id). +--- +Payment not captured | Verify payment status before complete checkout. +--- +Invalid signature | Regenerate signature using Razorpay's signature verification. +--- +Coupon invalid | Handle error callback and notify user. + +> **WARN** +> +> +> **Fallback to Shopify Checkout** +> +> If any Magic Checkout API fails, redirect users to the standard Shopify checkout to ensure customers can still complete their purchase. +> + +## Support + +For integration support, reach out to your Razorpay account manager or raise a request with our [support team](https://razorpay.com/support/#request). diff --git a/llm-content/payments/magic-checkout/shopify/custom/web-integration-nextjs.md b/llm-content/payments/magic-checkout/shopify/custom/web-integration-nextjs.md new file mode 100644 index 00000000..9d7de19b --- /dev/null +++ b/llm-content/payments/magic-checkout/shopify/custom/web-integration-nextjs.md @@ -0,0 +1,671 @@ +--- +title: Integrate Razorpay Magic Checkout on React (Next.JS) Website - Shopify +heading: Integrate Magic Checkout on React (Next.JS) Website - Shopify +description: Steps to integrate Magic Checkout on your React (Next.JS) Website - Shopify integration. +--- + +# Integrate Magic Checkout on React (Next.JS) Website - Shopify + +Follow these steps to integrate the Razorpay Magic Checkout on your React (Next.JS) Website when using Shopify as your e-commerce platform. This integration treats the platform as Shopify while using a custom frontend, allowing unified order management in Shopify admin. + +## Prerequisites + +- Ensure you enable [Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#3-how-do-i-check-if-magic-checkout) on your account. +- Integrate [Magic Checkout With Shopify Store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify.md). +- Generate [Live API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys) from the Dashboard. + + - **1. Build Integration**: Integrate with React (Next.JS) Website for Shopify. + + - **2. Test Integration**: Test the integration by making a test payment. + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Create a Checkout id + + Generate a unique cart identifier to initiate the Magic Checkout process. + + +> **INFO** +> +> +> **Important** +> +> Ensure you create the Shopify cart before making this request as the cart token must be included in the payload. +> + + /magic/checkout/shopify?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/magic/checkout/shopify?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{ + "cart": { + "token": "ashgad?key=abasab", + "note": null, + "attributes": {}, + "item_count": 1, + "items": [ + { + "id": 100000000001, + "quantity": 1, + "product_id": 832938123321, + "variant_id": 100000000001, + "properties": {} + } + ] + } + }' + ```json: Response + { + "shopify_checkout_id": "gid://shopify/Cart/ashgad?key=abasab", + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + + + Request Parameters + +`cart` _mandatory_ +: `object` Complete cart object from Shopify. + +`cart.token` _mandatory_ +: `string` Unique cart token from Shopify cart creation. + +`cart.note` _optional_ +: `string|null` Customer notes or special instructions. + +`cart.attributes` _optional_ +: `object` Custom attributes for the cart (key-value pairs). + +`cart.item_count` _mandatory_ +: `integer` Total number of items in the cart. + +`cart.items` _mandatory_ +: `array` Array of cart items. + +`cart.items[].id` _mandatory_ +: `integer` Unique item identifier. + +`cart.items[].quantity` _mandatory_ +: `integer` Quantity of the item. + +`cart.items[].product_id` _mandatory_ +: `integer` Shopify product identifier. + +`cart.items[].variant_id` _mandatory_ +: `integer` Shopify variant identifier. + +`cart.items[].properties` _optional_ +: `object` Custom item properties. + + + +### Response Parameters + +`shopify_checkout_id` +: `string` Unique checkout identifier for Shopify integration. + +`tax_details` +: `object` Tax information for the checkout. + + `total_tax` + : `integer` Total tax amount in smallest currency unit (paise). + + `taxes_included` + : `boolean` Whether taxes are included in item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### 1.2 Create Order id on Server + + Create a Razorpay order id required for the payment modal. This API requires the `shopify_checkout_id` from [Step 1.1](#11-create-a-checkout-id). + + /magic/order/shopify?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/magic/order/shopify?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: */*" \ + -H "Origin: https://api.razorpay.com" \ + -d '{ + "shopify_checkout_id": "gid://shopify/Cart/ashgad?key=abasab", + "ga_id": "GA1.1.xxxxxxx.xxxxxxxx", + "fb_analytics": { + "external_id": "unique_fb_external_id", + "fbp": "fb.1.xxxxxxx.xxxxxxxx", + "fbc": "", + "event_source_url": "https://your-store.com/" + }, + "utm_parameters": { + "landing_page_url": "https://your-store.com/", + "user_agent": "Mozilla/5.0 (Linux; Android 12; SM-G991B)...", + "utm_campaign": "feeding_bottle_sp", + "utm_content": "ct", + "utm_medium": "product_sync", + "utm_source": "google" + }, + "analytics": { + "fb_analytics": { + "external_id": "unique_fb_external_id", + "fbp": "fb.1.xxxxxxx.xxxxxxxx", + "fbc": "" + }, + "ga4": { + "session_ids": { + "_ga_XXXXXXXXXX": "GS1.1.xxxxxxxx.x.x.x.x.x" + }, + "client_id": "GA1.1.xxxxxxxx.xxxxxxxx" + }, + "google_ads": { + "gclid": "", + "wbraid": "", + "gbraid": "" + }, + "source_url": "https://your-store.com/" + } + }' + ```json: Response + { + "preferences": null, + "order_id": "order_EKwxwAgItmmXdp" + } + ``` + + + + Request Parameters + +`shopify_checkout_id` _mandatory_ +: `string` Checkout id from [Step 1.1](#11-create-a-checkout-id). + +`ga_id` _optional_ +: `string` Google Analytics client identifier. + +`fb_analytics` _optional_ +: `object` Facebook Analytics parameters. + + `external_id` _optional_ + : `string` Unique external id for Facebook tracking. + + `fbp` _optional_ + : `string` Facebook browser pixel id. + + `fbc` _optional_ + : `string` Facebook click id. + + `event_source_url` _optional_ + : `string` Source URL for the event. + +`utm_parameters` _optional_ +: `object` UTM tracking parameters. + + `landing_page_url` _optional_ + : `string` Landing page URL. + + `user_agent` _optional_ + : `string` Browser user agent string. + +`analytics` _optional_ +: `object` Comprehensive analytics data. + + `fb_analytics` _optional_ + : `object` Facebook Analytics configuration. + + `external_id` _optional_ + : `string` Unique external id for Facebook tracking. + + `fbp` _optional_ + : `string` Facebook browser pixel id. + + `fbc` _optional_ + : `string` Facebook click id. + + `ga4` _optional_ + : `object` Google Analytics 4 configuration. + + `session_ids` _optional_ + : `object` GA4 session identifiers. + + `client_id` _optional_ + : `string` GA4 client identifier. + + `google_ads` _optional_ + : `object` Google Ads tracking parameters. + + `gclid` _optional_ + : `string` Google Click Identifier. + + `wbraid` _optional_ + : `string` Web-to-app measurement parameter. + + `gbraid` _optional_ + : `string` Google Ads Broad match parameter. + + `source_url` _optional_ + : `string` Source URL for analytics. + + + +### Response Parameters + +`preferences` +: `object|null` Customer preferences. Returns `null` if no preferences are set. + +`order_id` +: `string` Unique Razorpay order identifier. For example, `order_EKwxwAgItmmXdp`. + + + + + + +### 1.3 Integrate Magic Checkout Web SDK + + After successfully creating the order id, integrate the Magic Checkout Web SDK to display the payment interface and handle the checkout process. + + + 1.3.1 Load the Magic Checkout Script + + You can add the Razorpay Magic Checkout script to your Next.JS application in two ways: + + + ```javascript: JavaScript + // In your _app.js or specific page component + import Script from 'next/script'; + + export default function App({ Component, pageProps }) { + return ( + <> + + + + ); + } + ``` + + + ```javascript: JavaScript + // In your checkout component + import { useEffect } from 'react'; + + useEffect(() => { + const script = document.createElement('script'); + script.src = 'https://checkout.razorpay.com/v1/magic-checkout.js'; + script.async = true; + document.body.appendChild(script); + + return () => { + document.body.removeChild(script); + }; + }, []); + ``` + + + + + +### 1.3.2 Initialise and Open Magic Checkout + + Create a function to initialise Magic Checkout with the required configuration options and open the payment modal. + + ```javascript: Checkout Options + const openMagicCheckout = () => { + const options = { + key: 'rzp_live_XXXXXX', // Enter the Key id generated from the Dashboard + name: 'Acme Corp', // Your business name + order_id: 'order_EKwxwAgItmmXdp', // Order id from Step 2 + show_coupons: true, // default true; false if coupon widget should be hidden + prefill: { + name: 'Gaurav Kumar', + email: 'gauravkumar@example.com', + contact: '9000090000', + coupon_code: 'MY_COUPON_20', // Coupon from your cart to auto-apply + }, + handler: function (response) { + // Handle successful payment + // response.razorpay_payment_id + // response.razorpay_order_id + // response.razorpay_signature + + // Call Complete Checkout API (Step 5) + completeCheckout(response); + }, + modal: { + ondismiss: function () { + // Handle checkout modal close + console.log('Checkout modal closed'); + }, + }, + }; + const rzp = new window.Razorpay(options); + rzp.open(); + }; + ``` + + + + Checkout Options + + +You must pass these parameters in Checkout to initiate the payment. + +`key` _mandatory_ +: `string` API Key id generated from the Razorpay Dashboard. + +`name` _mandatory_ +: `string` Your business name shown on the Checkout form. For example, **Your Store Name**. + +`order_id` _mandatory_ +: `string` Order id from [Step 1.2](#12-create-order-id-on-server). + +`show_coupons` _optional_ +: `boolean` Determines whether to show coupons to customer on checkout. Possible values: + - `true` (default): Enables the Coupon feature. + - `false`: Disables the Coupon feature. + +`prefill` _optional_ +: `object` You can prefill the following details at Checkout. + + `name` _optional_ + : `string` Customer's name to be prefilled. For example, **Customer Name**. + + `email` _optional_ + : `string` Customer's email address. + + `contact` _optional_ + : `string` Customer's phone number. The expected format is `+ {country code}{phone number}`. If country code is not specified, `91` will be used as default. + + `coupon_code` _optional_ + : `string` Coupon code from your cart to auto-apply during checkout. + +`handler` _mandatory_ +: `function` Function called on successful payment. Returns payment response with `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`. + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you handle the payment response in the `handler` function and call the Complete Checkout API to finalise the order in Shopify. +> + +> **WARN** +> +> +> +> **Watch Out!** +> +> To support theme colour in the progress bar, please pass HEX colour values only. +> + + + + + + + + + + + +### 1.4 Coupon Handling + + Since this is an SDK integration, Shopify coupons will not auto-apply like they do on the website. You must explicitly pass coupon codes to Magic Checkout. When initialising Magic Checkout, include the coupon code in the prefill options: + + ```javascript + const options = { + key: 'rzp_live_XXXXXX', + order_id: 'order_EKwxwAgItmmXdp', + // ... other options + + prefill: { + coupon_code: 'MY_COUPON_NAME', // Coupon from your cart to auto-apply + }, + }; + + // Initialise Magic Checkout with options + MagicCheckout.open(options); + ``` + + Your app captures the coupon applied on the cart page, then passes the coupon code in the `prefill.coupon_code` field. The SDK internally calls `applyCoupon('MY_COUPON_NAME')` and if the coupon is valid, it is automatically applied in Magic Checkout. + + + +### 1.5 Complete Checkout Call + + After a successful payment, call the complete checkout API to create the order in Shopify. You must make the call from the callback handler implemented when importing the React SDK. Ensure you redirect the user to the `order_status_url` to show them the order success page on Shopify. + + /1cc/shopify/complete?key_id=rzp_live_XXXXXX + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/1cc/shopify/complete?key_id=rzp_live_XXXXXX \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{ + "razorpay_payment_id": "pay_Rk3b76fSqXXXXX", + "razorpay_order_id": "order_Rk3UmCXXW5XXXX" + }' + ```json: Response + { + "id": 65157213390123, + "order_id": "#32697", + "payment_id": "pay_Rk3b76fSqXXXXX", + "payment_method": "netbanking", + "payment_currency": "", + "total_amount": 659430, + "total_tax": "543.91", + "shipping_fee": 700, + "cod_fee": 0, + "promotions": [ + { + "reference_id": "Auto Order Amount Discount", + "code": "Auto Order Amount Discount", + "type": "automatic", + "value": 100000, + "source": "shopify" + } + ], + "shipping_country": "in", + "customer_details": { + "email": "", + "contact": "", + "shipping_address": { + "name": "", + "line1": "123 Main Street", + "city": "Bengaluru", + "state": "KARNATAKA", + "zipcode": "560049", + "country": "in" + } + }, + "order_status_url": "https://your-store.myshopify.com/orders/...", + "is_new_customer": false + } + ``` + + + + Request Parameters + +`razorpay_payment_id` _mandatory_ +: `string` Unique payment identifier. Format: `pay_` followed by 14 characters. + +`razorpay_order_id` _mandatory_ +: `string` Unique order identifier from Step 1.2. Format: `order_` followed by 14 characters. + + + +### Response Parameters + +`id` +: `integer` Unique Shopify order identifier. For example, `65157213390123`. + +`order_id` +: `string` Human-readable order number. For example, `#32697`. + +`payment_id` +: `string` Razorpay payment identifier. For example, `pay_Rk3b76fSqXXXXX`. + +`payment_method` +: `string` Payment method used. Possible values include: + - `netbanking` + - `upi` + - `card` + - `wallet` + +`payment_currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`total_amount` +: `integer` Total order amount in smallest currency unit (paise). For example, `659430` for ₹6594.30. + +`total_tax` +: `string` Total tax amount as string. For example, `543.91`. + +`shipping_fee` +: `integer` Shipping charges in smallest currency unit (paise). For example, `700` for ₹7. + +`cod_fee` +: `integer` Cash on Delivery fee in smallest currency unit (paise). For example, `0` indicates no COD fee. + +`promotions` +: `array` Array of applied promotions/discounts. + + `reference_id` + : `string` Internal reference for the promotion. + + `code` + : `string` Promotion code used. + + `type` + : `string` Type of promotion. Possible values: + - `automatic`: Automatically applied discount. + - `coupon`: Coupon-based discount. + + `value` + : `integer` Discount value in smallest currency unit (paise). For example, `100000` for ₹1000. + + `source` + : `string` Source of the promotion. For example, `shopify`. + +`shipping_country` +: `string` Country code for shipping destination. For example, `in`. + +`customer_details` +: `object` Complete customer information. + + `email` + : `string` Customer's email address. + + `contact` + : `string` Customer's phone number. + + `shipping_address` + : `object` Complete shipping address information. + + `name` + : `string` Recipient name. + + `line1` + : `string` Address line 1. + + `city` + : `string` City name. + + `state` + : `string` State name. + + `zipcode` + : `string` Postal code. + + `country` + : `string` Country code. For example, `in`. + +`order_status_url` +: `string` Shopify order status page URL for customer. + +`is_new_customer` +: `boolean` Whether this is a new customer's first order. Possible values: + - `true`: New customer's first order. + - `false`: Existing customer order. + + + + + + +#### Pass Additional Attributes to Shopify Orders + +Shopify orders support Tags and Additional Attributes (note attributes). Include the attributes in the Shopify cart's attributes object before initiating checkout: + +```javascript +// When creating/updating Shopify cart +const cartPayload = { + cart: { + token: "your_cart_token", + note: "Customer special instructions", + attributes: { + "Source": "Mobile App", + "App Version": "2.1.0", + "Campaign": "Summer Sale 2025", + "Custom Field": "Your custom value" + }, + item_count: 1, + items: [/* ... */] + }, + key: "rzp_live_XXXXXX" +}; +``` + +These attributes will flow through to the Shopify order and appear in the additional attributes section in Shopify Admin. + +## 2. Test Integration + +Check the following checklist below: + +- Shopify cart creation is working correctly. +- Checkout id is generated successfully. +- Order id is created with analytics parameters. +- Magic Checkout SDK opens without errors. +- Coupons apply correctly via prefill. +- Payment flow completes successfully. +- Complete Checkout API creates order in Shopify. +- Order appears in Shopify Admin with correct details. +- Additional attributes appear correctly in Shopify order. + +## Error Handling + +Error Scenario | Recommended Action +--- +Invalid cart token | Ensure Shopify cart exists before [Step 1.1](#11-create-a-checkout-id). +--- +Payment not captured | Verify payment status before complete checkout. +--- +Invalid signature | Regenerate signature using Razorpay's signature verification. +--- +Coupon invalid | Handle error callback and notify user. + +> **WARN** +> +> +> **Fallback to Shopify Checkout** +> +> If any Magic Checkout API fails, redirect users to the standard Shopify checkout to ensure customers can still complete their purchase. +> + +## Support + +For integration support, reach out to your Razorpay account manager or raise a request with our [support team](https://razorpay.com/support/#request). diff --git a/llm-content/payments/magic-checkout/shopify/order-analytics.md b/llm-content/payments/magic-checkout/shopify/order-analytics.md new file mode 100644 index 00000000..8eda09cd --- /dev/null +++ b/llm-content/payments/magic-checkout/shopify/order-analytics.md @@ -0,0 +1,80 @@ +--- +title: Shopify Order Analytics | Razorpay Magic Checkout +heading: Order Analytics +description: View in-depth information about the Orders processed on your Shopify store through Razorpay Magic Checkout on the Razorpay Dashboard. +--- + +# Order Analytics + +Magic Checkout's Order Analytics Dashboard gives you an in-depth view of the Order-related activities on your Shopify store. +It helps in decision-making, revenue analysis, and provides payment method insights. You can also measure effectiveness with the help of UTM parameter tracking and product performance. + +Follow the steps given below to view the Order Analytics Dashboard: +1. Log in to the Dashboard. +2. Navigate to **Magic Checkout** → **Order Analytics**. + ![Navigate to order analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-order-analytics.jpg.md) +3. The Dashboard offers insight into the following: + - [Total Sales](#total-sales) + - [Total Orders Placed](#total-order-placed) + - [Average Order Value](#average-order-value) + - [Prepaid vs. COD - Total Sales](#prepaid-vs-cod-total-sales) + - [Prepaid vs. COD - Total Orders](#prepaid-vs-cod-total-orders) + - [Traffic by UTM Parameters](#traffic-by-utm-parameters) + - [Top Selling Products](#top-selling-products) + +> **INFO** +> +> +> **Handy Tips** +> +> - The data populated is from 1st March 2023 for all the reports except **Traffic by UTM Parameters** and **Top Selling Products**, from 1st May 2023. +> - Navigate to **Custom Range** and filter the range to display the data based on your choice. This applies to all the reports. +> ![Filter the range to view the data](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-custom-range.jpg.md) +> + +## Total Sales + +The actual order value collected from the customers during order placement. It includes COD and shipping charges, deducting any coupon/discount value. + +![View total sales](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-sales.jpg.md) + +## Total Order Placed + +The total number of orders placed by customers on Magic Checkout during the time range serves as a key metric for assessing sales volume and tracking demand trends over time. + +![View total orders placed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-orders.jpg.md) + +## Average Order Value + +Customers' average amount spent per order indicates the transaction size and revenue generated per purchase. + +![View average order value](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-avg-order-amt.jpg.md) + +## Prepaid vs. COD - Total Sales + +The comparison of revenue generated from prepaid orders versus cash on-delivery (COD) orders. This helps you understand the impact of different payment methods on their overall sales and make informed decisions about payment options. + +![View prepaid versus COD sales](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-prepaid-cod-sales.jpg.md) + +## Prepaid vs. COD - Total Orders + +The comparison of the total number of orders placed by customers who opted for prepaid versus cash on delivery payment method. This helps in understanding customer preferences regarding payment methods and making informed decisions about payment options. + +![View prepaid versus COD orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-prepaid-cod-orders.jpg.md) + +## Traffic by UTM Parameters + +The order analysis is based on specific parameters such as source, medium, and campaign. This helps you understand which marketing campaigns, channels, or sources drive the most orders and sales to your Shopify store. You can filter the data to view the analysis on all parameters. + ![View traffic by UTM parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-traffic.jpg.md) + +- **Source**: It identifies the specific source of orders. For example, if a link is shared on WhatsApp, the UTM source would be WhatsApp. + +- **Medium**: It defines the general category or type of traffic, such as email, social media, video or click-through advertisement, or referral. For example, if a link is included on Facebook, social media is the UTM medium. + +- **Campaign**: It tracks a specific marketing campaign or promotion. It helps differentiate between different initiatives within the same source and medium. For example, if you are running a summer sale, the UTM campaign would be a summer sale. + +## Top Selling Products + +It analyses sales data to identify the most popular product categories that generate the highest total revenue. This helps you understand which products are selling well and lets you focus on maximising sales and profitability in those categories. + +![View top selling products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-analytics-top-selling-prods.jpg.md) diff --git a/llm-content/payments/magic-checkout/troubleshooting-faqs.md b/llm-content/payments/magic-checkout/troubleshooting-faqs.md new file mode 100644 index 00000000..83d39a4a --- /dev/null +++ b/llm-content/payments/magic-checkout/troubleshooting-faqs.md @@ -0,0 +1,563 @@ +--- +title: Troubleshooting & FAQs | Razorpay Magic Checkout +heading: Troubleshooting & FAQs +description: Troubleshoot common errors and find answers to frequently asked questions about Razorpay Magic Checkout. +--- + +# Troubleshooting & FAQs + +## Common + + +### 1. What are the benefits of using Magic Checkout? + + The benefits of Magic Checkout are: + - Seamless prepaid and COD options + - Faster checkout experience + - Higher conversions + - Saved customer details + - Reduced RTOs (Return To Origin) + - Efficient promotions + + + +### 2. How does Magic Checkout improve conversion rates? + + Magic Checkout boosts conversions with a streamlined UI, auto-prefilled addresses and saved payments, visible coupons, personalised payment options, trust badges and COD Intelligence to block risky orders; delivering a faster, more seamless checkout experience. + + + +### 3. How do I check if Magic Checkout is enabled on my account? + + Add items to your cart and click the Checkout button. If Magic Checkout is enabled, the Magic Checkout pop-up will appear instead of your regular checkout page. If this flow does not appear, raise a ticket with our [Support team](https://dashboard.razorpay.com/app/business-settings/ticket-support/tickets/merchant). + + + +### 4. Magic Checkout is not showing up on my website - what should I do? + + First, check if your website's theme was recently changed. If the theme is unchanged, raise a ticket with our [Support team](https://dashboard.razorpay.com/app/business-settings/ticket-support/tickets/merchant) for assistance. + + + +### 5. How do I fix Magic Checkout after updating my website theme? + + Raise a request with our [Support team](https://dashboard.razorpay.com/app/business-settings/ticket-support/tickets/merchant) to get this issue resolved. + + + +### 6. How does Magic Checkout help reduce fake orders and RTOs? + + Magic Checkout's COD Intelligence uses risk analysis to block high-risk COD orders, helping reduce fake orders and RTOs. + + To enable COD Intelligence on your [Dashboard](https://dashboard.razorpay.com/app/magic/settings/rto-reduction-setup/rto-reduction), navigate to **Magic Checkout** → **RTO Reduction Setup**. In the **RTO Reduction** tab, toggle on **COD Intelligence** and click **Enable COD Intelligence** in the confirmation pop-up modal. + + + +### 7. Is international payments supported on Magic Checkout? + + Yes, international payments is supported on Magic Checkout. + + + +### 8. How do I enable COD (Cash on Delivery) in Magic Checkout? + + On the [Razorpay Dashboard](https://dashboard.razorpay.com/app/magic/settings/cod-settings/settings), go to **Magic Checkout** → **COD Settings** → **COD Setup** and enable **COD as a payment option**. + + +> **WARN** +> +> +> **Watch Out!** +> +> This setting is not applicable for custom websites. If you are using a custom website, you can control COD directly through APIs. If you are still unable to view the COD option, contact our [Support team](https://dashboard.razorpay.com/app/business-settings/ticket-support/tickets/merchant). +> + + + + +### 9. Is Magic Checkout available on plugins? + + At present, Magic Checkout is available only on [WooCommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md), [Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify.md) and Magento. + + + +### 10. What should I do if Magic Checkout is causing conflicts with other plugins? + + If Magic Checkout is causing conflicts with other plugins, disable any plugins that are not required. If the integration issue persists, contact our [Support team](https://dashboard.razorpay.com/app/business-settings/ticket-support/tickets/merchant) for assistance. + + + +### 11. Can I restrict a coupon discount to first-time users? + + No, we currently do not support restricting a coupon discount to first-time users. + + + +### 12. Can Magic Checkout help with abandoned cart recovery? + + Yes. [Abandoned checkouts](https://dashboard.razorpay.com/app/magic/settings/checkout-setup) are automatically recorded in your Shopify/WooCommerce dashboards and can be leveraged by your retargeting tools. You can also use the abandoned cart webhook to track dropped customers and retarget them using their contact details to recover lost sales. + + + +### 13. How do I customise the Checkout appearance on my store? + + You can customise the look and feel of your checkout and rearrange payment methods or instruments to suit your requirements. Refer to the [checkout settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-styling.md). + + + +### 14. How can I track Magic Checkout analytics and performance? + + You can view Magic Checkout analytics and performance in the [Order Analytics](https://dashboard.razorpay.com/app/magic/reports-analytics/order-analytics) tab on your Razorpay Dashboard. + + +## Web + + +### 1. Can I use both live and test keys at the same time in a sandbox environment? + + No, we do not support using live and test keys simultaneously in a staging environment. The URL configured in live mode is used for testing. If you need a specific merchant ID (MID) hardcoded for testing, please reach out to your Razorpay SPOC for assistance. + + + +### 2. How do I enable and integrate Magic Checkout on my custom website? + + Follow these [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/web.md#integration-steps) to set up Magic Checkout on your custom website. + + +> **INFO** +> +> +> **Handy Tips** +> +> This is an on-demand feature. Contact your Razorpay SPOC or our [Support team](https://dashboard.razorpay.com/app/business-settings/ticket-support/tickets/merchant) to request activation on your account. +> + + + + +### 3. Is Single Sign-On (SSO) supported? + + No, SSO is not supported. You will need to log in explicitly on the Razorpay Dashboard using your credentials. + + + +### 4. Why are the serviceability and coupon calls failing? + + The calls are failing due to timeouts. If the response time exceeds 10 seconds, the request is terminated, resulting in errors. + + + +### 5. Can I create payment offers on checkout for my customers? + + Yes, you can provide different types of payment offers to customers on checkout. Know more about how to [create offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers.md). + + + +### 6. How can I fetch the GSTIN and order notes provided by a customer through Magic Checkout? + + You can retrieve the GSTIN and order notes provided by a customer by querying the corresponding Razorpay order_id. These details are available in the order notes under the keys `gstin` and `order_instruction` respectively. + + + +### 7. How can I retrieve customer details? + + You can retrieve customer details by querying the Razorpay order associated with the customer. + + + +### 8. Can I configure branding-related settings for Checkout? + + Yes, you can customise Razorpay Checkout to reflect your brand colors and logos. Know more about how to [update brand name, theme color and company logo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-styling.md) on checkout. + + + +### 9. Can I make email and phone number collection mandatory or optional on checkout? + + This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to configure the email and phone number collection on checkout. + + + +### 10. What should I do if my domain's firewall or cloud configuration is blocking requests to api.razorpay.com? + + If your domain’s firewall or cloud configuration is blocking requests to api.razorpay.com, you need to whitelist our public IPs. Know more about how to [whitelist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#api-ips). + + + +### 11. How can I initiate a refund to my customer? + + You can initiate refunds using our [Refunds APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md). + + +## WooCommerce + + +### 1. I am integrating with Razorpay Plugin for the first time. What are the steps that I need to follow? + + Follow the steps given below if you are integrating with our plugin for the first time: + 1. [Create a Razorpay account](https://dashboard.razorpay.com/). + 2. [Generate the API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. Navigate to **Account & Settings** → **API Keys** (under **Website and app settings**). + 3. [Enable features on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md#step-1-enable-features-on-razorpay-dashboard). + 4. Install Razorpay Plugin: With the release of version 4.1.0, you can install the plugin directly from the [WordPress Plugin Directory](https://wordpress.org/plugins/woo-razorpay/). + +> **INFO** +> +> +> **Handy Tips** +> +> Ensure you have the PHP-curl extension installed to make network requests. +> + + 5. [Enable features on WordPress Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md#step-2-enable-features-on-wordpress-dashboard). In addition to the other steps, scroll down to **Razorpay** under the **Payments** tab and click **Manage** to edit the settings. + - Enable the **Payment Method**, name it Credit Card/Debit Card/Internet Banking (Displayed to your customer on the payment page). + - Add in your `[KEY_ID]` and `[KEY_SECRET]` generated from the [Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + - Set **Payment Action** to **Authorize and Capture** to auto-capture payments. If you want to capture payments manually from the Dashboard after manual verification then set the Payment Action to **Authorize**. + ![](/docs/assets/images/magic-checkout-dashboard.jpg) + + 6. Accept Live Payments. + - Generate the `[KEY_ID]` and `[KEY_SECRET]` in the Live mode on your Razorpay Dashboard. + - Enter the Live mode `[KEY_ID]` and `[KEY_SECRET]` in your WooCommerce store. + + +> **INFO** +> +> +> **Handy Tips** +> +> [Disable the Test mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md#step-3-accept-live-payments:~:text=use%20Native%20Checkout.-,Activate%20Test%20Mode,-%3A%20Enable%20Test%20mode) to accept live payments. +> + + + + +### 2. How do I enable and integrate Magic Checkout on my WooCommerce website? + + Follow these [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md#integration-steps) to set up Magic Checkout on your WooCommerce website. If you are integrating with our plugin for the first time, refer to these [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#1-i-am-integrating-with-razorpay-plugin-for). + + +> **INFO** +> +> +> **Handy Tips** +> +> This is an on-demand feature. Raise a request with our [Support team](https://dashboard.razorpay.com/app/business-settings/ticket-support/tickets/merchant) to get this enabled on your account. +> + + + + +### 3. How can I exclude draft orders from WooCommerce analytics reports? + + To exclude draft orders: + a. Click **Analytics settings** in the WooCommerce Dashboard. + b. Navigate to the **Excluded statuses** section and select the check box for **draft orders** under the **Unregistered statuses** section. + + + +### 4. My Webhooks are not auto-configured since I am not using the upgraded version of WooCommerce. How do I manually configure webhooks? + + - Auto-webhook support is available from Razorpay Woocommerce Plugin v2.7.2 onwards. + - You can configure only these events: `payment.authorized`, `refund.created` and `virtual_account.credited`. + +> **INFO** +> +> +> **Handy Tips** +> +> If you have enabled the COD option for your customers, you should manually subscribe to the `payment.pending` event. +> + + - Once you configure auto-webhook on WooCommerce, you do not have to configure it on the Razorpay Dashboard. + + To set up auto-webhooks: + 1. In the WordPress Dashboard, click **WooCommerce** and go to **Settings**. + 2. In the **Payments** tab, complete the following steps: + - Select **Enable Razorpay Webhook**. + + - **Webhook Events**: From the list, select the events for which you want to receive notifications. + + - **Webhook Secret**: Enter the secret. This is a mandatory field as the secret is required for webhook signature verification. + + 3. Click **Save Changes**. + ![](/docs/assets/images/ecommerce-plugins-woocommerce-pg-events.jpg) + + + +### 5. How can I verify if webhooks are enabled? + + To verify if webhooks are enabled: + 1. Log in to the Razorpay Dashboard and navigate to **Account & Settings** → **Webhooks** (under **Website and app settings**). + 2. Select the relevant webhook **URL**. + 3. On the right panel, check if the status for `payment.authorized`, `refund.created` and `virtual_account.credited` is enabled. + +> **INFO** +> +> +> **Handy Tips** +> +> If you have enabled the COD option for your customers, you should [manually subscribe](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#3-my-webhooks-are-not-auto-configured-since-i) to the `payment.pending` event. +> + + ![](/docs/assets/images/plugin-webhook-faq.jpg) + + + +### 6. Can I disable Magic Checkout? + + Yes, you can disable Magic Checkout. Once you disable Magic Checkout, your website/app will automatically fall back to your default Woocommerce Checkout experience. Follow the steps given below to disable Magic Checkout: + 1. Log in to the [WordPress account](https://wordpress.com/log-in) and navigate to **Woocommerce** → **Settings**. + 2. Click **Payments**. + ![Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-smart.jpg.md) + 3. In the Payments tab, scroll down to **Razorpay** and click **Manage** to edit the settings. + ![edit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-razorpay-edit.jpg.md) + 4. Scroll down to the **Activate Magic Checkout** field and unselect the check box to deactivate it. + ![Disable](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-woocommerce-disable.jpg.md) + 5. Click **Save Changes**. + + +## Shopify + + +### 1. How do I enable and integrate Magic Checkout on my Shopify store? + + To enable Magic Checkout on your Shopify store, fill in the [form](https://razorpay.typeform.com/to/peQh9Pwx#name=xxxxx) and share the required details. Once you share the details, the feature will be enabled on your account within 48 working hours. After activation, follow these [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify.md#integration-steps) to integrate Magic Checkout on your Shopify store. + + + +### 2. I changed my Shopify theme - how do I re-enable Magic Checkout? + + Reach out to our support team at [magic-checkout-support@razorpay.com](mailto:magic-checkout-support@razorpay.com) for re-enablement of Magic Checkout on a different theme. + + + +### 3. Why am I not able to view the Coupons tab on the Razorpay Dashboard? + + Coupons is an on-demand feature. Fill in the [feature request form](https://form.typeform.com/to/aancN9td) to get this feature enabled on your account. + + + +### 4. Can I create coupons for an international audience? + + No, currently, we support coupons created in INR only. + + + +### 5. How do I set up coupon codes with Magic Checkout on Shopify? + + Follow these [steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#coupons) to configure coupon codes on your [Razorpay Dashboard](https://dashboard.razorpay.com/app/magic/coupons) for your Shopify store. + + + +### 6. What happens to my Shopify coupons when I enable coupons on Razorpay Dashboard? + + Coupons created on Shopify will not apply unless they are synced. To sync all coupons across different categories on Shopify: + + 1. On the [Razorpay Dashboard](https://dashboard.razorpay.com/app/magic/coupons), navigate to **Coupons** → **Setup** section. + 2. Click **Sync now** next to the **Coupons from Shopify** section. + 3. Enter the **Start date** and **End date** to set the sync duration for the coupon. + 4. Click **Start Sync**. + + +> **WARN** +> +> +> **Watch Out!** +> +> Only the following coupons will be synced from Shopify: (currently, multiple collections are not synced) +> - Amount discounted on orders +> - Amount discounted on products +> - Buy X Get Y (if minimum quantity configured) +> + + + + +### 7. Do Razorpay Dashboard coupons sync back to Shopify? + + No, coupons created on the Razorpay Dashboard cannot be synced back to Shopify. They only work within the Magic Checkout system. + + + +### 7. Are all the coupons created on Shopify published once synced? + + By default, all the coupons synced from Shopify are in the `created` state. You must manually configure and publish the coupons. To publish a coupon, identify the coupon created on Shopify, click the options icon and click **View and Edit** *(if required)* or click **Publish**. + + + +### 8. Can I restrict coupons to specific payment methods?? + + Yes, you can enable the **Enable this coupon code only for Prepaid Payment methods** option on the dashboard to disable COD payment for specific coupons, encouraging customers to use prepaid payment methods instead. + + + +### 9. Why are my customers not able to avail the Buy X Get Y coupon? + + In the Buy X Get Y scenario, you must convey to your customers that to use this coupon, both the X and Y products should be present in their cart. For example, if the coupon offers a discount on a cap or provides it for free only when you buy a t-shirt, both items must be in your cart for the discount to apply. + + + +### 10. Why are my created and published coupons not visible on checkout? + + After you publish a coupon, navigate to **Coupons** → **Setup** on the [dashboard](https://dashboard.razorpay.com/app/magic/coupons) and toggle on **Enable Coupons** option to make the coupons accessible on checkout for your customers. Click **Save settings** after which all the coupons created on Shopify will stop working immediately. + + + +### 11. Can I edit a coupon after creating it? + + Yes, you can edit the coupon. Navigate to **Coupons** → **All Coupons**, identify the coupon you want to edit, navigate to the options icon and click **View and Edit**. + + +> **WARN** +> +> +> **Watch Out!** +> +> Once the coupon is created, you cannot edit the following: +> - Coupon Code +> - Coupon eligibility file you upload +> - Display this coupon at checkout option +> - Coupon start date +> - Total Maximum budget +> + + + + +### 12. What is the unavailable coupon feature? + + The coupon will appear in a disabled state when users do not meet the cart or eligibility conditions When you enable **Display this coupon at checkout** option and then select **Enable coupon as an unavailable coupon**. Once conditions are met, the coupon automatically becomes available for use. + ![Enter the coupon code and description](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-coupon-code.jpg.md) + + + +### 13. Can I delete a coupon? + + You can only deactivate a coupon and not delete it. Identify the coupon you want to deactivate, navigate to the options icon and click **Deactivate**. + + + +### 14. What is the CSV format to upload the coupon eligibility file? + + Format: + - Mobile number: +919000090000 + - Email id: gauravkumar@example.com + + + +### 14. Why am I unable to refund the full order amount when I used Razorpay offers/coupons? + + This happens because offers/coupons created through the Razorpay Dashboard create a display mismatch between platforms: + + - Shopify shows the full order amount as captured. + - Razorpay only captures the discounted amount (what the customer actually paid). + - You can only refund the amount that was actually captured. + + We recommend processing refunds through the Razorpay Dashboard for accurate amounts. If you need to use Shopify, check the captured amount in your Razorpay Dashboard first, then refund only that amount in Shopify. For example, a ₹100 order with a ₹10 Razorpay offer means only ₹90 was actually captured, so you can only refund ₹90. + + + +### 15. How is the refund processed if a customer returns a product paid partially via COD and partially online? + + The refund process depends on the your refund policy. If approved, the refund will be processed as a standard refund, similar to the existing refund options that Razorpay offers. Know more about [refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md). + + + +### 16. How do I set up shipping profiles on Razorpay Dashboard? + + You can configure shipping rates at product, zone and method levels for your customers. Follow these [steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#method-1-razorpay-dashboard-1) to set up shipping profiles on the [Razorpay Dashboard](https://dashboard.razorpay.com/app/magic/settings/shipping-setup). + + + +### 17. What happens if I configure shipping settings on the Razorpay Dashboard? + + When you configure shipping settings on the Razorpay Dashboard, these settings override any shipping configurations set up on your plugins or ecommerce platform. The dashboard settings take precedence over all other configurations. + + + +### 18. Can I add the same product to multiple shipping categories? + + No, each product can only belong to one shipping category. Once you add a product to a category, you cannot add it to another category within your shipping profiles. + + + +### 19. Can I offer Cash on Delivery (COD) for specific shipping methods? + + Yes, you can enable COD availability at the shipping method level. This allows you to selectively offer cash on delivery as a payment option for specific shipping methods while excluding it from others. + + +### Login With Razorpay (SSO) + + +### 1. What is Login with Razorpay (SSO)? + + Login with Razorpay, powered by Magic SSO, is a single sign-on system that allows customers to log in seamlessly across the Razorpay network using OTP-based authentication. It helps merchants collect valuable user data, personalise the shopping experience and improve conversions. + + + +### 2. Is this feature available for all platforms? + + No, currently this feature is only available for Shopify users. + + + +### 3. Can I choose where the login prompt appears for users? + + Yes, you can configure the login prompt to appear: + - On the first page a customer visits. + - After a customer adds their first item to the cart. + - During checkout (with the option to make login mandatory). + + Know more about [where you can display the login screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/login-with-razorpay.md#where-should-we-display-login-screen). + + + +### 4. Can I customise how consent is collected from users? + + Yes, you can customise how consent is collected from users. Know more about various options [ to seek consent from your customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/login-with-razorpay.md#ask-consent-from-customer-for-marketing-communication). + + + +### 5. Can I customise how the login widget looks? + + Yes, you can customise the heading, emojis, background and button colours and fonts to match your brand. Know more about [customisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/login-with-razorpay.md#customise) + + + +### 6. How do login rewards work? + + Login rewards are incentives such as coupons offered to users who log in via the widget. You must create the coupon using [ Razorpay Coupon Engine](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify/configuration.md#coupons) and raise a request with our [support team](https://razorpay.com/support/#request) to get the feature enabled. + + + +### 7. What is automatic customer tagging in Razorpay Magic Checkout? + + Automatic customer tagging refers to the process where **Login with Razorpay** (SSO) feature assigns specific tags to customer profiles in your Shopify store when they log in. These tags help identify returning users, track login methods and automate retargeting campaigns. + + + +### 8. How quickly are tags applied after a customer logs in? + + Tags are applied in real-time as soon as the customer logs in through Magic SSO. + + + +### 9. Will existing customer accounts get tagged? + + Yes, when existing customers log in through Razorpay SSO, the system automatically applies the relevant tags. + + + +### 10. Can I manually edit or remove these tags? + + Yes, you can edit or remove these tags like any other customer tag in Shopify. However, we recommend retaining them to ensure accurate automation and segmentation. + + + +### 11. Do these tags affect my Shopify plan limits? + + No, customer tags do not count towards any Shopify plan limits. + + + +### 12. Can I create my own custom tags? + + Yes, you can create and apply additional custom tags to enhance customer segmentation. diff --git a/llm-content/payments/magic-checkout/use-cases.md b/llm-content/payments/magic-checkout/use-cases.md new file mode 100644 index 00000000..2f439a8e --- /dev/null +++ b/llm-content/payments/magic-checkout/use-cases.md @@ -0,0 +1,129 @@ +--- +title: Razorpay Magic Checkout Use Cases +heading: Magic Checkout Use Cases +description: Discover how Razorpay Magic Checkout can simplify and boost payments, streamline operations, reduce RTOs and improve the checkout experience. +--- + +# Magic Checkout Use Cases + +Go through the use cases on how Razorpay Magic Checkout has helped businesses across the **ecommerce industry** transform their payment operations. It has helped businesses of all sizes and types improve COD intelligence, conversion rates, brand image, checkout experience and reduce RTOs. + + + +### Fashion Industry + + Businesses in the fashion industry showcase trendy clothing and accessories for easy online shopping, catering to diverse fashion preferences. + + For _Acme Apparels_, an online fashion store, providing the best shopping experience to customers has been a challenge. + + To ensure a faster checkout experience, and less cart abandonment and drop-offs, Acme Apparels uses Magic Checkout. + + + + No More Lengthy Account Creation + + Magic Checkout eliminates lengthy account creation by auto-filling customer contact and shipping details from other Magic network-powered stores. This gives Acme Apparels's first-time users a repeat-like and 5X faster checkout experience. + + + +### Mobile Optimised Shopping Experience + + Magic Checkout's mobile-optimised and seamless UI provides shoppers a frictionless shopping experience. This improved Acme Apparels's conversion rate, leading to a massive bump in revenue. + + + +### Reduce RTO (Return to Origin Rate) + + Magic Checkout's proprietary AI model dynamically disables the COD option for high risk orders/users, nudging such users to make a prepaid payment. Additionally, Magic Checkout's RTO Analytics provides Acme Apparels actionable insights to understand and control its RTO rates. + + + +### Order Analytics + + Acme Apparels leverages Magic Checkout's Order Analytics Dashboard for data-driven decisions, revenue analysis, and payment optimisation. UTM parameter tracking and product performance evaluation campaign enhances business performance. + + + +### Boost Conversions with Payment Offers and Coupon Allowlisting + + Acme Apparels boosts conversions by offering discounts on prepaid methods at the payment step, reducing drop-offs, and urging users to choose prepaid over COD, reducing RTOs. Additionally, with Magic Checkout, Acme Apparels showcases store coupons on the checkout modal, simplifying coupon discovery and enhancing user experience. + + + + + + +### Home Furnishings Industry + + Home decor businesses offer a vast selection of furnishings and decorative items, allowing customers to create their dream living spaces with just a few clicks. + + _Acme Decor_ sells premium quality and affordable home furnishing products online. They want the products to reach every house in India. + + To make the buying process smooth, safe, and seamless for their customers, Acme uses Magic Checkout. + + + + One-Click Checkout + + Magic Checkout provides a one-click checkout experience, allowing shoppers to complete their purchases quickly. It successfully lowered Acme Decor's cart abandonment rate and increased the conversion rate. + + + +### Enhance Brand Loyalty + + Razorpay is a trusted checkout partner and helps build a positive brand image. Our Razorpay Trusted Business badge program helps ecommerce and D2C businesses build trust and boost checkout conversion rates. + + + +### Order Insights + + Magic Checkout empowers Acme with order insights for informed decisions, revenue analysis, and payment optimisation. Acme Decor measures campaign effectiveness and enhances business performance by tracking UTM parameters and product performance. + + + +### Payment Offers and Coupon Allowlisting + + Acme Decor drives higher conversions by rewarding prepaid methods during checkout, motivating customers to opt for prepaid over COD, and reducing RTO orders. Moreover, it helps Acme Decor present coupons on the modal, streamlining the coupon process and increasing user satisfaction. + + + + + + +### Consumer Electronics Industry + + The electronics industry shapes our modern lives, producing innovative gadgets and cutting-edge technology worldwide. + + _Acme Digital_ built an ecommerce platform specialising in selling mobile accessories to cater to the growing need for mobile phone accessories. + + To place orders faster and integrate with a checkout solution that is fast and secure, Acme uses Magic Checkout. + + + + Faster Checkout Experience + + Magic Checkout streamlines the process by auto-filling delivery and payment details from previous Magic Checkout network store purchases, enabling customers to checkout 5x faster and enjoy a familiar shopping experience. + + + +### RTO Intelligence, Protection and Analytics + + Magic Checkout lowered Acme's RTO rate, boosting revenue. Smart COD and RTO protection drove sales growth with COD payments and risk identification. Magic's RTO analytics provided valuable insights for enhanced business performance. + + + +### Maximise Customer Commitment + + Magic Checkout helps Acme reduce return rates by motivating customers in India to choose prepaid orders. By offering discounts or incentives through a WhatsApp conversion link post-order placement, Acme Digital enhances customer commitment and minimises returns. + + + +### Order Insights + + Magic Checkout's Order Analytics Dashboard helps Acme Digital gains insights for informed choices, revenue analysis, and payment optimisation. Monitoring UTM parameters and product performance helps measure campaign effectiveness, boosting business performance. + + + +### Elevate Sales + + Acme Digital leverages payment offers to boost sales, reduce cart abandonment, and promote prepaid transactions over COD, resulting in decreased return rates. Magic Checkout also helps showcase coupons on the modal, streamlines coupon discovery and enhances user experience. diff --git a/llm-content/payments/magic-checkout/web.md b/llm-content/payments/magic-checkout/web.md new file mode 100644 index 00000000..129d7c23 --- /dev/null +++ b/llm-content/payments/magic-checkout/web.md @@ -0,0 +1,2182 @@ +--- +title: Integrate Razorpay Magic Checkout on Website +heading: Integrate Magic Checkout on Website +description: Steps to integrate Magic Checkout on your Website. +--- + +# Integrate Magic Checkout on Website + +Follow these steps to integrate the Razorpay Magic Checkout on your website. + +#### Prerequisites + +- [Create a Razorpay account](https://dashboard.razorpay.com/). +- Generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +## Integration Steps + +Follow the steps given below: + + +### 1.1 Enable/Disable Magic Checkout and Cash on Delivery + + + + Raise a request with your Razorpay SPOC to get this feature enabled on your account. + Once this feature is enabled, the customer address saving and coupon features are enabled. + + + Raise a request with our [Support team](https://razorpay.com/support/) to enable this feature for your account. + + + + + +### 1.2 Create Promotions and Shipping Info API Endpoints + + Follow the steps given below to create promotions and shipping info API endpoints: + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure that the URLs are publicly accessible, require no authentication and are hosted on your server. +> + + + 1. Log in to the Dashboard and navigate to **Magic Checkout**. + 2. In the **Platform Setup**, select **Custom E-Commerce Platform** from the drop-down list and click **Next**. + ![Choose custom platform](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-custom-platform.jpg.md) + 3. In the **Setup & Settings** section, click **Checkout Settings**. + 4. In the **Coupon Settings** section, enter the following: + 1. **URL for get promotions**: The API URL should return a list of promotions applicable to the specified order_id and customer. Magic Checkout uses this endpoint to fetch these promotions from your server and display them to your customers in the checkout modal. + 2. **URL for apply promotions**: The API URL validates the promotion code applied by the customer and should return the discount amount. Magic Checkout uses this endpoint to apply promotions via your server. + 5. Click **Save settings**. + ![Add promotion URLs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-web-promo-url.jpg.md) + 6. Navigate to **Shipping Setup**. + 7. Select **API** as the Shipping Service type from the drop-down list. + 8. Enter the **URL for shipping info**. The API URL should return shipping serviceability, COD serviceability, shipping fees and COD fees for a given list of customer addresses. Magic Checkout uses this endpoint to retrieve shipping information from your server. + 9. Click **Save Settings**. + ![Add shipping URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-web-shipping-url.jpg.md) + + + +### 1.3 Create an Order + + You can create an order using the following API and send the additional information required for Magic Checkout. Pass the `order_id` received in response to the checkout code. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + // ... other line item details + } + ] +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 50000); +orderRequest.put("currency", "INR"); +orderRequest.put("receipt", "receipt#1"); +orderRequest.put("line_items_total", 50000); // Mandatory for Magic Checkout + +JSONArray lineItems = new JSONArray(); +JSONObject item = new JSONObject(); +item.put("sku", "1g234"); +item.put("variant_id", "12r34"); +item.put("price", 50000); +item.put("offer_price", 50000); +item.put("quantity", 1); +item.put("name", "Product Name"); +// ... other line item details +lineItems.put(item); +orderRequest.put("line_items", lineItems); + +Order order = razorpay.orders.create(orderRequest); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, # Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + # ... other line item details + } + ] +} + +client.order.create(data) +```go: Go +import ( + razorpay "github.com/razorpay/razorpay-go" +) + +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": []interface{}{ + map[string]interface{}{ + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name", + // ... other line item details + }, + }, +} + +body, err := client.Order.Create(para_attr, nil) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array( + 'amount' => 50000, + 'currency' => 'INR', + 'receipt' => 'receipt#1', + 'line_items_total' => 50000, // Mandatory for Magic Checkout + 'line_items' => array( + 0 => array( + 'sku' => '1g234', + 'variant_id' => '12r34', + 'price' => 50000, + 'offer_price' => 50000, + 'quantity' => 1, + 'name' => 'Product Name', + // ... other line item details + ), + ), +)); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, # Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + # ... other line item details + } + ] +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ + key_id: 'YOUR_KEY_ID', + key_secret: 'YOUR_SECRET' +}) + +var data = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "line_items_total": 50000, // Mandatory for Magic Checkout + "line_items": [ + { + "sku": "1g234", + "variant_id": "12r34", + "price": 50000, + "offer_price": 50000, + "quantity": 1, + "name": "Product Name" + // ... other line item details + } + ] +} + +instance.orders.create(data); +```csharp: .Net +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +orderRequest.Add("line_items_total", 50000); // Mandatory for Magic Checkout + +List lineItem = new List(); +Dictionary lineItems = new Dictionary(); +lineItems.Add("sku", "1g234"); +lineItems.Add("variant_id", "12r34"); +lineItems.Add("price", 50000); +lineItems.Add("offer_price", 50000); +lineItems.Add("quantity", 1); +lineItems.Add("name", "Product Name"); +// ... other line item details +lineItem.Add(lineItems); +orderRequest.Add("line_items", lineItem); + +Order order = client.Order.Create(orderRequest); +``` +```json: Response +{ + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071, + "line_items_total": 50000 +} +``` + + + Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Default is `INR`. Length must be of 3 characters. + +`receipt` _mandatory_ +: `string` Your receipt id for this order should be passed here. Maximum length of 40 characters. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`line_items_total` _mandatory_ +: `integer` Total of `offer_price` for all line items added to the cart, in paise. For example, if a shoe worth ₹8,000 and a shirt worth ₹10,000 are added, the `line_item_total` will be `1800000`. This amount is post-tax. + + +> **WARN** +> +> +> **Watch Out!** +> +> To ensure the order is considered as a Magic Checkout order, you must pass this parameter. Otherwise, it will default to Standard Checkout order and customers will view the Standard Checkout UI instead of Magic Checkout. Know more about [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). +> + +`line_items` _mandatory_ +: `array` This will have the details about the specific items added to the cart. + + `sku` _mandatory_ + : `string` Unique product id defined by you. It can be alphanumeric. + + `variant_id` _mandatory_ + : `string` Unique variant id defined by you. It can be alphanumeric. + + `price` _mandatory_ + : `integer` Price of the product in paise. + + `offer_price` _mandatory_ + : `integer` Final price charged to the customer in paise, after applying any adjustments, such as product discounts. + + +> **INFO** +> +> +> **Handy Tips** +> +> If no discount is applied, `price` and `offer_price` will be the same. +> + + `quantity` _mandatory_ + : `integer` Number of units added in the cart. + + `name` _mandatory_ + : `string` Name of the product. + + `description` _mandatory_ + : `string` Description of the product. + + `weight` _optional_ + : `integer` Weight of the product in grams. + + `dimensions` _optional_ + : `object` The dimensions of the product. + + `length` _optional_ + : `string` The length of the product in centimeters. + + `width` _optional_ + : `string` The width of the product in centimeters. + + `height` _optional_ + : `string` The height of the product in centimeters. + + `image_url` _mandatory_ + : `string` The URL of the product image. This parameter is mandatory if you want to display product images on our iframe. + + `product_url` _optional_ + : `string` URL of the product's listing page. + + `notes` _optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is 299, then pass `29900` in this field. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + +`line_items_total` +: `integer` Total of `offer_price` for all line items added to the cart, in paise. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + +### Pre-discount Handling + + Line items total should equal the sum of individual item prices after your discounts are applied. When applying discounts, reduce both `amount` and `line_items_total` by the same amount: + ```json: Example + { + "amount": 45000, // ₹500 - ₹50 discount = ₹450 + "line_items_total": 45000, // Must match the discounted amount + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "prediscount_applied": "5000" // Track discount in paise + }, + "line_items": [ + // ... your line items with original prices + ] + } + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> Magic Checkout automatically handles all discount calculations on the UI. The system detects differences in checkout amounts and adjusts accordingly. +> + + + + + + +### 1.4 Interact with Shipping Info API + + This API should return shipping serviceability, COD serviceability, shipping fees and COD fees for a given list of customer addresses. + + /your-server-url/shipping-info-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // This is the receipt field set in the Razorpay order + "razorpay_order_id": "EKwxwAgItmXXXX", // This is the RZP order created without the `order_` prefix + "email": "", // Email field will be set if the customer enters an email + "contact": "+919000090000", // Customer phone number with country code + "addresses": [{ + "id": "0", + "zipcode": "560060", + "state_code": "KA", + "country": "IN" + }] + } + + ```json: Response + { + "addresses": [ + { + "id": "0", + "zipcode": "560000", + "state_code": "KA", + "country": "IN", + "shipping_methods": [ + { + "id": "1", + "description": "Free shipping", + "name": "Delivery within 5 days", + "serviceable": true, + "shipping_fee": 1000, // in paise. Here 1000 = 1000 paise, which equals to ₹10 + "cod": true, + "cod_fee": 1000 // in paise. Here 1000 = 1000 paise, which equals to ₹10 + }, + { + "id": "2", + "description": "Standard Delivery", + "name": "Delivered on the same day", + "serviceable": true, + "shipping_fee": 1000, // in paise. Here 1000 = 1000 paise, which equals to ₹10 + "cod": false, + "cod_fee": 0 // in paise. Here 1000 = 1000 paise, which equals to ₹10 + } + ] + } + ] + } + ``` + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#13-create-an-order). + +`razorpay_order_id` _mandatory_ +: `string` Unique identifier for the order returned by Checkout. + +`email` _optional_ +: `string` Customer's email address. + +`contact` _mandatory_ +: `string` Customer's phone number. + +`addresses` _mandatory_ +: `array` Customer's address details. + + `id` _mandatory_ + : `string` Unique identifier of the customer's address. + + `zipcode` _mandatory_ + : `string` Customer's zipcode. + + `state_code` _optional_ + : `string` The code of the state where the customer resides. + + `country` _mandatory_ + : `string` Country where the customer resides. The length cannot exceed 2 characters. + + + +### Response Parameters + +`addresses` _mandatory_ +: `array` Customer's address details. + + `id` _mandatory_ + : `string` Unique identifier of the customer's address. + + `zipcode` _mandatory_ + : `string` Customer's zipcode. + + `country` _mandatory_ + : `string` Country where the customer resides. The length cannot exceed 2 characters. + + `shipping_methods` _mandatory_ + : `array` Details regarding the shipping methods. + + `id` _mandatory_ + : `string` Unique identifier of the shipping method. + + `description` + : `integer` Brief description of the shipping method. + + `name` _mandatory_ + : `string` Name of the shipping method. + + `serviceable` _mandatory_ + : `boolean` Indicates whether you deliver orders to the zipcode entered by the customer. This is based on the zipcodes you have added in the serviceability setting on the Razorpay Dashboard. Possible values: + - `true`: Orders can be delivered to the added zipcodes. + - `false`: Orders cannot be delivered to the added zipcodes. + + `shipping_fee` _mandatory_ + : `integer` Shipping charge in paise applicable to be paid by the customer. + + `cod` _mandatory_ + : `boolean` Indicates whether you support cash on delivery on this order. + - `true`: COD payment method is supported. + - `false`: COD payment method is not supported. + + `cod_fee` _mandatory_ : `integer` Cash on Delivery fee charged in paise. This amount is based on the COD settings configured in your Razorpay Dashboard. + + +> **INFO** +> +> +> **Handy Tips** +> +> If the `cod` field is false, set the `cod_fee` field to 0. +> + + + + + + + + +### 1.5 Interact with Get Promotions API + + This API should return the list of promotions applicable for the given `order_id` and customer. + + /your-server-url/create-promotions-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // this is the receipt field set in Razorpay order + "contact": "+919000090000", + "email": "" + } + ```json: Response + { + "promotions": [ + { + "code": "10%OFF", + "summary": "10% off on total cart value", + "description": "10% on total cart value upto ₹300" + }, + { + "code": "500OFF", + "summary": "₹500 off on total cart value", + "description": "₹500 off on a minimum cart value of ₹1500" + } + ] + } + ``` + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#13-create-an-order). + +`contact` _optional_ +: `string` Customer's phone number. + +`email` _optional_ +: `string` Customer's email address. + + + +### Response Parameters + +`promotions` _mandatory_ +: `array` Details of the promotions created. + + `code` _mandatory_ + : `string` Unique identifier of the promotion. + + `summary` _mandatory_ + : `string` Summary about the promotion. For example, 10% off on total cart value. + + `description` _optional_ + : `string` Brief description of the promotion. For example, 10% on total cart value upto ₹300. + + + +### 1.5.1 Interact with Apply Promotions API + + This API should validate the promotion code applied by the customer and return the discount amount. + + /your-server-url/create-promotions-api-path + + ```curl: Request + { + "order_id": "SomeReceiptValue", // this is the receipt field set in Razorpay order + "contact": "+919000090000", + "email": "", + "code": "500OFF" + } + + ```json: Success Response + { + "promotion": { + "reference_id": "3rvff", + "type": "offer", + "code": "500OFF", + "value": 50000, + "value_type": "fixed_amount", + "description": "New Year Sale Offer" + } + } + ```json: Failure Response + { + "failure_code": "LOGIN_REQUIRED", + "failure_reason": “promotion Code has expired" + } + ``` + + + + Request Parameters + +`order_id` _mandatory_ +: `string` Unique identifier of the order created [previously](#13-create-an-order). + +`contact` _optional_ +: `string` Customer's phone number. + +`email` _optional_ +: `string` Customer's email address. + +`code` _mandatory_ +: `string` Promotion code used to avail discount on checkout. + + + +### Response Parameters + +`promotion` _mandatory_ +: `object` Used to pass all offer or discount-related information, including promotion code discount, method discount and so on. + + `reference_id` _mandatory_ + : `string` Identifier of the offer you create. + + `code` _optional_ + : `string` Promotion code used to avail discount on checkout. + + `type` _optional_ + : `string` Type of offer. Possible values: + - `coupon`: A discount applied by customers during checkout. For example, customers can use a coupon like `Diwali Sale 500 Off` to get ₹500 off the total cart value. + - `offer`: A promotion you create for your customers. For example, you create an offer `Buy 4 t-shirts and get 2 free`. In this case, when customers add 4 t-shirts to their cart, the 2 additional t-shirts will be automatically added for free. + + `value` _optional_ + : `integer` The offer value that needs to be applied in paise. For example, if you want to offer a discount of ₹500, enter 50000. + + `value_type` _optional_ + : `string` The type of value like: + - `fixed_amount`: A fixed amount discount value in the currency of the order. For example, ₹500. + - `percentage`: A percentage discount value. For example, 10%. + - `BXGY`: Buy X and Get Y. For example, if you buy 2 t-shirts, you a get a cap for free or at a discounted value. + + +> **INFO** +> +> +> **Handy Tips** +> +> Regardless of the `value_type`, the amount specified in the `value` parameter is applied as-is. For example, if `value_type` is percentage and the `value` is 5000, 5000 is considered in currency subunits (paise). +> + + + `description` _optional_ + : `string` Description of the promotion applied. For example, `New Year Sale Offer`. + + + +### Error Code, Description and Next Steps + + + Code | Description | Next Steps + --- + INVALID_PROMOTION | The specified promotion code is not recognised or does not exist in the system. | Please verify the code and try again. + --- + LOGIN_REQUIRED | This coupon is specifically assigned to a registered customer. | To redeem it, the customer must log in to their account and authenticate their identity. + --- + REQUIREMENT_NOT_MET | The current cart conditions do not meet the requirements for this promotion to be valid. For example, the promotion may require a minimum cart value of ₹1,000, but the cart total is ₹800. | Review the promotion's terms and adjust the cart contents accordingly. + + + + + + + + + + +### 1.6 Integrate with Magic Checkout on Client-Side + + Add the Pay button on your web page using the handler function or callback URL. + + +> **INFO** +> +> +> **Handy Tips** +> +> If your website is running on WooCommerce or Shopify, please integrate with the Razorpay [WooCommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md) or [Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/shopify.md) plugin based on your requirement. +> + + + + Advanced Checkout Features + + Before implementing the basic integration, understand these advanced features available in Magic Checkout: + + + + Pre-discount Implementation + + Display custom discounts (coupons, gift cards, loyalty points) in the checkout order summary before customers enter the checkout flow: + + For example, customer adds items to cart: + - T-shirt: ₹499 + - Applies gift card (discount): ₹49 + - Final amount: ₹450 + + You can follow the steps given below: + 1. Create an order with amount 45000 (₹450 in paise). + 2. Add pre-discount in checkout with the following + - `label`: Gift Card (5AA3Y-E9TZE-82EGJ) + - `value`: ₹49. + 3. Customer views the discount applied in the checkout and pays ₹450. + + ![View pre-discount on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-web-pre-discount-checkout.jpg.md) + + ```javascript + "prefill": { + "prediscount": [ + { + "label": "Gift Card (5AA3Y-E9TZE-82EGJ)", + "value": "₹49", + "gift_card_applied": true // Required for gift cards + } + ] + } + ``` + + +> **WARN** +> +> +> **Watch Out!** +> +> Pre-discounts are for display only and do not affect the payment amount. +> +> - No calculations are required. Magic Checkout handles everything automatically. +> - Payment amount is determined by your Razorpay order, not these display values. +> - Pre-discounts show existing discounts only and do not apply new ones. +> + + #### Discount Types + + + + Use for coupons, promotional codes, loyalty points: + ```javascript + { + "label": "WELCOME20", + "value": "₹ 200" + } + ``` + + + You must include `gift_card_applied: true` for proper tracking and UI display: + ```javascript + { + "label": "Gift Card (5AA3Y-E9TZE-82EGJ)", + "value": "₹ 49", + "gift_card_applied": true // Critical for gift cards + } + ``` + + + + + +### Promotional Tags + + Add promotional badges to specific products: + ```javascript + "prefill": { + "promotional_tag": [ + { + "tag": "free gift item", + "variant_id": "1234" + } + ] + } + ``` + + Below is an example of a promotional tag: + + ![Checkout promotion tag](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-web-promotion-tag1.jpg.md) + + + + + + + + +### 1.6.1 Handler Function and Callback URL + + + **Callback URL** | **Handler Function** + --- + When you use this: - On successful payment, the customer is redirected to the specified URL, for example, a payment success page. +- On failure, the customer is asked to retry the payment. + | When you use this: - On successful payment, the customer is shown your web page. +- On failure, the customer is notified of the failure and asked to retry the payment. + + + + + +### 1.6.2 Code to Add Pay Button + + Copy-paste the parameters as `options` in your code: + ```html: Callback URL (JS) Checkout Code + Pay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "one_click_checkout": true, + "name": "Acme Corp", // your business name + "order_id": "order_EKwxwAgItmXXXX", // This is a sample Order ID. Pass the `id` obtained in the response of Step 1; mandatory + "show_coupons": true, // default true; false if coupon widget should be hidden + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "redirect": "true", + "prefill": { // We recommend using the prefill parameter to auto-fill customer's contact information especially their phone number + "name": "", // your customer's name + "email": "", + "contact": "9000090000", // Provide the customer's phone number for better conversion rates + "coupon_code": "500OFF" // any valid coupon code that gets auto-applied once magic opens + }, + "notes": { + "address": "ABC Office" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ```html: Handler Functions (JS) Checkout Code + Pay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "one_click_checkout": true, + "name": "Acme Corp", // your business name + "order_id": "order_EKwxwAgItmXXXX", // This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "show_coupons": true, // default true; false if coupon widget should be hidden + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { // We recommend using the prefill parameter to auto-fill customer's contact information, especially their phone number + "name": "", // your customer's name + "email": "", + "contact": "9000090000" // Provide the customer's phone number for better conversion rates + }, + "notes": { + "address": "ABC Office" + } + }; + var rzp1 = new Razorpay(options); + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + }); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ``` + + + +### Checkout Options + + `key` _mandatory_ +: `string` API Key id generated from the Razorpay Dashboard. + +`one_click_checkout` _mandatory_ +: `boolean` Specifies whether to initiate Magic Checkout or Standard Checkout. Possible values: + - `true`: Initiates Magic Checkout. + - `false` (default): Initiates Standard Checkout. + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`order_id` _mandatory_ +: `string` Order id generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`show_coupons` _optional_ +: `boolean` Determines whether to show the coupons to customer on the checkout. Possible values: + - `true` (default): Enables the Coupon feature. + - `false`: Disables the Coupon feature. + +`prefill` _optional_ +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer's phone number in the `contact` parameter of the JSON request's `prefill` object. (Format: +(country code)(phone number). Example: "contact": "+919000090000"). +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + + `name` _optional_ + : `string` Cardholder's name to be pre-filled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `coupon_code` _optional_ + : `string` Automatically applies relevant coupon as soon as the checkout modal opens. + + `prediscount` _optional_ + : `array` Custom discounts to display in the checkout order summary. Use this to show applied coupons, gift cards or loyalty points before the customer completes payment. + + `label` _mandatory_ + : `string` Display name for the discount (for example: `WELCOME20`, `Gift Card (ABC123-XYZ789)`). Labels exceeding character limits will be trimmed with `...`. + + `value` _mandatory_ + : `string` Discount amount with currency symbol in rupees format (for example: `₹200`). Must include currency symbol and be in rupees, not paise. + + `gift_card_applied` _optional_ + : `boolean` Set to `true` when the discount represents a gift card. This ensures proper UI display and tracking. Possible values: + - `true`: Discount is treated as a gift card with specialised UI display. + - `false` (default): Discount is treated as a regular coupon or promotional discount. + + `promotional_tag` _optional_ + : `array` Promotional badges to display on specific products in the checkout. + + `tag` _mandatory_ + : `string` Promotional text to display (maximum 15 characters). For examples: `free`, `bestseller`, `limited`. + + `variant_id` _mandatory_ + : `string` Product variant id where the promotional tag should be displayed. Must match the variant_id from your order line items. + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` _optional_ +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + +> **INFO** +> +> +> **Handy Tips** +> +> This is an on-demand feature. Please raise a request with your SPOC or our [Support team](https://razorpay.com/support/#request) to get it activated on your Razorpay account. +> + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` _optional_ +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout and abandonment analytics. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user without completing payment. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted (also known as whitelisted). + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + + +`readonly` _optional_ +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read Razorpay OTPs for login. Applicable from Android SDK version 1.6.34 and above. Possible values: + - `true` (default): OTP is auto-read. + - `false`: OTP is not auto-read. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` _optional_ + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` _optional_ + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. + + `display` _optional_ + : `object` Child parameter that enables configuration of checkout display language. + + `language` _optional_ + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + + + + + +### 1.7 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + Here are the links to our [SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md#github-and-documentation-links-for-sdks) for the supported platforms. + + + +### 1.8 Verify Payment Status + + Verify the payment status using the APIs and webhooks. + + + You can fetch the payment details using the [Fetch Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md). + + The different payment states are given below: + + + Payment State | Description + --- + `created` | When the customer starts the payment. + --- + `pending` | When the customer finally places the order. + --- + `authorized` | The payment moves to the failed state if money is not captured within 45 days. It moves to the captured state when you confirm that the money is received. + --- + `captured` | When you receive the money. + --- + `refunded` | When the refund request is initiated. + --- + `failed` | When the payment is failed. + + + + You should [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) on the Razorpay Dashboard to receive notifications when certain events occur. + + #### Orders Events + + We recommend you to subscribe to these orders events: + + + Webhook Event | Description + --- + **order.created** | Triggered when an order is successfully created. + --- + **order.placed** | Triggered when a COD order is successfully placed. + --- + **order.paid** | Triggered when a prepaid order has been successfully completed. + --- + **order.expired** | Triggered when an order has expired. + + + #### Payments Events + + We recommend you to subscribe to these payments events: + + + Webhook Event | Description + --- + **payment.pending** | Triggered when a COD payment is moved to pending state. + --- + **payment.captured** | Triggered when a payment is successfully captured. + --- + **payment.failed** | Triggered when a payment fails. + + + #### Fulfillment Events + + We recommend you to subscribe to these fulfillment events: + + + Webhook Event | Description + --- + **fulfillment.to_be_shipped** | Triggered when the business needs to act on the order + --- + **fulfillment.ready_to_ship** | Triggered when the order needs to be picked by the logistics partner. + --- + **fulfillment.in_transit** | Triggered when the order is picked by the logistics partner. + --- + **fulfillment.rto** | Triggered when the order is returned to origin because of customer unavailability or decline. + --- + **fulfillment.delivered** | Triggered when the order is delivered. + --- + **fulfillment.customer_refunded** | Triggered when the order is picked for return as part of the refund. + + + + + + +### 1.9 Perform Post Payment Processing + + Based on the response, you can handle post-payment processing on your end. + +> **WARN** +> +> +> **Timeout Handling** +> +> If no API call is made within 45 seconds, our background job will assume there is a network drop off and will proceed to place the order on Shopify automatically. +> + + + Fetch an Order + + Use the Fetch Orders API to retrieve order details, including customer information, address, shipping method and promotions of a particular order: + + v1/orders/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ + -X GET https://api.razorpay.com/v1/orders/order_R1yDkxyIuKXXXX \ + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + import com.razorpay.Order; + import com.razorpay.RazorpayClient; + import com.razorpay.RazorpayException; + try { + Order order = razorpay.Orders.fetch(""); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + # do easy_install razorpay or + # pip install razorpay + + import razorpay + razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]")) + + order_id = + resp = client.order.fetch(order_id) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->fetch($orderId); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('key_id', 'key_secret') + + order = Razorpay::Order.fetch('order_R1yDkxyIuKXXXX') + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.fetch(orderId) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("", "") + + body, err := client.Order.Fetch("", nil, nil) + ``` + ```json: Response: COD Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 507000, + "amount_paid": 0, + "amount_due": 507000, + "currency": "INR", + "receipt": "#30567", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "placed", + "attempts": 0, + "notes": { + "cart_id": "hWN2Am4BGnQrizKE3hzeQaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/hf5Q?key=14bbbce35b8", + "shopify_order_id": "6302119854247" + }, + "created_at": 1756045901, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 5000, + "shipping_fee": 7000, + "customer_details": { + "contact": "+919100000000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + }, + "billing_address": { + "city": "Bengaluru", + "contact": "+919100000000", + "country": "in", + "line1": "Houseno:24", + "line2": "Andree Road, Bheemanna Garden, Shanti Nagar", + "name": "Gaurav Kumar", + "state": "KARNATAKA", + "tag": "Home", + "type": "shipping_address", + "zipcode": "560001" + } + }, + "line_items_total": 600000, + "tax_details": { + "total_tax": 4128, + "taxes_included": true + } + } + ```json: Response: Prepaid Orders + { + "id": "order_R1yDkxyIuKXXXX", + "entity": "order", + "amount": 100700, + "amount_paid": 100700, + "amount_due": 0, + "currency": "INR", + "receipt": "#30414", + "offers": [ + "offer_QXwkRH1bOvXXXX", + "offer_QXwoP07qnHXXXX", + "offer_QYrcJ29gBCXXXX", + "offer_QZDsVyMNzDXXXX", + "offer_QtfwFTZYkGXXXX", + "offer_Qtg3UsQyZaXXXX" + ], + "status": "paid", + "attempts": 1, + "notes": { + "cart_id": "hWN1TcwL?key=1a3a5a7c", + "storefront_id": "gid://shopify/Cart/hIkey=af7c7800", + "flits_cart_token": "hWcwL?key=1a3741dc_8740f5_175447", + "shopify_order_id": "6266036191399" + }, + "created_at": 1754466155, + "description": null, + "checkout": null, + "promotions": [ + { + "code": "orderOff", + "type": "cart_value", + "value": 10000, + "description": "order off", + "reference_id": "offer_ORnSr9d2eAXXXX" + } + ], + "cod_fee": 0, + "shipping_fee": 700, + "customer_details": { + "billing_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "billing_address", + "zipcode": "110057" + }, + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "shipping_address": { + "city": "South West Delhi", + "contact": "+919000090000", + "country": "in", + "id": "Qb3BljuFFoXXXX", + "line1": "12", + "line2": "Qutab Garh, Rama Krishna Puram", + "name": "Gaurav Kumar", + "state": "Delhi", + "tag": "Home", + "type": "shipping_address", + "zipcode": "110057" + } + }, + "line_items_total": 110000, + "tax_details": { + "total_tax": 0, + "taxes_included": true + } + } + ``` + + Know more about the [Orders API.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) + + +> **INFO** +> +> +> **Order Status** +> +> Check the order status for the following: +> +> - Prepaid orders: `paid`. +> - COD orders: `placed`. +> + + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the order to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the order. For example, `order_R1yDkxyIuKXXXX`. + +`entity` +: `string` Type of entity. Value is `order`. + +`amount` +: `integer` Total order amount in the smallest currency unit (paise). + +`amount_paid` +: `integer` Amount paid towards the order in paise. For prepaid orders, this shows the actual amount paid. For COD orders, this is `0` until payment is collected. + +`amount_due` +: `integer` Outstanding amount due in paise. For prepaid orders, this shows any remaining balance. For COD orders, this equals the `amount` field until payment is collected. + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`receipt` +: `string` Receipt identifier for internal reference. For example, `#30567`. + +`offers` +: `array` Array of offer IDs applied to the order. + +`status` +: `string` Current status of the order. Possible values: + - `placed`: Order placed but payment pending (COD orders). + - `paid`: Order placed and payment completed (prepaid orders). + - `cancelled`: Order cancelled. + - `refunded`: Order refunded. + +`attempts` +: `integer` Number of payment attempts made for this order. For example, `1`. + +`notes` +: `object` Custom notes added to the order containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `shopify_order_id` + : `string` Shopify order reference. + + `flits_cart_token` + : `string` Flits integration token (optional). + +`created_at` +: `integer` Unix timestamp indicating when the order was created. For example, `1756045901`. + +`description` +: `string|null` Order description. Returns `null` if no description is provided. + +`checkout` +: `string|null` Checkout identifier. Returns `null` if not applicable. + +`promotions` +: `array` Array of promotion objects applied to the order. + + `code` + : `string` Promotion code used. For example, `orderOff`. + + `type` + : `string` Type of promotion. For example, `cart_value`. + + `value` + : `integer` Discount value in paise. For example, `10000` for ₹100. + + `description` + : `string` Human-readable promotion description. + + `reference_id` + : `string` Internal reference for the promotion. + +`cod_fee` +: `integer` Cash on Delivery charges in paise. For COD orders, this contains the fee amount (for example, `5000` for ₹50). For prepaid orders, this is `0`. + +`shipping_fee` +: `integer` Shipping charges in paise. For example, `700` for ₹7. + +`customer_details` +: `object` Customer information. + + `contact` + : `string` Customer's phone number. + + `email` + : `string` Customer's email address. + + `shipping_address` + : `object` Complete shipping address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for delivery. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Recipient name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `shipping_address`. + + `zipcode` + : `string` Postal code. + + `billing_address` + : `object` Complete billing address information. + + `city` + : `string` City name. + + `contact` + : `string` Contact number for billing. + + `country` + : `string` Country code. For example, `in`. + + `id` + : `string` Address identifier (optional). + + `line1` + : `string` Address line 1. + + `line2` + : `string` Address line 2. + + `name` + : `string` Account holder name. + + `state` + : `string` State name. + + `tag` + : `string` Address tag. For example, `Home`. + + `type` + : `string` Address type. Value is `billing_address`. + + `zipcode` + : `string` Postal code. + +`line_items_total` +: `integer` Total value of line items in paise before adding shipping fees and COD fees, after applying promotions. For example, `60000` for ₹600. + +`tax_details` +: `object` Tax information. + + `total_tax` + : `integer` Total tax amount in paise. For example, `4128`. + + `taxes_included` + : `boolean` Indicates whether taxes are included in the item prices. Possible values: + - `true`: Taxes are included in item prices. + - `false`: Taxes are separate from item prices. + + + + + +### Fetch a Payment + + Use the Fetch Payments API to retrieve comprehensive payment details, including transaction status, payment method, customer information, settlement details, and the associated order information for a specific payment: + + v1/payments/:id + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X GET https://api.razorpay.com/v1/payments/pay_R1yFlWQar3XXXX + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String paymentId = "pay_R1yFlWQar3XXXX"; + + Payment payment = razorpay.payments.fetch(paymentId); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.payment.fetch(paymentId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + paymentId := "pay_R1yFlWQar3XXXX" + + body, err := client.Payment.Fetch(paymentId, nil, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->payment->fetch($paymentId); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + paymentId = "pay_R1yFlWQar3XXXX" + + Razorpay::Payment.fetch(paymentId) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.payments.fetch(paymentId) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + Payment payment = client.Payment.Fetch(paymentId); + ``` + + ```json: Response: COD Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 55700, + "currency": "INR", + "status": "pending", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "cod", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919100000000", + "notes": { + "cart_id": "hWN2QaXc?key=2b3cad31", + "storefront_id": "gid://shopify/Cart/h?key=14bbf59ce35b8" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1756046099, + "receiver_type": null + } + ```json: Response: Prepaid Orders + { + "id": "pay_R1yFlWQar3XXXX", + "entity": "payment", + "amount": 90630, + "currency": "INR", + "status": "captured", + "order_id": "order_R1yDkxyIuKXXXX", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": { + "cart_id": "hWNsVrcwL?key=1a3a457ddc", + "storefront_id": "gid://shopify/Cart/hWv3e8?key=af707", + "flits_cart_token": "hWrcwL?key=1a3a5a70f5_17547", + "optimizer_provider_name": "razorpay" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "727947422583", + "upi_transaction_id": "1F723677C679EF578A95" + }, + "created_at": 1754466271, + "receiver_type": null, + "upi": { + "vpa": "gaurav.kumar@exampleupi" + } + } + ``` + + Know more about the [Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md). + + + Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment to be retrieved. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the payment. For example, `pay_R1yFlWQar3XXXX`. + +`entity` +: `string` Type of entity. Value is `payment`. + +`amount` +: `integer` Payment amount in the smallest currency unit (paise). For COD payments, this includes the COD fee (for example, `55700` for ₹557). For prepaid payments, this equals the captured amount (for example, `90630` for ₹906.30). + +`currency` +: `string` The 3-letter ISO currency code. For example, `INR`. + +`status` +: `string` Current status of the payment. Possible values: + - `pending`: Payment pending collection (COD orders). + - `captured`: Payment successfully captured (prepaid orders). + - `authorized`: Payment authorized but not captured. + - `failed`: Payment attempt failed. + +`order_id` +: `string` Unique identifier of the associated order. For example, `order_R1yDkxyIuKXXXX`. + +`invoice_id` +: `string|null` Unique identifier of the associated invoice. Returns `null` if no invoice is linked. + +`international` +: `boolean` Indicates whether this is an international payment. Possible values: + - `true`: International payment. + - `false`: Domestic payment. + +`method` +: `string` Payment method used. Possible values include: + - `cod` + - `upi` + - `card` + - `netbanking` + - `wallet` + +`amount_refunded` +: `integer` Amount refunded in paise. For example, `0` indicates no refund has been processed. + +`refund_status` +: `string|null` Current refund status. Returns `null` if no refund is applicable. Possible values: + - `partial`: Partial refund processed. + - `full`: Full refund processed. + +`captured` +: `boolean` Indicates whether the payment has been captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string|null` Payment description. Returns `null` if no description is provided. + +`card_id` +: `string|null` Unique identifier of the card used for payment. Returns `null` for non-card payments. + +`bank` +: `string|null` Bank identifier for netbanking payments. Returns `null` for other payment methods. + +`wallet` +: `string|null` Wallet provider identifier. Returns `null` for non-wallet payments. + +`vpa` +: `string|null` Virtual Payment Address for UPI payments. For example, `gaurav.kumar@exampleupi`. Returns `null` for non-UPI payments. + +`email` +: `string` Customer's email address. + +`contact` +: `string` Customer's phone number. + +`notes` +: `object` Custom notes added to the payment containing integration-specific data. + + `cart_id` + : `string` Shopping cart identifier. + + `storefront_id` + : `string` Storefront system identifier. + + `flits_cart_token` + : `string` Flits integration token (optional). + + `optimizer_provider_name` + : `string` Payment optimizer provider name (optional). + +`fee` +: `integer|null` Processing fee charged in paise. For example, `0` indicates no fee. Returns `null` for COD payments. + +`tax` +: `integer|null` Tax amount on processing fee in paise. For example, `0` indicates no tax. Returns `null` for COD payments. + +`error_code` +: `string|null` Error code if payment failed. Returns `null` for successful payments. + +`error_description` +: `string|null` Human-readable error description. Returns `null` for successful payments. + +`error_source` +: `string|null` Source of the error. Returns `null` for successful payments. + +`error_step` +: `string|null` Step at which error occurred. Returns `null` for successful payments. + +`error_reason` +: `string|null` Reason for the error. Returns `null` for successful payments. + +`acquirer_data` +: `object` Data from the payment acquirer. + + `rrn` + : `string` Retrieval Reference Number from the acquirer (optional). + + `upi_transaction_id` + : `string` UPI transaction identifier from the acquirer (optional). + +`created_at` +: `integer` Unix timestamp indicating when the payment was created. For example, `1756046099`. + +`receiver_type` +: `string|null` Type of receiver for the payment. Returns `null` if not applicable. + +`upi` +: `object` UPI-specific payment details (only present for UPI payments). + + `vpa` + : `string` Virtual Payment Address used for the UPI payment. + + + + + + + + + +### 1.10 Analytics Integration (Advanced Feature) + + Track customer journey events to understand customer behavior and optimise conversion rates. + + Magic Checkout provides detailed analytics events that help you analyse the checkout funnel and identify optimisation opportunities. + + ```javascript + // Use the same Razorpay instance for analytics + var rzp1 = new Razorpay(options); + + // Register analytics event listener + rzp1.on('mx-analytics', function(data) { + if (data && data.event) { + console.log('Analytics Event:', data.event, data); + + // Send to your analytics platform + sendToAnalytics(data); + } + }); + + function sendToAnalytics(eventData) { + // Example: Send to Google Analytics + if (typeof gtag !== 'undefined') { + gtag('event', eventData.event, { + 'event_category': 'Magic Checkout', + 'event_label': eventData.paymentMode, + 'value': eventData.latestTotal + }); + } + + // Example: Send to your custom analytics + fetch('/analytics-endpoint', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(eventData) + }); + } + ``` + + #### Events + + + Event | Description | Triggered + --- + `initiate` | Checkout started | Customer opens checkout modal + --- + `otp_initiated` | Phone verification | Customer enters phone number + --- + `payment_initiated` | Payment attempt | Customer clicks pay button + --- + `checkout_abandoned` | Checkout closed | Customer exits without paying + --- + `coupon_applied` | Discount applied | Valid coupon code used + --- + `payment_failed` | Payment unsuccessful | Payment attempt fails + + + Use these examples to implement event tracking and purchase analytics: + + + Track checkout journey events as they occur: + + ```javascript + rzp1.on('mx-analytics', function(data) { + switch(data.event) { + case 'initiate': + console.log('Checkout opened for amount:', data.totalAmount); + break; + + case 'payment_initiated': + console.log('Payment started via:', data.paymentMethod); + break; + + case 'payment_failed': + console.log('Payment failed for order:', data.totalAmount); + // Show retry message or track failure reasons + break; + + case 'checkout_abandoned': + console.log('Customer left after:', data.time_since_open, 'milliseconds'); + // Track abandonment funnel for optimisation + break; + + case 'coupon_applied': + console.log('Coupon applied:', data.couponCode, 'Discount:', data.couponDiscountValue); + break; + } + }); + ``` + + + Track successful payment completion in your handler function: + + ```javascript + "handler": function(response) { + // Payment successful + console.log('Purchase completed:', response); + + // Track purchase event + sendToAnalytics({ + event: 'purchase', + payment_id: response.razorpay_payment_id, + order_id: response.razorpay_order_id, + amount: /* your order amount */, + currency: 'INR' + }); + + // Redirect to success page + window.location.href = '/payment-success?payment_id=' + response.razorpay_payment_id; + } + ``` + + + + +## Go-Live Best Practices + +Before going live, make sure to check the following: + +- If you configured the above settings in Test Mode, ensure you replicate them in Live Mode. +- Ensure you use API keys generated in Live Mode. +- If you have multiple Razorpay accounts, ensure you use the Live key from the correct account you intend to go live with. + +### Related Information +[Troubleshoot and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#web) diff --git a/llm-content/payments/magic-checkout/web/analytics-event-reference.md b/llm-content/payments/magic-checkout/web/analytics-event-reference.md new file mode 100644 index 00000000..b09f508c --- /dev/null +++ b/llm-content/payments/magic-checkout/web/analytics-event-reference.md @@ -0,0 +1,721 @@ +--- +title: Magic Checkout Analytics Event Reference +description: Complete reference for Magic Checkout analytics events, payload schemas and field definitions. +--- + +# Magic Checkout Analytics Event Reference + +This page is a technical reference for all Magic Checkout analytics events. For setup instructions, see the [Magic Checkout Analytics Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/web/analytics-integration.md) guide. + +## Common Payload Fields + +Every `mx-analytics` event payload contains the following base fields. Event-specific additional fields are documented under each event in the [Event Reference](#event-reference). + + +### List of fields + +`event` +: `string` The event name (for example, `"initiate"`, `"payment_initiated"`). + +`paymentMode` +: `string` Payment mode. Currently it is always `"online"`. + +`lineItems` +: `LineItem[]` Cart items at the time the event fired. See [LineItem Schema](#lineitem-schema). + +`totalAmount` +: `number` Original cart total in paise (before shipping or discounts). + +`latestTotal` +: `number` Current order total in paise, reflecting any applied discounts and shipping. + +`shippingAmount` _optional_ +: `number` Shipping cost in paise. Undefined if not yet calculated. + +`couponDiscountValue` +: `number` Discount applied by an active coupon in paise. 0 if no coupon is active. + +`isScriptCouponApplied` +: `boolean` Whether an automatic/script-based discount is applied. + +`currency` +: `string` Transaction currency code (for example, `"INR"`). + +`phone` +: `string` Customer's phone number. Empty string if not yet available. + +`email` +: `string` Customer's email address. Empty string if not yet available. + +`first_name` +: `string` Customer's first name. Empty string if not yet available. + +`last_name` +: `string` Customer's last name. Empty string if not yet available. + +`state` +: `string` Customer's state. Empty string if address not yet selected. + +`city` +: `string` Customer's city. Empty string if address not yet selected. + + +> **INFO** +> +> +> **Important Payload Information** +> +> - **Field Naming Conventions**: Payloads use mixed casing based on their source. Amount and mode fields (for example, `latestTotal`, `paymentMode`) use **camelCase** as they originate from JavaScript. Customer identity and address fields (for example, `first_name`, `state_code`) use **snake_case** as they originate from backend API responses. +> +> - **Currency Format**: All amounts are represented in paise (integers). To get the value in Rupees, divide by 100 (for example, 49900 = ₹499.00). +> +> - **Progressive Data Population**: Customer fields are populated in stages. `phone` and `email` appear after contact entry. However, `first_name`, `last_name`, `state` and `city` remain empty strings until the `address_info_submitted` event fires. +> +> - After `address_info_submitted` fires, additional fields —`state_code`, `country_name`, `zipcode`, `line1` and `line2`— become available in all subsequent payloads. +> +> - The `country_name` field actually contains a 2-letter country code (for example, "in") rather than the full name of the country. +> + +## LineItem Schema + +Each object in the `lineItems` array reflects what was passed in `line_items` when creating the order. All fields are optional as not every integration populates every field. + + +### List of Fields + +`name` _optional_ +: `string` Product name. + +`description` _optional_ +: `string` Product description. May be an empty string. + +`image_url` _optional_ +: `string | null` Product image URL. + +`price` _optional_ +: `number` Original price in paise. + +`offer_price` _optional_ +: `number` Effective/offer price in paise. + +`quantity` _optional_ +: `number` Quantity in cart. + +`tax_amount` _optional_ +: `number` Tax amount in paise. + +`variant_id` _optional_ +: `string` Product variant identifier. + +`sku` _optional_ +: `string` Product SKU. + +`title` _optional_ +: `string` Alternate product name (used by some integrations). + +`id` _optional_ +: `string | number` Generic product/item identifier. + +`product_id` _optional_ +: `string | number` Product identifier. + +`discount` _optional_ +: `number` Discount amount in paise. + +`product_url` _optional_ +: `string` Relative URL to the product page. + +`brand` _optional_ +: `string` Product brand. + +`vendor` _optional_ +: `string` Product vendor. + + +## Address Schema + +The `address` object is present in `address_selected` and `address_added` events. + + +### Fields for address_selected (saved address) + +`id` +: `string` Unique address identifier. + +`entity_id` +: `string` Internal Razorpay identifier. + +`entity_type` +: `string` Internal Razorpay identifier. + +`type` +: `string` Address type, for example, `"shipping_address"`. + +`primary` +: `boolean` Indicates whether this is the customer's primary address. + +`name` +: `string` Full name on the address. + +`line1` +: `string` Address line 1. + +`line2` +: `string` Address line 2. May be empty. + +`zipcode` +: `string` Postal or ZIP code. + +`city` +: `string` City. + +`state` +: `string` State name. + +`country` +: `string` 2-letter country code, for example, `"in"` for India. + +`contact` +: `string` Phone number associated with this address. + +`tag` +: `string` Address label, for example, `"Home"` or `"Work"`. + +`landmark` +: `string` Landmark. Empty string if not provided. + + + +### Fields for address_added (new address from form) + +Server-assigned fields (`id`, `entity_id`, `entity_type`, `primary`, `type`) are absent because the address is not yet saved. Two additional form-specific fields are present: + +`name` +: `string` Full name on the address. + +`line1` +: `string` Address line 1. + +`line2` +: `string` Address line 2. May be empty. + +`zipcode` +: `string` Postal or ZIP code. + +`city` +: `string` City. + +`state` +: `string` State name. + +`country` +: `string` 2-letter country code, for example, `"in"` for India. + +`contact` +: `string` Phone number associated with this address. + +`tag` +: `string` Address label, for example, `"Home"` or `"Work"`. + +`landmark` +: `string` Landmark. Empty string if not provided. + +`save_my_address` +: `boolean` Indicates whether the customer opted to save this address. + +`new_shipping_address_cta` +: `any` Internal form field. + + +## Event Reference + +Events are listed in the order they typically occur during a customer journey. + + + + +### initiate + +**When it fires:** The Magic Checkout modal opens. + +**Additional fields:** None beyond common fields. + +```json: Example Payload +{ + "event": "initiate", + "paymentMode": "online", + "lineItems": [ + { + "name": "Product Name", + "description": "Product description", + "image_url": "https://example.com/image.jpg", + "price": 49900, + "offer_price": 49900, + "quantity": 1, + "tax_amount": 0, + "variant_id": "123456789", + "sku": "SKU-001" + } + ], + "totalAmount": 49900, + "latestTotal": 49900, + "couponDiscountValue": 0, + "isScriptCouponApplied": false, + "currency": "INR", + "phone": "+91XXXXXXXXXX", + "email": "customer@example.com", + "state": "", + "city": "", + "first_name": "", + "last_name": "" +} +``` + + + + +### contact_input_entered + +**When it fires:** The customer enters their phone number or email address in the contact input field. + +**Additional fields:** None beyond common fields. The `phone` or `email` fields in the common payload reflect what the customer entered. + + + + +### otp_initiated + +**When it fires:** An OTP is sent to the customer's phone number. + +**Additional fields:** + +`otp_verified` +: `boolean` Always `false`. The OTP is sent but not yet verified. + +```json: Example Payload +{ + "event": "otp_initiated", + "otp_verified": false, + "paymentMode": "online", + "phone": "+91XXXXXXXXXX", + "email": "customer@example.com", + "state": "", + "city": "", + "first_name": "", + "last_name": "", + "totalAmount": 49900, + "latestTotal": 49900, + "couponDiscountValue": 0, + "isScriptCouponApplied": false, + "currency": "INR" +} +``` + + + + +### otp_submitted + +**When it fires:** The customer submits an OTP and it is accepted. This event does not fire on a failed OTP attempt. + +**Additional fields:** + +`otp_verified` +: `boolean` Always `true`. This event fires only on successful verification. + +```json: Example Payload +{ + "event": "otp_submitted", + "otp_verified": true, + "paymentMode": "online", + "phone": "+91XXXXXXXXXX", + "email": "customer@example.com", + "state": "", + "city": "", + "first_name": "", + "last_name": "", + "totalAmount": 49900, + "latestTotal": 49900, + "couponDiscountValue": 0, + "isScriptCouponApplied": false, + "currency": "INR" +} +``` + + + + +### otp_skipped + +**When it fires:** The customer skips the OTP verification step when the skip option is available. + +**Additional fields:** None beyond common fields. + + + + +### user_data + +**When it fires:** The customer's identity is confirmed and their profile data is available. This is the earliest event where `phone`, `email`, `first_name` and `last_name` are reliably populated. + +This event fires multiple times in a session: at login completion, when the customer proceeds from the address step and when payment is initiated. Each emission reflects the most current customer data. + +**Additional fields:** None beyond common fields. + +```json: Example Payload +{ + "event": "user_data", + "paymentMode": "online", + "phone": "+91XXXXXXXXXX", + "email": "customer@example.com", + "state": "West Bengal", + "city": "Kolkata", + "first_name": "Jane", + "last_name": "Doe", + "totalAmount": 49900, + "latestTotal": 49900, + "couponDiscountValue": 0, + "isScriptCouponApplied": false, + "currency": "INR" +} +``` + + + + + + + +### address_selected + +**When it fires:** The customer selects a saved address from their address book and serviceability for that address is confirmed. + +This event fires only when the selected address changes. Selecting the same address again does not re-fire the event. + +**Additional fields:** + +`address` +: `Address` The selected address. See [Address Schema](#address-schema). + + + + +### address_added + +**When it fires:** The customer submits a new address through the address form. + +**Additional fields:** + +`address` +: `Address` The newly added address. See [Address Schema](#address-schema). + + + + +### pincode_entered + +**When it fires:** The customer enters a pincode in the address form. This event fires on blur of the pincode field. + +**Additional fields:** + +`pinCode` +: `string` The pincode value entered by the customer. + + + + +### address_info_submitted + +**When it fires:** Address information is finalised. This event fires in three scenarios: + +1. The customer submits a new address form. +2. The customer confirms an existing saved address. +3. On checkout open, if the customer is already logged in and has a saved address on file. + +After this event fires, subsequent event payloads include `state_code`, `country_name`, `zipcode`, `line1` and `line2` at the top level, in addition to `state` and `city`. + +**Additional fields:** None beyond common fields. + + + + +### shipping_selected + +**When it fires:** The customer confirms their address and the checkout proceeds to the payment screen. + +**Additional fields:** + +`name` _optional_ +: `string` Shipping method name. + +`shipping_fee` _optional_ +: `number` Shipping cost in paise. + +`cod` _optional_ +: `boolean` Indicates whether COD is available for this shipping method. + +`cod_fee` _optional_ +: `number` COD fee in paise. + +`id` _optional_ +: `string` Shipping method identifier. + +These fields (`name`, `shipping_fee`, `cod`, `cod_fee`, `id`) are present only in the standard checkout flow. In a quick-buy flow where payment occurs without an address step, this event fires without these fields. + +```json: Example Payload - Standard Flow +{ + "event": "shipping_selected", + "name": "Standard Delivery", + "shipping_fee": 0, + "cod": false, + "cod_fee": 0, + "id": "standard", + "paymentMode": "online", + "phone": "+91XXXXXXXXXX", + "email": "customer@example.com", + "state": "", + "city": "", + "first_name": "", + "last_name": "", + "totalAmount": 49900, + "latestTotal": 49900, + "shippingAmount": 0, + "couponDiscountValue": 0, + "isScriptCouponApplied": false, + "currency": "INR" +} +``` + + + + + + + +### payment_page_reached + +**When it fires:** The customer arrives at the payment method selection screen. + +**Additional fields:** None beyond common fields. + + + + +### coupon_applied + +**When it fires:** The customer applies a coupon code and it is accepted. + +**Additional fields:** + +`appliedCouponCode` +: `string` The coupon code that was successfully applied. + +`amountBeforeDisc` +: `number` Cart total before the discount, in paise. + +`amountAfterDisc` +: `number` Cart total after the discount, in paise. Same as `latestTotal`. + +The `couponDiscountValue` field in the common payload also reflects the discount amount in paise. + +```json: Example Payload +{ + "event": "coupon_applied", + "appliedCouponCode": "SAVE10", + "amountBeforeDisc": 49900, + "amountAfterDisc": 39900, + "paymentMode": "online", + "couponDiscountValue": 10000, + "latestTotal": 39900, + "totalAmount": 49900, + "isScriptCouponApplied": false, + "currency": "INR", + "phone": "+91XXXXXXXXXX", + "email": "customer@example.com", + "state": "West Bengal", + "city": "Kolkata", + "first_name": "Jane", + "last_name": "Doe" +} +``` + + + + +### coupon_failed + +**When it fires:** The customer attempts to apply a coupon code and it is rejected. + +**Additional fields:** + +`couponCode` +: `string` The coupon code the customer attempted to use. + +`errorMsg` +: `string` The reason the coupon was rejected. + +```json: Example Payload +{ + "event": "coupon_failed", + "couponCode": "SAVE10", + "errorMsg": "coupon not applicable for this order", + "paymentMode": "online", + "couponDiscountValue": 0, + "latestTotal": 49900, + "totalAmount": 49900, + "isScriptCouponApplied": false, + "currency": "INR", + "phone": "+91XXXXXXXXXX", + "email": "customer@example.com", + "state": "West Bengal", + "city": "Kolkata", + "first_name": "Jane", + "last_name": "Doe" +} +``` + + + + + + +> **WARN** +> +> +> **Important** +> +> Do not use `mx-analytics` events to confirm payment. Always verify payments server-side using `razorpay_signature`. These events are for analytics instrumentation only. +> + + +### payment_initiated + +**When it fires:** The customer selects a payment method and taps pay, initiating a payment attempt. + +**Additional fields:** + +`paymentMethod` +: `string` The payment method selected. Possible values: `"upi"`, `"card"`, `"netbanking"`, `"wallet"`, `"emi"`, `"cod"`. + +```json: Example Payload +{ + "event": "payment_initiated", + "paymentMethod": "upi", + "paymentMode": "online", + "phone": "+91XXXXXXXXXX", + "email": "customer@example.com", + "state": "West Bengal", + "city": "Kolkata", + "first_name": "Jane", + "last_name": "Doe", + "totalAmount": 49900, + "latestTotal": 49900, + "shippingAmount": 0, + "couponDiscountValue": 0, + "isScriptCouponApplied": false, + "currency": "INR" +} +``` + + + + +### payment_failed + +**When it fires:** A payment attempt fails due to reasons such as bank decline, UPI timeout, or insufficient funds. + +**Additional fields:** + +`failureReason` +: `string` Description of why the payment failed. + +```json: Example Payload +{ + "event": "payment_failed", + "failureReason": "Payment failed due to insufficient funds", + "paymentMode": "online", + "phone": "+91XXXXXXXXXX", + "email": "customer@example.com", + "state": "West Bengal", + "city": "Kolkata", + "first_name": "Jane", + "last_name": "Doe", + "totalAmount": 49900, + "latestTotal": 49900, + "shippingAmount": 0, + "couponDiscountValue": 0, + "isScriptCouponApplied": false, + "currency": "INR" +} +``` + + + + +### checkout_abandoned + +**When it fires:** The customer closes the Magic Checkout modal without completing payment. + +**Additional fields:** + +`time_since_open` +: `number` Milliseconds elapsed between checkout open and the moment of abandonment. + + + + + +## Event Behavior Notes + + +### When do mx-analytics events fire? + + These events only fire for Magic Checkout. If Magic Checkout features are not enabled on your account, `mx-analytics` events will not be emitted. + + + +### When are customer fields populated? + + Customer fields start as empty strings and are populated progressively as the customer advances through the flow. `user_data` is the earliest event where all identity fields are reliably complete. + + + +### How often does user_data fire? + + `user_data` fires multiple times per session: at login confirmation, after address is confirmed and when payment is initiated. + + + +### Can payment events fire multiple times? + + `payment_initiated` and `payment_failed` can fire multiple times in one session if the customer retries after a failure. + + + +### Is there an event for failed OTP attempts? + + `otp_submitted` only fires on a successful OTP. There is no event for a failed OTP attempt. + + + +### Does address_selected fire on every selection? + + `address_selected` will not fire if the same address is selected twice. It only fires when the selection changes. + + + +### When does address_info_submitted fire? + + `address_info_submitted` fires in three scenarios: new address submitted, existing address confirmed and automatically on checkout open for an already-logged-in customer with a saved address. + + + +### Are shipping_selected fields always present? + + `shipping_selected` fields (`name`, `shipping_fee`, `cod`, `cod_fee`, `id`) are absent in the quick-buy flow where the customer pays without going through an address step. + + + +### When does checkout_abandoned fire? + + `checkout_abandoned` fires only when checkout closes without a successful payment. If payment succeeds, the handler callback fires instead. diff --git a/llm-content/payments/magic-checkout/web/analytics-integration.md b/llm-content/payments/magic-checkout/web/analytics-integration.md new file mode 100644 index 00000000..caaea27a --- /dev/null +++ b/llm-content/payments/magic-checkout/web/analytics-integration.md @@ -0,0 +1,188 @@ +--- +title: Magic Checkout Analytics Integration +description: Capture Magic Checkout analytics events and forward them to your analytics platform using the Razorpay JS SDK. +--- + +# Magic Checkout Analytics Integration + +Magic Checkout emits analytics events at key points in a customer's purchase journey. This guide covers how native platform businesses can listen to these events and use them to power their own analytics pipelines (for example, Google Analytics 4, Mixpanel, Clevertap and so on). + +This guide is for businesses integrated with Razorpay using the native integration (that is, directly using the Razorpay JS SDK on your own website, not via Shopify or other platform plugins). If you are on Shopify, refer to the Shopify-specific analytics setup instead. + +## Prerequisites + +- You have a working Magic Checkout integration using the Razorpay JS SDK. +- Your analytics tool (GA4, Mixpanel and so on) is already initialised on the page before the checkout is opened. + +## How It Works + +Magic Checkout communicates analytics events to your page via the Razorpay SDK instance: + +1. You create a Razorpay instance with your checkout options. +2. You register a listener on the `mx-analytics` event before opening the checkout. +3. As the customer progresses through checkout, events fire through the `mx-analytics` listener. +4. When payment succeeds, the `handler` callback fires (not `mx-analytics`). + +> **WARN** +> +> +> **Watch Out!** +> +> The purchase (payment success) event is delivered via the `handler` callback in your checkout options, not through `mx-analytics`. All other events come through `mx-analytics`. +> + +## Integration Steps + +Follow these steps to integrate Magic Checkout analytics into your website. + +### Step 1: Create the Razorpay Instance + +Create a new Razorpay instance with your checkout options. The `handler` callback is where you capture successful payment events for your analytics. + +```js: New Razorpay Instance +const checkoutOptions = { + key: 'YOUR_KEY_ID', + order_id: 'order_XXXXXXXXXXXXXXXXX', + name: 'Your Store Name', + // ... rest of your checkout options + handler: function (response) { + // Called when payment is successfully completed. + // Trigger your analytics purchase event here. + console.log('Payment successful:', response.razorpay_payment_id); + }, +}; + +const rzpInstance = new window.Razorpay(checkoutOptions); +``` + +### Step 2: Register the Analytics Listener + +Register the `mx-analytics` listener on your Razorpay instance before you call `rzpInstance.open()`. This listener receives all checkout analytics events except payment success. + +```js: Register mx-analytics Listener +rzpInstance.on('mx-analytics', function (data) { + if (!data || !data.event) return; + + // Handle events based on data.event and the corresponding payload. + // See the Event Reference for the full list of events and their payloads. + console.log('[Magic Analytics]', data.event, data); +}); + +rzpInstance.open(); +``` + +## Payment Success (Purchase Event) + +Payment success is not delivered via the `mx-analytics` listener. It is delivered through the `handler` callback defined in your `checkoutOptions`. + +The `handler` is called immediately after a successful payment with the following payload: + +`razorpay_payment_id` +: `string` Unique identifier of the successful payment (for example, `"pay_XXXXXXXXXXXXXXXXX"`). + +`razorpay_order_id` +: `string` The order id associated with this payment. Always present for Magic Checkout since an order is required. + +`razorpay_signature` +: `string` HMAC-SHA256 signature for server-side payment verification. Always present for Magic Checkout. + +```js: Handler +handler: function (response) { + // Use response.razorpay_payment_id for analytics + // Use response.razorpay_order_id for analytics + // Use response.razorpay_signature for server-side verification ONLY; do not log or send to analytics + console.log('Purchase complete:', response.razorpay_payment_id); +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> Always verify the payment on your server using `razorpay_signature` before fulfilling the order. Do not rely solely on the client-side handler for order confirmation. +> + +## Full Integration Example + +```js: Example +const checkoutOptions = { + key: 'YOUR_KEY_ID', + order_id: 'order_XXXXXXXXXXXXXXXXX', + name: 'Your Store Name', + description: 'Order #1234', + amount: 49900, // in paise + + handler: function (response) { + console.log('Purchase:', response.razorpay_payment_id); + }, +}; + +const rzpInstance = new window.Razorpay(checkoutOptions); + +rzpInstance.on('mx-analytics', function (data) { + if (!data || !data.event) return; + + // Handle events based on data.event and the corresponding payload. + // See the Event Reference for the full list of events and their payloads. + console.log('[Magic Analytics]', data.event, data); +}); + +rzpInstance.open(); +``` + +## Forward Events to Your Analytics Platform + +The `mx-analytics` listener delivers raw event data to your page. It is your responsibility to forward this data to your analytics platform of choice, using whatever event names and payload structure that platform expects. + +Below is an example of how you might forward Magic Checkout events to Google Analytics 4 (GA4). This is illustrative only; the event names and parameters shown are one possible mapping. Adapt them to match your own platform and tracking requirements. + +```js: Example GA4 Integration +rzpInstance.on('mx-analytics', function (data) { + if (!data || !data.event) return; + + var currency = data.currency || 'INR'; + var value = (data.latestTotal || 0) / 100; // convert paise to rupees + + var items = (data.lineItems || []).map(function (item) { + return { + item_id: item.sku || item.id || '', + item_name: item.name || item.title || '', + item_brand: item.brand || item.vendor || '', + item_variant: String(item.variant_id || ''), + price: ((item.offer_price || item.price || 0) / 100).toFixed(2), + quantity: item.quantity || 1, + }; + }); + + switch (data.event) { + case 'initiate': + gtag('event', 'begin_checkout', { currency: currency, value: value, items: items }); + break; + case 'payment_initiated': + gtag('event', 'add_payment_info', { currency: currency, value: value, items: items, payment_type: data.paymentMethod }); + break; + case 'coupon_applied': + gtag('event', 'select_promotion', { coupon: data.appliedCouponCode }); + break; + case 'checkout_abandoned': + gtag('event', 'checkout_abandoned', { currency: currency, value: value }); + break; + // Map other events as needed for your platform + } +}); +``` + +> **INFO** +> +> +> **Handy Tips** +> +> The event names (`begin_checkout`, `add_payment_info` and so on) above are GA4's recommended e-commerce event names. Your platform may use different conventions; refer to your analytics provider's documentation for the correct event taxonomy. This example covers only a subset of events; refer to the [Event Reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/web/analytics-event-reference.md) for the complete list. +> + +## Next Steps + +Once you get the events from Razorpay, you can further integrate and forward the data to required tracking platform (such as GA4, GTM, Meta Ads and so on) by constructing the payload in the format specified by the platform. + +For the full list of events, payload schemas and field definitions, see the [Magic Checkout Analytics Event Reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/web/analytics-event-reference.md). diff --git a/llm-content/payments/magic-checkout/woocommerce.md b/llm-content/payments/magic-checkout/woocommerce.md new file mode 100644 index 00000000..44b63a31 --- /dev/null +++ b/llm-content/payments/magic-checkout/woocommerce.md @@ -0,0 +1,109 @@ +--- +title: Integrate Razorpay Magic Checkout With WooCommerce Website +heading: Integrate Magic Checkout With WooCommerce Website +description: Steps to integrate Magic Checkout on your WooCommerce Website. +--- + +# Integrate Magic Checkout With WooCommerce Website + +- **WooCommerce Integration Changelog**: Discover new features, updates and deprecations related to the WooCommerce Integration with Magic Checkout (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about WooCommerce Integration. + +Follow the steps given below to integrate Razorpay Magic Checkout with your WooCommerce Website. + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> + +> **WARN** +> +> +> **Watch Out!** +> +> If you are integrating with our plugin for the first time, refer to the [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#woocommerce). +> + +## Integration Steps + +Follow the steps given below: + + +### 1. Enable Features on Razorpay Dashboard + + To configure settings on Razorpay Dashboard: + + 1. Log in to the [WordPress account](https://wordpress.com/log-in) and navigate to **Settings** → **General**. + 2. Copy the **WordPress Address** or **Site Address**. + ![Copy the checkout URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-url.jpg.md) + 3. Log in to the Razorpay Dashboard and navigate to **Magic Checkout**. + 4. Select **WooCommerce** from the drop-down list. Paste the **WordPress Address** or **Site Address** in the **Domain hyperlink** field. + ![Enter WooCommerce domain hyperlink on Magic Checkout Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-settings-domain-hyperlink.jpg.md) + + + +### 2. Enable Features on WordPress Dashboard + + To configure settings on WordPress Dashboard: + + 1. Log in to your **WordPress account** and activate the **Razorpay plugin** in the WordPress Plugin Manager. + 2. Log in to your **WooCommerce account**, navigate to **Settings** and click the **Payments** tab. + 3. In the **Payments** tab, scroll down to **Razorpay** and click **Manage** to edit the settings. + ![Edit the settings on the WooCommerce Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-razorpay-edit.jpg.md) + - **Activate Magic Checkout**: Enable Magic Checkout to start displaying Magic Checkout instead of Native Checkout. Disable it to use Native Checkout. + ![Enable Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-other-settings.jpg.md) + - **Activate Test Mode**: Enable Test mode to test the flow without impacting customers. This will show the button only to users who have admin permissions. + - **Activate Buy Now Button**: Display the Buy Now button on the product display page. Customers can directly purchase a single product by clicking the **Buy Now** button on the product display page and they will be directed to the Checkout for the payment. Only the Add to Cart button will appear to the customers if this is not selected. + ![Activate the Buy Now button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-buy-now.jpg.md) + - **Activate Mini Cart Checkout**: Display the Mini Cart Checkout button. Once a customer adds a product to the cart, they can hover over the cart and proceed to the Checkout section by clicking the **Checkout** button. + ![Activate the Mini Cart Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-mini-cart.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> - Before accepting live payments, test the Buy Now, Mini Cart, and Checkout buttons to ensure the integration works as expected. +> In case of any queries, contact our [support team](https://razorpay.com/support/). +> - Webhooks are auto-configured when you enter and save the API key ID and secret on the plugin settings page. You need to verify if webhooks are enabled on your [Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#4-how-can-i-verify-if-webhooks-are). However, for versions lower than 3.5.0, you need to [configure webhooks manually](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#3-my-webhooks-are-not-auto-configured-since-i). +> + + + + +### 3. Accept Live Payments + + Disable the Test mode enabled in [Step 2](https://razorpay.com/docs/payments/magic-checkout/woocommerce/#step-2-enable-features-on-wordpress-dashboard:~:text=use%20Native%20Checkout.-,Activate%20Test%20Mode,-%3A%20Enable%20Test%20mode) and click **Save Settings** to accept live payments. + + ![Disable the test mode enabled previously](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-test-disable.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> To disable Magic Checkout, refer to our [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#5-can-i-disable-magic-checkout). +> + +## Next Steps + +## Next Steps + +After successfully integrating your WooCommerce website with Magic Checkout, you can perform the following configurations on the Razorpay Dashboard to suit your business needs: +- [Cash on Delivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce/configuration.md#cash-on-delivery): Enable COD and configure rules for specific locations, products, and order amounts, catering to customer preferences and logistical needs to increase sales. +- [RTO](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce/configuration.md#rto): Use automated COD intelligence or manual review to decide whether to offer COD based on customer buying history, thus reducing RTO rates. +- [Convert COD Orders to Prepaid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce/configuration.md#convert-cod-orders-to-prepaid): Encourage COD customers to switch to prepaid by offering discounts or incentives, reducing cash handling risks. +- [Shipping Options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce/configuration.md#shipping-options): Set up shipping rates at the product, zone and method levels to optimise costs and improve delivery efficiency. +- [International Shipping](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce/configuration.md#international-shipping): Allow customers to enter international PIN codes, expanding your market reach globally. +- [Coupons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce/configuration.md#coupons): Provide discounts via coupons to enhance engagement and reduce cart abandonment. +- [Google and Facebook Analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce/configuration.md#google-and-facebook-analytics): Integrate Google and Facebook Analytics for insights into customer behaviour and optimised marketing strategies. + +### Related Information + +[Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#woocommerce) diff --git a/llm-content/payments/magic-checkout/woocommerce/configuration.md b/llm-content/payments/magic-checkout/woocommerce/configuration.md new file mode 100644 index 00000000..dd3d4cb9 --- /dev/null +++ b/llm-content/payments/magic-checkout/woocommerce/configuration.md @@ -0,0 +1,591 @@ +--- +title: Configure WooCommerce Options | Razorpay Magic Checkout +heading: Configure WooCommerce Options +description: Configure COD and shipping charges, COD intelligence, coupons, international shipping and more on your Razorpay Magic Checkout and WooCommerce Dashboard. +--- + +# Configure WooCommerce Options + +You have various configuration options available on your Razorpay and WooCommerce Dashboard. You can perform the following configurations to suit your business needs: + +- [Cash on Delivery](#cash-on-delivery) +- [RTO](#rto) +- [Convert COD Orders to Prepaid](#convert-cod-orders-to-prepaid) +- [Shipping Options](#shipping-options) +- [International Shipping](#international-shipping) +- [Coupons](#coupons) +- [Separate Billing Address](#separate-billing-address) +- [Capture and Validate GSTIN](#capture-and-validate-gstin) +- [Capture Order Instructions](#capture-order-instructions) +- [Gift Card Settings](#gift-card-settings) +- [Google and Facebook Analytics](#google-and-facebook-analytics) + +## Cash on Delivery + +You can use this setting to enable COD on your store and configure the rules for selectively showing COD to customers based on specific locations, products, order amounts and more. + + +### To enable COD settings: + + 1. Log in to the Razorpay Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **WooCommerce** from the **Platform** drop-down list. Paste the [WordPress Address or Site Address](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md#step-1-configure-settings-on-razorpay-dashboard) in the **Domain hyperlink** field and click **Next**. + 3. Navigate to the **COD Settings** → **COD Setup**. + 4. Enable **COD as a payment option**. + ![COD settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-wooc-enable-cod.jpg.md) + 5. Select the **Type of setting**. + + + Basic + + These COD settings are based on the cart value and zones, applicable for all the products irrespective of the product categories. + Follow the steps given below: + + 1. Configure the **Cart order value** by selecting an option based on your requirement: + - **Charge COD Fee**: Charge a COD fee to customers who opt for the COD payment method. You can configure the order range and set a corresponding **Fee** accordingly. + 1. Click **+ Add slabs**. + 2. Enter the minimum and maximum order value for which the fee should apply. + 3. Enter the **Delivery price**. For example, if the **Min Order Value** is ₹400, the **Max Order Value** is ₹1000, and the Fee is ₹50, a ₹50 COD fee is applied to any order value in this range. + 4. Click **Save slabs**. + ![Create COD eligibility slabs with COD charges](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-wooc-cod-slabs.jpg.md) + 5. Click **+ Add rate slabs** if you want to create more slabs. + + - **Free COD**: No COD charge will apply within the configured order range. The customer cannot view the COD payment method if an order value does not fall within the configured range. + 1. Click **+ Add slabs**. + 2. Enter the minimum and maximum order value for which no COD charge should apply. For example, if the **Min Order Value** is ₹800 and the **Max Order Value** is ₹1200, the COD charge will not apply if the order value falls in this range. + 3. Click **Save slab**. + ![Create COD eligibility slabs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-wooc-free-cod.jpg.md) + 4. Click **+ Create more slabs** to create more slabs. + + +> **WARN** +> +> +> **Watch Out!** +> +> In the **Basic** type of setting, you cannot create overlapping slabs. For example, if you have already set a slab with a minimum order value of ₹200 and a maximum order value of ₹600, you cannot add another slab within that range, such as a minimum order value of ₹300 and a maximum order value of ₹500. +> + + 2. In the **COD zones** section, click **+ Add zones** to create shipping zones where COD is applicable. + 3. Enter the **Zone name**. + 4. Select the country, state, and city where the COD charges configured in the previous step should be applicable. Click **Confirm**. + ![Create COD zones](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-wooc-cod-zone.jpg.md) + 5. Click **Save & apply**. + 6. Navigate to **Manual Zipcode upload** and click **Upload ZIP codes** to offer COD only to specific ZIP codes. + ![Upload ZIP codes to offer COD only to specific ZIP codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-wooc-cod-shipping-pincode.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> - Download the sample CSV file. +> - Enter the ZIP codes as individual rows in column 1. +> - Upload the file in .CSV format. Maximum file size supported is 50 MB. +> + + 7. Drag the file or click **click to upload**. + + +> **WARN** +> +> +> **Watch Out!** +> +> - You can only upload one file at a time. Uploading another file will overwrite the older file. +> - You cannot edit an uploaded file; you can only delete it and upload a new file. +> + + + + +### Advanced + + Configure COD settings based on the cart value and zones applicable to specific product categories. Follow the steps given below: + + 1. In the **Cart order value** section, click **+ Add slabs**. + 2. Enter the minimum and maximum order value for which the fee should apply. + 3. Enter the **Delivery price**. For example, if the **Min Order Value** is ₹400, the **Max Order Value** is ₹1000, and the fee is ₹50, a ₹50 COD fee will apply to any order value in this range. + + +> **INFO** +> +> +> **Handy Tips** +> +> If you do not want to charge a COD fee, you can create slabs and enter ₹0 as the delivery price. +> + + + 4. Click **Save slab**. + ![Create advanced COD eligibility slabs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-advanced-cod-slabs.jpg.md) + 5. Click **+ Create more slabs** if you want to create more slabs. + 6. In the **COD zones** section, click **+ Add zones** to create shipping zones where COD is applicable. + 7. Enter the **Zone name**. + 8. Select the country, state, and city where you want to apply COD charges configured in the previous step. Click **Confirm**. + 9. You can configure COD based on either the zone or product categories. + - **Zone Configuration**: Manage applicable COD slabs and rates for different zones. + 1. Click **+ Set zone configuration**. + ![Set zone configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopif-zone-config.jpg.md) + 2. Select the slabs based on your requirement and click **Save configuration**. It is mandatory to configure all the zones you create. The COD charge applies to each zone based on the slabs you select. + ![Select zone-wise COD slabs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-zone-cod-slabs.jpg.md) + 3. Click **Save & apply**. + - **Product categories**: Create **Product categories** to establish custom rates or zone restrictions for different categories. + 1. Enable the **Product categories** setting. Once you enable this setting, the **Zone configuration** field will not appear. + 2. Click **+ Add categories**. + ![Add product categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-product-cat.jpg.md) + 3. Enter the **Category name**. + 4. Select the products of your choice that you want to add to the category and click **Confirm**. You cannot add the same product in different categories. + 5. Click **+ Create more categories** if you want to add more product categories. + 6. Click **+ Set category configuration** to configure the zones and slabs for each category. + ![Set category configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-product-cat-config.jpg.md) + 7. Select the serviceable zone for the selected category and choose the slabs based on your requirements. For example, if you want to set configurations for the product category, Topwear, select the order range for this category on which COD should apply for each zone. + 8. Click **Save configuration**. It is mandatory to configure slabs for all the zones you create. + ![Config zone and slabs for each category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shopify-category-config.jpg.md) + 9. Click **Save & apply**. + + + + ### Feature + + + +### Block List + + You can create a blocklist for high-risk customers who often return products on delivery, resulting in damaged products during transit, high returns, refund issues, and more. + + The customers mentioned in the blocklist based on the order phone number, email ID, device IP and shipping zip code will **not** be eligible for COD. + + +> **INFO** +> +> +> **Handy Tips** +> +> - Only the **Owner** and **Admin** roles have access to this feature. +> - Blocklist will work only if you enable COD as a payment option. +> + + Follow the steps given below: + + 1. Log in to the Razorpay Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **WooCommerce** from the platform drop-down list. Paste the [WordPress Address or Site Address](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md#step-1-configure-settings-on-razorpay-dashboard) in the **Domain hyperlink** field and click **Next**. + 3. Navigate to **COD Setup** → **Block List**. + 4. Click **+ Add New Blocklist**. + 5. You can either upload a list or enter it manually. + - **To upload a list**: + 1. Download the **sample file**. + 2. Add the required data to the file. A maximum of 1M rows are acceptable in the file. + 3. Upload the file in .CSV format. Maximum file size supported is 50 MB. + - **To manually enter the list**: + 1. Select the **Type** from the drop-down list. + 2. Enter the values. You can enter up to 20 values by separating them with a comma based on the **type**. + + +> **INFO** +> +> +> **Handy Tips** +> +> Enter the values in a valid format as given below: +> - **Phone number**: 10-digit phone number with the country code. For example, +919000090000. +> - **Zip code**: 6-digit zip code. +> - **Device IP**: For example, 123.123.123.123. +> + + 6. Click **Confirm**. + ![Confirm](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-blocklist-confirm.jpg.md) + 7. A pop-up page appears with the list of items added. Review the list and click **Add To Blocklist**. + + The orders that fall under this list will not be eligible for COD. + + + + + + +## RTO + +You can either opt for the automated option by enabling COD intelligence or manually review COD orders. + + +### COD Intelligence + + Enable **COD Intelligence** to detect incorrect/non-serviceable addresses. This allows Magic Checkout to decide whether to show a particular customer the cash-on-delivery option based on their buying history, thus increasing the delivery percentage and reducing RTO rates. To enable COD intelligence: + + 1. Log in to the Razorpay Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **WooCommerce** from the platform drop-down list. Paste the [WordPress Address or Site Address](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md#step-1-configure-settings-on-razorpay-dashboard) in the **Domain hyperlink** field and click **Next**. + 3. Navigate to **RTO Reduction Setup** → **RTO Reduction**. + 4. Toggle on **COD Intelligence** and click **Enable COD Intelligence** in the confirmation pop-up modal. + + ![Enable COD intelligence](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-cod-enable-shopify.jpg.md) + + You can disable **COD Intelligence** if required. This will enable the COD option for all the customers, including those considered risky by Magic Checkout. Once you enable COD intelligence, the **RTO Analytics** tab will appear. Know more about [RTO Analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/analytics/rto.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> - Magic Checkout automatically disables the cash on delivery option in case of high-risk customers who often return products on delivery resulting in damaged products during transit, high returns, refund issues, and so on. +> - You must enable COD Intelligence if you opt for RTO protection. +> + + + + +### Manually Review COD Orders + + You can manually review COD orders to filter out potential RTO orders and, based on our insights, decide whether to offer customers the COD option. + + 1. Log in to the Razorpay Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **WooCommerce** from the platform drop-down list. Paste the [WordPress Address or Site Address](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md#step-1-configure-settings-on-razorpay-dashboard) in the **Domain hyperlink** field and click **Next**. + 3. Navigate to **RTO Reduction Setup** → **RTO Reduction**. + 4. Toggle on **Manually review COD orders**. + ![Enable manual Review](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-enable-manual-review.jpg.md) + 5. Enter the **Consumer Key** and **Secret**. Follow the steps given below to generate API keys: + 1. Log in to the [WordPress account](https://wordpress.com/log-in) and navigate to **WooCommerce** → **Settings**. + 1. Navigate to **Advanced** → **REST API**. + ![REST APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-rest-apis.jpg.md) + 1. Click **Add Key**. + 1. Enter the required details and click **Generate API key**. + 1. Copy the API keys and paste them onto the Razorpay Dashboard. Click **Submit**. + ![Submit keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-submit-keys.jpg.md) + 6. Click **Enable manual review**. + + Once you enable manual review, you can review the COD orders and take necessary actions. Refer to the [COD Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/review-cod-orders.md#cod-orders) section for more information. + + +## Convert COD Orders to Prepaid + +With Magic Checkout, you can urge customers who chose cash on delivery while placing an order to convert COD orders to prepaid by offering discounts or incentives post-order placement. + +Converting orders to prepaid can help you increase order commitment, reduce RTO, streamline operations and enhance customer trust. Know how to [convert COD orders to prepaid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/order-settings/prepay-cod.md). + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. Write to us at [magic-checkout-support@razorpay.com](mailto:magic-checkout-support@razorpay.com) to get this feature enabled for your account. +> + +## Shipping Options + +Following are the configuration options available under shipping: + + +### Method 1: Razorpay Dashboard *(Recommended)* + + You can use this setting to configure the shipping rates at a product, zone and method level for your customers. + + +> **WARN** +> +> +> **Watch Out!** +> +> If you configure the shipping setting on the Razorpay Dashboard, any shipping setting configured on any plugins or your ecommerce platform will not apply. +> + + To configure the shipping options based on your requirement: + 1. Log in to the Razorpay Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **WooCommerce** from the **Platform** drop-down list. Paste the [WordPress Address or Site Address](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md#step-1-configure-settings-on-razorpay-dashboard) in the **Domain hyperlink** field and click **Next**. + 3. Navigate to **Shipping Setup**. You can either select **Magic Shipping** or **WooCommerce** as the **Shipping Type**. + 4. Click **Add Profile** in the **Custom Shipping Profile** section. + ![Navigate to Shipping settings on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-shipping-settings.jpg.md) + 5. Click **+ Add category** in the **Product categories** section. + ![Add product categories to configure shipping](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-wooc-shipping-category.jpg.md) + 6. Enter the **Category name** and select the products of your choice. You cannot add the same product in other categories. Click **Confirm**. + 7. Click **+ Add zones** in the **Shipping zone** section to create zones where shipping is applicable. + 8. Enter the **Zone name** and select the country, state, and city of your choice. + ![Add shipping zones to determine the shipping charges for each zone](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/wooc-add-shipping-zone.jpg.md) + 9. Click **+ Upload ZIP codes** to offer shipping only to specific ZIP codes. You can either upload the ZIP codes in this profile or in the default shipping profile. + + +> **INFO** +> +> +> **Handy Tips** +> +> - Download the sample CSV file. +> - Enter the ZIP codes as individual rows in column 1. +> - Upload the file in .CSV format. Maximum file size supported is 50 MB. +> - Uploaded ZIP codes are compatible only with Basic COD settings. +> + + 10. Drag the file or click **click to upload**. + + +> **WARN** +> +> +> **Watch Out!** +> +> - You can only upload one file at a time. Uploading another file will overwrite the older file. +> - You cannot edit an uploaded file; you can only delete it and upload a new file. +> + + 11. Click **+ Add shipping method** and configure the **Shipping method & rate** for all the shipping zones added in the previous step. + ![Configure the shipping rates for each zone](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/wooc-shipping-method.jpg.md) + 12. Enter the **Delivery Name** and **Description** of your choice which will appear to your customers on Magic Checkout. + 13. Enter the **Rate** for the delivery and enable the **COD availability** if you want to show the cash on delivery payment option on checkout at the shipping method level. + 14. Configure the Shipping slab based on the **Amount** and **Weight** of the product and enter the minimum and maximum values respectively. For example, enter the minimum-maximum value as ₹500-₹900. If the amount of the product falls in that range, a shipping rate is applicable on the product. + ![Configure the shipping method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/wooc-configure-shipping-method.jpg.md) + 15. Enter the delivery estimated timeline for the customers which appears on checkout. + 16. Click **Confirm**. + ![Configure the shipping method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/wooc-configure-shipping-delivery.jpg.md) + 17. Once you configure all the shipping zones, click **Go Back**. + 18. Click **+ Set Default profile** in the **Default Shipping Profile (Mandatory)** section. Follow all the steps from 7 to 15 to configure the profile. + + +> **WARN** +> +> +> **Watch Out!** +> +> - It is mandatory to configure the default shipping profile. +> - By default, the shipping settings configured is applicable for products which **do not** belong to any other shipping profile. +> + + 19. If you selected **Magic Shipping** as the **Shipping Type** above, enable **Magic Shipping** below on the Dashboard. To confirm the action, click **Yes, enable**. + + +> **WARN** +> +> +> **Watch Out!** +> +> - Once you enable **Magic Shipping**, it surpasses all shipping configurations from any plugins or your ecommerce platform and prioritise our configurations. +> ![Enable Shipping settings on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/wooc-magic-enable-shipping-settings.jpg.md) +> - You will get a pop-up if you have not opted for [COD Engine](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce/configuration.md#cash-on-delivery) and [COD order to prepaid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce/configuration.md#convert-cod-orders-to-prepaid). Enter the **Consumer Key** and **Secret**. Follow the steps given below to generate API keys: +> 1. Log in to the [WordPress account](https://wordpress.com/log-in) and navigate to **WooCommerce** → **Settings**. +> 1. Navigate to **Advanced** → **REST API** and click **Add Key**. +> 1. Enter the required details and click **Generate API key**. Copy the API keys and paste them onto the Razorpay Dashboard. Click **Submit**. +> ![Submit keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-submit-keys.jpg.md) +> + + + + +### Method 2: WooCommerce Dashboard + + For the shipping cost to reflect on the Checkout, ensure all the shipping zones are added. To add the shipping zones: + + 1. Log in to your [WordPress account](https://wordpress.com/log-in). + 2. Navigate to **WooCommerce** → **Settings** and click the **Shipping** tab. + ![Shipping settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-navigate.jpg.md) + 3. Add the appropriate **Shipping Zones** and the respective **Shipping Method**. + +> **INFO** +> +> +> **Handy Tips** +> +> Add the shipping charges if required; otherwise, the order will process for free shipping. +> + + +> **WARN** +> +> +> **Watch Out!** +> +> Magic Checkout does not support multiple shipping methods for a region. For example, if you have enabled free shipping and flat rate shipping methods for a particular region, then Magic Checkout will only consider free shipping as the shipping method. +> + + ![Shipping Zone and methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shipping-zone.jpg.md) + 4. Enable COD for the shipping methods, if required. Navigate to **WooCommerce** → **Settings** and click the **Payments** tab. + ![Shipping Zone](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-woocommerce-payments.jpg.md) + 5. Scroll down to **Cash on Delivery** and select the **Enable cash on delivery** check box. +Add the same shipping methods in the **Enable for shipping methods** field to enable COD for shipping methods and click **Save changes**. + ![Shipping method COD](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-shipping-method-cod.jpg.md) + + + ### Shipping Charges + + You can configure shipping charges based on the location or cart amount via Woocommerce plugins such as [Table rate shipping](https://woocommerce.com/products/table-rate-shipping/) and [Advanced free shipping](https://wordpress.org/plugins/woocommerce-advanced-free-shipping/). + + + +### Logistics Partners + + You can integrate Magic Checkout with following logistics partners to easily fetch delivery status details. This is a mandatory step if you have opted for [RTO protection](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce/configuration.md#rto): + - [Shiprocket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/shiprocket.md) + - [Delhivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/delhivery.md) + - [iThink Logistics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/ithink-logistics.md) + - [Unicommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/unicommerce.md) + - [ClickPost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/rto-reduction/logistics-partners/clickpost.md) + + ![Logistics partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-logistics-connect.jpg.md) + + +## International Shipping + +You can allow customers to enter an international zipcode for delivery. + + +### To enable international shipping: + + 1. Log in to + the Razorpay Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **WooCommerce** from the **Platform** drop-down list. Paste the [WordPress Address or Site Address](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md#step-1-enable-features-on-razorpay-dashboard) in the **Domain hyperlink** field and click **Next**. + 3. Navigate to **Shipping Setup** and enable **International Shipping**. + ![enable international shipping for customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-int-shipping.jpg.md) + + +## Coupons + +You can offer discounts to your customers by adding coupons. + + +### To add coupons: + + 1. Log in to your [WordPress account](https://wordpress.com/log-in). + 2. Navigate to **Marketing** → **Coupons**. + 3. Click **Add Coupons** or select a coupon from the list. + 4. Add a **Description** for the coupon. + +> **INFO** +> +> +> **Handy Tips** +> +> Step 4 is mandatory and the coupon will reflect on Checkout only if a description is added. +> + + ![](/docs/assets/images/magic-checkout-coupon.jpg) + 5. In the Razorpay Dashboard, navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 6. Select **WooCommerce** from the **Platform** drop-down list. Paste the [WordPress Address or Site Address](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md#step-1-enable-features-on-razorpay-dashboard) in the **Domain hyperlink** field and click **Next**. + 7. In the **Checkout Setup** tab, the **Coupon Settings** fields are auto-filled. If you want to show all the available coupons directly on Magic Checkout, enable **Auto fetch coupon**. + ![Enable Auto Fetch coupons to show all the available coupons on Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-auto-fetch-coupons.jpg.md) + 8. Click **Save settings**. + + +> **INFO** +> +> +> **Handy Tips** +> +> If you want to display specific coupons on checkout instead of all, you can provide a list of coupons you would like us to whitelist. Write to us at [magic-checkout-support@razorpay.com](mailto:magic-checkout-support@razorpay.com) and include the coupon names and descriptions. +> + + + +## Separate Billing Address + +You can collect the customer's **Billing Address** separately from the **Shipping address**. + + +### To collect the billing address separately: + + 1. Log in to + the Razorpay Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **WooCommerce** from the **Platform** drop-down list. Paste the [WordPress Address or Site Address](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md#step-1-configure-settings-on-razorpay-dashboard) in the **Domain hyperlink** field and click **Next**. + 3. Navigate to **Checkout Setup**, enable **Capture billing address** and click **Save settings**. + ![enable separate billing address capture for customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-billing-add.jpg.md) + + +## Capture and Validate GSTIN + +You can capture and validate your customer's GST details from the Dashboard. + + +### To capture and validate GSTIN details: + + 1. Log in to + the Razorpay Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **WooCommerce** from the **Platform** drop-down list. Paste the [WordPress Address or Site Address](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md#step-1-enable-features-on-razorpay-dashboard) in the **Domain hyperlink** field and click **Next**. + 3. Navigate to **Checkout Setup**, enable **Capture GSTIN?** and click **Save settings**. + ![Capture customers GST details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-wooc-gstin.jpg.md) + 4. To validate the GSTIN entered by your customers at checkout, contact our [Support team](https://razorpay.com/support/#request) to enable GSTIN validation for your account. + 5. After the customers place an order, you can view the GST details on WooCommerce and the Razorpay Dashboard. + - **WooCommerce Dashboard**: On the WooCommerce Dashboard, navigate to **WooCommerce** → **Orders**. Select the required order number and view the details on right-hand side. + - **Razorpay Dashboard**: On the Razorpay Dashboard, navigate to **Transactions** → **Orders** and select the required **Order Id** to view the details. + + + +### Customer Experience + + Once GSTIN validation is enabled for your account, your customers can validate their GST details directly at checkout: + + 1. On the order summary screen, the customer clicks **Add** next to **GST Number**. + 2. A **GSTIN Number** pop-up appears. + 3. The customer enters their GSTIN and clicks **Verify**. + - If the GSTIN is invalid, an error message is displayed asking the customer to enter a valid GSTIN number. + - If the GSTIN is valid, the GST-registered address is automatically set as the billing address. + ![GSTIN on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-config-gstin.jpg.md) + + +## Capture Order Instructions + +You can enable your customers to enter order instructions if any at the checkout. For example, customer may want a particular order to be expedited. To capture order instructions: + + +### To capture order instructions: + + 1. Log in to + the Razorpay Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **WooCommerce** from the **Platform** drop-down list. Paste the [WordPress Address or Site Address](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md#step-1-enable-features-on-razorpay-dashboard) in the **Domain hyperlink** field and click **Next**. + 3. Navigate to **Checkout Setup**, enable **Capture order instructions?** and click **Save settings**. + ![Capture customer order instructions if any](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-wooc-order-instructions.jpg.md) + 4. After the customers place an order, you can view the GST details on WooCommerce and the Razorpay Dashboard. + - **WooCommerce Dashboard**: On the WooCommerce Dashboard, navigate to **WooCommerce** → **Orders**. Select the required order number and view the details on right-hand side. + - **Razorpay Dashboard**: On the Razorpay Dashboard, navigate to **Transactions** → **Orders** and select the required **Order Id** to view the details. + + +## Gift Card Settings + +You can enable various gift card options for your customers from the Dashboard. + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. Write to us at [magic-checkout-support@razorpay.com](mailto:magic-checkout-support@razorpay.com) to get this feature enabled for your account. +> + +> **WARN** +> +> +> **Watch Out!** +> +> This feature is not available for Shopify Basic and Advanced users. +> + + +### To enable gift card settings: + + 1. Log in to + the Razorpay Dashboard and navigate to **Magic Checkout** → **Setup & Settings** → **Platform Settings**. + 2. Select **WooCommerce** from the **Platform** drop-down list. Paste the [WordPress Address or Site Address](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/woocommerce.md#step-1-enable-features-on-razorpay-dashboard) in the **Domain hyperlink** field and click **Next**. + 3. Navigate to **Checkout Setup** and enable **Pay with gift card**. + 4. Once you enable the gift card settings, you can also enable the following options **if required**: + - **Pay with multiple gift cards**: Allow your customers to pay with multiple gift cards at once. + - **Restrict paying with coupon and gift card together**: Restrict your customers from using both coupon and gift card together while making a payment. + - **Restrict buying gift cards with existing gift cards**: Restrict your customers from purchasing gift cards using existing gift cards. + - **Restrict customers from clubbing gift cards with COD**: Restrict the usage of gift cards if your customers avail of the cash on delivery option. + ![Configure the gift card options if required](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-wooc-gift-config.jpg.md) + 5. Click **Save Settings**. + + +## Google and Facebook Analytics + +Activate Google and Facebook Analytics based on your requirement to track orders. + + +### To activate Google and Facebook analytics: + + 1. Log in to the [WordPress account](https://wordpress.com/log-in) and navigate to **Woocommerce** → **Settings**. + 2. Click **Payments**. + 3. In the Payments tab, scroll down to **Razorpay** and click **Manage** to edit the settings. + 4. Scroll towards the end and activate Google and Facebook analytics based on your requirement. + ![enable google and facebook analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-checkout-other-settings3.jpg.md) + 5. Click **Save changes**. + + +### Related Information + +[Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/troubleshooting-faqs.md#woocommerce) diff --git a/llm-content/payments/merchant-categorisation.md b/llm-content/payments/merchant-categorisation.md new file mode 100644 index 00000000..2ba4e2c7 --- /dev/null +++ b/llm-content/payments/merchant-categorisation.md @@ -0,0 +1,10 @@ +--- +title: Payment Methods for Merchant Categories +description: Learn which payment methods are available by default, as per merchant categories. +--- + +# Payment Methods for Merchant Categories + +Razorpay classifies businesses by the type of good or services they provide and groups them into Merchant Categories and Subcategories. We provide most of the payment methods to all the businesses. However, due to our partner bank restrictions, some of the payment methods may not be available to all the Merchant Categories and Subcategories. + +Refer to the [Payment Methods Matrix document](https://docs.google.com/spreadsheets/d/1eZMlh007Utp8JWGYGJ7Hk6zADSVlBWspHEzcGoKOydI/edit#gid=0) to know the availability of the payment methods for the different Merchant Categories and Subcategories. diff --git a/llm-content/payments/mobile-app.md b/llm-content/payments/mobile-app.md new file mode 100644 index 00000000..c7e134bd --- /dev/null +++ b/llm-content/payments/mobile-app.md @@ -0,0 +1,12 @@ +--- +title: About Razorpay Payments Mobile App +description: Use the Razorpay Payments Mobile App to track payments and settlements, issue refunds and accept payments from customers by sharing Payment Links and Razorpay.me URL. +--- + +# About Razorpay Payments Mobile App + +## Advantages + +## How it Works + +Follow these steps: diff --git a/llm-content/payments/mobile-app/accept-payments/payment-gateway.md b/llm-content/payments/mobile-app/accept-payments/payment-gateway.md new file mode 100644 index 00000000..7423a197 --- /dev/null +++ b/llm-content/payments/mobile-app/accept-payments/payment-gateway.md @@ -0,0 +1,26 @@ +--- +title: Mobile App | Accept Payments | Payment Gateway +heading: Payment Gateway +description: Accept payments on the Razorpay Payments Mobile App using Payment Gateway and generate API keys. +--- + +# Payment Gateway + +A payment gateway creates a secure pathway between a customer and the business to facilitate payments securely. It involves the authentication of both parties from the banks involved. + +## When to Use a Payment Gateway + +You should consider integrating with a payment gateway if: +- You have a website +- You have a mobile app + +## Steps to Generate API Keys + +Follow these steps to generate API keys after creating an account. +1. Log in with your Dashboard credentials. +2. Under the **Accept Payments** section, tap **Payment Gateway**. +3. Tap **Generate API Key**. + ![Generate API Key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-mobile-app-api.jpg.md) +4. The Website/App URL submitted during onboarding appears. Review the URL and tap **Generate API Key**. +5. **Key ID** and **Key Secret** appear on the screen. Tap **Download Key Details** to save the ID and Secret on your device. Tap **Share** to send API Key details only to trusted sources. + ![API Key details preview](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-mobile-app-download.jpg.md) diff --git a/llm-content/payments/mobile-app/accept-payments/payment-links.md b/llm-content/payments/mobile-app/accept-payments/payment-links.md new file mode 100644 index 00000000..41a7cb28 --- /dev/null +++ b/llm-content/payments/mobile-app/accept-payments/payment-links.md @@ -0,0 +1,93 @@ +--- +title: Create and Send Payment Links +description: Use the Razorpay Payments Mobile App to create and share Payment Links to accept payments. +--- + +# Create and Send Payment Links + +You can use the Razorpay Payments Mobile app to quickly create and share Payment Links with your customers. The customers can open the Payment Links to make payments using any of the payment methods, such as, UPI, Debit/Credit Card, Netbanking or Wallets. + +## Create Payment Links + +Watch this video to see how to create a Payment Link. + +[Video content] + +Follow these steps to create a Payment Link: + +1. Log in with your Dashboard credentials. + + ![Log in to Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-mobile-app-login.jpg.md) + +2. Navigate to **Products** → **Payment Link** or tap **Payment Link** under **Accept Payments** section. +3. Provide the following details: + - Select a currency. + - Enter the amount to be received from the customer. + - Add a description in the **Payment Description** field. + - Configure the following optional fields as per your requirements: + - Enable the **Partial Payment** feature. + - Add a **Reference ID** for internal reference. + - Enter **Expiry Date** and **Time**. + - Provide additional details using **Internal Notes**. For example, Branch: Bangalore. + + ![Payment Link Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-mobile-app-enter-details.jpg.md) + +4. Tap **Create**. +5. Enter the customer's phone and email address to immediately send the Payment Link. +Alternatively, you can create the link without providing these details and share later. +6. Tap **Create And Send Payment Link**. + ![Create and Send Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-mobile-app-details.jpg.md) +7. You can either share the link with your customer immediately via Facebook, Instagram, WhatsApp and more, or share it later. + ![Share Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-link-mobile-share.jpg.md) +8. Under the **Accept Payments** section, tap **Payment Link** and scroll down to the **Recent Payment Links** section. The link appears on the list. Tap on the link to view more details. You can also choose to [share the link](#share-payment-links) or [duplicate](#duplicate-payment-links) it. + +## Share Payment Links + +You can share the Payment Links using: +- SMS and Email +- Facebook, Instagram, WhatsApp and more. + +## Cancel Payment Links + +Follow these steps to cancel the Payment Link: + +1. Under the **Accept Payments** section, tap **Payment Link** and scroll down to the **Recent Payment Links** section. + +2. Tap on the link you want to cancel. +3. Scroll to the end of the page and tap **Cancel Link**. + +4. Tap **Yes, Cancel** to confirm. + +## Duplicate Payment Links + +Follow these steps to duplicate the Payment Link: + +1. Under the **Accept Payments** section, tap **Payment Link** and scroll down to the **Recent Payment Links** section. The link appears on the list. + + +2. Tap on the link you want to duplicate. +3. Scroll to the end of the page and tap **Duplicate Link**. + + +A duplicate Payment Link is created. You can choose to modify the details and complete the link creation process. + +## Payment Link States + +The table below lists the various states in the Payment Link life cycle and provides a brief description about each. + +Status | Description +--- +Issued | The Payment Link has been created. +--- +Partially Paid | Customer has paid a partial amount. +--- +Paid | Customer has paid the full amount. +--- +Cancelled | The Payment Link has been cancelled by you. +--- +Expired | The Payment Link has expired. The expiry date and time is set while creating the Payment Link. + +### Related Information + +- [Payments Mobile App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app.md) +- [Payment Pages Mobile App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app/accept-payments/payment-pages.md) diff --git a/llm-content/payments/mobile-app/accept-payments/payment-pages.md b/llm-content/payments/mobile-app/accept-payments/payment-pages.md new file mode 100644 index 00000000..7150a69d --- /dev/null +++ b/llm-content/payments/mobile-app/accept-payments/payment-pages.md @@ -0,0 +1,70 @@ +--- +title: Payment Pages on Mobile App +description: Create Razorpay Payment Pages with ready-to-use templates and collect payments using the Razorpay Payments Mobile App. +--- + +# Payment Pages on Mobile App + +You can use Payment Pages to build webpages with customised content, ready-to-use templates, rich-text support, media support and social media sharing options. Share the Payment Page link with your customers and start accepting payments instantly. + +Create Razorpay Payment Pages with ready-to-use templates and collect payments. + +## Create Payment Page + +Follow these steps to create a Payment Page: + +1. Log in with your Dashboard credentials. + ![login](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-mobile-app-login.jpg.md) +2. Tap **Payment Pages** under the **Accept Payments** section. + ![Accept Payments Section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-mobile-app-main.jpg.md) +3. Tap **+ Create Payment Page** and select the template of your choice. + ![login](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pl-template-mobile-app.gif.md) +4. Add business details such as page title, description, contact information and so on. Know more about how to add [business details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md#add-business-details). +5. You can also add a goal tracker to track your goals. To add a goal tracker, tap **+ Add a Goal Tracker**. Know more about how to [configure a goal tracker](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/goal-tracker.md). + ![Payment Page Goal Tracker](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-mobile-goal-tracker.jpg.md) +6. Add payment details such as price field, email, phone number and so on. Know more about how to add [payment details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md#add-payment-details). Tap **Publish Page**. + ![Payment Page Publish Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-mobile-publish-page.jpg.md) + +## Share Payment Pages + +You can share the Payment Pages using: +- SMS and Email +- Facebook, Instagram, WhatsApp and more. + +## Edit Payment Page + +Follow these steps to edit a Payment Page: + +1. Under the **Accept Payments** section, tap **Payment Pages** and scroll down to the list of Payment Pages. + +2. Tap on the payment page you wish to edit. +3. Tap **Edit Page**. + +4. The page appears in edit mode. You can now edit any of the fields to update the details, including the price fields. + +## Deactivate Payment Page + +Follow these steps to deactivate a Payment Page: + +1. Under the **Accept Payments** section, tap **Payment Pages** and scroll down to the list of Payment Pages. + +2. Tap on the payment page you wish to deactivate. +3. Tap **Deactivate**. + +4. Tap **Yes, deactivate** to confirm. + +## Payment Page States + +The table below lists the various states in the Payment Page life cycle and briefly describes each. + +Status | Description +--- +Active | Indicates the Payment Page is created and saved. You can accept payments using this page and edit the page. +--- +Inactive | Indicates the Payment Page is deactivated or has expired. You cannot accept payments using this page. + +### Related Information + +- [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md) +- [Razorpay Mobile App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app.md) +- [Create and Send Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app/accept-payments/payment-links.md) diff --git a/llm-content/payments/mobile-app/accept-payments/razorpay-me.md b/llm-content/payments/mobile-app/accept-payments/razorpay-me.md new file mode 100644 index 00000000..0d1c2e54 --- /dev/null +++ b/llm-content/payments/mobile-app/accept-payments/razorpay-me.md @@ -0,0 +1,57 @@ +--- +title: About Accepting Payments Using Razorpay.me +description: Accept payments from your customers using Razorpay.me. +--- + +# About Accepting Payments Using Razorpay.me + +After your Razorpay account is activated on the mobile app, Razorpay instantly creates a Razorpay.me URL for you. A Razorpay.me URL is a short URL with your business name added as a suffix. It is a single URL that you can share with all your customers through SMS, email or WhatsApp. Customers can open the link on their desktop or mobile device, enter an amount of their choice or make the payment for a specified amount. + +> **INFO** +> +> +> **Handy Tips** +> +> Razorpay.me URL is available only on the mobile app. To create this URL, you should sign up for an account from the Razorpay mobile app and complete the KYC process. +> + +## Advantages of Using Razorpay.me URL + +- **Get your Razorpay.me URL in minutes** + + Download the app, complete activation and get your link. +- **Branded, customised URL** + + Your personalised Razorpay.me URL with your business name in the URL. +- **One link to collect all payments** + + No hassle of creating multiple links for different customers. +- **Share anywhere** + + Share the URL through SMS, emails, WhatsApp and other social channels. + +## Who can use Razorpay.me URL + +Razorpay.me URL can be used by: + +- Freelancers/Content creators +- Social media sellers +- Early-stage businesses +- Trusts and NGOs + +## How Razorpay.me URL Works + +1. We create the Razorpay.me URL for you instantly after account activation. For example, if your business name is Acme Co, your URL will be `razorpay.me/acmeco`. Know how to [edit your Razorpay.me URL.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app/accept-payments/razorpay-me/manage.md) + +2. You either add a specific amount for the customers to pay or directly send the link and they can enter an amount of their choice. + +3. Share this URL with your customers through SMS, email, WhatsApp or other social media sites. + +4. Your customers open this URL on their desktop or mobile device, enter the amount if **not** specified, select the payment method and complete the payment. + +5. You can [check the payment status on the Razorpay Mobile App.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app/track-manage.md) + +### Related Information + +- [Manage Razorpay.me URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app/accept-payments/razorpay-me/manage.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app/faqs.md#razorpay-me) diff --git a/llm-content/payments/mobile-app/accept-payments/razorpay-me/manage.md b/llm-content/payments/mobile-app/accept-payments/razorpay-me/manage.md new file mode 100644 index 00000000..71eae76c --- /dev/null +++ b/llm-content/payments/mobile-app/accept-payments/razorpay-me/manage.md @@ -0,0 +1,31 @@ +--- +title: Manage Razorpay.me +description: Know how to edit the Razorpay.me URL using the Razorpay Payments Mobile App. +--- + +# Manage Razorpay.me + +You can edit the Razorpay.me URL immediately after account activation only. We recommend that you use the business/brand name that your customers identify with you. + +## How to Edit Razorpay.me URL + +To edit the URL: +1. Tap **Edit** on the Razorpay.me URL creation screen. + +2. Modify the URL. You may: + - Select one from the list of recommended suffixes, or + - Enter a custom suffix. Ensure the suffix is similar to your business or brand name. + +> **INFO** +> +> +> **Handy Tips** +> +> - Characters supported are `a-z` and `0-9`. +> - The business/brand name cannot exceed 15 characters. +> + + +3. Tap **Save**. + +The Razorpay.me URL has been successfully modified. diff --git a/llm-content/payments/mobile-app/accept-payments/webstore.md b/llm-content/payments/mobile-app/accept-payments/webstore.md new file mode 100644 index 00000000..0f67c464 --- /dev/null +++ b/llm-content/payments/mobile-app/accept-payments/webstore.md @@ -0,0 +1,141 @@ +--- +title: Webstore on Mobile App +description: Create Razorpay Webstore and collect payments using the Razorpay Payments Mobile App. +--- + +# Webstore on Mobile App + +You can build a Webstore from your Razorpay Mobile App to list all your products on a single storefront and start accepting customer payments. This method does not require any code or API integration. + +## Steps + +To create a Webstore on the Razorpay Mobile App, you must complete the following steps. + +- [Steps](#steps) + - [Step 1: Add Product Details](#step-1-add-product-details) + - [Step 2: Add Business Details](#step-2-add-business-details) + - [Step 3: Configure Store Settings](#step-3-configure-store-settings) + - [Step 4: Share and Start Accepting Payments](#step-4-share-and-start-accepting-payments) +- [Edit Webstore](#edit-webstore) +- [Deactivate Webstore](#deactivate-webstore) + - [Related Information](#related-information) + +### Step 1: Add Product Details + +1. Log in with your Dashboard credentials. + +2. Tap **Payment Pages** under the **ACCEPT PAYMENTS** section and tap **+ Create Payment Page**. + +3. Tap **Select Webstore**. + +4. Tap **Add products to this page** and then tap **+ Add a new product**. +5. Add a **Product name**. + +> **INFO** +> +> +> **Product name Character Limit** +> +> The Product name cannot exceed 100 characters. +> + +6. Add the **Price** of your product. In addition, you can add a **Discounted price**, which will serve as the final listed price for the product. Customers will see the following. + +7. Add **Quantity in stock** if you have a limited quantity. +8. Tap **Upload product images** to upload an image of your product. You can upload up to five product images. +9. You can also add your product to a Category: + 1. Click on the Category drop-down and click **+Create new category**. + 2. Add a category name and click **Add category**. + +> **INFO** +> +> +> **Category name Character Limit** +> +> The Category name cannot exceed 100 characters. +> + + ![Adding category name for PP Stores](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-category-name-add.jpg.md) +10. Add a brief description for your product if needed and click **Add product**. + + +### Step 2: Add Business Details + +Follow the steps given below to add your business details. + +1. Click on the **More options** section. + +2. Enter you **Business email id**. +3. Enter your **Business phone no.** and click **Save contact details**. + + +### Step 3: Configure Store Settings + +Customise your page by adding a custom URL, adding an expiry date and so on through the **Page Settings** option. + +1. Log in with your Dashboard credentials. +2. Click **Page Settings** to configure the settings for the Webstore. +3. Add a unique URL slug in the **URL for this page** section. + + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mandatory step. You will not be able to create a Webstore if you do not add a unique URL slug. +> + +4. You can add an expiry date for your Webstore. +5. You can also add a custom message for your customers and redirect to your preferred website after successful payment. +6. You can also configure Facebook Pixel and Google Analytics for your Webstore for metrics. Know more about how to add [Facebook Pixel and Google Analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/plugins-add-ons.md) to your Webstore. +7. Click **Save**. + ![Configure Settings for your Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-store-settings.jpg.md) + +### Step 4: Share and Start Accepting Payments + +Share your Webstore with your customers and start accepting payments. + +1. Once your are done creating the Webstore, tap **Publish Page** to complete the Webstore creation. +2. Tap **Share** to send the URL to your customers via different social media channels. You can also find the URL on the Dashboard in the Webstore list. + ![Webstore succesful creation.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/stores-mobile-live.jpg.md) + +## Edit Webstore + + +### Follow these steps to edit a Webstore: + + 1. Log in with your Dashboard credentials. + + 2. Tap **Payment Pages** under the **ACCEPT PAYMENTS** section. + 3. Under the **Accept Payments** section, tap **Payment Pages**. + 4. On the Payment Pages Dashboard, tap **Webstore**. + 5. Scroll through your list of Webstore and tap on the page you wish to edit. + + 6. Tap **Edit Page**. + + 7. The page appears in edit mode. You can now edit any of the fields to update the details, including the price fields. + + +## Deactivate Webstore + + +### Follow these steps to deactivate a Webstore: + + 1. Log in with your Dashboard credentials. + + 2. Tap **Payment Pages** under the **ACCEPT PAYMENTS** section + 3. Under the **Accept Payments** section, tap **Payment Pages**. + 4. Tap **Webstore** and scroll down to the list of Webstore. + + 5. Tap on the Webstore you wish to deactivate. + 6. Tap **Deactivate**. + + 7. Tap **Yes, deactivate** to confirm. + + +### Related Information + +- [Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore.md) +- [Razorpay Mobile App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app.md) +- [Create and Send Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app/accept-payments/payment-links.md) diff --git a/llm-content/payments/mobile-app/faqs.md b/llm-content/payments/mobile-app/faqs.md new file mode 100644 index 00000000..648d18cf --- /dev/null +++ b/llm-content/payments/mobile-app/faqs.md @@ -0,0 +1,9 @@ +--- +title: Payments Mobile App | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about the Razorpay Payments Mobile App. +--- + +# Frequently Asked Questions (FAQs) + + diff --git a/llm-content/payments/mobile-app/get-started.md b/llm-content/payments/mobile-app/get-started.md new file mode 100644 index 00000000..ca160131 --- /dev/null +++ b/llm-content/payments/mobile-app/get-started.md @@ -0,0 +1,146 @@ +--- +title: Payments Mobile App | Get Started +heading: Get Started +description: Create a Razorpay account and generate API keys using Razorpay Payments Mobile App. +--- + +# Get Started + +If you are new to Razorpay, you can create an account right from the mobile app. If you are an existing Razorpay user, log in to the Razorpay Mobile app using your Dashboard credentials. + +Know how to: +- [Create a New Account](#create-a-new-account). +- [Sign in with an existing Razorpay account](#sign-in). + +## Create a New Account + +Follow these steps to create a Razorpay account: +1. Install the Razorpay Mobile App from Google Play Store. +2. Open the app and tap **Create Account**. + + + +3. Enter your mobile number or email address. Tap **Next**. +4. Create a password and tap **Create Account**. +5. A verification code is sent to your **mobile number** or **email id**. Enter the code to verify the mobile number or email id. +6. **Business Overview**: Enter your business details, billing label and provide your website/app URL. If you do not have one, select the relevant option. Tap **Save & Next**. +7. **Business Details**: Enter details such as business PAN and name, authorised signatory's PAN and name and the business address. Tap **Save & Next**. +8. **Contact Details**: Enter your name and contact details. Enable the **Get account updates on WhatsApp** option to receive WhatsApp notifications. You can [disable WhatsApp notifications](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/email-sms-whatsapp.md) from the Dashboard. Tap **Submit**. +9. Your account is activated. We create the Razorpay.me URL for you instantly after account activation. You can accept payments from your customers using [Razorpay.me URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app/accept-payments/razorpay-me.md). + ![Account activated on the Razorpay payments mobile app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-mobile-app-activate.jpg.md) +Live mode is enabled once you complete the activation process. + + +### Submit KYC Details + + Submit KYC details for a Razorpay account on the mobile app. Tap **Complete KYC** to initiate the account activation process. + + ![Complete KYC for Razorpay account on the payments mobile app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-mobile-app-kyc.jpg.md) + + + Enter the following details: + 1. **Bank and Company Details**: Enter the bank account details to which Razorpay should transfer the amount collected from customers (minus fees and tax). + + If you are a registered business, enter company information such as CIN and GSTIN. If you do not have a GSTIN, select **I don't have a GSTIN**. + + 2. **Documents Upload**: The process varies based on your business type: + 1. **Business Type: Individual and Registered (Proprietorship and Partnership only)** + + If you fall under the above-mentioned business types, you **must** complete the Aadhar eKYC process by entering the following information: + 1. **Aadhar Verification (Via OTP)**: Enter your 12-digit Aadhar number. + 2. **Captcha**: Enter the captcha shown on the screen. + 3. Tap **Submit & Get OTP**. The OTP is sent to the mobile number linked with you Aadhar card. + 4. Enter the OTP and tap **Save and Verify**. + + 5. Once the verification is complete, Razorpay automatically receives the Aadhar details. + 2. **All Other Registered Business Types** + + [Upload documents as per your business type](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#2-submit-kyc-details/). You can capture images using the app or upload existing files. Given below are upload guidelines: + - Supported file types: JPG, PNG or PDF files. + - Supported file size: Maximum size supported is 2 MB. + + 3. Tap **Save and Verify**. + + Our team will review the information submitted by you. It takes approximately 3 working days to complete the review process. + + ### Onboarding Videos for Various Business Types + + Watch these videos to check the business verification and document verification details required for your business type: + + #### Business Verification Process + + - [ Individuals](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/mobileapp-l1-unregistered.mp4.md) + - [Registered Business](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/L1-reg.mp4.md) + + #### Document Verification Process + + - [Individuals](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/mobileapp-l2-unregistered.mp4.md) + - [Public Ltd and Private Ltd](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/L2-reg.mp4.md) + - [Proprietorship](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/L2-prope.mp4.md) + - [Partnership](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/mobileapp-l2-partnerships.mp4.md) + - [NGOs, Trusts and Societies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/mobileapp-l2-ngo-trust-society.mp4.md) + + ### Provide Clarification + + During the review process, we may reach out to you for clarifications. You can address these queries on the web version of the Dashboard. + + + + + + + + + Enter the following details: + 1. **Bank and Company Details**: Enter the bank account details to which Razorpay should transfer the amount collected from customers (minus fees and tax). + 2. Enter your **Business Registration Number** issued by SSM. If you do not have the registration number, select **My Business is not registered with SSM** check box and provide the **Certificate of Registration/Incorporation**. + 3. Tap **Save and Verify**. + + Our team will review the information submitted by you. It takes approximately 3 working days to complete the review process. + + ### Onboarding Videos for Various Business Types + + Watch these videos to check the business verification and document verification details required for your business type: + + #### Business Verification Process + + - [ Individuals](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/mobileapp-l1-unregistered.mp4.md) + - [Registered Business](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/L1-reg.mp4.md) + + #### Document Verification Process + + - [Individuals](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/mobileapp-l2-unregistered.mp4.md) + - [Public Ltd and Private Ltd](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/L2-reg.mp4.md) + - [Proprietorship](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/L2-prope.mp4.md) + - [Partnership](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/mobileapp-l2-partnerships.mp4.md) + - [NGOs, Trusts and Societies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/mobileapp-l2-ngo-trust-society.mp4.md) + + ### Provide Clarification + + During the review process, we may reach out to you for clarifications. You can address these queries on the web version of the Dashboard. + + + + + + + +### Successful Activation + + Your Razorpay account is activated upon successful review of all the information provided above. + + + +## Sign In + +Follow these steps to sign in with your existing Dashboard credentials. +1. Install the Razorpay Mobile App from [Google Play Store](https://play.google.com/store/apps/details?id=com.razorpay.payments.app&utm_campaign=mobile%20app%20with%20PL&utm_medium=email&_hsmi=2&_hsenc=p2ANqtz--g-8t5duramBL4wnhFg5y5-Bb1sPtleTBTuK8zwBIxtS4LqXxcds_9fEskknybVZfsEvGaAdG2WRsheyOfgBSC4oWUskNoyqI1A4dbomcURuKzc0g&utm_content=2&utm_source=hs_email). +2. Open the app and tap **Login**. +3. Enter your Dashboard credentials and tap **Login**. + +### Related Information + +- [Razorpay Mobile App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app.md) +- [Accept payments using Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app/accept-payments/payment-links.md) +- [Track payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app/track-manage.md) +- [Issue refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app/track-manage/issue-refunds.md) diff --git a/llm-content/payments/mobile-app/glossary.md b/llm-content/payments/mobile-app/glossary.md new file mode 100644 index 00000000..2721c719 --- /dev/null +++ b/llm-content/payments/mobile-app/glossary.md @@ -0,0 +1,9 @@ +--- +title: Payments Mobile App | Glossary +heading: Glossary +description: A list of commonly used terms related to Razorpay Payments Mobile app. +--- + +# Glossary + + diff --git a/llm-content/payments/mobile-app/onboarding-videos.md b/llm-content/payments/mobile-app/onboarding-videos.md new file mode 100644 index 00000000..e4c5a4eb --- /dev/null +++ b/llm-content/payments/mobile-app/onboarding-videos.md @@ -0,0 +1,33 @@ +--- +title: L1 & L2 videos +--- + +# L1 & L2 videos + +L1 Individuals + +[Video content] + +L2 Individuals + +[Video content] + +L1 Registered + +[Video content] + +Public Ltd and Private Ltd + +[Video content] + +Proprietorship + +[Video content] + +Partnership + +[Video content] + +NGOs, Trusts and Societies + +[Video content] diff --git a/llm-content/payments/mobile-app/roles-and-permissions.md b/llm-content/payments/mobile-app/roles-and-permissions.md new file mode 100644 index 00000000..8e2805e9 --- /dev/null +++ b/llm-content/payments/mobile-app/roles-and-permissions.md @@ -0,0 +1,8 @@ +--- +title: Roles and Permissions +description: Allow all user roles to access the app and differentiate the access level as per the role assigned. +--- + +# Roles and Permissions + +The owner and admin of a Razorpay account can [assign user roles from the Razorpay web Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md#invite-a-user). Based on the role assigned, when users log in to the mobile app, they will have varying access permissions to access features, as mentioned below. diff --git a/llm-content/payments/mobile-app/settings.md b/llm-content/payments/mobile-app/settings.md new file mode 100644 index 00000000..6d572ecb --- /dev/null +++ b/llm-content/payments/mobile-app/settings.md @@ -0,0 +1,56 @@ +--- +title: Payments | Mobile App - Settings +heading: Settings +description: Check the tabs available under settings on the Razorpay Payments Mobile App - Account details, API keys, Razorpay Assist and Support. +--- + +# Settings + +## Contact Support + +If you are a registered Razorpay user and need help, connect with our best-in-class support team. + +> **INFO** +> +> +> +> **Who is a Registered Razorpay User?** +> +> You are a registered Razorpay user if you: +> - Run a business or are a freelancer. +> - Use Razorpay products to receive payments from your end-users and/or make payouts for business purposes. +> - Have a Razorpay ID. +> +> Not registered yet? [Sign up with Razorpay](https://easy.razorpay.com/) +> + +### Raise a new ticket + +To raise a new ticket: + +1. Log in with your Dashboard credentials. +2. Tap more options (⋮) and tap **Support**. +3. Tap **Raise New Query**. +4. Select the nature of the request. + ![Nature of support ticket on the Razorpay payments mobile app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/mobile-app-raise.jpg.md) +5. Select the sub-category for which you wish to raise a ticket. +6. Check out the existing [ Mobile App FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app/faqs.md) before raising the ticket. If your concern is not addressed, then explain your issue and attach relevant documents or screenshots if possible and tap **Submit**. + ![Support ticket drafting page and related FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/mobile-app-ticket-details.jpg.md) +7. Once you submit your query, you will receive a confirmation mail with your ticket number. + ![Query submitted on the Razorpay payments mobile app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/mobile-app-ticket.jpg.md) + +You can also refer to the [Razorpay Docs](https://razorpay.com/docs) about the various Razorpay offerings, integrations and APIs. + +### Track Status of Open Tickets + +You can view only those tickets that were raised using the Dashboard. To track the status of your open support tickets: +1. Log in with your Dashboard credentials. +2. Tap more options (⋮) and tap **Support**. +3. Select the relevant ticket to view ticket details. + ![Open support queries on Razorpay Payments Mobile App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/mobile-app-follow-up.jpg.md) +4. You can request an update, provide information or add attachments such as an error screenshot. Provide the details and click **Send**. + ![Track the status of a support ticket on Razorpay mobile app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/mobile-app-ticket-reply.jpg.md) + +### Related Information + +- [Razorpay Mobile App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app.md) diff --git a/llm-content/payments/mobile-app/track-manage.md b/llm-content/payments/mobile-app/track-manage.md new file mode 100644 index 00000000..bd1297a5 --- /dev/null +++ b/llm-content/payments/mobile-app/track-manage.md @@ -0,0 +1,70 @@ +--- +title: Track Payments +description: Track payments made by customers using the Razorpay Payments Mobile App. Analyse payment trends on the Razorpay Dashboard and check the payment states. +--- + +# Track Payments + +You can use the Razorpay Mobile app to track payments made by your customers and analyse payment trends over different time periods. + +## How to View and Track Payments + +Watch this video to know how to track and view payment details using Razorpay Payments Mobile app. + +[Video content] + +Follow these steps to track payments: + +1. Log in with your Dashboard credentials. + ![Log in to Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-mobile-app-login.jpg.md) +2. Navigate to **Transactions** → **Payments**. +3. A list of payments appears. You can also filter the payments by: + - Date + ![Filter by Date](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-mobile-app-date.jpg.md) + - Status + ![Filter by Status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-mobile-app-status.jpg.md) +4. Tap on a payment to view details such as: + - Payment state, ID, creation date, payment method, notes and fees breakup. + - Refund initiated for a specific payment, if any. +5. You can also choose to initiate refunds from this screen. + +## Analyse Payment Trends + +Follow these steps to analyse payment trends: + +1. Log in with your Dashboard credentials. +2. On the graph, tap the zoom arrow icon to open the **Payment Insights** screen. + +3. You can choose to view payments for a specific month, week or a preferred time period. + +4. Tap on the graph to view a list of payments for the specified time period. + +Tap the collapse icon to return to the home screen. + +## Payment States + +The table below lists the various payment states and provides a brief description about each. + +Status | Description +--- +Created | A payment is created when the customer submits payment details to Razorpay. The payment has not been processed at this stage. +--- +Authorized | - When the customer's payment details are successfully authenticated by the bank, the Payment state changes to Authorized. +- The amount deducted from the customer’s account by Razorpay is not settled to your account until the payment is captured, either manually or automatically. +- There can be scenarios where payment is interrupted due to external factors, such as network issues or technical errors at the customer's or bank's end. In this case, the amount may get debited from the customer's bank account but the payment status is not received by Razorpay from the bank. This is termed as **Late Authorization**. + +--- +Captured | - The payment status changes to captured when the authorised payment is verified to be complete by Razorpay. +- The amount is settled to your account as per the settlement schedule of the bank. +- The captured amount must be the same as the authorised amount. +- Any authorisation not followed by a capture within 5 days is automatically voided and the amount is refunded to the customer. + +--- +Refunded | The amount is refunded to the customer's account. +--- +Failed | Any unsuccessful transaction is marked as failed. The customer will have to retry the payment. + +### Related Information + +- [Razorpay Mobile App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app.md) +- [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md) diff --git a/llm-content/payments/mobile-app/track-manage/issue-refunds.md b/llm-content/payments/mobile-app/track-manage/issue-refunds.md new file mode 100644 index 00000000..0ef8e699 --- /dev/null +++ b/llm-content/payments/mobile-app/track-manage/issue-refunds.md @@ -0,0 +1,56 @@ +--- +title: Payments Mobile App | Issue Refunds +heading: Issue Refunds +description: Issue refunds to customers using the Razorpay Payments Mobile App and check the various refund states. +--- + +# Issue Refunds + +You can use the Razorpay Mobile app to issue partial or full refunds to your customers. + +## How to Issue a Refund + +Follow these steps to issue a refund: + +1. Log in with your Dashboard credentials. You can also use the **Login With Google** option. If you have enabled the 2FA feature on your account, complete the OTP process. + + ![Payments Mobile App Login](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-mobile-app-login.jpg.md) +2. Navigate to **Transactions** → **Payments**. Tap on the payment for which you have to issue a refund. + +3. Tap **Issue Refund**. + ![Issue Refunds using Razorpay Mobile App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-mobile-app-refund.jpg.md) +4. Provide the following details: + - Enter the refund amount. You can choose to make a full or partial refund. + - Select **Refund Instantly** if you want the refund to reach the customer within a day's time. + +> **INFO** +> +> +> **Handy Tips** +> +> - Instant refund carries additional fees. +> - This feature is available only on Netbanking, UPI and select debit and credit cards. [Check the complete list of payment methods.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/instant.md#payment-methods) +> + + - You can add a comment. This is an optional field. +5. Tap **Issue Full/Partial Refund**. + +6. Tap **Yes, Issue Refund** to confirm. You get a confirmation popup as shown: + + ![successful refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-mobile-app-success-refund.jpg.md) +7. To view the details, tap on the payment for which you initiated a refund. + +## Refund States + +The table below lists the various states in the refund life cycle and provides a brief description about each. + +Status | Description +--- +Pending | Razorpay is attempting to process the refund. +--- +Processed | Once the refund has been processed, it goes to the `processed` state. + +### Related Information + +- [ Razorpay Mobile App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app.md) +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) diff --git a/llm-content/payments/mobile-app/track-manage/view-settlements.md b/llm-content/payments/mobile-app/track-manage/view-settlements.md new file mode 100644 index 00000000..9f8edd48 --- /dev/null +++ b/llm-content/payments/mobile-app/track-manage/view-settlements.md @@ -0,0 +1,40 @@ +--- +title: View Settlements +description: View settlement details using the Razorpay Payments Mobile App and check the various settlement states. +--- + +# View Settlements + +You can use the Razorpay Mobile app to view settlement details. + +## How to View Settlements + +Follow these steps to view settlements: + +1. Log in with your Dashboard credentials. +2. Navigate to **Transactions** → **Settlements**. +3. Tap on a settlement to view more details. You can also filter settlements by: + - Date + + - Status + + +## Settlement States + +The table below lists the various states in the settlement life cycle and provides a brief description about each. + +Status | Description +--- +Created | The settlement is being processed by our nodal banking partners and will be credited to your account. +--- +Processed | The settlement has been successfully credited to your bank account. +--- +Failed | The settlement to your account has failed. You will receive an email from Razorpay informing about the failure. Respond to the email with the requested details to enable settlements for your account. If you do not receive an email from us, you can [raise a Razorpay Support Request.](https://razorpay.com/support/) +Some reasons for failure are: - Your bank account is inactive or frozen. +- Incorrect bank account details. +- The settlement was rejected by your bank. + +### Related Information + +- [Payments Mobile App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app.md) +- [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md) diff --git a/llm-content/payments/offers.md b/llm-content/payments/offers.md new file mode 100644 index 00000000..34b2ec4f --- /dev/null +++ b/llm-content/payments/offers.md @@ -0,0 +1,45 @@ +--- +title: About Offers +description: Provide different types of Offers to customers at the Checkout. +--- + +# About Offers + +Attract customers and improve sales by providing discounts or cashback on your website or apps. Using Razorpay Offers, you can completely control the discounts offered to your customers. You can restrict the payment methods on which the Offers are applied and limit their usage to a defined period. + +> **WARN** +> +> +> **Watch Out!** +> +> We do not support offers on international currency and the CFB (Customer Fee Bearer) model. +> + + +### Advantages + + - Create and run attractive offers on your website, thereby increasing sales. + + - Provide interest-free EMI options with No Cost EMI Offers. + - With the help of Low Cost EMI Offers, provide upfront discounts by splitting the interest cost with your customers. + + - Grow conversions of price-sensitive customers. + - Enjoy customer loyalty by providing offers to returning customers. + - Incremental offers lead to higher average order value, thereby boosting sales. + + +## Customer Experience + +Customers have the opportunity to see the offers that you configure on checkout. They can assess and decide which offer best suits their needs and provides the most advantages or benefits. Additionally, Razorpay will automatically apply the most suitable offer to the chosen payment method, ensuring a seamless and optimised experience for the customer. + +![Display offers on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-apply-checkout.gif.md) + +Know more about the [flow of the payments in Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md). + +### Related Information + +- [Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md) +- [Tutorial On - How to Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/tutorial.md) +- [Offers FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/faqs.md) + +- [EMI² Suite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi².md) diff --git a/llm-content/payments/offers/create.md b/llm-content/payments/offers/create.md new file mode 100644 index 00000000..af3ba6f9 --- /dev/null +++ b/llm-content/payments/offers/create.md @@ -0,0 +1,288 @@ +--- +title: Create Offers +description: Create and manage Offers for customers from the Razorpay Dashboard. +--- + +# Create Offers + +You can create offers from the Dashboard to promote your business. Some of the ways you can control offers at a granular level are: +- Configuring the payment methods permitted for the offer. +- Limiting the number of times the offer can be availed. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - You cannot edit an offer. To make changes, disable the previous offer and create a new one. +> - Only the owner and admin roles can create offers. +> +> - As per the RBI guidelines, the original card number is replaced with a surrogate value called a token. However, we will continue to support BIN-based offers post tokenisation, except BIN-based offers will not work on saved American Express (AMEX) cards. +> +> + +## Design Offers + +You should consider the following while creating offers: + +- Availability of the offer at Checkout. +- A maximum number of times an offer should be applied. +- Whether customers should be allowed to complete payments if validations are not met in the offers. +- Maximum discount that can be availed using the offer. + +- The number of times a payment method, specifically cards, should be used to avail of an offer. + +## Create Offers + +To create an offer: + +1. Log in to the Dashboard. +2. Navigate to **Offers** and click **+ Create New Offer**. + ![Create an Offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-dashboard.jpg.md) +3. The **Create an Offer** window displays four sections. Complete all sections to create the offer: + - [Description](#offer-description) + - [Discount Type](#discount-type) + - [Applicable On](#applicable-on) + - [Offer Validity](#offer-validity) + +You can review the offer configurations at the end under the [**Overview**](#offer-overview) tab. + +### Offer Description + +In the **Description** section, enter the following details. All the fields are mandatory. + +1. **Offer Name**: Enter the name of the offer. For example, **Monsoon Offer**. This appears at Checkout. +2. **Display Text**: Enter a meaningful description for the offer. For example, **10% discount on netbanking payments**. This appears at Checkout. +3. **Terms**: Enter the terms and conditions for the offer. +4. **Offer Type**: Select the type of offer that you want to create. The possible values are: + - **Instant**: The offer is applied instantly. That is, the customer pays only the discounted amount while making the payment. + + - **Cashback**: The customer pays the entire bill amount and receives the cashback to their account from the bank or the wallet provider later. Cashbacks need to be processed by the provider. Create Cashback Offers only if you have an agreement with them. + - **Already Discounted**: You can enforce discounts on customers. This one-time offer is applied to all the customers by default before Checkout. Since the offer has already been used, the amount will not change at checkout. For example, if you provide a 10% discount to all customers on the website, the discounted value will appear on the website and the amount will not change further at Checkout. + +5. Click **Next**. +![Enter the offer details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-description.jpg.md) + +### Discount Type + +There are three types of discounts that can be offered: + +- [Instant](#instant) +- [Cashback](#cashback) +- [Already Discounted](#already-discounted) + +Choose one of these three and create the offer. + +The following sections explain their configuration in detail. + +#### Instant + +In the **Discount Type** section, enter the discount details that should be applied to the offer. + +1. In the **Discount Type** field, select the type of discount that should be applied to the offer: **Percentage** or **Flat** + - **Flat**: In this type, a fixed amount is deducted from the original amount. + 1. **Minimum Order amount**: Enter the minimum bill amount for which the offer can be applied. + 2. **Discount worth**: Enter an amount by which the original price should be reduced. For example, if **₹30** is the **Flat** discount applied, then an amount of **30** is deducted from the original price. + + - **Percentage**: In this type, the offer is calculated in terms of percentage. + 1. **Minimum Order amount**: Enter the minimum bill amount for which the offer can be applied. + 2. **Discount Worth**: The percentage by which the original price should be reduced. For example, if **10** is the **Percentage** discount to be applied, on an order amount of **300**, **30** will be deducted. + 3. **Maximum Discount**: The maximum amount that can be deducted from the bill amount. For example, you can ensure that the customer cannot avail a discount higher than **500**, irrespective of the order amount. +2. Click **Next**. +![Enter the discount details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-discount-type.jpg.md) + +#### Cashback + +In the **Discount Type** section, enter the details of the cashback that should be applied. + +**Cashback Offers** + +Cashbacks need to be processed by the provider (wallet providers, banks and so on). Create Cashback Offers only if you have an agreement with them. + +1. In the **Discount Type** field, select the type of cashback that should be applied to the offer: **Percentage** or **Flat** + - **Flat**: In this type, a fixed amount is paid out to the customer. + 1. **Minimum Order amount**: Enter the minimum bill amount for which the offer can be applied. + 2. **Discount worth**: Enter the amount to be paid out to the customer. + + - **Percentage**: In this type, the offer is calculated in terms of percentage. + 1. **Minimum Order amount**: Enter the minimum bill amount for which the offer can be applied. + 2. **Discount Worth**: The percentage of the order amount that must be paid out as cashback to the customer. For example, if 10% of the order amount is to be paid out to the customer and the amount is 100, the cashback amount will be ₹10. + 3. **Maximum Discount**: The maximum amount that can be offered as cashback. For example, you can ensure that the customer will not be paid more than **100**, irrespective of the order amount. +2. Click **Next**. + ![Create Cashback Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-cashback-1.jpg.md) + +#### Already Discounted + +This is a one-time offer applied to all customers by default before Checkout. Since the offer has already been applied, there will be no change in the amount at Checkout. For example, if you provide a 10% discount to all customers on the website, the discounted value will appear on the website and the amount will not change further at Checkout. + +In the **Discount Type** section, enter the details of the discount: + +1. In the **Discount Type** field, select the type of discount that should be applied to the offer: **Percentage** or **Flat** + - **Flat**: In this type, a fixed amount is deducted from the original amount. + 1. **Minimum Order amount**: Enter the minimum bill amount for which the offer can be applied. + 2. **Discount worth**: Enter an amount by which the original price should be reduced. For example, if **₹30** is the **Flat** discount applied, an amount of **30** is deducted from the original price. + + - **Percentage**: In this type, the offer is calculated in terms of percentage. + 1. **Minimum Order amount**: Enter the minimum bill amount for which the offer can be applied. + 2. **Discount Worth**: The percentage by which the original price should be reduced. For example, if **10** is the **Percentage** discount to be applied, on an order amount of **300**, **30** will be deducted. + 3. **Maximum Discount**: The maximum amount that can be deducted from the bill amount. For example, you can ensure that the customer cannot avail a discount higher than **500**, irrespective of the order amount. +2. Click **Next**. + +![Enter the already discounted details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-already-discounted.jpg.md) + +> **INFO** +> +> +> **Display Already Discounted Offer at Checkout** +> +> If you create an offer with the `Already Discounted` discount type, you must pass the Offer_id parameter while creating the order. This is mandatory for the offer to be available at Checkout. +> + +### Applicable On + +Under the **Applicable On** tab, enter details of the payment method you want to enable the offers. The fields depend upon the selected payment method. +1. Select the **Payment Method** and **Issuer**. + - **Payment Method**: The payment method for which the created offer can be applied. Select from the available options, which are configured for your account: + - **Card** + - **Netbanking** + - **Wallet** + - **UPI** + - **EMI** + - **Cardless EMI** + - **Pay Later** + - **Card or EMI**: If you choose the payment method as **Card** or **EMI**, enter the card-related details as described below: + - **Card Type**: Select the type of the card. The possible values are: + - **Debit Card** + - **Credit Card** + - **Both Debit and Credit Cards** (This is applicable only if you choose **Card** as the payment method) + - **Bank**: Select the bank that issued the card. + - **Network**: Select the network of the card. + - **Maximum Usage Per Card**: Enter the number of times the selected card can be used to avail the offer. + +> **WARN** +> +> +> **Watch Out!** +> +> Max usage offers will only work on Visa, MasterCard and Rupay cards post tokenisation. +> + + - **IINs**: Enter the first six digits of the card (that is printed on the front of the card). In the case of Rupay cards, enter the tokenised IIN only. + +> **INFO** +> +> +> **Handy Tips** +> +> We will use the network par(payment account reference) API to identify the max usage per card post tokenisation. In some cases, the offer may be invalid depending on the network of the card. +> + + - **Netbanking**: The bank for which the offer is applicable. + - **Issuer**: Select the required bank. + + - **Wallet**: Select the wallet provider that supports the offer. + - **Issuer**: Select the appropriate wallet provider. + +2. Click **Next**. + +![Enter the payment method details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-applicable-on.jpg.md) + +### Offer Validity + +Under the **Offer Validity** tab, set how long the offer should be valid and how you want to handle the payment failure situations. + +1. **Starting On**: Select the **Starts Immediately** check box for the offer to come into effect immediately. Alternatively, you can select the date and the time from which the created offer should become active. +2. **Expires On**: Select the date and time at which the offer should end. For example, **31 Oct 2020** at **11:59pm**. +3. **On Payment Failure**: Define how to handle payment failure. + - **Do not allow payment to go through**: The payment is failed. + - **Allow customer to pay without availing offer**: The payment is allowed even though the set validations are not met. However, the offer is not applied to the bill amount. The customer will be charged the entire order amount. + For this example, we will allow payments to go through. +4. **Max Usage**: Set the number of times the offer should be applied across all transactions. For example, **100**. +5. **Show Offer on Checkout**: Select this check box for the offer to be displayed for all Standard Checkout payments including [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md). Know more about the different ways to [display offers on Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/standard-integration.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> If you are not using products and plugins like Razorpay Magento, Shopify, WooCommerce, Payment Links, Payment Buttons, Payment Pages and Invoices to accept payments, you **should** integrate offers with the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) for the feature to work. +> + + + + + +6. Click **Next**. + +![Enter the offer validity details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-offer-validity.jpg.md) + +### Offer Overview + +Click the **Overview** tab to view the summary of the offer that you just created. + +1. **Terms and Conditions**: Select the check box after you have read the disclaimer. +2. Click **Create Offer**. + + ![Check the terms and conditions and create an offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-overview.jpg.md) + +By default, all the created offers will be in the **enabled** state. + +## Test the Offer + +You can test the created offer for all Standard Checkout payments, including [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md), [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md), [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md) and so on. + +> **INFO** +> +> +> **Handy Tips** +> +> - You can toggle between Live and Test Modes on your **Dashboard**. Navigate to the top menu ribbon and click the drop-down icon against **Live Mode**. Toggle to **Test Mode** and test the offers enabled. +> +> - You can make test payments using one of the payment methods at the Checkout. No money is deducted from your account as this is a simulated transaction. +> + +For this example, we will test the offer on a valid Payment Link. Follow the steps given below: + +1. Select the **Payment Link Id** you wish to test the created offer from the Dashboard. +2. Copy the **Payment Link** URL and open it in your browser. + ![Payment Link Test Offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offer-dashboard-test.jpg.md) +3. Enter your contact details and click **Proceed**. The relevant offers appear upfront on checkout. +4. Select the offer you created from the Dashboard and click **Apply Offer**. +5. Select the payment option you created the offer on from the Dashboard. Enter the required [test details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md) and click **PAY**. +6. Select Success or Failure, depending on which flow you wish to test. +7. You should see a confirmation message depending on the flow you have selected. + +On successful payment, you should have received a discount on your payment. You can verify this by navigating to the Transactions → Payments tab and viewing the payment details. + +![Verifying transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offer-details.jpg.md) + +## Integrate Offer with Standard Checkout + +Now that an Offer is created, you should integrate Offers with Checkout for customers to avail the discounts and make payments. + +Know how to [integrate Offers with Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/standard-integration.md). + +## Disabling Offers + +Watch this video to see how to disable an offer. + +To disable an offer: + +1. Log in to the Dashboard. +2. Navigate to **Offers** to view a summary of the existing offers. +3. Select the required Offer_id. +4. In the pane that appears, go to the **Status** field and click **Disable**. + + ![Disable the offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-disable_offer.jpg.md) + +## Next Steps + +After you create an offer, it needs to be integrated with Checkout for the customers to view and avail the offers while making payments. Know more about [integrating offers with Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/standard-integration.md). + +### Related Information + +- [Tutorial - How to Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/tutorial.md) +- [Integrate offers with Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/standard-integration.md) +- [Offers FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/faqs.md) diff --git a/llm-content/payments/offers/custom-integration.md b/llm-content/payments/offers/custom-integration.md new file mode 100644 index 00000000..33835376 --- /dev/null +++ b/llm-content/payments/offers/custom-integration.md @@ -0,0 +1,218 @@ +--- +title: Integrate Offers with Custom Checkout +description: Integrate Offers with Custom Checkout built using Razorpay.js. +--- + +# Integrate Offers with Custom Checkout + +In the Checkout form designed to meet your business needs and branding, you can display Offers so that customers can derive maximum advantage from them while you promote your business. + +> **INFO** +> +> +> **New to Custom Checkout Integration?** +> +> If yes, know more about the [custom integration flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). +> + +## Prerequisites + +Before integrating offers for your custom Checkout, run through this checklist: + +1. Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#payment-life-cycle). + +2. Generate the API keys from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys). + +> **WARN** +> +> +> **Watch Out!** +> +> A customer's payment information should never reach your servers unless you are PCI-DSS certified. +> + +## Steps to Integrate + +The procedure for integrating Custom Checkout on your website is explained in the [Custom Integration document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). However, the procedure varies while passing the offers in the payment details. + +1. [Create Offers on Dashboard](#step-1-create-offers-on-dashboard) +2. [Create Orders to include the Offers in the payment request](#step-2-create-orders-and-pass-offer_id) +3. [Submit the payment details to Razorpay](#step-3-submit-payment-details) + +### Step 1: Create Offers on Dashboard + +You can create offers from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md). + +### Step 2: Create Orders and Pass Offer_id + +After generating offers from the Dashboard, pass the `offer_id` in the order request attributes to the following endpoint: + +#### Sample Request + +Use the sample codes given below: + +/orders + +```curl: Sample Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "offer_id": "offer_DtEhEm3XslgfXE" +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("offers", "offer_DtEhEm3XslgfXE"); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": "offer_ANZoaxsOww2X53" +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 1000, 'currency' => 'INR', 'offer_id'=> 'offer_JTUADI4ZWBGWur')); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("offer_id", "offer_JTUADI4ZWBGWur"); +Order order = client.Order.Create(options); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 1000, currency: 'INR', receipt: 'receipt#1', offer_id: 'offer_ANZoaxsOww2X53' +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000, + currency: "INR", + receipt: "receipt#1", + offer_id: "offer_ANZoaxsOww2X53" +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_DtEkng132N71M8", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": null, + "order_id": "order_CjyltuCttYiMe8", + "offer_id": "offer_DtEhEm3XslgfXE", + "offers": [ + "offer_DtEhEm3XslgfXE" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1576577191 +} +``` + +#### Request Parameters + +Using the following attributes, send an order request using the Orders API. + +`amount` _mandatory_ +: `integer` Enter the amount for which the order is to be created. For example, if the amount to be charged is ₹299.95, then pass `29995` in this field. + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the order amount. For example,`INR`. + +`offer_id` _mandatory_ +: `string` Unique identifier of the offer. Pass the `offer_id` obtained from the response of the previous step. + + +> **INFO** +> +> +> **Handy Tips** +> +> This is mandatory only in cases where you want to associate an offer or offers with the Order or you had not selected the [Show Offer on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md#offer-validity) while creating the offer from the Dashboard. +> + +### Step 3: Submit Payment Details + +Once the order is created and the customer's payment details are obtained, the information should be sent to Razorpay to complete the payment. The data that needs to be submitted depends upon the payment method selected by the customer. + +While invoking the `createPayment` method, pass the `order_id` and the `offer_id` in the payment request as follows: + +```js: Checkout +var data = { + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR", // Default is INR. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + offer_id: 'offer_DtEhEm3XslgfXE', + order_id: 'order_DtEkng132N71M8', // pass the Order ID generated in Step 2 + method: 'netbanking', // method specific fields + bank: 'HDFC' +}; + +$btn.on('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on('payment.success', function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + + razorpay.on('payment.error', function(resp){alert(resp.error.description)}); // will pass error object to error handler + +}) +``` + +Know more about [Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). + +## Next Steps + +After the customer has availed the offers and made the payment at the Checkout, you can track the status of the payments: + +- From the Dashboard. +- By [configuring webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). +- By polling our [payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#fetch-payments-based-on-orders). + +### Related Information + +- [About Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers.md) +- [Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md) +- [Tutorial - How to Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/tutorial.md) diff --git a/llm-content/payments/offers/faqs.md b/llm-content/payments/offers/faqs.md new file mode 100644 index 00000000..d0072fd8 --- /dev/null +++ b/llm-content/payments/offers/faqs.md @@ -0,0 +1,41 @@ +--- +title: Offers - FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Payment Offers. +--- + +# Frequently Asked Questions (FAQs) + +### 1. How can I edit an Offer? + + You cannot edit an offer once you create it. To make changes, [disable](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md#disabling-offers) the previous offer and [create](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md) a new one. + + + +### 2. Who manages Offer usage limitations? + + You are expected to pass the appropriate Offer id at the time of creating an order to manage usage limitations. + + + +### 3. Can we create Offers on Customer Fee Bearer (CFB) model? + + No, we do not support offers on CFB model. + + + +### 4. How can I disable an Offer? + + To disable an offer: + + 1. Log in to the Dashboard. + 2. Navigate to **Offers** to view a summary of the existing offers. + 3. Select the required Offer_id. + 4. In the pane that appears, go to the **Status** field and click **Disable**. + 5. Click **Yes, Disable**. + + + +### 5. Can I automatically apply an offer to all prepaid orders without requiring customers to manually select it? + + No, Razorpay Offers cannot be automatically applied to all prepaid orders without any user interaction or payment method selection. Offers are designed to be associated with specific payment methods (cards, UPI, netbanking and so on) and are displayed at checkout for customers to choose. diff --git a/llm-content/payments/offers/low-cost-emi.md b/llm-content/payments/offers/low-cost-emi.md new file mode 100644 index 00000000..9fffa279 --- /dev/null +++ b/llm-content/payments/offers/low-cost-emi.md @@ -0,0 +1,94 @@ +--- +title: About Low Cost EMI Offers +description: Provide Low Cost EMI Offers to customers at the Razorpay Checkout. +--- + +# About Low Cost EMI Offers + +With Low Cost EMI, you can now balance providing affordable financing to customers while maintaining a sustainable financial model. You can decide the cost to subvent for each EMI tenure and the customer bears the remaining cost. +This approach ensures that customers enjoy the benefits of EMI at an affordable price, helping you minimise the overall cost. + +> **INFO** +> +> +> **Handy Tips** +> +> You can create Low Cost EMI Offers on Credit and Debit card EMIs only. +> + +## Advantages + + + - Attracts more customers put off by high upfront costs, resulting in up to 20% sales boost. + - Businesses maintain financial health by sharing EMI costs with customers, thus balancing their books effectively. + - Offering extended EMI plans encourages customers to afford and consider premium products, ultimately boosting the average order value by up to 30%. + - Razorpay's user-friendly offer engine streamlines Low Cost EMI implementation with a few clicks, reducing entry barriers for businesses. + + + - Customers can spread costs over time, making expensive items accessible to more people. + - Businesses covering part of the installments reduce the overall cost, easing customers' financial burden. + - Longer EMI terms offer budget flexibility, allowing customers to align plans with their financial goals. + + +> **INFO** +> +> +> **Handy Tips** +> +> An EMI discount will be applied to the customer's purchase to partially cover the interest the bank charges. For example, if the bank's interest is 4.5%, you can partially cover 3%, and the customer bears the remaining 1.5%. +> + +## Example + +Let us consider the example of a customer buying a mobile phone worth ₹15,000 on Low Cost EMI on a 3-month EMI period. The bank charges 16% interest per annum. + +### Calculation of EMI + +The Low Cost EMI calculation is given below: + + + + Components | Amount/Interest Rate/Months + --- + Cost of mobile phone | ₹15,000 + --- + Tenure | 3 months + --- + Annual interest rate | 16% + --- + Effective interest rate for 3 months | 2.61% + --- + Interest subvented by you | 2% + --- + Discount offered @ 2% | (-) ₹300 + --- + Amount paid to you after discount | ₹14,700 + + + + + Components | Amount/Interest Rate/Months + --- + Amount repaid to bank in EMI | ₹15,000 + --- + Effective interest paid to bank @ 0.61% for 3 months | ₹91.5 + --- + Net amount paid | ₹15,091.5 + + + +> **WARN** +> +> +> **Watch Out!** +> +> Razorpay pricing is not included in this. It is applied in addition to the above amount. +> + +### Related Information + +- [Create Low Cost EMI Offers from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/create.md) +- [Integrate Low Cost EMI Offers with Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/standard-integration.md) +- [Tutorial: How to Create Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/tutorial.md) +- [Low Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/faqs.md) +- [EMI²](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi².md) diff --git a/llm-content/payments/offers/low-cost-emi/create.md b/llm-content/payments/offers/low-cost-emi/create.md new file mode 100644 index 00000000..487716a6 --- /dev/null +++ b/llm-content/payments/offers/low-cost-emi/create.md @@ -0,0 +1,158 @@ +--- +title: Create Low Cost EMI Offers +description: Create Low Cost EMI Offers from the Razorpay Dashboard. +--- + +# Create Low Cost EMI Offers + +A Low Cost EMI is an offer where you can decide the cost to subvent for each EMI tenure and the customer bears the remaining cost. +This approach ensures that customers enjoy the benefits of EMI at an affordable price, helping you minimise the overall cost. + +**Handy Tips** + +Once you create a Low Cost EMI offer, you cannot edit it. To make changes, disable the previous offer and create a new one. + +You can review the offer configurations at the end under the [**Overview**](#overview) tab. + +## Description + +In the **Description** section, enter the following details. All the fields are mandatory. + +1. **Offer Name**: Enter the name of the offer. For example, **Diwali Dhamaka**. This appears at the Checkout. +2. **Display Text**: Enter a meaningful description for the offer. For example, **Low Cost EMI Offers**. This appears at the Checkout. +3. **Terms**: Enter the terms and conditions for this offer. +4. Click **Next**. + ![Enter the offer details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-low-cost-emi-description.jpg.md) + +## Discount Type + +In the **Discount Type** section, enter the discount details that should be applied to the offer. + +1. **Minimum Order amount**: Enter the minimum bill amount for which the Low Cost EMI Offer can be applied. For example, the offer can be applied to a minimum amount of **₹4,000**. This is a mandatory field. +2. **Maximum Order amount**: Enter the maximum bill amount for which the Low Cost EMI Offer can be applied. For example, the offer can be applied to a maximum amount of **₹1,00,000**. +3. Click **Next**. + ![Enter the discount details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-low-cost-emi-discount-type.jpg.md) + +## Applicable On + +Under the **Applicable On** tab, fill in the following details: + +1. **Issuer**: Select the bank issuing the Low Cost EMI and click **Next**. +2. **EMI Tenure**: Select the tenures to be listed at the Checkout. +3. **EMI Offer Type**: Select **Low Cost EMI** from the drop-down list and configure the interest rate that you will bear for each tenure. The remaining interest rate is auto-filled which is borne by the customer. +4. Click **Next**. + ![Enter the payment method details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-low-cost-emi-applicable-on.jpg.md) + +## Additional Offer Type + +> **INFO** +> +> +> +> **Feature Request** +> +> This feature is being released out gradually and may not be available to all businesses yet. +> +> + +In the Additional Offer Type section, you can configure extra incentives to make your Low Cost EMI offer more attractive to customers. This step allows you to provide additional discounts or cashback rewards on top of the reduced interest EMI benefit. + +> **INFO** +> +> +> **Handy Tip** +> +> This additional offer will be applied on top of the EMI discount. +> + +1. **Additional Offer**: From the dropdown menu, select the type of additional offer you want to provide: + - **Instant Discount**: Provides an immediate reduction in the order amount at the time of purchase. + - **Cashback**: Credits the discount amount back to the customer's account after successful payment completion. + +> **WARN** +> +> +> **Watch Out!** +> +> Please note that cashback processing is handled externally and not managed by Razorpay. +> + +2. **Tenures Applicable**: Select the specific EMI tenures for which this additional offer applies. You can choose from the tenures that were configured in the previous step. + +3. **Discount**: Choose between a flat amount or a percentage-based discount: + + - **Flat**: Enter a fixed discount amount in rupees. + - **Percentage**: Enter a percentage-based discount with a maximum limits. + +4. **Discount Worth**: Enter the discount amount in cash value. For example, ₹1000. +The field shows "Discount worth in cash" as a helper text to clarify the input format + +5. Click **Next**. + + ![Configure additional offer type for enhanced customer benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-no-cost-emi-applicable-offer-type.jpg.md) + +## Offer Validity + +In the **Offer Validity** tab, set how long the offer should be valid and how you want to handle the payment failure situations: + +1. **Starting On**: Select the **Starts Immediately** check box for the offer to come into effect immediately. Alternatively, you can select the date and time the created Offer should become active. +2. **Expires On**: Select the date and time the offer should end. +3. **On Payment Failure**: Define how to handle payment failure. + - **Do not allow payment to go through**: The payment has failed. + - **Allow customer to pay without availing offer**: The payment is allowed even though the set validations are not met. However, the offer is not applied to the bill amount. The customer will be charged the entire order amount. +4. **Max Usage**: Set the number of times the offer should be applied across all transactions. For example, **100**. +5. **Show Offer on Checkout**: Select this check box for the created offer to be displayed for all Standard Checkout payments including [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md). +6. Click **Next**. + + ![Enter the offer validity details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-low-cost-emi-offer-validity.jpg.md) + +## Overview + +Click the **Overview** tab to view the offer summary you just created. + +1. **Terms and Conditions**: Select the check box after you have read the disclaimer. +2. Click **Create EMI Offer**. + ![Check the terms and conditions and create an offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-low-cost-emi-overview.jpg.md) + +By default, all the created offers are in the **enabled** state. + +## Test the Low Cost EMI Offer + +You can test the created Low Cost EMI offer for all Standard Checkout payments, including [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md), [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md), [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md) and so on. + +> **INFO** +> +> +> **Handy Tips** +> +> - You can toggle between Live and Test Modes on your **Dashboard**. Navigate to the top menu ribbon and click the drop-down icon against **Live Mode**. Toggle to **Test Mode** and test the offers enabled. +> +> - You can make test payments using one of the payment methods at the Checkout. No money is deducted from your account as this is a simulated transaction. +> + +We will test the offer using a valid Payment Link for this example. Follow the steps given below: + +1. Select the **Payment Link Id** you wish to test the created offer from the Dashboard. + ![Payment Link Test Offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offer-dashboard-test.jpg.md) +2. Copy the **Payment Link** URL and open it in your browser. +3. Enter your contact details and click **Proceed**. +4. Select **EMI**. +5. Select the payment option you created for the offer on from the Dashboard. Select the EMI plan and enter the required [test details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md). +6. Click **Pay via EMI** +7. Select **Success** or **Failure**, depending on which flow you wish to test. +8. You should see a confirmation message depending on the flow you have selected. + +On successful payment, you should have received a discount on your payment. You can verify this by navigating to the **Transactions** → **Payments** tab and viewing the payment details. + +## Disabling Low Cost EMI Offers + +To disable Low Cost EMI offers: + +## Next Steps + +Now that the Low Cost EMI is created, you should integrate it with the Checkout for customers to avail the EMI scheme. +Know more about [integrating Low Cost EMI Offers with Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/standard-integration.md). + +### Related Information +- [Tutorial - How to Create Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/tutorial.md) +- [Low Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/faqs.md) diff --git a/llm-content/payments/offers/low-cost-emi/custom-integration.md b/llm-content/payments/offers/low-cost-emi/custom-integration.md new file mode 100644 index 00000000..65ddf6ef --- /dev/null +++ b/llm-content/payments/offers/low-cost-emi/custom-integration.md @@ -0,0 +1,243 @@ +--- +title: Integrate Low Cost EMI Offers with Custom Checkout +description: Integrate Low Cost EMI Offers with Custom Checkout built using Razorpay.js. +--- + +# Integrate Low Cost EMI Offers with Custom Checkout + +In the Checkout form designed to meet your business needs and branding, you can display Low Cost EMI Offers to attract a broader customer base by reducing the upfront cost barrier, leading to increased sales and higher average order values. + +You can decide the cost to subvent for each EMI tenure while [creating an offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/create.md) and the customer bears the remaining cost. This approach ensures that customers enjoy the benefits of EMI at an affordable cost, helping you minimise the overall cost. + +> **INFO** +> +> +> **New to Custom Checkout Integration?** +> +> If yes, know more about the [custom integration flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). +> + +## Prerequisites + +Before integrating Low Cost EMI offers for your custom Checkout, run through this checklist: + +1. Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#payment-life-cycle). +2. Generate the API keys from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys). + +> **WARN** +> +> +> **Watch Out!** +> +> A customer's payment information should never reach your servers unless you are PCI-DSS certified. +> + +## Integration Steps + +The procedure for integrating Custom Checkout on your website is explained in the [Custom Integration document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). However, the procedure varies while passing the offers in the payment details. + +1. [Create a Low Cost EMI Offer](#step-1-create-a-low-cost-emi-offer) +2. [Create an Order and Pass Offer_id](#step-2-create-an-order-and-pass-offer-id) +3. [Show the Offer on Checkout](#step-3-show-the-offer-on-checkout) +4. [Submit Payment Details](#step-4-submit-payment-details) + +## Step 1: Create a Low Cost EMI Offer + +You can create a Low Cost EMI offer from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md). + +> **WARN** +> +> +> **Watch Out!** +> +> After the offer creation, you need to save the breakdown of the interest rate percentage (subvented by you and your customer) and offer ID at your end. +> + +## Step 2: Create an Order and Pass Offer_id + +After generating the offer from the Dashboard, pass the `offer_id` in the order request attributes to the following endpoint: + +> **WARN** +> +> +> **Watch Out!** +> +> For Low Cost EMI, a separate `offer_id` is created for each tenure. +> + +### Sample Request + +Use the sample codes given below: + +/orders + +```curl: Sample Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "offer_id": "offer_DtEhEm3XslgfXE" +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("offers", "offer_DtEhEm3XslgfXE"); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": "offer_ANZoaxsOww2X53" +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 1000, 'currency' => 'INR', 'offer_id'=> 'offer_JTUADI4ZWBGWur')); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("offer_id", "offer_JTUADI4ZWBGWur"); +Order order = client.Order.Create(options); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 1000, currency: 'INR', receipt: 'receipt#1', offer_id: 'offer_ANZoaxsOww2X53' +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000, + currency: "INR", + receipt: "receipt#1", + offer_id: "offer_ANZoaxsOww2X53" +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_DtEkng132N71M8", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": null, + "order_id": "order_CjyltuCttYiMe8", + "offer_id": "offer_DtEhEm3XslgfXE", + "offers": [ + "offer_DtEhEm3XslgfXE" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1576577191 +} +``` + +### Request Parameters + +Using the following attributes, send an order request using the Orders API. + +`amount` _mandatory_ +: `integer` Enter the amount for which the order is to be created. For example, if the amount to be charged is ₹299.95, then pass `29995` in this field. + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the order amount. For example,`INR`. + +`offer_id` _mandatory_ +: `string` Unique identifier of the offer. Pass the `offer_id` obtained from the response of the previous step. + + +> **INFO** +> +> +> **Handy Tips** +> +> This is mandatory only in cases where you want to associate an offer or offers with the Order or you had not selected the [Show Offer on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md#offer-validity) while creating the offer from the Dashboard. +> + +## Step 3: Show the Offer on Checkout + +You need to show the availability of Low Cost EMI Offers on checkout. Customers should be able to view the discount on interest being given to them and how much interest they need to bear. + +For example, you can view the image below to see how Low Cost EMI offers appear on [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/low-cost-emi.md). + +![Low Cost EMI on Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/low-cost-emi-standard.jpg.md) + +## Step 4: Submit Payment Details + +Once the order is created and the customer's payment details are obtained, the information should be sent to Razorpay to complete the payment. The data that needs to be submitted depends upon the payment method the customer selects. + +While invoking the `createPayment` method, pass the `order_id` and the `offer_id` in the payment request as follows: + +```js: Checkout +var data = { + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR", // Default is INR. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + offer_id: 'offer_DtEhEm3XslgfXE', + order_id: 'order_DtEkng132N71M8', // pass the Order ID generated in Step 2 + method: 'netbanking', // method specific fields + bank: 'HDFC' +}; + +$btn.on('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on('payment.success', function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + + razorpay.on('payment.error', function(resp){alert(resp.error.description)}); // will pass error object to error handler + +}) +``` + +Know more about [Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). + +## Next Steps + +After the customer has availed the offer and made the payment at the Checkout, you can track the status of the payments: + +- From the Dashboard. +- By [configuring webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). +- By polling our [payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#fetch-payments-based-on-orders). + +### Related Information +- [About Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi.md) +- [Create Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/create.md) +- [Tutorial - How to Create Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/tutorial.md) diff --git a/llm-content/payments/offers/low-cost-emi/faqs.md b/llm-content/payments/offers/low-cost-emi/faqs.md new file mode 100644 index 00000000..b4b44dc3 --- /dev/null +++ b/llm-content/payments/offers/low-cost-emi/faqs.md @@ -0,0 +1,67 @@ +--- +title: Low Cost EMI - FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Low Cost EMI. +--- + +# Frequently Asked Questions (FAQs) + +### 1. Why should I run Low Cost EMI Offers? + + Running Low Cost EMI Offers helps you attract a wider customer base by reducing the upfront cost barrier. This leads to increased sales and higher average order values. + + Additionally, offering discount on interest for longer tenures sets you apart in a competitive market and opens opportunities for upselling, contributing to overall business growth and financial stability. + + + +### 2. Who bears the cost for the discount given in Low Cost EMI? + + As a business, you would bear the partial cost of Low Cost EMI, which appears as an upfront discount on the product cost to the end consumer. + + You can decide the cost to subvent for each tenure and the customer bears the remaining cost. The interest percentage will vary by the bank and the EMI tenure. Know more about the [EMI Calculation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi.md#calculation-of-emi). + + + +### 3. Which payment methods can be used for Low Cost EMI? + + Low Cost EMI is available on all credit and debit card EMIs. + + + +### 4. Will the customers' banks continue to charge them interest? + + Yes, the customers' banks will continue to charge them interest. However, partial interest subvented by you appears as an upfront discount to the customers at the time of purchase. + + + +### 5. Can I enable Low Cost EMIs at the Checkout? + + Yes. Razorpay enables you to display Low Cost EMIs at the Checkout. Know more about [Low Cost EMIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi.md). + + + +### 6. How can I know about the percentage discount of the Low Cost EMI that I bear? + + You can decide how much percentage of the total interest you want to subvent during offer creation. This appears as an upfront discount on the product cost and the customer bears the remaining cost. + + + +### 7. How does the Low Cost EMI settlement work? + + The order amount minus the discount subvented by you is settled in your bank account as per your [settlement cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md#settlement-cycle). + + +> **WARN** +> +> +> **Watch Out!** +> +> Razorpay pricing is not included in this settlement, it will be applied in addition to the above amount. +> + + + + +### 8. Can I create Low Cost EMI offers on Cardless EMI? + + No, we do not support Low Cost EMI offers on Cardless EMI. diff --git a/llm-content/payments/offers/low-cost-emi/s2s-integration.md b/llm-content/payments/offers/low-cost-emi/s2s-integration.md new file mode 100644 index 00000000..bd9083b9 --- /dev/null +++ b/llm-content/payments/offers/low-cost-emi/s2s-integration.md @@ -0,0 +1,299 @@ +--- +title: Integrating Low Cost EMI Offers in Server-to-Server (S2S) +description: Integrate Low Cost EMI Offers in your payment flow while making direct API calls to Razorpay server. +--- + +# Integrating Low Cost EMI Offers in Server-to-Server (S2S) + +You can integrate Low Cost EMI offers with your payment flows while integrating directly with our APIs. + +## Prerequisites + +Generate the API keys to start your integration. The keys are required for authenticating API requests with our servers. + +Log in to the Dashboard to generate the API keys, if you have not done earlier. To make the direct API calls, you need the `Key_Secret`. + +## Integration Steps + +1. [Create a Low Cost EMI Offer](#step-1-create-a-low-cost-emi-offer) +2. [Create an Order and Pass Offer_id](#step-2-create-an-order-and-pass-offer-id) +3. [Create a Payment](#step-3-create-a-payment) +4. [Show the Offer on Checkout](#step-4-show-the-offer-on-checkout) +5. [Verify the Payment](#step-5-verify-the-payment) + +## Step 1: Create a Low Cost EMI Offer + +[Create a Low Cost EMI offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md) from the Dashboard. + +> **WARN** +> +> +> **Watch Out!** +> +> After the offer creation, you need to save the breakdown of the interest rate percentage (subvented by you and your customer) and offer ID for each tenure at your end to [show the offer on checkout](#step-4-show-the-offer-on-checkout). +> + +## Step 2: Create an Order and Pass Offer_id + +After generating the offer from the Dashboard, pass the `offer_id` in the order request attributes to the following endpoint: + +> **WARN** +> +> +> **Watch Out!** +> +> For Low Cost EMI, a separate `offer_id` is created for each tenure. +> + +/orders + +```curl: Sample Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "offer_id": "offer_DtEhEm3XslgfXE" +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("offers", "offer_DtEhEm3XslgfXE"); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": "offer_ANZoaxsOww2X53" +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => 'INR', 'offer_id'=> 'offer_JTUADI4ZWBGWur')); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("offer_id", "offer_JTUADI4ZWBGWur"); +Order order = client.Order.Create(options); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', offer_id: 'offer_ANZoaxsOww2X53' +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 50000, + currency: "INR", + receipt: "receipt#1", + offer_id: "offer_ANZoaxsOww2X53" +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_DtEkng132N71M8", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": null, + "order_id": "order_CjyltuCttYiMe8", + "offer_id": "offer_DtEhEm3XslgfXE", + "offers": [ + "offer_DtEhEm3XslgfXE" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1576577191 +} +``` + +## Step 3: Create a Payment + +Send the following attributes required to create a payment at the following endpoint: + +/payments/create/json + +### Sample Code + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ +-d'{ + "amount": 1000, + "currency": "INR", + "contact": 8888888888, + "email": "gaurav@gmail.com", + "order_id": "order_CjyltuCttYiMe8", + "method": "emi", + "emi_duration": 9, + "card":{ + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + } +}' + +```curl: Response +{ + “razorpay_payment_id”: “pay_MfMzOzUwDKgznE”, + “next”: [ + { + “action”: “redirect”, + “url”: “https://api.razorpay.com/v1/payments/MfMzOzUwDKgznE/authenticate” + }, + { + “action”: “otp_generate”, + “url”: “https://api.razorpay.com/v1/payments/pay_MfMzOzUwDKgznE/otp_generate?track_id=MfMzOzUwDKgznE&key_id=rzp_test_XXXXXXXXXXXXXX” + } + ] +} +``` + +### Request Parameters + +`key_id` _mandatory_ +: `string` The key id that you have generated from the **API Keys** tab in the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, `INR`. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order. + Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`ip` _mandatory_ +: `string` Customer's IP address. + +`email` _mandatory_ +: `string` Email address of the customer. Maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. Maximum length supported is 15 characters, inclusive of country code. + +`method` _mandatory_ +: `string` Name of the payment method. Possible value is `emi`. + +`card` +: Details associated with the card. Required if the payment method is `card`. + + `number` _mandatory_ + : `string` Unformatted card number. Required if the method is `card`. + + `name` _mandatory_ + : `string` Name of the cardholder. Required if the method is `card`. + + `expiry_month` _mandatory_ + : `integer` Expiry month for card in `MM` format. Required if the method is `card`. + + `expiry_year` _mandatory_ + : `string` Expiry year for card in `YY` format. Required if the method is `card`. + + `cvv` _mandatory_ + : `string` CVV printed on the back of card. Required if the method is `card`. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +`emi_duration` +: `string` The EMI duration in months. Required if the method is `emi`. + +`notes` _optional_ +: `object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`referrer` _optional_ +: `string` Referrer header passed by the client's browser. + +`user_agent` _optional_ +: `string` Customer user-agent. + +### Response Parameters + +If the payment request is valid, the response contains the following fields. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + +`action` +: `string` An indication of the next step available to you to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the bank page. + +`url` +: `string` URL to be used for the action indicated. + +## Step 4: Show the Offer on Checkout + +You need to show the availability of Low Cost EMI Offers on checkout. Customers should be able to clearly view the discount on interest being given to them and how much interest they need to bear. + +For example, you can view the image below to see how Low Cost EMI offers appear on [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/low-cost-emi.md). + +![Low Cost EMI on Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/low-cost-emi-standard.jpg.md) + +## Step 5: Verify the Payment + +Once the customer completes the payment, a `POST` request is sent to the `callback_url` provided in the [payment create request](#step-3-create-a-payment). The data contained in the `POST` request depends on the **success** or **failure** of the payment made by the customer. + +## Next Steps + +After the customer has availed the offers and made the payment on the Checkout, you can track the status of the payments: + +- From the Dashboard. +- By [configuring webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). +- By polling our [payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#fetch-payments-based-on-orders). + +### Related Information +- [About Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi.md) +- [Create Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/create.md) +- [Tutorial - How to Create Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/tutorial.md) diff --git a/llm-content/payments/offers/low-cost-emi/standard-integration.md b/llm-content/payments/offers/low-cost-emi/standard-integration.md new file mode 100644 index 00000000..b1996ef0 --- /dev/null +++ b/llm-content/payments/offers/low-cost-emi/standard-integration.md @@ -0,0 +1,242 @@ +--- +title: Integrate Low Cost EMI Offers with Standard Checkout +description: Display general or order specific Low Cost EMI Offers on Standard Checkout. +--- + +# Integrate Low Cost EMI Offers with Standard Checkout + +After creating [ Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/create.md) from the Dashboard, you have to integrate them with Razorpay Standard Checkout so that your customers can avail them while making payments. + +> **WARN** +> +> +> **Integrate Offers with Orders API** +> +> If you use our JS, SDK files or other ecommerce plugins, you **should** integrate offers with the Orders API. +> + +## Exception + +You need **not** integrate offers with Orders API, if you use any of the following Razorpay products or plugins to accept payments: + + - Plugins: Razorpay Magento, Shopify, or WooCommerce. + - Products: Payment Links, Payment Buttons, Payment Pages and Invoices. + +This is because Razorpay automatically creates orders for these products or plugins when customers initiate payment at the Checkout. + +## Validation Criteria + +Only those Low Cost EMI offers that pass the following validations are displayed at the Checkout: + +Criteria | Description +--- +**Amount Match** | Order amount should be more than or equal to the [Minimum Order Amount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/create.md) set in an offer. +--- +**EMI Offer Type** | Select **Low Cost EMI** as the offer type and configure the interest that you and your customer will bear. +--- +**Validity** | Offer should be in the active or enabled state. +--- +**Date Validation** | The current date lies within the range of the `start` and `end` date defined in the offer. +--- +**Usage** | You can define the maximum number of times an offer can be availed. If this limit is met, the offer will not be displayed on Checkout. +--- +**Show Offer on Checkout** | This option must be enabled while the offer is created. This determines whether the offer will be displayed at the Checkout or not. + +## Display Low Cost EMI Offers at Checkout + +There are two ways in which you can display Low Cost EMI offers at the Razorpay Checkout: + +- [Display Low Cost EMI Offers by Default](#method-1-display-low-cost-emi-offers-by-default) +- [Display Limited Low Cost EMI Offers](#method-2-display-limited-low-cost-emi-offers) + +## Method 1: Display Low Cost EMI Offers by Default + +This is the easiest way to display Low Cost EMI offers at the Checkout. While [creating the Low Cost EMI offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/create.md) from the Dashboard, enable the **Show Offer on Checkout** option. + +![Enter the offer validity details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-low-cost-emi-offer-validity.jpg.md) + +## Method 2: Display Limited Low Cost EMI offers + +To display a specific Low Cost EMI offer at Checkout, you should associate the offer with an order. You can pass the `offers` array as a request attribute in the Create Orders API. + +Some use cases: +- If you have multiple product lines running on the same account and have certain business logic on your side for displaying Low Cost EMI offers. +- The discount has already been applied, and you would like to restrict the payment method to avail the offer. + +To display offers: +1. [Create an Offer](#step-1-create-an-offer-from-the-dashboard). +2. [Pass offer_id in Orders API](#step-2-pass-offer-id-in-orders-api). +3. [Pass order_id and Trigger Checkout](#step-3-pass-order-id-and-trigger-the). + +### Step 1: Create an Offer from the Dashboard + +You can [create Low Cost EMI offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md#create-offers) from the Dashboard. + +Let us say you have created a Low Cost EMI offer `offer_ANZoaxsOww2X53`, such that a discount of ₹200 is applicable on all transactions done through AXIS netbanking only. + +### Step 2: Pass offer_id in Orders API + +Create an order using the Orders API and pass the `offer_id` as a request parameter. + +#### Sample Code + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000000, + "currency": "INR", + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("offers", Offer); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000000, + "currency": "INR", + "receipt": "receipt#1", + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 1000000, 'currency' => 'INR', 'offers'=> array('offer_JTUADI4ZWBGWur'))); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', offers: [ + 'offer_ANZoaxsOww2X53"' +] +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000000, + currency: "INR", + receipt: "receipt#1", + offers: [ + "offer_ANZoaxsOww2X53" + ] +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_CjyoZFRpB8r0AH", + "entity": "order", + "amount": 1000000, + "amount_paid": 0, + "amount_due": 1000000, + "currency": "INR", + "receipt": null, + "offer_id": "offer_ANZoaxsOww2X53", + "offers": [ + "offer_ANZoaxsOww2X53" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1561018912 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Enter the amount for which the order is to be created in currency subunits. For example, for an amount of ₹10000, enter `1000000`. + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the order amount. Here, it is `INR`. + +`offers` _mandatory_ +: `array` Unique identifier of the offer. Pass the `offer_id` obtained from the response of the previous step. + +### Step 3: Pass Order_id and Trigger the Checkout + +The `order_id` obtained in the previous step can be passed to the Checkout form as follows: + +```js: Checkout +Pay + +var options = { + "key": "[YOUR_KEY_ID]", + "amount": "1000000", + "currency": "INR", + "order_id":"order_FIL1vBOsWFllnO", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://cdn.razorpay.com/logos/F9Yhfb7ZXjXmIQ_medium.jpg", + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +``` + +Know more about [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + +## Next Steps + +After the customer has availed the offers and made the payment at the Checkout, you can track the status of the payments: + +- From the Dashboard. +- By [configuring webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). +- By polling our [payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md). + +### Related Information + +- [About Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi.md) +- [Create Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/create.md) +- [Tutorial - How to Create Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/tutorial.md) +- [Low Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/faqs.md) +- [Disable Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/create.md#disabling-low-cost-emi-offers) diff --git a/llm-content/payments/offers/low-cost-emi/tutorial.md b/llm-content/payments/offers/low-cost-emi/tutorial.md new file mode 100644 index 00000000..cf2edfc5 --- /dev/null +++ b/llm-content/payments/offers/low-cost-emi/tutorial.md @@ -0,0 +1,34 @@ +--- +title: Tutorial - How to Create Low Cost EMI Offers +description: Create Low Cost EMI Offers from the Razorpay Dashboard using an example. +--- + +# Tutorial - How to Create Low Cost EMI Offers + +Let us create an offer from the Dashboard using an example. + +Assume you are the manager of Acme Mobiles and Accessories, an online smartphone store. To attract customers and increase sales, you want to provide discounts on online purchases. + +You want to create a Diwali Offer with the following settings: + +Offer Criteria | Offer Information +--- +Offer Name | Diwali Dhamaka +--- +Display Text | Low Cost EMI Offers +--- +Offer Type | Instant +--- +Minimum Order Amount | ₹4,000 +--- +Maximum Order Amount | ₹1,00,000 +--- +Issuing Bank | ICICI Bank +--- +EMI Tenures | 6, 9 and 12 months + +### Related Information + +- [About Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi.md) +- [Low Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/faqs.md) +- [EMI² Suite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi².md) diff --git a/llm-content/payments/offers/no-cost-emi.md b/llm-content/payments/offers/no-cost-emi.md new file mode 100644 index 00000000..eb74c1a8 --- /dev/null +++ b/llm-content/payments/offers/no-cost-emi.md @@ -0,0 +1,92 @@ +--- +title: About No Cost EMI Offers +description: Provide No Cost EMI Offers to customers at the Razorpay Checkout. +--- + +# About No Cost EMI Offers + +No Cost EMI is an offer by which your customer pays the EMI provider only the product price, which is equally divided over the repayment timeline. Know more about [No Cost EMIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) as a Razorpay payment method. + +> **WARN** +> +> +> **Watch Out!** +> +> - We do not support offers on international currency and the CFB (Customer Fee Bearer) model. +> - We do not support No Cost EMI offers on Cardless EMI. +> + +> **INFO** +> +> +> **Handy Tips** +> +> An EMI discount will be applied to the customer's purchase to cover the interest the bank charges. For example, if the bank's interest is ₹100, an EMI discount of ₹100 will be applied to the order, thereby making the effective interest 0. +> +> The customer will be charged the GST on interest by the bank. This interest and GST will show up on the customer's bank statement. +> + +## Example + +Let us consider the example of a customer buying a mobile phone worth ₹15,000 on No Cost EMI on a 3-month EMI period. The bank charges 15% interest per annum. Additionally, the bank may charge the customer GST on the interest. + +``` +Cost of mobile phone: ₹15,000 +Tenure of No Cost EMI: 3 months +Interest Rate: 15% per annum +Interest Amount: ₹367.33 +No Cost EMI Amount: ₹5,000 +Actual loan amount charged on customer's card (Cost of Mobile Phone minus Interest Amount): ₹14,632.67 +``` + +The No Cost EMI calculation is given below: + +Month | Outstanding loan at the start of the month | EMI | Interest | Loan Principal Paid | Outstanding principal at the end of the month | GST on Interest at 18% | EMI + GST +--- +1 | 14632.67 | 5000 | 182.91 | 4817.09 | 9815.58 | 32.92 | 5032.92 +--- +2 | 9815.58 | 5000 | 122.69 | 4877.31 | 4938.27 | 22.09 | 5022.09 +--- +3 | 4938.27 | 5000 | 61.73 | 4938.27 | Nil | 11.11 | 5011.11 +--- +Total | | 15000 | 367.33 | 14632.67 | | 66.12 | 15066.12 + +> **INFO** +> +> +> **Customers Pay GST on Interest** +> +> In a no cost EMI, you provide a discount on the principal. The monthly installment paid by the customer consists of this principal and the interest. As the issuing banks still charge the interest, the customer will be charged the GST on interest by the bank. +> + +## Calculation of EMI + +EMI is generally calculated using the below formula: + +`EMI = [P x R x (1+R)ᴺ]/[(1+R)ᴺ⁻¹]` + +where + +**P** = Principal + +**R** = Interest rate per month + +**N** = Number of installations of the EMI + +For No Cost EMI, the EMI value is calculated as A/N, where **A** is the price of the product. + +From the above example, EMI is ₹15000/3 = ₹5000 + +We will replace this value in the above equation to calculate the value of P. + +`5000 = [P x (0.15/12) x (1+(0.15/12))³]/[(1+(0.15/12))³⁻¹]` + +**P** comes out to be ₹14632.67, and the discount borne by you is ₹367.33. This is equal to 2.45% of the original amount. + +### Related Information + +- [Create No Cost EMI Offers from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi/create.md) +- [Integrate No Cost EMI Offers with Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi/standard-integration.md) +- [Tutorial on How to Create No Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi/tutorial.md) +- [No Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/faqs.md) +- [EMI²](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi².md) diff --git a/llm-content/payments/offers/no-cost-emi/create.md b/llm-content/payments/offers/no-cost-emi/create.md new file mode 100644 index 00000000..f5c2d7a9 --- /dev/null +++ b/llm-content/payments/offers/no-cost-emi/create.md @@ -0,0 +1,160 @@ +--- +title: Create No Cost EMI Offers +description: Create No Cost EMI Offers from the Razorpay Dashboard. +--- + +# Create No Cost EMI Offers + +A No cost EMI offer is a plan where your customers can pay for a product or service in affordable monthly installments with zero interest. This means that the customers are only paying for the product's total price, with no extra charges. + +You can create No Cost EMI offers from the Dashboard. + +**Handy Tips** + +Once you create a No Cost EMI offer, you cannot edit it. To make changes, disable the previous offer and create a new one. + +You can review the offer configurations at the end under the [**Overview**](#overview) tab. + +### Description + +In the **Description** section, enter the following details. All the fields are mandatory. + +1. **Offer Name**: Enter the name of the offer. For example, **Diwali Dhamaka**. This appears at the Checkout. +2. **Display Text**: Enter a meaningful description for the offer. For example, **No Cost EMI Offer**. This appears at the Checkout. +3. **Terms**: Enter the terms and conditions for this offer. +4. Click **Next**. + ![Enter the offer details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-no-cost-emi-description.jpg.md) + +### Discount Type + +In the **Discount Type** section, enter the discount details that should be applied for the offer. + +1. **Minimum Order amount**: Enter the minimum bill amount for which the No Cost EMI Offer can be applied. For example, the offer can be applied to a minimum amount of **₹3,000**. This is a mandatory field. +2. **Maximum Order amount**: Enter the maximum bill amount for which the No Cost EMI Offer can be applied. For example, the offer can be applied to a maximum amount of **₹4,00,000**. +3. Click **Next**. + ![Enter the discount details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-no-cost-emi-discount-type.jpg.md) + +### Applicable On + +Under the **Applicable On** tab, fill in the following details: + +1. **Issuer**: Select the bank issuing the No Cost EMI and click **Next**. +2. **EMI Tenure**: Select the tenures to be listed at the Checkout. +3. **EMI Offer Type**: Select **No Cost EMI** from the drop-down list. This also displays the discount that you will bear. +4. Click **Next**. + + ![Enter the payment method details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-no-cost-emi-applicable-on.jpg.md) + +### Additional Offer Type + +> **INFO** +> +> +> +> **Feature Request** +> +> This feature is being released out gradually and may not be available to all businesses yet. +> +> + +In the Additional Offer Type section, you can configure extra incentives to make your No Cost EMI offer more attractive to customers. This step allows you to provide additional discounts or cashback rewards on top of the zero-interest EMI benefit. + +> **INFO** +> +> +> **Handy Tip** +> +> This additional offer will be applied on top of the EMI discount. +> + +1. **Additional Offer**: From the dropdown menu, select the type of additional offer you want to provide: + - **Instant Discount**: Provides an immediate reduction in the order amount at the time of purchase. + - **Cashback**: Credits the discount amount back to the customer's account after successful payment completion. + +> **WARN** +> +> +> **Watch Out!** +> +> Please note that cashback processing is handled externally and not managed by Razorpay. +> + +2. **Tenures Applicable**: Select the specific EMI tenures for which this additional offer applies. You can choose from the tenures that were configured in the previous step. + +3. **Discount**: Choose between a flat amount or a percentage-based discount: + + - **Flat**: Enter a fixed discount amount in rupees. + - **Percentage**: Enter a percentage-based discount with a maximum limits. + +4. **Discount Worth**: Enter the discount amount in cash value. For example, ₹1000. +The field shows "Discount worth in cash" as a helper text to clarify the input format + +5. Click **Next**. + + ![Configure additional offer type for enhanced customer benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-no-cost-emi-applicable-offer-type.jpg.md) + +### Offer Validity + +In the **Offer Validity** tab, set how long the offer should be valid and how you want to handle the payment failure situations: + +1. **Starting On**: Select the **Starts Immediately** check box for the offer to come into effect immediately. Alternatively, you can select the date and the time from which the created Offer should become active. +2. **Expires On**: Select the date and time at which the offer should end. For example, **31 Oct 2020** at **11:59pm**. +3. **On Payment Failure**: Define how to handle payment failure. + - **Do not allow payment to go through**: The payment is failed. + - **Allow customer to pay without availing offer**: The payment is allowed even though the set validations are not met. However, the offer is not applied to the bill amount. The customer will be charged the entire order amount. +4. **Max Usage**: Set the number of times the offer should be applied across all transactions. For example, **100**. +5. **Show Offer on Checkout**: Select this check box for the created offer to be displayed for all Standard Checkout payments, including [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md). +6. Click **Next**. + + ![Enter the offer validity details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-no-cost-emi-offer-validity.jpg.md) + +### Overview + +Click the **Overview** tab to view the summary of the offer that you just created. + +1. **Terms and Conditions**: Select the check box after you have read the disclaimer. +2. Click **Create EMI Offer**. + ![Check the terms and conditions and create an offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-no-cost-emi-overview.jpg.md) + +By default, all the created offers are in the **enabled** state. + +## Test the No Cost EMI Offer + +You can test the created No Cost EMI offer for all Standard Checkout payments, including [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md), [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md), [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md) and so on. + +> **INFO** +> +> +> **Handy Tips** +> +> - You can toggle between Live and Test Modes on your **Dashboard**. Navigate to the top menu ribbon and click the drop-down icon against **Live Mode**. Toggle to **Test Mode** and test the offers enabled. +> +> - You can make test payments using one of the payment methods at the Checkout. No money is deducted from your account as this is a simulated transaction. +> + +For this example, we will test the offer on a valid Payment Link. Follow the steps given below: + +1. Select the **Payment Link Id** you wish to test the created offer from the Dashboard. +2. Copy the **Payment Link** URL and open it in your browser. + ![Payment Link Test Offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/no-cost-offer-dashboard-test.jpg.md) +3. Enter your contact details and click **Proceed**. +4. Select **EMI**. +5. Select the payment option you created the offer on from the Dashboard. Enter the required [test details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md). +6. Select Success or Failure, depending on which flow you wish to test. +7. You should see a confirmation message depending on the flow you have selected. + +On successful payment, you should have received a discount on your payment. You can verify this by navigating to the Transactions → Payments tab and viewing the payment details. + +## Disabling No Cost EMI Offers + +To disable No Cost EMI offers: + +## Next Steps + +Now that the No Cost EMI is created, you should integrate it with the Checkout for customers to avail the EMI scheme. +Know more about [integrating No Cost EMI Offers with Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi/standard-integration.md). + +### Related Information + +- [Tutorial - How to Create No Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi/tutorial.md) +- [No Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/faqs.md) diff --git a/llm-content/payments/offers/no-cost-emi/faqs.md b/llm-content/payments/offers/no-cost-emi/faqs.md new file mode 100644 index 00000000..b08f89ff --- /dev/null +++ b/llm-content/payments/offers/no-cost-emi/faqs.md @@ -0,0 +1,130 @@ +--- +title: No Cost EMI - FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about No Cost EMI. +--- + +# Frequently Asked Questions (FAQs) + +### 1. Who bears the cost for the discount given in No Cost EMI? + + You, as a merchant, would bear the cost of No Cost EMI. It will be given as an upfront discount on the product cost to the end consumer. The discount percentage will vary by the bank and period of EMI. + + + +### 2. Which payment methods can be used for No Cost EMI? + + No Cost EMI is available on all credit card and debit card EMI banks. + + + +### 3. Will the customers' banks continue to charge them interest? + + Yes, the customers' banks will continue to charge them interest. However, this interest charge has been provided to the customer as an upfront discount at the time of purchase, effectively giving them the benefit of a No Cost EMI. + + + +### 4. Can I enable No Cost EMIs at the Checkout? + + Yes. Razorpay enables you to display No Cost EMIs at the Checkout. Know more about [No Cost EMIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi.md). + + + +### 5. How can I know about the percentage discount of the No Cost EMI that I bear? + + +> **INFO** +> +> +> **Handy Tips** +> +> The banks charge GST to end consumers on the interest paid over and above the following amount. +> + + Calculations on the cost incurred by the merchant at all standard plan and tenures are listed below: + + + Amount (in INR) | Interest (in %) | Tenure (in Months) | Amount Paid by Customer | Monthly EMI | No Cost EMI Discount | Discount | Pricing | Total Cost (in %) + --- + 10000 | 11% | 3 | 9,819.43 | 3333.33 | 180.57 | 1.81% | 3% | 4.81% + --- + 10000 | 12% | 3 | 9,803.28 | 3333.33 | 196.72 | 1.97% | 3% | 4.97% + --- + 10000 | 13% | 3 | 9,787.18 | 3333.33 | 212.82 | 2.13% | 3% | 5.13% + --- + 10000 | 14% | 3 | 9,771.13 | 3333.33 | 228.87 | 2.29% | 3% | 5.29% + --- + 10000 | 15% | 3 | 9,755.11 | 3333.33 | 244.89 | 2.45% | 3% | 5.45% + --- + 10000 | 11% | 6 | 9686.85 | 1666.67 | 313.15 | 3.13% | 3% | 6.13% + --- + 10000 | 12% | 6 | 9659.13 | 1666.67 | 340.87 | 3.41% | 3% | 6.41% + --- + 10000 | 13% | 6 | 9631.53 | 1666.67 | 368.47 | 3.68% | 3% | 6.68% + --- + 10000 | 14% | 6 | 9604.04 | 1666.67 | 395.96 | 3.96% | 3% | 6.96% + --- + 10000 | 15% | 6 | 9576.68 | 1666.67 | 423.32 | 4.23% | 3% | 7.23% + --- + 10000 | 11% | 9 | 9556.66 | 1111.11 | 443.34 | 4.43% | 3% | 7.43% + --- + 10000 | 12% | 9 | 9517.80 | 1111.11 | 482.20 | 4.82% | 3% | 7.82% + --- + 10000 | 13% | 9 | 9479.17 | 1111.11 | 520.83 | 5.21% | 3% | 8.21% + --- + 10000 | 14% | 9 | 9440.77 | 1111.11 | 559.23 | 5.59% | 3% | 8.59% + --- + 10000 | 15% | 9 | 9402.61 | 1111.11 | 597.39 | 5.97% | 3% | 8.97% + --- + 10000 | 11% | 12 | 9428.80 | 833.33 | 571.20 | 5.71% | 3% | 8.71% + --- + 10000 | 12% | 12 | 9379.23 | 833.33 | 620.77 | 6.21% | 3% | 9.21% + --- + 10000 | 13% | 12 | 9330.04 | 833.33 | 669.96 | 6.70% | 3% | 9.70% + --- + 10000 | 14% | 12 | 9281.21 | 833.33 | 718.79 | 7.19% | 3% | 10.19% + --- + 10000 | 15% | 12 | 9232.76 | 833.33 | 767.24 | 7.67% | 3% | 10.67% + --- + 10000 | 11% | 18 | 9179.92 | 555.56 | 820.08 | 8.20% | 3% | 11.20% + --- + 10000 | 12% | 18 | 9110.15 | 555.56 | 889.85 | 8.90% | 3% | 11.90% + --- + 10000 | 13% | 18 | 9041.13 | 555.56 | 958.87 | 9.59% | 3% | 12.59% + --- + 10000 | 14% | 18 | 8972.85 | 555.56 | 1027.15 | 10.27% | 3% | 13.27% + --- + 10000 | 15% | 18 | 8905.30 | 555.56 | 1094.70 | 10.95% | 3% | 13.95% + --- + 10000 | 11% | 24 | 8939.84 | 416.67 | 1060.16 | 10.60% | 3% | 13.60% + --- + 10000 | 12% | 24 | 8851.41 | 416.67 | 1148.59 | 11.49% | 3% | 14.49% + --- + 10000 | 13% | 24 | 8764.21 | 416.67 | 1235.79 | 12.36% | 3% | 15.36% + --- + 10000 | 14% | 24 | 8678.23 | 416.67 | 1321.77 | 13.22% | 3% | 16.22% + --- + 10000 | 15% | 24 | 8593.43 | 416.67 | 1406.57 | 14.07% | 3% | 17.07% + + + + +### 6. How does the No Cost EMI settlement work? + + The order amount minus the entire interest subvented by you as a discount is settled in your bank account as per your [settlement cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md#settlement-cycle). + + +> **WARN** +> +> +> **Watch Out!** +> +> However, Razorpay pricing is not included in this settlement, it will be applied in addition to the above amount. +> + + + + +### 7. Can I create No Cost EMI offers on Cardless EMI? + + No, we do not support No Cost EMI offers on Cardless EMI. diff --git a/llm-content/payments/offers/no-cost-emi/standard-integration.md b/llm-content/payments/offers/no-cost-emi/standard-integration.md new file mode 100644 index 00000000..7bf628a3 --- /dev/null +++ b/llm-content/payments/offers/no-cost-emi/standard-integration.md @@ -0,0 +1,241 @@ +--- +title: Integrate No Cost EMI Offers with Standard Checkout +description: Display general or order specific No Cost EMI Offers on Standard Checkout. +--- + +# Integrate No Cost EMI Offers with Standard Checkout + +After creating [ No Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi/create.md) from the Dashboard, you must integrate them with the Razorpay Standard Checkout so your customers can avail of them while making payments. + +> **WARN** +> +> +> **Integrate Offers with Orders API** +> +> Using our JS, SDK files, or other Ecommerce plugins, you **should** integrate offers with the Orders API. +> + +## Exception + +You need **not** integrate offers with Orders API if you use any of the following Razorpay products or plugins to accept payments: + + - Plugins: Razorpay Magento, Shopify, or WooCommerce. + - Products: Payment Links, Payment Buttons, Payment Pages and Invoices. + +This is because Razorpay automatically creates orders for these products or plugins when customers initiate payment at the Checkout. + +## Validation Criteria + +Only those No Cost EMI offers that pass the following validations are displayed at the Checkout: + +Criteria | Description +--- +**Amount Match** | Order amount should be more than or equal to the [Minimum Order Amount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi/create.md) set in an offer. +--- +**Validity** | Offer should be in the active or enabled state. +--- +**Date Validation** | The current date lies within the range of the offer's `start` and `end` dates. +--- +**Usage** | You can define the maximum number of times an offer can be availed. If this limit is met, the offer will not be displayed on Checkout. +--- +**Show Offer on Checkout** | This option must be enabled while the offer is created. This determines whether the offer will be displayed at the Checkout or not. + +## Display No Cost EMI Offers at Checkout + +There are two ways in which you can display No Cost EMI offers at the Razorpay Checkout: + +- [Display No Cost EMI Offers by Default](#method-1-display-no-cost-emi-offers-by-default) +- [Display Limited No Cost EMI Offers](#method-2-display-limited-no-cost-emi-offers) + +### Method 1: Display No Cost EMI Offers by Default + +This is the easiest way to display No Cost EMI offers at the Checkout. While [creating the No Cost EMI offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi/create.md) from the Dashboard, enable the **Show Offer on Checkout** option. + +![Enable the Show Offer on Checkout option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-no-cost-emi-offer-validity.jpg.md) + +### Method 2: Display Limited No Cost EMI offers + +To display a specific No Cost EMI offer at the Checkout, you should associate the offer with an order. You can pass the `offers` array as a request attribute in the Create Orders API. + +Some use cases: +- If you have multiple product lines running on the same account and have certain business logic for displaying No Cost EMI offers. +- The discount has already been applied, and you would like to restrict the payment method to avail the offer. + +To display offers: +1. [Create an Offer](#step-1-create-an-offer-from-the-dashboard). +2. [Pass offer_id in Orders API](#step-2-pass-offer-id-in-orders-api). +3. [Pass order_id and Trigger Checkout](#step-3-pass-order-id-and-trigger-the). + +### Step 1: Create an Offer from the Dashboard + +You can [create No Cost EMI offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md#create-offers) from the Dashboard. + +Let us say you have created a No Cost EMI offer `offer_ANZoaxsOww2X53`, such that a discount of ₹200 is applicable on all transactions done through AXIS netbanking only. + +[Video: https://www.youtube.com/embed/aUThK0ADspM?si=4tsQ5odC1AGa-1Sh] + +### Step 2: Pass offer_id in Orders API + +Create an order using the Orders API and pass the `offer_id` as a request parameter. + +#### Sample Code + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000000, + "currency": "INR", + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("offers", Offer); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000000, + "currency": "INR", + "receipt": "receipt#1", + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 1000000, 'currency' => 'INR', 'offers'=> array('offer_JTUADI4ZWBGWur'))); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', offers: [ + 'offer_ANZoaxsOww2X53"' +] +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000000, + currency: "INR", + receipt: "receipt#1", + offers: [ + "offer_ANZoaxsOww2X53" + ] +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_CjyoZFRpB8r0AH", + "entity": "order", + "amount": 1000000, + "amount_paid": 0, + "amount_due": 1000000, + "currency": "INR", + "receipt": null, + "offer_id": "offer_ANZoaxsOww2X53", + "offers": [ + "offer_ANZoaxsOww2X53" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1561018912 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Enter the amount for which the order is to be created in currency subunits. For example, for an amount of ₹10000, enter `1000000`. + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the order amount. Here, it is `INR`. + +`offers` _mandatory_ +: `array` Unique identifier of the offer. Pass the `offer_id` obtained from the response of the previous step. + +### Step 3: Pass Order_id and Trigger the Checkout + +The `order_id` obtained in the previous step can be passed to the Checkout form as follows: + +```js: Checkout +Pay + +var options = { + "key": "[YOUR_KEY_ID]", + "amount": "1000000", + "currency": "INR", + "order_id":"order_FIL1vBOsWFllnO", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://cdn.razorpay.com/logos/F9Yhfb7ZXjXmIQ_medium.jpg", + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9999988999" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +``` + +Know more about [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + +## Next Steps + +After the customer has availed the offers and made the payment at the Checkout, you can track the status of the payments: + +- From the Dashboard. +- By [configuring webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). +- By polling our [payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md). + +### Related Information +- [About No Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi.md) +- [Create No Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi/create.md) +- [Tutorial - How to Create No Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi/tutorial.md) +- [No Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/faqs.md) +- [Disable Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi/create.md#disabling-no-cost-emi-offers) diff --git a/llm-content/payments/offers/no-cost-emi/tutorial.md b/llm-content/payments/offers/no-cost-emi/tutorial.md new file mode 100644 index 00000000..5608678a --- /dev/null +++ b/llm-content/payments/offers/no-cost-emi/tutorial.md @@ -0,0 +1,36 @@ +--- +title: Tutorial - How to Create No Cost EMI Offers +description: Create No Cost EMI Offers from the Razorpay Dashboard using an example. +--- + +# Tutorial - How to Create No Cost EMI Offers + +Let us create an offer from the Dashboard using an example. + +Assume you are the manager of Acme Mobiles and Accessories, an online smartphone store. You want to provide discounts on online purchases to attract customers and increase sales. + +You want to create a Diwali Offer with the following settings: + +Offer Criteria | Offer Information +--- +Offer Name | Diwali Dhamaka - No Cost EMI +--- +Display Text | No Cost EMI Offers +--- +Offer Type | Instant +--- +Minimum Order Amount | ₹3,000 +--- +Maximum Order Amount | ₹4,00,000 +--- +Issuing Bank | HDFC Bank +--- +EMI Tenures | 3, 6 and 9 months + +Let us create this offer. + +### Related Information + +- [About No Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi.md) +- [No Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/faqs.md) +- [EMI² Suite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi².md) diff --git a/llm-content/payments/offers/s2s-integration.md b/llm-content/payments/offers/s2s-integration.md new file mode 100644 index 00000000..546421a1 --- /dev/null +++ b/llm-content/payments/offers/s2s-integration.md @@ -0,0 +1,2096 @@ +--- +title: Integrating Offers in Server-to-Server (S2S) +description: Integrate Offers in your payment flow while making direct API calls to Razorpay server. +--- + +# Integrating Offers in Server-to-Server (S2S) + +You can integrate offers with your payment flows while integrating directly with our APIs. This is particularly useful, if you are a business that is **not PCI-compliant** and would like to avail the offers that the issuer of network might provide. In such cases, validations must be done once the payment creation request is sent. Razorpay gives you the flexibility to design offers such that you can decide whether to pass the payments or not based on the set validations while creating the offers. + +## Prerequisites + +Generate the API keys to start your integration. The keys are required for authenticating API requests with our servers. + +Log in to the Dashboard to generate the API keys, if you have not done earlier. For making the direct API calls, you need the `Key_Secret` as well. + +## Workflow + +1. [Create Offers from Dashboard](#step-1-create-offers). +2. [Fetch all Offers](#step-2-fetch-all-offers). +3. [Create Orders to include the Offers in the payment request](#step-3-create-an-order). +4. [Validate Offers](#step-4-validate-offers). +5. [Fetch Orders](#step-5-fetch-orders). +6. [Create a Payment](#step-6-create-a-payment). +7. [Verify the Payment](#step-7-verify-the-payment). + +### Step 1: Create Offers + +[Create an offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md) from the Dashboard. + +![](/docs/assets/images/offers-offers-description.jpg) + +### Step 2: Fetch all Offers + +Use the following API to retrieve a list of active offers based on specific input parameters such as order details, payment methods or customer details. + +/v1/engage/offers/list + +```cURL: Curl + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/engage/offers/list \ +-H "Content-Type: application/json" \ +-d '{ + "offers": [ + "offer_Pzu0Cma1qtTezH", + "offer_PyIKlYOGXRxHsC" + ], + "order_id": "SDEA5645", + "order": { + "amount": "5000", + "currency": "INR", + "customer": { + "contact": "9000090000", + "email": "gaurav.kumar@example.com" + } + }, + "payment_instruments": [ + { + "method": "card", + "iins": [ + "123456" + ], + "card_tokens": [ + "tkn_89876654365" + ] + } + ] +}' + +``` + +```json: Success +{ + "entity": "collection", + "count": 1, + "items": [ + { + "entity": "offer", + "id": "offer_PyIKlYOGXRxHsC", + "name": "SummerSale2024", + "display_name": "Summer Sale 2024", + "description": "Get amazing discounts on summer essentials!", + "status": "inactive", + "inactivation_reason": "on_demand", + "currency": "INR", + "ends_at": 1727745600, + "starts_at": 1719828000, + "schedules": [ + { + "period": "daily", + "interval": [1, 3], + "starts_at": 1719828000, + "ends_at": 1727745600 + } + ], + "terms_condition": { + "description": "Limited time offer. Terms and conditions apply.", + "url": "https://example.com/terms-and-conditions" + }, + "applicable_channels": [ + "online", + "offline" + ], + "funding": { + "type": "cofunded", + "split": [ + { + "bearer": "business", + "type": "percentage", + "value": 5000 + }, + { + "bearer": "issuer", + "type": "percentage", + "value": 5000 + } + ] + }, + "benefits_types": [ + "instant_discount" + ], + "usage_limits": [ + { + "on": "customer_id", + "limit_type": "count", + "limit_value": 1, + "frequency_type": "monthly", + "frequency_value": "3" + } + ], + "rules": [ + { + "filters": { + "includes": { + "order": { + "min_amount": 50, + "max_amount": 1000, + "applies_to": "cart" + }, + "payment_instruments": [ + { + "method": "card", + "card": { + "saved": true, + "international": false, + "issuers": ["HDFC"], + "types": ["credit", "debit"], + "networks": ["Visa", "Mastercard"], + "categories": ["Platinum"], + "iins": ["411111", "422222"], + "subtype": ["consumer"], + "cobranding_partners": ["onecard", "fimoney"], + "token": [], + "number": "1234567812345678" + }, + "upi": { + "apps": ["gpay", "cred"], + "vpa": ["xyz@okaxis"], + "payer_account_types": ["bank", "wallet"], + "flow": ["collect", "intent"] + }, + "bank_account": { + "account_numbers": [], + "ifscs": [], + "names": [] + }, + "emi": { + "emi_duration": [3, 6] + }, + "wallet": { + "providers": [3, 6] + }, + "netbanking": { + "banks": ["HDFC"] + } + } + ] + }, + "excludes": { + "order": {}, + "payment_instrument": {} + } + }, + "benefits": [ + { + "offer_type": "instant_discount", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "cashback", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "already_discounted", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "low_cost_emi", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "tenures": [], + "calculated_benefit_value": 50 + }, + { + "offer_type": "no_cost_emi", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "tenures": [], + "calculated_benefit_value": 50 + } + ] + } + ], + "display_config": { + "offer_display_priority": 1, + "should_validate": true, + "is_hidden": false, + "auto_apply": true + } + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + + +### Request Parameters + +`offers` _optional_ +: `array` List of Offer ids to fetch. Can fetch a maximum of 20 offers per request. + +`order_id` _optional_ +: `string` Unique Razorpay `order_id` for which Offers are being fetched. + +`order` _optional_ +: `object` Order details for cases where `order_id` is not passed. + + `amount` _optional_ + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + + `currency` _optional_ + : `string` Currency code. Here it is, `INR`. Currently, only `INR` is supported. + + `customer` _optional_ + : `object` Customer details. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919123456780`. + + `email` _optional_ + : `string` Customer's email address + +`payment_instruments` _optional_ +: `object` Details of payment instruments. + + `method` _optional_ + : `string` Payment method. For example, `card`, `upi`, `emi`, `netbanking`. + + `iins` _optional_ + : `integer` List of Issuer Identification Numbers (IINs). Only 6-digit IINs are supported. + + `card_tokens` _optional_ + : `array` Card tokens associated with the payment instrument. + + `count` _optional_ + : `integer` Number of Offers to fetch. Default: `10`. Maximum: `50`. + + `skip` _optional_ + : `integer` Number of Offers to skip. + + + +### Response Parameters + +`entity` +: `string` Represents the type of collection. + +`count` +: `integer` Number of offers to be fetched. + +`items` +: `array` List of offer objects. + + `entity` + : `string` The entity being created. Here, it is `offer`. + + `id` + : `string` The unique identifier of the offer. + + `name` + : `string` Internal name of the offer. + + `display_name` + : `string` Display name of the offer visible to customers. + + `description` + : `string` Description of the offer. + + `status` + : `enum` Current status of the offer. Possible values: + - `created` + - `active` + - `inactive` + + `inactivation_reason` + : `enum` Reason for inactivation. Possible values: + - `expired` + - `exhausted` + - `on_demand` + + `currency` + : `string` The currency in which the payment should be made by the customer. For example, `INR`. + + `starts_at` + : `integer` Start time of the offer in UNIX timestamp. + + `ends_at` + : `integer` End time of the offer in UNIX timestamp. + + `schedules` + : `object` List of schedule objects defining the cadence of the offer. + + `period` + : `enum` Frequency of the offer activation. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `monthly` + - `yearly` + + `interval` + : `integer` Specifies the repeating pattern in terms of the period. Possible values: + - `1-7` + - `1-31` + - `1-12` + + `starts_at` + : `integer` Start time of the schedule in UNIX timestamp. + + `ends_at` + : `integer` End time of the schedule in UNIX timestamp. + + `terms_condition` + : `string` Terms and conditions of the offer. + + `description` + : `string` Additional description about the offer. + + `url` + : `string` URL linking to the full terms and conditions of the offer. + + `applicable_channels` + : `enum` Specifies where the offer is applicable. Possible values: + - `online` + - `offline` + + `funding` + : `object` Defines how the offer is funded and distributed amongst stakeholders. + + `type` + : `string` Specifies whether the offer is fully funded or co-funded. Possible values: + - `full` + - `cofunded` + + `split` + : `array` List of funding contributions from different entities. + + `bearer` + : `string` Defines the entity responsible for bearing the offer cost. Possible values: + - `business` + - `issuer` + - `network` + - `cobranding_partner` + - `app` + + `type` + : `string` Specifies the type of funding applied. Possible values: + - `fixed` + - `percentage` + + `value` + : `integer` Defines the funding amount or percentage contributed. For example: `50` for 50%. + + `benefits_types` + : `enum` List of benefit types. Possible values: + - `instant_discount` + - `cashback` + - `no_cost_emi` + - `low_cost_emi` + + `usage_limits` + : `object` Defines the restrictions on offer usage across offer, customer and payment instrument. + + `on` + : `enum` Level at which the usage limit applies. Possible values: + - `offer` + - `mobile number` + - `card number` + - `email` + - `phone` + - `customer id` + + `limit_type` + : `enum` Type of usage limit. Possible values: + - `COUNT` + - `BUDGET` + + `limit_value` + : `integer` Value corresponding to the limit. For example, `1` for single use. + + `frequency_type` + : `enum` Frequency for the usage limit. Possible values: + - `daily` + - `weekly` + - `monthly` + - `yearly` + + `frequency_value` + : `string` Value corresponding to the frequency type. Possible values: + - `1-7` for daily + - `1-31` for monthly + - `1-12` for yearly + + `rules` + : `object` Defines the validations and the benefits for an offer. + + `filters` + : `object` Criteria for transactions to qualify for the offer. Possible values: + - `min_amount` + - `min_amount` + - `applies_to` + - `line_items` + + `includes` + : `object` Criteria that qualify transactions for the offer. + + `order` + : `object` Order-specific filters such as `min_amount` or `max_amount`. + + `min_amount` + : `integer` Minimum order amount required to apply the offer. Amount is in the smallest currency sub-unit. + + `max_amount` + : `integer` Maximum order amount eligible for the offer. Amount is in the smallest currency sub-unit. + + `applies_to` + : `enum` Specifies what the offer applies to. Possible values: + - `cart` + - `products` + + `payment_instruments` + : `object` Filters on payment methods and instruments. For example, `issuer`, `apps` or `vpa`. + + `method` + : `string` Payment method. For example, `card`, `upi`, `emi`, `netbanking`. + + `card` + : `object` Details associated with the card. Required if the payment method is `card`. + + `saved` + : `boolean` Indicates if the offer promotes card tokenisation. Possible values: + - `true` + - `false` + + `international` + : `boolean` Specifies if the card is international. + + `issuers` + : `string` List of eligible card issuers For example, `HDFC`, `ICICI`, `SBI`. + + `types` + : `enum` Type of card. Possible values: + - `debit` + - `credit` + - `prepaid` + + `networks` + : `enum` Card networks. Possible values: + - `visa` + - `amex` + - `mastercard` + - `bajaj` + - `maestro` + - `rupay` + - `diners` + + `categories` + : `string` Specifies the category of the card. For example: `Platinum`, `Infinia`. + + `iins` + : `integer` List of Issuer Identification Numbers (IINs). Only 6-digit IINs are supported. + + `subtype` + : `enum` Specifies the subtype of the card. Possible values: + - `consumer` + - `business` + + `cobranding_partners` + : `enum` List of co-branding partners associated with the card. For example: `onecard`, `flipkart`, `swiggy`. + + `tokens` + : `string` Card tokens for tokenized payments. + + `number` + : `string` Reference number to fetch offers based on the card number. + + `upi` + : `object` Contains details specific to UPI payments. + + `psp` + : `enum` List of supported UPI apps. For example, `gpay`, `cred`. + + `vpa_handle` + : `enum` List of supported VPA handles. For example: `xyz@okaxis`. + + `payer_account_types` + : `string` Types of payer accounts. Possible values: + - `credit_card` + - `bank_account` + - `credit_line` + - `wallet` + + `flow` + : `enum` Specifies the UPI payment flow. Possible values: + - `collect` + - `intent`. + + `bank_account` + : `object` Details related to bank account payments. + + `account_numbers` + : `string` List of allowed account numbers. + + `ifscs` + : `string` List of allowed IFSC codes. + + `names` + : `string` List of allowed account holder names. + + `emi` + : `object` Details of EMI payment method. + + `emi_duration` + : `integer` List of available EMI durations in months. For example: `3`, `6`. + + `wallet` + : `object` Details of wallet payment method. + + `providers` + : `string` List of supported wallet providers. For example, [Wallet providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + `netbanking` + : `object` Details of net banking payment method. + + `banks` + : `enum` List of supported banks for net banking. For example: `HDFC`. + + `excludes` + : `object` Criteria that disqualify transactions for the offer. + + `orders` + : `object` Specific exclusions on order details like `min_amount` or `max_amount`. + + `payment_instruments` + : `object` Specific exclusions for payment instruments. For example, issuer, apps or VPA.tokens. + + `benefits` + : `object` The details of the benefits of the offer. + + `offer_type` + : `enum` Type of benefit provided. Possible values: + - `instant_discount` + - `cashback` + - `already_discounted` + - `low_cost_emi` + - `no_cost_emi` + + `limit_type` + : `enum` Type of benefit. Possible values: + - `flat` + - `up_to` + + `unit` + : `enum` Unit of the benefit. Possible values: + - `percentage` + - `absolute` + + `value` + : `integer` Value of the benefit. Amount is in the smallest currency sub-unit. + + `max_discount` + : `integer` Maximum discount applicable for the benefit. Amount is in the smallest currency sub-unit. + + `calculated_benefit_value` + : `integer` Actual benefit value applied to the transaction. Amount is in the smallest currency sub-unit. + + `display_config` + : `object` Contains configurations to control how the offer is displayed and validated. + + `offer_display_priority` + : `integer` Determines the priority level for displaying the offer. A lower value indicates a higher priority. For example: `1`. + + `should_validate` + : `boolean` Specifies if additional customer-specific validation is required for the offer. Possible values: + - `true` + - `false` + + `is_hidden` + : `boolean` Determines whether the offer should be visible to customers in the checkout UI. Possible values: + + - `true` : The offer is hidden from the checkout UI. It can still be applied programmatically or automatically based on conditions. + - `false` : The offer is visible and may be shown in the checkout UI for users to apply. + + `auto_apply` + : `boolean` Specifies whether the offer should be automatically applied during checkout without requiring user action. Possible values: + + - `true` : The offer is auto-applied if it meets the eligibility criteria. + - `false` : The offer requires the customer to explicitly select or input the offer/voucher during checkout. + + + +### Error Response Parameters + +Error | Cause | Solution +--- +The Offer id does not exist. | The offer id passed in the request is invalid or does not exist. | Retry with a valid inquiry parameter. +--- +The Offer id is invalid. | The offer id provided is not in a valid format. | Retry with a valid offer id. +--- +The number of offers passed in the request must be less than 20. | The request contains more than the allowed limit of 20 offer ids. | Retry with an optimal length of offer IDs (1–20). +--- +`offers` must be of type array. | The `offers` parameter in the request is not an array. | Pass the `offers` parameter as an array in the request. +--- +The `order_id` does not exist. | The `order_id` provided in the request does not exist. | Retry with a valid `order_id`. +--- +The `order_id` is invalid. | The `order_id` passed in the request is invalid or in an incorrect format. | Retry with a valid `order_id`. +--- +Currency is required if the order amount is greater than 0. | The `currency` field is missing in the request when the order amount is greater than 0. | Provide a valid `currency` code (e.g., `INR`) in the request. +--- +The `amount` must be at least 1.00 unit. | The order `amount` provided is less than the minimum allowed value of 1.00. | Retry with a valid order `amount` of at least 1.00 unit. +--- +Contact number is required. | The `contact` number field is missing in the request. | Provide a valid `contact` number in the request. +--- +The `contact` number can only contain digits and the + symbol. | The `contact` number contains invalid characters. | Retry with a valid `contact` number containing only digits and the + symbol. +--- +The `contact` number should be at least 8 digits, including the country code. | The `contact` number provided is less than 8 digits. | Retry with a valid `contact` number of at least 8 digits, including the country code. +--- +The `amount` is required. | The `amount` field is missing in the request. | Provide a valid `amount` in the request. +--- +The `customer_id` is invalid. | The `customer_id` provided in the request is invalid. | Retry with a valid `customer_id`. +--- +The `customer_id` does not exist. | The `customer_id` provided in the request does not exist. | Retry with a valid `customer_id`. +--- +The `method` is invalid. | The payment method provided in the instruments array is invalid. | Provide a valid payment method in the instruments array. +--- +The `provider` is invalid. | The `provider` specified in the instruments array is invalid. | Provide a valid `provider` in the instruments array. +--- +The `issuer` is invalid. | The `issuer` provided in the instruments array is invalid. | Provide a valid `issuer` in the instruments array. +--- +The card type is invalid. | The card type provided in the instruments array is invalid. | Provide a valid card type in the instruments array. +--- +The `method` is not enabled for you. | The payment method is not enabled for your account. | Ensure the payment `method` is enabled for your account. +--- +The `provider` is not enabled for you. | The provider is not enabled for your account. | Ensure the provider is enabled for your account. +--- + + + +### Step 3: Create an Order + +After generating offers from the Dashboard, pass the `offer_id` in the order request attributes to the following endpoint: + +/orders + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "offer_id": "offer_DtEhEm3XslgfXE" +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("offers", "offer_DtEhEm3XslgfXE"); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": "offer_ANZoaxsOww2X53" +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => 'INR', 'offer_id'=> 'offer_JTUADI4ZWBGWur')); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("offer_id", "offer_JTUADI4ZWBGWur"); +Order order = client.Order.Create(options); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', offer_id: 'offer_ANZoaxsOww2X53' +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 50000, + currency: "INR", + receipt: "receipt#1", + offer_id: "offer_ANZoaxsOww2X53" +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success +{ + "id": "order_DtEkng132N71M8", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": null, + "order_id": "order_CjyltuCttYiMe8", + "offer_id": "offer_DtEhEm3XslgfXE", + "offers": [ + "offer_DtEhEm3XslgfXE" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1576577191 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `string` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is 299, then pass `29900` in this field. + +`currency` _mandatory_ +: `integer` Currency code for the currency in which you want to accept the payment. For example, `INR`. + +`offer_id` +: `string` Unique identifier of the offer. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`order_id` +: `json object` Collection of offers entity. + +`offer_id` +: `string` Unique identifier of the offer. + +`offers` +: `array` Unique identifier of the offer. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + + +### Step 4: Validate Offers + +Validate the applicability of an offer based on input details like order, customer or instrument data to ensure it is eligible for use. + +/v1/engage/offers/validate + +```cURL: Curl + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/engage/offers/validate \ +-H "Content-Type: application/json" \ +-d '{ + "offers": [ + "offer_Pzu0Cma1qtTezH", + "offer_PyIKlYOGXRxHsC" + ], + "order_id": "SDEA5645", + "order": { + "amount": "5000", + "currency": "INR", + "customer": { + "contact": "9000090000", + "email": "gaurav.kumar@example.com" + } + }, + "payment_instruments": [ + { + "method": "card", + "iins": [ + "123456" + ], + "card_tokens": [ + "tkn_89876654365" + ] + } + ] +}' +``` + +```json: Success +{ + "valid_offers": { + "entity": "collections", + "count": 1, + "items": [ + { + "entity": "offer", + "id": "offer_123456789", + "name": "SummerSale2024", + "validity": { + "valid": true + }, + "display_name": "Summer Sale 2024", + "description": "Get amazing discounts on summer essentials!", + "status": "inactive", + "inactivation_reason": "on_demand", + "currency": "INR", + "ends_at": 1727745600, + "starts_at": 1719828000, + "schedules": [ + { + "period": "daily", + "interval": [1, 3], + "starts_at": 1719828000, + "ends_at": 1727745600 + } + ], + "terms_condition": { + "description": "Limited time offer. Terms and conditions apply.", + "url": "https://example.com/terms-and-conditions" + }, + "applicable_channels": ["online", "offline"], + "funding": { + "type": "cofunded", + "split": [ + { + "bearer": "business", + "type": "percentage", + "value": 5000 + }, + { + "bearer": "issuer", + "type": "percentage", + "value": 5000 + } + ] + }, + "benefits_types": ["instant_discount"], + "usage_limits": [ + { + "on": "customer_id", + "limit_type": "count", + "limit_value": 1, + "frequency_type": "monthly", + "frequency_value": "3" + } + ], + "rules": [ + { + "filters": { + "includes": { + "order": { + "min_amount": 50, + "max_amount": 1000, + "applies_to": "cart" + }, + "payment_instruments": [ + { + "method": "card", + "card": { + "saved": true, + "international": false, + "issuers": ["HDFC"], + "types": ["credit", "debit"], + "networks": ["Visa", "Mastercard"], + "categories": ["Platinum"], + "iins": ["411111", "422222"], + "subtype": ["consumer"], + "cobranding_partners": ["onecard", "fimoney"], + "token": [], + "number": "1234567812345678" + }, + "upi": { + "apps": ["gpay", "cred"], + "vpa": ["xyz@okaxis"], + "payer_account_types": ["bank", "wallet"], + "flow": ["collect", "intent"] + }, + "bank_account": { + "account_numbers": [], + "ifscs": [], + "names": [] + }, + "emi": { + "emi_duration": [3, 6] + }, + "wallet": { + "providers": [3, 6] + }, + "netbanking": { + "banks": ["HDFC"] + } + } + ] + }, + "excludes": { + "order": {}, + "payment_instrument": {} + } + }, + "benefits": [ + { + "offer_type": "instant_discount", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "cashback", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "already_discounted", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "low_cost_emi", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "tenures": [], + "calculated_benefit_value": 50 + }, + { + "offer_type": "no_cost_emi", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "tenures": [], + "calculated_benefit_value": 50 + } + ] + } + ], + "display_config": { + "offer_display_priority": 1, + "should_validate": true, + "is_hidden": false, + "auto_apply": true + } + } + ] + }, + "invalid_offers": { + "entity": "collections", + "count": 1, + "items": [ + { + "entity": "offer", + "id": "offer_123456789", + "name": "SummerSale2024", + "validity": { + "valid": false, + "reason": "invalid_order_amount", + "description": "The offer is not applicable on this order amount" + }, + "display_name": "Summer Sale 2024", + "description": "Get amazing discounts on summer essentials!", + "status": "inactive", + "inactivation_reason": "on_demand", + "currency": "INR", + "ends_at": 1727745600, + "starts_at": 1719828000, + "schedules": [ + { + "period": "daily", + "interval": [1, 3], + "starts_at": 1719828000, + "ends_at": 1727745600 + } + ], + "terms_condition": { + "description": "Limited time offer. Terms and conditions apply.", + "url": "https://example.com/terms-and-conditions" + }, + "applicable_channels": ["online", "offline"], + "funding": { + "type": "cofunded", + "split": [ + { + "bearer": "business", + "type": "percentage", + "value": 5000 + }, + { + "bearer": "issuer", + "type": "percentage", + "value": 5000 + } + ] + }, + "benefits_types": ["instant_discount"], + "usage_limits": [ + { + "on": "customer_id", + "limit_type": "count", + "limit_value": 1, + "frequency_type": "monthly", + "frequency_value": "3" + } + ], + "rules": [ + { + "filters": { + "includes": { + "order": { + "min_amount": 50, + "max_amount": 1000, + "applies_to": "cart" + }, + "payment_instruments": [ + { + "method": "card", + "card": { + "saved": true, + "international": false, + "issuers": ["HDFC"], + "types": ["credit", "debit"], + "networks": ["Visa", "Mastercard"], + "categories": ["Platinum"], + "iins": ["411111", "422222"], + "subtype": ["consumer"], + "cobranding_partners": ["onecard", "fimoney"], + "token": [], + "number": "1234567812345678" + }, + "upi": { + "apps": ["gpay", "cred"], + "vpa": ["xyz@okaxis"], + "payer_account_types": ["bank", "wallet"], + "flow": ["collect", "intent"] + }, + "bank_account": { + "account_numbers": [], + "ifscs": [], + "names": [] + }, + "emi": { + "emi_duration": [3, 6] + }, + "wallet": { + "providers": [3, 6] + }, + "netbanking": { + "banks": ["HDFC"] + } + } + ] + }, + "excludes": { + "order": {}, + "payment_instrument": {} + } + }, + "benefits": [ + { + "offer_type": "instant_discount", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "cashback", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "already_discounted", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "low_cost_emi", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "tenures": [], + "calculated_benefit_value": 50 + }, + { + "offer_type": "no_cost_emi", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "tenures": [], + "calculated_benefit_value": 50 + } + ] + } + ], + "display_config": { + "offer_display_priority": 1, + "should_validate": true, + "is_hidden": false, + "auto_apply": true + } + } + ] + } +} + +```json: Failure +{ + "offers": { + "entity": "collection", + "count": 1, + "items": [ + { + "entity": "offer", + "id": "offer_PV5EjKswORXuEF", + "validity": { + "is_valid": false, + "reason": "expired", + "description": "Offer has expired" + } + } + ] + } +} +``` + + +### Request Parameters + +`offers` _mandatory_ +: `array` Array of Offer id to fetch. Maximum: 20 Offers per request. + +`order_id` _optional_ +: `string` Unique Razorpay `order_id` for which Offers are being fetched. + +`order` _optional_ +: `object` Order details for cases where `order_id` is not passed. + + `amount` _optional_ + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + + `currency` _optional_ + : `string` Currency code. Here it is, `INR`. Currently, only `INR` is supported. + + `customer` _optional_ + : `object` Customer details. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919123456780`. + + `email` _optional_ + : `string` Customer's email address + +`payment_instruments` _mandatory_ +: `object` Details of payment instruments. + + `method` _optional_ + : `string` Payment method. For example, `card`, `upi`, `emi`, `netbanking`. + + `iins` _optional_ + : `integer` List of Issuer Identification Numbers (IINs). Only 6-digit IINs are supported. + + `card_tokens` _optional_ + : `array` Card tokens associated with the payment instrument. + + `count` _optional_ + : `integer` Number of Offers to fetch. Default: `10`. Maximum: `50`. + + `skip` _optional_ + : `integer` Number of Offers to skip. + + + +### Response Parameters + +`valid_offers` +: `array` List of applicable offers. + + `entity` + : `string` Represents the type of collection. + + `count` + : `integer` Number of valid offers. + + `items` + : `array` List of valid offer objects. + + `entity` + : `string` The entity being created. Here, it is `offer`. + + `id` + : `string` The unique identifier of the offer. + + `name` + : `string` Internal name of the offer. + + `validity` + : `object` Object containing offer validity details. + + `valid` + : `boolean` Indicates whether the offer is valid. Possible values: + - `true`: Offer is valid. + - `false`: Offer is invalid. + + `display_name` + : `string` Display name of the offer visible to customers. + + `description` + : `string` Description of the offer. + + `status` + : `enum` Current status of the offer. Possible values: + - `created` + - `active` + - `inactive` + + `inactivation_reason` + : `enum` Reason for inactivation. Possible values: + - `expired` + - `exhausted` + - `on_demand` + + `currency` + : `string` The currency in which the payment should be made by the customer. For example, `INR`. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `starts_at` + : `integer` Start time of the offer in UNIX timestamp. + + `ends_at` + : `integer` End time of the offer in UNIX timestamp. + + `schedules` + : `object` List of schedule objects defining the cadence of the offer. + + `period` + : `enum` Frequency of the offer activation. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `monthly` + - `yearly` + + `interval` + : `integer` Specifies the repeating pattern in terms of the period. Possible values: + - `1-7` + - `1-31` + - `1-12` + + `starts_at` + : `integer` Start time of the schedule in UNIX timestamp. + + `ends_at` + : `integer` End time of the schedule in UNIX timestamp. + + `terms_condition` + : `string` Terms and conditions of the offer. + + `description` + : `string` Additional description about the offer. + + `url` + : `string` URL linking to the full terms and conditions of the offer. + + `applicable_channels` + : `enum` Specifies where the offer is applicable. Possible values: + - `online` + - `offline` + + `funding` + : `object` Defines how the offer is funded and distributed amongst stakeholders. + + `type` + : `string` Specifies whether the offer is fully funded or co-funded. Possible values: + - `full` + - `cofunded` + + `split` + : `array` List of funding contributions from different entities. + + `bearer` + : `string` Defines the entity responsible for bearing the offer cost. Possible values: + - `business` + - `issuer` + - `network` + - `cobranding_partner` + - `app` + + `type` + : `string` Specifies the type of funding applied. Possible values: + - `fixed` + - `percentage` + + `value` + : `integer` Defines the funding amount or percentage contributed. For example: `50` for 50%. + + `benefits_types` + : `enum` List of benefit types. Possible values: + - `instant_discount` + - `cashback` + - `no_cost_emi` + - `low_cost_emi` + + `usage_limits` + : `object` Defines the restrictions on offer usage across offer, customer, payment instrument. + + `on` + : `enum` Level at which the usage limit applies. Possible values: + - `offer` + - `mobile number` + - `card number` + - `email` + - `phone` + - `customer id` + + `limit_type` + : `enum` Type of usage limit. Possible values: + - `COUNT` + - `BUDGET` + + `limit_value` + : `integer` Value corresponding to the limit. For example, `1` for single use. + + `frequency_type` + : `enum` Frequency for the usage limit. Possible values: + - `daily` + - `weekly` + - `monthly` + - `yearly` + + `frequency_value` + : `string` Value corresponding to the frequency type. Possible values: + - `1-7` for daily + - `1-31` for monthly + - `1-12` for yearly + + `rules` + : `object` Defines the validations and the benefits for an offer. + + `filters` + : `object` Criteria for transactions to qualify for the offer. Possible values: + - `min_amount` + - `min_amount` + - `applies_to` + - `line_items` + + `includes` + : `object` Criteria that qualify transactions for the offer. + + `order` + : `object` Order-specific filters such as `min_amount` or `max_amount`. + + `min_amount` + : `integer` Minimum order amount required to apply the offer. Amount is in the smallest currency sub-unit. + + `max_amount` + : `integer` Maximum order amount eligible for the offer. Amount is in the smallest currency sub-unit. + + `applies_to` + : `enum` Specifies what the offer applies to. Possible values: + - `cart` + - `products` + + `payment_instruments` + : `object` Filters on payment methods and instruments. For example, `issuer`, `apps` or `vpa`. + + `method` + : `string` Payment method. For example, `card`, `upi`, `emi`, `netbanking`. + + `card` + : `object` Details associated with the card. Required if the payment method is `card`. + + `saved` + : `boolean` Indicates if the offer promotes card tokenisation. Possible values: + - `true` + - `false` + + `international` + : `boolean` Specifies if the card is international. + + `issuers` + : `string` List of eligible card issuers For example, `HDFC`, `ICICI`, `SBI`. + + `types` + : `enum` Type of card. Possible values: + - `debit` + - `credit` + - `prepaid` + + `networks` + : `enum` Card networks. Possible values: + - `visa` + - `amex` + - `mastercard` + - `bajaj` + - `maestro` + - `rupay` + - `diners` + + `categories` + : `string` Specifies the category of the card. For example: `Platinum`, `Infinia`. + + `iins` + : `integer` List of Issuer Identification Numbers (IINs). Only 6-digit IINs are supported. + + `subtype` + : `enum` Specifies the subtype of the card. Possible values: + - `consumer` + - `business` + + `cobranding_partners` + : `enum` List of co-branding partners associated with the card. For example: `onecard`, `flipkart`, `swiggy`. + + `tokens` + : `string` Card tokens for tokenized payments. + + `number` + : `string` Reference number to fetch offers based on the card number. + + `upi` + : `object` Contains details specific to UPI payments. + + `psp` + : `enum` List of supported UPI apps. For example, `gpay`, `cred`. + + `vpa_handle` + : `enum` List of supported VPA handles. For example: `xyz@okaxis`. + + `payer_account_types` + : `string` Types of payer accounts. Possible values: + - `credit_card` + - `bank_account` + - `credit_line` + - `wallet` + + `flow` + : `enum` Specifies the UPI payment flow. Possible values: + - `collect` + - `intent`. + + `bank_account` + : `object` Details related to bank account payments. + + `account_numbers` + : `string` List of allowed account numbers. + + `ifscs` + : `string` List of allowed IFSC codes. + + `names` + : `string` List of allowed account holder names. + + `emi` + : `object` Details of EMI payment method. + + `emi_duration` + : `integer` List of available EMI durations in months. For example: `3`, `6`. + + `wallet` + : `object` Details of wallet payment method. + + `providers` + : `string` List of supported wallet providers. For example, [Wallet providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + `netbanking` + : `object` Details of net banking payment method. + + `banks` + : `enum` List of supported banks for net banking. For example: `HDFC`. + + `excludes` + : `object` Criteria that disqualify transactions for the offer. + + `orders` + : `object` Specific exclusions on order details like `min_amount` or `max_amount`. + + `payment_instruments` + : `object` Specific exclusions for payment instruments. For example, issuer, apps or VPA.tokens. + + `benefits` + : `object` The details of the benefits of the offer. + + `offer_type` + : `enum` Type of benefit provided. Possible values: + - `instant_discount` + - `cashback` + - `already_discounted` + - `low_cost_emi` + - `no_cost_emi` + + `limit_type` + : `enum` Type of benefit. Possible values: + - `flat` + - `up_to` + + `unit` + : `enum` Unit of the benefit. Possible values: + - `percentage` + - `absolute` + + `value` + : `integer` Value of the benefit. Amount is in the smallest currency sub-unit. + + `max_discount` + : `integer` Maximum discount applicable for the benefit. Amount is in the smallest currency sub-unit. + + `calculated_benefit_value` + : `integer` Actual benefit value applied to the transaction. Amount is in the smallest currency sub-unit. + + `display_config` + : `object` Contains configurations to control how the offer is displayed and validated. + + `offer_display_priority` + : `integer` Determines the priority level for displaying the offer. A lower value indicates a higher priority. For example: `1`. + + `should_validate` + : `boolean` Specifies if additional customer-specific validation is required for the offer. Possible values: + - `true` + - `false` + + `is_hidden` + : `boolean` Determines whether the offer should be visible to customers in the checkout UI. Possible values: + + - `true` : The offer is hidden from the checkout UI. It can still be applied programmatically or automatically based on conditions. + - `false` : The offer is visible and may be shown in the checkout UI for users to apply. + + `auto_apply` + : `boolean` Specifies whether the offer should be automatically applied during checkout without requiring user action. Possible values: + + - `true` : The offer is auto-applied if it meets the eligibility criteria. + - `false` : The offer requires the customer to explicitly select or input the offer/voucher during checkout. + +`invalid_offers` +: `array` List of offers that are not applicable. + + `entity` + : `string` Represents the type of collection. + + `count` + : `integer` Number of invalid offers. + + `items` + : `array` List of invalid offer objects. + + + +### Error Response Parameters + +Error | Cause | Solution +--- +Invalid offer id. | The offer id provided in the request is invalid. | Retry with a valid offer id. +--- +Missing voucher code. | The voucher code is missing in the request. | Retry with a valid voucher code. +--- +Missing user id. | The user id is missing in the request. | Retry with a valid user ID. +--- +Missing user type. | The user type is missing in the request. | Retry with a valid user type. +--- +Invalid user type. | The user type provided in the request is invalid. | Retry with a valid user type. +--- +No active Offers found. | No active Offers are available for the provided details. | Retry with a valid voucher code and contact. +--- +Missing fact: customer. | The request is missing customer fact values. | Retry with valid customer fact values. +--- +Missing fact: card number. | The request is missing a required card number. | Retry with a valid card number. +--- +Missing fact: email. | The request is missing a required email address. | Retry with a valid email address. +--- + + + +### Step 5: Fetch Orders + +Fetches the details of a specific order using the `order_id`. When the `expand[]=offers` query parameter is included, this API also returns detailed information about the offers applied to the order. + +/v1/orders/:id/?expand[]=offers + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ +-X GET https://api.razorpay.com/v1/orders/:id/?expand[]=offers +``` + +``` json: Success +{ + "id": "order_LesrAVQhpn0Byh", + "entity": "order", + "amount": 1000, + "amount_paid": 900, + "amount_due": 0, + "currency": "INR", + "receipt": "receipt#1", + "offers_applied": { + "entity": "collection", + "count": 1, + "items": [ + { + "entity": "offers", + "id": "offer_LesXV0iK2XmTaw", + "status": "redeemed", + "benefits": [ + { + "offer_type": "instant_discount", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + } + ] + } + ] + }, + "customer": { + "contact": "+91999999999", + "email": "anon@gmail.com" + }, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1681740008 +} +``` + + +### Query Parameter + +`expand[]` _optional_ +: `string` Use `expand[]=offers` to include the `offers_applied` object in the response. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`offers_applied` +: `json object` Collection of offers entity. + + `entity` + : `string` Represents the type of collection. + + `count` + : `integer` Number of offers to be fetched. + + `items` + : `array` List of offer objects. + + `entity` + : `string` Represents the type of collection. Here it is `offers`. + + `id` + : `string` Unique identifier of the offer. + + `status` + : `string` The status of the offer. + + `benefits` + : `object` The details of the benefits of the offer. + + `offer_type` + : `enum` Type of benefit provided. Possible values: + - `instant_discount` + - `cashback` + - `already_discounted` + - `low_cost_emi` + - `no_cost_emi` + - `voucher` + + `limit_type` + : `enum` Type of benefit. Possible values: + - `flat` + - `up_to` + + `unit` + : `enum` Unit of the benefit. Possible values: + - `percentage` + - `absolute` + + `value` + : `integer` Value of the benefit. Amount is in the smallest currency sub-unit. + + `max_discount` + : `integer` Maximum discount applicable for the benefit. Amount is in the smallest currency sub-unit. + + `calculated_benefit_value` + : `integer` Actual benefit value applied to the transaction. Amount is in the smallest currency sub-unit. + +`customer` +: `string` Details of the customer. + + `contact` + : `string` The customer's phone number. For example, `+919000090000`. + + `email` + : `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + + +### Step 6: Create a Payment + +Send the following attributes required to create a payment at the following endpoint: + +/payments/create/json + +#### Sample Code + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ +-d'{ + "amount": 1000, + "currency": "INR", + "contact": 9000090000, + "email": "gaurav.kumar@example.com", + "order_id": "order_CjyltuCttYiMe8", + "offer_id": "offer_DtEhEm3XslgfXE", + "method": "netbanking", + "bank": "UTIB" +}' + +```json: Success +{ + "razorpay_payment_id": "pay_OsfBn07R1sgSXQ", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/OsfBn07R1sgSXQ/authenticate" + } + ] +} +``` json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Offer Maximum Usage limit exceeded" + } +} +``` + + +### Request Parameters + +`key_id` _mandatory_ +: `string` The Key id that you have generated from the **API Keys** tab in the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, `INR`. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order. + Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`offer_id` +: `string` Unique identifier of the offer. + +`ip` _mandatory_ +: `string` Customer's IP address. + +`email` _mandatory_ +: `string` Email address of the customer. Maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. Maximum length supported is 15 characters, inclusive of country code. + +`authentication` _optional_ +: `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + +`browser` _mandatory_ +: `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `language` + : `string` Obtained from the payer's browser using the `navigator.language` HTML DOM property. Maximum limit of 8 characters. + +`method` _mandatory_ +: `string` Name of the payment method. Possible values are: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + - `cardless_emi` + - `paylater` + +`card` +: Details associated with the card. Required if the payment method is `card`. + + `number` _mandatory_ + : `string` Unformatted card number. Required if the method is `card`. + + `name` _mandatory_ + : `string` Name of the cardholder. Required if the method is `card`. + + `expiry_month` _mandatory_ + : `integer` Expiry month for card in `MM` format. Required if the method is `card`. + + `expiry_year` _mandatory_ + : `string` Expiry year for card in `YY` format. Required if the method is `card`. + + `cvv` _mandatory_ + : `string` CVV printed on the back of card. Required if the method is `card`. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for Visa and Amex tokenised cards. +> - To enable CVV-less flow for Rupay and Mastercard, contact our [support team](https://razorpay.com/support/#request). +> - CVV is mandatory for Diners tokenised cards. +> - CVV is an optional field. Skip passing the `cvv` parameter to Razorpay to implement this change. +> + +`bank` +: `string` Bank code of the bank used for the payment. Required if the method is `netbanking`. + +`bank_account` +: The details of the bank account that should be passed in the request. Required if the method is `emandate`. + + `account_number` _mandatory_ + : `string` Bank account number used to initiate the payment. + + `ifsc` _mandatory_ + : `string` IFSC of the bank used to initiate the payment. + + `name` _mandatory_ + : `string` Name associated with the bank account used to initiate the payment. + +`emi_duration` +: `string` The EMI duration in months. Required if the method is `emi`. + +`vpa` +: `string` Virtual payment address of the customer. Required if the method is `upi`. + +`wallet` +: `string` Wallet code for the wallet used for the payment. Required if the method is `wallet`. + +`notes` _optional_ +: `object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`referrer` _optional_ +: `string` Referrer header passed by the client's browser. + +`user_agent` _optional_ +: `string` Customer user-agent. + + + +### Response Parameters + +If the payment request is valid, the response contains the following fields. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. The value here is `redirect`. Use this URL to redirect customer to the bank page. + + `url` + : `string` URL to be used for the action indicated. + + + +### Response Types + +`2OO OK` +: In this case, the response contains `200 OK` code and the HTML content that needs to be opened in the customer's browser. This HTML content contains form-fields, which will be automatically posted to the redirect URL for the customer to complete the payment. + +`400 Bad Request` +: This can happen when erroneous parameters are passed in the request. For example, when the limit set in Offers is exceeded: + +Know more about the [error codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#error-codes). + +The HTML form returned in the response should be opened in the customer's browser. The customer completes the payment on the displayed page. + + +### Step 7: Verify the Payment + +Once the customer completes the payment, a `POST` request is sent to the `callback_url` provided in the [payment create request](#step-3-create-a-payment). The data contained in the `POST` request depends on the **success** or **failure** of the payment made by the customer. + +## Next Steps + +After the customer has availed the offers and made the payment on the Checkout, you can track the status of the payments: + +- From the Dashboard. +- By [configuring webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). +- By polling our [payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#fetch-payments-based-on-orders). + +### Related Information + +- [About Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers.md) +- [Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md) +- [Tutorial - How to Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/tutorial.md) diff --git a/llm-content/payments/offers/standard-integration.md b/llm-content/payments/offers/standard-integration.md new file mode 100644 index 00000000..0bd4be77 --- /dev/null +++ b/llm-content/payments/offers/standard-integration.md @@ -0,0 +1,270 @@ +--- +title: Integrate Offers with Standard Checkout +description: Display general or order-specific Offers on Standard Checkout. +--- + +# Integrate Offers with Standard Checkout + +After creating [offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md) from the Dashboard, you have to integrate them on Razorpay Standard Checkout so that your customers can avail them while making payments. + +> **WARN** +> +> +> **Integrate Offers with Orders API** +> +> If you use our JS, SDK files or other Ecommerce plugins, you **should** integrate offers with the Orders API. +> + +## Exception + +You need **not** integrate offers with Orders API if you use any of the following Razorpay products or plugins to accept payments: + + - Plugins: Magento, Shopify or WooCommerce. + - Products: Payment Links, Payment Buttons, Payment Pages and Invoices. + +This is because Razorpay automatically creates orders for these products or plugins when customers initiate payment at the Checkout. + +> **INFO** +> +> +> **Handy Tips** +> +> As per the RBI guidelines, the original card number is replaced with a surrogate value called a token. However, we will continue to support BIN-based offers post tokenisation. Note that BIN-based offers will not work on saved American Express (AMEX) cards. +> + +## Validation Criteria + +Only those offers that pass the following validations are be displayed at the Checkout: + +Criteria | Description +--- +**Amount Match** | Order amount should be more than or equal to the [Minimum Order Amount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md#instant) set in an offer. +--- +**Validity** | Offer should be in the active or enabled state. +--- +**Date Validation** | The current date lies within the range of the offer's `start` and `end` dates. +--- +**Usage** | You can define the maximum number of times an offer can be availed. The offer will not be displayed at the Checkout if this limit is met. +--- +**Show Offer on Checkout** | This option must be enabled while creating the offer. This determines whether the offer will be displayed at the Checkout. + +## Display Offers at Checkout + +There are two ways in which you can display offers at Razorpay Checkout: + +- [Display Offers by Default](#method-1-display-offers-by-default) +- [Display Limited Offers](#method-2-display-limited-offers) + +### Method 1: Display Offers by Default + +This is the easiest way to display offers at the Checkout. While creating the offer from the Dashboard, enable the **Show Offer on Checkout** option. The offer automatically appears at the Checkout. + +![Enable the Show Offer on Checkout option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-no-cost-emi-offer-validity.jpg.md) + +### Method 2: Display Limited Offers + +To display a specific offer at the Checkout, you should associate the offer with an order. You can pass the `offers` array as a request attribute in the Create Orders API. + +Some use cases: +- If you have multiple product lines running on the same account and certain business logic on your side for displaying offers. +- The discount has already been applied, and you would like to restrict the payment method to avail the offer. + +> **WARN** +> +> +> **Watch Out!** +> +> To display an Offer for a particular customer: + +> - **Do not** select the Show Offer on the Checkout check box while creating an Offer. + +> - Specify the offer_id; for example, `offer_ANZoaxsOww2X53` in the `offers` array while creating an order. +> + +To display offers: +1. [Create an Offer](#step-1-create-an-offer-from-the-dashboard). +2. [Pass the Offer in Orders API](#step-2-pass-the-offer-in-orders-api). +3. [Pass order_id and Trigger Checkout](#step-3-pass-order-id-and-trigger-the). + +### Step 1: Create an Offer from the Dashboard + +You can [create offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md#create-offers) from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md). + +![Create offers from the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offer-dashboard.jpg.md) + +Let us say you have created an offer `offer_ANZoaxsOww2X53`, such that a discount of is applicable on all transactions done through AXIS netbanking only. + +### Step 2: Pass the Offer in Orders API + +Create an order and pass the offer in the `offers` array as a request parameter in the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +> **INFO** +> +> +> **Handy Tips** +> +> To display specific offers at checkout, pass them in the `offers` array (see the sample code below). If you don't include anything in the `offers` array, the default offers will automatically appear at checkout. +> + +#### Sample Code + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000000, + "currency": "", + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000000); // amount in the smallest currency unit + orderRequest.put("currency", ""); + orderRequest.put("offers", Offer); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000000, + "currency": "", + "receipt": "receipt#1", + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 1000000, 'currency' => '', 'offers'=> array('offer_JTUADI4ZWBGWur'))); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 1000000, currency: '', receipt: 'receipt#1', offers: [ + 'offer_ANZoaxsOww2X53"' +] +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000000, + currency: "", + receipt: "receipt#1", + offers: [ + "offer_ANZoaxsOww2X53" + ] +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 1000000, + "currency": "", + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_CjyoZFRpB8r0AH", + "entity": "order", + "amount": 1000000, + "amount_paid": 0, + "amount_due": 1000000, + "currency": "", + "receipt": null, + "offer_id": "offer_ANZoaxsOww2X53", + "offers": [ + "offer_ANZoaxsOww2X53" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1561018912 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Enter the amount for which the order is to be created in currency subunits. For example, for an amount of , enter `1000000`. + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the order amount. Here, it is `INR`. + +`offers` _mandatory_ +: `array` Unique identifier of the offer. Pass the offer_id obtained from the response of the previous step. + +### Step 3: Pass Order_id and Trigger the Checkout + +The `order_id` obtained in the previous step can be passed to the Checkout form as follows: + +```js: Checkout +Pay + +var options = { + "key": "[YOUR_KEY_ID]", + "amount": "1000000", + "currency": "", + "order_id":"order_FIL1vBOsWFllnO", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://cdn.razorpay.com/logos/F9Yhfb7ZXjXmIQ_medium.jpg", + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { + "name": "", + "email": "", + "contact": "" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +``` + +Know more about [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + +## Next Steps + +After the customer has availed the offers and made the payment at the Checkout, you can track the status of the payments: + +- From the Dashboard. +- By [configuring webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md). +- By polling our [payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md). + +### Related Information + +- [About Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers.md) +- [Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md) +- [Tutorial - How to Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/tutorial.md) +- [Disable Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md#disabling-offers) +- [Offers FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/faqs.md) diff --git a/llm-content/payments/offers/tutorial.md b/llm-content/payments/offers/tutorial.md new file mode 100644 index 00000000..6fdd8e14 --- /dev/null +++ b/llm-content/payments/offers/tutorial.md @@ -0,0 +1,115 @@ +--- +title: Tutorial - How to Create Offers +description: Create Offers from the Razorpay Dashboard using an example. +--- + +# Tutorial - How to Create Offers + +Let us create an offer from the Dashboard using an example. + +Assume that you are the manager of Tea Factory, a beverage company that sells packaged teabags using your website. You want to provide discounts on online purchases to attract customers and increase sales. + +You want to create a Diwali Offer with the following settings: + +Offer Criteria | Offer Information +--- +Offer Name | Diwali Dhamaka +--- +Display Text | 10% discount on netbanking payments +--- +Offer Type | Discount - Percentage +--- +Payment Method | Netbanking +--- +Discount % | 10 +-- +Minimum Order Amount | +--- +Maximum Discount Allowed | + +Let us create this offer. + +## Creating Offers + +To create an offer: + +1. Log in to the Dashboard. +2. Navigate to **Offers** and click **Create New Offer**. + ![Create an Offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-dashboard.jpg.md) +3. The **Create an Offer** wizard appears with these four tabs. + - [**Description**](#description) + - [**Discount Type**](#discount-type) + - [**Applicable On**](#applicable-on) + - [**Offer Validity**](#offer-validity) + + ![View components required during creating an offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-wizard.jpg.md) + +You can review the Offer configurations at the end under the [**Overview**](#overview) tab. + +### Description + +Under the **Description** tab, enter the following details. All the fields are mandatory. + +1. **Offer Name**: Enter the name of the offer. For example, `Diwali Dhamaka`. This appears at the Checkout. +2. **Display Text**: Enter a meaningful description for the offer. For example, `10% discount on netbanking payments`. This appears at the Checkout. +3. **Terms**: Enter terms and conditions for the offer. +4. **Offer Type**: Select the type of offer that you want to create. For example, **Instant**. This means that the offer is applied instantly. The customer pays only the discounted amount while making the payment. +5. Click **Next**. + ![Enter the offer details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-description.jpg.md) + +### Discount Type + +In the **Discount Type** tab, enter the discount details that should be applied for the offer. + +1. **Discount Type**: Select the type of discount that should be applied to the offer. In this case, it is **Percentage**. + 1. **Minimum Order amount**: Enter the minimum bill amount for which the offer can be applied. Enter `400`. + 2. **Discount Worth**: The percentage by which the original price should be reduced. Enter `10`. + 3. **Maximum Discount**: The maximum amount that can be deducted from the bill amount. Enter `500`. +2. Click **Next**. + ![Enter the discount details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-discount-type.jpg.md) + +### Applicable On + +In the **Applicable On** tab, enter details of the payment method you want to enable for the offer. + +1. **Payment Method**: Select the payment method to enable offers. For this example, select `Net Banking`. +2. **Issuer**: If you want to restrict the offer to online payments from a specific bank, select the bank name from the list. Otherwise, do not select any bank. For this example, since the offer applies to all banks, we will not choose a bank. +3. Click **Next**. + +![Enter the payment method details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-applicable-on.jpg.md) + +### Offer Validity + +Under the **Offer Validity** tab, set how long the offer should be valid and how you want to handle the payment failure situations: + +1. **Starting On**: Select the **Starts Immediately** check box for the offer to come into effect immediately. Alternatively, you can select the date and time the created Offer should become active. +2. **Expires On**: Select the date and time the Offer should end. For example, `31 Oct 2020` at `11:59 pm`. +3. **On Payment Failure**: Define how to handle payment failure. + - **Do not allow payment to go through**: The payment is failed. + - **Allow customer to pay without availing offer**: The payment is allowed even though the set validations are not met. However, the offer is not applied to the bill amount. The customer will be charged the entire order amount. + For this example, we will allow payments to go through. +4. **Max Usage**: Set the number of times the offer should be applied across all transactions. For example, `100`. +5. **Show Offer on Checkout**: Select this check box for the created offer to be displayed for all Standard Checkout payments including [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md). +6. Click **Next**. + ![Enter the offer validity details to proceed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-offer-validity.jpg.md) + +### Overview + +Click the **Overview** tab to view the offer summary you just created. + +1. **Terms and Conditions**: Select the check box after you have read the disclaimer. +2. Click **Create Offer**. + ![Check the terms and conditions and create an offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/offers-offers-overview.jpg.md) + +By default, all the created offers are in the **enabled** state. + +## Integrate Offer with Standard Checkout + +Now that an offer is created, you should integrate the offers with the Checkout for customers to avail themselves the discounts and make payments. Know more about [integrating offers with Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/standard-integration.md). + +### Related Information + +- [About Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers.md) +- [Offers FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/faqs.md) + +- [EMI² Suite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi².md) diff --git a/llm-content/payments/offers/voucher/s2s-integration.md b/llm-content/payments/offers/voucher/s2s-integration.md new file mode 100644 index 00000000..fe68970d --- /dev/null +++ b/llm-content/payments/offers/voucher/s2s-integration.md @@ -0,0 +1,2127 @@ +--- +title: Integrating Offers in Server-to-Server (S2S) +description: Integrate Offers in your payment flow while making direct API calls to Razorpay server. +--- + +# Integrating Offers in Server-to-Server (S2S) + +You can integrate offers with your payment flows while integrating directly with our APIs. This is particularly useful, if you are a business that is **not PCI-compliant** and would like to avail the offers that the issuer of network might provide. In such cases, validations must be done once the payment creation request is sent. Razorpay gives you the flexibility to design offers such that you can decide whether to pass the payments or not based on the set validations while creating the offers. + +## Prerequisites + +Generate the API keys to start your integration. The keys are required for authenticating API requests with our servers. + +Log in to the Dashboard to generate the API keys, if you have not done earlier. For making the direct API calls, you need the `Key_Secret` as well. + +## Workflow + +1. [Create Offers from Dashboard](#step-1-create-offers). +2. [Fetch all Offers](#step-2-fetch-all-offers). +3. [Create Orders to include the Offers in the payment request](#step-3-create-an-order). +4. [Validate Offers](#step-4-validate-offers). +5. [Fetch Orders](#step-5-fetch-orders). +6. [Create a Payment](#step-6-create-a-payment). +7. [Verify the Payment](#step-7-verify-the-payment). + +### Step 1: Create Offers + +[Create an offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md) from the Dashboard. + +![](/docs/assets/images/offers-offers-description.jpg) + +### Step 2: Fetch all Offers + +Use the following API to retrieve a list of active offers based on specific input parameters such as order details, payment methods or customer details. + +/v1/engage/offers/list + +```cURL: Curl + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/engage/offers/list \ +-H "Content-Type: application/json" \ +-d '{ + "offers": [ + "offer_Pzu0Cma1qtTezH", + "offer_PyIKlYOGXRxHsC" + ], + "order_id": "SDEA5645", + "order": { + "amount": "5000", + "currency": "INR", + "customer": { + "contact": "9000090000", + "email": "gaurav.kumar@example.com" + } + }, + "payment_instruments": [ + { + "method": "card", + "iins": [ + "123456" + ], + "card_tokens": [ + "tkn_89876654365" + ] + } + ] +}' + +``` + +```json: Success +{ + "entity": "collection", + "count": 1, + "items": [ + { + "entity": "offer", + "id": "offer_PyIKlYOGXRxHsC", + "name": "SummerSale2024", + "display_name": "Summer Sale 2024", + "description": "Get amazing discounts on summer essentials!", + "status": "inactive", + "inactivation_reason": "on_demand", + "currency": "INR", + "ends_at": 1727745600, + "starts_at": 1719828000, + "schedules": [ + { + "period": "daily", + "interval": [1, 3], + "starts_at": 1719828000, + "ends_at": 1727745600 + } + ], + "terms_condition": { + "description": "Limited time offer. Terms and conditions apply.", + "url": "https://example.com/terms-and-conditions" + }, + "applicable_channels": [ + "online", + "offline" + ], + "funding": { + "type": "cofunded", + "split": [ + { + "bearer": "business", + "type": "percentage", + "value": 5000 + }, + { + "bearer": "issuer", + "type": "percentage", + "value": 5000 + } + ] + }, + "benefits_types": [ + "instant_discount" + ], + "usage_limits": [ + { + "on": "customer_id", + "limit_type": "count", + "limit_value": 1, + "frequency_type": "monthly", + "frequency_value": "3" + } + ], + "rules": [ + { + "filters": { + "includes": { + "order": { + "min_amount": 50, + "max_amount": 1000, + "applies_to": "cart" + }, + "payment_instruments": [ + { + "method": "card", + "card": { + "saved": true, + "international": false, + "issuers": ["HDFC"], + "types": ["credit", "debit"], + "networks": ["Visa", "Mastercard"], + "categories": ["Platinum"], + "iins": ["411111", "422222"], + "subtype": ["consumer"], + "cobranding_partners": ["onecard", "fimoney"], + "token": [], + "number": "1234567812345678" + }, + "upi": { + "apps": ["gpay", "cred"], + "vpa": ["xyz@okaxis"], + "payer_account_types": ["bank", "wallet"], + "flow": ["collect", "intent"] + }, + "bank_account": { + "account_numbers": [], + "ifscs": [], + "names": [] + }, + "emi": { + "emi_duration": [3, 6] + }, + "wallet": { + "providers": [3, 6] + }, + "netbanking": { + "banks": ["HDFC"] + } + } + ] + }, + "excludes": { + "order": {}, + "payment_instrument": {} + } + }, + "benefits": [ + { + "offer_type": "instant_discount", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "cashback", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "already_discounted", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "low_cost_emi", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "tenures": [], + "calculated_benefit_value": 50 + }, + { + "offer_type": "no_cost_emi", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "tenures": [], + "calculated_benefit_value": 50 + }, + { + "offer_type": "voucher", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "tenures": [], + "calculated_benefit_value": 50 + } + ] + } + ], + "display_config": { + "offer_display_priority": 1, + "should_validate": true, + "is_hidden": false, + "auto_apply": true + } + } + ] +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The api key provided is invalid", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + } +} +``` + + +### Request Parameters + +`offers` _optional_ +: `array` List of Offer ids to fetch. Can fetch a maximum of 20 offers per request. + +`order_id` _optional_ +: `string` Unique Razorpay `order_id` for which Offers are being fetched. + +`order` _optional_ +: `object` Order details for cases where `order_id` is not passed. + + `amount` _optional_ + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + + `currency` _optional_ + : `string` Currency code. Here it is, `INR`. Currently, only `INR` is supported. + + `customer` _optional_ + : `object` Customer details. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919123456780`. + + `email` _optional_ + : `string` Customer's email address + +`payment_instruments` _optional_ +: `object` Details of payment instruments. + + `method` _optional_ + : `string` Payment method. For example, `card`, `upi`, `emi`, `netbanking`. + + `iins` _optional_ + : `integer` List of Issuer Identification Numbers (IINs). Only 6-digit IINs are supported. + + `card_tokens` _optional_ + : `array` Card tokens associated with the payment instrument. + + `count` _optional_ + : `integer` Number of Offers to fetch. Default: `10`. Maximum: `50`. + + `skip` _optional_ + : `integer` Number of Offers to skip. + + + +### Response Parameters + +`entity` +: `string` Represents the type of collection. + +`count` +: `integer` Number of offers to be fetched. + +`items` +: `array` List of offer objects. + + `entity` + : `string` The entity being created. Here, it is `offer`. + + `id` + : `string` The unique identifier of the offer. + + `name` + : `string` Internal name of the offer. + + `display_name` + : `string` Display name of the offer visible to customers. + + `description` + : `string` Description of the offer. + + `status` + : `enum` Current status of the offer. Possible values: + - `created` + - `active` + - `inactive` + + `inactivation_reason` + : `enum` Reason for inactivation. Possible values: + - `expired` + - `exhausted` + - `on_demand` + + `currency` + : `string` The currency in which the payment should be made by the customer. For example, `INR`. + + `starts_at` + : `integer` Start time of the offer in UNIX timestamp. + + `ends_at` + : `integer` End time of the offer in UNIX timestamp. + + `schedules` + : `object` List of schedule objects defining the cadence of the offer. + + `period` + : `enum` Frequency of the offer activation. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `monthly` + - `yearly` + + `interval` + : `integer` Specifies the repeating pattern in terms of the period. Possible values: + - `1-7` + - `1-31` + - `1-12` + + `starts_at` + : `integer` Start time of the schedule in UNIX timestamp. + + `ends_at` + : `integer` End time of the schedule in UNIX timestamp. + + `terms_condition` + : `string` Terms and conditions of the offer. + + `description` + : `string` Additional description about the offer. + + `url` + : `string` URL linking to the full terms and conditions of the offer. + + `applicable_channels` + : `enum` Specifies where the offer is applicable. Possible values: + - `online` + - `offline` + + `funding` + : `object` Defines how the offer is funded and distributed amongst stakeholders. + + `type` + : `string` Specifies whether the offer is fully funded or co-funded. Possible values: + - `full` + - `cofunded` + + `split` + : `array` List of funding contributions from different entities. + + `bearer` + : `string` Defines the entity responsible for bearing the offer cost. Possible values: + - `business` + - `issuer` + - `network` + - `cobranding_partner` + - `app` + + `type` + : `string` Specifies the type of funding applied. Possible values: + - `fixed` + - `percentage` + + `value` + : `integer` Defines the funding amount or percentage contributed. For example: `50` for 50%. + + `benefits_types` + : `enum` List of benefit types. Possible values: + - `instant_discount` + - `cashback` + - `no_cost_emi` + - `low_cost_emi` + - `voucher` + + `usage_limits` + : `object` Defines the restrictions on offer usage across offer, customer and payment instrument. + + `on` + : `enum` Level at which the usage limit applies. Possible values: + - `offer` + - `mobile number` + - `card number` + - `email` + - `phone` + - `customer id` + + `limit_type` + : `enum` Type of usage limit. Possible values: + - `COUNT` + - `BUDGET` + + `limit_value` + : `integer` Value corresponding to the limit. For example, `1` for single use. + + `frequency_type` + : `enum` Frequency for the usage limit. Possible values: + - `daily` + - `weekly` + - `monthly` + - `yearly` + + `frequency_value` + : `string` Value corresponding to the frequency type. Possible values: + - `1-7` for daily + - `1-31` for monthly + - `1-12` for yearly + + `rules` + : `object` Defines the validations and the benefits for an offer. + + `filters` + : `object` Criteria for transactions to qualify for the offer. Possible values: + - `min_amount` + - `min_amount` + - `applies_to` + - `line_items` + + `includes` + : `object` Criteria that qualify transactions for the offer. + + `order` + : `object` Order-specific filters such as `min_amount` or `max_amount`. + + `min_amount` + : `integer` Minimum order amount required to apply the offer. Amount is in the smallest currency sub-unit. + + `max_amount` + : `integer` Maximum order amount eligible for the offer. Amount is in the smallest currency sub-unit. + + `applies_to` + : `enum` Specifies what the offer applies to. Possible values: + - `cart` + - `products` + + `payment_instruments` + : `object` Filters on payment methods and instruments. For example, `issuer`, `apps` or `vpa`. + + `method` + : `string` Payment method. For example, `card`, `upi`, `emi`, `netbanking`. + + `card` + : `object` Details associated with the card. Required if the payment method is `card`. + + `saved` + : `boolean` Indicates if the offer promotes card tokenisation. Possible values: + - `true` + - `false` + + `international` + : `boolean` Specifies if the card is international. + + `issuers` + : `string` List of eligible card issuers For example, `HDFC`, `ICICI`, `SBI`. + + `types` + : `enum` Type of card. Possible values: + - `debit` + - `credit` + - `prepaid` + + `networks` + : `enum` Card networks. Possible values: + - `visa` + - `amex` + - `mastercard` + - `bajaj` + - `maestro` + - `rupay` + - `diners` + + `categories` + : `string` Specifies the category of the card. For example: `Platinum`, `Infinia`. + + `iins` + : `integer` List of Issuer Identification Numbers (IINs). Only 6-digit IINs are supported. + + `subtype` + : `enum` Specifies the subtype of the card. Possible values: + - `consumer` + - `business` + + `cobranding_partners` + : `enum` List of co-branding partners associated with the card. For example: `onecard`, `flipkart`, `swiggy`. + + `tokens` + : `string` Card tokens for tokenized payments. + + `number` + : `string` Reference number to fetch offers based on the card number. + + `upi` + : `object` Contains details specific to UPI payments. + + `psp` + : `enum` List of supported UPI apps. For example, `gpay`, `cred`. + + `vpa_handle` + : `enum` List of supported VPA handles. For example: `xyz@okaxis`. + + `payer_account_types` + : `string` Types of payer accounts. Possible values: + - `credit_card` + - `bank_account` + - `credit_line` + - `wallet` + + `flow` + : `enum` Specifies the UPI payment flow. Possible values: + - `collect` + - `intent`. + + `bank_account` + : `object` Details related to bank account payments. + + `account_numbers` + : `string` List of allowed account numbers. + + `ifscs` + : `string` List of allowed IFSC codes. + + `names` + : `string` List of allowed account holder names. + + `emi` + : `object` Details of EMI payment method. + + `emi_duration` + : `integer` List of available EMI durations in months. For example: `3`, `6`. + + `wallet` + : `object` Details of wallet payment method. + + `providers` + : `string` List of supported wallet providers. For example, [Wallet providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + `netbanking` + : `object` Details of net banking payment method. + + `banks` + : `enum` List of supported banks for net banking. For example: `HDFC`. + + `excludes` + : `object` Criteria that disqualify transactions for the offer. + + `orders` + : `object` Specific exclusions on order details like `min_amount` or `max_amount`. + + `payment_instruments` + : `object` Specific exclusions for payment instruments. For example, issuer, apps or VPA.tokens. + + `benefits` + : `object` The details of the benefits of the offer. + + `offer_type` + : `enum` Type of benefit provided. Possible values: + - `instant_discount` + - `cashback` + - `already_discounted` + - `low_cost_emi` + - `no_cost_emi` + - `voucher` + + `limit_type` + : `enum` Type of benefit. Possible values: + - `flat` + - `up_to` + + `unit` + : `enum` Unit of the benefit. Possible values: + - `percentage` + - `absolute` + + `value` + : `integer` Value of the benefit. Amount is in the smallest currency sub-unit. + + `max_discount` + : `integer` Maximum discount applicable for the benefit. Amount is in the smallest currency sub-unit. + + `calculated_benefit_value` + : `integer` Actual benefit value applied to the transaction. Amount is in the smallest currency sub-unit. + + `display_config` + : `object` Contains configurations to control how the offer is displayed and validated. + + `offer_display_priority` + : `integer` Determines the priority level for displaying the offer. A lower value indicates a higher priority. For example: `1`. + + `should_validate` + : `boolean` Specifies if additional customer-specific validation is required for the offer. Possible values: + - `true` + - `false` + + `is_hidden` + : `boolean` Determines whether the offer should be visible to customers in the checkout UI. Possible values: + + - `true` : The offer is hidden from the checkout UI. It can still be applied programmatically or automatically based on conditions. + - `false` : The offer is visible and may be shown in the checkout UI for users to apply. + + `auto_apply` + : `boolean` Specifies whether the offer should be automatically applied during checkout without requiring user action. Possible values: + + - `true` : The offer is auto-applied if it meets the eligibility criteria. + - `false` : The offer requires the customer to explicitly select or input the offer/voucher during checkout. + + + +### Error Response Parameters + +Error | Cause | Solution +--- +The Offer id does not exist. | The offer id passed in the request is invalid or does not exist. | Retry with a valid inquiry parameter. +--- +The Offer id is invalid. | The offer id provided is not in a valid format. | Retry with a valid offer id. +--- +The number of offers passed in the request must be less than 20. | The request contains more than the allowed limit of 20 offer ids. | Retry with an optimal length of offer IDs (1–20). +--- +`offers` must be of type array. | The `offers` parameter in the request is not an array. | Pass the `offers` parameter as an array in the request. +--- +The `order_id` does not exist. | The `order_id` provided in the request does not exist. | Retry with a valid `order_id`. +--- +The `order_id` is invalid. | The `order_id` passed in the request is invalid or in an incorrect format. | Retry with a valid `order_id`. +--- +Currency is required if the order amount is greater than 0. | The `currency` field is missing in the request when the order amount is greater than 0. | Provide a valid `currency` code (e.g., `INR`) in the request. +--- +The `amount` must be at least 1.00 unit. | The order `amount` provided is less than the minimum allowed value of 1.00. | Retry with a valid order `amount` of at least 1.00 unit. +--- +Contact number is required. | The `contact` number field is missing in the request. | Provide a valid `contact` number in the request. +--- +The `contact` number can only contain digits and the + symbol. | The `contact` number contains invalid characters. | Retry with a valid `contact` number containing only digits and the + symbol. +--- +The `contact` number should be at least 8 digits, including the country code. | The `contact` number provided is less than 8 digits. | Retry with a valid `contact` number of at least 8 digits, including the country code. +--- +The `amount` is required. | The `amount` field is missing in the request. | Provide a valid `amount` in the request. +--- +The `customer_id` is invalid. | The `customer_id` provided in the request is invalid. | Retry with a valid `customer_id`. +--- +The `customer_id` does not exist. | The `customer_id` provided in the request does not exist. | Retry with a valid `customer_id`. +--- +The `method` is invalid. | The payment method provided in the instruments array is invalid. | Provide a valid payment method in the instruments array. +--- +The `provider` is invalid. | The `provider` specified in the instruments array is invalid. | Provide a valid `provider` in the instruments array. +--- +The `issuer` is invalid. | The `issuer` provided in the instruments array is invalid. | Provide a valid `issuer` in the instruments array. +--- +The card type is invalid. | The card type provided in the instruments array is invalid. | Provide a valid card type in the instruments array. +--- +The `method` is not enabled for you. | The payment method is not enabled for your account. | Ensure the payment `method` is enabled for your account. +--- +The `provider` is not enabled for you. | The provider is not enabled for your account. | Ensure the provider is enabled for your account. +--- + + + +### Step 3: Create an Order + +After generating offers from the Dashboard, pass the `offer_id` in the order request attributes to the following endpoint: + +/orders + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "offer_id": "offer_DtEhEm3XslgfXE" +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("offers", "offer_DtEhEm3XslgfXE"); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": "offer_ANZoaxsOww2X53" +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => 'INR', 'offer_id'=> 'offer_JTUADI4ZWBGWur')); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("offer_id", "offer_JTUADI4ZWBGWur"); +Order order = client.Order.Create(options); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', offer_id: 'offer_ANZoaxsOww2X53' +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 50000, + currency: "INR", + receipt: "receipt#1", + offer_id: "offer_ANZoaxsOww2X53" +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success +{ + "id": "order_DtEkng132N71M8", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": null, + "order_id": "order_CjyltuCttYiMe8", + "offer_id": "offer_DtEhEm3XslgfXE", + "offers": [ + "offer_DtEhEm3XslgfXE" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1576577191 +} + +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `string` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is 299, then pass `29900` in this field. + +`currency` _mandatory_ +: `integer` Currency code for the currency in which you want to accept the payment. For example, `INR`. + +`offer_id` +: `string` Unique identifier of the offer. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`order_id` +: `json object` Collection of offers entity. + +`offer_id` +: `string` Unique identifier of the offer. + +`offers` +: `array` Unique identifier of the offer. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + + +### Step 4: Validate Offers + +Validate the applicability of an offer based on input details like order, customer or instrument data to ensure it is eligible for use. + +/v1/engage/offers/validate + +```cURL: Curl + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/engage/offers/validate \ +-H "Content-Type: application/json" \ +-d '{ + "offers": [ + "offer_Pzu0Cma1qtTezH", + "offer_PyIKlYOGXRxHsC" + ], + "order_id": "SDEA5645", + "order": { + "amount": "5000", + "currency": "INR", + "customer": { + "contact": "9000090000", + "email": "gaurav.kumar@example.com" + } + }, + "payment_instruments": [ + { + "method": "card", + "iins": [ + "123456" + ], + "card_tokens": [ + "tkn_89876654365" + ] + } + ] +}' +``` + +```json: Success +{ + "valid_offers": { + "entity": "collections", + "count": 1, + "items": [ + { + "entity": "offer", + "id": "offer_123456789", + "name": "SummerSale2024", + "validity": { + "valid": true + }, + "display_name": "Summer Sale 2024", + "description": "Get amazing discounts on summer essentials!", + "status": "inactive", + "inactivation_reason": "on_demand", + "currency": "INR", + "ends_at": 1727745600, + "starts_at": 1719828000, + "schedules": [ + { + "period": "daily", + "interval": [1, 3], + "starts_at": 1719828000, + "ends_at": 1727745600 + } + ], + "terms_condition": { + "description": "Limited time offer. Terms and conditions apply.", + "url": "https://example.com/terms-and-conditions" + }, + "applicable_channels": ["online", "offline"], + "funding": { + "type": "cofunded", + "split": [ + { + "bearer": "business", + "type": "percentage", + "value": 5000 + }, + { + "bearer": "issuer", + "type": "percentage", + "value": 5000 + } + ] + }, + "benefits_types": ["instant_discount"], + "usage_limits": [ + { + "on": "customer_id", + "limit_type": "count", + "limit_value": 1, + "frequency_type": "monthly", + "frequency_value": "3" + } + ], + "rules": [ + { + "filters": { + "includes": { + "order": { + "min_amount": 50, + "max_amount": 1000, + "applies_to": "cart" + }, + "payment_instruments": [ + { + "method": "card", + "card": { + "saved": true, + "international": false, + "issuers": ["HDFC"], + "types": ["credit", "debit"], + "networks": ["Visa", "Mastercard"], + "categories": ["Platinum"], + "iins": ["411111", "422222"], + "subtype": ["consumer"], + "cobranding_partners": ["onecard", "fimoney"], + "token": [], + "number": "1234567812345678" + }, + "upi": { + "apps": ["gpay", "cred"], + "vpa": ["xyz@okaxis"], + "payer_account_types": ["bank", "wallet"], + "flow": ["collect", "intent"] + }, + "bank_account": { + "account_numbers": [], + "ifscs": [], + "names": [] + }, + "emi": { + "emi_duration": [3, 6] + }, + "wallet": { + "providers": [3, 6] + }, + "netbanking": { + "banks": ["HDFC"] + } + } + ] + }, + "excludes": { + "order": {}, + "payment_instrument": {} + } + }, + "benefits": [ + { + "offer_type": "instant_discount", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "cashback", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "already_discounted", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "low_cost_emi", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "tenures": [], + "calculated_benefit_value": 50 + }, + { + "offer_type": "no_cost_emi", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "tenures": [], + "calculated_benefit_value": 50 + }, + { + "offer_type": "voucher", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "tenures": [], + "calculated_benefit_value": 50 + } + ] + } + ], + "display_config": { + "offer_display_priority": 1, + "should_validate": true, + "is_hidden": false, + "auto_apply": true + } + } + ] + }, + "invalid_offers": { + "entity": "collections", + "count": 1, + "items": [ + { + "entity": "offer", + "id": "offer_123456789", + "name": "SummerSale2024", + "validity": { + "valid": false, + "reason": "invalid_order_amount", + "description": "The offer is not applicable on this order amount" + }, + "display_name": "Summer Sale 2024", + "description": "Get amazing discounts on summer essentials!", + "status": "inactive", + "inactivation_reason": "on_demand", + "currency": "INR", + "ends_at": 1727745600, + "starts_at": 1719828000, + "schedules": [ + { + "period": "daily", + "interval": [1, 3], + "starts_at": 1719828000, + "ends_at": 1727745600 + } + ], + "terms_condition": { + "description": "Limited time offer. Terms and conditions apply.", + "url": "https://example.com/terms-and-conditions" + }, + "applicable_channels": ["online", "offline"], + "funding": { + "type": "cofunded", + "split": [ + { + "bearer": "business", + "type": "percentage", + "value": 5000 + }, + { + "bearer": "issuer", + "type": "percentage", + "value": 5000 + } + ] + }, + "benefits_types": ["instant_discount"], + "usage_limits": [ + { + "on": "customer_id", + "limit_type": "count", + "limit_value": 1, + "frequency_type": "monthly", + "frequency_value": "3" + } + ], + "rules": [ + { + "filters": { + "includes": { + "order": { + "min_amount": 50, + "max_amount": 1000, + "applies_to": "cart" + }, + "payment_instruments": [ + { + "method": "card", + "card": { + "saved": true, + "international": false, + "issuers": ["HDFC"], + "types": ["credit", "debit"], + "networks": ["Visa", "Mastercard"], + "categories": ["Platinum"], + "iins": ["411111", "422222"], + "subtype": ["consumer"], + "cobranding_partners": ["onecard", "fimoney"], + "token": [], + "number": "1234567812345678" + }, + "upi": { + "apps": ["gpay", "cred"], + "vpa": ["xyz@okaxis"], + "payer_account_types": ["bank", "wallet"], + "flow": ["collect", "intent"] + }, + "bank_account": { + "account_numbers": [], + "ifscs": [], + "names": [] + }, + "emi": { + "emi_duration": [3, 6] + }, + "wallet": { + "providers": [3, 6] + }, + "netbanking": { + "banks": ["HDFC"] + } + } + ] + }, + "excludes": { + "order": {}, + "payment_instrument": {} + } + }, + "benefits": [ + { + "offer_type": "instant_discount", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "cashback", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "already_discounted", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + }, + { + "offer_type": "low_cost_emi", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "tenures": [], + "calculated_benefit_value": 50 + }, + { + "offer_type": "no_cost_emi", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "tenures": [], + "calculated_benefit_value": 50 + }, + { + "offer_type": "voucher", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "tenures": [], + "calculated_benefit_value": 50 + } + ] + } + ], + "display_config": { + "offer_display_priority": 1, + "should_validate": true, + "is_hidden": false, + "auto_apply": true + } + } + ] + } +} + +```json: Failure +{ + "offers": { + "entity": "collection", + "count": 1, + "items": [ + { + "entity": "offer", + "id": "offer_PV5EjKswORXuEF", + "validity": { + "is_valid": false, + "reason": "expired", + "description": "Offer has expired" + } + } + ] + } +} +``` + + +### Request Parameters + +`offers` _mandatory_ +: `array` Array of Offer id to fetch. Maximum: 20 Offers per request. + +`order_id` _optional_ +: `string` Unique Razorpay `order_id` for which Offers are being fetched. + +`order` _optional_ +: `object` Order details for cases where `order_id` is not passed. + + `amount` _optional_ + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + + `currency` _optional_ + : `string` Currency code. Here it is, `INR`. Currently, only `INR` is supported. + + `customer` _optional_ + : `object` Customer details. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919123456780`. + + `email` _optional_ + : `string` Customer's email address + +`payment_instruments` _mandatory_ +: `object` Details of payment instruments. + + `method` _optional_ + : `string` Payment method. For example, `card`, `upi`, `emi`, `netbanking`. + + `iins` _optional_ + : `integer` List of Issuer Identification Numbers (IINs). Only 6-digit IINs are supported. + + `card_tokens` _optional_ + : `array` Card tokens associated with the payment instrument. + + `count` _optional_ + : `integer` Number of Offers to fetch. Default: `10`. Maximum: `50`. + + `skip` _optional_ + : `integer` Number of Offers to skip. + + + +### Response Parameters + +`valid_offers` +: `array` List of applicable offers. + + `entity` + : `string` Represents the type of collection. + + `count` + : `integer` Number of valid offers. + + `items` + : `array` List of valid offer objects. + + `entity` + : `string` The entity being created. Here, it is `offer`. + + `id` + : `string` The unique identifier of the offer. + + `name` + : `string` Internal name of the offer. + + `validity` + : `object` Object containing offer validity details. + + `valid` + : `boolean` Indicates whether the offer is valid. Possible values: + - `true`: Offer is valid. + - `false`: Offer is invalid. + + `display_name` + : `string` Display name of the offer visible to customers. + + `description` + : `string` Description of the offer. + + `status` + : `enum` Current status of the offer. Possible values: + - `created` + - `active` + - `inactive` + + `inactivation_reason` + : `enum` Reason for inactivation. Possible values: + - `expired` + - `exhausted` + - `on_demand` + + `currency` + : `string` The currency in which the payment should be made by the customer. For example, `INR`. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `starts_at` + : `integer` Start time of the offer in UNIX timestamp. + + `ends_at` + : `integer` End time of the offer in UNIX timestamp. + + `schedules` + : `object` List of schedule objects defining the cadence of the offer. + + `period` + : `enum` Frequency of the offer activation. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `monthly` + - `yearly` + + `interval` + : `integer` Specifies the repeating pattern in terms of the period. Possible values: + - `1-7` + - `1-31` + - `1-12` + + `starts_at` + : `integer` Start time of the schedule in UNIX timestamp. + + `ends_at` + : `integer` End time of the schedule in UNIX timestamp. + + `terms_condition` + : `string` Terms and conditions of the offer. + + `description` + : `string` Additional description about the offer. + + `url` + : `string` URL linking to the full terms and conditions of the offer. + + `applicable_channels` + : `enum` Specifies where the offer is applicable. Possible values: + - `online` + - `offline` + + `funding` + : `object` Defines how the offer is funded and distributed amongst stakeholders. + + `type` + : `string` Specifies whether the offer is fully funded or co-funded. Possible values: + - `full` + - `cofunded` + + `split` + : `array` List of funding contributions from different entities. + + `bearer` + : `string` Defines the entity responsible for bearing the offer cost. Possible values: + - `business` + - `issuer` + - `network` + - `cobranding_partner` + - `app` + + `type` + : `string` Specifies the type of funding applied. Possible values: + - `fixed` + - `percentage` + + `value` + : `integer` Defines the funding amount or percentage contributed. For example: `50` for 50%. + + `benefits_types` + : `enum` List of benefit types. Possible values: + - `instant_discount` + - `cashback` + - `no_cost_emi` + - `low_cost_emi` + - `voucher` + + `usage_limits` + : `object` Defines the restrictions on offer usage across offer, customer, payment instrument. + + `on` + : `enum` Level at which the usage limit applies. Possible values: + - `offer` + - `mobile number` + - `card number` + - `email` + - `phone` + - `customer id` + + `limit_type` + : `enum` Type of usage limit. Possible values: + - `COUNT` + - `BUDGET` + + `limit_value` + : `integer` Value corresponding to the limit. For example, `1` for single use. + + `frequency_type` + : `enum` Frequency for the usage limit. Possible values: + - `daily` + - `weekly` + - `monthly` + - `yearly` + + `frequency_value` + : `string` Value corresponding to the frequency type. Possible values: + - `1-7` for daily + - `1-31` for monthly + - `1-12` for yearly + + `rules` + : `object` Defines the validations and the benefits for an offer. + + `filters` + : `object` Criteria for transactions to qualify for the offer. Possible values: + - `min_amount` + - `min_amount` + - `applies_to` + - `line_items` + + `includes` + : `object` Criteria that qualify transactions for the offer. + + `order` + : `object` Order-specific filters such as `min_amount` or `max_amount`. + + `min_amount` + : `integer` Minimum order amount required to apply the offer. Amount is in the smallest currency sub-unit. + + `max_amount` + : `integer` Maximum order amount eligible for the offer. Amount is in the smallest currency sub-unit. + + `applies_to` + : `enum` Specifies what the offer applies to. Possible values: + - `cart` + - `products` + + `payment_instruments` + : `object` Filters on payment methods and instruments. For example, `issuer`, `apps` or `vpa`. + + `method` + : `string` Payment method. For example, `card`, `upi`, `emi`, `netbanking`. + + `card` + : `object` Details associated with the card. Required if the payment method is `card`. + + `saved` + : `boolean` Indicates if the offer promotes card tokenisation. Possible values: + - `true` + - `false` + + `international` + : `boolean` Specifies if the card is international. + + `issuers` + : `string` List of eligible card issuers For example, `HDFC`, `ICICI`, `SBI`. + + `types` + : `enum` Type of card. Possible values: + - `debit` + - `credit` + - `prepaid` + + `networks` + : `enum` Card networks. Possible values: + - `visa` + - `amex` + - `mastercard` + - `bajaj` + - `maestro` + - `rupay` + - `diners` + + `categories` + : `string` Specifies the category of the card. For example: `Platinum`, `Infinia`. + + `iins` + : `integer` List of Issuer Identification Numbers (IINs). Only 6-digit IINs are supported. + + `subtype` + : `enum` Specifies the subtype of the card. Possible values: + - `consumer` + - `business` + + `cobranding_partners` + : `enum` List of co-branding partners associated with the card. For example: `onecard`, `flipkart`, `swiggy`. + + `tokens` + : `string` Card tokens for tokenized payments. + + `number` + : `string` Reference number to fetch offers based on the card number. + + `upi` + : `object` Contains details specific to UPI payments. + + `psp` + : `enum` List of supported UPI apps. For example, `gpay`, `cred`. + + `vpa_handle` + : `enum` List of supported VPA handles. For example: `xyz@okaxis`. + + `payer_account_types` + : `string` Types of payer accounts. Possible values: + - `credit_card` + - `bank_account` + - `credit_line` + - `wallet` + + `flow` + : `enum` Specifies the UPI payment flow. Possible values: + - `collect` + - `intent`. + + `bank_account` + : `object` Details related to bank account payments. + + `account_numbers` + : `string` List of allowed account numbers. + + `ifscs` + : `string` List of allowed IFSC codes. + + `names` + : `string` List of allowed account holder names. + + `emi` + : `object` Details of EMI payment method. + + `emi_duration` + : `integer` List of available EMI durations in months. For example: `3`, `6`. + + `wallet` + : `object` Details of wallet payment method. + + `providers` + : `string` List of supported wallet providers. For example, [Wallet providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + `netbanking` + : `object` Details of net banking payment method. + + `banks` + : `enum` List of supported banks for net banking. For example: `HDFC`. + + `excludes` + : `object` Criteria that disqualify transactions for the offer. + + `orders` + : `object` Specific exclusions on order details like `min_amount` or `max_amount`. + + `payment_instruments` + : `object` Specific exclusions for payment instruments. For example, issuer, apps or VPA.tokens. + + `benefits` + : `object` The details of the benefits of the offer. + + `offer_type` + : `enum` Type of benefit provided. Possible values: + - `instant_discount` + - `cashback` + - `already_discounted` + - `low_cost_emi` + - `no_cost_emi` + - `voucher` + + `limit_type` + : `enum` Type of benefit. Possible values: + - `flat` + - `up_to` + + `unit` + : `enum` Unit of the benefit. Possible values: + - `percentage` + - `absolute` + + `value` + : `integer` Value of the benefit. Amount is in the smallest currency sub-unit. + + `max_discount` + : `integer` Maximum discount applicable for the benefit. Amount is in the smallest currency sub-unit. + + `calculated_benefit_value` + : `integer` Actual benefit value applied to the transaction. Amount is in the smallest currency sub-unit. + + `display_config` + : `object` Contains configurations to control how the offer is displayed and validated. + + `offer_display_priority` + : `integer` Determines the priority level for displaying the offer. A lower value indicates a higher priority. For example: `1`. + + `should_validate` + : `boolean` Specifies if additional customer-specific validation is required for the offer. Possible values: + - `true` + - `false` + + `is_hidden` + : `boolean` Determines whether the offer should be visible to customers in the checkout UI. Possible values: + + - `true` : The offer is hidden from the checkout UI. It can still be applied programmatically or automatically based on conditions. + - `false` : The offer is visible and may be shown in the checkout UI for users to apply. + + `auto_apply` + : `boolean` Specifies whether the offer should be automatically applied during checkout without requiring user action. Possible values: + + - `true` : The offer is auto-applied if it meets the eligibility criteria. + - `false` : The offer requires the customer to explicitly select or input the offer/voucher during checkout. + +`invalid_offers` +: `array` List of offers that are not applicable. + + `entity` + : `string` Represents the type of collection. + + `count` + : `integer` Number of invalid offers. + + `items` + : `array` List of invalid offer objects. + + + +### Error Response Parameters + +Error | Cause | Solution +--- +Invalid offer id. | The offer id provided in the request is invalid. | Retry with a valid offer id. +--- +Missing voucher code. | The voucher code is missing in the request. | Retry with a valid voucher code. +--- +Missing user id. | The user id is missing in the request. | Retry with a valid user ID. +--- +Missing user type. | The user type is missing in the request. | Retry with a valid user type. +--- +Invalid user type. | The user type provided in the request is invalid. | Retry with a valid user type. +--- +No active Offers found. | No active Offers are available for the provided details. | Retry with a valid voucher code and contact. +--- +Missing fact: customer. | The request is missing customer fact values. | Retry with valid customer fact values. +--- +Missing fact: card number. | The request is missing a required card number. | Retry with a valid card number. +--- +Missing fact: email. | The request is missing a required email address. | Retry with a valid email address. +--- + + + +### Step 5: Fetch Orders + +Fetches the details of a specific order using the `order_id`. When the `expand[]=offers` query parameter is included, this API also returns detailed information about the offers applied to the order. + +/v1/orders/:id/?expand[]=offers + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]\ +-X GET https://api.razorpay.com/v1/orders/:id/?expand[]=offers +``` + +``` json: Success +{ + "id": "order_LesrAVQhpn0Byh", + "entity": "order", + "amount": 1000, + "amount_paid": 900, + "amount_due": 0, + "currency": "INR", + "receipt": "receipt#1", + "offers_applied": { + "entity": "collection", + "count": 1, + "items": [ + { + "entity": "offers", + "id": "offer_LesXV0iK2XmTaw", + "status": "redeemed", + "benefits": [ + { + "offer_type": "instant_discount", + "limit_type": "flat", + "unit": "percentage", + "value": 1020, + "max_discount": 5000, + "calculated_benefit_value": 50 + } + ] + } + ] + }, + "customer": { + "contact": "+91999999999", + "email": "anon@gmail.com" + }, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1681740008 +} +``` + + +### Query Parameter + +`expand[]` _optional_ +: `string` Use `expand[]=offers` to include the `offers_applied` object in the response. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29500`. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`receipt` +: `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + +`offers_applied` +: `json object` Collection of offers entity. + + `entity` + : `string` Represents the type of collection. + + `count` + : `integer` Number of offers to be fetched. + + `items` + : `array` List of offer objects. + + `entity` + : `string` Represents the type of collection. Here it is `offers`. + + `id` + : `string` Unique identifier of the offer. + + `status` + : `string` The status of the offer. + + `benefits` + : `object` The details of the benefits of the offer. + + `offer_type` + : `enum` Type of benefit provided. Possible values: + - `instant_discount` + - `cashback` + - `already_discounted` + - `low_cost_emi` + - `no_cost_emi` + - `voucher` + + `limit_type` + : `enum` Type of benefit. Possible values: + - `flat` + - `up_to` + + `unit` + : `enum` Unit of the benefit. Possible values: + - `percentage` + - `absolute` + + `value` + : `integer` Value of the benefit. Amount is in the smallest currency sub-unit. + + `max_discount` + : `integer` Maximum discount applicable for the benefit. Amount is in the smallest currency sub-unit. + + `calculated_benefit_value` + : `integer` Actual benefit value applied to the transaction. Amount is in the smallest currency sub-unit. + +`customer` +: `string` Details of the customer. + + `contact` + : `string` The customer's phone number. For example, `+919000090000`. + + `email` + : `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + + +### Step 6: Create a Payment + +Send the following attributes required to create a payment at the following endpoint: + +/payments/create/json + +#### Sample Code + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ +-d'{ + "amount": 1000, + "currency": "INR", + "contact": 9000090000, + "email": "gaurav.kumar@example.com", + "order_id": "order_CjyltuCttYiMe8", + "offer_id": "offer_DtEhEm3XslgfXE", + "method": "netbanking", + "bank": "UTIB" +}' + +```json: Success +{ + "razorpay_payment_id": "pay_OsfBn07R1sgSXQ", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/OsfBn07R1sgSXQ/authenticate" + } + ] +} +``` json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Offer Maximum Usage limit exceeded" + } +} +``` + + +### Request Parameters + +`key_id` _mandatory_ +: `string` The Key id that you have generated from the **API Keys** tab in the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, `INR`. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order. + Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`offer_id` +: `string` Unique identifier of the offer. + +`ip` _mandatory_ +: `string` Customer's IP address. + +`email` _mandatory_ +: `string` Email address of the customer. Maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. Maximum length supported is 15 characters, inclusive of country code. + +`authentication` _optional_ +: `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + +`browser` _mandatory_ +: `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `language` + : `string` Obtained from the payer's browser using the `navigator.language` HTML DOM property. Maximum limit of 8 characters. + +`method` _mandatory_ +: `string` Name of the payment method. Possible values are: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + - `cardless_emi` + - `paylater` + +`card` +: Details associated with the card. Required if the payment method is `card`. + + `number` _mandatory_ + : `string` Unformatted card number. Required if the method is `card`. + + `name` _mandatory_ + : `string` Name of the cardholder. Required if the method is `card`. + + `expiry_month` _mandatory_ + : `integer` Expiry month for card in `MM` format. Required if the method is `card`. + + `expiry_year` _mandatory_ + : `string` Expiry year for card in `YY` format. Required if the method is `card`. + + `cvv` _mandatory_ + : `string` CVV printed on the back of card. Required if the method is `card`. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for Visa and Amex tokenised cards. +> - To enable CVV-less flow for Rupay and Mastercard, contact our [support team](https://razorpay.com/support/#request). +> - CVV is mandatory for Diners tokenised cards. +> - CVV is an optional field. Skip passing the `cvv` parameter to Razorpay to implement this change. +> + +`bank` +: `string` Bank code of the bank used for the payment. Required if the method is `netbanking`. + +`bank_account` +: The details of the bank account that should be passed in the request. Required if the method is `emandate`. + + `account_number` _mandatory_ + : `string` Bank account number used to initiate the payment. + + `ifsc` _mandatory_ + : `string` IFSC of the bank used to initiate the payment. + + `name` _mandatory_ + : `string` Name associated with the bank account used to initiate the payment. + +`emi_duration` +: `string` The EMI duration in months. Required if the method is `emi`. + +`vpa` +: `string` Virtual payment address of the customer. Required if the method is `upi`. + +`wallet` +: `string` Wallet code for the wallet used for the payment. Required if the method is `wallet`. + +`notes` _optional_ +: `object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`referrer` _optional_ +: `string` Referrer header passed by the client's browser. + +`user_agent` _optional_ +: `string` Customer user-agent. + + + +### Response Parameters + +If the payment request is valid, the response contains the following fields. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. The value here is `redirect`. Use this URL to redirect customer to the bank page. + + `url` + : `string` URL to be used for the action indicated. + + + +### Response Types + +`2OO OK` +: In this case, the response contains `200 OK` code and the HTML content that needs to be opened in the customer's browser. This HTML content contains form-fields, which will be automatically posted to the redirect URL for the customer to complete the payment. + +`400 Bad Request` +: This can happen when erroneous parameters are passed in the request. For example, when the limit set in Offers is exceeded: + +Know more about the [error codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#error-codes). + +The HTML form returned in the response should be opened in the customer's browser. The customer completes the payment on the displayed page. + + +### Step 7: Verify the Payment + +Once the customer completes the payment, a `POST` request is sent to the `callback_url` provided in the [payment create request](#step-3-create-a-payment). The data contained in the `POST` request depends on the **success** or **failure** of the payment made by the customer. + +## Next Steps + +After the customer has availed the offers and made the payment on the Checkout, you can track the status of the payments: + +- From the Dashboard. +- By [configuring webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). +- By polling our [payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#fetch-payments-based-on-orders). + +### Related Information + +- [About Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers.md) +- [Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md) +- [Tutorial - How to Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/tutorial.md) diff --git a/llm-content/payments/optimizer.md b/llm-content/payments/optimizer.md new file mode 100644 index 00000000..662e1c0f --- /dev/null +++ b/llm-content/payments/optimizer.md @@ -0,0 +1,97 @@ +--- +title: About Optimizer +description: Use Optimizer to route your payments through multiple payment providers with one integration. +--- + +# About Optimizer + +- **Optimizer Changelog**: Discover new features, updates and deprecations related to the Razorpay Optimizer (since Jan 2024). + + - **Optimizer**: Watch this video to see what Optimizer offers. + +If you accept payments on your website or app using multiple payment gateways, Optimizer allows you to route transactions to all these gateways with one integration. + +Using Optimizer, you can: +- Configure new payment gateways in just a few clicks (no coding required). +- Optimise your transaction costs using rules. +- Seamlessly optimise success rates using gateway priority and smart router. +- Access all your payments, refunds, and settlements in one place. + +You can create different rules based on various parameters, like payment methods, channels, card IIN number, card type, card brand, card issuer, banks, transaction amount, and so on. + + +### On Demand Feature - Raise a Request + + + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + + + +#### Advantages + +- **Ease of Integration**: Optimizer is available on the fly with your existing Razorpay integration, making it simple for businesses to start optimising their transactions. +- **Real-time Optimisation and Improved Success Rates**: Optimizer uses real-time data to optimise payment routing, ensuring that transactions are routed to the best available acquirer or gateway. It also help reduce the number of failed transactions and improve the success rate. +- **Better Customer Experience**: Optimizer seamlessly routes the transaction to the best-performing gateway entirely through the backend without any customer intervention. + +## Integrate With Existing Systems +If you are an existing Razorpay customer, there is no need to worry about any technical integrations or coding to use Optimizer. Simply reach out to our [support team](https://razorpay.com/support/#request) with a request to activate the feature, and you are all set. + +> **INFO** +> +> +> **Handy Tips** +> +> Once you have onboarded with your required payment gateway(s), you will receive credentials from the respective gateway(s), which you can configure on the Optimizer Dashboard. +> + +## Supported Payment Methods +Razorpay Optimizer supports a variety of payment methods, including cards, UPI, netbanking, Sodexo Meal Cards, and Emandate, through multiple aggregators and banks. Know more more about [supported payment methods, providers and banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/supported-gateways-aggregators.md). + +Razorpay also supports international payments on Optimizer. Know more more about [international payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/supported-gateways-aggregators.md#international-payments). + +## Supported Platforms + +Razorpay Optimizer is supported on the following platforms: + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + +## What Next + +Understand how to [get started with Razorpay Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/get-started.md). + +### Related Information + +- [Get Started with Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/get-started.md) +- [Add a Payment Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/add-payment-providers.md) +- [Dynamic Routing](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/dynamic-routing.md) +- [Supported Gateways and Aggregators](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/supported-gateways-aggregators.md) +- [SR Analytics Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/success-rate.md) +- [Single Reconciliation View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/reconciliation.md) +- [Roles and Permissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/roles-and-permissions.md) +- [Tokenisation for Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/tokenisation.md) diff --git a/llm-content/payments/optimizer/add-payment-providers.md b/llm-content/payments/optimizer/add-payment-providers.md new file mode 100644 index 00000000..54a3fb01 --- /dev/null +++ b/llm-content/payments/optimizer/add-payment-providers.md @@ -0,0 +1,45 @@ +--- +title: Different Payment Providers +description: Know the different payment providers that Razorpay Optimizer supports. +--- + +# Different Payment Providers + +There are two types of payment providers: +- Bank Gateways: Banks like Axis, ICICI, HDFC, and so on provide their own payment gateway accounts. +- Aggregators: They work with banks and provide a wide range of payment methods. + +You can add payment providers by adding a few details on the Razorpay Dashboard. Every provider has a different set of prerequisites and details. Before adding a provider, you should ensure that the payment gateway or aggregator is ready and has completed all the prerequisites. + +## Supported Payment Providers +Given below are the supported payment providers on Optimizer: + +1. [PayU](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/payu.md) +2. [PayU Instant (beta)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/payu-instant.md) +3. [Ingenico](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/ingenico.md) +4. [Pine Labs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/pinelabs.md) +5. [Paytm S2S](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/paytm-s2s.md) +6. [Paytm Instant (beta)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/paytm-instant.md) +7. [Cashfree](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/cashfree.md) +8. [Cashfree Instant (beta)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/cashfree-instant.md) +9. [BillDesk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/billdesk.md) +10. [CCAvenue](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/ccavenue.md) +11. [Easebuzz](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/easebuzz.md) +12. [Pay10](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/pay10.md) +13. [PhonePe](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/phonepe.md) +14. [ZaakPay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/zaakpay.md) +15. [Simpl](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/simpl.md) +16. [ShopSe](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/shopse.md) +17. [Snapmint](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/snapmint.md) +17. [Airpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/airpay.md) +18. [CAMSPay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/camspay.md) +19. [Bank Gateways](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/banks.md) + +### Related Information + +- [SR Analytics Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/success-rate.md) +- [Single Reconciliation View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/reconciliation.md) +- [Roles and Permissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/roles-and-permissions.md) +- [Tokenisation for Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/tokenisation.md) +- [Supported Gateways and Aggregators](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/supported-gateways-aggregators.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/faqs.md) diff --git a/llm-content/payments/optimizer/airpay.md b/llm-content/payments/optimizer/airpay.md new file mode 100644 index 00000000..7a264b45 --- /dev/null +++ b/llm-content/payments/optimizer/airpay.md @@ -0,0 +1,153 @@ +--- +title: Airpay +description: Add Airpay as a payment provider on Optimizer. +--- + +# Airpay + +Airpay is an integrated omnichannel payment processing platform designed for businesses in India, offering solutions for mobile, online and offline transactions. It acts as a payment aggregator, enabling businesses to accept various instruments like cards, UPI and wallets across multiple sales channels. + +Follow the steps below to onboard Airpay as a payment provider. + + +### Prerequisites + + - Ensure you have Optimizer enabled for your Razorpay account. This payment provider is available only with Optimizer. + - To ensure a successful integration, you must complete the following items prior to configuration: + - **Procure Credentials:** Ensure you have an **active account with Airpay** and possess the necessary **API credentials** (for example, Merchant ID, Secret Key, Username and Password). + - **Whitelisting:** Ensure you have whitelisted the necessary URLs/IP addresses to allow traffic from the Optimizer platform. Please contact Airpay for this. + - **UPI Collect is not supported** by this integration. You must use an alternative provider to accept these payments (Razorpay is available for Optimizer users). [Handle UPI Collect transactions](#1-handling-upi-collect-transactions). + + +> **INFO** +> +> +> **Handy Tips** +> +> No additional configuration is required on your end for Airpay integration. +> + + + +## Add Airpay as Payment Provider + + +### To add Airpay as a payment provider: + + 1. Log in to your Dashboard and select **Optimizer**. + 2. Click **Payment Provider** → **Add Provider**. + 3. Navigate to **Card, Netbanking, and UPI** → **Airpay**. ![Add Airpay payment provider in Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-airpay-add-provider.jpg.md) + 4. Enter your **Provider Details**. ![Add Airpay payment provider in Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-airpay-add-provider-details.jpg.md) + 5. Add your **Airpay Production API Details** and click **Submit**. ![Add Airpay production API details in Razorpay Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-airpay-provider-api-prod-details.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> **UPI Collect is not supported** by this integration. You must use an alternative provider to accept these payments (Razorpay is available for Optimizer users). [Handle UPI Collect transactions](#1-handling-upi-collect-transactions). +> + + You have successfully added Airpay as a payment provider to Optimizer. + + + +## Configure Custom Rule + + +### Add custom rule to route your transactions via Airpay: + + + 1. Log in to your Dashboard and click **Optimizer**. + 2. Click **+ Add New Rule**. + ![Add new rule in Razorpay Optimizer for Airpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-simpl-rule.jpg.md) + 3. Enter the **Rule Name** and **Rule Description**. Click **Next**. + ![Enter rule name and description for Airpay in Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-add-rule-name-desc.jpg.md) + 4. Select the rule conditions and click **Next**, for example: + - **When** - `Payment Method`. + - **is** - `One Of`. + - `Netbanking, Card, UPI Intent`. + ![Configure rule conditions for Airpay payment routing](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-airpay-rule-conditions.jpg.md) + 5. In the **Route** field, enter **100**, and select **Airpay** in the **payment via** field. Click **Next**. ![Add Airpay Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-airpay-priority-route.jpg.md) + 6. Click **Publish Rule**. + + Following this example rule, transactions originating from **iOS devices** and using **Card, Netbanking or UPI payment methods** will be routed through **Airpay**. + + + +## Configure Custom Rules for Limitations + +You must create routing rules to manage the known limitations of the Airpay integration, routing specific transaction types to an alternative provider. + +### 1. Handling UPI Collect Transactions + +Airpay integration currently **does not support "UPI Collect"** requests. + +> **INFO** +> +> +> **Handy Tips** +> +> Create a separate rule for UPI Intent transactions to ensure they are routed to Airpay. +> + + + +### Rule to exclude Airpay for UPI Collect payments: + + 1. Log in to your Dashboard and click **Optimizer**. + 2. Click **+ Add New Rule**. + 3. Enter the **Rule Name** (for example, `Exclude Airpay for UPI Collect`) and **Rule Description**. Click **Next**. + 4. Select the rule conditions as follows and click **Next**: + * **When** - `Payment Method` + * **is** - `Equal to` + * `UPI Collect` + 5. In the **Route** field, enter **100** and select your **[Alternative Gateway Provider]** in the **payment via** field. Click **Next**. + 6. Click **Publish Rule**. ![Configure rule to exclude Airpay for UPI Collect payments in Razorpay Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-airpay-upi-collect-limitation-rule.jpg.md) + + +### 2. Handling Card Transactions + +Airpay integration **does not support Tokenised Card** payments. + + + +### Rule to exclude Airpay for tokenised card payments: + + 1. Log in to your Dashboard and click **Optimizer**. + 2. Click **+ Add New Rule**. + 3. Enter the **Rule Name** (for example, `Exclude Airpay for Tokenised Cards`) and **Rule Description**. Click **Next**. + 4. Select the rule conditions as follows: + - **Condition 1:** + * **When** - `Payment Method` + * **is** - `Equal to` + * `Card` + - **AND** (Add another condition) + - **Condition 2:** + * **When** - `Card Tokenised` + * **is** - `Equal to` + * `True` + 5. Click **Next**. + 6. In the **Route** field, enter **100** and select your **[Alternative Gateway Provider]** in the **payment via** field. Click **Next**. + 7. Click **Publish Rule**. ![Configure rule to exclude Airpay for tokenised card payments in Razorpay Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-airpay-tokenised-cards-limitation-rule.jpg.md) + + +## Best Practices + +Please note these best practices before routing all or some of your traffic to a new gateway via Optimizer: + + +### Live and Test Mode Rules + + Rules set up in the Razorpay Dashboard apply to live mode. However, you must manually configure live mode credentials; test mode credentials will not copy over. + + + +### Sanity Test at Razorpay + + For basic integration testing, contact [Razorpay Support](https://razorpay.com/support/). We will attempt a small test payment to confirm your credentials. + + +## Go Live +After the integration is tested and successful, you can go live with Airpay on Razorpay Optimizer. diff --git a/llm-content/payments/optimizer/airwallex.md b/llm-content/payments/optimizer/airwallex.md new file mode 100644 index 00000000..9d93cdd3 --- /dev/null +++ b/llm-content/payments/optimizer/airwallex.md @@ -0,0 +1,98 @@ +--- +title: Airwallex +description: Add Airwallex as a payment provider on Optimizer. +--- + +# Airwallex + +You can collect payments in international currencies and accept internationally issued cards by using Airwallex as a payment gateway. + +Follow the steps below to onboard Airwallex as a payment provider. + +> **WARN** +> +> +> **Watch Out!** +> +> Optimizer routes payments based on your business logic. However, the method enablement of each gateway needs to be handled between you and the gateway, or it may lead to failed payments. +> + + +### Prerequisites + + Reach out to your Relationship Manager to get your server-to-server or seamless integration kit with credentials. + + +## Add Airwallex as Payment Provider + + +### To add Airwallex as a payment provider: + + + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + 3. In the top-right section, click **Add Provider**. + 4. Select **Airwallex** in the list of gateways available. + ![Add airwallex](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-airwallex.jpg.md) + 5. Enter the provider name and description and click **Next**. + ![Airwallex Add Provider Name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/airwallex-provider-name.jpg.md) + 6. Enter your **Api Key** and **Client Id**. + 7. Select **Card** as the payment method and click **Submit**. + ![Add Salt Key airwallex](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/airwallex-add-key-salt.jpg.md) + You have successfully added **Airwallex** as a payment provider on Optimizer. + + +## Supported Payment Methods + +Payment Methods | Availability +--- +Cards | Live +--- +Wallet | Coming Soon + +> **INFO** +> +> +> **Handy Tips** +> +> Airwallex supports [Tokenisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/tokenisation.md). +> + +## Best Practices + +Before routing all traffic or some traffic to a new gateway via Optimizer, the following best practices are recommended: + + +### Live and Test Mode Rules + + All rules configured in live or test mode on the Razorpay Dashboard will reflect in live mode. However, credentials added in test mode will not be automatically replicated in live mode. + + + +### Sanity Test at Razorpay + + You can reach out to Razorpay for basic sanity testing of the integration. Razorpay will try a test payment of a small value and ensure that the credentials are correct. + + + +### Perform Self-Sanity Test + + We recommend configuring a rule on live mode to route payments less than a set value (for example, ₹2) to the Airwallex gateway. This helps to test on production whether small value payments are being routed to Airwallex and working successfully, thus helping to avoid any direct impact on production traffic. + + Follow the steps given below to configure a rule in live mode: + 1. Log in to your Dashboard. + 2. In the left navigation, click **Optimizer**. + 3. Click **+Add Rule** and enter the **Rule name** and **Description**. + 4. Click **Next** and enter the following rule: + - In **Parameter** field, select **Amount (In Rupees)**. + - In **Select Connection** field, select **Less Than**. + - In **Enter Amount** field, enter the value 2 and click **Next**. + ![Add Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-rule.jpg.md) + 5. Enter the value 100 in the **Route field**, select **Airwallex** in the **Payment Via** field, and click **Next**. + ![target Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/target-provider.jpg.md) + 6. Click **Publish Rule**. + ![Publish Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/publish-rule.jpg.md) + + +## Go Live +After the integration is tested and successful, you can go live on Airwallex. diff --git a/llm-content/payments/optimizer/banks.md b/llm-content/payments/optimizer/banks.md new file mode 100644 index 00000000..f32ace56 --- /dev/null +++ b/llm-content/payments/optimizer/banks.md @@ -0,0 +1,215 @@ +--- +title: Bank Gateways +description: Add various banks as payment providers on Optimizer. +--- + +# Bank Gateways + +You can add banks as payment providers on the Razorpay Dashboard. Check the banks supported by Optimizer and the steps to add them as payment providers. + +## Cards +Given below are the banks that support **Card** as a payment method on Optimizer, along with the steps and requirements to add them as a payment provider: + + +### Axis MIGS + + To add Axis MIGS (Card) as a payment provider: + 1. Log in to your Dashboard. + 2. In the left navigation, under **PAYMENT PRODUCTS**, click **Optimizer**. + 3. Click **Add Provider**, select **Axis MIGS (Card)** and click **Next**. + 4. Enter the **Provider Name** and **Description**, and click **Next**. + 5. Enter the following details: + - AMA Password + - AMA Username + - Access Code + - Merchant Id + - Select Payment Methods + - Secure Secret + 6. Click **Submit**. + + Axis MIGS (Card) will be added as a payment provider. + + + +### CyberSource Axis + + +> **WARN** +> +> +> **Rupay not Supprted!** +> +> CyberSource Axis does not support **Rupay** as a card network. +> + + To add CyberSource Axis (Card) as a payment provider: + 1. Log in to your Dashboard. + 2. In the left navigation, under **PAYMENT PRODUCTS**, click **Optimizer**. + 3. Click **Add Provider**, select **CyberSource Axis (Card)** and click **Next**. + 4. Enter the **Provider Name** and **Description**, and click **Next**. + 5. Enter the following details: + - AMA Password + - Access Code + - AMA Username + - Merchant ID + - Select Payment Methods + - Secret Hash + 6. Click **Submit**. + + CyberSource Axis (Card) will be added as a payment provider. + + + +### CyberSource HDFC + + +> **WARN** +> +> +> **Rupay not Supported!** +> +> CyberSource HDFC does not support **Rupay** as a card network. +> + + To add CyberSource HDFC (Card) as a payment provider: + 1. Log in to your Dashboard. + 2. In the left navigation, under **PAYMENT PRODUCTS**, click **Optimizer**. + 3. Click **Add Provider**, select **CyberSource HDFC (Card)** and click **Next**. + 4. Enter the **Provider Name** and **Description**, and click **Next**. + 5. Enter the following details: + - Access Code + - Organization ID + - SOAP key + - Secret Key + - Select Payment Methods + 6. Click **Submit**. + + CyberSource HDFC (Card) will be added as a payment provider. + + + +### HDFC + + To add HDFC (Card) as a payment provider: + 1. Log in to your Dashboard. + 2. In the left navigation, under **PAYMENT PRODUCTS**, click **Optimizer**. + 3. Click **Add Provider**, select **HDFC (Card)** and click **Next**. + 4. Enter the **Provider Name** and **Description**, and click **Next**. + 5. Enter the following details: + - Bank MID + - Bank TID + - ME Code + - Select Payment Methods + - TranPortal Password + 6. Click **Submit**. + + HDFC (Card) will be added as a payment provider. + + +## UPI +Given below are the banks that support **UPI** as a payment method on Optimizer, along with the steps and requirements to add them as a payment provider: + + +### Axis + + To add Axis (UPI) as a payment provider: + 1. Log in to your Dashboard. + 2. In the left navigation, under **PAYMENT PRODUCTS**, click **Optimizer**. + 3. Click **Add Provider**, select **Axis (UPI)** and click **Next**. + 4. Enter the **Provider Name** and **Description**, and click **Next**. + 5. Enter the following details: + - Merchant Channel Id + - Merchant ID + - Payee VPA + - Select Payment Methods + - Select TPV options (Non TPV/ TPV Only/ Both TPV and Non TPV) + 6. Click **Submit**. + + Axis (UPI) will be added as a payment provider. + + + +### HDFC Mindgate + + To add HDFC Mindgate (UPI) as a payment provider: + + 1. Log in to your Dashboard. + 2. In the left navigation, under **PAYMENT PRODUCTS**, click **Optimizer**. + 3. Click **Add Provider**, select **HDFC Mindgate (UPI)** and click **Next**. + 4. Enter the **Provider Name** and **Description**, and click **Next**. + 5. Enter the following details: + - Response Hash Key + - Store PG Merchant ID + - Select Payment Methods + - Select TPV options (Non TPV/ TPV Only/ Both TPV and Non TPV) + - VPA Assigned + 6. Click **Submit**. + + HDFC Mindgate (UPI) will be added as a payment provider. + + + +### ICICI + + To add ICICI (UPI) as a payment provider: + 1. Log in to your Dashboard. + 2. In the left navigation, under **PAYMENT PRODUCTS**, click **Optimizer**. + 3. Click **Add Provider**, select **ICICI (UPI)** and click **Next**. + 4. Enter the **Provider Name** and **Description**, and click **Next**. + 5. Enter the following details: + - Merchant ID + - Payee VPA + - Select Payment Methods + - Select TPV options (Non TPV/ TPV Only/ Both TPV and Non TPV) + 6. Click **Submit**. + + ICICI (UPI) will be added as a payment provider. + + +## Netbanking +Given below are the banks that support **Netbanking** as a payment method on Optimizer and the requirements to add them as a payment provider: + + +### Axis + + The following details are required to add Axis (Netbanking) as a payment provider: + - Gateway merchant id - Payee id + + + +### Federal Bank + + The following details are required to add Federal Bank (Netbanking) as a payment provider: + - Gateway Merchant ID - API Key + - Gateway Terminal Password - Salt Key + - Gateway Secure Secret - Request Encryption Key + - Gateway Secure Secret2 - Response Encryption Key + + + +### HDFC + + The following details are required to add HDFC (Netbanking) as a payment provider: + - Gateway merchant ID - SPID + + + +### ICICI + + The following details are required to add ICICI (Netbanking) as a payment provider: + - Gateway merchant ID - SPID + + + +### Kotak + + The following details are required to add Kotak (Netbanking) as a payment provider: + - Gateway Merchant ID - Entity CD + - Gateway Merchant ID2 - ENTITY_SUB_CD + + + +### SBI + + The following details are required to add SBI (Netbanking) as a payment provider: + - Gateway MID diff --git a/llm-content/payments/optimizer/billdesk.md b/llm-content/payments/optimizer/billdesk.md new file mode 100644 index 00000000..c8185573 --- /dev/null +++ b/llm-content/payments/optimizer/billdesk.md @@ -0,0 +1,150 @@ +--- +title: BillDesk +description: Add BillDesk as a payment provider on Optimizer. +--- + +# BillDesk + +Follow the steps below to onboard BillDesk as a payment provider. + + +### Prerequisites + + 1. Write to your BillDesk Relationship Manager with the following requests: + - Enable seamless/S2S mode for your account. Mention that you use Razorpay as the technology company to handle sensitive card data. + - Enable `cards`, `upi` and `netbanking` methods. + - Configure the common BillDesk certificate used by Optimizer merchants. + - Configure the following webhook: + + + Type | URL + --- + **Production URL** | `https://api.razorpay.com/v1/callback/billdesk_optimizer` + + - Enable the following if you intend to use UPI. + - Whitelist the following IPs to make the API calls (Initiate Transaction, Authorization API call, Verify Transaction, Refund Initiation, Verify Refund): + - 52.66.75.174 + - 52.66.76.63 + - 52.66.151.218 + - 35.154.217.40 + - 35.154.22.73 + - 35.154.143.15 + - 13.126.199.247 + - 13.126.238.192 + - 13.232.194.134 + +> **INFO** +> +> +> **Handy Tips** +> +> You should share the above mentioned IPs with BillDesk for whitelisting. +> + + - Provide configuration details like a checksum algorithm for stage and production, BankID and card network list. + 2. BillDesk S2S card integration supports two features: + - **Regular card processing** + - **NoRedirect based Payment** + + You should configure **Regular card processing** at the BillDesk side, not **NoRedirect based Payment**. + 3. To pass your unique **Order ID** or **Receipt** for every order, write to your Relationship Manager to show the `additional_info1` parameter in BillDesk Dashboard and customised report. Know more about [how to send your order id to BillDesk](#send-receipt-order-id-to-external-gateway). + + +> **WARN** +> +> +> **Watch Out!** +> +> While Optimizer can route payments based on your business logic, the method enablement of each gateway needs to be handled between you and the gateway, or it may lead to failed payments. +> + + + +## Add BillDesk as a Payment Provider + + +### To add BillDesk as a payment provider: + + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + ![optimizer login](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-login.jpg.md) + 3. In the top right section, click **+ Add provider**. + ![Add provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-provider.jpg.md) + 4. Select **BillDesk** in the list of gateways available and click **Next**. + ![Add BillDesk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-billdesk2.jpg.md) + 5. Enter the provider name and description and click **Next**. + ![Add BillDesk Provider Name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/billdesk-provider-name-description.jpg.md) + 6. Enter your Client ID and Merchant ID. + 7. Select the payment methods you want to enable for BillDesk and click **Submit**. + + ![Add Security ID BillDesk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-security-id2.jpg.md) + You have successfully added **BillDesk** as a payment provider on Optimizer. + + +## Supported Payment Methods + +Payment Methods | Availability +--- +Netbanking | Live +--- +Cards | Live +--- +UPI | Live +--- +Wallet | Live + +> **INFO** +> +> +> **Handy Tips** +> +> Billdesk supports [Third-Party Validation (TPV)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/third-party-validation.md#supported-bank-gateways-payment-gateways-and-payment-methods). +> + +## Send Receipt/Order ID to External Gateway +You might be generating a unique Order ID or Receipt for every order which can be passed to BillDesk via [ Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#orders-api). + +Follow the steps given below for your order id to be visible on the BillDesk Dashboard: +1. In Razorpay's [ Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#orders-api), use the `receipt` parameter to send your unique Order ID or Receipt. +2. Razorpay passes this value to BillDesk in the `additional_info1` parameter. +3. Write to your BillDesk Relationship Manager to show the parameter `additional_info1` in the Dashboard and reports as per your use case. + +## Best Practices + +Before routing all traffic or some traffic to a new gateway via Optimizer, the following best practices are recommended: + + +### Live and Test Mode Rules + + All rules configured on live or test mode on the Razorpay Dashboard will reflect on live mode. However, credentials added on test mode will not be automatically replicated in live mode. + + + +### Sanity Test at Razorpay + + You can reach out to Razorpay for basic sanity testing of the integration. Razorpay will try a test payment of small value and ensure that the credentials are correct. + + + +### Perform Self Sanity Test + + We recommend configuring a rule on live mode to route payments lesser than a set value (for example, ₹2) to the BillDesk gateway. This helps to test on production whether small value payments are being routed to BillDesk and working successfully, thus avoiding any direct impact on production traffic. + + To configure a rule in live mode: + 1. Log in to your Dashboard. + 2. In the left navigation, click **Optimizer**. + 3. Click **+Add Rule** and enter the **Rule name** and **Description**. + 4. Click **Next** and enter the following rule: + - In **Parameter** field, select **Amount (In Rupees)** + - In **Select Connection** field, select **Less Than** + - In **Enter Amount** field, enter the value 2 and click **Next**. + ![Add Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-rule.jpg.md) + 5. Enter the value 100 in the **Route field**, select **billdesk_optimizer** in the **payment via** field, and click **Next**. + ![BillDesk target Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/billdesk-target-provider.jpg.md) + 6. Click **Publish Rule**. + ![Publish Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/billdesk-publish-rule.jpg.md) + + + +## Go Live +After the integration is tested and successful, you can go live on BillDesk. diff --git a/llm-content/payments/optimizer/camspay.md b/llm-content/payments/optimizer/camspay.md new file mode 100644 index 00000000..96b9b582 --- /dev/null +++ b/llm-content/payments/optimizer/camspay.md @@ -0,0 +1,90 @@ +--- +title: CAMSPay +description: Add CAMSPay as a payment provider on Optimizer. +--- + +# CAMSPay + +CAMSPay is a Payment Gateway and Aggregator that enables businesses to securely accept a variety of digital payments for both one-time purchases and recurring transactions (like subscriptions or loan payments). + +Follow the steps below to onboard CAMSPay as a payment provider. + + +### Prerequisites + + - This payment provider is available only with Optimizer. Ensure you have Optimizer enabled for your Razorpay account. + - The gateway credentials (for example, Merchant Id, Checksum Key and Encryption Keys) must be provided to you by the CAMSPay platform. You will need these for the integration. + + +> **INFO** +> +> +> **Handy Tips** +> +> No additional configuration is required on your businesses end for CAMSPay integration. +> + + + +## Add CAMSPay as Payment Provider + + +### To add CAMSPay as a payment provider: + + 1. Log in to your Dashboard and select **Optimizer**. + 2. Click **Payment Provider** → **Add Provider**. + 3. Navigate to **Card, E-Mandate, Netbanking, and UPI** → **CAMSPay**. ![Add CAMSPay payment provider in Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-CAMSPay-add-provider.jpg.md) + 4. Enter your **Provider Details** and click **Next**.![Add CAMSPay payment provider in Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-CAMSPay-add-provider-details.jpg.md) + 5. Add your **CAMSPay Production API Details** and click **Submit**. ![Add CAMSPay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-CAMSPay-provider-api-prod-details.jpg.md) + + You have successfully added CAMSPay as a payment provider to Optimizer. + + + +## Configure Custom Rule + + +### Add custom rule to route your transactions via CAMSPay: + + + 1. Log in to your Dashboard and click **Optimizer**. + 2. Click **+ Add New Rule**. + ![Add CAMSPay rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-simpl-rule.jpg.md) + 3. Enter the **Rule Name** and **Rule Description**. Click **Next**. + ![Add CAMSPay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-add-rule-name-desc.jpg.md) + 4. Select the rule conditions as follows: + - **Condition 1:** + * **When** - `Channel` + * **is** - `Equal to` + * `Android` + - **AND** (Add another condition) + - **Condition 2:** + * **When** - `Payment Method` + * **is** - `Equal to` + * `Card` + ![Add CAMSPay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-CAMSPay-rule-conditions.jpg.md) + 5. In the **Route** section, enter **100**, and select **CAMSPay** in the **payment via** section. Click **Next**. ![Add CAMSPay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-CAMSPay-priority-route.jpg.md) + 6. Click **Publish Rule**. + + All transactions will now be routed via CAMSPay. + + + +## Best Practices + +Please note these best practices before routing all or some of your traffic to a new gateway via Optimizer: + + +### Live and Test Mode Rules + + Rules you set up in test or live mode on your Razorpay Dashboard apply in live mode. However, test mode credentials will not automatically copy to live mode. + + + +### Sanity Test at Razorpay + + For basic integration testing, contact Razorpay. We will attempt a small test payment to confirm your credentials are correct. + + +## Go Live +After the integration is tested and successful, you can go live with CAMSPay on Razorpay Optimizer. diff --git a/llm-content/payments/optimizer/capture-refund-settings.md b/llm-content/payments/optimizer/capture-refund-settings.md new file mode 100644 index 00000000..a8dcc85f --- /dev/null +++ b/llm-content/payments/optimizer/capture-refund-settings.md @@ -0,0 +1,152 @@ +--- +title: Capture and Refund Settings +description: Configure auto-refund settings either from the Razorpay Dashboard or using APIs. +--- + +# Capture and Refund Settings + +Use Optimizer to accept online payments from your customers. Check the payment states flow and configurations to capture and refund customer payments. + +## Optimizer Payment States Flow + +When a customer makes a payment, it usually flows through the following states: + +States | Description +--- +`created` | This is the initial step wherein the customer submits the payment information and it is sent to Optimizer. The payment has not been processed at this stage. +--- +`authorized` | An authorisation is performed when the bank successfully authenticates the customer's payment details. The money is deducted from the customer’s account, but is not settled to your account until the payment is captured. Any payment in this state is auto-refunded to the customer if not captured within 3 days of creation. +--- +`captured` | When the payment status changes to `captured`, the payment is verified as complete by Optimizer. +--- +`refunded` | You can refund the payments that are successfully captured at your end. The amount is reversed to the customer's account. +--- +`failed` | Any unsuccessful transaction is marked as failed and the customer must retry the payment. + +The following state diagram depicts the flow of money through the payment states: + +![Auto-capture All Payments process flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-capture-payment-states.jpg.md) + +1. By default, once your customer completes a payment, it is automatically moved to the `captured` state. However, in case of delayed authorisation, the payment can remain in the `authorized` state. +2. External factors such as network issues or problems with the payment provider can cause delays in Optimizer receiving payment status. In such cases, Optimizer polls the APIs intermittently for 3 days to check the status. If the payment status is successfully received during this time, the payment is moved to the `authorized` state. Know more about [ late authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md). +3. The system ensures that all payments in the `authorized` state are moved to the `captured` state within 3 days of their creation. This is mandatory because payments that are not captured within this time period will be refunded automatically to customers. + +You can configure **Payment Capture settings** on the Dashboard. You can choose to: + - [Auto-capture all payments](#auto-capture-all-payments) + - [Auto-capture with set timeouts](#auto-capture-with-custom-timeouts) + +**Handy Tips** + +Only a Razorpay account owner can configure payment capture settings on the Dashboard. Users with other roles are not allowed to configure this setting. + +Option | Description +--- +Auto-capture all payments | All payments `authorized` within 3 days from the time of creation are auto-captured. +--- +Auto-capture timeouts | - Allows you to define custom auto-capture timeout. +- The minimum value is 12 minutes. +- The maximum value (default) is 3 days. + +--- +Auto-refund speed | Payments in the `authorized` state are auto-refunded after the timeout. Available option is **Normal Refund**: The payment is refunded to your customer in 5-7 working days. + +## Auto-capture All Payments +Capture all `authorized` payments automatically. This eliminates the time and effort spent manually capturing payments. + +> **INFO** +> +> +> +> **Handy Tips** +> +> This is the default setting for all customers. If the payments are not captured within the selected time frame, they are automatically refunded. +> +> + +![ Auto-capture all payments process flow.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-capture-auto-capture-all-payments.jpg.md) + +Watch this video to see how to set up the **Automatic Capture** option for all payments. + +![ Auto-capture all payments process flow.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/auto-capture-all-payments-optimizer.gif.md) + + +### To auto-capture all `authorized` payments: + + 1. Log in to the Dashboard. + 2. Navigate to the **Account & Settings** → **Capture and refund settings (under Payments and refunds section)**. + 3. Click **Change** next to **Automatic Capture**. + 4. Under **Automatic Capture**, click the drop-down and select the time period in the **Capture all payments authorised within** field. For example, 3 days. + 5. Click **Next**. + 6. Click **Normal Speed** and **Save**. + + +## Auto-Capture with Custom Timeouts +Once the payment is `created`, you can: + - auto-capture payments that are `authorized` within a certain time period, and + - auto refund the payments that are `authorized` after that time period. + +You can do this by setting up custom timeouts for automatic capture. + +## Auto-capture Timeout + +Let us say you only want to auto-capture payments that are `authorized` within 3 days of creation, then select the following settings: + +--- +Capture Settings | - Select **Automatic Capture** +- Automatic capture timeout = 3 days. + +--- +Payments auto-refunded | If payments are `authorized` after 3 days. + +> **INFO** +> +> +> **Handy Tips** +> +> If the payments are not captured within the selected time frame, they are automatically refunded. +> + +![Auto Capture Timeout process flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-capture-auto-capture-timeout.jpg.md) + +Watch this video to see how to set up the **Automatic Capture with Timeout** option. + +![ Auto-capture all payments process flow.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/auto-capture-custom-payments.gif.md) + + +### To auto-capture all `authorized` payments with timeout: + + 1. Log in to the Dashboard. + 2. Navigate to the **Account & Settings** → **Capture and refund settings (under Payments and refunds section)**. + 3. Click **Change** next to **Automatic Capture**. + 4. Under **Automatic Capture**, click the drop-down and select the time period in the **Capture all payments authorised within** field. For example, 3 days. + 5. Click **Next**. + 7. Select **Refund Automatically** option and click **Next**. + 6. Click **Normal Speed** and **Save**. + + +## Manual Capture Timeouts + +> **WARN** +> +> +> **Watch Out!** +> +> - [Manual Capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) settings only apply to payments processed via Razorpay. +> - Optimizer will auto capture the payment if the payment is authorised within a certain time period. +> - Any payment authorised after that time period (auto capture time period) will be auto refunded. +> - Any manual capture time period set on the Dashboard will not apply to payments processed through payment providers other than Razorpay. Such payments will be automatically captured by default. +> + +Ensuring that you reflect the correct information is crucial because downstream payment providers will mark the payment as successful and settle the amount to your account as per the settlement schedule, even if Optimizer waits for you to manually capture the payment. + +## Configure Payment Capture Settings Using Orders API + +Capture values passed in the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) take precedence over the Payment Capture settings configured on the Dashboard. You can use this to change the capture settings for individual payments. + +### Related Information + +- [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) +- [Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#payment-life-cycle) +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) +- [Manually capture payments using Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) +- [Manually capture payments from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments) diff --git a/llm-content/payments/optimizer/cashfree-instant.md b/llm-content/payments/optimizer/cashfree-instant.md new file mode 100644 index 00000000..cab90fd8 --- /dev/null +++ b/llm-content/payments/optimizer/cashfree-instant.md @@ -0,0 +1,104 @@ +--- +title: Cashfree Instant (beta) +description: Add Cashfree Instant (beta) as a payment provider on Optimizer. +--- + +# Cashfree Instant (beta) + +Follow the steps below to onboard Cashfree as a payment provider. + +> **WARN** +> +> +> **Watch Out!** +> +> While Optimizer can route payments based on your business logic, the method enablement of each gateway needs to be handled between you and the gateway, or it may lead to failed payments. +> + +## Prerequisites +You need to have an active Cashfree account with the necessary payment methods activated. + +## Add Cashfree as a Payment Provider + + +### To add Cashfree as a payment provider: + + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + 3. In the top-right section, click **Add Provider**. + 4. Select **Cashfree** and **Instant (beta)** in the list of gateways available and click **Next**. + ![Add Cashfree](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-cashfree-new-instant.jpg.md) + 5. Enter the provider name and description and click **Next**. + ![Add cashfree Provider Name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cashfree-provider-name.jpg.md) + 6. Enter your App ID and App secret Key. + 7. Select the payment methods you want to enable for Cashfree and click **Submit**. + + ![Add App key secret cashfree instant](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-app-key-secret-instant.jpg.md) + + You have successfully added **Cashfree** as a payment provider on Optimizer. + + +## Supported Payment Methods + +Payment Methods | Availability +--- +Netbanking | Live +--- +Cards | Coming Soon +--- +UPI | Live +--- +Wallet | Coming Soon +--- +EMI | Coming Soon +--- +Settlements | Live +--- +Refunds | Live + +## Send Receipt/Order ID to External Gateway +You might be generating a unique Order ID or Receipt for every order which can be passed to Cashfree via [ Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#orders-api). + +To make your order id visible on the Cashfree Dashboard: +1. In Razorpay's Orders API, use the `receipt` parameter to send your unique Order ID or Receipt. +2. Razorpay passes this value to Cashfree in `orderNote` parameter. +3. Write to your Cashfree Relationship Manager to show the parameter `orderNote` in the Dashboard and reports as per your use case. + +## Best Practices + +Before routing all traffic or some traffic to a new gateway via Optimizer, the following best practices are recommended: + + +### Live and Test Mode Rules + + All rules configured on live or test mode on the Razorpay Dashboard will reflect on live mode. However, credentials added on test mode will not be automatically replicated in live mode. + + + +### Sanity Test at Razorpay + + You can reach out to Razorpay for basic sanity testing of the integration. Razorpay will try a test payment of small value and ensure that the credentials are correct. + + + +### Perform Self Sanity Test + + We recommend configuring a rule on live mode to route payments lesser than a set value (for example, ₹2) to the Cashfree gateway. This helps to test on production whether small value payments are being routed to Cashfree and working successfully, thus avoiding any direct impact on production traffic. + + To configure a rule in live mode: + 1. Log in to your Dashboard. + 2. In the left navigation, click **Optimizer**. + 3. Click **+Add Rule** and enter the **Rule name** and **Description**. + 4. Click **Next** and enter the following rule: + - In **Parameter** field, select **Amount (In Rupees)** + - In **Select Connection** field, select **Less Than** + - In **Enter Amount** field, enter the value 2 and click **Next**. + ![Add Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-rule.jpg.md) + 5. Enter the value 100 in the **Route field**, select **Cashfree** in the **Payment Via** field, and click **Next**. + ![Cashfree target Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cashfree-target-provider.jpg.md) + 6. Click **Publish Rule**. + ![Cashfree-Publish Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cashfree-publish-rule.jpg.md) + + +## Go Live +After the integration is tested and successful, you can go live on Cashfree. diff --git a/llm-content/payments/optimizer/cashfree.md b/llm-content/payments/optimizer/cashfree.md new file mode 100644 index 00000000..a5ab92bb --- /dev/null +++ b/llm-content/payments/optimizer/cashfree.md @@ -0,0 +1,149 @@ +--- +title: Cashfree +description: Add Cashfree as a payment provider on Optimizer. +--- + +# Cashfree + +Follow the steps below to onboard Cashfree as a payment provider. + +> **WARN** +> +> +> **Watch Out!** +> +> While Optimizer can route payments based on your business logic, the method enablement of each gateway needs to be handled between you and the gateway, or it may lead to failed payments. +> + + +### Prerequisites + + 1. [Write to your Cashfree Relationship Manager](#email-format-for-cashfree) and mention that you are using Optimizer to handle sensitive card data. Request to enable the following: + - Seamless mode for your account. + - Whitelist the domain/URL `https://api.razorpay.com/`. + 2. Copy Razorpay in the email and we will provide the supporting document from our end. Know more about the [email format for Cashfree](#email-format-for-cashfree). + 3. To pass your unique **Order ID** or **Receipt** for every order, write to your Relationship Manager to show the `orderNote` parameter in the Cashfree Dashboard and customise report. Know more about [how to send your order id to Cashfree](#send-receipt-order-id-to-external-gateway). + 4. On the Cashfree Dashboard, select the `v0` version for payment success, pending and fail state events. + 5. For real time sync of refund status on Optimizer, please configure refund webhooks on your Cashfree dashboard. Endpoint URL: https://api.razorpay.com/v1/callback/cashfree + + +## Add Cashfree as a Payment Provider + + +### To add Cashfree as a payment provider: + + Watch this video to see how to add Cashfree as a Payment Provider. + + +[Video: https://www.youtube.com/embed/mLEU0wnuPKQ] + + **Steps** + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + 3. In the top-right section, click **Add Provider**. + 4. Select **Cashfree** in the list of gateways available and click **Next**. + ![Add Cashfree](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-cashfree.jpg.md) + 5. Enter the provider name and description and click **Next**. + ![Add cashfree Provider Name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cashfree-provider-name.jpg.md) + 6. Enter your App ID and App secret Key. + 7. Select the payment methods you want to enable for Cashfree and click **Submit**. + ![Add App key secret cashfree](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-app-key-secret.jpg.md) + + You have successfully added **Cashfree** as a payment provider on Optimizer. + + +## Supported Payment Methods + +Payment Methods | Availability +--- +Netbanking | Live +--- +Cards | Live +--- +UPI | Live +--- +Wallet | Live +--- +EMI | Coming Soon +--- +Settlements | Live +--- +Refunds | Live + +> **INFO** +> +> +> **Handy Tips** +> +> Cashfree supports [Third-Party Validation (TPV)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/third-party-validation.md#supported-bank-gateways-payment-gateways-and-payment-methods). +> + +## Email Format for Cashfree + + +### Follow the email format given below to communicate the [prerequisites](#prerequisites) or any other requirements to the Cashfree Account Manager: + + Dear `Account Manager`, + + We are using “Optimizer” as a technology service provider to manage our integration with Cashfree for account ``. + + In order to use this TSP, we require certain configurations to be enabled as mentioned below: + 1. Enable **seamless** mode for our account. + 2. Please enable the account for card, netbanking and UPI transactions. + + Please share the following: + - A list of the enabled banks for netbanking and networks for cards payments methods. + - A sample of the existing payment request and response for payments. + + The PCI-DSS Certificate of Optimizer is attached with this email, as the confidential payment information will be handled by the Optimizer team. + + Regards, + + +## Send Receipt/Order ID to External Gateway +You might be generating a unique Order ID or Receipt for every order which can be passed to Cashfree via [ Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#orders-api). + +To make your order id visible on the Cashfree Dashboard: +1. In Razorpay's Orders API, use the `receipt` parameter to send your unique Order ID or Receipt. +2. Razorpay passes this value to Cashfree in `orderNote` parameter. +3. Write to your Cashfree Relationship Manager to show the parameter `orderNote` in the Dashboard and reports as per your use case. + +## Best Practices + +Before routing all traffic or some traffic to a new gateway via Optimizer, the following best practices are recommended: + + +### Live and Test Mode Rules + + All rules configured on live or test mode on the Razorpay Dashboard will reflect on live mode. However, credentials added on test mode will not be automatically replicated in live mode. + + + +### Sanity Test at Razorpay + + You can reach out to Razorpay for basic sanity testing of the integration. Razorpay will try a test payment of small value and ensure that the credentials are correct. + + + +### Perform Self Sanity Test + + We recommend configuring a rule on live mode to route payments lesser than a set value (for example, ₹2) to the Cashfree gateway. This helps to test on production whether small value payments are being routed to Cashfree and working successfully, thus avoiding any direct impact on production traffic. + + To configure a rule in live mode: + 1. Log in to your Dashboard. + 2. In the left navigation, click **Optimizer**. + 3. Click **+Add Rule** and enter the **Rule name** and **Description**. + 4. Click **Next** and enter the following rule: + - In **Parameter** field, select **Amount (In Rupees)** + - In **Select Connection** field, select **Less Than** + - In **Enter Amount** field, enter the value 2 and click **Next**. + ![Add Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-rule.jpg.md) + 5. Enter the value 100 in the **Route field**, select **Cashfree** in the **Payment Via** field, and click **Next**. + ![Cashfree target Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cashfree-target-provider.jpg.md) + 6. Click **Publish Rule**. + ![Cashfree-Publish Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cashfree-publish-rule.jpg.md) + + + +## Go Live +After the integration is tested and successful, you can go live on Cashfree. diff --git a/llm-content/payments/optimizer/ccavenue.md b/llm-content/payments/optimizer/ccavenue.md new file mode 100644 index 00000000..02b21669 --- /dev/null +++ b/llm-content/payments/optimizer/ccavenue.md @@ -0,0 +1,147 @@ +--- +title: CCAvenue +description: Add CCAvenue as a payment provider on Optimizer. +--- + +# CCAvenue + +Follow the below steps to onboard CCAvenue as a payment provider. + +> **WARN** +> +> +> **Watch Out!** +> +> - While Optimizer can route payments based on your business logic, the method enablement of each gateway must be handled between you and the gateway, or it may lead to failed payments. +> - CCAvenue does not support **tokenisation**. +> + + +### Prerequisites + + + 1. Write to your CCAvenue Relationship Manager asking to do the following: + - Ignore the IP validation. + +> **WARN** +> +> +> **Watch Out!** +> +> You must provide the attached undertaking signed on your company's letterhead along with signature of authorised personnel for CCAvenue to ignore the IP validation. Know more about [undertaking for Ignore IP Validation](#undertaking-for-ignore-ip-validation). +> + + - Enable seamless/S2S mode for your account. Mention that you use Razorpay as the technology company to handle sensitive card data. + +> **WARN** +> +> +> **Watch Out!** +> +> You must provide proof of service or business relationship between you and Razorpay to enable seamless/S2S mode. +> + + - Enable the methods `cards`, `wallets` and `netbanking`. + - Disable billing information on MID (Merchant ID). + - Whitelist the following URL to initiate transaction: + - `https://api.razorpay.com/` + 2. Copy Razorpay in the email and we will provide the supporting document from our end. + + +## Integration Requirements + +Use the format given below on your company's letterhead to enable IP ignore: + + +### Undertaking for Ignore IP Validation + + To, + + Infibeam Avenues + + We, `Merchant`, hereby confirm that we want to enable the “ignore IP check “ for existing `bank` + merchant’s with reseller code `` of Infibeam Avenues and accept the risk associated with it + as stated further. IP/domain white-listing enables restricting the access to merchant’s service from one + or more trusted IP’s only. For whatsoever reason, if the shared encryption key of the merchant gets + compromised then it will not be possible to reject the merchant requests coming virtually from anywhere. + + Thanks and Regards, + + `` + + Designation + + Date: + + +## Add CCAvenue as Payment Provider + + +### To add CCAvenue as a payment provider: + + + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + ![optimizer login](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-login.jpg.md) + 3. In the top-right section, click **Add Provider**. + ![Add provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-provider.jpg.md) + 4. Select **CCAvenue** in the list of gateways available and click **Next**. + ![Add CCAvenue](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-ccavenue.jpg.md) + 5. Enter the provider name and description and click **Next**. + ![Add Provider Name CCAvenue](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/provider-name-ccavenue.jpg.md) + 6. Enter your **Access code**, **MID** and **Working Key**. + 7. Select the payment methods you want to enable for CCAvenue and click **Submit**. + ![Add Key CCAvenue](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-key-ccavenue-new-one.jpg.md) + You have successfully added **CCAvenue** as a payment provider on Optimizer. + + +## Supported Payment Methods + +Payment Methods | Availability +--- +Netbanking | Live +--- +Cards | Live +--- +UPI | Live +--- +Wallets | Coming Soon + +## Best Practices + +Before routing all traffic or some traffic to a new gateway via Optimizer, the following best practices are recommended: + + +### Live and Test Mode Rules + + All rules configured on live or test mode on the Razorpay Dashboard will reflect on live mode. However, credentials added on test mode will not be automatically replicated in live mode. + + + +### Sanity Test at Razorpay + + You can reach out to Razorpay for basic sanity testing of the integration. Razorpay will try a test payment of small value and ensure that the credentials are correct. + + + +### Perform Self-Sanity Test + + We recommend configuring a rule on live mode to route payments lesser than a set value (for example, ₹2) to the CCAvenue gateway. This helps to test on production whether small value payments are being routed to CCAvenue and working successfully, thus helping to avoid any direct impact on production traffic. + + Follow the steps given below to configure a rule in live mode: + 1. Log in to your Dashboard. + 2. In the left navigation, click **Optimizer**. + 3. Click **+Add Rule** and enter the **Rule name** and **Description**. + 4. Click **Next** and enter the following rule: + - In **Parameter** field, select **Amount (In Rupees)**. + - In **Select Connection** field, select **Less Than**. + - In **Enter Amount** field, enter the value 2 and click **Next**. + ![Add Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-rule.jpg.md) + 5. Enter the value 100 in the **Route field**, select **CCAvenue** in the **Payment Via** field, and click **Next**. + ![target Provider CCAvenue](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/target-provider-ccavenue.jpg.md) + 6. Click **Publish Rule**. + ![Publish Rule CCAvenue](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/publish-rule-ccavenue.jpg.md) + + +## Go Live +After the integration is tested and successful, you can go live on CCAvenue. diff --git a/llm-content/payments/optimizer/convenience-fees.md b/llm-content/payments/optimizer/convenience-fees.md new file mode 100644 index 00000000..3a56b966 --- /dev/null +++ b/llm-content/payments/optimizer/convenience-fees.md @@ -0,0 +1,61 @@ +--- +title: Collect Standard Convenience Fees from Customers +description: Collect convenience fees from your customers for using your technology and infrastructure. +--- + +# Collect Standard Convenience Fees from Customers + +You can configure a particular fee for every payment made using Optimizer with the help of the Customer Fee Bearer feature. You can charge an additional fee to your customers to help you recover costs such as as online payment gateway charges. + +Convenience fees are seamlessly added at Razorpay Checkout without disrupting customers checkout experience. If a refund is initiated, your customers receive the convenience fees and the actual payment amount. + +![Dynamic Convenience Fees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-dynamic-convenience-fees-v2.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> - **INR** is the only supported currency. This feature is not available for international payments. +> - This feature is **not available** for: +> - Smart Collect (via VA, VPA and QR Codes) +> - Route +> - Subscriptions (via Emandate, Paper NACH) +> + +## Enable Customer Fee Bearer + +To enable customer fee bearer for your account: +- Reach out to your Account Manager and share the fees with them that need to be configured for each payment method. + +## How it Works +Given below is the customer payment flow: + +1. The customer selects an item on your website/Payment Link/Payment Page and clicks the pay button. + ![Customer clicks pay button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settings-fee-bearer-payment-page.jpg.md) +2. The checkout pop-up page is displayed. The customer selects the payment mode and clicks the **Pay** button. + ![checkout form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settings-fee-bearer-checkout-new1.jpg.md) +3. The **Fees Breakup** page containing the Convenience Fee appears, and the customer clicks **Continue and pay**. + ![Fees breakup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settings-fee-bearer-fee-breakup-new1.jpg.md) +4. The customer is redirected to the bank page with the total amount, including the Convenience Fee. + +> **INFO** +> +> +> **Handy Tips** +> +> All Optimizer gateways support the Customer Fee Bearer feature. Know more about the [gateways supported by Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/supported-gateways-aggregators.md). +> + +## Communication + +You should inform customers about the convenience fees, as we do not notify them of them except at checkout. In the Razorpay payment acknowledgement email sent after a successful payment, the convenience fees are included in the total amount without a breakdown. + +### Related Information + +- [Add Payment Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/add-payment-providers.md) +- [SR Analytics Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/success-rate.md) +- [Roles and Permissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/roles-and-permissions.md) +- [Tokenisation for Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/tokenisation.md) +- [Supported Gateways and Aggregators](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/supported-gateways-aggregators.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/faqs.md) diff --git a/llm-content/payments/optimizer/create-custom-rule.md b/llm-content/payments/optimizer/create-custom-rule.md new file mode 100644 index 00000000..686d5a76 --- /dev/null +++ b/llm-content/payments/optimizer/create-custom-rule.md @@ -0,0 +1,323 @@ +--- +title: Create Custom Rules +description: Create custom rules on Optimizer. +--- + +# Create Custom Rules + +You can create a set of custom rules for transactions using different parameters such as payment method, card type, and so on. Also, you can add gateways in priority order and split traffic between gateways. + +Let us assume you want to set up a custom rule wherein: + +Priority Levels | Transaction Split - Payment Gateway/Provider +--- +Priority 1 | • 80% of transactions to be routed via Razorpay +• 20% of transactions to be routed via ABC +--- +Priority 2 | • 100% of transactions to be routed via XYZ + +This means that if the success rate of Razorpay and ABC drops below a certain level, all transactions will automatically be routed to XYZ. + +## Steps + +To set up the custom rule: +1. Click **+Add New Rule**. +2. In the **Create Rule** screen, add the rule details: + 1. **Rule Name** - Add a name for the rule. For example, `VISA Card Transactions`. + 2. **Rule Description** - Enter a description. For example, `Route 80% of all VISA card transactions via Razorpay`. + + ![Create Custom Rules](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-create-custom-rule.jpg.md) +3. Click **Next**. +4. Add the rule conditions: + + + Field | Possible Values + --- + When | • Channels (Website, Android, iOS) +• Payment Method (Card, Netbanking and UPI) +• BIN Number (Card IIN Number) +• Card Type (Debit, Credit, Prepaid, Corporate) +• Card Brand (American Express, Diners Club, Discover and so on) +• Card Issuer (SBIN, HDFC, ICIC, UTIB, KKBK) +• Banks (SBIN, HDFC, ICIC, UTIB) +• Amount (In Rupees) +• Custom Identifier 1 +• Custom Identifier 2 +• Custom Identifier 3 + +> **INFO** +> +> **Custom Identifiers** + Know more about [custom identifiers](#custom-identifiers). + + --- + Is | +• One of +• Equal to +• Not equal to +• Between +• Starting with +• Ending with +• Less than +• Greater than +• Contains +• Greater than equal +• Less than equal + --- + Select Comparing Value | Depends on the **When** field value. + + + Continuing with our VISA card rule example, the values will be as follows: + 1. **When** - Select `Card Brand`. + 2. **is** - Select `Equal to`. + 3. **Select Comparing Value** - Select `VISA`. + 4. Click **Next**. + + ![Add Custom Rule Conditions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-add-custom-rule-condition.jpg.md) +5. Add the target payment provider through which the transactions should be routed: + 1. Click **Edit Target Provider** to set the priority. + 2. Enter the following details: + 1. For example, for Razorpay gateway, provide the values for **Route** as 80 and **payment via** as `Razorpay`. + 2. Click **Add Another Provider**. + 3. For example, for ABC gateway, provide the values for **Route** as 20 and **payment via** as `ABC`. + 3. You can choose to add another provider as Priority 2. To do this, click **Add Priority** and enter the following details: + 1. For example, for XYZ gateway, provide the values for **Route** as 100 and **payment via** as `XYZ`. + 4. Click **Next**. + ![Add Target Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-target-provider.jpg.md) +6. Click **Publish Rule** to publish immediately. Alternatively, you can save the rule in draft state and publish later. +![Publish Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-publish-rule.jpg.md) + +## Custom Identifiers + +Custom identifiers are texts (strings) that can be used to construct routing rules. For instance, you can use custom identifiers to route transactions through Razorpay when you pass a custom text `xyz` and to PayU when you pass the text `abc`. + +**How to send the values for custom identifier?** + +There are three field defined for custom identifiers: +1. optimizer_identifier_1 +2. optimizer_identifier_2 +3. optimizer_identifier_3 + +These fields can be sent within the notes object of the payment or order request. If this field is sent into the order request, it will be copied in the payment requests corresponding to the order id. This is done to ensure that you have both the options available. We recommend adding these fields in the order request since its more secure. + +### Sample Code + +Given below are sample codes which show how the `notes` parameter should be passed in the Orders API and the Standard Checkout code: + +#### Orders API + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "optimizer_identifier_1": "rzp", + "optimizer_identifier_2": "payu", + "optimizer_identifier_3": "atom" + } +}' +```java: Java + +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 50000); // amount in the smallest currency unit +orderRequest.put("currency", "INR"); +orderRequest.put("receipt", "receipt#1"); + +JSONObject notes = new JSONObject(); +notes.put("optimizer_identifier_1", "rzp"); +notes.put("optimizer_identifier_2", "payu"); +notes.put("optimizer_identifier_3, atom); +request.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ +"amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "optimizer_identifier_1": "rzp", + "optimizer_identifier_2": "payu", + "optimizer_identifier_3": "atom" + } + + }) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => 'receipt#1', 'amount' => 50000, 'currency' => 'INR', + 'notes' => array( 'optimizer_identifier_1'=> 'rzp', 'optimizer_identifier_2'=> 'payu', 'optimizer_identifier_3'=> 'atom'))); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +notes.optimizer_identifier_1="rzp"; +notes.optimizer_identifier_2="payu"; +notes.optimizer_identifier_3="atom"; +options.Add("notes", notes); +Order order = client.Order.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', "notes": { + "optimizer_identifier_1": "rzp", + "optimizer_identifier_2": "payu", + "optimizer_identifier_3": "atom" + } + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 50000, + currency: "INR", + receipt: "receipt#1", + notes: { + optimizer_identifier_1: "rzp", + optimizer_identifier_2: "payu", + optimizer_identifier_3: "atom" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": map[string]interface{}{ + "optimizer_identifier_1": "rzp", + "optimizer_identifier_2": "payu", + "optimizer_identifier_3": "atom", + }, +} +body, err := client.Order.Create(data, nil) +``` + +#### Standard Checkout + +```js: Standard Checkout Code +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise + "currency": "INR", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_9A33XWu170gUtm", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000" + }, + "notes": { + "optimizer_identifier_1": "rzp", + "optimizer_identifier_2": "payu", + "optimizer_identifier_3": "atom" + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); +}); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +``` + +## Turbo UPI on Optimizer + +Watch this short video of how you to route your transactions for [Turbo UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi.md) using Optimizer. +![Turbo UPI on optimizer gif](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-optimizer.gif.md) + +> **INFO** +> +> +> **Handy Tips** +> +> Make sure that you have enabled Turbo UPI as a payment method. If it is not yet enabled, please get in touch with your sales POC to activate this feature for your account. +> + +Below is an example of how you can route your transactions for [Turbo UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi.md) using Optimizer: +1. Log in to your Dashboard. +2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + ![optimizer login](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-login.jpg.md) +3. Click **Add New Rule**. + ![Add new rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-new-rule-upi-turbo.jpg.md) +4. Enter the **Rule Name** and **Rule Description** and click **Next**. + ![Add rule name & description](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rule-name-description-upi-turbo.jpg.md) +5. Enter the following values: + - **When** - Select `Payment Method`. + - **is** - Select `Equal to`. + - **Select Comparing Value** - Select `upi_in_app` and click **Next**. + ![Add values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/enter-values-upi-turbo.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> The comparing value `upi_in_app` will be enabled only when you have the payment method Turbo UPI enabled for you. +> + +6. Enter the target payment provider details and click **Next**. + ![Add target provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/provider-details-upi-turbo.jpg.md) + + + +> **WARN** +> +> +> **Watch Out!** +> +> - Razorpay is the only supported payment provider for Turbo UPI on Optimizer. +> - If you do not set any routing rules, then by default, all transactions will be routed via Razorpay. +> + +7. Click **Publish Rule**. + ![publish rule turbo upi](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/publish-rule-upi-turbo.jpg.md) +8. Click **Publish Now**. + ![publish now turbo upi](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/publish-now-upi-turbo.jpg.md) + + + +### Related Information + +- [Add Payment Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/add-payment-providers.md) +- [Manage Rules](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/manage-rules.md) diff --git a/llm-content/payments/optimizer/cvv-less-flow.md b/llm-content/payments/optimizer/cvv-less-flow.md new file mode 100644 index 00000000..971c2f2a --- /dev/null +++ b/llm-content/payments/optimizer/cvv-less-flow.md @@ -0,0 +1,97 @@ +--- +title: CVV-less Flow for Card Payments on Optimizer +description: Store customer card details securely as tokens and enable CVV-less payment flows for customers using Optimizer. +--- + +# CVV-less Flow for Card Payments on Optimizer + +By enabling CVV-less payments for saved cards, customers can enjoy a streamlined checkout experience without the need to recall or input the CVV each time. Studies show that offering CVV-less saved card flows can boost conversion rates by up to 4%. + +We recommend businesses to remove the CVV input field from the checkout page to streamline the payment process. If you use Razorpay Standard Checkout in your integration, these UI adjustments will be implemented automatically. Customers can select their saved cards as the preferred payment method, ensuring a swift and hassle-free transaction experience. + +![CVV Less Card Payment Flow GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cvv-less-otp-less.gif.md) + +> **INFO** +> +> +> **Handy Tips** +> +> - To activate the CVV-less feature for your account, please get in touch with your account manager for assistance or contact the [Razorpay support team](https://razorpay.com/support/#request). +> - CVV-less flow is supported for tokenised payments only. +> + +## Supported Cards Networks and Payment Gateways +Given below is the list of card networks and payment gateways that support the CVV-less feature on Optimizer. + + + + S No. | Networks | Availability + --- + 1 | Visa | Live + --- + 2 | Amex | Live + --- + 3 | RuPay | Coming Soon + --- + 4 | Mastercard | Coming Soon + --- + 5 | Diners | Coming Soon + + + + + S No. | Payment Gateway | Availability + --- + 1 | Razorpay | Live + --- + 2 | Cashfree | Live + --- + 3 | Paytm | Live + --- + 4 | PayU | Live + --- + 5 | PineLabs | Live + --- + 6 | Billdesk | Live + --- + 7 | Axis CyberSource | Live + --- + 8 | HDFC CyberSource | Live + + + + + S No. | Payment Gateway | Availability + --- + 1 | Razorpay | Live + --- + 2 | PayU | Live + --- + 3 | Billdesk | Live + + + +## Frequently Asked Questions (FAQs) + + +### 1. How can I enable the CVV-less feature for my account? + + To activate the CVV-less feature for your account, please get in touch with your account manager for assistance or contact the [Razorpay support team](https://razorpay.com/support/#request). + + + +### 2. What steps do I need to take after the feature is activated? + + After the feature is activated, businesses using Standard Checkout need not take any action, as the feature will be automatically implemented. Businesses using Custom/S2S integration can stop passing CVV to Razorpay. + + + +### 3. CVV validation has been a mandatory step until now. Does this feature compromise my customers' security? + + No, the CVV-less feature does not compromise customer security. The Card on File Tokenization (CoFT) process securely encrypts and stores customer card details, with access limited to card networks and issuing banks. As a result, card networks have made CVV validation optional for tokenised cards. This change is 100% secure and compliant with all regulations related to card security. + + + +### 4. Is this change applicable only to specific transactions, such as those below ₹2000? + + No, CVV-less flows apply to all tokenised transactions under Visa, Mastercard, Diners, Amex, and Rupay, regardless of the payment amount. diff --git a/llm-content/payments/optimizer/dynamic-routing.md b/llm-content/payments/optimizer/dynamic-routing.md new file mode 100644 index 00000000..aba0427c --- /dev/null +++ b/llm-content/payments/optimizer/dynamic-routing.md @@ -0,0 +1,125 @@ +--- +title: About Dynamic Routing +description: Know how to route transactions through multiple gateways. +--- + +# About Dynamic Routing + +## What is Dynamic Routing? + +Dynamic Routing simplifies payments for businesses by routing them to the most suitable acquiring bank or payment gateway in real-time, resulting in enhanced success rates, reduced failed transactions, and lowered costs. Instead of designating one primary and one backup gateway, businesses can set up rules to route transactions through multiple gateways based on their performance. + +**For example**, if you have integrated with payment providers A, B, and C, businesses can configure a rule to route a certain percentage of card transactions through each gateway, such as 50% through A, 30% through B, and 20% through C. + +## Standard/Default Routing +You may not have specific routing requirements for all your payments. A simple routing rule could be to set the priority of the gateway, which would apply to all payments. This can be done using the [default rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/update-default-rule.md). + +With Standard Routing you can: +- Prioritise the gateways for all your transactions. +- Distribute the load among the gateways, such as allocating 50% transactions to payment gateway A and the remaining 50% to payment gateway B. + +## Rule-based Routing +Standard routing may not always work for all your transactions. Your business might have specific requirements based on various parameters such as payment method, bank, card networks, and more, which can be used to determine the most relevant payment gateway to handle a specific transaction. + +[Custom rules](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/create-custom-rule.md) provide you with the capability and flexibility to define your business rules using various payment parameters. + + +### Example 1 + + Let us assume you want to set up a custom rule wherein 80% of Android and iOS transactions are to be routed via Paytm and 20% of transactions via PayU. + + Watch this video to see how to perform **channel-based routing**. + + ![Reorder Rule Priority](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-dynamic-routing1.gif.md) + + + +### Example 2 + + Let us assume you want to set up a custom rule wherein 50% of cards and netbanking transactions are to be routed via PineLabs and 50% of transactions via Razorpay. + + Watch this video to see how to perform **method-based routing**. + + ![Reorder Rule Priority](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-dynamic-routing2.gif.md) + + +### Supported Payments Parameters +The table below lists various payments parameters which can be used to determine the most relevant payment gateway to handle a specific transaction. + + Field | Possible Values + --- + Parameters | • Channels (Website, Android, iOS) + +• Payment Method (Card, Netbanking and UPI) + +• BIN Number (Card IIN Number) + +• Card Type (Debit, Credit, Prepaid, Corporate) + +• Card Brand (American Express, Diners Club, Discover and so on) + +• Card Issuer (SBIN, HDFC, ICIC, UTIB, KKBK and so on) + +• Banks (SBIN, HDFC, ICIC, UTIB and so on) + +• Amount (In Rupees) + + + + +## Custom Identifiers +Apart from regular payment parameters, you might need to route payments to a particular gateway based on some business logic defined at your end, such as customer or product information. You can use [custom identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/create-custom-rule.md#custom-identifiers) for such requirements to pass the value to us while creating the order and use it to [create a custom rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/create-custom-rule.md). + + +### Example + + Let us assume you want to route all payments coming from a particular referrer code to a particular payment gateway like Paytm using a custom identifier. + + Watch this video to see how to create a custom rule using **Custom Identifiers**. + + ![Reorder Rule Priority](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-custom-identifiers.gif.md) + + +## Priority-based Routing +In addition to the routing mechanisms explained above, Optimizer also allows you to add gateways in order of priority when creating custom rules. Our AI-ML algorithm constantly monitors the traffic and routes transactions to the best-performing gateway, considering your priority order. The algorithm creates temporary downtimes for 20 minutes when the success rate (SR) drops below a certain threshold for high-priority gateways and starts routing transactions to the next gateway based on priority and performance. + +This ensures that payment processing remains smooth and uninterrupted for your customers, even if some payment gateways experience issues. For example, if the success rate of a gateway assigned to Priority 1 drops below a certain level, transactions will be automatically routed to the gateway configured at Priority 2. + +When the success rate of the gateway assigned to a higher priority level retains a certain level, the transactions will be routed back to those gateways. + + +### Example + + Let us assume you want to set up a rule wherein: + + + Priority Levels | Transaction Split - Payment Gateway/Provider + --- + Priority 1 | • 100% of transactions to be routed via PineLabs + --- + Priority 2 | • 100% of transactions to be routed via Paytm + + + This means that if the success rate of PineLabs drops below a certain level, all transactions will automatically be routed to Paytm. + + Watch this video to see how to perform **priority-based routing**. + + ![Reorder Rule Priority](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-priority-routing.gif.md) + + +## Smart Routing + + Smart Router automatically routes payments to payment service providers with a higher probability of success. This eliminates the need for you to manually configure rules and enables you to optimise your success rate and net revenue effortlessly. + + If you have integrated with Razorpay, you can use Smart Router to maximise your success rate and net revenue. Smart Router can be used for all cards and UPI payments via Routing as a Service (RAAS), to route traffic based on a rule, or to enable Smart Router only if payment fails via the preferred payment provider. + +**Feature Availability** + +- Dashboard Mode: This feature is available only on the Live mode. +- User roles: All user roles can access this feature. + +### Related Information + +- [Create Custom Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/create-custom-rule.md) +- [Set Rule Priority](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/set-rule-priority.md) +- [Update Default Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/update-default-rule.md) diff --git a/llm-content/payments/optimizer/easebuzz.md b/llm-content/payments/optimizer/easebuzz.md new file mode 100644 index 00000000..eb017a78 --- /dev/null +++ b/llm-content/payments/optimizer/easebuzz.md @@ -0,0 +1,129 @@ +--- +title: Easebuzz +description: Add Easebuzz as a payment provider on Optimizer. +--- + +# Easebuzz + +Follow the steps below to onboard Easebuzz as a payment provider. + +> **WARN** +> +> +> **Watch Out!** +> +> While Optimizer can route payments based on your business logic, the method enablement of each gateway needs to be handled between you and the gateway, or it may lead to failed payments. +> + + +### Prerequisites + + 1. [Write to the Easebuzz Support Team](#email-format-for-easebuzz) with the following requests: + - Enable seamless mode for your account. Mention that you are using a technology company to handle sensitive card data. + - Configure the below webhook url for receiving payment status: + - `https://api.razorpay.com/v1/callback/easebuzz_optimizer` + - Configure the following if you intend to use UPI. + - Enable the method `card` with tokenization. + - Enable **Refund Processing** to process partial and full refunds for your merchant ID. + + +## Add Easebuzz as a Payment Provider + + +### To add Easebuzz as a payment provider: + + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + 3. In the top-right section, click **Add Provider**. + 4. Select **Easebuzz** in the list of gateways available and click **Next**. + ![Add Easebuzz](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-easebuzz-add.jpg.md) + 5. Enter the provider name and description and click **Next**. + ![Add Easebuzz provider details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-easebuzz-add-provider.jpg.md) + 6. Enter your **App ID** and **App Secret Key** details. + 7. Select the **Payment Methods** you want to enable for Easebuzz and click **Submit**. + ![Add Easebuzz final details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-easebuzz-final.jpg.md) + You have successfully added **Easebuzz** as a payment provider on Optimizer. + + +## Supported Payment Methods + +> **INFO** +> +> +> **Handy Tips** +> +> - Easebuzz supports tokenisation for card payments. +> - Easebuzz supports [Third-Party Validation (TPV)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/third-party-validation.md#supported-bank-gateways-payment-gateways-and-payment-methods). +> + +Payment Methods | Availability +--- +Netbanking | Live +--- +Cards | Live +--- +UPI (Intent) | Live +--- +UPI (Collect) | Live +--- +Wallet | Live + +## Email Format for Easebuzz + + +### Follow the email format given below to communicate the [prerequisites](#prerequisites) or any other requirements to the Easebuzz support team: + + Dear Team, + + We are using a technology service provider to manage our integration with Easebuzz for account ``. + + To use this TSP, we require the following configuration changes: + 1. Enable seamless mode for our account. + 2. Enable the method `card` with tokenization. + 3. Configure the below webhook URL for receiving payment status: + - `https://api.razorpay.com/v1/callback/easebuzz_optimizer` + 4. Enable both partial and full refund processing. + 5. Enable UPI for this account. + + + Regards, + + + +## Best Practices +Before routing any traffic to a new gateway via Optimizer, the following best practices are recommended: + + +### Live and Test Mode Rules + + All rules configured on live or test mode on the Razorpay Dashboard will reflect on live mode. However, credentials added on test mode will not be automatically replicated in live mode. + + + +### Sanity Test at Razorpay + + You can reach out to Razorpay for basic sanity testing of the integration. Razorpay will try a test payment of small value and ensure that the credentials are correct. + + + +### Perform Self Sanity Test + + We recommend configuring a rule on live mode to route payments lesser than a set value (for example, ₹2) to the Easebuzz gateway. This helps to test on production whether small value payments are being routed to Easebuzz and working successfully, thus avoiding any direct impact on production traffic. + + To configure a rule in live mode: + 1. Log in to your Dashboard. + 2. In the left navigation, click **Optimizer**. + 3. Click **+Add Rule** and enter the **Rule name** and **Description**. + 4. Click **Next** and enter the following rule: + - In **Parameter** field, select **Amount (In Rupees)**. + - In **Select Connection** field, select **Less Than**. + - In **Enter Amount** field, enter the value 2 and click **Next**. + ![Easebuzz Add Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/easebuzz-add-rule.jpg.md) + 5. Enter the value 100 in the **Route field**, select **Easebuzz** in the **Payment Via** field, and click **Next**. + ![Easebuzz target Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-easebuzz-rule-add.jpg.md) + 6. Click **Publish Rule**. + ![Easebuzz Publish Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-easebuzz-publish-rule.jpg.md) + + +## Go Live +After the integration is tested and successful, you can go live on Easebuzz. diff --git a/llm-content/payments/optimizer/faqs.md b/llm-content/payments/optimizer/faqs.md new file mode 100644 index 00000000..044b1c98 --- /dev/null +++ b/llm-content/payments/optimizer/faqs.md @@ -0,0 +1,180 @@ +--- +title: Optimizer | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Optimizer. +--- + +# Frequently Asked Questions (FAQs) + +## General + + +### 1. Which types of Razorpay Checkout does Optimizer support? + + Optimizer is compatible with all types of Razorpay Checkout, including [Standard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md), [Custom](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md), and [Server-to-Server (S2S)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md) integrations. + + + +### 2. What integration is required for Optimizer? + + Integrating Optimizer is a straightforward process involving a simple back-end feature enablement. If you already live with Razorpay as a payment gateway, Optimizer can be enabled for you without additional integration efforts. + + + +### 3. Which payment gateways are supported by Optimizer? + + Optimizer supports a wide range of payment gateways and aggregators, including PayU, Pinelabs, Billdesk, Cashfree, Paytm, and many others. Find the complete [list of supported gateways](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/add-payment-providers.md#supported-payment-providers). + + + +### 4. What payment modes are supported by Optimizer for different payment gateways? + + Optimizer supports a range of payment modes, including cards, UPI, Netbanking, wallets, and EMI, providing a comprehensive payment solution. Optimizer also facilitates seamless refund and settlement processes, enhancing the overall payment experience. Know more about [supported gateways and methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/supported-gateways-aggregators.md). + + + +### 5. What is the process to onboard other gateways on Optimizer? + + To onboard additional gateways on Optimizer, follow these simple steps: + 1. Log in to your Dashboard. + 2. Follow the [steps to add a payment gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/add-payment-providers.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> - Ensure that the required prerequisites for your Merchant ID (MID) are enabled/configured by the respective gateways. +> - Please note that the prerequisites may vary for each gateway. Know more about [prerequisites for various gateways](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/add-payment-providers.md#supported-payment-providers). +> + + Once the necessary steps are completed, the gateway will instantly activate, allowing you to start routing transactions through Optimizer. + + + +### 6. Is PCI compliance required to use Optimizer or enable seamless mode for other gateways? + + PCI compliance is not required when using Optimizer or enabling seamless mode for other gateways. Since Optimizer makes the necessary calls to these gateways, all transactions take place within the Razorpay environment. Razorpay's PCI certificate covers the necessary compliance requirements in such scenarios. + + +> **WARN** +> +> +> **Watch Out!** +> +> PCI compliance is mandatory if you use Server-to-Server (S2S) integration for Razorpay and Optimizer instead of Razorpay Standard or Custom Checkout. +> + + + + +### 7. What types of reports are generated with Optimizer? + + With Optimizer, you can access various standard reports, including payments and refunds. Additionally, Optimizer provides the Optimizer settlement report, which offers visibility into settlements across the supported gateways. + + +> **INFO** +> +> +> **Handy Tips** +> +> Please contact your Razorpay POC if you require any specific reports in a particular format. +> + + + + +### 8. How can I identify the payment gateway used for a payment in the payment fetch API or webhook events? + + When Optimizer is enabled for your account, an additional parameter `gateway_provider` is included in the payment fetch response and webhook events. This parameter specifies the payment gateway through which the payment was made. Know more about [Payment API and Webhook events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/get-started.md#payments-api). + + + +### 9. Can I use Optimizer without using Razorpay as the payment gateway? + + Yes, you can use Optimizer with payment gateways other than Razorpay. + + +> **WARN** +> +> +> **Watch Out!** +> +> Even if you use a different payment gateway, the checkout experience will be facilitated by Razorpay. +> + + + + +### 10. Payments are failing for me with the error code **GATEWAY_ERROR** with an internal error of **GATEWAY_ERROR_AUTHENTICATION_FAILED** and the description “Payment processing failed due to error at bank or wallet gateway”. How should I correct it? + + You need to reach out to the payment provider and get the merchant return URL whitelisted. + + +## Routing Capabilities + + +### 1. Where can I pass the custom identifier in the order? + + The custom identifier needs to be passed in the Payments or Orders API. Know more about [custom identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/create-custom-rule.md#custom-identifiers). + + + +### 2. What happens when an incoming payment satisfies two different rules simultaneously? + + In Optimizer, you can set rule priorities, with 1 being the highest priority. Let us consider an example with two rules: + 1. When the payment method is equal to netbanking, route 100% of transactions to PayU. + 2. When the payment method is equal to netbanking and the bank is SBI, route 100% of transactions to Razorpay. + + In such cases, you can assign a higher priority to rule number 2. As a result, when a user makes an SBI netbanking transaction, the transaction will be routed through Razorpay because the rule with higher priority takes precedence over rule number 1. + + + +### 3. What happens to merchants using risk rules with specific payment gateways? + + When using Optimizer, the existing risk rules set by specific payment gateways will remain unaffected. These rules will continue to apply for each gateway used through Optimizer. + + For example, consider a scenario where Business X has a risk rule with PayU that requires one card per phone number within a specific time. This rule will still be enforced for transactions routed to PayU via Optimizer. + + +> **WARN** +> +> +> **Watch Out!** +> +> When using Optimizer, the risk rules set by specific payment gateways will only apply to transactions routed through those particular gateways. Transactions routed to other gateways via Optimizer will not be subject to these risk rules. +> + + + +## Refunds + + +### 1. How does Optimizer support refunds? + + Refunds in Optimizer can be created using both the API and the Dashboard. There are two types of refunds available: + - [Normal Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/normal.md): For normal refunds, the refund is initiated with the respective payment gateway and depends on the availability of funds in the gateway's balance. + - [Instant Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/instant.md): For instant refunds, If Razorpay processes the payment, we initiate an instant refund through Razorpay. If another payment gateway processes the payment, we initiate the refund through that specific gateway. + + + +### 2. How do instant refunds work on Optimizer? + + If the payment is processed through Razorpay, we will initiate an instant refund via Razorpay. If the payment was processed through another payment gateway, the refund will be initiated with that specific gateway. + + + +### 3. What happens if I initiate refunds directly from another payment gateway's dashboard? How will Optimizer track the refund status, and how will the payment reflect on the Razorpay Dashboard? + + When you integrate Optimizer, there is no need to use other payment gateway's dashboards for refunds. All payments and refunds can be managed through Optimizer and the Razorpay Dashboard. Optimizer will track the refund status and ensure the payment details reflect accurately on the Razorpay Dashboard. + + +## Security + + +### 1. How does Optimizer handle the security risk when it has access to all my payment gateway keys and ids? + + We do not accept the key and id over email. It is securely added to our Dashboard through a self-serve flow where access is restricted and not shared internally for any other purpose than supporting your integration. + + Know more about [Razorpay Security](https://razorpay.com/docs/security/). diff --git a/llm-content/payments/optimizer/gateway-convenience-fees.md b/llm-content/payments/optimizer/gateway-convenience-fees.md new file mode 100644 index 00000000..3b7c30c9 --- /dev/null +++ b/llm-content/payments/optimizer/gateway-convenience-fees.md @@ -0,0 +1,59 @@ +--- +title: Collect Gateway Specific Convenience Fee from Customers +description: Collect gateway specific convenience fees from your customers for using your technology and infrastructure. +--- + +# Collect Gateway Specific Convenience Fee from Customers + +You can set a specific fee for each payment gateway used for payments made through Optimizer. This allows you to charge an additional fee to your customers, helping you recover costs such as online payment gateway charges. + +Convenience fees are smoothly integrated into Razorpay Checkout, ensuring a seamless customer experience. In case of a refund, the customer receives both the convenience fee and the original payment amount. + +![Dynamic Convenience Fees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-dynamic-convenience-fees-v2.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> - **INR** is the only supported currency. This feature is not available for international payments. +> - This feature is **not available** for: +> - Smart Collect (via VA, VPA and QR Codes) +> - Route +> - Subscriptions (via Emandate and Paper NACH) +> + +## Enable Customer Fee Bearer + +To enable customer fee bearer for your account: +- Reach out to your Account Manager and share the fees with them that need to be configured for each payment gateway. + +## How it Works +Given below is the customer payment flow: + +1. The customer selects an item on your website/Payment Link/Payment Page and clicks the pay button. +2. The checkout pop-up page is displayed. The customer selects the payment method and the payment gateway through which they want to make the payment. + ![cfb optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cfb-optimizer-gateway.gif.md) +3. The **Fee Breakup** page containing the Convenience Fee appears, and the customer clicks **Continue and pay**. +4. The customer is redirected to the payment success screen. + +> **INFO** +> +> +> **Handy Tips** +> +> All Optimizer gateways support the Customer Fee Bearer feature. Know more about the [gateways supported by Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/supported-gateways-aggregators.md). +> + +## Communication + +You should inform customers about the convenience fees, as we do not notify them of them except at checkout. In the Razorpay payment acknowledgement email sent after a successful payment, the convenience fees are included in the total amount without a breakdown. + +### Related Information + +- [Collect Standard Convenience Fee](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/convenience-fees.md) +- [SR Analytics Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/success-rate.md) +- [Roles and Permissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/roles-and-permissions.md) +- [Tokenisation for Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/tokenisation.md) +- [Supported Gateways and Aggregators](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/supported-gateways-aggregators.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/faqs.md) diff --git a/llm-content/payments/optimizer/get-started.md b/llm-content/payments/optimizer/get-started.md new file mode 100644 index 00000000..b70afcb0 --- /dev/null +++ b/llm-content/payments/optimizer/get-started.md @@ -0,0 +1,217 @@ +--- +title: Get Started With Optimizer +description: Integrate Optimizer on your website to start accepting payments. +--- + +# Get Started With Optimizer + +Check the prerequisites and the integration steps for Optimizer. + +## Prerequisites + +- [Create a Razorpay account](https://dashboard.razorpay.com/). +- If you are an existing Razorpay user, please raise a request with our [support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. + +## Integration Steps + +To accept payments using Optimizer, follow the steps given below: + +1. [Integrate with Razorpay Payment Gateway](#step-1-integrate-with-razorpay-payment-gateway). +2. [Add Payment Providers](#step-2-add-payment-providers). +3. [Configure Routing rules](#step-3-configure-routing-rules). + +## Step 1: Integrate With Razorpay Payment Gateway +You can start accepting payments by integrating your website, app, or ecommerce store with the Razorpay Payment Gateway through any of the [integration methods available](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md). + + +### Payments API + + Payments APIs are used to capture and fetch payments. The payment entity has one extra field with Optimizer to identify the payment provider through which the payment is processed. + + Given below is the additional response parameter apart from the Payment Entity: + + `gateway_provider` + : `string` The payment provider used to process the payment. Possible values: + - `payu` + - `cashfree` + - `paytm` + - `pinelabs` + - `ccavenue` + - `ingenico` + - `billdesk_optimizer` + + Refer to [Payments Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#payments-entity) for the rest of the parameters. + + + + ```json: Payment Success + { + "id": "pay_JTiNyKvjH6p3GD", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_JTiNyNf65C8Qkn", + "bank": null, + "wallet": null, + "vpa": null, + "email": "testing@razorpay.com", + "contact": "+919876543210", + "notes": [], + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": null + }, + "gateway_provider": "payu", + "created_at": 1652227221 + } + + ```json: Payment Failure + { + "id": "pay_Kb8P4crStfXJea", + "entity": "payment", + "amount": 10000, + "currency": "INR", + "status": "failed", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": "Test Transaction", + "card_id": "card_Kb8P4eO7zAsjQJ", + "card": { + "id": "card_Kb8P4eO7zAsjQJ", + "entity": "card", + "name": "", + "last4": "0153", + "network": "Visa", + "type": "debit", + "issuer": null, + "international": false, + "emi": false, + "sub_type": "consumer", + "token_iin": null + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+9000090000", + "notes": { + "address": "Razorpay Corporate Office" + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Your payment has been cancelled. Try again or complete the payment later.", + "error_source": "customer", + "error_step": "payment_authentication", + "error_reason": "payment_cancelled", + "acquirer_data": { + "auth_code": null + }, + "gateway_provider": "payu", + "created_at": 1667384312 + } + ``` + + + + +### Webhooks + + You can use Webhooks to configure and receive notifications when a specific event occurs. When an event is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. You can [set up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) from the Dashboard. + + Given below is the sample payload for webhook events for Optimizer. All the parameters and events will remain the same as shown in the [sample payloads for payment webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md) except for one additional parameter, `gateway_provider`. + + + ```json: Webhook Sample Payload + { + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "payment.authorized", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DESlfW9H8K9uqM", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "authorized", + "order_id": "order_DESlLckIVRkHWj", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "notes": [], + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "0125836177" + }, + "gateway_provider": "payu", + "created_at": 1567674599 + } + } + }, + "created_at": 1567674606 + } + ``` + + + +## Step 2: Add Payment Providers + +Watch this video to know how to add payment providers and configure rules using Optimizer. + +[Video: https://www.youtube.com/embed/xmjn0GD-7qM] + +The Razorpay Dashboard offers a self-serve flow to [add Payment Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/add-payment-providers.md) by submitting your details. This process is secure, and the details you add are fully encrypted which is only visible on your Dashboard. Know more about [Razorpay Security](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security.md). + +## Step 3: Configure Routing Rules +Create your rules on the Razorpay Dashboard to [dynamically route transactions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/dynamic-routing.md) using different parameters like payment method, amount, issuer, and more. You can also add priorities in every rule to ensure transactions are routed to the best-performing gateway. + +### Related Information + +- [Add a Payment Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/add-payment-providers.md) +- [Dynamic Routing](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/dynamic-routing.md) +- [Capture and Refund Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/capture-refund-settings.md) +- [Supported Gateways and Aggregators](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/supported-gateways-aggregators.md) +- [SR Analytics Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/success-rate.md) +- [Single Reconciliation View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/reconciliation.md) +- [Roles and Permissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/roles-and-permissions.md) +- [Tokenisation for Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/tokenisation.md) diff --git a/llm-content/payments/optimizer/glossary.md b/llm-content/payments/optimizer/glossary.md new file mode 100644 index 00000000..4d2ddb9d --- /dev/null +++ b/llm-content/payments/optimizer/glossary.md @@ -0,0 +1,33 @@ +--- +title: Optimizer | Glossary +heading: Glossary +description: List of commonly used terms and their definitions related to Optimizer. +--- + +# Glossary + +The following table lists all the commonly used terms and their definitions used in Optimizer: + +Terms | Description +--- +Optimizer | A Razorpay product that routes payments through multiple payment providers with a single integration, optimising transaction costs and success rates. +--- +Real-time Optimisation | The process of proactively routing transactions to the best available gateway or acquirer based on real-time data. +--- +Acquirer | A financial institution or bank that processes credit or debit card payments on behalf of a business. +--- +Gateway Priority | A configuration in the Optimizer that determines the order in which payment gateways are used for processing transactions. +--- +Payment Gateway (PG) | A service that authorises and processes payments for online transactions, acting as an intermediary between the business and the financial institution. +--- +Smart Routing | A feature of Optimizer that intelligently routes transactions to the most appropriate gateway based on performance data and predefined rules. +--- +Integration Audit Tool | A tool designed to automatically identify and address issues with payment provider integrations before they go live. +--- +Priority-based Routing | A routing feature that assigns an order of priority to payment gateways, allowing transactions to be rerouted based on gateway performance. +--- +Rule-based Routing | A routing feature where custom rules are defined based on various payment parameters, such as payment method, bank, and card networks. +--- +Standard/Default Routing | A simple routing method that prioritises gateways for all transactions based on predefined rules. +--- +Payment Aggregator (PA) | A service provider that processes payments on behalf of businesses by aggregating transactions from various payment methods. diff --git a/llm-content/payments/optimizer/ingenico.md b/llm-content/payments/optimizer/ingenico.md new file mode 100644 index 00000000..3b84fd38 --- /dev/null +++ b/llm-content/payments/optimizer/ingenico.md @@ -0,0 +1,232 @@ +--- +title: Ingenico +description: Add Ingenico as a payment provider on Optimizer. +--- + +# Ingenico + +Follow the steps below to onboard Ingenico as a payment provider. + +> **WARN** +> +> +> **Watch Out!** +> +> - While Optimizer can route payments based on your business logic, the method enablement of each gateway must be handled between you and the gateway, or it may lead to failed payments. +> - Ingenico does not support **tokenisation**. +> + + +### Prerequisites + + 1. Write to your TPSL Account Manager with the following requests: + - Create a new MID for your account and get the seamless option enabled for your Merchant ID. + - Configure the below webhook url to receive payment status: + - `https://api.razorpay.com/v1/callback/ingenico` + - Share the **Encryption Keys** with **Merchant Code**, **Scheme Code** and **Encryption IV** via email. + - Share any bank codes sent by the TPSL team. + - Enable the following features for your Ingenico merchant id (MID): + - Feature to receive **Bank Reference ID** in Enquiry API. + - Feature to receive **other_details** in Enquiry API. This contains transaction metadata, including Auth Code. + - Feature to initiate refund request. + - Feature to receive **client_ref_id** in Refund Enquiry API. This allows Razorpay to send its own internal ID in Refund API and receive the same in Refund Enquiry API. + - Feature to receive refund ARN in Refund Enquiry API. + 2. If UAT is needed, ensure that the following bank/network codes are configured for your Ingenico test account: + - For debit card : 1280 + - For credit card : 1270 + - For Netbanking: + - HDFC : 410 + - ICICI : 10 + - SBI : 530 + - Any other bank/Test Bank : 470 + 3. Copy Razorpay in the email and we will provide the supporting document from our end. + + +## Integration Requirements +Before you go live with Ingenico on Optimizer, make sure you configure the **scheme code** as per your requirement. + + +### Configure Scheme Code + + Ingenico has a scheme code field that is an arrangement between you and Ingenico. By default, this is “FIRST”, but it can be modified by changes in the notes field used in checkout: + + + ```json: Sample Payload + var options = { "key": "", "amount": 100, "notes": { "scheme_code": "custom_scheme_code" } } + ``` + + + +## Add Ingenico as a Payment Provider + + +### To add Ingenico as a payment provider: + + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + 3. In the top-right section, click **Add Provider**. + ![Add provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-provider.jpg.md) + 4. Select **Ingenico (Tech Process)** in the list of gateways available and click **Next**. + ![Add Ingenico](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-ingenico.jpg.md) + 5. Enter the provider name and description and click **Next**. + ![Add Provider Ingenico](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-provider-ingenico.jpg.md) + 6. Enter your **Encryption IV**, **Encryption Key** and **Merchant Code**. + 7. Select the payment methods you want to enable for Ingenico and click **Submit**. + + ![Add Secret Ingenico](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-secrect-ingenico.jpg.md) + + You have successfully added **Ingenico** as a payment provider on Optimizer. + + + +## Supported Payment Methods + +Payment Methods | Availability +--- +[Netbanking](#supported-netbanking-banks) | Live +--- +Cards | Live +--- +UPI | Live +--- +Wallet | Live + +> **INFO** +> +> +> **Handy Tips** +> +> Ingenico supports [Third-Party Validation (TPV)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/third-party-validation.md#supported-bank-gateways-payment-gateways-and-payment-methods). +> + +### Supported Netbanking Banks +There are few banks for which netbanking is enabled by default for Ingenico. Given below is the list of banks along with its Ingenico bank codes: + +> **WARN** +> +> +> **Watch Out!** +> +> Any supported network or bank should be checked with Ingenico, or it may lead to payment failure. +> + +#### List of Netbanking Banks Enabled by Default + +Bank Name | Ingenico Bank Code +--- +Axis Bank Retail | 50 +--- +Bank of Baroda Retail | 310 +--- +Bank of India | 240 +--- +Bank of Maharashtra | 750 +--- +Canara Bank | 930 +--- +Central Bank of India | 740 +--- +City Union Bank | 440 +--- +Catholic Syrian Bank Ltd | 1130 +--- +DCB BANK Personal | 540 +--- +Deutsche Bank | 330 +--- +Dhanlaxmi Bank | 370 +--- +Federal Bank | 270 +--- +HDFC Bank Retail | 300 +--- +ICICI Bank | 10 +--- +IDFC First Bank | 2180 +--- +Indian Bank | 490 +--- +Indian Overseas NetBanking | 420 +--- +Indusind Bank | 860 +--- +Jammu and Kashmir Bank | 350 +--- +Karnataka Bank | 140 +--- +Karur Vysya Bank | 760 +--- +Kotak Mahindra Bank | 910 +--- +Lakshmi Vilas | 2370 +--- +PNB (Erstwhile Oriental Bank Of Commerce) | 1220 +--- +PNB (Erstwhile United Bank Of India) | 1220 +--- +Punjab and Sind Bank | 2390 +--- +Punjab National Bank | 1220 +--- +RBL Bank Limited | 1500 +--- +South Indian Bank | 180 +--- +Standard Chartered Bank | 450 +--- +State Bank of India | 530 +--- +SVC Cooperative Bank Ltd | 1700 +--- +Syndicate Bank | 930 +--- +Tamilnad Mercantile Bank | 620 +--- +UCO Bank | 2030 +--- +Union Bank of India | 190 +--- +Union Bank of India(Erst. Andhra Bank) | 190 +--- +Vijaya Bank | 310 +--- +Yes Bank | 130 + +## Best Practices +Before routing all traffic or some traffic to a new gateway via Optimizer, the following best practices are recommended: + + +### Live and Test Mode rules + + All rules configured on live or test mode on the Razorpay Dashboard will reflect on live mode. However, credentials added on test mode will not be automatically replicated in live mode. + + + +### Sanity Test at Razorpay + + You can reach out to Razorpay for basic sanity testing of the integration. Razorpay will try a test payment of small value and ensure that the credentials are correct. + + + +### Perform Self Sanity Test + + We recommend configuring a rule on live mode to route payments lesser than a set value (for example, ₹2) to the Ingenico gateway. This helps to test on production whether small value payments are being routed to Ingenico and working successfully, thus avoiding any direct impact on production traffic. + + To configure a rule in live mode: + 1. Log in to your Dashboard. + 2. In the left navigation, click **Optimizer**. + 3. Click **+Add Rule** and enter the **Rule name** and **Description**. + 4. Click **Next** and enter the following rule: + - In **Parameter** field, select **Amount (In Rupees)**. + - In **Select Connection** field, select **Less Than**. + - In **Enter Amount** field, enter the value 2 and click **Next**. + ![Add Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-rule.jpg.md) + 5. Enter the value 100 in the **Route field**, select **Ingenico (Tech Process)** in the **Payment Via** field, and click **Next**. + ![Ingenico target Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ingenico-target-provider.jpg.md) + 6. Click **Publish Rule**. + ![Ingenico Publish Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ingenico-publish-rule.jpg.md) + + + +## Go Live +After the integration is tested and successful, you can go live on Ingenico (Tech Process). diff --git a/llm-content/payments/optimizer/integration-audit.md b/llm-content/payments/optimizer/integration-audit.md new file mode 100644 index 00000000..a5ee4427 --- /dev/null +++ b/llm-content/payments/optimizer/integration-audit.md @@ -0,0 +1,146 @@ +--- +title: Optimizer Integration Audit Tool +description: Automatically identify issues with your Optimizer payment provider integration before going live. +--- + +# Optimizer Integration Audit Tool + +The Integration Audit Tool offers a secure and controlled setting to comprehensively test your integrations before going live with your payment provider. This thorough evaluation of all integration aspects reduces the risk of issues, ensuring a smooth deployment. By detecting and resolving these issues early, businesses can prevent potential problems before they escalate. This proactive approach helps protect revenue streams and, more importantly, maintains customer trust. + +## Supported Payment Providers +Below is the list of payment providers supported for Integration Audit Tool: + + +### Supported Payment Providers + + + | Payment Provider | Availability + --- + 1 | Cashfree | Live + --- + 2 | Paytm | Live + --- + 3 | PayU | Live + + + +## Test Integration + +Follow the steps given below to add and test your payment provider integration. The integration testing consists of 5 steps: + + +### Step 1: Credentials Testing + + Follow the steps given below to test your payment provider credentials: + + 1. Log in to your Dashboard. + 2. On the left navigation, select **Optimizer** and click **Add provider**. + 3. Select the payment provider you want to add. Fill in the provider and secret key details and click **Test integration**. + ![Integration Audit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-select-provider.jpg.md) + 4. If the credentials are invalid, you will get an error. Re-enter the correct details and click **Test Credentials**. + ![Integration Audit cred error](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-creds-error.jpg.md) + 5. On successful validation of credentials, a pop-up screen appears. Click **Test now**. + ![Integration Audit test now](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-test-now.jpg.md) + + + +### Step 2: Payment Testing + + On the **Payment testing** screen: + 1. Enter the amount you want to test and click Test payment. + ![Integration Audit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-payment-testing.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> The **Payment type** and **Payment method** will be set as default options. +> + + 2. Scan the QR code and click **Pay Now**. + ![Integration Audit testing qr](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-payment-testing-qr.jpg.md) + + + + Once the payment is successful, click **Continue**. You can click **Test another** if you want to test another payment. + + ![Integration Audit testing success](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-payment-testing-success.jpg.md) + + + If the payment is unsuccessful, an error message and the corrective action will appear. + + ![Integration Audit testing failure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-payment-test-failures.jpg.md) + + + + + +### Step 3: Refund Testing + + On the Refund testing screen, click Initiate Refund for the transaction you want to test the refund. + + ![Integration Audit refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-refunds-testing.jpg.md) + + + + Once the status of the transaction changes to **Initiated**, click **Continue**. + + ![Integration Audit refund testing success](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-refund-testing-success.jpg.md) + + + If the refund is unsuccessful, an error message and the corrective action appears. + + - Paytm: + ![Integration Audit refund testing paytm fail](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-refund-testing-paytm-fail.jpg.md) + - Other Payment Gateways: + ![Integration Audit refund testing pgs fail](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-refund-testing-pgs-fail.jpg.md) + + + + + +### Step 4: Integration Audit Summary + + The **Integration audit summary** screen displays the instrument coverage for all payment methods for the payment provider you want to add. + ![Integration Audit summary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-summary.jpg.md) + You can double-click on any instrument to see an expanded view comparing the availability of each payment method for your payment provider with Razorpay's. + ![Integration Audit summary view](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-summary-view.jpg.md) + + + +### Step 5: Provider Settings + + On the Provider settings screen, enable or disable the payment methods you want for your payment provider and click **Go live**. + ![Integration Audit provider settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-provider-settings.jpg.md) + + After completing all the steps mentioned above, you can go live with your payment provider. + + +## View and Edit Payment Provider Details +Once your payment provider is added successfully, you can [view](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/integration-audit.md#view-provider-details) and [edit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/integration-audit.md#edit-provider-details) the provider details. + + +### View Provider Details + + To view your provider details: + 1. Log in to your Dashboard. + 2. On the left navigation, select **Optimizer** and click on the payment provider you added. The payment provider details appear. + ![Integration Audit view](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-view.jpg.md) + + + +### Edit Provider Details + + To edit your provider details: + 1. Log in to your Dashboard. + 2. On the left navigation, select **Optimizer** and click on the payment provider you want to edit. + 3. Click **Edit Details**. + ![Integration Audit edit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-edit.jpg.md) + 4. For example, click **Edit production details**. + ![Integration Audit edit production](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-edit-production.jpg.md) + 5. Make the required changes and click **Test Credentials**. + ![Integration Audit edit production test](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-edit-production-test.jpg.md) + 6. A confirmation pop-up appears, click **Yes** to save your changes. + ![Integration Audit edit production save](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/integration-audit-edit-production-save.jpg.md) diff --git a/llm-content/payments/optimizer/manage-rules.md b/llm-content/payments/optimizer/manage-rules.md new file mode 100644 index 00000000..df0fe038 --- /dev/null +++ b/llm-content/payments/optimizer/manage-rules.md @@ -0,0 +1,62 @@ +--- +title: Manage Rules on Optimizer +description: Know how to edit and manage custom rules on Optimizer. +--- + +# Manage Rules on Optimizer + +You can edit a custom rule and change: +- [Rule details, conditions and target payment provider](#edit-rule-details-conditions-and-target-payment-provider). +- [Rule priority](#edit-rule-priority). +- [Rule status](#edit-rule-status). + +## Edit Rule Details, Conditions and Target Payment Provider + +To modify the rule details, conditions and target payment providers: +1. In the list of Custom Rules, click on the required rule name. +2. In the side panel, click **Edit Rule**. + ![Publish Rule List](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-publish-rule-list.jpg.md) +3. The Edit Rule screen is displayed. You can edit the rule details, conditions and target payment providers. +4. Click **Publish Edits** to update the rule. + +## Edit Rule Priority + +To modify the rule priority order using the drag-and-drop: +1. In the list of Custom Rules, click on the required rule name. +2. In the side panel, click **Change Priority**. + ![Publish Rule List](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-publish-rule-list.jpg.md) +3. Drag and drop the custom rule as per your business need. +![Reorder Rule Priority](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-reorder-rule-priority.gif.md) + +## Edit Rule Status + +You can deactivate or publish a rule. + +### Deactivate Rule +To deactivate a rule: +1. In the list of Custom Rules, click on the required rule name. +2. In the side panel, click **Deactivate Rule**. +3. Confirm the change by clicking **Yes, Deactivate**. +4. Once the rule is deactivated, its status changes to `Draft`. + +![Deactivate Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-deactivate-rule.jpg.md) + +### Publish Rule +To publish a rule: +1. In the list of Custom Rules, click on the required rule name. +2. In the side panel, click **Publish Rule**. +3. Confirm the change by clicking **Yes, Publish**. +4. Once the rule is published, its status changes to `Live`. You can then drag-and-drop the rule to change its priority level as needed. + +![Publish Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-publish-rule-list.jpg.md) + +### Related Information + +- [Add Payment Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/add-payment-providers.md) +- [Create Custom Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/create-custom-rule.md) +- [Set Rule Priority](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/set-rule-priority.md) +- [Update Default Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/update-default-rule.md) +- [SR Analytics Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/success-rate.md) +- [Single Reconciliation View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/reconciliation.md) +- [Roles and Permissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/roles-and-permissions.md) +- [Tokenisation for Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/tokenisation.md) diff --git a/llm-content/payments/optimizer/native-otp.md b/llm-content/payments/optimizer/native-otp.md new file mode 100644 index 00000000..475fa743 --- /dev/null +++ b/llm-content/payments/optimizer/native-otp.md @@ -0,0 +1,77 @@ +--- +title: Native OTP +description: Use Razorpay's Native OTP feature to help you confirm online payments without getting redirected to your bank's page. +--- + +# Native OTP + +Razorpay's Native OTP feature allows direct usage of one-time passwords (OTPs) within the Checkout form, eliminating redirection to issuing banks' ACS (Access Control Server) pages. This provides a seamless OTP flow, reducing payment failures due to slow internet speeds and avoiding losses from redirects to external bank pages. Use this feature to enhance the user experience, saving time and reducing payment failures caused by poor internet connectivity. Shown below is a sample OTP input screen: + +![native otp screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rzp-acs_page.jpg.md) + +Razorpay's Native OTP offers the following additional features: +- [Auto Read + Auto Fill](#auto-read-auto-fill) +- [Auto Submit](#auto-submit) + +> **WARN** +> +> +> **Watch Out!** +> +> The auto-read, auto-fill, and auto-submit features are compatible with merchants using the Android SDK for standard checkout. +> + +## Auto Read + Auto Fill +Check how **Auto Read + Auto Fill** works: + +![auto read fill otp](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-auto-submit-otp-new1.gif.md) + +1. Razorpay requests user permission to read SMS messages. +2. By obtaining permission to read SMS messages, Razorpay can: + - Automatically extract the OTP from the received SMS. + - Add the OTP to the Native OTP page. + +#### Advantages +- Simplifies the payment process for users +- Increases Success Rate +- Eliminates the need for users to manually enter the OTP +- Reduces errors in OTP input +- Improves the overall user experience + +## Auto Submit +Customers no longer need to manually enter one-time passwords (OTPs) for card payments. + +![auto submit otp](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-auto-submit-otp-new1.gif.md) + +Razorpay handles the entire process seamlessly by obtaining permission to read SMS messages to: + - Automatically read the OTP. + - Fill the OTP. + - Submit the OTP on behalf of the customer. + +#### Advantages +- Reduces friction during the transaction flow +- Increases Success Rate +- Reduces errors associated with manual entry of OTPs +- Lower transaction time by eliminating the manual OTP submission step + +## Supported Payment Methods, Cards Networks and Payment Gateways + +Below is a list of payment gateways and their respective card networks that support the Native OTP feature. + +Payment Gateway | Card Networks +--- +Billdesk | Visa and Mastercard +--- +Cashfree | RuPay +--- +CCAvenue | Visa and Mastercard +--- +Easebuzz | RuPay +--- +Paytm | Visa, Mastercard and RuPay +--- +PayU | Visa, Mastercard and RuPay (credit cards only) +--- +PineLabs | RuPay + +The Native OTP feature supports only **card** payments. diff --git a/llm-content/payments/optimizer/pay10.md b/llm-content/payments/optimizer/pay10.md new file mode 100644 index 00000000..37dd4302 --- /dev/null +++ b/llm-content/payments/optimizer/pay10.md @@ -0,0 +1,103 @@ +--- +title: Pay10 +description: Add Pay10 as a payment provider on Optimizer. +--- + +# Pay10 + +Follow the steps below to onboard Pay10 as a payment provider. + +> **WARN** +> +> +> **Watch Out!** +> +> Optimizer routes payments based on your business logic. However, the method enablement of each gateway should be handled by you and the gateway. Otherwise, it may lead to failed payments. +> + + +### Prerequisites + + + - Write to your Relationship Manager with the following requests: + - Share the **Merchant Hosted Encryption Key**, **Pay Id**, **Key** and **Salt key** via email. + - Enable the following flags as per your requirements: + - S2S + - TPV (if applicable) + - Configure the below webhook URL to receive payment status: + - `https://api.razorpay.com/v1/callback/pay10` + + +## Add Pay10 as Payment Provider + + +### To add Pay10 as a payment provider: + + + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + 3. In the top-right section, click **Add Provider**. + 4. Select **Pay10** in the list of gateways available and enter the provider name and description. Click **Next**. + ![Add Provider Name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/paytenprovider-name.jpg.md) + 6. Enter your **Pay Id**, **Key** and **Salt key**. + 7. Select the payment methods you want to enable for Pay10 and click **Submit**. + ![Add Salt Key payten](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-key-salt-payten.jpg.md) + You have successfully added **Pay10** as a payment provider on Optimizer. + + +## Supported Payment Methods + +Payment Methods | Availability +--- +Netbanking | Live +--- +Cards | Live +--- +UPI | Live + +> **INFO** +> +> +> **Handy Tips** +> +> Pay10 supports [Third-Party Validation (TPV)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/third-party-validation.md#supported-bank-gateways-payment-gateways-and-payment-methods). +> + +## Best Practices + +Before routing all traffic or some traffic to a new gateway via Optimizer, the following best practices are recommended: + + +### Live and Test Mode Rules + + All rules configured on live or test mode on the Razorpay Dashboard will reflect on live mode. However, credentials added on test mode will not be automatically replicated in live mode. + + + +### Sanity Test at Razorpay + + You can reach out to Razorpay for basic sanity testing of the integration. Razorpay will try a test payment of small value and ensure that the credentials are correct. + + + +### Perform Self-Sanity Test + + We recommend configuring a rule on live mode to route payments lesser than a set value (for example, ₹2) to the Pay10 gateway. This helps to test on production whether small value payments are being routed to Pay10 and working successfully, thus helping to avoid any direct impact on production traffic. + + Follow the steps given below to configure a rule in live mode: + 1. Log in to your Dashboard. + 2. In the left navigation, click **Optimizer**. + 3. Click **+Add Rule** and enter the **Rule name** and **Description**. + 4. Click **Next** and enter the following rule: + - In the **Parameter** field, select **Amount (In Rupees)**. + - In the **Select Connection** field, select **Less Than**. + - In the **Enter Amount** field, enter the value 2 and click **Next**. + ![Add Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-rule.jpg.md) + 5. Enter the value 100 in the **Route field**, select **Pay10** in the **Payment Via** field, and click **Next**. + ![target Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/target-provider.jpg.md) + 6. Click **Publish Rule**. + ![Publish Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/publish-rule.jpg.md) + + +## Go Live +After the integration is tested and successful, you can go live on Pay10. diff --git a/llm-content/payments/optimizer/paytm-instant.md b/llm-content/payments/optimizer/paytm-instant.md new file mode 100644 index 00000000..cb94e454 --- /dev/null +++ b/llm-content/payments/optimizer/paytm-instant.md @@ -0,0 +1,127 @@ +--- +title: Paytm Instant (beta) +description: Add Paytm Instant (beta) as a payment provider on Optimizer. +--- + +# Paytm Instant (beta) + +Go live with your Paytm Payment Gateway account instantly using the **Instant** integration mode. This is a beta release and supports limited [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/paytm-instant.md#supported-payment-methods). Follow the steps below to onboard Paytm Instant (beta) as a payment provider. + + +### Prerequisites + + - You need to have an active Paytm account with the necessary payment methods activated. + - [Write to the Paytm Support Team](#email-format-for-paytm-instant-beta) to enable refunds via API for your Paytm account. + - Generate API keys on the [Paytm Dashboard](https://dashboard.paytm.com/login/). + 1. Log in to the Paytm Dashboard. + 2. Navigate to **Developers Settings** → **API Keys** and generate live API keys. + ![Paytm test API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-paytm-test-api-keys.jpg.md) + + +## Add Paytm as a Payment Provider + + +### To add Paytm (instant) as a payment provider: + + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + 3. In the top-right section, click **Add Provider**. + 4. Select **PayTm** in the list of gateways available and click **Next**. + ![Add Paytm](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-paytm-add.jpg.md) + 5. Select **Instant (beta)** and click **Next**. + ![Select Paytm Insant (beta)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-paytm-select-instant.jpg.md) + 6. Enter the provider name and description and click **Next**. + ![Add Paytm provider details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-paytm-add-provider.jpg.md) + 7. Enter your **INDUSTRY_TYPE_ID**, **KEY**, **MID** (merchant id) and **WEBSITE** details. + 8. Select the payment methods you want to enable for Paytm and click **Submit**. + ![Add Paytm final details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-paytm-final-new.jpg.md) + + You have successfully added **Paytm Instant (beta)** as a payment provider on Optimizer. + + +## Supported Payment Methods + +Payment Methods | Availability +--- +Netbanking | Live +--- +Cards | Live +--- +UPI | Live +--- +Wallet | Live +--- +EMI | Coming Soon +--- +Settlements | Live +--- +Refunds | Live + +> **INFO** +> +> +> **Handy Tips** +> +> If you want to offer all payment methods and support refunds from the Dashboard, please use the [S2S integration mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/paytm-s2s.md). +> + +## Email Format for Paytm Instant (beta) + +Follow the email format given below to get Refund API enabled on your Paytm PG account: + +To: `pg.support@paytmpayments.com`, `devsupport@paytmpayments.com` + +Subject: Enabling Refunds API on MID `Paytm MID` + +Dear Team, + +Please enable refunds via API for our Paytm PG account with MID `Paytm MID` + +Regards, + +## Send Receipt/Order ID to External Gateway +You might be generating a unique Order id or Receipt for every order which can be passed to Paytm via [ Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#orders-api). + +To make your order id visible on the Paytm Dashboard: +1. In Razorpay's Orders API, use the `receipt` parameter to send your unique Order id or Receipt. +2. Razorpay passes this value to Paytm in the `extendInfo.udf1` parameter. +3. Write to your Paytm Relationship Manager to show the parameter `extendInfo.udf1` in the Dashboard and reports as per your use case. + +## Best Practices +Before routing any traffic to a new gateway via Optimizer, the following best practices are recommended: + + +### Live and Test Mode Rules + + All rules configured on live or test mode on the Razorpay Dashboard will reflect on live mode. However, credentials added on test mode will not be automatically replicated in live mode. + + + +### Sanity Test at Razorpay + + You can reach out to Razorpay for basic sanity testing of the integration. Razorpay will try a test payment of small value and ensure that the credentials are correct. + + + +### Perform Self Sanity Test + + We recommend configuring a rule on live mode to route payments lesser than a set value (for example, ₹2) to the Paytm gateway. This helps to test on production whether small value payments are being routed to Paytm and working successfully, thus avoiding any direct impact on production traffic. + + To configure a rule in live mode: + 1. Log in to your Dashboard. + 2. In the left navigation, click **Optimizer**. + 3. Click **+Add Rule** and enter the **Rule name** and **Description**. + 4. Click **Next** and enter the following rule: + - In **Parameter** field, select **Amount (In Rupees)**. + - In **Select Connection** field, select **Less Than**. + - In **Enter Amount** field, enter the value 2 and click **Next**. + ![Add Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-rule.jpg.md) + 5. Enter the value 100 in the **Route field**, select **Paytm** in the **payment via** field, and click **Next**. + ![Paytm target Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-paytm-rule-add.jpg.md) + 6. Click **Publish Rule**. + ![Paytm Publish Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-paytm-publish-rule.jpg.md) + + + +## Go Live +After the integration is tested and successful, you can go live on Paytm. diff --git a/llm-content/payments/optimizer/paytm-s2s.md b/llm-content/payments/optimizer/paytm-s2s.md new file mode 100644 index 00000000..8f8b33c6 --- /dev/null +++ b/llm-content/payments/optimizer/paytm-s2s.md @@ -0,0 +1,164 @@ +--- +title: Paytm S2S +description: Add Paytm Server-to-Server as a payment provider on Optimizer. +--- + +# Paytm S2S + +Follow the steps below to onboard Paytm Server-to-Server as a payment provider. + +> **WARN** +> +> +> **Watch Out!** +> +> While Optimizer can route payments based on your business logic, the method enablement of each gateway needs to be handled between you and the gateway, or it may lead to failed payments. +> + + +### Prerequisites + + 1. [Write to the Paytm Support Team](#email-format-for-paytm) with the following requests: + - Enable seamless mode for your account. Mention that you are using a technology company to handle sensitive card data. + - Configure the following webhooks: + + + Type | URL + --- + **Production URL** | `https://api.razorpay.com/v1/callback/paytm` + --- + **Stage URL** | `https://beta-api.razorpay.com/v1/callback/paytm` + + - Configure the following if you intend to use UPI. + - Update **settlement API page size** from 20 to 200. + - Enable **Refund Processing** to process refunds for your merchant ID. + + 2. To pass your unique **Order ID** or **Receipt** for every order, write to Paytm support team to show the `extendInfo.udf1` parameter in the Paytm Dashboard and customize report. Know more about [how to send your order id to Paytm](#send-receipt-order-id-to-external-gateway). + + +## Add Paytm as a Payment Provider + + +### To add Paytm (S2S) as a payment provider: + + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + 3. In the top-right section, click **Add Provider**. + 4. Select **PayTm** in the list of gateways available and click **Next**. + ![Add Paytm](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-paytm-add.jpg.md) + 5. Select **Server-to-Server** and click **Next**. + ![Select Paytm server-to-server](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-paytm-select-s2s.jpg.md) + 6. Enter the provider name and description and click **Next**. + ![Add Paytm provider details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-paytm-add-provider.jpg.md) + 7. Enter your **INDUSTRY_TYPE_ID**, **KEY**, **MID** (merchant id) and **WEBSITE** details. + 8. Select the **Payment Methods** you want to enable for Paytm and click **Submit**. + ![Add Paytm final details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-paytm-final-new.jpg.md) + You have successfully added **Paytm Server-to-Server** as a payment provider on Optimizer. + + +## Supported Payment Methods + +Payment Methods | Availability +--- +Netbanking | Live +--- +Cards | Live +--- +UPI | Live +--- +Wallet | Live +--- +EMI | Coming Soon +--- +Settlements | Live +--- +Refunds | Live + +## Email Format for Paytm + + +### Follow the email format given below to communicate the [prerequisites](#prerequisites) or any other requirements to the Paytm support team: + + Send the email to the following email IDs: + + - `devsupport@paytmpayments.com` + - `pg.support@paytmpayments.com` + + Dear Team, + + We are using a technology service provider to manage our integration with Paytm for account ``. + + In order to use this TSP, we require the following configuration changes: + 1. Kindly enable seamless pro or S2S mode for our account. + 2. Please enable the account for card and netbanking transactions. + 3. Configuration of the below end points for transaction callbacks for production and stage: + + + Type | URL + --- + **Production URL** | `https://api.razorpay.com/v1/callback/paytm` + --- + **Stage URL** | `https://beta-api.razorpay.com/v1/callback/paytm` + --- + + + 4. Enable refund processing on this MID. + 5. Enable UPI for this account. + + Also, please share the following credentials of our account with us: + - INDUSTRY_TYPE_ID + - KEY + - MID + - WEBSITE + + Please share a list of the enabled banks for netbanking and networks for cards payments methods so that this can be configured at our end. + + Regards, + + + +## Send Receipt/Order ID to External Gateway +You might be generating a unique Order ID or Receipt for every order which can be passed to Paytm via [ Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#orders-api). + +To male your order id visible on the Paytm Dashboard: +1. In Razorpay's Orders API, use the `receipt` parameter to send your unique Order ID or Receipt. +2. Razorpay passes this value to Paytm in the `extendInfo.udf1` parameter. +3. Write to your Paytm support team to show the parameter `extendInfo.udf1` in the Dashboard and reports as per your use case. + +## Best Practices +Before routing any traffic to a new gateway via Optimizer, the following best practices are recommended: + + +### Live and Test Mode Rules + + All rules configured on live or test mode on the Razorpay Dashboard will reflect on live mode. However, credentials added on test mode will not be automatically replicated in live mode. + + + +### Sanity Test at Razorpay + + You can reach out to Razorpay for basic sanity testing of the integration. Razorpay will try a test payment of small value and ensure that the credentials are correct. + + + +### Perform Self Sanity Test + + We recommend configuring a rule on live mode to route payments lesser than a set value (for example, ₹2) to the Paytm gateway. This helps to test on production whether small value payments are being routed to Paytm and working successfully, thus avoiding any direct impact on production traffic. + + To configure a rule in live mode: + 1. Log in to your Dashboard. + 2. In the left navigation, click **Optimizer**. + 3. Click **+Add Rule** and enter the **Rule name** and **Description**. + 4. Click **Next** and enter the following rule: + - In **Parameter** field, select **Amount (In Rupees)**. + - In **Select Connection** field, select **Less Than**. + - In **Enter Amount** field, enter the value 2 and click **Next**. + ![Add Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-rule.jpg.md) + 5. Enter the value 100 in the **Route field**, select **Paytm** in the **Payment Via** field, and click **Next**. + ![Paytm target Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-paytm-rule-add.jpg.md) + 6. Click **Publish Rule**. + ![Paytm Publish Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-paytm-publish-rule.jpg.md) + + +## Go Live +After the integration is tested and successful, you can go live on Paytm. diff --git a/llm-content/payments/optimizer/payu-instant.md b/llm-content/payments/optimizer/payu-instant.md new file mode 100644 index 00000000..49884ace --- /dev/null +++ b/llm-content/payments/optimizer/payu-instant.md @@ -0,0 +1,155 @@ +--- +title: PayU Instant (beta) +description: Add PayU as a payment provider using the instant integration mode on Optimizer. +--- + +# PayU Instant (beta) + +Go live with your PayU Payment Gateway account instantly using the **Instant** integration mode. + +> **WARN** +> +> +> **Watch Out!** +> +> While Optimizer can route payments based on your business logic, the method enablement of each gateway needs to be handled between you and the gateway, or it may lead to failed payments. +> + + +### Prerequisites + + - You need an active PayU account with the necessary payment methods activated. Please get in touch with your PayU account manager to enable the missing payment methods if required. + - [Configure the required webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/payu-instant.md#to-configure-a-webhook). + - Generate **Merchant Key** and **Salt** on the [PayU Dashboard](https://onboarding.payu.in/app/account). + 1. Log in to the [PayU Dashboard](https://onboarding.payu.in/app/account). + 2. Select Payment Gateway under Collect Payments from the menu on the left navigation. + 3. Scroll down to Key Salt Details section. + + +> **INFO** +> +> +> **Handy Tips** +> +> Merchant Key and Salt values are generated automatically for the first time. +> + + + +## Integration Requirements +Before you go live with PayU Instant (beta) on Optimizer, configure the webhooks: + + +### To configure a webhook: + + 1. Log in to the [PayU Dashboard](https://onboarding.payu.in/app/account). + 2. Navigate to Settings → Webhook. + ![optimizer payu instant webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-payu-instant-webhook.jpg.md) + 3. Click **Create Webhook** on the top-right corner of the Create Webhooks page. + ![optimizer payu instant webhook create](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-payu-instant-webhook-create.jpg.md) + 4. Select the webhook type (Payments or Payouts) and Event type. + 5. Enter the webhook URL in the Webhook URL field and click **Create**. + + +> **INFO** +> +> +> **Handy Tips** +> +> Make sure you configure the webhooks for both successful and failed payment events. +> + + + + + +## Add PayU as a Payment Provider + + +### To add PayU Instant (beta) as a payment provider: + + 1. Log in to your Razorpay Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + 3. In the top-right section, click **Add Provider**. + ![Add provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-provider.jpg.md) + 4. Select **PayU** and **Instant (beta)** in the list of gateways available and click **Next**. + ![Add PayU](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-payu.jpg.md) + 5. Enter the provider name and description and click **Next**. + ![Add Provider Name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/provider-name.jpg.md) + 6. Enter your PayU key and Salt key. + 7. Select the payment methods you want to enable for PayU and click **Submit**. + ![Add Salt Key payu instant](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-key-salt-payu.jpg.md) + + + You have successfully added **PayU Instant (beta)** as a payment provider on Optimizer. + + +## Supported Payment Methods + +Payment Methods | Availability +--- +Netbanking | Live +--- +Cards | Live +--- +UPI | Live +--- +Wallet | Live +--- +EMI | Coming Soon +--- +Settlements | Live +--- +Refunds | Live +--- +Emandate | Coming Soon +--- +[Sodexo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/sodexo.md) | Coming Soon + +## Send Receipt/Order ID to External Gateway +You might be generating a unique Order ID or Receipt for every order which can be passed to PayU via[ Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#orders-api). + +To make your order id to be visible on the PayU Dashboard: +1. In Razorpay's Orders API, use the `receipt` parameter to send your unique Order ID or Receipt. +2. Razorpay passes this value to PayU in the `udf1` parameter. +3. Write to your PayU Relationship Manager to show the parameter `udf1` in the Dashboard and reports as per your use case. + +## Best Practices + +Before routing all traffic or some traffic to a new gateway via Optimizer, the following best practices are recommended: + + +### Live and Test Mode Rules + + All rules configured on live or test mode on the Razorpay Dashboard will reflect on live mode. However, credentials added on test mode will not be automatically replicated in live mode. + + + +### Sanity Test at Razorpay + + You can reach out to Razorpay for basic sanity testing of the integration. Razorpay will try a test payment of small value and ensure that the credentials are correct. + + + +### Perform Self Sanity Test + + We recommend configuring a rule on live mode to route payments lesser than a set value (for example, ₹2) to the PayU gateway. This helps to test on production whether small value payments are being routed to PayU and working successfully, thus helping to avoid any direct impact on production traffic. + + To configure a rule in live mode: + 1. Log in to your Razorpay Dashboard. + 2. In the left navigation, click **Optimizer**. + 3. Click **+Add Rule** and enter the **Rule name** and **Description**. + 4. Click **Next** and enter the following rule: + - In **Parameter** field, select **Amount (In Rupees)**. + - In **Select Connection** field, select **Less Than**. + - In **Enter Amount** field, enter the value 2 and click **Next**. + ![Add Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-rule.jpg.md) + 5. Enter the value 100 in the **Route field**, select **PayU** in the **Payment Via** field, and click **Next**. + ![target Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/target-provider.jpg.md) + 6. Click **Publish Rule**. + ![Publish Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/publish-rule.jpg.md) + + + +## Go Live +After the integration is tested and successful, you can go live on PayU. diff --git a/llm-content/payments/optimizer/payu.md b/llm-content/payments/optimizer/payu.md new file mode 100644 index 00000000..f03d647b --- /dev/null +++ b/llm-content/payments/optimizer/payu.md @@ -0,0 +1,227 @@ +--- +title: PayU +description: Add PayU as a payment provider on Optimizer. +--- + +# PayU + +Follow the steps below to onboard PayU as a payment provider. + +> **WARN** +> +> +> **Watch Out!** +> +> Optimizer routes payments based on your business logic. But, the method enablement of each gateway needs to be handled between you and the gateway, or it may lead to failed payments. +> + + +### Prerequisites + + + 1. [Write to your PayU Relationship Manager](#email-format) with the following requests and copy `production.support@payu.in` on the email: + - Enable seamless mode for your account. Mention that you use Razorpay as the technology company to handle sensitive card data. + - Disable **Retry**. + - Configure the webhook URL as `https://api.razorpay.com/v1/callback/payu` to receive **UPI** and **Emandate** response. + - Enable the required banks for **Netbanking** and **Emandate**. + - **UPI** as a payment method + - Enable UPI on **seamless**/**S2S** with the flag`txn_s2s_flow=4`. + - Enable **UPI Intent**. + - **Cards** as a payment method + - Enable the method **cards**. + - Enable the required networks (eg: visa, master, amex, rupay). + - **Netbanking** as a payment method + - Enable the method **netbanking**. + - **Emandate** as a payment method + - Enable the method **ENACH**. + - Subscribe webhooks for all emandate payment events. + 2. Copy Razorpay in the email. We will provide the supporting document from our end. Know more about the [email format for PayU](#email-format). + 3. To pass your unique **Order ID** or **Receipt** for every order, write to your relationship manager to show the `udf1` parameter in PayU Dashboard and customize report. Know more about [how to send your order id to PayU](#send-receipt-order-id-to-external-gateway). + 4. If you wish to send PayU's offer ID to the downstream gateway, you can use Optimizer's `Custom Identifier 1` to map PayU’s Offer key. This will help you send offer keys to PayU for processing and reconciliation. + + +## Integration Requirements + +Before you go live with PayU on Optimizer, disable the retry option. + + +### Retry Disablement + + PayU attempts a retry on the PayU checkout page by default. This needs to be disabled while using PayU via Optimizer as all payments need to be routed through Razorpay and its checkout. If retry is enabled, Razorpay will not know about the status of the payment, and it may lead to breakages. + + Consider the following points: + 1. The retry disablement option can only be done in one go for all methods as PayU cannot disable retry at a method level. + 2. If you have an existing integration with PayU, disabling retry might partially affect the success rate. Follow the steps given below to avoid any implications: + - Disable the retry option before the traffic goes live on Optimizer and plan a quick switch-over once testing is completed. + - Create a new account on PayU side to limit the impact on existing integrations for you and PayU. + - Get all the configurations done except for retry disablement and ask PayU to disable retry just before you go live. + + + +### Route EMI Transactions + + To route EMI transactions via Optimizer, configure the rule as follows: + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + 3. Click **+Add New Rule** and enter the **Rule name** and **Description**. + 4. Click **Next** and enter the following rule: + - **Select Parameter**: Select **Payment Method**. + - **Select Connection**: Select **Equal to**. + - **Select Comparing Value**: Select **emi**. + 5. Click **Add Another Condition** and enter the following rule: + - **Select Parameter**: Select **EMI Duration**. + - **Select Connection**: Select **Equal to**. + - **Select Comparing Value**: Select **the EMI Duration** as per your requirement, and click **Next**. Know more about [EMI durations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/supported-gateways-aggregators.md#emi) for PayU EMI. + ![Rule for EMI PayU](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-payu-route.jpg.md) + 6. Enter the value **100** in the **Route** field, select **payu** in the **payment via** field, and click Next. + ![Add provider EMi PayU](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-payu-provider.jpg.md) + 7. Click **Publish Rule**. + ![EMI PayU Publish Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-payu-publish-rule.jpg.md) + + +## Add PayU as Payment Provider + + +### To add PayU as a payment provider: + + + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + 3. In the top-right section, click **Add Provider**. + 4. Select **PayU** in the list of gateways available and click **Next**. + ![Add PayU](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-payu.jpg.md) + 5. Enter the provider name and description and click **Next**. + ![Add Provider Name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/provider-name.jpg.md) + 6. Enter your PayU key and Salt key. + 7. Select the payment methods you want to enable for PayU and click **Submit**. + ![Add Salt Key sodexo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-key-salt-payu.jpg.md) + You have successfully added **PayU** as a payment provider on Optimizer. + + +## Supported Payment Methods +Given below is the list of card networks and payment gateways that support the CVV-less feature on Optimizer. + + + + S No. | Payment Methods | Availability + --- + 1 | Netbanking | Live + --- + 2 | Cards | Live + --- + 3 | UPI | Live + --- + 4 | Wallet | Live + --- + 5 | EMI | Live + --- + 6 | Settlements | Live + --- + 7 | Refunds | Live + --- + 8 | Emandate | Live + --- + 9 | [Sodexo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/sodexo.md) | Live + + + + + S No. | Payment Methods | Availability + --- + 1 | [Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | Live + --- + 2 | [Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/integrate.md) | Live + --- + 3 | UPI Autopay | Live + + + +> **INFO** +> +> +> **Handy Tips** +> +> PayU supports [Third-Party Validation (TPV)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/third-party-validation.md#supported-bank-gateways-payment-gateways-and-payment-methods). +> + +## Email Format + + +### Follow the email format given below and copy `production.support@payu.in` on the email to communicate the prerequisites or any other requirements to the PayU account manager. + + Dear `Account Manager`, + + + We are using “Optimizer” as a technology service provider to manage our integration with PayU for account ``. + + In order to use this TSP, we require certain configurations to be enabled as mentioned below: + 1. Enablement of S2S/seamless integration for the above MID. + 2. Disablement of the retry option for all methods. + 3. Configuration of the below end points for transaction callbacks for production and stage: + + + Type | URL + --- + **Production URL** | `https://api.razorpay.com/v1/callback/payu` + --- + **Stage URL** | `https://beta-api.razorpay.com/v1/callback/payu` + --- + + + 4. Enablement of UPI, Cards, Wallet and Netbanking. (Please change this as per requirement) + 5. Enable Method UPI on S2S with `txn_s2s_flow = 4` and also enable UPI Intent. + 6. Enable all the card networks like visa, master, amex, rupay, etc. + 7. Enable all the banks for Netbanking. + + Please share a list of the enabled banks for netbanking and networks for cards payments methods so that this can be configured at our end. + + Additionally, please share the KEY and SALT for the account so that we can complete the integration. + + Regards, + + +## Send Receipt/Order ID to External Gateway +You might be generating a unique Order ID or Receipt for every order which can be passed to PayU via [ Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#orders-api). Follow the steps given below for your order id to be visible on the PayU Dashboard: + +1. In Razorpay's Orders API, use the `receipt` parameter to send your unique Order ID or Receipt. +2. Razorpay passes this value to PayU in the `udf1` parameter. +3. Write to your PayU Relationship Manager to show the parameter `udf1` in the Dashboard and reports as per your use case. + +## Best Practices + +Before routing all traffic or some traffic to a new gateway via Optimizer, the following best practices are recommended: + + +### Live and Test Mode Rules + + All rules configured on live or test mode on the Razorpay Dashboard will reflect on live mode. However, credentials added on test mode will not be automatically replicated in live mode. + + + +### Sanity Test at Razorpay + + You can reach out to Razorpay for basic sanity testing of the integration. Razorpay will try a test payment of small value and ensure that the credentials are correct. + + + +### Perform Self-Sanity Test + + We recommend configuring a rule on live mode to route payments lesser than a set value (for example, ₹2) to the PayU gateway. This helps to test on production whether small value payments are being routed to PayU and working successfully, thus helping to avoid any direct impact on production traffic. + + Follow the steps given below to configure a rule in live mode: + 1. Log in to your Dashboard. + 2. In the left navigation, click **Optimizer**. + 3. Click **+Add Rule** and enter the **Rule name** and **Description**. + 4. Click **Next** and enter the following rule: + - In **Parameter** field, select **Amount (In Rupees)**. + - In **Select Connection** field, select **Less Than**. + - In **Enter Amount** field, enter the value 2 and click **Next**. + ![Add Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-rule.jpg.md) + 5. Enter the value 100 in the **Route field**, select **PayU** in the **Payment Via** field, and click **Next**. + ![target Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/target-provider.jpg.md) + 6. Click **Publish Rule**. + ![Publish Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/publish-rule.jpg.md) + + +## Go Live +After the integration is tested and successful, you can go live on PayU. diff --git a/llm-content/payments/optimizer/phonepe.md b/llm-content/payments/optimizer/phonepe.md new file mode 100644 index 00000000..2c2b914d --- /dev/null +++ b/llm-content/payments/optimizer/phonepe.md @@ -0,0 +1,93 @@ +--- +title: PhonePe +description: Add PhonePe as a payment provider on Optimizer. +--- + +# PhonePe + +Follow the steps below to onboard PhonePe as a payment provider. + +> **WARN** +> +> +> **Watch Out!** +> +> Optimizer routes payments based on your business logic. However, the method enablement of each gateway should be handled by you and the gateway. Otherwise, it may lead to failed payments. +> + + +### Prerequisites + + + - Write to your PhonePe Relationship Manager with the following requests: + - Enable seamless, S2S or merchant-hosted type integration as per your requirement. + - Share the **Merchant Id**, **Key Index** and **Salt key** via email. + - Whitelist the following domain if required **(Optional)**: + - `https://api.razorpay.com/pg_router/v1/payments*` + + +## Add PhonePe as a Payment Provider + + +### To add PhonePe as a payment provider: + + + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + 3. In the top-right section, click **Add Provider**. + 4. Select **PhonePe** in the list of gateways available and enter the provider name and description. Click **Next**. + ![Add Provider Name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/phoneprovider1-name.jpg.md) + 5. Enter your **Merchant Id**, **Key Index** and **Salt key**. + 6. Select the payment methods you want to enable for PhonePe and click **Submit**. + ![Add Salt Key payten](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-key-salt-phonepe.jpg.md) + You have successfully added **PhonePe** as a payment provider on Optimizer. + + +## Supported Payment Methods + +Payment Methods | Availability +--- +UPI | Live +--- +Netbanking | Coming Soon +--- +Cards | Coming Soon + +## Best Practices +Before routing all traffic or some traffic to a new gateway via Optimizer, the following best practices are recommended: + + +### Live and Test Mode Rules + + All rules configured on live or test mode on the Razorpay Dashboard will reflect on live mode. However, credentials added on test mode will not be automatically replicated in live mode. + + + +### Sanity Test at Razorpay + + You can reach out to Razorpay for basic sanity testing of the integration. Razorpay will try a test payment of small value and ensure that the credentials are correct. + + + +### Perform Self Sanity Test + + We recommend configuring a rule on live mode to route payments lesser than a set value (for example, ₹2) to the PhonePe gateway. This helps to test on production whether small value payments are being routed to PhonePe and working successfully, thus avoiding any direct impact on production traffic. + + To configure a rule in live mode: + 1. Log in to your Dashboard. + 2. In the left navigation, click **Optimizer**. + 3. Click **+Add Rule** and enter the **Rule name** and **Description**. + 4. Click **Next** and enter the following rule: + - In **Parameter** field, select **Amount (In Rupees)**. + - In **Select Connection** field, select **Less Than**. + - In **Enter Amount** field, enter the value 2 and click **Next**. + ![Add Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-rule.jpg.md) + 5. Enter the value 100 in the **Route field**, select **PhonePe** in the **Payment Via** field, and click **Next**. + ![PhonePe target Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pinelabs-target-provider.jpg.md) + 6. Click **Publish Rule**. + ![PhonePe Publish Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pinelabs-publish-rule.jpg.md) + + + +## Go Live +After the integration is tested and successful, you can go live on PhonePe. diff --git a/llm-content/payments/optimizer/pinelabs.md b/llm-content/payments/optimizer/pinelabs.md new file mode 100644 index 00000000..dd0e937a --- /dev/null +++ b/llm-content/payments/optimizer/pinelabs.md @@ -0,0 +1,170 @@ +--- +title: PineLabs +description: Add PineLabs as a payment provider on Optimizer. +--- + +# PineLabs + +Follow the steps below to onboard PineLabs as a payment provider. + +> **WARN** +> +> +> **Watch Out!** +> +> While Optimizer can route payments based on your business logic, the method enablement of each gateway needs to be handled between you and the gateway, or it may lead to failed payments. +> + + +### Prerequisites + + 1. [Write to your PineLabs Plural Account Manager](#email-format) with the following requests: + - Enable all the required payment methods and refunds. Mention that you are using Razorpay as the technology company to handle sensitive card data. + - Enable the Aggregator model. Otherwise, RRN and other attributes are not returned in the callback response of card payment initialisation. Razorpay supports only the aggregator model for Pine Labs Plural card integration. + - Enable the INQUIRY API for your Pine Labs Plural account to check the payment status. + - Allow dynamic URL in redirection URL. + 2. Copy Razorpay in the email and we will provide the supporting document from our end. + 3. Pine Labs Plural supports only the static callback URL (merchant_return_url). You need to share Razorpay's dynamic callback URL to whitelist. Share the following URL: + - Production redirect URL format - `https://api.razorpay.com/v1/payments//callback//` + + +> **INFO** +> +> +> **Handy Tips** +> +> After the Razorpay production URL is shared, the Pine Labs DBA team must configure the production database to support the Razorpay dynamic URL. +> + + 4. To pass your unique **Order ID** or **Receipt** for every order, write to your Relationship Manager to show the `udf_data.udf_field_1` parameter in PineLabs Dashboard and customise report. Know more about [how to send your order id to PineLabs](#send-receipt-order-id-to-external-gateway). + +> **INFO** +> +> +> **Handy Tips** +> +> Only MasterCard and Visa networks will be supported by default for an AXIS terminal configuration done by PineLabs. +> + + + +## Integration Requirements +Before you go live with PineLabs on Optimizer, whitelist the dynamic URL. + +### URL Whitelisting +The dynamic URL pattern needs to be whitelisted for PineLabs, or the payments will fail. To whitelist the dynamic URL pattern for PineLabs, you should communicate the requirements to the PineLabs account manager via email in a specific manner. Know more about [how to communicate via email](#email-format). + +## Add PineLabs as a Payment Provider + + +### To add PineLabs as a payment provider: + + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + 3. In the top-right section, click **Add Provider**. + ![Add provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-provider.jpg.md) + 4. Select **PineLabs** in the list of gateways available and click **Next**. + ![Add PineLabs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-pinelabs.jpg.md) + 5. Enter the provider name and description and click **Next**. + ![Add PineLabs Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-provider-pinelabs.jpg.md) + 6. Enter your Access code, Merchant ID and Secure secret. + 7. Select the payment methods you want to enable for PineLabs and click **Submit**. + ![Add Access Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-access-code.jpg.md) + + You have successfully added **PineLabs** as a payment provider on Optimizer. + + + +## Supported Payment Methods + +Payment Methods | Availability +--- +Cards | Live +--- +UPI (Collect) | Live +--- +Refunds | Live +--- +UPI (Intent) | Coming Soon +--- +EMI | Coming Soon +--- +Netbanking | Coming Soon + +## Email Format + + +### Follow the email format given below to communicate the [prerequisites](#prerequisites) or any other requirements to the PineLabs account manager: + + Dear `Account Manager`, + + We are using “Optimizer” as a technology service provider to manage our integration with PineLabs for account ``. + + In order to use this TSP, we require the following configuration changes: + + 1. Enable the **Aggregator model** for card transactions. + 2. Allow Dynamic URL in redirection/return URL (Configure the production database to support dynamic URL). + 3. Configure the below dynamic URL for return URL: + + + Type | URL + --- + **Production URL** | `https://api.razorpay.com/v1/payments//callback//` + --- + + + 4. Enable the INQUIRY API to check the payment status. + 5. Please enable the account for card, and UPI transactions. + + Please share a list of the enabled banks for netbanking and networks for cards payments methods so that this can be configured at our end. + + Regards, + + + +## Send Receipt/Order ID to External Gateway +You might be generating a unique Order ID or Receipt for every order which can be passed to PineLabs via [ Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#orders-api). + +To make your order id to be visible on the PineLabs Dashboard: +1. In Razorpay's Orders API, use the `receipt` parameter to send your unique Order ID or Receipt. +2. Razorpay passes this value to PineLabs in the `udf_data.udf_field_1` parameter. +3. Write to your PineLabs Relationship Manager to show the parameter `udf_data.udf_field_1` in the Dashboard and reports as per your use case. + +## Best Practices +Before routing all traffic or some traffic to a new gateway via Optimizer, the following best practices are recommended: + + +### Live and Test Mode Rules + + All rules configured on live or test mode on the Razorpay Dashboard will reflect on live mode. However, credentials added on test mode will not be automatically replicated in live mode. + + + +### Sanity Test at Razorpay + + You can reach out to Razorpay for basic sanity testing of the integration. Razorpay will try a test payment of small value and ensure that the credentials are correct. + + + +### Perform Self Sanity Test + + We recommend configuring a rule on live mode to route payments lesser than a set value (for example, ₹2) to the PineLabs gateway. This helps to test on production whether small value payments are being routed to PineLabs and working successfully, thus avoiding any direct impact on production traffic. + + To configure a rule in live mode: + 1. Log in to your Dashboard. + 2. In the left navigation, click **Optimizer**. + 3. Click **+Add Rule** and enter the **Rule name** and **Description**. + 4. Click **Next** and enter the following rule: + - In **Parameter** field, select **Amount (In Rupees)**. + - In **Select Connection** field, select **Less Than**. + - In **Enter Amount** field, enter the value 2 and click **Next**. + ![Add Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-rule.jpg.md) + 5. Enter the value 100 in the **Route field**, select **PineLabs** in the **Payment Via** field, and click **Next**. + ![PineLabs target Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pinelabs-target-provider.jpg.md) + 6. Click **Publish Rule**. + ![PineLabs Publish Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pinelabs-publish-rule.jpg.md) + + + +## Go Live +After the integration is tested and successful, you can go live on PineLabs. diff --git a/llm-content/payments/optimizer/reconciliation.md b/llm-content/payments/optimizer/reconciliation.md new file mode 100644 index 00000000..dbc0565f --- /dev/null +++ b/llm-content/payments/optimizer/reconciliation.md @@ -0,0 +1,113 @@ +--- +title: Single Reconciliation View +description: View settlement and transaction details of external payment gateways on Optimizer. +--- + +# Single Reconciliation View + +On the Dashboard, you can view: +- [Transaction details for payments and refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/reconciliation.md#transactions-details). +- [Settlement details of the external payment gateways](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/reconciliation.md#settlement-details). + +## Transactions Details + +### Payments + +You can view the payment details on the Dashboard by specifying various filters. + + +### Filters + + + + Filter | Description + --- + Payment Id | The ID of the payment done. + --- + Processed by | Payment gateway through which the payment was processed. + --- + Duration | The time period for which you want to view the payments. + --- + Status | The state of the payment. Know more about [Payment states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#payment-life-cycle). + --- + Email | The email id linked to the payment. + + + +To view the transaction details of Payments: +1. Log in to the Dashboard. +2. Select **Transactions** from the left menu and click **Payments**. +3. Select the Payment Id to view the: + - Payment details + - Fee collected + - Tax collected + - Settlement id within which the transaction was settled. + - Optimizer Details +![Optimizer Transactions Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-transaction-details.jpg.md) + +### Refunds + +You can view the refund details on the Dashboard by specifying various filters. + + +### Filters + + + + Filter | Description + --- + Payment Id | The ID of the payment done. + --- + Processed by | List of gateways through which the payment was processed. + --- + Status | The state of the refund (processed, processing and failed). + --- + Refund Id | The unique id of the processed refund. + + + +To view the transactions details of Refunds: +1. Log in to the Dashboard. +2. Select **Transactions** from the left menu and click **Refunds**. +3. Select the Refund Id to view the: + - Status and history of the refund + - Amount + - Refund type + - Optimizer Details +![Optimizer Refund Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-refund-details.jpg.md) + +## Settlement Details + +You can [download](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md#download-reports) or [schedule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md#schedule-reports) the **Optimizer Single View Recon Report** from the Dashboard to view the settlement details. + +> **INFO** +> +> +> **Handy Tips** +> +> You can contact the [Support team](https://razorpay.com/support/#request) for a customised report that meets your business requirements. +> + +## Supported Payment Gateways + +Payment Gateway | Availability +--- +PayU | Live +--- +Paytm | Live +--- +Billdesk | Live +--- +Cashfree | Live +--- +PineLabs | Coming Soon + + +### Related Information + +- [Add Payment Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/add-payment-providers.md) +- [SR Analytics Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/success-rate.md) +- [Roles and Permissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/roles-and-permissions.md) +- [Tokenisation for Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/tokenisation.md) +- [Supported Gateways and Aggregators](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/supported-gateways-aggregators.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/faqs.md) diff --git a/llm-content/payments/optimizer/recurring-payments.md b/llm-content/payments/optimizer/recurring-payments.md new file mode 100644 index 00000000..43db3cbc --- /dev/null +++ b/llm-content/payments/optimizer/recurring-payments.md @@ -0,0 +1,167 @@ +--- +title: Recurring Payments +description: Create and collect an authorisation transaction from your customer and charge the customer for recurring payments on Optimizer. +--- + +# Recurring Payments + +You can use Optimizer Recurring Payments to set up and oversee customer payments on your terms. It is a user-friendly self-serve feature on Optimizer that simplifies the process, enabling you to establish recurring payment schedules for your customers effortlessly. + +## Supported Payment Gateways and Methods + +Payment Gateways | Payment Methods +--- +PayU | - [Emandate (Live)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) +- [Cards (Live)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/integrate.md) +- [UPI Autopay (Live)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md) + +--- +Razorpay | - [Emandate (Live)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) +- [Cards (Live)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/integrate.md) +- [UPI Autopay (Live)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md) + +--- +HDFC Mindgate | - UPI Autopay (Live) + +> **WARN** +> +> +> **Watch Out!** +> +> Optimizer rules apply only for the first-time registration payment. All subsequent debits happen on the same terminal used for registration payment. Optimizer Rules will not be applicable for subsequent payments. +> + +## Integrate Emandate (PayU) + +### Prerequisites + +1. Write to your PayU Relationship Manager with the following requests: + - Enable seamless mode for your account. Mention that you use a technology company to handle sensitive card data. + - Enable the method ENACH for your account. + - Configure the webhook URL as `https://api.razorpay.com/v1/callback/payu` to receive an Emandate response. + - Subscribe to webhooks for all emandate payment events. + - Enable the required banks. + - Provide **PayU key** and **Salt key** details. +2. You should have an [active Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md) with [Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer.md) enabled. +3. Get in touch with your Razorpay Relationship Manager to enable **Emandate** as a payment method. + +### Integration Steps +Below are the steps to integrate Recurring Payments for PayU using Emandate as a payment method: + + +### Step1: Add PayU as a Payment Provider + + Know how to [add PayU as a payment provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/payu.md#add-payu-as-a-payment-provider). + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you select `Emandate` as a payment method while selecting the required payment methods. +> + + + + +### Step2: Route Emandate Transactions + + To route emandate transactions via Optimizer, configure the rule as follows: + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + ![optimizer login](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-login.jpg.md) + + 3. Click **+Add New Rule** and enter the **Rule name** and **Description**. + ![add new rule and description](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-rule-description.gif.md) + + 4. Click **Next** and enter the following rule: + - In **Select Parameter** field, select **Payment Method**. + - In **Select Connection** field, select **Equal to**. + - In **Select Comparing Value** field, select **emandate**. + ![optimizer emandate payu first rule condition](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emandate-rule-condition.jpg.md) + 5. Click **Add Another Condition** and enter the following rule: + - In **Select Parameter** field, select **Emandate Authentication Type**. + - In **Select Connection** field, select **One Of**. + - In **Select Comparing Value** field, select **netbanking** or **debit card** as per your requirement and click **Next**. + +> **WARN** +> +> +> **Watch Out!** +> +> PayU does not support Aadhaar-based authentication. To use Aadhaar authentication, route transactions to Razorpay. +> + + ![optimizer emandate payu second rule condition](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emandate-rule-condition-two.jpg.md) + + 6. Enter the value **100** in the **Route** field, select **payu** in the **payment via** drop-down, and click Next. + ![add provider emandate payu](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emandate-payu-add-provider.jpg.md) + 7. Click **Publish Rule**. + ![emandate payu publish rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emandate-payu-publish-rule.jpg.md) + + +## Integrate Cards (PayU) + +### Prerequisites +1. Write to your PayU Relationship Manager with the following requests: + - Enable seamless mode for your account. Mention that you use a technology company to handle sensitive card data. + - Enable the method **Card Recurring** for your account. + - Configure the webhook URL as `https://api.razorpay.com/v1/callback/payu` to receive a card recurring response. + - Subscribe to webhooks for all card recurring payment events. + - Provide **PayU key** and **Salt key** details. +2. You should have an [active Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md) with [Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer.md) enabled. +3. Get in touch with your Razorpay Relationship Manager to enable **Card Recurring** as a payment method. + +### Integration Steps +Below are the steps to integrate Recurring Payments for PayU using Cards as a payment method: + + +### Step 1: Add PayU as a Payment Provider + + Know how to [add PayU as a payment provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/payu.md#add-payu-as-a-payment-provider). + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you select `Card` as a payment method while selecting the required payment methods. +> + + + + +### Step 2: Route Cards Transactions + + To route cards transactions via Optimizer, configure the rule as follows: + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + ![optimizer login](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-login.jpg.md) + 3. Click **+Add New Rule** and enter the **Rule name** and **Description**. + ![cards recurring add new rule and description](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-recurring-add-rule-description.jpg.md) + 4. Click **Next** and enter the following rule: + - In **Select Parameter** field, select **Payment Method**. + - In **Select Connection** field, select **Equal to**. + - In **Select Comparing Value** field, select **card**. + ![optimizer card recurring payu first rule condition](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/card-recurring-rule-condition.jpg.md) + 5. Click **Add Another Condition** and enter the following rule: + - In **Select Parameter** field, select **Recurring (card)**. + - In **Select Connection** field, select **Equal to**. + - In **Select Comparing Value** field, select **true** and click **Next**. + ![optimizer cards recurring payu second rule condition](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-recurring-rule-condition.jpg.md) + 6. Enter the value **100** in the **Route** field, select **payu** in the **payment via** drop-down, and click Next. + ![add provider emandate payu](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emandate-payu-add-provider.jpg.md) + 7. Click **Publish Rule**. + ![cards recurring payu publish rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-recurring-payu-publish-rule.jpg.md) + + + +> **INFO** +> +> +> **Handy Tips** +> +> You can follow similar steps for UPI payments by selecting UPI as the payment method. +> diff --git a/llm-content/payments/optimizer/refunds.md b/llm-content/payments/optimizer/refunds.md new file mode 100644 index 00000000..f6f68daf --- /dev/null +++ b/llm-content/payments/optimizer/refunds.md @@ -0,0 +1,89 @@ +--- +title: Pay Refunds to Customers using Optimizer +heading: Refunds on Optimizer +description: Initiate Refunds for all payment gateways from one place via Optimizer using the Razorpay Dashboard and APIs for your customers. +--- + +# Refunds on Optimizer + +There could be situations when customers request a refund of the payments made for the products or services purchased or availed on your website or app. + +> **INFO** +> +> +> +> **Customer Looking for Refund** +> +> If you are a customer looking for a refund, know about [customer refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers/customer-refunds.md). +> + +## How Refunds Work +When you request a refund through Optimizer, the details are forwarded to downstream payment gateways, each with its own refund procedures. Once processed, the refund amount is sent to the customer's bank account or card balance. For example, if a credit card was used to make the payment, the refund amount is pushed to the same credit card. + +> **INFO** +> +> +> **Handy Tips** +> +> Once the payment is processed, Optimizer retrieves the status from the downstream gateway and displays it to the customer. +> + +## Issue Refunds +You can issue refunds to your customers using the Dashboard or APIs. Refunds are possible for `captured` payments only. + +Refunds can be made either in **full** or in **part**. + +- **Full Refund** + +You can refund the entire amount that you received in the payment. + +- **Partial Refund** + +You can refund part of the amount received in the payment. You can issue multiple, partial refunds as long as their sum does not exceed the captured amount. + +A payment moves to the `refunded` state only when the entire amount is refunded to the customer. In case of partial refunds, the payment continues to remain in the `captured` state till the entire payment is refunded. + +### Refund States + + +### Following are the various states of a refund: + + + + States | Description + --- + `created` | This state indicates that the refund is initiated from Razorpay. This state will be displayed only on the Refunds API. + --- + `processed` | This is the final state of the refund. + --- + `failed` | A refund can attain the failed state if normal refunds are not possible for a payment that is more than 6 months old. + --- + + + +### Issue Refunds Using Dashboard + + +### Follow the steps given below to issue refunds: + + 1. Log in to the Dashboard. + 2. Navigate to **Transactions** → **Payments**. + 3. Select the payment for which refund is requested. The payment should be in the `captured` state. + 4. On the **Refund Payment** page, in the **amount** field, enter an amount lesser than the captured amount for issuing a partial refund. + By default, the entire amount will be refunded. + ![Refund Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-refund-screen.jpg.md) + + 5. Click the **Issue Full Refund** or **Issue Partial Refund** button, depending on the amount to be refunded. + 6. Once the refund is processed successfully the status of the refund moves to `Refunded`, if not you can view the details of the gateway failure reason along with error code. + ![Optimizer Refund details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-refund-gateway-details.jpg.md) + + +### View Refunds Details + + +### To view a refund: + + 1. Log in to the Dashboard. + 2. Navigate to **Transactions** → **Refunds**. + 3. Click a **Refund Id** to view details of the refund. + ![Refund Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-refund-view.jpg.md) diff --git a/llm-content/payments/optimizer/roles-and-permissions.md b/llm-content/payments/optimizer/roles-and-permissions.md new file mode 100644 index 00000000..808af23a --- /dev/null +++ b/llm-content/payments/optimizer/roles-and-permissions.md @@ -0,0 +1,56 @@ +--- +title: Roles and Permissions +description: Know how to mange your standard user roles, add or remove users and provide appropriate role to control access on Optimizer. +--- + +# Roles and Permissions + +You can assign predefined roles to your team members and limit their access to the Dashboard. The below table explains each role and the Optimizer routes permissions associated with it. Know more about [Dashboard Roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md). + +Role | Permissions +--- +Owner |- Add Optimizer Provider. +- Update Optimizer Provider. +- Fetch Optimizer Gateways. +- Fetch Merchant Optimizer Provider. +- Fetch Optimizer Merchant Methods. +- Create Optimizer Rules. +- Update Optimizer Rules. +- Read Optimizer Rules. + +--- +Admin | - Add Optimizer Provider. +- Update Optimizer Provider. +- Fetch Optimizer Gateways. +- Fetch Merchant Optimizer Provider. +- Fetch Optimizer Merchant Methods. +- Create Optimizer Rules. +- Update Optimizer Rules. +- Read Optimizer Rules. + +--- +Manager | - Fetch Optimizer Gateways. +- Fetch Merchant Optimizer Provider. +- Fetch Optimizer Merchant Methods. +- Read Optimizer Rules. + +--- +Operations | - Fetch Optimizer Gateways. +- Fetch Merchant Optimizer Provider. +- Fetch Optimizer Merchant Methods. +- Read Optimizer Rules. + +--- +Finance | - Fetch Optimizer Gateways. +- Fetch Merchant Optimizer Provider. +- Fetch Optimizer Merchant Methods. +- Read Optimizer Rules. + +### Related Information + +- [Add Payment Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/add-payment-providers.md) +- [SR Analytics Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/success-rate.md) +- [Single Reconciliation View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/reconciliation.md) +- [Tokenisation for Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/tokenisation.md) +- [Supported Gateways and Aggregators](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/supported-gateways-aggregators.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/faqs.md) diff --git a/llm-content/payments/optimizer/set-rule-priority.md b/llm-content/payments/optimizer/set-rule-priority.md new file mode 100644 index 00000000..1eb604f6 --- /dev/null +++ b/llm-content/payments/optimizer/set-rule-priority.md @@ -0,0 +1,20 @@ +--- +title: Set Rule Priority +description: Know how to set up priority levels for rules on Optimizer. +--- + +# Set Rule Priority + +If you have more than one rule, you can set up rule priority. That is, you can decide which rule should be applied first. If the transaction fails, the second rule would apply, and so on. To set rule priority: + +1. Once you publish the custom rule, the **Set Rule Priority** popup appears. +2. Drag and drop the custom rule as per your business need. +![Reorder Rule Priority](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-reorder-rule-priority.gif.md) + +With this, the Optimizer is ready to route your transactions as per the pre-determined rules. + +### Related Information + +- [Add Payment Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/add-payment-providers.md) +- [Manage Rules](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/manage-rules.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/faqs.md) diff --git a/llm-content/payments/optimizer/shopse.md b/llm-content/payments/optimizer/shopse.md new file mode 100644 index 00000000..b75753cd --- /dev/null +++ b/llm-content/payments/optimizer/shopse.md @@ -0,0 +1,81 @@ +--- +title: ShopSe +description: Add ShopSe as a payment provider on Optimizer. +--- + +# ShopSe + +ShopSe's Cardless EMI is a popular **Buy Now Pay Later (BNPL)** service. It lets customers manage monthly instalments for purchases without needing a credit card and sometimes not even a debit card. This digital finance option makes more expensive items affordable and accessible. + +Follow the steps below to onboard ShopSe as a payment provider. + + +### Prerequisites + + This payment provider is available only with Optimizer. Ensure you have Optimizer enabled for your Razorpay account. + + +> **INFO** +> +> +> **Handy Tips** +> +> No additional configuration is required on your businesses end for ShopSe integration. +> + + + +## Add ShopSe as Payment Provider + + +### To add ShopSe as a payment provider: + + 1. Log in to your Dashboard and click **Optimizer**. + 2. In the **Payment Provider** section, click **Add Provider**. + 3. Navigate to the **Cardless EMI only** section and click **ShopSe**. ![Add ShopSe payment provider in Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-shopse-provider.jpg.md) + 4. Enter your **Provider Details**. ![Add ShopSe payment provider in Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-shopse-provider-details.jpg.md) + 5. Enter your **ShopSe Production API Details** and click **Submit**. ![Add ShopSe production API details in Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-shopse-prod-api.jpg.md) + + You have successfully added ShopSe as a payment provider on Optimizer. + + +## Configure Custom Rule + + +### Add custom rule to route your transactions via ShopSe: + + + 1. Log in to your Dashboard and click **Optimizer**. + 2. Click **+ Add New Rule**. + ![Add shopse rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-simpl-rule.jpg.md) + 3. Enter the **Rule Name** and **Rule Description**. Click **Next**. + ![Add shopse](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-add-rule-name-desc.jpg.md) + 4. Select the rule conditions as follows and click **Next**: + - **When** - `Cardless EMI Provider`. + - **is** - `Equal to`. + - `ShopSe`. + ![Add shopse](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-shopse-rule-conditions.jpg.md) + 5. In the **Route** field, enter **100**, and select **shopse** in the **payment via** field. Click **Next**. ![Add shopse](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-shopse-priority-route.jpg.md) + 6. Click **Publish Rule**. ![Add shopse](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-shopse-publish-rule.jpg.md) + + All transactions will now be routed via ShopSe. + + +## Best Practices + +Before routing all traffic or some traffic to a new gateway via Optimizer, the following best practices are recommended: + + +### Live and Test Mode Rules + + All rules configured in live or test mode on the Razorpay Dashboard will reflect in live mode. However, credentials added in test mode will not be automatically replicated in live mode. + + + +### Sanity Test at Razorpay + + You can reach out to Razorpay for basic sanity testing of the integration. Razorpay will try a test payment of a small value and ensure that the credentials are correct. + + +## Go Live +After the integration is tested and successful, you can go live with ShopSe on Razorpay Optimizer. diff --git a/llm-content/payments/optimizer/simpl.md b/llm-content/payments/optimizer/simpl.md new file mode 100644 index 00000000..f8d2f6c8 --- /dev/null +++ b/llm-content/payments/optimizer/simpl.md @@ -0,0 +1,117 @@ +--- +title: Simpl +description: Add Simpl as a payment provider on Optimizer. +--- + +# Simpl + +Simpl PayLater and Pay-in-3 is a flexible BNPL option that lets customers split their purchases into three equal, interest-free installments. Payments are completed instantly at checkout without entering card details or OTPs. Simpl bills the total amount in three parts over a set period. For businesses, it helps enhance user experience, reduce cart drop-offs, and boost conversions while encouraging customer loyalty through convenient, no-cost payment flexibility. + +Follow the steps below to onboard Simpl as a payment provider. + +> **WARN** +> +> +> **Watch Out!** +> +> Optimizer routes payments based on your business logic. But, the method enablement of each gateway needs to be handled between you and the gateway, or it may lead to failed payments. +> + + +### Prerequisites + + Make sure you have Optimizer enabled for your Razorpay account. + + +> **INFO** +> +> +> **Handy Tips** +> +> No additional configuration is required on your businesses end for Simpl integration. +> + + + +## Integration Requirements + +Before you go live with Simpl on Optimizer, add PayLater as a payment method on the Razorpay Dashboard. + + +### Configure PayLater (Simpl) as a payment method + + 1. On the Razorpay Dashboard, navigate to **Account & Settings**. + 2. Select **PayLater** from the list of **payment methods**. + 3. Look for **Simpl** and click **Request**. Know more about [how to request for a payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md#request-for-payment-methods). + ![paylater simpl request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/simpl-paylatr-req.jpg.md) + + Once you complete the above steps, Simpl appears on your Razorpay Checkout. + + +## Add Simpl as Payment Provider + + +### To add Simpl as a payment provider: + + + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + 3. In the top-right section, click **Add Provider**. + 4. Select **Simpl** in the list of gateways available. + ![Add simpl](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-simpl.jpg.md) + 5. Enter the provider name and description and click **Next**. + ![simpl Add Provider Name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/simpl-provider-name.jpg.md) + 6. Enter your **Gateway Terminal Id**. + 7. Select **Simpl** from the Paylaters dropdown under the payment method section, and click Submit. + ![Add Key simpl](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-terminal-id-simpl.jpg.md) + You have successfully added **Simpl** as a payment provider on Optimizer. + + +## Configure Custom Rule + + +### To route your transactions via Simpl: + + + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + 3. Click **+ Add New Rule**. + ![Add simpl rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-simpl-rule.jpg.md) + 4. Enter the **Rule Name** and **Rule Description**, then click **Next**. + ![Add simpl](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-simpl-rule-name-desc.jpg.md) + 5. Select the rule conditions as follows: + - **When** - Select `Payment Method`. + - **is** - Select `Equal to`. + - **Select Comparing Value** - Select `paylater`. + 6. Click **Add Another Condition** and select the rule conditions as follows: + - **When** - Select `PayLater Provider`. + - **is** - Select `Equal to`. + - **Select Comparing Value** - Select `Simpl Pay in 3`. + ![Add simpl](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-simpl-rule-conditions.jpg.md) + 7. Click **Next**. + 8. In the **Route** section, enter **100**, select **Simpl** in the **Payment Via** section, and click **Next**. + ![Add simpl](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-simpl-target-provider.jpg.md) + 9. Click **Publish Rule**. + ![Add simpl](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/simpl-publish-rule.jpg.md) + + All transactions will now be routed via Simpl. + + +## Best Practices + +Before routing all traffic or some traffic to a new gateway via Optimizer, the following best practices are recommended: + + +### Live and Test Mode Rules + + All rules configured in live or test mode on the Razorpay Dashboard will reflect in live mode. However, credentials added in test mode will not be automatically replicated in live mode. + + + +### Sanity Test at Razorpay + + You can reach out to Razorpay for basic sanity testing of the integration. Razorpay will try a test payment of a small value and ensure that the credentials are correct. + + +## Go Live +After the integration is tested and successful, you can go live with Simpl on Razorpay Optimizer. diff --git a/llm-content/payments/optimizer/snapmint.md b/llm-content/payments/optimizer/snapmint.md new file mode 100644 index 00000000..3499b880 --- /dev/null +++ b/llm-content/payments/optimizer/snapmint.md @@ -0,0 +1,83 @@ +--- +title: Snapmint +description: Add Snapmint as a payment provider on Optimizer. +--- + +# Snapmint + +Snapmint's Cardless EMI is a **Buy Now Pay Later (BNPL)** service that lets customers buy products on easy monthly instalments without a credit card. It offers a credit line, often linked to your customers' debit card or UPI, making purchases more accessible. + +Follow the steps below to onboard Snapmint as a payment provider. + + +### Prerequisites + + This payment provider is available only with Optimizer. Ensure you have Optimizer enabled for your Razorpay account. + + +> **INFO** +> +> +> **Handy Tips** +> +> No additional configuration is required on your businesses end for Snapmint integration. +> + + + +## Add Snapmint as Payment Provider + + +### To add Snapmint as a payment provider: + + 1. Log in to your Dashboard and select **Optimizer**. + 2. In the **Payment Provider** section, click **Add Provider**. + 3. Navigate to the **Cardless EMI only** section and click **Snapmint**. ![Add Snapmint payment provider in Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-snapmint-add-provider.jpg.md) + 4. Enter your **Provider Details**. ![Add Snapmint payment provider in Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-snapmint-add-provider-details.jpg.md) + 5. Add your **Snapmint Production API Details** and click **Submit**. ![Add snapmint](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-snapmint-provider-api-prod-details.jpg.md) + + You have successfully added Snapmint as a payment provider to Optimizer. + + + +## Configure Custom Rule + + +### Add custom rule to route your transactions via Snapmint: + + + 1. Log in to your Dashboard and click **Optimizer**. + 2. Click **+ Add New Rule**. + ![Add snapmint rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-simpl-rule.jpg.md) + 3. Enter the **Rule Name** and **Rule Description**. Click **Next**. + ![Add snapmint](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-add-rule-name-desc.jpg.md) + 4. Select the rule conditions as follows and click **Next**: + - **When** - `Cardless EMI Provider`. + - **is** - `Equal to`. + - `Snapmint`. + ![Add snapmint](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-snapmint-rule-conditions.jpg.md) + 5. In the **Route** section, enter **100**, and select **snapmint** in the **payment via** section. Click **Next**. ![Add snapmint](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-snapmint-priority-route.jpg.md) + 6. Click **Publish Rule**. + + All transactions will now be routed via Snapmint. + + + +## Best Practices + +Please note these best practices before routing all or some of your traffic to a new gateway via Optimizer: + + +### Live and Test Mode Rules + + Rules you set up in test or live mode on your Razorpay Dashboard apply in live mode. However, test mode credentials will not automatically copy to live mode. + + + +### Sanity Test at Razorpay + + For basic integration testing, contact Razorpay. We will attempt a small test payment to confirm your credentials are correct. + + +## Go Live +After the integration is tested and successful, you can go live with Snapmint on Razorpay Optimizer. diff --git a/llm-content/payments/optimizer/success-rate.md b/llm-content/payments/optimizer/success-rate.md new file mode 100644 index 00000000..3fb085fa --- /dev/null +++ b/llm-content/payments/optimizer/success-rate.md @@ -0,0 +1,217 @@ +--- +title: SR Analytics Dashboard +description: Know how to view the transaction success rate on the Optimizer Analytics Dashboard. +--- + +# SR Analytics Dashboard + +**Success Rate** is the ratio of successful transactions to the total number of transactions. It is calculated by dividing the total number of successful (authorised) transactions by the total number of attempted transactions over a given period of time. + +**Example** + +If you had 100 transactions in a week and 93 were successful, your success rate would be 93% for that week. You can view the success rate of all the transactions on the Razorpay Dashboard. + +## Actions on SR Analytics Dashboard + +You can use the SR Analytics Dashboard to: +- Perform a detailed analysis of your recent transactions. +- View the details of each payment method by clicking on the respective method options such as Cards, UPI and Netbanking. + ![Optimizer Success rate view on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-dashboard-overview.jpg.md) +- View the payment volume distribution with the help of a pie diagram and understand the top reasons behind the payment failures. Know more about [failure reasons](#payment-failure-reasons). + ![Optimizer Success rate view on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-dashboard-overview-two.jpg.md) + +## View Analytics Dashboard + +To view the Analytics Dashboard: +1. Log in to your Dashboard. +2. Click **Transactions** → **Success Rate**. +![Navigation to success rate on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-dashboard-navigate.jpg.md) + +## Filter Options for Success Rates (SR) +You can use the following filtering options to view success rates for transactions: + + +### Date Range + + Select the date and time for which you want to perform a success rate analysis. You can use a predefined range or go for a custom range. + ![success rate graph](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-date-range.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> - The default date range is 6 hours. +> - You can select the date range upto the last 90 days. +> - You can also select a specific time range as per your requirement. +> + + In the Success Rate Line Graph, you can also select the time frame on an hourly, daily, weekly, and monthly basis. The table below explains the availability of each time frame: + + + Time Frame | Explanation + --- + Hourly | Hourly data for graphical representation is available only if the selected date range is less than 1 day. + --- + Daily | Daily data for graphical representation is available only if the selected date range is between 2 and 14 days. + --- + Weekly | Weekly data for graphical representation is available only if the selected date range is between 14 and 90 days. + --- + Monthly | Monthly data for graphical representation is available only if the selected date range is more than 2 months. + + + ![success rate graph time frame](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-date-range-new.jpg.md) + + + +### All Payment Methods + + **All Payment Methods** provide a high-level view of your transactions and recent performance at the payment method level (Cards, UPI and Netbanking). + + **Usage** + - View the success rate at the **payment method** level (UPI, Cards and Netbanking). + ![Optimizer Success rate view on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-dashboard-all-methods.jpg.md) + - The line graph shows the success rate distribution on an hourly, daily, weekly and monthly basis as per your date range selection. + ![SR Graph](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-graphical.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> The various labels available apply only to the graphical representation. +> + + - View the payment volume distribution at the method level with the pie chart. + ![Optimizer SR Pie + diagram](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-pie-diagram.jpg.md) + - View the top failure reasons along with the breakdown. Know more about [failure reasons](#payment-failure-reasons). + ![Optimizer SR Pie diagram](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-failure-reasons.jpg.md) + + + +### UPI + + The **UPI** option provides a high-level view of all UPI transactions and recent performance for the selected date range along with the payment providers details. + + **Usage** + - View the success rate of all the payment providers for UPI transactions. + ![Optimizer SR UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-upi-sr.jpg.md) + - Filter the transactions to view UPI payments received via **Intent and Collect**, **Intent Only** or **Collect Only** as per your requirement. + ![Optimizer SR UPI Filters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-upi-filters.jpg.md) + - In the Success Rate Line Chart, select different payment providers to compare the rate at the provider level. + ![Optimizer SR Graph UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-graphical-upi.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> The various labels available apply only to the graphical representation. +> + + - View the payment volume distribution of all payment providers with the pie chart. + ![Optimizer SR Pie diagram UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-pie-diagram-upi.jpg.md) + - View the top failure reasons along with the breakdown. Know more about [failure reasons](#payment-failure-reasons). + ![Optimizer SR Pie diagram](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-failure-reasons.jpg.md) + + + +### Cards + + The **Cards** option provides a high-level view of all Cards transactions and recent performance along with the payment providers details for the selected date range. + + **Usage** + - View the success rate of all the payment providers for Card transactions. + ![Optimizer SR Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-cards-sr.jpg.md) + - Filter the transactions to view Cards payments received via **Card Type**, **Card Networks**, or **Banks** as per your requirement. + ![Optimizer SR Filters Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-filter-cards.jpg.md) + - In the Success Rate Line Chart, select different payment providers to compare rate at the provider level. + ![Optimizer SR Graph Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-graphical-cards.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> The various labels available apply only to the graphical representation. +> + + - View the payment volume distribution of all payment providers with the pie chart. + ![Optimizer SR Pie diagram Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-pie-diagram-cards.jpg.md) + - View the top failure reasons along with the breakdown. Know more about [failure reasons](#payment-failure-reasons). + ![Optimizer SR Pie diagram](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-failure-reasons.jpg.md) + + **Filters** + + +> **WARN** +> +> +> **Watch Out!** +> +> The sub-filters vary based on the top transacting **card type**, **card networks** and **banks** for the selected date range. +> + + + Filters | Sub- Filters + --- + All Card Type | Examples: Credit, Debit, Prepaid and Others. + --- + All Card Networks | Examples: Visa, Mastercard, RuPay and Others. + --- + All Banks | Examples: HDFC, ICICI, Axis and Others. + + + + +### Netbanking + + The **Netbanking** option provides a high-level view of all Netbanking transactions and recent performance along with the payment providers details. + + **Usage** + - View the success rate of all the payment providers for Netbanking transactions. + ![SR Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-netbanking-sr.jpg.md) + - Filter the transactions to view Netbanking payments received via **All Banks**, or any of the top transacting banks available as per your requirement. + ![SR Netbanking Filters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-netbanking-filters.jpg.md) + - In the Success Rate Line Chart, select different payment providers to compare rate at the provider level. + ![SR Graph Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-graphical-netbanking.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> The various labels available apply only to the graphical representation. +> + + - View the payment volume distribution of all payment providers with the pie chart. + ![SR Pie diagram Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-pie-diagram-netbanking.jpg.md) + - View the top failure reasons along with the breakdown. Know more about [failure reasons](#payment-failure-reasons). + ![Optimizer SR Pie diagram](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-sr-failure-reasons.jpg.md) + + +## Payment Failure Reasons + +Failure Reason | Explanation +--- +Customer Related| Customer related failures occur from the customers side. For example: customer cancellations, incorrect CVV, insufficient funds. +--- +Banking Related | Banking related failures occur due to issues at at customer's bank, UPI Apps, external gateways. +--- +Business Related | Business related failures occur due to issues at business side like non-activation of payment methods, international payments. +--- +Others | Other failures include errors due to fraud detection or internal provider issues. + +### Related Information + +- [Add Payment Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/add-payment-providers.md) +- [Single Reconciliation View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/reconciliation.md) +- [Roles and Permissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/roles-and-permissions.md) +- [Tokenisation for Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/tokenisation.md) +- [Supported Gateways and Aggregators](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/supported-gateways-aggregators.md) diff --git a/llm-content/payments/optimizer/supported-gateways-aggregators.md b/llm-content/payments/optimizer/supported-gateways-aggregators.md new file mode 100644 index 00000000..9b417c72 --- /dev/null +++ b/llm-content/payments/optimizer/supported-gateways-aggregators.md @@ -0,0 +1,482 @@ +--- +title: Supported Gateways and Aggregators +description: List of payment gateways and methods supported on Optimizer. +--- + +# Supported Gateways and Aggregators + +## Supported Aggregators +Given below is the list of payment aggregators supported on Optimizer. + +S No. | Aggregators | Availability +--- +1 | Atom | Live +--- +2 | Billdesk | Live +--- +3 | Cashfree | Live +--- +4 | CCAvenue | Live +--- +5 | Easebuzz | Live +--- +6 | Ingenico | Live +--- +7 | Paytm | Live +--- +8 | PayU | Live +--- +9| PineLabs | Live +--- +10 | Razorpay | Live +--- +11 | Checkout | Coming Soon +--- +12 | Stripe | Coming Soon + +## Supported Bank Gateways +Given below is the list of supported bank gateways on Optimizer. + +S No. | Bank Gateways +--- +1 | Amex +--- +2 | Axis +--- +3 | HDFC +--- +4 | ICICI +--- +5 | Kotak +--- +6 | SBI + +## Supported Payment Methods +Given below are the supported payment methods and payment providers for [Cards](#cards), [UPI](#upi), [Netbanking](#netbanking), [EMI](#emi), [Cardless EMI](#cardless-emis), [Meal Cards](#meal-cards), [Wallets](#wallets) and [Pay Later](#pay-later). + +> **INFO** +> +> +> **Handy Tips** +> +> All Razorpay netbanking gateways are available upon request. Please contact [support](https://razorpay.com/support/#request) to activate them on your Razorpay account. +> + + +### Cards + + List of supported providers is given below: + + + S No. | Provider + --- + 1 | Amex + --- + 2 | Axis Migs + --- + 3 | Cashfree + --- + 4 | CCAvenue + --- + 5 | Cybersource + --- + 6 | Easebuzz + --- + 7 | HDFC + --- + 8 | MPGS + --- + 9 | Paytm + --- + 10 | PayU + --- + 11 | Razorpay + + + + +### UPI + + List of supported providers is given below: + + + S No. | Provider | TPV Supported? (Yes/No) + --- + 1 | Airtel | No + --- + 2 | Axis | Yes + --- + 3 | Cashfree | No + --- + 4 | CCAvenue | No + --- + 5 | Easebuzz | No + --- + 6 | ICICI | Yes + --- + 7 | HDFC Mindgate | Yes + --- + 8 | Paytm | No + --- + 9 | PayU | No + --- + 10 | PineLabs | No + --- + 11 | Razorpay | Yes + --- + 12 | SBI | No + + + + +### Netbanking + + List of supported providers is given below: + + + S No. | Provider + --- + 1 | Airtel + --- + 2 | Allahabad + --- + 3 | Atom + --- + 4 | AU Small Finance + --- + 5 | Axis (TPV Supported) + --- + 6 | Bank of Baroda + --- + 7 | Billdesk + --- + 8 | Canara + --- + 9 | Cashfree + --- + 10 | CCAvenue + --- + 11 | Central Bank India + --- + 12 | CSB + --- + 13 | CUB + --- + 14 | EBS + --- + 15 | Equitas + --- + 16 | Federal + --- + 17 | FSB + --- + 18 | HDFC + --- + 19 | IBK + --- + 20 | ICICI + --- + 21 | IDFC + --- + 22 | IndusInd + --- + 23 | IOB + --- + 24 | JKB + --- + 25 | JSB + --- + 26 | Kotak + --- + 27 | KVB + --- + 28 | OBC + --- + 29 | Paytm + --- + 30 | PayU + --- + 31 | PNB + --- + 32 | Razorpay + --- + 33 | RBL + --- + 34 | SBI + --- + 35 | SCB + --- + 36 | SIB + --- + 37 | SVC + --- + 38 | UBI + --- + 39 | Vijaya + --- + 40 | Yes + + + + +### EMI + + Given below is the list of payment gateways that support EMI: + + Payment Gateways | Availability + --- + [PayU](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/supported-gateways-aggregators.md#payu-emi) | Live + --- + [Billdesk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/supported-gateways-aggregators.md#billdesk-and-ingenico-emi) | Live + --- + [Ingenico](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/supported-gateways-aggregators.md#billdesk-and-ingenico-emi) | Live + + + +> **WARN** +> +> +> **Watch Out!** +> +> Optimizer supports EMI options for both credit and debit cards. +> + + + + + PayU EMI + + Follow the steps given below to enable PayU EMI on Optimizer: + 1. Reach out to your Relationship Manager to get the `EMI flag` enabled on PayU's side. + 2. Provided that PayU has a `Fetch EMI` API, use it to retrieve the EMI banks and plans supported by PayU and display them at your checkout. + + The list of supported banks by PayU for its EMI transactions is given below: + + + Sr No | Issuer + --- + 1 | Amex + --- + 2 | Bank of Broda + --- + 3 | Citi + --- + 4 | HDFC + --- + 5 | ICICI + --- + 6 | IndusInd Bank + --- + 7 | Kotak Mahindra + --- + 8 | RBL + --- + 9 | SBI + --- + 10 | SCB + --- + 11 | Axis + --- + 12 | Yes Bank + --- + + + + +### Billdesk and Ingenico EMI + + Follow the steps given below to enable Billdesk and Ingenico EMI on Optimizer: + 1. Add EMI as a payment method on the Dashboard. Know more about [how to request for a payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md#request-for-payment-methods). + 2. Enable [Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/get-started.md) for your account. + 3. [Add Billdesk or Ingenico as a payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/billdesk.md). + 4. Route transactions via Billdesk or Ingenico. Know [how to route transactions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/create-custom-rule.md#steps). + + + + + + + +### Cardless EMI + + List of supported cardless EMIs on Optimizer is given below: + + + S No. | Provider + --- + 1 | [ShopSe](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi/shopse.md) + --- + 2 | [Snapmint](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi/snapmint.md) + + + + +### Meal Cards + + List of supported meal cards on Optimizer is given below: + + + S No. | Provider + --- + 1 | [Sodexo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/sodexo.md) + + + + +### Pay Later + + List of supported aggregators for Pay Later on Optimizer is given below: + + + S No. | Provider + --- + 1 | [Simpl](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/simpl.md) + + + + +### Wallets + + Optimizer supports **wallets** for PayU, CCAvenue, Paytm and Razorpay. + + + + PayU + + List of supported wallets for PayU is given below: + + + S No. | Provider + --- + 1 | ItzCash + --- + 2 | PayZapp + --- + 3 | OlaMoney + --- + 4 | JioMoney + --- + 5 | Amazon Pay + --- + 6 | PhonePe + --- + 7 | Airtel Money + --- + 8 | Oxigen + --- + 9 | AMEX ezeClick + --- + 10 | PayCash + --- + 11 | Citi Bank Reward Points + --- + 12 | Paytm + + + + +### CCAvenue + + List of supported wallets for CCAvenue is given below: + + + S No. | Provider + --- + 1 | ItzCash + --- + 2 | JioMoney + --- + 3 | Paytm + --- + 4 | MobiKwik + + + + +### Paytm + + List of supported wallets for Paytm is given below: + + + S No. | Provider + --- + 1 | Paytm + + + + +### Razorpay + + List of supported wallets for Razorpay is given below: + + + S No. | Provider | Availability + --- + 1 | PayZapp | Live + --- + 2 | Airtel Money | Live + --- + 3 | MobiKwik | Live + --- + 4 | JioMoney | Live + --- + 5 | Ola Money | Live + --- + 6 | Bajaj Pay | [Contact Support](https://razorpay.com/support). + --- + 7 | PhonePe | [Contact Support](https://razorpay.com/support). + --- + 8 | [PhonePe Switch](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md) | **For businesses that are registered with PhonePe Switch Only**. + --- + 9 | [PayPal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paypal.md) | **International Payments Only**. + [Contact Support](https://razorpay.com/support). + --- + 10 | [Amazon Pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/amazon-pay.md)| [Contact Support](https://razorpay.com/support). + + + + + + + +## International Payments +When a Razorpay business registered in India accepts a payment from a customer using an international card or payment instrument, it is called an international payment. + +> **WARN** +> +> +> **Watch Out!** +> +> - International payments are supported only on Razorpay. +> - Non-INR payments are not supported on other downstream gateways for international transactions. +> + + +### Supported Cases + + Given below are a few specific cases where we support international payments. + 1. **Amex Payments** - Amex is considered a domestic payment instrument and is not classified as an international payment. Razorpay converts these payments to the base currency, INR. + + 2. **Non-INR Payment Using Indian Payment Card/Instrument** - Payments made in a non-INR currency using an Indian-issued payment card or instrument are considered domestic. Razorpay converts the amount to the base currency, INR. + + 3. **INR Payment Using International Card/Instrument** - Although the card or instrument is international, payments made in INR are treated as domestic since the money collection occurs in INR. These transactions can be passed to the downstream gateways. + + +Given below is the list of payment aggregators that support international payments on Optimizer. + +S No. | Aggregators | Availability +--- +1 | Razorpay | Live +--- +2 | Airwallex | Live +--- +3 | Stripe | Coming Soon + +### Related Information + +- [Add Payment Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/add-payment-providers.md) +- [SR Analytics Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/success-rate.md) +- [Single Reconciliation View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/reconciliation.md) +- [Roles and Permissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/roles-and-permissions.md) +- [Tokenisation for Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/tokenisation.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/faqs.md) diff --git a/llm-content/payments/optimizer/third-party-validation.md b/llm-content/payments/optimizer/third-party-validation.md new file mode 100644 index 00000000..1028ff10 --- /dev/null +++ b/llm-content/payments/optimizer/third-party-validation.md @@ -0,0 +1,79 @@ +--- +title: Third Party Validation on Optimizer +description: Perform Third-Party Validation (TPV) of your customers' bank accounts in real-time on Razorpay Optimizer. +--- + +# Third Party Validation on Optimizer + +Third-Party Validation (TPV) of bank accounts is a mandatory requirement for businesses in the BFSI (Banking, Financial Services and Insurance) sector dealing with Securities, Broking and Mutual Funds. As per Securities and Exchange Board of India (SEBI) guidelines, customers must only make transactions from those bank accounts provided when registering with your business. + +You can use Optimizer and comply with the SEBI guidelines for online payment collections by offering TPV integrations with major bank gateways and payment aggregators at the Checkout. Customers can make payments using netbanking or UPI. + + to get this feature activated on your Razorpay account. + +## Prerequisites + +1. You need to have an [active Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md) with [Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer.md) enabled. +2. [Generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) required to authenticate API requests sent to Razorpay servers. +3. Follow [the integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation.md#integration-flow) to let Razorpay map the customers' bank accounts to ensure the payment is processed only from their registered bank accounts. +4. Check the [best practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/best-practices.md). +5. Write to your Razorpay and external gateway Relationship Manager to enable **TPV feature flag** for the required payment methods. +6. Ensure you complete the prerequisites of the particular bank or payment gateway before adding it as a provider. + +## Add a Bank or Payment Gateway as a Payment Provider +Given below is an example of how to add BillDesk with TPV support as a payment provider: +1. Log in to your Dashboard. +2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. +3. In the top-right section, click **+ Add provider**. +4. Select **Billdesk** in the list of gateways available and click **Next**. + ![Add Billdesk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-billdesk2.jpg.md) +5. Enter the provider name and description and click **Next**. + ![Add Billdesk Provider Name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/billdesk-provider-name-description.jpg.md) +6. Enter your Client ID and Merchant ID. +7. Select the payment methods and TPV option you want to enable for Billdesk and click **Submit**. + + ![Add Security ID Billdesk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-security-id2.jpg.md) +You have successfully added **Billdesk** as a payment provider and enabled TPV on Optimizer. + +## Supported Bank Gateways, Payment Gateways and Payment Methods +List of banks and payment gateways supported on Optimizer TPV is given below: + + + + S No. | Bank Gateways | Payment Methods Supported + --- + 1 | Axis | UPI and Netbanking + --- + 2 | HDFC Mindgate | UPI + --- + 3 | ICICI | UPI + + + + + S No. | Gateways | Payment Methods Supported + --- + 1 | Billdesk | UPI and Netbanking + --- + 2 | Razorpay | UPI and Netbanking + --- + 3 | Cashfree | UPI and Netbanking + --- + 4 | PayU | UPI and Netbanking + --- + 5 | Pay10 | UPI + --- + 6 | ZaakPay | UPI and Netbanking + --- + 7 | Easebuzz | UPI and Netbanking + --- + 8 | Ingenico | UPI and Netbanking + --- + 9 | Atom | UPI and Netbanking + + + +### Related Information + +- [Third Party Validation on Razorpay Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation.md) +- [Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/best-practices.md) diff --git a/llm-content/payments/optimizer/tokenisation.md b/llm-content/payments/optimizer/tokenisation.md new file mode 100644 index 00000000..d4c4e997 --- /dev/null +++ b/llm-content/payments/optimizer/tokenisation.md @@ -0,0 +1,158 @@ +--- +title: Tokenisation for Optimizer +description: Know how to save customer card details as tokens with multiple payment partners using Optimizer. +--- + +# Tokenisation for Optimizer + +Tokenisation is the process by which the original card number/Primary Account Number (PAN) is replaced with a surrogate value called a `token`. You can securely save a customer's card details as a token during the first transaction. The customer does not need to re-enter the card details for the next transaction. They can provide the OTP and use their saved card to complete the transaction. + +**Advantages** +- Faster checkout experience for the customers. +- Reduction in payment failures due to incorrect card details. + +### RBI Guidelines on Tokenisation + +According to the [RBI guidelines on Card Tokenisation](https://rbidocs.rbi.org.in/rdocs/notification/PDFs/DPSSCOFTBA69C3B5B8CC4025AD089456DD857C5F.PDF), Payment Aggregators(PA)/Payment Gateway(PG) and businesses cannot save their customers' card numbers and other card data on their servers. + +**Key Takeaways** +- Card networks and card issuers are the only parties that can save plain text cards. Businesses, Payment Gateways and Payment Aggregators are no longer allowed to store actual customer card details. +- Businesses should adopt a tokenisation solution to continue offering customers a **saved card experience**. +- The token should not be visible to the cardholder. Tokens should be managed between the Token Requestor and Network. +- Customer consent and Additional Factor of Authentication (AFA) are required for saving a card/creating a token. This can be clubbed with the same Two-Factor Authentication (2FA) used during the first transaction. + +## Optimizer Card Tokenisation Solution + +Your customers can not avail **saved card experience** at checkout without tokenisation. Optimizer offers an end-to-end RBI-compliant solution that allows you to save customer credentials as tokens with card networks and issuing banks and process payments through any PA/PG. Customers can then use these `tokens` to make repeat purchases on your website without re-entering card details. You can process these payments through any PA/PG as per your business requirements. + +> **WARN** +> +> +> **Watch Out!** +> +> If you are using the saved card feature, you must redirect cards traffic to the supported gateways only. Know more about [supported payment gateways](#supported-payment-gateways). +> + +#### Onboarding as Token Requestor +In this integration, you can choose to be a Token Requestor(TR) or work with Razorpay as the Token Requestor. + +#### Data Localisation Guidelines +This integration complies with data localisation guidelines. + +## Payment Processing on Optimizer + +Tokenised payment processing on Optimizer occurs in two scenarios: +1. When [Razorpay is a Token Requestor(TR)](#when-razorpay-is-a-token-requestortr). +2. When [External PA/PG or Merchant is a Token Requestor(TR)](#when-external-papg-or-merchant-is-a-token). + +### When Razorpay is a Token Requestor(TR) +You can use Optimizer with Razorpay as Token Requestor and process payments on Razorpay and external gateways. Given below is the Optimizer Tokenisation flow when Razorpay is the Token Requestor. + + +### First-time Card Payment Flow + + ![Tokenisation flow first time](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/tokenisation_entity.jpg.md) + + Given below is the first-time payment tokenisation flow: + 1. The customer initiates a payment. + 2. The customer consents to save a card on your website/app checkout. + 3. After completing the transaction successfully through Optimizer, we initiate the tokenisation request at checkout. + 4. The Card Network or issuing bank returns a unique `token` corresponding to the tokenisation request to the merchant through Razorpay. + + + + +### Saved Card Payment Flow + + ![Saved card payment Tokenisation flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-tokenisation-saved-payment2.jpg.md) + + Given below is the saved card payment tokenisation flow: + 1. The customer initiates a payment using a saved card. + 2. We retrieve the token data from the token service provider automatically. + 3. Using the token data, Optimizer will process the payment through any of the selected payment gateways. + 4. The payment is initiated and processed using token data. + + +### When External PA/PG or Merchant is a Token Requestor(TR) +If the `token` is requested by the merchant or any other external gateway, the payment can be processed via Razorpay or external gateways. + +#### Flow + +![External Tokenisation flow first time](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/external-cards-tokenisation3.jpg.md) + +Given below is the tokenisation flow when the merchant or external PA/PG is the Token Requestor: +1. The customer initiates a payment using a saved card. +2. The merchant retrieves the token data and passes it on to Optimizer. +3. Optimizer passes the token data to the selected gateway. +4. The payment is initiated and processed using the token data. + +> **WARN** +> +> +> **Watch Out!** +> +> If a merchant requests a token from a payment partner other than Razorpay and attempts to complete the transaction through another payment partner, please contact us at `payments_optimizer@razorpay.com`. We'll assist you with the additional token attributes required by the payment partner to complete the transaction. +> + +## Supported Payment Gateways and Card Networks +Below is the list of supported payment gateways and card networks that support tokenisation: + +> **WARN** +> +> +> **Watch Out!** +> +> - Tokenisation for **Amex** and **Diners** card networks is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature enabled on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Razorpay Dashboard. +> +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> - Ensure that tokenization flags are enabled for all networks at the downstream gateway. +> + + + + + + Payment Gateways | Availability + --- + Pine Labs | ✓ + --- + PayU | ✓ + --- + Cashfree | ✓ + --- + BillDesk | ✓ + --- + Paytm | ✓ + --- + Easebuzz | ✓ + --- + Airwallex | ✓ + + + + + Payment Gateways | Visa | MasterCard | Diners | Amex | Rupay + --- + Easebuzz | ✓ | ✓ | ✓ | ✓ | ✓ + --- + BillDesk | ✓ | ✓ | ✓ | ✓ | ✓ + --- + Cashfree | ✓ | ✓ | ✓ | ✓ | ✓ + --- + Paytm | ✓ | ✓ | ✓ | ✓ | ✓ + --- + PayU | ✓ | ✓ | ✓ | ✓ | ✓ + --- + Pine Labs | ✓ | ✓ | x | x | ✓ + --- + Razorpay | ✓ | ✓ | ✓ | ✓ | ✓ + + + +### Related Information + +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/apis.md) +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/webhooks.md) +- [Tokenisation FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq.md) diff --git a/llm-content/payments/optimizer/update-default-rule.md b/llm-content/payments/optimizer/update-default-rule.md new file mode 100644 index 00000000..e57155ad --- /dev/null +++ b/llm-content/payments/optimizer/update-default-rule.md @@ -0,0 +1,37 @@ +--- +title: Update Default Rule +description: Know how to update the default rule for Optimizer. +--- + +# Update Default Rule + +The default rule applies to transactions that do not satisfy any of the custom rules. +For example, you can ensure that 100% of all transactions is routed through payment gateway A. + +## View Default Rule +To view the default rule: +1. Log in to the Dashboard. +2. Select **Optimizer**. +3. Click **View Default Rule**. By default, 100% of transactions are routed through Razorpay. You can choose to retain it or edit it as per your requirements. + +![View Default Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-view-default-rule.jpg.md) + +## Edit Default Rule +To edit the default rule: +1. Click **View Default Rule**. +2. In the side pane, click **Edit Rule**. + ![Edit Default Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-edit-default-rule.jpg.md) +3. The rule details appear. Click **Edit Target Provider**. +4. Update the priority. Let us assume you want to ensure that 80% of transactions are routed through Razorpay and 20% through payment gateway ABC. To do this: + 1. Enter `80` in the **Route** field and select `Razorpay` against the **payment via** field. + 2. Click **Add Another Provider**. + 3. In the new row, enter `20` in the **Route** field and select `ABC` against the **payment via** field. + ![Edit Default Rule Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-edit-default-rule-details.jpg.md) + 4. Click **Next**. + 5. Click **Publish Edits**. + 6. Click **Yes, Publish** to confirm the change. + +### Related Information + +- [Add Payment Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/add-payment-providers.md) +- [Manage Rules](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/manage-rules.md) diff --git a/llm-content/payments/optimizer/wallet-auto-debit.md b/llm-content/payments/optimizer/wallet-auto-debit.md new file mode 100644 index 00000000..121040c5 --- /dev/null +++ b/llm-content/payments/optimizer/wallet-auto-debit.md @@ -0,0 +1,62 @@ +--- +title: Wallet Auto-Debit +description: Pay instantly using wallet auto-debit with a single click. +--- + +# Wallet Auto-Debit + +Wallet Auto-Debit streamlines the payment process and significantly boosts success rates, delivering an exceptional payment experience to your customers. The customers can complete wallet transactions with unparalleled speed and simplicity. + +![select Paytm one click pay final](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-one-click-sufficient-balance.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> Razorpay supports wallet auto-debit only for **Paytm**. +> + +## Prerequisites +1. You need to have an active Razorpay account with Optimizer enabled. +2. You need to have an active Paytm PG account. +3. Write to your Razorpay Relationship Manager to enable Wallet Auto-Debit feature on your Optimizer account. +4. Write to your Paytm Relationship Manager to enable the Paytm wallet auto debit feature and provide the client key and secret. + +> **INFO** +> +> +> **Handy Tips** +> +> The Paytm auto-debit feature is supported on Razorpay Standard Checkout. +> + +## Add Paytm as a Payment Provider +1. Log in to your Dashboard. +2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. +3. In the top-right section, click **Add Provider**. +4. Select **PayTm** in the list of gateways available and click **Next**. + ![Add Paytm one click pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-one-click-paytm-add.jpg.md) +5. Select **Server-to-Server** and click **Next**. + ![Select Paytm server-to-server](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-paytm-select-s2s.jpg.md) +6. Enter the provider name and description and click **Next**. + ![Add Paytm provider details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-paytm-add-provider.jpg.md) +7. Enter your **INDUSTRY_TYPE_ID**, **KEY**, **MID** (merchant ID) and **WEBSITE** details. +8. Enable the **Wallet auto-debit** button, enter your **Client Key and Secret** and click **Submit**. + ![Add Paytm one click pay final](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-one-click-paytm-add-final.jpg.md) + +## Razorpay Wallet Auto-Debit (Customer Flow) +Below is a complete end-to-end flow about how Razorpay Wallet Auto-Debit works: + +1. The customer clicks Pay Now on your website and is redirected to the Razorpay Standard Checkout. + ![pay now standard checkout screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-one-click-paytm-pay-now.jpg.md) + +2. The customer selects **Wallet** and **Paytm**. + ![select Paytm one click pay final](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-one-click-paytm-wallet.jpg.md) + + - If the customer is a first-time user, they will be asked to enter the mobile number and the OTP to link their wallet and complete the payment. + ![select Paytm one click pay final](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-one-click-first-user.jpg.md) + - If the customer has sufficient balance in their wallet, they can pay directly with a single click. + ![select Paytm one click pay final](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-one-click-sufficient-balance.jpg.md) + - If the customer does not have sufficient balance in their wallet, they will be redirected to a Paytm page where they can add money to their balance and complete the payment. + ![select Paytm one click pay final](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-one-click-insufficient-balance.gif.md) diff --git a/llm-content/payments/optimizer/zaakpay.md b/llm-content/payments/optimizer/zaakpay.md new file mode 100644 index 00000000..7f13bf50 --- /dev/null +++ b/llm-content/payments/optimizer/zaakpay.md @@ -0,0 +1,99 @@ +--- +title: ZaakPay +description: Add ZaakPay as a payment provider on Optimizer. +--- + +# ZaakPay + +Follow the steps below to onboard ZaakPay as a payment provider. + +> **WARN** +> +> +> **Watch Out!** +> +> Optimizer routes payments based on your business logic. But, the method enablement of each gateway needs to be handled between you and the gateway, or it may lead to failed payments. +> + + +### Prerequisites + + Reach out to your Relationship Manager to get your server-to-server or seamless integration kit with credentials. + + +## Add ZaakPay as Payment Provider + + +### To add ZaakPay as a payment provider: + + 1. Log in to your Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Optimizer**. + 3. In the top-right section, click **Add Provider**. + 4. Select **ZaakPay** in the list of gateways available. + ![Add Easebuzz](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-zaakpay-add.jpg.md) + 5. Enter the Provider Name and Description and click **Next**. + ![Add Easebuzz provider details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-zaakpay-add-provider.jpg.md) + 6. Enter your **Encryptionkeyid**, **Key**, **Publiccertkey** and **Salt** details. + 7. Select the **Payment Methods** you want to enable for ZaakPay and click **Submit**. + ![Add Easebuzz final details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/optimizer-zaakpay-final.jpg.md) + You have successfully added **ZaakPay** as a payment provider on Optimizer. + + +## Supported Payment Methods + +Payment Methods | Availability +--- +Netbanking | Live +--- +Cards | Live +--- +UPI | Live +--- +Wallet | Live + +> **INFO** +> +> +> **Handy Tips** +> +> ZaakPay supports [Third-Party Validation (TPV)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/third-party-validation.md#supported-bank-gateways-payment-gateways-and-payment-methods). +> + +## Best Practices + +Before routing all traffic or some traffic to a new gateway via Optimizer, the following best practices are recommended: + + +### Live and Test Mode Rules + + All rules configured on live or test mode on the Razorpay Dashboard will reflect on live mode. However, credentials added in test mode will not be automatically replicated in live mode. + + + +### Sanity Test at Razorpay + + You can reach out to Razorpay for basic sanity testing of the integration. Razorpay will try a test payment of small value and ensure that the credentials are correct. + + + +### Perform Self-Sanity Test + + We recommend configuring a rule in live mode to route payments lesser than a set value (for example, ₹2) to the ZaakPay gateway. This helps to test on production whether small value payments are being routed to ZaakPay and working successfully, thus helping to avoid any direct impact on production traffic. + + Follow the steps given below to configure a rule in live mode: + 1. Log in to your Dashboard. + 2. In the left navigation, click **Optimizer**. + 3. Click **+Add Rule** and enter the **Rule name** and **Description**. + 4. Click **Next** and enter the following rule: + - In **Parameter** field, select **Amount (In Rupees)**. + - In **Select Connection** field, select **Less Than**. + - In **Enter Amount** field, enter the value 2 and click **Next**. + ![Add Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-rule.jpg.md) + 5. Enter the value 100 in the **Route field**, select **ZaakPay** in the **Payment Via** field, and click **Next**. + ![target Provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/zaakpay-target-provider.jpg.md) + 6. Click **Publish Rule**. + ![Publish Rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/zaakpay-publish-rule.jpg.md) + + +## Go Live +After the integration is tested and successful, you can go live on ZaakPay. diff --git a/llm-content/payments/orders.md b/llm-content/payments/orders.md new file mode 100644 index 00000000..4c83deb0 --- /dev/null +++ b/llm-content/payments/orders.md @@ -0,0 +1,56 @@ +--- +title: About Orders +description: All about Razorpay Orders, their states and Razorpay Dashboard actions. +--- + +# About Orders + +Order is an important step of the payment life cycle at Razorpay. When a customer clicks the pay button on your website or app, an order is created with a unique identifier. This contains details such as the transaction amount and currency. The order id secures the payment request and one cannot tamper with the order amount. Pass this order id to the Razorpay Checkout. + +You need to integrate your server with Orders API before proceeding with Razorpay Payment Gateway integration on your website or app. + +### Advantages + +- Single successful payment bound to an order. Prevents multiple payments. +- Quick and easy query in the database. Combines multiple payment attempts for a single order. + +## Order States + +Following are the various states of an order: + + Status | Description + --- + `created` | When a new order is created, it is in the `created` state. It stays in this state until payment is attempted on it. + --- + `attempted` | An order moves from `created` to `attempted` state when payment is first attempted on it. It remains in the `attempted` state until a payment associated with that order is captured. + --- + `paid` | After the payment is captured successfully, the order moves to the `paid` state. No further payment requests are allowed once the order moves to the `paid` state. The order continues to be in the `paid` state even if the payment associated with the order is refunded. + +> **WARN** +> +> +> **Watch Out!** +> +> If an order is in an `attempted` state with the associated payment id in the `authorised` state, initiating another payment using the same order id is not allowed. +> + +## Order and Payment Flows + +Following is a pictorial representation of how order and payment flows are closely related: + +![Pictorial representation of Order and Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/orders-payment-flow.jpg.md) + +## Create Orders + +You can [create an order using this API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#create-an-order). + +## Dashboard Actions + +Perform the following actions using the Dashboard: +- [View orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders/dashboard.md#view-order-details) +- [Subscribe to Webhook Events related to orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders/dashboard.md#subscribe-to-webhook-events) +- [View reports related to orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders/dashboard.md#reports) + +### Related Information + +[Orders APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders/apis.md) diff --git a/llm-content/payments/orders/apis.md b/llm-content/payments/orders/apis.md new file mode 100644 index 00000000..01295206 --- /dev/null +++ b/llm-content/payments/orders/apis.md @@ -0,0 +1,33 @@ +--- +title: Orders APIs +description: List of Orders APIs available to perform various actions. +--- + +# Orders APIs + +You can use the Orders APIs to perform various actions. You can perform a few of these actions from the Dashboard as well. + +## List of Orders APIs + +The table below lists the various Orders APIs and gives a brief description of each API: + + API | Description + --- + [Create an order ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md) | API to create an order + --- + [Fetch orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-all.md) | API to view all orders + --- + [Fetch orders with expanded payments object](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-all-expanded-payments.md) | API to view all orders with expanded payments object + --- + [Fetch orders with card parameter expanded in payments object](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-all-expanded-card-payments.md) | API to view all orders with card parameter expanded in the payments object + --- + [Fetch order by order id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) | API to view order details by providing the order id + --- + [Fetch payments for an order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-payments.md) | API to view all the payments made for the order + --- + [Update order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/update.md) | API to update the 'Notes' field of an existing order + +### Related Information + +- [ About Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md) +- [Order - Dashboard Actions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders/dashboard.md) diff --git a/llm-content/payments/orders/dashboard.md b/llm-content/payments/orders/dashboard.md new file mode 100644 index 00000000..64174ae0 --- /dev/null +++ b/llm-content/payments/orders/dashboard.md @@ -0,0 +1,53 @@ +--- +title: Orders - Dashboard Actions +description: View Order details, subscribe to webhook events and view reports from the Razorpay Dashboard. +--- + +# Orders - Dashboard Actions + +You can use the Dashboard to perform the following actions: +- [View Order Details from Dashboard](#view-order-details-from-dashboard) +- [Subscribe to Webhooks](#subscribe-to-webhook-events) +- [View reports](#reports) + +## View Order Details From Dashboard + +Watch this video to see how to view order details from the Dashboard. + +[Video: https://www.youtube.com/embed/y5abD3RiaJM?si=KaE175lV4SOraRJ1] + +To view order details: +1. Log in to the Dashboard. +2. Select **Transactions** from the left menu and click **View All** on the **Orders** tab. +3. A list of all the orders is displayed. +4. Click an **Order Id** to view the details of the order. + +### View Order Details Using API + +- [View all orders using Fetch Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-all.md). +- [View specific details of an order using Fetch an Order with ID API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md). + +## Subscribe to Webhook Events + +Subscribe to Webhook events available for orders to receive notifications. + +To subscribe to Webhook events: + +1. Log in to the Dashboard. +2. Navigate to **Accounts & Settings** → Webhooks to subscribe to any of the following events: + +The table below lists the webhook events available for orders. + +Webhook Event | Description +--- +`order.paid` | Triggered when an order is successfully paid. + +Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) and check the [sample payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/orders.md). + +## Reports + +Detailed insights can be gained using reports and real-time data on the Dashboard. These reports can then be used for accounting and reconciliation purposes. Know more about [reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md). + +### Related Information +- [About Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md) +- [Orders APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders/apis.md) diff --git a/llm-content/payments/orders/faqs.md b/llm-content/payments/orders/faqs.md new file mode 100644 index 00000000..8ff78d78 --- /dev/null +++ b/llm-content/payments/orders/faqs.md @@ -0,0 +1,29 @@ +--- +title: Orders | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to some Frequently Asked Questions (FAQs) about Razorpay Orders. +--- + +# Frequently Asked Questions (FAQs) + +### 1. What happens if an order is in the attempted state with an authorised payment id? + + If an order is in the attempted state with the associated payment id in the authorised state, initiating another payment using the same order id is not allowed. + + + +### 2. Can an order be attempted more than once? + + No further payment requests are allowed once an order is in the paid state. Even if the payment associated with the order is refunded, the order remains in the paid state. + + + +### 3. Can I view order details on the Dashboard? + + Yes, you can [view the order details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders/dashboard.md#view-order-details-from-dashboard) from the Dashboard. + + + +### 4. What are the different states of an order? + + An order can be in one of three states: Created, Attempted, or Paid. Know more about the [different states of an order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md#order-states). diff --git a/llm-content/payments/payment-button.md b/llm-content/payments/payment-button.md new file mode 100644 index 00000000..1ab5359c --- /dev/null +++ b/llm-content/payments/payment-button.md @@ -0,0 +1,66 @@ +--- +title: About Payment Button +description: Accept payments from your customers using Razorpay Payment Button. +--- + +# About Payment Button + +You can start accepting payments on your website or blog with the Payment Button. + +Razorpay Payment Button provides a single line of code that you can embed on your website or blog to display the Payment Button, allowing customers to make payments easily. + +![Payment Button on Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-payment-button-website.jpg.md) + +## Advantages + +- Saves your time and effort needed in a payment gateway integration. +- Go from Create-to-Collect in a matter of minutes. +- Test the changes immediately with the What You See Is What You Get (WYSIWYG) editor. +- Flows with your branding guidelines, providing a flawless user experience. +- Select from a range of templates that you can modify as per your need. + +### List of Supported Payment Methods + +**Online Payment** + +Customers can make online payments using [Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md), [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md), [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md), [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md) and **wallets**. + +### International Currency Support + +You can receive payments in any of the [supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) from the Dashboard. + +#### Address Verification System + +If you are accepting international payments, you can use Razorpay's [Address Verification System (AVS)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md). AVS verifies if a customer's billing address (postal code and the billing street address) matches the billing address on file with the card issuer. Based on the response from the issuer, Razorpay will accept or cancel the transaction. This helps in the prevention of fraud in international payments. + +## Supported Platforms + +Razorpay Payment Button is supported on the following platforms: + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + + + Web | Android | iOS | Webview + --- + x | x | x | x + + + +### Related Information +- [How Payment Button Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/how-it-works.md) +- [Payment Button States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/states.md) +- [Quick Pay Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/quick-pay.md) +- [Buy Now Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/buy-now.md) +- [Donations Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/donations.md) +- [Custom Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/custom.md) +- [Manage Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/manage.md) +- [Prefill Amount Fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/manage/prefill-amount-fields.md) +- [Search for a Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/search.md) +- [View Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/view-reports.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/subscribe-to-webhooks.md) diff --git a/llm-content/payments/payment-button/80g-receipt.md b/llm-content/payments/payment-button/80g-receipt.md new file mode 100644 index 00000000..92056b71 --- /dev/null +++ b/llm-content/payments/payment-button/80g-receipt.md @@ -0,0 +1,99 @@ +--- +title: Configure 80G-enabled Payment Button Receipt +description: Configure 80G compliant automatic and manual payment receipts for the payments made using your Razorpay Payment Button. +--- + +# Configure 80G-enabled Payment Button Receipt + +--- +title: Configure 80G-enabled Payment Button Receipt +razorpay-MY-title: Configure Tax Exemption Payment Button Receipt +razorpay-SG-title: Configure Tax Exemption Payment Button Receipt +razorpay-US-title: Configure Tax Exemption Payment Button Receipt +desc: Configure 80G compliant automatic and manual payment receipts for the payments made using your Razorpay Payment Button. +razorpay-MY-desc: Configure Tax Exemption compliant automatic and manual payment receipts for the payments made using your Razorpay Curlec Payment Button. +razorpay-SG-desc: Configure Tax Exemption compliant automatic and manual payment receipts for the payments made using your Razorpay Payment Button. +tags: 80G compliance payment button, configure 80G receipt, automated 80G donation receipt, manual 80G receipt setup, +--- + +If you are an NGO and using Razorpay Payment Button to accept donations from patrons, you can share payment receipts with 80G details for your customer after they make the payments. The payment receipts can be generated and shared [Automatically](#automated-receipt) or [Manually](#manual-receipt). + +## Automated Receipt + +Automatically generate payment receipts and send them to the customers through email and SMS using the details they provided at the time of payment. An auto-generated reference number is be added by Razorpay. + +Watch this video to see how to configure automated payment receipts. + +[Video: https://www.youtube.com/embed/HzgltIiL5lg] + +To configure automated payment receipts: +1. While creating or editing the Payment Button, select the **Payment Receipts** feature available on the top menu ribbon. +2. On the **Payment Receipts Settings** pop-up page, select **Send Automated Receipts**. +3. You can show an input field such as `Name`, `Address` and its associated value on the Receipt. + 1. Enable the **Show an Input Field on Receipt** feature. + 2. In the drop-down list, select one of the custom input fields such as `Name`, `Address` or `Landmark`, used on the Payment Button. For example, if you have selected `Name`, the patron's name `Gaurav Kumar` will appear on the payment receipt. +4. To issue receipts with 80-G details, enable the **Issue 80-G Receipts** option. +5. Use the **Click here** link to add relevant 80-G text to be displayed in the payment receipt. This opens the **Manage 80-G** pop-up page where you can add a description and upload the signature of the authorized signatory. + 1. Enter the description. For example: + + Donation eligible for exemption under 80-G under IT Act 1861 .. with ID DIT(E)/2009-2010/W-110/15XX dated 24.09.2009 + 2. Upload an image of the signature in the **Authorized Signatory** field and click **Save**. +6. Click **Save**. + +## Manual Receipt + +You can choose to send payment receipts to your customers manually. In this case, you must manually add a reference number to the receipt and share it with your customers. + +To configure manual payment receipts: + +1. On the Payment Button creation pop-up page, select the **Payment Receipts** feature available on the top menu ribbon. +2. On the **Payment Receipts Settings** pop-up page, select **Send Manual Receipts**. +3. You can show an input field such as `Name`, `Address` and its associated value on the Receipt. + 1. Enable the **Show an Input Field on Receipt** feature. + 2. In the drop-down list, select one of the custom input fields such as `Name`, `Address` or `Landmark`, used on the Payment Button. For example, if you have selected `Name`, the patron's name `Gaurav Kumar` will appear on the payment receipt. +4. To issue receipts with 80-G details, enable the **Issue 80-G Receipts** option. +5. Use the **Click here** link to add relevant 80-G text to be displayed in the payment receipt. This opens the **Manage 80-G** modal where you can add a description and upload the signature of the authorized signatory. + 1. Enter the description. For example: + + Donation eligible for exemption under 80-G under IT Act 1861 .. with ID DIT(E)/2009-2010/W-110/15XX dated 24.09.2009 + 2. Upload an image of the signature in the **Authorized Signatory** field and click **Save**. +6. Click **Done**. +7. Navigate to the page's **Transactions Details** section. All the payments made using the Payment Button are listed here. ![Transaction Details section with list of payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-pp-transactions-send.jpg.md) +8. Click the Payment ID to view the payment details. +9. In the **Payment Receipt** field, click the **Send** button. +10. Enter a reference number for the receipt as per your business requirements. + ![Enter reference number for manual receipt](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-pp-manual-ref.jpg.md) +11. Click **Send**. + + +### Resend and Download Payment Receipt + + + +Watch this video to see how to resend and download a payment receipt. + +[Video: https://www.youtube.com/embed/me-gVlb09cQ] + +To resend and download a payment receipt: +1. Navigate to the button's **Transactions Details** page. All the payments made using the Payment Button are listed here. +2. Click on the Payment ID to view the payment details. +3. In the **Payment Receipt** field, click the **Send** button. This will resend the receipt to the customer. +4. You can download the payment receipt using the **Download** button. + + + + +### Email Notification to Customers + + Payment receipts are sent to customers via email as a PDF attachment. The details entered by the customer while making the payment also appear on the email body. + + + ![](/docs/assets/images/payment-pages-receipt-email.jpg) + + + + + +### Related Information + +[Configure Generic Payment Button Receipt](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/receipt.md) diff --git a/llm-content/payments/payment-button/add-fb-pixel.md b/llm-content/payments/payment-button/add-fb-pixel.md new file mode 100644 index 00000000..d4bbb1be --- /dev/null +++ b/llm-content/payments/payment-button/add-fb-pixel.md @@ -0,0 +1,39 @@ +--- +title: Payment Button | Facebook Pixel +heading: Add Facebook Pixel on Payment Success Page +description: Add your Facebook Pixel on your payment success page and track payments and conversions from your Facebook advertisements. +--- + +# Add Facebook Pixel on Payment Success Page + +Integrate Facebook Pixel on your payment success page: + +- If you use Payment Buttons to accept payments from customers and redirect them to a success page post payment. +- If you also advertise on Facebook and use Facebook Pixel to track conversions. + +This integration tracks and analyses ad conversion to payments. + +## Prerequisites + +- [Create a Facebook Pixel](https://www.facebook.com/business/help/952192354843755?id=1205376682832142&recommended_by=1700857106877546). +- Create a payment success page on your domain and [add the Facebook Pixel to it](https://www.facebook.com/business/help/952192354843755?id=1205376682832142). + +## Add Redirects to Measure Facebook Ads' Effectiveness + +Let us assume you run a website selling pet supplies. You attract customers using advertisements on Facebook and sell them pet products on your website using our Payment Button. + +To track and measure the effectiveness of these Facebook ads and how many of them convert into purchases, you need to add a redirect from your Payment Button to this success page. + +To add redirects: +1. Navigate to your Payment Button in the edit mode on the **Button Created Successfully** page. +1. Click **Configure** for the **Redirect URL and Custom Message**. +1. On the pop-up page, enable **Redirect URL**. +1. Add the redirect URL in the field. +1. Click **Save**. + +Every time a customer successfully completes a payment, they will be directed to the success page. Facebook pixel will track this event. + +### Related Information + +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [How Payment Button Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/how-it-works.md) diff --git a/llm-content/payments/payment-button/buy-now.md b/llm-content/payments/payment-button/buy-now.md new file mode 100644 index 00000000..1cf15411 --- /dev/null +++ b/llm-content/payments/payment-button/buy-now.md @@ -0,0 +1,339 @@ +--- +title: Buy Now Button +description: Create a Buy Now Button, sell products and accept payments from customers. +--- + +# Buy Now Button + +You can create a Buy Now button from the Dashboard and embed it on your website to accept payments from customers. This is useful in cases where you want to sell products on your online store. + +**Example** + +Suppose you are a pottery artist who sells hand-painted pottery articles to customers using your website. You can embed the Buy Now button on your online store to sell your products. + +Assume you sell the following product on your online store: + +Product Name | Number of Items Available | Number of Items purchasable per user | Price per Item (in ₹) +--- +Handpainted Coffee Mugs Set | 25 | 1 | 500 + +You also offer gift wrapping for an additional cost of ₹30. + +## Prerequisites +- [Set up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#sign-up) your Razorpay account. +- Log in to the Dashboard. +- The Dashboard has [test and live modes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/test-live-modes.md). Payment Buttons created in the test mode do not appear in the live environment. **You must create a new Payment Button in live mode**. + +## Create a Buy Now Button + +Watch this video to see how to create a Buy Now button. + +[Video: https://www.youtube.com/embed/L9gBd14joQ8] + +Below are the steps to create a Buy Pay button: +1. [Select a Template](#1-select-a-template) +2. [Add Button Details](#2-add-buy-now-button-details) + +### 1. Select a Template + +1.1 Log in to the Dashboard. + +1.2. Go to the **PAYMENT PRODUCTS** section and click **Payment Button**. + ![Dashboard Payment Buttons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-payment-button-dashboard.jpg.md) + +1.3. Click **+ Create Payment Button**. + +1.4. On the **Button Creation Wizard**, select the **Buy Now** button type. + ![Select Payment Buttons type](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-buy-now-buy-now.jpg.md) + +1.5 Click **Use this template**. + +### 2. Add Buy Now Button Details +Configure these sections to create the Buy Now button: + + +### 2.1 Button Details + + On the **Button Details** pop-up page, enter the relevant information: + 1. **Title**: Provide a name for the button. This name is for your internal reference and appears on the Dashboard. It **will not be visible** to customers. For example, **Handpainted Home and Kitchen Decor**. + 2. **Button Type**: If you want to change the button type, click the drop-down list and select one of the types. If the button type is switched mid-way, any information entered during creation will not be saved. + 3. **Button Label**: The text on the button to be displayed to customers. Please enter alphanumeric characters only. The maximum character limit is 20. An example for this is **Buy Now**. + 4. **Button Theme**: You can choose between the following themes: + - Razorpay Dark + - Razorpay Light + - Razorpay Outline + - Brand Color (This is the color configured by you on the Dashboard) + 5. Click **Next**. + + + + ![Payment Button Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-buy-now-buy-now-create.jpg.md) + + + + + + +### 2.2 Amount Details + + You must use the amount fields to list your products. There are two types of amount fields available: **Fixed Price** and **Item with Quantity**. For the Payment Button in the example, you must create two amount fields with the following configurations: + + + Amount Field Name | Amount Field Type | Optional Item + --- + Handpainted Coffee Mugs Set | Item with Quantity | Yes + --- + Add Gift Wrap | Fixed Amount | Yes + + + + + To create the **Hand-painted Coffee Mugs** amount field: + 1. Click **+Add Amount Field**. + ![Payment Button amount details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-buy-now-amount-details-create.jpg.md) + 2. From the drop-down list, select **Item with Quantity** as the field type. + 3. On the pop-up page: + 1. Enter the label of the product as `Handpainted Coffee Mugs Set`. + 2. Click **+ Add Description** and enter details if required. + 3. Enter the amount as `500`. + ![Amount Details - field label](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-buy-now-amount-field-create.jpg.md) + 4. Click the more icon to view **Advanced Options**. + 1. Configure the Limit Quantity per Order, with `1` in **Min** and **Max** fields. This will prevent customers from ordering more than 1 item. + 2. Select **Item has Limited Stock** and enter the value as `25`. + ![Amount Details - advanced options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-buy-now-advanced-options.jpg.md) + 5. Click **Save**. + 4. **Save** the field. + + ![Amount Details - Preview](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-buy-now-amount-field-created.jpg.md) + + + + + + + + Now, let us create the **Add Gift Wrap** amount field. + 1. Click **+Add Amount Field**. + 2. From the drop-down list, select **Fixed Amount** as the field type. + 3. On the pop-up page: + 1. Enter the label of the product as `Add Gift Wrap`. + 2. Click **+ Add Description** and enter details if required. + 3. Enter the amount as `30`. + 4. Click the arrow to view **Advanced Options** and disable **Item has Limited Stock**. + 5. Click **Save**. + 4. **Save** the field and click **Next**. + + + + ![Amount Details - Preview](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-buy-now-all-amount-fields-complete.jpg.md) + + + + + +### 2.3 Customer Details + + In the **Customer Details** section, configure the information that must be entered by the customer while making the payment. By default, `Email` and `Phone` must be entered. However, you can edit the labels of these fields. + + + + ![Enter customer details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-buy-now-customer-details-default.jpg.md) + + + + + #### Custom Fields + + You can add more fields to collect additional data from the customer. Let us add two custom fields - **Name** and **Address**. + + To add **Name** input field: + 1. Click **+ Add Input Field**. From the drop-down list that appears, select **Single Line Text**. + 2. On the pop-up page, enter the label for the custom field - `Name`. + 3. If required, add a description for the field. + 4. Click **Save**. + + Similarly, create the input field for **Address**. + + + + ![Customer Details - Custom field preview](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-buy-now-customer-details-added.jpg.md) + + + + + + To proceed, click **Next**. + + The data entered by the customers will be available in the Transaction Details report. + + + + +### 2.4 Review and Create + + Review the details entered in the previous sections. You can click **Back** to navigate to the **Button Details**, **Amount Details** and **Customer Details** sections to make changes. + + 1. Click **Create Button**. + + + + ![Review and create the Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-buy-now-review-button.jpg.md) + + + + + + 2. After completing the steps, the button code appears. Copy this code and add it in your webpage. + + + + ![Payment Button created successfully](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-pb-success.jpg.md) + + + + + +## Embed Payment Button Code in Website + +The embed code generated on the Dashboard must be embedded in your website. After this is done, the Buy Now button appears on your website. + +Customers can click this button to: +1. Open Razorpay Checkout. +2. Select the products. +3. Add their name and address. +4. Complete the payment. + +You can embed this code on any webpage, be it a custom HTML site or one built on platforms such as WordPress, Wix or Google Sites. + + +### Example + + Let us embed the Buy Now button on an HTML page. + + 1. Create a blank HTML file on your system. + 2. Paste the embed code onto the page. + 3. Save this HTML page and open it on the browser. + + Your button is now been embedded in your website. + + + + ![Embed Payment Button Code GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-embed-min.gif.md) + + + + +## Make Test Payments Using the Payment Button + +To make a test payment using a payment button: + +1. Select the payment button you wish to test from the Dashboard and click **Get Code**. +2. Click **Copy Code** to copy the code to your clipboard. + ![Payment Button Code Selection](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-button-code-select.jpg.md) +3. Test the Payment Button by adding the code to the [Payment Button Test Widget](https://cdn.razorpay.com/static/widget/test-payment-button.html). +4. Paste the code in the text box and click **Run Code**. +5. Click on the Payment Button that appears in the preview section. + ![Payment Button Test Preview](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-run-test-preview.jpg.md) +6. Enter the required details and click **PROCEED TO PAY**. +7. Select the payment method of your choice to proceed with the payment. + + + + You can use these [test card details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#test-cards). + + + You can use these [test UPI details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#test-upi-id). + + + You can select any bank for your test payment. Select **Success** or **Failure**, depending on which flow you wish to test. + ![Test Payment Success or Failure Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pl-test-payment-success.jpg.md) + + + +8. You should see a confirmation message depending on the flow you have selected. + ![Payment Success](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-payment-success.jpg.md) + +### Customer Interaction + +Let us make a test transaction to check how the customer will interact with the button on your website. + +1. Click the **Buy Now** button. +2. Select the product you want to buy and mark quantity as `1` and click **Next**. +3. Enter name, address, email and phone number and click **Next**. +4. Select a payment method, for example, card, and complete the payment. +5. The payment success screen is displayed and a confirmation email is sent to you. + +![Customer interaction GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-customerpayment.gif.md) + +## Post Payment Actions + +After the customer has successfully completed the payment, you can: + + + + + +### Send Payment Receipt + +You can ensure that your customers receive payment receipts via email once they complete the payment. Know how to [ send and download automated or manual payment receipts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/receipt.md). + +If you are an NGO, you can [ send and download payment receipts with 80-G information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/80g-receipt.md). + +### Show Custom Message + +You can show a custom message to your customers once they complete a payment. + +To show custom messages: + +1. On the **Button Created Successfully** pop-up page, click **Configure** against **Redirect URL and Custom Message**. +2. On the pop-up page, enable **Show a custom message**. +3. Add the custom message in the field. +4. Click **Save**. + +![Button Settings custom message](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-custom-message.jpg.md) + +### Add a Redirect URL + +You can redirect your customers to another page after they complete a payment. + +To redirect your customers: + +1. On the **Button Created Successfully** pop-up page, click **Configure** against **Redirect URL and Custom Message**. +2. On the pop-up page, enable **Redirect URL**. +3. Add the redirect URL in the field. +4. Click **Save**. + +![Button Settings redirect URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-redirect.jpg.md) + +## View Transaction Details on Dashboard + +You can view the payments as and when they are made in the [Transactions Details View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/view-reports.md) of the page. + +![Transaction details on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-buy-now-transaction-detail.jpg.md) + +## Export Report + +You can also export the report data into a CSV file. + +To export report data: +1. Log in to the Dashboard and navigate to **Payment Button**. + +2. Select the relevant Payment Button. The Transactions Details View appears. +3. Click **Export All (CSV)** button. + +A .csv file is downloaded, where you can find a monthly report of all the payments made using your button. + +## Settlement +You will receive the payments in your bank account as per the settlement cycle agreed upon at the time of Razorpay account setup. Usually, this is T+2 days. In case of international payments, the settlement cycle is T+7 days. + +### Related Information +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [How Payment Button Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/how-it-works.md) +- [Payment Button States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/states.md) +- [Quick Pay Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/quick-pay.md) +- [Donations Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/donations.md) +- [Custom Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/custom.md) +- [Manage Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/manage.md) +- [Prefill Amount Fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/manage/prefill-amount-fields.md) +- [Search for a Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/search.md) +- [View Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/view-reports.md) diff --git a/llm-content/payments/payment-button/custom.md b/llm-content/payments/payment-button/custom.md new file mode 100644 index 00000000..b7504f54 --- /dev/null +++ b/llm-content/payments/payment-button/custom.md @@ -0,0 +1,312 @@ +--- +title: Custom Button +description: Create a Custom Payment Button and accept payments from customers. +--- + +# Custom Button + +You can create a Payment Button using the Dashboard and embed it on your website to accept payments from customers. + +**Example** + +You work for a baking institute and are in charge of organising a baking competition. You must add a payment button in your website for participants to register and pay the enrollment fee. + +Maximum Number of Participants | Registration Fee (in ₹) +--- +50 | 500 + +## Prerequisites + +- [Set up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#sign-up) your Razorpay account. +- Log in to the Dashboard. +- The Dashboard has [test and live modes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/test-live-modes.md). Payment Buttons created in the test mode do not appear in the live environment. **You must create a new Payment Button in live mode**. + +## Create a Custom Payment Button + +Watch this video to see how to create a Custom Payment Button. + +[Video: https://www.youtube.com/embed/GWyqSUM4Q2o?si=84BYEydHj_FQQbXb] + +Below are the steps to create a Custom Payment Button: +1. [Select a Template](#1-select-a-template) +2. [Add Button Details](#2-add-button-details) + +### 1. Select a Template + +1.1 Log in to the Dashboard. + +1.2 Go to the **PAYMENT PRODUCTS** section and click **Payment Button**. + ![Dashboard - Payment Products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-payment-button-dashboard.jpg.md) + +1.3 Click **+ Create Payment Button**. + +1.4 On the **Button Creation Wizard**, select the **Create Your Own** button type. + ![Pick a Button Type](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-custom-select-template.jpg.md) + +1.5 Click **Use this template**. + +### 2. Add Button Details +Configure these sections to create the Payment Button: + + +### 2.1 Button Details + + On the **Button Details** pop-up page, enter the relevant information: + 1. **Title**: Provide a name for the button. This name is for your internal reference and appears on the Dashboard. It **will not be visible** to customers. For example, **Annual Baking Competition**. + 2. **Button Type**: If you want to change the button type, click the drop-down list and select one of the types. If the button type is switched mid-way, any information entered during creation will not be saved. + 3. **Button Label**: The text on the button to be displayed to customers. Please enter alphanumeric characters only. The maximum character limit is 20. An example for this is **Register Now**. + 4. **Button Theme**: You can choose between the following themes: + - Razorpay Dark + - Razorpay Light + - Razorpay Outline + - Brand Color (This is the color configured by you on Dashboard) + 5. Click **Next**. + + + + ![Button Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-custom-button-details.jpg.md) + + + + + + + +### 2.2 Amount Details + + For the Payment Button in the example, you must create the Registration Fee amount fields with the following configuration: + + + Amount Field Name | Amount Field Type | Optional Item + --- + Registration Fee | Fixed Amount | No + + + + + To create the **Registration Fee** amount field: + 1. Click **+Add Amount Field**. + ![Amount Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-custom-amount-details-2.jpg.md) + 2. From the drop-down list, select **Fixed Amount** as the field type. + 3. On the pop-up: + 1. Enter the label of the product as `Registration Fee`. + 2. Click **+ Add Description** and enter details if required. + 3. Enter the amount as `500`. + ![Amount Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-custom-amount-field.jpg.md) + 4. Click the more icon to view **Advanced Options**. Select **Item has Limited Stock** and enter the value as `50`. + ![Amount Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-custom-amount-field-2.jpg.md) + 5. Click **Save**. + 4. **Save** the field and click **Next**. + + ![Amount Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-custom-amount-fields-complete.jpg.md) + + + + + + + + + + +### 2.3 Customer Details + + In **Customer Details**, configure the information that must be entered by the participant while making the payment. By default, `Email` and `Phone` must be entered. However, you can edit the labels of these fields. + + + + ![Customer Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-custom-customer-details.jpg.md) + + + + + + #### Custom Fields + + You can add more fields to collect additional data from the participant. Let us add two custom fields - **Name** and **Address**. + + To add **Name** custom field: + 1. Click **+ Add Input Field**. From the drop-down list that appears, select **Single Line Text**. + 2. In the modal, enter the label for the custom field - `Name`. + 3. If required, add a description for the field. + 4. Click **Save**. + + Similarly, create the custom field for **Address**. + + + + ![Customer Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-custom-customer-details-added.jpg.md) + + + + + + To proceed, click **Next**. + + The data entered by the participants will be available in the Transaction Details report. + + + + +### 2.4 Review and Create + + 1. Review the details entered in the previous sections. You can click **Back** to navigate to the **Button Details**, **Amount Details** and **Customer Details** sections to make changes. + + 2. Click **Create Button**. + + + + ![Review Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-custom-review-button.jpg.md) + + + + 3. After completing the steps, the button code appears. Copy this code and add it in your webpage. + + + + ![Review Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-pb-success.jpg.md) + + + + +## Embed Payment Button Code in Website + +The embed code generated on the Dashboard must be embedded in your website. After this is done, the Buy Now button will appear on your website. + +Customers can click this button to: +1. Open Razorpay Checkout. +2. Select the products. +3. Add their name and address. +4. Complete the payment. + +You can embed this code on any webpage, be it a custom HTML site or one built on platforms such as WordPress, Wix or Google Sites. + + +### Example + + Let us embed the Buy Now button on an HTML page. + + 1. Create a blank HTML file on your system. + 2. Paste the embed code onto the page. + 3. Save this HTML page and open it on the browser. + + Your button has now been embedded on your website! + + + + ![Embed Payment Button Code GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-embed-min.gif.md) + + + +## Make Test Payments Using the Payment Button + +Follow these steps to make a test payment using a payment button: + +1. Select the payment button you wish to test from the Dashboard and click **Get Code**. +2. Click **Copy Code** to copy the code to your clipboard. + ![Payment Button Code Selection](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-button-code-select.jpg.md) +3. Test the Payment Button by adding the code to the [Payment Button Test Widget](https://cdn.razorpay.com/static/widget/test-payment-button.html). +4. Paste the code in the text box and click **Run Code**. +5. Click on the Payment Button that appears in the preview section. + ![Payment Button Test Preview](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-run-test-preview.jpg.md) +6. Enter the required details and click **PROCEED TO PAY**. +7. Select the payment method of your choice to proceed with the payment. + + + + You can use these [test card details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#test-cards). + + + You can use these [test UPI details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#test-upi-id). + + + You can select any bank for your test payment. Select **Success** or **Failure**, depending on which flow you wish to test. + ![Test Payment Success or Failure Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pl-test-payment-success.jpg.md) + + + +8. You should see a confirmation message depending on the flow you have selected. + ![Payment Success](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-payment-success.jpg.md) + +### Customer Interaction + +Let us make a test transaction to check how the customer will interact with the button on your website. + +1. Click the **Register Now** button. +2. Enter name and phone number and fill in the details in the other fields and click **Next**. +3. Select a payment method, for example, card, and complete the payment. +4. The payment success screen is displayed and a confirmation email is sent to you. + +![Customer Interaction GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-customerpayment.gif.md) + +## Post Payment Actions + +After the customer has successfully completed the payment, you can: + + + + + +#### Send Payment Receipt + +You can ensure that your customers receive payment receipts via email once they complete the payment. Know how to [ send and download automated or manual payment receipts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/receipt.md). + +If you are an NGO, you can [ send and download payment receipts with 80-G information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/80g-receipt.md). + +#### Show Custom Message + +You can show a custom message to your customers once they complete a payment. + +To show custom messages: + +1. On the **Button Created Successfully** pop-up page, click **Configure** against **Redirect URL and Custom Message**. +2. On the pop-up page, enable **Show a custom message**. +3. Add the custom message in the field. +4. Click **Save**. + +![Button Settings custom message](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-custom-message.jpg.md) + +#### Add a Redirect URL + +You can redirect your customers to another page after they complete a payment. + +To redirect your customers: + +1. On the **Button Created Successfully** pop-up page, click **Configure** against **Redirect URL and Custom Message**. +2. On the pop-up page, enable **Redirect URL**. +3. Add the redirect URL in the field. +4. Click **Save**. + +![Button Settings redirect URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-redirect.jpg.md) + +## View Transaction Details on Dashboard + +You can view the payments as and when they are made in the [Transactions Details View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/view-reports.md) of the page. + +![Transaction details on Dasboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-custom-transaction-detail.jpg.md) + +## Export Report + +You can also export the report data into a CSV file. + +To export report: +1. Log in to the Dashboard and navigate to **Payment Button**. +2. Select the relevant Payment Button. The Transactions Details View appears. +3. Click **Export All (CSV)** button. + +A .csv file is downloaded, where you can find a monthly report of all the payments made using your button. + +## Settlement +You will receive the payments in your bank account as per the settlement cycle agreed upon at the time of Razorpay account setup. Usually, this is T+2 days. In case of international payments, the settlement cycle is T+7 days. + +### Related Information +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [How Payment Button Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/how-it-works.md) +- [Payment Button States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/states.md) +- [Quick Pay Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/quick-pay.md) +- [Buy Now Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/buy-now.md) +- [Donations Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/donations.md) +- [Manage Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/manage.md) +- [Prefill Amount Fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/manage/prefill-amount-fields.md) +- [Search for a Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/search.md) +- [View Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/view-reports.md) diff --git a/llm-content/payments/payment-button/donations.md b/llm-content/payments/payment-button/donations.md new file mode 100644 index 00000000..c9b00432 --- /dev/null +++ b/llm-content/payments/payment-button/donations.md @@ -0,0 +1,313 @@ +--- +title: Donations Button +description: Create a Donation Button and accept donations. +--- + +# Donations Button + +You can create a Donations Button using the Dashboard and embed it on your website to accept donations from donors. This is useful if you are an NGO or a business that wants to raise funds for a cause. + +**Example** + +Suppose you work for an NGO - Asha Foundation, and are in charge of a campaign to raise funds for flood victims. You can embed the Donations button on your website to raise funds. + +Assume you want to raise funds to deliver relief materials as shown below: + +Relief Material Package | Amount +--- +Dry Rations | ₹750 +--- +Sanitation kit | ₹2500 +--- +Donate any Amount | Minimum amount of ₹500 + +## Prerequisites +- [Set up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#sign-up) your Razorpay account. +- Log in to the Dashboard. +- The Dashboard has [test and live modes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/test-live-modes.md). Payment Buttons created in the test mode do not appear in the live environment. **You must create a new Payment Button in live mode**. + +## Create a Donations Button + +Watch this video to see how to create a Donations button. + +[Video: https://www.youtube.com/embed/Y-mxTvquLqg?si=oYXwYOZFvu0iKDKZ] + +Below are the steps to create a Donation Button: +1. [Select a Template](#1-select-a-template) +2. [Add Button Details](#2-add-button-details) + +### 1. Select a Template + +1.1 Log in to the Dashboard. + +1.2 Go to the **PAYMENT PRODUCTS** section and click **Payment Button**. + ![Dashboard - Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-payment-button-dashboard.jpg.md) + +1.3 Click **+ Create Payment Button**. + +1.4 On the **Button Creation Wizard**, select the **Donations** button type. + ![Select Payment Buttons type](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-donations-button-donations-button-template.jpg.md) + +1.5 Click **Use this template**. + +## 2. Add Button Details + +Configure these sections to create the Payment Button: + + +### 2.1 Button Details + + + + On the **Button Details** pop-up page, enter the relevant information: + 1. **Title**: Provide a name for the button. This name is for your internal reference and appears on the Dashboard. It **will not be visible** to donors. For example, **Assam Floods**. + 2. **Button Type**: If you want to change the button type, click the drop-down list and select one of the types. If the button type is switched mid-way, any information entered during creation will not be saved. + 3. **Button Label**: The text on the button to be displayed to customers. Please enter alphanumeric characters only. The maximum character limit is 20. An example for this is **Donate Now**. + 4. **Button Theme** - You can choose between the following themes: + - Razorpay Dark + - Razorpay Light + - Razorpay Outline + - Brand Color (This is the color configured by you on the Dashboard) + 5. Click **Next**. + + + + + + + + + + ![Payment Button details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-donations-button-button-detail.jpg.md) + + + + + + + +### 2.2 Donation Amount + + + + Donors can pay an amount of their choice or pay an amount that you suggested. For example, you can collect funds for a specific relief material package or ask to pay any amount. + + 1. Create the **Donate any Amount** field. + 1. Edit the **Donate an Amount of your Choice** field label to **Donate any Amount**. + 2. Click **+ Add Description** and enter details if required. + 3. Select the donation currency. + 4. Click **+ Add min and max amount limits** and enter the `500` as the minimum donation amount. + 2. Create the **Dry Rations** and **Sanitation Kits** fields: + 1. Enable **Show presets for donation amount**. + 2. Enter the label as `Dry Rations` and the amount as `750`. + 3. Similarly, in the next field, enter the label - `Sanitation Kits` and the amount - `2500`. + 3. Click **Next**. + + + + + + + + + ![Enter donation amount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-donations-button-amount.jpg.md) + + + + + +### 2.3 Customer Details + + In the **Customer Details** section, configure the information that must be entered by the donor while making the payment. By default, `email` and `contact` must be entered by donor. However, you can edit the labels of these fields. + + + + ![Enter customer details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-donations-button-customer-details.jpg.md) + + + + + + #### Custom Fields + + + + You can add more fields to collect additional data from the donor such as Name and PAN. + + To add custom fields: + 1. Click **+ Add Another Input Field**. From the drop-down list, select the relevant field type. For example, if you want donors to enter their PAN, select **PAN Number**. + 2. On the pop-up page, enter the label for the custom field. For example, `Enter Your PAN`. + 3. If required, add a description for the field and select **This field is optional**. + 4. Click **Save**. + 5. To proceed, click **Next**. + + The data entered by the donors will be available in the Transaction Details report. + + + + + + + + + + +### 2.4 Review and Create + + 1. Review the details entered in the previous sections. You can click **Back** to navigate to the **Button Details**, **Donation Details** and **Customer Details** sections to make changes. + + 2. Click **Create Button**. + + + + ![Payment Button - Review and Create](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-donations-button-review.jpg.md) + + + + 3. After completing the steps, the button code appears. Copy this code and add it in your webpage. + + + + ![Button created successfully](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-pb-success.jpg.md) + + + + +## Embed Payment Button Code in Website + +The embed code generated on the Dashboard must be embedded in your website. After this is done, the **Donations** button appears on your website. + +Customers can click this button to: +1. Open Razorpay Checkout. +2. Select the products. +3. Add their name and address. +4. Complete the payment. + +You can embed this code on any webpage, be it a custom HTML site or one built on platforms such as WordPress, Wix or Google Sites. + + +### Example + + Let us embed the Buy Now button on an HTML page. + + 1. Create a blank HTML file on your system. + 2. Paste the embed code onto the page. + 3. Save this HTML page and open it on the browser. + + Your button is now been embedded to your website. + + + ![](/docs/assets/images/payment-button-embed-min.gif) + + + + +## Make Test Payments Using the Payment Button + +To make a test payment using a payment button: + +1. Select the payment button you wish to test from the Dashboard and click **Get Code**. +2. Click **Copy Code** to copy the code to your clipboard. + ![Payment Button Code Selection](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-button-code-select.jpg.md) +3. Test the Payment Button by adding the code to the [Payment Button Test Widget](https://cdn.razorpay.com/static/widget/test-payment-button.html). +4. Paste the code in the text box and click **Run Code**. +5. Click on the Payment Button that appears in the preview section. + ![Payment Button Test Preview](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-run-test-preview.jpg.md) +6. Enter the required details and click **PROCEED TO PAY**. +7. Select the payment method of your choice to proceed with the payment. + + + You can use these [test card details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#test-cards). + + + You can use these [test UPI details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#test-upi-id). + + + You can select any bank for your test payment. Select **Success** or **Failure**, depending on which flow you wish to test. + ![Test Payment Success or Failure Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pl-test-payment-success.jpg.md) + + + +8. You should see a confirmation message depending on the flow you have selected. + ![Payment Success](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-payment-success.jpg.md) + +## Donor Interaction + +Let us make a test transaction to check how the donor will interact with the button on your website. + +1. Click the **Donate Now** button. +2. Enter name and phone number and fill in the details in the other fields and click **Next**. +3. Select a payment method, for example, card, and complete the payment. +4. The payment success page is displayed and you receive a confirmation email. + +![Donor Interaction GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-customerpayment.gif.md) + +## Post Payment Actions + +After the customer has successfully completed the payment, you can: + + + + + +### Send Payment Receipt + +You can ensure that your customers receive payment receipts via email once they complete the payment. Know how to [ send and download automated or manual payment receipts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/receipt.md). + +If you are an NGO, you can [ send and download payment receipts with 80-G information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/80g-receipt.md). + +### Show Custom Message + +You can show a custom message to your customers once they complete a payment. + +To show custom messages: + +1. On the **Button Created Successfully** pop-up page, click **Configure** against **Redirect URL and Custom Message**. +2. On the pop-up page, enable **Show a custom message**. +3. Add the custom message in the field. +4. Click **Save**. + +![Button Settings custom message](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-custom-message.jpg.md) + +### Add a Redirect URL + +You can redirect your customers to another page after they complete a payment. + +To redirect your customers: + +1. On the **Button Created Successfully** pop-up page, click **Configure** against **Redirect URL and Custom Message**. +2. On the pop-up page, enable **Redirect URL**. +3. Add the redirect URL in the field. +4. Click **Save**. + +![Button Settings redirect URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-redirect.jpg.md) + +## View Transaction Details on Dashboard + +You can view the payments as and when they are made in the [Transactions Details View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/view-reports.md) of the page. + +![Transaction details on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-donations-button-transaction-detail.jpg.md) + +## Export Report + +You can also export the report data into a CSV file. To export report data: +1. Log in to the Dashboard and navigate to **Payment Button**. +2. Select the relevant Payment Button. The Transactions Details View appears. +3. Click **Export All (CSV)** button. + +A .csv file is downloaded, where you can find a monthly report of all the payments made using your button. + +## Settlement +You will receive the payments in your bank account as per the settlement cycle agreed upon at the time of Razorpay account setup. Usually, this is T+2 days. In case of international payments, the settlement cycle is T+7 days. + +### Related Information +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [How Payment Button Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/how-it-works.md) +- [Payment Button States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/states.md) +- [Quick Pay Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/quick-pay.md) +- [Buy Now Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/buy-now.md) +- [Custom Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/custom.md) +- [Manage Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/manage.md) +- [Prefill Amount Fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/manage/prefill-amount-fields.md) +- [Search for a Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/search.md) +- [View Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/view-reports.md) diff --git a/llm-content/payments/payment-button/faqs.md b/llm-content/payments/payment-button/faqs.md new file mode 100644 index 00000000..8c9f1e29 --- /dev/null +++ b/llm-content/payments/payment-button/faqs.md @@ -0,0 +1,173 @@ +--- +title: Payment Button | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Payment Button. +--- + +# Frequently Asked Questions (FAQs) + +## Supported Platforms + + +### 1. Can I embed the Payment Button on my website even if it is built on a platform such as Wix or Blogger? + + Yes, you can embed Razorpay Payment Button on custom-built websites as well as those built on popular platforms such as Weebly, Wix, Blogger, Google Sites and so on. + + + +### 2. Can I embed the Payment Button on my mobile app? + + You will be able to embed the button on mobile apps, provided: + - The app-development platform supports JS. + - The app is able to make the Button open in a WebView. + + +## Customise Button + + +### 1. How can I add my business logo on the Checkout modal that appears once the button is clicked? + + To make your your business logo appear on the Checkout modal: + 1. In the ** Dashboard**, navigate to **Account & Settings**. + 2. Under **Account & Settings**, in the **Your Logo** section, click **Choose File**. + 3. Upload the logo file. Ensure that the logo is a square image of minimum dimensions 256x256 px. Maximum file size allowed is 1MB. + + + +### 2. How can I make the Payment Button and Checkout elements reflect my brand colors? + + You can make the Payment Button and Checkout elements appear in your brand colours. To do this: + 1. In the ** Dashboard**, navigate to **Account & Settings**. + 2. Under **Account & Settings**, in the **Theme Color** section, enter the HEX code for your brand. For example, `#6822CC`. + 3. Click **Save Changes**. + + Once this is done, during button creation ensure that in the **Button Details** section, you select **Brand Color** in **Button Theme** field. + + +## Amount Field Configuration + + +### 1. I want to add a quantity counter for the amount field created on the Payment Button. How do I add it? + + While creating the amount field, ensure that you select `Item with Quantity` as the type. This adds the quantity counter, which the customer can use to add or reduce quantity. If you have already created the amount field without this option, you must delete the field and recreate it with `Item has quantity` type selected. + + + +### 2. I want to create an amount field wherein customers can enter an amount of their choice. How do I do this? + + While creating the amount field, select the `Customers Decide Amount` type. Once the button is published, in the customer view, the field appears with a blank space where the customer can enter the amount. + + + +### 3. One of the amount fields (items) is out of stock. How do I update the stock level? + + You can update the stock in two ways: + + **List of Payment Button:** + + 1. Log in to your Dashboard, navigate to **Payment Button** and click the relevant Id. The items appear on the top of the page, on the right. + 1. Click **Update Stock** and enter the number of units available for sale in the field. + 1. Click **Update**. + + **Payment Button Edit Mode:** + + 1. Log in to your Dashboard, navigate to **Payment Button** and click the relevant Id. + 2. Click the edit icon. + 3. In the **Amount Details** section, go to the amount field and click the edit icon. + 4. Enter the number of units available for sale in the field. + 5. Click **Add**. + + + +### 4. What happens to my Payment Button if all the listed price fields (items) go out of stock? + + This depends on the amount field's configuration. If the amount field is **mandatory**, then when it goes out-of-stock, the Payment Button will become inactive. Customers would not be able to access this button to make payments. + + As long as there is at least one amount field (mandatory or optional) that has stock, the button remains active. + + + +### 5. Can I have two amount fields with different currencies appear in a single Payment Button? + + No, you cannot configure amount fields to have different currencies. When you attempt to configure the second amount field with a different currency, a message appears on the screen highlighting that only one currency can be applied. + + +## Embed Code + + +### 1. How to embed the payment button on my website? + + You can embed the payment button on your website to collect payments from your customers. + + To do this: + 1. Go to ** Dashboard** → **Payment Button**. + 2. In the list that appears, navigate to the relevant button and copy the button code. + 3. In your website code, paste this code on the page where you want the payment button to appear. + + +## Payments and Payment Methods + + +### 1. How do I track the payments made by customers? When will the amount be settled to my account? + + You can view the payments as and when they are made in the [Transactions Details View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/view-reports.md) of the Payment Button. + + You will receive the payments in your bank account as per the settlement cycle. By default, this is T+2 for domestic payments and T+7 for international payments. + + + +### 2. What payment methods can customers use to make payments? Can I display additional payment methods? + + All the payment methods enabled for your account are displayed on the Checkout. The default payment methods available are: + + - Cards + - Netbanking + - UPI + - Wallet (PayZapp) + + Raise a request on the Dashboard to display more [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md#request-for-payment-methods-and-support) on Checkout. + + + +### 3. What is the maximum payment amount allowed per transaction on a Payment Button? + + cBy default, a customer can make a maximum payment of ₹5,00,000. This can be raised by raising a request with [Razorpay Support](https://razorpay.com/support/#request). + + + +### 4. Can I accept payments in international currency? + + You can accept payments in international currency using Payment Button. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Follow these steps: + 1. Raise a request with [Razorpay Support](https://razorpay.com/support/#request) to enable international payments for your account. + 2. While creating the Payment Button, click the currency drop-down in the amount field and select the required currency. + + +> **INFO** +> +> +> **One Currency per Button** +> +> You can set only one currency for amount fields on a Payment Button. If you attempt to configure the second amount field with a different currency, a message appears on the screen highlighting that more than one currency cannot be applied. +> + + + + +### 5. Can I create Payment Button for bulk products? + + No, Razorpay does not support creating a Payment Button for bulk products. + + +## Adding Redirects + + +### 1. Can I get this Payment Button to redirect to a different page? + + You can redirect your customers to another page after they complete a payment. + + To redirect your customers: + + 1. On the **Button Created Successfully** pop-up page, click **Configure** against **Redirect URL and Custom Message**. + 2. On the pop-up page, enable **Redirect URL**. + 3. Add the redirect URL in the field. + 4. Click **Save**. diff --git a/llm-content/payments/payment-button/glossary.md b/llm-content/payments/payment-button/glossary.md new file mode 100644 index 00000000..89c827b5 --- /dev/null +++ b/llm-content/payments/payment-button/glossary.md @@ -0,0 +1,21 @@ +--- +title: Payment Button | Glossary +heading: Glossary +description: Check the frequently used terms and their definitions related to Razorpay Payment Button. +--- + +# Glossary + +The following table lists all the commonly used terms and their definitions used in Payment Button: + +Terms | Description +--- +Fixed Amount | A price field where you decide the amount a customer should pay. +--- +Item with Quantity | A price field with a quantity selection widget which facilitates the purchase of multiple quantities. +--- +80G | The Section **80G** of the IT Act allows donations made to specified relief funds and charitable institutions as a deduction from gross total income before arriving at taxable income. +--- +Stock | The goods or merchandise stored with the business in a warehouse or a storage facility. +--- +Expiry Date | The Expiry Date is the date after which the customer cannot pay using the Payment Button. diff --git a/llm-content/payments/payment-button/how-it-works.md b/llm-content/payments/payment-button/how-it-works.md new file mode 100644 index 00000000..84ee7263 --- /dev/null +++ b/llm-content/payments/payment-button/how-it-works.md @@ -0,0 +1,44 @@ +--- +title: How Payment Button Works +description: Create Razorpay Payment Button and accept payments from customers on your website. +--- + +# How Payment Button Works + +Given below is a complete end-to-end flow about how you can use Razorpay Payment Button to accept payments. + +![](/docs/assets/images/payment-button-payment-button-working.jpg) + +## Payment Button Workflow + +To use Payment Button to accept payments: + +### 1. Sign Up for a Razorpay Account + +To create a Payment Button, you first need to set up your [Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md). If you already have an account, log in to the Dashboard and click **Payment Button**. + +### 2. Select a Template or Create from Scratch + +Click **Create Payment Button** and select a template. Know more about [templates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/quick-pay.md#step-1-select-a-template). + +### 3. Add Button Details + +Add the button details. For example, you can add title, button type and so on. Know more about [adding button details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/quick-pay.md#21-button-details). + +### 4. Add Customer Details + +Configure the input fields. For example, you can add email details, add a name field and so on. Know more about [adding customer details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/quick-pay.md#22-customer-details). + +### 5. Embed Payment Button on your Website and Start Accepting Payments + +Add the hyperlink to your website. When customers click on the **Pay** button, they will be redirected to the Razorpay Payment Gateway to complete the payment. Know more about [embedding the Payment button to a website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/quick-pay.md#embed-payment-button-code-in-website). + +### Related Information +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [Payment Button States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/states.md) +- [Quick Pay Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/quick-pay.md) +- [Buy Now Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/buy-now.md) +- [Donations Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/donations.md) +- [Custom Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/custom.md) +- [Manage Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/manage.md) +- [Search for a Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/search.md) diff --git a/llm-content/payments/payment-button/manage.md b/llm-content/payments/payment-button/manage.md new file mode 100644 index 00000000..b0146047 --- /dev/null +++ b/llm-content/payments/payment-button/manage.md @@ -0,0 +1,103 @@ +--- +title: Manage Payment Buttons +description: Edit, duplicate and update stock for a Payment Button. +--- + +# Manage Payment Buttons + +You can perform the following edit functions on a Payment Button: + + +### Edit Payment Button + + + + Watch this video to see how to modify a Payment Button. + + +[Video: https://www.youtube.com/embed/Hpra8-ZVcg4] + + + + To modify a Payment Button: + 1. Log in to the Dashboard and navigate to **Payment Button**. + + 2. Click the Payment Button link that you want to modify. + 3. Click the edit icon in the top-right corner of the page. + 4. The button appears in edit mode. You can now edit any of the fields to update the details, including the amount fields. + + + + +### Configure Payment Receipt and Post Payment Message + + You can configure payment receipts to be sent to the customers after they complete the payment. Also, you can display a customised payment at Checkout upon payment completion. + + To configure payment receipt: + 1. Log in to the Dashboard and navigate to **Payment Button**. + 2. Click the Payment Button link that you want to modify. + 3. Click the settings icon in the top-right corner of the page. + 4. Click **Post Payment Actions**. The **Button Settings** tab appears. + 5. Enable **Show a custom message** and add the custom message you want to display on the payment receipt. + 6. Enable **Redirect URL** and add the redirect URL. + 7. Click **Save**. + + + +### Duplicate Button + + You can create a duplicate of the Payment Button and modify it as per requirements. This saves you the time of creating a similar button from scratch. + + + + Watch this video to see how to create a duplicate of a Payment Button. + + +[Video: https://www.youtube.com/embed/jMu5by9r02Q] + + + + To duplicate a Payment Button: + + 1. Log in to the Dashboard and navigate to **Payment Button**. + 2. Click the Payment Button link that you want to duplicate. + 3. Click the duplicate icon in the top-right corner of the page. + 4. Make changes, if required, in the duplicate copy of the Payment Button. + 5. Click **Create Button**. + + + + +### Update Stock + + You can update the stock quantity of an amount field. For example `Hand-painted Coffee Mugs - Set of 4`, in the edit mode of the Payment Button. + + + + Watch this video to see how to Update Stock for a Payment Button. + + +[Video: https://www.youtube.com/embed/c5_Xouz4vJc] + + + + To update stock: + 1. Navigate to **Payment Button** on the Dashboard. + 2. Click the Payment Button link that you want to modify. + 3. In the top-right corner, the different amount fields are displayed. Click **Update Stock** against the relevant amount field. + 4. You can either make the stock quantity unlimited using **No Limit**, or enter a value in the text box given below. + 5. Click **Save**. + + +### Related Information +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [How Payment Button Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/how-it-works.md) +- [Payment Button States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/states.md) +- [Quick Pay Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/quick-pay.md) +- [Buy Now Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/buy-now.md) +- [Donations Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/donations.md) +- [Custom Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/custom.md) +- [Prefill Amount Fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/manage/prefill-amount-fields.md) +- [Search for a Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/search.md) +- [View Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/view-reports.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/subscribe-to-webhooks.md) diff --git a/llm-content/payments/payment-button/manage/prefill-amount-fields.md b/llm-content/payments/payment-button/manage/prefill-amount-fields.md new file mode 100644 index 00000000..6af3f102 --- /dev/null +++ b/llm-content/payments/payment-button/manage/prefill-amount-fields.md @@ -0,0 +1,275 @@ +--- +title: Prefill Amount Fields in Payment Button +description: Configure to prefill the amount fields of the Payment Button. +--- + +# Prefill Amount Fields in Payment Button + +You can prefill the amount fields present in your Payment Button. This provides a better user experience for your customers. + +## Prefill Item Quantity + +You can set a particular item quantity for a product. + + +### Example + + Let us assume you want to sell `smartphone cases` for . You create a Payment Button titled `Cool Smartphone Cases` to sell the product. You can ensure that when the customer clicks the Payment Button, the quantity to be purchased appears pre-selected as `1`. + + + +### Steps + + + + Watch this video to see how to add Prefilled Item Quantity. + + +[Video: https://www.youtube.com/embed/WI-RvmqWMmA] + + + + To add prefilled item quantity field: + + 1. Log in to the Dashboard and create a Payment Button titled **Cool Smartphone Cases**. Ensure you select the `Buy Now` button type. + 2. In the **Amount Details** section, create an amount field called `Smartphone Case` using `Item with Quantity` as the field type. + 3. Configure the **Customer Details** section as required. + 4. **Create** the Payment Button. + 5. Here is a sample embed code. Copy the embed code to add the Payment Button. + + ```xml: Button Embed Code + + ``` + 6. When you embed the button code on your website, add the following parameter: + + ```js: Amount Field Parameter + data-prefill.amount.smartphone_case="1" + ``` + The parameter structure is explained below: + + + Field Name | Amount Field Label | Value + --- + data-prefill.amount | .smartphone_case | 1 + + + +> **INFO** +> +> +> **Handy Tips** +> - Ensure that the field-level validations are in place. If you enter a character in the `amount` field, say `100` or `Hundred`, the field will not get populated. +> - If the amount field label consists of two words, add an underscore as a separator of two words. For example, the two words in the **Smartphone Case** field should be separated by an underscore. That is, `smartphone_case`. +> - If the item is out of stock or has less quantity available, though the field will appear prefilled, the customer will not be able to purchase the product. +> + + The updated embed code looks like this: + + ```xml: Updated Button Embed Code + + + ``` + + This ensures that the `Smartphone Case` item quantity will always appear prefilled as `1`. + + + + #### Test the Code + + Click the button below to open the Embed Code testing tool and test the code. + + [Test Embed Code](https://cdn.razorpay.com/static/widget/test-payment-button.html) + + The following screenshot shows the preselected quantity: + ![Prefill Quantity of an Item](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-prefill-prefilled-quantity.jpg.md) + + + + +## Pre-select Fixed Amount Field + +You can add a fixed amount field which gets added during checkout when the user selects a product. + + +### Example + + Let us continue with the smartphone case example. Assume you also provide gift wrapping services at a fixed cost of . You want to ensure that this field appears pre-selected during Checkout. + + + +### Steps + + + + Watch this video to see how to add a Fixed Amount Field. + + +[Video: https://www.youtube.com/embed/kGC8hzPUADs] + + + + To pre-select Fixed Amount field: + + 1. Log in to the Dashboard and create a Payment Button titled **Cool Smartphone Cases**. Ensure you select the `Buy Now` button type. + 2. In the **Amount Details** section, create an amount field called `Gift Wrap` using `Fixed Amount` as the field type. This should be an **optional** field. + 3. Configure the **Customer Details** section as required. + 4. **Update** the Payment Button. + 5. Here is a sample embed code. Copy the embed code. + + ```xml: Button Embed Code + + + ``` + + 6. When you embed the button code on your website, add the following parameter: + + ```js: Amount Field Parameter + data-prefill.amount.gift_wrap="1" + ``` + + The parameter structure is explained below: + + + Field Name | Amount Field Label | Value + --- + `data-prefill.amount` | `.gift_wrap` | 1 + + + +> **INFO** +> +> +> **Handy Tips** +> +> - Ensure that the field-level validations are in place. If you enter a character in the `amount` field, say `100` or `Hundred`, the field will not get populated. +> - If the amount field label consists of two words, add an underscore as a separator of two words. For example, the two words in the **Gift Wrap** field should be separated by an underscore. That is, `gift_wrap`. +> - Ensure that the field is marked optional. +> - If the item is out of stock or has less quantity available, though the field will appear prefilled, the customer will not be able to purchase the product. +> + + The updated embed code looks like this: + + ```xml: Updated Button Embed Code + + + ``` + + This ensures that the `Gift Wrap` amount field will appear pre-selected when customer opens Checkout. + + + + #### Test the Code + + Click the button below to open the Embed Code testing tool and test the code. + + [Test Embed Code](https://cdn.razorpay.com/static/widget/test-payment-button.html) + + The following screenshot shows the preselected fixed amount field: + ![Prefill Fixed Amount Field](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-prefill-prefilled-fixed-amount.jpg.md) + + + + +## Prefill Customer Decides Amount Field + +You can add a field with a pre-filled amount value which the customer can also edit. + + +### Example + + + + Suppose you are the director of an NGO that is raising funds for flood relief. Apart from the relief packages such as sanitation kits (worth ₹750) and dry ration kits (worth ₹1000), you are adding a field to collect cash. + + You want to prefill the `Cash` field for donors. And, you want to show as a suggested donation amount. Donors can donate this amount, , or change the amount and then pay. + + + + + + + + +### Steps + + + + Watch this video to see how to add a Prefilled amount value which the customer can edit. + + +[Video: https://www.youtube.com/embed/R3fzRlu1dYQ] + + + + + + 1. Log in to the Dashboard and create a Payment Button titled **Contribute to Assam Flood Relief**. Select the `Donations` button type. + 2. In the **Donation Amount** section, create an amount field called `Cash`. + 3. Configure the **Customer Details** section as required. + 4. **Publish** the Payment Button. + 5. Here is a sample embed code. Copy the embed code. + + ```xml: Button Embed Code + + + ``` + + 6. When you embed the button code on your website, add the following parameter: + + ```js: Amount Field Parameter + data-prefill.amount.cash="500" + ``` + + The parameter structure is explained below: + + + Field Name | Amount Field Label | Value + --- + `data-prefill.amount` | `.cash` | 500 + + + +> **INFO** +> +> +> **Handy Tips** +> +> - Ensure that the field-level validations are in place. If you enter a character in the `amount` field, say `100` or `Hundred`, the field will not get populated. +> - If you are using a custom field name for amount, ensure that the field name is entered in lowercase and is separated by an underscore. For example, if the amount field name is `Cash Funds`, enter the suffix as `cash_funds`. +> - Pre-population of the amount field is subject to the Minimum and Maximum Input Price set for the amount field. For example, if the Maximum Input Price has been set as , the Cash field cannot be prefilled with a value higher than . +> + + The updated embed code looks like this: + + ```xml: Updated Button Embed Code + + + ``` + + This ensures that the `Cash` amount field will appear prefilled with an amount of ₹500 when the customer opens Checkout. + + #### Test the Code + + Click the button below to open the Embed Code testing tool and test the code. + + [Test Embed Code](https://cdn.razorpay.com/static/widget/test-payment-button.html) + + The following screenshot shows the prefilled editable amount field: + ![Prefill Fixed Amount Field](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-prefill-prefilled-donations-amount.jpg.md) + + + + + + +### Related Information + +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [How Payment Button Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/how-it-works.md) +- [Payment Button States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/states.md) +- [Quick Pay Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/quick-pay.md) +- [Buy Now Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/buy-now.md) +- [Donations Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/donations.md) +- [Custom Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/custom.md) +- [Manage Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/manage.md) +- [Search for a Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/search.md) diff --git a/llm-content/payments/payment-button/quick-pay.md b/llm-content/payments/payment-button/quick-pay.md new file mode 100644 index 00000000..0c6dbb9a --- /dev/null +++ b/llm-content/payments/payment-button/quick-pay.md @@ -0,0 +1,260 @@ +--- +title: Quick Pay Button +description: Create a Quick Pay Button and accept a fixed amount as payment. +--- + +# Quick Pay Button + +You can create a Quick Pay Button using the Dashboard and embed it on your website to accept payments from customers. This is useful in cases where you want to accept a fixed amount as payment. + +**Example** + +Suppose you are a digital marketing expert who wants to conduct a paid 2-hours online session. You can embed the Quick Pay button on your blog site to charge for the session. Assume you will be charging ₹499 per attendee. + +## Prerequisites +- [Set up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#sign-up) your Razorpay account. +- Log in to the Dashboard. +- The Dashboard has [test and live modes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/test-live-modes.md). Payment Buttons created in the test mode do not appear in the live environment. **You must create a new Payment Button in live mode**. + +## Create a Quick Pay Button + +Watch this video to see how to create a Quick Pay button. + +[Video: https://www.youtube.com/embed/jL53W3mb3D8?si=jj7XMGid-HU4fy7y] + +Below are the steps to create a Quick Pay button: + +1. [Select a Template](#1-select-a-template) +2. [Add Button Details](#2-add-quick-pay-button-details) + +### 1. Select a Template + +1.1 Log in to the Dashboard. + +1.2 Go to the **PAYMENT PRODUCTS** section and click **Payment Button**. + ![Dashboard - Payment Buttons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-payment-button-dashboard.jpg.md) + +1.3 Click **+ Create Payment Button**. + +1.4 On the **Button Creation Wizard**, select the **Quick Pay** button. + ![Payment Button types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-quick-pay-quick-pay-1.jpg.md) + +1.5 Click **Use this template**. + +### 2. Add Quick Pay Button Details + +Configure these sections to create the Payment Button: + + +### 2.1 Button Details + + On the **Button Details** pop-up page, enter the relevant information: + 1. **Title**: Provide a name for the button. This name is for your internal reference and appears on the Dashboard. It **will not be visible** to your customers. For example, **Digital Marketing for Generation Z**. + 2. **Button Type**: If you want to change the button type, click the drop-down list and select one of the types. If the button type is switched mid-way, any information entered during creation will not be saved. + 3. **Amount**: Enter the amount to be paid by the customer. + 4. **Button Label**: The text on the button to be displayed to customers. Please enter alphanumeric characters only. The maximum character limit is 20. For example, your button label can be **Book My Seat**. + 5. **Button Theme**: You can choose between the following themes: + - Razorpay Dark + - Razorpay Light + - Razorpay Outline + - Brand Color (This is the color configured by you on the Dashboard) + 6. Click **Next**. + + + ![Payment Button Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-quick-pay-button-details.jpg.md) + + + + + + +### 2.2 Customer Details + + In the **Customer Details** section, configure the information that must be entered by the attendee while making the payment. By default, `Email` and `Phone` must be entered. However, you can edit the labels of these fields. + + + ![Payment Button - Customer Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-quick-pay-customer-details-1.jpg.md) + + + #### Custom Fields + + If you want to collect more details from the customer, you can add custom fields. + + To add custom fields: + + 1. Click **+ Add Another Input Field**. From the drop-down list that appears, select the relevant field type. For example, if you want the customer to enter their name, select **Single Line Text**. + 2. On the pop-up page: + 1. Enter the label for the custom field. For example, `Name`. + 2. If required, add a description for the field. + 3. Select **Optional Item**. + ![Customer Details - Field Type](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-quick-pay-customer-details-2.jpg.md) + 4. Click **Save**. + 3. To proceed, click **Save**, and then **Next**. + + + ![Customer Details entered](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-quick-pay-customer-details-3.jpg.md) + + + The data entered by the customers will be available in the Transaction Details report. + + + +### 2.3 Review and Create + + + 1. Review the details entered in the previous sections. You can click **Back** to navigate to the **Button Details** and **Customer Details** section to make changes. + + 2. Click **Create Button**. + + + + ![Payment Button - Review and Create](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-quick-pay-review.jpg.md) + + + + 3. After completing the steps, the button code appears. Copy this code and add it in your webpage. + + + ![Payment Button created successfully](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-pb-success.jpg.md) + + + + + +## Embed Payment Button Code in Website + +The embed code generated on the Dashboard must be embedded in your website. After this is done, the Buy Now button appears on your website. + +Customers can click this button to: +1. Open Razorpay Checkout. +2. Select the products. +3. Add their name and address. +4. Complete the payment. + +You can embed this code on any webpage, be it a custom HTML site or one built on platforms such as WordPress, Wix or Google Sites. + + +### Example + + Let us embed the Buy Now button on an HTML page. + + 1. Create a blank HTML file on your system. + 2. Paste the embed code onto the page. + 3. Save this HTML page and open it on the browser. + + Your button is now been embedded in your website. + + + ![Embed Payment Button Code GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-embed-min.gif.md) + + + +## Make Test Payments Using the Payment Button + +To make a test payment using a payment button: + +1. Select the payment button you wish to test from the Dashboard and click **Get Code**. +2. Click **Copy Code** to copy the code to your clipboard. + ![Payment Button Code Selection](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-button-code-select.jpg.md) +3. Test the Payment Button by adding the code to the [Payment Button Test Widget](https://cdn.razorpay.com/static/widget/test-payment-button.html). +4. Paste the code in the text box and click **Run Code**. +5. Click on the Payment Button that appears in the preview section. + ![Payment Button Test Preview](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-run-test-preview.jpg.md) +6. Enter the required details and click **PROCEED TO PAY**. +7. Select the payment method of your choice to proceed with the payment. + + + You can use these [test card details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#test-cards). + + + You can use these [test UPI details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#test-upi-id). + + + You can select any bank for your test payment. Select **Success** or **Failure**, depending on which flow you wish to test. + ![Test Payment Success or Failure Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pl-test-payment-success.jpg.md) + + + +8. You should see a confirmation message depending on the flow you have selected. + ![Payment Success](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-payment-success.jpg.md) + +### Customer Interaction + +Let us make a test transaction to check how you as a visitor can interact with the button on your blog. + +1. Click the **Pay Now** button. +2. Enter name and phone number and fill in the details in the other fields and click **Next**. +3. Select a payment method. For example, netbanking, and complete the payment. +4. The payment success page is displayed and you receive a confirmation email. + +![](/docs/assets/images/payment-button-customerpayment.gif) + +## Post Payment Actions + +After the customer has successfully completed the payment, you can: + + + + + +### Send Payment Receipt + +You can ensure that your customers receive payment receipts via email once they complete the payment. Know how to [ send and download automated or manual payment receipts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/receipt.md). + +If you are an NGO, you can [ send and download payment receipts with 80-G information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/80g-receipt.md). + +### Show Custom Message + +You can show a custom message to your customers once they complete a payment. + +To show custom messages: + +1. On the **Button Created Successfully** pop-up page, click **Configure** against **Redirect URL and Custom Message**. +2. On the pop-up page, enable **Show a custom message**. +3. Add the custom message in the field. +4. Click **Save**. + +![Button Settings custom message](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-custom-message.jpg.md) + +### Add a Redirect URL + +You can redirect your customers to another page after they complete a payment. + +To redirect your customers: + +1. On the **Button Created Successfully** pop-up page, click **Configure** against **Redirect URL and Custom Message**. +2. On the pop-up page, enable **Redirect URL**. +3. Add the redirect URL in the field. +4. Click **Save**. + +![Button Settings redirect URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-redirect.jpg.md) + +## View Transaction Details on Dashboard + +You can view the payments as and when they are made in the [Transactions Details View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/view-reports.md) of the page. + +![](/docs/assets/images/payment-button-buy-now-transaction-detail.jpg) + +## Export Report +You can also export the report data into a CSV file. + +To export report data: +1. Log in to the Dashboard and navigate to **Payment Button**. +2. Select the relevant Payment Button. The Transactions Details View appears. +3. Click **Export All (CSV)** button. + +A .csv file is downloaded, where you can find a monthly report of all the payments made using your button. + +## Settlement +You will receive the payments in your bank account as per the settlement cycle agreed upon at the time of Razorpay account setup. Usually, this is T+2 days. In case of international payments, the settlement cycle is T+7 days. + +### Related Information +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [How Payment Button Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/how-it-works.md) +- [Payment Button States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/states.md) +- [Buy Now Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/buy-now.md) +- [Donations Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/donations.md) +- [Custom Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/custom.md) +- [Manage Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/manage.md) +- [Search for a Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/search.md) +- [View Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/view-reports.md) diff --git a/llm-content/payments/payment-button/receipt.md b/llm-content/payments/payment-button/receipt.md new file mode 100644 index 00000000..adf5097f --- /dev/null +++ b/llm-content/payments/payment-button/receipt.md @@ -0,0 +1,82 @@ +--- +title: Configure Generic Payment Button Receipt +description: Configure automatic and manual payment receipts for the payments made using your Razorpay Payment Button. +--- + +# Configure Generic Payment Button Receipt + +You can share payment receipts with customers through email after they complete payments using the Payment Button. The payment receipts can be generated and shared [Automatically](#automated-receipt) or [Manually](#manual-receipt). + +Here is a sample PDF of the payment receipt. + +![PDF Receipt](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-receipt-example.jpg.md) + +## Automated Receipt + +Automatically generate payment receipts and send them to the customers through email and SMS using the details they provided at the time of payment. An auto-generated reference number is be added by Razorpay. + +Watch this video to see how to configure automated payment receipts. + +[Video: https://www.youtube.com/embed/GOAZ1Q9wWQk] + +To configure automated payment receipts: +1. While creating or editing the Payment Button, select the **Payment Receipts** feature available on the top menu ribbon. +2. On the **Payment Receipts Settings** pop-up page, select **Send Automated Receipts**. +3. You can show an input field such as `Name`, `Address` and its associated value on the Receipt. + 1. Enable the **Show an Input Field on Receipt** feature. + 2. In the drop-down list, select one of the custom input fields such as `Name`, `Address` or `Landmark`, used on the Payment Button. For example, if you select `Name`, the customer's name `Gaurav Kumar` appears on the payment receipt. +4. Click **Save**. + +## Manual Receipt + +You can choose to send payment receipts to your customers manually. In this case, you must manually add a reference number to the receipt and share it with your customers. + +Watch this video to see how to configure manual payment receipts. + +[Video: https://www.youtube.com/embed/HiPcouqoj4c] + +To configure manual payment receipts: + +1. On the Payment Button creation pop-up page, select the **Payment Receipts** feature available on the top menu ribbon. +2. On the **Payment Receipts Settings** pop-up page, select **Send Manual Receipts**. +3. You can show an input field such as `Name`, `Address` and its associated value on the Receipt. + 1. Enable the **Show an Input Field on Receipt** feature. + 2. In the drop-down list, select one of the custom input fields such as `Name`, `Address` or `Landmark`, used on the Payment Button. For example, if you select `Name`, the customer's name `Gaurav Kumar` appears on the payment receipt. +4. Click **Save**. +5. Navigate to the page's **Transactions Details** section. All the payments made using the Payment Button are listed here. + ![Transaction Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-pp-transactions-send.jpg.md) +6. Click the Payment ID to view the payment details. +7. In the **Payment Receipt** field, click the **Send Receipt** button. +8. Enter a reference number for the receipt as per your business requirements. + ![Transaction Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-pp-manual-ref.jpg.md) +9. Click **Send**. + + +### Resend and Download Payment Receipt + + + +Watch this video to see how to resend and download a payment receipt. + +[Video: https://www.youtube.com/embed/me-gVlb09cQ] + +To resend and download a payment receipt: +1. Navigate to the button's **Transactions Details** page. All the payments made using the Payment Button are listed here. +2. Click on the Payment ID to view the payment details. +3. In the **Payment Receipt** field, click the **Send** button. This will resend the receipt to the customer. +4. You can download the payment receipt using the **Download** button. + + + + +### Email Notification to Customers + +Payment receipts are sent to customers via email as a PDF attachment. The details entered by the customer while making the payment also appear on the email body as shown below: + +![Payment Receipt](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-email-non80g.jpg.md) + + + +### Related Information + +[Configure 80G-enabled Payment Button Receipt](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/80g-receipt.md) diff --git a/llm-content/payments/payment-button/search.md b/llm-content/payments/payment-button/search.md new file mode 100644 index 00000000..bbced217 --- /dev/null +++ b/llm-content/payments/payment-button/search.md @@ -0,0 +1,31 @@ +--- +title: Search a Payment Button +description: Search for a Payment Button on the Razorpay Dashboard. +--- + +# Search a Payment Button + +You can search for a Payment Button on the Dashboard by specifying various filters. + +To search for a Payment Button: + + +1. Log in to the Dashboard. +2. Select **Payment Button** from the left menu and search for a payment button under **Payment Button** by specifying filters. + +![Payment Button List](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-payment-button-search.jpg.md) + +Filter | Description +--- +Title | The title of the payment button. +--- +Status | The state of the payment button. Know more about [Payment Button states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/states.md). + +### Related Information +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [How Payment Button Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/how-it-works.md) +- [Payment Button States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/states.md) +- [Quick Pay Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/quick-pay.md) +- [Buy Now Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/buy-now.md) +- [Donations Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/donations.md) +- [Custom Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/custom.md) diff --git a/llm-content/payments/payment-button/states.md b/llm-content/payments/payment-button/states.md new file mode 100644 index 00000000..932bdc64 --- /dev/null +++ b/llm-content/payments/payment-button/states.md @@ -0,0 +1,27 @@ +--- +title: Payment Button States +description: List of states of a Payment Button and their significance. +--- + +# Payment Button States + +A Payment Button can have two states, **Active** and **Inactive**. + +## Payment Button States and Descriptions + +Given below is an illustration of the life cycle of a Payment Button: + +![Cycle of Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-pp-states.jpg.md) + +The following table lists the various states of a Payment Button and gives a brief description of each state: + +Status | Description | Next Steps +--- +Active | Indicates the Payment Button is created and saved. You can accept payments using this button. You can edit this button. | Customers can start making payments through this Payment Button. +--- +Inactive | Indicates the Payment Button is deactivated or is expired. You cannot accept payments using this button. | Customers can no longer make payments through this Payment Button. You can reactivate the Payment Button to start accepting payments. There are two ways to reactivate the Payment Button:- [Update Stock](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/manage.md#update-stock) +- Click the **Reactivate** button. + +### Related Information +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [How Payment Button Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/how-it-works.md) diff --git a/llm-content/payments/payment-button/subscribe-to-webhooks.md b/llm-content/payments/payment-button/subscribe-to-webhooks.md new file mode 100644 index 00000000..0617f7cd --- /dev/null +++ b/llm-content/payments/payment-button/subscribe-to-webhooks.md @@ -0,0 +1,32 @@ +--- +title: Payment Button | Subscribe to Webhooks +heading: Subscribe to Webhooks +description: Subscribe to various webhook events related to Payment Button to receive instant notifications. +--- + +# Subscribe to Webhooks + +Subscribe to webhook events relevant to Payment Buttons. + +To subscribe to webhook events: +1. Log in to the Dashboard. +2. Navigate to **Account & Settings** → **Webhooks** to subscribe to any of the events mentioned in the following section. + +## Webhook Events and Descriptions + +Webhook Events | Description +--- +payment.authorized | Triggered when a payment is authorized. +--- +payment.captured | Triggered when a payment is successfully captured. +--- +payment.failed | Triggered when a payment fails. +--- +order.paid | Triggered when an order is successfully paid. + +Know more about [ Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) and check the [sample payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md). + +### Related Information + +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [How Payment Button Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/how-it-works.md) diff --git a/llm-content/payments/payment-button/subscription-buttons.md b/llm-content/payments/payment-button/subscription-buttons.md new file mode 100644 index 00000000..f5a38dc2 --- /dev/null +++ b/llm-content/payments/payment-button/subscription-buttons.md @@ -0,0 +1,44 @@ +--- +title: About Subscription Button +description: Create Razorpay Subscription Button and embed it on your website to accept recurring or one time payments from customers. +--- + +# About Subscription Button + +You can start accepting payments using Razorpay Subscription Button that allows you to accept recurring via subscriptions or one-time payments. You can create Subscription Buttons from the Dashboard using a single line of code that you can embed on your website or blog and display a button. **We support only cards for subscription payments and all payment methods for one-time payments.** + + to get this feature activated on your Razorpay account. + +## Advantages + +- Allows you to collect recurring payments via subscriptions based on the suggested plans. +- Eliminates the time and effort spent in a full-fledged payment gateway integration. +- Makes you go from Create-to-Collect in a matter of minutes. +- Enables you to test changes immediately with the What You See Is What You Get (WYSIWYG) editor. +- Seamlessly flows with your branding guidelines, providing flawless user experience. + +## Use Cases + +Examples of businesses that can use Payment Button to accept payments from customers: + +- **Small Businesses**: A small business that offers service online and accepts subscription payments on their website. +- **Donations**: Charitable Organizations can collect either fixed payments or a plan that is daily or monthly like subscription donations on Give India. +- **Support or Contribute**: Freelancers, consultants, artists and so on. They can use this to accept subscription payments. +- **Media Streaming**: Small news websites and content streaming websites can use this to accept subscription payments from their patrons. + +## Supported Platforms + +Razorpay Subscription Button is supported on the following platforms: + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + + + Web | Android | iOS | Webview + --- + x | x | x | x diff --git a/llm-content/payments/payment-button/subscription-buttons/80g-receipt.md b/llm-content/payments/payment-button/subscription-buttons/80g-receipt.md new file mode 100644 index 00000000..49584056 --- /dev/null +++ b/llm-content/payments/payment-button/subscription-buttons/80g-receipt.md @@ -0,0 +1,95 @@ +--- +title: 80 G-enabled Payment Receipt +description: Configure 80G compliant automatic and manual payment receipts for the payments made using your Razorpay Subscription Button. +--- + +# 80 G-enabled Payment Receipt + +As an NGO using Subscription Button to accept donations from patrons, you can share payment receipts with 80 G details to customers via email once they make the payment. + +## PDF Receipt to Customers + +**Setting Up Payment Receipt**: + +Payment Receipts can be generated and shared: +- [Automatically](#automated-receipt) +- [Manually](#manual-receipt) + +## Automated Receipt + +When you use this feature, the payment receipt will be automatically shared with customers via email and SMS using the details they provided at the time of payment. An auto-generated reference number will be added by Razorpay. + +Follow these steps to configure automated payment receipts: + +1. While creating or editing the Subscription Button, select the **Payment Receipts** feature available on the top menu ribbon. +2. In the **Payment Receipts Settings** modal, select **Send Automated Receipts**. +3. You can show an input field such as `Name`, `Address` and its associated value on the Receipt. To do this: + 1. Enable the **Show an Input Field on Receipt** feature. + 2. In the drop-down list, select one of the custom input fields such as `Name`, `Address` or `Landmark`, used on the Subscription Button. For example, if you have selected `Name`, the patron's name `Gaurav Kumar` will appear on the payment receipt. + + ![](/docs/assets/images/payment-pages-receipt-pp-receipt-80g-setting.gif) + +4. To issue receipts with 80-G details, enable the **Issue 80-G Receipts** option. +5. Use the **Click here** link to add relevant 80-G text to be displayed in the payment receipt. This opens the **Manage 80-G** modal where you can add a description and upload the signature of the authorized signatory. + 1. Enter the description. For example: + + Donation eligible for exemption under 80-G under IT Act 1861 .. with ID DIT(E)/2009-2010/W-110/15XX dated 24.09.2009 + + 2. Upload an image of the signature in the **Authorized Signatory** field and click **Save**. + + ![](/docs/assets/images/payment-pages-receipt-pp-receipt-80g-sign.gif) +6. Click **Save**. + +### Resend and Download Payment Receipt + +Watch this video to see how to resend and download a payment receipt. + +[Video: https://www.youtube.com/embed/me-gVlb09cQ] + +To resend and download a payment receipt: +1. Navigate to the button's **Transactions Details** page. All the payments made using the Payment Button are listed here. +2. Click on the Payment ID to view the payment details. +3. In the **Payment Receipt** field, click the **Send** button. This will resend the receipt to the customer. +4. You can download the payment receipt using the **Download** button. + +## Manual Receipt + +If you choose this option, you must manually add a reference number to the receipt and share it with your customers. + +Follow the steps given below to configure Manual payment receipt: + +1. In the Subscription Button creation screen, select the **Payment Receipts** feature available on the top menu ribbon. +2. In the **Payment Receipts Settings** modal, select **Send Manual Receipts**. +3. You can show an input field such as `Name`, `Address` and its associated value on the Receipt. To do this: + 1. Enable the **Show an Input Field on Receipt** feature. + 2. In the drop-down list, select one of the custom input fields such as `Name`, `Address` or `Landmark`, used on the Subscription Button. For example, if you have selected `Name`, the patron's name `Gaurav Kumar` will appear on the payment receipt. + + ![](/docs/assets/images/payment-pages-receipt-80g-manual-pp-receipt.gif) + +4. To issue receipts with 80-G details, enable the **Issue 80-G Receipts** option. +5. Use the **Click here** link to add relevant 80-G text to be displayed in the payment receipt. This opens the **Manage 80-G** modal where you can add a description and upload the signature of the authorized signatory. + 1. Enter the description. For example: + + Donation eligible for exemption under 80-G under IT Act 1861 .. with ID DIT(E)/2009-2010/W-110/15XX dated 24.09.2009 + 2. Upload an image of the signature in the **Authorized Signatory** field and click **Save**. + + ![](/docs/assets/images/payment-pages-receipt-80g-manual-pp-receipt-sign.gif) + +6. Click **Done**. +7. Navigate to the page's **Transactions Details** screen. All the payments made using the Subscription Button are listed here. + ![](/docs/assets/images/payment-pages-receipt-pp-transactions-send.jpg) + +8. Click the Payment ID to view the payment details. +9. In the **Payment Receipt** field, click the **Send** button. +10. Enter a reference number for the receipt as per your business requirements. + ![](/docs/assets/images/payment-pages-receipt-pp-manual-ref.jpg) + +11. Click **Send**. + +You can resend the receipt using the **Send** button. Also, you can download the payment receipt using the **Download** button. + +## Email Notification to Customers + +Payment receipts are sent to customers via email as a PDF attachment. + +Also, the details entered by the customer on the Subscription Button appear on the email body. diff --git a/llm-content/payments/payment-button/subscription-buttons/advanced-options/add-fb-pixel.md b/llm-content/payments/payment-button/subscription-buttons/advanced-options/add-fb-pixel.md new file mode 100644 index 00000000..432a8e19 --- /dev/null +++ b/llm-content/payments/payment-button/subscription-buttons/advanced-options/add-fb-pixel.md @@ -0,0 +1,32 @@ +--- +title: Add Facebook Pixel in Payment Success Page +description: Add your Facebook Pixel on your payment success page and track payments and conversions from your Facebook advertisements. +--- + +# Add Facebook Pixel in Payment Success Page + +Do you use Razorpay Subscription Buttons to accept recurring payments from customers and redirect them to a success page post payment? Do you also advertise on Facebook and use Facebook Pixel to track conversions? + +If yes, you should integrate Facebook Pixel on your payment success page to track and analyze ad conversion to payments. + +## Prerequisite + +- [Create a Facebook Pixel](https://www.facebook.com/business/help/952192354843755?id=1205376682832142&recommended_by=1700857106877546). +- Create a payment success page on your domain and [add the Facebook Pixel to it](https://www.facebook.com/business/help/952192354843755?id=1205376682832142). + +## Workflow + +Let us assume you are a Internet Service Provider. You attract customers using advertisements on Facebook and attract subscribers on your website using Razorpay Subscription Button. + +To track and measure the effectiveness of these Facebook ads and how many of them convert into purchases, you need to add a redirect from your Subscription Button to this success page. + +To do this: +1. Navigate to your Subscription Button in edit mode, to the **Button Created Successfully** screen. +1. Click **Configure** against **Redirect URL and Custom Message**. +1. In the modal that appears, enable **Redirect URL**. +1. Add the redirect URL in the field. +1. Click **Save**. + +![](/docs/assets/images/payment-button-redirect.jpg) + +Every time a customer successfully completes a payment, they will be directed to the success page. Facebook pixel will track this event. diff --git a/llm-content/payments/payment-button/subscription-buttons/download-reports.md b/llm-content/payments/payment-button/subscription-buttons/download-reports.md new file mode 100644 index 00000000..3260abee --- /dev/null +++ b/llm-content/payments/payment-button/subscription-buttons/download-reports.md @@ -0,0 +1,65 @@ +--- +title: View Details and Download Report +description: View details and download the report of payments received for a specific Subscriptions Button. +--- + +# View Details and Download Report + +After an active Subscription button accepts payments, view its subscriptions and one-time payment details on the Dashboard → **Payment Button** → **Subscription Buttons** tab. + +## View Subscription Button Details + +You can view Subscription button details in three ways: + + + Under the **Subscription Buttons** tab, view the overall details related to Recurring Plans and One-Time Items. + - **Recurring Plans:** Hover the mouse pointer on **Recurring-Plans** and find the **Plan Name** and Number of **Subscriptions** against each plan. + - **One-Time Items:** Hover the mouse pointer on the **One-Time Items** and find the **Item Name** and **Units Sold**. + ![](/docs/assets/images/payment-button-subscription-button-rp-no.jpg) + + + Under the **Subscription Buttons** tab, click on the subscription button under the **Title** column. The button details screen appears. + - Click **Subscription Plans** to view plan details. + ![](/docs/assets/images/payment-button-subscription-button-view-rp.jpg) + - Click **One-Time Payments** to view one-time payments. + ![](/docs/assets/images/payment-button-subscription-button-view-otp.jpg) + + + You can view the complete details of a subscription payment or one-time payment made for a subscription. Scroll to the payments overview tabs. + - View Subscription Payments: To view a Subscription, under the **Subscription Payments** tab, click Subscription Id. + ![](/docs/assets/images/payment-button-subscription-button-sub-id.jpg) + - View One-time Payments: To view One-Time Payments, click **One-Time Payments** tab, and then click Payment Id. + ![](/docs/assets/images/payment-button-subscription-button-one-time-id.jpg) + + +## Download Report + +To download One-Time Payments as a `CSV`, `XLSX` or an `XLS` file: + +1. Log in to the Dashboard and navigate to **Payment Button**. +1. Click the **Subscription Buttons** tab, and then click the specific button. The button details view appears. +1. Scroll down and click **One-Time Payments** tab. +1. Click **Download Report**. + ![](/docs/assets/images/payment-button-subscription-button-export-all.jpg) + +The downloaded report has the following columns: + - Payment Button ID + - Payment Button Title + - Payment Date + - Order ID + - Item Name + - Item Amount + - Item Quantity + - Item Payment Amount + - Total Payment Amount + - Currency + - Payment Status + - Payment Id + - Email + - Phone + - Name + +### Related Information + +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [Subscription Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/subscription-buttons.md) diff --git a/llm-content/payments/payment-button/subscription-buttons/embed.md b/llm-content/payments/payment-button/subscription-buttons/embed.md new file mode 100644 index 00000000..fbd9ae55 --- /dev/null +++ b/llm-content/payments/payment-button/subscription-buttons/embed.md @@ -0,0 +1,68 @@ +--- +title: Create and Embed Subscription Button +description: Create a Subscribe Button and start accepting payments from your customers. +--- + +# Create and Embed Subscription Button + +You can create a Subscription Button via Dashboard and embed it on your website to accept payments from customers. This is useful in cases where you want to provide subscription plans. + +**Example** + +Suppose you are an Internet Service Provider who wants to provide subscription plans to your customers. You can use the Subscription Button on your site to accept payments based on subscription plans. + +## Test Payment Buttons + +You can test the Payment Button by [adding the code to this page](https://cdn.razorpay.com/static/widget/test-payment-button.html). + +## Embed Subscription Button Code in Website + +Copy the HTML Code and embed it in your webpage or one built on platforms such as WordPress, Wix or Google Sites. Once this is done, the Subscription button will appear on your website. + +Customers can click this button to: +1. Open Razorpay Checkout. +2. Select the Recurring Plan. +3. Add their name and address. +4. Complete the payment. + +### Customer Interaction + + +### Subscribe a Plan + + The short animation below shows you how to subscribe a plan. + + ![](/docs/assets/images/payment-button-subscription-button-ci-sb.gif) + + + +### One-time Payment + + The short animation below shows you how to make a one time payment. + ![](/docs/assets/images/payment-button-subscription-button-one-time-pay.gif) + +> **INFO** +> +> +> **Handy Tips** +> +> One-Time payment option is shown only if you enabled **Add one-time payment options** while creating the payment button. + +> ![](/docs/assets/images/payment-button-subscription-button-add-one-time-item.jpg) +> + + + +## View Subscription Details + +You can [View Subscriptions and One-time Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/subscription-buttons/download-reports.md). To download reports, refer to the [Download Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/subscription-buttons/download-reports.md) section. + +### Settlement + +You will receive the payments in your bank account as per the settlement cycle agreed upon at the time of Razorpay account setup. Usually, this is T+2 days. In case of international payments, the settlement cycle is T+7 days. + +### Related Information + +- [Manage Subscription Buttons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/subscription-buttons/manage.md) +- [View Notifications using Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/subscription-buttons/subscribe-to-webhooks.md) +- [Subscription Button FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/subscription-buttons/faqs.md) diff --git a/llm-content/payments/payment-button/subscription-buttons/faqs.md b/llm-content/payments/payment-button/subscription-buttons/faqs.md new file mode 100644 index 00000000..f0d3e1d5 --- /dev/null +++ b/llm-content/payments/payment-button/subscription-buttons/faqs.md @@ -0,0 +1,125 @@ +--- +title: Subscription Button | FAQs +heading: FAQs +description: Find answers to frequently asked questions about Razorpay Subscription Button. +--- + +# FAQs + +Here are some frequently asked questions about Subscription Button. + +## General + +#### 1. How can I enable Subscription Buttons? + +To access Subscriptions Buttons feature, you must: +- Ensure the Subscriptions product is available for your account. +- Raise a request with [Support team](https://razorpay.com/support/) to enable Subscriptions Button. + +#### 2. Does this Subscription Buttons support only subscriptions? + +This will support both Recurring and One-time payments. We support only cards for recurring payments and all payment methods for one-time payments. + +#### 3. Can I generate a custom receipt on every charge? + +Currently, we do not support customized receipt. However, you can generate a subscription receipt on every charge. + +#### 4. How can I download reports? + +Currently, we support only one-time payments reports as a CSV file. Follow these steps to download: +1. Navigate to Payment Button on the Dashboard. +1. Click the **Subscription Buttons** tab, and then click the required button. The button details view appears. +1. Scroll down, and then click **One-Time Payments** tab. +1. Click **Export All (CSV)**. + +#### 5. Can I update and modify Subscriptions + +Yes, you can update and modify all Subscriptions. + +#### 6. Can I set up a one-time payment subscription button? + +You cannot setup a one-time payment subscription button. For one-time payment, please use [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md). + +## Try it Out + +#### 1. Where can I try out the Button Code? + +You can test the Button Code by [adding the code to this page](https://cdn.razorpay.com/static/widget/test-payment-button.html). + +## Supported Platforms + +#### 1. Can I embed the Subscription Button on my mobile app? + +You will be able to embed the button on mobile apps, provided: +- The app-development platform supports JS. +- The app is able to make the Button open in a WebView. + +## Customize Button + +#### 1. How can I add my business logo on the Checkout modal that appears once the button is clicked? + +To make your your business logo appear on the Checkout modal: +1. In the Dashboard, navigate to **Settings**. +2. Under **Account Settings**, in the **Your Logo** section, click **Choose File**. +3. Upload the logo file. Ensure that the logo is a square image of minimum dimensions 256x256 px. Maximum file size allowed is 1MB. + +#### 2. How can I make the Subscription Button and Checkout elements reflect my brand colors? + +You can make the Subscription Button and Checkout elements appear in your brand colours. To do this: +1. In the Dashboard, navigate to **Settings**. +2. Under **Account Settings**, in the **Theme Color** section, enter the HEX code for your brand. For example, `#6822CC`. +3. Click **Save Changes**. + +Once this is done, during button creation ensure that in the **Button Details** section, you select **Brand Color** in **Button Theme** field. + +## Embed Code + +#### 1. How to embed the Subscription Button on my website? + +You can embed the subscription button on your website to collect payments from your customers. +To do this: +1. Go to Dashboard → **Payment Button**. +2. Click **Subscription Buttons** tab. +3. In the list that appears, navigate to the relevant button and copy the button code. +4. In your website code, paste this code on the page where you want the subscription button to appear. + +## Payments and Payment Methods + +#### 1. How do I track the payments made by customers? When will the amount be settled to my account? + +You can view the payments as and when they are made in the [Transactions Details View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/view-reports.md) of the Subscription Button. + +You will receive the payments in your bank account as per the settlement cycle. By default, this is T+2 for domestic payments and T+7 for international payments. + +#### 2. What payment methods can customers use to make payments? Can I display additional payment methods? + +Currently, we support only Cards for Recurring Payments. +For one-time payments, all the payment methods enabled for your account are displayed on the Checkout. +- Cards +- Netbanking +- UPI +- Wallets + +Raise a request on the Dashboard to display more [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md#request-for-payment-methods-and-support) on Checkout. + +#### 3. Is UPI Autopay payment method supported for Subscription Button? + +Currently, we do not support UPI Autopay for Subscription Button. + +#### 4. What is the maximum payment amount allowed per transaction on a Subscription Button? + +By default, a customer can make a maximum payment of ₹5,00,000. This can be raised by raising a request with [Razorpay Support](https://razorpay.com/support/#request). + +#### 5. Can I accept payments in international currency? + +You can accept payments in international currency using Subscription Button. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Follow these steps: +1. Raise a request with [Razorpay Support](https://razorpay.com/support/#request) to enable international payments for your account. +2. While creating the Subscription Button, click the currency drop-down in the amount field and select the required currency. + +> **INFO** +> +> +> **One Currency per Button** +> +> You can set only one currency for amount fields on a Subscription Button. If you attempt to configure the second amount field with a different currency, a message appears on the screen highlighting that more than one currency cannot be applied. +> diff --git a/llm-content/payments/payment-button/subscription-buttons/manage.md b/llm-content/payments/payment-button/subscription-buttons/manage.md new file mode 100644 index 00000000..a6af5469 --- /dev/null +++ b/llm-content/payments/payment-button/subscription-buttons/manage.md @@ -0,0 +1,162 @@ +--- +title: Manage Subscription Buttons +description: Check the actions you can perform on a Subscription Button. +--- + +# Manage Subscription Buttons + +You can perform multiple actions on the Subscription Buttons. You need to first view the Subscription Button to make changes. + +## View a Subscription Button + +To view a Subscription Button: +1. Navigate to **Payment Button** on the Dashboard. +2. Click the **Subscription Buttons** tab, and then click on the link of the button that you want to modify. +3. The button details appears as shown. + ![](/docs/assets/images/payment-button-subscription-button-button-pl.jpg) + +## Edit Button Content + +To modify the content of the button: +1. In the top right corner of the page, click **Edit Icon**. +2. The button appears in edit mode. You can edit any of the fields to update the details. + +![](/docs/assets/images/payment-button-subscription-button-edit-button.jpg) + +## Duplicate Button + +You can create a duplicate of the Subscription Button and modify it as per requirements. This saves you the time of creating a similar button from scratch. + +To duplicate the button: +1. In the top-right corner of the page, click **Duplicate Icon**. +2. The button appears in edit mode. You can edit the fields to create a new button. + +![](/docs/assets/images/payment-button-Duplicate-payment-button-1.jpg) + +## Add Post Payment Message + +You can display a customized payment message on Checkout upon payment completion. + +To add a payment message: +1. In the top right corner of the page, click **Settings Icon**, and then click **Post Payment Message**. + ![](/docs/assets/images/payment-button-subscription-button-post-payment-msg.jpg) + +2. In the **Button Settings** pop-up, select **Show custom message after a payment** checkbox. +3. Add the custom message in the text box. +4. Click **Save**. + +![](/docs/assets/images/payment-button-subscription-button-button-setttings.jpg) + +## Search + +You can search Subscription Buttons, Recurring Payments and One-Time Payments. + + + To search Subscription Buttons: + 1. Navigate to **Payment Button** on the Dashboard, and then click the **Subscription Buttons** tab. + 2. Enter the title of the button in **Title** text box. + 3. Select the **Status** from the list. + 4. Click **Search**. + ![](/docs/assets/images/payment-button-subscription-button-search-sub-button.jpg) + + + To search Recurring Payments: + 1. Navigate to **Payment Button** on the Dashboard, and then click the **Subscription Buttons** tab. + 2. Click the link of the button that you want to view. + 3. Enter the subscription id in the **Subscription Id** text box. + 4. Enter the other values as appropriate. + 5. Click **Search**. + ![](/docs/assets/images/payment-button-subscription-button-search-recurring-payments.jpg) + + + To search One-Time Payments: + 1. Navigate to **Payment Button** on the Dashboard, and then click the **Subscription Buttons** tab. + 2. Click the link of the button that you want to view. + 3. Enter the payment id in the **Payment Id** text box. + 4. Enter the other values as appropriate. + 5. Click **Search**. + ![](/docs/assets/images/payment-button-subscription-button-search-one-time-payments.jpg) + + +## Statuses + +You can view the statuses of Subscription Button, Recurring Payments and One-Time Payments. + + + Following are the different statuses of the Subscription Buttons: **Active** and **Inactive**. + + To view the status of a Subscription Button: + 1. Navigate to **Payment Button** on the Dashboard, and then click the **Subscription Buttons** tab. + 2. View the status of a button against each Subscription Button under the **Status** column. + ![](/docs/assets/images/payment-button-subscription-button-sub-button-status.jpg) + 3. Click the Subscription Button to view Recurring Payments and One-Time Payments Statuses. + + + Following are the different statuses of Recurring Payments Subscriptions: + - Created + - Authenticated + - Active + - Pending + - Halted + - Cancelled + - Completed + - Expired + - Paused + + Scroll down, and then check the Status against each Subscription Id. + ![](/docs/assets/images/payment-button-subscription-button-rp-status.jpg) + + + Following are the different statuses of One-Time Payments: + - Authorized + - Captured + - Refunded + - Failed + + 1. Scroll down, and then click **One-Time Payments** tab. + 2. Check the status against each Payment Id. + ![](/docs/assets/images/payment-button-subscription-button-ot-status.jpg) + + +## Modify Recurring Payments + +To view Recurring Payments Subscription: +1. Navigate to **Payment Button** on the Dashboard, and then click the **Subscription Buttons** tab. +2. Click the link of the button that you want to view. +3. Scroll down, and then click the Subscription Id which you want to modify. + +You can perform following functions on the Recurring Payments: +- [Change Status of a Subscription](#change-status-of-a-subscription) +- [Duplicate a Subscription](#duplicate-a-subscription) +- [Update an Active Subscription](#update-an-active-subscription) + +### Change Status of a Subscription + +You can pause, resume or cancel a subscription as follows: +- You can pause or cancel a subscription when it is in **Active** status. +- You can resume or cancel a subscription when it is in **Paused** status. +- You can cancel a subscription at the end of current billing cycle or immediately. + +![](/docs/assets/images/payment-button-subscription-button-subscription-status.jpg) + +![](/docs/assets/images/payment-button-subscription-button-cancel-subscription.jpg) + +### Duplicate a Subscription + +Click the **Duplicate icon** and update as appropriate. + +![](/docs/assets/images/payment-button-subscription-button-duplicate-sub.jpg) + +### Update an Active Subscription + +You can update an Active Subscription as follows: +1. Click **Update** button. + ![](/docs/assets/images/payment-button-subscription-button-update-sub.jpg) +2. Modify the subscription details as you want. + ![](/docs/assets/images/payment-button-subscription-button-update-sub1.jpg) +3. Review the changes, and then click **Update Subscription**. + ![](/docs/assets/images/payment-button-subscription-button-update-sub2.jpg) + +### Related Information + +[Subscription Button FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/subscription-buttons/faqs.md) diff --git a/llm-content/payments/payment-button/subscription-buttons/receipt.md b/llm-content/payments/payment-button/subscription-buttons/receipt.md new file mode 100644 index 00000000..58ac7ed3 --- /dev/null +++ b/llm-content/payments/payment-button/subscription-buttons/receipt.md @@ -0,0 +1,79 @@ +--- +title: Generic Payment Receipt +description: Configure automatic and manual payment receipts for the payments made using your Razorpay Subscription Button. +--- + +# Generic Payment Receipt + +You can share payment receipts with customers via email once they complete payments using the Subscription Button. + +## PDF Receipt to Customers + +Here is a sample PDF of the payment receipt. + +![](/docs/assets/images/payment-pages-receipt-receipt-example.jpg) + +**Setting Up Payment Receipt** + +Payment Receipts can be generated and shared: +- [Automatically](#automated-receipt) +- [Manually](#manual-receipt) + +## Automated Receipt +When you use this feature, the payment receipt will be automatically shared with customers via email and SMS using the details they provided at the time of payment. An auto-generated reference number will be added by Razorpay. + +Follow these steps to configure automated payment receipts: +1. While creating or editing the Subscription Button, select the **Payment Receipts** feature available on the top menu ribbon. +2. In the **Payment Receipts Settings** modal, select **Send Automated Receipts**. +3. You can show an input field such as `Name`, `Address` and its associated value on the Receipt. To do this: + 1. Enable the **Show an Input Field on Receipt** feature. + 2. In the drop-down list, select one of the custom input fields such as `Name`, `Address` or `Landmark`, used on the Subscription Button. For example, if you have selected `Name`, the customer's name `Gaurav Kumar` will appear on the payment receipt. +4. Click **Save**. + +![](/docs/assets/images/payment-pages-receipt-pp-receipt-auto-settings.gif) + +### Resend and Download Payment Receipt + +Watch this video to see how to resend and download a payment receipt. + +[Video: https://www.youtube.com/embed/me-gVlb09cQ] + +To resend and download a payment receipt: +1. Navigate to the button's **Transactions Details** page. All the payments made using the Payment Button are listed here. +2. Click on the Payment ID to view the payment details. +3. In the **Payment Receipt** field, click the **Send** button. This will resend the receipt to the customer. +4. You can download the payment receipt using the **Download** button. + +## Manual Receipt + +If you choose this option, you must manually add a reference number to the receipt and share it with your customers. + +Follow the steps given below to configure manual payment receipt: + +1. In the Subscription Button creation screen, select the **Payment Receipts** feature available on the top menu ribbon. +2. In the **Payment Receipts Settings** modal, select **Send Manual Receipts**. +3. You can show an input field such as `Name`, `Address` and its associated value on the Receipt. To do this: + 1. Enable the **Show an Input Field on Receipt** feature. + 2. In the drop-down list, select one of the custom input fields such as `Name`, `Address` or `Landmark`, used on the Subscription Button. For example, if you have selected `Name`, the customer's name `Gaurav Kumar` will appear on the payment receipt. + ![](/docs/assets/images/payment-pages-receipt-manual-pp-receipt.gif) + +4. Click **Save**. +5. Navigate to the page's **Transactions Details** screen. All the payments made using the Subscription Button are listed here. + ![](/docs/assets/images/payment-pages-receipt-pp-transactions-send.jpg) + +6. Click the Payment ID to view the payment details. +7. In the **Payment Receipt** field, click the **Send Receipt** button. +8. Enter a reference number for the receipt as per your business requirements. + ![](/docs/assets/images/payment-pages-receipt-pp-manual-ref.jpg) + +9. Click **Send**. + +You can resend the receipt using the **Send** button. Also, you can download the payment receipt using the **Download** button. + +## Email Notification to Customers + +Payment receipts are sent to customers via email as a PDF attachment. + +Also, the details entered by the customer while making the payment appear on the email body as shown: + +![](/docs/assets/images/payment-pages-receipt-email-non80g.jpg) diff --git a/llm-content/payments/payment-button/subscription-buttons/subscribe-to-webhooks.md b/llm-content/payments/payment-button/subscription-buttons/subscribe-to-webhooks.md new file mode 100644 index 00000000..62e4416d --- /dev/null +++ b/llm-content/payments/payment-button/subscription-buttons/subscribe-to-webhooks.md @@ -0,0 +1,356 @@ +--- +title: View Notifications using Webhooks +description: Subscribe to various webhook events related to Subscription Button to receive instant notifications. +--- + +# View Notifications using Webhooks + +You can also enable webhooks to receive notifications about the payment as they move through the different states. All information entered by the customer while making the payment will appear in the webhook payload. + +Webhooks (Web Callback, HTTP Push API or Reverse API) automatically notify your application when specific events occur. Instead of continuously polling APIs to check for updates, webhooks push notifications directly to your server when events happen. + +## Webhooks vs APIs + +Here is how webhooks compare to traditional API polling: + +Aspect | APIs | Webhooks +--- +**Data retrieval** | Pull-based (you request) | Push-based (we send) +--- +**Timing** | On-demand | Near real-time when events occur +--- +**Resource usage** | Requires polling | Event-driven, efficient + +## How Razorpay Webhooks Work + +When you subscribe to webhook events, Razorpay sends an HTTP POST request with JSON payload to your configured endpoint URL whenever those events are triggered. + +Suppose you have subscribed to the `order.paid` webhook event, you will receive a notification every time a user pays you for an order, in the configured endpoint URL. + +### Use Cases + +There can be multiple uses for webhook events. Two of these are listed below. + + +### Capturing Late Authorised Payments + + Capturing payments for which you did not receive a response on the client-side is perhaps the most important use case for the `payment.authorized` event. + + Sometimes, the communication between the bank and Razorpay or between you and Razorpay may not occur. This could be because of a slow network connection or your customer closing the window while processing the payment. This could lead to a payment being marked as **Failed** on the Dashboard but changed to **Authorized** at a later time. Know more about [late authorisation of payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md). + + You can use webhooks to get notified about payments that get authorised and analyse this data to decide whether to capture the payment or not. + + + +### Notifications on Failed Payments + + When a payment attempted by your customer fails, we receive the failed payment status from the bank. This payment gets recorded in our system as **Failed**. + + Suppose you have enabled the `payment.failed` webhook, you will receive a notification from us about the failed payment. You can then further analyse this payment and notify your customer about the failure. + + + +### Setup and Configuration + +- You can set up webhooks from your Dashboard and configure separate URLs for **Live** mode and **Test** mode. Know more about setting up [Payment webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) and [Payout webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md). +- A **Test** mode webhook receives events for your test transactions. Know more about [testing webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). +- Webhook URLs must use ports **80** or **443** only. +- Ensure Razorpay webhook IPs are whitelisted on your server. Even if your server accepts all incoming requests, webhooks may still be blocked by cloud security groups or network configurations. Refer to [Razorpay IPs and Certificates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#webhook-ips) for the complete list of webhook IP addresses. + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + +Watch this video to see how to set up a webhook. + +[Video: https://www.youtube.com/embed/Xiikw4_CcQk?si=b6kYHKIp1xikPrJZ] + +To set up webhooks: + +1. Log in to the Dashboard and navigate to **Accounts & Settings**. +2. Click **Webhooks** under **Website and app settings**. +3. Click the **+ Add New Webhook** button. + + ![Add a new webhooks button on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-1.jpg.md) +4. In the **Webhook Setup** pop-up page: + - Enter the **URL** where you want to receive the webhook payload when an event is triggered. We recommend using an HTTPS URL. + + +> **INFO** +> +> +> **Handy Tips** +> +> - You can set up to **30 URLs** to receive Webhook notifications. Webhooks can only be delivered to public URLs. +> - If your URL contains `razorpay` as a domain, you will not be able to add the URL and will receive an error. +> - If you attempt to save a localhost endpoint as part of a webhook setup, you will notice an error. Know more about [testing Webhooks on an application running on localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#application-running-on-localhost). +> + + + - Enter a **Secret** for the webhook endpoint. The secret is used to validate that the webhook is from Razorpay. Do not expose the secret publicly. Know more about [how to validate webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> - When setting up the webhook, specify a secret. Use this secret to validate that the webhook is from Razorpay. Entering the secret is optional but recommended. The secret should never be exposed publicly. +> - The webhook secret does not need to be the Razorpay API key secret. +> + + + + - In the **Alert Email** field, enter the email address to which the notifications should be sent in case of webhook failure. You will receive webhook related notifications like failures, deactivation and so on. + - Select the required events from the list of **Active Events**. + ![List of active webhook events on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-2.jpg.md) + +5. Click **Create Webhook**. After you set up a webhook, it appears on the list of webhooks. + ![List of webhooks on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhooks-list.jpg.md) +6. You can select the webhook and click **Edit** to make more changes. + +## Subscribe to Webhook Events + +You must subscribe to the following Payment and Order webhook events: + +`payment.authorized` +: To receive notifications when the payment made by a customer is in `authorized` state. + +`payment.captured` +: To receive notifications when the payment made by a customer is in `captured` state. + +`payment.failed` +: To receive notifications when a customer's payment attempt failed. + +`order.paid` +: To receive notifications when an order is paid. + +### Event Payload: payment.authorized + +Below is the sample payload for the `payment.authorized` event. + +```json: payment.authorized.payload +{ + "entity":"event", + "account_id":"acc_DLXfTGFm2PS7Cy", + "event":"payment.authorized", + "contains":[ + "payment" + ], + "payload":{ + "payment":{ + "entity":{ + "id":"pay_DORWaWz6UGwvRx", + "entity":"payment", + "amount":70000, + "currency":"INR", + "status":"authorized", + "order_id":"order_DORWL4a5PvwmiR", + "invoice_id":null, + "international":false, + "method":"upi", + "amount_refunded":0, + "refund_status":null, + "captured":false, + "description":null, + "card_id":null, + "bank":null, + "wallet":null, + "vpa":"sauravkumar@exampleupi", + "email":"saurav.kumar@example.com", + "contact":"+919998887776", + "notes":{ + "participant_name":"Saurav Kumar", + "email":"saurav.kumar@example.com", + "phone":"9998887776" + }, + "fee":null, + "tax":null, + "error_code":null, + "error_description":null, + "created_at":1569853622 + } + } + }, + "created_at":1569853623 +} +``` + +### Event Payload: payment.captured + +Below is the sample payload for the `payment.captured` event. + +```json: payment.captured.payload +{ + "entity":"event", + "account_id":"acc_DLXfTGFm2PS7Cy", + "event":"payment.captured", + "contains":[ + "payment" + ], + "payload":{ + "payment":{ + "entity":{ + "id":"pay_DORWaWz6UGwvRx", + "entity":"payment", + "amount":70000, + "currency":"INR", + "status":"captured", + "order_id":"order_DORWL4a5PvwmiR", + "invoice_id":null, + "international":false, + "method":"upi", + "amount_refunded":0, + "refund_status":null, + "captured":true, + "description":null, + "card_id":null, + "bank":null, + "wallet":null, + "vpa":"sauravkumar@exampleupi", + "email":"saurav.kumar@example.com", + "contact":"+919998887776", + "notes":{ + "participant_name":"Saurav Kumar", + "email":"saurav.kumar@example.com", + "phone":"9998887776" + }, + "fee":1652, + "tax":252, + "error_code":null, + "error_description":null, + "created_at":1569853622 + } + } + }, + "created_at":1569853628 +} +``` + +### Event Payload: payment.failed + +```json: payment.failed.payload +{ + "entity":"event", + "account_id":"acc_CJoeHMNpi0nC7k", + "event":"payment.failed", + "contains":[ + "payment" + ], + "payload":{ + "payment":{ + "entity":{ + "id":"pay_DM45I1xLvo836m", + "entity":"payment", + "amount":1600, + "currency":"INR", + "status":"failed", + "order_id":null, + "invoice_id":null, + "international":false, + "method":"netbanking", + "amount_refunded":0, + "refund_status":null, + "captured":false, + "description":null, + "card_id":null, + "bank":"KKBK", + "wallet":null, + "vpa":null, + "email":"gaurav.kumar@example.com", + "contact":"+919988776655", + "notes":{ + "participant_name":"Gaurav Kumar" + }, + "fee":null, + "tax":null, + "error_code":"BAD_REQUEST_ERROR", + "error_description":"Payment failed", + "created_at":1569334394 + } + } + }, + "created_at":1569334395 +} +``` + +### Event Payload: order.paid + +Below is the sample payload for the `order.paid` event. + +```json: order.paid.payload +{ + "entity":"event", + "account_id":"acc_DLXfTGFm2PS7Cy", + "event":"order.paid", + "contains":[ + "payment", + "order" + ], + "payload":{ + "payment":{ + "entity":{ + "id":"pay_DORWaWz6UGwvRx", + "entity":"payment", + "amount":70000, + "currency":"INR", + "status":"captured", + "order_id":"order_DORWL4a5PvwmiR", + "invoice_id":null, + "international":false, + "method":"upi", + "amount_refunded":0, + "refund_status":null, + "captured":true, + "description":null, + "card_id":null, + "bank":null, + "wallet":null, + "vpa":"sauravkumar@exampleupi", + "email":"saurav.kumar@example.com", + "contact":"+919998887776", + "notes":{ + "participant_name":"Saurav Kumar", + "email":"saurav.kumar@example.com", + "phone":"9998887776" + }, + "fee":1652, + "tax":252, + "error_code":null, + "error_description":null, + "created_at":1569853622 + } + }, + "order":{ + "entity":{ + "id":"order_DORWL4a5PvwmiR", + "entity":"order", + "amount":70000, + "amount_paid":70000, + "amount_due":0, + "currency":"INR", + "receipt":null, + "offer_id":null, + "status":"paid", + "attempts":1, + "notes":[], + "created_at":1569853608 + } + } + }, + "created_at":1569853628 +} +``` + +### Related Information + +[Webhooks FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/faqs.md) diff --git a/llm-content/payments/payment-button/subscription-buttons/supported-platforms.md b/llm-content/payments/payment-button/subscription-buttons/supported-platforms.md new file mode 100644 index 00000000..6659b18c --- /dev/null +++ b/llm-content/payments/payment-button/subscription-buttons/supported-platforms.md @@ -0,0 +1,62 @@ +--- +title: Supported Platforms +description: Embed Razorpay Subscription Buttons on websites built on platforms such as Wix, Weebly, Blogger and Google Sites. +--- + +# Supported Platforms + +You can embed Razorpay Subscription Button on custom-built websites as well as those built on popular platforms such as Wix, Weebly, Blogger and Google Sites. + +Here is a walkthrough on how to embed the Razorpay Subscription Button on these platforms. + +## Wix + +Follow these steps to embed the Subscription Button on your Wix site: +1. Log in to your Wix site and switch to Editor mode. +2. Navigate to **Add** → **Embed** → **Custom Embeds**. +3. Select **HTML iframe**. +4. Click **Enter Code** and select **Code**. +5. Paste the Button code you had copied from the Dashboard and click **Apply**. The Subscription Button appears. You can drag and place it wherever required. +6. Publish the page to view the changes. + +## Blogger + +Follow these steps to embed the Subscription Button on your Blogger site: +1. Log in to your Blogger site and navigate to Editor mode. +2. Navigate to the page on which you want to place the button. +3. Switch to **HTML view**. +4. Paste the Button code you had copied from the Dashboard and click **Update**. +5. Publish the page to view the changes. + +## Weebly + +Follow these steps to embed the Subscription Button on your Weebly site: +1. Log in to your Weebly site and switch to Editor mode. +2. Navigate to the page on which you want to place the button. +3. Navigate to **Build** → **Individual Elements** → **Embed Code**. +4. Drag and drop the element and select **Click to set Custom HTML** box. +5. Select the position and click **Edit Custom HTML**. +6. Paste the Button code you had copied from the Dashboard and click out of the box. This saves the code. +7. Publish the page to view the changes. + +## Google Sites + +Follow these steps to embed the Subscription Button on your Google Site: +1. Log in to your Google Site and switch to Editor mode. +2. Navigate to the page on which you want to place the button. +3. Navigate to **Insert** → **Embed** → **Embed Code**. +4. Paste the Button code you had copied from the Dashboard and click **Next**. +5. Click **Insert**. +6. Drag and drop the element wherever required. +7. Publish the page to view the changes. + +## GoDaddy + +Follow these steps to embed the Payment Button on your GoDaddy website: +1. Log in to your GoDaddy website and switch to Editor mode. +2. Navigate to the page on which you want to place the button. +3. Add a section, select **HTML** and click **Add**. +4. Paste the Button code you had copied from the Dashboard. +5. Add a pixel length of `700` in **Forced Height** field. +6. Click **Done**. +7. Publish the page to view the changes. diff --git a/llm-content/payments/payment-button/supported-platforms.md b/llm-content/payments/payment-button/supported-platforms.md new file mode 100644 index 00000000..ec9a228e --- /dev/null +++ b/llm-content/payments/payment-button/supported-platforms.md @@ -0,0 +1,119 @@ +--- +title: About Plugins +description: Embed Razorpay Payment Buttons on websites built on platforms such as Wix, Weebly, Blogger and Google Sites. +--- + +# About Plugins + +You can embed Razorpay Payment Button on custom-built websites and those built on popular platforms such as: + +- [Wix](#wix) +- [Weebly](#weebly) +- [Blogger](#blogger) +- [Google Sites](#google-sites) +- [GoDaddy](#godaddy) +- [Wordpress](#wordpress) +- [Drupal](#drupal) + +## Wix + +Watch this video to see how to embed a Payment Button on your Wix site: + +[Video: https://www.youtube.com/embed/mpKggEAOXrI] + +To embed a Payment Button on your Wix site: +1. Log in to your Wix site and switch to Editor mode. +2. Navigate to **Add** → **Embed** → **Custom Embeds**. +3. Select **HTML iframe**. +4. Click **Enter Code** and select **Code**. +5. Paste the Button code that you copied from the Dashboard and click **Apply**. The Payment Button appears. You can drag and place it wherever required. +6. Publish the page to view the changes. + +## Weebly + +Watch this video to see how to embed a Payment Button on your Weebly site: + +[Video: https://www.youtube.com/embed/Wq8MkcAJNdU] + +To embed a Payment Button on your Weebly site: +1. Log in to your Weebly site and switch to Editor mode. +2. Navigate to the page on which you want to place the button. +3. Navigate to **Build** → **Individual Elements** → **Embed Code**. +4. Drag and drop the element and select **Click to set Custom HTML** box. +5. Select the position and click **Edit Custom HTML**. +6. Paste the Button code that you copied from the Dashboard and click out of the box. This saves the code. +7. Publish the page to view the changes. + +## Blogger + +Watch this video to see how to embed a Payment Button on your Blogger site: + +[Video: https://www.youtube.com/embed/LgHpK-nbxn8] + +To embed a Payment Button on your Blogger site: +1. Log in to your Blogger site and navigate to Editor mode. +2. Navigate to the page on which you want to place the button. +3. Switch to **HTML view**. +4. Paste the Button code that you copied from the Dashboard and click **Update**. +5. Publish the page to view the changes. + +## Google Sites + +Watch this video to see how to embed a Payment Button on your Google site: + +[Video: https://www.youtube.com/embed/NHt60vR_Ahg] + +To embed a Payment Button on your Google site: +1. Log in to your Google Site and switch to Editor mode. +2. Navigate to the page on which you want to place the button. +3. Navigate to **Insert** → **Embed** → **Embed Code**. +4. Paste the Button code that you copied from the Dashboard and click **Next**. +5. Click **Insert**. +6. Drag and drop the element wherever required. +7. Publish the page to view the changes. + +## GoDaddy + +Watch this video to see how to embed a Payment Button on your GoDaddy site: + +[Video: https://www.youtube.com/embed/77ZWdlra4lw] + +To embed a Payment Button on your GoDaddy site: +1. Log in to your GoDaddy website and switch to Editor mode. +2. Navigate to the page on which you want to place the button. +3. Add a section, select **HTML** and click **Add**. +4. Paste the Button code that you copied from the Dashboard. +5. Add a pixel length of `700` in **Forced Height** field. +6. Click **Done**. +7. Publish the page to view the changes. + +## WordPress + +If you own a WordPress site, you can use the Razorpay Payment Button Plugin for WordPress. + +> **INFO** +> +> +> +> **Handy Tips** +> +> [Create a WordPress site](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress.md) from scratch. +> + +Watch this short video on how to add Payment Button on Wordpress and Elementor: + +[Video: https://www.youtube.com/embed/4MCy8Blo4Pw] + +## Drupal + +To embed a Payment Button on your Drupal Website: + +1. Download the plugin from the [Drupal](https://www.drupal.org/project/payment_button_drupal_plugin) Website. +2. Go to Extend from the Drupal admin menu. +3. Enable Razorpay Payment Button Plugin module in the Drupal admin. +4. Configure your What You See Is What You Get (WYSIWYG) toolbar to include the button. + +### Related Information + +- [Payment Buttons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [Payment Button Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/view-reports.md) diff --git a/llm-content/payments/payment-button/supported-platforms/wordpress.md b/llm-content/payments/payment-button/supported-platforms/wordpress.md new file mode 100644 index 00000000..d5ed6ca1 --- /dev/null +++ b/llm-content/payments/payment-button/supported-platforms/wordpress.md @@ -0,0 +1,162 @@ +--- +title: Embed Payment Button on WordPress Website +description: Embed a Razorpay Payment Button on your WordPress website and accept payments from customers. +--- + +# Embed Payment Button on WordPress Website + +- **Payment Button - Wordpress Changelog**: Version 2.4.6 released for Payment Button Wordpress. This version fixes naming conflict in Razorpay section. + +WordPress is one of the most popular Content Management Systems out there. You can quickly build a website using WordPress and embed the our Payment Button to accept payments from customers. + +![WordPress Homepage](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-wordpress-homepage.jpg.md) + +## WordPress Plan + + + If you have built your website using `www.wordpress.com`, and are on a paid plan, you can directly install the Razorpay Payment Button Plugin from the WordPress Plugins store. + + 1. [Install the Razorpay Payment Button Plugin on your WordPress site](https://wordpress.org/plugins/razorpay-payment-button/). + 2. [Create a Payment Button on Dashboard](#step-2-create-a-payment-button-on-razorpay). + 3. [Embed the Payment Button on your WordPress site](#step-3-embed-the-payment-button-on-wordpress). + + + + If you are using WordPress with the free plan, you need to use MAMP to set up a local WordPress site and continue with the Payment Button + implementation. + + 1. [Set up WordPress site locally on your system](#step-1-set-up-wordpress-site-locally-on). + 2. [Create a Payment Button on Dashboard](#step-2-create-a-payment-button-on-razorpay). + 3. [Embed the Payment Button on your WordPress site](#step-3-embed-the-payment-button-on-wordpress). + + +## Prerequisites + +1. Download the [Razorpay Payment Button WordPress Plugin](https://wordpress.org/plugins/razorpay-payment-button/). +2. Create a Razorpay account. +3. Navigate to **Settings** → **API Keys** and [generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) in the test mode. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +Add the API key details in the Razorpay Payment Button plugin settings. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - When testing: Generate the keys in Test mode. + +> - To accept live payments: Generate the keys in Live mode and replace them in the Payment Button plugin settings. +> + +## Set Up a Payment Button Using Wordpress Plugin + +Watch this video to see how to set up a Payment Button using Wordpress Plugin. + +[Video: https://www.youtube.com/embed/xyk5FXSDdK4] + +### 1. Set Up WordPress Site Locally on Your System + + + See: [Installation Steps for Windows](https://documentation.mamp.info/en/MAMP-Windows/Installation/) + + + To install WordPress on your Mac system: + 1. [Download the latest version of MAMP](https://www.mamp.info/en/downloads/) and install it on your Mac system. This software enables you to manage your websites locally. + 2. Install the downloaded file using the wizard and save MAMP in your **Applications** folder. + ![Install MAMP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-install-mamp.jpg.md) + 3. Navigate to the **MAMP** folder. + ![Navigate to MAMP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-mamp-folder.jpg.md) + + + In the folder, click the **MAMP** icon: + ![Click MAMP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-mamp-icon.jpg.md) + 4. Click **Start Server** to run the server on your system. + ![Start Server](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-start-server.jpg.md) + The server status appears green once they are ready. + ![Server in Ready State](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-server-running.jpg.md) + 5. Click **Open WebStart Page**. The server starts running on your browser as shown: + ![Open WebStart Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-phpmyadmin.jpg.md) + 6. We must set up a MySQL database for the WordPress website. This is done using **phpMyAdmin**. + ![Setup phpMyAdmin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-setup-database.jpg.md) + a. Select the required database and click **Privileges**. + + ![Add user account: phpMyAdmin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-priviledges.jpg.md) + b. Click **Add user account**. + ![Add user account: phpMyAdmin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-add-user-account.jpg.md) + + c. Enter the username and password, same as the WordPress account login credentials. + + ![Add user account: phpMyAdmin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-username-password-priviledges.jpg.md) + + d. Click **Go**. + ![user account added: phpMyAdmin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-user-account-added.jpg.md) + + 7. Navigate to the WordPress application you had downloaded. + 8. Rename the `WordPress` folder. Provide a name relevant to the site you will be building/testing locally. For example, `teafactory`. Add the `teafactory` folder in `htdocs` of your MAMP directory. + ![Rename WordPress folder](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-htdocs.jpg.md) + + 9. Open the browser and type in the URL pointing to your site folder. For example, `localhost:8888/teafactory`. Select the language of your choice and click **Continue** → **Let's Go**. + ![Select Language](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-select-language.jpg.md) + + 10. Enter your database details. Provide a name for the database, and enter `root` for both the database username and password. Click **Submit**. + ![Log in](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-wp-login.jpg.md) + + 11. Provide the required general site information (which you can change later), as well as your login information in WordPress. + ![Setup Login Information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-setup-login.jpg.md) + + 12. Click the **Install WordPress** button. With this, your website is ready. + ![Install WordPress](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-login.jpg.md) + + + +To accept payments on your WordPress site, you must create a Payment Button. + +- [Quick Pay Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/quick-pay.md) +- [Buy Now Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/buy-now.md) +- [Donations Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/donations.md) +- [Custom Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/custom.md) + +## 3. Embed the Payment Button on WordPress Site + +To embed the Payment Button: + +3.1 Download and install the Razorpay Payment Button Plugin. You can do this using either of these methods: + - [Download the plugin from the WordPress Plugin Directory](https://wordpress.org/plugins/razorpay-payment-button/) and add the zip file to your WordPress website's **Plugins** folder. + - Add the plugin directly onto your WordPress website from the **Plugin** page. + +3.2 In your WordPress site, activate the plugin in the **WordPress Plugin Manager**. + ![Activate Plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-activate-plugin.jpg.md) + +3.3 Navigate to **Razorpay Buttons** → **Settings** to add your Razorpay API key details and connect your Razorpay account to the plugin. + ![Add Razorpay API Key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-settings.jpg.md) + +3.4 Navigate to **Razorpay Buttons**. A list of buttons you created on Razorpay are available here. Select the required button. + ![List of Payment Buttons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-view-buttons.jpg.md) + +3.5 Click **Pages** and navigate to the page where you want to embed the Payment button. + ![Select Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-shop-page.jpg.md) + +3.6 Select **Add Block** → **Widgets** → **Razorpay: Payment Button** to embed the Payment button onto the page. + ![Embed Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-add-pb-widget.jpg.md) + +3.7 Choose the Payment Button using the drop-down and publish or update the page. + ![Choose Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-select-button.jpg.md) + +The Payment Button appears on the page. + +![Payment Button Appears](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-pb.gif.md) + +You can now start accepting payments on your WordPress website using the Payment Button. + +## FAQs + +### Related Information + +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [Create a WordPress Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress/create-website.md) +- [Payment Button Elementor Plugin for WordPress](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress/elementor.md) +- [Payment Button SiteOrigin Plugin for WordPress](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress/site-origin.md) +- [Payment Button Visual Composer Plugin for WordPress](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress/visual-composer.md) diff --git a/llm-content/payments/payment-button/supported-platforms/wordpress/create-website.md b/llm-content/payments/payment-button/supported-platforms/wordpress/create-website.md new file mode 100644 index 00000000..72846b75 --- /dev/null +++ b/llm-content/payments/payment-button/supported-platforms/wordpress/create-website.md @@ -0,0 +1,65 @@ +--- +title: Payment Button | Wordpress - Create a Website +heading: Create a WordPress Website +description: Create a WordPress website and embed a Razorpay Payment Button to accept payments from customers. +--- + +# Create a WordPress Website + +WordPress is one of the most popular Content Management Systems out there. You can quickly build a website using WordPress and embed the our Payment Button to accept payments from customers. + +Given below are the steps to create a Wordpress website. + +## Install Wordpress + + + See: [Installation steps for Windows](https://documentation.mamp.info/en/MAMP-Windows/Installation/) + + + To install WordPress on your Mac system: + 1. [Download the latest version of MAMP](https://www.mamp.info/en/downloads/) and install it on your Mac system. This software enables you to manage your websites locally. + 2. Install the downloaded file using the wizard and save MAMP in your **Applications** folder. + ![Install MAMP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-install-mamp.jpg.md) + 3. Navigate to the **MAMP** folder. + ![Navigate to MAMP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-mamp-folder.jpg.md) + + + In the folder, click the **MAMP** icon: + ![Click MAMP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-mamp-icon.jpg.md) + 4. Click **Start Server** to run the server on your system. + ![Start Server](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-start-server.jpg.md) + + The server status appears green once they are ready. + ![Server in Ready State](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-server-running.jpg.md) + + 5. Click **Open WebStart Page**. The server starts running on your browser as shown: + ![Open WebStart Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-phpmyadmin.jpg.md) + + 6. We must set up a MySQL database for the WordPress website. This is done using **phpMyAdmin**. + ![Setup phpMyAdmin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-setup-database.jpg.md) + + 7. Navigate to the WordPress application you had downloaded. + 8. Rename the `WordPress` folder. Provide a name relevant to the site you will be building/testing locally. For example, `teafactory`. Add the `teafactory` folder in `htdocs` of your MAMP directory. + ![Rename WordPress folder](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-htdocs.jpg.md) + + 9. Open the browser and type in the URL pointing to your site folder. For example, `localhost:8888/teafactory`. Select the language of your choice and click **Continue** → **Let's Go**. + ![Select Language](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-select-language.jpg.md) + + 10. Enter your database details. Provide a name for the database and enter `root` for both the database username and password. Click **Submit**. + ![Log in](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-wp-login.jpg.md) + + 11. Provide the required general site information (which you can change later), as well as your login information in WordPress. + ![Setup Login Information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-setup-login.jpg.md) + + 12. Click the **Install WordPress** button. With this, your website is ready. + ![Install WordPress](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-wordpress-login.jpg.md) + + + +### Related Information + +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [Embed Payment Button on WordPress Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress.md) +- [Payment Button Elementor Plugin for WordPress](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress/elementor.md) +- [Payment Button SiteOrigin Plugin for WordPress](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress/site-origin.md) +- [Payment Button Visual Composer Plugin for WordPress](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress/visual-composer.md) diff --git a/llm-content/payments/payment-button/supported-platforms/wordpress/elementor.md b/llm-content/payments/payment-button/supported-platforms/wordpress/elementor.md new file mode 100644 index 00000000..b2702b1b --- /dev/null +++ b/llm-content/payments/payment-button/supported-platforms/wordpress/elementor.md @@ -0,0 +1,100 @@ +--- +title: Payment Button Elementor Plugin for WordPress +description: Embed a Razorpay Payment Button on your WordPress website using the Payment Button Elementor plugin. +--- + +# Payment Button Elementor Plugin for WordPress + +You can accept payments on your Elementor-built WordPress website using the [Payment Button Elementor Plugin](https://wordpress.org/plugins/razorpay-payment-button-elementor/). + +![Razorpay Payment Button Elementor Plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-elementor-elementor-plugin.jpg.md) + +## Prerequisites + + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +> **INFO** +> +> +> +> **Handy Tips** +> +> - When testing, generate the keys in the Test mode. +> - To accept live payments, generate the keys in the Live mode and replace them in the Payment Button plugin settings. +> +> + +## Integrate Payment Button Elementor Plugin for WordPress + +Watch this video to see how to create a Payment Button using Elementor Wordpress Plugin. + +[Video: https://www.youtube.com/embed/BmdJf1C3N7M] + +To accept payments on your WordPress site, create a Payment Button. + +- [Quick Pay Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/quick-pay.md) +- [Buy Now Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/buy-now.md) +- [Donations Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/donations.md) +- [Custom Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/custom.md) + +### Step 2: Install and Configure the Plugin + +To install and configure the Payment Button: + +2.1 Download and install our Payment Button Elementor Plugin. You can do this using either of these methods: + - [Download](https://wordpress.org/plugins/razorpay-payment-button-elementor/) the plugin from the WordPress Plugin Directory and add the zip file to your WordPress website's **Plugins** folder. + - Add the plugin directly onto your WordPress website from the **Plugin** page. + +2.2 In your WordPress site, activate the plugin in the **WordPress Plugin Manager**. + ![Activate Plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-elementor-activate-plugin.jpg.md) + +2.3 Navigate to **Razorpay Buttons Elementor** → **Settings** to add your API key details and connect your Razorpay account to the plugin. + ![Add Razorpay API Key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-elementor-configure-settings.jpg.md) + +### Step 3: Embed the Payment Button on WordPress Site + +To add Payment Button on WordPress site: + +3.1 Click **Pages** and navigate to the page where you want to embed the Payment button. + ![Select Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-elementor-shop-page.jpg.md) + +3.2 Click **Edit with Elementor** to open the Elementor website builder mode. + +3.3 Drag and drop **Razorpay Button** from the list of widgets onto the page. + ![Embed Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-elementor-razorpay-button-widget.jpg.md) + +3.4 From the list, select the Payment Button that should be displayed on the page. + ![Choose Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-elementor-select-button.jpg.md) + The button is added to the page. + ![Added Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-elementor-button-added.jpg.md) +3.5 Save the changes and preview the page. The Payment Button appears on the page. + ![Payment Button Appears](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-elementor-button-on-page.jpg.md) + +You can now start accepting payments on your WordPress website using the Payment Button. + +### Step 4: View Details on Dashboard + +To view the payments on the WordPress Dashboard: + +4.1 Click **Razorpay Buttons Elementor** to view the list of Payment Buttons. + ![List of Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-elementor-list-buttons.jpg.md) + +4.2 Click **View** to open the button details. + ![View Payment Button Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-elementor-button-details.jpg.md) + +The following information regarding the payment button is displayed: +- Button ID +- Button Status +- Total Quantity Sold +- Total Revenue +- Created On +- Item Name + +### Related Information + +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [Create a WordPress Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress/create-website.md) +- [Embed Payment Button on WordPress Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress.md) +- [Payment Button SiteOrigin Plugin for WordPress](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress/site-origin.md) +- [Payment Button Visual Composer Plugin for WordPress](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress/visual-composer.md) diff --git a/llm-content/payments/payment-button/supported-platforms/wordpress/site-origin.md b/llm-content/payments/payment-button/supported-platforms/wordpress/site-origin.md new file mode 100644 index 00000000..57a0048e --- /dev/null +++ b/llm-content/payments/payment-button/supported-platforms/wordpress/site-origin.md @@ -0,0 +1,94 @@ +--- +title: Payment Button SiteOrigin Plugin for WordPress +description: Embed a Razorpay Payment Button on your WordPress website using the Payment Button SiteOrigin plugin. +--- + +# Payment Button SiteOrigin Plugin for WordPress + +You can accept payments on your SiteOrigin-built WordPress website using the [Payment Button SiteOrigin Plugin](https://wordpress.org/plugins/razorpay-payment-button-for-siteorigin/). + +![Razorpay Payment Button SiteOrigin Plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-site-origin-plugin.jpg.md) + +## Prerequisites + + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +> **INFO** +> +> +> +> **Handy Tips** +> +> - When **testing**, generate the keys in the **Test** mode. +> - To **accept live payments**, generate the keys in the **Live** mode and replace them in the Payment Button plugin settings. +> +> + +## Integrate Payment Button SiteOrigin Plugin for WordPress + +To accept payments on your WordPress site, create a Payment Button. + +- [Quick Pay Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/quick-pay.md) +- [Buy Now Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/buy-now.md) +- [Donations Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/donations.md) +- [Custom Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/custom.md) + +### 2. Install and Configure the Plugin + +To install and configure the Plugin: + +2.1 Download and install our Payment Button SiteOrigin Plugin. You can do this using any one of these methods: + - [Download](https://wordpress.org/plugins/razorpay-payment-button-for-siteorigin/) the plugin from the WordPress Plugin Directory and add the zip file to your WordPress website's **Plugins** folder. + - Add the plugin directly onto your WordPress website from the **Plugin** page. + +2.2 In your WordPress site, activate the plugin in the **WordPress Plugin Manager**. + + ![Activate Plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rzp-pb-site-origin.jpg.md) + +2.3 Navigate to **Razorpay Buttons SiteOrigin** → **Settings** to add your API key details and connect your account to the plugin. + ![Add Razorpay API Key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-site-origin-configure-settings.jpg.md) + +### 3. Embed the Payment Button on WordPress Site + +To add Payment Button on WordPress site: + +3.1 Click **Pages** and navigate to the page where you want to embed the Payment button. + ![Select Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-site-origin-shop-builder.jpg.md) +3.2 Click **Live Editor** to open the SiteOrigin website builder mode. + +3.3 Navigate to **Add Widget** → **Razorpay Widgets** and select **Payment Button** or **Subscription Button** as per your preference. + ![Embed Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-site-origin-add-widget.jpg.md) + ![Embed Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-site-origin-rzp-widgets.jpg.md) + +3.4 From the list, select the Payment Button that should be displayed on the page and click **Done**. + ![Choose Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-site-origin-select-button.jpg.md) + +3.5 Save the changes and preview the page. The Payment Button appears on the page. + ![Payment Button Appears](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-site-origin-preview.jpg.md) + +You can now start accepting payments on your WordPress website using the Payment Button. + +## Step 4: View Details on Dashboard + +To view the payments on the WordPress Dashboard: + +4.1 Click **Razorpay Buttons SiteOrigin** to view the list of Payment Buttons. + ![List of Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-site-origin-buttons-preview.jpg.md) +4.2 Click **View** to open the button details. + ![View Payment Button Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-site-origin-button-details.jpg.md) + +The following information regarding the payment button is displayed: +- Button ID +- Button Status +- Total Quantity Sold +- Total Revenue +- Created On + +### Related Information + +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [Create a WordPress Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress/create-website.md) +- [Embed Payment Button on WordPress Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress.md) +- [Payment Button Elementor Plugin for WordPress](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress/elementor.md) +- [Payment Button Visual Composer Plugin for WordPress](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress/visual-composer.md) diff --git a/llm-content/payments/payment-button/supported-platforms/wordpress/visual-composer.md b/llm-content/payments/payment-button/supported-platforms/wordpress/visual-composer.md new file mode 100644 index 00000000..69e9a034 --- /dev/null +++ b/llm-content/payments/payment-button/supported-platforms/wordpress/visual-composer.md @@ -0,0 +1,103 @@ +--- +title: Payment Button Visual Composer Plugin for WordPress +description: Embed a Razorpay Payment Button on your WordPress website using the Payment Button Visual Composer plugin. +--- + +# Payment Button Visual Composer Plugin for WordPress + +You can accept payments on your Visual Composer-built WordPress website using the [Payment Button Visual Composer Plugin](https://wordpress.org/plugins/razorpay-payment-button-for-visual-composer/). + +![Razorpay Payment Button Visual Composer Plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-composer-plugin.jpg.md) + +## Prerequisites + + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +> **INFO** +> +> +> +> **Handy Tips** +> +> - When testing, generate the keys in the Test mode. +> - To accept live payments, generate the keys in the Live mode and replace them in the Payment Button plugin settings. +> +> + +## Integrate Payment Button Visual Composer Plugin for WordPress + +To accept payments on your WordPress site, create a Payment Button. +- [Quick Pay Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/quick-pay.md) +- [Buy Now Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/buy-now.md) +- [Donations Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/donations.md) +- [Custom Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/custom.md) + +### 2. Install and Configure the Plugin + +To install and configure the Plugin: + +2.1 Download and install our Payment Button Visual Composer Plugin. You can do this using either of these methods: + - [Download](https://wordpress.org/plugins/razorpay-payment-button-for-visual-composer) the plugin from the WordPress Plugin Directory and add the zip file to your WordPress website's **Plugins** folder. + - Add the plugin directly onto your WordPress website from the **Plugin** page. + +2.2 In your WordPress site, activate the plugin in the **WordPress Plugin Manager**. + + ![Activate Plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rzp-pb-visual-composer.jpg.md) +2.3 Navigate to **Razorpay Buttons for Visual Composer** → **Settings** to add your API key details and connect your Razorpay account to the plugin. + ![Add Razorpay API Key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-composer-configure-settings.jpg.md) + +### 3. Embed the Payment Button on WordPress Site + +To add Payment Button on WordPress site: + +3.1 Click **Pages** and navigate to the page where you want to embed the Payment button. + +3.2 Click **Edit with Visual Composer** to open the Visual Composer website builder mode. + ![Select Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-composer-shop-builder.jpg.md) + +3.3 Click **Add Content** and search for Razorpay **Payment Button** or **Subscription Button** as per your preference. + ![Embed Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-composer-add-content.jpg.md) + ![Embed Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-composer-rzp-widgets.jpg.md) + +3.4 From the list, select the Payment Button that should be displayed on the page. + ![Choose Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-composer-select-button.jpg.md) + +3.5 Save the changes and preview the page. The Payment Button appears on the page. + +> **INFO** +> +> +> **Handy Tips** +> +> The selected button will appear on the preview page but not in the editor. +> + + ![Payment Button Appears](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-composer-preview.jpg.md) + +You can now start accepting payments on your WordPress website using the Payment Button. + +### 4. View Details on Dashboard + +To view the payments on the WordPress Dashboard: + +4.1 Click **Razorpay Buttons for Visual Composer** to view the list of Payment Buttons. + ![List of Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-composer-buttons-preview.jpg.md) + +4.2 Click **View** to open the button details. + ![View Payment Button Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pb-composer-button-details.jpg.md) + +The following information regarding the payment button is displayed: +- Button ID +- Button Status +- Total Quantity Sold +- Total Revenue +- Created On + +### Related Information + +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [Create a WordPress Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress/create-website.md) +- [Embed Payment Button on WordPress Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress.md) +- [Payment Button Elementor Plugin for WordPress](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress/elementor.md) +- [Payment Button SiteOrigin Plugin for WordPress](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress/site-origin.md) diff --git a/llm-content/payments/payment-button/use-cases.md b/llm-content/payments/payment-button/use-cases.md new file mode 100644 index 00000000..b6f94d21 --- /dev/null +++ b/llm-content/payments/payment-button/use-cases.md @@ -0,0 +1,65 @@ +--- +title: Payment Button Use Cases +description: Explore the diverse use cases of Razorpay Payment Button, a robust payment collection solution for businesses. +--- + +# Payment Button Use Cases + +Discover how Razorpay Payment Button streamlines transactions, offering customers a straightforward payment experience and enabling businesses to efficiently collect revenue across various sectors. + + +### Event Organisers + + Event organisers can enhance ticket sales for events, such as a digital marketing conference, using the Razorpay Payment Button. + + **Benefits for Event Organisers** + + - Easy Integration: Embed the Payment Button on the event page to allow attendees to purchase tickets seamlessly. + - Quick Transaction: Simplify the ticketing process with a direct payment method that reduces queues and wait times. + - Customisable Button: Tailor the look and feel of the Payment Button to match the event branding for a consistent user experience. + + + +### Fundraising for Flood Relief + + NGOs can drive donations for causes such as flood relief more effectively with the Razorpay Payment Button. + + **Benefits for NGOs** + + - Global Donor Accessibility: Accept donations from international contributors with international currency support. + - Real-time Tracking: Monitor donation inflows in real-time, enabling better resource allocation during crises. + - Transparent Process: Offer donors a trustworthy and straightforward way to support the cause directly through the website. + + + +### Small Businesses + + Small businesses, like an online pottery store, can leverage Razorpay Payment Button to facilitate online sales. + + **Benefits for Small Businesses** + - Immediate Payment Acceptance: Customers can make purchases directly on the product page, enhancing the likelihood of conversion. + - Reduced Cart Abandonment: Minimise cart abandonment rates by offering a quick and easy checkout process. + - Product-Specific Buttons: You can create Payment Buttons for fixed-rate services or include multiple items within a single Payment Button tailored to your specific business needs. + + + +### Institutes + + Educational institutions can collect tuition and other fees effortlessly using the Razorpay Payment Button. + + **Benefits for Institutes** + + - Convenient Fee Payment: Students or parents can pay fees directly on the institute's website, avoiding long lines and paperwork. + - Multiple Fee Types: Set up different Payment Buttons for tuition, lab fees, or extracurricular activities, keeping finances organised. + - Automated Receipt Generation: Provide instant payment acknowledgements to students or parents, ensuring clarity and record-keeping. + + + +### Individuals + + Professionals, such as freelance baking instructors, can accept payments for their services with the Razorpay Payment Button. + + **Benefits for Individuals** + - Service Promotion: Promote classes or sessions by integrating the Payment Button on social media or personal websites. + - Direct Booking and Payment: Enable students to book and pay for classes instantly, securing their spots and the instructor's revenue. + - Flexible Payment Options: Offer single class payments or bundle packages with different Payment Buttons to accommodate various customer needs. diff --git a/llm-content/payments/payment-button/view-reports.md b/llm-content/payments/payment-button/view-reports.md new file mode 100644 index 00000000..5ec3b7dc --- /dev/null +++ b/llm-content/payments/payment-button/view-reports.md @@ -0,0 +1,60 @@ +--- +title: Payment Button | View Reports +heading: View Reports +description: View and download report of payments received for a specific Payment Button. +--- + +# View Reports + +You can view details about the payments received for a specific Payment Button and also download reports. + +## View Payment Details + +To view the payments made on a particular Payment Button: +1. Log in to the Dashboard and navigate to **Payment Button**. +2. Click the required payment button. + ![Button Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-view-reportpb.jpg.md) +3. Scroll down to the transaction details section. Here the list of all payments made using the button is displayed. +4. Click a Payment Id to view details of the payment. + ![Payment Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-view-paymentpb.jpg.md) + +### Download Report + +You can download the report related to a Payment Button in the following formats:**CSV (csv)**, **Excel (xlsx)** and **Old Excel (xls)**. + +To download a report: +1. Navigate to **Payment Button** on the Dashboard. +2. Click the required button. The button details view appears. +3. Scroll down to the transaction details section. Here the list of all payments made using the button is displayed. +4. Hover the mouse pointer on **Download Report**, and choose a format. + + + ![Download Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-button-view-reportpb.jpg.md) + + + + +### Report Details + + The downloaded report has the following columns: + + - Payment Button ID + - Payment Button Title + - Payment Date + - Order ID + - Item Name + - Item Amount + - Item Quantity + - Item Payment Amount + - Total Payment Amount + - Currency + - Payment Status + - Input Fields, if any + - Email + - Phone + + +### Related Information + +- [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md) +- [How Payment Button Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/how-it-works.md) diff --git a/llm-content/payments/payment-gateway.md b/llm-content/payments/payment-gateway.md new file mode 100644 index 00000000..82414365 --- /dev/null +++ b/llm-content/payments/payment-gateway.md @@ -0,0 +1,246 @@ +--- +title: How to Integrate Razorpay Payment Gateway +heading: About Payment Gateway +description: Accept payments using Razorpay Payment Gateway. Discover its advantages, when to use it and the various integration types. +--- + +# About Payment Gateway + +A Payment Gateway creates a secure pathway between a customer and the business to facilitate payments securely. It involves the authentication of both parties from the banks involved. You can accept payments from customers on your website and mobile apps using the Razorpay Payment Gateway as a business owner. + + +### Advantages + + + + - **Onboarding**: Integrate Razorpay Payment Gateway on your native-built website using Standard Checkout. Explore Razorpay plugins for various platforms such as **WooCommerce**, **WordPress**, **Magento**, **Shopify** and more. + + - **Success Rate**: Achieve a higher success rate by using **multiple connections** to route a transaction and **direct netbanking pipes**. Razorpay provides **downtime updates**, suggests the **next best payment option** at the point of payment failure on checkout and more. + + - **Refunds**: Razorpay retries failed API refunds smartly based on the **error code** received from the bank. + + - **Scalability and Availability**: Razorpay systems handle a load of **800 transaction requests per second** without deterioration. They provide downtime updates via email, status page and Dashboard. + + - **Settlements Reconciliation**: Use settlement reconciliation to keep **track** of all the transactions such as payments, refunds, transfers, and adjustments settled to you for a particular day or month. + + + + + + - **Coverage**: Razorpay supports a wide range of **domestic and international cards**, various **netbanking** options, **UPI**, **Cash on Delivery**, **EMI**, **Cardless EMI**, and **wallets** including Paytm and PhonePe. + + + + + + + + + + + + +## When to Use a Payment Gateway + +You should consider integrating with a payment gateway if you have a **website** or a **mobile app**. + + + You can still accept payments by using other Razorpay products such as [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md) and [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md). Check the list of [no-code apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md#accept-payments) and find the product that best suits your business needs. + + + + If you are unsure about integrating with Razorpay Gateway, you can use [Razorpay Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md). Embed a Payment Button on your website by just adding a couple of lines of code. + + +## Types of Checkout + +Use this flow to decide whether to use Standard or Custom Checkout. You can also explore other available checkout options. + +![Decide which payment gateway or products to use based on the requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pg-to-use.jpg.md) + + + + - Customise the **Pay** button to fit your business needs using JavaScript-based method. + - Offers additional functions to automatically open and close the Checkout. + + Know more about [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + + + - Ideal if you want to fully customise your checkout UI. + - Design the entire payment flow the way you want. + + Know more about [Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). + + + - Quickly integrate Razorpay Payment Gateway using automatic checkout method (Quick Integration). + - **Pay** button is auto-generated and cannot be customised. + An HTML-based form with no support for JavaScript customisations. + - For more control on your integration, use [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + + Know more about [Quick Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/quick-integration.md). + + + - Use Server-to-Server (S2S) integration to communicate directly with the Razorpay servers and seamlessly integrate the service in your web application. + - Capture payment details and process them on your server. + - Complete control over the checkout design and payment experience. + - For S2S integration, contact the [Support team](https://razorpay.com/support/). + + +If you prefer not to use a Payment Gateway, explore other [Razorpay Products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md#accept-payments) that align with your business needs. + +## Integrate Payment Gateway - Web, Mobile, Ecommerce Plugins + +Razorpay offers a wide range of integrations as given below: + + + + + - **Razorpay Standard Checkout**: + + + - **Razorpay Custom Checkout**: + + + + + - **PHP**: + + + - **Ruby**: + + + - **Python**: + + + - **NodeJS**: + + + - **.NET**: + + + - **Java**: + + + - **Go**: + + + + + + + + + + - **Arastta**: + + + - **BigCommerce**: + + + - **Drupal**: + + + - **CS-Cart**: + + + - **Gravity Forms**: + + + - **Easy Digital Download**: + + + - **Magento**: + + + - **OpenCart**: + + + - **PrestaShop**: + + + - **Shopify**: + + + - **WHMCS**: + + + - **Wix**: + + + - **WooCommerce**: + + + - **WordPress**: + + + + + - **Razorpay Direct - Credit Card**: + + + + + + + + + - **Android SDK**: + + + - **iOS SDK**: + + + - **Cordova SDK**: + + + - **React Native SDK**: + + + - **Flutter SDK**: + + + - **Capacitor SDK**: + + + + + + +Watch all the Integration videos. [Watch Videos](https://www.youtube.com/playlist?list=PLQWuy5G1gIOoSr5Lo1Y12dXB8JbPOvfVR) + +## Supported Platforms + +Razorpay Payment Gateway is supported on the following platforms: + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + +> **WARN** +> +> +> **Watch Out!** +> +> Razorpay Checkout is not supported on Internet Explorer or in Internet Explorer mode in Edge. +> + +You can also view the **supported platforms** for the [other Razorpay products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md#product-suite). + +### Related Information + +- [How Payment Gateway works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Features](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features.md) + +- [Set up your Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#1-sign-up) +- [List of required KYC documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/business-types-kyc-documents.md) diff --git a/llm-content/payments/payment-gateway/android-integration/custom.md b/llm-content/payments/payment-gateway/android-integration/custom.md new file mode 100644 index 00000000..402bbd21 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom.md @@ -0,0 +1,89 @@ +--- +title: Integrate With Android Custom SDK +description: Customise the default Razorpay Checkout form for your Android apps using the Custom SDK libraries. +--- + +# Integrate With Android Custom SDK + +With Razorpay Android Custom SDK, you can customise the Razorpay Checkout UI. +- Customise the look-and-feel such as colors and themes of your app's Checkout form. +- Validate customer inputs such as card number, expiry date and others using the [Luhn check algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm). +- Configure and integrate the payment methods on the Checkout form. + +> **IMP** +> +> +> **Handy Tips** +> +> It is recommended to integrate with the [Razorpay Android Standard SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard.md) as it supports all payment methods by default. If you integrate with Custom Checkout SDK, you will need to integrate these manually. +> + +## List of Razorpay Android Custom SDK Versions (Last 5 versions) + +Version No. | Release Date | Changes +--- +3.9.22 | 07 Aug 2024 | **Feature**: Implemented Gradle bill-of-materials for Razorpay Plugins such as [OTP-Assist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/otp-assist.md). +--- +3.9.21 | 12 Apr 2024 | **Bug Fix**: `Application not responding` crash fix for UPI Intent payments +--- +3.9.20 | 13 Dec 2023 | **Feature**: Added auto-read and auto-submit features for card and native OTP payments in the [OTP-Assist SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/otp-assist.md) +--- +3.9.19 | 07 Nov 2023 | Changed the encryption mode +--- +3.9.18 | 22 Aug 2023 | **Feature**: Added a new GPG Key to sign all artifacts, allowing you to verify the downloaded artifacts using the [public key](https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xfc93fa80ce2cb687b7d4a9e1bdb7ee27d107b361) + +**Bug Fix**: `NullPointerException` fix in `isValidVpa` function during API timeouts + +> **SUCCESS** +> +> +> **Update SDK** +> +> Check your [current SDK version](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/troubleshooting-faqs.md#6-how-can-i-check-the-razorpay-android). If it is outdated, please [update the SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/troubleshooting-faqs.md#7-how-can-i-update-the-razorpay-android) to ensure uninterrupted settlements of your funds. +> +> From version 3.9.22 onwards, the latest version is automatically updated, eliminating the need for manual updates. +> + +## Sample Code + +Check the sample code on [GitHub](https://github.com/razorpay/razorpay-android-custom-sample-app) to integrate. + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#intent-flow). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md). +> + +## Prerequisites + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +- According to the PCI regulations, payment processing is not allowed on TLS v1. Hence, if the device does not have TLS v1.1 or v1.2, the SDK will throw an error in the onPaymentError method. Check the [TLS versions](https://developer.android.com/reference/javax/net/ssl/SSLSocket#default-configuration-for-different-android-versions). + +## Integration Steps + +Follow these integration steps: + +1. [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/build-integration.md) +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/test-integration.md) +3. [Go Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/go-live-checklist.md) + +### Related Information + +- [Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/troubleshooting-faqs.md) +- [Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/android-integration/custom/additional-features.md b/llm-content/payments/payment-gateway/android-integration/custom/additional-features.md new file mode 100644 index 00000000..677e8710 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/additional-features.md @@ -0,0 +1,234 @@ +--- +title: Additional Support for Payment Methods +description: Additional support features available for card, netbanking, wallets and more. +--- + +# Additional Support for Payment Methods + +Use the Razorpay Android Custom SDK to integrate supported payment methods on the Checkout form of your Android app as per your business requirements. Here are some **additional methods** provided by the SDK for the integration and usage of payment methods: + +- [Card Utilities](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/additional-features.md#card-utilities) +- [Validate VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/additional-features.md#validate-vpa) +- [Fetch Logo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/additional-features.md#logo) +- [Validate Data](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/additional-features.md#data-validation) +- [Custom `WebViewClient` and `WebChromeClient`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/additional-features.md#custom-webviewclient-and-webchromeclient) +- [Save Customer Data](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/additional-features.md#save-customer-data) + +## Card Utilities + +You can use these methods for card payment method integration. + +#### Fetch Card Network + + +The SDK provides a method to get the card network name of the provided card number. + +- At least 6 digits of the card number are required to identify the network. + +- Possible values returned by this method are, `visa`, `mastercard`, `maestro16`, `amex`, `rupay`, `maestro`, `diners` and `unknown`. + +- If it is not able to identify the network it returns `unknown`. + +```java: Java +razorpay.getCardNetwork(cardNumber); +``` + +## Card Number Validation + +The SDK provides a checksum-based method to determine if the entered card number is valid or not. + +```java: Java +razorpay.isValidCardNumber(cardNumber); +``` +#### Fetch Card Number Length for Card Network + +The SDK provides a method to get the length of the card number for a specific card network. + +```java: Java +razorpay.getCardNetworkLength(cardNetworkName); +``` + +## Validate VPA + +The SDK provides a method to determine if the entered Virtual Payment Address (VPA) is valid or not. A failure response is triggered when the `vpaAddress` is empty or the device is not connected to data to make the validation. + +```java: Java +razorpay.isValidVpa("9000090000@ybl", new ValidateVpaCallback() { + @Override + public void onResponse(JSONObject response) { + if(response.has("error")){ + //VPA validation error: Invalid VPA + }else if(response.has("success")){ + //VPA Validation Successful: Valid VPA + } + } + + @Override + public void onFailure() { + //called in cases where the vpaAddress is empty or when the device is not connected to data to make the validation. + } +}); +```java: Valid VPA +{ + "vpa": "9000090000@okaxis", + "success": true, + "customer_name": null +} +```java: Invalid VPA +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Invalid VPA. Please enter a valid Virtual Payment Address", + "source": "customer", + "step": "payment_initiation", + "reason": "invalid_vpa", + "metadata": {}, + "field": "vpa" + } +} +``` + +## Logo + +#### Fetch Bank Logo URL + +The SDK provides a method to fetch the bank logo's URL, here `bankCode` is the code of bank, you will be able to get it from the response received in `onPaymentMethodsReceived` callback. + +```java: Java +razorpay.getBankLogoUrl(bankCode); +``` + +#### Fetch Wallet Logo URL + +The SDK provides a method to get the wallet logo's URL. + +```java: Java +razorpay.getWalletLogoUrl(walletName); +``` + +#### Fetch Wallet Square Logo URL + +The SDK provides a method to get the wallet's square-shaped logo's URL. + +```java: Java +razorpay.getWalletSqLogoUrl(walletName); +``` + +## Data Validation + +The SDK provides basic validation for the payment data `JSONObject`. In case of a validation error, the SDK returns an error map in the `onValidationError` callback function. + +#### Sample Code + +The sample code shown below describes a validation error on the `contact` field: + +```java: Java +razorpay.validateFields(payload, new ValidationListener() { + @Override + public void onValidationSuccess() { + try { + webview.setVisibility(View.VISIBLE); + outerBox.setVisibility(View.GONE); + razorpay.submit(payload, PaymentOptions.this); + } catch (Exception e) { + Log.e("com.example", "Exception: ", e); + } + } + + @Override + public void onValidationError(Map error) { + Log.d("com.example", "Validation failed: " + error.get("field") + " " + error.get("description")); + Toast.makeText(PaymentOptions.this, "Validation: " + error.get("field") + " " + error.get("description"), Toast.LENGTH_SHORT).show(); + } +}); +``` + +## Custom WebViewClient and WebChromeClient + +Our SDK sets an instance of `RazorpayWebViewClient` and `RazorpayWebChromeClient` to the WebView passed to facilitate bank page optimizations. If you want to set your own custom `WebViewClient` you have to extend `RazorpayWebViewClient` and pass it to our SDK. + +> **WARN** +> +> +> +> **Watch Out!** +> +> This step is optional and is only required when you want to set a custom `WebViewClient`/`WebChromeClient` +> + +#### Sample Code + +The sample code given below shows how to customize the `RazorpayWebViewClient`: + +```java: Java +/** + * Extend the RazorpayWebViewClient for your custom hooks + */ +razorpay.setWebviewClient(new RazorpayWebViewClient(razorpay){ + + @Override + public void onPageStarted(WebView view, String url, Bitmap favicon) { + // Make sure you do not forget to call the super method + super.onPageStarted(view, url, favicon); + Log.d(TAG, "Custom client onPageStarted"); + } + + @Override + public void onPageFinished(WebView view, String url) { + // Make sure you do not forget to call the super method + super.onPageFinished(view, url); + Log.d(TAG, "Custom client onPageFinished"); + } +}); +``` + +Similarly, you can set your own `WebChromeClient`: + +```java: Java +/** + * Extend the RazorpayWebChromeClient for your custom hooks + */ +razorpay.setWebChromeClient(new RazorpayWebChromeClient() { + @Override + public void onProgressChanged(WebView view, int newProgress) { + // Make sure you do not forget to call the super method + super.onProgressChanged(view, newProgress); + customProgressBar.setProgress(newProgress); + } +}); + +``` + +## Save Customer Data + +You can associate card details with a saved customer or create payments using tokens for saved cards. To use this functionality, you must use [customer APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) at server side. + +#### Create a Payment With New Card + +While creating a payment with new card, you would need to pass the `customer_id` and `save` as extra fields, along with the other fields as shown below: + +```java: JAVA +JSONObject data = new JSONObject(); +data.put("amount", 29935); +data.put("customer_id", "cust_4lsdkfldlteskf"); +data.put("save", 1); +data.put("method", "card"); +data.put("card[name]", "Gaurav Kumar"); +data.put("card[number]", "4386289407660153"); +data.put("card[expiry_month]", "12"); +data.put("card[expiry_year]", "20"); +data.put("card[cvv]", "100"); +``` + +#### Create a Payment With Existing Saved Card + +To create a payment with an existing saved card, you have to pass the token instead of the card number, expiry and card holder's name fields as shown below: + +```java: JAVA +JSONObject data = new JSONObject(); +data.put("amount", 29935); +data.put("customer_id", "cust_4lsdkfldlteskf"); +data.put("token", "token_4zwefDSCC829ma"); +data.put("method", "card"); +data.put("card[cvv]", "100"); +``` diff --git a/llm-content/payments/payment-gateway/android-integration/custom/build-integration.md b/llm-content/payments/payment-gateway/android-integration/custom/build-integration.md new file mode 100644 index 00000000..f3140565 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/build-integration.md @@ -0,0 +1,845 @@ +--- +title: 1. Build Integration +description: Steps to integrate your Android application with Razorpay Android Custom SDK. +--- + +# 1. Build Integration + +Follow these steps to integrate your Android application with Razorpay Android Custom SDK: + +**1.1** [Install Razorpay Android Custom SDK](#11-install-razorpay-android-custom-sdk). + +**1.2** [Instantiate and Initialise Razorpay Android Custom SDK](#12-instantiate-and-initialise-razorpay-android-custom-sdk). + +**1.3** [Create an Order in Server](#13-create-an-order-in-server). + +**1.4** [Fetch Payment Methods](#14-fetch-payment-methods). + +**1.5** [Set Up WebView](#15-set-up-webview). + +**1.6** [Submit Payment Data and Handle Success and Error Events](#16-submit-payment-data-and-handle-success-and). + +**1.7** [Store Fields in Your Server](#17-store-fields-in-your-server). + +**1.8** [Verify Payment Signature](#18-verify-payment-signature). + +**1.9** [Verify Payment Status](#19-verify-payment-status). + +## 1.1 Install Razorpay Android Custom SDK + +Follow the steps given below to install the SDK in your Android project: + +- Add the code given below to your project's top-level `build.gradle` file: + This gives access to the SDK library. + + ```java: Java + dependencies { + implementation 'com.razorpay:customui:3.9.22' + } + ``` + + This adds the dependencies for the SDK. + +- If you are using SDK version 3.9.5 or below, download the file and add it to the libs directory. + +> **INFO** +> +> +> **Handy Tips** +> +> From version 3.9.22 onwards, the latest version is automatically updated, eliminating the need for manual updates. +> + +## 1.2 Instantiate and Initialise Razorpay Android Custom SDK + +#### Instantiate + +To instantiate Razorpay, pass a reference of your activity to the `Razorpay` constructor, as shown below: + +```java +import com.razorpay.Razorpay + +Razorpay razorpay = new Razorpay(activity); +``` +#### Proguard Rules + +If you are using Proguard for your builds, you need to add the following lines to your `proguard-rules.pro` file. + +```java: Java +-keepclassmembers class * { + @android.webkit.JavascriptInterface ; +} + +-keepattributes JavascriptInterface +-keepattributes *Annotation* + +-dontwarn com.razorpay.** +-keep class com.razorpay.** {*;} + +-optimizations !method/inlining/* + +-keepclasseswithmembers class * { + public void onPayment*(...); +} +``` + +#### Initialise + +Add your [API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) to `AndroidManifest.xml`. + + +> **WARN** +> +> +> +> **Watch Out!** +> +> API keys should not be hardcoded in the app. It should be sent from your server-side as an app-related metadata fetch. +> + +#### Sample Code + +For additional support on Payment Methods, such as fetching bank or wallet logos, fetching card network and information on how to validate card information, + +```xml: XML + + + + + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> The auto-OTP reading feature is available only for saved cards. Know more about [saved cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). +> + +To set your API key programmatically, that is, at the runtime instead of statically defining it in your `AndroidManifest.xml`, you can pass it as a parameter to the Razorpay constructor, as shown below: + +```java +Razorpay razorpay = new Razorpay(activity, "YOUR_KEY_ID"); +``` + +## 1.3 Create an Order in Server + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order using: + + + Use this endpoint to create an order using the Orders API. + + /orders + + ```curl: Curl + curl -X POST https://api.razorpay.com/v1/orders + -U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -H 'content-type:application/json' + -d '{ + "amount": 50000, + "currency": "", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230 + }' + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", ""); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + DATA = { + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } + } + client.order.create(data=DATA) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('receipt' => '123', 'amount' => 50000, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + ```csharp: .NET + RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.add("receipt", "order_rcptid_11"); + options.add("currency", ""); + Order order = client.Order.Create(options); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + options = amount: 50000, currency: '', receipt: '' + order = Razorpay::Order.create + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "", + receipt: "receipt#1", + notes: { + key1: "value3", + key2: "value2" + } + }) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "", + "receipt": "some_receipt_id" + } + body, err := client.Order.Create(data) + ``` + + ```json: Success Response + { + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 + } + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + + You can use the Postman workspace below to create an order: + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + + You can create an order manually by integrating the API sample codes on your server. + + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `22225`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of ₹7,000 is to be received from the customer in two installments of #1 - ₹5,000, #2 - ₹2,000, then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +## 1.4 Fetch Payment Methods + + You can accept payments through UPI, credit and debit cards, netbanking and wallets, as per the methods enabled on your account. + + - When you use Razorpay Android Standard SDK, you do not have to handle the availability of different payment methods. + + - When creating a Custom checkout form, you must ensure that only the methods activated for your account are displayed to the customer. + +To get a list of available payment methods, call `getPaymentMethods`. This fetches the list of payment methods asynchronously and returns the result in JSON format in the `onPaymentMethodsReceived` callback. + +#### Sample Code + +The following is an API used to fetch all enabled payment methods for a given API Key ID: + +```java: Payment Methods API +https://api.razorpay.com/v1/methods?key_id=[Your_Key_ID] +``` + +```java: Java +razorpay.getPaymentMethods(new PaymentMethodsCallback() { + @Override + public void onPaymentMethodsReceived(String result) { + JSONObject paymentMethods = new JSONObject(result); + } + + @Override + public void onError(String error){ + + } + }); +}); +```kotlin: Kotlin + razorpay?.getPaymentMethods(object : PaymentMethodsCallback { + override fun onPaymentMethodsReceived(result: String?) { + /** + * This returns JSON data + * The structure of this data can be seen at the following link: + * https://api.razorpay.com/v1/methods?key_id=rzp_test_XXXXXXXXXXXXXX + * + */ + Log.d("Result", "" + result) + inflateLists(result) + } + + override fun onError(error: String?) { + Log.e("Get Payment error", error) + } + }) +``` + +Check the various [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods.md) available with Razorpay Android Custom SDK. + +> **INFO** +> +> +> +> **Handy Tips** +> +> If you are using Subscriptions, you can pass the `subscription_id` in the options, which fetches subscription-related details along with the payment method. This saves you a network call to get amount for that `subscription_id`. Know more about [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md). +> + +## 1.5 Set Up WebView + +The bank ACS pages are displayed to the user in a WebView. +You need to define a WebView in your layout and pass the reference to our SDK using `setWebView`, as shown below: + +```java: Java +webview = findViewById(R.id.payment_webview); +// Hide the webview until the payment details are submitted +webview.setVisibility(View.GONE); +razorpay.setWebView(webview); +```kotlin: Kotlin +webView = findViewById(R.id.payment_webview) +private fun createWebView() { + razorpay?.setWebView(webView) + } +``` + +## 1.6 Submit Payment Data and Handle Success and Error Events + +Once you have received the customer's payment information, it needs to be sent to our API to complete the `creation` step of the payment flow. You can do this by invoking `submit` method. Before invoking this method, you have to make your webview visible to the customer. The data that needs to be submitted in the form of a `JSONObject` is shown below. + +```java: Java +try { + + JSONObject data = new JSONObject(); + data.put("amount", 50000); // pass in currency subunits. + data.put("currency", ""); // pass the currency code. + data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders API + data.put("email", ""); + data.put("contact", ""); + JSONObject notes = new JSONObject(); + notes.put("custom_field", "abc"); + data.put("notes", notes); + data.put("method", "netbanking"); + // Method specific fields + data.put("bank", "HDFC"); + + // Make webview visible before submitting payment details + webview.setVisibility(View.VISIBLE); + + razorpay.submit(data, new PaymentResultListener() { + @Override + public void onPaymentSuccess(String razorpayPaymentId) { + // Razorpay payment ID is passed here after a successful payment + } + + @Override + public void onPaymentError(int code, String description) { + // Error code and description is passed here + } + }); + +} catch (Exception e) { + Log.e(TAG, "Error in submitting payment details", e); +} +```kotlin: Kotlin +try { + payload = JSONObject( + "{currency: ''}") + payload.put("amount", "50000") + payload.put("contact", "9000090000") + payload.put("email", "") + } catch (e: Exception) { + e.printStackTrace() + } + try { + payload.put("method", "netbanking") + payload.put("bank", bankName) + sendRequest() + } catch (e: Exception) { + e.printStackTrace() + } + } + + override fun onPaymentError(errorCode: Int, errorDescription: String?) { + webView?.visibility = View.GONE + outerBox?.visibility = View.VISIBLE + Toast.makeText(this@PaymentOptions, "Error $errorCode : $errorDescription",Toast.LENGTH_LONG).show() + Log.e(TAG,"onError: $errorCode : $errorDescription") + } + + /** + * Is called if the payment was successful + * You can now destroy the webview + */ + override fun onPaymentSuccess(rzpPaymentId: String?) { + webView?.visibility = View.GONE + outerBox?.visibility = View.VISIBLE + Toast.makeText(this@PaymentOptions, "Payment Successful: $rzpPaymentId",Toast.LENGTH_LONG).show() + } + +``` + +Below is a complete list of Checkout form parameters: + +`key` _mandatory_ +: `string` API Key ID generated from **Dashboard** → **Account & Settings** → [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `10000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. For example, `INR`. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`description` _optional_ +: `string` Description of the product shown in the Checkout form. It must start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown in the Checkout form. Can also be a **base64** string, if loading the image from a network is not desirable. + +`order_id` _mandatory_ +: `string` Order ID generated via the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`method` _mandatory_ +: `string` The payment method used by the customer on Checkout. +Possible values: + - `card` (default) + - `upi` (default) + - `netbanking` (default) + - `wallet` (default) + - `emi` (default) + - `cardless_emi` (requires [approval](https://razorpay.com/support/#request)) + - `paylater` (requires [approval](https://razorpay.com/support/#request)) + - `emandate` (requires [approval](https://razorpay.com/support/#request)) + +`card` _mandatory if method=card/emi_ +: `object` The details of the card that should be entered while making the payment. + + `number` + : `integer` Unformatted card number. + + `name` + : `string` The name of the cardholder. + + `expiry_month` + : `integer` Expiry month for card in MM format. + + `expiry_year` + : `integer` Expiry year for card in YY format. + + `cvv` + : `integer` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `emi_duration` + : `integer` Defines the number of months in the EMI plan. + +`bank_account` _mandatory if method=emandate_ +: The details of the bank account that should be passed in the request. These details include bank account number, IFSC code and the name of the customer associated with the bank account. + + `account_number` + : `string` Bank account number used to initiate the payment. + + `ifsc` + : `string` IFSC of the bank used to initiate the payment. + + `name` + : `string` Name associated with the bank account used to initiate the payment. + +`bank` _mandatory if method=netbanking_ +: `string` Bank code. List of available banks enabled for your account can be fetched via [**methods**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#fetch-supported-methods). + +`wallet` _mandatory if method=wallet_ +: `string` Wallet code for the wallet used for the payment. Possible values: + - `payzapp` (default) + - `olamoney` (requires [approval](https://razorpay.com/support/#request)) + - `phonepe` (requires [approval](https://razorpay.com/support/#request)) + - `airtelmoney` (requires [approval](https://razorpay.com/support/#request)) + - `mobikwik` (requires [approval](https://razorpay.com/support/#request)) + - `jiomoney` (requires [approval](https://razorpay.com/support/#request)) + - `amazonpay` (requires [approval](https://razorpay.com/support/#request)) + - `paypal` (requires [approval](https://razorpay.com/support/#request)) + - `phonepeswitch` (requires [approval](https://razorpay.com/support/#request)) + +`provider` _mandatory if method=cardless_emi/paylater_ +: `string` Name of the cardless EMI provider partnered with Razorpay. + + Available options for Cardless EMI (requires [approval](https://razorpay.com/support/#request)): + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `zestmoney` + - `earlysalary` + - `walnut369` + + Available options for Pay Later: + - `lazypay` + - `paypal` + +`vpa` _mandatory if method=upi_ +: `string` UPI ID used for making the payment on the UPI app. + + +> **WARN** +> +> +> **Deprecation Notice** +> +> UPI Collect is deprecated effective 28 February 2026. This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [ migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md) to switch to UPI Intent. +> + +`callback_url` _optional_ +: `string` The URL to which the customer must be redirected upon completion of payment. The URL must accept incoming `POST` requests. The callback URL will have `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` as the request parameters for a successful payment. + +`redirect` _conditionally mandatory_ +: `boolean` Determines whether customer should be redirected to the URL mentioned in the +`callback_url` parameter. This is mandatory if `callback_url` parameter is used. Possible values: + - `true`: Customer will be redirected to the `callback_url`. + - `false`: Customer will not be redirected to the `callback_url` + +> **INFO** +> +> +> **Handy Tips** +> +> To reuse the Razorpay Checkout web integration inside a web view on Android or iOS, pass a [callback_url](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/callback-url.md) along with other checkout options to process the desired payment. +> + +#### Use PaymentResultWithDataListener + +You have the option to implement `PaymentResultListener` or `PaymentResultWithDataListener` to receive callbacks for the payment result. + +- `PaymentResultListener` provides only `payment_id` as the payment result. + +- `PaymentResultWithDataListener` provides additional payment data such as email and contact of the customer, along with the `order_id`, `payment_id`, `signature` and more. + +```java: Java +razorpay.submit(data, new PaymentResultWithDataListener() { + @Override + public void onPaymentSuccess(String razorpayPaymentId, PaymentData paymentData) { + // Razorpay payment ID and PaymentData passed here after a successful payment + } + + @Override + public void onPaymentError(int code, String description) { + // Error code and description is passed here + } + }); + +} catch (Exception e) { + Log.e(TAG, "Error in submitting payment details", e); +} +```kotlin: Kotlin +razorpay.submit(payload, object : PaymentResultWithDataListener { + override fun onPaymentSuccess(p0: String?, p1: PaymentData?) { + // Razorpay payment ID and PaymentData passed here after a successful payment + } + + override fun onPaymentError(p0: Int, p1: String?, p2: PaymentData?) { + // Error code and description is passed here + } +}) +``` + +## 1.7 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +## 1.8 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +## 1.9 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Integrate Payments Rainy Day Kit + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/test-integration.md) + +### Related Information +- [Integrate With Android Custom SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom.md) +- [Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods.md) +- [Troubleshooting & FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/troubleshooting-faqs.md) + +- [Additional Support for Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/additional-features.md) diff --git a/llm-content/payments/payment-gateway/android-integration/custom/go-live-checklist.md b/llm-content/payments/payment-gateway/android-integration/custom/go-live-checklist.md new file mode 100644 index 00000000..7ed01703 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/go-live-checklist.md @@ -0,0 +1,72 @@ +--- +title: 3. Go-live Checklist +description: Check the go-live checklist for Razorpay Custom Android integration. +--- + +# 3. Go-live Checklist + +Consider these steps before taking the integration live. + +## Accept Live Payments + +You can perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. However, make sure that you **swap the Test API Key with the Live Key**. + +Watch this video to generate an API Key in Live Mode. + +[Video: https://www.youtube.com/embed/30REpNtYSak] + +To generate an API Key in Live Mode: + +1. Log in to the Dashboard and switch to **Live Mode** on the menu. +2. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +3. Download the keys and save them securely. +4. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + +## Payment Capture + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +## Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/payment-gateway/android-integration/custom/google-data-safety.md b/llm-content/payments/payment-gateway/android-integration/custom/google-data-safety.md new file mode 100644 index 00000000..84b16d4d --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/google-data-safety.md @@ -0,0 +1,149 @@ +--- +title: Google Play Console - Data Safety +description: Guidelines for filling out Razorpay SDK-related data points in Google Play Data Safety form. +--- + +# Google Play Console - Data Safety + +The Data Safety section on the Google Play store enables merchants to help people understand what user data their app collects or shares. It also provides information of their app's key privacy and security practices. This helps users make more informed choices when installing apps. + +**By July 20, 2022**, all developers must declare how they collect and handle user data for the apps they publish on Google Play and provide details about how they protect this data through security practices like encryption. This includes data collected and handled through any third-party libraries or SDKs used in their apps. + +## Who is responsible for providing this data? + +Merchant is responsible for making complete and accurate declarations in their app's store listing on Google Play. Google Play reviews apps across all policy requirements. + +However, Google cannot determine how we use and handle the data on behalf of the developers. Only merchants possess all the information required to complete the Data Safety form. + +## Video Tutorial + +Watch this video to know how to fill out the Data Safety form. + +[Video: https://www.youtube.com/embed/pNAS_0IcHtM] + +## Data Safety + +After you log in to [Google Play Console](https://play.google.com/console/u/0/developers/app/app-content/summary), navigate to **App Content** → **Data Safety** and provide the relevant answers. These questions are categorised into three sub-sections as follows: + +1. [Data Collection and Security](#data-collection-and-security) +2. [Data Types](#data-types) +3. [Data Usage and Handling](#data-usage-and-handling) + +#### Data Collection and Security + +This section contains questions about data collection, security and handling practices. + +Question | Developer Response +--- +Does your app collect or share any of the required user data types? | - Yes: Answer **Yes** if you collect or share any [data types](#data-types). +- No: Answer **No** if your app does not collect or share any user data types. + +--- +Is all of the user data collected by your app encrypted in transit? | - Yes: Answer **Yes** if you encrypt all the data sent to your servers and other third parties. Razorpay SDK encrypts all data in transit. +- No: Answer **No** if your app or a third party does not encrypt the collected user data. + +--- +Do you provide a way for users to request that their data is deleted? | - Yes: Answer **Yes** if your app allows users to request the deletion of their data. Razorpay SDK allows users to delete data on request, provided the request meets regulatory guidelines. +- No: Answer **No** if you do not provide your users with an option to delete their data. + +#### Data Types + +The following table will help you with privacy declaration for data types concerning Razorpay SDKs. + +Category | Data Type | Razorpay SDK Guideline +--- +Location | Precise or Coarse location | **No**, Razorpay SDK does not collect approximate or precise location data. +--- +Personal info | Name | **Yes**, if you have configured to transmit this data to Razorpay. +--- +Personal info | Email Address | **Yes**, if you have configured to transmit this data to Razorpay. +--- +Personal info | User IDs | **Yes**, if you have configured to transmit this data to Razorpay. +--- +Personal info | Address | **Yes**, if you have configured to transmit this data to Razorpay. +--- +Personal info | Phone number | **Yes**, if you have configured to transmit this data to Razorpay. +--- +Personal info | Race and ethnicity | **No**, Razorpay does not collect this data. +--- +Personal info | Political or religious beliefs | **No**, Razorpay does not collect this data. +--- +Personal info | Sexual orientation | **No**, Razorpay does not collect this data. +--- +Personal info | Other info | **No**, Razorpay does not collect this data. +--- +Financial info | User payment info | **Yes**, Razorpay collects information about the user's financial accounts, such as credit card number. +--- +Financial info | Purchase history | **Yes**, if you have configured to transmit this data to Razorpay. +--- +Financial info | Credit score | **No**, Razorpay does not collect this data. +--- +Financial info | Other financial info | **No**, Razorpay does not collect this data. +--- +Health and fitness | Health info | **No**, Razorpay does not collect this data. +--- +Health and fitness | Fitness info | **No**, Razorpay does not collect this data. +--- +Messages | Emails | **No**, Razorpay does not collect this data. +--- +Messages | SMS or MMS | **No**, Razorpay does not collect this data. +--- +Messages | Other in-app messages | **No**, Razorpay does not collect this data. +--- +Photos or videos | Photos | **No**, Razorpay does not collect this data. +--- +Photos or videos | Videos | **No**, Razorpay does not collect this data. +--- +Audio files | Voice or sound recordings | **No**, Razorpay does not collect this data. +--- +Audio files | Music files | **No**, Razorpay does not collect this data. +--- +Audio files | Other audio files | **No**, Razorpay does not collect this data. +--- +Files and docs | Files and docs | **No**, Razorpay does not collect this data. +--- +Calendar | Calendar events | **No**, Razorpay does not collect this data. +--- +Contacts | Contacts | **No**, Razorpay does not collect this data. +--- +App activity | App interactions | **Yes**, Razorpay SDK collects app interaction on screens rendered by SDK. +--- +App activity | In-app search history | **No**, Razorpay does not collect this data. +--- +App activity | Installed apps | **Yes**, only detection of installed UPI apps is done to enable [UPI intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md) functionality. +--- +App activity | Other user-generated content | **Yes**, if you have configured to transmit this data to Razorpay. +--- +App activity | Other actions | **No**, Razorpay does not collect this data. +--- +Web browsing | Web browsing history | **No**, Razorpay does not collect this data. +--- +App info and performance | Crash logs | **Yes**, if you have configured to transmit this data to Razorpay. +--- +App info and performance | Diagnostics | **Yes**, if you have configured to transmit this data to Razorpay. +--- +App info and performance | Other app performance data | **Yes**, if you have configured to transmit this data to Razorpay. +--- +Device or other IDs | Device or other IDs | **Yes**, if you have configured to transmit this data to Razorpay. + +#### Data Usage and Handling + +#### Purpose of collecting information + +Data collected by our SDK will be used only for the purpose of enabling the user to use the services provided by us, to help promote a safe service, calibrate consumer interest in our products and services, inform you about online offers and updates, troubleshoot problems, customise the user experience, detect and protect us against error, fraud and other criminal activity, collect money, enforce our terms and conditions, and as otherwise described to you or the user at the time of collection of such information. + +#### Purpose of sharing information + +We do not share user's Personal Information with any third party apart from financial institutions such as banks, RBI, or other regulatory agencies (as may be required) and to provide users with services that we offer through Razorpay, conduct quality assurance testing, facilitate the creation of accounts, provide technical and customer support, or provide specific services, such as synchronisation of your contacts with other software applications, following your instructions. These third parties are not required to use the user's Personal Information other than to provide the services requested by the user. + +We may share users' Personal Information with our parent company, subsidiaries, joint ventures, or other companies under a common control (collectively, the "AFFILIATES") that we may have now or in the future, in which case we will require them to honour our Privacy Policy. If another company acquires our company or our assets, that company will possess your Personal Information, and will assume the rights and obligations with respect to that information as described in the Privacy Policy. We may disclose your Personal Information to third parties in a good faith belief that such disclosure is reasonably necessary to (a) take action regarding suspected illegal activities; (b) enforce or apply our terms and conditions and Privacy Policy; (c) comply with legal processes, such as a search warrant, subpoena, statute, or court order; or (d) protect our rights, reputation, and property, or that of our Users, Affiliates, or the public. Please note that we are not required to question or contest the validity of any search warrant, subpoena, or other similar governmental requests we receive. + +We may disclose information in the aggregate to third parties relating to user behaviour in connection with the actual or prospective business relationship with those third parties, such as advertisers and content distributors. For example, we may disclose the number of users that have been exposed to, or clicked on, advertising banners. + +## Privacy Link + +For more information about privacy links, refer to [Razorpay Privacy Policy](https://razorpay.com/privacy/). + +### Related Information + +[Google Play - Data Safety](https://support.google.com/googleplay/android-developer/answer/10787469?hl=en) diff --git a/llm-content/payments/payment-gateway/android-integration/custom/native-otp-integration.md b/llm-content/payments/payment-gateway/android-integration/custom/native-otp-integration.md new file mode 100644 index 00000000..0f07591c --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/native-otp-integration.md @@ -0,0 +1,361 @@ +--- +title: 1. Native OTP Integration +description: Integrate the Razorpay Native OTP feature with Android Custom Checkout. +--- + +# 1. Native OTP Integration + +Razorpay Payment Gateway supports one-time passwords (OTPs) at the Checkout itself, preventing the customers from being redirected to the ACS page of their respective issuing banks. + +## Advantages + +Using the Native OTP feature, you can: +- Increase success rates by up to 4%. +- Reduce payment failures due to low internet speeds. +- Avoid failures due to redirects to bank pages. +- Offer a consistent experience on mobile and web checkout. + +## Prerequisites + +Before implementing the Native OTP feature, check the following prerequisites: + +1. Log in to the Dashboard and generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md). +2. Integrate with the [Razorpay Android Custom SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom.md). + +## Integration Steps + +**1.1** [Update Razorpay Android Custom SDK version](#11-update-razorpay-android-custom-sdk-version). + +**1.2** [Implement `CardsFlowCallback` interface in the `getCardsFlow` function](#12-implement-cardsflowcallback-interface-in-getcardsflow-function). + +**1.3** [Call `razorpay.getCardOtpData(CardsFlowCallback)` Function.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/native-otp-integration.md#13-call-razorpaygetcardotpdata-cardsflowcallback-function) + +**1.4** [Handle Success and Error Events](#14-handle-success-and-error-events). + +**1.5** [Store Field in Server](#15-store-fields-in-server). + +**1.6** [Verify Payment Signature](#16-verify-payment-signature). + +### 1.1 Update Razorpay Android Custom SDK version + +Update the [Android Custom SDK version](https://rzp-1415-prod-mobile.s3.amazonaws.com/customui/razorpay-android-3.9.3.aar). This feature is available from version 3.9.3 and above. + +### 1.2 Implement CardsFlowCallback Interface in getCardsFlow Function + +Implement the `CardsFlowCallback` interface in the `getCardsFlow` function in the payment activity. +The SDK fires the `isNativeOtpEnabled` function and determines whether the native OTP flow is enabled for the BIN. + +#### Sample Code + +```java: Java +razorpay.getCardsFlow(payload, new CardsFlowCallback() { + @Override + public void isNativeOtpEnabled(boolean isNativeOtpEnabled) { + if (isNativeOtpEnabled) { + //this generates the OTP for the card holder + razorpay.getCardOtpData(this); + }else{ + //use your normal payment flow here + sendRequest(); + } + } +```kotlin: Kotlin +razorpay.getCardsFlow(payload, object : CardsFlowCallback() { + fun isNativeOtpEnabled(isNativeOtpEnabled: Boolean) { + if (isNativeOtpEnabled) { + //this generates the OTP for the card holder + razorpay.getCardOtpData(this) + } else { + //use your normal payment flow here + sendRequest() + } + } +``` + +### 1.3 Call razorpay.getCardOtpData(CardsFlowCallback) Function + +If Native OTP is enabled for BIN, you should call the `razorpay.getCardOtpData(CardsFlowCallback)` function. The SDK then fires the `otpGenerateResponse(boolean otpGenerated)` function and confirms if the OTP was successfully sent to the customer. Based on this information, you can display the generated OTP UI to the customer. + +After entering the OTP, the customer can either: +- **Submit OTP** + + The customer needs to submit the OTP for authenticating the payment. The customer receives the OTP through your application frontend. For card payments, the customer receives the OTP via their preferred notification medium, SMS or email. + + +> **INFO** +> +> +> **Handy Tips** +> +> Do not perform any validation on the length of the OTP since this can vary across banks. However, the OTP should not be blank. +> + +- **Request for OTP to be resent** + + There could be situations when customers have to re-enter the OTP sent to them. The bank determines the number of retries that the user is allowed. + +- **Cancel OTP** + + Cancel the payment by cancelling the OTP. + +#### Sample Code + +```java: Java +@Override + public void otpGenerateResponse(boolean otpGenerated) { + //check if otp was generated successfully and show UI + if (otpGenerated) { + //show UI to the user here + //will have submit_otp btn resend_otp btn & redirect_to_bank_page button + razorpay.otpSubmit(otpEnteredByUser,this);//for submitting OTP entered by USER, if payment was successful, the onPaymentSuccess function will be called. + razorpay.otpResend(this);//for resending the OTP to the user + razorpay.redirectToBankPage();//to open webview and redirect the user to bank page no callback for this + }else { + //otp wasn't generated call getCardOtpData again + razorpay.getCardOtpData(this); + } + } + @Override + public void otpResendResponse(boolean otpResent) { + //status response for otp_resend function, change UI accordingly + } + @Override + public void onOtpSubmitError(boolean otpSubmitError) { + //status response for error during otp submit. Wrong OTP, network issue, or timeout, this function will be called with the boolean + //change UI accordingly + } +```kotlin: Kotlin +fun otpGenerateResponse(otpGenerated: Boolean) { + //check if otp was generated successfully and show UI + if (otpGenerated) { + //show UI to the user here + //will have submit_otp btn resend_otp btn & redirect_to_bank_page button + razorpay.otpSubmit(otpEnteredByUser, this) //for submitting OTP entered by USER, if payment was successful, the onPaymentSuccess function will be called. + razorpay.otpResend(this) //for resending the OTP to the user + razorpay.redirectToBankPage() //to open webview and redirect the user to bank page no callback for this + } else { + //otp wasn't generated call getCardOtpData again + razorpay.getCardOtpData(this) + } + } + fun otpResendResponse(otpResent: Boolean) { + //status response for otp_resend function, change UI accordingly + } + fun onOtpSubmitError(otpSubmitError: Boolean) { + //status response for error during otp submit. Wrong OTP, network issue, or timeout, this function will be called with the boolean + //change UI accordingly + } +``` + +### 1.4 Handle Success and Error Events + +You must handle the payment success and error events as shown in the code sample below: + +```java: Java +try { + razorpay.submit(data, new PaymentResultListener() { + @Override + public void onPaymentSuccess(String razorpayPaymentId) { + // Razorpay payment ID is passed here after a successful payment + } + + @Override + public void onPaymentError(int code, String description) { + // Error code and description is passed here + } + }); + +} catch (Exception e) { + Log.e(TAG, "Error in submitting payment details", e); +} +```kotlin: Kotlin + override fun onPaymentError(errorCode: Int, errorDescription: String?) { + webView?.visibility = View.GONE + outerBox?.visibility = View.VISIBLE + Toast.makeText(this@PaymentOptions, "Error $errorCode : $errorDescription",Toast.LENGTH_LONG).show() + Log.e(TAG,"onError: $errorCode : $errorDescription") + } + + /** + * Is called if the payment was successful + * You can now destroy the webview + */ + override fun onPaymentSuccess(rzpPaymentId: String?) { + webView?.visibility = View.GONE + outerBox?.visibility = View.VISIBLE + Toast.makeText(this@PaymentOptions, "Payment Successful: $rzpPaymentId",Toast.LENGTH_LONG).show() + } + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> To reuse the Razorpay Checkout web integration inside a web view on Android or iOS, pass a [callback_url](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/callback-url.md) along with other checkout options to process the desired payment. +> + +#### Use `PaymentResultWithDataListener` + +You have the option to implement `PaymentResultListener` or `PaymentResultWithDataListener` to receive callbacks for the payment result. + +- `PaymentResultListener` provides only payment_id as the payment result. +- `PaymentResultWithDataListener` provides additional payment data such as email and contact of the customer, along with the `order_id`, `payment_id`, `signature` and more. + +```java: Java +razorpay.submit(data, new PaymentResultWithDataListener() { + @Override + public void onPaymentSuccess(String razorpayPaymentId, PaymentData paymentData) { + // Razorpay payment ID and PaymentData passed here after a successful payment + } + + @Override + public void onPaymentError(int code, String description) { + // Error code and description is passed here + } + }); + +} catch (Exception e) { + Log.e(TAG, "Error in submitting payment details", e); +} +``` + +## 1.5 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +## 1.6 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/test-native-otp-integration.md) diff --git a/llm-content/payments/payment-gateway/android-integration/custom/otp-assist.md b/llm-content/payments/payment-gateway/android-integration/custom/otp-assist.md new file mode 100644 index 00000000..2ac2707b --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/otp-assist.md @@ -0,0 +1,267 @@ +--- +title: Razorpay OTP-Assist | OTP Auto Read and Submit +heading: OTP-Assist +description: Steps to enable OTP auto-read and auto-submit on your Android app for payments that rely on OTP for completion. +--- + +# OTP-Assist + +With Razorpay OTP-Assist, your customers gain a faster and enhanced checkout experience with Razorpay OTP auto-read and auto-submit. The system automatically reads the OTP your customers receive, and with the customer's consent, auto-fills and auto-submits the OTP. It prevents errors and the users do not need to navigate or interact with additional elements to complete verification, making the process seamless. + +## Prerequisites + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +- Integrate with [Android Custom SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom.md). + +## Dependencies + +Add the following line in your `build.gradle`(app-level) file in the dependencies block: + +```java: Dependencies +dependencies{ + //other dependencies + implementation "com.razorpay:otp-assist:1.0.0"" + //other dependencies +} +``` + +## Integration Steps + +**1.** [OTP Auto-Submission](#step-1-otp-auto-submission). + +**2.** [Override onActivityResultReceived](#step-2-override-onactivityresultreceived). + +**3** [Reset All Objects](#step-3-reset-all-objects). + +### Step 1: OTP Auto-Submission + +You can use one of the options below based on your requirement: + +- [WebView-based Payments](#webview-based-payments): For card payments. +- [Business OTP Page-based Payments](#business-otp-page-based-payments): For native OTP payments. + +#### WebView-based Payments + +The `startSmsListener` function starts `SmsRetrieverClient` and attaches `BroadcastReceivers`, which notifies about the incoming SMS messages. Once the message is received and parsed, the OTP is auto-filled and subsequently auto-submitted on the page loaded in WebView. + +```java: Java +void startSmsListener(WebView webView) +```kotlin: Kotlin +fun startSmsListener(webView: WebView) +``` + +`WebView` +: `object` The object created by you and passed to Razorpay Custom Checkout SDK within which the ACS page loads. + +#### Sample Code + +Use the sample code given below: + +```java: Java +Razorpay razorpay = new Razorpay(PaymentActivity.this); +// RazorpayOtpAssist is initialized by Custom Checkout's Razorpay object internally + +// You need the UI Activity object here as RazorpayOtpAssist attaches a new fragment to display the timer + +// Other code + +razorpay.otpAssist.startSmsListener(webview); +razorpay.submit(cardsPayload, new PaymentResultWithDataListener() { + @Override + public void onPaymentSuccess(String razorpayPaymentID, PaymentData paymentData) {} + + @Override + public void onPaymentError(int code, String response, PaymentData paymentData) {} +}); +// Other code + +```kotlin: Kotlin +val razorpay = Razorpay(this@PaymentOptionsEditPayload) +// RazorpayOtpAssist is initialized by Custom Checkout's Razorpay object internally + +// You need the UI Activity object here as RazorpayOtpAssist attaches a new fragment to display the timer + +// Other code + +razorpay.otpAssist.startSmsListener(webView) +razorpay.submit(cardsPayload, object : PaymentResultWithDataListener { + override fun onPaymentSuccess(razorpayPaymentID: String?, paymentData: PaymentData?) {} + override fun onPaymentError(code: Int, response: String?, paymentData: PaymentData?) {} +}) +// Other code +``` + +#### Business OTP Page-based Payments + +Razorpay offers Native OTP solutions where you can submit the OTP by calling the API provided by the Razorpay Custom Checkout SDK. To enable OTP auto-read and auto-submit of payments with this feature, we use a separate function that uses an interface to send the callback to you once the OTP is received. + +```java: Java +public interface OtpListener { + void onOtpReceived(String sender, String body, String otp); + void onOtpConfirmed(String sender, String body, String otp); +} +```kotlin: Kotlin +interface OtpListener { + fun onOtpReceived(sender: String, body: String, otp: String) + fun onOtpConfirmed(sender: String, body: String, otp: String) +} +``` + +`OtpListener` +: `object` Acts as a callback, triggered when the OTP is received and parsed after the timer is displayed. + + `onOtpReceived` + : Triggered when the message is received and the SDK extracts OTP. Values: + - `sender`: Sender of the message (default: razorpay). + - `body`: The entire message. + - `OTP`: OTP pin extracted from the message. + + `onOtpConfirmed` + : Triggered when the timer for OTP Auto-submit is allowed/confirmed by the user. Values: + - `sender`: Sender of the message (default: razorpay). + - `body`: The entire message. + - `OTP`: OTP pin extracted from the message. + +#### Sample Code + +Use the sample code given below: + +```java: Java +Razorpay razorpay = new Razorpay(PaymentActivity.this); +// Other code + +razorpay.getCardsFlow(cardsPayload, new CardsFlowCallback() { + @Override + public void isNativeOtpEnabled(boolean isNativeOtpEnabled) { + if (isNativeOtpEnabled) { + razorpay.getCardOtpData(this); + } + } + + @Override + public void otpGenerateResponse(boolean otpGenerated) { + if (otpGenerated) { + razorpay.otpAssist.startSmsListener(new OtpListener() { + @Override + public void onOtpReceived(@NonNull String sender, @NonNull String body, @NonNull String otp) { + // Fill {otp} in the input field + } + + @Override + public void onOtpConfirmed(String sender, String body, String otp) { + razorpay.otpSubmit(otp, this); + } + }); + } + } + + @Override + public void otpResendResponse(boolean otpResent) {} + + @Override + public void onOtpSubmitError(boolean otpSubmitError) {} +}); + +// Other code +```kotlin: Kotlin +val razorpay = Razorpay(this@PaymentOptionsEditPayload) +// Other code + +razorpay.getCardsFlow(cardsPayload, object : CardsFlowCallback { + override fun isNativeOtpEnabled(isNativeOtpEnabled: Boolean) { + if (isNativeOtpEnabled) { + razorpay.getCardOtpData(this) + } + } + + override fun otpGenerateResponse(otpGenerated: Boolean) { + razorpay.otpAssist.startSmsListener(object : OtpListener { + override fun onOtpReceived(sender: String, body: String, otp: String) { + // Fill {otp} in the input field + } + + override fun onOtpConfirmed(sender: String, body: String, otp: String) { + razorpay.otpSubmit(otp, this) + } + }) + } + + override fun otpResendResponse(otpResent: Boolean) {} + + override fun onOtpSubmitError(otpSubmitError: Boolean) {} +}) + +// Other code +``` + +## Step 2: Override onActivityResultReceived + +When the application does not use the `RECEIVE_SMS` permission, we use the `SmsRetreiverClient` API provided by Google, which enables the user to give a one-time consent for the application to read the incoming message. + +The user’s response for the one-time consent is passed to the activity’s `onActivityResult` function. Since the SDK cannot override this, we request you send this data to us. + +```java: Java +void onActivityResult(String requestCode, String resultCode, Intent data) +```kotlin: Kotlin +fun onActivityResult(requestCode: String, resultCode: String, data: Intent) +``` + +`requestCode` +: `string` Passed by `RazorpayOtpAssist` SDK when the `startActivityForResult` is triggered. + +`resultCode` +: `string` Contains user-selected action. + +`data` +: `intent` Contains data from the user-selected action. + +#### Sample Code + +Use the sample code given below: + +```java: Java +@Override +protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + razorpay.onActivityResult(requestCode, resultCode, data); +} +```kotlin: Kotlin +override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { + super.onActivityResult(requestCode, resultCode, data) + razorpay.onActivityResult(requestCode, resultCode, data) +} +``` + +## Step 3: Reset All Objects + +You can use this function to destroy all objects used by the `RazorpayOtpAssist` SDK to avoid leaks or when starting a new transaction with the same Razorpay object. + +```java: Java +void reset() +```kotlin: Kotlin +fun reset() +``` + +#### Sample Code + +Use the code given below: + +```java: Reset +//other code +razorpay.otpAssist.reset() +//other code +``` + +> **INFO** +> +> +> **Handy Tips** +> +> We recommend using the existing Razorpay object for the following reasons: +> +> - You need not manage creating and deleting the `RazorpayOtpAssist` object. The Custom Checkout SDK handles this for you. +> - The Custom Checkout SDK becomes a singular entry point to use all Razorpay-powered features. This simplifies your integration process and improves the checkout experience for your customers. +> diff --git a/llm-content/payments/payment-gateway/android-integration/custom/override-minimum-sdk.md b/llm-content/payments/payment-gateway/android-integration/custom/override-minimum-sdk.md new file mode 100644 index 00000000..5c2a0bc0 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/override-minimum-sdk.md @@ -0,0 +1,16 @@ +--- +title: Override Minimum SDK Version +description: Override the minimum value of SDK version. +--- + +# Override Minimum SDK Version + +- `minSdkVersion` is the minimum version of the Android operating system required to run your application. The Android app must have a minimum SDK version 19 or higher. + +- If you want to support devices below API level 19, you must override `minSDK` version. + +#### Sample Code to Override minSDK Version + +```js: Override MinSDK Version + +``` diff --git a/llm-content/payments/payment-gateway/android-integration/custom/payment-methods.md b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods.md new file mode 100644 index 00000000..12678443 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods.md @@ -0,0 +1,900 @@ +--- +title: Payment Methods +description: Integrate different payment methods in Razorpay Android Custom SDK Checkout. +--- + +# Payment Methods + +The Razorpay Android Custom SDK lets you integrate the supported payment methods on your Android app's Checkout form. + +## Fetch Payment Methods + +Use the [Fetch Payment Methods API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/build-integration.md#14-fetch-payment-methods) to fetch the payment methods available for your account. + +Below are the sample payloads for each payment method. + +## Bank Transfer + +This payment method allows you to display your Customer Identifier details on checkout. Your customers can make online bank transfers to this account. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +There are no specific request parameters to be passed. Instead, you must pass the `fetchVirtualAccount` method for your Customer Identifier to get created and the details to appear on the checkout. Know more about [integrating bank transfer with Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer/custom-integration.md). + +## Debit and Credit Card + +For Card payments, `method` should be specified as `card`. Other required fields: + +- `card[name]` +- `card[number]` +- `card[cvv]` +- `card[expiry_month]` +- `card[expiry_year]` + +#### Sample Code + +The sample code shown below allows the checkout to accept a card payment of . + +```java: Java +JSONObject data = new JSONObject(); +data.put("amount", 29935); +data.put("currency", ""); +data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders API +data.put("email", ""); +data.put("contact", ""); +data.put("method", "card"); +data.put("card[name]", ""); +data.put("card[number]", ""); +data.put("card[expiry_month]", "12"); +data.put("card[expiry_year]", "30"); +data.put("card[cvv]", "100"); +```kotlin: Kotlin +val data = JSONObject() +data.put("amount", 29935) +data.put("amount", "") +data.put("order_id", "order_DgZ26rHjbzLLY2") //sample order_id. Generate orders using Orders API +data.put("email", "") +data.put("contact", "") +data.put("method", "card") +data.put("card[name]", "") +data.put("card[number]", "") +data.put("card[expiry_month]", "12") +data.put("card[expiry_year]", "30") +data.put("card[cvv]", "100") +``` + +Check the [list of supported cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md#supported-cards). + +If you want to securely store customer's card details as network tokens, know about [Saved Cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards.md). + +## EMI on Debit and Credit Cards + +For EMI, `method` should be specified as `emi`. Add an additional field, `emi_duration`, corresponding to the number of months for EMI. After a customer selects the desired plan, pass the corresponding value in the `emi_duration` field. + +#### Sample Code + +The sample code below allows checkout to accept a card payment of ₹3999.35: + +```java: Java +JSONObject data = new JSONObject(); +data.put("amount", 399935); +data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders API +data.put("email", ""); +data.put("contact", ""); +data.put("method", "emi"); +data.put("emi_duration", 2); //defines the number of months for the EMI. +data.put("card[name]", ""); +data.put("card[number]", ""); +data.put("card[expiry_month]", "12"); +data.put("card[expiry_year]", "30"); +data.put("card[cvv]", "100"); +```kotlin: Kotlin +val data = JSONObject() +data.put("amount", 399935) +data.put("order_id", "order_DgZ26rHjbzLLY2") //sample order_id. Generate orders using Orders API +data.put("email", "") +data.put("contact", "") +data.put("method", "emi") +data.put("emi_duration", 2) //defines the number of months for the EMI. +data.put("card[name]", "") +data.put("card[number]", "") +data.put("card[expiry_month]", "12") +data.put("card[expiry_year]", "30") +data.put("card[cvv]", "100") +``` + +Check the list of supported [debit card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md#supported-banks-for-debit-card-emis) and [credit card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md#supported-payment-partners) EMI providers. + +## Cardless EMI + +Cardless EMI is a payment method that allows customers to convert their payment amount to EMIs. The customer does not require a debit or credit card. They can make payments via credits approved by the supported Cardless EMI payment provider. +For Cardless EMI, `method` should be specified as `cardless_emi` and an additional field `provider` must specify the provider with its respective provider code. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +> **WARN** +> +> +> +> **Watch Out!** +> +> The customer should be registered with the cardless EMI payment provider before making the payment. +> + +#### Sample Code + +The sample code below allows checkout to accept a card payment of ₹5999.35: + +```java: Java +JSONObject payload = new JSONObject("{\"currency\":\"\"}"); +payload.put("amount", 599935); +payload.put("contact", ""); +payload.put("order_id", "order_9A33XWu170gUtm"); +payload.put("email", ""); +payload.put("method", "cardless_emi"); +payload.put("provider", "walnut369"); +```kotlin: Kotlin +val payload = JSONObject("{\"currency\":\"\"}") +payload.put("amount", 599935) +payload.put("contact", "") +payload.put("order_id", "order_9A33XWu170gUtm") +payload.put("email", "") +payload.put("method", "cardless_emi") +payload.put("provider", "walnut369") +``` + +Check the [list of supported Cardless EMI providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md#supported-payment-partners). + +## Netbanking + +For Netbanking, `method` should be specified as `netbanking` and an additional field `bank` must specify the bank with its respective bank code. +#### Sample Code + +The sample code shown below allows the checkout to perform a netbanking transaction for a payment of ₹299.35: + +```java: Java +JSONObject data = new JSONObject(); +data.put("amount", 29935); +data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders API +data.put("email", ""); +data.put("contact", ""); +data.put("method", "netbanking"); +data.put("bank", "SBIN"); +```kotlin: Kotlin +val data = JSONObject() +data.put("amount", 29935) +data.put("order_id", "order_DgZ26rHjbzLLY2") //sample order_id. Generate orders using Orders API +data.put("email", "") +data.put("contact", "") +data.put("method", "netbanking") +data.put("bank", "SBIN") +``` + +Check the [list of supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + +## Pay Later + +You can enable your customers to make payments using the **Pay Later** service offered by various third-party providers. +For pay later, `method` should be specified as `paylater` and an additional field `provider` must specify the provider with its respective provider code. + +#### Sample Code + +Use the sample code given below: + +```java: Java +JSONObject payload = new JSONObject("{\"currency\":\"\"}"); +payload.put("amount",5000); +payload.put("contact",""); +payload.put("order_id","order_9A33XWu170gUtm"); +payload.put("email", ""); +payload.put("method", "paylater"); +payload.put("provider", "lazypay"); +```kotlin: Kotlin +val payload = JSONObject("{\"currency\":\"\"}") +payload.put("amount", 5000) +payload.put("contact", "") +payload.put("order_id", "order_9A33XWu170gUtm") +payload.put("email", "") +payload.put("method", "paylater") +payload.put("provider", "lazypay") +``` + +Check the [list of Pay Later providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md#providers). + +## Wallet + +For Wallet payments, `method` should be specified as `wallet`. + +#### Sample Code + +The sample code shown below allows the checkout to perform a wallet transaction for a payment of : + +```java: Java +JSONObject data = new JSONObject(); +data.put("amount", 29935); +data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders API +data.put("email", ""); +data.put("contact", ""); +data.put("method", "wallet"); +data.put("wallet", "mobikwik"); +```kotlin: Kotlin +val data = JSONObject() +data.put("amount", 29935) +data.put("order_id", "order_DgZ26rHjbzLLY2") //sample order_id. Generate orders using Orders API +data.put("email", "") +data.put("contact", "") +data.put("method", "wallet") +data.put("wallet", "mobikwik") +``` + +Check the list [Wallets supported by Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + +## UPI + +For UPI payments, `method` should be specified as `upi`. The SDK supports two flows: + +1. Intent +2. Collect + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#intent-flow). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md). +> + +#### Intent Flow + +> **INFO** +> +> +> **Handy Tips** +> +> If your application targetSdkVersion is 30 or above, add the following code in your app's manifest file to support the UPI Intent flow. +> +> ```xml: AndroidManifest.xml +> +> +> +> +> +> Specific intents you query for, +> eg: for a custom share UI +> --> +> +> +> +> +> ``` +> + +In Intent Flow, the SDK invokes a UPI intent, which is handled by the UPI apps installed on the Android device. + +To implement this flow: + +1. Fetch a list of apps on the customer's device that support UPI payments and Autopay using the sample codes given below: + + - Fetch list of UPI Supported Apps + + ```java: Java + Razorpay.getAppsWhichSupportUpi(this, new RzpUpiSupportedAppsCallback() { + @Override + public void onReceiveUpiSupportedApps(List list) { + // List of upi supported app + } + }); + ```kotlin: Kotlin + Razorpay.getAppsWhichSupportUpi(this) { appList->{ // List of upi supported app + } + } + ``` + + - Fetch list of UPI Autopay Supported Apps + + ```java: Java + Razorpay.getAppsWhichSupportAutopayIntent(this, new RzpUpiSupportedAppsCallback() { + @Override + public void onReceiveUpiSupportedApps(List applicationDetailsList) { + } + }); + ```kotlin: Kotlin + Razorpay.getAppsWhichSupportAutopayIntent(this) { appList->{ + //List of autopay supported Apps + } + } + ``` + +2. Override the `onActivityResult()` of your activity and pass the same to our SDK: + + ```java: Java + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data){ + super.onActivityResult(requestCode, resultCode, data); + if(razorpay!=null){ + razorpay.onActivityResult(requestCode,resultCode,data); + } + } + ```kotlin: Kotlin + override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { + super.onActivityResult(requestCode, resultCode, data) + if (razorpay != null) { + razorpay.onActivityResult(requestCode, resultCode, data) + } + } + ``` + +3. Invoke the UPI and UPI Autopay Intent with the sample codes given below. This will enable the customer to select the desired application. + + - Invoke UPI Intent + + ```java: Java + JSONObject data = new JSONObject(); + data.put("amount", 29935); + data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders API + data.put("email", ""); + data.put("contact", ""); + data.put("method", "upi"); + data.put("_[flow]", "intent"); + data.put("upi_app_package_name", "in.org.npci.upiapp"); //For BHIM app + ```kotlin: Kotlin + val data = JSONObject() + data.put("amount", 29935) + data.put("order_id", "order_DgZ26rHjbzLLY2") //sample order_id. Generate orders using Orders API + data.put("email", "") + data.put("contact", "") + data.put("method", "upi") + data.put("_[flow]", "intent") + data.put("upi_app_package_name", "in.org.npci.upiapp") //For BHIM app + ``` + + - Invoke UPI Autopay Intent (Default) + + ```java: Java + JSONObject data = new JSONObject("{currency: ''}"); + data.put("amount", "10000"); + data.put("contact", ""); + data.put("email", ""); + data.put("order_id", "order_DgZ26rHjbzLLY2");// mandatory for UPI Autopay payments + data.put("customer_id", "cust_805c8oBQdBGPwS");// mandatory for UPI Autopay payments + data.put("recurring", "1"); + data.put("description","Credits towards consultation"); + data.put("method", "upi"); + data.put("_[flow]", "intent"); + data.put("upi_app_package_name","com.google.android.apps.nbu.paisa.user"); // pass package name that is returned in getAppsWhichSupportUpi and/or getAppsWhichSupportUpiAutopay + ```kotlin: Kotlin + val data = JSONObject("{currency: ''}") + data.put("amount", "10000") + data.put("contact", "") + data.put("email", "") + data.put("order_id", "order_DgZ26rHjbzLLY2") // mandatory for UPI Autopay payments + data.put("customer_id", "cust_805c8oBQdBGPwS") // mandatory for UPI Autopay payments + data.put("recurring", "1") + data.put("description", "Credits towards consultation") + data.put("method", "upi") + data.put("_[flow]", "intent") + data.put("upi_app_package_name", "com.google.android.apps.nbu.paisa.user") // pass package name that is returned in getAppsWhichSupportUpi and/or getAppsWhichSupportUpiAutopay + ``` + + - Preferred Payload for Recurring: In the sample code below, `recurring` is passed as `preferred`. It initiates a flow in SDK where, if a selected app supports Autopay payments, the payment passes via the Autopay payment route. If it does not, then it passes via the one-time payment route. + + ```java: Java + JSONObject data = new JSONObject("{currency: ''}"); + data.put("amount", "10000"); + data.put("contact", ""); + data.put("email", ""); + data.put("order_id", "order_DgZ26rHjbzLLY2");// mandatory for UPI Autopay payments + data.put("customer_id", "cust_805c8oBQdBGPwS");// mandatory for UPI Autopay payments + data.put("recurring", "preferred"); + data.put("description","Credits towards consultation"); + data.put("method", "upi"); + data.put("_[flow]", "intent"); + data.put("upi_app_package_name","com.google.android.apps.nbu.paisa.user"); // pass package name that is returned in getAppsWhichSupportUpi and/or getAppsWhichSupportUpiAutopay + ```kotlin: Kotlin + val data = JSONObject("{currency: ''}") + data.put("amount", "10000") + data.put("contact", "") + data.put("email", "") + data.put("order_id", "order_DgZ26rHjbzLLY2") // mandatory for UPI Autopay payments + data.put("customer_id", "cust_805c8oBQdBGPwS") // mandatory for UPI Autopay payments + data.put("recurring", "preferred") + data.put("description", "Credits towards consultation") + data.put("method", "upi") + data.put("_[flow]", "intent") + data.put("upi_app_package_name", "com.google.android.apps.nbu.paisa.user") // pass package name that is returned in getAppsWhichSupportUpi and/or getAppsWhichSupportUpiAutopay + ``` + +Check the complete list of [UPI supported apps and their package names](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/supported-apps.md). + +#### Customise Order of Apps + +In the Intent Flow, you can customise the order in which UPI apps appear at the Checkout. There are two sections within the app: **Preferred Apps** and **Other Apps**. + +To define the order in which apps appear under these sections of the app chooser, two lists that contain the application package names must be passed to the SDK within `options`. + +1. Preferred apps list +2. Other apps list + +**PREFERRED APPS Section** + +This section displays the list of applications specified using the key `preferred_apps_order` within options. If no application exists for this key, this section is not displayed. + +**OTHER APPS Section** + +The list of applications specified using the key `other_apps_order` within options is displayed under this section. Any unspecified app (which supports UPI intent) appears subsequent to the list passed in the options. + +#### Sample Code + +In the sample code below, **BHIM** (in.org.npci.upiapp) is passed in the **preferred apps list** and **Google Pay**(com.google.android.apps.nbu.paisa.user) in *other apps list*. As a result, *BHIM* is shown in the **PREFERRED APPS SECTION**. **Google Pay** is shown at the top in the **OTHER APPS SECTION** followed by other apps present in the device: + +```java: Java +JSONArray prefAppsJArray = new JSONArray(); +prefAppsJArray.put("in.org.npci.upiapp"); + +JSONArray otherAppsJArray = new JSONArray(); +otherAppsJArray.put("com.google.android.apps.nbu.paisa.user"); + +payload.put("method", "upi"); +payload.put("_[flow]", "intent"); +payload.put("preferred_apps_order", prefAppsJArray); +payload.put("other_apps_order", jArray); +``` + +#### Collect Flow + +Customers enter their `vpa` or [phone number](#upi-payments-using-phone-number) on your UI and complete the payments on their respective UPI apps in collect flow. + +You can now pass the `vpa` parameter in the `upi` array as shown below. + +#### Sample Code + +The sample code below sends a collect request to `gaurav.kumar@exampleupi` handle. + +```java: Java +JSONObject data = new JSONObject(); +data.put("amount", 29935); +data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders API +data.put("email", ""); +data.put("contact", ""); +data.put("method", "upi"); +data.put("vpa", "gaurav.kumar@exampleupi"); +```kotlin: Kotlin +val data = JSONObject() +data.put("amount", 29935) +data.put("order_id", "order_DgZ26rHjbzLLY2") //sample order_id. Generate orders using Orders API +data.put("email", "") +data.put("contact", "") +data.put("method", "upi") +data.put("vpa", "gaurav.kumar@exampleupi") +``` + + +### UPI Payments Using Phone Number + + You can accept UPI payments using phone number for the collect flow. Follow the steps given below: + + 1. You must collect the customer's phone number from your end. + 2. Check if any `vpa` is associated with the given number and get the `vpa_token` for that number using the sample code given below: + ```java: Java + razorpay.isValidVpa("", new ValidateVpaCallback() { + @Override + public void onResponse(JSONObject response) { + if (response.has("error")) { + // Error: no VPA associated with the given number + } else if (response.has("success")) { + // VPA Validation Successful + // Get and store response.vpa_token for initiating payment + // You will get response.masked_vpa in this response which you can show to the end user + } + } + + @Override + public void onFailure() { + // Called in cases where the number is empty or when the device is not connected to data to make the validation + } + }); + ```kotlin: Kotlin + razorpay.isValidVpa("", object : ValidateVpaCallback { + override fun onResponse(response: JSONObject?) { + response?.let { + if (it.has("error")) { + // Error: no VPA associated with the given number + } else if (it.has("success")) { + // VPA Validation Successful + // Get and store response.vpa_token for initiating payment + // You will get response.masked_vpa in this response which you can show to the end user + } + } + } + + override fun onFailure() { + // Called in cases where the number is empty or when the device is not connected to data to make the validation + } + }) + ``` + 3. Pass the `vpa_token` parameter in the `upi` array as shown below: + ```java: Java + JSONObject data = new JSONObject(); + data.put("amount", 29935); + data.put("order_id", "order_DgZ26rHjbzXXXX");//sample order_id. Generate orders using Orders API + data.put("email", ""); + data.put("contact", ""); + data.put("method", "upi"); + data.put("vpa_token", "f731951149df8903d374b117f921ab41"); + ```kotlin: Kotlin + val data = JSONObject() + data.put("amount", 29935) + data.put("order_id", "order_DgZ26rHjbzXXXX") //sample order_id. Generate orders using Orders API + data.put("email", "") + data.put("contact", "") + data.put("method", "upi") + data.put("vpa_token", "f731951149df8903d374b117f921ab41") + ``` + + +#### Turbo UPI + +Make UPI payments a faster, 2-step experience for your customers with Razorpay's Turbo UPI SDK. + +1. [Turbo UPI Headless Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui.md) +2. [Turbo UPI UI Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui.md) + +Know more about the [Customer Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi.md). + +## CRED + +Customers can make payments on your Android app using their CRED Coins as well as the credit cards saved on CRED. The SDK supports two flows: +1. [Intent](#intent-flow-1) +2. [Collect](#collect-flow-1) + +> **INFO** +> +> +> **Handy Tips** +> +> Ensure you have integrated with Razorpay Android SDK version 3.9.0 or higher. +> + +#### Prerequisites + +You need to pass the `app_offer` parameter in the Orders API. + + /orders + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true +}' +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true + }) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => 'receipt#1', 'amount' => 1000, 'currency' => 'INR', 'app_offer'=> true)); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 1000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("app_offer", true); +Order order = client.Order.Create(options); + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000, + currency: "INR", + receipt: "receipt#1", + app_offer: true +}) + +```go: go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true +} +body, err := client.Order.Create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 1000, currency: 'INR', receipt: 'receipt#1', app_offer: true + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); // amount in the smallest currency unit +orderRequest.put("currency", "INR"); +orderRequest.put("receipt", "receipt#1"); +orderRequest.put("app_offer", true); + +Order order = razorpay.orders.create(orderRequest); + +```json: Response +{ + "id": "order_FNPoKwCtPyhJOt", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1596703420 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Default is `INR`. + +`app_offer` _optional_ +: `boolean` Allow/do not allow customers to use CRED coins to make payments. This is used to prevent double discounting scenarios where customers have already availed discounts using voucher/coupon, and you do not want them to redeem Coins as well. Possible values: + - `true`: Customer not allowed to use CRED coins to make payment. + - `false` (default): Customer can use CRED coins to make payment. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Intent Flow + +The Android SDK performs the following functions to invoke the intent on the Android device: +- Handles the intent response from CRED +- Opens the CRED app +- Process the payment +- Send success or failure response back to your app + +To use this flow: +1. [Detect presence of CRED app on customer's Android device](#1-detect-presence-of-cred-app). +2. [Create a payment](#2-create-payment). +3. [Implement PaymentResultWithDataListener Method](#3-implement-paymentresultwithdatalistener-method). + +#### 1. Detect Presence of CRED App + +Use the below code to check if the CRED app is present in the customer's Android device. `Razorpay.isCredAppInstalled(activity)` returns a boolean value, disclosing whether the app is present on the device or not. + +```java: Java +if (Razorpay.isCredAppInstalled(PaymentOptions.this)) { + payWithCredBtn.setText("CRED Pay (Intent Flow)"); +} else { + payWithCredBtn.setText("CRED Pay (Collect Flow)"); +} +```kotlin: Kotlin +if (Razorpay.isCredAppInstalled(this@PaymentOptions)) { + payWithCredBtn.setText("CRED Pay (Intent Flow)"); +} else { + payWithCredBtn.setText("CRED Pay (Collect Flow)"); +} +``` + +#### 2. Create Payment + +After you receive the customer's app information, send it to the Razorpay API to complete the creation step of the payment flow. Below is the payload(JSON Object) to be sent: + +```java: Java +razorpay.submit(payload,activityObject) + +JSONObject data = new JSONObject("{currency:'INR'}"); +data.put("amount", 29935); +data.put("order_id", "order_DgZ26rHjbzLLY2"); +data.put("email", "gaurav.kumar@example.com"); +data.put("contact", "9000090000"); +data.put("method", "app"); +data.put("provider", "cred"); +data.put("app_present", true); +```kotlin: Kotlin +val data = JSONObject("{currency:'INR'}") +data.put("amount", 29935) +data.put("order_id", "order_DgZ26rHjbzLLY2") +data.put("email", "gaurav.kumar@example.com") +data.put("contact", "9000090000") +data.put("method", "app") +data.put("provider", "cred") +data.put("app_present", true) +``` + +#### Request Parameters + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it must be `app`. + +`provider` _mandatory if method=app_ +: `string` Name of the PSP app. Here, it must be `cred`. + +`app_present` _mandatory if app=cred_ +: `boolean` Based upon response from the app present function, pass the value in this field. Possible values: + - `true`: Opens the CRED app on customer's device. + - `false` (default): Sends a push notification to customer's device. + +#### 3. Implement PaymentResultWithDataListener Method + +The `PaymentResultListener` or `PaymentResultWithDataListener` methods can be implemented the way shown in the above function or directly globally to the activity class. The functions will be implemented based on the method chosen. + +#### Sample Code for `PaymentResultListener` + +Below are the sample codes for `PaymentResultListener` method. + +```java: Java +razorpay.submit(data, new PaymentResultListener() { + @Override + public void onPaymentSuccess(String razorpayPaymentId) { + // Razorpay payment ID is passed here after a successful payment + } + + @Override + public void onPaymentError(int code, String description) { + // Error code and description is passed here + } + }); + +} catch (Exception e) { + Log.e(TAG, "Error in submitting payment details", e); +} +```kotlin: Kotlin +razorpay.submit(payload, object : PaymntResultListener { + override fun onPaymentSuccess(razorpayPaymentId: String?) { + // razorpay payment ID and PaymentData passed here after a successful payment + } + + override fun onPaymentError(p0: Int, p1: String?) { + // Error code and description is passed here + } +}) +``` + +#### Sample Code for `PaymentResultWithDataListener` + +Below are the sample codes for `PaymentResultWithDataListener` method. + +```java: Java +razorpay.submit(data, new PaymentResultWithDataListener() { + @Override + public void onPaymentSuccess(String razorpayPaymentId, PaymentData paymentData) { + // razorpay payment ID and PaymentData passed here after a successful payment + } + + @Override + public void onPaymentError(int code, String description) { + // Error code and description is passed here + } + }); + +} catch (Exception e) { + Log.e(TAG, "Error in submitting payment details", e); +} +```kotlin: Kotlin +razorpay.submit(payload, object : PaymentResultWithDataListener { + override fun onPaymentSuccess(p0: String?, p1: PaymentData?) { + // Razorpay payment ID and PaymentData passed here after a successful payment + } + + override fun onPaymentError(p0: Int, p1: String?, p2: PaymentData?) { + // Error code and description is passed here + } +}) +``` + +#### Collect Flow + +In Collect Flow, the SDK sends a push notification to the `contact` number passed in the create request. Pass the following parameters to initiate a collect payment. + +```java: +JSONObject data = new JSONObject(); +data.put("amount", 29935); +data.put("order_id", "order_DgZ26rHjbzLLY2"); +data.put("email", "gaurav.kumar@example.com"); +data.put("contact", "9000090000"); +data.put("method", "app"); +data.put("provider", "cred "); +data.put("app_present", "false") +```kotlin: Kotlin +val data = JSONObject() +data.put("amount", 29935) +data.put("order_id", "order_DgZ26rHjbzLLY2") +data.put("email", "gaurav.kumar@example.com") +data.put("contact", "9000090000") +data.put("method", "app") +data.put("provider", "cred ") +data.put("app_present", "false") +``` + +#### Request Parameters + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it must be `app`. + +`provider` _mandatory if method=app_ +: `string` Name of the PSP app. Here, it must be `cred`. + +`app_present` _mandatory if app=cred_ +: `boolean` Sets the payment flow as collect. Possible values: + - `true`: Opens the Cred app on customer's device. + - `false` (default): Sends a push notification to customer's device. + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#intent-flow). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md). +> diff --git a/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi.md b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi.md new file mode 100644 index 00000000..df4ad67a --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi.md @@ -0,0 +1,111 @@ +--- +title: About Turbo UPI +description: Integrate with Turbo UPI to provide a 2-step UPI payment experience. +--- + +# About Turbo UPI + +Use Razorpay Turbo UPI to make UPI payments faster. Following are the sample screens while making payments using Turbo UPI. + +![Razorpay Turbo UPI Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-cc-transaction-flow.jpg.md) + +## Advantages + + + - Simplified payment process with just two steps. + - Higher success rate. + - One stop for refunds and disputes. + + + - Higher success rates with a smoother payment experience. + - Complete in-app flow with no redirections gives better control over the user journey. + - Reduce timeout issues significantly since customers never leave your app. + + +> **SUCCESS** +> +> +> **What's New** +> +> Users can now link their credit cards alongside bank accounts during onboarding. Merchants can seamlessly retrieve both credit cards and bank accounts for transactions. Simplifying payments, expanding options, and ensuring security. +> + +> **WARN** +> +> +> **Watch Out!** +> +> Charges will be levied for payments made using CC on UPI. Contact the [support team](https://razorpay.com/support/#request) for further information. +> + +> **WARN** +> +> +> +> **Watch Out!** +> +> Due to the sensitive nature of the added libraries, we must ensure that the app is running in a proper environment. Therefore, after integration, the app will not run on Android emulators. +> + +> **WARN** +> +> +> **Watch Out!** +> +> - Use the `rzp_test_0wFRWIZnH65uny` merchant key for testing on the UAT environment and the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. +> - As a compliance requirement, you need to get approval from Google for **READ_SMS** permission. Refer [to this link](https://support.google.com/googleplay/android-developer/answer/10208820?hl=en) for more details. +> +> + +## Customer Onboarding Flow + +Your customers can link their credit cards and bank accounts to your app with these steps: +1. The customer navigates to your app's checkout screen and taps **Link bank a/c & credit card**. + ![Turbo UPI Add Bank Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-custom-add-bank-cc-account.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> The customer needs to give **allow SMS permission** so that we can validate the phone number with the bank. +> ![Turbo UPI SMS Verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-custom-sms-verification.jpg.md) +> + +2. The customer's bank and credit card details are fetched and linked to the app. + + ![Turbo UPI Fetch Bank Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-custom-fetch-account.jpg.md) + +3. The customer selects a bank or credit card from the list of banks. The top 8 banks are displayed for easier selection. + ![Turbo UPI Select Bank Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-cc-custom-select-bank-account.jpg.md) + +> **INFO** +> +> +> +> **Handy Tips** +> +> If no UPI PIN is set, the customers are prompted to provide their card details (debit or credit), to enter an OTP and complete the set-up. +> ![Turbo UPI Enter Card Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-cc-custom-card-details.jpg.md) +> + +This completes the onboarding. + +## Transaction Flow + +After the customer is onboarded, on the checkout page of your app: + +1. The customer selects the linked bank or credit account. + ![Razorpay Turbo UPI Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-cc-linked-bank.jpg.md) +2. The customer enters the UPI PIN to complete the payment. + ![Turbo UPI Payment Successful](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-custom-enter-pin.jpg.md) + +### Related Information + +- [Turbo UPI Headless](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui.md) +- [Turbo UPI with UI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui.md) +- [Turbo UPI Headless Mock](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui-mock.md) +- [Turbo UPI with UI Mock](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui-mock.md) +- [Turbo UPI Headless TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui-tpv.md) +- [Turbo UPI with UI TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui-tpv.md) diff --git a/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/error-codes.md b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/error-codes.md new file mode 100644 index 00000000..ae2bd86a --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/error-codes.md @@ -0,0 +1,421 @@ +--- +title: Turbo UPI SDK - Error Codes | Android Custom +heading: Turbo UPI SDK - Error Codes +description: List of error codes for Turbo UPI SDK. +--- + +# Turbo UPI SDK - Error Codes + +Given below is the list of error codes categorised by error reasons, with relevant descriptions, source and step. + +### Bad Request Errors + +Given below is the list of Bad Request errors. + + +### bank_not_live_on_upi + + - **Description**: The selected bank is not enabled on UPI. Please try using another bank. + - **Source**: gateway + - **Step**: customer_onboarding + + + +### account_does_not_exist + + + + Payment Debit Request + + - **Description**: No accounts found for the selected bank. Please try using another bank. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Payment Credit Request + + - **Description**: Payment was unsuccessful as the receiver's bank account is not valid. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + + + + +### transaction_not_allowed + + + + Payment Debit Request + + - **Description**: Transaction not permitted to the account as per your bank policy. Please contact your bank for more details or try with another bank account. + - **Source**: customer + - **Step**: payment_debit_request + + + +### Payment Credit Request + + - **Description**: Payment not allowed as it got declined by the receiver's bank. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + + + + +### upi_pin_registration_card_expired + + - **Description**: Card used while setting UPI PIN has expired. Please use another debit card or use another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### upi_pin_registration_card_not_found + + - **Description**: Card details used while setting UPI PIN are incorrect. Please re-check and try again. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### upi_pin_registration_card_restricted + + - **Description**: Card used while setting UPI PIN has been blocked by your bank. Please reach out to your bank for more information or try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### bank_technical_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_status_request + + + +### pin_not_set + + - **Description**: Payment was unsuccessful as you have not set the UPI PIN on the app. Try using another method. + - **Source**: customer_psp + - **Step**: payment_authentication + + + +### customer_not_registered + + - **Description**: No bank account is associated with this mobile number. Please try again by adding your account. + - **Source**: gateway + - **Step**: customer_onboarding + + + +### server_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: gateway + - **Step**: payment_authentication + + + +### payment_cancelled_by_user + + - **Description**: Flow was aborted as you pressed back from the PIN screen. Please try again. + - **Source**: customer + - **Step**: payment_authorization + + +### Gateway Errors + +Given below is the list of gateway errors. + + +### incorrect_otp + + - **Description**: You have entered an incorrect OTP. Try again. + - **Source**: customer + - **Step**: customer_onboarding + + + +### otp_expired + + - **Description**: You have entered an expired OTP. Please regenerate OTP and try again. + - **Source**: customer + - **Step**: customer_onboarding + + + +### insufficient_funds + + - **Description**: Payment was unsuccessful due to insufficient funds. Kindly check your balance and try again. + - **Source**: customer + - **Step**: payment_debit_request + + + +### insufficient_funds_mandate_block + + - **Description**: Payment was unsuccessful as the amount in your account is blocked for another payment. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### otp_attempts_exceeded + + - **Description**: You have entered an incorrect OTP too many times. Try again in some time. + - **Source**: customer_psp + - **Step**: customer_onboarding + + + +### account_dormant + + - **Description**: Payment was unsuccessful as the receiver's bank account is inactive. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + +### bank_not_live_on_upi + + - **Description**: Selected bank is not available on UPI. Please try using another bank. + - **Source**: issuer_bank + - **Step**: customer_onboarding + + + +### payment_timed_out + + + + Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_response + + + +### UPI ID Not Reachable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is not reachable at this time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + + + + +### first_transaction_limit_exceeded + + - **Description**: Payment was unsuccessful as you exceeded the first-time transaction limit set by your bank. You can use another bank account or retry after 24 hours. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### transaction_limit_exceeded + + + + Limit Set By Bank Exceeded + + - **Description**: Payment was unsuccessful as you exceeded the transaction limit set by your bank. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### Daily Amount Limit Exceeded + + - **Description**: Payment was unsuccessful as you exceeded the amount limit for the day with this bank account. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + + + + + +### first_time_transaction_freeze_period + + - **Description**: Payment was unsuccessful due to the cooling period set by your bank for first-time user. Please try again after some time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### transaction_frequency_limit_exceeded + + - **Description**: Payment was unsuccessful as the number of transactions exceeds the max limit set by the bank. You can use another bank account or retry after some time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### bank_account_inactive + + + + Issuer Bank Account Inactive + + - **Description**: Payment was unsuccessful as your account is not active. Please try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Receiver Bank Account Inactive + + - **Description**: Payment was unsuccessful as the receiver's bank account is not active. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_debit_request + + + + + + +### server_error + + + + Temporary Issue - Issuer Bank + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: beneficiary_bank + - **Step**: payment_request + + + +### Temporary Issue - Beneficiary Bank + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: issuer_bank + - **Step**: payment_request + + + + + + +### invalid_ifsc + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: gateway + - **Step**: payment_authentication + + + +### upi_pin_registration_card_blocked + + - **Description**: Card used while setting UPI PIN has been blocked by your bank. Please reach out to your bank for more information or try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### bank_technical_error + + + + UPI ID Temporarily Unavailable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: payment_credit_response + + + +### Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: payment_credit_response + + + + + + +### payment_declined + + + + Declined by Bank + + - **Description**: Payment was unsuccessful as it was declined by your bank. Reach out to your bank for more details. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_debit_request + + + + + + +### pin_attempts_exceeded + + - **Description**: You have exceeded the incorrect UPI PIN attempts. You can use another bank account or retry after 24 hours. + - **Source**: customer + - **Step**: payment_authentication + + + +### incorrect_pin + + - **Description**: You have entered incorrect UPI PIN. Please try again with the correct UPI PIN. + - **Source**: customer + - **Step**: payment_authentication + + + +### linked_account_removal_failed + + - **Description**: Unable to remove the account. Please try again. + - **Source**: customer_psp + - **Step**: account_management + + + +### sms_text_not_received + + - **Description**: Something went wrong while sending SMS. Please try again. + - **Source**: gateway + - **Step**: customer_onboarding + + +### Server Errors + +Given below is the list of server errors. + + +### server_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: customer_onboarding + + + +### server_error + + - **Description**: We are facing some trouble completing your request at the moment. Please try again shortly. + - **Source**: internal + - **Step**: payment_authorization diff --git a/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/faqs.md b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/faqs.md new file mode 100644 index 00000000..0922df89 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/faqs.md @@ -0,0 +1,314 @@ +--- +title: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Turbo UPI. +--- + +# Frequently Asked Questions (FAQs) + +## Payments + + +### 1. What is the protocol if a user enters an incorrect UPI PIN? + + If a user enters a wrong UPI PIN more than three times, the user must reset the PIN or wait 24 hours to make the next transaction. + + + +### 2. On which devices can I enable Turbo UPI? Can it be enabled on the Web? + + Turbo UPI can be enabled only on a mobile app, either iOS or Android, through an SDK integration. This product is currently unavailable as a web-based solution due to the NPCI constraints. Due to security reasons, the NPCI Common Library (UPI PIN screen) can be deployed only when a device is bound to the SIM and the application. + + + +### 3. Are there any transaction limits or restrictions imposed? + + Below are the standard NPCI transaction limits: + - For first-time UPI users, the initial transaction limit is typically up to ₹5,000 with a cooling period of 24 hours. After this cooling period, the transaction limits will be relaxed to the standard limits. + - During this cooling-off period, your bank will reduce the following: + - The amount you can send per UPI payment and the amount you can send in one day. + - The number of UPI payments you can make in one hour/day. + + +> **INFO** +> +> +> **Handy Tips** +> +> The limits during this period and the cooling-off period may vary from bank to bank. Please contact your bank for more information. +> + + + + +### 4. Can users receive money on Turbo UPI-generated UPI ID? + + Yes, users can receive money. However, they can not pay using a collect request from your app. Collect requests will go to the bank's UPI app. + + + +### 5. Can I enable Turbo UPI on all Razorpay checkouts? + + + We have built Turbo UPI in a way that it can be deployed across any Razorpay checkout - [Standard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard.md), Custom or S2S. The integration process for each of these options will depend on whether you want to control the user experience. With our Standard Checkout offering, you can complete the integration and start processing payments within 1-2 days. + + + +### 6. Can I extend the instant refund capability to Turbo UPI? + + Yes. If you are already using Razorpay's instant refunds functionality, you can seamlessly apply the same capability to transactions processed via Turbo UPI. To enable this feature, please raise a request at our [support team](https://razorpay.com/support/#request). + + + +### 7. Can merchants from specific categories accept Credit Card payments on UPI? + + If you belong to the following Merchant Category Codes (MCC), you cannot accept Credit Card payments on UPI: + + + + Sl.No | Merchant Category Code (MCC) + --- + 1 | 6010 + --- + 2 | 6012 + --- + 3 | 6013 + --- + 4 | 7407 + --- + 5 | 7408 + --- + 6 | 7409 + --- + 7 | 6011 + --- + 8 | 6051 + --- + 9 | 6211 + --- + 10 | 7322 + --- + 11 | 7800 + --- + 12 | 7801 + --- + 13 | 7995 + --- + 14 | 7802 + --- + 15 | 9406 + --- + 16 | 4829 + + + + +## Onboarding + + +### 1. What are the specific guidelines or best practices for designing the user interface for UPI payments? + + - Using the Turbo UPI logo is recommended for a better user experience. You can download the logo using the button below. + [Download Turbo UPI Logo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/Turbo-upi-logo.zip.md) + ![Turbo UPI Logo image](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-logo.jpg.md) + - Ensure to have the UPI logo against the account as per UPI guidelines. + - Encourage users to complete the onboarding process by clearly communicating the benefits they will receive. This could include highlighting the simplicity of a one-step payment, showcasing any ongoing offers, or emphasising unique features. + - Ensure users can complete onboarding and continue payment in a single flow. We recommend having an option to continue payment as soon as onboarding is complete. + - Once an account is linked, clearly communicate the bank account using the last four digits and provide ways to add other accounts if users want to. + + + +### 2. Which UPI ID is currently supported on Turbo UPI? + + Turbo UPI supports the use of @axisbank handles for transactions. If your customer already has an existing @axisbank handle, it will be automatically fetched, allowing them to proceed seamlessly. + + +> **INFO** +> +> +> **Handy Tips** +> +> Turbo UPI does not reuse existing @axl or @okaxis handles; only the @axisbank handle is reused. If your customer does not have an existing UPI ID, one will be created automatically during the one-time device binding process. +> + + + + +### 3. How can I encourage users to complete the onboarding process? + + To enhance user engagement and drive onboarding completion, keep the following in view: + 1. Highlight the Value: Clearly explain how users benefit from the "1 Step Payment Experience" and the "Fastest Payment Experience." Users engage when they see the value. + 2. Offer Incentives: Provide initial incentives like discounts, special deals, or rewards. These encourage users to start the onboarding process or make their first payment using the 1 Step Payment Experience. + + + +### 4. Is Handling permission results mandatory? + + Yes, it is essential to grant all the permissions requested in the Check Permission call. If these permissions are denied, users will not be able to proceed further in the app. + + + +### 5. What are all the permissions required during device binding? + + During device binding, the user needs to grant the necessary permissions for a seamless experience. + - **Send SMS**: This permission enables us to validate the phone number with the bank by sending SMS. + - **Read Phone State**: This permission allows us to access essential information about the device's state, ensuring a secure and reliable connection. + - **Access Location**: This permission may be needed for location-based services or additional security measures, enhancing the overall user experience. + + +## Integrations + + +### 1. How will I be notified about my payment status? + + Razorpay provides notifications about payment status through webhooks, ensuring you are promptly informed about the status of your transactions. When a payment is processed, Razorpay will trigger a webhook to notify you whether the payment was successful or failed. Refer to the [payment payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payments). + + + +### 2. Is Device Binding necessary for every transaction? + + No, Device Binding is a one-time requirement aimed at verifying the presence of the user's phone number. This verification is achieved through an outgoing SMS from the user's device. Once this initial verification is completed, there is no need to repeat the Device Binding process for every new account linking or transaction. + + +> **WARN** +> +> +> **Watch Out!** +> +> Device Binding may need to be repeated if the user uninstalls the app or clears their storage. +> + + + +## Miscellaneous + + +### 1. Is there any analytics available about the user journey? + + Yes. There would be events to understand the user journey and each action the user takes, which we can share on a request basis or set up automated reports as required. Additionally, the entire journey will be in your app, and you will have your UI. + +> **INFO** +> +> +> **Handy Tips** + +> - For Custom Checkout: you can install and trigger any additional event on your application. +> - For Standard Checkout: Razorpay can share these details via reports on request. Raise a request to the [support team](https://razorpay.com/support/#request). +> + + + + +### 2. Is Turbo UPI supported with Optimizer? + + Yes, Turbo UPI can be enabled for businesses who use Optimizer. However, a prerequisite is that the business sets a routing rule to direct 100% of traffic towards Razorpay instead of other PGs. Only then will end-users be able to benefit from Turbo UPI. Know more about [Turbo UPI on Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/create-custom-rule.md#turbo-upi-on-optimizer). + + + +### 3. By enabling Turbo UPI, does the business become a TPAP? + + Integrating with Turbo UPI **does not** classify the business as a Third-Party App Provider (TPAP). Consider the following: + - According to the OC 154 Circular, the bank’s SDK is the licensed party, not the business app. Thus, the bank partner must comply with any new developments from NPCI, not the business. + - Razorpay acts as the front-end entity similar to TPAPs like GPay or PhonePe. We provide a wrapper built around the bank’s SDK that can be directly integrated into the business app. This wrapper-SDK now consists of all the front-end capabilities to process in-app payments. + - Businesses using Turbo UPI can enjoy a streamlined onboarding process without requiring lengthy certification procedures with NPCI. They can unlock new features through Razorpay’s SDK in a case-by-case scenario. + - Businesses can now operate as UPI apps for all practical purposes, limited to Peer-to-Merchant (P2M) transactions, thus simplifying their go-to-market experience and delighting customers. + + + +### 4. Who is Razorpay's partner bank for Turbo UPI? Do we plan to integrate with more banks in the future? + + Razorpay has chosen to collaborate with Axis bank as their partner bank. The underlying SDK used is Axis bank's Plugin SDK, over which Razorpay has created a wrapper to support standard P2M flows. + + + +### 5. Is there a customised, business-specific UPI ID that will be created for users who use Turbo UPI? For example, @swiggy? + + No, since the acquiring partner is still Axis bank, the UPI ID created at the backend will be @axisbank. The Turbo UPI solution does not enable businesses to become TPAPs and uses the bank's UPI processing stack. Thus, the UPI ID created will also be the bank's UPI ID and not customised to the business. + + + +### 6. If we take the example of Axis bank being the partner app, does this mean that users can leverage existing UPI ID with Axis bank, and the same gets pre-fetched and stored? Also, does that include only Axis bank app UPI IDs or even 3rd party PSP having Axis handles like @okaxis? + + @axl and @okaxis handles will not be considered existing UPI IDs for Turbo UPI. Users must have an @axisbank handle to reuse it on Turbo UPI. If required, a new UPI ID will be automatically created in the one-time onboarding process. + + In this case, Axis bank, the acquirer bank, has over 10-12 million unique customer UPI IDs. End users with an existing @axisbank UPI ID will experience a shorter and quicker onboarding process (shorter by 1 step). + + + +### 7. Whenever an existing Turbo UPI user (for business A) wants to use Turbo UPI on business B, would the same UPI ID be used, or would a new UPI ID be created? + + Existing UPI ID with @axisbank will be reused on any new subsequent Turbo UPI businesses. There is no requirement to create new UPI IDs for the same customer. Furthermore, as a UPI ID is already available, this would mean one less step (bank selection step) for the end-user in the 1-time device binding process. + + + +### 8. What is the difference between P2P and P2M transactions? + + + - P2P (Peer-to-Peer): This type of transaction occurs between two individuals, where one person transfers funds to another person, both of whom are registered on the UPI platform. + - P2M (Person-to-Merchant): P2M transactions involve a customer making a payment to a merchant for goods or services. In this case, the transaction is between the customer and the merchant. + + + +### 9. What is P2M (Person-to-Merchant) payment? + + P2M (Person-to-Merchant) payment allows customers to make payments to merchants for their goods or services. In this transaction, funds are transferred from the customer to the respective merchant, facilitating a convenient and straightforward way to complete purchases. + + +## TPV + + +### 1. Is TPV supported on Turbo UPI? + + Yes, mandatory TPV is supported on Turbo UPI. Additionally, we have solutioned a way for you to never see TPV failures (a prevalent problem today that impacts success rates by 4%) through Validated Account Linking. + + + +### 2. Is there a way to prevent users from linking a non-KYC account to my business app via Turbo UPI? + + Yes, we have made this possible through Validated Account Linking, wherein you can limit the accounts being linked via Turbo UPI to the business app based on the KYC account details passed to us by the businesses. This prevents end users from making transactions from unauthorised accounts, resulting in 0 TPV failure cases. + + +## Supports + + +### 1. Who will manage the support for transactional queries? + + + Razorpay will handle the support queries end to end. If it is bank-dependent, our team will coordinate with the bank internally and provide you with the latest updates and resolutions. + + + +### 2. Is there support for multiple banks for Turbo UPI? + + The NPCI does not allow a multi-bank model for the P2M plugin (Turbo UPI). + + + +### 3. How are we notified about the downtime if the partner bank faces fluctuations? + + We have built Downtime Detection on Turbo UPI. We will inform you via email or [Webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payment-downtime-started) if there are any fluctuations due to which Success Rates fall. Also, there are [Downtime APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md#entity), which you can consume to know the latest status. + + + +### 4. What if Turbo UPI is down? Will my UPI payments be affected? + + Along with Turbo UPI, you can also display the existing UPI methods (BHIM / GPay / PhonePe / PayTM ), solving for downtimes. During downtime, the Turbo UPI experience will be disabled; your users can still transact via the standard UPI flows via UPI Apps. + + +## Error Code Mapping + + +### 1. How will Turbo UPI provide better error code mapping and insights into customer drop-offs? + + UPI P2M transactions are routed through third-party UPI apps, and neither you nor the payment gateways have visibility into where users drop off or why a payment has failed. With Turbo UPI, Razorpay can provide data points on the following: + - Insightful error codes where you will know why the user's payment failed. + - Points of user drop-offs in the transaction flow. + - Points of friction, that is, where users spend maximum time. + - Conversion rates of transaction flow and account linking flow. + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/error-codes.md) + + + +### 2. If a user registers on an app via Turbo UPI, is the user required to register again on another app? + + On every app, the device binding has to be done by the user. But once the user has linked bank accounts on one app, the user will get those accounts on other apps immediately once device binding is done. diff --git a/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui-mock.md b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui-mock.md new file mode 100644 index 00000000..8f486c64 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui-mock.md @@ -0,0 +1,539 @@ +--- +title: Integrate Turbo UPI Headless Mock SDK +description: Steps to integrate the Razorpay Turbo UPI Headless Mock SDK with your app. +--- + +# Integrate Turbo UPI Headless Mock SDK + +Mock SDK is a tool designed to facilitate your integration with Turbo UPI. Unlike conventional integration methods that rely on the stability of partner banks and NPCI UAT environments, Mock SDK removes this dependency, streamlining the integration process. + + +### Advantages + + - **No Dependency on UAT Environment**: Traditional integration methods often encounter obstacles due to issues with UAT environments. Mock SDK removes this roadblock, enabling you to integrate without external dependency. + - **Streamlines Integration**: Mock SDK is designed to create a smoother integration experience, ensuring a hassle-free process. This allows you to quickly offer Turbo UPI services to the users. + - **Effortless Integration for Essential Flows**: Mock SDK simplifies the process of integrating Turbo for important scenarios. This enables you to expand your range of UPI services for customers without dealing with complex requirements. + - **Seamless Transition to Production**: After testing your integration with Mock SDK, you can smoothly transition to the Production SDK for final testing. This ensures a seamless and secure transition from development to live production. + + + +### Prerequisites + + 1. Contact our [integrations team](mailto:integrations@razorpay.com) to get your app and GitHub account whitelisted to get access to the `https://github.com/upi-turbo/android-turbo-sample-app` - sample app repository. + + - In this repository, you will find the AAR files (libraries for Turbo) and the sample app source code to help you with the integration. + - The AARs on the main branch are for the UAT environment, the ones on the prod branch are for the production environment, and the mock branch is for the mock environment. + + These are the important files in the sample app repo: + + - `app/libs`: All libraries (Bank, SecureComponent and Turbo) common for headless and UI SDK + - `app/build.gradle`: All transitive dependencies needed to integrate Turbo SDK. + + 2. Integrate with the [Razorpay Android Custom SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/build-integration.md). + + 3. Import the following frameworks: + + - Razorpay Turbo Wrapper Plugin SDK (maven) + - Razorpay Turbo Core SDK + - Mock SDK + + 4. Add the following lines to your Android project's `gradle.properties` file: + + - `android.enableJetifier=true` + - `android.useAndroidX=true` + + +> **WARN** +> +> +> **Watch Out!** +> +> - `minSDKversion` for using Turbo UPI is currently 19 and cannot be overwritten. +> - API Key Usage for Different Environments: +> - Use the `rzp_test_0wFRWIZnH65uny` API key id for testing on the UAT environment. +> - Use the `rzp_test_vacN5cmVqNIlhO` API key id for testing on the Mock environment. +> - Use the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. +> - As a compliance requirement, you need to get approval from Google for READ_SMS permission. Refer to the [Google article](https://support.google.com/googleplay/android-developer/answer/10208820?hl=en) for more details. +> +> + + + +## 1. Integration Steps + +Follow these steps to integrate with [Turbo UPI Headless](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui.md#1-integration-steps). + +## 2. Test Integration + +Razorpay has three environments: Mock, UAT and Prod. We recommend the following: + +- Complete the integration with the Mock environment. +- Perform the UAT using the Razorpay-provided API keys. + +### 2.1 Test Data + +Use the following data to test the integration. + + +### Bank List + + + Bank id | Bank Name | IFSC + --- + 1 | Axis | AXIS0000001 + --- + 2 | SBI | SBI00000001 + --- + 3 | HDFC | HDFC0000001 + --- + 4 | YES | YES00000001 + + + + +### Bank Accounts + + + Bank id | Bank Name | Account Number | Beneficiary Name | Account Balance | UPI PIN | ATM PIN | Card Number | Expiry Date | CVV | OTP | Type + --- + 1 | Axis Bank | xxxx0001 | Pratheek | ₹100 | Not Set | 1234 | 8000110001 | Any Future Date | Random CVV | 123456 | Savings + --- + 1 | Axis Bank | 8888 88xx xxxx 0002 | Pratheek | ₹9,000 | 123456 | 1234 | 8888 8888 8811 0002 | Any Future Date | Random CVV | 123456 | Credit Card + --- + 2 | SBI Bank | xxxx0001 | Kushaal Singla | ₹9,000 | Not Set | 1234 | 9000110001 | Any Future Date | Random CVV | 123456 | Savings + --- + 2 | SBI Bank | 8888 88xx xxxx 0003 | Kushaal Singla | ₹9,000 | Not Set | 1234 | 8888 8888 8811 0003 | Any Future Date | Random CVV | 123456 | Credit Card + --- + 2 | SBI Bank | xxxx0203 | Kushaal Singla | ₹99,999 | 123456 | 1234 | 9599110203 | Any Future Date | Random CVV | 123456 | Savings + + + +### 2.2 Test Case Coverage + +Following are the various scenarios based on the dependencies. + + +### Dependencies and Scenarios + + + S.No | Dependency | Positive Scenarios | Negative Scenarios + --- + 1 | Device Binding | Device Binding | - SIM not found +- SMS sending failed +- Permissions not given + + --- + 2 | Account Linking | - Account found +- PIN set +- PIN not set + | No account for that number + --- + 3 | UPI ID generation | - UPI ID present +- New UPI ID creation + | NA + --- + 4 | - UPI PIN Management +- Change PIN +- Reset PIN + | PIN Changed/Set Successfully | - Invalid PIN +- PIN not matching +- Incorrect OTP +- Incorrect card details (Reset PIN) + + --- + 5 | P2M Transaction - In-App Payments | Payment Successful | - Invalid PIN +- Timeout +- Insufficient Balance + + --- + 6 | Check Balance | Show Balance | Invalid PIN + --- + 7 | Delink Account | Success Only | NA + --- + 8 | Prefetch and Link accounts | Fetch existing PIN set and PIN not set accounts | No account exists for that number. + + + +### 2.3 How to Test? + +Given are the various test cases and their sequential steps. + + +### 2.3.1 Device Binding Success + + In the scenario of successful device binding, follow these simple steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccount` method. + 3. The SDK response should then transition to `UpiTurboLinkAction = ASK_FOR_PERMISSION` with `action.getError()==null` (no errors). + 4. The expected response should be `UpiTurboLinkAction = SELECT_BANK` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + + + +### 2.3.2 SIM not found + + In the event of a SIM card not being found, follow these steps: + 1. Remove all SIM cards from the device. + 2. Enter a mobile number that exists on the user's device. + 3. Call `razorpay.upiTurbo.linkNewUpiAccount` method. + 4. The SDK response should then transition to `UpiTurboLinkAction = ASK_FOR_PERMISSION` with `action.getError()==null` (no errors). + 5. Grant all the required permissions as prompted. + 6. The expected response should be `UpiTurboLinkAction = SELECT_SIM` with `action.getError()!=null` (no errors). + + + +### 2.3.3 Denied Permissions or Access Restricted + + When permissions are denied or access is restricted, follow these steps: + 1. Remove all SIM cards from the device. + 2. Enter a mobile number that exists on the user's device. + 3. Call `razorpay.upiTurbo.linkNewUpiAccount` method. + 4. The SDK response should then trasition from `UpiTurboLinkAction = ASK_FOR_PERMISSION` with `action.getError()==null` (no errors). + 5. Deny the required permissions when prompted. + 6. The expected response should be `UpiTurboLinkAction = SHOW_PERMISSION_ERROR`. + + + +### 2.3.4 Account Found + + In the scenario where an account is found, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccount` method. + 3. The SDK response should then transition from `UpiTurboLinkAction = ASK_FOR_PERMISSION` with `action.getError()==null` (no errors). + 4. Grant the required permissions when prompted. + 5. After the permissions are granted, the SDK response should change to `UpiTurboLinkAction = SELECT_SIM` with `action.getError()==null` (no errors). + 6. Select Axis Bank or SBI Bank as mentioned in the [Test Data](#21-test-data). + 7. The expected response should be `UpiTurboLinkAction = SELECT_BANK_ACCOUNT` with `action.getError()==null` (no errors). + + + +### 2.3.5 PIN + + + + PIN set + + When it comes to setting or managing your PIN, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccount` method. + 3. Check the response from SDK, which should switch from `UpiTurboLinkAction = ASK_FOR_PERMISSION` with `action.getError()==null` (no errors). + 4. Grant the necessary permissions when prompted. + 5. The SDK response should then transition to `UpiTurboLinkAction = SELECT_BANK` with `action.getError()==null` (no errors). + 6. Subsequently, you will receive another SDK response of `UpiTurboLinkAction = SELECT_BANK` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + 7. Select SBI Bank as specified in the [Test Data](#21-test-data). + 8. Following that, the SDK response should become `UpiTurboLinkAction = SELECT_BANK_ACCOUNT` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + 9. Select an account ending with xxxx0203. + 10. Expect the final response to confirm that an account with a PIN is already set and the UPI ID is linked. + + + +### PIN not set + + When dealing with scenarios where a PIN is not set, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccount` method. + 3. Check the response from SDK, which should switch from `UpiTurboLinkAction = ASK_FOR_PERMISSION` with `action.getError()==null` (no errors). + 4. Grant the necessary permissions when prompted. + 5. Subsequently, you will receive an SDK response of `UpiTurboLinkAction = SELECT_SIM` with `action.getError()==null` (no errors). + 6. Following that, you will receive another SDK response of `UpiTurboLinkAction = SELECT_BANK` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + 7. Choose SBI Bank as specified in the [Test Data](#21-test-data). + 8. The SDK response should then become `UpiTurboLinkAction = SELECT_BANK_ACCOUNT` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + 9. Select an account ending with xxxx0001. + 10. Expect the final response to be `UpiTurboLinkAction = SETUP_UPI_PIN` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + + + +### No Account for Specified Number + + When there is no account associated with a particular number, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccount` method. + 3. Check the response from SDK, which should switch from `UpiTurboLinkAction = ASK_FOR_PERMISSION` with `action.getError()==null` (no errors). + 4. Grant the necessary permissions when prompted. + 5. Subsequently, you will receive an SDK response of `UpiTurboLinkAction = SELECT_SIM` with `action.getError()==null` (no errors). + 6. Following that, you will receive another SDK response of `UpiTurboLinkAction = SELECT_BANK` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + 7. Select HDFC or Yes Bank as mentioned in the [Test Data](#21-test-data). + 8. The expected response should be `UpiTurboLinkAction = SELECT_BANK_ACCOUNT` with `action.getError()==null` (no errors). + + + +### PIN set Successfully + + For a successful PIN setup, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccount` method. + 3. Check the response from SDK, which should switch from `UpiTurboLinkAction = ASK_FOR_PERMISSION` with `action.getError()==null` (no errors). + 4. Grant the necessary permissions when prompted. + 5. Subsequently, you will receive an SDK response of `UpiTurboLinkAction = SELECT_SIM` with `action.getError()==null` (no errors). + 6. Following that, you will receive another SDK response of `UpiTurboLinkAction = SELECT_BANK` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + 7. The SDK response should then become `UpiTurboLinkAction = SELECT_BANK_ACCOUNT` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + 8. Select an account ending with xxxx0001. + 9. Following that, you will receive another SDK response of `UpiTurboLinkAction = SETUP_UPI_PIN` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + 10. Enter the card details. + 11. The expected final response should be `UpiTurboLinkAction = STATUS` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + + + +### PIN Changed Successfully + + When you need to change your PIN successfully, follow these steps: + 1. Call the `razorpay.upiTurbo.changeUpiPin` method with the correct PIN. + 2. Expect a callback `onSuccess`. Your PIN change has been successfully completed. + + + +### Invalid PIN or PIN not Matching + + When dealing with an invalid PIN or a PIN that does not match, follow these steps: + 1. Call the `razorpay.upiTurbo.changeUpiPin` method with the correct PIN. + 2. Expect a callback `onFailure`. This means the PIN provided was invalid or did not match the expected PIN. + + + +### Incorrect OTP + + In situations where an incorrect OTP is encountered, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccount` method. + 3. Check the response from SDK, which should switch from `UpiTurboLinkAction = ASK_FOR_PERMISSION` with `action.getError()==null` (no errors). + 4. Grant the necessary permissions when prompted. + 5. Subsequently, you will receive an SDK response of `UpiTurboLinkAction = SELECT_SIM` with `action.getError()==null` (no errors). + 6. Following that, you will receive another SDK response of `UpiTurboLinkAction = SELECT_BANK` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + 7. Select SBI Bank as specified in the [Test Data](#21-test-data). + 8. The SDK response should then become `UpiTurboLinkAction = SELECT_BANK_ACCOUNT` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + 8. Select an account ending with xxxx0001. + 9. Following that, you will receive another SDK response of `UpiTurboLinkAction = SETUP_UPI_PIN` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + 10. Enter the card details. + 11. Enter any random OTP except for 123456. + + + +### Incorrect Card Details(Reset PIN) + + When dealing with resetting your PIN with incorrect card details, follow these steps: + 1. Call the `razorpay.upiTurbo.resetUpiPin` method with incorrect PIN and card details that are not mentioned in the [Test Data](#21-test-data). + 2. Expect a callback `onFailure`. This indicates that the reset attempt has failed due to incorrect card details. + + + + + + + +### 2.5.6 UPI ID + + + + UPI ID Present + + When working with scenarios involving the presence of a UPI ID, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccount` method. + 3. Check the response from SDK, which should switch from `UpiTurboLinkAction = ASK_FOR_PERMISSION` with `action.getError()==null` (no errors). + 4. Grant the necessary permissions when prompted. + 5. Subsequently, you will receive an SDK response of `UpiTurboLinkAction = SELECT_SIM` with `action.getError()==null` (no errors). + 6. Following that, you will receive another SDK response of `UpiTurboLinkAction = SELECT_BANK` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + 7. Select SBI Bank as specified in the [Test Data](#21-test-data). + 8. The SDK response should then become `UpiTurboLinkAction = SELECT_BANK_ACCOUNT` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + 9. Select an account ending with xxxx0203. + 10. Expect the final response to confirm that an account with a UPI ID is linked successfully. + + + +### New UPI ID Creation + + When dealing with scenarios related to UPI ID, such as new UPI ID creation, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccount` method. + 3. Check the response from SDK, which should switch from `UpiTurboLinkAction = ASK_FOR_PERMISSION` with `action.getError()==null` (no errors). + 4. Grant the necessary permissions when prompted. + 5. Subsequently, you will receive an SDK response of `UpiTurboLinkAction = SELECT_SIM` with `action.getError()==null` (no errors). + 6. Following that, you will receive another SDK response of `UpiTurboLinkAction = SELECT_BANK` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + 7. Select Axis Bank as mentioned in [Test Data](#21-test-data). + 8. The SDK response should then become `UpiTurboLinkAction = SELECT_BANK_ACCOUNT` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + 9. Select an account ending with xxxx0001. + 10. Following that, you will receive another SDK response of `UpiTurboLinkAction = SETUP_UPI_PIN` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + 11. Enter the card details. + 12. The expected final response should be `UpiTurboLinkAction = STATUS` with `action.getError()==null` and `action.getData != null`. This response should not have any errors, and it should contain some relevant data. + + + + + + + +### 2.5.7 Transactions + + + + Payments Successful + + When it comes to transactional scenarios, with a focus on ensuring a successful payment, follow these steps: + 1. Begin by following the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui.md#1-integration-steps), specifically the `submit` method. + 2. Enter an amount that is lower than the account balance. + 3. Enter the correct PIN. + 4. Subsequently, you will receive a callback on `onPaymentSuccess`. This indicates that the payment has been successfully processed. + + +> **INFO** +> +> +> **Handy Tips** +> +> The account balance remains unchanged, and the paid amount is not deducted in mock payment. +> + + + + +### Invalid PIN + + In situations where an invalid PIN is entered, follow these steps: + 1. Begin by following the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui.md#1-integration-steps), specifically the `submit` method. + 2. Enter an amount lower than the account balance mentioned in [Test Data](#21-test-data). + 3. Enter the incorrect PIN. + 4. Subsequently, you will receive a callback on `onPaymentError`. This indicates that an error occurred during the payment process due to the invalid PIN. + + + +### Timeout + + When dealing with transactional scenarios, specifically focusing on handling timeouts, follow these steps: + 1. Begin by following the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui.md#1-integration-steps), specifically the `submit` method. + 2. Enter the amount as 24. + 3. Enter the correct PIN. + 4. Subsequently, you will receive a callback on `onPaymentError`. This indicates that an error occurred during the payment process due to a timeout. + + + +### Insufficient Balance + + When it comes to transactional scenarios with a focus on handling insufficient balance, follow these steps: + 1. Begin by following the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui.md#1-integration-steps), specifically the `submit` method. + 2. Enter an amount greater than the account balance as mentioned in [Test Data](#21-test-data). + 3. Enter the correct PIN. + 4. Subsequently, you will receive a callback on `onPaymentError`. This indicates that an error occurred during the payment process due to insufficient balance. + + + +### Show Balance + + For scenarios related to checking your balance, follow these steps: + 1. Call the `razorpay.upiTurbo.getBalance` method. + 2. Enter the correct PIN. + 3. Expect a callback on `onSuccess`. This confirms that you will receive the requested balance information. + + + +### Check Balance - Invalid PIN + + When it comes to scenarios focused on checking your balance, follow these steps: + 1. Call the `razorpay.upiTurbo.getBalance` method. + 2. Enter an incorrect PIN. + 2. Expect a callback on `onFailure`. This indicates that an error occurred during the payment process due to the invalid PIN. + + + +### Delink Account - Success + + When it comes to scenarios related to delinking your account, follow these steps: + 1. Call the `razorpay.upiTurbo.delink` method. + 2. Expect a callback on `onSuccess`. This confirms that your account has been successfully delinked. + + + + + + + +### 2.5.8 Prefetch + + + + 2.5.8.1 First time onboarding + + + + Onboarding Success + + Follow these simple steps for the first time onboarding: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.prefetchAndLinkUpiAccounts` method. + 3. The SDK's initial response should shift to `UpiTurboLinkAction = ASK_FOR_PERMISSION` with `action.getError()==null` indicating no errors. + 4. Prompt the user to grant the necessary permissions by calling `action.consents([consent]).requestPermission()`. + 5. Upon successful device binding, the process of fetching accounts will commence. + 6. Subsequently, expect the SDK's response to transition to `UpiTurboLinkAction = STATUS` with `action.getError()==null`, indicating no errors. + 7. Once the account is successfully linked, you will receive a callback asynchronously in the `UpiTurboLinkAction=STATUS` with updated lists. + + + +### Denied Prefetch Consent + + Follow these simple steps for the first time onboarding: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.prefetchAndLinkUpiAccounts` method. + 3. The SDK's initial response should shift to `UpiTurboLinkAction = ASK_FOR_PERMISSION` with `action.getError()==null` indicating no errors. + 4. Call either `action.requestPermission()` or `action.consents([consent]).requestPermission()` with a `false` value in the consent object. + 5. The device binding process is initiated, including SMS sending. + 6. After successful device binding, the expected response should transition to `UpiTurboLinkAction = SELECT_BANK` with no errors `action.getError()==null` and should contain relevant data available `action.getData != null`. + + + +### PIN Set + + When it comes to setting or managing your PIN, follow these steps: + 1. Call the `action.selectBankAccount(bankAccount, card)` method to select the desired bank account fetched during the prefetch process. + 2. On the next screen, enter the bank OTP from the [Test Data](#21-test-data) and proceed. + 3. Enter and confirm the PIN on the subsequent screens. + + + + + + + + +### 2.3.8.2 Accounts Already Onboarded + + Follow these steps for accounts that are already onboarded: + 1. Call the `razorpay.upiTurbo.prefetchAndLinkUpiAccounts` method. + 2. The SDK response should transition to `UpiTurboLinkAction = SELECT_BANK` with `action.getError()==null` and `action.getData != null`. This response should not have any errors and should contain relevant data. + + + + + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - Device Binding will only work if the user has at least one SIM card in their mobile device. +> - Users can set/reset the UPI PIN. The configured PIN will be used to validate the transaction. +> - Based on the [Test Data](#21-test-data) for bank accounts, choose a bank for a single, multiple or no bank account. +> - Use the same ATM PIN and card Number mentioned in the [Test Data](#21-test-data). +> - The UPI PIN will revert to its default setting or be removed when you uninstall or clear storage. +> - Amount ₹24 is blocked for special cases. Please refer to [Additional Cases](#24-additional-cases). +> + +### 2.4 Additional Cases + +Businesses should have the capability to display a user-friendly message to their customers for certain special or additional error scenarios. The SDK is equipped to simulate some of these cases. + +Action | Input Data | Code | Description +--- +Pay | Amount = ₹24 | 91 | Timeout +--- + +### 2.5 TPV Cases + +The following points are be considered for TPV flow: + +- Only one TPV whitelisted account (ending with xxxx0203) is permitted. Payments made using any other accounts will fail with the error Payment failed because the account linked to VPA is invalid. +- Payment can be made multiple times when using Mock for any given `order_id`, which is not the case in production. +- Use the `rzp_test_V5AtnjYvupQXm1` API key id for TPV testing on the Mock environment. + +## 3. Go-live Checklist + +Complete this [Go-live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui.md#3-go-live-checklist) to take your integration live. diff --git a/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui-tpv.md b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui-tpv.md new file mode 100644 index 00000000..7b4c9eff --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui-tpv.md @@ -0,0 +1,1364 @@ +--- +title: Integrate Turbo UPI TPV +description: Know how Razorpay performs Third-Party Validation (TPV) of investor bank accounts in real-time using Razorpay Turbo UPI Headless. +--- + +# Integrate Turbo UPI TPV + +Third-party validation (TPV) of bank accounts is mandatory for businesses in the BFSI (Banking, Financial Services and Insurance) sector dealing with Securities, Broking and Mutual Funds. You can accept customer payments by integrating with the Turbo UPI Headless - TPV SDK. + + +### Prerequisites + + 1. Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number, app and GitHub account whitelisted to get access to the `https://github.com/upi-turbo/android-turbo-sample-app` - sample app repository. In this repository, you will find the AAR files (libraries for Turbo UPI) and the sample app source code to help you do the entire integration. The AARs on the main branch are for the UAT environment, and the ones on the prod branch are for the production environment. + + These are the important files in the sample app repo: + - `app/src/turboUI`: Sample app code for UI SDK + - `app/libs`: All libraries (Bank, SecureComponent and Turbo) common for headless and UI SDK + - `app/build.gradle`: All transitive dependencies needed to integrate the Turbo SDK. + + 2. Integrate with [Razorpay Android Custom SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/build-integration.md). + + 3. Import the following frameworks: + - Razorpay Turbo Wrapper Plugin SDK (maven) + - Razorpay Turbo Core SDK + - Razorpay SecureComponent SDK + - Bank SDK + + 4. Add the following lines to your Android project's gradle.properties file: + - `android.enableJetifier=true` + - `android.useAndroidX=true` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - `minSDKversion` for using Turbo UPI is currently 19 and cannot be over written. +> - Use the `rzp_test_5sHeuuremkiApj` API key id for testing on the UAT environment and the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. +> - As a compliance requirement, you need to get approval from Google for **READ_SMS** permission. Refer [to the Google article](https://support.google.com/googleplay/android-developer/answer/10208820?hl=en) for more details. +> - If the user changes their mobile number during onboarding, you should store the updated number and pass it to the Turbo SDK. +> + + + +## 1. Integration Steps + +Given below are the steps: + + +### Step 1: Whitelist Customer Bank Accounts *(Optional)* + + You can whitelist (also known as allowlist) your customer's bank accounts to ensure that only those accounts are considered during customer onboarding. By whitelisting the accounts at the start, you can avoid the bank account linking during payment. Use the Customer APIs to create customers and add their bank account details. + + For example, if a customer, Gaurav, has two bank accounts ABC and XYZ, you can use the APIs to create a customer id and link the bank accounts to that id. You can then pass this customer id at the time of payment. + + Follow these steps. + + + Step 1.1: Create a Customer + + Use this endpoint to create or add a customer with basic details such as name and contact details. + + ```cURL: Request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "Gaurav Kumar", + "contact": "9123456780", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + }' + + ```json: Success Response + { + "id" : "cust_1Aa00000000004", + "entity": "customer", + "name" : "Gaurav Kumar", + "email" : "gaurav.kumar@example.com", + "contact" : "9123456780", + "gstin": null, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at ": 1234567890 + } + + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } + } + ``` + + + + Request Parameters + + +`name` _optional_ +: `string` Customer's name. Alphanumeric value with period (.), apostrophe ('), forward slash (/), at (@) and parentheses are allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact ` _optional_ +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email ` _optional_ +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`fail_existing` _optional_ +: `string` Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + +`gstin` _optional_ +: `string` Customer's GST number, if available. For example, `29XAbbA4369J1PA`. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + + +### Response Parameters + + +`id` +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`name` +: `string` Customer's name. Alphanumeric, with period (.), apostrophe ('), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact` +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email` +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`gstin` +: `string` GST number linked to the customer. For example, `29XAbbA4369J1PA`. + +`notes` +: `json object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + + + + + + + +### Step 1.2: Add Customer's Bank Account + + The following endpoint adds the customer's bank accounts. + + ```cURL: Request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers/:customer_id/bank_account \ + -H "Content-Type: application/json" \ + -d '{ + "ifsc_code": "UTIB0000194", + "account_number": "11214311215411", + "beneficiary_name": "Gaurav", + "beneficiary_address1": "address 1", + "beneficiary_address2": "address 2", + "beneficiary_address3": "address 3", + "beneficiary_address4": "address 4", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9900990099", + "beneficiary_city": "Bangalore", + "beneficiary_state": "KA", + "beneficiary_country": "IN" + }' + + ```json: Response + { + "id": "ba_LSZht1Cm7xFTwF", + "entity": "bank_account", + "ifsc": "ICIC0001207", + "bank_name": "ICICI Bank", + "name": "Gaurav Kumar", + "notes": [], + "account_number": "XXXXXXXXXXXXXXX0434" + } + ``` + + + + Path Parameter + +`customer_id` _mandatory_ +: `string` Customer id of the customer whose bank account is to be added. + + + + +### Request Parameters + + + +`account_number` _mandatory_ +: `string` Customer's bank account number. For example, `11214311215411`. + +`beneficiary_name` _mandatory_ +: `string` The name of the beneficiary associated with the bank account. + +`beneficiary_address1` _optional_ +: `string` The virtual payment address. + +`beneficiary_email` _optional_ +: `string` Email address of the beneficiary. For example, `gaurav.kumar@example.com`. + +`beneficiary_mobile` _optional_ +: `string` Mobile number of the beneficiary. + +`beneficiary_city` _optional_ +: `string` The city of the beneficiary. + +`beneficiary_state` _optional_ +: `string` The state of the beneficiary. + +`beneficiary_country` _optional_ +: `string` The country of the beneficiary. + +`beneficiary_pin` _optional_ +: `integer` The pin code of the beneficiary's address. + +`ifsc_code` _mandatory_ +: `string` The IFSC of the bank branch associated with the account. + + + +### Response Parameters + +`bank_accounts` +: `array` An array containing bank account details. + + `id` + : `string` Unique identifier of the bank account. + + `entity` + : `string` The type of entity, which in this case is `bank_account`. + + `ifsc` + : `string` The IFSC of the bank branch associated with the account. + + `bank_name` + : `string` The name of the bank. + + `name` + : `string` The name associated with the bank account. + + `notes` + : `object` Set of key-value pairs that can be used to store additional information about the payment. + + `account_number` + : `integer` Customer's bank account number. For example, `11214311215411`. + + + + + + + + + + +### Step 2: Create an Order *(Mandatory)* + + Pass the investor bank account details to the `bank_account` array of the Orders API. Given below is the sample code when the `method` is `upi`. + + ```curl: Request + curl -u : \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 500, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }' + + ```json: Response + { + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 500, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 + } + ``` + + + Request Parameters + + `amount` _mandatory_ +: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, the value of this field should be `100`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. You can create orders in **INR** only. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`method` _mandatory_ +: `string` The payment method used to make the payment. If this parameter is not passed, investors will be able to make payments using both netbanking and UPI payment methods. Possible values: + - `netbanking`: Investors can make payments only using netbanking. + - `card`: Investors can make payments using debit card. + - `upi`: Investors can make payments only using UPI. + +`bank_account` _mandatory_ +: `object` Details of the bank account that the investor has provided at the time of registration. + + `account_number` _mandatory_ + : `string` The bank account number from which the investor should make the payment. For example, `765432123456789` Payments will not be processed for an incorrect account number. + + `name` _mandatory_ + : `string` The name linked to the bank account. For example, `Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` The bank IFSC. For example, `HDFC0000053`. + + + +### Response Parameters + + `id` +: `string` Unique identifier of the order. + +`entity` +: `string` Indicates the type of entity. Here, it is `order`. + +`amount` +: `integer` The order amount represented in the smallest unit of the currency passed. For example, amount = 100 translates to 100 paise, that is ₹1 (default currency is INR). + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we support INR only. + +`receipt` +: `string` A unique identifier of the order entered by the user. For example, `BILL13375649`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, "note_key": "Beam me up Scotty”. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`offer_id` +: `string` Unique identifier of the offer. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + + + + + + + + +### Step 3: Turbo UPI Headless SDK Action + + You need to link the customer's UPI account with your app. Use the code samples given below to [fetch the UPI account](#31-get-customer-s-linked-upi-account). + + + + 3.1 Get Customer's Linked UPI Account + + + + Use the following code to fetch your customer's UPI account. If there are no linked UPI accounts, an empty list is returned. + + ```java: Java + razorpay.upiTurbo.getLinkedUpiAccounts("", new UpiTurboResultListener(){ + @Override + public void onError(@NonNull Error error) { + //Display error message to user. + } + + @Override + public void onSuccess(@NonNull List accList) { + if (accList.size()==0){ + //Display: no UpiAccounts onboarded yet. Please onboard an account. + }else{ + //Display onboarded UpiAccounts. + } + } + }); + + ```Kotlin: Kotlin + razorpay.upiTurbo?.getLinkedUpiAccounts("", object : UpiTurboResultListener { + override fun onSuccess(accList: List) { + if (accList.isNotEmpty()) { + Log.d("UpiTurbo", "UpiAccount list") + } else { + // call linkNewAccount() + } + } + override fun onError(error: Error) { + Log.d("UpiTurbo", error.message) + } + }) + ``` + +> **WARN** +> +> +> **Watch Out!** +> +> If the device binding is not completed and the `getLinkedUpiAccounts` is triggered, it will return `OnError` with a **DEVICE_BINDING_INCOMPLETE** error message. +> + + + + + Request Parameters + + + Parameter | Description + --- + `customerMobile` | The customer's mobile number. + --- + `listener` | The listener to be sent should be of type `UpiTurboResultListener`. + + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | This function is triggered if the list was fetched successfully. `accList` can be empty to indicate that no accounts have been linked yet. + --- + `onError` | This function is triggered in case an error is thrown during the retrieval process, either by Razorpay SDK or Bank SDK. + + + + + + + +> **INFO** +> +> +> **Handy Tips** +> +> - Filter bank accounts related to each orderID or Whitelisted accounts. +> - You need to select which bank accounts users can use for payments. +> - For new users, you should display them the approved bank accounts that they can use for transactions. Users need to choose one from the provided list. +> + + + + +### 3.2 Link new UPI Account + + Use the following code to link the newly created UPI account with your app. This function can be called from anywhere in the application, providing multiple entry points for customers to link their UPI account with your app. + + +> **INFO** +> +> +> **Handy Tips** +> +> If the order is not created, you can provide CustomerId to get bank accounts whitelisted for the customer. +> + + + ```java: Java + razorpay.upiTurbo + .getTPV() + .setCustomerMobile(919900990099) + .setCustomerId(cust_DAtUWmvpktokrT) + .setOrderId(order_L2MUBUOeFItcpU) + .setTpvBankAccount( + TPVBankAccount( + accountNumber = tpvAccountNumber, + ifsc = tpvAccountIfsc, + bankName = tpvAccountName + ) + ) + .linkNewUpiAccount(new UpiTurboLinkAccountListener() { + @Override + public void onResponse(@NonNull UpiTurboLinkAction action) { + switch (action.getCode()) { + case ASK_FOR_PERMISSION: + action.requestPermission(); + break; + case SHOW_PERMISSION_ERROR: + // Show dialog to redirect the user to the settings page of the application to grant permissions + break; + case SELECT_SIM: + if (action.getError() != null) { + // Display error message + return; + } + if (action.getData() != null && action.getData() instanceof List) { + try { + List simList = (List) action.getData(); + Sim sim1 = (Sim) simList.get(0); + Sim sim2 = (Sim) simList.get(1); + // Show dialogue with a list of sims + action.selectedSim(sim1); + } catch (ClassCastException e) { + } + } + break; + case SETUP_UPI_PIN: + Card card = new Card("01", "28", "234567"); + action.setupUpiPin(card); + break; + case STATUS: + if (action.getError() != null) { + // Show error message + return; + } + if (action.getData() != null && action.getData() instanceof List) { + List onboardedUpiAccounts = (List) action.getData(); + showUpiAccount((TPVEnabledAccount) onboardedUpiAccounts.get(0)); + } + break; + case LOADER_DATA: + // Use this trigger to easily show background processes happening in the SDK during onboarding + showLoaderData((String) action.getData()); + break; + } + } + }); + + ```Kotlin: Kotlin + razorpay.upiTurbo.TPV + .setCustomerMobile(919900990099) + .setCustomerId(cust_DAtUWmvpktokrT) + .setOrderId(order_L2MUBUOeFItcpU) + .setTpvBankAccount( + TPVBankAccount( + accountNumber = tpvAccountNumber, + ifsc = tpvAccountIfsc, + bankName = tpvAccountName + ) + ) + .linkNewUpiAccount(object : UpiTurboLinkAccountListener { + override fun onResponse(action: UpiTurboLinkAction) { + when (action.code) { + UpiTurboLinkAction.ASK_FOR_PERMISSION -> { + action.requestPermission() + } + UpiTurboLinkAction.SHOW_PERMISSION_ERROR -> { + // Show Permission Required error + } + UpiTurboLinkAction.SELECT_SIM -> { + action.error?.let { + // Show ERROR UI with State. + return + } + val sims = action.data as List + val sim1 = sims[0] as Sim + val sim2 = sims[1] as Sim + // Show UI to select SIM + action.selectedSim(sim2) + } + UpiTurboLinkAction.SETUP_UPI_PIN -> { + action.error?.let { + // Show ERROR UI with State. + return + } + val card = Card("234567", "01", "28") + action.setupUpiPin(card) + } + UpiTurboLinkAction.LOADER_DATA -> { + val message = action.data.toString() + } + UpiTurboLinkAction.STATUS -> { + if (action.error != null) { + showErrorAlert(action.error!!.errorDescription) + return + } + getLinkedUpiAccounts() + } + else -> {} + } + } + }) + ``` + + + + Request Parameters + +`action` +: The current state of customer registration with which you can call further functions. All values for this variable are exposed as an enum for ease of integration. Know more about the [action parameters](#action-parameter-values). + +`mobileNumber` _mandatory_ +: Mobile number of the customer. + +`customer_id` +: The unique identifier of the customer. You can create `customer_id` using the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`tpvBankAccount` _conditionally mandatory_ +: The tpvBankAccount parameter represents a bank account configuration used for UPI transactions, containing the account number, IFSC, and bank name. + +`order_id` _conditionally mandatory_ +: Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation.md#upi-only). + + + +### Parameter Combinations and Descriptions + + + Parameters | Description + --- + `customerId` with TPV bank account | When `linkNewUpiAccount` is called with a `customerId`, TPV bank account details must also be included. This links the specific whitelisted account associated with that user. + --- + `orderId` without TPV bank account | When `linkNewUpiAccount` is called with an `orderId`, it initiates the TPV process for linking whitelisted accounts. Ensure that TPV bank account details are not provided in this case. + --- + `orderId` and `customerId` | It is not allowed to pass both `orderId` and `customerId` simultaneously in the `linkNewUpiAccount` function. You should choose either of them. + --- + `orderId` and TPV bank account details | It is not allowed to pass both `orderId` and TPV bank account details within the `linkNewUpiAccount` function. You should choose either one of them. + --- + TPV bank account without `customerId` and `orderId` | You can provide only the TPVBankAccount without passing the `customerId` and `orderId`. + + + + +### Conditions for `SELECT_SIM` action + + Conditions for `SELECT_SIM` action: + - Triggered: + - CASE 1: The customer's phone has only one SIM, but the mobile number provided is not the same as the mobile number in the SIM object. + - CASE 2: The customer's phone has multiple SIMs, but the mobile number provided is not the same as the mobile number in the SIM object in either SIMs. + - Non-Triggered: + - CASE 1: The customer's phone has one SIM, and the mobile number provided is the same as the mobile number in the SIM object received. + - CASE 2: The customer's phone has multiple SIMs, and the mobile number provided is the same as the mobile number in one of the SIM objects received by the OS. + + + + + To understand error codes for `linkNewUpiAccount`, refer to the [Error Codes of linkNewUpiAccount section](#error-codes-for). + + + +### 3.3 Submit Method + + + 1. To accept payments, call Custom Checkout’s `submit` method with the following payload: + + ```java: Java + JSONObject payload = new JSONObject(); + payload.put("currency", "INR"); + payload.put("email", "gaurav.kumar@example.com"); + payload.put("contact", "919000090000"); + payload.put("amount", "10000"); + payload.put("method", "upi"); + JSONObject upiBlock = new JSONObject(); + upiBlock.put("flow", "in_app"); + payload.put("upi", upiBlock); + payload.put("order_id", "order_L2MUBUOeFItcpU");//mandatory + payload.put("customer_id", "cust_KQlMczYKcDIqmB");//optional + + ```Kotlin: Kotlin + val payload = JSONObject(""" + { + "currency":"INR", + "amount":"700", + "email":"gaurav.kumar@example.com", + "contact":"919000090000", + "method":"upi", + // the below upi block is specific for Turbo UPI Payment + "upi":{ + "flow":"in_app" + }, + "order_id":"order_L2MUBUOeFItcpU",//optional + "customer_id":"cust_KQlMczYKcDIqmB"//optional + } + """.trimIndent()) + ``` + + 2. Pass the `vpa` and `payload` objects as shown in the code below: + + ```java: Java + HashMap turboPayload = new HashMap<>(); + turboPayload.put("upiAccount", upiAccount); + turboPayload.put("payload", payload); + razorpay.submit(turboPayload, new PaymentResultWithDataListener() { + @Override + public void onPaymentSuccess(String razorpayPaymentID, PaymentData paymentData) { + //show success message + } + @Override + public void onPaymentError(int code, String response, PaymentData paymentData) { + //Show error message + } + }); + + ```Kotlin: Kotlin + HashMap turboPayload = new HashMap<>(); + turboPayload.put("upiAccount", upiAccount); + turboPayload.put("payload", payload); + razorpay.submit(turboPayload, object: PaymentResultWithDataListener{ + override fun onPaymentSuccess(razorpay_payment_id: String?, data: PaymentData?) { + TODO("Not yet implemented") + } + + override fun onPaymentError(code: Int, message: String?, data: PaymentData?) { + TODO("Not yet implemented") + } + }) + ``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> In case of an error response, you will get a nested `reason` JSON object, which will contain the original error code and description from the bank/Secure component. +> + + + + + + + +### Steps 4: Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + - You need to store these fields in your server. + - You can confirm the authenticity of these details by verifying the signature in the next step. + + ```json: Success Callback + { + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" + } + ``` + + + Parameters + + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + + +### Step 5: Verify Signature + + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + +### Non-Transactional Flow + +You can directly interact with the exposed methods of the Turbo Framework to perform the non-transactional flows listed below. + + +### Fetch Balance + + Fetch the customer's account balance. Call `getBalance()` on the bank account object received from `upiAccount`. + + + + ```java: Java + razorpay.upiTurbo.getBalance(upiAccount, new Callback() { + @Override + public void onSuccess(AccountBalance accountBalance) { + } + + @Override + public void onFailure(@NonNull Error error) { + } + }); + + ```Kotlin: Kotlin + razorpay.upiTurbo.getBalance(upiAccount = upiAccount, listener = object: Callback{ + override fun onFailure(error: Error) {} + + override fun onSuccess(accBalance : AccountBalance) { + `object`.balance + } + }) + ``` + + + + +### Change UPI PIN + + Enable the customer to change their UPI PIN. Call `changeUpiPin()` on the bank account object received from `UpiAccount`. + + + + ```java: Java + razorpay.upiTurbo.changeUpiPin(upiAccount, new Callback() { + @Override + public void onSuccess(UpiAccount upiAccount) { + } + + @Override + public void onFailure(@NonNull Error error) { + } + }); + + ```Kotlin: Kotlin + razorpay.upiTurbo.changeUpiPin(upiAccount = upiAccount, listener = object: Callback{ + override fun onFailure(error: Error) {} + + override fun onSuccess(upiAccount : UpiAccount) {} + }) + ``` + + + + +### Reset UPI + + Let your customers reset the PIN for their account. + + + + ```java: Java + razorpay.upiTurbo.resetUpiPin(card, upiAccount, new Callback() { + @Override + public void onSuccess(Empty empty) { + } + + @Override + public void onFailure(@NonNull Error error) { + } + }); + + ```Kotlin: Kotlin + razorpay.upiTurbo.resetUpiPin(card, upiAccount, listener = object : Callback{ + override fun onFailure(error : Error) {} + + override fun onSuccess(bankAcc : BankAccount) {} + }) + ``` + + + + +### Delink + + Let your customers delink, that is, remove a selected UPI account from your application. + + + + ```java: Java + razorpay.upiTurbo.delink(upiAccount, new Callback() { + @Override + public void onSuccess(Empty empty) { + } + + @Override + public void onFailure(@NonNull Error error) { + } + }); + + ```Kotlin: Kotlin + razorpay.upiTurbo.delink(upiAccount: UpiAccount, listener = object : Callback{ + override fun onFailure(error : Error) {} + + override fun onSuccess(response : Empty) {} + + }) + ``` + + + +### Additional Features + +1. The below function is triggered internally after integrating with the Razorpay Android Custom SDK. + + ```java: Java + @Override + public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults){ + razorpay.upiTurbo.onPermissionsRequestResult() + super.onRequestPermissionsResult(requestCode, permissions, grantResults); + } + + ```Kotlin: Kotlin + override fun onRequestPermissionsResult( + requestCode: Int, + permissions: Array, + grantResults: IntArray){ + razorpay.upiTurbo.onPermissionsRequestResult() + } + ``` + +2. `razorpay.onBackPressed()` is triggered when a user tries to exit the app or return to the previous page. The `razorpay.upiTurbo.destroy()` function clears that particular session so that when the user returns, the payment process starts from the beginning. + + ```java: Java + @Override + public void onBackPressed() { + razorpay.onBackPressed(); + razorpay.upiTurbo.destroy(); + super.onBackPressed(); + } + + ```Kotlin: Kotlin + override fun onBackPressed() { + razorpay.onBackPressed() + razorpay.upiTurbo.destroy() + super.onBackPressed() + } + ``` + +3. To get the device binding status, please use the variable `razorpay.upiTurbo.isDeviceOnboarded()` of type `boolean`. It indicates whether the device binding, which is a prerequisite for adding UPI accounts, is done with the customer's mobile number. + + ```java: Java + if(razorpay.upiTurbo.isDeviceOnboarded()){ + // Device Binded + }else{ + // Call linkNewUpiAccount for Device Binding + } + ``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can use the following S2S APIs to maintain and fetch a list of all tpv bank accounts for a customer. +> - Use the [Add Bank Account of Customers API](#step-12-add-customer-s-bank-account) to add bank account of the customers. +> - Use the [Delete Bank Account of Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers/bank-accounts.md#2-delete-bank-account-of-customer) to delete bank account of the customers. +> + + +### Action Parameter Values + + Following are the constants passed in the `action.code` parameter in `onResponse`. + + + Name | Description | Next Function + --- + ASK_FOR_PERMISSION | No UPI account found. That is, the customer has not registered. You should start customer registration. | action.requestPermission() + --- + SHOW_PERMISSION_RATIONALE | You can use this to show a dialogue directing customer to navigate and enable it from app settings. | NA (You should **show** Go To Settings UI to enable permissions for the users.) + --- + SELECT_SIM | SIM details are fetched from the device to show the customer to begin the registration process. This will be skipped if the customer only has one SIM on the device. | action.selectedSim(sim) + --- + SELECT_BANK | Object AllBanks returned by SDK for user selection | action.selectedBank(bank). + --- + SELECT_BANK_ACCOUNT | List of accounts related to the customer in the selected bank. (If no accounts are found on the mobile number, `onError` will not be null, indicating that you should request a different number/SIM based on the use case). | action.selectedBankAccount(bankAccount) + --- + SET_UPI_PIN | Triggered if the UPI PIN is not set for the selected bank account. | action.setUpiPin(Card) + --- + LOADER_DATA | Returns messages that can be used for the loader, informing the customer of the steps during the onboarding process. | NA + --- + STATUS | The onboarding process's final status returns the onboarded **UpiAccount** or error after a bank account was selected or **SET_UPI_PIN** was triggered. | NA + + + + +### Error Codes for `linkNewUpiAccount` + + + + Scenario | Error Code | Description + --- + When `linkNewUpiAccount` includes a `customerId`, but no TPV bank details are present in the S2S API | TPV_BANK_ACCOUNT_NOT_FOUND | Account not found. Contact our [support team](https://razorpay.com/support/#request). + --- + When an account is linked using `setCustomerId`, but TPV bank details are not provided through `setTpvBankAccount` | INVALID_REQUEST | Invalid request. Bank account is required along with the `customer_id`. + --- + The customer mobile number is not found | INVALID_MOBILE_NUMBER | Invalid request. Mobile number is mandatory. + --- + If the TPV bank is not included in the Axis bank list | NO_BANK_FOUND | Selected bank is not available on UPI. Please try with a different bank. + --- + If the TPV bank account is not included in the Axis bank account list | NO_ACCOUNT_FOUND | Account not found. Please try with a different bank account. + --- + Case of account linking failure | ACCOUNT_LINK_ERROR | Something went wrong. Please try again + --- + If both the `orderId` and TPV bank account are provided in `setOrderId` and `setTpvBankAccount`, respectively | INVALID_REQUEST | Invalid request. Both order and bank account cannot be passed. + --- + If both the `orderId` and `customerId` are provided in `setOrderId` and `setCustomerId`, respectively | INVALID_REQUEST | Invalid request. Both `order_id` and `customer_id` cannot be passed. + + + + +### Error Codes for Delete Bank Account API + + + + Case 1: The bank account ID provided by users does not exist in Razorpay. + + ```json: Json + { + "error": { + "code": "BAD_REQUEST_BANK_ACCOUNT_DOES_NOT_EXISTS", + "description": "Bank Account does not exist", + "source": "business", + "step": "delete_bank_account", + "reason": "bank_account_does_not_exist", + "metadata": {}, + "field": "bank_account_id" + } + } + ``` + + + +### Case 2: The bank account ID provided by user is already deleted + + ```json: Json + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Bank Account is already deleted", + "source": "business", + "step": "bank_account_deletion", + "reason": "bank_account_already_deleted", + "metadata": {}, + "field": "bank_account_id" + } + } + ``` + + + +### Case 3: When one business attempts to delete the bank account of another business + + ```json: Json + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Bank Account does not exist", + "source": "business", + "step": "bank_account_deletion", + "reason": "bank_account_does_not_exist", + "metadata": {}, + "field": "bank_account_id" + } + } + ``` + + + +### Case 4: When a business provides an incorrect API key or API secret + + ```json: Json + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Unauthorized", + "source": "business", + "step": "bank_account_deletion", + "reason": "unauthorized", + "metadata": {}, + "field": "bank_account_id" + } + } + ``` + + + + + + +### Models Exposed from the SDKs + +The SDKs given below provide access to exposed models for seamless integration. + + +### TPVBankAccount + + + + Method | Return Type | Description + --- + getAccountNumber | String | Returns masked bank account number. + --- + getIfsc | String | Returns IFSC for Bank. + --- + getBankName | String | Returns the name of the bank. + --- + getBankLogoUrl | String | Returns URL to the logo of the PNG image. + --- + bankPlaceholderUrl | String | Image URL for bank logo placeholder. + + + + +### BankAccount + + + + Method | Return Type | Description + --- + `getAccountNumber()` | String | Masked account number. + --- + `getBeneficiaryName()` | String | Name of account holder. + --- + `getBank()` | String | The bank code. + + + + +### Bank + + + + Method | Return Type | Description + --- + `getIfsc()` | String | IFSC code of bank. + --- + `getName()` | String | Name of bank. + --- + `getImageURL()` | String | Image URL of bank logo. + --- + `bankPlaceholderUrl` | String | Image URL for bank logo placeholder. + + + + + +### AccountBalance + + + + Method | Return Type | Description + --- + `getBalance()` | long | Balance amount in paise. + --- + `getCurrency()` | String | Currency Type in INR. + --- + `getId()` | String | Bank Account id. + + + + + +### Error + + + + Error | Description + --- + `errorCode` | Types of error codes - `BAD_REQUEST_ERROR`: Failure from the client's end (SDK). +- `GATEWAY_ERROR`: Failure either from the Secure Component or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + `errorDescription` | Brief description of the error. + --- + `errorReason` | Specifies the specific reason for the error. + --- + `errorSource` | Indicates the origin of the error. + --- + `errorStep` | Highlights the stage where the error occurred. + + + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/error-codes.md). + + + +### UpiAccount + + + + Method | Return Type | Description + --- + `getAccountNumber` | String | Returns masked bank account number. + --- + `getAccountType` | String | The account type. Possible values are `savings` and `current`. + --- + `getIfsc` | String | Returns IFSC for Bank. + --- + `getBankName` | String | Returns name of bank. + --- + `getBankLogoUrl` | String | Returns URL to the logo of the PNG image. + --- + `bankPlaceholderUrl` | String | Image URL for bank logo placeholder. + + + + + +### SIM + + + + Method | Return Type | Description + --- + `getId()` | String | SIM id used to target SIM card for binding. + --- + `getProvider()` | String | Network provider name. + --- + `getSlotNumber()` | Integer | SIM slot number. Possible values are `0` and `1`. + --- + `getNumber()` | String | Mobile number stored in SIM card. + + + + + +### Card + + + + Method | Return Type | Description + --- + `getLastSixDigits()` | String | Last six digits of the debit card number. + --- + `getExpiryYear()` | String | Expiry year. Format: YY. + --- + `getExpiryMonth()` | String | Expiry month. + + + + + +### AllBanks + + + + Method | Return Type | Description + --- + `getPopularBanks()` | `List` | Returns the list of the top 8 banks. + --- + `getAllBanks()` | `List` | Returns a list of all banks. + + + + +### UpiTurbo.LinkAction + + + + Method | Return Type | Description + --- + `additionalDetails()` | NA | Send additional required parameters. + --- + `requestPermissions()` | NA | Request for required permissions and get SIM details. + --- + `selectedSim()` | NA | Send selected SIM object to SDK. + --- + `selectedBank()` | NA | Send selected bank object to SDK. + --- + `selectedBankAccount()` | NA | Send selected bankAccount object to SDK. + --- + `setUpiPin()` | NA | Send card object to SDK to create UPI pin. + + + + +## 2. Test Integration + +We recommend the following: + +- Complete the integration on UAT before using the prod builds. +- Perform the UAT using the Razorpay-provided API keys. + +## 3. Go-live Checklist + +Complete these steps to take your integration live: + +- You should get your app id whitelisted by Razorpay to test on prod. + + +> **INFO** +> +> +> **Handy Tips** +> +> Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number and app whitelisted. +> + + +- Import the prod library from the GitHub repository → `https://github.com/upi-turbo/android-turbo-sample-app/tree/prod/app/libs` prod branch. + +- Add Proguard rules: + + - `keepclassmembers,allowobfuscation class * { + @com.google.gson.annotations.SerializedName ; + }` + - `keepclassmembers enum * { *; }` + - `keepclassmembers class * { + @android.webkit.JavascriptInterface ; + }` + - `dontwarn com.razorpay.**` + - `keep class com.razorpay.** {*;}` + - `keep class com.olivelib.** {*;}` + - `keep class com.olive.** {*;}` + - `keep class org.apache.xml.security.** {*;}` + - `keep interface org.apache.xml.security.** {*;}` + - `keep class org.npci.** {*;}` + - `keep interface org.npci.** {*;}` + - `keep class retrofit2.** { *; }` + - `keep class okhttp3.** { *; }` + +- Replace the UAT credential with the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. diff --git a/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui.md b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui.md new file mode 100644 index 00000000..65939a72 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui.md @@ -0,0 +1,928 @@ +--- +title: Integrate Turbo UPI (Headless) on Android App +description: Steps to integrate Razorpay Turbo UPI Headless within your app. +--- + +# Integrate Turbo UPI (Headless) on Android App + +Use Razorpay Turbo UPI to make UPI payments faster. Follow these steps to integrate with the Razorpay Turbo UPI Headless SDK. + + +### Prerequisites + + 1. Integrate with the [Razorpay Android Custom SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/build-integration.md). + + 2. Contact our [Integrations team](mailto:integrations@razorpay.com) and provide the following details to get allowlisted: + + - Mobile numbers of your internal users. + - App id of your debug, staging and production apps. + + 3. Contact our [Integrations team](mailto:integrations@razorpay.com) to get the access to the Sample App Repository `https://github.com/upi-turbo/android-turbo-sample-app`. Once you have access, please read the **readme** section of the repository to learn how to locate the library files and integrate them into your project. + + 4. Add the following lines to your Android project's `gradle.properties` file: + - `android.enableJetifier=true` + - `android.useAndroidX=true` + + 5. The `minSDKversion` for using Turbo UPI is currently 23 and cannot be over written. + + **Add the following dependencies:** + + + - In the root settings.gradle file, use: + ```kotlin: Kotlin + dependencyResolutionManagement { + repositories { + // ... other repositories ... + maven { + url = uri("https://maven.pkg.github.com/upi-turbo/android-turbo-sample-app") + credentials { + username = "upi-turbo" + password = "" + } + } + } + } + ``` + + - In the library module's build.gradle, use: + + ```kotlin: Kotlin + dependencies { + // UAT + implementation "com.razorpay:customui-uat:$CUSTOMUI_VERSION" + implementation "com.razorpay:razorpay-turbo-uat:$TURBO_VERSION" + + // Production + implementation "com.razorpay:customui:$CUSTOMUI_VERSION" + implementation "com.razorpay:razorpay-turbo:$TURBO_VERSION" + } + ``` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - Use the `rzp_test_0wFRWIZnH65uny` API key id for testing on the UAT environment and the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) on the prod testing. +> +> - Replace the placeholders ($CUSTOMUI_VERSION, $TURBO_VERSION and $CHECKOUT_VERSION) with the latest versions provided by Razorpay's team or similar to `app/build.gradle` file in the Sample app. +> + + + +## 1. Integration Steps + +### 1.1 Create a Session Token + +To enhance security, you must create a session token via a server-to-server (S2S) call between your backend and Razorpay's backend. This session token ensures secure communication between the Turbo SDK and Razorpay's systems. + +#### How to Create a Session Token + +1. Trigger the S2S API from your Backend. Use the following API to generate a session token: + + Environment based URLs: + + - UAT: `https://api-web-turbo-upi.ext.dev.razorpay.in` + + - Production: `https://api.razorpay.com` + + Authorization Header Creation: `Base64.encode(${public_key}:${secret})` + + + ```curl: Curl + curl -X POST '/v1/upi/turbo/customer/session' \ + -H "Authorization: Basic " \ + -H "Content-type: application/json" \ + -d '{ + "customer_reference": "9000090000" + }' + + ``` curl: Success + { + "token": "session_token", + "expire_at": 1730097636 + } + ``` curl: Failure + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "customer_reference is required", + "source": "customer", + "step": "CreateSession", + "reason": "customer_reference_field_is_missing", + "metadata": {} + } + } + ``` + + + + +### Request Parameters + + `customer_reference` _mandatory_ + : `string` A unique identifier for the customer provided by the business. The recommended value is mobile number. For example, `9000090000`. + + + +### Response Parameters + + `token` + : `string` A session token to be used in subsequent session-protected APIs. + + `expire_at` + : `long` Expiry time (in seconds) for the session token, used to optimise session handling and reduce unnecessary reinitialisations. + + `error` + : `object` The request failure due to business or technical failure. + + + + +### 1.2 Initialise Turbo SDK + +Initialise the `TurboSessionDelegate` object anonymously and pass it through the initialize method. The SDK will call `fetchToken` function whenever required to get new token. + +In the `fetchToken` function, retrieve a new token from your server section, check [1.1 Create a Session Token](#11-create-a-session-token). Once available, pass it to the completion object. + +```kotlin: Kotlin +val turboSessionDelegate: TurboSessionDelegate = object : TurboSessionDelegate { + override fun fetchToken(completion: (Session) -> Unit) { + // fetch token here and once fetched, + // it can be passed back to Turbo SDK using completion lambda callback + completion(Session(token: )) + } +} + + // pass the above created turboSessionDelegate object through initialize method +razorpay + .upiTurbo + .initialize(turboSessionDelegate) + +```kotlin: Java +TurboSessionDelegate turboSessionDelegate = completion -> { + // Fetch token here and once fetched, + // it can be passed back to Turbo SDK using the completion callback + completion.invoke(new Session("")); + }; + + // pass the above created turboSessionDelegate object through initialize method +razorpay + .upiTurbo + .initialize(turboSessionDelegate) + +``` + +### 1.3 Getting Linked UPI Accounts + +After initialising the Turbo SDK, proceed to securely link UPI accounts and complete the payment flow. + +1. **Get already linked accounts**. + + If your customer has already linked accounts, use the following code to fetch them. If there are no linked UPI accounts, an empty list is returned. + + +> **INFO** +> +> +> **Handy Tips** +> +> - When the user arrives at your checkout screen, use the `getLinkedUpiAccounts` function to fetch the updated list of UPI accounts. +> - For enhanced user experience mobile number is required in `getLinkedUpiAccounts` function, otherwise feel free to use either mobile number or customer id. +> + + + ```Kotlin: Kotlin + razorpay.upiTurbo?.getLinkedUpiAccounts(, , object : UpiTurboResultListener { + override fun onSuccess(accList: List) { + if (accList.isNotEmpty()) { + Log.d("UpiTurbo", "UpiAccount list") + } else { + // call linkNewAccount() + } + } + override fun onError(error: Error) { + Log.d("UpiTurbo", error.message) + } + }) + + ```kotlin: Java + razorpay.upiTurbo.getLinkedUpiAccounts(, , new UpiTurboResultListener(){ + @Override + public void onError(@NonNull Error error) { + //Display error message to user. + } + + @Override + public void onSuccess(@NonNull List accList) { + if (accList.size()==0){ + //Display: no UpiAccounts onboarded yet. Please onboard an account. + }else{ + //Display onboarded UpiAccounts. + } + } + }); + + ``` + + +> **WARN** +> +> +> **Watch Out!** +> +> If the device binding is not completed and the `getLinkedUpiAccounts` is triggered, it will return an `OnError` with a **DEVICE_BINDING_INCOMPLETE** error code. +> + + + + +### Request Parameters + + `customerMobile` _mandatory_ + : `string` The customer's mobile number. + + `listener` + : `object` The listener to be sent should be of type `UpiTurboResultListener`. + + + +### Response Parameters + + `onSuccess` + : This function is triggered if the list is fetched successfully. `accList` can be empty to indicate that no accounts have been linked yet. + + `onError` + : This function is triggered in case an error is thrown during the retrieval process, either by the Razorpay SDK or the Bank SDK. + + + + +### 1.4 New user onboarding / Linking additional accounts + +Invoke the below function for these use cases: +1. To initiate new onboarding, in case you get a **DEVICE_BINDING_INCOMPLETE** error in the above section, +2. To link additional bank accounts for already onboarded users. + + +> **INFO** +> +> +> **Handy Tips** +> +> A mobile number is required in the `linkNewUpiAccount` function for an enhanced user experience. Otherwise, feel free to use either your mobile number or customer id. +> + + ```kotlin: Kotlin + razorpay.upiTurbo?.linkNewUpiAccount(, , object: UpiTurboLinkAccountListener { + override fun onResponse(action: UpiTurbo.LinkAction) { + when(action.code) { + UpiTurbo.LinkAction.ASK_FOR_PERMISSION - > { + action.requestPermission() + } + UpiTurbo.LinkAction.SHOW_PERMISSION_ERROR - > { + //Show Permission Required error + } + UpiTurbo.LinkAction.SELECT_SIM - > { + action.error ? .let { + //show ERROR UI with State. + return + } + val sims = action.data as List + val sim1 = sims[0] as Sim + val sim2 = sims[1] as Sim + // show UI to select SIM + action.selectedSim(sim2) + } + UpiTurbo.LinkAction.SELECT_BANK - > { + action.error ? .let { + //show ERROR UI with State. + return + } + val banks = action.data as AllBanks + val popularBanks : List = banks.popularBanks + val allBanks: List = banks.allBanks + //show UI with banks + action.selectedBank(popularBanks[0]) + } + UpiTurbo.LinkAction.SELECT_BANK_ACCOUNT - > { + action.error ? .let { + //show ERROR UI with State. + return + } + val bankAccounts = action.data as List + val bankAccount = bankAccounts[0] as BankAccount + // show Bank Accounts + action.selectedBankAccount(bankAccount) + } + UpiTurbo.LinkAction.SET_UPI_PIN - > { + action.error ? .let { + //show ERROR UI with State. + return + } + val card = Card("234567", "01", "28") + action.setUpiPin(card) + } + UpiTurboLinkAction.LOADER_DATA - > { + val message = action.data.toString() + } + UpiTurboLinkAction.STATUS - > { + if (action.error != null) { + showErrorAlert(action.error!!.errorDescription) + return + } + getLinkedUpiAccounts() + } + else - > {} + } + } + }) + + ```kotlin: Java + razorpay.upiTurbo.linkNewUpiAccount(, , new UpiTurboLinkAccountListener() { + @Override + public void onResponse(@NonNull UpiTurboLinkAction action) { + switch (action.getCode()) { + case ASK_FOR_PERMISSION: + action.requestPermission(); + break; + case SHOW_PERMISSION_ERROR: + //Show dialog to redirect the user to the settings page of the application to grant permissions + break; + case SELECT_SIM: + if (action.getError() != null) { + //Display error message + return; + } + if (action.getData() != null && action.getData() instanceof List) { + try { + List simList = (List ) action.getData(); + Sim sim1 = (Sim) simList.get(0); + Sim sim2 = (Sim) simList.get(1); + //Show dialogue with a list of sims + action.selectedSim(sim1); + } catch (ClassCastException e) {} + } + break; + case SELECT_BANK: + if (action.getError() != null) { + return; + } + if (action.getData() != null && action.getData() instanceof AllBanks) { + AllBanks allBanks = (AllBanks) action.getData(); + List popularBanks = allBanks.getPopularBanks(); + List allBanksList = allBanks.getBanks(); + //show dialog with bank list + action.selectedBank(popularBanks.get(0)); + } + break; + case SELECT_BANK_ACCOUNT: + if (action.getError() != null) { + return; + } + if (action.getData() != null && action.getData() instanceof List) { + List bankAccountList = (List ) action.getData(); + if (bankAccountList.get(0) instanceof BankAccount) { + //Show dialog with bank account list + action.selectedBankAccount((BankAccount) bankAccountList.get(0)); + } + } + break; + case SETUP_UPI_PIN: + Card card = new Card("01", "28", "234567"); + action.setupUpiPin(card); + break; + case STATUS: + if (action.getError() != null) { + //Show error message + return; + } + if (action.getData() != null && action.getData() instanceof List) { + List onboardedUpiAccounts = (List ) action.getData(); + showUpiAccount((UpiAccount) onboardedUpiAccounts.get(0)); + } + break; + case LOADER_DATA: + //Use this trigger to easily show background process happening in the SDK during onboarding + showLoaderData((String) action.getData()); + break; + } + } + }); + ``` + +2. Invoke the below function in your Activity's `onRequestPermissionsResult` function. + + ```kotlin: Kotlin + override fun onRequestPermissionsResult( + requestCode: Int, + permissions: Array, + grantResults: IntArray){ + if (requestCode == 101) { + // make sure not to use the 101 requestCode for your other cases + razorpay.upiTurbo.onPermissionsRequestResult() + } + } + + ```kotlin: Java + @Override + public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults){ + if (requestCode == 101) { + // make sure not to use the 101 requestCode for your other cases + razorpay.upiTurbo.onPermissionsRequestResult() + return + } + super.onRequestPermissionsResult(requestCode, permissions, grantResults); + } + + ``` + +3. Additionally `razorpay.onBackPressed()` has to be invoked when a user tries to exit the app or return to the previous page. The `razorpay.upiTurbo.releaseActivityReference()` function releases the allocated memory. + + ```kotlin: Kotlin + override fun onBackPressed() { + razorpay.onBackPressed() + razorpay.upiTurbo.releaseActivityReference() + super.onBackPressed() + } + + ```kotlin: Java + @Override + public void onBackPressed() { + razorpay.onBackPressed(); + razorpay.upiTurbo.releaseActivityReference(); + super.onBackPressed(); + } + ``` + +4. To process the payment, first create a payload, which will be a `JSONObject` as shown in the code below. + + ```kotlin: Kotlin + val payload = JSONObject(""" + { + "currency":"INR", + "amount":"700", + "email":"gaurav.kumar@example.com", + "contact":"9000090000", + "method":"upi", + // the below upi block is specific for Turbo UPI Payment + "upi":{ + "flow":"in_app" + }, + "order_id":"order_L2MUBUOeFItcpU",//mandatory + "customer_id":"cust_KQlMczYKcDIqmB"//optional + } + """.trimIndent()) + + ```kotlin: Java + JSONObject payload = new JSONObject(); + payload.put("currency", "INR"); + payload.put("email", "gaurav.kumar@example.com"); + payload.put("contact", "9000090000"); + payload.put("amount", "10000"); + payload.put("method", "upi"); + JSONObject upiBlock = new JSONObject(); + upiBlock.put("flow", "in_app"); + payload.put("upi", upiBlock); + payload.put("order_id", "order_L2MUBUOeFItcpU");//mandatory + payload.put("customer_id", "cust_KQlMczYKcDIqmB");//optional + + ``` + +5. Pass the `upiAccount` and `payload` objects as shown in the code below. + ```kotlin: Kotlin + val turboPayload = HashMap() + turboPayload["upiAccount"] = upiAccount + turboPayload["payload"] = payload + razorpay.submit(turboPayload, object : PaymentResultWithDataListener { + override fun onPaymentSuccess(razorpayPaymentID: String?, paymentData: PaymentData?) {} + override fun onPaymentError(code: Int, response: String?, paymentData: PaymentData?) { + //Show error message + } + }) + + ```kotlin: Java + HashMap turboPayload = new HashMap (); + turboPayload.put("upiAccount", upiAccount); + turboPayload.put("payload", payload); + razorpay.submit(turboPayload, new PaymentResultWithDataListener() { + @Override + public void onPaymentSuccess(String razorpayPaymentID, PaymentData paymentData) { + } + @Override + public void onPaymentError(int code, String response, PaymentData paymentData) { + //Show error message + } + }); + ``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> In case of an error response, you will get a nested `reason` JSON object, which will contain the original error code and description from the bank/NPCI. +> + +### Non-Transactional Flow + +You can directly interact with the exposed methods of the Turbo Framework to perform the non-transactional flows listed below. + + +### Fetch Balance + + Fetch the customer's account balance. Call `getBalance()` and pass the `UpiAccount` instance you have received from Turbo SDK before. + + ```kotlin: Kotlin + razorpay.upiTurbo.getBalance(upiAccount = upiAccount, listener = object: Callback{ + override fun onFailure(error: Error) {} + + override fun onSuccess(accBalance : AccountBalance) { + `object`.balance + } + }) + + ```kotlin: Java + razorpay.upiTurbo.getBalance(upiAccount, new Callback() { + @Override + public void onSuccess(AccountBalance accountBalance) { + } + + @Override + public void onFailure(@NonNull Error error) { + } + }); + + ``` + + + +### Change UPI PIN + + Provide the customer the ability to change their UPI PIN. Call `changeUpiPin()` and pass the `upiAccount` instance you have received from Turbo SDK before. + + ```kotlin: Kotlin + razorpay.upiTurbo.changeUpiPin(upiAccount = upiAccount, listener = object: Callback{ + override fun onFailure(error: Error) {} + + override fun onSuccess(upiAccount : UpiAccount) {} + }) + + ```kotlin: Java + razorpay.upiTurbo.changeUpiPin(upiAccount, new Callback() { + @Override + public void onSuccess(UpiAccount upiAccount) { + } + + @Override + public void onFailure(@NonNull Error error) { + } + }); + + ``` + + + +### Reset UPI + + Let your customers reset the PIN for their account. You will need to collect the below mentioned details for the account: + + - Bank accounts: last 6 digits, expiry month & year of the Debit Card. + - Credit cards: last 6 digits, expiry month & year of the Credit Card. + + Pass these details in the `Card` data class provided by Turbo SDK and the `upiAccount` object you received from Turbo SDK. + + ```kotlin: Kotlin + razorpay.upiTurbo.resetUpiPin(card, upiAccount, listener = object : Callback{ + override fun onFailure(error : Error) {} + + override fun onSuccess(bankAcc : BankAccount) {} + }) + + ```kotlin: Java + razorpay.upiTurbo.resetUpiPin(card, upiAccount, new Callback() { + @Override + public void onSuccess(Empty empty) { + } + + @Override + public void onFailure(@NonNull Error error) { + } + }); + + ``` + + + +### Delink + + Let your customers delink, that is, remove a selected UPI account from your application. + + ```kotlin: Kotlin + razorpay.upiTurbo.delink(upiAccount: UpiAccount, listener = object : Callback{ + override fun onFailure(error : Error) {} + + override fun onSuccess(response : Empty) {} + + }) + + ```kotlin: Java + razorpay.upiTurbo.delink(upiAccount, new Callback() { + @Override + public void onSuccess(Empty empty) { + } + + @Override + public void onFailure(@NonNull Error error) { + } + }); + + ``` + + +> **WARN** +> +> +> **Watch Out!** +> +> The same mobile number and customer id combination must be consistently passed across all sessions when calling linkNewUpiAccount and getLinkedUpiAccounts for a given user. +> + +### Additional Features + +1. To get the device binding status, please use the method `isDeviceOnboarded()` which returns a boolean. It indicates whether the device binding, which is a prerequisite for adding UPI accounts, is done with the user's mobile number. + + ```kotlin: Kotlin + if (Razorpay.UpiTurbo.isDeviceOnboarded(activity: Activity)) { + // User Device Binded + } else { + // Call Link New Account for Device Binding + } + ``` + +2. Users can now link their credit cards alongside bank accounts during onboarding. You can seamlessly retrieve both credit and bank accounts for transactions, thereby simplifying payments, expanding options, and ensuring security. + +3. Changes have been made to the [AccountBalance](#accountbalance) and [UpiAccount](#upiaccount) models regarding credit card support on UPI. + +4. Charges will be levied for payments made using CC on UPI. Contact the [support team](https://razorpay.com/support/#request) for further information. + +5. Turbo SDK will auto-select the SIM card in few cases and the `SELECT_SIM` action will not be triggered in such cases: + + - Device has only one SIM card. + + - Device has multiple SIM cards and the mobile number provided by you matches the number on one of the SIM cards. + + +### Action Parameter Values + + Following are the constants passed in the `action.code` parameter in `onResponse`. + + + + Name | Description | Next Function + --- + ASK_FOR_PERMISSION | Runtime permissions have not been granted yet, or were revoked by the user later. | action.requestPermission() + --- + SHOW_PERMISSION_ERROR | You can use this to show a dialogue directing customers to navigate and enable permissions from app settings. | NA (You should **show** Go To Settings UI to enable permissions for the customers) + --- + SELECT_SIM | SIM details are fetched from the device to show the customer to begin the registration process. This will be skipped if the customer only has one SIM on the device. | action.selectedSim(sim) + --- + SELECT_BANK | Object AllBanks returned by SDK for customer selection with: - `popularBanks` +- `allBanks` + | action.selectedBank(bank) + --- + SELECT_BANK_ACCOUNT | List of accounts related to the customer in the selected bank. (If no accounts are found on the mobile number, `onError` will not be null, indicating that you should request a different number/SIM based on the use case.) | action.selectedBankAccount(bankAccount) + --- + SET_UPI_PIN | Triggered if the UPI Pin is not set for the selected bank account. | action.setUpiPin(Card) + --- + LOADER_DATA | Returns messages that can be used for the loader, informing the customer of the steps happening during the onboarding process. | NA + --- + STATUS | The onboarding process's final status returns the onboarded UpiAccount or error after a bank account was selected or SET_UPI_PIN was triggered. | NA + + + +### Models Exposed from the SDKs + +The SDKs given below provide access to exposed models for seamless integration. + + +### BankAccount + + + + Method | Return Type | Description + --- + `getAccountNumber()` | String | Masked account number. + --- + `getBeneficiaryName()` | String | Name of the account holder. + --- + `getBank()` | String | The bank code. + --- + `state()` | BankAccountState | The current state of account. + + + + + +### Bank + + + + Method | Return Type | Description + --- + `getIfsc()` | String | IFSC code of bank. + --- + `getName()` | String | Name of bank. + --- + `getImageURL()` | String | Image URL of bank logo. + --- + `getBankPlaceholderUrl()` | String | Image URL for bank logo placeholder. + + + + + +### AccountBalance + + + + Method | Return Type | Description + --- + `getBalance()` | long | Balance amount in paise. + --- + `getCurrency()` | String | Currency Type in INR. + --- + `getId()` | String | Bank Account id. + --- + `getOutstanding()` | Long | Outstanding balance for Credit accounts. + + + + + +### Error + + + + Error | Description + --- + `getErrorCode()` | Types of error codes - `BAD_REQUEST_ERROR`: Failure from client's end (SDK). +- `GATEWAY_ERROR`: Failure either from the NPCI or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + `getErrorDescription()` | Brief description of the error. + + + + + +### UpiAccount + + + + Method | Return Type | Description + --- + `getAccountNumber()` | String | Returns masked bank account number. + --- + `getType()` | String | The account type. Possible values are `bank_account` and `credit_card`. + --- + `getIfsc()` | String | Returns IFSC for Bank. + --- + `getBankName()` | String | Returns name of bank. + --- + `getBankLogoUrl()` | String | Returns URL to the logo of the PNG image. + --- + `getBankPlaceholderUrl()` | String | Image URL for bank logo placeholder. + + + + + +### SIM + + + + Method | Return Type | Description + --- + `getId()` | String | SIM id used to target SIM card for binding. + --- + `getProvider()` | String | Network provider name. + --- + `getSlotNumber()` | Integer | SIM slot number. Possible values are `0` and `1`. + --- + `getNumber()` | String | Mobile number stored in SIM card. + + + + + +### Card + + + + Method | Return Type | Description + --- + `getLastSixDigits()` | String | Last six digits of the debit card number. + --- + `getExpiryYear()` | String | Expiry year. Format: YY. + --- + `getExpiryMonth()` | String | Expiry month. + + + + + +### AllBanks + + + + Method | Return Type | Description + --- + `getPopularBanks()` | `List` | Returns the list of the top 8 banks. + -- + `getAllBanks()` | `List` | Returns a list of all banks. + + + + +### UpiTurbo.LinkAction + + + + Method | Return Type | Description + --- + `additionalDetails()` | NA | Send additional required parameters. + --- + `requestPermissions()` | NA | Request for required permissions and get SIM details. + --- + `selectedSim()` | NA | Send selected SIM object to SDK. + --- + `selectedBank()` | NA | Send selected bank object to SDK. + --- + `selectedBankAccount()` | NA | Send selected bankAccount object to SDK. + --- + `setUpiPin()` | NA | Send card object to SDK to create UPI PIN. + --- + `selectBankAccount()` | NA | Send bank account and card details to set the pin. + + + + + +### BankAccountState + + + + Enum Instances | Description + --- + `UPI_PIN_NOT_SET` | This is the state of the bank account when the UPI pin is not set. + --- + `UPI_PIN_SET` | This is the state of the bank account when the UPI pin is set. + --- + `LINKING_IN_PROGRESS` | This is the state of the bank account when account linking is in progress. + --- + `LINKING_SUCCESS` | This is the state of the bank account when the account is linked successfully. + --- + `LINKING_FAILED` | This is the state of the bank account when the account linking is failed. + + + +## 2. Test Integration + +We recommend the following: +- Complete the integration on UAT before using the prod builds. +- Perform the UAT using the Razorpay-provided API keys. + +## 3. Go-live Checklist + +Complete these steps to take your integration live: + +- You should get your app id whitelisted by Razorpay to test on prod. + +- As a compliance requirement, you need to get approval from Google for **READ_SMS** permission. Refer [to the Google article](https://support.google.com/googleplay/android-developer/answer/10208820?hl=en) for more details. + +- Add Proguard rules: + + - `keepclassmembers,allowobfuscation class * { + @com.google.gson.annotations.SerializedName ; + }` + - `keepclassmembers enum * { *; }` + - `keepclassmembers class * { + @android.webkit.JavascriptInterface ; + }` + - `dontwarn com.razorpay.**` + - `keep class com.razorpay.** {*;}` + - `keep class com.olivelib.** {*;}` + - `keep class com.olive.** {*;}` + - `keep class org.apache.xml.security.** {*;}` + - `keep interface org.apache.xml.security.** {*;}` + - `keep class org.npci.** {*;}` + - `keep interface org.npci.** {*;}` + - `keep class retrofit2.** { *; }` + - `keep class okhttp3.** { *; }` + +- Replace the UAT credential with the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. diff --git a/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui-mock.md b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui-mock.md new file mode 100644 index 00000000..0f37b6fc --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui-mock.md @@ -0,0 +1,578 @@ +--- +title: Integrate Turbo UPI UI Mock SDK +description: Steps to integrate the Razorpay Turbo UPI UI Mock SDK with your app. +--- + +# Integrate Turbo UPI UI Mock SDK + +Mock SDK is a tool designed to facilitate your integration with Turbo UPI. Unlike conventional integration methods that rely on the stability of partner banks and NPCI UAT environments, Mock SDK removes this dependency, streamlining the integration process. + + +### Advantages + + - **No Dependency on UAT Environment**: Traditional integration methods often encounter obstacles due to issues with UAT environments. Mock SDK removes this roadblock, enabling you to integrate without external dependency. + - **Streamlines Integration**: Mock SDK is designed to create a smoother integration experience, ensuring a hassle-free process. This allows you to quickly offer Turbo UPI services to the users. + - **Effortless Integration for Essential Flows**: Mock SDK simplifies the process of integrating Turbo for important scenarios. This enables you to expand your range of UPI services for customers without dealing with complex requirements. + - **Seamless Transition to Production**: After testing your integration with Mock SDK, you can smoothly transition to the Production SDK for final testing. This ensures a seamless and secure transition from development to live production. + + + +### Prerequisites + + 1. Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number, app, and GitHub account whitelisted to get access to the `https://github.com/upi-turbo/android-turbo-sample-app` - sample app repository. + + - `app/src/turboUI`: Sample app code for UI SDK + - `app/libs`: All libraries (Bank, SecureComponent, and Turbo). + - `app/uiLibrary`: Library for UI SDK. + - `app/build.gradle`: All transitive dependencies needed to integrate Turbo SDK. + + 2. Integrate with the [Razorpay Android Custom SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/build-integration.md). + + 3. Import the following frameworks: + + - Razorpay Turbo Wrapper Plugin SDK (maven) + - Razorpay Turbo Core SDK + - Mock SDK + + 4. Add the following lines to your Android project's `gradle.properties` file: + + - `android.enableJetifier=true` + - `android.useAndroidX=true` + + +> **WARN** +> +> +> **Watch Out!** +> +> - `minSDKversion` for using Turbo UPI is currently 19 and cannot be overwritten. +> - API Key Usage for Different Environments: +> - Use the `rzp_test_0wFRWIZnH65uny` API key id for testing on the UAT environment. +> - Use the `rzp_test_vacN5cmVqNIlhO` API key id for testing on the Mock environment. +> - Use the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. +> - As a compliance requirement, you need to get approval from Google for READ_SMS permission. Refer to the [Google article](https://support.google.com/googleplay/android-developer/answer/10208820?hl=en) for more details. +> + + + +## 1. Integration Steps + +Follow these steps to integrate with [Turbo UPI with UI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui.md#1-integration-steps). + +## 2. Test Integration + +Razorpay has three environments: Mock, UAT and Prod. We recommend the following: + +- Complete the integration with the Mock environment. +- Perform the UAT using the Razorpay-provided API keys. + +### 2.1 Test Data + +Use the following data to test the integration. + + +### Bank List + + + Bank id | Bank Name | IFSC + --- + 1 | Axis | AXIS0000001 + --- + 2 | SBI | SBI00000001 + --- + 3 | HDFC | HDFC0000001 + --- + 4 | YES | YES00000001 + + + + +### Bank Accounts + + + Bank id | Bank Name | Account Number | Beneficiary Name | Account Balance | UPI PIN | ATM PIN | Card Number | Expiry Date | CVV | OTP | Type + --- + 1 | Axis Bank | xxxx0001 | Pratheek | ₹100 | Not Set | 1234 | 8000110001 | Any Future Date | Random CVV | 123456 | Savings + --- + 1 | Axis Bank | 8888 88xx xxxx 0002 | Pratheek | ₹9,000 | 123456 | 1234 | 8888 8888 8811 0002 | Any Future Date | Random CVV | 123456 | Credit Card + --- + 2 | SBI Bank | xxxx0001 | Kushaal Singla | ₹9,000 | Not Set | 1234 | 9000110001 | Any Future Date | Random CVV | 123456 | Savings + --- + 2 | SBI Bank | 8888 88xx xxxx 0003 | Kushaal Singla | ₹9,000 | Not Set | 1234 | 8888 8888 8811 0003 | Any Future Date | Random CVV | 123456 | Credit Card + --- + 2 | SBI Bank | xxxx0203 | Kushaal Singla | ₹99,999 | 123456 | 1234 | 9599110203 | Any Future Date | Random CVV | 123456 | Savings + + + +### 2.2 Test Case Coverage + +Following are the various scenarios based on the dependencies. + + +### Dependencies and Scenarios + + + S.No | Dependency | Positive Scenarios | Negative Scenarios + --- + 1 | Prefetch and Link Accounts | Fetch existing PIN set and PIN not set accounts | No account exists for that number. + --- + 2 | Device Binding | Device Binding | - SIM not found +- SMS Sending failed +- Permissions not given + + --- + 3 | Account Linking | - Account found +- PIN set +- PIN not set + | No account exists for that number. + --- + 4 | UPI ID generation | - UPI ID present(roaming profile) +- New UPI ID creation + | NA + --- + 5 | - UPI PIN Management +- Change PIN +- Reset PIN + | PIN Changed/Set Successfully | - Invalid PIN +- PIN not matching +- Incorrect OTP +- Incorrect Card details(Reset PIN) + + --- + 6 | P2M Transaction - In-App Payments | Payment Successful | - Invalid PIN +- Timeout +- Insufficient Balance + + --- + 7 | Check Balance | Show Balance | Invalid PIN + --- + 8 | Delink Account | Success Only | NA + + + +### 2.3 How to Test? + +Given are the various test cases and their sequential steps. + + +### 2.3.1 Device Binding Success + + In the scenario of successful device binding, follow these simple steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant all the required permissions as prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a list of banks for selection will appear. + + + +### 2.3.2 SIM not found + + In the event of a SIM card not being found, follow these steps: + 1. Remove all SIM cards from the device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant all the required permissions as prompted. + 4. A screen will be displayed with the error message No SIM found. + + + +### 2.3.3 Denied Permissions or Access Restricted + + When permissions are denied or access is restricted, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Deny the required permissions when prompted. + 4. A screen will be displayed, asking to allow the denied permissions. + + + +### 2.3.4 Account Found + + In the scenario where an account is found, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant the required permissions when prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a list of banks for selection will appear. + 6. Select Axis Bank or SBI Bank as mentioned in the [Test Data](#21-test-data). + 7. The accounts based on the bank selection will be shown. + + + +### 2.3.5 PIN + + + + PIN set + + When it comes to setting or managing your PIN, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant the necessary permissions when prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a list of banks for selection will appear. + 6. Select Axis Bank or SBI Bank as mentioned in the [Test Data](#21-test-data). + 7. The accounts based on the bank selection will be shown. + 8. Select the account ending with xxxx0203, as mentioned in the [Test Data](#21-test-data). + 9. The account will be linked, and the PIN will be set successfully. + + + +### PIN not set + + When dealing with scenarios where a PIN is not set, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant the necessary permissions when prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a list of banks for selection will appear. + 6. Select Axis Bank or SBI Bank as mentioned in the [Test Data](#21-test-data). + 7. The accounts based on the bank selection will be shown. + 8. Select an account ending with xxxx0001, as mentioned in the [Test Data](#21-test-data). + 9. A card details screen will be displayed. + + + +### No Account for Specified Number + + When there is no account associated with a particular number, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant the necessary permissions when prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a list of banks for selection will appear. + 6. Select HDFC or Yes Bank as mentioned in the [Test Data](#21-test-data). + 7. A screen will appear with the error message No bank account found. + + + +### PIN set Successfully + + For a successful PIN setup, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant the necessary permissions when prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a list of banks for selection will appear. + 6. Select Axis Bank or SBI Bank as mentioned in the [Test Data](#21-test-data). + 7. The accounts based on the bank selection will be shown. + 8. Select an account ending with xxxx0001, as mentioned in the [Test Data](#21-test-data). + 9. A card details screen will be displayed. Enter the details from [Test Data](#21-test-data). + 10. Enter bank OTP from [Test Data](#21-test-data) on the next screen then proceed. + 11. Enter and confirm the PIN on the subsequent screens. + + + +### Incorrect OTP + + In situations where an incorrect OTP is encountered, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant the necessary permissions when prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a list of banks for selection will appear. + 6. Select Axis Bank or SBI Bank as mentioned in the [Test Data](#21-test-data). + 7. The accounts based on the bank selection will be shown. + 8. Select an account ending with xxxx0001, as mentioned in the [Test Data](#21-test-data). + 9. A card details screen will be displayed. Enter the details form [Test Data](#21-test-data) + 12. Enter any random OTP except for 123456. + + + +### Incorrect Card Details(Reset PIN) + + When dealing with resetting your PIN with incorrect card details, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant the necessary permissions when prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a list of banks for selection will appear. + 6. Select Axis Bank or SBI Bank as mentioned in the [Test Data](#21-test-data). + 7. The accounts based on the bank selection will be shown. + 8. Select an account ending with xxxx0001, as mentioned in the [Test Data](#21-test-data). + 9. Enter incorrect card details. + + + + + + + + + + +### 2.3.6 UPI ID + + + + New UPI ID Creation (PIN already set) + + For the scenario of creating a new UPI ID with an already set PIN, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call the `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant all the required permissions as prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a screen with a list of Banks will be displayed for Bank selection. + 6. Select Axis Bank or SBI Bank as mentioned in the [Test Data](#21-test-data). + 7. The accounts based on bank selection will be shown. + 8. Select an account ending with xxxx0203, as mentioned in the [Test Data](#21-test-data). + 9. Expect the final response to confirm that an account with a UPI ID is linked successfully. + + + +### New UPI ID Creation (PIN not set) + + For the scenario of creating a new UPI ID without a set PIN, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call the `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant all the required permissions as prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a screen with a list of Banks will be displayed for Bank selection. + 6. Select Axis Bank or SBI Bank as mentioned in the [Test Data](#21-test-data). + 7. The accounts based on bank selection will be shown. + 8. Select an account ending with xxxx0001, as mentioned in the [Test Data](#21-test-data). + 9. A card detail screen will be displayed. Enter the details from [Test Data](#21-test-data). + 10. Enter the bank OTP from [Test Data](#21-test-data) on the next screen, then proceed. + 11. Enter and confirm the PIN on the subsequent screens. + + + + + + + +### 2.3.7 Transactions + + + + Payments Successful + + When it comes to transactional scenarios, with a focus on ensuring a successful payment, follow these steps: + 1. Begin by following the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui.md#1-integration-steps), specifically the `submit` method. + 2. Enter an amount that is lower than the account balance. + 3. Enter the correct PIN. + 4. Subsequently, you will receive a callback on `onPaymentSuccess`. This indicates that the payment has been successfully processed. + + + +> **INFO** +> +> +> **Handy Tips** +> +> The account balance remains unchanged, and the paid amount is not deducted in mock payment. +> + + + + + +### Invalid PIN + + In situations where an invalid PIN is entered, follow these steps: + 1. Begin by following the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui.md#1-integration-steps), specifically the `submit` method. + 2. Enter an amount lower than the account balance mentioned in [Test Data](#21-test-data). + 3. Enter the incorrect PIN. + 4. Subsequently, you will receive a callback on `onPaymentError`. This indicates an error occurred during the payment process due to the invalid PIN. + + + +### Timeout + + When dealing with transactional scenarios, specifically focusing on handling timeouts, follow these steps: + 1. Begin by following the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui.md#1-integration-steps), specifically the `submit` method. + 2. Enter the amount as 24. + 3. Enter the correct PIN. + 4. Subsequently, you will receive a callback on `onPaymentError`. This indicates that an error occurred during the payment process due to a timeout. + + + +### Insufficient Balance + + When it comes to transactional scenarios with a focus on handling insufficient balance, follow these steps: + 1. Begin by following the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui.md#1-integration-steps), specifically the `submit` method. + 2. Enter an amount greater than the account balance as mentioned in [Test Data](#21-test-data). + 3. Enter the correct PIN. + 4. Subsequently, you will receive a callback on `onPaymentError`. This indicates an error occurred during the payment process due to insufficient balance. + + + + + + + +### 2.3.8 Manage Accounts + + + + Show Balance + + For scenarios related to checking your balance, follow these steps: + + 1. Enter a mobile number that is already registered on the device. + 2. Call `razorpay.upiTurbo.manageUpiAccounts` method. + 3. A list of linked accounts will be displayed. + 4. Select the account for which you want to check the balance. + 5. Click on Check Balance, then enter the correct PIN when prompted. + 6. The balance for the selected account will be displayed. + + + +### Check Balance - Invalid PIN + + When it comes to scenarios focused on checking your balance, follow these steps: + + 1. Enter a mobile number that exists on the user's device. + 2. Call the `razorpay.upiTurbo.manageUpiAccounts` method. + 3. A list of linked accounts will be displayed. + 4. Select the account for which you want to check the balance. + 5. Click on Check Balance. + 6. Enter an incorrect PIN when prompted. + 7. An error message will be displayed indicating that the provided PIN is invalid or does not match the expected PIN. + + + +### Delink Account - Success + + When it comes to scenarios related to delinking your account, follow these steps: + + 1. Enter a mobile number that is already registered on the device. + 2. Call `razorpay.upiTurbo.manageUpiAccounts` method. + 3. A list of linked accounts will be displayed. + 4. Select the account you wish to delink. + 5. Click on the option to delink or remove the account. + 6. A confirmation alert will be displayed, confirming that your account has been successfully delinked. + + + +### Change PIN - Success + + When it comes to successfully changing your PIN, follow these steps: + + 1. Enter a mobile number that is registered on the device. + 2. Call `razorpay.upiTurbo.manageUpiAccounts` method. + 3. A list of linked accounts will be presented. + 4. Select the specific account for which you intend to change the PIN. + 5. Click on Change PIN, and proceed to enter the current PIN, along with the new PIN, and confirm the new PIN on the subsequent screens. + + + +### Change PIN - Failure + + When attempting to change your PIN but encountering a failure, follow these steps: + + 1. Enter a mobile number that is registered on the device. + 2. Call `razorpay.upiTurbo.manageUpiAccounts` method. + 3. A list of linked accounts will be displayed. + 4. Select the specific account for which you wish to change the PIN. + 5. Click on Change PIN and proceed to enter an incorrect PIN, or enter a new PIN and a different PIN while confirming it. + + + +### Reset PIN - Success + + To successfully reset your PIN, proceed with the following steps: + + 1. Enter a mobile number that is registered on the device. + 2. Call the `razorpay.upiTurbo.manageUpiAccounts` method. + 3. View the list of linked accounts. + 4. Select the specific account for which you wish to reset the PIN. + 5. Click on Reset PIN and follow the prompts to input the bank OTP from the [Test Data](#21-test-data). + 6. Enter the new PIN and confirm it on the subsequent screens. + + + + + + + +### 2.3.9 Prefetch + + + + 2.3.9.1 First Time Onboarding + + + + Onboarding Success + + Follow these simple steps for the first time onboarding: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.prefetchAndLinkUpiAccountsWithUI` method. + 3. Grant all the required permissions as prompted. + 4. The device binding process is initiated, including SMS sending. + 5. After the successful binding, a screen with a title **Fetching accounts** is displayed. + 6. Expect a callback on `onResponse`. This callback contains 2 lists with PIN set and PIN not set accounts. + 7. After an account is linked, the callback `onResponse` is received again asynchronously with updated lists. + + + +### Denied Prefetch Consent + + Follow these simple steps for the first time onboarding: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.prefetchAndLinkUpiAccountsWithUI` method. + 3. Grant all the required permissions as prompted. + 4. The device binding process is initiated, including SMS sending. + 5. After the successful binding, a list of banks appear for selection. + + + +### PIN Set + + When it comes to setting or managing your PIN, follow these steps: + 1. Call the `razorpay.upiTurbo.setUpiPinWithUI` method. + 2. A card details screen is displayed. Enter the details from the [Test Data](#21-test-data) section. + 3. Enter bank OTP from the [Test Data](#21-test-data) on the next screen and then proceed. + 4. Enter and confirm the PIN on the subsequent screens. + + + + + + +### 2.3.9.2 Accounts Already Onboarded + + Follow these steps for accounts that are already onboarded: + 1. Call the `razorpay.upiTurbo.prefetchAndLinkUpiAccountsWithUI` method. + 2. A list of banks appear for selection. + 3. Select the bank you want to link the account to. + + + + + + +> **WARN** +> +> +> **Watch Out!** +> +> - Device Binding will only work if the user has at least one SIM card in their mobile device. +> - Users can set/reset the UPI PIN. The configured PIN will be used to validate the transaction. +> - Based on the [Test Data](#21-test-data) for bank accounts, choose a bank for a single, multiple or no bank account. +> - Use the same ATM PIN and card Number mentioned in the [Test Data](#21-test-data). +> - The UPI PIN will revert to its default setting or be removed when you uninstall or clear storage. +> - Amount ₹24 is blocked for special cases. Please refer to [Additional Cases](#24-additional-cases). +> + +### 2.4 Additional Cases + +Businesses should have the capability to display a user-friendly message to their customers for certain special or additional error scenarios. The SDK is equipped to simulate some of these cases. + +Action | Input Data | Code | Description +--- +Pay | Amount = ₹24 | 91 | Timeout +--- + +### 2.5 TPV Cases + +The following points are be considered for TPV flow: + +- Only one TPV whitelisted account (ending with xxxx0203) is permitted. Payments made using any other accounts will fail with the error Payment failed because the account linked to VPA is invalid. +- Payment can be made multiple times when using Mock for any given `order_id`, which is not the case in production. +- Use the `rzp_test_V5AtnjYvupQXm1` API key id for TPV testing on the Mock environment. + +## 3. Go-live Checklist + +Complete this [Go-live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui.md#3-go-live-checklist) to take your integration live. diff --git a/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui-tpv.md b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui-tpv.md new file mode 100644 index 00000000..b505187a --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui-tpv.md @@ -0,0 +1,878 @@ +--- +title: Integrate Turbo UPI TPV +description: Know how Razorpay performs Third-Party Validation (TPV) of investor bank accounts in real-time using Razorpay Turbo UPI with UI. +--- + +# Integrate Turbo UPI TPV + +Third-party validation (TPV) of bank accounts is mandatory for businesses in the BFSI (Banking, Financial Services and Insurance) sector dealing with Securities, Broking and Mutual Funds. You can accept customer payments with the Turbo UPI UI TPV SDK. Know more about [How TPV works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation.md#how-it-works). + +> **WARN** +> +> +> +> **Watch Out!** +> +> You can choose to maintain a whitelisted account per customer using the S2S [Customer Add Bank Account API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers/bank-accounts.md#1-add-bank-account-of-customer) on your end. This is an additional functionality. This will help you during the onboarding flow, where only whitelisted accounts will be shown to the users during onboarding. +> + + +### Prerequisites + + 1. Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number, app, and GitHub account whitelisted to get access to the `https://github.com/upi-turbo/android-turbo-sample-app` - sample app repository. In this repository, you will find the AAR files (libraries for Turbo UPI) and the sample app source code to help you with the integration. The AARs on the main branch are for the UAT environment, and the ones on the prod branch are for the production environment. + + These are the important files in the sample app repo: + - `app/src/turboUI`: Sample app code for UI SDK + - `app/libs`: All libraries (Bank, SecureComponent and Turbo) common for headless and UI SDK. + - `app/uiLibrary`: Library for UI SDK. + - `app/build.gradle`: All transitive dependencies needed to integrate Turbo SDK. + + 2. Integrate with the [Razorpay Android Custom SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/build-integration.md). + + 3. Import the following frameworks: + - Razorpay Turbo Wrapper Plugin SDK (maven) + - Razorpay Turbo Core SDK + - Razorpay SecureComponent SDK + - Bank SDK + + 4. Add the following lines to your Android project's `gradle.properties` file: + - `android.enableJetifier=true` + - `android.useAndroidX=true` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - `minSDKversion` for using Turbo UPI is currently 19 and cannot be over written. +> - Use the `rzp_test_5sHeuuremkiApj` API key id for testing on the UAT environment and the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. +> - As a compliance requirement, you need to get approval from Google for **READ_SMS** permission. Refer [to the Google article](https://support.google.com/googleplay/android-developer/answer/10208820?hl=en) for more details. +> + + + +## 1. Integration Steps + +Given below are the steps: + + +### Step 1: Whitelist Customer Bank Accounts *(Optional)* + + You can whitelist (also known as allowlist) your customer's bank accounts to ensure that only those accounts are considered during customer onboarding. By whitelisting the accounts at the start, you can avoid the bank account linking during payment. Use the Customer APIs to create customers and add their bank account details. + + For example, if a customer, Gaurav, has two bank accounts ABC and XYZ, you can use the APIs to create a customer id and link the bank accounts to that id. You can then pass this customer id at the time of payment. + + Follow these steps. + + + Step 1.1: Create a Customer + + Use this endpoint to create or add a customer with basic details such as name and contact details. + + ```cURL: Request + + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "Gaurav Kumar", + "contact": "9123456780", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + }' + + ```json: Success Response + { + "id" : "cust_1Aa00000000004", + "entity": "customer", + "name" : "Gaurav Kumar", + "email" : "gaurav.kumar@example.com", + "contact" : "9123456780", + "gstin": null, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at ": 1234567890 + } + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } + } + ``` + + + + Request Parameters + + +`name` _optional_ +: `string` Customer's name. Alphanumeric value with period (.), apostrophe ('), forward slash (/), at (@) and parentheses are allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact ` _optional_ +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email ` _optional_ +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`fail_existing` _optional_ +: `string` Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + +`gstin` _optional_ +: `string` Customer's GST number, if available. For example, `29XAbbA4369J1PA`. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + + +### Response Parameters + + +`id` +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`name` +: `string` Customer's name. Alphanumeric, with period (.), apostrophe ('), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact` +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email` +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`gstin` +: `string` GST number linked to the customer. For example, `29XAbbA4369J1PA`. + +`notes` +: `json object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + + + + + + + +### Step 1.2: Add Customer's Bank Account + + The following endpoint adds the customer's bank accounts. + + customers/:customer_id/bank_account + + ```cURL: Request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers/:customer_id/bank_account \ + -H "Content-Type: application/json" \ + -d '{ + "ifsc_code" : "UTIB0000194", + "account_number" :"916010082985661", + "beneficiary_name" : "Gaurav", + "beneficiary_address1" : "address 1", + "beneficiary_address2" : "address 2", + "beneficiary_address3" : "address 3", + "beneficiary_address4" : "address 4", + "beneficiary_email" : "gaurav.kumar@example.com", + "beneficiary_mobile" : "9900990099", + "beneficiary_city" :"Bangalore", + "beneficiary_state" : "KA", + "beneficiary_country" : "IN" + }' + + ```json: Response + { + "id": "ba_LSZht1Cm7xFTwF", + "entity": "bank_account", + "ifsc": "ICIC0001207", + "bank_name": "ICICI Bank", + "name": "Gaurav Kumar", + "notes": [], + "account_number": "XXXXXXXXXXXXXXX0434" + } + ``` + + + + Path Parameter + +`customer_id` _mandatory_ +: `string` Customer id of the customer whose bank account is to be added. + + + + +### Request Parameters + + +`account_number` _mandatory_ +: `string` Customer's bank account number. For example, `11214311215411`. + +`beneficiary_name` _mandatory_ +: `string` The name of the beneficiary associated with the bank account. + +`beneficiary_address1` _optional_ +: `string` The virtual payment address. + +`beneficiary_email` _optional_ +: `string` Email address of the beneficiary. For example, `gaurav.kumar@example.com`. + +`beneficiary_mobile` _optional_ +: `string` Mobile number of the beneficiary. + +`beneficiary_city` _optional_ +: `string` The city of the beneficiary. + +`beneficiary_state` _optional_ +: `string` The state of the beneficiary. + +`beneficiary_country` _optional_ +: `string` The country of the beneficiary. + +`beneficiary_pin` _optional_ +: `integer` The pin code of the beneficiary's address. + +`ifsc_code` _mandatory_ +: `string` The IFSC of the bank branch associated with the account. + + + +### Response Parameters + +`bank_accounts` +: `array` An array containing bank account details. + + `id` + : `string` Unique identifier of the bank account. + + `entity` + : `string` The type of entity, which in this case is `bank_account`. + + `ifsc` + : `string` The IFSC of the bank branch associated with the account. + + `bank_name` + : `string` The name of the bank. + + `name` + : `string` The name associated with the bank account. + + `notes` + : `object` Set of key-value pairs that can be used to store additional information about the payment. + + `account_number` + : `integer` Customer's bank account number. For example, `0002020000304030434`. + + + + + + + + + +### Step 2: Create an Order *(Mandatory)* + + Pass the investor bank account details to the `bank_account` array of the Orders API. Given below is the sample code when the `method` is `upi`. + + ```curl: Request + curl -u : \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 500, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }' + + ```json: Response + { + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 500, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 + } + ``` + + + + Request Parameters + + `amount` _mandatory_ +: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, the value of this field should be `100`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. You can create orders in **INR** only. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`method` _mandatory_ +: `string` The payment method used to make the payment. If this parameter is not passed, investors will be able to make payments using both netbanking and UPI payment methods. Possible values: + - `netbanking`: Investors can make payments only using netbanking. + - `card`: Investors can make payments using debit card. + - `upi`: Investors can make payments only using UPI. + +`bank_account` _mandatory_ +: `object` Details of the bank account that the investor has provided at the time of registration. + + `account_number` _mandatory_ + : `string` The bank account number from which the investor should make the payment. For example, `765432123456789` Payments will not be processed for an incorrect account number. + + `name` _mandatory_ + : `string` The name linked to the bank account. For example, `Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` The bank IFSC. For example, `HDFC0000053`. + + + +### Response Parameters + + `id` +: `string` Unique identifier of the order. + +`entity` +: `string` Indicates the type of entity. Here, it is `order`. + +`amount` +: `integer` The order amount represented in the smallest unit of the currency passed. For example, amount = 100 translates to 100 paise, that is ₹1 (default currency is INR). + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we support INR only. + +`receipt` +: `string` A unique identifier of the order entered by the user. For example, `BILL13375649`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, "note_key": "Beam me up Scotty”. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`offer_id` +: `string` Unique identifier of the offer. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + + + + + + +### Step 3: Turbo UPI with UI SDK Action + + You need to link the customer's UPI account with your app. Use the code samples given below to [fetch the UPI account](#31-get-customer-s-linked-upi-account). + + + 3.1 Get Customer's Linked UPI Account + + + Use the following code to fetch your customer's UPI account. If there are no linked UPI accounts, an empty list is returned. + + ```Kotlin: Kotlin + razorpay.upiTurbo?.getLinkedUpiAccounts("", object : UpiTurboResultListener { + override fun onSuccess(accList: List) { + if (accList.isNotEmpty()) { + Log.d("UpiTurbo", "UpiAccount list") + } else { + // call linkNewAccount() + } + } + override fun onError(error: Error) { + Log.d("UpiTurbo", error.message) + } + }) + ``` + + + Request Parameters + + + Parameter | Description + --- + `customerMobile` | The customer's mobile number. + --- + `listener` | The listener to be sent should be of type `UpiTurboResultListener`. + + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | This function is triggered if the list was fetched successfully. `accList` can be empty to indicate that no accounts have been linked yet. + --- + `onError` | This function is triggered in case an error is thrown during the retrieval process, either by Razorpay SDK or Bank SDK. + + + + + + +> **INFO** +> +> +> **Handy Tips** +> +> - Filter bank accounts related to each orderID or Whitelisted accounts. +> - You need to select which bank accounts users can use for payments. +> - For new users, you should display them the approved bank accounts that they can use for transactions. Users need to choose one from the provided list. +> + + + + +### 3.2 Link New UPI Account + + Use the following code to link the newly created UPI account with your app. This function can be called from anywhere in the application, providing multiple entry points for customers to link their UPI account with your app. + + +> **INFO** +> +> +> **Handy Tips** +> +> If the order is not created, you can provide CustomerId to get bank accounts whitelisted for the customer. +> + + ```java: Java + razorpay.upiTurbo + .getTPV() + .setCustomerMobile("919900990099") + .setCustomerId(cust_DAtUWmvpktokrT) + .setOrderId(order_DEWJo825vIWdS2) + .setTpvBankAccount( + TPVBankAccount( + accountNumber = tpvAccountNumber, + ifsc = tpvAccountIfsc, + bankName = tpvAccountName + ) + ) + .setActivity(activity) + .setColor("#00000") + .linkNewUpiAccountWithUI(new UpiTurboLinkAccountResultListener() { + @Override + public void onSuccess(@NonNull List upiAccounts) { + + } + + @Override + public void onError(@NonNull Error error) { + + } + }); + + ```Kotlin: Kotlin + razorpay.upiTurbo?.TPV? + .setTpvBankAccount( + TPVBankAccount( + accountNumber = tpvAccountNumber, + ifsc = tpvAccountIfsc, + bankName = tpvAccountName + ) + )?.setCustomerMobile("919900990099")?.setActivity(context) + ?.setColor("#00000")?.linkNewUpiAccountWithUI(object : UpiTurboLinkAccountResultListener { + override fun onSuccess(upiAccounts: List) { + } + + override fun onError(error: Error) { + } + }) + ``` + + + + Request Parameters + + + Parameters | Description + --- + `setCustomerMobile` | The customer's mobile number. + --- + `setCustomerID` | The unique identifier of the customer. You can create `customer_id` using the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + ---- + `setActivity` | Sets the context or activity for the operation. + --- + `setOrderID` | Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation.md#upi-only). + ---- + `tpvBankAccount` | The tpvBankAccount parameter represents a bank account configuration used for UPI transactions, containing the account number, IFSC, and bank name. + --- + `listener` | The listener to be sent should be of type `UpiTurboLinkAccountResultListener`. + + + + +### Parameter Combinations and Descriptions + + + Parameters | Description + --- + `customerId` with TPV bank account | When `linkNewUpiAccount` is called with a `customerId`, TPV bank account details must also be included. This links the specific whitelisted account associated with that user. + --- + `orderId` without TPV bank account | When `linkNewUpiAccount` is called with an `orderId`, it initiates the TPV process for linking whitelisted accounts. Ensure that TPV bank account details are not provided in this case. + --- + `orderId` and `customerId` | It is not allowed to pass both `orderId` and `customerId` simultaneously in the `linkNewUpiAccount` function. You should choose either of them. + --- + `orderId` and TPV bank account details | It is not allowed to pass both `orderId` and TPV bank account details within the `linkNewUpiAccount` function. You should choose either one of them. + --- + TPV bank account without `customerId` and `orderId` | You can provide only the TPVBankAccount without passing the `customerId` and `orderId`. + + + + +### Response Parameters + + + Parameters | Description + --- + `onSuccess` | This function is triggered if the list was fetched successfully. `accList` can be empty to indicate that no accounts have been linked yet. + --- + `onError` | This function is triggered in case an error is thrown during the retrieval process, either by the Razorpay SDK or the Bank SDK. + + + + + + +> **WARN** +> +> +> **Watch Out!** +> +> - You can filter UpiAccounts for bank accounts related to each orderID or Whitelisted accounts. +> - You can choose to maintain a whitelisted account list per customer using S2S Customers API on your end. +> + + + + +### 3.3 Submit Method + + 1. To accept payments, call Custom Checkout’s `submit` method with the following payload: + + ```java: Submit method + val payload = JSONObject(""" + { + "currency":"INR", + "amount":"700", + "email":"gaurav.kumar@example.com", + "contact":"9999999999", + "method":"upi", + // The below upi block is specific for Turbo UPI Payment + "upi":{ + "flow":"in_app" + }, + "order_id":"order_L2MUBUOeFItcpU",//mandatory + "customer_id":"cust_KQlMczYKcDIqmB"//optional + } + """.trimIndent()) + ``` + + 2. Pass the `upiAccount` and `payload` objects as shown in the code below: + + ```java: Function call + HashMap turboPayload = new HashMap<>(); + turboPayload.put("upiAccount", upiAccount); + turboPayload.put("payload", payload); + razorpay.submit(turboPayload, object : PaymentResultListener { + override fun onPaymentSuccess(razorpay_payment_id: String?, data: PaymentData?) { + // show the appropriate status of the payment to the user. + } + + override fun onPaymentError(code: Int, message: String?, data: PaymentData?) { + //Show the appropriate status of the payment to the user. + } + }) + ``` + + + + + + +### Steps 4: Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + - You need to store these fields in your server. + - You can confirm the authenticity of these details by verifying the signature in the next step. + + ```json: Success Callback + { + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" + } + ``` + + + Parameters + + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + + +### Step 5: Verify Signature + + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + +### Non-Transactional Flow + +You can directly interact with the exposed methods of the Turbo Framework to perform the non-transactional flows listed below. + + +### Manage UPI Accounts + + Let Razorpay SDK manage the linked UpiAccounts on the applications by triggering `manageUpiAccounts()`. + + ```kotlin: Kotlin + razorpay.upiTurbo + .manageUpiAccounts("9999999999", new UpiTurboManageAccountListener { + @Override + public void onSuccess(@NonNull List tpvEnabledAccoun) { + + } + + @Override + public void onError(@NonNull Error error) { + + } + }); + + ```java: Java + razorpay.upiTurbo?.manageUpiAccounts("9999999999", + object : UpiTurboManageAccountListener { + override fun onError(error: JSONObject) { + /*Throws error if UPI Turbo cannot be initialized or throws error*/} + + override fun onSuccess(data: Any) {/*Can be safely ignored*/} + }) + ``` + + +### Additional Features + +1. The below function is triggered internally after integrating with the Razorpay Android custom SDK. + + ```java: Initialise SDK + import com.razorpay.Razorpay + + Razorpay razorpay = new Razorpay(activity, merchantKey); + ``` + +2. The `.onBackPressed()` is triggered when a customer tries to exit the app or return to the previous page. The `razorpay.upiTurbo.destroy()` function clears that particular session so that when the customer returns, the payment process starts from the beginning. + + ```Kotlin: Kotlin + override fun onBackPressed() { + razorpay.onBackPressed() + razorpay.upiTurbo.destroy() + super.onBackPressed() + } + ``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can use the following S2S APIs to maintain and fetch a list of all tpv bank accounts for a customer. +> - Use the [Add Bank Account of Customers API](#step-12-add-customer-s-bank-account) to add bank account of the customers. +> - Use the [Delete Bank Account of Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers/bank-accounts.md#2-delete-bank-account-of-customer) to delete bank account of the customers. +> + +### Models Exposed from the SDKs + +The SDKs given below provide access to exposed models for seamless integration. + + +### TPVBankAccount + + + + Method | Return Type | Description + --- + getAccountNumber | String | Returns masked bank account number. + --- + getIfsc | String | Returns IFSC for Bank. + --- + getBankName | String | Returns the name of the bank. + --- + getBankLogoUrl | String | Returns URL to the logo of the PNG image. + --- + bankPlaceholderUrl | String | Image URL for bank logo placeholder. + + + + +### UpiAccount + + + + Method | Return Type | Description + --- + `getAccountNumber` | String | Returns masked bank account number. + --- + `getAccountType` | String | The account type. Possible values are `savings` and `current`. + --- + `getIfsc` | String | Returns IFSC for Bank. + --- + `getBankName` | String | Returns name of bank. + --- + `getBankLogoUrl` | String | Returns URL to the PNG image logo. + --- + `bankPlaceholderUrl` | String | Image URL for bank logo placeholder. + + + + + +### Error + + + + Error | Description + --- + `errorCode` | Types of error codes - `BAD_REQUEST_ERROR`: Failure from the client's end (SDK). +- `GATEWAY_ERROR`: Failure either from the Secure Component or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + `errorDescription` | Brief description of the error. + --- + `errorReason` | Specifies the specific reason for the error. + --- + `errorSource` | Indicates the origin of the error. + --- + `errorStep` | Highlights the stage where the error occurred. + + + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/error-codes.md). + + +## 2. Test Integration + +We recommend the following: + +- Complete the integration on UAT before using the prod builds. +- Perform the UAT using the Razorpay-provided API keys. + +## 3. Go-live Checklist + +Complete these steps to take your integration live: + +- You should get your app id whitelisted by Razorpay to test on prod. + + +> **INFO** +> +> +> **Handy Tips** +> +> Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number and app whitelisted. +> + + +- Import the prod library from the GitHub repository → `https://github.com/upi-turbo/android-turbo-sample-app/tree/prod/app/libs` prod branch. + +- Add Proguard rules: + + - `keepclassmembers,allowobfuscation class * { + @com.google.gson.annotations.SerializedName ; + }` + - `keepclassmembers enum * { *; }` + - `keepclassmembers class * { + @android.webkit.JavascriptInterface ; + }` + - `dontwarn com.razorpay.**` + - `keep class com.razorpay.** {*;}` + - `keep class com.olivelib.** {*;}` + - `keep class com.olive.** {*;}` + - `keep class org.apache.xml.security.** {*;}` + - `keep interface org.apache.xml.security.** {*;}` + - `keep class org.npci.** {*;}` + - `keep interface org.npci.** {*;}` + - `keep class retrofit2.** { *; }` + - `keep class okhttp3.** { *; }` + +- Replace the UAT credential with the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. diff --git a/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui.md b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui.md new file mode 100644 index 00000000..a9a36fd9 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui.md @@ -0,0 +1,602 @@ +--- +title: Integrate Turbo UPI (with UI) on Android App +description: Steps to integrate Razorpay Turbo UPI with UI on your Android app. +--- + +# Integrate Turbo UPI (with UI) on Android App + +Use Razorpay Turbo UPI to make UPI payments faster. Follow these steps to integrate with the Razorpay Turbo UPI UI SDK. + + +### Prerequisites + + 1. Integrate with the [Razorpay Android Custom SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/build-integration.md). + + 2. Contact our [Integrations team](mailto:integrations@razorpay.com) and provide the following details to get allowlisted: + + - Mobile numbers of your internal users. + - App id of your debug, staging and production apps. + + 3. Contact our [Integrations team](mailto:integrations@razorpay.com) to get the access to the Sample App Repository `https://github.com/upi-turbo/android-turbo-sample-app`. Once you have access, please read the **readme** section of the repository to learn how to locate the library files and integrate them into your project. + + 4. Add the following lines to your Android project's `gradle.properties` file: + - `android.enableJetifier=true` + - `android.useAndroidX=true` + + 5. The `minSDKversion` for using Turbo UPI is currently 23 and cannot be over written. + + **Add the following dependencies:** + + + - In the root settings.gradle file, use: + ```kotlin: Kotlin + dependencyResolutionManagement { + repositories { + // ... other repositories ... + maven { + url = uri("https://maven.pkg.github.com/upi-turbo/android-turbo-sample-app") + credentials { + username = "upi-turbo" + password = "" + } + } + } + } + ``` + + - In the library module's build.gradle, use: + + ```kotlin: Kotlin + dependencies { + // UAT + implementation "com.razorpay:customui-uat:$CUSTOMUI_VERSION" + implementation "com.razorpay:razorpay-turbo-uat:$TURBO_VERSION" + implementation "com.razorpay:turbo-ui-uat:$TURBO_VERSION" + + // Production + releaseImplementation "com.razorpay:customui:$CUSTOMUI_VERSION" + releaseImplementation "com.razorpay:razorpay-turbo:$TURBO_VERSION" + releaseImplementation "com.razorpay:turbo-ui:$TURBO_VERSION" + } + ``` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - Use the `rzp_test_0wFRWIZnH65uny` API key id for testing on the UAT environment and the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) on the prod testing. +> - Replace the placeholders ($CUSTOMUI_VERSION, $TURBO_VERSION and $CHECKOUT_VERSION) with the latest versions provided by Razorpay's team or similar to `app/build.gradle` file in the Sample app. +> +> + + + +## Integrate Steps + +### 1.1 Create a Session Token + +To enhance security, you must create a session token via a server-to-server (S2S) call between your backend and Razorpay's backend. This session token ensures secure communication between the Turbo SDK and Razorpay's systems. + +#### How to Create a Session Token + +1. Trigger the S2S API from your Backend. Use the following API to generate a session token: + + Environment based URLs: + + - UAT: `https://api-web-turbo-upi.ext.dev.razorpay.in` + + - Production: `https://api.razorpay.com` + + Authorization Header Creation: `Base64.encode(${public_key}:${secret})` + + + ```curl: Curl + curl -X POST '/v1/upi/turbo/customer/session' \ + -H "Authorization: Basic " \ + -H "Content-type: application/json" \ + -d '{ + "customer_reference": "9000090000" + }' + ``` curl: Success + { + "token": "session_token", + "expire_at": 1730097636 + } + ``` curl: Failure + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "customer_reference is required", + "source": "customer", + "step": "CreateSession", + "reason": "customer_reference_field_is_missing", + "metadata": {} + } + } + ``` + + + + +### Request Parameters + + `customer_reference` _mandatory_ + : `string` A unique identifier for the customer provided by the business. The recommended value is mobile number. For example, `9000090000`. + + + +### Response Parameters + + `token` + : `string` A session token to be used in subsequent session-protected APIs. + + `expire_at` + : `long` Expiry time (in seconds) for the session token, used to optimise session handling and reduce unnecessary reinitialisations. + + `error` + : `object` The request failure due to business or technical failure. + + + + +2. Pass the Generated Token to Turbo SDK. Use the session token in the [initialisation step](#12-initialise-turbo-sdk), ensuring that it is refreshed upon expiry. + +### 1.2 Initialise Turbo SDK + +Initialise the `TurboSessionDelegate` object anonymously and pass it through the initialize method. The SDK will call `fetchToken` whenever required and use the provided callback to handle the new/updated token. + +In the fetchToken function, retrieve a new token from your server (see [1.1 Create a Session Token](#11-create-a-session-token)) and once available, pass it to the completion object. This mechanism allows you to seamlessly refresh the session by retrieving a new token via a server-to-server (S2S) call whenever the SDK requests it. + +```kotlin: Kotlin +val turboSessionDelegate: TurboSessionDelegate = object : TurboSessionDelegate { + override fun fetchToken(completion: (Session) -> Unit) { + // fetch token here and once fetched, + // it can be passed back to Turbo SDK using completion lambda callback + completion(Session(token: )) + } +} + + // pass the above created turboSessionDelegate object through initialize method +razorpay + .upiTurbo + .initialize(turboSessionDelegate) + +```kotlin: Java +TurboSessionDelegate turboSessionDelegate = completion -> { + // Fetch token here and once fetched, + // it can be passed back to Turbo SDK using the completion callback + completion.invoke(new Session("")); + }; + + // pass the above created turboSessionDelegate object through initialize method +razorpay + .upiTurbo + .initialize(turboSessionDelegate) + +``` + +### 1.3 Getting Linked UPI Accounts + +After initialising the Turbo SDK, proceed to securely link UPI accounts and complete the payment flow. + +1. **Get already linked accounts**. + + If your customer has already linked accounts, use the following code to fetch them. If there are no linked UPI accounts, an empty list is returned. + + +> **INFO** +> +> +> **Handy Tips** +> +> - When the user arrives at your checkout screen, use the `getLinkedUpiAccounts` function to fetch the updated list of UPI accounts. +> - A mobile number is required in the `linkNewUpiAccount` function for an enhanced user experience. Otherwise, feel free to use either your mobile number or customer id. +> + + + ```kotlin: Kotlin + razorpay.upiTurbo?.getLinkedUpiAccounts(, , object : UpiTurboResultListener { + override fun onSuccess(accList: List) { + if (accList.isNotEmpty()) { + Log.d("UpiTurbo", "UpiAccount list") + } else { + // call linkNewAccount() + } + } + override fun onError(error: Error) { + Log.d("UpiTurbo", error.message) + } + }) + + ```kotlin: Java + razorpay.upiTurbo.getLinkedUpiAccounts(, , new UpiTurboResultListener(){ + @Override + public void onError(@NonNull Error error) { + //Display error message to user. + } + + @Override + public void onSuccess(@NonNull List accList) { + if (accList.size()==0){ + //Display: no UpiAccounts onboarded yet. Please onboard an account. + }else{ + //Display onboarded UpiAccounts. + } + } + }); + + ``` + + +> **WARN** +> +> +> **Watch Out!** +> +> If the device binding is not completed and the `getLinkedUpiAccounts` is triggered, it will return an `OnError` with a **DEVICE_BINDING_INCOMPLETE** error code. +> + + + + +### Request Parameters + + `customerMobile` _mandatory_ + : `string` The customer's mobile number. + + `listener` + : `object` The listener to be sent should be of type `UpiTurboResultListener`. + + + +### Response Parameters + + `onSuccess` + : This function is triggered if the list is fetched successfully. `accList` can be empty to indicate that no accounts have been linked yet. + + `onError` + : This function is triggered in case an error is thrown during the retrieval process, either by the Razorpay SDK or the Bank SDK. + + + + +### 1.4 Onboarding Flow + +Invoke the below function for these use cases: +1. To initiate new onboarding, in case you get a **DEVICE_BINDING_INCOMPLETE** error in the above section, +2. To link additional bank accounts for already onboarded users. + + +> **INFO** +> +> +> **Handy Tips** +> +> A mobile number is required in the `linkNewUpiAccount` function for an enhanced user experience. Otherwise, feel free to use either your mobile number or customer id. +> + + ```kotlin: Kotlin + razorpay.upiTurbo?.linkNewUpiAccountWithUI(, , object: UpiTurboLinkAccountResultListener { + override fun onSuccess(upiAccounts: List) { + //Display onboarded UpiAccounts. + } + override fun onFailure(error: com.razorpay.upi.Error) { + //Display error message to user. + } + }, {color-hex for button's theme}) + + ```kotlin: Java + razorpay.upiTurbo.linkNewUpiAccountWithUI(, , new UpiTurboLinkAccountResultListener() { + @Override + public void onSuccess(@NonNull List list) { + //Display onboarded UpiAccounts. + } + + @Override + public void onError(@NonNull Error error) { + //Display error message to user. + } + }, {color-hex for button's theme}); + ``` + +### Transactional Flow + +1. To process the payments, call the `submit method` of custom checkout with the provided payload. + + ```kotlin: Kotlin + val payload = JSONObject(""" + { + "currency":"INR", + "amount":"700", + "email":"gaurav.kumar@example.com", + "contact":"9000090000", + "method":"upi", + // the below upi block is specific for Turbo UPI Payment + "upi":{ + "flow":"in_app" + }, + "order_id":"order_L2MUBUOeFItcpU",//optional + "customer_id":"cust_KQlMczYKcDIqmB"//optional + } + """.trimIndent()) + + ```kotlin: Java + try { + JSONObject payload = new JSONObject(); + payload.put("currency", "INR"); + payload.put("amount", "700"); + payload.put("email", "gaurav.kumar@example.com"); + payload.put("contact", "9000090000"); + payload.put("method", "upi"); + + // Creating the nested "upi" object + JSONObject upiObject = new JSONObject(); + upiObject.put("flow", "in_app"); + + payload.put("upi", upiObject); + payload.put("order_id", "order_L2MUBUOeFItcpU"); + payload.put("customer_id", "cust_KQlMczYKcDIqmB"); // Optional + + } catch (Exception e) { + e.printStackTrace(); + } + ``` + +2. Pass the `vpa` and `payload` objects as shown in the code below. + ```kotlin: Kotlin + val turboPayload = HashMap ().apply { + put("upiAccount", upiAccount) + put("payload", payload) + } + razorpay.submit(turboPayload, object: PaymentResultWithDataListener { + override fun onPaymentSuccess(razorpayPaymentID: String, paymentData: PaymentData) { + + } + override fun onPaymentFailure(code: Int, response: String, paymentData: PaymentData) { + //Show error message + } + }) + + ```kotlin: Java + HashMap turboPayload = new HashMap (); + turboPayload.put("upiAccount", upiAccount); + turboPayload.put("payload", payload); + razorpay.submit(turboPayload, new PaymentResultWithDataListener() { + @Override + public void onPaymentSuccess(String razorpayPaymentID, PaymentData paymentData) { + + } + @Override + public void onPaymentError(int code, String response, PaymentData paymentData) { + //Show error message + } + }); + + ``` + +### Non-Transactional Flow + +You can directly interact with the exposed methods of the Turbo Framework to perform the non-transactional flows listed below. + + +### Manage UPI Accounts + + Let Razorpay SDK manage the linked `UpiAccount` on the applications by triggering `manageUpiAccounts()`. + +> **INFO** +> +> +> **Handy Tips** +> +> A mobile number is required in the `linkNewUpiAccount` function for an enhanced user experience. Otherwise, feel free to use either your mobile number or customer id. +> + + + + ```Kotlin: Manage UPI Accounts + razorpay.upiTurbo?.manageUpiAccounts(, , + object : UpiTurboManageAccountListener { + override fun onError(error: JSONObject) { + /*Throws error if UPI Turbo cannot be initialized or throws error*/} + + override fun onSuccess(data: Any) {/*Can be safely ignored*/} + }) + ``` + + + +[Video content] + + + + + +> **WARN** +> +> +> **Watch Out!** +> +> The same combination of mobile number and customer id must be consistently passed across all sessions when calling `linkNewUpiAccountWithUI`, `getLinkedUpiAccounts` and `manageUpiAccounts` for a given user. +> + +### Additional Features + +1. To get the device binding status, please use the method `isDeviceOnboarded()` which returns a boolean. It indicates whether the device binding, which is a prerequisite for adding UPI accounts, is done with the user's mobile number. + + ```Kotlin: Kotlin + if (Razorpay.UpiTurbo.isDeviceOnboarded(activity: Activity)) { + // User Device Binded + } else { + // Call Link New Account for Device Binding + } + ``` + +2. Users can now link their credit cards alongside bank accounts during onboarding. You can seamlessly retrieve both credit and bank accounts for transactions, thereby simplifying payments, expanding options, and ensuring security. + +3. Charges will be levied for payments made using CC on UPI. Contact the [support team](https://razorpay.com/support/#request) for further information. + +### Models Exposed from the SDKs + +The SDKs given below provide access to exposed models for seamless integration. + + +### UpiAccount + + + + Method | Return Type | Description + --- + `accountNumber` | String | Returns masked bank account number. + --- + `getAccountType` | String | The account type. Possible values are `savings` and `current`. + --- + `ifsc` | String | Returns IFSC for Bank. + --- + `bankName` | String | Returns name of bank. + --- + `bankLogoUrl` | String | Returns URL to the logo of the PNG image. + --- + `bankPlaceholderUrl` | String | Image URL for bank logo placeholder. + --- + `pinLength` | Integer | Length on UPI PIN. + + + + + +### Error + + + + Error | Description + --- + `errorCode` | Types of error codes - `BAD_REQUEST_ERROR`: Failure from the client's end (SDK).`GATEWAY_ERROR`: Failure either from the Secure Component or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + `errorDescription` | Brief description of the error. + --- + `errorReason` | Specifies the specific reason for the error. + --- + `errorSource` | Indicates the origin of the error. + --- + `errorStep` | Highlights the stage where the error occurred. + + + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/error-codes.md). + + + +### BankAccount + + + + Method | Return Type | Description + --- + `accountNumber` | String | Masked account number. + --- + `type` | String | The account type. Possible values are `savings` and `current`. + --- + `ifsc` | String | Returns IFSC for Bank. + --- + `state` | BankAccountState | The current state of account. + + + + + +### BankAccountState + + + + Enum Instances | Description + --- + `UPI_PIN_NOT_SET` | This is the state of the bank account when the UPI pin is not set. + --- + `UPI_PIN_SET` | This is the state of the bank account when the UPI pin is set. + --- + `LINKING_IN_PROGRESS` | This is the state of the bank account when account linking is in progress. + --- + `LINKING_SUCCESS` | This is the state of the bank account when the account is linked successfully. + --- + `LINKING_FAILED` | This is the state of the bank account when the account linking is failed. + + + + +### Bank + + + + Method | Return Type | Description + --- + `ifsc` | String | IFSC of bank. + --- + `name` | String | Name of bank. + --- + `getImageURL()` | String | Image URL of bank logo. + --- + `bankPlaceholderUrl` | String | Image URL for bank logo placeholder. + + + + + +### PaymentData + + + + Method | Return Type | Description + --- + getUserEmail() | | + --- + getUserContact() | | + --- + getPaymentId() | | + --- + getOrderId() | | + --- + getSignature() | | + + + +## 2. Test Integration + +We recommend the following: + +- Complete the integration on UAT before using the prod builds. +- Perform the UAT using the Razorpay-provided API keys. + +## 3. Go-live Checklist + +Complete these steps to take your integration live: + +- You should get your app id allowlisted by Razorpay to test on prod. + +- As a compliance requirement, you need to get approval from Google for **READ_SMS** permission. Refer [to the Google article](https://support.google.com/googleplay/android-developer/answer/10208820?hl=en) for more details. + +- Add Proguard rules: + + - `keepclassmembers,allowobfuscation class * { + @com.google.gson.annotations.SerializedName ; + }` + - `keepclassmembers enum * { *; }` + - `keepclassmembers class * { + @android.webkit.JavascriptInterface ; + }` + - `dontwarn com.razorpay.**` + - `keep class com.razorpay.** {*;}` + - `keep class com.olivelib.** {*;}` + - `keep class com.olive.** {*;}` + - `keep class org.apache.xml.security.** {*;}` + - `keep interface org.apache.xml.security.** {*;}` + - `keep class org.npci.** {*;}` + - `keep interface org.npci.** {*;}` + - `keep class retrofit2.** { *; }` + - `keep class okhttp3.** { *; }` + +- Replace the UAT credential with the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. diff --git a/llm-content/payments/payment-gateway/android-integration/custom/test-integration.md b/llm-content/payments/payment-gateway/android-integration/custom/test-integration.md new file mode 100644 index 00000000..e49971c5 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/test-integration.md @@ -0,0 +1,137 @@ +--- +title: 2. Test Integration +description: Steps to test if the custom android integration was successful. +--- + +# 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## Next Steps + +[Step 3: Go-live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/go-live-checklist.md) diff --git a/llm-content/payments/payment-gateway/android-integration/custom/test-native-otp-integration.md b/llm-content/payments/payment-gateway/android-integration/custom/test-native-otp-integration.md new file mode 100644 index 00000000..4a2e64ee --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/test-native-otp-integration.md @@ -0,0 +1,39 @@ +--- +title: 2. Test Native OTP Integration +description: Test the Razorpay Native OTP feature with Android Custom Checkout. +--- + +# 2. Test Native OTP Integration + +Integrate the [Native OTP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/native-otp-integration.md) feature with Android custom checkout to avoid customer payment issues such as payment failures due to low internet speeds and bank page redirects. + +After the integration is complete, you need to test the integration to ensure that it is working as expected. You can make a test transaction using the test cards, verify the payment status from the Dashboard, APIs or subscribe to related Webhook events to take appropriate actions at your end. After testing the integration in Test mode, you can start accepting actual payments from your customers. + +## Test Payments + +- No money is deducted from the customer's account as this is a test transaction. +- In the Checkout code, ensure that you have entered the API keys generated in the Test mode. + +#### Test Cards + +You can use any of the test cards to make transactions in the Test mode. Use any valid expiration date in the future and any random CVV to create a successful payment. + +Card Network | Card Number | Supports Native OTP +--- +Mastercard | 5267 3181 8797 5449 | Yes +--- +Visa | 4895 1911 1111 1115 | Yes +--- +Visa | 4386 2894 0766 0153 | No + +## Verify Payment Status + +You can track the status of the payment from the Dashboard by subscribing to webhooks or polling our APIs. + +Know more about how to [Verify Payment Status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/build-integration.md#19-verify-payment-status). + +## Accept Live Payments + +After testing the flow of funds end-to-end in Test mode and confident that the integration is working as expected, switch to the Live mode and start accepting payments from customers. + +Know more about how to [Accept Live Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/go-live-checklist.md#accept-live-payments). diff --git a/llm-content/payments/payment-gateway/android-integration/custom/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/android-integration/custom/troubleshooting-faqs.md new file mode 100644 index 00000000..6a27f581 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/troubleshooting-faqs.md @@ -0,0 +1,129 @@ +--- +title: Troubleshooting & FAQs +description: Troubleshoot common error scenarios and find answers to frequently asked questions. +--- + +# Troubleshooting & FAQs + +### 1. How to handle situations where a customer has pressed the Back button on the browser before the payment is complete? + + You can use the `onBackPressed` method to handle a situation where the customer has pressed the Back button before completing the payment. This marks the payment as `failed` on the Dashboard. + + ```java: onBackPressed Method + /** + * In your activity, you need to override onBackPressed + */ + @Override + public void onBackPressed() { + if(razorpay != null){ + razorpay.onBackPressed(); + } + super.onBackPressed(); + } + ``` + + + +### 2. How to change API keys? + + You can change API keys after you have already initialized the `Razorpay` object by calling `razorpay.changeMerchantKey(merchantKey)`. This is an optional method that overrides the existing API key. The new key is used for authenticating the requests sent to Razorpay. + + ```java: API Key Change + /** + * change the API key + */ + razorpay.changeMerchantKey("YOUR_KEY_ID"); + ``` + + + +### 3. How can I check the Razorpay Android Custom SDK version? + + To check the SDK version: + 1. Open your Android project in Android Studio. + 2. Navigate to the `build.gradle` file of your app module (usually `app/build.gradle`). + 3. Locate the `dependencies` block in the file. + 4. Find the line that includes the Razorpay SDK dependency. The version number will be alongside the SDK name in the format`x.y.z`. + + ```java: build.gradle + dependencies { + implementation 'com.razorpay:customui:3.9.22' + } + ``` + + + +### 4. How can I update the Razorpay Android Custom SDK version? + + To update the Custom Android SDK, follow these steps: + 1. Check the [latest SDK version](https://mvnrepository.com/artifact/com.razorpay/customui). + 2. In the app-level gradle build file, update the SDK version to the latest release. + + ```java: Update SDK + dependencies { + // … other dependencies + // For Razorpay checkout SDK + implementation ‘com.razorpay:customui:‘ + // … other dependencies + + } + ``` + 3. After updating, sync gradle and check for any compile-time errors. + 4. Ensure all changes are correctly integrated and the application functions as expected. + + +> **INFO** +> +> +> **Handy Tips** +> +> From version 3.9.22 onwards, the latest version is automatically updated, eliminating the need for manual updates. +> + + + + +### 5. I received a policy violation notice from Google Play Store when trying to publish my Razorpay-integrated app. How do I proceed? + + This error appeared due to an intent redirection issue that was present in the older versions of the Razorpay Android Custom SDK. To resolve this, please [upgrade](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom.md#step-1-install-razorpay-android-custom-sdk) to the latest SDK version. + + + +### 6. How to fetch Subscription details? + + If you are using [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md), you can use this code sample to fetch the subscription details: + + ```java: Fetch Subscription + JSONObject options = new JSONObject(); + options.put("subscription_id", subscription_id); + razorpay.getPaymentMethods(options, new PaymentMethodsCallback() { + @Override + public void onPaymentMethodsReceived(String result) { + JSONObject paymentMethods = new JSONObject(result); + } + + @Override + public void onError(String error){ + + } + }); + }); + ``` + + + +### 7. How to fetch Subscription amount? + + If you are using [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md), you can fetch the subscription amount by calling the `getSubscriptionAmount` method. + + ```java: Fetch Subscription Amount + razorpay.getSubscriptionAmount("sub_id", new SubscriptionAmountCallback() { + @Override + public void onSubscriptionAmountReceived(long amount) { + } + + @Override + public void onError(String error) { + } + }); + ``` diff --git a/llm-content/payments/payment-gateway/android-integration/custom/upi-intent-flow.md b/llm-content/payments/payment-gateway/android-integration/custom/upi-intent-flow.md new file mode 100644 index 00000000..81106110 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/custom/upi-intent-flow.md @@ -0,0 +1,49 @@ +--- +title: UPI Intent Flow +description: Enable UPI intent payments on your Android app using the Razorpay Android UPI Intent SDK. +--- + +# UPI Intent Flow + +The Razorpay Android SDK for UPI Intent Flow enables support for UPI Intent payments on Android apps. + +In this scenario, when UPI is selected as the payment method by the customers, they do not need to open the UPI app to make the payment. Instead, they can complete the payment right from their Android app, by entering the UPI pin in the WebView that appears within the app. + +![](/docs/assets/images/android-integration-custom-intent-flow.jpg) + +## Integration Steps +**1.1** [Install Razorpay Android UPI Intent SDK](#11-install-razorpay-android-upi-intent-sdk). + +**1.2** [Initialise SDK by Adding API Key](#12-initialise-sdk-by-adding-api-key). + +**1.2** [Pass Result to Razorpay](#13-pass-result-to-razorpay). + +### 1.1 Install Razorpay Android UPI Intent SDK + +[Download the jar file](http://rzp-mobile.s3.amazonaws.com/android/upi-intent-sdk/razorpay-upi-intent-sdk.jar) and include it in the `libs` folder. + +### 1.2 Initialise SDK by Adding API Key + +To initiate the SDK, call the Razorpay class constructor in your project and pass Razorpay API Key ID as the `key` and `webView` as the object that handles the payment flow. + +```java +import com.razorpay.Razorpay + +Razorpay razorpay = new Razorpay(key, webView, activity); +``` + +### 1.3 Pass Result to Razorpay + +When UPI is selected as the payment method, Razorpay invokes the Intent Flow page that lists all installed UPI apps on the customer's phone that support intent flow. The customer can select an app and make the payment. + +Upon payment completion, the UPI app will return the result back to your `activity` in `onActivityResult` method. This should be passed to Razorpay as shown below: + +```java +@Override +protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + if (requestCode == Razorpay.UPI_INTENT_REQUEST_CODE) { + razorpay.onActivityResult(requestCode, resultCode, data); + } +} +``` diff --git a/llm-content/payments/payment-gateway/android-integration/standard.md b/llm-content/payments/payment-gateway/android-integration/standard.md new file mode 100644 index 00000000..62c1a036 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/standard.md @@ -0,0 +1,65 @@ +--- +title: Prerequisites | Razorpay Android Standard SDK +heading: Prerequisites +description: Check the prerequisites before you integrate with Razorpay Android Standard Checkout. +--- + +# Prerequisites + +- **Android Standard SDK Changelog**: Discover new features, updates and deprecations related to Razorpay Android Standard SDK (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about Android Standard integration. + +You can use Razorpay Standard SDK to integrate the Razorpay Payment Gateway with your Android Application. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Starting from version 1.6.22, the Android Standard SDK includes codes in **Kotlin**. Please add the Kotlin library to your project. +> +> - Due to the [changes](https://support.google.com/googleplay/android-developer/answer/9047303) in Google Play Developer policy, we have removed auto-read SMS feature from Razorpay Android Standard SDK versions 1.5.1 and higher. +> +> However, if your Android app already has permission to read SMS, then Razorpay auto-reads it. +> +> - Upgrade to the latest version available on the [Maven Repository](https://mvnrepository.com/artifact/com.razorpay/checkout). +> +> - According to the PCI regulations, payment processing is not allowed on TLS v1. Hence, if the device does not have TLS v1.1 or v1.2, the SDK will throw an error in the `onPaymentError` method. Check the [TLS versions](https://developer.android.com/reference/javax/net/ssl/SSLSocket#default-configuration-for-different-android-versions). +> +> - If you are using SDK version below 1.6.15, you need to make [changes to your Android `Manifest.xml` file](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/troubleshooting-faqs.md). +> + +> **SUCCESS** +> +> +> **Update SDK** +> +> Check your [current SDK version](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/troubleshooting-faqs.md#5-how-can-i-check-the-razorpay-android). If it is outdated, please [update the SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/troubleshooting-faqs.md#6-how-can-i-update-the-razorpay-android) manually to ensure uninterrupted settlements of your funds. +> +> From version 1.6.40 onwards, the latest version is automatically updated, eliminating the need for manual updates. +> + +## Integration Steps + +**Before you proceed:** + + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +Follow these integration steps: + + - **1. Build Integration**: Integrate Android Standard SDK. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + + - **Sample App**: Check the sample app to integrate on GitHub. + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/android-integration/standard/customisation.md b/llm-content/payments/payment-gateway/android-integration/standard/customisation.md new file mode 100644 index 00000000..9a89de88 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/standard/customisation.md @@ -0,0 +1,45 @@ +--- +title: Payment Gateway | Android Standard - Customise Checkout +heading: Customisation Options +description: Add company logo and disable Checkout on full screen using the Razorpay Android Standard SDK. +--- + +# Customisation Options + +You can customise the Checkout form to suit your business needs. You can perform the following customisations: + +- [Add Company Logo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/customisation.md#add-company-logo). +- [Disable Checkout in Full Screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/customisation.md#disable-checkout-in-full-screen). + +## Add Company Logo + +By default, the Checkout form uses the logo specified in the **Account & Settings** section of the Dashboard. You can also set a custom logo in the Checkout form. Call the following method _before_ you call the [ `open` method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/integration-steps.md#14-initiate-payment-and-display-checkout-form). + +```java: Add Custom Company Logo +int image = R.drawable.logo; // Can be any drawable +checkout.setImage(image); +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can also pass the logo image as one of the checkout `options`. +> If you pass the image in `options` as well as through `drawable`, the image from drawable appears as the Checkout logo. +> + +## Disable Checkout in Full Screen + +The Checkout form runs in a separate activity. This activity picks up the theme from the Manifest file. Therefore, if you have a full screen theme, even the Checkout will run in full screen. It is suggested to disable the Checkout in full screen mode to enable the user to switch between various apps, for example, while entering the OTP. + +If your app is in full screen mode, you can disable it for Checkout by calling the following method: + +```java: Disable Full Screen +checkout.setFullScreenDisable(true) +``` + +### Related Information + +[Integrate Payment Gateway using the Android Standard SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard.md) diff --git a/llm-content/payments/payment-gateway/android-integration/standard/google-data-safety.md b/llm-content/payments/payment-gateway/android-integration/standard/google-data-safety.md new file mode 100644 index 00000000..84b16d4d --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/standard/google-data-safety.md @@ -0,0 +1,149 @@ +--- +title: Google Play Console - Data Safety +description: Guidelines for filling out Razorpay SDK-related data points in Google Play Data Safety form. +--- + +# Google Play Console - Data Safety + +The Data Safety section on the Google Play store enables merchants to help people understand what user data their app collects or shares. It also provides information of their app's key privacy and security practices. This helps users make more informed choices when installing apps. + +**By July 20, 2022**, all developers must declare how they collect and handle user data for the apps they publish on Google Play and provide details about how they protect this data through security practices like encryption. This includes data collected and handled through any third-party libraries or SDKs used in their apps. + +## Who is responsible for providing this data? + +Merchant is responsible for making complete and accurate declarations in their app's store listing on Google Play. Google Play reviews apps across all policy requirements. + +However, Google cannot determine how we use and handle the data on behalf of the developers. Only merchants possess all the information required to complete the Data Safety form. + +## Video Tutorial + +Watch this video to know how to fill out the Data Safety form. + +[Video: https://www.youtube.com/embed/pNAS_0IcHtM] + +## Data Safety + +After you log in to [Google Play Console](https://play.google.com/console/u/0/developers/app/app-content/summary), navigate to **App Content** → **Data Safety** and provide the relevant answers. These questions are categorised into three sub-sections as follows: + +1. [Data Collection and Security](#data-collection-and-security) +2. [Data Types](#data-types) +3. [Data Usage and Handling](#data-usage-and-handling) + +#### Data Collection and Security + +This section contains questions about data collection, security and handling practices. + +Question | Developer Response +--- +Does your app collect or share any of the required user data types? | - Yes: Answer **Yes** if you collect or share any [data types](#data-types). +- No: Answer **No** if your app does not collect or share any user data types. + +--- +Is all of the user data collected by your app encrypted in transit? | - Yes: Answer **Yes** if you encrypt all the data sent to your servers and other third parties. Razorpay SDK encrypts all data in transit. +- No: Answer **No** if your app or a third party does not encrypt the collected user data. + +--- +Do you provide a way for users to request that their data is deleted? | - Yes: Answer **Yes** if your app allows users to request the deletion of their data. Razorpay SDK allows users to delete data on request, provided the request meets regulatory guidelines. +- No: Answer **No** if you do not provide your users with an option to delete their data. + +#### Data Types + +The following table will help you with privacy declaration for data types concerning Razorpay SDKs. + +Category | Data Type | Razorpay SDK Guideline +--- +Location | Precise or Coarse location | **No**, Razorpay SDK does not collect approximate or precise location data. +--- +Personal info | Name | **Yes**, if you have configured to transmit this data to Razorpay. +--- +Personal info | Email Address | **Yes**, if you have configured to transmit this data to Razorpay. +--- +Personal info | User IDs | **Yes**, if you have configured to transmit this data to Razorpay. +--- +Personal info | Address | **Yes**, if you have configured to transmit this data to Razorpay. +--- +Personal info | Phone number | **Yes**, if you have configured to transmit this data to Razorpay. +--- +Personal info | Race and ethnicity | **No**, Razorpay does not collect this data. +--- +Personal info | Political or religious beliefs | **No**, Razorpay does not collect this data. +--- +Personal info | Sexual orientation | **No**, Razorpay does not collect this data. +--- +Personal info | Other info | **No**, Razorpay does not collect this data. +--- +Financial info | User payment info | **Yes**, Razorpay collects information about the user's financial accounts, such as credit card number. +--- +Financial info | Purchase history | **Yes**, if you have configured to transmit this data to Razorpay. +--- +Financial info | Credit score | **No**, Razorpay does not collect this data. +--- +Financial info | Other financial info | **No**, Razorpay does not collect this data. +--- +Health and fitness | Health info | **No**, Razorpay does not collect this data. +--- +Health and fitness | Fitness info | **No**, Razorpay does not collect this data. +--- +Messages | Emails | **No**, Razorpay does not collect this data. +--- +Messages | SMS or MMS | **No**, Razorpay does not collect this data. +--- +Messages | Other in-app messages | **No**, Razorpay does not collect this data. +--- +Photos or videos | Photos | **No**, Razorpay does not collect this data. +--- +Photos or videos | Videos | **No**, Razorpay does not collect this data. +--- +Audio files | Voice or sound recordings | **No**, Razorpay does not collect this data. +--- +Audio files | Music files | **No**, Razorpay does not collect this data. +--- +Audio files | Other audio files | **No**, Razorpay does not collect this data. +--- +Files and docs | Files and docs | **No**, Razorpay does not collect this data. +--- +Calendar | Calendar events | **No**, Razorpay does not collect this data. +--- +Contacts | Contacts | **No**, Razorpay does not collect this data. +--- +App activity | App interactions | **Yes**, Razorpay SDK collects app interaction on screens rendered by SDK. +--- +App activity | In-app search history | **No**, Razorpay does not collect this data. +--- +App activity | Installed apps | **Yes**, only detection of installed UPI apps is done to enable [UPI intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md) functionality. +--- +App activity | Other user-generated content | **Yes**, if you have configured to transmit this data to Razorpay. +--- +App activity | Other actions | **No**, Razorpay does not collect this data. +--- +Web browsing | Web browsing history | **No**, Razorpay does not collect this data. +--- +App info and performance | Crash logs | **Yes**, if you have configured to transmit this data to Razorpay. +--- +App info and performance | Diagnostics | **Yes**, if you have configured to transmit this data to Razorpay. +--- +App info and performance | Other app performance data | **Yes**, if you have configured to transmit this data to Razorpay. +--- +Device or other IDs | Device or other IDs | **Yes**, if you have configured to transmit this data to Razorpay. + +#### Data Usage and Handling + +#### Purpose of collecting information + +Data collected by our SDK will be used only for the purpose of enabling the user to use the services provided by us, to help promote a safe service, calibrate consumer interest in our products and services, inform you about online offers and updates, troubleshoot problems, customise the user experience, detect and protect us against error, fraud and other criminal activity, collect money, enforce our terms and conditions, and as otherwise described to you or the user at the time of collection of such information. + +#### Purpose of sharing information + +We do not share user's Personal Information with any third party apart from financial institutions such as banks, RBI, or other regulatory agencies (as may be required) and to provide users with services that we offer through Razorpay, conduct quality assurance testing, facilitate the creation of accounts, provide technical and customer support, or provide specific services, such as synchronisation of your contacts with other software applications, following your instructions. These third parties are not required to use the user's Personal Information other than to provide the services requested by the user. + +We may share users' Personal Information with our parent company, subsidiaries, joint ventures, or other companies under a common control (collectively, the "AFFILIATES") that we may have now or in the future, in which case we will require them to honour our Privacy Policy. If another company acquires our company or our assets, that company will possess your Personal Information, and will assume the rights and obligations with respect to that information as described in the Privacy Policy. We may disclose your Personal Information to third parties in a good faith belief that such disclosure is reasonably necessary to (a) take action regarding suspected illegal activities; (b) enforce or apply our terms and conditions and Privacy Policy; (c) comply with legal processes, such as a search warrant, subpoena, statute, or court order; or (d) protect our rights, reputation, and property, or that of our Users, Affiliates, or the public. Please note that we are not required to question or contest the validity of any search warrant, subpoena, or other similar governmental requests we receive. + +We may disclose information in the aggregate to third parties relating to user behaviour in connection with the actual or prospective business relationship with those third parties, such as advertisers and content distributors. For example, we may disclose the number of users that have been exposed to, or clicked on, advertising banners. + +## Privacy Link + +For more information about privacy links, refer to [Razorpay Privacy Policy](https://razorpay.com/privacy/). + +### Related Information + +[Google Play - Data Safety](https://support.google.com/googleplay/android-developer/answer/10787469?hl=en) diff --git a/llm-content/payments/payment-gateway/android-integration/standard/integration-steps.md b/llm-content/payments/payment-gateway/android-integration/standard/integration-steps.md new file mode 100644 index 00000000..922c43d7 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/standard/integration-steps.md @@ -0,0 +1,1365 @@ +--- +title: Android SDK - Integration Steps | Razorpay Payment Gateway +heading: Integration Steps +description: Steps to integrate your Android application with Razorpay Android Standard SDK. +--- + +# Integration Steps + +Follow these steps to integrate your Android application: + + - **1. Build Integration**: Integrate Android Standard Checkout. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/MFQ3tz6P5Vw] + +> **WARN** +> +> +> +> **Watch Out!** +> +> The Android app must have a `minSDKversion` of 19 or higher. If you want to support devices below API level 19, you must override `minSDKversion`. Use the sample code below to override `minSDKversion`: +> +> ```java: Override minSDK +> tools:overrideLibrary="com.razorpay"/> +> ``` +> + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Install Razorpay Android Standard SDK + + To install the SDK in your Android project: + + Add the code given below to your project's top-level `build.gradle` file: + + This gives access to the SDK library. + + ```java: build.gradle + repositories { + mavenCentral() + } + + dependencies { + implementation 'com.razorpay:checkout:1.6.40' + } + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> From version 1.6.40 onwards, the latest version is automatically updated, eliminating the need for manual updates. +> + + + + +### 1.2 Initialize Razorpay Android Standard SDK + + Add your `` dynamically using Checkout's `setKeyId()` method. You can generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. + + To quickly load the `Checkout` form, the `preload` method of `Checkout` must be called much earlier than the other methods in the payment flow. The loading time of the preload resources can vary depending on your network's bandwidth. + + ```java: Java + public class PaymentActivity extends Activity { + + // ... + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + /** + * Preload payment resources + */ + Checkout.preload(getApplicationContext()); + + // ... + + checkout.setKeyID(""); + + // ... + } + } + ```java: Kotlin + class PaymentActivity: Activity(), PaymentResultWithDataListener, ExternalWalletListener { + // ..... + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_payment) + /* + * To ensure faster loading of the Checkout form, + * call this method as early as possible in your checkout flow + * */ + Checkout.preload(applicationContext) + val co = Checkout() + // apart from setting it in AndroidManifest.xml, keyId can also be set + // programmatically during runtime + co.setKeyID("rzp_live_XXXXXXXXXXXXXX") + } + //...... + } + ``` + + +> **WARN** +> +> +> **Watch Out!** +> +> It is recommended to send the API Key ID from your server-side as app-related metadata fetch. Do not add API Keys in the `AndroidManifest` file. +> +> +> +> Proguard Rules +> +> If you are using Proguard for your builds, you must add the following lines to your `proguard-rules.pro` file. +> +> ```java: +> -keepclassmembers class * { +> @android.webkit.JavascriptInterface ; +> } +> +> -keepattributes JavascriptInterface +> -keepattributes *Annotation* +> +> -dontwarn com.razorpay.** +> -keep class com.razorpay.** {*;} +> +> -optimizations !method/inlining/* +> +> -keepclasseswithmembers class * { +> public void onPayment*(...); +> } +> ``` +> +> +> +> SDK Integration Check +> +> Call `Checkout.sdkCheckIntegration(activity)` to check the health of integration. This will also let you know if the SDK version is outdated. This will only appear in debug mode and not in the release. +> +> +> +> + + + + +### 1.3 Create an Order in Server + + **Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order using: + + + Use this endpoint to create an order using the Orders API. + + /orders + + ```curl: Curl + curl -X POST https://api.razorpay.com/v1/orders + -U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -H 'content-type:application/json' + -d '{ + "amount": 50000, + "currency": "", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230 + }' + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", ""); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + DATA = { + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } + } + client.order.create(data=DATA) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('receipt' => '123', 'amount' => 50000, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + ```csharp: .NET + RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.add("receipt", "order_rcptid_11"); + options.add("currency", ""); + Order order = client.Order.Create(options); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + options = amount: 50000, currency: '', receipt: '' + order = Razorpay::Order.create + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "", + receipt: "receipt#1", + notes: { + key1: "value3", + key2: "value2" + } + }) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "", + "receipt": "some_receipt_id" + } + body, err := client.Order.Create(data) + ``` + + ```json: Success Response + { + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 + } + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + + You can use the Postman workspace below to create an order: + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + + You can create an order manually by integrating the API sample codes on your server. + + + + Request Parameters + + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `22225`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of ₹7,000 is to be received from the customer in two installments of #1 - ₹5,000, #2 - ₹2,000, then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + +### 1.4 Initiate Payment and Display Checkout Form + + There are two ways to pass the checkout parameters. You can either use `payloadhelper` or the `JSONObject` options. We recommend using `payloadhelper` to ensure that the right data types are used for the parameter values. + + + + PayloadHelper + + Create a `JSONObject` to send it to the SDK. + + ```java: Java + PayloadHelper payloadHelper = new PayloadHelper("", 100, "order_XXXXXXXXX"); + payloadHelper.setName(""); + payloadHelper.setDescription("Description"); + payloadHelper.setPrefillEmail(""); + payloadHelper.setPrefillContact(""); + payloadHelper.setPrefillCardNum(""); + payloadHelper.setPrefillCardCvv("111"); + payloadHelper.setPrefillCardExp("11/30"); + payloadHelper.setPrefillMethod("card"); + payloadHelper.setPrefillName("MerchantName"); + payloadHelper.setSendSmsHash(true); + payloadHelper.setRetryMaxCount(4); + payloadHelper.setRetryEnabled(true); + payloadHelper.setColor("#000000"); + payloadHelper.setAllowRotation(true); + payloadHelper.setRememberCustomer(true); + payloadHelper.setTimeout(10); + payloadHelper.setRedirect(true); + payloadHelper.setRecurring("1"); + payloadHelper.setSubscriptionCardChange(true); + payloadHelper.setCustomerId("cust_XXXXXXXXXX"); + payloadHelper.setCallbackUrl("https://accepts-posts.request"); + payloadHelper.setSubscriptionId("sub_XXXXXXXXXX"); + payloadHelper.setModalConfirmClose(true); + payloadHelper.setBackDropColor("#ffffff"); + payloadHelper.setHideTopBar(true); + payloadHelper.setNotes(new JSONObject("{\"remarks\":\"Discount to customer\"}")); + payloadHelper.setReadOnlyEmail(true); + payloadHelper.setReadOnlyContact(true); + payloadHelper.setReadOnlyName(true); + payloadHelper.setImage("https://www.razorpay.com"); + payloadHelper.setAmount(100); + payloadHelper.setCurrency(""); + payloadHelper.setOrderId("order_XXXXXXXXXXXXXX"); + ```java: Kotlin + val payloadHelper = PayloadHelper("", 100, "order_XXXXXXXXX") + payloadHelper.name = "" + payloadHelper.description = "Description" + payloadHelper.prefillEmail = "" + payloadHelper.prefillContact = "" + payloadHelper.prefillCardNum = "" + payloadHelper.prefillCardCvv = "111" + payloadHelper.prefillCardExp = "11/30" + payloadHelper.prefillMethod = "card" + payloadHelper.prefillName = "MerchantName" + payloadHelper.sendSmsHash = true + payloadHelper.retryMaxCount = 4 + payloadHelper.retryEnabled = true + payloadHelper.color = "#000000" + payloadHelper.allowRotation = true + payloadHelper.rememberCustomer = true + payloadHelper.timeout = 10 + payloadHelper.redirect = true + payloadHelper.recurring = "1" + payloadHelper.subscriptionCardChange = true + payloadHelper.customerId = "cust_XXXXXXXXXX" + payloadHelper.callbackUrl = "https://accepts-posts.request" + payloadHelper.subscriptionId = "sub_XXXXXXXXXX" + payloadHelper.modalConfirmClose = true + payloadHelper.backDropColor = "#ffffff" + payloadHelper.hideTopBar = true + payloadHelper.notes = JSONObject("{\"remarks\":\"Discount to customer\"}") + payloadHelper.readOnlyEmail = true + payloadHelper.readOnlyContact = true + payloadHelper.readOnlyName = true + payloadHelper.image = "https://www.razorpay.com" + // these values are set mandatorily during object initialization. Those values can be overridden like this + payloadHelper.amount=100 + payloadHelper.currency="" + payloadHelper.orderId = "order_XXXXXXXXXXXXXX" + ``` + + If you want to create certain options that are not available, add them to the `JSONObject` we get from `payloadHelper.getJson()`. + + + +### JSONObject + + You can alternatively use the JSONObject options given below. + + Create an instance of the `Checkout` and pass the payment details and options as a `JSONObject`. Ensure that you add the `order_id` generated in [Step 3](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/integration-steps.md#13-create-an-order-in-server). + + ```java: Java + public void startPayment() { + checkout.setKeyID(""); + /** + * Instantiate Checkout + */ + Checkout checkout = new Checkout(); + + /** + * Set your logo here + */ + checkout.setImage(R.drawable.logo); + + /** + * Reference to current activity + */ + final Activity activity = this; + + /** + * Pass your payment options to the Razorpay Checkout as a JSONObject + */ + try { + JSONObject options = new JSONObject(); + + options.put("name", "Merchant Name"); + options.put("description", "Reference No. #123456"); + options.put("image", "http://example.com/image/rzp.jpg"); + options.put("order_id", "order_DBJOWzybf0sJbb");//from response of step 3. + options.put("theme.color", "#3399cc"); + options.put("currency", ""); + options.put("amount", "50000");//pass amount in currency subunits + options.put("prefill.email", ""); + options.put("prefill.contact",""); + JSONObject retryObj = new JSONObject(); + retryObj.put("enabled", true); + retryObj.put("max_count", 4); + options.put("retry", retryObj); + + checkout.open(activity, options); + + } catch(Exception e) { + Log.e(TAG, "Error in starting Razorpay Checkout", e); + } + } + ```java: Kotlin + private fun startPayment() { + /* + * You need to pass the current activity to let Razorpay create CheckoutActivity + * */ + val activity:Activity = this + val co = Checkout() + + try { + val options = JSONObject() + options.put("name","Razorpay Corp") + options.put("description","Demoing Charges") + //You can omit the image option to fetch the image from the Dashboard + options.put("image","http://example.com/image/rzp.jpg") + options.put("theme.color", "#3399cc"); + options.put("currency",""); + options.put("order_id", "order_DBJOWzybf0sJbb"); + options.put("amount","50000")//pass amount in currency subunits + + val retryObj = new JSONObject(); + retryObj.put("enabled", true); + retryObj.put("max_count", 4); + options.put("retry", retryObj); + + val prefill = JSONObject() + prefill.put("email","") + prefill.put("contact","") + + options.put("prefill",prefill) + co.open(activity,options) + }catch (e: Exception){ + Toast.makeText(activity,"Error in payment: "+ e.message,Toast.LENGTH_LONG).show() + e.printStackTrace() + } + } + ``` + + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> When you paste the checkout options given above, the following error message appears: '`TAG` has private access in `androidx.fragment.app.FragmentActivity`'. You can resolve this by adding the following code: +> +> ```java: Resolve TAG has private access +> public class MainActivity extends AppCompatActivity implements PaymentResultListener { +> private static final String TAG = MainActivity.class.getSimpleName(); +> ``` +> + + `Checkout.open()` launches the Checkout form where the customer completes the payment and returns the payment result via appropriate callbacks on the `PaymentResultListener`. + + **Payment Options in JSONObject**: + All available options in the `Standard Web Checkout` are also available in Android. + + + +### Checkout Options + + You must pass these parameters in Checkout to initiate the payment. + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + +> **INFO** +> +> +> +> **Handy Tips** +> +> If you call the payment start method inside a fragment, ensure that the `fragment`'s parent `activity` implements the `PaymentResultListener` interface. +> + + + + + + + +### 1.5 Handle Success and Error Events + + You have the option to implement `PaymentResultListener` or `PaymentResultWithDataListener` to receive callbacks for the payment result. + + - `PaymentResultListener` provides only `payment_id` as the payment result. + - `PaymentResultWithDataListener` provides additional payment data such as email and contact of the customer, along with the `order_id`, `payment_id`, `signature` and more. + + Use the code below to import the function in your `.java` file. This should be added at the beginning of the file. + + ```java: PaymentResultListener + import com.razorpay.PaymentResultListener + ```java: PaymentResultWithDataListener + import com.razorpay.PaymentResultWithDataListener; + ``` + + + + 1.5.1 Sample Code + + Given below are the sample codes for implementation: + + ```java: Java - PaymentResultListener + public class PaymentActivity extends Activity implements PaymentResultListener { + // ... + + @Override + public void onPaymentSuccess(String razorpayPaymentID) { + /** + * Add your logic here for a successful payment response + */ + } + + @Override + public void onPaymentError(int code, String response) { + /** + * Add your logic here for a failed payment response + */ + } + } + ```kotlin: Kotlin - PaymentResultListener + class PaymentActivity: Activity(), PaymentResultListener { + // ... + override fun onPaymentError(errorCode: Int, response: String?) { + /** + * Add your logic here for a failed payment response + */ + } + + override fun onPaymentSuccess(razorpayPaymentId: String?) { + /** + * Add your logic here for a successful payment response + */ + } + + ``` + + ```java: Java - PaymentResultWithDataListener + public class PaymentActivity extends Activity implements PaymentResultWithDataListener { + // ... + @Override + public void onPaymentSuccess(String razorpayPaymentID, PaymentData paymentData) { + /** + * Add your logic here for a successful payment response + */ + } + @Override + public void onPaymentError(int code, String response) { + /** + * Add your logic here for a failed payment response + */ + } + } + ```kotlin: Kotlin - PaymentResultWithDataListener + class PaymentActivity: Activity(), PaymentResultWithDataListener { + // ... + override fun onPaymentError(errorCode: Int, response: String?) { + /** + * Add your logic here for a failed payment response + */ + } + override fun onPaymentSuccess(razorpayPaymentId: String?, PaymentData: PaymentData) { + /** + * Add your logic here for a successful payment response + */ + } + ``` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - Razorpay's payment process takes place in a new activity. Since there are two activities involved, your activity can get corrupted or destroyed if the device is low on memory. These two methods should not depend on any variables not set through your life cycle hooks. +> - It is recommended that you test everything by enabling "Don't Keep Activities" in **Developer Options** under **Settings**. +> + + + + +### Error Codes + + The error codes are returned in the `onPaymentError` method: + + + Error_Code | Description + --- + `Checkout.NETWORK_ERROR` | There was a network error, for example, loss of internet connectivity. + --- + `Checkout.INVALID_OPTIONS` | An issue with options passed in `checkout.open`. + --- + `Checkout.PAYMENT_CANCELED` | The user canceled the payment. + --- + `Checkout.TLS_ERROR` | The device does not support TLS v1.1 or TLS v1.2. + + + + +### 1.5.2 Erase User Data from SDK + + The SDK stores customer-specific data such as email, contact number, and user-session cookies if the customer wants to make another payment in the same session. You can delete such sensitive information before another customer logs into the app. + + To erase customer data from the app, you can call the following method anywhere in your app. + + ```java: Erase Customer Data + Checkout.clearUserData(Context) + ``` + + + + + + +### 1.6 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.7 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + + +### 1.8 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +## 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## 3. Go-live Checklist + +Check the go-live checklist for Razorpay Android Standard SDK. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + + Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + +### Related Information +[Google Play's Data Safety](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/google-data-safety.md) diff --git a/llm-content/payments/payment-gateway/android-integration/standard/payment-methods.md b/llm-content/payments/payment-gateway/android-integration/standard/payment-methods.md new file mode 100644 index 00000000..b147295d --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/standard/payment-methods.md @@ -0,0 +1,259 @@ +--- +title: Additional Support for Payment Methods +description: Additional support features available for card, netbanking, wallets and more. +--- + +# Additional Support for Payment Methods + +Use the Razorpay Android Standard SDK to integrate supported payment methods on the Checkout form of your Android app as per your business requirements. Here are some additional methods provided by the SDK for the integration and usage of payment methods: + +- [UPI Intent support on Target SDK Version 30 and above](#upi-intent-support-target-sdk-version-30) + +- [UPI Intent on Recurring Payments](#upi-intent-on-recurring-payments) + +- [Card Utilities](#card-utilities) + +- [Fetch Logo](#fetch-bank-logo-url) + +- [Validate Data](#data-validation) + +- [Custom `WebViewClient` and `WebChromeClient`](#custom-webviewclient-and-webchromeclient) + +## UPI Intent Support: Target SDK Version 30+ + +If your application `targetSdkVersion` is 30 or above, add the following code in your app's manifest file to support the UPI Intent flow. + +```xml: AndroidManifest.xml + + + + + + + + + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Refer to the list of [supported UPI apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/supported-apps.md). +> - Additionally, we recommend you to create 2 sections - **Primary** and **Others**. Under **Primary**, display the following 4 apps: +> - GPay +> - PhonePe +> - Paytm +> - BHIM +> + +## UPI Intent on Recurring Payments + +Configure and initiate a recurring payment transaction on UPI Intent: + +> **WARN** +> +> +> **Watch Out!** +> +> This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get it enabled on your Razorpay account. +> + +```java: Java +JSONObject options = new JSONObject(); +options.put("name", "Gaurav Kumar"); +options.put("description", "Reference No. #123456"); +options.put("image", "http://example.com/image/rzp.jpg"); +options.put("order_id", "order_DBJOWzybf0XXXX"); // from response of order creation step +options.put("theme.color", "#3399cc"); +options.put("currency", "INR"); +options.put("amount", "50000"); // pass amount in currency subunits +options.put("prefill.email", "gaurav.kumar@example.com"); +options.put("prefill.contact", "9000090000"); + +JSONObject retryObj = new JSONObject(); +retryObj.put("enabled", true); +retryObj.put("max_count", 4); +options.put("retry", retryObj); + +options.put("recurring", 1); +options.put("customer_id", "cust_xxxxxxxxx"); + +options.put("method", new JSONObject().put("upi", true)); +```kotlin: Kotlin +val options = JSONObject() + +options.put("name", "Gaurav Kumar") +options.put("description", "Reference No. #123456") +options.put("image", "http://example.com/image/rzp.jpg") +options.put("order_id", "order_DBJOWzybf0XXXX") // from response of order creation step +options.put("theme.color", "#3399cc") +options.put("currency", "INR") +options.put("amount", "50000") // pass amount in currency subunits +options.put("prefill.email", "gaurav.kumar@example.com") +options.put("prefill.contact", "9000090000") + +val retryObj = JSONObject() +retryObj.put("enabled", true) +retryObj.put("max_count", 4) +options.put("retry", retryObj) + +options.put("recurring", 1) +options.put("customer_id", "cust_xxxxxxxxx") +options.put("method", JSONObject().put("upi", true)) +``` + +## Card Utilities + +You can use these methods for card payment method integration. +- [Fetch card network](#fetch-card-network) +- [Validate card number](#validate-card-number) +- [Fetch card number length of a card network](#fetch-card-number-length-for-card-network) + +#### Fetch Card Network + +The SDK provides a method to get the card network name of the provided card number. + +- At least 6 digits of the card number are required to identify the network. + +- Possible values returned by this method are `visa`, `mastercard` and `unknown`. + +- If it is not able to identify the network it returns `unknown`. + +```java: Fetch Card Network +razorpay.getCardNetwork(cardNumber); +``` + +#### Validate Card Number + +You can determine the validity of the card number entered using the `isValidCardNumber` method. This is a checksum-based method to determine if the entered card number is valid or not. + +```java: Card Number Validation +razorpay.isValidCardNumber(cardNumber); +``` + +#### Fetch Card Number Length for Card Network + +You can fetch the length of a card number for a specific card network using the `getCardNetworkLength` method. + +```java: Fetch Length for Card Network +razorpay.getCardNetworkLength(cardNetworkName); +``` + +## Logo + +You can use the respective methods to fetch: + +- [Bank Logo URL](#fetch-bank-logo-url) + +- [Wallet Logo URL](#fetch-wallet-logo-url) +- [Square-shaped Wallet Logo URL](#fetch-wallet-square-logo-url) + +#### Fetch Bank Logo URL + +The SDK provides a method to fetch the bank logo's URL, here `bankCode` is the code of bank, you will be able to get it from the response received in `onPaymentMethodsReceived` callback. + +```java: Fetch Bank Logo URL +razorpay.getBankLogoUrl(bankCode); +``` + +#### Fetch Wallet Logo URL + +The SDK provides a method to get the wallet logo's URL. + +```java: Fetch Wallet Logo URL +razorpay.getWalletLogoUrl(walletName); +``` + +#### Fetch Wallet Square Logo URL + +The SDK provides a method to get the wallet's square-shaped logo's URL. + +```java: Fetch Wallet Square Logo URL +razorpay.getWalletSqLogoUrl(walletName); +``` + +## Data Validation + +The SDK provides basic validation for the payment data `JSONObject`. In case of a validation error, the SDK returns an error map in the `onValidationError` callback function. + +#### Sample Code +The sample code shown below describes a validation error on the `contact` field: + +```java: Data Validation +razorpay.validateFields(payload, new Razorpay.ValidationListener() { + @Override + public void onValidationSuccess() { + try { + razorpay.submit(payload); + } catch (Exception exception){} + } + + @Override + public void onValidationError(Map error) { + /** + * The format for returned map is: + * "field" : "contact" + * "description" : "Descriptive error message" + */ + Toast.makeText(activity, "Validation: " + error.get("field") + " " + error.get("description"), Toast.LENGTH_SHORT).show(); + } +}); +``` + +## Custom `WebViewClient` and `WebChromeClient` + +Our SDK sets an instance of `RazorpayWebViewClient` and `RazorpayWebChromeClient` to the Webview passed to facilitate bank page optimizations. If you want to set your own custom `WebViewClient` you have to extend `RazorpayWebViewClient` and pass it to our SDK. + +> **WARN** +> +> +> +> **Watch Out!** +> +> This step is optional and is only required when you want to set a custom `WebViewClient`/`WebChromeClient` +> + +#### Sample Code + +The sample code given below shows how to customize the `RazorpayWebViewClient`: + +```java: Customize RazorpayWebViewClient +/** + * Extend the RazorpayWebViewClient for your custom hooks + */ +razorpay.setWebviewClient(new RazorpayWebViewClient(razorpay){ + + @Override + public void onPageStarted(WebView view, String url, Bitmap favicon) { + // Make sure you do not forget to call the super method + super.onPageStarted(view, url, favicon); + Log.d(TAG, "Custom client onPageStarted"); + } + + @Override + public void onPageFinished(WebView view, String url) { + // Make sure you do not forget to call the super method + super.onPageFinished(view, url); + Log.d(TAG, "Custom client onPageFinished"); + } +}); +``` + +Similarly, you can set your own `WebChromeClient`: + +```java: Set WebChromeClient +/** + * Extend the RazorpayWebChromeClient for your custom hooks + */ +razorpay.setWebChromeClient(new RazorpayWebChromeClient() { + @Override + public void onProgressChanged(WebView view, int newProgress) { + // Make sure you do not forget to call the super method + super.onProgressChanged(view, newProgress); + customProgressBar.setProgress(newProgress); + } +}); +``` diff --git a/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/integration-mock.md b/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/integration-mock.md new file mode 100644 index 00000000..da5e9d64 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/integration-mock.md @@ -0,0 +1,457 @@ +--- +title: Integrate Turbo UPI Mock SDK +description: Steps to integrate the Razorpay Turbo UPI Mock SDK with your app. +--- + +# Integrate Turbo UPI Mock SDK + +Mock SDK is a tool designed to facilitate your integration with Turbo UPI. Unlike conventional integration methods that rely on the stability of partner banks and NPCI UAT environments, Mock SDK removes this dependency, streamlining the integration process. + + +### Advantages + + - **No Dependency on UAT Environment**: Traditional integration methods often encounter obstacles due to issues with UAT environments. Mock SDK removes this roadblock, enabling you to integrate without external dependency. + - **Streamlines Integration**: Mock SDK is designed to create a smoother integration experience, ensuring a hassle-free process. This allows you to quickly offer Turbo UPI services to the users. + - **Effortless Integration for Essential Flows**: Mock SDK simplifies the process of integrating Turbo for important scenarios. This enables you to expand your range of UPI services for customers without dealing with complex requirements. + - **Seamless Transition to Production**: After testing your integration with Mock SDK, you can smoothly transition to the Production SDK for final testing. This ensures a seamless and secure transition from development to live production. + + + +### Prerequisites + + 1. Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number, app, and GitHub account whitelisted to get access to the `https://github.com/upi-turbo/android-turbo-sample-app` - sample app repository. + + - In this repository, you will find the AAR files (libraries for Turbo) and the sample app source code to help you do the entire integration. + - The AARs on the main branch are for the production environment, the ones on the `TURBO-719` branch are for the UAT environment, and the `mock-product` is for the mock environment. + + These are the important files in the sample app repo: + + - `app/libs`: All libraries (Bank, SecureComponent, and Turbo). + - `app/build.gradle`: All transitive dependencies needed to integrate Turbo SDK. + + 2. Integrate with the [Razorpay Android Standard Checkout SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/integration-steps.md). + + 3. Import the following frameworks: + + - Checkout SDK + - Razorpay Turbo Wrapper Plugin SDK (maven) + - Razorpay Turbo Mock Core SDK + - Razorpay Turbo Mock SDK + - Razorpay SecureComponent SDK + - Bank SDK + + 4. Add the following lines to your Android project's `gradle.properties` file: + + - `android.enableJetifier=true` + - `android.useAndroidX=true` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - `minSDKversion` for using Turbo UPI is currently 19 and cannot be overwritten. +> - API Key Usage for Different Environments: +> - Use the `rzp_test_0wFRWIZnH65uny` API key id for testing on the UAT environment. +> - Use the `rzp_test_vacN5cmVqNIlhO` API key id for testing on the Mock environment. +> - Use the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. +> - As a compliance requirement, you need to get approval from Google for READ_SMS permission. Refer to the [Google article](https://support.google.com/googleplay/android-developer/answer/10208820?hl=en) for more details. +> + + + +## 1. Integration Steps + +Follow these steps to integrate with [Turbo UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/turbo-upi.md). + +## 2. Test Integration + +Razorpay has three environments: Mock, UAT and Prod. We recommend the following: + +- Complete the integration with the Mock environment. +- Perform the UAT using the Razorpay-provided API keys. + +### 2.1 Test Data + +Use the following data to test the integration. + + +### Bank List + + + Bank id | Bank Name | IFSC + --- + 1 | Axis | AXIS0000001 + --- + 2 | SBI | SBI00000001 + --- + 3 | HDFC | HDFC0000001 + --- + 4 | Yes | YES00000001 + + + + +### Bank Accounts + + + Bank id | Bank Name | Account Number | Beneficiary Name | Account Balance | UPI PIN | ATM PIN | Card Number | Expiry Date | CVV | OTP + --- + 1 | Axis Bank | xxxx0001 | Pratheek | ₹100 | Not Set | 1234 | 8000110001 | 01/25 | Random CVV | 123456 + --- + 2 | SBI Bank | xxxx0001 | Kushaal Singla | ₹9,000 | Not Set | 1234 | 9000110001 | 01/25 | Random CVV | 123456 + --- + 2 | SBI Bank | xxxx0203 | Kushaal Singla | ₹99,999 | 123456 | 1234 | 9599110203 | 01/25 | Random CVV | 123456 + + + +### 2.2 Test Case Coverage + +Following are the various scenarios based on the dependencies. + + +### Dependencies and Scenarios + + + S.No | Dependency | Positive Scenarios | Negative Scenarios + --- + 1 | Device Binding | Device Binding | - SIM not found +- SMS sending failed +- Permissions not given + + --- + 2 | Account Linking | - Account found +- PIN set +- PIN not set + | No account for that number + --- + 3 | UPI ID generation | - UPI ID present +- New UPI ID creation + | NA + --- + 4 | - UPI PIN Management +- Change PIN +- Reset PIN + | PIN Changed/Set Successfully | - Invalid PIN +- PIN not matching +- Incorrect OTP +- Incorrect card details(Reset PIN) + + --- + 5 | P2M Transaction - In-App Payments | Payment Successful | - Invalid PIN +- Timeout +- Insufficient Balance + + --- + 6 | Check Balance | Show Balance | Invalid PIN + --- + 7 | Delink Account | Success Only | NA + + + +### 2.3 How to Test? + +Given are the various test cases and their sequential steps. + + +### 2.3.1 Device Binding Success + + In the scenario of successful device binding, follow these simple steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant all the required permissions as prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a list of banks for selection will appear. + + + +### 2.3.2 SIM not found + + In the event of a SIM card not being found, follow these steps: + 1. Remove all SIM cards from the device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant all the required permissions as prompted. + 4. A screen will be displayed with the error message No SIM found. + + + +### 2.3.3 Denied Permissions or Access Restricted + + When permissions are denied or access is restricted, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Deny the required permissions when prompted. + 4. A screen will be displayed, asking to allow the denied permissions. + + + +### 2.3.4 Account Found + + In the scenario where an account is found, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant the required permissions when prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a list of banks for selection will appear. + 6. Select Axis Bank or SBI Bank as mentioned in the [Test Data](#21-test-data). + 7. The expected response should be `UpiTurboLinkAction = SELECT_BANK_ACCOUNT` with `action.getError()==null` (no errors). + 7. The accounts based on the bank selection will be shown. + + + +### 2.3.5 PIN + + + + PIN set + + When it comes to setting or managing your PIN, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant the necessary permissions when prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a list of banks for selection will appear. + 6. Select Axis Bank or SBI Bank as mentioned in the [Test Data](#21-test-data). + 7. The accounts based on the bank selection will be shown. + 8. Select the account ending with xxxx0203, as mentioned in the [Test Data](#21-test-data). + 9. The account will be linked, and the PIN will be set successfully. + + + +### PIN not set + + When dealing with scenarios where a PIN is not set, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant the necessary permissions when prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a list of banks for selection will appear. + 6. Select Axis Bank or SBI Bank as mentioned in the [Test Data](#21-test-data). + 7. The accounts based on the bank selection will be shown. + 8. Select an account ending with xxxx0001, as mentioned in the [Test Data](#21-test-data). + 9. A card details screen will be displayed. + + + +### No Account for Specified Number + + When there is no account associated with a particular number, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant the necessary permissions when prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a list of banks for selection will appear. + 6. Select HDFC or Yes Bank as mentioned in the [Test Data](#21-test-data). + 7. A screen will appear with the error message No bank account found. + + + +### PIN set Successfully + + For a successful PIN setup, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant the necessary permissions when prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a list of banks for selection will appear. + 6. Select Axis Bank or SBI Bank as mentioned in the [Test Data](#21-test-data). + 7. The accounts based on the bank selection will be shown. + 8. Select an account ending with xxxx0001, as mentioned in the [Test Data](#21-test-data). + 9. A card details screen will be displayed. Enter the details from [Test Data](#21-test-data). + 10. Enter bank OTP from [Test Data](#21-test-data) on the next screen then proceed. + 11. Enter and confirm the PIN on the subsequent screens. + + + +### Incorrect OTP + + In situations where an incorrect OTP is encountered, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant the necessary permissions when prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a list of banks for selection will appear. + 6. Select Axis Bank or SBI Bank as mentioned in the [Test Data](#21-test-data). + 7. The accounts based on the bank selection will be shown. + 8. Select an account ending with xxxx0001, as mentioned in the [Test Data](#21-test-data). + 9. A card details screen will be displayed. Enter the details form [Test Data](#21-test-data) + 12. Enter any random OTP except for 123456. + + + +### Incorrect Card Details (Reset PIN) + + When dealing with resetting your PIN with incorrect card details, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant the necessary permissions when prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a list of banks for selection will appear. + 6. Select Axis Bank or SBI Bank as mentioned in the [Test Data](#21-test-data). + 7. The accounts based on the bank selection will be shown. + 8. Select an account ending with xxxx0001, as mentioned in the [Test Data](#21-test-data). + 9. Enter incorrect card details. + + + + + + + +### 2.3.6 UPI ID + + + + New UPI ID Creation (PIN already set) + + For the scenario of creating a new UPI ID with an already set PIN, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call the `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant all the required permissions as prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a screen with a list of Banks will be displayed for Bank selection. + 6. Select Axis Bank or SBI Bank as mentioned in the [Test Data](#21-test-data). + 7. The accounts based on bank selection will be shown. + 8. Select an account ending with xxxx0203, as mentioned in the [Test Data](#21-test-data). + 9. Expect the final response to confirm that an account with a UPI ID is linked successfully. + + + +### New UPI ID Creation (PIN not set) + + For the scenario of creating a new UPI ID without a set PIN, follow these steps: + 1. Enter a mobile number that exists on the user's device. + 2. Call the `razorpay.upiTurbo.linkNewUpiAccountWithUI` method. + 3. Grant all the required permissions as prompted. + 4. The device binding process will initiate, including SMS sending. + 5. After successful device binding, a screen with a list of Banks will be displayed for Bank selection. + 6. Select Axis Bank or SBI Bank as mentioned in the [Test Data](#21-test-data). + 7. The accounts based on bank selection will be shown. + 8. Select an account ending with xxxx0001, as mentioned in the [Test Data](#21-test-data). + 9. A card detail screen will be displayed. Enter the details from [Test Data](#21-test-data). + 10. Enter the bank OTP from [Test Data](#21-test-data) on the next screen, then proceed. + 11. Enter and confirm the PIN on the subsequent screens. + + + + + + + +### 2.3.7 Manage Accounts + + + + Show Balance + + For scenarios related to checking your balance, follow these steps: + + 1. Enter a mobile number that is already registered on the device. + 2. Call `razorpay.upiTurbo.manageUpiAccounts` method. + 3. A list of linked accounts will be displayed. + 4. Select the account for which you want to check the balance. + 5. Click on Check Balance, then enter the correct PIN when prompted. + 6. The balance for the selected account will be displayed. + + + +### Check Balance - Invalid PIN + + When it comes to scenarios focused on checking your balance, follow these steps: + + 1. Enter a mobile number that exists on the user's device. + 2. Call the `razorpay.upiTurbo.manageUpiAccounts` method. + 3. A list of linked accounts will be displayed. + 4. Select the account for which you want to check the balance. + 5. Click on Check Balance. + 6. Enter an incorrect PIN when prompted. + 7. An error message will be displayed indicating that the provided PIN is invalid or does not match the expected PIN. + + + +### Delink Account - Success + + When it comes to scenarios related to delinking your account, follow these steps: + + 1. Enter a mobile number that is already registered on the device. + 2. Call `razorpay.upiTurbo.manageUpiAccounts` method. + 3. A list of linked accounts will be displayed. + 4. Select the account you wish to delink. + 5. Click on the option to delink or remove the account. + 6. A confirmation alert will be displayed, confirming that your account has been successfully delinked. + + + +### Change PIN - Success + + When it comes to successfully changing your PIN, follow these steps: + + 1. Enter a mobile number that is registered on the device. + 2. Call `razorpay.upiTurbo.manageUpiAccounts` method. + 3. A list of linked accounts will be presented. + 4. Select the specific account for which you intend to change the PIN. + 5. Click on Change PIN, and proceed to enter the current PIN, along with the new PIN, and confirm the new PIN on the subsequent screens. + + + +### Change PIN - Failure + + When attempting to change your PIN but encountering a failure, follow these steps: + + 1. Enter a mobile number that is registered on the device. + 2. Call `razorpay.upiTurbo.manageUpiAccounts` method. + 3. A list of linked accounts will be displayed. + 4. Select the specific account for which you wish to change the PIN. + 5. Click on Change PIN and proceed to enter an incorrect PIN, or enter a new PIN and a different PIN while confirming it. + + + +### Reset PIN - Success + + To successfully reset your PIN, proceed with the following steps: + + 1. Enter a mobile number that is registered on the device. + 2. Call the `razorpay.upiTurbo.manageUpiAccounts` method. + 3. View the list of linked accounts. + 4. Select the specific account for which you wish to reset the PIN. + 5. Click on Reset PIN and follow the prompts to input the bank OTP from the [Test Data](#21-test-data). + 6. Enter the new PIN and confirm it on the subsequent screens. + + + + + + +> **WARN** +> +> +> **Watch Out!** +> +> - Device Binding will only work if the user has at least one SIM card in their mobile device. +> - Users can set/reset the UPI PIN. The configured PIN will be used to validate the transaction. +> - Based on the [Test Data](#21-test-data) for bank accounts, choose a bank for a single, multiple or no bank account. +> - Use the same ATM PIN and card Number mentioned in the [Test Data](#21-test-data). +> - The UPI PIN will revert to its default setting or be removed when you uninstall or clear storage. +> - Amount ₹24 is blocked for special cases. Please refer to [Additional Cases](#24-additional-cases). +> + +### 2.4 Additional Cases + +Businesses should have the capability to display a user-friendly message to their customers for certain special or additional error scenarios. The SDK is equipped to simulate some of these cases. + +Action | Input Data | Code | Description +--- +Pay | Amount = ₹24 | 91 | Timeout +--- + +### 2.5 TPV Cases + +- Only one TPV whitelisted account (ending with xxxx0203) is permitted. Payments made using any other accounts will fail with the error Payment failed because the account linked to VPA is invalid. +- Payment can be made multiple times when using Mock for any given `order_id`, which is not the case in production. +- Use the `rzp_test_V5AtnjYvupQXm1` API key id for TPV testing on the Mock environment. + +## 3. Go-live Checklist + +Complete this [Go-live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-ui.md#3-go-live-checklist) to take your integration live. diff --git a/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/integration-tpv.md b/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/integration-tpv.md new file mode 100644 index 00000000..67105926 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/integration-tpv.md @@ -0,0 +1,723 @@ +--- +title: Integrate Turbo UPI TPV +description: Know how Razorpay performs Third-Party Validation (TPV) of investor bank accounts in real-time using Razorpay Turbo UPI on Standard Checkout. +--- + +# Integrate Turbo UPI TPV + +Third-party validation (TPV) of bank accounts is mandatory for businesses in the BFSI (Banking, Financial Services and Insurance) sector dealing with Securities, Broking and Mutual Funds. You can accept customer payments with the Turbo UPI TPV SDK. Know more about [How TPV works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation.md#how-it-works). + +> **WARN** +> +> +> +> **Watch Out!** +> +> You can choose to maintain a whitelisted account per customer using the S2S [Customer Add Bank Account API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers/bank-accounts.md#1-add-bank-account-of-customer) on your end. This is an additional functionality. This will help you during the onboarding flow, where only whitelisted accounts will be shown to the users during onboarding. +> + + +### Prerequisites + + 1. Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number, app, and GitHub account whitelisted to get access to the `https://github.com/upi-turbo/android-standard-turbo-sample` - sample app repository. + - In this repository, you will find the AAR files (libraries for Turbo UPI) and the sample app source code to help you with the integration. + - The AARs on the main branch are for the production environment, the ones on the `TURBO-719` branch are for the UAT environment and the ones on `mock-product` are for the Mock environment. + + These are the important files in the sample app repo: + - `app/libs`: All libraries (Bank, SecureComponent and Turbo). + - `app/build.gradle`: All transitive dependencies needed to integrate Turbo SDK. + + 2. Integrate with the [Razorpay Android Standard Checkout SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/integration-steps.md). + + 3. Import the following frameworks: + - Checkout SDK + - Razorpay Turbo Wrapper Plugin SDK (maven) + - Razorpay Turbo Core SDK + - Razorpay Turbo UI SDK + - Razorpay SecureComponent SDK + - Bank SDK + + 4. Add the following lines to your Android project's `gradle.properties` file: + - `android.enableJetifier=true` + - `android.useAndroidX=true` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - `minSDKversion` for using Turbo UPI is currently 19 and cannot be overwritten. +> - API Key Usage for Different Environments: +> - Use the `rzp_test_5sHeuuremkiApj` API key id for testing on the UAT environment. +> - Use the `rzp_test_V5AtnjYvupQXm1` API key id for testing on the Mock environment. +> - Use the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. +> - As a compliance requirement, you need to get approval from Google for **READ_SMS** permission. Refer [to the Google article](https://support.google.com/googleplay/android-developer/answer/10208820?hl=en) for more details. +> + + + +## 1. Integration Steps + +Given below are the steps: + + +### Step 1: Whitelist Customer Bank Accounts *(Optional)* + + You can whitelist (also known as allowlist) your customer's bank accounts to ensure that only those accounts are considered during customer onboarding. By whitelisting the accounts at the start, you can avoid the bank account linking during payment. Use the Customer APIs to create customers and add their bank account details. + + For example, if a customer, Gaurav, has two bank accounts ABC and XYZ, you can use the APIs to create a customer id and link the bank accounts to that id. You can then pass this customer id at the time of payment. + + Follow these steps. + + + Step 1.1: Create a Customer + + + Use this endpoint to create or add a customer with basic details such as name and contact details. + + ```cURL: Request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "Gaurav Kumar", + "contact": "9123456780", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + }' + + ```json: Success Response + { + "id" : "cust_1Aa00000000004", + "entity": "customer", + "name" : "Gaurav Kumar", + "email" : "gaurav.kumar@example.com", + "contact" : "9123456780", + "gstin": null, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at ": 1234567890 + } + + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } + } + ``` + + + + Request Parameters + + +`name` _optional_ +: `string` Customer's name. Alphanumeric value with period (.), apostrophe ('), forward slash (/), at (@) and parentheses are allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact ` _optional_ +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email ` _optional_ +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`fail_existing` _optional_ +: `string` Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + +`gstin` _optional_ +: `string` Customer's GST number, if available. For example, `29XAbbA4369J1PA`. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + + +### Response Parameters + + +`id` +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`name` +: `string` Customer's name. Alphanumeric, with period (.), apostrophe ('), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact` +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email` +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`gstin` +: `string` GST number linked to the customer. For example, `29XAbbA4369J1PA`. + +`notes` +: `json object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + + + + + + + +### Step 1.2: Add Customer's Bank Account + + The following endpoint adds the customer's bank accounts. + + customers/:customer_id/bank_account + + ```cURL: Request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers/:customer_id/bank_account \ + -H "Content-Type: application/json" \ + -d '{ + "ifsc_code" : "UTIB0000194", + "account_number" :"916010082985661", + "beneficiary_name" : "Gaurav", + "beneficiary_address1" : "address 1", + "beneficiary_address2" : "address 2", + "beneficiary_address3" : "address 3", + "beneficiary_address4" : "address 4", + "beneficiary_email" : "gaurav.kumar@example.com", + "beneficiary_mobile" : "9900990099", + "beneficiary_city" :"Bangalore", + "beneficiary_state" : "KA", + "beneficiary_country" : "IN" + }' + + ```json: Response + { + "id": "ba_LSZht1Cm7xFTwF", + "entity": "bank_account", + "ifsc": "ICIC0001207", + "bank_name": "ICICI Bank", + "name": "Gaurav Kumar", + "notes": [], + "account_number": "XXXXXXXXXXXXXXX0434" + } + ``` + + + + Path Parameter + +`customer_id` _mandatory_ +: `string` Customer id of the customer whose bank account is to be added. + + + + +### Request Parameters + + +`account_number` _mandatory_ +: `string` Customer's bank account number. For example, `11214311215411`. + +`beneficiary_name` _mandatory_ +: `string` The name of the beneficiary associated with the bank account. + +`beneficiary_address1` _optional_ +: `string` The virtual payment address. + +`beneficiary_email` _optional_ +: `string` Email address of the beneficiary. For example, `gaurav.kumar@example.com`. + +`beneficiary_mobile` _optional_ +: `string` Mobile number of the beneficiary. + +`beneficiary_city` _optional_ +: `string` The city of the beneficiary. + +`beneficiary_state` _optional_ +: `string` The state of the beneficiary. + +`beneficiary_country` _optional_ +: `string` The country of the beneficiary. + +`beneficiary_pin` _optional_ +: `integer` The pin code of the beneficiary's address. + +`ifsc_code` _mandatory_ +: `string` The IFSC of the bank branch associated with the account. + + + +### Response Parameters + +`bank_accounts` +: `array` An array containing bank account details. + + `id` + : `string` Unique identifier of the bank account. + + `entity` + : `string` The type of entity, which in this case is `bank_account`. + + `ifsc` + : `string` The IFSC of the bank branch associated with the account. + + `bank_name` + : `string` The name of the bank. + + `name` + : `string` The name associated with the bank account. + + `notes` + : `object` Set of key-value pairs that can be used to store additional information about the payment. + + `account_number` + : `integer` Customer's bank account number. For example, `0002020000304030434`. + + + + + + + + + +### Step 2: Create an Order *(Mandatory)* + + Pass the investor bank account details to the `bank_account` array of the Orders API. Given below is the sample code when the `method` is `upi`. + + ```curl: Request + curl -u : \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 500, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }' + + ```json: Response + { + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 500, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 + } + ``` + + + + Request Parameters + + `amount` _mandatory_ +: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, the value of this field should be `100`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. You can create orders in **INR** only. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`method` _mandatory_ +: `string` The payment method used to make the payment. If this parameter is not passed, investors will be able to make payments using both netbanking and UPI payment methods. Possible values: + - `netbanking`: Investors can make payments only using netbanking. + - `card`: Investors can make payments using debit card. + - `upi`: Investors can make payments only using UPI. + +`bank_account` _mandatory_ +: `object` Details of the bank account that the investor has provided at the time of registration. + + `account_number` _mandatory_ + : `string` The bank account number from which the investor should make the payment. For example, `765432123456789` Payments will not be processed for an incorrect account number. + + `name` _mandatory_ + : `string` The name linked to the bank account. For example, `Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` The bank IFSC. For example, `HDFC0000053`. + + + +### Response Parameters + + `id` +: `string` Unique identifier of the order. + +`entity` +: `string` Indicates the type of entity. Here, it is `order`. + +`amount` +: `integer` The order amount represented in the smallest unit of the currency passed. For example, amount = 100 translates to 100 paise, that is ₹1 (default currency is INR). + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we support INR only. + +`receipt` +: `string` A unique identifier of the order entered by the user. For example, `BILL13375649`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, "note_key": "Beam me up Scotty”. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`offer_id` +: `string` Unique identifier of the offer. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + + + + + + +### Step 3: Turbo UPI SDK Action + + You need to link the customer's UPI account with your app. Use the code samples given below to [link a New UPI account](#32-link-new-upi-account). + + + 3.1 Initialise the SDK + + + Use the code given below to initialise the SDK. + + ```java: Java + Checkout checkout = new Checkout() + .upiTurbo(activity) //mandatory + .setColor("/*color*/ #000000"); //optional + + ```kotlin: Kotlin + val checkout = Checkout() + .upiTurbo(activity) // mandatory + .setColor("/*color*/ #000000") // optional + ``` + + + +### 3.2 Link New UPI Account + + + Use the following code to link the newly created UPI account with your app. This function can be called from anywhere in the application, providing multiple entry points for customers to link their UPI account with your app. Linking the new UPI account in advance allows customers to pay directly without repeating the linking process. + + ```java: Java + checkout.upiTurbo.linkNewUpiAccount("", "#000000" /*color - in hex format*/, + new GeneralPluginCallback(){ + + @Override + public void onSuccess(UpiAccount upiAccount) { + + } + + @Override + public void onError(JSONObject error) { + + } + + }); + + + ```kotlin: Kotlin + checkout.upiTurbo?.linkNewUpiAccount("", "#000000" /*color - in hex format*/, + object : GeneralPluginCallback{ + + override fun onSuccess(upiAccount: UpiAccount) { + // use upiAccount to display data to the User + } + + override fun onError(error: JSONObject) { + // error regarding linking of UpiAccount + } + + }) + // color parameter in the function can be used to customize the screens in + // linking process + ``` + + + + Request Parameters + + +`customerMobile` _mandatory_ +: `string` Mobile number of the customer. + +`color` _mandatory_ +: `string` Colour in HEX format. + +`listener` _mandatory_ +: `GeneralPluginCallback` The listener used to receive callbacks for success or failure events. + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | This function is triggered if the list was fetched successfully. + --- + `onError` | This function is triggered in case an error is thrown during the retrieval process, either by Razorpay SDK or Bank SDK. + + + + + + + + + + +### Step 4: Payment Flow + + Razorpay SDK will handle all the changes related to Turbo UPI internally. To integrate with the payment flow, [initiate payment and display the checkout form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/integration-steps.md#14-initiate-payment-and-display-checkout-form). + + + +### Steps 5: Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + - You need to store these fields in your server. + - You can confirm the authenticity of these details by verifying the signature in the next step. + + ```json: Success Callback + { + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" + } + ``` + + + Parameters + + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + + +### Step 6: Verify Signature + + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + +### Non-Transactional Flow + +Razorpay provides a single exposed function that allows you to manage linked UPI accounts and access all non-transactional flows seamlessly. + + +### Manage UPI Accounts + + The SDK manages the linked `UpiAccounts` on the application by triggering `manageUpiAccounts()`, which follows the following internal non-transaction flows for `UpiAccounts`: + + - **Fetch balance**: Check the customer's account balance. + - **Change UPI PIN**: Provide the customer the ability to change their UPI PIN. + - **Reset UPI PIN**: Let your customers reset the PIN for their account. + - **Delete the account from the application**: Let your customers delink, that is, remove a selected UPI account from your application. + + ```java: Java + if (checkout.upiTurbo != null) { + checkout.upiTurbo.manageUpiAccounts("9000090000","#000000"/*color - in hex format(nullable)*/, new GenericPluginCallback() { + @Override + public void onSuccess(@NonNull Object data) { + /* can be safely ignored */ + } + + @Override + public void onError(@NonNull JSONObject error) { + /* Throws error if Turbo UPI cannot be initialized or throws error */ + } + }); + } + ```kotlin: Kotlin + checkout.upiTurbo?.manageUpiAccounts("9000090000", "#000000"/*color - in hex format(nullable)*/, object : GenericPluginCallback { + override fun onError(error: JSONObject) { + /* Throws error if Turbo UPI cannot be initialized or throws error */ + } + + override fun onSuccess(data: Any) { + /* Can be safely ignored */ + } + }) + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use the following S2S APIs to maintain and fetch a list of all TPV bank accounts for a customer. +> - Use the [Add Bank Account of Customers API](#step-12-add-customer-s-bank-account) to add bank account of the customers. +> - Use the [Delete Bank Account of Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers/bank-accounts.md#2-delete-bank-account-of-customer) to delete bank account of the customers. +> + +### Models Exposed from the SDKs + +The SDKs given below provide access to exposed models for seamless integration. + + +### UpiAccount + + + + Method | Return Type | Description + --- + `getAccountNumber` | String | Returns masked bank account number. + --- + `getAccountType` | String | The account type. Possible values are `savings` and `current`. + --- + `getIfsc` | String | Returns IFSC for Bank. + --- + `getBankName` | String | Returns name of bank. + --- + `getBankLogoUrl` | String | Returns URL to the PNG image logo. + --- + `bankPlaceholderUrl` | String | Image URL for bank logo placeholder. + --- + `pinLength` | Integer | Length on UPI PIN. + + + + + +### Error + + + + Error | Description + --- + `getErrorCode()` | Types of error codes - `BAD_REQUEST_ERROR`: Failure from the client's end (SDK). +- `GATEWAY_ERROR`: Failure either from the Secure Component or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + `getErrorDescription()` | Brief description of the error. + --- + `getErrorReason()` | Specifies the reason for the error. + --- + `getErrorSource()` | Indicates the origin of the error. + --- + `getErrorStep()` | Highlights the stage where the error occurred. + + + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/turbo-upi/error-codes.md). + + +## 2. Test Integration + +We recommend the following: + +- Complete the integration on UAT before using the prod builds. +- Perform the UAT using the Razorpay-provided API keys. + +## 3. Go-live Checklist + +Complete these steps to take your integration live: + +- You should get your app id whitelisted by Razorpay to test on prod. + + +> **INFO** +> +> +> **Handy Tips** +> +> Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number and app whitelisted. +> + + +- Import the prod library from the GitHub repository → `https://github.com/upi-turbo/android-turbo-sample-app/tree/prod/app/libs` prod branch. + +- Add Proguard rules: + + - `keepclassmembers,allowobfuscation class * { + @com.google.gson.annotations.SerializedName ; + }` + - `keepclassmembers enum * { *; }` + - `keepclassmembers class * { + @android.webkit.JavascriptInterface ; + }` + - `dontwarn com.razorpay.**` + - `keep class com.razorpay.** {*;}` + - `keep class com.olivelib.** {*;}` + - `keep class com.olive.** {*;}` + - `keep class org.apache.xml.security.** {*;}` + - `keep interface org.apache.xml.security.** {*;}` + - `keep class org.npci.** {*;}` + - `keep interface org.npci.** {*;}` + - `keep class retrofit2.** { *; }` + - `keep class okhttp3.** { *; }` + +- Replace the UAT credential with the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. diff --git a/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/turbo-upi.md b/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/turbo-upi.md new file mode 100644 index 00000000..22cfe94f --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/turbo-upi.md @@ -0,0 +1,207 @@ +--- +title: Integrate with Turbo UPI +description: Steps to integrate Razorpay Turbo UPI with your app. +--- + +# Integrate with Turbo UPI + +- **Turbo UPI Android Standard SDK**: Discover new features, updates and deprecations related to Turbo UPI on Android Standard Checkout (since Jan 2024). + +With Razorpay Turbo UPI, businesses experience faster and simpler payments. It condenses the payment process from 5 steps to just 1, eliminating app redirections. Enjoy a seamless in-app payment experience, reduce dependencies on third-party UPI apps, and gain complete visibility of the payment journey. + +You can seamlessly integrate Turbo UPI with Razorpay Android Standard SDK. Explore the full potential of [Razorpay Turbo UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/turbo-upi.md) and know How it Works. + +![Turbo UPI Standard Checkout Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-flow.jpg.md) + + +### Prerequisites + + Before you start integrating Turbo UPI with Razorpay Android Standard SDK, ensure that you follow these guidelines for a smooth integration process: + + 1. **SDK Version Compatibility:** + - Integrate with [Razorpay Android Standard SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard.md). Ensure that you integrate with SDK version 1.6.37 or higher. + + 2. **Import the following frameworks:** + - In the root settings.gradle file, use: + ```kotlin: Kotlin + dependencyResolutionManagement { + repositories { + // ... other repositories ... + maven { + url = uri("https://maven.pkg.github.com/upi-turbo/android-turbo-sample-app") + credentials { + username = "upi-turbo" + password = "" + } + } + } + } + ``` + + - In the library module's build.gradle, use: + + ```kotlin: Kotlin + dependencies { + // UAT + debugImplementation "com.razorpay:checkout-uat:$CHECKOUT_VERSION" + debugImplementation "com.razorpay:razorpay-turbo-uat:$TURBO_VERSION" + debugImplementation "com.razorpay:turbo-ui-uat:$TURBO_VERSION" + + // Production + releaseImplementation "com.razorpay:checkout:$CHECKOUT_VERSION" + releaseImplementation "com.razorpay:razorpay-turbo:$TURBO_VERSION" + releaseImplementation "com.razorpay:turbo-ui:$TURBO_VERSION" + } + ``` + + 3. **Gradle Properties:** + - Add the following lines to your Android project's `gradle.properties` file: + - `android.enableJetifier=true` + - `android.useAndroidX=true` + + 4. **Minimum SDK Version:** + - Keep in check that the `minSDKversion` for using Turbo UPI is currently 23 and cannot be overwritten. + + 5. **Contact Prefill in Standard Checkout:** + - Standard Checkout should load with the contact prefilled. This contact information is crucial for setting up UPI accounts. + - Make sure your Checkout options include [**prefill contact**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/integration-steps.md#14-initiate-payment-and-display-checkout-form). + + +## Onboarding Flow + +Ensure your customers [onboard with Razorpay Turbo UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/turbo-upi.md#onboarding-flow) to get started. + +### Turbo UI SDK Integration + +Follow these steps to integrate with Razorpay Turbo UPI: + +1. Initialise the Checkout object with the `activity` parameter to enable Turbo UPI functionality. + + ```kotlin: Kotlin + val checkout = Checkout() + .upiTurbo(activity) // mandatory + .setColor("/*color*/ #000000") // optional + + ```kotlin: Java + Checkout checkout = new Checkout() + .upiTurbo(activity)//mandatory + .setColor("/*color*/ #000000" );//optional + + ``` + +2. Use the following code to link the newly created UPI account with your app. This function can be called from any application section, offering multiple entry points for customers to link their UPI account with your app. Linking it in advance allows customers to pay directly with the linked `UpiAccount` without repeating the linking process. + + ```kotlin: Kotlin + checkout.upiTurbo?.linkNewUpiAccount("","#000000"/*color - in hex format*/, + object: GeneralPluginCallback{ + + override fun onSuccess(upiAccount: UpiAccount){ + // use upiAccount to display data to the User + } + + override fun onError(error: JSONObject){ + // error regarding linking of UpiAccount + } + + }) + // color parameter in the function can be used to customize the screens in + // linking process + + ```kotlin: Java + checkout.upiTurbo.linkNewUpiAccount("", "#000000"/*color - in hex format*/, + new GeneralPluginCallback(){ + + @Override + public void onSuccess(UpiAccount upiAccount){ + + } + + @Override + public void onError(JSONObject error){ + } + + }); + + ``` + +> **INFO** +> +> +> +> **Payment Flow** +> +> Razorpay SDK will handle all the changes related to `UpiTurbo` internally. To integrate with the payment flow, [initiate payment and display the checkout form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/integration-steps.md#14-initiate-payment-and-display-checkout-form). +> + +### Non-Transactional Flow + +Razorpay provides a single exposed function that allows you to manage linked UPI accounts and access all non-transactional flows seamlessly. + +![View the non-transactional flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-non-transactional.jpg.md) + + +### Manage UPI Accounts + + The SDK manages the linked `UpiAccounts` on the application by triggering `manageUpiAccounts()`, which follows the following internal non-transaction flows for `UpiAccounts`: + + - **Fetch balance**: Check the customer's account balance. + - **Change UPI PIN**: Provide the customer the ability to change their UPI PIN. + - **Reset UPI PIN**: Let your customers reset the PIN for their account. + - **Delete the account from the application**: Let your customers delink, that is, remove a selected UPI account from your application. + + ```kotlin: Kotlin + checkout.upiTurbo?.manageUpiAccounts("9000090000", "#000000"/*color - in hex format(nullable)*/, object : GenericPluginCallback { + override fun onError(error: JSONObject) { + /* Throws error if Turbo UPI cannot be initialized or throws error */ + } + + override fun onSuccess(data: Any) { + /* Can be safely ignored */ + } + }) + + ```kotlin: Java + if (checkout.upiTurbo != null) { + checkout.upiTurbo.manageUpiAccounts("9000090000","#000000"/*color - in hex format(nullable)*/, new GenericPluginCallback() { + @Override + public void onSuccess(@NonNull Object data) { + /* can be safely ignored */ + } + + @Override + public void onError(@NonNull JSONObject error) { + /* Throws error if Turbo UPI cannot be initialized or throws error */ + } + }); + } + + ``` + + +### Models Exposed from the SDKs + +The SDKs given below provide access to exposed models for seamless integration. + + +### Error + + + + Error | Description + --- + `errorCode` | Types of error codes - `BAD_REQUEST_ERROR`: Failure from the client's end (SDK). +- `GATEWAY_ERROR`: Failure either from the Secure Component or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + `errorDescription` | Brief description of the error. + --- + `errorReason` | Specifies the specific reason for the error. + --- + `errorSource` | Indicates the origin of the error. + --- + `errorStep` | Highlights the stage where the error occurred. + + + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/turbo-upi/error-codes.md). diff --git a/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/turbo-upi/error-codes.md b/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/turbo-upi/error-codes.md new file mode 100644 index 00000000..1411fff7 --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/turbo-upi/error-codes.md @@ -0,0 +1,421 @@ +--- +title: Turbo UPI SDK - Error Codes | Android Standard Integration +heading: Turbo UPI SDK - Error Codes +description: List of error codes for Turbo UPI SDK. +--- + +# Turbo UPI SDK - Error Codes + +Given below is the list of error codes categorised by error reasons, with relevant descriptions, source and step. + +### Bad Request Errors + +Given below is the list of Bad Request errors. + + +### bank_not_live_on_upi + + - **Description**: The selected bank is not enabled on UPI. Please try using another bank. + - **Source**: gateway + - **Step**: customer_onboarding + + + +### account_does_not_exist + + + + Payment Debit Request + + - **Description**: No accounts found for the selected bank. Please try using another bank. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Payment Credit Request + + - **Description**: Payment was unsuccessful as the receiver's bank account is not valid. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + + + + +### transaction_not_allowed + + + + Payment Debit Request + + - **Description**: Transaction not permitted to the account as per your bank policy. Please contact your bank for more details or try with another bank account. + - **Source**: customer + - **Step**: payment_debit_request + + + +### Payment Credit Request + + - **Description**: Payment not allowed as it got declined by the receiver's bank. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + + + + +### upi_pin_registration_card_expired + + - **Description**: Card used while setting UPI PIN has expired. Please use another debit card or use another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### upi_pin_registration_card_not_found + + - **Description**: Card details used while setting UPI PIN are incorrect. Please re-check and try again. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### upi_pin_registration_card_restricted + + - **Description**: Card used while setting UPI PIN has been blocked by your bank. Please reach out to your bank for more information or try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### bank_technical_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_status_request + + + +### pin_not_set + + - **Description**: Payment was unsuccessful as you have not set the UPI PIN on the app. Try using another method. + - **Source**: customer_psp + - **Step**: payment_authentication + + + +### customer_not_registered + + - **Description**: No bank account is associated with this mobile number. Please try again by adding your account. + - **Source**: gateway + - **Step**: customer_onboarding + + + +### server_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: gateway + - **Step**: payment_authentication + + + +### payment_cancelled_by_user + + - **Description**: Flow was aborted as you pressed back from the PIN screen. Please try again. + - **Source**: customer + - **Step**: payment_authorization + + +### Gateway Errors + +Given below is the list of gateway errors. + + +### incorrect_otp + + - **Description**: You have entered an incorrect OTP. Try again. + - **Source**: customer + - **Step**: customer_onboarding + + + +### otp_expired + + - **Description**: You have entered an expired OTP. Please regenerate OTP and try again. + - **Source**: customer + - **Step**: customer_onboarding + + + +### insufficient_funds + + - **Description**: Payment was unsuccessful due to insufficient funds. Kindly check your balance and try again. + - **Source**: customer + - **Step**: payment_debit_request + + + +### insufficient_funds_mandate_block + + - **Description**: Payment was unsuccessful as the amount in your account is blocked for another payment. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### otp_attempts_exceeded + + - **Description**: You have entered an incorrect OTP too many times. Try again in some time. + - **Source**: customer_psp + - **Step**: customer_onboarding + + + +### account_dormant + + - **Description**: Payment was unsuccessful as the receiver's bank account is inactive. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + +### bank_not_live_on_upi + + - **Description**: Selected bank is not available on UPI. Please try using another bank. + - **Source**: issuer_bank + - **Step**: customer_onboarding + + + +### payment_timed_out + + + + Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_response + + + +### UPI ID Not Reachable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is not reachable at this time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + + + + +### first_transaction_limit_exceeded + + - **Description**: Payment was unsuccessful as you exceeded the first-time transaction limit set by your bank. You can use another bank account or retry after 24 hours. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### transaction_limit_exceeded + + + + Limit Set By Bank Exceeded + + - **Description**: Payment was unsuccessful as you exceeded the transaction limit set by your bank. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### Daily Amount Limit Exceeded + + - **Description**: Payment was unsuccessful as you exceeded the amount limit for the day with this bank account. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + + + + + +### first_time_transaction_freeze_period + + - **Description**: Payment was unsuccessful due to the cooling period set by your bank for first-time user. Please try again after some time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### transaction_frequency_limit_exceeded + + - **Description**: Payment was unsuccessful as the number of transactions exceeds the max limit set by the bank. You can use another bank account or retry after some time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### bank_account_inactive + + + + Issuer Bank Account Inactive + + - **Description**: Payment was unsuccessful as your account is not active. Please try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Receiver Bank Account Inactive + + - **Description**: Payment was unsuccessful as the receiver's bank account is not active. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_debit_request + + + + + + +### server_error + + + + Temporary Issue - Issuer Bank + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: beneficiary_bank + - **Step**: payment_request + + + +### Temporary Issue - Beneficiary Bank + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: issuer_bank + - **Step**: payment_request + + + + + + +### invalid_ifsc + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: gateway + - **Step**: payment_authentication + + + +### upi_pin_registration_card_blocked + + - **Description**: Card used while setting UPI PIN has been blocked by your bank. Please reach out to your bank for more information or try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### bank_technical_error + + + + UPI ID Temporarily Unavailable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: payment_credit_response + + + +### Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: payment_credit_response + + + + + + +### payment_declined + + + + Declined by Bank + + - **Description**: Payment was unsuccessful as it was declined by your bank. Reach out to your bank for more details. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_debit_request + + + + + + +### pin_attempts_exceeded + + - **Description**: You have exceeded the incorrect UPI PIN attempts. You can use another bank account or retry after 24 hours. + - **Source**: customer + - **Step**: payment_authentication + + + +### incorrect_pin + + - **Description**: You have entered incorrect UPI PIN. Please try again with the correct UPI PIN. + - **Source**: customer + - **Step**: payment_authentication + + + +### linked_account_removal_failed + + - **Description**: Unable to remove the account. Please try again. + - **Source**: customer_psp + - **Step**: account_management + + + +### sms_text_not_received + + - **Description**: Something went wrong while sending SMS. Please try again. + - **Source**: gateway + - **Step**: customer_onboarding + + +### Server Errors + +Given below is the list of server errors. + + +### server_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: customer_onboarding + + + +### server_error + + - **Description**: We are facing some trouble completing your request at the moment. Please try again shortly. + - **Source**: internal + - **Step**: payment_authorization diff --git a/llm-content/payments/payment-gateway/android-integration/standard/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/android-integration/standard/troubleshooting-faqs.md new file mode 100644 index 00000000..1827565a --- /dev/null +++ b/llm-content/payments/payment-gateway/android-integration/standard/troubleshooting-faqs.md @@ -0,0 +1,136 @@ +--- +title: Payment Gateway | Android Standard - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common error scenarios and find answers to frequently asked questions about Standard Android integration. +--- + +# Troubleshooting & FAQs + +### 1. Android app is crashing every time I invoke `RazorpayCheckout.open API`. How to resolve this? + + The Android App crashes because the theme color parameter is passed in curly braces. + + Use the code given below to resolve the problem: + + ```java: + JSONObject options = new JSONObject(); + options.put("name", "Acme Corp"); + options.put("description", "Reference No. #123456"); + options.put("image", "http://example.com/image/rzp.jpg"); + options.put("order_id", "order_DBJOWzybf0sJbb");//from response of step 3. + options.put("theme.color", "#3399CC"); + ``` + + + +### 2. During checkout, the **Paying To** name reflects my company name. Is it possible to change the **Paying To** name from my company name to my product name? + + No. **Paying to** gives your business name and not the product name. It is a standard flow. So you cannot change it. + + + +### 3. Does Razorpay support Xamarin for SDK integration? + + No, we do not support Xamarin. However, since Xamarin is essentially a wrapper around Android and iOS, you can create your own Xamarin wrapper using our [Android](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard.md) and [iOS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard.md) SDKs. + + You can refer to Xamarin for integrating native [Android](https://docs.microsoft.com/en-us/xamarin/android/platform/binding-java-library/) and [iOS](https://docs.microsoft.com/en-us/xamarin/ios/platform/binding-objective-c/) libraries. Alternatively, you can use web integration to open the checkout form in a web view. + + + +### 4. How can I check the Razorpay Android Standard SDK version? + + To check the SDK version: + 1. Open your Android project in Android Studio. + 2. Navigate to the `build.gradle` file of your app module (usually `app/build.gradle`). + 3. Locate the `dependencies` block in the file. + 4. Find the line that includes the Razorpay SDK dependency. The version number will be alongside the SDK name in the format`x.y.z`. + ```java: build.gradle + repositories { + mavenCentral() + } + + dependencies { + implementation 'com.razorpay:checkout:1.6.40' + } + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> From version 1.6.40 onwards, the latest version is automatically updated, eliminating the need for manual updates. +> + + + + +### 5. How can I update the Razorpay Android Standard SDK version? + + To update the Standard Android SDK, follow these steps: + 1. Check the [latest SDK version](https://mvnrepository.com/artifact/com.razorpay/checkout). + 2. In the app-level gradle build file, update the SDK version to the latest release. + ```java: Update SDK + dependencies { + // … other dependencies + // For Razorpay checkout SDK + implementation ‘com.razorpay:checkout:’ + // … other dependencies + + } + 3. After updating, sync gradle and check for any compile-time errors. + 4. Ensure all changes are correctly integrated and the application functions as expected. + + +> **INFO** +> +> +> **Handy Tips** +> +> From version 1.6.40 onwards, the latest version is automatically updated, eliminating the need for manual updates. +> + + + + +### 6. I am trying to integrate Razorpay SDK for Android 12. However, the following error message is displayed, **Receiver not registered " error from checkoutActivity. While trying UPI" implementation 'com.razorpay:checkout:1.6.13**. How to resolve this? + + Add the code given below in your Android Manifest.xml file: + ```java: + + + + + + + + + + + + + ``` + + +> **INFO** +> +> +> +> **Handy Tips** +> +> You do not need to add this code to your integration if using SDK version 1.6.17 and above. +> + + + + +### 7. Can I enable UPI Intent on my Android or iOS app? + + Yes, you can enable UPI Intent on your [Android](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-android.md) or [iOS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-ios.md) app. + + + +### 8. How can I accept payments on my Android or iOS apps without integrating with the native SDKs? + + If you want to accept payments on your Android or iOS apps without integrating with our native SDKs, you can reuse your Standard Integration code. This approach opens the checkout form in a WebView within your mobile app. Know more about [Webview for Mobile Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview.md). diff --git a/llm-content/payments/payment-gateway/callback-url.md b/llm-content/payments/payment-gateway/callback-url.md new file mode 100644 index 00000000..5c323b25 --- /dev/null +++ b/llm-content/payments/payment-gateway/callback-url.md @@ -0,0 +1,55 @@ +--- +title: Callback URL +description: Reuse the web integration to process the payments. +--- + +# Callback URL + +If you reuse your web integration of Razorpay Checkout inside a web view on Android or iOS, the checkout form may not open. Issues like this are handled in our [Android SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard.md) and [iOS SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard.md), with the SDKs being the preferred method of integration. + +However, if you want to reuse the web integration for some reason, you can pass the following `callback_url` along with other [checkout options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#123-checkout-options) to process the desired payment: + +```JavaScript: JavaScript +var options = { + ... // existing options + callback_url: 'https://your-server/callback_url', + redirect: true +} +``` + +`callback_url` needs to accept incoming `POST` requests. For a successful payment, the callback URL will have `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` as the request parameters. + +For failed payments, the request parameter are explained in the table below: + +`error` +: `object` The error object. + + `code` + : `string` Type of the error. + + `description` + : `string` Descriptive text about the error. + + `field` + : `string` Name of the parameter in the API request that caused the error. + +> **INFO** +> +> +> **Handy Tips** +> +> You can set query parameters with `callback_url`, to map it with entities at your side. For example, following is a valid callback URL: https://your-site.com/callback?cart_id=12345 +> + +## FAQs + + +### 1. Is the handler function not supported in WebView? + + The handler function is not supported in WebView environments due to the inherent limitations of WebView in executing certain JavaScript functions. + + + +### 2. What are all the field names posted to the callback page, and can I add custom fields? + + Razorpay posts only three fields to the callback page: `razorpay_payment_id`, `razorpay_order_id`, and `razorpay_signature`. Custom fields cannot be added to the callback response. diff --git a/llm-content/payments/payment-gateway/capacitor-integration.md b/llm-content/payments/payment-gateway/capacitor-integration.md new file mode 100644 index 00000000..55000660 --- /dev/null +++ b/llm-content/payments/payment-gateway/capacitor-integration.md @@ -0,0 +1,44 @@ +--- +title: Prerequisites | Razorpay Capacitor Standard SDK +heading: Prerequisites +description: Check the prerequisites before you integrate with Razorpay Capacitor Standard SDK. +--- + +# Prerequisites + +- **Capacitor Standard SDK Changelog**: Discover new features, updates and deprecations related to the Razorpay Capacitor Standard SDK (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about Capacitor Standard integration. + +You can use Razorpay Standard SDK to integrate the Razorpay Payment Gateway with your Capacitor Application to accept payments. The Razorpay Capacitor plugin acts as a wrapper around our native Android and iOS SDKs. + +> **SUCCESS** +> +> +> **Update SDK** +> +> Check your [current SDK version](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/capacitor-integration/troubleshooting-faqs.md#6-how-can-i-check-the-razorpay-capacitor). If it is outdated, please [update the SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/capacitor-integration/troubleshooting-faqs.md#7-how-can-i-update-the-razorpay-capacitor) to ensure uninterrupted settlements of your funds. +> + +## Integration Steps + +**Before you proceed:** + + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +Follow these integration steps: + + - **1. Build Integration**: Integrate Capacitor Standard SDK. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + + - **Sample Code**: Check the sample code on GitHub to integrate. + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/capacitor-integration/integration-steps.md b/llm-content/payments/payment-gateway/capacitor-integration/integration-steps.md new file mode 100644 index 00000000..edf34a6c --- /dev/null +++ b/llm-content/payments/payment-gateway/capacitor-integration/integration-steps.md @@ -0,0 +1,1095 @@ +--- +title: Capacitor SDK - Integration Steps | Razorpay Payment Gateway +heading: Integration Steps +description: Steps to integrate the Capacitor application with Razorpay Payment Gateway. +--- + +# Integration Steps + +Follow these steps to integrate your Capacitor application: + + - **1. Build Integration**: Integrate Capacitor Standard Checkout. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/fthj02JPZhs] + +> **WARN** +> +> +> **Watch Out!** +> +> If you use M1 MacBook, you need to make [these changes](#16-verify-payment-signature) in your `podfile`. Add the following code inside `post_install do |installer|`: +> +> ```js: podfile +> installer.pods_project.build_configurations.each do |config| +> config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" +> end +> ``` +> + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Create an Order in Server + + **Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order using: + + + Use this endpoint to create an order using the Orders API. + + /orders + + ```curl: Curl + curl -X POST https://api.razorpay.com/v1/orders + -U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -H 'content-type:application/json' + -d '{ + "amount": 50000, + "currency": "", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230 + }' + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", ""); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + DATA = { + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } + } + client.order.create(data=DATA) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('receipt' => '123', 'amount' => 50000, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + ```csharp: .NET + RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.add("receipt", "order_rcptid_11"); + options.add("currency", ""); + Order order = client.Order.Create(options); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + options = amount: 50000, currency: '', receipt: '' + order = Razorpay::Order.create + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "", + receipt: "receipt#1", + notes: { + key1: "value3", + key2: "value2" + } + }) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "", + "receipt": "some_receipt_id" + } + body, err := client.Order.Create(data) + ``` + + ```json: Success Response + { + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 + } + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + + You can use the Postman workspace below to create an order: + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + + You can create an order manually by integrating the API sample codes on your server. + + + + Request Parameters + + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `22225`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of ₹7,000 is to be received from the customer in two installments of #1 - ₹5,000, #2 - ₹2,000, then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + +### 1.2 Install Razorpay Capacitor Plugin + + Run the following command on your command prompt to install the plugin: + + ```yml: Install Capacitor + npm i -S https://github.com/razorpay/razorpay-capacitor.git #installs plugin that supports Capacitor 6.0 + ``` + + +> **WARN** +> +> +> **Watch Out!** +> +> We recommend you to use the latest plugin version (that works on Capacitor 6.0) as all the latest features will be made available only on this version. However, if you want to use the plugin that works on Capacitor 5.0, use the command given below: +> +> ```yml: Install Capacitor +> npm i -S https://github.com/razorpay/razorpay-capacitor.git#76fd7d6b59f631eb44e6ecebc9188b2425168beb #installs plugin that supports Capacitor 5.0 +> ``` +> +> If you want to use the plugin that works on other capacitor versions, refer to the [GitHub repository](https://github.com/razorpay/razorpay-capacitor). +> +> + + + + Proguard Rules + + If you are using Proguard for your builds, you must add the following lines to your `proguard-rules.pro` file. + + ```java: + -keepclassmembers class * { + @android.webkit.JavascriptInterface ; + } + + -keepattributes JavascriptInterface + -keepattributes *Annotation* + + -dontwarn com.razorpay.** + -keep class com.razorpay.** {*;} + + -optimizations !method/inlining/* + + -keepclasseswithmembers class * { + public void onPayment*(...); + } + ``` + + + + + + +### 1.3 Add Checkout Class in MainActivity.java (Android Only) + + Add the Checkout class to the ArrayList in the MainActivity class in `{{projectDir}}/android/src/main/MainActivity.java`. Below is the sample code: + + ```java: Add Checkout Class + import com.ionicframework.capacitor.Checkout; + + public class MainActivity extends BridgeActivity { + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + registerPlugin(Checkout.class); + } + } + ``` + + Check the [Capacitor 6.0 Official Updates](https://capacitorjs.com/docs/updating/6-0). + + + +### 1.4 Add Checkout Code + + Add the Pay button on your web page using the checkout code given below. The checkout page is displayed when the customers click the Pay button. + + + 1.4.1 Code to Add Pay Button + + Add the Checkout code to your project. Ensure that you pass the `order_id` that you received in response to the first step. + + ```js: Checkout Code + import { Checkout } from 'capacitor-razorpay'; + + @Component({ + selector: 'app-home', + templateUrl: 'home.page.html', + styleUrls: ['home.page.scss'], + }) + export class HomePage { + + constructor(private alertController: AlertController) {} + + async payWithRazorpay(){ + const options = { + key: '[YOUR_KEY_ID]', + amount: '50000', + description: 'Great offers', + image: 'https://i.imgur.com/3g7nmJC.jpg', + order_id: 'order_Cp10EhSaf7wLbS',//Order ID generated in Step 1 + currency: '', + name: 'Acme Corp', + prefill: { + email: '', + contact: '' + }, + theme: { + color: '#3399cc' + } + } + try { + let data = (await Checkout.open(options)); + console.log(data.response+"AcmeCorp"); + console.log(JSON.stringify(data)) + } catch (error) { + //it's paramount that you parse the data into a JSONObject + let errorObj = JSON.parse(error['code']) + alert(errorObj.description); + alert(errorObj.code); + + alert(errorObj.reason); + alert(errorObj.step); + alert(errorObj.source); + alert(errorObj.metadata.order_id); + alert(errorObj.metadata.payment_id); + + } + + async presentAlert(response: string){ + // let responseObj = JSON.parse(response) + console.log("message"+ response['razorpay_payment_id']); + const alert = await this.alertController.create({ + message:response['razorpay_payment_id'], + backdropDismiss: true, + }); + + await alert.present(); + } + + } + ``` + + + + + +### Checkout Options + + You must pass these parameters in Checkout to initiate the payment. + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + + + + +### 1.4.2 Enable UPI Intent on iOS *(Optional)* + + Provide your customers with a better payment experience by enabling UPI Intent on your app's Checkout form. In the UPI Intent flow: +1. Customer selects UPI as the payment method in your iOS app. A list of UPI apps supporting the intent flow is displayed. For example, PhonePe, Google Pay and Paytm. +2. Customer selects the preferred app. The UPI app opens with pre-populated payment details. +3. Customer enters their UPI PIN to complete their transactions. +4. Once the payment is successful, the customer is redirected to your app or website. + +To enable this in your iOS integration, you must make the following changes in your app's info.plist file. + +```xml: info.plist +LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + +``` + +Know more about [UPI Intent and its benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). + +### UPI Intent on Recurring Payments + +Configure and initiate a recurring payment transaction on UPI Intent: + +```swift: ViewController.swift +let options: [String:Any] = [ + "key": "YOUR_KEY_ID", + "order_id": "order_DBJOWzybfXXXX", + "customer_id": "cust_BtQNqzmBlXXXX", + "prefill": [ + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + ], + "image": "https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + "amount": 10000, // Amount should match the order amount + "currency": "INR", + "recurring": 1 // This key value pair is mandatory for Intent Recurring Payment. +] +```objectivec: ViewController.m +NSDictionary *options = @{ + @"key": @"YOUR_KEY_ID", + @"order_id": @"order_DBJOWzybfXXXX", + @"customer_id": @"cust_BtQNqzmBlXXXX", + @"prefill": @{ + @"contact": @"+919000090000", + @"email": @"gaurav.kumar@example.com" + }, + @"image": @"https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + @"amount": @(10000), // Amount should match the order amount + @"currency": @"INR", + @"recurring": @(1) // This key value pair is mandatory for Intent Recurring Payment. +}; +``` + + + + + + + + +### 1.5 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.6 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + + +### 1.7 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +## 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## 3. Go-live Checklist + +Check the go-live checklist for Razorpay Capacitor integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/payment-gateway/capacitor-integration/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/capacitor-integration/troubleshooting-faqs.md new file mode 100644 index 00000000..6a79b0cf --- /dev/null +++ b/llm-content/payments/payment-gateway/capacitor-integration/troubleshooting-faqs.md @@ -0,0 +1,69 @@ +--- +title: Payment Gateway | Capacitor Integration - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common error scenarios and find answers to frequently asked questions about Capacitor integration. +--- + +# Troubleshooting & FAQs + +### 1. What is an order id and how to generate it? + + Order creation is the primary step of the Razorpay payment flow. An Order creates when a customer clicks the pay button on your app. A corresponding order_id generates in the response. Pass this order_id to the Razorpay Checkout options added in your Capacitor app. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### 2. What is the process for raising a request for a new feature? + + To raise a request for a new feature, go to **New Issue** → **Feature Request** on our [GitHub repository](https://github.com/razorpay/razorpay-capacitor/issues/new/choose). + + + +### 3. How can I update the existing **'razorpay-pod'**? + + - Go to your project's **iOS** folder and run **'pod update'** to update all the pods. + - If you do not want to update all pods, run **'pod update razorpay-pod'**. + + + +### 4. I have integrated with the Razorpay Payment Gateway to accept payments on my mobile app. However, it gets rejected when I try to publish my app on the Apple App Store. The following message is displayed, "We noticed that your app offers a subscription with a mechanism other than the in-app purchase API." How to resolve this? + + As per Apple's policy, if you use a subscription model in your iOS app, you must use Apple's in-app purchase APIs. Apple does not redirect out of the app for digital product purchases. + + + +### 5. In the new M1 MacBook, why am I not able to compile the Capacitor Razorpay plugin for release mode? + + This is because of the new changes introduced in Xcode 12. + + To resolve this: + 1. Use [Rosetta 2](https://support.apple.com/en-us/HT211861) for launching the app on your Mac. + 2. Add the following lines to Podfile within `post_install do |installer|` . + + ```js: podfile + installer.pods_project.build_configurations.each do |config| + config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" + end + ``` + + Know more about [compilation errors](https://khushwanttanwar.medium.com/xcode-12-compilation-errors-while-running-with-ios-14-simulators-5731c91326e9). + + + +### 6. How can I check the Razorpay Capacitor Standard SDK version? + + To check the SDK version: + 1. Open your Capacitor project in your preferred code editor. + 2. Open the `package.json` file in the root directory of your project. + 3. In the `dependencies` section, look for the Razorpay entry. The version number is specified next to the package name in the format `x.y.z`. + + + +### 7. How can I update the Razorpay Capacitor Standard SDK version? + + To update the SDK version using npm, follow these steps: + + 1. Open the terminal or command prompt and navigate to your project directory where the `package.json` file resides. + 2. Use the npm update command followed by the package name to update a specific package to its latest version. For example, npm update `` (replace `` with the name of the package you want to update). + 3. If you are using a Capacitor iOS application, run `cd ios && pod repo update && pod update` to ensure the internal iOS dependencies are updated to the versions set by the Razorpay package. This is because cocoapods may not automatically update the internal trunk spec to fetch the latest versions. + 4. After running the update command, review the updates fetched by npm to ensure they do not introduce any breaking changes. + 5. Conduct thorough testing to ensure that the updated packages do not adversely affect the application functionality and commit the changes. diff --git a/llm-content/payments/payment-gateway/cordova-integration.md b/llm-content/payments/payment-gateway/cordova-integration.md new file mode 100644 index 00000000..483e24f4 --- /dev/null +++ b/llm-content/payments/payment-gateway/cordova-integration.md @@ -0,0 +1,55 @@ +--- +title: Prerequisites | Razorpay Cordova Standard SDK +heading: Prerequisites +description: Check the prerequisites before you integrate with Razorpay Cordova Standard SDK. +--- + +# Prerequisites + +- **Cordova Standard SDK Changelog**: Discover new features, updates and deprecations related to the Razorpay Cordova Standard SDK (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about Cordova Standard integration. + +You can use Razorpay Standard SDK to integrate the Razorpay Payment Gateway with your Cordova Application to accept payments. The Razorpay Cordova plugin acts as a wrapper around the Razorpay Standard SDK to build a dynamic and responsive Checkout interface for your iOS or Android application. + +> **SUCCESS** +> +> +> **Update SDK** +> +> Check your current [Cordova](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/cordova-integration/troubleshooting-faqs.md#7-how-can-i-check-the-razorpay-cordova) or [Iconic](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/cordova-integration/troubleshooting-faqs.md#8-how-can-i-check-the-razorpay-ionic) Standard SDK version. If it is outdated, please [update the SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/cordova-integration/troubleshooting-faqs.md#9-how-can-i-update-the-razorpay-cordova) to ensure uninterrupted settlements of your funds. +> + +## Guidelines + +- Add the integration code snippet after the `deviceready` event. + +- On browser, change the [Content Security Policy](https://content-security-policy.com/) to whitelist the `razorpay.com` domain. + +```js + +``` +- We do not support [ionic server](https://github.com/ionic-team/ionic-cli/issues/354) at the moment because it does not support cordova browser plugins. Try using the `ionic cordova run browser` command instead. + +## Integration Steps + +**Before you proceed:** + + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +Follow these integration steps: + + - **1. Build Integration**: Integrate Cordova Standard SDK. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + + - **Sample Code**: Check the sample code on GitHub to integrate. + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/cordova-integration/integration-steps.md b/llm-content/payments/payment-gateway/cordova-integration/integration-steps.md new file mode 100644 index 00000000..4ddcd9f6 --- /dev/null +++ b/llm-content/payments/payment-gateway/cordova-integration/integration-steps.md @@ -0,0 +1,1094 @@ +--- +title: Cordova SDK - Integration Steps | Razorpay Payment Gateway +heading: Integration Steps +description: Steps to integrate the Cordova application with Razorpay Payment Gateway. +--- + +# Integration Steps + +Follow these steps to integrate your Cordova application: + + - **1. Build Integration**: Integrate Cordova Standard Checkout. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/j9_q3QxNLZ8] + +> **INFO** +> +> +> **Handy Tips** +> +> If you use M1 MacBook, you need to make the following changes in your podfile. +> +> ```js: podfile +> installer.pods_project.build_configurations.each do |config| +> config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" +> end +> ``` +> + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Create an Order in Server + + **Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order using: + + + Use this endpoint to create an order using the Orders API. + + /orders + + ```curl: Curl + curl -X POST https://api.razorpay.com/v1/orders + -U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -H 'content-type:application/json' + -d '{ + "amount": 50000, + "currency": "", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230 + }' + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", ""); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + DATA = { + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } + } + client.order.create(data=DATA) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('receipt' => '123', 'amount' => 50000, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + ```csharp: .NET + RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.add("receipt", "order_rcptid_11"); + options.add("currency", ""); + Order order = client.Order.Create(options); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + options = amount: 50000, currency: '', receipt: '' + order = Razorpay::Order.create + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "", + receipt: "receipt#1", + notes: { + key1: "value3", + key2: "value2" + } + }) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "", + "receipt": "some_receipt_id" + } + body, err := client.Order.Create(data) + ``` + + ```json: Success Response + { + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 + } + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + + You can use the Postman workspace below to create an order: + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + + You can create an order manually by integrating the API sample codes on your server. + + + + Request Parameters + + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `22225`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of ₹7,000 is to be received from the customer in two installments of #1 - ₹5,000, #2 - ₹2,000, then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + +### 1.2 Install Razorpay Cordova plugin + + +> **INFO** +> +> +> **Handy Tips** +> +> Starting from 1.4.14, the cordova project is now available at [npmjs](https://www.npmjs.com/package/com.razorpay.cordova). Use the code given below to install: +`ionic cordova plugin add com.razorpay.cordova`. +> + + In your Cordova project folder, run this command to install the plugin: + + ```html: Cordova + cd your-project-folder + cordova platform add android # optional + cordova platform add ios # make sure your ios version is ios@5 or latest. + cordova platform add browser # optional + cordova plugin add https://github.com/razorpay/razorpay-cordova.git --save + ```html: Ionic + cd your-project-folder + ionic cordova platform add ios + ionic cordova platform add android + ionic cordova platform add browser + ionic cordova plugin add https://github.com/razorpay/razorpay-cordova.git --save + ``` + + + +### 1.3 Add Checkout Code + + Add the Pay button on your web page using the checkout code given below. The checkout page is displayed when the customers click the Pay button. + + + 1.3.1 Ionic Integration (For Ionic Users Only) + + 1. In your app's `home.page.html` file, add the following code. This code generates a button that your customer will click to open the Checkout and make the payment. + + ```html: Add Button + + Pay With Razorpay + + ``` + 2. In your app's `home.page.ts` file, import RazorpayCheckout as shown: + + ```js: Import RazorpayCheckout + declare var RazorpayCheckout:any; + ``` + 3. Add the [Checkout code](#131-code-to-add-pay-button) along with the `order_id` generated in the first step. Add the API key generated by you on the Dashboard. + + + + + +### 1.3.2 Code to Add Pay Button + + Add the code given below: + + ```js: Cordova + var rzpOptions = { + key: "", + amount: "50000", + currency: "", + email: "" + }, + notes: { + address: "Hello World" + }, + theme: { + color: "#3399cc" + } + }; + + var successCallback = function(success) { + alert('payment_id: ' + success.razorpay_payment_id) + var orderId = success.razorpay_order_id + var signature = success.razorpay_signature + }; + + var cancelCallback = function(error) { + alert(error.description + ' (Error '+error.code+')') + alert(error.source); + alert(error.step); + alert(error.reason); + alert(error.metadata.order_id); + alert(error.metadata.payment_id); + }; + ```js: Ionic + payWithRazorpay(){ + var options = { + description: 'Credits towards consultation', + image: 'https://i.imgur.com/3g7nmJC.jpg', + order_id: 'order_DBJOWzybf0sJbb', + currency: '', + key:'', + amount:'5000', + name: 'Acme Corp', + theme: { + color: '#3399cc' + } + } + var successCallback = function(success) { + alert('payment_id: ' + success.razorpay_payment_id) + var orderId = success.razorpay_order_id + var signature = success.razorpay_signature + } + var cancelCallback = function(error) { + alert(error.description + ' (Error '+error.code+')') + alert(error.source); + alert(error.step); + alert(error.reason); + alert(error.metadata.order_id); + alert(error.metadata.payment_id); + } + RazorpayCheckout.on('payment.success', successCallback) + RazorpayCheckout.on('payment.cancel', cancelCallback) + RazorpayCheckout.open(options) + } + ``` + + + + + +### Checkout Options + + You must pass these parameters in Checkout to initiate the payment. + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + + + + +### 1.3.3 Enable UPI Intent on iOS *(Optional)* + + Provide your customers with a better payment experience by enabling UPI Intent on your app's Checkout form. In the UPI Intent flow: +1. Customer selects UPI as the payment method in your iOS app. A list of UPI apps supporting the intent flow is displayed. For example, PhonePe, Google Pay and Paytm. +2. Customer selects the preferred app. The UPI app opens with pre-populated payment details. +3. Customer enters their UPI PIN to complete their transactions. +4. Once the payment is successful, the customer is redirected to your app or website. + +To enable this in your iOS integration, you must make the following changes in your app's info.plist file. + +```xml: info.plist +LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + +``` + +Know more about [UPI Intent and its benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). + +### UPI Intent on Recurring Payments + +Configure and initiate a recurring payment transaction on UPI Intent: + +```swift: ViewController.swift +let options: [String:Any] = [ + "key": "YOUR_KEY_ID", + "order_id": "order_DBJOWzybfXXXX", + "customer_id": "cust_BtQNqzmBlXXXX", + "prefill": [ + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + ], + "image": "https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + "amount": 10000, // Amount should match the order amount + "currency": "INR", + "recurring": 1 // This key value pair is mandatory for Intent Recurring Payment. +] +```objectivec: ViewController.m +NSDictionary *options = @{ + @"key": @"YOUR_KEY_ID", + @"order_id": @"order_DBJOWzybfXXXX", + @"customer_id": @"cust_BtQNqzmBlXXXX", + @"prefill": @{ + @"contact": @"+919000090000", + @"email": @"gaurav.kumar@example.com" + }, + @"image": @"https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + @"amount": @(10000), // Amount should match the order amount + @"currency": @"INR", + @"recurring": @(1) // This key value pair is mandatory for Intent Recurring Payment. +}; +``` + + + + + + + + +### 1.4 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.5 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + + +### 1.6 Android Lifecycle Guide + + It is recommended that you read the [Android Lifecycle Guide](https://cordova.apache.org/docs/en/latest/guide/platforms/android/#lifecycle-guide) before proceeding with this section. + + Since our plugin launches a new activity on Android, the Cordova activity goes in the background and might get destroyed by the Android System. + + To make sure the payment result is delivered after the activity is recreated, use the following code: + + ```java + // You need to register an event listener for the `resume` event + document.addEventListener('resume', onResume, false); + var onResume = function(event) { + // Re-register the payment success and cancel callbacks + RazorpayCheckout.on('payment.success', successCallback) + RazorpayCheckout.on('payment.cancel', cancelCallback) + // Pass on the event to RazorpayCheckout + RazorpayCheckout.onResume(event); + }; + ``` + + + +### 1.7 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +## 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## 3. Go-live Checklist + +Check the go-live checklist for Razorpay Cordova integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/payment-gateway/cordova-integration/payment-methods/integration-tpv.md b/llm-content/payments/payment-gateway/cordova-integration/payment-methods/integration-tpv.md new file mode 100644 index 00000000..78ac2507 --- /dev/null +++ b/llm-content/payments/payment-gateway/cordova-integration/payment-methods/integration-tpv.md @@ -0,0 +1,735 @@ +--- +title: Integrate Turbo UPI TPV +description: Steps to integrate Turbo UPI TPV with your Cordova app. Know how Razorpay performs Third-Party Validation (TPV) of investor bank accounts in real-time using Razorpay Turbo UPI. +--- + +# Integrate Turbo UPI TPV + +Third-party validation (TPV) of bank accounts is mandatory for businesses in the BFSI (Banking, Financial Services and Insurance) sector dealing with Securities, Broking and Mutual Funds. You can accept customer payments by integrating with the Turbo UPI - TPV SDK. + + +### Prerequisites + + 1. Integrate with [Razorpay Cordova Standard SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/cordova-integration.md). + + 2. Import the following frameworks: + - Razorpay Cordova Standard SDK + - Razorpay Turbo Wrapper Plugin SDK (maven) + - Razorpay Turbo Core SDK + - Razorpay Turbo UI SDK + - Razorpay SecureComponent SDK + - Bank SDK + + 3. Enable data binding in your `app.gradle`. + + ```json: Data binding + { + "android": { + // Containing other settings + "buildFeatures": { + "dataBinding": true + } + } + } + ``` + +> **WARN** +> +> +> +> **Watch Out!** +> +> - API Key Usage for Different Environments: +> - Use the `rzp_test_0wFRWIZnH65uny` API key id for testing on the UAT environment. +> - Use the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. +> - As a compliance requirement, you should get approval from Google for **READ_SMS** permission. Refer [to the Google article](https://support.google.com/googleplay/android-developer/answer/10208820?hl=en) for more details. +> + + + +## 1. Integration Steps + +Given below are the steps: + + +### Step 1: Whitelist Customer Bank Accounts *(Optional)* + + You can whitelist (also known as allowlist) your customer's bank accounts to ensure that only those accounts are considered during customer onboarding. By whitelisting the accounts at the start, you can avoid the bank account linking during payment. Use the Customer APIs to create customers and add their bank account details. + + For example, if a customer, Gaurav, has two bank accounts ABC and XYZ, you can use the APIs to create a customer id and link the bank accounts to that id. You can then pass this customer id at the time of payment. + + Follow these steps. + + + Step 1.1: Create a Customer + + Use this endpoint to create or add a customer with basic details such as name and contact details. + + ```cURL: Request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "Gaurav Kumar", + "contact": "9123456780", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + }' + + ```json: Success Response + { + "id" : "cust_1Aa00000000004", + "entity": "customer", + "name" : "Gaurav Kumar", + "email" : "gaurav.kumar@example.com", + "contact" : "9123456780", + "gstin": null, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at ": 1234567890 + } + + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } + } + ``` + + + + Request Parameters + + +`name` _optional_ +: `string` Customer's name. Alphanumeric value with period (.), apostrophe ('), forward slash (/), at (@) and parentheses are allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact ` _optional_ +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email ` _optional_ +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`fail_existing` _optional_ +: `string` Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + +`gstin` _optional_ +: `string` Customer's GST number, if available. For example, `29XAbbA4369J1PA`. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + + +### Response Parameters + + +`id` +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`name` +: `string` Customer's name. Alphanumeric, with period (.), apostrophe ('), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact` +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email` +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`gstin` +: `string` GST number linked to the customer. For example, `29XAbbA4369J1PA`. + +`notes` +: `json object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + + + + + + + +### Step 1.2: Add Customer's Bank Account + + The following endpoint adds the customer's bank accounts. + + ```cURL: Request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers/:customer_id/bank_account \ + -H "Content-Type: application/json" \ + -d '{ + "ifsc_code": "UTIB0000194", + "account_number": "11214311215411", + "beneficiary_name": "Gaurav", + "beneficiary_address1": "address 1", + "beneficiary_address2": "address 2", + "beneficiary_address3": "address 3", + "beneficiary_address4": "address 4", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9900990099", + "beneficiary_city": "Bangalore", + "beneficiary_state": "KA", + "beneficiary_country": "IN" + }' + + ```json: Response + { + "id": "ba_LSZht1Cm7xFTwF", + "entity": "bank_account", + "ifsc": "ICIC0001207", + "bank_name": "ICICI Bank", + "name": "Gaurav Kumar", + "notes": [], + "account_number": "XXXXXXXXXXXXXXX0434" + } + ``` + + + + Path Parameter + +`customer_id` _mandatory_ +: `string` Customer id of the customer whose bank account is to be added. + + + +### Request Parameters + + +`account_number` _mandatory_ +: `string` Customer's bank account number. For example, `11214311215411`. + +`beneficiary_name` _mandatory_ +: `string` The name of the beneficiary associated with the bank account. + +`beneficiary_address1` _optional_ +: `string` The virtual payment address. + +`beneficiary_email` _optional_ +: `string` Email address of the beneficiary. For example, `gaurav.kumar@example.com`. + +`beneficiary_mobile` _optional_ +: `string` Mobile number of the beneficiary. + +`beneficiary_city` _optional_ +: `string` The city of the beneficiary. + +`beneficiary_state` _optional_ +: `string` The state of the beneficiary. + +`beneficiary_country` _optional_ +: `string` The country of the beneficiary. + +`beneficiary_pin` _optional_ +: `integer` The pin code of the beneficiary's address. + +`ifsc_code` _mandatory_ +: `string` The IFSC of the bank branch associated with the account. + + + +### Response Parameters + +`bank_accounts` +: `array` An array containing bank account details. + +`id` +: `string` Unique identifier of the bank account. + +`entity` +: `string` The type of entity, which in this case is `bank_account`. + +`ifsc` +: `string` The IFSC of the bank branch associated with the account. + +`bank_name` +: `string` The name of the bank. + +`name` +: `string` The name associated with the bank account. + +`notes` +: `object` Set of key-value pairs that can be used to store additional information about the payment. + +`account_number` +: `string` Customer's bank account number. For example, `11214311215411`. + + + + + + + + + + +### Step 2: Create an Order *(Mandatory)* + + Pass the investor bank account details to the `bank_account` array of the Orders API. Given below is the sample code when the `method` is `upi`. + + ```curl: Request + curl -u : \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 500, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }' + + ```json: Response + { + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 500, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 + } + ``` + + + Request Parameters + + `amount` _mandatory_ +: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, the value of this field should be `100`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. You can create orders in **INR** only. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`method` _mandatory_ +: `string` The payment method used to make the payment. If this parameter is not passed, investors will be able to make payments using both netbanking and UPI payment methods. Possible values: + - `netbanking`: Investors can make payments only using netbanking. + - `card`: Investors can make payments using debit card. + - `upi`: Investors can make payments only using UPI. + +`bank_account` _mandatory_ +: `object` Details of the bank account that the investor has provided at the time of registration. + + `account_number` _mandatory_ + : `string` The bank account number from which the investor should make the payment. For example, `765432123456789` Payments will not be processed for an incorrect account number. + + `name` _mandatory_ + : `string` The name linked to the bank account. For example, `Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` The bank IFSC. For example, `HDFC0000053`. + + + +### Response Parameters + + `id` +: `string` Unique identifier of the order. + +`entity` +: `string` Indicates the type of entity. Here, it is `order`. + +`amount` +: `integer` The order amount represented in the smallest unit of the currency passed. For example, amount = 100 translates to 100 paise, that is ₹1 (default currency is INR). + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we support INR only. + +`receipt` +: `string` A unique identifier of the order entered by the user. For example, `BILL13375649`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, "note_key": "Beam me up Scotty”. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`offer_id` +: `string` Unique identifier of the offer. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + + + + + + + + +### Step 3: Turbo UPI SDK Action + + You need to link the customer's UPI account with your app. Use the code samples given below to [fetch the UPI account](#32-link-new-upi-account). + + + + 3.1 Initialise the SDK + + + Use the code given below to initialise the SDK. + + ```java: Initialise + RazorpayCheckout.initUpiTurbo("rzp_test_0wFRWIZnH65uny") + ``` + + + +### 3.2 Link New UPI Account + + + Use the following code to link the newly created UPI account with your app. This function can be called from anywhere in the application, providing multiple entry points for customers to link their UPI account with your app. + + ```js: Link New UPI Account + RazorpayCheckout.upiTurbo.linkNewUpiAccount("mobileNo", "color", function (upiAccounts) { + // handle data + }, function(error) { + // handle error + }); + ``` + + + + Request Parameters + + +`mobileNo` _mandatory_ +: `string` Mobile number of the customer. + +`color` _optional_ +: `string` Colour in HEX format. + + + +### Response Parameters + + + Parameters | Description + --- + `function(upiAccounts)` | This function is triggered if the list is fetched successfully. The `upiAccounts` can be empty to indicate that no accounts have been linked yet. + --- + `function(error)` | This function is triggered in case of an error, and the error object will be received. + + + + + + - Handle payment failure responses, displaying important details such as error codes, error descriptions, and metadata. This function is responsible for handling and logging information in case of a payment error. + + ```js: Payment Failure Response Handling + var cancelCallback = function(error) { + /** + * error contains two values: + * 1. Error Code + * 2. Error Description + **/ + + // handle failure + }; + ``` + + - Handle successful payment responses, displaying key information like order id, payment id, and signature. This code manages and logs details when a payment transaction is successful. + + ```js: Payment Success Response Handling + var successCallback = function(response) { + /** + * response contains three values: + * 1. Order ID + * 2. Payment ID + * 3. Signature + **/ + + // handle success + }; + ``` + + + +### 3.3 Submit Method + + + To accept payments, call the `submit` method with the following payload: + + ```java: Submit Payment Details + "key": "[YOUR_KEY_ID]", + "currency": "INR", + "amount": 100, + "contact": "9000090000", + "method": "upi", + "email": "gaurav.kumar@example.com", + "upi": { + "flow": "in_app" + } + ``` + + + + Request Parameter + +`payload` _mandatory_ +: `Map` Payload for initiating the transaction. + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | This function is triggered if the list is fetched successfully. `accList` can be empty to indicate that no accounts have been linked yet. + --- + `onFailure` | This function is triggered in case an error is thrown during the retrieval process, either by the Razorpay SDK or the Bank SDK. + + + + + + + + + + +### Step 4: Handle Payment Success and Failure + + The way you handle payment success and failure scenarios depends on the Checkout sample code you opted for in the previous step. Know how to [handle payment success and failure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/standard-integration.md#step-14-handle-payment-success-and-failure). + + + +### Steps 5: Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + - You need to store these fields in your server. + - You can confirm the authenticity of these details by verifying the signature in the next step. + + ```json: Success Callback + { + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_GAWRjlWkVcRh0V", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" + } + ``` + + + + Parameters + + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by the Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by the Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + + +### Step 6: Verify Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC HEX digest as shown below: + + ```html: HMAC HEX Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + +### Non-Transactional Flow + +Razorpay provides a single exposed function that allows you to manage linked UPI accounts and access all non-transactional flows seamlessly. + +![View the non-transactional flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-non-transactional.jpg.md) + + +### Manage UPI Accounts + + The SDK manages the linked `UpiAccounts` on the application by triggering `manageUpiAccounts()`. The sequence of steps is as given below: + + - **Fetch balance**: Check the customer's account balance. + - **Change UPI PIN**: Provide the customer the ability to change their UPI PIN. + - **Reset UPI PIN**: Let your customers reset the PIN for their account. + - **Delete the account from the application**: Let your customers delink, that is, remove a selected UPI account from your application. + + ```js: Java + RazorpayCheckout.upiTurbo.manageUpiAccounts("mobileNo", "color", function(error) { + // handle error + }); + ``` + + + + Request Parameters + + +`mobileNo` _mandatory_ +: `string` Mobile number of the customer. + +`color` _optional_ +: `string` Colour in HEX format. + + + +### Response Parameter + + + Parameters | Description + --- + `function(error)` | This function is triggered in case of an error, and the error object will be received. + + + + + + + +### Models Exposed from SDKs + +Given below are the models: + + +### Error + + + + Error | Description + --- + `errorCode` | Types of error codes - `BAD_REQUEST_ERROR`: Failure from the client's end (SDK). +- `GATEWAY_ERROR`: Failure either from the Secure Component or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + `errorDescription` | Brief description of the error. + --- + `errorReason` | Specifies the specific reason for the error. + --- + `errorSource` | Indicates the origin of the error. + --- + `errorStep` | Highlights the stage where the error occurred. + + + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/cordova-integration/payment-methods/turbo-upi/error-codes.md). + + + +### UpiAccount + + + Fields | Return Type | Description + --- + `accountNumber` | String | Masked account number. + --- + `ifsc` | String | IFSC of the bank. + --- + `bankLogoUrl` | String | Image URL of the bank logo. + --- + `bankName` | String | Name of the bank. + --- + `bankPlaceholderUrl` | String | Image URL of the bank logo placeholder. + + + +## 2. Test Integration + +We recommend the following: +- Complete the integration on UAT before using the prod builds. +- Perform the UAT using the Razorpay-provided API keys. + +## 3. Go-live Checklist + +Complete these steps to take your integration live: + +- You should get your app id whitelisted by Razorpay to test on prod. + + +> **INFO** +> +> +> **Handy Tips** +> +> Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number and app whitelisted. +> + +- Import the prod library from the GitHub repository → `https://github.com/upi-turbo/android-turbo-sample-app/tree/prod/app/libs` prod branch. + +- Add Proguard rules: + + - `keepclassmembers,allowobfuscation class * { + @com.google.gson.annotations.SerializedName ; + }` + - `keepclassmembers enum * { *; }` + - `keepclassmembers class * { + @android.webkit.JavascriptInterface ; + }` + - `dontwarn com.razorpay.**` + - `keep class com.razorpay.** {*;}` + - `keep class com.olivelib.** {*;}` + - `keep class com.olive.** {*;}` + - `keep class org.apache.xml.security.** {*;}` + - `keep interface org.apache.xml.security.** {*;}` + - `keep class org.npci.** {*;}` + - `keep interface org.npci.** {*;}` + - `keep class retrofit2.** { *; }` + - `keep class okhttp3.** { *; }` + +- Replace the UAT credential with the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. diff --git a/llm-content/payments/payment-gateway/cordova-integration/payment-methods/turbo-upi.md b/llm-content/payments/payment-gateway/cordova-integration/payment-methods/turbo-upi.md new file mode 100644 index 00000000..77576340 --- /dev/null +++ b/llm-content/payments/payment-gateway/cordova-integration/payment-methods/turbo-upi.md @@ -0,0 +1,271 @@ +--- +title: Integrate with Turbo UPI +description: Steps to integrate Razorpay Turbo UPI with your app. +--- + +# Integrate with Turbo UPI + +- **Turbo UPI Cordova Standard SDK**: Discover new features, updates and deprecations related to Turbo UPI on Cordova Standard Checkout (since Jan 2024). + +With Razorpay Turbo UPI, businesses experience faster and simpler payments. It condenses the payment process from 5 steps to just 1, eliminating app redirections. Enjoy a seamless in-app payment experience, reduce dependencies on third-party UPI apps, and gain complete visibility of the payment journey. + +You can seamlessly integrate Turbo UPI with Razorpay Cordova Standard SDK. Explore the full potential of [Razorpay Turbo UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/turbo-upi.md) and know how it works. + +![Turbo UPI Standard Checkout Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-flow.jpg.md) + + +### Prerequisites + + 1. Integrate with [Razorpay Cordova Standard SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/cordova-integration.md). + + 2. Import the following frameworks: + - Razorpay Cordova Standard SDK + - Razorpay Turbo Wrapper Plugin SDK (maven) + - Razorpay Turbo Core SDK + - Razorpay Turbo UI SDK + - Razorpay SecureComponent SDK + - Bank SDK + + 3. Enable data binding in your `app.gradle`. + + ```json: Data binding + { + "android": { + // Containing other settings + "buildFeatures": { + "dataBinding": true + } + } + } + ``` + + +## Onboarding Flow + +Ensure your customers [onboard with Razorpay Turbo UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/turbo-upi.md#onboarding-flow) to get started. + +## Turbo UPI SDK Integration + +Follow these steps to integrate with Razorpay Turbo UPI: + +1. Use the code given below to initialise the SDK. + + ```java: Initialise + RazorpayCheckout.initUpiTurbo("rzp_test_0wFRWIZnH65uny") + ``` + +2. Use the following code to link the newly created UPI account with your app. This function can be called from anywhere in the application, providing multiple entry points for customers to link their UPI account with your app. + + ```js: Link New UPI Account + RazorpayCheckout.upiTurbo.linkNewUpiAccount("mobileNo", "color", function (upiAccounts) { + // handle data + }, function(error) { + // handle error + }); + ``` + + + +### Request Parameters + + `mobileNumber` _mandatory_ + : `string` Mobile number of the customer. + + `color` _optional_ + : `string` Colour in HEX format. + + + +### Response Parameters + + + Parameters | Description + --- + `function(upiAccounts)` | This function is triggered if the list is fetched successfully. The `upiAccounts` can be empty to indicate that no accounts have been linked yet. + --- + `function(error)` | This function is triggered in case of an error, and the error object will be received. + + + + + + - Handle payment failure responses, displaying important details such as error codes, error descriptions, and metadata. This function is responsible for handling and logging information in the event of a payment error. + + ```js: Payment Failure Response Handling + var cancelCallback = function(error) { + /** + * error contains two values: + * 1. Error Code + * 2. Error Description + **/ + + // handle failure + }; + ``` + + - Handle successful payment responses, displaying key information like order id, payment id, and signature. This code manages and logs details when a payment transaction is successful. + + ```js: Payment Success Response Handling + var successCallback = function(response) { + /** + * response contains three values: + * 1. Order ID + * 2. Payment ID + * 3. Signature + **/ + + // handle success + }; + ``` + +3. To accept payments, call Standard Checkout’s `submit` method with the following payload: + + ```js: Submit Payment Details + var rzpOptions = { + amount: 2000, + currency: "INR", + prefill: { + contact: "1234567890", + email: "gaurav.kumar@example.com" + }, + theme: { + color: "#063970" + }, + send_sms_hash: true, + retry: { + enabled: false, + max_count: 4 + } + }; + + RazorpayCheckout.open(rzpOptions, successCallback, cancelCallback); + ``` + + + +### Request Parameter + + `payload` _mandatory_ + : `variable` Payload for initiating transaction. + + + +### Response Parameters + + + Parameters | Description + --- + `successCallback` | It is triggered upon successful completion of the payment, providing access to a response object. + --- + `cancelCallback` | It is invoked in the event of a failure, providing access to an error object. + + + + + +### Non-Transactional Flow + +Razorpay provides a single exposed function that allows you to manage linked UPI accounts and access all non-transactional flows seamlessly. + +![View the non-transactional flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-non-transactional.jpg.md) + + +### Manage UPI Accounts + + The SDK manages the linked `UpiAccounts` on the application by triggering `manageUpiAccounts()`. The sequence of steps is as given below: + + - **Fetch balance**: Check the customer's account balance. + - **Change UPI PIN**: Provide the customer the ability to change their UPI PIN. + - **Reset UPI PIN**: Let your customers reset the PIN for their account. + - **Delete the account from the application**: Let your customers delink, that is, remove a selected UPI account from your application. + + ```js: Java + RazorpayCheckout.upiTurbo.manageUpiAccounts("mobileNo", "color", function(error) { + // handle error + }); + ``` + + + + Request Parameters + + `mobileNumber` _mandatory_ + : `string` Mobile number of the customer. + + `color` _optional_ + : `string` Colour in HEX format. + + + +### Response Parameter + + + Parameters | Description + --- + `function(error)` | This function is triggered in case of an error, and the error object will be received. + + + + + + + +### Models Exposed from the SDKs + +The SDKs given below provide access to exposed models for seamless integration. + + +### Error + + + + Error | Description + --- + `errorCode` | Types of error codes - `BAD_REQUEST_ERROR`: Failure from the client's end (SDK). +- `GATEWAY_ERROR`: Failure either from the Secure Component or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + `errorDescription` | Brief description of the error. + --- + `errorReason` | Specifies the specific reason for the error. + --- + `errorSource` | Indicates the origin of the error. + --- + `errorStep` | Highlights the stage where the error occurred. + + + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/cordova-integration/payment-methods/turbo-upi/error-codes.md). + + + + +### UpiAccount + + + Fields | Return Type | Description + --- + `accountNumber` | String | Masked account number. + --- + `ifsc` | String | IFSC of the bank. + --- + `bankLogoUrl` | String | Image URL of the bank logo. + --- + `bankName` | String | Name of the bank. + --- + `bankPlaceholderUrl` | String | Image URL of the bank logo placeholder. + + + + +### Response + + + Fields | Return Type | Description + --- + `paymentId` | String | Payment id. + --- + `orderId` | String | Order id. + --- + `signature` | String | Signature of the transaction. diff --git a/llm-content/payments/payment-gateway/cordova-integration/payment-methods/turbo-upi/error-codes.md b/llm-content/payments/payment-gateway/cordova-integration/payment-methods/turbo-upi/error-codes.md new file mode 100644 index 00000000..ac464e83 --- /dev/null +++ b/llm-content/payments/payment-gateway/cordova-integration/payment-methods/turbo-upi/error-codes.md @@ -0,0 +1,421 @@ +--- +title: Turbo UPI SDK - Error Codes | Cordova Integration +heading: Turbo UPI SDK - Error Codes +description: List of error codes for Turbo UPI SDK. +--- + +# Turbo UPI SDK - Error Codes + +Given below is the list of error codes categorised by error reasons, with relevant descriptions, source and step. + +### Bad Request Errors + +Given below is the list of Bad Request errors. + + +### bank_not_live_on_upi + + - **Description**: The selected bank is not enabled on UPI. Please try using another bank. + - **Source**: gateway + - **Step**: customer_onboarding + + + +### account_does_not_exist + + + + Payment Debit Request + + - **Description**: No accounts found for the selected bank. Please try using another bank. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Payment Credit Request + + - **Description**: Payment was unsuccessful as the receiver's bank account is not valid. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + + + + +### transaction_not_allowed + + + + Payment Debit Request + + - **Description**: Transaction not permitted to the account as per your bank policy. Please contact your bank for more details or try with another bank account. + - **Source**: customer + - **Step**: payment_debit_request + + + +### Payment Credit Request + + - **Description**: Payment not allowed as it got declined by the receiver's bank. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + + + + +### upi_pin_registration_card_expired + + - **Description**: Card used while setting UPI PIN has expired. Please use another debit card or use another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### upi_pin_registration_card_not_found + + - **Description**: Card details used while setting UPI PIN are incorrect. Please re-check and try again. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### upi_pin_registration_card_restricted + + - **Description**: Card used while setting UPI PIN has been blocked by your bank. Please reach out to your bank for more information or try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### bank_technical_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_status_request + + + +### pin_not_set + + - **Description**: Payment was unsuccessful as you have not set the UPI PIN on the app. Try using another method. + - **Source**: customer_psp + - **Step**: payment_authentication + + + +### customer_not_registered + + - **Description**: No bank account is associated with this mobile number. Please try again by adding your account. + - **Source**: gateway + - **Step**: customer_onboarding + + + +### server_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: gateway + - **Step**: payment_authentication + + + +### payment_cancelled_by_user + + - **Description**: Flow was aborted as you pressed back from the PIN screen. Please try again. + - **Source**: customer + - **Step**: payment_authorization + + +### Gateway Errors + +Given below is the list of gateway errors. + + +### incorrect_otp + + - **Description**: You have entered an incorrect OTP. Try again. + - **Source**: customer + - **Step**: customer_onboarding + + + +### otp_expired + + - **Description**: You have entered an expired OTP. Please regenerate OTP and try again. + - **Source**: customer + - **Step**: customer_onboarding + + + +### insufficient_funds + + - **Description**: Payment was unsuccessful due to insufficient funds. Kindly check your balance and try again. + - **Source**: customer + - **Step**: payment_debit_request + + + +### insufficient_funds_mandate_block + + - **Description**: Payment was unsuccessful as the amount in your account is blocked for another payment. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### otp_attempts_exceeded + + - **Description**: You have entered an incorrect OTP too many times. Try again in some time. + - **Source**: customer_psp + - **Step**: customer_onboarding + + + +### account_dormant + + - **Description**: Payment was unsuccessful as the receiver's bank account is inactive. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + +### bank_not_live_on_upi + + - **Description**: Selected bank is not available on UPI. Please try using another bank. + - **Source**: issuer_bank + - **Step**: customer_onboarding + + + +### payment_timed_out + + + + Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_response + + + +### UPI ID Not Reachable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is not reachable at this time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + + + + +### first_transaction_limit_exceeded + + - **Description**: Payment was unsuccessful as you exceeded the first-time transaction limit set by your bank. You can use another bank account or retry after 24 hours. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### transaction_limit_exceeded + + + + Limit Set By Bank Exceeded + + - **Description**: Payment was unsuccessful as you exceeded the transaction limit set by your bank. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### Daily Amount Limit Exceeded + + - **Description**: Payment was unsuccessful as you exceeded the amount limit for the day with this bank account. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + + + + + +### first_time_transaction_freeze_period + + - **Description**: Payment was unsuccessful due to the cooling period set by your bank for first-time user. Please try again after some time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### transaction_frequency_limit_exceeded + + - **Description**: Payment was unsuccessful as the number of transactions exceeds the max limit set by the bank. You can use another bank account or retry after some time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### bank_account_inactive + + + + Issuer Bank Account Inactive + + - **Description**: Payment was unsuccessful as your account is not active. Please try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Receiver Bank Account Inactive + + - **Description**: Payment was unsuccessful as the receiver's bank account is not active. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_debit_request + + + + + + +### server_error + + + + Temporary Issue - Issuer Bank + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: beneficiary_bank + - **Step**: payment_request + + + +### Temporary Issue - Beneficiary Bank + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: issuer_bank + - **Step**: payment_request + + + + + + +### invalid_ifsc + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: gateway + - **Step**: payment_authentication + + + +### upi_pin_registration_card_blocked + + - **Description**: Card used while setting UPI PIN has been blocked by your bank. Please reach out to your bank for more information or try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### bank_technical_error + + + + UPI ID Temporarily Unavailable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: payment_credit_response + + + +### Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: payment_credit_response + + + + + + +### payment_declined + + + + Declined by Bank + + - **Description**: Payment was unsuccessful as it was declined by your bank. Reach out to your bank for more details. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_debit_request + + + + + + +### pin_attempts_exceeded + + - **Description**: You have exceeded the incorrect UPI PIN attempts. You can use another bank account or retry after 24 hours. + - **Source**: customer + - **Step**: payment_authentication + + + +### incorrect_pin + + - **Description**: You have entered incorrect UPI PIN. Please try again with the correct UPI PIN. + - **Source**: customer + - **Step**: payment_authentication + + + +### linked_account_removal_failed + + - **Description**: Unable to remove the account. Please try again. + - **Source**: customer_psp + - **Step**: account_management + + + +### sms_text_not_received + + - **Description**: Something went wrong while sending SMS. Please try again. + - **Source**: gateway + - **Step**: customer_onboarding + + +### Server Errors + +Given below is the list of server errors. + + +### server_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: customer_onboarding + + + +### server_error + + - **Description**: We are facing some trouble completing your request at the moment. Please try again shortly. + - **Source**: internal + - **Step**: payment_authorization diff --git a/llm-content/payments/payment-gateway/cordova-integration/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/cordova-integration/troubleshooting-faqs.md new file mode 100644 index 00000000..43949fed --- /dev/null +++ b/llm-content/payments/payment-gateway/cordova-integration/troubleshooting-faqs.md @@ -0,0 +1,103 @@ +--- +title: Payment Gateway | Cordova Integration - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common error scenarios and find answers to frequently asked questions about Cordova Integration. +--- + +# Troubleshooting & FAQs + +### 1. What should I do if I see the following error? + + ```js: Error + dyld: Library not loaded: @rpath/libswiftCoreGraphics.dylib + Referenced from: /private/var/mobile/Containers/Bundle/Application/696F0EAD-E2A6-4C83-876F-07E3D015D167/.app/Frameworks/.framework/ + Reason: image not found + ``` + To fix the above error message: + + - Set the `Embedded Content Contains Swift Code (EMBEDDED_CONTENT_CONTAINS_SWIFT)` build setting to `YES` in your app. To know more, refer to [this Apple document](https://developer.apple.com/library/archive/qa/qa1881/_index.html). + - Ensure that you have the framework added in `Frameworks, Libraries, and Embed Content` under `Target settings` - `General`. Ensure the `Embed status` is set to 'Embed & Sign'. + + + +### 2. Is Capacitor supported in Razorpay Cordova Plugin? + + No, we do not support Capacitor in our plugin as it has its own [dependencies](https://capacitorjs.com/docs/getting-started). + + + +### 3. What is order id and how to generate it? + + Order creation is the primary step of the Razorpay payment flow. When a customer clicks the pay button on your app, an Order is created and a corresponding order_id is generated in the response. This order_id must be passed to the Razorpay Checkout options added in your Capacitor app. + Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### 4. What is the process for raising a request for a new feature? + + To raise a request for a new feature, navigate to **New Issue** → **Feature Request** on our [GitHub repository](https://github.com/razorpay/razorpay-cordova/issues/new/choose). + + + +### 5. How can I update the existing **'razorpay-pod'**? + + - Go to your project's iOS folder and run **'pod update'** to update all the pods. + + - If you do not want to update all pods, run **'pod update razorpay-pod'**. + + + +### 6. In the new M1 MacBook, why am I not able to compile the Cordova Razorpay plugin for release mode? + + This is because of the new changes introduced in Xcode 12. + + To resolve this: + 1. Use [Rosetta 2](https://support.apple.com/en-us/HT211861) for launching the app on your Mac. + 2. Add the following lines to Podfile: + + +> **INFO** +> +> +> **Handy Tips** +> +> Add the following code inside `post_install do |installer|`. +> + + ```js: podfile + installer.pods_project.build_configurations.each do |config| + config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" + end + ``` + + Know more about [compilation errors](https://khushwanttanwar.medium.com/xcode-12-compilation-errors-while-running-with-ios-14-simulators-5731c91326e9). + + + +### 7. How can I check the Razorpay Cordova Standard SDK version? + + To check the SDK version: + 1. Open your Cordova project in your preferred code editor. + 2. Navigate to the `config.xml` file in the root directory of your project. + 3. Look for the `` tag that includes the Razorpay SDK plugin. The version number is represented by `x.y.z`. + + + +### 8. How can I check the Razorpay Ionic Standard SDK version? + + To check the SDK version: + 1. Open your Ionic project in your preferred code editor. + 2. Open the `package.json` file in the root directory of your project. + 3. In the `dependencies` section, look for the Razorpay entry. The version number is specified next to the package name in the format `x.y.z`. + + + +### 9. How can I update the Razorpay Cordova and Ionic Standard SDK version? + + To update the SDK version using npm, follow these steps: + + 1. Open the terminal or command prompt and navigate to your project directory where the `package.json` file resides. + 2. Use the npm update command followed by the package name to update a specific package to its latest version. For example, npm update `` (replace `` with the name of the package you want to update). + 3. If you are using a Cordova iOS application, run `cd platforms && cd ios && pod repo update && pod update` to ensure the internal iOS dependencies are updated to the versions set by the Razorpay package. This is because cocoapods may not automatically update the internal trunk spec to fetch the latest versions. + 4. After running the update command, review the updates fetched by npm to ensure they do not introduce any breaking changes. + 5. Conduct thorough testing to ensure that the updated packages do not adversely affect the application functionality and commit the changes. diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins.md b/llm-content/payments/payment-gateway/ecommerce-plugins.md new file mode 100644 index 00000000..3ce2eda6 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins.md @@ -0,0 +1,110 @@ +--- +title: About Ecommerce Plugins +description: Check the list of Razorpay Ecommerce Plugins to integrate with the plugin of your choice and accept payments from your customers. +--- + +# About Ecommerce Plugins + +Integrate seamlessly with ecommerce platforms through our robust and secure plugins. You can accept payments via a range of payment methods like debit cards, credit cards, netbanking (supports 3D Secure), UPI and so on. + +## List of Ecommerce Plugins and Supported Platforms + +Following are the various ecommerce plugins and supported platforms: + + + + **Payment Gateway Ecommerce Plugins** provide a convenient checkout experience and expand the payment options available to businesses. + + + Plugins | Payment Gateway | Route | Subscriptions + --- + [Arastta](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/arastta.md) | ✓ | x | x + --- + [BigCommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/bigcommerce.md) | ✓ | x | x + --- + [CS-Cart](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/cs-cart.md) | ✓ | x | x + --- + [Drupal Commerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/drupal-commerce.md) | ✓ | x | x + --- + [Easy Digital Downloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/easy-digital-downloads.md) | ✓ | x | x + --- + [Gravity Forms](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/gravity-forms.md) | ✓ | x | x + --- + [ Magento](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/magento.md) | ✓ | x | ✓ + --- + [OpenCart](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/open-cart.md) | ✓ | x | ✓ + --- + [PrestaShop](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/prestashop.md) | ✓ | x | x + --- + [Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify.md) | ✓ | x | x + --- + [WHMCS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/whmcs.md) | ✓ | x | x + --- + [Wix](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/wix.md) | ✓ | x | x + --- + [WooCommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce.md) | ✓ | ✓ | ✓ + --- + [WordPress](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/wordpress.md) | ✓ | x | x + + + + **Other Ecommerce Plugins** are in-platform or native plugins, built-in features integrated directly into the e-commerce platform. + + Plugins | Payment Gateway | Route | Subscriptions + --- + [Razorpay Direct - Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/razorpay-direct-credit-card.md) | x | x | x + --- + [Shopify - Appmaker](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/shopify-appmaker.md) | x | x | x + + + +You can [build your own plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/build-your-own.md) in case the plugin you are looking for is not listed above. + +### Frequently Asked Questions + + +### 1. Does Razorpay provide integration support for all ecommerce platforms? + + Razorpay offers official plugins for the following platforms: + + - Shopify + - WooCommerce + - Wix + - Magento + - BigCommerce + - OpenCart + - PrestaShop + - WHMCS + - WordPress + - Drupal Commerce + - CS-Cart + - Arastta + - Easy Digital Downloads + - Gravity Forms + + For platforms without an official Razorpay plugin, integration support is managed by the respective platform's support team. This ensures you receive the best assistance for platform-specific requirements and configurations. + + + +### 2. I am using a platform not listed in Razorpay's plugin directory. How do I integrate Razorpay? + + For platforms without an official Razorpay plugin, you have two options: contact your platform's support team to check if they offer Razorpay integration support, or use Razorpay's APIs to [build a custom integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/build-your-own.md). + + + +### 3. Why am I seeing only a "Pay with Credit/Debit Card" option instead of the full Razorpay Checkout? + + This usually indicates malicious code (malware) injected into your website that is hijacking the checkout. To verify and fix this: + 1. Test your API keys on the Razorpay test page or set up a fresh installation of your ecommerce platform and test the integration there. If checkout loads correctly, the issue is with your current website code. + 2. Run a full malware scan on your website using security tools appropriate for your platform. + 3. Remove any suspicious or recently added plugins/extensions and check theme files for unknown JavaScript code. + 4. After cleanup, reinstall the Razorpay plugin from the official source. + + If the issue persists even after following these steps, contact our [Support team](https://razorpay.com/support/). + + +### Related Information + +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Features](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features.md) +- [Supported Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md#supported-payment-methods) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/arastta.md b/llm-content/payments/payment-gateway/ecommerce-plugins/arastta.md new file mode 100644 index 00000000..42339412 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/arastta.md @@ -0,0 +1,39 @@ +--- +title: Prerequisites | Arastta - Prerequisites +heading: Prerequisites +description: Check the prerequisites before you integrate your Arastta website with Razorpay Payment Gateway. +--- + +# Prerequisites + +- **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about the Razorpay Arastta plugin. + +**Before you proceed:** + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **Video Tutorial**: Watch the video before you start integrating the Arastta plugin with Payment Gateway + + - **Integration Steps**: Check the steps to integrate the Arastta plugin with Payment Gateway + +## Supported Products + +Razorpay Arastta Plugin is only supported on Web Standard Checkout and the following products: + +Payment Gateway | Route | Subscriptions +--- +✓ | x | x + +## Support + +- Queries: If you have any queries, raise a ticket on the Razorpay [Support Portal](https://razorpay.com/support/). +- Feature Request: If you have a feature request, create an issue on [GitHub](https://github.com/razorpay/razorpay-arastta/issues/new) + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) + +### Related Information +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/arastta/integration-steps.md b/llm-content/payments/payment-gateway/ecommerce-plugins/arastta/integration-steps.md new file mode 100644 index 00000000..9a3d4442 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/arastta/integration-steps.md @@ -0,0 +1,241 @@ +--- +title: Payment Gateway | Arastta - Integration Steps +heading: Integration Steps +description: Steps to integrate your Arastta website with Razorpay Payment Gateway. +--- + +# Integration Steps + +Follow the steps given below to integrate Razorpay Payment Gateway with your Arastta website. + + - **1. Build Integration**: Install and configure the Arastta Commerce plugin. + + - **2. Test Integration**: Test the integration by making a test payment. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/p7gDH2h3rgg?si=71SaBoJOpNxrhUK7] + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Installation + + 1. Download a ZIP of the [repository](https://github.com/razorpay/razorpay-arastta/archive/master.zip). The master branch holds the plugin for the latest Arastta version. + ![](/docs/assets/images/ecommerce-plugins-arastta-1.jpg) + + + 2. Copy all files and folders recursively to Arastta installation directory. + 3. Log in to [Arastta](https://arastta.org/). + 4. Navigate to the **Admin Panel** → **Marketplace** → **Payments** and enable the Razorpay extension. + 5. Click **Edit** next to Razorpay and complete the following actions: + 1. Add your Razorpay `[KEY_ID]` and `[KEY_SECRET]`. These can be generated from your Razorpay [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + 2. Change plugin status to **Enabled**. + 3. Click **Save** to save the plugin settings. + + +## 2. Test Integration + +After the integration is complete, a **Pay** button will appear on your web page/app. You need to click the button and make a test transaction to ensure the integration works as expected. You can start accepting actual payments from your customers once the test is successful. + +![](/docs/assets/images/arastta-pay-button.jpg) + +You can make test payments using one of the payment methods configured at the Checkout. +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API keys generated in the test mode in the Checkout code. + + +### Supported Payment Methods + + After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + + Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + + + + +### Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +## 3. Go-live Checklist + +Follow these steps before taking the integration live: + + +### Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/arastta/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/ecommerce-plugins/arastta/troubleshooting-faqs.md new file mode 100644 index 00000000..5cfe01d5 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/arastta/troubleshooting-faqs.md @@ -0,0 +1,24 @@ +--- +title: Payment Gateway | Arastta - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common errors and find answers to frequently asked questions about Arastta Ecommerce Plugin integration. +--- + +# Troubleshooting & FAQs + +### 1. What troubleshooting procedures should be carried out prior to initiating a support ticket? + + Follow the troubleshooting steps given below: + 1. Reinstall the Razorpay Arastta plugin and ensure that your system meets all the requirements mentioned [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/arastta/integration-steps.md). + 2. We recommend you to keep your Razorpay Arastta plugin up to date. You can find the latest versions [here](https://github.com/razorpay/razorpay-arastta/releases). + 3. If the issue persists after following these steps, contact our [Support team](https://razorpay.com/support/). Provide the following information while creating a ticket: + - Razorpay Arastta plugin version + - Steps to reproduce the issue (Screen recording/Screenshots) + - Error logs, if any + - Staging website credentials (login URL, login id, and password) + + + +### 2. Does the Arastta plugin support 3 or 0 decimal unit currencies? + + The Arastta plugin currently supports only currencies that use 2 decimal units. For example: USD, EUR, INR. It does not support currencies with 0 decimal (for example, JPY) or 3 decimal units (for example, BHD). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/bigcommerce.md b/llm-content/payments/payment-gateway/ecommerce-plugins/bigcommerce.md new file mode 100644 index 00000000..bb23fe7d --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/bigcommerce.md @@ -0,0 +1,29 @@ +--- +title: Prerequisites | BigCommerce - Prerequisites +heading: Prerequisites +description: Check the prerequisites before you integrate your BigCommerce website with Razorpay Payment Gateway. +--- + +# Prerequisites + +- **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about the Razorpay BigCommerce plugin. + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **Video Tutorial**: Watch the video before you start integrating the BigCommerce plugin with Payment Gateway. + + - **Integration Steps**: Check the steps to integrate the BigCommerce plugin with Payment Gateway. + +## Supported Products + +Razorpay BigCommerce Plugin is only supported on Web Standard Checkout and the following products: + +Payment Gateway | Route | Subscriptions +--- +✓ | x | x + +## Support + +If you have any queries, raise a ticket on the Razorpay [Support Portal](https://razorpay.com/support/). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/bigcommerce/faqs.md b/llm-content/payments/payment-gateway/ecommerce-plugins/bigcommerce/faqs.md new file mode 100644 index 00000000..bd9c10a8 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/bigcommerce/faqs.md @@ -0,0 +1,41 @@ +--- +title: Payment Gateway | BigCommerce - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Find answers to frequently asked questions about BigCommerce plugin. +--- + +# Troubleshooting & FAQs + +### 1. How can I verify if the plugin is installed successfully? + + On your BigCommerce Dashboard, navigate to **Channel Manager** → **Storefronts** section. + ![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bigcommerce-verify-installation.jpg.md) + + There are two ways to verify the installation: + + ### Web Pages + 1. Click **Web pages**. + 2. Ensure the **Razorpay Order Confirmation** page appears. + ![Verify installation through web pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bigcommerce-web-page.jpg.md) + + ### Scripts + 1. Click **Scripts**. + 2. Ensure the Razorpay **Header** and **Footer** scripts appear. + ![Verify installation through scripts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bigcommerce-script.jpg.md) + + + +### 2. How can I verify if webhooks are auto-configured? + + To verify if webhooks are enabled: + 1. Log in to the Razorpay Dashboard and navigate to **Account & Settings**. + 2. In the **Website and app settings** section, click **Webhooks**. + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 3. Select the relevant webhook **URL**. + 4. On the right panel, check if the status for `order.paid` and `refund.processed` is enabled. + + + +### 3. Does the BigCommerce plugin support 3 or 0 decimal unit currencies? + + The BigCommerce plugin currently supports only currencies that use 2 decimal units. For example: USD, EUR, INR. It does not support currencies with 0 decimal (for example, JPY) or 3 decimal units (for example, BHD). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/bigcommerce/integration-steps.md b/llm-content/payments/payment-gateway/ecommerce-plugins/bigcommerce/integration-steps.md new file mode 100644 index 00000000..6f89b24b --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/bigcommerce/integration-steps.md @@ -0,0 +1,262 @@ +--- +title: Payment Gateway | BigCommerce - Integration Steps +heading: Integration Steps +description: Steps to integrate your BigCommerce website with Razorpay Payment Gateway. +--- + +# Integration Steps + +Follow the steps given below to integrate Razorpay Payment Gateway with your BigCommerce website. + + - **1. Build Integration**: Install and configure the BigCommerce plugin. + + - **2. Test Integration**: Test the integration by making a test payment. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/UCH55jCpBg4] + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Installation + + Follow the steps given below to install the plugin: + 1. Log in to your [BigCommerce account](https://login.bigcommerce.com/login). + 2. Navigate to **Apps** → **Marketplace**. + ![Navigate to Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bigcommerce-apps.jpg.md) + 3. Click **BIGCOMMERCE.COM/APPS** and search for **Razorpay**. + ![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bigcommerce-marketplace.jpg.md) + 4. Click **Razorpay** and click **GET THIS APP**. + ![Install the app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bigcommerce-get-app.gif.md) + 5. Enter the **API Key ID** generated from the [Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + +> **INFO** +> +> +> **Handy Tips** +> +> To go live with the integration and start accepting real payments, generate [Live Mode API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) and replace the test key with the live key in the integration. +> + + + 6. Click **Submit**. + ![Submit detail to install the Razorpay plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bigcommerce-install1.jpg.md) + + You have successfully integrated the Razorpay Payment Gateway with your BigCommerce website. + + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Webhooks are auto-configured when you enter and submit the API key ID during the installation. You can verify if webhooks are enabled on your Razorpay Dashboard. +> - The `order.paid` and `refund.processed` events are auto-configured. You do not have to configure it on the Razorpay Dashboard. +> + + + + +## 2. Test Integration + +After the integration is complete, a **RAZORPAY PAYMENTS** button will appear on your web page/app. You need to click the button and make a test transaction to ensure that the integration is working as expected. You can start accepting actual payments from your customers once the test is successful. + +![Test the integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bigcommerce-test.gif.md) + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + + +### Supported Payment Methods + + After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + + Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + + + + +### Verify Payment Status + + You can track the payment status from the Dashboard or by polling APIs. + + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a `payment_ID` has been generated and note the status. In case of a successful payment, the status is marked as `captured`. + + ![](/docs/assets/images/testpayment.jpg) + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +## 3. Go-live Checklist + +Follow these steps before taking the integration live: + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After a payment is `authorized`, it is automatically captured and the amount is settled to your account as per the settlement schedule. Know more about [Auto-capture payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/build-your-own.md b/llm-content/payments/payment-gateway/ecommerce-plugins/build-your-own.md new file mode 100644 index 00000000..ad796574 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/build-your-own.md @@ -0,0 +1,717 @@ +--- +title: Payment Gateway | Build Your Own - Integration Steps +heading: Integration Steps +description: Build your own custom plugin to integrate Razorpay with your ecommerce website and start accepting payments. +--- + +# Integration Steps + +- **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about building a custom plugin. + +You can build a plugin that integrates Razorpay Payment Gateway with websites created using ecommerce platforms such as Spree Commerce. + +## Use Cases + +Following are some specific cases whose integration is handled on a case-by-case basis: + + +### Donations + + If the platform is used to collect donations, you cannot rely on the amount to be generated on the backend. While you will be ignoring this check, you should still be storing the Razorpay order ID and re-verifying it after payment completion. + + +> **INFO** +> +> +> **Handy Tips** +> +> We won't be able to activate all non-profits and would be considering such merchants on a case-by-case basis. +> + + + + +### WebView + + If your website is likely to be accessed mostly in the Facebook browser or via other mobile applications in a WebView, it might face certain issues. Refer to our [Callback URL documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/callback-url.md) for more details on how to handle this. + + + +### Network Connectivity Issues + + If the customer has an issue with the network connectivity, you will not know of the payment completion from your website. In such cases, you can use our [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) to get notified of all authorized payments and then you can mark them as successful at your end. + + +## Build Integration + +A to-do-list for integration is given below: + + +### 1. Clone the Razorpay Sample Application in Your Language and Test the Payment Flow. + + You can clone any of the sample applications available in our [Integrations](https://razorpay.com/integrations/) page. + + + +### 2. Integrate with Orders API on the Server Side. + + **Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + + Request Parameters + + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + #### Test Heading + +The `razorpay_order_id`, returned on successful creation of the order, should be sent to the Checkout form. Additionally, you need to send an extra key-value pair as shown: + +``` +{ + "amount": "1000", + // and other options + + "order_id": "order_CuEzONfnOI86Ab" // Order ID generated using Orders API +} +``` + +A successful payment for the Order returns `razorpay_order_id`, `razorpay_payment_id` and `razorpay_signature`, which is then used for payment verification. + + + +### 3. Display the Checkout Form on Your Website to Your Customer. + + You can display the [Standard Checkout form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md) on your website to collect payments from customers. Ensure that the `order_id` option is passed along with the other checkout options mentioned below. + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + + + +### 4. Verify the Signature Post Checkout Form Submission. + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + + +### 5. Display the Confirmation Message to the Customer. + + You must display a `payment successful` message to the customer. + + + +### 6. Mark the Platform Order as Successful. + + After verifying the signature, fetch the order in your system that corresponds to `razorpay_order_id` in your database. You can now mark this fetched order as successful and process the order. + + You can make a test payment to check whether the integration works. + + +## Common Issues Faced During Integration + +Following are some of the common issues that you must watch out for while integrating: + +1. Not storing the Razorpay order ID at your end. +1. Passing the amount from the frontend to the Razorpay order creation call. +1. Passing `USD` or any other `non-SGD` currency while creating the order. +1. Passing `razorpay_order_id` from the frontend while verifying the signature. + +Alternatively, you can use this value to check the integrity of the signature while looking up the corresponding order at your end with this Razorpay order ID and marking only that as successful. + +## Support + +If you have queries, raise a ticket on the [Razorpay Support Portal](https://razorpay.com/support/). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/build-your-own/faqs.md b/llm-content/payments/payment-gateway/ecommerce-plugins/build-your-own/faqs.md new file mode 100644 index 00000000..d8c8fe30 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/build-your-own/faqs.md @@ -0,0 +1,43 @@ +--- +title: Troubleshooting & FAQs +description: Find answers to frequently asked questions about building a custom plugin. +--- + +# Troubleshooting & FAQs + +### 1. How do I sign up for a test account? + + You can sign up for a Razorpay account from the Dashboard sign up page. You don't need to submit any documents to access test mode. All to need to do is verify your email address. + Refer to the [Set up your Razorpay Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md) page for more details. + + + +### 2. How do I find SDKs for various languages? + + We provide ready-to-use SDK packages for various languages. For a complete list of all available integrations, refer to the [Razorpay Integrations Page](https://razorpay.com/integrations/). If the language you prefer is not in the list, you can continue making the requests using CURL or HTTP package of that particular language. + + + +### 3. How to create a Razorpay API instance? + + Refer to the the README file of that particular SDK for these details. + + + +### 4. How do I find my Razorpay credentials? + + The email and password is only used to log in to the Dashboard. + To authenticate APIs, you will need to generate a `Key_ID` and `Key_Secret`. You can generate these from the **Settings** section of your Dashboard. + [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + + + +### 5. How do I find the base URL for Razorpay API? + + The current Razorpay API is versioned at v1, so all requests should be made to `https://api.razorpay.com/v1/`. + + + +### 6. How do I find sample code for my language? + + We have sample applications for many languages all of which can be found on the [Razorpay Integrations Page](https://razorpay.com/integrations/). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/cs-cart.md b/llm-content/payments/payment-gateway/ecommerce-plugins/cs-cart.md new file mode 100644 index 00000000..e89b60fc --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/cs-cart.md @@ -0,0 +1,36 @@ +--- +title: Prerequisites | CS-Cart Plugin - Prerequisites +heading: Prerequisites +description: Check the prerequisites before you integrate your CS-Cart website with Razorpay Payment Gateway. +--- + +# Prerequisites + +- **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about the Razorpay CS-Cart plugin. + +**Before you proceed:** + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **Video Tutorial**: Watch the video before you start integrating the CS-Cart plugin with Payment Gateway. + + - **Integration Steps**: Check the steps to integrate the CS-Cart plugin with Payment Gateway. + +## Supported Products + +Razorpay CS-Cart Plugin is only supported on Web Standard Checkout and the following products: + +Payment Gateway | Route | Subscriptions +--- +✓ | x | x + +## Support + +- Queries: If you have any queries, raise a ticket on the Razorpay [Support Portal](https://razorpay.com/support/). +- Feature Request: If you have a feature request, create an issue on [GitHub](https://github.com/razorpay/razorpay-cscart/issues/new). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/cs-cart/integration-steps.md b/llm-content/payments/payment-gateway/ecommerce-plugins/cs-cart/integration-steps.md new file mode 100644 index 00000000..ebde8f15 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/cs-cart/integration-steps.md @@ -0,0 +1,271 @@ +--- +title: Payment Gateway | CS-Cart - Integration Steps +heading: Integration Steps +description: Steps to integrate your CS-Cart website with Razorpay Payment Gateway. +--- + +# Integration Steps + +Follow the steps given below to integrate Razorpay Payment Gateway with your CS-Cart website. + + - **1. Build Integration**: Install and configure the CS-Cart plugin. + + - **2. Test Integration**: Test the integration by making a test payment. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/voiOPS2av6I] + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Installation + + 1. Ensure you have the latest version of CS-Cart installed. + 2. Download the latest [Source code zip file](https://github.com/razorpay/razorpay-cscart/releases) from the releases section. Unzip the repository. + 3. Run the `install.razorpay.sql` file, which can be found inside the unzipped package, against your CS-Cart database. To do this, you can either: + - Use phpMyAdmin to import the file into your CS-Cart database. + - Copy and paste the content and run it directly in your MySQL shell. + 4. Upload the rest of the plugin's contents to your CS-Cart Installation directory. + 1. The app folder's content goes into your CS-Cart Installation directory. + 2. The content of the design folder goes into the design folder in your CS-Cart Installation directory. + + + +### 1.2 Configuration + + 1. Log in to CS-Cart as administrator. + 2. Navigate to **Administration** → **Payment Methods**. + 3. Add a new payment method. + 4. Select **Razorpay** from the list and then click **Save**. Select `cc_outside.tpl` for the template. + 5. Navigate to the **Configure** tab. + 6. Add your [KEY_ID] and [KEY_SECRET] generated from the Razorpay Dashboard. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Webhook is auto-configured when you enter and save the API key ID and secret on the plugin settings page. You need to verify that webhooks are enabled on your Razorpay [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/cs-cart/troubleshooting-faqs.md#2-how-can-i-verify-if-webhooks-are). However, for versions lower than 1.4.0, you need to [manually configure webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/cs-cart/troubleshooting-faqs.md#1-my-webhooks-are-not-auto-configured-since-i). +> +> + +## 2. Test Integration + +After the integration, Razorpay is added as a payment option on your web page/app. You need to click the button and make a test transaction to ensure the integration works as expected. You can start accepting actual customer payments once the test is successful. + +![](/docs/assets/images/pg-cs-cart-plugin.jpg) + +You can make test payments using one of the payment methods configured at the Checkout. +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API keys generated in the test mode in the Checkout code. + + +### Supported Payment Methods + + After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + + Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + + + + +### Verify Payment Status + + You can track the payment status from the Dashboard or by polling APIs. + + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a `payment_ID` has been generated and note the status. In case of a successful payment, the status is marked as `captured`. + + ![](/docs/assets/images/testpayment.jpg) + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +## 3. Go-live Checklist + +Follow these steps before taking the integration live: + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/cs-cart/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/ecommerce-plugins/cs-cart/troubleshooting-faqs.md new file mode 100644 index 00000000..1c6c9924 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/cs-cart/troubleshooting-faqs.md @@ -0,0 +1,74 @@ +--- +title: Payment Gateway | CS-Cart - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common errors and find answers to frequently asked questions about CS-Cart Ecommerce Plugin integration. +--- + +# Troubleshooting & FAQs + +### 1. My Webhooks are not auto-configured since I am not using the upgraded version of CS-Cart. How do I manually configure webhooks? + + To set up webhooks: + 1. Log in to the Razorpay Dashboard and navigate to **Account & Settings**. + 2. In the **Website and app settings** section, click **Webhooks**. + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 3. Click **+ Add New Webhook**. + ![](/docs/assets/images/webhooks-webhook-creation-1.jpg) + 4. In the **Webhook Setup** pop-up page: + 5. Enter the **URL** where you want to receive the webhook payload when an event is triggered. We recommended using an HTTPS URL. + +> **INFO** +> +> +> **Handy Tips** +> +> You can set up to **10 URLs** to receive Webhook notifications. Webhooks can only be delivered to public URLs. If you attempt to save a localhost endpoint as part of a webhook setup, you will notice an error. Know more about [testing Webhooks on an application running on localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#application-running-on-localhost). +> + + 6. Enter a **Secret** for the webhook endpoint. The secret is used to validate that the webhook is from Razorpay. Do not expose the secret publicly. Know more about [how to validate webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). + +> **INFO** +> +> +> **Handy Tips** +> +> - When setting up the webhook, you will be asked to specify a secret. Using this secret, you can validate that the webhook is from Razorpay. Entering the secret is optional but recommended. The secret should never be exposed publicly. +> - The webhook secret does not need to be the merchant secret key provided by Razorpay. +> + + 7. In the **Alert Email** field, enter the email address to which the notifications should be sent in case of webhook failure. You will receive webhook deactivation notifications to this email address. + 8. Select the required events from the list of **Active Events**. + ![](/docs/assets/images/webhooks-webhook-creation-2.jpg) + 9. Click **Create Webhook**. + 10. After you set up a webhook, it appears on the list of webhooks. + + + +### 2. How can I verify if webhooks are enabled? + + To verify if webhooks are enabled: + 1. Log in to the Razorpay Dashboard and navigate to **Account & Settings**. + 2. In the **Website and app settings**, click **Webhooks**. + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 3. Select the relevant webhook **URL**. + 4. On the right panel, check if the status for `payment.authorized`, `refund.created` and `virtual_account.credited` is enabled. + ![List of webhooks created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/plugin-webhook-faq.jpg.md) + + + +### 3. What troubleshooting procedures should be carried out prior to initiating a support ticket? + + Follow the troubleshooting steps given below: + 1. Reinstall the Razorpay CS-Cart plugin and ensure that your system meets all the requirements mentioned [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/cs-cart/integration-steps.md). + 2. We recommend you to keep your Razorpay CS-Cart plugin up to date. You can find the latest versions [here](https://github.com/razorpay/razorpay-cscart/releases). + 3. If the issue persists after following these steps, contact our [Support team](https://razorpay.com/support/). Provide the following information while creating a ticket: + - Razorpay CS-Cart plugin version + - Steps to reproduce the issue (Screen recording/Screenshots) + - Error logs, if any + - Staging website credentials (login URL, login id, and password) + + + +### 4. Does the CS-Cart plugin support 3 or 0 decimal unit currencies? + + The CS-Cart plugin currently supports only currencies that use 2 decimal units. For example: USD, EUR, INR. It does not support currencies with 0 decimal (for example, JPY) or 3 decimal units (for example, BHD). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/drupal-commerce.md b/llm-content/payments/payment-gateway/ecommerce-plugins/drupal-commerce.md new file mode 100644 index 00000000..98bad135 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/drupal-commerce.md @@ -0,0 +1,37 @@ +--- +title: Prerequisites | Drupal Commerce - Prerequisites +heading: Prerequisites +description: Check the prerequisites before you integrate your Drupal Commerce website with Razorpay Payment Gateway. +--- + +# Prerequisites + +- **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about the Razorpay Drupal Commerce plugin. + +**Before you proceed:** + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +## Supported Versions + +- Drupal v10 or higher. +- Drupal commerce v2.33 or higher. +- PHP v8.10 or higher. + + - **Video Tutorial**: Watch the video before you start integrating the Drupal Commerce plugin with Payment Gateway. + + - **Integration Steps**: Check the steps to integrate the Drupal Commerce plugin with Payment Gateway. + +## Supported Products + +Razorpay Drupal Commerce Plugin is only supported on Web Standard Checkout and the following products: + +Payment Gateway | Route | Subscriptions +--- +✓ | x | x + +## Support + +If you have any queries, raise a ticket on the Razorpay [Support Portal](https://razorpay.com/support/). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/drupal-commerce/integration-steps.md b/llm-content/payments/payment-gateway/ecommerce-plugins/drupal-commerce/integration-steps.md new file mode 100644 index 00000000..fc179cee --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/drupal-commerce/integration-steps.md @@ -0,0 +1,361 @@ +--- +title: Payment Gateway | Drupal Commerce - Integration Steps +heading: Integration Steps +description: Steps to integrate your Drupal Commerce website with the Razorpay Payment Gateway. +--- + +# Integration Steps + +Follow the steps given below to integrate Razorpay Payment Gateway with your Drupal Commerce website. + + - **1. Build Integration**: Install and configure the Drupal Commerce plugin. + + - **2. Test Integration**: Test the integration by making a test payment. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/37CjF-XNT70?si=e5cWAGO70V49zRHA] + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Download and Upload Plugin + + To upload the plugin: + 1. [Download](https://github.com/razorpay/drupal_commerce_razorpay/releases) the `drupal_commerce_razorpay.zip`. + 2. Log in to your [Drupal Commerce account](https://drupal.plugin.razorpay.in/) and navigate to **Extend**. + ![Navigate to Extend on Drupal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-extend.jpg.md) + 3. Click **+ Add new module**. + 4. Add the module from **URL** or click **Choose file** and select the .zip file downloaded previously. + 5. Click **Continue**. + ![Add/upload drupal .zip file/URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-drupal-plugin1.gif.md) + + You have successfully uploaded the plugin. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Alternatively, you can skip this step and simply run `composer require 'drupal/drupal_commerce_razorpay:^1.0'` in your drupal directory to download the plugin. You can view the downloaded file in the `contrib` folder. +> + + + + +### 1.2 Install Plugin + + To install the plugin: + + 1. On your Drupal Commerce Dashboard, navigate to **Extend**. + 2. Search for **Razorpay** in the **Filter** section. + 3. Select **Commerce Razorpay** and click **Install**. + ![Install drupal plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-install-plugin.jpg.md) + + + +### 1.3 Configure Plugin + + To configure the plugin: + + 1. On your Drupal Commerce Dashboard, navigate to **Commerce**. + 2. Click **Configuration**. + ![Navigate to commerce to configure the plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-commerce-config.jpg.md) + 3. In the **Payment** section, select **Payment gateways**. + ![Configure the payment gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-config-pg.jpg.md) + 4. Click **+ Add payment gateway**. + ![Add the payment gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-config-add-pg.jpg.md) + 5. In the **Name** section, enter **Razorpay** and select **Razorpay** as the **Plugin**. + 6. Select **Test** Mode to test the integration and enter the test **Key ID** and **Secret** generated from the Razorpay [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + +> **INFO** +> +> +> **Handy Tips** +> +> To go live with the integration and start accepting real payments: +> - Select **Live** Mode. +> - Generate [Live Mode API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) and replace the test keys with the live keys in the integration. Click **Save**. +> ![Switch to live mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-live-mode.jpg.md) +> + + + 7. Select the **Payment Action** based on your requirement. Set the Payment Action to **Authorize and Capture** to auto-capture payments. If you want to capture payments manually, set the Payment Method to **Authorize**. + 8. Select **Enabled** in the **Status** section. + 9. Click **Save**. + ![Configure the Razorpay payment gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-config.gif.md) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> If you want to edit any fields, navigate to **Commerce** → **Configuration**. Select **Payment Gateway** and click **Edit**. +> + + You have successfully integrated the Razorpay Payment Gateway with your Drupal Commerce website. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Webhooks are auto-configured when you enter and submit the API key ID during the installation. You can verify if webhooks are enabled on your Razorpay Dashboard. +> - The `payment.authorized`, `payment.failed` and `refund.created` events are auto-configured. You do not have to configure it on the Razorpay Dashboard. +> + + + +## 2. Test Integration + +After the integration is complete, a payment button will appear on your web page/app. You need to click the button and make a test transaction to ensure the integration works as expected. You can start accepting actual payments from your customers once the test is successful. + +> **WARN** +> +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) in the **Configuration** section of the Drupal Commerce Dashboard. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +![Test the integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/drupal-test2.gif.md) + + +### Supported Payment Methods + + After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + + Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + + + + +### Verify Payment Status + + You can track the payment status from the Dashboard or by polling APIs. + + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a `payment_ID` has been generated and note the status. In case of a successful payment, the status is marked as `captured`. + + ![](/docs/assets/images/testpayment.jpg) + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +## 3. Go-live Checklist + +Follow these steps before taking the integration live: + + +### 3.1 Accept Live Payments + + You can perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + + +> **WARN** +> +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + + To generate API Keys in Live Mode on your Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. + 2. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. + 3. Download the keys and save them securely. + 4. On your [Drupal Commerce Dashboard](https://drupal.plugin.razorpay.in/), navigate to **Commerce**. + 5. Click **Configuration**. + ![Navigate to commerce to configure the plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-commerce-config.jpg.md) + 6. In the **Payment** section, select **Payment gateways**. + ![Configure the payment gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-config-pg.jpg.md) + 7. Click **Edit**. + ![Edit the payment gateway configurations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-edit-config.jpg.md) + 8. In the **Mode** section, select **Live**. + 9. Replace the Test Key ID and Secret with the Live Keys and accept actual payments. + ![Replace test keys with live ones](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-live-keys.jpg.md) + + + +### 3.2 Payment Capture + + After a payment is `authorized`, you must capture it to settle the amount to your bank account as per the settlement schedule. + + Follow the steps given below to set a payment action: + + 1. On the [Drupal Commerce Dashboard](https://drupal.plugin.razorpay.in/), navigate to **Commerce**. + 2. Click **Configuration**. + ![Navigate to commerce to configure the plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-commerce-config.jpg.md) + 3. In the **Payment** section, select **Payment gateways**. + ![Configure the payment gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-config-pg.jpg.md) + 4. Click **Edit**. + ![Edit the payment gateway configurations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-edit-config.jpg.md) + 5. In the **Payment Action** section, you can choose to: + ![Edit the payment capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-payment-capture.jpg.md) + 1. **Authorize and Capture**: This setting captures all authorized payments automatically. This eliminates the time and effort spent manually capturing payments. + 2. **Authorize**: Each authorized payment can also be captured individually. + 1. Once a payment is completed, navigate to **Commerce** → **Orders**. + 2. Identify the order you want to capture the payment and click **View**. + ![Identify the order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-order.jpg.md) + 3. Navigate to **Payments**. + 4. In the **Operations** section, click **Capture**. + ![Manually capture the payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-manual-capture.jpg.md) + + +#### Refunds + +To initiate refunds using the Drupal Commerce Dashboard: + +1. Log in to the [Drupal Commerce Dashboard](https://drupal.plugin.razorpay.in/). +2. After a payment is completed, navigate to **Commerce** → **Orders**. +3. Identify the order you want to initiate a refund and click **View**. + ![Identify the order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-order.jpg.md) +4. Navigate to **Payments**. +5. In the **Operations** section, click **Refund**. + ![Issue a Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-refund.jpg.md) +6. You can either issue a full refund or a partial refund. + - For a **full refund**, enter the entire payment amount. + - For a **partial refund**, enter a value lesser than the payment amount. +7. Click **Refund**. diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/drupal-commerce/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/ecommerce-plugins/drupal-commerce/troubleshooting-faqs.md new file mode 100644 index 00000000..393b858a --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/drupal-commerce/troubleshooting-faqs.md @@ -0,0 +1,50 @@ +--- +title: Payment Gateway | Drupal Commerce - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Find answers to frequently asked questions about Drupal Commerce plugin. +--- + +# Troubleshooting & FAQs + +### 1. How can I verify if webhooks are auto-configured? + + To verify if webhooks are enabled: + 1. Log in to the Razorpay Dashboard and navigate to **Account & Settings**. + 2. In the **Website and app settings** section, click **Webhooks**. + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 3. Select the relevant webhook **URL**. + 4. On the right panel, check if the status for `payment.authorized`, `payment.failed` and `refund.created` is enabled. + + + +### 2. What is the difference between an Order Id and Order Number? + + **Order Id**: When a customer clicks the pay button on your app, an Order is created and a corresponding "order_id" is generated in the response. + + **Order Number**: It simply acts like a serial number. You can search a particular order with the help of the Order Number. + +> **INFO** +> +> +> **Handy Tips** +> +> To reconcile the payments, you can verify the Order Id from the Drupal Commerce Dashboard with **Order Id** mentioned on the Razorpay Dashboard. Navigate to **Transactions** → **Orders** or **Payments** on the Razorpay Dashboard to view the **Order Id**. +> + + + + +### 3. How can I uninstall the plugin? + + Follow the step given below to uninstall the plugin: + 1. Log in to your [Drupal Commerce Dashboard](https://drupal.plugin.razorpay.in/). + 2. Navigate to **Extend** → **Uninstall**. + 3. Search for **Razorpay** in the **Filter** section. + 4. Select the check box and click **Uninstall**. + ![Uninstall Drupal plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/drupal-uninstall.jpg.md) + + + +### 4. Does the Drupal Commerce plugin support 3 or 0 decimal unit currencies? + + The Drupal Commerce plugin currently supports only currencies that use 2 decimal units. For example: USD, EUR, INR. It does not support currencies with 0 decimal (for example, JPY) or 3 decimal units (for example, BHD). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/easy-digital-downloads.md b/llm-content/payments/payment-gateway/ecommerce-plugins/easy-digital-downloads.md new file mode 100644 index 00000000..2b85d039 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/easy-digital-downloads.md @@ -0,0 +1,36 @@ +--- +title: Prerequisites | Easy Digital Downloads Plugin - Prerequisites +heading: Prerequisites +description: Check the prerequisites before you integrate your Easy Digital Downloads website with Razorpay Payment Gateway. +--- + +# Prerequisites + +- **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about the Razorpay Easy Digital Downloads plugin. + +**Before you proceed:** + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **Video Tutorial**: Watch the video before you start integrating the Easy Digital Downloads website with Payment Gateway. + + - **Integration Steps**: Check the steps to integrate the Easy Digital Downloads website with Payment Gateway. + +## Supported Products + +Razorpay Easy Digital Downloads Plugin is only supported on Web Standard Checkout and the following products: + +Payment Gateway | Route | Subscriptions +--- +✓ | x | x + +## Support + +- Queries: If you have any queries, raise a ticket on the Razorpay [Support Portal](https://razorpay.com/support/). +- Feature Request: If you have a feature request, create an issue on [GitHub](https://github.com/razorpay/razorpay-edd). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/easy-digital-downloads/integration-steps.md b/llm-content/payments/payment-gateway/ecommerce-plugins/easy-digital-downloads/integration-steps.md new file mode 100644 index 00000000..c5288a07 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/easy-digital-downloads/integration-steps.md @@ -0,0 +1,230 @@ +--- +title: Payment Gateway | Easy Digital Downloads - Integration Steps +heading: Integration Steps +description: Steps to integrate your Easy Digital Downloads website with Razorpay Payment Gateway. +--- + +# Integration Steps + +Follow the steps given below to integrate Razorpay Payment Gateway with your Easy Digital Downloads website. + + - **1. Build Integration**: Install and configure the Easy Digital Downloads plugin. + + - **2. Test Integration**: Test the integration by making a test payment. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/lsvPOgbHiV8] + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Installation and Configuration + + 1. Download and install the latest version of the Easy Digital Downloads extension from the [WordPress plugin page](https://wordpress.org/plugins/easy-digital-downloads/). + 2. Download the latest [razorpay-edd zip file](https://github.com/razorpay/razorpay-edd/releases) from the Releases section in GitHub. + 3. Unzip and upload the extension contents to your `/wp-content/plugins/` directory. + 4. Activate the extension via the WordPress **Plugins** menu. + + +> **INFO** +> +> +> **Handy Tips** +> +> If you have downloaded the extension from GitHub or elsewhere, ensure that the directory is named `edd-razorpay`. +> + + + 5. Log in to your [WordPress account](https://wordpress.com/log-in) and activate the extension in the **WordPress Plugin Manager**. + 6. Log in to your [Easy Digital Downloads account](https://easydigitaldownloads.com). + 7. Navigate to the **Settings** page and click the **Checkout/Payment Gateways** tab. + 8. Click **Razorpay** to edit the settings. + 9. Enable the Payment Method and name it Credit Card/Debit Card/Internet Banking (this will show up on the payment page your customer sees). + 10. Enter your `[KEY_ID]` and `[KEY_SECRET]`. Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Razorpay Dashboard. + 11. Click **Save** to save the changes. + + +## 2. Test Integration + +After the integration, a **Pay** button will appear on your web page/app. You need to click the button and make a test transaction to ensure the integration works as expected. You can start accepting actual customer payments once the test is successful. +![](/docs/assets/images/easy-digital-pay.jpg) + +You can make test payments using one of the payment methods configured at the Checkout. +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API keys generated in the test mode in the Checkout code. + + +### Supported Payment Methods + + After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + + Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + + + + +### Verify Payment Status + + You can track the payment status from the Dashboard or by polling APIs. + + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a `payment_ID` has been generated and note the status. In case of a successful payment, the status is marked as `captured`. + + ![](/docs/assets/images/testpayment.jpg) + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +## 3. Go-live Checklist + +Follow these steps before taking the integration live: + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/easy-digital-downloads/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/ecommerce-plugins/easy-digital-downloads/troubleshooting-faqs.md new file mode 100644 index 00000000..6d2f75a0 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/easy-digital-downloads/troubleshooting-faqs.md @@ -0,0 +1,30 @@ +--- +title: Payment Gateway | Easy Digital Downloads - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common errors and find answers to frequently asked questions about Easy Digital Downloads Plugin integration. +--- + +# Troubleshooting & FAQs + +### 1. What troubleshooting procedures should be carried out prior to initiating a support ticket? + + Follow the troubleshooting steps given below: + 1. Reinstall the Razorpay for Easy Digital Downloads plugin. + 2. We recommend you to keep your WordPress and Razorpay for Easy Digital Downloads plugins up to date. You can find the latest versions [here](https://github.com/razorpay/razorpay-edd/releases). + 3. Ensure your current theme is compatible with the Razorpay for Easy Digital Downloads plugin. If not, switch to the default WordPress theme and provide us with the name of your current theme. + + 4. If the issue persists after following these steps, contact our [Support team](https://razorpay.com/support/). Provide the following information while creating a ticket: + - WordPress version + - Easy Digital Downloads version + - Razorpay for Easy Digital Downloads plugin version + - PHP version + - WordPress theme + - Steps to reproduce the issue (Screen recording/Screenshots) + - Error logs, if any + - Staging website credentials (login URL, login id, and password) + + + +### 2. Does the Easy Digital Downloads plugin support 3 or 0 decimal unit currencies? + + The Easy Digital Downloads plugin currently supports only currencies that use 2 decimal units. For example: USD, EUR, INR. It does not support currencies with 0 decimal (for example, JPY) or 3 decimal units (for example, BHD). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/gravity-forms.md b/llm-content/payments/payment-gateway/ecommerce-plugins/gravity-forms.md new file mode 100644 index 00000000..c2a91adb --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/gravity-forms.md @@ -0,0 +1,39 @@ +--- +title: Prerequisites | Gravity Forms - Prerequisites +heading: Prerequisites +description: Check the prerequisites before you integrate your Gravity Forms website with Razorpay Payment Gateway. +--- + +# Prerequisites + +- **Gravity Forms Changelog**: Discover new features, updates and deprecations related to the Razorpay Gravity Forms plugin (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about the Razorpay Gravity Forms plugin. + +**Before you proceed:** + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Download and install the base Gravity Forms Plugin. +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **Video Tutorial**: Watch the video before you start integrating the Gravity Forms plugin with Payment Gateway. + + - **Integration Steps**: Check the steps to integrate the Gravity Forms plugin with Payment Gateway. + +## Supported Products + +Razorpay Gravity Forms Plugin is only supported on Web Standard Checkout and the following products: + +Payment Gateway | Route | Subscriptions +--- +✓ | x | x + +## Support + +- Queries: If you have any queries, raise a ticket on the Razorpay [Support Portal](https://razorpay.com/support/). +- Feature Request: If you have a feature request, create an issue on [GitHub](https://github.com/razorpay/razorpay-gravity-forms/issues/new). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/gravity-forms/integration-steps.md b/llm-content/payments/payment-gateway/ecommerce-plugins/gravity-forms/integration-steps.md new file mode 100644 index 00000000..e5d7db9e --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/gravity-forms/integration-steps.md @@ -0,0 +1,318 @@ +--- +title: Payment Gateway | Gravity Forms - Integration Steps +heading: Integration Steps +description: Steps to integrate your WordPress website using the Gravity Forms plugin. +--- + +# Integration Steps + +Follow the steps given below to integrate Razorpay Payment Gateway with your Gravity Forms website. + + - **1. Build Integration**: Install and configure the WordPress plugin. + + - **2. Test Integration**: Test the integration by making a test payment. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/89GKc3z2JEc] + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Download Razorpay Gravity Forms Plugin and Configure Settings + + Follow the steps given below: + 1. Download and install the Razorpay Gravity Forms Plugin. You can do this using either of these methods: + - [Download the latest version of the plugin from the WordPress Plugin Directory](https://github.com/razorpay/razorpay-gravity-forms/releases/latest) and add the zip file to your WordPress website's **Plugins** folder. + - Add the plugin directly on your WordPress website from the **Plugin** page. + ![add wordpress plugin on website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-gravity-forms-add-plugin-wordpress.jpg.md) + 1. On your WordPress site, activate the plugin in the **WordPress Plugin Manager**. + + ![activate plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-gravity-forms-activate-plugin.jpg.md) + + 1. Click **Settings**. + + ![open plugin settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-gravity-forms-plugin-settings.jpg.md) + + 1. Configure the following information and click **Update Settings**: + - Add in your [KEY_ID] and [KEY_SECRET] generated from the Razorpay Dashboard. + - **Payment Action**: Set this to **Authorize and Capture**. + 1. Select the currency in which the payment must be accepted. + 1. Navigate to **Forms** → **Settings**. + 2. Under **General Settings**, go to the **Currency** field and choose the relevant currency. For this example, we will select **Indian Rupee**. + ![change currency](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-gravity-forms-change-currency.jpg.md) + + + +### 1.2 Create a Gravity Form + + To create a Gravity Form: + 1. Navigate to **Forms** → **New Form** and click **Add New**. + 2. Enter the form title and description in the **Create a New Form** dialog box. + 3. Click **Create Form**. + 4. Before entering the product details, you must select whether you are selling a subscription or a product/service. Navigate to **Settings** → **Razorpay** and configure the **Razorpay Feed**. + 1. In the **Razorpay Feed** settings, click **Add New**. + 2. Add a name for the feed. For example, `Ooty Green Tea`. + 3. Select `Products and Services` as the **Transaction Type**. + 4. Click **Update Settings**. + ![select products and services](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-gravity-forms-feed-settings.jpg.md) + + 4. Click **Edit** to start adding product details: + ![](/docs/assets/images/ecommerce-plugins-gravity-forms-edit-form.jpg) + + 1. Click **Pricing Fields** and select **Product**. + ![configure gravity form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-gravity-forms-configure-form.jpg.md) + + 2. Click the form to enter the product details and click **Update**. + 1. **Field Label**: Enter the product name. For example, `Ooty Green Tea`. + 2. **Description**: Enter a description for the product. + 3. **Field Type**: Select the field type as required. + 4. **Price**: Enter the product price in INR. For example, `399.99`. + 5. **Disable Quantity Field**: Do not select this option if your customer wants to choose a quantity. + 6. **Rules**: Enable the **Required** check box to make the quantity field mandatory. + ![add product details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-gravity-forms-product-details.jpg.md) + + The form is now ready to be added to your web pages. + + + +### 1.3 Add the Form to a Webpage + + To add the form on a webpage: + 1. Click **Pages** to navigate to the relevant page. + 2. Add a block and click the form icon. + ![click form icon](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-gravity-forms-form-icon.jpg.md) + + 3. Select the form to be added to the page. + ![select form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-gravity-forms-select-form.jpg.md) + + 4. Once the form is added, you can choose to hide the form title and description. + 5. Click **Publish** or **Update**. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Webhook is auto-configured when you enter and save the API key ID and secret on the plugin settings page. You need to [verify if webhooks are enabled](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/gravity-forms/troubleshooting-faqs.md#2-how-can-i-verify-if-webhooks-are) on your Razorpay Dashboard. However, for versions lower than 1.3.2, you need to [configure webhooks manually](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/gravity-forms/troubleshooting-faqs.md#1-my-webhooks-are-not-auto-configured-since-i). +> + +## 2. Test Integration + +After the integration, Razorpay will appear as a payment option on your web page/app. You need to click the button and make a test transaction to ensure the integration works as expected. You can start accepting actual payments from your customers once the test is successful. + +![Gravity Forms](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pg-gravity-forms-plugin.jpg.md) + +You can make test payments using one of the payment methods configured at the Checkout. +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API keys generated in the test mode in the Checkout code. + + +### Supported Payment Methods + + After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + + Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + + + + +### Verify Payment Status + + You can track the payment status from the Dashboard or by polling APIs. + + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a `payment_ID` has been generated and note the status. In case of a successful payment, the status is marked as `captured`. + + ![](/docs/assets/images/testpayment.jpg) + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +## 3. Go-live Checklist + +Follow these steps before taking the integration live: + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/gravity-forms/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/ecommerce-plugins/gravity-forms/troubleshooting-faqs.md new file mode 100644 index 00000000..2a21c7c3 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/gravity-forms/troubleshooting-faqs.md @@ -0,0 +1,81 @@ +--- +title: Payment Gateway | Gravity Forms - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common errors and find answers to frequently asked questions about Gravity Forms Ecommerce Plugin integration. +--- + +# Troubleshooting & FAQs + +### 1. My Webhooks are not auto-configured since I am not using the upgraded version of Gravity Forms. How do I manually configure webhooks? + + To set up webhooks: + 1. Log in to the Razorpay Dashboard and navigate to **Account & Settings**. + 1. In the **Website and app settings** section, click **Webhooks**. + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 1. Click **+ Add New Webhook**. + ![](/docs/assets/images/webhooks-webhook-creation-1.jpg) + 1. In the **Webhook Setup** pop-up page: + 1. Enter the **URL** where you want to receive the webhook payload when an event is triggered. We recommended using an HTTPS URL. + +> **INFO** +> +> +> **Handy Tips** +> +> You can set up to **10 URLs** to receive Webhook notifications. Webhooks can only be delivered to public URLs. If you attempt to save a localhost endpoint as part of a webhook setup, you will notice an error. Know more about [testing Webhooks on an application running on localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#application-running-on-localhost). +> + + 1. Enter a **Secret** for the webhook endpoint. The secret is used to validate that the webhook is from Razorpay. Do not expose the secret publicly. Know more about [how to validate webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). + +> **INFO** +> +> +> **Handy Tips** +> +> - When setting up the webhook, you will be asked to specify a secret. Using this secret, you can validate that the webhook is from Razorpay. Entering the secret is optional but recommended. The secret should never be exposed publicly. +> - The webhook secret does not need to be the merchant secret key provided by Razorpay. +> + + 1. In the **Alert Email** field, enter the email address to which the notifications should be sent in case of webhook failure. You will receive webhook deactivation notifications to this email address. + 1. Select the required events from the list of **Active Events**. + ![](/docs/assets/images/webhooks-webhook-creation-2.jpg) + 1. Click **Create Webhook**. + 1. After you set up a webhook, it appears on the list of webhooks. + + + + +### 2. How can I verify if webhooks are enabled? + + To verify if webhooks are enabled: + 1. Log in to the Razorpay Dashboard and navigate to **Account & Settings**. + 2. In the **Website and app settings**, click **Webhooks**. + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 3. Select the relevant webhook **URL**. + 4. On the right panel, check if the status for `payment.authorized`, `refund.created` and `virtual_account.credited` is enabled. + ![List of webhooks created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/plugin-webhook-faq.jpg.md) + + + + +### 3. What troubleshooting procedures should be carried out prior to initiating a support ticket? + + Follow the troubleshooting steps given below: + 1. Reinstall the Razorpay for Gravity Forms plugin. + 2. We recommend you to keep your WordPress and Razorpay for Gravity Forms plugins up to date. You can find the latest versions [here](https://github.com/razorpay/razorpay-gravity-forms/releases). + 3. Ensure your current theme is compatible with the Razorpay for Gravity Forms plugin. If not, switch to the default WordPress theme and provide us with the name of your current theme. + 4. If the issue persists after following these steps, contact our [Support team](https://razorpay.com/support/). Provide the following information while creating a ticket: + - WordPress version + - Gravity Forms version + - Razorpay for Gravity Forms plugin version + - PHP version + - WordPress theme + - Steps to reproduce the issue (Screen recording/Screenshots) + - Error logs, if any + - Staging website credentials (login URL, login id, and password) + + + +### 4. Does the Gravity Forms plugin support 3 or 0 decimal unit currencies? + + The Gravity Forms plugin currently supports only currencies that use 2 decimal units. For example: USD, EUR, INR. It does not support currencies with 0 decimal (for example, JPY) or 3 decimal units (for example, BHD). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/magento.md b/llm-content/payments/payment-gateway/ecommerce-plugins/magento.md new file mode 100644 index 00000000..68b95080 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/magento.md @@ -0,0 +1,73 @@ +--- +title: Prerequisites | Magento Plugin - Prerequisites +heading: Prerequisites +description: Check the prerequisites before you integrate your Magento website with Razorpay Payment Gateway. +--- + +# Prerequisites + +- **Magento Changelog**: Discover new features, updates and deprecations related to the Razorpay Magento plugin (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about the Razorpay Magento plugin. + +**Before you proceed:** + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. + +We support the following versions of Magento: + +- [Magento 1.x extension](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/magento/integration-steps.md#integration-steps-for-magento-1x-extension) +- [Magento 2.x extension](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/magento/integration-steps.md#integration-steps-for-magento-2x-extension) + +Our extensions are supported on all operating systems, such as Windows, Mac OS, and Linux. + +> **INFO** +> +> +> +> **Handy Tips** +> +> As Magento 1.x is a legacy plugin, it is recommended that you use the Magento 2.x plugin. +> +> + +### Upgrade Magento Extension + +If you are an existing user, you can upgrade the Magento extension using the composer. Enter the command given below: + +```curl: Upgrade +composer update razorpay/magento +bin/magento setup:upgrade +``` + +> **WARN** +> +> +> +> **Watch Out!** +> +> If you have installed the plugin using the `code.zip` steps, you must install the [latest code.zip](https://github.com/razorpay/razorpay-magento/releases/latest) file again. +> +> + + - **Video Tutorial**: Watch the video before you start integrating the Magento plugin with Payment Gateway. + + - **Integration Steps**: Check the steps to integrate the Magento plugin with Payment Gateway. + +## Supported Products + +Razorpay Magento Plugin is only supported on Web Standard Checkout and the following products: + +Payment Gateway | Route | Subscriptions +--- +✓ | x | ✓ + +## Support + +- Queries: If you have any queries, raise a ticket on the Razorpay [Support Portal](https://razorpay.com/support/). +- Feature Request: If you have a feature request, create an issue on [GitHub](https://github.com/razorpay/razorpay-magento/issues). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/magento/integration-steps.md b/llm-content/payments/payment-gateway/ecommerce-plugins/magento/integration-steps.md new file mode 100644 index 00000000..e9bbb644 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/magento/integration-steps.md @@ -0,0 +1,498 @@ +--- +title: Payment Gateway | Magento - Integration Steps +heading: Integration Steps +description: Steps to integrate your Magento Extensions with Razorpay Payment Gateway. +--- + +# Integration Steps + +Follow the steps given below to integrate Razorpay Payment Gateway with your Magento website. + + - **1. Build Integration**: Install the Magento plugin. + + - **2. Test Integration**: Test the integration by making a test payment. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/22bvT3z1_98?si=e5cWAGO70V49zRHA] + +## 1. Build Integration + +Follow the steps given below to integrate Razorpay Payment Gateway with your Magento 1.x and 2.x Extensions. + + +### Integration Steps for Magento 1.x Extension + + + + Step 1: Download and Install via Repository + + Follow the steps given below to download and install Magento 1.x Extension. + + #### Download Repository + + 1. [Download](https://github.com/razorpay/razorpay-magento-v1/releases/latest) the `Razorpay-1.2.1.tgz` file from the latest release. + 2. If you have **Onepage Checkout (IWD or Fire Checkout)**, [download](https://github.com/razorpay/razorpay-magento-v1/releases/latest) the Source Code zip from the latest release. With Onepage Checkout you can gather the required information from the shopper and complete the checkout process quickly. When Onepage Checkout is enabled, the entire checkout process takes place on a single page. + + ### Install Repository + + You can install the repository in two ways: + + + + 1. Go to Magento Connect Manager. + 2. Go to `Direct package file upload`. + 3. Click `Choose File` and select the TGZ file from Step 1. + 4. Click `upload`. + + + 1. Unzip and open the downloaded folder. + 2. Copy the **app** folder. + 3. Paste and merge it into the Magento root folder. + 4. Copy the **js** folder. + 5. Paste and merge it into the Magento root folder. + + + + Once installed, navigate to **Configuration** and then to **Payment Gateways** and [configure the extension](#step-2-configure-magento-store-1x) to suit your needs. + + + +### Step 2: Configure Magento Store 1.x + + To configure your Magento store for Razorpay: + + 1. Log in to your [Magento store](https://business.adobe.com/products/magento/magento-commerce.html/). + 2. Click on the **System** tab and then select **Configuration** option from the drop-down list. + ![](/docs/assets/images/ecommerce-plugins-magento1.x-3.jpg) + 3. Click **Payment Methods** in the menu panel. + 4. Scroll down. Click **Razorpay** and enter your test mode `[KEY_ID]` and `[KEY_SECRET]`. + ![](/docs/assets/images/ecommerce-plugins-magento1.x-4.jpg) + 5. Select **Yes** for the **Enabled** option. + 6. Click **Save Config** button. This activates your account in the Test Mode. You can use this account to make a few test payments to ensure a successful workflow. + +> **INFO** +> +> +> **Handy Tips** +> +> In test mode, no real money is deducted from your account. +> + + + + + + + +### Integration Steps for Magento 2.x Extension + + + + + Step 1: Download and Install Extension + + You can install the extension through two ways: + + + + 1. Install the extension on your Magento store using the Composer Package Manager. Composer is an application-level package manager for the PHP programming language that provides a standard format for managing dependencies of PHP software and required libraries. + 2. Go to your installation root directory of Magento and execute the following command: + + ``` bash: Command + composer require razorpay/magento + bin/magento module:enable Razorpay_Magento + ``` + 3. You can check if the installation was successful by executing the following command in the Magento root directory. + + ``` bash: Command + bin/magento module:status + ``` + +> **INFO** +> +> +> **Handy Tips** +> +> You should see `Razorpay_Magento` in the status. It might appear on the disabled modules list. +> + + 4. Enable and deploy the Razorpay module using commands: + + ``` bash: Command + bin/magento module:enable Razorpay_Magento + bin/magento setup:di:compile + bin/magento setup:upgrade + bin/magento cache:flush + bin/magento setup:static-content:deploy + ``` + + + + **Upgrade Magento Extension** + + If you are an existing extension user, you can [upgrade](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/magento.md#upgrade-magento-extension) to the latest version using the composer. + + + + 1. Download the `code.zip` file from the [latest release](https://github.com/razorpay/razorpay-magento/releases/latest). Extract the zip. + 2. Place the `code` folder from Step 1 in your `app` folder. If you're performing an update, replace/overwrite the existing `code` folder. + 3. Enable and deploy the Razorpay module using commands: + + ``` bash: Command + bin/magento module:enable Razorpay_Magento + bin/magento setup:upgrade + ``` + 4. Install Magento cron jobs using the command: + + ``` bash: Command + bin/magento cron:install + ``` + 5. Enter the following command to compile the dependency code: + + ``` bash: Command + bin/magento setup:di:compile + ``` + 6. Enter the following command to upgrade the Razorpay Magento module from the Magento installation folder: + + ``` bash: Command + bin/magento setup:di:upgrade + ``` + 7. On the Magento Admin Dashboard, open Razorpay payment method settings and click **Save Config**. + + +> **WARN** +> +> +> **Watch Out!** +> +> If you see the message `One or more of the Cache Types are invalidated: Page Cache.` highlighted in yellow on the Admin page, go to **Cache Management** and refresh cache types. +> + + 8. Run the following command: + + ``` bash: Command + bin/magento cache:flush + ``` + + + + + +### Step 2: Configure Magento Store 2.x + + To configure your Magento store for Razorpay: + + 1. Log in to your [Magento store](https://business.adobe.com/products/magento/magento-commerce.html/). + 2. Choose **Stores** on the Admin sidebar to the left. Now go to **Settings** → **Configuration**. + ![](/docs/assets/images/plugins-magento-magento-2.x-1.jpg) + 3. In the **Configuration** page, click on **Sales** on the left and choose **Payment Methods**. + ![](/docs/assets/images/plugins-magento-magento-2.x-2.jpg) + 4. In the **Payment Methods** page, navigate to Razorpay. + ![](/docs/assets/images/plugins-magento-magento-2.x-1.jpg) + 5. Enter your test mode [KEY_ID] and [KEY_SECRET]. These can be [generated from the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + 6. Select **Yes** for the option **Enabled**. + 7. Click **Save Config**. This activates your account in the test mode. You can use this account to make a few test payments and ensure a successful workflow. + +> **INFO** +> +> +> **Handy Tips** +> +> In test mode, no real money is deducted from your account. +> + + + + +### Step 3: Set Up Webhooks + + Webhooks are triggered when certain events occur. Subscribe to webhook events to receive notification (in the form of a webhook payload) when these events occur. + + Setting up webhooks makes your integration more robust, and guards against issues arising from poor connectivity. The webhook URL is available on the plugin's settings page. You must copy it from there and use it to set up webhook on the Razorpay Dashboard. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> - If you are using Magento plugin version 3.4.1, ensure the webhook delay is set to a minimum of 300 seconds. +> - Webhook is auto-configured on Magento plugin version 3.8.1-beta and above. For versions lower than 3.8.1-beta, you should [configure webhooks manually](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/magento/integration-steps.md#step-3-set-up-webhooks). +> +> + + To set up webhooks in the Razorpay Dashboard: + 1. Log in to the Razorpay Dashboard. + 2. Navigate to **Accounts & Settings** → **Webhooks**. + 3. Click + Add New Webhook. + 4. In the Webhook Setup modal: + - Paste the URL copied from the Magento site. + +> **INFO** +> +> +> **Handy Tips** +> +> Webhooks can only be delivered to public URLs. If you attempt to save a localhost endpoint as part of a webhook set-up, you will notice an error. Please refer to the [test webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md) section for alternatives to localhost. +> + + - Enter the Secret you had provided on the Magento site. The secret is used to validate that the webhook is from Razorpay. Do not expose the secret publicly. Know more about [webhooks validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#validate-webhooks). + - In the **Alert Email field**, enter the email address to which notifications must be sent in case of webhook failure. + - Select only the `order.paid` event from the list of **Active Events**. + 5. Click **Create Webhook**. + + Know more about [webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> If the notification says Razorpay table is not set up correctly, please contact our [Support team](https://razorpay.com/support/). +> +> + + + + +### Step 4: Set Up Cron With Magento + + Setup cron with Magento to execute Razorpay cronjobs for the following actions: + + **Cancel Pending Orders** + + It will cancel the order created by Razorpay according to the timeout saved in the configuration if Cancel Pending Order is enabled. + + **Update Order to Processing** + + Accepts response from Razorpay Webhook for events `payment.authorized` and `order.paid` and updates pending order to processing. + + Install Magento cron jobs using the command: + + ``` bash: Command + bin/magento cron:install + ``` + + + + + + +## 2. Test Integration + +After the integration, a **Pay** button will appear on your web page/app. You need to click the button and make a test transaction to ensure the integration works as expected. You can start accepting actual payments from your customers once the test is successful. +![](/docs/assets/images/magento-pay.jpg) + +You can make test payments using one of the payment methods configured at the Checkout. +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API keys generated in the test mode in the Checkout code. + + +### Supported Payment Methods + + After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + + Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + + + + +### Verify Payment Status + + You can track the payment status from the Dashboard or by polling APIs. + + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a `payment_ID` has been generated and note the status. In case of a successful payment, the status is marked as `captured`. + + ![](/docs/assets/images/testpayment.jpg) + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +## 3. Go-live Checklist + +Follow these steps before taking the integration live: + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/magento/troubleshooting.md b/llm-content/payments/payment-gateway/ecommerce-plugins/magento/troubleshooting.md new file mode 100644 index 00000000..452254ea --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/magento/troubleshooting.md @@ -0,0 +1,152 @@ +--- +title: Troubleshooting & FAQs +description: Know how to troubleshoot some of the common error messages and find answers to frequently asked questions for Magento extensions. +--- + +# Troubleshooting & FAQs + +Know how to troubleshoot some of the common error messages for Magento 1.x and 2.x extensions. + +## Troubleshooting for Magento 1.x Extension + +Below are some common error messages and the possible reasons and fixes: + +Error | Cause | Fix +--- +Bad request error | The API keys ([KEY_ID] and [KEY_SECRET]) are not configured correctly.| Make sure that the API Keys are active and entered correctly on the Magento Settings page. +--- +Bad request error | You might be using a custom checkout theme like IWD and Firecheckout.| Make sure that you are using the GitHub/master branch. +--- +cURL error | You do not have PHP-cURL installed on your server. | Ensure that you have PHP-cURL installed on your server. +--- +cURL error | Port 443 is blocked. | Contact your hosting service to unblock the port. + +## Troubleshooting for Magento 2.x Extension + +Below are some common error messages and the possible reasons and fixes: + +Error [columWidth="50"] | Cause | Fix +--- +Bad request error | The API Keys ([KEY_ID] and [KEY_SECRET]) are not configured correctly.| Make sure that the API Keys are active and entered correctly on the Magento Settings page. +--- +Bad request error | You may be using a custom checkout theme like IWD and Firecheckout. | Make sure that you are using the GitHub/master branch. +--- +cURL error | You do not have PHP-cURL installed on your server. | Ensure that you have PHP-cURL installed on your server. +--- +cURL error | Port 443 is blocked. | Contact your hosting service to unblock the port. +--- +Undefined index: Razorpay in /app/code/Razorpay/Magento/ Observer/AfterConfigSaveObserver.php | This issue is due to an error in module compilation. | Run `run bin/magento setup:di:compile` to recompile. +--- +The following modules are outdated: +• Razorpay_Magento schema: Current Version - None, Required Version - 3.6.2 +• Razorpay_Magento data: Current Version - None, Required Version - 3.6.2 | The Razorpay Magento plugin version is outdated. | [Download](https://github.com/razorpay/razorpay-magento) and install the latest Razorpay Magento Plugin. +--- +Column not found: 1054 Unknown column "'main_table.rzp_webhook_notified_at' in 'field list', query was: SELECT main_table.entity_id, main_table.rzp_webhook_notified_at FROM sales_order AS main_table." | The Razorpay Magento plugin version is outdated. | Make sure that you update the plugin to the latest version. + +## FAQs + + +### 1. What troubleshooting procedures should be carried out prior to initiating a support ticket? + + Follow the troubleshooting steps given below: + 1. Ensure that your system meets all the requirements mentioned [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/magento.md). + 2. We recommend you to keep your Magento and Razorpay plugins up to date. You can find the latest versions [here](https://github.com/razorpay/razorpay-magento/releases). + 3. If the issue persists after following these steps, contact our [Support team](https://razorpay.com/support/). Provide the following information while creating a ticket: + - Magento version (1.x/2.x) + - Razorpay Magento plugin version + - PHP version + - Steps to reproduce the issue (Screen recording/Screenshots) + - Error logs, if any + - Magento staging website credentials (login URL, login id, and password) + - SSH/FTP access to the staging server + + + +### 2. Is PWA (Progressive Web Apps) supported for Magento Plugin? + + Yes, Magento Plugin supports Progressive Web Apps (PWA) through GraphQL. + + + +### 3. If you initiate a refund on the Razorpay Dashboard, will the same status reflect on the Magento Dashboard? + + Initiating a refund on the Razorpay Dashboard does not automatically update the status on Magento. The refund process is typically managed through the Magento Dashboard. The status changes made on the Magento Dashboard are then reflected on the Razorpay Dashboard. + + + +### 4. How can I create a Custom Order Status in Razorpay Magento? + + Below are the steps to create a Custom Order Status in Razorpay Magento: + + **Step 1: Create a customer order status.** + 1. Go to **Stores** → **Order Status** (under Settings) on the Magento Admin Dashboard. + ![Magento Admin Dashboard order status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magento-order-status-new.jpg.md) + 2. On **Order Status** page, click **Create New Status**. + ![Magento Create new status on Admin Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magento-create-new-status-new.jpg.md) + 3. On the **Create New Order Status** page: + - Insert a **Status Code** under the **Order Status Information** section for internal reference. + + +> **INFO** +> +> +> **Handy Tips** +> +> This field must contain letters (a-z), numbers (0-9), and the underscore. You must use letters at the first character. The rest can be a combination of letters and numbers. +> + + - Set the **Status Label** for Admin and storefront. + - Set the **Default Store View** under **Store View Specific Labels** for each store view. + ![Magento order status information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magento-order-status-information-new.jpg.md) + 4. Click **Save Status** to complete. + ![Magento order status information save](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magento-order-status-save-new.jpg.md) + + **Step 2: Un-assign existing status.** + + 1. Un-assign the existing status code that is in use. + - If State Code and Title is `processing[Processing]`, the `processing` status is already in use for state `processing`. + - Un-assign this status from the existing state code `processing`, so the state will be available for your custom status code. + + +> **WARN** +> +> +> **Watch Out!** +> +> If you get the following error "The status can't be unassigned because the status is currently used by an order.", directly move to step 3. +> + + + + **Step 3: Assign an order status to a state.** + 1. Go to the **Order Status** page, and click **Assign Status to State**. + ![Magento assign status to state](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magento-assign-status-to-state-new.jpg.md) + 2. On the **Assign Order Status to State** page: + - Select the **Order Status** to assign from the existing order status list. + - Select the **Order State** as `processing` to include the order status you have just assigned. + - Select the **Use Order Status As Default** checkbox to accept the Order Status as a default. + - Select the **Visible On Storefront** checkbox to enable the order status on the storefront. + ![Magento assignment information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magento-assignment-information-new.jpg.md) + 3. Click **Save Status Assignment** to complete. + ![Magento save status information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magento-save-status-assignment-new.jpg.md) + + **Step 4: Using custom order status for Razorpay Magento.** + 1. On the Magento Admin Dashboard, open Razorpay payment method settings. + 2. On the **Configuration** page: + - At **Enable Custom Paid Order Status** field, select **Yes** to enable custom order status, and select **No** to disable custom order status. + - Insert **Custom Paid Order Status** value in the input field, providing the same value as the Status Code while creating custom status. + ![Magento configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magento-configuration-new.jpg.md) + 3. Click **Save Config** and refresh the cache. + ![Magento save configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magento-save-confi-new.jpg.md) + + + +### 5. I am getting the following error message "Column not found: 1054 Unknown column 'main_table.rzp_webhook_notified_at' in 'field list', query was: SELECT main_table.entity_id, main_table.rzp_webhook_notified_at FROM sales_order AS main_table." + + If you encounter this error message, [update](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/magento/integration-steps.md#step-1-download-and-install-extension) the plugin to the latest version to resolve the issue. + + + +### 6. Does the Magento plugin support 3 or 0 decimal unit currencies? + + The Magento plugin currently supports only currencies that use 2 decimal units. For example: USD, EUR, INR. It does not support currencies with 0 decimal (for example, JPY) or 3 decimal units (for example, BHD). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/open-cart.md b/llm-content/payments/payment-gateway/ecommerce-plugins/open-cart.md new file mode 100644 index 00000000..be511157 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/open-cart.md @@ -0,0 +1,48 @@ +--- +title: Prerequisites | OpenCart - Prerequisites +heading: Prerequisites +description: Check the prerequisites before you integrate your OpenCart website with Razorpay Payment Gateway. +--- + +# Prerequisites + +- **OpenCart Changelog**: Discover new features, updates and deprecations related to the Razorpay OpenCart plugin (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about the Razorpay OpenCart plugin. + +**Before you proceed:** + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +## Supported Versions + +We support the following versions of OpenCart with separate extensions: OpenCart 4, OpenCart 3, OpenCart 2 and OpenCart 1.5. + + - **Video Tutorial**: Watch the video before you start integrating the OpenCart plugin with Payment Gateway. + + - **Integration Steps**: Check the steps to integrate the OpenCart plugin with Payment Gateway. + +## Supported Products + +Razorpay OpenCart Plugin is only supported on Web Standard Checkout and the following products: + +Plugin | Payment Gateway | Route | Subscriptions +--- +OpenCart 1.5 | ✓ | x | x +--- +OpenCart 2 | ✓ | x | x +--- +OpenCart 3 | ✓ | x | ✓ +--- +OpenCart 4 | ✓ | x | ✓ + +## Support + +- Queries: If you have any queries, raise a ticket on the Razorpay [Support Portal](https://razorpay.com/support/). +- Feature Request: If you have a feature request, create an issue on [GitHub](https://github.com/razorpay/razorpay-opencart/issues/new). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/open-cart/integration-steps.md b/llm-content/payments/payment-gateway/ecommerce-plugins/open-cart/integration-steps.md new file mode 100644 index 00000000..553bbae2 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/open-cart/integration-steps.md @@ -0,0 +1,298 @@ +--- +title: Payment Gateway | OpenCart - Integration Steps +heading: Integration Steps +description: Steps to integrate your OpenCart Extension with Razorpay Payment Gateway. +--- + +# Integration Steps + +Follow the steps given below to integrate Razorpay Payment Gateway with your OpenCart Extension. + + - **1. Build Integration**: Install and configure the OpenCart plugin. + + - **2. Test Integration**: Test the integration by making a test payment. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/lVzskQnl170] + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Install Plugin + + 1. Download the latest Source code zip file of the required version of the plugin. + 1. Download the latest release of the OpenCart 4 plugin from the [Releases section](https://github.com/razorpay/razorpay-opencart/releases) in GitHub. Tags for OpenCart 4 are opencart4-6.x.y. + + +> **WARN** +> +> +> **Watch Out!** +> +> When installing the Razorpay plugin for Opencart 4, ensure that your zip folder only contains the following folders and file, with no hidden files: +> - `admin/` +> - `catalog/` +> - `system/` +> - `install.json` +> + + 1. Download the latest release of the OpenCart 3 plugin from the [Releases section](https://github.com/razorpay/razorpay-opencart/releases) in GitHub. Tags for OpenCart 3 are opencart3-1.x.y. + 1. For OpenCart 2, [download this release](https://github.com/razorpay/razorpay-opencart/releases/tag/opencart2-3.0.0) from GitHub. Tags for OpenCart 2 are opencart2-3.x.y. + 1. For OpenCart 1.5, [download this release](https://github.com/razorpay/razorpay-opencart/releases/tag/opencart1.5-1.0.0) from GitHub. Tags for OpenCart 1.5 are opencart1.5-1.x.y. + 2. Navigate to **Extensions** → **Installer** and click **Upload**. Choose the zip file. + + + +### 1.2 Configure OpenCart + + Configure OpenCart as given below: + 1. Log in to [OpenCart](https://www.opencart.com/). + 1. Navigate to the **Admin Panel** → **Extensions** → **Payments** to install the Razorpay Payment Gateway extension. + 1. Click **Edit**. Complete the following steps: + 1. Add in your Key_ID and Key_Secret generated from the Razorpay Dashboard. + 1. Change extension status to **Enabled**. + 1. Click **Save** to save the extension settings. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Webhook is auto-configured on OpenCart 3 (versions 5.0.0 and above) and OpenCart 4 when you enter and save the API key ID and secret on the plugin settings page. You need to verify if webhooks are enabled on your Razorpay [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/open-cart/troubleshooting-faqs.md#2-how-can-i-verify-if-webhooks-are). + +> However, for versions lower than 5.0.0, you must [configure webhooks manually](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/open-cart/troubleshooting-faqs.md#1-my-webhooks-are-not-auto-configured-since-i). +> + + #### Create Cron for OpenCart 3 + + Create a Cron for Webhook using cpanel, follow the steps given below: + + 1. Log on to your cPanel Interface. + 2. Go to **Advanced** section. + 3. Click **Cron Jobs**. + 4. Select the specific time from the lists provided (every 5 minutes). + 5. Enter `https:///index.php?route=extension/payment/razorpay/rzpWebhookCron/` in the **Command** field. + + For more information about Cron, refer to [OpenCart Crons](https://docs.opencart.com/developer-guide/cron-jobs). + + +## 2. Test Integration + +After the integration, Razorpay will appear as a payment option on your webpage/app. You need to click the button and make a test transaction to ensure the integration works as expected. You can start accepting actual payments from your customers once the test is successful. + +![Open Cart](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pg-opencart-plugin-test.jpg.md) + +You can make test payments using one of the payment methods configured at the Checkout. +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API keys generated in the test mode in the Checkout code. + + +### Supported Payment Methods + + After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + + Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + + + + +### Verify Payment Status + + You can track the payment status from the Dashboard or by polling APIs. + + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a `payment_ID` has been generated and note the status. In case of a successful payment, the status is marked as `captured`. + + ![](/docs/assets/images/testpayment.jpg) + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +## 3. Go-live Checklist + +Follow these steps before taking the integration live: + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/open-cart/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/ecommerce-plugins/open-cart/troubleshooting-faqs.md new file mode 100644 index 00000000..80071771 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/open-cart/troubleshooting-faqs.md @@ -0,0 +1,90 @@ +--- +title: Payment Gateway | OpenCart - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common errors and find answers to frequently asked questions about OpenCart Ecommerce Plugin integration. +--- + +# Troubleshooting & FAQs + +### 1. My Webhooks are not auto-configured since I am not using the upgraded version of OpenCart. How do I manually configure webhooks? + + To set up webhooks: + 1. Log in to the Razorpay Dashboard and navigate to **Account & Settings**. + 1. In the **Website and app settings** section, click **Webhooks**. + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 1. Click **+ Add New Webhook**. + + ![](/docs/assets/images/webhooks-webhook-creation-1.jpg) + 1. In the **Webhook Setup** pop-up page: + 1. Enter the **URL** where you want to receive the webhook payload when an event is triggered. We recommended using an HTTPS URL. + +> **INFO** +> +> +> **Handy Tips** +> +> You can set up to **10 URLs** to receive Webhook notifications. Webhooks can only be delivered to public URLs. If you attempt to save a localhost endpoint as part of a webhook setup, you will notice an error. Know more about [testing Webhooks on an application running on localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#application-running-on-localhost). +> + + 1. Enter a **Secret** for the webhook endpoint. The secret is used to validate that the webhook is from Razorpay. Do not expose the secret publicly. Know more about [how to validate webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). + +> **INFO** +> +> +> **Handy Tips** +> +> - When setting up the webhook, you will be asked to specify a secret. Using this secret, you can validate that the webhook is from Razorpay. Entering the secret is optional but recommended. The secret should never be exposed publicly. +> - The webhook secret does not need to be the merchant secret key provided by Razorpay. +> + + 1. In the **Alert Email** field, enter the email address to which the notifications should be sent in case of webhook failure. You will receive webhook deactivation notifications to this email address. + 1. Select the required events from the list of **Active Events**. + ![](/docs/assets/images/webhooks-webhook-creation-2.jpg) + 1. Click **Create Webhook**. + 1. After you set up a webhook, it appears on the list of webhooks. + + + + +### 2. How can I verify if webhooks are enabled? + + To verify if webhooks are enabled: + 1. Log in to the Razorpay Dashboard and navigate to **Account & Settings**. + 2. In the **Website and app settings**, click **Webhooks**. + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 3. Select the relevant webhook **URL**. + 4. On the right panel, check if the status for `payment.authorized`, `refund.created` and `virtual_account.credited` is enabled. + ![List of webhooks created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/plugin-webhook-faq.jpg.md) + + List of Events to Subscribe + + You must subscribe to the following events: + + + OpenCart Plugin Version | Webhook Events Supported + --- + OpenCart 1.5 | None + --- + OpenCart 2.x | `order.paid` + --- + OpenCart 3.x | `order.paid` and `payment.authorized` + + + + +### 3. What troubleshooting procedures should be carried out prior to initiating a support ticket? + + Follow the troubleshooting steps given below: + 1. Reinstall the Razorpay Opencart plugin and ensure that your system meets all the requirements mentioned [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/open-cart/integration-steps.md). + 2. We recommend you to keep your Razorpay Opencart plugin up to date. You can find the latest versions [here](https://github.com/razorpay/razorpay-opencart/releases). + 3. If the issue persists after following these steps, contact our [Support team](https://razorpay.com/support/). Provide the following information while creating a ticket: + - Razorpay Opencart plugin version (4, 3, 2, or 1.5) + - Steps to reproduce the issue (Screen recording/Screenshots) + - Error logs, if any + - Staging website credentials (login URL, login id, and password) + + + +### 4. Does the Open-Cart plugin support 3 or 0 decimal unit currencies? + + The Open-Cart plugin currently supports only currencies that use 2 decimal units. For example: USD, EUR, INR. It does not support currencies with 0 decimal (for example, JPY) or 3 decimal units (for example, BHD). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/prestashop.md b/llm-content/payments/payment-gateway/ecommerce-plugins/prestashop.md new file mode 100644 index 00000000..a7f0dcef --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/prestashop.md @@ -0,0 +1,48 @@ +--- +title: Prerequisites | PrestaShop - Prerequisites +heading: Prerequisites +description: Check the prerequisites before you integrate your PrestaShop website with Razorpay Payment Gateway. +--- + +# Prerequisites + +- **Prestashop Changelog**: Discover new features, updates and deprecations related to the Razorpay Prestashop plugin (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about the Razorpay PrestaShop plugin. + +**Before you proceed:** + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **Video Tutorial**: Watch the video before you start integrating the PrestaShop plugin with Payment Gateway. + + - **Integration Steps**: Check the steps to integrate the PrestaShop plugin with Payment Gateway. + +## Supported Versions + +We support the following versions: PrestaShop 8.1.x, PrestaShop 8.0.x, PrestaShop 1.7.x and PrestaShop 1.6.x. + +**Upgrade Notice** + +- Release 2.5.4 supports PrestaShop 1.7.x, 8.0.x, and 8.1.x. +- Release 2.0.0 removes support for PHP versions 5.6.0 and lower. +- Release 2.0.0 removes theme support. Use the PrestaShop Dashboard to configure the checkout theme color. + +## Supported Products + +Razorpay PrestaShop Plugin is only supported on Web Standard Checkout and the following products: + +Payment Gateway | Route | Subscriptions +--- +✓ | x | x + +## Support + +- Queries: If you have any queries, raise a ticket on the Razorpay [Support Portal](https://razorpay.com/support/). +- Feature Request: If you have a feature request, create an issue on [GitHub](https://github.com/razorpay/razorpay-prestashop/issues/new). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/prestashop/integration-steps.md b/llm-content/payments/payment-gateway/ecommerce-plugins/prestashop/integration-steps.md new file mode 100644 index 00000000..01ff07a0 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/prestashop/integration-steps.md @@ -0,0 +1,273 @@ +--- +title: Payment Gateway | PrestaShop - Integration Steps +heading: Integration Steps +description: Steps to integrate your PrestaShop website with Razorpay Payment Gateway. +--- + +# Integration Steps + +Follow the steps given below to integrate Razorpay Payment Gateway with your PrestaShop website. + + - **1. Build Integration**: Install and configure the PrestaShop plugin. + + - **2. Test Integration**: Test the integration by making a test payment. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/CTjA7fwOEys?si=HER--F3MzRuR775X] + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Installation and Configuration + + 1. Download the Source code zip file of the required version of the plugin from the Releases section in GitHub. + - For PrestaShop 1.6, download releases tagged 1.x.y. The latest release for PrestaShop 1.6 is [version 1.3.1](https://github.com/razorpay/razorpay-prestashop/releases/download/1.3.1/razorpay.zip). + - For PrestaShop 1.7, download releases tagged 2.x.y. The latest release for PrestaShop 1.7 is [version 2.5.3](https://github.com/razorpay/razorpay-prestashop/releases/download/2.5.3/razorpay.zip). + - For PrestaShop 8.0 and 8.1, download releases tagged 2.x.y. The latest release for PrestaShop 8.0 and 8.1 is [version 2.5.4](https://github.com/razorpay/razorpay-prestashop/releases). + 2. Log in to your [PrestaShop account](https://addons.prestashop.com/en/). + ![Prestashop Login](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/prestashop-login.jpg.md) + 3. Navigate to the **Modules** tab and click **Add a New Module**. + 4. Click **Browse** to open the Windows search on your computer. Select the ZIP file that you have downloaded and click **OK**. + 5. Click **Upload this Module**. + 6. Click **Install** to install the module. + 7. Click **Configure** to configure the module. + + +> **WARN** +> +> +> +> **Watch Out!** +> +> If the store is open while the module is not fully configured, deactivate it by clicking the green check. Reactivate the store by clicking the red X after the module configuration. +> + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Webhook is auto-configured when you enter and save the API key ID and secret on the plugin settings page. You need to verify if webhooks are enabled on your Razorpay [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/prestashop/troubleshooting-faqs.md#2-how-can-i-verify-if-webhooks-are). However, for versions lower than 2.5.0, you need to [configure webhooks manually](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/prestashop/troubleshooting-faqs.md#1-my-webhooks-are-not-auto-configured-since-i). +> + + If you face any errors, refer to the [PrestaShop guide](https://addons.prestashop.com/en/content/21-how-to). + + +## 2. Test Integration + +After the integration is complete, a **Pay** button will appear on your web page/app. You need to click the button and make a test transaction to ensure that the integration is working as expected. You can start accepting actual payments from your customers once the test is successful. + +You can make test payments using one of the payment methods configured at the Checkout. +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API keys generated in the test mode in the Checkout code. + + +### Supported Payment Methods + + After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + + Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + + + + +### Verify Payment Status + + You can track the payment status from the Dashboard or by polling APIs. + + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a `payment_ID` has been generated and note the status. In case of a successful payment, the status is marked as `captured`. + + ![](/docs/assets/images/testpayment.jpg) + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +## 3. Go-live Checklist + +Follow these steps before taking the integration live: + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/prestashop/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/ecommerce-plugins/prestashop/troubleshooting-faqs.md new file mode 100644 index 00000000..acc0a9b1 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/prestashop/troubleshooting-faqs.md @@ -0,0 +1,96 @@ +--- +title: Payment Gateway | PrestaShop - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common errors and find answers to frequently asked questions about PrestaShop Ecommerce Plugin integration. +--- + +# Troubleshooting & FAQs + +### 1. My Webhooks are not auto-configured since I am not using the upgraded version of PrestaShop. How do I manually configure webhooks? + + To set up webhooks: + 1. Log in to the Razorpay Dashboard and navigate to **Account & Settings**. + 2. In the **Website and app settings** section, click **Webhooks**. + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 3. Click **+ Add New Webhook**. + ![](/docs/assets/images/webhooks-webhook-creation-1.jpg) + 4. In the **Webhook Setup** pop-up page: + 1. Enter the **URL** where you want to receive the webhook payload when an event is triggered. We recommended using an HTTPS URL. + +> **INFO** +> +> +> **Handy Tips** +> +> You can set up to **10 URLs** to receive Webhook notifications. Webhooks can only be delivered to public URLs. If you attempt to save a localhost endpoint as part of a webhook setup, you will notice an error. Know more about [testing webhooks on an application running on localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#application-running-on-localhost). +> + + 2. Enter a **Secret** for the webhook endpoint. The secret is used to validate that the webhook is from Razorpay. Do not expose the secret publicly. Know more about [how to validate webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). + +> **INFO** +> +> +> **Handy Tips** +> +> - When setting up the webhook, you will be asked to specify a secret. Using this secret, you can validate that the webhook is from Razorpay. Entering the secret is optional but recommended. The secret should never be exposed publicly. +> - The webhook secret does not need to be the merchant secret key provided by Razorpay. +> + + 3. In the **Alert Email** field, enter the email address to which the notifications should be sent in case of webhook failure. You will receive webhook deactivation notifications to this email address. + 4. Select the required events from the list of **Active Events**. + 5. Click **Create Webhook**. + ![](/docs/assets/images/webhooks-webhook-creation-2.jpg) + 5. After you set a webhook, it appears on the list of webhooks. + + + + +### 2. How can I verify if webhooks are enabled? + + To verify if webhooks are enabled: + 1. Log in to the Razorpay Dashboard and navigate to **Account & Settings**. + 2. In the **Website and app settings**, click **Webhooks**. + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 3. Select the relevant webhook **URL**. + 4. On the right panel, check if the status for `payment.authorized`, `refund.created` and `virtual_account.credited` is enabled. + ![List of webhooks created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/plugin-webhook-faq.jpg.md) + + + +### 3. What troubleshooting procedures should be carried out prior to initiating a support ticket? + + Follow the troubleshooting steps given below: + 1. Reinstall the Razorpay Prestashop plugin and ensure that your system meets all the requirements mentioned [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/prestashop/integration-steps.md#installation-and-configuration). + 2. We recommend you to keep your Razorpay Prestashop plugin up to date. You can find the latest versions [here](https://github.com/razorpay/razorpay-prestashop/releases). + 3. If the issue persists after following these steps, contact our [Support team](https://razorpay.com/support/). Provide the following information while creating a ticket: + - Razorpay Prestashop plugin version (PrestaShop 1.7.x, PrestaShop 1.6.x) + - PHP version + - Steps to reproduce the issue (Screen recording/Screenshots) + - Error logs, if any + - Staging website credentials (login URL, login id, and password) + + + +### 4. Does the Prestashop plugin support 3 or 0 decimal unit currencies? + + The Prestashop plugin currently supports only currencies that use 2 decimal units. For example: USD, EUR, INR. It does not support currencies with 0 decimal (for example, JPY) or 3 decimal units (for example, BHD). + + + +### 5. Why is the PAY button not visible when Razorpay is selected as a payment method? + + If the PAY button is not visible. Follow the steps given below: + 1. Verify if the Razorpay scripts are loading. + - Place an order and select **Razorpay** as the payment option. + - Right-click on the page and choose **Inspect** → **Sources**. + - Check if **script.js** and **checkout.js** are loading under the loaded modules. + ![Prestashop Razorpay pay button inspect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/prestashop-script-checkout.jpg.md) + 2. If the scripts are not loading check hook configuration in Prestashop database: + - Open the Prestashop database and navigate to the **hook_alias** table. + - Ensure that the name `displayHeader` has the alias set to `Header`. + 3. Update Razorpay module code (if the above step didn't work): + - In the Razorpay module code, ensure the hook name matches your alias name (e.g., `displayHeader` or its custom alias and function name as `hookDisplayHeader`). + - Re-zip the Razorpay module and re-install it in your Prestashop. + + + Following these steps should make the Pay button appear correctly. If the issue persists, contact our [Support team](https://razorpay.com/support/). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-cod.md b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-cod.md new file mode 100644 index 00000000..50e2869c --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-cod.md @@ -0,0 +1,113 @@ +--- +title: Integrate Razorpay Shopify - Cash on Delivery +heading: Integration Steps +description: Steps to integrate the Razorpay Payment Gateway with Shopify - Cash on Delivery. +--- + +# Integration Steps + +> **WARN** +> +> +> **Watch Out!** +> +> This is an on-demand feature. Write to us at [magic-checkout-support@razorpay.com](mailto:magic-checkout-support@razorpay.com) to integrate Razorpay - Cash on Delivery with your Shopify website. +> + +**Before you proceed:** + +- Sign up for [Razorpay account](https://dashboard.razorpay.com/signup) + +- Sign up for a [Shopify account](https://www.shopify.in). + +Follow the steps given below to integrate your Shopify website with the Razorpay - Cash on Delivery plugin. + + - **1. Build Integration**: Install and configure the Shopify COD plugin. + + - **2. Test Integration**: Test the integration by making a test payment. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Integration Steps + + + + + + + + +## 2. Test Integration + +After the integration is complete, follow the steps given below: + + +### 2.1 Enable Test Mode in Shopify Dashboard + + After the integration is complete, you need to ensure the integration is working as expected. You can start accepting actual payments once the test mode transaction is successful. + + Follow the steps given below to test a transaction: + + 1. Log in to [Shopify store](https://accounts.shopify.com/lookup?rid=f19e1541-cd24-4856-a398-156d2ed5d56f). + 2. Navigate to **Settings** → **Payments**. + 3. Click **Manage** on the Razorpay - Cash on Delivery app on the **Supported payment methods** section. + ![Shopify go live v2](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cod-go-live-v2.jpg.md) + 4. Select **Enable test mode** and click **Save**. + ![Shopify go live v2 save test](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cod-go-live-test.jpg.md) + + + +### 2.2 Make a Test Payment + + 1. Click **Buy it now**. + ![Shopify checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/buy-now-shopify-cod.jpg.md) + 2. Fill in your **Contact** and **Delivery** details. + ![Shopify contact details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cod-shipping-contact-details.jpg.md) + Select **Cash on Delivery** as Payment method and select **Billing address**. + ![Shopify contact details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cod-shipping-contact-details1.jpg.md) + 3. Click **Pay now** and the order is placed. + + + +### 2.3 Verify Payment Status + + You can track the payment status from the Razorpay Dashboard, subscribe to the Webhook event or poll our APIs. + + **Verify Payment Status From Dashboard** + + 1. Log in to the Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a `payment_ID` has been generated and note the status. In case of a successful payment, the status is marked as `captured`. + + + +## 3. Go-live Checklist + +Follow these steps before taking the integration live: + + +### 3.1 Switch from Test mode to Live mode + + You can perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the installation and integration is working as expected, switch to the Live Mode and start accepting payments from customers. + + To switch from **Test Mode** to **Live Mode**: + 1. Log in to your [Shopify store](https://accounts.shopify.com/lookup?rid=f19e1541-cd24-4856-a398-156d2ed5d56f). + 2. Navigate to **Settings** → **Payments**. + 3. On the **Supported payment methods** section, click **Manage** on the **Razorpay - Cash on Delivery** app. + ![Shopify go live v2](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cod-go-live-v2.jpg.md) + 4. Clear **Enable test mode** and click **Save**. + ![Shopify go live v2 save](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-cod-go-live-test.jpg.md) + You can now start accepting actual payments on your Shopify store. + + +## Support + +Queries: If you have queries, raise a ticket on the [Razorpay Support Portal](https://razorpay.com/support/) + +### Related Information + +[Shopify - 1 Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify.md) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure.md b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure.md new file mode 100644 index 00000000..7d547dae --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure.md @@ -0,0 +1,35 @@ +--- +title: Shopify Razorpay Secure Integration | Prerequisites +heading: Prerequisites +description: Know how to integrate Razorpay Payment Gateway with your Shopify store. Complete guide for Shopify payment integration with Razorpay Secure app. +--- + +# Prerequisites + +Razorpay Shopify integration allows you to accept payments on your Shopify store using the Razorpay Secure Payment Gateway app. + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about the Razorpay Shopify integration. + +**Before you proceed:** + +- Sign up for a . +- Sign up for a [Shopify account](https://www.shopify.in). +- [Ensure that your website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/faqs.md#10-i-am-getting-the-following-error-message) is reviewed before initiating integration with Shopify. +- A Razorpay Account with access to the account owner’s credentials. (Only owners can connect Razorpay with Shopify, and API keys are not required for integration.) + +> **WARN** +> +> +> +> **Watch Out!** +> +> Only Razorpay account owners can connect their Shopify account with Razorpay. +> + +## Integration Steps + +Check the integration steps to [integrate your Shopify website with the Razorpay Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/integration-steps.md). + +## Support + +If you have any queries, . diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/faqs.md b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/faqs.md new file mode 100644 index 00000000..67cfbe03 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/faqs.md @@ -0,0 +1,212 @@ +--- +title: Payment Gateway | Shopify | Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common errors and find answers to frequently asked questions about Shopify. +--- + +# Troubleshooting & FAQs + +## Integration and Setup + + +### 1. How do I integrate Razorpay Secure with my Shopify store? + + Follow the [build integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/integration-steps.md#1-build-integration) steps to integrate Razorpay Secure with your Shopify store. + + + +### 2. I tried connecting Razorpay Secure to my Razorpay account but was unsuccessful. When I try to reconnect, the screen appears different. How should I proceed? + + Follow the steps given below to connect Razorpay Secure with your Razorpay account: + 1. When you try to reconnect, you will get the following screen. Click **Manage**. + ![reconnect Razorpay Secure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/razorpay-secure-reconnect.jpg.md) + 2. You will be redirected to a landing page. Click **I am an existing user**. + + 3. Scroll down and click **Login**. + +> **INFO** +> +> +> **Handy Tips** +> +> Make sure you log in with **owner** credentials to connect Razorpay with Shopify successfully. +> + + + 4. Click **Activate** on the activation screen on your Shopify Dashboard. + + ![Shopify Authorize](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-1razorpay-activate.jpg.md) + + Razorpay Secure now appears as a Payment Gateway on your Shopify Store checkout. + + + This completes your integration. + + + +### 3. Why is the Activate button disabled? + + The Activate button may be disabled due to the plugin being integrated into another account or keyless authentication not being enabled. To enable the Activate button: + + - **Check for Integration with Another Account:** Verify if you have integrated your Shopify Store with a different Razorpay MID. If yes, revoke access under applications and retry the Razorpay Secure [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/integration-steps.md#1-build-integration). + + - **Enable Keyless Authentication:** Ensure keyless authentication is enabled from Razorpay's end. To enable keyless authentication contact . + + + +### 4. I am getting the following error message, "Email ID Mismatch." Why? + + This error occurs when there is a discrepancy between the email IDs used in Shopify and Razorpay. + + You can [update the email ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/account-details.md#update-login-email) on Razorpay to match the one used in Shopify. Verify that the email ID associated with owner access on Razorpay matches the one used in Shopify. + + + +### 5. Do I need API keys to integrate a payment app with Shopify? + + No, API keys are not required to integrate a payment app with Shopify. OAuth is used to handle the authentication process. + + + +### 6. How do I uninstall Razorpay payment app from Shopify? + + To uninstall any Razorpay payment app from your Shopify store, follow these steps: + 1. Log in to your Shopify admin panel and navigate to **Settings**→**Payments**. + 2. Click **Add payment methods**. + 3. Click Search by provider and type **Razorpay**. This will show all the Razorpay payment apps installed on your Shopify store. Click the Razorpay app that you wish to uninstall. + ![Search Razorpay in Payment Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/search-razorpay-payment-provider.jpg.md) + 4. Scroll down to the bottom and click the **Uninstall** button to remove the app from your Shopify store. + ![Uninstall the app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/uninstall-app.jpg.md) + This will successfully uninstall the selected Razorpay payment app from your Shopify store. + + + +### 7. Our Payment Gateway stopped displaying after migrating to Shopify. How can we reactivate it? + + After migrating your website to Shopify, you need to integrate with the official Shopify 1 Razorpay plugin, as your previous Payment Gateway integration from the old platform will not be carried over. Follow the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/integration-steps.md) and once activated, your payment gateway will be displayed at checkout, allowing you to accept payments. + + +## Checkout and Payment Issues + + +### 8. My customer is getting the following error when they make payments on my Shopify store, "There was an issue processing your payment. Try again or use a different payment method." What should I do? + + Your customers may get the following error when making payments. + Uninstall and reinstall the Razorpay Secure App from your Shopify store to resolve the error. + + To uninstall the app: + 1. Open your Shopify store in incognito mode. + 2. Navigate to **Settings** → **Payments**. Click **Manage on Razorpay Secure**. + 3. Go to **Deactivate Razorpay Secure** and click **Uninstall Razorpay Secure**. This uninstalls the Razorpay Secure app. + + Follow the [build integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/integration-steps.md#1-build-integration) steps to install the plugin again. + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you uninstall and reinstall the app instead of only deactivating it. +> + + If your plugin still does not accept payments, contact . + + + +### 9. Why is my Shopify checkout showing only Razorpay Direct (cards) instead of all payment methods? + + You might have only integrated with Razorpay Direct - Credit Card Plugin, which supports card payments only. To accept UPI, Netbanking, Wallets and Cards at checkout, you need to [integrate with 1 Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/integration-steps.md), which is Razorpay's full payment gateway app for Shopify. + + + +### 10. The Razorpay payment option has disappeared from my Shopify checkout after I added another payment provider. Even after removing it, Razorpay does not show up and I see the error "This store can't accept payments right now." What should I do? + + Active payment method customisations typically cause this issue in your Shopify admin. When adding multiple payment providers, these customisations may conflict and prevent Razorpay from appearing at checkout. + + To fix this, follow the steps below: + 1. Navigate to **Shopify Admin** → **Settings** → **Payments** → **Payment Method Customizations**. + 2. **Disable or remove all customizations** listed under this section. + 3. Save the changes and refresh the checkout page. + + Once the payment customisations are removed, the Razorpay payment option should reappear at checkout. + + If the issue persists, contact our . + + + +### 11. How can I test a payment for Razorpay Secure on the Shopify store? + + You can test a payment for Razorpay Secure on the Shopify store by switching to test mode. Know more about [how to test a transaction in test mode.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/integration-steps.md#21-make-a-test-transaction-in-test-mode) + +> **INFO** +> +> +> **Handy Tips** +> +> Once you successfully make a test transaction, ensure you uncheck the **Enable test mode** option to accept live payments. +> + + + + +### 12. After migrating to Razorpay Secure, the checkout option for Razorpay Secure appears at the bottom of the list of gateways. Is it possible to move the Razorpay checkout option to the top of the list of gateways? + + No. It is not possible to rearrange the order payment options via the store settings of the Shopify Dashboard as it is a limitation from Shopify's end. + + +## Account Management + + +### 13. Can I connect two merchant ids (MIDs) to the same Shopify Store? + + No, currently you can connect only one MID to your Shopify Store. + +> **INFO** +> +> +> **Handy Tips** +> +> Make sure you log in using the correct Razorpay merchant id (MID) credentials via the Shopify Dashboard. +> + + + + +### 14. Can I integrate a second Razorpay account with my Shopify store? + + No, Shopify currently supports only one Razorpay account integration per store. If you want to integrate a different Razorpay account, you need to [deactivate](#6-how-do-i-uninstall) the existing integration first and then [activate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/integration-steps.md) the new account. + + + +### 15. I have two Ecommerce websites owned by my company. If I connect both websites to my Razorpay account, will the customers be redirected to the correct webpage after payment? + + Yes, when customers pay through Razorpay on either of your connected websites, they will be redirected to the website they purchased from. + + +## Pricing and Settlements + + +### 16. Will I be charged extra for integrating/migrating to Razorpay Secure app? + + No, there will be no additional charges. Your pricing plan will remain the same as earlier. + + + +### 17. When will my funds be settled? + + Funds will be settled as per the existing settlement schedule. There will be no change to it. + + +## Features and Limitations + + +### 18. Does the Shopify Razorpay Secure plugin support 3 or 0 decimal unit currencies? + + The Shopify Razorpay Secure plugin currently supports only currencies that use 2 decimal units. For example: USD, EUR, INR. It does not support currencies with 0 decimal (for example, JPY) or 3 decimal units (for example, BHD). + + + +### 19. How do I integrate Meta Pixel to accept payments through Meta Ads? + + Razorpay does not provide a direct plugin integration for accepting payments through Meta Ads. However, you can use Razorpay Payment Pages with [Facebook Pixel and Google Tracking ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/plugins-add-ons.md) to track payments and conversions from your Ad campaigns. diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/initiate-refunds.md b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/initiate-refunds.md new file mode 100644 index 00000000..f0a9e0bb --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/initiate-refunds.md @@ -0,0 +1,49 @@ +--- +title: Initiate Refunds +description: Know how to initiate refunds from the Shopify Dashboard. +--- + +# Initiate Refunds + +You can initiate refunds to customers from the Shopify Dashboard. + +## Initiate Refunds + +Follow these steps: +1. Log in to the [Shopify Dashboard](https://accounts.shopify.com/). +1. Navigate to Orders and select the order for which you want to refund. +3. Click **Refund**. + ![](/docs/assets/images/ecommerce-plugins-shopify-refund-order.jpg) +4. Enter the amount to be refunded. You can initiate: + - **Full Refund**: Enter the full order amount. + - **Partial Refund**: Enter an amount less than the full amount. +5. Enter a reason for the refund. +6. Click **Refund**. + ![](/docs/assets/images/ecommerce-plugins-shopify-initiate-refund.jpg) + +## Refund a Discounted Payment + +If the customer has selected an offer during checkout, ensure you refund only the discounted cost (Actual Cost minus Discount Amount) of the product/service. + +> **WARN** +> +> +> +> **Watch Out!** +> +> Do not refund the actual cost of the product/service received from the customer. +> + +Particulars | Amount +--- +Actual Cost | +--- +Discount Amount | +--- +Discounted Cost (Actual Cost minus Discount Amount) | +--- +Amount Refundable to Customer | + +The Order displays the refund details: + +![](/docs/assets/images/ecommerce-plugins-shopify-refund-complete.jpg) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/integration-steps.md b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/integration-steps.md new file mode 100644 index 00000000..65634ff6 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/integration-steps.md @@ -0,0 +1,277 @@ +--- +title: Shopify Razorpay Secure Integration Steps | Payment Gateway Setup +heading: Integration Steps +description: Step-by-step guide to integrate Razorpay Payment Gateway with Shopify. Install Razorpay Secure app and start accepting payments on your Shopify store. +--- + +# Integration Steps + +Follow the steps given below to integrate 1 Razorpay App on your Shopify store. + + - **1. Build Integration**: Install the 1 Razorpay App. + + - **2. Test Integration**: Test the integration by making a test payment. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Installation + + 1. Sign up for a . + 2. Once your Razorpay account is activated, click on [this link](https://apps.shopify.com/razorpay-secure) to access the Razorpay Secure App on your Shopify store. Click **Install**. + ![Shopify Install](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-razorpay-secure-install-new.jpg.md) + 3. You will be redirected to a landing page. Click **I am an existing user**. + 4. Scroll down and click **Login**. + +> **INFO** +> +> +> **Handy Tips** +> +> Make sure you log in with **owner** credentials to connect Razorpay with Shopify successfully. +> + + 5. Click **Activate** on the activation screen on your Shopify Dashboard. + + ![Shopify Activate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-1razorpay-activate.jpg.md) + + Razorpay Secure now appears as a Payment Gateway on your Shopify Store checkout. This completes your integration. For more information, see [Shopify FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/faqs.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> **Shopify Plus** merchants can use the [**Shopify Script**](https://help.shopify.com/en/manual/checkout-settings/script-editor/examples/payment-gateway-scripts#reorder-gateways) to modify their plugins. + +> For example, you can: + +> - Change the order of the payment methods on your checkout. +> - Select the relevant payment methods on your checkout. +> - Modify the payment option title on your checkout. +> +> + + + +## 2. Test Integration + +After the integration of **Shopify - Razorpay Secure** on your Shopify store is complete, follow the steps given below: + + +### 2.1 Make a Test Transaction in Test Mode + + After completing the integration, you must ensure it is working as expected. You can start accepting actual payments from your customers once the test mode transaction is successful. + + Follow the steps given below to test a transaction in test mode: + + + + + + + + You can make test payments using one of the payment methods configured at the Checkout. + + - No money is deducted from the customer's account as this is a simulated transaction. + - Ensure you have entered the API keys generated in the test mode in the Checkout code. + + + + Supported Payment Methods + + After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + + Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + + + + + + + +### 2.2 Update Checkout Settings + + Follow the steps given below for a smooth checkout experience: + 1. Log in to your [Shopify store](https://accounts.shopify.com/lookup?rid=f19e1541-cd24-4856-a398-156d2ed5d56f). + 2. Navigate to **Settings** → **Checkout**. + 3. On the **Customer contact method** section, click **Phone number or email** and click **Save**. + ![Shopify Checkout v2](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-checkout-v2.jpg.md) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Your customer's email ID is prefilled during checkout, but the `phone number` must be entered manually. +> + + + + +### 2.3 Verify Payment Status + + You can track the payment status from the Dashboard or by polling APIs. + + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a `payment_ID` has been generated and note the status. In case of a successful payment, the status is marked as `captured`. + + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +## 3. Go-live Checklist + +Follow these steps before taking the integration live: + + +### 3.1 Switch from Test mode to Live mode + + You can perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the installation and integration is working as expected, switch to the Live Mode and start accepting payments from customers. + + Watch this short animation to know how to switch from **Test Mode** to **Live Mode** on your Shopify store. + + ![Shopify Go Live](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-go-live-v2.gif.md) + + To switch from **Test Mode** to **Live Mode**: + 1. Log in to your [Shopify store](https://accounts.shopify.com/lookup?rid=f19e1541-cd24-4856-a398-156d2ed5d56f). + 2. Navigate to **Settings** → **Payments**. + 3. On the **Supported payment methods** section, click **Manage** on the **1 Razorpay** app. + ![Shopify go live v2](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-go-live-v2.jpg.md) + 4. At the bottom of the page, untick the **Enable test mode** option and click **Save**. + ![Shopify go live v2 save](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-go-live-save.jpg.md) + You can now start accepting actual payments on your Shopify store. diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/reconcile-payments.md b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/reconcile-payments.md new file mode 100644 index 00000000..05b553b4 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/reconcile-payments.md @@ -0,0 +1,44 @@ +--- +title: Reconcile Shopify Orders on the Dashboard +description: Reconcile payments made on your Shopify store via Razorpay Dashboard. +--- + +# Reconcile Shopify Orders on the Dashboard + +Reconciling payments made on your Shopify store with the data available on your Dashboard is a simple process. + + +### Reconcile a Payment + + Follow the steps below to reconcile a payment: + + 1. Log in to the [Shopify Dashboard](https://accounts.shopify.com/) and open the **Orders** tab. Click the drop-down to view the Razorpay Secure payment details. + ![](/docs/assets/images/shopify-rzp-secure-details.jpg) + 2. Make a note of the payment id. + ![](/docs/assets/images/shopify-payment-details.jpg) + 3. Log in to the Dashboard and navigate to **Transactions** → **Payments**. The payment appears on the list of payments. The payment id appears under the **Order Id** column. + + 4. Match the payment id (on the Shopify Dashboard) with the Order id (on the Razorpay Dashboard) to map the payments. + + + +### Reconcile Multiple Payments + + Follow the steps below to reconcile multiple payments: + + 1. Log in to the [Shopify Dashboard](https://accounts.shopify.com/) and open the **Orders** tab. + 2. Select the required orders or time period. + 3. Click **Export** to export the data. The **Payment References** column in the file contains the payment ids. + ![Export Shopify order data](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-select-orders.jpg.md) + 4. Log in to the Dashboard and navigate to **Reports**. + 5. Select **Shopify Payments Report** in the **Select Report Type** drop-down. + 6. Select the period and format. + 7. Click **Generate Report**. + 8. Once the report is generated, click **Download**. The **Order ID** column in the file contains the payment ids. + 9. Match the **Payment References** column in the Shopify export with the **Order ID** column in the **Shopify Payments Report** to map the payments. + + +### Related Information + +- [Integrate with Shopify Plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure.md) +- [Shopify FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify-razorpay-secure/faqs.md) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/shopify.md b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify.md new file mode 100644 index 00000000..b07c9101 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify.md @@ -0,0 +1,64 @@ +--- +title: Razorpay Shopify Integration | 1Razorpay Shopify Integration | Prerequisites +heading: Prerequisites +description: Know how to integrate Razorpay Payment Gateway with your Shopify store. Complete guide for Shopify payment integration with 1 Razorpay app. +--- + +# Prerequisites + +- **Shopify Changelog**: Discover new features, updates and deprecations related to the Razorpay Shopify integration (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about the Razorpay Shopify integration. + +Razorpay Shopify integration allows you to accept payments on your Shopify store using the 1 Razorpay Payment Gateway app. This guide covers how to integrate Razorpay with Shopify, enabling UPI, Cards, Wallets and Netbanking payments. + +**Before you proceed:** + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Sign up for a [Shopify account](https://www.shopify.in). +- [Ensure that your website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/faqs.md#18-i-am-getting-the-following-error-message) is reviewed before initiating integration with Shopify. +- A Razorpay Account with access to the account owner’s credentials. (Only owners can connect Razorpay with Shopify, and API keys are not required for integration.) + + - **Video Tutorial**: Watch the video before you start integrating Razorpay Payment Gateway with your Shopify website using our 1 Razorpay App. + + - **Integration Steps**: Check the steps to integrate your Shopify website with the Razorpay Payment Gateway. + +> **WARN** +> +> +> +> **Watch Out!** +> +> Follow the [migration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/migration-steps.md#migration-steps) and upgrade to the **1 Razorpay** App if you integrated with the Shopify store before 28th April 2022. This is to prevent payment failures. +> +> + + - **Integration Steps**: Check the steps to integrate your Shopify website with the Razorpay Payment Gateway. + +> **WARN** +> +> +> +> **Watch Out!** +> +> Only Razorpay account owners can connect their Shopify account with Razorpay. +> +> + +## Supported Products + +Razorpay Shopify Plugin is only supported on Web Standard Checkout and the following products: + +Payment Gateway | Route | Subscriptions +--- +✓ | x | x + +### Demo Link + +- To experience the Shopify integration with Razorpay Payment Gateway, you can make a payment on our [Shopify Test Store](https://razorpay-live-store.myshopify.com/). + +- To test the international currency support on the Razorpay-Shopify integration, you can make test purchases (without paying) on our [Shopify International Test Store](https://razorpay-test-store-international.myshopify.com/). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/faqs.md b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/faqs.md new file mode 100644 index 00000000..c50f134b --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/faqs.md @@ -0,0 +1,295 @@ +--- +title: Payment Gateway | Shopify | Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common errors and find answers to frequently asked questions about Shopify. +--- + +# Troubleshooting & FAQs + +## Integration & Setup + + +### 1. How do I integrate 1 Razorpay with my Shopify store? + + Follow the [build integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/integration-steps.md#1-build-integration) steps to integrate 1 Razorpay with your Shopify store. + + + +### 2. Do I need API keys to integrate a payment app with Shopify? + + No, API keys are not required to integrate a payment app with Shopify. OAuth is used to handle the authentication process. + + + +### 3. I tried connecting 1 Razorpay to my Razorpay account but was unsuccessful. When I try to reconnect, the screen appears different. How should I proceed? + + Follow the steps given below to connect 1 Razorpay with your Razorpay account: + 1. When you try to reconnect, you will get the following screen. Click **Manage**. + ![reconnect 1 Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/razorpay-secure-reconnect.jpg.md) + 2. You will be redirected to a landing page. Click **I am an existing user**. + + ![Existing Merchant Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-existing-merchant.jpg.md) + + 3. Scroll down and click **Login**. + +> **INFO** +> +> +> **Handy Tips** +> +> Make sure you log in with **owner** credentials to connect Razorpay with Shopify successfully. +> + + + ![Shopify login](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-login-v2.gif.md) + + 4. Click **Activate** on the activation screen on your Shopify Dashboard. + + ![Shopify Authorize](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-1razorpay-activate.jpg.md) + + 1 Razorpay now appears as a Payment Gateway on your Shopify Store checkout. + + ![Shopify Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-v2-checkout.jpg.md) + + This completes your integration. + + + +### 4. Why is the Activate button disabled? + + The Activate button may be disabled due to the plugin being integrated into another account or keyless authentication not being enabled. To enable the Activate button: + + - **Check for Integration with Another Account:** Verify if you have integrated your Shopify Store with a different Razorpay MID. If yes, revoke access under applications and retry the 1 Razorpay [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/integration-steps.md#1-build-integration). + + - **Enable Keyless Authentication:** Ensure keyless authentication is enabled from Razorpay's end. To enable keyless authentication contact our [Support team](https://razorpay.com/support/). + + + +### 5. I am getting the following error message, "Email ID Mismatch." Why? + + This error occurs when there is a discrepancy between the email IDs used in Shopify and Razorpay. + + You can [update the email ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/account-details.md#update-login-email) on Razorpay to match the one used in Shopify. Verify that the email ID associated with owner access on Razorpay matches the one used in Shopify. + + + +### 6. I get a blank screen when I try to log in to the Razorpay account while integrating/migrating 1 Razorpay, and I am unable to proceed further. How to proceed further? + + A blank screen appears when the email id used to log in to Razorpay doesn't match the email ID registered with owner access on Razorpay. Make sure that you log in using the correct email ID. + + + +### 7. How do I uninstall Razorpay payment apps from Shopify? + + To uninstall any Razorpay payment app from your Shopify store, follow these steps: + 1. Log in to your Shopify admin panel and navigate to **Settings**→**Payments**. + 2. Click **Add payment methods**. + 3. Click Search by provider and type **Razorpay**. This will show all the Razorpay payment apps installed on your Shopify store. Click the Razorpay app that you wish to uninstall. + ![Search Razorpay in Payment Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/search-razorpay-payment-provider.jpg.md) + 4. Scroll down to the bottom and click the **Uninstall** button to remove the app from your Shopify store. + ![Uninstall the app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/uninstall-app.jpg.md) + This will successfully uninstall the selected Razorpay payment app from your Shopify store. + + + +### 8. What should I do if I am confused between legacy and current plugin versions? + + To avoid confusion, uninstall the legacy version of the plugin and [re-install](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/integration-steps.md#1-build-integration) the current plugin version (1 Razorpay). + + + +### 9. Our Payment Gateway stopped displaying after migrating to Shopify. How can we reactivate it? + + After migrating your website to Shopify, you need to integrate with the official Shopify 1 Razorpay plugin, as your previous Payment Gateway integration from the old platform will not be carried over. Follow the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/integration-steps.md) and once activated, your payment gateway will be displayed at checkout, allowing you to accept payments. + + +## Migration to 1 Razorpay + + +### 10. Why do I need to upgrade to 1 Razorpay? + + Shopify has launched a new payment platform, which requires existing and new payment apps to meet a new set of secure guidelines. Razorpay has built a new app, 1 Razorpay, that complies with these new rules. + +> **WARN** +> +> +> **Watch Out!** +> +> Your customers' payments will fail if you do not upgrade to the 1 Razorpay app at the earliest. So, you must upgrade to 1 Razorpay to provide an uninterrupted payment experience to your customers. +> + + + + +### 11. How do I upgrade to 1 Razorpay? + + You can upgrade to 1 Razorpay by following a simple migration process. Know more about [how to migrate to 1 Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/migration-steps.md). + + + +### 12. Who all need to migrate to 1 Razorpay app? + + All Shopify and Shopify Plus merchants must migrate to the 1 Razorpay payments app to continue accepting payments without service disruptions. + + + +### 13. Who can perform the migration process for 1 Razorpay app? + + Only a Shopify Store Owner or Administrator can complete the migration for a Shopify account. They will need Razorpay account credentials to connect the two applications. + + + +### 14. What changes for me as a Razorpay merchant after I upgrade to 1 Razorpay? + + Nothing will change for you or your customers if you upgrade to the 1 Razorpay app. If you do not migrate, Razorpay will not appear as a payment option for your customers once the old Razorpay app is deprecated. + + + +### 15. What if I do not deactivate the older Razorpay plugin? + + If you do not deactivate the older Razorpay plugin, two Razorpay payment gateways will be visible to your customers on your store checkout, which may lead to confusion. + + +## Checkout and Payment Issues + + +### 16. My customer is getting the following error when they make payments on my Shopify store, "There was an issue processing your payment. Try again or use a different payment method." What should I do? + + Your customers may get the following error when making payments. + ![Shopify page payment error](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/econ-shopify-payment-error.jpg.md) + Uninstall and reinstall the 1 Razorpay App from your Shopify store to resolve the error. + + To uninstall the app: + 1. Open your Shopify store in incognito mode. + 2. Navigate to **Settings** → **Payments**. Click **Manage on 1 Razorpay**. + 3. Go to **Deactivate 1 Razorpay** and click **Uninstall 1 Razorpay**. This uninstalls the 1 Razorpay app. + + Follow the [build integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/integration-steps.md#1-build-integration) steps to install the plugin again. + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you uninstall and reinstall the app instead of only deactivating it. +> + + If your plugin still does not accept payments, contact [Support team](https://razorpay.com/support/). + + + +### 17. Why is my Shopify checkout showing only Razorpay Direct (cards) instead of all payment methods? + + You might have only integrated with Razorpay Direct - Credit Card Plugin, which supports card payments only. To accept UPI, Netbanking, Wallets and Cards at checkout, you need to [integrate with 1 Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/integration-steps.md), which is Razorpay's full payment gateway app for Shopify. + + + +### 18. The Razorpay payment option has disappeared from my Shopify checkout after I added another payment provider. Even after removing it, Razorpay does not show up and I see the error "This store can't accept payments right now." What should I do? + + Active payment method customisations typically cause this issue in your Shopify admin. When adding multiple payment providers, these customisations may conflict and prevent Razorpay from appearing at checkout. + + To fix this, follow the steps below: + 1. Navigate to **Shopify Admin** → **Settings** → **Payments** → **Payment Method Customizations**. + 2. **Disable or remove all customizations** listed under this section. + 3. Save the changes and refresh the checkout page. + + Once the payment customizations are removed, the Razorpay payment option should reappear at checkout. + + If the issue persists, contact our [Support team](https://razorpay.com/support/). + + + +### 19. How can I test a payment for 1 Razorpay on the Shopify store? + + You can test a payment for 1 Razorpay on the Shopify store by switching to test mode. Know more about [how to test a transaction in test mode.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/integration-steps.md#21-make-a-test-transaction-in-test-mode) + +> **INFO** +> +> +> **Handy Tips** +> +> Once you successfully make a test transaction, ensure you uncheck the **Enable test mode** option to accept live payments. +> + + + + +### 20. After migrating to 1 Razorpay, the checkout option for 1 Razorpay appears at the bottom of the list of gateways. Is it possible to move the Razorpay checkout option to the top of the list of gateways? + + No. It is not possible to rearrange the order payment options via the store settings of the Shopify Dashboard as it is a limitation from Shopify's end. + + + +### 21. How can I enable automated payment receipts with GST split? + + Razorpay facilitates only payment collection. The partner is solely responsible for sending invoices or payment receipts with GST details to customers. To provide GST-compliant receipts, partners can use [Razorpay Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) product when collecting payments. + + +## Account Management + + +### 22. Can I connect two merchant ids (MIDs) to the same Shopify Store? + + No, currently you can connect only one MID to your Shopify Store. + +> **INFO** +> +> +> **Handy Tips** +> +> Make sure you log in using the correct Razorpay merchant id (MID) credentials via the Shopify Dashboard. +> + + + + +### 23. Can I integrate a second Razorpay account with my Shopify store? + + No, Shopify currently supports only one Razorpay account integration per store. If you want to integrate a different Razorpay account, you need to [deactivate](#7-how-do-i-uninstall-razorpay-payment-apps) the existing integration first and then [activate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/integration-steps.md) the new account. + + + +### 24. I have two ecommerce websites owned by my company. If I connect both websites to my Razorpay account, will the customers be redirected to the correct webpage after payment? + + Yes, when customers pay through Razorpay on either of your connected websites, they will be redirected to the website they purchased from. + + +## Pricing and Settlements + + +### 25. Will I be charged extra for integrating/migrating to 1 Razorpay app? + + No, there will be no additional charges. Your pricing plan will remain the same as earlier. + + + +### 26. When will my funds be settled? + + Funds will be settled as per the existing settlement schedule. There will be no change to it. + + +## Features and Limitations + + +### 27. Can I enable Subscriptions on my Shopify store? + + No, Shopify does not support Subscriptions. The Ecommerce platforms that support Subscriptions are Woocommerce, Magento, and Open Cart. + + + +### 28. Does the Shopify 1 Razorpay plugin support 3 or 0 decimal unit currencies? + + The Shopify 1 Razorpay plugin currently supports only currencies that use 2 decimal units. For example: USD, EUR, INR. It does not support currencies with 0 decimal (for example, JPY) or 3 decimal units (for example, BHD). + + + +### 29. How do I integrate Meta Pixel to accept payments through Meta Ads? + + Razorpay does not provide a direct plugin integration for accepting payments through Meta Ads. However, you can use Razorpay Payment Pages with [Facebook Pixel and Google Tracking ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/plugins-add-ons.md) to track payments and conversions from your Ad campaigns. + + + +### 30. Can I use Razorpay Route API with my Shopify store? + + No, Razorpay Route API is not supported for Shopify integration. Only the [1 Razorpay plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/integration-steps.md) is supported for Shopify stores. diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/initiate-refunds.md b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/initiate-refunds.md new file mode 100644 index 00000000..2da21580 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/initiate-refunds.md @@ -0,0 +1,49 @@ +--- +title: Initiate Refunds +description: Know how to initiate refunds from the Shopify Dashboard. +--- + +# Initiate Refunds + +You can initiate refunds to customers from the Shopify Dashboard. + +## Initiate Refunds + +Follow these steps: +1. Log in to the Shopify Dashboard. +1. Navigate to Orders and select the order for which you want to refund. +3. Click **Refund**. + ![](/docs/assets/images/ecommerce-plugins-shopify-refund-order.jpg) +4. Enter the amount to be refunded. You can initiate: + - **Full Refund**: Enter the full order amount. + - **Partial Refund**: Enter an amount less than the full amount. +5. Enter a reason for the refund. +6. Click **Refund**. + ![](/docs/assets/images/ecommerce-plugins-shopify-initiate-refund.jpg) + +## Refund a Discounted Payment + +If the customer has selected an offer during checkout, ensure you refund only the discounted cost (Actual Cost minus Discount Amount) of the product/service. + +> **WARN** +> +> +> +> **Watch Out!** +> +> Do not refund the actual cost of the product/service received from the customer. +> + +Particulars | Amount +--- +Actual Cost | +--- +Discount Amount | +--- +Discounted Cost (Actual Cost minus Discount Amount) | +--- +Amount Refundable to Customer | + +The Order displays the refund details: + +![](/docs/assets/images/ecommerce-plugins-shopify-refund-complete.jpg) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/integration-steps.md b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/integration-steps.md new file mode 100644 index 00000000..23db3f92 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/integration-steps.md @@ -0,0 +1,300 @@ +--- +title: Shopify Razorpay Integration Steps | Payment Gateway Setup +heading: Integration Steps +description: Step-by-step guide to integrate Razorpay Payment Gateway with Shopify. Install 1 Razorpay app and start accepting payments on your Shopify store. +--- + +# Integration Steps + +Follow the steps given below to integrate 1 Razorpay App on your Shopify store. + + - **1. Build Integration**: Install the 1 Razorpay App. + + - **2. Test Integration**: Test the integration by making a test payment. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/eFVzIr1lsdA] + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Installation + + **Step 1: Sign up for a Razorpay account**. + 1. [Sign up](https://dashboard.razorpay.com/signup?) for a Razorpay account. If you already have an account, skip to Step 2. + 2. Submit your KYC, and if we need any further clarification, we will reach out to you on WhatsApp, SMS and email. + 3. Once our team completes KYC verification and you are enabled to accept payments, we will send a confirmation on WhatsApp, SMS and email. + + **Step 2: Access the 1Razorpay App on Shopify**. + + Once your Razorpay account is activated, you can install the app using either of these methods: + + + + 1. Click on [this link](https://accounts.shopify.com/store-login?redirect=settings%2Fpayments%2Falternative-providers%2F1058839) to access the "1Razorpay - UPI, Cards, Wallets, NB" App directly on your Shopify store. + + + 1. Login to your Shopify store. + 2. Navigate to **Settings** → **Payments**. + 3. Click **Add payment method** under Additional payment methods. + ![Click Add payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-additional-payment-methods.jpg.md) + 4. Click **Search by provider** and search for "1Razorpay - UPI, Cards, Wallets, NB". + ![Search for 1Razorpay under search by provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-search-by-provider.jpg.md) + + + + **Step 3: Install and Activate the App**. + 1. Click **Install** on the app installation page. + ![Shopify Install](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-1-razorpay-install-install.jpg.md) + + 2. You will be redirected to a landing page. Click **I am an existing user**. + ![Existing Merchant Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-existing-merchant.jpg.md) + 3. Scroll down and click **Login**. + + +> **INFO** +> +> +> **Handy Tips** +> +> Make sure you log in with **store owner** credentials to connect Razorpay with Shopify successfully. +> +> + + ![Shopify login](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-login-v2.gif.md) + + 4. Click **Activate** on the activation screen on your Shopify Dashboard. + ![Shopify Activate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-1razorpay-activate.jpg.md) + + 1 Razorpay now appears as a Payment Gateway on your Shopify Store checkout. + ![Shopify Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-v2-checkout.jpg.md) + + This completes your integration. For more information, see [Shopify FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/faqs.md). + + +## 2. Test Integration + +After the integration of **Shopify - 1 Razorpay** on your Shopify store is complete, follow the steps given below: + + +### 2.1 Make a Test Transaction in Test Mode + + After completing the integration, you must ensure it is working as expected. You can start accepting actual payments from your customers once the test mode transaction is successful. + + Follow the steps given below to test a transaction in test mode: + + 1. Log in to your [Shopify store](https://accounts.shopify.com/lookup?rid=f19e1541-cd24-4856-a398-156d2ed5d56f). + 2. Navigate to **Settings** → **Payments**. + 3. On the **Supported payment methods** section, click **Manage** on the **1 Razorpay** app. + ![Shopify go live v2](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-go-live-v2.jpg.md) + 4. At the bottom of the page, tick the **Enable test mode** option and click **Save**. + ![Shopify go live v2 save test](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-go-live-test.jpg.md) + 5. On your Shopify store, add an item to your cart and click **Buy it now**. + ![Shopify checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/buy-now-shopify.jpg.md) + 6. Fill in your **contact** and **shipping** details and click **Continue to shipping**. + ![Shopify contact details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shipping-contact-details.jpg.md) + 7. Select **1 Razorpay** and click **Complete order**. + ![Shopify complete order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/complete-order.jpg.md) + 8. On the checkout screen, enter your **phone number**, click **PROCEED**, and complete the payment. + + You can make test payments using one of the payment methods configured at the Checkout. + - No money is deducted from the customer's account as this is a simulated transaction. + - Ensure you have entered the API keys generated in the test mode in the Checkout code. + + + + Supported Payment Methods + + After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + + Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + + + + + + + +### 2.2 Update Checkout Settings + + Follow the steps given below for a smooth checkout experience: + 1. Log in to your [Shopify store](https://accounts.shopify.com/lookup?rid=f19e1541-cd24-4856-a398-156d2ed5d56f). + 2. Navigate to **Settings** → **Checkout**. + 3. On the **Customer contact method** section, click **Phone number or email** and click **Save**. + ![Shopify Checkout v2](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-checkout-v2.jpg.md) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Your customer's email ID is prefilled during checkout, but the `phone number` must be entered manually. +> + + + + +### 2.3 Verify Payment Status + + You can track the payment status from the Razorpay Dashboard or by polling APIs. + + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a `payment_ID` has been generated and note the status. In case of a successful payment, the status is marked as `captured`. + ![Payment status on dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/testpayment.jpg.md) + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +## 3. Go-live Checklist + +Follow these steps before taking the integration live: + + +### 3.1 Switch from Test mode to Live mode + + You can perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the installation and integration is working as expected, switch to the Live Mode and start accepting payments from customers. + + Watch this short animation to know how to switch from **Test Mode** to **Live Mode** on your Shopify store. + + ![Shopify Go Live](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-go-live-v2.gif.md) + + To switch from **Test Mode** to **Live Mode**: + 1. Log in to your [Shopify store](https://accounts.shopify.com/lookup?rid=f19e1541-cd24-4856-a398-156d2ed5d56f). + 2. Navigate to **Settings** → **Payments**. + 3. On the **Supported payment methods** section, click **Manage** on the **1 Razorpay** app. + ![Shopify go live v2](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-go-live-v2.jpg.md) + 4. At the bottom of the page, select the **Enable test mode** option and click **Save**. + ![Shopify go live v2 save](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-go-live-save.jpg.md) + You can now start accepting actual payments on your Shopify store. diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/international-payments.md b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/international-payments.md new file mode 100644 index 00000000..b6949f8e --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/international-payments.md @@ -0,0 +1,18 @@ +--- +title: Accept International Payments +description: Accept payments in international currency on your Shopify store. +--- + +# Accept International Payments + +Razorpay helps businesses to accept payments in international currencies. + +You can accept payments in any of the [supported international currencies](https://razorpay.com/docs/payments/international-payments/#supported-currencies) natively. + +To accept payments in international currencies: + +- Raise a request with [Razorpay Support](https://razorpay.com/support/#request) to enable support for international currency on your account. + +- Set your shop's base currency to any of the [supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +- Ensure all your products are priced correctly in the currency of your choice. diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/migration-steps.md b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/migration-steps.md new file mode 100644 index 00000000..45bd2f69 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/migration-steps.md @@ -0,0 +1,102 @@ +--- +title: Migration Steps for Existing Users +description: Follow the step-by-step guide on migrating from the existing Razorpay App to 1 Razorpay App on your Shopify store. +--- + +# Migration Steps for Existing Users + +If you are using Razorpay to accept payments, you can now upgrade to the **1 Razorpay App** on your Shopify Store. Watch the [video tutorial](#video-tutorial) or follow the [migration steps](#migration-steps) to migrate to 1 Razorpay App. Know more about why you need to [upgrade to 1 Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/faqs.md#1-why-do-i-need-to-upgrade-to). + +## Video Tutorial + +Watch this video to know how to migrate from the existing Razorpay App to 1 Razorpay App on your Shopify store. + +[Video: https://www.youtube.com/embed/3mUfBE9WkCo] + +## Migration Steps + +Follow the steps given below to migrate from the existing Razorpay App to 1 Razorpay App. + + +### Migration + + 1. Click on [this link](https://accounts.shopify.com/store-login?redirect=settings%2Fpayments%2Falternative-providers%2F1058839) to access the 1 Razorpay App on your Shopify store. + 2. Click **Install**. + ![Shopify Install](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-1-razorpay-install-new.jpg.md) + 3. You will be redirected to a landing page. Click **I am an existing user**. + ![Existing Merchant Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-existing-merchant.jpg.md) + 4. Scroll down and click **Login**. + +> **INFO** +> +> +> **Handy Tips** +> +> Make sure you log in with **owner** credentials to connect Razorpay with Shopify successfully. +> + + ![Shopify login](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-login-v2.gif.md) + 5. Click **Activate** on the activation screen on your Shopify Dashboard. + + ![Shopify Activate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-1razorpay-activate.jpg.md) + + 1 Razorpay now appears as a Payment Gateway on your Shopify Store checkout. + + ![Shopify Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-v2-checkout.jpg.md) + + +> **WARN** +> +> +> +> **Watch Out!** +> +> Ensure you deactivate the existing Razorpay App after activating the new **1 Razorpay** App. +> +> + + + + +### Deactivation + + To deactivate the existing Razorpay App: + + 1. Click on [this link](https://accounts.shopify.com/store-login?redirect=settings/payments/alternative-providers/1030400) to access the existing Razorpay App on your Shopify store. + 2. Click **Deactivate Razorpay** to deactivate the existing Razorpay App on your Shopify store. + ![Deactivate Shopify v1](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-deactivate-v1-final.jpg.md) + + For more information, see [Shopify FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/faqs.md). + + +## Reconcile Payments on 1 Razorpay + +You can reconcile payments for 1 Razorpay using the **Payment Id** provided at the Shopify checkout. +Know more about how to [reconcile Shopify orders on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/reconcile-payments.md). + +## Difference in Order Information Between Old Razorpay App and 1 Razorpay App + +Check the table below to understand the difference in data about the gateway provided by the Old Razorpay App and 1 Razorpay App. + +**Old Razorpay App** [columWidth="50"] | **1 Razorpay App** +--- +- Razorpay account details. +- Razorpay reference number. +- Currency +- Amount +- Gateway reference Id +- Timestamp +- Signature + | - Payment Id + +The image below shows the difference in data provided by the old Razorpay App and 1 Razorpay App. +![Old New difference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/old-new-plugin.jpg.md) + +> **INFO** +> +> +> +> **Handy Tips** +> +> In the case of the old Razorpay app, multiple data were available to track payments, whereas, in the case of the 1 Razorpay app, only a single piece of data, the `Payment Id`, is provided by Shopify. Know more about [how to process a payment](https://shopify.dev/apps/payments/processing-a-payment#resolve-a-payment) on Shopify. +> diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/reconcile-payments.md b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/reconcile-payments.md new file mode 100644 index 00000000..8e7c0008 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/reconcile-payments.md @@ -0,0 +1,47 @@ +--- +title: Reconcile Shopify Orders on Dashboard +description: Reconcile payments made on your Shopify store via Dashboard. +--- + +# Reconcile Shopify Orders on Dashboard + +Reconciling payments made on your Shopify store with the data available on your Dashboard is a simple process. + +![](/docs/assets/images/ecommerce-plugins-shopify-reconciliation-process-flow.jpg) + + +### Reconcile a Payment + + Follow the steps below to reconcile a payment: + + 1. Log in to the [Shopify Dashboard](https://accounts.shopify.com/) and open the **Orders** tab. Click the drop-down to view the 1 Razorpay payment details. + ![](/docs/assets/images/shopify-rzp-secure-details.jpg) + 2. Make a note of the payment id. + ![](/docs/assets/images/shopify-payment-details.jpg) + 3. Log in to the Dashboard and navigate to **Transactions** → **Payments**. The payment appears on the list of payments. The payment id appears under the **Order Id** column. + ![](/docs/assets/images/shopify-rzp-payment-track.jpg) + 4. Match the payment id (on the Shopify Dashboard) with the Order id (on the Razorpay Dashboard) to map the payments. + + + +### Reconcile Multiple Payments + + Follow the steps below to reconcile multiple payments: + + 1. Log in to the [Shopify Dashboard](https://accounts.shopify.com/) and open the **Orders** tab. + 2. Select the required orders or time period. + 3. Click **Export** to export the data. The **Payment References** column in the file contains the payment ids. + ![Export Shopify order data](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-select-orders.jpg.md) + 4. Log in to the Dashboard and navigate to **Reports**. + 5. Select **Shopify Payments Report** in the **Select Report Type** drop-down. + 6. Select the period and format. + 7. Click **Generate Report**. + ![Download the Shopify Payments Report from Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-payments-report.jpg.md) + 8. Once the report is generated, click **Download**. The **Order ID** column in the file contains the payment ids. + 9. Match the **Payment References** column in the Shopify export with the **Order ID** column in the **Shopify Payments Report** to map the payments. + + +### Related Information + +- [Integrate with Shopify Plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify.md) +- [Shopify FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/shopify/faqs.md) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/whmcs.md b/llm-content/payments/payment-gateway/ecommerce-plugins/whmcs.md new file mode 100644 index 00000000..e2e964d3 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/whmcs.md @@ -0,0 +1,42 @@ +--- +title: Prerequisites | WHMCS - Prerequisites +heading: Prerequisites +description: Check the prerequisites before you integrate your WHMCS website with Razorpay Payment Gateway. +--- + +# Prerequisites + +- **WHMCS Changelog**: Discover new features, updates and deprecations related to the Razorpay WHMCS plugin (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about the Razorpay WHMCS plugin. + +**Before you proceed:** + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +## Supported Versions + +We support the following versions of WHMCS: WHMCS 6, WHMCS 7 and WHMCS 8. + + - **Video Tutorial**: Watch the video before you start integrating the WHMCS plugin with Payment Gateway. + + - **Integration Steps**: Check the steps to integrate the WHMCS plugin with Payment Gateway. + +## Supported Products + +Razorpay WHMCS Plugin is only supported on Web Standard Checkout and the following products: + +Payment Gateway | Route | Subscriptions +--- +✓ | x | x + +## Support + +- Queries: If you have any queries, raise a ticket on the Razorpay [Support Portal](https://razorpay.com/support/). +- Feature Request: If you have a feature request, create an issue on [GitHub](https://github.com/razorpay/razorpay-whmcs/issues/new). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/whmcs/faqs.md b/llm-content/payments/payment-gateway/ecommerce-plugins/whmcs/faqs.md new file mode 100644 index 00000000..c064b7ff --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/whmcs/faqs.md @@ -0,0 +1,33 @@ +--- +title: Payment Gateway | WHMCS - FAQs +heading: Troubleshooting & FAQs +description: Find answers to frequently asked questions about WHMCS plugin. +--- + +# Troubleshooting & FAQs + +### 1. My customer made a payment on my WHMCS site. However, the payment is in the authorized state and did not get captured. The payment status is not reflecting on WHMCS. How to resolve this? + + - Cause: This error occurs with Modulesgarden-enabled WHMCS installation. Modulesgarden plugins update `system_url` from example.com to example.com/, which changes the URL from `"example.com/modules/gateways/callback/razorpay.php"` to `"example.com/modules/gateways/callback/razorpay.php"`. + Due to this, the HTTP POST request stops working. + + - Resolution: To solve this issue, remove "/" in `"/modules/gateways/callback/razorpay.php"`. + + + +### 2. What troubleshooting procedures should be carried out prior to initiating a support ticket? + + Follow the troubleshooting steps given below: + 1. Reinstall the Razorpay WHMCS plugin and ensure that your system meets all the requirements mentioned [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/whmcs/integration-steps.md). + 2. We recommend you to keep your Razorpay WHMCS plugin up to date. You can find the latest versions [here](https://github.com/razorpay/razorpay-whmcs/releases). + 3. If the issue persists after following these steps, contact our [Support team](https://razorpay.com/support/). Provide the following information while creating a ticket: + - Razorpay WHMCS plugin version + - Steps to reproduce the issue (Screen recording/Screenshots) + - Error logs, if any + - Staging website credentials (login URL, login id, and password) + + + +### 3. Does the WHMCS plugin support 3 or 0 decimal unit currencies? + + The WHMCS plugin currently supports only currencies that use 2 decimal units. For example: USD, EUR, INR. It does not support currencies with 0 decimal (for example, JPY) or 3 decimal units (for example, BHD). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/whmcs/integration-steps.md b/llm-content/payments/payment-gateway/ecommerce-plugins/whmcs/integration-steps.md new file mode 100644 index 00000000..b04ecd5d --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/whmcs/integration-steps.md @@ -0,0 +1,319 @@ +--- +title: Payment Gateway | WHMCS - Integration Steps +heading: Integration Steps +description: Steps to integrate your WHMCS website with Razorpay Payment Gateway. +--- + +# Integration Steps + +Follow the steps given below to integrate Razorpay Payment Gateway with your WHMCS website. + + - **1. Build Integration**: Install and configure the WordPress plugin. + + - **2. Test Integration**: Test the integration by making a test payment. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/BjRz4vg38gA] + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Installation and Configuration + + 1. Ensure you have installed the latest version of WHMCS. + 1. Download the Source code zip file of the required version of the plugin from the Releases section in GitHub. + - If you are using WHMCS 5, download the release tagged [version 1.0.3](https://github.com/razorpay/razorpay-whmcs/releases/tag/v1.0.3). + - If you are using WHMCS 6, 7 or 8, download the release tagged [version 2.0.1](https://github.com/razorpay/razorpay-whmcs/releases/tag/2.0.1). + 1. Unzip and upload the repository contents to your WHMCS Installation directory. That is, the contents of the module folder from the repository go into the module folder of your WHMCS Installation directory. + 1. Log in to your site as the WHMCS administrator. This is done by adding `/admin` to the URL where you have installed WHMCS, for example, `www.example.com/whmcs/admin`. + 1. Navigate to **Setup** → **Payments** → **Payment Gateways**. + 1. Select Razorpay from the drop-down list and **Activate** it. + 1. Enter the [KEY_ID] and [KEY_SECRET]. You can generate these from your Razorpay Dashboard. + 1. Set **Convert for Processing** to INR if your store has a different default currency. In this case, update the Exchange Rate in your currency management settings. + 1. Click **Save Changes**. + + + +### 1.2 Configure Webhooks + + To receive webhook notifications, you should configure webhooks on your WHMCS site and the Razorpay Dashboard. + + + + To set up webhooks in the WHMCS site: + 1. Log in to your site as the WHMCS administrator. + 2. Navigate to **System Settings** → **Payment Gateways**. + 3. Click **Manage Existing Gateways**. + 4. Select the **Enable Webhook** option. + 5. Copy the URL that appears on the screen. In the Razorpay Dashboard, configure this URL in **Accounts & Settings** → **Webhooks**. Know more about how to [setup webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + 6. Enter the secret. + + ![Setting up Webhooks on WHMCS site](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-whmcs-whmcs-webhooks.jpg.md) + + + + To set up webhooks in the Razorpay Dashboard: + 1. Log in to the Razorpay Dashboard. + 2. Navigate to **Accounts & Settings** → **Webhooks**. + 3. Click + Add New Webhook. + 4. In the Webhook Setup modal: + - Paste the URL copied from the WHMCS site. + +> **INFO** +> +> +> **Handy Tips** +> +> Webhooks can only be delivered to public URLs. You will notice an error if you attempt to save a localhost endpoint as part of a webhook setup. Know about [validating and testing webhooks for alternatives to localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#test-webhooks). +> + + - Enter the Secret you provided on the WHMCS site. The secret is used to validate where the webhook is from Razorpay. Do not expose the secret publicly. Know about how to [validate webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#validate-webhooks). + - In the **Alert Email field**, enter the email address to which notifications must be sent in case of webhook failure. + - Select the `order.paid` event from the list of **Active Events**. + + 5. Click **Create Webhook**. + + ![Setting up Webhooks on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-whmcs-rzp-webhooks.jpg.md) + + + + +## 2. Test Integration + +After the integration, a **Pay** button will appear on your web page/app. You need to click the button and make a test transaction to ensure the integration works as expected. You can start accepting actual payments from your customers once the test is successful. + +You can make test payments using one of the payment methods configured at the Checkout. +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API keys generated in the test mode in the Checkout code. + + + +### Supported Payment Methods + + After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + + Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + + + + +### Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + + +## 3. Go-live Checklist + +Follow these steps before taking the integration live: + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/wix.md b/llm-content/payments/payment-gateway/ecommerce-plugins/wix.md new file mode 100644 index 00000000..ca6e6d74 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/wix.md @@ -0,0 +1,35 @@ +--- +title: Prerequisites | Wix - Prerequisites +heading: Prerequisites +description: Check the prerequisites before you integrate your Wix website with Razorpay Payment Gateway. +--- + +# Prerequisites + +- **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about the Razorpay Wix Extension. + +**Before you proceed:** + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **Video Tutorial**: Watch the video before you start integrating the Wix extension with Payment Gateway. + + - **Integration Steps**: Check the steps to integrate the Wix extension with Payment Gateway. + +## Supported Products + +Razorpay Wix Plugin is only supported on Web Standard Checkout and the following products: + +Payment Gateway | Route | Subscriptions +--- +✓ | x | x + +## Support + +If you have any queries, raise a ticket on the Razorpay [Support Portal](https://razorpay.com/support/). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/wix/faqs.md b/llm-content/payments/payment-gateway/ecommerce-plugins/wix/faqs.md new file mode 100644 index 00000000..c6b5688a --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/wix/faqs.md @@ -0,0 +1,187 @@ +--- +title: Payment Gateway | Wix - FAQs +heading: Troubleshooting & FAQs +description: Find answers to frequently asked questions about Wix plugin. +--- + +# Troubleshooting & FAQs + +### 1. I am unable to connect to my Razorpay account even after providing the API key and the secret on the Wix Dashboard. What could be the reason? + + **Cause**: Before connecting your account with the Wix platform, you need to set up Webhooks on the Dashboard. If you do not set up Webhooks, there may be connection errors. + + **Resolution**: Set up webhooks. + + To set up Webhooks: + 1. Log in to the Razorpay Dashboard and navigate to **Account & Settings**. + 2. In the **Website and app settings** section, click **Webhooks**. + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 3. Click **+ Add New Webhook**. + ![](/docs/assets/images/webhooks-webhook-creation-1.jpg) + 4. In the **Webhook Setup** pop-up page: + 1. Enter the **Website URL** as `https://express.razorpay.com/wix/v1/webhook-handler`. + 2. Enter a **Secret** for the Webhook endpoint. The secret is used for validation purposes. + +> **INFO** +> +> +> **Handy Tips** +> +> The secret that you enter here can validate that the Webhooks are from Razorpay. Do not expose the secret publicly. +> + + 3. Select the following events from the list of **Active Events**: + - `order.paid` + - `refund.processed` + - `payment.failed` + +> **INFO** +> +> +> **Handy Tips** +> +> If you use this Razorpay account to accept payments on your Wix site, **you can set up only one Webhook** on the Dashboard. +> + + 5. Click **Save** to enable Webhooks. + + + +### 2. I am getting the following error during Wix plugin integration, "We are not able to connect your account. Please try again later." + + **Cause**: This error message is displayed if the Webhook is not configured correctly on the Dashboard. + + **Resolution**: To fix this error, check the reasons and their solutions as mentioned below: + + + Issue [columWidth="90"] | Solution [columWidth="10"] + --- + You have provided your own Webhook URL. | You must provide `"https://express.razorpay.com/wix/v1/webhook-handler"` as the Webhook URL. + --- + You have provided the correct URL but have subscribed to all the Webhook events.| You must subscribe to only the `order.paid`, `refund.processed` and `payment.failed` events. + --- + You have provided the correct URL and subscribed to the correct events but have not entered the secret. | You must enter the secret for the Webhook. + + + + +### 3. Does Wix support Subscriptions? + + No. Wix does not support Subscriptions. The plugins that support subscriptions are Woocommerce, Magento and OpenCart. + + + +### 4. What troubleshooting procedures should be carried out prior to initiating a support ticket? + + Follow the troubleshooting steps given below: + 1. Reinstall the Razorpay Wix plugin and ensure that your system meets all the requirements mentioned [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/wix/integration-steps.md). + 2. If the issue persists after following these steps, contact our [Support team](https://razorpay.com/support/). Provide the following information while creating a ticket: + - Wix version + - Razorpay for Wix plugin version + - PHP version + - Steps to reproduce the issue (Screen recording/Screenshots) + - Error logs, if any + - Staging website credentials (login URL, login id, and password) + + + +### 5. Does the Wix plugin support 3 or 0 decimal unit currencies? + + The Wix plugin currently supports only currencies that use 2 decimal units. For example: USD, EUR, INR. It does not support currencies with 0 decimal (for example, JPY) or 3 decimal units (for example, BHD). + + + +### 6. How can I verify if webhooks are auto-configured? + + + To verify if webhooks are enabled: + 1. Log in to the Razorpay Dashboard and navigate to **Accounts and Settings**. + 2. Go to **Webhooks** (Under Website and app settings). + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 3. Select the relevant webhook **URL**. + 4. On the right panel, check if the status for `order.paid`, `refund.processed` and `payment.failed` is enabled. + ![List of webhooks created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/plugin-webhook-faq.jpg.md) + + + Dashboard and navigate to **Account & Settings**. + 2. In the **Website and app settings** section, click **Webhooks**. + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 3. Click **+ Add New Webhook**. + ![](/docs/assets/images/webhooks-webhook-creation-1.jpg) + 4. In the **Webhook Setup** pop-up page: + 1. Enter the **Website URL** as `https://express.razorpay.com/wix/v1/webhook-handler`. + 2. Enter a **Secret** for the Webhook endpoint. The secret is used for validation purposes. + +> **INFO** +> +> +> **Handy Tips** +> +> The secret that you enter here can validate that the Webhooks are from Razorpay. Do not expose the secret publicly. +> + + 3. Select the following events from the list of **Active Events**: + - `order.paid` + - `refund.processed` + - `payment.failed` + +> **INFO** +> +> +> **Handy Tips** +> +> If you use this Razorpay account to accept payments on your Wix site, **you can set up only one Webhook** on the Razorpay Dashboard. +> + + 5. Click **Save** to enable Webhooks. + + + +### 2. I am getting the following error during Wix plugin integration, "We are not able to connect your account. Please try again later." + + **Cause**: This error message is displayed if the Webhook is not configured correctly on the Dashboard. + + **Resolution**: To fix this error, check the reasons and their solutions as mentioned below: + + + Issue [columWidth="90"] | Solution [columWidth="10"] + --- + You have provided your own Webhook URL. | You must provide `"https://express.razorpay.com/wix/v1/webhook-handler"` as the Webhook URL. + --- + You have provided the correct URL but have subscribed to all the Webhook events.| You must subscribe to only the `order.paid`, `refund.processed` and `payment.failed` events. + --- + You have provided the correct URL and subscribed to the correct events but have not entered the secret. | You must enter the secret for the Webhook. + + + + +### 3. What troubleshooting procedures should be carried out prior to initiating a support ticket? + + Follow the troubleshooting steps given below: + 1. Reinstall the Razorpay Wix plugin and ensure that your system meets all the requirements mentioned [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/wix/integration-steps.md). + 2. If the issue persists after following these steps, contact our [Support team](https://razorpay.com/support/). Provide the following information while creating a ticket: + - Wix version + - Razorpay for Wix plugin version + - PHP version + - Steps to reproduce the issue (Screen recording/Screenshots) + - Error logs, if any + - Staging website credentials (login URL, login id, and password) + + + +### 4. Does the Wix plugin support 3 or 0 decimal unit currencies? + + The Wix plugin currently supports only currencies that use 2 decimal units. For example: USD, EUR, INR. It does not support currencies with 0 decimal (for example, JPY) or 3 decimal units (for example, BHD). + + + +### 5. How can I verify if webhooks are auto-configured? + + + To verify if webhooks are enabled: + 1. Log in to the Razorpay Dashboard and navigate to **Accounts and Settings**. + 2. Go to **Webhooks** (Under Website and app settings). + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 3. Select the relevant webhook **URL**. + 4. On the right panel, check if the status for `order.paid`, `refund.processed` and `payment.failed` is enabled. + ![List of webhooks created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/plugin-webhook-faq.jpg.md) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/wix/integration-steps.md b/llm-content/payments/payment-gateway/ecommerce-plugins/wix/integration-steps.md new file mode 100644 index 00000000..d1d99036 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/wix/integration-steps.md @@ -0,0 +1,251 @@ +--- +title: Payment Gateway | Wix - Integration Steps +heading: Integration Steps +description: Steps to integrate your Wix website with Razorpay Payment Gateway. +--- + +# Integration Steps + +Follow the steps given below to integrate Razorpay Payment Gateway with your Wix website. + + - **1. Build Integration**: Install the Wix plugin. + + - **2. Test Integration**: Test the integration by making a test payment. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/4v6gBuOJQgI] + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Add Razorpay as a Payment Gateway + + 1. Log in to your [Wix website](https://users.wix.com/signin). + 2. Navigate to **Settings** → **Accept payments**. + ![Settings and Accept Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/wix-settings-accept.jpg.md) + 4. Click **Connect** beside **Razorpay**. + ![add razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/wix-rzp-connect.jpg.md) + 5. Enter your **API Key Id**, **Key Secret** and **Site URL**. Click **Connect**. + ![account activation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/wix-api.jpg.md) + 6. You have successfully connected your Wix website with Razorpay. + ![dialog box](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/wix-final.jpg.md) + + +## 2. Test Integration + +After the integration, a **Pay** button will appear on your webpage. Click the button and make a test transaction to ensure the integration works as expected. You can start accepting actual payments from your customers once the test is successful. + +![](/docs/assets/images/arastta-pay-button.jpg) + +You can make test payments using one of the payment methods configured at the Checkout. +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API keys generated in the test mode in the Checkout code. + + +### Supported Payment Methods + + After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + + Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + + + + +### Verify Payment Status + + You can track the payment status from the Dashboard or by polling APIs. + + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a `payment_ID` has been generated and note the status. In case of a successful payment, the status is marked as `captured`. + + ![](/docs/assets/images/testpayment.jpg) + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +## 3. Go-live Checklist + +Follow these steps before taking the integration live: + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce.md b/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce.md new file mode 100644 index 00000000..1611c014 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce.md @@ -0,0 +1,73 @@ +--- +title: Razorpay WooCommerce Integration | Prerequisites +heading: Prerequisites +description: Integrate Razorpay Payment Gateway with WooCommerce. Complete prerequisites, setup guide and installation steps for WooCommerce Razorpay plugin. +--- + +# Prerequisites + +- **WooCommerce Changelog**: Discover new features, updates and deprecations related to the Razorpay WooCommerce plugin (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about the Razorpay WooCommerce plugin. + +Razorpay WooCommerce integration allows you to accept payments on your WordPress WooCommerce store using the Razorpay Payment Gateway plugin. This guide covers the prerequisites and setup steps to integrate Razorpay with WooCommerce, enabling UPI, Cards, Netbanking and Wallets payments. + +**Before you proceed:** + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. +- Before installing the Razorpay WooCommerce subscription plugin, it is essential to have WooCommerce for subscriptions already installed. + +. +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +> **INFO** +> +> +> **Handy Tips** +> +> - If you are not using WooCommerce, you can use our [native plugin for WordPress](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/wordpress.md). +> - Razorpay WooCommerce subscription plugin is available only in the paid versions of WooCommerce. +> - For Subscriptions on a WooCommerce-based website, you can use our [Subscriptions plugin for WooCommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/woocommerce.md). +> +> + +## Supported Versions + +- Wordpress v3.9.2 or higher +- WooCommerce v4.0 or higher +- PHP v7.0 or higher +- php-cURL + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Ensure you have the php-cURL extension installed to make the network calls required to use this plugin. +> - The plugin is tested using WooCommerce v8.6.1 +> + + - **Video Tutorial**: Watch the video before you start integrating the WooCommerce plugin with Payment Gateway. + + - **Integration Steps**: Check the steps to integrate the WooCommerce plugin with Payment Gateway. + +## Supported Products + +Razorpay WooCommerce Plugin is only supported on Web Standard Checkout and the following products: + +Payment Gateway | Route | Subscriptions | [Razorpay Trusted Business](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/trusted-business/rtb-widget-woocommerce.md) +--- +✓ | ✓ | ✓ | ✓ + +## Support + +- Queries: If you have any queries, raise a ticket on the Razorpay [Support Portal](https://razorpay.com/support/). +- Feature Request: If you have a feature request, create an issue on [GitHub](https://github.com/razorpay/razorpay-woocommerce). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce/integration-steps.md b/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce/integration-steps.md new file mode 100644 index 00000000..1e7f05f1 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce/integration-steps.md @@ -0,0 +1,287 @@ +--- +title: WooCommerce Razorpay Integration Steps | Payment Gateway Setup Guide +heading: Integration Steps +description: Step-by-step guide to integrate Razorpay Payment Gateway with WooCommerce. Install Razorpay WooCommerce plugin and start accepting payments on WordPress. +--- + +# Integration Steps + +Integrate Razorpay Payment Gateway with your WooCommerce website using our official WooCommerce plugin. This step-by-step guide covers installation, configuration, testing and going live with Razorpay on WordPress WooCommerce stores. + +Follow the steps given below to integrate Razorpay Payment Gateway with your WooCommerce website. + + - **1. Build Integration**: Install and configure the WordPress plugin. + + - **2. Test Integration**: Test the integration by making a test payment. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/p2YMdxZMyxQ] + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Install Plugin + + There are two methods to install our WooCommerce plugin: + + + + 1. [Download the plugin](https://wordpress.org/plugins/woo-razorpay/). + 1. Install it from the WordPress Plugin Directory. + + + 1. Download the [latest Source code zip file](https://github.com/razorpay/razorpay-woocommerce/releases/latest) from the Releases section in GitHub. + 1. Unzip and upload the contents of the extension to your `/wp-content/plugins/` directory. + + + + + +### 1.2 Configure WooCommerce + + 1. Log in to your [WordPress account](https://wordpress.com/log-in) and activate the Razorpay plugin in the **WordPress Plugin Manager**. + 2. Log in to your [WooCommerce account](https://woocommerce.com/), navigate to **Settings** and click the **Checkout/Payment Gateways** tab. + 3. Click **Razorpay** to edit the settings. + 4. Enable the Payment Method, name it Credit Card/Debit Card/Internet Banking. This is shown on the Payment page your customer sees. + + +> **INFO** +> +> +> **Handy Tips** +> +> If you cannot see the Razorpay payment option during WooCommerce checkout, update the plugin to the [latest](https://github.com/razorpay/razorpay-woocommerce/releases/latest) version. +> ![Payments option error](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/Woocommerce-payment-error.jpg.md) +> +> + + + 5. Add in your [KEY_ID] and [KEY_SECRET] generated from the Razorpay Dashboard. + 6. Set the **Payment Action** to **Authorize and Capture** to auto-capture payments. If you want to capture payments manually from the Dashboard after manual verification, set the Payment Method to **Authorize**. + + +> **INFO** +> +> +> +> **Configure Webhooks** +> +> Webhook is [auto-configured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce/troubleshooting-faqs.md#1-how-are-webhooks-aut-configured) when you enter and save the API key ID and secret on the plugin settings page. You need to verify if webhooks are enabled on your Razorpay [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce/troubleshooting-faqs.md#3-how-can-i-verify-if-webhooks-are). However, for versions lower than 3.5.0, you need to [configure webhooks manually](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce/troubleshooting-faqs.md#2-my-webhooks-are-not-auto-configured-since-i). +> + +## 2. Test Integration + +After the integration is complete, a **Pay** button will appear on your web page/app. You need to click the button and make a test transaction to ensure that the integration is working as expected. You can start accepting actual payments from your customers once the test is successful. + +You can make test payments using one of the payment methods configured at the Checkout. +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API keys generated in the test mode in the Checkout code. + + +### Supported Payment Methods + + After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + + Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + + + + +### Verify Payment Status + + You can track the payment status from the Dashboard or by polling APIs. + + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a `payment_ID` has been generated and note the status. In case of a successful payment, the status is marked as `captured`. + + ![](/docs/assets/images/testpayment.jpg) + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +## 3. Go-live Checklist + +Follow these steps before taking the integration live: + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce/troubleshooting-faqs.md new file mode 100644 index 00000000..209fb805 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce/troubleshooting-faqs.md @@ -0,0 +1,530 @@ +--- +title: Payment Gateway | WooCommerce - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common errors and find answers to frequently asked questions about WooCommerce Ecommerce Plugin integration. +--- + +# Troubleshooting & FAQs + +### 1. How are webhooks auto-configured? + + - Auto-webhook support is available for Razorpay Woocommerce Plugin from v3.5.0 onwards. + - Once you save the changes on the Woocommerce Dashboard, webhooks are auto configured for events: `payment.authorized` and `refund.created`. You do not have to configure it on the Dashboard. + + To set up webhooks: + 1. In the WordPress Dashboard, click **WooCommerce** and navigate to **Settings**. + 2. In the **Payments** tab, enter the **Key ID** and **Key Secret**. + ![Enter key id and secret](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/plugin-wooc-key-id-secret.jpg.md) + 3. Click **Save Changes**. + ![Save changes for auto webhook generation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/plugin-wooc-save.jpg.md) + + + +### 2. My webhooks are not auto-configured since I am not using the upgraded version of the Razorpay WooCommerce plugin. How do I manually configure webhooks? + + If you are not using the upgraded version of Razorpay WooCommerce plugin, you can manually configure the following events: + - `payment.authorized` + - `payment.pending` + - `refund.created` + - `virtual_account.credited` + - `subscription.cancelled` + - `subscription.paused` + - `subscription.resumed` + + To set up webhooks manually: + 1. Log in to the Razorpay Dashboard and navigate to **Account & Settings**. + 2. In the **Website and app settings** section, click **Webhooks**. + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 3. Click **+ Add New Webhook**. + ![Add a new webhooks button on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-1.jpg.md) + 4. In the **Webhook Setup** pop-up page: + 1. Enter the **URL** where you want to receive the webhook payload when an event is triggered. We recommend using an HTTPS URL. + +> **INFO** +> +> +> **Handy Tips** +> +> You can set up to **30 URLs** to receive Webhook notifications. Webhooks can only be delivered to public URLs. If you attempt to save a localhost endpoint as part of a webhook setup, you will notice an error. Know more about [testing Webhooks on an application running on localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#application-running-on-localhost). +> + + + 2. Enter a **Secret** for the webhook endpoint. The secret is used to validate that the webhook is from Razorpay. Do not expose the secret publicly. Know more about [how to validate webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> - When setting up the webhook, you will be asked to specify a secret. Using this secret, you can validate that the webhook is from Razorpay. Entering the secret is optional but recommended. The secret should never be exposed publicly. +- The webhook secret does not need to be the merchant secret key provided by Razorpay. + +> + + + 3. In the **Alert Email** field, enter the email address to which the notifications should be sent in case of webhook failure. You will receive webhook deactivation notifications to this email address. + 4. Select the required events from the list of **Active Events**. + ![List of active webhook events on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-2.jpg.md) + + 5. Click **Create Webhook**. After you set a webhook, it appears on the list of webhooks. + ![List of webhooks on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/plugin-webhook-faq.jpg.md) + 6. You can select the webhook and click **Edit** to make more changes. + + + +### 3. How can I verify if webhooks are auto-configured? + + To verify if webhooks are enabled: + 1. Log in to the Razorpay Dashboard and navigate to **Account & Settings**. + 2. In the **Website and app settings** section, click **Webhooks**. + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 3. Select the relevant webhook **URL**. + 4. On the right panel, check if the status for `payment.authorized` and `refund.created` is enabled. + ![List of webhooks created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/plugin-webhook-faq.jpg.md) + + + +### 4. Can I make partial payments using WooCommerce? + + No, partial payments are not supported on WooCommerce. You can either choose to deduct the full amount or make two separate orders and the customer will have to pay twice for it. + + + +### 5. I am getting the following error message "RAZORPAY ERROR: Order creation failed with the message: The API key provided is invalid". Why? + + Verify and confirm that the API keys you have provided within WordPress are accurate. If the issue persists, contact our [Support team](https://razorpay.com/support/). + + + +### 6. I am getting the following php error in the Razorpay plugin:"PHP message: ORDER NUMBER 57999:webhook conflict over for razorpay order: order_LWVB71vGYh7nEr". Why? + + The message in the logs is not an error, it is a logged message. This message appears only when a webhook callback takes longer than 5 minutes to process. Our webhook mechanism includes a 5-minute waiting period to prevent the occurrence of duplicate orders. + + + +### 7. Why am I getting the error message: "RAZORPAY ERROR: Order creation failed with the message "Authentication failed"."? + + "Authentication failed" error occurs when there is a discrepancy between the API keys. Verify the API key provided for your website and ensure that it matches with the key generated via Dashboard. + + + +### 8. I am getting the following error in WordPress: "Required parameter $razorpayPaymentId follows optional parameter $amount in /home/xxxcustom/public_html/wp-content/plugins/woo-razorpay/woo-razorpay.php on line 1353". Why? + + Follow the steps given below to resolve the issue: + 1. Deactivate and delete the Razorpay WooCommerce plugin from your [WordPress Dashboard](https://wordpress.com/log-in). + 2. Reinstall the [Razorpay WooCommerce plugin](https://wordpress.org/plugins/woo-razorpay/). + 3. For easy integration journey, watch the [Razorpay WooCommerce Integration tutorial](https://www.youtube.com/watch?v=p2YMdxZMyxQ). + + + +### 9. I am getting the following error: "Plugin could not be activated because it triggered a fatal error. + Parse error: syntax error, unexpected 'int' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /home4/yutihbjy/public_html/wp-content/plugins/woo-razorpay/includes/cron/one-click-checkout/one-cc-address-sync.php on line 12" + + If you encounter this error message while trying to activate the Razorpay for WooCommerce plugin, follow the steps given below to resolve the issue: + 1. Uninstall the Razorpay for WooCommerce plugin from your WordPress Dashboard. Ensure you delete the plugin entirely, not just deactivate it. + 2. Remove the WooCommerce webhook associated with Razorpay from the Dashboard. Know how to [delete a webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md#delete-a-webhook). + 3. After removing both the plugin and the webhook, install the latest version of the [Razorpay for WooCommerce plugin](https://wordpress.org/plugins/woo-razorpay/). + + If the issue persists even after following these steps, contact our [Support team](https://razorpay.com/support/) with the following information: + + - WooCommerce version + - WordPress version + - Razorpay for WooCommerce plugin version + - A screen recording of the checkout flow (if possible) + - Staging site credentials (if applicable) + - Test Key and Secret from your Razorpay account + + + +### 10. Why am I getting a "404 Page Not Found" error on the checkout when I select Razorpay as a payment option? + + If you encounter this error, follow the steps given below to resolve the issue: + 1. Log in to WordPress Dashboard, click **WooCommerce** and navigate to **Settings**. + 2. In the **Advanced** tab, look for the **Page Setup** section. Ensure that you have correctly linked the **Cart page** and **Checkout page**. + ![Enter Cart page and checkout page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/plugin-wooc-faq-pagesetup.jpg.md) + 3. Validate the **Checkout Endpoints** settings: + - For the **Pay** endpoint, set it to **order-pay**. + - For the **Order Received** endpoint, set it to **order-received**. + ![Enter pay endpoint and order endpoint](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/plugin-wooc-faq-checkout-endpoint.jpg.md) + + If the issue persists even after following these steps, contact our [Support team](https://razorpay.com/support/). + + + +### 11. What troubleshooting procedures should be carried out before initiating a support ticket? + + Follow the troubleshooting steps given below: + 1. Ensure that your system meets all the requirements mentioned [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce.md#compatibilities-and-dependencies). + 2. We recommend you to keep your WordPress, WooCommerce, and Razorpay for WooCommerce plugins up to date. You can find the latest versions [here](https://github.com/razorpay/razorpay-woocommerce/releases). + 3. You can perform initial debugging. Follow the steps given below to debug: + 1. Deactivate all plugins except for Razorpay and WooCommerce. + 2. If you are using a paid theme, switch to a default WordPress theme and check if the issue persists. + 3. Verify if the Razorpay checkout is rendering correctly. If not, try reinstalling the Razorpay for WooCommerce plugin. + 4. If the issue persists after following these steps, contact our [Support team](https://razorpay.com/support/). Provide the following information while creating a ticket: + - WordPress version + - WooCommerce version + - Razorpay for WooCommerce plugin version + - PHP version + - WordPress theme + - Steps to reproduce the issue (Screen recording/Screenshots) + - Error logs, if any + - Staging website credentials (login URL, login id, and password) + + + +### 12. How do I reconfigure webhooks for Razorpay in WooCommerce? + + To reconfigure webhooks for Razorpay in WooCommerce, follow the steps given below: + 1. Deactivate and delete the Razorpay WooCommerce plugin from your [WordPress Dashboard](https://wordpress.com/log-in). + 2. Remove the WooCommerce webhook associated with Razorpay from the Dashboard. Know how to [delete a webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md#delete-a-webhook). + 3. After removing both the plugin and the webhook, install the latest version of the [Razorpay for WooCommerce plugin](https://wordpress.org/plugins/woo-razorpay/). + + + +### 13. How can I revert to the legacy order confirmation page on WooCommerce? + + Follow the steps given below to revert to the legacy order confirmation page: + + 1. Open the Order Confirmation template in the Site Editor by navigating to **Appearance** → **Editor** → **Templates** → **Order Confirmation**. + 2. Open the **List View** and delete all the special Order Confirmation blocks. + + +> **INFO** +> +> +> **Handy Tips** +> +> Hold shift to select multiple blocks between the current selection and the block you click. +> + + 3. Open the **Block Inserter**, search for **Order Confirmation Block** and add it. + ![woocommerce add order confirmation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/woocommerce-order-confirmation.jpg.md) + 4. Click **Save**. + + + +### 14. Does Razorpay WooCommerce support High-Performance Order Storage(HPOS)? + + Yes, Razorpay WooCommerce supports High-Performance Order Storage(HPOS). It is recommended to enable this feature when there is minimal traffic in the store. + + + +### 15. I am getting the error: "Invalid signature passed" when I trigger the webhook. What should I do? + + If you encounter this error message, follow the below steps to troubleshoot this issue: + 1. Uninstall the Razorpay for WooCommerce plugin from your WordPress Dashboard. Ensure you delete the plugin entirely, not just deactivate it. + 2. Remove the WooCommerce webhook associated with Razorpay from the Dashboard. Know how to [delete a webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md#delete-a-webhook). + 3. After removing both the plugin and the webhook, install the latest version of the [Razorpay for WooCommerce plugin](https://wordpress.org/plugins/woo-razorpay/). + + If the issue persists even after following these steps, contact our [Support team](https://razorpay.com/support/). + + + +### 16. Does Razorpay WooCommerce support Checkout Blocks? + + Yes, Razorpay WooCommerce supports Checkout Blocks. + + + +### 17. Is the WooCommerce subscription plugin free? + + No, the WooCommerce subscription plugin is only available in the paid version of WooCommerce. + + + +### 18. Is it mandatory to set an expiry date for a subscription? + + Yes, it is mandatory. We do not support subscriptions with no expiry date on the WooCommerce plugin. + + + +### 19. Does the WooCommerce plugin support 3 or 0 decimal unit currencies? + + The WooCommerce plugin currently supports only currencies that use 2 decimal units. For example: USD, EUR, INR. It does not support currencies with 0 decimal (for example, JPY) or 3 decimal units (for example, BHD). + + + +### 20. How and where can I check the Razorpay logs in WooCommerce? + + To check the Razorpay logs on WooCommerce, follow these steps: + 1. Go to WordPress Admin and navigate to **WooCommerce**. Click **Status**. + ![Woocommerce Dashboard status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/woocommerce-status-logs.jpg.md) + 2. Select **Logs**. Locate and open **razorpay-logs** to view the logs. + ![Razorpay logs on logs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/razorpay-logs.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> A new log file is created every day, so be sure to check the most recent file for the latest logs. +> + + + + + +### 21. Why is the payment captured on Razorpay but not updated on WooCommerce for some orders? + + This issue may arise due to incorrect webhook configuration or domain allowlisting. To resolve this: + 1. Ensure that the [webhook is configured correctly](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce/troubleshooting-faqs.md#2-my-webhooks-are-not-auto-configured-since-i) in your Razorpay Dashboard. + 2. After placing an order, check the [WooCommerce site logs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce/troubleshooting-faqs.md#20-how-and-where-can-i-check-the) for entries such as: + - `Webhook conflict due to early execution for razorpay order` + - `Webhook conflict over for razorpay order` + - `Webhook process finished the updateOrder function` + + If these logs are missing, the issue might occur due to domain allowlisting. To resolve this, list [Razorpay's IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#webhook-ips) in your server settings. + + + +### 22. My Razorpay Payment Gateway is not working properly on WooCommerce. How do I fix integration issues? + + Follow the steps given below to resolve the issue: + 1. Deactivate and delete the Razorpay WooCommerce plugin from your [WordPress Dashboard](https://wordpress.com/log-in). + 2. Reinstall the [Razorpay WooCommerce plugin](https://wordpress.org/plugins/woo-razorpay/). + 3. For easy integration journey, watch the [Razorpay WooCommerce Integration video tutorial](https://www.youtube.com/watch?v=p2YMdxZMyxQ). + + + Dashboard and navigate to **Account & Settings**. + 2. In the **Website and app settings** section, click **Webhooks**. + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 3. Click **+ Add New Webhook**. + ![Add a new webhooks button on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-1.jpg.md) + 4. In the **Webhook Setup** pop-up page: + 1. Enter the **URL** where you want to receive the webhook payload when an event is triggered. We recommend using an HTTPS URL. + +> **INFO** +> +> +> **Handy Tips** +> +> You can set up to **30 URLs** to receive Webhook notifications. Webhooks can only be delivered to public URLs. If you attempt to save a localhost endpoint as part of a webhook setup, you will notice an error. Know more about [testing Webhooks on an application running on localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#application-running-on-localhost). +> + + + 2. Enter a **Secret** for the webhook endpoint. The secret is used to validate that the webhook is from Razorpay. Do not expose the secret publicly. Know more about [how to validate webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> - When setting up the webhook, you will be asked to specify a secret. Using this secret, you can validate that the webhook is from Razorpay. Entering the secret is optional but recommended. The secret should never be exposed publicly. +- The webhook secret does not need to be the merchant secret key provided by Razorpay. + +> + + + 3. In the **Alert Email** field, enter the email address to which the notifications should be sent in case of webhook failure. You will receive webhook deactivation notifications to this email address. + 4. Select the required events from the list of **Active Events**. + ![List of active webhook events on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-2.jpg.md) + + 5. Click **Create Webhook**. After you set a webhook, it appears on the list of webhooks. + ![List of webhooks on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/plugin-webhook-faq.jpg.md) + 6. You can select the webhook and click **Edit** to make more changes. + + + +### 3. How can I verify if webhooks are auto-configured? + + To verify if webhooks are enabled: + 1. Log in to the Razorpay Dashboard and navigate to **Account & Settings**. + 2. In the **Website and app settings** section, click **Webhooks**. + ![Navigate to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-webhooks.jpg.md) + 3. Select the relevant webhook **URL**. + 4. On the right panel, check if the status for `payment.authorized` and `refund.created` is enabled. + ![List of webhooks created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/plugin-webhook-faq.jpg.md) + + + +### 4. Can I make partial payments using WooCommerce? + + No, partial payments are not supported on WooCommerce. You can either choose to deduct the full amount or make two separate orders and the customer will have to pay twice for it. + + + +### 5. I am getting the following error message "RAZORPAY ERROR: Order creation failed with the message: The API key provided is invalid". Why? + + Verify and confirm that the API keys you have provided within WordPress are accurate. If the issue persists, contact our [Support team](https://razorpay.com/support/). + + + +### 6. I am getting the following php error in the Razorpay plugin:"PHP message: ORDER NUMBER 57999:webhook conflict over for razorpay order: order_LWVB71vGYh7nEr". Why? + + The message in the logs is not an error, it is a logged message. This message appears only when a webhook callback takes longer than 5 minutes to process. Our webhook mechanism includes a 5-minute waiting period to prevent the occurrence of duplicate orders. + + + +### 7. Why am I getting the error message: "RAZORPAY ERROR: Order creation failed with the message "Authentication failed"."? + + "Authentication failed" error occurs when there is a discrepancy between the API keys. Verify the API key provided for your website and ensure that it matches with the key generated via Dashboard. + + + +### 8. I am getting the following error in WordPress: "Required parameter $razorpayPaymentId follows optional parameter $amount in /home/xxxcustom/public_html/wp-content/plugins/woo-razorpay/woo-razorpay.php on line 1353". Why? + + Follow the steps given below to resolve the issue: + 1. Deactivate and delete the Razorpay WooCommerce plugin from your [WordPress Dashboard](https://wordpress.com/log-in). + 2. Reinstall the [Razorpay WooCommerce plugin](https://wordpress.org/plugins/woo-razorpay/). + 3. For easy integration journey, watch the [Razorpay WooCommerce Integration tutorial](https://www.youtube.com/watch?v=p2YMdxZMyxQ). + + + +### 9. I am getting the following error: "Plugin could not be activated because it triggered a fatal error. + Parse error: syntax error, unexpected 'int' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /home4/yutihbjy/public_html/wp-content/plugins/woo-razorpay/includes/cron/one-click-checkout/one-cc-address-sync.php on line 12" + + If you encounter this error message while trying to activate the Razorpay for WooCommerce plugin, follow the steps given below to resolve the issue: + 1. Uninstall the Razorpay for WooCommerce plugin from your WordPress Dashboard. Ensure you delete the plugin entirely, not just deactivate it. + 2. Remove the WooCommerce webhook associated with Razorpay from the Dashboard. Know how to [delete a webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md#delete-a-webhook). + 3. After removing both the plugin and the webhook, install the latest version of the [Razorpay for WooCommerce plugin](https://wordpress.org/plugins/woo-razorpay/). + + If the issue persists even after following these steps, contact our [Support team](https://razorpay.com/support/) with the following information: + + - WooCommerce version + - WordPress version + - Razorpay for WooCommerce plugin version + - A screen recording of the checkout flow (if possible) + - Staging site credentials (if applicable) + - Test Key and Secret from your Razorpay account + + + +### 10. Why am I getting a "404 Page Not Found" error on the checkout when I select Razorpay as a payment option? + + If you encounter this error, follow the steps given below to resolve the issue: + 1. Log in to WordPress Dashboard, click **WooCommerce** and navigate to **Settings**. + 2. In the **Advanced** tab, look for the **Page Setup** section. Ensure that you have correctly linked the **Cart page** and **Checkout page**. + ![Enter Cart page and checkout page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/plugin-wooc-faq-pagesetup.jpg.md) + 3. Validate the **Checkout Endpoints** settings: + - For the **Pay** endpoint, set it to **order-pay**. + - For the **Order Received** endpoint, set it to **order-received**. + ![Enter pay endpoint and order endpoint](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/plugin-wooc-faq-checkout-endpoint.jpg.md) + + If the issue persists even after following these steps, contact our [Support team](https://razorpay.com/support/). + + + +### 11. What troubleshooting procedures should be carried out before initiating a support ticket? + + Follow the troubleshooting steps given below: + 1. Ensure that your system meets all the requirements mentioned [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce.md#compatibilities-and-dependencies). + 2. We recommend you to keep your WordPress, WooCommerce, and Razorpay for WooCommerce plugins up to date. You can find the latest versions [here](https://github.com/razorpay/razorpay-woocommerce/releases). + 3. You can perform initial debugging. Follow the steps given below to debug: + 1. Deactivate all plugins except for Razorpay and WooCommerce. + 2. If you are using a paid theme, switch to a default WordPress theme and check if the issue persists. + 3. Verify if the Razorpay checkout is rendering correctly. If not, try reinstalling the Razorpay for WooCommerce plugin. + 4. If the issue persists after following these steps, contact our [Support team](https://razorpay.com/support/). Provide the following information while creating a ticket: + - WordPress version + - WooCommerce version + - Razorpay for WooCommerce plugin version + - PHP version + - WordPress theme + - Steps to reproduce the issue (Screen recording/Screenshots) + - Error logs, if any + - Staging website credentials (login URL, login id, and password) + + + +### 12. How do I reconfigure webhooks for Razorpay in WooCommerce? + + To reconfigure webhooks for Razorpay in WooCommerce, follow the steps given below: + 1. Deactivate and delete the Razorpay WooCommerce plugin from your [WordPress Dashboard](https://wordpress.com/log-in). + 2. Remove the WooCommerce webhook associated with Razorpay from the Dashboard. Know how to [delete a webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md#delete-a-webhook). + 3. After removing both the plugin and the webhook, install the latest version of the [Razorpay for WooCommerce plugin](https://wordpress.org/plugins/woo-razorpay/). + + + +### 13. How can I revert to the legacy order confirmation page on WooCommerce? + + Follow the steps given below to revert to the legacy order confirmation page: + + 1. Open the Order Confirmation template in the Site Editor by navigating to **Appearance** → **Editor** → **Templates** → **Order Confirmation**. + 2. Open the **List View** and delete all the special Order Confirmation blocks. + + +> **INFO** +> +> +> **Handy Tips** +> +> Hold shift to select multiple blocks between the current selection and the block you click. +> + + 3. Open the **Block Inserter**, search for **Order Confirmation Block** and add it. + ![woocommerce add order confirmation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/woocommerce-order-confirmation.jpg.md) + 4. Click **Save**. + + + +### 14. Does Razorpay WooCommerce support High-Performance Order Storage(HPOS)? + + Yes, Razorpay WooCommerce supports High-Performance Order Storage(HPOS). It is recommended to enable this feature when there is minimal traffic in the store. + + + +### 15. I am getting the error: "Invalid signature passed" when I trigger the webhook. What should I do? + + If you encounter this error message, follow the below steps to troubleshoot this issue: + 1. Uninstall the Razorpay for WooCommerce plugin from your WordPress Dashboard. Ensure you delete the plugin entirely, not just deactivate it. + 2. Remove the WooCommerce webhook associated with Razorpay from the Dashboard. Know how to [delete a webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md#delete-a-webhook). + 3. After removing both the plugin and the webhook, install the latest version of the [Razorpay for WooCommerce plugin](https://wordpress.org/plugins/woo-razorpay/). + + If the issue persists even after following these steps, contact our [Support team](https://razorpay.com/support/). + + + +### 16. Does Razorpay WooCommerce support Checkout Blocks? + + Yes, Razorpay WooCommerce supports Checkout Blocks. + + + +### 17. Does the WooCommerce plugin support 3 or 0 decimal unit currencies? + + The WooCommerce plugin currently supports only currencies that use 2 decimal units. For example: USD, EUR, INR. It does not support currencies with 0 decimal (for example, JPY) or 3 decimal units (for example, BHD). + + + +### 18. How and where can I check the Razorpay logs in WooCommerce? + + To check the Razorpay logs on WooCommerce, follow these steps: + 1. Go to WordPress Admin and navigate to **WooCommerce**. Click **Status**. + ![Woocommerce Dashboard status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/woocommerce-status-logs.jpg.md) + 2. Select **Logs**. Locate and open **razorpay-logs** to view the logs. + ![Razorpay logs on logs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/razorpay-logs.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> A new log file is created every day, so be sure to check the most recent file for the latest logs. +> + + + + + +### 19. Why is the payment captured on Razorpay but not updated on WooCommerce for some orders? + + This issue may arise due to incorrect webhook configuration or domain allowlisting. To resolve this: + 1. Ensure that the [webhook is configured correctly](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce/troubleshooting-faqs.md#2-my-webhooks-are-not-auto-configured-since-i) in your Razorpay Dashboard. + 2. After placing an order, check the [WooCommerce site logs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce/troubleshooting-faqs.md#20-how-and-where-can-i-check-the) for entries such as: + - `Webhook conflict due to early execution for razorpay order` + - `Webhook conflict over for razorpay order` + - `Webhook process finished the updateOrder function` + + If these logs are missing, the issue might occur due to domain allowlisting. To resolve this, list [Razorpay's IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#webhook-ips) in your server settings. + + + +### 20. My Razorpay Payment Gateway is not working properly on WooCommerce. How do I fix integration issues? + + Follow the steps given below to resolve the issue: + 1. Deactivate and delete the Razorpay WooCommerce plugin from your [WordPress Dashboard](https://wordpress.com/log-in). + 2. Reinstall the [Razorpay WooCommerce plugin](https://wordpress.org/plugins/woo-razorpay/). + 3. For easy integration journey, watch the [Razorpay WooCommerce Integration video tutorial](https://www.youtube.com/watch?v=p2YMdxZMyxQ). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/wordpress.md b/llm-content/payments/payment-gateway/ecommerce-plugins/wordpress.md new file mode 100644 index 00000000..48996d4d --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/wordpress.md @@ -0,0 +1,31 @@ +--- +title: Prerequisites | WordPress - Prerequisites +heading: Prerequisites +description: Check the prerequisites before you integrate your WordPress website with Razorpay Payment Gateway. +--- + +# Prerequisites + +- **Wordpress Changelog**: Discover new features, updates and deprecations related to the Razorpay Wordpress integration (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about the Razorpay WordPress plugin. + +**Before you proceed:** + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +## Supported Versions + +- You must be updated to WordPress v3.0.1 or higher. +- If you are using WooCommerce with your WordPress site, use the [WooCommerce plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce.md). + + - **Video Tutorial**: Watch the video before you start integrating the Wordpress plugin with Payment Gateway + + - **Integration Steps**: Check the steps to integrate the Wordpress plugin with Payment Gateway + +## Support + +- Queries: If you have any queries, raise a ticket on the Razorpay [Support Portal](https://razorpay.com/support/). +- Feature Request: If you have a feature request, create an issue on [GitHub](https://github.com/razorpay/razorpay-quick-payments). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/wordpress/faqs.md b/llm-content/payments/payment-gateway/ecommerce-plugins/wordpress/faqs.md new file mode 100644 index 00000000..fccb02a6 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/wordpress/faqs.md @@ -0,0 +1,40 @@ +--- +title: Payment Gateway | WordPress - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Find answers to frequently asked questions about WordPress plugin. +--- + +# Troubleshooting & FAQs + +### 1. I am unable to view the custom fields under the screen options menu. What should I do? + + In case the custom fields do not appear under the **Screen Option** menu: + - Check if the [Advanced Custom Fields plugin](https://www.google.com/url?q=https://wordpress.org/plugins/advanced-custom-fields/&sa=D&source=docs&ust=1681120916936709&usg=AOvVaw1OBFrHD68J87tNpMeGNIfp) is activated on your website. If yes, then deactivate it from your WordPress plugins list. + - Or add the following code to your WordPress theme’s **functions.php** file: + + ```php: Add custom fields + add_filter('acf/settings/remove_wp_meta_box', '__return_false'); + ``` + + + +### 2. What troubleshooting procedures should be carried out prior to initiating a support ticket? + + Follow the troubleshooting steps given below: + 1. Reinstall the Razorpay Quick Payments plugin. + 2. We recommend you to keep your WordPress and Razorpay Quick Payments plugins up to date. You can find the latest versions [here](https://github.com/razorpay/razorpay-quick-payments/releases). + 3. Ensure your current theme is compatible with the Razorpay Quick Payments plugin. If not, switch to the default WordPress theme and provide us with the name of your current theme. + 4. If the issue persists after following these steps, contact our [Support team](https://razorpay.com/support/). Provide the following information while creating a ticket: + - WordPress version + - Razorpay Quick Payments plugin version + - PHP version + - WordPress theme + - Steps to reproduce the issue (Screen recording/Screenshots) + - Error logs, if any + - Staging website credentials (login URL, login id, and password) + + + +### 3. Does the Wordpress plugin support 3 or 0 decimal unit currencies? + + The Wordpress plugin currently supports only currencies that use 2 decimal units. For example: USD, EUR, INR. It does not support currencies with 0 decimal (for example, JPY) or 3 decimal units (for example, BHD). diff --git a/llm-content/payments/payment-gateway/ecommerce-plugins/wordpress/integration-steps.md b/llm-content/payments/payment-gateway/ecommerce-plugins/wordpress/integration-steps.md new file mode 100644 index 00000000..5ee7ba88 --- /dev/null +++ b/llm-content/payments/payment-gateway/ecommerce-plugins/wordpress/integration-steps.md @@ -0,0 +1,330 @@ +--- +title: Payment Gateway | WordPress - Integration Steps +heading: Integration Steps +description: Steps to integrate your WordPress website with Razorpay Payment Gateway. +--- + +# Integration Steps + +Follow the steps given below to integrate Razorpay Payment Gateway with your WordPress website. + + - **1. Build Integration**: Install and configure the WordPress plugin. + + - **2. Test Integration**: Test the integration by making a test payment. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/a1mAm6EiZ6I] + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Installation and Configuration + + +> **WARN** +> +> +> **Watch Out!** +> +> This plugin does not support dynamic amount calculation from your webpage. You can accept only fixed amounts using this plugin. Explore our [WooCommerce plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce.md) or [Payment Button plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button/supported-platforms/wordpress.md) for your use case. +> + + 1. [Download the plugin](https://wordpress.org/plugins/razorpay-quick-payments/) from the WordPress Plugin Directory. + 1. Open your WordPress site and navigate to **Plugins** → **Add New**. + 1. Upload the plugin. + ![Upload plugin screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-wordpress-upload-plugin.jpg.md) + 1. Click **Activate Plugin**. + ![Activate plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-wordpress-activate-plugin.jpg.md) + 1. Click **Settings**. + ![Plugin settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-wordpress-click-settings.jpg.md) + 1. Make the following changes in the **Edit Settings** screen: + 1. Select **Enable Razorpay Payment Module**. + 2. Edit **Title** and **Description** as required. + 3. Add your [KEY_ID] and [KEY_SECRET]. These can be generated from your Razorpay Dashboard. + 4. Set the **Payment Action** to **Authorize and Capture** to auto-capture payments. + 5. Click **Save Changes**. + ![Razorpay PG save settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-wordpress-edit-settings.jpg.md) + + + +### 1.2 Add Custom Fields + + 1. In your WordPress site, open the page or blog post where you want the button to appear. + 1. Click the more icon and select **Preferences**. + ![Select Preferences](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-wordpress-options.jpg.md) + 1. Click **Panels** and enable the **Custom Fields** checkbox in the **Additional** section. Now you will have the option to add custom fields on your page/blog post. + ![Preferences custom fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-wordpress-custom-fields.jpg.md) + 1. Scroll down the current page till you see the **Custom fields** section. + ![Custom field section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-wordpress-custom-fields-scroll.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> If you are using WordPress 4.8 or later, the custom fields can be added via **Screen Option**. If you are still not able to view the custom field, refer to the [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/wordpress/faqs.md#1-i-am-unable-to-view-the-custom). +> +> + + 1. Add the following three custom fields as metadata: + 1. amount (in INR). + 1. name (name of the product). + 1. description (description of the product that is being sold). + ![Custom fields amount name description](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-wordpress-custom-fields-added.jpg.md) + 1. Add the `[RZP]`(shortcode indicated by square brackets) in the content section to display the **Pay with Razorpay** button anywhere. + ![RZP shortcode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-wordpress-shortcode.jpg.md) + 1. Publish or update the page. The page appears with the **Pay with Razorpay** button. + ![Razorpay checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ecommerce-plugins-wordpress-checkout.gif.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> If the payment button does not appear, ensure the Button script is placed inside the `` tag. This issue might be caused by certain cache plugins (for example, SpeedyCache) or Optimizer plugins (for example, SiteGround Optimizer). To resolve it, please deactivate these plugins. Once they are deactivated, the payment button should work properly. +> +> + + + +## 2. Test Integration + +After the integration, a **Pay** button will appear on your web page/app. You need to click the button and make a test transaction to ensure the integration works as expected. You can start accepting actual payments from your customers once the test is successful. + +![Pay with Razorpay button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/wordpress-pay.jpg.md) + +You can make test payments using one of the payment methods configured at the Checkout. +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API keys generated in the test mode in the Checkout code. + + +### Supported Payment Methods + + After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + + Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + + + + +### Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +## 3. Go-live Checklist + +Follow these steps before taking the integration live: + + +### 3.1 Accept Live Payments + + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git "a/llm-content/payments/payment-gateway/emi\302\262.md" "b/llm-content/payments/payment-gateway/emi\302\262.md" new file mode 100644 index 00000000..f2c7de0d --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262.md" @@ -0,0 +1,266 @@ +--- +title: About EMI² Suite +description: Provide affordable payment solutions like Affordability Widget, Eligibility Check, Offers, EMIs, and Pay Later methods to your customers. +--- + +# About EMI² Suite + +The Razorpay **Affordability Suite** is now rebranded as the **EMI² Suite**, retaining all its features under the new name. + + - **Affordability Widget**: Use Affordability Widget to create awareness about affordable payment options, such as EMI, Cardless EMI, and Pay Later and offers. + +- **Eligibility Check**: Access customer eligibility using pre-eligibility checks on Debit Card EMI, Cardless EMI, and Pay Later instruments and help them choose the most appropriate payment option. + + - **Payment Methods**: Offer your customers various payment methods to buy products using Credit Card EMI, Debit Card EMI, Cardless EMI, No Cost EMI, Low Cost EMI and Pay Later. + +- **Offers**: Use Offers to attract customers and improve your sales by providing discounts and cashback to customers. + +[Video: https://www.youtube.com/embed/videoseries?list=PLQWuy5G1gIOo72xUMyvsv-0d-Q0D6aXyX] + +## Affordability Widget + +The Affordability Widget displays the multiple payment options (such as EMI, Cardless EMI, and Pay Later) and offers to your customers on the product page. This allows customers to discover payment offers before they reach checkout and make an informed buying decision. Know more about the [Affordability Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget.md). + + +### Advantages + + - **Enable discovery of affordable payment options early on**: Spread awareness about emi²-based payment methods and offers available to your customers even before they reach checkout using the Affordability Widget. + - **Improve conversion rates**: The availability of affordable payment options such as EMI and Pay Later will help boost conversion rates enabling customers to make more informed buying decisions. + - **Increase Average Order Value**: With affordable payment options, businesses typically see a 30% higher average order value. + - **Easy Integration**: Integrating with the Razorpay Affordability Widget is effortless, involving only a few lines of code. + + +> **INFO** +> +> +> **Handy Tips** +> +> - Native web users can integrate the widget with checkout. Your customers can select an offer/payment option on the widget, proceed to checkout and complete the payment. +> - For Shopify and WooCommerce user, this is a **view-only** widget. +> + +### Integration +You can integrate the widget on your: [Native Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web.md), [WooCommerce Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/woocommerce.md), [Shopify Store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/shopify.md) and [Android App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/android.md). + +## Eligibility Check + +Improve success rate and enhance customer experience by offering a pre-eligibility check at checkout. Check eligibility on Debit Card EMI, Cardless EMI, and Pay Later instruments and let your customers easily choose the most relevant EMI² option and complete the purchase seamlessly. Know more about [Eligibility Check](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/eligibility-check/standard.md). + + +### Advantages + + - **Higher Success Rate**: Increase the success rate of transactions with EMI² instruments by displaying only eligible payment options, thereby reducing failed transactions due to ineligibility. + - **Enhance Customer Experience**: Deliver a seamless customer experience through an intuitive UI that enables customers to discover and choose the most affordable payment options. + + +## Payment Methods + +You can offer your customers various payment methods to buy products using [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md), [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md), [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md), [Low Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/low-cost-emi.md) and [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md). + + +### Advantages + + #### EMIs + + - **Easy EMI Repayments**: Reduce the upfront amount to be paid by your customers with easy-to-manage EMI repayments. + - **Cardless EMIs**: Target a large segment of consumers who do not have a credit or debit card. + - **Increase sales**: Grow sales by allowing customers to make high-value purchases with low upfront payments. + - **Increase Average Order Value**: EMI options lead to higher average order value, thereby boosting sales. + + #### Pay Later + + - **Best in class**: Razorpay has the widest coverage of Pay Later partners amongst all payment solutions providers. Enjoy a success rate of over 90% (best in class). + - **Flexible Repayments**: Customers can buy now and pay later, with various payment options ranging from a few weeks to several months. + - **Interest-free Options**: Provide Pay Later options with interest-free instalments allowing customers to spread out the purchase cost over time with no interest charges. + - **Cash Flow Management**: You can improve your cash flow by receiving payments from customers upfront while allowing them to pay for their purchases over time. + - **Increase Average Order Value**: Pay Later options lead to higher average order values, thereby boosting sales. + + +### Credit Card EMI, Debit Card EMI, Cardless EMI and Pay Later + +Following is the list of payment partners for the various payment methods: + + +### Credit Card EMI + + + + + Bank Code | Issuer Bank + --- + AMEX | American Express + --- + BARB | Bank of Baroda + --- + CITI | Citibank + --- + FDRL | Federal Bank + --- + HDFC | HDFC Bank + --- + HSBC | HSBC Bank + --- + ICIC | ICICI Bank + --- + INDB | IndusInd Bank + --- + KKBK | Kotak Mahindra Bank + --- + RATN | RBL Bank + --- + SBIN | State Bank of India + --- + SCBL | Standard Chartered + --- + UTIB | Axis Bank + --- + YESB | Yes Bank + + + + + Code | Card Network Name + --- + Onecard | OneCard + + + + + +> **INFO** +> +> +> **EMI Plans and Interest Rates** +> +> Refer to the FAQs for the EMI plans and interest rates of different banks for [Credit Card EMIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#1-what-are-the-standard-credit-card-interest). +> + + + + +### Debit Card EMI + + + Bank Code | Issuer Bank + --- + HDFC | HDFC Bank + --- + ICIC | ICICI Bank + + + +> **INFO** +> +> +> **EMI Plans and Interest Rates** +> +> Refer to the FAQs for the EMI plans and interest rates of different banks for [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#5-can-you-provide-a-list-of-the). +> + + + + +### Cardless EMI + + + + + Banks | Provider Code + --- + ICICI Bank | `icic` + --- + IDFC Bank | `idfb` + --- + HDFC Bank | `hdfc` + --- + Kotak Bank| `kkbk` + --- + axio | `walnut369` + --- + Fibe | `earlysalary` + --- + ZestMoney | `zestmoney` + + + + + Payment Partner | Provider Code + --- + Fibe | `earlysalary` + --- + ZestMoney | `zestmoney` + --- + axio | `walnut369` + + + + + + +> **INFO** +> +> +> **EMI Plans and Interest Rates** +> +> Refer to the FAQs for the Cardless EMI plans and interest rates charged by [Banks/Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#1-what-are-the-standard-interest-rates-charged) and [Pay Later Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#2-what-are-the-standard-interest-rates-charged). +> + + + + +### Pay Later + + + Provider | Provider Code + --- + LazyPay | `lazypay` + --- + PayPal | `paypal` + + + +> **INFO** +> +> +> **Standard Interest Rates** +> +> Refer to the FAQs for the standard interest rates charged by [Pay Later providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#2-what-are-the-standard-interest-rates-charged). +> + + + +### Integrate Payment Methods + +If you are using Razorpay Standard Checkout, you **do not need to perform any additional integrations** to display these payment methods to your customers. Get this feature enabled on your account by contacting our [Support team](https://razorpay.com/support/#request). + +As per your business requirements, you can check the payment methods available on [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) or [Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/payment-methods/custom-integration.md) + +### Try EMI Flow on Checkout + +You can try the EMI flow by clicking the **Pay with Razorpay** button. This initiates a ₹5,500 payment. Provide the relevant details and complete the payment. Use the [Test Card for EMI Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#test-card-for-emi-payments). + +> **WARN** +> +> +> **Live Transaction with Auto Refund** +> +> This is a real transaction and money will be deducted from your account. However, the amount debited will be auto-refunded to your account in 5-7 working days. +> +> [Pay with Razorpay](https://razorpay.com/emidemo/) +> + +## Offers + +You can use Offers to attract customers and improve your sales by providing discounts and cashback to customers when they make payments on your website or apps. You can restrict the payment methods on which the offers are applied and limit their usage. Know more about [Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers.md). + +You can create Offers including No Cost EMI and Low Cost EMI Offers via the Dashboard and display them to your customers on Checkout. + +- [No Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi.md) +- [Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi.md) + +### Related Information + +- [Affordability Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget.md) +- [Affordability Widget Features](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/features.md) +- [Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md) diff --git "a/llm-content/payments/payment-gateway/emi\302\262/eligibility-check.md" "b/llm-content/payments/payment-gateway/emi\302\262/eligibility-check.md" new file mode 100644 index 00000000..271e3657 --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/eligibility-check.md" @@ -0,0 +1,878 @@ +--- +title: Eligibility Check API +description: Check if the customer is eligible for EMI² payment instruments using the Eligibility Check API. +--- + +# Eligibility Check API + +Use the Eligibility Check API to verify your customer's eligibility for EMI²-related payment instruments such as Debit Card EMI, Cardless EMI, and Pay Later. This check helps you display only relevant payment methods to your customers, reducing the chances of failed transactions. + +> **WARN** +> +> +> **Watch Out!** +> +> This is an on-demand feature. Please raise a request with us at [ affordability-widget@razorpay.com](mailto:affordability-widget@razorpay.com) to get this feature activated. +> + +> **INFO** +> +> +> **Handy Tips** +> +> - You can check customer and transaction eligibility only for Debit Card EMI, Cardless EMI and Pay Later, not for Credit Card EMI. +> - You can perform the eligibility check on methods and instruments enabled for your account. Know how to [check the payment methods enabled](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md#view-payment-methods) for your account. +> + +## Use Case + +Before your customer navigates to the checkout, you can do an eligibility check on all the available EMI² instruments and display only those that apply to the customer. This helps reduce payment failures and drop-offs and enhances the customer experience. + +## Eligibility Check States + +Following are the various states of an eligibility check: + +![Different states of the eligibility check process](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/affordability-eligibility-check.jpg.md) + +States | Description +--- +`pending` | When you check eligibility, it stays in the `pending` state if the provider does not respond within the expected time. +--- +`eligible` | When the eligibility check is successful, and the provider approves the customer for the required order amount. +--- +`ineligible` | When the eligibility check is successful, the provider does not approve the customer for the required order amount. +--- +`failed` | When the eligibility check fails, it can be re-attempted via a new request. + +## Eligibility Check Entity + +The eligibility check entity has the following parameters: + +`inquiry` +: `string` Types of methods or instruments on which eligibility check is required. Possible value is `affordability`. + +`currency` +: `string` A three-letter ISO code for the currency for which you want to accept the payment. Possible value is `INR`. + +`amount` +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of ₹295, enter `29500`. The customer makes a payment for this amount against the order; hence, eligibility is checked for the amount. + +`customer` +: `object` Customer details. + + `id` + : `string` Unique identifier of the customer created using [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md). For example, `cust_1Aa00000000004`. + + `contact` + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `+919000090000`. + + `ip` + : `string` Customer's IP address from where the order is placed. For example, `105.106.107.108`. + + `referrer` + : `string` Referrer header passed by the client's browser. + + `user_agent` + : `string` Customer user-agent. + +`instruments` +: `array` Payment Instruments on which eligibility check is performed. Use the `instruments` array to check eligibility on specific methods instruments. + + `method` + : `string` Payment methods on which eligibility check is performed. Possible values: + - `cardless_emi` + - `emi` + - `paylater` + + `provider` + : `string` List of Cardless EMI providers. Possible values for `cardless_emi`: + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `earlysalary` + - `walnut369` + + List of Pay Later providers. Possible values for `paylater`: + - `lazypay` + - `paypal` + + `issuer` + : `string` List of EMI issuers. Possible value is `hdfc`. + + `type` + : `string` Type of card. Possible value is `debit`. + + `eligibility_req_id` + : `string` A unique identifier of the eligibility check request on a specific instrument. For example, `elig_F1cxDoHWD4fkQt`. + + `eligibility` + : `object` Defines the customer's eligibility status and shows the associated error code in case of failure. + + `status` + : `string` Displays the current state of the eligibility check performed on each payment instrument. Possible values: + - `eligible` + - `ineligible` + - `pending` + - `failed` + + `error` + : `object` The error object. + + `code` + : `string` The type of error. + + `description` + : `string` Descriptive text about the error. + + `source` + : `string` Point of failure in a specific operation. For example, customers, businesses, and so on. + + `step` + : `string` The stage where the error occurred. Stages can vary depending on the payment method. + + `reason` + : `string` The exact reason for the error. + +## Eligibility Check API + +You can initiate a request for an eligibility check using the endpoint and the following mandatory parameters: +- Customer contact details. +- Transaction amount. + +customers/eligibility + +```curl: Request +-X POST 'https://api.razorpay.com/v1/customers/eligibility' \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H "content-type: application/json" +-d '{ + "inquiry": "affordability", + "amount": 500000, // mandatory + "currency": "INR", // mandatory + "customer": { + "id": "cust_KhP5dO1dKmc0Rm", + "contact": "+918220276214", // mandatory + "ip": "105.106.107.108", + "referrer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" + } +}' +```curl: Success Response +{ + "amount": "500000", + "customer": { + "id": "KkBhM9EC1Y0HTm", + "contact": "+918220722114" + }, + "instruments": [ + { + "method": "emi", + "issuer": "HDFC", + "type": "debit", + "eligibility_req_id": "elig_KkCNLzlNeMYQyZ", + "eligibility": { + "status": "eligible" + } + }, + { + "method": "paylater", + "provider": "getsimpl", + "eligibility_req_id": "elig_KkCNLzlNeMYQyZ", + "eligibility": { + "status": "eligible" + } + }, + { + "method": "paylater", + "provider": "icic", + "eligibility_req_id": "elig_KkCNLzlNeMYQyZ", + "eligibility": { + "status": "eligible" + } + }, + { + "method": "cardless_emi", + "provider": "walnut369", + "eligibility_req_id": "elig_KkCNLzlNeMYQyZ", + "eligibility": { + "status": "ineligible", + "error": { + "code": "GATEWAY_ERROR", + "description": "The customer has not been approved by the partner.", + "source": "business", + "step": "inquiry", + "reason": "user_not_approved" + } + } + }, + { + "method": "cardless_emi", + "provider": "zestmoney", + "eligibility_req_id": "elig_KkCNLzlNeMYQyZ", + "eligibility": { + "status": "ineligible", + "error": { + "code": "GATEWAY_ERROR", + "description": "The customer has exhausted their credit limit.", + "source": "business", + "step": "inquiry", + "reason": "credit_limit_exhausted" + } + } + }, + { + "method": "paylater", + "provider": "lazypay", + "eligibility_req_id": "elig_KkCNLzlNeMYQyZ", + "eligibility": { + "status": "ineligible", + "error": { + "code": "GATEWAY_ERROR", + "description": "The order amount is less than the minimum transaction amount.", + "source": "business", + "step": "inquiry", + "reason": "min_amt_required" + } + } + } + ] +} + +```curl: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The provider is invalid.", + "source": "business", + "step": "inquiry", + "reason": "invalid_provider" + } + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Amount is required.", + "source": "business", + "step": "inquiry", + "reason": "amount_required" + } + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The provider is not enabled for you.", + "source": "business", + "step": "inquiry", + "reason": "instrument_not_enabled" + } + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code.", + "source": "business", + "step": "inquiry", + "reason": "invalid_mobile_number" + } +} +``` + +### Request Parameters + +`inquiry` _optional_ +: `string` List of methods or instruments on which eligibility check is required. Possible value is `affordability`. + +`amount` _mandatory_ +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of ₹295, enter `29500`. The user makes a payment for this amount against the order; hence, eligibility is checked for the amount. + +`currency` _mandatory_ +: `string` A three-letter ISO code for the currency for which you want to accept the payment. Possible value is `INR`. + +`customer` +: `object` Customer details. + + `id` _optional_ + : `string` Unique identifier of the customer created using [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md). For example, `cust_1Aa00000000004`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `+919000090000`. + + `ip` _optional_ + : `string` Customer's IP address from where the order is placed. For example, `105.106.107.108`. + + `referrer` _optional_ + : `string` Referrer header passed by the client's browser. + + `user_agent` _optional_ + : `string` Customer user-agent. + +`instruments` _optional_ +: `array` Payment instruments on which an eligibility check is required. + + `method` + : `string` Payment methods on which an eligibility check is required. Possible Values : + - `emi` + - `cardless_emi` + - `paylater` + + `issuers` + : `string` List of EMI issuers. Possible value is `HDFC`. + + `types` + : `string` Type of card. Possible value is `debit`. + + `providers` + : `string` List of Cardless EMI providers. Possible values for `cardless_emi`: + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `earlysalary` + - `walnut369` + + List of Pay Later providers. Possible values for `paylater`: + - `lazypay` + - `paypal` + +> **INFO** +> +> +> **Configure Payment Methods or Instruments** +> +> Refer to the [Configurations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/eligibility-check/configurations.md) doc for eligibility checks on specific methods or instruments. +> + +### Response Parameters + +Descriptions for the response parameters are present in the [Eligibility Check Entity](#eligibility-check-entity) parameters table. + +### Error Response Parameters + +Given below is the list of errors for eligibility check. + +> **INFO** +> +> +> **Handy Tips** +> +> [Standard Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md) for Razorpay APIs are applicable. +> + + +### Bad Request Errors + + + + invalid_inquiry + + - **Source**: business + - **Error Cause**: Request + - **Description**: The inquiry parameter is invalid. + - **Next Steps**: Retry with a valid inquiry parameter. + + + +### invalid_currency + + - **Source**: business + - **Error Cause**: Request + - **Description**: The currency is invalid. + - **Next Steps**: Retry with a valid currency. + + + +### currency_required + + - **Source**: business + - **Error Cause**: Request + - **Description**: The currency field is required. + - **Next Steps**: Retry with required fields. + + + +### invalid_user_agent + + - **Source**: business + - **Error Cause**: Request + - **Description**: The user agent is invalid. + - **Next Steps**: Retry with a valid user agent. + + + +### invalid_ip + + - **Source**: business + - **Error Cause**: Request + - **Description**: The IP is invalid. + - **Next Steps**: Retry with a valid IP. + + + +### mobile_number_required + + - **Source**: business + - **Error Cause**: Request + - **Description**: Contact number is required. + - **Next Steps**: Retry with required fields. + + + +### invalid_mobile_number + + + + 15 digits max + + - **Source**: business + - **Error Cause**: Request + - **Description**: Contact number should not be greater than 15 digits, including country code. + - **Next Steps**: Retry with a valid mobile number. + + + +### digits and + symbol only + + - **Source**: business + - **Error Cause**: Request + - **Description**: Contact number can only contain digits and + symbol. + - **Next Steps**: Retry with a valid mobile number. + + + +### 8 digits minimum + + - **Source**: business + - **Error Cause**: Request + - **Description**: Contact number should be at least 8 digits, including country code. + - **Next Steps**: Retry with a valid mobile number. + + + + + + + +### amount_required + + - **Source**: business + - **Error Cause**: Request + - **Description**: Amount is required. + - **Next Steps**: Retry with required fields. + + + +### invalid_amount + + + + amount is not an integer + + - **Source**: business + - **Error Cause**: Request + - **Description**: The amount must be an integer. + - **Next Steps**: Retry with a valid amount. + + + +### amount should be minimum INR 1.00 + + - **Source**: business + - **Error Cause**: Request + - **Description**: The amount must be at least INR 1.00. + - **Next Steps**: Retry with a valid amount. + + + + + + + +### invalid_customer_id + + - **Source**: business + - **Error Cause**: Request + - **Description**: The customer ID is invalid. + - **Next Steps**: Retry with a valid customer ID. + + + +### customer_id_does_not_exist + + - **Source**: business + - **Error Cause**: Request + - **Description**: The customer ID does not exist. + - **Next Steps**: Retry with a valid customer ID. + + + +### invalid_instruments + + - **Source**: business + - **Error Cause**: Request + - **Description**: The instruments array is invalid. + - **Next Steps**: Retry with a valid instruments array. + + + +### method_not_applicable + + - **Source**: business + - **Error Cause**: Request + - **Description**: The eligibility check is not applicable on this method. + - **Next Steps**: Retry with a valid method. + + + +### provider_not_applicable + + - **Source**: business + - **Error Cause**: Request + - **Description**: The eligibility check is not applicable on this provider. + - **Next Steps**: Retry with a valid provider. + + + +### card_type_not_applicable + + - **Source**: business + - **Error Cause**: Request + - **Description**: The eligibility check is not applicable on this card type. + - **Next Steps**: Retry with a valid card type. + + + +### issuer_not_applicable + + - **Source**: business + - **Error Cause**: Request + - **Description**: The eligibility check is not applicable on this issuer. + - **Next Steps**: Retry with a valid issuer. + + + +### invalid_method + + - **Source**: business + - **Error Cause**: Request + - **Description**: The method is invalid. + - **Next Steps**: Retry with a valid method. + + + +### invalid_provider + + - **Source**: business + - **Error Cause**: Request + - **Description**: The provider is invalid. + - **Next Steps**: Retry with a valid provider. + + + +### invalid_card_type + + - **Source**: business + - **Error Cause**: Request + - **Description**: The card type is invalid. + - **Next Steps**: Retry with a valid card type. + + + +### invalid_issuer + + - **Source**: business + - **Error Cause**: Request + - **Description**: The issuer is invalid. + - **Next Steps**: Retry with a valid issuer. + + + +### method_not_enabled + + - **Source**: business + - **Error Cause**: Request + - **Description**: The method is not enabled for you. + - **Next Steps**: No Retry. + + + +### instrument_not_enabled + + - **Source**: business + - **Error Cause**: Request + - **Description**: The provider is not enabled for you. + - **Next Steps**: No Retry. + + + +### max_issuers_limit + + - **Source**: business + - **Error Cause**: Request + - **Description**: The number of issuers passed in the request must be less than 30. + - **Next Steps**: No Retry. + + + +### max_providers_limit + + - **Source**: business + - **Error Cause**: Request + - **Description**: The number of providers passed in the request must be less than 30. + - **Next Steps**: No Retry. + + + +### max_networks_limit + + - **Source**: business + - **Error Cause**: Request + - **Description**: The number of networks passed in the request must be less than 5. + - **Next Steps**: No Retry. + + + + + + + +### Gateway Errors + + + + timed_out + + - **Source**: gateway + - **Error Cause**: All Gateways + - **Description**: The payment provider could not revert with a suitable response in time. + - **Next Steps**: Please retry after some time. + + + +### gateway_technical_error + + - **Source**: gateway + - **Error Cause**: All Gateways + - **Description**: We are facing some trouble completing your request at the moment. Please try again shortly. + - **Next Steps**: Please retry after some time. + + + +### account_does_not_exist + + - **Source**: gateway + - **Error Cause**: getSimpl, lazypay, icic paylater + - **Description**: The customer doesn’t have an existing account with the provider. + - **Next Steps**: No Retry. + + + +### user_not_approved + + - **Source**: gateway + - **Error Cause**: instacred, zestmoney, axio + - **Description**: The customer has not been approved by the partner. + - **Next Steps**: No Retry. + + + +### credit_limit_expired + + - **Source**: gateway + - **Error Cause**: earlysalary + - **Description**: The customer’s credit limit has expired. + - **Next Steps**: No Retry. + + + +### credit_limit_exhausted + + - **Source**: gateway + - **Error Cause**: getSimpl, lazypay + - **Description**: The customer has exhausted their credit limit. + - **Next Steps**: No Retry. + + + +### credit_limit_inactive + + - **Source**: gateway + - **Error Cause**: zestmoney + - **Description**: The customer's credit limit is inactive. + - **Next Steps**: No Retry. + + + +### min_amt_required + + - **Source**: gateway + - **Error Cause**: All Gateways + - **Description**: The order amount is less than the minimum transaction amount. + - **Next Steps**: No Retry. + + + +### max_amt_limit + + - **Source**: gateway + - **Error Cause**: All Gateways + - **Description**: The order amount is above the maximum transaction amount limit. + - **Next Steps**: No Retry. + + + +### eligibility_check_within_payment_flow + + - **Source**: gateway + - **Error Cause**: All Gateways + - **Description**: The eligibility will be checked at the time of payment. + - **Next Steps**: No Retry. + + + +### account_blocked + + - **Source**: gateway + - **Error Cause**: lazypay, icic paylater + - **Description**: The customer's account has been blocked by the partner. + - **Next Steps**: No Retry. + + + +### account_disabled + + - **Source**: gateway + - **Error Cause**: lazypay + - **Description**: The customer's account has been disabled by the partner. + - **Next Steps**: No Retry. + + + +### transaction_suspended + + - **Source**: gateway + - **Error Cause**: lazypay + - **Description**: Transaction for this merchant are temporary suspended by gateway. + - **Next Steps**: No Retry. + + + +### merchant_account_disabled + + - **Source**: gateway + - **Error Cause**: lazypay + - **Description**: Gateway has disabled the account for this merchant. + - **Next Steps**: No Retry. + + + + + + +## Fetch Eligibility by id + +The following endpoint retrieves the details of the eligibility check. Add the `eligibility_req_id` received in response previously. + +customers/eligibility/:eligibility_req_id + +```curl: Request +-X GET 'https://api.razorpay.com/v1/customers/eligibility/elig_F1cxDoHWD4fkQt' \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H "content-type: application/json" +```curl: Success Response +{ + "instruments": [ + { + "method": "paylater", + "provider": "lazypay", + "eligibility_req_id": "elig_LBwGKVvS2X48Lq", + "eligibility": { + "status": "eligible" + } + }, + { + "method": "paylater", + "provider": "getsimpl", + "eligibility_req_id": "elig_LBwGKVvS2X48Lq", + "eligibility": { + "status": "ineligible", + "error": { + "code": "GATEWAY_ERROR", + "description": "The customer has exhausted their credit limit", + "source": "gateway", + "step": "inquiry", + "reason": "credit_limit_exhausted" + } + } + } + ] +} +```curl: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The eligibility id is invalid", + "source": "business", + "step": "inquiry", + "reason": "invalid_eligibility_id" + } +} +``` +### Path Parameter + +`eligibility_req_id` +: `string` The unique identifier of the eligibility request to be retrieved. + +### Response Parameters + +Descriptions for the response parameters are present in the [Eligibility Check Entity](#eligibility-check-entity) parameters table. + +### Error Response Parameters + +Given below is a list of possible errors you may face while fetching eligibility. + +Error Code | Error | Source | Cause | Description | Solution +--- +BAD_REQUEST_ERROR | `invalid_eligibility_id` | business | Request | The eligibility id is invalid. | Retry with a valid mobile number. +--- +BAD_REQUEST_ERROR | `eligibility_id_does_not_exist` | business | Request | The eligibility id does not exist. | Retry with a valid amount. + +## Test Details + +You can test the eligibility using our test phone numbers. + + + + Provider | Provider Code | Test Phone Numbers + --- + HDFC Bank | hdfc | `+917887578479`, `+918066317208`, `+916127912480`, `+917511365863` + --- + + + + + Provider | Provider Code | Test Phone Numbers + --- + axio | walnut369 | `+917887578479`, `+918066317208`, `+918708408282`, `+916127912480` + --- + Fibe | earlysalary | `+917887578479`, `+918066317208`, `+918708408282`, `+916127912480` + --- + HDFC Bank | hdfc | `+917887578479`, `+918066317208`, `+918708408282`, `+916127912480` + --- + Kotak Bank| kkbk | `+917887578479`, `+918066317208`, `+918708408282`, `+916127912480` + --- + ICICI Bank | icic | `+917887578479`,`+918066317208`,`+918708408282`,`+916127912480` + --- + IDFC Bank | idfb | `+917887578479`, `+918066317208`, `+918708408282`, `+916127912480` + + + + + Provider | Provider Code | Test Phone Numbers + --- + LazyPay | lazypay | `+917887578479`, `+918066317208`, `+918708408282`, `+916127912480` + --- + GetSimpl | getsimpl | `+917887578479`, `+918066317208`, `+918708408282`, `+916127912480` + --- + ICICI Bank | icic | `+917887578479`, `+918066317208`, `+918708408282`, `+916127912480` + + + +Know the interest rates and minimum order amount for: +- [Debit Card EMI Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#5-can-you-provide-a-list-of-the) +- [Cardless EMI Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#1-what-are-the-standard-interest-rates-charged) +- [Pay Later Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#2-what-are-the-standard-interest-rates-charged) diff --git "a/llm-content/payments/payment-gateway/emi\302\262/eligibility-check/configurations.md" "b/llm-content/payments/payment-gateway/emi\302\262/eligibility-check/configurations.md" new file mode 100644 index 00000000..4da33c0e --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/eligibility-check/configurations.md" @@ -0,0 +1,74 @@ +--- +title: Configure EMI² Methods +description: Configure the EMI² methods or instruments of your choice to perform the eligibility check. +--- + +# Configure EMI² Methods + +You can check eligibility for specific EMI² methods or instruments by passing the `instruments` array. If you do not pass the `instruments` array, the eligibility check is performed on all applicable EMI² instruments by **default**. + +## Sample Code + +Use the sample codes below to specify the methods or instruments of your choice: + +### Check Eligibility on HDFC EMI + +Use the code given below to check eligibility for HDFC EMI: + +```java: Code +{ + "instruments": [ // optional + { + "method": "emi", + "issuers": [ + "HDFC" + ], + "types": [ + "debit" // only supports debit + ] + } + ] +} +``` + +### Check Eligibility on a Specific Cardless EMI + +Use the code given below to check eligibility on a specific Cardless EMI: + +```java: Code +{ + "instruments": [ // optional + { + "method": "cardless_emi", + "providers": [ + "zestmoney" + ] + } + ] +} +``` + +### Check Eligibility on Specific Cardless EMI and Pay Later Options + +Use the code given below to check eligibility on specific Cardless EMI and Pay Later options: + +```java: Code +{ + "instruments": [ //optional + { + "method": "cardless_emi", + "providers": [ + "walnut369" + ] + }, + { + "method": "paylater", + "providers": [ + "rzpx_postpaid", + "getsimpl", + "icic" + ] + } + ] +} +``` diff --git "a/llm-content/payments/payment-gateway/emi\302\262/eligibility-check/standard.md" "b/llm-content/payments/payment-gateway/emi\302\262/eligibility-check/standard.md" new file mode 100644 index 00000000..1029c7db --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/eligibility-check/standard.md" @@ -0,0 +1,90 @@ +--- +title: Razorpay EMI² Suite | Standard - Eligibility Check +heading: Eligibility Check on Standard Checkout +description: Boost success rate with Eligibility Check on Razorpay Checkout for Debit Card EMI, Cardless EMI and Pay Later payment options. +--- + +# Eligibility Check on Standard Checkout + +Razorpay offers a pre-eligibility check on Debit Card EMI, Cardless EMI, and Pay Later instruments. By assessing eligibility upfront, your customers can effortlessly choose the most relevant emi² option and complete the purchase quickly. + +> **INFO** +> +> +> **Handy Tips** +> +> - This feature is available by default. +> - The eligibility check is performed only for [ Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md), [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), and [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md). +> - Eligibility check is not applicable for Credit Card EMI as it is a pre-eligible form of credit. +> + +## Advantages + +- **Higher Success Rate** + +Increase the success rate of transactions with EMI² instruments by displaying only eligible payment options, thereby reducing failed transactions due to ineligibility. + +- **Enhance Customer Experience**: Deliver a seamless customer experience through an intuitive UI that enables customers to discover and choose the most relevant affordable options. + +## How it Works + +A customer selects the products on your website or app and proceeds to Checkout. After choosing EMI or Pay Later as the payment method, the customer can differentiate between the eligible and ineligible payment options. They can opt for an eligible payment option to complete the payment. + +![View eligible payment options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/eligible-payment-options.jpg.md) + +- **Eligible**: The customer selects an eligible payment instrument and completes the payment successfully. + +- **Ineligible**: The customer can view the reason for ineligibility as highlighted below. + ![Highlight ineligible payment instruments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ineligibility-highlight.jpg.md) + + To proceed with the payment in case of ineligibility, the customer can choose to: + - Use a different mobile number for the chosen payment method and try again. + - Opt for a different payment instrument/method. + + ![Demo for ineligible flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-ineligibility.gif.md) + +## Reasons for Ineligibility + +The table below provides a list of reasons for customer ineligibility with payment methods/instruments and their descriptions: + +Reason | Description +--- +Account does not exist | You are not registered with the provider. You may either update the mobile number below or try another payment option. +--- +User is not approved | You have not been approved for credit by the provider. You may either update the mobile number below or try another payment option. +--- +Expired credit limit | The credit limit has expired. You may either update the mobile number below or try another payment option. +--- +Exhausted credit limit | The credit limit has been exhausted. You may either update the mobile number below or try another payment option. +--- +Inactive credit limit | The credit limit is inactive. You may either update the mobile number below or try another payment option. +--- +Minimum amount required | The order amount is less than the minimum transaction amount for this EMI provider. You may try using a higher order amount or another payment option. +--- +Maximum amount limit | The order amount is above the maximum transaction amount for this EMI provider. You may try using a lower order amount or another payment option. + +## List of Payment Methods + +View the list of payment methods/instruments and providers on which eligibility check is performed: + + + HDFC Bank + + + - axio + - Fibe + - HDFC Bank + - ICICI Bank + - IDFC Bank + - Kotak Bank + + + - LazyPay + - GetSimpl + - ICICI Bank + + +### Related Information + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#eligibility-check) +- [EMI² Suite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi².md) diff --git "a/llm-content/payments/payment-gateway/emi\302\262/faqs.md" "b/llm-content/payments/payment-gateway/emi\302\262/faqs.md" new file mode 100644 index 00000000..79aa6512 --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/faqs.md" @@ -0,0 +1,1556 @@ +--- +title: Payment Gateway | EMI² Suite - FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay EMI² Suite. +--- + +# Frequently Asked Questions (FAQs) + +## Common + + +### 1. What are the issuers that Razorpay supports for each EMI² method? + + + Method | Partners + --- + Credit Card EMI | 12+ leading issuers including, Amex, HDFC, ICICI and SBI. Find the complete list of [banks supporting Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#credit-card-emi). + --- + Debit Card EMI | HDFC, IndusInd, and ICICI Bank. + --- + Cardless EMI | ZestMoney, axio, InstaCred, HDFC Bank, Fibe and more. Find the complete list of [banks supporting Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#cardless-emi). + --- + Pay Later | LazyPay and PayPal. + + + + +### 2. What is the difference between Cardless EMI & Pay Later? + + + + [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) is a digital EMI option that allows your customer to pay in installments without access to a credit or debit card. Usually, customers prefer this method for making high-value payments. + + + [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md) is a virtual credit card that lets your customer shop now and pay later. It provides zero-interest digital credit for 14-45 days (varies by provider). Our partners for Pay Later are - FlexiPay by HDFC Bank, ICICI Pay Later, Simpl and LazyPay. + + + + + +### 3. Is Instant Refund supported on any EMI² Payment Method? + + No, instant refunds are not supported on EMI, Cardless EMI and Pay Later. + + + +### 4. How can I disable Payment methods? + + Raise a request with our [Support team](https://razorpay.com/support/) to disable payment methods. + + +## Pay Later + + +### 1. How can my customer pay using Pay Later? + + Pay Later is available as a payment option at Razorpay checkout. To make a payment, customers must be registered with Razorpay's Pay Later partners - LazyPay and PayPal. + + + +### 2. What are the standard interest rates charged by Pay Later providers? + + The standard interest rates charged by the providers for Pay Later are given below: + + + Pay Later | Provider Code | Minimum Transaction | 15 days | 30 days | 45 days | 60 days | 90 days + --- + LazyPay | `lazypay` | ₹1 | Interest free | NA | NA | NA | NA + --- + PayPal | `paypal` | ₹100 | Interest free | NA | NA | NA | NA + + + * Interest rates are determined on a case-to-case basis. [Contact support](https://razorpay.com/support/#request) for more information. + + +> **WARN** +> +> +> **Watch Out!** +> +> All interest rates mentioned above are per annum. +> + + + +## EMI + +### Common + + +### 1. Can my customers avail Offers for EMI payments at Checkout? + + Yes, they can avail offers for EMI payments at checkout. Know more about [ creating EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers.md). + + + +### 2. If a customer chooses EMI as the payment method, do I get the full amount upfront? + + Yes, you receive the full amount at once and the provider/bank converts it into EMI for the customer. + + + +### 3. What happens when the customer fails to pay the EMI? + + The loss is borne by the provider/bank. You would have already gotten the full amount. + + +### Debit Card EMI + + +### 1. How do banks perform the EMI eligibility check during the transaction flow? + + Eligibility is checked using the card number and registered phone number. Therefore, customers should always use the phone number registered with the bank while making a payment. + + + +### 2. What is the minimum balance required in the customer's account to avail Debit Card EMI? + + None. Customers need not have any minimum balance in their accounts while placing the order. However, they need to ensure that their accounts have sufficient funds to pay the EMI due every month. + + + +### 3. How will the customers know that they are eligible for Debit Card EMI? + + Customers can check their eligibility by sending the SMS + + `DCEMI last 4 digits of Debit Card number` to `56767`, from their registered mobile number. + + + +### 4. What is the criteria to avail Debit Card EMI? + + To avail [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md), your customers should pass the eligibility criteria set by their banks. The minimum order amount on the Checkout should be ₹5000 (for HDFC and IndusInd debit cards). + + + +### 5. Can you provide a list of the EMI plans and interest rates of different banks that support Debit card EMI? + + The interest rates applied by each bank for Debit Card EMIs is provided below. + - The minimum transaction amount for which EMIs can be availed on debit cards can vary for each bank. + - The maximum transaction amount depends upon the available pre-approved limit for the customer. + + + + For **HDFC Bank (HDFC)**: + + + + Tenures in Months | Minimum Amount (in INR) | Interest rates | Maximum Amount + --- + 3 months | 3000 | 16% | NA + --- + 6 months | 5000 | 16% | NA + --- + 9 months | 5000 | 16% | NA + --- + 12 months | 5000 | 16% | NA + --- + 18 months | 5000 | 16% | NA + --- + 24 months | NA | NA | NA + + + + + + + +### For **ICICI Bank (ICIC)**: + + + + Tenures in Months | Minimum Amount (in INR) | Interest rates | Maximum Amount + --- + 3 months | 5000 | 16% | 100000 + --- + 6 months | 5000 | 16% | 100000 + --- + 9 months | 5000 | 16% | 100000 + --- + 12 months | 5000 | 16% | 100000 + --- + 18 months | 5000 | 16% | 100000 + --- + 24 months | 5000 | 16% | 100000 + + + + + + + + +### 6. Can the customers change the EMI plan after placing the order? + + No, EMI plans cannot be changed after an order is placed. + + + +### 7. Do customers need to pay any down-payment to avail Debit Card EMI? + + No, the customers need not pay any down-payment amount to avail the Debit Card EMI option. + + + +### 8. Is there a possibility to foreclose EMIs availed on Debit Cards? + + Yes, Debit Card EMIs can be foreclosed after clearing the first three EMIs. + + + +### 9. Which are the business categories for which Debit Card EMI is not allowed? + + The Debit Card EMI payment method is not allowed for certain business categories. Check the relevant Category section below for the list of sub-categories and support status. Debit Card EMI is not allowed for categories with **N** as the status. + + +> **WARN** +> +> +> **Watch Out!** +> +> Due to our partner bank restrictions, the Debit Card EMI payment methods may not be available to all the Merchant Categories and Subcategories. +> + + + + Financial Services + + + Sub Category | Description | Status + --- + mutual_fund | Mutual Fund | N + --- + lending | Lending | N + --- + cryptocurrency | Cryptocurrency | N + --- + insurance | Insurance | Y + --- + nbfc | NBFC | N + --- + cooperatives | Cooperatives | Y + --- + pension_fund | Pension Fund | Y + --- + forex | Forex | N + --- + securities | Securities | N + --- + commodities | Commodities | N + --- + accounting | Accounting and Taxes | Y + --- + financial_advisor | Financial and Investment Advisors/Financial Advisor | Y + --- + crowdfunding | Crowdfunding Platform | N + --- + trading | Stock Brokerage and Trading | N + --- + betting | Betting | N + --- + get_rich_schemes | Get Rich Schemes | N + --- + moneysend_funding | MoneySend Funding | Y + --- + wire_transfers_and_money_orders | WIRE TRANSFER MONEY ORDER | N + --- + tax_preparation_services | Tax Preparation Service | Y + --- + tax_payments | Tax Payments | Y + --- + digital_goods | Digital Goods-Multi-Category | Y + --- + atms | Financial Institutions-Automated Cash Disbursements | N + + + + +### Education + + + college | College + --- + schools | Schools + --- + university | University + --- + professional_courses | Professional Courses + --- + distance_learning | Distance Learning + --- + day_care | Pre-School/Day Care + --- + coaching | Coaching Institute + --- + elearning | E-Learning + --- + vocational_and_trade_schools | SCHOOLS, TRADE AND VOCATIONAL + --- + sporting_clubs | ATHLETIC FEES + --- + dance_halls_studios_and_schools | Dance Halls, Studios and Schools + --- + correspondence_schools | Schools, Correspondence + + + + +### Healthcare + + + Category Code | Category Name | Status + --- + pharmacy | Pharmacy | N + --- + clinic | Clinic | Y + --- + hospital | Hospital | Y + --- + lab | Lab | Y + --- + dietician | Dietician/Diet Services | Y + --- + fitness | Gym and Fitness | Y + --- + health_coaching | Health and Lifestyle Coaching | Y + --- + health_products | Health Products | Y + --- + healthcare_marketplace | Marketplace/Aggregator | N + --- + osteopaths | Osteopaths | Y + --- + medical_equipment_and_supply_stores | Dental/Laboratory/Medical/Ophthalmic Hospital Equipment and Supplies | Y + --- + drug_stores | DRUGS, DRUG PROPRIETARIES | N + --- + podiatrists_and_chiropodists | Podiatrists and Chiropodists | Y + --- + dentists_and_orthodontists | Dentists, Orthodontists | Y + --- + hardware_stores | Hardware Stores | Y + --- + ophthalmologists | Optometrists, Ophthalmologists | Y + --- + orthopedic_goods_stores | Orthopedic Goods-Artificial Limb Stores | Y + --- + health_practitioners_medical_services | Health Practitioners, Medical Services-not elsewhere classified | Y + --- + testing_laboratories | Testing Laboratories-Non medical | Y + --- + doctors | Doctors-not elsewhere classified | Y + + + + +### Utilities + + + Sub Category | Description | Status + --- + electricity | Electricity | Y + --- + gas | Gas | Y + --- + telecom | Telecom Service Provider | Y + --- + water | Water | Y + --- + cable | Cable operator | Y + --- + broadband | Broadband | Y + --- + dth | DTH | Y + --- + internet_provider | Internet service provider | Y + --- + bill_and_recharge_aggregators | Bill Payment and Recharge Aggregators | Y + --- + central | Central Department | Y + + + + +### Government + + + Sub Category | Description | Status + --- + central | Central Department | Y + --- + state | State Department | Y + --- + intra_government_purchases | Intra-Government Purchases -Government Only | Y + --- + goverment_postal_services | Postal Services -Government Only | Y + + + + +### Logistics + + + Sub Category | Description | Status + --- + freight | Freight Consolidation/Management | Y + --- + courier | Courier Shipping | Y + --- + warehousing | Public/Contract Warehousing | Y + --- + distribution | Distribution Management | Y + --- + end_to_end_logistics | End-to-end logistics | Y + --- + courier_services | Courier Services-Air &, Ground, Freight Forwarders | Y + + + + +### Tours and Travel + + + Sub Category | Description | Status + --- + aviation | Aviation | Y + --- + accommodation | Lodging and Accommodation | Y + --- + ota | OTA | Y + --- + travel_agency | Tours and Travel Agency | Y + --- + tourist_attractions_and_exhibits | Tourist Attractions and Exhibits | Y + --- + aquariums_dolphinariums_and_seaquariums | Aquariums, Dolphinariums, and Seaquariums | Y + --- + timeshares | Timeshares | Y + + + + +### Transport + + + Sub Category | Description | Status + --- + cab_hailing | Cab/auto hailing | Y + --- + bus | Bus ticketing | Y + --- + train_and_metro | Train and metro ticketing | Y + --- + automobile_rentals | National Car Rental | Y + --- + cruise_lines | CRUISE LINES | Y + --- + parking_lots_and_garages | Automobile Parking Lots and Garages | Y + --- + bridge_and_road_tolls | BRIDGE & ROAD FEES, TOLLS | Y + --- + freight_transport | Railroads and Freight | Y + --- + truck_and_utility_trailer_rentals | Truck and Utility Trailer Rentals | Y + --- + transportation | Transportation—Suburban and Local Commuter Passenger, including Ferries | Y + + + + +### Ecommerce + + + Sub Category | Description | Status + --- + ecommerce_marketplace | Horizontal Commerce/Marketplace | N + --- + agriculture | Agricultural products | Y + --- + books | Books and Publications | Y + --- + electronics_and_furniture | Electronics and Furniture | Y + --- + coupons | Coupons and deals | Y + --- + rental | Product Rental | Y + --- + fashion_and_lifestyle | Fashion and Lifestyle | Y + --- + gifting | Flowers and Gifts | Y + --- + grocery | Grocery | Y + --- + baby_products | Baby Care and Toys | Y + --- + office_supplies | Office Supplies | Y + --- + wholesale | Wholesale/Bulk trade | Y + --- + religious_products | Religious products | Y + --- + pet_products | Pet Care and Supplies | Y + --- + sports_products | Sports goods | Y + --- + arts_and_collectibles | Arts, crafts and collectibles | Y + --- + sexual_wellness_products | Sexual Wellness Products | Y + --- + drop_shipping | Dropshipping | N + --- + crypto_machinery | Crypto Machinery | Y + --- + tobacco | Tobacco | Y + --- + weapons_and_ammunitions | Weapons and Ammunitions | Y + --- + stamps_and_coins_stores | Stamps & Coins Stores | Y + --- + automobile_parts_and_equipements | MOTOR VEHICLE SUPPLIES | Y + --- + office_equipment | Office, Photographic, Photocopy, and Microfilm Equipment | Y + --- + garden_supply_stores | Lawn and Garden Supply Stores | Y + --- + household_appliance_stores | Household Appliance Stores | Y + --- + non_durable_goods | NONDURABLE GOODS | Y + --- + electrical_parts_and_equipment | Electrical Parts and Equipment | Y + --- + wig_and_toupee_shops | Wig and Toupee Shops | Y + --- + gift_novelty_and_souvenir_shops | Card, Gift, Novelty, and Souvenir Shops | Y + --- + duty_free_stores | Duty Free Stores | Y + --- + office_and_commercial_furniture | Office and Commercial Furniture | Y + --- + dry_goods | Piece Goods, Notions, and Other Dry Goods | Y + --- + books_and_publications | Book Stores | Y + --- + camera_and_photographic_stores | Camera and Photographic Supply Stores | Y + --- + meat_supply_stores | Freezer, Locker Meat Provisioners | Y + --- + leather_goods_and_luggage | Leather Goods and Luggage Stores | Y + --- + snowmobile_dealers | Snowmobile Dealers | Y + --- + men_and_boys_clothing_stores | Men’s and Boy’s Clothing and Furnishings Store | Y + --- + paint_supply_stores | Varnishes, Paints, Supplies | Y + --- + automotive_parts | Automotive Parts, Accessories Stores | Y + --- + jewellery_and_watch_stores | Precious Stones and Metals, Watches and Jewelry | Y + --- + auto_store_home_supply_stores | Auto Store, Home Supply Stores | Y + --- + tent_stores | Tent and Awning Shops | Y + --- + petroleum_and_petroleum_products | Petroleum and Petroleum Products | N + --- + department_stores | Department Stores | Y + --- + shoe_stores_retail | Shoe Stores | Y + --- + automotive_tire_stores | Automotive Tire Stores | Y + --- + sport_apparel_stores | Sports Apparel, Riding Apparel Stores | Y + --- + chemicals_and_allied_products | Chemicals and Allied Products | Y + --- + fireplace_parts_and_accessories | FIREPLACE FIREPLACE SCREENS AND ACCESSORIES STORES | Y + --- + commercial_equipments | COMMERCIAL EQUIPMENTS | Y + --- + family_clothing_stores | Family Clothing Stores | Y + --- + fabric_and_sewing_stores | Fabric, Needlework, Piece Goods, and Sewing Stores | Y + --- + camper_recreational_and_utility_trailer_dealers | Camper, Recreational and utility trailer dealers | Y + --- + record_shops | Record Shops | Y + --- + home_supply_warehouse | Home Supply Warehouse | Y + --- + clocks_and_silverware_stores | Clock, Jewelry, Watch, and Silverware Store | N + --- + art_supply_stores | Artist Supply Stores, Craft Shops | Y + --- + pawn_shops | Pawn Shops | Y + --- + school_supplies_and_stationery | Office, School Supply, and Stationery Stores | Y + --- + opticians_optical_goods_and_eyeglasse_stores | Opticians, Optical Goods, and Eyeglasses | Y + --- + watch_and_jewellery_repair_stores | Clock, Jewelry, and Watch Repair Shops | N + --- + wholesale_footwear_stores | Commercial Footwear | Y + --- + antique_stores | Antique Reproduction Stores | Y + --- + plumbing_and_heating_equipment | Plumbing and Heating Equipment | Y + --- + variety_stores | Variety Stores | Y + --- + liquor_stores | Package Stores, Beer, Wine, Liquor | N + --- + boat_dealers | Boat Dealers | Y + --- + cosmetic_stores | Cosmetic Stores | Y + --- + home_furnishing_stores | Miscellaneous House Furnishing Specialty Shops | Y + --- + telecommunication_equipment_stores | Telecommunication Equipment Including Telephone Sales | Y + --- + women_clothing | Womens Ready to Wear Stores | Y + --- + florists | Florists | Y + --- + commercial_photography_and_graphic_design_services | Commercial Art, Graphics, Photography | Y + --- + building_matrial_stores | Building Materials, Lumber Stores | Y + --- + candy_nut_confectionery_shops | Candy, Nut, Confectionery Stores | Y + --- + glass_and_wallpaper_stores | Glass, Paint, Wallpaper Stores | Y + --- + video_game_supply_stores | Video Amusement Game Supplies | Y + --- + drapery_and_window_coverings_stores | Drapery, Upholstery, and Window Coverings Stores | Y + --- + uniforms_and_commercial_clothing_stores | Men’s, Women’s, and Children’s Uniforms and Commercial Clothing | Y + --- + automotive_paint_shops | Automotive Paint Shops | Y + --- + durable_goods_stores | Durable Goods not elsewhere classified | Y + --- + fur_shops | Furriers and Fur Shops | Y + --- + industrial_supplies | Industrial Supplies | Y + --- + motorcycle_shops_and_dealers | Motorcycle Shops and Dealers | Y + --- + children_and_infants_wear_stores | Children’s and Infants’ Wear Stores | Y + --- + computer_software_stores | Computer Software Stores | Y + --- + women_accessory_stores | Women Accessory and Specialty Stores | Y + --- + books_periodicals_and_newspaper | Books, Periodicals and Newspapers | Y + --- + floor_covering_stores | Floor Covering Stores | Y + --- + crystal_and_glassware_stores | Crystal and Glassware Stores | Y + --- + hardware_equipment_and_supply_stores | Hardware Equipment and Supplies | Y + --- + discount_stores | Discount stores | Y + --- + computers_peripheral_equipment_software | Computers, Computer Peripheral Equipment, Software | Y + --- + automobile_and_truck_dealers | Automobile and Truck Dealers-Used Only-Sales | Y + --- + aircraft_and_farm_equipment_dealers | Miscellaneous Automotive, Aircraft, and Farm Equipment Dealers-not elsewhere classified | Y + --- + antique_shops_sales_and_repairs | Antique Shops-Sales, Repairs, and Restoration Services | Y + --- + bicycle_stores | Bicycle Shops-Sales and Service | Y + --- + hearing_aids_stores | Hearing Aids-Sales, Service, Supply Stores | Y + --- + music_stores | Music Stores-Musical Instruments, Pianos, Sheet Music | Y + --- + construction_materials | Construction Materials-not elsewhere classified | Y + --- + accessory_and_apparel_stores | Accessory and Apparel Stores-Miscellaneous | Y + --- + second_hand_stores | SECOND HAND STORES-USED MERCHANDISE STORES | Y + --- + fuel_dealers | Fuel Dealers-Coal, Fuel Oil, Liquefied Petroleum, Wood | N + --- + furniture_and_home_furnishing_store | Furniture and Home Furnishing store | Y + + + + +### Food and Beverages + + + Sub Category | Description | Status + --- + online_food_ordering | Online Food Ordering | Y + --- + restaurant | Restaurants | Y + --- + food_court | Food Courts/Corporate Cafeteria | Y + --- + catering | Catering Services | Y + --- + alcohol | Alcoholic Beverages | Y + --- + restaurant_search_and_booking | Restaurant search and reservations | Y + --- + dairy_products | Dairy Products Stores | Y + --- + bakeries | Bakeries | Y + + + + +### IT and Software + + + Sub Category | Description | Status + --- + saas | SaaS (Software as a service) | N + --- + paas | Platform as a service | N + --- + iaas | Infrastructure as a service | N + --- + consulting_and_outsourcing | Consulting and Outsourcing | N + --- + web_development | Web designing, development and hosting | Y + --- + technical_support | Technical Support | Y + --- + data_processing | Data processing | Y + + + + +### Gaming + + + Sub Category | Description | Status + --- + game_developer | Game developer and publisher | N + --- + esports | E-sports | N + --- + online_casino | Online Casino | N + --- + fantasy_sports | Fantasy Sports | N + --- + gaming_marketplace | Game distributor/Marketplace | N + + + + +### Media and Entertainment + + + Sub Category | Description | Status + --- + video_on_demand | Video on demand | Y + --- + music_streaming | Music streaming services | Y + --- + multiplex | Multiplexes | Y + --- + content_and_publishing | Content and Publishing | Y + --- + ticketing | Events and movie ticketing | Y + --- + news | News | Y + --- + video_game_arcades | Video Game Arcades/Establishments | N + --- + video_tape_production_and_distribution | Motion Pictures and Video Tape Production and Distribution | Y + --- + bowling_alleys | Bowling Alleys | Y + --- + billiard_and_pool_establishments | Billiard and Pool Establishments | Y + --- + amusement_parks_and_circuses | Amusement Parks, Carnivals, Circuses, Fortune Tellers | Y + --- + ticket_agencies | Theatrical Producers-except Motion Pictures, Ticket Agencies | Y + + + + +### Services + + + Sub Category | Description | Status + --- + repair_and_cleaning | Repair and cleaning services | Y + --- + interior_design_and_architect | Interior Designing and Architect | Y + --- + movers_and_packers | Movers and Packers | Y + --- + legal | Legal Services | Y + --- + event_planning | Event planning services | Y + --- + service_centre | Service Centre | Y + --- + consulting | Consulting Services | N + --- + ad_and_marketing | Ad and marketing agencies | Y + --- + services_classifieds | Services Classifieds | Y + --- + multi_level_marketing | Multi-level Marketing | Y + --- + construction_services | GENERAL CONTRACTORS | Y + --- + architectural_services | Horticultural and Landscaping Services | Y + --- + car_washes | CAR WASHES | Y + --- + motor_home_rentals | A MOTOR HOME AND RECREATIONAL | Y + --- + stenographic_and_secretarial_support_services | Stenographic and Secretarial Support Services | Y + --- + chiropractors | Chiropractors | Y + --- + automotive_service_shops | Automotive Service Shops | Y + --- + shoe_repair_shops | Hat Cleaning Shops, Shoe Repair Shops, Shoe Shine Parlors | Y + --- + telecommunication_service | Telecom Servc including but not ltd to prepaid phone serv | Y + --- + fines | FINES | N + --- + security_agencies | Agencies – Security Services | Y + --- + type_setting_and_engraving_services | Typesetting, Plate Making, Related Services | Y + --- + small_appliance_repair_shops | Appliance Repair Shops, Electrical and Small | Y + --- + photography_labs | Photo Developing, Photofinishing Laboratories | Y + --- + dry_cleaners | Dry Cleaners | Y + --- + electronic_repair_shops | Electronic Repair Shops | Y + --- + cleaning_and_sanitation_services | Specialty Cleaning, Polishing, and Sanitation Preparations | Y + --- + nursing_care_facilities | Nursing and Personal Care Facilities | Y + --- + direct_marketing | Direct Marketing Other Direct Marketers not elsewhere classified | Y + --- + veterinary_services | Veterinary Services | Y + --- + affliated_auto_rental | AFFILIATED AUTO RENTAL | Y + --- + alimony_and_child_support | COURT COST INCLUDING ALIMONY AND CHILD SUPPORT | Y + --- + airport_flying_fields | AIRPORT FLYING FIELDS | Y + --- + tire_retreading_and_repair_shops | Tire Retreading and Repair Shops | Y + --- + television_cable_services | Cable and other Pay Television Services | Y + --- + recreational_and_sporting_camps | Recreational and Sporting Camps | Y + --- + agricultural_cooperatives | AGRICULTURAL COOPERATIVES | Y + --- + carpentry_contractors | Carpentry Contractors | Y + --- + wrecking_and_salvaging_services | Wrecking and Salvage Yards | Y + --- + automobile_towing_services | Towing Services | Y + --- + barber_and_beauty_shops | Barber and Beauty Shops | Y + --- + video_tape_rental_stores | Video Tape Rental Stores | Y + --- + golf_courses | Golf Courses, Public | Y + --- + miscellaneous_repair_shops | Miscellaneous Repair Shops and Related Services | Y + --- + motor_homes_and_parts | MOTOR HOME DEALERS | Y + --- + debt_marriage_personal_counseling_service | Debt, Marriage, Personal Counseling Service | Y + --- + air_conditioning_and_refrigeration_repair_shops | Air Conditioning and Refrigeration Repair Shops | Y + --- + tailors | Alterations, Mending, Seamstresses, Tailors | Y + --- + massage_parlors | Massage Parlors | Y + --- + horse_or_dog_racing | Government Licensed Horse/Dog Racing | N + --- + credit_reporting_agencies | Consumer Credit Reporting Agencies | Y + --- + heating_and_plumbing_contractors | Air Conditioning, Heating, and Plumbing Contractors | Y + --- + electrical_contractors | ELECTRICAL CONTRACTORS | Y + --- + carpet_and_upholstery_cleaning_services | Carpet and Upholstery Cleaning | Y + --- + roofing_and_metal_work_contractors | Roofing and Siding, Sheet Metal Work Contractors | Y + --- + internet_service_providers | Computer Network/Information Services | Y + --- + laundry_services | Cleaning, Garment, and Laundry Services | Y + --- + recreational_camps | Trailer Parks and Campgrounds | Y + --- + masonry_contractors | Insulation, Masonry, Plastering, Stonework, and Tile Setting Contractors | Y + --- + exterminating_and_disinfecting_services | Exterminating and Disinfecting Services | Y + --- + ambulance_services | Ambulance Services | Y + --- + funeral_services_and_crematories | Funeral Services and Crematories | Y + --- + metal_service_centres | Metal Service Centers and Offices | Y + --- + copying_and_blueprinting_services | Quick Copy, Reproduction, and Blueprinting Services | Y + --- + fuel_dispensers | Fuel Dispenser, Automated | N + --- + lottery | Government Owned Lottery,Government Owned Lottery | N + --- + welding_repair | WELDING REPAIR | Y + --- + mobile_home_dealers | Mobile Home Dealers | Y + --- + concrete_work_contractors | CONCRETE WORK CONTRACTORS | Y + --- + boat_rentals | Boat Leases and Boat Rentals | Y + --- + personal_shoppers_and_shopping_clubs | Buying/Shopping Clubs, Services | Y + --- + door_to_door_sales | DOOR-TO-DOOR SALES | Y + --- + travel_related_direct_marketing | Direct Marketing-Travel-Related Arrangement Services | Y + --- + lottery_and_betting | Betting -including Lottery Tickets, Chips at Gaming Casinos, Off-Track Betting and Wagers at Race Tracks | N + --- + bands_orchestras_and_miscellaneous_entertainers | Bands, Orchestras, and Miscellaneous Entertainers-not elsewhere classified | Y + --- + furniture_repair_and_refinishing | Furniture-Reupholstery and Repair, Refinishing | Y + --- + direct_marketing_and_subscription_merchants | Direct Marketing-Continuity/Subscription Merchants | N + --- + typewriter_stores_sales_service_and_rentals | Typewriter Stores-Sales, Service, and Rentals | Y + --- + direct_marketing_insurance_services | Direct Marketing-Insurance Services | Y + --- + business_services | Business Services-not elsewhere classified | Y + --- + inbound_telemarketing_merchants | Direct Marketing-Inbound Telemarketing Merchants | N + --- + recreation_services | Recreation Services-not elsewhere classified | Y + --- + swimming_pools | Swimming Pools-Sales and Supplies | Y + --- + outbound_telemarketing_merchants | Direct Marketing-Outbound Telemarketing Merchants | N + --- + public_warehousing | Public Warehousing-Farm Products, Refrigerated Goods, | Y + --- + clothing_rental_stores | Clothing Rental-Costumes, Uniforms, and Formal Wear | Y + --- + contractors | Contractors, Special Trade-not elsewhere classified | Y + --- + transportation_services | Transportation Services-not elsewhere classified | Y + --- + electric_razor_stores | Electric Razor Stores-Sales and Service | Y + --- + service_stations | Service Stations with or without Ancillary Services | N + --- + photographic_studio | Photographic studios | Y + --- + professional_services | Professional services | Y + --- + + + + +### Housing and Real Estate + + + Sub Category | Description | Status + --- + developer | Developer | N + --- + facility_management | Facility Management Company | Y + --- + rwa | RWA | Y + --- + coworking | Co-working spaces | N + --- + realestate_classifieds | Real estate classifieds | N + --- + space_rental | Home or office rentals | N + + + + +### Not-for-Profit + + + Sub Category | Description | Status + --- + charity | Charity | Y + --- + educational | Educational | Y + --- + religious | Religious | Y + --- + personal | Personal | Y + + + + +### Social + + + Sub Category | Description | Status + --- + matchmaking | Dating and Matrimony platforms | N + --- + social_network | Social Network | Y + --- + messaging | Messaging and Communication | Y + --- + professional_network | Professional Network | Y + --- + neighbourhood_network | Local/Neighbourhood network | Y + --- + automobile_associations_and_clubs | Automobile Associations | Y + --- + political_organizations | Political Organizations | N + --- + country_and_athletic_clubs | Clubs-Country Clubs, Membership-Athletic, Recreation, Sports, Private Golf Courses | Y + --- + associations_and_membership | Associations and membership | Y + + + + + + + +### Credit Card EMI + + +### 1. What are the standard credit card interest rates charged by the banks for EMI? + + The interest rates charged by various banks for each of the tenures are provided for your reference. The minimum transaction amount for which EMIs are applicable can vary for each bank. The maximum amount is dependent on the card limit set by the issuing bank. + + + + **American Express (AMEX)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 5000 ^^^^^^^ | 199 ^^^^^^^ | 14% | October 12, 2023 ^^^^^^^ + --- + 6 months | | | 14% | + --- + 9 months | | | 14% | + --- + 12 months | | | 14% | + --- + 18 months | | | 15% | + --- + 24 months | | | 15% | + --- + 36 months | | | NA | + + + + + + +### **Bank of Baroda (BARB)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2500 ^^^^^^^ | NA ^^^^^^^ | 16% | July 26, 2024 ^^^^^^^ + --- + 6 months | | | 16% | + --- + 9 months | | | 16% | + --- + 12 months | | | 16% | + --- + 18 months | | | 16% | + --- + 24 months | | | 16% | + --- + 36 months | | | NA | + + + + + + +### **Citibank (CITI)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2500 ^^^^^^^ | A one-time processing fee of 1% or ₹100, whichever is higher, will be charged by the bank. ^^^^^^^ | 16% | April 08, 2024 ^^^^^^^ + --- + 6 months | | | 16% | + --- + 9 months | | | 16% | + --- + 12 months | | | 16% | + --- + 18 months | | | 16% | + --- + 24 months | | | 16% | + --- + 36 months | | | NA | + + + + + + +### **Federal Bank (FDRL)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2500 ^^^^^^^ | NA ^^^^^^^ | 15.99% | July 26, 2024 ^^^^^^^ + --- + 6 months | | | 15.99% | + --- + 9 months | | | 15.99% | + --- + 12 months | | | 15.99% | + --- + 18 months | | | 15.99% | + --- + 24 months | | | 15.99% | + --- + 36 months | | | NA | + + + + + + +### **HDFC Bank (HDFC)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 1000 | 299 ^^^^^^^ | 16% | July 23, 2025 ^^^^^^^ + --- + 6 months | 1000 | | 16% | + --- + 9 months | 1000 | | 16% | + --- + 12 months | 1000 | | 16% | + --- + 18 months | 3000 | | 16% | + --- + 24 months | 3000 | | 16% | + --- + 36 months | NA | | NA | + + + + + + +### **HSBC Bank (HSBC)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2000 ^^^^^^^ | 99 ^^^^^^^ | 15% | 21 February 2024 ^^^^^^^ + --- + 6 months | | | 15% | + --- + 9 months | | | 15% | + --- + 12 months | | | 15% | + --- + 18 months | | | 15% | + --- + 24 months | | | 15% | + --- + 36 months | | | NA | + + + + + + +### **ICICI Bank (ICIC)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 1500 ^^^^^^^ | 199 ^^^^^^^ | 15.99% | November 29, 2023 ^^^^^^^ + --- + 6 months | | | 15.99% | + --- + 9 months | | | 15.99% | + --- + 12 months | | | 15.99% | + --- + 18 months | | | 15.99% | + --- + 24 months | | | 15.99% | + --- + 36 months | | | NA | + + + + + + +### **IDFB Bank (IDFB)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2500 ^^^^^^^ | A one-time processing fee of 1% or ₹99, whichever is higher, will be charged by the bank. ^^^^^^^ | 16% | September 17, 2025 ^^^^^^^ + --- + 6 months | | | 16% | + --- + 9 months | | | 16% | + --- + 12 months | | | 16% | + --- + 18 months | | | 16% | + --- + 24 months | | | 16% | + --- + 36 months | | | 16% | + + + + + + +### **IndusInd Bank (INDB)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2000 ^^^^^^^ | 249 ^^^^^^^ | 16% | September 12, 2024 ^^^^^^^ + --- + 6 months | | | 16% | + --- + 9 months | | | 16% | + --- + 12 months | | | 16% | + --- + 18 months | | | 16% | + --- + 24 months | | | 16% | + --- + 36 months | | | 16% | + + + + + + +### **Kotak Mahindra Bank (KKBK)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2500 ^^^^^^^ | 249 ^^^^^^^ | 16% | February 21, 2024 ^^^^^^^ + --- + 6 months | | | 16% | + --- + 9 months | | | 16% | + --- + 12 months | | | 16% | + --- + 18 months | | | 16% | + --- + 24 months | | | 16% | + --- + 36 months | | | NA | + + + + + + +### **RBL Bank (RATN)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2000 ^^^^^^^ | 199 ^^^^^^^ | 13% | April 05, 2023 ^^^^^^^ + --- + 6 months | | | 14% | + --- + 9 months | | | 15% | + --- + 12 months | | | 15% | + --- + 18 months | | | 15% | + --- + 24 months | | | 15% | + --- + 36 months | | | NA | + + + + + + +### **State Bank of India (SBIN)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2500 ^^^^^^^ | NA | 16.75% | January 7, 2026 ^^^^^^^ + --- + 6 months | | A one-time processing fee of ₹40 will be charged if the transaction amount exceeds ₹20,000. | 16.50% | + --- + 9 months | | A one-time processing fee of ₹79 will be charged if the transaction amount exceeds ₹20,000. | 16.50% | + --- + 12 months | | A one-time processing fee of ₹159 will be charged if the transaction amount exceeds ₹20,000. | 16% | + --- + 18 months | | A one-time processing fee of ₹199 will be charged if the transaction amount exceeds ₹20,000. | 16.25% | + --- + 24 months | | A one-time processing fee of ₹299 will be charged if the transaction amount exceeds ₹20,000. | 16.25% | + --- + 36 months | | NA | NA | + + + + + + +### **Standard Chartered (SCBL)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2500 ^^^^^^^ | A one-time processing fee of 1% will be charged by the bank. ^^^^^^^ | 11.88% | July 26, 2024 ^^^^^^^ + --- + 6 months | | | 13% | + --- + 9 months | | | 14% | + --- + 12 months | | | 14% | + --- + 18 months | | | NA | + --- + 24 months | | | NA | + --- + 36 months | | | NA | + + + + + + +### **Axis Bank (UTIB)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 3000 ^^^^^^^ | A one-time processingfee of 1% or ₹100, whichever is higher, will be charged by the bank. ^^^^^^^ | 16% | December 12, 2023 ^^^^^^^ + --- + 6 months | | | 16% | + --- + 9 months | | | 16% | + --- + 12 months | | | 16% | + --- + 18 months | | | 16% | + --- + 24 months | | | 16% | + --- + 36 months | | | NA | + + + + + + +### **Yes Bank (YESB)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 1500 ^^^^^^^ | 299 ^^^^^^^ | 16% | December 12, 2023 ^^^^^^^ + --- + 6 months | | | 16% | + --- + 9 months | | | 16% | + --- + 12 months | | | 16% | + --- + 18 months | | | 16% | + --- + 24 months | | | 16% | + --- + 36 months | | | NA | + + + + + + + +### 2. What are the interest rates charged by other credit cards for EMI? + + The interest rates charged by other cards for EMI is given below. + + + **OneCard**: + + + + Tenures in Months | Minimum Amount (in INR) | Interest rates + --- + 3 months | 2500 ^^^^^^ | 16% + --- + 6 months | | 16% + --- + 9 months | | 16% + --- + 12 months | | 16% + --- + 18 months | | 16% + --- + 24 months | | 16% + + + + + + + + +### Cardless EMI + + +### 1. What are the standard interest rates charged by the banks for cardless EMI? + + The standard interest rates charged by various banks for cardless EMI are provided for your reference. + + + Cardless EMI | Issuer Bank | Provider Code | Minimum Amount (in INR) | 3 months | 6 months | 9 months | 12 months | 18 months + --- + InstaCred | HDFC Bank | `hdfc` | 5000 | 16% | 16% | 16% | 16% | 16% + --- + InstaCred | ICICI Bank | `icic` | 7000 | 16% | 16% | 16% | 16% | NA + --- + InstaCred | IDFC First | `idfb` | 5000 | 24% | 24% | 24% | 24% | NA + --- + InstaCred | Kotak Mahindra Bank | `kkbk` | 3000| 20% | 20% | 20% | 20% | NA + --- + axio | NA | `walnut369` | 900 | 24% | 24% | 24% | NA | NA + --- + Fibe | NA | `earlysalary` | 3000 | 30% | 30% | 30% | NA | NA + --- + ZestMoney | NA | `zestmoney` | 3000 | 22% | 24% | 24% | NA | NA + + + + +### 2. What are the standard interest rates charged by Pay Later providers for cardless EMI? + + The standard interest rates charged by the providers for Pay Later providers are given below: + + + Pay Later | 15 days | 30 days | 45 days | 60 days | 90 days + --- + LazyPay | Interest free | NA | NA | NA | NA + --- + PayPal | Interest free | NA | NA | NA | NA + + + * Interest rates are determined on a case-to-case basis. [Contact support](https://razorpay.com/support/#request) for more information. + + +> **WARN** +> +> +> **Watch Out!** +> +> All interest rates mentioned above are per annum. +> + + + +## Eligibility Check + + +### 1. How does eligibility check work? + + Razorpay has partnered with various Debit Card EMI, Cardless EMI, and Pay Later providers. The providers determine customer eligibility for payment instruments based on their respective pre-defined criteria. Razorpay aggregates the information and presents customers with eligible payment options on checkout. + + The customer proceeds with the selected payment option on Razorpay checkout if eligible. If ineligible, alternate options are presented. + + + +### 2. What is the pre-defined criteria to determine customer eligibility? + + The pre-defined criteria are specific factors each provider uses, such as repayment history, digital footprint, and bureau score, to assess a customer's creditworthiness. + + + +### 3. What parameters are required during the eligibility check process? + + The providers determine customer eligibility based on their mobile number and order amount for the requested transaction. + + + +### 4. If a customer is ineligible for payment, what should they do next? + + The customer can view the reason for ineligibility and choose to: + - Use a different mobile number for the chosen payment instrument and try again. + - Opt for a different payment instrument/method. + + + +### 5. What are the reasons for ineligibility? + + You can view the [list of reasons for ineligibility](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/eligibility-check/standard.md#reasons-for-ineligibility) and their descriptions. + + + +### 6. Where can I find the minimum and maximum order amount eligible for a specific payment method/instrument? + + You can view the minimum and maximum order amount for the following payment methods. However, ensure you [check the providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/eligibility-check/standard.md#list-of-payment-methods) on which eligibility check is performed. + - [Debit Card EMI](#5-can-you-provide-a-list-of-the) + - [Cardless EMI](#1-what-are-the-standard-interest-rates-charged) + - [Pay Later](#2-what-are-the-standard-interest-rates-charged) + + Please note that not all the providers listed under the above methods are applicable for an eligibility check. diff --git "a/llm-content/payments/payment-gateway/emi\302\262/glossary.md" "b/llm-content/payments/payment-gateway/emi\302\262/glossary.md" new file mode 100644 index 00000000..956fe3f8 --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/glossary.md" @@ -0,0 +1,19 @@ +--- +title: Payment Gateway | EMI² Suite - Glossary +heading: Glossary +description: List of commonly used terms related to Razorpay EMI² Suite. +--- + +# Glossary + +The following table lists all the commonly used terms and their definitions used in EMI² Suite: + +Terms | Description +--- +EMI² Suite | The EMI² suite enables businesses to attract and retain their customer base by providing affordable payment options. +--- +EMI | An equated monthly installment (EMI) is a fixed payment amount made by a borrower to a lender at a specified date each calendar month. +--- +No Cost EMI | A No Cost EMI is when you pay for a product in installments without any interest charged on it. +--- +Offers | An offer is a conditional proposal made by a buyer or seller to buy or sell an asset, which becomes legally binding if accepted. Using Razorpay Offers, you can have a complete control of the discounts that can be offered to your customers. diff --git "a/llm-content/payments/payment-gateway/emi\302\262/payment-methods/custom-integration.md" "b/llm-content/payments/payment-gateway/emi\302\262/payment-methods/custom-integration.md" new file mode 100644 index 00000000..8098181f --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/payment-methods/custom-integration.md" @@ -0,0 +1,214 @@ +--- +title: Integrate Payment Methods in Custom Checkout +description: Integrate Cardless EMI, Debit and Credit Card EMI and Pay Later payment methods at Custom Checkout. +--- + +# Integrate Payment Methods in Custom Checkout + +You can integrate the following payment methods at Checkout to make your products or services more affordable for the customers: + +- **Cardless EMI** + + Use Cardless EMI to convert their payment amount to EMIs, without a debit or a credit card. This makes high-value products affordable for customers, as they can purchase without a large down payment. Some of the Cardless EMI providers in the market are InstaCred, EarlySalary and Zestmoney. + +- **Debit and Credit Card EMI** + + EMI is a popular payment method that customers prefer to reduce upfront product payments. The EMIs are available on both debit cards and credit cards. + +- **Pay Later** + + Pay Later offers digital credit to your customers, allowing them to purchase products without making an immediate payment. Some Pay Later providers in the market are FlexiPay by HDFC Bank, ICICI Pay Later, Simpl, and LazyPay. + +## Integration Steps + +To submit the payment details, you must invoke the `createPayment` method. In this method, add the following parameters and the usual checkout parameters. + +## Cardless EMI + +Cardless EMI is a checkout payment method that allows customers to convert their payment amount to EMIs. The user does not require a debit or credit card. Make payments via credits approved by the supported Cardless EMI payment partner. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +> **WARN** +> +> +> **Watch Out!** +> +> The customer should be registered with the cardless EMI payment partner before a payment. +> + +```js: Cardless EMI +var data = { + amount: 500000, + currency: 'INR', + email: 'gaurav.kumar@example.com', + contact: '9000090000', + order_id: 'order_EAkbvXiCJlwhHR', + method: 'cardless_emi', + provider: 'zestmoney' +}); +``` + +### Request Parameters + +`method` _mandatory_ +: `string` The payment method to be used by the customer to complete the payment. Here, the value must be `cardless_emi`. + +`provider` +: The Cardless EMI provider. Possible values: + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `zestmoney` + - `earlysalary` + - `walnut369` + +## Debit and Credit Card EMI + +For EMIs, data is the same as the card, with the following differences: + +- `method` should be `emi` +- An additional field, `emi_duration` corresponding to the number of months for EMI, should be included. After the customer selects the desired plan, pass the corresponding value in the `emi_duration` field. + +```js: EMI +razorpay.createPayment({ + amount: 300000, + email: 'gaurav.kumar@example.com', + contact: '9000090000', + order_id: 'order_9A33XWu170gUtm', + method: 'emi', + emi_duration: 9, + 'card[name]': 'Gaurav Kumar', + 'card[number]': '5241810000000000', + 'card[cvv]': '123', + 'card[expiry_month]': '10', + 'card[expiry_year]': '30' +}); +``` + +### Request Parameters + +`method` _mandatory_ +: `string` The payment method to be used by the customer to complete the payment. Here, the value must be `emi`. + +`emi_duration` _mandatory_ +: `integer` Enter the duration of the EMI scheme in months. For example, `12`. + +`card` +: The debit or credit card details should be entered when making the payment. + + `number` _mandatory_ + : `integer` Unformatted card number. + + `name` _mandatory_ + : `string` The name of the cardholder. + + `expiry_month` _mandatory_ + : `integer` Expiry month for the card in `MM` format. + + `expiry_year` _mandatory_ + : `integer` Expiry year for the card in `YY` format. + + `cvv` _mandatory_ + : `integer` CVV printed on the back of the card. + + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +### Fetch EMI Plans + +To display the available EMI plans, use the Razorpay checkout helper methods to fetch and display the details of the EMI plans. You can use the event ready, as shown below: + +```javascript: Request +var razorpay = new Razorpay(...); // as before + + /** + * The above code remains the same. + * You can fetch the available EMI plans by adding the below code in your options. + */ +razorpay.once('ready', function() { + console.log(razorpay.methods.emi_plans); + console.log(razorpay.methods.netbanking); +}) +```json: Response +{ + "HDFC": { + "min_amount": 300000, + "plans": { + "3": 12, + "6": 12, + "9": 13, + "12": 13, + "18": 15, + "24": 15 + } + }, + "AMEX": { + "min_amount": 500000, + "plans": { + "3": 15, + "6": 15, + "9": 15, + "12": 15 + } + } + // etc.. +} +``` + +`razorpay.methods.emi_plans` +: `string` Lists the EMI-supported banks with their respective interest rates. + +`razorpay.methods.netbanking` +: `string` Contains the list of all banks and bank codes. + +## Pay Later + +```js: Pay Later +razorpay.createPayment({ + amount: 200000, + currency: 'INR', + email: 'gaurav.kumar@example.com', + contact: '9111145678', + order_id: 'order_DPzFe1Q1dEObDv', + method: 'paylater', + provider: +}); +``` + +### Request Parameters + +`method` _mandatory_ +: `string` The payment method to be used by the customer to complete the payment. Here, the value must be `Pay Later`. + +`provider` _mandatory_ +: The Pay Later provider. Possible values: + - `lazypay` + - `paypal` + +### Related Information + +[EMI² Suite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi².md) diff --git "a/llm-content/payments/payment-gateway/emi\302\262/payment-methods/standard-integration.md" "b/llm-content/payments/payment-gateway/emi\302\262/payment-methods/standard-integration.md" new file mode 100644 index 00000000..037a6cdd --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/payment-methods/standard-integration.md" @@ -0,0 +1,24 @@ +--- +title: About Payment Methods +description: Enable Cardless EMI, Debit and Credit Card EMI and Pay Later payment methods on Standard Checkout. +--- + +# About Payment Methods + +You can enable the following payment methods at the Checkout to make your products or services more affordable for the customers. You need not perform a separate integration if you have integrated with our Standard Checkout. However, you must enable the payment method on your account by sending a request to our [Support team](https://razorpay.com/support/#request). + +- **Cardless EMI** + + Use Cardless EMI to convert their payment amount to EMIs, without a debit or a credit card. This makes high-value products affordable for customers, as they can purchase without a large down payment. Some of the Cardless EMI providers in the market are InstaCred, Fibe, and Zestmoney. Know how to use [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) as a Razorpay payment method. + +- **Debit and Credit Card EMI** + + EMI is a popular payment method that customers prefer to reduce upfront product payments. The EMIs are available on both debit cards and credit cards. Know how to use [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md) as Razorpay payment methods. + +- **Pay Later** + + Pay Later offers digital credit to your customers, allowing them to purchase products without making an immediate payment. Some of the Pay Later providers in the market are FlexiPay by HDFC Bank, ICICI Pay Later, Simpl and LazyPay. Know how to use [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md) as a Razorpay payment method. + +### Related Information + +- [EMI² Suite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi².md) diff --git "a/llm-content/payments/payment-gateway/emi\302\262/use-cases.md" "b/llm-content/payments/payment-gateway/emi\302\262/use-cases.md" new file mode 100644 index 00000000..829aed0c --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/use-cases.md" @@ -0,0 +1,199 @@ +--- +title: Razorpay EMI² Use Cases +heading: EMI² Use Cases +description: Discover how EMI² can help you attract customers for your business and boost sales through innovative features, such as the Affordability Widget, Eligibility Check, Offers and Payment Methods. +--- + +# EMI² Use Cases + +Go through the use cases of how EMI² has helped businesses across the following industries improve conversion rates, build on their brand image and goodwill, enhance customer experience, and reduce drop-offs. + + +### Ecommerce + + Acme Corp, an online retailer, faced challenges in providing customers with flexible payment options and discounts. The lack of customer awareness about these offers decreased engagement and conversion rates on the platform. + + Here is how EMI² helped Acme Corp: + + + + Affordable Payment Options + + EMI² enables Acme Corp to offer flexible payment options, including EMIs and Pay Later, making their products more affordable and accessible to customers. + + + +### Offering Exclusive Discounts + + Acme Corp uses EMI² to provide exclusive deals and discounts, including Offers, No Cost EMI and Low Cost EMI offers, encouraging customers to make more purchases and increasing their loyalty to the brand. + + + +### Help Unlock Discounts + + EMI²s Discount Whisperer is a real-time indicator of potential savings for customers. It intelligently analyses customer spending and guides them to unlock bigger discounts. + + It also calculates the additional savings they can receive and how much more they need to shop for to get even bigger discounts, resulting in higher conversions and a boost in average order value. + + + +### Affordability Widget + + Acme Corp uses EMI² Affordability Widget to create awareness upfront about the EMI²-based payment options and offers available to customers on their website/app before they reach checkout. + + Acme Corp embedded these EMI²-based payment options and offers on their product listing pages, checkout pages, and other relevant screens to educate the customers and incentivise them to make purchases, thus reducing cart abandonment and decision-making time. + + + +### Integrate Checkout from Widget + + Acme Corp integrated their checkout with EMI² Affordability Widget, enabling their customers to complete their purchase directly from the widget itself, thus eliminating friction in the checkout process. + + Our Affordability Widget's auto-selection functionality helps apply the chosen payment option or offer from the Affordability Widget to the payment checkout page, which helps Acme Corp avoid confusion and reduce the risk of abandoned carts. + + + + + + +### Travel and Hospitality + + Acme Trip, a leading travel agency, offers travellers diverse services and accommodations to deliver a seamless booking experience. However, the company encountered challenges in providing convenient payment options and offers to its customers. + + This affected customer satisfaction and loyalty, as travellers seek flexibility and appealing deals when making travel arrangements. Customers could not complete the payment process due to ineligible payment options and a lack of guidance, leading to drop-offs and lost sales. + + Here is how EMI² helped Acme Trip: + + + + Convenient Payment Methods + + EMI² enables Acme Trip to offer a variety of payment methods tailored to their customer's preferences, including EMIs and Pay Later options. This ensures that Acme Trip's customers can book their travel plans without any financial constraints. + + + +### Exclusive Deals and Discounts + + Acme Trip uses EMI² to provide exclusive deals and discounts to its customers, making their travel bookings more affordable and attractive. + + + +### Integrate with Affordability Widget + + Acme Corp uses EMI²s Affordability Widget to create awareness upfront about the EMI²-based payment options and offers available to customers on their website/app before they reach checkout. + + Acme Corp embedded these EMI²-based payment options and offers on their product listing pages, checkout pages, and other relevant screens to educate the customers and incentivise them to make purchases, thus reducing cart abandonment and purchase decision-making time. + + + +### Seamless Checkout Integration + + Acme Corp integrated their checkout with EMI²s Affordability Widget, enabling their customers to complete their purchase directly from the widget itself, thus eliminating friction in the checkout process. + + Our Affordability Widget's auto-selection functionality helps apply the chosen payment option or offer from the Affordability Widget to the payment checkout page, which helps Acme Corp avoid confusion and reduce the risk of abandoned carts. + + + +### Efficient Eligibility Check + + EMI² offers a pre-eligibility check on EMI² instruments so customers can check their credit eligibility directly from the widget itself. This helps customers choose the most relevant EMI² option and complete the purchase faster. + + + + + + +### Education + + Acme Ed, an online education platform, faced challenges providing diverse payment options and attractive offers. Limited payment options hindered enrollment, while a lack of attractive offers affected student attraction. Customers dropped off during payment due to confusion over ineligible payment options, resulting in lost sales and customer dissatisfaction. + + Here is how EMI² helped Acme Ed: + + + + Enable Flexible Payment Options + + EMI² enables Acme Ed to offer flexible payment plans, including EMIs and Pay Later options, making their courses more accessible to students with varying financial capabilities. + + + +### Offer Discounts and Offers + + Acme Ed uses EMI² to provide exclusive discounts and offers to its students, incentivising them to enrol in more courses. + + + +### Boost Success Rate with Eligibility Check + + EMI² offers a pre-eligibility check on Debit Card EMI, Cardless EMI and Pay Later instruments at checkout. Acme Ed's customers can effortlessly choose the most affordable option and complete the purchase quickly by assessing eligibility upfront. + + + + + + +### Healthcare and Wellness + + Acme Wellness, a leading healthcare provider, encountered challenges in providing its customers secure and convenient payment options, leading to issues with customer satisfaction and efficient payment processing. + + Customers often faced difficulties in making payments, which resulted in delays in receiving care and added administrative burdens for the healthcare provider. + + Here is how EMI² helps Acme Wellness: + + + + Enable Secure Payment Methods + + EMI² enables Acme Wellness to offer secure payment options, including EMIs and Pay Later, ensuring customers can pay for their medical services and products without hassle or security concerns. + + + +### Offer Discounts + + Acme Wellness uses EMI² to provide exclusive discounts and packages to its patients, making healthcare more affordable and accessible. + + + + + + +### Electric Vehicles + + Acme EV, a leading EV business, faced challenges in offering flexible payment options to its customers. The upfront cost of EVs is often a barrier for potential buyers, and traditional financing options may not always be convenient or feasible. This led to lost sales opportunities for Acme EV as customers sought more affordable and flexible financing solutions. + + Here is how EMI² helped Acme EV: + + + + Flexible EMI Plans + + With EMI², Acme EV's customers can choose to pay for their EV in EMIs using a variety of instruments from top lending partners, including Cardless, Debit Card & Credit Card. The ability to buy their EV at No Cost and Low Cost EMI helps the customer spread the cost over time, thus making the purchase more manageable and hassle-free. + + + + + + +### Insurance + + Acme Insurance, a leading insurance company, faced challenges in offering their customers flexible payment options. The upfront cost of insurance premiums is often a barrier for potential policyholders, and traditional financing options may not always be convenient or feasible. This led to lost sales opportunities for Acme Insurance as customers sought more affordable and flexible insurance plans. + + Here is how EMI² helps Acme Insurance: + + + + Flexible Premium Payment Options + + EMI² enables Acme Insurance to offer flexible premium payment options. Customers can pay their insurance premiums in equated monthly instalments (EMIs), spreading the cost over time and making it more manageable. + + + +### Zero Interest EMI + + With EMI², customers can avail of zero-interest EMIs for insurance premiums, making purchasing more affordable and attractive. + + + +### Customised Insurance Plans + + EMI² allows Acme Insurance to offer customised insurance plans tailored to customers' specific needs and budgets, ensuring that they get the coverage they need at a price they can afford. diff --git "a/llm-content/payments/payment-gateway/emi\302\262/widget.md" "b/llm-content/payments/payment-gateway/emi\302\262/widget.md" new file mode 100644 index 00000000..ef695f96 --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/widget.md" @@ -0,0 +1,177 @@ +--- +title: About Affordability Widget +description: Use the Affordability Widget to influence your customer's purchase decision by displaying various affordable payment options and offers. +--- + +# About Affordability Widget + +Use our Affordability Widget to spread awareness about the EMI²-based payment options (such as EMI, Cardless EMI, and Pay Later) and offers available to your customers before they checkout. + +You can embed these payment options and offers on product listing pages, checkout pages, and other relevant screens to educate the customers and reduce cart abandonment. + +![Glimpse of the default widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/default-widget1-v2.jpg.md) + +A quick glimpse of Affordability Widget: + + +### On Web + + ![View affordability widget on web](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/affordability-widget-offers.jpg.md) + + + +### On Mobile + + ![View affordability widget on mobile](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/affordability-widget-mobile.jpg.md) + + + + +> **INFO** +> +> +> **Handy Tips** +> +> - For Native users, you can [integrate the widget with checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/features.md#checkout-from-widget). +> - For Shopify and WooCommerce user, this is a **view-only** widget. +> - Only **offers** and **payment methods** configured via the Dashboard will appear on the widget. +> - The widget **does not** support Internet Explorer browser and iOS SDKs. +> + + + +### Advantages + + - **Initiate checkout from widget** + + Customers can complete their purchase directly from the widget itself. The auto-selection functionality helps apply the chosen payment option/offer from the widget to the payment checkout page. + + - **Enable discovery of affordable payment options early on** + + Customers can discover affordable payment options and payment offers early on in the buying journey and `make an informed buying decision. + + - **Improve conversion rates** + + The availability of affordable payment options such as [EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi.md) and [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md) help boost conversion rates. + + - **Increase Average Order Value** + + Businesses typically see a 30% higher average order value with affordable payment options. + + - **Stand out from your competitors** + + Cultivate customer loyalty and establish a distinctive brand identity that distinguishes you from the competition. + + - **Built for every business** + + Whether you operate in e-commerce, education, healthcare, food and beverage, travel, hospitality, IT, or any other vertical, you can influence customers' purchasing decisions using the Affordability Widget. + + + ## How Affordability Widget Works + + The following diagram depicts the workflow: + ![Know how Affordability Widget works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/affordability-widget-workflow.jpg.md) + + The workflow involves the following: + + 1. Set up your [Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md). + 2. Integrate the widget with your [custom built-website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web.md), [WooCommerce website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/woocommerce.md) or [Shopify store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/shopify.md). + 3. Once you successfully integrate the widget on your website, you can choose to customise the [offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web/customise.md#1-offers), [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web/customise.md#2-payment-methods) and the [themes and colours](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web/customise.md#3-themes-and-colours) based on your requirement. + + ## Customer Experience + + On the product page, the customer: + + 1. Views the products on your website or app. + 2. Clicks **View offers** to check the offers available on the widget. + 3. Clicks **View plans** to choose EMI or Pay Later as the payment option on the widget. + ![Glimpse of the default widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/default-widget1-v2.jpg.md) + 1. Enters the phone number and clicks **Check** to check their eligibility for payment options. + 1. Enters the OTP sent to their phone number and clicks **Verify**. Our eligibility check is safeguarded by a secure OTP flow to eliminate the risk of unauthorised access. + ![Verify phone number for eligibility check](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/aff-widget-eligibility-verify.jpg.md) + 1. They can clearly differentiate between the eligible and ineligible payment options. + + - **Eligible**: The customer selects an eligible payment instrument and proceeds to checkout. + + - **Ineligible**: The customer can view the reason for ineligibility as highlighted below. + ![View reason for ineligibility](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/aff-widget-ineligible.jpg.md) + To proceed with the payment in case of ineligibility, the customer can choose to: + - Change the phone number for the chosen payment instrument and try again. + - Opt for an eligible payment instrument. + + +> **WARN** +> +> +> **Watch Out!** +> +> [Eligibility Check on Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/features.md#eligibility-check) is an on-demand feature. Write to us at [ affordability-widget@razorpay.com](mailto:affordability-widget@razorpay.com) to get this feature enabled. +> + + 4. Chooses an eligible payment instrument or a relevant offer and clicks **Buy Now**. + + 5. They are redirected to your checkout page, where they enter their contact and address details and proceed to checkout. + + 6. The customer is redirected to the Razorpay checkout if you have integrated the widget with our [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/standard-integration.md). If not, they are redirected to your custom-built checkout. Once redirected to our Standard Checkout, the payment option or offer the customer selects on the widget appears pre-selected on checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> - [Checkout from the Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/features.md#checkout-from-widget) is an on-demand feature. Write to us at [ affordability-widget@razorpay.com](mailto:affordability-widget@razorpay.com) to get this feature enabled. +> - If you have a [custom-built checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md), integrate with checkout from the widget using [Custom Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/custom-integration.md). +> + + 7. They enter the relevant details and complete the payment. + ![Initiate checkout from widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/aff-widget-checkout1.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> For Shopify and WooCommerce users, this is a view-only widget. Customers can select their preferred offer and plan **only** at checkout. +> + + + ## Supported Platforms + + Razorpay Affordability Widget is supported on the following platforms: + + + + DWeb | MWeb | Android | iOS + --- + ✓ | ✓ | ✓ | x + + + + + DWeb | MWeb | Android | iOS + --- + ✓ | ✓ | ✓ | x + + + + ## Next Steps + + You can choose to: + - [Integrate Affordability Widget on Web](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web.md) + - [ Integrate Affordability Widget on Woocommerce website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/woocommerce.md) + - [Integrate Affordability Widget on your Shopify store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/shopify.md) + - [Integrate Affordability Widget on Android App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/android.md) + + ### Related Information + + - [Features](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/features.md) + - [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/faqs.md) + - [Customise the Widget on Web](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web/customise.md) + - [ Customise the Widget on WooCommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/woocommerce/customise.md) + - [Customise the Widget on Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/shopify/customise.md) + - [Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md) + - [Create No Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi/create.md) + - [Create Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi/create.md) + - [Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi².md#payment-methods) diff --git "a/llm-content/payments/payment-gateway/emi\302\262/widget/android.md" "b/llm-content/payments/payment-gateway/emi\302\262/widget/android.md" new file mode 100644 index 00000000..003e8861 --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/widget/android.md" @@ -0,0 +1,176 @@ +--- +title: Integrate Razorpay Affordability Widget With Android App +heading: Integrate Affordability Widget With Android App +description: Integrate the Razorpay Affordability Widget on your Android application to spread awareness about the EMI²-based payment options pre-checkout. +--- + +# Integrate Affordability Widget With Android App + +Integrate the Affordability Widget with your Android app to influence your customers' purchase decisions before they reach checkout by displaying various affordable payment options and offers. + +## Integration Steps + +Follow the integration steps given below to embed the widget on your website. + +1. [Add Dependency in Build Gradle File](#step-1-add-dependency-in-build-gradle-file) +2. [Integrate the Widget](#step-2-integrate-the-widget) + - [Static Integration](#static-integration) + - [Dynamic Integration](#dynamic-integration) +3. [Render the Widget](#step-3-render-the-widget) + +### Step 1: Add Dependency in Build Gradle File + +Add the Affordability Widget dependency to your app's `build.gradle` file in the dependencies section. + +```xml +dependencies { + implementation 'com.razorpay:affordability-widget:1.0.0'//maven repo link +} +``` + +### Step 2: Integrate the Widget + +You can integrate the widget statically (via XML) or dynamically (via class and objects) as per your project requirement. + +#### Static Integration + +Use the code given below to define the ` com.razorpay.affordability.Widget` layout in XML: + +```xml + +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You must add a frame layout if you want to use the widget without the parent layout in XML: +> +> ```xml +> android:layout_width="match_parent" +> android:layout_height="wrap_content"> +> +> android:id="@+id/web_item" +> android:layout_width="match_parent" +> android:layout_height="wrap_content" +> /> +> +> ``` +> +> + +#### Dynamic Integration + +Use the code given below to define the `com.razorpay.affordability.Widget` layout in the class file: + +```java: Java +Widget widget = new Widget(this); + +```kotlin: Kotlin +val widget = Widget(this) +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You must add a frame layout if you want to use the widget without the parent layout to create `Widget`: +> +> ```java: Java +> Widget widget = new Widget(this); +> FrameLayout frameLayout = new FrameLayout(this); +> frameLayout.addView(widget); +> +> ```kotlin: Kotlin +> val widget = Widget(this) +> val frameLayout = FrameLayout(this); +> frameLayout.addView(widget) +> ``` +> +> + +### Step 3: Render the Widget + +Call the `render()` method to render the widget. Add the context, test key id generated from the Dashboard and amount (in paise). + +```java: Java +JSONObject widgetConfig = new JSONObject( + "{" + + "\"key\": \"YOUR_KEY_ID\"," + // Enter your Test Key ID generated from the Dashboard + "\"amount\": 400000," + + "\"currency\": \"INR\"" + + "}" +); + +widget.render(this, widgetConfig); + +```kotlin: Kotlin +val widgetConfig = JSONObject( + """ + { + "key": "YOUR_KEY_ID", // Enter your Test Key ID generated from the Dashboard + "amount": 400000, + "currency": "INR" + } + """.trimIndent() +) + +widget.render(this, widgetConfig) +``` + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you pass the final amount in paise to the widget you want to display to your customers on the product and checkout pages. +> + +You have successfully integrated the Affordability Widget with your Android application. + +#### Proguard Rules + +If you are using Proguard for your builds, you must add the following lines to your `proguard-rules.pro` file: + +``` +-keepclassmembers class * { + @android.webkit.JavascriptInterface ; +} + +-keepattributes JavascriptInterface +-keepattributes *Annotation* + +-dontwarn com.razorpay.** +-keep class com.razorpay.** { *; } +-optimizations !method/inlining/* +``` + +### Switch to Live Mode + +After you preview the widget, switch to live mode and replace the test API keys in the sample code with the live ones to take the integration live. Know more about [live API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys). + +## Successful Activation + +Here is a glimpse of the default widget with enabled offers and payment method options. + +![Glimpse of the default widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/default-widget.jpg.md) + +## Next Steps + +After you successfully integrate the widget on your Android app, you can choose to [customise the widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/android/customise.md) based on your requirement. + +> **INFO** +> +> +> **Handy Tips** +> +> - Fill in the [integration support form](https://form.typeform.com/to/Ro3nJPzp) in case you are facing any issues with the integration. +> - In case you have any queries, raise a ticket on the [Razorpay Support Portal](https://razorpay.com/support/). +> + +### Related Information + +- [Affordability Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget.md) +- [Affordability Widget FAQs ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/faqs.md) diff --git "a/llm-content/payments/payment-gateway/emi\302\262/widget/android/customise.md" "b/llm-content/payments/payment-gateway/emi\302\262/widget/android/customise.md" new file mode 100644 index 00000000..0289854d --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/widget/android/customise.md" @@ -0,0 +1,45 @@ +--- +title: Payment Gateway | Android App - Customisation Options +heading: Customisation Options +description: Customise the Affordability Widget on your Android App. +--- + +# Customisation Options + +After you successfully integrate the widget on your Android app, create a JSON Object as per your customisation requirements and add it as an additional parameter in the `loadwidget()` method. Check all the [customisation options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web/customise.md) available. + +```java: Java +JSONObject widgetConfig = new JSONObject( + "{" + + "\"key\": \"YOUR_KEY_ID\"," + // Enter your Live Key ID generated from the Dashboard + "\"amount\": 400000," + + "\"currency\": \"INR\"," + + "\"display\": {" + + "\"offers\": false" + + "}" + + "}" +); + +widget.render(this, widgetConfig); + +```kotlin: Kotlin +val widgetConfig = JSONObject( + """ + { + "key": "YOUR_KEY_ID", // Enter your Live Key ID generated from the Dashboard + "amount": 400000, + "currency": "INR", + "display": { + "offers": false + } + } + """.trimIndent() +) + +widget.render(this, widgetConfig) +``` + +### Related Information + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md) +- [About Affordability Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget.md) diff --git "a/llm-content/payments/payment-gateway/emi\302\262/widget/custom-integration.md" "b/llm-content/payments/payment-gateway/emi\302\262/widget/custom-integration.md" new file mode 100644 index 00000000..45e96419 --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/widget/custom-integration.md" @@ -0,0 +1,189 @@ +--- +title: Integrate Checkout From Widget | Custom Integration +heading: Integrate Checkout From Widget +description: Integrate Checkout from Affordability Widget using Custom Integration and allow your customers to complete their purchase directly from the widget. +--- + +# Integrate Checkout From Widget + +Integrate Checkout from Affordability Widget using Custom Integration and provide customers with a direct and convenient avenue to complete their purchases within the widget itself. This helps businesses improve conversion rates and eliminate any friction or unnecessary steps in the buying process. + +> **WARN** +> +> +> **Watch Out!** +> +> - This is an on-demand feature. Write to us at [ affordability-widget@razorpay.com](mailto:affordability-widget@razorpay.com) to get this feature enabled on your account. +> - This feature is only supported on [Native Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web.md) integration. +> + + +### Advantages + + - **Improved Conversion Rates** + + The improved Affordability Widget simplifies the checkout process, leading to more customers completing their purchases and thus higher conversion rates. + + - **Frictionless Customer Experience** + + The widget provides a seamless and hassle-free experience, boosting customer confidence and encouraging them to finalise their purchases easily. + + - **Auto-Selection Convenience** + + The widget's auto-selection functionality automatically applies the chosen payment option or offer to the checkout, reducing confusion and making the process more convenient. + + +## Prerequisites + +## Integration Steps + +Follow the integration steps given below on your website: + + +### 1.1 Define Checkout Callback Function + + Define a callback function that receives the `affordabilityWidgetPrefill` as an argument. This function is invoked when the customer clicks the **Buy Now** button on the widget. + + The prefill data is a string that contains the payment instrument details or `offer_id` used to invoke checkout from the widget. You can use any custom logic to save this data for the future. After saving the prefill data, you can seamlessly initiate your website’s checkout process and redirect the customer to the preferred location as per your website’s checkout journey. + + ```js: JavaScript + function checkoutCallback(affordabilityWidgetPrefill) { + // Your logic to save affordabilityWidgetPrefill + + // Perform redirection to the cart page or any other preferred location as per your website’s checkout journey + } + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> - Consider storing the prefill data as a component state if you use a frontend framework like React. +> - Alternatively, you can store it in `localstorage` or use any other storage method. +> + + + + +### 1.2 Pass Function in Affordability Widget Configuration + + Pass the callback function [previously defined](#11-define-checkout-callback-function) to `widgetConfig` as `checkout_callback`, when initialising Razorpay Affordability Widget. + + ```js: JavaScript + window.addEventListener('DOMContentLoaded', () => { + const widgetConfig = { + key: 'YOUR_KEY_ID', // Replace it with your live Key ID generated from Razorpay Dashboard + amount: 400000, // Amount in paise + currency: 'INR', + checkout_callback: checkoutCallback // new + }; + + const rzpAffordabilityWidget = new RazorpayAffordabilitySuite(widgetConfig); + rzpAffordabilityWidget.render(); + }); + ``` + + `key` _mandatory_ + : `string` API Key ID generated from the Dashboard. + + `amount` _mandatory_ + : `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `50000`. + + `currency` _mandatory_ + : `string` The currency in which the customer should make the payment. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `checkout_callback` _mandatory_ + : `string` Customers are redirected to this URL. + + + +### 1.3 Retrieve and Decode Option Selected + + Before opening the payment checkout for your customer with the selected option on the widget, retrieve `affordabilityWidgetPrefill` from your global store/localstorage or anywhere you stored it and decode it using the below function. + + ```js: JavaScript + function decodeAffordabilityWidgetPrefill(encodedPrefill) { + const decodedPrefill = window.atob(encodedPrefill); + + return JSON.parse(decodedPrefill); + } + ```json: Card EMI Response + { + "method": "emi", + "type": "debit", + "issuer": "HDFC", + "provider": null, + "duration": 6, + "offer_id": null + } + ```json: Cardless EMI Response + { + "method" :"cardless_emi", + "type": null, + "issuer" : null, + "provider": "axio", + "duration": 6, + "offer_id": null + } + ```json: Pay Later Response + { + "method" :"paylater", + "type": null, + "issuer" : null, + "provider": "simpl", + "duration": null, + "offer_id": null + } + ```json: Offer Response + { + "offer_id": "offer_JHD834hjbxzhXXXX", + "method" : null, + "type": null, + "issuer" : null, + "provider": null, + "duration": null, + } + ``` + + ### Response Parameters + + `method` + : `string` Payment methods on which eligibility check is required. It is mandatory if the `offer_id` is null. Possible values: + - `emi` + - `cardless_emi` + - `paylater` + + `issuers` + : `string` List of EMI issuers. Possible value is `HDFC`. + + `type` + : `string` Type of card. Possible value: + - `debit` + - `credit` + + `provider` + : `string` List of Cardless EMI providers. Possible values for `cardless_emi`: + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `earlysalary` + - `walnut369` + + List of Pay Later providers. Possible values for `paylater`: + - `lazypay` + - `paypal` + + `duration` + : `number` EMI tenure selected by the customer on the widget. + + `offer_id` + : `string` Unique identifier of the offer the customer selects on the widget. It is mandatory if the `method` is null. + + + +### 1.4 Initiate Payment Checkout with Option Selected + + Pre-select the payment option or `offer_id` on your payment page so the customer can complete the payment. diff --git "a/llm-content/payments/payment-gateway/emi\302\262/widget/faqs.md" "b/llm-content/payments/payment-gateway/emi\302\262/widget/faqs.md" new file mode 100644 index 00000000..543ad16b --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/widget/faqs.md" @@ -0,0 +1,332 @@ +--- +title: Payment Gateway | Affordability Widget - FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Affordability Widget. +--- + +# Frequently Asked Questions (FAQs) + +Find answers to the commonly asked questions about the Affordability Widget. + +- [Generic](#generic) +- [Native Website](#native-website) +- [WooCommerce Website](#woocommerce) +- [Shopify Store](#shopify) + +## Generic + + +### 1. Who can use this widget? + + All brands that provide payment offers and/or accept payments made through EMI, Cardless EMI and Pay Later methods **only via Razorpay** can use this widget. + + + +### 2. What does the widget include? + + The widget includes: + - All the offers that you have set up on Razorpay (along with an expandable view to read the details about each offer). + - All EMI, Cardless EMI, and Pay Later options enabled by you which satisfies the minimum order limit. Know more about the minimum order limit for [EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#2-what-are-the-standard-credit-card-interest), [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#cardless-emi) and [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#pay-later). + + + +### 3. How does the integration work? + + Follow the steps below to start the integration process: + + 1. Create a [Razorpay account](https://dashboard.razorpay.com/signup). + 2. Follow the integration steps specific to your integration. It is that simple! + + You can integrate the Affordability Widget with: + - [Native website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web.md). + - [WooCommerce website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/woocommerce.md). + - [Shopify store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/shopify.md). + + + +### 4. Where should I place the widget on my website? + + We recommend placing the widget below the product price. It will help your customers discover affordable payment options and offers early on in the buying journey and make an informed buying decision. + + + +### 5. Is the widget available on Android and iOS SDKs? + + The widget is available on [Android](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/android.md) but **not** on iOS SDK. + + + +### 6. Is it possible to integrate the widget on my website using plugins? + + Yes, it is possible to integrate the widget on your website using [WooCommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/woocommerce.md) and [Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/shopify.md). + + + +### 7. How can I disable the Affordability Widget from the Dashboard? + + Follow the steps given below to disable the Affordability Widget: + 1. Log in to the Dashboard and navigate to **Affordability** → **Settings**. + 2. Click **Disable Widget**. + 3. Click **Yes, disable** to remove the Affordability Widget from your website. + + Once you disable the widget, your website/app will automatically fall back to the default experience. + + + +### 8. What are the various features of the Affordability Widget that will help increase customer conversion? + + Following are the features of the Affordability Widget: + - [Discount Whisperer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/features.md#discount-whisperer). + - [Eligibility Check](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/features.md#eligibility-check). + - [Checkout from Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/features.md#checkout-from-widget). + + + +### 9. If a customer is ineligible for payment, what should they do next? + + The customer can view the reason for ineligibility on the widget itself and choose to: + - Try again using a different mobile number for the chosen payment instrument. + - Opt for a different payment instrument/method. + + +## Native Website + + +### 1. What customisations are possible in the widget? + + You can customise the following options: + + - Offers + - Payment Methods + - Theme + + Know more about the [customisation options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web/customise.md). + + + +### 2. Can I disable offers? + + Yes, you can disable offers and your customers will not be able to view them on the widget. This will not impact the checkout; customers will be able to view the offers on the checkout. + + Know more about how to [disable offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web/customise.md#14-disable-the-offers). + + You can also disable [EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web/customise.md#212-disable-emi-options), [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web/customise.md#222-disable-cardless-emi-options) and [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web/customise.md#232-disable-pay-later-options) options on the widget. + + + +### 3. How can I alter the appearance of the widget? + + You can alter the appearance of the widget using the following options: + + - Customise the theme colour. + - Change the heading colour and font size. + - Change content colour and font size. + - Change link colour and font size. + - Change footer colour, font size and logo variants. + + Know more about [themes and colours](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web/customise.md#3-themes-and-colours). + + + +### 4. What is Checkout from Affordability Widget and how does it benefit my business? + + [Checkout from Affordability Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/standard-integration.md) is a feature that allows customers browsing EMI plans via the Affordability Widget on your website to directly checkout from the Widget itself. This enables a frictionless checkout journey for customers. + + This feature is projected to increase the conversion rate from Widget to Checkout from 2.7% to 5-10%, thereby benefiting your business by improving customer experience and increasing sales. + + + +### 5. What does the customer journey look like after integrating Checkout from Affordability Widget? + + Below is the customer journey: + 1. Customers view the existing plans and offers on the widget, choose an eligible payment instrument or offer, and click **Buy now**. + + 2. They are redirected to your checkout page, where they enter their contact and shipping details and proceed to checkout. + + 3. They are then redirected to the Razorpay checkout if you have integrated the widget with our [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/standard-integration.md). If not, they are redirected to your custom-built checkout. + + 4. Once redirected to our Standard Checkout, the payment option or offer the customer selects on the widget appears pre-selected on checkout. + + 5. They enter the relevant details and complete the payment. + ![Checkout from widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/checkout-widget.gif.md) + + + +### 6. What are the prerequisites to enable the Checkout from Affordability Widget feature? + + - Create a [Razorpay account](https://dashboard.razorpay.com/signup). + - Integrate with the [Razorpay Affordability Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web.md). This feature is only supported on Native Website. + - Integrate with [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + - Integrate Checkout from Widget using [Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/standard-integration.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> If you have a [custom-built checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md), integrate with Checkout from Widget using [Custom Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/custom-integration.md). +> + + + +> **WARN** +> +> +> **Watch Out!** +> +> This is an on-demand feature. Write to us at [ affordability-widget@razorpay.com](mailto:affordability-widget@razorpay.com) to get this feature enabled on your account. +> + + + + +### 7. Will the Checkout from Affordability Widget feature affect my website's page load time? + + No, the Checkout from Affordability Widget feature will not impact your website's page load time. + + +## WooCommerce + + +### 1. I am integrating with Razorpay Plugin for the first time. What are the steps that I need to follow? + + Follow the steps given below if you are integrating with our plugin for the first time: + + 1. Log in to the [WordPress account](https://wordpress.com/log-in), navigate to **WooCommerce** → **Settings** and click the **Payments** tab. + ![WooCommerce settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/woocommerce-settings.jpg.md) + 2. In the **Payments** tab, scroll down to **Razorpay** and click **Manage** to edit the settings. + ![edit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-razorpay-edit.jpg.md) + 3. In the **Plugin Settings**, enter the **Key ID** and **Key Secret** generated from the Dashboard. Click **Save Changes**. + ![API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-woocommerce-keys.jpg.md) + + You can now follow the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/woocommerce.md#integration-steps). + + + +### 2. How does the integration work? + + You can integrate with the Affordability Widget in a few simple steps: + 1. Install the WooCommerce plugin version **4.3.4** directly from the [WordPress Plugin Directory](https://wordpress.org/plugins/woo-razorpay/). + 2. Create a [Razorpay account](https://dashboard.razorpay.com/signup) and follow the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/woocommerce.md#integration-steps). + 3. You can enable the widget from the Dashboard. + + + +### 3. How can I test the widget before taking it live? + + Follow the steps given below to test the widget: + 1. On the WordPress Dashboard hover over **Razorpay WordPress** and click **Visit Store**. + ![Test widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-woocommerce-test.jpg.md) + 2. Click on a product to view the widget. + ![Preview](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-woocommerce-preview.jpg.md) + + + +### 4. What customisations are possible in the widget? + + You can customise the following options: + + - Offers + - Payment Methods + - Theme + + Know more about the [customisation options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/woocommerce/customise.md). + + + +### 5. The Affordability widget does not appear on the product page. What should I do? + + In some cases, the Affordability widget may not appear on your website if you are using a third-party caching plugin, like WP Rocket. + + To resolve this: + + 1. Log in to your [WP Rocket Dashboard](https://wp-rocket.me/account/). + 2. Navigate to the WP Rocket plugin's settings page. + 3. Add `/widgets/affordability/affordability.js` to the following sections in your settings: + 1. Navigate to **ADVANCE RULES** in the left menu → **Never Cache URL(s)** + ![Add URL to Never Cache URL(s) section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/affordability-add-url-1.jpg.md) + 1. Navigate to **CDN** in the left menu → **Exclude files from CDN** + ![Add the URL to Exclude files from CDN](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/affordability-add-url-2.jpg.md) + 4. Navigate to **File Optimization** in the left nav and enable **Minify Javascript files** and + 5. Add `/widgets/emi²/affordability.js` within the **Excluded Javascript Files** section. + ![Configure file optimization section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/aff-wooc-file-optimization.jpg.md) + 6. Click **SAVE CHANGES**. The Affordability widget will appear again on your product page. + + + + +## Shopify + + +### 1. How can I enable the widget on my Shopify store? + + You can integrate with the Affordability Widget on your Shopify Store in a few simple steps: + + 1. Enable the widget directly from your [Shopify app](https://accounts.shopify.com/store-login). + 1. Create a [Razorpay account](https://dashboard.razorpay.com/signup) and perform the [EMI² integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/shopify.md#integration-steps) steps on your Shopify store. + + + +### 2. Where should I place the widget on my Shopify store? + + We recommend placing the widget below the product price. It will help your customers discover affordable payment options and offers early on in the buying journey and make an informed buying decision. + + + +### 3. Where can I find the Razorpay Live API Key ID? + + Follow the steps given below to generate your Key ID: + 1. Log in to the Dashboard in live mode and navigate to **Account & Settings**. + 2. In the **Website and app settings** section, click **API keys**. + 3. Click **Generate new key** and save the keys in your system. + + + +### 4. I am not able to view the Widget on my Shopify Store. What should I do? + + Ensure your website's theme version supports [Online Store Theme 2.0](https://shopify.dev/docs/themes/os20). You can [verify](https://community.shopify.com/c/shopify-design/how-to-identify-shopify-online-2-0-theme-or-later/td-p/1521884#:~:text=Next%20Topic-,REPLIES%20(3),-Halothemes) if the Online Store Theme 2.0 is supported on your website. + + + +### 5. What should I do if my current theme does not support Online Store Theme 2.0? + + If your current theme does not support Online Store Theme 2.0, you have a few options: + + - Check if any version updates are available for your current theme that supports Online Store Theme 2.0. + - Look for themes that explicitly mention compatibility with Online Store Theme 2.0. + - Fill in the [integration support form](https://form.typeform.com/to/Ro3nJPzp) in case you are still facing issues with the integration. + + + +### 6. What customisations are possible in the widget? + + You can customise the following options: + + - Offers + + - Payment Methods + + - Theme + + Know more about the [customisation options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/shopify/customise.md). + + + +### 7. Is the Affordability Widget compatible with all the free themes? + + Yes, the Affordability Widget is compatible with all free themes. + + + +### 8. What themes are compatible with the Razorpay Affordability Widget on the Shopify store? + + To see the list of themes that are compatible with the Razorpay Affordability Widget on the Shopify store, refer to [Compatible Themes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/shopify.md#compatible-themes). + + + + +### Related Information + +- [EMI² Suite FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md) +- [About Affordability Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget.md) diff --git "a/llm-content/payments/payment-gateway/emi\302\262/widget/features.md" "b/llm-content/payments/payment-gateway/emi\302\262/widget/features.md" new file mode 100644 index 00000000..43b3a9cc --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/widget/features.md" @@ -0,0 +1,232 @@ +--- +title: Razorpay Affordability Widget Features +heading: Features +description: List of features that will help you increase customer conversion using Affordability Widget. +--- + +# Features + +Razorpay Affordability Widget consists of the following additional features. These features are available only after you integrate the Affordability Widget on your: +- [Native Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web.md) +- [WooCommerce Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/woocommerce.md) +- [Shopify Store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/shopify.md) +- [Android App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/android.md) + +## Discount Whisperer + +Businesses often struggle to maximise customer engagement and sales due to the lack of visibility for potential offers based on customer behaviour and spending habits. + +Discount Whisperer is a real-time indicator of potential savings for your customers. It intelligently analyses their spending amount and guides them on unlocking bigger discounts. It also calculates the additional savings they can receive and how much more they can shop for to unlock even bigger discounts, resulting in higher conversions and a boost in average order value. + + + +### Advantages + + + + - Drive higher sales volumes by motivating customers to shop more for greater discounts. + - Increase the likelihood of customers purchasing by highlighting the value they get for their spending, leading to higher conversions. + - Enhance profitability and maximise the value of each transaction with irresistible offers. + + + - Customers can access extra savings by taking advantage of the offers available to them, ensuring they get the most value out of their shopping experience. + - They receive real value for their money spent, ensuring that every purchase is worthwhile. + - With irresistible offers and guidance, they can shop intelligently, stretching their budget to its potential. + + + + + +### Customer Experience + + Customers click **View offers** on the widget and view the discounts already unlocked or how much more they can shop for to unlock even bigger discounts. + + ![View the discount whisperer section on the widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/aff-widget-discount-whisperer.jpg.md) + + + +### Prerequisites + + - Create a [Razorpay account](https://dashboard.razorpay.com/signup). + - Integrate with the [Razorpay Affordability Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget.md). + - Create instant discount and cashback offers with minimum order amount via [Razorpay Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> Only offers created on the Razorpay Dashboard will appear on the widget. +> + + +> **WARN** +> +> +> **Watch Out!** +> +> This is an on-demand feature. Write to us at [ affordability-widget@razorpay.com](mailto:affordability-widget@razorpay.com) to get this feature enabled on your account. +> + + + + +### Supported Integrations + + + + + Native | WooCommerce | Shopify | Android + --- + ✓ | ✓ | ✓ | ✓ + + + + + +## Eligibility Check + +Razorpay offers a pre-eligibility check on EMI² instruments for customers to check their credit eligibility directly from the widget itself which helps customers choose the most relevant EMI² option and complete the purchase faster. + +> **INFO** +> +> +> **Handy Tips** +> +> - The eligibility check is performed only for [ Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md), [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), and [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md). +> - It is not applicable for Credit Card EMI as it is a pre-eligible form of credit. +> + + +### Advantages + + - **Improve Conversion Rates** + + Boost conversion rates as customers can check eligibility directly from the widget, eliminating friction and unnecessary ineligible failures in the buying process. + + - **Enhance Customer Experience** + + The intuitive UI and seamless transitions create a hassle-free experience, boosting customer confidence and purchase completion. + + - **OTP Based Flow** + + Our eligibility check is safeguarded by a secure OTP flow to eliminate the risk of unauthorised access. + + + +### Customer Experience + + Customers view the product and click **View plans** on the widget. They enter the phone number and OTP to check their eligibility for payment options. + ![Verify phone number for eligibility check](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/eligibility-widget.gif.md) + + They can clearly differentiate between the eligible and ineligible payment options. + + - **Eligible**: The customer selects an eligible payment instrument and proceeds to checkout. + + - **Ineligible**: The customer can view the reason for ineligibility as highlighted below. + ![View reason for ineligibility](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/aff-widget-ineligible.jpg.md) + + To proceed with the payment in case of ineligibility, the customer can choose to: + - Change the phone number for the chosen payment instrument and try again. + - Opt for an eligible payment instrument. + + + +### Prerequisites + + - Create a [Razorpay account](https://dashboard.razorpay.com/signup). + - Integrate with the [Razorpay Affordability Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> This is an on-demand feature. Write to us at [ affordability-widget@razorpay.com](mailto:affordability-widget@razorpay.com) to get this feature enabled on your account. +> + + + + +### Supported Integrations + + + + + Native | WooCommerce | Shopify | Android + --- + ✓ | ✓ | ✓ | ✓ + + + + + +## Checkout from Widget + +Your customers can check the eligibility and complete their purchase directly from the widget itself, eliminating any friction. The auto-selection functionality helps in applying the chosen payment option or offer from the Affordability Widget to the payment checkout page, which helps businesses avoid confusion and reduce the risk of abandoned carts. + + +### Advantages + + - **Improved Conversion Rates** + + The improved Affordability Widget simplifies the checkout process, leading to more customers completing their purchases and thus higher conversion rates. + + - **Frictionless Customer Experience** + + The widget provides a seamless and hassle-free experience, boosting customer confidence and encouraging them to finalise their purchases with ease. + + - **Auto-Selection Convenience** + + The widget's auto-selection functionality automatically applies the chosen payment option or offer to the checkout, reducing confusion and making the process more convenient. + + + +### Customer Experience + + Customers view the existing plans and offers on the widget, choose an eligible payment instrument or offer and click **Buy Now**. They are redirected to your checkout page, where they enter their contact and shipping details and proceed to checkout. + + They are then redirected to the Razorpay checkout if you have integrated the widget with our [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/standard-integration.md). If not, they are redirected to your custom-built checkout. Once redirected to our Standard Checkout, the payment option or offer the customer selects on the widget appears pre-selected on checkout. They enter the relevant details and complete the payment. + ![Checkout from widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/checkout-widget.gif.md) + + + +### Prerequisites + + - Create a [Razorpay account](https://dashboard.razorpay.com/signup). + - Integrate with the [Razorpay Affordability Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web.md). + - Integrate with [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + - Integrate Checkout from Widget using [Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/standard-integration.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> If you have a [custom-built checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md), integrate with checkout from widget using [Custom Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/custom-integration.md). +> + + + +> **WARN** +> +> +> **Watch Out!** +> +> This is an on-demand feature. Write to us at [ affordability-widget@razorpay.com](mailto:affordability-widget@razorpay.com) to get this feature enabled on your account. +> + + + + +### Supported Integrations + + + + + Native | WooCommerce | Shopify | Android + --- + ✓ | x | x | x diff --git "a/llm-content/payments/payment-gateway/emi\302\262/widget/native-web.md" "b/llm-content/payments/payment-gateway/emi\302\262/widget/native-web.md" new file mode 100644 index 00000000..1de31220 --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/widget/native-web.md" @@ -0,0 +1,137 @@ +--- +title: Integrate the Widget on Your Website +description: Integrate Affordability Widget on your Website to spread awareness about the EMI²-based payment options before they reach checkout. +--- + +# Integrate the Widget on Your Website + +Integrate with Affordability Widget to influence your customer's purchase decisions before they reach checkout by displaying various affordable payment options and offers. + +> **INFO** +> +> +> **Handy Tips** +> +> Razorpay Affordability Widget is compatible with all JavaScript frameworks like React, Vue, Angular, Svelte and so on. +> + +> **INFO** +> +> +> +> **Handy Tips** +> +> Only the Owner, Admin and Manager roles can enable the widget. +> + +## Integration Steps + +Follow the integration steps given below to embed the widget on your website. + +1. [Integrate the Widget](#step-1-integrate-the-widget). +2. [Enable the Widget](#step-2-enable-the-widget). + +### Step 1: Integrate the Widget + +Follow the integration steps given below to integrate the widget: + +1. Embed the JavaScript file into your website. Copy the snippet and add it to the head section of your website. + + ```js: JavaScript + + + + ``` + +2. Create an HTML element with the below id under the product price. This is to indicate where the affordability widget should appear. + + ```js: Add Parameter + + ``` + +3. Copy-paste the following snippet to the JS file and link it to your HTML file. Add the test key ID generated from the [Dashboard](#prerequisites). + + ```js: Add Parameter + const key = "rzp_test_XXXX00000XXXX"; //Replace it with your Test Key ID generated from the Dashboard + const amount = 400000; //in paise + + window.onload = function() { + const widgetConfig = { + "key": key, + "amount": amount, + }; + const rzpAffordabilitySuite = new RazorpayAffordabilitySuite(widgetConfig); + rzpAffordabilitySuite.render(); + } + ``` + + +`key` _mandatory_ +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). For example, `rzp_test_XXXX00000XXXX`. + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in paise. For example, if the amount is ₹4000, enter `400000`. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you pass the final amount in paise to the widget which you want to display to your customers on the product and checkout pages. +> + +You can now preview the widget on your product description page in test mode. Here is a glimpse of the default widget. +![Preview the widget in test mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-native-test-v2.jpg.md) + +#### Switch to Live Mode + +After you preview the widget, switch to live mode and replace the test API keys in the sample code with the live ones to take the integration live. Know more about [live API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys). + +### Step 2: Enable the Widget + +Once you preview the widget on your product description page, you have to enable the widget to display it on your website for your customers. + +## Successful Activation + +Here is a glimpse of the default widget with offers and payment method options enabled. + +![Glimpse of the default widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/default-widget1-v2.jpg.md) + +> **INFO** +> +> +> **Minimum Order Limit** +> +> All the payment method options that are enabled and that satisfy the minimum order limit appear on the widget. Know more about the minimum order limit for: +> - [EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#1-what-are-the-standard-credit-card-interest) +> - [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#cardless-emi) +> - [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#2-what-are-the-standard-interest-rates-charged) +> + +> **INFO** +> +> +> **Feature Enablement** +> +> Raise a request with our [Support team](https://razorpay.com/support/#request) to integrate Razorpay Affordability Widget with Checkout. Your customers can select an offer/payment option on the widget, proceed to checkout and complete the payment. +> + +## Next Steps + +After you successfully integrate the widget on your website, you can choose to [customise the widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web/customise.md) based on your requirement. + +> **INFO** +> +> +> **Handy Tips** +> +> - Fill in the [integration support form](https://form.typeform.com/to/Ro3nJPzp) in case you are facing any issues with the integration. +> - In case you have any queries, raise a ticket on the [Razorpay Support Portal](https://razorpay.com/support/). +> + +### Related Information + +- [Affordability Widget FAQs for Native website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/faqs.md#native-website) +- [ Integrate Affordability Widget on WooCommerce website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/woocommerce.md) +- [Integrate Affordability Widget on your Shopify store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/shopify.md) +- [Integrate Affordability Widget on your Android app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/android.md) diff --git "a/llm-content/payments/payment-gateway/emi\302\262/widget/native-web/customise.md" "b/llm-content/payments/payment-gateway/emi\302\262/widget/native-web/customise.md" new file mode 100644 index 00000000..39e59305 --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/widget/native-web/customise.md" @@ -0,0 +1,731 @@ +--- +title: Customisation Options +description: Customise the Widget using Razorpay Affordability Widget. +--- + +# Customisation Options + +After you successfully integrate the widget on your website, you can customise the following options: + +1. [Offers](#1-offers). + - Add additional Offers. + - Show limited Offers. + - Disable Offers. +2. [Payment Methods](#2-payment-methods) (EMI, Cardless EMI and Pay Later). + - Configure the list of providers for various payment methods. + - Disable payment methods. +3. [Themes and Colours](#3-themes-and-colours). + - Customise theme colour. + - Change heading colour and font size. + - Change content colour, font size and background colour. + - Change discount value colour. + - Change button appearance, colour and font size. + - Change footer colour, font size and logo variants. + - Enable Dark Mode. + +> **WARN** +> +> +> **Watch Out!** +> +> Customisations on the widget are not applicable for Checkout. +> + +## Video Tutorial + +Watch this video to learn how to customise the Affordability Widget. + +[Video: https://www.youtube.com/embed/vLVXL2b-6Z0] + +## 1. Offers + +Configure the offers you want to display on the website based on your requirement. The customers can make a choice from a wide range of offers available for your product or service. Know how to [create offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md). + +> **INFO** +> +> +> **Handy Tips** +> +> By default all the offers which are marked visible on the Dashboard during the offer creation will appear on the widget. +> + +### 1.1 Additional Offers + +By default, all those offers with the **Show Offer on Checkout** option enabled during creation will appear on the widget. Additionally, you can enter the `offer_id` of the offer that did not have the [Show Offer on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md#offer-validity:~:text=Show%20Offer%20on%20Checkout) option enabled during offer creation. + +```js: Add Parameter +{ + "key": "YOUR_KEY_ID", + "amount": 400000, + "features": { + "offers": { + "list": [ + "offer_ANZoaxsOww2X53" + ] + } + } +} +``` + +#### Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in paise. For example, if the amount is ₹4000, enter `400000`. + +`features.offers` +: `object` Display a set of additional offers on the widget by passing the `offer_id` + + `list` _optional_ + : `array` Display a list of `offer_id` of the offers. + +### 1.2 Limited Offers + +By default, all offers which had the **Show Offer on Checkout** option enabled during the offer creation will appear on the widget. In case you want to display limited offers on the widget, enter the `offer_id` of the offers of your choice. + +To show limited offers: + +```js: Add Parameter +{ + "key": "YOUR_KEY_ID", + "amount": 400000, + "display": { + "offers": { + "offerIds": [ + "offer_ANZoaxsOww2X53" + ] + } + } +} +``` + +#### Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in paise. For example, if the amount is ₹4000, enter `400000`. + +`display.offers` +: `object` Display a set of limited offers. + + `offerIds` _optional_ + : `array` Unique identifier of the offer. + +### 1.3 Disable the Offers + +If you disable the offers completely, they will not appear on the widget and the customers will not be able to view them. + +To completely disable the offers: + +```js: Add Parameter +{ + "key": "YOUR_KEY_ID", + "amount": 400000, + "display": { + "offers": false + } +} +``` + +#### Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in paise. For example, if the amount is ₹4000, enter `400000`. + +`display` +: `object` Display various offers on the widget. + + `offers` _optional_ + : `boolean` Indicates whether the offers should be displayed. Possible values: + - `true` (default): Display the offers on the widget. + - `false`: Disable the offers on the widget. + +## 2. Payment Methods + +Configure the payment methods you want to display on the website based on your requirement. + +### 2.1 EMI + +> **INFO** +> +> +> **Handy Tips** +> +> All EMI options applicable for the payment amount will appear on the widget by default. For example, if the payment amount is ₹3000, the widget displays only the suitable EMI options. +> + +#### 2.1.1 Limited Providers for EMI + +Razorpay supports [Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#5-can-you-provide-a-list-of-the) and [Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#1-what-are-the-standard-credit-card-interest) EMI providers for EMI options. By default, all EMI options satisfying the minimum transaction amount will appear on the widget. In case you want to display limited EMI options on the widget, enter the list of **provider codes** based on your requirement. + +To show a limited set of providers: + +```js: Add Parameter +{ + "key": "YOUR_KEY_ID", + "amount": 300000, + "display": { + "emi": { + "issuers": [ + "KKBK" + ] + } + } +} +``` + +#### Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in paise. For example, if the amount is ₹3000, enter `300000`. + +`display.emi.issuers` _optional_ +: `array` List of limited set of [providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#1-what-are-the-issuers-that-razorpay-supports) for EMI options. + +#### 2.1.2 Disable EMI Options + +If you disable the EMI options completely, they will not appear on the widget and the customers will not be able to view them. + +To completely disable EMI options: + +```js: Add Parameter +{ + "key": "YOUR_KEY_ID", + "amount": 400000, + "display": { + "emi": false + } +} +``` + +#### Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in paise. For example, if the amount is ₹4000, enter `400000`. + +`display` +: `object` Display different payment method options on the widget. + + `emi` _optional_ + : `boolean` Indicates whether the EMI options should appear on the widget. Possible values: + - `true` (default): Display the EMI options on the widget. + - `false`: Disable the EMI options on the widget. + +### 2.2 Cardless EMI + +> **INFO** +> +> +> **Handy Tips** +> +> All Cardless EMI options applicable for the payment amount will appear on the widget by default. For example, if the payment amount is ₹3000, the widget displays only the suitable Cardless EMI options. +> + + +#### 2.2.1 Limited providers for Cardless EMI + +Razorpay supports these [Cardless EMI providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#cardless-emi). By default, all Cardless EMI options satisfying the minimum transaction amount will appear on the widget. In case you want to display limited Cardless EMI options on the widget, enter the list of **provider codes** based on your requirement. + +To show a limited set of providers: + +```js: Add Parameter +{ + "key": "YOUR_KEY_ID", + "amount": 300000, + "display": { + "cardlessEmi": { + "providers": [ + "zestmoney", + "earlysalary" + ] + } + } +} +``` + +#### Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in paise. For example, if the amount is ₹3000, enter `300000`. + +`display.cardlessEmi.providers` _optional_ +: `array` List of limited set of [providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md#supported-payment-partners) for Cardless EMI options. + +#### 2.2.2 Disable Cardless EMI Options + +If you disable the Cardless EMI options completely, they will not appear on the widget and the customers will not be able to view them. + +To completely disable Cardless EMI options: + +```js: Add Parameter +{ + "key": "YOUR_KEY_ID", + "amount": 400000, + "display": { + "cardlessEmi": false + } +} +``` + +#### Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in paise. For example, if the amount is ₹4000, enter `400000`. + +`display` +: `object` Display different payment method options on the widget pages. + + `cardlessEmi` _optional_ + : `boolean` Indicates whether the Cardless EMI options should appear on the widget. Possible values: + - `true` (default): Display the Cardless EMI options on the widget. + - `false`: Disable the Cardless EMI options on the widget. + +### 2.3 Pay Later + +> **INFO** +> +> +> **Handy Tips** +> +> All Pay Later options applicable for the payment amount will appear on the widget by default. For example, if the payment amount is ₹4000, the widget displays only the suitable Pay Later options. +> + + +#### 2.3.1 Limited Providers for Pay Later + +Razorpay supports these [Pay Later providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#2-what-are-the-standard-interest-rates-charged). By default, all Pay Later options satisfying the minimum transaction amount will appear on the widget. In case you want to display limited Pay Later options on the widget, enter the list of **provider codes** based on your requirement. + +To show a limited set of providers: + +```js: Add Parameter +{ + "key": "YOUR_KEY_ID", + "amount": 400000, + "display": { + "paylater": { + "providers": [ + "lazypay" + ] + } + } +} +``` + +#### Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in paise. For example, if the amount is ₹100, enter `400000`. + +`display.paylater.providers` _optional_ +: `array` List of limited set of [providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md#providers) for Pay Later options. + +#### 2.3.2 Disable Pay Later Options + +If you disable the Pay Later options completely, they will not appear on the widget and the customers will not be able to view them. + +To completely disable Pay Later options: + +```js: Add Parameter +{ + "key": "YOUR_KEY_ID", + "amount": 400000, + "display": { + "paylater": false + } +} +``` + +#### Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in paise. For example, if the amount is ₹100, enter `400000`. + +`display` +: `object` Display different payment method options on the widget. + + `paylater` _optional_ + : `boolean` Indicates whether the Pay Later options should appear on the widget. Possible values: + - `true` (default): Display the Pay Later options on the widget. + - `false`: Disable Pay Later options on the widget. + +## 3. Themes and Colours + +Change the appearance of the widget based on your website. Following are the customisations you can perform on the widget: + +### 3.1 Customise Theme Colour (Only Header) + +Customise the theme colour based on your requirement. For example, if the background colour of the header is blue, you can change the colour to purple. + +![Customise the widget theme colour](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-theme-colour-v2.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> - The default theme colour (blue) set on the widget will be considered if no colour is passed here. + +> - Only a 6-character HEX code is supported. +> + +To change the theme colour: + +```js: Add Parameter +{ + "key": "YOUR_KEY_ID", + "amount": 400000, + "theme": { + "color": "#800080" + } +} +``` +#### Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in paise. For example, if the amount is ₹4000, enter `400000`. + +`theme` +: `object` Thematic options to modify the appearance of the header. + + `color` _optional_ + : `string` Enter the HEX code of your choice to change the appearance of the header. + +### 3.2 Change Heading Colour and Font Size + +You can customise the colour and font size of the headings on the widget. For example, if the colour of the heading is white and the font size is 12px you can change the colour to black and the font size to 14px. + +![Customise the heading colour and font size](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-heading-v2.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> The default colour (white) and font size set on the widget will be considered if nothing is passed here. +> + +To change the heading colour and font size: + +```js: Add Parameter +{ + "key": "YOUR_KEY_ID", + "amount": 400000, + "display": { + "widget": { + "main": { + "heading": { + "color": "black", + "fontSize": "14px" + } + } + } + } +} +``` + +#### Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in paise. For example, if the amount is ₹4000, enter `400000`. + +`display.widget.main.heading` +: `object` Customise the heading on the widget. + + `color` _optional_ + : `string` Enter the colour of your choice. + + `fontSize` _optional_ + : `string` Enter the font size of your choice. + +### 3.3 Change Content Colour, Font Size and Background Colour + +You can customise the colour and font size of the content on the widget. For example, if the colour of the content is black and the font size is 12px you can change the colour to blue and the font size to 13px. + +Additionally, you can also customise the background colour to match the look and feel of your website. + +![Customise the content colour and font size](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-content-v2.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> The default colour (black), font size and background colour (white) set on the widget will be considered if nothing is passed here. +> + +To change the content colour, font size and background colour: + +```js: Add Parameter +{ + "key": "YOUR_KEY_ID", + "amount": 400000, + "display": { + "widget": { + "main": { + "content": { + "backgroundColor": "#e6f0ff", + "color": "#003380", + "fontSize": "13px" + } + } + } + } +} +``` +#### Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in paise. For example, if the amount is ₹4000, enter `400000`. + +`display.widget.main.content` +: `object` Customise the content on the widget. + + `backgroundColor` _optional_ + : `string` Enter the background colour of your choice. + + `color` _optional_ + : `string` Enter the colour of your choice. + + `fontSize` _optional_ + : `string` Enter the font size of your choice. + +### 3.4 Change Discount Value Colour + +You can customise the colour of the discount value on the widget. For example, if the colour of the value is green, you can change the colour to pink. + +![Customise the content colour and font size](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-discount-v2.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> The default colour (green) set on the widget will be considered if nothing is passed here. +> + +To change the discount value colour: + +```js: Add Parameter +{ + "key": "YOUR_KEY_ID", + "amount": 400000, + "display": { + "widget": { + "main": { + "discount": { + "color": "#e60099" + } + } + } + } +} +``` + +#### Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in paise. For example, if the amount is ₹4000, enter `400000`. + +`display.widget.main.discount` +: `object` Customise the discount value on the widget. + + `color` _optional_ + : `string` Enter the colour of your choice. + +### 3.5 Change Button Appearance, Colour and Font Size + +By default, a button appears on the widget to view the plans, offers and options. You can change the appearance of the button to a link based on your requirement. + +Additionally, you can customise the colour and font size of the link on the widget. For example, if the colour of the link is blue and the font size is 10px you can change the colour to black and the font size to 12px. + +![Customise the link colour and font size](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-button-link.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> The default colour (blue) and font size set on the widget will be considered if nothing is passed here. +> + +To change the button to a link and its colour and font size: + +```js: Add Parameter +{ + "key": "YOUR_KEY_ID", + "amount": 400000, + "display": { + "widget": { + "main": { + "link": { + "button": false, // default is true, shown as a button + "color": "black", + "fontSize": "12px" + } + } + } + } +} +``` + +#### Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in paise. For example, if the amount is ₹4000, enter `400000`. + +`display.widget.main.link` +: `object` Customise the link on the widget. + + `button` _optional_ + : `boolean` Determine the presentation of EMI plans, offers, and Pay Later options. Possible values: + - `true` (default): Display the EMI plans, offers and Pay Later options as buttons. + - `false`: Display the EMI plans, offers and Pay Later options as links. + + `color` _optional_ + : `string` Enter the colour of your choice. + + `fontSize` _optional_ + : `string` Enter the font size of your choice. + +### 3.6 Change Footer Colour, Font Size and Logo + +You can customise the colour and font size of the footer on the widget. For example, if the colour of the footer is white and the font size is 10px you can change the colour to black and the font size to 12px. + +Razorpay provides customisation option for the logo in two variants: +- Light (default) +- Dark +![Customise the appearance of the logo on the widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-dark-logo-v2.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> The default colour, font size and Razorpay logo set on the widget will be considered if nothing is passed here. +> + +To change the footer colour, font size and logo: + +```js: Add Parameter +{ + "key": "YOUR_KEY_ID", + "amount": 400000, + "display": { + "widget": { + "main": { + "footer": { + "color": "black", + "fontSize": "12px", + "darkLogo": true // default is false, shown as light + } + } + } + } +} +``` + +#### Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in paise. For example, if the amount is ₹4000, enter `400000`. + +`display.widget.main.footer` +: `object` Customise the footer of the widget. + + `color` _optional_ + : `string` Enter the colour of your choice. + + `fontSize` _optional_ + : `string` Enter the font size of your choice. + + `darklogo` _optional_ + : `boolean` Indicates the colour of the Razorpay logo. Possible values: + - `true`: Display the Razorpay logo in a darker tone on the widget with a lighter theme colour. + - `false` (default): Display the default Razorpay logo on the widget with a darker theme colour. + +### 3.7 Enable Dark Mode + +Activate the widget's dark mode when your website utilises dark mode. This is specifically designed for websites with darker background colors, improving the presentation of offers, plans, and options. + +![Enable widget dark mode on your website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-dark-mode.jpg.md) + +To enable dark mode: + +```js: Add Parameter +{ + "key": "YOUR_KEY_ID", + "amount": 400000, + "display": { + "widget": { + "main": { + "isDarkMode": true //default is false + } + } + } +} +``` + +#### Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in paise. For example, if the amount is ₹4000, enter `400000`. + +`display.widget.main` +: `object` Customise dark mode on the widget. + + `isDarkMode` _optional_ + : `boolean` Specifies whether dark mode is enabled for the widget. Possible values: + - `true`: Displays the widget in dark mode. (recommended for websites with darker background colors) + - `false` (default): Displays the widget in light mode. + +### Related Information + +- [Integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web.md) +- [Affordability Widget FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#affordability-widget) +- [About Affordability Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget.md) diff --git "a/llm-content/payments/payment-gateway/emi\302\262/widget/s2s-integration.md" "b/llm-content/payments/payment-gateway/emi\302\262/widget/s2s-integration.md" new file mode 100644 index 00000000..3a1bff9b --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/widget/s2s-integration.md" @@ -0,0 +1,189 @@ +--- +title: Integrate Checkout From Widget | Server-to-Server (S2S) Integration +heading: Integrate Checkout From Widget +description: Integrate Checkout from Affordability Widget using S2S and allow your customers to complete their purchase directly from the widget. +--- + +# Integrate Checkout From Widget + +Integrate Checkout from Affordability Widget using S2S and provide customers with a direct and convenient avenue to complete their purchases within the widget itself. This helps businesses improve conversion rates and eliminate any friction or unnecessary steps in the buying process. + +> **WARN** +> +> +> **Watch Out!** +> +> - This is an on-demand feature. Write to us at [ affordability-widget@razorpay.com](mailto:affordability-widget@razorpay.com) to get this feature enabled on your account. +> - This feature is only supported on [Native Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web.md) integration. +> + + +### Advantages + + - **Improved Conversion Rates** + + The improved Affordability Widget simplifies the checkout process, leading to more customers completing their purchases and thus higher conversion rates. + + - **Frictionless Customer Experience** + + The widget provides a seamless and hassle-free experience, boosting customer confidence and encouraging them to finalise their purchases easily. + + - **Auto-Selection Convenience** + + The widget's auto-selection functionality automatically applies the chosen payment option or offer to the checkout, reducing confusion and making the process more convenient. + + +## Prerequisites + +## Integration Steps + +Follow the integration steps given below on your website: + + +### 1.1 Define Checkout Callback Function + + Define a callback function that receives the `affordabilityWidgetPrefill` as an argument. This function is invoked when the customer clicks the **Buy Now** button on the widget. + + The prefill data is a string that contains the payment instrument details or `offer_id` used to invoke checkout from the widget. You can use any custom logic to save this data for the future. After saving the prefill data, you can seamlessly initiate your website’s checkout process and redirect the customer to the preferred location as per your website’s checkout journey. + + ```js: JavaScript + function checkoutCallback(affordabilityWidgetPrefill) { + // Your logic to save affordabilityWidgetPrefill + + // Perform redirection to the cart page or any other preferred location as per your website’s checkout journey + } + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> - Consider storing the prefill data as a component state if you use a frontend framework like React. +> - Alternatively, you can store it in `localstorage` or use any other storage method. +> + + + + +### 1.2 Pass Function in Affordability Widget Configuration + + Pass the callback function [previously defined](#11-define-checkout-callback-function) to `widgetConfig` as `checkout_callback`, when initialising Razorpay Affordability Widget. + + ```js: JavaScript + window.addEventListener('DOMContentLoaded', () => { + const widgetConfig = { + key: 'YOUR_KEY_ID', // Replace it with your live Key ID generated from Razorpay Dashboard + amount: 400000, // Amount in paise + currency: 'INR', + checkout_callback: checkoutCallback // new + }; + + const rzpAffordabilityWidget = new RazorpayAffordabilitySuite(widgetConfig); + rzpAffordabilityWidget.render(); + }); + ``` + + `key` _mandatory_ + : `string` API Key ID generated from the Dashboard. + + `amount` _mandatory_ + : `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `50000`. + + `currency` _mandatory_ + : `string` The currency in which the customer should make the payment. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `checkout_callback` _mandatory_ + : `string` Customers are redirected to this URL. + + + +### 1.3 Retrieve and Decode Option Selected + + Before opening the payment checkout for your customer with the selected option on the widget, retrieve `affordabilityWidgetPrefill` from your global store/localstorage or anywhere you stored it and decode it using the below function. + + ```js: JavaScript + function decodeAffordabilityWidgetPrefill(encodedPrefill) { + const decodedPrefill = window.atob(encodedPrefill); + + return JSON.parse(decodedPrefill); + } + ```json: Card EMI Response + { + "method": "emi", + "type": "debit", + "issuer": "HDFC", + "provider": null, + "duration": 6, + "offer_id": null + } + ```json: Cardless EMI Response + { + "method" :"cardless_emi", + "type": null, + "issuer" : null, + "provider": "axio", + "duration": 6, + "offer_id": null + } + ```json: Pay Later Response + { + "method" :"paylater", + "type": null, + "issuer" : null, + "provider": "simpl", + "duration": null, + "offer_id": null + } + ```json: Offer Response + { + "offer_id": "offer_JHD834hjbxzhXXXX", + "method" : null, + "type": null, + "issuer" : null, + "provider": null, + "duration": null, + } + ``` + + ### Response Parameters + + `method` + : `string` Payment methods on which eligibility check is required. It is mandatory if the `offer_id` is null. Possible values: + - `emi` + - `cardless_emi` + - `paylater` + + `issuers` + : `string` List of EMI issuers. Possible value is `HDFC`. + + `type` + : `string` Type of card. Possible value: + - `debit` + - `credit` + + `provider` + : `string` List of Cardless EMI providers. Possible values for `cardless_emi`: + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `earlysalary` + - `walnut369` + + List of Pay Later providers. Possible values for `paylater`: + - `lazypay` + - `paypal` + + `duration` + : `number` EMI tenure selected by the customer on the widget. + + `offer_id` + : `string` Unique identifier of the offer the customer selects on the widget. It is mandatory if the `method` is null. + + + +### 1.4 Initiate Payment Checkout with Option Selected + + Pre-select the payment option or `offer_id` on your payment page so the customer can complete the payment. diff --git "a/llm-content/payments/payment-gateway/emi\302\262/widget/shopify.md" "b/llm-content/payments/payment-gateway/emi\302\262/widget/shopify.md" new file mode 100644 index 00000000..88a8ef02 --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/widget/shopify.md" @@ -0,0 +1,138 @@ +--- +title: Integrate Affordability Widget With Shopify +description: Integrate the Razorpay Affordability Widget on your Shopify store to spread awareness about the EMI²-based payment options before they reach checkout. +--- + +# Integrate Affordability Widget With Shopify + +Integrate the Razorpay Affordability Widget with your Shopify store to influence your customer's purchase decisions before they reach checkout by displaying various affordable payment options and offers. + +## Prerequisites + + +### List of Supported Themes + + Razorpay Affordability Widget Shopify is supported on the following popular themes: + + + Theme | Paid | Free + --- + Craft | x | ✓ + --- + Crave | x | ✓ + --- + Colorblock | x | ✓ + --- + Dawn | x | ✓ + --- + Focal | ✓ | x + --- + Impulse | ✓ | x + --- + Origin | x | ✓ + --- + Motion | ✓ | x + --- + Pipeline | ✓ | x + --- + Publisher | x | ✓ + --- + Refresh | x | ✓ + --- + Ride | x | ✓ + --- + Sense | x | ✓ + --- + Spotlight | x | ✓ + --- + Studio | x | ✓ + --- + Taste | x | ✓ + --- + + + +> **WARN** +> +> +> **Watch Out!** +> +> If you use a theme not listed above and encounter issues integrating the Razorpay Affordability Widget, we recommend switching to one of the above supported themes. +> +> + +## Integration Steps + +Perform the following integration steps: + +1. Go to the [Shopify app store](https://apps.shopify.com/affordability-widget). +2. Click **Add app** to install Razorpay Affordability Widget. + ![Add the app to your shopify store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-add-app.jpg.md) +3. Click **Install app**. + ![Install the App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-install-app.jpg.md) +4. In the **Account Details** section, enter the **Live API Key ID** and click **Save**. + + +> **INFO** +> +> +> **Handy Tips** +> +> In case you cannot find your **API key ID**, use the *Click here* option below the field to find the key on the Dashboard. +> + + ![Enter the live API key ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-api-key.jpg.md) + +5. You are redirected to the Shopify theme editor page. In the **Product information** section, click **Add block**. + ![Add widget block](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-widget-block.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> In case you are not redirected to the theme editor page, then navigate to **Online Store** in the **Sales channels** section and click **Themes**. Click **Customize**. +> ![Shopify theme editor page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-widget-theme-editor.jpg.md) +> + +6. Click **Apps**. The **Razorpay Affordability Widget** app appears. + ![The affordability widget app appears in the apps sections](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/aff-shopify-rzp-widget-add.jpg.md) + +7. Select **razorpay-afd-widget** and drag it below the **Price** field. The customers will be able to view the widget below the product price. +8. Click **Save** in the Shopify theme editor page to display the widget to your customers. + ![Save the widget settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-widget-save.jpg.md) + +## Successful Activation + +Here is a glimpse of the default widget with offers and payment method options enabled. + +![Glimpse of the default widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/default-widget1-v2.jpg.md) + +> **INFO** +> +> +> **Minimum Order Limit** +> +> All the payment method options that are enabled and that satisfy the minimum order limit appear on the widget. Know more about the minimum order limit for: +> - [EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#1-what-are-the-standard-credit-card-interest) +> - [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#cardless-emi) +> - [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#2-what-are-the-standard-interest-rates-charged) +> + +## Next Steps + +Once you successfully integrate the widget on your Shopify store, you can choose to [customise the widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/shopify/customise.md) based on your requirement. + +> **INFO** +> +> +> **Handy Tips** +> +> - Fill in the [integration support form](https://form.typeform.com/to/Ro3nJPzp) in case you are facing any issues with the integration. +> - In case you have any queries, raise a ticket on the [Razorpay Support Portal](https://razorpay.com/support/). +> + +### Related Information + +[Affordability Widget FAQs for Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/faqs.md#shopify) diff --git "a/llm-content/payments/payment-gateway/emi\302\262/widget/shopify/customise.md" "b/llm-content/payments/payment-gateway/emi\302\262/widget/shopify/customise.md" new file mode 100644 index 00000000..d3001499 --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/widget/shopify/customise.md" @@ -0,0 +1,236 @@ +--- +title: Affordability Widget | Shopify - Customisation Options +heading: Customisation Options +description: Customise the Affordability Widget on your Shopify store. +--- + +# Customisation Options + +After successfully integrating Affordability Widget on your Shopify store, you can choose to customise the widget based on your requirement. + +> **WARN** +> +> +> **Watch Out!** +> +> Customisations on the widget are not applicable for Payments Checkout. +> + +To customise the widget: + +1. Log in to the [Shopify Store](https://accounts.shopify.com/store-login) and navigate to **Apps** → **Razorpay Affordability Widget**. +2. Select **Customisation Options**. + ![Customise the widget on Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-widget-customise.jpg.md) + +You can now customise the following options: + +1. [Themes and Colours](#1-themes-and-colours) + - Widget Color + - Heading Color + - Heading Font Size + - Content Color + - Content Background Color + - Content Font size + - Link Color + - Link Font Size + - Discount Color + - Footer Color + - Footer Font Size + - Razorpay Dark Logo + - Enable Button Link + - Widget Dark Mode +1. [Payment Methods](#2-payment-methods) + - Card EMI + - Cardless EMI + - Pay Later + - Card EMI Providers + - Cardless EMI Providers + - Pay Later Providers +1. [Offers](#3-offers) + - Offers + - Limit Offers + - Hide Offer Amount + - Show hidden Offers + +> **WARN** +> +> +> **Watch Out!** +> +> Once you customise the widget, click **Save** at the end of the customisation page for the changes to reflect. +> + +## 1. Themes and Colours + +Alter the appearance of the widget based on your store. The following customisation options are available: + +![Theme and colour customisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-widget-theme.jpg.md) + +- **Widget Color**: Customise the widget theme colour based on your requirement. For example, if the background colour of the header is blue, you can change the colour to purple. + +> **INFO** +> +> +> **Handy Tips** +> +> - The default theme colour (blue) set on the widget will be considered if no colour is passed here. + +> - Only a 6-character HEX code is supported. +> + +![Customise the widget theme colour](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-theme-colour-v2.jpg.md) + +- **Heading Color**: Enter the 6-character HEX code of the heading colour based on your requirement. For example, if the default colour of the header is white, you can change the colour to black. + +> **WARN** +> +> +> **Watch Out!** +> +> Enter the font size as per pixels (px). You only have to enter the required size. For example, 14. +> + +- **Heading Font Size**: Enter the font size of the heading based on your requirement. The default size is 12. +![Customise the heading colour and font size](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-heading-v2.jpg.md) + +- **Content Color**: Enter the 6-character HEX code of the content colour based on your requirement. For example, if the default colour of the content is black, you can change the colour to dark blue. + +- **Content Background Color**: Enter the 6-character HEX code to customise the background colour to match the look and feel of your website. For example, if the default colour of the background is white, you can change the colour to blue. + +- **Content Font Size**: Enter the font size of the content based on your requirement. The default size is 14. +![Customise the content colour and font size](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-content-v2.jpg.md) + +- **Link Color**: Enter the 6-character HEX code of the link colour based on your requirement. For example, if the colour of the link is blue, you can change the colour to black. + +- **Link Font Size**: Enter the font size of the link based on your requirement. For example, if the font size is 10px, you can change the font size to 12px. + +> **INFO** +> +> +> **Handy Tips** +> +> The link customisations work only when button link is disabled. +> + +![Customise the link colour and font size](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-link-color-size.jpg.md) + +![Theme and colour customisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-widget-theme2.jpg.md) + +- **Discount Color**: Enter the 6-character HEX code of the discount value colour based on your requirement. For example, if the colour of the value is green, you can change the colour to pink. + +![Customise the content colour and font size](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-discount-v2.jpg.md) + +- **Footer Color**: Enter the 6-character HEX code of the footer colour based on your requirement. The default colour is white. + +- **Footer Font Size**: Enter the font size of the footer based on your requirement. The default size is 12. + +- **Razorpay Dark Logo**: Razorpay provides customisation option for the logo in two variants: + - Light (default): Display the default Razorpay logo on the widget with a darker theme colour. + - Dark: Display the Razorpay logo in a darker tone on the widget with a lighter theme colour. If you want to display the light variant of the logo, click **Activate**. + +![Customise the appearance of the logo on the widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-dark-logo-v2.jpg.md) + +- **Enable Button Link**: By default, a button appears on the widget to view the plans, offers and options. Click **Activate** to change the appearance of the button to a link based on your requirement. + +![Customise the link colour and font size](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-button-link.jpg.md) + +- **Widget Dark Mode**: Enable the widget's dark mode when your website utilises dark mode. This is specifically designed for websites with darker background colors, improving the presentation of offers, plans, and options. Click **Activate**. + +![Enable widget dark mode on your website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-dark-mode.jpg.md) + +## 2. Payment Methods + +Configure the payment methods you want to display on the store based on your requirement. + +![Customise payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-widget-payment-methods.jpg.md) + +#### 2.1 Card EMI + +EMI is enabled by default. To deactivate the EMI payment option, click **Deactivate**. The EMI options will not appear on the widget and the customers will not be able to view them. + +> **INFO** +> +> +> **Handy Tips** +> +> All EMI options applicable for the payment amount will appear on the widget by default. For example, if the payment amount is ₹3000, the widget displays only the suitable EMI options. +> + +#### 2.2 Cardless EMI + +Cardless EMI is enabled by default if it is activated for your account. To deactivate the Cardless EMI payment option, click **Deactivate**. The Cardless EMI options will not appear on the widget and the customers will not be able to view them. + +> **INFO** +> +> +> **Handy Tips** +> +> All Cardless EMI options applicable for the payment amount will appear on the widget by default. For example, if the payment amount is ₹3000, the widget displays only the suitable Cardless EMI options. +> + + +#### 2.3 Pay Later +Pay Later is enabled by default if it is activated for your account. To deactivate the Pay Later payment option, click **Deactivate**. The Pay Later options will not appear on the widget and the customers will not be able to view them. + +> **INFO** +> +> +> **Handy Tips** +> +> All Pay Later options applicable for the payment amount will appear on the widget by default. For example, if the payment amount is ₹4000, the widget displays only the suitable Pay Later options. +> + +#### 2.4 Card EMI Providers + +Razorpay supports [Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#5-can-you-provide-a-list-of-the) and [Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#1-what-are-the-standard-credit-card-interest) EMI providers for EMI options. By default, all EMI options satisfying the minimum transaction amount will appear on the widget. If you want to display limited EMI options on the widget, in the **Options** drop-down list, select/unselect the providers of your choice. + +#### 2.5 Cardless EMI Providers + +Razorpay supports [these Cardless EMI providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#cardless-emi). By default, all Cardless EMI options satisfying the minimum transaction amount will appear on the widget. To display limited Cardless EMI options on the widget, in the **Options** drop-down list, select/unselect the provider of your choice. + +#### 2.6 Pay Later Providers + +Razorpay supports [these Pay Later providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#2-what-are-the-standard-interest-rates-charged). By default, all Pay Later options satisfying the minimum transaction amount will appear on the widget. If you want to display limited Pay Later options on the widget, in the **Options** drop-down list, select/unselect the provider of your choice. + +## 3. Offers + +Configure the offers you want to display on the store based on your requirement. Customers can choose from a wide range of offers for your product or service. Know how to [create offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md). + +> **INFO** +> +> +> **Handy Tips** +> +> By default, all the offers marked visible on the Dashboard during the offer creation appear on the widget. +> + +![Customise offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-widget-offers.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> For comma-separated lists, add the information without a space. For example, if you are adding a list of `offer_ids` then follow this format: `offer_ANZoaxsOww2X53`,`offer_LAZoazsOcc2X55`,`offer_QAFoazsOww2X78`. +> + +#### 3.1 Offers + +Offers are enabled by default. To deactivate offers, click **Deactivate**. Offers will not appear on the widget and the customers will not be able to view them. + +#### 3.3 Limit Offers + +To display limited offers on the widget, enter the `offer_id` of the offers of your choice. + +#### 3.3 Hide Offer Amount + +By default, the customers can view the exact discount amount. This helps the new customers compare and choose your products over your competitors. Click **Activate** to hide the discount amount on the widget if required. + +#### 3.4 Show Hidden Offers + +By default, all those offers with the **Show Offer on Checkout** option enabled during creation will appear on the widget. Additionally, you can enter the `offer_id` of the offer that did not have the [Show Offer on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md#offer-validity:~:text=Show%20Offer%20on%20Checkout) option enabled during offer creation. + +### Related Information + +- [Affordability Widget: Shopify FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#shopify) +- [About Affordability Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget.md) diff --git "a/llm-content/payments/payment-gateway/emi\302\262/widget/standard-integration.md" "b/llm-content/payments/payment-gateway/emi\302\262/widget/standard-integration.md" new file mode 100644 index 00000000..6f02f02f --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/widget/standard-integration.md" @@ -0,0 +1,132 @@ +--- +title: Integrate Checkout From Widget | Standard Integration +heading: Integrate Checkout From Widget +description: Integrate Checkout from Affordability Widget using Standard Integration and allow your customers to complete their purchase directly from the widget. +--- + +# Integrate Checkout From Widget + +Integrate Checkout from Affordability Widget using Standard Integration and provide customers with a direct and convenient avenue to complete their purchases within the widget itself. This helps businesses improve conversion rates and eliminate any friction or unnecessary steps in the buying process. + +> **INFO** +> +> +> **Handy Tips** +> +> If you have a [custom-built checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md), integrate with checkout from widget using [Custom Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/custom-integration.md). +> + +> **WARN** +> +> +> **Watch Out!** +> +> - This is an on-demand feature. Write to us at [ affordability-widget@razorpay.com](mailto:affordability-widget@razorpay.com) to get this feature enabled on your account. +> - This feature is only supported on [Native Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/native-web.md) integration. +> + + +### Advantages + + - **Improved Conversion Rates** + + The improved Affordability Widget simplifies the checkout process, leading to more customers completing their purchases, resulting in higher conversion rates. + + - **Frictionless Customer Experience** + + The widget provides a seamless and hassle-free experience, boosting customer confidence and encouraging them to finalise their purchases easily. + + - **Auto-Selection Convenience** + + The widget's auto-selection functionality automatically applies the chosen payment option or offer to the checkout, reducing confusion and making the process more convenient. + + +## Prerequisites + +## Integration Steps + +Follow the integration steps given below on your website: + + +### 1.1 Define Checkout Callback Function + + Define a callback function that receives the `affordabilityWidgetPrefill` as an argument. This function is invoked when the customer clicks the **Buy Now** button on the widget. + + The prefill data is a string that contains the payment instrument details or `offer_id` used to invoke checkout from the widget. You can use any custom logic to save this data for the future. After saving the prefill data, you can seamlessly initiate your website’s checkout process and redirect the customer to the preferred location as per your website’s checkout journey. + + ```js: JavaScript + function checkoutCallback(affordabilityWidgetPrefill) { + // Your logic to save affordabilityWidgetPrefill + + // Perform redirection to cart page or any other preferred location as per your website’s checkout journey + } + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> - Consider storing the prefill data as a component state if you use a frontend framework like React. +> - Alternatively, you can store it in `localstorage` or use any other storage method. +> + + + + +### 1.2 Pass Function in Affordability Widget Configuration + + Pass the callback function [previously defined](#11-define-checkout-callback-function) to `widgetConfig` as `checkout_callback`, when initialising Razorpay Affordability Widget. + + ```js: JavaScript + window.addEventListener('DOMContentLoaded', () => { + const widgetConfig = { + key: 'YOUR_KEY_ID', // Replace it with your live Key ID generated from Razorpay Dashboard + amount: 400000, // Amount in paise + currency: 'INR', + checkout_callback: checkoutCallback // new + }; + + const rzpAffordabilityWidget = new RazorpayAffordabilitySuite(widgetConfig); + rzpAffordabilityWidget.render(); + }); + ``` + + `key` _mandatory_ + : `string` API Key ID generated from the Dashboard. + + `amount` _mandatory_ + : `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `50000`. + + `currency` _mandatory_ + : `string` The currency in which the customer should make the payment. Check the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `checkout_callback` _mandatory_ + : `function` The callback function is called when the user clicks the Buy button on the widget. This function receives `affordabilityWidgetPrefill` as an argument. + + + +### 1.3 Initiate Payment Checkout with Option Selected + + Before opening the payment checkout for your customer with the selected option on the widget, retrieve `affordabilityWidgetPrefill` from your global store/localstorage or anywhere you stored it and pass it in the checkout options that you use to open Razorpay Standard Checkout. + + ```js: JavaScript + Pay + + // new + + var options = { + "key": "YOUR_KEY_ID", + "amount": "400000", + "currency": "INR" + // ... other options + }; + options = RazorpayAffordabilitySuite.addPrefillToCheckoutOptions(options, affordabilityWidgetPrefill); // new + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ``` diff --git "a/llm-content/payments/payment-gateway/emi\302\262/widget/woocommerce.md" "b/llm-content/payments/payment-gateway/emi\302\262/widget/woocommerce.md" new file mode 100644 index 00000000..72a3a9fb --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/widget/woocommerce.md" @@ -0,0 +1,154 @@ +--- +title: Integrate Affordability Widget With WooCommerce Website +description: Integrate your WooCommerce website with Affordability Widget to spread awareness about the EMI²-based payment options before they reach checkout. +--- + +# Integrate Affordability Widget With WooCommerce Website + +You can integrate Affordability Widget with your WooCommerce website to influence your customer's purchase decisions before they reach checkout by displaying various affordable payment options and offers. + +> **INFO** +> +> +> **Handy Tips** +> +> Only the Owner, Admin and Manager roles can enable the widget. +> + +## Prerequisites + +> **WARN** +> +> +> +> **Watch Out!** +> +> Refer to [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/faqs.md#1-i-am-integrating-with-razorpay-plugin-for) if you are integrating with our plugin for the first time. +> + + +### List of Supported Themes + + Razorpay Affordability Widget WooCommerce is supported on the following popular themes: + + + Theme | Supported + --- + Asta | ✓ + --- + BigStore | ✓ + --- + Blossom Shop | ✓ + --- + Electro | ✓ + --- + Elessi | ✓ + --- + Flatsome | ✓ + --- + Lebe | ✓ + --- + Martfury Porto | ✓ + --- + Molla | ✓ + --- + Puca | ✓ + --- + Razzi | ✓ + --- + Rehub | x + --- + Shoptimizer | ✓ + --- + Storefront | ✓ + --- + TwentyNineteen | ✓ + --- + TwentyTwenty | ✓ + --- + TwentyTwentyOne | ✓ + --- + TwentyTwentyTwo | ✓ + --- + Woodmart | x + --- + Woostify | ✓ + --- + WooVina | ✓ + --- + Zoa | ✓ + + + +> **INFO** +> +> +> +> **Handy Tip** +> +> This is not a complete list, and it is recommended to try it on your themes as well. +> + + + +## Integration Steps + +1. [Enable the Widget](#step-1-enable-the-widget). +2. [Preview and Go Live](#step-2-preview-and-go-live). + +### Step 1: Enable the Widget + +Follow the steps given below to enable the widget: + +### Step 2: Preview and Go Live + +Follow the steps given below: + +1. Log in to the [WordPress account](https://wordpress.com/log-in). +2. Follow the steps given below to preview the widget in admin mode: + 1. Hover over **Razorpay Wordpress** and click **Visit Store**. + ![Click visit store to test the widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-woocommerce-test.jpg.md) + 2. Click on a product to view the widget. + ![Preview the widget before publishing](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-woocommerce-preview.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> It is mandatory to preview the widget before displaying it to your customers on the WooCommerce website. +> + +## Successful Activation + +Here is a glimpse of the default widget with offers and payment method options enabled. + +![Glimpse of the default widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/default-widget.jpg.md) + +> **INFO** +> +> +> **Minimum Order Limit** +> +> All the payment method options that are enabled and that satisfy the minimum order limit appear on the widget. Know more about the minimum order limit for: +> - [EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#1-what-are-the-standard-credit-card-interest) +> - [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#cardless-emi) +> - [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#2-what-are-the-standard-interest-rates-charged) +> + +## Next Steps + +After you successfully integrate the widget on your WooCommerce website, you can choose to [customise the widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/woocommerce/customise.md) based on your requirement. + +> **INFO** +> +> +> **Handy Tips** +> +> - Fill in the [integration support form](https://form.typeform.com/to/Ro3nJPzp) in case you are facing any issues with the integration. +> - In case you have any queries, raise a ticket on the [Razorpay Support Portal](https://razorpay.com/support/). +> + +### Related Information + +[Affordability Widget FAQs for WooCommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget/faqs.md#woocommerce) diff --git "a/llm-content/payments/payment-gateway/emi\302\262/widget/woocommerce/customise.md" "b/llm-content/payments/payment-gateway/emi\302\262/widget/woocommerce/customise.md" new file mode 100644 index 00000000..cb88c4a4 --- /dev/null +++ "b/llm-content/payments/payment-gateway/emi\302\262/widget/woocommerce/customise.md" @@ -0,0 +1,201 @@ +--- +title: Affordability Widget | WooCommerce - Customisation Options +heading: Customisation Options +description: Customise the Affordability Widget on your WooCommerce Website. +--- + +# Customisation Options + +After successfully integrating Affordability Widget with your WooCommerce website, you can choose to customise the widget based on your requirement. + +> **WARN** +> +> +> **Watch Out!** +> +> Customisations on the widget are not applicable for Payments Checkout. +> + +To customise the widget: + +1. Log in to the [WordPress account](https://wordpress.com/log-in), navigate to **WooCommerce** → **Settings** and click the **Payments** tab. + ![WooCommerce settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/woocommerce-settings.jpg.md) +2. In the **Payments** tab, scroll down to **Razorpay** and click **Manage** to edit the settings. + ![edit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-razorpay-edit.jpg.md) +3. Select **Affordability Widget**. + ![Select Affordability Widget to customise the widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-woocommerce-affordability.jpg.md) + +You can now customise the following options: + +1. [Offers](#1-offers). + - Offers Enable/Disable. + - Additional Offers. + - Limited Offers. + - Show Discount Amount. +1. [Payment Methods](#2-payment-methods) (EMI, Cardless EMI and Pay Later). + - Card EMI Enable/Disable. + - Limited Card EMI Providers. + - Cardless EMI Enable/Disable. + - Limited Cardless EMI Providers. + - Pay Later Enable/Disable. + - Limited Pay Later Providers. +1. [Themes and Colours](#3-themes-and-colours). + - Theme. + - Heading Colour. + - Heading Font Size. + - Content Colour. + - Content Font size. + - Link Colour. + - Link Font Size. + - Footer Colour. + - Footer Font Size. + - Dark Logo Enable/Disable. + +> **WARN** +> +> +> **Watch Out!** +> +> For comma-separated lists, add the information without a space. For example, if you are adding a list of `offer_ids` then follow this format: `offer_ANZoaxsOww2X53`,`offer_LAZoazsOcc2X55`,`offer_QAFoazsOww2X78`. +> + +## 1. Offers + +Configure the offers you want to display on the website based on your requirement. The customers can choose from a wide range of offers for your product or service. Know how to [create offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md). + +> **INFO** +> +> +> **Handy Tips** +> +> By default, all the offers marked visible on the Dashboard during the offer creation appear on the widget. +> + +![Configure the offers on the widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-woocommerce-offers.jpg.md) + +#### 1.1 Offers Enable/Disable + +To display the offers on the widget, select the **Enable Offers** check box. +To disable the offers, clear the check box. If you disable the offers completely, they will not appear on the widget and the customers will not be able to view them. + +#### 1.2 Additional Offers + +By default, all those offers with the **Show Offer on Checkout** option enabled during creation will appear on the widget. Additionally, you can enter the `offer_id` of the offer that did not have the [Show Offer on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md#offer-validity:~:text=Show%20Offer%20on%20Checkout) option enabled during offer creation. + +#### 1.3 Limited Offers + +To display limited offers on the widget, enter the offer_id of the offers of your choice. + +#### 1.4 Show Discount Amount + +Select the check box to display the exact discount amount on the widget. This will help new customers compare and choose your products over your competitors. + +## 2. Payment Methods + +Configure the payment methods you want to display on the website based on your requirement. + +![Configure the Payment Methods on the widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-woocommerce-payment-methods.jpg.md) + +#### 2.1 Card EMI Enable/Disable + +To display the **Card EMI** payment option, select the **Enable Card EMI** check box. To disable the card EMI payment option, clear the check box. If you disable the EMI options completely, they will not appear on the widget and the customers will not be able to view them. + +#### 2.2 Limited Card EMI Providers + +Razorpay supports [Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#5-can-you-provide-a-list-of-the) and [Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#1-what-are-the-standard-credit-card-interest) EMI providers for EMI options. By default, all EMI options satisfying the minimum transaction amount will appear on the widget. If you want to display limited EMI options on the widget, enter the list of **provider codes** based on your requirement. + + +> **INFO** +> +> +> **Handy Tips** +> +> All EMI options applicable for the payment amount will appear on the widget by default. For example, if the payment amount is ₹3000, the widget displays only the suitable EMI options. +> + + +#### 2.3 Cardless EMI Enable/Disable + +To display the **Cardless EMI** payment option, select the **Enable Cardless EMI** check box. To disable the cardless EMI payment option, clear the check box. If you disable the cardless EMI options, they will not appear on the widget and the customers will not be able to view them. + +#### 2.4 Limited Cardless EMI Providers + +Razorpay supports [these providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#cardless-emi) for Cardless EMI options. By default, all Cardless EMI options satisfying the minimum transaction amount will appear on the widget. To display limited Cardless EMI options on the widget, enter the list of **provider codes** based on your requirement. + +> **INFO** +> +> +> **Handy Tips** +> +> All Cardless EMI options applicable for the payment amount will appear on the widget by default. For example, if the payment amount is ₹3000, the widget displays only the suitable Cardless EMI options. +> + + +#### 2.5 Pay Later Enable/Disable + +To display the [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md) payment option, select the **Enable Pay Later** check box. To disable the Pay Later payment option, clear the check box. If you disable the Pay Later options, they will not appear on the widget and the customers will not be able to view them. + +### 2.6 Limited Pay Later Providers + +Razorpay supports [these providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#2-what-are-the-standard-interest-rates-charged) for Pay Later options. By default, all Pay Later options satisfying the minimum transaction amount will appear on the widget. If you want to display limited Pay Later options on the widget, enter the list of **provider codes** based on your requirement. + +> **INFO** +> +> +> **Handy Tips** +> +> All Pay Later options applicable for the payment amount will appear on the widget by default. For example, if the payment amount is ₹4000, the widget displays only the suitable Pay Later options. +> + +## 3. Themes and Colours + +Alter the appearance of the widget based on your website. You can customise the widget based on the following themes and colors. + +![Configure the themes and colours of the widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-woocommerce-theme.jpg.md) + +- **Widget Theme Colour**: Enter the 6-character HEX code of the theme based on your requirement. The default theme colour is blue. +![Configure the widget theme colour](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-theme-colour.jpg.md) + +- **Heading Colour**: Enter the 6-character HEX code of the heading colour based on your requirement. The default colour is black. + +> **WARN** +> +> +> **Watch Out!** +> +> Enter the font size as per pixels (px). You only have to enter the required size: for example, 14. +> + +- **Heading Font Size**: Enter the font size of the heading based on your requirement. The default size is 12. +![Customise the heading colour and font size](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-heading.jpg.md) + +- **Content Colour**: Enter the 6-character HEX code of the content colour based on your requirement. The default colour is grey. + +- **Content Font Size**: Enter the font size of the content based on your requirement. The default size is 12. +![Customise the content colour and font size](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-content.jpg.md) + +![View the customisation field on the WooCommerce Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-woocommerce-theme2.jpg.md) + +- **Link Colour**: Enter the 6-character HEX code of the link colour based on your requirement. The default colour is blue. + +- **Link Font Size**: Enter the font size of the link based on your requirement. The default size is 12. +![Customise the link colour and font size](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-link.jpg.md) + +- **Footer Colour**: Enter the 6-character HEX code of the footer colour based on your requirement. The default colour is grey. + +- **Footer Font Size**: Enter the font size of the footer based on your requirement. The default size is 12. + +- **Dark Logo Enable/Disable**: Razorpay provides customisation option for the logo in two variants: + - Light + - Dark (default) + + If you want to display the light variant of the logo, clear the **Enable Dark Logo** check box. + +![Customise the appearance of the logo on the widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widget-dark-logo.jpg.md) + +Once you customise the widget based on your requirement, click **Save Changes**. + +### Related Information + +- [Affordability Widget: WooCommerce FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#woocommerce) +- [About Affordability Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget.md) diff --git a/llm-content/payments/payment-gateway/features.md b/llm-content/payments/payment-gateway/features.md new file mode 100644 index 00000000..488559ff --- /dev/null +++ b/llm-content/payments/payment-gateway/features.md @@ -0,0 +1,238 @@ +--- +title: Features | Razorpay Payment Gateway +heading: Features +description: List of features that will help you build a first-class payments experience with Razorpay Checkout. +--- + +# Features + +Razorpay payment gateway comes with a range of features that helps you build a first-class payments experience. + +- **Cash on Delivery** + +You can now offer Cash on Delivery (COD) as a payment method on the Razorpay Checkout interface. Customers can choose COD directly on the Checkout page, alongside UPI, cards, netbanking and more. This flow increases accessibility and builds trust among first-time buyers and high-value orders. Know more about how to enable [Cash on Delivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md) on your checkout page. + +- **Sign in with Truecaller** + +Truecaller-based authentication allows your customers to verify themselves at the checkout without entering an OTP. Customers who have the Truecaller app installed on their devices will receive a pop-up for authentication using Truecaller. This feature is enabled by default and only applies to the Android SDK and Android Mobile Web browsers (Chrome and Samsung). To disable Truecaller-based authentication, please raise a request with our [Support team](https://razorpay.com/support/). + +- **Order Milestone Badge on Checkout** + +Boost trust and credibility by displaying order milestone badges at checkout. These badges highlight real order volumes, reassuring customers of your reliability and encouraging them to complete their purchase. Know more about [Order Milestone Badge](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#order-banner). + + For example, if your store has processed 10,000+ successful orders, the badge showcases this achievement, reinforcing trust. + + +> **WARN** +> +> +> **Watch Out!** +> +> - This feature is automatically enabled and currently available only for businesses with [RTB](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/trusted-business.md) enabled. +> - If a [message banner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#message-banner) exists on the checkout page, the badge information seamlessly integrates within the same section using vertical scrolling. +> + + + +### Customer Experience + + ![View Order milestones on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/order-milestones.jpg.md) + + + + +- **QuickBuy: Revolutionise Your Checkout Process** + +QuickBuy is a game-changing 1-click payment experience designed to simplify your checkout. Its intuitive half-page interface minimises steps, allowing customers to complete payments faster. + + Leveraging advanced personalisation algorithms, QuickBuy streamlines the checkout experience by minimising steps and simplifying decisions leading to quicker checkouts and higher conversion rates. This boosts customer satisfaction and drives business growth, making every transaction seamless. Know more about [QuickBuy](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features/quickbuy.md). + +- **Saved Cards** + +You can save customer card details in the form of tokens with Razorpay. On a repeat visit, the customers will be able to pay directly just by entering the CVV of the card. Know more about [ saved cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +- **Biometric Authentication** + +Razorpay's biometric authentication ensures security and convenience by eliminating OTP verification. It uses device capabilities to verify users, enabling faster access to saved cards during checkout. Once set up, users can access their saved cards with just their fingerprint. + + + +### Customer Experience + + ![Biometric Authentication on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pg-biometric.jpg.md) + + + + + +> **WARN** +> +> +> **Watch Out!** +> +> - This feature is enabled by default. To disable it, raise a request with our [Support Team](https://razorpay.com/support). +> - It is only available for businesses using Standard Checkout on Android devices that support biometrics. +> - It is not supported on webviews redirected from apps like Instagram or Facebook. +> - We are rolling it out in phases and will soon be available for your users at checkout. +> + +- **OTP Auto-Read and Submit** + +Your customers gain a faster and enhanced checkout experience with Razorpay OTP auto-submit. The system automatically reads the OTP received, with your customer’s consent, and submits it. It prevents errors and the users do not need to navigate or interact with additional elements to complete verification, making the process seamless. This is available by default on Android SDK and not available on iOS SDK. + +- **UPI Payments using Mobile Number** + +Your customers can enter their mobile number linked to their UPI on checkout, open the respective UPI app and complete the payment after entering the UPI PIN on their mobile devices. Customers are redirected to your website or app after successful payment. Know more about [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + +- **Offers** + +Attract your customers and improve sales by providing discounts or cashback on your website or apps. Using Razorpay Offers, you can have complete control of the discounts offered to your customers and restrict the payment methods on which the offers are applied. +Know more about [offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers.md). + +- **Checkout in Local Languages** + +Allow customers to change the display language of checkout fields to enhance accessibility. By default, checkout fields are shown in English, but customers can switch to Hindi, Marathi, Gujarati, Telugu, Tamil, and more. To change the language: + + - On mobile: Click the **Account & Terms** icon in the top-right corner, then select **Language**. + - On desktop: Click the more icon in the top-right corner, then select **Language**. + + Once selected, the checkout fields update to the preferred language. Know more about how to [change the default language](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#default-language). + + + +### Customer Experience + + ![View Checkout in local languages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/local-language-checkout.jpg.md) + + + + +- **Eligibility Check** + +Razorpay offers a pre-eligibility check on Debit Card EMI, Cardless EMI and Pay Later instruments at checkout. By assessing eligibility upfront, your customers can choose the most relevant affordability option and complete the purchase quicker. +Know more about [eligibility check](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/eligibility-check/standard.md). + +- **Making Email Read-only** + +You can set the email field as read-only to ensure your customers can only view the email but can not edit it. You can allow your customers to edit this field based on your preferences. Know more about [making email read-only](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#123-checkout-options). + +- **Configuring Payment Methods** + +Razorpay Standard Checkout hosts a variety of payment methods for customers to make payments. You can rearrange the order of these payment methods and display them at the Checkout to provide a highly personalised experience for your customers. Know more about [ configuring payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + +- **Autofill for Faster Checkout** + +Razorpay Checkout autofills details like addresses, contact information and saved card data by default across various platforms, including Instagram, Facebook and iOS browsers. This reduces customers time and effort to complete transactions, boosting your conversion rates. + +- **Prefill Customer Contact Details** + +To improve conversion rates and reduce form-fill friction, use the prefill parameter to automatically fill in customer contact information, especially their phone number. The expected format while prefilling the phone number in the [Checkout code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#code-to-add-pay-button) is `+ (country code)(phone number)`(Example: "contact": "+919000090000"). + + +> **WARN** +> +> +> **Watch Out!** +> +> This feature is not applicable if you: +> - Do no collect customer contact details on your website before checkout. +> - Have Shopify stores. +> - Use any of the no-code apps. +> + +- **Making Phone Number Field Optional** + +You can hide the phone number field from the checkout page based on your preferences. You can also enable customers to proceed with the payment without providing a phone number. Refer to the [Checkout Options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#checkout-options) table to know more about making the phone number field optional. + + +> **WARN** +> +> +> **Watch Out!** +> +> - To enable this feature, contact our [Support Team](https://razorpay.com/support). +> - If you enable customers to proceed with the payment without providing their phone number, then the field will not appear against the payment on the Dashboard and the reports. +> + +- **Configure Email Address Field** + +The email address field is hidden by default on checkout if it is not pre-filled. Since email is not mandatory, this will reduce drop-offs and improve conversion rates. You can choose to hide the field, make it optional or mandatory based on your business requirement. Know how to [configure the email address field](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#collect-email-from-customers). + +- **Partial Payment Capability** + +You can allow your customer to make partial payments at the Checkout. Know more about [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#111-request-parameters). + +- **International Payments** + +You can accept payments from your customers in more than 100 foreign currencies using our Payment Gateway and other products such as Payment Pages, Payment Button, Payment Links, and Invoices. Know more about [international payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md). + +- **Trusted Business** + +Showcase our Trusted Badge on checkout and embed the Razorpay Trusted Business Widget on your website to instil credibility amongst site visitors. It reassures your customers that they can safely transact with your brand without any worries. +Know more about [trusted badge](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features/trusted-business.md) and [trusted widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/trusted-business.md). + +- **Customer Fee-bearer** + +You can choose to charge a convenience fee to your customers for the use of technology infrastructure. Convenience Fees are seamlessly added at Razorpay Checkout without disrupting the checkout experience for your customers. Know more about [convenience fees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/configuration/convenience-fees.md). + +- **Third-party Validation** + +As per the SEBI guidelines, the customers must make transactions only from those bank accounts provided when they register with your business. + +You can comply with the SEBI guidelines for online payment collections by offering TPV integrations with major banks at the Checkout. Customers can make payments using netbanking or UPI. UPI supports both collect and intent flows. Know more about [third-party validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation.md). + +- **Checkout Timeout** + +You set a timeout on Checkout. After the specified time limit, the customer will not be able to use Checkout and hence the payment will terminate after the set time. Know more about [checkout timeout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#123-checkout-options). + +- **Downtime Communication on Checkout** + +Downtimes updates provide an overview of various downtimes grouped across different payment methods on your [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/downtime-updates.md). You can view the latest status of downtimes for netbanking, cards, and UPI at any point in time. You can also view instrument details for downtimes such as Cards Network, Issuers, Banks, and UPI handles. Know more about the [Payments Downtime API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> We temporarily prevent customers from accessing payment instruments, which are bound to fail on checkout. For example, if all payments made via Netbanking are bound to fail, we show the option in a disabled state on checkout until it recovers. However, they can select an alternative instrument that is more likely to work to complete the payment successfully. +> +> +> Customer Experience +> +> ![payment instrument in a disabled state](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-downtime-disabled-state.jpg.md) +> +> +> +> + +- **Checkout Retry Flow** + +By default, Razorpay provides transparent, contextual, and actionable suggestions to customers at the point of payment failure on checkout. For example, if a customer's payment via Card fails on Razorpay checkout, the system intelligently suggests the next best payment option based on the reason for the failure and the customer's past transaction history. This reduces customer drop-offs and improves the overall payment experience. + + + +### Customer Experience + + ![checkout retry flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/checkout-retry.jpg.md) + + + + +### Related Information +- [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md) +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) diff --git a/llm-content/payments/payment-gateway/features/quickbuy.md b/llm-content/payments/payment-gateway/features/quickbuy.md new file mode 100644 index 00000000..f45fb67d --- /dev/null +++ b/llm-content/payments/payment-gateway/features/quickbuy.md @@ -0,0 +1,71 @@ +--- +title: QuickBuy | Razorpay Payment Gateway Features +heading: QuickBuy +description: Streamline checkout with QuickBuy’s 1-click payment. Minimise steps and speed up transactions for a fast, seamless customer experience. +--- + +# QuickBuy + +QuickBuy is a one-click payment solution that streamlines checkout for returning customers. With a compact half-page interface, it intelligently displays preferred payment methods based on past transactions and automatically applies the best available offers, reducing friction and decision-making. + +This results in a faster, more efficient checkout experience that boosts conversion rates and enhances satisfaction for both customers and businesses. + +![QuickBuy on Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/quickbuy-std.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> This feature is available on mobile devices only: +> +> Platform | Native SDK | Mobile Web +> --- +> Android | v1.6.41+ | ✓ +> --- +> iOS | NA | ✓ +> +> + +## Features + +- **Quick Transactions**: 1-click payment process for returning users with minimal steps for faster checkouts, enhanced by a half-page overlay that provides a streamlined experience. +- **Clear Payment Details**: Transparent display of payment information, including savings and discounts. +- **Automatic Offer Application**: Automatic application of offers with visible savings to enhance customer satisfaction. + +> **INFO** +> +> +> **Handy Tips** +> +> - Customers can use UPI intent, UPI Saved VPAs and Saved Cards through QuickBuy. +> - QuickBuy displays recommended payment methods based on past transactions for a faster checkout. If no recommendations exist, the full checkout flow is shown. +> + +## Advantages + + + - **Improved Conversion Rates**: Reduces drop-offs with minimal steps and pre-selected payment methods. + - **Enhanced User Experience**: Provides a faster, simpler payment process that encourages repeat transactions. + - **Efficient Checkout Process**: Offers advanced features like 1-click purchases, improving overall efficiency. + + + - **Simplified Payments**: Pre-selection of preferred payment methods for quicker transactions. + - **Automatic Offer Application:** Automatically applies the best available offers for cost savings. + + +## How it Works + +QuickBuy is ideal for returning users who are logged into Razorpay Checkout and making repeat purchases. The workflow includes: + +1. **Preferred payment method**: The most frequently used payment method is pre-selected. If the user changes their payment method, the system recalculates and applies the best available offer to the new method, notifying them of the updated total. +2. **Automatic offer application**: The best available offer is applied to the total. If they change the offer, the system recalculates and updates the total amount. +3. **Single-click purchase**: Customers complete their purchases in a single click. + +> **INFO** +> +> +> **Disable QuickBuy** +> +> To disable QuickBuy on checkout, contact our [Support team](https://razorpay.com/support/#request). +> diff --git a/llm-content/payments/payment-gateway/features/trusted-business.md b/llm-content/payments/payment-gateway/features/trusted-business.md new file mode 100644 index 00000000..c33b0e6c --- /dev/null +++ b/llm-content/payments/payment-gateway/features/trusted-business.md @@ -0,0 +1,98 @@ +--- +title: Razorpay Trusted Business Badge +description: Check the eligibility for the Razorpay Trusted Business badge and how to add it to your Checkout and website. +--- + +# Razorpay Trusted Business Badge + +Customers prefer to purchase from websites that are trustworthy and credible. For most startups and new online businesses, the credibility factor poses a challenge and often hinders business growth. To help you overcome this issue, Razorpay offers the Trusted Business badge program. + +The Razorpay Trusted Business badge program enables you to build credibility as a trusted merchant. By becoming a Razorpay Trusted Business, you can display the Trusted Badge on your Razorpay Checkout page. This reassures your customers (who otherwise might have dropped off due to lack of trust) that they can safely transact with your brand without any worries. + +### Advantages + +- **Automatic Activation**: You do not need to apply for the program explicitly. Once you qualify for the program, the badge will automatically start appearing on your Razorpay Checkout page. +- **Reduce Customer drop-offs**: Businesses see up to a 5% increase in conversion and retention. +- **Reduce dependency on COD**: Get more customers to pay online as they trust your business is genuine. +- **Stand out from the rest**: Differentiate yourself from the competition. + +## Eligibility Requirements for Razorpay Trusted Business Badge + +Razorpay's proprietary algorithm considers several factors to determine which businesses are eligible for the Trusted Business badge program. Below are some of the key requirements: + +- You should have completed your KYC verification. +- You should have a very low number of disputes. Know more about [disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md). +- You should have spent a reasonable amount of time accepting payments via Razorpay. +- You must clear all Razorpay risk checks and other proprietary checks. + +> **WARN** +> +> +> **Watch Out!** +> +> This feature is available for Standard Checkout integrations only. +> + +## How to Earn Razorpay Trusted Business Badge + +You do not need to apply for the badge. The badge will automatically be made Live on your Razorpay Checkout page if you are eligible. Please note that we are rolling out the program gradually. If waitlisted for the program, please wait for a few weeks. + +## How Razorpay Trusted Business Badge Works + +Given below is the workflow: + +1. If you are eligible for the program, your Razorpay checkout page will automatically display the Razorpay Trusted Business badge, making you a Razorpay Trusted Business. +2. When customers arrive on your checkout page and see the Razorpay Trusted Business badge, they are reassured that they can safely transact from your brand. This boosts conversions. +3. The customer completes the payment as usual. + +## Opt-out of Razorpay Trusted Business Badge Program + +Follow these steps to opt-out of the Razorpay Trusted Business badge program: + +1. Log in to the Dashboard. +2. Navigate to **Accounts & Settings** → **Checkout Styling** under **Checkout settings**. +3. Turn off **Razorpay trusted badge**. +4. Click **Save all changes**. + +## Frequently Asked Questions (FAQs) + + +### 1. How do I qualify for the Razorpay Trusted Business badge? + + To qualify for the Razorpay Trusted Business badge, you will have to maintain an excellent record of solving customer escalations proactively, timely address any disputes for your customers whenever possible, and consistently accept payments via Razorpay. + + + +### 2. What are the benefits of the Razorpay Trusted Business badge? + + Your customers will see the badge on your payment page and be assured that they may safely transact with your brand without any worries. This will help improve conversion, reduce the volume of COD orders and boost online payments. + + + +### 3. Do I need to pay for the badge? + + Displaying the badge on your Razorpay payment checkout page is completely free of cost. + + + +### 4. How do I get the Razorpay Trusted Business badge enabled for my account? + + Razorpay Trusted Business badge will be enabled by default and start appearing automatically for all eligible merchants. No manual effort or integration is required. Know more about the [eligibility requirements for Razorpay Trusted Business badge](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features/trusted-business.md#eligibility-requirements-for-razorpay-trusted-business-badge). + + + +### 5. Where will the Razorpay Trusted Business badge be displayed? + + The badge will be displayed on your Razorpay Checkout page. The badge will soon be available as a widget to add to your website/app. + + + +### 6. Where can I find the Razorpay Trusted Business badge on the Dashboard? + + To find the Trusted Badge, navigate to **Accounts & Settings** → **Checkout Styling** under **Checkout settings**. You can find the **Razorpay trusted badge** toggle. + + + +### 7. How can I disable the badge? + + You can opt-out from the Dashboard by navigating to **Accounts & Settings** → **Checkout Styling** under **Checkout settings**. Turn off **Razorpay trusted badge**. diff --git a/llm-content/payments/payment-gateway/flutter-integration/custom.md b/llm-content/payments/payment-gateway/flutter-integration/custom.md new file mode 100644 index 00000000..bddb3f25 --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/custom.md @@ -0,0 +1,89 @@ +--- +title: Integrate With Flutter Custom SDK +description: Integrate the Razorpay Flutter Custom plugin with our native Android and iOS SDKs. +--- + +# Integrate With Flutter Custom SDK + +Flutter custom SDK is a wrapper for Flutter framework that interacts with native our custom SDK (iOS and Android platforms). Flutter apps can interact with wrapper methods to initiate payment and other payment operations. + +## Platform Support + +Platform | Version +--- +Android | API-level 19 and later +--- +iOS | iOS 10 and later + +## List of Razorpay Flutter Custom SDK Versions (Last 5 versions) + +Version No. | Release Date | Changes +--- +1.4.2 | 03 Dec 2025 | **Bug Fix**: iOS native platform issues resolved. + **Maintenance**: Pinned internal native library version to avoid upgrade misses. +--- +1.4.1 | 18 Aug 2025 |**Features**: - Added null checks for `pendingResult` before usage to prevent NPE. +- Implemented early return guards in `onPaymentSuccess` and `onPaymentError` methods. +- Cleared `pendingResult` after sending responses to prevent duplicate replies. +- Enhanced resync method to handle null `pendingReply` gracefully. +- Added success response after `setPaymentID` operation. +- Improved `RazorpayPlugin` with proper resync method call handling. +- Removed commented dead code for cleaner codebase. +- Resolves race conditions that could cause null pointer exceptions and method channel errors due to multiple callback invocations. + +--- +1.4.0 | 15 Apr 2025 | **Feature**: V2 embedding enabled for Android. +--- +1.3.3 | 03 Nov 2022 | Bug fixes +--- +1.3.2 | 12 Jul 2022 | **Feature**: Sample app update `payment_slection_page.dart` + **Bug Fixes**: - `getBankLogoUrl`fix + +- Android fixes + + +> **SUCCESS** +> +> +> **Update SDK** +> +> Check your [current SDK version](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/troubleshooting-faqs.md#6-how-can-i-check-the-razorpay-flutter). If it is outdated, please [update the SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/troubleshooting-faqs.md#7-how-can-i-update-the-razorpay-flutter) to ensure uninterrupted settlements of your funds. +> + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#intent-flow). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md). +> + +## Prerequisites + +- Create a Razorpay account. +- Generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. +- Know about the [Razorpay Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md). + +## Integration Steps + +Follow these integration steps: + +1. [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/build-integration.md) +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/test-integration.md) +3. [Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/go-live-checklist.md) + +### Related Information + +- [Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/troubleshooting-faqs.md) +- [Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/flutter-integration/custom/build-integration.md b/llm-content/payments/payment-gateway/flutter-integration/custom/build-integration.md new file mode 100644 index 00000000..293f68b1 --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/custom/build-integration.md @@ -0,0 +1,818 @@ +--- +title: 1. Build Integration +description: Steps to integrate your Custom Flutter application with Razorpay Payment Gateway. +--- + +# 1. Build Integration + +Follow these steps to integrate your Flutter application with the Razorpay Payment Gateway: + +**1.1** [Install Razorpay Flutter Plugin](#11-install-razorpay-flutter-plugin). + +**1.2** [Add Dependencies](#12-add-dependencies). + +**1.3** [Import Package](#13-import-package). + +**1.4** [Create Razorpay instance](#14-create-razorpay-instance). + +**1.5** [Attach Event Listeners](#15-attach-event-listeners). + +**1.6** [Create an Order in Server](#16-create-an-order-in-server). + +**1.7** [Add Checkout Options](#17-add-checkout-options). + +**1.8** [Open Checkout](#18-open-checkout). + +**1.9** [Store Fields in Your Server](#19-store-fields-in-your-server). + +**1.10** [Verify Payment Signature](#110-verify-payment-signature). + +**1.11** [Verify Payment Status](#111-verify-payment-status). + +> **INFO** +> +> +> **Handy Tips** +> +> After you complete the integration: +> +> - Set up webhooks +> - Make test payments +> - Replace Test API keys with Live API keys +> - Integrate with other APIs + +> Refer to the [post-integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/test-integration.md). +> + +> **WARN** +> +> +> **Watch Out!** +> +> If you use M1 MacBook, you need to make [these changes](#m1-macbook-changes) in your `podfile`. +> + +## 1.1 Install Razorpay Flutter Plugin + +[Download the plugin](https://pub.dev/packages/razorpay_flutter_customui) from Pub.dev. + +## 1.2 Add Dependencies + +Add the below code to `dependencies` in your app's `pubspec.yaml`: + +```yml: Add Dependencies +razorpay_flutter_customui: 1.0.0 +``` +#### Add Proguard Rules (Android Only) + +If you are using Proguard for your builds, you need to add the following lines to the Proguard files: + +```java: Add Proguard Rules +-keepattributes *Annotation* +-dontwarn com.razorpay.** +-keep class com.razorpay.** {*;} +-optimizations !method/inlining/ +-keepclasseswithmembers class * { + public void onPayment*(...); +} +``` + +Know more about [Proguard rules](https://github.com/razorpay/razorpay-flutter/issues/42#issuecomment-550161626). + +#### Get Packages + +Run `flutter packages get` in the root directory of your app. + +> **INFO** +> +> +> **Handy Tips** +> +> - For **Android**, ensure that the minimum API level for your app is 19 or higher. +> + +> - For **iOS**, ensure that the minimum deployment target for your app is iOS 10.0 or higher. Also, do not forget to enable bitcode for your project. +> + +## 1.3 Import Package + +Use the below code to import the `razorpay_flutter_customui.dart` file to your project: + +```yml: Import Package +import 'package:razorpay_flutter_customui/razorpay_flutter_customui.dart'; +``` + +## 1.4 Create Razorpay instance + +For Android, use the below code to create a Razorpay instance: + +```java: Instantiate +_razorpay = Razorpay(); +``` + +For iOS, you need to initialise and instantiate the SDK using the following method: + +```swift: Initialise and Instantiate +@override +void initState() { + _razorpay = Razorpay(); + _razorpay.initializeSDK(key); +} +``` + +## 1.5 Attach Event Listeners + +The plugin uses event-based communication and emits events when payments fail or succeed. + +- The event names are exposed via the constants `EVENT_PAYMENT_SUCCESS` and `EVENT_PAYMENT_ERROR` from the `Razorpay` class. +- Use the `on(String event, Function handler)` method on the Razorpay instance to attach event listeners. + +```yml: Attach Event Listeners +_razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, _handlePaymentSuccess); +_razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, _handlePaymentError); +``` + +The handlers would be defined in the class as: + +```yml: Handlers +void _handlePaymentSuccess(PaymentSuccessResponse response) { + // Do something when payment succeeds +} + +void _handlePaymentError(PaymentFailureResponse response) { + // Do something when payment fails +} +``` + +## 1.6 Create an Order in Server + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +## 1.7 Add Checkout Options + +Pass the Checkout options. Ensure that you pass the `order_id` that you received in the response of the previous step. + +```yml: Checkout Options +var options = { + "key": key, + "amount": 29935, + "currency": "", + "contact": "", + "email": "", + "order_id": "order_EMBFqjDHEEn80l", // Generate order_id using Orders API + "description": "Fine T-Shirt", + "method": "card", + "card[name]": "Test User", + "card[number]": "card number", + "card[expiry_month]": 11, + "card[expiry_year]": 30, + "card[cvv]": + }; + _razorpay.submit(options); +``` +You must pass these parameters in Checkout to initiate the payment. + +`key` _mandatory_ +: `string` API Key ID generated from **Dashboard** → **Account & Settings** → [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `10000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. For example, `INR`. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`description` _optional_ +: `string` Description of the product shown in the Checkout form. It must start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown in the Checkout form. Can also be a **base64** string, if loading the image from a network is not desirable. + +`order_id` _mandatory_ +: `string` Order ID generated via the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`method` _mandatory_ +: `string` The payment method used by the customer on Checkout. +Possible values: + - `card` (default) + - `upi` (default) + - `netbanking` (default) + - `wallet` (default) + - `emi` (default) + - `cardless_emi` (requires [approval](https://razorpay.com/support/#request)) + - `paylater` (requires [approval](https://razorpay.com/support/#request)) + - `emandate` (requires [approval](https://razorpay.com/support/#request)) + +`card` _mandatory if method=card/emi_ +: `object` The details of the card that should be entered while making the payment. + + `number` + : `integer` Unformatted card number. + + `name` + : `string` The name of the cardholder. + + `expiry_month` + : `integer` Expiry month for card in MM format. + + `expiry_year` + : `integer` Expiry year for card in YY format. + + `cvv` + : `integer` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `emi_duration` + : `integer` Defines the number of months in the EMI plan. + +`bank_account` _mandatory if method=emandate_ +: The details of the bank account that should be passed in the request. These details include bank account number, IFSC code and the name of the customer associated with the bank account. + + `account_number` + : `string` Bank account number used to initiate the payment. + + `ifsc` + : `string` IFSC of the bank used to initiate the payment. + + `name` + : `string` Name associated with the bank account used to initiate the payment. + +`bank` _mandatory if method=netbanking_ +: `string` Bank code. List of available banks enabled for your account can be fetched via [**methods**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#fetch-supported-methods). + +`wallet` _mandatory if method=wallet_ +: `string` Wallet code for the wallet used for the payment. Possible values: + - `payzapp` (default) + - `olamoney` (requires [approval](https://razorpay.com/support/#request)) + - `phonepe` (requires [approval](https://razorpay.com/support/#request)) + - `airtelmoney` (requires [approval](https://razorpay.com/support/#request)) + - `mobikwik` (requires [approval](https://razorpay.com/support/#request)) + - `jiomoney` (requires [approval](https://razorpay.com/support/#request)) + - `amazonpay` (requires [approval](https://razorpay.com/support/#request)) + - `paypal` (requires [approval](https://razorpay.com/support/#request)) + - `phonepeswitch` (requires [approval](https://razorpay.com/support/#request)) + +`provider` _mandatory if method=cardless_emi/paylater_ +: `string` Name of the cardless EMI provider partnered with Razorpay. + + Available options for Cardless EMI (requires [approval](https://razorpay.com/support/#request)): + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `zestmoney` + - `earlysalary` + - `walnut369` + + Available options for Pay Later: + - `lazypay` + - `paypal` + +`vpa` _mandatory if method=upi_ +: `string` UPI ID used for making the payment on the UPI app. + + +> **WARN** +> +> +> **Deprecation Notice** +> +> UPI Collect is deprecated effective 28 February 2026. This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [ migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md) to switch to UPI Intent. +> + +`callback_url` _optional_ +: `string` The URL to which the customer must be redirected upon completion of payment. The URL must accept incoming `POST` requests. The callback URL will have `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` as the request parameters for a successful payment. + +`redirect` _conditionally mandatory_ +: `boolean` Determines whether customer should be redirected to the URL mentioned in the +`callback_url` parameter. This is mandatory if `callback_url` parameter is used. Possible values: + - `true`: Customer will be redirected to the `callback_url`. + - `false`: Customer will not be redirected to the `callback_url` + +#### Enable UPI Intent on iOS + +Provide your customers with a better payment experience by enabling UPI Intent on your app's Checkout form. In the UPI Intent flow: +1. Customer selects UPI as the payment method in your iOS app. A list of UPI apps supporting the intent flow is displayed. For example, PhonePe, Google Pay and Paytm. +2. Customer selects the preferred app. The UPI app opens with pre-populated payment details. +3. Customer enters their UPI PIN to complete their transactions. +4. Once the payment is successful, the customer is redirected to your app or website. + +To enable this in your iOS integration, you must make the following changes in your app's info.plist file. + +```xml: info.plist +LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + +``` + +Know more about [UPI Intent and its benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). + +### UPI Intent on Recurring Payments + +Configure and initiate a recurring payment transaction on UPI Intent: + +```swift: ViewController.swift +let options: [String:Any] = [ + "key": "YOUR_KEY_ID", + "order_id": "order_DBJOWzybfXXXX", + "customer_id": "cust_BtQNqzmBlXXXX", + "prefill": [ + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + ], + "image": "https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + "amount": 10000, // Amount should match the order amount + "currency": "INR", + "recurring": 1 // This key value pair is mandatory for Intent Recurring Payment. +] +```objectivec: ViewController.m +NSDictionary *options = @{ + @"key": @"YOUR_KEY_ID", + @"order_id": @"order_DBJOWzybfXXXX", + @"customer_id": @"cust_BtQNqzmBlXXXX", + @"prefill": @{ + @"contact": @"+919000090000", + @"email": @"gaurav.kumar@example.com" + }, + @"image": @"https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + @"amount": @(10000), // Amount should match the order amount + @"currency": @"INR", + @"recurring": @(1) // This key value pair is mandatory for Intent Recurring Payment. +}; +``` + +## 1.8 Open Checkout + +Use the below code to open the Razorpay checkout: + +```yml: Open Razorpay Checkout +_razorpay.submit(options); +``` + +## 1.9 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +## 1.10 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +#### M1 MacBook Changes +If you use M1 MacBook, you need to make the following changes in your podfile. + +> **INFO** +> +> +> **Handy Tips** +> +> Add the following code inside `post_install do |installer|`. +> + +```js: podfile +installer.pods_project.build_configurations.each do |config| + config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" +end +``` + +## 1.8 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/test-integration.md) diff --git a/llm-content/payments/payment-gateway/flutter-integration/custom/go-live-checklist.md b/llm-content/payments/payment-gateway/flutter-integration/custom/go-live-checklist.md new file mode 100644 index 00000000..b256c496 --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/custom/go-live-checklist.md @@ -0,0 +1,57 @@ +--- +title: 3. Go-live Checklist +description: Check the go-live checklist for Razorpay Payment Gateway custom Flutter integration. +--- + +# 3. Go-live Checklist + +Consider these steps before taking the integration live. + +## Accept Live Payments + +Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + +## Payment Capture + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git a/llm-content/payments/payment-gateway/flutter-integration/custom/methods.md b/llm-content/payments/payment-gateway/flutter-integration/custom/methods.md new file mode 100644 index 00000000..2388459a --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/custom/methods.md @@ -0,0 +1,159 @@ +--- +title: Methods +description: Check the payment methods available for the Flutter plugin. +--- + +# Methods + +Documented below are the methods for the Flutter plugin. + +## Interface Methods + +### getPaymentMethods + +Use this method for fetching the payment methods: + +```js: Get Payment Methods +onPressed: () { + final paymentMethods = await _razorpay.getPaymentMethods(); +} +``` + +### getAppsWhichSupportUpi + +Use this method for fetching those apps on the customer's phone which support UPI payments: + +```js: Get Apps which support UPI +onPressed: () { + final supportedUpiApps = _razorpay.getAppsWhichSupportUpi(); +} +``` + +### getCardNetwork + +Use this method to get the card network. This function expects the card number as a parameter and returns the card network. For example, VISA, Mastercard, RuPay and so on: + +```js: Get Card Network +onPressed: () { + final cardNetwork = _razorpay.getCardsNetwork(""); +} +``` + + +### isValidCardNumber + +Use this method to validate the card number. This function returns a boolean value that determines the card is valid or invalid: + +```js: Is Valid Card Number +onPressed: () { + final isValidCard = await _razorpay.isValidCardNumber(''); +} +``` + +### getBankLogoUrl + +You must use bank code as the method parameter returned in the `getPaymentMethod()` to fetch the bank logo URL. + +```js: Get Bank Logo URL +onPressed: () { +final bankLogoUrl = _razorpay.getBankLogoUrl(""); +} +``` + +### changeApiKey + +Use this method for changing the API keys: + +```js: Change API Key +onPressed: () { + _razorpay.changeApiKey(‘api-key’); +} +``` + +### getCardNetworkLength + +Use this method for fetching the card network length: + +```js: Get Card Network Length +onPressed: () { + final length = await _razorpay.getCardNetworkLenght('VISA'); +} +``` + +### getSubscriptionAmount + +Use this method for fetching the subscription amount using the `subscription_id`: + +```js: Get Subscription Amount +onPressed: () { + final subAmount = await _razorpay.getSubscriptionAmount('sub_8tkmbhhROdiVSc'); +} +``` + +### getWalletLogoUrl + +Use this method for fetching the wallet logo URL: + +```js: Get Wallet Logo URL +onPressed: () { + final walletLogo = await _razorpay.getWalletLogoUrl('paytm'); +} +``` + +### Submit + +Use this method for submitting the payment details: + + +```js: Submit Payment Details +onPressed: () { + var options = { + 'key': key, + 'amount': 100, + 'currency': '', + 'email': '', + 'contact': '', + 'method': 'netbanking', + 'bank': 'hdfc' + }; + _razorpay.submit(options); +} +``` + +## Listening to Events + +Events are triggered from the SDK for handling success or error on payments, Register for these events in the initState() method in their flutter apps as given below: + +```js: Listening to Events +@override +void initState() { + _razorpay = Razorpay(); + _razorpay.initilizeSDK(key); + _razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, _handlePaymentSuccess); + _razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, _handlePaymentError); +} + +void _handlePaymentSuccess(Map response) { + print('Payment Success Response : $response'); +} + +void _handlePaymentError(Map response) { + print('Payment Error Response : $response'); +} +``` + +## Error Codes + +The error codes have been exposed as integers by the `Razorpay` class. The error code is available as the code field of the `PaymentFailureResponse` instance passed to the callback. + +Error Code | Description +--- +NETWORK_ERROR | There was a network error. For example, loss of internet connectivity. +--- +INVALID_OPTIONS | An issue with options passed in `Razorpay.open`. +--- +PAYMENT_CANCELLED | User cancelled the payment. +--- +TLS_ERROR | Device does not support TLS v1.1 or TLS v1.2. +--- +UNKNOWN_ERROR | An unknown error occurred. diff --git a/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods.md b/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods.md new file mode 100644 index 00000000..6a2b3b1f --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods.md @@ -0,0 +1,279 @@ +--- +title: Payment Methods +description: Integrate different payment methods in Razorpay Flutter Custom SDK. +--- + +# Payment Methods + +You can use the Razorpay Flutter Custom SDK to integrate the supported payment methods on your Flutter app's Checkout form. + +## Debit and Credit Card + +For card payments, `method` should be specified as `card`. + +#### Sample Code + +The sample code shown below allows the checkout to accept a card payment of : + +```java: Card +var options = { + "key": key, + "amount": 29935, + "currency": "", + "contact": "", + "email": "", + "order_id": "order_EMBFqjDHEEn80l", // Generate order_id using Orders API, + "description": "Fine T-Shirt" + "method": "card", + "card[name]": "Test User", + "card[number]": "card number", + "card[expiry_month]": 11, + "card[expiry_year]": 30, + "card[cvv]": , + "display_logo": "0" + }; + _razorpay.submit(options); +``` + +## Netbanking + +For netbanking, `method` should be specified as `netbanking` and an additional field `bank` must specify the bank with its respective bank code. Use `getPaymentMethods` to retrieve the list of supported bank codes. + +#### Sample Code + +The sample code shown below allows the checkout to perform a netbanking transaction for a payment of ₹299.35: + +```java: Netbanking +netBankingOptions = { + "key": key, + "amount": 29935, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "order_id": "", + "contact": "9009009009", + "method": "netbanking", + "bank": "icic" + }; +_razorpay.submit(netBankingOptions!); + +``` + +## UPI + +For UPI payments, `method` should be specified as `upi`. The SDK supports two flows: + +1. Intent +2. Collect + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#intent-flow). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md). +> + +#### Intent Flow + +```java: UPI Intent + +final supportedUpiApps = _razorpay.getAppsWhichSupportUpi(); + +var options = { + "key": key, + "amount": 29935, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9009009009", + "method": "upi", + "_[flow]": "intent", + "upi_app_package_name": "paytm", + "order_id": "" +}; +_razorpay.submit(options); +``` + +> **INFO** +> +> +> **Handy Tips** +> +> If your application targetSdkVersion is 30 or above, add the following code in your app's manifest file to support the UPI Intent flow. +> +> ```xml: AndroidManifest.xml +> +> +> +> +> Specific intents you query for, +> eg: for a custom share UI +> --> +> +> +> +> +> ``` +> + +View the complete list of [UPI supported apps and their package names](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/supported-apps.md). + +#### Collect Flow + +In Collect Flow, the collect request will be sent to the UPI app for the specified `vpa`. + +#### Sample Code + +The sample code below will send collect request to `gaurav.kumar@exampleupi` handle: + +```java: UPI Collect + +var options = { + "key": key, + "amount": 29935, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "order_id": "", + "contact": "9009009009", + "method": "upi", + "_[flow]": "collect", + "vpa": "gauravkumar@exampleupi" +}; +_razorpay.submit(options); + +``` + +## CRED + +Given below is the sample code when the payment method is `app` and provider is `cred`. + +#### Intent Flow + +- Check if the Cred app is installed on the customer’s phone. This can be detected by calling `isCredAppAvailable` method. + +```js:Intent Flow +onPressed: () { + final credAppInstalled = _razorpay.isCredAppAvailable(); +var options = { + "key": key, + "amount": 29935, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9009009009", + "app_present": true, + "method": "app", + "provider": "cred", + "order_id": "" + if (credAppInstalled) { + 'callback_url': 'flutterCustomUI://' + } + }; +_razorpay.payWithCred(options); +} +``` + +- Handle the Cred app callback in the `AppDelegate`. To do this: + 1. Open `Runner.xcworkspace`. + 2. Go to `AppDelegate.swift`. + 3. Add the `open url: method` as given below: + +```java: Open URL +override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { + DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { + NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CRED_CALLBACK_NOTIFICATION"), object: nil, userInfo: ["response":url.absoluteString]) + } + return false + } +``` + +#### Collect Flow + +Check if the Cred app is installed on the customer’s phone. This can be detected by calling `isCredAppAvailable` method. + +```js: Collect Flow + +var options = { + "key": key, + "amount": 29935, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9009009009", + "app_present": false, + "method": "app", + "provider": "cred", + "order_id": "" + }; +_razorpay.submit(options); +``` + +## Pay Later + +Given below is the sample code for the payment method `paylater`. Know more about [paylater](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later/custom-integration.md). + +```js: Paylater +var options = { + "key": key, + "amount": 29935, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9009009009", + "method": "paylater", + "provider": "", + "order_id": "" + }; +_razorpay.submit(options!); + +``` + +## Cardless EMI + +Given below is the sample code for the payment method `cardless_emi`. Know more about [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi/custom-integration.md). + +```js: Cardless EMI +var options = { + "key": key, + "amount": 29935, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9009009009", + "method": "cardless_emi", + "provider": "", + "order_id": "" + }; +_razorpay.submit(netBankingOptions!); +``` + +## EMI + +Given below is the sample code for the payment method `emi`. + +```js: EMI +var options = { + "key": key, + "amount": 100, + "card[cvv]": 123, + "card[expiry_month]": 11, + "card[expiry_year]": 25, + "card[name]": "Test User", + "card[number]": "4386289407660153", + "contact": "9900990099", + "currency": "INR", + "display_logo": "0", + "email": "gaurav.kumar@example.com", + "description": "Fine T-Shirt", + "method": "emi", + "emi_duration": 9, + "order_id": "" +}; +_razorpay.submit(options); +``` diff --git a/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi.md b/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi.md new file mode 100644 index 00000000..1396cc0b --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi.md @@ -0,0 +1,100 @@ +--- +title: About Turbo UPI +description: Integrate with Turbo UPI to provide a 2-step UPI payment experience. +--- + +# About Turbo UPI + +Use Razorpay Turbo UPI to make UPI payments faster. Following are the sample screens while making payments using Turbo UPI. + +![Razorpay Turbo UPI Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-in-app-transaction-flow.jpg.md) + +> **WARN** +> +> +> +> **Watch Out!** +> +> Currently, Flutter SDK is supported only for Android. +> +> + +## Advantages + + + - Simplified payment process with just two steps. + - Higher success rate. + - One stop for refunds and disputes. + + + - Higher success rates with a smoother payment experience. + - Complete in-app flow with no redirections gives better control over the user journey. + - Prevent timeouts effectively, as customers never leave your app. + + +> **WARN** +> +> +> +> **Watch Out!** +> +> Due to the sensitive nature of the added libraries, we must ensure that the app is running in a proper environment. Therefore, after integration, the app will not run on Android emulators. +> + +> **WARN** +> +> +> **Watch Out!** +> +> - Use the `rzp_test_0wFRWIZnH65uny` merchant key for testing on the UAT environment and the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. +> - As a compliance requirement, you need to get approval from Google for **READ_SMS** permission. Refer [to this link](https://support.google.com/googleplay/android-developer/answer/10208820?hl=en) for more details. +> +> + +## Customer Onboarding + +Your customers can link their bank accounts to your app with these steps: +1. The customer navigates to your app's checkout screen and taps **Add bank account**. + ![Turbo UPI Add Bank Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-custom-add-bank-account.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> The customer needs to give **allow SMS permission** so that we can validate the phone number with the bank. +> ![Turbo UPI SMS Verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-custom-sms-verification.jpg.md) +> + +2. The customer's bank details are fetched and linked to the bank account. + + ![Turbo UPI Fetch Bank Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-custom-fetch-account.jpg.md) + +3. The customer selects a bank from the list of banks. The top 8 banks are displayed for easier selection. + ![Turbo UPI Select Bank Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-custom-select-bank-account.jpg.md) + +> **INFO** +> +> +> +> **Handy Tips** +> +> If no UPI PIN is set, the customers are prompted to provide their card details, enter an OTP and complete the setup. +> ![Turbo UPI Enter Card Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-custom-card-details.jpg.md) +> + +This completes the onboarding. + +## Transaction Flow + +After the customer is onboarded, on the checkout page of your app: + +1. The customer selects the linked bank account. + ![Razorpay Turbo UPI Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-linked-bank.jpg.md) +2. The customer enters the UPI PIN to complete the payment. + ![Turbo UPI Payment Successful](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-custom-enter-pin.jpg.md) + +### Related Information + +- [Turbo UPI Headless](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/integration-noui.md) diff --git a/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/error-codes.md b/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/error-codes.md new file mode 100644 index 00000000..596f7794 --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/error-codes.md @@ -0,0 +1,421 @@ +--- +title: Turbo UPI SDK - Error Codes | Flutter Custom Integration +heading: Turbo UPI SDK - Error Codes +description: List of error codes for Turbo UPI SDK. +--- + +# Turbo UPI SDK - Error Codes + +Given below is the list of error codes categorised by error reasons, with relevant descriptions, source and step. + +### Bad Request Errors + +Given below is the list of Bad Request errors. + + +### bank_not_live_on_upi + + - **Description**: The selected bank is not enabled on UPI. Please try using another bank. + - **Source**: gateway + - **Step**: customer_onboarding + + + +### account_does_not_exist + + + + Payment Debit Request + + - **Description**: No accounts found for the selected bank. Please try using another bank. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Payment Credit Request + + - **Description**: Payment was unsuccessful as the receiver's bank account is not valid. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + + + + +### transaction_not_allowed + + + + Payment Debit Request + + - **Description**: Transaction not permitted to the account as per your bank policy. Please contact your bank for more details or try with another bank account. + - **Source**: customer + - **Step**: payment_debit_request + + + +### Payment Credit Request + + - **Description**: Payment not allowed as it got declined by the receiver's bank. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + + + + +### upi_pin_registration_card_expired + + - **Description**: Card used while setting UPI PIN has expired. Please use another debit card or use another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### upi_pin_registration_card_not_found + + - **Description**: Card details used while setting UPI PIN are incorrect. Please re-check and try again. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### upi_pin_registration_card_restricted + + - **Description**: Card used while setting UPI PIN has been blocked by your bank. Please reach out to your bank for more information or try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### bank_technical_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_status_request + + + +### pin_not_set + + - **Description**: Payment was unsuccessful as you have not set the UPI PIN on the app. Try using another method. + - **Source**: customer_psp + - **Step**: payment_authentication + + + +### customer_not_registered + + - **Description**: No bank account is associated with this mobile number. Please try again by adding your account. + - **Source**: gateway + - **Step**: customer_onboarding + + + +### server_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: gateway + - **Step**: payment_authentication + + + +### payment_cancelled_by_user + + - **Description**: Flow was aborted as you pressed back from the PIN screen. Please try again. + - **Source**: customer + - **Step**: payment_authorization + + +### Gateway Errors + +Given below is the list of gateway errors. + + +### incorrect_otp + + - **Description**: You have entered an incorrect OTP. Try again. + - **Source**: customer + - **Step**: customer_onboarding + + + +### otp_expired + + - **Description**: You have entered an expired OTP. Please regenerate OTP and try again. + - **Source**: customer + - **Step**: customer_onboarding + + + +### insufficient_funds + + - **Description**: Payment was unsuccessful due to insufficient funds. Kindly check your balance and try again. + - **Source**: customer + - **Step**: payment_debit_request + + + +### insufficient_funds_mandate_block + + - **Description**: Payment was unsuccessful as the amount in your account is blocked for another payment. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### otp_attempts_exceeded + + - **Description**: You have entered an incorrect OTP too many times. Try again in some time. + - **Source**: customer_psp + - **Step**: customer_onboarding + + + +### account_dormant + + - **Description**: Payment was unsuccessful as the receiver's bank account is inactive. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + +### bank_not_live_on_upi + + - **Description**: Selected bank is not available on UPI. Please try using another bank. + - **Source**: issuer_bank + - **Step**: customer_onboarding + + + +### payment_timed_out + + + + Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_response + + + +### UPI ID Not Reachable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is not reachable at this time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + + + + +### first_transaction_limit_exceeded + + - **Description**: Payment was unsuccessful as you exceeded the first-time transaction limit set by your bank. You can use another bank account or retry after 24 hours. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### transaction_limit_exceeded + + + + Limit Set By Bank Exceeded + + - **Description**: Payment was unsuccessful as you exceeded the transaction limit set by your bank. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### Daily Amount Limit Exceeded + + - **Description**: Payment was unsuccessful as you exceeded the amount limit for the day with this bank account. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + + + + + +### first_time_transaction_freeze_period + + - **Description**: Payment was unsuccessful due to the cooling period set by your bank for first-time user. Please try again after some time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### transaction_frequency_limit_exceeded + + - **Description**: Payment was unsuccessful as the number of transactions exceeds the max limit set by the bank. You can use another bank account or retry after some time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### bank_account_inactive + + + + Issuer Bank Account Inactive + + - **Description**: Payment was unsuccessful as your account is not active. Please try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Receiver Bank Account Inactive + + - **Description**: Payment was unsuccessful as the receiver's bank account is not active. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_debit_request + + + + + + +### server_error + + + + Temporary Issue - Issuer Bank + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: beneficiary_bank + - **Step**: payment_request + + + +### Temporary Issue - Beneficiary Bank + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: issuer_bank + - **Step**: payment_request + + + + + + +### invalid_ifsc + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: gateway + - **Step**: payment_authentication + + + +### upi_pin_registration_card_blocked + + - **Description**: Card used while setting UPI PIN has been blocked by your bank. Please reach out to your bank for more information or try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### bank_technical_error + + + + UPI ID Temporarily Unavailable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: payment_credit_response + + + +### Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: payment_credit_response + + + + + + +### payment_declined + + + + Declined by Bank + + - **Description**: Payment was unsuccessful as it was declined by your bank. Reach out to your bank for more details. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_debit_request + + + + + + +### pin_attempts_exceeded + + - **Description**: You have exceeded the incorrect UPI PIN attempts. You can use another bank account or retry after 24 hours. + - **Source**: customer + - **Step**: payment_authentication + + + +### incorrect_pin + + - **Description**: You have entered incorrect UPI PIN. Please try again with the correct UPI PIN. + - **Source**: customer + - **Step**: payment_authentication + + + +### linked_account_removal_failed + + - **Description**: Unable to remove the account. Please try again. + - **Source**: customer_psp + - **Step**: account_management + + + +### sms_text_not_received + + - **Description**: Something went wrong while sending SMS. Please try again. + - **Source**: gateway + - **Step**: customer_onboarding + + +### Server Errors + +Given below is the list of server errors. + + +### server_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: customer_onboarding + + + +### server_error + + - **Description**: We are facing some trouble completing your request at the moment. Please try again shortly. + - **Source**: internal + - **Step**: payment_authorization diff --git a/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/faqs.md b/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/faqs.md new file mode 100644 index 00000000..d335d494 --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/faqs.md @@ -0,0 +1,314 @@ +--- +title: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Turbo UPI. +--- + +# Frequently Asked Questions (FAQs) + +## Payments + + +### 1. What is the protocol if a user enters an incorrect UPI PIN? + + If a user enters a wrong UPI PIN more than three times, the user must reset the PIN or wait 24 hours to make the next transaction. + + + +### 2. On which devices can I enable Turbo UPI? Can it be enabled on the Web? + + Turbo UPI can be enabled only on a mobile app, either iOS or Android, through an SDK integration. This product is currently unavailable as a web-based solution due to the NPCI constraints. Due to security reasons, the NPCI Common Library (UPI PIN screen) can be deployed only when a device is bound to the SIM and the application. + + + +### 3. Are there any transaction limits or restrictions imposed? + + Below are the standard NPCI transaction limits: + - For first-time UPI users, the initial transaction limit is typically up to ₹5,000 with a cooling period of 24 hours. After this cooling period, the transaction limits will be relaxed to the standard limits. + - During this cooling-off period, your bank will reduce the following: + - The amount you can send per UPI payment and the amount you can send in one day. + - The number of UPI payments you can make in one hour/day. + + +> **INFO** +> +> +> **Handy Tips** +> +> The limits during this period and the cooling-off period may vary from bank to bank. Please contact your bank for more information. +> + + + + +### 4. Can users receive money on Turbo UPI-generated UPI ID? + + Yes, users can receive money. However, they can not pay using a collect request from your app. Collect requests will go to the bank's UPI app. + + + +### 5. Can I enable Turbo UPI on all Razorpay checkouts? + + + We have built Turbo UPI in a way that it can be deployed across any Razorpay checkout - [Standard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/standard/payment-methods/turbo-upi.md), [Custom](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi.md) or S2S. The integration process for each of these options will depend on whether you want to control the user experience. With our Standard Checkout offering, you can complete the integration and start processing payments within 1-2 days. + + + +### 6. Can I extend the instant refund capability to Turbo UPI? + + Yes. If you are already using Razorpay's instant refunds functionality, you can seamlessly apply the same capability to transactions processed via Turbo UPI. To enable this feature, please raise a request at our [support team](https://razorpay.com/support/#request). + + + +### 7. Can merchants from specific categories accept Credit Card payments on UPI? + + If you belong to the following Merchant Category Codes (MCC), you cannot accept Credit Card payments on UPI: + + + + Sl.No | Merchant Category Code (MCC) + --- + 1 | 6010 + --- + 2 | 6012 + --- + 3 | 6013 + --- + 4 | 7407 + --- + 5 | 7408 + --- + 6 | 7409 + --- + 7 | 6011 + --- + 8 | 6051 + --- + 9 | 6211 + --- + 10 | 7322 + --- + 11 | 7800 + --- + 12 | 7801 + --- + 13 | 7995 + --- + 14 | 7802 + --- + 15 | 9406 + --- + 16 | 4829 + + + + +## Onboarding + + +### 1. What are the specific guidelines or best practices for designing the user interface for UPI payments? + + - Using the Turbo UPI logo is recommended for a better user experience. You can download the logo using the button below. + [Download Turbo UPI Logo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/Turbo-upi-logo.zip.md) + ![Turbo UPI Logo image](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-logo.jpg.md) + - Ensure to have the UPI logo against the account as per UPI guidelines. + - Encourage users to complete the onboarding process by clearly communicating the benefits they will receive. This could include highlighting the simplicity of a one-step payment, showcasing any ongoing offers, or emphasising unique features. + - Ensure users can complete onboarding and continue payment in a single flow. We recommend having an option to continue payment as soon as onboarding is complete. + - Once an account is linked, clearly communicate the bank account using the last four digits and provide ways to add other accounts if users want to. + + + +### 2. Which UPI ID is currently supported on Turbo UPI? + + Turbo UPI supports the use of @axisbank handles for transactions. If your customer already has an existing @axisbank handle, it will be automatically fetched, allowing them to proceed seamlessly. + + +> **INFO** +> +> +> **Handy Tips** +> +> Turbo UPI does not reuse existing @axl or @okaxis handles; only the @axisbank handle is reused. If your customer does not have an existing UPI ID, one will be created automatically during the one-time device binding process. +> + + + + +### 3. How can I encourage users to complete the onboarding process? + + To enhance user engagement and drive onboarding completion, keep the following in view: + 1. Highlight the Value: Clearly explain how users benefit from the "1 Step Payment Experience" and the "Fastest Payment Experience." Users engage when they see the value. + 2. Offer Incentives: Provide initial incentives like discounts, special deals, or rewards. These encourage users to start the onboarding process or make their first payment using the 1 Step Payment Experience. + + + +### 4. Is Handling permission results mandatory? + + Yes, it is essential to grant all the permissions requested in the Check Permission call. If these permissions are denied, users will not be able to proceed further in the app. + + + +### 5. What are all the permissions required during device binding? + + During device binding, the user needs to grant the necessary permissions for a seamless experience. + - **Send SMS**: This permission enables us to validate the phone number with the bank by sending SMS. + - **Read Phone State**: This permission allows us to access essential information about the device's state, ensuring a secure and reliable connection. + - **Access Location**: This permission may be needed for location-based services or additional security measures, enhancing the overall user experience. + + +## Integrations + + +### 1. How will I be notified about my payment status? + + Razorpay provides notifications about payment status through webhooks, ensuring you are promptly informed about the status of your transactions. When a payment is processed, Razorpay will trigger a webhook to notify you whether the payment was successful or failed. Refer to the [payment payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payments). + + + +### 2. Is Device Binding necessary for every transaction? + + No, Device Binding is a one-time requirement aimed at verifying the presence of the user's phone number. This verification is achieved through an outgoing SMS from the user's device. Once this initial verification is completed, there is no need to repeat the Device Binding process for every new account linking or transaction. + + +> **WARN** +> +> +> **Watch Out!** +> +> Device Binding may need to be repeated if the user uninstalls the app or clears their storage. +> + + + +## Miscellaneous + + +### 1. Is there any analytics available about the user journey? + + Yes. There would be events to understand the user journey and each action the user takes, which we can share on a request basis or set up automated reports as required. Additionally, the entire journey will be in your app, and you will have your UI. + +> **INFO** +> +> +> **Handy Tips** + +> - For Custom Checkout: you can install and trigger any additional event on your application. +> - For Standard Checkout: Razorpay can share these details via reports on request. Raise a request to the [support team](https://razorpay.com/support/#request). +> + + + + +### 2. Is Turbo UPI supported with Optimizer? + + Yes, Turbo UPI can be enabled for businesses who use Optimizer. However, a prerequisite is that the business sets a routing rule to direct 100% of traffic towards Razorpay instead of other PGs. Only then will end-users be able to benefit from Turbo UPI. Know more about [Turbo UPI on Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/create-custom-rule.md#turbo-upi-on-optimizer). + + + +### 3. By enabling Turbo UPI, does the business become a TPAP? + + Integrating with Turbo UPI **does not** classify the business as a Third-Party App Provider (TPAP). Consider the following: + - According to the OC 154 Circular, the bank’s SDK is the licensed party, not the business app. Thus, the bank partner must comply with any new developments from NPCI, not the business. + - Razorpay acts as the front-end entity similar to TPAPs like GPay or PhonePe. We provide a wrapper built around the bank’s SDK that can be directly integrated into the business app. This wrapper-SDK now consists of all the front-end capabilities to process in-app payments. + - Businesses using Turbo UPI can enjoy a streamlined onboarding process without requiring lengthy certification procedures with NPCI. They can unlock new features through Razorpay’s SDK in a case-by-case scenario. + - Businesses can now operate as UPI apps for all practical purposes, limited to Peer-to-Merchant (P2M) transactions, thus simplifying their go-to-market experience and delighting customers. + + + +### 4. Who is Razorpay's partner bank for Turbo UPI? Do we plan to integrate with more banks in the future? + + Razorpay has chosen to collaborate with Axis bank as their partner bank. The underlying SDK used is Axis bank's Plugin SDK, over which Razorpay has created a wrapper to support standard P2M flows. + + + +### 5. Is there a customised, business-specific UPI ID that will be created for users who use Turbo UPI? For example, @swiggy? + + No, since the acquiring partner is still Axis bank, the UPI ID created at the backend will be @axisbank. The Turbo UPI solution does not enable businesses to become TPAPs and uses the bank's UPI processing stack. Thus, the UPI ID created will also be the bank's UPI ID and not customised to the business. + + + +### 6. If we take the example of Axis bank being the partner app, does this mean that users can leverage existing UPI ID with Axis bank, and the same gets pre-fetched and stored? Also, does that include only Axis bank app UPI IDs or even 3rd party PSP having Axis handles like @okaxis? + + @axl and @okaxis handles will not be considered existing UPI IDs for Turbo UPI. Users must have an @axisbank handle to reuse it on Turbo UPI. If required, a new UPI ID will be automatically created in the one-time onboarding process. + + In this case, Axis bank, the acquirer bank, has over 10-12 million unique customer UPI IDs. End users with an existing @axisbank UPI ID will experience a shorter and quicker onboarding process (shorter by 1 step). + + + +### 7. Whenever an existing Turbo UPI user (for business A) wants to use Turbo UPI on business B, would the same UPI ID be used, or would a new UPI ID be created? + + Existing UPI ID with @axisbank will be reused on any new subsequent Turbo UPI businesses. There is no requirement to create new UPI IDs for the same customer. Furthermore, as a UPI ID is already available, this would mean one less step (bank selection step) for the end-user in the 1-time device binding process. + + + +### 8. What is the difference between P2P and P2M transactions? + + + - P2P (Peer-to-Peer): This type of transaction occurs between two individuals, where one person transfers funds to another person, both of whom are registered on the UPI platform. + - P2M (Person-to-Merchant): P2M transactions involve a customer making a payment to a merchant for goods or services. In this case, the transaction is between the customer and the merchant. + + + +### 9. What is P2M (Person-to-Merchant) payment? + + P2M (Person-to-Merchant) payment allows customers to make payments to merchants for their goods or services. In this transaction, funds are transferred from the customer to the respective merchant, facilitating a convenient and straightforward way to complete purchases. + + +## TPV + + +### 1. Is TPV supported on Turbo UPI? + + Yes, mandatory TPV is supported on Turbo UPI. Additionally, we have solutioned a way for you to never see TPV failures (a prevalent problem today that impacts success rates by 4%) through Validated Account Linking. + + + +### 2. Is there a way to prevent users from linking a non-KYC account to my business app via Turbo UPI? + + Yes, we have made this possible through Validated Account Linking, wherein you can limit the accounts being linked via Turbo UPI to the business app based on the KYC account details passed to us by the businesses. This prevents end users from making transactions from unauthorised accounts, resulting in 0 TPV failure cases. + + +## Supports + + +### 1. Who will manage the support for transactional queries? + + + Razorpay will handle the support queries end to end. If it is bank-dependent, our team will coordinate with the bank internally and provide you with the latest updates and resolutions. + + + +### 2. Is there support for multiple banks for Turbo UPI? + + The NPCI does not allow a multi-bank model for the P2M plugin (Turbo UPI). + + + +### 3. How are we notified about the downtime if the partner bank faces fluctuations? + + We have built Downtime Detection on Turbo UPI. We will inform you via email or [Webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payment-downtime-started) if there are any fluctuations due to which Success Rates fall. Also, there are [Downtime APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md#entity), which you can consume to know the latest status. + + + +### 4. What if Turbo UPI is down? Will my UPI payments be affected? + + Along with Turbo UPI, you can also display the existing UPI methods (BHIM / GPay / PhonePe / PayTM ), solving for downtimes. During downtime, the Turbo UPI experience will be disabled; your users can still transact via the standard UPI flows via UPI Apps. + + +## Error Code Mapping + + +### 1. How will Turbo UPI provide better error code mapping and insights into customer drop-offs? + + UPI P2M transactions are routed through third-party UPI apps, and neither you nor the payment gateways have visibility into where users drop off or why a payment has failed. With Turbo UPI, Razorpay can provide data points on the following: + - Insightful error codes where you will know why the user's payment failed. + - Points of user drop-offs in the transaction flow. + - Points of friction, that is, where users spend maximum time. + - Conversion rates of transaction flow and account linking flow. + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/error-codes.md). + + + +### 2. If a user registers on an app via Turbo UPI, is the user required to register again on another app? + + On every app, the device binding has to be done by the user. But once the user has linked bank accounts on one app, the user will get those accounts on other apps immediately once device binding is done. diff --git a/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/integration-noui-tpv.md b/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/integration-noui-tpv.md new file mode 100644 index 00000000..e4db3c6a --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/integration-noui-tpv.md @@ -0,0 +1,1192 @@ +--- +title: Integrate Turbo UPI TPV +description: Know how to integrate Razorpay Turbo UPI Headless TPV with your app. +--- + +# Integrate Turbo UPI TPV + +Third-party validation (TPV) of bank accounts is mandatory for businesses in the BFSI (Banking, Financial Services and Insurance) sector dealing with Securities, Broking and Mutual Funds. You can accept customer payments by integrating with the Turbo UPI Headless - TPV SDK. + +> **WARN** +> +> +> +> **Watch Out!** +> +> Currently, Flutter SDK is supported only for Android. +> +> + + +### Prerequisites + + 1. Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number, app, and GitHub account whitelisted to get access to the `https://github.com/upi-turbo/android-turbo-sample-app` - sample app repository. + + - In this repository, you will find the AAR files (libraries for Turbo) and the sample app source code to help you with the integration. + - The AARs on the main branch are for the UAT environment, and the ones on the prod branch are for the production environment. + + These are the important files in the sample app repo: + - `app/libs`: All libraries (Bank, SecureComponent and Turbo) common for headless SDK. + - `app/build.gradle`: All transitive dependencies needed to integrate the Turbo SDK. + + 2. Integrate with [Razorpay Flutter Custom Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/build-integration.md). + + 3. Import the following frameworks: + - Razorpay Turbo Wrapper Plugin SDK (maven) + - Razorpay Turbo Core SDK + - Razorpay SecureComponent SDK + - Bank SDK + + 4. Add the following lines to your Android project's `gradle.properties` file: + - `android.enableJetifier=true` + - `android.useAndroidX=true` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - `minSDKversion` for using Turbo UPI is currently 19 and cannot be overwritten. +> - API Key Usage for Different Environments: +> - Use the `rzp_test_0wFRWIZnH65uny` API key id for testing on the UAT environment. +> - Use the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. +> - As a compliance requirement, you need to get approval from Google for **READ_SMS** permission. Refer [to the Google article](https://support.google.com/googleplay/android-developer/answer/10208820?hl=en) for more details. +> + + + +## 1. Integration Steps + +Given below are the steps: + + +### Step 1: Whitelist Customer Bank Accounts *(Optional)* + + You can whitelist (also known as allowlist) your customer's bank accounts to ensure that only those accounts are considered during customer onboarding. By whitelisting the accounts at the start, you can avoid the bank account linking during payment. Use the Customer APIs to create customers and add their bank account details. + + For example, if a customer, Gaurav, has two bank accounts ABC and XYZ, you can use the APIs to create a customer id and link the bank accounts to that id. You can then pass this customer id at the time of payment. + + Follow these steps. + + + Step 1.1: Create a Customer + + Use this endpoint to create or add a customer with basic details such as name and contact details. + + ```cURL: Request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "Gaurav Kumar", + "contact": "9123456780", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + }' + + ```json: Success Response + { + "id" : "cust_1Aa00000000004", + "entity": "customer", + "name" : "Gaurav Kumar", + "email" : "gaurav.kumar@example.com", + "contact" : "9123456780", + "gstin": null, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at ": 1234567890 + } + + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } + } + ``` + + + + Request Parameters + + +`name` _optional_ +: `string` Customer's name. Alphanumeric value with period (.), apostrophe ('), forward slash (/), at (@) and parentheses are allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact ` _optional_ +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email ` _optional_ +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`fail_existing` _optional_ +: `string` Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + +`gstin` _optional_ +: `string` Customer's GST number, if available. For example, `29XAbbA4369J1PA`. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + + +### Response Parameters + + +`id` +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`name` +: `string` Customer's name. Alphanumeric, with period (.), apostrophe ('), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact` +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email` +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`gstin` +: `string` GST number linked to the customer. For example, `29XAbbA4369J1PA`. + +`notes` +: `json object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + + + + + + + +### Step 1.2: Add Customer's Bank Account + + The following endpoint adds the customer's bank accounts. + + ```cURL: Request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers/:customer_id/bank_account \ + -H "Content-Type: application/json" \ + -d '{ + "ifsc_code": "UTIB0000194", + "account_number": "11214311215411", + "beneficiary_name": "Gaurav", + "beneficiary_address1": "address 1", + "beneficiary_address2": "address 2", + "beneficiary_address3": "address 3", + "beneficiary_address4": "address 4", + "beneficiary_email": "gaurav.kumar@gmail.com", + "beneficiary_mobile": "9900990099", + "beneficiary_city": "Bangalore", + "beneficiary_state": "KA", + "beneficiary_country": "IN" + }' + + ```json: Response + { + "id": "ba_LSZht1Cm7xFTwF", + "entity": "bank_account", + "ifsc": "ICIC0001207", + "bank_name": "ICICI Bank", + "name": "Gaurav Kumar", + "notes": [], + "account_number": "XXXXXXXXXXXXXXX0434" + } + ``` + + + + Path Parameter + +`customer_id` _mandatory_ +: `string` Customer id of the customer whose bank account is to be added. + + + + +### Request Parameters + + +`account_number` _mandatory_ +: `string` Customer's bank account number. For example, `11214311215411`. + +`beneficiary_name` _mandatory_ +: `string` The name of the beneficiary associated with the bank account. + +`beneficiary_address1` _optional_ +: `string` The virtual payment address. + +`beneficiary_email` _optional_ +: `string` Email address of the beneficiary. For example, `gaurav.kumar@example.com`. + +`beneficiary_mobile` _optional_ +: `string` Mobile number of the beneficiary. + +`beneficiary_city` _optional_ +: `string` The city of the beneficiary. + +`beneficiary_state` _optional_ +: `string` The state of the beneficiary. + +`beneficiary_country` _optional_ +: `string` The country of the beneficiary. + +`beneficiary_pin` _optional_ +: `integer` The pin code of the beneficiary's address. + +`ifsc_code` _mandatory_ +: `string` The IFSC of the bank branch associated with the account. + + + +### Response Parameters + +`bank_accounts` +: `array` An array containing bank account details. + + `id` + : `string` Unique identifier of the bank account. + + `entity` + : `string` The type of entity, which in this case is `bank_account`. + + `ifsc` + : `string` The IFSC of the bank branch associated with the account. + + `bank_name` + : `string` The name of the bank. + + `name` + : `string` The name associated with the bank account. + + `notes` + : `object` Set of key-value pairs that can be used to store additional information about the payment. + + `account_number` + : `integer` Customer's bank account number. For example, `11214311215411`. + + + + + + + + + + +### Step 2: Create an Order *(Mandatory)* + + Pass the investor bank account details to the `bank_account` array of the Orders API. Given below is the sample code when the `method` is `upi`. + + ```curl: Request + curl -u : \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 500, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }' + + ```json: Response + { + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 500, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 + } + ``` + + + Request Parameters + + `amount` _mandatory_ +: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, the value of this field should be `100`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. You can create orders in **INR** only. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`method` _mandatory_ +: `string` The payment method used to make the payment. If this parameter is not passed, investors will be able to make payments using both netbanking and UPI payment methods. Possible values: + - `netbanking`: Investors can make payments only using netbanking. + - `card`: Investors can make payments using debit card. + - `upi`: Investors can make payments only using UPI. + +`bank_account` _mandatory_ +: `object` Details of the bank account that the investor has provided at the time of registration. + + `account_number` _mandatory_ + : `string` The bank account number from which the investor should make the payment. For example, `765432123456789` Payments will not be processed for an incorrect account number. + + `name` _mandatory_ + : `string` The name linked to the bank account. For example, `Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` The bank IFSC. For example, `HDFC0000053`. + + + +### Response Parameters + + `id` +: `string` Unique identifier of the order. + +`entity` +: `string` Indicates the type of entity. Here, it is `order`. + +`amount` +: `integer` The order amount represented in the smallest unit of the currency passed. For example, amount = 100 translates to 100 paise, that is ₹1 (default currency is INR). + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we support INR only. + +`receipt` +: `string` A unique identifier of the order entered by the user. For example, `BILL13375649`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, "note_key": "Beam me up Scotty”. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`offer_id` +: `string` Unique identifier of the offer. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + + + + + + + + +### Step 3: Turbo UPI Headless SDK Action + + You need to link the customer's UPI account with your app. Use the code samples given below to [fetch the UPI account](#32-get-customer-s-linked-upi-account). + + + + 3.1 Initialise the SDK + + + Use the code given below to initialise the SDK. + + ```yml: Import Package + import 'package:razorpay_flutter/razorpay_flutter.dart'; + // Create a Razorpay instance + razorpay = Razorpay("YOUR_KEY_ID"); + ``` + + + +### 3.2 Get Customer's Linked UPI Account + + + Use the following code to fetch your customer's UPI account. If there are no linked UPI accounts, an empty list is returned. + + ```java: Get Linked UPI Account + razorpay.upiTurbo.getLinkedUpiAccounts(customerMobile: mobileNumber, + onSuccess: (List upiAccounts){ + //Display on boarded UpiAccounts. + }, + onFailure: (Error error) { + //Display error message to user. + } + ); + ``` + + + + Request Parameter + + + Parameter | Description + --- + `mobileNumber` | Mobile number of the customer. + + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | This function is triggered if the list is fetched successfully. `accList` can be empty to indicate that no accounts have been linked yet. + --- + `onFailure` | This function is triggered in case an error is thrown during the retrieval process, either by the Razorpay SDK or the Bank SDK. + + + + + + + +### 3.3 Link New UPI Account + + + Use the following code to link the newly created UPI account with your app. This function can be called from anywhere in the application, providing multiple entry points for customers to link their UPI account with your app. + + ```java: Link New UPI Account + razorpay.upiTurbo.tpv + .setcustomerMobile(919900990099) + .setCustomerId(cust_BtQNqzmBlXXXX) + .setOrderId(order_GAWN9beXgaqRyO) + .setTpvBankAccount(bankAccount) + .linkNewUpiAccount(); + ``` + + + + Request Parameters + + + Parameter | Description + --- + `customerMobile` | Mobile number of the customer. + --- + `customer_id` | The CustomerId will be used for fetching the TPV whitelisted bank accounts when the OrderId is not provided. + --- + `order_id` | The OrderId to be used for fetching the TPV whitelisted bank account for the order. + --- + `bankAccount` | This object type `TPVBankAccount` will contain the bank account that the user selected in the onboard flow. + + + + +### Parameter Combinations and Descriptions + + + Parameters | Description + --- + `CustomerId` with TPV bank account | When `linkNewUpiAccount` is called with a `CustomerId`, TPV bank account details must also be included. This links the specific whitelisted account associated with that user. + --- + `OrderId` without TPV bank account | When `linkNewUpiAccount` is called with an `OrderId`, it initiates the TPV process for linking whitelisted accounts. Ensure that TPV bank account details are not provided in this case. + --- + `OrderId` and `CustomerId` | It is not allowed to pass both `OrderId` and `CustomerId` simultaneously in the `linkNewUpiAccount` function. You should choose either of them. + --- + `OrderId` and TPV bank account details | It is not allowed to pass both `OrderId` and TPV bank account details within the `linkNewUpiAccount` function. You should choose either one of them. + --- + TPV bank account without `CustomerId` and `OrderId` | You can provide only the TPVBankAccount without passing the `CustomerId` and `OrderId`. + + + + + + - Initialise the instance to handle the event using the code given below: + + ```java: Instantiate + razorpay.on(Razorpay.EVENT_UPI_TURBO_LINK_NEW_UPI_ACCOUNT, + _handleLinkNewUpiAccountFlows); + ``` + + - Handle dynamic responses to perform specific actions, including error handling and interactions with the integration, based on `type` and `action` properties. + + +> **WARN** +> +> +> **Watch Out!** +> +> It is mandatory to add the import statement within the `linkNewUpiAccount` function for **RazorpayCard** access. +> + + + + ```yml: Attach Event Listeners + import 'package:razorpay_flutter_customui/card.dart' as RazorpayCard; + + void _handleLinkNewUpiAccountFlows(dynamic response) { + if (response["error"] != null) { + Error error = response["error"]; + error.errorCode; + error.errorDescription; + return; + } + + switch (response["action"]) { + case "ASK_FOR_PERMISSION": + razorpay.upiTurbo.askForPermission(); + break; + case "LOADER_DATA": + // Use this trigger to easily show background process happening in the SDK during onboarding + break; + + case "STATUS": + razorpay.upiTurbo.getLinkedUpiAccounts( + customerMobile: mobileNumber, + onSuccess: (List upiAccounts) {}, + onFailure: (Error error) {}, + ); + break; + + case "SELECT_SIM": + List sims = response["data"]; + // Show dialog with a list of sims + razorpay.upiTurbo.register(sim: sims[0]); + break; + + case "SETUP_UPI_PIN": + var card = RazorpayCard.Card( + lastSixDigits: lastSixDigits, + expiryYear: expiryYear, + expiryMonth: expiryMonth, + ); + razorpay.upiTurbo.setupUpiPin(card: card); + break; + default: + // Wrong action message + } + } + ``` + + + + +### 3.4 Submit Method + + + To accept payments, call Custom Checkout’s `submit` method with the following payload: + + ```java: Submit Payment Details + Map payload = { + "key": "[YOUR_KEY_ID]", + "currency": "INR", + "amount": 100, + "contact": "9000090000", + "method": "upi", + "email": "gaurav.kumar@example.com", + "upi": { + "flow": "in_app" + } + }; + + Map turboPayload = { + "upiAccount": getUpiAccountStr(upiAccounts[0]), + "payload": payload, + }; + razorpay.submit(turboPayload); + ``` + + + + Request Parameter + + + Parameter | Description + --- + `turboPayload` | Payload for initiating the transaction. + + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | This function is triggered if the list is fetched successfully. accList can be empty to indicate that no accounts have been linked yet. + --- + `onFailure` | This function is triggered in case an error is thrown during the retrieval process, either by the Razorpay SDK or the Bank SDK. + + + + + + - Initialise the instance to handle the event using the code given below: + + ```java: Instantiate + razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, _handlePaymentSuccess); + razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, _handlePaymentError); + ``` + + - Print payment success and error responses by attaching event listeners to payment events as given below: + + ```yml: Attach Event Listeners + void _handlePaymentSuccess(Map response) { + print('Payment Success Response : $response'); + } + + void _handlePaymentError(Map response) { + print('Payment Error Response : $response'); + } + ``` + + + + + + +### Steps 4: Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + - You need to store these fields in your server. + - You can confirm the authenticity of these details by verifying the signature in the next step. + + ```json: Success Callback + { + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" + } + ``` + + + Parameters + + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + + +### Step 5: Verify Signature + + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + + +### Non-Transactional Flow + +You can directly interact with the exposed methods of the Turbo Framework to perform the non-transactional flows listed below. + + +### Fetch Balance + + Fetch the customer's account balance. Call `getBalance()` on the bank account object received from `upiAccount`. + + + + ```java: Fetch Balance + razorpay.upiTurbo.getBalance(upiAccount: upiAccount, + onSuccess: (AccountBalance accountBalance){ + }, + onFailure: (Error error) { + } + ); + ``` + + + + + Request Parameter + + + Parameter | Description + --- + `upiAccount` | Provides a bank account. + + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | AccountBalance object received in the response. + --- + `onFailure` | This function is triggered in case of an error. An Error object will be received. + + + + + + + +### Change UPI PIN + + Provide the customer with the ability to change their UPI PIN. Call `changeUpiPin()` on the bank account object received from `UpiAccount`. + + + + ```java: Change UPI PIN + razorpay.upiTurbo.changeUpiPin(upiAccount: upiAccount, + onSuccess: (UpiAccount upiAccount){ + }, + onFailure: (Error error) { + } + ); + ``` + + + + + Request Parameter + + + Parameter | Description + --- + `upiAccount` | Provides a bank account. + + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | UpiAccount object received in the response. + --- + `onFailure` | This function is triggered in case of an error. An Error object will be received. + + + + + + + +### Reset UPI + + Let your customers reset the PIN for their account. + + + + ```java: Reset UPI + razorpay.upiTurbo.resetUpiPin(upiAccount: upiAccount, card: card, + onSuccess: (UpiAccount upiAccount){ + }, + onFailure: (Error error) { + } + ); + ``` + + + + + Request Parameters + + + Parameter | Description + --- + `upiAccount` | Provides a bank account. + --- + `card` | Provides a card. + + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | UpiAccount object received in the response. + --- + `onFailure` | This function is triggered in case of an error. An Error object will be received. + + + + + + + +### Delink + + Let your customers delink, that is, remove a selected UPI account from your application. + + + + ```java: Delink + razorpay.upiTurbo.delink(upiAccount: upiAccount, + onSuccess: (Empty empty){ + }, + onFailure: (Error error) { + } + ); + ``` + + + + + Request Parameter + + + Parameter | Description + --- + `upiAccount` | Provides a bank account. + + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | Empty object will be received. + --- + `onFailure` | This function is triggered in case of an error. An Error object will be received. + + + + + + + +### Models Exposed from the SDKs + +The SDKs given below provide access to exposed models for seamless integration. + + +### BankAccount + + + + Fields | Return Type | Description + --- + `maskedAccountNumber` | String | Masked account number. + --- + `beneficiaryName` | String | Name of the account holder. + --- + `type` | String | The account type. Possible values are savings and current. + --- + `bank` | Bank | Bank Object. + + + + +### Bank + + + + Fields | Return Type | Description + --- + `ifsc` | String | IFSC of bank. + --- + `name` | String | Name of bank. + --- + `imageURL` | String | Image URL of bank logo. + --- + `bankPlaceholderUrl` | String | Image URL for bank logo placeholder. + + + + +### AccountBalance + + + + Method | Return Type | Description + --- + `id` | long | Balance Account id. + --- + `balance` | String | Balance amount in paise. + --- + `currency` | String | Currency in INR. + + + + +### Error + + + + Error | Description + --- + `errorCode` | Types of error codes - `BAD_REQUEST_ERROR`: Failure from the client's end (SDK). +- `GATEWAY_ERROR`: Failure either from the Secure Component or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + `errorDescription` | Brief description of the error. + --- + `errorReason` | Specifies the specific reason for the error. + --- + `errorSource` | Indicates the origin of the error. + --- + `errorStep` | Highlights the stage where the error occurred. + + + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/error-codes.md). + + + +### UpiAccount + + + + Method | Return Type | Description + --- + `accountNumber` | String | Masked account number. + --- + `ifsc` | String | IFSC of the bank. + --- + `bankLogoUrl` | String | Image URL of the bank logo. + --- + `bankName` | String | Name of the bank. + --- + `bankPlaceholderUrl` | String | Image URL for bank logo placeholder. + + + + +### SIM + + + + Method | Return Type | Description + --- + `id` | String | SIM id used to target SIM card for binding. + --- + `provider` | String | Network provider name. + --- + `slotNumber` | Integer | SIM slot number. Possible values are `0` and `1`. + --- + `number` | String | Mobile number stored in SIM card. + + + + +### Card + + + + Method | Return Type | Description + --- + `lastSixDigits` | String | Last six digits of the debit card number. + --- + `expiryYear` | String | Expiry year. Format: `YY`. + --- + `expiryMonth` | String | Expiry month. + + + + +### AllBanks + + + + Method | Return Type | Description + --- + `popularBanks` | String | Returns the list of the top 8 banks. + --- + `banks` | String | Returns a list of all banks. + + + + +### TPVBankAccount + + + + Method | Return Type | Description + --- + `accountNumber` | String | Returns the account number. + --- + `ifsc` | String | IFSC of the bank. + --- + `bankName` | String | Name of the bank. + + + +## 2. Test Integration + +We recommend the following: +- Complete the integration on UAT before using the prod builds. +- Perform the UAT using the Razorpay-provided API keys. + +## 3. Go-live Checklist + +Complete these steps to take your integration live: + +- You should get your app id whitelisted by Razorpay to test on prod. + + +> **INFO** +> +> +> **Handy Tips** +> +> Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number and app whitelisted. +> + + +- Import the prod library from the GitHub repository → `https://github.com/upi-turbo/android-turbo-sample-app/tree/prod/app/libs` prod branch. + +- Add Proguard rules: + + - `keepclassmembers,allowobfuscation class * { + @com.google.gson.annotations.SerializedName ; + }` + - `keepclassmembers enum * { *; }` + - `keepclassmembers class * { + @android.webkit.JavascriptInterface ; + }` + - `dontwarn com.razorpay.**` + - `keep class com.razorpay.** {*;}` + - `keep class com.olivelib.** {*;}` + - `keep class com.olive.** {*;}` + - `keep class org.apache.xml.security.** {*;}` + - `keep interface org.apache.xml.security.** {*;}` + - `keep class org.npci.** {*;}` + - `keep interface org.npci.** {*;}` + - `keep class retrofit2.** { *; }` + - `keep class okhttp3.** { *; }` + +- Replace the UAT credential with the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. diff --git a/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/integration-noui.md b/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/integration-noui.md new file mode 100644 index 00000000..94275e02 --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/integration-noui.md @@ -0,0 +1,633 @@ +--- +title: Integrate Turbo UPI Headless +description: Steps to integrate Razorpay Turbo UPI Headless with your app. +--- + +# Integrate Turbo UPI Headless + +--- +title: Integrate Turbo UPI Headless +desc: Steps to integrate Razorpay Turbo UPI Headless with your app. +index: false +--- + +With Razorpay Turbo UPI, businesses experience faster and simpler payments. It condenses the payment process from 5 steps to just 1, eliminating app redirections. Enjoy a seamless in-app payment experience, reduce dependencies on third-party UPI apps, and gain complete visibility of the payment journey. + +> **WARN** +> +> +> +> **Watch Out!** +> +> Currently, Flutter SDK is supported only for Android. +> +> + + +### Prerequisites + + 1. Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number, app, and GitHub account whitelisted to get access to the `https://github.com/upi-turbo/android-turbo-sample-app` - sample app repository. In this repository, you will find the AAR files (libraries for Turbo). The AARs on the main branch are for the UAT environment, and the ones on the prod branch are for the production environment. + + These are the important files in the sample app repo: + - `app/libs`: All libraries (Bank, SecureComponent and Turbo) common for headless SDK. + - `app/build.gradle`: All transitive dependencies needed to integrate Turbo SDK. + + 2. Integrate with [Razorpay Flutter Custom Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/build-integration.md). + + 3. Import the following frameworks: + - Razorpay Turbo Wrapper Plugin SDK (maven) + - Razorpay Turbo Core SDK + - Razorpay SecureComponent SDK + - Bank SDK + + 4. Add the following lines to your Android project's `gradle.properties` file: + - `android.enableJetifier=true` + - `android.useAndroidX=true` + + +> **WARN** +> +> +> **Watch Out!** +> +> Currently, the Flutter SDK is available for Android, while iOS support is under development and will be available soon. +> + + + +## 1. Integration Steps + +1. Use the code given below to initialise the SDK. + + ```yml: Import Package + import 'package:razorpay_flutter/razorpay_flutter.dart'; + // Create a Razorpay instance + razorpay = Razorpay("YOUR_KEY_ID"); + ``` + +2. Use the following code to link the newly created UPI account with your app. This function can be called from anywhere in the application, providing multiple entry points for customers to link their UPI account with your app. + + ```java: Link UPI Account + razorpay.upiTurbo.linkNewUpiAccount("mobileNumber"); + ``` + + + +### Request Parameter + + + Parameter | Description + --- + `mobileNumber` | Mobile number of the customer. + + + + + + - Initialise the instance to handle the event using the code given below: + + ```java: Instantiate + razorpay.on(Razorpay.EVENT_UPI_TURBO_LINK_NEW_UPI_ACCOUNT, + _handleLinkNewUpiAccountFlows); + ``` + + - Handle dynamic responses to perform specific actions, including error handling and interactions with the integration, based on 'type' and 'action' properties. + + +> **WARN** +> +> +> **Watch Out!** +> +> It is mandatory to add the import statement within the `linkNewUpiAccount` function for **RazorpayCard** access. +> + + + + ```yml: Attach Event Listeners + import 'package:razorpay_flutter_customui/card.dart' as RazorPayCard; + + void _handleLinkNewUpiAccountFlows(dynamic response) { + if (response["error"] != null) { + Error error = response["error"]; + error.errorCode; + error.errorDescription; + return; + } + + switch (response["action"]) { + case "ASK_FOR_PERMISSION": + razorpay.upiTurbo.askForPermission(); + break; + case "LOADER_DATA": + / Use this trigger to easily show background process happening in the SDK during onboarding + break; + case "STATUS": + razorpay.upiTurbo.getLinkedUpiAccounts( + customerMobile: mobileNumber, + onSuccess: (List upiAccounts) {}, + onFailure: (Error error) {}, + ); + break; + case "SELECT_SIM": + List sims = response["data"]; + // Show dialog with a list of sims + razorpay.upiTurbo.register(sim: sims[0]); + break; + case "SELECT_BANK": + AllBanks allBank = response["data"]; + List popularBanks = allBank.popularBanks; + List banks = allBank.banks; + + // Show dialog with bank list + razorpay.upiTurbo.getBankAccounts(bank: banks[0]); + break; + case "SELECT_BANK_ACCOUNT": + List bankAccounts = response["data"]; + razorpay.upiTurbo.selectedBankAccount(bankAccount: bankAccounts[0]); + break; + case "SETUP_UPI_PIN": + var card = RazorPayCard.Card( + lastSixDigits: lastSixDigits, + expiryYear: expiryYear, + expiryMonth: expiryMonth, + ); + razorpay.upiTurbo.setupUpiPin(card: card); + break; + default: + // Wrong action message + } + } + ``` + +3. If your customer has already linked the UPI account, use the following code to fetch it. If there are no linked UPI accounts, an empty list is returned. + + ```java: Get Linked UPI Account + razorpay.upiTurbo.getLinkedUpiAccounts(customerMobile: mobileNumber, + onSuccess: (List upiAccounts){ + //Display on boarded UpiAccounts. + }, + onFailure: (Error error) { + //Display error message to user. + } + ); + ``` + + + +### Request Parameter + + + Parameter | Description + --- + `mobileNumber` | Mobile number of the customer. + + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | This function is triggered if the list is fetched successfully. accList can be empty to indicate that no accounts have been linked yet. + --- + `onFailure` | This function is triggered in case an error is thrown during the retrieval process, either by the Razorpay SDK or the Bank SDK. + + + + + +4. To accept payments, call Custom Checkout’s `submit` method with the following payload: + + ```java: Submit Payment Details + Map payload = { + "key": "[YOUR_KEY_ID]", + "currency": "INR", + "amount": 100, + "contact": "9000090000", + "method": "upi", + "email": "gaurav.kumar@example.com", + "upi": { + "flow": "in_app" + } + }; + + Map turboPayload = { + "upiAccount": getUpiAccountStr(upiAccounts[0]), + "payload": payload, + }; + + String getUpiAccountStr(UpiAccount upiAccount) { + return jsonEncode(UpiAccount( + accountNumber: upiAccount.accountNumber, + bankLogoUrl: upiAccount.bankLogoUrl, + bankName: upiAccount.bankName, + bankPlaceholderUrl: upiAccount.bankPlaceholderUrl, + ifsc: upiAccount.ifsc, + pinLength: upiAccount.pinLength, + vpa: upiAccount.vpa, + ).toJson()); + } + + razorpay.submit(turboPayload); + ``` + + + +### Request Parameter + + + Parameter | Description + --- + `turboPayload` | Payload for initiating transaction. + + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | This function is triggered if the list is fetched successfully. accList can be empty to indicate that no accounts have been linked yet. + --- + `onFailure` | This function is triggered in case an error is thrown during the retrieval process, either by the Razorpay SDK or the Bank SDK. + + + + + + - Initialise the instance to handle the event, using the code given below: + + ```java: Instantiate + razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, _handlePaymentSuccess); + razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, _handlePaymentError); + ``` + + - Print payment success and error responses by attaching event listeners to payment events as given below: + + ```yml: Attach Event Listeners + void _handlePaymentSuccess(Map response) { + print('Payment Success Response : $response'); + } + + void _handlePaymentError(Map response) { + print('Payment Error Response : $response'); + } + ``` + +### Non-Transactional Flow + +You can directly interact with the exposed methods of the Turbo Framework to perform the non-transactional flows listed below. + + +### Fetch Balance + + Fetch the customer's account balance. Call `getBalance()` on the bank account object received from `upiAccount`. + + ```java: Fetch Balance + razorpay.upiTurbo.getBalance(upiAccount: upiAccount, + onSuccess: (AccountBalance accountBalance){ + }, + onFailure: (Error error) { + } + ); + ``` + + + + Request Parameter + + + Parameter | Description + --- + `upiAccount` | Provides a bank account. + + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | AccountBalance object received in the response. + --- + `onFailure` | This function is triggered in case of an error. An Error object will be received. + + + + + + + +### Change UPI PIN + + Provide the customer with the ability to change their UPI PIN. Call `changeUpiPin()` on the bank account object received from `UpiAccount`. + + ```java: Change UPI PIN + razorpay.upiTurbo.changeUpiPin(upiAccount: upiAccount, + onSuccess: (UpiAccount upiAccount){ + }, + onFailure: (Error error) { + } + ); + ``` + + + + Request Parameters + + + Parameter | Description + --- + `upiAccount` | Provides a bank account. + + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | UpiAccount object received in the response. + --- + `onFailure` | This function is triggered in case of an error. An Error object will be received. + + + + + + + +### Reset UPI + + Let your customers reset the PIN for their account. + + ```java: Reset UPI + razorpay.upiTurbo.resetUpiPin(upiAccount: upiAccount, card: card, + onSuccess: (UpiAccount upiAccount){ + }, + onFailure: (Error error) { + } + ); + ``` + + + + Request Parameters + + + Parameter | Description + --- + `upiAccount` | Provides a bank account. + --- + `card` | Provides a card. + + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | UpiAccount object received in the response. + --- + `onFailure` | This function is triggered in case of an error. An Error object will be received. + + + + + + + +### Delink + + Let your customers delink, that is, remove a selected UPI account from your application. + + ```java: Delink + razorpay.upiTurbo.delink(upiAccount: upiAccount, + onSuccess: (Empty empty){ + }, + onFailure: (Error error) { + } + ); + ``` + + + + Request Parameter + + + Parameter | Description + --- + `upiAccount` | Provides a bank account. + + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | Empty object will be received. + --- + `onFailure` | This function is triggered in case of an error. An Error object will be received. + + + + + + + +### Models Exposed from the SDKs + +The SDKs given below provide access to exposed models for seamless integration. + + +### BankAccount + + + + Fields | Return Type | Description + --- + `maskedAccountNumber` | String | Masked account number. + --- + `beneficiaryName` | String | Name of the account holder. + --- + `type` | String | The account type. Possible values are savings and current. + --- + `bank` | Bank | Bank Object. + + + + +### Bank + + + + Fields | Return Type | Description + --- + `ifsc` | String | IFSC of bank. + --- + `name` | String | Name of bank. + --- + `imageURL` | String | Image URL of bank logo. + --- + `bankPlaceholderUrl` | String | Image URL for bank logo placeholder. + + + + +### AccountBalance + + + + Method | Return Type | Description + --- + `id` | long | Balance Account id. + --- + `balance` | String | Balance amount in paise. + --- + `currency` | String | Currency in INR. + + + + +### Error + + + + Error | Description + --- + `errorCode` | Types of error codes - `BAD_REQUEST_ERROR`: Failure from the client's end (SDK). +- `GATEWAY_ERROR`: Failure either from the Secure Component or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + `errorDescription` | Brief description of the error. + --- + `errorReason` | Specifies the specific reason for the error. + --- + `errorSource` | Indicates the origin of the error. + --- + `errorStep` | Highlights the stage where the error occurred. + + + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/error-codes.md). + + + +### UpiAccount + + + + Method | Return Type | Description + --- + `accountNumber` | String | Masked account number. + --- + `ifsc` | String | IFSC of the bank. + --- + `bankLogoUrl` | String | Image URL of the bank logo. + --- + `bankName` | String | Name of the bank. + --- + `bankPlaceholderUrl` | String | Image URL for bank logo placeholder. + + + + +### SIM + + + + Method | Return Type | Description + --- + `id` | String | SIM id used to target SIM card for binding. + --- + `provider` | String | Network provider name. + --- + `slotNumber` | Integer | SIM slot number. Possible values are `0` and `1`. + --- + `number` | String | Mobile number stored in SIM card. + + + + +### Card + + + + Method | Return Type | Description + --- + `lastSixDigits` | String | Last six digits of the debit card number. + --- + `expiryYear` | String | Expiry year. Format: `YY`. + --- + `expiryMonth` | String | Expiry month. + + + + +### AllBanks + + + + Method | Return Type | Description + --- + `popularBanks` | String | Returns the list of the top 8 banks. + --- + `banks` | String | Returns a list of all banks. + + + +## 2. Test Integration + +We recommend the following: +- Complete the integration on UAT before using the prod builds. +- Perform the UAT using the Razorpay-provided API keys. + +## 3. Go-live Checklist + +Complete these steps to take your integration live: + +1. You should get your app id whitelisted by Razorpay to test on prod. + + +> **INFO** +> +> +> **Handy Tips** +> +> Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number and app whitelisted. +> + + +1. Import the prod library from the GitHub repository → `https://github.com/upi-turbo/android-turbo-sample-app/tree/prod/app/libs` prod branch. + +1. Add Proguard rules: + + - `keepclassmembers,allowobfuscation class * { + @com.google.gson.annotations.SerializedName ; + }` + - `keepclassmembers enum * { *; }` + - `keepclassmembers class * { + @android.webkit.JavascriptInterface ; + }` + - `dontwarn com.razorpay.**` + - `keep class com.razorpay.** {*;}` + - `keep class com.olivelib.** {*;}` + - `keep class com.olive.** {*;}` + - `keep class org.apache.xml.security.** {*;}` + - `keep interface org.apache.xml.security.** {*;}` + - `keep class org.npci.** {*;}` + - `keep interface org.npci.** {*;}` + - `keep class retrofit2.** { *; }` + - `keep class okhttp3.** { *; }` + +1. Replace the UAT credential with the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. diff --git a/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/integration-ui-tpv.md b/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/integration-ui-tpv.md new file mode 100644 index 00000000..c80b6587 --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/integration-ui-tpv.md @@ -0,0 +1,980 @@ +--- +title: Integrate Turbo UPI UI with TPV +description: Know how Razorpay performs Third-Party Validation (TPV) of investor bank accounts in real-time using Razorpay Turbo UPI with UI. +--- + +# Integrate Turbo UPI UI with TPV + +Third-party validation (TPV) of bank accounts is mandatory for businesses in the BFSI (Banking, Financial Services and Insurance) sector dealing with Securities, Brokering and Mutual Funds. You can accept customer payments by integrating with the Turbo UPI UI with TPV SDK. Know more about [How TPV works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation.md#how-it-works). + + +### Prerequisites + + 1. Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number, app, and GitHub account whitelisted to get access to the `https://github.com/upi-turbo/razorpay-turbo-flutter` - sample app repository. + + 2. Integrate with [Razorpay Flutter Custom Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/build-integration.md). + + 3. Update the `pubspec.yaml` with the following dependencies: + + UAT + ```yml: Dependencies + razorpay_turbo: + git: + url: https://github.com/razorpay/razorpay-flutter-customui.git + ref: feat/customUI-turbo-tpv + + ``` + PROD + ```yml: Dependencies + razorpay_turbo: 1.0.0 + ``` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - `minSDKversion` for using Turbo UPI is currently for Android is 23 and iOS is 12.0 and cannot be overwritten. +> - API Key Usage for Different Environments: +> - Use the `rzp_test_8UzRYt0d70Ntgz` API key id for testing on the UAT environment. +> - Use the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. +> - As a compliance requirement, you need to get approval from Google for **READ_SMS** permission. Refer [to the Google article](https://support.google.com/googleplay/android-developer/answer/10208820?hl=en) for more details. +> +> + + + +## 1. Integration Steps + +Given below are the steps: + + +### Step 1: Whitelist Customer Bank Accounts *(Optional)* + + You can whitelist (also known as allowlist) your customer's bank accounts to ensure that only those accounts are considered during customer onboarding. By whitelisting the accounts at the start, you can avoid the bank account linking during payment. Use the Customer APIs to create customers and add their bank account details. + + For example, if a customer named Gaurav has two bank accounts, ABC and XYZ, you can use the APIs to create a customer id and link the bank accounts to id. You can then pass this customer id during initiating the payment. + + Follow these steps. + + + 1.1: Create a Customer + + Use this endpoint to create or add a customer with basic details such as name and contact details. + + Environment based URLs: + + - UAT: `https://api-web-turbo-upi.ext.dev.razorpay.in` + + - Production: `https://api.razorpay.com` + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST {environment_based_url}/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "Gaurav Kumar", + "contact": "9123456780", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + }' + + ```json: Success + { + "id" : "cust_1Aa00000000004", + "entity": "customer", + "name" : "Gaurav Kumar", + "email" : "gaurav.kumar@example.com", + "contact" : "9123456780", + "gstin": null, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at ": 1234567890 + } + + ```json: Failure + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } + } + ``` + + + + Request Parameters + + +`name` _optional_ +: `string` Customer's name. Alphanumeric value with period (.), apostrophe ('), forward slash (/), at (@) and parentheses are allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact ` _optional_ +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email ` _optional_ +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`fail_existing` _optional_ +: `string` Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + +`gstin` _optional_ +: `string` Customer's GST number, if available. For example, `29XAbbA4369J1PA`. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + + +### Response Parameters + + +`id` +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`name` +: `string` Customer's name. Alphanumeric, with period (.), apostrophe ('), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact` +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email` +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`gstin` +: `string` GST number linked to the customer. For example, `29XAbbA4369J1PA`. + +`notes` +: `json object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + + + + + + + +### 1.2: Add Customer's Bank Account + + The following endpoint adds the customer's bank accounts. + + Environment based URLs: + + - UAT: `https://api-web-turbo-upi.ext.dev.razorpay.in` + + - Production: `https://api.razorpay.com` + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST {environment_based_url}/v1/customers/:customer_id/bank_account \ + -H "Content-Type: application/json" \ + -d '{ + "ifsc_code": "UTIB0000194", + "account_number": "11214311215411", + "beneficiary_name": "Gaurav", + "beneficiary_address1": "address 1", + "beneficiary_address2": "address 2", + "beneficiary_address3": "address 3", + "beneficiary_address4": "address 4", + "beneficiary_email": "gaurav.kumar@gmail.com", + "beneficiary_mobile": "9900990099", + "beneficiary_city": "Bangalore", + "beneficiary_state": "KA", + "beneficiary_country": "IN" + }' + + ```json: Success + { + "id": "ba_LSZht1Cm7xFTwF", + "entity": "bank_account", + "ifsc": "ICIC0001207", + "bank_name": "ICICI Bank", + "name": "Gaurav Kumar", + "notes": [], + "account_number": "XXXXXXXXXXXXXXX0434" + } + ``` + + + + Path Parameter + +`customer_id` _mandatory_ +: `string` Customer id of the customer whose bank account is to be added. + + + + +### Request Parameters + + +`account_number` _mandatory_ +: `string` Customer's bank account number. For example, `11214311215411`. + +`beneficiary_name` _mandatory_ +: `string` The name of the beneficiary associated with the bank account. + +`beneficiary_address1` _optional_ +: `string` The virtual payment address. + +`beneficiary_email` _optional_ +: `string` Email address of the beneficiary. For example, `gaurav.kumar@example.com`. + +`beneficiary_mobile` _optional_ +: `string` Mobile number of the beneficiary. + +`beneficiary_city` _optional_ +: `string` The city of the beneficiary. + +`beneficiary_state` _optional_ +: `string` The state of the beneficiary. + +`beneficiary_country` _optional_ +: `string` The country of the beneficiary. + +`beneficiary_pin` _optional_ +: `integer` The pin code of the beneficiary's address. + +`ifsc_code` _mandatory_ +: `string` The IFSC of the bank branch associated with the account. + + + +### Response Parameters + +`bank_accounts` +: `array` An array containing bank account details. + + `id` + : `string` Unique identifier of the bank account. + + `entity` + : `string` The type of entity, which in this case is `bank_account`. + + `ifsc` + : `string` The IFSC of the bank branch associated with the account. + + `bank_name` + : `string` The name of the bank. + + `name` + : `string` The name associated with the bank account. + + `notes` + : `object` Set of key-value pairs that can be used to store additional information about the payment. + + `account_number` + : `integer` Customer's bank account number. For example, `11214311215411`. + + + + + + + + + + +### Step 2: Create an Order *(Mandatory)* + + Pass the investor bank account details to the `bank_account` array of the Orders API. Given below is the sample code when the `method` is `upi`. + + Environment based URLs: + + - UAT: `https://api-web-turbo-upi.ext.dev.razorpay.in` + + - Production: `https://api.razorpay.com` + + ```curl: Request + curl -u : \ + -X POST {environment_based_url}/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 500, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }' + + ```json: Response + { + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 500, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 + } + ``` + + + Request Parameters + + `amount` _mandatory_ +: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, the value of this field should be `100`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. You can create orders in **INR** only. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`method` _mandatory_ +: `string` The payment method used to make the payment. If this parameter is not passed, investors will be able to make payments using both netbanking and UPI payment methods. Possible values: + - `netbanking`: Investors can make payments only using netbanking. + - `card`: Investors can make payments using debit card. + - `upi`: Investors can make payments only using UPI. + +`bank_account` _mandatory_ +: `object` Details of the bank account that the investor has provided at the time of registration. + + `account_number` _mandatory_ + : `string` The bank account number from which the investor should make the payment. For example, `765432123456789` Payments will not be processed for an incorrect account number. + + `name` _mandatory_ + : `string` The name linked to the bank account. For example, `Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` The bank IFSC. For example, `HDFC0000053`. + + + +### Response Parameters + + `id` +: `string` Unique identifier of the order. + +`entity` +: `string` Indicates the type of entity. Here, it is `order`. + +`amount` +: `integer` The order amount represented in the smallest unit of the currency passed. For example, amount = 100 translates to 100 paise, that is ₹1 (default currency is INR). + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we support INR only. + +`receipt` +: `string` A unique identifier of the order entered by the user. For example, `BILL13375649`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, "note_key": "Beam me up Scotty”. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`offer_id` +: `string` Unique identifier of the offer. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + + + + + + + + +### Step 3: Turbo UPI with UI SDK Action + + You need to link the customer's UPI account with your app. Use the code samples given below to fetch the UPI account. + + + + 3.1 Initialise the SDK + + + Use the following code snippet to initialise the SDK. + + ```yml: Import Package + import 'package:razorpay_flutter/razorpay_flutter.dart'; + // Create a Razorpay instance + razorpay = Platform.isAndroid ? Razorpay("YOUR_KEY_ID") :Razorpay.initWith("YOUR_KEY_ID",true); + + ``` + + + +### 3.2 Create a Session Token + + + To enhance security, you must create a session token via a server-to-server (S2S) call between your backend and Razorpay's backend. This session token ensures secure communication between the Turbo SDK and Razorpay's systems. + + #### How to Create a Session Token + + 1. Trigger the S2S API from your Backend. Use the following API to generate a session token: + + Environment based URLs: + + - UAT: `https://api-web-turbo-upi.ext.dev.razorpay.in` + + - Production: `https://api.razorpay.com` + + Authorization Header Creation: `Base64.encode(${public_key}:${secret})` + + + ```curl: Curl + curl -X POST '{environment_based_url}/v1/upi/turbo/customer/session' \ + -H "Authorization: Basic {Base64 of public key and secret}" \ + -H "Content-type: application/json" \ + -d '{ + "customer_reference": "CUSTOMER_ID/CUSTOMER_MOBILE" + }' + + ``` curl: Success + { + "token": "session_token", + "expire_at": 1730097636 + } + ``` curl: Failure + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "customer_reference is required", + "source": "customer", + "step": "CreateSession", + "reason": "customer_reference_field_is_missing", + "metadata": {} + } + } + ``` + + + + + Request Parameters + + + Parameter | Description + --- + `customer_reference` _mandatory_ | `string` A unique identifier for the customer provided by the business. The recommended value is mobile number. For example, `9000090000`. + + + + +### Response Parameters + + + Parameter | Description + --- + `token` | `string` A session token to be used in subsequent session-protected APIs. + --- + `expire_at` | `long` Expiry time (in seconds) for the session token, used to optimise session handling and reduce unnecessary reinitialisations. + --- + `error` | `object` The request failure due to business or technical failure. + + + + + + 2. Create/Retry Session Token Mechanism + + To ensure a smooth experience during token expiry, the Turbo SDK provides the `updateSessionToken` method. This method dynamically fetches and updates the session token without reinitialising the session. + + This allows you to seamlessly refresh the session by retrieving a new token via a server-to-server (S2S) call. + + Below is an example of using `updateSessionToken` + + - Initialise the instance to handle the event using the code given below: + + ```java: dart + razorpay.on(Razorpay.EVENT_FETCH_SESSION_TOKEN, + _handleRefreshToken); + ``` + + ```java: dart + void _handleRefreshToken(dynamic response) async { + // API Call to generate token + razorpay.upiTurbo.updateSessionToken(token: ‘GENERATED_TOKEN’); + }; + ``` + + + + + +### 3.3 Link New UPI Account + + + Use the following code to link the newly created UPI account with your app. This function can be called from anywhere in the application, providing multiple entry points for customers to link their UPI account with your app. + + ```java: dart + razorpay.upiTurbo.tpv + .setcustomerMobile('YOUR_MOBILE_NUMBER') + .setCustomerId('YOUR_CUSTOMER_ID') + .setOrderId('YOUR_ORDER_ID') + .setTpvBankAccount('TPV_BANK_ACCOUNT') + .linkNewUpiAccount(); + ``` + + + + Request Parameters + + + Parameter | Description + --- + `customerMobile` | Mobile number of the customer. + --- + `customer_id` | The CustomerId will be used for fetching the TPV whitelisted bank accounts when the OrderId is not provided. + --- + `order_id` | The OrderId to be used for fetching the TPV whitelisted bank account for the order. + --- + `bankAccount` | This object type `TPVBankAccount` will contain the bank account that the user selected in the onboard flow. + + + + +### Parameter Combinations and Descriptions + + + Parameters | Description + --- + `CustomerId` with TPV bank account | When `linkNewUpiAccount` is called with a `CustomerId`, TPV bank account details must also be included. This links the specific whitelisted account associated with that user. + --- + `OrderId` without TPV bank account | When `linkNewUpiAccount` is called with an `OrderId`, it initiates the TPV process for linking whitelisted accounts. Ensure that TPV bank account details are not provided in this case. + --- + `OrderId` and `CustomerId` | It is not allowed to pass both `OrderId` and `CustomerId` simultaneously in the `linkNewUpiAccount` function. You should choose either of them. + --- + `OrderId` and TPV bank account details | It is not allowed to pass both `OrderId` and TPV bank account details within the `linkNewUpiAccount` function. You should choose either one of them. + --- + TPV bank account without `CustomerId` and `OrderId` | You cannot provide the TPVBankAccount without `CustomerId`. + + + + + + - Initialise the instance to handle the event using the code given below: + + ```java: dart + razorpay.on(Razorpay.EVENT_UPI_TURBO_LINK_NEW_UPI_TPV_ACCOUNT, + _handleLinkNewTPVAccountReponse); + ``` + + - Handle dynamic responses to perform specific actions, including error handling and interactions with the integration. + + + ```yml: dart + void _handleLinkNewTPVAccountReponse(dynamic response) { + if (response["error"] != null) { + Error error = response["error"]; + // Handle error + return; + } + + List upiAccounts = response["data"]; + // Handle the data + } + ``` + + + + +### 3.4 Submit Method + + + To accept payments, call Custom Checkout’s `submit` method with the following payload: + + ```java: dart + Map payload = { + "key": "[YOUR_KEY_ID]", + "order_id": "[YOUR_ORDER_ID]" + "currency": "INR", + "amount": 100, + "contact": "9000090000", + "method": "upi", + "email": "gaurav.kumar@example.com", + "upi": { + "flow": "in_app" + } + }; + + Map turboPayload = { + "upiAccount": getUpiAccountStr(upiAccounts[0]), + "payload": payload, + }; + razorpay.submit(turboPayload); + ``` + + + + Request Parameter + + + Parameter | Description + --- + `turboPayload` | Payload for initiating the transaction. + + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | This function is triggered if the list is fetched successfully. accList can be empty to indicate that no accounts have been linked yet. + --- + `onFailure` | This function is triggered in case an error is thrown during the retrieval process, either by the Razorpay SDK or the Bank SDK. + + + + + + - Initialise the instance to handle the event using the code given below: + + ```java: dart + razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, _handlePaymentSuccess); + razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, _handlePaymentError); + ``` + + - Print payment success and error responses by attaching event listeners to payment events as given below: + + ```yml: dart + void _handlePaymentSuccess(Map response) { + print('Payment Success'); + } + + void _handlePaymentError(Map response) { + print('Payment Failure'); + } + ``` + + + + + + +### Steps 4: Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + - You need to store these fields in your server. + - You can confirm the authenticity of these details by verifying the signature in the next step. + + ```json: Success Callback + { + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" + } + ``` + + + Response Parameters + + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + + +### Step 5: Verify Signature + + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + + +### Get Linked Accounts +If your customer has already linked the UPI account, use the following code to fetch it. If there are no linked UPI accounts, an empty list is returned + +```java: dart + razorpay.upiTurbo.getLinkedUpiAccounts(customerMobile: mobileNumber, + onSuccess: (List upiAccounts){ + //Display on boarded UpiAccounts. + }, + onFailure: (Error error) { + //Display error message to user. + } +); + ``` + +### Non-Transactional Flow + +You can directly interact with the exposed methods of the Turbo Framework to perform the non-transactional flows listed below. + + +### Manage UPI Accounts + + Let Razorpay SDK manage the linked UpiAccounts on the applications by triggering `manageUpiAccounts()`. + + ```java: dart + razorpay.upiTurbo.manageUpiAccounts( + customerMobile: turboUPIModel?.mobileNumber, + onFailure: (Error error) {}); + ``` + + +### Models Exposed from the SDKs + +The SDKs provide access to exposed models for seamless integration. + + +### BankAccount + + + + Fields | Return Type | Description + --- + `maskedAccountNumber` | String | Masked account number. + --- + `beneficiaryName` | String | Name of the account holder. + --- + `type` | String | The account type. Possible values are savings and current. + --- + `bank` | Bank | Bank Object. + + + + +### Bank + + + + Fields | Return Type | Description + --- + `ifsc` | String | IFSC of bank. + --- + `name` | String | Name of bank. + --- + `imageURL` | String | Image URL of bank logo. + --- + `bankPlaceholderUrl` | String | Image URL for bank logo placeholder. + + + + +### Error + + + + Error | Description + --- + `errorCode` | Types of error codes - `BAD_REQUEST_ERROR`: Failure from the client's end (SDK). +- `GATEWAY_ERROR`: Failure either from the Secure Component or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + `errorDescription` | Brief description of the error. + --- + `errorReason` | Specifies the specific reason for the error. + --- + `errorSource` | Indicates the origin of the error. + --- + `errorStep` | Highlights the stage where the error occurred. + + + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/payment-methods/turbo-upi/error-codes.md). + + + +### UpiAccount + + + + Method | Return Type | Description + --- + `accountNumber` | String | Masked account number. + --- + `ifsc` | String | IFSC of the bank. + --- + `bankLogoUrl` | String | Image URL of the bank logo. + --- + `bankName` | String | Name of the bank. + --- + `bankPlaceholderUrl` | String | Image URL for bank logo placeholder. + + + + +### TPVBankAccount + + + + Method | Return Type | Description + --- + `accountNumber` | String | Returns the account number. + --- + `ifsc` | String | IFSC of the bank. + --- + `bankName` | String | Name of the bank. + + + +## 2. Test Integration + +We recommend the following: +- Complete the integration on UAT before using the prod builds. +- Perform the UAT testing using the Razorpay-provided API keys. + +## 3. Go-live Checklist + +Complete these steps to take your integration live: + +- You should get your app id whitelisted by Razorpay to test on prod. + + +> **INFO** +> +> +> **Handy Tips** +> +> Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number and app whitelisted. +> + +- Replace the UAT credential with the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. diff --git a/llm-content/payments/payment-gateway/flutter-integration/custom/test-integration.md b/llm-content/payments/payment-gateway/flutter-integration/custom/test-integration.md new file mode 100644 index 00000000..09fe742a --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/custom/test-integration.md @@ -0,0 +1,137 @@ +--- +title: 2. Test Integration +description: Steps to test if the custom Flutter integration was successful. +--- + +# 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## Next Steps + +[Step 3: Go-live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/custom/go-live-checklist.md) diff --git a/llm-content/payments/payment-gateway/flutter-integration/custom/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/flutter-integration/custom/troubleshooting-faqs.md new file mode 100644 index 00000000..eb89844c --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/custom/troubleshooting-faqs.md @@ -0,0 +1,61 @@ +--- +title: Troubleshooting & FAQs +description: Troubleshoot common error scenarios and find answers to frequently asked questions. +--- + +# Troubleshooting & FAQs + +#### 1. What is an order id, and how to generate it? + +Order creation is the primary step of the Razorpay payment flow. An Order creates when a customer clicks the pay button on your app. A corresponding order_id generates in the response. Pass this order_id to the Razorpay Checkout options added in your Capacitor app. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### 2. What is the process for raising a request for a new feature? + +To raise a request for a new feature, go to **New Issue** → **Feature Request** on our [GitHub repository](https://github.com/razorpay/razorpay-cordova/issues/new/choose). + +#### 3. How can I update the existing **'razorpay-pod'**? + +- Go to your project's **iOS** folder and run **'pod update'** to update all the pods. + +- If you do not want to update all pods, run **'pod update razorpay-pod'** + +#### 4. I have integrated with the Razorpay Payment Gateway to accept payments on my mobile app. However, it gets rejected when I publish my app on the Apple App Store. The following message is displayed, "We noticed that your app offers a subscription with a mechanism other than the in-app purchase API." How to resolve this? + +- **Cause**: As per Apple's policy, if you use a subscription model in your iOS app, you must use Apple's in-app purchase APIs. Apple does not redirect out of the app for digital product purchases. +- **Resolution**: Use Apple's in-app purchase APIs. + +#### 5. In the new M1 MacBook, why am I not able to compile the Flutter Razorpay plugin for release mode? + +This is because of the new changes introduced in Xcode 12. + +To resolve this: +1. Use [Rosetta 2](https://support.apple.com/en-us/HT211861) for launching the app on your Mac. +2. Add the following lines to Podfile within `post_install do |installer|` . + +```js: podfile +installer.pods_project.build_configurations.each do |config| + config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" +end +``` + +Know more about [compilation errors](https://khushwanttanwar.medium.com/xcode-12-compilation-errors-while-running-with-ios-14-simulators-5731c91326e9). + +#### 6. How can I check the Razorpay Flutter Custom SDK version? + +To check the SDK version: +1. Open your Flutter project in your preferred code editor. +2. Open the `pubspec.yaml` file in the root directory of your project. +3. In the `dependencies` section, look for the Razorpay entry. The version number is specified next to the package name in the format `x.y.z`. + +#### 7. How can I update the Razorpay Flutter Custom SDK version? + +To update the SDK version, follow these steps: + +1. Open the terminal or command prompt and navigate to your project directory where the `package.json` file resides. +2. Use the following command to update the dependencies listed in your pubspec.yaml file to their latest compatible versions. + ```java: Update SDK + dart pub upgrade + ``` +3. If you are using a Flutter iOS application, run `cd ios && pod repo update && pod update` to ensure the internal iOS dependencies are updated to the versions set by the Razorpay package. This is because cocoapods may not automatically update the internal trunk spec to fetch the latest versions. +4. After running the update command, review the updates fetched by npm to ensure they do not introduce any breaking changes. +5. Conduct thorough testing to ensure that the updated packages do not adversely affect the application functionality and commit the changes. diff --git a/llm-content/payments/payment-gateway/flutter-integration/standard.md b/llm-content/payments/payment-gateway/flutter-integration/standard.md new file mode 100644 index 00000000..60a8ac99 --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/standard.md @@ -0,0 +1,45 @@ +--- +title: Prerequisites | Razorpay Flutter Standard SDK +heading: Prerequisites +description: Check the prerequisites before you integrate Razorpay Flutter Standard plugin with our native Android and iOS SDKs. +--- + +# Prerequisites + +- **Flutter Standard SDK Changelog**: Discover new features, updates and deprecations related to the Razorpay Flutter Standard SDK (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about Flutter Standard integration. + +The Razorpay Flutter plugin acts as a wrapper around our native Android and iOS SDKs. + +> **SUCCESS** +> +> +> **Update SDK** +> +> Check your [current SDK version](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/standard/troubleshooting-faqs.md#6-how-can-i-check-the-razorpay-flutter). If it is outdated, please [update the SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/standard/troubleshooting-faqs.md#7-how-can-i-update-the-razorpay-flutter) to ensure uninterrupted settlements of your funds. +> + +## Integration Steps + +**Before you proceed:** + + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +Follow these integration steps: + + - **1. Build Integration**: Integrate Flutter Standard SDK. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + + - **Sample App**: Check the sample app to integrate on GitHub. + +### Related Information + +- [Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/standard/troubleshooting-faqs.md) +- [Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/flutter-integration/standard/integration-steps.md b/llm-content/payments/payment-gateway/flutter-integration/standard/integration-steps.md new file mode 100644 index 00000000..6d899e64 --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/standard/integration-steps.md @@ -0,0 +1,1116 @@ +--- +title: Flutter SDK - Integration Steps | Razorpay Payment Gateway +heading: Integration Steps +description: Steps to integrate the Flutter application with Razorpay Payment Gateway. +--- + +# Integration Steps + +Follow these steps to integrate your Flutter application: + + - **1. Build Integration**: Integrate Flutter Standard Checkout. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/pakLL37M6KI] + +> **INFO** +> +> +> **Handy Tips** +> +> After you complete the integration: +> +> - Set up webhooks +> - Make test payments +> - Replace Test API keys with Live API keys +> - Integrate with other APIs + +> Refer to the [post-integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/standard/integration-steps.md#2-test-integration). +> + +> **WARN** +> +> +> **Watch Out!** +> +> If you use M1 MacBook, you need to make [these changes](#m1-macbook-changes) in your `podfile`. +> + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Install Razorpay Flutter Plugin + + [Download the plugin](https://pub.dev/packages/razorpay_flutter) from Pub.dev. + + Add the below code to `dependencies` in your app's `pubspec.yaml` + + ```yml: Add Dependencies + razorpay_flutter: 1.4.0 + ``` + + + + Add Proguard Rules (Android Only) + + If you are using Proguard for your builds, you need to add the following lines to the Proguard files: + + ```java: Add Proguard Rules + -keepattributes *Annotation* + -dontwarn com.razorpay.** + -keep class com.razorpay.** {*;} + -optimizations !method/inlining/ + -keepclasseswithmembers class * { + public void onPayment*(...); + } + ``` + + Know more about [Proguard rules](https://github.com/razorpay/razorpay-flutter/issues/42#issuecomment-550161626). + + + +### Get Packages + + Run `flutter packages get` in the root directory of your app. + + +> **INFO** +> +> +> **Minimum Version Requirement** +> +> - For **Android**, ensure that the minimum API level for your app is 19 or higher. +> - For **iOS**, ensure that the minimum deployment target for your app is iOS 10.0 or higher. Also, do not forget to enable bitcode for your project. +> + + + + + + + +### 1.2 Import Package and Create Razorpay Instance + + Use the below code to import the `razorpay_flutter.dart` file to your project. + + ```yml: Import Package + import 'package:razorpay_flutter/razorpay_flutter.dart'; + ``` + + Use the below code to create a Razorpay instance. + + ```yml: Instantiate + _razorpay = Razorpay(); + ``` + + + +### 1.3 Attach Event Listeners + + The plugin uses event-based communication and emits events when payments fail or succeed. + + The event names are exposed via the constants `EVENT_PAYMENT_SUCCESS`, `EVENT_PAYMENT_ERROR` and `EVENT_EXTERNAL_WALLET` from the `Razorpay` class. + + Use the `on(String event, Function handler)` method on the `Razorpay` instance to attach event listeners. + + ```yml: Attach Event Listeners + _razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, _handlePaymentSuccess); + _razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, _handlePaymentError); + _razorpay.on(Razorpay.EVENT_EXTERNAL_WALLET, _handleExternalWallet); + ``` + + The handlers would be defined in the class as: + + ```yml: Handlers + void _handlePaymentSuccess(PaymentSuccessResponse response) { + // Do something when payment succeeds + } + + void _handlePaymentError(PaymentFailureResponse response) { + // Do something when payment fails + } + + void _handleExternalWallet(ExternalWalletResponse response) { + // Do something when an external wallet is selected + } + ``` + + To clear event listeners, use the `clear` method on the `Razorpay` instance. + + ```yml: Clear Event Listeners + _razorpay.clear(); // Removes all listeners + ``` + + + +### 1.4 Create an Order in Server + + **Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order using: + + + Use this endpoint to create an order using the Orders API. + + /orders + + ```curl: Curl + curl -X POST https://api.razorpay.com/v1/orders + -U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -H 'content-type:application/json' + -d '{ + "amount": 50000, + "currency": "", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230 + }' + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", ""); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + DATA = { + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } + } + client.order.create(data=DATA) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('receipt' => '123', 'amount' => 50000, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + ```csharp: .NET + RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.add("receipt", "order_rcptid_11"); + options.add("currency", ""); + Order order = client.Order.Create(options); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + options = amount: 50000, currency: '', receipt: '' + order = Razorpay::Order.create + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "", + receipt: "receipt#1", + notes: { + key1: "value3", + key2: "value2" + } + }) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "", + "receipt": "some_receipt_id" + } + body, err := client.Order.Create(data) + ``` + + ```json: Success Response + { + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 + } + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + + You can use the Postman workspace below to create an order: + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + + You can create an order manually by integrating the API sample codes on your server. + + + + Request Parameters + + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `22225`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of ₹7,000 is to be received from the customer in two installments of #1 - ₹5,000, #2 - ₹2,000, then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + + +### 1.5 Add Checkout Options + + Pass the Checkout options. Ensure that you pass the `order_id` that you received in the response of the previous step. + + ```yml: Checkout Options + var options = { + 'key': '', + 'amount': 50000, + 'currency': '', + 'name': 'Acme Corp.', + 'order_id': 'order_EMBFqjDHEEn80l', // Generate order_id using Orders API + 'description': 'Fine T-Shirt', + 'timeout': 60, // in seconds + 'prefill': { + 'contact': '', + 'email': '' + } + }; + ``` + + + Checkout Options + + You must pass these parameters in Checkout to initiate the payment. + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + + + + +### 1.5.1 Enable UPI Intent on iOS *(Optional)* + + Provide your customers with a better payment experience by enabling UPI Intent on your app's Checkout form. In the UPI Intent flow: +1. Customer selects UPI as the payment method in your iOS app. A list of UPI apps supporting the intent flow is displayed. For example, PhonePe, Google Pay and Paytm. +2. Customer selects the preferred app. The UPI app opens with pre-populated payment details. +3. Customer enters their UPI PIN to complete their transactions. +4. Once the payment is successful, the customer is redirected to your app or website. + +To enable this in your iOS integration, you must make the following changes in your app's info.plist file. + +```xml: info.plist +LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + +``` + +Know more about [UPI Intent and its benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). + +### UPI Intent on Recurring Payments + +Configure and initiate a recurring payment transaction on UPI Intent: + +```swift: ViewController.swift +let options: [String:Any] = [ + "key": "YOUR_KEY_ID", + "order_id": "order_DBJOWzybfXXXX", + "customer_id": "cust_BtQNqzmBlXXXX", + "prefill": [ + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + ], + "image": "https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + "amount": 10000, // Amount should match the order amount + "currency": "INR", + "recurring": 1 // This key value pair is mandatory for Intent Recurring Payment. +] +```objectivec: ViewController.m +NSDictionary *options = @{ + @"key": @"YOUR_KEY_ID", + @"order_id": @"order_DBJOWzybfXXXX", + @"customer_id": @"cust_BtQNqzmBlXXXX", + @"prefill": @{ + @"contact": @"+919000090000", + @"email": @"gaurav.kumar@example.com" + }, + @"image": @"https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + @"amount": @(10000), // Amount should match the order amount + @"currency": @"INR", + @"recurring": @(1) // This key value pair is mandatory for Intent Recurring Payment. +}; +``` + + + + + + + + + +### 1.6 Open Checkout + + Use the below code to open the Razorpay checkout. + + ```yml: Open Razorpay Checkout + _razorpay.open(options); + ``` + + + +### 1.7 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.8 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + +### M1 MacBook Changes + + If you use M1 MacBook, you need to make the following changes in your podfile. + + +> **INFO** +> +> +> **Handy Tips** +> +> Add the following code inside `post_install do |installer|`. +> + + ```js: podfile + installer.pods_project.build_configurations.each do |config| + config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" + end + ``` + + + + + + +### 1.9 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +## 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## 3. Go-live Checklist + +Check the go-live checklist for Razorpay Flutter integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/payment-gateway/flutter-integration/standard/payment-methods/api.md b/llm-content/payments/payment-gateway/flutter-integration/standard/payment-methods/api.md new file mode 100644 index 00000000..cfb5a065 --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/standard/payment-methods/api.md @@ -0,0 +1,85 @@ +--- +title: API Classes and Methods +description: API classes and methods available for the Flutter plugin. +--- + +# API Classes and Methods + +Documented below is the API package for the plugin. + +## Razorpay Class + +### Method + +`open(map options)` +: Opens the checkout. + +`on(String eventName, Function listener)` +: Registers event listeners for payment events.- `eventName`: The name of the event. +- `listener`: The function to be called. The listener should accept a single argument of the following type: [PaymentSuccessResponse](#paymentsuccessresponse) for EVENT_PAYMENT_SUCCESS. +- [PaymentFailureResponse](#paymentfailureresponse) for EVENT_PAYMENT_FAILURE. +- [ExternalWalletResponse](#externalwalletresponse) for EVENT_EXTERNAL_WALLET. + + +`clear()` +: Clears all listeners. + +> **INFO** +> +> +> **Handy Tips** +> +> The `options` map has `key` as a required property in the open checkout method. All other properties are optional. Know about all the [options available on checkout form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/standard/integration-steps.md#17-add-checkout-options). +> + +### Event Names + +The event names have been exposed as `strings` by the `Razorpay` class. + +Event Name | Description +--- +EVENT_PAYMENT_SUCCESS | The payment was successful. +--- +EVENT_PAYMENT_ERROR | The payment was not successful. +--- +EVENT_EXTERNAL_WALLET | An external wallet was selected. + +#### PaymentSuccessResponse + +Field Name | Data Type | Description +--- +`paymentId` | `string` | The ID for the payment. +--- +`orderId` | `string` | The order ID if the payment was for an order, otherwise `null`. +--- +`signature` | `string` | The signature to be used for payment verification. Only valid for orders, otherwise `null`. + +#### PaymentFailureResponse + +Field Name | Data Type | Description +--- +`code` | `integer` | The [error code](#error-codes). +--- +`message` | `string` | The [error message](#error-codes). + +#### ExternalWalletResponse + +Field Name | Data Type | Description +--- +`walletName` | `string` | The name of the external wallet selected. + +## Error Codes + +The error codes are exposed as integers by the `Razorpay` class. The error code is available as the code field of the `PaymentFailureResponse` instance passed to the callback. + +Error Code | Description +--- +NETWORK_ERROR | There was a network error. For example, loss of internet connectivity. +--- +INVALID_OPTIONS | An issue with options passed in `Razorpay.open`. +--- +PAYMENT_CANCELLED | User cancelled the payment. +--- +TLS_ERROR | Device does not support TLS v1.1 or TLS v1.2. +--- +UNKNOWN_ERROR | An unknown error occurred. diff --git a/llm-content/payments/payment-gateway/flutter-integration/standard/payment-methods/integration-tpv.md b/llm-content/payments/payment-gateway/flutter-integration/standard/payment-methods/integration-tpv.md new file mode 100644 index 00000000..888f44f1 --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/standard/payment-methods/integration-tpv.md @@ -0,0 +1,792 @@ +--- +title: Integrate Turbo UPI TPV +description: Know how Razorpay performs Third-Party Validation (TPV) of investor bank accounts in real-time using Razorpay Turbo UPI. +--- + +# Integrate Turbo UPI TPV + +Third-party validation (TPV) of bank accounts is mandatory for businesses in the BFSI (Banking, Financial Services and Insurance) sector dealing with Securities, Broking and Mutual Funds. You can accept customer payments by integrating with the Turbo UPI - TPV SDK. + +> **WARN** +> +> +> +> **Watch Out!** +> +> Currently, Flutter SDK is supported only for Android. +> +> + + +### Prerequisites + + 1. Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number, app, and GitHub account whitelisted to get access to the `https://github.com/upi-turbo/android-turbo-sample-app` - sample app repository. You will find the AAR files (libraries for Turbo) in this repository. The AARs on the main branch are for the UAT environment, and the ones on the prod branch are for the production environment. + + These are the important files in the sample app repo: + - `android/app/libs`: All libraries (Bank, SecureComponent and Turbo) common for headless SDK. Know more about [Library Dependencies](#library-dependencies). + - `android/app/uiLibrary`: Library for Turbo UI SDK. + - `android/app/build.gradle`: All transitive dependencies needed to integrate the Turbo SDK. + + 2. Integrate with [Razorpay Flutter Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/standard/integration-steps.md). + + 3. Import the following frameworks: + - Razorpay Android Standard SDK + - Razorpay Turbo Wrapper Plugin SDK (maven) + - Razorpay Turbo Core SDK + - Razorpay Turbo UI SDK + - Razorpay SecureComponent SDK + - Bank SDK + + 4. Add the following lines to your Android project's `gradle.properties` file: + - `android.enableJetifier=true` + - `android.useAndroidX=true` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - `minSDKversion` for using Turbo UPI is currently 19 and cannot be overwritten. +> - Use the `rzp_test_0wFRWIZnH65uny` API key id for testing on the UAT environment and the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. +> - As a compliance requirement, you should get approval from Google for **READ_SMS** permission. Refer [to the Google article](https://support.google.com/googleplay/android-developer/answer/10208820?hl=en) for more details. +> + + + + +### Library Dependencies + + Integrating library files is necessary to proceed with Turbo integration. Follow these steps to integrate library dependencies: + + 1. Navigate to your Flutter project's directory and locate the `android` folder. Find the `src` folder inside `android` and create a new `libs` folder. + + 2. Copy all your library files into the newly created `libs` folder. + + 3. Open the `build.gradle` file in the **app** directory of your Flutter project. Add an implementation reference to the library files you added in the `libs` folder. + + ``` java: Java + implementation fileTree(include: ['*.aar'], dir: 'libs') + ``` + + 4. Update the dependencies section in your project's `pubspec.yaml` file to include the libraries you added. Ensure the references point to the correct location, usually `master`. + + ```yml: + razorpay_flutter: + git: + url: https://github.com/razorpay/razorpay-flutter.git + ref: master # branch name + ``` + + 5. Run `flutter pub get` in your terminal to ensure the dependencies are properly resolved and downloaded. + + 6. Navigate to the `build.gradle` file in the `android` directory of the `razorpay-flutter` plugin module. Add a `compile only` statement to include the necessary libraries for compilation. + + ```yml: + compileOnly fileTree(include: ['*.aar'], dir: '/.../razorpay-turbo-flutter/android/app/libs') // Add absolute path of libs folder + ``` + + +## 1. Integration Steps + +Given below are the steps: + + +### Step 1: Whitelist Customer Bank Accounts *(Optional)* + + You can whitelist (also known as allowlist) your customer's bank accounts to ensure that only those accounts are considered during customer onboarding. By whitelisting the accounts at the start, you can avoid the bank account linking during payment. Use the Customer APIs to create customers and add their bank account details. + + For example, if a customer, Gaurav, has two bank accounts ABC and XYZ, you can use the APIs to create a customer id and link the bank accounts to that id. You can then pass this customer id at the time of payment. + + Follow these steps. + + + Step 1.1: Create a Customer + + Use this endpoint to create or add a customer with basic details such as name and contact details. + + ```cURL: Request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "Gaurav Kumar", + "contact": "9123456780", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + }' + + ```json: Success Response + { + "id" : "cust_1Aa00000000004", + "entity": "customer", + "name" : "Gaurav Kumar", + "email" : "gaurav.kumar@example.com", + "contact" : "9123456780", + "gstin": null, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at ": 1234567890 + } + + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } + } + ``` + + + + Request Parameters + + +`name` _optional_ +: `string` Customer's name. Alphanumeric value with period (.), apostrophe ('), forward slash (/), at (@) and parentheses are allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact ` _optional_ +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email ` _optional_ +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`fail_existing` _optional_ +: `string` Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + +`gstin` _optional_ +: `string` Customer's GST number, if available. For example, `29XAbbA4369J1PA`. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + + +### Response Parameters + + +`id` +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`name` +: `string` Customer's name. Alphanumeric, with period (.), apostrophe ('), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact` +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email` +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`gstin` +: `string` GST number linked to the customer. For example, `29XAbbA4369J1PA`. + +`notes` +: `json object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + + + + + + + +### Step 1.2: Add Customer's Bank Account + + The following endpoint adds the customer's bank accounts. + + ```cURL: Request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers/:customer_id/bank_account \ + -H "Content-Type: application/json" \ + -d '{ + "ifsc_code": "UTIB0000194", + "account_number": "11214311215411", + "beneficiary_name": "Gaurav", + "beneficiary_address1": "address 1", + "beneficiary_address2": "address 2", + "beneficiary_address3": "address 3", + "beneficiary_address4": "address 4", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9900990099", + "beneficiary_city": "Bangalore", + "beneficiary_state": "KA", + "beneficiary_country": "IN" + }' + + ```json: Response + { + "id": "ba_LSZht1Cm7xFTwF", + "entity": "bank_account", + "ifsc": "ICIC0001207", + "bank_name": "ICICI Bank", + "name": "Gaurav Kumar", + "notes": [], + "account_number": "XXXXXXXXXXXXXXX0434" + } + ``` + + + + Path Parameter + +`customer_id` _mandatory_ +: `string` Customer id of the customer whose bank account is to be added. + + + + +### Request Parameters + + +`account_number` _mandatory_ +: `string` Customer's bank account number. For example, `11214311215411`. + +`beneficiary_name` _mandatory_ +: `string` The name of the beneficiary associated with the bank account. + +`beneficiary_address1` _optional_ +: `string` The virtual payment address. + +`beneficiary_email` _optional_ +: `string` Email address of the beneficiary. For example, `gaurav.kumar@example.com`. + +`beneficiary_mobile` _optional_ +: `string` Mobile number of the beneficiary. + +`beneficiary_city` _optional_ +: `string` The city of the beneficiary. + +`beneficiary_state` _optional_ +: `string` The state of the beneficiary. + +`beneficiary_country` _optional_ +: `string` The country of the beneficiary. + +`beneficiary_pin` _optional_ +: `integer` The pin code of the beneficiary's address. + +`ifsc_code` _mandatory_ +: `string` The IFSC of the bank branch associated with the account. + + + +### Response Parameters + +`bank_accounts` +: `array` An array containing bank account details. + + `id` + : `string` Unique identifier of the bank account. + + `entity` + : `string` The type of entity, which in this case is `bank_account`. + + `ifsc` + : `string` The IFSC of the bank branch associated with the account. + + `bank_name` + : `string` The name of the bank. + + `name` + : `string` The name associated with the bank account. + + `notes` + : `object` Set of key-value pairs that can be used to store additional information about the payment. + + `account_number` + : `integer` Customer's bank account number. For example, `11214311215411`. + + + + + + + + + + +### Step 2: Create an Order *(Mandatory)* + + Pass the investor bank account details to the `bank_account` array of the Orders API. Given below is the sample code when the `method` is `upi`. + + ```curl: Request + curl -u : \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 500, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }' + + ```json: Response + { + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 500, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 + } + ``` + + + Request Parameters + + `amount` _mandatory_ +: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, the value of this field should be `100`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. You can create orders in **INR** only. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`method` _mandatory_ +: `string` The payment method used to make the payment. If this parameter is not passed, investors will be able to make payments using both netbanking and UPI payment methods. Possible values: + - `netbanking`: Investors can make payments only using netbanking. + - `card`: Investors can make payments using debit card. + - `upi`: Investors can make payments only using UPI. + +`bank_account` _mandatory_ +: `object` Details of the bank account that the investor has provided at the time of registration. + + `account_number` _mandatory_ + : `string` The bank account number from which the investor should make the payment. For example, `765432123456789` Payments will not be processed for an incorrect account number. + + `name` _mandatory_ + : `string` The name linked to the bank account. For example, `Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` The bank IFSC. For example, `HDFC0000053`. + + + +### Response Parameters + + `id` +: `string` Unique identifier of the order. + +`entity` +: `string` Indicates the type of entity. Here, it is `order`. + +`amount` +: `integer` The order amount represented in the smallest unit of the currency passed. For example, amount = 100 translates to 100 paise, that is ₹1 (default currency is INR). + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we support INR only. + +`receipt` +: `string` A unique identifier of the order entered by the user. For example, `BILL13375649`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, "note_key": "Beam me up Scotty”. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`offer_id` +: `string` Unique identifier of the offer. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + + + + + + + + +### Step 3: Turbo UPI SDK Action + + You need to link the customer's UPI account with your app. Use the code samples given below to [fetch the UPI account](#32-link-new-upi-account). + + + + 3.1 Initialise the SDK + + + Use the code given below to initialise the SDK. + + ```yml: Import Package + import 'package:razorpay_flutter/razorpay_flutter.dart'; + // Create a Razorpay instance + razorpay = Razorpay("YOUR_KEY_ID").initUpiTurbo(); + ``` + + + +### 3.2 Link New UPI Account + + + Use the following code to link the newly created UPI account with your app. This function can be called from anywhere in the application, providing multiple entry points for customers to link their UPI account with your app. + + ```java: Link New UPI Account + razorpay.upiTurbo.linkNewUpiAccount( + customerMobile: mobileNumber, + color: "#ffffff", + onSuccess: (List upiAccounts) { + // Success callback body + }, + onFailure: (Error error) { + // Failure callback body + }, + ); + ``` + + + + Request Parameters + +`mobileNumber` _mandatory_ +: `string` Mobile number of the customer. + +`color` _optional_ +: `string` Colour in hex format + + + + + - Initialise the instance to handle the event using the code given below: + + ```java: Instantiate + razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, handlePaymentErrorResponse); + razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, handlePaymentSuccessResponse); + ``` + + - Handle payment failure responses, displaying important details such as error codes, error descriptions, and metadata. This function is responsible for handling and logging information in the event of a payment error. + + ```yml: Payment Failure Response Handling + void handlePaymentErrorResponse(PaymentFailureResponse response) { + + /** + * PaymentFailureResponse contains three values: + * 1. Error Code + * 2. Error Description + * 3. Metadata + **/ + print('Payment Error Response : $response'); + } + ``` + + - Handle successful payment responses, displaying key information like order ID, payment ID, and signature. This code manages and logs details when a payment transaction is successful. + + ```yml: Payment Success Response Handling + void handlePaymentSuccessResponse(PaymentSuccessResponse response) { + + /** + * Payment Success Response contains three values: + * 1. Order ID + * 2. Payment ID + * 3. Signature + **/ + print('Payment Success Response : $response'); + } + ``` + + + +### 3.3 Submit Method + + + To accept payments, call Custom Checkout’s `submit` method with the following payload: + + ```java: Submit Payment Details + Map payload = { + 'amount': 100, + 'currency': 'INR', + 'prefill': { + 'contact': '8888888888', + 'email': 'test@razorpay.com', + }, + 'theme': { + 'color': '#0CA72F', + }, + 'send_sms_hash': true, + 'retry': { + 'enabled': false, + 'max_count': 4, + }, + 'key': '$merchantKey', + 'order_id': 'order_GAWRjlWkVcRh0V', + 'disable_redesign_v15': false, + 'experiments.upi_turbo': true, + }; + + razorpay.open(payload); + ``` + + + + Request Parameter + +`payload` _mandatory_ +: `Map` Payload for initiating the transaction. + + + +### Response Parameters + + + Parameter | Description + --- + `onSuccess` | This function is triggered if the list is fetched successfully. `accList` can be empty to indicate that no accounts have been linked yet. + --- + `onFailure` | This function is triggered in case an error is thrown during the retrieval process, either by the Razorpay SDK or the Bank SDK. + + + + + + + + + + +### Step 4: Handle Payment Success and Failure + + The way you handle payment success and failure scenarios depends on the Checkout sample code you opted for in the previous step. Know how to [handle payment success and failure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/standard-integration.md#step-14-handle-payment-success-and-failure). + + + +### Steps 5: Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + - You need to store these fields in your server. + - You can confirm the authenticity of these details by verifying the signature in the next step. + + ```json: Success Callback + { + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_GAWRjlWkVcRh0V", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" + } + ``` + + + Parameters + + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by the Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by the Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + + +### Step 6: Verify Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + +### Non-Transactional Flow + +Razorpay provides a single exposed function that allows you to manage linked UPI accounts and access all non-transactional flows seamlessly. + +![View the non-transactional flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-non-transactional.jpg.md) + + +### Manage UPI Accounts + + The SDK manages the linked `UpiAccounts` on the application by triggering `manageUpiAccounts()`. The sequence of steps is as given below: + + - **Fetch balance**: Check the customer's account balance. + - **Change UPI PIN**: Provide the customer the ability to change their UPI PIN. + - **Reset UPI PIN**: Let your customers reset the PIN for their account. + - **Delete the account from the application**: Let your customers delink, that is, remove a selected UPI account from your application. + + ```java: Java + razorpay.upiTurbo.manageUpiAccounts(customerMobile: mobileNumberValue, + color: "#ffffff", + onFailure:(Error error) { + } + ); + ``` + + + + Request Parameters + + +`customerMobile` _mandatory_ +: `string` Mobile number of the customer. + +`color` _optional_ +: `string` Colour in hex format. + + + +### Response Parameter + + + Parameters | Description + --- + `onFailure` | This function is triggered in case of an error, and the error object will be received. + + + + + + + +### Models Exposed from the SDKs + +The SDKs given below provide access to exposed models for seamless integration. + + +### Error + + + + Error | Description + --- + `errorCode` | Types of error codes - `BAD_REQUEST_ERROR`: Failure from the client's end (SDK). +- `GATEWAY_ERROR`: Failure either from the Secure Component or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + `errorDescription` | Brief description of the error. + --- + `errorReason` | Specifies the specific reason for the error. + --- + `errorSource` | Indicates the origin of the error. + --- + `errorStep` | Highlights the stage where the error occurred. + + + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/standard/payment-methods/turbo-upi/error-codes.md). + + + +### UpiAccount + + + Fields | Return Type | Description + --- + `accountNumber` | String | Masked account number. + --- + `ifsc` | String | IFSC of the bank. + --- + `bankLogoUrl` | String | Image URL of the bank logo. + --- + `bankName` | String | Name of the bank. + --- + `bankPlaceholderUrl` | String | Image URL of the bank logo placeholder. + + + +## 2. Test Integration + +We recommend the following: +- Complete the integration on UAT before using the prod builds. +- Perform the UAT using the Razorpay-provided API keys. + +## 3. Go-live Checklist + +Complete these steps to take your integration live: + +- You should get your app id whitelisted by Razorpay to test on prod. + + +> **INFO** +> +> +> **Handy Tips** +> +> Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number and app whitelisted. +> + +- Import the prod library from the GitHub repository → `https://github.com/upi-turbo/android-turbo-sample-app/tree/prod/app/libs` prod branch. + +- Add Proguard rules: + + - `keepclassmembers,allowobfuscation class * { + @com.google.gson.annotations.SerializedName ; + }` + - `keepclassmembers enum * { *; }` + - `keepclassmembers class * { + @android.webkit.JavascriptInterface ; + }` + - `dontwarn com.razorpay.**` + - `keep class com.razorpay.** {*;}` + - `keep class com.olivelib.** {*;}` + - `keep class com.olive.** {*;}` + - `keep class org.apache.xml.security.** {*;}` + - `keep interface org.apache.xml.security.** {*;}` + - `keep class org.npci.** {*;}` + - `keep interface org.npci.** {*;}` + - `keep class retrofit2.** { *; }` + - `keep class okhttp3.** { *; }` + +- Replace the UAT credential with the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. diff --git a/llm-content/payments/payment-gateway/flutter-integration/standard/payment-methods/turbo-upi.md b/llm-content/payments/payment-gateway/flutter-integration/standard/payment-methods/turbo-upi.md new file mode 100644 index 00000000..b31bc741 --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/standard/payment-methods/turbo-upi.md @@ -0,0 +1,430 @@ +--- +title: Integrate with Turbo UPI +description: Steps to integrate Razorpay Turbo UPI with your app. +--- + +# Integrate with Turbo UPI + +- **Turbo UPI Flutter Standard SDK**: Discover new features, updates and deprecations related to Turbo UPI on Flutter Standard Checkout (since Jan 2024). + +Razorpay Turbo UPI enables businesses to offer faster and simpler payments by reducing the payment process from 5 steps to just 1, eliminating app redirections. This provides a seamless in-app payment experience, reduce dependencies on third-party UPI apps, and offers complete visibility into the payment journey. + +You can easily integrate Turbo UPI with the Razorpay Flutter Standard SDK. Explore the full potential of [Razorpay Turbo UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/turbo-upi.md) and learn how it works. + +![Turbo UPI Standard Checkout Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-flow.jpg.md) + + +### Prerequisites + + 1. Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number, app, and GitHub account whitelisted for access to the `https://github.com/upi-turbo/razorpay-turbo-flutter` sample app repository. + + 2. Review the [Razorpay Flutter Standard SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/standard.md) documentation for integration guidelines. + + 3. Add Location Dependency: The SDK requires location permission to complete device onboarding. Ensure you have added the necessary location dependencies as described below. + + - For iOS: + Update your `Info.plist` file with the following keys to request location permissions: + + ```yml: plist + NSLocationWhenInUseUsageDescription + + Your app needs access to your location while using the app. + + ``` + + Make sure these permissions are clearly communicated to your users to ensure a smooth onboarding experience. + + 4. For Android-specific integrations, add the following dependencies to your `build.gradle` file: + + **Getting the Turbo Dependencies:** + + ```java: gradle + implementation("com.razorpay:checkout:") + implementation("com.razorpay:razorpay-turbo:") + implementation("com.razorpay:turbo-ui:") + ``` + + Replace ``, ``, and `` with the latest versions available. + + You can find the latest versions here: + - [Razorpay Checkout](https://central.sonatype.com/artifact/com.razorpay/checkout) + - [Razorpay Turbo](https://central.sonatype.com/artifact/com.razorpay/razorpay-turbo) + - [Turbo UI](https://central.sonatype.com/artifact/com.razorpay/turbo-ui) + + **Enable `viewBinding` and `dataBinding`:** + + ```java: gradle + buildFeatures { + viewBinding = true + dataBinding = true + } + ``` + Ensure you sync your project after adding these dependencies. + + + + + +### Library Dependencies + + To integrate Turbo UPI, you must add the required library dependencies to your Flutter project: + + 1. Add the following entry to the `dependencies` section of your `pubspec.yaml` file: + + ```yaml + razorpay_turbo_standard: 1.0.0 + ``` + + 2. Run the following command in your terminal to fetch and install the new dependency: + + ``` bash + flutter pub get + ``` + + +## Onboarding Flow + +Ensure your customers [onboard with Razorpay Turbo UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/turbo-upi.md#onboarding-flow) to get started. + +## 1. Integration Steps + +Follow these steps to integrate with Razorpay Turbo UPI: + +### 1.1 Import Razorpay Package + +To integrate Turbo UPI with your Flutter app, start by importing the required packages. + +This sets up the SDK and enables your app to handle UPI payments. Use the code snippet below to import the package: + + ```yml: dart + import 'package:razorpay_flutter/razorpay_flutter.dart'; + ``` +### 1.2 Initialise Razorpay and Register Event Listeners +Set up the Razorpay instance and register event listeners to handle payment success, failure, and session token refresh. + +This ensures your app can respond appropriately to payment outcomes and keep session tokens up to date for a smooth user experience. + +Add the following method during initialisation: + + ```java: dart + void initializeRazorpayWithEvents() { + // Create a Razorpay instance + razorpay = Razorpay("YOUR_KEY_ID"); + //Session token event + razorpay.on(Razorpay.EVENT_FETCH_SESSION_TOKEN, _handleRefreshToken); + + //Payment Events + razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, handlePaymentErrorResponse); + razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, handlePaymentSuccessResponse); + } + ``` + +### 1.3. Create a Session Token + +To enhance security, you must create a session token via a server-to-server (S2S) call between your backend and Razorpay's backend. This session token ensures secure communication between the Turbo SDK and Razorpay's systems. + +#### How to Create a Session Token + +1. Trigger the S2S API from your Backend. Use the following API to generate a session token: + + + ```curl: Curl + curl -X POST 'https://api.razorpay.com/v1/upi/turbo/customer/session' \ + -u [YOUR_KEY_ID]:[YOUR_SECRET] \ + -H "Content-type: application/json" \ + -d '{ + "customer_reference": "9000090000" + }' + ``` curl: Success + { + "token": "session_token", + "expire_at": 1730097636 + } + ``` curl: Failure + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "customer_reference is required", + "source": "customer", + "step": "CreateSession", + "reason": "customer_reference_field_is_missing", + "metadata": {} + } + } + ``` + + + + +### Request Parameter + + `customer_reference` _mandatory_ + : `string` A unique identifier for the customer provided by the business. The recommended value is mobile number. For example, `9000090000`. + + + +### Response Parameters + + `token` + : `string` A session token to be used in subsequent session-protected APIs. + + `expire_at` + : `long` Expiry time (in seconds) for the session token, used to optimise session handling and reduce unnecessary reinitialisations. + + `error` + : `object` The request failure due to business or technical failure. + + + +### Errors + + Given below is a list of errors you may face during session token. + + + + Error | Description + --- + `code` | Types of error codes - `BAD_REQUEST_ERROR`: Failure from the client's end (SDK). +- `GATEWAY_ERROR`: Failure either from the Secure Component or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + `description` | Brief description of the error. + --- + `field` | Indicates which field is missing. + --- + `reason`| Specifies the specific reason for the error. + --- + `source`| Highlights the source where the error occurred. + --- + `step` | Highlights the stage where the error occurred. + + + + + + +2. Create/Retry Session Token Mechanism + + To ensure a smooth experience during token expiry, the Turbo SDK provides the `updateSessionToken` method. This method dynamically fetches and updates the session token without reinitialising the session. + + This allows you to seamlessly refresh the session by retrieving a new token via a server-to-server (S2S) call. + + Below is an example of using `updateSessionToken`. + + - Handle the event using the code given below: + + ```java: dart + void _handleRefreshToken(dynamic response) async { + // API Call to generate token + razorpay.upiTurbo.updateSessionToken(token: ‘’); + }; + ``` + +### 1.4. Handle UPI Account Linking and Payment Flow + +You can link a customer's UPI account and initiate payments using the methods described below. + +#### 1.4.1 Link Customer's UPI Account + +To link a customer's UPI account with your app, use the following code sample. This will prompt the customer to add and link their UPI account. + +```java: dart +razorpay.upiTurbo.linkNewUpiAccount( + customerMobile: mobileNumber, + color: "#ffffff", + onSuccess: (List upiAccounts) { + // Handle successful linking. upiAccounts may be empty if no accounts are linked yet. + }, + onFailure: (Error error) { + // Handle error during linking. + } +); +``` + + +### Request Parameters + +`customerMobile` _mandatory_ +: `string` Mobile number of the customer. + +`color` _optional_ +: `string` Colour in HEX format. + + + +### Response Parameters + + + Parameters | Description + --- + `onSuccess` | Triggered if the UPI accounts are fetched successfully. The `upiAccounts` list may be empty if no accounts are linked. + --- + `onFailure` | Triggered in case of an error. The error object will be received. + + + + + +#### 1.4.2 Initiate Payment Using Standard Checkout + +To initiate a payment, call the Standard Checkout’s `open` method with the required payload: + +```java: dart +Map payload = { + 'amount': 100, // Amount in the smallest currency unit (e.g., paise) + 'currency': 'INR', + 'prefill': { + 'contact': 'YOUR_MOBILE_NUMBER', + 'email': 'YOUR_EMAIL' + }, + 'theme': {'color': '#0CA72F'}, + 'key': 'YOUR_KEY_ID', + 'image': 'https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png' +}; + +razorpay.open(payload); +``` + + +### Request Parameters + + +`payload` _mandatory_ +: `Map` Payload for initiating the transaction. + + +#### 1.4.3 Handle Payment Events + + Handle payment success and failure responses: + +- **Handle Payment Failure:** + + Log and display error details such as error code, description, and metadata. + + ```java: dart + void handlePaymentErrorResponse(PaymentFailureResponse response) { + /** + * PaymentFailureResponse contains: + * 1. Error Code + * 2. Error Description + * 3. Metadata + **/ + print('Payment Error Response: $response'); + } + ``` + +- **Handle Payment Success:** + + Log and display key information like order ID, payment ID, and signature. + + ```java: dart + void handlePaymentSuccessResponse(PaymentSuccessResponse response) { + /** + * PaymentSuccessResponse contains: + * 1. Order ID + * 2. Payment ID + * 3. Signature + **/ + print('Payment Success Response: $response'); + } + ``` + +By following these steps, you can seamlessly link customer UPI accounts and handle payments using Razorpay Turbo UPI in your Flutter app. + +### Non-Transactional Flow + +Razorpay provides a single exposed function that allows you to manage linked UPI accounts and access all non-transactional flows seamlessly. + +![View the non-transactional flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-non-transactional.jpg.md) + + +### Manage UPI Accounts + + The SDK manages the linked `UpiAccounts` on the application by triggering `manageUpiAccounts()`. The sequence of steps is as given below: + + - **Fetch balance**: Check the customer's account balance. + - **Change UPI PIN**: Provide the customer the ability to change their UPI PIN. + - **Reset UPI PIN**: Let your customers reset the PIN for their account. + - **Delete the account from the application**: Let your customers delink, that is, remove a selected UPI account from your application. + + ```java: dart + razorpay.upiTurbo.manageUpiAccounts( + customerMobile: "MOBILE_NUMBER", + color: "#ffffff", + onFailure:(Error error) { + + } + ); + ``` + + + + Request Parameters + + +`customerMobile` _mandatory_ +: `string` Mobile number of the customer. + +`color` _optional_ +: `string` Colour in HEX format. + + + +### Response Parameter + + + Parameters | Description + --- + `onFailure` | This function is triggered in case of an error, and the error object will be received. + + + + + + + +### Models Exposed from the SDKs + +The SDKs given below provide access to exposed models for seamless integration. + + +### Error + + + + Error | Description + --- + `errorCode` | Types of error codes - `BAD_REQUEST_ERROR`: Failure from the client's end (SDK). +- `GATEWAY_ERROR`: Failure either from the Secure Component or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + `errorDescription` | Brief description of the error. + --- + `errorReason` | Specifies the specific reason for the error. + --- + `errorSource` | Indicates the origin of the error. + --- + `errorStep` | Highlights the stage where the error occurred. + + + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/flutter-integration/standard/payment-methods/turbo-upi/error-codes.md). + + + +### UpiAccount + + + Fields | Return Type | Description + --- + `accountNumber` | String | Masked account number. + --- + `ifsc` | String | IFSC of the bank. + --- + `bankLogoUrl` | String | Image URL of the bank logo. + --- + `bankName` | String | Name of the bank. + --- + `bankPlaceholderUrl` | String | Image URL of the bank logo placeholder. diff --git a/llm-content/payments/payment-gateway/flutter-integration/standard/payment-methods/turbo-upi/error-codes.md b/llm-content/payments/payment-gateway/flutter-integration/standard/payment-methods/turbo-upi/error-codes.md new file mode 100644 index 00000000..d2aa6749 --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/standard/payment-methods/turbo-upi/error-codes.md @@ -0,0 +1,421 @@ +--- +title: Turbo UPI SDK - Error Codes | Flutter Standard Integration +heading: Turbo UPI SDK - Error Codes +description: List of error codes for Turbo UPI SDK. +--- + +# Turbo UPI SDK - Error Codes + +Given below is the list of error codes categorised by error reasons, with relevant descriptions, source and step. + +### Bad Request Errors + +Given below is the list of Bad Request errors. + + +### bank_not_live_on_upi + + - **Description**: The selected bank is not enabled on UPI. Please try using another bank. + - **Source**: gateway + - **Step**: customer_onboarding + + + +### account_does_not_exist + + + + Payment Debit Request + + - **Description**: No accounts found for the selected bank. Please try using another bank. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Payment Credit Request + + - **Description**: Payment was unsuccessful as the receiver's bank account is not valid. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + + + + +### transaction_not_allowed + + + + Payment Debit Request + + - **Description**: Transaction not permitted to the account as per your bank policy. Please contact your bank for more details or try with another bank account. + - **Source**: customer + - **Step**: payment_debit_request + + + +### Payment Credit Request + + - **Description**: Payment not allowed as it got declined by the receiver's bank. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + + + + +### upi_pin_registration_card_expired + + - **Description**: Card used while setting UPI PIN has expired. Please use another debit card or use another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### upi_pin_registration_card_not_found + + - **Description**: Card details used while setting UPI PIN are incorrect. Please re-check and try again. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### upi_pin_registration_card_restricted + + - **Description**: Card used while setting UPI PIN has been blocked by your bank. Please reach out to your bank for more information or try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### bank_technical_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_status_request + + + +### pin_not_set + + - **Description**: Payment was unsuccessful as you have not set the UPI PIN on the app. Try using another method. + - **Source**: customer_psp + - **Step**: payment_authentication + + + +### customer_not_registered + + - **Description**: No bank account is associated with this mobile number. Please try again by adding your account. + - **Source**: gateway + - **Step**: customer_onboarding + + + +### server_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: gateway + - **Step**: payment_authentication + + + +### payment_cancelled_by_user + + - **Description**: Flow was aborted as you pressed back from the PIN screen. Please try again. + - **Source**: customer + - **Step**: payment_authorization + + +### Gateway Errors + +Given below is the list of gateway errors. + + +### incorrect_otp + + - **Description**: You have entered an incorrect OTP. Try again. + - **Source**: customer + - **Step**: customer_onboarding + + + +### otp_expired + + - **Description**: You have entered an expired OTP. Please regenerate OTP and try again. + - **Source**: customer + - **Step**: customer_onboarding + + + +### insufficient_funds + + - **Description**: Payment was unsuccessful due to insufficient funds. Kindly check your balance and try again. + - **Source**: customer + - **Step**: payment_debit_request + + + +### insufficient_funds_mandate_block + + - **Description**: Payment was unsuccessful as the amount in your account is blocked for another payment. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### otp_attempts_exceeded + + - **Description**: You have entered an incorrect OTP too many times. Try again in some time. + - **Source**: customer_psp + - **Step**: customer_onboarding + + + +### account_dormant + + - **Description**: Payment was unsuccessful as the receiver's bank account is inactive. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + +### bank_not_live_on_upi + + - **Description**: Selected bank is not available on UPI. Please try using another bank. + - **Source**: issuer_bank + - **Step**: customer_onboarding + + + +### payment_timed_out + + + + Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_response + + + +### UPI ID Not Reachable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is not reachable at this time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + + + + +### first_transaction_limit_exceeded + + - **Description**: Payment was unsuccessful as you exceeded the first-time transaction limit set by your bank. You can use another bank account or retry after 24 hours. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### transaction_limit_exceeded + + + + Limit Set By Bank Exceeded + + - **Description**: Payment was unsuccessful as you exceeded the transaction limit set by your bank. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### Daily Amount Limit Exceeded + + - **Description**: Payment was unsuccessful as you exceeded the amount limit for the day with this bank account. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + + + + + +### first_time_transaction_freeze_period + + - **Description**: Payment was unsuccessful due to the cooling period set by your bank for first-time user. Please try again after some time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### transaction_frequency_limit_exceeded + + - **Description**: Payment was unsuccessful as the number of transactions exceeds the max limit set by the bank. You can use another bank account or retry after some time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### bank_account_inactive + + + + Issuer Bank Account Inactive + + - **Description**: Payment was unsuccessful as your account is not active. Please try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Receiver Bank Account Inactive + + - **Description**: Payment was unsuccessful as the receiver's bank account is not active. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_debit_request + + + + + + +### server_error + + + + Temporary Issue - Issuer Bank + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: beneficiary_bank + - **Step**: payment_request + + + +### Temporary Issue - Beneficiary Bank + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: issuer_bank + - **Step**: payment_request + + + + + + +### invalid_ifsc + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: gateway + - **Step**: payment_authentication + + + +### upi_pin_registration_card_blocked + + - **Description**: Card used while setting UPI PIN has been blocked by your bank. Please reach out to your bank for more information or try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### bank_technical_error + + + + UPI ID Temporarily Unavailable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: payment_credit_response + + + +### Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: payment_credit_response + + + + + + +### payment_declined + + + + Declined by Bank + + - **Description**: Payment was unsuccessful as it was declined by your bank. Reach out to your bank for more details. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_debit_request + + + + + + +### pin_attempts_exceeded + + - **Description**: You have exceeded the incorrect UPI PIN attempts. You can use another bank account or retry after 24 hours. + - **Source**: customer + - **Step**: payment_authentication + + + +### incorrect_pin + + - **Description**: You have entered incorrect UPI PIN. Please try again with the correct UPI PIN. + - **Source**: customer + - **Step**: payment_authentication + + + +### linked_account_removal_failed + + - **Description**: Unable to remove the account. Please try again. + - **Source**: customer_psp + - **Step**: account_management + + + +### sms_text_not_received + + - **Description**: Something went wrong while sending SMS. Please try again. + - **Source**: gateway + - **Step**: customer_onboarding + + +### Server Errors + +Given below is the list of server errors. + + +### server_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: customer_onboarding + + + +### server_error + + - **Description**: We are facing some trouble completing your request at the moment. Please try again shortly. + - **Source**: internal + - **Step**: payment_authorization diff --git a/llm-content/payments/payment-gateway/flutter-integration/standard/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/flutter-integration/standard/troubleshooting-faqs.md new file mode 100644 index 00000000..ed088aea --- /dev/null +++ b/llm-content/payments/payment-gateway/flutter-integration/standard/troubleshooting-faqs.md @@ -0,0 +1,75 @@ +--- +title: Payment Gateway | Flutter - Troubleshooting & FAQs +heading: Troubleshooting and FAQs +description: Troubleshoot common error scenarios and find answers to frequently asked questions about Standard Flutter integration. +--- + +# Troubleshooting and FAQs + +### 1. What is order id and how to generate it? + + Order creation is the primary step of the Razorpay payment flow. When customer clicks the pay button on your app, an Order is created and a corresponding order_id is generated in the response. This order_id must be passed to the Razorpay Checkout options added in your Flutter app. Know more about [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### 2. What is the process for raising a request for a new feature? + + To raise a request for a new feature, go to **New Issue** → **Feature Request** on our [GitHub repository](https://github.com/razorpay/razorpay-cordova/issues/new/choose). + + + +### 3. How can I update the existing 'razorpay-pod'? + + - Go to **iOS** folder in your project and run **'pod update'** to update all the pods. + - If you do not want to update all pods, run **'pod update razorpay-pod'**. + + + +### 4. I have integrated with the Razorpay Payment Gateway to accept payments on my mobile app. However, when I try to publish my app on the Apple App Store, it is getting rejected. The following message is displayed, "We noticed that your app offers a subscription with a mechanism other than the in-app purchase API." How to resolve this? + + - **Cause**: As per Apple's policy, if you use a subscription model in your iOS app, you must use Apple's in-app purchase APIs. Apple does not redirect out of the app for digital product purchases. + + - **Resolution**: Use Apple's in-app purchase APIs. + + + +### 5. In the new M1 MacBook, why am I not able to compile the Flutter Razorpay plugin for release mode? + + This issue is caused by the new changes introduced in Xcode 12. + + To resolve this: + 1. Use [Rosetta 2](https://support.apple.com/en-us/HT211861) for launching the app on your Mac. + 2. Add the following lines to Podfile within `post_install do |installer|`. + + ```js: podfile + installer.pods_project.build_configurations.each do |config| + config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" + end + ``` + + Know more about [compilation errors](https://khushwanttanwar.medium.com/xcode-12-compilation-errors-while-running-with-ios-14-simulators-5731c91326e9). + + + +### 6. How can I check the Razorpay Flutter Standard SDK version? + + To check the SDK version: + 1. Open your Flutter project in your preferred code editor. + 2. Open the `pubspec.yaml` file in the root directory of your project. + 3. In the `dependencies` section, look for the Razorpay entry. The version number is specified next to the package name in the format `x.y.z`. + + + +### 7. How can I update the Razorpay Flutter Standard SDK version? + + To update the SDK version, follow these steps: + + 1. Open the terminal or command prompt and navigate to your project directory where the `package.json` file resides. + 2. Use the following command to update the dependencies listed in your pubspec.yaml file to their latest compatible versions. + + ```java: Update SDK + dart pub upgrade + ``` + 3. If you are using a Flutter iOS application, run `cd ios && pod repo update && pod update` to ensure the internal iOS dependencies are updated to the versions set by the Razorpay package. This is because cocoapods may not automatically update the internal trunk spec to fetch the latest versions. + 4. After running the update command, review the updates fetched by npm to ensure they do not introduce any breaking changes. + 5. Conduct thorough testing to ensure that the updated packages do not adversely affect the application functionality and commit the changes. diff --git a/llm-content/payments/payment-gateway/how-it-works.md b/llm-content/payments/payment-gateway/how-it-works.md new file mode 100644 index 00000000..c1fc6a7c --- /dev/null +++ b/llm-content/payments/payment-gateway/how-it-works.md @@ -0,0 +1,97 @@ +--- +title: Razorpay Payment Gateway Flow +heading: How Payment Gateway Works +description: Understand the Razorpay Payment Gateway flow and how it works. +--- + +# How Payment Gateway Works + +A Payment Gateway focuses on securing the sensitive information given by the user throughout the process. It ensures security by encrypting data like card and bank details provided by the user. + +## Payment Gateway Workflow + +Given below is a complete end-to-end flow about how you can use Razorpay Payment Gateway. + +![](/docs/assets/images/payment-flow-pg.jpg) + + +### 1. Customer Places an Order + + A customer visits your website or app, selects items they want to purchase and clicks the pay button to place an order. For each order placed by your customer, you create a `transaction_id` or `checkout_id` on your server for your reference. For example, `#trn-345`. + + + +### 2. Create Order from Server + + For each order placed by your customer, use the [Razorpay Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create an order from your server. + + + +### 3. Order ID Returned + + Razorpay processes the details sent and returns an `order_id` to you, for example, `order_EKwxwAgItmmXdp`. Map this `order_id` to the transaction_id `#trn-345` you created in the first step. Know more about [order states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md#order-states). + + + +### 4. Pass Order ID to Checkout + + Pass the `order_id` returned by Razorpay to your integration. This invokes the Razorpay Checkout, the client-side UI, which displays various payment methods. + + + +### 5. Collect Payment Details + + The customer selects a payment option to complete the payment. The payment details entered by the customer are secured and stored by Razorpay as tokens. The generated tokens are exchanged with your servers for further use. + + + +### 6. Bank Authenticates the Payment + + Razorpay sends an authentication request to the customer's bank internally. After authentication, Razorpay is authorised to deduct the amount from the customer's bank account. + + For successful payments, the Checkout returns the `razorpay_order_id`, `razorpay_payment_id` and `razorpay_signature`. + + Know more about [payment states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#payment-life-cycle). + + +### Payment Capture and Settlement + +Once your customer completes the payment and Razorpay authenticates it, you must capture it automatically or manually. You can also verify the payment signature to ensure that the payment is received from an authentic source. Know more about [payment capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + +After the payment is successfully captured, the amount is settled in your account according to your settlement cycle. Know more about [settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md). + +### Refunds + +Customers may claim [ refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) after the transaction. In such cases, you can initiate a refund, post which the funds are sent back to the customer's account. + +## Test Cards + +Use the [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md) to test domestic payments, international payments and subscriptions. + +### Test Razorpay Checkout + +Test the Checkout by clicking the **PAY WITH RAZORPAY** button. + +- This initiates a payment. +- Provide your phone number, email address, select your preferred payment method and complete the payment. + +> **WARN** +> +> +> +> **Live Transaction with Auto Refund** +> +> This is a real transaction and money will be deducted from your account. However, the amount debited will be auto-refunded to your account in 5-7 working days. +> + +## Next Step + +[Get started with Razorpay Payment Gateway integration.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md) + +### Related Information +- [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md) +- [Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) +- [Features](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features.md) + +- [Set up your Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#1-sign-up) +- [List of required KYC documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/business-types-kyc-documents.md) diff --git a/llm-content/payments/payment-gateway/ios-integration/custom.md b/llm-content/payments/payment-gateway/ios-integration/custom.md new file mode 100644 index 00000000..b292ac36 --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/custom.md @@ -0,0 +1,55 @@ +--- +title: Integrate With iOS Custom SDK +description: Integrate Razorpay iOS Custom SDK with your iOS application and accept payments. +--- + +# Integrate With iOS Custom SDK + +With Razorpay iOS Custom SDK, you can customise the Razorpay Checkout UI. +Customise the look and feel such as colours and themes of your app's Checkout form. +- Validate customer inputs such as card number, expiry date and others using the [Luhn check algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm). +- Configure and integrate the payment methods on the Checkout form. + +> **WARN** +> +> +> **Watch Out!** +> +> - [Razorpay iOS Standard SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard.md) supports all payment methods by default. We recommend you integrate with the Razorpay iOS Standard SDK. If you integrate with Custom Checkout SDK, you will need to integrate these manually. +> - This framework only supports iOS version **10.0 and above**. +> + +## List of Razorpay iOS Custom SDK Versions (Last 5 versions) + +SDK | Framework Compiled With | Release Date | Changes +--- +[2.1.2](https://github.com/razorpay/razorpay-customui-pod/releases/tag/2.1.2) | Swift 5.4.2+ | 08 Dec 2025 | Bug Fixes. +--- +[2.1.1](https://github.com/razorpay/razorpay-customui-pod/releases/tag/2.1.1) | Swift 5.4.2+ | 18 Nov 2025 | **Feature**: Added turbo property in Checkout implementation. + Bug Fixes. +--- +[2.1.0](https://github.com/razorpay/razorpay-customui-pod/releases/tag/2.1.0) | Swift 5.4.2+ | 07 Nov 2025 | **Feature**: SDK modularisation to allow Razorpay custom and standard SDKs in the same app. +--- +[2.0.22](https://github.com/razorpay/razorpay-customui-pod/releases/tag/2.0.22) | Swift 5.4.2+ | 04 Nov 2025 | **Bug Fix**: - Xcode 16 compatibility issue. +- WebView `decidePolicyFor` function. + +--- +[2.0.21](https://github.com/razorpay/razorpay-customui-pod/releases/tag/2.0.21) | Swift 5.4.2+ | 17 Oct 2025 | **Feature**: TNG deeplink auto-redirection from TNG app to your business app. This version is only applicable for Malaysia and Singapore businesses. + +> **SUCCESS** +> +> +> **Update SDK** +> +> Check your [current SDK version](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/troubleshooting-faqs.md#10-how-can-i-check-the-razorpay-ios). If it is outdated, please [update the SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/troubleshooting-faqs.md#11-how-can-i-update-the-razorpay-ios) to ensure uninterrupted settlements of your funds. +> + +## Integration Steps + +Follow these integration steps: + +1. [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/build-integration.md) +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/test-integration.md) +3. [Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/go-live-checklist.md) + +### Related Information diff --git a/llm-content/payments/payment-gateway/ios-integration/custom/build-integration.md b/llm-content/payments/payment-gateway/ios-integration/custom/build-integration.md new file mode 100644 index 00000000..15ec1384 --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/custom/build-integration.md @@ -0,0 +1,1102 @@ +--- +title: 1. Build Integration +description: Steps to integrate your Razorpay iOS Custom SDK with Razorpay Payment Gateway. +--- + +# 1. Build Integration + +Follow the steps to integrate the Razorpay iOS Custom SDK: + +**1.1** [Import Razorpay.framework library to Your Project](#11-import-razorpayframework-library-to-your-project). +- [Cocoapod](#cocoapod) + +- [Manual](#manual) + +- [Objective-C](#objective-c) + +**1.2** [Initialise Razorpay iOS Custom SDK](#12-initialise-razorpay-ios-custom-sdk). + +**1.3** [Create an Order in Server](#13-create-an-order-in-server). + +**1.4** [Get Payment Methods](#14-get-payment-methods). + +**1.5** [Initiate Payment](#15-initiate-payment). + +**1.6** [Pass WKNavigationDelegate actions to SDK](#16-pass-wknavigationdelegate-actions-to-sdk). + +**1.7** [Handle Success and Errors Events](#17-handle-success-and-error-events). + +**1.8** [Store Fields in Your Server](#18-store-the-fields-in-server). + +**1.9** [Verify Payment Signature](#19-verify-payment-signature). + +**1.10** [Verify Payment Status](#110-verify-payment-status). + +## 1.1 Import Razorpay.framework library to Your Project + +You can import the Razorpay iOS Custom SDK library using any of these ways: Cocoapod, Manual and Objective-C. + +#### Cocoapod + +Refer to our [Cocoapod](https://cocoapods.org/pods/razorpay-customui-pod) pod. + +#### Manual + +1. Download the file and unzip the SDK attachment. +2. Open your project in XCode and go to **file** under **Menu** and select **Add files to "yourproject"**. +3. Select **Razorpay.xcframework** in the directory you just unzipped. +4. Click on the **Copy items if needed** checkbox. +5. Click **Add**. + +Ensure that you have the framework added in both **Embedded Binaries** and **Linked Frameworks and Libraries** under **Target settings - General**. + +#### Objective-C + +If you are building an **Objective-C** project, follow the steps given for Swift and the additional steps given below: +1. Go to **Project Settings** and select **Build Settings - All and Combined**. +2. Set the **Always Embed Swift Standard Libraries** option to **TRUE**. + +Ensure that you have the framework added in both **Embedded Binaries** and **Linked Frameworks and Libraries** under **Target settings - General**. + +#### Xcode 11 + +Ensure that you have the framework added in **Frameworks, Libraries, and Embed Content** under **Target settings - General**. Change `Embed status` from - `Do not Embed` to `Embed & Sign`. + +Watch the GIF to see how to add Frameworks, Libraries and Embed Content. + +![](/docs/assets/images/ios-embed-framework.gif) + +## 1.2 Initialise Razorpay iOS Custom SDK + +To initialise the Razorpay SDK: + +- API key. You can generate this from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys). + +> **WARN** +> +> +> **Watch Out!** +> +> API keys should not be hardcoded in the app. They must be sent from your backend as app-related metadata fetch. +> + +- A delegate that implements `RazorpayPaymentCompletionProtocol` and `WKNavigationDelegate` +- A `WKWebView` to show the bank pages + +> **WARN** +> +> +> +> **Watch Out!** +> +> - For Swift version 5.1+, ensure to declare `var razorpay: RazorpayCheckout!`. +> - For versions lower than 5.1, use `var razorpay: Razorpay!`. +> - Alternatively, you can use the following alias and retain the variable as Razorpay. + +> +> `typealias Razorpay = RazorpayCheckout` +> + +```swift: ViewController.swift + +import Razorpay + +class ViewController: UIViewController, RazorpayPaymentCompletionProtocol, WKNavigationDelegate { +// typealias Razorpay = RazorpayCheckout + var webView: WKWebView! + var razorpay: RazorpayCheckout! + . + . + override func viewDidLoad() { + super.viewDidLoad() + self.webView = WKWebView(frame: self.view.frame) + self.razorpay = RazorpayCheckout.initWithKey("Key", andDelegate: self, withPaymentWebView: self.webView) + self.view.addSubview(self.webView) + } +} + +```objectivec: ViewController.m +#import "Razorpay/Razorpay.h" +// typealias Razorpay = RazorpayCheckout +@interface ViewController() { + RazorpayCheckout *razorpay; + WKWebView *webView; +} +. +. +- (void)viewDidLoad { + [super viewDidLoad]; + webView = [[WKWebView alloc] initWithFrame:self.view.frame]; + razorpay = [RazorpayCheckout initWithKey:@"KEY" andDelegate:self withPaymentWebView:webView]; + [self.view addSubview:webView]; +} +``` + +> **INFO** +> +> +> **Initialise the Razorpay SDK only with API Key** +> +> To render your UI based on the available payment methods, initialise the Razorpay SDK only with the API key and call [getPaymentMethods](#14-get-payment-methods). +> ```swift: ViewController.swift +> self.razorpay = RazorpayCheckout.initWithKey("KEY") +> ```objectivec: ViewController.m +> razorpay = [RazorpayCheckout initWithKey:@"KEY"]; +> ``` +> +> To use the SDK initialisation mentioned above, call the following method using the previously created Razorpay instance on any other page where you wish to initiate the payment through the authorise method. +> +> ```swift: ViewController.swift +> do { +> try self.razorpay?.setWebView(self.wkWebView) +> try self.razorpay?.setDelegate(self) +> } catch { +> print(error.localizedDescription) +> } +> ```objectivec: ViewController.m +> @try { +> [razorpay setWebView:webView error: NULL]; +> [razorpay setDelegate:self error: NULL]; +> } @catch (NSException *exception) { +> NSLog(@"exception triggered"); +> } +> ``` +> + +## 1.3 Create an Order in Server + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +## 1.4 Get Payment Methods + +You can accept payments through UPI, credit/debit cards, netbanking and wallets, depending on the methods enabled for your account. When you use [Razorpay iOS Standard SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard.md), you do not have to handle the availability of different payment methods. However, when creating a custom checkout form, ensure the display of only the methods activated for your account to the customer. + +To get a list of available payment methods, call `getPaymentMethods`. This fetches the list of payment methods asynchronously and returns the results. + +```swift: ViewController.swift +self.razorpay.getPaymentMethods(withOptions: nil, withSuccessCallback: {methods in + paymentMethods = methods + }){ error in + errorDescription = error + } +```objectivec: ViewController.m + +[razorpay getPaymentMethodsWithOptions: nil withSuccessCallback: ^(NSDictionary *methods){ + for(NSString *key in [methods allKeys]) { + NSLog(@"%@",[methods objectForKey:key]); + } +} andFailureCallback: ^(NSString *error){ + NSLog(@"%@",error); +}]; +``` + +#### For Subscriptions + +If you use your iOS app to receive subscription payments, you must pass the `subscription_id` in `options` to fetch the relevant payment methods. This is because Subscription payments are supported only by select banks and cards. + +```swift: ViewController.swift +let options :[String:String] = ["subscription_id": "sub_testid"] \\ For subscriptions +var paymentMethods :[AnyHashable:Any] = [:] +var errorDescription: String = "" +self.razorpay.getPaymentMethods(withOptions: options, withSuccessCallback: {methods in + paymentMethods = methods + }){ error in + errorDescription = error + } + +```objectivec: ViewController.m +NSDictionary *options = @{@"subscription_id": @"sub_testid"}; + +[razorpay getPaymentMethodsWithOptions: options withSuccessCallback: ^(NSDictionary *methods){ + for(NSString *key in [methods allKeys]) { + NSLog(@"%@",[methods objectForKey:key]); + } +} andFailureCallback: ^(NSString *error){ + NSLog(@"%@",error); +}]; +``` +### Get Subscription Amount + +You can get the subscription amount against the subscription ID using the following function: + +```swift: ViewController.swift +var errorDescription: String = "" +var amount: UInt64 = 0 +self.razorpay.getSubscriptionAmount(havingSubscriptionId: "sub_testid", withSuccessCallback: {subAmount in + amount = subAmount + }){ error in + errorDescription = error + } +```objectivec: ViewController.m +[razorpay getSubscriptionAmountWithHavingSubscriptionId:@"sub_testid" withSuccessCallback:^(UInt64 amount){ + NSLog(@"%lld",amount); +}andFailureCallback: ^(NSString *error){ + NSLog(@"%@",error); +}]; +``` + +## 1.5 Initiate Payment + +Once you receive the required input from the customer, pass them to our SDK, which takes them to the appropriate authentication channel. + +Add the following code where you want to initiate payment: + +```swift: ViewController.swift +let options: [String:Any] = [ + "amount": 100, // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. We support more than 92 currencies. + "currency": "INR",//We support more that 92 international currencies. + "email": "gaurav.kumar@example.com", + "contact": "9090980808", + "order_id": "order_DBJOWzybf0sJbb",//From response of Step 3 + "method": "card", + "card[name]": "Gaurav Kumar", + "card[number]": "4386289407660153", + "card[expiry_month]": 06, + "card[expiry_year]": 30, + "card[cvv]": "123" + ] +razorpay.authorize(options) +```objectivec: ViewController.m +NSDictionary *options = @{ + @"amount": @"100", // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. We support more than 92 currencies. + @"currency": @"INR",////We support more that 92 international currencies. + @"email": @"gaurav.kumar@example.com", + @"contact": @"9797979797", + @"order_id": @"order_4xbQrmEoA5WJ0G", + @"method": @"wallet", + @"wallet": @"mobikwik" + }; +``` + +#### UPI Intent + +For UPI Intent requests, use the following dictionary and pass it to the `authorize` function as shown below: +```swift: ViewController.swift +let options: [AnyHashable:Any] = [ + "amount": "100", // amount in paise + "currency": "INR", + "email": "a@b.com", + "contact": "1234567890", + "method": "upi", + "flow": "intent" +] +self.razorpay?.authorize(options) +``` +```objectivec: ViewController.m +NSDictionary *options = @{ + @"amount": @"100", // amount in paise + @"currency": @"INR", + @"email": @"a@b.com", + @"contact": @"1234567890", + @"method": @"upi", + @"flow": @"intent" +}; +[razorpay authorize:options]; +``` + +Here, `razorpay` is an instance of Razorpay. + +- When you initiate a UPI Intent payment, the SDK will present a list of UPI apps installed on the device. +- The customer selects their preferred UPI app. +- The customer is redirected to the selected app to complete the authentication. +- After successful authentication, the customer is redirected back to your app. + +#### UPI Collect Requests + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#intent-flow). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md). +> + +For UPI collect requests, use the following dictionary and pass it to the `authorize` function as shown below: + +``` + let options: [AnyHashable:Any] = [ + "amount": "100", // amount in paise + "currency": "INR", + "email": "a@b.com", + "contact": "1234567890", + "method":"upi", + "vpa":"test@axisbank" + ] + self.razorpay?.authorize(options) +``` +Here, `razorpay` is an instance of Razorpay. + +**NPCI Restrictions for UPI Collect Flow** + +As per NPCI guidelines, the following MCC codes are restricted and cannot accept UPI Collect payments: + + +### Restricted MCC Codes + + + MCC Code | Category + --- + 5816 | Digital Goods: Games + --- + 6540 | POI Funding Transactions (excluding MoneySend) + --- + 4812 | Telecommunication Equipment and Telephone Sales + --- + 4814 | Telecommunication Services + --- + 7408 | Lending Platform + --- + 6513 | Real Estate Agents and Managers - Rentals + --- + 7995 | Betting/Lottery + --- + 5412 | Grocery Stores, Supermarkets + --- + 5413 | Grocery Stores, Supermarkets + + + +Below is a complete list of Checkout form parameters: + +`key` _mandatory_ +: `string` API Key ID generated from **Dashboard** → **Account & Settings** → [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `10000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. For example, `INR`. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`description` _optional_ +: `string` Description of the product shown in the Checkout form. It must start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown in the Checkout form. Can also be a **base64** string, if loading the image from a network is not desirable. + +`order_id` _mandatory_ +: `string` Order ID generated via the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`method` _mandatory_ +: `string` The payment method used by the customer on Checkout. +Possible values: + - `card` (default) + - `upi` (default) + - `netbanking` (default) + - `wallet` (default) + - `emi` (default) + - `cardless_emi` (requires [approval](https://razorpay.com/support/#request)) + - `paylater` (requires [approval](https://razorpay.com/support/#request)) + - `emandate` (requires [approval](https://razorpay.com/support/#request)) + +`card` _mandatory if method=card/emi_ +: `object` The details of the card that should be entered while making the payment. + + `number` + : `integer` Unformatted card number. + + `name` + : `string` The name of the cardholder. + + `expiry_month` + : `integer` Expiry month for card in MM format. + + `expiry_year` + : `integer` Expiry year for card in YY format. + + `cvv` + : `integer` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `emi_duration` + : `integer` Defines the number of months in the EMI plan. + +`bank_account` _mandatory if method=emandate_ +: The details of the bank account that should be passed in the request. These details include bank account number, IFSC code and the name of the customer associated with the bank account. + + `account_number` + : `string` Bank account number used to initiate the payment. + + `ifsc` + : `string` IFSC of the bank used to initiate the payment. + + `name` + : `string` Name associated with the bank account used to initiate the payment. + +`bank` _mandatory if method=netbanking_ +: `string` Bank code. List of available banks enabled for your account can be fetched via [**methods**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#fetch-supported-methods). + +`wallet` _mandatory if method=wallet_ +: `string` Wallet code for the wallet used for the payment. Possible values: + - `payzapp` (default) + - `olamoney` (requires [approval](https://razorpay.com/support/#request)) + - `phonepe` (requires [approval](https://razorpay.com/support/#request)) + - `airtelmoney` (requires [approval](https://razorpay.com/support/#request)) + - `mobikwik` (requires [approval](https://razorpay.com/support/#request)) + - `jiomoney` (requires [approval](https://razorpay.com/support/#request)) + - `amazonpay` (requires [approval](https://razorpay.com/support/#request)) + - `paypal` (requires [approval](https://razorpay.com/support/#request)) + - `phonepeswitch` (requires [approval](https://razorpay.com/support/#request)) + +`provider` _mandatory if method=cardless_emi/paylater_ +: `string` Name of the cardless EMI provider partnered with Razorpay. + + Available options for Cardless EMI (requires [approval](https://razorpay.com/support/#request)): + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `zestmoney` + - `earlysalary` + - `walnut369` + + Available options for Pay Later: + - `lazypay` + - `paypal` + +`vpa` _mandatory if method=upi_ +: `string` UPI ID used for making the payment on the UPI app. + + +> **WARN** +> +> +> **Deprecation Notice** +> +> UPI Collect is deprecated effective 28 February 2026. This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [ migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md) to switch to UPI Intent. +> + +`callback_url` _optional_ +: `string` The URL to which the customer must be redirected upon completion of payment. The URL must accept incoming `POST` requests. The callback URL will have `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` as the request parameters for a successful payment. + +`redirect` _conditionally mandatory_ +: `boolean` Determines whether customer should be redirected to the URL mentioned in the +`callback_url` parameter. This is mandatory if `callback_url` parameter is used. Possible values: + - `true`: Customer will be redirected to the `callback_url`. + - `false`: Customer will not be redirected to the `callback_url` + +> **INFO** +> +> +> +> **Handy Tips** +> +> - The `notes` field is a read-only field associated with payment and is returned while fetching payment details. Razorpay cannot modify this field. You can add up to 15 `notes` that will then be associated with the payment. For example: `"notes[internal_key_1]", "notes[internal_key_2]")`. Razorpay returns this when you fetch payment details from the API. +> - The `emi` option is available only for certain banks. To check the right banks, valid duration and EMI rates/plans to display to the user, please visit the [EMI Demo](https://razorpay.com/emidemo/)page and click EMI in the payment form. You can safely cache this data at your end since this does not change without prior notification. Calculate the monthly EMI or +> cache using the following formula: +> + +![EMI Formula](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ios_customui_emi.jpg.md) + +## 1.6 Pass WKNavigationDelegate actions to SDK + +SDK handles the responses from WKWebView to give you the correct status of the payment. + +```swift: ViewController.swift +override func viewDidLoad() { + super.viewDidLoad() + . + . + self.webView.navigationDelegate = self +} + +public func webView(_ webView: WKWebView, didCommit navigation: WKNavigation!){ + if razorpay != nil{ + self.razorpay.webView(webView, didCommit: navigation) + } +} + +public func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError er: Error) { + if razorpay != nil{ + self.razorpay.webView(webView, didFailProvisionalNavigation: navigation, withError: er) + } +} + +public func webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError er: Error){ + if razorpay != nil{ + self.razorpay.webView(webView, didFail: navigation, withError: er) + } +} + +public func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!){ + if razorpay != nil{ + self.razorpay.webView(webView, didFinish: navigation) + } +} + +```objectivec: ViewController.m + +override func viewDidLoad(){ + super.viewDidLoad(); + . + . + webView.navigationDelegate = self; +} + +- (void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation{ + if (razorpay){ + [razorpay webView:webView didCommit:navigation]; + } +} + +- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error{ + if (razorpay){ + [razorpay webView:webView didFailProvisionalNavigation:navigation withError:error]; + } +} + +- (void)webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error{ + if (razorpay){ + [razorpay webView:webView didFail:navigation withError:error]; + } +} + +- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation{ + if (razorpay){ + [razorpay webView:webView didFinish:navigation]; + } +} +``` + +## 1.7 Handle Success and Error Events + +This is done by implementing the `onPaymentSuccess` and `onPaymentError` methods of the `RazorpayPaymentCompletionProtocol`. + +We recommend giving the user an option to cancel the payment midway and pass on this action. You may also implement a retry action or display a relevant message at this step based on your use case. + +```swift: ViewController.swift +func onPaymentError(_ code: Int32, description str: String, andData response: [AnyHashable : Any]){ + let alertController = UIAlertController(title: "FAILURE", message: str, preferredStyle: UIAlertControllerStyle.alert) + let cancelAction = UIAlertAction(title: "OK", style: UIAlertActionStyle.cancel, handler: nil) + alertController.addAction(cancelAction) + //self.view = view that controller manages + self.view.sendSubview(toBack: self.webView) + navBar.isHidden = true + navBar.isUserInteractionEnabled = false + self.view.window?.rootViewController?.present(alertController, animated: true, completion: nil) + self.razorpay = nil +} + +func onPaymentSuccess(_ payment_id: String, andData response: [AnyHashable : Any]){ + let alertController = UIAlertController(title: "SUCCESS", message: "Payment Id \(payment_id)", preferredStyle: UIAlertControllerStyle.alert) + let cancelAction = UIAlertAction(title: "OK", style: UIAlertActionStyle.cancel, handler: nil) + alertController.addAction(cancelAction) + //self.view = view that controller manages + self.view.sendSubview(toBack: self.webView) + navBar.isHidden = true + navBar.isUserInteractionEnabled = false + self.view.window?.rootViewController?.present(alertController, animated: true, completion: nil) + self.razorpay = nil +} + +//MARK: Action functions +@IBAction func cancel(_ sender: Any){ + + let alertController = UIAlertController(title: "Cancel Transaction", message: "Are you sure you want to cancel the current transaction ? The page will go back to the checkout page, where you can choose another payment option", preferredStyle: UIAlertControllerStyle.alert) + + let cancelAction = UIAlertAction(title: "Do Not Cancel", style: UIAlertActionStyle.cancel, handler: nil) + let okayAction = UIAlertAction(title: "Cancel", style: UIAlertActionStyle.destructive, handler: { action in + self.razorpay.userCancelledPayment() + } ) + + alertController.addAction(cancelAction) + alertController.addAction(okayAction) + + self.view.window?.rootViewController?.present(alertController, animated: true, completion: nil) +} +```objectivec: ViewController.m + +- (void)onPaymentError:(int)code description:(nonnull NSString *)str andData:(NSDictionary *)response { + + [self.view sendSubviewToBack:webView]; + navbar.hidden = true; + navbar.userInteractionEnabled = false; + razorpay = nil; + + [[[UIAlertView alloc] initWithTitle:@"Error" + message:str + delegate:self + cancelButtonTitle:@"OK" + otherButtonTitles:nil] show]; +} + +- (void)onPaymentSuccess:(nonnull NSString *)payment_id andData:(NSDictionary *)response { + + [self.view sendSubviewToBack:webView]; + navbar.hidden = true; + navbar.userInteractionEnabled = false; + razorpay = nil; + + [[[UIAlertView alloc] initWithTitle:@"Payment Successful" + message:payment_id + delegate:self + cancelButtonTitle:@"OK" + otherButtonTitles:nil] show]; + +} + +-(void) cancel:(id)sender{ + + [[[UIAlertView alloc] initWithTitle:@"Payment Cancelled" message:@"You cancelled the payment. Please retry or let us know at your-help-email@your-domain.com in case of any difficulty." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; + + [self onPaymentError:-1 description:@"User Cancelled Payment" andData:@{}]; + + [razorpay userCancelledPayment]; + +} +``` + +Success handler will receive `payment_id` that you can use later to capture the payment. + +## 1.8 Store the Fields in Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +## 1.9 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +**Handy Tips** + +iOS 9 has higher requirements for secure URLs. As many Indian banks do not comply with the requirements, you can implement the following as a workaround: + +```xml: info.plist +NSAppTransportSecurity + + NSAllowsArbitraryLoads + + +``` + +Add the above to your `info.plist` file. For more information click [here](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW33). + +## 1.10 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/test-integration.md) diff --git a/llm-content/payments/payment-gateway/ios-integration/custom/configurations.md b/llm-content/payments/payment-gateway/ios-integration/custom/configurations.md new file mode 100644 index 00000000..f6ebbdba --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/custom/configurations.md @@ -0,0 +1,360 @@ +--- +title: Additional Configurations +description: Additional configurations available for Razorpay iOS Custom SDK. +--- + +# Additional Configurations + +This section explains the additional configurations available for Razorpay iOS Custom SDK. + +- [Change API Key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/configurations.md#change-api-key) +- [Card Utilities](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/configurations.md#card-utilities) +- [Save Card Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/configurations.md#save-card-details) +- [Fetch Logo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/configurations.md#fetch-logos) + +## Change API Key + +Call the following function after the successful SDK initialization and change the API key: + +```swift: Change API Key +razorpay.changeApiKey("rzp_new_key") +``` + +## Card Utilities + +#### Fetch Card Network + +The SDK provides a method to get the card network of the card. At least six digits of the card number are required to identify the network. The below method fetches the card network for a card. A minimum of 6 digits is required to identify the network. + +```swift: Get Card Network +razorpay.getCardNetwork(fromCardNumber: "cardNumber") +``` + + Possible values are: + + - `visa` + - `mastercard` + - `maestro16` + - `amex` + - `rupay` + - `maestro` and + - `diners` + + If the method cannot identify the network, it returns `unknown`. + +#### Card Number Validation + +The entered card number can be validated using the checksum-based method. + +```swift: Card Number Validation +razorpay.isCardValid("cardNumber") +``` + +#### Fetch Card Number Length for Card Network + +Use the below method to fetch the card number's length for a card network: + +```swift: Fetch Card Number Length for Card Network +razorpay.getCardNetworkLength(ofNetwork: "network") +``` + +#### Save Card Details + +You can save the card details as **tokens** with Razorpay. On repeat visits, the customers can complete the payment quicker by just entering the `cvv` of the card. + +To implement the `save cards` feature in your app: + +1. [Create a Customer](#step-1-create-a-customer) +2. [Create a Token for the Card](#step-2-create-a-token) +3. [Fetch Card Tokens](#step-3-fetch-card-tokens) +4. [Create a Payment using the Token](#step-4-create-a-payment-using-the-token) + +#### Step 1: Create a Customer + +Create a customer, whose card details should be saved, from the Dashboard or [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +/customers + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "fail_existing": "0", + "notes":{ + "landmark": "Razorpay Office Building", + "location": "Bangalore" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name","Gaurav Kumar"); +customerRequest.put("contact","+919000090000"); +customerRequest.put("email","gaurav.kumar@example.com"); +customerRequest.put("fail_existing", "0"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey... decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + "name": "Gaurav Kumar", + "contact": +919000090000, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + } +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create([ + "name" => "Gaurav Kumar", + "contact" => +919000090000, + "email" => "gaurav.kumar@example.com", + "fail_existing" => "0", + "notes" => array( + "notes_key_1" => "Tea, Earl Grey, Hot", + "notes_key_2" => "Tea, Earl Grey... decaf.", + ), +]); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", "Gaurav Kumar"); +options.Add("contact", "9123456780"); +options.Add("email", "gaurav.kumar@example.com"); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "gstin": "29XAbbA4369J1PA", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```javascript: Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_SECRET", +}); + +instance.orders.create({ + name: "Gaurav Kumar", + contact: "+919000090000", + email: "gaurav.kumar@example.com", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey... decaf.", + }, +}); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": +919000090000, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf.", + }, +} + +body, err := client.Customer.Create(data, nil) + +```json: Response +{ + "id": "cust_1Aa00000000001", + "entity": "customer", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "gstin": null, + "notes": { + "landmark": "Razorpay Office Building", + "location": "Bangalore" + } + "created_at": 1234567890 +} +``` + +#### Step 2: Create a Token + +Use the following code to create a token. + +```swift: Swift +internal func showPaymentForm(){ + let options: [String:Any] = [ + "amount": "100", + "currency": "INR", + "order_id": "order_4xbQrmEoA5WJ0G", + "method": "card", + "card[name]": "Gaurav Kumar", + "card[number]": "4386289407660153", + "card[expiry_month]": "9", + "card[expiry_year]": "20", + "card[cvv]": "123", + "customer_id": "cust_1Aa00000000001", + "save": "1", + // And the remaining fields + ] + razorpay.open(options) +} +``` + +For saving the card details on the Checkout, send the following parameters in the `options` dictionary: + +`customer_id` +: `NSString` Unique identifier of the customer. Obtained from the response of the [previous step](#step-1-create-a-customer). + +`save` +: `NSString` Specifies if the card details should be stored as tokens. Possible values are: + - `1`: Saves the card details. + - `0` (default): Does not save the card details. + +> **WARN** +> +> +> **Watch Out!** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +We save the card details entered by the customer as tokens in Razorpay. + +#### Step 3: Fetch Card Tokens + +You can fetch all tokens generated for a customer by sending a request to the Fetch Tokens API. + +/customers/:customer_id/tokens + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X GET https://api.razorpay.com/v1/customers/:cust_1Aa00000000001/tokens +```json: Response +{ + "entity" : "collection", + "count" : 2, + "items" : [ + { + "id" : "token_4lsdksD31GaZ09", + "entity" : "token", + "method" : "card", + "card" : { + "entity" : "card", + "name" : "Gaurav Kumar", + "last4" : 1111, + "network" : "Visa", + "expiry_month" : 12, + "expiry_year" : 2021, + "emi" : true, + "issuer" : "HDFC" + }, + "used_at" : 1473765044, + "created_at" : 1473765044 + }, + { + "id" : "token_4zwefDSCC829ma", + "entity" : "token", + "method" : "card", + "card" : { + "entity": "card", + "name": " Gaurav Kumar", + "network": "MasterCard", + "international": false, + "expiry_month": 9, + "expiry_year": 2020, + "last4" : 1111, + "emi": false + }, + "used_at": null, + "created_at" : 1473765043 + } + ] +} +``` + +All the tokens (saved card details) returned in the response can be shown to the customer when payment creation. + +#### Step 4: Create a Payment using the Token + +On a repeat visit, the customer selects a card from the list of saved cards and completes the payment by entering the `cvv` of the card. Send the `customer_id`, and `token_id`(associated with the saved card) attributes along with `cvv` in the payment request: + +```swift: Swift +internal func showPaymentForm(){ + let options: [String:Any] = [ + "amount": "100", + "currency": "INR", + "order_id": "order_4xbXrmEoB5WApy", + "method": "card", + "customer_id": "cust_1Aa00000000001", + "token": "token_4zwefDSCC829ma", + "card[cvv]": "123", + // And the remaining fields + ] + razorpay.open(options) +} +``` + +## Fetch Logos + +#### Fetch Bank Logo URL + +Use the below method to fetch the bank logo URL. Here `bankCode` is the code of the bank. This should be available in the response received in the `onPaymentMethodsReceived` callback. + +```swift: Fetch Bank Logo URL +razorpay.getBankLogo(havingBankCode: "bankCode") +``` + +#### Fetch Wallet Logo URL + +Use the below method to fetch the wallet logo URL: + +```swift: Fetch Wallet Logo URL +razorpay.getWalletLogo(havingWalletName: "name") +``` + +#### Fetch Wallet Square Logo URL + +Use the below method to fetch the wallet square image logo URL: + +```swift: Fetch Wallet Square Logo URL +razorpay.getWalletSqLogo(havingWalletName: "name") +``` diff --git a/llm-content/payments/payment-gateway/ios-integration/custom/go-live-checklist.md b/llm-content/payments/payment-gateway/ios-integration/custom/go-live-checklist.md new file mode 100644 index 00000000..67b23a54 --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/custom/go-live-checklist.md @@ -0,0 +1,57 @@ +--- +title: 3. Go-live Checklist +description: Check the go-live checklist for Razorpay Payment Gateway Custom iOS integration. +--- + +# 3. Go-live Checklist + +Consider these steps before taking the integration live. + +## Accept Live Payments + +Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + +## Payment Capture + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git a/llm-content/payments/payment-gateway/ios-integration/custom/native-otp.md b/llm-content/payments/payment-gateway/ios-integration/custom/native-otp.md new file mode 100644 index 00000000..f28149ac --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/custom/native-otp.md @@ -0,0 +1,318 @@ +--- +title: 1. Native OTP Integration +description: Integrate the Razorpay Native OTP feature with iOS Custom Checkout. +--- + +# 1. Native OTP Integration + +Razorpay payment gateway supports one-time passwords (OTPs) in the Checkout itself, preventing the customers from being redirected to the ACS page of their respective issuing banks. + +## Advantages + +Using the Native OTP feature, you can: +- Increase success rates. +- Reduce payment failures due to low internet speeds. +- Avoid failures due to redirects to bank pages. +- Offer a consistent experience on mobile and web checkout. + +## Prerequisites + +Before implementing the Native OTP feature, check the following prerequisites: + +1. Log in to the Dashboard and generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md). +2. Integrate with the [Razorpay iOS Custom SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom.md). + +## Integration Steps + +**1.1** [Initialise the Razorpay iOS Custom SDK](#11-initialise-the-razorpay-ios-custom-sdk) + +**1.2** [Check Native OTP enablement using `getCardsFlow` function](#12-check-native-otp-enablement-using-the-getcardsflow) + +**1.3** [Generate OTP using the `razorpay.getCardOtpData` function](#13-generate-otp-using-the-razorpaygetcardotpdata-function) + +**1.4** [Handle Success and Error Events](#14-handle-success-and-error-events) + +**1.5** [Store Details in Server](#15-store-the-fields-in-server) + +**1.6** [Verify Payment Signature](#16-verify-payment-signature) + +### 1.1 Initialise the Razorpay iOS Custom SDK + +Use the code given below to initialise the SDK. + +```swift:Initialise SDK +razorpay = RazorpayCheckout.initWithKey(, +andDelegate:, +withPaymentWebView:) +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> WebView is used to fall back to the current Custom UI flow or redirect to bank flow. +> +> + +### 1.2 Check Native OTP Enablement Using the getCardsFlow Function + +Use the `getCardsFlow` function to determine whether the native OTP flow is enabled for the card BIN. + +Given below is the sample code. + +```swift: getCardsFlow +razorpay.getCardFlows(options){ otp in +if otp == true { } //Native OTP is enabled on the card +else { } //Fallback to current Custom UI flow +} + +``` + +The card details are passed in the options dictionary, as shown below: + +```swift: Payment details +{ + "method": "card", + "card": { + "name": "Gaurav Kumar", + "number": "4386289407660153", + "cvv": "111", + "expiry_month": "11", + "expiry_year": "2023" + }, + "amount": 100, + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "currency": "INR" +} +``` + +### 1.3 Generate OTP Using the razorpay.getCardOtpData Function + +If Native OTP is enabled for the BIN, you should call the `razorpay.getCardOtpData` function. The function callback returns a boolean and informs whether the OTP was successfully sent to the customer or not. Based on this information, you can display the generated OTP UI to the customer. + +Given below is the sample code: + +```swift: getCardOtpData +razorpay.getCardOtpData { otp_generated in +if otp_generated == true { } //Display Native OTP UI +else { } //Fallback to current Custom UI flow +} +``` + +After the OTP is generated, the customer can choose to: +- Submit the OTP. +- Request for the OTP to be resent. +- Cancel the OTP. +- Navigate to the bank page. + +#### Submit the OTP + +The customer needs to submit the OTP for authenticating the payment. The customer receives the OTP through your application frontend. For card payments, the customer receives the OTP via their preferred notification medium, SMS or email. + +> **INFO** +> +> +> +> **Handy Tips** +> +> Do not perform any validation on the length of the OTP since this can vary across banks. However, the OTP should not be blank. +> + +Given below is the function to be invoked when customer clicks the submit button: + +```swift: Submit OTP +func submitRazorpayOtp(otp){ + razorpay.submitOtp(otp) +} +``` + +#### Resend OTP + +There could be situations when customers have to re-generate the OTP. Given below is the function to be invoked when the customer clicks the resend button: + +```swift: Resend OTP +func resendRazorpayOtp(){ + razorpay.resendOtp {otp_resent in + if otp_resent {} + } +} +``` + +#### Cancel the OTP + +Cancel the payment by cancelling the OTP. +Given below is the function to be invoked when customer clicks the cancel button: + +```swift: Cancel OTP +func cancelRazorpayPayment(){ + razorpay.userCancelledPayment() + } +``` + +#### Redirect to Bank Page + +Customers can navigate to the bank page by clicking the redirect button. You need to: + +1. Display the payment WebView passed earlier while initialising the SDK. +2. Invoke the `redirectToBankPage()` function. + +```swift: Invoke redirect function +func redirectToBankPage(){ +razorpay.redirectToBankPage() +} +``` + +### 1.4 Handle Success and Error Events + +You must handle the payment success and error events using the `RazorpayPaymentCompletionProtocol` delegate methods: + +```swift: Payment Success +func onPaymentSuccess(_ payment_id:String, andData response:[[AnyHashable]:Any]) +```swift: Payment Failure +func onPaymentError(_ code: Int32, description:String, andData response:[[AnyHashable] :Any]) +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> To reuse the Razorpay Checkout web integration inside a WebView on Android or iOS, pass a [callback_url](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/callback-url.md) along with other checkout options to process the desired payment. +> + +## 1.5 Store the Fields in Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +## 1.6 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). diff --git a/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods.md b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods.md new file mode 100644 index 00000000..8cb228fc --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods.md @@ -0,0 +1,871 @@ +--- +title: Additional Support For Payment Methods +description: Additional support features available for card, netbanking, EMI and more. +--- + +# Additional Support For Payment Methods + +The Razorpay iOS Custom SDK lets you integrate the supported payment methods on your iOS app's Checkout form. + +## Fetch Payment Methods + +Use the [Fetch Payment Methods API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/build-integration.md#14-fetch-payment-methods) to fetch the payment methods available for your account. + +Below are the sample payloads for each payment method. + +## Debit and Credit Card + +Add the following code where you want to initiate a card payment: + +```swift: ViewController.swift +let options: [String: Any] = [ + "amount": 100, // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + "currency": "INR", // We support international currencies. + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_DBJOWzybf0sJbb", + "method": "card", + "card[name]": "Gaurav Kumar", + "card[number]": "4386289407660153", + "card[expiry_month]": 06, + "card[expiry_year]": 30, + "card[cvv]": "123" +] +razorpay.authorize(options) +```objectivec: ViewController.m +NSDictionary *options = @{ + @"amount": @"100", // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + @"currency": @"INR", // We support international currencies. + @"email": @"gaurav.kumar@example.com", + @"contact": @"9000090000", + @"order_id": @"order_4xbQrmEoA5WJ0G", + @"method": @"card", + @"card[name]": @"Gaurav Kumar", + @"card[number]": @"4386289407660153", + @"card[expiry_month]": @"06", + @"card[expiry_year]": @"30", + @"card[cvv]": @"123" +}; + +[_razorpay authorize: options]; +``` + +Check the [list of supported cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md#supported-cards). + +## Bank Transfer + +This payment method allows you to display your Customer Identifier details on checkout. Your customers can make online bank transfers to this account. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +There are no specific request parameters to be passed. Instead, you must pass the `fetchVirtualAccount` method for your Customer Identifier to get created and the details to appear on the checkout. Know more about [integrating bank transfer with Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer/custom-integration.md). + + to get this feature activated on your account. + +There are no specific request parameters to be passed. Instead, you must pass the `fetchVirtualAccount` method for your Customer Identifier to get created and the details to appear on the checkout. Know more about [integrating bank transfer with Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer/custom-integration.md). + +## EMI on Debit and Credit Cards + +Add the following code where you want to initiate an EMI payment: + +```swift: ViewController.swift +let options: [String: Any] = [ + "amount": 100, // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_DBJOWzybf0sJbb", + "method": "emi", + "emi_duration": 9, + "card[name]": "Gaurav Kumar", + "card[number]": "4386289407660153", + "card[expiry_month]": 06, + "card[expiry_year]": 30, + "card[cvv]": "123" +] +razorpay.authorize(options) +```objectivec: ViewController.m +NSDictionary *options = @{ + @"amount": @"100", // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + @"currency": @"INR", + @"email": @"gaurav.kumar@example.com", + @"contact": @"9000090000", + @"order_id": @"order_4xbQrmEoA5WJ0G", + @"method": @"emi", + @"emi_duration": @"9", + @"card[name]": @"Gaurav Kumar", + @"card[number]": @"4386289407660153", + @"card[expiry_month]": @"06", + @"card[expiry_year]": @"30", + @"card[cvv]": @"123" +}; + +[_razorpay authorize: options]; +``` + +Check the list of supported [debit card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md#supported-banks-for-debit-card-emis) and [credit card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md#supported-banks-for-credit-card-emis) EMI providers. + +## Cardless EMI + +Add the following code where you want to initiate a cardless EMI payment: + +```swift: ViewController.swift +let options: [String: Any] = [ + "amount": 100, // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_DBJOWzybf0sJbb", + "method": "cardless_emi", + "provider": "earlysalary" +] +razorpay.authorize(options) +```objectivec: ViewController.m +NSDictionary *options = @{ + @"amount": @"100", // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + @"currency": @"INR", + @"email": @"gaurav.kumar@example.com", + @"contact": @"9000090000", + @"order_id": @"order_4xbQrmEoA5WJ0G", + @"method": @"cardless_emi", + @"provider": @"earlysalary" +}; + +[_razorpay authorize: options]; +``` + +Check the [list of supported cardless EMI providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md#supported-payment-partners). + +## Netbanking + +Add the following code where you want to initiate a netbanking payment: + +```swift: ViewController.swift +let options: [String: Any] = [ + "amount": 100, // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + "currency": "INR", // We support international currencies. + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_DBJOWzybf0sJbb", + "method": "netbanking", + "bank": "HDFC" +] +razorpay.authorize(options) +```objectivec: ViewController.m +NSDictionary *options = @{ + @"amount": @"100", // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + @"currency": @"INR", // We support international currencies. + @"email": @"gaurav.kumar@example.com", + @"contact": @"9000090000", + @"order_id": @"order_4xbQrmEoA5WJ0G", + @"method": @"netbanking", + @"bank": @"HDFC" +}; + +[_razorpay authorize: options]; +``` + +Check the [list of supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md). + +## Pay Later + +Add the following code where you want to initiate a Pay Later payment: + +```swift: ViewController.swift +let options: [String: Any] = [ + "amount": 100, // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_DBJOWzybf0sJbb", // From response of Step 3 + "method": "paylater", + "provider": "icic" +] +razorpay.authorize(options) +```objectivec: ViewController.m +NSDictionary *options = @{ + @"amount": @"100", // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + @"currency": @"INR", + @"email": @"gaurav.kumar@example.com", + @"contact": @"9000090000", + @"order_id": @"order_4xbQrmEoA5WJ0G", + @"method": @"paylater", + @"provider": @"icic" +}; + +[_razorpay authorize: options]; +``` + +Check the [list of Pay Later providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md#providers). + +## Wallet + +Add the following code where you want to initiate a wallet payment: + +```swift: ViewController.swift +let options = [ + "amount": "100", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "order_id": "order_4xbQrmEoA5WJ0G", + "contact": "9000090000", + "method": "wallet", + "wallet": "mobikwik", + ] +razorpay.authorize(options) +```objectivec: ViewController.m +NSDictionary *options = @{ + @"amount": @"100", + @"currency": @"INR", + @"email": @"gaurav.kumar@example.com", + @"contact": @"9000090000", + @"order_id": @"order_4xbQrmEoA5WJ0G", + @"method": @"wallet", + @"wallet": @"mobikwik" +}; + +[_razorpay authorize: options]; +``` + +## UPI + +Specify `upi` the `method` parameter for UPI payments. The SDK supports two flows: +- Collect +- Intent + +#### Collect Flow + +Customers enter their `vpa` or [phone number](#upi-payments-using-phone-number) on your UI and complete the payments on their respective UPI apps in collect flow. + +You can now pass the `vpa` parameter in the `upi` array as shown below. + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#intent-flow). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md). +> + +#### Sample Code + +The sample code below sends a collect request to the `gaurav.kumar@exampleupi` handle: + +```swift: ViewController.swift +let options: [String: Any] = [ + "amount": 100, // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_DBJOWzybf0sJbb", + "method": "upi", + "_[flow]": "collect", + "vpa": "gaurav.kumar@exampleupi" +] +razorpay.authorize(options) +```objectivec: ViewController.m +NSDictionary *options = @{ + @"amount": @"100", // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + @"currency": @"INR", + @"email": @"gaurav.kumar@example.com", + @"contact": @"9000090000", + @"order_id": @"order_4xbQrmEoA5WJ0G", + @"method": @"upi", + @"_[flow]": @"collect", + @"vpa": @"gaurav.kumar@exampleupi" +}; + +[_razorpay authorize: options]; +``` + + +### UPI Payments Using Phone Number + + You can accept UPI payments using phone number for the collect flow. Follow the steps given below: + + 1. You must collect the customer's phone number from your end. + 2. Check if any `vpa` is associated with the given number and get the `vpa_token` for that number using the sample code given below: + ```swift: ViewController.swift + self.razorpay?.isValidVpa("9000090000", withSuccessCallback: { response in + // VPA Validation Successful + // get and store response.vpa_token for initiating payment + // you will get response.masked_vpa in this response which you can show to the end user + }, withFailure: { responseError in + print(responseError) + // Error: no VPA associated with the given number + }) + ```objectivec: ViewController.m + [razorpay isValidVpa:@"9000090000" withSuccessCallback:^(NSDictionary * _Nonnull success) { + // VPA Validation Successful + // get and store response.vpa_token for initiating payment + // you will get response.masked_vpa in this response which you can show to the end + } withFailure:^(NSDictionary * _Nonnull error) { + NSLog(@"%@", error.description); + // Error: no VPA associated with the given number + }]; + ``` + 3. Pass the `vpa_token` parameter in the `upi` array as shown below: + ```swift: ViewController.swift + let options: [String: Any] = [ + "amount": 5000, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_DBJOWzybf0XXXX", + "method": "upi", + "_[flow]": "collect", + "vpa_token": "f731951149df8903d374b117f921ab41" + ] + razorpay.authorize(options) + ```objectivec: ViewController.m + NSDictionary *options = @{ + @"amount": @"5000", + @"currency": @"INR", + @"email": @"gaurav.kumar@example.com", + @"contact": @"9000090000", + @"order_id": @"order_4xbQrmEoA5XXXX", + @"method": @"upi", + @"_[flow]": @"collect", + @"vpa_token": @"f731951149df8903d374b117f921ab41" + }; + [_razorpay authorize: options]; + ``` + + +#### Intent Flow +Provide your customers with a better payment experience by enabling UPI Intent on your app's Checkout form. In the UPI Intent flow: + +1. You have to fetch the list of UPI supported apps and show it in your app so that the customer can see only valid apps. +2. After the customer selects the app, you have to pass the app name in `options`, with the key `upi_app_package_name` value. Possible values for `upi_app_package_name` are: + - `google_pay` + - `phonepe` + - `paytm` + - `cred` +3. The customer enters their UPI PIN to complete the transaction. +4. The customer returns to your app manually without redirection. + +#### Step 1: Update the info.plist File + +Your iOS app must seek permission from the device to open the UPI PSP app that the customer selects on the Checkout. For this, you must make the following changes to your iOS app's info.plist file: + +```xml: info.plist +LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + +``` + +#### Step 2: Get a List of UPI Supported Apps +This sample code fetches the list of apps on the customer's device that support UPI payments. + +```swift: ViewController.swift +RazorpayCheckout.getAppsWhichSupportUpi { (upiApps) in + print(upiApps) +} +```objectivec: ViewController.m +[RazorpayCheckout getAppsWhichSupportUpiWithHandler:^(NSArray * upiApps) { + NSLog(@"%@", upiApps); +}]; +``` + +The sample code below invokes the UPI intent where the user can select the desired application. + +Ensure that the `upi_app_package_name` is passed from the `getAppsWhichSupportUpi()` method value. Otherwise, it will not pass the validation. + +```swift: ViewController.swift +let options: [String: Any] = [ + "amount": 100, // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_DBJOWzybf0sJbb", + "method": "upi", + "_[flow]": "intent", + "upi_app_package_name": "google_pay" +] +razorpay?.authorize(options) +```objectivec: ViewController.m +NSDictionary *options = @{ + @"amount": @"100", // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + @"currency": @"INR", + @"email": @"gaurav.kumar@example.com", + @"contact": @"9000090000", + @"order_id": @"order_4xbQrmEoA5WJ0G", + @"method": @"upi", + @"_[flow]": @"intent", + @"upi_app_package_name": @"google_pay", +}; + +[_razorpay authorize: options]; +``` + +#### UPI Intent on Recurring Payments + +Configure and initiate a recurring payment transaction on UPI Intent: + +```swift: ViewController.swift +let options: [String:Any] = [ + "key": "YOUR_KEY_ID", + "order_id": "order_DBJOWzybfXXXX", + "customer_id": "cust_BtQNqzmBlXXXX", + "contact": "9000000000", + "amount": 10000, // Amount should match the order amount + "email": "gaurav.kumar@example.com", + "currency": "INR", + "recurring": 1, // This key value pair is mandatory for Intent Recurring Payment. + "upi_app_package_name": "", + "method": "upi", + "_[flow]": "intent" +] +```objectivec: ViewController.m +NSDictionary *options = @{ + @"key": @"YOUR_KEY_ID", + @"order_id": @"order_DBJOWzybfXXXX", + @"customer_id": @"cust_BtQNqzmBlXXXX", + @"contact": @"9000090000", + @"amount": @(10000), // Amount should match the order amount + @"email": @"gaurav.kumar@example.com", + @"currency": @"INR", + @"recurring": @(1), // This key value pair is mandatory for Intent Recurring Payment. + @"upi_app_package_name": @"", + @"method": @"upi", + @"_[flow]": @"intent" +}; +``` + +#### Turbo UPI + +Make UPI payments a faster, 2-step experience for your customers with Razorpay's Turbo UPI SDK. + +1. [Turbo UPI Headless Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-ui.md) +2. [Turbo UPI UI Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-noui.md) + +Know more about the [Customer Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi.md#customer-onboarding-flow) and [Integration Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi.md#next-steps). + +## CRED + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#intent-flow). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md). +> + +Customers can make payments on your iOS app using their CRED Coins as well as the credit cards saved on CRED. The SDK supports two flows: + +1. [Collect](#collect-flow-1) +2. [Intent](#intent-flow-1) + +> **IMP** +> +> +> +> **Handy Tips** +> +> Ensure you have integrated with Razorpay iOS SDK version 1.3.5 or higher. +> +> + +#### Prerequisites + +For both collect and intent flow, you need to pass the `app_offer` parameter in the Orders API. + + /orders + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true +}' +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true + }) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => 'receipt#1', 'amount' => 1000, 'currency' => 'INR', 'app_offer'=> true)); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 1000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("app_offer", true); +Order order = client.Order.Create(options); + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000, + currency: "INR", + receipt: "receipt#1", + app_offer: true +}) + +```go: go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true +} +body, err := client.Order.Create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 1000, currency: 'INR', receipt: 'receipt#1', app_offer: 1 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); // amount in the smallest currency unit +orderRequest.put("currency", "INR"); +orderRequest.put("receipt", "receipt#1"); +orderRequest.put("app_offer", true); + +Order order = razorpay.orders.create(orderRequest); + +```json: Response +{ + "id": "order_FNPoKwCtPyhJOt", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1596703420 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Default is `INR`. + +`app_offer` _optional_ +: `boolean` Allow/do not allow customers to use CRED coins to make payments. This is used to prevent double discounting scenarios where customers have already availed discounts using voucher/coupon, and you do not want them to redeem Coins as well. Possible values: + - `true`: Customer not allowed to use CRED coins to make payment. + - `false` (default): Customer can use CRED coins to make payment. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Collect Flow + +In the Collect Flow, the SDK sends a push notification to the `contact` number passed in the create request. To initiate collect flow, send `app_present` the parameter as `0` while creating the payment. + +```swift: ViewController.swift +let options: [String: Any] = [ + "amount": 100, + "currency": "INR", + "contact": "9000090000", + "order_id": "order_FNPoKwCtPyhJOt", + "email": "gaurav.kumar@example.com", + "method": "app", + "provider": "cred", + "app_present": 0 +] +razorpay?.authorize(options) +```objectivec: ViewController.m +NSDictionary *options = @{ + "amount": @"100", // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + "currency": @"INR", + "email": @"gaurav.kumar@example.com", + "contact": @"9000090000", + "order_id": @"order_4xbQrmEoA5WJ0G", + "method": @"app", + "provider": @"cred", + "app_present": @NO, +}; +[_razorpay payWithCred: options]; +``` + +#### Request Parameters + +Along with the other payment creation request parameters, you must pass: + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it must be `app`. + +`provider` _mandatory if method=app_ +: `string` Name of the PSP app. Here, it must be `cred`. + +`app_present` _mandatory if app=cred_ +: `integer` Sets the payment flow as collect. Possible values: + - `1`: Opens the CRED app on the customer's device. + - `0` (default): Sends a push notification to the customer's device. + +#### Intent Flow + +In Intent Flow, the SDK invokes an intent, which is handled by the Cred app installed on the iOS device. Follow these steps: + +#### Step 1: Update the info.plist File + +You must make the following changes to your iOS app's info.plist file: + +```xml: info.plist +LSApplicationQueriesSchemes + + credpay + +``` + +#### Step 2: Detect CRED App in Customer's Mobile + +- Check if the CRED app is present on the customer's mobile using the `isCredAppAvailable()` method. + + ```swift: ViewController.swift + /// This checks if the app is available on the device or not. + private func isCredAppAvailable() -> Int { + let credURIScheme = "credpay://" // This will open the CRED URL. + if let urlString = credURIScheme.addingPercentEncoding(withAllowedCharacters: NSCharacterSet.urlQueryAllowed) { + if let credURL = URL(string: urlString) { + if UIApplication.shared.canOpenURL(credURL) { + return 1 + } + } + } + return 0 + } + ```objectivec: ViewController.m + - (int)isCredAppAvailable { + NSString *credURIScheme = [NSString stringWithFormat:@"credpay://"]; + NSString *urlString = [credURIScheme stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]]; + NSURL *url = [NSURL URLWithString:urlString]; + if ([[UIApplication sharedApplication] canOpenURL:url]) { + return 1; + } else { + return 0; + } + } + ``` + +- CRED app listens to the URI Schema. + + ```xml: + credpay:// + ``` + + This can be passed in the `uriSchema` parameter in the above function. `isCredAppAvailable()` returns a boolean value informing whether the app is present on the device or not. + + ```swift: ViewController.swift + if (isCredAppAvailable()) { + payWithCredBtn.setText("CRED Pay (Intent Flow)"); + } else { + payWithCredBtn.setText("CRED Pay (Collect Flow)"); + } + ```objectivec: ViewController.m + if ([self isCredAppAvailable]) { + [_payButton setTitle:@"Pay With Cred (Intent Flow)" forState:UIControlStateNormal]; + } else { + [_payButton setTitle:@"Pay With Cred (Collect Flow)" forState:UIControlStateNormal]; + } + ``` + +- If the CRED app is installed, pass the `callback_url` parameter in the payload: + + ```swift: ViewController.swift + options["callback_url"] = "://" + ```objectivec: ViewController.m + [dict setObject:@"://" forKey:@"callback_url"]; + ``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> The redirect happens from the CRED app based on the URL scheme passed in the payload. If not passed, the app will not redirect. +> +> + +#### Listen to CRED Callback + +Listen to CRED callback in the `AppDelegate` class by implementing the `open url` method. Handle the success response. + +```swift: ViewController.swift +func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { + DispatchQueue.main.asyncAfter(deadline: .now() + 4.0) { + /** Post the notification to CustomWebVC **/ + NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CREDPAYURIEVENT"), object: nil, userInfo: ["response":url.absoluteString]) + } + return false +} +```objectivec: ViewController.m +- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options { + [[NSNotificationCenter defaultCenter] postNotificationName:@"CREDPAYURIEVENT" object:NULL userInfo:@{@"response": [url absoluteString]}]; + return NO; +} +``` + +#### Register for Notification + +Register for notification in CustomWebVC using the code sample given below: + +```swift: ViewController.swift +NotificationCenter.default.addObserver(self, selector: #selector(self.statusCredData(_:)), name:NSNotification.Name(rawValue: "CREDPAYURIEVENT"), object: nil); +```objectivec: ViewController.m +[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(statusCredData:) name:@"CREDPAYURIEVENT" object:NULL]; +``` + +Use the code given below to handle payment data: + +```swift: ViewController.swift +@objc func statusCredData(_ notification: NSNotification) { + if let dict = notification.userInfo { + if let uriScheme = dict["response"] as? String { + DispatchQueue.main.async { + self.razorpay?.publishUri(with: uriScheme) + } + } + } +} +```objectivec: ViewController.m +- (void)statusCredData:(NSNotification *) notification { + NSDictionary *dict = [notification userInfo]; + NSString *uriScheme = dict[@"response"]; + dispatch_async(dispatch_get_main_queue(), ^{ + [razorpay publishUri:uriScheme]; + }); +} +``` + +#### Initiate Intent Flow + +To initiate intent flow, send the `app_present` parameter as `1` while creating the payment. + +```swift: ViewController.swift +let options: [String:Any] = [ + "amount": 100, + "currency": "INR", + "contact": "9000090000", + "order_id": "order_FNPoKwCtPyhJOt", + "email": "gaurav.kumar@example.com", + "method": "app", + "provider": "cred", + "app_present": 1, + "callback_url": "://" +] +razorpay.payWithCred(options) +```objectivec: ViewController.m +NSDictionary *options = @{ + @"amount": @"100", // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + @"currency": @"INR", + @"email": @"gaurav.kumar@example.com", + @"contact": @"9000090000", + @"order_id": @"order_4xbQrmEoA5WJ0G", + @"method": @"app", + @"provider": @"cred", + @"app_present": @YES, + @"callback_url": @"://" +}; + +[_razorpay payWithCred: options]; +``` + +#### Request Parameters + +Along with the other payment creation request parameters, you must pass: + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it must be `app`. + +`provider` _mandatory if method=app_ +: `string` Name of the PSP app. Here, it must be `cred`. + +`app_present` _mandatory if app=cred_ +: `integer` Based upon response from the app present function, pass the value in this field. Possible values: + - `1`: Opens the CRED app on customer's device. + - `0` (default): Sends a push notification to the customer's device. + +`callback_url` _mandatory_ +: `string` The URI scheme, using which the CRED app will be opened on the customer's mobile device. diff --git a/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi.md b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi.md new file mode 100644 index 00000000..5f941b26 --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi.md @@ -0,0 +1,98 @@ +--- +title: About Turbo UPI +description: Integrate with Turbo UPI to provide a 2-step UPI payment experience. +--- + +# About Turbo UPI + +Use Razorpay Turbo UPI to make UPI payments faster. Following are the sample screens while making payments using Turbo UPI. + +![Razorpay Turbo UPI Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-in-app-transaction-flow.jpg.md) + +## Advantages + + + - Simplified payment process with just two steps. + - Higher success rate. + - One stop for refunds and disputes. + + + - Higher success rates with a smoother payment experience. + - Complete in-app flow with no redirections gives better control over the user journey. + - Reduce timeout issues significantly since customers never leave your app. + + +> **WARN** +> +> +> +> **Watch Out!** +> +> Due to the sensitive nature of the added libraries, we must ensure that the app is running in a proper environment. Therefore, after integration, the app will not run on Android emulators. +> + +## Prerequisites + +1. Contact our [integrations team](mailto:integrations@razorpay.com) to get access to the sample app repository. +2. Get your mobile number and app whitelisted. + +## Customer Onboarding Flow + +Your customers can link their VPAs to your app with these steps: +1. The customer navigates to your app's checkout screen and taps **Add bank account**. + ![Turbo UPI Add Bank Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-custom-add-bank-account.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> The customer needs to give permission so that we can validate the phone number with the bank. +> ![Turbo UPI SMS Verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-custom-sms-verification.jpg.md) +> + + +> **WARN** +> +> +> **Watch Out!** +> +> As a compliance requirement, you need to get approval from Google for **READ_SMS** permission. +> + +2. The customer's bank details are fetched and linked to the VPA. + + ![Turbo UPI Fetch Bank Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-custom-fetch-account.jpg.md) + + - The customer selects a bank from the list. + ![Turbo UPI Select Bank Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-custom-select-bank-account.jpg.md) + +3. The customer can complete the payment using the new VPA. +![Turbo UPI Payment Successful](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-custom-enter-pin.jpg.md) + +> **INFO** +> +> +> +> **Handy Tips** +> +> If no UPI PIN is set, the customers are prompted to provide their card details, enter an OTP and complete the set-up. +> ![Turbo UPI Enter Card Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-custom-card-details.jpg.md) +> + +## Transaction Flow + +After the customer is onboarded, on the checkout page of your app: + +- The customer selects the linked UPI Account. + ![Razorpay Turbo UPI Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-linked-bank.jpg.md) +- Enters the UPI PIN to complete the payment. + ![Turbo UPI Payment Successful](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-turbo-custom-enter-pin.jpg.md) + +### Related Information + +- [Turbo UPI Headless](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-noui.md) +- [Turbo UPI with UI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-ui.md) +- [Turbo UPI Headless Mock](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integration-noui-mock.md) +- [Turbo UPI with UI Mock](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integration-ui-mock.md) diff --git a/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/error-codes.md b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/error-codes.md new file mode 100644 index 00000000..3a2ed370 --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/error-codes.md @@ -0,0 +1,421 @@ +--- +title: Turbo UPI SDK - Error Codes | iOS Custom Integration +heading: Turbo UPI SDK - Error Codes +description: List of error codes for Turbo UPI SDK. +--- + +# Turbo UPI SDK - Error Codes + +Given below is the list of error codes categorised by error reasons, with relevant descriptions, source and step. + +### Bad Request Errors + +Given below is the list of Bad Request errors. + + +### bank_not_live_on_upi + + - **Description**: The selected bank is not enabled on UPI. Please try using another bank. + - **Source**: gateway + - **Step**: customer_onboarding + + + +### account_does_not_exist + + + + Payment Debit Request + + - **Description**: No accounts found for the selected bank. Please try using another bank. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Payment Credit Request + + - **Description**: Payment was unsuccessful as the receiver's bank account is not valid. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + + + + +### transaction_not_allowed + + + + Payment Debit Request + + - **Description**: Transaction not permitted to the account as per your bank policy. Please contact your bank for more details or try with another bank account. + - **Source**: customer + - **Step**: payment_debit_request + + + +### Payment Credit Request + + - **Description**: Payment not allowed as it got declined by the receiver's bank. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + + + + +### upi_pin_registration_card_expired + + - **Description**: Card used while setting UPI PIN has expired. Please use another debit card or use another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### upi_pin_registration_card_not_found + + - **Description**: Card details used while setting UPI PIN are incorrect. Please re-check and try again. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### upi_pin_registration_card_restricted + + - **Description**: Card used while setting UPI PIN has been blocked by your bank. Please reach out to your bank for more information or try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### bank_technical_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_status_request + + + +### pin_not_set + + - **Description**: Payment was unsuccessful as you have not set the UPI PIN on the app. Try using another method. + - **Source**: customer_psp + - **Step**: payment_authentication + + + +### customer_not_registered + + - **Description**: No bank account is associated with this mobile number. Please try again by adding your account. + - **Source**: gateway + - **Step**: customer_onboarding + + + +### server_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: gateway + - **Step**: payment_authentication + + + +### payment_cancelled_by_user + + - **Description**: Flow was aborted as you pressed back from the PIN screen. Please try again. + - **Source**: customer + - **Step**: payment_authorization + + +### Gateway Errors + +Given below is the list of gateway errors. + + +### incorrect_otp + + - **Description**: You have entered an incorrect OTP. Try again. + - **Source**: customer + - **Step**: customer_onboarding + + + +### otp_expired + + - **Description**: You have entered an expired OTP. Please regenerate OTP and try again. + - **Source**: customer + - **Step**: customer_onboarding + + + +### insufficient_funds + + - **Description**: Payment was unsuccessful due to insufficient funds. Kindly check your balance and try again. + - **Source**: customer + - **Step**: payment_debit_request + + + +### insufficient_funds_mandate_block + + - **Description**: Payment was unsuccessful as the amount in your account is blocked for another payment. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### otp_attempts_exceeded + + - **Description**: You have entered an incorrect OTP too many times. Try again in some time. + - **Source**: customer_psp + - **Step**: customer_onboarding + + + +### account_dormant + + - **Description**: Payment was unsuccessful as the receiver's bank account is inactive. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + +### bank_not_live_on_upi + + - **Description**: Selected bank is not available on UPI. Please try using another bank. + - **Source**: issuer_bank + - **Step**: customer_onboarding + + + +### payment_timed_out + + + + Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_response + + + +### UPI ID Not Reachable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is not reachable at this time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + + + + +### first_transaction_limit_exceeded + + - **Description**: Payment was unsuccessful as you exceeded the first-time transaction limit set by your bank. You can use another bank account or retry after 24 hours. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### transaction_limit_exceeded + + + + Limit Set By Bank Exceeded + + - **Description**: Payment was unsuccessful as you exceeded the transaction limit set by your bank. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### Daily Amount Limit Exceeded + + - **Description**: Payment was unsuccessful as you exceeded the amount limit for the day with this bank account. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + + + + + +### first_time_transaction_freeze_period + + - **Description**: Payment was unsuccessful due to the cooling period set by your bank for first-time user. Please try again after some time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### transaction_frequency_limit_exceeded + + - **Description**: Payment was unsuccessful as the number of transactions exceeds the max limit set by the bank. You can use another bank account or retry after some time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### bank_account_inactive + + + + Issuer Bank Account Inactive + + - **Description**: Payment was unsuccessful as your account is not active. Please try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Receiver Bank Account Inactive + + - **Description**: Payment was unsuccessful as the receiver's bank account is not active. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_debit_request + + + + + + +### server_error + + + + Temporary Issue - Issuer Bank + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: beneficiary_bank + - **Step**: payment_request + + + +### Temporary Issue - Beneficiary Bank + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: issuer_bank + - **Step**: payment_request + + + + + + +### invalid_ifsc + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: gateway + - **Step**: payment_authentication + + + +### upi_pin_registration_card_blocked + + - **Description**: Card used while setting UPI PIN has been blocked by your bank. Please reach out to your bank for more information or try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### bank_technical_error + + + + UPI ID Temporarily Unavailable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: payment_credit_response + + + +### Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: payment_credit_response + + + + + + +### payment_declined + + + + Declined by Bank + + - **Description**: Payment was unsuccessful as it was declined by your bank. Reach out to your bank for more details. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_debit_request + + + + + + +### pin_attempts_exceeded + + - **Description**: You have exceeded the incorrect UPI PIN attempts. You can use another bank account or retry after 24 hours. + - **Source**: customer + - **Step**: payment_authentication + + + +### incorrect_pin + + - **Description**: You have entered incorrect UPI PIN. Please try again with the correct UPI PIN. + - **Source**: customer + - **Step**: payment_authentication + + + +### linked_account_removal_failed + + - **Description**: Unable to remove the account. Please try again. + - **Source**: customer_psp + - **Step**: account_management + + + +### sms_text_not_received + + - **Description**: Something went wrong while sending SMS. Please try again. + - **Source**: gateway + - **Step**: customer_onboarding + + +### Server Errors + +Given below is the list of server errors. + + +### server_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: customer_onboarding + + + +### server_error + + - **Description**: We are facing some trouble completing your request at the moment. Please try again shortly. + - **Source**: internal + - **Step**: payment_authorization diff --git a/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/faqs.md b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/faqs.md new file mode 100644 index 00000000..338edd5e --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/faqs.md @@ -0,0 +1,255 @@ +--- +title: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Turbo UPI. +--- + +# Frequently Asked Questions (FAQs) + +## Payments + + +### 1. What is the protocol if a user enters an incorrect UPI PIN? + + If a user enters a wrong UPI PIN more than three times, the user must reset the PIN or wait 24 hours to make the next transaction. + + + +### 2. On which devices can I enable Turbo UPI? Can it be enabled on the Web? + + Turbo UPI can be enabled only on a mobile app, either iOS or Android, through an SDK integration. This product is currently unavailable as a web-based solution due to the NPCI constraints. Due to security reasons, the NPCI Common Library (UPI PIN screen) can be deployed only when a device is bound to the SIM and the application. + + + +### 3. Are there any transaction limits or restrictions imposed? + + Below are the standard NPCI transaction limits: + - For first-time UPI users, the initial transaction limit is typically up to ₹5,000 with a cooling period of 24 hours. After this cooling period, the transaction limits will be relaxed to the standard limits. + - During this cooling-off period, your bank will reduce the following: + - The amount you can send per UPI payment and the amount you can send in one day. + - The number of UPI payments you can make in one hour/day. + + +> **INFO** +> +> +> **Handy Tips** +> +> The limits during this period and the cooling-off period may vary from bank to bank. Please contact your bank for more information. +> + + + + +### 4. Can users receive money on Turbo UPI-generated UPI ID? + + Yes, users can receive money. However, they can not pay using a collect request from your app. Collect requests will go to the bank's UPI app. + + + +### 5. Can I enable Turbo UPI on all Razorpay checkouts? + + + We have built Turbo UPI in a way that it can be deployed across any Razorpay checkout - [Standard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard/payment-methods/turbo-upi.md), [Custom](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi.md) or S2S. The integration process for each of these options will depend on whether you want to control the user experience. With our Standard Checkout offering, you can complete the integration and start processing payments within 1-2 days. + + + +### 6. Can I extend the instant refund capability to Turbo UPI? + + Yes. If you are already using Razorpay's instant refunds functionality, you can seamlessly apply the same capability to transactions processed via Turbo UPI. To enable this feature, please raise a request at our [support team](https://razorpay.com/support/#request). + + +## Onboarding + + +### 1. What are the specific guidelines or best practices for designing the user interface for UPI payments? + + - Using the Turbo UPI logo is recommended for a better user experience. You can download the logo using the button below. + [Download Turbo UPI Logo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/Turbo-upi-logo.zip.md) + ![Turbo UPI Logo image](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-logo.jpg.md) + - Ensure to have the UPI logo against the account as per UPI guidelines. + - Encourage users to complete the onboarding process by clearly communicating the benefits they will receive. This could include highlighting the simplicity of a one-step payment, showcasing any ongoing offers, or emphasising unique features. + - Ensure users can complete onboarding and continue payment in a single flow. We recommend having an option to continue payment as soon as onboarding is complete. + - Once an account is linked, clearly communicate the bank account using the last four digits and provide ways to add other accounts if users want to. + + + +### 2. Which UPI ID is currently supported on Turbo UPI? + + Turbo UPI supports the use of @axisbank handles for transactions. If your customer already has an existing @axisbank handle, it will be automatically fetched, allowing them to proceed seamlessly. + + +> **INFO** +> +> +> **Handy Tips** +> +> Turbo UPI does not reuse existing @axl or @okaxis handles; only the @axisbank handle is reused. If your customer does not have an existing UPI ID, one will be created automatically during the one-time device binding process. +> + + + + +### 3. How can I encourage users to complete the onboarding process? + + To enhance user engagement and drive onboarding completion, keep the following in view: + 1. Highlight the Value: Clearly explain how users benefit from the "1 Step Payment Experience" and the "Fastest Payment Experience." Users engage when they see the value. + 2. Offer Incentives: Provide initial incentives like discounts, special deals, or rewards. These encourage users to start the onboarding process or make their first payment using the 1 Step Payment Experience. + + +## Integrations + + +### 1. How will I be notified about my payment status? + + Razorpay provides notifications about payment status through webhooks, ensuring you are promptly informed about the status of your transactions. When a payment is processed, Razorpay will trigger a webhook to notify you whether the payment was successful or failed. Refer to the [payment payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payments). + + + +### 2. Is Device Binding necessary for every transaction? + + No, Device Binding is a one-time requirement aimed at verifying the presence of the user's phone number. This verification is achieved through an outgoing SMS from the user's device. Once this initial verification is completed, there is no need to repeat the Device Binding process for every new account linking or transaction. + + +> **WARN** +> +> +> **Watch Out!** +> +> Device Binding may need to be repeated if the user uninstalls the app or clears their storage. The process should be reinitiated in such cases to ensure the account's security. +> + + + +## Miscellaneous + + +### 1. Is there any analytics available about the user journey? + + Yes. There would be events to understand the user journey and each action the user takes, which we can share on a request basis or set up automated reports as required. Additionally, the entire journey will be in your app, and you will have your UI. + +> **INFO** +> +> +> **Handy Tips** + +> - For Custom Checkout: you can install and trigger any additional event on your application. +> - For Standard Checkout: Razorpay can share these details via reports on request. Raise a request to the [support team](https://razorpay.com/support/#request). +> + + + + +### 2. Is Turbo UPI supported with Optimizer? + + Yes, Turbo UPI can be enabled for businesses who use Optimizer. However, a prerequisite is that the business sets a routing rule to direct 100% of traffic towards Razorpay instead of other PGs. Only then will end-users be able to benefit from Turbo UPI. Know more about [Turbo UPI on Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/create-custom-rule.md#turbo-upi-on-optimizer). + + + +### 3. By enabling Turbo UPI, does the business become a TPAP? + + Integrating with Turbo UPI **does not** classify the business as a Third-Party App Provider (TPAP). Consider the following: + - According to the OC 154 Circular, the bank’s SDK is the licensed party, not the business app. Thus, the bank partner must comply with any new developments from NPCI, not the business. + - Razorpay acts as the front-end entity similar to TPAPs like GPay or PhonePe. We provide a wrapper built around the bank’s SDK that can be directly integrated into the business app. This wrapper-SDK now consists of all the front-end capabilities to process in-app payments. + - Businesses using Turbo UPI can enjoy a streamlined onboarding process without requiring lengthy certification procedures with NPCI. They can unlock new features through Razorpay’s SDK in a case-by-case scenario. + - Businesses can now operate as UPI apps for all practical purposes, limited to Peer-to-Merchant (P2M) transactions, thus simplifying their go-to-market experience and delighting customers. + + + +### 4. Who is Razorpay's partner bank for Turbo UPI? Do we plan to integrate with more banks in the future? + + Razorpay has chosen to collaborate with Axis bank as their partner bank. The underlying SDK used is Axis bank's Plugin SDK, over which Razorpay has created a wrapper to support standard P2M flows. + + + +### 5. Is there a customised, business-specific UPI ID that will be created for users who use Turbo UPI? For example, @swiggy? + + No, since the acquiring partner is still Axis bank, the UPI ID created at the backend will be @axisbank. The Turbo UPI solution does not enable businesses to become TPAPs and uses the bank's UPI processing stack. Thus, the UPI ID created will also be the bank's UPI ID and not customised to the business. + + + +### 6. If we take the example of Axis bank being the partner app, does this mean that users can leverage existing UPI ID with Axis bank, and the same gets pre-fetched and stored? Also, does that include only Axis bank app UPI IDs or even 3rd party PSP having Axis handles like @okaxis? + + @axl and @okaxis handles will not be considered existing UPI IDs for Turbo UPI. Users must have an @axisbank handle to reuse it on Turbo UPI. If required, a new UPI ID will be automatically created in the one-time onboarding process. + + In this case, Axis bank, the acquirer bank, has over 10-12 million unique customer UPI IDs. End users with an existing @axisbank UPI ID will experience a shorter and quicker onboarding process (shorter by 1 step). + + + +### 7. Whenever an existing Turbo UPI user (for business A) wants to use Turbo UPI on business B, would the same UPI ID be used, or would a new UPI ID be created? + + Existing UPI ID with @axisbank will be reused on any new subsequent Turbo UPI businesses. There is no requirement to create new UPI IDs for the same customer. Furthermore, as a UPI ID is already available, this would mean one less step (bank selection step) for the end-user in the 1-time device binding process. + + + +### 8. What is the difference between P2P and P2M transactions? + + + - P2P (Peer-to-Peer): This type of transaction occurs between two individuals, where one person transfers funds to another person, both of whom are registered on the UPI platform. + - P2M (Person-to-Merchant): P2M transactions involve a customer making a payment to a merchant for goods or services. In this case, the transaction is between the customer and the merchant. + + + +### 9. What is P2M (Person-to-Merchant) payment? + + P2M (Person-to-Merchant) payment allows customers to make payments to merchants for their goods or services. In this transaction, funds are transferred from the customer to the respective merchant, facilitating a convenient and straightforward way to complete purchases. + + +## TPV + + +### 1. Is TPV supported on Turbo UPI? + + Yes, mandatory TPV is supported on Turbo UPI. Additionally, we have solutioned a way for you to never see TPV failures (a prevalent problem today that impacts success rates by 4%) through Validated Account Linking. + + + +### 2. Is there a way to prevent users from linking a non-KYC account to my business app via Turbo UPI? + + Yes, we have made this possible through Validated Account Linking, wherein you can limit the accounts being linked via Turbo UPI to the business app based on the KYC account details passed to us by the businesses. This prevents end users from making transactions from unauthorised accounts, resulting in 0 TPV failure cases. + + +## Supports + + +### 1. Who will manage the support for transactional queries? + + + Razorpay will handle the support queries end to end. If it is bank-dependent, our team will coordinate with the bank internally and provide you with the latest updates and resolutions. + + + +### 2. Is there support for multiple banks for Turbo UPI? + + The NPCI does not allow a multi-bank model for the P2M plugin (Turbo UPI). + + + +### 3. How are we notified about the downtime if the partner bank faces fluctuations? + + We have built Downtime Detection on Turbo UPI. We will inform you via email or [Webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payment-downtime-started) if there are any fluctuations due to which Success Rates fall. Also, there are [Downtime APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md#entity), which you can consume to know the latest status. + + + +### 4. What if Turbo UPI is down? Will my UPI payments be affected? + + Along with Turbo UPI, you can also display the existing UPI methods (BHIM / GPay / PhonePe / PayTM ), solving for downtimes. During downtime, the Turbo UPI experience will be disabled; your users can still transact via the standard UPI flows via UPI Apps. + + +## Error Code Mapping + + +### 1. How will Turbo UPI provide better error code mapping and insights into customer drop-offs? + + UPI P2M transactions are routed through third-party UPI apps, and neither you nor the payment gateways have visibility into where users drop off or why a payment has failed. With Turbo UPI, Razorpay can provide data points on the following: + - Insightful error codes where you will know why the user's payment failed. + - Points of user drop-offs in the transaction flow. + - Points of friction, that is, where users spend maximum time. + - Conversion rates of transaction flow and account linking flow. + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/error-codes.md). + + + +### 2. If a user registers on an app via Turbo UPI, is the user required to register again on another app? + + On every app, the device binding has to be done by the user. But once the user has linked bank accounts on one app, the user will get those accounts on other apps immediately once device binding is done. diff --git a/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-noui.md b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-noui.md new file mode 100644 index 00000000..3e51db3b --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-noui.md @@ -0,0 +1,976 @@ +--- +title: Integrate Turbo UPI Headless +description: Steps to integrate the Razorpay Turbo UPI Headless SDK with your app. +--- + +# Integrate Turbo UPI Headless + +Use Razorpay Turbo UPI to make UPI payments faster. Follow these steps to integrate with Razorpay Turbo UPI Headless SDK. + + +### Prerequisites + + 1. Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number, app, and GitHub account whitelisted to get access to the `https://github.com/upi-turbo/ios-sample-app` - sample app repository. In this repository, you will find the framework files (libraries for Turbo) and the sample app source code to help you with the integration. Use branch `custom_ui/turbo` to access the sample app and frameworks for Turbo UPI. The sample app workspace is divided into Prod and UAT environment targets with separate pod dependencies. + + 2. Integrate with [Razorpay iOS Custom SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/build-integration.md). + + 3. Add the below line of code to your `Podfile` to install Turbo pods: + + ```ruby: + pod 'razorpay-customui-pod' + + pod 'razorpay-turbo-pod' + ``` + + 4. Import the Turbo plugin as given below: + + ```swift: + import Razorpay + + import TurboUpiPlugin + ``` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - The minimum supported iOS version for using Turbo UPI is currently 11.0. +> - Use the `rzp_test_0wFRWIZnH65uny` API key id for testing on the UAT environment and the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. +> + + + +## 1. Integration Steps + +Follow these steps: + +### 1.1 Initialise the Razorpay Checkout + +Initialise the SDK and set up the Checkout instance (Razorpay) to handle payment outcomes like success and errors by listening to delegate methods. + + ```swift: Swift + var razorpay = + RazorpayCheckout.initWithKey("rzp_test_0wFRWIZnH65uny", + andDelegate: self, + withPaymentWebView: wkWebView, + plugin: + RazorpayTurboUPI.pluginInstance()) + + ```objectivec: Objective C + razorpay = [RazorpayCheckout initWithKey:@"rzp_test_0wFRWIZnH65uny" + andDelegate:self + withPaymentWebView:webView, + plugin:RazorpayTurboUpi, pluginInstance]; + + ``` + +### 1.2 Create a Session Token + +To enhance security, you must create a session token via a server-to-server (S2S) call between your backend and Razorpay's backend. This session token ensures secure communication between the Turbo SDK and Razorpay's systems. + +#### How to Create a Session Token + +1. Trigger the S2S API from your Backend. Use the following API to generate a session token: + + + ```curl: Curl + curl -X POST 'https://api.razorpay.com/v1/upi/turbo/customer/session' \ + -u [YOUR_KEY_ID]:[YOUR_SECRET] \ + -H "Content-type: application/json" \ + -d '{ + "customer_reference": "9000090000" + }' + ``` curl: Success + { + "token": "session_token", + "expire_at": 1730097636 + } + ``` curl: Failure + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "customer_reference is required", + "source": "customer", + "step": "CreateSession", + "reason": "customer_reference_field_is_missing", + "metadata": {} + } + } + ``` + + + + +### Request Parameters + + `customer_reference` _mandatory_ + : `string` A unique identifier for the customer provided by the business. The recommended value is mobile number. For example, `9000090000`. + + + +### Response Parameters + + `token` + : `string` A session token to be used in subsequent session-protected APIs. + + `expire_at` + : `long` Expiry time (in seconds) for the session token, used to optimise session handling and reduce unnecessary reinitialisations. + + `error` + : `object` The request failure due to business or technical failure. + + + + +2. Pass the Generated Token to Turbo SDK. Use the session token in the [initialisation step](#13-initialise-turbo-sdk), ensuring that it is refreshed upon expiry. + +### 1.3 Initialise Turbo SDK + +After generating the session token, initialise the Turbo SDK with the session delegate. + +Use the initialize(...) method to configure the session. + +```swift: Swift +razorpay? + .upiTurboUI? + .initialize(sessionDelegate: Any) +``` + +#### Create/Retry Session Token Mechanism + +**Using Delegate Pattern** + +To ensure a smooth experience during token expiry, the Turbo SDK provides the `TurboSessionDelegate` interface with a `fetchToken` method. This method dynamically fetches and updates the session token without reinitialising the session. + +Initialise the `TurboSessionDelegate` object anonymously and pass it through the initialize method. The SDK will call `fetchToken` as needed and use the provided callback to handle the updated token. This allows you to seamlessly refresh the session by retrieving a new token via a server-to-server (S2S) call. + +Below is an example of creating an instance of the `TurboSessionDelegate` interface using an anonymous object expression: + +```kotlin: Kotlin +extension ViewController: TurboSessionDelegate { + func fetchToken(completion: @escaping (Session) -> Void) { +// fetch token here and once fetched, + // it can be passed back to Turbo SDK using completion delegate + completion(Session(token: ) + } +} +``` + +### 1.4 Handle UPI Account Linking and Payment Flow + +After initialising the Turbo SDK, proceed to securely link UPI accounts and complete the payment flow + +1. You need to link the customer’s UPI account with your app. Use the code samples given below to fetch the UPI account. + + +> **WARN** +> +> +> **Watch Out!** +> +> If the device binding is not completed and `getLinkedUpiAccounts` is triggered, it will return an `OnError` with a `DEVICE_BINDING_INCOMPLETE` error message. +> + + - Get the customer's linked UpiAccount list using the below code. This function can be called from anywhere in the application, providing multiple entry points for customers to link their UPI account with your app. + + ```swift: Swift + razorpay?.upiTurbo?.getLinkedUpiAccounts("9000090000", resultDelegate: self) + + ```objectivec: Objective C + [[razorpay upiTurbo] getLinkedUpiAccountsWithMobileNumber:@"9000090000" delegate:self]; + ``` + + + +### Request Parameters + + `mobile_num` + : `string` The customer's mobile number. + + `Delegate` + : `object` The Delegate to be sent is of type `UpiTurboResultDelegate`. + + + + + - If your customer has already linked the UPI account, use the following code to fetch it. If there are no linked UPI accounts, an empty list is returned. + + ```swift: Swift + extension ViewController: UPITurboResultDelegate { + func onSuccessFetchingLinkedAcc(_ accList: [UpiAccount]) { + if accList.count > 0 { + print("Success Fetching Accounts") + } else { + // call linkNewUpiAccount() + } + } + + func onErrorFetchingLinkedAcc(_ error: TurboUpiPlugin.TurboError?) { + print("Error: \(error?.errorDescription)") + print("Error code: \(error?.errorCode)") + } + } + + ```objectivec: Objective C + (void)onErrorFetchingLinkedAcc:(TurboError * _Nullable)error { + printf("Error %s", [error errorDescription]); + printf("Error code %s", [error errorCode]); + } + (void)onSuccessFetchingLinkedAcc : (NSArray *_Nonnull)accList { + if (accList.count > 0) { + printf("Success Fetching Accounts"); + } else { + // call linkNewUpiAccount() + } + } + ``` + + + +### Response Parameters + + `onSuccess` + : `string` This function is triggered if the list is fetched successfully. `accList` can be empty to indicate that no accounts have been linked yet. + + `onError` + : `string` This function is triggered in case an error is thrown during the retrieval process, either by the Razorpay SDK or the Bank SDK. + + + + +2. If the customer has not linked any UPI account, they can link UPI accounts using the following method: + + - Link one UPI account at a time: + + Use the following code to link the newly created UPI account with your app. This function can be called from anywhere in the application, providing multiple entry points for customers to link their UPI account with your app. + + ```swift: Swift + self.razorpay?.upiTurbo?.linkNewUpiAccount("9000090000", linkActionDelegate: self) + + extension ViewController: UpiTurboLinkAccountDelegate { + func onResponse(_ action: LinkUpiAction) { + switch action.code { + case .sendSms: + guard action.error == nil else { + return + } + action.registerDevice() + case .selectBank: + guard action.error == nil else { + return + } + if let banks = action.data as? [UpiBank] { + let selectedBank = banks[0] + action.selectedBank(selectedBank) + } + case .selectBankAccount: + guard action.error == nil else { + return + } + if let bankAccounts = action.data as? [UpiBankAccount] { + let bankAccount = bankAccounts[0] + action.selectedBankAccount(bankAccount) + } + case .setUpiPin: + let card = UpiCard("last6Digits", "expiry", "cvv") + action.setUpiPin(bankAccount, card) + case .linkAccountResponse: + guard action.error == nil else { + return + } + if let upiAccounts = action.data as? [UpiAccount] { + //save the upi account response + } + default: break + } + } + } + + ```objectivec: Objective C + [[razorpay upiTurbo] linkNewUpiAccountWithMobileNumber:@"" delegate:self]; + (void)onResponse : (LinkUpiAction *_Nonnull)action { + switch (action.code) { + case LinkActionSendSms: + if (action.error == NULL) { + NSArray *banks = (NSArray *)action.data; + [action fetchAllBanks]; + } else { + break; + } + case LinkActionSelectBank: + if (action.error == NULL) { + NSArray *banks = (NSArray *)action.data; + [action selectedBank:banks[0]]; + } else { + break; + } + case LinkActionSelectBankAccount: + if (action.error == NULL) { + NSArray *bankAccounts = + (NSArray *)action.data; + [action selectedBankAccount:bankAccounts[0]]; + } else { + break; + } + case LinkActionSetUpiPin: + if (action.error == NULL) { + UpiCard *card = [[UpiCard alloc] initWith:@"last6Digits" + expiry:@"06" + cvv:"123"]; + [action setUpiPin:bankAccount:card] + } + case LinkActionLinkAccountResponse: + if (action.error == NULL) { + // Handle success / error during new account onboarding + } + } + } + ``` + + `action` + : The current state of customer registration with which you can call further functions. All values for this variable are exposed as an enum for ease of integration. Know more about the [action parameters](#action-parameter-values). + + + +### Request Parameters + + `mobileNumber` _mandatory_ + : `string` Customer's mobile number needed to initialise the SDKs. + + `linkActionDelegate` + : `UpiTurboLinkAccountDelegate` Used as a callback to send a response or failure to you. Given below are the functions: + - `action.code`: This function denotes that the user registration is incomplete and additional action is required. + - `action.data`: This function denotes that the user has registered UpiAccounts on the device. It returns a list of UpiAccount objects, which can then be used to show the details on UI. + - `action.error`: Returns an error object with a description and message relating to a failure in either one of the registration steps or in retrieving the UpiAccount list. + + + + + +> **WARN** +> +> +> **Watch Out!** +> +> If the merchant wants to use the prefetch feature, they need to specifically include a case for prefetch in their code's switch statement. If they do not need prefetching, they can just use a default case in the switch statement to handle all other situations. +> + +3. The **Reward feature** allows you to allocate rewards to users without specific criteria. To avail rewards, you need to configure them from the Dashboard. You can seamlessly integrate this function into your application, providing multiple entry points for users to check their rewards eligibility before completing a payment. + + ```swift: Swift + razorpay.upiTurbo?.getRewardForCustomer( + mobileNumber: "9000090000", + action: RewardAction.payment, + amount: "10000"?, + rewardsDelegate: self + ) + + extension ViewController: UpiTurboCustomerRewardsDelegate { + + func onSuccess(_ reward: CustomerReward) { + + } + + func onFailure(_ error: TurboError?) { + + } + } + + ```objectivec: Objective C + [razorpay.upiTurbo getRewardForCustomerWithMobileNumber:@"9000090000" + action:RewardAction.payment + amount:@"10000" + rewardsDelegate:self]; + + @interface ViewController () + + - (void)onFailure:(TurboError * _Nullable)error { + + } + + - (void)onSuccess:(CustomerReward * _Nonnull)reward { + + } + ``` + + + +### Request Parameters + + `mobileNumber` _mandatory_ + : `string` The customer's mobile number. + + `action` _mandatory_ + : `RewardAction` This parameter specifies the action to check reward eligibility. Possible values: + - `onboarding`: To check reward eligibility for Onboarding. + - `payment`: To check reward eligibility for Payment. + + `amount` _optional_ + : `string` The transaction amount expressed in the currency subunits. + + `rewardsDelegate` _mandatory_ + : `delegate` This parameter allows you to receive callbacks regarding reward eligibility. + + + + +4. To process the payments, call the `authorize` method of custom checkout with the provided payload. Upon receiving the `PaymentData` response, you will also receive `rewardStatus` along with the payment response. Please note that the `rewardStatus` key will be present in the response only if your eligible for a reward. + + ```swift: Swift + + let turboPayload: [AnyHashable: Any] = [ + "currency": "INR", + "amount": "700", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "upi", + "upi": [ + "flow": "in_app" + ], + "order_id": "order_L2MUBUOeFItcpU", //optional + ] + turboPayload["upiAccount"] = upiAccount + razorpay?.authorize(turboPayload) + + extension ViewController: RazorpayPaymentCompletionProtocol { + + func onPaymentSuccess(_ payment_id: String, andData response: [AnyHashable: Any]) { + let rewardStatus = response["rewardStatus"] + // show payment success screen with reward if rewarded + } + + func onPaymentError(_ code: Int32, description str: String, andData response: [AnyHashable: Any]) + { + + } + } + + ```objectivec: Objective C + + NSDictionary *turboPayload = @{ + @"currency" : @"INR", + @"amount" : @"700", + @"email" : @"gaurav.kumar@example.com", + @"contact" : @"9000090000", + @"method" : @"upi", + @"upi" : @{@"flow" : @"in_app"}, + @"order_id" : @"order_4xbQrmEoA5WJ0G", + }; + [turboPayload setObject:upiAccountObject forKey:@"upiAccount"]; + [razorpay authorize:turboPayload]; + + @interface ViewController () + + - (void)onPaymentError:(int32_t)code description:(NSString * _Nonnull)str andData:(NSDictionary * _Nonnull)response { + // handle error + } + + - (void)onPaymentSuccess:(NSString * _Nonnull)payment_id andData:(NSDictionary * _Nonnull)response { + BOOL rewardStatus = [response[@"rewardStatus"] boolValue]; + // show payment success screen with reward if rewarded + } + ``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` The transaction amount expressed in the currency subunit. For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. + + `email` _mandatory_ + : `string` Email address of the customer. + + `contact` _mandatory_ + : `string` Customer's phone number. + + `order_id` _optional_ + : `string` Order id generated via the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + `method` _mandatory_ + : `string` The payment method used by the customer on Checkout. In this case, it is `upi` (default). + + `upi` _mandatory_ + : `array` Details of the UPI payment. + + `flow` _mandatory_ + : `string` Type of the UPI method. In this case, it is `in_app`. + + + + +## Non-Transactional Flows + +You can directly interact with the exposed methods of the Turbo Framework to perform the non-transactional flows listed below. + + +### Fetch Balance + + Fetch the customer's account balance. Call `getBalance()` on the bank account object received from upiAccount. + + ```swift: Swift + razorpay?.upiTurbo?.fetchAccountBalance(upiAccount: upiAccount) { (accountBalance, error) in + if error == nil { + //error + } else if let accountBalance = accountBalance { + //success + print(accountBalance.balance) + } + } + + ```objectivec: Objective C + [razorpay.upiTurbo fetchAccountBalanceWithUpiAccount: upiAccount handler:^(id _Nullable response, NSError * _Nullable error) { + if (error == NULL) { + UpiAccountBalance *accountBalance = (UpiAccountBalance *) response; + printf(accountBalance.balance); + } else { + //error + } + }]; + ``` + + + +### Change UPI PIN + + Provide the customer the ability to change their UPI PIN. Call `changeUpiPin()` on the bank account object received from upiAccount. + + ```swift: Swift + razorpay?.upiTurbo?.changeUpiPin(upiAccount: upiAccount) { (bankAccount, error) in + if error == nil { + //error + } else if let account = bankAccount { + //success + print(“UPI Pin Updated”) + } + } + + ```objectivec: Objective C + [razorpay.upiTurbo changeUpiPinWithUpiAccount: upiAccount handler:^(id _Nullable response, NSError * _Nullable error) { + if (error == NULL) { + UpiBankAccount *bankAccount = (UpiBankAccount *) response; + } else { + //error + } + }]; + ``` + + + +### Reset UPI PIN + + Let your customers reset their UPI PIN. Call `resetUpiPin()` on the bank account object received from getLinkedUpiAccounts(). + + ```swift: Swift + razorpay?.upiTurbo?.resetUpiPin(upiAccount: upiAccount, card: cardObj) { (bankAcount, error) in + if error == nil { + //error + } else if let account = bankAccount { + //success + } + } + + ```objectivec: Objective C + [razorpay.upiTurbo resetUpiPinWithUpiAccount: upiAccount card: card handler:^(id _Nullable response, NSError * _Nullable error) { + if (error == NULL) { + UpiBankAccount *bankAccount = (UpiBankAccount *) response; + } else { + //Error + } + }]; + ``` + + + +### Delink UpiAccount + + Let your customers delink their UpiAccounts. + + ```swift: Delink + razorpay?.upiTurbo?.delink(upiAccount: upiAccount) { (isSuccess, error) in + if let error = error { + //error + } else if isSuccess == true { + //success + } + } + + ```objectivec: Objective C + [razorpay.upiTurbo delinkVpaWithUpiAccount: upiAccount handler:^(id _Nullable response, NSError * _Nullable error) { + if (error == NULL) { + printf("Delinked Successfully"); + } else { + //error + } + }]; + ``` + + +### Additional Features + +To get the device binding status, please use the variable `razorpay.upiTurbo.deviceBindingDone` of type boolean. It indicates whether the device binding, which is a prerequisite for adding UPI accounts, is done with the user's mobile number. + + ```swift: Swift + if RZPTurboUPI.isDeviceOnboarded() { + // User device onboarded + } else { + // Call Link New Account for Device Binding + } + + ```objectivec: Objective C + if ([RZPTurboUPI isDeviceOnboarded]) { + // User device onboarded + } else { + // Call Link New Account for Device Binding + } + ``` + + +### Action Parameter Values + + Following are the constants that are passed in `action.code` parameter in `onResponse`. + + + + **Name** | **Description** | **Next function** + --- + sendSms | SIM details are fetched from the device to show to the user to begin the registration process. | action.fetchAllBanks + --- + selectBank | Object AllBanks returned by SDK for user selection with + - popularBanks +- allBanks + | action.selectedBank(bank) + --- + selectBankAccount | List of accounts related to the user in selected bank. | action.selectedBankAccount(bankAccount) + --- + setUpiPin | Triggered in the event UPI Pin is not set for a selected bank account. | action.setUpiPin(Card) + --- + linkAccountResponse | Triggered if any errors occurred during the onboarding flow or on Onboard completion with UPI Accounts. | NA + + + +## Models Exposed from the SDKs + +The SDKs given below provide access to exposed models for seamless integration. + + +### UpiBankAccount + + + + Method | Return Type | Description + --- + `accountNumber` | String | Masked bank account number. + --- + `beneficiaryName` | String | Name of account holder. + --- + `bank` | String | The bank code. + --- + `state` | UpiBankAccountState | The status of your bank account linked to your UPI. Possible values: - `upiPinNotSet` +- `upiPinSet` +- `linkingInProgress` +- `linkingSuccess` +- `linkingFailed` + + + + + +### UpiAccountBalance + + + + Method | Return Type | Description + --- + `balance` | Integer | Balance amount in paise. + --- + `outstanding` | Integer | Outstanding balance for Credit accounts in paise. + --- + `currency` | String | Currency Type INR. + --- + `id` | String | Bank Account id. + + + + +### UpiAccount + + + + Method | Return Type | Description + --- + `accountNumber` | String | Returns masked bank account number. + --- + `type` | String | The account type. Possible values are `bank_account` or `credit_card`. + --- + `ifsc` | String | Returns IFSC for Bank. + --- + `bankName` | String | Returns the name of the bank. + --- + `bankLogoUrl` | String | Returns the URL to the logo of the PNG image. + --- + `bankPlaceholderUrl` | String | Image URL for bank logo placeholder. + + + + +### UpiCard + + + + Method | Return Type | Description + --- + `expiryMonth` | String | Expiry month of the card. + --- + `expiryYear` | String | Expiry year of the card. The format is `YY`. + --- + `lastSixDigits` | String | Last six digits of the card. + + + + + +### UpiBank + + + + Method | Return Type | Description + --- + `ifsc` | String | IFSC of the bank. + --- + `logo` | String | Bank logo URL. + --- + `name` | String | Name of the bank. + --- + `bankPlaceholderUrl` | String | Image URL for bank logo placeholder. + + + + + +### AllBanks + + + + Method | Return Type | Description + --- + `popularBanks` | `Array` | Returns the list of the top 8 banks. + --- + `banks` | `Array` | Returns a list of all banks. + + + + +### TurboError + + + + Error | Description + --- + `errorCode` | Types of error codes - `BAD_REQUEST_ERROR`: Failure from the client's end (SDK). +- `GATEWAY_ERROR`: Failure either from the Secure Component or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + `errorDescription` | Brief description of the error. + --- + `errorReason` | Specifies the specific reason for the error. + --- + `errorSource` | Indicates the origin of the error. Possible values: - `gateway` +- `issuer_bank` +- `beneficiary_bank` +- `customer_psp` +- `customer` +- `internal` + + --- + `errorStep` | Highlights the stage where the error occurred. + + + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/error-codes.md). + + + +### UpiBankAccountState + + + + Enum Instances | Description + --- + `upiPinNotSet` | This is the state of the bank account when the UPI pin is not set. + --- + `upiPinSet` | This is the state of the bank account when the UPI pin is set. + --- + `linkingInProgress ` | This is the state of the bank account when account linking is in progress. + --- + `linkingSuccess` | This is the state of the bank account when the account is linked successfully. + --- + `linkingFailed` | This is the state of the bank account when the account linking is failed. + + + + +### Consent + + + Method | Return Type | Required | Description + --- + `acknowledge` | Boolean | Mandatory | If the user gives consent to prefetch and link accounts. + --- + `message` | String | Mandatory | The message is shown to the user while requesting prefetch permission. + --- + `timeStamp` | String | Mandatory | The timestamp in seconds when the user accepts the consent. + --- + `type` | ConsentType | Mandatory | The type of consent the user asks. + --- + `data` | [String:Any] | Optional | Provide the list of banks to prefetch from with banks key. + + + + +### ConsentType enum + + + Instances | Description + --- + `prefetchAndLink` | Type of consent to prefetch and link accounts. + + + + +### PrefetchBank + + + Method | Return Type | Description + --- + `priority` | String | Priority of bank. + --- + `id` | String | The IIN of the bank. + --- + `displayName` | String | The name of the bank. + --- + `bankLogo` | String | Bank logo image URL. + + + + +### CustomerReward + + + + Method | Return Type | Description + --- + `eligible` | Boolean | Eligible status of the reward. + --- + `rewards` | `Array` | List of rewards from multiple rewards partners. + + + + +### Reward + + + + Method | Return Type | Description + --- + `rewardPartnerName` | String | Partner name from whom the reward is assigned. + --- + `rewardPartnerLogoUrl` | String | Partner logo URL. + --- + `preAllotText` | String | Customer action before allotting the reward. + --- + `postAllotText` | String | Customer action after allotting the reward. + --- + `couponCode` | String | Coupon code for allotting the reward. + --- + `termsAndConditions` | `Array` | Terms and conditions for allotting the reward. + + + + +### PaymentData + + + + Method | Return Type | Description + --- + `rewardStatus` | Boolean | Reward allotment status. + + + + +### RewardAction + + + + Method | Return Type | Description + --- + `Onboarding` | RewardAction | Action associated with the Onboarding process. + --- + `Payment` | RewardAction | Action associated with the Payment process. + + + +## 2. Test Integration + +We recommend the following: + +- Complete the integration on UAT before using the prod builds. +- Perform the UAT using the Razorpay-provided API keys. + +## 3. Go-live Checklist + +Complete these steps to take your integration live: + +- You should get your app id whitelisted by Razorpay to test on prod. + + +> **INFO** +> +> +> **Handy Tips** +> +> Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number and app whitelisted. +> + +- Import the prod library from the GitHub repository → `https://github.com/upi-turbo/ios-sample-app` `custom_ui/turbo` branch. + +- Switch to Prod environment and podfile. + +- Replace the UAT credential with the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. + +For iOS users, outgoing device binding SMS is editable by default. To ensure these SMS messages are non-editable, you must complete the following steps: + +### Requesting UPI Device Validation Entitlement + + +### 1. Submit a Request on the Apple Developer Portal + + - Log in to the [Apple Developer Portal](https://developer.apple.com/contact/request/upi-device-validation). + - Fill out the necessary details to request permission for the `setUPIVerificationCodeSendCompletion` API, which allows secure, non-editable content for device registration SMS. + - Await approval from Apple. + + + +### 2. Submit Details to NPCI + + Once Apple approves the entitlement, share the request details with NPCI for their approval. Use the format given below for submitting the details: + - Name of the App: + - Functionality (UPI or CBDC App): UPI + - App ID: + - Team ID: + - Request ID: + - Bundle ID: + + + +### 3. Follow the Guidelines for Implementation + + - Ensure your app supports iOS 17 and above. + - Use the `setUPIVerificationCodeSendCompletion` API to comply with NPCI requirements. diff --git a/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-ui.md b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-ui.md new file mode 100644 index 00000000..8b755d08 --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-ui.md @@ -0,0 +1,707 @@ +--- +title: Integrate Turbo UPI UI +description: Steps to integrate Razorpay Turbo UPI with your app. +--- + +# Integrate Turbo UPI UI + +Use Razorpay Turbo UPI to make UPI payments faster. Follow these steps to integrate with the Razorpay Turbo UPI UI SDK. + + +### Prerequisites + + 1. Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number, app, and GitHub account whitelisted to get access to the `https://github.com/upi-turbo/ios-sample-app` - sample app repository. In this repository, you will find the framework files (libraries for Turbo) and the sample app source code to help you with the integration. Use branch `custom_ui/turbo_ui` to access sample app and frameworks for Turbo UPI with UI. + + 2. Integrate with the [Razorpay iOS Custom SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/build-integration.md). + + 3. Add the following lines to your Podfile for Turbo pod installation: + + ```ruby: + pod 'razorpay-customui-pod' + + pod 'razorpay-turbo-custom/ui' + ``` + + 4. Import the Turbo plugin as given below: + + ```swift + import Razorpay + import TurboUpiPluginUI + ``` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - The minimum supported iOS version for using Turbo UPI is currently 12.0. +> - Use the `rzp_test_0wFRWIZnH65uny` API key id for testing on the UAT environment and the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. +> + + + +## 1. Integration Steps + +Follow these steps: + +### 1.1 Initialise the Razorpay Checkout + +Initialise the SDK and set up the Checkout instance (Razorpay) to handle payment outcomes like success and errors by listening to delegate methods. + +```swift: Swift +var razorpay = RazorpayCheckout.initWithKey( + "YOUR_KEY_ID", + andDelegate: self, + withPaymentWebView: wkWebView, + UIPlugin: RazorpayTurboUPI.UIPluginInstance +) + +```objc: Objective C +razorpay = [RazorpayCheckout initWithKey:@"YOUR_KEY_ID" + andDelegate:self + withPaymentWebView:webView + UIPlugin:RazorpayTurboUpi.UIPluginInstance]; +``` + +### 1.2 Create a Session Token + +To enhance security, you must create a session token via a server-to-server (S2S) call between your backend and Razorpay's backend. This session token ensures secure communication between the Turbo SDK and Razorpay's systems. + +#### How to Create a Session Token + +1. Trigger the S2S API from your Backend. Use the following API to generate a session token: + +Environment based URLs: + - UAT: `https://api-web-turbo-upi.ext.dev.razorpay.in` + + - Production: `https://api.razorpay.com` + + Authorization Header Creation: `Base64.encode(${public_key}:${secret})` + + + ```curl: Curl + curl -X POST '{environment_based_url}/v1/upi/turbo/customer/session' \ + -H "Authorization: Basic {Base64 of public key and secret}" \ + -H "Content-type: application/json" \ + -d '{ + "customer_reference": "CUSTOMER_ID/CUSTOMER_MOBILE" + }' + + ``` curl: Success + { + "token": "session_token", + "expire_at": 1730097636 + } + ``` curl: Failure + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "customer_reference is required", + "source": "customer", + "step": "CreateSession", + "reason": "customer_reference_field_is_missing", + "metadata": {} + } + } + ``` + + + + +### Request Parameters + + `customer_reference` _mandatory_ + : `string` A unique identifier for the customer provided by the business. The recommended value is mobile number. For example, `9000090000`. + + + +### Response Parameters + + `token` + : `string` A session token to be used in subsequent session-protected APIs. + + `expire_at` + : `long` Expiry time (in seconds) for the session token, used to optimise session handling and reduce unnecessary reinitialisations. + + `error` + : `object` The request failure due to business or technical failure. + + + + +2. Pass the Generated Token to Turbo SDK. Use the session token in the [initialisation step](#13-initialise-turbo-sdk), ensuring that it is refreshed upon expiry. + +### 1.3 Initialise Turbo SDK + +After generating the session token, initialise the Turbo SDK with the session delegate. + +Use the initialize(...) method to configure the session. + +```swift: Swift +razorpay? + .upiTurboUI? + .initialize(sessionDelegate: Any) +``` + +#### Create/Retry Session Token Mechanism + +**Using Delegate Pattern** + +To ensure a smooth experience during token expiry, the Turbo SDK provides the `TurboSessionDelegate` interface with a `fetchToken` method. This method dynamically fetches and updates the session token without reinitialising the session. + +Initialise the `TurboSessionDelegate` object anonymously and pass it through the initialize method. The SDK will call `fetchToken` as needed and use the provided callback to handle the updated token. This allows you to seamlessly refresh the session by retrieving a new token via a server-to-server (S2S) call. + +Below is an example of creating an instance of the `TurboSessionDelegate` interface using an anonymous object expression: + +```kotlin: Kotlin +extension ViewController: TurboSessionDelegate { + func fetchToken(completion: @escaping (Session) -> Void) { +// fetch token here and once fetched, + // it can be passed back to Turbo SDK using completion delegate + completion(Session(token: ) + } +} +``` + +### 1.4 Handle UPI Account Linking and Payment Flow + +After initialising the Turbo SDK, proceed to securely link UPI accounts and complete the payment flow + +1. You need to link the customer's UPI account with your app. Use the below code samples to fetch the UPI account. + + +> **WARN** +> +> +> **Watch Out!** +> +> If the device binding is not completed and `getLinkedUpiAccounts` is triggered, it will return an `OnError` with a `DEVICE_BINDING_INCOMPLETE` error message. +> + + + - Get the customer's linked UpiAccount list using the below code. This function can be called from anywhere in the application, providing multiple entry points for customers to link their UPI account with your app. + + ```swift: Swift + razorpay?.upiTurboUI?.getLinkedUpiAccounts("9000090000", resultDelegate: self) + + ```objectivec: Objective C + [[razorpay upiTurboUI] getLinkedUpiAccountsWithMobileNumber:@"9000090000" delegate:self]; + ``` + + + +### Request Parameters + + `mobile_num` + : `string` The customer's mobile number. + + `Delegate` + : `object` The Delegate to be sent is of type `UpiTurboResultDelegate`. + + + + + - If your customer has already linked the UPI account, use the following code to fetch it. If there are no linked UPI accounts, an empty list is returned. + + ```swift: Swift + extension ViewController: UPITurboResultDelegate { + func onSuccessFetchingLinkedAcc(_ accList: [UpiAccount]) { + if accList.count > 0 { + print("Success Fetching Accounts") + } else { + // call linkNewUpiAccount() + } + } + + func onErrorFetchingLinkedAcc(_ error: TurboUpiPlugin.TurboError?) { + print("Error: \(error?.errorDescription)") + print("Error code: \(error?.errorCode)") + } + } + + ```objectivec: Objective C + (void)onErrorFetchingLinkedAcc:(TurboError * _Nullable)error { + printf("Error %s", [error errorDescription]); + printf("Error code %s", [error errorCode]); + } + (void)onSuccessFetchingLinkedAcc : (NSArray *_Nonnull)accList { + if (accList.count > 0) { + printf("Success Fetching Accounts"); + } else { + // call linkNewUpiAccount() + } + } + ``` + +2. If the customer has not linked any UPI account, they can link UPI accounts using the following method: + + - Link one UPI account at a time: + + Use the following code to link the newly created UPI account with your app. This function can be called from anywhere in the application, providing multiple entry points for customers to link their UPI account with your app. + + ```swift: Swift + self.razorpay?.upiTurboUI?.linkNewUpiAccount( + mobileNumber: "MOBILE_NUMBER", + color: "", + completionHandler: { upiAccounts, error in + print(upiAccounts) + } + ) + + ```objc: Objective C + [[razorpay upiTurboUI] + linkNewUpiAccountWithMobileNumber:@"MOBILE_NUMBER" + color:@"accent color" + completionHandler:^(id _Nullable response, + NSError *_Nullable error) { + if (error == NULL) { + UpiAccounts *upiAccounts = (UpiAccount *)response; + printf(upiAccounts); + } else { + // handle error + } + }]; + ``` + + + +### Request Parameters + + `mobile_num` _mandatory_ + : `string` Customer's mobile number needed to initialise the SDKs. + + `color` + : `string` Colour in HEX format. + + + + +3. The **Reward feature** allows you to allocate rewards to users without specific criteria. To avail rewards, you need to configure them from the Dashboard. You can seamlessly integrate this function into your application, providing multiple entry points for users to check their rewards eligibility before completing a payment. + + ```swift: Swift + razorpay.upiTurboUI?.getRewardForCustomer( + mobileNumber: "9000090000", + action: RewardAction.payment, + amount: "10000", + rewardsDelegate: self + ) + + extension ViewController: UpiTurboCustomerRewardsDelegate { + + func onSuccess(_ reward: CustomerReward) { + // Handle success + } + + func onFailure(_ error: TurboError?) { + // Handle failure + } + } + + ```objc: Objective C + [razorpay.upiTurboUI getRewardForCustomerWithMobileNumber:@"9000090000" + action:RewardAction.payment + amount:@"10000" + rewardsDelegate:self]; + + @interface ViewController () + + @end + + @implementation ViewController + + - (void)onFailure:(TurboError * _Nullable)error { + // Handle failure + } + + - (void)onSuccess:(CustomerReward * _Nonnull)reward { + // Handle success + } + ``` + + + +### Request Parameters + + `mobileNumber` _mandatory_ + : `string` The customer's mobile number. + + `action` _mandatory_ + : `RewardAction` This parameter specifies the action to check reward eligibility. Possible values: + - `onboarding`: To check reward eligibility for Onboarding. + - `payment`: To check reward eligibility for Payment. + + `amount` _optional_ + : `string` The transaction amount expressed in the currency subunits. + + `rewardsDelegate` _mandatory_ + : `delegate` This parameter allows you to receive callbacks regarding reward eligibility. + + + + +4. To process the payments, call the `authorize` method of custom checkout with the provided payload. Upon receiving the `PaymentData` response, you will also receive `rewardStatus` along with the payment response. Please note that the `rewardStatus` key will be present in the response only if your eligible for a reward. + + ```swift: Swift + let turboPayload: [AnyHashable: Any] = [ + "currency": "INR", + "amount": "700", + "email": "EMAIL_ID", + "contact": "9000090000", + "method": "upi", + "upi": [ + "flow": "in_app" + ], + "order_id": "YOUR_ORDER_ID", + ] + + turboPayload["upiAccount"] = upiAccount + razorpay?.authorize(turboPayload) + + extension ViewController: RazorpayPaymentCompletionProtocol { + + func onPaymentSuccess(_ payment_id: String, andData response: [AnyHashable: Any]) { + let rewardStatus = response["rewardStatus"] + // Show payment success screen with reward if rewarded + } + + func onPaymentError(_ code: Int32, description str: String, andData response: [AnyHashable: Any]) + { + // Handle payment error + } + } + + ```objectivec: Objective C + NSDictionary *turboPayload = @{ + @"currency" : @"INR", + @"amount" : @"700", + @"email" : @"EMAIL_ID", + @"contact" : @"9000090000", + @"method" : @"upi", + @"upi" : @{@"flow" : @"in_app"}, + @"order_id" : @"YOUR_ORDER_ID" + }; + + NSMutableDictionary *mutableTurboPayload = [turboPayload mutableCopy]; + [mutableTurboPayload setObject:upiAccountObject forKey:@"upiAccount"]; + [razorpay authorize:mutableTurboPayload]; + + @interface ViewController () + + @end + + @implementation ViewController + + - (void)onPaymentError:(int32_t)code description:(NSString * _Nonnull)str andData:(NSDictionary * _Nonnull)response { + // Handle payment error + } + + - (void)onPaymentSuccess:(NSString * _Nonnull)payment_id andData:(NSDictionary * _Nonnull)response { + BOOL rewardStatus = [response[@"rewardStatus"] boolValue]; + // Show payment success screen with reward if rewarded + } + ``` + + + +### Request Parameters + + `customer_id` _optional_ + : `string` Unique identifier of the customer to whom the Customer Identifier must be tagged. Create a customer using the [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) + + `amount` _mandatory_ + : `integer` The transaction amount expressed in the currency subunit. For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. + + `email` _mandatory_ + : `string` Email address of the customer. + + `contact` _mandatory_ + : `string` Customer's phone number. + + `order_id` _mandatory_ + : `string` Order id generated via the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + `method` _mandatory_ + : `string` The payment method used by the customer on Checkout. In this case, it is `upi` (default). + + `upi` _mandatory_ + : Details of the UPI payment. + + `flow` _mandatory_ + : `string` Type of the UPI method. In this case, it is `in_app`. + + + + +### Non-Transactional Flow + +You can directly interact with the exposed methods of the Turbo Framework to perform the non-transactional flows listed below. + + +### Manage UPI Accounts + + Let Razorpay SDK manage the linked UpiAccounts on the applications by triggering `manageUpiAccounts()`. + + ```swift: Swift + self.razorpay?.upiTurboUI?.manageUpiAccount( + mobileNumber: "", + color: "" + ) + + ```objc: Objective C + [[razorpay upiTurboUI] manageUpiAccountWithMobileNumber:@"" + color:@"accent color"]; + ``` + + +### Additional Features + + +### Device Binding Status + + To determine the device binding status, use the `RZPTurboUPI.isDeviceOnboarded()` variable, which returns a boolean value. This indicates whether device binding—a prerequisite for adding UPI accounts—has been successfully completed for the user's mobile number. + + ```swift: Swift + if RZPTurboUPI.isDeviceOnboarded() { + // User device onboarded + } else { + // Call Link New Account for Device Binding + } + + ```objectivec: Objective C + if ([RZPTurboUPI isDeviceOnboarded]) { + // User device onboarded + } else { + // Call Link New Account for Device Binding + } + ``` + + + +### Clear SDK + + To clear all SDK data, use `RZPTurboUPI.clearSDKState()`. This will remove all stored SDK values and allow you to start fresh. + + ```swift: Swift + RZPTurboUPI.clearSDKState() + + ```objectivec: Objective C + [RZPTurboUPI clearSDKState]; + ``` + + + +### Models Exposed from the SDKs + +The SDKs given below provide access to exposed models for seamless integration. + + +### UpiAccount + + + + Method | Return Type | Description + --- + `accountNumber` | String | Returns masked bank account number. + --- + `type` | String | The account type. Possible values are `bank_account` or `credit_card`. + --- + `ifsc` | String | Returns IFSC for Bank. + --- + `bankName` | String | Returns the name of the bank. + --- + `bankLogoUrl` | String | Returns the URL to the logo of the PNG image. + --- + `bankPlaceholderUrl` | String | Image URL for bank logo placeholder. + --- + `pinLength` | Integer | Length on UPI PIN. + + + + + +### UpiBankAccount + + + + Method | Return Type | Description + --- + `accountNumber` | String | Account number. + --- + `beneficiaryName` | String | Name of account holder. + --- + `bank` | UpiBank | The bank Object. + --- + `type` | String | The account type. Possible values are `savings`, `current` and `credit`. + + + + + +### UpiBank + + + + Properties | Type | Description + --- + `ifsc` | String | IFSC of the bank. + --- + `logo` | String | Bank logo URL. + --- + `name` | String | Name of the bank. + --- + `bankPlaceholderUrl` | String | Image URL for bank logo placeholder. + + + + +### TurboError + + + + Error | Description + --- + `errorCode` | Types of error codes - `BAD_REQUEST_ERROR`: Failure from the client's end (SDK). +- `GATEWAY_ERROR`: Failure either from the Secure Component or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + `errorDescription` | Brief description of the error. + --- + `errorReason` | Specifies the specific reason for the error. + --- + `errorSource` | Indicates the origin of the error. Possible values: - `gateway` +- `issuer_bank` +- `beneficiary_bank` +- `customer_psp` +- `customer` +- `internal` + + --- + `errorStep` | Highlights the stage where the error occurred. + + + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/error-codes.md). + + + +### CustomerReward + + + + Method | Return Type | Description + --- + `eligible` | Boolean | Eligible status of the reward. + --- + `rewards` | `Array` | List of rewards from multiple rewards partners. + + + + +### Reward + + + + Method | Return Type | Description + --- + `rewardPartnerName` | String | Partner name from whom the reward is assigned. + --- + `rewardPartnerLogoUrl` | String | Partner logo URL. + --- + `preAllotText` | String | Customer action before allotting the reward. + --- + `postAllotText` | String | Customer action after allotting the reward. + --- + `couponCode` | String | Coupon code for allotting the reward. + --- + `termsAndConditions` | `Array` | Terms and conditions for allotting the reward. + + + + +### PaymentData + + + + Method | Return Type | Description + --- + `rewardStatus` | Boolean | Reward allotment status. + + + + +### RewardAction + + + + Method | Return Type | Description + --- + `Onboarding` | RewardAction | Action associated with the onboarding process. + --- + `Payment` | RewardAction | Action associated with the payment process. + + + +## 2. Test Integration + +We recommend the following: + +- Complete the integration on UAT before using the prod builds. +- Perform the UAT using the Razorpay-provided API keys. + +## 3. Go-live Checklist + +Complete these steps to take your integration live: + +- You should get your app id whitelisted by Razorpay to test on prod. + + +> **INFO** +> +> +> **Handy Tips** +> +> Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number and app whitelisted. +> + + +- Import the prod library from the GitHub repository → `https://github.com/upi-turbo/ios-sample-app` custom_ui/turbo_ui branch. + +- Switch to Prod environment and podfile. + +- Replace the UAT credential with the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. + +For iOS users, outgoing device binding SMS is editable by default. To ensure these SMS messages are non-editable, you must complete the following steps: + +### Requesting UPI Device Validation Entitlement + + +### 1. Submit a Request on the Apple Developer Portal + + - Log in to the [Apple Developer Portal](https://developer.apple.com/contact/request/upi-device-validation). + - Fill out the necessary details to request permission for the `setUPIVerificationCodeSendCompletion` API, which allows secure, non-editable content for device registration SMS. + - Await approval from Apple. + + + +### 2. Submit Details to NPCI + + Once Apple approves the entitlement, share the request details with NPCI for their approval. Use the format given below for submitting the details: + - Name of the App: + - Functionality (UPI or CBDC App): UPI + - App ID: + - Team ID: + - Request ID: + - Bundle ID: + + + +### 3. Follow the Guidelines for Implementation + + - Ensure your app supports iOS 17 and above. + - Use the `setUPIVerificationCodeSendCompletion` API to comply with NPCI requirements. diff --git a/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integration-noui-mock.md b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integration-noui-mock.md new file mode 100644 index 00000000..7528491a --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integration-noui-mock.md @@ -0,0 +1,509 @@ +--- +title: Integrate Turbo UPI Headless Mock SDK +description: Steps to integrate the Razorpay Turbo UPI Headless Mock SDK with your app. +--- + +# Integrate Turbo UPI Headless Mock SDK + +Mock SDK is a tool designed to facilitate your integration with Turbo UPI. Unlike conventional integration methods that rely on the stability of partner banks and NPCI UAT environments, Mock SDK removes this dependency, streamlining the integration process. + + +### Advantages + + - **No Dependency on UAT Environment**: Traditional integration methods often encounter obstacles due to issues with UAT environments. Mock SDK removes this roadblock, enabling you to integrate without external dependency. + - **Streamlines Integration**: Mock SDK is designed to create a smoother integration experience, ensuring a hassle-free process. This allows you to quickly offer Turbo UPI services to the users. + - **Effortless Integration for Essential Flows**: Mock SDK simplifies the process of integrating Turbo for important scenarios. This enables you to expand your range of UPI services for customers without dealing with complex requirements. + - **Seamless Transition to Production**: After testing your integration with Mock SDK, you can smoothly transition to the Production SDK for final testing. This ensures a seamless and secure transition from development to live production. + + + +### Prerequisites + + 1. Contact our [integrations team](mailto:integrations@razorpay.com) to get your app, and GitHub account whitelisted to get access to the `https://github.com/upi-turbo/ios-sample-app` - sample app repository. + + - In this repository, you will find the framework files (libraries for Turbo) and the sample app source code to help you do the entire integration. + - Use branch `custom_ui/turbo` to access sample app and framework for Turbo UPI. The sample app workspace is divided into Prod, UAT and Mock environment targets with separate pod dependencies. + + 2. Integrate with the [Razorpay iOS Custom SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/build-integration.md). + + 3. Add the below line of code to your `Podfile`, to install Turbo pods: + + ```ruby: + pod 'razorpay-customui-pod' + pod 'razorpay-turbo-pod' + ``` + + 4. Import the Turbo plugin as given below: + + ```swift: + import Razorpay + import TurboUpiPlugin + ``` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - The minimum supported iOS version for using Turbo UPI is currently 11.0. +> - Use the `rzp_test_vacN5cmVqNIlhO` API key id for testing on the Mock environment. +> + + + +## 1. Integration Steps + +Follow these steps to integrate with [Turbo UPI Headless](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-noui.md#turbo-headless-integration-and-payment-flow). + +## 2. Test Integration + +Razorpay has three environments: Mock, UAT and Prod. We recommend the following: + +- Complete the integration with the Mock environment. +- Complete the developer testing using the [Test Data](#21-test-data) to cover all the [Test Cases](#22-test-case-coverage). +- Perform the UAT using the Razorpay-provided API keys. + +### 2.1 Test Data + +Use the following data to test the integration. + + +### Bank List + + + Bank id | Bank Name | IFSC + --- + 1 | Axis | AXIS0000001 + --- + 2 | SBI | SBI00000001 + --- + 3 | HDFC | HDFC0000001 + --- + 4 | Yes | YES00000001 + + + + +### Bank Accounts + + + Bank id | Bank Name | Account Number | Beneficiary Name | Account Balance | UPI PIN | ATM PIN | Card Number | Expiry Date | CVV | OTP | Type + --- + 1 | Axis Bank | xxxx0001 | Pratheek | ₹100 | Not Set | 1234 | 8000110001 | Any Future Date | Random CVV | 123456 | Savings + --- + 1 | Axis Bank | 8888 88xx xxxx 0002 | Pratheek | ₹9,000 | 123456 | 1234 | 8888 8888 8811 0002 | Any Future Date | Random CVV | 123456 | Credit Card + --- + 2 | SBI Bank | xxxx0001 | Kushaal Singla | ₹9,000 | Not Set | 1234 | 9000110001 | Any Future Date | Random CVV | 123456 | Savings + --- + 2 | SBI Bank | 8888 88xx xxxx 0003 | Kushaal Singla | ₹9,000 | Not Set | 1234 | 8888 8888 8811 0003 | Any Future Date | Random CVV | 123456 | Credit Card + --- + 2 | SBI Bank | xxxx0203 | Kushaal Singla | ₹99,999 | 123456 | 1234 | 9599110203 | Any Future Date | Random CVV | 123456 | Savings + + + +### 2.2 Test Case Coverage + +Following are the various scenarios based on the dependencies. + + +### Dependencies and Scenarios + + + S.No | Dependency | Positive Scenarios | Negative Scenarios + --- + 1 | Device Binding | Device Binding | - SIM not found +- SMS sending failed +- Permissions not given + + --- + 2 | Account Linking | - Account found +- PIN set +- PIN not set + | No account for that number + --- + 3 | UPI ID generation | - UPI ID present (roaming profile) +- New UPI ID creation + | NA + --- + 4 | - UPI PIN Management +- Change PIN +- Reset PIN + | PIN Changed/Set Successfully | - Invalid PIN +- PIN not matching +- Incorrect OTP +- Incorrect card details(Reset PIN) + + --- + 5 | P2M Transaction - In-App Payments | Payment Successful | - Invalid PIN +- Timeout +- Insufficient Balance + + --- + 6 | Check Balance | Show Balance | Invalid PIN + --- + 7 | Delink Account | Success Only | NA + --- + 8 | Prefetch and Link accounts | Fetch existing PIN set and PIN not set accounts | No account exists for that number + + + +### 2.3 How to Test? + +Given are the various test cases and their sequential steps. + + +### 2.3.1 Device Binding Success + + In the scenario of successful device binding, follow these simple steps: + 1. Enter a mobile number which exists in the user's device. + 2. Call the `razorpay.upiTurbo.linkNewUpiAccount` method. + 3. The expected response should be `LinkUpiAction = .selectBank` with `action.error==null` (no errors) and `action.data != null` indicating a list of available banks for selection. + + + +### 2.3.2 SIM not found + + In the event of a SIM card not being found, follow these steps: + 1. Remove all SIM cards from the device. + 2. Enter a mobile number which exists in the user's device. + 3. Call the `razorpay.upiTurbo.linkNewUpiAccount` method. + 4. The expected response should be `LinkUpiAction = .linkAccountResponse` with `action.error!=null` including an error message sim not found. + + + +### 2.3.3 Account Found + + In the scenario where an account is found, follow these steps: + 1. Enter a mobile number which exists in the user's device. + 2. Call the `razorpay.upiTurbo.linkNewUpiAccount` method. + 3. The SDK response should change to `LinkUpiAction = .sendSms` with `action.error==null` (no errors). + 4. Call `action.registerDevice()`, send the SMS when prompted on the screen. + 5. The SDK response should change to `LinkUpiAction = SELECT_BANK` with `action.error==null` (no errors) and `action.data != null` indicating a list of available banks for selection. + 6. Call `action.selectedBank()` with the Axis Bank or SBI Bank object from `action.data` as mentioned in the [Test Data](#21-test-data). + 7. The expected response should be `LinkUpiAction = .selectBankAccount` with no errors `action.error==null` and a list of available bank accounts for selection `action.data != null`, with at least one object. + + + +### 2.3.4 PIN + + + + PIN set + + When it comes to setting or managing your PIN, follow these steps: + 1. Enter a mobile number which exists in the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccount` method. + 3. The SDK response changes to `LinkUpiAction = .sendSms` with no errors `action.error==null`. + 4. Call `action.registerDevice()` and send the SMS when prompted on the screen. + 5. The SDK response changes to `LinkUpiAction = .selectBank` with no errors `action.error==null` and a list of available banks for selection `action.data != null`. + 6. Call `action.selectedBank()` with the SBI Bank object from `action.data` as mentioned in the [Test Data](#21-test-data). + 7. The expected response should be `LinkUpiAction = .selectBankAccount` with no errors `action.error==null` and a list of available bank accounts for selection `action.data != null`. + 8. Select the bank account ending with xxxx0203, as mentioned in the [Test Data](#21-test-data). + 9. The expected response should be `LinkUpiAction = .linkAccountResponse` with no errors `action.error==null` and UpiAccounts data available `action.data != null`. `action.data` will have a list of UpiAccounts for which PIN is already set and UPI ID linked, including the newly linked account as the first object. + + + +### PIN not set + + When dealing with scenarios where a PIN is not set, follow these steps: + 1. Enter a mobile number which exists in the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccount` method. + 3. The SDK response changes to `LinkUpiAction = .sendSms` with no errors `action.error==null`. + 4. Call `action.registerDevice()` and send the SMS when prompted on the screen. + 5. The SDK response changes to `LinkUpiAction = .selectBank` with no errors `action.error==null` and a list of available banks for selection `action.data != null`. + 6. Call action.selectedBank() with Axis Bank or SBI Bank object from action.data as mentioned in the [Test Data](#21-test-data). + 7. The expected response should be `LinkUpiAction = .selectBankAccount` with no errors `action.error==null` and a list of available bank accounts for selection `action.data != null`. + 8. Call `action.selectedBankAccount()` with bank account ending with xxxx0001 object from `action.data` as mentioned in the [Test Data](#21-test-data). + 9. The expected response should be `LinkUpiAction = .setUpiPin` with no errors `action.error==null` and bank account data available `action.data != null`. + + + +### No Account for Specified Number + + When there is no account associated with a particular number, follow these steps: + 1. Enter a mobile number which exists in the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccount` method. + 3. The SDK response changes to `LinkUpiAction = .sendSms` with no errors `action.error==null`. + 4. Call `action.registerDevice()` and send the SMS when prompted on the screen. + 5. The SDK response changes to `LinkUpiAction = .selectBank` with no errors `action.error==null` and a list of available banks for selection `action.data != null`. + 6. Call `action.selectedBank()` with HDFC object from `action.data` as mentioned in the [Test Data](#21-test-data). + 7. The expected response should be `LinkUpiAction = .selectBankAccount` with no errors `action.error==null` and an empty array for `action.data`. + + + +### PIN set Successfully + + For a successful PIN setup, follow these steps: + 1. Enter a mobile number which exists in the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccount` method. + 3. The SDK response changes to `LinkUpiAction = .sendSms` with no errors `action.error==null`. + 4. Call `action.registerDevice()` and send the SMS when prompted on the screen. + 5. The SDK response changes to `LinkUpiAction = .selectBank` with no errors `action.error==null` and a list of available banks for selection `action.data != null`. + 6. Call `action.selectedBank()` with Axis Bank or SBI Bank object from `action.data` as mentioned in the [Test Data](#21-test-data). + 7. The expected response should be `LinkUpiAction = .selectBankAccount` with no errors `action.error==null` and a list of available bank accounts for selection `action.data != null`. + 8. Call `action.selectedBankAccount()` with the bank account ending with xxxx0001 object from `action.data` as mentioned in the [Test Data](#21-test-data). + 9. The expected response should be `LinkUpiAction = .setUpiPin` with no errors `action.error==null` and data available `action.data != null`. + 10. Call `action.setUpiPin()` with bank account and card details data as mentioned in the [Test Data](#21-test-data). + 11. Submit OTP (as mentioned in the Test Data) and New PIN on Mock NPCI screen. + 12. The expected final response should be `LinkUpiAction = .linkAccountResponse` with no errors `action.error==null` and data available `action.data != null`. `action.data` will have a list of UPI Accounts for which PIN is already set and UPI ID linked. The list will include the newly linked account as the first object. + + + +### PIN Changed Successfully + + + When you need to change your PIN successfully, follow these steps: + 1. Call `razorpay.upiTurbo.changeUpiPin` with the specified upiAccount. + 2. Submit the old and new PIN on the Mock NPCI screen. + 3. Expect a callback with `onSuccess`. Your PIN change has been successfully completed. + + + +### Invalid PIN or PIN not Matching + + When dealing with an invalid PIN or a PIN that does not match, follow these steps: + 1. Call `razorpay.upiTurbo.changeUpiPin` with the specified upiAccount. + 2. Submit incorrect old and new PIN on the Mock NPCI screen. + 3. Expect a callback with an error that is not null. This indicates that the provided PIN was either invalid or did not match the expected PIN. + + + +### Incorrect OTP + + In situations where an incorrect OTP is encountered, follow these steps: + 1. Enter a mobile number which exists in the user's device. + 2. Call `razorpay.upiTurbo.linkNewUpiAccount` method. + 3. The SDK response should change to `LinkUpiAction = .sendSms` with `action.error==null` no errors. + 4. Call `action.registerDevice()`, and send the SMS when prompted on the screen. + 5. The SDK response should change to `LinkUpiAction = .selectBank` with `action.error==null` (no errors) and a list of available banks for selection `action.data != null`. + 6. Call `action.selectedBank()` with the Axis Bank or SBI Bank object from `action.data` as mentioned in the [Test Data](#21-test-data). + 7. The expected response should be `LinkUpiAction = .selectBankAccount` with `action.error==null` (no errors) and a list of available bank accounts for selection `action.data != null`. + 8. Call `action.selectedBankAccount()` with the bank account ending with xxxx0001 object from action.data as mentioned in the [Test Data](#21-test-data). + 9. The expected response should be `LinkUpiAction = .setUpiPin` with `action.error==null` and action.`data != null`. + 10. Call `action.setUpiPin()` with bank account and card details data as mentioned in the [Test Data](#21-test-data). + 11. Submit any random incorrect OTP except for 123456 as mentioned in the [Test Data](#21-test-data) and the new PIN on the Mock NPCI screen. + 12. The expected final response should be `LinkUpiAction = .linkAccountResponse` with `action.error!=null`. + + + +### Incorrect Card Details (Reset PIN) + + When dealing with resetting your PIN with incorrect card details, follow these steps: + 1. Call the `razorpay.upiTurbo.resetUpiPin` method, providing an incorrect PIN and card details not mentioned in the [Test Data](#21-test-data). + 2. Expect a callback, and if the response includes an error `error != nil`, it signifies that the reset attempt has failed due to incorrect card details. + + + + + + + +### 2.3.5 UPI ID + + + + UPI ID Present (Roaming Profile) + + When working with scenarios involving the presence of a UPI ID (Roaming Profile), follow these steps: + 1. Call `razorpay.upiTurbo.linkNewUpiAccount` method. + 2. The SDK response should change to `LinkUpiAction = .sendSms` with `action.error==null` no errors. + 3. Call `action.registerDevice()` and send the SMS when prompted on the screen. + 4. The expected final response should be `LinkUpiAction = .linkAccountResponse` with `action.error==null` and `action.data != null`. `action.data` will contain a list of UPI Accounts for which the PIN is already set, and the UPI ID is linked. + + + +### New UPI ID Creation + + When dealing with scenarios related to UPI ID, such as new UPI ID creation, follow these steps: + 1. Enter a mobile number which exists in the user's device. + 2. Call the `razorpay.upiTurbo.linkNewUpiAccount` method. + 3. The SDK response should change to `LinkUpiAction = .sendSms` with action.`error==null` no errors. + 4. Call `action.registerDevice()` and send the SMS when prompted on the screen. + 5. The SDK response should change to `LinkUpiAction = .selectBank` with `action.error==null` no errors and a list of available banks for selection `action.data != null`. + 6. Call `action.selectedBank()` with Axis Bank or SBI Bank object from `action.data` as mentioned in the [Test Data](#21-test-data). + 7. The expected response should be `LinkUpiAction = .selectBankAccount` with `action.error==null` no errors and a list of available bank accounts for selection `action.data != null`. + 8. Call `action.selectedBankAccount()` with the bank account ending with xxxx0001 object from `action.data` as mentioned in the [Test Data](#21-test-data). + 9. The expected final response should be `LinkUpiAction = .linkAccountResponse` with `action.error==null` and a`ction.data != null`. `action.data` will contain a list of UPI Accounts for which the PIN is already set, and the UPI ID is linked. The list will include the newly linked account as the first object. + + + + + + + +### 2.3.6 Transactions + + + + Payments Successful + + When it comes to transactional scenarios, with a focus on ensuring a successful payment, follow these steps: + 1. Begin by following the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui.md#1-integration-steps), specifically the `submit` method. + 2. Enter an amount that is lower than the account balance. + 3. Enter the correct PIN on the Mock NPCI screen. + 4. Subsequently, you will receive a callback on `onPaymentSuccess`. This indicates that the payment has been successfully processed. + + +> **INFO** +> +> +> **Handy Tips** +> +> The account balance remains unchanged, and the paid amount is not deducted. +> + + + + +### Invalid PIN + + In situations where an invalid PIN is entered, follow these steps: + 1. Begin by following the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui.md#1-integration-steps), specifically the `submit` method. + 2. Enter an amount lower than the account balance mentioned in [Test Data](#21-test-data). + 3. Enter the incorrect PIN on the Mock NPCI screen. + 4. Subsequently, you will receive a callback on `onPaymentError`. This indicates that an error occurred during the payment process due to the invalid PIN. + + + +### Timeout + + When dealing with transactional scenarios, specifically focusing on handling timeouts, follow these steps: + 1. Begin by following the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui.md#1-integration-steps), specifically the `submit` method. + 2. Enter the amount as 24. + 3. Enter the correct PIN on the Mock NPCI screen. + 4. Subsequently, you will receive a callback on `onPaymentError`. This indicates that an error occurred during the payment process due to a timeout. + + + +### Insufficient Balance + + When it comes to transactional scenarios with a focus on handling insufficient balance, follow these steps: + 1. Begin by following the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi/integration-noui.md#1-integration-steps), specifically the `submit` method. + 2. Enter an amount greater than the account balance as mentioned in [Test Data](#21-test-data). + 3. Enter the correct PIN on the Mock NPCI screen. + 4. Subsequently, you will receive a callback on `onPaymentError`. This indicates that an error occurred during the payment process due to insufficient balance. + + + +### Show Balance + + For scenarios related to checking your balance, follow these steps: + 1. Call the `razorpay.upiTurbo.getBalance` method. + 2. Enter the correct PIN on the Mock NPCI screen. + 3. Expect a callback with `AccountBalance` and `error != nil`. This confirms that you will receive the requested balance information. + + + +### Check Balance - Invalid PIN + + When it comes to scenarios focused on checking your balance, follow these steps: + 1. Call the `razorpay.upiTurbo.getBalance` method. + 2. Enter an incorrect PIN on the Mock NPCI screen. + 3. Expect a callback with `error != nil`. This indicates that an error occurred during the payment process due to the invalid PIN. + + + +### Delink Account - Success + + When it comes to scenarios related to delinking your account, follow these steps: + 1. Call the `razorpay.upiTurbo.delink` method. + 2. Expect a callback with `error != nil`. This confirms that your account has been successfully delinked. + + + + + + + +### 2.3.7 Prefetch + + + + 2.3.7.1 First Time Onboarding + + + + Onboarding Success + + Follow these simple steps for the first time onboarding: + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurbo.prefetchAndLinkUpiAccounts` method. + 3. The SDK's initial response should shift to `LinkUpiAction = .consent` with `action.error==null` indicating no errors and `action.data != null` showing a list of prefetch banks. + 4. Prompt the user to grant the necessary consent by calling `action.consents([consent])`. + 5. The SDK response should change to `LinkUpiAction = .sendSms` with `action.error==null` no errors. + 6. Use `action.registerDevice()` to send the SMS when prompted on the screen. + 7. After successful device binding, account fetching will commence automatically. + 8. Expect the final response to be `LinkUpiAction = .linkAccountResponse` with `action.error==null` no errors and `action.data != null`. The `action.data` will contain `UpiAllAccounts` as a response, which includes `accountsWithPinSet` and `accountsWithPinNotSet`. + 9. Once the account is successfully linked, you will receive a callback asynchronously in the `LinkUpiAction = .linkAccountResponse` with updated lists. + + + +### Denied Prefetch Consent + + For the first time onboarding, follow these steps: + + 1. Enter a mobile number that exists on the user's device. + 2. Initiate the onboarding process by calling `razorpay.upiTurbo.prefetchAndLinkUpiAccounts` method. + 3. Verify the SDK response, which should transition to `LinkUpiAction = .consent` with `action.error==null` indicating no errors and `action.data != null`, providing a list of prefetchBanks. + 4. Proceed by calling `action.consents([consent])` with acknowledge set to false. + 5. Check the SDK response, which should change to `LinkUpiAction = .sendSms` with `action.error==null` indicating no errors. + 6. Use `action.registerDevice()` to send the SMS when prompted on the screen. + 7. After successful device binding, expect the response to transition to `LinkUpiAction = .selectBank` with `action.error==null` indicating no errors and `action.data != null`, indicating a list of available banks for selection. + + + +### PIN Set + + Follow the below steps to set or manage your PIN: + 1. Call the `action.setUpiPin(bankAccount, card)` method to select the desired bank account fetched during the prefetch process. + 2. On the next screen, enter the bank OTP from the [Test Data](#21-test-data) and proceed. + 3. Enter and confirm the PIN on the subsequent screens. + + + + + + + + +### 2.3.7.2 Accounts Already Onboarded + + Follow these steps for accounts that are already onboarded: + 1. Call the `razorpay.upiTurbo.prefetchAndLinkUpiAccounts` method. + 2. After successful device binding, the expected SDK response should be `LinkUpiAction = .selectBank` with `action.error==null` and `action.data != null`. This response should not have any errors and should contain relevant data. + + + + + + +### 2.4 Additional Cases + +Businesses should have the capability to display a user-friendly message to their customers for certain special or additional error scenarios. The SDK is equipped to simulate some of these cases. + +Action | Input Data | Code | Description +--- +Pay | Amount = ₹24 | 91 | Timeout +--- + +> **WARN** +> +> +> +> **Watch Out!** +> +> - Device Binding will only work if the user has at least one SIM card in their mobile device. +> - Users can set/reset the UPI PIN. The configured PIN will be used to validate the transaction. +> - Based on the [Test Data](#21-test-data) for bank accounts, choose a bank for a single, multiple or no bank account. +> - Use the same ATM PIN and card Number mentioned in the [Test Data](#21-test-data). +> - The UPI PIN will revert to its default setting or be removed when you uninstall or clear storage. +> - Amount ₹24 is blocked for special cases. Please refer to [Additional Cases](#24-additional-cases). +> - Only one TPV whitelisted account (ending with xxxx0203) is permitted. Payments made using any other accounts will fail with the error Payment failed because the account linked to VPA is invalid. +> - In the Mock environment, multiple payments can be made for a given `order_id`, which differs from the production environment where this is not allowed. +> + +## 3. Go-live Checklist + +Complete this [Go-live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-noui.md#3-go-live-checklist) to take your integration live. diff --git a/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integration-ui-mock.md b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integration-ui-mock.md new file mode 100644 index 00000000..5ae34bc1 --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integration-ui-mock.md @@ -0,0 +1,529 @@ +--- +title: Integrate Turbo UPI UI Mock SDK +description: Steps to integrate the Razorpay Turbo UPI UI Mock SDK with your app. +--- + +# Integrate Turbo UPI UI Mock SDK + +Mock SDK is a tool designed to facilitate your integration with Turbo UPI. Unlike conventional integration methods that rely on the stability of partner banks and NPCI UAT environments, Mock SDK removes this dependency, streamlining the integration process. + + +### Advantages + + - **No Dependency on UAT Environment**: Traditional integration methods often encounter obstacles due to issues with UAT environments. Mock SDK removes this roadblock, enabling you to integrate without external dependency. + - **Streamlines Integration**: Mock SDK is designed to create a smoother integration experience, ensuring a hassle-free process. This allows you to quickly offer Turbo UPI services to the users. + - **Effortless Integration for Essential Flows**: Mock SDK simplifies the process of integrating Turbo for important scenarios. This enables you to expand your range of UPI services for customers without dealing with complex requirements. + - **Seamless Transition to Production**: After testing your integration with Mock SDK, you can smoothly transition to the Production SDK for final testing. This ensures a seamless and secure transition from development to live production. + + + +### Prerequisites + + 1. Contact our [integrations team](mailto:integrations@razorpay.com) to get your app, and GitHub account whitelisted to get access to the `https://github.com/upi-turbo/ios-sample-app` - sample app repository. + + - In this repository, you will find the framework files (libraries for Turbo) and the sample app source code to help you with the integration. + - Use branch `custom_ui/turbo_ui` to access the sample app and frameworks for Turbo UPI. The sample app workspace is divided into Prod, UAT and Mock environment targets with separate pod dependencies. + + 2. Integrate with the [Razorpay iOS Custom SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/build-integration.md). + + 3. Add the below line of code to your the `Podfile`, to install Turbo pods: + + ```ruby: + pod 'razorpay-customui-pod' + pod 'razorpay-turbo-pod' + ``` + + 4. Import the Turbo plugins as given below: + + ```swift: + import Razorpay + import TurboUpiPlugin + ``` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - The minimum supported iOS version for using Turbo UPI is currently 11.0. +> - API Key Usage for Different Environments: +> - Use the `rzp_test_0wFRWIZnH65uny` API key id for testing on the UAT environment. +> - Use the `rzp_test_vacN5cmVqNIlhO` API key id for testing on the Mock environment. +> - Use the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. +> + + + +## 1. Integration Steps + +Follow these steps to integrate with [Turbo UPI with UI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-ui.md#1-integration-steps). + +## 2. Test Integration + +Razorpay has three environments: Mock, UAT and Prod. We recommend the following: + +- Complete the integration with the Mock environment. +- Complete developer testing using [Test Data](#21-test-data) to cover all the [Test Case](#22-test-case-coverage) +- Perform the UAT using the Razorpay-provided API keys. + +### 2.1 Test Data + +Use the following data to test the integration. + + +### Bank List + + + Bank id | Bank Name | IFSC + --- + 1 | Axis | AXIS0000001 + --- + 2 | SBI | SBI00000001 + --- + 3 | HDFC | HDFC0000001 + --- + 4 | YES | YES00000001 + + + + +### Bank Accounts + + + Bank id | Bank Name | Account Number | Beneficiary Name | Account Balance | UPI PIN | ATM PIN | Card Number | Expiry Date | CVV | OTP | Type + --- + 1 | Axis | xxxx0001 | Pratheek | ₹100 | Not Set | 1234 | 8000110001 | 01/25 | Random CVV | 123456 | Savings + --- + 1 | Axis Bank | 8888 88xx xxxx 0002 | Pratheek | ₹9,000 | 123456 | 1234 | 8888 8888 8811 0002 | Any Future Date | Random CVV | 123456 | Credit Card + --- + 2 | SBI | xxxx0001 | Kushaal Singla | ₹9,000 | Not Set | 1234 | 9000110001 | 01/25 | Random CVV | 123456 | Savings + --- + 2 | SBI Bank | 8888 88xx xxxx 0003 | Kushaal Singla | ₹9,000 | Not Set | 1234 | 8888 8888 8811 0003 | Any Future Date | Random CVV | 123456 | Credit Card + --- + 2 | SBI | xxxx0203 | Kushaal Singla | ₹99,999 | 123456 | 1234 | 9599110203 | 01/25 | Random CVV | 123456 | Savings + --- + + + +### 2.2 Test Case Coverage + +Following are the various scenarios based on the dependencies. + + +### Dependencies and Scenarios + + + S.No | Dependency | Positive Scenarios | Negative Scenarios + --- + 1 | Device Binding | Device Binding | - SIM not found +- SMS sending failed +- Permissions not given + + --- + 2 | Account Linking | - Account found +- PIN set +- PIN not set + | No account for that number + --- + 3 | UPI ID generation | - UPI ID present (roaming profile) +- New UPI ID creation + | NA + --- + 4 | - UPI PIN Management +- Change PIN +- Reset PIN + | PIN Changed/Set Successfully | - Invalid PIN +- PIN not matching +- Incorrect OTP +- Incorrect card details (Reset PIN) + + --- + 5 | P2M Transaction - In-App Payments | Payment Successful | - Invalid PIN +- Timeout +- Insufficient Balance + + --- + 6 | Check Balance | Show Balance | Invalid PIN + --- + 7 | Delink Account | Success Only | NA + --- + 8 | Prefetch and Link accounts | Fetch existing PIN set and PIN not set accounts | No account exists for that number + + + + +### 2.3 How to Test? + +Given are the various test cases and their sequential steps. + + +### 2.3.1 Device Binding Success + + In the scenario of successful device binding, follow these simple steps: + 1. Enter a mobile number which exists in the user's device. + 2. Call `razorpay.upiTurboUI.linkNewUpiAccount` method. + 3. A screen with the Send SMS button will be displayed. + 4. Select Send SMS and send the SMS when prompted on the screen. + 5. A screen with a list of banks will appear for bank selection. + + + +### 2.3.2 SIM not found + + In the event of a SIM card not being found, follow these steps: + 1. Remove all SIM cards from the device. + 2. Enter a mobile number which exists in the user's device. + 3. Call `razorpay.upiTurboUI.linkNewUpiAccount` method. + 4. Expect the `completionHandler` function to be triggered with an error indicating SIM not found `error!=null`. + + + +### 2.3.3 Account Found + + In the scenario where an account is found, follow these steps: + 1. Enter a mobile number which exists in the user's device. + 2. Call `razorpay.upiTurboUI.linkNewUpiAccount` method. + 3. A screen with the Send SMS button will appear. + 4. Select Send SMS and send the SMS when prompted on the screen. + 5. A screen with a list of banks will be displayed for bank selection. + 6. Select either Axis Bank or SBI Bank, as mentioned in the [Test Data](#21-test-data). + 7. A screen with a list of bank accounts will appear for bank account selection. + + + +### 2.3.4 PIN + + + + PIN set + + Follow these steps to set or manage your PIN: + 1. Enter a mobile number which exists in the user's device. + 2. Call `razorpay.upiTurboUI.linkNewUpiAccount` method. + 3. A screen with the Send SMS button will appear. + 4. Select Send SMS and send the SMS when prompted on the screen. + 5. A screen with a list of banks will be displayed for bank selection. + 6. Select SBI Bank, as mentioned in the [Test Data](#21-test-data). + 7. A screen with a list of bank accounts will appear for bank account selection. + 8. Select the account ending with xxxx0203, as mentioned in the [Test Data](#21-test-data). + 9. Expect the `completionHandler` function to be triggered with no errors `error==null` and `upiAccounts != null`. The newly linked account will be the first object in the list. + + + +### PIN not set + + Follow these steps when a PIN is not set: + 1. Enter a mobile number which exists in the user's device. + 2. Call `razorpay.upiTurboUI.linkNewUpiAccount` method. + 3. A screen with the Send SMS button will appear. + 4. Select Send SMS and send the SMS when prompted on the screen. + 5. A screen with a list of banks will be displayed for bank selection. + 6. Select SBI Bank, as mentioned in the [Test Data](#21-test-data). + 7. A screen with a list of bank accounts will appear for bank account selection. + 8. Select an account ending with xxxx0001, as mentioned in the [Test Data](#21-test-data). + 9. A screen to enter card details will be displayed for this final step, allowing you to set your UPI PIN. + + + +### No Account for Specified Number + + When there is no account associated with a particular number, follow these steps: + 1. Enter a mobile number which exists in the user's device. + 2. Call the `razorpay.upiTurboUI.linkNewUpiAccount` method. + 3. A screen with the Send SMS button will appear. + 4. Select Send SMS and send the SMS when prompted on the screen. + 5. A screen with a list of banks will be displayed for bank selection. + 6. Select HDFC Bank, as mentioned in the [Test Data](#21-test-data). + 7. An empty screen for the list of bank accounts will be displayed. + + + +### PIN set Successfully + + For a successful PIN setup, follow these steps: + 1. Enter a mobile number which exists in the user's device. + 2. Call `razorpay.upiTurboUI.linkNewUpiAccount` method. + 3. A screen with the Send SMS button will appear. + 4. Select Send SMS and send the SMS when prompted on the screen. + 5. A screen with a list of banks will be displayed for bank selection. + 6. Select Axis Bank, as mentioned in the [Test Data](#21-test-data). + 7. A screen with a list of bank accounts will appear for bank account selection. + 8. Select the account ending with xxxx0001, as mentioned in the [Test Data](#21-test-data). + 9. A screen to enter card details will be displayed to set your UPI PIN. + 10. Enter card details as mentioned in the [Test Data](#21-test-data) and select Next. + 11. Submit the OTP as mentioned in the [Test Data](#21-test-data) and the new PIN on the Mock NPCI screen. + 12. Expect the `completionHandler` function to be triggered with no errors `error==null` and `upiAccounts != null`. The newly linked account will be the first object in the list. + + + +### PIN Changed Successfully + + When you need to change your PIN successfully, follow these steps: + 1. Call the `razorpay.upiTurboUI.manageUpiAccount` method. + 2. A screen with a list of UPI accounts and their options will be displayed. + 3. Select Change PIN on any UPI account. + 4. Submit the old and new PIN on the Mock NPCI screen. + 5. An alert will be displayed confirming your PIN change was successful. + + + +### Invalid PIN or PIN not Matching + + When dealing with an invalid PIN or a PIN that does not match, follow these steps: + 1. Call the `razorpay.upiTurboUI.manageUpiAccount` method. + 2. A screen with a list of UPI accounts and their options will be displayed. + 3. Select Change Pin on any UPI account. + 4. Submit an incorrect old and new PIN on the Mock NPCI screen. + 5. An alert will be displayed, indicating that the provided PIN was invalid or did not match the expected PIN. + + + +### Incorrect OTP + + In situations where an incorrect OTP is encountered, follow these steps: + 1. Enter a mobile number which exists in the user's device. + 2. Call the `razorpay.upiTurboUI.linkNewUpiAccount` method. + 3. A screen with the Send SMS button will appear. + 4. Select Send SMS and send the SMS when prompted on the screen. + 5. A screen with a list of banks will be displayed for bank selection. + 6. Select Axis Bank, as mentioned in the [Test Data](#21-test-data). + 7. A screen with a list of bank accounts will appear for bank account selection. + 8. Select the account ending with xxxx0001, as mentioned in the [Test Data](#21-test-data). + 9. A screen to enter card details will be displayed to set your UPI PIN. + 10. Enter card details as mentioned in the [Test Data](#21-test-data) and select Next. + 11. Submit any random incorrect OTP except for 123456 as mentioned in the [Test Data](#21-test-data) and the new PIN on the Mock NPCI screen. + 12. Expect the `completionHandler` function to be triggered with an error `error!=null`. + + + +### Incorrect Card Details (Reset PIN) + + When dealing with resetting your PIN with incorrect card details, follow these steps: + 1. Call the `razorpay.upiTurboUI.resetUpiPin` method. + 2. A screen to enter card details will be displayed to set your UPI PIN. + 3. Enter incorrect card details that are not mentioned in the [Test Data](#21-test-data) and select Next. + 4. Submit the OTP as mentioned in the [Test Data](#21-test-data) and the new PIN on the Mock NPCI screen. + 5. An alert will be displayed, indicating that the reset attempt has failed due to incorrect card details. + + + + + + + +### 2.3.5 UPI ID + + + + UPI ID Present (Roaming Profile) + + When working with scenarios involving the presence of a UPI ID (Roaming Profile), follow these steps: + 1. Enter a mobile number which exists in the user's device. + 2. Call the `razorpay.upiTurboUI.linkNewUpiAccount` method. + 3. A screen with the Send SMS button will appear. + 4. Select Send SMS and send the SMS when prompted on the screen. + 5. Expect the `completionHandler` function to be triggered with no errors `error==null` and `upiAccounts != null`. + + + +### New UPI ID Creation(PIN already set) + + When dealing with scenarios related to UPI ID, such as new UPI ID creation, follow these steps: + 1. Enter a mobile number which exists in the user's device. + 2. Call the `razorpay.upiTurboUI.linkNewUpiAccount` method. + 3. A screen with the Send SMS button will appear. + 4. Select Send SMS and send the SMS when prompted on the screen. + 5. A screen with a list of banks will be displayed for bank selection. + 6. Select SBI Bank, as mentioned in the [Test Data](#21-test-data). + 7. A screen with a list of bank accounts will appear for bank account selection. + 8. Select the account ending with xxxx0203, as mentioned in the [Test Data](#21-test-data). + 9. Expect the `completionHandler` function to be triggered with no errors `error==null` and `upiAccounts != null`. The newly linked account will be the first object in the list. + + + + + + + +### 2.3.6 Transactions + + + + Payments Successful + + When it comes to transactional scenarios, with a focus on ensuring a successful payment, follow these steps: + 1. Begin by following the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-ui.md#1-integration-steps), specifically the `submit` method. + 2. Enter an amount that is lower than the account balance. + 3. Enter the correct PIN, on the Mock NPCI screen. + 4. Subsequently, you will receive a callback on `onPaymentSuccess`. This indicates that the payment has been successfully processed. + + +> **INFO** +> +> +> **Handy Tips** +> +> The account balance remains unchanged, and the paid amount is not deducted. +> + + + + +### Invalid PIN + + In situations where an invalid PIN is entered, follow these steps: + 1. Begin by following the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-ui.md#1-integration-steps), specifically the `submit` method. + 2. Enter an amount lower than the account balance mentioned in [Test Data](#21-test-data). + 3. Enter the incorrect PIN, on the Mock NPCI screen. + 4. Subsequently, you will receive a callback on `onPaymentError`. This indicates that an error occurred during the payment process due to the invalid PIN. + + + +### Timeout + + When dealing with transactional scenarios, specifically focusing on handling timeouts, follow these steps: + 1. Begin by following the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-ui.md#1-integration-steps), specifically the `submit` method. + 2. Enter the amount as 24. + 3. Enter the correct PIN, on the Mock NPCI screen. + 4. Subsequently, you will receive a callback on `onPaymentError`. This indicates that an error occurred during the payment process due to a timeout. + + + +### Insufficient Balance + + When it comes to transactional scenarios with a focus on handling insufficient balance, follow these steps: + 1. Begin by following the [integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-ui.md#1-integration-steps), specifically the `submit` method. + 2. Enter an amount greater than the account balance as mentioned in [Test Data](#21-test-data). + 3. Enter the correct PIN, on the Mock NPCI screen. + 4. Subsequently, you will receive a callback on `onPaymentError`. This indicates that an error occurred during the payment process due to insufficient balance. + + + +### Show Balance + + For scenarios related to checking your balance, follow these steps: + 1. Call the `razorpay.upiTurboUI.manageUpiAccount` method. + 2. A screen with a list of UPI accounts and their options will be displayed. + 3. Select Check Balance on any UPI account. + 4. Enter the correct PIN on the Mock NPCI screen. + 5. The requested balance information will be displayed for the selected UPI account. + + + +### Check Balance - Invalid PIN + + When it comes to scenarios focused on checking your balance, follow these steps: + 1. Call the `razorpay.upiTurboUI.manageUpiAccount` method. + 2. A screen with a list of UPI accounts and their options will be displayed. + 3. Select Check Balance on any UPI account. + 4. Enter an incorrect PIN, on the Mock NPCI screen. + 5. An alert will be displayed, indicating that the provided PIN was invalid or did not match the expected PIN. + + + +### Delink Account - Success + + When it comes to scenarios related to delinking your account, follow these steps: + 1. Call the `razorpay.upiTurboUI.manageUpiAccount` method. + 2. A screen with a list of UPI accounts and their options will be displayed. + 3. Select the delete icon on any UPI account. + 4. An alert will be displayed, confirming that your account has been successfully delinked. + + + + + + + + + +### 2.3.7 Prefetch + + + + 2.3.7.1 First Time Onboarding + + + + Onboarding Success + + Follow these simple steps for the first time onboarding: + + 1. Enter a mobile number that exists on the user's device. + 2. Call `razorpay.upiTurboUI.prefetchAndLinkUpiAccountsWithUI` method. + 3. Grant the necessary permissions for prefetching and linking the account. + 4. The device binding process will then commence, which includes sending an SMS for verification. + 5. After successful device binding, a screen titled **Fetching Accounts** will be displayed, indicating that the system is retrieving bank account details. + 6. You will receive a callback `onResponse` containing two lists: accounts with PINs set and accounts without PINs set, helping you identify which accounts require further actions. + 7. Once an account is linked, you will receive another callback `onResponse` asynchronously with updated lists of accounts. This callback indicates that the accounts are now fully linked and updated in the system. + + + +### Denied Prefetch Consent + + For the first time onboarding, follow these steps: + + 1. Enter a mobile number that exists on the user's device. + 2. Begin the onboarding process by calling the `razorpay.upiTurboUI.prefetchAndLinkUpiAccountsWithUI` method. + 3. Deny the permissions for prefetching and linking when prompted. + 4. Despite denying permissions, the device binding process will initiate, including the sending of an SMS for verification. + 5. After successful device binding, a screen will appear displaying a list of banks available for selection. This step allows you to proceed with selecting a bank even after the initial permission denial. + + + +### PIN Set + + Follow the below steps to set or manage your PIN: + 1. Initiate the UPI PIN setup by calling the `razorpay.upiTurboUI.setUpiPinWithUI` method. + 2. A screen requesting card details will be displayed. Enter the necessary information from the [Test Data](#21-test-data) provided. + 3. After submitting the card details, you will be prompted to enter an OTP. Use the OTP from the Test Data to proceed. + 4. Next, you will be directed to a screen to enter and confirm your new UPI PIN. Make sure the PIN entered matches the confirmation PIN to ensure successful setup. + + + + + + + + +### 2.3.7.2 Accounts Already Onboarded + + 1. Call the `razorpay.upiTurboUI.prefetchAndLinkUpiAccountsWithUI` method. This action initiates the process for users who have previously completed the onboarding process. + 2. After the method is called, a screen displaying a list of banks will be shown. This list allows the selection of a new or different bank for which the user wants to link an additional account. + 3. Select the bank for which you want to link the account. + + + + + + +### 2.4 Additional Cases + +Businesses should have the capability to display a user-friendly message to their customers for certain special or additional error scenarios. The SDK is equipped to simulate some of these cases. + +Action | Input Data | Code | Description +--- +Pay | Amount = ₹24 | 91 | Timeout +--- + +> **WARN** +> +> +> +> **Watch Out!** +> +> - Device Binding will only work if the user has at least one SIM card in their mobile device. +> - Users can set/reset the UPI PIN. The configured PIN will be used to validate the transaction. +> - Based on the [Test Data](#21-test-data) for bank accounts, choose a bank for a single, multiple or no bank account. +> - Use the same ATM PIN and card Number mentioned in the [Test Data](#21-test-data). +> - The UPI PIN will revert to its default setting or be removed when you uninstall or clear storage. +> - Amount ₹24 is blocked for special cases. Please refer to [Additional Cases](#24-additional-cases). +> - Only one TPV whitelisted account (ending with xxxx0203) is permitted. Payments made using any other accounts will fail with the error Payment failed because the account linked to VPA is invalid. +> - In the Mock environment, multiple payments can be made for a given `order_id`, which differs from the production environment where this is not allowed. +> + +## 3. Go-live Checklist + +Complete this [Go-live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integrate-ui.md#3-go-live-checklist) to take your integration live. diff --git a/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integration-ui-tpv.md b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integration-ui-tpv.md new file mode 100644 index 00000000..e6dcee6b --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/integration-ui-tpv.md @@ -0,0 +1,1161 @@ +--- +title: Integrate Turbo UPI UI with TPV +description: Know how Razorpay performs Third-Party Validation (TPV) of investor bank accounts in real time using Razorpay Turbo UPI with UI. +--- + +# Integrate Turbo UPI UI with TPV + +Third-party validation (TPV) of bank accounts is mandatory for businesses in the BFSI (Banking, Financial Services and Insurance) sector that deal with Securities, Brokerage and Mutual Funds. You can accept customer payments using the Turbo UPI UI with TPV SDK. Know more about [how TPV works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation.md#how-it-works). + +> **WARN** +> +> +> +> **Watch Out!** +> +> To whitelist the customer account, use our S2S [Customer Add Bank Account API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers/bank-accounts.md#1-add-bank-account-of-customer). This optional functionality ensures that only pre-approved accounts are displayed to users during the onboarding process, streamlining the experience and enhancing security. +> + + +### Prerequisites + + 1. Contact our [integrations team](mailto:integrations@razorpay.com) for + + - Whitelisting mobile numbers and app id whitelisted for testing on UAT. + - Getting access to our sample app `https://github.com/upi-turbo/ios-sample-app` repository. + + 2. In this repository, you will find the UAT frameworks and the sample app source code to help you with the integration. Use branches inside `ui/tpv/` to access sample app and frameworks for Turbo UPI with UI TPV. + + 3. Integrate with the [Razorpay iOS Custom SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/build-integration.md). + + 4. Add the following lines to your Podfile for Turbo pod installation: + + ```ruby: + pod 'razorpay-customui-pod' + + pod 'razorpay-turbo-custom/ui' + ``` + + 5. Import the Turbo plugin as given below: + + ```swift + import Razorpay + import TurboUpiPluginUI + ``` + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - The minimum supported iOS version for using Turbo UPI is currently 12.0. +> - Use the `rzp_test_8UzRYt0d70Ntgz` API key id for testing on the UAT environment and the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. +> + + + +## 1. Integration Steps + +Environment based URLs: + - UAT: `https://api-web-turbo-upi.ext.dev.razorpay.in` + + - Production: `https://api.razorpay.com` + +Given below are the steps: + + +### Step 1: Whitelist Customer Bank Accounts *(Optional)* + + You can whitelist (also known as allowlist) your customer's bank accounts to ensure that only those accounts are considered during customer onboarding. By whitelisting the accounts at the start, you can avoid the bank account linking during payment. Use the Customer APIs to create customers and add their bank account details. + + For example, if a customer named Gaurav has two bank accounts, ABC and XYZ, you can use the APIs to create a customer id and link the bank accounts to that id. You can then pass this customer id at the time of payment. + + Follow these steps. + + + 1.1: Create a Customer + + Use this endpoint to create or add a customer with basic details such as name and contact details. + + ```cURL: Curl + + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST {environment_based_url}/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "Gaurav Kumar", + "contact": "9123456780", + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + }' + + ```json: Success + { + "id" : "cust_1Aa00000000004", + "entity": "customer", + "name" : "Gaurav Kumar", + "email" : "gaurav.kumar@example.com", + "contact" : "9123456780", + "gstin": null, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at ": 1234567890 + } + ```json: Failure + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } + } + ``` + + + + Request Parameters + + +`name` _optional_ +: `string` Customer's name. Alphanumeric value with period (.), apostrophe ('), forward slash (/), at (@) and parentheses are allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact ` _optional_ +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email ` _optional_ +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`fail_existing` _optional_ +: `string` Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + +`gstin` _optional_ +: `string` Customer's GST number, if available. For example, `29XAbbA4369J1PA`. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + + +### Response Parameters + + +`id` +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`name` +: `string` Customer's name. Alphanumeric, with period (.), apostrophe ('), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact` +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email` +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`gstin` +: `string` GST number linked to the customer. For example, `29XAbbA4369J1PA`. + +`notes` +: `json object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + + + + + + + +### 1.2: Add Customer's Bank Account + + The following endpoint adds the customer's bank accounts. + + customers/:customer_id/bank_account + + ```cURL: Request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST {environment_based_url}/v1/customers/:customer_id/bank_account \ + -H "Content-Type: application/json" \ + -d '{ + "ifsc_code" : "UTIB0000194", + "account_number" :"916010082985661", + "beneficiary_name" : "Gaurav", + "beneficiary_address1" : "address 1", + "beneficiary_address2" : "address 2", + "beneficiary_address3" : "address 3", + "beneficiary_address4" : "address 4", + "beneficiary_email" : "gaurav.kumar@example.com", + "beneficiary_mobile" : "9900990099", + "beneficiary_city" :"Bangalore", + "beneficiary_state" : "KA", + "beneficiary_country" : "IN" + }' + + ```json: Response + { + "id": "ba_LSZht1Cm7xFTwF", + "entity": "bank_account", + "ifsc": "ICIC0001207", + "bank_name": "ICICI Bank", + "name": "Gaurav Kumar", + "notes": [], + "account_number": "XXXXXXXXXXXXXXX0434" + } + ``` + + + + Path Parameter + +`customer_id` _mandatory_ +: `string` Customer id of the customer whose bank account is to be added. + + + + +### Request Parameters + + +`account_number` _mandatory_ +: `string` Customer's bank account number. For example, `11214311215411`. + +`beneficiary_name` _mandatory_ +: `string` The name of the beneficiary associated with the bank account. + +`beneficiary_address1` _optional_ +: `string` The virtual payment address. + +`beneficiary_email` _optional_ +: `string` Email address of the beneficiary. For example, `gaurav.kumar@example.com`. + +`beneficiary_mobile` _optional_ +: `string` Mobile number of the beneficiary. + +`beneficiary_city` _optional_ +: `string` The city of the beneficiary. + +`beneficiary_state` _optional_ +: `string` The state of the beneficiary. + +`beneficiary_country` _optional_ +: `string` The country of the beneficiary. + +`beneficiary_pin` _optional_ +: `integer` The pin code of the beneficiary's address. + +`ifsc_code` _mandatory_ +: `string` The IFSC of the bank branch associated with the account. + + + +### Response Parameters + +`bank_accounts` +: `array` An array containing bank account details. + + `id` + : `string` Unique identifier of the bank account. + + `entity` + : `string` The type of entity, which in this case is `bank_account`. + + `ifsc` + : `string` The IFSC of the bank branch associated with the account. + + `bank_name` + : `string` The name of the bank. + + `name` + : `string` The name associated with the bank account. + + `notes` + : `object` Set of key-value pairs that can be used to store additional information about the payment. + + `account_number` + : `integer` Customer's bank account number. For example, `0002020000304030434`. + + + + + + + + + +### Step 2: Create an Order *(Mandatory)* + + Pass the investor bank account details to the `bank_account` array of the Orders API. Given below is the sample code when the `method` is `upi`. + + ```curl: Request + curl -u : \ + -X POST {environment_based_url}/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 500, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }' + + ```json: Response + { + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 500, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 + } + ``` + + + + Request Parameters + + `amount` _mandatory_ +: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, the value of this field should be `100`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. You can create orders in **INR** only. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`method` _mandatory_ +: `string` The payment method used to make the payment. If this parameter is not passed, investors will be able to make payments using both netbanking and UPI payment methods. Possible values: + - `netbanking`: Investors can make payments only using netbanking. + - `card`: Investors can make payments using debit card. + - `upi`: Investors can make payments only using UPI. + +`bank_account` _mandatory_ +: `object` Details of the bank account that the investor has provided at the time of registration. + + `account_number` _mandatory_ + : `string` The bank account number from which the investor should make the payment. For example, `765432123456789` Payments will not be processed for an incorrect account number. + + `name` _mandatory_ + : `string` The name linked to the bank account. For example, `Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` The bank IFSC. For example, `HDFC0000053`. + + + +### Response Parameters + + `id` +: `string` Unique identifier of the order. + +`entity` +: `string` Indicates the type of entity. Here, it is `order`. + +`amount` +: `integer` The order amount represented in the smallest unit of the currency passed. For example, amount = 100 translates to 100 paise, that is ₹1 (default currency is INR). + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we support INR only. + +`receipt` +: `string` A unique identifier of the order entered by the user. For example, `BILL13375649`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, "note_key": "Beam me up Scotty”. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`offer_id` +: `string` Unique identifier of the offer. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + + + + + + +### Step 3: Turbo UPI with UI SDK Action + + To link the customer's UPI account with your app. Use the code samples given below to fetch the UPI account. + + + + 3.1 Initialise the SDK + + + Use the code given below to initialise the SDK. + + Initialise the SDK and set up the Checkout instance (Razorpay) to handle payment outcomes like success and errors by listening to delegate methods. + + ```swift: Swift + var razorpay: RazorpayCheckout? // Globally declare + let wkWebView = WKWebView(frame: self.view.frame) // configure your webview + razorpay = RazorpayCheckout.initWithKey( "YOUR_KEY_ID", + andDelegate: self, withPaymentWebView: wkWebView, UIPlugin: RZPTurboUPI.UIPluginInstance) + + ```objc: Objective C + RazorpayCheckout *razorpay; // Globally declare + WKWebView *wkWebView = [[WKWebView alloc] initWithFrame:self.view.frame]; // configure your webview + razorpay = [RazorpayCheckout initWithKey:@"YOUR_KEY_ID" + andDelegate:self withPaymentWebView:webView + UIPlugin:RZPTurboUPI.UIPluginInstance]; + ``` + + + +### 3.2 Create a Session Token + + + To enhance security, you must create a session token via a server-to-server (S2S) call between your backend and Razorpay's backend. This session token ensures secure communication between the Turbo SDK and Razorpay's systems. + + #### How to Create a Session Token + + 1. Trigger the S2S API from your Backend. Use the following API to generate a session token: + + Authorization Header Creation: `Base64.encode(${public_key}:${secret})` + + + ```curl: Curl + curl -X POST '{environment_based_url}/v1/upi/turbo/customer/session' \ + -H "Authorization: Basic {Base64 of public key and secret}" \ + -H "Content-type: application/json" \ + -d '{ + "customer_reference": "CUSTOMER_ID/CUSTOMER_MOBILE" + }' + + ``` curl: Success + { + "token": "session_token", + "expire_at": 1730097636 + } + ``` curl: Failure + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "customer_reference is required", + "source": "customer", + "step": "CreateSession", + "reason": "customer_reference_field_is_missing", + "metadata": {} + } + } + ``` + + + + + +Request Parameters + + +`customer_reference` _mandatory_ +: `string` A unique identifier for the customer provided by the business. The recommended value is mobile number. For example, `9000090000` + + + +### Response Parameters + +`token` +: `string` A session token to be used in subsequent session-protected APIs. + +`expire_at` +: `long` Expiry time (in seconds) for the session token, used to optimise session handling and reduce unnecessary reinitialisations. + +`error` +: `object` The request failure due to business or technical failure. + + + + + 2. Create/Retry Session Token Mechanism + + **Using Delegate Pattern** + + To ensure a smooth experience during token expiry, the Turbo SDK provides the `TurboSessionDelegate` interface with a `fetchToken` method. This method dynamically fetches and updates the session token without reinitialising the session. + + Initialise the `TurboSessionDelegate` object anonymously and pass it through the initialize method. + ```swift: Swift + self.razorpay?.upiTurboUI?.initialize(self) + + ```objc: Objective C + self.razorpay.upiTurboUI.initialize(self); + ``` + + The SDK will call `fetchToken` as needed and use the provided callback to handle the updated token. This allows you to seamlessly refresh the session by retrieving a new token via a server-to-server (S2S) call. + + Below is an example of creating an instance of the `TurboSessionDelegate` interface using an anonymous object expression: + + ```swift: Swift + extension ViewController: TurboSessionDelegate { + func fetchToken(completion: @escaping (Session) -> Void) { + // Fetch token here and once fetched, + // it can be passed back to Turbo SDK using the completion delegate + completion(Session(token: "")) + } + } + + ```objc: Objective C + @interface ViewController () + @end + + @implementation ViewController + + - (void)fetchTokenWithCompletion:(void (^)(Session *))completion { + // Fetch token here and once fetched, + // it can be passed back to Turbo SDK using the completion delegate + Session *session = [[Session alloc] initWithToken:@""]; + completion(session); + } + @end + ``` + + + + + +### 3.3 Link New UPI Account + + + Use the following code to link the newly created UPI account with your app. This function can be called from anywhere in the application, providing multiple entry points for customers to link their UPI account with your app. + + ### Parameter Combinations + + #### Using Order ID + When calling the `linkNewUpiAccount` function with an `OrderId`, the TPV process is initiated for linking whitelisted accounts. Ensure that TPV bank account details are not provided in this case. + + #### Using Customer ID with TPV Bank Account + When calling the `linkNewUpiAccount` function with a `CustomerId`, you must also include TPV bank account details. This links the specific whitelisted account associated with that user. + + #### Restrictions + - **Order ID and Customer ID**: Do not pass both `OrderId` and `CustomerId` simultaneously in the `linkNewUpiAccount` function. Choose one based on your use case. + - **Order ID and TPV Bank Account**: Do not pass `OrderId` and `TPV bank account` details together. Use either one. + - **TPV Bank Account without Customer ID or Order ID**: TPV bank account details cannot be provided without a `CustomerId`. + + These combinations ensure proper functionality and avoid conflicts during the UPI account linking process. + + - Using Order Id and Mobile Number + + ```swift: Swift + self.razorpay?.upiTurboUI?.TPV? + .setMobileNumber(mobile: "YOUR_MOBILE_NUMBER") + .setOrderId(orderId: "YOUR_ORDER_ID") + .linkNewUpiAccountWithUI(color: "#0000FF", completionHandler: + { upiAccounts, error in + guard error == nil else { + let error = error as? TurboError + // handle error + return + } + guard let vpaAccounts = upiAccounts as? [UpiAccount] + else { + return + } + // handle UPI Account Response here and save it globally in this file for further usage. + }) + ```objc: Objective C + [[self.razorpay.upiTurboUI.TPV setMobileNumber:@"YOUR_MOBILE_NUMBER"] + .setOrderId(@"YOUR_ORDER_ID") + .linkNewUpiAccountWithUIWithColor:@"#0000FF" + completionHandler:^(NSArray *upiAccounts, NSError *error) { + if (error != nil) { + TurboError *turboError = (TurboError *)error; + // Handle error + return; + } + + NSArray *vpaAccounts = (NSArray *)upiAccounts; + // Handle UPI Account Response here and save it globally in this file for further usage. + }]; + ``` + + - Using Customer Id and TPV Bank Account + + ```swift: Swift + self.razorpay?.upiTurboUI?.TPV? + .setMobileNumber(mobile: "YOUR_MOBILE_NUMBER") + .setCustomerId(customerId: "YOUR_CUSTOMER_ID") + .setTpvBankAccount(tpvBankAccount: "TPV_BANK_ACCOUNT") + .linkNewUpiAccountWithUI(color: "#0000FF", completionHandler: + { upiAccounts, error in + guard error == nil else { + let error = error as? TurboError + // handle error + return + } + guard let vpaAccounts = upiAccounts as? [UpiAccount] + else { + return + } + // handle UPI Account Response here and save it globally in this file for further usage. + }) + ```objc: Objective C + [[self.razorpay.upiTurboUI.TPV setMobileNumber:@"YOUR_MOBILE_NUMBER"] + .setCustomerId(@"YOUR_MOBILE_NUMBER") + .setTpvBankAccount(@"TPV_BANK_ACCOUNT") + .linkNewUpiAccountWithUIWithColor:@"#0000FF" + completionHandler:^(NSArray *upiAccounts, NSError *error) { + if (error != nil) { + TurboError *turboError = (TurboError *)error; + // Handle error + return; + } + + NSArray *vpaAccounts = (NSArray *)upiAccounts; + // Handle UPI Account Response here and save it globally in this file for further usage. + }]; + ``` + + + + + Request Parameters + + +`customerMobile` _mandatory_ +: `string` A unique identifier for the customer provided by the business. The recommended value is mobile number. For example, `9000090000` + +`customer_id` +: `string` The CustomerId will be used for fetching the TPV whitelisted bank accounts when the OrderId is not provided. + +`order_id` +: `string` The OrderId to be used for fetching the TPV whitelisted bank account for the order. + +`tpvBankAccount` +: `object` This object type `TurboTPVBankAccount` will contain the bank account that the user selected in the onboard flow. + + + + + + + + +### 3.4 Authorize Method + + + To accept payments, call Custom Checkout’s `authorize` method with the following payload: + + ```swift: Swift + let turboPayload: [AnyHashable: Any] = [ + "currency": "INR", + "amount": "700", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "upi", + "upi": [ + "flow": "in_app" + ], + "order_id": "[YOUR_ORDER_ID]", // Mandatory + ] + + turboPayload["upiAccount"] = upiAccount + razorpay?.authorize(turboPayload) + + extension ViewController: RazorpayPaymentCompletionProtocol { + func onPaymentSuccess(_ payment_id: String, andData + response: [AnyHashable: Any]) { + // Handle Success + } + + func onPaymentError(_ code: Int32, description str: String, andData response: [AnyHashable: Any]) { + // Handle payment error + } + } + + ```objc: Objective C + NSDictionary *turboPayload = @{ + @"currency": @"INR", + @"amount": @"700", + @"email": @"gaurav.kumar@example.com", + @"contact": @"9000090000", + @"method": @"upi", + @"upi": @{ + @"flow": @"in_app" + }, + @"order_id": @"[YOUR_ORDER_ID]" // Mandatory + }; + + [turboPayload setValue:upiAccount forKey:@"upiAccount"]; + [razorpay authorize:turboPayload]; + + @interface ViewController () + + @end + + @implementation ViewController + + - (void)onPaymentSuccess:(NSString * _Nonnull)payment_id andData:(NSDictionary * _Nonnull)response { + + // Hanlde Payement Success + } + - (void)onPaymentError:(int32_t)code description:(NSString * _Nonnull)str andData:(NSDictionary * _Nonnull)response { + // Handle Payement Failure + } + + ``` + + + + + Request Parameters + + +`turboPayload` _mandatory_ +: `dictionary` Payload for initiating the transaction. + + + + + +### Response Parameters + +`onSuccess` +: This function is triggered if the list is fetched successfully. accList can be empty to indicate that no accounts have been linked yet. + +`onFailure` +: This function is triggered in case an error is thrown during the retrieval process, either by the Razorpay SDK or the Bank SDK. + + + + + + + + + + +### Steps 4: Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + - You need to store these fields in your server. + - You can confirm the authenticity of these details by verifying the signature in the next step. + + ```json: Success Callback + { + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" + } + ``` + + + Response Parameters + + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + + +### Step 5: Verify Signature + + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + + +### Get Linked Accounts +If your customer has already linked the UPI account, use the following code to fetch it. If there are no linked UPI accounts, an empty list is returned + +> **WARN** +> +> +> **Watch Out!** +> If the device binding is not completed and `getLinkedUpiAccounts` is triggered, it will return a `Device Binding Not Done` error message. +> + + - You can retrieve the list of UPI accounts linked to a customer's mobile number using the following code. This function can be invoked from any part of the application, offering multiple entry points for customers to manage their UPI accounts. + + ```swift: Swift + razorpay?.upiTurboUI?.getLinkedUpiAccounts("MOBILE_NUMBER", resultDelegate: self) + + ```objc: Objective C + [[razorpay upiTurboUI] getLinkedUpiAccountsWithMobileNumber:@"9000090000" delegate:self]; + ``` + + - Implement the delegate methods to handle the response for fetching linked UPI accounts. Below is an example: + + ```swift: Swift + extension ViewController: UPITurboResultDelegate { + func onSuccessFetchingLinkedAcc(_ accList: [UpiAccount]) { + if accList.count > 0 { + print("Linked UPI Accounts fetched successfully.") + } else { + print("No linked UPI accounts found. Prompt user to link a new account.") + } + } + + func onErrorFetchingLinkedAcc(_ error: TurboUpiPlugin.TurboError?) { + print("Error fetching linked UPI accounts: \(error?.errorDescription ?? "Unknown error")") + print("Error code: \(error?.errorCode ?? 0)") + } + } + + ```objc: Objective C + @interface ViewController () + @end + + @implementation ViewController + + - (void)onSuccessFetchingLinkedAcc:(NSArray *)accList { + if (accList.count > 0) { + NSLog(@"Linked UPI Accounts fetched successfully."); + } else { + NSLog(@"No linked UPI accounts found. Prompt user to link a new account."); + } + } + + - (void)onErrorFetchingLinkedAcc:(TurboError *)error { + NSLog(@"Error fetching linked UPI accounts: %@", error.errorDescription); + NSLog(@"Error code: %ld", (long)error.errorCode); + } + + @end + ``` + +### Non-Transactional Flow + +You can directly interact with the exposed methods of the Turbo Framework to perform the non-transactional flows listed below. + + +### Manage UPI Accounts + + Let Razorpay SDK manage the linked UpiAccounts on the applications by triggering `manageUpiAccounts()`. + + ```swift: Swift + self.razorpay?.upiTurboUI?.manageUpiAccount(mobileNumber: "MOBILE_NUMBER", color: "#0000FF", completionHandler: { upiAccounts, error in + guard error == nil else { + let err = error as? TurboError + // Handle error + return + } + + guard let vpaAccounts = upiAccounts as? [UpiAccount] else { + return + } + // Handle UPI Account Response here + + }) + + ```objc: Objective C + [[self.razorpay upiTurboUI] manageUpiAccountWithMobileNumber:@"MOBILE_NUMBER" + color:@"#0000FF" + completionHandler:^(NSArray *upiAccounts, NSError *error) { + if (error != nil) { + TurboError *err = (TurboError *)error; + // Handle error + return; + } + + if (![upiAccounts isKindOfClass:[NSArray class]] || upiAccounts.count == 0) { + return; + } + + // Handle UPI Account Response here + }]; + ``` + + + +### Additional Features + +To get the device binding status, please use the variable `razorpay.upiTurbo.deviceBindingDone` of type boolean. It indicates whether the device binding, which is a prerequisite for adding UPI accounts, is done with the user's mobile number. + + ```swift: Swift + if RZPTurboUPI.isDeviceOnboarded() { + // User device onboarded + } else { + // Call Link New Account for Device Binding + } + + ```objectivec: Objective C + if ([RZPTurboUPI isDeviceOnboarded]) { + // User device onboarded + } else { + // Call Link New Account for Device Binding + } + ``` + +### Models Exposed from the SDKs + +The SDKs provide access to exposed models for seamless integration. + + +### UpiAccount + + + + Properties | Return Type | Description + --- + accountNumber | String | Returns masked bank account number. + --- + type | String | The account type. Possible values are `bank_account` or `credit_card`. + --- + ifsc | String | Returns IFSC for Bank. + --- + bankName | String | Returns the name of the bank. + --- + bankLogoUrl | String | Returns the URL to the logo of the PNG image. + --- + bankPlaceholderUrl | String | Image URL for bank logo placeholder. + --- + pinLength | Integer | Length on UPI PIN. + + + + + +### UpiBankAccount + + + + Properties | Return Type | Description + --- + accountNumber | String | Account number. + --- + beneficiaryName | String | Name of account holder. + --- + bank | UpiBank | The bank Object. + --- + type | String | The account type. Possible values are `savings`, `current` and `credit`. + + + + + +### UpiBank + + + + Properties | Type | Description + --- + ifsc | String | IFSC of the bank. + --- + logo | String | Bank logo URL. + --- + name | String | Name of the bank. + --- + bankPlaceholderUrl | String | Image URL for bank logo placeholder. + + + + +### TurboError + + + + Properties | Type | Description + --- + errorCode | String | Types of error codes - `BAD_REQUEST_ERROR`: Failure from the client's end (SDK). +- `GATEWAY_ERROR`: Failure either from the Secure Component or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + errorDescription | String | Brief description of the error. + --- + errorReason | String | Specifies the specific reason for the error. + --- + errorSource | String | Indicates the origin of the error. Possible values: - `gateway` +- `issuer_bank` +- `beneficiary_bank` +- `customer_psp` +- `customer` +- `internal` + + --- + errorStep | String | Highlights the stage where the error occurred. + + + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi/error-codes.md). + + + +### TurboTPVBankAccount + + + + Properties | Return Type | Description + --- + accountNumber | String | Returns the account number. + --- + ifsc | String | IFSC of the bank. + --- + bankName | String | Name of the bank. + + + +## 2. Test Integration + +We recommend the following: +- Complete the integration on UAT before using the prod builds. +- Perform the UAT testing using the Razorpay-provided API keys. + +## 3. Go-live Checklist + +Complete these steps to take your integration live: + +- You should get your app id whitelisted by Razorpay to test on prod. + + +> **INFO** +> +> +> **Handy Tips** +> +> Contact our [integrations team](mailto:integrations@razorpay.com) to get your mobile number and app whitelisted. +> + +- Replace the UAT credential with the [Razorpay live keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) for prod testing. diff --git a/llm-content/payments/payment-gateway/ios-integration/custom/test-integration.md b/llm-content/payments/payment-gateway/ios-integration/custom/test-integration.md new file mode 100644 index 00000000..9d14b5ab --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/custom/test-integration.md @@ -0,0 +1,137 @@ +--- +title: 2. Test Integration +description: Steps to test if the custom iOS integration was successful. +--- + +# 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## Next Steps + +[Step 3: Go-live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/go-live-checklist.md) diff --git a/llm-content/payments/payment-gateway/ios-integration/custom/test-native-otp.md b/llm-content/payments/payment-gateway/ios-integration/custom/test-native-otp.md new file mode 100644 index 00000000..cca09683 --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/custom/test-native-otp.md @@ -0,0 +1,38 @@ +--- +title: 2. Test Native OTP Integration +description: Test the Razorpay Native OTP feature with iOS Custom Checkout. +--- + +# 2. Test Native OTP Integration + +Integrate the [Razorpay Native OTP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/native-otp.md) feature with iOS custom checkout to avoid customer payment issues such as payment failures due to low internet speeds and bank page redirects. +After the integration is complete, you need to test the integration to ensure that it is working as expected. You can make a test transaction using the test cards, verify the payment status from the Dashboard, APIs or subscribe to related Webhook events to take appropriate actions at your end. After testing the integration in test mode, you can start accepting actual payments from your customers. + +## Test Payments + +- No money is deducted from the customer's account as this is a test transaction. +- In the Checkout code, ensure that you have entered the API keys generated in the Test Mode. + +#### Test Cards + +You can use any of the test cards to make transactions in the Test Mode. Use any valid expiration date in the future and any random CVV to create a successful payment. + +Card Network | Card Number | Supports Native OTP +--- +Mastercard | 5267 3181 8797 5449 | Yes +--- +Visa | 4895 1911 1111 1115 | Yes +--- +Visa | 4386 2894 0766 0153 | No + +## Verify Payment Status + +You can track the status of the payment from the Dashboard by subscribing to webhooks or polling our APIs. + +Know [how to verify payment status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/build-integration.md#110-verify-payment-status). + +## Accept Live Payments + +After testing the flow of funds end-to-end in test mode and confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +Know more about how to [Accept Live Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/go-live-checklist.md#accept-live-payments). diff --git a/llm-content/payments/payment-gateway/ios-integration/custom/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/ios-integration/custom/troubleshooting-faqs.md new file mode 100644 index 00000000..5e4706d8 --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/custom/troubleshooting-faqs.md @@ -0,0 +1,79 @@ +--- +title: Troubleshooting and FAQs +description: Troubleshoot common error scenarios and find answers to frequently asked questions. +--- + +# Troubleshooting and FAQs + +#### 1. I am getting an error "Razorpay contains unsupported Architecture x86_64" while submitting the archive to the app store. What should I do? + +When a framework is distributed, it contains architectures of the simulators so that the consumer of the framework can build it on a simulator. However, when uploading the archive on iTunes, you have to strip these architectures. If you use Cocoapods, it strips the simulator architectures on its own. + +Since you are not using it, please follow the below-mentioned steps: + + 1. Download the [script](https://s3.ap-south-1.amazonaws.com/rzp-1415-prod-mobile/ios/CustomLinks/StripInvalidArchitectures.sh). + 2. Locate the directory in which Razorpay.framework is present in the archive that you are trying to upload. + 3. Move the attached script in the above directory and run it. + 4. Remove the script file. + +#### 2. I see a message on the screen to update my SDK. Will my customers also see the message? + +No. You see the update SDK alert because a newer version of our SDK is available. We recommend you to use the latest SDK. This message shows up only when running the app on a simulator or using a test key to initialize the SDK. + +#### 3. I am getting an error `Image not loaded: .dyld`. What should I do? + +- Ensure that Razorpay.framework is present in your project settings in both the Embedded Binaries and Linked Frameworks. +- Set Always Embed Swift Libraries to "yes" in the project settings. It can happen because of the incompatibility between the developed Swift version with Razorpay.framework and the Swift version of your project. +- We recommend using the framework compiled with the required Swift language from our iOS documentation. + +#### 4. Razorpay's framework is bitcode enabled. Do I also have to enable bitcode in my project? + +Razorpay's bitcode enabled framework works even if you do not enable bitcode in your project. + +#### 5. I am getting an error `Module compiled with Swift X version cannot be imported in Swift Y version.` What should I do? + +There are multiple Swift versions available, but unfortunately, Apple does not make all the versions compatible, so we release frameworks compiled in multiple Swift versions. +- Download the framework that is compatible with your project. +- If you run into a compatibility issue, ensure that you try both frameworks. + +#### 6. I am getting an error saying, "Could not find module RazorpayCommonCrypto". + +A module map is used to define the header files that should be converted into modules and used by your project. Razorpay handles this internally. + +**Cause**: By default, the Xcode's name is assumed to be Xcode.app. For example, your default Xcode appears as Xcode9.3. + +**Resolution**: Insert [this](https://s3.ap-south-1.amazonaws.com/rzp-1415-prod-mobile/ios/CustomLinks/StripInvalidArchitectures.sh) script in the directory that contains `Razorpay.framework` file and run it from your terminal. + +#### 7. I have integrated with the Razorpay Payment Gateway to accept payments on my mobile app. However, when I try to publish my app on the Apple App Store, it gets rejected. The following message is displayed, "We noticed that your app offers a subscription with a mechanism other than the in-app purchase API." How to resolve this? + +**Cause**: As per Apple's policy, if you use a subscription model in your iOS app, you must use Apple's in-app purchase APIs. Apple does not redirect out of the app for digital product purchases. + +**Resolution**: Use Apple's in-app purchase APIs. + +#### 8. How to generate privacy report with Razorpay's SDKs PrivacyManifest file? + +After installing the `razorpay-customui-pod` cocoapod in the project, once the application is archived, privacy report can be generated from the context menu for the created archive. +The data used by the Razorpay SDK will be listed under Razorpay.framework along with the reasons for the usage of the data. +For more information, you can refer to [Apple's documentation for generating the privacy report](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_data_use_in_privacy_manifests#4239187). + +For more information about PrivacyManifests and Required Reason API please refer to [Apple's documentation](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_data_use_in_privacy_manifests). + +#### 9. How can I verify the signature used for razorpay-customui-pod's xcframework? + +After the installation of the `razorpay-customui-pod` cocoapod, inside the pods folder, expand the folder Development `Pods/razorpay-customui-pod/Frameworks`. Inside this folder, you will find the Razorpay.xcframework file. On selecting this file, XCode's File inspector shows you the XCFramework’s code signing status. If the framework is signed with an Apple Developer certificate, the inspector also shows which Apple Developer team signed the framework. + +You can find more about verification of the signature [here](https://developer.apple.com/documentation/xcode/verifying-the-origin-of-your-xcframeworks). + +#### 10. How can I check the Razorpay iOS Custom SDK version? + +To check the SDK version: +1. Open your iOS project in Xcode. +2. In the project navigator, locate the `Podfile` in the root directory of your project. +3. Open the `Podfile` and look for the line that specifies the Razorpay SDK pod. The version number is represented by `x.y.z`. + +#### 11. How can I update the Razorpay iOS Custom SDK version? + +To update the iOS Custom SDK, follow these steps: +1. In your project’s Podfile, specify the [latest SDK version](https://github.com/razorpay/razorpay-customui-pod/releases/). If you do not mention any version, it automatically picks the latest version from Cocoapods. +2. Run `pod repo update` to fetch the latest release versions of the pods. +3. After updating, ensure that the integration is successful and there are no issues with the updated SDK. diff --git a/llm-content/payments/payment-gateway/ios-integration/standard.md b/llm-content/payments/payment-gateway/ios-integration/standard.md new file mode 100644 index 00000000..346fe2e0 --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/standard.md @@ -0,0 +1,54 @@ +--- +title: Prerequisites | Razorpay iOS Standard SDK +heading: Prerequisites +description: Check the prerequisites before you integrate with Razorpay iOS Standard Checkout. +--- + +# Prerequisites + +- **iOS Standard SDK Changelog**: Discover new features, updates and deprecations related to the Razorpay iOS Standard SDK (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about iOS Standard integration. + + + +Integrate the Razorpay Payment Gateway with your iOS app and start accepting payments from your customers. + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot use an external payment gateway to accept payments by selling digital products or content. You must use Apple’s In-App Purchase to avoid app rejection. Know more about the [list of restricted payment modes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard/troubleshooting-faqs.md#list-of-restricted-payment-modes). +> + +> **SUCCESS** +> +> +> **Update SDK** +> +> Check your [current SDK version](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard/troubleshooting-faqs.md#9-how-can-i-check-the-razorpay-ios). If it is outdated, please [update the SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard/troubleshooting-faqs.md#10-how-can-i-update-the-razorpay-ios) to ensure uninterrupted settlements of your funds. +> + +## Integration Steps + +**Before you proceed:** + + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +Follow these integration steps: + + - **1. Build Integration**: Integrate iOS Standard SDK. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + + - **Sample App**: Check the sample app to integrate on GitHub. + +### Related Information + +[Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard/troubleshooting-faqs.md) diff --git a/llm-content/payments/payment-gateway/ios-integration/standard/integration-steps.md b/llm-content/payments/payment-gateway/ios-integration/standard/integration-steps.md new file mode 100644 index 00000000..8c22754b --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/standard/integration-steps.md @@ -0,0 +1,1193 @@ +--- +title: iOS SDK - Integration Steps | Razorpay Payment Gateway +heading: Integration Steps +description: Steps to integrate your iOS application with Razorpay iOS Standard SDK. +--- + +# Integration Steps + +Follow these steps to integrate your iOS application: + + - **1. Build Integration**: Integrate iOS Standard Checkout. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/5HTQX-AokIk] + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Import Razorpay iOS Standard SDK Library + + You can import the Razorpay iOS Standard SDK library using any of these ways: + + + Refer to our [Cocoapod](https://cocoapods.org/pods/razorpay-pod) (bitcode enabled) pod. + + + 1. Download the SDK and unzip it. + 2. Open your project in XCode and go to **file** under **Menu**. Select **Add files to "yourproject"**. + 3. Select **Razorpay.xcframework** in the directory you just unzipped. + 4. Select the **Copy items if needed** checkbox. + 5. Click **Add**. + 6. Navigate to **Target settings → General** and add the **Razorpay.xcframework** in both **Embedded Binaries** and **Linked Frameworks and Libraries**. + + + If you are building an **Objective-C** project, follow the steps given for Swift and the additional steps given below: + 1. Go to **Project Settings** and select **Build Settings - All and Combined**. + 2. Set the **Always Embed Swift Standard Libraries** option to **TRUE**. + + Ensure that you have the framework added in both **Embedded Binaries** and **Linked Frameworks and Libraries** under **Target settings - General**. + + + + + + Xcode 11 + + Ensure that you have the framework added in **Frameworks, Libraries, and Embed Content** under **Target settings - General**. Change `Embed status` from - `Do not Embed` to `Embed & Sign`. + + Watch the GIF to see how to add Frameworks, Libraries and Embed Content. + + ![add Frameworks, Libraries and Embed Content](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ios-embed-framework.gif.md) + + + + + + +### 1.2 Initialize Razorpay iOS Standard SDK + + To initialize Razorpay iOS Standard SDK, you need the following: + + - API keys. You can generate this from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + +> **WARN** +> +> +> **Watch Out!** +> +> API keys should not be hardcoded in the app. Must be sent from your backend as app-related metadata fetch. +> + + - A delegate that implements `RazorpayPaymentCompletionProtocol` or `RazorpayPaymentCompletionProtocolWithData`. + + +> **WARN** +> +> +> +> **Watch Out!** +> +> - For Swift version 5.1+, ensure that you declare `var razorpay: RazorpayCheckout!`. +> - For versions lower than 5.1, use `var razorpay: Razorpay!`. +> - Alternatively, you can use the following alias and retain the variable as Razorpay. + +> +> `typealias Razorpay = RazorpayCheckout` +> + + ```swift: ViewController.swift + + import Razorpay + + class ViewController: UIViewController, RazorpayPaymentCompletionProtocol { + + // typealias Razorpay = RazorpayCheckout + + var razorpay: RazorpayCheckout! + override func viewDidLoad() { + super.viewDidLoad() + razorpay = RazorpayCheckout.initWithKey(razorpayTestKey, andDelegate: self) + } + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + self.showPaymentForm() + } + } + ```objectivec: ViewController.m + #import + //- typedef RazorpayCheckout Razorpay; + + @interface ViewController () { + RazorpayCheckout *razorpay; + . + . + - (void)viewDidLoad { + [super viewDidLoad]; + . + . + razorpay = [RazorpayCheckout initWithKey:@"YOUR_PUBLIC_KEY" andDelegate:self]; + } + } + ``` + + + +### 1.3 Create an Order in Server + + **Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order using: + + + Use this endpoint to create an order using the Orders API. + + /orders + + ```curl: Curl + curl -X POST https://api.razorpay.com/v1/orders + -U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -H 'content-type:application/json' + -d '{ + "amount": 50000, + "currency": "", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230 + }' + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", ""); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + DATA = { + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } + } + client.order.create(data=DATA) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('receipt' => '123', 'amount' => 50000, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + ```csharp: .NET + RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.add("receipt", "order_rcptid_11"); + options.add("currency", ""); + Order order = client.Order.Create(options); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + options = amount: 50000, currency: '', receipt: '' + order = Razorpay::Order.create + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "", + receipt: "receipt#1", + notes: { + key1: "value3", + key2: "value2" + } + }) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "", + "receipt": "some_receipt_id" + } + body, err := client.Order.Create(data) + ``` + + ```json: Success Response + { + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 + } + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + + You can use the Postman workspace below to create an order: + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + + You can create an order manually by integrating the API sample codes on your server. + + + + Request Parameters + + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `22225`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of ₹7,000 is to be received from the customer in two installments of #1 - ₹5,000, #2 - ₹2,000, then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + + +### 1.4 Pass Payment Options and Display Checkout Form + + Call `RazorpayCheckout.checkIntegration(withMerchantKey: )` to check the health of integration. This will also let you know if the SDK version is outdated. The opinionated alerting is displayed only when it is running on simulators. Add the following code to your `ViewController` or wherever you want to initialize payments: + + ```swift: ViewController.swift + internal func showPaymentForm(){ + let options: [String:Any] = [ + "key": "YOUR_KEY_ID", + "amount": "100", // This is in currency subunits. + "currency": "",// We support more that 92 international currencies. + "description": "purchase description", + "order_id": "order_DBJOWzybf0sJbb", + "image": "https://url-to-image.jpg", + "name": "business or product name", + "prefill": [ + "contact": "", + "email": "" + ], + "theme": [ + "color": "#F37254" + ] + ] + razorpay.open(options) + } + ```objectivec: ViewController.m + - (void)showPaymentForm { // called by your app + NSDictionary *options = @{ + @"key": @"YOUR_KEY_ID", + @"amount": @"1000", // This is in currency subunits. + // all optional other than amount. + @"currency": @"", // We support more that 92 international currencies. + @"image": @"https://url-to-image.jpg", + @"name": @"business or product name", + @"description": @"purchase description", + @"order_id": @"order_4xbQrmEoA5WJ0G", + @"prefill" : @{ + @"email": @"", + @"contact": @"" + }, + @"theme": @{ + @"color": @"#F37254" + } + }; + [razorpay open:options]; + } + ``` + + +> **INFO** +> +> +> +> **Optional Parameter - displayController** +> +> When the optional parameter- displayController, is specified, the Razorpay controller is pushed onto this controller's navigation controller if present or presented on this controller if absent. +> +> ``` +> razorpay.open(options, displayController: self) +> ``` +> + + + + Checkout Options + + You must pass these parameters in Checkout to initiate the payment. + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + +> **WARN** +> +> +> +> **Watch Out!** +> +> To support theme colour in the progress bar, please pass HEX colour values only. +> + + + + + +### 1.4.1 Enable UPI Intent on iOS *(Optional)* + + Provide your customers with a better payment experience by enabling UPI Intent on your app's Checkout form. In the UPI Intent flow: +1. Customer selects UPI as the payment method in your iOS app. A list of UPI apps supporting the intent flow is displayed. For example, PhonePe, Google Pay and Paytm. +2. Customer selects the preferred app. The UPI app opens with pre-populated payment details. +3. Customer enters their UPI PIN to complete their transactions. +4. Once the payment is successful, the customer is redirected to your app or website. + +To enable this in your iOS integration, you must make the following changes in your app's info.plist file. + +```xml: info.plist +LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + +``` + +Know more about [UPI Intent and its benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). + +### UPI Intent on Recurring Payments + +Configure and initiate a recurring payment transaction on UPI Intent: + +```swift: ViewController.swift +let options: [String:Any] = [ + "key": "YOUR_KEY_ID", + "order_id": "order_DBJOWzybfXXXX", + "customer_id": "cust_BtQNqzmBlXXXX", + "prefill": [ + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + ], + "image": "https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + "amount": 10000, // Amount should match the order amount + "currency": "INR", + "recurring": 1 // This key value pair is mandatory for Intent Recurring Payment. +] +```objectivec: ViewController.m +NSDictionary *options = @{ + @"key": @"YOUR_KEY_ID", + @"order_id": @"order_DBJOWzybfXXXX", + @"customer_id": @"cust_BtQNqzmBlXXXX", + @"prefill": @{ + @"contact": @"+919000090000", + @"email": @"gaurav.kumar@example.com" + }, + @"image": @"https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + @"amount": @(10000), // Amount should match the order amount + @"currency": @"INR", + @"recurring": @(1) // This key value pair is mandatory for Intent Recurring Payment. +}; +``` + + + + + + + + + +### 1.5 Handle Success and Errors Events + + After completing payment, you can handle success or error events by implementing `onPaymentSuccess` and `onPaymentError` methods of the `RazorpayPaymentCompletionProtocol`. + + Alternatively, you can implement `onPaymentSuccess` and `onPaymentError` methods of `RazorpayPaymentCompletionProtocolWithData`. + + + + ```swift: ViewController.swift + extension CheckoutViewController : RazorpayPaymentCompletionProtocol { + + func onPaymentError(_ code: Int32, description str: String) { + print("error: ", code, str) + self.presentAlert(withTitle: "Alert", message: str) + } + + func onPaymentSuccess(_ payment_id: String) { + print("success: ", payment_id) + self.presentAlert(withTitle: "Success", message: "Payment Succeeded") + } + } + ```objectivec: ViewController.m + - (void)onPaymentSuccess:(NSString *)payment_id { + [self showAlertWithTitle:SUCCESS_TITLE + andMessage:[NSString + stringWithFormat:SUCCESS_MESSAGE, payment_id]]; + } + + - (void)onPaymentError:(int)code description:(NSString *)str { + [self showAlertWithTitle:FAILURE_TITLE + andMessage:[NSString + stringWithFormat:FAILURE_MESSAGE, code, str]]; + } + ``` + + + ```swift: ViewController.swift + extension CheckoutViewController: RazorpayPaymentCompletionProtocolWithData { + + func onPaymentError(_ code: Int32, description str: String, andData response: [AnyHashable : Any]?) { + print("error: ", code) + self.presentAlert(withTitle: "Alert", message: str) + } + + func onPaymentSuccess(_ payment_id: String, andData response: [AnyHashable : Any]?) { + print("success: ", payment_id) + self.presentAlert(withTitle: "Success", message: "Payment Succeeded") + } + } + ```objectivec: ViewController.m + - (void)onPaymentError:(int32_t)code description:(NSString * _Nonnull)str andData:(NSDictionary * _Nullable)response { + NSLog(@"%@ %@",str, response); + } + - (void)onPaymentSuccess:(NSString * _Nonnull)payment_id andData:(NSDictionary * _Nullable)response { + NSLog(@"%@ %@",payment_id, response); + } + ``` + + After completing the payment, add necessary actions based on success or error events. + + + + + + Failure Codes + + - 0: Network error + - 1: Initialization failure / Unexpected behaviour + - 2: Payment cancelled by the user + + Success handler receives `payment_id` that you can use later for capturing the payment. + + + + + + +### 1.6 Store the Fields in Database + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.7 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + + +### 1.8 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +## 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## 3. Go-live Checklist + +Check the go-live checklist for Razorpay iOS integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/payment-gateway/ios-integration/standard/payment-methods/turbo-upi.md b/llm-content/payments/payment-gateway/ios-integration/standard/payment-methods/turbo-upi.md new file mode 100644 index 00000000..b933446f --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/standard/payment-methods/turbo-upi.md @@ -0,0 +1,169 @@ +--- +title: Integrate with Turbo UPI +description: Steps to integrate Razorpay Turbo UPI with your app. +--- + +# Integrate with Turbo UPI + +With Razorpay Turbo UPI, businesses experience faster and simpler payments. It condenses the payment process from 5 steps to just 1, eliminating app redirections. Enjoy a seamless in-app payment experience, reduce dependencies on third-party UPI apps, and gain complete visibility of the payment journey. + +You can seamlessly integrate Turbo UPI with Razorpay iOS Standard SDK. Explore the full potential of [Razorpay Turbo UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/turbo-upi.md) and know How it Works. + +![Turbo UPI Standard Checkout Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-flow.jpg.md) + +## Prerequisites + +- Integrate with [Razorpay iOS Standard SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard/integration-steps.md). Ensure that you integrate with SDK version 1.0.0 or higher. +- Import the following frameworks: + - Common library/NPCI framework + - Axis olive framework + - Razorpay Turbo UPI framework + +> **WARN** +> +> +> +> **Watch Out!** +> +> The minimum supported iOS version for Turbo UPI is 11 and above. +> + +## Onboarding Flow + +Ensure your customers [onboard with Razorpay Turbo UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/turbo-upi.md#2-onboarding-flow) to get started. + +## Installation + +Turbo UPI wrapper plugin is available as a cocoapod, which can be integrated with any iOS application with a minimum deployment target of iOS 11 later. Add the code given below in the project’s `podfile` to get this cocoapod: + +```json: +pod razorpay-turbo-pod +``` + +## Turbo UI SDK Integration + +Follow these steps to integrate with Razorpay Turbo UPI: + +1. Initialise the Checkout object to enable the Turbo UPI functionality. + + ```swift: Swift + // The `razorpay` variable can be declared a Global Variable in the ViewController. + + var razorpay: RazorpayCheckout? + + self.razorpay = RazorpayCheckout.initWithKey(checkoutKey ?? "", andDelegateWithData: self, plugin: RazorpayTurboUPI.turboUIPlugin()) + + ```objectivec: Objective C + razorpay = [RazorpayCheckout initWithKey:@"Your_Key_ID" andDelegate: self withPaymentWebView: webView plugin: [RazorpayTurboUPI turboUIPlugin]]; + ``` + +2. Use the following code to link the newly created UPI account with your app. This function can be called from any application section, offering multiple entry points for customers to link their UPI account with your app. Linking it in advance allows customers to pay directly with the linked `UpiAccount` without repeating the linking process. + + ```swift: Swift + self.razorpay?.upiTurbo?.linkNewUpiAccount(mobileNumber: , color: , completionHandler: { response, error in + // Handle the onboarded accounts Response + }) + + ```objectivec: Objective C + [razorpay.upiTurbo linkNewUpiAccountWithMobileNumber:@"919000000000" color:@"0xFF1234" completionHandler:^(id _Nullable upiAccounts, NSError * _Nullable error) { + }]; + ``` + +> **INFO** +> +> +> **Payment Flow** +> +> Razorpay SDK will handle all the changes related to `UpiTurbo` internally. To integrate with the payment flow, [pass payment option and display the checkout form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard/integration-steps.md#14-pass-payment-options-and-display-checkout-form). +> + +## Non-Transactional Flow + +Razorpay provides a single exposed function that allows you to manage linked UPI accounts and access all non-transactional flows seamlessly. + +![View the non-transactional flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-non-transactional.jpg.md) + + +### Manage UPI Accounts + + The SDK manages the linked `UpiAccounts` on the application by triggering `manageUpiAccounts()`, which follows the following internal non-transaction flows for `UpiAccounts`: + + - **Fetch balance**: Check the customer's account balance. + - **Change UPI pin**: Provide the customer the ability to change their UPI PIN. + - **Reset UPI pin**: Let your customers reset the pin for their account. + - **Delete the account from the application**: Let your customers delink, that is, remove a selected UPI account from your application. + + ```swift: Swift + self.razorpay?.upiTurbo?.manageUpiAccount(mobileNumber: , color: "") + + ```objectivec: Objective C + [razorpay.upiTurbo manageUpiAccountWithMobileNumber:@"919000000000" color:@"0xFF1234"]; + ``` + + +## Models Exposed from the SDKs + +The SDKs given below provide access to exposed models for seamless integration. + + +### TurboError + + + + Error | Description + --- + `errorCode` | Types of error codes - `BAD_REQUEST_ERROR`: Failure from the client's end (SDK). +- `GATEWAY_ERROR`: Failure either from the Secure Component or the Bank. +- `SERVER_ERROR`: Failure at PSP. + + --- + `errorDescription` | Brief description of the error. + --- + `errorReason` | Specifies the specific reason for the error. + --- + `errorSource` | Indicates the origin of the error. Possible values: - `gateway` +- `issuer_bank` +- `beneficiary_bank` +- `customer_psp` +- `customer` +- `internal` + + --- + `errorStep` | Highlights the stage where the error occurred. + + + + [Refer to the list of possible error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard/payment-methods/turbo-upi/error-codes.md). + + +## Go-Live Checklist + +For iOS users, outgoing device binding SMS is editable by default. To ensure these SMS messages are non-editable, you must complete the following steps: + +### Requesting UPI Device Validation Entitlement + + +### 1. Submit a Request on the Apple Developer Portal + + - Log in to the [Apple Developer Portal](https://developer.apple.com/contact/request/upi-device-validation). + - Fill out the necessary details to request permission for the `setUPIVerificationCodeSendCompletion` API, which allows secure, non-editable content for device registration SMS. + - Await approval from Apple. + + + +### 2. Submit Details to NPCI + + Once Apple approves the entitlement, share the request details with NPCI for their approval. Use the format given below for submitting the details: + - Name of the App: + - Functionality (UPI or CBDC App): UPI + - App ID: + - Team ID: + - Request ID: + - Bundle ID: + + + +### 3. Follow the Guidelines for Implementation + + - Ensure your app supports iOS 17 and above. + - Use the `setUPIVerificationCodeSendCompletion` API to comply with NPCI requirements. diff --git a/llm-content/payments/payment-gateway/ios-integration/standard/payment-methods/turbo-upi/error-codes.md b/llm-content/payments/payment-gateway/ios-integration/standard/payment-methods/turbo-upi/error-codes.md new file mode 100644 index 00000000..f357f95c --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/standard/payment-methods/turbo-upi/error-codes.md @@ -0,0 +1,421 @@ +--- +title: Turbo UPI SDK - Error Codes | iOS Standard Integration +heading: Turbo UPI SDK - Error Codes +description: List of error codes for Turbo UPI SDK. +--- + +# Turbo UPI SDK - Error Codes + +Given below is the list of error codes categorised by error reasons, with relevant descriptions, source and step. + +### Bad Request Errors + +Given below is the list of Bad Request errors. + + +### bank_not_live_on_upi + + - **Description**: The selected bank is not enabled on UPI. Please try using another bank. + - **Source**: gateway + - **Step**: customer_onboarding + + + +### account_does_not_exist + + + + Payment Debit Request + + - **Description**: No accounts found for the selected bank. Please try using another bank. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Payment Credit Request + + - **Description**: Payment was unsuccessful as the receiver's bank account is not valid. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + + + + +### transaction_not_allowed + + + + Payment Debit Request + + - **Description**: Transaction not permitted to the account as per your bank policy. Please contact your bank for more details or try with another bank account. + - **Source**: customer + - **Step**: payment_debit_request + + + +### Payment Credit Request + + - **Description**: Payment not allowed as it got declined by the receiver's bank. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + + + + +### upi_pin_registration_card_expired + + - **Description**: Card used while setting UPI PIN has expired. Please use another debit card or use another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### upi_pin_registration_card_not_found + + - **Description**: Card details used while setting UPI PIN are incorrect. Please re-check and try again. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### upi_pin_registration_card_restricted + + - **Description**: Card used while setting UPI PIN has been blocked by your bank. Please reach out to your bank for more information or try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### bank_technical_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_status_request + + + +### pin_not_set + + - **Description**: Payment was unsuccessful as you have not set the UPI PIN on the app. Try using another method. + - **Source**: customer_psp + - **Step**: payment_authentication + + + +### customer_not_registered + + - **Description**: No bank account is associated with this mobile number. Please try again by adding your account. + - **Source**: gateway + - **Step**: customer_onboarding + + + +### server_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: gateway + - **Step**: payment_authentication + + + +### payment_cancelled_by_user + + - **Description**: Flow was aborted as you pressed back from the PIN screen. Please try again. + - **Source**: customer + - **Step**: payment_authorization + + +### Gateway Errors + +Given below is the list of gateway errors. + + +### incorrect_otp + + - **Description**: You have entered an incorrect OTP. Try again. + - **Source**: customer + - **Step**: customer_onboarding + + + +### otp_expired + + - **Description**: You have entered an expired OTP. Please regenerate OTP and try again. + - **Source**: customer + - **Step**: customer_onboarding + + + +### insufficient_funds + + - **Description**: Payment was unsuccessful due to insufficient funds. Kindly check your balance and try again. + - **Source**: customer + - **Step**: payment_debit_request + + + +### insufficient_funds_mandate_block + + - **Description**: Payment was unsuccessful as the amount in your account is blocked for another payment. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### otp_attempts_exceeded + + - **Description**: You have entered an incorrect OTP too many times. Try again in some time. + - **Source**: customer_psp + - **Step**: customer_onboarding + + + +### account_dormant + + - **Description**: Payment was unsuccessful as the receiver's bank account is inactive. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_credit_request + + + +### bank_not_live_on_upi + + - **Description**: Selected bank is not available on UPI. Please try using another bank. + - **Source**: issuer_bank + - **Step**: customer_onboarding + + + +### payment_timed_out + + + + Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_response + + + +### UPI ID Not Reachable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is not reachable at this time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + + + + +### first_transaction_limit_exceeded + + - **Description**: Payment was unsuccessful as you exceeded the first-time transaction limit set by your bank. You can use another bank account or retry after 24 hours. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### transaction_limit_exceeded + + + + Limit Set By Bank Exceeded + + - **Description**: Payment was unsuccessful as you exceeded the transaction limit set by your bank. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### Daily Amount Limit Exceeded + + - **Description**: Payment was unsuccessful as you exceeded the amount limit for the day with this bank account. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + + + + + +### first_time_transaction_freeze_period + + - **Description**: Payment was unsuccessful due to the cooling period set by your bank for first-time user. Please try again after some time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### transaction_frequency_limit_exceeded + + - **Description**: Payment was unsuccessful as the number of transactions exceeds the max limit set by the bank. You can use another bank account or retry after some time. + - **Source**: issuer_bank + - **Step**: payment_debit_response + + + +### bank_account_inactive + + + + Issuer Bank Account Inactive + + - **Description**: Payment was unsuccessful as your account is not active. Please try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Receiver Bank Account Inactive + + - **Description**: Payment was unsuccessful as the receiver's bank account is not active. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_debit_request + + + + + + +### server_error + + + + Temporary Issue - Issuer Bank + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: beneficiary_bank + - **Step**: payment_request + + + +### Temporary Issue - Beneficiary Bank + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: issuer_bank + - **Step**: payment_request + + + + + + +### invalid_ifsc + + - **Description**: Payment was unsuccessful due to a temporary issue. Please retry in some time. + - **Source**: gateway + - **Step**: payment_authentication + + + +### upi_pin_registration_card_blocked + + - **Description**: Card used while setting UPI PIN has been blocked by your bank. Please reach out to your bank for more information or try using another bank account. + - **Source**: issuer_bank + - **Step**: payment_authentication + + + +### bank_technical_error + + + + UPI ID Temporarily Unavailable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: payment_credit_response + + + +### Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: payment_credit_response + + + + + + +### payment_declined + + + + Declined by Bank + + - **Description**: Payment was unsuccessful as it was declined by your bank. Reach out to your bank for more details. Try using another account. + - **Source**: issuer_bank + - **Step**: payment_debit_request + + + +### Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: beneficiary_bank + - **Step**: payment_debit_request + + + + + + +### pin_attempts_exceeded + + - **Description**: You have exceeded the incorrect UPI PIN attempts. You can use another bank account or retry after 24 hours. + - **Source**: customer + - **Step**: payment_authentication + + + +### incorrect_pin + + - **Description**: You have entered incorrect UPI PIN. Please try again with the correct UPI PIN. + - **Source**: customer + - **Step**: payment_authentication + + + +### linked_account_removal_failed + + - **Description**: Unable to remove the account. Please try again. + - **Source**: customer_psp + - **Step**: account_management + + + +### sms_text_not_received + + - **Description**: Something went wrong while sending SMS. Please try again. + - **Source**: gateway + - **Step**: customer_onboarding + + +### Server Errors + +Given below is the list of server errors. + + +### server_error + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Source**: issuer_bank + - **Step**: customer_onboarding + + + +### server_error + + - **Description**: We are facing some trouble completing your request at the moment. Please try again shortly. + - **Source**: internal + - **Step**: payment_authorization diff --git a/llm-content/payments/payment-gateway/ios-integration/standard/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/ios-integration/standard/troubleshooting-faqs.md new file mode 100644 index 00000000..ac5814c9 --- /dev/null +++ b/llm-content/payments/payment-gateway/ios-integration/standard/troubleshooting-faqs.md @@ -0,0 +1,142 @@ +--- +title: Payment Gateway | iOS Integration - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common error scenarios and find answers to frequently asked questions about standard iOS integration. +--- + +# Troubleshooting & FAQs + +### 1. I am getting an error "Razorpay contains unsupported Architecture x86_64" while submitting the archive to the app store. What should I do? + + When a framework is distributed, it contains architectures of the simulators so that the consumer of the framework can build it on a simulator. However, when uploading the archive on iTunes, you have to strip these architectures. If you use Cocoapods, it strips the simulator architectures on its own. + + Since you are not using it, please follow the below-mentioned steps: + + 1. Download the [script](https://s3.ap-south-1.amazonaws.com/rzp-1415-prod-mobile/ios/CustomLinks/StripInvalidArchitectures.sh). + 2. Locate the directory in which Razorpay.framework is present in the archive that you are trying to upload. + 3. Move the attached script to the above directory and run it. + 4. Remove the script file. + + + +### 2. I see a message on the screen to update my SDK. Will my customers also see the message? + + No. You see the update SDK alert because a newer version of our SDK is available. We recommend you use the latest SDK. This message shows up only when running the app on a simulator or using a test key to initialise the SDK. + + + +### 3. I am getting an error `Image not loaded: .dyld`. What should I do? + + - Ensure that Razorpay.framework is present in your project settings in both the Embedded Binaries and Linked Frameworks. + - Set Always Embed Swift Libraries to "yes" in the project settings. It can happen because of the incompatibility between the developed Swift version with Razorpay.framework and the Swift version of your project. + - We recommend using the framework compiled with the required Swift language from our iOS documentation. + + + +### 4. Razorpay's framework is bitcode enabled. Do I also have to enable bitcode in my project? + + Razorpay's bitcode enabled framework works even if you do not enable bitcode in your project. + + + +### 5. I am getting an error "Module compiled with Swift X version cannot be imported in the Swift Y version." What should I do? + + There are multiple Swift versions available, but unfortunately, Apple does not make all the versions compatible, so we release frameworks compiled in multiple Swift versions. + - Download the framework that is compatible with your project. + - If you run into a compatibility issue, ensure that you try both frameworks. + + + +### 6. I am getting an error saying "Could not find module RazorpayCommonCrypto." What should I do? + + A module map is used to define the header files that should be converted into modules and used by your project. Razorpay handles this internally. + - **Cause**: By default, the Xcode's name is assumed to be Xcode.app. For example, your default Xcode appears as Xcode9.3. + - **Resolution**: Insert [this](https://s3.ap-south-1.amazonaws.com/rzp-1415-prod-mobile/ios/CustomLinks/StripInvalidArchitectures.sh) script in the directory that contains `Razorpay.framework` file and run it from your terminal. + + + +### 7. My builds are failing and I am getting an error "Cannot find protocol declaration for RazorpayPaymentCompletionProtocol." What should I do? + + Add the following code in the `ViewController.m` file: + + ```objectivec: Add code + include instead of in your ViewController.m file + ``` + + This will improve the iOS sample app experience and reduce the build failure. + + + +### 8. Does Razorpay support Xamarin for SDK integration? + + No, we do not support Xamarin. However, since Xamarin is essentially a wrapper around Android and iOS, you can create your own Xamarin wrapper using our [Android](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard.md) and [iOS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard.md) SDKs. + + You can refer to Xamarin for integrating native [Android](https://docs.microsoft.com/en-us/xamarin/android/platform/binding-java-library/) and [iOS](https://docs.microsoft.com/en-us/xamarin/ios/platform/binding-objective-c/) libraries. Alternatively, you can use web integration to open the checkout form in a web view. + + + +### 9. How can I check the Razorpay iOS Standard SDK version? + + To check the SDK version: + 1. Open your iOS project in Xcode. + 2. In the project navigator, locate the `Podfile` in the root directory of your project. + 3. Open the `Podfile` and look for the line that specifies the Razorpay SDK pod. The version number is represented by `x.y.z`. + + + +### 10. How can I update the Razorpay iOS Standard SDK version? + + To update the iOS Standard SDK, follow these steps: + 1. In your project’s Podfile, specify the [latest SDK version](https://github.com/razorpay/razorpay-pod/releases/). If you do not mention any version, it automatically picks the latest version from Cocoapods. + 2. Run `pod repo update` to fetch the latest release versions of the pods. + 3. After updating, ensure that the integration is successful and there are no issues with the updated SDK. + + + +### 11. How to generate privacy report with Razorpay's SDKs PrivacyManifest file? + + After installing the `razorpay-pod` cocoapod in the project, once the application is archived, privacy report can be generated from the context menu for the created archive. + The data used by the Razorpay SDK will be listed under Razorpay.framework along with the reasons for the usage of the data. + For more information, you can refer to [Apple's documentation for generating the privacy report](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_data_use_in_privacy_manifests#4239187). + For more information about PrivacyManifests and Required Reason API please refer to [Apple's documentation](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_data_use_in_privacy_manifests). + + + +### 12. How can I verify the signature used for razorpay-pod's xcframework? + + After the installation of the `razorpay-pod` cocoapod, inside the pods folder, expand the folder Development `Pods/razorpay-pod/Frameworks`. Inside this folder, you will find the Razorpay.xcframework file. On selecting this file, XCode's File inspector shows you the XCFramework’s code signing status. If the framework is signed with an Apple Developer certificate, the inspector also shows which Apple Developer team signed the framework. + + You can find more about verification of the signature [here](https://developer.apple.com/documentation/xcode/verifying-the-origin-of-your-xcframeworks). + + + +### 13. How can I accept payments on my Android or iOS apps without integrating with the native SDKs? + + If you want to accept payments on your Android or iOS apps without integrating with our native SDKs, you can reuse your Standard Integration code. This approach opens the checkout form in a WebView within your mobile app. Know more about [Webview for Mobile Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview.md). + + + +### 14. I have integrated with the Razorpay Payment Gateway to accept payments on my mobile app. However, it gets rejected when I try to publish my app on the Apple App Store. The following message is displayed, "We noticed that your app offers a subscription with a mechanism other than the in-app purchase API." How to resolve this? + + - **Cause**: As per Apple's policy, if you use a subscription model in your iOS app, you must use Apple's in-app purchase APIs. Apple does not redirect out of the app for digital product purchases. + - **Resolution**: Use Apple's in-app purchase APIs. + + + +### 15. Why did my App get rejected by the iOS team as per the guideline 3.1.1? + + An application involving a subscription model could be rejected because of the guideline **3.1.1 - Business - Payments - In-App Purchase**. This is due to the fact that subscription comes under the **Auto-renewable subscriptions to a service** section of the [Apple guidelines.](https://developer.apple.com/design/human-interface-guidelines/in-app-purchase) + + You cannot use an external payment gateway to accept payments by selling digital products or content. You must use Apple’s In-App Purchase to avoid app rejection. + ### List of Restricted Payment Modes + + - **Consumable content** like lives or gems in a game. + - **Non-consumable content** like premium features in an app. + - **Auto-renewable subscriptions** to a service, like cloud storage or a magazine. + - **Non-renewing subscriptions** to a service or content that lasts for a limited time, like access to an in-game battle pass. + + + +### 16. Can I enable UPI Intent on my Android or iOS app? + + Yes, you can enable UPI Intent on your [Android](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-android.md) or [iOS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-ios.md) app. diff --git a/llm-content/payments/payment-gateway/quick-integration.md b/llm-content/payments/payment-gateway/quick-integration.md new file mode 100644 index 00000000..63763c35 --- /dev/null +++ b/llm-content/payments/payment-gateway/quick-integration.md @@ -0,0 +1,65 @@ +--- +title: Prerequisites | Razorpay Quick Integration +heading: Prerequisites +description: Check the prerequisites before you integrate with Razorpay Quick Integration. +--- + +# Prerequisites + +- **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about Quick Integration. + +Quick integration is the fastest way to integrate Razorpay Checkout on your website and accept domestic and international payments from customers. + +## Quick Integration vs Standard Integration + +> **INFO** +> +> +> **Handy Tips** +> +> The Quick Integration (previously known as Automatic integration method) is simple and fast. However, in case you would like more control over your integration and checkout, we recommend the [Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). +> + +Given below is a comparison between the Standard and Quick integrations: + +Particulars | Quick Integration | Standard Integration +--- +**Pay Button** | The pay button is auto-created and cannot be customised. For example, you cannot change its font or background colour. | You can create and customise the pay button as per your business requirements. +--- +**Checkout Functions** | This is an HTML-based form action method, which does not support any JavaScript customisations.| This is a JavaScript method, allowing you to use additional functions to automatically open and close Checkout as required. + +## Integration Steps + +**Before you proceed:** + +- Create a [Razorpay Account](https://dashboard.razorpay.com/signup) + +- Generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. +- Know about the [Razorpay Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md). + +Follow these integration steps: + + - **1. Build Integration**: Integrate Standard Checkout form on website. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +> **INFO** +> +> +> **Other Solutions** +> +> Looking to integrate Razorpay with your mobile app or at a server-level? Check the list of [integration types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md#integration-types). +> + +### Related Information + +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) (Recommended) +- [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) (Recommended) +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md) +- [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md) +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) +- [Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) +- [Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/quick-integration/troubleshooting-faqs.md) diff --git a/llm-content/payments/payment-gateway/quick-integration/integration-steps.md b/llm-content/payments/payment-gateway/quick-integration/integration-steps.md new file mode 100644 index 00000000..35de9025 --- /dev/null +++ b/llm-content/payments/payment-gateway/quick-integration/integration-steps.md @@ -0,0 +1,688 @@ +--- +title: Quick Integration - Steps | Razorpay Payment Gateway +heading: Integration Steps +description: Steps to integrate with Razorpay Quick Integration. +--- + +# Integration Steps + +Follow these steps to integrate the standard checkout form on your website: + + - **1. Build Integration**: Integrate Standard Checkout form on website. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Create an Order in Server + + **Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order using: + + + Use this endpoint to create an order using the Orders API. + + /orders + + ```curl: Curl + curl -X POST https://api.razorpay.com/v1/orders + -U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -H 'content-type:application/json' + -d '{ + "amount": 50000, + "currency": "", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230 + }' + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", ""); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + DATA = { + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } + } + client.order.create(data=DATA) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('receipt' => '123', 'amount' => 50000, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + ```csharp: .NET + RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.add("receipt", "order_rcptid_11"); + options.add("currency", ""); + Order order = client.Order.Create(options); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + options = amount: 50000, currency: '', receipt: '' + order = Razorpay::Order.create + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "", + receipt: "receipt#1", + notes: { + key1: "value3", + key2: "value2" + } + }) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "", + "receipt": "some_receipt_id" + } + body, err := client.Order.Create(data) + ``` + + ```json: Success Response + { + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 + } + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + + You can use the Postman workspace below to create an order: + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + + You can create an order manually by integrating the API sample codes on your server. + + + + Request Parameters + + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `22225`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of ₹7,000 is to be received from the customer in two installments of #1 - ₹5,000, #2 - ₹2,000, then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + +### 1.2 Pass Order ID and Other Options to Checkout + + - This integration method provides a default **Pay with Razorpay** button that invokes the Checkout form. + - Pass Checkout form options as data attributes inside a `` tag. You can add any additional hidden or visible fields to the form, which will be submitted along with the form. + - Send Checkout options as form-data to the following URL in a POST request. + + + + 1.2.1 Code to Add Pay Button + + /https://www.example.com/success/ + + The following sample code passes the Razorpay checkout options as HTML data attributes: + + + ```html: Quick Integration + + + + + ``` + + + + + + +### 1.2.2 Handle Payment Success and Failure + + The way the payment success and failure scenarios are handled depends on the [Checkout Sample Code](#122-code-to-add-pay-button) you used in the previous step. + + + + #### On Payment Success + + Razorpay makes a POST call to the callback URL with the **razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature** in the response object of the successful payment. Only successful authorisations are auto-submitted. + + + #### On Payment Failure + + In case of failed payments, the checkout is displayed again to facilitate payment retry. + + + + + +### 1.2.3 Checkout Options + + `data-key` _mandatory_ +: `string` API Key ID generated from the Razorpay Dashboard. + +`data-amount` _mandatory_ +: `integer` The amount to be paid by the customer in cents. For example, if the amount is , enter `50000`. + +`data-currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) + +`data-order_id` _mandatory_ +: `string` Unique identifier of the Order generated in [Step 1: Create an Order in your Server](#11-create-an-order-in-server). + +`data-buttontext` _mandatory_ +: `string` The text you want to display on the button. For example, `Buy Now!`. + +`data-name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`data-description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`data-image` _mandatory_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`data-prefill.name` _optional_ +: `string` Cardholder's name to be pre-filled when the Checkout opens. + +`data-prefill.email` _optional_ +: `string` Customer's email to be pre-filled when the Checkout opens. + +`data-prefill.contact` _optional_ +: `string` Customer's phone number to be pre-filled when the Checkout opens. + +`data-theme.color` _optional_ +: `string` Brand color to alter the appearance of Checkout form. For example, `#F37254`. + +Know more about the complete [list of available Checkout options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#123-checkout-options). + + + + + + +### 1.3 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.4 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + Here are the links to our [SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md#github-and-documentation-links-for-sdks) for the supported platforms. + + + +### 1.6 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +## 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## 3. Go-live Checklist + +Check the go-live checklist for Razorpay Web Standard Checkout integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/payment-gateway/quick-integration/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/quick-integration/troubleshooting-faqs.md new file mode 100644 index 00000000..9b5a0378 --- /dev/null +++ b/llm-content/payments/payment-gateway/quick-integration/troubleshooting-faqs.md @@ -0,0 +1,31 @@ +--- +title: Quick Integration - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common errors and find answers to frequently asked questions related to Razorpay Quick Integration. +--- + +# Troubleshooting & FAQs + +### 1. What is Razorpay Quick Integration? + + Razorpay Quick integration is the fastest way to integrate Razorpay Checkout on your website and accept domestic and international payments from customers. + + + +### 2. What is the difference between Quick Integration and Standard Integration? + + The main difference lies in the customisation options and the methods used. Quick Integration features an auto-created pay button that cannot be customised (like font or background color) and uses an HTML-based form action method, making customisation via JavaScript functions impossible. + + In contrast, Standard Integration allows you to create and customise the pay button to fit your business requirements and utilises a JavaScript method, enabling the use of additional functions to automatically open and close checkout as needed. + + + +### 3. Can I use Quick Integration to integrate Razorpay Checkout on a mobile app or at a server level? + + No, Quick Integration is not supported for mobile apps or server-level integration. If you want to integrate Razorpay with your mobile app or at a server level, check the list of [other integration methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md#integration-types) available. + + + +### 4. What payment methods are supported by Razorpay Quick Integration? + + Razorpay Quick Integration supports a wide range of payment methods including netbanking, credit and debit cards, wallets, UPI and more. Check the list of [support payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/quick-integration/integration-steps.md#supported-payment-methods). diff --git a/llm-content/payments/payment-gateway/rainy-day.md b/llm-content/payments/payment-gateway/rainy-day.md new file mode 100644 index 00000000..a4258f14 --- /dev/null +++ b/llm-content/payments/payment-gateway/rainy-day.md @@ -0,0 +1,21 @@ +--- +title: Handle Payment Exceptions with Rainy Day Kit +description: Provide additional support to your customer in case of payment difficulties while using Razorpay Checkout. +--- + +# Handle Payment Exceptions with Rainy Day Kit + +While Razorpay strives to provide a positive payment experience to every customer, they might face payment exceptions such as: +- Late Authorization +- Payment Downtime +- Payment Errors + +To overcome such exceptions and provide a smooth payment experience to your customers, use the Rainy Day Kit. + +Exception | Solution | What it does +--- +Amount debited though the payment has failed | [Payment Capture Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/rainy-day/capture-settings.md) | Allows you to better deal with 'Money debited but Payment Failed' scenarios. +--- +No communication of payment method unavailability | [Payment Downtime Notifications](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/rainy-day/downtime.md) | Sends instant alerts when a particular payment method is down. +--- +Errors during the payment process | [Payment Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/rainy-day/errors.md) | Helps you identify the exact cause of payment error. diff --git a/llm-content/payments/payment-gateway/rainy-day/capture-settings.md b/llm-content/payments/payment-gateway/rainy-day/capture-settings.md new file mode 100644 index 00000000..517e29c1 --- /dev/null +++ b/llm-content/payments/payment-gateway/rainy-day/capture-settings.md @@ -0,0 +1,224 @@ +--- +title: Rainy Day | Payment Capture Settings +heading: About Payment Capture Settings +description: Configure auto-capture settings for individual payments using APIs and at an account level using the Razorpay Dashboard. +--- + +# About Payment Capture Settings + +When a customer makes an online payment, it usually flows through different states. Know more about [payment states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#payment-life-cycle). + +By default, once your customer completes a payment, it is automatically moved to the `captured` state. + +However, the payment can remain in the `authorized` state in the following scenarios: + +- **Late authorization** + + Due to external factors such as network issues or technical errors, Razorpay may not immediately receive payment status from the bank. In this case, Razorpay polls the APIs intermittently for 3 days to check the status. If we receive the payment status as successful, the payment is moved to the `authorized` state. Know more about [ late authorization](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md). +- **Specific business use case** + + Some businesses such as those in the Ecommerce industry, may retain the payment in the `authorized` state and later move them to the `captured` state. + +> **WARN** +> +> +> **Watch Out!** +> +> - For **Direct Settlement** merchants, payments will be auto-captured irrespective of the configuration. +> - You must ensure that all payments in the authorized state are moved to the captured state within 3 days of creation. This is mandatory because payments that are not captured within this period will be refunded automatically to customers. +> + +You can configure **Payment Capture settings** on the Dashboard. You can choose to: + - [Auto-capture all payments](#auto-capture-all-payments) + - [Auto-capture with set timeouts](#auto-capture-with-custom-timeouts) + - [Manually capture timeout](#manual-capture-timeout) + +## Payment Capture Settings + +> **INFO** +> +> +> **Handy Tips** +> +> - Only the Razorpay account owner can configure payment capture settings on the Dashboard. +> - Payment Capture settings are applicable only for payments created using the Orders API. +> + +Option | Description +--- +Auto-capture all payments | All payments `authorized` within 3 days from the time of creation are auto-captured. +--- +Auto-capture timeouts | - Allows you to define custom auto-capture timeout. +- The minimum value is 12 minutes. +- The maximum value (default) is 3 days. + +--- +Manual capture timeout | - Allows you to define custom manual capture timeout. +- The minimum value is 12 minutes. +- The maximum value (default) is 3 days. + +--- +Auto-refund speed | Payments in the `authorized` state are auto-refunded after the timeout. The available option is **Normal Refund** where the payment is refunded to your customer in 5-7 working days. The refund speed selected here is only applicable to payments that are auto-refunded. + + account owner can configure payment capture settings on the Dashboard. +- Payment Capture settings are applicable only for payments created using the Orders API. + +Option | Description +--- +Auto-capture all payments | All payments `authorized` within 3 days from the time of creation are auto-captured. +--- +Auto-capture timeouts | - Allows you to define custom auto-capture timeout. +- The minimum value is 12 minutes. +- The maximum value (default) is 3 days. + +--- +Auto-refund speed | Payments in the `authorized` state are auto-refunded after the timeout. The available option is **Normal Refund** where the payment is refunded to your customer in 5-7 working days. The refund speed selected here is only applicable to payments that are auto-refunded. + +## Auto-capture all Payments + +You can use this setting to capture all `authorized` payments automatically. This eliminates the time and effort spent manually capturing payments. **This is the default setting for all customers.** + + +![ Auto-capture all payments process flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-capture-auto-capture-all-payments.jpg.md) + +Watch this video to know how to set up the **Automatic Capture** option. + +[Video: https://www.youtube.com/embed/1u0X1k6mh-U] + + + + +### To auto-capture all `authorized` payments: + + 1. Log in to the Dashboard. + 2. Navigate to the **Account & Settings** option and scroll to the **Payments Capture** option. + 3. Click the **Change** button next to **Automatic Capture**. + 4. Under **Automatic Capture**, click the drop-down and select the time period in the **Capture all payments authorised within** field. For example, 3 days. + 5. Click **Next**. + 6. Select **Refund Automatically** and click **Next**. + 7. Select Normal Refund as the **Refund Speed**. + 8. Click **Save**. + + +## Auto-Capture with Custom Timeouts + +Once the payment is `created`, you can: + - Auto-capture payments that are `authorized` within a certain time period, and + - Manually capture payments that are `authorized` after that time period. + +You can do this by setting up custom timeouts for automatic and manual capture. + +### Auto-capture Timeout + +Let us say you only want to auto-capture payments that are `authorized` within 3 days from creation. + +--- +Capture Settings | - Select **Automatic Capture** +- Automatic capture timeout = 3 days. + +--- +Payments auto-refunded | If payments are `authorized` after 3 days. + + + +![Auto Capture Timeout process flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-capture-auto-capture-timeout.jpg.md) + +Watch this video to see how to set up the **Automatic Capture with Timeout** option. + +[Video: https://www.youtube.com/embed/_pll_tqFGhY?si=Kvl9jk4KoibLTQFb] + +### Auto-capture + Manual Capture Timeouts + +Let us say you want to: + - Auto-capture payments that are `authorized` within 2 days from creation. + - Manually capture payments that are `authorized` within 3 days from creation. + +--- +Capture Settings | - Select **Automatic Capture** +- Automatic capture timeout = 2 days. +- Manual capture timeout = 3 days. + +--- +Payments auto-refunded if | - Payments not `captured` by you within 3 days. +- Payments are `authorized` after 3 days. + +![Auto and Manual Capture Timeout process flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-capture-auto-capture-and-manual-capture-timeouts.jpg.md) + +Watch this video to see how to set up the **Automatic and Manual Capture with Timeout** option. + +[Video: https://www.youtube.com/embed/6vyGZ8vOqno?si=wqvPQNV4d9Cw-x_m] + + +### To configure capture settings: + + 1. Log in to your Dashboard. + 2. Navigate to the **Account & Settings** option and scroll to the **Payments Capture** option. + 3. Click the **Change** button next to **Automatic Capture**. + 4. Under **Automatic Capture**, click the drop-down and select the time period in the **Capture all payments authorised within** field. For example, 2 days. + 5. Click **Next**. + 6. Select **Capture manually via dashboard or API**. + 7. Click the drop-down and select the time period in the **Capture payments manually authorised within** field. For example, 3 days. + 8. Click **Next**. + 9. Select Normal Refund as the **Refund Speed**. + 10. Click **Save**. + + +## Manually Capture all Payments + +You can use this setting to capture `authorized` payments manually. + +> **WARN** +> +> +> **Watch Out!** +> +> Manual capture of payments is not supported on [bank transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). All bank transfer payments are auto-captured. +> + +### Manual Capture Timeout + +Let us say you only want to manually capture payments that are `authorized` within 3 days from creation. To do this, you should set the manual capture timeout as 3 days. + +--- +Capture Settings | - Select **Manual Capture** +- Manual capture timeout = 3 days. + +--- +Payments auto-refunded if | - Payments not `captured` by you within 3 days. +- Payments are `authorized` after 3 days. + + + +![Manual Capture Timeout process flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-capture-manual-capture-only.jpg.md) + +Watch this video to set up the **Manual Capture** option. + +[Video: https://www.youtube.com/embed/zBcK1KIed30?si=F06RpJcegPNBI8ND] + + + + +### To set up the manual capture: + + 1. Log in to the Dashboard. + 2. Navigate to the **Account & Settings** option and scroll to the **Payments Capture** option. + 3. Click the **Change** button next to **Automatic Capture**. + 4. Select the **Manual Capture** option. + 5. Set the manual capture timeout to 3 days and click **Next**. + 6. Select Normal Refund as the **Refund Speed**. + 7. Click **Save**. + + +You can manually capture payments in the `authorized` state using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manual-capture-of-payments). All payments that are not captured within the manual timeout period will be auto-refunded. + +## Configure Payment Capture Settings using Orders API + +Capture values passed in the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) take precedence over the Payment Capture settings configured on the Dashboard. You can use this to change the capture settings for individual payments. + +### Related Information + +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md) +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) +- Manually capture payments in the `authorized` state using the [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments) +- [Set up and Subscribe to Webhook events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) diff --git a/llm-content/payments/payment-gateway/rainy-day/capture-settings/api.md b/llm-content/payments/payment-gateway/rainy-day/capture-settings/api.md new file mode 100644 index 00000000..170df64c --- /dev/null +++ b/llm-content/payments/payment-gateway/rainy-day/capture-settings/api.md @@ -0,0 +1,287 @@ +--- +title: Configure Payment Capture Settings using Orders API +description: Configure auto-capture settings for individual payments using APIs. +--- + +# Configure Payment Capture Settings using Orders API + +Once your customer completes a payment, it is automatically moved to `captured` state. However, the payment can attain `authorized` state in the following scenarios: + +- **Late authorization** + + Due to external factors such as network issues or technical errors, Razorpay may not receive payment status from the bank immediately. In this case, Razorpay polls the APIs intermittently for 5 days to check the status. If we receive the payment status as successful, the payment is moved to the `authorized` state. [Learn more about late authorization](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md). +- **Specific business use case** + + Some businesses such as those in the Ecommerce industry may retain the payment in the `authorized` state and later move them to the `captured` state. + +You must ensure that all payments in the `authorized` state are moved to the `captured` state within 5 days of creation. This is mandatory because payments that are not captured within this time period will be refunded automatically to customers. + +You can configure **Payment Capture setting** for individual payments using the Orders API. + +> **WARN** +> +> +> **Watch Out!** +> +> The options sent in the below API take precedence over the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. +> + +## API + +Use the below endpoint to configure auto-capture settings for individual payments. + +/orders + +```cURL: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u : +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "payment": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "rcptid_11"); +JSONObject payment = new JSONObject(); +payment.put("capture","automatic"); +JSONObject captureOptions = new JSONObject(); +captureOptions.put("automatic_expiry_period",12); +captureOptions.put("manual_expiry_period",7200); +captureOptions.put("refund_speed","optimum"); +payment.put("capture_options",captureOptions); +orderRequest.put("payment",payment); + +Order order = razorpay.orders.create(orderRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount':50000, + 'currency': 'INR', + 'receipt': 'rcptid_11', + 'payment': { + 'capture': 'automatic', + 'capture_options': { + 'automatic_expiry_period': 12, + 'manual_expiry_period': 7200, + 'refund_speed': 'optimum' + } + } +}) + +```php: PHP + +order->create( + array( + 'amount' => 50000, + 'currency' => 'INR', + 'receipt' => 'rcptid_11', + 'payment' => array( + 'capture' => 'automatic', + 'capture_options' => array( + 'automatic_expiry_period' => 12, + 'manual_expiry_period' => 7200, + 'refund_speed' => 'optimum' + ) + ) + ) +); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount":50000, + "currency": "INR", + "receipt": "rcptid_11", + "payment": { + "capture ": "automatic", + "capture_options ": { + "automatic_expiry_period ": 12, + "manual_expiry_period ": 7200, + "refund_speed": "optimum" + } + } +} +Razorpay::Order.create(para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount:50000, + currency: 'INR', + receipt: 'rcptid_11', + payment: { + capture : 'automatic', + capture_options : { + automatic_expiry_period : 12, + manual_expiry_period : 7200, + refund_speed : 'optimum' + } + } +}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient(api_key, api_secret); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "order_rcptid_11"); +options.Add("currency", "INR"); +payment.capture="automatic"; +payment.capture_options.automatic_expiry_period=12; +payment.capture_options.manual_expiry_period=7200; +payment.capture_options.refund_speed="optimum"; +options.Add("payment", payment); +Order order = client.Order.Create(options); +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) + +client := razorpay.NewClient("api_key", "api_secret") + +data := map[string]interface{}{ + "amount": 1234, + "currency": "INR", + "receipt": "some_receipt_id", + "payment": map[string]interface{}{ + "capture": "automatic", + "capture_options": map[string]interface{}{ + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + } +} +body, err := client.Order.Create(data) +``` + +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount, in currency subunit, for order. For example, for an amount of ₹295, enter `29500`. + +`currency` _mandatory_ +: `string` 3-letter ISO currency code for the payment. [List of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`payment` _optional_ +: `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + +`receipt` _optional_ +: `string` Maximum length is 40 characters. Receipt number, for internal reference, entered by you for the order. + +`notes` _optional_ +: `object` Key-value pair to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Response Parameters + +`id` +: `string` The unique identifier of the order. For example, `order_EKwxwAgItmmXdp`. + +`amount` +: `integer` The amount, in currency subunit, for the order. For example, for an amount of ₹295, enter `29500`. + +`amount_paid` +: `integer` The amount, in currency subunit, paid against the order. + +`amount_due` +: `integer` The amount, in currency subunit, pending against the order. + +`currency` +: `string` 3-letter ISO currency code for the payment. [List of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`receipt` +: `string` Maximum length is 40 characters. Receipt number, for internal reference, entered by you for the order. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. +It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. +It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. +No further payment requests are permitted once the order moves to the `paid` state. +The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. For example, `1`. + +`notes` +: `object` Key-value pairs to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Timestamp, in Unix, when the order was created. For example, `1593607540`. + +**Handy Tips** + +- If `automatic_expiry_period` is `60` minutes and `manual_expiry_period` is `120` minutes, payments in the `authorized` state after `120` minutes are auto-refunded. +- If `automatic_expiry_period` is `0` minutes and `manual_expiry_period` is `120` minutes, payments in the `authorized` state after `120` minutes are auto-refunded. + +### Related Information + +- [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#payment-life-cycle) +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) +- [Manually capture payments using Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) +- [Manually capture payments from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments) +- [Set up and subscribe to Webhook events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) diff --git a/llm-content/payments/payment-gateway/rainy-day/downtime.md b/llm-content/payments/payment-gateway/rainy-day/downtime.md new file mode 100644 index 00000000..671c6da1 --- /dev/null +++ b/llm-content/payments/payment-gateway/rainy-day/downtime.md @@ -0,0 +1,819 @@ +--- +title: Rainy Day | Payment Downtime API +heading: About Payment Downtime API +description: Downtimes on payment methods and how to receive notifications. +--- + +# About Payment Downtime API + +Downtime is when one or more payment options underperform, leading to considerable delays in payment processing. These downtimes are due to technical issues or outages at Razorpay's partner or issuing banks. Razorpay informs you about the downtime to communicate it to your customers and display only the unaffected payment methods while accepting payments from them. + +You can poll the API or configure Webhooks to be notified of the downtimes and plan the remediation steps accordingly. + +Downtime communication for the payment methods such as cards, netbanking and UPI is available. + +## Entity + +```json: Netbanking +{ + "id": "down_F1cxDoHWD4fkQt", + "method": "netbanking", + "begin": 1591946222, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "bank": "COSB" + }, + "created_at": 1591946223, + "updated_at": 1591946297 +} +```json: UPI - VPA Handle +{ + "id": "down_F8LCfthx90fMOo", + "method": "upi", + "begin": 1593412063, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "vpa_handle": "oksbi" + }, + "created_at": 1593412092, + "updated_at": 1593412092 +} +```json: UPI - PSP +{ + "id": "down_F8LCfthx90fMOo", + "method": "upi", + "begin": 1593412063, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "psp": "bhim" + }, + "created_at": 1593412092, + "updated_at": 1593412092 +} +```json: Turbo UPI +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "down_F1cxDoHWD4fkQt", + "entity": "payment.downtime", + "method": "upi", + "begin": 1591946222, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "flow": "in_app" + }, + "created_at": 1591946223, + "updated_at": 1591946297 + } + ] +} +```json: Card - Issuer +{ + "id": "down_F7LroRQAAFuswd", + "method": "card", + "begin": 1593196031, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "issuer": "SBIN", + "card_type": "credit" + }, + "created_at": 1593196089, + "updated_at": 1593196089 +} + +```json: Card - Network +{ + "id": "down_F7LroRQAAFuswd", + "method": "card", + "begin": 1593196031, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "network": "VISA", + "card_type": "credit" + }, + "created_at": 1593196089, + "updated_at": 1593196089 +} +``` + +Given below is a list of the downtime entity parameters. + +`id` +: `string` Unique identifier of the downtime's occurrence. + +`entity` +: `string` Here, it will be `payment.downtime`. + +`method` +: `string` The payment method that is experiencing the downtime. Possible values include: + - `card` + - `netbanking` + - `upi` + +`begin` +: `integer` Timestamp (in Unix) that indicates the start of the downtime. Applicable for both scheduled and unscheduled downtimes. + +`end` +: `integer` Timestamp (in Unix) that indicates the end of the downtime. + Available only for scheduled downtimes, where the end-time is known. Set to `null` when the end-time is unknown, possibly during unscheduled downtimes. + +`status` +: `string` Status of the downtime. +Possible statuses are. + - `scheduled`: A downtime is scheduled to happen at a later time. + - `started`: The downtime has started and is ongoing. + - `resolved`: The downtime is resolved. + - `cancelled`: A scheduled downtime that is invalidated. For example, when a scheduled downtime was communicated but was later cancelled by the bank. + +`scheduled` +: `boolean` Possible values: + - `true`: This is a scheduled downtime by the issuer, network, or the bank, which was informed to Razorpay. + - `false`: This is an unscheduled downtime. + +`severity` +: `string` Severity of the downtime. +Possible values: + - `high`: Possible when all the payment methods are affected by downtime. Observed when the issuer, bank or network is down. + - `medium`: Possible when a higher number of declines in transactions or low success rates are observed with the payment methods. + - `low`: Possible when the reason for the downtime is unknown. Impact on payment methods is minimal. + +`instrument` +: Payment method that is underperforming. + + `bank` _if method=netbanking_ + : `string` Bank code of the affected bank. Possible values: + - `HDFC` + - `ICIC` + - `SBIN` + - `KKBK` + - `UTIB` + - `PUNB` + + `network` _if method=card_ + : `string` Card network. Possible values: + - `AMEX` + - `DICL` + - `MC` + - `RUPAY` + - `VISA` + - `ALL` + + `issuer` _if method=card_ + : `string` The 4-character issuer code unique to each issuing bank in India. Possible values: + - `SBIN` + - `HDFC` + - `ICIC` + - `UTIB` + - `CITI` + - `PUNB` + - `KKBK` + - `CNRB` + - `BKID` + - `BARB` + - `JAKA` + - `UBIN` + + `psp` _if method=upi_ + : `string` Code of the affected Payment Service Provider (PSP). This is populated only when VPA handles associated with the PSP are down. If a PSP is associated with multiple VPA handles, it is marked down only when **all** the handles associated with it are down. For example, `google_pay` is marked down only when all Google Pay handles - `oksbi`, `okhdfcbank`, `okicici` and `okaxis` are down. Possible values for this parameter are: + - `google_pay` + - `phonepe` + - `paytm` + - `bhim` + + `vpa_handle` _if method=upi_ + : `string` Affected VPA handle. For example, `@oksbi`. To learn about the possible values, refer to the [list of handles supported by NPCI](https://www.npci.org.in/what-we-do/upi/3rd-party-apps). If the entire UPI system is experiencing a downtime, the value `ALL` is displayed. + + `card_type` _if method=card_ + : `string` The card type used to process the payment. Possible values: + - `credit` + - `debit` + +`created_at` +: `integer` Timestamp (in Unix) that indicates the time at which the downtime was recorded in Razorpay servers. + +`updated_at` +: `integer` Timestamp (in Unix) that indicates the time at which the downtime record was updated in Razorpay servers. + +`flow` +: `string` Indicates the UPI payments flow being used during the downtime event. Possible values: + - `collect` + - `intent` + - `in_app` Only applicable for Turbo UPI payments. + +Know more about [the possible values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + +## Fetch Payment Downtime Details + +To retrieve details of payment downtimes, see this [endpoint](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime/fetch-all.md). + +## Fetch Payment Downtime Details by ID + +To retrieve details of payment downtimes by ID, see this [endpoint](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime/fetch-with-id.md). + +## Webhooks + +The table below lists the webhook events available for payments downtime. + +Webhook Event | Description +--- +`payment.downtime.started` | Triggered at the beginning of the downtime. +--- +`payment.downtime.resolved` | Triggered when a downtime is resolved. +--- +`payment.downtime.updated` | Triggered when a downtime is updated. + +### Payment Downtime Started + +```json: Netbanking +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.started", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "netbanking", + "begin": 1591935238, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "bank": "VIJB" + }, + "instrument_schema": ["bank"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: Card - Issuer +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.started", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "card", + "begin": 1591935238, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "issuer": "SBIN", + "type": "credit" + }, + "instrument_schema": ["issuer", "type"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: Card - Network +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.started", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "card", + "begin": 1591935238, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "network": "MC", + "type": "credit" + }, + "instrument_schema": ["network", "type"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: UPI - VPA Handle +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.started", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "upi", + "begin": 1591935238, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "vpa_handle": "oksbi", + "flow":"collect" + }, + "instrument_schema": ["vpa_handle", "flow"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: UPI - PSP +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.started", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "upi", + "begin": 1591935238, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "psp": "bhim", + "flow":"collect" + }, + "instrument_schema": ["psp", "flow"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: Turbo UPI +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.started", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F8LCfthx90fMOo", + "method": "upi", + "begin": 1593412063, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "flow": "in_app" + }, + "created_at": 1593412092, + "updated_at": 1593412092 + } + + } + }, + "created_at": 1591935238 +} +``` + +### Payment Downtime Resolved + +```json: Netbanking +{ + "entity": "event", + "account_id": "acc_DjF2cSbjtnqhJ5", + "event": "payment.downtime.resolved", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_ENCWhh1lon7Hpp", + "entity": "payment.downtime", + "method": "netbanking", + "begin": 1583119550, + "end": 1583119551, + "status": "resolved", + "scheduled": false, + "severity": "medium", + "instrument": { + "bank": "COSB" + }, + "instrument_schema": ["bank"], + "created_at": 1583119551, + "updated_at": 1591948663 + } + } + }, + "created_at": 1591948663 +} + +```json: Card - Issuer +{ + "entity": "event", + "account_id": "acc_DjF2cSbjtnqhJ5", + "event": "payment.downtime.resolved", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_ENCWhh1lon7Hpp", + "entity": "payment.downtime", + "method": "card", + "begin": 1583119550, + "end": 1583119551, + "status": "resolved", + "scheduled": false, + "severity": "medium", + "instrument": { + "issuer": "SBIN", + "type": "credit" + }, + "instrument_schema": ["issuer", "type"], + "created_at": 1583119551, + "updated_at": 1591948663 + } + } + }, + "created_at": 1591948663 +} + +```json: Card - Network +{ + "entity": "event", + "account_id": "acc_DjF2cSbjtnqhJ5", + "event": "payment.downtime.resolved", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_ENCWhh1lon7Hpp", + "entity": "payment.downtime", + "method": "card", + "begin": 1583119550, + "end": 1583119551, + "status": "resolved", + "scheduled": false, + "severity": "medium", + "instrument": { + "network": "MC", + "type": "credit" + }, + "instrument_schema": ["network", "type"], + "created_at": 1583119551, + "updated_at": 1591948663 + } + } + }, + "created_at": 1591948663 +} + +```json: UPI - VPA Handle +{ + "entity": "event", + "account_id": "acc_DjF2cSbjtnqhJ5", + "event": "payment.downtime.resolved", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_ENCWhh1lon7Hpp", + "entity": "payment.downtime", + "method": "upi", + "begin": 1583119550, + "end": 1583119551, + "status": "resolved", + "scheduled": false, + "severity": "medium", + "instrument": { + "vpa_handle": "oksbi", + "flow":"collect" + }, + "instrument_schema": ["vpa_handle", "flow"], + "created_at": 1583119551, + "updated_at": 1591948663 + } + } + }, + "created_at": 1591948663 +} + +```json: UPI - PSP +{ + "entity": "event", + "account_id": "acc_DjF2cSbjtnqhJ5", + "event": "payment.downtime.resolved", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_ENCWhh1lon7Hpp", + "entity": "payment.downtime", + "method": "upi", + "begin": 1583119550, + "end": 1583119551, + "status": "resolved", + "scheduled": false, + "severity": "medium", + "instrument": { + "psp": "bhim", + "flow":"collect" + }, + "instrument_schema": ["psp", "flow"], + "created_at": 1583119551, + "updated_at": 1591948663 + } + } + }, + "created_at": 1591948663 +} + +```json: Turbo UPI +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.resolved", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F8LCfthx90fMOo", + "method": "upi", + "begin": 1593412063, + "end": null, + "status": "resolved", + "scheduled": false, + "severity": "high", + "instrument": { + "flow": "in_app" + }, + "created_at": 1593412092, + "updated_at": 1593412092 + } + + } + }, + "created_at": 1591935238 +} +``` + +### Payment Downtime Updated + +```json: Netbanking +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.updated", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "netbanking", + "begin": 1591935238, + "end": null, + "status": "updated", + "scheduled": false, + "severity": "high", + "instrument": { + "bank": "VIJB" + }, + "instrument_schema": ["bank"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: Card - Network +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.updated", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "card", + "begin": 1591935238, + "end": null, + "status": "updated", + "scheduled": false, + "severity": "high", + "instrument": { + "network": "MC", + "type": "credit" + }, + "instrument_schema": ["network", "type"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: Card - Issuer +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.updated", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "card", + "begin": 1591935238, + "end": null, + "status": "updated", + "scheduled": false, + "severity": "high", + "instrument": { + "issuer": "SBIN", + "type": "credit" + }, + "instrument_schema": ["issuer", "type"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: UPI - VPA Handle +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.updated", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "upi", + "begin": 1591935238, + "end": null, + "status": "updated", + "scheduled": false, + "severity": "high", + "instrument": { + "vpa_handle": "oksbi", + "flow": "collect" + }, + "instrument_schema": ["vpa_handle", "flow"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: UPI - PSP +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.updated", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "upi", + "begin": 1591935238, + "end": null, + "status": "updated", + "scheduled": false, + "severity": "high", + "instrument": { + "psp": "bhim", + "flow": "collect" + }, + "instrument_schema": ["psp", "flow"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: Turbo UPI +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.updated", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F8LCfthx90fMOo", + "method": "upi", + "begin": 1593412063, + "end": null, + "status": "updated", + "scheduled": false, + "severity": "high", + "instrument": { + "flow": "in_app" + }, + "created_at": 1593412092, + "updated_at": 1593412092 + } + + } + }, + "created_at": 1591935238 +} +``` diff --git a/llm-content/payments/payment-gateway/rainy-day/errors.md b/llm-content/payments/payment-gateway/rainy-day/errors.md new file mode 100644 index 00000000..32f82e59 --- /dev/null +++ b/llm-content/payments/payment-gateway/rainy-day/errors.md @@ -0,0 +1,72 @@ +--- +title: Rainy Day | Errors +heading: About Errors +description: Understand the errors returned in the API responses from Razorpay. +--- + +# About Errors + +All successful responses are returned with HTTP Status code 200. In case of failure, Razorpay API returns a JSON error response with the parameters that detail the reason for the failure. + +> **INFO** +> +> +> **Note:** +> +> If you are using an official [Razorpay Language-wise SDK Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration.md), the error responses result in exceptions that need to be handled in your integration. +> + +## Error Response + +The error response contains `code`, `description`, `field`, `source`, `step`, `reason` and `metadata` parameters that help you diagnose and solve the error. + +To understand more about error codes, refer to the [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) section. + +```json: Sample Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect otp", + "field": null, + "source": "customer", + "step": "payment_authentication", + "reason": "invalid_otp", + "metadata": { + "payment_id": "pay_EDNBKIP31Y4jl8", + "order_id": "order_DBJKIP31Y4jl8" + } + } +} +``` + +### Response Parameters + +`error` +: `object` The error object. + +`code` +: `string` Type of the error. + +`description` +: `string` Descriptive text about the error. + +`field` +: `string` Name of the parameter in the API request that caused the error. + +`source` +: `string` The point of failure in the specific operation (payment in this case). For example, customer, business + +`step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. + +`reason` +: `string` The exact error reason. It can be handled programmatically. + +`metadata` +: `object` Contains additional information about the request. + + `payment_id` + : `string` Unique identifier of the payment. + + `order_id` + : `string` Unique identifier of the order associated with the payment. diff --git a/llm-content/payments/payment-gateway/rainy-day/errors/error-codes.md b/llm-content/payments/payment-gateway/rainy-day/errors/error-codes.md new file mode 100644 index 00000000..ca39804f --- /dev/null +++ b/llm-content/payments/payment-gateway/rainy-day/errors/error-codes.md @@ -0,0 +1,49 @@ +--- +title: Rainy Day | Error Codes +heading: Error Codes +description: Handle errors received from Razorpay and take remedial action at your end. +--- + +# Error Codes + +Razorpay aims to make every transaction successful for its customers. However, in the financial ecosystem errors might still occur because of intermittent communication and technical issues at multiple hops. Hence, it becomes critical for businesses to identify the `source` of the error, the payment `step` where the error occurred and the `reason` that caused the error. In short, you can identify the **who**, **where** and **why** of every payment error. This enables you to minimize or fix errors to reduce any losses. + +With the new error codes, Razorpay helps you build your own logic and take remedial action at your end, wherever possible. Deriving these insights can help your business to: + +- Map and analyze top failure reasons +- Identify the source of failure. +Narrow down and understand if cause of the failure. Can be due to customer action or external factors (Razorpay, Gateway, Bank, Network) +- Identify the payment step +- Identify the exact reason of the failure +- Handle actionable error codes +- Avoid possible integration errors +- Display valid responses to your customers + +## Understanding the Error Response + +Let us take an example where a payment failed because the customer entered a wrong OTP while making a payment using card on the Checkout. + +```json: Sample Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect otp", + "field": null, + "source": "customer", + "step": "payment_authentication", + "reason": "invalid_otp", + "metadata": { + "payment_id": "pay_EDNBKIP31Y4jl8", + "order_id": "order_DBJKIP31Y4jl8" + } + } +} +``` + +Looking at the `source`, `step` and `reason` provided in the error description, you can understand that the payment failed at the authentication step due to the incorrect OTP entered by the customer. An elegant way to handle this error would be to notify your customer and bring them back to the checkout window and ask them to retry the payment with the correct OTP. + +### Related Information + +For the list of reasons, refer to the [Error Reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) section. + +To understand error codes specific for each payment method supported by Razorpay, refer to the payment flows described in the [Payment Method Error Parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md) section. diff --git a/llm-content/payments/payment-gateway/rainy-day/errors/error-reasons.md b/llm-content/payments/payment-gateway/rainy-day/errors/error-reasons.md new file mode 100644 index 00000000..38b255f6 --- /dev/null +++ b/llm-content/payments/payment-gateway/rainy-day/errors/error-reasons.md @@ -0,0 +1,248 @@ +--- +title: Error Reasons +description: Check the error reasons and take appropriate actions. +--- + +# Error Reasons + +All the possible values for the `reason` parameter in the error response along with their explanation and the next best action are shown below. + +Reason | Explanation | Next Steps +--- +`amount_less_than_minimum_amount` | Amount in the payment request is less than the minimum amount. Transacting through some banks have fixed fees. If the payment amount is less than the fixed fee then this error shows up. | Please make sure that the payment amount is more than the minimum fees associated with the bank. +--- +`authentication_failed` | The payment failed as 3D secure, or OTP authentication failed. This could happen if the user cancels the payment on the authentication (OTP submit) screen or enters incorrect authentication details such as OTP. | The customer must enter correct authentication details to complete the payment. +--- +`authorisation_declined_by_psp` | PSP app has rejected the authorisation request. This can happen when there is an issue/downtime with the PSP or there's an issue with the customer's VPA. | Recheck the customer's VPA and retry. If this is recurring, then the customer can choose another PSP app and retry. +--- +`bank_account_invalid` | The bank account is not valid. The customer or bank could have closed the account. | The customer must try using a valid bank account or another method. +--- +`bank_account_validation_failed` | The third party validation failed as the given bank account details were incorrect or could not be verified. | The customer should check the bank account details provided and try again. +--- +`bank_cutoff_in_progress` | Bank CBS cutoff is in progress. This is a periodic event at the bank's end. | The customer must retry. +--- +`bank_not_available` | Bank is not available due to a downtime or a technical issue. | The customer must retry. +--- +`bank_not_enabled` | The selected bank to complete the transaction is not enabled for your business. | Please reach out to Razorpay to enable the selected bank. +--- +`bank_technical_error` | The issuing bank was facing technical problems at the moment the payment was attempted. This usually occurs when the Core Banking System encounters a technical error while processing the payment. | The customer must try using another bank account or another method. +--- +`beneficiary_account_does_not_exist` | An issue with the beneficiary account which doesn't exist. | Please reach out to Razorpay. +--- +`beneficiary_account_dormant` | An issue with the beneficiary account which is dormant. | Please reach out to Razorpay. +--- +`capture_failed` | Payment was authorized by the bank but the gateway failed to capture it due to some error. | The customer must retry the payment. +--- +`card_declined` | Issuer Bank can decline the card due to multiple checks at their end. The exact reason in this case is not shared with Razorpay. Customer needs to reach out to the issuing bank. | The customer can reach out to Issuer Bank to get more details. +--- +`card_expired` | The customer is making the payment with an expired card. | The customer must use a different card or method. +--- +`card_network_not_enabled` | The card network through which payment was being attempted is not enabled for your business. For example, payment being tried through Amex credit card and the same is not enabled for your business. | Reach out to Razorpay to get the required card network enabled. +--- +`card_not_enrolled` | If the card is not enrolled, this means that either the issuing bank (of the card) does not support 3DS or the card holder has not yet registered for the 3D secure service. | The customer must enroll the card with the issuer and retry the payment or use a different card or method. +--- +`card_number_invalid` | The customer has entered an incorrect card number which is not part of any BIN/ IIN. | The customer must enter the correct card number. +--- +`card_type_invalid` | The customer is using an unsupported card type to complete the payment. For example, mutual fund purchases are not allowed via credit cards. | The customer must use the correct card type to complete the payment. +--- +`collect_on_mcc_blocked` | NPCI blocks collect requests on certain [MCCs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/google-pay.md#android). | Please retry using intent flow. +--- +`collect_request_pending` | Collect Request is pending. Customer has not actioned on it or the callback is not yet received by the acquirer. | The customer has to approve the collect request. +--- +`compliance_violation` | Any compliance violation at the customer or merchant level. | +- If the risk check failed at the customer level, the customer can reach out to their bank to get more details. +- If the risk check failed at the merchant level, please reach out to Razorpay. +This information will be available in the "source" parameter. +--- +`credit_limit_exceeded` | The customer has exceeded the credit limit extended to him. This error occurs in Cardless EMI payments. | The customer must retry using a different payment method. +--- +`credit_limit_expired` | The credit limit for the customer has expired. This error occurs in Cardless EMI payments. | The customer must retry using a different payment method. +--- +`credit_limit_inactive` | The credit limit for the customer is inactive. This may be due to pending action from the customer's end. This error occurs in Cardless EMI payments. | The customer must activate the credit limit or retry using a different payment method. +--- +`credit_limit_not_approved` | The credit limit for the customer is not approved. This error occurs in Cardless EMI payments. | The customer must retry using a different payment method. +--- +`credit_not_permitted` | The beneficiary bank has not allowed the credit to happen into the merchant's account. This can be because of the TPV account mismatch or an issue at the beneficiary bank. | The customer should check their bank account details and retry. +--- +`credit_failed` | The beneficiary bank has not allowed the credit to happen into the merchant's account. This can be because of TPV account mismatch or an issue at the beneficiary bank. | The customer should check their bank account details and retry. +--- +`debit_declined` | The customer bank has declined the debit request. One of the reasons can be because of the account being blocked. | The customer has to check with their bank. +--- +`deemed_transaction` | This is the case of a deemed transaction wherein the status of the transaction is not known to the acquirer and the status will be known on the next day. | Please check the status after some time. +--- +`debit_instrument_blocked` | The customer is using a blocked card to complete the payment. The card could have been blocked by the issuer or by customers themselves. | The customer must retry with a different card or method. +--- +`debit_instrument_inactive` | The customer is using an inactive or frozen card to complete the payment. The card could have been marked inactive by the issuer or by customer themselves. | The customer must retry using a different card or method to complete payment. +--- +`duplicate_refund_id` | Two refunds with the same Refund ID have been initiated. | Please recheck the refund ID and retry. +--- +`duplicate_request` | A payment initiation request with the exact same parameters was passed to the gateway. This can be an integration issue with the merchant. | Please check the payment parameters and retry. +--- +`duplicate_rrn_found` | A payment with the same RRN is found. A very rare case but possible as the RRN is not unique. This is a rare and temporary issue which can be fixed by a retry. | The customer must retry. +--- +`emi_greater_than_max_amount` | The EMI amount is greater than the maximum amount allowed for the customer. This error occurs in Cardless EMI payments. | The customer must use a different EMI plan or retry using a different method. +--- +`emi_plan_unavailable` | The customer-selected EMI plan is no longer supported by the EMI provider. This error occurs in Cardless EMI payments. | The customer must use a different EMI plan or retry using a different method. +--- +`funds_blocked_by_mandate` | This is an error for One time Mandate product. Funds are blocked and customer is trying to access these funds via payment. | The customer should add more funds or release their mandate to complete the transaction. +--- +`funds_blocked_by_mandate` | This is an error for One time Mandate product. Funds are blocked and customer is trying to access these funds via payment. | The customer should add more funds or release their mandate to complete the transaction. +--- +`gateway_technical_error` | Payment failed due to a technical error at the gateway. This usually occurs when the gateway server encounters a technical error while processing the payment. | Please retry with a different payment method or retry after some time. +--- +`incorrect_atm_pin` | Some banks ask for Debit card information for authentication. If the customer enters the ATM pin incorrectly, this error is thrown during the UPI registeration process. +Note: This is a very rare error code in payment transactions. | The customer must retry with the correct ATM PIN. +--- +`incorrect_card_details` | This is a generic error message when a customer has entered incorrect card details to complete the payment. The customer has to enter multiple values like cardholder name, expiry date, cvv to complete the payment. | The customer must use the correct card details to complete the payment. +--- +`incorrect_card_expiry_date` | The customer has entered an incorrect expiry date of the card. | The customer must enter the correct expiry date of the card. +--- +`incorrect_cardholder_name` | The customer has entered an incorrect name of the card holder. | The customer must enter the correct name of the card holder. +--- +`incorrect_cvv` | The customer has entered an incorrect CVV to complete the payment. | The customer must retry with the correct CVV. +--- +`incorrect_otp` | The customer has entered an incorrect OTP to complete the payment. | The customer must retry and enter the correct OTP. +--- +`incorrect_pin` | The customer has entered an incorrect PIN to complete the payment. | The customer must retry with the correct PIN. +--- +`input_validation_failed` | Payment failed due to wrong request or input sent in the payment request. This is also seen while creating a payment with incorrect parameter values on the Dashboard. | Rectify the validation issues and try again. Check the error description and field parameters for more information about the error. +Check your integration/payment request or reach out to Razorpay. Refer to the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). +--- +`insufficient_funds` | The customer does not have sufficient funds in the account to complete the payment. | The customer must retry with a different card or method. +--- +`international_transaction_not_allowed` | International transactions are not enabled for your account or for a specific product. Refer to the error `description` parameter for more details.| to get international transactions enabled for the product or account. +--- +`invalid_amount` | Amount or currency passed in the payment request is not supported or invalid. This can arise when you pass a different variable type in the amount field or pass an unsupported amount value. | Check your integration and payment request. +--- +`invalid_currency` | The currency type for the request you are sending is not enabled or not supported for your business. For example, you are attempting a payment in British pound when international currency is not enabled for your account. | +Reach out to Razorpay to enable the currency or get more information about the supported currencies. +--- +`invalid_device` | UPI mandates that all transactions must at least be 2FA using a mobile device(the device fingerprint) as one factor and the UPI PIN as the second. This error occurs when a user tries to complete the payment using an unregistered device to send or receive payments using that account. | The customer must first complete the device binding process and try again. +--- +`invalid_email` | The customer has provided an invalid email. | The customer must retry using the correct email. +--- +`invalid_mobile_number` | The customer used an unregistered or invalid mobile number to complete the transaction. This error occurs in Wallet payments. | The customer must use the registered mobile number with the issuer to complete the transaction. +--- +`invalid_order_id` | Order ID required in the payment request is either missing or is invalid. Order ID is mandatory for every payment. | Make sure correct order ID is always passed while initiating a new payment. +--- +`invalid_response_from_gateway` | The response received from the gateway is invalid. | The customer must retry with the correct ATM PIN. +--- +`invalid_request` | The request is invalid because of the information that the merchant has passed. | Please check the payment request and retry. +--- +`invalid_user_details` | The customer does not exist. | The customer must use valid credentials. +--- +`invalid_vpa` | The customer is using an invalid VPA or an unregistered VPA to complete the payment. | The customer must use a valid VPA to complete the payment. +--- +`issuer_technical_error` | Payment failed due to a technical error at the issuer. This usually occurs when the gateway server encounters a technical error while processing the payment. | Please retry with a different payment method or retry after some time. +--- +`issuer_technical_error` | A technical error at the issuer (UPI). | The customer must retry. +--- +`live_mode_not_enabled` | Live mode is not enabled for your business. This error generally arises when you use test mode keys to make a live payment. | Generate the live mode keys in Dashboard and use them in your Integration. +--- +`mandate_creation_declined` | Mandate creation failed. This is applicable for UPI Autopay and UPI OTM. | The customer must retry. +--- +`mandate_creation_expired` | Mandate creation expired. | The customer must retry. +--- +`mandate_creation_failed` | Mandate creation declined by an entity. | The customer must retry. +--- +`mandate_creation_timeout` | Mandate creation timed out. | The customer must retry. +--- +`merchant_not_activated` | Merchant is not activated with the gateway. An issue with the merchant's terminal/account. | Please reach out to Razorpay. +--- +`mismatch_in_transaction_details` | The merchant has not passed the transaction details correctly. | Reach out to Razorpay to get the required card network enabled. +--- +`mobile_number_invalid` | The customer is using an invalid or an unregistered mobile number to complete the payment. This means that the mobile number is not mapped to the bank account. | The customer should check the mobile number mapped to their UPI account and reach out to bank to get the correct mobile number mapped. +--- +`order_already_paid` | There can only be one successful payment for each order ID. This error arises when you are trying to use an order ID where a payment is already completed. | Check for order status before initiating a new payment attempt on the order. You can also evaluate using a different order ID for each payment. +--- +`order_payment_method_mismatch` | This error arises when the method mentioned in the order request is different from the method mentioned in the payment request. | Do not pass method in the create order request. +--- +`order_amount_mismatch` | This error arises when the amount mentioned in the order request is different from the amount mentioned in the payment request. | Please make sure that the same amount is passed in both payment and order request. +--- +`otp_attempts_exceeded` | The customer has entered the wrong OTP multiple times and exceeded the limit. Some issuers limit the number of OTP retries, beyond which the card is temporarily blocked. | The customer must retry using a different card or method. +--- +`otp_expired` | The customer has entered an expired OTP. | The customer must generate OTP again and retry the payment. +--- +`payment_amount_tampered` | The payment amount has been tampered. | The customer must retry with the correct amount. +--- +`payment_cancelled` | The customer has explicitly cancelled the payment due to which the authentication failed to complete. | The customer must retry to complete the payment. +--- +`payment_collect_request_expired` | The UPI collect request time period has expired. For example, in most collect requests the expiry period is 5-10 minutes within the payment has to be completed by the customer on the UPI app. If a customer fails to complete the payment during this time, the collect request is marked as expired and the payment fails. | The customer must retry and complete the payment within the expiry time. +--- +`payment_declined` | Issuer Bank or Gateway has declined the payment due to business or technical reasons. The exact reason in this case is not communicated to Razorpay. | Customer must reach out to the issuer bank. +--- +`payment_declined_due_to_high_traffic` | Primarily occurs in the case of high TPS scenarios like IPL wherein the bank is unable to serve requests. | The customer must retry. +--- +`payment_failed` | Payment processing failed due to error at bank or wallet gateway. No specific error code received from gateway in this case. | Please retry with a different payment method. +--- +`payment_method_not_enabled` | The selected payment method is not enabled for your business. This error occurs when your customer tries to complete a transaction using a method that is not enabled for you. | Reach out to Razorpay to enable payment method. +--- +`payment_method_not_enabled` | UPI is not enabled however merchant has hit the UPI Payment request on API. | Please enable the payment method. +--- +`payment_pending` | The payment was marked as pending by the bank or the gateway. Pending transactions may later on become authorized. This is known as late authorization. | The customer must wait for some time and retry the payment. +--- +`payment_pending_approval` | The payment is currently pending approval by the concerned authority as part of the maker-checker flow. | Please reach out to the approver in your organization to get the transaction approved. +--- +`payment_risk_check_failed` | Payment declined due to risk checks. Risk checks are performed by Razorpay, Gateway and Issuer Bank. The source parameter would give additional clarity where the risk check failed. | The customer must retry with a different card or method. +--- +`payment_session_expired` | The payment session expired as the payment was not completed within the time by the customer. This is mostly due to an inactive payment window. | The customer must retry to complete the payment within the time. +--- +`payment_timed_out` | The customer did not complete the transaction within the specified time. This error may also happen when no response is received from the gateway. | The customer must retry and complete the transaction within the time. +--- +`pin_attempts_exceeded` | The customer has entered the wrong PIN multiple times and exceeded the limit. Some issuers limit the maximum number of PIN retries beyond which the card is temporarily blocked. | The customer must retry using a different card or method. +--- +`pin_not_set` | There is no PIN set by the customer for the UPI account. | The customer must set the UPI PIN first, and then retry to complete the payment. +--- +`psp_app_ not_available` | PSP app is not available. This can be because of a downtime with the PSP. | The customer must retry with another PSP app. +--- +`psp_app_not_supported` | UPI App is not supported. This is a rare error used when a particular app is blacklisted. | Please choose another PSP app and try again. +--- +`psp_not_available` | PSP is not available due to a downtime at their end. | The customer must choose another PSP app and retry. +--- +`psp_not_available` | PSP is not available due to a downtime at their end. | The customer must choose another PSP app and retry. +--- +`psp_not_registered` | The PSP is not registered on the customer's device. | The customer must retry with another PSP app. +--- +`record_not_found` | A record of a payment is not found at the bank. This usually happens when a status check call is hit for intent payments for which the status check call is not hit. | The customer must retry. +--- +`recurring_payment_not_enabled` | This error arises when you are trying to process a recurring payment when recurring payments are not enabled for your business. | Reach out to Razorpay to enable the recurring payment. +--- +`refund_limit_crossed` | Refund amount limit crossed. | Please recheck the refund amount and retry. +--- +`reqauth_mandate_not_acknowledged` | PSP did not respond to the authorisation request for the mandate. This can happen due to a downtime with a PSP. | The customer must retry. +--- +`request_timed_out` | The request timed out. | The customer must retry. +--- +`server_error` | Technical error at Razorpay's server. This usually occurs when there is some server issue at Razorpay's end. | Please retry after some time or reach out to Razorpay. +--- +`transaction_daily_count_exceeded` | The customer has exceeded the maximum number of transactions that can be performed daily for his card. | The customer must try after 24 hours or using a different card or another method. +--- +`transaction_daily_limit_exceeded` | The customer has exceeded the daily transaction limit set on the card. Some of the cards allow customers to set a limit or have a default limit set. | The customer must retry using a different instrument or wait 24 hours to complete the payment. +--- +`transaction_limit_exceeded` | The customers have exceeded the credit or debit limit set on their cards. This error usually arises while doing high value transactions. | The customer must retry using a different bank's card or method. +--- +`transaction_frequency_limit_exceeded` | NPCI has a transaction limit both on the amount and the frequency per day. Customer has exceeded this limit. | Please retry using another payment method. +--- +`transaction_on_vpa_restricted` | Transaction on this VPA has been temporarily/permanently blocked by the PSP. | The customer to retry with another UPI ID. +--- +`upi_app_technical_error` | Technical error occurred at the customer’s PSP due to which the payment failed. | The customer must retry the payment. If the error persists then the customer should use a different psp to complete the payment. +--- +`upi_autopay_not_supported_on_psp` | UPI Autopay is not supported on PSP. | Please retry with another PSP app. +--- +`upi_collect_not_enabled` | UPI Collect flow is not enabled however merchant has hit the Collect payment request on API. | Please enable collect flow. +--- +`upi_intent_not_enabled` | UPI Intent flow is not enabled however merchant has hit the Intent Payment request on API. | Please enable intent flow. +--- +`user_not_eligible` | The customer failed the eligibility check and is not eligible for credit. This error occurs in Cardless EMI payments. | The customer must retry using a different payment method. +--- +`user_not_registered_for_netbanking` | The customer's bank account is not registered for netbanking. | The customer should register their account with the issuing bank for netbanking. +--- +`vpa_resolution_failed` | The UPI network failed to validate the VPA. This is a technical error when the resolution service of the NPCI fails. | The customer must retry using a different bank account or method. +--- +`verification_failed` | Verification of the payment using the status check API has failed. | This is a temporary error. The customer must retry. + +### Related Information + +To understand the error codes, refer to the [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) section. + +To understand error codes specific for each payment method supported by Razorpay, refer to the payment flows described in the [Payment Method Error Parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md) section. diff --git a/llm-content/payments/payment-gateway/rainy-day/errors/payment-error-parameters.md b/llm-content/payments/payment-gateway/rainy-day/errors/payment-error-parameters.md new file mode 100644 index 00000000..38247b96 --- /dev/null +++ b/llm-content/payments/payment-gateway/rainy-day/errors/payment-error-parameters.md @@ -0,0 +1,366 @@ +--- +title: Rainy Day | Payment Method Error Parameters +heading: Payment Method Error Parameters +description: Check the different errors in the payment flow as per each payment method supported by Razorpay. +--- + +# Payment Method Error Parameters + +There are certain error codes specific for each payment method supported by Razorpay. To understand the errors and their `reasons`, it is recommended to know the `source` (stakeholders) and the `steps` involved in the payment flows: + +- [Cards](#cards) +- [UPI](#upi) +- [Netbanking](#netbanking) +- [Wallet](#wallet) +- [Cardless EMI](#cardless-emi) + +## Cards + +The payment flow for **Card** payments is illustrated below. + +![Errors Payment Methods Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-flow-card.jpg.md) + + + The possible values for the `source` parameter for cards are listed below: + + - `customer` + - `business` + - `internal` + - `gateway` + - `issuer_bank` + + + The possible values for the `step` parameter, along with the description, are listed below: + + 1. `payment_initiation` + + Your system initiates and sends the payment request to our server. Our server validates your request, creates the payment flow and forwards the request to the Gateway. + + 1. `card_enrollment_check` + + Upon receiving a request from Razorpay, Gateway sends the enrollment check request to the bank for the enrollment of the card check. + + 1. `payment_authentication` + + The bank verifies the enrollment of the card, and then requests the authentication of the customer by sending 3DS URL and OTP to the customer. + + - 3DS URL + + Bank sends the Authentication (3DS URL), which is routed through Gateway > Razorpay > Customer. + + - OTP + + The bank sends the OTP to the customer’s mobile directly. The customer enters the valid OTP within the time on the bank's OTP page. + + 1. `payment_authorization` + + Once the customer has completed the authentication, the bank authorises the release of the funds. The authorisation status is communicated to the Gateway which in turn communicates the same to Razorpay. + + 1. `payment_capture` + + Once the payment is successfully authorised, Razorpay sends the capture request to the Gateway which in turn sends the same to the bank to capture the authorised payment. + + +## UPI + +**UPI** payments can be made using the following: + + +### Intent Flow + + The payment flow for UPI Intent payments is illustrated below. + + ![](/docs/assets/images/payment-flow-upi_intent.jpg) + + + + + The possible values for the `source` parameter for both collect and intent flows in UPI are as follows: + + - `customer` + - `business` + - `internal` + - `customer_psp` + - `gateway` + - `network` + - `issuer_bank` + - `beneficiary_bank` + + + The possible values for the `step` parameter for UPI Intent flow, along with the description, are listed below: + + 1. `mandate_creation` + + Request to create a new UPI mandate. + + 1. `payment_initiation` + + Your system initiates and sends the payment request to our server. + + 1. `payment_creation` + + Razorpay creates an intent URL and passes it back to you. + + 1. `payment_authentication` + + Payer clicks on the pay button (pointing to the intent url), which prompts the payer to open the PSP App. After the App opens, the payer enters the M-PIN on the PSP App, and then authenticates the transaction. + + 1. `payment_request` + + Payer PSP sends the payment request to the UPI network. + + 1. `payment_request_beneficiary_details` + + The UPI network requests the beneficiary details from the Payee PSP. + + 1. `payment_response_beneficiary_details` + + Payee PSP sends the beneficiary details to the UPI network. + + 1. `payment_debit_request` + + The UPI network requests a debit of the given payment amount from the customer's bank. + + 1. `payment_debit_response` + + Customer’s bank sends the debit response to the NPCI. + + 1. `payment_credit_request` + + The UPI network sends the payment credit request to your account maintained with Razorpay. + + 1. `payment_credit_response` + + The beneficiary bank sends the credit response to the UPI network. + + 1. `payment_status_request` + + UPI network requests the transaction confirmation status from Payee PSP which acts as the gateway in UPI transactions. + + 1. `payment_status_response` + + Payee PSP sends the transaction confirmation response to the UPI Network. + + 1. `payment_response` + + Payee PSP sends the callback to our server. This will contain the final transaction status. + + 1. `refund_request` + + Request to initiate a refund. + + + + + +### Collect Flow + + The payment flow for UPI Collect payments is illustrated below. + + ![](/docs/assets/images/payment-flow-upi_collect.jpg) + + + The possible values for the `source` parameter for both collect and intent flows in UPI are as follows: + - `customer` + - `business` + - `internal` + - `customer_psp` + - `gateway` + - `network` + - `issuer_bank` + - `beneficiary_bank` + + + The possible values for the `step` parameter for the UPI Collect flow, along with the description, are listed below: + + 1. `mandate_creation` + + Request to create a new UPI mandate. + + 1. `payment_initiation` + + Your system initiates and sends the payment request to our server. + + 1. `payment_creation` + + Razorpay creates the payment and sends the collect request via Payee PSP (Gateway). + + 1. `payment_request` + + Payee PSP sends the payment request to the UPI network. + + 1. `payment_authentication_request` + + The UPI network sends an authentication request for the given payment amount to the Payer PSP. + + 1. `payment_authentication` + + Customer clicks on the payment notification received on mobile which opens the PSP App. After the App opens, the customer enters the M-PIN on the PSP App, and then authenticates the transaction. + + 1. `payment_authentication_response` + + Payer PSP sends the authentication details to the UPI network. + + 1. `payment_debit_request` + + Upon successful authentication, the UPI network requests a debit of the given payment amount from the customer's bank. + + 1. `payment_debit_response` + + Customer’s bank sends the debit response to the UPI Network. + + 1. `payment_credit_request` + + The UPI network sends the payment credit request to your account maintained with Razorpay. + + 1. `payment_credit_response` + + The beneficiary bank sends the credit response to the UPI network. + + 1. `payment_status_request` + + UPI network sends the transaction confirmation request to payer PSP (Google Pay). + + 1. `payment_status_response` + + Payer PSP (Google Pay) sends acknowledge, informs the customer and sends the response to NPCI. + + 1. `payment_response` + + Payee PSP sends the callback to our server. This will contain the final transaction status. + + 1. `refund_request` + + Request to initiate a refund. + + + + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/standard-integration.md). +> + +## Netbanking + +The payment flow for **Netbanking** payments is illustrated below: + +![Errors Payment Methods Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-flow-netbanking.jpg.md) + + + The possible values for the `source` parameter for netbanking are listed below: + + - `customer` + - `business` + - `internal` + - `issuer_bank` + + + The possible values for the `step` parameter, along with the description, are listed below: + + 1. `payment_initiation` + + Your system initiates and sends the payment request to our server. Razorpay sends the bank URL back to you. + + 1. `payment_authentication` + + The customer logs into his netbanking account and completes the transaction. + + 1. `payment_authorization` + + Upon successful authentication, bank authorises the release of funds and notifies Razorpay. Razorpay in turn, notifies the business. + + + +## Wallet + +The payment flow for **Wallet** payments is illustrated below: + +![Errors Payment Methods Wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-flow-wallet.jpg.md) + +The payment flow for **Wallet** payments is illustrated below: + +![Errors Payment Methods Wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-flow-wallet.jpg.md) + + + The possible values for the `source` parameter for wallet are listed below: + + - `customer` + - `business` + - `internal` + - `issuer` + + + The possible values for the `step` parameter, along with the description, are listed below: + + 1. `payment_initiation` + + Your system initiates and sends the payment request to our server. Our server sends the same request to the Bank/Gateway. + + 2. `payment_eligibility_check` + + Razorpay sends the eligibility check request to the issuer to determine if the entered customer information is correct. + + 3. `payment_authentication` + + Customer authenticates the payment using OTP provided by the issuer. + + 4. `payment_authorization` + + Issuer authorises the release of funds and sends confirmation to Razorpay. + + +## Cardless EMI + +The payment flow for **Cardless EMI** payments is illustrated below: + +![Errors Payment Methods Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-flow-cardless_emi.jpg.md) + + + The possible values for the `source` parameter for Cardless EMI flow are: + + - `customer` + - `business` + - `internal` + - `network` + - `issuer` + + + The possible values for the `step` parameter, along with the description, are listed below: + + 1. `payment_initiation` + + Your system initiates and sends the payment request to our server. Our server sends the same request to the Bank/Gateway. + + 1. `payment_eligibility_check` + + Razorpay sends the eligibility check request to the issuer to determine if the entered customer information is correct and to determine the credit eligibility of the customer. + + 1. `payment_authentication` + + Customer authenticates the payment using OTP provided by the issuer. + + 1. `payment_authorization` + + Issuer authorizes the release of funds and sends confirmation to Razorpay. + + +### Related Information + +To understand the error codes, refer to the [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) section. + +For the list of reasons, refer to the [Error Reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) section. diff --git a/llm-content/payments/payment-gateway/react-native-integration/custom.md b/llm-content/payments/payment-gateway/react-native-integration/custom.md new file mode 100644 index 00000000..d5c6aa04 --- /dev/null +++ b/llm-content/payments/payment-gateway/react-native-integration/custom.md @@ -0,0 +1,90 @@ +--- +title: Integrate With React Native Custom SDK +description: Check the React Native Razorpay Custom UI SDKs. +--- + +# Integrate With React Native Custom SDK + +The React Native SDK acts as a wrapper around the Razorpay Custom UI SDK to build a dynamic and responsive Checkout interface for your iOS or Android application. + +> **WARN** +> +> +> **Watch Out!** +> +> - Minimum software requirement: React version 16.5.0 +> - React Native version 0.57.1: This version of the Razorpay-React Native SDK supports Xcode 10. The [known issues of React Native on Xcode 10](https://github.com/facebook/react-native/issues/19573) are fixed in the current version of our SDK. +> + +> **INFO** +> +> +> **Handy Tips** +> +> [Razorpay React Native Standard SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/react-native-integration/standard.md) supports all payment methods by default. We recommend you integrate with the Razorpay React Native Standard SDK. If you integrate with Custom Checkout SDK, you will need to integrate these manually. +> + +## List of Razorpay React Native Custom SDK Versions (Last 4 versions) + +Version No. | Release Date | Changes +--- +2.2.5 | 08 Nov 2025 | **Feature**: Added support for unified Checkout experience. +--- +2.2.5 | 24 Jun 2024 | **Bug Fix**: `getAppsWhichSupportUPI` NPE. +--- +2.2.4 | 22 Feb 2024 | **Feature**: Calculate EMI function available on Android and iOS platforms. +--- +2.2.2 | 10 May 2022 | **Features**: - Auto linking support for native modules iOS. +- Updated version to pick the latest SDK version in Android and iOS. + +--- +2.2.0 | 06 Apr 2022 | **Features**: - Updated Android SDK version to 3.9.9. +- Updated Razorpay iOS framework. +- Support Functions on Custom Checkout Android-based SDK. + +> **SUCCESS** +> +> +> **Update SDK** +> +> Check your current SDK version. If it is outdated, please [update the SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/react-native-integration/custom/troubleshooting-faqs.md#4-how-can-i-update-the-razorpay-react) to ensure uninterrupted settlements of your funds. +> + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#intent-flow). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md). +> + +## Prerequisites + +- Create a [Razorpay Account](https://dashboard.razorpay.com/signup). + +- [Generate API Keys in Test Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. +- Know about the [Razorpay Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md). + +## Integration Steps + +Follow these integration steps: + +1. [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/react-native-integration/custom/build-integration.md) +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/react-native-integration/custom/test-integration.md) +3. [Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/react-native-integration/custom/go-live-checklist.md) + +### Related Information + +- [Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/react-native-integration/standard/troubleshooting-faqs.md) +- [Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/react-native-integration/custom/additional-features.md b/llm-content/payments/payment-gateway/react-native-integration/custom/additional-features.md new file mode 100644 index 00000000..a40b79bc --- /dev/null +++ b/llm-content/payments/payment-gateway/react-native-integration/custom/additional-features.md @@ -0,0 +1,264 @@ +--- +title: Additional Support for Payment Methods +description: Additional support features available for Cards, Netbanking, Wallets and more. +--- + +# Additional Support for Payment Methods + +Use the Razorpay React Native SDK to integrate supported payment methods on the Checkout form of your app as per your business requirements. Here are some **additional methods** provided by the SDK for the integration and usage of payment methods: + +- [Fetch Payment Methods](#fetch-payment-methods) +- [Card Utilities](#card-utilities) +- [Logo](#logo) + +- [CRED](#cred) + +## Fetch Payment Methods + +Use the [Fetch Payment Methods API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/build-integration.md#14-fetch-payment-methods) to fetch the payment methods available for your account. + +Below are the sample payloads for each payment method. + +Given below are the sample codes for fetching netbanking and UPI payment methods. + +## Netbanking + +For netbanking payments, specify the `method` as `netbanking`. + +```java: JavaScript +Razorpay.initRazorpay(''); + Razorpay.getPaymentMethods().then(paymentMethods => { + console.log(paymentMethods.netbanking); +}); +``` + +## UPI + +For UPI payments, specify the `method` as `upi`. + +```java: JavaScript +Razorpay.getAppsWhichSupportUPI().then(response => { + for (const responseElement of response.data) { + console.log(responseElement.appName); + } +}); +``` +The SDK supports two flows: + +1. [Intent](#intent-flow) +2. [Collect](#collect-flow) + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#intent-flow). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md). +> + +#### Intent Flow + +Follow the steps given below to use UPI Intent flow in Razorpay's React Native Custom UI plugin: + +1. Call `getAppsWhichSupportUPI` function to get all the available apps in customer's device. + + ```java: JavaScript + Razorpay.getAppsWhichSupportUPI((data) => { + console.log("Supported Apps", data); + }); + ``` + +2. Ensure that the `upi_app_package_name` is passed from the `getSupportedUPIApps()` method value otherwise, it will not pass the validation. + + ``` java: JavaScript + var options = { + "description": "Credits towards consultation", + "currency": "INR", + "key_id": "[YOUR_KEY_ID]", + "amount": "5000", // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + "email": "gauravkumar@example.com", + "contact": "9000090000", + "method": "upi", + "upi_app_package_name": "google_pay", + "_[flow]": "intent" + }; + ``` + +3. Your iOS app must seek permission from the device to open the UPI PSP app that the customer selects on the Checkout. For this, you must make the following changes in your iOS app's `info.plist` file. + + ```java: XML + LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + + ``` + +Check the complete list of [UPI supported apps and their package names](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/supported-apps.md). + +#### Collect Flow + +In Collect Flow, the collect request is sent to the UPI app for the specified `vpa`. + +#### Sample Code + +The sample code below sends a collect request to `gauravkumar@exampleupi` handle. + +```java: JavaScript +var options = { + "description": "Credits towards consultation", + "currency": "INR", + "key_id": "[YOUR_KEY_ID]", + "amount": "5000", // amount in currency subunits. Defaults to INR. 100 = 100 paise = INR 1. + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "vpa": "gauravkumar@exampleupi", + "method": "upi", + "_[flow]": "collect" +}; +``` + +## Card Utilities + +You can use these methods for card payment method integration. + +#### Fetch Card Network + +The SDK provides a method to get the card network name of the card number. + +- At least 6 digits of the card number are required to identify the network. + +- Possible values returned by this method are `visa`, `mastercard`, `maestro16`, `amex`, `rupay`, `maestro`, `diners` and `unknown`. + +- If it cannot identify the network, it returns `unknown`. + +```java: JavaScript +//needs Razorpay.initRazorpay() +Razorpay.getCardsNetwork('4386289407660153').then(resp => { + console.log(resp.data); // returns visa +}); +``` + +#### Card Number Validation + +The SDK provides a checksum-based method to determine if the entered card number is valid or not. + +```java: JavaScript +//needs Razorpay.initRazorpay() +Razorpay.isValidCardNumber('4386289407660153').then(resp => { + console.log('is card number valid:'); + console.log(resp.data); // returns true or false +}); +``` + +#### Fetch Card Number Length for Card Network + +The SDK provides a method to get the card number length for a specific card network. + +```java: JavaScript +Razorpay.getCardNetworkLength('visa').then(resp => { + console.log(resp.data); // returns 16 for visa +}); +``` + +## Validate VPA + +The SDK provides a method to determine if the entered Virtual Payment Address (VPA) is valid or not. A failure response is triggered when the `vpaAddress` is empty or the device is not connected to data to make the validation. + +```java: JavaScript +//needs Razorpay.initRazorpay() +Razorpay.isValidVpa('a@okaxis').then(resp => { + console.log('is vpa valid'); + console.log(resp); // returns {"customer_name": null, "success": true, "vpa": "a@okaxis"} or { + "code": "BAD_REQUEST_ERROR", + "description": "Invalid VPA. Please enter a valid Virtual Payment Address", + "field": "vpa", + "metadata": Object {}, + "reason": "invalid_vpa", + "source": "customer", + "step": "payment_initiation", + } for invalid vpa +}); +``` + +## Logo + +Given below are the sample codes for fetching various payment method logo URLs. + +#### Fetch Bank Logo URL + +The SDK provides a method to fetch the bank logo's URL here, `bankCode` is the bank's code; you will be able to get it from the response received in `onPaymentMethodsReceived` callback. + +```java: JavaScript +//needs Razorpay.initRazorpay() +Razorpay.getBankLogoUrl('UTIB').then(resp => { + console.log(resp.data); // returns banklogo url: https://cdn.razorpay.com/bank/UTIB.gif +}); +``` + +#### Fetch Wallet Logo URL + +The SDK provides a method to get the wallet logo's URL. + +```java: JavaScript +//needs Razorpay.initRazorpay() +Razorpay.getWalletLogoUrl('mobikwik').then(resp => { + console.log(resp.data); returns URL: https://cdn.razorpay.com/wallet/mobikwik.png +}); +``` + +#### Fetch Wallet Square Logo URL + +The SDK provides a method to get the wallet's square-shaped logo's URL. + +```java: JavaScript +//needs Razorpay.initRazorpay() +//returns square wallet logo url +Razorpay.getSqWalletLogoUrl('mobikwik').then(resp => { + console.log(resp.data); returns url for Square Logo +}); +``` + +## CRED + +The SDK provides a method to determine if the CRED app is installed on the customer's mobile device. + +```java: JavaScript +//needs Razorpay.initRazorpay() +Razorpay.isCredAppAvailable().then(resp => { + console.log('isCredAppAvailable'); + console.log(resp.data); returns true or false +}); +``` diff --git a/llm-content/payments/payment-gateway/react-native-integration/custom/build-integration.md b/llm-content/payments/payment-gateway/react-native-integration/custom/build-integration.md new file mode 100644 index 00000000..9ba7bf41 --- /dev/null +++ b/llm-content/payments/payment-gateway/react-native-integration/custom/build-integration.md @@ -0,0 +1,830 @@ +--- +title: 1. Build Integration +description: Steps to integrate your React Native Razorpay custom UI SDK with Razorpay Payment Gateway. +--- + +# 1. Build Integration + +Follow the steps given below to use the SDK and integrate with Razorpay Payment Gateway: + +**1.1** [Install Razorpay React Native Custom UI SDK](#11-install-razorpay-react-native-custom-ui-sdk). + +**1.2** [Link SDK](#12-link-sdk). + +**1.3** [Create an Order in Server](#13-create-an-order-in-server). + +**1.4** [Fetch Payment Methods](#14-fetch-payment-methods). + +**1.5** [Import Razorpay module](#15-import-razorpay-module). + +**1.6** [Add Razorpay Checkout Options to app.js File](#16-add-razorpay-checkout-options-to-appjs-file). + +**1.7** [Store Fields in Your Server](#17-store-fields-in-your-server). + +**1.8** [Verify Payment Signature](#18-verify-payment-signature). + +**1.9** [Verify Payment Status](#19-verify-payment-status). + +> **WARN** +> +> +> **Watch Out!** +> +> If you use M1 MacBook, you need to make [these changes](#m1-macbook-changes) in your `podfile`. +> + +## 1.1 Install Razorpay React Native Custom UI SDK + +You can install the SDK using NPM, Yarn and Expo. + +To install using NPM, use the command given below: + +```js: Code using npm +npm install --save react-native-customui +``` + +To install using Yarn, use the command given below: + +```js: Code using yarn +yarn add react-native-customui +``` + +To install using Expo, use the command given below: + +```js: Code using expo +npx expo install react-native-customui +``` + +## 1.2 Link SDK + +- [iOS](#ios) +- [Android](#android) + +#### iOS + +#### Automatic + +**Automatic linking is available only for iOS.** The steps are given below: + +1. Install the Razorpay React Native Custom UI SDK using the npm command. + + ```js: Install + $ npm install react-native-customui --save + ``` + +2. Navigate to the iOS folder on the terminal and run `pod install`. + +> **INFO** +> +> +> **Handy Tips** +> +> Ensure the **Razorpay.framework** file is added in the embedded binaries section and that the **Always Embed Swift Standard Binaries** option is set to **Yes** in **Build Settings**. +> + +#### Manual (via CocoaPods) + +You can link the SDK manually using CocoaPods. To do this: + +1. Add the following line to your build targets in your Podfile. + + ``` + pod 'react-native-customui', :path => '../node_modules/react-native-customui' + ``` + +2. Run the following command: + + ``` + pod install + ``` + +#### Manual (without CocoaPods) + +If you do not use CocoaPods, follow these steps to link the SDK manually: + +1. In XCode, in the Project Navigator: + - Right click **Libraries**. + - Add Files to `[your project's name]`. + - Navigate to `node_modules/react-native-customui`. + - Add the `.xcodeproj` file. +2. In the project navigator, select your project. + - Add the `libRNDeviceInfo.a` from the `deviceinfo` project to your project's **Build Phases** ➜ **Link Binary With Libraries**. + - Click the `.xcodeproj` file you added before in the Project Navigator and navigate to the **Build Settings** tab. Ensure **All** is selected, and not **Basic**. + - Look for **Header Search Paths** and ensure it contains both `$(SRCROOT)/../react-native/React` and `$(SRCROOT)/../../React`. + - Mark both as recursive. It should be marked **OK** by default. +3. Run your project using **cmd+R**. + +#### Expo Application + +After adding the `react-native-razorpay` package, use the option to prebuild the app. This generates the **iOS** platform folders in the project to use native-modules. + +```node: Run +npx expo prebuild +``` + +The application is installed on the device/emulator. + +```node: +npx expo run:[ios] --device +``` + +#### Android + +To link the SDK manually, follow these steps: + +1. Open the `android/app/src/main/java/[...]/MainApplication.java` file. Add the following to the imports at the top of the file: + + ```java: Import + import com.razorpay.rn.RazorpayPackage; + ``` + +2. Add `new RazorpayPackage()` to the list returned by the `getPackages()` method. + +3. Append the following lines to `android/settings.gradle`: + + ```java: Settings Gradle + include ':react-native-razorpay' + project(':react-native-razorpay').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-customui/android') + ``` + +4. Insert the dependencies in `android/app/build.gradle`: + + ```java: Dependencies + implementation project(':react-native-customui') + ``` + +#### Expo Application + +After adding the `react-native-razorpay` package, use the option to prebuild the app. This generates the **android** platform folders in the project to use native-modules. + +```node: Run +npx expo prebuild +``` + +The application is installed on the device/emulator. + +```node: +npx expo run:[android] --device +``` + +## 1.3 Create an Order in Server + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +## 1.4 Fetch Payment Methods + +You can accept payments through UPI, credit and debit cards, netbanking and wallets, as per the methods enabled on your account. + + - When you use Razorpay React Native Standard SDK, you do not have to handle the availability of different payment methods. + - When creating a Custom checkout form, you must ensure that only the methods activated for your account are displayed to the customer. To get a list of available payment methods, call `getPaymentMethods`. This fetches the list of payment methods asynchronously and returns the result in JSON format in the `onPaymentMethodsReceived` callback. + +#### Sample Code +The following API is used to fetch all enabled payment methods for a given API Key ID: + +```curl: Curl +https://api.razorpay.com/v1/methods?key_id=[Your_Key_ID] +``` + +```java: Java +razorpay.getPaymentMethods(new PaymentMethodsCallback() { + @Override + public void onPaymentMethodsReceived(String result) { + JSONObject paymentMethods = new JSONObject(result); + } + + @Override + public void onError(String error){ + + } + }); +}); +```kotlin: Kotlin + razorpay?.getPaymentMethods(object : PaymentMethodsCallback { + override fun onPaymentMethodsReceived(result: String?) { + /** + * This returns JSON data + * The structure of this data can be seen at the following link: + * https://api.razorpay.com/v1/methods?key_id=rzp_test_XXXXXXXXXXXXXX + * + */ + Log.d("Result", "" + result) + inflateLists(result) + } + + override fun onError(error: String?) { + Log.e("Get Payment error", error) + } + }) +``` + +Check the [additional support for payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/react-native-integration/custom/additional-features.md) available with the Razorpay React Native Custom SDK. + +> **INFO** +> +> +> **Handy Tips** +> +> If you are using Subscriptions, you can pass the `subscription_id` in the options, which fetches subscription related details along with the payment method. This saves you a network call to get amount for that `subscription_id`. Know more about [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md). +> + +## 1.5 Import Razorpay Module + +Import Razorpay module to your component: + +```js: Import +import Razorpay from 'react-native-customui'; +``` + +## 1.6 Add Razorpay Checkout Options to app.js File + +Call the `Razorpay.open` method with the payment options. The method returns a JS Promise, where: + - The then part corresponds to a successful payment. + - The catch part corresponds to payment failure. + +```js: Payment Options + { + var options = { + description: 'Credits towards consultation', + currency: 'INR', + key_id: '', + amount: '50000', + email: 'gaurav.kumar@example.com', + contact: '9999999123', + method: 'netbanking', + bank: 'HDFC' + + } + Razorpay.open(options).then((data) => { + // handle success + alert(`Success: ${data.razorpay_payment_id}`); + }).catch((error) => { + // handle failure + alert(`Error: ${error.code} | ${error.description}`); + }); +}}> +``` + +Know more about [passing callback URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/callback-url.md). + +#### Checkout Parameters + +`key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`description` _optional_ +: `string` Description of the product shown in the Checkout form. It must start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown in the Checkout form. Can also be a **base64** string, if loading the image from a network is not desirable. + +`order_id` _mandatory_ +: `string` Order ID generated via the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`method` _mandatory_ +: `string` The payment method used by the customer on Checkout. +Possible values: + - `card` (default) + - `upi` (default) + - `netbanking` (default) + - `wallet` (default) + - `emi` (default) + - `cardless_emi` (requires [approval](https://razorpay.com/support/#request)) + - `paylater` (requires [approval](https://razorpay.com/support/#request)) + - `emandate` (requires [approval](https://razorpay.com/support/#request)) + +`card` _mandatory if method=card/emi_ +: `object` The details of the card that should be entered while making the payment. + + `number` + : `integer` Unformatted card number. + + `name` + : `string` The name of the cardholder. + + `expiry_month` + : `integer` Expiry month for card in MM format. + + `expiry_year` + : `integer` Expiry year for card in YY format. + + `cvv` + : `integer` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `emi_duration` + : `integer` Defines the number of months in the EMI plan. + +`bank_account` _mandatory if method=emandate_ +: The details of the bank account that should be passed in the request. These details include bank account number, IFSC code and the name of the customer associated with the bank account. + + `account_number` + : `string` Bank account number used to initiate the payment. + + `ifsc` + : `string` IFSC of the bank used to initiate the payment. + + `name` + : `string` Name associated with the bank account used to initiate the payment. + +`bank` _mandatory if method=netbanking_ +: `string` Bank code. List of available banks enabled for your account can be fetched via [**methods**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#fetch-supported-methods). + +`wallet` _mandatory if method=wallet_ +: `string` Wallet code for the wallet used for the payment. Possible values: + - `payzapp` (default) + - `olamoney` (requires [approval](https://razorpay.com/support/#request)) + - `phonepe` (requires [approval](https://razorpay.com/support/#request)) + - `airtelmoney` (requires [approval](https://razorpay.com/support/#request)) + - `mobikwik` (requires [approval](https://razorpay.com/support/#request)) + - `jiomoney` (requires [approval](https://razorpay.com/support/#request)) + - `amazonpay` (requires [approval](https://razorpay.com/support/#request)) + - `paypal` (requires [approval](https://razorpay.com/support/#request)) + - `phonepeswitch` (requires [approval](https://razorpay.com/support/#request)) + +`provider` _mandatory if method=cardless_emi/paylater_ +: `string` Name of the cardless EMI provider partnered with Razorpay. + + Available options for Cardless EMI (requires [approval](https://razorpay.com/support/#request)): + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `zestmoney` + - `earlysalary` + - `walnut369` + + Available options for Pay Later: + - `lazypay` + - `paypal` + +`vpa` _mandatory if method=upi_ +: `string` UPI ID used for making the payment on the UPI app. + + +> **WARN** +> +> +> **Deprecation Notice** +> +> UPI Collect is deprecated effective 28 February 2026. This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [ migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md) to switch to UPI Intent. +> + +`callback_url` _optional_ +: `string` The URL to which the customer must be redirected upon completion of payment. The URL must accept incoming `POST` requests. The callback URL will have `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` as the request parameters for a successful payment. + +`redirect` _conditionally mandatory_ +: `boolean` Determines whether customer should be redirected to the URL mentioned in the +`callback_url` parameter. This is mandatory if `callback_url` parameter is used. Possible values: + - `true`: Customer will be redirected to the `callback_url`. + - `false`: Customer will not be redirected to the `callback_url`. + +## 1.7 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +## 1.8 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +#### M1 MacBook Changes +If you use M1 MacBook, you need to make the following changes in your podfile. + +> **INFO** +> +> +> **Handy Tips** +> +> Add the following code inside `post_install do |installer|`. +> + +```js: podfile +installer.pods_project.build_configurations.each do |config| + config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" +end +``` + +## 1.9 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/react-native-integration/custom/test-integration.md) diff --git a/llm-content/payments/payment-gateway/react-native-integration/custom/go-live-checklist.md b/llm-content/payments/payment-gateway/react-native-integration/custom/go-live-checklist.md new file mode 100644 index 00000000..eeb64a8b --- /dev/null +++ b/llm-content/payments/payment-gateway/react-native-integration/custom/go-live-checklist.md @@ -0,0 +1,57 @@ +--- +title: 3. Go-live Checklist +description: Check the go-live checklist for Razorpay Payment Gateway custom React Native integration. +--- + +# 3. Go-live Checklist + +Consider these steps before taking the integration live. + +## Accept Live Payments + +Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + +## Payment Capture + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git a/llm-content/payments/payment-gateway/react-native-integration/custom/test-integration.md b/llm-content/payments/payment-gateway/react-native-integration/custom/test-integration.md new file mode 100644 index 00000000..8086aeb7 --- /dev/null +++ b/llm-content/payments/payment-gateway/react-native-integration/custom/test-integration.md @@ -0,0 +1,137 @@ +--- +title: 2. Test Integration +description: Steps to test if the custom React Native integration was successful. +--- + +# 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## Next Steps + +[Step 3: Go-live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/react-native-integration/custom/go-live-checklist.md) diff --git a/llm-content/payments/payment-gateway/react-native-integration/custom/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/react-native-integration/custom/troubleshooting-faqs.md new file mode 100644 index 00000000..6ec73a01 --- /dev/null +++ b/llm-content/payments/payment-gateway/react-native-integration/custom/troubleshooting-faqs.md @@ -0,0 +1,42 @@ +--- +title: Troubleshooting and FAQs +description: Troubleshoot common error scenarios and find answers to frequently asked questions. +--- + +# Troubleshooting and FAQs + +#### 1. In the new M1 MacBook, why am I not able to compile the React Native Razorpay plugin for release mode? + +This issue is caused by the new changes introduced in Xcode 12. + +To resolve this: +1. Use [Rosetta 2](https://support.apple.com/en-us/HT211861) for launching the app on your Mac. +2. Add the following lines to Podfile within `post_install do |installer|` . + +```js: podfile +installer.pods_project.build_configurations.each do |config| + config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" +end +``` + +Know more about [compilation errors](https://khushwanttanwar.medium.com/xcode-12-compilation-errors-while-running-with-ios-14-simulators-5731c91326e9). + +#### 2. I am getting the error "Cannot read property 'open' of undefined." How can I resolve this? + +For Expo: This error typically occurs when the `react-native-razorpay` package's native libraries are not included in the build. To resolve this, switch to a development build instead of an expo build, as development builds allow for the use of native libraries, which should enable the package to access the necessary functionality. + +For React CLI: This error indicates that the `react-native-razorpay` package was not correctly installed. To fix this, try reinstalling the package. + +#### 3. How can I update the Razorpay React Native Custom SDK version? + +To update the SDK version using npm, follow these steps: + +1. Open the terminal or command prompt and navigate to your project directory where the `package.json` file resides. +2. Use the npm update command followed by the package name to update a specific package to its latest version. For example, npm update `` (replace `` with the name of the package you want to update). +3. If you are using a React Native iOS application, run `cd ios && pod repo update && pod update` to ensure the internal iOS dependencies are updated to the versions set by the Razorpay package. This is because cocoapods may not automatically update the internal trunk spec to fetch the latest versions. +4. After running the update command, review the updates fetched by npm to ensure they do not introduce any breaking changes. +5. Conduct thorough testing to ensure that the updated packages do not adversely affect the application functionality and commit the changes. + +#### 4. My customer is unable to click the **Cancel** button on the netbanking page, on their iOS device? How do I fix this? + +Your customer is unable to click the Cancel button because the navigation bar is hidden. Follow the steps to [unhide the navigation bar](https://stackoverflow.com/questions/46084885/performing-action-on-swipe-back-react-navigation). diff --git a/llm-content/payments/payment-gateway/react-native-integration/standard.md b/llm-content/payments/payment-gateway/react-native-integration/standard.md new file mode 100644 index 00000000..cc9ec8f6 --- /dev/null +++ b/llm-content/payments/payment-gateway/react-native-integration/standard.md @@ -0,0 +1,52 @@ +--- +title: Prerequisites | Razorpay React Native Standard SDK +heading: Prerequisites +description: Check the prerequisites before you integrate Razorpay React Native Standard plugin with our native Android and iOS SDKs. +--- + +# Prerequisites + +- **React Native Standard SDK Changelog**: Discover new features, updates and deprecations related to the Razorpay React Native Standard SDK (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about React Native Standard integration. + + + +Integrate with Razorpay React Native Standard SDK to accept payments from customers on your app built using React Native. The React Native Standard SDK acts as a wrapper around the Razorpay Standard SDK to build a dynamic and responsive Checkout interface for your iOS or Android application. + +> **SUCCESS** +> +> +> **Update SDK** +> +> Check your current SDK version. If it is outdated, please [update the SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/react-native-integration/standard/troubleshooting-faqs.md#9-how-can-i-update-the-razorpay-react) to ensure uninterrupted settlements of your funds. +> + +> **INFO** +> +> +> **Handy Tips** +> +> This document elaborates the SDK integration steps for apps running on React Native version 0.60+. You can find the SDK integration steps for apps with [React Native version 0.59 and lower on GitHub](https://github.com/razorpay/react-native-razorpay#for-react-native-059-and-lower). +> + +## Integration Steps + +**Before you proceed:** + + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +Choose your platform to begin integration: + + - **React Native Android Integration**: Integrate React Native Android Standard SDK. + + - **React Native iOS Integration**: Integrate React Native iOS Standard SDK. + + - **Sample App**: Check the sample app to integrate on GitHub. + +### Related Information + +[Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard/troubleshooting-faqs.md) diff --git a/llm-content/payments/payment-gateway/react-native-integration/standard/integration-steps-android.md b/llm-content/payments/payment-gateway/react-native-integration/standard/integration-steps-android.md new file mode 100644 index 00000000..f4f8e296 --- /dev/null +++ b/llm-content/payments/payment-gateway/react-native-integration/standard/integration-steps-android.md @@ -0,0 +1,991 @@ +--- +title: React Native Android SDK - Integration Steps | Razorpay Payment Gateway +heading: Integration Steps (Android) +description: Steps to integrate your React Native Android application with Razorpay Payment Gateway. +--- + +# Integration Steps (Android) + +Follow these steps to integrate your React Native Android application: + + - **1. Build Integration**: Integrate React Android Standard Checkout. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/TCRHqz4Hh5Q] + +> **INFO** +> +> +> **Handy Tips** +> +> The **compileSdkVersion** is the version of Android. Increase the value of **minSdkVersion** to at least 19 in the build.gradle file in the Android folder to work with the latest Android SDK Build Tools version. Using it with a lower **minSdkVersion** version will lead to errors. +> + +> **WARN** +> +> +> **Watch Out!** +> +> If you use M1 MacBook, you need to make [these changes](#m1-macbook-changes) in your `podfile`. +> + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Install Razorpay React Native SDK + + Install the SDK using the following `npm` command in the **Terminal** window. If you are using Windows, please use **Git Bash** instead of the **Command Prompt** window. Ensure that you run this code within your React Native project folder in the **Terminal** window. + + ```node:Installation Code + //using npm + $ npm install react-native-razorpay --save + ``` + + Additionally, run the code given below if you are using `yarn` or `expo`: + + ```node:Installation Code using yarn + // using yarn + $ yarn add react-native-razorpay + ``` + + ```node:Installation Code using expo + // for expo + $ npx expo install react-native-razorpay + ``` + + + +### 1.2 Run React Native App + + Run the React Native app. + + ```node: Run + npx react-native run-android + ``` + + This links the SDK with your React Native project. + + + + Expo Application + + After adding the `react-native-razorpay` package, use the option to prebuild the app. This generates the **android** platform folders in the project to use native-modules. + + ```node: Run + npx expo prebuild + ``` + + The application is installed on the device/emulator. + + ```node: + npx expo run:[android] --device + ``` + + + + + + +### 1.3 Create an Order in Server + + **Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order using: + + + Use this endpoint to create an order using the Orders API. + + /orders + + ```curl: Curl + curl -X POST https://api.razorpay.com/v1/orders + -U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -H 'content-type:application/json' + -d '{ + "amount": 50000, + "currency": "", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230 + }' + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", ""); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + DATA = { + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } + } + client.order.create(data=DATA) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('receipt' => '123', 'amount' => 50000, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + ```csharp: .NET + RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.add("receipt", "order_rcptid_11"); + options.add("currency", ""); + Order order = client.Order.Create(options); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + options = amount: 50000, currency: '', receipt: '' + order = Razorpay::Order.create + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "", + receipt: "receipt#1", + notes: { + key1: "value3", + key2: "value2" + } + }) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "", + "receipt": "some_receipt_id" + } + body, err := client.Order.Create(data) + ``` + + ```json: Success Response + { + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 + } + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + + You can use the Postman workspace below to create an order: + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + + You can create an order manually by integrating the API sample codes on your server. + + + + Request Parameters + + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `22225`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of ₹7,000 is to be received from the customer in two installments of #1 - ₹5,000, #2 - ₹2,000, then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + + +### 1.4 Add Razorpay Checkout Options to .js File + + To integrate the Razorpay Checkout with your React Native app, you must add the Checkout Display Options in the **.js** file. + + Open the **.js** file in your project folder and perform the following: + + 1. Import the `RazorpayCheckout` module to your component. + + ```js: Import Razorpay Checkout Module + import RazorpayCheckout from 'react-native-razorpay'; + ``` + + 2. Call the `RazorpayCheckout.open` method with the payment options. The method returns a JS Promise where the `then` part corresponds to a successful payment and the `catch` part corresponds to payment failure. + + ```Javascript: Checkout Options + { + var options = { + description: 'Credits towards consultation', + image: 'https://i.imgur.com/3g7nmJC.jpg', + currency: '', + key: '', + amount: '50000', + name: 'Acme Corp', + order_id: 'order_DslnoIgkIDL8Zt',//Replace this with an order_id created using Orders API. + prefill: { + email: '', + contact: '', + name: '' + }, + theme: {color: '#53a20e'} + } + RazorpayCheckout.open(options).then((data) => { + // handle success + alert(`Success: ${data.razorpay_payment_id}`); + }).catch((error) => { + // handle failure + alert(`Error: ${error.code} | ${error.description}`); + }); + }}> + ``` + + + + Checkout Options + + You must pass these parameters in Checkout to initiate the payment. + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + + + + + + + +### 1.5 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.6 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + +### M1 MacBook Changes + + If you use M1 MacBook, you need to make the following changes in your podfile. + + +> **INFO** +> +> +> **Handy Tips** +> +> Add the following code inside `post_install do |installer|`. +> + + ```js: podfile + installer.pods_project.build_configurations.each do |config| + config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" + end + ``` + + + + + + +### 1.7 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +## 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## 3. Go-live Checklist + +Check the go-live checklist for Razorpay React Native Android integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/payment-gateway/react-native-integration/standard/integration-steps-ios.md b/llm-content/payments/payment-gateway/react-native-integration/standard/integration-steps-ios.md new file mode 100644 index 00000000..1ee63b7c --- /dev/null +++ b/llm-content/payments/payment-gateway/react-native-integration/standard/integration-steps-ios.md @@ -0,0 +1,1049 @@ +--- +title: React Native iOS SDK - Integration Steps | Razorpay Payment Gateway +heading: Integration Steps (iOS) +description: Steps to integrate your React Native iOS application with Razorpay Payment Gateway. +--- + +# Integration Steps (iOS) + +Follow these steps to integrate your React Native iOS application: + + - **1. Build Integration**: Integrate React iOS Standard Checkout. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/cSkZo6Mzm1I] + +> **WARN** +> +> +> **Watch Out!** +> +> If you use M1 MacBook, you need to make [these changes](#m1-macbook-changes) in your `podfile`. +> + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Install Razorpay React Native SDK + + Install the SDK using the following `npm` command in the **Terminal** window. If you are using Windows, please use **Git Bash** instead of the **Command Prompt** window. Ensure that you run this code within your React Native project folder in **Terminal** window. + + ```node:Installation Code + //using npm + $ npm install react-native-razorpay --save + ``` + + Additionally, run the code given below if you are using `yarn` or `expo`: + + ```node:Installation Code using yarn + // using yarn + $ yarn add react-native-razorpay + ``` + + ```node:Installation Code using expo + // for expo + $ npx expo install react-native-razorpay + ``` + + + +### 1.2 Open Podfile and Update Platform Version + + Install pods after updating the iOS platform. This will install all pods in the Podfile at the exact versions. + + ```node: Cocoapod Step + pod install && cd .. + ``` + + + +### 1.3 Install Pods Using Cocoapods + + Navigate to the **ios** folder and open **Podfile**. You can do this using the following code. + + ```node: Open Podfile + $ cd ios && open podfile + ``` + + Change the platform version from `9.0` to `10.0` in the Podfile. + + ![](/docs/assets/images/react-native-change_platform_version_podfile.jpg) + + + +### 1.4 Run React Native App + + Run the React Native app. + + ```node: Run App + npx react-native run-ios + ``` + + The SDK has automatically linked with React Native project. You do not need to perform any additional manual steps. + + + + Expo Application + + After adding the `react-native-razorpay` package, use the option to prebuild the app. This generates the **iOS** platform folders in the project to use native-modules. + + ```node: Run + npx expo prebuild + ``` + + The application is installed on the device/emulator. + + ```node: + npx expo run:[ios] --device + ``` + + + + + + +### 1.5 Create an Order in Server + + **Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order using: + + + Use this endpoint to create an order using the Orders API. + + /orders + + ```curl: Curl + curl -X POST https://api.razorpay.com/v1/orders + -U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -H 'content-type:application/json' + -d '{ + "amount": 50000, + "currency": "", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230 + }' + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", ""); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + DATA = { + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } + } + client.order.create(data=DATA) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('receipt' => '123', 'amount' => 50000, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + ```csharp: .NET + RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.add("receipt", "order_rcptid_11"); + options.add("currency", ""); + Order order = client.Order.Create(options); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + options = amount: 50000, currency: '', receipt: '' + order = Razorpay::Order.create + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "", + receipt: "receipt#1", + notes: { + key1: "value3", + key2: "value2" + } + }) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "", + "receipt": "some_receipt_id" + } + body, err := client.Order.Create(data) + ``` + + ```json: Success Response + { + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 + } + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + + You can use the Postman workspace below to create an order: + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + + You can create an order manually by integrating the API sample codes on your server. + + + + Request Parameters + + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `22225`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of ₹7,000 is to be received from the customer in two installments of #1 - ₹5,000, #2 - ₹2,000, then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + + +### 1.6 Add Razorpay Checkout Options to .js File + + To integrate the Razorpay Checkout with your React Native app, you must add the Checkout Display Options in the **.js** file. + + Open the **.js** file in your project folder and perform the following: + + 1. Import the `RazorpayCheckout` module to your component. + + ```js: Import Razorpay Checkout Module + import RazorpayCheckout from 'react-native-razorpay'; + ``` + 2. Call the `RazorpayCheckout.open` method with the payment options. The method returns a JS Promise where the `then` part corresponds to a successful payment and the `catch` part corresponds to payment failure. + + ```Javascript: Checkout Options + { + var options = { + description: 'Credits towards consultation', + image: 'https://i.imgur.com/3g7nmJC.jpg', + currency: '', + key: '', + amount: '50000', + name: 'Acme Corp', + order_id: 'order_DslnoIgkIDL8Zt',//Replace this with an order_id created using Orders API. + prefill: { + email: '', + contact: '', + name: '' + }, + theme: {color: '#53a20e'} + } + RazorpayCheckout.open(options).then((data) => { + // handle success + alert(`Success: ${data.razorpay_payment_id}`); + }).catch((error) => { + // handle failure + alert(`Error: ${error.code} | ${error.description}`); + }); + }}> + ``` + + + + Checkout Options + + You must pass these parameters in Checkout to initiate the payment. + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + + + + +### 1.6.1 Enable UPI Intent on iOS *(Optional)* + + Provide your customers with a better payment experience by enabling UPI Intent on your app's Checkout form. In the UPI Intent flow: +1. Customer selects UPI as the payment method in your iOS app. A list of UPI apps supporting the intent flow is displayed. For example, PhonePe, Google Pay and Paytm. +2. Customer selects the preferred app. The UPI app opens with pre-populated payment details. +3. Customer enters their UPI PIN to complete their transactions. +4. Once the payment is successful, the customer is redirected to your app or website. + +To enable this in your iOS integration, you must make the following changes in your app's info.plist file. + +```xml: info.plist +LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + +``` + +Know more about [UPI Intent and its benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). + +### UPI Intent on Recurring Payments + +Configure and initiate a recurring payment transaction on UPI Intent: + +```swift: ViewController.swift +let options: [String:Any] = [ + "key": "YOUR_KEY_ID", + "order_id": "order_DBJOWzybfXXXX", + "customer_id": "cust_BtQNqzmBlXXXX", + "prefill": [ + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + ], + "image": "https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + "amount": 10000, // Amount should match the order amount + "currency": "INR", + "recurring": 1 // This key value pair is mandatory for Intent Recurring Payment. +] +```objectivec: ViewController.m +NSDictionary *options = @{ + @"key": @"YOUR_KEY_ID", + @"order_id": @"order_DBJOWzybfXXXX", + @"customer_id": @"cust_BtQNqzmBlXXXX", + @"prefill": @{ + @"contact": @"+919000090000", + @"email": @"gaurav.kumar@example.com" + }, + @"image": @"https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + @"amount": @(10000), // Amount should match the order amount + @"currency": @"INR", + @"recurring": @(1) // This key value pair is mandatory for Intent Recurring Payment. +}; +``` + + + + + + + + + +### 1.7 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.8 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + +### M1 MacBook Changes + + If you use M1 MacBook, you need to make the following changes in your podfile. + + +> **INFO** +> +> +> **Handy Tips** +> +> Add the following code inside `post_install do |installer|`. +> + + ```js: podfile + installer.pods_project.build_configurations.each do |config| + config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" + end + ``` + + + + + + +## 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## 3. Go-live Checklist + +Check the go-live checklist for Razorpay React Native iOS integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/payment-gateway/react-native-integration/standard/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/react-native-integration/standard/troubleshooting-faqs.md new file mode 100644 index 00000000..74ac6f93 --- /dev/null +++ b/llm-content/payments/payment-gateway/react-native-integration/standard/troubleshooting-faqs.md @@ -0,0 +1,176 @@ +--- +title: Payment Gateway | React Native - Troubleshooting & FAQs +heading: Troubleshooting and FAQs +description: Troubleshoot common error scenarios and find answers to frequently asked questions about Standard React Native integration. +--- + +# Troubleshooting and FAQs + +### 1. How do I resolve the following error? + + ``` + dyld: Library not loaded: @rpath/libswiftCoreGraphics.dylib + Referenced from: /private/var/mobile/Containers/Bundle/Application/696F0EAD-E2A6-4C83-876F-07E3D015D167/.app/Frameworks/.framework/ + Reason: image not found + ``` + + To work around this issue, in your Xcode project: + + 1. Set the `Embedded Content Contains Swift Code (EMBEDDED_CONTENT_CONTAINS_SWIFT)` build setting to `YES` in your app. Know more [here](https://developer.apple.com/library/archive/qa/qa1881/_index.html). + + 2. Navigate to **Target Settings** → **General** and ensure that: + 1. The framework is added in **Frameworks, Libraries, and Embed Content**. + 2. Change **Embed status** from - **'Do not Embed'** to **'Embed & Sign'**. + + 3. Verify that you have installed CocoaPods. + + For Android, if you are using proguard for your builds, you need to add the following lines to proguard files. + + ``` + -keepattributes *Annotation* + -dontwarn com.razorpay.** + -keep class com.razorpay.** {*;} + -optimizations !method/inlining/ + -keepclasseswithmembers class * { + public void onPayment*(...); + } + ``` + + + +### 2. How do I auto-link the Razorpay React Native SDK with my app? + + Auto linking is possible only if you are using React Native version 0.60+. Use the code given below to install and run the SDK: + + ```js: Install + npm install react-native-razorpay --save + cd ios && open podfile # Change the platform from iOS 9.0 to 10.0 + pod install && cd .. # CocoaPods on iOS needs this extra step + ``` + + ```js: Run the app + yarn react-native run-ios + ``` + + + +### 3. How do I integrate the Razorpay SDK if my React Native app version is 0.59 and lower? + + If you are using React Native version 0.59 and lower, follow the steps given below to install, link and run the SDK: + + 1. Install the SDK. + + ```js: Install + $ npm install react-native-razorpay --save // Install the Razorpay React Native Standard SDK using the npm command. + ``` + 2. Link the SDK. + + ```js: Link the SDK + react-native link react-native-razorpay // Link the SDK with React Native Project using Xcode. + ``` + 3. Configure the SDK. + 1. Drag the Razorpay.framework file from the **Libraries** folder and drop it under the root folder. + 2. Set the `Embedded Content Contains Swift Code (EMBEDDED_CONTENT_CONTAINS_SWIFT)` build setting to `YES` in your app. Know more [here](https://developer.apple.com/library/archive/qa/qa1881/_index.html). + 3. Navigate to **Target Settings** → **General** and ensure that: + 1. The framework is added in **Frameworks, Libraries, and Embed Content**. + 2. Change **Embed status** from - **'Do not Embed'** to **'Embed & Sign'**. + + + +### 4. How do I install the Razorpay React Native SDK through manual linking? + + To manually link the SDK, the steps differ for iOS and Android platforms. + + #### For iOS (via CocoaPods) + + Add the following line to your build targets in your Podfile. + + ```js: Podfile + pod 'react-native-razorpay', :path => '../node_modules/react-native-razorpay' + ``` + + Run the following command: + + ```js: Podfile + pod install + ``` + #### For iOS (without CocoaPods) + + 1. In XCode, go to the project navigator: + 1. Right-click **Libraries**. + 2. Add files to [your project's name]. + 3. Go to `node_modules/react-native-razorpay`. + 4. Add the `.xcodeproj` file. + 2. In the project navigator, select your project: + 1. `Add the libRNDeviceInfo.a` from the deviceinfo project to your project's **Build Phases** ➜ **Link Binary With Libraries**. + 2. Click `.xcodeproj` file you added before in the project navigator and go to the **Build Settings** tab. Make sure **All** is selected (instead of Basic). + 3. Look for **Header Search Paths** and make sure it contains both `$(SRCROOT)/../react-native/React` and `$(SRCROOT)/../../React`. Mark both as recursive (should be OK by default). + 3. Run your project using the **Cmd+R** keys. + + #### For Android + + Follow the steps to perform manual linking: + 1. `Open android/app/src/main/java/[...]/MainApplication.java`. + - Add `import com.razorpay.rn.RazorpayPackage;` to the imports. + - Add `new RazorpayPackage()` to the list returned by the `getPackages()` method. + 2. Append the following lines to `android/settings.gradle`: + + ```java: Settings Gradle + include ':react-native-razorpay' + project(':react-native-razorpay').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-razorpay/android') + ``` + 3. Insert the following lines inside the dependencies block in android/app/build.gradle: + + ```java: Add Dependencies + implementation project(':react-native-razorpay') + ``` + + + +### 5. How can I update the existing **'razorpay-pod'**? + + - Go to **iOS** folder in your project and run **'pod update'** to update all the pods. + + - If you do not want to update all pods, run **'pod update razorpay-pod'** + + + +### 6. What is the process for raising a request for a new feature? + + To raise a request for a new feature, go to **New Issue** → **Feature Request** on our [GitHub repository](https://github.com/razorpay/razorpay-capacitor/issues/new/choose). + + + +### 7. I am facing issues integrating the Razorpay React Native Plugin with my React Native Expo app. How do I resolve this? + + Expo does not support native code, so you cannot integrate with the Razorpay React Native Plugin. As a workaround, you can load the Razorpay page in a web view and use the callback URL logic to accept payments in your React Native Expo app. Check the [limitations](https://docs.expo.dev/faq/#limitations?redirected). + + + +### 8. In the new M1 MacBook, why am I not able to compile the React Native Razorpay plugin for release mode? + + New changes introduced in Xcode 12 might cause the issue. + + To resolve this: + 1. Use [Rosetta 2](https://support.apple.com/en-us/HT211861) for launching the app on your Mac. + 2. Add the following lines to Podfile within `post_install do |installer|` . + + ```js: podfile + installer.pods_project.build_configurations.each do |config| + config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" + end + ``` + + Know more about [compilation errors](https://khushwanttanwar.medium.com/xcode-12-compilation-errors-while-running-with-ios-14-simulators-5731c91326e9). + + + +### 9. How can I update the Razorpay React Native Standard SDK version? + + To update the SDK version using npm, follow these steps: + + 1. Open the terminal or command prompt and navigate to your project directory where the `package.json` file resides. + 2. Use the npm update command followed by the package name to update a specific package to its latest version. For example, npm update `` (replace `` with the name of the package you want to update). + 3. If you are using a React Native iOS application, run `cd ios && pod repo update && pod update` to ensure the internal iOS dependencies are updated to the versions set by the Razorpay package. This is because cocoapods may not automatically update the internal trunk spec to fetch the latest versions. + 4. After running the update command, review the updates fetched by npm to ensure they do not introduce any breaking changes. + 5. Conduct thorough testing to ensure that the updated packages do not adversely affect the application functionality and commit the changes. diff --git a/llm-content/payments/payment-gateway/s2s-integration.md b/llm-content/payments/payment-gateway/s2s-integration.md new file mode 100644 index 00000000..86c5f08c --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration.md @@ -0,0 +1,64 @@ +--- +title: Server-to-Server Integration +description: Directly integrate your server with Razorpay Payment Gateway using S2S Redirect, JSON V1, or JSON V2 APIs. +--- + +# Server-to-Server Integration + +You can use Server-to-Server (S2S) payments integration to communicate directly with the Razorpay servers and seamlessly integrate the service in your web application. You can capture payment details on your server and process the payments at your end. You have complete control over the look and feel of the payment experience for your customers. + +Razorpay supports two flavors of server-to-server integration. Choose the one that best suits your needs. + + +### S2S JSON API (Recommended) + + If you want more control over the way the customer is redirected, you can use the JSON API. You can decide where the customer should enter the transaction OTP to complete the payment - on your website or on the bank's page. + + - [S2S JSON V2 (Latest)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2.md) + - [S2S JSON V1](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v1.md) + +> **INFO** +> +> +> **Handy Tips** +> +> While we have two JSON API versions, we recommend you to use V2 version. Using this API: +> - Helps avoid multiple API calls. +> - Provides a greater control over native OTP. +> - Reduces payment timeout issues. +> + + + + +### S2S Redirect API + + This is our default [server-to-server integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/redirect.md). The payment creation request returns a variety of responses, which must be rendered on your customer's browser to proceed with the payment. These responses typically result in the browser being redirected to a bank or gateway page to complete payment authentication. + + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/s2s-integration.md). +> + +## Prerequisite + +PCI-DSS certification is required for all entities seeking to store, process, and transmit cardholder data. + +### Related Information + +- [Integration Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/best-practices.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/best-practices.md b/llm-content/payments/payment-gateway/s2s-integration/best-practices.md new file mode 100644 index 00000000..7bdf6b42 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/best-practices.md @@ -0,0 +1,30 @@ +--- +title: Best Practices for S2S Integration +description: Check the S2S best practices to follow for smooth integration and payment experience. +--- + +# Best Practices for S2S Integration + +S2S integration is an API-based white label integration provided by Razorpay wherein you can capture payment details on your page and pass it. + +Given below are some of the best practices to be followed for a smoother integration and payment experience: + +- We recommend using S2S JSON API for S2S integration. +- Open the HTML provided as part of the API response from the customer's browser. +- Pass the actual user_agent, customer IP and referrer to avoid any failures due to risk. +- Integrate webhooks to get a callback via a server-to-server call. +- Integrate the Payments Rainy Day kit to tackle payment exceptions such as late authorized payments, payment downtimes and errors. + +> **SUCCESS** +> +> +> +> **What's New** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +### Related Information +- [Server-to-Server Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md) +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) +- [Server-to-Server JSON V2 Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/features/address-verification-system.md b/llm-content/payments/payment-gateway/s2s-integration/features/address-verification-system.md new file mode 100644 index 00000000..9b2a2696 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/features/address-verification-system.md @@ -0,0 +1,91 @@ +--- +title: Address Verification System +description: Use Razorpay address verification system to identify and reduce the risk of fraud in international payments. +--- + +# Address Verification System + +The Address Verification System (AVS) verifies if a customer's billing address (postal code and the billing street address) matches the billing address on file with the card issuer. Based on the response from the issuer, Razorpay will accept or cancel the transaction. This helps in the prevention of fraud in international payments. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - This feature works for US, UK and Canada cards only. +> + +#### Example + +Suppose an international customer, John Doe, uses a Wells Fargo credit card to make an online purchase on your website with the following address: + +``` +1304 Main Street, Anytown, Illinois, 60473 +``` + +The AVS will compare the numbers **1304** and/or **60473** with the address on file with Wells Fargo. + +If the match is successful, Razorpay authorises the transaction. In case of a mismatch, Razorpay declines the transaction. + +## Advantages + +The advantages of using the Address Verification System are: +- **Extra layer of security for your customers**. + + Your customer's lost or stolen credit card cannot be used for fraudulent transactions as the address entered during transactions will not match the address in the card issuer's database. Razorpay will not authorise such transactions. This protects customers from credit cards frauds to an extent. +- **Your business has a higher chance of winning cashback disputes**. + + Suppose your customer's stolen or lost card is used for transactions, and the fraudulent party uses the customer's correct address. In that case, AVS cannot detect such transactions as fraudulent as there is no address mismatch. Razorpay authorises such transactions. If the customer files a chargeback dispute, you are more likely to win the dispute as the transaction passed the AVS check. + +## Prerequisites + +- [Integrate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md) with Razorpay S2S APIs. + +- Enable [international payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md) for your Razorpay account. + +## How it Works + +Given below is a diagram of the workflow: + +![AVS Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/international-payments-address-verification-system-flow.jpg.md) + +Watch this video to see how your customers can add their card and address details on the checkout page for address verification. + +[Video: https://www.youtube.com/embed/c8cswxSj9jE] + +Given below are the steps followed by the customers: + +1. The customer selects `card` as the payment method and enters the credit card details. +2. The customer is asked to enter their billing address. This is a one-time activity and Razorpay will save the address securely. Customer will not be asked to provide the address on repeat transactions. +3. The Address Verification System matches both addresses. There can be three types of matches: + - **Complete Match**: The address provided by the customer matches exactly with the address available with the card issuer. + - **Partial Match**: This indicates that the billing address being compared has the same ZIP code or the same numeric values in the street address, but not both. + - **No Match**: A `no match` response indicates that neither part of the billing address matches the card issuer data. This can act as a strong signal of potential fraud. +4. Based on the match, Razorpay takes the following actions: + - Authorise the transaction: The transaction is authorised, and the credit card is debited. + - Cancel the transaction: The transaction is declined. + +### FAQs + +List of frequently asked questions: + +#### 1. Is this feature available for domestic payments? +No, this feature is available only for international payments. + +#### 2. Can my customer complete the payment in case of a partial match? +Yes, your customer will be able to complete the payment even in the case of a partial match. diff --git a/llm-content/payments/payment-gateway/s2s-integration/features/otp-assist.md b/llm-content/payments/payment-gateway/s2s-integration/features/otp-assist.md new file mode 100644 index 00000000..2ef170e2 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/features/otp-assist.md @@ -0,0 +1,238 @@ +--- +title: Razorpay OTP-Assist | OTP Auto Read and Submit +heading: OTP-Assist +description: Steps to enable OTP auto-read and auto-submit on your Android app for payments that rely on OTP for completion. +--- + +# OTP-Assist + +With Razorpay OTP-Assist, your customers gain a faster and enhanced checkout experience with Razorpay OTP auto-read and auto-submit. The system automatically reads the OTP received, with your customer’s consent, and submits it. It prevents errors and the users do not need to navigate or interact with additional elements to complete verification, making the process seamless. + +## Prerequisites + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +- Integrate with [Android Custom SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom.md). + +## Dependencies + +Add the following line in your `build.gradle`(app-level) file in the dependencies block: + +```java: Dependencies +dependencies{ + //other dependencies + implementation "com.razorpay:otp-assist:1.0.0"" + //other dependencies +} +``` + +## Integration Steps + +**1.** [Initialise RazorpayOtpAssist Object](#step-1-initialise-razorpayotpassist-object). + +**2.** [OTP Auto-Submission](#step-2-otp-auto-submission). + +**3.** [Override onActivityResultReceived](#step-3-override-onactivityresultreceived). + +**4.** [Reset All Objects](#step-4-reset-all-objects). + +### Step 1: Initialise RazorpayOtpAssist Object + +In the S2S flow, since you have not integrated with any of Razorpay’s Checkout SDKs, you must create the `RazorpayOtpAssist` object. + +```java: Java +RazorpayOtpAssist(Activity activity, String apiKey) +```kotlin: Kotlin +class RazorpayOtpAssist(activity: Activity, apiKey: String) +``` + +`activity` +: `object` Activity object within which the RazorpayOtpAssist object is created. This activity object displays the UI timer for the OTP submit cancellation. + +`apiKey` +: `string` API Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys), used to ensure the feature is enabled. + +#### Sample Code + +Use the sample code given below: + +```java: Java +RazorpayOtpAssist razorpayOtpAssist = RazorpayOtpAssist(activity, apiKey); +```kotlin: Kotlin +val razorpayOtpAssist = RazorpayOtpAssist(activity, apiKey); +``` + +### Step 2: OTP Auto-Submission + +You can use one of the options below based on your requirement: + +- [WebView-based Payments](#webview-based-payments): For card payments. +- [Business OTP Page-based Payments](#business-otp-page-based-payments): For native OTP payments. + +#### WebView-based Payments + +Since you load the URL provided by Razorpay in WebView for payment completion, this step allows us to auto-fill and auto-submit the OTP directly in WebView. + +```java: Java +void startSmsListener(WebView webView) +```kotlin: Kotlin +fun startSmsListener(webView: WebView) +``` + +`WebView` +: `object` Used to load the URL provided by Razorpay for payment completion. + +#### Sample Code + +Use the sample code given below: + +```java: Java +RazorpayOtpAssist razorpayOtpAssist = new RazorpayOtpAssist(PaymentActivity.this, "YOU_KEY_ID"); +// Other code + +razorpayOtpAssist.startSmsListener(webview); +// Other code + +```kotlin: Kotlin +val razorpayOtpAssist = RazorpayOtpAssist(this@PaymentOptionsEditPayload, "YOU_KEY_ID") +// Other code + +razorpayOtpAssist.startSmsListener(webView) +// Other code +``` + +#### Business OTP Page-based Payments + +Razorpay offers Native OTP solutions where you can submit the OTP by using Razorpay APIs. To enable OTP auto-read and auto-submit of payments with this feature, we use a separate function that uses an interface to send the callback to you once the OTP is received. + +```java: Java +public interface OtpListener { + void onOtpReceived(String sender, String body, String otp); + void onOtpConfirmed(String sender, String body, String otp); +} +```kotlin: Kotlin +interface OtpListener { + fun onOtpReceived(sender: String, body: String, otp: String) + fun onOtpConfirmed(sender: String, body: String, otp: String) +} +``` + +`OtpListener` +: `object` Acts as a callback, triggered when the OTP is received and parsed after the timer is displayed. + + `onOtpReceived` + : Triggered when the message is received and the SDK extracts OTP. Values: + - `sender`: Sender of the message (default: razorpay). + - `body`: The entire message. + - `OTP`: OTP pin extracted from the message. + + `onOtpConfirmed` + : Triggered when the timer for OTP Auto-submit is allowed/confirmed by the user. Values: + - `sender`: Sender of the message (default: razorpay). + - `body`: The entire message. + - `OTP`: OTP pin extracted from the message. + +#### Sample Code + +Use the sample code given below: + +```java: Java +RazorpayOtpAssist razorpayOtpAssist = new RazorpayOtpAssist(PaymentActivity.this, "YOU_KEY_ID"); +// Other code + +razorpayOtpAssist.startSmsListener(new OtpListener() { + @Override + public void onOtpReceived(String sender, String body, String otp) { + // Fill {otp} in the input field + } + + @Override + public void onOtpConfirmed(String sender, String body, String otp) { + // This function is triggered after the RazorpayOtpAssist SDK displays the timer, which can be used to stop the auto-completion. + // If the user cancels auto-submit, this function is not triggered. + } +}); + +// Other code + +```kotlin: Kotlin +val razorpayOtpAssist = RazorpayOtpAssist(this@PaymentOptionsEditPayload, "YOU_KEY_ID") +// Other code + +razorpayOtpAssist.startSmsListener(object : OtpListener { + override fun onOtpReceived(sender: String, body: String, otp: String) { + // Fill {otp} in the input field + } + + override fun onOtpConfirmed(sender: String, body: String, otp: String) { + // This function is triggered after the RazorpayOtpAssist SDK displays the timer, which can be used to stop auto-completion. + // If the user cancels auto-submit, this function is not triggered. + } +}) + +// Other code +``` + +### Step 3: Override onActivityResultReceived + +When the application does not use the `RECEIVE_SMS` permission, we use the `SmsRetreiverClient` API provided by Google, which enables the user to give a one-time consent for the application to read the incoming message. + +The user’s response for the one-time consent is passed to the activity’s `onActivityResult` function. Since the SDK cannot override this, we request you send this data to us. + +```java: Java +void onActivityResultReceived(String requestCode, String resultCode, Intent data) +```kotlin: Kotlin +fun onActivityResultReceived(requestCode: String, resultCode: String, data: Intent) +``` + +`requestCode` +: `string` Passed by `RazorpayOtpAssist` SDK when the `startActivityForResult` is triggered. + +`resultCode` +: `string` Contains user-selected action. + +`data` +: `intent` Contains data from the user-selected action. + +#### Sample Code + +Use the sample code given below: + +```java: Java +@Override +protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + if (requestCode == RazorpayOtpAssist.SMS_CONSENT_REQUEST && data != null) { + razorpayOtpAsisst.onActivityResultReceived(requestCode, resultCode, data); + } +} +```kotlin: Kotlin +override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { + super.onActivityResult(requestCode, resultCode, data) + if (requestCode == RazorpayOtpAssist.SMS_CONSENT_REQUEST && data != null) { + razorpayOtpAssist.onActivityResultReceived(requestCode, resultCode, data) + } +} +``` + +### Step 4: Reset All Objects + +You can use this function to destroy all objects used by the `RazorpayOtpAssist` SDK to avoid leaks or when starting a new transaction with the same Razorpay object. + +```java: Java +void reset() +```kotlin: Kotlin +fun reset() +``` + +#### Sample Code + +Use the code given below: + +```java: Reset +//other code +razorpayOtpAssist.reset() +//other code +``` diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v1.md b/llm-content/payments/payment-gateway/s2s-integration/json/v1.md new file mode 100644 index 00000000..2c315d7d --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v1.md @@ -0,0 +1,60 @@ +--- +title: About Server-to-Server JSON V1 Integration +description: Use S2S JSON V1 API to integrate with Razorpay Payment Gateway. +--- + +# About Server-to-Server JSON V1 Integration + +Our default [Server-to-Server integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/redirect.md) is simple. + +- The payment creation request returns a variety of responses. All of these responses need to render on your customer's browser to push the payment forward. + +- These responses result in redirecting the browser to a bank or gateway page to complete payment authentication. + +However, if you want more control over how the customer is redirected, you can use the JSON API endpoint. The response to this endpoint contains only the necessary details and information about the next steps to be taken. Your integration is required to handle different flows to be able to process a payment. + + to get this feature activated on your Razorpay account. + +## Prerequisites + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup?). +- Generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. +- Know about the [Razorpay Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md). + +## Integration Steps + +Follow these integration steps: + +1. Build Integration: [Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/cards.md), [UPI Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/upi/collect.md) and [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/upi/intent.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> For other payment methods, we recommend you to follow the build integration steps mentioned on the netbanking page, except step 1.2 - Create a Payment. Please use the relevant Create a Payment sample code for the payment method. +> +> +> Payment Method | Create Payment Sample Code +> --- +> EMI | [Sample Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md#emi) +> --- +> Cardless EMI | [Sample Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md#cardless-emi) +> --- +> Wallet | [Sample Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md#wallet) +> --- +> Pay Later | [Sample Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md#pay-later) +> --- +> CRED | [Sample Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md#cred) +> +> +> + +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v1/test-integration.md) +3. [Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v1/go-live-checklist.md) + +### Related Information + +- [Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/best-practices.md) +- [Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/features/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/cards.md b/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/cards.md new file mode 100644 index 00000000..0feaf624 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/cards.md @@ -0,0 +1,1226 @@ +--- +title: 1. Build Integration for Cards (New Integration) +description: Steps to integrate S2S JSON V1 and accept payments using cards. +--- + +# 1. Build Integration for Cards (New Integration) + +Integrate with Razorpay APIs to start accepting card payments. Our APIs support the latest 3DS2 authentication protocol. + +> **INFO** +> +> +> **Handy Tips** +> +> If you are an existing Razorpay user, that is, you integrated with our S2S APIs before October 15, 2022, you need to make certain integration changes to [migrate to the 3DS2 flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/migrate-3ds2.0.md). +> + +> **WARN** +> +> +> +> **Watch Out!** +> +> You must have a PCI compliance certificate to get this feature enabled on your account. +> + +## 3DS2 Authentication + +3DS2 is an authentication protocol, the successor of 3DS1, that enables businesses and payment providers to send additional information (such as customer device or browser data) to verify the transaction's authenticity. Razorpay integration is compliant with the 3DS2 protocol. + +**Know more**: Razorpay supports [3DS2 transactions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cards/3ds2.0.md). + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Integration does not differ for the challenge or frictionless flow. +> - Frictionless flow is not applicable for payments on cards issued in India. +> + +## Integration Steps + +The integration consists of the following steps. + +**1.1** [Create an Order](#11-create-an-order). + +**1.2** [Create a Payment](#12-create-a-payment). + +**1.3** [Handle Payment Success and Failure](#13-handle-payment-success-and-failure). + +**1.4** [Verify Payment Signature](#14-verify-payment-signature). + +**1.5** [Verify Payment Status](#15-verify-payment-status). + +> **WARN** +> +> +> **Watch Out!** +> +> Do not hardcode the URL returned in the API responses. +> + +### 1.1 Create an Order + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +### 1.2 Create a Payment + +Create a payment using the API given below after your order is created. + +/payments/create/json + +```curl: Curl +curl -X POST \ +https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "browser" + }, + ### 3DS2.0 Browser Parameters### + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +}' + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient instance = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 100); +paymentRequest.put("currency", "INR"); +paymentRequest.put("contact", "9000090000"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("order_id", "order_DPzFe1Q1dEOKed"); +paymentRequest.put("method", "card"); + +JSONObject card = new JSONObject(); +card.put("number", "4386289407660153"); +card.put("name", "Gaurav"); +card.put("expiry_month", 11); +card.put("expiry_year", 30); +card.put("cvv", 100); +paymentRequest.put("card", card); + +JSONObject authentication = new JSONObject(); +authentication.put("authentication_channel", "browser"); +paymentRequest.put("authentication", authentication); + +JSONObject browser = new JSONObject(); +browser.put("java_enabled", false); +browser.put("javascript_enabled", false); +browser.put("timezone_offset", 11); +browser.put("color_depth", 23); +browser.put("screen_width", 23); +browser.put("screen_height", 100); +paymentRequest.put("browser", browser); + +paymentRequest.put("ip", "105.106.107.108"); +paymentRequest.put("referer", "https://merchansite.com/example/paybill"); +paymentRequest.put("user_agent", "Mozilla/5.0"); + +Payment payment = instance.payments.createJsonPayment(paymentRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount", 100); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("contact", "9900008989"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("order_id", "order_DPzFe1Q1dEOKed"); +paymentRequest.Add("method", "card"); + +Dictionary card = new Dictionary(); +card.Add("number", "4386289407660153"); +card.Add("name", "Gaurav"); +card.Add("expiry_month", "11"); +card.Add("expiry_year", "30"); +card.Add("cvv", "100"); +paymentRequest.Add("card", card); + +Dictionary authentication = new Dictionary(); +authentication.Add("authentication_channel", "browser"); +paymentRequest.Add("authentication", authentication); + +Dictionary browser = new Dictionary(); +browser.Add("java_enabled", false); +browser.Add("javascript_enabled", false); +browser.Add("timezone_offset", 11); +browser.Add("color_depth", 23); +browser.Add("screen_width", 23); +browser.Add("screen_height", 100); +paymentRequest.Add("browser", browser); + +paymentRequest.Add("ip", "105.106.107.108"); +paymentRequest.Add("referer", "https://merchansite.com/example/paybill"); +paymentRequest.Add("user_agent", "Mozilla/5.0"); + +Payment payment = client.Payment.CreateJsonPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson(array('amount'=>100,'currency'=>'INR','contact'=>'9900008989','email'=>'gaurav.kumar@example.com','order_id'=>'order_DPzFe1Q1dEOKed','method'=>'card','card'=>array('number'=>'4386289407660153','name'=>'Gaurav','expiry_month'=>11,'expiry_year'=>30,'cvv'=>100,),'authentication'=>array('authentication_channel'=>'browser',),'browser'=>array('java_enabled'=>false,'javascript_enabled'=>false,'timezone_offset'=>11,'color_depth'=>23,'screen_width'=>23,'screen_height'=>100,),'ip'=>'105.106.107.108','referer'=>'https://merchansite.com/example/paybill','user_agent'=>'Mozilla/5.0',)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var data = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +}; + +instance.payments.createPaymentJson(data); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": False, + "javascript_enabled": False, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +} + +client.payment.createPaymentJson(data) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": False, + "javascript_enabled": False, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +} + +Razorpay::Payment.create_json_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": map[string]interface{}{ + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100, + }, + "authentication": map[string]interface{}{ + "authentication_channel": "browser", + }, + "browser": map[string]interface{}{ + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100, + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0", +} + +body, err := client.Payment.CreatePaymentJson(para_attr, nil) + +```json: Response +{ + "next": [ + { + "action": "otp_submit", + "url": "https://api.razorpay.com/v1/payments/pay_PSiqof91TWqwvu/otp/submit" + }, + { + "action": "otp_resend", + "url": "https://api.razorpay.com/v1/payments/pay_PSiqof91TWqwvu/otp/resend" + }, + { + "action": "redirect", + "url": "https://api.razorpay.com/pg_router/v1/payments/pay_PSiqof91TWqwvu/authentication/redirect?key_id=rzp_live_XXXXXXXXXXXXXX" + } + ], + "razorpay_payment_id": "pay_PSiqof91TWqwvu" +} + +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is ₹299, then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, INR. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`order_id` _mandatory_ +: `string` Unique identifier of the Order generated in the first step. + +`email` _mandatory_ +: `string` Email address of the customer. Maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. Maximum length supported is 15 characters, inclusive of country code. + +`method` _mandatory_ +: `string` Name of the payment method. Possible value is `card`. + +`card` _mandatory_ +: `object` Details associated with the card. + + `number` + : `string` Unformatted card number. + + `name` + : `string` Name of the cardholder. + + `expiry_month` + : `string` Expiry month for the card in MM format. + + `expiry_year` + : `string` Expiry year for the card in YY format. + + `cvv` + : `string` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +`user-agent` _mandatory_ +: `string` The User-Agent header of the user's browser. Default value will be passed by Razorpay if not provided by merchant. + +`ip` _mandatory_ +: `string` The customer's IP address. + +`authentication` _optional_ +: `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + +`browser` _mandatory_ +: `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder browser local time. Obtained from the `getTimezoneOffset()` method applied to `Date` object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from payer's browser using the `screen.colorDepth` HTML DOM property. + + `language` + : `string` Obtained from payer's browser using the `navigator.language` HTML DOM property. Maximum limit of 8 characters. + +`notes` _optional_ +: `object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`referrer` _optional_ +: `string` Referrer header passed by the client's browser. + +#### Response Parameters + +If the payment request is valid, the response contains the following fields. + +`razorpay_payment_id` +: `string` Razorpay-generated ID for the payment created for this request. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. + + `action` + : `string` An indication of the next step available for payment processing. Possible value: + - `redirect`: The payment requires the customer to be redirected to a bank page. Redirect the customer's browser to the URL returned in the `url` attribute of the object. + + `url` + : `string` URL to be used for the action indicated. For `redirect`, this will be a URL that the customer's browser needs to be redirected to for authentication. + +A basic integration must look out for one type of `next` action: + +### Implementing Native OTP flows + +If you are using this endpoint to implement [native OTP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/authentication/native-otp.md) on your website, you can pass the following additional request parameters. + +`auth_type` +: `string` Can be set to `otp` for Native OTP or `3ds` for regular ACS payments. This will force the payment to use this authentication type. + +`preferred_auth` +: `array` List of authentication types that can be sent instead of `auth_type`, in order to indicate a preference. In this case, if the first authentication type is not supported, the payment will fallback to the next. + +You can also opt to have `['otp', '3ds']` defined as your default preferred auth. Get in touch with our [Support Team](https://razorpay.com/support/#raise-a-request) to have this configured for your account. + +The response contains the following actions that should be consumed: + +Next Action | Description +--- +`otp_submit` | The payment requires an OTP to be submitted via a `POST` request to the URL returned in the `url` attribute of the object. +--- +`otp_resend` | The option to resend an OTP is available for the payment. It can be triggered by sending an empty `POST` request to the URL returned in the `url` attribute of the object. + +> **WARN** +> +> +> +> **Watch Out!** +> +> The OTP Submit and Resend APIs return a response in a particular [format](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/authentication/native-otp.md#4-otp-authentication). A payment that is successfully authenticated in this manner need not be verified. +> + +#### Examples + +Different samples of payments using Native OTP with and without redirect flows are given below. + +#### Payment Using Native OTP + +This payment request results in `next` array containing `otp_submit` and `otp_resend`. This means the customer must be prompted for an OTP which can be submitted in the **OTP Submit** endpoint. + +As `otp_resend` is also available, you can re-trigger the OTP SMS using the URL shared. + +```curl: Request +curl -X POST https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H 'content-type: application/json' +-d '{ + "amount": "1000", + "currency": "INR", + "order_id": "order_D32tqGE9vgwgJq", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 23, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "browser" + }, + ### 3DS2.0 Browser Parameters### + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0", + "auth_type": "otp" +}' +```json: Response +{ + "razorpay_payment_id": "pay_D5jmY2H6vC7Cy3", + "next": [ + { + "action": "otp_submit", + "url": "https://api.razorpay.com/v1/payments/pay_D5jmY2H6vC7Cy3/otp/submit" + }, + { + "action": "otp_resend", + "url": "https://api.razorpay.com/v1/payments/pay_D5jmY2H6vC7Cy3/otp/resend" + } + ] +} +``` + +#### Payment Using Native OTP with Redirect Fallback + +This payment request results in a `next` array containing `otp_submit`, `otp_resend`, and `redirect`. The `redirect` action here acts as a fallback to the bank page, that is, if your customer opts to enter the OTP on his bank page only, the browser can be redirected to the redirect URL in order to complete the payment using 3DS flow. + +```curl: Request +curl -X POST https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H 'content-type: application/json' +-d '{ + "amount": "1000", + "currency": "INR", + "order_id": "order_D32tqGE9vgwgJq", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 23, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "browser" + }, + ### 3DS2.0 Browser Parameters### + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0", + "auth_type": "otp" +} +```json: Response +{ + "razorpay_payment_id": "pay_D5jmY2H6vC7Cy3", + "next": [ + { + "action": "otp_submit", + "url": "https://api.razorpay.com/v1/payments/pay_D5jmY2H6vC7Cy3/otp/submit" + }, + { + "action": "otp_resend", + "url": "https://api.razorpay.com/v1/payments/pay_D5jmY2H6vC7Cy3/otp/resend" + }, + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/pay_D5jmY2H6vC7Cy3/authentication/redirect?key_id=rzp_live_XXXXXXXXXXXXXX" + } + ] +} +``` + +#### Payment Using Native OTP as Preferred Auth + +Here the payment request contains `preferred auth` that opts for `otp` and falls back to `3ds`. This will result in a `next` array containing `otp_submit` and `otp_resend`. If Native OTP is not supported for the card, the `next` array containing only `redirect` is returned in the response. + +```curl: Request +curl -X POST https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_SECRET] \ +-H 'content-type: application/json' +-d '{ + "amount": "1000", + "currency": "INR", + "order_id": "order_D32tqGE9vgwgJq", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 23, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "browser" + }, + ### 3DS2.0 Browser Parameters### + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0", + "preferred_auth": [ + "otp", + "3ds" + ] +} +```json: Response for Native OTP Supported +{ + "razorpay_payment_id": "pay_D5jmY2H6vC7Cy3", + "next": [ + { + "action": "otp_submit", + "url": "https://api.razorpay.com/v1/payments/pay_D5jmY2H6vC7Cy3/otp/submit" + }, + { + "action": "otp_resend", + "url": "https://api.razorpay.com/v1/payments/pay_D5jmY2H6vC7Cy3/otp/resend" + }, + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/pay_D5jmY2H6vC7Cy3/authentication/redirect?key_id=rzp_live_XXXXXXXXXXXXXX" + } + ] +} +```json: Response for Native OTP Not Supported +{ + "razorpay_payment_id": "pay_D5jmY2H6vC7Cy3", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/pay_D5jmY2H6vC7Cy3/authentication/redirect?key_id=rzp_live_XXXXXXXXXXXXXX" + } + ] +} +``` + +#### Response on Submitting OTP + +Once the customer submits the OTP using the following endpoint, the respective success or failure responses will be generated. + + to get this feature activated on your Razorpay account. + +The following endpoint submits the OTP: + +payments/:id/otp/submit + +```curl: Example Request +curl -X POST \ +'https://api.razorpay.com/v1/payments/pay_D5jmY2H6vC7Cy3/otp/submit' \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/x-www-form-urlencoded" \ +-d 'otp=123456' +```json: Success - Auto Capture +{ + "id": "pay_D5jmY2H6vC7Cy3", + "entity": "payment", + "amount": 200000, + "currency": "INR", + "status": "captured", + "order_id": "order_D32tqGE9vgwgJq", + "invoice_id": null, + "international": false, + "method": "emi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_DG4ZdUO3xABb20", + "bank": "ICIC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "notes": [], + "fee": 1438, + "tax": 138, + "error_code": null, + "error_description": null, + "created_at": 1568026077 +} +```json: Success - Manual Capture +{ + "id": "pay_D5jmY2H6vC7Cy3", + "entity": "payment", + "amount": 200000, + "currency": "INR", + "status": "authorized", + "order_id": "order_D32tqGE9vgwgJq", + "invoice_id": null, + "international": false, + "method": "emi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": "card_DG4ZdUO3xABb20", + "bank": "ICIC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "notes": [], + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "created_at": 1568026077 +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect otp", + "field": null, + "source": "customer", + "step": "payment_authentication", + "reason": "invalid_otp", + "metadata": { + "payment_id": "pay_D5jmY2H6vC7Cy3", + "order_id": "order_D32tqGE9vgwgJq" + } + } + "next": ["otp_submit", "otp_resend"] +} +``` + +After the payment is completed, the final response is posted to the URL given in `callback_url` of the request. + +### 1.3 Handle Payment Success and Failure + +Once the payment is completed by the customer, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure** of the payment made by the customer. + +#### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +#### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#errors) for details. + +### 1.4 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +### 1.5 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +#### Test Cards + +Use the following test cards for Indian payments: + +Network | Card Number | CVV & Expiry Date +--- +Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ +--- +Mastercard | 5500 6700 0000 1002 | +--- +RuPay | 6527 6589 0000 1005 | +--- +Diners | 3608 280009 1007 | +--- +Amex | 3402 560004 01007 | + +#### Error Scenarios + +Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. +Check the following lists: +- [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). +- [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v1/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/cards/migrate-3ds2.0.md b/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/cards/migrate-3ds2.0.md new file mode 100644 index 00000000..d9d31949 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/cards/migrate-3ds2.0.md @@ -0,0 +1,473 @@ +--- +title: 3DS2 Migration Guide for Existing S2S Cards Integration +description: If you integrated with our APIs before October 15, 2022, you should make the following changes to your integration to accept card payments with the 3DS2 protocol. +--- + +# 3DS2 Migration Guide for Existing S2S Cards Integration + +If you integrated with our S2S APIs before October 15, 2022, you must make the following changes to your integration to accept card payments with 3DS2 authentication protocol. + +> **WARN** +> +> +> +> **Watch Out!** +> +> You must have a PCI compliance certificate to get this feature enabled on your account. +> + +## 3DS2 Authentication + +3DS2 is an authentication protocol, the successor of 3DS1, that enables businesses and payment providers to send additional information (such as customer device or browser data) to verify the transaction's authenticity. Razorpay integration is compliant with the 3DS2 protocol. + +**Know more**: Razorpay supports [3DS2 transactions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cards/3ds2.0.md). + +The customer's bank evaluates the transaction for risk and decide on the payment flow. + +- **Frictionless Flow**: This flow is activated if the bank determines that the transaction is from a trusted device and allows the payment to go through without any additional authentication from the customer. + +Currently, this would not be applicable in India for domestic payments as RBI mandates OTP-based authentication. For international payments, this flow is viable. + +- **Challenge Flow**: This flow is activated if the bank determines that the transaction is not from a trusted device and needs additional information. The customer needs to perform additional authentication steps. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Integration does not differ for challenge or frictionless flow. +> - Frictionless flow is not applicable for payments on cards. +> + +Given below is a diagram that explains the 3DS2 flow: + +![Cards 3DS2 Protocol](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-3ds-flowchart.jpg.md) + +## Quick Summary of Integration Changes + +Ensure you make the following changes in your Create a Payment API request. There is no change in the response. + +Parameter Changes | Description +--- +New Parameters | Pass these new parameters: - `authentication` and related child parameter: These determine the [authentication channel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/cards/migrate-3ds2.0.md#:~:text=customer%27s%20IP%20address.-,authentication,-optional) being used. +- `browser` and related child parameters: These capture the customer's [browser details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/cards/migrate-3ds2.0.md#:~:text=the%20authentication%20channel.-,browser,-mandatory), which are sent to the banks to aid their risk analysis. + +--- +Existing Parameter | The `ip` parameter is now mandatory. + +#### Sample Code + +The following endpoint creates a payment via the redirect flow. + +/payments/create/json + +```curl: Curl +curl -X POST \ +https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card":{ + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + }, + "authentication":{ + "authentication_channel": "browser" + }, + ### 3DS2.0 Browser Parameters### + "browser":{ + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +}' +```json: Response +{ + "razorpay_payment_id": "pay_ERM7x4yAFwlZZD", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/ERM7xFqd0ZEGEc/authorize" + } + ] +} + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; +RazorpayClient instance = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 100); +paymentRequest.put("currency", "INR"); +paymentRequest.put("contact", "9000090000"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("order_id", "order_DPzFe1Q1dEOKed"); +paymentRequest.put("method", "card"); + +JSONObject card = new JSONObject(); +card.put("number", "4386289407660153"); +card.put("name", "Gaurav"); +card.put("expiry_month", 11); +card.put("expiry_year", 30); +card.put("cvv", 100); +paymentRequest.put("card", card); + +JSONObject authentication = new JSONObject(); +authentication.put("authentication_channel", "browser"); +paymentRequest.put("authentication", authentication); + +JSONObject browser = new JSONObject(); +browser.put("java_enabled", false); +browser.put("javascript_enabled", false); +browser.put("timezone_offset", 11); +browser.put("color_depth", 23); +browser.put("screen_width", 23); +browser.put("screen_height", 100); +paymentRequest.put("browser", browser); + +paymentRequest.put("ip", "105.106.107.108"); +paymentRequest.put("referer", "https://merchansite.com/example/paybill"); +paymentRequest.put("user_agent", "Mozilla/5.0"); + +Payment payment = instance.payments.createJsonPayment(paymentRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount", 100); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("contact", "9900008989"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("order_id", "order_DPzFe1Q1dEOKed"); +paymentRequest.Add("method", "card"); + +Dictionary card = new Dictionary(); +card.Add("number", "4386289407660153"); +card.Add("name", "Gaurav"); +card.Add("expiry_month", "11"); +card.Add("expiry_year", "30"); +card.Add("cvv", "100"); +paymentRequest.Add("card", card); + +Dictionary authentication = new Dictionary(); +authentication.Add("authentication_channel", "browser"); +paymentRequest.Add("authentication", authentication); + +Dictionary browser = new Dictionary(); +browser.Add("java_enabled", false); +browser.Add("javascript_enabled", false); +browser.Add("timezone_offset", 11); +browser.Add("color_depth", 23); +browser.Add("screen_width", 23); +browser.Add("screen_height", 100); +paymentRequest.Add("browser", browser); + +paymentRequest.Add("ip", "105.106.107.108"); +paymentRequest.Add("referer", "https://merchansite.com/example/paybill"); +paymentRequest.Add("user_agent", "Mozilla/5.0"); + +Payment payment = client.Payment.CreateJsonPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson(array('amount'=>100,'currency'=>'INR','contact'=>'9900008989','email'=>'gaurav.kumar@example.com','order_id'=>'order_DPzFe1Q1dEOKed','method'=>'card','card'=>array('number'=>'4386289407660153','name'=>'Gaurav','expiry_month'=>11,'expiry_year'=>30,'cvv'=>100,),'authentication'=>array('authentication_channel'=>'browser',),'browser'=>array('java_enabled'=>false,'javascript_enabled'=>false,'timezone_offset'=>11,'color_depth'=>23,'screen_width'=>23,'screen_height'=>100,),'ip'=>'105.106.107.108','referer'=>'https://merchansite.com/example/paybill','user_agent'=>'Mozilla/5.0',)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var data = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +}; + +instance.payments.createPaymentJson(data); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": False, + "javascript_enabled": False, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +} + +client.payment.createPaymentJson(data) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = data = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card":{ + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + }, + "authentication":{ + "authentication_channel": "browser" + }, + "browser":{ + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +} + +Razorpay::Payment.create_json_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": map[string]interface{}{ + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100, + }, + "authentication": map[string]interface{}{ + "authentication_channel": "browser", + }, + "browser": map[string]interface{}{ + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100, + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0", +} + +body, err := client.Payment.CreatePaymentJson(para_attr, nil) + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> - The payment request and response would remain same for both frictionless and challenge scenarios. +> - The payment request would remain same for both redirection and native OTP flows. +> + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, INR. Refer to the list of supported currencies. Length must be of 3 characters. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order generated in the first step. + +`email` _mandatory_ +: `string` Email address of the customer. Maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. Maximum length supported is 15 characters, inclusive of country code. + +`method` _mandatory_ +: `string` Name of the payment method. Possible value is `card`. + +`card` _mandatory_ +: `object` Details associated with the card. + + `number` + : `string` Unformatted card number. + + `name` + : `string` Name of the cardholder. + + `expiry_month` + : `string` Expiry month for the card in MM format. + + `expiry_year` + : `string` Expiry year for the card in YY format. + + `cvv` + : `string` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +`notes` _optional_ +: `object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`referrer` _optional_ +: `string` Referrer header passed by the client's browser. + +`user-agent` _mandatory_ +: `string` The User-Agent header of the user's browser. Default value will be passed by Razorpay if not provided by merchant. + +`ip` _mandatory_ +: `string` The customer's IP address. + +`authentication` _optional_ +: `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + +`browser` _mandatory_ +: `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder browser local time. Obtained from the `getTimezoneOffset()` method applied to Date object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from payer's browser using the `screen.colorDepth` HTML DOM property. + + `language` + : `string` Obtained from payer's browser using the `navigator.language` HTML DOM property. Maximum limit of 8 characters. + +#### Response Parameters + +If the payment request is valid, the response contains the following fields. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. + + `action` + : `string` An indication of the next step available to you to continue the payment process. Possible value: + - `redirect`: The payment requires the customer to be redirected to a bank page. Redirect the customer's browser to the URL returned in the `url` attribute of the object. + + `url` + : `string` URL to be used for the action indicated. For `redirect`, this will be a URL that the customer's browser needs to be redirected to for authentication. + +## Next Step + +The rest of the integration steps mentioned in the [S2S JSON V1 Cards Build Integration document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/cards.md) remain the same. No changes are required in those. + +After completing the build integration steps, you can continue with [Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v1/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/upi/collect.md b/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/upi/collect.md new file mode 100644 index 00000000..4e7dc350 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/upi/collect.md @@ -0,0 +1,681 @@ +--- +title: 1. Build Integration for UPI Collect +description: Steps to integrate S2S JSON V1 and accept payments using UPI Collect +--- + +# 1. Build Integration for UPI Collect + +In case of UPI as there is no redirect involved when the customer completes the payment, you should keep polling Razorpay APIs to get the latest status of the payment. + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/s2s-integration.md). +> + +## Collect Flow Integration + +The integration consists of the following steps. + +**1.1** [Create an Order](#11-create-an-order). + +**1.2** [Create a Payment](#12-create-a-payment). + +**1.3** [Handle Payment Success and Failure](#13-handle-payment-success-and-failure). + +**1.4** [Verify Payment Signature](#14-verify-payment-signature). + +**1.5** [Verify Payment Status](#15-verify-payment-status). + +> **WARN** +> +> +> **Watch Out!** +> +> Do not hardcode the URL returned in the API responses. +> + +### 1.1 Create an Order + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the Orders API. It is a server-side API call. +- The order_id received in the response should be passed to the checkout. + +#### Sample Code + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +### 1.2 Create a Payment + +Create a payment using the API given below after your order is created. + +/payments/create/json + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "order_id": "order_Ky7GhR2EgoKxOE", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "upi":{ + "flow":"collect", + "vpa":"gauravkumar@okhdfcbank" + }, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 500); +paymentRequest.put("currency", "INR"); +paymentRequest.put("order_id", "order_JZluwjknyWdhnU"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("contact", "9123456789"); +paymentRequest.put("method", "upi"); +paymentRequest.put("customer_id", "cust_EIW4T2etiweBmG"); +paymentRequest.put("ip", "192.168.0.103"); +paymentRequest.put("referer", "http"); +paymentRequest.put("user_agent", "Mozilla/5.0"); +paymentRequest.put("description", "Test flow"); +JSONObject notes = new JSONObject(); +notes.put("note_key", "value1"); +JSONObject upi = new JSONObject(); +upi.put("flow", "collect"); +upi.put("vpa", "gauravkumar@exampleupi"); +paymentRequest.put("notes", notes); +paymentRequest.put("upi", upi); + +Payment payment = instance.payments.createJsonPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson([ + "amount" => 200, + "currency" => "INR", + "order_id" => "order_Jhgp4wIVHQrg5H", + "email" => "gaurav.kumar@example.com", + "contact" => "9123456789", + "method" => "upi", + "customer_id" => "cust_EIW4T2etiweBmG", + "ip" => "192.168.0.103", + "referer" => "http", + "user_agent" => "Mozilla/5.0", + "description" => "Test flow", + "notes" => [ + "note_key" => "value1" + ], + "upi" => [ + "flow" => "collect", + "vpa" => "gauravkumar@exampleupi" + ] +]); + +```nodejs: Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_SECRET", +}); + +instance.payments.createUpi({ + amount: 200, + currency: "INR", + order_id: "order_GAWRjlWkVcRh0V", + email: "gaurav.kumar@example.com", + contact: "9123456789", + method: "upi", + customer_id: "cust_EIW4T2etiweBmG", + ip: "192.168.0.103", + referer: "http", + user_agent: "Mozilla/5.0", + description: "Test flow", + notes: { + note_key: "value1", + }, + upi: { + flow: "collect", + vpa: "gauravkumar@exampleupi" + }, +}); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) +client.payment.createPaymentJson( + { + "amount": 200, + "currency": "INR", + "order_id": "order_GAWRjlWkVcRh0V", + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": {"note_key": "value1"}, + "upi": { + "flow": "collect", + "vpa": "gauravkumar@exampleupi" + }, + } +) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary (); +paymentRequest.Add("amount", 100); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("order_id", "order_MSd9LNbSEB2Gnv"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9999999999"); +paymentRequest.Add("method", "upi"); +paymentRequest.Add("customer_id", "cust_Z6t7VFTb9xHeOs"); +paymentRequest.Add("ip", "192.168.0.103"); +paymentRequest.Add("referer", "http"); +paymentRequest.Add("user_agent", "Mozilla/5.0"); +paymentRequest.Add("description", "Test flow"); +Dictionary notes = new Dictionary (); +notes.Add("note_key", "value1"); +Dictionary upi = new Dictionary (); +upi.Add("flow", "collect"); +upi.Add("vpa", "gauravkumar@exampleupi"); +paymentRequest.Add("notes", notes); +paymentRequest.Add("upi", upi); + +Payment payment = client.Payment.CreateUpi(paymentRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') +para_attr = { + "amount": 200, + "currency": "INR", + "order_id": "order_GAWRjlWkVcRh0V", + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "note_key": "value1" + }, + "upi": { + "flow": "collect", + "vpa": "gauravkumar@exampleupi" + } +} + +Razorpay::Payment.create_upi(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") +para_attr: = map[string] interface {} { + "amount": 200, + "currency": "INR", + "order_id": "order_GAWRjlWkVcRh0V", + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": map[string] interface {} { + "note_key": "value1", + }, + "upi": map[string] interface {} { + "flow": "collect", + "vpa": "gauravkumar@exampleupi", + }, +} +body, err: = client.Payment.CreatePaymentJson(para_attr, nil) +``` + +```json: Response +{ + "razorpay_payment_id": "pay_ERGVHAXaLNV1y5", + "next": [ + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_ERGVHAXaLNV1y5" + } + ] +} +``` +Once the payment is successfully created, you will receive a response containing the `next` array. This array tells you the next steps that you should take to process the payment: + +`action` +: `string` The action that you need to perform further. In this case, the value is `poll` + +`url` +: `string` Contains the URL that you must poll to fetch the status of the payment, either `authorized` or `failed`. + +#### Request Parameters + +The payment request for each of the supported payment methods will slightly vary. Know more about the [relevant payment request fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md). + +### 1.3 Handle Payment Success and Failure + +Once the payment is completed by the customer, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure** of the payment made by the customer. + +#### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` +#### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#errors) for details. + +### 1.4 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +### 1.5 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v1/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/upi/intent.md b/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/upi/intent.md new file mode 100644 index 00000000..69110b55 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v1/build-integration/upi/intent.md @@ -0,0 +1,636 @@ +--- +title: 1. Build Integration for UPI Intent +description: Steps to integrate S2S JSON V1 and accept payments using UPI Intent. +--- + +# 1. Build Integration for UPI Intent + +In case of UPI as there is no redirect involved when the customer completes the payment, you should keep polling Razorpay APIs to get the latest status of the payment. + +## Intent Flow Integration + +The integration consists of the following steps. + +**1.1** [Create an Order](#11-create-an-order). + +**1.2** [Create a Payment](#12-create-a-payment). + +**1.3** [Handle Payment Success and Failure](#13-handle-payment-success-and-failure). + +**1.4** [Verify Payment Signature](#14-verify-payment-signature). + +**1.5** [Verify Payment Status](#15-verify-payment-status). + +> **WARN** +> +> +> **Watch Out!** +> +> Do not hardcode the URL returned in the API responses. +> + +### 1.1 Create an Order + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the Orders API. It is a server-side API call. +- The order_id received in the response should be passed to the checkout. + +#### Sample Code + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +### 1.2 Create a Payment + +Once an order is created, your next step is to create a payment. + +#### Sample Code + +The following API will create a payment with `upi` with `intent` flow. + +/payments/create/json + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "order_id": "order_Ky7DOsYy3TVfLS", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "upi":{ + "flow":"intent" + }, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 500); +paymentRequest.put("currency", "INR"); +paymentRequest.put("order_id", "order_JZluwjknyWdhnU"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("contact", "9123456789"); +paymentRequest.put("method", "upi"); +paymentRequest.put("ip", "192.168.0.103"); +paymentRequest.put("referer", "http"); +paymentRequest.put("user_agent", "Mozilla/5.0"); +paymentRequest.put("description", "Test flow"); +JSONObject notes = new JSONObject(); +notes.put("purpose", "UPI test payment"); +JSONObject upi = new JSONObject(); +upi.put("flow", "intent"); +paymentRequest.put("notes", notes); +paymentRequest.put("upi", upi); + +Payment payment = instance.payments.createUpi(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createUpi(array("amount" => 200,"currency" => "INR","order_id" => "order_Jhgp4wIVHQrg5H","email" => "gaurav.kumar@example.com","contact" => "9123456789","method" => "upi","customer_id" => "cust_EIW4T2etiweBmG","ip" => "192.168.0.103","referer" => "http","user_agent" => "Mozilla/5.0","description" => "Test flow","notes" => array("note_key" => "value1"),"upi" => array("flow" => "intent"))); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createUpi({ + "amount": 100, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "purpose": "UPI test payment" + }, + "upi": { + "flow": "intent" + } +}); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") +para_attr: = map[string] interface {} { + "amount": 100, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": map[string] interface {} { + "purpose": "UPI test payment", + }, + "upi": map[string] interface {} { + "flow": "intent", + }, +} +body, err: = client.Payment.CreateUpi(para_attr, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') +para_attr = { + "amount": 100, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "purpose": "UPI test payment" + }, + "upi": { + "flow": "intent" + } +} + +Razorpay::Payment.create_upi(para_attr) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) +client.payment.createUpi( + { + "amount": 100, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": {"purpose": "UPI test payment"}, + "upi": { + "flow": "intent" + + }, + } +) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount",500); +paymentRequest.Add("currency","INR"); +paymentRequest.Add("order_id", "order_Z6t7VFTb9xHeOs"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9000090000"); +paymentRequest.Add("method", "upi"); +paymentRequest.Add("ip", "192.168.0.103"); +paymentRequest.Add("referer", "http"); +paymentRequest.Add("user_agent", "Mozilla/5.0"); +paymentRequest.Add("description", "Test flow"); +Dictionary notes = new Dictionary(); +notes.Add("purpose","UPI test payment"); +Dictionary upi = new Dictionary(); +upi.Add("flow","intent"); +paymentRequest.Add("notes",notes); +paymentRequest.Add("upi",upi); + +Payment payment = client.Payment.CreateUpi(paymentRequest); +```json: Response +{ + "razorpay_payment_id": "pay_ERNEungCtXpZqM", + "next": [ + { + "action": "intent", + "url": "upi://pay?pa=upi@razopay&pn=acme&tr=QTeEWVyigzIBlUD&tn=razorpay&am=100&cu=INR&mc=5411" + }, + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_ERNEungCtXpZqM" + } + ] +} +``` +The `next` array contains the following objects: + +`action` +: `string` The action you need to perform next. In this case, the value is `intent`. + +`url` +: `string` Contains the URL that the customer should be redirected. This is commonly done by rendering the URL returned by Razorpay in the form of a button or a link for the customer to use. + +`action` +: `string` The action that you need to take to fetch the status of the payment. In this case the value is `poll`. + +`url` +: `string` Contains the URL that you need to keep polling to fetch the status of the payment, either `authorized` or `failed`. + +### 1.3 Handle Payment Success and Failure + +Once the payment is completed by the customer, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure** of the payment made by the customer. + +#### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` +#### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#errors) for details. + +### 1.4 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +### 1.5 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v1/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v1/go-live-checklist.md b/llm-content/payments/payment-gateway/s2s-integration/json/v1/go-live-checklist.md new file mode 100644 index 00000000..012b85d5 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v1/go-live-checklist.md @@ -0,0 +1,76 @@ +--- +title: 3. Go-live Checklist +description: Start accepting Live Payments through Razorpay Payment Gateway. +--- + +# 3. Go-live Checklist + +Consider these steps before taking the integration live. + +## Accept Live Payments + +Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + +## Payment Capture + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +## Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v1/test-integration.md b/llm-content/payments/payment-gateway/s2s-integration/json/v1/test-integration.md new file mode 100644 index 00000000..84a419a3 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v1/test-integration.md @@ -0,0 +1,83 @@ +--- +title: 2. Test Integration +description: Steps to test if the integration was successful. +--- + +# 2. Test Integration + +You can make test payments using one of the payment methods configured at the Checkout. + +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API Keys generated in the Test Mode in the Checkout code. + +Following are the payment methods supported as configured at Razorpay Checkout. + +## Netbanking + +You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + +## UPI + +You can enter one of the following UPI IDs: + +- `success@razorpay`: To make the payment successful. +- `failure@razorpay`: To fail the payment. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + +## Wallet + +You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + +## Cards + +You can use one of the test cards to make transactions in the Test Mode. Use any valid expiration date in the future and any random CVV to create a successful payment. + +Card Network | Domestic / International | Card Number | CVV & Expiry Date +--- +Mastercard | Domestic | 5267 3181 8797 5449 | Use a random CVV and any future date ^^^^ +--- +Visa | Domestic | 4386 2894 0766 0153 | +--- +Mastercard | International | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | +--- +Visa | International | 4012 8888 8888 1881 | + +### Test Cards + +Use the following test cards for Indian payments: + +Network | Card Number | CVV & Expiry Date +--- +Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ +--- +Mastercard | 5500 6700 0000 1002 | +--- +RuPay | 6527 6589 0000 1005 | +--- +Diners | 3608 280009 1007 | +--- +Amex | 3402 560004 01007 | + +#### Error Scenarios + +Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. +Check the following lists: +- [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). +- [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + +## Next Steps + +[Step 3: Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/go-live-checklist.md) + +## Next Steps + +[Step 3: Go-live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v1/go-live-checklist.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v2.md b/llm-content/payments/payment-gateway/s2s-integration/json/v2.md new file mode 100644 index 00000000..132cbe98 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v2.md @@ -0,0 +1,41 @@ +--- +title: About Server-to-Server JSON V2 Integration +description: Use S2S JSON V2 API to integrate with Razorpay Payment Gateway. +--- + +# About Server-to-Server JSON V2 Integration + +Use Razorpay S2S Payments JSON API for greater control over customer redirection. The response to this endpoint contains only the necessary details and information about the next steps to be taken. Your integration is required to handle different flows to be able to process a payment. + + to get this feature activated on your Razorpay account. + +## Integration Steps + +1. Build Integration: [Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards.md), [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/netbanking.md), [UPI Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/upi/collect.md) and [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/upi/intent.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> For other payment methods, we recommend you to follow the build integration steps mentioned on the netbanking page, except step 1.2 - Create a Payment. Please use the relevant Create a Payment sample code for the payment method. +> +> +> Payment Method | Create Payment Sample Code +> --- +> EMI | [Sample Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md#emi) +> --- +> Cardless EMI | [Sample Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md#cardless-emi) +> --- +> Wallet | [Sample Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md#wallet) +> --- +> Pay Later | [Sample Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md#pay-later) +> --- +> CRED | [Sample Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md#cred) +> +> +> + +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/test-integration.md) +3. [Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/go-live-checklist.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/ach.md b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/ach.md new file mode 100644 index 00000000..fadf97b6 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/ach.md @@ -0,0 +1,574 @@ +--- +title: ACH Direct Debit +description: Steps to integrate S2S JSON API and accept payments using ACH Direct Debit. +--- + +# ACH Direct Debit + +ACH (Automated Clearing House) is an electronic network that processes bank-to-bank payments in batches. ACH Direct Debit enables you to withdraw funds directly from a customer's US bank account using their account and routing numbers, with transactions settling within 3-5 business days. + +## Integration Steps + +Follow the steps below to integrate Razorpay S2S JSON API and accept payments using ACH. + +**1.1** [Create an Order](#11-create-an-order) + +**1.2** [Create a Payment](#12-create-a-payment) + +**1.3** [Handle Payment Success and Error Events](#13-handle-payment-success-and-error-events) + +**1.4** [Integrate Payments Rainy Day Kit](#14-integrate-payments-rainy-day-kit) + +**1.5** [Fetch Payment Details and Verify Payment Status](#15-fetch-payment-details-and-verify-payment-status) + +### 1.1 Create an Order + +To process a payment, create a Razorpay Order to correspond with the order in your system. Send the order request parameters to the following endpoint: + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +### 1.2 Create a Payment + +Once an order is created, your next step is to create a payment. The following API will create a payment with `ach` as the payment method: + +/payments/create/json + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "content-type: application/json" \ +-d '{ + "amount": 50000, + "currency": "", + "order_id": "order_GAWN9beXgaqRyO", + "email": "", + "contact": "", + "method": "ach", + "bank_account": { + "account_number": "000000001234", + "name": "", + "bank_code": "122105278", + "bank_code_category": "routing_number", + "account_type": "personal_savings" + }, + "billing_address": { + "line1": "Block", + "line2": "Street", + "city": "San Jose", + "state": "California", + "postal_code": "33154" + } +}' +``` +```json: Success Response +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_GAWN9beXgaqRyO", + "razorpay_signature": "9ef4dffbfd84f1318f6ae648f114332d8401e0949a3d" +} +```json: Failure - Account Number +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "You entered an account number which is invalid or not found please try again", + "source": "customer", + "step": "validation", + "reason": "invalid_account_number" + } +} +```json: Failure - Bank Code +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "You entered a bank code which is invalid or not found please try again", + "source": "customer", + "step": "validation", + "reason": "invalid_bank_code" + } +} +```json: Failure - Account Type +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "You entered an account type which is invalid please try again", + "source": "customer", + "step": "validation", + "reason": "invalid_account_type" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, `USD`. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order. + Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`email` _mandatory_ +: `string` Email address of the customer. Maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. Maximum length supported is 15 characters, inclusive of country code. + +`method` _mandatory_ +: `string` Name of the payment method. Here it is `ach`. + +`bank_account` _mandatory_ +: `object` Bank account details. + + `account_number` _mandatory_ + : `string` Customer's bank account number. + + `name` _mandatory_ + : `string` Account holder's name as per bank records. + + `bank_code` _mandatory_ + : `string` The ACH routing number of the bank account. + + `bank_code_category` _mandatory_ + : `string` The category of bank code. Must be `routing_number` for ACH payments. + + `account_type` _mandatory_ + : `string` Type of bank account. Possible values: + - `personal_savings`: Individual savings account. + - `personal_checking`: Individual current account. + - `business_savings`: Business savings account. + - `business_checking`: Business current account. + +`billing_address` _optional_ +: `json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `San Jose`. + + `state` _optional_ + : `string` Name of the state. For example, `California`. + + `postal_code` _optional_ + : `string` Postal code of the state. For example, `33514`. + +The payment request for each of the supported payment methods will slightly vary. Know more about the [relevant payment request fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md). + + + +### Response Parameters + +If the payment request is valid, the response contains the following fields: + +`razorpay_order_id` +: `string` Order ID returned by Razorpay Orders API. + +`razorpay_payment_id` +: `string` Returned by Razorpay API *only* for successful payments. + +`razorpay_signature` +: `string` A hexadecimal string used for verifying the payment. + + + +### Error Response Parameters + +Error | Cause | Solution +--- +The API `` provided is invalid. | The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes. +- Expired API key. + | The API keys must be active and entered correctly with no whitespace before or after the keys. +--- +The amount must be at least USD 1.00. | The amount specified is less than the minimum amount. Currency subunits, such as cents (in the case of USD), should always be greater than or equal to 100. | Enter an amount equal to or greater than the minimum amount, that is 100 (representing $1.00). +--- +You entered an account number which is invalid or not found please try again. | The bank account number provided is invalid, does not exist or does not match the format expected by the bank. | - Verify that the account number is entered correctly without any spaces or special characters. +- Confirm the account number with the customer or check their bank statement. +- Ensure the account is active and not closed. + +--- +You entered a bank code which is invalid or not found please try again. | The routing number (bank code) provided is invalid or does not exist in the ACH network. | - Verify that the routing number is exactly 9 digits. +- Ensure the routing number passes checksum validation using the formula: ((3 × d1 + 7 × d2 + 1 × d3) + (3 × d4 + 7 × d5 + 1 × d6) + (3 × d7 + 7 × d8 + 1 × d9)) % 10 == 0 +- Confirm the routing number with the customer or check their cheque or bank statement. + +--- +You entered an account type which is invalid please try again. | The account type provided does not match the accepted values for ACH transactions. | - Ensure the account type is one of the following valid values: `personal_savings`, `personal_checking`, `business_savings` or `business_checking`. +- Verify that the account type matches the customer's actual bank account type. + + + +#### ACH Payment States + +ACH payments progress through the following states: + +- **Created**: Payment request has been initiated. +- **Authorised**: Payment has been accepted by Razorpay and submitted to the ACH network. +- **Captured**: Funds have been confirmed and will be settled to your account. +- **Failed**: Payment was rejected due to invalid account details, insufficient funds or other errors. + +> **INFO** +> +> +> **Payment Processing Timeline** +> +> Unlike card payments, ACH transactions are not processed in real-time. After successful payment creation: +> - The payment status moves to `authorised` within seconds. +> - However, actual bank authorisation takes 1-4 business days. +> - Settlement occurs on T+5 (5 business days after transaction). +> - Most returns occur within the first 5 days if there are account issues. +> +> ![ACH Settlement flow diagram](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ach-settlement-flow.jpg.md) +> + +### 1.4 Handle Payment Success and Error Events + +Once the payment is completed by the customer, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + +#### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_LUtJxInEqa0oAA&", + "razorpay_order_id": "order_LUtJ52zWwapfqs&", + "razorpay_signature": "e617a6c035cb39feb6cd16358d83a4e3d30b11d9e8e2181e6ef442da1d41df20" +} +``` + +#### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#errors) for details. + +### 1.5 Integrate Payments Rainy Day Kit + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + +### 1.6 Fetch Payment Details and Verify Payment Status + +After receiving the `razorpay_payment_id` through the `callback_url`, use this endpoint to fetch the payment details: + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/pay_LUuOjDOkeb63gS \ + +```json: Response +{ + "id": "pay_Ja8Pcd1Q2w3X4Y", + "entity": "payment", + "amount": 50000, + "currency": "", + "status": "captured", + "order_id": "order_Ja8Pbcd2Ef3GhI", + "invoice_id": null, + "international": false, + "method": "ach", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Test ACH payment", + "card_id": null, + "bank": "JP Morgan and Chase", + "wallet": null, + "vpa": null, + "email": "", + "contact": "", + "notes": { + "merchant_order_id": "M-12345", + "source": "pg-router" + }, + "fee": 2950, + "tax": 450, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "123456789012" + }, + "bank_account": { + "name": "", + "last_4": "xxxxxxx1234", + "bank_code": "122105278", + "bank_code_category": "routing_number", + "bank_name": "JP Morgan and Chase", + "account_type": "business_checking" + }, + "created_at": 1712123456 +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards.md b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards.md new file mode 100644 index 00000000..c2b12ee8 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards.md @@ -0,0 +1,1137 @@ +--- +title: 1. Build Integration for Cards (New Integration) +description: Steps to integrate S2S JSON API and accept payments using cards. +--- + +# 1. Build Integration for Cards (New Integration) + +You can integrate with Razorpay APIs to start accepting card payments. Razorpay APIs support the latest 3DS2 authentication protocol. + +> **INFO** +> +> +> **Handy Tips** +> +> If you are an existing Razorpay user, that is, you integrated with our S2S APIs before October 15, 2022, you need to make certain integration changes to [migrate to the 3DS2 flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/migrate-3ds2.0.md). +> + +> **WARN** +> +> +> **Watch Out!** +> +> You must have a PCI compliance certificate to get this feature enabled on your account. +> + +## 3DS2 Authentication + +3DS2 is an authentication protocol, the successor of 3DS1, that enables businesses and payment providers to send additional information (such as customer device or browser data) to verify the transaction's authenticity. Razorpay integration is compliant with the 3DS2 protocol. + +**Know more**: Razorpay supports [3DS2 transactions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cards/3ds2.0.md). + +> **INFO** +> +> +> **Handy Tips** +> +> - Integration does not differ for the challenge flow or frictionless flow. +> - Frictionless flow is not applicable for payments on cards issued in India. +> + +## Integration Steps + +Follow the steps below to integrate S2S JSON API with browser flow and accept payments using cards. + +**1.1** [Create an Order](#11-create-an-order). + +**1.2** [Create a Payment](#12-create-a-payment). + +**1.3** [Handle Payment Success and Error Events](#13-handle-payment-success-and-error-events). + +**1.4** [Verify Payment Signature](#14-verify-payment-signature). + +**1.5** [Integrate Payments Rainy Day Kit](#15-integrate-payments-rainy-day-kit). + +**1.6** [Verify Payment Status](#16-verify-payment-status). + +> **WARN** +> +> +> **Watch Out!** +> +> Do not hardcode the URL returned in the API responses. +> + +### 1.1 Create an Order + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +### 1.2 Create a Payment + +After the order is created, your next step is to create a payment. The following API will create a payment with `card` as the payment method. The [`browser` parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards.md#:~:text=the%20authentication%20channel.-,browser,-mandatory) capture the customer's browser details, which are sent to the banks to aid their risk analysis. + +#### Sample Code + +```curl: Curl +curl -X POST \ +https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "callback_url": "https://webhook.site/fa184d00-53da-4257-b5e4-f98e3373b005", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +}' + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; +RazorpayClient instance = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 100); +paymentRequest.put("currency", "INR"); +paymentRequest.put("contact", "9900008989"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("order_id", "order_DPzFe1Q1dEOKed"); +paymentRequest.put("callback_url", "https://webhook.site/fa184d00-53da-4257-b5e4-f98e3373b005"); +paymentRequest.put("method", "card"); + +JSONObject card = new JSONObject(); +card.put("number", "4386289407660153"); +card.put("name", "Gaurav"); +card.put("expiry_month", "11"); +card.put("expiry_year", "30"); +card.put("cvv", "100"); +paymentRequest.put("card", card); + +JSONObject authentication = new JSONObject(); +authentication.put("authentication_channel", "browser"); +paymentRequest.put("authentication", authentication); + +JSONObject browser = new JSONObject(); +browser.put("java_enabled", false); +browser.put("javascript_enabled", false); +browser.put("timezone_offset", 11); +browser.put("color_depth", 23); +browser.put("screen_width", 23); +browser.put("screen_height", 100); +paymentRequest.put("browser", browser); + +paymentRequest.put("ip", "105.106.107.108"); +paymentRequest.put("referer", "https://merchansite.com/example/paybill"); +paymentRequest.put("user_agent", "Mozilla/5.0"); + +Payment payment = instance.payments.createJsonPayment(paymentRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount", 100); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("contact", "9900008989"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("order_id", "order_DPzFe1Q1dEOKed"); +paymentRequest.Add("callback_url", "https://webhook.site/fa184d00-53da-4257-b5e4-f98e3373b005"); +paymentRequest.Add("method", "card"); + +Dictionary card = new Dictionary(); +card.Add("number", "4386289407660153"); +card.Add("name", "Gaurav"); +card.Add("expiry_month", "11"); +card.Add("expiry_year", "30"); +card.Add("cvv", "100"); +paymentRequest.Add("card", card); + +Dictionary authentication = new Dictionary(); +authentication.Add("authentication_channel", "browser"); +paymentRequest.Add("authentication", authentication); + +Dictionary browser = new Dictionary(); +browser.Add("java_enabled", false); +browser.Add("javascript_enabled", false); +browser.Add("timezone_offset", 11); +browser.Add("color_depth", 23); +browser.Add("screen_width", 23); +browser.Add("screen_height", 100); +paymentRequest.Add("browser", browser); + +paymentRequest.Add("ip", "105.106.107.108"); +paymentRequest.Add("referer", "https://merchansite.com/example/paybill"); +paymentRequest.Add("user_agent", "Mozilla/5.0"); + +Payment payment = client.Payment.CreateJsonPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson(array('amount'=>100,'currency'=>'INR','contact'=>'9900008989','email'=>'gaurav.kumar@example.com','order_id'=>'order_DPzFe1Q1dEOKed','callback_url'=>'https://webhook.site/fa184d00-53da-4257-b5e4-f98e3373b005','method'=>'card','card'=>array('number'=>'4386289407660153','name'=>'Gaurav','expiry_month'=>'11','expiry_year'=>'30','cvv'=>'100',),'authentication'=>array('authentication_channel'=>'browser',),'browser'=>array('java_enabled'=>false,'javascript_enabled'=>false,'timezone_offset'=>11,'color_depth'=>23,'screen_width'=>23,'screen_height'=>100,),'ip'=>'105.106.107.108','referer'=>'https://merchansite.com/example/paybill','user_agent'=>'Mozilla/5.0',)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var data = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "callback_url": "https://webhook.site/fa184d00-53da-4257-b5e4-f98e3373b005", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +}; + +instance.payments.createPaymentJson(data); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "callback_url": "https://webhook.site/fa184d00-53da-4257-b5e4-f98e3373b005", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": False, + "javascript_enabled": False, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0", +} + +Razorpay::Payment.create_json_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "callback_url": "https://webhook.site/fa184d00-53da-4257-b5e4-f98e3373b005", + "method": "card", + "card": map[string]interface{}{ + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100", + }, + "authentication": map[string]interface{}{ + "authentication_channel": "browser", + }, + "browser": map[string]interface{}{ + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100, + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0", +} + +body, err := client.Payment.CreatePaymentJson(para_attr, nil) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "callback_url": "https://webhook.site/fa184d00-53da-4257-b5e4-f98e3373b005", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": False, + "javascript_enabled": False, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +} + +client.payment.createPaymentJson(data) + +```json: Response +{ + "razorpay_payment_id": "pay_PSix5yL6ycr4oI", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/PSix5yL6ycr4oI/authenticate" + }, + { + "action": "otp_generate", + "url": "https://api.razorpay.com/v1/payments/pay_PSix5yL6ycr4oI/otp_generate?track_id=PSix5yL6ycr4oI&key_id=rzp_live_XXXXXXXXXXXXXX" + } + ] +} +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> The payment request and response would remain the same for both frictionless and challenge scenarios. +> + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, INR. Refer to the list of supported currencies. The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +. Refer to the list of supported currencies. The length must be 3 characters. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order generated in the first step. + +`email` _mandatory_ +: `string` Email address of the customer. The maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + +`method` _mandatory_ +: `string` Name of the payment method. Possible value is `card`. + +`card` _mandatory_ +: `object` Details associated with the card. + + `number` + : `string` Unformatted card number. + + `name` + : `string` Name of the cardholder. + + `expiry_month` + : `string` Expiry month for the card in MM format. + + `expiry_year` + : `string` Expiry year for the card in YY format. + + `cvv` + : `string` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +`user-agent` _mandatory_ +: `string` The User-Agent header of the user's browser. The default value will be passed by Razorpay if not provided by you. + +`ip` _mandatory_ +: `string` The customer's IP address. + +`authentication` _optional_ +: `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + +`browser` _mandatory_ +: `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `language` + : `string` Obtained from the payer's browser using the `navigator.language` HTML DOM property. Maximum limit of 8 characters. + +`notes` _optional_ +: `object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`referrer` _optional_ +: `string` Referrer header passed by the client's browser. + +#### Response Parameters + +If the payment request is valid, the response contains the following fields. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + +`action` +: `string` An indication of the next step available to you to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the bank page. + +`url` +: `string` URL to be used for the action indicated. + +#### OTP Generation + +If you would like the customer to enter the OTP on your website instead of the bank page, use the `otp_generate` URL. When this URL is triggered, you get the following response: + +```curl: Curl +curl -u [YOUR_KEY_ID] +-X POST https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate +-H "Content-Type: application/json" \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +RazorpayClient razorpayclient = new RazorpayClient("key",""); // Use Only razorpay key + +String paymentId = "pay_FVmAstJWfsD3SO"; + +Payment payment = razorpayclient.payments.otpGenerate(paymentId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId)->otpGenerate(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.otpGenerate(); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +#Use Only razorpay key +Razorpay.setup("key", "") + +paymentId = "pay_FVmAstJWfsD3SO"; + +Razorpay::Payment.otp_generate(paymentId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +RazorpayClient instance = new RazorpayClient("key",""); // Use Only razorpay key + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.OtpGenerate(paymentId); + +```json: Response +{ + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "otp_submit", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_submit/ac2d415a8be7595de09a24b41661729fd9028fdc?key_id=" + }, + { + "action": "otp_resend", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_resend/json?key_id=" + } + ], + "metadata": { + "issuer": "HDFC", + "network": "MC", + "last4": "0153", + "iin": "438628" + } +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment. + +#### Response Parameters + +If the payment request is valid, the response contains the following fields. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available for payment processing. Possible values: + - `opt_submit` - Use this URL to allow the customer to submit OTP and complete the payment on your webpage. + - `opt_resend` - Use this URL to resend OTP to the customer. + + `url` + : `string` URL to be used for the action indicated. + +If the customer faces any latency issues, you can choose to cancel this request and redirect the customer to the bank page to enter the OTP and complete the payment. Thus, you can avoid payment failure by switching the customer to the bank page payment flow. + +#### Response on Submitting OTP + +Razorpay sends the respective success or failure response after the customer submits the OTP on your page. + +The following endpoint submits the OTP: + +payments/:id/otp/submit + +```curl: Curl +curl -X POST \ +'https://api.razorpay.com/v1/payments/pay_D5jmY2H6vC7Cy3/otp/submit' \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/x-www-form-urlencoded" \ +-d 'otp=123456' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_D5jmY2H6vC7Cy3"; + +String jsonRequest = "{\n" + + " \"otp\": \"123456\",\n" + + "}"; + +JSONObject requestJson = new JSONObject(jsonRequest); + +Payment payment = razorpayclient.payments.otpSubmit(paymentId, requestJson); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId)->otpSubmit(array('otp'=> '12345')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.otpSubmit(paymentId,{otp:'12345'}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "otp": "123456" +} + +paymentId = "pay_D5jmY2H6vC7Cy3"; + +Razorpay::Payment.otp_generate(paymentId, para_attr) + +```csharp: .NET + +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("otp", "123456"); + +Payment payment = client.Payment.OtpSubmit(paymentId, paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id": "pay_D5jmY2H6vC7Cy3", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +```json: Failure Response +{ + "error": { + "code" : "BAD_REQUEST_ERROR", + "description": "payment processing failed because of incorrect otp" + }, + "next": ["otp_submit", "otp_resend"] +} +``` + +After the payment is completed, the final response is posted to the URL given in `callback_url` of the request, and can then be verified. + +### 1.3 Handle Payment Success and Error Events + +Once the payment is completed by the customer, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + +#### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +#### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) for details. + +### 1.4 Verify Payment Signature +Signature verification is a mandatory step to ensure that the callback is sent by Razorpay. The `razorpay_signature` contained in the callback can be regenerated by your system and verified as follows. + +Create a string to be hashed using the `razorpay_payment_id` contained in the callback and the Order ID generated in the first step, separated by a `|`. Hash this string using SHA256 and your API Secret. + +``` +generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + +if (generated_signature == razorpay_signature) { + payment is successful +} +``` + +#### Generate Signature on your Server + + +### Sample code + +```java: Java +/** +* This class defines common routines for generating +* authentication signatures for Razorpay Webhook requests. +*/ +public class Signature +{ + private static final String HMAC_SHA256_ALGORITHM = "HmacSHA256"; + /** + * Computes RFC 2104-compliant HMAC signature. + * * @param data + * The data to be signed. + * @param key + * The signing key. + * @return + * The Base64-encoded RFC 2104-compliant HMAC signature. + * @throws + * java.security.SignatureException when signature generation fails + */ + public static String calculateRFC2104HMAC(String data, String secret) + throws java.security.SignatureException + { + String result; + try { + + // get an hmac_sha256 key from the raw secret bytes + SecretKeySpec signingKey = new SecretKeySpec(secret.getBytes(), HMAC_SHA256_ALGORITHM); + + // get an hmac_sha256 Mac instance and initialize with the signing key + Mac mac = Mac.getInstance(HMAC_SHA256_ALGORITHM); + mac.init(signingKey); + + // compute the hmac on input data bytes + byte[] rawHmac = mac.doFinal(data.getBytes()); + + // base64-encode the hmac + result = DatatypeConverter.printHexBinary(rawHmac).toLowerCase(); + + } catch (Exception e) { + throw new SignatureException("Failed to generate HMAC : " + e.getMessage()); + } + return result; + } +} + +```php: PHP +use Razorpay\Api\Api; +$api = new Api($key_id, $key_secret); +$attributes = array('razorpay_signature' => '23233', 'razorpay_payment_id' => '332' , 'razorpay_order_id' => '12122'); +$order = $api->utility->verifyPaymentSignature($attributes) + +```ruby: Ruby +require 'razorpay' +Razorpay.setup('key_id', 'key_secret') +payment_response = { + 'razorpay_order_id': '12122', + 'razorpay_payment_id': '332', + 'razorpay_signature': '23233' +} + +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET + Dictionary attributes = new Dictionary(); + + attributes.Add("razorpay_payment_id", paymentId); + attributes.Add("razorpay_order_id", Request.Form["razorpay_order_id"]); + attributes.Add("razorpay_signature", Request.Form["razorpay_signature"]); + + Utils.verifyPaymentSignature(attributes); +```nodejs: Node.js +var { validatePaymentVerification } = require('./dist/utils/razorpay-utils'); + +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); +```Go: Go +import ( + "crypto/hmac" + "crypto/sha256" + "crypto/subtle" + "encoding/hex" + "fmt" +) + +func main() { + signature := "477d1cdb3f8122a7b0963704b9bcbf294f65a03841a5f1d7a4f3ed8cd1810f9b" + secret := "qp3zKxwLZxbMORJgEVWi3Gou" + data := "order_J2AeF1ZpvfqRGH|pay_J2AfAxNHgqqBiI" + //fmt.Printf("Secret: %s Data: %s\n", secret, data) + + // Create a new HMAC by defining the hash type and the key (as byte array) + h := hmac.New(sha256.New, []byte(secret)) + + // Write Data to it + _, err := h.Write([]byte(data)) + + if err != nil { + panic(err) + } + + // Get result and encode as hexadecimal string + sha := hex.EncodeToString(h.Sum(nil)) + + fmt.Printf("Result: %s\n", sha) + + if subtle.ConstantTimeCompare([]byte(sha), []byte(signature)) == 1 { + fmt.Println("Works") + } +} +``` + + +### 1.5 Integrate Payments Rainy Day Kit + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + +### 1.6 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +#### Test Cards + +Use the following test cards for Indian payments: + +Network | Card Number | CVV & Expiry Date +--- +Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ +--- +Mastercard | 5500 6700 0000 1002 | +--- +RuPay | 6527 6589 0000 1005 | +--- +Diners | 3608 280009 1007 | +--- +Amex | 3402 560004 01007 | + +#### Error Scenarios + +Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. +Check the following lists: +- [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). +- [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/browser.md b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/browser.md new file mode 100644 index 00000000..52af0502 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/browser.md @@ -0,0 +1,623 @@ +--- +title: 3DS 2 Migration Guide - Browser Flow Cards Integration +description: If you integrated with our APIs before October 15, 2022, you should make the following changes to your integration to accept card payments with the 3DS 2 protocol. +--- + +# 3DS 2 Migration Guide - Browser Flow Cards Integration + +If you integrated with our S2S APIs before October 15, 2022, you must make the following changes to your integration to accept card payments with the 3DS 2 authentication protocol. + +> **WARN** +> +> +> +> **Watch Out!** +> +> You must have a PCI compliance certificate to get this feature enabled on your account. +> + +## Quick Summary of Integration Changes + +Ensure you make the following changes in your Create a Payment API request. There is no change in the response. + +Parameter Changes | Description +--- +New Parameters | Pass these new parameters: - `authentication` and related child parameter: These determine the [authentication channel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/migrate-3ds2.0.md#:~:text=customer%27s%20IP%20address.-,authentication,-optional) being used. +- `browser` and related child parameters: These capture the customer's [browser details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/migrate-3ds2.0.md#:~:text=the%20authentication%20channel.-,browser,-mandatory), which are sent to the banks to aid their risk analysis. + +--- +Existing Parameter | The `ip` parameter is now mandatory. + +#### Sample Code + +Given below is the sample code: + +```curl: Curl +curl -X POST \ +https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card":{ + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "2030", + "cvv": "100" + }, + "authentication":{ + "authentication_channel": "browser" + }, + ### 3DS2.0 Browser Parameters### + "browser":{ + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +}' + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient instance = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 100); +paymentRequest.put("currency", "INR"); +paymentRequest.put("contact", "9900008989"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("order_id", "order_DPzFe1Q1dEOKed"); +paymentRequest.put("method", "card"); + +JSONObject card = new JSONObject(); +card.put("number", "4386289407660153"); +card.put("name", "Gaurav"); +card.put("expiry_month", "11"); +card.put("expiry_year", "30"); +card.put("cvv", "100"); +paymentRequest.put("card", card); + +JSONObject authentication = new JSONObject(); +authentication.put("authentication_channel", "browser"); +paymentRequest.put("authentication", authentication); + +JSONObject browser = new JSONObject(); +browser.put("java_enabled", false); +browser.put("javascript_enabled", false); +browser.put("timezone_offset", 11); +browser.put("color_depth", 23); +browser.put("screen_width", 23); +browser.put("screen_height", 100); +paymentRequest.put("browser", browser); + +paymentRequest.put("ip", "105.106.107.108"); +paymentRequest.put("referer", "https://merchansite.com/example/paybill"); +paymentRequest.put("user_agent", "Mozilla/5.0"); + +Payment payment = instance.payments.createJsonPayment(paymentRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount", 100); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("contact", "9900008989"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("order_id", "order_DPzFe1Q1dEOKed"); +paymentRequest.Add("method", "card"); + +Dictionary card = new Dictionary(); +card.Add("number", "4386289407660153"); +card.Add("name", "Gaurav"); +card.Add("expiry_month", "11"); +card.Add("expiry_year", "30"); +card.Add("cvv", "100"); +paymentRequest.Add("card", card); + +Dictionary authentication = new Dictionary(); +authentication.Add("authentication_channel", "browser"); +paymentRequest.Add("authentication", authentication); + +Dictionary browser = new Dictionary(); +browser.Add("java_enabled", false); +browser.Add("javascript_enabled", false); +browser.Add("timezone_offset", 11); +browser.Add("color_depth", 23); +browser.Add("screen_width", 23); +browser.Add("screen_height", 100); +paymentRequest.Add("browser", browser); + +paymentRequest.Add("ip", "105.106.107.108"); +paymentRequest.Add("referer", "https://merchansite.com/example/paybill"); +paymentRequest.Add("user_agent", "Mozilla/5.0"); + +Payment payment = client.Payment.CreateJsonPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson(array('amount'=>100,'currency'=>'INR','contact'=>'9900008989','email'=>'gaurav.kumar@example.com','order_id'=>'order_DPzFe1Q1dEOKed','method'=>'card','card'=>array('number'=>'4386289407660153','name'=>'Gaurav','expiry_month'=>'11','expiry_year'=>'30','cvv'=>'100',),'authentication'=>array('authentication_channel'=>'browser',),'browser'=>array('java_enabled'=>false,'javascript_enabled'=>false,'timezone_offset'=>11,'color_depth'=>23,'screen_width'=>23,'screen_height'=>100,),'ip'=>'105.106.107.108','referer'=>'https://merchansite.com/example/paybill','user_agent'=>'Mozilla/5.0',)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var data = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +}; + +instance.payments.createPaymentJson(data); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": False, + "javascript_enabled": False, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0", +} + +Razorpay::Payment.create_json_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": map[string]interface{}{ + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100", + }, + "authentication": map[string]interface{}{ + "authentication_channel": "browser", + }, + "browser": map[string]interface{}{ + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100, + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0", +} + +body, err := client.Payment.CreatePaymentJson(para_attr, nil) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": False, + "javascript_enabled": False, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +} + +client.payment.createPaymentJson(data) + +```json: Response +{ + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/authorize" + }, + { + "action": "otp_generate", +"url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate?track_id=FVmAtLUe9XZSGM&key_id=" + } + ] +} +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> - The payment request and response would remain the same for both frictionless and challenge scenarios. +> - The payment request would remain the same for redirection and native OTP flows. +> + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is ₹299, then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, INR. Refer to the list of supported currencies. The length must be 3 characters. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order generated in the first step. + +`email` _mandatory_ +: `string` Email address of the customer. The maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + +`method` _mandatory_ +: `string` Name of the payment method. The possible value is `card`. + +`card` _mandatory_ +: `object` Details associated with the card. + + `number` + : `string` Unformatted card number. + + `name` + : `string` Name of the cardholder. + + `expiry_month` + : `string` Expiry month for the card in MM format. + + `expiry_year` + : `string` Expiry year for the card in YY format. + + `cvv` + : `string` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +`notes` _optional_ +: `object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`referrer` _optional_ +: `string` Referrer header passed by the client's browser. + +`user-agent` _mandatory_ +: `string` The User-Agent header of the user's browser. The default value will be passed by Razorpay if not provided by you. + +`ip` _mandatory_ +: `string` The customer's IP address. + +`authentication` _optional_ +: `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + +`browser` _mandatory_ +: `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `language` + : `string` Obtained from the payer's browser using the `navigator.language` HTML DOM property. Maximum limit of 8 characters. + +#### Response Parameters + +If the payment request is valid, the response contains the following fields. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + +`action` +: `string` An indication of the next step available to you to continue the payment process. Possible values: + - `otp_generate`: This URL allows the customer to generate OTP and complete the payment on your webpage. + - `redirect`: This URL redirects the customer to submit the OTP on the bank page. + +`url` +: `string` URL to be used for the action indicated. + +## OTP Generation + +If you would like the customer to enter the OTP on your website instead of the bank page, use the `otp_generate` URL. When this URL is triggered, you get the following response: + +```curl: Curl +curl -u [YOUR_KEY_ID] +-X POST https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate +-H "Content-Type: application/json" \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +RazorpayClient razorpayclient = new RazorpayClient("key",""); // Use Only razorpay key + +String paymentId = "pay_FVmAstJWfsD3SO"; + +Payment payment = razorpayclient.payments.otpGenerate(paymentId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId)->otpGenerate(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.otpGenerate(); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +#Use Only razorpay key +Razorpay.setup("key", "") + +paymentId = "pay_FVmAstJWfsD3SO"; + +Razorpay::Payment.otp_generate(paymentId) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +RazorpayClient instance = new RazorpayClient("key",""); // Use Only razorpay key + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.OtpGenerate(paymentId); + +```json: Response +{ + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "otp_submit", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_submit/ac2d415a8be7595de09a24b41661729fd9028fdc?key_id=" + }, + { + "action": "otp_resend", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_resend/json?key_id=" + } + ], + "metadata": { + "issuer": "HDFC", + "network": "MC", + "last4": "0153", + "iin": "438628" + } +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment. + +#### Response Parameters + +If the payment request is valid, the response contains the following fields. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available for payment processing. Possible values: + - `opt_submit` - Use this URL to allow the customer to submit OTP and complete the payment on your webpage. + - `opt_resend` - Use this URL to resend OTP to the customer. + + `url` + : `string` URL to be used for the action indicated. + +If the customer faces any latency issues, you can choose to cancel this request and redirect the customer to the bank page to enter the OTP and complete the payment. Thus, you can avoid payment failure by switching the customer to the bank page payment flow. + +#### Response on Submitting OTP + +Razorpay sends the respective success or failure response after the customer submits the OTP on your page. + +The following endpoint submits the OTP: + +payments/:id/otp/submit + +```curl: Curl +curl -X POST \ +'https://api.razorpay.com/v1/payments/pay_D5jmY2H6vC7Cy3/otp/submit' \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/x-www-form-urlencoded" \ +-d 'otp=123456' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_D5jmY2H6vC7Cy3"; + +String jsonRequest = "{\n" + + " \"otp\": \"123456\",\n" + + "}"; + +JSONObject requestJson = new JSONObject(jsonRequest); + +Payment payment = razorpayclient.payments.otpSubmit(paymentId, requestJson); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId)->otpSubmit(array('otp'=> '12345')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.otpSubmit(paymentId,{otp:'12345'}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "otp": "123456" +} + +paymentId = "pay_D5jmY2H6vC7Cy3"; + +Razorpay::Payment.otp_generate(paymentId, para_attr) + +```csharp: .NET + +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("otp", "123456"); + +Payment payment = client.Payment.OtpSubmit(paymentId, paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id": "pay_D5jmY2H6vC7Cy3", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +```json: Failure Response +{ + "error": { + "code" : "BAD_REQUEST_ERROR", + "description": "payment processing failed because of incorrect otp" + }, + "next": ["otp_submit", "otp_resend"] +} +``` + +After the payment is completed, the final response is posted to the URL given in `callback_url` of the request, and can then be verified. + +## Next Step + +The rest of the integration steps mentioned in the [S2S JSON V2 Cards Build Integration document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards.md) remain the same. No changes are required in those. + +After completing the build integration steps, you can continue with [Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/evm-sdk.md b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/evm-sdk.md new file mode 100644 index 00000000..06f6528c --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/evm-sdk.md @@ -0,0 +1,713 @@ +--- +title: 3DS 2 Migration Guide - EMV 3DS 2 SDK Cards Integration +description: Steps to integrate EMV 3DS 2 SDK and accept payments using cards. +--- + +# 3DS 2 Migration Guide - EMV 3DS 2 SDK Cards Integration + +You can integrate with Razorpay APIs to start accepting card payments. Razorpay APIs support the latest 3DS 2 authentication protocol. If you are an existing Razorpay user, that is, you integrated with our S2S APIs before October 15, 2022, you need to make certain integration changes to migrate to the 3DS 2 flow. + +> **WARN** +> +> +> **Watch Out!** +> +> You must have a PCI compliance certificate to enable this feature on your account. +> + +## EMV 3DS 2 SDK + +The 3DS 2 protocol mandates the integration of an EMV 3DS SDK for processing authentication via in-app flow. This SDK provides capabilities to authenticate processes in the native app UI without redirection to the bank ACS page for cardholder authentication. This improves the overall customer experience. EMV 3DS 2 authentication allows you to: + +- Collect and pass additional device data to Issuer ACS for risk assessment. In the case of cross-border payments, issuer ACS can use the data passed to decide between frictionless or challenge-based authentication flow. + + +> **WARN** +> +> +> **Watch Out!** +> +> RBI mandates the challenge flow in India, and hence the issuer cannot opt for frictionless authentication for Indian cards. +> + +- If the issuer decides to invoke the challenge-based authentication flow, then you can use the SDK to open the in-app native challenge page, to collect authentication details like OTP instead of redirecting the users. + +## Integration Steps + +Razorpay will provide a ready-to-use 3DS 2 SDK certified by **EMVCo**. You may use this SDK to process 3DS 2 payment providers, including Razorpay. The SDK-based flow will vary for both Challenge-based and Frictionless authentication flows. +- [Changes Required for Challenge Flow](#changes-required-for-challenged-flow) +- [Changes Required for Frictionless Flow](#changes-required-for-frictionless-payments) + +> **INFO** +> +> +> +> **Handy Tips** +> +> You may also develop the same and get the SDK certified with the **EMVCo**. +> + +## Changes Required for Challenged Flow + +1. [Pass additional parameter in Create a Payment API request](#1-pass-additional-parameter-in-create-a-payment-api-request). +2. [Collect Device Information](#2-collect-device-information). +3. [Submit Device Information to Razorpay](#3-submit-device-information-to-razorpay). +4. [Present the Challenge Flow to the Cardholder](#4-present-the-challenge-flow-to-the-cardholder). +5. [Verify Payment Status on Razorpay Server](#5-verify-payment-status-on-razorpay-server). + +### 1. Pass Additional Parameter in Create a Payment API request + +Pass the following additional parameter in the Create a Payment API request apart from the [existing parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/browser.md). + +```curl: Curl +curl -X POST \ +https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card":{ + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 2030, + "cvv": 100 + }, + "authentication":{ + "authentication_channel": "app" + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill" +} + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient instance = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 100); +paymentRequest.put("currency", "INR"); +paymentRequest.put("contact", "9900008989"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("order_id", "order_DPzFe1Q1dEOKed"); +paymentRequest.put("method", "card"); + +JSONObject card = new JSONObject(); +card.put("number", "4386289407660153"); +card.put("name", "Gaurav"); +card.put("expiry_month", "11"); +card.put("expiry_year", "2030"); +card.put("cvv", "100"); +paymentRequest.put("card", card); + +JSONObject authentication = new JSONObject(); +authentication.put("authentication_channel", "app"); +paymentRequest.put("authentication", authentication); + +paymentRequest.put("ip", "105.106.107.108"); +paymentRequest.put("referer", "https://merchansite.com/example/paybill"); + +Payment payment = instance.payments.createJsonPayment(paymentRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount", 100); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("contact", "9900008989"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("order_id", "order_DPzFe1Q1dEOKed"); +paymentRequest.Add("method", "card"); + +Dictionary card = new Dictionary(); +card.Add("number", "4386289407660153"); +card.Add("name", "Gaurav"); +card.Add("expiry_month", "11"); +card.Add("expiry_year", "30"); +card.Add("cvv", "100"); +paymentRequest.Add("card", card); + +Dictionary authentication = new Dictionary(); +authentication.Add("authentication_channel", "app"); +paymentRequest.Add("authentication", authentication); + +paymentRequest.Add("ip", "105.106.107.108"); +paymentRequest.Add("referer", "https://merchansite.com/example/paybill"); + +Payment payment = client.Payment.CreateJsonPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson(array('amount'=>100,'currency'=>'INR','contact'=>'9900008989','email'=>'gaurav.kumar@example.com','order_id'=>'order_DPzFe1Q1dEOKed','method'=>'card','card'=>array('number'=>'4386289407660153','name'=>'Gaurav','expiry_month'=>11,'expiry_year'=>2030,'cvv'=>100,),'authentication'=>array('authentication_channel'=>'app',),'ip'=>'105.106.107.108','referer'=>'https://merchansite.com/example/paybill',)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var data = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 2030, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "app" + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill" +}; + +instance.payments.createPaymentJson(data); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 2030, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "app" + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", +} + +Razorpay::Payment.create_json_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": map[string]interface{}{ + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 2030, + "cvv": 100, + }, + "authentication": map[string]interface{}{ + "authentication_channel": "app", + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", +} + +body, err := client.Payment.CreatePaymentJson(para_attr, nil) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card":{ + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 2030, + "cvv": 100 + }, + "authentication":{ + "authentication_channel": "app" + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill" +} + +client.payment.createPaymentJson(data) + +```json: Response +{ + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "submit_authentication_information", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/authentication_information" + "3DS2_data": { + "message_version": "2.2.0", + "directory_server_id": "A000000003", + "directory_server_public_key": "eyJrdHkiOiJSU0EiLCJlIjoiQVFBQiIsIm4iOiI4VFBxZkFQ" + } + } + ] +} +``` + +#### Request Parameters + +`authentication` +: `object` Details of the authentication channel. + + `authentication_channel` _mandatory_ + : `string` The authentication channel for the payment. In the case of SDK-based transaction, the possible value is `app`. For all other cases, it can be `browser`. + +#### Response Parameters + +`message_version` +: `string` The exact protocol version supported by the card. + +`directory_server_id` +: `string` This is threeDSServerTransID sent by the ACS. + +`directory_server_public_key` +: `string` Public key for performing authentication. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. + + `url` + : `string` URL to be used for the action indicated. + +### 2. Collect Device Information + +When you get the action as `submit_3ds_device_information`, you will need to start the device fingerprinting process using the 3DS 2 SDK. There are two ways: +1. Using Razorpay's EMVCo SDK +2. Using Direct EMVCo SDK + +#### Using Razorpay EMVCo SDK + +Follow these steps to initiate the SDK call to collect 3DS 2 device information: + +1. Initiate the `get_device_information` method on Razorpay SDK. Razorpay SDK will make required calls to the inherent 3DS 2 SDK. +2. Using the response received in payment create API, pass the following parameters to the `get_device_information` method: + 1. `directory_server_id` + 2. `message_version` + 3. `directory_server_public_key` +3. The `get_device_information` method will return the below parameters. You need to pass the same to Razorpay in the next API call. The parameters are: + 1. `sdk_app_id` + 2. `sdk_transaction_id` + 3. `sdk_ephemeral_public_key` + 4. `device_date` + 5. `message_version` + +#### Using Direct EMVCo SDK + +Follow these steps to initiate the SDK call to collect 3DS 2 device information: + +1. Create instances of ConfigParameters, locale, and UiCustomization for initialization by passing the `directory_server_id`, and the `directory_server_public_key` parameters returned during the payment create response. +2. Call the initialise method to initialise the 3DS SDK during the App startup as a background task or when a transaction is initiated. +3. Call the `createTransaction` method on SDK by passing the `directory_server_id` parameter returned during the payment create response. +4. Call the `getProgressView` method on the SDK. This step shows a processing screen to the cardholder. +5. Call the `getAuthenticationRequestParameters` method on the SDK and obtain the `AuthenticationRequestParameters` object that contains the following: + 1. `sdkAppId` + 2. `sdkTransactionID` + 3. `sdkEphemeralPublicKey` + 4. `sdkReferenceNumber` + 5. `deviceData` + 6. `messageVersion` + +You will pass this information on to Razorpay to process the authentication request. + +### 3. Submit Device Information to Razorpay + +Once the data is collected using the above steps: +1. Make an API call from your backend to submit device data to Razorpay. +2. Razorpay will initiate an authentication request. If the issuer bank mandates a challenge flow, then a challenge flow would be required. +3. If the issuer bank approves frictionless flow, you will receive a successful payment message in the response. + +#### Sample Code + +Given below is the sample code: + +```curl: Request +curl -X POST "https://api.razorpay.com/v1/payments/pay_FVmAtLUe9XZSGM/authentication_information" \ + -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -H "Content-Type: application/json" \ + -d '{ + "authentication": { + "3DS2_data": { + "device_information": { + "sdk_app_id": "9063b12c-fcde-43c7-b28e-8d0af5520e8a", + "sdk_transaction_id": "9063b12c-fcde-43c7-b28e-8d0af5520e8a", + "sdk_encrypted_data": "", + "sdk_reference_number": "3DS_LOA_SDK_ADBV_739485_94783", + "sdk_ephermal_public_key": { + "crv": "P-256", + "kty": "EC", + "x": "LYImJkRzS92vogM6AUPCBhJ20VagSe8IL0Q9SdisUSo", + "y": "Rav4sKHnLUIUHVdyR4dyV7G2_EeAnuCn_6621ZhqZYU" + } + }, + "authentication_channel": "app", + "auth_step": "3ds2Auth" + } + } + }' +```json: Response +{ + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "initiate_challenge_via_sdk", + "3DS2_data": { + "threeDSServerTransID": "xxxx", + "acs_transaction_id": "xxxx", + "acs_reference_number": "xxxx", + "acs_signed_content": "xxxx", + "acs_rendering_type": "xxxx" + }, + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/" + } + ] +} +``` + +#### Request Parameters + +`sdk_app_id` _mandatory_ +: `string` App id used by ACS/DS to identify the transaction. + +`sdk_transaction_id` _mandatory_ +: `string` Transaction id used by ACS/DS to identify the transaction. + +`sdk_encrypted_data` _mandatory_ +: `string` Encrypted response data sent by DS via ACS. + +`sdk_reference_number` _mandatory_ +: `string` Reference number used by ACS/DS to identify the transaction. + +`sdk_ephemeral_public_key` _mandatory_ +: `object` This is the public key used to decrypt the sdk_encrypted_data at our data at our end. It should contain the below fields. + + `crv` _mandatory_ + : `string` Indicates the curve. + + `kty` _mandatory_ + : `string` Indicates the key type. + + `x` _mandatory_ + : `string` X coordinate of the curve. + + `y` _mandatory_ + : `string` Y coordinate of the curve. + +`authentication_channel` _mandatory_ +: `string` This value is used for processing the transaction as an sdk-based flow. The constant value should be **app** for the SDK transaction. + +`auth_step` _mandatory_ +: ` string` This value is an indicator for Razorpay to process the authenticate the payment. + +#### Response Parameters + +`threeDSServerTransID` +: `string` Sent by DS via ACH to check the validation of the transaction at each step. + +`acs_transaction_id` +: `string` Transaction id used by ACS to identify the transaction. + +`acs_reference_number` +: `string` Reference number used by ACS to identify the transaction. + +`acs_signed_content` +: ` string` Signed (encrypted) response sent by ACS. + +`acs_rendering_type` +: `string` Contains Layout rendering information. + +> **WARN** +> +> +> +> **Watch Out!** +> +> - `initiate_challenge_via_sdk` indicates that the issuer bank has requested a challenge flow. +> - This challenge flow has to be processed via SDK. +> + +### 4. Present the Challenge Flow to the Cardholder + +In the previous API, if you receive the value of `action` as `initiate_challenge_via_sdk`, it means that the challenge flow is required. +There are two ways you can use the SDK to process the challenge flow: +1. Using Razorpay's EMVCo SDK +2. Using Direct EMVCo SDK + +#### Using Razorpay EMVCo SDK + +Given below is the SDK call to be made to collect 3DS 2 device information: + +1. Initiate the `process_challege` method. +2. Provide the data received in the previous API response to the SDK. The parameters required are: + 1. `directory_server_transaction_id` + 2. `acs_transaction_id` + 3. `acs_reference_number` + 4. `acs_signed_content` + 5. `3ds_requestor_app_url` + +> **INFO** +> +> +> **Handy Tips** +> +> `3ds_requestor_app_url`- You will not get this parameter in the API response, and you need to pass your app redirection URL to this parameter. +> + + 6. `challenge_status` + +#### Using Standalone EMVCo SDK + +Given below is the SDK call to be made to collect 3DS 2 device information: + +1. Create an instance of `ChallengeParameters`. +2. You will need to call the `dochallenge` method. +3. Your app provides the following to the SDK: + 1. `directory_server_transaction_id` + 2. `acs_transaction_id` + 3. `acs_reference_number` + 4. `acs_signed_content` + 5. `3ds_requestor_app_url` + 6. `challenge_status` +4. Call the `cleanup` method to free up resources. + +### 5. Verify Payment Status on Razorpay Server + +You can use your existing integration to verify payment status. Such as: +1. [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. This API needs to be hit in a cron job, as payment will get authorized once this API is hit for the first time. And the payment status change will show up on subsequent calls. +2. Listening to payment callback events or webhooks. + +## Changes Required for Frictionless Flow + +1. [Pass additional parameter in Create a Payment API](#1-pass-additional-parameter-in-create-a-payment-api-request) +2. [Collect Device Information](#2-collect-device-information) +3. [Submit Device Information](#3-submit-device-information-to-razorpay) + +Ensure you make the following changes in your Create a Payment API request. + +### 1. Pass Additional Parameter in Create a Payment API Request. + +Pass the following additional parameter in the Create a Payment API request apart from the existing request parameters. + +```curl: Request +curl -X POST \ +https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card":{ + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 2030, + "cvv": 100 + }, + "authentication":{ + "authentication_channel": "app" + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill" +}' +```json: Response +{ + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "submit_authentication_information", + "url": "https://api.razorpay.com/v1/payments/FVmAtLUe9XZSGM/3ds2_device_information" + "3DS2_data": { + "message_version": "2.2.0", + "directory_server_id": "A000000003", + "directory_server_public_key": "eyJrdHkiOiJSU0EiLCJlIjoiQVFBQiIsIm4iOiI4VFBxZkFQ" + } + } + ] +} +``` + +#### Request Parameters + +`authentication` +: `object` Details of the authentication channel. + + `authentication_channel` _mandatory_ + : `string` The authentication channel for the payment. For SDK-based transactions, the possible value is `app`. For all other cases, it can be `browser`. + +#### Response Parameters + +`network` +: `string` The card's network value. + +`message_version` +: `string` The exact protocol version supported by the card. + +`directory_server_id` +: `string` This is the threeDSServerTransID sent by the ACS. + +`directory_server_public_key` +: `string` Public key for performing authentication. + +### 2. Collect Device Information + +When you get the action as `submit_3ds_device_information`, you will need to start the device fingerprinting process using the 3DS 2 SDK. You will call the SDK commands as given below: +There are two ways: +1. Using Razorpay's EMVCo SDK +2. Using Direct EMVCo SDK + +#### Using Razorpay EMVCo SDK + +Follow these steps to initiate the SDK call to collect 3DS 2 device information: + +1. Initiate the `get_device_information` method on Razorpay SDK. Razorpay SDK will make required calls to the inherent 3DS 2 SDK. +2. Using the response received in payment create API, pass the following parameters to the `get_device_information` method: + 1. `directory_server_id` + 2. `message_version` + 3. `directory_server_public_key` +3. The `get_device_information` will return the below parameters, and you need to pass the same to Razorpay in the next API call. + 1. `sdk_app_id` + 2. `sdk_transaction_id` + 3. `sdk_ephemeral_public_key` + 4. `sdk_reference_number` + 5. `device_date` + 6. `message_version` + +#### Using Direct EMVCo SDK + +Follow these steps to initiate the SDK call to collect 3DS 2 device information: + +1. Create instances of ConfigParameters, locale, and UiCustomization for initialisation by passing the `directory_server_public_key` parameters returned Payment Create response. +2. Call the initialise method to initialise the 3DS SDK during App startup as a background task or when a transaction is initiated. +3. Call the `createTransaction` method on SDK by passing the `directory_server_id` parameter returned in the payment create response. +4. Call the `getProgressView` method on the SDK. This step shows a processing screen to the cardholder. +5. Call the `getAuthenticationRequestParameters` method on the SDK and obtain the `AuthenticationRequestParameters` object that contains: + 1. `sdk_app_id` + 2. `sdk_transaction_id` + 3. `sdk_ephemeral_public_key` + 4. `sdk_reference_number` + 5. `device_data` + 6. `message_version` + +You will pass this information on to Razorpay to process the authentication request. + +### 3. Submit Device Information to Razorpay + +Once the data is collected using the above steps: +1. Make an API call from your backend to submit the device data to Razorpay. +2. Razorpay will initiate an authentication request. If the issuer bank mandates a challenge flow, then a challenge flow would be required. +3. If issuer banks approve frictionless flow, then you will get a payment successful message for the following request: + +#### Sample Code + +Given below is the sample code: + +```curl: Request +curl -X POST "https://api.razorpay.com/v1/payments/FVmAtLUe9XZSGM/authentication_information" \ + -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -H "Content-Type: application/json" \ + -d '{ + "authentication": { + "3DS2_data": { + "device_information": { + "sdk_app_id": "9063b12c-fcde-43c7-b28e-8d0af5520e8a", + "sdk_transaction_id": "9063b12c-fcde-43c7-b28e-8d0af5520e8a", + "sdk_encrypted_data": "", + "sdk_referenceNumber": "3DS_LOA_SDK_ADBV_739485_94783", + "sdk_ephermal_public_key": { + "crv": "P-256", + "kty": "EC", + "x": "LYImJkRzS92vogM6AUPCBhJ20VagSe8IL0Q9SdisUSo", + "y": "Rav4sKHnLUIUHVdyR4dyV7G2_EeAnuCn_6621ZhqZYU" + } + }, + "authentication_channel": "app", + "auth_step": "3ds2Auth" + } + } + }' +```json: Response +{ + "razorpay_payment_id": "pay_D5jmY2H6vC7Cy3", + "razorpay_order_id": "order_9A33XWu170gUtm", +"razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +#### Request Parameters + +`id` _mandatory_ +: `string` Unique identifier of the payment. + +`sdk_app_id` _mandatory_ +: `string` App id used by ACS/DS to identify the transaction + +`sdk_transaction_id` _mandatory_ +: `string` Transaction id used by ACS/DS to identify the transaction. + +`sdk_encrypted_data` _mandatory_ +: `string` Encrypted Response Data sent by DS via ACH. + +`sdk_reference_number` _mandatory_ +: `string` Reference number used by ACS/DS to identify the transaction. + +`sdk_ephemeral_public_key` _mandatory_ +: `string` This is the public key used to decrypt the sdk_encrypted_data at our end. It should contain the below fields. + + `crv` _mandatory_ + : `string` curve. + + `kty` _mandatory_ + : `string` key type. + + `x` _mandatory_ + : `string` x coordinate of the curve. + + `y` _mandatory_ + : `string` y coordinate of the curve. + +`authentication_channel` +: `string` Constant value should be **app** for sdk trx. This value is used for processing the transaction as a sdk-based flow. + +`auth_step` +: `string` Constant value should be **3ds2Auth**. This value is an indicator for Razorpay to process the authentication on the payment. + +The above response indicates that the issuer bank has approved a frictionless payment flow. You can show a successful payment response to the customer. diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/migrate-3ds2.0.md b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/migrate-3ds2.0.md new file mode 100644 index 00000000..35c2149c --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/migrate-3ds2.0.md @@ -0,0 +1,59 @@ +--- +title: 3DS2 Migration Guide for Existing S2S Cards Integration +description: If you integrated with our APIs before October 15, 2022, you should make the following changes to your integration to accept card payments with the 3DS2 protocol. +--- + +# 3DS2 Migration Guide for Existing S2S Cards Integration + +If you integrated with our S2S APIs before October 15, 2022, you must make the following changes to your integration to accept card payments with the 3DS2 authentication protocol. + +> **WARN** +> +> +> +> **Watch Out!** +> +> You must have a PCI compliance certificate to get this feature enabled on your account. +> + +## 3DS2 Authentication + +3DS2 is an authentication protocol, the successor of 3DS1, that enables businesses and payment providers to send additional information (such as customer device or browser data) to verify the transaction's authenticity. Razorpay integration is compliant with the 3DS2 protocol. + +**Know more**: Razorpay supports [3DS2 transactions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cards/3ds2.0.md). + +The customer's bank evaluates the transaction for risk and decides on the payment flow. + +- **Frictionless Flow**: This flow is activated if the bank determines that the transaction is from a trusted device and allows the payment to go through without any additional authentication from the customer. + +Currently, this would not be applicable in India for domestic payments as RBI mandates OTP-based authentication. For international payments, this flow is viable. + +- **Challenge Flow**: This flow is activated if the bank determines that the transaction is not from a trusted device and needs additional information. The customer needs to perform additional authentication steps. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Integration does not differ for the challenge flow or the frictionless flows. +> - Frictionless flow is not applicable for payments on cards issued in India. +> + +Given below is a diagram that explains the 3DS2 flow: + +![Cards 3DS2 Protocol](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-3ds-flowchart.jpg.md) + +## Choose Payment Processing Method + +There are two methods to process the payments: + +1. **Process all payments as browser payments**: + +This process does not require additional integration of the EVM 3DS 2 SDK. You can pass additional browser parameters in your [existing API integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/browser.md). There will not be any changes in the payments flow and the API responses. + +2. **Process all payments as browser and app payments**: + +You can process web-initiated payments as browser payments and app-initiated payments as native app payments. You need to make the changes as mentioned [here to make browser payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/evm-sdk.md). For payments originating from your app, you need to make the following changes: + - Integrate EMV 3DS 2 SDK for both Android and iOS apps. + - API Integration. diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/fpx.md b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/fpx.md new file mode 100644 index 00000000..4e872dd6 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/fpx.md @@ -0,0 +1,490 @@ +--- +title: FPX +description: Steps to integrate S2S JSON API and accept payments using FPX. +--- + +# FPX + +Financial Process Exchange (FPX) is an online banking payment method that allows end users to pay money directly from their bank account for all online transactions. + +## Integration Steps + +Follow the steps below to Razorpay Curlec S2S JSON API and accept payments using FPX. + +**1.1** [Generate List of Banks Supporting FPX](#11-generate-the-list-of-banks-supporting-fpx) + +**1.2** [Create an Order](#12-create-an-order) + +**1.3** [Create a Payment](#13-create-a-payment) + +**1.4** [Handle Payment Success and Error Events](#14-handle-payment-success-and-error-events) + +**1.5** [Integrate Payments Rainy Day Kit](#15-integrate-payments-rainy-day-kit) + +**1.6** [Fetch Payment Details and Verify Payment Status](#16-fetch-payment-details-and-verify-payment-status) + +### 1.1 Generate the List of Banks Supporting FPX + +The first step is identifying and getting the list of banks with their respective codes to integrate correctly. Razorpay Curlec uses its bank codes to correctly identify a bank entity in the system. + +> **INFO** +> +> +> **Handy Tips** +> +> FPX transactions are of two categories: B2B and B2C. We follow a nomenclature of suffixing `_C` as a parameter if the transaction is of a corporate type. +> + +Use this endpoint to get the list of Banks and their respective codes: + +```curl: Request +curl --location --request GET 'https://api.razorpay.com/v1/methods?key_id={MERCHANT_API_KEY}' + +```json: Response +{ + "entity": "methods", + "fpx": { + "PHBM": "Affin Bank", + "PHBM_C": "AFFINMAX", + "MFBB_C": "Alliance Bank (Business)", + "MFBB": "Alliance Bank (Personal)", + "ARBK": "AmBank", + "ARBK_C": "AmBank", + "AGOB": "AGRONet", + "AGOB_C": "AGRONetBIZ", + "BNPA_C": "BNP Paribas", + "BIMB_C": "Bank Islam", + "BIMB": "Bank Islam", + "BKRM_C": "i-bizRakyat", + "BKRM": "Bank Rakyat", + "BMMB_C": "Bank Muamalat", + "BMMB": "Bank Muamalat", + "BKCH": "Bank Of China", + "BSNA": "BSN", + "CIBB_C": "CIMB Bank", + "CIBB": "CIMB Clicks", + "CITI_C": "Citibank Corporate Banking", + "DEUT_C": "Deutsche Bank", + "HSBC_C": "HSBC Bank", + "HSBC": "HSBC Bank", + "HLBB_C": "Hong Leong Bank", + "HLBB": "Hong Leong Bank", + "KFHO_C": "KFH", + "KFHO": "KFH", + "MBBE_C": "Maybank2E", + "MBBE": "Maybank2E", + "MB2U": "Maybank2U", + "OCBC_C": "OCBC Bank", + "OCBC": "OCBC Bank", + "PBBE_C": "Public Bank", + "PBBE": "Public Bank", + "PBBN_C": "PB Enterprise", + "RHBB_C": "RHB Bank", + "RHBB": "RHB Bank", + "SCBL_C": "Standard Chartered", + "SCBL": "Standard Chartered", + "UOVB": "UOB Bank", + "UOVB_C": "UOB Regional" + } +} +``` + +### 1.2 Create an Order + +To process a payment, create a Razorpay Curlec Order to correspond with the order in your system. Send the order request parameters to the following endpoint: + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +### 1.3 Create a Payment + +Once an order is created, your next step is to create a payment. The following API will create a payment with `fpx` as the payment method: + +/payments/create/json + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "content-type: application/json" \ +-d '{ + "amount": 200, + "currency": "MYR", + "order_id": "order_LSA6ny1sGKAp0C", + "email": "nur.aisyah@example.com", + "contact": "+60123456789", + "method": "fpx", + "bank": "MB2U", + "callback_url": "https://merchant_callback_url.." +}' + +```json: Response +{ + "razorpay_payment_id": "pay_LUtJxInEqa0oAA", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/LUtJxInEqa0oAA/authenticate" + } + ] +} +``` + +### Request Parameters + +The payment request for each of the supported payment methods will slightly vary. Know more about the [relevant payment request fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md). + +### Response Parameters + +If the payment request is valid, the response contains the following fields. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. Possible values: + - `redirect` : Use this URL to redirect customer to submit the OTP on the bank page. + + `url` + : `string` URL to be used for the action indicated. + +The Payment API will return the payment id along with the authentication URL to which the user has to be redirected. You may choose to store the Payment id on your server to help us enquire about the status and other accounting purposes if required. + +You may now choose to redirect the user to the authentication URL that you have received in the response. + +### 1.4 Handle Payment Success and Error Events + +Once the payment is completed by the customer, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + +#### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_LUtJxInEqa0oAA&", + "razorpay_order_id": "order_LUtJ52zWwapfqs&", + "razorpay_signature": "e617a6c035cb39feb6cd16358d83a4e3d30b11d9e8e2181e6ef442da1d41df20" +} +``` + +#### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#errors) for details. + +### 1.5 Integrate Payments Rainy Day Kit + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + +### 1.6 Fetch Payment Details and Verify Payment Status + +After receiving the `razorpay_payment_id` through the `callback_url`, use this endpoint to fetch the payment details: + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/pay_LUuOjDOkeb63gS \ + +```json: Response +{ + "id": "pay_LUuOjDOkeb63gS", + "entity": "payment", + "amount": 100, + "currency": "MYR", + "base_amount": 100, + "status": "captured", + "order_id": "order_LUuObyEK6ix6TZ", + "invoice_id": null, + "international": false, + "method": "fpx", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "MB2U", + "wallet": null, + "vpa": null, + "email": "nur.aisyah@example.com", + "contact": "+6012345678", + "notes": { + "notes_key_1": "Nasi Lemak" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1679562035 +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/international-cards/e-commerce.md b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/international-cards/e-commerce.md new file mode 100644 index 00000000..3b8c4d1c --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/international-cards/e-commerce.md @@ -0,0 +1,1553 @@ +--- +title: 1. Build Integration for International Cards (E-commerce) +description: Steps to integrate S2S JSON API and accept payments using international cards, with Razorpay Chargeback Guarantee Program. +--- + +# 1. Build Integration for International Cards (E-commerce) + +You can integrate with Razorpay APIs to start accepting international card payments. + +Razorpay Chargeback Guarantee Program on international cards safeguards businesses from fraud chargeback. Businesses provide additional category-specific details to enhance our risk model's ability to detect risky transactions. Razorpay uses this information to enhance risk assessment for international cards, aiming to achieve the highest success rate while minimising fraud. + +> **WARN** +> +> +> **Watch Out!** +> +> - Category-specific risk rules will not be effective unless you provide additional details. +> +> - You must have a PCI compliance certificate to enable this feature on your account. +> + +## Integration Steps + +Follow the steps given below to integrate S2S JSON API with browser flow and accept payments using cards. + +**1.1** [Integrate Razorpay Shield JS](#11-integrate-razorpay-shield-js) + +**1.2** [Create Order and Payment](#12-create-order-and-payment) + +**1.3** [Handle Payment Success and Error Events](#13-handle-payment-success-and-error-events) + +**1.4** [Verify Payment Signature](#14-verify-payment-signature) + +**1.5** [Integrate Payments Rainy Day Kit](#15-integrate-payments-rainy-day-kit) + +**1.6** [Verify Payment Status](#16-verify-payment-status) + +### 1.1 Integrate Razorpay Shield JS + +Integrate SHIELD JS and pass session_id in [Create Order and Payment](#12-create-order-and-payment). + +```Curl: JavaScript + +// later, at the time of payment initialization: +const checkout_session_id = await RazorpayShield.getCheckoutSessionId() // pass it to your backend + +``` + +### 1.2 Create Order and Payment + +This step demonstrates creating an Order and processing a Payment using Razorpay APIs. Depending on your integration type, you can choose between: + + +### 1. Consolidated Order and Payment API + + Create an order along with payment using the consolidated order and payment API. This single API call combines order and payment creation, resulting in a more efficient and faster transaction process. + + Create an order along with payment by: + + - Making a single API call to Razorpay, combining order and payment creation. + - Authenticating using the provided credentials, ensuring access to the consolidated payment API. + - Manually integrating the API sample codes on your server. + + The following API will create an order along with payment with `card` as the payment method: + + /orders + + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/orders + -U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -H 'content-type:application/json' + -d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "partial_payment": false, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "shipping_details": { + "method": "sameday", + "gift_wrap": false + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "e_commerce", + "sku": "1gr367", + "name": "TEST", + "description": "TEST", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "e_commerce": { + "other_product_codes": { + "upc": "12r34", + "ean": "123r4", + "unspsc": "123s4" + } + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "payment": { + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "callback_url": "https://merchant_callback_url..", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100", + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "State": "Karnataka", + "zipcode": "560032" + } + }, + "authentication": { + "authentication_channel": "browser" + }, + "device_fingerprint": { + "checkout_session_id": "qwerty12345", + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100, + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" + }, + "ip": "105.106.107.108" + } + } + }' + ``` + + + + ```json: Response + { + "amount": 50000, + "amount_due": 50000, + "amount_paid": 0, + "attempts": 9, + "created_at": 1706507580, + "currency": "INR", + "entity": "order", + "id": "order_NUJs9C1Luflzts", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "payment_workflow": { + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/O0NFUyIwNNHO9F/authenticate" + } + ], + "razorpay_payment_id": "pay_O0NFUyIwNNHO9F" + }, + "receipt": "receipt#1111", + "status": "attempted" + } + ``` + + + + + Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _optional_ + : `json object` Details about the customer/user. + + `name` _optional_ + : `string` The customer’s name. For example, Gaurav Kumar. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, +919000090000. + + `email` _optional_ + : `string` The customer’s email address. For example, gaurav.kumar@example.com. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the merchant platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the merchant platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, 1234567890. + + `shipping_address` _optional_ + : `json object` This will have details about the order's shipping address. + + `line1` _optional_ + : `string` Address Line 1 of the address + + `line2` _optional_ + : `string` Address Line 2 of the address + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560068`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `billing_address` _optional_ + : `json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `shipping_details` _optional_ + : `json object` This will have the order's shipping details. + + `method` _optional_ + : `enum` Shipping method for the product. Possible values: + - `lowcost`: Lowest-cost service. + - `sameday`: Courier or same-day service. + - `oneday`: Next-day or overnight service. + - `twoday`: Two-day service. + - `threeday`: Three-day service. + - `pickup`: Store pick-up. + - `other`: Other shipping method. + - `none`: No shipping method because the product is a service or subscription. + + `gift_wrap` _optional_ + : `boolean` Indicates whether the customer requested gift wrapping for this purchase. This field can contain one of the following values: + - `true`: The customer requested gift wrapping. + - `false`: The customer did not request gift wrapping. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `sku` _optional_ + : `string ` The unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business runs a discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `e_commerce` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `other_product_codes` _optional_ + : `object` Array to collect different codes that can identify the item type. Possible values: + + `upc` + : `string` Universal Product Code (UPC; redundantly: UPC code) is a barcode symbology used worldwide to track trade items in stores. UPC consists of 12 numeric digits that are uniquely assigned to each trade item + + `ean` + : `string` European Article Numbers (EAN) is a type of barcode that encodes an article number. Contains 8 (EAN-8) or 13 (EAN-13) numerical digits. + + `unspsc` + : `string` The United Nations Standard Products and Services Code (UNSPSC) is a taxonomy of products and services used in eCommerce. It is a four-level hierarchy coded as an eight-digit number, with an optional fifth level adding two more digits. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `JSON object` Details of the campaign. *Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, `PQR12453`. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Example values: `google`, `newsletter`. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: `cpc`, `banner`, etc. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `payment` _mandatory_ + : `json object` Details about the payment. + + `contact` _mandatory_ + : `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `callback_url` _optional_ + : `string` URL endpoint where Razorpay will submit the final payment status. + + `method` _mandatory_ + : `string` Name of the payment method. Possible value is `card`. + + `card` _mandatory_ + : `object` Details associated with the card. + + `number` + : `string` Unformatted card number. + + `name` + : `string` Name of the cardholder. + + `expiry_month` + : `integer` Expiry month for the card in `MM` format. + + `expiry_year` + : `string` Expiry year for the card in `YY` format. + + `cvv` + : `string` CVV printed on the back of the card. + + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + + `billing_address` _optional_ + : `json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` zipcode of the state. For example, `560001`. + + `authentication` _optional_ + : `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + + `device_fingerprint` _mandatory_ + : `string` Details of the device fingerprint. + + `checkout_session_id` _mandatory_ + : `object` id of the checkout entity that is created. + + `browser` _mandatory_ + : `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `referrer` _optional_ + : `string` Referrer header passed by the client's browser. + + `user-agent` _mandatory_ + : `string` The User-Agent header of the user's browser. The default value will be passed by Razorpay if not provided by you. + + `ip` _mandatory_ + : `string` The customer's IP address. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` Indicates the next step to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the bank page. + + `url` + : `string` URL to be used for the action indicated. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + +### 2. Separate Order and Payment APIs + + If you are using separate APIs to create Order and process Payment, follow the steps given below: + + + + Step 1: Create an Order + + Use the Orders API to create an order before initiating a payment. + + /orders + + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/orders + -U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -H 'content-type:application/json' + -d '{ + "amount": 10000, + "currency": "INR", + "receipt": "receipt#1111", + "partial_payment": false, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "shipping_details": { + "method": "sameday", + "gift_wrap": false + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "e_commerce", + "sku": "1gr367", + "name": "TEST", + "description": "TEST", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "e_commerce": { + "other_product_codes": { + "upc": "12r34", + "ean": "123r4", + "unspsc": "123s4" + } + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value1", + "key2": "value2" + } + }' + ``` + + + + ```json: Response + { + "amount": 10000, + "amount_due": 10000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1737699908, + "currency": "INR", + "entity": "order", + "id": "order_PnBGZvFBDU81VZ", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "receipt": "receipt#11111", + "status": "created" + } + ``` + + + + + Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _optional_ + : `json object` Details about the customer/user. + + `name` _optional_ + : `string` The customer’s name. For example, Gaurav Kumar. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, +919000090000. + + `email` _optional_ + : `string` The customer’s email address. For example, gaurav.kumar@example.com. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the merchant platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the merchant platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, 1234567890. + + `shipping_address` _optional_ + : `json object` This will have details about the order's shipping address. + + `line1` _optional_ + : `string` Address Line 1 of the address + + `line2` _optional_ + : `string` Address Line 2 of the address + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560068`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `billing_address` _optional_ + : `json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `shipping_details` _optional_ + : `json object` This will have the order's shipping details. + + `method` _optional_ + : `enum` Shipping method for the product. Possible values: + - `lowcost`: Lowest-cost service. + - `sameday`: Courier or same-day service. + - `oneday`: Next-day or overnight service. + - `twoday`: Two-day service. + - `threeday`: Three-day service. + - `pickup`: Store pick-up. + - `other`: Other shipping method. + - `none`: No shipping method because the product is a service or subscription. + + `gift_wrap` _optional_ + : `boolean` Indicates whether the customer requested gift wrapping for this purchase. This field can contain one of the following values: + - `true`: The customer requested gift wrapping. + - `false`: The customer did not request gift wrapping. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `sku` _optional_ + : `string ` The unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business runs a discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `e_commerce` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `other_product_codes` _optional_ + : `object` Array to collect different codes that can identify the item type. Possible values: + + `upc` + : `string` Universal Product Code (UPC; redundantly: UPC code) is a barcode symbology used worldwide to track trade items in stores. UPC consists of 12 numeric digits that are uniquely assigned to each trade item + + `ean` + : `string` European Article Numbers (EAN) is a type of barcode that encodes an article number. Contains 8 (EAN-8) or 13 (EAN-13) numerical digits. + + `unspsc` + : `string` The United Nations Standard Products and Services Code (UNSPSC) is a taxonomy of products and services used in eCommerce. It is a four-level hierarchy coded as an eight-digit number, with an optional fifth level adding two more digits. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `json object` Details of the campaign. *Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, `PQR12453`. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Example values: `google`, `newsletter`. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: `cpc`, `banner`, etc. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + + +### Step 2: Create a Payment + + Once the order is created, pass the `order_id` from the Orders API response to the Payments API. + +/payments/create/json + +```curl: Request +curl -X POST \ +https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 10000, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_PrcuyJDT7uSwaf", + "callback_url": "https://merchant_callback_url..", + "method": "card", + "card": { + "number": "4111111111111111", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +}' + +``` + +```json: Response +{ + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/pg_router/v1/payments/pay_Ps0cnb0OrxFcSH/dcc_info" + } + ], + "razorpay_payment_id": "pay_Ps0cnb0OrxFcSH" +} +``` + + + + Request Parameters + + + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` Currency code for the currency in which you want to accept the payment. For example, INR. Refer to the list of supported currencies. The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + + + + + `order_id` _mandatory_ + : `string` Unique identifier of the Order. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `contact` _mandatory_ + : `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `method` _mandatory_ + : `string` Name of the payment method. Possible value is `card`. + + + + `card` _mandatory_ + : `object` Details associated with the card. + + `number` + : `string` Unformatted card number. + + `name` + : `string` Name of the cardholder. + + `expiry_month` + : `string` Expiry month for the card in MM format. + + `expiry_year` + : `string` Expiry year for the card in YY format. + + `cvv` + : `string` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + + + + + `user-agent` _mandatory_ + : `string` The User-Agent header of the user's browser. The default value will be passed by Razorpay if not provided by you. + + `ip` _mandatory_ + : `string` The customer's IP address. + + `authentication` _optional_ + : `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + + `browser` _mandatory_ + : `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `language` + : `string` Obtained from the payer's browser using the `navigator.language` HTML DOM property. Maximum limit of 8 characters. + + `notes` _optional_ + : `object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + + `callback_url` _optional_ + : `string` URL endpoint where Razorpay will submit the final payment status. + + `referrer` _optional_ + : `string` Referrer header passed by the client's browser. + + + +### Response Parameters + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` Indicates the next step to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the bank page. + + `url` + : `string` URL to be used for the action indicated. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + + + + + +### 1.3 Handle Payment Success and Error Events + +Once the payment is completed by the customer, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + +#### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +#### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) for details. + +### 1.4 Verify Payment Signature + +Signature verification is a mandatory step to ensure that the callback is sent by Razorpay. The `razorpay_signature` contained in the callback can be regenerated by your system and verified as follows. + +Create a string to be hashed using the `razorpay_payment_id` contained in the callback and the Order ID generated in the first step, separated by a `|`. Hash this string using SHA256 and your API Secret. + +``` +generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + +if (generated_signature == razorpay_signature) { + payment is successful +} +``` + +#### Generate Signature on your Server + + +### Sample code + +```java: Java +/** +* This class defines common routines for generating +* authentication signatures for Razorpay Webhook requests. +*/ +public class Signature +{ + private static final String HMAC_SHA256_ALGORITHM = "HmacSHA256"; + /** + * Computes RFC 2104-compliant HMAC signature. + * * @param data + * The data to be signed. + * @param key + * The signing key. + * @return + * The Base64-encoded RFC 2104-compliant HMAC signature. + * @throws + * java.security.SignatureException when signature generation fails + */ + public static String calculateRFC2104HMAC(String data, String secret) + throws java.security.SignatureException + { + String result; + try { + + // get an hmac_sha256 key from the raw secret bytes + SecretKeySpec signingKey = new SecretKeySpec(secret.getBytes(), HMAC_SHA256_ALGORITHM); + + // get an hmac_sha256 Mac instance and initialize with the signing key + Mac mac = Mac.getInstance(HMAC_SHA256_ALGORITHM); + mac.init(signingKey); + + // compute the hmac on input data bytes + byte[] rawHmac = mac.doFinal(data.getBytes()); + + // base64-encode the hmac + result = DatatypeConverter.printHexBinary(rawHmac).toLowerCase(); + + } catch (Exception e) { + throw new SignatureException("Failed to generate HMAC : " + e.getMessage()); + } + return result; + } +} + +```php: PHP +use Razorpay\Api\Api; +$api = new Api($key_id, $key_secret); +$attributes = array('razorpay_signature' => '23233', 'razorpay_payment_id' => '332' , 'razorpay_order_id' => '12122'); +$order = $api->utility->verifyPaymentSignature($attributes) + +```ruby: Ruby +require 'razorpay' +Razorpay.setup('key_id', 'key_secret') +payment_response = { + 'razorpay_order_id': '12122', + 'razorpay_payment_id': '332', + 'razorpay_signature': '23233' +} + +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET + Dictionary attributes = new Dictionary(); + + attributes.Add("razorpay_payment_id", paymentId); + attributes.Add("razorpay_order_id", Request.Form["razorpay_order_id"]); + attributes.Add("razorpay_signature", Request.Form["razorpay_signature"]); + + Utils.verifyPaymentSignature(attributes); +```nodejs: Node.js +var { validatePaymentVerification } = require('./dist/utils/razorpay-utils'); + +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); +```Go: Go +import ( + "crypto/hmac" + "crypto/sha256" + "crypto/subtle" + "encoding/hex" + "fmt" +) + +func main() { + signature := "477d1cdb3f8122a7b0963704b9bcbf294f65a03841a5f1d7a4f3ed8cd1810f9b" + secret := "qp3zKxwLZxbMORJgEVWi3Gou" + data := "order_J2AeF1ZpvfqRGH|pay_J2AfAxNHgqqBiI" + //fmt.Printf("Secret: %s Data: %s\n", secret, data) + + // Create a new HMAC by defining the hash type and the key (as byte array) + h := hmac.New(sha256.New, []byte(secret)) + + // Write Data to it + _, err := h.Write([]byte(data)) + + if err != nil { + panic(err) + } + + // Get result and encode as hexadecimal string + sha := hex.EncodeToString(h.Sum(nil)) + + fmt.Printf("Result: %s\n", sha) + + if subtle.ConstantTimeCompare([]byte(sha), []byte(signature)) == 1 { + fmt.Println("Works") + } +} +``` + + +### 1.5 Integrate Payments Rainy Day Kit + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + +### 1.6 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/international-cards/hotel.md b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/international-cards/hotel.md new file mode 100644 index 00000000..66cb6672 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/international-cards/hotel.md @@ -0,0 +1,1653 @@ +--- +title: 1. Build Integration for International Cards (Hotel) +description: Steps to integrate S2S JSON API and accept payments using international cards, with Razorpay Chargeback Guarantee Program. +--- + +# 1. Build Integration for International Cards (Hotel) + +You can integrate with Razorpay APIs to start accepting international card payments. + +Razorpay Chargeback Guarantee Program on international cards safeguards businesses from fraud chargeback. Businesses provide additional category-specific details to enhance our risk model's ability to detect risky transactions. Razorpay uses this information to enhance risk assessment for international cards, aiming to achieve the highest success rate while minimising fraud. + +> **WARN** +> +> +> **Watch Out!** +> +> - Category-specific risk rules will not be effective unless you provide additional details. +> +> - You must have a PCI compliance certificate to enable this feature on your account. +> + +## Integration Steps + +Follow the steps given below to integrate S2S JSON API with browser flow and accept payments using cards. + +**1.1** [Integrate Razorpay Shield JS](#11-integrate-razorpay-shield-js) + +**1.2** [Create Order and Payment](#12-create-order-and-payment) + +**1.3** [Handle Payment Success and Error Events](#13-handle-payment-success-and-error-events) + +**1.4** [Verify Payment Signature](#14-verify-payment-signature) + +**1.5** [Integrate Payments Rainy Day Kit](#15-integrate-payments-rainy-day-kit) + +**1.6** [Verify Payment Status](#16-verify-payment-status) + +### 1.1 Integrate Razorpay Shield JS + +Integrate SHIELD JS and pass session_id in [Create Order and Payment](#12-create-order-and-payment). + +```Curl: JavaScript + +// later, at the time of payment initialization: +const checkout_session_id = await RazorpayShield.getCheckoutSessionId() // pass it to your backend + +``` + +### 1.2 Create Order and Payment + +This step demonstrates creating an Order and processing a Payment using Razorpay APIs. Depending on your integration type, you can choose between: + + +### 1. Consolidated Order and Payment API + +Create an order along with payment using the consolidated order and payment API. This single API call combines order and payment creation, resulting in a more efficient and faster transaction process. + +Create an order along with payment by: + +- Making a single API call to Razorpay, combining order and payment creation. +- Authenticating using the provided credentials, ensuring access to the consolidated payment API. +- Manually integrating the API sample codes on your server. + +The following API will create an order along with payment with `card` as the payment method: + +/orders + +```curl: Request +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "partial_payment": false, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "hotel", + "sku": "1gr367", + "name": "Grand Palace Hotel", + "description": "2BHK villa", + "quantity": 2, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "hotel": { + "sub_type": "stay", + "checkin_date": "2019-07-16", + "checkout_date": "2019-07-16", + "property_type": "", + "star_rating": 5, + "brand": "Grand Mercure", + "address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "class": "business", + "identity": { + "unique_national_id": "ABCDE1234Z", + "tax_id": "ABCDE1234Z" + } + }, + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "class": "business", + "identity": { + "unique_national_id": "ABCDE1234Z", + "tax_id": "ABCDE1234Z" + } + } + ] + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "payment": { + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "callback_url": "https://merchant_callback_url..", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100", + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "State": "Karnataka", + "zipcode": "560032" + } + }, + "authentication": { + "authentication_channel": "browser" + }, + "device_fingerprint": { + "checkout_session_id": "qwerty12345", + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100, + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" + }, + "ip": "105.106.107.108" + } + } +}' +``` + +```json: Response +{ + "amount": 50000, + "amount_due": 50000, + "amount_paid": 0, + "attempts": 11, + "created_at": 1706507580, + "currency": "INR", + "entity": "order", + "id": "order_NUJs9C1Luflzts", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "payment_workflow": { + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/O0NTY9HhENv91s/authenticate" + } + ], + "razorpay_payment_id": "pay_O0NTY9HhENv91s" + }, + "receipt": "receipt#1111", + "status": "attempted" +} +``` + + + Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _optional_ + : `json object` Details about the customer/user. + + `name` _optional_ + : `string` The customer’s name. For example, Gaurav Kumar. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, +919000090000. + + `email` _optional_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the merchant platform. For example, `22`. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the merchant platform. For example, `4`. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, 1234567890. + + `billing_address` _optional_ + : `json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e-commerce` + - `mutual_fund` + + `sku` _optional_ + : `string ` unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business is running any discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `hotel` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `sub_type` _optional_ + : `enum` The sub-type of the line item. Possible values: + - `stay` + - `breakfast` + - `dinner` + - `lunch` + - `early_checkin` + - `late_chechout` + - `others` + + `checkin_date` _optional_ + : `string` Represents an ISO 8601-encoded date string. For example, September 7, 2019 is represented as `2019-07-16`. + + `checkout_date` _optional_ + : `string` Represents an ISO 8601-encoded date string. For example, September 7, 2019 is represented as `2019-07-16`. + + `property_type` _optional_ + : `string` Represents the type of the property. Possible values: + - `resort` + - `hostel` + - `hotel` + - `inn` + - `lodge` + - `motel` + - `apartment` + - `bed_and_breakfast` + - `tent` + - `villa` + + `star_rating` _optional_ + : `integer` Denotes the star rating of the property. Possible values: 1 to 7. + + `brand` _optional_ + : `string` Brand name of the property. For example, Marriott Group. + + `address` _optional_ + : `json object` Details of the property address. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `travellers` _optional_ + : `JSON object` Details associated with passengers/travellers/beneficiaries. + + `name` _optional_ + : `string` Name of the passenger/traveler/beneficiary. + + `email` _optional_ + : `string` Email address of the passenger/traveler/beneficiary. + + `contact` _optional_ + : `JSON object` Details associated with passengers/travelers/beneficiaries. + + `age` _optional_ + : `integer` UNIX timestamp of the date of birth of the individual. For example, 1234567890. + + `class` _optional_ + : `string` Type of the flight ticket. Possible values: + - `Business` + - `Suite` + - `Premium` + - `Deluxe` + - `Standard` + + `identity` _optional_ + : `JSON object` Identity details of the passenger/beneficiary. + + `unique_national_id` _optional_ + : `string` National ID number. For example, Adhaar number for India. + + `tax_id` _optional_ + : `string` Passport number of the individual. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `JSON object` Details of the campaign. *Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, `PQR12453`. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Example values: `google`, `newsletter`. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: `cpc`, `banner`, etc. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `payment` _mandatory_ + : `json object` Details about the payment. + + `contact` _mandatory_ + : `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `callback_url` _optional_ + : `string` URL endpoint where Razorpay will submit the final payment status. + + `method` _mandatory_ + : `string` Name of the payment method. Possible value is `card`. + + `card` _mandatory_ + : `object` Details associated with the card. + + `number` _mandatory_ + : `string` Unformatted card number. + + `name` _mandatory_ + : `string` Name of the cardholder. + + `expiry_month` _mandatory_ + : `integer` Expiry month for the card in `MM` format. + + `expiry_year` _mandatory_ + : `string` Expiry year for the card in `YY` format. + + `cvv` _mandatory_ + : `string` CVV printed on the back of the card. + + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + + `billing_address` _optional_ + : `json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `authentication` _optional_ + : `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + + `device_fingerprint` _mandatory_ + : `string` Details of the device fingerprint. + + `checkout_session_id` _mandatory_ + : `object` id of the checkout entity that is created. + + `browser` _mandatory_ + : `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `referrer` _optional_ + : `string` Referrer header passed by the client's browser. + + `user-agent` _mandatory_ + : `string` The User-Agent header of the user's browser. The default value will be passed by Razorpay if not provided by you. + + `ip` _mandatory_ + : `string` The customer's IP address. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` Indicates the next step to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the bank page. + + `url` + : `string` URL to be used for the action indicated. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + +### 2. Separate Order and Payment APIs + + If you are using separate APIs to create Order and process Payment, follow the steps given below: + + + Step 1: Create an Order + +Use the Orders API to create an order before initiating a payment. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1101", + "partial_payment": false, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "hotel", + "sku": "1gr367", + "name": "Grand Palace Hotel", + "description": "2BHK villa", + "quantity": 2, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "hotel": { + "sub_type": "stay", + "checkin_date": "2019-07-16", + "checkout_date": "2019-07-16", + "property_type": "", + "star_rating": 5, + "brand": "Grand Mercure", + "address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "class": "business", + "identity": { + "unique_national_id": "ABCDE1234Z", + "tax_id": "ABCDE1234Z" + } + }, + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "class": "business", + "identity": { + "unique_national_id": "ABCDE1234Z", + "tax_id": "ABCDE1234Z" + } + } + ] + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +``` + +```json: Response +{ + "id": "order_QU1wpqJfs7smfR", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "created_at": 1747055716 +} +``` + + + Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _optional_ + : `json object` Details about the customer/user. + + `name` _optional_ + : `string` The customer’s name. For example, Gaurav Kumar. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, +919000090000. + + `email` _optional_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the merchant platform. For example, `22`. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the merchant platform. For example, `4`. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, 1234567890. + + `billing_address` _optional_ + : `json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e-commerce` + - `mutual_fund` + + `sku` _optional_ + : `string ` unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business is running any discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `hotel` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `sub_type` _optional_ + : `enum` The sub-type of the line item. Possible values: + - `stay` + - `breakfast` + - `dinner` + - `lunch` + - `early_checkin` + - `late_chechout` + - `others` + + `checkin_date` _optional_ + : `string` Represents an ISO 8601-encoded date string. For example, September 7, 2019 is represented as `2019-07-16`. + + `checkout_date` _optional_ + : `string` Represents an ISO 8601-encoded date string. For example, September 7, 2019 is represented as `2019-07-16`. + + `property_type` _optional_ + : `string` Represents the type of the property. Possible values: + - `resort` + - `hostel` + - `hotel` + - `inn` + - `lodge` + - `motel` + - `apartment` + - `bed_and_breakfast` + - `tent` + - `villa` + + `star_rating` _optional_ + : `integer` Denotes the star rating of the property. Possible values: 1 to 7. + + `brand` _optional_ + : `string` Brand name of the property. For example, Marriott Group. + + `address` _optional_ + : `json object` Details of the property address. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `travellers` _optional_ + : `JSON object` Details associated with passengers/travellers/beneficiaries. + + `name` _optional_ + : `string` Name of the passenger/traveler/beneficiary. + + `email` _optional_ + : `string` Email address of the passenger/traveler/beneficiary. + + `contact` _optional_ + : `JSON object` Details associated with passengers/travelers/beneficiaries. + + `age` _optional_ + : `integer` UNIX timestamp of the date of birth of the individual. For example, 1234567890. + + `class` _optional_ + : `string` Type of the flight ticket. Possible values: + - `Business` + - `Suite` + - `Premium` + - `Deluxe` + - `Standard` + + `identity` _optional_ + : `JSON object` Identity details of the passenger/beneficiary. + + `unique_national_id` _optional_ + : `string` National ID number. For example, Adhaar number for India. + + `tax_id` _optional_ + : `string` Passport number of the individual. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `JSON object` Details of the campaign. *Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, `PQR12453`. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Example values: `google`, `newsletter`. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: `cpc`, `banner`, etc. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + + +### Step 2: Create a Payment + + Once the order is created, pass the `order_id` from the Orders API response to the Payments API. + +/payments/create/json + +```curl: Request +curl -X POST \ +https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 10000, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_PrcuyJDT7uSwaf", + "callback_url": "https://merchant_callback_url..", + "method": "card", + "card": { + "number": "4111111111111111", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +}' + +``` + +```json: Response +{ + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/pg_router/v1/payments/pay_Ps0cnb0OrxFcSH/dcc_info" + } + ], + "razorpay_payment_id": "pay_Ps0cnb0OrxFcSH" +} +``` + + + + Request Parameters + + + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` Currency code for the currency in which you want to accept the payment. For example, INR. Refer to the list of supported currencies. The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + + + + + `order_id` _mandatory_ + : `string` Unique identifier of the Order. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `contact` _mandatory_ + : `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `method` _mandatory_ + : `string` Name of the payment method. Possible value is `card`. + + + + `card` _mandatory_ + : `object` Details associated with the card. + + `number` + : `string` Unformatted card number. + + `name` + : `string` Name of the cardholder. + + `expiry_month` + : `string` Expiry month for the card in MM format. + + `expiry_year` + : `string` Expiry year for the card in YY format. + + `cvv` + : `string` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + + + + + `user-agent` _mandatory_ + : `string` The User-Agent header of the user's browser. The default value will be passed by Razorpay if not provided by you. + + `ip` _mandatory_ + : `string` The customer's IP address. + + `authentication` _optional_ + : `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + + `browser` _mandatory_ + : `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `language` + : `string` Obtained from the payer's browser using the `navigator.language` HTML DOM property. Maximum limit of 8 characters. + + `notes` _optional_ + : `object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + + `callback_url` _optional_ + : `string` URL endpoint where Razorpay will submit the final payment status. + + `referrer` _optional_ + : `string` Referrer header passed by the client's browser. + + + +### Response Parameters + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` Indicates the next step to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the bank page. + + `url` + : `string` URL to be used for the action indicated. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + + + + + +### 1.3 Handle Payment Success and Error Events + +Once the payment is completed by the customer, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + +#### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +#### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) for details. + +### 1.4 Verify Payment Signature +Signature verification is a mandatory step to ensure that the callback is sent by Razorpay. The `razorpay_signature` contained in the callback can be regenerated by your system and verified as follows. + +Create a string to be hashed using the `razorpay_payment_id` contained in the callback and the Order ID generated in the first step, separated by a `|`. Hash this string using SHA256 and your API Secret. + +``` +generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + +if (generated_signature == razorpay_signature) { + payment is successful +} +``` + +#### Generate Signature on your Server + + +### Sample code + +```java: Java +/** +* This class defines common routines for generating +* authentication signatures for Razorpay Webhook requests. +*/ +public class Signature +{ + private static final String HMAC_SHA256_ALGORITHM = "HmacSHA256"; + /** + * Computes RFC 2104-compliant HMAC signature. + * * @param data + * The data to be signed. + * @param key + * The signing key. + * @return + * The Base64-encoded RFC 2104-compliant HMAC signature. + * @throws + * java.security.SignatureException when signature generation fails + */ + public static String calculateRFC2104HMAC(String data, String secret) + throws java.security.SignatureException + { + String result; + try { + + // get an hmac_sha256 key from the raw secret bytes + SecretKeySpec signingKey = new SecretKeySpec(secret.getBytes(), HMAC_SHA256_ALGORITHM); + + // get an hmac_sha256 Mac instance and initialize with the signing key + Mac mac = Mac.getInstance(HMAC_SHA256_ALGORITHM); + mac.init(signingKey); + + // compute the hmac on input data bytes + byte[] rawHmac = mac.doFinal(data.getBytes()); + + // base64-encode the hmac + result = DatatypeConverter.printHexBinary(rawHmac).toLowerCase(); + + } catch (Exception e) { + throw new SignatureException("Failed to generate HMAC : " + e.getMessage()); + } + return result; + } +} + +```php: PHP +use Razorpay\Api\Api; +$api = new Api($key_id, $key_secret); +$attributes = array('razorpay_signature' => '23233', 'razorpay_payment_id' => '332' , 'razorpay_order_id' => '12122'); +$order = $api->utility->verifyPaymentSignature($attributes) + +```ruby: Ruby +require 'razorpay' +Razorpay.setup('key_id', 'key_secret') +payment_response = { + 'razorpay_order_id': '12122', + 'razorpay_payment_id': '332', + 'razorpay_signature': '23233' +} + +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET + Dictionary attributes = new Dictionary(); + + attributes.Add("razorpay_payment_id", paymentId); + attributes.Add("razorpay_order_id", Request.Form["razorpay_order_id"]); + attributes.Add("razorpay_signature", Request.Form["razorpay_signature"]); + + Utils.verifyPaymentSignature(attributes); +```nodejs: Node.js +var { validatePaymentVerification } = require('./dist/utils/razorpay-utils'); + +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); +```Go: Go +import ( + "crypto/hmac" + "crypto/sha256" + "crypto/subtle" + "encoding/hex" + "fmt" +) + +func main() { + signature := "477d1cdb3f8122a7b0963704b9bcbf294f65a03841a5f1d7a4f3ed8cd1810f9b" + secret := "qp3zKxwLZxbMORJgEVWi3Gou" + data := "order_J2AeF1ZpvfqRGH|pay_J2AfAxNHgqqBiI" + //fmt.Printf("Secret: %s Data: %s\n", secret, data) + + // Create a new HMAC by defining the hash type and the key (as byte array) + h := hmac.New(sha256.New, []byte(secret)) + + // Write Data to it + _, err := h.Write([]byte(data)) + + if err != nil { + panic(err) + } + + // Get result and encode as hexadecimal string + sha := hex.EncodeToString(h.Sum(nil)) + + fmt.Printf("Result: %s\n", sha) + + if subtle.ConstantTimeCompare([]byte(sha), []byte(signature)) == 1 { + fmt.Println("Works") + } +} +``` + + +### 1.5 Integrate Payments Rainy Day Kit + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + +### 1.6 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/international-cards/travel.md b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/international-cards/travel.md new file mode 100644 index 00000000..37dcd328 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/international-cards/travel.md @@ -0,0 +1,1647 @@ +--- +title: 1. Build Integration for International Cards (Travel) +description: Steps to integrate S2S JSON API and accept payments using international cards, with Razorpay Chargeback Guarantee Program. +--- + +# 1. Build Integration for International Cards (Travel) + +You can integrate with Razorpay APIs to start accepting international card payments. + +Razorpay Chargeback Guarantee Program on international cards safeguards businesses from fraud chargeback. Businesses provide additional category-specific details to enhance our risk model's ability to detect risky transactions. Razorpay uses this information to enhance risk assessment for international cards, aiming to achieve the highest success rate while minimising fraud. + +> **WARN** +> +> +> **Watch Out!** +> +> - Category-specific risk rules will not be effective unless you provide additional details. +> +> - You must have a PCI compliance certificate to enable this feature on your account. +> + +## Integration Steps + +Follow the steps given below to integrate S2S JSON API with browser flow and accept payments using cards. + +**1.1** [Integrate Razorpay Shield JS](#11-integrate-razorpay-shield-js) + +**1.2** [Create Order and Payment](#12-create-order-and-payment) + +**1.3** [Handle Payment Success and Error Events](#13-handle-payment-success-and-error-events) + +**1.4** [Verify Payment Signature](#14-verify-payment-signature) + +**1.5** [Integrate Payments Rainy Day Kit](#15-integrate-payments-rainy-day-kit) + +**1.6** [Verify Payment Status](#16-verify-payment-status) + +### 1.1 Integrate Razorpay Shield JS + +Integrate SHIELD JS and pass session_id in [Create Order and Payment](#12-create-order-and-payment). + +```Curl: JavaScript + +// later, at the time of payment initialization: +const checkout_session_id = await RazorpayShield.getCheckoutSessionId() // pass it to your backend + +``` + +### 1.2 Create Order and Payment + +This step demonstrates creating an Order and processing a Payment using Razorpay APIs. Depending on your integration type, you can choose between: + + +### 1. Consolidated Order and Payment API + +Create an order along with payment using the consolidated order and payment API. This single API call combines order and payment creation, resulting in a more efficient and faster transaction process. + +Create an order along with payment by: + +- Making a single API call to Razorpay, combining order and payment creation. +- Authenticating using the provided credentials, ensuring access to the consolidated payment API. +- Manually integrating the API sample codes on your server. + +The following API will create an order along with payment with `card` as the payment method: + +/orders + +```curl: Request +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "partial_payment": false, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "line_items_total": 5000, + "line_items": [ + { + "sku": "1gr367", + "name": "Flight Ticket", + "description": "Flight tickets", + "quantity": 2, + "type": "travel", + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "travel": { + "mode": "flight", + "sub_type": "ticket", + "carrier_code": "AA123", + "departure_city": "UAM", + "departure_timestamp": "1234567890", + "arrival_city": "UAM", + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + }, + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + } + ] + } + }, + { + "sku": "1gr368", + "name": "Travel_Insurance", + "description": "Flight_Travel_Insurance", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "type": "travel", + "travel": { + "mode": "flight", + "sub_type": "insurance", + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + } + ] + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "payment": { + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "callback_url": "https://merchant_callback_url..", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100", + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "State": "Karnataka", + "zipcode": "560032" + } + }, + "authentication": { + "authentication_channel": "browser" + }, + "device_fingerprint": { + "checkout_session_id": "qwerty12345", + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100, + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" + }, + "ip": "105.106.107.108" + } + } +}' +``` + +```json: Response +{ + "amount": 50000, + "amount_due": 50000, + "amount_paid": 0, + "attempts": 10, + "created_at": 1706507580, + "currency": "INR", + "entity": "order", + "id": "order_NUJs9C1Luflzts", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "payment_workflow": { + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/O0NSBQgY0BbC4b/authenticate" + } + ], + "razorpay_payment_id": "pay_O0NSBQgY0BbC4b" + }, + "receipt": "receipt#1111", + "status": "attempted" +} +``` + + + Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _optional_ + : `json object` Details about the customer/user. + + `name` _optional_ + : `string` The customer’s name. For example, Gaurav Kumar. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, +919000090000. + + `email` _optional_ + : `string` The customer’s email address. For example, gaurav.kumar@example.com. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the merchant platform. For example, `22`. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the merchant platform. For example, `4`. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + `true`: If the user is logged into the account. + `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the business. For example, 1234567890. + + `billing_address` _optional_ + : `json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `sku` _optional_ + : `string ` Unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa (needs to be inclusive of tax). + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business is running any discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `travel` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `mode` _optional_ + : `string` The mode of travel. Possible values: + - `flight` + - `train` + - `bus` + - `cab` + - `others` + + `sub_type` _optional_ + : `string` The subtype of the line item. Possible values: + - `ticket` + - `meal` + - `insurance` + - `preferred_seat` + - `others` + + `carrier_code` _optional_ + : `string` Full flight number for this leg of the journey. For example, `AA123`. + + `departure_city` _optional_ + : `string` 3 letter IATA airport code, also known as an IATA location identifier, IATA station code. For example, CPH for Copenhagen. + + `departure_timestamp` _optional_ + : `integer` UNIX timestamp. For example, 1234567890. + + `arrival_city` _optional_ + : `string` 3 letter IATA airport code, also known as an IATA location identifier, IATA station code. For example, CPH for Copenhagen + + `travellers` _optional_ + : `JSON object` Details associated with passengers/travellers/beneficiaries. + + `name` _optional_ + : `string` Name of the passenger/traveler/beneficiary. + + `email` _optional_ + : `string` Email address of the passenger/traveler/beneficiary. + + `age` _optional_ + : `integer` UNIX timestamp of the date of birth of the individual. For example, `1234567890`. + + `nationality` _optional_ + : `string` ISO3 country code to share the nationality of the individual. For example, `IND`. + + `class` _optional_ + : `string` Type of the flight ticket. Possible values: + - `economy` + - `premium_economy` + - `business` + - `SL` + - `3A` + - `2A` + - `1A` + - `CC` + - `others` + + `identity` _optional_ + : `JSON object` Identity details of the passenger/beneficiary. + + `tax_id` _optional_ + : `string` Tax ID number. For example, PAN number for India. + + `unique_national_id` _optional_ + : `string` National ID number. For example, Adhaar number for India. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of the `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `JSON object` Details of the campaign. *Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, `PQR12453`. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Example values: + - `google` + - `newsletter` + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: + - `cpc` + - `banner` + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `payment` _mandatory_ + : `json object` Details about the payment. + + `contact` _mandatory_ + : `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `callback_url` _optional_ + : `string` URL endpoint where Razorpay will submit the final payment status. + + `method` _mandatory_ + : `string` Name of the payment method. Possible value is `card`. + + `card` _mandatory_ + : `object` Details associated with the card. + + `number` _mandatory_ + : `string` Unformatted card number. + + `name` _mandatory_ + : `string` Name of the cardholder. + + `expiry_month` _mandatory_ + : `integer` Expiry month for the card in `MM` format. + + `expiry_year` _mandatory_ + : `string` Expiry year for the card in `YY` format. + + `cvv` _mandatory_ + : `string` CVV printed on the back of the card. + + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + + `billing_address` _optional_ + : `json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `authentication` _optional_ + : `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + + `device_fingerprint` _mandatory_ + : `string` Details of the device fingerprint. + + `checkout_session_id` _mandatory_ + : `object` id of the checkout entity that is created. + + `browser` _mandatory_ + : `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `referrer` _optional_ + : `string` Referrer header passed by the client's browser. + + `user-agent` _mandatory_ + : `string` The User-Agent header of the user's browser. The default value will be passed by Razorpay if not provided by you. + + `ip` _mandatory_ + : `string` The customer's IP address. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` indicates the next step to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the bank page. + + `url` + : `string` URL to be used for the action indicated. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + +### 2. Separate Order and Payment APIs + +If you are using separate APIs to create Order and process Payment, follow the steps given below: + + + Step 1: Create an Order + +Use the Orders API to create an order before initiating a payment. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "partial_payment": false, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "line_items_total": 5000, + "line_items": [ + { + "sku": "1gr367", + "name": "Flight Ticket", + "description": "Flight tickets", + "quantity": 2, + "type": "travel", + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "travel": { + "mode": "flight", + "sub_type": "ticket", + "carrier_code": "AA123", + "departure_city": "UAM", + "departure_timestamp": "1234567890", + "arrival_city": "UAM", + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + }, + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + } + ] + } + }, + { + "sku": "1gr368", + "name": "Travel_Insurance", + "description": "Flight_Travel_Insurance", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "type": "travel", + "travel": { + "mode": "flight", + "sub_type": "insurance", + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + } + ] + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +``` + +```json: Response +{ + "id": "order_QU1wpqJfs7smfR", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "created_at": 1747055716 +} +``` + + + Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _optional_ + : `json object` Details about the customer/user. + + `name` _optional_ + : `string` The customer’s name. For example, Gaurav Kumar. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, +919000090000. + + `email` _optional_ + : `string` The customer’s email address. For example, gaurav.kumar@example.com. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the merchant platform. For example, `22`. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the merchant platform. For example, `4`. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + `true`: If the user is logged into the account. + `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the business. For example, 1234567890. + + `billing_address` _optional_ + : `json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `sku` _optional_ + : `string ` Unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa (needs to be inclusive of tax). + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business is running any discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `travel` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `mode` _optional_ + : `string` The mode of travel. Possible values: + - `flight` + - `train` + - `bus` + - `cab` + - `others` + + `sub_type` _optional_ + : `string` The subtype of the line item. Possible values: + - `ticket` + - `meal` + - `insurance` + - `preferred_seat` + - `others` + + `carrier_code` _optional_ + : `string` Full flight number for this leg of the journey. For example, `AA123`. + + `departure_city` _optional_ + : `string` 3 letter IATA airport code, also known as an IATA location identifier, IATA station code. For example, CPH for Copenhagen. + + `departure_timestamp` _optional_ + : `integer` UNIX timestamp. For example, 1234567890. + + `arrival_city` _optional_ + : `string` 3 letter IATA airport code, also known as an IATA location identifier, IATA station code. For example, CPH for Copenhagen + + `travellers` _optional_ + : `JSON object` Details associated with passengers/travellers/beneficiaries. + + `name` _optional_ + : `string` Name of the passenger/traveler/beneficiary. + + `email` _optional_ + : `string` Email address of the passenger/traveler/beneficiary. + + `age` _optional_ + : `integer` UNIX timestamp of the date of birth of the individual. For example, `1234567890`. + + `nationality` _optional_ + : `string` ISO3 country code to share the nationality of the individual. For example, `IND`. + + `class` _optional_ + : `string` Type of the flight ticket. Possible values: + - `economy` + - `premium_economy` + - `business` + - `SL` + - `3A` + - `2A` + - `1A` + - `CC` + - `others` + + `identity` _optional_ + : `JSON object` Identity details of the passenger/beneficiary. + + `tax_id` _optional_ + : `string` Tax ID number. For example, PAN number for India. + + `unique_national_id` _optional_ + : `string` National ID number. For example, Adhaar number for India. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of the `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `JSON object` Details of the campaign. *Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, `PQR12453`. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Example values: + - `google` + - `newsletter` + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: + - `cpc` + - `banner` + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + + +### Step 2: Create a Payment + + Once the order is created, pass the `order_id` from the Orders API response to the Payments API. + +/payments/create/json + +```curl: Request +curl -X POST \ +https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 10000, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_PrcuyJDT7uSwaf", + "callback_url": "https://merchant_callback_url..", + "method": "card", + "card": { + "number": "4111111111111111", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +}' + +``` + +```json: Response +{ + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/pg_router/v1/payments/pay_Ps0cnb0OrxFcSH/dcc_info" + } + ], + "razorpay_payment_id": "pay_Ps0cnb0OrxFcSH" +} +``` + + + + Request Parameters + + + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` Currency code for the currency in which you want to accept the payment. For example, INR. Refer to the list of supported currencies. The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + + + + + `order_id` _mandatory_ + : `string` Unique identifier of the Order. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `contact` _mandatory_ + : `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `method` _mandatory_ + : `string` Name of the payment method. Possible value is `card`. + + + + `card` _mandatory_ + : `object` Details associated with the card. + + `number` + : `string` Unformatted card number. + + `name` + : `string` Name of the cardholder. + + `expiry_month` + : `string` Expiry month for the card in MM format. + + `expiry_year` + : `string` Expiry year for the card in YY format. + + `cvv` + : `string` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + + + + + `user-agent` _mandatory_ + : `string` The User-Agent header of the user's browser. The default value will be passed by Razorpay if not provided by you. + + `ip` _mandatory_ + : `string` The customer's IP address. + + `authentication` _optional_ + : `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + + `browser` _mandatory_ + : `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `language` + : `string` Obtained from the payer's browser using the `navigator.language` HTML DOM property. Maximum limit of 8 characters. + + `notes` _optional_ + : `object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + + `callback_url` _optional_ + : `string` URL endpoint where Razorpay will submit the final payment status. + + `referrer` _optional_ + : `string` Referrer header passed by the client's browser. + + + +### Response Parameters + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` Indicates the next step to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the bank page. + + `url` + : `string` URL to be used for the action indicated. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + + + + + +### 1.3 Handle Payment Success and Error Events + +Once the payment is completed by the customer, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + +#### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +#### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) for details. + +### 1.4 Verify Payment Signature +Signature verification is a mandatory step to ensure that the callback is sent by Razorpay. The `razorpay_signature` contained in the callback can be regenerated by your system and verified as follows. + +Create a string to be hashed using the `razorpay_payment_id` contained in the callback and the Order ID generated in the first step, separated by a `|`. Hash this string using SHA256 and your API Secret. + +``` +generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + +if (generated_signature == razorpay_signature) { + payment is successful +} +``` + +#### Generate Signature on your Server + + +### Sample code + +```java: Java +/** +* This class defines common routines for generating +* authentication signatures for Razorpay Webhook requests. +*/ +public class Signature +{ + private static final String HMAC_SHA256_ALGORITHM = "HmacSHA256"; + /** + * Computes RFC 2104-compliant HMAC signature. + * * @param data + * The data to be signed. + * @param key + * The signing key. + * @return + * The Base64-encoded RFC 2104-compliant HMAC signature. + * @throws + * java.security.SignatureException when signature generation fails + */ + public static String calculateRFC2104HMAC(String data, String secret) + throws java.security.SignatureException + { + String result; + try { + + // get an hmac_sha256 key from the raw secret bytes + SecretKeySpec signingKey = new SecretKeySpec(secret.getBytes(), HMAC_SHA256_ALGORITHM); + + // get an hmac_sha256 Mac instance and initialize with the signing key + Mac mac = Mac.getInstance(HMAC_SHA256_ALGORITHM); + mac.init(signingKey); + + // compute the hmac on input data bytes + byte[] rawHmac = mac.doFinal(data.getBytes()); + + // base64-encode the hmac + result = DatatypeConverter.printHexBinary(rawHmac).toLowerCase(); + + } catch (Exception e) { + throw new SignatureException("Failed to generate HMAC : " + e.getMessage()); + } + return result; + } +} + +```php: PHP +use Razorpay\Api\Api; +$api = new Api($key_id, $key_secret); +$attributes = array('razorpay_signature' => '23233', 'razorpay_payment_id' => '332' , 'razorpay_order_id' => '12122'); +$order = $api->utility->verifyPaymentSignature($attributes) + +```ruby: Ruby +require 'razorpay' +Razorpay.setup('key_id', 'key_secret') +payment_response = { + 'razorpay_order_id': '12122', + 'razorpay_payment_id': '332', + 'razorpay_signature': '23233' +} + +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET + Dictionary attributes = new Dictionary(); + + attributes.Add("razorpay_payment_id", paymentId); + attributes.Add("razorpay_order_id", Request.Form["razorpay_order_id"]); + attributes.Add("razorpay_signature", Request.Form["razorpay_signature"]); + + Utils.verifyPaymentSignature(attributes); +```nodejs: Node.js +var { validatePaymentVerification } = require('./dist/utils/razorpay-utils'); + +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); +```Go: Go +import ( + "crypto/hmac" + "crypto/sha256" + "crypto/subtle" + "encoding/hex" + "fmt" +) + +func main() { + signature := "477d1cdb3f8122a7b0963704b9bcbf294f65a03841a5f1d7a4f3ed8cd1810f9b" + secret := "qp3zKxwLZxbMORJgEVWi3Gou" + data := "order_J2AeF1ZpvfqRGH|pay_J2AfAxNHgqqBiI" + //fmt.Printf("Secret: %s Data: %s\n", secret, data) + + // Create a new HMAC by defining the hash type and the key (as byte array) + h := hmac.New(sha256.New, []byte(secret)) + + // Write Data to it + _, err := h.Write([]byte(data)) + + if err != nil { + panic(err) + } + + // Get result and encode as hexadecimal string + sha := hex.EncodeToString(h.Sum(nil)) + + fmt.Printf("Result: %s\n", sha) + + if subtle.ConstantTimeCompare([]byte(sha), []byte(signature)) == 1 { + fmt.Println("Works") + } +} +``` + + +### 1.5 Integrate Payments Rainy Day Kit + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + +### 1.6 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/netbanking.md b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/netbanking.md new file mode 100644 index 00000000..470c5416 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/netbanking.md @@ -0,0 +1,578 @@ +--- +title: 1. Build Integration for Netbanking +description: Steps to integrate S2S JSON API and accept payments using netbanking. +--- + +# 1. Build Integration for Netbanking + +Follow the steps below to integrate S2S JSON API and accept payments using netbanking. + +**1.1** [Create an Order](#11-create-an-order) + +**1.2** [Create a Payment](#12-create-a-payment) + +**1.3** [Handle Payment Success and Error Events](#13-handle-payment-success-and-error-events) + +**1.4** [Verify Payment Signature](#14-verify-payment-signature) + +**1.5** [Integrate Payments Rainy Day Kit](#15-integrate-payments-rainy-day-kit) + +**1.6** [Verify Payment Status](#16-verify-payment-status) + +> **WARN** +> +> +> **Watch Out!** +> +> Do not hardcode the URL returned in the API responses. +> + +## 1.1 Create an Order + +To process a payment, create a Razorpay Order to correspond with the order in your system. Send the order request parameters to the following endpoint: + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +## 1.2 Create a Payment + +Once an order is created, your next step is to create a payment. The following API will create a payment with `netbanking` as the payment method: + +/payments/create/json + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ + -d '{ + "amount": "100", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "callback_url": "https://webhook.site/fa184d00-53da-4257-b5e4-f98e3373b005", + "ip": "192.168.0.103", + "method": "netbanking", + "bank": "HDFC" +}' + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson(array('amount' => 100,'currency' => 'INR','email' => 'gaurav.kumar@example.com','contact' => '9000090000','order_id' => 'order_I6LVPRQ6upW3uh','callback_url' => 'https://webhook.site/fa184d00-53da-4257-b5e4-f98e3373b005','method' => 'netbanking','vpa' => '9090909090@oksomebank','ip' => '192.168.0.103','referer' => 'http','user_agent' => 'Mozilla/5.0','description' => 'Test payment','notes' => array('note_key' => 'value1'))); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createPaymentJson({ + amount: 100, + currency: "INR", + order_id: "order_EAkbvXiCJlwhHR", + callback_url: "https://webhook.site/fa184d00-53da-4257-b5e4-f98e3373b005", + email: "gaurav.kumar@example.com", + contact: "9090909090", + method: "netbanking", + vpa: "9090909090@oksomebank", + ip: "192.168.0.103", + referer: "http", + user_agent: "Mozilla/5.0", + description: "Test payment", + notes: { + note_key: "value1" + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createPaymentJson({ + "amount": 100, + "currency": "INR", + "order_id": "order_EAkbvXiCJlwhHR", + "callback_url": "https://webhook.site/fa184d00-53da-4257-b5e4-f98e3373b005", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "netbanking", + "vpa": "9090909090@oksomebank", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount",500); +paymentRequest.Add("currency","INR"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9000090000"); +paymentRequest.Add("order_id", "order_JZluwjknyWdhnU"); +paymentRequest.Add("callback_url": "https://webhook.site/fa184d00-53da-4257-b5e4-f98e3373b005"); +paymentRequest.Add("method", "netbanking"); +paymentRequest.Add("bank", "HDFC"); + +Payment payment = client.Payment.CreateJsonPayment(paymentRequest); + +```json: Response +{ + "razorpay_payment_id": "pay_FVptEVkDdNzFx8", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/FVptEs3cSWX1fs/authorize" + } + ] +} +``` + +#### Request Parameters +The payment request for each of the supported payment methods will slightly vary. Know more about the [relevant payment request fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md). + +#### Response Parameters + +If the payment request is valid, the response contains the following fields. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. The value here is `redirect` - Use this URL to redirect customer to the bank page. + + `url` + : `string` URL to be used for the action indicated. + +## 1.3 Handle Payment Success and Error Events + +Once the payment is completed by the customer, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + +#### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +#### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) for details. + +## 1.4 Verify Payment Signature +Signature verification is a mandatory step to ensure that the callback is sent by Razorpay. The `razorpay_signature` contained in the callback can be regenerated by your system and verified as follows. + +Create a string to be hashed using the `razorpay_payment_id` contained in the callback and the Order ID generated in the first step, separated by a `|`. Hash this string using SHA256 and your API Secret. + +``` +generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + +if (generated_signature == razorpay_signature) { + payment is successful +} +``` + +#### Generate Signature on your Server + +```java: Java +/** +* This class defines common routines for generating +* authentication signatures for Razorpay Webhook requests. +*/ +public class Signature +{ + private static final String HMAC_SHA256_ALGORITHM = "HmacSHA256"; + /** + * Computes RFC 2104-compliant HMAC signature. + * * @param data + * The data to be signed. + * @param key + * The signing key. + * @return + * The Base64-encoded RFC 2104-compliant HMAC signature. + * @throws + * java.security.SignatureException when signature generation fails + */ + public static String calculateRFC2104HMAC(String data, String secret) + throws java.security.SignatureException + { + String result; + try { + + // get an hmac_sha256 key from the raw secret bytes + SecretKeySpec signingKey = new SecretKeySpec(secret.getBytes(), HMAC_SHA256_ALGORITHM); + + // get an hmac_sha256 Mac instance and initialize with the signing key + Mac mac = Mac.getInstance(HMAC_SHA256_ALGORITHM); + mac.init(signingKey); + + // compute the hmac on input data bytes + byte[] rawHmac = mac.doFinal(data.getBytes()); + + // base64-encode the hmac + result = DatatypeConverter.printHexBinary(rawHmac).toLowerCase(); + + } catch (Exception e) { + throw new SignatureException("Failed to generate HMAC : " + e.getMessage()); + } + return result; + } +} + +```php: PHP +use Razorpay\Api\Api; +$api = new Api($key_id, $key_secret); +$attributes = array('razorpay_signature' => '23233', 'razorpay_payment_id' => '332' , 'razorpay_order_id' => '12122'); +$order = $api->utility->verifyPaymentSignature($attributes) + +```ruby: Ruby +require 'razorpay' +Razorpay.setup('key_id', 'key_secret') +payment_response = { + 'razorpay_order_id': '12122', + 'razorpay_payment_id': '332', + 'razorpay_signature': '23233' +} + +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET + Dictionary attributes = new Dictionary(); + + attributes.Add("razorpay_payment_id", paymentId); + attributes.Add("razorpay_order_id", Request.Form["razorpay_order_id"]); + attributes.Add("razorpay_signature", Request.Form["razorpay_signature"]); + + Utils.verifyPaymentSignature(attributes); +```nodejs: Node.js +var { validatePaymentVerification } = require('./dist/utils/razorpay-utils'); + +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); +```Go: Go +import ( + "crypto/hmac" + "crypto/sha256" + "crypto/subtle" + "encoding/hex" + "fmt" +) + +func main() { + signature := "477d1cdb3f8122a7b0963704b9bcbf294f65a03841a5f1d7a4f3ed8cd1810f9b" + secret := "qp3zKxwLZxbMORJgEVWi3Gou" + data := "order_J2AeF1ZpvfqRGH|pay_J2AfAxNHgqqBiI" + //fmt.Printf("Secret: %s Data: %s\n", secret, data) + + // Create a new HMAC by defining the hash type and the key (as byte array) + h := hmac.New(sha256.New, []byte(secret)) + + // Write Data to it + _, err := h.Write([]byte(data)) + + if err != nil { + panic(err) + } + + // Get result and encode as hexadecimal string + sha := hex.EncodeToString(h.Sum(nil)) + + fmt.Printf("Result: %s\n", sha) + + if subtle.ConstantTimeCompare([]byte(sha), []byte(signature)) == 1 { + fmt.Println("Works") + } +} +``` + +## 1.5 Integrate Payments Rainy Day Kit + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + +## 1.6 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/single-integration-api.md b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/single-integration-api.md new file mode 100644 index 00000000..f0d19850 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/single-integration-api.md @@ -0,0 +1,2713 @@ +--- +title: Single Integration API +description: Create Order and Payments in a single API call. +--- + +# Single Integration API + +You can now create an order along with a payment using a single API for netbanking, cards and UPI. Given below are details and examples for all three payment methods followed by steps to integrate S2S JSON API and accept payments using [netbanking](#netbanking), [cards](#cards) and [UPI](#upi). + + +### Netbanking + + + Create an **order** along with **payment** using the consolidated order and payment API. This single API call combines order and payment creation, resulting in a more efficient and faster transaction process. + + Create a order along with payment by: + - Making a single API call to Razorpay, combining order and payment creation. + - Authenticating using the provided credentials, ensuring access to the consolidated payment API. + - Manually integrating the API sample codes on your server. + + Use the following API to create an order along with payment using `netbanking` as the payment method: + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "partial_payment": true, + "customer_id": "cust_E9penp7VGhT5yt", + "transfers": [ + { + "account": "acc_IRQWUleX4BqvYn", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": true, + "on_hold_until": 1671222870 + }, + { + "account": "acc_IROu8Nod6PXPtZ", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Saurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": false + } + ], + "products": [], + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "payment": { + "amount": 100, + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "ip": "192.168.0.103", + "method": "netbanking", + "bank": "HDFC", + "description": "Test payment", + "notes": { + "note_key": "value1" + } + }, + "user_agent": "Mozilla/5.0" + } + + ```java: Java + import org.json.JSONObject; + import com.razorpay.Payment; + import com.razorpay.RazorpayClient; + import com.razorpay.RazorpayException; + + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "receipt#1"); + JSONObject notes = new JSONObject(); + notes.put("key1", "value3"); + notes.put("key2", "value2"); + orderRequest.put("notes", notes); + orderRequest.put("partial_payment", true); + orderRequest.put("customer_id", "cust_E9penp7VGhT5yt"); + JSONArray transfer = new JSONArray(); + + JSONObject transferAccount1 = new JSONObject(); + transferAccount1.put("account", "acc_IRQWUleX4BqvYn"); + transferAccount1.put("amount", 1000); + transferAccount1.put("currency", "INR"); + JSONObject transferAccountNotes1 = new JSONObject(); + transferAccountNotes1.put("branch", "Acme Corp Bangalore North"); + transferAccountNotes1.put("name", "Gaurav Kumar"); + transferAccount1.put("notes", transferAccountNotes1); + + JSONArray transferAccountLinkedAccountNotes = new JSONArray(); + transferAccountLinkedAccountNotes.put("branch"); + transferAccount1.put("linked_account_notes", transferAccountLinkedAccountNotes); + transferAccount1.put("on_hold", true); + transferAccount1.put("on_hold_until", 1671222870); + transfer.put(transferAccount1); + + JSONObject transferAccount2 = new JSONObject(); + transferAccount2.put("account", "acc_IROu8Nod6PXPtZ"); + transferAccount2.put("amount", 1000); + transferAccount2.put("currency", "INR"); + JSONObject transferAccountNotes2 = new JSONObject(); + transferAccountNotes2.put("branch", "Acme Corp Bangalore South"); + transferAccountNotes2.put("name", "Saurav Kumar"); + transferAccount2.put("notes", transferAccountNotes2); + JSONArray transferAccountLinkedAccountNotes2 = new JSONArray(); + transferAccountLinkedAccountNotes2.put("branch"); + transferAccount2.put("linked_account_notes", transferAccountLinkedAccountNotes2); + transferAccount2.put("on_hold", false); + transfer.put(transferAccount2); + orderRequest.put("transfers", transfer); + + JSONArray products = new JSONArray(); + orderRequest.put("products", products); + + JSONObject bankAccount = new JSONObject(); + bankAccount.put("account_number", "765432123456789"); + bankAccount.put("name", "Gaurav Kumar"); + bankAccount.put("ifsc", "HDFC0000053"); + orderRequest.put("bank_account", bankAccount); + JSONObject paymentConfig = new JSONObject(); + paymentConfig.put("capture", "automatic"); + JSONObject paymentConfigCaptureOptions = new JSONObject(); + paymentConfigCaptureOptions.put("automatic_expiry_period", 12); + paymentConfigCaptureOptions.put("manual_expiry_period", 7200); + paymentConfigCaptureOptions.put("refund_speed", "optimum"); + paymentConfig.put("capture_options", paymentConfigCaptureOptions); + orderRequest.put("payment_config", paymentConfig); + JSONObject payment = new JSONObject(); + payment.put("amount", 100); + payment.put("email", "gaurav.kumar@example.com"); + payment.put("contact", "9123456789"); + payment.put("ip", "192.168.0.103"); + payment.put("method", "netbanking"); + payment.put("bank", "HDFC"); + payment.put("description", "Test payment"); + JSONObject paymentNotes = new JSONObject(); + paymentNotes.put("note_key", "value1"); + payment.put("notes", paymentNotes); + orderRequest.put("payment", payment); + orderRequest.put("user_agent", "Mozilla/5.0"); + + Order order = instance.orders.create(orderRequest); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + var data = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "partial_payment": true, + "customer_id": "cust_E9penp7VGhT5yt", + "transfers": [ + { + "account": "acc_IRQWUleX4BqvYn", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": true, + "on_hold_until": 1671222870 + }, + { + "account": "acc_IROu8Nod6PXPtZ", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Saurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": false + } + ], + "products": [], + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "payment": { + "amount": 100, + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "ip": "192.168.0.103", + "method": "netbanking", + "bank": "HDFC", + "description": "Test payment", + "notes": { + "note_key": "value1" + } + }, + "user_agent": "Mozilla/5.0" + } + + instance.orders.create(data); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "partial_payment": true, + "customer_id": "cust_E9penp7VGhT5yt", + "transfers": [ + { + "account": "acc_IRQWUleX4BqvYn", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": True, + "on_hold_until": 1671222870 + }, + { + "account": "acc_IROu8Nod6PXPtZ", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Saurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": False + } + ], + "products": [], + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "payment": { + "amount": 100, + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "ip": "192.168.0.103", + "method": "netbanking", + "bank": "HDFC", + "description": "Test payment", + "notes": { + "note_key": "value1" + } + }, + "user_agent": "Mozilla/5.0" + }) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "partial_payment": 1, + "customer_id": "cust_E9penp7VGhT5yt", + "transfers": [ + { + "account": "acc_IRQWUleX4BqvYn", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": 1, + "on_hold_until": 1671222870 + }, + { + "account": "acc_IROu8Nod6PXPtZ", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Saurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": 0 + } + ], + "products": [], + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "payment": { + "amount": 100, + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "ip": "192.168.0.103", + "method": "netbanking", + "bank": "HDFC", + "description": "Test payment", + "notes": { + "note_key": "value1" + } + }, + "user_agent": "Mozilla/5.0" + } + + Razorpay::Order.create(para_attr) + + ```php: PHP + $api = new Api($key_id, $secret); + $api->order->create(array('amount'=>50000,'currency'=>'INR','receipt'=>'receipt#1','notes'=>array('key1'=>'value3','key2'=>'value2',),'partial_payment'=>true,'customer_id'=>'cust_E9penp7VGhT5yt','transfers'=>array(array('account'=>'acc_IRQWUleX4BqvYn','amount'=>1000,'currency'=>'INR','notes'=>array('branch'=>'Acme Corp Bangalore North','name'=>'Gaurav Kumar',),'linked_account_notes'=>array('branch',),'on_hold'=>true,'on_hold_until'=>1671222870,),array('account'=>'acc_IROu8Nod6PXPtZ','amount'=>1000,'currency'=>'INR','notes'=>array('branch'=>'Acme Corp Bangalore South','name'=>'Saurav Kumar',),'linked_account_notes'=>array('branch',),'on_hold'=>false,),),'products'=>array(),'bank_account'=>array('account_number'=>'765432123456789','name'=>'Gaurav Kumar','ifsc'=>'HDFC0000053',),'payment_config'=>array('capture'=>'automatic','capture_options'=>array('automatic_expiry_period'=>12,'manual_expiry_period'=>7200,'refund_speed'=>'optimum',),),'payment'=>array('amount'=>100,'email'=>'gaurav.kumar@example.com','contact'=>'9123456789','ip'=>'192.168.0.103','method'=>'netbanking','bank'=>'HDFC','description'=>'Test payment','notes'=>array('note_key'=>'value1',),),'user_agent'=>'Mozilla/5.0',)); + ``` + + ```json: Success + { + "id": "order_EKwxwAgItmmXdp", + "status": "attempted", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "created_at": 1582628071, + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "offer_id": null, + "attempts": 1, + "transfers": [], + "payment_workflow": { + "id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/FVptEs3cSWX1fs/authorize" + }, + ] + } + } + + + ```json: Failure + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "order_create", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + #### Request Parameters + + `amount` _mandatory_ + : `integer` The amount for which the order was created in currency subunits. For example, for an amount of ₹295.00, enter 29500. The same amount will be used for the payment creation. For the partial payment scenario, we will use the amount specified in the payment request object in case. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `receipt` _optional_ + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `first_payment_min_amount` _optional_ + : `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of ₹7,000 is to be received from the customer in two installments of #1 - ₹5,000, #2 - ₹2,000, then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + + `customer_id` _optional_ + : `string` Unique identifier of the customer. + + `transfers` _optional_ + : `json object` Details regarding the transfer. + + `account` + : `string` The recipient account ID for fund transfer. + + `amount` _optional_ + : `string` The amount of the transfer. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `linked_account_notes` _optional_ + : `string` Notes associated with the linked account. + + `on_hold` _mandatory_ + : `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + + `on_hold_until` _mandatory_ + : `integer` Timestamp until which the transfer amount is on hold. + + `bank_account` _optional_ + : `json object` Details of the bank account that the customer provides at the time of registration. + + `account_number` _optional_ + : `string` Account number of the customers bank account. + + `name` _optional_ + : `string` The name associated with the bank account. + + `ifsc` _optional_ + : `string` The IFSC code of the bank. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `payment` _mandatory_ + : `object` Details of the payment. + + `amount` _optional_ + : `integer` The amount for which the order was created in currency subunits. For example, for an amount of ₹295.00, enter 29500. The same amount will be used for the payment creation. For the partial payment scenario, we will use the amount specified in the payment request object in case. + + `email` _mandatory_ + : `string` Email address of the customer. + + `contact` _mandatory_ + : `integer` Contact number of the customer. + + `ip` _mandatory_ + : `string` The customer's IP address. + + `method` _mandatory_ + : `string` Name of the payment method (example, netbanking, cards and upi). + + `bank` _mandatory_ + : `string` Name of the bank. + + `description` _mandatory_ + : `string` Description of the payment. + + Descriptions for the response parameters are present in the [Response parameter table](#response-parameters). + + + + +### Cards + + + + +> **WARN** +> +> +> **Watch Out!** +> +> The request body will differ from those created by other PSPs for tokens created on Razorpay. +> + + + + The following API will create a payment with `cards` as the payment method: + + ```curl: With Card Number + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "partial_payment": true, + "customer_id": "cust_E9penp7VGhT5yt", + "transfers": [ + { + "account": "acc_IRQWUleX4BqvYn", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": true, + "on_hold_until": 1671222870 + }, + { + "account": "acc_IROu8Nod6PXPtZ", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": false + } + ], + "products": [], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "payment": { + "amount": 100, + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill" + }, + "user_agent": "Mozilla/5.0" + } + + ```curl: With Token Created on Razorpay + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "partial_payment": true, + "customer_id": "cust_E9penp7VGhT5yt", + "transfers": [ + { + "account": "acc_IRQWUleX4BqvYn", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": true, + "on_hold_until": 1671222870 + }, + { + "account": "acc_IROu8Nod6PXPtZ", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": false + } + ], + "products": [], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "payment": { + "amount": 100, + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "token": "token_IJr7WSRFECVBSX", + "card": { + "cvv": "100" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill" + }, + "user_agent": "Mozilla/5.0" + } + + ```java: Java + import org.json.JSONObject; + import com.razorpay.Payment; + import com.razorpay.RazorpayClient; + import com.razorpay.RazorpayException; + + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "receipt#1"); + JSONObject notes = new JSONObject(); + notes.put("key1", "value3"); + notes.put("key2", "value2"); + orderRequest.put("notes", notes); + orderRequest.put("partial_payment", true); + orderRequest.put("customer_id", "cust_E9penp7VGhT5yt"); + JSONArray transfer = new JSONArray(); + + JSONObject transferAccount1 = new JSONObject(); + transferAccount1.put("account", "acc_IRQWUleX4BqvYn"); + transferAccount1.put("amount", 1000); + transferAccount1.put("currency", "INR"); + JSONObject transferAccountNotes1 = new JSONObject(); + transferAccountNotes1.put("branch", "Acme Corp Bangalore North"); + transferAccountNotes1.put("name", "Gaurav Kumar"); + transferAccount1.put("notes", transferAccountNotes1); + + JSONArray transferAccountLinkedAccountNotes = new JSONArray(); + transferAccountLinkedAccountNotes.put("branch"); + transferAccount1.put("linked_account_notes", transferAccountLinkedAccountNotes); + transferAccount1.put("on_hold", true); + transferAccount1.put("on_hold_until", 1671222870); + transfer.put(transferAccount1); + + JSONObject transferAccount2 = new JSONObject(); + transferAccount2.put("account", "acc_IROu8Nod6PXPtZ"); + transferAccount2.put("amount", 1000); + transferAccount2.put("currency", "INR"); + JSONObject transferAccountNotes2 = new JSONObject(); + transferAccountNotes2.put("branch", "Acme Corp Bangalore South"); + transferAccountNotes2.put("name", "Saurav Kumar"); + transferAccount2.put("notes", transferAccountNotes2); + JSONArray transferAccountLinkedAccountNotes2 = new JSONArray(); + transferAccountLinkedAccountNotes2.put("branch"); + transferAccount2.put("linked_account_notes", transferAccountLinkedAccountNotes2); + transferAccount2.put("on_hold", false); + transfer.put(transferAccount2); + orderRequest.put("transfers", transfer); + + JSONArray products = new JSONArray(); + orderRequest.put("products", products); + + JSONObject paymentConfig = new JSONObject(); + paymentConfig.put("capture", "automatic"); + JSONObject paymentConfigCaptureOptions = new JSONObject(); + paymentConfigCaptureOptions.put("automatic_expiry_period", 12); + paymentConfigCaptureOptions.put("manual_expiry_period", 7200); + paymentConfigCaptureOptions.put("refund_speed", "optimum"); + paymentConfig.put("capture_options", paymentConfigCaptureOptions); + orderRequest.put("payment_config", paymentConfig); + JSONObject payment = new JSONObject(); + payment.put("amount", 100); + payment.put("email", "gaurav.kumar@example.com"); + payment.put("contact", "9090909090"); + payment.put("method", "card"); + JSONObject paymentNotes = new JSONObject(); + paymentNotes.put("key1", "value3"); + paymentNotes.put("key2", "value2"); + payment.put("notes", paymentNotes); + JSONObject paymentCard = new JSONObject(); + paymentCard.put("number", "4386289407660153"); + paymentCard.put("name", "Gaurav"); + paymentCard.put("expiry_month", "11"); + paymentCard.put("expiry_year", "30"); + paymentCard.put("cvv", "100"); + payment.put("card", paymentCard); + JSONObject paymentAuthentication = new JSONObject(); + paymentAuthentication.put("authentication_channel", "browser"); + payment.put("authentication", paymentAuthentication); + JSONObject paymentBrowser = new JSONObject(); + paymentBrowser.put("java_enabled", false); + paymentBrowser.put("javascript_enabled", false); + paymentBrowser.put("timezone_offset", 11); + paymentBrowser.put("color_depth", 23); + paymentBrowser.put("screen_width", 23); + paymentBrowser.put("screen_height", 100); + payment.put("browser", paymentBrowser); + payment.put("ip", "105.106.107.108"); + payment.put("referer", "https://merchansite.com/example/paybill"); + orderRequest.put("payment", payment); + orderRequest.put("user_agent", "Mozilla/5.0"); + + Order order = instance.orders.create(orderRequest); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + var data = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "partial_payment": true, + "customer_id": "cust_E9penp7VGhT5yt", + "transfers": [ + { + "account": "acc_IRQWUleX4BqvYn", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": true, + "on_hold_until": 1671222870 + }, + { + "account": "acc_IROu8Nod6PXPtZ", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": false + } + ], + "products": [], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "payment": { + "amount": 100, + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill" + }, + "user_agent": "Mozilla/5.0" + } + + instance.orders.create(data); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "partial_payment": true, + "customer_id": "cust_E9penp7VGhT5yt", + "transfers": [ + { + "account": "acc_IRQWUleX4BqvYn", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": True, + "on_hold_until": 1671222870 + }, + { + "account": "acc_IROu8Nod6PXPtZ", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": False + } + ], + "products": [], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "payment": { + "amount": 100, + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill" + }, + "user_agent": "Mozilla/5.0" + }) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "partial_payment": 1, + "customer_id": "cust_E9penp7VGhT5yt", + "transfers": [ + { + "account": "acc_IRQWUleX4BqvYn", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": 1, + "on_hold_until": 1671222870 + }, + { + "account": "acc_IROu8Nod6PXPtZ", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": 0 + } + ], + "products": [], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "payment": { + "amount": 100, + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill" + }, + "user_agent": "Mozilla/5.0" + } + + Razorpay::Order.create(para_attr) + + ```php: PHP + $api = new Api($key_id, $secret); + $api->order->create(array('amount'=>50000,'currency'=>'INR','receipt'=>'receipt#1','notes'=>array('key1'=>'value3','key2'=>'value2',),'partial_payment'=>true,'customer_id'=>'cust_E9penp7VGhT5yt','transfers'=>array(array('account'=>'acc_IRQWUleX4BqvYn','amount'=>1000,'currency'=>'INR','notes'=>array('branch'=>'Acme Corp Bangalore North','name'=>'Gaurav Kumar',),'linked_account_notes'=>array('branch',),'on_hold'=>true,'on_hold_until'=>1671222870,),array('account'=>'acc_IROu8Nod6PXPtZ','amount'=>1000,'currency'=>'INR','notes'=>array('branch'=>'Acme Corp Bangalore South','name'=>'Gaurav Kumar',),'linked_account_notes'=>array('branch',),'on_hold'=>false,),),'products'=>array(),'payment_config'=>array('capture'=>'automatic','capture_options'=>array('automatic_expiry_period'=>12,'manual_expiry_period'=>7200,'refund_speed'=>'optimum',),),'payment'=>array('amount'=>100,'email'=>'gaurav.kumar@example.com','contact'=>'9090909090','method'=>'card','notes'=>array('key1'=>'value3','key2'=>'value2',),'card'=>array('number'=>'4386289407660153','name'=>'Gaurav','expiry_month'=>'11','expiry_year'=>'30','cvv'=>'100',),'authentication'=>array('authentication_channel'=>'browser',),'browser'=>array('java_enabled'=>false,'javascript_enabled'=>false,'timezone_offset'=>11,'color_depth'=>23,'screen_width'=>23,'screen_height'=>100,),'ip'=>'105.106.107.108','referer'=>'https://merchansite.com/example/paybill',),'user_agent'=>'Mozilla/5.0',)); + ``` + + ```json: Success + { + "id": "order_EKwxwAgItmmXdp", + "status": "attempted", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "created_at": 1582628071, + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "offer_id": null, + "attempts": 1, + "transfers": [], + "payment_workflow": { + "id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/authorize" + }, + { + "action": "otp_generate", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate?track_id=FVmAtLUe9XZSGM&key_id=" + } + ] + } + } + + ```json: Failure + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "order_create", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + #### Request Parameters + + `amount` _mandatory_ + : `integer` The amount for which the order was created in currency subunits. For example, for an amount of ₹295.00, enter 29500. The same amount will be used for the payment creation. For the partial payment scenario, we will use the amount specified in the payment request object in case. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `receipt` _optional_ + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `first_payment_min_amount` _optional_ + : `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of ₹7,000 is to be received from the customer in two installments of #1 - ₹5,000, #2 - ₹2,000, then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + + `customer_id` _optional_ + : `string` Unique identifier of the customer. + + `transfers` _optional_ + : `json object` Details regarding the transfer. + + `account` + : `string` The recipient account ID for fund transfer. + + `amount` _optional_ + : `string` The amount of the transfer. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `linked_account_notes` _optional_ + : `string` Notes associated with the linked account. + + `on_hold` _mandatory_ + : `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + + `on_hold_until` _mandatory_ + : `string` Timestamp until which the transfer amount is on hold. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `payment` _mandatory_ + : `object` Details of the payment. + + `amount` _optional_ + : `integer` The amount for which the order was created in currency subunits. For example, for an amount of ₹295.00, enter 29500. The same amount will be used for the payment creation. For the partial payment scenario, we will use the amount specified in the payment request object in case. + + `email` _mandatory_ + : `string` Email address of the customer. + + `contact` _mandatory_ + : `integer` Contact number of the customer. + + `method` _mandatory_ + : `string` Name of the payment method (example, netbanking, cards and upi). + + `card` _mandatory_ + : `object` Details of the payment. + + `number` _mandatory_ + : `integer` Details associated with the card. + + `expiry_month` _mandatory_ + : `string` Expiry month for the card in MM format. + + `name` _mandatory_ + : `string` Name of the cardholder. + + `expiry_year` _mandatory_ + : `string` Expiry year for the card in YY format. + + `cvv` _mandatory_ + : `integer` CVV printed on the back of the card. + + `ip` _mandatory_ + : `string` The customer's IP address. + + `referrer` _optional_ + : `string` Referrer header passed by the client's browser. + + `user-agent` _mandatory_ + : `string` The User-Agent header of the user's browser. The default value will be passed by Razorpay if not provided by you. + + `authentication` _mandatory_ + : `object` Details of the authentication method used for the payment. + + `authentication_channel` _mandatory_ + : `string` Specifies the channel through which authentication is performed. In this example, it's set to browser. + + `browser` _mandatory_ + : `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` _mandatory_ + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. + + `javascript_enabled` _mandatory_ + : `boolean` Indicates whether the customer's browser can execute JavaScript.Obtained from the `navigator` HTML DOM object. + + `timezone_offset` _mandatory_ + : `integer` Time difference between UTC time and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `color_depth` _mandatory_ + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `screen_width` _mandatory_ + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` _mandatory_ + : `integer` Obtained from the `navigator` HTML DOM object. + + + + Descriptions for the response parameters are present in the [Response parameter table](#response-parameters). + + + + +### UPI + + The following API will create a payment with `UPI` as the payment method: + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "partial_payment": true, + "customer_id": "cust_E9penp7VGhT5yt", + "transfers": [ + { + "account": "acc_IRQWUleX4BqvYn", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": true, + "on_hold_until": 1671222870 + }, + { + "account": "acc_IROu8Nod6PXPtZ", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": false + } + ], + "products": [], + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "payment": { + "amount": 100, + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "upi": { + "flow": "collect", + "vpa": "gauravkumar@okhdfcbank" + }, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } + }, + "user_agent": "Mozilla/5.0" + } + + ```java: Java + import org.json.JSONObject; + import com.razorpay.Payment; + import com.razorpay.RazorpayClient; + import com.razorpay.RazorpayException; + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "receipt#1"); + JSONObject notes = new JSONObject(); + notes.put("key1", "value3"); + notes.put("key2", "value2"); + orderRequest.put("notes", notes); + orderRequest.put("partial_payment", true); + orderRequest.put("customer_id", "cust_E9penp7VGhT5yt"); + JSONArray transfer = new JSONArray(); + + JSONObject transferAccount1 = new JSONObject(); + transferAccount1.put("account", "acc_IRQWUleX4BqvYn"); + transferAccount1.put("amount", 1000); + transferAccount1.put("currency", "INR"); + JSONObject transferAccountNotes1 = new JSONObject(); + transferAccountNotes1.put("branch", "Acme Corp Bangalore North"); + transferAccountNotes1.put("name", "Gaurav Kumar"); + transferAccount1.put("notes", transferAccountNotes1); + + JSONArray transferAccountLinkedAccountNotes = new JSONArray(); + transferAccountLinkedAccountNotes.put("branch"); + transferAccount1.put("linked_account_notes", transferAccountLinkedAccountNotes); + transferAccount1.put("on_hold", true); + transferAccount1.put("on_hold_until", 1671222870); + transfer.put(transferAccount1); + + JSONObject transferAccount2 = new JSONObject(); + transferAccount2.put("account", "acc_IROu8Nod6PXPtZ"); + transferAccount2.put("amount", 1000); + transferAccount2.put("currency", "INR"); + JSONObject transferAccountNotes2 = new JSONObject(); + transferAccountNotes2.put("branch", "Acme Corp Bangalore South"); + transferAccountNotes2.put("name", "Saurav Kumar"); + transferAccount2.put("notes", transferAccountNotes2); + JSONArray transferAccountLinkedAccountNotes2 = new JSONArray(); + transferAccountLinkedAccountNotes2.put("branch"); + transferAccount2.put("linked_account_notes", transferAccountLinkedAccountNotes2); + transferAccount2.put("on_hold", false); + transfer.put(transferAccount2); + orderRequest.put("transfers", transfer); + + JSONArray products = new JSONArray(); + orderRequest.put("products", products); + + JSONObject bankAccount = new JSONObject(); + bankAccount.put("account_number", "765432123456789"); + bankAccount.put("name", "Gaurav Kumar"); + bankAccount.put("ifsc", "HDFC0000053"); + orderRequest.put("bank_account", bankAccount); + JSONObject paymentConfig = new JSONObject(); + paymentConfig.put("capture", "automatic"); + JSONObject paymentConfigCaptureOptions = new JSONObject(); + paymentConfigCaptureOptions.put("automatic_expiry_period", 12); + paymentConfigCaptureOptions.put("manual_expiry_period", 7200); + paymentConfigCaptureOptions.put("refund_speed", "optimum"); + paymentConfig.put("capture_options", paymentConfigCaptureOptions); + orderRequest.put("payment_config", paymentConfig); + JSONObject payment = new JSONObject(); + payment.put("amount", 100); + payment.put("email", "gaurav.kumar@example.com"); + payment.put("contact", "9123456789"); + payment.put("ip", "192.168.0.103"); + payment.put("method", "upi"); + JSONObject upi = new JSONObject(); + upi.put("flow","collect"); + upi.put("vpa","gauravkumar@okhdfcbank"); + payment.put("upi", upi); + payment.put("referer", "http"); + payment.put("description", "Test payment"); + JSONObject paymentNotes = new JSONObject(); + paymentNotes.put("note_key", "value1"); + payment.put("notes", paymentNotes); + orderRequest.put("payment", payment); + orderRequest.put("user_agent", "Mozilla/5.0"); + + Order order = instance.orders.create(orderRequest); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + var data = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "partial_payment": true, + "customer_id": "cust_E9penp7VGhT5yt", + "transfers": [ + { + "account": "acc_IRQWUleX4BqvYn", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": true, + "on_hold_until": 1671222870 + }, + { + "account": "acc_IROu8Nod6PXPtZ", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": false + } + ], + "products": [], + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "payment": { + "amount": 100, + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "upi": { + "flow": "collect", + "vpa": "gauravkumar@okhdfcbank" + }, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } + }, + "user_agent": "Mozilla/5.0" + } + + instance.orders.create(data); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "partial_payment": true, + "customer_id": "cust_E9penp7VGhT5yt", + "transfers": [ + { + "account": "acc_IRQWUleX4BqvYn", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": True, + "on_hold_until": 1671222870 + }, + { + "account": "acc_IROu8Nod6PXPtZ", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": False + } + ], + "products": [], + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "payment": { + "amount": 100, + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "upi": { + "flow": "collect", + "vpa": "gauravkumar@okhdfcbank" + }, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } + }, + "user_agent": "Mozilla/5.0" + }) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "partial_payment": 1, + "customer_id": "cust_E9penp7VGhT5yt", + "transfers": [ + { + "account": "acc_IRQWUleX4BqvYn", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": ["branch"], + "on_hold": 1, + "on_hold_until": 1671222870 + }, + { + "account": "acc_IROu8Nod6PXPtZ", + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "Acme Corp Bangalore South", + "name": "Gaurav Kumar" + }, + "linked_account_notes": ["branch"], + "on_hold": 0 + } + ], + "products": [], + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "payment": { + "amount": 100, + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "upi": { + "flow": "collect", + "vpa": "gauravkumar@okhdfcbank" + }, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } + }, + "user_agent": "Mozilla/5.0" + } + + Razorpay::Order.create(para_attr) + + ```php: PHP + $api = new Api($key_id, $secret); + $api->order->create(array('amount'=>50000,'currency'=>'INR','receipt'=>'receipt#1','notes'=>array('key1'=>'value3','key2'=>'value2',),'partial_payment'=>true,'customer_id'=>'cust_E9penp7VGhT5yt','transfers'=>array(array('account'=>'acc_IRQWUleX4BqvYn','amount'=>1000,'currency'=>'INR','notes'=>array('branch'=>'Acme Corp Bangalore North','name'=>'Gaurav Kumar',),'linked_account_notes'=>array('branch',),'on_hold'=>true,'on_hold_until'=>1671222870,),1=>array('account'=>'acc_IROu8Nod6PXPtZ','amount'=>1000,'currency'=>'INR','notes'=>array('branch'=>'Acme Corp Bangalore South','name'=>'Gaurav Kumar',),'linked_account_notes'=>array('branch',),'on_hold'=>false,),),'products'=>array(),'bank_account'=>array('account_number'=>'765432123456789','name'=>'Gaurav Kumar','ifsc'=>'HDFC0000053',),'payment_config'=>array('capture'=>'automatic','capture_options'=>array('automatic_expiry_period'=>12,'manual_expiry_period'=>7200,'refund_speed'=>'optimum',),),'payment'=>array('amount'=>100,'email'=>'gaurav.kumar@example.com','contact'=>'9090909090','method'=>'upi','upi'=>array('flow'=>'collect','vpa'=>'gauravkumar@okhdfcbank',),'ip'=>'192.168.0.103','referer'=>'http','user_agent'=>'Mozilla/5.0','description'=>'Test payment','notes'=>array('note_key'=>'value1',),),'user_agent'=>'Mozilla/5.0',)); + ``` + + ```json: Success + { + "id": "order_EKwxwAgItmmXdp", + "status": "attempted", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "created_at": 1582628071, + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "offer_id": null, + "attempts": 1, + "transfers": [], + "payment_workflow": { + "id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_ERGVHAXaLNV1y5" + } + ] + } + } + + ```json: Failure + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "order_create", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + + ``` + + #### Request Parameters + + `amount` _mandatory_ + : `integer` The amount for which the order was created in currency subunits. For example, for an amount of ₹295.00, enter 29500. The same amount will be used for the payment creation. For the partial payment scenario, we will use the amount specified in the payment request object in case. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `receipt` _optional_ + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `first_payment_min_amount` _optional_ + : `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of ₹7,000 is to be received from the customer in two installments of #1 - ₹5,000, #2 - ₹2,000, then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + + `customer_id` _optional_ + : `string` Unique identifier of the customer. + + `transfers` _optional_ + : `json object` Details regarding the transfer. + + `account` + : `string` The recipient account ID for fund transfer. + + `amount` _optional_ + : `string` The amount of the transfer. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `linked_account_notes` _optional_ + : `string` Notes associated with the linked account. + + `on_hold` _mandatory_ + : `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + + `on_hold_until` _mandatory_ + : `string` Timestamp until which the transfer amount is on hold. + + `bank_account` _optional_ + : `json object` Details of the bank account that the customer provides at the time of registration. + + `account_number` _optional_ + : `string` Account number of the customers bank account. + + `name` _optional_ + : `string` The name associated with the bank account. + + `ifsc` _optional_ + : `string` The IFSC code of the bank. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `payment` _mandatory_ + : `object` Details of the payment. + + `amount` _optional_ + : `integer` The amount for which the order was created in currency subunits. For example, for an amount of . The same amount will be used for the payment creation. For the partial payment scenario, we will use the amount specified in the payment request object in case. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `contact` _mandatory_ + : `integer` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `ip` _mandatory_ + : `string` The customer's IP address. + + `method` _mandatory_ + : `string` Name of the payment method (example, netbanking, cards and upi). + + `bank` _mandatory_ + : `string` Name of the bank. + + `description` _mandatory_ + : `string` Description of the payment. + + `referrer` _optional_ + : `string` Referrer header passed by the client's browser. + + `upi` _mandatory_ + : `json object` Details of the UPI payment received. Only applicable if method is upi. + + `flow` + : `string` The type of UPI flow. Possible value in_app. + + `vpa` + : `string` The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, gauravkumar@exampleupi. + + `user_agent` _optional_ + : `string` The User-Agent header of the user's browser. The default value will be passed by Razorpay if not provided by you. + + Descriptions for the response parameters are present in the [Response parameter table](#response-parameters). + + + +### Response Parameters + + + #### Response Parameters + + If the payment request is valid, the response contains the following fields. + + `receipt` + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `status` + : `string` Status of the order. Possible values: + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + `id` + : `string` The unique identifier of the order. + + `amount` + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of ₹295.00, enter `29500`. + + `created_at` + : `integer` Indicates the Unix timestamp when this order was created. + + `amount_paid` + : `integer` Indicates the amount paid for the order. + + `amount_due` + : `integer` Indicates the amount due for the order. + + `currency` + : `string` The currency in which the transaction was made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `offer_id` + : `string` The unique identifier of the created offer. + + `attempts` + : `string` The number of payment attempts, successful and failed, that have been made against this order. + + `transfers` + : `string` Details regarding the transfer. + + `notes` + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. + + `payment_workflow` + : `array` Details regarding the payment. + + `id` + : `string` Unique identifier of the payment. + + `next` + : `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the bank page. + + `url` + : `string` URL endpoint where Razorpay will submit the final payment status. + + +> **WARN** +> +> +> **Watch Out!** +> +> After completing the initial step for your preferred payment method mentioned above, follow these common steps given below, applicable for all payment methods. +> + +> **WARN** +> +> +> **Watch Out!** +> +> The steps given below are common for all payment methods. +> + + Length must be of 3 characters. + + `receipt` _optional_ + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `first_payment_min_amount` _optional_ + : `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of , is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + + `customer_id` _optional_ + : `string` Unique identifier of the customer. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `payment` _mandatory_ + : `object` Details of the payment. + + `amount` _optional_ + : `integer` The amount for which the order was created in currency subunits. For example, for an amount of . The same amount will be used for the payment creation. For the partial payment scenario, we will use the amount specified in the payment request object in case. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `contact` _mandatory_ + : `integer` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `ip` _mandatory_ + : `string` The customer's IP address. + + `method` _mandatory_ + : `string` Name of the payment method. For example, `card`. + + `card` _mandatory_ + : `object` Details associated with the card. + + `number` + : `string` Unformatted card number. + + `name` + : `string` Name of the cardholder. + + `expiry_month` + : `string` Expiry month for the card in MM format. + + `expiry_year` + : `string` Expiry year for the card in YY format. + + `cvv` + : `string` CVV printed on the back of the card. + + `referrer` _optional_ + : `string` Referrer header passed by the client's browser. + + `user_agent` _optional_ + : `string` The User-Agent header of the user's browser. The default value will be passed by Razorpay if not provided by you. + + Descriptions for the response parameters are present in the [Response parameter table](#response-parameters). + + + +### ACH Direct Debit + + The following API will create a payment with `ach` as the payment method: + + ```curl: Request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/payments/create/json \ + -H "content-type: application/json" \ + -d '{ + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "partial_payment": true, + "customer_id": "cust_E9penp7VGhT5yt", + "products": [], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "payment": { + "amount": 50000, + "email": "", + "contact": "", + "method": "ach", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "bank_account": { + "account_number": "000000001234", + "name": "", + "bank_code": "122105278", + "bank_code_category": "routing_number", + "account_type": "personal_savings" + }, + "billing_address": { + "line1": "Block", + "line2": "Street", + "city": "San Jose", + "state": "California", + "postal_code": "33154" + } + } + }' + ``` + ```json: Response + { + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_GAWN9beXgaqRyO", + "razorpay_signature": "9ef4dffbfd84f1318f6ae648f114332d8401e0949a3d" + } + ```json: Failure - Account number + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "You entered an account number which is invalid or not found please try again", + "source": "customer", + "step": "validation", + "reason": "invalid_account_number" + } + } + ```json: Failure - Bank Code + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "You entered a bank code which is invalid or not found please try again", + "source": "customer", + "step": "validation", + "reason": "invalid_bank_code" + } + } + ```json: Failure - Account Type + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "You entered an account type which is invalid please try again", + "source": "customer", + "step": "validation", + "reason": "invalid_account_type" + } + } + ``` + + #### Request Parameters + + `amount` _mandatory_ + : `integer` The amount for which the order was created in currency subunits. For example, for an amount of , enter `29900`. The same amount will be used for the payment creation. For the partial payment scenario, we will use the amount specified in the payment request object in case. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `receipt` _optional_ + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `first_payment_min_amount` _optional_ + : `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of , is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + + `customer_id` _optional_ + : `string` Unique identifier of the customer. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `payment` _mandatory_ + : `object` Details of the payment. + + `amount` _optional_ + : `integer` The amount for which the order was created in currency subunits. For example, for an amount of , enter `29900`. The same amount will be used for the payment creation. For the partial payment scenario, we will use the amount specified in the payment request object in case. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `contact` _mandatory_ + : `integer` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `ip` _mandatory_ + : `string` The customer's IP address. + + `method` _mandatory_ + : `string` Name of the payment method. For example, `ach`. + + `bank_account` _mandatory_ + : `object` Bank account details. + + `account_number` _mandatory_ + : `string` Customer's bank account number. + + `name` _mandatory_ + : `string` Account holder's name as per bank records. + + `bank_code` _mandatory_ + : `string` The ACH routing number of the bank account. + + `bank_code_category` _mandatory_ + : `string` The category of bank code. Must be `routing_number` for ACH payments. + + `account_type` _mandatory_ + : `string` Type of bank account. Possible values: + - `personal_savings`: Individual savings account. + - `personal_checking`: Individual current account. + - `business_savings`: Business savings account. + - `business_checking`: Business current account. + + `billing_address` _optional_ + : `json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `San Jose`. + + `state` _optional_ + : `string` Name of the state. For example, `California`. + + `postal_code` _optional_ + : `string` Postal code of the state. For example, `33514`. + + `referrer` _optional_ + : `string` Referrer header passed by the client's browser. + + `user_agent` _optional_ + : `string` The User-Agent header of the user's browser. The default value will be passed by Razorpay if not provided by you. + + Descriptions for the response parameters are present in the [Response parameter table](#response-parameters). + + + +### Response Parameters + + + #### Response Parameters + + If the payment request is valid, the response contains the following fields. + + `receipt` + : `string` Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. + + `status` + : `string` Status of the order. Possible values: + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + `id` + : `string` The unique identifier of the order. + + `amount` + : `integer` The amount for which the order was created, in currency subunits. For example, for an amount of , enter `29900`. + + `created_at` + : `integer` Indicates the Unix timestamp when this order was created. + + `amount_paid` + : `integer` Indicates the amount paid for the order. + + `amount_due` + : `integer` Indicates the amount due for the order. + + `currency` + : `string` The currency in which the transaction was made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `offer_id` + : `string` The unique identifier of the created offer. + + `attempts` + : `string` The number of payment attempts, successful and failed, that have been made against this order. + + `transfers` + : `string` Details regarding the transfer. + + `notes` + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. + + `payment_workflow` + : `array` Details regarding the payment. + + `id` + : `string` Unique identifier of the payment. + + `next` + : `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the bank page. + + `url` + : `string` URL endpoint where Razorpay will submit the final payment status. + + + +### 1.1 Handle Payment Success and Error Events + + Once a customer completes the payment, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + + #### Success Callback + + If the payment made by the customer is successful, the following fields are sent: + + - `razorpay_payment_id` + - `razorpay_order_id` + - `razorpay_signature` + + ```json: Callback Example + { + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" + } + ``` + + #### Failure Callback + If the payment has failed, the callback will contain details of the error. Refer to [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) for details. + + Given below is a sample error code you will receive when the order fails. + + ```json: Order Create Failure Example + + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "order_create", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + Given below is a sample error code you will receive when the payment fails. + + +> **WARN** +> +> +> **Watch Out!** +> +> You can use the order id present in the metadata for additional payment attempts on the order without creating a new one. +> + + + + ```json: Payment Create Failure Example + + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect OTP", + "field": null, + "source": "customer", + "step": "payment_authentication", + "reason": "invalid_otp", + "metadata": { + "order_id": "order_EKwxwAgItmmXdp" + } + } + } + ``` + The following error occurs when the order was processed, payment was created in Razorpay but failed at gateway level. + + + ```json: Gateway Processing Error Example + + { + "error": { + "code": "GATEWAY_ERROR", + "description": "Authentication failed due to incorrect OTP", + "field": null, + "source": "customer", + "step": "payment_authentication", + "reason": "gateway failure", + "metadata": { + "order_id": "order_EKwxwAgItmmXdp", + "payment_id": "pay_TKwxwAgItmmXdp" + } + } + } + ``` + + + + +### 1.2 Retry/Re-Attempt Request + + Use the following sample code example to make a retry request using `Order id` and `Receipt` in the request. + + ```json: Order ID in request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d{ + "id": "order_EKwxwAgItmmXdp", + "payment": { + "amount": 100, + "currency": "", + "method": "card", + "card": { + "number": "", + "name": "", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, + "notes": { + "key1": "value3", + "key2": "value2" + } + } + } + + + ```json: Receipt in request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d{ + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "payment": { + "method": "card", + "card": { + "number": "", + "name": "", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "notes": { + "key1": "value3", + "key2": "value2" + } + } + } + ``` + + ```json: Success + { + "id": "order_EKwxwAgItmmXdp", + "status": "attempted", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "created_at": 1582628071, + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "offer_id": null, + "attempts": 1, + "transfers": [], + "payment_workflow": { + "id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/authorize" + }, + { + "action": "otp_generate", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate?track_id=FVmAtLUe9XZSGM&key_id=" + } + ] + } + } + + ```json: Failure + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The amount must be at least INR 1.00", + "source": "business", + "step": "order_create", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + + +### 1.3 Verify Payment Signature + + Signature verification is a mandatory step to ensure that the callback is sent by Razorpay. The `razorpay_signature` contained in the callback can be regenerated by your system and verified as follows. + + Create a string to be hashed using the `razorpay_payment_id` contained in the callback and the Order ID generated in the first step, separated by a `|`. Hash this string using SHA256 and your API Secret. + + ``` + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + #### Generate Signature on your Server + + ```java: Java +/** +* This class defines common routines for generating +* authentication signatures for Razorpay Webhook requests. +*/ +public class Signature +{ + private static final String HMAC_SHA256_ALGORITHM = "HmacSHA256"; + /** + * Computes RFC 2104-compliant HMAC signature. + * * @param data + * The data to be signed. + * @param key + * The signing key. + * @return + * The Base64-encoded RFC 2104-compliant HMAC signature. + * @throws + * java.security.SignatureException when signature generation fails + */ + public static String calculateRFC2104HMAC(String data, String secret) + throws java.security.SignatureException + { + String result; + try { + + // get an hmac_sha256 key from the raw secret bytes + SecretKeySpec signingKey = new SecretKeySpec(secret.getBytes(), HMAC_SHA256_ALGORITHM); + + // get an hmac_sha256 Mac instance and initialize with the signing key + Mac mac = Mac.getInstance(HMAC_SHA256_ALGORITHM); + mac.init(signingKey); + + // compute the hmac on input data bytes + byte[] rawHmac = mac.doFinal(data.getBytes()); + + // base64-encode the hmac + result = DatatypeConverter.printHexBinary(rawHmac).toLowerCase(); + + } catch (Exception e) { + throw new SignatureException("Failed to generate HMAC : " + e.getMessage()); + } + return result; + } +} + +```php: PHP +use Razorpay\Api\Api; +$api = new Api($key_id, $key_secret); +$attributes = array('razorpay_signature' => '23233', 'razorpay_payment_id' => '332' , 'razorpay_order_id' => '12122'); +$order = $api->utility->verifyPaymentSignature($attributes) + +```ruby: Ruby +require 'razorpay' +Razorpay.setup('key_id', 'key_secret') +payment_response = { + 'razorpay_order_id': '12122', + 'razorpay_payment_id': '332', + 'razorpay_signature': '23233' +} + +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET + Dictionary attributes = new Dictionary(); + + attributes.Add("razorpay_payment_id", paymentId); + attributes.Add("razorpay_order_id", Request.Form["razorpay_order_id"]); + attributes.Add("razorpay_signature", Request.Form["razorpay_signature"]); + + Utils.verifyPaymentSignature(attributes); +```nodejs: Node.js +var { validatePaymentVerification } = require('./dist/utils/razorpay-utils'); + +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); +```Go: Go +import ( + "crypto/hmac" + "crypto/sha256" + "crypto/subtle" + "encoding/hex" + "fmt" +) + +func main() { + signature := "477d1cdb3f8122a7b0963704b9bcbf294f65a03841a5f1d7a4f3ed8cd1810f9b" + secret := "qp3zKxwLZxbMORJgEVWi3Gou" + data := "order_J2AeF1ZpvfqRGH|pay_J2AfAxNHgqqBiI" + //fmt.Printf("Secret: %s Data: %s\n", secret, data) + + // Create a new HMAC by defining the hash type and the key (as byte array) + h := hmac.New(sha256.New, []byte(secret)) + + // Write Data to it + _, err := h.Write([]byte(data)) + + if err != nil { + panic(err) + } + + // Get result and encode as hexadecimal string + sha := hex.EncodeToString(h.Sum(nil)) + + fmt.Printf("Result: %s\n", sha) + + if subtle.ConstantTimeCompare([]byte(sha), []byte(signature)) == 1 { + fmt.Println("Works") + } +} +``` + + + +### 1.4 Integrate Payments Rainy Day Kit + + + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + + + + +### 1.5 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/upi/collect.md b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/upi/collect.md new file mode 100644 index 00000000..41248358 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/upi/collect.md @@ -0,0 +1,720 @@ +--- +title: 1. Build Integration for UPI Collect +description: Steps to integrate S2S JSON API and accept payments using UPI Collect +--- + +# 1. Build Integration for UPI Collect + +In case of UPI collect flow there is no redirect involved when the customer completes the payment, you will have to poll the Razorpay APIs to get the latest status of the payment. + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/s2s-integration.md). +> + +## Collect Flow Integration + +Follow the steps below to integrate S2S JSON API and accept payments using UPI Collect Flow. + +**1.1** [Create an Order](#11-create-an-order) + +**1.2** [Create a Payment](#12-create-a-payment) + +**1.3** [Handle Payment Success and Error Events](#13-handle-payment-success-and-error-events) + +**1.4** [Verify Payment Signature](#14-verify-payment-signature) + +**1.5** [Integrate Payments Rainy Day Kit](#15-integrate-payments-rainy-day-kit) + +**1.6** [Verify Payment Status](#16-verify-payment-status) + +> **WARN** +> +> +> **Watch Out!** +> +> Do not hardcode the URL returned in the API responses. +> + +### 1.1 Create an Order + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +### 1.2 Create a Payment + +Once an order is created, your next step is to create a payment. The following API will create a payment with `upi` as the payment method: + +/payments/create/json + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "order_id": "order_Ky7GhR2EgoKxOE", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "upi":{ + "flow":"collect", + "vpa":"gauravkumar@okhdfcbank" + }, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 500); +paymentRequest.put("currency", "INR"); +paymentRequest.put("order_id", "order_JZluwjknyWdhnU"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("contact", "9123456789"); +paymentRequest.put("method", "upi"); +paymentRequest.put("customer_id", "cust_EIW4T2etiweBmG"); +paymentRequest.put("ip", "192.168.0.103"); +paymentRequest.put("referer", "http"); +paymentRequest.put("user_agent", "Mozilla/5.0"); +paymentRequest.put("description", "Test flow"); +JSONObject notes = new JSONObject(); +notes.put("note_key", "value1"); +JSONObject upi = new JSONObject(); +upi.put("flow", "collect"); +upi.put("vpa", "gauravkumar@exampleupi"); +paymentRequest.put("notes", notes); +paymentRequest.put("upi", upi); + +Payment payment = instance.payments.createJsonPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson([ + "amount" => 200, + "currency" => "INR", + "order_id" => "order_Jhgp4wIVHQrg5H", + "email" => "gaurav.kumar@example.com", + "contact" => "9123456789", + "method" => "upi", + "customer_id" => "cust_EIW4T2etiweBmG", + "ip" => "192.168.0.103", + "referer" => "http", + "user_agent" => "Mozilla/5.0", + "description" => "Test flow", + "notes" => [ + "note_key" => "value1" + ], + "upi" => [ + "flow" => "collect", + "vpa" => "gauravkumar@exampleupi" + ] +]); + +```nodejs: Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_SECRET", +}); + +instance.payments.createUpi({ + amount: 200, + currency: "INR", + order_id: "order_GAWRjlWkVcRh0V", + email: "gaurav.kumar@example.com", + contact: "9123456789", + method: "upi", + customer_id: "cust_EIW4T2etiweBmG", + ip: "192.168.0.103", + referer: "http", + user_agent: "Mozilla/5.0", + description: "Test flow", + notes: { + note_key: "value1", + }, + upi: { + flow: "collect", + vpa: "gauravkumar@exampleupi" + }, +}); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) +client.payment.createPaymentJson( + { + "amount": 200, + "currency": "INR", + "order_id": "order_GAWRjlWkVcRh0V", + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": {"note_key": "value1"}, + "upi": { + "flow": "collect", + "vpa": "gauravkumar@exampleupi" + }, + } +) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary (); +paymentRequest.Add("amount", 100); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("order_id", "order_MSd9LNbSEB2Gnv"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9999999999"); +paymentRequest.Add("method", "upi"); +paymentRequest.Add("customer_id", "cust_Z6t7VFTb9xHeOs"); +paymentRequest.Add("ip", "192.168.0.103"); +paymentRequest.Add("referer", "http"); +paymentRequest.Add("user_agent", "Mozilla/5.0"); +paymentRequest.Add("description", "Test flow"); +Dictionary notes = new Dictionary (); +notes.Add("note_key", "value1"); +Dictionary upi = new Dictionary (); +upi.Add("flow", "collect"); +upi.Add("vpa", "gauravkumar@exampleupi"); +paymentRequest.Add("notes", notes); +paymentRequest.Add("upi", upi); + +Payment payment = client.Payment.CreateUpi(paymentRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') +para_attr = { + "amount": 200, + "currency": "INR", + "order_id": "order_GAWRjlWkVcRh0V", + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "note_key": "value1" + }, + "upi": { + "flow": "collect", + "vpa": "gauravkumar@exampleupi" + } +} + +Razorpay::Payment.create_upi(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") +para_attr: = map[string] interface {} { + "amount": 200, + "currency": "INR", + "order_id": "order_GAWRjlWkVcRh0V", + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": map[string] interface {} { + "note_key": "value1", + }, + "upi": map[string] interface {} { + "flow": "collect", + "vpa": "gauravkumar@exampleupi", + }, +} +body, err: = client.Payment.CreatePaymentJson(para_attr, nil) +``` + +```json: Response +{ + "razorpay_payment_id": "pay_ERGVHAXaLNV1y5", + "next": [ + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_ERGVHAXaLNV1y5" + } + ] +} +``` +Once the payment is successfully created, you will receive a response containing the `next` array. This array tells you the next steps that you should take to process the payment: + +`action` +: `string` The action that you need to perform further. In this case, the value is `poll` + +`url` +: `string` Contains the URL that you must poll to fetch the status of the payment, either `authorized` or `failed`. + +#### Request Parameters + +The payment request for each of the supported payment methods will slightly vary. Know more about the [relevant payment request fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md). + +> **WARN** +> +> +> **Watch Out!** +> +> The `email` field is mandatory by default. However, you can contact the [support team](https://razorpay.com/support/#request) to make it optional using a feature flag. +> + +### 1.3 Handle Payment Success and Error Events + +Once the payment is completed by the customer, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + +#### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +#### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) for details. + +### 1.4 Verify Payment Signature +Signature verification is a mandatory step to ensure that the callback is sent by Razorpay. The `razorpay_signature` contained in the callback can be regenerated by your system and verified as follows. + +Create a string to be hashed using the `razorpay_payment_id` contained in the callback and the Order ID generated in the first step, separated by a `|`. Hash this string using SHA256 and your API Secret. + +``` +generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + +if (generated_signature == razorpay_signature) { + payment is successful +} +``` + +#### Generate Signature on your Server + +```java: Java +/** +* This class defines common routines for generating +* authentication signatures for Razorpay Webhook requests. +*/ +public class Signature +{ + private static final String HMAC_SHA256_ALGORITHM = "HmacSHA256"; + /** + * Computes RFC 2104-compliant HMAC signature. + * * @param data + * The data to be signed. + * @param key + * The signing key. + * @return + * The Base64-encoded RFC 2104-compliant HMAC signature. + * @throws + * java.security.SignatureException when signature generation fails + */ + public static String calculateRFC2104HMAC(String data, String secret) + throws java.security.SignatureException + { + String result; + try { + + // get an hmac_sha256 key from the raw secret bytes + SecretKeySpec signingKey = new SecretKeySpec(secret.getBytes(), HMAC_SHA256_ALGORITHM); + + // get an hmac_sha256 Mac instance and initialize with the signing key + Mac mac = Mac.getInstance(HMAC_SHA256_ALGORITHM); + mac.init(signingKey); + + // compute the hmac on input data bytes + byte[] rawHmac = mac.doFinal(data.getBytes()); + + // base64-encode the hmac + result = DatatypeConverter.printHexBinary(rawHmac).toLowerCase(); + + } catch (Exception e) { + throw new SignatureException("Failed to generate HMAC : " + e.getMessage()); + } + return result; + } +} + +```php: PHP +use Razorpay\Api\Api; +$api = new Api($key_id, $key_secret); +$attributes = array('razorpay_signature' => '23233', 'razorpay_payment_id' => '332' , 'razorpay_order_id' => '12122'); +$order = $api->utility->verifyPaymentSignature($attributes) + +```ruby: Ruby +require 'razorpay' +Razorpay.setup('key_id', 'key_secret') +payment_response = { + 'razorpay_order_id': '12122', + 'razorpay_payment_id': '332', + 'razorpay_signature': '23233' +} + +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET + Dictionary attributes = new Dictionary(); + + attributes.Add("razorpay_payment_id", paymentId); + attributes.Add("razorpay_order_id", Request.Form["razorpay_order_id"]); + attributes.Add("razorpay_signature", Request.Form["razorpay_signature"]); + + Utils.verifyPaymentSignature(attributes); +```nodejs: Node.js +var { validatePaymentVerification } = require('./dist/utils/razorpay-utils'); + +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); +```Go: Go +import ( + "crypto/hmac" + "crypto/sha256" + "crypto/subtle" + "encoding/hex" + "fmt" +) + +func main() { + signature := "477d1cdb3f8122a7b0963704b9bcbf294f65a03841a5f1d7a4f3ed8cd1810f9b" + secret := "qp3zKxwLZxbMORJgEVWi3Gou" + data := "order_J2AeF1ZpvfqRGH|pay_J2AfAxNHgqqBiI" + //fmt.Printf("Secret: %s Data: %s\n", secret, data) + + // Create a new HMAC by defining the hash type and the key (as byte array) + h := hmac.New(sha256.New, []byte(secret)) + + // Write Data to it + _, err := h.Write([]byte(data)) + + if err != nil { + panic(err) + } + + // Get result and encode as hexadecimal string + sha := hex.EncodeToString(h.Sum(nil)) + + fmt.Printf("Result: %s\n", sha) + + if subtle.ConstantTimeCompare([]byte(sha), []byte(signature)) == 1 { + fmt.Println("Works") + } +} +``` + +### 1.5 Integrate Payments Rainy Day Kit + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + +### 1.6 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/upi/intent.md b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/upi/intent.md new file mode 100644 index 00000000..dfba6079 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/upi/intent.md @@ -0,0 +1,616 @@ +--- +title: 1. Build Integration for UPI Intent +description: Steps to integrate S2S JSON API and accept payments using UPI Intent +--- + +# 1. Build Integration for UPI Intent + +In case of UPI intent flow as there is no redirect involved when the customer completes the payment, you will have to poll the Razorpay APIs to get the latest status of the payment. + +## Intent Flow Integration + +Follow the steps below to integrate S2S JSON API and accept payments using UPI Intent Flow. + +**1.1** [Create an Order](#11-create-an-order) + +**1.2** [Create a Payment](#12-create-a-payment) + +**1.3** [Handle Payment Success and Error Events](#13-handle-payment-success-and-error-events) + +**1.4** [Verify Payment Signature](#14-verify-payment-signature) + +**1.5** [Integrate Payments Rainy Day Kit](#15-integrate-payments-rainy-day-kit) + +**1.6** [Verify Payment Status](#16-verify-payment-status) + +> **WARN** +> +> +> **Watch Out!** +> +> Do not hardcode the URL returned in the API responses. +> + +### 1.1 Create an Order + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +### 1.2 Create a Payment + +Once an order is created, your next step is to create a payment. The following API will create a `upi` payment with `intent` flow: + +/payments/create/json + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "order_id": "order_Ky7DOsYy3TVfLS", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "upi":{ + "flow":"intent" + }, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 500); +paymentRequest.put("currency", "INR"); +paymentRequest.put("order_id", "order_JZluwjknyWdhnU"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("contact", "9123456789"); +paymentRequest.put("method", "upi"); +paymentRequest.put("ip", "192.168.0.103"); +paymentRequest.put("referer", "http"); +paymentRequest.put("user_agent", "Mozilla/5.0"); +paymentRequest.put("description", "Test flow"); +JSONObject notes = new JSONObject(); +notes.put("purpose", "UPI test payment"); +JSONObject upi = new JSONObject(); +upi.put("flow", "intent"); +paymentRequest.put("notes", notes); +paymentRequest.put("upi", upi); + +Payment payment = instance.payments.createUpi(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createUpi(array("amount" => 200,"currency" => "INR","order_id" => "order_Jhgp4wIVHQrg5H","email" => "gaurav.kumar@example.com","contact" => "9123456789","method" => "upi","customer_id" => "cust_EIW4T2etiweBmG","ip" => "192.168.0.103","referer" => "http","user_agent" => "Mozilla/5.0","description" => "Test flow","notes" => array("note_key" => "value1"),"upi" => array("flow" => "intent"))); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createUpi({ + "amount": 100, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "purpose": "UPI test payment" + }, + "upi": { + "flow": "intent" + } +}); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") +para_attr: = map[string] interface {} { + "amount": 100, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": map[string] interface {} { + "purpose": "UPI test payment", + }, + "upi": map[string] interface {} { + "flow": "intent", + }, +} +body, err: = client.Payment.CreateUpi(para_attr, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') +para_attr = { + "amount": 100, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "purpose": "UPI test payment" + }, + "upi": { + "flow": "intent" + } +} + +Razorpay::Payment.create_upi(para_attr) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) +client.payment.createUpi( + { + "amount": 100, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": {"purpose": "UPI test payment"}, + "upi": { + "flow": "intent" + + }, + } +) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount",500); +paymentRequest.Add("currency","INR"); +paymentRequest.Add("order_id", "order_Z6t7VFTb9xHeOs"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9000090000"); +paymentRequest.Add("method", "upi"); +paymentRequest.Add("ip", "192.168.0.103"); +paymentRequest.Add("referer", "http"); +paymentRequest.Add("user_agent", "Mozilla/5.0"); +paymentRequest.Add("description", "Test flow"); +Dictionary notes = new Dictionary(); +notes.Add("purpose","UPI test payment"); +Dictionary upi = new Dictionary(); +upi.Add("flow","intent"); +paymentRequest.Add("notes",notes); +paymentRequest.Add("upi",upi); + +Payment payment = client.Payment.CreateUpi(paymentRequest); + +```json: Response +{ + "razorpay_payment_id": "pay_ERNEungCtXpZqM", + "next": [ + { + "action": "intent", + "url": "upi://pay?pa=upi@razopay&pn=acme&tr=QTeEWVyigzIBlUD&tn=razorpay&am=100&cu=INR&mc=5411" + }, + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_ERNEungCtXpZqM" + } + ] +} +``` + +The `next` array contains the following objects: + +`action` +: `string` In this case the value is `intent`. + +`url` +: `string` Contains the URL that the customer should be redirected to a mobile app. This is commonly done by rendering the URL returned by Razorpay in the form of a button or a link for the customer to use. + +`action` +: `string` The action that you need to take to fetch the status of the payment. In this case the value is `poll`. + +`url` +: `string` Contains the URL that you must poll to fetch the status of the payment, either `authorized` or `failed`. + +### 1.3 Handle Payment Success and Error Events + +Once the payment is completed by the customer, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + +#### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +#### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#errors) for details. + +## 1.4 Verify Payment Signature +Signature verification is a mandatory step to ensure that the callback is sent by Razorpay. The `razorpay_signature` contained in the callback can be regenerated by your system and verified as follows. + +Create a string to be hashed using the `razorpay_payment_id` contained in the callback and the Order ID generated in the first step, separated by a `|`. Hash this string using SHA256 and your API Secret. + +``` +generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + +if (generated_signature == razorpay_signature) { + payment is successful +} +``` + +#### Generate Signature on your Server + +```java: Java +/** +* This class defines common routines for generating +* authentication signatures for Razorpay Webhook requests. +*/ +public class Signature +{ + private static final String HMAC_SHA256_ALGORITHM = "HmacSHA256"; + /** + * Computes RFC 2104-compliant HMAC signature. + * * @param data + * The data to be signed. + * @param key + * The signing key. + * @return + * The Base64-encoded RFC 2104-compliant HMAC signature. + * @throws + * java.security.SignatureException when signature generation fails + */ + public static String calculateRFC2104HMAC(String data, String secret) + throws java.security.SignatureException + { + String result; + try { + + // get an hmac_sha256 key from the raw secret bytes + SecretKeySpec signingKey = new SecretKeySpec(secret.getBytes(), HMAC_SHA256_ALGORITHM); + + // get an hmac_sha256 Mac instance and initialize with the signing key + Mac mac = Mac.getInstance(HMAC_SHA256_ALGORITHM); + mac.init(signingKey); + + // compute the hmac on input data bytes + byte[] rawHmac = mac.doFinal(data.getBytes()); + + // base64-encode the hmac + result = DatatypeConverter.printHexBinary(rawHmac).toLowerCase(); + + } catch (Exception e) { + throw new SignatureException("Failed to generate HMAC : " + e.getMessage()); + } + return result; + } +} +```php: PHP +use Razorpay\Api\Api; +$api = new Api($key_id, $key_secret); +$attributes = array('razorpay_signature' => '23233', 'razorpay_payment_id' => '332' , 'order_id' => '12122'); +$order = $api->utility->verifyPaymentSignature($attributes) +```ruby: Ruby +require 'razorpay' +Razorpay.setup('key_id', 'key_secret') +payment_response = { + 'order_id': '12122', + 'razorpay_payment_id': '332', + 'razorpay_signature': '23233' +} + +Razorpay::Utility.verify_payment_signature(payment_response) +```python: Python +import razorpay + +client = razorpay.Client(auth = ('[key_id]', '[key_secret]')) +params_dict = { + 'order_id': '12122', + 'razorpay_payment_id': '332', + 'razorpay_signature': '23233' +} +client.utility.verify_payment_signature(params_dict) +``` + +### 1.5 Integrate Payments Rainy Day Kit + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + +### 1.6 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v2/go-live-checklist.md b/llm-content/payments/payment-gateway/s2s-integration/json/v2/go-live-checklist.md new file mode 100644 index 00000000..012b85d5 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v2/go-live-checklist.md @@ -0,0 +1,76 @@ +--- +title: 3. Go-live Checklist +description: Start accepting Live Payments through Razorpay Payment Gateway. +--- + +# 3. Go-live Checklist + +Consider these steps before taking the integration live. + +## Accept Live Payments + +Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + +## Payment Capture + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +## Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/payment-gateway/s2s-integration/json/v2/test-integration.md b/llm-content/payments/payment-gateway/s2s-integration/json/v2/test-integration.md new file mode 100644 index 00000000..2f72245a --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/json/v2/test-integration.md @@ -0,0 +1,79 @@ +--- +title: 2. Test Integration +description: Steps to test if the integration was successful. +--- + +# 2. Test Integration + +You can make test payments using one of the payment methods configured at the Checkout. + +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API Keys generated in the Test Mode in the Checkout code. + +Following are the payment methods supported as configured at Razorpay Checkout. + +## Netbanking + +You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + +## UPI + +You can enter one of the following UPI IDs: + +- `success@razorpay`: To make the payment successful. +- `failure@razorpay`: To fail the payment. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + +## Wallet + +You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + +## Cards + +You can use one of the test cards to make transactions in the Test Mode. Use any valid expiration date in the future and any random CVV to create a successful payment. + +Card Network | Domestic / International | Card Number | CVV & Expiry Date +--- +Mastercard | Domestic | 5267 3181 8797 5449 | Use a random CVV and any future date ^^^^ +--- +Visa | Domestic | 4386 2894 0766 0153 | +--- +Mastercard | International | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | +--- +Visa | International | 4012 8888 8888 1881 | + +### Test Cards + +Use the following test cards for Indian payments: + +Network | Card Number | CVV & Expiry Date +--- +Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ +--- +Mastercard | 5500 6700 0000 1002 | +--- +RuPay | 6527 6589 0000 1005 | +--- +Diners | 3608 280009 1007 | +--- +Amex | 3402 560004 01007 | + +#### Error Scenarios + +Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. +Check the following lists: +- [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). +- [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + +## Next Steps + +[Step 3: Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/go-live-checklist.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md new file mode 100644 index 00000000..f2561d79 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md @@ -0,0 +1,2285 @@ +--- +title: Payment Methods +description: Check the various payment methods you can configure at the checkout by integrating with Razorpay APIs. +--- + +# Payment Methods + +You can accept payments through several payment methods such as netbanking, debit cards, credit cards, wallets and UPI. However, you can configure payment methods of your choice for collecting payments from your customers. + +Check the [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/methods-api.md) activated for your account. + +### Check the API Endpoint + +On this page, we have listed the sample codes with the S2S JSON V2 API. If you are using the Redirect API version, use the API endpoint as suggested below: + +API Version | Endpoint +--- +Redirect | https://api.razorpay.com/v1/payments/create/redirect +--- +JSON V1 and V2 | https://api.razorpay.com/v1/payments/create/json + +#### Supported Payment Fields + +Understand the fields required to construct a payment request: + +`key_id` _mandatory_ +: `string` The key id that you have generated from the **API Keys** tab in the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, `INR`. Refer to the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order. + Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`ip` _mandatory_ +: `string` Customer's IP address. + +`email` _mandatory_ +: `string` Email address of the customer. Maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. Maximum length supported is 15 characters, inclusive of country code. + +`authentication` _optional_ +: `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + +`browser` _mandatory_ +: `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `language` + : `string` Obtained from the payer's browser using the `navigator.language` HTML DOM property. Maximum limit of 8 characters. + +`method` _mandatory_ +: `string` Name of the payment method. Possible values are: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + - `cardless_emi` + - `paylater` + +`card` +: `object` Details associated with the card. Required if the payment method is `card`. + + `number` _mandatory_ + : `string` Unformatted card number. Required if the method is `card`. + + `name` _mandatory_ + : `string` Name of the cardholder. Required if the method is `card`. + + `expiry_month` _mandatory_ + : `integer` Expiry month for card in `MM` format. Required if the method is `card`. + + `expiry_year` _mandatory_ + : `string` Expiry year for card in `YY` format. Required if the method is `card`. + + `cvv` _mandatory_ + : `string` CVV printed on the back of card. Required if the method is `card`. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +`bank` +: `string` Bank code of the bank used for the payment. Required if the method is `netbanking`. + +`bank_account` +: The details of the bank account that should be passed in the request. Required if the method is `emandate`. + + `account_number` _mandatory_ + : `string` Bank account number used to initiate the payment. + + `ifsc` _mandatory_ + : `string` IFSC of the bank used to initiate the payment. + + `name` _mandatory_ + : `string` Name associated with the bank account used to initiate the payment. + +`emi_duration` +: `string` The EMI duration in months. Required if the method is `emi`. + +`vpa` +: `string` Virtual payment address of the customer. Required if the method is `upi`. + +`wallet` +: `string` Wallet code for the wallet used for the payment. Required if the method is `wallet`. + +`notes` _optional_ +: `object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`referrer` _optional_ +: `string` Referrer header passed by the client's browser. + +`user_agent` _optional_ +: `string` Customer user-agent. + +Sample payloads for each of the payment methods are shown below in the JSON format. + +## Debit and Credit Cards + +Given below is the sample code for card payments: + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + } + // Note: The authentication and browser parameters are applicable for 3DS 2 transactions +}' + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient instance = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 100); +paymentRequest.put("currency", "INR"); +paymentRequest.put("contact", "9000090000"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("order_id", "order_DPzFe1Q1dEOKed"); +paymentRequest.put("method", "card"); + +JSONObject card = new JSONObject(); +card.put("number", "4386289407660153"); +card.put("name", "Gaurav"); +card.put("expiry_month", 11); +card.put("expiry_year", 30); +card.put("cvv", 100); +paymentRequest.put("card", card); + +JSONObject authentication = new JSONObject(); +authentication.put("authentication_channel", "browser"); +paymentRequest.put("authentication", authentication); + +JSONObject browser = new JSONObject(); +browser.put("java_enabled", false); +browser.put("javascript_enabled", false); +browser.put("timezone_offset", 11); +browser.put("color_depth", 23); +browser.put("screen_width", 23); +browser.put("screen_height", 100); +paymentRequest.put("browser", browser); + +Payment payment = instance.payments.createJsonPayment(paymentRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount", 100); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("contact", "9900008989"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("order_id", "order_DPzFe1Q1dEOKed"); +paymentRequest.Add("method", "card"); + +Dictionary card = new Dictionary(); +card.Add("number", "4386289407660153"); +card.Add("name", "Gaurav"); +card.Add("expiry_month", "11"); +card.Add("expiry_year", "30"); +card.Add("cvv", "100"); +paymentRequest.Add("card", card); + +Dictionary authentication = new Dictionary(); +authentication.Add("authentication_channel", "browser"); +paymentRequest.Add("authentication", authentication); + +Dictionary browser = new Dictionary(); +browser.Add("java_enabled", false); +browser.Add("javascript_enabled", false); +browser.Add("timezone_offset", 11); +browser.Add("color_depth", 23); +browser.Add("screen_width", 23); +browser.Add("screen_height", 100); +paymentRequest.Add("browser", browser); + +Payment payment = client.Payment.CreateJsonPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson(array('amount'=>100,'currency'=>'INR','contact'=>'9900008989','email'=>'gaurav.kumar@example.com','order_id'=>'order_DPzFe1Q1dEOKed','method'=>'card','card'=>array('number'=>'4386289407660153','name'=>'Gaurav','expiry_month'=>11,'expiry_year'=>30,'cvv'=>100,),'authentication'=>array('authentication_channel'=>'browser',),'browser'=>array('java_enabled'=>false,'javascript_enabled'=>false,'timezone_offset'=>11,'color_depth'=>23,'screen_width'=>23,'screen_height'=>100,))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var data = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + } +}; + +instance.payments.createPaymentJson(data); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": False, + "javascript_enabled": False, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + } +} + +client.payment.createPaymentJson(data) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": False, + "javascript_enabled": False, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + } +} + +Razorpay::Payment.create_json_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card": map[string]interface{}{ + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100, + }, + "authentication": map[string]interface{}{ + "authentication_channel": "browser", + }, + "browser": map[string]interface{}{ + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": + +```json: Response +{ + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/LdDXnHYxjDwQ1b/authenticate?rearch=1" + }, + { + "action": "otp_generate", + "url": "https://api.razorpay.com/pg_router/v1/payments/pay_LdDXnHYxjDwQ1b/otp_generate?key_id=rzp_live_XXXXXXXXXXXXXX" + } + ], + "razorpay_payment_id": "pay_LdDXnHYxjDwQ1b" +} +``` + +#### Supported Card Networks +List of supported card networks: +- Visa +- Mastercard +- American Express +- Bajaj +- Maestro +- Rupay +- Diners + +## Netbanking + +Given below is the sample code for netbanking payments. Pass the value for the `bank` parameter as shown below: + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json +-H "Content-Type: application/json" \ +-d '{ + "amount": 200000, + "currency": "INR", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEObDT", + "method": "netbanking", + "bank": "HDFC" +}' + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; +RazorpayClient instance = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", "100"); +paymentRequest.put("currency", "INR"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("contact", "9000090000"); +paymentRequest.put("order_id", "order_EAkbvXiCJlwhHR"); +paymentRequest.put("method", "netbanking"); +paymentRequest.put("bank", "HDFC"); + +Payment payment = instance.payments.createJsonPayment(paymentRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount", "100"); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9000090000"); +paymentRequest.Add("order_id", "order_EAkbvXiCJlwhHR"); +paymentRequest.Add("method", "netbanking"); +paymentRequest.Add("bank", "HDFC"); + +Payment payment = client.Payment.CreateJsonPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson(array( + 'amount' => '100', + 'currency' => 'INR', + 'email' => 'gaurav.kumar@example.com', + 'contact' => '9000090000', + 'order_id' => 'order_EAkbvXiCJlwhHR', + 'method' => 'netbanking', + 'bank' => 'HDFC', +)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var data = { + "amount": "100", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "method": "netbanking", + "bank": "HDFC" +}; + +instance.payments.createPaymentJson(data); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": "100", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "method": "netbanking", + "bank": "HDFC" +} + +client.payment.createPaymentJson(data) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": "100", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "method": "netbanking", + "bank": "HDFC" +} + +Razorpay::Payment.create_json_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": "100", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "method": "netbanking", + "bank": "HDFC", +} + +body, err := client.Payment.CreatePaymentJson(para_attr, nil) + +```json: Response +{ + "razorpay_payment_id": "pay_LH5u4G73PdHG6s", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/LH5u4G73PdHG6s/authenticate" + } + ] +} +``` + +#### Supported Banks + +Fetch the supported bank codes using the [Methods API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/methods-api.md). + +## EMI + +Given below is the sample code for EMI payments. Pass the card details along with these parameters: +- `method` +- `emi_duration` + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 200000, + "currency": "INR", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEObeD", + "method": "emi", + "emi_duration": 9, + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + } + // Note: The authentication and browser parameters are applicable for 3DS 2 transactions +}' + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; +RazorpayClient instance = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 100); +paymentRequest.put("currency", "INR"); +paymentRequest.put("contact", "9900008989"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("order_id", "order_DPzFe1Q1dEOKed"); +paymentRequest.put("method", "emi"); +paymentRequest.put("emi_duration", 9); + +JSONObject card = new JSONObject(); +card.put("number", "4386289407660153"); +card.put("name", "Gaurav"); +card.put("expiry_month", "11"); +card.put("expiry_year", "2030"); +card.put("cvv", "100"); +paymentRequest.put("card", card); + +JSONObject authentication = new JSONObject(); +authentication.put("authentication_channel", "browser"); +paymentRequest.put("authentication", authentication); + +JSONObject browser = new JSONObject(); +browser.put("java_enabled", false); +browser.put("javascript_enabled", false); +browser.put("timezone_offset", 11); +browser.put("color_depth", 23); +browser.put("screen_width", + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount", 100); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("contact", "9900008989"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("order_id", "order_DPzFe1Q1dEOKed"); +paymentRequest.Add("method", "emi"); +paymentRequest.Add("emi_duration", 9); + +Dictionary card = new Dictionary(); +card.Add("number", "4386289407660153"); +card.Add("name", "Gaurav"); +card.Add("expiry_month", "11"); +card.Add("expiry_year", "30"); +card.Add("cvv", "100"); +paymentRequest.Add("card", card); + +Dictionary authentication = new Dictionary(); +authentication.Add("authentication_channel", "browser"); +paymentRequest.Add("authentication", authentication); + +Dictionary browser = new Dictionary(); +browser.Add("java_enabled", false); +browser.Add("javascript_enabled", false); +browser.Add("timezone_offset", 11); +browser.Add("color_depth", 23); +browser.Add("screen_width", 23); +browser.Add("screen_height", 100); +paymentRequest.Add("browser", browser); + +paymentRequest.Add("ip", "105.106.107.108"); +paymentRequest.Add("referer", "https://merchansite.com/example/paybill"); +paymentRequest.Add("user_agent", "Mozilla/5.0"); + +Payment payment = client.Payment.CreateJsonPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson(array('amount'=>200000,'currency'=>'INR','contact'=>'9000090000','email'=>'gaurav.kumar@example.com','order_id'=>'order_DPzFe1Q1dEObeD','method'=>'emi','emi_duration'=>9,'card'=>array('number'=>'4386289407660153','name'=>'Gaurav','expiry_month'=>11,'expiry_year'=>30,'cvv'=>100,),'authentication'=>array('authentication_channel'=>'browser',),'browser'=>array('java_enabled'=>false,'javascript_enabled'=>false,'timezone_offset'=>11,'color_depth'=>23,'screen_width'=>23,'screen_height'=>100,),)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var data = { + "amount": 200000, + "currency": "INR", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEObeD", + "method": "emi", + "emi_duration": 9, + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + } +}; + +instance.payments.createPaymentJson(data); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 200000, + "currency": "INR", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEObeD", + "method": "emi", + "emi_duration": 9, + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": False, + "javascript_enabled": False, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + } +} + +Razorpay::Payment.create_json_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data = { + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "emi", + "emi_duration": 9, + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "2030", + "cvv": "100" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": False, + "javascript_enabled": False, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + } +} + +client.payment.createPaymentJson(data) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": 200000, + "currency": "INR", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEObeD", + "method": "emi", + "emi_duration": 9, + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": False, + "javascript_enabled": False, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + } +} + +client.payment.createPaymentJson(data) + +```json: Response +{ + "razorpay_payment_id": "pay_LH60wSfk9n0H3U", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/LH60wSfk9n0H3U/authenticate" + }, + { + "action": "otp_generate", + "url": "https://api.razorpay.com/v1/payments/pay_LH60wSfk9n0H3U/otp_generate?track_id=LH60wSfk9n0H3U&key_id=rzp_test_XXXXXXXXXXXXXX" + } + ] +} +``` + +### EMI Plans + +- Fetch the available EMI plans (for each supported bank) by invoking the [Methods API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/methods-api.md). Extract the EMI plans from the response to be shown to your customers while making the payment. +- Know more about EMI plans offered by [OneCard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/emi/one-card.md) and [HSBC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/emi/hsbc.md). + +## Cardless EMI + +Given below is the sample code for Cardless EMI payments. + +> **INFO** +> +> +> **Handy Tips** +> +> - Contact our [Support Team](https://razorpay.com/support/#request) to get the Cardless EMI payment method enabled for your account. +> - Customers should have accounts with the Cardless EMI payment partner. +> +> + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json +-H "Content-Type: application/json" \ +-d '{ + "amount": 200000, + "currency": "INR", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOboB", + "method": "cardless_emi", + "provider": "zestmoney" +}' + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient instance = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 200000); +paymentRequest.put("currency", "INR"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("contact", "9000090000"); +paymentRequest.put("order_id", "order_EAkbvXiCJlwhHR"); +paymentRequest.put("method", "cardless_emi"); +paymentRequest.put("bank", "zestmoney"); + +Payment payment = instance.payments.createJsonPayment(paymentRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount", "100"); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9000090000"); +paymentRequest.Add("order_id", "order_EAkbvXiCJlwhHR"); +paymentRequest.Add("method", "cardless_emi"); +paymentRequest.Add("bank", "zestmoney"); + +Payment payment = client.Payment.CreateJsonPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson(array( + 'amount' => '200000', + 'currency' => 'INR', + 'email' => 'gaurav.kumar@example.com', + 'contact' => '9000090000', + 'order_id' => 'order_EAkbvXiCJlwhHR', + 'method' => 'cardless_emi', + 'bank' => 'zestmoney', +)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var data = { + "amount": "200000", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "method": "cardless_emi", + "bank": "zestmoney" +}; + +instance.payments.createPaymentJson(data); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": "200000", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "method": "cardless_emi", + "bank": "zestmoney" +} + +client.payment.createPaymentJson(data) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": "200000", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "method": "cardless_emi", + "bank": "zestmoney" +} + +Razorpay::Payment.create_json_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": "200000", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "method": "cardless_emi", + "bank": "zestmoney", +} + +body, err := client.Payment.CreatePaymentJson(para_attr, nil) + +```json: Response +{ + "razorpay_payment_id": "pay_LH62CGnxazBBkn", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/LH62CGnxazBBkn/authenticate" + } + ] +} +``` + +#### Supported Providers + +List of supported Cardless EMI providers: + +Banks | Provider Code | Minimum Order Amount +--- +ICICI Bank | `icic` | ₹7000 +--- +IDFC Bank | `idfb` | ₹5000 +--- +HDFC Bank | `hdfc` | ₹5000 +--- +Kotak Bank| `kkbk` | ₹3000 +--- +axio | `walnut369` | ₹900 +--- +Fibe | `earlysalary` | ₹3000 +--- +ZestMoney | `zestmoney` | ₹3000 + +## Wallet + +Given below is the sample code for wallet payments. Pass the wallet provider name as shown: + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json +-H "Content-Type: application/json" \ +-d '{ + "amount": 200000, + "currency": "INR", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEObDU", + "method": "wallet", + "wallet": "payzapp" +}' + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; +RazorpayClient instance = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 200000); +paymentRequest.put("currency", "INR"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("contact", "9000090000"); +paymentRequest.put("order_id", "order_EAkbvXiCJlwhHR"); +paymentRequest.put("method", "wallet"); +paymentRequest.put("bank", "payzapp"); + +Payment payment = instance.payments.createJsonPayment(paymentRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount", "200000"); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9000090000"); +paymentRequest.Add("order_id", "order_EAkbvXiCJlwhHR"); +paymentRequest.Add("method", "wallet"); +paymentRequest.Add("bank", "payzapp"); + +Payment payment = client.Payment.CreateJsonPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson(array( + 'amount' => '200000', + 'currency' => 'INR', + 'email' => 'gaurav.kumar@example.com', + 'contact' => '9000090000', + 'order_id' => 'order_EAkbvXiCJlwhHR', + 'method' => 'wallet', + 'bank' => 'payzapp', +)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var data = { + "amount": "200000", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "method": "wallet", + "bank": "payzapp" +}; + +instance.payments.createPaymentJson(data); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": "200000", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "method": "wallet", + "bank": "payzapp" +} + +client.payment.createPaymentJson(data) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": "200000", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "method": "wallet", + "bank": "payzapp" +} + +Razorpay::Payment.create_json_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": "200000", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "method": "wallet", + "bank": "payzapp", +} + +body, err := client.Payment.CreatePaymentJson(para_attr, nil) + +```json: Response +{ + "razorpay_payment_id": "pay_LH66fCVePbPIN3", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/LH66fCVePbPIN3/authenticate" + } + ] +} +``` + +#### Supported Wallets + +The table below lists the various wallets available to you. Some of them are available by default, while others require approval from us. Raise a request with our [ Support Team](https://razorpay.com/support/#request) to enable such wallets. + +Wallet Provider | Availability | Wallet Code +--- +PayZapp | Requires [approval](https://razorpay.com/support) | `payzapp` +--- +Airtel Money | ✓ | `airtelmoney` +--- +MobiKwik | ✓ | `mobikwik` +--- +JioMoney | ✓ | `jiomoney` +--- +Ola Money | ✓ | `olamoney` +--- +Bajaj Pay | Requires [approval](https://razorpay.com/support) | `bajajpay` +--- +PhonePe | Requires [approval](https://razorpay.com/support) | `phonepe` +--- +[PhonePe Switch](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md) | **For businesses registered with PhonePe Switch only** | `phonepeswitch` +--- +[PayPal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paypal.md) | **International Payments Only**. +Requires [approval](https://razorpay.com/support) | `paypal` +--- +[Amazon Pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/amazon-pay.md)| Requires [approval](https://razorpay.com/support) | `amazonpay` + +. + +Wallet Provider | Wallet Code | Availability +--- +PayZapp | `payzapp` | Requires approval (Reach out to support team) +--- +Airtel Money | `airtelmoney` | ✓ +--- +MobiKwik | `mobikwik` | ✓ +--- +JioMoney| `jiomoney` | ✓ +--- +Ola Money | `olamoney` | ✓ +--- +PhonePe | `phonepe` | Requires approval (Reach out to support team) +--- +[PhonePe Switch](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md) | `phonepeswitch` | **For businesses registered with PhonePe Switch only** +--- +[PayPal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paypal.md) | `paypal` | **International Payments Only** +Requires approval (Reach out to support team) +--- +[Amazon Pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/amazon-pay.md) | `amazonpay` | Requires approval (Reach out to support team) + +> **INFO** +> +> +> +> **Handy Tips** +> +> [Integrate your PayPal account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/paypal.md#integration-steps) with Razorpay Checkout to accept payments in international currencies. +> +> You can accept payments based on the transaction limit of your PayPal account. +> +> + +## UPI + +Know about [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md) and [UPI Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi.md). + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/s2s-integration.md). +> + +## Pay Later + +Given below is the sample code for Pay Later payments. + +> **INFO** +> +> +> **Handy Tips** +> +> - Contact our [Support Team](https://razorpay.com/support/#request) to get this payment method enabled for your account. +> - Customers should have accounts with the Pay Later service providers. +> + +Once the order is created and the customer's payment details are obtained, the information should be sent to Razorpay to complete the payment. You can do this by invoking `createPayment` and passing `method=paylater` and `provider=`. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 200000, + "currency": "INR", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEObDv", + "method": "paylater", + "provider": "" +}' + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; +RazorpayClient instance = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 200000); +paymentRequest.put("currency", "INR"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("contact", "9000090000"); +paymentRequest.put("order_id", "order_EAkbvXiCJlwhHR"); +paymentRequest.put("method", "paylater"); +paymentRequest.put("provider", ""); + +Payment payment = instance.payments.createJsonPayment(paymentRequest); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount", "200000"); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9000090000"); +paymentRequest.Add("order_id", "order_EAkbvXiCJlwhHR"); +paymentRequest.Add("method", "paylater"); +paymentRequest.Add("provider", ""); + +Payment payment = client.Payment.CreateJsonPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson(array( + 'amount' => '200000', + 'currency' => 'INR', + 'email' => 'gaurav.kumar@example.com', + 'contact' => '9000090000', + 'order_id' => 'order_EAkbvXiCJlwhHR', + 'method' => 'paylater', + 'provider' => '' +)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var data = { + "amount": "200000", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "method": "paylater", + "provider": "" +}; + +instance.payments.createPaymentJson(data); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": "200000", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "method": "paylater", + "provider": "" +} + +client.payment.createPaymentJson(data) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = data = { + "amount": "200000", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "method": "paylater", + "provider": "" +} + +Razorpay::Payment.create_json_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": "200000", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "method": "paylater", + "provider": "", +} + +body, err := client.Payment.CreatePaymentJson(para_attr, nil) + +```json: Response +{ + "razorpay_payment_id": "pay_LH691g8owT4PUh", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/LH691g8owT4PUh/authenticate" + } + ] +} +``` + +#### Supported Providers + +Provider | Provider Code | Availability | Minimum Transaction | Maximum Transaction +--- +LazyPay | `lazypay` | [Requires Approval](https://razorpay.com/support/#request) | ₹1 | ₹10,000 +--- +PayPal | `paypal` | [Requires Approval](https://razorpay.com/support/#request) | ₹100 | Based on the customer's approved limit. + +## CRED + +Your customers can pay via a combination of CRED Coins and Credit Cards saved on CRED. + +To add CRED Pay as a payment method, you need to: +- Pass the `app_offer` parameter in Orders API. +- Pass the `method` and `provider` parameters in Create Payments API. + +#### Pass app_offer Parameter in Order + +You must create an order using Orders API. In the response, you obtain an `order_id` which you must pass to Checkout. + + /orders + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true +}' +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true + }) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => 'receipt#1', 'amount' => 1000, 'currency' => 'INR', 'app_offer'=> true)); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 1000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("app_offer", true); +Order order = client.Order.Create(options); + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000, + currency: "INR", + receipt: "receipt#1", + app_offer: true +}) + +```go: go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true +} +body, err := client.Order.Create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 1000, currency: 'INR', receipt: 'receipt#1', app_offer: true + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); // amount in the smallest currency unit +orderRequest.put("currency", "INR"); +orderRequest.put("receipt", "receipt#1"); +orderRequest.put("app_offer", true); + +Order order = razorpay.orders.create(orderRequest); + +```json: Response +{ + "id": "order_FNPoKwCtPyhJOt", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1596703420 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency sub-unit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Default is `INR`. + +`app_offer` _optional_ +: `boolean` Allow/disallow customers from using CRED coins to make payments. This is used to prevent double discounting scenarios where customers have already availed discounts using voucher/coupon and you do not want them to redeem Coins as well. Possible values: + - `true`: Customer not allowed to use CRED coins to make payment. + - `false` (default): Customer can use CRED coins to make payment. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Pass method and provider Parameters in Create Payments API + +```curl: Create Payment +curl -X POST https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type: application/json' +-d '{ + "amount": 1000, + "currency": "INR", + "contact": 9900988990, + "email": "gaurav.kumar@example.com", + "order_id": "order_4xbQrmEoA5WJ0G", + "method": "app", + "provider": "cred", + "app_present": "false" +}' +```json: Response +{ + "razorpay_payment_id": "pay_xxxx", + "next": [ + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_xxx/status" + } + ] +} +``` + +#### Request Parameters + +Along with the other Create Payment API request parameters, you must pass: + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it must be `app`. + +`provider` _mandatory if method=app_ +: `string` Name of the PSP app. Here, it must be `cred`. + +`app_present` _mandatory if app=cred_ +: `boolean` Sets the payment flow as collect. Possible values: + - `true`: Opens CRED app on customer's device. + - `false` (default): Sends a push notification to customer's device. + +## Emandate + +You can accept recurring payments from your customers using `emandate`, `card` or `upi` as the method. Know more about [Recurring Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments.md). + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +### Workflow + +1. [Create a customer.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md#create-a-customer) +2. Create an Order with method as `emandate`, `nach` or `upi`. +3. Collect authorisation transaction. + - Using custom checkout + - Using an authorization link +4. Verify Tokens. +5. Charge subsequent payments. + +Know more about steps 2,3,4 and 5 in [Recurring Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md). + +#### Sample Checkout Code to Collect Authorisation Transaction + +```curl: Emandate (Netbanking) +curl -X POST \ +https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount":0, + "currency":"INR", + "contact":"9000090000", + "email":"gaurav.kumar@example.com", + "order_id":"order_EAbtuXPh24LrEc", + "customer_id":"cust_E9penp7VGhT5yt", + "recurring":"1", + "method":"emandate", + "bank":"HDFC", + "auth_type":"netbanking", + "bank_account":{ + "name":"Gaurav Kumar", + "account_number":"1121431121541121", + "account_type":"savings", + "ifsc":"HDFC0000001" + } +}' +```curl: Emandate (Debit Card) +curl -X POST \ +https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount":0, + "currency":"INR", + "contact":"9000090000", + "email":"gaurav.kumar@example.com", + "order_id":"order_EAbtuXPh24LrEc", + "customer_id":"cust_E9penp7VGhT5yt", + "recurring":"1", + "method":"emandate", + "bank":"HDFC", + "auth_type":"debitcard", + "bank_account":{ + "name":"Gaurav Kumar", + "account_number":"1121431121541121", + "account_type":"savings", + "ifsc":"HDFC0000001" + } +}' +```curl: Emandate (Aadhaar) +curl -X POST \ +https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount":0, + "currency":"INR", + "contact":"9000090000", + "email":"gaurav.kumar@example.com", + "order_id":"order_EAbtuXPh24LrEc", + "customer_id":"cust_E9penp7VGhT5yt", + "recurring":"1", + "method":"emandate", + "bank":"HDFC", + "auth_type":"aadhaar", + "bank_account":{ + "name":"Gaurav Kumar", + "account_number":"1121431121541121", + "account_type":"savings", + "ifsc":"HDFC0000001" + } +}' +```curl: Cards +curl -X POST \ +https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": "100", + "currency": "INR", + "contact":"9000090000", + "email":"gaurav.kumar@example.com", + "order_id": "order_EAeQWl3JYERSly", + "customer_id":"cust_Cg3pRMEIgetEDe", + "recurring":"1", + "method": "card", + "card": { + "number": "4047458064386281", + "cvv": "123", + "expiry_month": "01", + "expiry_year": "30", + "name": "Gaurav Kumar" + } +}' +```curl: UPI +curl -X POST \ +https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": "100", + "currency": "INR", + "contact":"9000090000", + "email":"gaurav.kumar@example.com", + "order_id": "order_EAeQWl3JYERSly", + "customer_id":"cust_Cg3pRMEIgetEDe", + "recurring":"1", + "method": "upi", + "flow": "collect”, +​ "upi" : { + "vpa": "gaurav.kumar@exampleupi" //Payer VPA in case of collect request + } +}' +``` + +### Upload NACH File Using API + +The current way to collect the NACH form is via Razorpay: + +* Checkout +* Merchant Dashboard +* Hosted Checkout page, where a customer signs and uploads the form via Checkout while attempting authorisation transaction. + +You can upload the signed NACH forms that you have collected from your customers using the NACH file API. Razorpay OCR-enabled NACH engine submits the form to NPCI. on successful verification and you will receive a success/failure response. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +Follow these steps to register a NACH mandate via S2S Image Transfer: + +1. Create a Customer +2. Create an Order +3. Upload the NACH file via API +4. Fetch Token +5. Create Subsequent Payments + +Know more about steps 2,3,4 and 5 in [Recurring Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md). + +#### Sample Server Request and Responses + +```Curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST 'https://api.razorpay.com/v1/payments/create/nach/file' \ +-H "Content-Type: multipart/form-data" \ +-F 'order_id=order_FoLdZrq6QGKUWg' \ +-F 'file=@/Users/your_name/sample_uploaded.jpeg' // file path +```json: Successful Response +{ + "razorpay_payment_id": "pay_FjDn43bvssCqEM", + "razorpay_order_id": "order_FjDdQ6a0GluJ2c", + "razorpay_signature": "f13775ea8a91e9bf229b9fdba3ad783f7ff2bdbce1c35e87a69ae7418808da04" +} +```json: Error Response +{ +"error": { + "code": "BAD_REQUEST_ERROR", + "description": "file size exceeds limit", + "field": null, + "source": "customer", + "step": "form_upload", + "reason": "file size exceeds limit", + "metadata": { + "payment_id": null, + "order_id": "order_DBJKIP31Y4jl8" + } + } +} +``` + +. + +Wallet Provider | Wallet Code | Availability +--- +PayZapp | `payzapp` | Requires approval (Reach out to support team) +--- +Airtel Money | `airtelmoney` | ✓ +--- +MobiKwik | `mobikwik` | ✓ +--- +JioMoney| `jiomoney` | ✓ +--- +Ola Money | `olamoney` | ✓ +--- +PhonePe | `phonepe` | Requires approval (Reach out to support team) +--- +[PhonePe Switch](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md) | `phonepeswitch` | **For businesses registered with PhonePe Switch only** +--- +[PayPal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paypal.md) | `paypal` | **International Payments Only** +Requires approval (Reach out to support team) +--- +[Amazon Pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/amazon-pay.md) | `amazonpay` | Requires approval (Reach out to support team) + +> **INFO** +> +> +> +> **Handy Tips** +> +> [Integrate your PayPal account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/paypal.md#integration-steps) with Razorpay Checkout to accept payments in international currencies. +> +> You can accept payments based on the transaction limit of your PayPal account. +> +> + +## UPI + +Know about [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md) and [UPI Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi.md). + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/s2s-integration.md). +> + +## Pay Later + +Given below is the sample code for Pay Later payments. + +> **INFO** +> +> +> **Handy Tips** +> +> - Contact our [Support Team](https://razorpay.com/support/#request) to get this payment method enabled for your account. +> - Customers should have accounts with the Pay Later service providers. +> + +Once the order is created and the customer's payment details are obtained, the information should be sent to Razorpay to complete the payment. You can do this by invoking `createPayment` and passing `method=paylater` and `provider=`. + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 200000, + "currency": "INR", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEObDv", + "method": "paylater", + "provider": "" +}' +```json: Response +{ + "razorpay_payment_id": "pay_LH691g8owT4PUh", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/LH691g8owT4PUh/authenticate" + } + ] +} +``` + +#### Supported Providers + +Provider | Provider Code | Availability | Minimum Transaction | Maximum Transaction +--- +LazyPay | `lazypay` | [Requires Approval](https://razorpay.com/support/#request) | ₹1 | ₹10,000 +--- +PayPal | `paypal` | [Requires Approval](https://razorpay.com/support/#request) | ₹100 | Based on the customer's approved limit. + +## CRED + +Your customers can pay via a combination of CRED Coins and Credit Cards saved on CRED. + +To add CRED Pay as a payment method, you need to: +- Pass the `app_offer` parameter in Orders API. +- Pass the `method` and `provider` parameters in Create Payments API. + +#### Pass app_offer Parameter in Order + +You must create an order using Orders API. In the response, you obtain an `order_id` which you must pass to Checkout. + + /orders + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true +}' +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true + }) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => 'receipt#1', 'amount' => 1000, 'currency' => 'INR', 'app_offer'=> true)); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 1000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("app_offer", true); +Order order = client.Order.Create(options); + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000, + currency: "INR", + receipt: "receipt#1", + app_offer: true +}) + +```go: go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true +} +body, err := client.Order.Create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 1000, currency: 'INR', receipt: 'receipt#1', app_offer: true + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); // amount in the smallest currency unit +orderRequest.put("currency", "INR"); +orderRequest.put("receipt", "receipt#1"); +orderRequest.put("app_offer", true); + +Order order = razorpay.orders.create(orderRequest); + +```json: Response +{ + "id": "order_FNPoKwCtPyhJOt", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1596703420 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency sub-unit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Default is `INR`. + +`app_offer` _optional_ +: `boolean` Allow/disallow customers from using CRED coins to make payments. This is used to prevent double discounting scenarios where customers have already availed discounts using voucher/coupon and you do not want them to redeem Coins as well. Possible values: + - `true`: Customer not allowed to use CRED coins to make payment. + - `false` (default): Customer can use CRED coins to make payment. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Pass method and provider Parameters in Create Payments API + +```curl: Create Payment +curl -X POST https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type: application/json' +-d '{ + "amount": 1000, + "currency": "INR", + "contact": 9900988990, + "email": "gaurav.kumar@example.com", + "order_id": "order_4xbQrmEoA5WJ0G", + "method": "app", + "provider": "cred", + "app_present": "false" +}' +```json: Response +{ + "razorpay_payment_id": "pay_xxxx", + "next": [ + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_xxx/status" + } + ] +} +``` + +#### Request Parameters + +Along with the other Create Payment API request parameters, you must pass: + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it must be `app`. + +`provider` _mandatory if method=app_ +: `string` Name of the PSP app. Here, it must be `cred`. + +`app_present` _mandatory if app=cred_ +: `boolean` Sets the payment flow as collect. Possible values: + - `true`: Opens CRED app on customer's device. + - `false` (default): Sends a push notification to customer's device. + +## Emandate + +You can accept recurring payments from your customers using `emandate`, `card` or `upi` as the method. Know more about [Recurring Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments.md). + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +### Workflow + +1. [Create a customer.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md#create-a-customer) +2. Create an Order with method as `emandate`, `nach` or `upi`. +3. Collect authorisation transaction. + - Using custom checkout + - Using an authorization link +4. Verify Tokens. +5. Charge subsequent payments. + +Know more about steps 2,3,4 and 5 in [Recurring Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md). + +#### Sample Checkout Code to Collect Authorisation Transaction + +```curl: Emandate (Netbanking) +curl -X POST \ +https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount":0, + "currency":"INR", + "contact":"9000090000", + "email":"gaurav.kumar@example.com", + "order_id":"order_EAbtuXPh24LrEc", + "customer_id":"cust_E9penp7VGhT5yt", + "recurring":"1", + "method":"emandate", + "bank":"HDFC", + "auth_type":"netbanking", + "bank_account":{ + "name":"Gaurav Kumar", + "account_number":"1121431121541121", + "account_type":"savings", + "ifsc":"HDFC0000001" + } +}' +```curl: Emandate (Debit Card) +curl -X POST \ +https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount":0, + "currency":"INR", + "contact":"9000090000", + "email":"gaurav.kumar@example.com", + "order_id":"order_EAbtuXPh24LrEc", + "customer_id":"cust_E9penp7VGhT5yt", + "recurring":"1", + "method":"emandate", + "bank":"HDFC", + "auth_type":"debitcard", + "bank_account":{ + "name":"Gaurav Kumar", + "account_number":"1121431121541121", + "account_type":"savings", + "ifsc":"HDFC0000001" + } +}' +```curl: Emandate (Aadhaar) +curl -X POST \ +https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount":0, + "currency":"INR", + "contact":"9000090000", + "email":"gaurav.kumar@example.com", + "order_id":"order_EAbtuXPh24LrEc", + "customer_id":"cust_E9penp7VGhT5yt", + "recurring":"1", + "method":"emandate", + "bank":"HDFC", + "auth_type":"aadhaar", + "bank_account":{ + "name":"Gaurav Kumar", + "account_number":"1121431121541121", + "account_type":"savings", + "ifsc":"HDFC0000001" + } +}' +```curl: Cards +curl -X POST \ +https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": "100", + "currency": "INR", + "contact":"9000090000", + "email":"gaurav.kumar@example.com", + "order_id": "order_EAeQWl3JYERSly", + "customer_id":"cust_Cg3pRMEIgetEDe", + "recurring":"1", + "method": "card", + "card": { + "number": "4047458064386281", + "cvv": "123", + "expiry_month": "01", + "expiry_year": "30", + "name": "Gaurav Kumar" + } +}' +```curl: UPI +curl -X POST \ +https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": "100", + "currency": "INR", + "contact":"9000090000", + "email":"gaurav.kumar@example.com", + "order_id": "order_EAeQWl3JYERSly", + "customer_id":"cust_Cg3pRMEIgetEDe", + "recurring":"1", + "method": "upi", + "flow": "collect”, +​ "upi" : { + "vpa": "gaurav.kumar@exampleupi" //Payer VPA in case of collect request + } +}' +``` + +### Upload NACH File Using API + +The current way to collect the NACH form is via Razorpay: + +* Checkout +* Merchant Dashboard +* Hosted Checkout page, where a customer signs and uploads the form via Checkout while attempting authorisation transaction. + +You can upload the signed NACH forms that you have collected from your customers using the NACH file API. Razorpay OCR-enabled NACH engine submits the form to NPCI. on successful verification and you will receive a success/failure response. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +Follow these steps to register a NACH mandate via S2S Image Transfer: + +1. Create a Customer +2. Create an Order +3. Upload the NACH file via API +4. Fetch Token +5. Create Subsequent Payments + +Know more about steps 2,3,4 and 5 in [Recurring Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md). + +#### Sample Server Request and Responses + +```Curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST 'https://api.razorpay.com/v1/payments/create/nach/file' \ +-H "Content-Type: multipart/form-data" \ +-F 'order_id=order_FoLdZrq6QGKUWg' \ +-F 'file=@/Users/your_name/sample_uploaded.jpeg' // file path +```json: Successful Response +{ + "razorpay_payment_id": "pay_FjDn43bvssCqEM", + "razorpay_order_id": "order_FjDdQ6a0GluJ2c", + "razorpay_signature": "f13775ea8a91e9bf229b9fdba3ad783f7ff2bdbce1c35e87a69ae7418808da04" +} +```json: Error Response +{ +"error": { + "code": "BAD_REQUEST_ERROR", + "description": "file size exceeds limit", + "field": null, + "source": "customer", + "step": "form_upload", + "reason": "file size exceeds limit", + "metadata": { + "payment_id": null, + "order_id": "order_DBJKIP31Y4jl8" + } + } +} +``` + +. + +Wallet Provider | Wallet Code | Availability +--- +PayZapp | `payzapp` | Requires approval (Reach out to support team) +--- +Airtel Money | `airtelmoney` | ✓ +--- +MobiKwik | `mobikwik` | ✓ +--- +JioMoney| `jiomoney` | ✓ +--- +Ola Money | `olamoney` | ✓ +--- +PhonePe | `phonepe` | Requires approval (Reach out to support team) +--- +[PhonePe Switch](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md) | `phonepeswitch` | **For businesses registered with PhonePe Switch only** +--- +[PayPal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paypal.md) | `paypal` | **International Payments Only** +Requires approval (Reach out to support team) +--- +[Amazon Pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/amazon-pay.md) | `amazonpay` | Requires approval (Reach out to support team) + +#### Acceptable Image Formats and Sizes + +The acceptable image formats and sizes are: + +- .jpeg +- .jpg +- .png +- Maximum accepted size is 6 MB. + +#### Error Reasons + +Know about [errors under Recurring Payments FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/faqs.md#14-what-are-the-errors-i-get-while). diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods/apps/cred.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/apps/cred.md new file mode 100644 index 00000000..d1486b7a --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/apps/cred.md @@ -0,0 +1,210 @@ +--- +title: CRED Pay +description: Accept payments from your customer using CRED on your website or app. +--- + +# CRED Pay + +Your customers can make payments on your website or app using a combination of CRED Coins and Credit Cards saved on CRED. + +For example, if a customer has shopped on your website for ₹10, they can choose to redeem CRED Coins worth say, ₹2 and pay the rest ₹8 using credit cards saved on CRED. + +![](/docs/assets/images/cred-flow.jpg) + +### Advantages + +- Customers can redeem their CRED Coins on websites. + +- Customers can access the cards they have saved on CRED to make payments on your website or app. + +- CRED recommends which credit card customers can use based on the credit limit, due date and reward points. + +## Workflow + +This diagram explains the workflow: + +![](/docs/assets/images/cred-workflow.jpg) + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisite +- Sign up for a Razorpay account. +- Generate API Keys + +- Follow the [Razorpay S2S Integration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md). + +## Integrate CRED + +To add CRED Pay as a payment method, you need to: +- Pass the `app_offer` parameter in Orders API. +- Pass the `method` and `provider` parameters in Create Payments API. + +#### Pass app_offer Parameter in Order + +You must create an order using Orders API. In the response, you obtain an `order_id` which you must pass to Checkout. + + /orders + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true +}' +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true + }) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => 'receipt#1', 'amount' => 1000, 'currency' => 'INR', 'app_offer'=> true)); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 1000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("app_offer", true); +Order order = client.Order.Create(options); + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000, + currency: "INR", + receipt: "receipt#1", + app_offer: true +}) + +```go: go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true +} +body, err := client.Order.Create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 1000, currency: 'INR', receipt: 'receipt#1', app_offer: true + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); // amount in the smallest currency unit +orderRequest.put("currency", "INR"); +orderRequest.put("receipt", "receipt#1"); +orderRequest.put("app_offer", true); + +Order order = razorpay.orders.create(orderRequest); + +```json: Response +{ + "id": "order_FNPoKwCtPyhJOt", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1596703420 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency sub-unit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Default is `INR`. + +`app_offer` _optional_ +: `boolean` Allow/disallow customers from using CRED coins to make payments. This is used to prevent double discounting scenarios where customers have already availed discounts using voucher/coupon and you do not want them to redeem Coins as well. Possible values: + - `true`: Customer not allowed to use CRED coins to make payment. + - `false` (default): Customer can use CRED coins to make payment. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Pass method and provider Parameters in Create Payments API + +```curl: Create Payment +curl -X POST https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type: application/json' +-d '{ + "amount": 1000, + "currency": "INR", + "contact": 9900988990, + "email": "gaurav.kumar@example.com", + "order_id": "order_4xbQrmEoA5WJ0G", + "method": "app", + "provider": "cred", + "app_present": "false" +}' +```json: Response +{ + "razorpay_payment_id": "pay_xxxx", + "next": [ + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_xxx/status" + } + ] +} +``` + +#### Request Parameters + +Along with the other Create Payment API request parameters, you must pass: + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it must be `app`. + +`provider` _mandatory if method=app_ +: `string` Name of the PSP app. Here, it must be `cred`. + +`app_present` _mandatory if app=cred_ +: `boolean` Sets the payment flow as collect. Possible values: + - `true`: Opens CRED app on customer's device. + - `false` (default): Sends a push notification to customer's device. diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cards/3ds2.0.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cards/3ds2.0.md new file mode 100644 index 00000000..3e01947a --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cards/3ds2.0.md @@ -0,0 +1,35 @@ +--- +title: 3DS2 Protocol for Card Payments +description: Razorpay supports the 3DS2 protocol for card payments and helps in adding additional layers of authentication to prevent fraud. +--- + +# 3DS2 Protocol for Card Payments + +3DS2 is an authentication protocol, the successor of 3DS1, that enables businesses and payment providers to send additional information (such as customer device or browser data) to verify the transaction's authenticity. + +This helps the customer's bank to evaluate the transaction for risk and decide on the payment flow. + +- **Frictionless Flow**: This flow is activated if the bank determines that the transaction is from a trusted device and allows the payment to go through without any additional authentication from the customer. Currently, this would not be applicable in India for domestic payments as RBI mandates OTP-based authentication. For international payments, this flow is viable. + +- **Challenge Flow**: This flow is activated if the bank determines that the transaction is not from a trusted device and needs additional information. The customer needs to perform additional authentication steps. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Integration does not differ for challenge or frictionless flow. +> - Frictionless flow is not applicable for payments on cards issued in India. +> + +Given below is a diagram that explains the 3DS2 flow: + +![Cards 3DS2 Protocol](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-3ds-flowchart.jpg.md) + +### Next Steps + +Choose the integration suitable for you: + +- [Integration Steps for New Razorpay Businesses (Integrating after October 15, 2022)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards.md) +- [Migration Steps for Existing Razorpay Businesses (Integrated before October 15, 2022)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/migrate-3ds2.0.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cards/authentication-type/native-otp.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cards/authentication-type/native-otp.md new file mode 100644 index 00000000..f0d7cd14 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cards/authentication-type/native-otp.md @@ -0,0 +1,521 @@ +--- +title: Native OTP +description: Use the Razorpay Native OTP feature to support OTPs at the checkout without redirecting customers to the ACS page of the issuing bank. +--- + +# Native OTP + +Razorpay's Native OTP feature supports one-time passwords (OTPs) in the Checkout form, without redirecting customers to the ACS page of the respective issuing banks. +This enables you to extend a simple and efficient OTP flow to your customers, reduce payment failures due to low internet speeds and avoid failures due to redirects to bank pages. + +Shown below is a sample OTP input screen: + +![](/docs/assets/images/rzp-acs_page.jpg) + + to get this feature activated on your Razorpay account. + +## Prerequisites + +Before implementing the Native OTP feature, ensure that the following requirements are met: +1. Verify that you are PCI compliant to accept and process customer's card details at your end. + [Learn more about PCI compliance](https://www.pcicomplianceguide.org/faq/#1). The compliance certificate should be updated as per the yearly renewal cycle. +2. Familiarize yourselves with the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md). + +## Workflow for Native OTP + +1. [Create a Razorpay order](#1-create-a-razorpay-order) +2. [Validate Authentication Type](#2-validate-authentication-type) +3. [Create a Payment](#3-create-a-payment) +4. [OTP Authentication](#4-otp-authentication) +5. [Payment Verification](#5-verify-the-payment) + +> **INFO** +> +> +> +> **API Authentication** +> +> Razorpay APIs are authenticated using **Basic Auth** method where your `key_id` is the **Username** and `key_secret` is the **Password**. You can access your API keys from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). +> + +### 1. Create a Razorpay Order + +A **Razorpay Order** creates an order ID that corresponds to the unique transaction ID or checkout ID created at your end. The Order ID is tied to all the payments made against that particular order. + +/orders + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The order_id received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "partial_payment": true, + "first_payment_min_amount": 23000 +}' +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => 'INR'// [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies).) +]); +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", "INR"); +Order order = client.Order.Create(options); +```ruby: Ruby +options = amount: 50000, currency: 'INR', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "INR", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +#### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Response Parameters + +Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) table. + +#### Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +### 2. Validate Authentication Type + +Validating the authentication type is critical. This will help you to set the value of `auth_type` in [payment creation](#3-create-a-payment). If the value of `auth_type` is sent as `otp` for a BIN which is not validated successfully, the transaction will fail. + +The following API endpoint will enable Razorpay to verify the OTP-based authentication flow for a specific card: + +/payment/flows + +```curl: Request +curl -X POST \ +'https://api.razorpay.com/v1/payment/flows' \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H 'content-type: application/json' +-d '{ + "card_number":"4242424242424242" +}' +```json: Response +{ + "otp": true, // if OTP is enabled on the card + ... +} +``` + +### 3. Create a Payment + +After the Order ID is created, create a payment for the Order ID. The API endpoint for creating a payment is given below: + +/payments/create/redirect + +```curl: Example Request with auth_type +curl -X POST \ +'https://api.razorpay.com/v1/payments/create/redirect' \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/x-www-form-urlencoded" \ +-d 'amount=5000¤cy=INR&contact=9123456780&email=gaurav.kumar@example.com&method=card&card[number]=4386289407660153&card[name]=Gaurav%20Kumar&card[expiry_month]=01&card[expiry_year]=25&card[cvv]=111&user_agent=Razorpay%20SDK&ip=1.160.10.240&referer=https://www.example.com&auth_type=otp' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_Bf9GPSOEQg0NTi"; + +Payment payment = razorpayclient.payments.otpResend(paymentId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_Bf9GPSOEQg0NTi"; + +Razorpay::Payment.otp_resend(paymentId) + +```json: Response with OTP +{ + "next": [ + "otp_submit", + "otp_resend" + ], + "razorpay_payment_id": "pay_Bf9GPSOEQg0NTi" +} +```json: Normal Error Response +{ + "error": { + "code": "GATEWAY_ERROR" + } +} +```json: Feature Unavailable for the BIN +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The otp authentication type is not applicable on the given card" + } +} +``` + +#### Request Parameters + +`currency` _mandatory_ +: `string` The currency of the transaction as passed in [Orders](#1-create-a-razorpay-order). [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the smallest currency unit such as paise. For example, for an actual amount of , the value of this field should be `29935`. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created using in [Step 1](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cards/authentication-type/native-otp.md#1-create-a-razorpay-order). + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `9123456780`. + +`method` _mandatory_ +: `string` The payment method selected by the customer. Here, the value must be `card`. + +`card` +: The attributes associated with a card. + + `number` _mandatory_ + : `integer` Unformatted card number. This field is required if value of `method` is `card`. Use one of our test cards to try out the payment flow. + + `name` _mandatory_ + : `string` The name of the cardholder. + + `expiry_month` _mandatory_ + : `integer` The expiry month of the card in `MM` format. For example, `01` for January and `12` for December. + + `expiry_year` _mandatory_ + : `integer` Expiry year for card in `YY` format. For example, 2025 will be in format `25`. + + `cvv` _mandatory_ + : `integer` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +`notes` _optional_ +: `object` Set of key-value pairs used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`ip` _mandatory_ +: `string` The client's IP address. + +`referer` _mandatory_ +: `string` The client's referer URL. + +`user_agent` _mandatory_ +: `string` The client's User-Agent. + +`auth_type` _mandatory_ +: `string` Indicates the authentication type for this integration method. + Defaults to `3ds`. Upon [successful validation](#2-validate-authentication-type), pass `auth_type=otp`. + +#### Response Parameters + +`razorpay_payment_id` +: `string` Unique identifier of a payment. + +`razorpay_order_id` _string_ +: `string` Unique identifier of an Order. + + `razorpay_signature` _string_ +: `string` Unique alpha-numeric identifier used for verifying a payment. + +[`next`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cards/authentication-type/native-otp.md#otp-submit) +: `array` Lists the subsequent payment actions available: + - `otp_submit` + - `otp_resend` + + [Learn more about `next` actions.](#4-otp-authentication) + +The following example request creates a payment for : + +> **INFO** +> +> +> +> **Note** +> +> The payment data is passed in `form-urlencoded` format which ensures that nested keys are correctly passed. +> + +### 4. OTP Authentication + +After entering the OTP, the customer can perform either of the two actions, as described in the `next` parameter: + +1. [OTP Submit](#otp-submit) +2. [OTP Resend](#otp-resend) + +`next` +: `array` This array specifies the available actions as a comma-separated list. It can have the following predefined values: + -`otp_submit` + -`otp_resend` + +In cases where two-factor authentication is not required or not available, the `next` object will not be returned in the response. + + `otp_submit` + : `string` This value is consumed to display otp submit option. + + `otp_resend` + : `string` This value is consumed as a retry option for OTP submission. If the parameter is not present, the OTP resend option cannot be shown to the customers. The resend option may be unavailable after a certain number of retries. The number of retries is determined by the bank and not by Razorpay. + +#### OTP Submit + +OTP submission is a part of the payment authentication process from the customer's end where an OTP received is submitted through your application's frontend. + +For card payments, customers receive the OTP via their preferred notification medium - SMS or email. + +> **INFO** +> +> +> +> **Note** +> +> Do not perform any validation on the length of the OTP since this can vary across banks. However, the OTP should not be blank. +> + +The OTP received must be submitted to the following endpoint: + +payments/:id/otp/submit + +```curl: Example Request +curl -X POST \ +'https://api.razorpay.com/v1/payments/pay_29QQoUBi66xm2f/otp/submit' \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/x-www-form-urlencoded" \ +-d 'otp=123456' +```json: Success +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +```json: Failure +{ + "error": { + "code" : "BAD_REQUEST_ERROR", + "description": "payment processing failed because of incorrect otp" + }, + "next": ["otp_submit", "otp_resend"] +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment. + +#### Request Parameter + +`otp` _mandatory_ +: `integer` The OTP received by the customer. + +#### OTP Resend + +There could be situations when the customer has to re-enter the OTP. The number of retries that the user is allowed is determined by the issuing bank. + +payments/:id/otp/resend + +```curl: Example Request +curl -X POST \ +'https://api.razorpay.com/v1/payments/pay_29QQoUBi66xm2f/otp/resend' \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +```json: Success +{ + "next": ["otp_submit", "otp_resend"], + "razorpay_payment_id": "pay_29QQoUBi66xm2f" +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment. + +### 5. Verify the Payment + +Once the payment process is completed, Razorpay will make a `POST` request to the `callback_url` on whether the payment was a **success** or a **failure**. + +You can easily verify the payment signature using our SDKs: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```python: Python +params = { + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +client.utility.verify_payment_signature(params_dict) + +```php: PHP +$params = [ + 'razorpay_order_id' => 'order_9A33XWu170gUtm', + 'razorpay_payment_id' => 'pay_29QQoUBi66xm2f', + 'razorpay_signature' => '9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d' +]; +Razorpay\Api\Utility::verifyPaymentSignature($params); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) +``` + +If `razorpay_payment_id` is returned, the payment is successfully created and verified. + +> **INFO** +> +> +> +> **Post-processing** +> +> A successful transaction results in the creation of the `razorpay_order_id` in your database. You can mark the corresponding transaction at your end as paid and notify the customer of the same. +> + +### Failure Scenario + +An exception is thrown in the event of unsuccessful signature verification. If the `razorpay_payment_id` field is missing in the API request, the following error is displayed in the corresponding response body: + +```html: Response +error%5Bcode%5D=BAD_REQUEST_ERROR&error%5Bdescription%5D=Payment+failed +``` diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cvv-less-flow.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cvv-less-flow.md new file mode 100644 index 00000000..8bc14f71 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cvv-less-flow.md @@ -0,0 +1,105 @@ +--- +title: CVV-less Flow for Card Payments +description: Save customer card details as tokens and enable CVV-less payment flows for customers via Razorpay. +--- + +# CVV-less Flow for Card Payments + +CVV-less card payments are recently introduced for saved cards where the card-holder can complete a payment without the card CVV. CVV-less card payments are simple, fast and secure, and do not require a memory test of your customers. + +## Recommended Checkout Experience + +To provide your customers with a faster and more seamless payment experience, we recommend removing the CVV field from your checkout flow. +- Removing the CVV field encourages customers to use their saved (tokenised) cards, making payments more convenient and frictionless. +- Alternatively, you can also make CVV optional. You can choose to retain the CVV box but mark it as optional, with a clear message such as “CVV not required for tokenised cards”. + +> **INFO** +> +> +> +> **Note** +> +> If you are already integrated with Razorpay Standard Checkout, these UI changes are handled automatically and no additional action is required on your part. +> + +> **INFO** +> +> +> **Handy Tips** +> +> Offering CVV-less saved card flows to your customers can increase their conversion rate by 4%. +> + +![CVV Less Card Payment Flow GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cvv-less-otp-less.gif.md) + +## Saved Card Payment without CVV + +```java: Payment Request using token ref +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "token" : "token_4lsdksD31GaZ09", + "card": { + "cvv": "123" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' + +```java: Payment Request using Cryptogram +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "card": { + "number": "4154980604708430", + "expiry_month": "12", + "expiry_year": "21", + "name": "Gaurav Kumar", + "cryptogram_value": "as34ag3h78dsdasdsd1", + "cvv": "123", + "tokenised": true, + "token_provider": "payu" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' +``` + +### Request Parameters + +`card` _optional_ +: `string` The card’s CVV. + +> **INFO** +> +> +> **Handy Tips** +> +> CVV-less payments on RuPay is an on-demand feature for standard checkout merchants. Reach out to our [support team](https://razorpay.com/support/#request) for more information. +> + +## Related information + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/cvv-less-flow.md#frequently-asked-questions-faqs) diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods/emi/hsbc.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/emi/hsbc.md new file mode 100644 index 00000000..5986f777 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/emi/hsbc.md @@ -0,0 +1,30 @@ +--- +title: HSBC Credit Card +description: Accept payment from your customers using HSBC Credit Cards. +--- + +# HSBC Credit Card + +HSBC is an international bank that provides many financial services. You can accept EMI payments from HSBC credit cardholders. + +## Prerequisites + +- Enable EMI on HSBC BINs on your system to use this. You need not make any changes if you have updated this using our BIN API. +- Use [methods API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/methods-api.md) to get the EMI plan information. + +## EMI Plans and Rate of Interest + + +Months | Rate of Interest (p.a.) +--- +3 | 12.5% +--- +6 | 12.5% +--- +9 | 13.5% +--- +12 | 13.5% +--- +18 | 13.5% +--- +24 | 13.5% diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods/emi/one-card.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/emi/one-card.md new file mode 100644 index 00000000..3b6108e4 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/emi/one-card.md @@ -0,0 +1,40 @@ +--- +title: OneCard Credit Card EMI +description: Accept payment from your customers using OneCard Credit Card. +--- + +# OneCard Credit Card EMI + +OneCard is a neo-bank that provides metal credit cards to users. You can accept EMI payments from OneCard credit cardholders. + +## Prerequisites + +- Enable EMI on OneCard BINs on your system to use this. You need not make any changes if you have updated this using our BIN API. +- Use [ methods API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/methods-api.md) to get the EMI plan information. + +> **INFO** +> +> +> **OneCard BINs supported on EMI:** +> - `401063` +> - `418212` +> - `402275` +> - `421389` +> - `471227` +> + +## EMI Plans and Rate of Interest + +Months | Rate of Interest (p.a.) +--- +3 | 16% +--- +6 | 16% +--- +9 | 16% +--- +12 | 16% +--- +18 | 16% +--- +24 | 16% diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods/methods-api.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/methods-api.md new file mode 100644 index 00000000..30d4ea81 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/methods-api.md @@ -0,0 +1,1095 @@ +--- +title: Methods API +description: Fetch payment methods configured for your account using Razorpay APIs. +--- + +# Methods API + +You can configure payment methods of your choice for collecting payments from your customers. + +## Fetch Payment Methods + +Send the following request to fetch a list of payment methods enabled for your account: + +> **INFO** +> +> +> +> **Handy Tips** +> +> Provide only the API Key ID to send this request. Do not provide the API key secret. +> + +/methods + +```curl: Request +curl -u [YOUR_KEY_ID] \ +- X GET https://api.razorpay.com/v1/methods \ +```json: Response +{ + "entity": "methods", + "card": true, + "debit_card": true, + "credit_card": true, + "prepaid_card": true, + "card_networks": { + "AMEX": 0, + "DICL": 1, + "MC": 1, + "MAES": 1, + "VISA": 1, + "JCB": 1, + "RUPAY": 1, + "BAJAJ": 0 + }, + "card_subtype": { + "consumer": 1, + "business": 1 + }, + "amex": false, + "netbanking": { + "AUBL": "AU Small Finance Bank", + "AIRP": "Airtel Payments Bank", + "ANDB": "Andhra Bank", + "UTIB": "Axis Bank", + "BDBL": "Bandhan Bank", + "BBKM": "Bank of Bahrein and Kuwait", + "BARB_R": "Bank of Baroda - Retail Banking", + "VIJB": "Bank of Baroda - Retail Banking (Erstwhile Vijaya Bank)", + "BKID": "Bank of India", + "MAHB": "Bank of Maharashtra", + "BACB": "Bassein Catholic Co-operative Bank", + "CNRB": "Canara Bank", + "CSBK": "Catholic Syrian Bank", + "CBIN": "Central Bank of India", + "CIUB": "City Union Bank", + "COSB": "Cosmos Co-operative Bank", + "DCBL": "DCB Bank", + "DEUT": "Deutsche Bank", + "DBSS": "Development Bank of Singapore", + "DLXB": "Dhanlaxmi Bank", + "DLXB_C": "Dhanlaxmi Bank - Corporate Banking", + "ESAF": "ESAF Small Finance Bank", + "ESFB": "Equitas Small Finance Bank", + "FDRL": "Federal Bank", + "FSFB": "Fincare Small Finance Bank", + "HSBC": "HSBC", + "ICIC": "ICICI Bank", + "IBKL": "IDBI", + "IBKL_C": "IDBI - Corporate Banking", + "IDFB": "IDFC FIRST Bank", + "IDIB": "Indian Bank", + "ALLA": "Indian Bank (Erstwhile Allahabad Bank)", + "IOBA": "Indian Overseas Bank", + "INDB": "Indusind Bank", + "JAKA": "Jammu and Kashmir Bank", + "JSFB": "Jana Small Finance Bank", + "JSBP": "Janata Sahakari Bank (Pune)", + "KCCB": "Kalupur Commercial Co-operative Bank", + "KJSB": "Kalyan Janata Sahakari Bank", + "KARB": "Karnataka Bank", + "KVBL": "Karur Vysya Bank", + "KKBK": "Kotak Mahindra Bank", + "LAVB_C": "Lakshmi Vilas Bank - Corporate Banking", + "LAVB_R": "Lakshmi Vilas Bank - Retail Banking", + "MSNU": "Mehsana Urban Co-operative Bank", + "NKGS": "NKGSB Co-operative Bank", + "NSPB": "NSDL Payments Bank", + "NESF": "North East Small Finance Bank", + "ORBC": "PNB (Erstwhile-Oriental Bank of Commerce)", + "UTBI": "PNB (Erstwhile-United Bank of India)", + "PSIB": "Punjab & Sind Bank", + "PUNB_R": "Punjab National Bank - Retail Banking", + "RATN": "RBL Bank", + "RATN_C": "RBL Bank - Corporate Banking", + "ABNA": "Royal Bank of Scotland N.V.", + "SRCB": "Saraswat Co-operative Bank", + "SVCB_C": "Shamrao Vithal Bank - Corporate Banking", + "SVCB": "Shamrao Vithal Co-operative Bank", + "SIBL": "South Indian Bank", + "SCBL": "Standard Chartered Bank", + "SURY": "Suryoday Small Finance Bank", + "SYNB": "Syndicate Bank", + "TMBL": "Tamilnadu Mercantile Bank", + "TNSC": "Tamilnadu State Apex Co-operative Bank", + "TBSB": "Thane Bharat Sahakari Bank", + "TJSB": "Thane Janata Sahakari Bank", + "UCBA": "UCO Bank", + "UBIN": "Union Bank of India", + "CORP": "Union Bank of India (Erstwhile Corporation Bank)", + "VARA": "Varachha Co-operative Bank", + "YESB": "Yes Bank", + "YESB_C": "Yes Bank - Corporate Banking", + "ZCBL": "Zoroastrian Co-operative Bank" + }, + "wallet": { + "mobikwik": true, + "payzapp": true, + "olamoney": true, + "airtelmoney": true, + "jiomoney": true, + "phonepe": true, + "paypal": true + }, + "emi": true, + "upi": true, + "cardless_emi": [], + "paylater": { + "epaylater": true, + "getsimpl": true, + "icic": true, + "hdfc": true + }, + "google_pay_cards": false, + "app": { + "cred": 0, + "twid": 0 + }, + "gpay": false, + "emi_types": { + "credit": true, + "debit": true + }, + "debit_emi_providers": { + "HDFC": 1 + }, + "nach": false, + "cod": false, + "emi_subvention": "customer", + "emi_plans": { + "KKBK": { + "min_amount": 300000, + "plans": { + "3": 12, + "6": 12, + "9": 14, + "12": 14, + "18": 15, + "24": 15 + } + }, + "UTIB": { + "min_amount": 300000, + "plans": { + "3": 13, + "6": 13, + "9": 14, + "12": 14, + "18": 15, + "24": 15 + } + }, + "INDB": { + "min_amount": 200000, + "plans": { + "3": 13, + "6": 13, + "9": 13, + "12": 12, + "18": 12, + "24": 12 + } + }, + "RATN": { + "min_amount": 100000, + "plans": { + "3": 13, + "6": 14, + "9": 15, + "12": 15, + "18": 15, + "24": 15 + } + }, + "HDFC": { + "min_amount": 300000, + "plans": { + "3": 15, + "6": 15, + "9": 15, + "12": 15, + "18": 15, + "24": 15 + } + }, + "SCBL": { + "min_amount": 250000, + "plans": { + "3": 13, + "6": 13, + "9": 14, + "12": 14 + } + }, + "BARB": { + "min_amount": 250000, + "plans": { + "3": 13, + "6": 13, + "9": 13, + "12": 13, + "18": 15, + "24": 15 + } + }, + "ICIC": { + "min_amount": 150000, + "plans": { + "3": 12.99, + "6": 13.99, + "9": 13.99, + "12": 13.99, + "18": 14.99, + "24": 14.99 + } + }, + "IDFB": { + "min_amount": 250000, + "plans": { + "3": 14 + "6": 15, + "9": 15, + "12": 15, + "18": 15, + "24": 15, + "36": 15 + } + }, + "YESB": { + "min_amount": 150000, + "plans": { + "3": 14, + "6": 14, + "9": 14, + "12": 15, + "18": 15, + "24": 15 + } + }, + "CITI": { + "min_amount": 250000, + "plans": { + "3": 13, + "6": 13, + "9": 15, + "12": 15, + "18": 15, + "24": 15 + } + }, + "AMEX": { + "min_amount": 500000, + "plans": { + "3": 14, + "6": 14, + "9": 14, + "12": 14, + "18": 14, + "24": 14 + } + }, + "onecard": { + "min_amount": 300000, + "plans": { + "3": 16, + "6": 16, + "9": 16, + "12": 16, + "18": 16, + "24": 16 + } + }, + "FDRL": { + "min_amount": 250000, + "plans": { + "3": 13, + "6": 13, + "9": 14, + "12": 14, + "18": 15, + "24": 15 + } + }, + "HDFC_DC": { + "min_amount": 500000, + "plans": { + "3": 16, + "6": 16, + "9": 16, + "12": 16, + "18": 16 + } + } + }, + "emi_options": { + "KKBK": [ + { + "duration": 3, + "interest": 12, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "1.97" + }, + { + "duration": 6, + "interest": 12, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "3.41" + }, + { + "duration": 9, + "interest": 14, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "5.59" + }, + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "7.19" + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "10.95" + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "14.07" + } + ], + "UTIB": [ + { + "duration": 3, + "interest": 12, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "1.97" + }, + { + "duration": 6, + "interest": 12, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "3.41" + }, + { + "duration": 9, + "interest": 13, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "5.21" + }, + { + "duration": 12, + "interest": 13, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "6.70" + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "10.95" + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "14.07" + }, + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "2.13" + }, + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "3.68" + }, + { + "duration": 9, + "interest": 14, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "5.59" + }, + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "7.19" + } + ], + "INDB": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "2.13" + }, + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "3.68" + }, + { + "duration": 9, + "interest": 13, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "5.21" + }, + { + "duration": 12, + "interest": 13, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "6.70" + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "10.95" + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "14.07" + }, + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "2.13" + }, + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "3.68" + }, + { + "duration": 9, + "interest": 13, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "5.21" + }, + { + "duration": 12, + "interest": 12, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "6.21" + }, + { + "duration": 18, + "interest": 12, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "8.90" + }, + { + "duration": 24, + "interest": 12, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "11.49" + } + ], + "RATN": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "2.13" + }, + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "3.68" + }, + { + "duration": 9, + "interest": 13, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "5.21" + }, + { + "duration": 12, + "interest": 13, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "6.70" + }, + { + "duration": 18, + "interest": 13, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "9.59" + }, + { + "duration": 24, + "interest": 13, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "12.36" + }, + { + "duration": 6, + "interest": 14, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "3.96" + }, + { + "duration": 9, + "interest": 15, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "5.97" + }, + { + "duration": 12, + "interest": 15, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "7.67" + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "10.95" + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "14.07" + } + ], + "HDFC": [ + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "10.95" + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "14.07" + }, + { + "duration": 3, + "interest": 15, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "2.45" + }, + { + "duration": 6, + "interest": 15, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "4.23" + }, + { + "duration": 9, + "interest": 15, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "5.97" + }, + { + "duration": 12, + "interest": 15, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "7.67" + } + ], + "SCBL": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "2.13" + }, + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "3.68" + }, + { + "duration": 9, + "interest": 14, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "5.59" + }, + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "7.19" + } + ], + "BARB": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "2.13" + }, + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "3.68" + }, + { + "duration": 9, + "interest": 13, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "5.21" + }, + { + "duration": 12, + "interest": 13, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "6.70" + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "10.95" + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "14.07" + } + ], + "ICIC": [ + { + "duration": 3, + "interest": 12.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "2.13" + }, + { + "duration": 6, + "interest": 13.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "3.96" + }, + { + "duration": 9, + "interest": 13.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "5.59" + }, + { + "duration": 12, + "interest": 13.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "7.18" + }, + { + "duration": 24, + "interest": 14.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "14.06" + }, + { + "duration": 18, + "interest": 14.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "10.94" + } + ], + "IDFB": [ + { + "duration": 3, + "interest": 14, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "2.34" + }, + { + "duration": 6, + "interest": 15, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "4.42" + }, + { + "duration": 9, + "interest": 15, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "6.35" + }, + { + "duration": 12, + "interest": 15, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "8.31" + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "12.29" + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "16.37" + } + { + "duration": 36, + "interest": 15, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "24.80" + }, + ], + "YESB": [ + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "10.95" + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "14.07" + }, + { + "duration": 9, + "interest": 14, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "5.59" + }, + { + "duration": 3, + "interest": 14, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "2.29" + }, + { + "duration": 6, + "interest": 14, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "3.96" + }, + { + "duration": 12, + "interest": 15, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "7.67" + } + ], + "CITI": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "2.13" + }, + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "3.68" + }, + { + "duration": 9, + "interest": 15, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "5.97" + }, + { + "duration": 12, + "interest": 15, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "7.67" + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "10.95" + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "14.07" + } + ], + "AMEX": [ + { + "duration": 3, + "interest": 14, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "2.29" + }, + { + "duration": 6, + "interest": 14, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "3.96" + }, + { + "duration": 9, + "interest": 14, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "5.59" + }, + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "7.19" + }, + { + "duration": 18, + "interest": 14, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "10.27" + }, + { + "duration": 24, + "interest": 14, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "13.22" + } + ], + "onecard": [ + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "2.61" + }, + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "4.51" + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "6.35" + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "8.15" + }, + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "11.62" + }, + { + "duration": 24, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "14.90" + } + ], + "FDRL": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "2.13" + }, + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "3.68" + }, + { + "duration": 9, + "interest": 14, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "5.59" + }, + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "7.19" + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "10.95" + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "14.07" + } + ], + "HDFC_DC": [ + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "2.61" + }, + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "4.51" + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "6.35" + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "8.15" + }, + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "11.62" + } + ] + }, + "recurring": { + "card": { + "credit": [ + "MasterCard", + "Visa" + ] + }, + "upi": true, + "nach": false + }, + "upi_intent": true +} +``` + +### Next Steps + +You can start creating payment requests using the [sample payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md) for the payment methods of your choice. + +To get additional payment methods enabled for your account, contact our [Support team](https://razorpay.com/support/#request). diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods/moto.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/moto.md new file mode 100644 index 00000000..7a28b536 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/moto.md @@ -0,0 +1,216 @@ +--- +title: MOTO Payments - S2S +description: Know how you can configure MOTO payments on your S2S integration. +--- + +# MOTO Payments - S2S + +With Razorpay, you can use MOTO (Mail-Order-Telephone-Order) transactions to charge a customer's credit card without using the CVV or 2-factor-authentication. You can extend this flow to your customers to reduce payment failures that may occur due to low internet speeds or redirects to bank pages. + +## Step 1: Create an Order + +Order creation is the first step to integrate your application with Razorpay and start accepting payments. Orders API allows you to create an Order when a payment is expected from a customer. + +Ensure the `razorpay_order_id` is stored against the corresponding transaction. The API endpoint given below will create an Order at your server-side: + +/orders + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The order_id received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +## API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11" +}' + +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} + +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => 'INR'// [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies).) +]); + +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", "INR"); +Order order = client.Order.Create(options); + +```ruby: Ruby +options = amount: 50000, currency: 'INR', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "INR", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); + +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +#### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`id` _optional_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +## Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +## Step 2: Create a Payment + +Use the `order_id`, that is the `id` returned in the [previous step](#step-1-create-an-order) to create a payment. The API endpoint given below creates a payment using cards. Your customers can make payments by providing either card details or the token id. + +### Pay using Cards + +Use the following endpoint to make payment using card details. + +/payments/create/redirect + +```curl: Request +curl -u : +-X POST https://api.razorpay.com/v1/payments/create/redirect +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": 9000090000, + "order_id": "order_DBJOWzybf0sJbb", + "method": "card", + "card":{ + "number": "5104060000000008", + "name": "Gaurav Kumar", + "expiry_month": "01", + "expiry_year": "22" + }, + "auth_type": "skip" +}' +```json: Response +{ + "razorpay_payment_id" : "pay_2xxQoUBi66xm2f", + "razorpay_order_id" : "order_DBJOWzybf0sJbb", + "razorpay_signature" : "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +### Pay using Tokens + +According to recent Payment Acquirer (PA)/ Payment Gateway (PG) guidelines from RBI, businesses cannot save their customers' card numbers and other card data on their servers. + +Use the following endpoint to make payment using token id. + +/payments/create/redirect + +```curl: Request +curl -u : +-X POST https://api.razorpay.com/v1/payments/create/redirect +-H 'content-type:application/json' +-d '{ +"amount":100, +"currency":"INR", +"contact":"9164544995", +"email":"shivamyuvraaj1@gmail.com", +"order_id": "order_JfhhSvgLYUDoNC", +"token":"token_IaoGJDRc9eRff0", +"customer_id" :"cust_IaV8vdrgdosxe6", +"auth_type":"skip" +}' +```json: Response +{ + "razorpay_payment_id" : "pay_2xxQoUBi66xm2f", + "razorpay_order_id" : "order_DBJOWzybf0sJbb", + "razorpay_signature" : "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +## Step 3: Post Processing +If the payment is successful, you can query the `razorpay_order_id` in your database and mark the corresponding transaction at your end as paid. + +## Create Multiple Payments in a Batch diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods/paypal.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/paypal.md new file mode 100644 index 00000000..1869f5f2 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/paypal.md @@ -0,0 +1,646 @@ +--- +title: PayPal +description: Integrate PayPal with Razorpay to accept International Payments. +--- + +# PayPal + +PayPal is a payment method that you can integrate with Razorpay to accept payments in international currencies. + +You can accept payments based on the transaction limit of your PayPal account. Know more about the other [payment methods and the transaction limits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/transaction-limits.md). + +### Advantages + +Integrating PayPal as a payment method offers you the following advantages: + +- **Better Success Rates**: Enjoy up to 20% higher success rates. +- **Faster Settlement time**: Get paid on a T+1 settlement schedule. +- **Wide user base**: Reach Over 30 million PayPal users around the world. +- **No additional charges**: PayPal defines the rates for transactions. + +> **WARN** +> +> +> **Watch Out!** +> +> You can accept payments from the provided [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/paypal/supported-currencies.md). +> + +## Onboarding Process to Enable PayPal + +Watch this video to see the onboarding process to enable PayPal on your checkout form. + +[Video: https://www.youtube.com/embed/N5ZtN-_zye8?si=C0VWahb6kPT7Lk4s] + +> **INFO** +> +> +> **Handy Tips** +> +> The PayPal section is visible only in the **Live** mode on the Dashboard. +> + + +### To enable PayPal: + + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings** → **International payments** (under Payment methods). Scroll to the **PayPal** section and click **Link Account**. + + 4. Upon redirection to PayPal: + - If you do not have a PayPal account, you need to complete the verification process and KYC. This will include confirming your email address by clicking on the link sent to you by PayPal. + - If you already have a PayPal account, you need to authorise Razorpay to accept payments. + + You should now be able to see your PayPal enablement status set to `Pending` on your Razorpay Dashboard. PayPal will activate your account within 48 hours if all of the previous steps are successfully completed. + + You can now proceed with the integration. This depends on how you have integrated Razorpay on your website or application. + + By default, your PayPal account is configured to receive USD payments. You can enable more currencies on your account from your PayPal Dashboard. + + +> **WARN** +> +> +> **Watch Out!** +> +> - You should not use the same email ID for multiple MIDs. +> - Each merchant should set up a separate PayPal account for each MID. +> + + + +## Integration Steps + +If you are using Razorpay Server-to-Server integration, first you need to raise a request with our [Support team](https://razorpay.com/support/) to enable PayPal and complete the [onboarding procedure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/paypal.md#to-enable-paypal). + +Follow the steps given below to integrate S2S JSON API and accept payments using PayPal. + +**1.1** [Create an Order](#11-create-an-order) + +**1.2** [Create a Payment](#12-create-a-payment) + +**1.3** [Handle Payment Success and Error Events](#13-handle-payment-success-and-error-events) + +**1.4** [Verify Payment Signature](#14-verify-payment-signature) + +**1.5** [Integrate Payments Rainy Day Kit](#15-integrate-payments-rainy-day-kit) + +**1.6** [Verify Payment Status](#16-verify-payment-status) + +### 1.1 Create an Order + +To process a payment, create a Razorpay Order to correspond with the order in your system. Send the order request parameters to the following endpoint: + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +You can create an order manually by integrating the API sample codes on your server. + +### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency",""); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 50000, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/paypal/supported-currencies.md). Length must be of 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of is to be received from the customer in two installments of #1 - , #2 - , then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +## 1.2 Create a Payment + +Once an order is created, your next step is to create a payment. The following API will create a payment with `wallet` as the payment method: + +/payments/create/json + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ + -d '{ + "amount": "50000", + "currency": "", + "email": "", + "contact": "", + "order_id": "order_EAkbvXiCJlwhHR", + "ip": "198.29.65.27", + "method": "wallet", + "wallet": "paypal" + }' + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson(array('amount' => 50000,'currency' => '','email' => '','contact' => '','order_id' => 'order_I6LVPRQ6upW3uh','ip' => '198.29.65.27','method' => 'wallet','wallet' => 'paypal')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createPaymentJson({ + amount: 50000, + currency: "", + order_id: "order_EAkbvXiCJlwhHR", + ip: "198.29.65.27", + email: "", + contact: "", + method: "wallet", + wallet: "paypal" +}) + +```python: Python +import razorpay + +client = razorpay.Client(auth=("key", "secret")) + +resp = client.payment.createPaymentJson({ + "amount": 50000, + "currency": "", + "order_id": "order_ItZMEZjpBD6dhT", + "ip": "198.29.65.27", + "email": "", + "contact": "", + "method": "wallet", + "wallet": "paypal" +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 50000, + "currency": "", + "order_id": "order_EAkbvXiCJlwhHR", + "ip": "198.29.65.27", + "email": "", + "contact": "", + "method": "wallet", + "card": "paypal" +} +body, err := client.Payment.CreatePaymentJson(para_attr, nil) + +print(resp) + +```json: Response +{ + "razorpay_payment_id": "pay_JbQPrlRl1CnSKc", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/JbQPrlRl1CnSKc/authenticate" + } + ] +} +``` + + +### Request Parameters + + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. Refer to the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/paypal/supported-currencies.md). Length must be of 3 characters. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order. + Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`ip` _mandatory_ +: `string` Customer's IP address. + +`email` _mandatory_ +: `string` Email address of the customer. Maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. Maximum length supported is 15 characters, inclusive of country code. + +`method` _mandatory_ +: `string` Name of the payment method. Possible value is `wallet` + +`wallet` +: `string` Wallet code for the wallet used for the payment. Required if the method is `wallet`. Possible value is `paypal`. + + + +### Response Parameters + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. Possible values: + - `redirect` : Use this URL to redirect customer to submit the OTP on the bank page. + + `url` + : `string` URL to be used for the action indicated. + + +## 1.3 Handle Payment Success and Error Events + +Once the payment is completed by the customer, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + +### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#errors) for details. + +## 1.4 Verify Payment Signature + +Signature verification is a mandatory step to ensure that Razorpay sends the callback. The `razorpay_signature` contained in the callback can be regenerated by your system and verified as follows. + +Create a string to be hashed using the `razorpay_payment_id` contained in the callback and the Order ID generated in the first step, separated by a `|`. Hash this string using SHA256 and your API Secret. + +``` +generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + +if (generated_signature == razorpay_signature) { + payment is successful +} +``` + +### Generate Signature on your Server + +```java: Java +/** +* This class defines common routines for generating +* authentication signatures for Razorpay Webhook requests. +*/ +public class Signature +{ + private static final String HMAC_SHA256_ALGORITHM = "HmacSHA256"; + /** + * Computes RFC 2104-compliant HMAC signature. + * * @param data + * The data to be signed. + * @param key + * The signing key. + * @return + * The Base64-encoded RFC 2104-compliant HMAC signature. + * @throws + * java.security.SignatureException when signature generation fails + */ + public static String calculateRFC2104HMAC(String data, String secret) + throws java.security.SignatureException + { + String result; + try { + + // get an hmac_sha256 key from the raw secret bytes + SecretKeySpec signingKey = new SecretKeySpec(secret.getBytes(), HMAC_SHA256_ALGORITHM); + + // get an hmac_sha256 Mac instance and initialize with the signing key + Mac mac = Mac.getInstance(HMAC_SHA256_ALGORITHM); + mac.init(signingKey); + + // compute the hmac on input data bytes + byte[] rawHmac = mac.doFinal(data.getBytes()); + + // base64-encode the hmac + result = DatatypeConverter.printHexBinary(rawHmac).toLowerCase(); + + } catch (Exception e) { + throw new SignatureException("Failed to generate HMAC : " + e.getMessage()); + } + return result; + } +} + +```php: PHP +use Razorpay\Api\Api; +$api = new Api($key_id, $key_secret); +$attributes = array('razorpay_signature' => '23233', 'razorpay_payment_id' => '332' , 'razorpay_order_id' => '12122'); +$order = $api->utility->verifyPaymentSignature($attributes) + +```ruby: Ruby +require 'razorpay' +Razorpay.setup('key_id', 'key_secret') +payment_response = { + 'razorpay_order_id': '12122', + 'razorpay_payment_id': '332', + 'razorpay_signature': '23233' +} + +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET + Dictionary attributes = new Dictionary(); + + attributes.Add("razorpay_payment_id", paymentId); + attributes.Add("razorpay_order_id", Request.Form["razorpay_order_id"]); + attributes.Add("razorpay_signature", Request.Form["razorpay_signature"]); + + Utils.verifyPaymentSignature(attributes); +```nodejs: Node.js +var { validatePaymentVerification } = require('./dist/utils/razorpay-utils'); + +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); +```Go: Go +import ( + "crypto/hmac" + "crypto/sha256" + "crypto/subtle" + "encoding/hex" + "fmt" +) + +func main() { + signature := "477d1cdb3f8122a7b0963704b9bcbf294f65a03841a5f1d7a4f3ed8cd1810f9b" + secret := "qp3zKxwLZxbMORJgEVWi3Gou" + data := "order_J2AeF1ZpvfqRGH|pay_J2AfAxNHgqqBiI" + //fmt.Printf("Secret: %s Data: %s\n", secret, data) + + // Create a new HMAC by defining the hash type and the key (as byte array) + h := hmac.New(sha256.New, []byte(secret)) + + // Write Data to it + _, err := h.Write([]byte(data)) + + if err != nil { + panic(err) + } + + // Get result and encode as hexadecimal string + sha := hex.EncodeToString(h.Sum(nil)) + + fmt.Printf("Result: %s\n", sha) + + if subtle.ConstantTimeCompare([]byte(sha), []byte(signature)) == 1 { + fmt.Println("Works") + } +} +``` + +## 1.5 Integrate Payments Rainy Day Kit + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + +## 1.6 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/test-integration.md) + +## Settlements + +You receive the payments made using PayPal directly to your PayPal wallet. PayPal makes the settlements in INR. + +## Refunds + +> **INFO** +> +> +> **Refunds - PayPal Balance Required** +> +> Ensure you have sufficient balance in your PayPal account before you initiate a refund. +> + +1. Refunds can be initiated by you either from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#issue-refunds) . +2. The refund amount is deducted from your PayPal account and credited to your customer's PayPal account. diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods/paypal/supported-currencies.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/paypal/supported-currencies.md new file mode 100644 index 00000000..a212292d --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/paypal/supported-currencies.md @@ -0,0 +1,48 @@ +--- +title: Supported Currencies +description: List of currencies supported for PayPal. +--- + +# Supported Currencies + +Given below is the list of supported currencies. + +Currency | Currency Code +--- +Australian dollar | AUD +--- +Canadian dollar | CAD +--- +Swiss franc | CHF +--- +Czech koruna | CZK +--- +Danish krone | DKK +--- +European euro | EUR +--- +Pound sterling | GBP +--- +Hong Kong dollar | HKD +--- +Hungarian forint | HUF +--- +Israeli new shekel | ILS +--- +Mexican peso | MXN +--- +New Zealand dollar | NZD +--- +Norwegian krone | NOK +--- +Philippine peso | PHP +--- +Russian ruble | RUB +--- +Singapore dollar | SGD +--- +Swedish krona | SEK +--- +Thai baht | THB +--- +United States dollar | USD diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi.md new file mode 100644 index 00000000..3bb4bc4a --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi.md @@ -0,0 +1,45 @@ +--- +title: About UPI Payments +description: Accept S2S UPI payments from your customers. +--- + +# About UPI Payments + +UPI is India's fastest-growing payment method and offers higher transaction success rates for your business. + +## UPI Integrations + +There are 2 UPI flows available for S2S. + +- **Collect Flow** + + Customers enter their VPAs, open the respective UPI apps and complete the payment on their mobile devices. You can also [save VPAs of a customer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/saved-vpa.md). Know more about [UPI collect flow on S2S](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/collect.md). +- **Intent Flow** + + When a customer selects the UPI payment app on checkout, the app is launched automatically on the mobile device. Customers need not enter VPA or phone numbers as these details are prefilled and submitted along with the other payment details. Know more about [UPI intent flow on S2S](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md). + + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/s2s-integration.md). +> + +### Related Information + +- [UPI Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) +- [UPI transaction limits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/transaction-limits/upi.md) +- [Saved VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/saved-vpa.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/cfb-cc-upi.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/cfb-cc-upi.md new file mode 100644 index 00000000..cb07271d --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/cfb-cc-upi.md @@ -0,0 +1,644 @@ +--- +title: Customer Fee Bearer on Credit Card on UPI +description: Accept S2S UPI payments from your customers. +--- + +# Customer Fee Bearer on Credit Card on UPI + +Customer Fee Bearer (CFB) on Credit Card on UPI is a payment feature that allows you to pass on processing fees to customers when they make UPI payments using their linked credit cards. This feature enables you to maintain your profit margins while offering customers the convenience of using credit cards through UPI for everyday transactions. When enabled, the checkout will: +- Automatically detect when a customer selects UPI as the payment method. +- Display fee breakdown transparently before payment, showing the convenience fee separately from the order amount. +- Process payment seamlessly after customer confirmation. + +> **INFO** +> +> +> **Feature Enablement** +> +> This is an on-demand feature. Contact your account manager or raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature enabled. +> + +## Prerequisites + +- This feature is available on the Axis Switch gateway only. +- Integrate with Server-to-Server (S2S) integration: + - [S2S JSON V2 (Latest)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2.md) + - [S2S JSON V1](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v1.md) + - [S2S Redirect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/redirect.md) +- This feature is **not** available on UPI Collect method (NPCI restriction). +- Certain business categories are restricted as per NPCI guidelines. The following MCC codes cannot accept credit card payments on UPI: + + +### Restricted MCC codes + + + MCC Code | Category + --- + 6012 | Lending, NBFC, Cooperatives, Pension Fund + --- + 4829 | Wire Transfers and Money Orders + --- + 7322 | Debt Collection Agencies + --- + 6010 | Forex + --- + 6011 | ATMs + --- + 6051 | Cryptocurrency + --- + 6211 | Mutual Fund, Securities, Commodities, Trading + --- + 7800 | Lottery + --- + 7802 | Horse or Dog Racing + --- + 7995 | Lottery and Betting + + + +## Integration Steps + +Follow the integration steps given below: + +### Step 1: Create an Order + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +### Step 2: Calculate Fees Using Calculate Fee API + +Use this API to get the fee breakdown before displaying it to customers: + +/payments/calculate/fees + + +```curl: Request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/payments/calculate/fees \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 100, + "currency": "INR", + "method": "upi", + "upi": { + "flow": "intent" + }, + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "description": "testing payment create", + "payer_account_type": "credit_card" + }' +```json: Response + { + "input": { + "amount": 336, + "currency": "INR", + "method": "upi", + "upi": { + "flow": "intent", + "type": "default" + }, + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "description": "testing payment create", + "payer_account_type": "credit_card", + "fee": 236, + "tax": 36 + }, + "display": { + "originalAmount": 1, + "original_amount": 1, + "fees": 2.36, + "razorpay_fee": 2.00, + "tax": 0.36, + "amount": 3.36, + "currency": "INR" + } + } +``` + + +```curl: Request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/payments/calculate/fees \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 100, + "currency": "INR", + "method": "upi", + "upi": { + "flow": "intent" + }, + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "description": "testing payment create" + }' +```json: Response + { + "input": { + "amount": 101, + "currency": "INR", + "method": "upi", + "upi": { + "flow": "intent", + "type": "default" + }, + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "description": "testing payment create", + "fee": 1, + "tax": 0 + }, + "display": { + "originalAmount": 1, + "original_amount": 1, + "fees": 0.01, + "razorpay_fee": 0.01, + "tax": 0, + "amount": 1.01, + "currency": "INR" + } + } +``` + + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. Length must be of 3 characters. + +`method` _mandatory_ +: `string` Payment method used to make the payment. In this case, it is `upi`. + +`contact` _mandatory_ +: `string` Customer's phone number. + +`email` _mandatory_ +: `string` Customer's email address. + +`description` _optional_ +: `string` A brief description of the payment. + +`payer_account_type` _mandatory_ +: `string` (**CFB Credit Card on UPI only**) Indicates the type of account from which the payment is made. Pass `credit_card` to calculate fees for credit card payments made via UPI. + +`upi` _mandatory_ +: `object` Additional fields to accept UPI payments. + + `flow` _mandatory_ + : `string` The UPI flow for the payment. In this case, it is `intent`. + + + +### Response Parameters + +`input` +: `object` Contains the processed input parameters along with calculated fees. + + `amount` + : `integer` Total amount including fees in the smallest currency unit. For example, `101` for ₹1.01. + + `currency` + : `string` The currency in which the transaction is made. Length must be of 3 characters. + + `method` + : `string` Payment method used to make the payment. In this case, it is `upi`. + + `fee` + : `integer` Total fee amount in the smallest currency unit. For example, `1` for ₹0.01 fee on regular UPI or `236` for ₹2.36 fee on credit card on UPI. + + `tax` + : `integer` Tax amount on the fees in the smallest currency unit. For example, `0` for regular UPI or `36` for ₹0.36 tax on credit card on UPI. + + `payer_account_type` + : `string` (**CFB Credit Card on UPI only**) Account type used for payment. Returns `credit_card` when present in request. + + `upi` + : `object` UPI payment details. + + `flow` + : `string` The UPI flow type. In this case, it is `intent`. + + `type` + : `string` UPI type. In this case, it is `default`. + +`display` +: `object` Contains fee breakdown for display purposes in rupees. + + `originalAmount` + : `integer` Original order amount in rupees. For example, `1` for ₹1. + + `original_amount` + : `integer` Original order amount in rupees (alternative field). For example, `1` for ₹1. + + `fees` + : `decimal` Total fees amount in rupees. For example, `0.01` for regular UPI or `2.36` for credit card on UPI. + + `razorpay_fee` + : `decimal` Razorpay processing fee in rupees. For example, `0.01` for regular UPI or `2.00` for credit card on UPI. + + `tax` + : `decimal` Tax amount on fees in rupees. For example, `0` for regular UPI or `0.36` for credit card on UPI. + + `amount` + : `decimal` Total amount including fees in rupees. For example, `1.01` for regular UPI or `3.36` for credit card on UPI. + + `currency` + : `string` The currency in which the transaction is made. Length must be of 3 characters. + + +### Step 3: Display Fee Breakdown to Customer + +Use the Calculate Fee API response to show customers: +- Original order amount +- Processing fee (convenience fee) +- Total amount to be charged + +The fee breakdown must be displayed transparently before the customer confirms payment. + +![CFB on CC on UPI fee breakdown](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cfb-cc-upi-fee.jpg.md) + +### Step 4: Process Payment + +Create the payment using the standard payment creation endpoint. The implementation varies based on your CFB configuration: + +- **Full CFB (Charge customer fee on all UPI payments)** + - Pass `amount` including UPI base fees. + - Pass `fee` parameter with the fee amount. +- **Partial CFB (Charge fees only for Credit Card on UPI)** + - Pass original `amount` as is. + - Pass `fee` parameter with the fee amount. + +Below is the sample code for partial CFB (credit card on UPI only): + +/payments/create/json + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "description": "testing payment create", + "order_id": "order_QvjHcQ48WcXXXX", + "method": "upi", + "fee": 1, + "upi": { + "flow": "intent" + }, + "notes": { + "prod": "test" + } +}' +```json: Response +{ + "link": "upi://pay?am=1.00&cu=INR&mc=5262&mode=04&pa=test.rzp@rxaxis&pn=Test&split=CCONFEE:0.01&tid=ABRT36c10fe7aa7411f1bcd0b1f2916a821&tn=testingpaymentcreate&tr=RU1AJqAF1W29N1", + "razorpay_payment_id": "pay_RU1AJqAF1WXXXX" +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount to be paid by the customer in the smallest currency unit. For **Full CFB**, include the UPI base fees in this amount. For **Partial CFB**, pass the original order amount. For example, for an actual amount of ₹1, pass `100`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Length must be of 3 characters. + +`contact` _mandatory_ +: `string` Customer's phone number. + +`email` _mandatory_ +: `string` Customer's email address. + +`description` _optional_ +: `string` A brief description of the payment. + +`method` _mandatory_ +: `string` Payment method used to make the payment. In this case, it is `upi`. + +`fee` _mandatory_ +: `integer` (**CFB feature only**) The fee amount obtained from the calculate fee API response in the smallest currency unit. For example, `1` for ₹0.01 fee on regular UPI or `236` for ₹2.36 fee on credit card on UPI. + +`order_id` _mandatory_ +: `string` Unique identifier of the order created using the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +`upi` _mandatory_ +: `object` Additional fields to accept UPI payments. + + `flow` _mandatory_ + : `string` The UPI flow for the payment. In this case, it is `intent`. + +`notes` _optional_ +: `json object` A key-value pair that can hold additional information about the payment. Maximum 15 key-value pairs, 256 characters (maximum) each. + + + +### Response Parameters + +`razorpay_payment_id` +: `string` Unique identifier for the payment. For example, `pay_RU1AJqAF1WXXXX`. + +`link` +: `string` UPI deep link for payment processing. For CFB transactions, the link contains the payment amount and fee breakdown with `split=CCONFEE:` parameter. + + +## Webhook Response + +Once the payment is successfully processed, you will receive a payment captured webhook with the following structure: +```json: Payload +{ + "event": { + "name": "payment_captured", + "data": { + "payment": { + "id": "RFGWLM9pHQXXXX", + "created_at": 1757369021, + "authorized_at": 1757369048, + "status": 2, + "amount": 101, + "currency": "INR", + "method": "upi", + "gateway": "upi_rzpaxis", + "description": "testing payment create", + "fee_data": { + "fee_bearer": 1, + "fee": 1 + }, + "settled_by": "Razorpay", + "base_amount": 101 + }, + "payment_method_details": { + "upi": { + "flow": "intent", + "vpa": "gaurav.kumar@exampleupi", + "payer_account_type": "credit_card" + } + } + } + } +} +``` + +## Settlements + +You will receive the payments in your bank account as per the settlement cycle agreed upon at the time of Razorpay account setup. The settlement breakdown includes: +- **Order Amount**: Original transaction amount. +- **Debit**: Total amount debited from customer. +- **Fees**: Processing fees. +- **Tax**: Applicable taxes. +- **CFB**: When enabled, `Order amount + fees = debit amount`. + +Refer to the [Settlement APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/apis.md). + +## Frequently Asked Questions (FAQs) + + +### 1. How much convenience fee will customers pay? + + The convenience fee varies based on the payment method selected. Use the [Calculate Fee API](#step-2-calculate-fees-using-calculate-fee-api) to get the exact fee amount, which customers will see in the checkout fee breakdown before confirming their payment. + + + +### 2. Can I control which customers see this fee? + + The fee is automatically applied when customers select UPI as the payment method and use a linked credit card. The system detects this automatically during the payment flow using the `payer_account_type` parameter. + + + +### 3. Does this work with all UPI apps? + + This feature works with UPI apps that support credit card linking, subject to the individual app's capabilities and the customer's credit card issuer support. diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/collect.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/collect.md new file mode 100644 index 00000000..12eadf32 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/collect.md @@ -0,0 +1,1084 @@ +--- +title: S2S UPI Collect Flow +description: Collect UPI payments from your customers using the Razorpay S2S UPI Collect Flow API. +--- + +# S2S UPI Collect Flow + +UPI payments enable customers to make payments using a Virtual Payment Address (VPA) without entering bank information. + +Customers enter their VPAs on your UI, open the respective UPI apps and complete the payment after 2-factor authentication (UPI PIN and MPIN) on their mobile devices. Customers are redirected to your website or app after successful payment. + +In this flow, customers likely enter invalid VPAs or forget their VPAs, which could lead to higher drop-off rates. To overcome this problem, Razorpay enables you to validate and save the VPAs of a customer. Know more about [Saved VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/saved-vpa.md). + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/s2s-integration.md). +> + +**NPCI Restrictions for UPI Collect Flow** + +As per NPCI guidelines, the following MCC codes are restricted and cannot accept UPI Collect payments: + + +### Restricted MCC Codes + + + MCC Code | Category + --- + 5816 | Digital Goods: Games + --- + 6540 | POI Funding Transactions (excluding MoneySend) + --- + 4812 | Telecommunication Equipment and Telephone Sales + --- + 4814 | Telecommunication Services + --- + 7408 | Lending Platform + --- + 6513 | Real Estate Agents and Managers - Rentals + --- + 7995 | Betting/Lottery + --- + 5412 | Grocery Stores, Supermarkets + --- + 5413 | Grocery Stores, Supermarkets + + + +### Best Practices + +Follow these best practices to accept online payments using the UPI collect flow: +- [Validate the VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/validate-vpa.md) before initiating the payment request. +- Add a custom UPI Collect expiry based on the business requirement to provide enough time for the customer to complete the payment. +- Use the [Saved VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/saved-vpa.md) feature offered by Razorpay to provide a better customer experience. + +## Prerequisites + +- Reach out to our [Support Team](https://razorpay.com/support/#raise-a-request) to enable VPA validation and saved VPA features for your account. +- Keep the API keys (`Key_Id` and `Key_Secret`) handy for integration. +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + +## User Flow + +Let us understand the process for accepting payments via the UPI collect flow: + +1. The customer selects UPI as the payment method and enters the VPA of their choice on the UI. + Razorpay validates the entered VPA. +2. The customer saves the entered VPA details while completing the payment. +Razorpay saves all the valid VPA details as **tokens**. +3. On a repeat visit, the customer selects the VPA token to complete the payment. + +## Create VPA Tokens + +Given below are the steps to create VPA tokens: + +1. [Create a customer](#step-1-create-a-customer) or fetch the customer for whom the VPA should be saved. +2. [Create an order](#step-2-create-an-order). +3. [Validate the VPA](#step-3-validate-the-vpa) entered by the customer. +4. [Initiate payment](#step-4-initiate-a-payment) with a collect request on the provided VPA. +5. [Handle Payment Success and Error Events](#step-5-handle-payment-success-and-error-events). + +### Step 1: Create a Customer + +> **INFO** +> +> +> **Handy Tips** +> +> Skip this step if you already have customers created in your account. +> + +Create a customer whose VPAs should be saved, with details such as `email` and `contact`. + +/customers + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "fail_existing": "0" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name","Gaurav Kumar"); +customerRequest.put("contact","9123456780"); +customerRequest.put("email","gaurav.kumar@example.com"); +customerRequest.put("fail_existing","0"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->create(array('name' => 'Gaurav Kumar', 'email' => 'gaurav.kumar@example.com','contact'=>'9123456780','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", "Gaurav Kumar"); +options.Add("contact", "9123456780"); +options.Add("email", "gaurav.kumar@example.com"); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({ + name: "Gaurav Kumar", + contact: 9123456780, + email: "gaurav.kumar@example.com", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} + +body, err := client.Customer.Create(data, nil) +``` + +```json: Response +{ + "id": "cust_EIW4T2etiweBmG", + "entity": "customer", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "gstin": null, + "created_at": 1234567890 +} +``` + +#### Request Parameters + +`name` _mandatory_ +: `string` The name of the customer. + +`email` _optional_ +: `string` The email id of the customer. + +`contact` _optional_ +: `string` The phone number of the customer. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `json object` Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. + +### Step 2: Create an Order + +You should create an order before initiating a payment at your end. + +/orders + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 200, + "currency": "INR" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = razorpay.orders.create(orderRequest); + +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "order_rcptid_11"); +options.Add("currency", "INR"); +Order order = client.Order.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 50000, + currency: "INR", + receipt: "receipt#1", + notes: { + key1: "value3", + key2: "value2" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + } +} +body, err := client.Order.Create(data, nil) +``` + +```json: Response +{ + "id": "order_Ee0biRtLOqzRjP", + "entity": "order", + "amount": 200, + "amount_paid": 0, + "amount_due": 200, + "currency": "INR", + "receipt": null, + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1586789358 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of ₹295, enter `29500`. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. Only `INR` is supported. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length of 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty"`. + +### Step 3: Validate the VPA + +Collect the VPA details of the customer and validate it as follows: + +/payments/validate/vpa + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/validate/vpa \ +-H "Content-Type: application/json" \ +-d '{ + "vpa": "gauravkumar@exampleupi" +}' + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("vpa", "gauravkumar@exampleupi"); + +Payment payment = client.Payment.ValidateUpi(paymentRequest) +``` + +```json: Response +{ + "vpa": "gauravkumar@exampleupi", + "success": true, + "customer_name": "Gaurav Kumar" +} +``` + +#### Request Parameters + +`vpa` _mandatory_ +: `string` The virtual payment address (VPA) you want to validate. For example, `gauravkumar@exampleupi`. + + +> **WARN** +> +> +> **Deprecation Notice** +> +> UPI Collect is deprecated effective 28 February 2026. This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [ migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/s2s-integration.md) to switch to UPI Intent. +> + +### Step 4: Initiate a Payment + +Once validated, you can now save the VPA provided by the customer. Create a payment with the valid `vpa` as follows: + +/payments/create/upi + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/create/upi \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 200, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "save": true, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "note_key": "value1" + }, + "upi": + { + "flow": "collect", + "vpa": "gauravkumar@exampleupi", + "expiry_time": 5 + } +}' + +```java: Java +import org.json.JSONObject; +import com.razorpay.Payment; +import com.razorpay.RazorpayClient; +import com.razorpay.RazorpayException; + +RazorpayClient instance = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 500); +paymentRequest.put("currency", "INR"); +paymentRequest.put("order_id", "order_JZluwjknyWdhnU"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("contact", "9123456789"); +paymentRequest.put("method", "upi"); +paymentRequest.put("customer_id", "cust_EIW4T2etiweBmG"); +paymentRequest.put("save", true); +paymentRequest.put("ip", "192.168.0.103"); +paymentRequest.put("referer", "http"); +paymentRequest.put("user_agent", "Mozilla/5.0"); +paymentRequest.put("description", "Test flow"); + +JSONObject notes = new JSONObject(); +notes.put("note_key", "value1"); +paymentRequest.put("notes", notes); + +JSONObject upi = new JSONObject(); +upi.put("flow", "collect"); +upi.put("vpa", "gauravkumar@exampleupi"); +upi.put("expiry_time", 5); +paymentRequest.put("upi", upi); + +Payment payment = instance.payments.createUpi(paymentRequest); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var data = { + "amount": 200, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "save": true, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "note_key": "value1" + }, + "upi": { + "flow": "collect", + "vpa": "gauravkumar@exampleupi", + "expiry_time": 5 + } +}; + +instance.payments.createUpi(data); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +data = { + "amount": 200, + "currency": "INR", + "order_id": "order_GAWRjlWkVcRh0V", + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "save": True, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "note_key": "value1" + }, + "upi": { + "flow": "collect", + "vpa": "gauravkumar@exampleupi", + "expiry_time": 5 + } +} + +client.payment.createUpi(data) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 200, + "currency": "INR", + "order_id": "order_GAWRjlWkVcRh0V", + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "save": 1, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "note_key": "value1" + }, + "upi": { + "flow": "collect", + "vpa": "gauravkumar@exampleupi", + "expiry_time": 5 + } +} + +Razorpay::Payment.create_upi(para_attr) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createUpi(array( + "amount" => 200, + "currency" => "INR", + "order_id" => "order_Jhgp4wIVHQrg5H", + "email" => "gaurav.kumar@example.com", + "contact" => "9123456789", + "method" => "upi", + "customer_id" => "cust_EIW4T2etiweBmG", + "save" => true, + "ip" => "192.168.0.103", + "referer" => "http", + "user_agent" => "Mozilla/5.0", + "description" => "Test flow", + "notes" => array( + "note_key" => "value1" + ), + "upi" => array( + "flow" => "collect", + "vpa" => "gauravkumar@exampleupi", + "expiry_time" => 5 + ) +)); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 200, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "save": true, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": map[string]interface{}{ + "note_key": "value1", + }, + "upi": map[string]interface{}{ + "flow": "collect", + "vpa": "gauravkumar@exampleupi", + "expiry_time": 5, + }, +} + +body, err := client.Payment.CreateUpi(para_attr, nil) +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount", 100); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("order_id", "order_MSd9LNbSEB2Gnv"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9999999999"); +paymentRequest.Add("method", "upi"); +paymentRequest.Add("customer_id", "cust_Z6t7VFTb9xHeOs"); +paymentRequest.Add("save", true); +paymentRequest.Add("ip", "192.168.0.103"); +paymentRequest.Add("referer", "http"); +paymentRequest.Add("user_agent", "Mozilla/5.0"); +paymentRequest.Add("description", "Test flow"); +Dictionary notes = new Dictionary(); +notes.Add("note_key", "value1"); +Dictionary upi = new Dictionary(); +upi.Add("flow", "collect"); +upi.Add("vpa", "gauravkumar@exampleupi"); +upi.Add("expiry_time", 5); +paymentRequest.Add("notes", notes); +paymentRequest.Add("upi", upi); + +Payment payment = client.Payment.CreateUpi(paymentRequest); +``` + +```json: Response +{ + "razorpay_payment_id": "pay_ERGVHAXaLNV1y5" +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The amount associated with the payment in the smallest unit of the supported currency. For example, `2000` means ₹20. + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the payment amount. Only `INR` is supported. + +`order_id` _mandatory_ +: `string` Unique identifier of the order obtained in the response of the previous step. + +`notes` _optional_ +: `json object` Key-value pairs that can hold additional information about the payment. + Refer to the [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) section of the API Reference Guide. + +`description` _optional_ +: `string` Descriptive text of the payment. + +`contact` _mandatory_ +: `string` Phone number of the customer. + +`email` _mandatory_ +: `string` Email address of the customer. + + +> **WARN** +> +> +> **Watch Out!** +> +> The `email` field is mandatory by default. However, you can contact the [support team](https://razorpay.com/support/#request) to make it optional using a feature flag. +> + +`save` +: `boolean` Specifies if the VPA should be stored as tokens. Possible values are: + - `true`: Saves the VPA details. + - `false`(default): Does not save the VPA details. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer, obtained from the response of [Step 1](#step-1-create-a-customer). + +`ip` _mandatory_ +: `string` The client's browser IP address. For example, `117.217.74.98`. + +`referer` _mandatory_ +: `string` Value of `referer` header passed by the client's browser. For example, `https://example.com/` + +`user_agent` _mandatory_ +: `string` Value of `user_agent` header passed by the client's browser. +For example, **Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36** + +`upi` +: `object` Details of the collect expiry. + + `flow` _mandatory_ + : `string` Specify the type of the UPI payment flow. + Possible values are: + - `collect` (default) + - `intent` + + `vpa` _mandatory_ + : `string` The customer's VPA to which the collect request will be sent. + + `expiry_time` _mandatory_ + : `integer` The number of minutes after which the link will expire. The default value is `5`. Maximum value is `5760`. + +#### Response Parameters + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout only for successful payments. + +### Step 5: Handle Payment Success and Error Events + +Once the customer completes the payment, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + +#### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +#### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md#upi) for details. + +## Create Payments using Tokens + +The customer can make payments using the VPA tokens (which were saved earlier) on a repeat transaction. + +1. [Create an order](#step-1-create-an-order). +2. [Fetch all tokens of a customer](#step-2-fetch-vpa-tokens-of-a-customer). +3. [Initiate a payment](#step-3-initiate-a-payment-using-vpa-token) with the token selected by the customer. +4. [Handle Payment Success and Error Events](#step-4-handle-payment-success-and-error-events). + +### Step 1: Create an Order + +You should create an order before initiating the payment. + +/orders + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 600, + "currency": "INR" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = razorpay.orders.create(orderRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "order_rcptid_11"); +options.Add("currency", "INR"); +Order order = client.Order.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 50000, + currency: "INR", + receipt: "receipt#1", + notes: { + key1: "value3", + key2: "value2" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + } +} +body, err := client.Order.Create(data, nil) +``` + +```json: Response +{ + "id": "order_ExhN1Y0100Dkjw", + "entity": "order", + "amount": 600, + "amount_paid": 0, + "amount_due": 600, + "currency": "INR", + "receipt": null, + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1586789358 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The amount for which the order was created, in currency subunits. For example, for an amount of ₹295, enter `29500`. Payment can only be made for this amount against the order. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. Refer the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Can have a maximum length of 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Step 2: Fetch VPA Tokens of a Customer + +Use the API given below to retrieve all the card (if saved earlier) and VPA tokens of a customer. + +/customers/:customer_id/tokens + +```curl: Request +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_EIW4T2etiweBmG/tokens + +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "token_EeO65VIv8BXZg5", + "entity": "token", + "token": "D7Qun28CcPwNVy", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gauravkumar", + "handle": "exampleupi", + "name": null + }, + "recurring": false, + "recurring_details": { + "status": "not_applicable", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1586872080, + "created_at": 1586872080, + "start_time": null, + "dcc_enabled": false + }, + { + "id": "token_EeroOjvOvorT5L", + "entity": "token", + "token": "4ydxm47GQjrIEx", + "bank": null, + "wallet": null, + "method": "card", + "card": { + "entity": "card", + "name": "Gaurav Kumar", + "last4": "8430", + "network": "Visa", + "type": "credit", + "issuer": "HDFC", + "international": false, + "emi": true, + "expiry_month": 12, + "expiry_year": 2030, + "flows": { + "otp": true, + "recurring": true + } + }, + "vpa": null, + "recurring": false, + "auth_type": null, + "mrn": null, + "used_at": 1586976724, + "created_at": 1586976724, + "expired_at": 1672511399, + "dcc_enabled": false + } + ] +} +``` + +### Step 3: Initiate a Payment Using VPA Token + +In each payment create request, instead of the `vpa` field, pass the `customer_id` and `token` attributes: + +/payments/create/upi + +```curl: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/create/upi \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 600, + "currency": "INR", + "order_id": "order_ExhN1Y0100Dkjw", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "token": "token_EeO65VIv8BXZg5" + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "note_key": "value1" + } +}' +```json: Response +{ + "razorpay_payment_id": "pay_ERGVHAXaLNV1y5", + "next": [ + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_ERGVHAXaLNV1y5" + } + ] +} +``` + +#### Request Parameters + +`customer_id` +: `string` Unique identifier of the customer. + +`token` +: `string` Token of the saved VPA. + +#### Response Parameters + +Once the payment is successfully created, you will receive a response containing the `next` array. This array tells you the next steps that you should take to process the payment: + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout only for successful payments. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` The action that you need to perform further. In this case, the value is `poll` + + `url` + : `string` Contains the URL that you must poll to fetch the status of the payment, either `authorized` or `failed`. + +### Step 4: Handle Payment Success and Error Events + +Once the customer completes the payment, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + +#### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +#### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md#upi) for details. + +#### Verify Payment Status + +You can verify the status of the payments using any of the following methods: + +- Poll Razorpay servers periodically for the [payments made for the order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-payments.md) using our Fetch Payment APIs. +- Subscribe to the webhook events created in our system for each of the following entities: + + - [payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md) + - [orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/orders.md) + +#### Payment failure and re-initiating payment + +If the Order is not marked `paid` within 2-3 minutes, then you can re-initiate payment for the same. + +### Related Information + +- [UPI Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md#upi) +- [UPI Transaction Limits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/transaction-limits/upi.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md new file mode 100644 index 00000000..d8a839f5 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md @@ -0,0 +1,211 @@ +--- +title: S2S UPI Intent Flow +description: Enable payments on your apps using the UPI Intent flow applicable in server-to-server integration. +--- + +# S2S UPI Intent Flow + +You can collect payments using the UPI intent flow that will be handled by UPI apps installed on your customers' mobile devices. + +Customers need not enter VPA or phone numbers as these details are prefilled and submitted along with the other payment details. While making the payment, customers select the UPI PSP app on your UI. The app is launched automatically on their mobile devices where the payment is completed. + +### Best Practices + +If you have a significant amount of payment traffic coming from the Mobile Site, then it is advisable to use the Google Pay Intent flow available for the mSite: + +1. **Do not change Intent URL** + + Do not make changes to the intent URL shared by Razorpay as part of the API response. Making changes to the intent URL can lead to payment failure. + +2. **Host UPI apps** + + It is recommended to host the UPI apps on your page/app instead of just hosting the Intent URI where the apps are shown by the native Android drawer. This improves conversion. +3. **Rank UPI Apps by Success Rate** + + Show the UPI PSP apps in the order of their success rate. +4. **Mobile site** + + If you have higher traffic via mobile site, then make sure you provide the option of UPI intent payment to your users using our [m-site integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/google-pay/custom-integration.md). This will help you achieve better success rates. +5. **Gpay SDK** + + If your UPI transaction volumes are high, you can also explore integrating [Gpay SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/google-pay.md#android-integration-using-google-pay-sdk). This provides a better user experience and about a 3-5% improvement in success rate. + +## Prerequisites + +- Reach out to our [Support Team](https://razorpay.com/support/#raise-a-request) to get this feature enabled for your account. +- Keep the API keys (`Key_Id` and `Key_Secret`) handy for integration. +- [Generate API Keys from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) if you have not done already. + +## Integration Steps + +1. [Create an order](#step-1-create-an-order). +2. [Initiate Payment using the intent URL](#step-2-initiate-a-payment). +3. [Verify the payment status](#step-3-verify-the-payment-status). + +### Step 1: Create an Order + +You should create an order before initiating a payment at your end. + +/orders + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 200, + "currency": "INR" +}' +```json: Response +{ + "id": "order_Ee0biRtLOqzRjP", + "entity": "order", + "amount": 200, + "amount_paid": 0, + "amount_due": 200, + "currency": "INR", + "receipt": null, + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1586789358 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The amount for which the Order was created, in currency subunits. For example, for an amount of ₹295, enter `29500`. + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the payment amount. Only `INR` is supported. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length of 40 characters supported. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Step 2: Initiate a Payment + +After creating an order, initiate a payment with `intent` flow. + +/payments/create/upi + +```curl: Request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/payments/create/upi \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 100, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "purpose": "UPI test payment" + }, + "upi": { + "flow" : "intent" + } + }' +``` json: Response +{ + "razorpay_payment_id": "pay_CMeM6XvOPGFiF", + "link": "upi://pay?pa=success@razorpay&pn=xyz&tr=xxxxxxxxxxx&tn=gourav&am=1&cu=INR&mc=xyzw" +} +``` + +> **WARN** +> +> +> **Do not make changes to the link** +> +> Do not make changes to the link you receive in the response. This is the Razorpay Intent URL. Making changes to this URL can lead to payment failure or other unexpected errors with the payment. +> + +#### Request Parameters + +The parameters needed for constructing the API request are described below: + +`amount` _mandatory_ +: `integer` The amount associated with the payment in smallest unit of the supported currency. For example, `2000` means ₹20. + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the payment amount. In this case, it is `INR`. + +`order_id` _mandatory_ +: `string` Unique identifier of the order, obtained from the response of the previous step. + +`contact` _mandatory_ +: `string` Phone number of the customer. + +`email` _mandatory_ +: `string` Email address of the customer. + +`ip` _optional_ +: `string` Client's browser IP address. For example, `117.217.74.98`. + +`referer` _optional_ +: `string` Value of the`referer` header passed by the client's browser. For example, `https://example.com/`. + +`user_agent` _optional_ +: `string` Value of the `user_agent` header passed by client's browser. For example, **Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36**. + +`description` _optional_ +: `string` Descriptive text of the payment. + +`notes` _optional_ +: `json object` A key-value pair that can hold additional information about the payment. + Refer the [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) section of the API Reference Guide. + +`upi` _mandatory_ +: `object` Details of the UPI payment. + + `flow` + : `string` Type of the UPI method. In this case, it is `intent`. + +You will get the UPI Intent URI as part of the payment response. + +To pass the payment data to the respective UPI app and to initiate the payment, implement the code given below: + +```js: Pass data to UPI app +Intent i = new Intent(Intent.ACTION_VIEW); + i.setData(Uri.parse(url)); //uri from the create S2S payment response + i.setPackage(packageName); //package name from the `upi://pay` intent response + +activity.startActivityForResult(i,2561); //unique activity code to get the callback +``` + +> **INFO** +> +> +> **Handy Tips** +> +> For the package name, you can check the [list of supported UPI apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/supported-apps.md). +> + +### Step 3: Verify the Payment Status + +You can verify the status of the payments using any of the following methods: + +- Poll Razorpay servers periodically for the payments made for the order using our [Fetch Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-payments.md). + +- [Subscribe to the Webhook events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) created in our system for each of the following entities: + + - [payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md) + - [orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/orders.md) + +#### Payment failure and re-initiating payment + +If the Order is not marked `paid` within 2-3 minutes, then you can re-initiate payment for the same. + +### Related Information + +[Error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md#list-of-error-reasons-for-payments) diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/saved-vpa.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/saved-vpa.md new file mode 100644 index 00000000..7b664f51 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/saved-vpa.md @@ -0,0 +1,53 @@ +--- +title: About Saved VPA in Server-to-Server Integration +description: Store VPA details entered by your customers as tokens that can be used later for repeated transactions on your website. +--- + +# About Saved VPA in Server-to-Server Integration + +In an online transaction using UPI collect flow, customers perform these steps: + +1. Enter their virtual payment address (VPA) at the Checkout. +2. Open the respective UPI apps. +3. Complete the payment after successful two-factor authentication. + +In this flow, customers likely enter invalid VPAs or forget their VPAs, which could lead to higher drop-off rates. To overcome this problem, Razorpay enables you to save the VPAs of a customer. The VPAs entered by the customer are stored and secured as **tokens** in Razorpay. This saves the customer the hassle of entering the VPA again for every transaction. Thereafter, on subsequent visits, the customers select the saved VPA of their choice and complete the payment. + + to get this feature activated on your Razorpay account. + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/s2s-integration.md). +> + +## Prerequisites + +- Create a [Razorpay Account](https://dashboard.razorpay.com/signup). +- [Generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from your Dashboard. + +## User Flow + +The user flow for accepting payments using tokens is as follows: + +1. The customer enters the VPA to make UPI payments on your UI. +2. The entered VPAs are saved as tokens by Razorpay. +3. On a repeat visit to your site, all the tokens saved for a customer are displayed on the UI. +4. From the displayed list of VPAs, customers select the VPA of their choice to complete the payment. + +## Integration + +Know how to [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/saved-vpa/build-integration.md) to save VPAs. diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/saved-vpa/build-integration.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/saved-vpa/build-integration.md new file mode 100644 index 00000000..8bb5aef3 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/saved-vpa/build-integration.md @@ -0,0 +1,905 @@ +--- +title: Build Integration +description: Steps to integrate tokens in the payment flow. +--- + +# Build Integration + +The steps required to integrate tokens in the payment flow are as follows: + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/s2s-integration.md). +> + +### Step 1: Create a Customer + +Create a customer whose VPAs should be saved. You can skip this step if you have already created customers in your account. + +/customers + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000" +}' +```Java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject request = new JSONObject(); +request.put("name", ); +request.put("email", ); + +Customer customer = razorpayClient.Customers.create(request); + +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create(data=data) + +```php: PHP +$api = new Api($key_id, $secret); + +$customer = $api->customer->create(array('name' => 'Gaurav Kumar', 'email' => 'gaurav.kumar@example.com')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", "Gaurav Kumar"); +options.Add("contact", "9000090000"); +options.Add("email", "gaurav.kumar@example.com"); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customer = Razorpay::Customer.create email: 'gaurav.kumar@example.com', contact: '9000090000' +puts customer.id #cust_6vRXClWqnLhV14 + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({name, email, contact, notes}) + +```json: Response +{ + "id" : "cust_EIW4T2etiweBmG", + "entity": "customer", + "name" : "Gaurav Kumar", + "email" : "gaurav.kumar@example.com", + "contact" : "9000090000", + "gstin": null, + "created_at ": 1234567890 +} +``` + +#### Request Parameters + +`name` _mandatory_ +: `string` The name of the customer. + +`email ` _optional_ +: `string` The email ID of the customer. + +`contact ` _optional_ +: `integer` The phone number of the customer. + +`notes` _optional_ +: `json object` Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters +(maximum), are supported. + +#### Response + +The `id` obtained in the response should be sent as `customer_id` while creating the token. + +### Step 2: Create an Order + +You should create an order before initiating a payment at your end. + +/orders + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 200, + "currency": "INR" +}' +```json: Response +{ + "id": "order_Ee0biRtLOqzRjP", + "entity": "order", + "amount": 200, + "amount_paid": 0, + "amount_due": 200, + "currency": "INR", + "receipt": null, + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1586789358 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The amount for which the order was created, in currency subunits. +For example, for an amount of ₹295, enter `29500`. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. Only `INR` is supported. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length of 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Step 3: Create Tokens for a Customer + +While making the UPI collect payment, the customer enters the VPA on your UI. To store the VPA as a **token**, pass additional attributes in the create payment request: + +```curl: Curl +curl -X POST \ +https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d + '{ + "amount": 100, + "currency": "INR", + "contact": 9000090000, + "email": "gaurav.kumar@example.com", + "order_id": "order_MvaGI8vuixxomP", + "method": "upi", + "customer_id": "cust_KZ6AT8Jx6InXPI", + "upi": { + "vpa": "gaurav.kumar@exampleupi" + }, + "save": true, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +}' + +```php: PHP + +$api = new Api($key_id, $secret); + +$api->payment->createPaymentRedirect(array('amount' => 100,'currency' => 'INR','email' => 'gaurav.kumar@example.com','contact' => '9000090000','order_id' => 'order_I6LVPRQ6upW3uh','method' => 'upi','vpa' => 'gaurav.kumar@exampleupi','save' => true,'ip' => '105.106.107.108', 'referer' => 'https://merchansite.com/example/paybill','user_agent' => 'Mozilla/5.0')); + +```javascript: Node.js + +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' })instance.payments.createPaymentRedirect({ amount: 100, currency: "INR", order_id: "order_EAkbvXiCJlwhHR", email: "gaurav.kumar@example.com", contact: 9000090000, method: "upi", vpa: "gaurav.kumar@exampleupi", save: true, ip: "105.106.107.108", referer: "https://merchansite.com/example/paybill", user_agent: "Mozilla/5.0"}) + +```python: Python + +import razorpayclient = razorpay.Client(auth=("key", "secret"))resp = client.payment.createPaymentRedirect({ "amount": 100, "currency": "INR", "order_id": "order_ItZMEZjpBD6dhT", "email": "gaurav.kumar@example.com", "contact": 9000090000, "method": "upi", "vpa": "gaurav.kumar@exampleupi", "save": True, "ip": "105.106.107.108", "referer": "https://merchansite.com/example/paybill", "user_agent": "Mozilla/5.0"})print(resp) +``` + +```java: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The email must be a valid email address.", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "email" + } +} + +```java: Success Response + + Processing, Please Wait... + + + + + + + * { + box-sizing: border-box; + margin: 0; + padding: 0; + } + body { + background: #F5F5F5; + overflow: hidden; + text-align: center; + height: 100%; + white-space: nowrap; + margin: 0; + padding: 0; + font-family: -apple-system, BlinkMacSystemFont, ubuntu, verdana, helvetica, sans-serif; + } + #bg { + position: absolute; + bottom: 50%; + width: 100%; + height: 50%; + background: #198C78; + margin-bottom: 90px; + } + #cntnt { + position: relative; + width: 100%; + vertical-align: middle; + display: inline-block; + margin: auto; + max-width: 420px; + min-width: 280px; + height: 95%; + max-height: 360px; + background: #fff; + z-index: 9999; + box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.16); + border-radius: 4px; + overflow: hidden; + padding: 24px; + box-sizing: border-box; + text-align: left; + } + #ftr { + position: absolute; + left: 0; + right: 0; + bottom: 0; + height: 80px; + background: #F5F5F5; + text-align: center; + color: #212121; + font-size: 14px; + letter-spacing: -0.3px; + } + #ldr { + width: 100%; + height: 3px; + position: relative; + margin-top: 16px; + border-radius: 3px; + overflow: hidden; + } + #ldr::before, + #ldr::after { + content: ''; + position: absolute; + top: 0; + bottom: 0; + width: 100%; + } + #ldr::before { + top: 1px; + border-top: 1px solid #BCBCBC; + } + #ldr::after { + background: #198C78; + width: 0%; + transition: 20s cubic-bezier(0, 0.1, 0, 1); + } + .loaded #ldr::after { + width: 90%; + } + #logo { + width: 48px; + height: 48px; + padding: 8px; + border: 1px solid #E5E5E5; + border-radius: 3px; + text-align: center; + } + #hdr { + min-height: 48px; + position: relative; + } + #logo, + #name, + #amt { + display: inline-block; + vertical-align: middle; + letter-spacing: -0.5px; + } + #amt { + position: absolute; + right: 0; + top: 0; + background: #fff; + color: #212121; + } + #name { + line-height: 48px; + margin-left: 12px; + font-size: 16px; + max-width: 140px; + overflow: hidden; + text-overflow: ellipsis; + color: #212121; + } + #logo+#name { + line-height: 20px; + } + #txt { + height: 200px; + text-align: center; + } + #title { + font-size: 20px; + line-height: 24px; + margin-bottom: 8px; + letter-spacing: -0.3px; + } + #msg, + #cncl { + font-size: 14px; + line-height: 20px; + color: #757575; + margin-bottom: 8px; + letter-spacing: -0.3px; + } + #cncl { + text-decoration: underline; + cursor: pointer; + } + #logo img { + max-width: 100%; + max-height: 100%; + vertical-align: middle; + } + @media (max-height:580px), + (max-width:420px) { + #bg { + display: none; + } + body { + background: #198C78; + } + } + @media (max-width:420px) { + #cntnt { + padding: 16px; + width: 95%; + } + #name { + margin-left: 8px; + } + } + + + var events = { + page: 'payment_redirect_postform', + props: { + payment_id: 'pay_JLuUedI2qYOOXd', + merchant_id: '8TgNt9DVrJB0bl', + }, + load: true, + unload: true + } + + !function(e){e.track=Boolean;try{if(/razorpay\.in$/.test(location.origin))return;if("object"!=typeof e.events)return;var n=e.events.props;if(0===Object.keys(n).length)return;var t,o=e.events,r=o.page,a=o.load,s=o.unload,i=o.error,c="https://lumberjack.razorpay.com/v1/track",u="MC40OTMwNzgyMDM3MDgwNjI3Nw9YnGzW",p="function"==typeof navigator.sendBeacon,d=Date.now(),f=[{name:"ua_parser",input_key:"user_agent",output_key:"user_agent_parsed"}];function l(e,o){(o=o||{}).beacon=p,o.time_since_render=Date.now()-d,o.url=location.href,function(e,n){if(e&&n)Object.keys(n).forEach(function(t){e[t]=n[t]})}(o,n);var a={addons:f,events:[{event:r+":"+e,properties:o,timestamp:Date.now()}]},s=encodeURIComponent(btoa(unescape(encodeURIComponent(JSON.stringify(a))))),i=JSON.stringify({key:u,data:s});p?navigator.sendBeacon(c,i):((t=new XMLHttpRequest).open("post",c,!0),t.send(i))}a&&l("load"),s&&e.addEventListener("unload",function(){l("unload")}),i&&e.addEventListener("error",function(e){l("error",{message:e.message,line:e.line,col:e.col,stack:e.error&&e.error.stack})})}catch(e){}e.track=l}(window); + + + + + + + RazorPay + + + + + + Loading Bank page… + Please wait while we redirect you to your Bank page + + + + + + Secured by + ![](https://cdn.razorpay.com/logo.svg) + + + + + setTimeout(function() { + document.body.className = 'loaded'; + }, 10); + setTimeout(function(){ + document.getElementById('title').innerHTML = 'Still trying to load...'; + document.getElementById('msg').innerHTML = 'The bank page is taking time to load.'; + }, 10000); + + +``` + +#### Request Parameters + +`customer_id` +: `string` Unique identifier of the customer. This can be obtained from the response of [Step 1](#step-1-create-a-customer). + +`amount` _mandatory_ +: `integer` The amount for which the order was created, in currency subunits. +For example, for an amount of ₹295, enter `29500`. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. Only `INR` is supported. + +`order_id` _mandatory_ +: `string` Order ID generated via [Razorpay Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`email` _mandatory_ +: `string` Email address of the customer. + +`contact` _mandatory_ +: `string` Phone number of the customer. + +`method` _mandatory_ +: `string` The payment method used to make the payment. Possible value is `upi`. + +`upi` _mandatory_ +: `object` The UPI type payment method. + + `vpa` _mandatory_ + : `string` UPI ID used for making the payment on the UPI app. + +`ip` _mandatory_ +: `string` The client's browser IP address. For example, `105.106.107.108`. + +`referer` _mandatory_ +: `string` Value of `referer` header passed by the client's browser. For example, `https://merchansite.com/example/paybill` + +`user_agent` _mandatory_ +: `string` Value of `user_agent` header passed by the client's browser. +For example, **Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36** + +`save` +: `boolean` Specifies if the VPA should be stored as a token. Possible values are: + - `true`: Saves the VPA details. + - `false`(default): Does not save the VPA details. + +#### Response + +The response contains an HTML page that is rendered in the customer's browser. The customer can now complete the payment by logging in to the respective UPI app. + +### Step 4: Fetch all Tokens of the Customer + +All the card (if saved earlier) and VPA tokens of a customer can be retrieved. + +/customers/:customer_id/tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/cust_EIW4T2etiweBmG/tokens + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```Java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +List customer = instance.customers.fetchTokens(customerId) + +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "token_EeroOjvOvorT5L", + "entity": "token", + "token": "4ydxm47GQjrIEx", + "bank": null, + "wallet": null, + "method": "card", + "card": { + "entity": "card", + "name": "Gaurav Kumar", + "last4": "8430", + "network": "Visa", + "type": "credit", + "issuer": "HDFC", + "international": false, + "emi": true, + "expiry_month": 12, + "expiry_year": 2022, + "flows": { + "otp": true, + "recurring": true + } + }, + "vpa": null, + "recurring": false, + "auth_type": null, + "mrn": null, + "used_at": 1586976724, + "created_at": 1586976724, + "expired_at": 1672511399, + "dcc_enabled": false + }, + { + "id": "token_EeO65VIv8BXZg5", + "entity": "token", + "token": "D7Qun28CcPwNVy", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "9000090000", + "handle": "upi", + "name": null + }, + "recurring": false, + "recurring_details": { + "status": "not_applicable", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1586872080, + "created_at": 1586872080, + "start_time": null, + "dcc_enabled": false + } + ] +} +``` + +#### Response + +Pass the token that contains the VPA details of the customer, `token_EeO65VIv8BXZg5` in the above example, to the payment create request. + +### Step 5: Create Payments using Tokens + +After VPA tokenisation, customers can complete their UPI payments without having to enter their VPAs again for repeat transactions on your site. + +You should pass the following attributes in each payment create request, instead of the `vpa` field: + +```curl: Curl +curl -X POST \ +https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d + '{ + "amount": 100, + "currency": "INR", + "contact": 9000090000, + "email": "gaurav.kumar@example.com", + "order_id": "order_I6LVPRQ6upW3uh", + "method": "upi", + "customer_id":"cust_KZ6AT8Jx6InXPI", + "token":"token_EeroOjvOvorT5L" +}' + +```php: PHP + +$api = new Api($key_id, $secret); + +$api->payment->createPaymentRedirect(array('amount' => 100,'currency' => 'INR','email' => 'gaurav.kumar@example.com','contact' => '9000090000','order_id' => 'order_I6LVPRQ6upW3uh','method' => 'upi','customer_id' => 'cust_KZ6AT8Jx6InXPI','token' => 'token_EeroOjvOvorT5L')); + +```javascript: Node.js + +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' })instance.payments.createPaymentRedirect({ amount: 100, currency: "INR", order_id: "order_I6LVPRQ6upW3uh", email: "gaurav.kumar@example.com", contact: 9000090000, method: "upi", customer_id: "cust_KZ6AT8Jx6InXPI", token: "token_EeroOjvOvorT5L"}) + +```python: Python + +import razorpayclient = razorpay.Client(auth=("key", "secret"))resp = client.payment.createPaymentRedirect({ "amount": 100, "currency": "INR", "order_id": "order_ItZMEZjpBD6dhT", "email": "gaurav.kumar@example.com", "contact": 9000090000, "method": "upi", "customer_id": "cust_KZ6AT8Jx6InXPI", "token": "token_EeroOjvOvorT5L"})print(resp) +``` + +```java: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The email must be a valid email address.", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "email" + } +} + +```java: Success Response + + Processing, Please Wait... + + + + + + + * { + box-sizing: border-box; + margin: 0; + padding: 0; + } + body { + background: #F5F5F5; + overflow: hidden; + text-align: center; + height: 100%; + white-space: nowrap; + margin: 0; + padding: 0; + font-family: -apple-system, BlinkMacSystemFont, ubuntu, verdana, helvetica, sans-serif; + } + #bg { + position: absolute; + bottom: 50%; + width: 100%; + height: 50%; + background: #198C78; + margin-bottom: 90px; + } + #cntnt { + position: relative; + width: 100%; + vertical-align: middle; + display: inline-block; + margin: auto; + max-width: 420px; + min-width: 280px; + height: 95%; + max-height: 360px; + background: #fff; + z-index: 9999; + box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.16); + border-radius: 4px; + overflow: hidden; + padding: 24px; + box-sizing: border-box; + text-align: left; + } + #ftr { + position: absolute; + left: 0; + right: 0; + bottom: 0; + height: 80px; + background: #F5F5F5; + text-align: center; + color: #212121; + font-size: 14px; + letter-spacing: -0.3px; + } + #ldr { + width: 100%; + height: 3px; + position: relative; + margin-top: 16px; + border-radius: 3px; + overflow: hidden; + } + #ldr::before, + #ldr::after { + content: ''; + position: absolute; + top: 0; + bottom: 0; + width: 100%; + } + #ldr::before { + top: 1px; + border-top: 1px solid #BCBCBC; + } + #ldr::after { + background: #198C78; + width: 0%; + transition: 20s cubic-bezier(0, 0.1, 0, 1); + } + .loaded #ldr::after { + width: 90%; + } + #logo { + width: 48px; + height: 48px; + padding: 8px; + border: 1px solid #E5E5E5; + border-radius: 3px; + text-align: center; + } + #hdr { + min-height: 48px; + position: relative; + } + #logo, + #name, + #amt { + display: inline-block; + vertical-align: middle; + letter-spacing: -0.5px; + } + #amt { + position: absolute; + right: 0; + top: 0; + background: #fff; + color: #212121; + } + #name { + line-height: 48px; + margin-left: 12px; + font-size: 16px; + max-width: 140px; + overflow: hidden; + text-overflow: ellipsis; + color: #212121; + } + #logo+#name { + line-height: 20px; + } + #txt { + height: 200px; + text-align: center; + } + #title { + font-size: 20px; + line-height: 24px; + margin-bottom: 8px; + letter-spacing: -0.3px; + } + #msg, + #cncl { + font-size: 14px; + line-height: 20px; + color: #757575; + margin-bottom: 8px; + letter-spacing: -0.3px; + } + #cncl { + text-decoration: underline; + cursor: pointer; + } + #logo img { + max-width: 100%; + max-height: 100%; + vertical-align: middle; + } + @media (max-height:580px), + (max-width:420px) { + #bg { + display: none; + } + body { + background: #198C78; + } + } + @media (max-width:420px) { + #cntnt { + padding: 16px; + width: 95%; + } + #name { + margin-left: 8px; + } + } + + + var events = { + page: 'payment_redirect_postform', + props: { + payment_id: 'pay_JLuUedI2qYOOXd', + merchant_id: '8TgNt9DVrJB0bl', + }, + load: true, + unload: true + } + + !function(e){e.track=Boolean;try{if(/razorpay\.in$/.test(location.origin))return;if("object"!=typeof e.events)return;var n=e.events.props;if(0===Object.keys(n).length)return;var t,o=e.events,r=o.page,a=o.load,s=o.unload,i=o.error,c="https://lumberjack.razorpay.com/v1/track",u="MC40OTMwNzgyMDM3MDgwNjI3Nw9YnGzW",p="function"==typeof navigator.sendBeacon,d=Date.now(),f=[{name:"ua_parser",input_key:"user_agent",output_key:"user_agent_parsed"}];function l(e,o){(o=o||{}).beacon=p,o.time_since_render=Date.now()-d,o.url=location.href,function(e,n){if(e&&n)Object.keys(n).forEach(function(t){e[t]=n[t]})}(o,n);var a={addons:f,events:[{event:r+":"+e,properties:o,timestamp:Date.now()}]},s=encodeURIComponent(btoa(unescape(encodeURIComponent(JSON.stringify(a))))),i=JSON.stringify({key:u,data:s});p?navigator.sendBeacon(c,i):((t=new XMLHttpRequest).open("post",c,!0),t.send(i))}a&&l("load"),s&&e.addEventListener("unload",function(){l("unload")}),i&&e.addEventListener("error",function(e){l("error",{message:e.message,line:e.line,col:e.col,stack:e.error&&e.error.stack})})}catch(e){}e.track=l}(window); + + + + + + + RazorPay + + + + + + Loading Bank page… + Please wait while we redirect you to your Bank page + + + + + + Secured by + ![](https://cdn.razorpay.com/logo.svg) + + + + + setTimeout(function() { + document.body.className = 'loaded'; + }, 10); + setTimeout(function(){ + document.getElementById('title').innerHTML = 'Still trying to load...'; + document.getElementById('msg').innerHTML = 'The bank page is taking time to load.'; + }, 10000); + + +``` + +#### Request Parameters + +`customer_id` +: `string` Unique identifier of the customer. + +`amount` _mandatory_ +: `integer` The amount for which the order was created, in currency subunits. +For example, for an amount of ₹295, enter `29500`. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. Only `INR` is supported. + +`order_id` _mandatory_ +: `string` Order ID generated via [Razorpay Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`email` _mandatory_ +: `string` Email address of the customer. + +`contact` _mandatory_ +: `string` Phone number of the customer. + +`method` +: `string` The payment method used to make the payment. Possible value is `upi`. + +`token` +: `string` Token of the saved VPA, obtained in the [previous step](#step-4-fetch-all-tokens-of-the-customer). + +#### Response + +The response contains an HTML page that is rendered in the customer's browser. The customer can now complete the payment by logging in to the respective UPI app. + +### Next Steps + +You can check the status of the payments using any of the following methods: + +- Poll the Razorpay servers to [fetch a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md) or [fetch the payments made for an order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-payments-based-on-orders). + +- Subscribe to [payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md) and [orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/orders.md) Webhook events that are generated in Razorpay when the customer completes the payment on your website. diff --git a/llm-content/payments/payment-gateway/s2s-integration/payment-methods/wallet.md b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/wallet.md new file mode 100644 index 00000000..f05bfaf7 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/payment-methods/wallet.md @@ -0,0 +1,374 @@ +--- +title: Wallets +description: Integrate Wallets with Razorpay to accept payments. +--- + +# Wallets + +An online wallet works as a payment instrument that can be used by customers to store money for later use. On the other hand, a payment gateway is a full-fledged payment solution that helps online businesses to accept money via a website or app. + +## Integration Steps + +Follow the steps below to integrate S2S JSON API and accept payments using Wallet. + +**1.1** [Generate List of Wallets Supported](#11-generate-the-list-of-wallets-supported). + +**1.2** [Create an Order](#12-create-an-order). + +**1.3** [Create a Payment](#13-create-a-payment). + +**1.4** [Handle Payment Success and Error Events](#14-handle-payment-success-and-error-events). + +**1.5** [Fetch the Payment Details and Status](#15-fetch-payment-details-and-status). + +**1.6** [Verify Payment Signature](#16-verify-payment-signature). + +**1.7** [Integrate Payments Rainy Day Kit](#17-integrate-payments-rainy-day-kit). + +**1.8** [Verify Payment Status](#18-verify-payment-status). + +### 1.1 Generate the List of Wallets Supported + +The first step to identify and get the list of wallets enabled in your Razorpay account with their respective codes to integrate correctly. Razorpay uses its own wallet codes to identify the right wallet instrument entity in the system correctly. + +To get the list of wallets and their respective codes, use the following API code: + +```curl: Request +curl --location --request GET 'https://api.razorpay.com/v1/methods?key_id={MERCHANT_API_KEY}' + +```json: Response +{ + "entity": "methods", + "wallet": { + "boost": true, + "grabpay": true, + "touchngo": true, + "shopback": true, + "mcash": true + } +} +``` + +### 1.2 Create an Order + +To process a payment, create a Razorpay Order to correspond with the order in your system. Send the order request parameters to the following endpoint: + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230 +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", ""); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +DATA = { + "amount": 100, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", ""); +Order order = client.Order.Create(options); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +options = amount: 50000, currency: '', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 50000, + currency: "", + receipt: "receipt#1", + notes: { + key1: "value3", + key2: "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "", + "receipt": "some_receipt_id" +} +body, err := client.Order.Create(data) +```json: Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit, such as Ringgit (in case of MY). For example, for an actual amount of , the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. Length must be of 3 characters. For example, `MYR`. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of is to be received from the customer in two installments of #1 - RM 5,000, #2 - RM 2,000, then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +#### Response Parameters +Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + +#### Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +### 1.3 Create a Payment + +Once an order is created, your next step is to create a payment. The following API will create a payment with `wallet` as the payment method: + +/payments/create/json + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "content-type: application/json" \ +-d '{ + "amount": 100, + "currency": "MYR", + "order_id": "order_M44abB0zucB0h4", + "email": "nur.aisyah@example.com", + "contact": "+60123456789", + "method": "wallet", + "wallet": "touchngo", + "callback_url": "https://merchant_callback_url.." +}' + +```json: Response +{ + "next": [ + { + "action": "redirect", + "url": "https://api-dark.razorpay.com/pg_router/v1/payments/M44abyKHHUnfBc/authenticate" + } + ], + "razorpay_payment_id": "pay_M44abyKHHUnfBc" +} +``` + +#### Request Parameters + +The payment request for each of the supported payment methods will slightly vary. Know more about the [relevant payment request fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md). + +#### Response Parameters + +If the payment request is valid, the response contains the following fields. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. Possible values: + - `redirect` : Use this URL to redirect customer to submit the OTP on the bank page. + + `url` + : `string` URL to be used for the action indicated. + +The Payment API will return the payment id along with the authentication URL to which the user has to be redirected. You may choose to store the Payment id on your server to help us enquire about the status and other accounting purposes if required. + +You may now choose to redirect the user to the authentication URL that you have received in the response. + +### 1.4 Handle Payment Success and Error Events + +Once the payment is completed by the customer, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + +#### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_LUtJxInEqa0oAA&", + "razorpay_order_id": "order_LUtJ52zWwapfqs&", + "razorpay_signature": "e617a6c035cb39feb6cd16358d83a4e3d30b11d9e8e2181e6ef442da1d41df20" +} +``` + +#### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#errors) for details. + +### 1.5 Fetch Payment Details and Status + +After receiving the `razorpay_payment_id` through the merchant `callback_url`, use this to fetch the payment details to check the status of the payment by using the following code: + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/payments/pay_M44abyKHHUnfBc \ + +```json: Response +{ + "id": "pay_M44abyKHHUnfBc", + "entity": "payment", + "amount": 100, + "currency": "MYR", + "base_amount": 100, + "status": "captured", + "order_id": "order_M44abB0zucB0h4", + "invoice_id": null, + "international": false, + "method": "wallet", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "", + "wallet": "touchngo", + "vpa": null, + "email": "nur.aisyah@example.com", + "contact": "+60123456789", + "notes": [], + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "transaction_id": "CDH000000M44abyKHHUnfBc" + }, + "created_at": 1687239830 +} +``` + +### 1.6 Verify Payment Signature + +Signature verification is a mandatory step to ensure that Razorpay Curlec sends the callback. The `razorpay_signature` contained in the callback can be regenerated by your system and verified as follows. + +Create a string to be hashed using the `razorpay_payment_id` contained in the callback and the Order ID generated in the first step, separated by a `|`. Hash this string using SHA256 and your API Secret. + +``` +generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + +if (generated_signature == razorpay_signature) { + payment is successful +} +``` + +### 1.7 Integrate Payments Rainy Day Kit + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + +### 1.8 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +### Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments.md new file mode 100644 index 00000000..f3c2a359 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments.md @@ -0,0 +1,235 @@ +--- +title: Recurring Payments - S2S Integration +description: Integrate Recurring Payments using Razorpay APIs. +--- + +# Recurring Payments - S2S Integration + +Recurring Payments allow you to charge your customers repeatedly without requiring them to enter payment details each time. Your customers authorise their payment method once and you can charge them at intervals you control based on your business needs. + +Use Razorpay Recurring Payments to create flexible payment schedules for subscriptions, installments, usage-based billing or on-demand charges. Set up recurring payments quickly using our powerful REST APIs. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + + +### How It Works + + 1. **Authorise**: Customer authorises their payment method. + 2. **Tokenise**: Payment method is securely tokenised after first successful payment. + 3. **Charge**: You initiate charges as needed using the token. + + + +### When to Use Recurring Payments + + Recurring Payments are ideal when you need: + - **Flexible billing cycles**: Charge customers based on usage, milestones or variable schedules. + - **Manual control**: You decide when to charge each payment. + + For automated, fixed-schedule billing (weekly, monthly, quarterly), consider using [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) instead. + + +## Integration Flow + +The integration flow varies depending on how you choose to create the authorisation transaction. + + +### Using Razorpay APIs + + ![](/docs/assets/images/recurring-payments-recurring_payments_standard_checkout.jpg) + +This is possible only via APIs. The integration flow to collect recurring payments using Razorpay APIs is: + +1. Create a customer. This returns a `customer_id`. +1. Create an order. This returns an `order_id`. The order amount for: + - Emandate is ₹0. + - Cards is a minimum of ₹1. + - Paper NACH is ₹0. + - UPI is ₹1. +1. Pass the `customer_id`, `order_id` and a few additional parameters in your Checkout to create the authorisation payment. The customer completes the authorisation payment, which generates a `token`. This payment can be authorised using one of the following instruments: + - Emandate. + - Card. + - Paper NACH. The following additional steps have to be completed for NACH: + 1. The customer either downloads a pre-filled NACH form or you can send it to the customer. + 1. The customer signs the pre-filled NACH form. + 1. The customer either uploads the signed form or sends it to you to upload for processing. + - UPI. +1. Retrieve and check the status of the token. **Once the token status changes to `confirmed`, you can create and charge subsequent payments**. +1. Create and charge subsequent payments. To do this, you have to manually: + 1. Create a new order. + 1. Create a recurring payment. + + + + +### Using a Registration Link + + + +![](/docs/assets/images/recurring-payments-recurring_payments_registration_link.jpg) +You can create registration links from the Dashboard or using APIs. + +Following is the integration flow to collect recurring payments using a registration link: + +1. **Create a registration link and send it to your customer** + +The customer completes the authorisation payment, which generates a `token`. This payment can be authorised using one of the following instruments: + - Emandate + - Card + - Paper NACH. The following additional steps have to be completed for NACH: + 1. The customer either downloads a pre-filled NACH form or you can send it to the customer. + 1. The customer signs the pre-filled NACH form. + 1. The customer either uploads the signed form or sends it to you to upload for processing. +Know more about [uploading Paper Nach Form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upload-paper-nach-form.md). + - UPI + +> **INFO** +> +> +> **No Need to Create a Customer and Order Separately** +> +> If you use a registration link to create the authorisation transaction, Razorpay automatically creates a customer and the order on your behalf. +> + +2. **Retrieve and check the token status** + +After the token status changes to `confirmed`, you can create and charge subsequent payments. +3. **Create and charge subsequent payments** + +To do this, you have to manually: + 1. Create a new order. + 2. Create a recurring payment. + + + +## API Gateway URL + +For most of the Razorpay APIs, the Gateway URL is `https://api.razorpay.com/v1`. You need to include this before each API endpoint to make API calls. However, certain APIs are on V2. Hence, the gateway URL may differ for certain APIs. + + +### Example + + + + - Use the URL `https://api.razorpay.com/v1/payments` to access payment resources. + + - Use the URL `https://api.razorpay.com/v2/accounts` to access Route (Linked Account)-related resources. + + + + + + +## API Authentication + +All Razorpay APIs are authenticated using `Basic Auth`. Basic auth requires the following: +- `[YOUR_KEY_ID]` +- `[YOUR_KEY_SECRET]` + +Basic auth expects an `Authorization` header for each request in the `Basic base64token` format. Here, `base64token` is a base64 encoded string of `YOUR_KEY_ID:YOUR_KEY_SECRET`. + +> **WARN** +> +> +> **Watch Out!** +> +> The `Authorization` header value should strictly adhere to the format mentioned above. Invalid formats will result in authentication failures. +> Few examples of **invalid** headers are: `BASIC base64token`, `basic base64token`, `Basic "base64token"` and `Basic $base64token`. +> + + +### Generate API Key + + Follow these steps to generate API keys: + + + Watch this video to see how to generate API keys in the Test mode. + + +[Video: https://www.youtube.com/embed/VOn8JlGPG2I?si=WTAbAeLB3Hnp1n3r] + + + + + Watch this video to see how to generate API keys in the Live mode. + + +[Video: https://www.youtube.com/embed/Cer8UfBGX_E?si=Libr1RXoFSEDfY1c] + + + +1. Log in to your Dashboard with the appropriate credentials. +2. Select the mode (**Test** or **Live**) for which you want to generate the API key. + - **Test Mode**: The test mode is a simulation mode that you can use to test your integration flow. **Your customers will not be able to make payments in this mode**. + - **Live Mode**: When your integration is complete, switch to live mode and generate live mode API keys. In the integration, **replace test mode keys with live mode keys to accept customer payments**. +3. Navigate to **Account & Settings** → **API Keys** (under **Website and app settings**) → **Generate Key** to generate key for the selected mode. + +> **WARN** +> +> +> **Watch Out!** +> +> - After generating the keys from the Dashboard, download and save them securely. You can use only one set of API keys. If you do not remember your API keys, you must [regenerate them](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#regenerate-api-keys) from the Dashboard and update them wherever the previous keys were used for payment gateway integrations. +> - API Keys are universal; that is, they are applicable to all websites and apps that you have whitelisted for your Merchant ID. +> - **Do not share your API Key secret** with anyone or on any public platforms. **This can pose security threats to your Razorpay account**. +> - Once you generate the API Keys, only the **Key Id** is visible on the Dashboard, **not the Key secret**, as it can pose security threats to your Razorpay account. +> - Use the **Live API Keys** to accept live payments and the **Test API Keys** for test transactions. +> + + + +## List of APIs as per Supported Payment Methods + + +### Step 1: Create Authorisation Payment + + + Set up the authorisation payment using: + - [APIs for Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/authorization-transaction.md) + - APIs for UPI Autopay: [Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi/authorization-transaction.md) and [Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-intent/authorization-transaction.md) + - APIs for UPI OTM: [Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/collect/authorization-transaction.md) and [Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/intent/authorization-transaction.md) + - [APIs for UPI TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-tpv/authorization-transaction.md) + - [APIs for Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/emandate/authorization-transaction.md) + - [APIs for Paper NACH](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/paper-nach/authorization-transaction.md) + + + + + +### Step 2: Fetch Token Details + + + Fetch the customer's token detail to proceed with the authorisation payment using: + - [APIs for Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/tokens.md) + - APIs for UPI Autopay: [Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi/tokens.md) and [Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-intent/tokens.md) + - APIs for UPI OTM: [Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/collect/tokens.md) and [Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/intent/tokens.md) + - [APIs for UPI TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-tpv/tokens.md) + - [APIs for Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/emandate/tokens.md) + - [APIs for Paper NACH](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/paper-nach/tokens.md) + + + + + +### Step 3: Charge Subsequent Payments + + + Use the token to charge customers as needed using: + - [APIs for Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/subsequent-payments.md) + - APIs for UPI Autopay: [Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi/subsequent-payments.md) and [Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-intent/subsequent-payments.md) + - APIs for UPI OTM: [Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/collect/one-time-payment.md) and [Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/intent/one-time-payment.md) + - [APIs for UPI TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-tpv/subsequent-payments.md) + - [APIs for Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/emandate/subsequent-payments.md) + - [APIs for Paper NACH](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/paper-nach/subsequent-payments.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/authorization-transaction.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/authorization-transaction.md new file mode 100644 index 00000000..22fc422b --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/authorization-transaction.md @@ -0,0 +1,1517 @@ +--- +title: 1. Create the Authorisation Transaction +description: Create an authorisation transaction for cards using Razorpay APIs. +--- + +# 1. Create the Authorisation Transaction + +You can create an authorisation transaction using the [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> Bank downtime can affect success rates when processing recurring payments via debit cards. +> + +## 1.1. Using Razorpay APIs + +To create an authorisation transaction using the Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorisation-payment). + +### 1.1.1. Create a Customer + +> **INFO** +> +> +> **Token Sharing for Partner Auth Model** +> +> If you are a Razorpay Partner, who wants to use this API via Partner Auth, you must ensure the following: +> - Add the basic auth with partner credentials (client_id and client_secret). +> - Add the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. For example, -H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +> +> ```curl: Request +> curl -X POST https://api.razorpay.com/v1/customers \ +> -u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +> -H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +> ``` +> + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + +### Request Parameters + + `name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` +: `string` The unique identifier of the customer. For example `cust_1Aa00000000001`. + +`entity` +: `string` The name of the entity. Here, it is `customer`. + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` A Unix timestamp, at which the customer was created. + +You can create an order once you create a customer for the payment authorisation. + + +### 1.1.2. Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +> **INFO** +> +> +> **Token Sharing for Partner Auth Model** +> +> If you are a Razorpay Partner, who wants to use this API via Partner Auth, you must ensure the following: +> - Add the basic auth with partner credentials (client_id and client_secret). +> - Add the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. For example, -H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +> +> ```curl: Request +> curl -X POST https://api.razorpay.com/v1/orders \ +> -u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +> -H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +> ``` +> +> + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":100, + "currency":"", + "customer_id":"cust_4xbQrmEoA5WJ01", + "method":"card", + "token": { + "max_amount": 1000000, + "expire_at": 2709971120, + "frequency": "monthly" + }, + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 100); +orderRequest.put("currency", ""); +orderRequest.put("customer_id", "cust_4xbQrmEoA5WJ01"); +orderRequest.put("method", "card"); +JSONObject token = new JSONObject(); +token.put("max_amount","100000000"); +token.put("expire_at","2709971120"); +token.put("frequency","monthly"); +orderRequest.put("token", token); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => '', 'receipt' => '123', 'customer_id'=> $customerId, 'method'=>'card', 'token' => array('max_amount' => 100000000, 'expire_at' => 2709971120, 'frequency' => 'monthly'), 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":100, + "currency":"", + "customer_id":"cust_4xbQrmEoA5WJ01", + "method":"card", + "token": { + "max_amount": 1000000, + "expire_at": 4102444799, + "frequency": "monthly" + }, + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 50000, + 'currency': '', + 'customer_id': 'cust_4xbQrmEoA5WJ01', + 'method': 'card', + 'token':{ + 'max_amount': 100000000, + 'expire_at': 4102444799, + 'frequency': 'monthly' + }, + 'receipt': 'receipt#1', + 'notes': {'key1': 'value3', 'key2': 'value2'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +param_attr = { + "amount":100, + "currency": "", + "customer_id": "cust_4xbQrmEoA5WJ01", + "method": "card", + "token": { + "max_amount": 1000000, + "expire_at": 4102444799, + "frequency": "monthly" + }, + "receipt": "Receipt No. 1", + "notes":{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey... decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount":100, + "currency":"", + "customer_id":"", + "method":"card", + "token":map[string]interface{}{ + "max_amount": 1000000, + "expire_at": 4102444799, + "frequency": "monthly" + }, + "receipt":"Receipt No. 1", + "notes":map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("customer_id", "cust_Z6t7VFTb9xHeOs"); +orderRequest.Add("method", "card"); +Dictionary token = new Dictionary(); +token.Add("max_amount", "5000"); +token.Add("expire_at", "2709971120"); +token.Add("frequency", "monthly"); +orderRequest.Add("token", token); +orderRequest.Add("receipt", "receipt#176"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +``` + +```json: Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":100, + "amount_paid":0, + "amount_due":100, + "currency":"", + "receipt":"Receipt No. 1", + "method":"card", + "description":null, + "customer_id":"cust_4xbQrmEoA5WJ01", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1565172642 +} +``` + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the amount should be `100`, that is, . + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _optional_ +: `string` Payment method used to make the authorisation transaction. Here, it is `card`. + +`token` +: `object` Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be auto-debited in a single charge. The minimum value is `100`, that is, , and the maximum value is `1500000`, that is, . For an amount higher than this, the cardholder should provide an Additional Factor of Authentication (AFA) as per RBI guidelines. + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The card's expiry year is considered a default value. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `weekly` + - `monthly` + - `yearly` + - `as_presented` + +, that is, . For an amount higher than this, the cardholder should provide an Additional Factor of Authentication (AFA) as per RBI guidelines. + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The card's expiry year is considered a default value. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `weekly` + - `monthly` + - `yearly` + - `as_presented` + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000002`. + +`entity` +: `string` The entity that has been created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. For cards, the amount should be `100`, that is, . + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to pay. + +`currency` +: `string` The 3-letter ISO currency code for the payment. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`method` +: `string` Payment method used to make the authorisation transaction. Here, it is `card`. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +You can create a payment against the `order_id` after you create an order. + + +### 1.1.3. Create an Authorisation Payment + +Once an order is created, your next step is to create a payment. Use the below endpoint to create a payment with payment method `card`. + +> **INFO** +> +> +> **Token Sharing for Partner Auth Model** +> +> If you are a Razorpay Partner, who wants to use this API via Partner Auth, you must ensure the following: +> - Add the basic auth with partner credentials (client_id and client_secret). +> - Add the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. For example, -H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +> +> ```curl: Request +> curl -X POST https://api.razorpay.com/v1/create/json \ +> -u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +> -H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +> ``` +> +> + +/payments/create/json + +```curl: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ + -d '{ + "amount": "100", + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_4xbQrmEoA5WJ01", + "recurring": true, + "save": 1, + "email": "", + "contact": "", + "method": "card", + "card": { + "number": "4854980604708430", + "cvv": "", + "expiry_month": "12", + "expiry_year": "30", + "name": "" + } +}' + +```json: Response +{ + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/FVmAtLUe9XZSGM/authorize" + }, + { + "action": "otp_generate", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate?track_id=FVmAtLUe9XZSGM&key_id=" + } + ] +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> - To process recurring transactions, customer card details will need to be secured/tokenised in accordance with the applicable laws. You will be solely responsible for obtaining informed consent from customers for the processing of emandates and such consent shall be explicit and not by way of a forced/default/automatic selection of check box, radio button etc. +> - When the merchant is sharing `recurring: true` or `preferred`, it is for tokenising the card as per applicable rules for recurring mandate creation. +> If such consent is not shared during the payment flow, then Razorpay will not tokenise the card or process the emandate/ recurring transaction. +> + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is `100`, that is, . + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in [Step 1.1.2.: Create an Order](#112-create-an-order). + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. + +`recurring` _mandatory_ +: `boolean` Possible values: + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + + +> **INFO** +> +> +> **Handy Tips** +> +> The `recurring` parameter also supports the value `preferred`. Use this when you want to support recurring payments and one-time payment in the same flow. +> + +`save` _mandatory_ +: `integer` Saves the customer's card details. Possible values: + - `1`: Saves the card details. + - `0`: Does not save the card details. + + +`email` _mandatory_ +: `string` The customer's email address. + +`contact` _mandatory_ +: `string` The customer's contact number. + +`method` _mandatory_ +: `string` The payment method selected by the customer. Here, the value must be `card`. + +`card` +: `object` The attributes associated with a card. + + `number` _mandatory_ + : `integer` Unformatted card number. This field is required if value of `method` is `card`. Use one of our [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md) to try out the payment flow. + + `name` _mandatory_ + : `string` The name of the cardholder. + + `expiry_month` _mandatory_ + : `integer` The expiry month of the card in `MM` format. For example, `01` for January and `12` for December. + + `expiry_year` _mandatory_ + : `integer` Expiry year for card in the `YY` format. For example, 2030 will be in format `30`. + + `cvv` _mandatory_ + : `integer` CVV printed on the back of the card. + + +> **INFO** +> +> +> **Handy Tips** +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + + + + +### Response Parameters + + If the payment request is valid, the response contains the following fields. Refer to the [S2S Json V2 integration document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2.md#step-2-create-a-payment) for more details. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. Possible values: + - `otp_generate` - Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect` - Use this URL to redirect the customer to submit the OTP on the bank page. + + `url` + : `string` URL to be used for the action indicated. + + +After this step, you can proceed to integrate with the [Fetch Token API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/tokens.md). + +## 1.2. Using a Registration Link + +Registration Links are an alternate way of creating an authorisation transaction. If you create a registration link, you need not create a customer or an order. + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. The customer can use the invoice to make the Authorisation Payment. + +Know how to [create Registration Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md) using the Dashboard. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use webhooks to get notifications about successful payments against a registration link. Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks). +> + +A registration link must always have the amount (in currency subunits) that the customer will be charged when making the authorisation payment. For cards, the amount must be a minimum of . + +### 1.2.1. Create a Registration Link + +The following endpoint creates a registration link. + +/subscription_registration/auth_links + +```curl: Curl +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"", + "email":"", + "contact":"" + }, + "type":"link", + "amount":"100", + "currency":"", + "description":"Registration Link for ", + "subscription_registration":{ + "method":"card", + "max_amount":"1000000", + "expire_at":1609423824, + "frequency": "monthly" + }, + "receipt":"Receipt No. 1", + "email_notify": true, + "sms_notify": true, + "expire_by":1580479824, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name",""); +customer.put("email",""); +customer.put("contact",""); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 100); +registrationLinkRequest.put("currency", ""); +registrationLinkRequest.put("description", "Registration Link for "); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","card"); +subscriptionRegistration.put("max_amount",1000000); +subscriptionRegistration.put("expire_at",1609423824); +subscriptionRegistration.put("frequency","monthly"); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. 1"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'','email'=>'','contact'=>''),'type'=>'link','amount'=>100,'currency'=>'','description'=>'Registration Link for ','subscription_registration'=>array('method'=>'card','max_amount'=>'1000000','expire_at'=>'1634215992','frequency'=>'monthly'),'receipt'=>'Receipt No. 5','email_notify'=> true,'sms_notify'=>true,'expire_by'=>1634215992, 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Tea. Earl Gray. Hot.'))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.createRegistrationLink({ + customer: { + name: "", + email: "", + contact: "" + }, + type: "link", + amount: 100, + currency: "", + description: "Registration Link for ", + subscription_registration: { + method: "card", + max_amount: 1000000, + expire_at: 1609423824, + frequency: "monthly" + }, + receipt: "Receipt No. 1", + email_notify: true, + sms_notify: true, + expire_by: 1580479824, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey... decaf." + } +}) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + 'customer': {'name': '', + 'email': '', + 'contact': ''}, + 'type': 'link', + 'amount': '100', + 'currency': '', + 'description': 'Registration Link for Gaurav', + 'subscription_registration': {'method': 'card', 'max_amount': '1000000' + , 'expire_at': 1644737663, 'frequency': 'monthly'}, + 'receipt': 'Receipt No. #11', + 'email_notify': True, + 'sms_notify': True, + 'expire_by': 1644737663, + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer":{ + "name": "", + "email": "", + "contact": "" + }, + "type": "link", + "amount": "100", + "currency": "", + "description": "Registration Link for ", + "subscription_registration":{ + "method": "card", + "max_amount": "1000000", + "expire_at": 1609423824, + "frequency": "monthly" + }, + "receipt": "Receipt No. 1", + "email_notify": true, + "sms_notify": true, + "expire_by":1580479824, + "notes":{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} + +Razorpay::SubscriptionRegistration.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer":map[string]interface{}{ + "name":"", + "email":"", + "contact":"", + }, + "type":"link", + "amount":"100", + "currency":"", + "description":"Registration Link for ", + "subscription_registration":map[string]interface{}{ + "method":"card", + "max_amount":"1000000", + "expire_at":1609423824, + "frequency": "monthly" + }, + "receipt":"Receipt No. 1", + "email_notify": true, + "sms_notify": true, + "expire_by":1681987284, + "notes":map[string]interface{}{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot.", + }, +} + +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary registrationLinkRequest = new Dictionary(); +Dictionary customer = new Dictionary(); +customer.Add("name", ""); +customer.Add("email", ""); +customer.Add("contact", ""); +registrationLinkRequest.Add("customer", customer); +registrationLinkRequest.Add("type", "link"); +registrationLinkRequest.Add("amount", 100); +registrationLinkRequest.Add("currency", ""); +registrationLinkRequest.Add("description", "Registration Link for "); +Dictionary subscriptionRegistration = new Dictionary(); +subscriptionRegistration.Add("method", "card"); +subscriptionRegistration.Add("max_amount", 1000000); +subscriptionRegistration.Add("expire_at", 1609423824); +registrationLinkRequest.Add("subscription_registration", subscriptionRegistration); +registrationLinkRequest.Add("receipt", "Receipt No. #18d"); +registrationLinkRequest.Add("email_notify", true); +registrationLinkRequest.Add("sms_notify", true); +registrationLinkRequest.Add("expire_by", 1580479824); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +registrationLinkRequest.Add("notes", notes); + +Invoice invoice = client.Invoice.CreateRegistrationLink(registrationLinkRequest); +``` + +```json: Response +{ + "id": "inv_FHrXGIpd3N17DX", + "entity": "invoice", + "receipt": "Receipt No. 24", + "invoice_number": "Receipt No. 24", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrXGJNngJyEAe", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 4102444799, + "issued_at": 1595491014, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491014, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for ", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/VSriCfn", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491014, + "idempotency_key": null +} +``` + + +### Request Parameters + + `customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + + `subscription_registration` +: `object` Details of the authorisation transaction. + + `method` _mandatory_ + : `string` The authorisation method. Here it is `card`. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be auto-debited in a single charge. The minimum value is `100` (₹1) and the maximum value is `100000000` (₹10,00,000). For an amount higher than this or the RBI limit of ₹15,000 (`1500000`) or ₹1,00,000 (`10000000`) respectively, the cardholder should provide an Additional Factor of Authentication (AFA) as per RBI guidelines. + + `expire_at` _optional_ + : `integer` The Unix timestamp till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. The card's expiry year is considered a default value. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `weekly` + - `monthly` + - `yearly` + - `as_presented` + + `sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + + +### Path Parameters + + `id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + + + +### Response Parameter + +`success` +: `boolean` Indicates whether the notifications were sent successfully. Possible values: + - `true`: The notifications were successfully sent via SMS, email or both. + - `false`: The notifications were not sent. + + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + + +### Path Parameter + + `id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. + + + +### Response Parameter + + `id` +: `string` The unique identifier of the invoice. + +`entity` +: `string` The entity that has been created. Here, it is `invoice`. + +`receipt` +: `string` A user-entered unique identifier of the invoice. + +`invoice_number` +: `string` Unique number you added for internal reference. + +`customer_id` +: `string` The unique identifier of the customer. For example, `cust_BMB3EwbqnqZ2EI`. + +`customer_details` +: `object` Details of the customer. + + `id` + : `string` The unique identifier associated with the customer to whom the invoice has been issued. + + `name` + : `string` The customer's name. + + `email` + : `string` The customer's email address. + + `contact` + : `integer` The customer's phone number. + + `billing_address` + : `string` Details of the customer's billing address. + + `shipping_address` + : `string` Details of the customer's shipping address. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`line_items` +: `string` Details of the line item that is billed in the invoice. Maximum of 50 line items are allowed. + +`payment_id` +: `string` Unique identifier of a payment made against the invoice. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `cancelled` + - `expired` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp at which the invoice will expire. + +`issued_at` +: `integer` The Unix timestamp at which the invoice was issued to the customer. + +`paid_at` +: `integer` The Unix timestamp at which the payment was made. + +`cancelled_at` +: `integer` The Unix timestamp at which the invoice was cancelled. + +`expired_at` +: `integer` The Unix timestamp at which the invoice expired. + +`sms_status` +: `string` The delivery status of the SMS notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` The delivery status of the email notification for the invoice sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Maximum of 2048 characters. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is , pass the value as `29995`. + +`amount_paid` +: `integer` Amount paid by the customer against the invoice. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the invoice. + +`description` +: `string` A brief description of the invoice. + +`notes` +: `object` Any custom notes added to the invoice. Maximum of 2048 characters. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with the customer to receive payments. + +`type` +: `string` Here, it is `invoice`. + +`comment` +: `string` Any comments to be added in the invoice. Maximum of 2048 characters. + + +After this step, you can proceed to integrate with the [Fetch Token API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/tokens.md). diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/customer-fee-bearer.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/customer-fee-bearer.md new file mode 100644 index 00000000..d010f40f --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/customer-fee-bearer.md @@ -0,0 +1,173 @@ +--- +title: Customer Fee Bearer (CFB) for Recurring Card Payments +description: Implement Customer Fee Bearer (CFB) model for recurring card payments to pass payment gateway fees to customers with transparent fee calculation. +--- + +# Customer Fee Bearer (CFB) for Recurring Card Payments + +The Customer Fee Bearer (CFB) model for recurring card payments allows businesses to pass payment gateway fees to the end customer, improving cost transparency and regulatory compliance. With this enhancement, you can implement transparent fee structures where customers bear the payment processing costs. + +If you have already integrated with [Recurring Payments Cards APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/authorization-transaction.md), you must implement an additional API integration step that calculates fees before creating recurring payments. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Use Cases + +The CFB model for Recurring Payments is particularly useful for: + +- **Subscription Services**: Monthly or annual subscription billing with transparent fee structures. +- **EMI Payments**: Instalment-based payments where customers understand the complete cost breakdown. +- **Utility Payments**: Regular utility bill payments with clear fee transparency. +- **Insurance Premiums**: Recurring premium payments with upfront fee disclosure. +- **Membership Fees**: Club or service memberships with transparent cost structures. + +## Prerequisites + +You must have: +- An active Razorpay account. +- Existing recurring payment setup with card payments. + +## Integration Steps + +Follow these steps to implement CFB for your recurring card payments: + +### Step 1: Calculate Fees Before Payment Creation + +Call Razorpay's `calculate/fees` API endpoint with the intended base amount before creating a recurring payment. + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST 'https://api.razorpay.com/v1/payments/fees' \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "card": { + "name": "Gaurav Kumar", + "number": "4386289407660153", + "cvv": "100", + "expiry_month": "09", + "expiry_year": "2028" + }, + "recurring": 1, + "save": 1, + "contact": 9999999999, + "email": "gaurav.kumar@example.com" +}' + +```json: Response +{ + "original_amount": 100, + "fees": 2, + "razorpay_fee": 2, + "tax": 0, + "amount": 102, + "currency": "INR" +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency sub-unit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. Length must be of 3 characters. + +`method` _mandatory_ +: `string` Payment method used to make the payment. In this case, it is `card`. + +`card` _mandatory_ +: `object` Additional fields to accept card payments. + + `name` _mandatory_ + : `string` The name of the cardholder. + + `number` _mandatory_ + : `string` The card number. + + `cvv` _mandatory_ + : `string` 3-digit CVV code given at the back of the card. + + `expiry_month` _mandatory_ + : `string` The month of expiry of the card in `MM` format. + + `expiry_year` _mandatory_ + : `string` The year of expiry of the card in `YYYY` format. + +`contact` _mandatory_ +: `string` Customer's phone number. + +`email` _mandatory_ +: `string` Customer's email address. + +`recurring` _mandatory_ +: `integer` Determines whether the payment is a one-time payment or a recurring payment. Possible values: + - `1`: It is a recurring payment. + - `0`: It is a one-time payment. + +`save` _mandatory_ +: `integer` Determines whether Razorpay should save customer card details as tokens with the card network. Possible values: + - `1`: Razorpay should save customer card details as tokens with the card network. This will work only if explicit customer consent has been received from the customer. + - `0`: Razorpay should not save the card details. + + + + +### Response Parameters + +`original_amount` +: `integer` Original order amount in rupees (alternative field). For example, `100` for ₹100. + +`fees` +: `decimal` Total fees amount in rupees. For example, `1.00` for regular UPI or `236.00` for credit card on UPI. + +`razorpay_fee` +: `decimal` Razorpay processing fee in rupees. For example, `1.00` for regular UPI or `200.00` for credit card on UPI. + +`tax` +: `decimal` Tax amount on fees in rupees. For example, `0` for regular UPI or `36.00` for credit card on UPI. + +`amount` +: `decimal` Total amount including fees in rupees. For example, `101.00` for regular UPI or `336.00` for credit card on UPI. + +`currency` +: `string` The currency in which the transaction is made. Length must be of 3 characters. For example, `INR`. + + +### Step 2: Display Fee Breakdown to Customer + +Use the Calculate Fee API response to show customers: +- Original order amount +- Processing fee (convenience fee) +- Total amount to be charged + +The fee breakdown must be displayed transparently before the customer confirms payment. + +### Step 3: Update Payment Creation Request + +In your payment creation request to Razorpay, use the values from the fee calculation step to ensure: + +- The correct total amount is presented to the customer. +- The final payment entity reflects the business and customer share as required by policy. +- Proper fee breakup is maintained for compliance. + +Refer to the [Create a Subsequent Card Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-subsequent-payments.md#32-create-a-recurring-payment) to proceed. + +## Related Information + +- [Recurring Payments Documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments.md) +- [Recurring Payments APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/subsequent-payments.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/subsequent-payments.md new file mode 100644 index 00000000..4fd5e677 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/subsequent-payments.md @@ -0,0 +1,432 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + + + +### Response Parameters + + `id` +: `string` A unique identifier of the order created. For example `order_1Aa00000000001`. + +`entity` +: `string` The entity that has been created. Here it is `order`. + +`amount` +: `integer` Amount in currency subunits. + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. + +`receipt` +: `string` A user-entered unique identifier of the order. For example, `rcptid #1`. + +`notification` +: `object` Details of the pre-debit notification. + + `token_id` + : `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + + `payment_after` + : `integer` UNIX timestamp post which the debit is supposed to happen. + + `id` + : `string` the unique identifier of the notification. For example, `notification_00000000000001`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + + +## 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + + + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameter + +`razorpay_payment_id` +: `string` The unique identifier of the payment that is created. For example, `pay_1Aa00000000001`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/tokens.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/tokens.md new file mode 100644 index 00000000..13cc63f4 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/cards/tokens.md @@ -0,0 +1,594 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay returns a `razorpay_payment_id` that can be used to fetch the `token_id`. This is a manual process and can be done using either APIs or Webhooks. This `token_id` is used to create and charge subsequent payments. + +> **INFO** +> +> +> **Handy Tips** +> +> You can also [search for the Token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) on your Dashboard. +> + +## 2.1. Fetch Token by Payment id + +> **INFO** +> +> +> **Token Sharing for Partner Auth Model** +> +> If you are a Razorpay Partner, who wants to use this API via Partner Auth, you must ensure the following: +> - Add the basic auth with partner credentials (client_id and client_secret). +> - Add the `account_id` of the sub-merchant using `X-Razorpay-Account` in the header. For example, -H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" +> +> +> ```curl: Request +> curl -X POST https://api.razorpay.com/v1/customers \ +> -u [YOUR_PARTNER_KEY_ID]:[YOUR_PARTNER_KEY_SECRET]\ +> -H "X-Razorpay-Account: acc_KBrJAIEqre5ucn" \ +> ``` +> +> + +The following endpoint fetches a token id using the Payment id. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000001"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_1Aa00000000001" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.Fetch(paymentId); +``` + +```json: Response +{ + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "", + "status": "captured", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "bank": null, + "wallet": null, + "vpa": null, + "email": "", + "contact": "", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "541898" + }, + "created_at": 1595449871 +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` from the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + + +### Path Parameter + + `id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + + + +### Response Parameters + + `id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. Here, it is `payment`. + +`amount` +: `integer` The payment amount represented in smallest unit of the currency passed. For example, `amount = 100` translates to `100` subunits, that is . + +`currency` +: `string` The currency in which the payment is made. Refer to the list of [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) that we support. + +`status` +: `string` The status of the payment. Possible values: + - `created` + - `authorized` + - `captured` + - `refunded` + - `failed` + +`order_id` +: `string` The unique identifier of the order. + +`invoice_id` +: `string` The unique identifier of the invoice. + +`international` +: `boolean` Indicates whether the payment is done via an international card or a domestic one. Possible values: + - `true`: Payment made using international card. + - `false`: Payment not made using international card. + +`method` +: `string` The payment method used for making the payment. Possible values: + - `card` + - `netbanking` + - `wallet` + - `emi` + - `upi` + +`amount_refunded` +: `integer` The amount refunded in smallest unit of the currency passed. + +`refund_status` +: `string` The refund status of the payment. Possible values: + - `null` + - `partial` + - `full` + +`captured` +: `boolean` Indicates if the payment is captured. Possible values: + - `true`: Payment has been captured. + - `false`: Payment has not been captured. + +`description` +: `string` Description of the payment, if any. + +`email` +: `string` Customer email address used for the payment. + +`contact` +: `integer` Customer contact number used for the payment. + +`customer_id` +: `string` The unique identifier of the customer. + +`token_id` +: `string` The unique identifier of the token. + +`notes` +: `json object` Contains user-defined fields, stored for reference purposes. + +`fee` +: `integer` Fee (including GST) charged by Razorpay. + +`tax` +: `integer` GST charged for the payment. + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment processing failed because of incorrect OTP`. + +`error_source` +: `string` The point of failure. For example, `customer`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_authentication`. + +`error_reason` +: `string` The exact error reason. For example, `incorrect_otp`. + +`created_at` +: `integer` Timestamp, in UNIX format, on which the payment was created. + + +## 2.2. Fetch Tokens by Customer id + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint fetches tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> This endpoint will not fetch the details of expired, rejected and unused tokens. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +List customer = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customer.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000002" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity":"collection", + "count":1, + "items":[ + { + "id":"token_HouA2OQR5Z2jTL", + "entity":"token", + "token":"2JPRk664pZHUWG", + "bank":null, + "wallet":null, + "method":"card", + "card":{ + "entity":"card", + "name":"", + "last4":"8950", + "network":"Visa", + "type":"credit", + "issuer":"STCB", + "international":false, + "emi":false, + "sub_type":"consumer", + "expiry_month":12, + "expiry_year":2030, + "flows":{ + "otp":true, + "recurring":true + } + }, + "recurring":true, + "recurring_details":{ + "status":"confirmed", + "failure_reason":null + }, + "auth_type":null, + "mrn":null, + "used_at":1629779657, + "created_at":1629779657, + "expired_at":1640975399, + "dcc_enabled":false, + "billing_address":null + } + ] +} +``` + + +### Path Parameter + + `id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + + + +### Response Parameters + + `entity` +: `string` The entity being created. Here, it is a `collection`. + +`count` +: `integer` The number of tokens to be fetched. + +`items` +: `object` Details related to token such as `token id` and bank information. + + `id` + : `string` The unique identifier linked to an item. In this example, it is `token_id`. + + `entity` + : `string` The entity being created. Here, it is a `token`. + + `token` + : `string` The token is being fetched. + + `bank` + : `string` Card issuing bank details. + + `wallet` + : `string` Provides wallet information. + + `method` + : `string` The payment method used to make the transaction. + + `card` + : `object` Details related to card used to make the transaction. + + `entity` + : `string` The entity being created. Here, it is `card`. + + `name` + : `string` Name of the cardholder. + + `last4` + : `integer` Last 4 digits of the card. + + `network` + : `string` Name of the payment processor. Here it is `Visa`. + + `type` + : `string` Card type (debit or credit). In this example, it is `credit`. + + `issuer` + : `string` Name of the card-issuing bank. + + `international` + : `boolean` Card usage restriction. Possible values: + - `true`: Supports international transactions. + - `false`: International transactions are not supported. + + `emi` + : `string` Card EMI status. Possible values. + - `true`: The card is on EMI. + - `false`: The card is not on EMI. + + `sub_type` + : `string` Type of the customer. + + `expiry_month` + : `integer` Month on which the card expires. + + `expiry_year` + : `integer` Year on which the card expires. + + `flows` + : `object` The transaction flow details. + + `otp` + : `string` Whether the OTP function is enabled or not. Possible values: + - `true`: The OTP function is enabled. + - `false`: The OTP function is not enabled. + + `recurring` + : `string` Whether the recurring for this payment method is enabled or not. Possible Values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + + `vpa` + : `object` The VPA details. + + `username` + : `string` The username of the VPA holder. For example, `gaurav.kumar`. + + `handle` + : `string` The VPA handle. Here it is `upi`. + + `name` + : `string` The name of the VPA holder. + + + `recurring` + : `string` This represents whether recurring is enabled for this token. Possible values: + - `true`: Recurring is enabled. + - `false`: Recurring is not enabled. + + `recurring_details` + : `object` Details of the recurring transaction. + + `status` + : `string` This represents the status of the recurring transaction. Possible values: + - `initiated` + - `confirmed` + - `rejected` + - `cancelled` + - `paused` + + `failure_reason` + : `string` This provides the reason why the recurring transaction failed. + + `auth_type` + : `string` The authorisation type details. + + `mrn` + : `string` The unique identifier issued by the payment gateway during customer registration. This can be Gateway Reference Number or Gateway Token. + + `used_at` + : `integer` The VPA usage timestamp. + + `created_at` + : `integer` The token creation timestamp. + + `expired_at` + : `integer` The token expiry date timestamp. + + `dcc_enabled` + : `string` Indicates whether the option to change currency is enabled or not. Possible values. + - `true`: The option to change currency is enabled + - `false`: The option to change currency is not enabled. + + +## 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameter + + `customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + + + +### Response Parameter + + `deleted` +: `boolean` Indicates whether the token is deleted. Possible values: + - `true`: The token is deleted successfully. + - `false`: The token was not deleted. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/emandate/authorization-transaction.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/emandate/authorization-transaction.md new file mode 100644 index 00000000..507c3263 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/emandate/authorization-transaction.md @@ -0,0 +1,1957 @@ +--- +title: 1. Create the Authorisation Transaction +description: Create an authorisation transaction for emandate to complete your customer's authorization using their netbanking login. +--- + +# 1. Create the Authorisation Transaction + +You can create an authorisation transaction using the [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +## 1.1. Using Razorpay APIs + +To create an authorisation transaction using the Razorpay APIs, you need to: + +1. [Fetch Payment Methods](#111-fetch-payment-methods). +2. [Create a Customer](#112-create-a-customer). +3. [Create an Order](#113-create-an-order). +4. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorisation-payment). + +### 1.1.1. Fetch Payment Methods + +Use the below endpoint to fetch a list of banks Razorpay supports for different payment methods. + +/methods + +> **WARN** +> +> +> **Watch Out!** +> +> To fire this API, provide your [KEY_ID] for authorization. Your [KEY_SECRET] is NOT required and should NOT be passed. +> + +```curl: Request +curl -u [YOUR_KEY_ID] \ +- X GET https://api.razorpay.com/v1/methods \ +```json: Response +{ + "methods": { + "entity": "methods", + ... + recurring: { + emandate: { + "AUBL": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "AU SMALL FINANCE BANK" + }, + }, + } + } + } +``` + +### 1.1.2. Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + +#### Request Parameters + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.1.3. Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +```cURL: Emandate via Netbanking +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("payment_capture", true); +orderRequest.put("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.put("method", "emandate"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("auth_type","netbanking"); +token.put("max_amount","9999900"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0000001"); +token.put("bank_account",bankAccount); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','payment_capture' => true,'method' => 'emandate','customer_id' => 'cust_1Aa00000000001','receipt' => 'Receipt No. 1','notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'),'token' => array('auth_type' => 'netbanking','max_amount' => 9999900,'expire_at' => 4102444799,'notes' => array('notes_key_1' => 'Tea, Earl Grey, Hot','notes_key_2' => 'Tea, Earl Grey… decaf.'),'bank_account' => array('beneficiary_name' => 'Gaurav Kumar','account_number' => '1121431121541121','account_type' => 'savings','ifsc_code' => 'HDFC0000001')))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + payment_capture: true, + method: "emandate", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "netbanking", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: 1121431121541121, + account_type: "savings", + ifsc_code: "HDFC0000001" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'emandate', + 'customer_id': 'cust_1Aa00000000001', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'netbanking', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "amount": 0, + "currency": "INR", + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 1121431121541121, + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token": map[string]interface{}{ + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 0); +orderRequest.Add("currency", "INR"); +orderRequest.Add("payment_capture", true); +orderRequest.Add("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.Add("method", "emandate"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); +Dictionary token = new Dictionary(); +token.Add("auth_type","netbanking"); +token.Add("max_amount","9999900"); +token.Add("expire_at","2709971120"); +Dictionary tokenNotes = new Dictionary(); +tokenNotes.Add("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.Add("notes_key_2","Tea, Earl Grey… decaf."); +token.Add("notes",tokenNotes); +orderRequest.Add("token", token); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +token.Add("bank_account",bankAccount); + +Order order = client.Order.Create(orderRequest); + +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "netbanking", + "expire_at": 4102444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 0 + } +} +``` + +```cURL: Emandate via Debit Card +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "debitcard", + "max_amount": 9999900, + "expire_at": 4102444799, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("payment_capture", true); +orderRequest.put("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.put("method", "emandate"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("auth_type","debitcard"); +token.put("max_amount","9999900"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0000001"); +token.put("bank_account",bankAccount); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','payment_capture' => true,'method' => 'emandate','customer_id' => 'cust_1Aa00000000001','receipt' => 'Receipt No. 1','notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'),'token' => array('auth_type' => 'debitcard','max_amount' => 9999900,'expire_at' => 4102444799,'notes' => array('notes_key_1' => 'Tea, Earl Grey, Hot','notes_key_2' => 'Tea, Earl Grey… decaf.'),'bank_account' => array('beneficiary_name' => 'Gaurav Kumar','account_number' => '1121431121541121','account_type' => 'savings','ifsc_code' => 'HDFC0000001')))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + payment_capture: true, + method: "emandate", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "debitcard", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: 1121431121541121, + account_type: "savings", + ifsc_code: "HDFC0000001" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'emandate', + 'customer_id': 'cust_1Aa00000000001', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'debitcard', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "amount": 0, + "currency": "INR", + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "debitcard", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 1121431121541121, + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token": map[string]interface{}{ + "auth_type": "debitcard", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "debitcard", + "expire_at": 4102444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 0 + } +} +``` + +```cURL: Emandate via Aadhaar +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "aadhaar", + "max_amount": 9999900, + "expire_at": 4102444799, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("payment_capture", true); +orderRequest.put("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.put("method", "emandate"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("auth_type","aadhaar"); +token.put("max_amount","9999900"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0000001"); +token.put("bank_account",bankAccount); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','payment_capture' => true,'method' => 'emandate','customer_id' => 'cust_1Aa00000000001','receipt' => 'Receipt No. 1','notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'),'token' => array('auth_type' => 'aadhaar','max_amount' => 9999900,'expire_at' => 4102444799,'notes' => array('notes_key_1' => 'Tea, Earl Grey, Hot','notes_key_2' => 'Tea, Earl Grey… decaf.'),'bank_account' => array('beneficiary_name' => 'Gaurav Kumar','account_number' => '1121431121541121','account_type' => 'savings','ifsc_code' => 'HDFC0000001')))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + payment_capture: true, + method: "emandate", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "aadhaar", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: 1121431121541121, + account_type: "savings", + ifsc_code: "HDFC0000001" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'emandate', + 'payment_capture': True, + 'customer_id': 'cust_1Aa00000000001', + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'aadhaar', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "amount": 0, + "currency": "INR", + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "aadhaar", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 1121431121541121, + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token": map[string]interface{}{ + "auth_type": "aadhaar", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "aadhaar", + "expire_at": 4102444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 0 + } +} +``` + +> **INFO** +> +> +> **Authorisation transaction + auto-charge first payment** +> +> You can register a customer's mandate **and** charge them the first recurring payment as part of the same transaction. Know more about [charge first payment automatically after Emandate registration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/auto-debit.md). +> + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For emandate, the amount should be `0`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether tha payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `emandate`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer to be charged. For example, `cust_D0cs04OIpPPU1F`. + +`receipt` _optional_ +: `string` A user-entered unique identifier of the order. For example, `rcptid #1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: Details related to the authorisation such as max amount and bank account information. + +`auth_type` _optional_ + : `string` Emandate type used to make the authorisation payment. Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + + `max_amount` _optional_ + : `integer` The maximum amount in paise a customer can be charged in a transaction. Know about the [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` _optional_ + : `integer` The Unix timestamp to indicate till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. Defaults to 40 years. The maximum value you can set is 40 years from the current date. Any value beyond this will throw an error. + + `notes`_optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `bank_account` + : Customer's bank account details that should be pre-filled on the checkout. + + `account_number` _optional_ + : `string` Customer's bank account number. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` _optional_ + : `string` Customer's bank IFSC. For example `UTIB0000001`. + + `beneficiary_name` _optional_ + : `string` Name of the beneficiary. For example, `Gaurav Kumar`. + +> **WARN** +> +> +> **Watch Out!** +> +> The `beneficiary_name` should be between 4 to 120 characters. +> + +### 1.1.3. Create an Authorisation Payment + +Once an order is created, your next step is to create a payment. Use the below endpoint to create a payment with payment method `netbanking`. + +/payments/create/json + +```curl: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ + -d '{ + "amount": 0, + "currency": "INR", + "contact": 9876543210, + "email": "gaurav.kumar@example.com", + "order_id": "order_KigZxUK9GxJPW2", + "customer_id": "cust_K39wXdBlhqNk0B", + "recurring": true, + "method": "emandate", + "bank": "HDFC", + "auth_type": "netbanking", + "bank_account": { + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc": "HDFC0000001" + } +}' +```json: Response +{ + "razorpay_payment_id": "pay_FVptEVkDdNzFx8", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/FVptEs3cSWX1fs/authorize" + } + ] +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For netbanking, the amount has to be `0` (₹0). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created using in [Step 1.1.2](#112-create-an-order). + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer to be charged. For example, `cust_K39wXdBlhqNk0B`. + +`recurring` _mandatory_ +: `boolean` Possible values: + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`auth_type` _optional_ +: `string` Emandate type used to make the authorisation payment. Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `8888888888`. + +`method` _mandatory_ +: `string` The payment method selected by the customer. Here, the value must be `emandate`. + +`bank` _mandatory_ +: `string` The customer's bank name. The bank code used here should match the bank details used in [Step 1.1.2](#112-create-an-order). Use the [Method API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/methods-api.md) to check the bank code. + + `account_number` + : `string` Customer's bank account number. + + `account_type` + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` + : `string` Customer's bank IFSC. For example `HDFC0000001`. + +#### Response Parameters + +If the payment request is valid, the response contains the following fields. Refer to the [S2S Json V2 integration document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2.md#step-2-create-a-payment_) for more details. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. The value here is `redirect` - Use this URL to redirect customer to the bank page. + + `url` + : `string` URL to be used for the action indicated. + +## 1.2. Using a Registration Link + +Registration Links are an alternate way of creating an authorisation transaction. If you create a registration link, you need not create a customer or an order. + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. The customer can use the invoice to make the Authorisation Payment. + +Know how to [create Registration Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md) using the Dashboard. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use webhooks to get notifications about successful payments against a registration link. Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks). +> + +A registration link must always have an amount (in Paise) that the customer will be charged when making the authorisation payment. In the case of emandate, the order amount must be `0`. + +### 1.2.1. Create a Registration Link + +The following endpoint creates a registration link. + +/subscription_registration/auth_links + +```cURL: Emandate via Netbanking +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "method": "emandate", + "auth_type": "netbanking", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 0); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "12 p.m. Meals"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","emandate"); +subscriptionRegistration.put("auth_type","netbanking"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +subscriptionRegistration.put("bank_account",bankAccount); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. 25"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('method'=>'emandate','max_amount'=>'500','expire_at'=>'1634215992'),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992,'notes' => array('note_key 1' => 'Beam me up Scotty','note_key 2' => 'Tea. Earl Gray. Hot.'))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 0, + currency: "INR", + description: "12 p.m. Meals", + subscription_registration: { + method: "emandate", + auth_type: "netbanking", + expire_at: 1580480689, + max_amount: 50000, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: 11214311215411, + account_type: "savings", + ifsc_code: "HDFC0001233" + } + }, + receipt: "Receipt no. 1", + expire_by: 1880480689, + sms_notify: true, + email_notify: true, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + 'customer': {'name': 'Gaurav Kumar', + 'email': 'gaurav.kumar@example.com', + 'contact': 9123456780}, + 'type': 'link', + 'amount': 0, + 'currency': 'INR', + 'description': '12 p.m. Meals', + 'subscription_registration': { + 'method': 'emandate', + 'auth_type': 'netbanking', + 'expire_at': 1580480689, + 'max_amount': 50000, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 11214311215411, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0001233', + }, + }, + 'receipt': 'Receipt no. 1', + 'expire_by': 1880480689, + 'sms_notify': True, + 'email_notify': True, + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "method": "emandate", + "auth_type": "netbanking", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. #12", + "expire_by": 1880480689, + "sms_notify": 1, + "email_notify": 1, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} + +Razorpay::SubscriptionRegistration.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer": map[string]interface{}{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": map[string]interface{}{ + "method": "emandate", + "auth_type": "netbanking", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233", + }, + }, + "receipt": "Receipt no. 25", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} + +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary registrationLinkRequest = new Dictionary(); +Dictionary customer = new Dictionary(); +customer.Add("name","Gaurav Kumar"); +customer.Add("email","gaurav.kumar@example.com"); +customer.Add("contact","9123456780"); +registrationLinkRequest.Add("customer", customer); +registrationLinkRequest.Add("type", "link"); +registrationLinkRequest.Add("amount", 0); +registrationLinkRequest.Add("currency", "INR"); +registrationLinkRequest.Add("description", "12 p.m. Meals"); +Dictionary subscriptionRegistration = new Dictionary(); +subscriptionRegistration.Add("method","emandate"); +subscriptionRegistration.Add("auth_type","netbanking"); +subscriptionRegistration.Add("max_amount",50000); +subscriptionRegistration.Add("expire_at",1609423824); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +subscriptionRegistration.Add("bank_account",bankAccount); +registrationLinkRequest.Add("subscription_registration", subscriptionRegistration); +registrationLinkRequest.Add("receipt", "Receipt No. 1"); +registrationLinkRequest.Add("email_notify", true); +registrationLinkRequest.Add("sms_notify", true); +registrationLinkRequest.Add("expire_by", 1580479824); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.Add("notes", notes); + +Invoice invoice = client.Invoice.CreateRegistrationLink(registrationLinkRequest); + +```json: Response +{ + "id": "inv_FHrY6tDtVP2dHg", + "entity": "invoice", + "receipt": "Receipt no. 25", + "invoice_number": "Receipt no. 25", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrY6tiC2y7NNN", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491063, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491063, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/DxEcNtR", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491063, + "idempotency_key": null +} +``` + +```cURL: Emandate via Debit Card +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "method": "emandate", + "auth_type": "debitcard", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrZAOeCuB9HtK", + "entity": "invoice", + "receipt": "Receipt no. 26", + "invoice_number": "Receipt no. 26", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZAPOStKd4xS", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491123, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491123, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/RllVOmA", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491123, + "idempotency_key": null +} +``` + +```cURL: Emandate via Aadhaar +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "method": "emandate", + "auth_type": "aadhaar", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrZAOeCuB9HtK", + "entity": "invoice", + "receipt": "Receipt no. 26", + "invoice_number": "Receipt no. 26", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZAPOStKd4xS", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491123, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491123, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/RllVOmA", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491123, + "idempotency_key": null +} +``` + +#### Request Parameters + +`customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + +`subscription_registration` +: Details of the authorisation payment. + + `method` _mandatory_ + : `string` The authorization method. Here, it is `emandate`. + + `auth_type` _optional_ + : `string` Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + +`max_amount` _optional_ + : `integer` The maximum amount, in paise, a customer can be charged in a transaction. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` _optional_ + : `integer` The Unix timestamp indicates till when you can use the token (authorization on the payment method) to charge the customer their subsequent payments. Defaults to `40 years`. The maximum value you can set is 40 years from the current date. Any value beyond this will throw an error. + + `bank_account` + : The customer's bank account details. + + `beneficiary_name` _optional_ + : `string` Name on the beneficiary. For example `Gaurav Kumar`. + +> **WARN** +> +> +> **Watch Out!** +> +> The `beneficiary_name` should be between 4 to 120 characters. +> + + `account_number` _optional_ + : `string` Customer's bank account number. For example `11214311215411`. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` _optional_ + : `string` Customer's bank IFSC. For example `HDFC0000001`. + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + +#### Path Parameters + +`id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/emandate/auto-debit.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/emandate/auto-debit.md new file mode 100644 index 00000000..740c5195 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/emandate/auto-debit.md @@ -0,0 +1,2989 @@ +--- +title: Register Emandate and Charge First Payment Together +description: Register a customer's mandate and charge them the first recurring payment as part of the same transaction via Emandate. +--- + +# Register Emandate and Charge First Payment Together + +## 1. Create an Authorisation Transaction + +> **INFO** +> +> +> **Authorisation transaction + auto-charge first payment** +> +> You can register a customer's mandate **AND** charge them the first recurring payment as part of the same transaction. To do this all you have to do is pass the `first_payment_amount` parameter while creating the order. +> + +You can create an authorisation transaction using the [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +### 1.1. Using Razorpay APIs + +To create an authorisation transaction using the Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorisation-payment). + +#### 1.1.1. Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + +##### Request Parameters + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### 1.1.2. Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +#### Emandate via Netbanking + +```curl: Emandate via Netbanking +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "first_payment_amount": 100, + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_1Aa00000000001"); +orderRequest.put("method", "emandate"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("first_payment_amount",100); +token.put("auth_type","netbanking"); +token.put("max_amount","9999900"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +token.put("bank_account",bankAccount); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => 'INR', 'method'=>'emandate', 'customer_id'=>$customerId, 'receipt'=>'Receipt No. 5', 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Engage'), 'token'=>array('first_payment_amount'=>10000, 'auth_type'=>'netbanking' ,'max_amount'=>'9999900','expire_at'=>'4102444799', 'notes'=>array('note_key 1'=> 'Tea, Earl Grey… decaf.','note_key 2'=> 'Tea. Earl Gray. Hot.'), 'bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233')))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 100, + currency: "INR", + method: "emandate", + receipt: "Receipt No. 5", + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Engage" + }, + token: { + first_payment_amount: 10000, + auth_type: "netbanking", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + "note_key 1": "Tea, Earl Grey… decaf.", + "note_key 2": "Tea. Earl Gray. Hot." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "11214311215411", + account_type: "savings", + ifsc_code: "HDFC0001233" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'emandate', + 'customer_id': 'cust_1Aa00000000001', + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'netbanking', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "method": "emandate", + "receipt": "Receipt No. 5", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Engage" + }, + "token": { + "first_payment_amount": 10000, + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "note_key 1": "Tea, Earl Grey… decaf.", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + } +} +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token": map[string]interface{}{ + "first_payment_amount": 100, + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 0); +orderRequest.Add("currency", "INR"); +orderRequest.Add("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.Add("method", "emandate"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); +Dictionary token = new Dictionary(); +token.Add("first_payment_amount",100); +token.Add("auth_type","netbanking"); +token.Add("max_amount","10000000"); +token.Add("expire_at","2709971120"); +Dictionary tokenNotes = new Dictionary(); +tokenNotes.Add("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.Add("notes_key_2","Tea, Earl Grey… decaf."); +token.Add("notes",tokenNotes); +orderRequest.Add("token", token); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +token.Add("bank_account",bankAccount); + +Order order = client.Order.Create(orderRequest); + +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "netbanking", + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 100 + } +} +``` + +#### Emandate via Debit Card + +```curl: Emandate via Debit Card +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "first_payment_amount": 100, + "auth_type": "debitcard", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_1Aa00000000001"); +orderRequest.put("method", "emandate"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("first_payment_amount",100); +token.put("auth_type","debitcard"); +token.put("max_amount","9999900"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +token.put("bank_account",bankAccount); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => 'INR', 'method'=>'emandate', 'customer_id'=>$customerId, 'receipt'=>'Receipt No. 5', 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Engage'), 'token'=>array('first_payment_amount'=>10000, 'auth_type'=>'debitcard' ,'max_amount'=>'9999900','expire_at'=>'4102444799', 'notes'=>array('note_key 1'=> 'Tea, Earl Grey… decaf.','note_key 2'=> 'Tea. Earl Gray. Hot.'), 'bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233')))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 100, + currency: "INR", + method: "emandate", + receipt: "Receipt No. 5", + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Engage" + }, + token: { + first_payment_amount: 10000, + auth_type: "debitcard", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + "note_key 1": "Tea, Earl Grey… decaf.", + "note_key 2": "Tea. Earl Gray. Hot." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "11214311215411", + account_type: "savings", + ifsc_code: "HDFC0001233" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'emandate', + 'customer_id': 'cust_1Aa00000000001', + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'debitcard', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "method": "emandate", + "receipt": "Receipt No. 5", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Engage" + }, + "token": { + "first_payment_amount": 10000, + "auth_type": "debitcard", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "note_key 1": "Tea, Earl Grey… decaf.", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + } +} +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token": map[string]interface{}{ + "first_payment_amount": 100, + "auth_type": "debitcard", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "debitcard", + "expire_at": 4102444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 100 + } +} +``` + +#### Emandate via Aadhaar + +```curl: Emandate via Aadhaar +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 0, + "currency": "INR", + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "first_payment_amount": 100, + "auth_type": "aadhaar", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_1Aa00000000001"); +orderRequest.put("method", "emandate"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("first_payment_amount",100); +token.put("auth_type","aadhaar"); +token.put("max_amount","9999900"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +token.put("bank_account",bankAccount); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => 'INR', 'method'=>'emandate', 'customer_id'=>$customerId, 'receipt'=>'Receipt No. 5', 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Engage'), 'token'=>array('first_payment_amount'=>10000, 'auth_type'=>'aadhaar' ,'max_amount'=>'9999900','expire_at'=>'4102444799', 'notes'=>array('note_key 1'=> 'Tea, Earl Grey… decaf.','note_key 2'=> 'Tea. Earl Gray. Hot.'), 'bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233')))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 100, + currency: "INR", + method: "emandate", + receipt: "Receipt No. 5", + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Engage" + }, + token: { + first_payment_amount: 10000, + auth_type: "aadhaar", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + "note_key 1": "Tea, Earl Grey… decaf.", + "note_key 2": "Tea. Earl Gray. Hot." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "11214311215411", + account_type: "savings", + ifsc_code: "HDFC0001233" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'emandate', + 'customer_id': 'cust_1Aa00000000001', + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'aadhaar', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "method": "emandate", + "receipt": "Receipt No. 5", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Engage" + }, + "token": { + "first_payment_amount": 10000, + "auth_type": "aadhaar", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "note_key 1": "Tea, Earl Grey… decaf.", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + } +} +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 0, + "currency": "INR", + "payment_capture": true, + "method": "emandate", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token": map[string]interface{}{ + "first_payment_amount": 100, + "auth_type": "aadhaar", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001", + }, + }, +} +body, err := client.Order.Create(data, nil) +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "aadhaar", + "expire_at": 4102444799, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 100 + } +} +``` + +##### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For emandate, the amount should be `0`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether tha payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `emandate`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer to be charged. For example, `cust_D0cs04OIpPPU1F`. + +`receipt` _optional_ +: `string` A user-entered unique identifier of the order. For example, `rcptid #1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: `object` Details related to the authorisation such as max amount and bank account information. Pass a value in the `first_payment_amount` parameter if you want to auto-charge the customer the first payment immediately after authorisation using the same `order_id`. The first payment will be created automatically and executed within 2 days of emandate token confirmation. + + `first_payment_amount` _optional_ + : `integer` The amount, in paise, that should be auto-charged in addition to the authorization amount. For example, `100000`. + +`auth_type` _optional_ + : `string` Emandate type used to make the authorisation payment. Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + + `max_amount` _optional_ + : `integer` The maximum amount in paise a customer can be charged in a transaction. Know about the [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` _optional_ + : `integer` The Unix timestamp to indicate till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. Defaults to 40 years. The maximum value you can set is 40 years from the current date. Any value beyond this will throw an error. + + `notes`_optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `bank_account` + : Customer's bank account details that should be pre-filled on the checkout. + + `account_number` _optional_ + : `string` Customer's bank account number. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` _optional_ + : `string` Customer's bank IFSC. For example `UTIB0000001`. + + `beneficiary_name` _optional_ + : `string` Name of the beneficiary. For example, `Gaurav Kumar`. + +> **WARN** +> +> +> **Watch Out!** +> +> The `beneficiary_name` should be between 4 to 120 characters. +> + +#### 1.1.3. Create an Authorisation Payment + +Once an order is created, your next step is to create a payment. Use the below endpoint to create a payment with payment method `netbanking`. + +/payments/create/json + +```curl: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ + -d '{ + "amount": 0, + "currency": "INR", + "contact": 9876543210, + "email": "gaurav.kumar@example.com", + "order_id": "order_KigZxUK9GxJPW2", + "customer_id": "cust_K39wXdBlhqNk0B", + "recurring": true, + "method": "emandate", + "bank": "HDFC", + "auth_type": "netbanking", + "bank_account": { + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc": "HDFC0000001" + } +}' +```json: Response +{ + "razorpay_payment_id": "pay_FVptEVkDdNzFx8", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/FVptEs3cSWX1fs/authorize" + } + ] +} +``` + +##### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For netbanking, the amount has to be `0` (₹0). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created using in [Step 1.1.2](#112-create-an-order). + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer to be charged. For example, `cust_K39wXdBlhqNk0B`. + +`recurring` _mandatory_ +: `boolean` Possible values: + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`auth_type` _optional_ +: `string` Emandate type used to make the authorisation payment. Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `8888888888`. + +`method` _mandatory_ +: `string` The payment method selected by the customer. Here, the value must be `emandate`. + +`bank` _mandatory_ +: `string` The customer's bank name. The bank code used here should match the bank details used in [Step 1.1.2](#112-create-an-order). Use the [Method API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/methods-api.md) to check the bank code. + + `account_number` + : `string` Customer's bank account number. + + `account_type` + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` + : `string` Customer's bank IFSC. For example `HDFC0000001`. + +##### Response Parameters + +If the payment request is valid, the response contains the following fields. Refer to the [S2S Json V2 integration document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2.md#step-2-create-a-payment_) for more details. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. The value here is `redirect` - Use this URL to redirect customer to the bank page. + + `url` + : `string` URL to be used for the action indicated. + +### 1.2. Using a Registration Link + +Registration Links are an alternate way of creating an authorisation transaction. If you create a registration link, you need not create a customer or an order. + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. The customer can use the invoice to make the Authorisation Payment. + +Know how to [create Registration Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md) using the Dashboard. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use webhooks to get notifications about successful payments against a registration link. Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks). +> + +A registration link must always have an amount (in paise) that the customer will be charged when making the authorisation payment. In the case of emandate, the order amount must be `0`. + +#### 1.2.1. Create a Registration Link + +The following endpoint creates a registration link. + +/subscription_registration/auth_links + +#### Emandate via Netbanking + +```cURL: Emandate via Netbanking +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "netbanking", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 0); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "12 p.m. Meals"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","emandate"); +subscriptionRegistration.put("auth_type","netbanking"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +subscriptionRegistration.put("bank_account",bankAccount); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. 1"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('first_payment_amount'=>100, 'method'=>'emandate', 'auth_type'=>'netbanking' ,'max_amount'=>'50000','expire_at'=>'1634215992','bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233')),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992, 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Tea. Earl Gray. Hot.')) ); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 100, + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + first_payment_amount: 100, + method: "emandate", + auth_type: "netbanking", + max_amount: 50000, + expire_at: 1634215992, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "11214311215411", + account_type: "savings", + ifsc_code: "HDFC0001233" + } + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + 'customer': {'name': 'Gaurav Kumar', + 'email': 'gaurav.kumar@example.com', + 'contact': 9123456780}, + 'type': 'link', + 'amount': 0, + 'currency': 'INR', + 'description': '12 p.m. Meals', + 'subscription_registration': { + 'method': 'emandate', + 'auth_type': 'netbanking', + 'expire_at': 1580480689, + 'max_amount': 50000, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 11214311215411, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0001233', + }, + }, + 'receipt': 'Receipt no. 1', + 'expire_by': 1880480689, + 'sms_notify': True, + 'email_notify': True, + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "netbanking", + "max_amount": 50000, + "expire_at": 1634215992, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt No. 5", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::SubscriptionRegistration.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer": map[string]interface{}{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": map[string]interface{}{ + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "netbanking", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233", + }, + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} + +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary registrationLinkRequest = new Dictionary(); +Dictionary customer = new Dictionary(); +customer.Add("name","Gaurav Kumar"); +customer.Add("email","gaurav.kumar@example.com"); +customer.Add("contact","9123456780"); +registrationLinkRequest.Add("customer", customer); +registrationLinkRequest.Add("type", "link"); +registrationLinkRequest.Add("amount", 0); +registrationLinkRequest.Add("currency", "INR"); +registrationLinkRequest.Add("description", "12 p.m. Meals"); +Dictionary subscriptionRegistration = new Dictionary(); +subscriptionRegistration.Add("method","emandate"); +subscriptionRegistration.Add("auth_type","netbanking"); +subscriptionRegistration.Add("max_amount",50000); +subscriptionRegistration.Add("expire_at",1609423824); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +subscriptionRegistration.Add("bank_account",bankAccount); +registrationLinkRequest.Add("subscription_registration", subscriptionRegistration); +registrationLinkRequest.Add("receipt", "Receipt No. 1"); +registrationLinkRequest.Add("email_notify", true); +registrationLinkRequest.Add("sms_notify", true); +registrationLinkRequest.Add("expire_by", 1580479824); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.Add("notes", notes); + +Invoice invoice = client.Invoice.CreateRegistrationLink(registrationLinkRequest); + +```json: Response +{ + "id": "inv_FHrY6tDtVP2dHg", + "entity": "invoice", + "receipt": "Receipt no. 25", + "invoice_number": "Receipt no. 25", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrY6tiC2y7NNN", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491063, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491063, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/DxEcNtR", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491063, + "idempotency_key": null +} +``` + +#### Emandate via Debit Card + +```cURL: Emandate via Debit Card +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "debitcard", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 0); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "12 p.m. Meals"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","emandate"); +subscriptionRegistration.put("auth_type","debitcard"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +subscriptionRegistration.put("bank_account",bankAccount); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. 1"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('first_payment_amount'=>100, 'method'=>'emandate', 'auth_type'=>'debitcard' ,'max_amount'=>'50000','expire_at'=>'1634215992','bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233')),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992, 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Tea. Earl Gray. Hot.')) ); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 100, + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + first_payment_amount: 100, + method: "emandate", + auth_type: "debitcard", + max_amount: 50000, + expire_at: 1634215992, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "11214311215411", + account_type: "savings", + ifsc_code: "HDFC0001233" + } + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + 'customer': {'name': 'Gaurav Kumar', + 'email': 'gaurav.kumar@example.com', + 'contact': 9123456780}, + 'type': 'link', + 'amount': 0, + 'currency': 'INR', + 'description': '12 p.m. Meals', + 'subscription_registration': { + 'method': 'emandate', + 'auth_type': 'debitcard', + 'expire_at': 1580480689, + 'max_amount': 50000, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 11214311215411, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0001233', + }, + }, + 'receipt': 'Receipt no. 1', + 'expire_by': 1880480689, + 'sms_notify': True, + 'email_notify': True, + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "debitcard", + "max_amount": 50000, + "expire_at": 1634215992, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt No. 5", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::SubscriptionRegistration.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer": map[string]interface{}{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": map[string]interface{}{ + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "debitcard", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233", + }, + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} + +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```json: Response +{ + "id": "inv_FHrZAOeCuB9HtK", + "entity": "invoice", + "receipt": "Receipt no. 26", + "invoice_number": "Receipt no. 26", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZAPOStKd4xS", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491123, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491123, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/RllVOmA", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491123, + "idempotency_key": null +} +``` + +#### Emandate via Aadhaar + +```cURL: Emandate via Aadhaar +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 0, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "aadhaar", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 0); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "12 p.m. Meals"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","emandate"); +subscriptionRegistration.put("auth_type","aadhaar"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +subscriptionRegistration.put("bank_account",bankAccount); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. 1"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('first_payment_amount'=>100, 'method'=>'emandate', 'auth_type'=>'aadhaar' ,'max_amount'=>'50000','expire_at'=>'1634215992','bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233')),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992, 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Tea. Earl Gray. Hot.')) ); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 100, + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + first_payment_amount: 100, + method: "emandate", + auth_type: "aadhaar", + max_amount: 50000, + expire_at: 1634215992, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "11214311215411", + account_type: "savings", + ifsc_code: "HDFC0001233" + } + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + 'customer': {'name': 'Gaurav Kumar', + 'email': 'gaurav.kumar@example.com', + 'contact': 9123456780}, + 'type': 'link', + 'amount': 0, + 'currency': 'INR', + 'description': '12 p.m. Meals', + 'subscription_registration': { + 'method': 'emandate', + 'auth_type': 'aadhaar', + 'expire_at': 1580480689, + 'max_amount': 50000, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 11214311215411, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0001233', + }, + }, + 'receipt': 'Receipt no. 1', + 'expire_by': 1880480689, + 'sms_notify': True, + 'email_notify': True, + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "aadhaar", + "max_amount": 50000, + "expire_at": 1634215992, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt No. 5", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::SubscriptionRegistration.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer": map[string]interface{}{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": map[string]interface{}{ + "first_payment_amount": 100, + "method": "emandate", + "auth_type": "aadhaar", + "expire_at": 1580480689, + "max_amount": 50000, + "bank_account": map[string]interface{}{ + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233", + }, + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} + +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```json: Response +{ + "id": "inv_FHrZAOeCuB9HtK", + "entity": "invoice", + "receipt": "Receipt no. 26", + "invoice_number": "Receipt no. 26", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZAPOStKd4xS", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491123, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491123, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/RllVOmA", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491123, + "idempotency_key": null +} +``` + +##### Request Parameters + +`customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + +`subscription_registration` +: Details of the authorisation payment. + + `method` _mandatory_ + : `string` The authorization method. Here, it is `emandate`. + + `auth_type` _optional_ + : `string` Possible values: + - `netbanking` + - `debitcard` + - `aadhaar` + +`first_payment_amount` _optional_ + : `integer` The amount, in paise, the customer should be auto-charged in addition to the authorization amount. For example, `100000`. + +`max_amount` _optional_ + : `integer` The maximum amount, in paise, a customer can be charged in a transaction. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` _optional_ + : `integer` The Unix timestamp indicates till when you can use the token (authorization on the payment method) to charge the customer their subsequent payments. Defaults to `40 years`. The maximum value you can set is 40 years from the current date. Any value beyond this will throw an error. + + `bank_account` + : The customer's bank account details. + + `beneficiary_name` _optional_ + : `string` Name on the beneficiary. For example `Gaurav Kumar`. + +> **WARN** +> +> +> **Watch Out!** +> +> The `beneficiary_name` should be between 4 to 120 characters. +> + + `account_number` _optional_ + : `string` Customer's bank account number. For example `11214311215411`. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` _optional_ + : `string` Customer's bank IFSC. For example `HDFC0000001`. + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + +##### Path Parameters + +`id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +#### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + +##### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. + +## 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +### 2.1. Fetch Token by Payment ID + +The following endpoint retrieves the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_1Aa00000000002" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.Fetch(paymentId); + +```json: Response +{ + "id": "pay_FHf9a7AO0iXM9I", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_FHf9OwSeyetnKC", + "invoice_id": "inv_FHf9P2hhXEti7i", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHf9aAZR9hWJkq", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595447410 +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +### 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> This endpoint will not fetch the details of expired and unused tokens. +> + +/customers/:id/tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +Customer customer = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000002 " + +Razorpay::Customer.fetchTokens(customerId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); + +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "token_FHf94Uym9tdYFJ", + "entity": "token", + "token": "2wDPM7VAlXtjAR", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "netbanking", + "mrn": null, + "used_at": 1595447381, + "created_at": 1595447381, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 1689971140, + "dcc_enabled": false + }, + { + "id": "token_FHf9aAZR9hWJkq", + "entity": "token", + "token": "AwAwIFBmDSJ4p6", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "debitcard", + "mrn": null, + "used_at": 1595447410, + "created_at": 1595447410, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 4102444799, + "dcc_enabled": false + } + ] +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +### 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + +#### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + +## 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +### 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/emandate/subsequent-payments.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/emandate/subsequent-payments.md new file mode 100644 index 00000000..9a90e257 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/emandate/subsequent-payments.md @@ -0,0 +1,374 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +## 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/emandate/tokens.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/emandate/tokens.md new file mode 100644 index 00000000..4292a930 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/emandate/tokens.md @@ -0,0 +1,331 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay returns a `razorpay_payment_id` that can be used to fetch the `token_id`. This is a manual process and can be done using either APIs or Webhooks. This `token_id` is used to create and charge subsequent payments. + +> **INFO** +> +> +> **Handy Tips** +> +> You can also [search for the Token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) on your Dashboard. +> + +## 2.1. Fetch Token by Payment ID + +The following endpoint retrieves the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_1Aa00000000002" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.Fetch(paymentId); + +```json: Response +{ + "id": "pay_FHf9a7AO0iXM9I", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_FHf9OwSeyetnKC", + "invoice_id": "inv_FHf9P2hhXEti7i", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHf9aAZR9hWJkq", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595447410 +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +## 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> This endpoint will not fetch the details of expired and unused tokens. +> + +/customers/:id/tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +Customer customer = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000002 " + +Razorpay::Customer.fetchTokens(customerId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); + +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "token_FHf94Uym9tdYFJ", + "entity": "token", + "token": "2wDPM7VAlXtjAR", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "netbanking", + "mrn": null, + "used_at": 1595447381, + "created_at": 1595447381, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 1689971140, + "dcc_enabled": false + }, + { + "id": "token_FHf9aAZR9hWJkq", + "entity": "token", + "token": "AwAwIFBmDSJ4p6", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "debitcard", + "mrn": null, + "used_at": 1595447410, + "created_at": 1595447410, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 4102444799, + "dcc_enabled": false + } + ] +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +## 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/paper-nach/authorization-transaction.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/paper-nach/authorization-transaction.md new file mode 100644 index 00000000..578f6305 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/paper-nach/authorization-transaction.md @@ -0,0 +1,1680 @@ +--- +title: 1. Create the Authorisation Transaction +description: Create an authorisation transaction for NACH using Razorpay APIs. +--- + +# 1. Create the Authorisation Transaction + +The flow to complete an authorisation transaction using paper NACH differs from the other payment method's flow. +1. Create a customer. +2. Create an order by passing the `customer_id` and the method as `nach`. Razorpay generates a NACH form with the customer information pre-filled and ready to sign. +3. The customer can get the form in one of the following ways to sign it: + - You can download the form from the Dashboard and send it to the customer. + - A customer can download the form from the Hosted page (in the case of registration links). +4. The signed form can be uploaded in one of the following ways: + - Using the Standard Checkout page. + - Hosted page (in the case of registration links). + - The customer can send you the form and you can upload the form for the customer. The acceptable image formats and size are: + - jpeg + - jpg + - png + - Maximum accepted size is 6 MB. + +Once the details are validated, the authorisation transaction is completed and a token is generated. You can charge your customer as per your business model after the token status changes to `confirmed`. + +The acceptable image formats and size are: +- jpeg +- jpg +- png +- Maximum accepted size is 6 MB. + +## Ways to Accept Authorisation Payment + +You can create an authorisation transaction using the [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +## 1.1. Using Razorpay APIs + +To create an authorisation transaction using the Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorisation-payment). + +### 1.1.1. Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + +#### Request Parameters + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.1.2. Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":0, + "currency":"INR", + "method":"nach", + "customer_id": "cust_1Aa00000000001", + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token":{ + "auth_type":"physical", + "max_amount":10000000, + "expire_at":2709971120, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account":{ + "account_number":"11214311215411", + "ifsc_code":"HDFC0000001", + "beneficiary_name":"Gaurav Kumar", + "account_type":"savings" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "description":"Paper NACH Gaurav Kumar" + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 0); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.put("method", "nach"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); +JSONObject token = new JSONObject(); +token.put("auth_type","physical"); +token.put("max_amount","10000000"); +token.put("expire_at","2709971120"); +JSONObject tokenNotes = new JSONObject(); +tokenNotes.put("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.put("notes_key_2","Tea, Earl Grey… decaf."); +token.put("notes",tokenNotes); +orderRequest.put("token", token); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +token.put("bank_account",bankAccount); +JSONObject nach = new JSONObject(); +nach.put("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.put("form_reference2","Method Paper NACH"); +nach.put("description","Paper NACH Gaurav Kumar"); +token.put("nach",nach); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','method' => 'nach','customer_id' => 'cust_1Aa00000000001','receipt' => 'Receipt No. 1', 'notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'),'token' => array('auth_type' => 'physical','max_amount' => 10000000,'expire_at' => 2709971120,'notes' => array('notes_key_1' => 'Tea, Earl Grey, Hot','notes_key_2' => 'Tea, Earl Grey… decaf.'),'bank_account' => array('account_number' => '11214311215411','ifsc_code' => 'HDFC0000001','beneficiary_name' => 'Gaurav Kumar','account_type' => 'savings'),'nach' => array('form_reference1' => 'Recurring Payment for Gaurav Kumar','form_reference2' => 'Method Paper NACH','description' => 'Paper NACH Gaurav Kumar')))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + method: "nach", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "netbanking", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + }, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "1121431121541121", + account_type: "savings", + ifsc_code: "HDFC0000001" + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 0, + 'currency': 'INR', + 'method': 'nach', + 'customer_id': 'cust_1Aa00000000001', + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Beam me up Scotty', + 'notes_key_2': 'Engage'}, + 'token': { + 'auth_type': 'netbanking', + 'max_amount': 9999900, + 'expire_at': 4102444799, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'}, + 'bank_account': { + 'beneficiary_name': 'Gaurav Kumar', + 'account_number': 1121431121541121, + 'account_type': 'savings', + 'ifsc_code': 'HDFC0000001' + } + } + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 0, + "currency": "INR", + "method": "nach", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 1121431121541121, + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount":0, + "currency":"INR", + "method":"nach", + "customer_id": "cust_1Aa00000000001", + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage", + }, + "token":map[string]interface{}{ + "auth_type":"physical", + "max_amount":10000000, + "expire_at":2709971120, + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + "bank_account":map[string]interface{}{ + "account_number":"11214311215411", + "ifsc_code":"HDFC0000001", + "beneficiary_name":"Gaurav Kumar", + "account_type":"savings", + }, + "nach":map[string]interface{}{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "description":"Paper NACH Gaurav Kumar", + }, + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 0); +orderRequest.Add("currency", "INR"); +orderRequest.Add("customer_id", "cust_JDdNazagOgg9Ig"); +orderRequest.Add("method", "nach"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); +Dictionary token = new Dictionary(); +token.Add("auth_type","physical"); +token.Add("max_amount","10000000"); +token.Add("expire_at","2709971120"); +Dictionary tokenNotes = new Dictionary(); +tokenNotes.Add("notes_key_1","Tea, Earl Grey, Hot"); +tokenNotes.Add("notes_key_2","Tea, Earl Grey… decaf."); +token.Add("notes",tokenNotes); +orderRequest.Add("token", token); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +token.Add("bank_account",bankAccount); +Dictionary nach = new Dictionary(); +nach.Add("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.Add("form_reference2","Method Paper NACH"); +nach.Add("description","Paper NACH Gaurav Kumar"); +token.Add("nach",nach); + +Order order = client.Order.Create(orderRequest); +``` + +```json: Success Response +{ + "id":"order_1Aa00000000001", + "entity":"order", + "amount":0, + "amount_paid":0, + "amount_due":0, + "currency":"INR", + "receipt":"rcptid #10", + "offer_id":null, + "offers":{ + "entity":"collection", + "count":0, + "items":[ + + ] + }, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Beam me up Scotty", + "notes_key_2":"Engage" + }, + "created_at":1579775420, + "token":{ + "method":"nach", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "recurring_status":null, + "failure_reason":null, + "currency":"INR", + "max_amount":10000000, + "auth_type":"physical", + "expire_at":1580480689, + "nach":{ + "create_form":true, + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "prefilled_form":"https://rzp.io/i/bitw", + "upload_form_url":"https://rzp.io/i/gts", + "description":"Paper NACH Gaurav Kumar" + }, + "bank_account":{ + "ifsc":"HDFC0000001", + "bank_name":"HDFC Bank", + "name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "beneficiary_email":"gaurav.kumar@example.com", + "beneficiary_mobile":"9876543210" + }, + "first_payment_amount":0 + } +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +> **INFO** +> +> +> **Download and Upload the Pre-filled NACH Form** +> +> Once the order is created, the pre-filled form must be downloaded, signed by your customer and uploaded back to Razorpay to complete the transaction. +> +> You receive the following parameters as part of the response: +> +> `prefilled_form` +> : The link from where you can download the pre-filled NACH form. +> +> `upload_form_url` +> : The link where the NACH form should be uploaded once it is signed by the customer. +> +> **Authorisation transaction + auto-charge first payment**: +> + +> You can register a customer's mandate **and** charge them the first recurring payment as part of the same transaction. Refer to the [Paper NACH section under Registration and Charge First Payment Together](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/auto-debit.md#1-create-an-authorization-transaction) for more information. +> + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For Paper NACH, the amount has to be `0`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`method` _mandatory_ +: `string` The authorisation method. In this case the value will be `nach`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer, who is to be charged. For example, `cust_D0cs04OIpPPU1F`. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `rcptid #1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: Details related to the authorisation such as max amount, bank account information and NACH information. + +`auth_type` _mandatory_ + : `string` In this case, it will be `physical`. + + `bank_account` + : Customer's bank account details that will be printed on the NACH form. + + `account_number`_mandatory_ + : `string` Customer's bank account number. For example `11214311215411`. + + `ifsc_code`_mandatory_ + : `string` Customer's bank IFSC. For example `UTIB0000001`. + + `beneficiary_name`_mandatory_ + : `string` Customer's name. For example, `Gaurav Kumar`. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + - `cc` (Cash Credit) + - `nre` (SB-NRE) + - `nro` (SB-NRO) + + `max_amount` _optional_ + : `integer` Use to set the maximum amount per debit request. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/faqs.md#3-is-there-a-limit-on-the-debit). + + `expire_at` _optional_ + : `integer` Timestamp, in Unix, that specifies when the registration link should expire. The value can range from the current date to 01-19-2038 (`2147483647`). + + `nach` + : Additional information to be printed on the NACH form that your customer will sign. + + `form_reference1` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `form_reference2` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `description` _optional_ + : `string` A user-entered description that appears on the hosted page. For example, `Form for Gaurav Kumar.` + + `notes`_optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.1.3. Create an Authorisation Payment + +After you create an order, you have to create an authorisation payment. To create an authorisation payment: + +1. Download the Paper NACH form and send it to the customers. +1. Ask the customers to fill the form and send it to you. +1. You upload the received form via the create NACH File API. The acceptable image formats and size are jpeg, jpg and png. Maximum accepted size is 6 MB. + +Use the below endpoint to upload the signed Paper NACH form via APIs. + +/payments/create/nach/file + +Razorpay's OCR-enabled NACH engine submits the form to NPCI on successful verification and you will receive a success/failure response. + +Use the following API to upload the NACH file sent by the customer. + +```cURL: Request +curl -u : \ +-X POST 'https://api.razorpay.com/v1/payments/create/nach/file' \ +-H "Content-Type: multipart/form-data" \ +-F 'order_id=order_FoLdZrq6QGKUWg' \ +-F 'recurring=1' \ +-F 'file=@/Users/your_name/sample_uploaded.jpeg' // file path +``` + +```json: Successful Response +{ + "razorpay_payment_id": "pay_FjDn43bvssCqEM", + "razorpay_order_id": "order_FjDdQ6a0GluJ2c", + "razorpay_signature": "f13775ea8a91e9bf229b9fdba3ad783f7ff2bdbce1c35e87a69ae7418808da04" +} +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"file size exceeds limit", + "field":null, + "source":"customer", + "step":"form_upload", + "reason":"file size exceeds limit", + "metadata":{ + "payment_id":null, + "order_id":"order_DBJKIP31Y4jl8" + } + } +} +``` + +#### Error Reasons + +To learn about errors, refer to the FAQ [Upload the NACH File](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/faqs.md) section. + +## 1.2. Using a Registration Link + +Registration Links are an alternate way of creating an authorisation transaction. If you create a registration link, you need not create a customer or an order. + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. The customer can use the invoice to make the Authorisation Payment. + +Know how to [create Registration Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md) using the Dashboard. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use webhooks to get notifications about successful payments against a registration link. Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks). +> + +In the case of Paper NACH, the order amount must be `0`. + +### 1.2.1. Create a Registration Link + +Use the below endpoint to create a registration link for recurring payments. + +/subscription_registration/auth_links + +> **INFO** +> +> +> **Download and Upload the Pre-filled NACH Form** +> +> Once the registration link is created, the customer should complete these steps: +> 1. Download the pre-filled form using the Download NACH Form option on the Razorpay hosted page. +> 1. Sign the form. +> 1. Upload the signed form using the Upload NACH Form option on the Razorpay hosted page. +> + +```cURL: Request +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780" + }, + "amount":0, + "currency":"INR", + "type":"link", + "description":"12 p.m. Meals", + "subscription_registration":{ + "method":"nach", + "auth_type":"physical", + "bank_account":{ + "beneficiary_name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "ifsc_code":"HDFC0001233" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH" + }, + "expire_at":1947483647, + "max_amount":50000 + }, + "receipt":"Receipt No. 1", + "sms_notify":true, + "email_notify":true, + "expire_by":1647483647, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrZiAubEzDdaq", + "entity": "invoice", + "receipt": "Receipt No. 27", + "invoice_number": "Receipt No. 27", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZiBOkWHZPOp", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1647483647, + "issued_at": 1595491154, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491154, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "12 p.m. Meals", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/bzDYbNg", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491154, + "idempotency_key": null, + "token": { + "method": "nach", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 50000, + "auth_type": "physical", + "expire_at": 1947483647, + "nach": { + "create_form": true, + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "prefilled_form": "https://rzp.io/i/exdIzYN", + "upload_form_url": "https://rzp.io/i/bzDYbNg", + "description": "12 p.m. Meals" + }, + "bank_account": { + "ifsc": "HDFC0001233", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9123456780" + }, + "first_payment_amount": 0 + }, + "nach_form_url": "https://rzp.io/i/exdIzYN" +} +``` + +Use the below endpoint to create a registration link for recurring payments. + +/subscription_registration/auth_links + +> **INFO** +> +> +> **Download and Upload the Pre-filled NACH Form** +> +> Once the registration link is created, the customer should complete these steps: +> 1. Download the pre-filled form using the Download NACH Form option on the Razorpay hosted page. +> 1. Sign the form. +> 1. Upload the signed form using the Upload NACH Form option on the Razorpay hosted page. +> + +```cURL: Request +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780" + }, + "amount":0, + "currency":"INR", + "type":"link", + "description":"12 p.m. Meals", + "subscription_registration":{ + "method":"nach", + "auth_type":"physical", + "bank_account":{ + "beneficiary_name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "ifsc_code":"HDFC0001233" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH" + }, + "expire_at":1947483647, + "max_amount":50000 + }, + "receipt":"Receipt No. 1", + "sms_notify":true, + "email_notify":true, + "expire_by":1647483647, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrZiAubEzDdaq", + "entity": "invoice", + "receipt": "Receipt No. 27", + "invoice_number": "Receipt No. 27", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZiBOkWHZPOp", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1647483647, + "issued_at": 1595491154, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491154, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "12 p.m. Meals", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/bzDYbNg", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491154, + "idempotency_key": null, + "token": { + "method": "nach", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 50000, + "auth_type": "physical", + "expire_at": 1947483647, + "nach": { + "create_form": true, + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "prefilled_form": "https://rzp.io/i/exdIzYN", + "upload_form_url": "https://rzp.io/i/bzDYbNg", + "description": "12 p.m. Meals" + }, + "bank_account": { + "ifsc": "HDFC0001233", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9123456780" + }, + "first_payment_amount": 0 + }, + "nach_form_url": "https://rzp.io/i/exdIzYN" +} +``` + +The following endpoint creates a registration link for recurring payments. + +/subscription_registration/auth_links + +```cURL: Curl +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780" + }, + "amount":0, + "currency":"INR", + "type":"link", + "description":"12 p.m. Meals", + "subscription_registration":{ + "method":"nach", + "auth_type":"physical", + "bank_account":{ + "beneficiary_name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "ifsc_code":"HDFC0001233" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH" + }, + "expire_at":1947483647, + "max_amount":50000 + }, + "receipt":"Receipt No. 1", + "sms_notify":true, + "email_notify":true, + "expire_by":1647483647, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 0); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "12 p.m. Meals"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","nach"); +subscriptionRegistration.put("auth_type","physical"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +JSONObject nach = new JSONObject(); +nach.put("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.put("form_reference2","Method Paper NACH"); +subscriptionRegistration.put("bank_account",bankAccount); +subscriptionRegistration.put("nach",nach); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. #27"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'amount'=>100, 'type'=>'link','currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('first_payment_amount'=>100, 'method'=>'nach', 'auth_type'=>'physical' ,'max_amount'=>'50000','expire_at'=>'1634215992','bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233'), 'nach'=> array('form_reference1'=> 'Recurring Payment for Gaurav Kumar','form_reference2'=> 'Method Paper NACH')),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992, 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Tea. Earl Gray. Hot.')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + amount: 100, + type: "link", + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + first_payment_amount: 100, + method: "nach", + auth_type: "physical", + max_amount: 50000, + expire_at: 1634215992, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "11214311215411", + account_type: "savings", + ifsc_code: "HDFC0001233" + }, + nach: { + form_reference1: "Recurring Payment for Gaurav Kumar", + form_reference2: "Method Paper NACH" + } + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":9123456780 + }, + "amount":100, + "type":"link", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":{ + "first_payment_amount":100, + "method":"nach", + "auth_type":"physical", + "max_amount":50000, + "expire_at":1634215992, + "bank_account":{ + "beneficiary_name":"Gaurav Kumar", + "account_number":11214311215411, + "account_type":"savings", + "ifsc_code":"HDFC0001233" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH" + } + }, + "receipt":"Receipt No. 5", + "email_notify": True, + "sms_notify":True, + "expire_by":1634215992, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "amount": 100, + "type": "link", + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "first_payment_amount": 100, + "method": "nach", + "auth_type": "physical", + "max_amount": 50000, + "expire_at": 1634215992, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + }, + "nach": { + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH" + } + }, + "receipt": "Receipt No. 27", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::SubscriptionRegistration.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer":map[string]interface{}{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + }, + "amount":0, + "currency":"INR", + "type":"link", + "description":"12 p.m. Meals", + "subscription_registration":map[string]interface{}{ + "method":"nach", + "auth_type":"physical", + "bank_account":map[string]interface{}{ + "beneficiary_name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "ifsc_code":"HDFC0001233", + }, + "nach":map[string]interface{}{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + }, + "expire_at":1947483647, + "max_amount":50000, + }, + "receipt":"Receipt No. 1", + "sms_notify":true, + "email_notify":true, + "expire_by":1647483647, + "notes":map[string]interface{}{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot.", + }, +} + +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary registrationLinkRequest = new Dictionary(); +Dictionary customer = new Dictionary(); +customer.Add("name","Gaurav Kumar"); +customer.Add("email","gaurav.kumar@example.com"); +customer.Add("contact","9123456780"); +registrationLinkRequest.Add("customer", customer); +registrationLinkRequest.Add("type", "link"); +registrationLinkRequest.Add("amount", 0); +registrationLinkRequest.Add("currency", "INR"); +registrationLinkRequest.Add("description", "12 p.m. Meals"); +Dictionary subscriptionRegistration = new Dictionary(); +subscriptionRegistration.Add("method","nach"); +subscriptionRegistration.Add("auth_type","physical"); +subscriptionRegistration.Add("max_amount",50000); +subscriptionRegistration.Add("expire_at",1609423824); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +Dictionary nach = new Dictionary(); +nach.Add("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.Add("form_reference2","Method Paper NACH"); +subscriptionRegistration.Add("bank_account",bankAccount); +subscriptionRegistration.Add("nach",nach); +registrationLinkRequest.Add("subscription_registration", subscriptionRegistration); +registrationLinkRequest.Add("receipt", "Receipt No. #111"); +registrationLinkRequest.Add("email_notify", true); +registrationLinkRequest.Add("sms_notify", true); +registrationLinkRequest.Add("expire_by", 1580479824); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.Add("notes", notes); + +Invoice invoice = client.Invoice.CreateRegistrationLink(registrationLinkRequest); + +```json: Response +{ + "id": "inv_FHrZiAubEzDdaq", + "entity": "invoice", + "receipt": "Receipt No. 27", + "invoice_number": "Receipt No. 27", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZiBOkWHZPOp", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1647483647, + "issued_at": 1595491154, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491154, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "12 p.m. Meals", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/bzDYbNg", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491154, + "idempotency_key": null, + "token": { + "method": "nach", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 50000, + "auth_type": "physical", + "expire_at": 1947483647, + "nach": { + "create_form": true, + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "prefilled_form": "https://rzp.io/i/exdIzYN", + "upload_form_url": "https://rzp.io/i/bzDYbNg", + "description": "12 p.m. Meals" + }, + "bank_account": { + "ifsc": "HDFC0001233", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9123456780" + }, + "first_payment_amount": 0 + }, + "nach_form_url": "https://rzp.io/i/exdIzYN" +} +``` + +> **INFO** +> +> +> **Download and Upload the Pre-filled NACH Form** +> +> Once the registration link is created, the customer should complete these steps: +> 1. Download the pre-filled form using the Download NACH Form option on the Razorpay hosted page. +> 2. Sign the form. +> 3. Upload the signed form using the Upload NACH Form option on the Razorpay hosted page. +> + +#### Request Parameters + +`customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. +`subscription_registration` +: Details of the authorisation payment. + +`subscription_registration` +: Details of the authorisation payment. + + `method` _mandatory_ + : `string` The Paper NACH method used to make the authorisation transaction. Here, it is `physical`. + + `auth_type` _mandatory_ + : `string` The payment method used to make the authorisation transaction. Here, it is `nach`. + + `bank_account` + : The customer's bank account details. + + `beneficiary_name` _mandatory_ + : `string` The beneficiary name. For example, `Gaurav Kumar`. + + `account_number` _mandatory_ + : `integer` The customer's bank account number. For example, `11214311215411`. + + `account_type` _mandatory_ + : `string` The customer's bank account type. Possible values: + - `savings` + - `current` + + `ifsc_code` _mandatory_ + : `string` The customer's bank IFSC. For example, `HDFC0000001`. + + `max_amount` _optional_ + : `integer` Use to set the maximum amount, in paise, per debit request. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/faqs.md#3-is-there-a-limit-on-the-debit). + + `expire_at` _optional_ + : `integer` The Unix timestamp till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. The default value is 10 years. The value can range from the current date to 31-12-2099 (`4101580799`). + + `nach` + : Additional information to be printed on the NACH form your customer will sign. + + `form_reference1` _optional_ + : `string` A user entered reference that appears on the NACH form. + + `form_reference2` _optional_ + : `string` A user entered reference that appears on the NACH form. + + `description` _optional_ + : `string` A user entered description that appears on the hosted page. For example, `Form for Gaurav Kumar.` + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + +#### Path Parameters + +`id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +```cURL: Curl +curl -u : +-X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String invoiceId = "inv_1Aa00000000001"; + +Invoice invoice = razorpay.invoices.cancel(invoiceId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->invoice->fetch($invoiceId)->cancel(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.invoices.cancel(invoiceId); +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.invoice.cancel(invoiceId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +invoiceId = "inv_1Aa00000000001" + +Razorpay::Invoice.cancel(invoiceId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Invoice.Cancel("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string invoiceId = "inv_DAweOiQ7amIUVd"; + +Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + +```json: Response +{ + "id": "inv_FHrZiAubEzDdaq", + "entity": "invoice", + "receipt": "Receipt No. 27", + "invoice_number": "Receipt No. 27", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZiBOkWHZPOp", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 1647483647, + "issued_at": 1595491154, + "paid_at": null, + "cancelled_at": 1595491339, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491154, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "12 p.m. Meals", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/bzDYbNg", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491154, + "idempotency_key": null, + "token": { + "method": "nach", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 50000, + "auth_type": "physical", + "expire_at": 1947483647, + "nach": { + "create_form": true, + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "prefilled_form": "https://rzp.io/i/tSYd5aV", + "upload_form_url": "https://rzp.io/i/bzDYbNg", + "description": "12 p.m. Meals" + }, + "bank_account": { + "ifsc": "HDFC0001233", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9123456780" + }, + "first_payment_amount": 0 + }, + "nach_form_url": "https://rzp.io/i/tSYd5aV" +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> You can only cancel the registration link that is in the `issued` state. +> + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/paper-nach/auto-debit.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/paper-nach/auto-debit.md new file mode 100644 index 00000000..2360e62e --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/paper-nach/auto-debit.md @@ -0,0 +1,2067 @@ +--- +title: Register NACH and Charge First Payment Together +description: Register a customer's mandate and charge them the first recurring payment as part of the same transaction via paper NACH. +--- + +# Register NACH and Charge First Payment Together + +The flow to complete an authorisation transaction using paper NACH differs from the other payment method's flow. +1. Create a customer. +2. Create an order by passing the `customer_id` and the method as `nach`. Razorpay generates a NACH form with the customer information pre-filled and ready to sign. +3. The customer can get the form in one of the following ways to sign it: + - You can download the form from the Dashboard and send it to the customer. + - A customer can download the form from the Hosted page (in the case of registration links). +4. The signed form can be uploaded in one of the following ways: + - Using the Standard Checkout page. + - Hosted page (in the case of registration links). + - The customer can send you the form and you can upload the form for the customer. The acceptable image formats and size are: + - jpeg + - jpg + - png + - Maximum accepted size is 6 MB. + +Once the details are validated, the authorisation transaction is completed and a token is generated. You can charge your customer as per your business model after the token status changes to `confirmed`. + +## 1. Create an Authorisation Transaction + +You can create an authorisation transaction using the [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +### 1.1. Using Razorpay APIs + +To create an authorisation transaction using the Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorisation-payment). + +#### 1.1.1. Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + +##### Request Parameters + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### 1.1.2. Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +```cURL: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":0, + "currency":"INR", + "method":"nach", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token":{ + "first_payment_amount": 10000, + "auth_type":"physical", + "max_amount":10000000, + "expire_at":1580480689, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account":{ + "account_number":"11214311215411", + "ifsc_code":"HDFC0000001", + "beneficiary_name":"Gaurav Kumar", + "account_type":"savings" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "description":"Paper NACH Gaurav Kumar" + } + } +}' + +```json: Response +{ + "id":"order_1Aa00000000001", + "entity":"order", + "amount":0, + "amount_paid":0, + "amount_due":0, + "currency":"INR", + "receipt":"rcptid #10", + "offer_id":null, + "offers":{ + "entity":"collection", + "count":0, + "items":[] + }, + "status":"created", + "attempts":0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at":1579775420, + "token":{ + "method":"nach", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status":null, + "failure_reason":null, + "currency":"INR", + "max_amount":10000000, + "auth_type":"physical", + "expire_at":1580480689, + "nach":{ + "create_form":true, + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + "prefilled_form":"https://rzp.io/i/bitw", + "upload_form_url":"https://rzp.io/i/gts", + "description":"Paper NACH Gaurav Kumar" + }, + "bank_account":{ + "ifsc":"HDFC0000001", + "bank_name":"HDFC Bank", + "name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "beneficiary_email":"gaurav.kumar@example.com", + "beneficiary_mobile":"9876543210" + }, + "first_payment_amount":10000 + } +} +``` + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + +##### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For Paper NACH, the amount has to be `0`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`method` _mandatory_ +: `string` The authorisation method. In this case the value will be `nach`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer, who is to be charged. For example, `cust_D0cs04OIpPPU1F`. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `rcptid #1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: Details related to the authorisation transaction such as max amount and bank account information. Pass a value in the `first_payment_amount` parameter if you want to auto-charge the customer the first payment immediately after authorization. + + `first_payment_amount` _optional_ + : `integer` The amount, in paise, that should be auto-charged in addition to the authorization amount. For example, `100000`. + +`auth_type` _mandatory_ + : `string` In this case, it will be `physical`. + + `bank_account` + : Customer's bank account details that will be printed on the NACH form. + + `account_number`_mandatory_ + : `string` Customer's bank account number. For example `11214311215411`. + + `ifsc_code`_mandatory_ + : `string` Customer's bank IFSC. For example `UTIB0000001`. + + `beneficiary_name`_mandatory_ + : `string` Customer's name. For example, `Gaurav Kumar`. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + - `cc` (Cash Credit) + - `nre` (SB-NRE) + - `nro` (SB-NRO) + + `max_amount` _optional_ + : `integer` Use to set the maximum amount per debit request. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/faqs.md#3-is-there-a-limit-on-the-debit). + + `expire_at` _optional_ + : `integer` Timestamp, in Unix, that specifies when the registration link should expire. The value can range from the current date to 01-19-2038 (`2147483647`). + + `nach` + : Additional information to be printed on the NACH form that your customer will sign. + + `form_reference1` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `form_reference2` _optional_ + : `string` A user-entered reference that appears on the NACH form. + + `description` _optional_ + : `string` A user-entered description that appears on the hosted page. For example, `Form for Gaurav Kumar.` + + `notes`_optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### 1.1.3. Create an Authorisation Payment + +After you create an order, you have to create an authorisation payment. To create an authorisation payment: + +1. Download the Paper NACH form and send it to the customers. +1. Ask the customers to fill the form and send it to you. +1. You upload the received form via the create NACH File API. The acceptable image formats and size are jpeg, jpg and png. Maximum accepted size is 6 MB. + +Use the below endpoint to upload the signed Paper NACH form via APIs. + +/payments/create/nach/file + +Razorpay's OCR-enabled NACH engine submits the form to NPCI on successful verification and you will receive a success/failure response. + +Use the following API to upload the NACH file sent by the customer. + +```cURL: Request +curl -u : \ +-X POST 'https://api.razorpay.com/v1/payments/create/nach/file' \ +-H "Content-Type: multipart/form-data" \ +-F 'order_id=order_FoLdZrq6QGKUWg' \ +-F 'recurring=1' \ +-F 'file=@/Users/your_name/sample_uploaded.jpeg' // file path +``` + +```json: Successful Response +{ + "razorpay_payment_id": "pay_FjDn43bvssCqEM", + "razorpay_order_id": "order_FjDdQ6a0GluJ2c", + "razorpay_signature": "f13775ea8a91e9bf229b9fdba3ad783f7ff2bdbce1c35e87a69ae7418808da04" +} +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"file size exceeds limit", + "field":null, + "source":"customer", + "step":"form_upload", + "reason":"file size exceeds limit", + "metadata":{ + "payment_id":null, + "order_id":"order_DBJKIP31Y4jl8" + } + } +} +``` + +### 1.2. Using a Registration Link + +Registration Links are an alternate way of creating an authorisation transaction. If you create a registration link, you need not create a customer or an order. + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. The customer can use the invoice to make the Authorisation Payment. + +Know how to [create Registration Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md) using the Dashboard. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use webhooks to get notifications about successful payments against a registration link. Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks). +> + +A registration link must always have an amount (in paise) that the customer will be charged when making the authorisation payment. In the case of Paper NACH, the order amount must be `0`. + +#### 1.2.1. Create a Registration Link + +Use the below endpoint to create a registration link for recurring payments. + +/subscription_registration/auth_links + +> **INFO** +> +> +> **Download and Upload the Pre-filled NACH Form** +> +> Once the registration link is created, the customer should complete these steps: +> 1. Download the pre-filled form using the Download NACH Form option on the Razorpay hosted page. +> 1. Sign the form. +> 1. Upload the signed form using the Upload NACH Form option on the Razorpay hosted page. +> + +```cURL: Request +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780" + }, + "amount":0, + "currency":"INR", + "type":"link", + "description":"12 p.m. Meals", + "subscription_registration":{ + "method":"nach", + "auth_type":"physical", + "bank_account":{ + "beneficiary_name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "ifsc_code":"HDFC0001233" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH" + }, + "expire_at":1947483647, + "max_amount":50000 + }, + "receipt":"Receipt No. 1", + "sms_notify":true, + "email_notify":true, + "expire_by":1647483647, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrZiAubEzDdaq", + "entity": "invoice", + "receipt": "Receipt No. 27", + "invoice_number": "Receipt No. 27", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZiBOkWHZPOp", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1647483647, + "issued_at": 1595491154, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491154, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "12 p.m. Meals", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/bzDYbNg", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491154, + "idempotency_key": null, + "token": { + "method": "nach", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 50000, + "auth_type": "physical", + "expire_at": 1947483647, + "nach": { + "create_form": true, + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "prefilled_form": "https://rzp.io/i/exdIzYN", + "upload_form_url": "https://rzp.io/i/bzDYbNg", + "description": "12 p.m. Meals" + }, + "bank_account": { + "ifsc": "HDFC0001233", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9123456780" + }, + "first_payment_amount": 0 + }, + "nach_form_url": "https://rzp.io/i/exdIzYN" +} +``` + +The following endpoint creates a registration link for recurring payments. + +/subscription_registration/auth_links + +```cURL: Curl +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780" + }, + "amount":0, + "currency":"INR", + "type":"link", + "description":"12 p.m. Meals", + "subscription_registration":{ + "method":"nach", + "auth_type":"physical", + "bank_account":{ + "beneficiary_name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "ifsc_code":"HDFC0001233" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH" + }, + "expire_at":1947483647, + "max_amount":50000 + }, + "receipt":"Receipt No. 1", + "sms_notify":true, + "email_notify":true, + "expire_by":1647483647, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 0); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "12 p.m. Meals"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","nach"); +subscriptionRegistration.put("auth_type","physical"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +JSONObject bankAccount = new JSONObject(); +bankAccount.put("beneficiary_name","Gaurav Kumar"); +bankAccount.put("account_number","11214311215411"); +bankAccount.put("account_type","savings"); +bankAccount.put("ifsc_code","HDFC0001233"); +JSONObject nach = new JSONObject(); +nach.put("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.put("form_reference2","Method Paper NACH"); +subscriptionRegistration.put("bank_account",bankAccount); +subscriptionRegistration.put("nach",nach); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. #27"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'amount'=>100, 'type'=>'link','currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('first_payment_amount'=>100, 'method'=>'nach', 'auth_type'=>'physical' ,'max_amount'=>'50000','expire_at'=>'1634215992','bank_account'=>array('beneficiary_name'=>'Gaurav Kumar', 'account_number'=>'11214311215411', 'account_type'=>'savings', 'ifsc_code'=>'HDFC0001233'), 'nach'=> array('form_reference1'=> 'Recurring Payment for Gaurav Kumar','form_reference2'=> 'Method Paper NACH')),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992, 'notes'=> array('note_key 1'=> 'Beam me up Scotty','note_key 2'=> 'Tea. Earl Gray. Hot.')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + amount: 100, + type: "link", + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + first_payment_amount: 100, + method: "nach", + auth_type: "physical", + max_amount: 50000, + expire_at: 1634215992, + bank_account: { + beneficiary_name: "Gaurav Kumar", + account_number: "11214311215411", + account_type: "savings", + ifsc_code: "HDFC0001233" + }, + nach: { + form_reference1: "Recurring Payment for Gaurav Kumar", + form_reference2: "Method Paper NACH" + } + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":9123456780 + }, + "amount":100, + "type":"link", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":{ + "first_payment_amount":100, + "method":"nach", + "auth_type":"physical", + "max_amount":50000, + "expire_at":1634215992, + "bank_account":{ + "beneficiary_name":"Gaurav Kumar", + "account_number":11214311215411, + "account_type":"savings", + "ifsc_code":"HDFC0001233" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH" + } + }, + "receipt":"Receipt No. 5", + "email_notify": True, + "sms_notify":True, + "expire_by":1634215992, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "amount": 100, + "type": "link", + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "first_payment_amount": 100, + "method": "nach", + "auth_type": "physical", + "max_amount": 50000, + "expire_at": 1634215992, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": 11214311215411, + "account_type": "savings", + "ifsc_code": "HDFC0001233" + }, + "nach": { + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH" + } + }, + "receipt": "Receipt No. 27", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::SubscriptionRegistration.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer":map[string]interface{}{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + }, + "amount":0, + "currency":"INR", + "type":"link", + "description":"12 p.m. Meals", + "subscription_registration":map[string]interface{}{ + "method":"nach", + "auth_type":"physical", + "bank_account":map[string]interface{}{ + "beneficiary_name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "ifsc_code":"HDFC0001233", + }, + "nach":map[string]interface{}{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH", + }, + "expire_at":1947483647, + "max_amount":50000, + }, + "receipt":"Receipt No. 1", + "sms_notify":true, + "email_notify":true, + "expire_by":1647483647, + "notes":map[string]interface{}{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot.", + }, +} + +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary registrationLinkRequest = new Dictionary(); +Dictionary customer = new Dictionary(); +customer.Add("name","Gaurav Kumar"); +customer.Add("email","gaurav.kumar@example.com"); +customer.Add("contact","9123456780"); +registrationLinkRequest.Add("customer", customer); +registrationLinkRequest.Add("type", "link"); +registrationLinkRequest.Add("amount", 0); +registrationLinkRequest.Add("currency", "INR"); +registrationLinkRequest.Add("description", "12 p.m. Meals"); +Dictionary subscriptionRegistration = new Dictionary(); +subscriptionRegistration.Add("method","nach"); +subscriptionRegistration.Add("auth_type","physical"); +subscriptionRegistration.Add("max_amount",50000); +subscriptionRegistration.Add("expire_at",1609423824); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("beneficiary_name","Gaurav Kumar"); +bankAccount.Add("account_number","11214311215411"); +bankAccount.Add("account_type","savings"); +bankAccount.Add("ifsc_code","HDFC0001233"); +Dictionary nach = new Dictionary(); +nach.Add("form_reference1","Recurring Payment for Gaurav Kumar"); +nach.Add("form_reference2","Method Paper NACH"); +subscriptionRegistration.Add("bank_account",bankAccount); +subscriptionRegistration.Add("nach",nach); +registrationLinkRequest.Add("subscription_registration", subscriptionRegistration); +registrationLinkRequest.Add("receipt", "Receipt No. #111"); +registrationLinkRequest.Add("email_notify", true); +registrationLinkRequest.Add("sms_notify", true); +registrationLinkRequest.Add("expire_by", 1580479824); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1","Tea, Earl Grey, Hot"); +notes.Add("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.Add("notes", notes); + +Invoice invoice = client.Invoice.CreateRegistrationLink(registrationLinkRequest); + +```json: Response +{ + "id": "inv_FHrZiAubEzDdaq", + "entity": "invoice", + "receipt": "Receipt No. 27", + "invoice_number": "Receipt No. 27", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZiBOkWHZPOp", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1647483647, + "issued_at": 1595491154, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491154, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "12 p.m. Meals", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/bzDYbNg", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491154, + "idempotency_key": null, + "token": { + "method": "nach", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 50000, + "auth_type": "physical", + "expire_at": 1947483647, + "nach": { + "create_form": true, + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "prefilled_form": "https://rzp.io/i/exdIzYN", + "upload_form_url": "https://rzp.io/i/bzDYbNg", + "description": "12 p.m. Meals" + }, + "bank_account": { + "ifsc": "HDFC0001233", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9123456780" + }, + "first_payment_amount": 0 + }, + "nach_form_url": "https://rzp.io/i/exdIzYN" +} +``` + +> **INFO** +> +> +> **Download and Upload the Pre-filled NACH Form** +> +> Once the registration link is created, the customer should complete these steps: +> 1. Download the pre-filled form using the Download NACH Form option on the Razorpay hosted page. +> 2. Sign the form. +> 3. Upload the signed form using the Upload NACH Form option on the Razorpay hosted page. +> + +```cURL: Request +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780" + }, + "amount":0, + "currency":"INR", + "type":"link", + "description":"12 p.m. Meals", + "subscription_registration":{ + "first_payment_amount": 10000, + "method":"nach", + "auth_type":"physical", + "bank_account":{ + "beneficiary_name":"Gaurav Kumar", + "account_number":"11214311215411", + "account_type":"savings", + "ifsc_code":"HDFC0001233" + }, + "nach":{ + "form_reference1":"Recurring Payment for Gaurav Kumar", + "form_reference2":"Method Paper NACH" + }, + "expire_at":1947483647, + "max_amount":50000 + }, + "receipt":"Receipt No. 27", + "sms_notify":true, + "email_notify":true, + "expire_by":1647483647, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' + +```json: Response +{ + "id": "inv_FHrZiAubEzDdaq", + "entity": "invoice", + "receipt": "Receipt No. 27", + "invoice_number": "Receipt No. 27", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrZiBOkWHZPOp", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1647483647, + "issued_at": 1595491154, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491154, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "12 p.m. Meals", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/bzDYbNg", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491154, + "idempotency_key": null, + "token": { + "method": "nach", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 50000, + "auth_type": "physical", + "expire_at": 1947483647, + "nach": { + "create_form": true, + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "prefilled_form": "https://rzp.io/i/exdIzYN", + "upload_form_url": "https://rzp.io/i/bzDYbNg", + "description": "12 p.m. Meals" + }, + "bank_account": { + "ifsc": "HDFC0001233", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9123456780" + }, + "first_payment_amount": 0 + }, + "nach_form_url": "https://rzp.io/i/exdIzYN" +} +``` + +##### Request Parameters + +`customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + +`subscription_registration` +: Details of the authorisation payment. + + `first_payment_amount` _optional_ + : `integer` The amount, in paise, the customer should be auto-charged in addition to the authorization amount. For example, `100000`. + +`subscription_registration` +: Details of the authorisation payment. + + `method` _mandatory_ + : `string` The Paper NACH method used to make the authorisation transaction. Here, it is `physical`. + + `auth_type` _mandatory_ + : `string` The payment method used to make the authorisation transaction. Here, it is `nach`. + + `bank_account` + : The customer's bank account details. + + `beneficiary_name` _mandatory_ + : `string` The beneficiary name. For example, `Gaurav Kumar`. + + `account_number` _mandatory_ + : `integer` The customer's bank account number. For example, `11214311215411`. + + `account_type` _mandatory_ + : `string` The customer's bank account type. Possible values: + - `savings` + - `current` + + `ifsc_code` _mandatory_ + : `string` The customer's bank IFSC. For example, `HDFC0000001`. + + `max_amount` _optional_ + : `integer` Use to set the maximum amount, in paise, per debit request. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/faqs.md#3-is-there-a-limit-on-the-debit). + + `expire_at` _optional_ + : `integer` The Unix timestamp till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. The default value is 10 years. The value can range from the current date to 31-12-2099 (`4101580799`). + + `nach` + : Additional information to be printed on the NACH form your customer will sign. + + `form_reference1` _optional_ + : `string` A user entered reference that appears on the NACH form. + + `form_reference2` _optional_ + : `string` A user entered reference that appears on the NACH form. + + `description` _optional_ + : `string` A user entered description that appears on the hosted page. For example, `Form for Gaurav Kumar.` + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + +##### Path Parameters + +`id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +#### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +```cURL: Curl +curl -u : +-X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String invoiceId = "inv_1Aa00000000001"; + +Invoice invoice = razorpay.invoices.cancel(invoiceId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->invoice->fetch($invoiceId)->cancel(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.invoices.cancel(invoiceId); +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.invoice.cancel(invoiceId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +invoiceId = "inv_JDdNb4xdf4gxQ7" + +Razorpay::Invoice.cancel(invoiceId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Invoice.Cancel("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string invoiceId = "inv_DAweOiQ7amIUVd"; + +Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + +```json: Response +{ + "amount": 0, + "amount_due": 0, + "amount_paid": 0, + "auth_link_status": "cancelled", + "billing_end": null, + "billing_start": null, + "cancelled_at": 1661428198, + "comment": null, + "created_at": 1661424249, + "currency": "INR", + "currency_symbol": "₹", + "customer_details": { + "billing_address": null, + "contact": "9023456780", + "customer_contact": "9023456780", + "customer_email": "gaurav.kumar1@example.com", + "customer_name": "Gaurav Kumar", + "email": "gaurav.kumar1@example.com", + "gstin": null, + "id": "cust_K9pyoGi6vDUMgM", + "name": "Gaurav Kumar", + "shipping_address": null + }, + "customer_id": "cust_K9pyoGi6vDUMgM", + "date": 1661424248, + "description": "salsa", + "email_status": "sent", + "entity": "invoice", + "expire_by": 1947483647, + "expired_at": null, + "first_payment_min_amount": null, + "gross_amount": 0, + "group_taxes_discounts": false, + "id": "inv_K9pyoiihbl98jD", + "idempotency_key": null, + "invoice_number": "trtrtr1", + "issued_at": 1661424248, + "line_items": [], + "nach_form_url": "https://rzp.io/i/Ui2gOJOom", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "order_id": "order_K9pypNRrcL4bij", + "paid_at": null, + "partial_payment": false, + "payment_id": null, + "receipt": "trtrtr1", + "reminder_status": null, + "short_url": "https://rzp.io/i/WNa96WB", + "sms_status": "sent", + "status": "cancelled", + "subscription_status": null, + "supply_state_code": null, + "tax_amount": 0, + "taxable_amount": 0, + "terms": null, + "token": { + "auth_type": "physical", + "bank_account": { + "account_number": "11214311215411", + "account_type": "savings", + "bank_name": "HDFC Bank", + "beneficiary_email": "gaurav.kumar1@example.com", + "beneficiary_mobile": "9023456780", + "ifsc": "HDFC0001233", + "name": "Gaurav Kumar" + }, + "currency": "INR", + "expire_at": 1947483647, + "failure_reason": null, + "first_payment_amount": 0, + "max_amount": 50000, + "method": "nach", + "nach": { + "create_form": true, + "description": "salsa", + "form_reference1": "Recurring Payment for Gaurav Kumar", + "form_reference2": "Method Paper NACH", + "prefilled_form": "https://rzp.io/i/WYAUISM64", + "prefilled_form_transient": "https://rzp.io/i/Ui2gOJOom", + "upload_form_url": "https://rzp.io/i/WNa96WB" + }, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "recurring_status": null + }, + "type": "link", + "user_id": null, + "view_less": true +} + +``` + +##### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. + +## 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +### 2.1. Fetch Token by Payment ID + +Use the below endpoint to fetch the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000003 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_SECRET}" + +String paymentId = "pay_1Aa00000000003"; + +Payment payment = razorpay.payments.fetch(paymentId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_1Aa00000000003" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.Fetch(paymentId); + +```json: Response +{ + "id": "pay_EnLNTjINiPkMEZ", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_EnLLfglmKksr4K", + "invoice_id": "inv_EnLLfgCzRfcMuh", + "international": false, + "method": "nach", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_EnLLfgCzRfcMuh", + "card_id": null, + "bank": "UTIB", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EnLNTnn7uyRg5V", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1588827564 +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +### 2.2. Fetch Tokens by Customer ID + +Use the below endpoint to fetch tokens linked to a customer. + +A customer can have multiple tokens tied to them. These tokens can be used to create subsequent payments for multiple products or services. + +> **WARN** +> +> +> **Watch Out!** +> +> This endpoint will not fetch the details of expired and unused tokens. +> + +/customers/:id/tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000004"; + +Customer customer = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetchTokens(customerId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_EhYgIE3pOyMQpD", + "entity": "token", + "token": "3mQ5Czc6APNppI", + "bank": "HDFC", + "wallet": null, + "method": "nach", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "physical", + "mrn": null, + "used_at": 1587564373, + "created_at": 1587564373, + "dcc_enabled": false + } + ] +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +### 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + +#### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + +## 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +### 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/paper-nach/subsequent-payments.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/paper-nach/subsequent-payments.md new file mode 100644 index 00000000..9a90e257 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/paper-nach/subsequent-payments.md @@ -0,0 +1,374 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +## 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/paper-nach/tokens.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/paper-nach/tokens.md new file mode 100644 index 00000000..6a29cc35 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/paper-nach/tokens.md @@ -0,0 +1,389 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +## 2.1 Fetch Payment ID using Order ID. + +After you send the registration link, You should wait for the customer to make the payment. You can check the status of the payment using our APIs. The following endpoint fetches the `payment_id` using an `order_id`. + +/orders/:id/payments + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/orders/order_1Aa00000000003/payments + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String orderId = "order_1Aa00000000003"; + +Order order = razorpay.orders.fetchPayments(orderId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->fetch($orderId)->payments() +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.fetchPayments(orderId) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.payment(orderId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +orderId = "order_1Aa00000000003" + +Razorpay::Order.fetch("order_1Aa00000000003").payments + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Order.Payments("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string orderId = "order_Z6t7VFTb9xHeOs"; + +List order = client.Order.Fetch(orderId).Payments(); + +```json: Response +{ + "entity":"collection", + "count":1, + "items":[ + { + "id":"pay_1Aa00000000003", + "entity":"payment", + "amount":0, + "currency":"INR", + "status":"captured", + "order_id":"order_1Aa00000000003", + "invoice_id":"inv_1Aa00000000003", + "international":false, + "method":"nach", + "amount_refunded":0, + "refund_status":null, + "captured":true, + "description":"12 p.m. Meals", + "card_id":null, + "bank":"HDFC", + "wallet":null, + "vpa":null, + "email":"gaurav.kumar@example.com", + "contact":"99876543210", + "customer_id":"cust_1Aa00000000002", + "token_id":"token_1Aa00000000003", + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + }, + "fee":0, + "tax":0, + "error_code":null, + "error_description":null, + "created_at":1580109147 + } + ] +} +``` + +### Path Parameter + +`id` +: `string` The unique identifier of the order. For example, `order_1Aa00000000001`. + +## 2.2. Fetch Token by Payment ID + +Use the below endpoint to fetch the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000003 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_SECRET}" + +String paymentId = "pay_1Aa00000000003"; + +Payment payment = razorpay.payments.fetch(paymentId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_1Aa00000000003" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.Fetch(paymentId); + +```json: Response +{ + "id": "pay_EnLNTjINiPkMEZ", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_EnLLfglmKksr4K", + "invoice_id": "inv_EnLLfgCzRfcMuh", + "international": false, + "method": "nach", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_EnLLfgCzRfcMuh", + "card_id": null, + "bank": "UTIB", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EnLNTnn7uyRg5V", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1588827564 +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +## 2.3. Fetch Tokens by Customer ID + +Use the below endpoint to fetch tokens linked to a customer. + +A customer can have multiple tokens tied to them. These tokens can be used to create subsequent payments for multiple products or services. + +> **WARN** +> +> +> **Watch Out!** +> +> This endpoint will not fetch the details of expired and unused tokens. +> + +/customers/:id/tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000004"; + +Customer customer = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetchTokens(customerId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_EhYgIE3pOyMQpD", + "entity": "token", + "token": "3mQ5Czc6APNppI", + "bank": "HDFC", + "wallet": null, + "method": "nach", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "physical", + "mrn": null, + "used_at": 1587564373, + "created_at": 1587564373, + "dcc_enabled": false + } + ] +} +``` + +### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +## 2.4. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + +### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/postman-collection.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/postman-collection.md new file mode 100644 index 00000000..86c28d6c --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/postman-collection.md @@ -0,0 +1,21 @@ +--- +title: Postman Collection +description: Download the Postman collection for Razorpay Recurring Payments. +--- + +# Postman Collection + +We have a Postman collection to make the integration quicker and easier. Click the **Download Postman Collection** button below to get started. + +Download Postman Collection + +## Instructions to Use Postman Collection + +- All Razorpay APIs are authorized using Basic Authorization. + - [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + - Add your API Keys in Postman. Select the required API → Auth → Type = Basic Auth → Username = ``; Password = `` + ![](/docs/assets/images/api-postman_basic_auth.gif) +- Some APIs in the collection require data specific to your account, such as `order_id`, `cust_id` and `token_id` either in the request body or as a path parameter. + - For example, the create order API requires you to add the `cust_id` (Customer ID) in the request body. + - These parameters are enclosed in \{\} in the collection. For example, \{cust_id\}. + - The API throws an error if these are incorrect or do not exist in your system. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-intent/authorization-transaction.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-intent/authorization-transaction.md new file mode 100644 index 00000000..d074b8b6 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-intent/authorization-transaction.md @@ -0,0 +1,1125 @@ +--- +title: 1. Create an Authorisation Transaction +description: Create an authorisation transaction for UPI using Razorpay APIs and Registration Link. +--- + +# 1. Create an Authorisation Transaction + +You can create an authorisation transaction using the [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +## 1.1 Using Razorpay APIs + +To create an authorisation transaction using the Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +1. [Create an Order](#112-create-an-order). +1. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorization-payment). + +### 1.1.1 Create a Customer + +Razorpay links recurring tokens to customers via a unique identifier. You can generate the unique identifier for a customer using the Customer API. + +You can create a customer using the below endpoint. + +/customers + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name","Gaurav Kumar"); +customerRequest.put("contact","9123456780"); +customerRequest.put("email","gaurav.kumar@example.com"); +customerRequest.put("gstin","29XAbbA4369J1PA"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + 'name': 'Gaurav Kumar', + 'email': 'gaurav.kumar@example.com', + 'contact': '9123456780', + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->create(array('name' => 'Gaurav Kumar', 'email' => 'gaurav.kumar@example.com','contact'=>'9123456780','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", "Gaurav Kumar"); +options.Add("contact", "9123456780"); +options.Add("email", "gaurav.kumar@example.com"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "name": "Gaurav Kumar", + "contact": 9123456780, + "email": "gaurav.kumar@example.com", + "gstin": "29XAbbA4369J1PA", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Customer.create(para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({ + name: "Gaurav Kumar", + contact: 9123456780, + email: "gaurav.kumar@example.com", + gstin: "29XAbbA4369J1PA", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +```json: Response +{ + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 +} +``` + +Once you create a customer, you can create an order for the authorization of the payment. + + +### Request Parameters + + `name` _mandatory_ +: `string` The customer's name. For example, `Gaurav Kumar`. + +`email ` _optional_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact ` _optional_ +: `string` The customer's phone number. For example, `9876543210`. + +`notes` _optional_ +: `object` Key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + +### 1.1.2 Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + + +### Sample Code + + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "customer_id": "cust_4xbQrmEoA5WJ01", + "method": "upi", + "token": { + "max_amount": 200000, + "expire_at": 2709971120, + "frequency": "monthly" + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 100); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_4xbQrmEoA5WJ01"); +orderRequest.put("method", "upi"); +orderRequest.put("receipt", "receipt#1"); +JSONObject token = new JSONObject(); +token.put("max_amount","200000"); +token.put("expire_at","2709971120"); +token.put("frequency","monthly"); +orderRequest.put("token", token); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','method' => 'upi','customer_id' => 'cust_4xbQrmEoA5WJ01', 'token' => array('max_amount' => 200000, 'expire_at' => 2709971120, 'frequency' => 'monthly'),'receipt' => 'Receipt No. 1' ,'notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + method: "upi", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "netbanking", + max_amount: 9999900, + expire_at: 4102444799, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount":0, + "currency":"INR", + "method":"upi", + "customer_id":"cust_1Aa00000000001", + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Beam me up Scotty", + "notes_key_2":"Engage" + }, + "token":{ + "auth_type":"netbanking", + "max_amount":9999900, + "expire_at":4102444799, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 0, + "currency": "INR", + "method": "upi", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } +} +Razorpay.Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount":100, + "currency":"INR", + "customer_id":"", + "method":"upi", + "token":map[string]interface{}{ + "max_amount":5000, + "expire_at":2709971120, + "frequency":"monthly", + }, + "receipt":"Receipt No. 1", + "notes":map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_1Aa00000000002", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + "created_at": 1565172642 +} +``` + + + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount, in paise. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`method` _mandatory_ +: `string` Payment method for the authorisation transaction. Here, the value should be `upi`. + +`receipt` _optional_ +: `string` Unique identifier for the order entered by you. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: Details related to the authorization such as max amount, frequency and expiry information. + + `max_amount` _optional_ + : `integer` The maximum amount that can be debited in a single charge. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _optional_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. Defaults to 10 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `weekly` + - `monthly` + - `quarterly` + - `yearly` + - `as_presented` + + `recurring_value` _optional_ + : `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + + `recurring_type` _optional_ + : `string` Determines when the recurring debit can be done. Possible values are: + - `on`: Recurring debit happens on the exact day of every month. + +> **INFO** +> +> +> **Handy Tips** +> +> For creating an order with `recurring_type`=`on`, set the `recurring_value` parameter to the current date. +> + + - `before`: Recurring debit can happen any time before the specified date. + - `after`: Recurring debit can happen any time after the specified date. + + For example, if the frequency is `monthly`, recurring_value is `17` and recurring_type is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if recurring_type is `after`, recurring debit can only happen on or after the 17th of the month. + + +### 1.1.3 Create an Authorisation Payment + +Once an order is created, your next step is to create a payment. Use the below endpoint to create a payment with payment method `upi`. + +/payments/create + + +### Sample Code + + + ```curl: Request + curl -u : \ + -X POST https://api.razorpay.com/v1/payments/create/upi \ + -H "Content-Type: application/json" \ + -d '{ + "amount":10000, + "currency":"INR", + "order_id":"order_1Aa00000000002", + "customer_id":"cust_1Aa00000000001", + "recurring":"1", + "method":"upi", + "upi":{ + "flow":"intent" + }, + "notes":{ + "address":"note value" + } + }' + ```json: Response + { + "razorpay_payment_id": "pay_R1D5dVYdY67f7M", + "link": "upi://mandate?mc=5045&amrule=MAX&am=1.00&fam=1.00&tr=EZM2025080415061922323116&validitystart=04082025&pn=Demo&rev=Y&pa=demotestrzp.rzp@icici&tn=Demo&cu=INR&txnType=CREATE&block=N&orgid=400011&mode=04&recur=ASPRESENTED&purpose=14&validityend=03072035" + } + ``` + + + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount associated with the payment in smallest unit of the supported currency. For example, `2000` means ₹20. Must match the amount in order created [previously](#112-create-an-order). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we support only INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in the [previous step](#112-create-an-order). + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer, obtained from the response of [Step 1.1.1: Create a Customer](#111-create-a-customer). + +`recurring` _mandatory_ +: `string` Determines if the payment is recurring or one-time. Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this when you want to support recurring payments and one-time payment in the same flow. + +`method` _mandatory_ +: `string` The payment method selected by the customer. Here, the value must be `upi`. + +`upi` +: Details of the expiry of the UPI link + + `flow` _mandatory_ + : `string` Specify the type of the UPI payment flow. + Possible values are: + - `intent` (default) + - `collect`: Deprecated effective 28 February 2026. Applicable only for exempted businesses. + +`notes` _optional_ +: `json object` Key-value pairs that can hold additional information about the payment. + + + +### Response Parameters + + If the payment request is valid, the response contains the following fields. Refer to the [UPI Intent Flow document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md) for more details. + +`razorpay_payment_id` +: `string` Unique reference for the payment created. For example, `pay_EAm09NKReXi2e0`. + + + +### Next Steps by Platform + + + Use the link returned in the response as a deeplink to redirect the customer to their preferred UPI app to complete the mandate registration. + + + UPI Intent is not supported on Desktop Web. Convert the link returned in the response into a QR code and display it on your checkout UI for the customer to scan with their preferred UPI app. + + +## 1.2 Using a Registration Link + +Registration Links are an alternate way of creating an authorisation transaction. If you create a registration link, you need not create a customer or an order. + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. The customer can use the invoice to make the Authorisation Payment. + +Know how to [create Registration Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md) using the Dashboard. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use webhooks to get notifications about successful payments against a registration link. Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks). +> + +A registration link must always have the amount (in paise) that the customer will be charged when making the authorisation payment. For UPI, the amount must be a minimum of `₹1`. + +### 1.2.1 Create a Registration Link + +The following endpoint creates a registration link. + +/subscription_registration/auth_links + + +### Sample Code + + + ```curl: Curl + curl -u : + -X POST https://api.razorpay.com/v1/subscription_registration/auth_links + -H "Content-Type: application/json" \ + -d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": "100", + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "method": "upi", + "max_amount": "500", + "expire_at": 4102444799, + "frequency": "monthly", + "recurring_value": 25, + "recurring_type": "on" + }, + "receipt": "Receipt No. 23", + "email_notify": true, + "sms_notify": true, + "expire_by": 4102444799, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject registrationLinkRequest = new JSONObject(); + JSONObject customer = new JSONObject(); + customer.put("name","Gaurav Kumar"); + customer.put("email","gaurav.kumar@example.com"); + customer.put("contact","9123456780"); + registrationLinkRequest.put("customer", customer); + registrationLinkRequest.put("type", "link"); + registrationLinkRequest.put("amount", 100); + registrationLinkRequest.put("currency", "INR"); + registrationLinkRequest.put("description", "Registration Link for Gaurav Kumar"); + JSONObject subscriptionRegistration = new JSONObject(); + subscriptionRegistration.put("method","upi"); + subscriptionRegistration.put("max_amount",50000); + subscriptionRegistration.put("expire_at",1609423824); + subscriptionRegistration.put("frequency","monthly"); + subscriptionRegistration.put("recurring_value","25"); + subscriptionRegistration.put("recurring_type","on"); + registrationLinkRequest.put("subscription_registration", subscriptionRegistration); + registrationLinkRequest.put("receipt", "Receipt No. #112"); + registrationLinkRequest.put("email_notify", true); + registrationLinkRequest.put("sms_notify", true); + registrationLinkRequest.put("expire_by", 1580479824); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + registrationLinkRequest.put("notes", notes); + + Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('method'=>'upi','max_amount'=>'500','expire_at'=>'1634215992','frequency'=>'monthly','recurring_value'=>'25','recurring_type'=>'on'),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992,'notes' => array('note_key 1' => 'Beam me up Scotty','note_key 2' => 'Tea. Earl Gray. Hot.'))); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.subscriptions.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 100, + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + method: "upi", + max_amount: 500, + expire_at: 1634215992, + frequency: "monthly", + recurring_value: 25, + recurring_type: "on" + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } + }) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "method": "upi", + "max_amount": 500, + "expire_at": 1634215992, + "recurring_value": 25, + "recurring_type": "on" + }, + "receipt": "Receipt No. 5", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } + } + Razorpay::SubscriptionRegistration.create(para_attr) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.registration_link.create({ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":9123456780 + }, + "type":"link", + "amount":100, + "currency":"INR", + "description":"12 p.m. Meals", + "subscription_registration":{ + "method":"upi", + "expire_at":1580480689, + "max_amount":500, + "recurring_value": 25, + "recurring_type": "on" + }, + "receipt":"Receipt no. 1", + "expire_by":1880480689, + "sms_notify": True, + "email_notify": True, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data:= map[string]interface{}{ + "customer":map[string]interface{}{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + }, + "type":"link", + "amount":"100", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":map[string]interface{}{ + "method":"upi", + "max_amount":"500", + "expire_at":1609423824, + "frequency": "monthly", + "recurring_value": 25, + "recurring_type": "on" + }, + "receipt":"Receipt No. 1", + "email_notify":true, + "sms_notify":true, + "expire_by":1681987284, + "notes":map[string]interface{}{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot.", + }, + } + body, err := client.Invoice.CreateRegistrationLink(data, nil) + + ```json: Response + { + "id": "inv_FHr1ekX0r2VCVK", + "entity": "invoice", + "receipt": "Receipt No. 23", + "invoice_number": "Receipt No. 23", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHr1ehR3nmNeXo", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 4102444799, + "issued_at": 1595489219, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595489219, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/ak1WxDB", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595489219, + "idempotency_key": null + } + ``` + + + + +### Request Parameters + + `customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + + `subscription_registration` +: Details of the authorisation transaction. + + `method` _mandatory_ + : `string` The payment method used to make authorisation transaction. Here, it is `card`. + + `max_amount` _mandatory_ + : `integer` Use to set the maximum amount (in paise) per debit request. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _optional_ + : `integer` The Unix timestamp till when you can use the token to charge the customer subsequent payments. The default value is 10 years and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + +`recurring_value` _optional_ +: `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + +`recurring_type` _optional_ +: `string` Determines when the recurring debit can be done. Possible values are: + +- `on`: recurring debit happens on the exact day of every month. + - `before`: recurring debit can happens any time before the specified date. + - `after`: recurring debit can happens any time after the specified date. + +For example, if the frequency is `monthly`, recurring_value is `17` and recurring_type is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if recurring_type is `after`, recurring debit can only happen on or after the 17th of the month. + + `sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + +### 1.2.2 Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + + +### Path Parameters + + `id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + + +### 1.2.3 Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-intent/subsequent-payments.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-intent/subsequent-payments.md new file mode 100644 index 00000000..616f0b43 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-intent/subsequent-payments.md @@ -0,0 +1,263 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is successfully authorised. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created when you created the authorisation transaction. + +Use the below endpoint to create an order: + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":10000, + "currency":"INR", + "payment_capture": true +}' +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'payment_capture' => true, 'currency' => 'INR')); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.order.create({ + "amount":1000, + "currency":"INR", + "payment_capture": true +}) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'payment_capture': True, + 'currency': 'INR', + }) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"INR", + "payment_capture": true, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":10000, + "currency":"INR", + "status":"created", + "attempts":0, + "created_at":1455696638, + "notes":[ + + ] +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is `100` (₹1). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether tha payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +## 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it along with the `token_id` to create a payment and charge the customer. + +Use the below endpoint to create a payment and charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "amount": 1000, + "currency": "INR", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'gaurav.kumar@example.com','contact'=>'9000090000','amount'=>100,'currency'=>'INR','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=> true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "gaurav.kumar@example.com", + "contact": 9000090000, + "amount": 100, + "currency": "INR", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': 'gaurav.kumar@example.com', + 'contact': 9000090000, + 'amount': 1000, + 'currency': 'INR', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': true, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "amount": 1000, + "currency": "INR", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "amount": 1000, + "currency": "INR", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```json: Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001", + "razorpay_order_id" : "order_1Aa00000000001", + "razorpay_signature" : "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +Once our system validates and successfully processes the payment request, a `razorpay_payment_id` is returned. In the case of some banks such as HDFC Bank and Axis Bank, the payment entity returned will be in the `created` state since the charge system of these banks are file-based and can take a few hours. + +> **INFO** +> +> +> **UPI Payments** +> +> - We recommend sending a pre-debit notification to the customer 48 hours before the debit date. +> - For UPI, it may take between 24-36 hours for the subsequent payment to reflect on your Dashboard. +> - This is because of the failure of pre-debit notification and/or any retries that we attempt for the payment. +> - Do not create another subsequent payment until you get the status of the previous one. +> + +> **WARN** +> +> +> **UPI Payments** +> +> - The subsequent payment may fail if there is late authorisation of an earlier payment. +> - For UPI, **do not** create subsequent payments on the last day of the cycle. This will cause the payment to fail. +> + +### Request Parameters + +`email ` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact ` _mandatory_ +: `string` The customer's phone number. For example, `9876543210`. + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the amount in the order. + +`currency` _mandatory_ +: `string` 3-letter ISO currency code for the payment. Currently, only `INR` is allowed. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The `customer_id` for the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines if recurring payment is enabled or not. + - `true`: Recurring Payment is enabled. + - `false`: Recurring Payment is not enabled. + +`description`_optional_ +: `string` A user-entered description for the payment. For example, `Creating recurring payment for Gaurav Kumar`. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-intent/tokens.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-intent/tokens.md new file mode 100644 index 00000000..ed22f4f7 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-intent/tokens.md @@ -0,0 +1,389 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_FHfAzEJ51k8NLj" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentid = "pay_FHfqtkRzWvxky4"; + +Payment payment = client.Payment.Fetch(paymentid); +``` + +```json: Debit Payment +{ + "id": "pay_FHfAzEJ51k8NLj", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfANdTUYeP8lb", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfAzGzREc1ug6", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595447490 +} +```json: Authorisation Payment +{ + "id": "pay_QDhVJ5M23wt4rh", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "failed", + "order_id": "order_QDhT2PqFJvtg4y", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "success@razorpay", + "email": "gaurav.kumar@example.com", + "contact": "+919123456780", + "customer_id": "cust_Q0g6LTYw3obZEn", + "token_id": "token_QDhVJHYr5m87fF", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey\u2026 decaf.", + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + "optimizer_provider_name": "razorpay" + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment was a dummy payment for one time mandate registration.", + "error_source": "business", + "error_step": "payment_initiation", + "error_reason": "upi_dummy_payment", + "acquirer_data": { + "rrn": null + }, + "gateway_provider": "Razorpay", + "created_at": 1743490280, + "upi": { + "vpa": "success@razorpay" + } +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` via the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +## 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> - This endpoint will not fetch the details of expired and unused tokens. +> - The UPI tokens are not populated in the API response if the `save_vpa` feature is not enabled in your account. Please raise a request with our Support team to get this activated. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +List tokens = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +## 2.3. Delete Tokens + +> **WARN** +> +> +> **Watch Out!** +> +> Deleting a token removes it from Razorpay's database. The deleted token will not appear on the Dashboard or when all tokens are fetched. However, it does not cancel the mandate. If you wish to cancel the mandate from NPCI, use the [Cancel Token API](#24-cancel-token). +> + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameters + + `customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + + +## 2.4. Cancel Token +The following endpoint initiates cancellation of the mandate from NPCI. + +/customers/:customer_id/tokens/:token_id/cancel + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PUT https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001/cancel +```json: Response +{ + "status": "cancellation_initiated” +} +``` + + +### Path Parameters + + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be cancelled. For example, `token_1Aa00000000001`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/collect/authorization-transaction.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/collect/authorization-transaction.md new file mode 100644 index 00000000..6f6d7f00 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/collect/authorization-transaction.md @@ -0,0 +1,1128 @@ +--- +title: 1. Create the Authorisation Transaction +description: Steps to create an authorisation transaction for UPI one time mandate. +--- + +# 1. Create the Authorisation Transaction + +Create a one time mandate on UPI to let your customers block an amount and pay later. The amount gets blocked on the customer's bank account and can be debited once within the expiry of the mandate. A one time mandate on UPI can help charge customers post-delivery of products or services, helping make the customer experience delightful for businesses like E-commerce, Travel, Transport, Healthcare, and many more. + +**Example** + +Gaurav Kumar wants to reserve a room at Acme Hotel. However, he is still determining the travel plan. He wants to pay after check-in. + +Using UPI One Time Mandate, Gaurav Kumar can consent to block the hotel booking amount and only let Acme Hotel debit the amount after check-in. + +To create a one time mandate: +1. [Create an authorisation transaction](#create-an-authorisation-transaction) +2. [Fetch and manage tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/collect/tokens.md) +3. [Create a one time mandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/collect/one-time-payment.md) + +## Create an Authorisation Transaction + +You can create an authorisation transaction using the [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +## 1.1 Using Razorpay APIs + +To create an authorisation transaction using the Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +1. [Create an Order](#112-create-an-order). +1. [Validate the UPI ID](#113-validate-the-vpa-upi-id). +1. [Create Authorisation Payment using Razorpay APIs](#114-create-an-authorization-payment). + +### 1.1.1 Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + +### Request Parameters + + `name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + +### 1.1.2. Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction for a one time mandate. To create a one-time mandate, pass the value of the `frequency` parameter as `one_time`. The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "customer_id": "cust_4xbQrmEoA5WJ01", + "method": "upi", + "token": { + "max_amount": 200000, + "expire_at": 2709971120, + "frequency": "one_time" + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 100); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_4xbQrmEoA5WJ01"); +orderRequest.put("method", "upi"); +orderRequest.put("receipt", "receipt#1"); +JSONObject token = new JSONObject(); +token.put("max_amount","200000"); +token.put("expire_at","2709971120"); +token.put("frequency","one_time"); +orderRequest.put("token", token); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','method' => 'upi','customer_id' => 'cust_4xbQrmEoA5WJ01', 'token' => array('max_amount' => 200000, 'expire_at' => 2709971120, 'frequency' => 'one_time'),'receipt' => 'Receipt No. 1' ,'notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + method: "upi", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "netbanking", + max_amount: 9999900, + expire_at: 4102444799, + frequency: "one_time", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount":0, + "currency":"INR", + "method":"upi", + "customer_id":"cust_1Aa00000000001", + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Beam me up Scotty", + "notes_key_2":"Engage" + }, + "token":{ + "auth_type":"netbanking", + "max_amount":9999900, + "expire_at":4102444799, + "frequency": "one_time", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 0, + "currency": "INR", + "method": "upi", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "frequency": "one_time", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } +} +Razorpay.Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount":100, + "currency":"INR", + "customer_id":"", + "method":"upi", + "token":map[string]interface{}{ + "max_amount":5000, + "expire_at":2709971120, + "frequency":"one_time" + }, + "receipt":"Receipt No. 1", + "notes":map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf.", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_1Aa00000000002", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1565172642 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `upi`. + +`receipt` _optional_ +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: `object` Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be debited in a single charge. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _mandatory_ + : `integer` The Unix timestamp at which the authorisation transaction expires. For insurance MCCs (6300, 5960, 6529), the maximum validity is 14 days. For all other MCCs, the maximum validity is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. The value should be `one_time` for one time mandate. + + +### 1.1.3. Validate the VPA (UPI ID) + +Use the below endpoint to validate the customer's UPI ID. + +/payments/validate/vpa + +```curl: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/validate/vpa \ +-H "Content-Type: application/json" \ +-d '{ + "vpa": "gauravkumar@exampleupi" +}' +```json: Response +{ + "vpa": "gauravkumar@exampleupi", + "success": true, + "customer_name": "Gaurav Kumar" +} +``` + +#### Request Parameters + +`vpa` _mandatory_ +: `string` The UPI ID you want to validate. For example, `gauravkumar@exampleupi`. + +### 1.1.4. Create an Authorisation Payment + +After you create an order, you should create a payment. Use the endpoint below to create a payment. This is a dummy transaction that fails with an error `BAD_REQUEST_ERROR` when a customer tries to approve the mandate request from a PSP application. A token is created and marked as `confirmed` for the same. + +> **INFO** +> +> +> **Handy Tips** +> +> You will get the [token.confirmed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-confirmed) webhook after the customer approves the mandate request. +> + +/payments/create/upi + +```curl: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/create/upi \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 200, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "customer_id": "cust_EIW4T2etiweBmG", + "recurring": "1", + "method": "upi", + "upi": { + "flow": "collect", + "vpa": "gauravkumar@exampleupi", + "expiry_time": 5 + }, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "save": true, + "notes": { + "note_key": "value1" + } +}' +```json: Response +{ +"razorpay_payment_id": "pay_EAm09NKReXi2e0" +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount associated with the payment in the smallest unit of the supported currency. For example, `2000` means ₹20. Must match the amount in [Step 1.1.2: Create an Order](#112-create-an-order). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in [Step 1.1.2: Create an Order](#112-create-an-order). + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `9123456780`. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer, obtained from the response of [Step 1.1.1: Create a Customer](#111-create-a-customer). + +`recurring` _mandatory_ +: `string` Determines if the recurring payment is enabled or not. Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this if you want to allow **recurring payments** and **one-time payment** in the same flow. + +`method` _mandatory_ +: `string` The payment method selected by the customer. Here, the value must be `upi`. + +`upi` +: `object` Details of the expiry of the UPI link + + `flow` _mandatory_ + : `string` Specify the type of the UPI payment flow. + Possible values are: + - `collect` (default) + - `intent` + + `vpa` _mandatory_ + : `string` The VPA of the customer where the collect request will be sent. + + `expiry_time` _mandatory_ + : `integer` Period of time (in minutes) after which the link will expire. The default value is **5**. + +`ip` _mandatory_ +: `string` Client's browser IP address. For example, **117.217.74.98**. + +`referer` _mandatory_ +: `string` Value of `referer` header passed by the client's browser. For example, **https://example.com/**. + +`user_agent` _mandatory_ +: `string` Value of `user_agent` header passed by the client's browser. +For example, **Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36** + +`description` _optional_ +: `string` Descriptive text of the payment. + +`save` _optional_ +: `boolean` Specifies if the VPA should be stored as a token. Possible values: + - `true`: Saves the VPA details. + - `false`(default): Does not save the VPA details. + +`notes` _optional_ +: `json object` Key-value pairs that can hold additional information about the payment. + Refer to the [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) section of the API Reference Guide. + + +## 1.2. Using a Registration Link + +Registration Links are an alternate way of creating an authorisation transaction. If you create a registration link, you need not create a customer or an order. + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. The customer can use the invoice to make the Authorisation Payment. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use [Token Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) to get notifications about successful payments against a registration link. Do not use payment webhooks for Authorisation Payments. +> + +### 1.2.1. Create a Registration Link + +The following endpoint creates a registration link you can share with your customers to make one time mandate payments. This is a dummy transaction that fails with an error `BAD_REQUEST_ERROR` when a customer tries to approve the mandate request from a PSP application. A token is created and marked as `confirmed` for the same. + +/subscription_registration/auth_links + +```curl: Curl +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": "100", + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "method": "upi", + "max_amount": "500", + "expire_at": 4102444799, + "frequency": "one_time" + }, + "receipt": "Receipt No. 23", + "email_notify": true, + "sms_notify": true, + "expire_by": 4102444799, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 100); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "Registration Link for Gaurav Kumar"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","upi"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +subscriptionRegistration.put("frequency","one_time"); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. #112"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('method'=>'upi','max_amount'=>'500','expire_at'=>'1634215992','frequency'=>'one_time'),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992,'notes' => array('note_key 1' => 'Beam me up Scotty','note_key 2' => 'Tea. Earl Gray. Hot.'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 100, + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + method: "upi", + max_amount: 500, + expire_at: 1634215992, + frequency: "one_time" + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "method": "upi", + "max_amount": 500, + "expire_at": 1634215992, + "frequency": "one_time" + }, + "receipt": "Receipt No. 5", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::SubscriptionRegistration.create(para_attr) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":9123456780 + }, + "type":"link", + "amount":100, + "currency":"INR", + "description":"12 p.m. Meals", + "subscription_registration":{ + "method":"upi", + "expire_at":1580480689, + "max_amount":500, + "frequency": "one_time" + }, + "receipt":"Receipt no. 1", + "expire_by":1880480689, + "sms_notify": True, + "email_notify": True, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer":map[string]interface{}{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + }, + "type":"link", + "amount":"100", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":map[string]interface{}{ + "method":"upi", + "max_amount":"500", + "expire_at":1609423824, + "frequency": "one_time" + }, + "receipt":"Receipt No. 1", + "email_notify":true, + "sms_notify":true, + "expire_by":1681987284, + "notes":map[string]interface{}{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot.", + }, +} +body, err := client.Invoice.CreateRegistrationLink(data, nil) +``` + +```json: Response +{ + "id": "inv_FHr1ekX0r2VCVK", + "entity": "invoice", + "receipt": "Receipt No. 23", + "invoice_number": "Receipt No. 23", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHr1ehR3nmNeXo", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 4102444799, + "issued_at": 1595489219, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595489219, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/ak1WxDB", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595489219, + "idempotency_key": null +} +``` + + +### Request Parameters + + `customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + + `subscription_registration` +: `object` Details of the authorisation transaction. + + `method` _mandatory_ + : `string` The payment method used to make authorisation transaction. Here, it is `card`. + + `max_amount` _mandatory_ + : `integer` Use to set the maximum amount (in paise) per debit request. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _optional_ + : `integer` The Unix timestamp till when you can use the token to charge the customer subsequent payments. The default value is 10 years and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. The value should be `one_time` for one time mandate. + + `sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + + +### Path Parameters + + `id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + + +### Path Parameters + + `id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/collect/one-time-payment.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/collect/one-time-payment.md new file mode 100644 index 00000000..c03e0190 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/collect/one-time-payment.md @@ -0,0 +1,382 @@ +--- +title: 3. Create a One Time Payment +description: Create and charge a one time payment using Razorpay APIs. +--- + +# 3. Create a One Time Payment + +You should perform the following steps to create and charge your customer a one time payment: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a one time payment](#32-create-a-one-time-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order to charge a one time mandate. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", "INR"); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': 'INR', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "INR", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"INR", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + + +## 3.2. Create a One Time Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a one-time payment. After the payment is complete (authorised or failed), the respective token will move to the `cancelled` state, and you can no longer use the token. You will get the [token.cancelled](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-cancelled) webhook notification for the same. + +The following endpoint creates a one time payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "amount": 1000, + "currency": "INR", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("contact", "9000090000"); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", "INR"); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'gaurav.kumar@example.com','contact'=>'9000090000','amount'=>100,'currency'=>'INR','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "amount": 1000, + "currency": "INR", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': 'gaurav.kumar@example.com', + 'contact': 9000090000, + 'amount': 1000, + 'currency': 'INR', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "amount": 1000, + "currency": "INR", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "amount": 1000, + "currency": "INR", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9000090000"); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id": "pay_1Aa00000000001", +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + + + +`email ` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact ` _mandatory_ +: `integer` The customer's phone number. For example, `9876543210`. + +`currency` _mandatory_ +: `string` 3-letter ISO currency code for the payment. Currently, only `INR` is allowed. + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`description`_optional_ +: `string` A user-entered description for the payment. For example, `Creating recurring payment for Gaurav Kumar` + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/collect/tokens.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/collect/tokens.md new file mode 100644 index 00000000..b80e553c --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/collect/tokens.md @@ -0,0 +1,393 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_FHfAzEJ51k8NLj" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentid = "pay_FHfqtkRzWvxky4"; + +Payment payment = client.Payment.Fetch(paymentid); +``` + +```json: Debit Payment +{ + "id": "pay_FHfAzEJ51k8NLj", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfANdTUYeP8lb", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfAzGzREc1ug6", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595447490 +} +```json: Authorisation Payment +{ + "id": "pay_QDhVJ5M23wt4rh", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "failed", + "order_id": "order_QDhT2PqFJvtg4y", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "success@razorpay", + "email": "gaurav.kumar@example.com", + "contact": "+919123456780", + "customer_id": "cust_Q0g6LTYw3obZEn", + "token_id": "token_QDhVJHYr5m87fF", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey\u2026 decaf.", + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + "optimizer_provider_name": "razorpay" + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment was a dummy payment for one time mandate registration.", + "error_source": "business", + "error_step": "payment_initiation", + "error_reason": "upi_dummy_payment", + "acquirer_data": { + "rrn": null + }, + "gateway_provider": "Razorpay", + "created_at": 1743490280, + "upi": { + "vpa": "success@razorpay" + } +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` via the [payment.failed webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-failed). +> + + +### Path Parameters + + `id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + + +## 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> - This endpoint will not fetch the details of expired and unused tokens. +> - The UPI tokens are not populated in the API response if the `save_vpa` feature is not enabled in your account. Please raise a request with our Support team to get this activated. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +List tokens = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + + +### Path Parameters + + `id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + + +## 2.3. Delete Tokens + +> **WARN** +> +> +> **Watch Out!** +> +> Deleting a token removes it from Razorpay's database. The deleted token will not appear on the Dashboard or when all tokens are fetched. However, it does not cancel the mandate. If you wish to cancel the mandate from NPCI, use the [Cancel Token API](#24-cancel-token). +> + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameters + + `customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + + +## 2.4. Cancel Token +The following endpoint initiates cancellation of the mandate from NPCI. + +/customers/:customer_id/tokens/:token_id/cancel + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PUT https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001/cancel +```json: Response +{ + "status": "cancellation_initiated” +} +``` + + +### Path Parameters + + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be cancelled. For example, `token_1Aa00000000001`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/faqs.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/faqs.md new file mode 100644 index 00000000..59d85105 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/faqs.md @@ -0,0 +1,41 @@ +--- +title: UPI One-time Mandate | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about UPI One-time Mandate. +--- + +# Frequently Asked Questions (FAQs) + +### 1. How is customer security ensured while handling recurring payment tokens? + + Razorpay deletes the token as soon as the recurring payment is completed, ensuring complete security. + + + +### 2. What is the time taken for the UPI One Time Mandate processing? + + The UPI One Time Mandate transactions occur realtime. The system immediately processes the transactions. + + + +### 3. How does the maximum blocked amount work for transactions? + + Businesses can set a maximum amount which will be blocked for the customer and can debit any amount equal to or less than the maximum amount. + + + +### 4. If the business blocks ₹10000 and debits ₹5000 what happens to the remaining amount? + + If the business blocks an amount and debits a lesser amount, the remaining amount will be unblocked by the bank and refunded back to the customer. + + + +### 5. Can businesses modify the mandate after it is created? + + No, once a mandate is created, it cannot be modified. + + + +### 6. Which are the top UPI apps supported for one time mandate transactions? + + The top UPI apps supported for mandate transactions are PhonePe and Google Pay. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/intent/authorization-transaction.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/intent/authorization-transaction.md new file mode 100644 index 00000000..bc855e7d --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/intent/authorization-transaction.md @@ -0,0 +1,1066 @@ +--- +title: 1. Create the Authorisation Transaction +description: Steps to create an authorisation transaction for UPI one time mandate. +--- + +# 1. Create the Authorisation Transaction + +Create a one time mandate on UPI to let your customers block an amount and pay later. The amount gets blocked on the customer's bank account and can be debited once within the expiry of the mandate. A one time mandate on UPI can help charge customers post-delivery of products or services, helping make the customer experience delightful for businesses like E-commerce, Travel, Transport, Healthcare, and many more. + +**Example** + +Gaurav Kumar wants to reserve a room at Acme Hotel. However, he is still determining the travel plan. He wants to pay after check-in. + +Using UPI One Time Mandate, Gaurav Kumar can consent to block the hotel booking amount and only let Acme Hotel debit the amount after check-in. + +To create a one time mandate: +1. [Create an authorisation transaction](#create-an-authorization-transaction) +2. [Fetch and manage tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/intent/tokens.md) +3. [Create a one time mandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/intent/one-time-payment.md) + +## Create an Authorisation Transaction + +You can create an authorisation transaction using the [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +## 1.1 Using Razorpay APIs + +To create an authorisation transaction using the Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +1. [Create an Order](#112-create-an-order). +1. [Create Authorisation Payment using Razorpay APIs](#113-create-an-authorization-payment). + +### 1.1.1 Create a Customer + +Razorpay links a one time mandate token to customers via a unique identifier. You can generate this identifier using the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name","Gaurav Kumar"); +customerRequest.put("contact","9000090000"); +customerRequest.put("email","gaurav.kumar@example.com"); +customerRequest.put("fail_existing", "0"); +customerRequest.put("gstin","29XAbbA4369J1PA"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + 'name': 'Gaurav Kumar', + 'email': 'gaurav.kumar@example.com', + 'contact': '9000090000', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "Gaurav Kumar", + "contact": 9000090000, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->create(array('name' => 'Gaurav Kumar', 'email' => 'gaurav.kumar@example.com','contact'=>'9000090000','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", "Gaurav Kumar"); +options.Add("contact", "9000090000"); +options.Add("email", "gaurav.kumar@example.com"); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "name": "Gaurav Kumar", + "contact": 9000090000, + "email": "gaurav.kumar@example.com", + "fail_existing": "0", + "gstin": "29XAbbA4369J1PA", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Customer.create(para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({ + name: "Gaurav Kumar", + contact: 9000090000, + email: "gaurav.kumar@example.com", + fail_existing: "0", + gstin: "29XAbbA4369J1PA", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +``` + +```json: Response +{ + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9000090000", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 +} +``` + + +### Request Parameters + + `name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + +### 1.1.2. Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction for a one time mandate. To create a one-time mandate, pass the value of the `frequency` parameter as `one_time`. The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "customer_id": "cust_4xbQrmEoA5WJ01", + "method": "upi", + "token": { + "max_amount": 200000, + "expire_at": 2709971120, + "frequency": "one_time" + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 100); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_4xbQrmEoA5WJ01"); +orderRequest.put("method", "upi"); +orderRequest.put("receipt", "receipt#1"); +JSONObject token = new JSONObject(); +token.put("max_amount","200000"); +token.put("expire_at","2709971120"); +token.put("frequency","one_time"); +orderRequest.put("token", token); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','method' => 'upi','customer_id' => 'cust_4xbQrmEoA5WJ01', 'token' => array('max_amount' => 200000, 'expire_at' => 2709971120, 'frequency' => 'one_time'),'receipt' => 'Receipt No. 1' ,'notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + method: "upi", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "netbanking", + max_amount: 9999900, + expire_at: 4102444799, + frequency: "one_time", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount":0, + "currency":"INR", + "method":"upi", + "customer_id":"cust_1Aa00000000001", + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Beam me up Scotty", + "notes_key_2":"Engage" + }, + "token":{ + "auth_type":"netbanking", + "max_amount":9999900, + "expire_at":4102444799, + "frequency": "one_time", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 0, + "currency": "INR", + "method": "upi", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "frequency": "one_time", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } +} +Razorpay.Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount":100, + "currency":"INR", + "customer_id":"", + "method":"upi", + "token":map[string]interface{}{ + "max_amount":5000, + "expire_at":2709971120, + "frequency":"one_time" + }, + "receipt":"Receipt No. 1", + "notes":map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf.", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_1Aa00000000002", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1565172642 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `upi`. + +`receipt` _optional_ +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: `object` Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be debited in a single charge. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _mandatory_ + : `integer` The Unix timestamp at which the authorisation transaction expires. For insurance MCCs (6300, 5960, 6529), the maximum validity is 14 days. For all other MCCs, the maximum validity is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. The value should be `one_time` for one time mandate. + + +### 1.1.3. Create an Authorisation Payment + +After you create an order, you should create a payment. Use the endpoint below to create a payment. This is a dummy transaction that fails with an error `BAD_REQUEST_ERROR` when a customer tries to approve the mandate request from a PSP application. A token is created and marked as `confirmed` for the same. + +> **INFO** +> +> +> **Handy Tips** +> +> You will get the [token.confirmed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-confirmed) webhook after the customer approves the mandate request. +> + +/payments/create/upi + +```curl: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/create/upi \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 200, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "customer_id": "cust_EIW4T2etiweBmG", + "recurring": "1", + "method": "upi", + "upi": { + "flow": "intent" + }, + "notes": { + "note_key": "value1" + } +}' +```json: Response +{ +"razorpay_payment_id": "pay_EAm09NKReXi2e0" +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount associated with the payment in smallest unit of the supported currency. For example, `2000` means ₹20. Must match the amount in [Step 1.1.2.: Create an Order](#112-create-an-order). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in [Step 1.1.2.: Create an Order](#112-create-an-order). + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `9123456780`. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer, obtained from the response of [Step 1.1.1.: Create a Customer](#111-create-a-customer). + +`recurring` _mandatory_ +: `string` Determines if the recurring payment is enabled or not. Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this if you want to allow **recurring payments** and **one-time payment** in the same flow. + +`method` _mandatory_ +: `string` The payment method selected by the customer. Here, the value must be `upi`. + +`upi` +: `object` Details of the expiry of the UPI link + + `flow` _mandatory_ + : `string` Specify the type of the UPI payment flow. + Possible values are: + - `collect` (default) + - `intent` + + `notes` _optional_ +: `json object` Key-value pairs that can hold additional information about the payment. Refer to the [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) section of the API Reference Guide. + + +## 1.2. Using a Registration Link + +Registration Links are an alternate way of creating an authorisation transaction. If you create a registration link, you need not create a customer or an order. + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. The customer can use the invoice to make the Authorisation Payment. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use [Token Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) to get notifications about successful payments against a registration link. Do not use payment webhooks for Authorisation Payments. +> + +### 1.2.1. Create a Registration Link + +The following endpoint creates a registration link you can share with your customers to make one time mandate payments. This is a dummy transaction that fails with an error `BAD_REQUEST_ERROR` when a customer tries to approve the mandate request from a PSP application. A token is created and marked as `confirmed` for the same. + +/subscription_registration/auth_links + +```curl: Curl +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": "100", + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "method": "upi", + "max_amount": "500", + "expire_at": 4102444799, + "frequency": "one_time" + }, + "receipt": "Receipt No. 23", + "email_notify": true, + "sms_notify": true, + "expire_by": 4102444799, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 100); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "Registration Link for Gaurav Kumar"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","upi"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +subscriptionRegistration.put("frequency","one_time"); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. #112"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('method'=>'upi','max_amount'=>'500','expire_at'=>'1634215992','frequency'=>'one_time'),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992,'notes' => array('note_key 1' => 'Beam me up Scotty','note_key 2' => 'Tea. Earl Gray. Hot.'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 100, + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + method: "upi", + max_amount: 500, + expire_at: 1634215992, + frequency: "one_time" + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "method": "upi", + "max_amount": 500, + "expire_at": 1634215992, + "frequency": "one_time" + }, + "receipt": "Receipt No. 5", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::SubscriptionRegistration.create(para_attr) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":9123456780 + }, + "type":"link", + "amount":100, + "currency":"INR", + "description":"12 p.m. Meals", + "subscription_registration":{ + "method":"upi", + "expire_at":1580480689, + "max_amount":500, + "frequency": "one_time" + }, + "receipt":"Receipt no. 1", + "expire_by":1880480689, + "sms_notify": True, + "email_notify": True, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer":map[string]interface{}{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + }, + "type":"link", + "amount":"100", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":map[string]interface{}{ + "method":"upi", + "max_amount":"500", + "expire_at":1609423824, + "frequency": "one_time" + }, + "receipt":"Receipt No. 1", + "email_notify":true, + "sms_notify":true, + "expire_by":1681987284, + "notes":map[string]interface{}{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot.", + }, +} +body, err := client.Invoice.CreateRegistrationLink(data, nil) +``` + +```json: Response +{ + "id": "inv_FHr1ekX0r2VCVK", + "entity": "invoice", + "receipt": "Receipt No. 23", + "invoice_number": "Receipt No. 23", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHr1ehR3nmNeXo", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 4102444799, + "issued_at": 1595489219, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595489219, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/ak1WxDB", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595489219, + "idempotency_key": null +} +``` + + +### Request Parameters + + `customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + + `subscription_registration` +: `object` Details of the authorisation transaction. + + `method` _mandatory_ + : `string` The payment method used to make authorisation transaction. Here, it is `card`. + + `max_amount` _mandatory_ + : `integer` Use to set the maximum amount (in paise) per debit request. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _optional_ + : `integer` The Unix timestamp till when you can use the token to charge the customer subsequent payments. The default value is 10 years and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. The value should be `one_time` for one time mandate. + + `sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + + +### Path Parameters + + `id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + + +### Path Parameters + + `id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/intent/one-time-payment.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/intent/one-time-payment.md new file mode 100644 index 00000000..c03e0190 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/intent/one-time-payment.md @@ -0,0 +1,382 @@ +--- +title: 3. Create a One Time Payment +description: Create and charge a one time payment using Razorpay APIs. +--- + +# 3. Create a One Time Payment + +You should perform the following steps to create and charge your customer a one time payment: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a one time payment](#32-create-a-one-time-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order to charge a one time mandate. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", "INR"); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': 'INR', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "INR", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"INR", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + + +## 3.2. Create a One Time Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a one-time payment. After the payment is complete (authorised or failed), the respective token will move to the `cancelled` state, and you can no longer use the token. You will get the [token.cancelled](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-cancelled) webhook notification for the same. + +The following endpoint creates a one time payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "amount": 1000, + "currency": "INR", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("contact", "9000090000"); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", "INR"); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'gaurav.kumar@example.com','contact'=>'9000090000','amount'=>100,'currency'=>'INR','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "amount": 1000, + "currency": "INR", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': 'gaurav.kumar@example.com', + 'contact': 9000090000, + 'amount': 1000, + 'currency': 'INR', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "amount": 1000, + "currency": "INR", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "amount": 1000, + "currency": "INR", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9000090000"); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id": "pay_1Aa00000000001", +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + + + +`email ` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact ` _mandatory_ +: `integer` The customer's phone number. For example, `9876543210`. + +`currency` _mandatory_ +: `string` 3-letter ISO currency code for the payment. Currently, only `INR` is allowed. + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`description`_optional_ +: `string` A user-entered description for the payment. For example, `Creating recurring payment for Gaurav Kumar` + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/intent/tokens.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/intent/tokens.md new file mode 100644 index 00000000..b80e553c --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/intent/tokens.md @@ -0,0 +1,393 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_FHfAzEJ51k8NLj" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentid = "pay_FHfqtkRzWvxky4"; + +Payment payment = client.Payment.Fetch(paymentid); +``` + +```json: Debit Payment +{ + "id": "pay_FHfAzEJ51k8NLj", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfANdTUYeP8lb", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfAzGzREc1ug6", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595447490 +} +```json: Authorisation Payment +{ + "id": "pay_QDhVJ5M23wt4rh", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "failed", + "order_id": "order_QDhT2PqFJvtg4y", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "success@razorpay", + "email": "gaurav.kumar@example.com", + "contact": "+919123456780", + "customer_id": "cust_Q0g6LTYw3obZEn", + "token_id": "token_QDhVJHYr5m87fF", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey\u2026 decaf.", + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + "optimizer_provider_name": "razorpay" + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment was a dummy payment for one time mandate registration.", + "error_source": "business", + "error_step": "payment_initiation", + "error_reason": "upi_dummy_payment", + "acquirer_data": { + "rrn": null + }, + "gateway_provider": "Razorpay", + "created_at": 1743490280, + "upi": { + "vpa": "success@razorpay" + } +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` via the [payment.failed webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-failed). +> + + +### Path Parameters + + `id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + + +## 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> - This endpoint will not fetch the details of expired and unused tokens. +> - The UPI tokens are not populated in the API response if the `save_vpa` feature is not enabled in your account. Please raise a request with our Support team to get this activated. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +List tokens = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + + +### Path Parameters + + `id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + + +## 2.3. Delete Tokens + +> **WARN** +> +> +> **Watch Out!** +> +> Deleting a token removes it from Razorpay's database. The deleted token will not appear on the Dashboard or when all tokens are fetched. However, it does not cancel the mandate. If you wish to cancel the mandate from NPCI, use the [Cancel Token API](#24-cancel-token). +> + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameters + + `customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + + +## 2.4. Cancel Token +The following endpoint initiates cancellation of the mandate from NPCI. + +/customers/:customer_id/tokens/:token_id/cancel + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PUT https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001/cancel +```json: Response +{ + "status": "cancellation_initiated” +} +``` + + +### Path Parameters + + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be cancelled. For example, `token_1Aa00000000001`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-reserve-pay/integration-steps.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-reserve-pay/integration-steps.md new file mode 100644 index 00000000..a67ca48a --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-reserve-pay/integration-steps.md @@ -0,0 +1,1883 @@ +--- +title: Integrate UPI Reserve Pay +description: Integrate UPI Reserve Pay (SBMD) APIs to block and debit funds using a single customer authorisation. +--- + +# Integrate UPI Reserve Pay + +UPI Reserve Pay APIs use the single-block, multiple-debit (SBMD) framework to manage scheduled or recurring transactions. With a single customer authorisation, this system allows businesses to block a specific sum from the customer's account. This reserved fund can then be debited automatically multiple times, eliminating the need for further customer approvals and ensuring a smoother, more reliable payment flow. + +**Example** + +A customer using the Acme Quick Commerce app authorises a one-time UPI block of ₹2,000 for future purchases. When they place a ₹400 order on Monday and a ₹600 order on Wednesday, both amounts are automatically debited from that reserved fund. The customer never has to enter a PIN at checkout, making their repeat orders completely frictionless. + + - **Create the Authorisation Transaction**: Create customer, order and authorisation payment to block funds. + + - **Fetch the Token Details**: Retrieve the token_id needed to initiate subsequent payments. + + - **Create Subsequent Payments**: Debit from the blocked amount for customer purchases. + +## Create an Authorisation Transaction + +To create an authorisation transaction using the Razorpay APIs, you need to: + +1. [Create a Customer](#11-create-a-customer) +2. [Create an Order](#12-create-an-order) +3. [Create Authorisation Payment](#13-create-an-authorisation-payment) + +### 1.1 Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +The following endpoint creates a customer. + +/customers + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name",""); +customerRequest.put("contact",""); +customerRequest.put("email",""); +customerRequest.put("fail_existing", "0"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", ""); +options.Add("contact", ""); +options.Add("email", ""); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Customer.create(para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +``` + +```json: Response +{ + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 +} +``` + + +### Request Parameters + + `name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + +`id` +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`entity` _optional_ +: `string` Indicates the type of entity. + +`name` +: `string` Customer's name. Alphanumeric, with period (.), apostrophe ('), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. + +`contact` +: `string` The customer's phone number. A maximum length of 15 characters including country code. + +`email` +: `string` The customer's email address. A maximum length of 64 characters. + +`gstin` +: `string` GST number linked to the customer. For example, `29XAbbA4369J1PA`. + +`notes` +: `json object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + + + +### 1.2 Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction for a one time mandate. To create a one-time mandate, pass the value of the `frequency` parameter as `one_time`. The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "customer_id": "cust_4xbQrmEoA5WJ01", + "method": "upi", + "token": { + "max_amount": 200000, + "expire_at": 2709971120, + "frequency": "as_presented", + "type": "single_block_multiple_debit" + }, + "receipt": "Receipt No. 1", + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 100); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_4xbQrmEoA5WJ01"); +orderRequest.put("method", "upi"); +orderRequest.put("receipt", "receipt#1"); +JSONObject token = new JSONObject(); +token.put("max_amount","200000"); +token.put("expire_at","2709971120"); +token.put("frequency","as_presented"); +token.put("type","single_block_multiple_debit"); +orderRequest.put("token", token); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","September"); +notes.put("notes_key_2","Make it so."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','method' => 'upi','customer_id' => 'cust_4xbQrmEoA5WJ01', 'token' => array('max_amount' => 200000, 'expire_at' => 2709971120, 'frequency' => 'as_presented', 'type'=> 'single_block_multiple_debit'),'receipt' => 'Receipt No. 1' ,'notes' => array('notes_key_1' => 'September','notes_key_2' => 'Make it so.'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + method: "upi", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "September", + notes_key_2: "Make it so." + }, + token: { + max_amount: 9999900, + expire_at: 4102444799, + frequency: "as_presented", + type: "single_block_multiple_debit" + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount":0, + "currency":"INR", + "method":"upi", + "customer_id":"cust_1Aa00000000001", + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"September", + "notes_key_2":"Make it so." + }, + "token":{ + "max_amount":9999900, + "expire_at":4102444799, + "frequency": "as_presented", + "type": "single_block_multiple_debit" + } + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 0, + "currency": "INR", + "method": "upi", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "September", + "notes_key_2": "Make it so." + }, + "token": { + "max_amount": 9999900, + "expire_at": 4102444799, + "frequency": "as_presented", + "type": "single_block_multiple_debit" + } +} +Razorpay.Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount":100, + "currency":"INR", + "customer_id":"", + "method":"upi", + "token":map[string]interface{}{ + "max_amount":5000, + "expire_at":2709971120, + "frequency":"as_presented", + "type": "single_block_multiple_debit" + }, + "receipt":"Receipt No. 1", + "notes":map[string]interface{}{ + "notes_key_1":"September", + "notes_key_2":"Make it so.", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_1Aa00000000002", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "September", + "notes_key_2": "Make it so." + }, + "created_at": 1565172642 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount in currency subunits. The maximum amount that can be blocked is ₹10,000. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `upi`. + +`receipt` _optional_ +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: `object` Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be debited is ₹10,000. + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The default and the maximum value allowed is 90 days. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. The value should be `as_presented`. + + `type` _mandatory_ + : `string` Indicates the type of payment. Here, the possible value is `single_block_multiple_debit`. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the order. + +`amount` +: `integer` The amount for which the order was created, in currency subunits. + +`entity` +: `string` Name of the entity. Here, it is `order`. + +`amount_paid` +: `integer` The amount paid against the order. + +`amount_due` +: `integer` The amount pending against the order. + +`currency` +: `string` ISO code for the currency in which you want to accept the payment. The default length is 3 characters. + +`receipt` +: `string` Receipt number that corresponds to this order. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Indicates the Unix timestamp when this order was created. + + +### 1.3 Create an Authorisation Payment + +Use this API endpoint to initiate UPI mandate authorisation via intent flow. This step creates a pending token. The customer approves the mandate in their TPAP app. + +/v1/payments/create/json + +```curl: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 200, + "contact": "9123456780", + "currency": "INR", + "customer_id": "cust_RtNzXmWrRe0Edr", + "email": "gaurav.kumar@example.com", + "method": "upi", + "order_id": "order_RtP3VPM5YrzXr8", + "recurring": true, + "upi": { + "flow": "intent" + } +}' +```json: Success Response +{ + "razorpay_payment_id": "pay_RtP3bnk51QvOF9", + "next": [ + { + "action": "intent", + "url": "upi://mandate?pa=vi228420.rzprec@rxairtel&pn=Big+Basket&mn=Create+Mandate&tid=AIRM2f050321dcb411f08f712aac9325bf5&validitystart=19122025&validityend=30122025&am=2.00&amrule=MAX&recur=ASPRESENTED&tr=RtP3bnk51QvOF90create1&url=&cu=INR&mc=4900&tn=MANDATE&orgid=180100&mode=04&purpose=77&txnType=CREATE&rev=N&block=Y" + }, + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_RtP3bnk51QvOF9" + } + ] +} +``` + + +### Request Parameters + +`amount` +: `integer` The amount you want to charge your customer. This should be the same as the order amount. The maximum amount that can be blocked is ₹10,000. + +`currency` +: `string` The 3-letter ISO currency code for the payment. + +`order_id` +: `string` The unique identifier of the order created. + +`customer_id` +: `string` The unique identifier of the customer you want to charge. + +`upi.flow` +: `string` The UPI payment flow for the transaction. Here, the value must be `intent`. + +`recurring` +: `string` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`contact` +: `string` The customer's phone number. + +`email` +: `string` The customer's email address. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. + +`description` +: `string` A user-entered description for the payment. + + + +### Success Response Parameters + +`razorpay_payment_id` +: `string` The unique identifier of the payment created. For example, `pay_RtP3bnk51QvOF9`. + +`next` +: `array` A list of action objects describing the next steps to complete the payment. + +`next.action` +: `string` The type of action to perform. Possible values: + - `intent`: Redirects the customer to their TPAP app to approve the mandate. + - `poll`: Used to poll the payment status. + +`next.url` +: `string` The URL corresponding to the action. For `intent`, this is a UPI deep link. For `poll`, this is the Razorpay API endpoint to check payment status. + + + +### Error Response Parameters + +Given below is a list of possible errors you may face while making the authorisation payment. + + + bad_request_error + + - **Description**: Invalid Mandate Sequence Number. + - **Next Steps**: Retry after some time during the valid cycle. + + + +### bank_account_invalid + + - **Description**: Payment failed because Account linked to VPA is invalid. + - **Next Steps**: Create a new mandate with the customer. + + + +### bank_account_validation_failed + + - **Description**: Payment was unsuccessful as the details are invalid. Please retry with the right details. + - **Next Steps**: Ask the customer to retry again. + + + +### bank_not_available + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### bank_technical_error + + + + Bank Temporarily Unavailable + + - **Description**: Payment was unsuccessful as the bank linked to this UPI ID is temporarily unavailable. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Temporary Bank Issue + + - **Description**: Payment was unsuccessful due to a temporary issue at your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Bank Declined + + - **Description**: Payment was unsuccessful as it was declined by your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Bank or Wallet Gateway Error + + - **Description**: Payment processing failed due to error at bank or wallet gateway. + - **Next Steps**: Retry after some time. + + + +### General Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Bank Services Halt + + - **Description**: Payment was unsuccessful due to a temporary halt of services at this bank. + - **Next Steps**: Retry after some time. + + + + + + + +### credit_to_beneficiary_failed + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### debit_declined + + - **Description**: Payment was unsuccessful as it was declined by remitter bank. + - **Next Steps**: Create a new mandate with the customer. + + + +### debit_instrument_blocked + + - **Description**: Payment was unsuccessful as the account linked to this UPI ID is blocked. Try using another account. + - **Next Steps**: Create a new mandate with the customer. + + + +### duplicate_mandate_request + + - **Description**: Duplicate mandate request. Please try again with another mandate request. + - **Next Steps**: Please try again with another mandate request. + + + +### gateway_technical_error + + + + Bank or Wallet Gateway Error + + - **Description**: Payment processing failed due to error at bank or wallet gateway. + - **Next Steps**: Retry after some time. + + + +### Temporary Issue with Money Deduction + + - **Description**: Payment was unsuccessful due to a temporary issue. If money got deducted, reach out to the seller. + - **Next Steps**: Retry after some time. + + + + + + + +### incorrect_pin + + - **Description**: You have entered an incorrect PIN on the UPI app. Please retry with the correct PIN. + - **Next Steps**: Ask the customer to retry with correct PIN. + + + +### insufficient_funds + + - **Description**: Transaction failed due to insufficient funds. + - **Next Steps**: Ask the customer to add balance to their account and retry. + + + +### invalid_request + + - **Description**: Payment processing failed due to error at bank or wallet gateway. + - **Next Steps**: Retry after some time. + + + +### invalid_response_from_gateway + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### invalid_transaction_beneficiary + + - **Description**: Beneficiary address resolution failed. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### invalid_vpa + + - **Description**: You have entered an incorrect UPI ID. Please retry with the correct UPI ID. + - **Next Steps**: Ask the customer to retry with a valid VPA. + + + +### issuer_dispatch_failed + + - **Description**: Payment failed due to some issue at the issuer bank. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### limit_exceeded_remitting_bank + + - **Description**: Limit exceeded for remitter bank. Please ask customer to try with another bank account. + - **Next Steps**: Please ask customer to try with another bank account. + + + +### mandate_debit_beyond_psp_amount_cap + + - **Description**: Debit amount is beyond payer PSP specified amount cap. Please reduce the amount and try again. + - **Next Steps**: Please reduce the mandate amount to match customer PSP. + + + +### mandate_request_limit_breached + + - **Description**: Maximum number of mandate creation requests exceeded for customer's bank account. Please wait for some time before initiating new mandate creation requests. + - **Next Steps**: Please wait for some time before initiating new mandate creation requests. + + + +### mobile_number_invalid + + - **Description**: Registered Mobile number linked to the account has been changed or removed. + - **Next Steps**: Create a new mandate with the customer. + + + +### nature_of_debit_not_allowed + + - **Description**: Nature of debit not allowed in customer's account. Please ask the customer to use a different bank account. + - **Next Steps**: Please ask the customer to use a different bank account. + + + +### no_financial_address_record_found + + - **Description**: No financial address record found for this VPA. Please ask customer to try with another bank account. + - **Next Steps**: Please ask customer to try with other bank account. + + + +### no_original_request_found + + - **Description**: No mandate details were found in the record during debit. Please try after some time. + - **Next Steps**: Please try after some time. + + + +### payment_collect_request_expired + + - **Description**: Payment was unsuccessful as you could not pay with the UPI app within time. + - **Next Steps**: Retry after some time. + + + +### payment_declined + + + + Bank Declined Payment + + - **Description**: Payment was unsuccessful as it was declined by your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Ask the customer to retry with other account. + + + +### Customer Declined Payment + + - **Description**: You have declined the payment request on the UPI app. Please retry when you are ready. + - **Next Steps**: Ask the customer to approve the payment. + + + + + + + +### payment_failed + + - **Description**: Payment was unsuccessful due to a temporary issue. If amount got deducted, it will be refunded within 5-7 working days. + - **Next Steps**: Retry after 1 hour. + + + +### payment_pending + + - **Description**: The status of your payment is pending. You can either wait or retry to pay successfully. + - **Next Steps**: Retry after some time. + + + +### payment_risk_check_failed + + - **Description**: Payment was unsuccessful as your account does not pass the risk checks done by your bank. Try using another account. + - **Next Steps**: Retry after some time. + + + +### payment_timed_out + + - **Description**: Payment was unsuccessful as you could not complete it in time. + - **Next Steps**: Retry after some time. + + + +### pre_debit_notification_failed + + - **Description**: Unable to Notify the Customer. + - **Next Steps**: Retry after some time. + + + +### remitter_dispatch_failed + + - **Description**: Payment failed due to some issue at the customer's. Please try again after some time. + - **Next Steps**: Please try again after some time. + + + +### request_timed_out + + + + General Timeout - Temporary Issue + + - **Description**: Payment was unsuccessful due to a temporary issue. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Timeout - Bank Declined + + - **Description**: Payment was unsuccessful as it was declined by your bank. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + +### Timeout - Recurring Payment Creation + + - **Description**: Payment was unsuccessful as the recurring payment can not be created at this time. Any amount deducted will be refunded within 5-7 working days. + - **Next Steps**: Retry after some time. + + + + + + + +### transaction_frequency_limit_exceeded + + - **Description**: Payment failed. Please try again with another bank account. + - **Next Steps**: Create a new mandate with the customer. + + + +### transaction_limit_exceeded + + + + Amount Limit Exceeded + + - **Description**: Payment failed because Transaction amount limit has exceeded. + - **Next Steps**: Reach out to the customer to collect the amount. + + + +### Bank Account Amount Limit + + - **Description**: Payment was unsuccessful as you exceeded the amount limit on the bank account linked to this UPI ID. + - **Next Steps**: Ask the customer to retry after some time. + + + + + + + +### transaction_not_allowed + + - **Description**: Payment was unsuccessful as it was declined by your bank. Reach out to your bank for more details. Try using another account. + - **Next Steps**: Create a new mandate with the customer. + + + +### upi_dummy_payment + + - **Description**: Payment was a dummy payment for one time mandate registration. + - **Next Steps**: NA + + + + + +## Fetch Tokens + +In a Single Block Multiple Debit (SBMD) flow, the **Token** represents the unique mandate or authorisation. + +Term | Description +--- +Block | The customer authorises a specific amount (for example, ₹5,000) to be "blocked" in their bank account. +--- +Debits | You (the business) can then make multiple smaller debits (for example, ₹500, then ₹1,200) against that blocked amount as services are delivered. +--- +Token | This is the digital key that allows those subsequent debits to happen without the customer needing to enter their UPI PIN every single time. + +You can retrieve the `token_id` using the Dashboard or the APIs given below. + +### 2.1 Fetch Token by Customer id + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. + +> **WARN** +> +> +> **Watch Out!** +> +> - This endpoint will not fetch the details of expired and unused tokens. +> - The UPI tokens are not populated in the API response if the `save_vpa` feature is not enabled in your account. Please raise a request with our Support team to get this activated. +> + +The following endpoint retrieves tokens linked to a customer. + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +List tokens = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "token_RtOSr9o9lZwv5C", + "entity": "token", + "token": "9uZG3CE8KsVG9J", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "9876543210", + "handle": "upi", + "name": "GAURAV KUMAR", + "status": "valid", + "received_at": 1757596287 + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null, + "amount_blocked": 200, + "amount_debited": 100 + }, + "auth_type": null, + "mrn": null, + "used_at": 1766131328, + "created_at": 1766130600, + "start_time": 1766130592, + "notes": [], + "error_description": null, + "entity_id": null, + "dcc_enabled": false, + "max_amount": 200, + "expired_at": 1767091469 + }, + { + "id": "token_RtO5dfKe1AbBqd", + "entity": "token", + "token": "F6YFhWQ1SZSYLl", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "9325938054", + "handle": "upi", + "name": null, + "status": null, + "received_at": 1759590546 + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": null, + "created_at": 1766129281, + "start_time": 1766129266, + "notes": [], + "error_description": null, + "entity_id": null, + "dcc_enabled": false + } + ] +} +``` + + +### Path Parameter + + `id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + + + +### Response Parameters + +`entity` +: `string` The name of the entity. Here, it is `collection`. + +`count` +: `integer` The total number of tokens returned in the response. + +`items` +: `array` A list of token objects associated with the customer. + + `id` + : `string` The unique identifier of the token. For example, `token_RtOSr9o9lZwv5C`. + + `entity` + : `string` The name of the entity. Here, it is `token`. + + `token` + : `string` The token value used to identify the mandate. + + `bank` + : `string` The bank associated with the token. Returns `null` for UPI tokens. + + `wallet` + : `string` The wallet associated with the token. Returns `null` for UPI tokens. + + `method` + : `string` The payment method associated with the token. Here, it is `upi`. + + `vpa` + : `json object` Details of the customer's UPI VPA linked to the token. + + `username` + : `string` The username part of the customer's UPI + + `handle` + : `string` The handle (bank or PSP) part of the customer's UPI For example, `upi`. + + `name` + : `string` The account holder's name as registered with the bank. Returns `null` if not available. + + `status` + : `string` The status of the For example, `valid`. Returns `null` if not yet validated. + + `received_at` + : `integer` Unix timestamp at which the VPA was received. + + `recurring` + : `boolean` Indicates whether the token is enabled for recurring payments. Possible values: + - `true`: Token is enabled for recurring payments. + - `false`: Token us not enabled for recurring payments. + + `recurring_details` + : `json object` Details of the recurring mandate associated with the token. + + `status` + : `string` The status of the recurring mandate. For example, `confirmed`. + + `failure_reason` + : `string` The reason for mandate failure, if applicable. Returns `null` if there is no failure. + + `amount_blocked` + : `integer` The amount blocked against the mandate, in currency subunits. + + `amount_debited` + : `integer` The amount debited against the mandate so far, in currency subunits. + + `auth_type` + : `string` The authentication type used. Returns `null` if not applicable. + + `mrn` + : `string` The mandate reference number. Returns `null` if not yet assigned. + + `used_at` + : `integer` Unix timestamp at which the token was last used. Returns `null` if unused. + + `created_at` + : `integer` Unix timestamp at which the token was created. + + `start_time` + : `integer` Unix timestamp at which the mandate validity begins. + + `notes` + : `array` Key-value pairs used to store additional information. Returns an empty array if no notes are added. + + `error_description` + : `string` Description of the error, if any. Returns `null` for successful mandates. + + `entity_id` + : `string` The identifier of the entity linked to the token. Returns `null` if not applicable. + + `dcc_enabled` + : `boolean` Indicates whether Dynamic Currency Conversion (DCC) is enabled. Possible values: + - `true`: DCC is enabled. + - `false`: DCC is not enabled. + + `max_amount` + : `integer` The maximum amount that can be debited per transaction, in currency subunits. + + `expired_at` + : `integer` Unix timestamp at which the token expires. + + +### 2.2 Fetch Token by Payment id + +The following endpoint fetches the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_FHfAzEJ51k8NLj" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentid = "pay_FHfqtkRzWvxky4"; + +Payment payment = client.Payment.Fetch(paymentid); +``` + +```json: Response +{ + "id": "pay_RtP3bnk51QvOF9", + "entity": "payment", + "amount": 200, + "currency": "INR", + "status": "created", + "order_id": "order_RtP3VPM5YrzXr8", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_RtNzXmWrRe0Edr", + "token_id": "token_RtP3bvcI7tle25", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": null + }, + "created_at": 1766132688, + "upi": { + "vpa": null, + "flow": "intent" + } +} +``` + + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment whose details are to be fetched. For example, `pay_1Aa00000000002`. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the payment. For example, `pay_RtP3bnk51QvOF9`. + +`entity` +: `string` The name of the entity. Here, it is `payment`. + +`amount` +: `integer` The payment amount in currency subunits. + +`currency` +: `string` The ISO currency code for the payment. For example, `INR`. + +`status` +: `string` The status of the payment. + +`order_id` +: `string` The unique identifier of the order associated with the payment. + +`invoice_id` +: `string` The unique identifier of the invoice associated with the payment. Returns `null` if not applicable. + +`international` +: `boolean` Indicates whether the payment is an international transaction. Possible values: + - `true`: It is an international payment. + - `false`: It is a domestic payment. + +`method` +: `string` The payment method used. Here, it is `upi`. + +`amount_refunded` +: `integer` The amount refunded for the payment, in currency subunits. + +`refund_status` +: `string` The refund status of the payment. Returns `null` if no refund has been initiated. + +`captured` +: `boolean` Indicates whether the payment has been captured. Possible values: + - `true`: It is captured. + - `false`: It is not captured. + +`description` +: `string` A description for the payment. Returns `null` if not provided. + +`card_id` +: `string` The unique identifier of the card used for the payment. Returns `null` for UPI payments. + +`bank` +: `string` The bank associated with the payment. Returns `null` for UPI payments. + +`wallet` +: `string` The wallet used for the payment. Returns `null` for UPI payments. + +`vpa` +: `string` The customer's virtual payment address (VPA). Returns `null` until the mandate is confirmed. + +`email` +: `string` The customer's email address. + +`contact` +: `string` The customer's phone number. + +`customer_id` +: `string` The unique identifier of the customer. + +`token_id` +: `string` The unique identifier of the token created for the recurring payment mandate. + +`notes` +: `json object` Key-value pair used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. + +`fee` +: `integer` The fee charged by Razorpay for the payment, in currency subunits. Returns `null` if not yet captured. + +`tax` +: `integer` The tax charged on the Razorpay fee. Returns `null` if not yet captured. + +`error_code` +: `string` The error code if the payment failed. Returns `null` for successful payments. + +`error_description` +: `string` The description of the error. Returns `null` for successful payments. + +`error_source` +: `string` The source of the error. Returns `null` for successful payments. + +`error_step` +: `string` The step at which the error occurred. Returns `null` for successful payments. + +`error_reason` +: `string` The reason for the error. Returns `null` for successful payments. + +`acquirer_data` +: `json object` Acquirer-specific data for the payment. + +`acquirer_data.rrn` +: `string` The retrieval reference number (RRN) assigned by the bank. Returns `null` until the payment is processed. + +`created_at` +: `integer` Unix timestamp at which the payment was created. + +`upi` +: `json object` UPI details. + + `vpa` + : `string` The customer's UPI Returns `null` until the mandate is confirmed. + + `flow` + : `string` The UPI payment flow used. Here, it is `intent`. + + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` via the [payment.failed webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-failed). +> + + +### Path Parameters + + `id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + + +### 2.3 Fetch Token by Token id and Customer id + +Use this API to fetch token details using `token_id` and `customer_id` as path parameters. + +/v1/customers/:customer_id/tokens/:token_id + +```curl: Request +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_RtNzXmWrRe0Edr/tokens/token_RtOSr9o9lZwv5C +```json: Response +{ + "id": "token_RtOSr9o9lZwv5C", + "entity": "token", + "token": "9uZG3CE8KsVG9J", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "9876543210", + "handle": "upi", + "name": "GAURAV KUMAR", + "status": "valid", + "received_at": 1757596287 + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": "Mandate execution is completed.", + "amount_blocked": 200, + "amount_debited": 200 + }, + "auth_type": null, + "mrn": null, + "used_at": 1766131484, + "created_at": 1766130600, + "start_time": 1766130592, + "notes": [], + "error_description": null, + "entity_id": null, + "dcc_enabled": false, + "max_amount": 200, + "expired_at": 1767091469 +} +``` + + +### Path Parameters + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token to be fetched. For example, `token_1Aa00000000001`. + + + +### Response Parameters + +`id` +: `string` The unique identifier of the token. For example, `token_RtOSr9o9lZwv5C`. + +`entity` +: `string` The name of the entity. Here, it is `token`. + +`token` +: `string` The token value used to identify the mandate. + +`bank` +: `string` The bank associated with the token. Returns `null` for UPI tokens. + +`wallet` +: `string` The wallet associated with the token. Returns `null` for UPI tokens. + +`method` +: `string` The payment method associated with the token. Here, it is `upi`. + +`vpa` +: `json object` Details of the customer's UPI VPA linked to the token. + + `username` + : `string` The username part of the customer's UPI + + `handle` + : `string` The handle (bank or PSP) part of the customer's UPI For example, `upi`. + + `name` + : `string` The account holder's name as registered with the bank. + + `status` + : `string` The status of the For example, `valid`. + + `received_at` + : `integer` Unix timestamp at which the VPA was received. + +`recurring` +: `boolean` Indicates whether the token is enabled for recurring payments. Possible values: `true`, `false`. + +`recurring_details` +: `json object` Details of the recurring mandate associated with the token. + + `status` + : `string` The status of the recurring mandate. For example, `confirmed`. + + `failure_reason` + : `string` The reason for mandate failure, if applicable. + + `amount_blocked` + : `integer` The amount blocked against the mandate, in currency subunits. + + `amount_debited` + : `integer` The amount debited against the mandate so far, in currency subunits. + +`auth_type` +: `string` The authentication type used. Returns `null` if not applicable. + +`mrn` +: `string` The mandate reference number. Returns `null` if not yet assigned. + +`used_at` +: `integer` Unix timestamp at which the token was last used. + +`created_at` +: `integer` Unix timestamp at which the token was created. + +`start_time` +: `integer` Unix timestamp at which the mandate validity begins. + +`notes` +: `array` Key-value pairs used to store additional information. Returns an empty array if no notes are added. + +`error_description` +: `string` Description of the error, if any. Returns `null` for successful mandates. + +`entity_id` +: `string` The identifier of the entity linked to the token. Returns `null` if not applicable. + +`dcc_enabled` +: `boolean` Indicates whether Dynamic Currency Conversion (DCC) is enabled. Possible values: + - `true`: DCC is enabled. + - `false`: DCC is not enabled. + +`max_amount` +: `integer` The maximum amount that can be debited per transaction, in currency subunits. + +`expired_at` +: `integer` Unix timestamp at which the token expires. + + +## Create Subsequent Payments + +Once the initial amount block is authorised, you can execute debits against the mandate. For each debit, you need to: + +1. [Create an Order](#31-create-an-order-to-charge-the-customer) +2. [Initiate a Payment](#32-initiate-a-payment) + +> **INFO** +> +> +> **Handy Tips** +> +> Before initiating a debit, it is good practice to check the remaining funds available under the mandate to avoid payment failures. See [Track Mandate Funds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-reserve-pay/manage.md#track-mandate-funds). +> + +### 3.1 Create an Order to Charge the Customer + +You have to create a new order to charge a one time mandate. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", "INR"); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': 'INR', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "INR", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"INR", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + + + +### Response Parameters + +`id` +: `string` The unique identifier of the order. For example, `order_1Aa00000000002`. + +`entity` +: `string` The name of the entity. Here, it is `order`. + +`amount` +: `integer` The amount for which the order was created, in currency subunits. + +`amount_paid` +: `integer` The amount paid against the order, in currency subunits. + +`amount_due` +: `integer` The amount pending against the order, in currency subunits. + +`currency` +: `string` The ISO currency code for the order. For example, `INR`. + +`receipt` +: `string` The receipt number corresponding to the order. + +`offer_id` +: `string` The unique identifier of the offer applied to the order. Returns `null` if no offer is applied. + +`status` +: `string` The status of the order. + +`attempts` +: `integer` The number of payment attempts made against this order. + +`notes` +: `json object` Key-value pairs used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. + +`created_at` +: `integer` Unix timestamp at which the order was created. + + +### 3.2 Initiate a Payment + +Use the following endpoint to create a payment against the blocked amount. + +/v1/payments/create/json + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "order_id": "order_RtOeB96x8bofcC", + "customer_id": "cust_RtNzXmWrRe0Edr", + "token": "token_RtOSr9o9lZwv5C", + "recurring": true, + "contact": "9876543210", + "email":"gaurav.kumar@example.com", + "notes": { + "note_key 1": "note_key", + "note_key 2": "Beam me up Scotty" + }, + "description": "Creating recurring payment for Gaurav Kumar" +}' +```json: Response +{ + "razorpay_payment_id": "pay_RuXyQHNgfGG1TR", + "razorpay_order_id": "order_RuXyCmfRnPfWAE", + "razorpay_signature":"cbb5a15f3fe520148a677f8c01c5c4dc69823d" +} +``` + + +### Request Parameters + +`amount` +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`currency` +: `string` The 3-letter ISO currency code for the payment. + +`order_id` +: `string` The unique identifier of the order created. + +`customer_id` +: `string` The unique identifier of the customer you want to charge. + +`token` +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. + +`recurring` +: `string` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`contact` +: `string` The customer's phone number. + +`email` +: `string` The customer's email address. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. + +`description` +: `string` A user-entered description for the payment. + + + +### Response Parameters + +`razorpay_payment_id` +: `string` Unique identifier of the payment. + +`razorpay_order_id` +: `string` Unique identifier of the order. + +`razorpay_signature` +: `string` Signature generated for the payment. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-reserve-pay/manage.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-reserve-pay/manage.md new file mode 100644 index 00000000..7b6a5ec9 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-reserve-pay/manage.md @@ -0,0 +1,174 @@ +--- +title: Manage Mandates and Tokens +description: Track mandate funds, cancel tokens and delete tokens for UPI Reserve Pay (SBMD). +--- + +# Manage Mandates and Tokens + +Once your UPI Reserve Pay integration is live, you can use the following APIs to monitor and manage active mandates. + +## Track Mandate Funds + +Use the `recurring_details` object to monitor the utilisation of funds within an active mandate. This object is available in the response of the [Fetch Token by Customer id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-reserve-pay/integration-steps.md#21-fetch-token-by-customer-id) and [Fetch Token by Token id and Customer id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-reserve-pay/integration-steps.md#23-fetch-token-by-token-id-and-customer) APIs. This object contains the following parameters: + +Parameter | Description +--- +`amount_blocked` | The total amount the customer authorised at the start. +--- +`amount_debited` | The cumulative sum of all successful debits made against this token to date. + +> **INFO** +> +> +> **Handy Tips** +> +> To find the remaining amount available for future debits, subtract the `amount_debited` from the `amount_blocked`. This allows you to manage customer expectations and ensure you do not initiate a debit that exceeds the remaining authorised limit. +> + +## Cancel Tokens + +The blocked amount under a UPI Reserve Pay token can be released in two ways: + + + Use the [Cancel Token API](#cancel-token-api) below to release the blocked funds. When this API is called, all remaining funds under the token are unblocked and credited to the customer's bank account instantly. + + + If you do not cancel the token and the token balance is not fully utilised before expiry, Razorpay automatically triggers a reversal of the remaining funds 10 minutes before the token expires. + + +Released funds reflect in the customer's account instantly. The bank statement may not display this as a separate credit entry, but the account balance is updated immediately. + +> **INFO** +> +> +> **Handy Tips** +> +> Ensure customers are informed that their funds remain blocked until you explicitly release them or the token expires. +> + +### Cancel Token API + +The following endpoint initiates cancellation of the mandate from NPCI. + +/customers/:customer_id/tokens/:token_id/cancel + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PUT https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001/cancel +```json: Response +{ + "status": "cancellation_initiated" +} +``` + + +### Path Parameters + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be cancelled. For example, `token_1Aa00000000001`. + + +## Delete Tokens + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot delete an active token. Before deleting a token, you must first cancel the mandate using the [Cancel Token API](#cancel-token-api). Attempting to delete a token that has not been cancelled will result in an error. Only proceed with deletion once the token status is `cancelled`. +> + +Deleting a token removes it from Razorpay's database. The deleted token will not appear on the Dashboard or when all tokens are fetched. However, it does not cancel the mandate at NPCI. To cancel the mandate first, use the [Cancel Token API](#cancel-token-api). + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameters + + `customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-reserve-pay/webhooks.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-reserve-pay/webhooks.md new file mode 100644 index 00000000..dec3cae9 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-reserve-pay/webhooks.md @@ -0,0 +1,122 @@ +--- +title: Webhooks +description: Subscribe to UPI Reserve Pay webhook events to track token and mandate status. +--- + +# Webhooks + +Subscribe to the following webhook events to receive real-time notifications about token and mandate status changes. For general webhook setup instructions, see [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + +## token.confirmed + +Sent when the customer approves the mandate after completing the authorisation flow. Once you receive this event, the mandate is active and funds are blocked. You can safely proceed to create subsequent payments. + +```json: token.confirmed +{ + "entity": "event", + "account_id": "acc_EDUGNVWZIB7Ewb", + "event": "token.confirmed", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_RtP3bvcI7tle25", + "entity": "token", + "token": "4w03TrEDtkjmEJ", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "9876543210", + "handle": "upi", + "name": "GAURAV KUMAR", + "status": "valid", + "received_at": 1757596287 + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null, + "amount_blocked": 200, + "amount_debited": 0 + }, + "auth_type": null, + "mrn": null, + "used_at": null, + "created_at": 1766132688, + "start_time": 1766132682, + "notes": [], + "error_description": null, + "entity_id": null, + "dcc_enabled": false, + "max_amount": 200, + "expired_at": 1767091469 + } + } + }, + "created_at": 1766133037 +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> There is no mandate rejection option in the TPAP apps during testing. +> + +## token.cancellation_initiated + +Sent when a cancellation request is acknowledged by NPCI. This event confirms that the cancellation process has begun; the blocked funds will be released to the customer's account once the cancellation is complete. + +```json: token.cancellation_initiated +{ + "entity": "event", + "account_id": "acc_EDUGNVWZIB7Ewb", + "event": "token.cancellation_initiated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_RtOSr9o9lZwv5C", + "entity": "token", + "token": "9uZG3CE8KsVG9J", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "9876543210", + "handle": "upi", + "name": "GAURAV KUMAR", + "status": "valid", + "received_at": 1757596287 + }, + "recurring": true, + "recurring_details": { + "status": "cancellation_initiated", + "failure_reason": "Mandate execution is completed.", + "amount_blocked": 200, + "amount_debited": 200 + }, + "auth_type": null, + "mrn": null, + "used_at": 1766131484, + "created_at": 1766130600, + "start_time": 1766130592, + "notes": [], + "error_description": null, + "entity_id": null, + "dcc_enabled": false, + "max_amount": 200, + "expired_at": 1767091469 + } + } + }, + "created_at": 1766380810 +} +``` diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-tpv/authorization-transaction.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-tpv/authorization-transaction.md new file mode 100644 index 00000000..cae87363 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-tpv/authorization-transaction.md @@ -0,0 +1,1329 @@ +--- +title: 1. Create the Authorisation Transaction +description: Learn how to create an authorisation transaction for UPI. +--- + +# 1. Create the Authorisation Transaction + +You can create an authorisation transaction using the [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +## 1.1 Using Razorpay APIs + +You can create an authorisation transaction with the UPI Collect payment method using the following APIs: + + +### 1.1.1 Create a Customer + + Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + + Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + + +### Request Parameters + + `name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + + + + +### 1.1.2. Create an Order + + Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + + + + Sample Code + + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":100, + "currency":"INR", + "customer_id":"cust_4xbQrmEoA5WJ01", + "method":"upi", + "token":{ + "max_amount":200000, + "expire_at":2709971120, + "frequency":"monthly", + "recurring_value": 25, + "recurring_type": "on" + }, + "bank_account":{ + "account_number":"123456789012345", + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + }, + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 100); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_4xbQrmEoA5WJ01"); +orderRequest.put("method", "upi"); +orderRequest.put("receipt", "receipt#1"); +JSONObject token = new JSONObject(); +token.put("max_amount","200000"); +token.put("expire_at","2709971120"); +token.put("frequency","monthly"); +token.put("recurring_value","25"); +token.put("recurring_type","on"); +orderRequest.put("token", token); +JSONObject bank_account = new JSONObject(); +bank_account.put("account_number","123456789012345"); +bank_account.put("name","Gaurav Kumar"); +bank_account.put("ifsc","HDFC0000053"); +orderRequest.put("bank_account", bank_account); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','method' => 'upi','customer_id' => 'cust_4xbQrmEoA5WJ01', 'token' => array('max_amount' => 200000, 'expire_at' => 2709971120, 'frequency' => 'monthly', 'recurring_value' => '25', 'recurring_type' => 'on'),'bank_account' => array('account_number' => 123456789012345, 'name' => Gaurav Kumar, 'ifsc' => 'HDFC0000053'),'receipt' => 'Receipt No. 1' ,'notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'))); + +```javascript: Node.js +var instance = new Razorpay({ + key_id: 'YOUR_KEY_ID', + key_secret: 'YOUR_SECRET' +}) + +instance.orders.create({ + amount: 0, + currency: "INR", + method: "upi", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "netbanking", + max_amount: 9999900, + expire_at: 4102444799, + recurring_value: 25, + recurring_type: "on", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }, + bank_account: { + account_number: 123456789012345, + name: "Gaurav Kumar", + ifsc: "HDFC0000053" + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount":0, + "currency":"INR", + "method":"upi", + "customer_id":"cust_1Aa00000000001", + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Beam me up Scotty", + "notes_key_2":"Engage" + }, + "token":{ + "auth_type":"netbanking", + "max_amount":9999900, + "expire_at":4102444799, + "recurring_value": 25, + "recurring_type": "on", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } + }, + "bank_account":{ + "account_number":123456789012345, + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 0, + "currency": "INR", + "method": "upi", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "recurring_value": 25, + "recurring_type": "on", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + }, + "bank_account":{ + "account_number":123456789012345, + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + } +} +Razorpay.Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount":100, + "currency":"INR", + "customer_id":"", + "method":"upi", + "token":map[string]interface{}{ + "max_amount":5000, + "expire_at":2709971120, + "frequency":"monthly", + "recurring_value": 25, + "recurring_type": "on" + }, + "bank_account":map[string]interface{}{ + "account_number":123456789012345, + "name":Gaurav Kumar, + "ifsc":"HDFC0000053", + }, + "receipt":"Receipt No. 1", + "notes":map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf.", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_1Aa00000000002", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "method": "upi", + "attempts": 0, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + "created_at": 1565172642 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"invaild_account_number", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + }, + "field":"bank_account.account_number" + } +} +``` + + + + + + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount, in paise. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _mandatory_ +: `string` Payment method for the authorisation transaction. Here, the value should be `upi`. + +`receipt` _optional_ +: `string` Unique identifier for the order entered by you. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: Details related to the authorization such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be debited in a single charge. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The default value is 10 years and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + + `recurring_value` _optional_ + : `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + + `recurring_type` _optional_ + : `string` Determines when the recurring debit can be done. Possible values are: + - `on`: Recurring debit happens on the exact day of every month. + +> **INFO** +> +> +> **Handy Tips** +> +> For creating an order with `recurring_type`=`on`, set the `recurring_value` parameter to the current date. +> + + - `before`: Recurring debit can happen any time before the specified date. + - `after`: Recurring debit can happen any time after the specified date. + + For example, if the frequency is `monthly`, recurring_value is `17` and recurring_type is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if recurring_type is `after`, recurring debit can only happen on or after the 17th of the month. + +`bank_account` _mandatory_ +: Details of the bank account of the customer. + + `account_number` _mandatory_ + : `integer` The bank account number of the customer. For example, `123456789012345`. + + `name` _mandatory_ + : `string` The name of the bank account holder. + + `ifsc` _mandatory_ + : The IFSC of the bank. For example, `HDFC0000053`. + + + + + + +### 1.1.3. Validate the VPA (UPI ID) + + Use the below endpoint to validate the customer's UPI ID. + + /payments/validate/vpa + + + + Sample Code + + ```curl: Request + curl -u : \ + -X POST https://api.razorpay.com/v1/payments/validate/vpa \ + -H "Content-Type: application/json" \ + -d '{ + "vpa": "gauravkumar@exampleupi" + }' + ```json: Response + { + "vpa": "gauravkumar@exampleupi", + "success": true, + "customer_name": "Gaurav Kumar" + } + ``` + + **Request Parameters** + + `vpa` _mandatory_ + : `string` The UPI ID you want to validate. For example, `gauravkumar@exampleupi`. + + + + + + + +### 1.1.4. Create an Authorisation Payment + + Once an order is created, your next step is to create a payment. Use the below endpoint to create a payment with payment method `upi`. + + /payments/create/upi + + + ```curl: Request + curl -u : \ + -X POST https://api.razorpay.com/v1/payments/create/upi \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 200, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "customer_id": "cust_EIW4T2etiweBmG", + "recurring": "1", + "method": "upi", + "upi": { + "flow": "collect", + "vpa": "gauravkumar@exampleupi", + "expiry_time": 5 + }, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "save": true, + "notes": { + "note_key": "value1" + } + }' + ```json: Response + { + "razorpay_payment_id": "pay_EAm09NKReXi2e0" + } + ``` + + + + + Request Parameters + + `amount` _mandatory_ + : `integer` The amount associated with the payment in smallest unit of the supported currency. For example, `2000` means ₹20. Must match the amount in [Step 1.1.2.: Create an Order](/#112-create-an-order). + + `currency` _mandatory_ + : `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + + `order_id` _mandatory_ + : `string` The unique identifier of the order created in [Step 1.1.2.: Create an Order](/#112-create-an-order). + + `email` _mandatory_ + : `string` The customer's email address. For example, `gaurav.kumar@example.com`. + + `contact` _mandatory_ + : `string` The customer's contact number. For example, `9123456780`. + + `customer_id` _mandatory_ + : `string` Unique identifier of the customer, obtained from the response of [Step 1.1.1.: Create an Customer](#111-create-a-customer). + + `recurring` _mandatory_ + : `string` Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this when you want to support recurring payments and one-time payment in the same flow. + + `method` _mandatory_ + : `string` The payment method selected by the customer. Here, the value must be `upi`. + + `upi` + : Details of the expiry of the UPI link + + `flow` _mandatory_ + : `string` Specify the type of the UPI payment flow. + Possible values are: + - `collect` (default) + - `intent` + + `vpa` _mandatory_ + : `string` VPA of the customer where the collect request will be sent. + + `expiry_time` _mandatory_ + : `integer` Period of time (in minutes) after which the link will expire. The default value is **5**. + + `ip` _mandatory_ + : `string` Client's browser IP address. For example, **117.217.74.98**. + + `referer` _mandatory_ + : `string` Value of `referer` header passed by the client's browser. For example, **https://example.com/** + + `user_agent` _mandatory_ + : `string` Value of `user_agent` header passed by the client's browser. +For example, **Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36** + + `description` _optional_ + : `string` Descriptive text of the payment. + + `save` _optional_ + : `boolean` Specifies if the VPA should be stored as a token. Possible values: + - `true`: Saves the VPA details. + - `false`(default): Does not save the VPA details. + + `notes` _optional_ + : `json object` Key-value pairs that can hold additional information about the payment. + Refer to the [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) section of the API Reference Guide. + + + + + + **Response Parameters** + + If the payment request is valid, the response contains the following fields. Refer to the [UPI Collect Flow document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/collect.md#step-4-initiate-a-payment) for more details. + + `razorpay_payment_id` + : `string` Unique reference for the payment created. For example, `pay_EAm09NKReXi2e0`. + + + +## 1.2. Using a Registration Link + +Registration Links are an alternate way of creating an authorisation transaction. If you create a registration link, you need not create a customer or an order. + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. The customer can use the invoice to make the Authorisation Payment. + +Know how to [create Registration Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md) using the Dashboard. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use webhooks to get notifications about successful payments against a registration link. Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks). +> + +A registration link must always have the amount (in Paise) that the customer will be charged when making the authorisation payment. For UPI, the amount must be a minimum of `₹1`. + +### 1.2.1. Create a Registration Link + +The following endpoint creates a registration link. + +/subscription_registration/auth_links + +```curl: Curl +curl -u : +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780" + }, + "type":"link", + "amount":"100", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":{ + "method":"upi", + "max_amount":"500", + "expire_at":4102444799, + "frequency":"monthly", + "recurring_value": 25, + "recurring_type": "on", + "bank_account":{ + "account_number":"123456789012345", + "name":"Gaurav Kumar", + "ifsc_code":"HDFC0000053" + } + }, + "receipt":"Receipt No. 23", + "email_notify":true, + "sms_notify":true, + "expire_by":4102444799, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject registrationLinkRequest = new JSONObject(); +JSONObject customer = new JSONObject(); +customer.put("name","Gaurav Kumar"); +customer.put("email","gaurav.kumar@example.com"); +customer.put("contact","9123456780"); +registrationLinkRequest.put("customer", customer); +registrationLinkRequest.put("type", "link"); +registrationLinkRequest.put("amount", 100); +registrationLinkRequest.put("currency", "INR"); +registrationLinkRequest.put("description", "Registration Link for Gaurav Kumar"); +JSONObject subscriptionRegistration = new JSONObject(); +subscriptionRegistration.put("method","upi"); +subscriptionRegistration.put("max_amount",50000); +subscriptionRegistration.put("expire_at",1609423824); +subscriptionRegistration.put("frequency","monthly"); +subscriptionRegistration.put("recurring_value","25"); +subscriptionRegistration.put("recurring_type","on"); +JSONObject bank_account = new JSONObject(); +bank_account.put("account_number","123456789012345"); +bank_account.put("name","Gaurav Kumar"); +bank_account.put("ifsc_code","HDFC0000053"); +registrationLinkRequest.put("subscription_registration", subscriptionRegistration); +registrationLinkRequest.put("receipt", "Receipt No. #112"); +registrationLinkRequest.put("email_notify", true); +registrationLinkRequest.put("sms_notify", true); +registrationLinkRequest.put("expire_by", 1580479824); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +registrationLinkRequest.put("notes", notes); + +Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('method'=>'upi','max_amount'=>'500','expire_at'=>'1634215992','recurring_value'=>'25','recurring_type'=>'on',bank_account' => array('account_number' => 123456789012345, 'name' => Gaurav Kumar, 'ifsc_code' => 'HDFC0000053')),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992,'notes' => array('note_key 1' => 'Beam me up Scotty','note_key 2' => 'Tea. Earl Gray. Hot.'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 100, + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + method: "upi", + max_amount: 500, + expire_at: 1634215992, + recurring_value: 25, + recurring_type: "on", + bank_account: { + account_number: 123456789012345, + name: "Gaurav Kumar", + ifsc_code: "HDFC0000053" + } + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "method": "upi", + "max_amount": 500, + "expire_at": 1634215992, + "recurring_value": 25, + "recurring_type": "on", + "bank_account": { + "account_number": 123456789012345, + "name": "Gaurav Kumar", + "ifsc_code": "HDFC0000053" + } + }, + "receipt": "Receipt No. 5", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::SubscriptionRegistration.create(para_attr) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.registration_link.create({ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":9123456780 + }, + "type":"link", + "amount":100, + "currency":"INR", + "description":"12 p.m. Meals", + "subscription_registration":{ + "method":"upi", + "expire_at":1580480689, + "max_amount":500, + "recurring_value": 25, + "recurring_type": "on", + "bank_account": { + "account_number": 123456789012345, + "name": "Gaurav Kumar", + "ifsc_code": "HDFC0000053" + } + }, + "receipt":"Receipt no. 1", + "expire_by":1880480689, + "sms_notify": True, + "email_notify": True, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "customer":map[string]interface{}{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + }, + "type":"link", + "amount":"100", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":map[string]interface{}{ + "method":"upi", + "max_amount":"500", + "expire_at":1609423824, + "frequency": "monthly", + "recurring_value": 25, + "recurring_type": "on", + "bank_account": { + "account_number": 123456789012345, + "name": "Gaurav Kumar", + "ifsc_code": "HDFC0000053" + } + }, + "receipt":"Receipt No. 1", + "email_notify":true, + "sms_notify":true, + "expire_by":1681987284, + "notes":map[string]interface{}{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot.", + }, +} +body, err := client.Invoice.CreateRegistrationLink(data, nil) + +```json: Response +{ + "id": "inv_FHr1ekX0r2VCVK", + "entity": "invoice", + "receipt": "Receipt No. 23", + "invoice_number": "Receipt No. 23", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHr1ehR3nmNeXo", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 4102444799, + "issued_at": 1595489219, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595489219, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/ak1WxDB", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595489219, + "idempotency_key": null +} +``` + +#### Request Parameters + +`customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + +`subscription_registration` +: Details of the authorisation transaction. + + `method` _mandatory_ + : `string` The payment method used to make authorisation transaction. Here, it is `card`. + + `max_amount` _mandatory_ + : `integer` Use to set the maximum amount (in paise) per debit request. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _optional_ + : `integer` The Unix timestamp till when you can use the token to charge the customer subsequent payments. The default value is 10 years and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + +`recurring_value` _optional_ +: `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + +`recurring_type` _optional_ +: `string` Determines when the recurring debit can be done. Possible values are: + +- `on`: recurring debit happens on the exact day of every month. + - `before`: recurring debit can happens any time before the specified date. + - `after`: recurring debit can happens any time after the specified date. + +For example, if the frequency is `monthly`, recurring_value is `17` and recurring_type is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if recurring_type is `after`, recurring debit can only happen on or after the 17th of the month. + + `bank_account` _mandatory_ + : Details of the bank account of the customer. + + `account_number` _mandatory_ + : `integer` The bank account number of the customer. For example, `123456789012345`. + + `name` _mandatory_ + : `string` The name of the bank account holder. + + `ifsc` _mandatory_ + : `string` The IFSC of the bank. For example, `HDFC0000053`. + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + +#### Path Parameters + +`id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-tpv/subsequent-payments.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-tpv/subsequent-payments.md new file mode 100644 index 00000000..6b64f998 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-tpv/subsequent-payments.md @@ -0,0 +1,429 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is authorised. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created when you created the authorisation transaction. + +Use the below endpoint to create an order: + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"INR", + "payment_capture":true, + "method":"upi", + "bank_account":{ + "account_number":"123456789012345", + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + }, + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", "INR"); +orderRequest.put("payment_capture", true); +orderRequest.put("method", "upi"); +JSONObject bank_account = new JSONObject(); +bank_account.put("account_number","123456789012345"); +bank_account.put("name","Gaurav Kumar"); +bank_account.put("ifsc","HDFC0000053"); +orderRequest.put("bank_account", bank_account); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true,'method' => 'upi','bank_account' => array('account_number' => 123456789012345, 'name' => Gaurav Kumar, 'ifsc' => 'HDFC0000053'),'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "method":"upi", + "bank_account": { + "account_number": 123456789012345, + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + }, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': 'INR', + 'payment_capture': True, + 'method': 'upi', + 'bank_account':{ + 'account_number':123456789012345, + 'name':'Gaurav Kumar', + 'ifsc':'HDFC0000053' + }, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "INR", + "payment_capture": true, + "method":"upi", + "receipt": "Receipt No. 1", + "bank_account":{ + "account_number":123456789012345, + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"INR", + "payment_capture": true, + "method":"upi", + "bank_account":map[string]interface{}{ + "account_number":123456789012345, + "name":Gaurav Kumar, + "ifsc":"HDFC0000053", + }, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_1Aa00000000002", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "bank_account":{ + "account_number":"123456789012345", + "name":"Gaurav Kumar", + "ifsc":"HDFC0000053" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + "created_at": 1565172642 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is `100` (₹1). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether tha payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +`bank_account` _mandatory_ +: Details of the bank account of the customer. + + `account_number` _mandatory_ + : `integer` The bank account number of the customer. For example, `123456789012345`. + + `name` _mandatory_ + : `string` The name of the bank account holder. + + `ifsc` _mandatory_ + : The IFSC of the bank. For example, `HDFC0000053`. + +## 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +> **INFO** +> +> +> **UPI Payments** +> +> - We recommend sending a pre-debit notification to the customer 48 hours before the debit date. +> - For UPI, it may take between 24-36 hours for the subsequent payment to reflect on your Dashboard. +> - This is because of the failure of pre-debit notification and/or any retries that we attempt for the payment. +> - Do not create another subsequent payment until you get the status of the previous one. +> + +> **WARN** +> +> +> **UPI Payments** +> +> - The subsequent payment may fail if there is late authorisation of an earlier payment. +> - For UPI, **do not** create subsequent payments on the last day of the cycle. This will cause the payment to fail. +> + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-tpv/tokens.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-tpv/tokens.md new file mode 100644 index 00000000..ed22f4f7 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-tpv/tokens.md @@ -0,0 +1,389 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_FHfAzEJ51k8NLj" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentid = "pay_FHfqtkRzWvxky4"; + +Payment payment = client.Payment.Fetch(paymentid); +``` + +```json: Debit Payment +{ + "id": "pay_FHfAzEJ51k8NLj", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfANdTUYeP8lb", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfAzGzREc1ug6", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595447490 +} +```json: Authorisation Payment +{ + "id": "pay_QDhVJ5M23wt4rh", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "failed", + "order_id": "order_QDhT2PqFJvtg4y", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "success@razorpay", + "email": "gaurav.kumar@example.com", + "contact": "+919123456780", + "customer_id": "cust_Q0g6LTYw3obZEn", + "token_id": "token_QDhVJHYr5m87fF", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey\u2026 decaf.", + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + "optimizer_provider_name": "razorpay" + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment was a dummy payment for one time mandate registration.", + "error_source": "business", + "error_step": "payment_initiation", + "error_reason": "upi_dummy_payment", + "acquirer_data": { + "rrn": null + }, + "gateway_provider": "Razorpay", + "created_at": 1743490280, + "upi": { + "vpa": "success@razorpay" + } +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` via the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +## 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> - This endpoint will not fetch the details of expired and unused tokens. +> - The UPI tokens are not populated in the API response if the `save_vpa` feature is not enabled in your account. Please raise a request with our Support team to get this activated. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +List tokens = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +## 2.3. Delete Tokens + +> **WARN** +> +> +> **Watch Out!** +> +> Deleting a token removes it from Razorpay's database. The deleted token will not appear on the Dashboard or when all tokens are fetched. However, it does not cancel the mandate. If you wish to cancel the mandate from NPCI, use the [Cancel Token API](#24-cancel-token). +> + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameters + + `customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + + +## 2.4. Cancel Token +The following endpoint initiates cancellation of the mandate from NPCI. + +/customers/:customer_id/tokens/:token_id/cancel + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PUT https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001/cancel +```json: Response +{ + "status": "cancellation_initiated” +} +``` + + +### Path Parameters + + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be cancelled. For example, `token_1Aa00000000001`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi/authorization-transaction.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi/authorization-transaction.md new file mode 100644 index 00000000..adb17c2b --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi/authorization-transaction.md @@ -0,0 +1,1262 @@ +--- +title: 1. Create the Authorisation Transaction +description: Learn how to create an authorisation transaction for UPI. +--- + +# 1. Create the Authorisation Transaction + +> **WARN** +> +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated for new UPI Autopay registrations effective 28 February 2026. +> - Customers can no longer register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> - Subsequent debits for existing mandates created via UPI Collect will continue to be executed without change. +> +> **Exemptions** +> +> UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only). +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required** +> +> - If you are a new Razorpay user, use UPI Intent. +> - If you are an existing Razorpay user not covered by exemptions, you must remove the UPI Collect flow parameters from your Create Authorization Payment API request and migrate to UPI Intent or UPI QR code to continue accepting UPI Autopay registrations. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/recurring-payments/s2s-integration.md). +> +> + +You can create an authorisation transaction using the [Razorpay APIs](#11-using-razorpay-apis) or [Registration Link](#12-using-a-registration-link). + +## 1.1 Using Razorpay APIs + +To create an authorisation transaction using the Razorpay APIs, you need to: + +1. [Create a Customer](#111-create-a-customer). +1. [Create an Order](#112-create-an-order). +1. [Validate the UPI ID](#113-validate-the-vpa-upi-id). +1. [Create Authorisation Payment using Razorpay APIs](#114-create-an-authorization-payment-upi-collect-flow). + +### 1.1.1 Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + + +### Request Parameters + + `name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + +### 1.1.2. Create an Order + +Use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) to create a unique Razorpay `order_id` that is associated with the authorisation transaction. The following endpoint creates an order. + +/orders + + +### Sample Code + + +```cURL: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "customer_id": "cust_4xbQrmEoA5WJ01", + "method": "upi", + "token": { + "max_amount": 200000, + "expire_at": 2709971120, + "frequency": "monthly", + "recurring_value": 25, + "recurring_type": "on" + }, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 100); +orderRequest.put("currency", "INR"); +orderRequest.put("customer_id", "cust_4xbQrmEoA5WJ01"); +orderRequest.put("method", "upi"); +orderRequest.put("receipt", "receipt#1"); +JSONObject token = new JSONObject(); +token.put("max_amount","200000"); +token.put("expire_at","2709971120"); +token.put("frequency","monthly"); +token.put("recurring_value","25"); +token.put("recurring_type","on"); +orderRequest.put("token", token); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 0,'currency' => 'INR','method' => 'upi','customer_id' => 'cust_4xbQrmEoA5WJ01', 'token' => array('max_amount' => 200000, 'expire_at' => 2709971120, 'frequency' => 'monthly', 'recurring_value' => '25', 'recurring_type' => 'on'),'receipt' => 'Receipt No. 1' ,'notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 0, + currency: "INR", + method: "upi", + customer_id: "cust_1Aa00000000001", + receipt: "Receipt No. 1", + notes: { + notes_key_1: "Beam me up Scotty", + notes_key_2: "Engage" + }, + token: { + auth_type: "netbanking", + max_amount: 9999900, + expire_at: 4102444799, + recurring_value: 25, + recurring_type: "on", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount":0, + "currency":"INR", + "method":"upi", + "customer_id":"cust_1Aa00000000001", + "receipt":"Receipt No. 1", + "notes":{ + "notes_key_1":"Beam me up Scotty", + "notes_key_2":"Engage" + }, + "token":{ + "auth_type":"netbanking", + "max_amount":9999900, + "expire_at":4102444799, + "recurring_value": 25, + "recurring_type": "on", + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } + } +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 0, + "currency": "INR", + "method": "upi", + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "recurring_value": 25, + "recurring_type": "on", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } +} +Razorpay.Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount":100, + "currency":"INR", + "customer_id":"", + "method":"upi", + "token":map[string]interface{}{ + "max_amount":5000, + "expire_at":2709971120, + "frequency":"monthly", + "recurring_value": 25, + "recurring_type": "on" + }, + "receipt":"Receipt No. 1", + "notes":map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey... decaf.", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_1Aa00000000002", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + "created_at": 1565172642 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The api key provided is invalid", + "source":"NA", + "step":"NA", + "reason":"NA", + "metadata":{ + + } + } +} +``` + + + + +### Request Parameters + + `amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer. For example, `cust_4xbQrmEoA5WJ01`. + +`method` _mandatory_ +: `string` The authorisation method. Here, it is `upi`. + +`receipt` _optional_ +: `string` A user-entered unique identifier of the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: Details related to the authorisation such as max amount, frequency and expiry information. + + `max_amount` _mandatory_ + : `integer` The maximum amount that can be debited in a single charge. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _mandatory_ + : `integer` The Unix timestamp that indicates when the authorisation transaction must expire. The default value is 10 years and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + + `recurring_value` _optional_ + : `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + + `recurring_type` _optional_ + : `string` Determines when the recurring debit can be done. Possible values are: + - `on`: Recurring debit happens on the exact day of every month. + +> **INFO** +> +> +> **Handy Tips** +> +> For creating an order with `recurring_type`=`on`, set the `recurring_value` parameter to the current date. +> + + - `before`: Recurring debit can happen any time before the specified date. + - `after`: Recurring debit can happen any time after the specified date. + + For example, if the `frequency` is `monthly`, `recurring_value` is `17` and `recurring_type` is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if `recurring_type` is `after`, recurring debit can only happen on or after the 17th of the month. + + +### 1.1.3. Validate the VPA (UPI ID) + +Use the below endpoint to validate the customer's UPI ID. + +/payments/validate/vpa + + +### Sample Code + + ```curl: Request + curl -u : \ + -X POST https://api.razorpay.com/v1/payments/validate/vpa \ + -H "Content-Type: application/json" \ + -d '{ + "vpa": "gauravkumar@exampleupi" + }' + ```json: Response + { + "vpa": "gauravkumar@exampleupi", + "success": true, + "customer_name": "Gaurav Kumar" + } + ``` + + +#### Request Parameter + +`vpa` _mandatory_ +: `string` The UPI ID you want to validate. For example, `gauravkumar@exampleupi`. + +### 1.1.4. Create an Authorisation Payment (UPI Collect Flow) + +Once an order is created, your next step is to create a payment. Use the below endpoint to create a payment with payment method `upi`. + +/payments/create/upi + + +### Sample Code + + + ```curl: Request + curl -u : \ + -X POST https://api.razorpay.com/v1/payments/create/upi \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 200, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "customer_id": "cust_EIW4T2etiweBmG", + "recurring": "1", + "method": "upi", + "upi": { + "flow": "collect", + "vpa": "gauravkumar@exampleupi", + "expiry_time": 5 + }, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "save": true, + "notes": { + "note_key": "value1" + } + }' + ```json: Response + { + "razorpay_payment_id": "pay_EAm09NKReXi2e0" + } + ``` + + + + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount associated with the payment in smallest unit of the supported currency. For example, `2000` means ₹20. Must match the amount in [Step 1.1.2.: Create an Order](/#112-create-an-order). + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in [Step 1.1.2.: Create an Order](/#112-create-an-order). + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `9123456780`. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer, obtained from the response of [Step 1.1.1.: Create an Customer](#111-create-a-customer). + +`recurring` _mandatory_ +: `string` Possible values: + - `1`: Recurring payment is enabled. + - `preferred`: Use this when you want to support recurring payments and one-time payment in the same flow. + +`method` _mandatory_ +: `string` The payment method selected by the customer. Here, the value must be `upi`. + +`upi` +: `object` Details of the expiry of the UPI link + + `flow` _mandatory_ + : `string` Specify the type of the UPI payment flow. + Possible values are: + - `collect` (default) + - `intent` + + `vpa` _mandatory_ + : `string` VPA of the customer where the collect request will be sent. + + `expiry_time` _mandatory_ + : `integer` Period of time (in minutes) after which the link will expire. The default value is **5**. + +`ip` _mandatory_ +: `string` Client's browser IP address. For example, **117.217.74.98**. + +`referer` _mandatory_ +: `string` Value of `referer` header passed by the client's browser. For example, **https://example.com/** + +`user_agent` _mandatory_ +: `string` Value of `user_agent` header passed by the client's browser. +For example, **Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36** + +`description` _optional_ +: `string` Descriptive text of the payment. + +`save` _optional_ +: `boolean` Specifies if the VPA should be stored as a token. Possible values: + - `true`: Saves the VPA details. + - `false`(default): Does not save the VPA details. + +`notes` _optional_ +: `json object` Key-value pairs that can hold additional information about the payment. + Refer to the [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) section of the API Reference Guide. + + + +#### Response Parameters + +If the payment request is valid, the response contains the following fields. Refer to the [UPI Collect Flow document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/collect.md#step-4-initiate-a-payment) for more details. + +`razorpay_payment_id` +: `string` Unique reference for the payment created. For example, `pay_EAm09NKReXi2e0`. + +## 1.2. Using a Registration Link + +Registration Links are an alternate way of creating an authorisation transaction. If you create a registration link, you need not create a customer or an order. + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. The customer can use the invoice to make the Authorisation Payment. + +Know how to [create Registration Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md) using the Dashboard. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use webhooks to get notifications about successful payments against a registration link. Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks). +> + +A registration link must always have the amount (in Paise) that the customer will be charged when making the authorisation payment. For UPI, the amount must be a minimum of `₹1`. + +### 1.2.1. Create a Registration Link + +The following endpoint creates a registration link. + +/subscription_registration/auth_links + + +### Sample Code + + + ```curl: Curl + curl -u : + -X POST https://api.razorpay.com/v1/subscription_registration/auth_links + -H "Content-Type: application/json" \ + -d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": "100", + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "method": "upi", + "max_amount": "500", + "expire_at": 4102444799, + "frequency": "monthly", + "recurring_value": 25, + "recurring_type": "on" + }, + "receipt": "Receipt No. 23", + "email_notify": true, + "sms_notify": true, + "expire_by": 4102444799, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject registrationLinkRequest = new JSONObject(); + JSONObject customer = new JSONObject(); + customer.put("name","Gaurav Kumar"); + customer.put("email","gaurav.kumar@example.com"); + customer.put("contact","9123456780"); + registrationLinkRequest.put("customer", customer); + registrationLinkRequest.put("type", "link"); + registrationLinkRequest.put("amount", 100); + registrationLinkRequest.put("currency", "INR"); + registrationLinkRequest.put("description", "Registration Link for Gaurav Kumar"); + JSONObject subscriptionRegistration = new JSONObject(); + subscriptionRegistration.put("method","upi"); + subscriptionRegistration.put("max_amount",50000); + subscriptionRegistration.put("expire_at",1609423824); + subscriptionRegistration.put("frequency","monthly"); + subscriptionRegistration.put("recurring_value","25"); + subscriptionRegistration.put("recurring_type","on"); + registrationLinkRequest.put("subscription_registration", subscriptionRegistration); + registrationLinkRequest.put("receipt", "Receipt No. #112"); + registrationLinkRequest.put("email_notify", true); + registrationLinkRequest.put("sms_notify", true); + registrationLinkRequest.put("expire_by", 1580479824); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + registrationLinkRequest.put("notes", notes); + + Invoice invoice = razorpay.invoices.createRegistrationLink(registrationLinkRequest); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'gaurav.kumar@example.com','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('method'=>'upi','max_amount'=>'500','expire_at'=>'1634215992','frequency'=>'monthly','recurring_value'=>'25','recurring_type'=>'on'),'receipt'=>'Receipt No. 5','email_notify'=>true,'sms_notify'=>true,'expire_by'=>1634215992,'notes' => array('note_key 1' => 'Beam me up Scotty','note_key 2' => 'Tea. Earl Gray. Hot.'))); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.subscriptions.createRegistrationLink({ + customer: { + name: "Gaurav Kumar", + email: "gaurav.kumar@example.com", + contact: 9123456780 + }, + type: "link", + amount: 100, + currency: "INR", + description: "Registration Link for Gaurav Kumar", + subscription_registration: { + method: "upi", + max_amount: 500, + expire_at: 1634215992, + frequency: "monthly", + recurring_value: 25, + recurring_type: "on" + }, + receipt: "Receipt No. 5", + email_notify: true, + sms_notify: true, + expire_by: 1634215992, + notes: { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } + }) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": 9123456780 + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "Registration Link for Gaurav Kumar", + "subscription_registration": { + "method": "upi", + "max_amount": 500, + "expire_at": 1634215992, + "recurring_value": 25, + "recurring_type": "on" + }, + "receipt": "Receipt No. 5", + "email_notify": 1, + "sms_notify": 1, + "expire_by": 1634215992, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } + } + Razorpay::SubscriptionRegistration.create(para_attr) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.registration_link.create({ + "customer":{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":9123456780 + }, + "type":"link", + "amount":100, + "currency":"INR", + "description":"12 p.m. Meals", + "subscription_registration":{ + "method":"upi", + "expire_at":1580480689, + "max_amount":500, + "recurring_value": 25, + "recurring_type": "on" + }, + "receipt":"Receipt no. 1", + "expire_by":1880480689, + "sms_notify": True, + "email_notify": True, + "notes":{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot." + } + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data:= map[string]interface{}{ + "customer":map[string]interface{}{ + "name":"Gaurav Kumar", + "email":"gaurav.kumar@example.com", + "contact":"9123456780", + }, + "type":"link", + "amount":"100", + "currency":"INR", + "description":"Registration Link for Gaurav Kumar", + "subscription_registration":map[string]interface{}{ + "method":"upi", + "max_amount":"500", + "expire_at":1609423824, + "frequency": "monthly", + "recurring_value": 25, + "recurring_type": "on" + }, + "receipt":"Receipt No. 1", + "email_notify":true, + "sms_notify":true, + "expire_by":1681987284, + "notes":map[string]interface{}{ + "note_key 1":"Beam me up Scotty", + "note_key 2":"Tea. Earl Gray. Hot.", + }, + } + body, err := client.Invoice.CreateRegistrationLink(data, nil) + + ```json: Response + { + "id": "inv_FHr1ekX0r2VCVK", + "entity": "invoice", + "receipt": "Receipt No. 23", + "invoice_number": "Receipt No. 23", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHr1ehR3nmNeXo", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 4102444799, + "issued_at": 1595489219, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595489219, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/ak1WxDB", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595489219, + "idempotency_key": null + } + ``` + + + + +### Request Parameters + + `customer` +: `object` Details of the customer to whom the registration link is sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `integer` Customer's contact number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. + + `subscription_registration` +: Details of the authorisation transaction. + + `method` _mandatory_ + : `string` The payment method used to make authorisation transaction. Here, it is `card`. + + `max_amount` _mandatory_ + : `integer` Use to set the maximum amount (in paise) per debit request. + + MCC | Category | Min Value | Max Value + --- + 6211 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6300 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 7322 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 6529 | Financial Services | `100` (₹1) | `20000000` (₹2,00,000) + --- + 5960 | Services | `100` (₹1) | `20000000` (₹2,00,000) + + + For other categories and MCCs, the minimum value is `100` (₹1) and maximum value is 9999900 (₹99,999). + + `expire_at` _optional_ + : `integer` The Unix timestamp till when you can use the token to charge the customer subsequent payments. The default value is 10 years and the maximum value allowed is 30 years. + + `frequency` _mandatory_ + : `string` The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `fortnightly` + - `bimonthly` + - `monthly` + - `quarterly` + - `half_yearly` + - `yearly` + - `as_presented` + +`recurring_value` _optional_ +: `integer` Determines the exact date or range of dates for recurring debits. Possible values are: + - 1-7 for `weekly` frequency + - 1-31 for `fortnightly` frequency + - 1-31 for `bimonthly` frequency + - 1-31 for `monthly` frequency + - 1-31 for `quarterly` frequency + - 1-31 for `half_yearly` frequency + - 1-31 for `yearly` frequency and is not applicable for the `as_presented` frequency. + +> **WARN** +> +> +> **Watch Out!** +> +> If the date entered for the recurring debit is not available for a month, then the last day of the month is considered by default. For example, if the date entered is 31 and the month has only 28 days, then the date 28 is considered. +> + +`recurring_type` _optional_ +: `string` Determines when the recurring debit can be done. Possible values are: + +- `on`: recurring debit happens on the exact day of every month. + - `before`: recurring debit can happens any time before the specified date. + - `after`: recurring debit can happens any time after the specified date. + +For example, if the frequency is `monthly`, recurring_value is `17` and recurring_type is `before`, recurring debit can happen between the month's 1st and 17th. Similarly, if recurring_type is `after`, recurring debit can only happen on or after the 17th of the month. + + `sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Possible values: + - `true` (default): Notifications are sent by Razorpay . + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The Unix timestamp indicates the expiry of the registration link. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + +### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + + +### Path Parameters + + `id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + + +### 1.2.3. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi/subsequent-payments.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi/subsequent-payments.md new file mode 100644 index 00000000..bc569bb7 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi/subsequent-payments.md @@ -0,0 +1,394 @@ +--- +title: 3. Create Subsequent Payments +description: Create and charge subsequent payments using Razorpay APIs after the customer's selected payment method is authorised. +--- + +# 3. Create Subsequent Payments + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +## 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +## 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +> **INFO** +> +> +> **UPI Payments** +> +> - We recommend sending a pre-debit notification to the customer 48 hours before the debit date. +> - For UPI, it may take between 24-36 hours for the subsequent payment to reflect on your Dashboard. +> - This is because of the failure of pre-debit notification and/or any retries that we attempt for the payment. +> - Do not create another subsequent payment until you get the status of the previous one. +> + +> **WARN** +> +> +> **UPI Payments** +> +> - The subsequent payment may fail if there is late authorisation of an earlier payment. +> - For UPI, **do not** create subsequent payments on the last day of the cycle. This will cause the payment to fail. +> + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi/tokens.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi/tokens.md new file mode 100644 index 00000000..ed22f4f7 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi/tokens.md @@ -0,0 +1,389 @@ +--- +title: 2. Fetch and Manage Tokens +description: Retrieve tokens using Razorpay APIs to create subsequent payments. +--- + +# 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +## 2.1. Fetch Token by Payment ID + +The following endpoint fetches the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_FHfAzEJ51k8NLj" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentid = "pay_FHfqtkRzWvxky4"; + +Payment payment = client.Payment.Fetch(paymentid); +``` + +```json: Debit Payment +{ + "id": "pay_FHfAzEJ51k8NLj", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfANdTUYeP8lb", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfAzGzREc1ug6", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "854977234911", + "upi_transaction_id": "D0BED5A062ECDB3E9B3A1071C96BB273" + }, + "created_at": 1595447490 +} +```json: Authorisation Payment +{ + "id": "pay_QDhVJ5M23wt4rh", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "failed", + "order_id": "order_QDhT2PqFJvtg4y", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "success@razorpay", + "email": "gaurav.kumar@example.com", + "contact": "+919123456780", + "customer_id": "cust_Q0g6LTYw3obZEn", + "token_id": "token_QDhVJHYr5m87fF", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey\u2026 decaf.", + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + "optimizer_provider_name": "razorpay" + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment was a dummy payment for one time mandate registration.", + "error_source": "business", + "error_step": "payment_initiation", + "error_reason": "upi_dummy_payment", + "acquirer_data": { + "rrn": null + }, + "gateway_provider": "Razorpay", + "created_at": 1743490280, + "upi": { + "vpa": "success@razorpay" + } +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can also retrieve the `token_id` via the [payment.authorized webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized). +> + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +## 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> - This endpoint will not fetch the details of expired and unused tokens. +> - The UPI tokens are not populated in the API response if the `save_vpa` feature is not enabled in your account. Please raise a request with our Support team to get this activated. +> + +/customers/:id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +List tokens = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetch(customerId).fetchTokens + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); +``` + +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "token_FHfAzGzREc1ug6", + "entity": "token", + "token": "9KHsdPaCELeQ0t", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595447490, + "created_at": 1595447490, + "start_time": 1595447455, + "dcc_enabled": false + } + ] +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +## 2.3. Delete Tokens + +> **WARN** +> +> +> **Watch Out!** +> +> Deleting a token removes it from Razorpay's database. The deleted token will not appear on the Dashboard or when all tokens are fetched. However, it does not cancel the mandate. If you wish to cancel the mandate from NPCI, use the [Cancel Token API](#24-cancel-token). +> + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + + +### Path Parameters + + `customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + + +## 2.4. Cancel Token +The following endpoint initiates cancellation of the mandate from NPCI. + +/customers/:customer_id/tokens/:token_id/cancel + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X PUT https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001/cancel +```json: Response +{ + "status": "cancellation_initiated” +} +``` + + +### Path Parameters + + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be cancelled. For example, `token_1Aa00000000001`. diff --git a/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/webhooks.md b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/webhooks.md new file mode 100644 index 00000000..4abb304c --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/webhooks.md @@ -0,0 +1,2767 @@ +--- +title: Webhooks +description: Set up webhooks for Recurring Payments, check available webhook events and sample payloads for these events. +--- + +# Webhooks + +Webhooks (Web Callback, HTTP Push API or Reverse API) automatically notify your application when specific events occur. Instead of continuously polling APIs to check for updates, webhooks push notifications directly to your server when events happen. + +## Webhooks vs APIs + +Here is how webhooks compare to traditional API polling: + +Aspect | APIs | Webhooks +--- +**Data retrieval** | Pull-based (you request) | Push-based (we send) +--- +**Timing** | On-demand | Near real-time when events occur +--- +**Resource usage** | Requires polling | Event-driven, efficient + +## How Razorpay Webhooks Work + +When you subscribe to webhook events, Razorpay sends an HTTP POST request with JSON payload to your configured endpoint URL whenever those events are triggered. + +Suppose you have subscribed to the `order.paid` webhook event, you will receive a notification every time a user pays you for an order, in the configured endpoint URL. + +### Use Cases + +There can be multiple uses for webhook events. Two of these are listed below. + + +### Capturing Late Authorised Payments + + Capturing payments for which you did not receive a response on the client-side is perhaps the most important use case for the `payment.authorized` event. + + Sometimes, the communication between the bank and Razorpay or between you and Razorpay may not occur. This could be because of a slow network connection or your customer closing the window while processing the payment. This could lead to a payment being marked as **Failed** on the Dashboard but changed to **Authorized** at a later time. Know more about [late authorisation of payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md). + + You can use webhooks to get notified about payments that get authorised and analyse this data to decide whether to capture the payment or not. + + + +### Notifications on Failed Payments + + When a payment attempted by your customer fails, we receive the failed payment status from the bank. This payment gets recorded in our system as **Failed**. + + Suppose you have enabled the `payment.failed` webhook, you will receive a notification from us about the failed payment. You can then further analyse this payment and notify your customer about the failure. + + + +### Setup and Configuration + +- You can set up webhooks from your Dashboard and configure separate URLs for **Live** mode and **Test** mode. Know more about setting up [Payment webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) and [Payout webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md). +- A **Test** mode webhook receives events for your test transactions. Know more about [testing webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). +- Webhook URLs must use ports **80** or **443** only. +- Ensure Razorpay webhook IPs are whitelisted on your server. Even if your server accepts all incoming requests, webhooks may still be blocked by cloud security groups or network configurations. Refer to [Razorpay IPs and Certificates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#webhook-ips) for the complete list of webhook IP addresses. + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + +## Idempotency + +There could be scenarios where your endpoint might receive the same webhook event multiple times. This is an expected behaviour based on the webhook design. + +To handle duplicate webhook events: +1. You can identify the duplicate webhooks using the `x-razorpay-event-id` header. The value for this header is unique per event. +2. Check the value of `x-razorpay-event-id` in the webhook request header. +3. Verify if an event with the same header is processed at your end. + +## Deactivation + +All webhook responses must return a status code in the range `2XX` within a window of 5 seconds. If we receive response codes other than this or the request times out, it is considered a failure. + +On failure, a webhook is re-tried at progressive intervals of time, defined in the exponential back-off policy, for 24 hours. If the failures continue for 24 hours, the webhook is disabled. You need to enable the webhook from the Dashboard after fixing the errors at your end. Know more about [enabling Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md#enabledisable-a-webhook). + +> **INFO** +> +> +> **Handy Tips** +> +> When a webhook gets disabled, you receive an email notification on the email id you configured while setting up the webhooks. +> + +## Setup Webhooks + +Watch this video to see how to set up a webhook. + +[Video: https://www.youtube.com/embed/Xiikw4_CcQk?si=b6kYHKIp1xikPrJZ] + +To set up webhooks: + +1. Log in to the Dashboard and navigate to **Accounts & Settings**. +2. Click **Webhooks** under **Website and app settings**. +3. Click the **+ Add New Webhook** button. + + ![Add a new webhooks button on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-1.jpg.md) +4. In the **Webhook Setup** pop-up page: + - Enter the **URL** where you want to receive the webhook payload when an event is triggered. We recommend using an HTTPS URL. + + +> **INFO** +> +> +> **Handy Tips** +> +> - You can set up to **30 URLs** to receive Webhook notifications. Webhooks can only be delivered to public URLs. +> - If your URL contains `razorpay` as a domain, you will not be able to add the URL and will receive an error. +> - If you attempt to save a localhost endpoint as part of a webhook setup, you will notice an error. Know more about [testing Webhooks on an application running on localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#application-running-on-localhost). +> + + + - Enter a **Secret** for the webhook endpoint. The secret is used to validate that the webhook is from Razorpay. Do not expose the secret publicly. Know more about [how to validate webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> - When setting up the webhook, specify a secret. Use this secret to validate that the webhook is from Razorpay. Entering the secret is optional but recommended. The secret should never be exposed publicly. +> - The webhook secret does not need to be the Razorpay API key secret. +> + + + + - In the **Alert Email** field, enter the email address to which the notifications should be sent in case of webhook failure. You will receive webhook related notifications like failures, deactivation and so on. + - Select the required events from the list of **Active Events**. + ![List of active webhook events on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-2.jpg.md) + +5. Click **Create Webhook**. After you set up a webhook, it appears on the list of webhooks. + ![List of webhooks on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhooks-list.jpg.md) +6. You can select the webhook and click **Edit** to make more changes. + +## Validation + +When your webhook `secret` is set, Razorpay uses it to create a hash signature with each payload. This hash signature is passed with each request under the `X-Razorpay-Signature` header that you need to validate at your end. We provide support for validating the signature in all of our [language SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration.md). + +If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. + +`X-Razorpay-Signature` +: The hash signature is calculated using HMAC with SHA256 algorithm; with your webhook secret set as the key and the webhook request body as the message. + +You can also validate the webhook signature yourself using a [HMAC](https://en.wikipedia.org/wiki/Hash-based_message_authentication_code) as shown below: + +```html: HMAC Hex Digest +key = webhook_secret +message = webhook_body // raw webhook request body +received_signature = webhook_signature + +expected_signature = hmac('sha256', message, key) + +if expected_signature != received_signature + throw SecurityError +end + +``` + +> **WARN** +> +> +> **Do Not Parse or Cast the Webhook Request Body** +> +> While generating the signature at your end, ensure that the webhook body passed as an argument is the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> + +## Check Payment Status Using Webhooks + +You can use these webhooks to check the status of the authorisation payment and subsequent payments. + +Webhook Event | Description +--- +[`payment.authorized`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized) | Indicates the payment has been authorized. A payment is authorized when the customer’s payment details are successfully authenticated by the bank. +--- +[`payment.captured`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-captured) | Indicates when the payment has been captured. +--- +[`order.paid`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#order-paid) | Indicates the customer has successfully made the payment. +--- +[`payment.failed`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-failed) | Indicates that the payment has failed. If the payment fails, you need to create an authorisation transaction again. + +### Payment Authorized + +Indicates that the payment has been authorized. A payment is authorized when the customer’s payment details are successfully authenticated by the bank. + +> **WARN** +> +> +> **Watch Out!** +> +> For Emandate, the 'acquirer_data' is populated as an empty object in the webhook. +> + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.authorized", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHf94S8ja4Cggz", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "authorized", + "order_id": "order_FHf8iqahguUGkM", + "invoice_id": "inv_FHf8iwg1ZaNMNh", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHf94Uym9tdYFJ", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595447381 + } + } + }, + "created_at": 1595447383 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.authorized", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "authorized", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "card": { + "id": "card_F0zoXUp4IPPGoI", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "541898" + }, + "created_at": 1595449871 + } + } + }, + "created_at": 1595449872 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.authorized", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhXwFbTdVTDWVA", + "entity": "payment", + "amount": 0, + "currency": "INR", + "base_amount": 0, + "status": "authorized", + "order_id": "order_EhTTPTTwLAijw8", + "invoice_id": "inv_EhTTPSxAjbXCWi", + "international": false, + "method": "nach", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhXwFeR0hG3qZj", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1587561758 + } + } + }, + "created_at": 1587562064 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.authorized", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhm0UWoNrZT3h", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "authorized", + "order_id": "order_FHhlVrVCPWGSDC", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhm0XTtJg9zqb", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "688684363734", + "upi_transaction_id": "B832E94839C6C5194D2DB36F865F564D" + }, + "created_at": 1595456636 + } + } + }, + "created_at": 1595456636 +} +``` + +### Payment Captured + +Indicates that the payment has been captured. + +> **WARN** +> +> +> **Watch Out!** +> +> For Emandate, the 'acquirer_data' is populated as an empty object in the webhook. +> + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.captured", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHf94S8ja4Cggz", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_FHf8iqahguUGkM", + "invoice_id": "inv_FHf8iwg1ZaNMNh", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHf94Uym9tdYFJ", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595447381 + } + } + }, + "created_at": 1595447383 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.captured", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "card": { + "id": "card_F0zoXUp4IPPGoI", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "541898" + }, + "created_at": 1595449871 + } + } + }, + "created_at": 1595449873 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.captured", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhXwFbTdVTDWVA", + "entity": "payment", + "amount": 0, + "currency": "INR", + "base_amount": 0, + "status": "captured", + "order_id": "order_EhTTPTTwLAijw8", + "invoice_id": "inv_EhTTPSxAjbXCWi", + "international": false, + "method": "nach", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhXwFeR0hG3qZj", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at": 1587561758 + } + } + }, + "created_at": 1587562064 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.captured", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhm0UWoNrZT3h", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHhlVrVCPWGSDC", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhm0XTtJg9zqb", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "688684363734", + "upi_transaction_id": "B832E94839C6C5194D2DB36F865F564D" + }, + "created_at": 1595456636 + } + } + }, + "created_at": 1595456636 +} +``` + +### Order Paid + +Indicates that the payment has been captured. + +> **WARN** +> +> +> **Watch Out!** +> +> - For Emandate, the 'acquirer_data' is populated as an empty object in the webhook. +> - The `invoice_id` parameter is populated with the unique identifier value (for example, `inv_FHf8iwg1ZaNMNh`) for Emandate, Card and Paper NACH methods only. For UPI, the value of the `invoice_id` parameter value is `null`. +> + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "order.paid", + "contains": [ + "payment", + "order" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHf94S8ja4Cggz", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_FHf8iqahguUGkM", + "invoice_id": "inv_FHf8iwg1ZaNMNh", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHf94Uym9tdYFJ", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595447381 + } + }, + "order": { + "entity": { + "id": "order_FHf8iqahguUGkM", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "paid", + "attempts": 1, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1595447361, + "token": { + "method": "emandate", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "netbanking", + "expire_at": 1689971140, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "XXXXXXXXXXXX1121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 0 + } + } + } + }, + "created_at": 1595447383 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "order.paid", + "contains": [ + "payment", + "order" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHfqtkRzWvxky4", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHfnswDdfu96HQ", + "invoice_id": "inv_FHf8iwg1ZaNMNh", + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "card": { + "id": "card_F0zoXUp4IPPGoI", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "541898" + }, + "created_at": 1595449871 + } + }, + "order": { + "entity": { + "id": "order_FHfnswDdfu96HQ", + "entity": "order", + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "paid", + "attempts": 1, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1595449699 + } + } + }, + "created_at": 1595449873 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "order.paid", + "contains": [ + "payment", + "order" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhXwFbTdVTDWVA", + "entity": "payment", + "amount": 0, + "currency": "INR", + "base_amount": 0, + "status": "captured", + "order_id": "order_EhTTPTTwLAijw8", + "invoice_id": "inv_EhTTPSxAjbXCWi", + "international": false, + "method": "nach", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhXwFeR0hG3qZj", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "created_at": 1587561758 + } + }, + "order": { + "entity": { + "id": "order_EhTTPTTwLAijw8", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": null, + "offer_id": null, + "status": "paid", + "attempts": 1, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at": 1587546033, + "token": { + "method": "nach", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 10000000, + "auth_type": "physical", + "expire_at": 1617215399, + "nach": { + "create_form": true, + "form_reference1": "Reference 1", + "form_reference2": "Reference 2", + "prefilled_form": "https://rzp.io/i/kHXQ34x", + "upload_form_url": "https://rzp.io/i/2IcNo4E", + "description": "Paper NACH" + }, + "bank_account": { + "ifsc": "HDFC0000123", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "99889900231489", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 10000 + } + } + } + }, + "created_at": 1587562064 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "order.paid", + "contains": [ + "payment", + "order" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhm0UWoNrZT3h", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHhlVrVCPWGSDC", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhm0XTtJg9zqb", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "688684363734", + "upi_transaction_id": "B832E94839C6C5194D2DB36F865F564D" + }, + "created_at": 1595456636 + } + }, + "order": { + "entity": { + "id": "order_FHhlVrVCPWGSDC", + "entity": "order", + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "paid", + "attempts": 2, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1595456608 + } + } + }, + "created_at": 1595456636 +} +``` + +### Payment Failed + +Indicates that the payment has failed. If the payment fails, you need to create an authorisation transaction again. + +> **WARN** +> +> +> **Watch Out!** +> +> For Emandate, the 'acquirer_data' is populated as an empty object in the webhook. +> + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.failed", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhKpRTgEWNzBx", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "failed", + "order_id": "order_FHhKYYSK40KNzt", + "invoice_id": "inv_FHhKYltuPeHTyP", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhKpV8NeHJHtg", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595455092 + } + } + }, + "created_at": 1595455094 +} +```json: Cards +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.failed", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhLcvd67XXsBe", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "failed", + "order_id": "order_FHhLONJc3wlBbv", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": "card_F0zoXUp4IPPGoI", + "card": { + "id": "card_F0zoXUp4IPPGoI", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "error_source": "gateway", + "error_step": "payment_authorization", + "error_reason": "payment_failed", + "acquirer_data": { + "auth_code": null + }, + "created_at": 1595455138 + } + } + }, + "created_at": 1595455139 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.failed", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhYcjfgwGLVZOf", + "entity": "payment", + "amount": 0, + "currency": "INR", + "base_amount": 0, + "status": "failed", + "order_id": "order_EhYX40CBIRmSaC", + "invoice_id": "inv_EhYX3zhOm38daM", + "international": false, + "method": "nach", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhYcjjYiEL1nEW", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1587564171 + } + } + }, + "created_at": 1587564208 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "payment.failed", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhSxIRyTtshjQr", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "failed", + "order_id": "order_EhSwt4nx32X1Ss", + "invoice_id": "inv_EhSwt4FKpTKrdf", + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": "Invoice #inv_EhSwt4FKpTKrdf", + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": gaurav.kumar@okhdfc, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhSxIV7p0l7yri", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "created_at": 1587544209 + } + } + }, + "created_at": 1587544212 +} +``` + +## Check Token Status using Webhooks + +You can use the below webhooks to check the status of the token. + +Webhook Event | Applicable Methods | Description +--- +[`token.confirmed`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-confirmed) | - Emandate +- Card +- Paper NACH +- UPI + | Indicates that the bank has completed the mandate registration. Once confirmed, you can create subsequent payments as per your business needs. +--- +[`token.rejected`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-rejected) | - Emandate +- Card +- Paper NACH +- UPI + | Indicates that the has been rejected. If rejected, you need to create the authorisation transaction again. +--- +[`token.cancelled`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-cancelled) | - Emandate +- UPI + - Card + | Indicated the token has been cancelled. +--- +[`token.paused`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-paused) | UPI | Indicated the token has been paused by your customer. + +### Token Confirmed + +Indicates that the bank has completed the mandate registration. Once confirmed, you can create subsequent payments as per your business needs. + +Available for tokens authorized using the following methods: +- Emandate +- Card +- Paper NACH +- UPI + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.confirmed", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHf94Uym9tdYFJ", + "entity": "token", + "token": "2wDPM7VAlXtjAR", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "netbanking", + "mrn": null, + "used_at": 1595447381, + "created_at": 1595447381, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 1689971140, + "dcc_enabled": false + } + } + }, + "created_at": 1595447383 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.confirmed", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHfn3rIiM1Z8nr", + "entity": "token", + "token": "2aqzyte2EqvuDr", + "bank": null, + "wallet": null, + "method": "card", + "card": { + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer", + "expiry_month": 5, + "expiry_year": 2025, + "flows": { + "otp": true, + "recurring": true, + "iframe": false + } + }, + "recurring": true, + "auth_type": null, + "mrn": null, + "used_at": 1595449653, + "created_at": 1595449652, + "expired_at": 1748716199, + "dcc_enabled": false + } + } + }, + "created_at": 1595449654 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.confirmed", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHf94Uym9tdYFJ", + "entity": "token", + "token": "2wDPM7VAlXtjAR", + "bank": "HDFC", + "wallet": null, + "method": "nach", + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "physical", + "mrn": null, + "used_at": 1595447381, + "created_at": 1595447381, + "max_amount": 9999900, + "expired_at": 1689971140, + "dcc_enabled": false + } + } + }, + "created_at": 1595447383 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.confirmed", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHhm0XTtJg9zqb", + "entity": "token", + "token": "BmwqwrkHZTlzVF", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1595456636, + "created_at": 1595456636, + "start_time": 1595456608, + "dcc_enabled": false + } + } + }, + "created_at": 1595456636 +} +``` + +### Token Rejected + +Triggered during the token creation/registration process, when the token creation process fails without completion. + +This webhook is available for tokens authorized using the following methods: +- Emandate +- Card +- Paper NACH +- UPI + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.rejected", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHhXz1xrfmEtzO", + "entity": "token", + "token": "CxQakUkIEObsTB", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "recurring": false, + "recurring_details": { + "status": "rejected", + "failure_reason": "Rejected by bank" + }, + "auth_type": "debitcard", + "mrn": null, + "used_at": 1595455839, + "created_at": 1595455839, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 4102444799, + "dcc_enabled": false + } + } + }, + "created_at": 1595455843 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.rejected", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHhXz1xrfmEtzO", + "entity": "token", + "token": "CxQakUkIEObsTB", + "bank": "HDFC", + "wallet": null, + "method": "card", + "recurring": false, + "recurring_details": { + "status": "rejected", + "failure_reason": "Rejected by bank" + }, + "card": { + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer", + "expiry_month": 5, + "expiry_year": 2021, + "flows": { + "otp": true, + "recurring": false, + "iframe": false + } + }, + "auth_type": "card", + "mrn": null, + "used_at": 1595455839, + "created_at": 1595455839, + "max_amount": 9999900, + "expired_at": 4102444799, + "dcc_enabled": false + } + } + }, + "created_at": 1595455843 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.rejected", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHhXz1xrfmEtzO", + "entity": "token", + "token": "CxQakUkIEObsTB", + "bank": "HDFC", + "wallet": null, + "method": "nach", + "recurring": false, + "recurring_details": { + "status": "rejected", + "failure_reason": "Rejected by bank" + }, + "auth_type": "physical", + "mrn": null, + "used_at": 1595455839, + "created_at": 1595455839, + "max_amount": 9999900, + "expired_at": 4102444799, + "dcc_enabled": false + } + } + }, + "created_at": 1595455843 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.rejected", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FHhm0XTtJg9zqb", + "entity": "token", + "token": "BmwqwrkHZTlzVF", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gaurav.kumar", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "rejected", + "failure_reason": "Rejected by bank" + }, + "auth_type": "upi", + "mrn": null, + "used_at": 1595456636, + "created_at": 1595456636, + "start_time": 1595456608, + "dcc_enabled": false + } + } + }, + "created_at": 1595456636 +} +``` + +### Token Cancelled + +Triggered when a token is explicitly cancelled or deactivated. Usually happens after a successful token creation. + +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.cancelled", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FVIP5DVexjoZjF", + "entity": "token", + "token": "5ESJrtR1V6k6mp", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "56546", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "cancelled", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1598424055, + "created_at": 1598424055, + "start_time": 1598510437, + "dcc_enabled": false, + "max_amount": 5600, + "expired_at": 1913956837 + } + } + }, + "created_at": 1599065559 +} + +```json: Cards +{ + "entity":"event", + "account_id":"acc_8TgNt9DVrJB0bl", + "event":"token.cancelled", + "contains":[ + "token" + ], + "payload":{ + "token":{ + "entity":{ + "id":"token_KaQbMNOeH67CZj", + "entity":"token", + "token":"DWrlGEB3ZqWKNV", + "bank":null, + "wallet":null, + "method":"card", + "card":{ + "entity":"card", + "name":"", + "last4":"3182", + "network":"Visa", + "type":"credit", + "issuer":"HDFC", + "international":false, + "emi":true, + "sub_type":"consumer", + "token_iin":"486924082", + "expiry_month":"01", + "expiry_year":"2099", + "flows":{ + "otp":true, + "recurring":true + }, + "cobranding_partner":null + }, + "recurring":true, + "recurring_details":{ + "status":"cancelled", + "failure_reason":null + }, + "auth_type":null, + "mrn":null, + "used_at":1675247897, + "created_at":1667230058, + "expired_at":1730399399, + "status":"active", + "error_description":null, + "dcc_enabled":false, + "max_amount":200, + "error_code":null, + "compliant_with_tokenisation_guidelines":true + } + } + }, + "created_at":1681372110 +} +``` + +### Token Paused + +Indicates the token has been paused by your customer. + +Available only for tokens authorized via UPI. + +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "token.paused", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_FVIP5DVexjoZjF", + "entity": "token", + "token": "5ESJrtR1V6k6mp", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "56546", + "handle": "upi", + "name": null + }, + "recurring": true, + "recurring_details": { + "status": "paused", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1598424055, + "created_at": 1598424055, + "start_time": 1598510437, + "dcc_enabled": false, + "max_amount": 5600, + "expired_at": 1913956837 + } + } + }, + "created_at": 1599065559 +} +``` + +## Check Registration Link Status using Webhooks + +You can use these webhooks to check the status of the registration link. + +Webhook Event | Description +--- +[`invoice.paid`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#invoice-paid) | Indicates that a registration link is successfully paid. +--- +[`invoice.expired`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#invoice-expired) | Indicates that a registration link has expired. + +### Invoice Paid + +Indicates that a registration link has been successfully paid. + +> **WARN** +> +> +> **Watch Out!** +> +> For Emandate, the 'acquirer_data' is populated as an empty object in the webhook. +> + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhf2L2OS2qE1u", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_FHhejhc3XFHr5c", + "invoice_id": "inv_FHhejg2WDlmyGP", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_FHhejg2WDlmyGP", + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhf2PMcYf1mOu", + "notes": { + "Internal Note": "Random Description" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595456240 + } + }, + "order": { + "entity": { + "id": "order_FHhejhc3XFHr5c", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1595456223, + "token": { + "method": "emandate", + "notes": { + "Internal Note": "Random Description" + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": null, + "expire_at": 1609439399, + "bank_account": { + "ifsc": "HDFC0000123", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "XXXXXXXX9012", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 0 + } + } + }, + "invoice": { + "entity": { + "id": "inv_FHhejg2WDlmyGP", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_FHhejhc3XFHr5c", + "payment_id": "pay_FHhf2L2OS2qE1u", + "status": "paid", + "expire_by": 1596220199, + "issued_at": 1595456223, + "paid_at": 1595456243, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595456223, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Authorization link", + "notes": { + "Internal Note": "Random Description" + }, + "comment": null, + "short_url": "https://rzp.io/i/6gkcy7O", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "user_id": "CTlk1QZN33LQUT", + "created_at": 1595456223, + "idempotency_key": null + } + } + }, + "created_at": 1595456243 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhcSi5TDZ7wJL", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHhcC7dWy3feTu", + "invoice_id": "inv_FHhcC629qa82SA", + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_FHhcC629qa82SA", + "card_id": "card_F0zoXUp4IPPGoI", + "card": { + "id": "card_F0zoXUp4IPPGoI", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "2002", + "network": "Visa", + "type": "credit", + "issuer": "CITI", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHfn3rIiM1Z8nr", + "notes": { + "Internal Note": "Random Description" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "290686" + }, + "created_at": 1595456094 + } + }, + "order": { + "entity": { + "id": "order_FHhcC7dWy3feTu", + "entity": "order", + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1595456078, + "token": { + "method": "card", + "notes": { + "Internal Note": "Random Description" + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": null, + "expire_at": null, + "first_payment_amount": 0 + } + } + }, + "invoice": { + "entity": { + "id": "inv_FHhcC629qa82SA", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_FHhcC7dWy3feTu", + "payment_id": "pay_FHhcSi5TDZ7wJL", + "status": "paid", + "expire_by": 1596220199, + "issued_at": 1595456078, + "paid_at": 1595456095, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595456078, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Authorization Link", + "notes": { + "Internal Note": "Random Description" + }, + "comment": null, + "short_url": "https://rzp.io/i/X2cWr1D", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "user_id": "CTlk1QZN33LQUT", + "created_at": 1595456078, + "idempotency_key": null + } + } + }, + "created_at": 1595456095 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EhXwFbTdVTDWVA", + "entity": "payment", + "amount": 0, + "currency": "INR", + "base_amount": 0, + "status": "captured", + "order_id": "order_EhTTPTTwLAijw8", + "invoice_id": "inv_EhTTPSxAjbXCWi", + "international": false, + "method": "nach", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_EhXwFeR0hG3qZj", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "created_at": 1587561758 + } + }, + "order": { + "entity": { + "id": "order_EhTTPTTwLAijw8", + "entity": "order", + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": null, + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1587546033, + "token": { + "method": "nach", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 10000000, + "auth_type": "physical", + "expire_at": 1617215399, + "nach": { + "create_form": true, + "form_reference1": "Reference 1", + "form_reference2": "Reference 2", + "prefilled_form": "https://rzp.io/i/409IxCx", + "upload_form_url": "https://rzp.io/i/2IcNo4E", + "description": "Paper NACH" + }, + "bank_account": { + "ifsc": "HDFC0000123", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "99889900231489", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 10000 + } + } + }, + "invoice": { + "entity": { + "id": "inv_EhTTPSxAjbXCWi", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_EhTTPTTwLAijw8", + "payment_id": "pay_EhXwFbTdVTDWVA", + "status": "paid", + "expire_by": 1588271399, + "issued_at": 1587546033, + "paid_at": 1587562064, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1587546033, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Paper NACH", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "comment": null, + "short_url": "https://rzp.io/i/2IcNo4E", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "subscription_status": null, + "user_id": "BhPhy4mGkOmThn", + "created_at": 1587546033, + "idempotency_key": null, + "reminder_status": null, + "token": { + "method": "nach", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 10000000, + "auth_type": "physical", + "expire_at": 1617215399, + "nach": { + "create_form": true, + "form_reference1": "Reference 1", + "form_reference2": "Reference 2", + "prefilled_form": "https://rzp.io/i/409IxCx", + "upload_form_url": "https://rzp.io/i/2IcNo4E", + "description": "Paper NACH" + }, + "bank_account": { + "ifsc": "HDFC0000123", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "99889900231489", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 10000 + }, + "nach_form_url": "https://rzp.io/i/409IxCx" + } + } + }, + "created_at": 1587562064 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_FHhw4RhnuZPiuO", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_FHhvTLKwXS9bnS", + "invoice_id": "inv_FHhvTPure2cEqZ", + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_FHhvTPure2cEqZ", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHhw4Ufvv7kv9u", + "notes": { + "Internal Note": "Random Description" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "237153511656", + "upi_transaction_id": "B1D63A7B0366274F83AF9B3A0D7C5CA8" + }, + "created_at": 1595457208 + } + }, + "order": { + "entity": { + "id": "order_FHhvTLKwXS9bnS", + "entity": "order", + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "currency": "INR", + "receipt": null, + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "paid", + "attempts": 3, + "notes": [], + "created_at": 1595457173, + "token": { + "method": "upi", + "notes": { + "Internal Note": "Random Description" + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 200000, + "auth_type": null, + "expire_at": 1609439399, + "first_payment_amount": 0 + } + } + }, + "invoice": { + "entity": { + "id": "inv_FHhvTPure2cEqZ", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_FHhvTLKwXS9bnS", + "payment_id": "pay_FHhw4RhnuZPiuO", + "status": "paid", + "expire_by": 1596220199, + "issued_at": 1595457174, + "paid_at": 1595457208, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595457173, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Authorization transaction", + "notes": { + "Internal Note": "Random Description" + }, + "comment": null, + "short_url": "https://rzp.io/i/GZlLJ0d", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "user_id": "CTlk1QZN33LQUT", + "created_at": 1595457174, + "idempotency_key": null + } + } + }, + "created_at": 1595457208 +} +``` + +### Invoice Expired + +Indicates that a registration link has expired. + +```json: Emandate +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.expired", + "contains": [ + "invoice" + ], + "payload": { + "invoice": { + "entity": { + "id": "inv_EhT8EVjQDUukPy", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_EhT8EWJQqnMYq5", + "payment_id": null, + "status": "expired", + "expire_by": 1587580199, + "issued_at": 1587544830, + "paid_at": null, + "cancelled_at": null, + "expired_at": 1587580384, + "sms_status": "sent", + "email_status": "sent", + "date": 1587544830, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Emandate", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "comment": null, + "short_url": "https://rzp.io/i/bJsb41M", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "subscription_status": null, + "user_id": "BhPhy4mGkOmThn", + "created_at": 1587544830, + "idempotency_key": null, + "reminder_status": null + } + } + }, + "created_at": 1587580384 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.expired", + "contains": [ + "invoice" + ], + "payload": { + "invoice": { + "entity": { + "id": "inv_EhT9735kpvUafM", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_EhT9741SenUX1D", + "payment_id": null, + "status": "expired", + "expire_by": 1587580199, + "issued_at": 1587544880, + "paid_at": null, + "cancelled_at": null, + "expired_at": 1587580384, + "sms_status": "sent", + "email_status": "sent", + "date": 1587544880, + "terms": null, + "partial_payment": false, + "gross_amount": 10000, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 10000, + "amount_paid": 0, + "amount_due": 10000, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Card", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "comment": null, + "short_url": "https://rzp.io/i/BapcbaV", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "subscription_status": null, + "user_id": "BhPhy4mGkOmThn", + "created_at": 1587544880, + "idempotency_key": null, + "reminder_status": null + } + } + }, + "created_at": 1587580384 +} +```json: Paper NACH +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "invoice.expired", + "contains": [ + "invoice" + ], + "payload": { + "invoice": { + "entity": { + "id": "inv_EhTAJksst7voVZ", + "entity": "invoice", + "receipt": null, + "invoice_number": null, + "customer_id": "cust_DtHaBuooGHTuyZ", + "customer_details": { + "id": "cust_DtHaBuooGHTuyZ", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9876543210" + }, + "order_id": "order_EhTAJlTQZbL9NT", + "payment_id": null, + "status": "expired", + "expire_by": 1587580199, + "issued_at": 1587544949, + "paid_at": null, + "cancelled_at": null, + "expired_at": 1587580384, + "sms_status": "sent", + "email_status": "sent", + "date": 1587544949, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "currency_symbol": "₹", + "description": "Paper NACH", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "comment": null, + "short_url": "https://rzp.io/i/IT8vEd1", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "supply_state_code": null, + "subscription_status": null, + "user_id": "BhPhy4mGkOmThn", + "created_at": 1587544949, + "idempotency_key": null, + "reminder_status": null, + "token": { + "method": "nach", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 10000000, + "auth_type": "physical", + "expire_at": 1617215399, + "nach": { + "create_form": true, + "form_reference1": "Reference 1", + "form_reference2": "Reference 2", + "prefilled_form": "https://rzp.io/i/jDvNSTc", + "upload_form_url": "https://rzp.io/i/IT8vEd1", + "description": "Paper NACH" + }, + "bank_account": { + "ifsc": "HDFC0000123", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "88990011223344", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9876543210" + }, + "first_payment_amount": 0 + }, + "nach_form_url": "https://rzp.io/i/jDvNSTc" + } + } + }, + "created_at": 1587580384 +} +``` + +## Check Notification Status using Webhooks + +You can use these webhooks to check the status of the pre-debit notification sent to the customer when the payment method is [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md) and [Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md). These notification webhooks are available only if you send the notification object while creating an order. + +Webhooks Event | Description +--- +`notification.delivered` | Indicates that a pre-debit notification is successfully delivered. +--- +`notification.failed` | Indicates that a pre-debit notification has failed to deliver. + +### Notification Delivered + +Indicates that a pre-debit notification is successfully delivered. + +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "order.notification.delivered", + "contains": [ + "notification" + ], + "payload": { + "notification": { + "entity": { + "id": "notification_00000000000001", + "entity": "notification", + "order_id": "order_1Aa00000000002", + "token_id": "token_M7K2eFBU7vToaQ", + "delivered_at": 1634057113, + "status": "delivered", + "payment_after": 1634057114 + } + }, + "created_at": 1595456636 + } +} +``` + +### Notification Failed + +Indicates that a pre-debit notification has failed to deliver. You should re-trigger the pre-debit notification before making a debit attempt in these cases. + +```json: UPI +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "order.notification.failed", + "contains": [ + "notification" + ], + "payload": { + "notification": { + "entity": { + "id": "notification_00000000000002", + "entity": "notification", + "order_id": "order_1Aa00000000002", + "token_id": "token_M7K2eFBU7vToaQ", + "delivered_at": null, + "status": "failed", + "payment_after": 1634057114 + } + }, + "created_at": 1595456636 + } +} +``` diff --git a/llm-content/payments/payment-gateway/s2s-integration/redirect.md b/llm-content/payments/payment-gateway/s2s-integration/redirect.md new file mode 100644 index 00000000..2a47939c --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/redirect.md @@ -0,0 +1,36 @@ +--- +title: About Server-to-Server Redirect Integration +description: Use S2S Redirect API to integrate with Razorpay Payment Gateway. +--- + +# About Server-to-Server Redirect Integration + +Server-to-Server payments integration lets you communicate directly with the Razorpay servers and seamlessly integrate the service in your web application. The direct integration enables you to capture payment details on your secure server and process the payments at your end using our Checkout. + +This integration method provides you with complete control over the look and feel of the payment experience for your customers. + +## Prerequisites +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Raise a request with our Support team to get this feature enabled on your account. +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. +- Know about [Razorpay Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md). + +> **WARN** +> +> +> +> **Watch Out!** +> +> PCI Compliance: In order to securely save the sensitive card details entered by the customer, a PCI compliance certificate is mandatory. For more details, refer to the [PCI Compliance](https://www.pcisecuritystandards.org/) website. +> + +## Integration Steps +Follow these integration steps: + +1. [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/redirect/build-integration.md). +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/redirect/test-integration.md). +3. [Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/redirect/go-live-checklist.md). + +### Related Information +- [Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/best-practices.md) +- [Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/features/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/redirect/build-integration.md b/llm-content/payments/payment-gateway/s2s-integration/redirect/build-integration.md new file mode 100644 index 00000000..c9e8bfb4 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/redirect/build-integration.md @@ -0,0 +1,919 @@ +--- +title: 1. Build Integration +description: Steps to integrate your Web application with the Razorpay S2S Redirect API. +--- + +# 1. Build Integration + +You can integrate with Razorpay APIs to start accepting payments made using netbanking, card, UPI and other payment methods. In this document, the netbanking payment method has been shown as an example. + +Follow these steps to integrate your Web application with the Razorpay S2S Redirect API: + +**1.1** [Create an Order](#11-create-an-order). + +**1.2** [Create a Payment](#12-create-a-payment). + +**1.3** [Handle Payment Success and Failure](#13-handle-payment-success-and-failure). + +**1.4** [Verify Payment Signature](#14-verify-payment-signature). + +**1.5** [Verify Payment Status](#15-verify-payment-status). + +> **WARN** +> +> +> **Watch Out!** +> +> Do not hardcode the URL returned in the API responses. +> + +## 1.1 Create an Order + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +## 1.2 Create a Payment + +Create a payment using the API given below after your order is created. + +/payments/create/redirect + +#### Sample Code + +The following is a sample API request and response for creating a payment: + +```curl: Curl +curl -X POST \ +https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d + '{ + "amount": 100, + "currency": "INR", + "contact": "8888888888", + "email": "gaurav@gmail.com", + "order_id": "order_4xbQrmEoA5WJ0G", + "method": "netbanking", + "bank": "HDFC", + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +}' + +```php: PHP + +$api = new Api($key_id, $secret); + +$api->payment->createPaymentRedirect(array('amount' => 100,'currency' => 'INR','email' => 'gaurav.kumar@example.com','contact' => '9000090000','order_id' => 'order_I6LVPRQ6upW3uh','ip' => '105.106.107.108','method' => 'netbanking','bank' => 'HDFC'))); + +```javascript: Node.js + +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' })instance.payments.createPaymentRedirect({ amount: 100, currency: "INR", order_id: "order_EAkbvXiCJlwhHR", ip: "105.106.107.108", email: "gaurav.kumar@example.com", contact: 9090909090, method: "netbanking", bank: "HDFC"}) + +```python: Python + +import razorpayclient = razorpay.Client(auth=("key", "secret"))resp = client.payment.createPaymentRedirect({ "amount": 100, "currency": "INR", "order_id": "order_ItZMEZjpBD6dhT", "ip": "105.106.107.108", "email": "gaurav.kumar@example.com", "contact": 9090909090, "method": "netbanking", "bank": "HDFC"})print(resp) +``` + +```java: Success Response + + Processing, Please Wait... + + + + + + + * { + box-sizing: border-box; + margin: 0; + padding: 0; + } + + body { + background: #f5f5f5; + overflow: hidden; + text-align: center; + height: 100%; + white-space: nowrap; + margin: 0; + padding: 0; + font-family: -apple-system, BlinkMacSystemFont, ubuntu, verdana, helvetica, sans-serif; + } + + #bg { + position: absolute; + bottom: 50%; + width: 100%; + height: 50%; + background: #198C78; + margin-bottom: 90px; + } + + #cntnt { + position: relative; + width: 100%; + vertical-align: middle; + display: inline-block; + margin: auto; + max-width: 420px; + min-width: 280px; + height: 95%; + max-height: 360px; + background: #fff; + z-index: 9999; + box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.16); + border-radius: 4px; + overflow: hidden; + padding: 24px; + box-sizing: border-box; + text-align: left; + } + + #ftr { + position: absolute; + left: 0; + right: 0; + bottom: 0; + height: 80px; + background: #f5f5f5; + text-align: center; + color: #212121; + font-size: 14px; + letter-spacing: -0.3px; + } + + #ftr_new { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 24px; + position: absolute; + left: 0; + right: 0; + bottom: 0; + height: 80px; + background: #f5f5f5; + text-align: center; + color: #212121; + font-size: 14px; + letter-spacing: -0.3px; + } + + #ldr { + width: 100%; + height: 3px; + position: relative; + margin-top: 16px; + border-radius: 3px; + overflow: hidden; + } + + #ldr::before, + #ldr::after { + content: ''; + position: absolute; + top: 0; + bottom: 0; + width: 100%; + } + + #ldr::before { + top: 1px; + border-top: 1px solid #bcbcbc; + } + + #ldr::after { + background: #198C78; + width: 0%; + transition: 20s cubic-bezier(0, 0.1, 0, 1); + } + + .loaded #ldr::after { + width: 90%; + } + + #logo { + width: 48px; + height: 48px; + padding: 8px; + border: 1px solid #e5e5e5; + border-radius: 3px; + text-align: center; + } + + #hdr { + min-height: 48px; + position: relative; + } + + #logo, + #name, + #amt { + display: inline-block; + vertical-align: middle; + letter-spacing: -0.5px; + } + + #amt { + position: absolute; + right: 0; + top: 0; + background: #fff; + color: #212121; + } + + #name { + line-height: 48px; + margin-left: 12px; + font-size: 16px; + max-width: 140px; + overflow: hidden; + text-overflow: ellipsis; + color: #212121; + } + + #logo+#name { + line-height: 20px; + } + + #txt { + height: 200px; + text-align: center; + } + + #title { + font-size: 20px; + line-height: 24px; + margin-bottom: 8px; + letter-spacing: -0.3px; + } + + #msg, + #cncl { + font-size: 14px; + line-height: 20px; + color: #757575; + margin-bottom: 8px; + letter-spacing: -0.3px; + } + + #cncl { + text-decoration: underline; + cursor: pointer; + } + + #logo img { + max-width: 100%; + max-height: 100%; + vertical-align: middle; + } + + @media (max-height:580px), + (max-width:420px) { + #bg { + display: none; + } + + body { + background: #198C78; + } + } + + @media (max-width:420px) { + #cntnt { + padding: 16px; + width: 95%; + } + + #name { + margin-left: 8px; + } + } + + @media (max-height:580px), + (max-width:420px) { + #ftr_new { + padding: 0 16px; + } + } + + + var events = { + page: 'payment_redirect_postform', + props: { + payment_id: 'pay_KFMEsPhiP7Ipou', + merchant_id: '8TgNt9DVrJB0bl', + }, + load: true, + unload: true + } + + !function(e){e.track=Boolean;try{if(/razorpay\.in$/.test(location.origin))return;if("object"!=typeof e.events)return;var n=e.events.props;if(0===Object.keys(n).length)return;var t,o=e.events,r=o.page,a=o.load,s=o.unload,i=o.error,c="https://lumberjack.razorpay.com/v1/track",u="MC40OTMwNzgyMDM3MDgwNjI3Nw9YnGzW",p="function"==typeof navigator.sendBeacon,d=Date.now(),f=[{name:"ua_parser",input_key:"user_agent",output_key:"user_agent_parsed"}];function l(e,o){(o=o||{}).beacon=p,o.time_since_render=Date.now()-d,o.url=location.href,function(e,n){if(e&&n)Object.keys(n).forEach(function(t){e[t]=n[t]})}(o,n);var a={addons:f,events:[{event:r+":"+e,properties:o,timestamp:Date.now()}]},s=encodeURIComponent(btoa(unescape(encodeURIComponent(JSON.stringify(a))))),i=JSON.stringify({key:u,data:s});p?navigator.sendBeacon(c,i):((t=new XMLHttpRequest).open("post",c,!0),t.send(i))}a&&l("load"),s&&e.addEventListener("unload",function(){l("unload")}),i&&e.addEventListener("error",function(e){l("error",{message:e.message,line:e.line,col:e.col,stack:e.error&&e.error.stack})})}catch(e){}e.track=l}(window); + + + + + + + RazorPay + + + + + + Loading Bank page… + Please wait while we redirect you to your Bank page + + + + + + Secured by + ![](https://cdn.razorpay.com/logo.svg) + + + + + setTimeout(function() { + document.body.className = 'loaded'; + }, 10); + + setTimeout(function(){ + document.getElementById('title').innerHTML = 'Still trying to load...'; + document.getElementById('msg').innerHTML = 'The bank page is taking time to load.'; + }, 10000); + + +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Invalid payment method given: banks", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. + For example, if the amount to be charged is , then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, `INR`. Refer to the [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) for a list of supported international currencies. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order created at your server side. + Enter the `id` returned in the response of the [previous](#11-create-an-order) step. + +`email` _mandatory_ +: `string` Email address of the customer. + +`contact` _mandatory_ +: `string` Contact of the customer. + +`method` _mandatory_ +: `string` Supported payment methods are: + +- `card` +- `netbanking` +- `wallet` +- `emi` +- `upi` +- `emandate` + +`vpa` _mandatory_ +: `string` Virtual payment address of the customer. Required if the method is `upi`. + + +> **WARN** +> +> +> **Deprecation Notice** +> +> UPI Collect is deprecated effective 28 February 2026. This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [ migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/s2s-integration.md) to switch to UPI Intent. +> + +`card` +: The fields that can be pre-populated in the Checkout form. + + `number` _mandatory_ + : `string` Unformatted card number. Required if the method is `card`. + + `name` _mandatory_ + : `string` Name of the cardholder. Required if the method is `card`. + + `expiry_month` _mandatory_ + : `integer` Expiry month for the card in `MM` format. Required if the method is `card`. + + `expiry_year` _mandatory_ + : `string` Expiry year for the card in `YY` format. Required if the method is `card`. + + `cvv` _mandatory_ + : `string` CVV printed on the back of the card. Required if the method is `card`. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +`bank_account` +: The details of the bank account that should be passed in the request. + + `account_number` _mandatory_ + : `string` Bank account number used to initiate the payment. Required if the method is `emandate`. + + `ifsc` _mandatory_ + : `string` IFSC of the bank used to initiate the payment. Required if the method is `emandate`. + + `name` _mandatory_ + : `string` Name associated with the bank account used to initiate the payment. Required if the method is `emandate`. + +`bank` _mandatory_ +: `string` Bank code of the bank used for the payment. Required if the method is `fpx`. + +`wallet` _mandatory_ +: `string` Wallet code for the wallet used for the payment. Required if the method is `wallet`. + +`notes` _optional_ +: `object` Key-value object used for passing tracking info. Refer to [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`ip` _mandatory_ +: `string` IP Address of the client's browser. + +`referrer` _mandatory_ +: `string` Referrer header passed by the client's browser. + +`user_agent` _mandatory_ +: `string` Value of **user_agent** header passed by the client's browser. + +#### Response Parameters + +Descriptions for the response parameters are present in the [Payments Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#payments-entity) parameters table. + +#### Response Types + +`2OO OK` +: The response contains `200 OK` code along with the HTML content that needs to be opened in the customer's browser. This HTML content contains form fields that will be automatically posted to the bank or wallet URL (specified in the form) to continue with the payment process. + +`400 Bad Request` +: This can happen when erroneous parameters are passed in the request, for example invalid currency. + + ``` + { + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "error_source": "gateway", + "error_step": "payment_authorization", + "error_reason": "payment_failed", + } + ``` + +Know more about [errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md). + +The HTML form returned in the response should be opened in the customer's browser. The customer completes the payment on the displayed page. + +## 1.3 Handle Payment Success and Failure + +Once the payment is completed by the customer, a `POST` request is sent to the `callback_url` provided in the [create a payment request](#12-create-a-payment). The data contained in the `POST` request depends on the **success** or **failure** of the payment made by the customer. + +#### Success + +A successful payment contains the following fields: + +1. `razorpay_payment_id` +2. `razorpay_order_id` +3. `razorpay_signature` + +```json: Success - Callback + +{ "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` +#### Failure + +In failed payments, the response received at the callback contains the error details as shown below: + +``` +error%5Bcode%5D=BAD_REQUEST_ERROR&error%5Bdescription%5D=Payment+failed&error%5Bsource%5D=gateway&error%5Bstep%5D=payment_authorization&error%5Breason%5D=payment_failed&error%5Bmetadata%5D=%7B%22payment_id%22%3A%22pay_HDP0E0MdoAaOYu%22%2C%22order_id%22%3A%22order_HDOSKuUVbejk0C%22%7D +``` + +The key-value parameters of the request are shown below: + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment failed`. + +`error_source` +: `string` The point of failure. For example, `gateway`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_auhtorization`. + +`error_reason` +: `string` The exact error reason. For example, `payment_failed`. + +`metadata` +: `object` Contains additional information about the request. + + `payment_id` + : `string` Unique identifier of the payment. + + `order_id` + : `string` Unique identifier of the order associated with the payment. + +Know more about [errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md). + +## 1.4 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +## 1.5 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Integrate Payments Rainy Day Kit + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/redirect/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/redirect/build-integration/cards.md b/llm-content/payments/payment-gateway/s2s-integration/redirect/build-integration/cards.md new file mode 100644 index 00000000..03621dfd --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/redirect/build-integration/cards.md @@ -0,0 +1,1031 @@ +--- +title: 1. Build Integration +description: Steps to integrate S2S Redirect API and accept payments using cards. +--- + +# 1. Build Integration + +You can integrate with Razorpay APIs to start accepting payments made using cards. Razorpay APIs support the latest 3DS2 authentication protocol. + +> **INFO** +> +> +> +> **Handy Tips** +> +> If you are an existing Razorpay user, that is, you integrated with our S2S APIs before October 15, 2022, you need to make certain integration changes to +> [migrate to the 3DS2 flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/redirect/build-integration/cards/migrate-3ds2.0.md). +> + +> **WARN** +> +> +> +> Watch Out! +> +> You must have a PCI compliance certificate to get this feature enabled on your account. +> + +## 3DS2 Authentication +3DS2 is an authentication protocol, the successor of 3DS1, that enables businesses and payment providers to send additional information (such as customer device or browser data) to verify the transaction's authenticity. Razorpay integration is compliant with the 3DS2 protocol. + +**Know more:** Razorpay supports [3DS2 transactions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cards/3ds2.0.md). + +> **INFO** +> +> +> **Handy Tips** +> +> - Integration does not differ for the challenge or frictionless flow. +> - Frictionless flow is not applicable for payments on cards issued in India. +> + +Follow these steps to integrate your Web application with the Razorpay S2S Redirect API: + +**1.1** [Create an Order](#11-create-an-order). + +**1.2** [Create a Payment](#12-create-a-payment). + +**1.3** [Handle Payment Success and Failure](#13-handle-payment-success-and-failure). + +**1.4** [Verify Payment Signature](#14-verify-payment-signature). + +**1.5** [Verify Payment Status](#15-verify-payment-status). + +> **WARN** +> +> +> **Watch Out!** +> +> Do not hardcode the URL returned in the API responses. +> + +## 1.1 Create an Order + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +## 1.2 Create a Payment + +Create a payment using the API given below after your order is created. + +/payments/create/redirect + +#### Sample Code + +The following is a sample API request and response for creating a payment: + +```curl: Curl +curl -X POST \ +https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d + '{ + "amount": 100, + "currency": "INR", + "contact": "8888888888", + "email": "gaurav@gmail.com", + "order_id": "order_4xbQrmEoA5WJ0G", + "method": "card", + "card": { + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 23, + "cvv": 100 + }, + "authentication":{ + "authentication_channel": "browser" + }, + "browser":{ + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +}' + +```java: Success Response + + Processing, Please Wait... + + + + + + + * { + box-sizing: border-box; + margin: 0; + padding: 0; + } + + body { + background: #f5f5f5; + overflow: hidden; + text-align: center; + height: 100%; + white-space: nowrap; + margin: 0; + padding: 0; + font-family: -apple-system, BlinkMacSystemFont, ubuntu, verdana, helvetica, sans-serif; + } + + #bg { + position: absolute; + bottom: 50%; + width: 100%; + height: 50%; + background: #198C78; + margin-bottom: 90px; + } + + #cntnt { + position: relative; + width: 100%; + vertical-align: middle; + display: inline-block; + margin: auto; + max-width: 420px; + min-width: 280px; + height: 95%; + max-height: 360px; + background: #fff; + z-index: 9999; + box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.16); + border-radius: 4px; + overflow: hidden; + padding: 24px; + box-sizing: border-box; + text-align: left; + } + + #ftr { + position: absolute; + left: 0; + right: 0; + bottom: 0; + height: 80px; + background: #f5f5f5; + text-align: center; + color: #212121; + font-size: 14px; + letter-spacing: -0.3px; + } + + #ftr_new { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 24px; + position: absolute; + left: 0; + right: 0; + bottom: 0; + height: 80px; + background: #f5f5f5; + text-align: center; + color: #212121; + font-size: 14px; + letter-spacing: -0.3px; + } + + #ldr { + width: 100%; + height: 3px; + position: relative; + margin-top: 16px; + border-radius: 3px; + overflow: hidden; + } + + #ldr::before, + #ldr::after { + content: ''; + position: absolute; + top: 0; + bottom: 0; + width: 100%; + } + + #ldr::before { + top: 1px; + border-top: 1px solid #bcbcbc; + } + + #ldr::after { + background: #198C78; + width: 0%; + transition: 20s cubic-bezier(0, 0.1, 0, 1); + } + + .loaded #ldr::after { + width: 90%; + } + + #logo { + width: 48px; + height: 48px; + padding: 8px; + border: 1px solid #e5e5e5; + border-radius: 3px; + text-align: center; + } + + #hdr { + min-height: 48px; + position: relative; + } + + #logo, + #name, + #amt { + display: inline-block; + vertical-align: middle; + letter-spacing: -0.5px; + } + + #amt { + position: absolute; + right: 0; + top: 0; + background: #fff; + color: #212121; + } + + #name { + line-height: 48px; + margin-left: 12px; + font-size: 16px; + max-width: 140px; + overflow: hidden; + text-overflow: ellipsis; + color: #212121; + } + + #logo+#name { + line-height: 20px; + } + + #txt { + height: 200px; + text-align: center; + } + + #title { + font-size: 20px; + line-height: 24px; + margin-bottom: 8px; + letter-spacing: -0.3px; + } + + #msg, + #cncl { + font-size: 14px; + line-height: 20px; + color: #757575; + margin-bottom: 8px; + letter-spacing: -0.3px; + } + + #cncl { + text-decoration: underline; + cursor: pointer; + } + + #logo img { + max-width: 100%; + max-height: 100%; + vertical-align: middle; + } + + @media (max-height:580px), + (max-width:420px) { + #bg { + display: none; + } + + body { + background: #198C78; + } + } + + @media (max-width:420px) { + #cntnt { + padding: 16px; + width: 95%; + } + + #name { + margin-left: 8px; + } + } + + @media (max-height:580px), + (max-width:420px) { + #ftr_new { + padding: 0 16px; + } + } + + + var events = { + page: 'payment_redirect_postform', + props: { + payment_id: 'pay_KFMEsPhiP7Ipou', + merchant_id: '8TgNt9DVrJB0bl', + }, + load: true, + unload: true + } + + !function(e){e.track=Boolean;try{if(/razorpay\.in$/.test(location.origin))return;if("object"!=typeof e.events)return;var n=e.events.props;if(0===Object.keys(n).length)return;var t,o=e.events,r=o.page,a=o.load,s=o.unload,i=o.error,c="https://lumberjack.razorpay.com/v1/track",u="MC40OTMwNzgyMDM3MDgwNjI3Nw9YnGzW",p="function"==typeof navigator.sendBeacon,d=Date.now(),f=[{name:"ua_parser",input_key:"user_agent",output_key:"user_agent_parsed"}];function l(e,o){(o=o||{}).beacon=p,o.time_since_render=Date.now()-d,o.url=location.href,function(e,n){if(e&&n)Object.keys(n).forEach(function(t){e[t]=n[t]})}(o,n);var a={addons:f,events:[{event:r+":"+e,properties:o,timestamp:Date.now()}]},s=encodeURIComponent(btoa(unescape(encodeURIComponent(JSON.stringify(a))))),i=JSON.stringify({key:u,data:s});p?navigator.sendBeacon(c,i):((t=new XMLHttpRequest).open("post",c,!0),t.send(i))}a&&l("load"),s&&e.addEventListener("unload",function(){l("unload")}),i&&e.addEventListener("error",function(e){l("error",{message:e.message,line:e.line,col:e.col,stack:e.error&&e.error.stack})})}catch(e){}e.track=l}(window); + + + + + + + RazorPay + + + + + + Loading Bank page… + Please wait while we redirect you to your Bank page + + + + + + Secured by + ![](https://cdn.razorpay.com/logo.svg) + + + + + setTimeout(function() { + document.body.className = 'loaded'; + }, 10); + + setTimeout(function(){ + document.getElementById('title').innerHTML = 'Still trying to load...'; + document.getElementById('msg').innerHTML = 'The bank page is taking time to load.'; + }, 10000); + + +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Invalid payment method given: cards", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {} + } +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, `INR`. Refer to the [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) for a list of supported international currencies. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`order_id` _mandatory_ +: `string` Unique identifier of the Order created at your server side. + Enter the `id` returned in the response of the [previous](#11-create-an-order) step. + +`email` _mandatory_ +: `string` Email address of the customer. + +`contact` _mandatory_ +: `string` Contact of the customer. + +`method` _mandatory_ +: `string` Supported payment methods are: + +- `card` +- `netbanking` +- `wallet` +- `emi` +- `upi` +- `emandate` + +`vpa` _mandatory_ +: `string` Virtual payment address of the customer. Required if the method is `upi`. + + +> **WARN** +> +> +> **Deprecation Notice** +> +> UPI Collect is deprecated effective 28 February 2026. This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [ migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/s2s-integration.md) to switch to UPI Intent. +> + +`card` +: The fields that can be pre-populated in the Checkout form. + + `number` _mandatory_ + : `string` Unformatted card number. Required if the method is `card`. + + `name` _mandatory_ + : `string` Name of the cardholder. Required if the method is `card`. + + `expiry_month` _mandatory_ + : `integer` Expiry month for the card in `MM` format. Required if the method is `card`. + + `expiry_year` _mandatory_ + : `string` Expiry year for the card in `YY` format. Required if the method is `card`. + + `cvv` _mandatory_ + : `string` CVV printed on the back of the card. Required if the method is `card`. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +`bank_account` +: The details of the bank account that should be passed in the request. + + `account_number` _mandatory_ + : `string` Bank account number used to initiate the payment. Required if the method is `emandate`. + + `ifsc` _mandatory_ + : `string` IFSC of the bank used to initiate the payment. Required if the method is `emandate`. + + `name` _mandatory_ + : `string` Name associated with the bank account used to initiate the payment. Required if the method is `emandate`. + +`bank` _mandatory_ +: `string` Bank code of the bank used for the payment. Required if the method is `netbanking` or `emandate`. + +`wallet` _mandatory_ +: `string` Wallet code for the wallet used for the payment. Required if the method is `wallet`. + +`notes` _optional_ +: `object` Key-value object used for passing tracking info. Refer to [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`ip` _mandatory_ +: `string` IP Address of the client's browser. + +`authentication` _optional_ +: `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + +`browser` _mandatory_ +: `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder browser local time. Obtained from the `getTimezoneOffset()` method applied to `Date` object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from payer's browser using the `screen.colorDepth` HTML DOM property. + + `language` + : `string` Obtained from payer's browser using the `navigator.language` HTML DOM property. Maximum limit of 8 characters. + +`referrer` _mandatory_ +: `string` Referrer header passed by the client's browser. + +`user_agent` _mandatory_ +: `string` Value of **user_agent** header passed by the client's browser. + +#### Response Parameters + +Descriptions for the response parameters are present in the [Payments Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#payments-entity) parameters table. + +#### Response Types + +`2OO OK` +:The response contains `200 OK` code along with the HTML content that needs to be opened in the customer's browser. This HTML content contains form fields which will be automatically posted to the bank or wallet URL (specified in the form) to continue with the payment process. + +`400 Bad Request` +: This can happen when erroneous parameters are passed in the request, for example, invalid currency or wrong card number. + +``` +{ + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "error_source": "gateway", + "error_step": "payment_authorization", + "error_reason": "payment_failed" +} +``` + +Know more about [errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md). + +The HTML form returned in the response should be opened in the customer's browser. The customer completes the payment on the displayed page. + +## 1.3 Handle Payment Success and Failure + +Once the payment is completed by the customer, a `POST` request is sent to the `callback_url` provided in the [create a payment request](#12-create-a-payment). The data contained in the `POST` request depends on the **success** or **failure** of the payment made by the customer. + +#### Success + +A successful payment contains the following fields: + +1. `razorpay_payment_id` +2. `razorpay_order_id` +3. `razorpay_signature` + +```json: Success - Callback + +{ "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` +#### Failure + +In failed payments, the response received at the callback contains the error details as shown below: + +``` +error%5Bcode%5D=BAD_REQUEST_ERROR&error%5Bdescription%5D=Payment+failed&error%5Bsource%5D=gateway&error%5Bstep%5D=payment_authorization&error%5Breason%5D=payment_failed&error%5Bmetadata%5D=%7B%22payment_id%22%3A%22pay_HDP0E0MdoAaOYu%22%2C%22order_id%22%3A%22order_HDOSKuUVbejk0C%22%7D +``` + +The key-value parameters are shown below: + +`error_code` +: `string` Error that occurred during payment. For example, `BAD_REQUEST_ERROR`. + +`error_description` +: `string` Description of the error that occurred during payment. For example, `Payment failed`. + +`error_source` +: `string` The point of failure. For example, `gateway`. + +`error_step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, `payment_auhtorization`. + +`error_reason` +: `string` The exact error reason. For example, `payment_failed`. + +`metadata` +: `object` Contains additional information about the request. + + `payment_id` + : `string` Unique identifier of the payment. + + `order_id` + : `string` Unique identifier of the order associated with the payment. + +Know more about [errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md). + +## 1.4 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +## 1.5 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Integrate Payments Rainy Day Kit + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + +#### Test Cards + +Use the following test cards for Indian payments: + +Network | Card Number | CVV & Expiry Date +--- +Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ +--- +Mastercard | 5500 6700 0000 1002 | +--- +RuPay | 6527 6589 0000 1005 | +--- +Diners | 3608 280009 1007 | +--- +Amex | 3402 560004 01007 | + +#### Error Scenarios + +Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. +Check the following lists: +- [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). +- [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/redirect/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/redirect/build-integration/cards/migrate-3ds2.0.md b/llm-content/payments/payment-gateway/s2s-integration/redirect/build-integration/cards/migrate-3ds2.0.md new file mode 100644 index 00000000..cac2c020 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/redirect/build-integration/cards/migrate-3ds2.0.md @@ -0,0 +1,509 @@ +--- +title: 3DS2 Migration Guide for Existing S2S Cards Integration +description: Integration changes needed to accept card payments with the 3DS2 protocol. +--- + +# 3DS2 Migration Guide for Existing S2S Cards Integration + +If you integrated with our S2S APIs before October 15, 2022, you must make the following changes to your integration to accept card payments with 3DS2 authentication protocol. + +> **WARN** +> +> +> +> **Watch Out!** +> +> You must have a PCI compliance certificate to get this feature enabled on your account. +> + +## 3DS2 Authentication + +3DS2 is an authentication protocol, the successor of 3DS1, that enables businesses and payment providers to send additional information (such as customer device or browser data) to verify the transaction's authenticity. Razorpay integration is compliant with the 3DS2 protocol. + +**Know more**: Razorpay supports [3DS2 transactions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cards/3ds2.0.md). + +The customer's bank evaluates the transaction for risk and decides on the payment flow. + +- **Frictionless Flow**: This flow is activated if the bank determines that the transaction is from a trusted device and allows the payment to go through without any additional authentication from the customer. Currently, this would not be applicable in India for domestic payments as RBI mandates OTP-based authentication. For international payments, this flow is viable. + +- **Challenge Flow**: This flow is activated if the bank determines that the transaction is not from a trusted device and needs additional information. The customer needs to perform additional authentication steps. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Integration does not differ for the challenge flow or the frictionless flow. +> - Frictionless flow is not applicable for payments on cards issued in India. +> + +Given below is a diagram that explains the 3DS2 flow: + +![Cards 3DS2 Protocol](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-3ds-flowchart.jpg.md) + +## Quick Summary of Integration Changes + +Ensure you make the following changes in your [Create a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/redirect/build-integration/cards.md#12-create-a-payment) request. There is no change in the response. + +Parameter Changes | Description +--- +New Parameters | Pass these new parameters: - `authentication` and related child parameter: These determine the [authentication channel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/redirect/build-integration/cards/migrate-3ds2.0.md#:~:text=Details%20of%20the-,authentication%20channel,-.) being used. +- `browser` and related child parameters: These capture the customer's [browser details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/redirect/build-integration/cards/migrate-3ds2.0.md#:~:text=regarding%20the%20customer%27s-,browser,-.%20This%20parameter%20need), which are sent to the banks to aid their risk analysis. + +--- +Existing Parameter | The `ip` parameter is now mandatory. + +### Sample Code + +The following endpoint creates a payment via the redirect flow. + +/payments/create/redirect + +```curl: Request +curl -X POST \ +https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card":{ + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 23, + "cvv": 100 + }, + "authentication":{ + "authentication_channel": "browser" + }, + ### 3DS2.0 Browser Parameters### + "browser":{ + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +}' +```html: Response + + Processing, Please Wait... + + + + + + + * { + box-sizing: border-box; + margin: 0; + padding: 0; + } + + body { + background: #f5f5f5; + overflow: hidden; + text-align: center; + height: 100%; + white-space: nowrap; + margin: 0; + padding: 0; + font-family: -apple-system, BlinkMacSystemFont, ubuntu, verdana, helvetica, sans-serif; + } + + #bg { + position: absolute; + bottom: 50%; + width: 100%; + height: 50%; + background: #198C78; + margin-bottom: 90px; + } + + #cntnt { + position: relative; + width: 100%; + vertical-align: middle; + display: inline-block; + margin: auto; + max-width: 420px; + min-width: 280px; + height: 95%; + max-height: 360px; + background: #fff; + z-index: 9999; + box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.16); + border-radius: 4px; + overflow: hidden; + padding: 24px; + box-sizing: border-box; + text-align: left; + } + + #ftr { + position: absolute; + left: 0; + right: 0; + bottom: 0; + height: 80px; + background: #f5f5f5; + text-align: center; + color: #212121; + font-size: 14px; + letter-spacing: -0.3px; + } + + #ftr_new { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 24px; + position: absolute; + left: 0; + right: 0; + bottom: 0; + height: 80px; + background: #f5f5f5; + text-align: center; + color: #212121; + font-size: 14px; + letter-spacing: -0.3px; + } + + #ldr { + width: 100%; + height: 3px; + position: relative; + margin-top: 16px; + border-radius: 3px; + overflow: hidden; + } + + #ldr::before, + #ldr::after { + content: ''; + position: absolute; + top: 0; + bottom: 0; + width: 100%; + } + + #ldr::before { + top: 1px; + border-top: 1px solid #bcbcbc; + } + + #ldr::after { + background: #198C78; + width: 0%; + transition: 20s cubic-bezier(0, 0.1, 0, 1); + } + + .loaded #ldr::after { + width: 90%; + } + + #logo { + width: 48px; + height: 48px; + padding: 8px; + border: 1px solid #e5e5e5; + border-radius: 3px; + text-align: center; + } + + #hdr { + min-height: 48px; + position: relative; + } + + #logo, + #name, + #amt { + display: inline-block; + vertical-align: middle; + letter-spacing: -0.5px; + } + + #amt { + position: absolute; + right: 0; + top: 0; + background: #fff; + color: #212121; + } + + #name { + line-height: 48px; + margin-left: 12px; + font-size: 16px; + max-width: 140px; + overflow: hidden; + text-overflow: ellipsis; + color: #212121; + } + + #logo+#name { + line-height: 20px; + } + + #txt { + height: 200px; + text-align: center; + } + + #title { + font-size: 20px; + line-height: 24px; + margin-bottom: 8px; + letter-spacing: -0.3px; + } + + #msg, + #cncl { + font-size: 14px; + line-height: 20px; + color: #757575; + margin-bottom: 8px; + letter-spacing: -0.3px; + } + + #cncl { + text-decoration: underline; + cursor: pointer; + } + + #logo img { + max-width: 100%; + max-height: 100%; + vertical-align: middle; + } + + @media (max-height:580px), + (max-width:420px) { + #bg { + display: none; + } + + body { + background: #198C78; + } + } + + @media (max-width:420px) { + #cntnt { + padding: 16px; + width: 95%; + } + + #name { + margin-left: 8px; + } + } + + @media (max-height:580px), + (max-width:420px) { + #ftr_new { + padding: 0 16px; + } + } + + + var events = { + page: 'payment_redirect_postform', + props: { + payment_id: 'pay_LMHFoJ8HSiFTe9', + merchant_id: '8TgNt9DVrJB0bl', + }, + load: true, + unload: true + } + + !function(e){e.track=Boolean;try{if(/razorpay\.in$/.test(location.origin))return;if("object"!=typeof e.events)return;var n=e.events.props;if(0===Object.keys(n).length)return;var t,o=e.events,r=o.page,a=o.load,s=o.unload,i=o.error,c="https://lumberjack.razorpay.com/v1/track",u="MC40OTMwNzgyMDM3MDgwNjI3Nw9YnGzW",p="function"==typeof navigator.sendBeacon,d=Date.now(),f=[{name:"ua_parser",input_key:"user_agent",output_key:"user_agent_parsed"}];function l(e,o){(o=o||{}).beacon=p,o.time_since_render=Date.now()-d,o.url=location.href,function(e,n){if(e&&n)Object.keys(n).forEach(function(t){e[t]=n[t]})}(o,n);var a={addons:f,events:[{event:r+":"+e,properties:o,timestamp:Date.now()}]},s=encodeURIComponent(btoa(unescape(encodeURIComponent(JSON.stringify(a))))),i=JSON.stringify({key:u,data:s});p?navigator.sendBeacon(c,i):((t=new XMLHttpRequest).open("post",c,!0),t.send(i))}a&&l("load"),s&&e.addEventListener("unload",function(){l("unload")}),i&&e.addEventListener("error",function(e){l("error",{message:e.message,line:e.line,col:e.col,stack:e.error&&e.error.stack})})}catch(e){}e.track=l}(window); + + + + + + + RazorPay + + + + + + Loading Bank page… + Please wait while we redirect you to your Bank page + + + + + + Secured by + ![](https://cdn.razorpay.com/logo.svg) + + + + + setTimeout(function() { + document.body.className = 'loaded'; + }, 10); + + setTimeout(function(){ + document.getElementById('title').innerHTML = 'Still trying to load...'; + document.getElementById('msg').innerHTML = 'The bank page is taking time to load.'; + }, 10000); + + +```json: Failure Response +{ + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "error_source": "gateway", + "error_step": "payment_authorization", + "error_reason": "payment_failed" +} +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> - The payment request and response would remain the same for both the frictionless and challenge flows. +> - The payment request would remain the same for both redirection and native OTP flows. +> + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, INR. Refer to the list of supported currencies. The length must be 3 characters. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order generated in the first step. + +`email` _mandatory_ +: `string` Email address of the customer. The maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + +`method` _mandatory_ +: `string` Name of the payment method. Possible value is `card`. + +`card` _mandatory_ +: `object` Details associated with the card. + + `number` + : `string` Unformatted card number. + + `name` + : `string` Name of the cardholder. + + `expiry_month` + : `string` Expiry month for the card in MM format. + + `expiry_year` + : `string` Expiry year for the card in YY format. + + `cvv` + : `string` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +`notes` _optional_ +: `object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`referrer` _optional_ +: `string` Referrer header passed by the client's browser. + +`user-agent` _mandatory_ +: `string` The User-Agent header of the user's browser. The default value will be passed by Razorpay if not provided by you. + +`ip` _mandatory_ +: `string` The customer's IP address. + +`authentication` _optional_ +: `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + +`browser` _mandatory_ +: `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to `Date` object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `language` + : `string` Obtained from the payer's browser using the `navigator.language` HTML DOM property. Maximum limit of 8 characters. + +#### Response Parameters + +Descriptions for the response parameters are present in the [Payments Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#payments-entity) parameters table. + +#### Response Types + +`2OO OK` +:The response contains `200 OK` code along with the HTML content that needs to be opened in the customer's browser. This HTML content contains form fields which will be automatically posted to the bank or wallet URL (specified in the form) to continue with the payment process. + +`400 Bad Request` +: This can happen when erroneous parameters are passed in the request, for example, invalid currency or wrong card number. + +Know more about [errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md). + +The HTML form returned in the response should be opened in the customer's browser. The customer completes the payment on the displayed page. + +## Next Step + +The rest of the integration steps mentioned in the [S2S Redirect Cards Build Integration document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/redirect/build-integration/cards.md) remain the same. No changes are required in those. + +After completing the build integration steps, you can continue with [Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/redirect/test-integration.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/redirect/go-live-checklist.md b/llm-content/payments/payment-gateway/s2s-integration/redirect/go-live-checklist.md new file mode 100644 index 00000000..012b85d5 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/redirect/go-live-checklist.md @@ -0,0 +1,76 @@ +--- +title: 3. Go-live Checklist +description: Start accepting Live Payments through Razorpay Payment Gateway. +--- + +# 3. Go-live Checklist + +Consider these steps before taking the integration live. + +## Accept Live Payments + +Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + +## Payment Capture + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +## Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/payment-gateway/s2s-integration/redirect/test-integration.md b/llm-content/payments/payment-gateway/s2s-integration/redirect/test-integration.md new file mode 100644 index 00000000..8ad47907 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/redirect/test-integration.md @@ -0,0 +1,83 @@ +--- +title: 2. Test Integration +description: Steps to test if the integration was successful. +--- + +# 2. Test Integration + +You can make test payments using one of the payment methods configured at the Checkout. + +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API Keys generated in the Test Mode in the Checkout code. + +Following are the payment methods supported as configured at Razorpay Checkout. + +## Netbanking + +You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + +## UPI + +You can enter one of the following UPI IDs: + +- `success@razorpay`: To make the payment successful. +- `failure@razorpay`: To fail the payment. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + +## Wallet + +You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + +## Cards + +You can use one of the test cards to make transactions in the Test Mode. Use any valid expiration date in the future and any random CVV to create a successful payment. + +Card Network | Domestic / International | Card Number | CVV & Expiry Date +--- +Mastercard | Domestic | 5267 3181 8797 5449 | Use a random CVV and any future date ^^^^ +--- +Visa | Domestic | 4386 2894 0766 0153 | +--- +Mastercard | International | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | +--- +Visa | International | 4012 8888 8888 1881 | + +### Test Cards + +Use the following test cards for Indian payments: + +Network | Card Number | CVV & Expiry Date +--- +Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ +--- +Mastercard | 5500 6700 0000 1002 | +--- +RuPay | 6527 6589 0000 1005 | +--- +Diners | 3608 280009 1007 | +--- +Amex | 3402 560004 01007 | + +#### Error Scenarios + +Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. +Check the following lists: +- [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). +- [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + +## Next Steps + +[Step 3: Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/go-live-checklist.md) + +## Next Steps + +[Step 3: Go-live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/redirect/go-live-checklist.md) diff --git a/llm-content/payments/payment-gateway/s2s-integration/subscriptions.md b/llm-content/payments/payment-gateway/s2s-integration/subscriptions.md new file mode 100644 index 00000000..feec7ba3 --- /dev/null +++ b/llm-content/payments/payment-gateway/s2s-integration/subscriptions.md @@ -0,0 +1,2363 @@ +--- +title: Subscriptions - S2S Integration +description: Create and fetch Plans and Subscriptions. Create and delete Add-ons using Razorpay Subscriptions APIs. +--- + +# Subscriptions - S2S Integration + +You can create, fetch, query or cancel plans, subscriptions and addons using the Subscriptions API. These operations can also be performed on the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md). + +## Plans + +A plan is a foundation on which a Subscription is built. It acts as a reusable template and contains details of the goods or services offered, the amount to be charged and the frequency at which the customer should be charged (billing cycle). Depending upon your business, you can create multiple plans with different billing cycles and pricing. + +You should create a plan using the Checkout or Subscription link before creating a Subscription. + +### Create a Plan + +Use the below endpoint to create a plan. + +/plans + +#### Request Parameters + +`period` _mandatory_ +: `string` This, combined with `interval`, defines the frequency of the plan. Possible values: + - `daily` + - `weekly` + - `monthly` + - `quarterly` + - `yearly` + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can create custom frequencies while creating a plan. For example, once in 3 weeks. +> - For UPI, all undefined frequencies except `daily`, `weekly`, `monthly`, `quarterly` and `yearly` are considered `as-presented`. +> - For domestic cards, all undefined frequencies except `weekly`, `monthly` and `yearly` are considered `as-presented` while registering the mandate with banks. +> - For Emandate, all defined and undefined frequencies are considered `as-presented` while registering the mandate with banks. +> + + + +`interval` _mandatory_ +: `integer` This, combined with `period`, defines the frequency of the plan. If the billing cycle is 2 months, the value should be `2`. For daily plans, the minimum value should be `7`. + +`item` +: `object` Details of the plan. + + `name` _mandatory_ + : `string` Name of the plan. For example, `Test Plan`. + + `amount` _mandatory_ + : `integer` Amount for the plan that is to be charged to the subscription in the next billing cycle. For example, `69900` translates to . + + `currency` _mandatory_ + : `string` Currency for the payment. For example, `INR`. You can accept payment in any of the [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `description` _optional_ + : `string` Description for the plan. For example, `Description for the test plan`. + +`notes` _optional_ +: `object` Notes you can enter of the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Monthly gym membership"`. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/plans \ +-H "Content-Type: application/json" \ +-d '{ + "period": "weekly", + "interval": 1, + "item": { + "name": "Test plan - Weekly", + "amount": 69900, + "currency": "", + "description": "Description for the test plan" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject planRequest = new JSONObject(); +planRequest.put("period","weekly"); +planRequest.put("interval",1); +JSONObject item = new JSONObject(); +item.put("name","Test plan - Weekly"); +item.put("amount",69900); +item.put("currency",""); +item.put("description","Description for the test plan"); +planRequest.put("item",item); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +planRequest.put("notes",notes); + +Plan plan = razorpay.plans.create(planRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->plan->create(array('period' => 'weekly', 'interval' => 1, 'item' => array('name' => 'Test Weekly 1 plan', 'description' => 'Description for the weekly 1 plan', 'amount' => 600, 'currency' => ''),'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.plans.create({ + period: "weekly", + interval: 1, + item: { + name: "Test plan - Weekly", + amount: 69900, + currency: "", + description: "Description for the test plan" + }, + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.plan.create({ + 'period': 'weekly', + 'interval': 1, + 'item': { + 'name': 'Test plan - Weekly', + 'amount': 69900, + 'currency': '', + 'description': 'Description for the test plan', + }, + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "period": "weekly", + "interval": 1, + "item": { + "name": "Test plan - Weekly", + "amount": 69900, + "currency": "", + "description": "Description for the test plan" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Plan.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "period": "weekly", + "interval": 1, + "item": map[string]interface{}{ + "name": "Test plan - Weekly", + "amount": 69900, + "currency": "", + "description": "Description for the test plan", + }, + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} +body, err := client.Plan.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary planRequest = new Dictionary(); +planRequest.Add("period", "weekly"); +planRequest.Add("interval", 1); +Dictionary item = new Dictionary(); +item.Add("name", "Test plan - Weekly"); +item.Add("amount", 69900); +item.Add("currency", ""); +item.Add("description", "Description for the test plan"); +planRequest.Add("item", item); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +planRequest.Add("notes", notes); + +Plan plan = client.Plan.Create(planRequest); +``` + +```json: Success Response +{ + "id":"plan_00000000000001", + "entity":"plan", + "interval":1, + "period":"weekly", + "item":{ + "id":"item_00000000000001", + "active":true, + "name":"Test plan - Weekly", + "description":"Description for the test plan - Weekly", + "amount":69900, + "unit_amount":69900, + "currency":"", + "type":"plan", + "unit":null, + "tax_inclusive":false, + "hsn_code":null, + "sac_code":null, + "tax_rate":null, + "tax_id":null, + "tax_group_id":null, + "created_at":1580219935, + "updated_at":1580219935 + }, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1580219935 +} + +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "offer_id is/are not required and should not be sent" + } +} +``` + +#### Response Parameters + +`id` +: `string` The unique identifier linked to a plan. For example, `plan_00000000000001`. This ID is used when creating a subscription for a customer. + +`entity` +: `string` The entity being created. Here, it is `plan`. + +`interval` +: `integer` Used together with `period` to define how often the customer should be charged. + +`period` +: `string` Used together with `interval` to define how often the customer should be charged. Possible values: + - `daily` + - `weekly` + - `monthly` + - `yearly` + +`item` +: `array` Details of the plan. + + `id` + : `string` The unique identifier linked to an item. For example, `item_00000000000001`. + + `name` + : `string` Name of the plan. For example, `Test Plan`. + + `amount` + : `integer` Amount for the plan. When you use this plan to create a subscription, the customer will be charged this amount periodically. + + `currency` + : `string` Currency for the payment. You can accept payment in any of the [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + `description` + : `string` Description for the plan. For example, `Description for the test plan`. + +`notes` +: `object` Notes you can enter of the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Monthly Gym"`. + +`created_at` +: `integer` The Unix timestamp at which the plan was created. + +### Fetch all Plans + +Use the below endpoint to fetch details of all plans. + +/plans + +#### Query Parameters + +`from` _optional_ +: `integer` The Unix timestamp from when plans are to be fetched. + +`to` _optional_ +: `integer` The Unix timestamp till when plans are to be fetched. + +`count` _optional_ +: `integer` The number of plans to be fetched. Default value is 10. Maximum value is 100. This can be used for pagination in combination with `skip`. + +`skip` _optional_ +: `integer` The number of plans to be skipped. Default value is 0. This can be used for pagination in combination with `count`. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/plans \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List plans = razorpay.plans.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->plan->all($options); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.plans.all(options) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.plan.all(options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +options = {"count": 2} + +Razorpay::Plan.all(options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +options:= map[string]interface{}{ + "count": 1, + "skip": 1, +} +body, err := client.Plan.All(options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("count","1"); + +List plan = client.Plan.All(paramRequest); +``` + +### Fetch a Plan by ID + +Use the below endpoint to fetch details of a plan by its unique identifier. + +/plans/:id + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the plan. For example, `plan_00000000000001`. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/plans/plan_00000000000001 \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String planId = "plan_00000000000001"; + +Plan plan = razorpay.plans.fetch(planId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->plan->fetch($planId); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.plans.fetch(planId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.plan.fetch(planId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +planId = "plan_00000000000001" + +Razorpay::Plan.fetch(planId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Plan.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String planId = "plan_00000000000001"; + +Plan plan = client.Plan.Fetch(planId); +``` + +## Subscriptions + +You can use Subscriptions to charge a customer periodically. A Subscription ties a customer to a particular plan you have created. It contains details like the plan, the start date, total number of billing cycles, free trial period (if any) and upfront amount to be collected. + +### Create a Subscription + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/subscriptions \ +-H "Content-Type: application/json" \ +-d '{ + "plan_id":"plan_00000000000001", + "total_count":6, + "quantity":1, + "customer_notify": true, + "start_at":1773461489, + "expire_by":1773547889, + "addons":[ + { + "item":{ + "name":"Delivery charges", + "amount":3000, + "currency":"" + } + } + ], + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary subscriptionRequest = new Dictionary(); +subscriptionRequest.Add("plan_id", "plan_Z6t7VFTb9xHeOs"); +subscriptionRequest.Add("total_count", 6); +subscriptionRequest.Add("quantity", 1); +subscriptionRequest.Add("customer_notify", true); +subscriptionRequest.Add("start_at", 1773461489); +subscriptionRequest.Add("expire_by", 1773547889); +Dictionary linesItem = new Dictionary(); +Dictionary item = new Dictionary(); +item.Add("name", "Delivery charges"); +item.Add("amount", 30000); +item.Add("currency", ""); +linesItem.Add("item", item); +object[] addons = new object[]{ linesItem }; +subscriptionRequest.Add("addons", addons); +subscriptionRequest.Add("offer_id", "offer_LFw2SqDBi8kf53"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +subscriptionRequest.Add("notes", notes); + +Subscription subscription = client.Subscription.Create(subscriptionRequest); +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject subscriptionRequest = new JSONObject(); +subscriptionRequest.put("plan_id", "plan_7wAosPWtrkhqZw"); +subscriptionRequest.put("total_count", 6); +subscriptionRequest.put("quantity", 1); +subscriptionRequest.put("customer_notify", true); +subscriptionRequest.put("start_at", 1773461489); +subscriptionRequest.put("expire_by", 1773547889); +List addons = new ArrayList<>(); +JSONObject linesItem = new JSONObject(); +JSONObject item = new JSONObject(); +item.put("name","Delivery charges"); +item.put("amount",30000); +item.put("currency",""); +linesItem.put("item",item); +addons.add(linesItem); +subscriptionRequest.put("addons",addons); +subscriptionRequest.put("offer_id","offer_JHD834hjbxzhd38d"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +subscriptionRequest.put("notes", notes); + +Subscription order = razorpay.subscriptions.create(subscriptionRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->create(array('plan_id' => 'plan_7wAosPWtrkhqZw', 'customer_notify' => true,'quantity'=>5, 'total_count' => 6, 'start_at' => 1773461489, 'addons' => array(array('item' => array('name' => 'Delivery charges', 'amount' => 30000, 'currency' => ''))),'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.create({ + plan_id: "plan_7wAosPWtrkhqZw", + customer_notify: true, + quantity: 5, + total_count: 6, + start_at: 1773461489, + addons: [ + { + item: { + name: "Delivery charges", + amount: 30000, + currency: "" + } + } + ], + notes: { + key1: "value3", + key2: "value2" + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.create({ + 'plan_id': 'plan_7wAosPWtrkhqZw', + 'customer_notify': True, + 'quantity': 5, + 'total_count': 6, + 'start_at': 1773461489, + 'addons': [{'item': {'name': 'Delivery charges', 'amount': 30000, + 'currency': ''}}], + 'notes': {'key1': 'value3', 'key2': 'value2'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "plan_id": "plan_7wAosPWtrkhqZw", + "customer_notify": 1, + "quantity": 5, + "total_count": 6, + "start_at": 1773461489, + "addons": [ + { + "item": { + "name": "Delivery charges", + "amount": 30000, + "currency": "" + } + } + ], + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Subscription.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "plan_id":"plan_JCPs6ZkAutbaCe", + "total_count":3, + "quantity": 1, + "customer_notify": true, + "start_at":1773461489, + "expire_by":1773547889, + "addons":[]interface{}{ + map[string]interface{}{ + "item":map[string]interface{}{ + "name":"Delivery charges", + "amount":3000, + "currency":"", + }, + }, + }, + "notes":map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Subscription.Create(data, nil) +``` + +> **INFO** +> +> +> **Handy Tips** +> +> - In order to process subscription, customer card details will need to be secured/tokenised in accordance with the applicable laws. The merchant will be solely responsible for obtaining informed consent from customers for the processing of e-mandates and such consent shall be explicit and not by way of a forced/default/automatic selection of check box, radio button etc. +> - When the merchant is sharing `plan_id : unique identifier`, it is for tokenising the card as per applicable rules for subscription mandate creation. +> If such consent is not shared during the payment flow, then Razorpay will not tokenise the card or process the e-mandate/ subscription transaction. +> + +#### Request Parameters + +`plan_id` _mandatory_ +: `string` The unique identifier of a plan that should be linked to the Subscription. For example, `plan_00000000000001`. + +`total_count` _mandatory_ +: `integer` The number of billing cycles for which the customer should be charged. For example, if a customer is buying a 1-year subscription billed on a bi-monthly basis, this value should be `6`. + +`quantity` _optional_ +: `integer` The number of times the customer should be charged the plan amount per invoice. For example, a customer subscribes to use software. The charges are /month/license. The customer wants 5 licenses. You should pass `5` as the quantity. The customer is charged (5 x ) monthly. By default, this value is set to `1`. + +`start_at` _optional_ +: `integer` Unix timestamp that indicates from when the Subscription should start. If not passed, the Subscription starts immediately after the authorisation payment. For example, `1581013800`. For Subscriptions with a future start_date, frequency is considered `as_presented`. + +`expire_by` _optional_ +: `integer` Unix timestamp that indicates till when the customer can make the authorisation payment. For example, `1581013800`. The default value is 30 years. Do not pass any value if you do not want to set an expiry date. + +`customer_notify` _optional_ +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. Possible values: + - `true` (default): Communication handled by Razorpay. + - `false`: Communication handled by businesses. + +`addons` +: `object` Array that contains details of any upfront amount you want to collect as part of the authorisation transaction. + + `item` + : `object` Details of the upfront amount you want to charge your customer. + + `name` _optional_ + : `string` A name for the upfront amount you want to charge the customer. For example, `Delivery Fee`. + + `amount` _optional_ + : `integer` The upfront amount in the currency subunit you want to charge the customer. For example ,`30000`. + + `currency` _optional_ + : `string` The currency in which you want to charge the customer. This has to match the plan currency. For example, `INR`. + +`offer_id` _optional_ +: `string` The unique identifier of the offer that is linked to the Subscription. You can obtain this from the Dashboard. For example, `offer_JHD834hjbxzhd38d`. + +`notes` _optional_ +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`id` +: `string` The unique identifier of the subscription created. For example, `sub_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `subscription`. + +`plan_id` +: `string` The unique identifier for a plan that is linked to the created subscription. For example, `plan_00000000000001`. + +`customer_id` +: `string` The unique identifier of the customer linked to the subscription. This is populated automatically once the customer completes the authorisation transaction. For example, `cust_00000000000001`. + +`status` +: `string` Status of the subscription. Refer to the [life cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) for more details. Possible values: + - `created` + - `authenticated` + - `active` + - `pending` + - `halted` + - `cancelled` + - `completed` + - `expired` + +`current_start` +: `integer` Unix timestamp. The start time of the current billing cycle of the subscription. For example, `1581013800`. + +`current_end` +: `integer` Unix timestamp. The end time of the current billing cycle of the subscription. For example, `1581013800`. + +`ended_at` +: `integer` The timestamp, in Unix format, when the subscription was completed or was cancelled. For example, `1581013800`. + +`quantity` +: `integer` The number of times the plan should be linked to the subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass 5 as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to 1. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`charge_at` +: `integer` Unix timestamp. This indicates when the next charge on the subscription should be made. For example, `1581013800`. + +`offer_id` +: `string` The unique identifier of the offer that should be linked to the subscription. For example, `offer_JHD834hjbxzhd38d`. + +`start_at` +: `integer` The timestamp, in Unix format, when the subscription should start. If not passed, the subscription starts immediately after the authorisation payment. For example, `1581013800`. + +`end_at` +: `integer` The timestamp, in Unix format, when the subscription should end. For example, `1581013800`. + +`auth_attempts` +: `integer` The number of times that the charge for the current billing cycle has been attempted on the card. For example, `2`. + +`total_count` +: `integer` The number of billing cycles for which the customer should be charged. For example, `2`. We support subscriptions for a maximum duration of 100 years. The number of billing cycles depends if the subscription is daily, weekly, monthly or yearly. + +`paid_count` +: `integer` This indicates the number of billing cycles for which the customer has already been charged. For example, `2`. + +`customer_notify` +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. + - `true`: Communication handled by Razorpay. Defaults to `true`. + - `false`: Communication handled by businesses. + +`created_at` +: `integer` The timestamp, in Unix format, when the subscription was created. For example, `1581013800`. + +`expire_by` +: `integer` The timestamp, in Unix format, till when the customer can make the authorisation payment. For example, `1581013800`. + +`short_url` +: `string` URL that can be used to make the authorisation payment. For example, `https://rzp.io/i/PWtAiEo`. + +`has_scheduled_changes` +: `boolean` Indicates if the subscription has any scheduled changes. Possible values: + - `true`: Subscription has scheduled changes. + - `false`: Subscription does not have scheduled changes. + +`schedule_change_at` +: `string` Represents when the subscription should be updated. Possible values: + - `now` (default): Updates the subscription immediately. + - `cycle_end`: Updates the subscription at the end of the current billing cycle. + +`remaining_count` +: `integer` This indicates the number of billing cycles remaining on the subscription. For example, `2`. + +### Create a Subscription Link + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/subscriptions \ +-H "Content-Type: application/json" \ +-d '{ + "plan_id": "plan_00000000000001", + "total_count": 12, + "quantity": 1, + "start_at": 1561852800, + "expire_by": 1561939199, + "customer_notify": true, + "addons": [ + { + "item": { + "name": "Delivery charges", + "amount": 30000, + "currency": "" + } + } + ], + "offer_id":"offer_JHD834hjbxzhd38d", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "notify_info":{ + "notify_phone": "", + "notify_email": "" + } +}' + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); +Dictionary subscriptionRequest = new Dictionary(); +subscriptionRequest.Add("plan_id", "plan_Z6t7VFTb9xHeOs"); +subscriptionRequest.Add("total_count", 12); +subscriptionRequest.Add("quantity", 1); +subscriptionRequest.Add("customer_notify", true); +subscriptionRequest.Add("start_at", 1580453311); +subscriptionRequest.Add("expire_by", 1580626111); +List> addons = new List>(); +Dictionary linesItem = new Dictionary(); +Dictionary item = new Dictionary(); +item.Add("name", "Delivery charges"); +item.Add("amount", 30000); +item.Add("currency", ""); +linesItem.Add("item", item); +addons.Add(linesItem); +subscriptionRequest.Add("addons", addons); +subscriptionRequest.Add("offer_id", "offer_Z6t7VFTb9xHeOs"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +subscriptionRequest.Add("notes", notes); +Dictionary notifyInfo = new Dictionary(); +notifyInfo.Add("notify_phone", ""); +notifyInfo.Add("notify_email", ""); +subscriptionRequest.Add("notify_info", notifyInfo); + +Subscription subscription = client.Subscription.Create(subscriptionRequest); + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject subscriptionRequest = new JSONObject(); +subscriptionRequest.put("plan_id", "plan_HoYg68p5kmuvzD"); +subscriptionRequest.put("total_count", 12); +subscriptionRequest.put("quantity", 1); +subscriptionRequest.put("customer_notify", true); +subscriptionRequest.put("start_at", 1580453311); +subscriptionRequest.put("expire_by", 1580626111); +List addons = new ArrayList<>(); +JSONObject linesItem = new JSONObject(); +JSONObject item = new JSONObject(); +item.put("name","Delivery charges"); +item.put("amount",30000); +item.put("currency",""); +linesItem.put("item",item); +addons.add(linesItem); +subscriptionRequest.put("addons",addons); +subscriptionRequest.put("offer_id","offer_JTUADI4ZWBGWur"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +subscriptionRequest.put("notes", notes); +JSONObject notifyInfo = new JSONObject(); +notifyInfo.put("notify_phone",""); +notifyInfo.put("notify_email",""); +subscriptionRequest.put("notify_info",notifyInfo); + +Subscription subscription = razorpay.subscriptions.create(subscriptionRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->create(array('plan_id' => 'plan_HoYg68p5kmuvzD','total_count' => 12,'quantity' => 1,'expire_by' => 1633237807,'customer_notify' => true, 'addons' => array(array('item'=>array('name' => 'Delivery charges','amount' => 30000,'currency' => ''))),'notes'=>array('notes_key_1'=>'Tea, Earl Grey, Hot','notes_key_2'=>'Tea, Earl Grey… decaf.'),'notify_info'=>array('notify_phone' => '','notify_email'=> ''))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.create({ + plan_id: "plan_HoYg68p5kmuvzD", + total_count: 12, + quantity: 1, + expire_by: 1633237807, + customer_notify: true, + addons: [ + { + item: { + name: "Delivery charges", + amount: 30000, + currency: "" + } + } + ], + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + }, + notify_info: { + notify_phone: "", + notify_email: "" + } +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.create({ + 'plan_id': 'plan_HoYg68p5kmuvzD', + 'total_count': 12, + 'quantity': 1, + 'expire_by': 1633237807, + 'customer_notify': True, + 'addons': [{'item': {'name': 'Delivery charges', 'amount': 30000, + 'currency': ''}}], + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey\xe2\x80\xa6 decaf.'}, + 'notify_info': {'notify_phone': '', + 'notify_email': ''} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "plan_id": "plan_HoYg68p5kmuvzD", + "total_count": 12, + "quantity": 1, + "expire_by": 1633237807, + "customer_notify": 1, + "addons": [ + { + "item": { + "name": "Delivery charges", + "amount": 30000, + "currency": "" + } + } + ], + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "notify_info": { + "notify_phone": "", + "notify_email": "" + } +} + +Razorpay::Subscription.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "plan_id": "plan_00000000000001", + "total_count": 12, + "quantity": 1, + "start_at": 1561852800, + "expire_by": 1561939199, + "customer_notify": true, + "addons": []interface{}{ + map[string]interface{}{ + "item": map[string]interface{}{ + "name": "Delivery charges", + "amount": 30000, + "currency": "", + }, + }, + }, + "offer_id":"offer_JHD834hjbxzhd38d", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, + "notify_info":map[string]interface{}{ + "notify_phone": "", + "notify_email": "", + }, +} +body, err := client.Subscription.Create(data, nil) +``` + +> **INFO** +> +> +> **Handy Tips** +> +> - In order to process subscription, customer card details will need to be secured/tokenised in accordance with the applicable laws. The merchant will be solely responsible for obtaining informed consent from customers for the processing of e-mandates and such consent shall be explicit and not by way of a forced/default/automatic selection of check box, radio button etc. +> - When the merchant is sharing `plan_id : unique identifier`, it is for tokenising the card as per applicable rules for subscription mandate creation. +> If such consent is not shared during the payment flow, then Razorpay will not tokenise the card or process the e-mandate/ subscription transaction. +> + +#### Request Parameters + +`plan_id` _mandatory_ +: `string` The unique identifier of a plan that should be linked to the Subscription. For example, `plan_00000000000001`. + +`total_count` _mandatory_ +: `integer` The number of billing cycles for which the customer should be charged. For example, if a customer is buying a 1-year subscription billed on a bi-monthly basis, this value should be `6`. + +`quantity` _optional_ +: `integer` The number of times the customer should be charged the plan amount per invoice. For example, a customer subscribes to use software. The charges are /month/license. The customer wants 5 licenses. You should pass `5` as the quantity. The customer is charged (5 x ) monthly. By default, this value is set to `1`. + +`start_at` _optional_ +: `integer` Unix timestamp that indicates from when the Subscription should start. If not passed, the Subscription starts immediately after the authorisation payment. For example, `1581013800`. For Subscriptions with a future start_date, frequency is considered `as_presented`. + +`expire_by` _optional_ +: `integer` Unix timestamp that indicates till when the customer can make the authorisation payment. For example, `1581013800`. The default value is 30 years. Do not pass any value if you do not want to set an expiry date. + +`customer_notify` _optional_ +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. Possible values: + - `true` (default): Communication handled by Razorpay. + - `false`: Communication handled by businesses. + +`addons` +: `object` Array that contains details of any upfront amount you want to collect as part of the authorisation transaction. + + `item` + : `object` Details of the upfront amount you want to charge your customer. + + `name` _optional_ + : `string` A name for the upfront amount you want to charge the customer. For example, `Delivery Fee`. + + `amount` _optional_ + : `integer` The upfront amount in the currency subunit you want to charge the customer. For example ,`30000`. + + `currency` _optional_ + : `string` The currency in which you want to charge the customer. This has to match the plan currency. For example, `INR`. + +`offer_id` _optional_ +: `string` The unique identifier of the offer that is linked to the Subscription. You can obtain this from the Dashboard. For example, `offer_JHD834hjbxzhd38d`. + +`notes` _optional_ +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`notify_info` +: `object` The customer's email and phone number to which notifications are to be sent. Use this array only if you have set the `customer_notify` parameter to `true`. That is, Razorpay sends notifications to the customer. The customer details entered in the API request are only to notify the customer about the Subscription. The same will not be prefilled in the checkout as per the government guidelines. + + `notify_phone` _optional_ + : `string` The customer's phone number. + + `notify_email` _optional_ + : `string` The customer's email. + +You can perform various actions related to Subscriptions using the Dashboard. + +#### Response Parameters + +`id` +: `string` The unique identifier of the subscription created. For example, `sub_00000000000001`. + +`entity` +: `string` The entity being created. Here, it will be `subscription`. + +`plan_id` +: `string` The unique identifier for a plan that is linked to the created subscription. For example, `plan_00000000000001`. + +`customer_id` +: `string` The unique identifier of the customer linked to the subscription. This is populated automatically once the customer completes the authorisation transaction. For example, `cust_00000000000001`. + +`status` +: `string` Status of the subscription. Refer to the [life cycle section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) for more details. Possible values: + - `created` + - `authenticated` + - `active` + - `pending` + - `halted` + - `cancelled` + - `completed` + - `expired` + +`current_start` +: `integer` Unix timestamp. The start time of the current billing cycle of the subscription. For example, `1581013800`. + +`current_end` +: `integer` Unix timestamp. The end time of the current billing cycle of the subscription. For example, `1581013800`. + +`ended_at` +: `integer` The timestamp, in Unix format, when the subscription was completed or was cancelled. For example, `1581013800`. + +`quantity` +: `integer` The number of times the plan should be linked to the subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass 5 as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to 1. + +`notes` +: `object` Notes you can enter for the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, `"note_key": "Beam me up Scotty”`. + +`charge_at` +: `integer` Unix timestamp. This indicates when the next charge on the subscription should be made. For example, `1581013800`. + +`offer_id` +: `string` The unique identifier of the offer that should be linked to the subscription. For example, `offer_JHD834hjbxzhd38d`. + +`start_at` +: `integer` The timestamp, in Unix format, when the subscription should start. If not passed, the subscription starts immediately after the authorisation payment. For example, `1581013800`. + +`end_at` +: `integer` The timestamp, in Unix format, when the subscription should end. For example, `1581013800`. + +`auth_attempts` +: `integer` The number of times that the charge for the current billing cycle has been attempted on the card. For example, `2`. + +`total_count` +: `integer` The number of billing cycles for which the customer should be charged. For example, `2`. We support subscriptions for a maximum duration of 100 years. The number of billing cycles depends if the subscription is daily, weekly, monthly or yearly. + +`paid_count` +: `integer` This indicates the number of billing cycles for which the customer has already been charged. For example, `2`. + +`customer_notify` +: `boolean` Indicates whether the communication to the customer would be handled by businesses or Razorpay. + - `true`: Communication handled by Razorpay. Defaults to `true`. + - `false`: Communication handled by businesses. + +`created_at` +: `integer` The timestamp, in Unix format, when the subscription was created. For example, `1581013800`. + +`expire_by` +: `integer` The timestamp, in Unix format, till when the customer can make the authorisation payment. For example, `1581013800`. + +`short_url` +: `string` URL that can be used to make the authorisation payment. For example, `https://rzp.io/i/PWtAiEo`. + +`has_scheduled_changes` +: `boolean` Indicates if the subscription has any scheduled changes. Possible values: + - `true`: Subscription has scheduled changes. + - `false`: Subscription does not have scheduled changes. + +`schedule_change_at` +: `string` Represents when the subscription should be updated. Possible values: + - `now` (default): Updates the subscription immediately. + - `cycle_end`: Updates the subscription at the end of the current billing cycle. + +`remaining_count` +: `integer` This indicates the number of billing cycles remaining on the subscription. For example, `2`. + +### Fetch All Subscriptions + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/subscriptions \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("count","1"); + +List subscriptions = razorpay.subscriptions.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->all($options); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.all(options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +options = {"count": 1} + +Razorpay::Subscription.all(options) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.all(options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +options := map[string]interface{}{ + "count": 2, +} +body, err := client.Subscription.All(options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paramRequest = new Dictionary(); +paramRequest.Add("count","1"); + +List subscription = client.Subscription.All(paramRequest); +``` + +#### Query Parameters + +`plan_id` _optional_ +: `string` The unique identifier of the plan for which you want to retrieve all the Subscriptions. + +`from` _optional_ +: `integer` The Unix timestamp from when Subscriptions are to be fetched. + +`to` _optional_ +: `integer` The Unix timestamp till when Subscriptions are to be fetched. + +`count` _optional_ +: `integer` The number of Subscriptions to be fetched. Default value is `10`. Maximum value is 100. This can be used for pagination, in combination with `skip`. + +`skip` _optional_ +: `integer` The number of Subscriptions to be skipped. Default value is `0`. This can be used for pagination, in combination with `count`. + +### Fetch Subscription by ID + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/subscriptions/sub_00000000000001 \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +Subscription subscription = razorpay.subscriptions.fetch(subscriptionId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.fetch(subscriptionId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.fetch(subscriptionId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +Razorpay::Subscription.fetch(subscriptionId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Subscription.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +Subscription subscription = client.Subscription.Fetch(subscriptionId); +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +### Cancel a Subscription + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/subscriptions/sub_00000000000001/cancel \ +-H "Content-Type: application/json" \ +-d '{ + "cancel_at_cycle_end": false +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +JSONObject params = new JSONObject(); +params.put("cancel_at_cycle_end", true); + +Subscription subscription = razorpay.subscriptions.cancel(subscriptionId, params); + +```php: PHP +$api = new Api($key_id, $secret); + +$options = array("cancel_at_cycle_end" => true) + +$api->subscription->fetch($subscriptionId)->cancel($options); + +```javascript: Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_SECRET", +}); + +var subscriptionId = "sub_00000000000001"; + +instance.subscriptions.cancel(subscriptionId, { + cancel_at_cycle_end: true, +}); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +subscriptionId = "sub_1N6I3dbbIrc3wUG" + +client.subscription.cancel(subscriptionId, { + "cancel_at_cycle_end": True +}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +options = {"cancel_at_cycle_end":0} + +Razorpay::Subscription.cancel(subscriptionId,options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "cancel_at_cycle_end": true, +} +body, err := client.Subscription.Cancel("", data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +Dictionary param = new Dictionary(); +param.Add("cancel_at_cycle_end", true); + +Subscription subscription = client.Subscription.Fetch(subscriptionId).Cancel(param); +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +#### Request Parameter + +`cancel_at_cycle_end`_optional_ +: `boolean` Use this parameter to cancel a Subscription at the end of a billing cycle. Possible values: + - `true`: Cancel the subscription at the end of the current billing cycle. + - `false` (default): Cancel the subscription immediately. + +### Update a Subscription + +```curl: Curl +curl -u : \ +-X PATCH https://api.razorpay.com/v1/subscriptions/sub_00000000000001 \ +-H "Content-Type: application/json" \ +-d '{ + "plan_id":"plan_00000000000002", + "offer_id":"offer_JHD834hjbxzhd38d", + "quantity":5, + "remaining_count":5, + "start_at":1496000432, + "schedule_change_at":"now", + "customer_notify": true +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000002"; + +JSONObject params = new JSONObject(); +params.put("plan_id","plan_00000000000002"); +params.put("offer_id","offer_JHD834hjbxzhd38d"); +params.put("quantity",5); +params.put("remaining_count",5); +params.put("start_at",1496000432); +params.put("schedule_change_at","now"); +params.put("customer_notify", true); + +Subscription subscription = razorpay.subscription.update(subscriptionId,params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->update($options); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.update(subscriptionId,options) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.update(subscriptionId, options) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000002" + +options = { + "plan_id":"plan_00000000000002", + "offer_id":"offer_JHD834hjbxzhd38d", + "quantity":5, + "remaining_count":5, + "start_at":1496000432, + "schedule_change_at":"now", + "customer_notify":1 +} + +Razorpay::Subscription.fetch(subscriptionId).edit(options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Subscription.Update("", options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_00000000000002"; + +Dictionary param = new Dictionary(); +param.Add("plan_id","plan_00000000000002"); +param.Add("offer_id","offer_JHD834hjbxzhd38d"); +param.Add("quantity",5); +param.Add("remaining_count",5); +param.Add("start_at",1496000432); +param.Add("schedule_change_at","now"); +param.Add("customer_notify", true); + +Subscription subscription = client.Subscription.Fetch(subscriptionId).Edit(param); +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +#### Request Parameters + +`plan_id`_optional_ +: `string` The unique identifier of the new plan that should be linked to the Subscription. For example, `plan_00000000000001`. + +`offer_id` _optional_ +: `string` The unique identifier of the offer that should be linked to the Subscription. You can obtain this from the Dashboard. For example, `offer_JHD834hjbxzhd38d`. + +`quantity`_optional_ +: `integer` The number of times the plan should be linked to the Subscription. For example, if the plan is /user/month and the customer has 5 users, you should pass `5` as the quantity to have the customer charged (5 x ) monthly. By default, this value is set to `1`. + +`remaining_count`_optional_ +: `integer` This parameter is used to update the `total_count` for a Subscription. For example, let us consider a monthly Subscription with 12 billing cycles. The Subscription has been charged successfully 4 times and 3 more invoices have been issued, but have not been charged. The remaining count in such cases is 5. However, you can overwrite this value using this parameter. + +`start_at`_optional_ +: `integer` Unix timestamp. The new start date for the Subscription. + +`schedule_change_at`_optional_ +: `string` Represents when the Subscription should be updated. + - `now` (default): Updates the Subscription immediately. + - `cycle_end`: Updates the Subscription at the end of the current billing cycle. + +`customer_notify`_optional_ +: `boolean` Represents who sends notifications to the customer. Possible values: + - `true` (default): Notifications sent by Razorpay. + - `false`: Notifications sent by you. + +### Fetch Details of a Pending Update + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/subscriptions/sub_00000000000001/retrieve_scheduled_changes \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +Subscription subscription = razorpay.subscription.fetchPendingUpdate(subscriptionId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->pendingUpdate() + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.pendingUpdate(subscriptionId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.pending_update(subscriptionId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +Razorpay::Subscription.fetch(subscriptionId).pending_update + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Subscription.PendingUpdate("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_00000000000001"; + +Subscription subscription = client.Subscription.Fetch(subscriptionId).FetchPendingUpdate(); + +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +### Cancel an Update + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/subscriptions/sub_00000000000001/cancel_scheduled_changes \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +Subscription subscription = razorpay.subscription.cancelPendingUpdate(subscriptionId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->cancelScheduledChanges(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.cancelScheduledChanges(subscriptionId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.cancel_scheduled_changes(subscriptionId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +Razorpay::Subscription.cancel_scheduled_changes(subscriptionId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Subscription.CancelScheduledChanges("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_00000000000001"; + +Subscription subscription = client.Subscription.Fetch(subscriptionId).CancelPendingUpdate(); +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +### Pause a Subscription + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/subscriptions/sub_00000000000001/pause \ +-H "Content-Type: application/json" \ +-d '{ + "pause_at":"now" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +JSONObject params = new JSONObject(); +params.put("pause_at","now"); + +Subscription subscription = razorpay.subscription.pause(SubscriptionId,params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->pause(array('pause_at'=>'now')) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.pause(subscriptionId,{ + pause_at : 'now' +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.pause(subscriptionId, {'pause_at': 'now'}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +options = {"pause_at": "now"} + +Razorpay::Subscription.pause(subscriptionId,options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +options := map[string]interface{}{ "pause_at" : "now" } +body, err := client.Subscription.Pause("", options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_00000000000001"; + +Dictionary param = new Dictionary(); +param.Add("pause_at","now"); + +Subscription subscription = client.Subscription.Fetch(subscriptionId).Pause(param); + +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +#### Request Parameters + +`pause_at` _optional_ +: `string` The value should be `now` to pause a Subscription immediately. + +### Resume a Subscription + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/subscriptions/sub_00000000000001/resume \ +-H "Content-Type: application/json" \ +-d '{ + "resume_at":"now" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String SubscriptionId = "sub_00000000000001"; + +JSONObject params = new JSONObject(); +params.put("resume_at","now"); + +Subscription subscription = razorpay.subscription.resume(SubscriptionId,requestJson); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->resume(array('resume_at'=>'now')) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.resume(subscriptionId,{ + resume_at : 'now' +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.resume(subscriptionId, {'resume_at': 'now'}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +options = {"resume_at": "now"} + +Razorpay::Subscription.resume(subscriptionId,options) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +options := map[string]interface{}{ "resume_at" : "now" } +body, err := client.Subscription.Resume("", options, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_00000000000001"; + +Dictionary param = new Dictionary(); +param.Add("resume_at","now"); + +Subscription subscription = client.Subscription.Fetch(subscriptionId).Resume(param); +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` The unique identifier linked to a Subscription. For example, `sub_00000000000001`. + +#### Request Parameters + +`resume_at` _optional_ +: `string` The value should be `now` to resume a Subscription immediately. + +### Fetch All Invoices for a Subscription + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/invoices?subscription_id=sub_00000000000001 \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject params = new JSONObject(); +params.put("subscription_id",subscriptionId); + +List invoices = razorpay.invoices.fetchAll(params); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->invoice->all(['subscription_id'=>$subscriptionId]); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.invoices.all({ + 'subscription_id':subscriptionId +}) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.invoice.all({'subscription_id': subscriptionId}) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = {"subscription_id": "sub_00000000000001"} + +Razorpay::Invoice.all(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ "subscription_id": "sub_00000000000001" } +body, err := client.Invoice.All(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary param = new Dictionary(); +param.Add("subscription_id", "sub_Z6t7VFTb9xHeOs"); + +List subscription = client.Invoice.All(param); +``` + +#### Query Parameter + +`subscription_id` _mandatory_ +: `string` The unique identifier linked to the Subscription. For example, `sub_00000000000001`. + +#### Response Parameters + +`count` +: `integer` The number of invoices generated for the Subscription. + +`item` +: `array` List of invoices generated for the Subscription. + + `id` + : `string` The unique identifier of the invoice issued for the Subscription. + + `entity` + : `string` The entity being created. Here, it is `invoice`. + + `receipt` + : `string` Here, it is `null`. + + `invoice_number` + : `string` The invoice number. Here, it is `null`. + + `customer_id` + : `string` The unique identifier of the customer linked to the Subscription. + + `customer_details` + : `object` Details of the customer. + + `id` + : `string` The unique identifier of the customer linked to the Subscription. + + `name` + : `string` The customer's name. Know more [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + + `email` + : `string` The customer's email address. + + `contact` + : `string` The customer's contact number. + + `billing_address` + : `string` The customer's billing address. + + `shipping_address` + : `string` The customer's shipping address. + + `customer_name` + : `string` The customer's name. + + `customer_email` + : `string` The customer's email address. + + `customer_contact` + : `string` The customer's contact number. + +`order_id` +: `string` The unique identifier of the order associated with the invoice. + +`subscription_id` +: `string` The unique identifier of the Subscription. For example, `sub_00000000000001`. + +`line_items` +: `array` Details of the line item that is billed in the invoice. Number of arrays = number of line items billed in the invoice. For example, if the Subscription starts immediately and has an upfront fee attached to it, the number of line items = 2. One for the Subscription charge and one for the upfront fee. + + `id` + : `string` The unique identifier linked to the item billed in the invoice. For example, `li_00000000000001`. + + `item_id` + : `string` Here, it is `null`. + + `name` + : `string` The item's name. For example, `Monthly Plan`. + + `description` + : `string` A brief description of the item. Here, it is `null`. + + `amount` + : `integer` The item's price, in currency subunits. For example, `99900`. + + `currency` + : `string` The currency for the amount charged for the item. + + `type` + : `string` The type of charge. Possible values: + - `plan` + - `addon` + + `quantity` + : `integer` The number of units of the item billed in the invoice. For example, `1`. + +`payment_id` +: `string` Unique identifier of the payment made by the customer using this invoice. For example, `pay_00000000000001`. + +`status` +: `string` The status of the invoice. Possible values: + - `draft` + - `issued` + - `partially_paid` + - `paid` + - `expired` + - `cancelled` + - `deleted` + +`expire_by` +: `integer` The Unix timestamp, indicates at which the invoice will expire. For example, `1593411509` + +`issued_at` +: `integer` The Unix timestamp, indicates at which the invoice was issued to the customer. For example, `1593411209` + +`paid_at` +: `integer` The Unix timestamp, indicates at which the payment was made. For example, `1593411325` + +`cancelled_at` +: `integer` The Unix timestamp, indicates at which the invoice was canceled by you. For example, `1593411209` + +`expired_at` +: `integer` The Unix timestamp, indicates at which the invoice has expired. For example, `1593411209` + +`sms_status` +: `string` Indicates whether the SMS notification for the invoice was sent to the customer. Possible values: + - `pending` + - `sent` + +`email_status` +: `string` Indicates whether the email notification for the invoice was sent to the customer. Possible values: + - `pending` + - `sent` + +`date` +: `integer` The Unix timestamp, that indicates the date of the invoice. + +`terms` +: `string` Any terms to be included in the invoice. Here, it is `null`. + +`partial_payment` +: `boolean` Indicates whether the customer can make a partial payment on the invoice. + - `true`: Customer can make partial payments. + - `false`: Customer cannot make partial payments. + +`amount` +: `integer` Amount to be paid using the invoice. This should be in the smallest unit of the currency. For example, `29995`. + +`amount_paid` +: `integer` Amount paid by the customer using the invoice. For example, `29995`. + +`amount_due` +: `integer` The remaining amount to be paid by the customer for the issued invoice. + +`currency` +: `string` The currency associated with the item. + +`description` +: `string` A brief description of the invoice. Here, it is `null`. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`comment` +: `string` Any comments to be added in the invoice. Here, it is `null`. + +`short_url` +: `string` The short URL that is generated. This is the link that can be shared with customers to accept payments. Once canceled, no payments can be accepted using the link. For example, `https://rzp.io/i/gb5827Hh`. + +`view_less` +: `boolean` Used when the link description is lengthy and you want to make the text collapsible. The text can be expanded by the customer using the **Show More** link. + - `true` (default): Link description appears collapsed, with a **Show More** link. + - `false`: Link description appears expanded. + +`type` +: `string` Here, it is `invoice`. + +`created_at` +: `integer` The Unix timestamp, that indicates when this invoice entity was created. For example, `1593411943`. + +### Delete an Offer Linked to a Subscription + +```curl: Curl +curl -u [YOUR_KEY_ID]:YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/subscriptions/sub_00000000000001/offer_JHD834hjbxzhd38d \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +String offerId = "offer_JHD834hjbxzhd38d"; + +Subscription subscription = razorpay.subscription.deleteSubscriptionOffer(subscriptionId, offerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->deleteOffer($offerId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.deleteOffer(subscriptionId, offerId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.delete_offer(subscriptionId, offerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +offerId = "offer_JHD834hjbxzhd38d" + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Subscription.DeleteOffer("", "", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_I3GGEs7Xgmnozy"; + +string offerId = "offer_JCTD1XMlUmzF6Z"; + +Subscription subscription = client.Subscription.Fetch(subscriptionId).DeleteOffer(offerId); +``` + +#### Path Parameters + +`sub_id` _mandatory_ +: `string` The unique identifier of the Subscription from which you want to remove the offer. For example, `sub_00000000000001`. + +`offer_id` _mandatory_ +: `string` The unique identifier of the offer you want remove from the Subscription. For example, `offer_JHD834hjbxzhd38d`. + +## Authentication Transaction + +### Create Authentication Transaction + +After you create a plan and a subscription, you have to create an authentication transaction. This authenticates the customer's payment method and authorizes you to collect recurring payments via the authenticated payment method. + +Use the below endpoint to create an authentication transaction with method `card`. + +/payments/create/json + +```curl: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ + -d '{ + "amount": "100", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "subscription_id": "sub_00000000000001", + "method": "card", + "card": { + "number": "4854980604708430", + "cvv": "", + "expiry_month": "12", + "expiry_year": "21", + "name": "Gaurav Kumar" + } +}' + +```json: Response +{ + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/FVmAtLUe9XZSGM/authorize" + }, + { + "action": "otp_generate", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate?track_id=FVmAtLUe9XZSGM&key_id=" + } + ] +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. For cards, the minimum value is `100` (). + +`subscription_id` _mandatory_ +: `string` The unique identifier of the subscription. For example, `sub_00000000000001`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `9123456780`. + +`method` _mandatory_ +: `string` The payment method selected by the customer. Here, the value must be `card`. + +`card` +: The attributes associated with a card. + + `number` _mandatory_ + : `integer` Unformatted card number. This field is required if value of `method` is `card`. Use one of our test cards to try out the payment flow. + + `name` _mandatory_ + : `string` The name of the cardholder. + + `expiry_month` _mandatory_ + : `integer` The expiry month of the card in `MM` format. For example, `01` for January and `12` for December. + + `expiry_year` _mandatory_ + : `integer` Expiry year for card in the `YY` format. For example, 2025 will be in format `25`. + + `cvv` _mandatory_ + : `integer` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +#### Response Parameters + +If the payment request is valid, the response contains the following fields. Refer to the [S2S Json V2 integration document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2.md#step-2-create-a-payment) for more details. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. Possible values: + - `otp_generate` - Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect` - Use this URL to redirect the customer to submit the OTP on the bank page. + + `url` + : `string` URL to be used for the action indicated. + +### Verify Payment + +This is a mandatory step that allows you to confirm the authenticity of the card details returned to the Checkout form for successful payments. + +> **INFO** +> +> +> +> **Handy Tips** +> +> You should consider the payment as successful and Subscription as authorised only after the signature has been successfully verified. +> + +To verify the `razorpay_signature` returned to you by the Checkout form: + +1. Create a signature in your server using the following attributes: + - `subscription_id`: Retrieve the `subscription_id` from your server. Do not use the `razorpay_subscription_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. + The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md#prerequisites). + +1. Use the SHA256 algorithm, the `razorpay_payment_id` and the `subscription_id` to construct a HMAC hex digest as shown below: + + ``` + generated_signature = hmac_sha256(razorpay_payment_id + "|" + subscription_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + +1. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_subscription_id", "sub_ID6MOhgkcoHj9I"); +options.put("razorpay_payment_id", "pay_IDZNwZZFtnjyym"); +options.put("razorpay_signature", "601f383334975c714c91a7d97dd723eb56520318355863dcf3821c0d07a17693"); + +boolean status = Utils.verifySubscription(options, secret); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_subscription_payment_signature({ + 'razorpay_subscription_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'pay_IDZNwZZFtnjyym', + razorpay_payment_id: 'sub_ID6MOhgkcoHj9I', + razorpay_signature: '601f383334975c714c91a7d97dd723eb56520318355863dcf3821c0d07a17693' + } + +Razorpay::Utility.verify_payment_signature(payment_response) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_subscription_id": "sub_ID6MOhgkcoHj9I", + "razorpay_payment_id": "pay_IDZNwZZFtnjyym", +} + +signature := "601f383334975c714c91a7d97dd723eb56520318355863dcf3821c0d07a17693"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifySubscriptionSignature(params, signature, secret) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_subscription_id' => $razorpaySubscriptionId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.paymentVerification({ + 'subscription_id':'sub_ID6MOhgkcoHj9I', + 'payment_id':'pay_IDZNwZZFtnjyym', + 'signature':'601f383334975c714c91a7d97dd723eb56520318355863dcf3821c0d07a17693' + },secret) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_subscription_id", "sub_ID6MOhgkcoHj9I"); +options.Add("razorpay_payment_id", "pay_IDZNwZZFtnjyym"); +options.Add("razorpay_signature", "601f383334975c714c91a7d97dd723eb56520318355863dcf3821c0d07a17693"); + +Utils.verifySubscriptionSignature(options); +``` + +## Add-ons + +You can create add-ons to charge the customer an extra amount for a particular billing cycle. Once you create an add-on for a Subscription, it is added to the next invoice that is generated. On the next scheduled charge, the customer is charged the add-on amount in addition to their regular Subscription amount. + +### Create an Add-on + +#### Path Parameter + +`id` _mandatory_ +: `string` The subscription ID to which the add-on is being added. + +#### Request Parameters + +. + + `description` _optional_ + : `string` Description for the add-on. For example, `1 extra oil fried appala with meals`. + +`quantity` _optional_ +: `integer` This specifies the number of units of the add-on to be charged to the customer. For example, `2`. Defaults to `1`. The total amount is calculated as `amount` * `quantity`. + +#### Response Parameters + +`id` +: `string` The unique identifier of the created add-on. For example, `ao_00000000000001`. + +`quantity` +: `integer` This specifies the number of units of the add-on to be charged to the customer. For example, `2`. The total amount is calculated as `amount` * `quantity`. + +`created_at` +: `integer` The timestamp, in Unix format, when the add-on was created. For example, `1581597318`. + +`subscription_id` +: `string` The unique identifier of the subscription to which the add-on is being added. For example, `sub_00000000000001`. + +`invoice_id` +: `string` The add-on is added to the **next** invoice that is generated after the add-on is created. This field is populated only after the invoice is generated. Until then, it is `null`. Once the add-on is linked to an invoice, it cannot be deleted. + +### Fetch all Add-ons + +#### Query Parameters + +`from` _optional_ +: `integer` The Unix timestamp from when add-ons are to be fetched. + +`to` _optional_ +: `integer` The Unix timestamp till when add-ons are to be fetched. + +`count` _optional_ +: `integer` The number of add-ons to be fetched. Default value is `10`. Maximum value is `100`. This can be used for pagination, in combination with `skip`. + +`skip` _optional_ +: `integer` The number of add-ons to be skipped. Default value is `0`. This can be used for pagination, in combination with `count`. + +### Fetch an Add-on by ID + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of an add-on. For example, `ao_00000000000001`. + +### Delete an Add-on + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/addons/ao_00000000000001 \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String addonId = "ao_00000000000001"; + +List addon = razorpay.addons.delete(addonId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->addon->fetch($addonId)->delete(); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.addons.delete(addonId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.addon.delete(addonId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Addon.delete("ao_00000000000001") + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +addonId := "ao_Jey1r0000000" +body, err := client.Addon.Delete(addonId, nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string addonId = "ao_00000000000001"; + +List addon = client.Addon.Fetch(addonId).Delete(); +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of an add-on. For example, `ao_00000000000001`. + +## Webhooks + +### Available Webhook Events + +Refer to the Webhooks section for a list of available webhook events for Subscriptions. + +### Setup Webhooks + +Refer to the Webhooks section to learn how to setup webhooks. + +### Sample Payloads + +Refer to the Webhooks section for sample payloads. + +### Related Information + +- [API authentication](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md) +- [Subscription product documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) diff --git a/llm-content/payments/payment-gateway/web-integration/custom.md b/llm-content/payments/payment-gateway/web-integration/custom.md new file mode 100644 index 00000000..7760d7bf --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom.md @@ -0,0 +1,75 @@ +--- +title: Web Integration - Razorpay Custom Checkout +description: Integrate Razorpay Custom Checkout with your website to start accepting payments. +--- + +# Web Integration - Razorpay Custom Checkout + +Integrate Razorpay Payment Gateway with your Custom Checkout. You can build a checkout form to suit your unique business needs and branding guidelines. + +![](/docs/assets/images/web-integration-custom-custom-checkout.jpg) + +Custom Checkout's JavaScript library lets you customise the checkout interface at a granular level. For example, you can white-label the checkout to: + +- Display only the select payment methods. +- Integrate external wallets. +- Modify the look and feel of Checkout. + +> **WARN** +> +> +> +> **Watch Out!** +> +> You can accept payments **only** from those websites that you had registered with us at the time of [account setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md). Razorpay **fails** the payments received on the **unregistered websites**. If you want to accept payments from multiple websites, contact our [Support team](https://razorpay.com/support/) to register additional websites for your account. +> +> + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#intent-flow). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md). +> + +## Prerequisites + +Before integrating with the Checkout, run through this checklist: + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +> **WARN** +> +> +> +> **Watch Out!** +> +> A customer's payment information should never reach your servers unless you are PCI-DSS certified. +> + +## Integration Steps + +Follow these integration steps: + +1. [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md) +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/test-integration.md) +3. [Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/go-live-checklist.md) + +### Related Information + +- [Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/best-practices.md) +- [Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/web-integration/custom/best-practices.md b/llm-content/payments/payment-gateway/web-integration/custom/best-practices.md new file mode 100644 index 00000000..61f425a9 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/best-practices.md @@ -0,0 +1,62 @@ +--- +title: Best Practices +description: Best practices you must follow for smoother integration and payment experience. +--- + +# Best Practices + +You can use Razorpay Custom Checkout to customise the checkout experience as per your requirements and use it as a white-label solution. + +Given below are some of the best practices to be followed for smoother integration and payment experience. + +## 1. Integrate Payments Rainy Day Kit + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + +## 2. Integrate Orders API + +Orders help in binding multiple payment attempts against a single order. This helps to prevent multiple payments. [Integrate with Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/orders.md) on your server-side and pass the `order_id` to Checkout. + +## 3. Verify Signature to Avoid Data Tampering + +Verifying the Signature is a mandatory step that lets you confirm the authenticity of the details returned to the Checkout form for successful payments. Know more about [how to verify payment signature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md#15-verify-payment-signature). + +## 4. Check Payment or Order Status before Providing Services + +Check the payment/order status, that is, if the payment's status is `captured` and the order's status is `paid` before proving the services to the customers. + +You can determine payment and order status using: +- [Fetch All Payments for an Order API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-payments.md) +- [Fetch Status of a Payment using Payment id API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md) +- [Fetch Status of an Order using Order id API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) + +## 5. Implement Webhooks + +Implement webhooks or the query API to avoid any cases of callback failure (drop-offs could be connectivity or network failure) and to verify the payment details via an S2S call. Some of the webhook events you should enable are: +- `payment.captured` +- `payment.failed` +- `order.paid` + +Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + +## 6. Implement Callback URL + +Implement `callback_url` if your customers make online payments on browsers such as Instagram, Facebook Messenger, Opera, UC browsers and so on. This is because these browsers do not support i-frame. + +## 7. Implement Card Saving and Validation Features + +Follow these best practices if you accept card payments from customers: + +1. Validate the card number to avoid any payment failures. Know more about [Card Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/input-restriction.md). +2. Use the [Saved card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards.md) feature provided by Razorpay for better user experience and prevent payment failures because of incorrect card details. + +## 8. Implement VPA Saving and Validation Features + +Follow these best practices if you accept UPI collect payments from customers: + +1. Validate the VPA before initiating the payment request. Know more about [VPA Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/validate-vpa.md). +2. Add a custom UPI collect expiry based on the business requirement to provide enough time for the customer to complete the payment. +3. Use the [Saved VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-vpa.md) feature provided by Razorpay to provide a better customer experience and avoid payment failures. diff --git a/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md b/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md new file mode 100644 index 00000000..7fce261d --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md @@ -0,0 +1,758 @@ +--- +title: 1. Build Integration +description: Steps to integrate the Custom Checkout form on your website. +--- + +# 1. Build Integration + +Follow the steps to integrate Custom Checkout in your site: + +**1.1** [Create an Order in Server](#11-create-an-order-in-server). + +**1.2** [Fetch Payment Methods](#12-fetch-payment-methods). + +**1.3** [Invoke Checkout and Pass Order Id and Other Options to it](#13-invoke-checkout-and-pass-order-id-and). + + **1.3.1** [Include JavaScript code in your Webpage](#131-include-javascript-code-in-your-webpage). + + **1.3.2** [Instantiate Custom Checkout](#132-instantiate-custom-checkout). + + **1.3.3** [Submit Payment Details](#133-submit-payment-details). + +**1.4** [Store Fields in Your Server](#14-store-fields-in-your-server). + +**1.5** [Verify Payment Signature](#15-verify-payment-signature). + +**1.6** [Verify Payment Status](#16-verify-payment-status). + +## 1.1 Create an Order in Server + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The order_id received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "", + "receipt": "rcptid_11", + "partial_payment": true, + "first_payment_min_amount": 23000 +}' +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", ""); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 100, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => ''// [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies).) +]); +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", ""); +Order order = client.Order.Create(options); +```ruby: Ruby +options = amount: 50000, currency: '', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +#### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, `INR`. Refer to the [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) for a list of supported international currencies. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#error-response-parameters). + +## 1.2 Fetch Payment Methods + +When creating a custom checkout form, display only the activated methods to the customer. Use the below methods to fetch all payments methods available to you: + +```js: Request +var razorpay = new Razorpay({ + key: '', + // logo, displayed in the popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}); +razorpay.once('ready', function(response) { + console.log(response.methods); +}) +```js: Response +{ + "methods": { + "entity": "methods", + "card": true, + "debit_card": true, + "credit_card": true, + "prepaid_card": true, + "card_networks": { + "AMEX": 0, + "DICL": 1, + "MC": 1, + "MAES": 1, + "VISA": 1, + "JCB": 1, + "RUPAY": 1, + "BAJAJ": 0 + }, + "amex": false, + "netbanking": { + ... + ... + "HDFC": "HDFC Bank", + "ICIC": "ICICI Bank" + ... + ... + }, + "wallet": { + "payzapp": true + }, + "emi": true, + "upi": true, + "cardless_emi": [], + "paylater": [], + "emi_subvention": "customer", + "emi_options": { + ... + ... + "ICIC": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 150000 + }, + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 150000 + } + ...// rest of the emi plans + ], + "HDFC": [ + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 300000 + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 300000 + } + ... + ...// rest of the emi plans + ] + } + } +} +``` + +Know more about [the various payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) offered by Razorpay. + +## 1.3 Invoke Checkout and Pass Order Id and Other Options to it + +### 1.3.1 Include JavaScript code in your Webpage + +Include the following script, preferably in the `` section of your page: + +```html: Index HTML + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Include the script from `https://checkout.razorpay.com/v1/razorpay.js` instead of serving a copy from your server. This allows the library's new updates and bug fixes to fit your application automatically. +> - We always maintain backward compatibility with our code. +> + +### 1.3.2 Instantiate Custom Checkout + +- Single Instance on a Page: + + ```js: Invoke a Single Instance + var razorpay = new Razorpay({ + key: '', + image: 'https://i.imgur.com/n5tjHFD.jpg', + // logo, displayed in the payment processing popup + redirect: true + }); + ``` + +- Multiple Instances on Same Page: If you need multiple Razorpay instances on the same page, you can globally set some of the options: + + ```js: Invoke Multiple Instances + Razorpay.configure({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', + redirect: true + }); + new Razorpay({}); // will inherit key and image from above + ``` + +> **INFO** +> +> +> **Customer Fee Bearer (CFB) Requirements** +> +> For card payments with CFB enabled, set `redirect: true` and include `callback_url` during Razorpay instantiation. +> + +#### Checkout Options + +While building a custom UI for accepting payments from your customers, you should be familiar with the fields supported in the `razorpay.js` script. + +`key` _mandatory_ +: `string` API Key ID generated from **Dashboard** → **Account & Settings** → [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.999, pass the value as `295999`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per VISA Guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. For example, `INR`. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (April 2023). +> + +`description` _optional_ +: `string` Description of the product shown in the Checkout form. It must start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown in the Checkout form. Can also be a **base64** string, if loading the image from a network is not desirable. + +`order_id` _mandatory_ +: `string` Order ID generated via the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`method` _mandatory_ +: `string` The payment method used by the customer on Checkout. +Possible values: + - `card` (default) + - `upi` (default) + - `netbanking` (default) + - `wallet` (default) + - `emi` (default) + - `cardless_emi` (requires [approval](https://razorpay.com/support/#request)) + - `paylater` (requires [approval](https://razorpay.com/support/#request)) + - `emandate` (requires [approval](https://razorpay.com/support/#request)) + +`card` _mandatory if method=card/emi_ +: `object` The details of the card that should be entered while making the payment. + + `number` + : `integer` Unformatted card number. + + `name` + : `string` The name of the cardholder. + + `expiry_month` + : `integer` Expiry month for card in MM format. + + `expiry_year` + : `integer` Expiry year for card in YY format. + + `cvv` + : `integer` CVV printed on the back of the card. + + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `emi_duration` + : `integer` Defines the number of months in the EMI plan. + +`bank_account` _mandatory if method=emandate_ +: The details of the bank account that should be passed in the request. These details include bank account number, IFSC code and the name of the customer associated with the bank account. + + `account_number` + : `string` Bank account number used to initiate the payment. + + `ifsc` + : `string` IFSC of the bank used to initiate the payment. + + `name` + : `string` Name associated with the bank account used to initiate the payment. + +`bank` _mandatory if method=netbanking_ +: `string` Bank code. List of available banks enabled for your account can be fetched via [**methods**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#fetch-supported-methods). + +`wallet` _mandatory if method=wallet_ +: `string` Wallet code for the wallet used for the payment. Possible values: + - `payzapp` (default) + - `olamoney` (requires [approval](https://razorpay.com/support/#request)) + - `phonepe` (requires [approval](https://razorpay.com/support/#request)) + - `airtelmoney` (requires [approval](https://razorpay.com/support/#request)) + - `mobikwik` (requires [approval](https://razorpay.com/support/#request)) + - `jiomoney` (requires [approval](https://razorpay.com/support/#request)) + - `amazonpay` (requires [approval](https://razorpay.com/support/#request)) + - `paypal` (requires [approval](https://razorpay.com/support/#request)) + - `phonepeswitch` (requires [approval](https://razorpay.com/support/#request)) + +`provider` _mandatory if method=cardless_emi/paylater_ +: `string` Name of the cardless EMI provider partnered with Razorpay. + + Available options for Cardless EMI (requires [approval](https://razorpay.com/support/#request)): + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `zestmoney` + - `earlysalary` + - `walnut369` + + Available options for Pay Later: + - `lazypay` + - `paypal` + +`vpa` _mandatory if method=upi_ +: `string` UPI ID used for making the payment on the UPI app. + + +> **WARN** +> +> +> **Deprecation Notice** +> +> UPI Collect is deprecated effective 28 February 2026. This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [ migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md) to switch to UPI Intent. +> + +`callback_url` _optional_ +: `string` The URL to which the customer must be redirected upon completion of payment. The URL must accept incoming `POST` requests. The callback URL will have `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` as the request parameters for a successful payment. + +`redirect` _conditionally mandatory_ +: `boolean` Determines whether customer should be redirected to the URL mentioned in the +`callback_url` parameter. This is mandatory if `callback_url` parameter is used. Possible values: + - `true`: Customer will be redirected to the `callback_url`. + - `false`: Customer will not be redirected to the `callback_url` + +### 1.3.3 Submit Payment Details + +After creating an order and obtaining the customer's payment details, send the information to Razorpay to complete the payment. The data that needs to be submitted depends on the customer's payment method. You can do this by invoking `createPayment` method. + +Know more about [sample codes for various payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md). + +```js: createPayment with handler function +var data = { + amount: 1000, // in currency subunits. + currency: "",// + email: '', + contact: '', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_CuEzONfnOI86Ab',// Replace with Order ID generated in Step 4 + method: 'netbanking', + + // method specific fields + bank: 'HDFC' +}; + +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on('payment.success', function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + + razorpay.on('payment.error', function(resp){alert(resp.error.description)}); // will pass error object to error handler + +}) + +```js: createPayment with callback URL +var data = { + callback_url: 'https://www.examplecallbackurl.com/', + amount: 1000, // in currency subunits. + currency: "",// + email: '', + contact: '', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_CuEzONfnOI86Ab',// Replace with Order ID generated in Step 4 + method: 'netbanking', + + // method specific fields + bank: 'HDFC' +}; + +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + +}) +``` + +> **WARN** +> +> +> +> **Watch Out!** +> +> The `createPayment` method should be called within an event listener triggered by user action to prevent the popup from being blocked. For example: +> + +> ```js +> $('button').click( function (){ razorpay.createPayment(...) }) +> ``` +> + +> **INFO** +> +> +> +> **Handy Tips** +> +> - **Handler Function** +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL** +> +When you use a callback URL, Razorpay makes a post call to the callback URL, with the `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` in the response object of the successful payment (`razorpay_payment_id` and `razorpay_order_id`). +> + +## 1.4 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + +### Failure Response + +A failed payment returns an error response. + +```json: Sample Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect otp", + "field": null, + "source": "customer", + "step": "payment_authentication", + "reason": "invalid_otp", + "metadata": { + "payment_id": "pay_EDNBKIP31Y4jl8", + "order_id": "order_DBJKIP31Y4jl8" + } + } +} +``` + +Know more about [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md). + + +## 1.5 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +## 1.6 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/test-integration.md) diff --git a/llm-content/payments/payment-gateway/web-integration/custom/chargeback.md b/llm-content/payments/payment-gateway/web-integration/custom/chargeback.md new file mode 100644 index 00000000..9bffe7ab --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/chargeback.md @@ -0,0 +1,59 @@ +--- +title: Web Integration - Razorpay Custom Checkout +description: Integrate Razorpay Custom Checkout with your website to start accepting payments. +--- + +# Web Integration - Razorpay Custom Checkout + +Integrate Razorpay Payment Gateway with your Custom Checkout. You can build a checkout form to suit your unique business needs and branding guidelines. + +![](/docs/assets/images/web-integration-custom-custom-checkout.jpg) + +Custom Checkout's JavaScript library lets you customise the checkout interface at a granular level. For example, you can white-label the checkout to: + +- Display only the select payment methods. +- Integrate external wallets such as Paytm. +- Modify the look and feel of Checkout. + +> **WARN** +> +> +> +> **Watch Out!** +> +> You can accept payments **only** from those websites that you had registered with us at the time of [account setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md). Razorpay **fails** the payments received on the **unregistered websites**. If you want to accept payments from multiple websites, contact our [Support team](https://razorpay.com/support/) to register additional websites for your account. +> +> + +## Prerequisites + +Before integrating with the Checkout, run through this checklist: + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. +- Know about the [Razorpay Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md). + +> **WARN** +> +> +> +> **Watch Out!** +> +> A customer's payment information should never reach your servers unless you are PCI-DSS certified. +> + +## Integration Steps + +Follow these integration steps: + +1. Build Integration +- [E-Commerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/chargeback/build-integration-ecommerce.md) +- [Hotel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/chargeback/build-integration-hotel.md) +- [Travel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/chargeback/build-integration-travel.md) +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/chargeback/test-integration.md) +3. [Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/chargeback/go-live-checklist.md) + +### Related Information + +- [Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/best-practices.md) +- [Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/web-integration/custom/chargeback/build-integration-ecommerce.md b/llm-content/payments/payment-gateway/web-integration/custom/chargeback/build-integration-ecommerce.md new file mode 100644 index 00000000..3388cf64 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/chargeback/build-integration-ecommerce.md @@ -0,0 +1,1117 @@ +--- +title: 1. E-Commerce Build Integration +description: Steps to integrate the Custom Checkout form on your website. +--- + +# 1. E-Commerce Build Integration + +Follow the steps to integrate Custom Checkout in your site: + +**1.1** [Generate API Keys](#11-generate-api-keys). + +**1.2** [Create an Order in Server](#12-create-an-order-in-server). + +**1.3** [Fetch Payment Methods](#13-fetch-payment-methods). + +**1.4** [Invoke Checkout and Pass Order Id and Other Options to it](#14-invoke-checkout-and-pass-order-id-and). + + **1.4.1** [Include JavaScript code in your Webpage](#141-include-javascript-code-in-your-webpage). + + **1.4.2** [Instantiate Custom Checkout](#142-instantiate-custom-checkout). + + **1.4.3** [Submit Payment Details](#143-submit-payment-details). + +**1.5** [Store Fields in Your Server](#15-store-fields-in-your-server). + +**1.6** [Verify Payment Signature](#16-verify-payment-signature). + +**1.7** [Verify Payment Status](#17-verify-payment-status). + +## 1.1 Generate API Keys + +Follow these steps to generate API keys: + + + Watch this video to see how to generate API keys in the Test mode. + + +[Video: https://www.youtube.com/embed/VOn8JlGPG2I?si=WTAbAeLB3Hnp1n3r] + + + + + Watch this video to see how to generate API keys in the Live mode. + + +[Video: https://www.youtube.com/embed/Cer8UfBGX_E?si=Libr1RXoFSEDfY1c] + + + +1. Log in to your Dashboard with the appropriate credentials. +2. Select the mode (**Test** or **Live**) for which you want to generate the API key. + - **Test Mode**: The test mode is a simulation mode that you can use to test your integration flow. **Your customers will not be able to make payments in this mode**. + - **Live Mode**: When your integration is complete, switch to live mode and generate live mode API keys. In the integration, **replace test mode keys with live mode keys to accept customer payments**. +3. Navigate to **Account & Settings** → **API Keys** (under **Website and app settings**) → **Generate Key** to generate key for the selected mode. + +> **WARN** +> +> +> **Watch Out!** +> +> - After generating the keys from the Dashboard, download and save them securely. You can use only one set of API keys. If you do not remember your API keys, you must [regenerate them](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#regenerate-api-keys) from the Dashboard and update them wherever the previous keys were used for payment gateway integrations. +> - API Keys are universal; that is, they are applicable to all websites and apps that you have whitelisted for your Merchant ID. +> - **Do not share your API Key secret** with anyone or on any public platforms. **This can pose security threats to your Razorpay account**. +> - Once you generate the API Keys, only the **Key Id** is visible on the Dashboard, **not the Key secret**, as it can pose security threats to your Razorpay account. +> - Use the **Live API Keys** to accept live payments and the **Test API Keys** for test transactions. +> + +Once generated, you will be able to see the Key id, the date the key was created and the expiry date for the API Key on screen. + +> **WARN** +> +> +> **Watch Out!** +> +> Save your Key ID and Key Secret securely (never expose the Key Secret in client-side code). +> + +## 1.2 Create an Order in Server + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The order_id received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "partial_payment": false, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "shipping_details": { + "method": "sameday", + "gift_wrap": false + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "e_commerce", + "sku": "1gr367", + "name": "TEST", + "description": "TEST", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "e_commerce": { + "other_product_codes": { + "upc": "12r34", + "ean": "123r4", + "unspsc": "123s4" + } + } + } + ], + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +``` + +```json: Response +{ + "id": "order_QU1wpqJfs7smfR", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "created_at": 1747055716 +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _optional_ + : `json object` Details about the customer/user. + + `name` _optional_ + : `string` The customer’s name. For example, `Gaurav Kumar`. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `+919000090000`. + + `email` _optional_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the merchant platform. For example, `22`. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the merchant platform. For example, `4`. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, 1234567890. + + `shipping_address` _optional_ + : `Json object` This will have details about the order's shipping address. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560068`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `billing_address` _optional_ + : `Json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `shipping_details` _optional_ + : `Json object` This will have the order's shipping details. + + `method` _optional_ + : `enum` Shipping method for the product. Possible values: + - `lowcost`: Lowest-cost service. + - `sameday`: Courier or same-day service. + - `oneday`: Next-day or overnight service. + - `twoday`: Two-day service. + - `threeday`: Three-day service. + - `pickup`: Store pick-up. + - `other`: Other shipping method. + - `none`: No shipping method because the product is a service or subscription. + + `gift_wrap` _optional_ + : `boolean` Indicates whether the customer requested gift wrapping for this purchase. This field can contain one of the following values: + - `1`: The customer requested gift wrapping. + - `0`: The customer did not request gift wrapping. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `sku` _optional_ + : `string ` The unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business runs a discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `e_commerce` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `other_product_codes` _optional_ + : `object` Array to collect different codes that can identify the item type. Possible values: + + `upc` _optional_ + : `string` Universal Product Code (UPC; redundantly: UPC code) is a barcode symbology used worldwide to track trade items in stores. UPC consists of 12 numeric digits that are uniquely assigned to each trade item + + `ean` _optional_ + : `string` European Article Numbers (EAN) is a type of barcode that encodes an article number. Contains 8 (EAN-8) or 13 (EAN-13) numerical digits. + + `unspsc` _optional_ + : `string` The United Nations Standard Products and Services Code (UNSPSC) is a taxonomy of products and services used in eCommerce. It is a four-level hierarchy coded as an eight-digit number, with an optional fifth level adding two more digits. + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `JSON object` Details of the campaign. *Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, `PQR12453`. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Example values: `google`, `newsletter`. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: `cpc`, `banner`, etc. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +## 1.3 Fetch Payment Methods + +When creating a custom checkout form, display only the activated methods to the customer. Use the below methods to fetch all payments methods available to you: + +```js: Request +var razorpay = new Razorpay({ + key: '', + // logo, displayed in the popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}); +razorpay.once('ready', function(response) { + console.log(response.methods); +}) +```js: Response +{ + "methods": { + "entity": "methods", + "card": true, + "debit_card": true, + "credit_card": true, + "prepaid_card": true, + "card_networks": { + "AMEX": 0, + "DICL": 1, + "MC": 1, + "MAES": 1, + "VISA": 1, + "JCB": 1, + "RUPAY": 1, + "BAJAJ": 0 + }, + "amex": false, + "netbanking": { + ... + ... + "HDFC": "HDFC Bank", + "ICIC": "ICICI Bank" + ... + ... + }, + "wallet": { + "payzapp": true + }, + "emi": true, + "upi": true, + "cardless_emi": [], + "paylater": [], + "emi_subvention": "customer", + "emi_options": { + ... + ... + "ICIC": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 150000 + }, + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 150000 + } + ...// rest of the emi plans + ], + "HDFC": [ + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 300000 + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 300000 + } + ... + ...// rest of the emi plans + ] + } + } +} +``` + +Know more about [the various payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) offered by Razorpay. + +## 1.4 Invoke Checkout and Pass Order Id and Other Options to it + +### 1.4.1 Include JavaScript code in your Webpage + +Include the following script, preferably in the `` section of your page: + +```html: Index HTML + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Include the script from `https://checkout.razorpay.com/v1/razorpay.js` instead of serving a copy from your server. This allows the library's new updates and bug fixes to fit your application automatically. +> - We always maintain backward compatibility with our code. +> + +### 1.4.2 Instantiate Custom Checkout + +#### Single Instance on a Page + +```js: Invoke a Single Instance +var razorpay = new Razorpay({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}); +``` + +#### Multiple Instances on Same Page + +If you need multiple Razorpay instances on the same page, you can globally set some of the options: + +```js: Invoke Multiple Instances +Razorpay.configure({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}) +new Razorpay({}); // will inherit key and image from above. +``` + +#### Checkout Options + +While building a custom UI for accepting payments from your customers, you should be familiar with the fields supported in the `razorpay.js` script. + + +### Checkout Parameters + + + + + + + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.999, pass the value as `295999`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per VISA Guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + + + + + + + `currency` _mandatory_ + : `string` The currency in which the payment should be made by the customer. For example, `INR`. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (April 2023). +> + + + + + + + + + + `description` _optional_ + : `string` Description of the product shown in the Checkout form. It must start with an alphanumeric character. + + `image` _optional_ + : `string` Link to an image (usually your business logo) shown in the Checkout form. Can also be a **base64** string, if loading the image from a network is not desirable. + + `order_id` _mandatory_ + : `string` Order ID generated via the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + `notes` _optional_ + : `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + + + + `method` _mandatory_ + : `string` The payment method used by the customer on Checkout. +Possible values: + - `card` (default) + - `upi` (default) + - `netbanking` (default) + - `wallet` (default) + - `emi` (default) + - `cardless_emi` (requires [approval](https://razorpay.com/support/#request)) + - `paylater` (requires [approval](https://razorpay.com/support/#request)) + - `emandate` (requires [approval](https://razorpay.com/support/#request)) + + + + + + + + + + + + `card` _mandatory if method=card/emi_ + : `object` The details of the card that should be entered while making the payment. + + `number` + : `integer` Unformatted card number. + + `name` + : `string` The name of the cardholder. + + `expiry_month` + : `integer` Expiry month for card in MM format. + + `expiry_year` + : `integer` Expiry year for card in YY format. + + `cvv` + : `integer` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `emi_duration` + : `integer` Defines the number of months in the EMI plan. + + + + + + + + + + + + `bank_account` _mandatory if method=emandate_ + : The details of the bank account that should be passed in the request. These details include bank account number, IFSC code and the name of the customer associated with the bank account. + + `account_number` + : `string` Bank account number used to initiate the payment. + + `ifsc` + : `string` IFSC of the bank used to initiate the payment. + + `name` + : `string` Name associated with the bank account used to initiate the payment. + + `bank` _mandatory if method=netbanking_ + : `string` Bank code. List of available banks enabled for your account can be fetched via [**methods**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#fetch-supported-methods). + + + + + + + + + + `wallet` _mandatory if method=wallet_ + : `string` Wallet code for the wallet used for the payment. Possible values: + - `payzapp` (default) + - `olamoney` (requires [approval](https://razorpay.com/support/#request)) + - `phonepe` (requires [approval](https://razorpay.com/support/#request)) + - `airtelmoney` (requires [approval](https://razorpay.com/support/#request)) + - `mobikwik` (requires [approval](https://razorpay.com/support/#request)) + - `jiomoney` (requires [approval](https://razorpay.com/support/#request)) + - `amazonpay` (requires [approval](https://razorpay.com/support/#request)) + - `paypal` (requires [approval](https://razorpay.com/support/#request)) + - `phonepeswitch` (requires [approval](https://razorpay.com/support/#request)) + + + + + + + + + + `provider` _mandatory if method=cardless_emi/paylater_ + : `string` Name of the cardless EMI provider partnered with Razorpay. + + Available options for Cardless EMI (requires [approval](https://razorpay.com/support/#request)): + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `zestmoney` + - `earlysalary` + - `walnut369` + + Available options for Pay Later: + - `lazypay` + - `paypal` + + + `vpa` _mandatory if method=upi_ + : `string` UPI ID used for making the payment on the UPI app. + + +> **WARN** +> +> +> **Deprecation Notice** +> +> UPI Collect is deprecated effective 28 February 2026. This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [ migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md) to switch to UPI Intent. +> + + + + + + + + + + + + +### 1.4.3 Submit Payment Details + +After creating an order and obtaining the customer's payment details, send the information to Razorpay to complete the payment. The data that needs to be submitted depends on the customer's payment method. You can do this by invoking `createPayment` method. + +Know more about [sample codes for various payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md). + +```js: createPayment with handler function +var data = { + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR",// Default is INR. We support more than 90 currencies. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_CuEzONfnOI86Ab',// Replace with Order ID generated in Step 4 + method: 'netbanking', + + // method specific fields + bank: 'HDFC' +}; + +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on('payment.success', function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + + razorpay.on('payment.error', function(resp){alert(resp.error.description)}); // will pass error object to error handler + +}) + +```js: createPayment with callback URL +var data = { + callback_url: 'https://www.examplecallbackurl.com/', + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR",// Default is INR. We support more than 90 currencies. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_CuEzONfnOI86Ab',// Replace with Order ID generated in Step 4 + method: 'netbanking', + + // method specific fields + bank: 'HDFC' +}; + +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + +}) +``` + +> **WARN** +> +> +> +> **Watch Out!** +> +> The `createPayment` method should be called within an event listener triggered by user action to prevent the popup from being blocked. For example: +> + +> ```js +> $('button').click( function (){ razorpay.createPayment(...) }) +> ``` +> + +> **INFO** +> +> +> +> **Handy Tips** +> +> - **Handler Function** +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL** +> +When you use a callback URL, Razorpay makes a post call to the callback URL, with the `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` in the response object of the successful payment (`razorpay_payment_id` and `razorpay_order_id`). +> + +## 1.5 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + +### Failure Response + +A failed payment returns an error response. + +```json: Sample Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect otp", + "field": null, + "source": "customer", + "step": "payment_authentication", + "reason": "invalid_otp", + "metadata": { + "payment_id": "pay_EDNBKIP31Y4jl8", + "order_id": "order_DBJKIP31Y4jl8" + } + } +} +``` + +Know more about [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md). + + +## 1.6 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +## 1.7 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/chargeback/test-integration.md) diff --git a/llm-content/payments/payment-gateway/web-integration/custom/chargeback/build-integration-hotel.md b/llm-content/payments/payment-gateway/web-integration/custom/chargeback/build-integration-hotel.md new file mode 100644 index 00000000..c91fb7ce --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/chargeback/build-integration-hotel.md @@ -0,0 +1,1209 @@ +--- +title: 1. Hotel Build Integration +description: Steps to integrate the Custom Checkout form on your website. +--- + +# 1. Hotel Build Integration + +Follow the steps to integrate Custom Checkout in your site: + +**1.1** [Generate API Keys](#11-generate-api-keys). + +**1.2** [Create an Order in Server](#12-create-an-order-in-server). + +**1.3** [Fetch Payment Methods](#13-fetch-payment-methods). + +**1.4** [Invoke Checkout and Pass Order Id and Other Options to it](#14-invoke-checkout-and-pass-order-id-and). + + **1.4.1** [Include JavaScript code in your Webpage](#141-include-javascript-code-in-your-webpage). + + **1.4.2** [Instantiate Custom Checkout](#142-instantiate-custom-checkout). + + **1.4.3** [Submit Payment Details](#143-submit-payment-details). + +**1.5** [Store Fields in Your Server](#15-store-fields-in-your-server). + +**1.6** [Verify Payment Signature](#16-verify-payment-signature). + +**1.7** [Verify Payment Status](#17-verify-payment-status). + +## 1.1 Generate API Keys + +Follow these steps to generate API keys: + + + Watch this video to see how to generate API keys in the Test mode. + + +[Video: https://www.youtube.com/embed/VOn8JlGPG2I?si=WTAbAeLB3Hnp1n3r] + + + + + Watch this video to see how to generate API keys in the Live mode. + + +[Video: https://www.youtube.com/embed/Cer8UfBGX_E?si=Libr1RXoFSEDfY1c] + + + +1. Log in to your Dashboard with the appropriate credentials. +2. Select the mode (**Test** or **Live**) for which you want to generate the API key. + - **Test Mode**: The test mode is a simulation mode that you can use to test your integration flow. **Your customers will not be able to make payments in this mode**. + - **Live Mode**: When your integration is complete, switch to live mode and generate live mode API keys. In the integration, **replace test mode keys with live mode keys to accept customer payments**. +3. Navigate to **Account & Settings** → **API Keys** (under **Website and app settings**) → **Generate Key** to generate key for the selected mode. + +> **WARN** +> +> +> **Watch Out!** +> +> - After generating the keys from the Dashboard, download and save them securely. You can use only one set of API keys. If you do not remember your API keys, you must [regenerate them](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#regenerate-api-keys) from the Dashboard and update them wherever the previous keys were used for payment gateway integrations. +> - API Keys are universal; that is, they are applicable to all websites and apps that you have whitelisted for your Merchant ID. +> - **Do not share your API Key secret** with anyone or on any public platforms. **This can pose security threats to your Razorpay account**. +> - Once you generate the API Keys, only the **Key Id** is visible on the Dashboard, **not the Key secret**, as it can pose security threats to your Razorpay account. +> - Use the **Live API Keys** to accept live payments and the **Test API Keys** for test transactions. +> + +Once generated, you will be able to see the Key id, the date the key was created and the expiry date for the API Key on screen. + +> **WARN** +> +> +> **Watch Out!** +> +> Save your Key ID and Key Secret securely (never expose the Key Secret in client-side code). +> + +## 1.2 Create an Order in Server + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The order_id received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1101", + "partial_payment": false, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "hotel", + "sku": "1gr367", + "name": "Grand Palace Hotel", + "description": "2BHK villa", + "quantity": 2, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "hotel": { + "sub_type": "stay", + "checkin_date": "2019-07-16", + "checkout_date": "2019-07-16", + "property_type": "", + "star_rating": 5, + "brand": "Grand Mercure", + "address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "class": "business", + "identity": { + "unique_national_id": "ABCDE1234Z", + "tax_id": "ABCDE1234Z" + } + }, + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "class": "business", + "identity": { + "unique_national_id": "ABCDE1234Z", + "tax_id": "ABCDE1234Z" + } + } + ] + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +``` + +```json: Response +{ + "id": "order_QU1wpqJfs7smfR", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "created_at": 1747055716 +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _optional_ + : `json object` Details about the customer/user. + + `name` _optional_ + : `string` The customer’s name. For example, `Gaurav Kumar`. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `+919000090000`. + + `email` _optional_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the merchant platform. For example, `22`. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the merchant platform. For example, `4`. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, 1234567890. + + `billing_address` _optional_ + : `Json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e-commerce` + - `mutual_fund` + + `sku` _optional_ + : `string ` unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business is running any discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `hotel` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `sub_type` _optional_ + : `enum` The sub-type of the line item. Possible values: + - `stay` + - `breakfast` + - `dinner` + - `lunch` + - `early_checkin` + - `late_chechout` + - `others` + + `checkin_date` _optional_ + : `string` Represents an ISO 8601-encoded date string. For example, September 7, 2019 is represented as `2019-07-16`. + + `checkout_date` _optional_ + : `string` Represents an ISO 8601-encoded date string. For example, September 7, 2019 is represented as `2019-07-16`. + + `property_type` _optional_ + : `string` Represents the type of the property. Possible values: + - `resort` + - `hostel` + - `hotel` + - `inn` + - `lodge` + - `motel` + - `apartment` + - `bed_and_breakfast` + - `tent` + - `villa` + + `star_rating` _optional_ + : `integer` Denotes the star rating of the property. Possible values: 1 to 7. + + `brand` _optional_ + : `string` Brand name of the property. For example, `Marriott Group`. + + `address` _optional_ + : `json object` details of the property address. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `travellers` _optional_ + : `JSON object` Details associated with passengers/travellers/beneficiaries. + + `name` _optional_ + : `string` Name of the passenger/traveler/beneficiary. + + `email` _optional_ + : `string` Email address of the passenger/traveler/beneficiary. + + `contact` _optional_ + : `JSON object` Details associated with passengers/travelers/beneficiaries. + + `age` _optional_ + : `integer` UNIX timestamp of the date of birth of the individual. For example, `1234567890`. + + `class` _optional_ + : `string` Type of the flight ticket. Possible values: + - `Business` + - `Suite` + - `Premium` + - `Deluxe` + - `Standard` + + `identity` _optional_ + : `JSON object` Identity details of the passenger/beneficiary. + + `unique_national_id` _optional_ + : `string` National ID number. For example, Adhaar number for India. + + `tax_id` _optional_ + : `string` Passport number of the individual. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `JSON object` Details of the campaign. *Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, PQR12453. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Example values: `google`, `newsletter`. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: `cpc`, `banner`, etc. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +## 1.3 Fetch Payment Methods + +When creating a custom checkout form, display only the activated methods to the customer. Use the below methods to fetch all payments methods available to you: + +```js: Request +var razorpay = new Razorpay({ + key: '', + // logo, displayed in the popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}); +razorpay.once('ready', function(response) { + console.log(response.methods); +}) +```js: Response +{ + "methods": { + "entity": "methods", + "card": true, + "debit_card": true, + "credit_card": true, + "prepaid_card": true, + "card_networks": { + "AMEX": 0, + "DICL": 1, + "MC": 1, + "MAES": 1, + "VISA": 1, + "JCB": 1, + "RUPAY": 1, + "BAJAJ": 0 + }, + "amex": false, + "netbanking": { + ... + ... + "HDFC": "HDFC Bank", + "ICIC": "ICICI Bank" + ... + ... + }, + "wallet": { + "payzapp": true + }, + "emi": true, + "upi": true, + "cardless_emi": [], + "paylater": [], + "emi_subvention": "customer", + "emi_options": { + ... + ... + "ICIC": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 150000 + }, + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 150000 + } + ...// rest of the emi plans + ], + "HDFC": [ + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 300000 + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 300000 + } + ... + ...// rest of the emi plans + ] + } + } +} +``` + +Know more about [the various payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) offered by Razorpay. + +## 1.4 Invoke Checkout and Pass Order Id and Other Options to it + +### 1.4.1 Include JavaScript code in your Webpage + +Include the following script, preferably in the `` section of your page: + +```html: Index HTML + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Include the script from `https://checkout.razorpay.com/v1/razorpay.js` instead of serving a copy from your server. This allows the library's new updates and bug fixes to fit your application automatically. +> - We always maintain backward compatibility with our code. +> + +### 1.4.2 Instantiate Custom Checkout + +#### Single Instance on a Page + +```js: Invoke a Single Instance +var razorpay = new Razorpay({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}); +``` + +#### Multiple Instances on Same Page + +If you need multiple Razorpay instances on the same page, you can globally set some of the options: + +```js: Invoke Multiple Instances +Razorpay.configure({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}) +new Razorpay({}); // will inherit key and image from above. +``` + +#### Checkout Options + +While building a custom UI for accepting payments from your customers, you should be familiar with the fields supported in the `razorpay.js` script. + + +### Checkout Parameters + + + + + + + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.999, pass the value as `295999`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per VISA Guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + + + + + + + `currency` _mandatory_ + : `string` The currency in which the payment should be made by the customer. For example, `INR`. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (April 2023). +> + + + + + + + + + + `description` _optional_ + : `string` Description of the product shown in the Checkout form. It must start with an alphanumeric character. + + `image` _optional_ + : `string` Link to an image (usually your business logo) shown in the Checkout form. Can also be a **base64** string, if loading the image from a network is not desirable. + + `order_id` _mandatory_ + : `string` Order ID generated via the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + `notes` _optional_ + : `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + + + + `method` _mandatory_ + : `string` The payment method used by the customer on Checkout. +Possible values: + - `card` (default) + - `upi` (default) + - `netbanking` (default) + - `wallet` (default) + - `emi` (default) + - `cardless_emi` (requires [approval](https://razorpay.com/support/#request)) + - `paylater` (requires [approval](https://razorpay.com/support/#request)) + - `emandate` (requires [approval](https://razorpay.com/support/#request)) + + + + + + + + + + + + `card` _mandatory if method=card/emi_ + : `object` The details of the card that should be entered while making the payment. + + `number` + : `integer` Unformatted card number. + + `name` + : `string` The name of the cardholder. + + `expiry_month` + : `integer` Expiry month for card in MM format. + + `expiry_year` + : `integer` Expiry year for card in YY format. + + `cvv` + : `integer` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `emi_duration` + : `integer` Defines the number of months in the EMI plan. + + + + + + + + + + + + `bank_account` _mandatory if method=emandate_ + : The details of the bank account that should be passed in the request. These details include bank account number, IFSC code and the name of the customer associated with the bank account. + + `account_number` + : `string` Bank account number used to initiate the payment. + + `ifsc` + : `string` IFSC of the bank used to initiate the payment. + + `name` + : `string` Name associated with the bank account used to initiate the payment. + + `bank` _mandatory if method=netbanking_ + : `string` Bank code. List of available banks enabled for your account can be fetched via [**methods**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#fetch-supported-methods). + + + + + + + + + + `wallet` _mandatory if method=wallet_ + : `string` Wallet code for the wallet used for the payment. Possible values: + - `payzapp` (default) + - `olamoney` (requires [approval](https://razorpay.com/support/#request)) + - `phonepe` (requires [approval](https://razorpay.com/support/#request)) + - `airtelmoney` (requires [approval](https://razorpay.com/support/#request)) + - `mobikwik` (requires [approval](https://razorpay.com/support/#request)) + - `jiomoney` (requires [approval](https://razorpay.com/support/#request)) + - `amazonpay` (requires [approval](https://razorpay.com/support/#request)) + - `paypal` (requires [approval](https://razorpay.com/support/#request)) + - `phonepeswitch` (requires [approval](https://razorpay.com/support/#request)) + + + + + + + + + + `provider` _mandatory if method=cardless_emi/paylater_ + : `string` Name of the cardless EMI provider partnered with Razorpay. + + Available options for Cardless EMI (requires [approval](https://razorpay.com/support/#request)): + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `zestmoney` + - `earlysalary` + - `walnut369` + + Available options for Pay Later: + - `lazypay` + - `paypal` + + `vpa` _mandatory if method=upi_ + : `string` UPI ID used for making the payment on the UPI app. + + +> **WARN** +> +> +> **Deprecation Notice** +> +> UPI Collect is deprecated effective 28 February 2026. This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [ migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md) to switch to UPI Intent. +> + + + + + + + + + + + + +### 1.4.3 Submit Payment Details + +After creating an order and obtaining the customer's payment details, send the information to Razorpay to complete the payment. The data that needs to be submitted depends on the customer's payment method. You can do this by invoking `createPayment` method. + +Know more about [sample codes for various payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md). + +```js: createPayment with handler function +var data = { + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR",// Default is INR. We support more than 90 currencies. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_CuEzONfnOI86Ab',// Replace with Order ID generated in Step 4 + method: 'netbanking', + + // method specific fields + bank: 'HDFC' +}; + +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on('payment.success', function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + + razorpay.on('payment.error', function(resp){alert(resp.error.description)}); // will pass error object to error handler + +}) + +```js: createPayment with callback URL +var data = { + callback_url: 'https://www.examplecallbackurl.com/', + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR",// Default is INR. We support more than 90 currencies. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_CuEzONfnOI86Ab',// Replace with Order ID generated in Step 4 + method: 'netbanking', + + // method specific fields + bank: 'HDFC' +}; + +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + +}) +``` + +> **WARN** +> +> +> +> **Watch Out!** +> +> The `createPayment` method should be called within an event listener triggered by user action to prevent the popup from being blocked. For example: +> + +> ```js +> $('button').click( function (){ razorpay.createPayment(...) }) +> ``` +> + +> **INFO** +> +> +> +> **Handy Tips** +> +> - **Handler Function** +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL** +> +When you use a callback URL, Razorpay makes a post call to the callback URL, with the `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` in the response object of the successful payment (`razorpay_payment_id` and `razorpay_order_id`). +> + +## 1.5 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + +### Failure Response + +A failed payment returns an error response. + +```json: Sample Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect otp", + "field": null, + "source": "customer", + "step": "payment_authentication", + "reason": "invalid_otp", + "metadata": { + "payment_id": "pay_EDNBKIP31Y4jl8", + "order_id": "order_DBJKIP31Y4jl8" + } + } +} +``` + +Know more about [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md). + + +## 1.6 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +## 1.7 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/chargeback/test-integration.md) diff --git a/llm-content/payments/payment-gateway/web-integration/custom/chargeback/build-integration-travel.md b/llm-content/payments/payment-gateway/web-integration/custom/chargeback/build-integration-travel.md new file mode 100644 index 00000000..3aa6da72 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/chargeback/build-integration-travel.md @@ -0,0 +1,1193 @@ +--- +title: 1. Travel Build Integration +description: Steps to integrate the Custom Checkout form on your website. +--- + +# 1. Travel Build Integration + +Follow the steps to integrate Custom Checkout in your site: + +**1.1** [Generate API Keys](#11-generate-api-keys). + +**1.2** [Create an Order in Server](#12-create-an-order-in-server). + +**1.3** [Fetch Payment Methods](#13-fetch-payment-methods). + +**1.4** [Invoke Checkout and Pass Order Id and Other Options to it](#14-invoke-checkout-and-pass-order-id-and). + + **1.4.1** [Include JavaScript code in your Webpage](#141-include-javascript-code-in-your-webpage). + + **1.4.2** [Instantiate Custom Checkout](#142-instantiate-custom-checkout). + + **1.4.3** [Submit Payment Details](#143-submit-payment-details). + +**1.5** [Store Fields in Your Server](#15-store-fields-in-your-server). + +**1.6** [Verify Payment Signature](#16-verify-payment-signature). + +**1.7** [Verify Payment Status](#17-verify-payment-status). + +## 1.1 Generate API Keys + +Follow these steps to generate API keys: + + + Watch this video to see how to generate API keys in the Test mode. + + +[Video: https://www.youtube.com/embed/VOn8JlGPG2I?si=WTAbAeLB3Hnp1n3r] + + + + + Watch this video to see how to generate API keys in the Live mode. + + +[Video: https://www.youtube.com/embed/Cer8UfBGX_E?si=Libr1RXoFSEDfY1c] + + + +1. Log in to your Dashboard with the appropriate credentials. +2. Select the mode (**Test** or **Live**) for which you want to generate the API key. + - **Test Mode**: The test mode is a simulation mode that you can use to test your integration flow. **Your customers will not be able to make payments in this mode**. + - **Live Mode**: When your integration is complete, switch to live mode and generate live mode API keys. In the integration, **replace test mode keys with live mode keys to accept customer payments**. +3. Navigate to **Account & Settings** → **API Keys** (under **Website and app settings**) → **Generate Key** to generate key for the selected mode. + +> **WARN** +> +> +> **Watch Out!** +> +> - After generating the keys from the Dashboard, download and save them securely. You can use only one set of API keys. If you do not remember your API keys, you must [regenerate them](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#regenerate-api-keys) from the Dashboard and update them wherever the previous keys were used for payment gateway integrations. +> - API Keys are universal; that is, they are applicable to all websites and apps that you have whitelisted for your Merchant ID. +> - **Do not share your API Key secret** with anyone or on any public platforms. **This can pose security threats to your Razorpay account**. +> - Once you generate the API Keys, only the **Key Id** is visible on the Dashboard, **not the Key secret**, as it can pose security threats to your Razorpay account. +> - Use the **Live API Keys** to accept live payments and the **Test API Keys** for test transactions. +> + +Once generated, you will be able to see the Key id, the date the key was created and the expiry date for the API Key on screen. + +> **WARN** +> +> +> **Watch Out!** +> +> Save your Key ID and Key Secret securely (never expose the Key Secret in client-side code). +> + +## 1.2 Create an Order in Server + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The order_id received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "partial_payment": false, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "line_items_total": 5000, + "line_items": [ + { + "sku": "1gr367", + "name": "Flight Ticket", + "description": "Flight tickets", + "quantity": 2, + "type": "travel", + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "travel": { + "mode": "flight", + "sub_type": "ticket", + "carrier_code": "AA123", + "departure_city": "UAM", + "departure_timestamp": "1234567890", + "arrival_city": "UAM", + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + }, + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + } + ] + } + }, + { + "sku": "1gr368", + "name": "Travel_Insurance", + "description": "Flight_Travel_Insurance", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "type": "travel", + "travel": { + "mode": "flight", + "sub_type": "insurance", + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + } + ] + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +``` + +```json: Response +{ + "id": "order_QU1wpqJfs7smfR", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "created_at": 1747055716 +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _optional_ + : `json object` Details about the customer/user. + + `name` _optional_ + : `string` The customer’s name. For example, Gaurav Kumar. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, +919000090000. + + `email` _optional_ + : `string` The customer’s email address. For example, gaurav.kumar@example.com. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the merchant platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the merchant platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + `true`: If the user is logged into the account. + `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the business. For example, 1234567890. + + `billing_address` _optional_ + : `Json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `sku` _optional_ + : `string ` Unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa (needs to be inclusive of tax). + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business is running any discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `travel` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `mode` _optional_ + : `string` The mode of travel. Possible values: + - `flight` + - `train` + - `bus` + - `cab` + - `others` + + `sub_type` _optional_ + : `string` The subtype of the line item. Possible values: + - `ticket` + - `meal` + - `insurance` + - `preferred_seat` + - `others` + + `carrier_code` _optional_ + : `string` Full flight number for this leg of the journey. For example, `AA123`. + + `departure_city` _optional_ + : `string` 3 letter IATA airport code, also known as an IATA location identifier, IATA station code. For example, CPH for Copenhagen. + + `departure_timestamp` _optional_ + : `integer` UNIX timestamp. For example, `1234567890`. + + `arrival_city` _optional_ + : `string` 3 letter IATA airport code, also known as an IATA location identifier, IATA station code. For example, CPH for Copenhagen + + `travellers` _optional_ + : `JSON object` Details associated with passengers/travellers/beneficiaries. + + `name` _optional_ + : `string` Name of the passenger/traveler/beneficiary. + + `email` _optional_ + : `string` Email address of the passenger/traveler/beneficiary. + + `age` _optional_ + : `integer` UNIX timestamp of the date of birth of the individual. For example, `1234567890`. + + `nationality` _optional_ + : `string` ISO3 country code to share the nationality of the individual. For example, `IND`. + + `class` _optional_ + : `string` Type of the flight ticket. Possible values: + - `economy` + - `premium_economy` + - `business` + - `SL` + - `3A` + - `2A` + - `1A` + - `CC` + - `others` + + `identity` _optional_ + : `JSON object` Identity details of the passenger/beneficiary. + + `tax_id` _optional_ + : `string` Tax ID number. For example, PAN number for India. + + `unique_national_id` _optional_ + : `string` National ID number. For example, Adhaar number for India. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of the `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `JSON object` Details of the campaign. *Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, PQR12453. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Example values: + - `google` + - `newsletter` + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: + - `cpc` + - `banner` + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +## 1.3 Fetch Payment Methods + +When creating a custom checkout form, display only the activated methods to the customer. Use the below methods to fetch all payments methods available to you: + +```js: Request +var razorpay = new Razorpay({ + key: '', + // logo, displayed in the popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}); +razorpay.once('ready', function(response) { + console.log(response.methods); +}) +```js: Response +{ + "methods": { + "entity": "methods", + "card": true, + "debit_card": true, + "credit_card": true, + "prepaid_card": true, + "card_networks": { + "AMEX": 0, + "DICL": 1, + "MC": 1, + "MAES": 1, + "VISA": 1, + "JCB": 1, + "RUPAY": 1, + "BAJAJ": 0 + }, + "amex": false, + "netbanking": { + ... + ... + "HDFC": "HDFC Bank", + "ICIC": "ICICI Bank" + ... + ... + }, + "wallet": { + "payzapp": true + }, + "emi": true, + "upi": true, + "cardless_emi": [], + "paylater": [], + "emi_subvention": "customer", + "emi_options": { + ... + ... + "ICIC": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 150000 + }, + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 150000 + } + ...// rest of the emi plans + ], + "HDFC": [ + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 300000 + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 300000 + } + ... + ...// rest of the emi plans + ] + } + } +} +``` + +Know more about [the various payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) offered by Razorpay. + +## 1.4 Invoke Checkout and Pass Order Id and Other Options to it + +### 1.4.1 Include JavaScript code in your Webpage + +Include the following script, preferably in the `` section of your page: + +```html: Index HTML + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Include the script from `https://checkout.razorpay.com/v1/razorpay.js` instead of serving a copy from your server. This allows the library's new updates and bug fixes to fit your application automatically. +> - We always maintain backward compatibility with our code. +> + +### 1.4.2 Instantiate Custom Checkout + +#### Single Instance on a Page + +```js: Invoke a Single Instance +var razorpay = new Razorpay({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}); +``` + +#### Multiple Instances on Same Page + +If you need multiple Razorpay instances on the same page, you can globally set some of the options: + +```js: Invoke Multiple Instances +Razorpay.configure({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}) +new Razorpay({}); // will inherit key and image from above. +``` + +#### Checkout Options + +While building a custom UI for accepting payments from your customers, you should be familiar with the fields supported in the `razorpay.js` script. + + +### Checkout Parameters + + + `key` _mandatory_ + : `string` API Key ID generated from **Dashboard** → **Account & Settings** → [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.999, pass the value as `295999`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per VISA Guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + + + + + + + `currency` _mandatory_ + : `string` The currency in which the payment should be made by the customer. For example, `INR`. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (April 2023). +> + + + + + + + + `description` _optional_ + : `string` Description of the product shown in the Checkout form. It must start with an alphanumeric character. + + `image` _optional_ + : `string` Link to an image (usually your business logo) shown in the Checkout form. Can also be a **base64** string, if loading the image from a network is not desirable. + + `order_id` _mandatory_ + : `string` Order ID generated via the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + `notes` _optional_ + : `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + + + + `method` _mandatory_ + : `string` The payment method used by the customer on Checkout. +Possible values: + - `card` (default) + - `upi` (default) + - `netbanking` (default) + - `wallet` (default) + - `emi` (default) + - `cardless_emi` (requires [approval](https://razorpay.com/support/#request)) + - `paylater` (requires [approval](https://razorpay.com/support/#request)) + - `emandate` (requires [approval](https://razorpay.com/support/#request)) + + + + + + + + + + `card` _mandatory if method=card/emi_ + : `object` The details of the card that should be entered while making the payment. + + `number` + : `integer` Unformatted card number. + + `name` + : `string` The name of the cardholder. + + `expiry_month` + : `integer` Expiry month for card in MM format. + + `expiry_year` + : `integer` Expiry year for card in YY format. + + `cvv` + : `integer` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `emi_duration` + : `integer` Defines the number of months in the EMI plan. + + + + + + + + + + `bank_account` _mandatory if method=emandate_ + : The details of the bank account that should be passed in the request. These details include bank account number, IFSC code and the name of the customer associated with the bank account. + + `account_number` + : `string` Bank account number used to initiate the payment. + + `ifsc` + : `string` IFSC of the bank used to initiate the payment. + + `name` + : `string` Name associated with the bank account used to initiate the payment. + + `bank` _mandatory if method=netbanking_ + : `string` Bank code. List of available banks enabled for your account can be fetched via [**methods**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#fetch-supported-methods). + + + + + + + + `wallet` _mandatory if method=wallet_ + : `string` Wallet code for the wallet used for the payment. Possible values: + - `payzapp` (default) + - `olamoney` (requires [approval](https://razorpay.com/support/#request)) + - `phonepe` (requires [approval](https://razorpay.com/support/#request)) + - `airtelmoney` (requires [approval](https://razorpay.com/support/#request)) + - `mobikwik` (requires [approval](https://razorpay.com/support/#request)) + - `jiomoney` (requires [approval](https://razorpay.com/support/#request)) + - `amazonpay` (requires [approval](https://razorpay.com/support/#request)) + - `paypal` (requires [approval](https://razorpay.com/support/#request)) + - `phonepeswitch` (requires [approval](https://razorpay.com/support/#request)) + + + + + + `provider` _mandatory if method=cardless_emi/paylater_ + : `string` Name of the cardless EMI provider partnered with Razorpay. + + Available options for Cardless EMI (requires [approval](https://razorpay.com/support/#request)): + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `zestmoney` + - `earlysalary` + - `walnut369` + + Available options for Pay Later: + - `lazypay` + - `paypal` + + `vpa` _mandatory if method=upi_ + : `string` UPI ID used for making the payment on the UPI app. + + +> **WARN** +> +> +> **Deprecation Notice** +> +> UPI Collect is deprecated effective 28 February 2026. This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [ migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md) to switch to UPI Intent. +> + + + + + +`callback_url` _optional_ +: `string` The URL to which the customer must be redirected upon completion of payment. The URL must accept incoming `POST` requests. The callback URL will have `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` as the request parameters for a successful payment. + +`redirect` _conditionally mandatory_ +: `boolean` Determines whether customer should be redirected to the URL mentioned in the `callback_url` parameter. This is mandatory if `callback_url` parameter is used. Possible values: + - `true`: Customer will be redirected to the `callback_url`. + - `false`: Customer will not be redirected to the `callback_url`. + +### 1.4.3 Submit Payment Details + +After creating an order and obtaining the customer's payment details, send the information to Razorpay to complete the payment. The data that needs to be submitted depends on the customer's payment method. You can do this by invoking `createPayment` method. + +Know more about [sample codes for various payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md). + +```js: createPayment with handler function +var data = { + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR",// Default is INR. We support more than 90 currencies. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_CuEzONfnOI86Ab',// Replace with Order ID generated in Step 4 + method: 'netbanking', + + // method specific fields + bank: 'HDFC' +}; + +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on('payment.success', function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + + razorpay.on('payment.error', function(resp){alert(resp.error.description)}); // will pass error object to error handler + +}) + +```js: createPayment with callback URL +var data = { + callback_url: 'https://www.examplecallbackurl.com/', + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR",// Default is INR. We support more than 90 currencies. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_CuEzONfnOI86Ab',// Replace with Order ID generated in Step 4 + method: 'netbanking', + + // method specific fields + bank: 'HDFC' +}; + +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + +}) +``` + +> **WARN** +> +> +> +> **Watch Out!** +> +> The `createPayment` method should be called within an event listener triggered by user action to prevent the popup from being blocked. For example: +> + +> ```js +> $('button').click( function (){ razorpay.createPayment(...) }) +> ``` +> + +> **INFO** +> +> +> +> **Handy Tips** +> +> - **Handler Function** +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL** +> +When you use a callback URL, Razorpay makes a post call to the callback URL, with the `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` in the response object of the successful payment (`razorpay_payment_id` and `razorpay_order_id`). +> + +## 1.5 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + +### Failure Response + +A failed payment returns an error response. + +```json: Sample Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect otp", + "field": null, + "source": "customer", + "step": "payment_authentication", + "reason": "invalid_otp", + "metadata": { + "payment_id": "pay_EDNBKIP31Y4jl8", + "order_id": "order_DBJKIP31Y4jl8" + } + } +} +``` + +Know more about [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md). + + +## 1.6 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +## 1.7 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/chargeback/test-integration.md) diff --git a/llm-content/payments/payment-gateway/web-integration/custom/chargeback/go-live-checklist.md b/llm-content/payments/payment-gateway/web-integration/custom/chargeback/go-live-checklist.md new file mode 100644 index 00000000..276e5f74 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/chargeback/go-live-checklist.md @@ -0,0 +1,48 @@ +--- +title: 3. Go-live Checklist +description: Check the go-live checklist for Razorpay Payment Gateway Custom Web integration. +--- + +# 3. Go-live Checklist + +Consider these steps before taking the integration live. + +## Accept Live Payments + +You can perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. However, make sure that you **swap the Test API Key with the Live Key**. + +Watch this video to generate an API Key in Live Mode. + +[Video: https://www.youtube.com/embed/30REpNtYSak] + +To generate an API Key in Live Mode: + +## Payment Capture + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git a/llm-content/payments/payment-gateway/web-integration/custom/chargeback/test-integration.md b/llm-content/payments/payment-gateway/web-integration/custom/chargeback/test-integration.md new file mode 100644 index 00000000..ed18ee7d --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/chargeback/test-integration.md @@ -0,0 +1,137 @@ +--- +title: 2. Test Integration +description: Steps to test if the custom Web integration was successful. +--- + +# 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## Next Steps + +[Step 3: Go Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/chargeback/go-live-checklist.md) diff --git a/llm-content/payments/payment-gateway/web-integration/custom/features.md b/llm-content/payments/payment-gateway/web-integration/custom/features.md new file mode 100644 index 00000000..6c0b3e21 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/features.md @@ -0,0 +1,111 @@ +--- +title: Features +description: List of features that will help you build a first-class payments experience with Razorpay Custom Checkout. +--- + +# Features + +Razorpay payment gateway comes with a range of features that help you build a first-class payment experience. + +- **Native OTP** + +Generate and verify OTP on the customers’ browser without redirecting them to their bank's ACS page for authentication. Since there is no redirection using the customers’ browser, it reduces the dependency on the customers’ browser network, drop-off rates, and provides a seamless experience for card transactions. Know more about [native OTP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/native-otp.md). + +- **OTP-Assist** + +Your customers gain a faster and enhanced checkout experience with Razorpay OTP auto-read and auto-submit. The system automatically reads the OTP your customers receive and auto-fills and auto-submits the OTP with the customer's consent. It prevents errors and the users do not need to navigate or interact with additional elements to complete verification, making the process seamless. This is available by default on Android SDK and not on iOS SDK. Know more about [OTP-Assist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/otp-assist.md). + +- **Offers** + +Attract your customers and improve sales by providing discounts or cashback on your website or apps. Using Razorpay Offers, you can completely control the discounts offered to your customers and restrict the payment methods to which the offers are applied. +Know more about [offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/custom-integration.md). + +- **CRED Eligibility Check** + +You can determine if the user is eligible for CRED Pay transactions on Custom Checkout using their contact number with the country code. +Know more about [CRED eligibility check](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/check-cred-eligibility.md). + +- **International Payments** + +You can accept payments from your customers in over 100 foreign currencies using Razorpay. Know more about [international payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md). + +- **Trusted Business** + +Embed the Trusted Business Widget on your website to instill credibility amongst site visitors. It reassures your customers that they can safely transact with your brand without worries. +Know more about [trusted badge](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features/trusted-business.md) and [trusted widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/trusted-business.md). + +- **Saved Cards** + +You can save customer card details as tokens with Razorpay. On a repeat visit, the customers can pay directly just by entering the card's CVV. Know more about [ saved cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +- **Guest Checkout Payments** + +Razorpay offers an Alternate Identifier (Alt id), a solution compliant with RBI guidelines for guest checkout payments. Alternate Identifier provides a smooth payment experience to customers. Know more about [guest checkout payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/alt-id-checkout.md). + +- **UPI Payments using Mobile Number** + +You can accept UPI payments using the phone number for the collect flow. Your customers can enter the mobile number linked to their UPI on checkout, open the respective UPI app, and complete the payment after entering the UPI PIN on their mobile devices. Know more about [UPI payments using mobile number](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#upi-payments-using-phone-number). + +- **Saved VPA** + +Razorpay enables you to save a customer's VPAs. The VPAs entered by the customer are stored and secured as tokens in Razorpay. The customers can select the saved VPA and complete the payment on subsequent visits. Know more about [saved VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-vpa.md). + +- **Validate VPA** + +If the selected payment method is `upi`, the user has to enter the `vpa` in the Checkout form. You can check if the entered VPA is valid or not. Know more about [validate VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/validate-vpa.md). + +- **Customer Fee-bearer** + +You can charge a convenience fee to your customers for the use of technology infrastructure. Convenience Fees are seamlessly added at Razorpay Checkout without disrupting the checkout experience for your customers. Know more about [convenience fees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/configuration/convenience-fees.md). + + +> **INFO** +> +> +> +> **Feature Request** +> +> This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> + +- **Third-party Validation** + +As per the SEBI guidelines, the customers must make transactions only from those bank accounts provided when they register with your business. + +You can comply with the SEBI guidelines for online payment collections by offering TPV integrations with major banks at the Checkout. Customers can make payments using netbanking. Know more about [third-party validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/custom-integration.md). + +- **Third-party Validation** + +As per the SEBI guidelines, the customers must make transactions only from those bank accounts provided when they register with your business. + +You can comply with the SEBI guidelines for online payment collections by offering TPV integrations with major banks at the Checkout. Customers can make payments using netbanking or UPI. UPI supports both collect and intent flows. Know more about [third-party validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/custom-integration.md). + +- **Checkout Timeout** + +You set a timeout on Checkout. After the specified time limit, the customer will not be able to use Checkout; hence, the payment will terminate after the set time. Know more about [checkout timeout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md#checkout-options). + +- **Downtime Communication on Checkout** + +Downtimes updates provide an overview of various downtimes grouped across different payment methods on your [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/downtime-updates.md). You can view the latest status of downtimes for netbanking, cards, and UPI at any point. You can also view instrument details for downtimes, such as Cards Network, Issuers, Banks, and UPI handles. Know more about the [Payments Downtime API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Additionally, you can also temporarily prevent customers from accessing payment instruments, which are bound to fail on checkout. For example, if all payments made via Netbanking are bound to fail, you can show the option in a disabled state on checkout until it recovers. However, they can select an alternative instrument that is more likely to work to complete the payment successfully. +> diff --git a/llm-content/payments/payment-gateway/web-integration/custom/features/alt-id-checkout.md b/llm-content/payments/payment-gateway/web-integration/custom/features/alt-id-checkout.md new file mode 100644 index 00000000..e2894c95 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/features/alt-id-checkout.md @@ -0,0 +1,93 @@ +--- +title: Enable Guest Checkout Payments With Alt ID +description: Use Razorpay Alt ID feature and comply with RBI guidelines for guest checkout payments. +--- + +# Enable Guest Checkout Payments With Alt ID + +Razorpay offers Alternate Identifier (Alt id), a solution that is compliant with RBI guidelines for guest checkout payments. Alternate Identifier provides a smooth payment experience to customers. + +## Guest Checkout Payments Guidelines + +According to the RBI circular, if a customer manually enters the card details during guest checkout (without saving the card information), the following guidelines must be adhered: + +- Besides the card issuer and the network, the merchant or Payment Aggregator (PA) involved in the settlement of such transactions can save the data of a particular transaction for a maximum period of T+4 days (T being the transaction date) or till the settlement date, whichever is earlier. This data shall be used only for settlement of such transactions and must be deleted after that. + +- Entities in the transaction/payment chain shall deploy an alternate solution for handling guest checkout transactions by **October 31, 2023**. + +For RBI-compliant Guest Checkout payments, Razorpay will use an Alt id. Alt id is a unique code provided by card networks and issuers. It replaces the actual card number and supports all post-transaction activities such as refunds, settlements, and dispute handling. + +> **WARN** +> +> +> **Watch Out!** +> +> Alt id is not applicable for tokenised transactions. In such cases, as per the new tokenisation guidelines, the tokenised card number and cryptogram are used throughout the transaction's lifecycle. +> + +## FAQs + + +### 1. Is Razorpay compliant with RBI's guest checkout guidelines? + + Yes, Razorpay complies with RBI guidelines, facilitating guest checkout payments with the secure Alt id solution. + + + +### 2. What actions should I be taking to be compliant? + + Just like most of our features, you are automatically compliant with RBI's guest checkout regulations. + + + +### 3. I am a Juspay merchant. What should I do to ensure compliance? + + Juspay and Razorpay will take care of compliance on behalf of all Juspay merchants. No additional steps are required from your end. + + + +### 4. I use Razorpay Optimizer. How can I ensure that I am compliant? + + On behalf of all Optimizer merchants, Razorpay and your payment aggregator will take care of compliance. No additional steps are required from your end. + + + +### 5. I have a direct integration with networks for tokenisation. How can I ensure compliance? + + In this case, you can consider either of the following: + - Approach 1 (Recommended). You continue to send us the card details. Razorpay will automatically: + - Generate Alt id in collaboration with networks. + - Process payments using Alt id. + You can continue to tokenise your card in this flow. + - Approach 2. You can generate an Alt id with networks and initiate a payment with Razorpay using these Alt details. For API details on this approach, please reach out to our [support team](https://razorpay.com/support/#request). + + +> **INFO** +> +> +> **Handy Tips** +> +> As per NPCI's specifications, Razorpay (payment processor) will be the token requestor for all Rupay-routed payments on Razorpay. In this case, you must pass clear card details to Razorpay. +> + + + + +### 6. What is Alt id? + + Alt id is a unique code provided by card networks and issuers. It replaces the actual card number and supports all post-transaction activities like refunds, settlements, and dispute handling. + + + +### 7. What are guest checkout payments? + + A guest checkout payment occurs when the cardholder enters the card details directly without the intention of saving the details. This can happen when: + - The card is not saved, and the user does not intend to save it. + - The card is being saved for the first time. + RBI has prohibited Payment Aggregators (PAs), Acquires, and Acquirer TSPs (gateways) from using the card number for guest checkout transactions, ensuring security and compliance. + + + +### 8. How do these changes affect the cardholder? + + With the introduction of Alt id and Alt cryptogram for each payment, we prioritise cardholder security. Alt id creates a safer environment for digital card payments. This means that Alt id enhances the benefits Razorpay offers to businesses and their users, contributing to a more secure and robust ecosystem for digital payments. diff --git a/llm-content/payments/payment-gateway/web-integration/custom/features/async-payments.md b/llm-content/payments/payment-gateway/web-integration/custom/features/async-payments.md new file mode 100644 index 00000000..50307039 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/features/async-payments.md @@ -0,0 +1,33 @@ +--- +title: Create Async Payment +description: Create Async Payments for Custom Web Integration. +--- + +# Create Async Payment + +The `createPayment` method must be called synchronously within user-initiated action. Hence, this method doesn't work if the pop-up blocker is enabled. You can decouple pop-up opening and payment creation if you need to perform any asynchronous operation such as sending an AJAX request before starting payment. Check the code below: + +```js +rp.createPayment(data, { + paused: true, + message: 'Confirming order..' +}); +``` +After you make AJAX requests, emit resume or cancel the event using this code: + +```js +if(ajax_success) { + rp.emit('payment.resume'); +} else { + rp.emit('payment.cancel'); +} +``` + +## Format of Data Object and Success/Error Handlers + +`payment.resume` +: Event initiates the usual payment process and emits `payment.success` +or `payment.error` events according to the payment result. + +`payment.cancel` +: Razorpay will not initiate the payment. diff --git a/llm-content/payments/payment-gateway/web-integration/custom/features/check-cred-eligibility.md b/llm-content/payments/payment-gateway/web-integration/custom/features/check-cred-eligibility.md new file mode 100644 index 00000000..fd8fc6cc --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/features/check-cred-eligibility.md @@ -0,0 +1,45 @@ +--- +title: Check CRED Eligibility +description: Check if the user is eligible for CRED Pay using the Check CRED Eligibility API. +--- + +# Check CRED Eligibility + +You can use the API given below to determine if the user is eligible for CRED Pay transactions on Custom Checkout. + +> **WARN** +> +> +> **Watch Out!** +> +> You should provide the user's contact number with the country code to check the eligibility. +> + +Following is the sample code for request and response. + +```js: Request +var razorpay = new Razorpay({ + key: '', +}); +razorpay.checkCREDEligibility("+918888888888") + .then((response) => { + + // Contact is CRED Eligible + + }) + .catch((error) => { + // Contact is CRED Ineligible + }); +```js: Response +{ + "success": true, + "data": { + "state": "ELIGIBLE", + "tracking_id": , + "offer": { + "description": + } + }, + "status_code": 200 +} +``` diff --git a/llm-content/payments/payment-gateway/web-integration/custom/features/cvv-less-flow.md b/llm-content/payments/payment-gateway/web-integration/custom/features/cvv-less-flow.md new file mode 100644 index 00000000..3fc66993 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/features/cvv-less-flow.md @@ -0,0 +1,89 @@ +--- +title: CVV-less Flow for Card Payments +description: Save customer card details as tokens and enable CVV-less payment flows for customers via Razorpay. +--- + +# CVV-less Flow for Card Payments + +CVV-less card payments are recently introduced for saved cards where the card-holder can complete a payment without the card CVV. CVV-less card payments are simple, fast and secure, and do not require a memory test of your customers. + +## Recommended Checkout Experience + +To provide your customers with a faster and more seamless payment experience, we recommend removing the CVV field from your checkout flow. +- Removing the CVV field encourages customers to use their saved (tokenised) cards, making payments more convenient and frictionless. +- Alternatively, you can also make CVV optional. You can choose to retain the CVV box and mark it as optional, with a clear message such as “CVV not required for tokenised cards”. + +> **INFO** +> +> +> +> **Note** +> +> If you are already integrated with Razorpay Standard Checkout, these UI changes are handled automatically and no additional action is required on your part. +> + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Offering CVV-less saved card flows to your customers can increase the conversion rate by 4%. +> + +![CVV Less Card Payment Flow GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cvv-less-otp-less.gif.md) + +## Saved Card Payment without CVV + +```java: Java + + Pay + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg", + name: "Crime Master Gogo", + }); + var data = { + amount: 6666, + currency: "INR", + email: "gaurav.kumar@example.com", + order_id: "order_ISsp1ekSCHgoAw", + contact: 9123456780, + notes: { + address: "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + customer_id: "cust_1Aa00000000001", + token: "token_4zwefDSCC829ma", + method: "card", + card[cvv]: '123' + }; + + document.getElementById("rzp-button1").onclick = function(){ + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id) + }); + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); +} + +``` + +#### Request Parameters + +`card` _optional_ +: `string` The card’s CVV. + +> **INFO** +> +> +> **Handy Tips** +> +> CVV-less payments on RuPay is an on-demand feature for standard checkout merchants. Reach out to our [support team](https://razorpay.com/support/#request) for more information. +> + +### Related information + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/cvv-less-flow.md#frequently-asked-questions-faqs) diff --git a/llm-content/payments/payment-gateway/web-integration/custom/features/native-otp.md b/llm-content/payments/payment-gateway/web-integration/custom/features/native-otp.md new file mode 100644 index 00000000..33043b7c --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/features/native-otp.md @@ -0,0 +1,481 @@ +--- +title: Native OTP +description: Integrate the Razorpay Native OTP feature with Custom Checkout to combat customer payment issues such as payment failures due to low internet speeds and bank page redirects. +--- + +# Native OTP + +Native OTP helps generate and verify OTP on the customers’ browser without redirecting them to their bank's ACS page for authentication. Since there will be no redirection using the customers’ browser, it will reduce the dependency on the customers’ browser network, reduce the drop-off rates, and give a seamless consumer experience for card transactions. + +## Advantages + +- Increase success rates by up to 4%. +- Reduce payment failures due to low internet speeds. +- Avoid failures due to redirects to bank pages. +- Offer a consistent experience on mobile and web checkout. + +## Prerequisites + +- Verify that you are PCI compliant to accept and process customers' card details. Know more about [PCI compliance](https://www.pcicomplianceguide.org/faq/#1). The compliance certificate should be updated as per the yearly renewal cycle. +- Raise a request with our [Support](https://razorpay.com/support/#request) team to enable this feature on your Checkout page. +- Know about the [Razorpay Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md). +- Integrate with [Razorpay Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md). + +## Integration Steps +Follow the integration steps given below: + +**1.1** [Create an Order in Server](#11-create-an-order-in-server). + +**1.2** [Integrate the getCardFlows Method](#12-integrate-the-getcardflows-method). + +**1.3** [Create a Payment](#13-create-a-payment). + +**1.4** [Display OTP UI](#14-display-otp-ui). + +**1.5** [Perform OTP Authentication](#15-perform-otp-authentication). + +**1.6** [Verify Payment Signature](#16-verify-payment-signature). + +### 1.1 Create an Order in Server + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The order_id received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "partial_payment": true, + "first_payment_min_amount": 23000 +}' +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => 'INR'// [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies).) +]); +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", "INR"); +Order order = client.Order.Create(options); +```ruby: Ruby +options = amount: 50000, currency: 'INR', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "INR", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +#### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Response Parameters + +Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) table. + +#### Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +### 1.2 Integrate the getCardFlows Method + +Validating the authentication type is critical. This will help you set the value of `auth_type` during [payment creation](#13-create-a-payment). + +> **WARN** +> +> +> **Watch Out!** +> +> If the value of `auth_type` is sent as an OTP for a BIN that is not validated successfully, the transaction will fail. +> + + +Use the `getCardFlows` method given below to check for the available flows on a given card number: + +```java: getcardsflow +razorpay.getCardFlows('438628', (flows) => { + console.log(flows.otp); + }); +``` +Use the `getCardFeatures` method given below to get the card features: + +```java: getCardFeatures +{ + "flows": { + "otp": true, + "recurring": false, + "iframe": false, + "emi": true + }, + "type": "credit", + "issuer": "HDFC", + "network": "Diners Club", + "cobranding_partner": null, + "country": "IN", + "http_status_code": 200 +} +``` + +### 1.3 Create a Payment + +While initiating payment for the card payment method, you must pass an additional parameter within the create payment function if the card flow function response is `otp = true`. + +```java: Create a Payment +function createRazorpayPayment (data) { + rzp.createPayment(data, { + nativeotp: true + }); +} +``` +### 1.4 Display OTP UI + +Use the sample code given below to display OTP UI to your customers: + +```java: OTP UI +rzp.on('payment.otp.required', function (data) { + // Show OTP UI +// data = { +// "metadata": { +// "issuer": "HDFC", +// "network": "MC", +// "last4": "9275", +// "iin": "512967" +// }, +// "next": [ +// "otp_submit", +// "otp_resend" +// ], +// "redirect": "https://api.razorpay.com/v1/payments/pay_E1xQsBuIZ02..." +// } +}); +``` + +> **INFO** +> +> +> **Handy Tips** +> +> - If you want to redirect the user to the bank ACS page, you should use the URL present in the response for creating a payment. +> - To get post-transaction feedback from the bank page to your website, the callback URL needs to be defined while creating a payment. Razorpay will send the response to the defined callback URL after payment success or failure. +> + +### 1.5 Perform OTP Authentication + +After entering the OTP, the customer can perform either: + +- [OTP Submit](#otp-submit) +- [OTP Resend](#otp-resend) +- [OTP Cancel](#otp-cancel) + +#### OTP Submit + +OTP submission is a part of the payment authentication process where the customer submits the OTP received through your application's frontend. + +The customer receives the OTP for card payments via their preferred notification medium - SMS or email. + +> **INFO** +> +> +> **Handy Tips** +> +> Do not perform any validation on the length of the OTP since this can vary across banks. The OTP, however, should not be blank. +> + +Use the following function to enable customers to submit OTP + +```java: OTP Submit +function submitRazorpayOTP (otp) { + rzp.submitOTP(otp); +} +``` + +#### OTP Resend + +There can be situations when customers must re-enter the OTP sent to them. The issuing bank determines the number of retries that the user is allowed. Given below is the sample code of the OTP Resend function: + +```java: OTP Resend +function resendRazorpayOTP () { + rzp.resendOTP(); +} +``` + +#### OTP Cancel + +Customers can cancel the payment based on their requirements. Given below is the sample code of the OTP Cancel function: + +```java: OTP Cancel +function cancelRazorpayPayment () { + rzp.emit('payment.cancel'); +} +``` + +### 1.6 Verify Payment Signature + +Once the payment process is completed, Razorpay will make a `POST` request to the `callback_url` on whether the payment was a success or a failure. + +You can easily verify the payment signature using our SDKs: + +```java: Java +String secret = ""; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); +```php: PHP +use Razorpay\Api\Api; +$api = new Api($key_id, $key_secret); +$attributes = array('razorpay_signature' => '23233', 'razorpay_payment_id' => '332' , 'razorpay_order_id' => '12122'); +$order = $api->utility->verifyPaymentSignature($attributes) +```ruby: Ruby +require 'razorpay' +Razorpay.setup('key_id', 'key_secret') +payment_response = { + 'razorpay_order_id': '12122', + 'razorpay_payment_id': '332', + 'razorpay_signature': '23233' +} + +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary attributes = new Dictionary(); + + attributes.Add("razorpay_payment_id", paymentId); + attributes.Add("razorpay_order_id", Request.Form["razorpay_order_id"]); + attributes.Add("razorpay_signature", Request.Form["razorpay_signature"]); + + Utils.verifyPaymentSignature(attributes); +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification } = require('./dist/utils/razorpay-utils'); + +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + +If `razorpay_payment_id` is returned, the payment is successfully created and verified. + +> **INFO** +> +> +> **Handy Tips** +> +> A successful transaction results in creating the `razorpay_order_id` in your database. You can mark the corresponding transaction at your end as **paid** and notify the customer of the same. +> + +#### Sample Code + +You can use the sample code given below: + +```java: Sample Code + + + + + + Document + + + + Pay Rs. 5000 + + Payment Method + + + Pay + pop-up top + + + + var razorpay = new Razorpay({ + key: 'YOUR_KEY_ID', + image: + 'https://www.carlogos.org/car-logos/lamborghini-logo-1000x1100-show.png', + callback_url: 'https://www.google.com/', + redirect: true, + }); + + razorpay.once('ready', function (response) { + // console.log(response.methods); + // document.getElementById("method").innerHTML = JSON.stringify(response.methods); + }); + + razorpay.getCardFlows('438628', (flows) => { + console.log(flows.otp); + }); + + var data = { + amount: 100, + email: 'gaurav.kumar@example.com', + contact: '9000090000', + //"order_id": "order_JyhxBsMXOOfJ4c", + method: 'card', + 'card[name]': 'Gaurav Kumar', + 'card[number]': '4386289407660153', + 'card[cvv]': '566', + 'card[expiry_month]': '10', + 'card[expiry_year]': '26', + }; + + var btn = document.querySelector('#rzp-button1'); + btn.addEventListener('click', function () { + razorpay.createPayment(data, { + nativeotp: true, + }); + + razorpay.on('payment.otp.required', function (data) { + // Show OTP UI + console.log(data); + }); + + // razorpay.submitOTP('1234'); + //razorpay.resendOTP(); + //razorpay.emit('payment.cancel'); + }); + + var btn1 = document.querySelector('#rzp-button2'); + btn1.addEventListener('click', function () { + razorpay.focus(); // will bring popup to top + }); + + +``` diff --git a/llm-content/payments/payment-gateway/web-integration/custom/features/pop-up.md b/llm-content/payments/payment-gateway/web-integration/custom/features/pop-up.md new file mode 100644 index 00000000..73e992ba --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/features/pop-up.md @@ -0,0 +1,25 @@ +--- +title: Custom Web Integration - Bring a Popup to the Front +description: Display a pop-up as a visual reminder to the customer indicating that the payment is in progress. +--- + +# Custom Web Integration - Bring a Popup to the Front + +You can bring a pop-up on the screen by calling the `focus` method. This helps as a visual reminder to the customer that the payment is ongoing. + +#### Sample Code + +```html + +var rp = new Razorpay(..); +... + +// after some time +Processing Payment... +Take me back to payment + + $('button').click(function(){ + rp.focus(); // will bring popup to top + }) + +``` diff --git a/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards-old.md b/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards-old.md new file mode 100644 index 00000000..b917b458 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards-old.md @@ -0,0 +1,443 @@ +--- +title: Save customer card details on Custom Checkout +description: Securely store the card details of the customer as tokens, which can be used for repeat transactions made by the customer. +--- + +# Save customer card details on Custom Checkout + +You can save sensitive card information entered by the customer as "tokens" in Razorpay. On a repeat visit, the customers will be able to pay directly just by entering the cvv of the card. This saves the customer the hassle of entering the card details again for every transaction. + +## Prerequisites + +- Sign up for a Razorpay account. +- [Generate the API Keys on Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys). + +Watch the video to see how to generate API key in Test Mode. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +- [Integrate with our Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). + +> **WARN** +> +> +> **PCI DSS Certification** +> +> A customer's payment information should never reach your servers, unless you are PCI DSS certified. +> + +## Workflow + +1. [Enable Flash Checkout on Dashboard](#step-1-enable-flash-checkout-on-razorpay-dashboard). +2. [Create a Customer](#step-2-create-a-customer). +3. [Save Card Details on Checkout](#step-3-save-the-card-details-on-checkout). +4. [Fetch all Tokens of Customer](#step-4-fetch-all-tokens-of-customer). +5. [Create Payments using Saved Card](#step-5-create-payments-using-saved-card). + +### Step 1: Enable Flash Checkout on Dashboard + +Flash Checkout enables you to save customer card details right on Standard Checkout. Authentication is done using PCI DSS compliant technology to ensure that all the card information is stored with maximum possible security. + +**Read more:** [Learn more about Flash Checkout.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#flash-checkout) + +Watch this video to see how to enable or disable Flash Checkout: + +[Video: https://www.youtube.com/embed/Vm_8yjjmN3I] + +### Step 2: Create a Customer + +Create a customer whose card details should be saved, from the Dashboard or using the Customers API. You can create customers with basic details such as `email` and `contact` using the following endpoint: + +The following endpoint creates or add a customer with basic details such as name and contact details. You can use this API for various Razorpay Solution offerings. + +/customers + +```cURL: Curl + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name",""); +customerRequest.put("contact",""); +customerRequest.put("email",""); +customerRequest.put("fail_existing", "0"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} + +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->create(array('name' => '', 'email' => '','contact'=>'','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", ""); +options.Add("contact", ""); +options.Add("email", ""); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +``` + +```json: Success Response +{ + "id" : "cust_1Aa00000000004", + "entity": "customer", + "name" : "", + "email" : "", + "contact" : "", + "gstin": null, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at ": 1234567890 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } +} +``` + +#### Request Parameters + +`name` _optional_ +: `string` Customer's name. Alphanumeric value with period (.), apostrophe ('), forward slash (/), at (@) and parentheses are allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact ` _optional_ +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email ` _optional_ +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`fail_existing` _optional_ +: `string` Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + +`gstin` _optional_ +: `string` Customer's GST number, if available. For example, `29XAbbA4369J1PA`. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +**Read More**: [Learn more about Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +### Step 3: Save the Card Details on Checkout + +While making the payment, the customer enters the card details in the Checkout form. If the card details should be saved by Razorpay, pass `customer_id` and `save=1` along with the other parameters into the Checkout form. + +```js: Custom Checkout + + Pay + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg", + name: "Crime Master Gogo", + }); + var data = { + amount: 6666, + currency: "INR", + email: "gaurav.kumar@example.com", + contact: 9123456780, + notes: { + address: "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + customer_id: "cust_1Aa00000000001", + save: 1, + method: "card", + 'card[number]': '4242424242424242', + 'card[expiry_month]': '11', + 'card[expiry_year]': '23', + 'card[cvv]': '123', + 'card[name]': 'Gaurav Kumar' + }; + + document.getElementById("rzp-button1").onclick = function(){ + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id) + }); + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); +} + +``` + +Once the payment is complete, token is generated with these card details. + +#### Request Parameters + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer. This can be obtained from the response of the previous step. + +`save` _mandatory_ +: `integer` Specifies if the card details should be stored as tokens. Possible values are: + - `1`: Saves the card details. + - `0` (default): Does not save the card details. + +`card` +: The details of the card that should be entered while making the payment. + + `number` _mandatory_ + : `integer` Unformatted card number. + + `name` _mandatory_ + : `string` The name of the cardholder. + + `expiry_month` _mandatory_ + : `integer` Expiry month for card in MM format. + + `expiry_year` _mandatory_ + : `integer` Expiry year for card in YY format. + + `cvv` _mandatory_ + : `integer` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +**Read more:** [Learn about the other Checkout parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md) for web integration. + +### Step 4: Fetch all Tokens of Customer + +To display all the tokens created for a customer, fetch them as follows: + +/customers/:customer_id/tokens + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/:customer_id/tokens +```json: Response +{ + "entity" : "collection", + "count" : 2, + "items" : [ + { + "id" : "token_4lsdksD31GaZ09", + "entity" : "token", + "method" : "card", + "card" : { + "entity" : "card", + "name" : "Gaurav Kumar", + "last4" : 1111, + "network" : "Visa", + "expiry_month" : 12, + "expiry_year" : 2021, + "emi" : true, + "issuer" : "HDFC" + }, + "used_at" : 1473765044, + "created_at" : 1473765044 + }, + { + "id" : "token_4zwefDSCC829ma", + "entity" : "token", + "method" : "card", + "card" : { + "entity": "card", + "name": " Gaurav Kumar", + "network": "MasterCard", + "international": false, + "expiry_month": 9, + "expiry_year": 2020, + "last4" : 1221, + "emi": false + }, + "used_at": null, + "created_at" : 1473765043 + } + ] +} +``` + +#### Path Parameter + +`customer_id` +: `string` Unique identifier of the customer. + +### Step 5: Create Payments using Saved Card + +After the card is saved, for every online transaction thereafter, customers can quickly complete the payment by entering only the `cvv`. If the card details should be saved by Razorpay, the following additional parameters should be passed into the Checkout form. + +```js: Custom Checkout + + Pay + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg", + name: "Crime Master Gogo", + }); + var data = { + amount: 6666, + currency: "INR", + email: "gaurav.kumar@example.com", + contact: 9123456780, + notes: { + address: "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + customer_id: "cust_1Aa00000000001", + token:"token_4zwefDSCC829ma", + method: "card", + 'card[cvv]': '123' + }; + + document.getElementById("rzp-button1").onclick = function(){ + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id) + }); + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); +} + +``` + +#### Request Parameters + +`customer_id` +: `string` Unique identifier of the customer. + +`token` +: `string` Token of the saved method. This is generated by Razorpay. + +`card[cvv]` +: `integer` cvv for the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +### Delete Tokens + +In situations where your customers want to remove the saved cards from their respective accounts, you can do the same by deleting the tokens at your end. + +/customers/:customer_id/tokens/:token_id + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000001/tokens/token_4zwefDSCC829ma +```json: Response +{ + "deleted": true +} +``` + +#### Path Parameters + +`customer_id` +: `string` Unique identifier of the customer. + +`token` +: `string` Token of the saved method that needs to be deleted. + +Customers can [delete their card details by visiting this link and following the on-screen instructions](https://razorpay.com/flashcheckout/manage/). diff --git a/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards.md b/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards.md new file mode 100644 index 00000000..57dc55a9 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards.md @@ -0,0 +1,36 @@ +--- +title: Save Customer Card Details as Network Tokens +description: Securely store the customer's card details as network tokens, which can be used for repeat transactions made by the customer. +--- + +# Save Customer Card Details as Network Tokens + +You can save sensitive card information entered by the customer as `tokens`. On a repeat visit, the customers will be able to pay directly just by entering the CVV of the card. This saves the customer the hassle of entering the card details again for every transaction. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## RBI Guidelines + +According to [RBI Guidelines](https://www.rbi.org.in/scripts/FS_Notification.aspx?Id=11449&fn=9&Mode=0), only card networks can tokenise cards. **Tokenisation is permitted only after the customer provides explicit consent**. The process for card tokenisation differs on a case-to-case basis. + +## Card Tokenisation Use Cases + +- [Business Seeks Customer Consent, Saves Card Details with Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-1.md). +- [Razorpay Seeks Customer Consent on Behalf of Business](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-2.md). +- [Business Seeks Consent from Some Customers Only](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-3.md). + +### Related Information + +[Razorpay TokenHQ APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/apis.md) diff --git a/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-1.md b/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-1.md new file mode 100644 index 00000000..da394bcc --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-1.md @@ -0,0 +1,622 @@ +--- +title: Business Seeks Customer Consent, Saves Card Details With Razorpay +description: Procedure to follow if you plan to collect customer consent on your UI. +--- + +# Business Seeks Customer Consent, Saves Card Details With Razorpay + +Given below are the integration steps to save cards as tokens with card networks. + +## New Card Workflow + +New cards are the cards that are not saved with Razorpay previously. Follow the below integration steps: + +1. [Changes on checkout UI.](#1-checkout-ui) +2. [Changes in integration code.](#2-integration-code) + +## 1. Checkout UI + +You should modify your user interface to explicitly receive customer consent for saving card details as tokens with card networks. + +## 2. Integration Code + +### 2.1 Create a Customer + +You can create customers using the [Create a Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). The `customer_id` received in the response should be passed in the Create Payment request. + +### 2.2 Create Payment + +Use the following code to **Create a Payment**. + +```js: Custom Checkout + + Pay + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg", + name: "", + }); + var data = { + amount: 6666, + currency: "", + order_id: "order_ISsp1ekSCHgoAw", + email: "", + contact: , + notes: { + address: "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + customer_id: "cust_1Aa00000000001", + save: 1, + method: "card", + card[number]: '4242424242424242', + card[expiry_month]: '11', + card[expiry_year]: '23', + card[cvv]: '123', + card[name]: '' + }; + + document.getElementById("rzp-button1").onclick = function(){ + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id) + }); + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); +} + +``` + +#### Request Parameters + +`save` _mandatory_ +: `integer` Determines whether Razorpay should save customer card details as tokens with the card networks. Possible values: + - `1`: Razorpay should save customer card details as tokens with the card networks. This will work only if explicit customer consent has been received from the customer. + - `0`: Razorpay should not save the card details. + +`card` _mandatory_ +: The details of the card that should be entered while making the payment. + + `number` + : `string` Unformatted card number. + + `name` + : `string` The name of the cardholder. + + `expiry_month` + : `string` Expiry month for card in MM format. + + `expiry_year` + : `string` Expiry year for card in YY format. + + `cvv` + : `string` The card's CVV number. + + + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer. This can be obtained from the response of the previous step. + +### 2.3 Fetch all Tokens of Customer + +Fetch all tokens created for a customer using the API given below. + +/customers/:customer_id/tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/:customer_id/tokens +```php: PHP +$api = new Api($key_id, $secret); +$api->customer->fetch($customerId)->tokens()->all(); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) +instance.customers.fetchTokens(customerId) +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetch(customerId).fetchTokens +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +List customer = instance.customers.fetchTokens(customerId); +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) +```json: Response +{ + "entity" : "collection", + "count" : 2, + "items" : [ + { + "id" : "token_4lsdksD31GaZ09", + "entity" : "token", + "method" : "card", + "card" : { + "entity" : "card", + "last4" : 1111, + "network" : "Visa", + "emi" : true, + "issuer" : "HDFC", + "international": false, + "sub_type": "consumer", + "token_iin": "453335", + "type": "credit" + }, + "used_at" : 1473765044, + "created_at" : 1473765044, + "status": "active", + "compliant_with_tokenisation_guidelines": true // This is for Indian Cards only + }, + { + "id" : "token_4lsdksD31GaZ08", + "entity" : "token", + "method" : "card", + "card" : { + "entity" : "card", + "last4" : 1111, + "network" : "Visa", + "emi" : true, + "issuer" : "HDFC", + "international": false, + "sub_type": "consumer", + "token_iin": "453325", + "type": "credit" + }, + "used_at" : 1473765044, + "created_at" : 1473765044, + "status": "active", + "compliant_with_tokenisation_guidelines": true // This is for Indian Cards only + } + ] +} +``` + +#### Path Parameter + +`customer_id` +: `string` Unique identifier of the customer. + +#### Response Parameters + +`id` +: `string` The unique identifier of the Razorpay token. + +`entity` +: `string` The name of the entity. Here, it is `token`. + +`method` +: `string` The type of saved instrument. In the current use case, the value is `card`. + +`card` +: `object` The customer card details. + + `last4` + : `string` The last 4 digits of the tokenised card. + + `network` + : `string` The card network. Possible values: + - `Visa` + - `RuPay` + - `MasterCard` + - `American Express` + - `Diners Club` + - `Maestro` + - `JCB` + - `Union Pay` + + `issuer` + : `string` The 4-character issuer code unique to each issuing bank in India. For example, `HDFC`, `SBIN` and so on. + + `type` + : `string` The type of card. Possible values: + - `credit` + - `debit` + - `prepaid` + + `international` + : `boolean` Indicates whether the card is international (issued outside India) or domestic. Possible values: + - `true`: The card is international. + - `false`: The card is domestic. + + + `emi` + : `boolean` Indicates whether the card is eligible for EMI payments or not. Possible values: + - `true`: The card is eligible for EMI payments. + - `false`: The card is not eligible for EMI payments. + + + `sub_type` + : `string` The card sub_type for the given IIN. Pricing of card payment may change on the basis of card type. Possible values: + - `consumer` + - `business` + - `unknown` + +`compliant_with_tokenisation_guidelines` +: `boolean` Indicates whether the token is compliant with the RBI guidelines. Possible values: + - `true`: The token is compliant with RBI guidelines. + - `false`: The token is not compliant with RBI guidelines. + +`status` +: `string` The overall status for the token. Possible values: + - `initiated`: The token attains this state after Razorpay has received the tokenisation request and is working with token service providers for creating the token. + - `active`: The token attains this state if the token is activated for at least one of the token service providers. + - `suspended`: The token attains this state if: +- The token is not activated for any one of the token service providers. +- The token is suspended for at least one of the token service providers. + - `deactivated`: The token attains this state if the token is not active/suspended for any one of the token service providers and is deactivated for at least one token service provider. Know about the complete list of [token states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/token-lifecycle.md). + +### 2.4 Fetch Card Properties of an Existing Token + +Use this API to retrieve card details such as network, issuer and so on for a given token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/customers/:customer_id/tokens/:token_id + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = razorpay.customers.fetchToken(customerId, tokenId) + +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.fetch(customerId, tokenId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->fetch($tokenId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).fetchToken(tokenId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchToken(customerId, tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Fetch("", "", nil, nil) + +```json: Response +{ + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "method": "card", + "card": { + "entity": "card", + "last4": 0153, + "network": "Visa", + "emi": true, + "issuer": "HDFC", + "international": false, + "sub_type": "consumer", + "token_iin": "453335", + "type": "credit" + }, + "used_at": 1473765044, + "created_at": 1473765044, + "status": "active", + "compliant_with_tokenisation_guidelines": true // This is for Indian Cards only +} +``` + +### Path Parameter + +`customer_id` +: `string` Unique identifier of the customer. + +`token_id` +: `string` Unique identifier of the token. + +#### Response Parameters + +`id` +: `string` The unique identifier of the Razorpay token. + +`entity` +: `string` The name of the entity. Here, it is `token`. + +`method` +: `string` The type of saved instrument. In the current use case, the value is `card`. + +`card` +: `object` The customer card details. + + `last4` + : `string` The last 4 digits of the tokenised card. + + `network` + : `string` The card network. Possible values: + - `Visa` + - `RuPay` + - `MasterCard` + - `American Express` + - `Diners Club` + - `Maestro` + - `JCB` + - `Union Pay` + + `issuer` + : `string` The 4-character issuer code unique to each issuing bank in India. For example, `HDFC`, `SBIN` and so on. + + `type` + : `string` The type of card. Possible values: + - `credit` + - `debit` + - `prepaid` + + `international` + : `boolean` Indicates whether the card is international (issued outside India) or domestic. Possible values: + - `true`: The card is international. + - `false`: The card is domestic. + + + `emi` + : `boolean` Indicates whether the card is eligible for EMI payments or not. Possible values: + - `true`: The card is eligible for EMI payments. + - `false`: The card is not eligible for EMI payments. + + + `sub_type` + : `string` The card sub_type for the given IIN. Pricing of card payment may change on the basis of card type. Possible values: + - `consumer` + - `business` + - `unknown` + +`compliant_with_tokenisation_guidelines` +: `boolean` Indicates whether the token is compliant with the RBI guidelines. Possible values: + - `true`: The token is compliant with RBI guidelines. + - `false`: The token is not compliant with RBI guidelines. + +`status` +: `string` The overall status for the token. Possible values: + - `initiated`: The token attains this state after Razorpay has received the tokenisation request and is working with token service providers for creating the token. + - `active`: The token attains this state if the token is activated for at least one of the token service providers. + - `suspended`: The token attains this state if: +- The token is not activated for any one of the token service providers. +- The token is suspended for at least one of the token service providers. + - `deactivated`: The token attains this state if the token is not active/suspended for any one of the token service providers and is deactivated for at least one token service provider. Know about the complete list of [token states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/token-lifecycle.md). + +### 2.5 Create Payments Using Saved Card + +After the card is saved, customers can quickly complete the payment for every subsequent online transaction by entering only the `cvv`. + +```js: Custom Checkout + + Pay + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg", + name: "Crime Master Gogo", + }); + var data = { + amount: 6666, + currency: "", + email: "", + order_id: "order_ISsp1ekSCHgoAw", + contact: 9123456780, + notes: { + address: "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + customer_id: "cust_1Aa00000000001", + token: "token_4zwefDSCC829ma", + method: "card", + card[cvv]: '123' + }; + + document.getElementById("rzp-button1").onclick = function(){ + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id) + }); + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); +} + +``` + +#### Request Parameters + +`customer_id` +: `string` Unique identifier of the customer. + +`token` +: `string` Unique identifier of the token saved with the card networks. + +`card[cvv]` +: `string` CVV of the card. + + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + + +### 2.6 Delete Tokens + +If the customers want to remove the saved cards from their respective accounts, use the following API to delete the tokens. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000001/tokens/token_4zwefDSCC829ma + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```json: Response +{ + "deleted": true +} +``` + +#### Path Parameters + +`customer_id` +: `string` Unique identifier of the customer. + +`token` +: `string` Token of the saved method that needs to be deleted. + +### Delete Saved Card Details + +Customers can delete their card details. Check this [demo](https://razorpay.com/flashcheckout/manage/) and follow the on-screen instructions. + +## Existing Saved Card + +- Existing cards are those cards whose details are saved with Razorpay on Razorpay servers. +- Razorpay saves the existing card details as network tokens if the customer provides explicit consent. +- The businesses signify customer consent by sending the `consent_to_save_card=1` parameter in the Create Payment request. + + +> **INFO** +> +> +> **Handy Tips** +> +> - To save the card details, you must share `consent_to_save_card=1` till 30 June 2022. You do not need to send it from 01 July 2022 onwards. +> - If you share `consent_to_save_card=0`, Razorpay will not save cards. You do not need to send it from 01 July 2022 onwards. +> + + + +- If the **customer does not provide consent**, the **card details are not saved**. + + +> **INFO** +> +> +> **Handy Tips** +> +> The existing card details are saved as network tokens whether the **Collect Consent from Customers** feature is enabled on the Dashboard or not, provided `consent_to_save_card=1`. +> + +Given below is the sample code: + +```js: Custom Checkout + + Pay + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg", + name: "", + }); + var data = { + amount: 6666, + currency: "", + email: "", + order_id: "order_ISsp1ekSCHgoAw", + contact: 9123456780, + notes: { + address: "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + customer_id: "cust_1Aa00000000001", + token: "token_4zwefDSCC829ma", + method: "card", + card[cvv]: '123', + consent_to_save_card: 1 + }; + + document.getElementById("rzp-button1").onclick = function(){ + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id) + }); + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); +} + +``` diff --git a/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-2.md b/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-2.md new file mode 100644 index 00000000..4fc122c1 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-2.md @@ -0,0 +1,572 @@ +--- +title: Razorpay Seeks Customer Consent on Behalf of Business +description: Procedure to follow if you want Razorpay to collect customer consent. +--- + +# Razorpay Seeks Customer Consent on Behalf of Business + +If you do not intend to collect customer consent to save card details on your UI and want Razorpay to collect the consent, follow the steps below. + +## New Card Workflow + +New cards are cards that have previously not been saved with Razorpay. Follow the steps given below to make changes in the integration code: + +## Step 1: Create a Customer + +You can create customers using the [Create a Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). The `customer_id` received in the response should be passed in the Create Payment request. + +## Step 2: Create Payment + +Use the following code to **Create a Payment**. + +```js: Custom Checkout + + Pay + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg", + name: "", + }); + var data = { + amount: 6666, + currency: "", + email: "", + order_id: "order_ISsp1ekSCHgoAw", + contact: , + notes: { + address: "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + customer_id: "cust_1Aa00000000001", + save: 1, + method: "card", + card[number]: '4242424242424242', + card[expiry_month]: '11', + card[expiry_year]: '23', + card[cvv]: '123', + card[name]: '' + }; + + document.getElementById("rzp-button1").onclick = function(){ + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id) + }); + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); +} + +``` + +#### Request Parameters + +`save` _mandatory_ +: `integer` Determines whether Razorpay should save customer card details as tokens with the card network. Possible values: + - `1`: Razorpay should save customer card details as tokens with the card network. + - `0`: Razorpay should not save the card details. + +`card` _mandatory_ +: The details of the card that should be entered while making the payment. + + `number` + : `string` Unformatted card number. + + `name` + : `string` The name of the cardholder. + + `expiry_month` + : `string` Expiry month for card in MM format. + + `expiry_year` + : `string` Expiry year for card in YY format. + + `cvv` + : `string` The card's CVV number. + + + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer. This can be obtained from the response of the previous step. + +## Step 3: Fetch all Tokens of Customer + +Fetch all tokens created for a customer using the API given below. + +/customers/:customer_id/tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/:customer_id/tokens +```php: PHP +$api = new Api($key_id, $secret); +$api->customer->fetch($customerId)->tokens()->all(); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) +instance.customers.fetchTokens(customerId) +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +Razorpay::Customer.fetch(customerId).fetchTokens +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +List customer = instance.customers.fetchTokens(customerId); +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```json: Response +{ + "entity" : "collection", + "count" : 2, + "items" : [ + { + "id" : "token_4lsdksD31GaZ09", + "entity" : "token", + "method" : "card", + "card" : { + "entity" : "card", + "last4" : 1111, + "network" : "Visa", + "emi" : true, + "issuer" : "HDFC", + "international": false, + "sub_type": "consumer", + "token_iin": "453335", + "type": "credit" + }, + "used_at" : 1473765044, + "created_at" : 1473765044, + "status": "active", + "compliant_with_tokenisation_guidelines": true // This is for Indian Cards only + }, + { + "id" : "token_4lsdksD31GaZ08", + "entity" : "token", + "method" : "card", + "card" : { + "entity" : "card", + "last4" : 1111, + "network" : "Visa", + "emi" : true, + "issuer" : "HDFC", + "international": false, + "sub_type": "consumer", + "token_iin": "453325", + "type": "credit" + }, + "used_at" : 1473765044, + "created_at" : 1473765044, + "status": "active", + "compliant_with_tokenisation_guidelines": true // This is for Indian Cards only + } + ] +} +``` + +#### Path Parameter + +`customer_id` +: `string` Unique identifier of the customer. + +#### Response Parameters + +`id` +: `string` The unique identifier of the Razorpay token. + +`entity` +: `string` The name of the entity. Here, it is `token`. + +`method` +: `string` The type of saved instrument. In the current use case, the value is `card`. + +`card` +: `object` The customer card details. + + `last4` + : `string` The last 4 digits of the tokenised card. + + `network` + : `string` The card network. Possible values: + - `Visa` + - `RuPay` + - `MasterCard` + - `American Express` + - `Diners Club` + - `Maestro` + - `JCB` + - `Union Pay` + + `issuer` + : `string` The 4-character issuer code unique to each issuing bank in India. For example, `HDFC`, `SBIN` and so on. + + `type` + : `string` The type of card. Possible values: + - `credit` + - `debit` + - `prepaid` + + `international` + : `boolean` Indicates whether the card is international (issued outside India) or domestic. Possible values: + - `true`: The card is international. + - `false`: The card is domestic. + + + `emi` + : `boolean` Indicates whether the card is eligible for EMI payments or not. Possible values: + - `true`: The card is eligible for EMI payments. + - `false`: The card is not eligible for EMI payments. + + + `sub_type` + : `string` The card sub_type for the given IIN. Pricing of card payment may change on the basis of card type. Possible values: + - `consumer` + - `business` + - `unknown` + +`compliant_with_tokenisation_guidelines` +: `boolean` Indicates whether the token is compliant with the RBI guidelines. Possible values: + - `true`: The token is compliant with RBI guidelines. + - `false`: The token is not compliant with RBI guidelines. + +`status` +: `string` The overall status for the token. Possible values: + - `initiated`: The token attains this state after Razorpay has received the tokenisation request and is working with token service providers for creating the token. + - `active`: The token attains this state if the token is activated for at least one of the token service providers. + - `suspended`: The token attains this state if: +- The token is not activated for any one of the token service providers. +- The token is suspended for at least one of the token service providers. + - `deactivated`: The token attains this state if the token is not active/suspended for any one of the token service providers and is deactivated for at least one token service provider. Know about the complete list of [token states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/token-lifecycle.md). + +> **INFO** +> +> +> **Handy Tips** +> +> You can convert a token BIN received in response to an **actual BIN** using [token APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/apis.md). +> + +## Step 4: Fetch Card Properties of an Existing Token + +Use this API to retrieve card details such as network, issuer and so on for a given token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/customers/:customer_id/tokens/:token_id + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = razorpay.customers.fetchToken(customerId, tokenId) + +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.fetch(customerId, tokenId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->fetch($tokenId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).fetchToken(tokenId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchToken(customerId, tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Fetch("", "", nil, nil) + +```json: Response +{ + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "method": "card", + "card": { + "entity": "card", + "last4": 0153, + "network": "Visa", + "emi": true, + "issuer": "HDFC", + "international": false, + "sub_type": "consumer", + "token_iin": "453335", + "type": "credit" + }, + "used_at": 1473765044, + "created_at": 1473765044, + "status": "active", + "compliant_with_tokenisation_guidelines": true // This is for Indian Cards only +} +``` + +#### Path Parameter + +`customer_id` +: `string` Unique identifier of the customer. + +`token_id` +: `string` Unique identifier of the token. + +#### Response Parameters + +`id` +: `string` The unique identifier of the Razorpay token. + +`entity` +: `string` The name of the entity. Here, it is `token`. + +`method` +: `string` The type of saved instrument. In the current use case, the value is `card`. + +`card` +: `object` The customer card details. + + `last4` + : `string` The last 4 digits of the tokenised card. + + `network` + : `string` The card network. Possible values: + - `Visa` + - `RuPay` + - `MasterCard` + - `American Express` + - `Diners Club` + - `Maestro` + - `JCB` + - `Union Pay` + + `issuer` + : `string` The 4-character issuer code unique to each issuing bank in India. For example, `HDFC`, `SBIN` and so on. + + `type` + : `string` The type of card. Possible values: + - `credit` + - `debit` + - `prepaid` + + `international` + : `boolean` Indicates whether the card is international (issued outside India) or domestic. Possible values: + - `true`: The card is international. + - `false`: The card is domestic. + + + `emi` + : `boolean` Indicates whether the card is eligible for EMI payments or not. Possible values: + - `true`: The card is eligible for EMI payments. + - `false`: The card is not eligible for EMI payments. + + + `sub_type` + : `string` The card sub_type for the given IIN. Pricing of card payment may change on the basis of card type. Possible values: + - `consumer` + - `business` + - `unknown` + +`compliant_with_tokenisation_guidelines` +: `boolean` Indicates whether the token is compliant with the RBI guidelines. Possible values: + - `true`: The token is compliant with RBI guidelines. + - `false`: The token is not compliant with RBI guidelines. + +`status` +: `string` The overall status for the token. Possible values: + - `initiated`: The token attains this state after Razorpay has received the tokenisation request and is working with token service providers for creating the token. + - `active`: The token attains this state if the token is activated for at least one of the token service providers. + - `suspended`: The token attains this state if: +- The token is not activated for any one of the token service providers. +- The token is suspended for at least one of the token service providers. + - `deactivated`: The token attains this state if the token is not active/suspended for any one of the token service providers and is deactivated for at least one token service provider. Know about the complete list of [token states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/token-lifecycle.md). + +> **INFO** +> +> +> **Handy Tips** +> +> You can convert a token BIN received in response to an **actual BIN** using [token APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/apis.md). +> + +## Step 5: Create Payments using Saved Card + +After the card is saved, customers can quickly complete the payment for every subsequent online transaction by entering only the `cvv`. If Razorpay should save the card details, pass the following additional parameters to the Checkout form. + +```js: Custom Checkout + + Pay + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg", + name: "", + }); + var data = { + amount: 6666, + currency: "", + email: "", + order_id: "order_ISsp1ekSCHgoAW", + contact: 9123456780, + notes: { + address: "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + customer_id: "cust_1Aa00000000001", + token: "token_4zwefDSCC829ma", + method: "card", + card[cvv]: '123' + }; + + document.getElementById("rzp-button1").onclick = function(){ + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id) + }); + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); +} + +``` + +#### Request Parameters + +`customer_id` +: `string` Unique identifier of the customer. + +`token` +: `string` Unique identifier of the token saved with the card network. + +`card[cvv]` +: `string` CVV of the card. + + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + + +## Step 6: Delete Tokens + +If the customers want to remove the saved cards from their respective accounts, you can use the following API to delete the tokens: + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000001/tokens/token_4zwefDSCC829ma + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```json: Response +{ + "deleted": true +} +``` + +#### Path Parameters + +`customer_id` +: `string` Unique identifier of the customer. + +`token` +: `string` Token of the saved method that needs to be deleted. + +## Delete Saved Card Details + +Customers can delete their card details. Check this [demo](https://razorpay.com/flashcheckout/manage/) and follow the on-screen instructions. + +## Existing Saved Card + +Existing cards are cards whose details have been previously saved with Razorpay on Razorpay servers. + +Existing card details will be saved as network tokens by Razorpay only if: +1. The `Collect Consent from Customers` feature is enabled on the Dashboard. +2. The customer provides their consent on the Razorpay webpage. If the customer does not consent, the card details will not be saved. diff --git a/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-3.md b/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-3.md new file mode 100644 index 00000000..801b463b --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-3.md @@ -0,0 +1,119 @@ +--- +title: Business Seeks Consent from Some Customers Only +description: Procedure to follow if you are not able to collect consent from all customers. +--- + +# Business Seeks Consent from Some Customers Only + +If you can collect consent from a few of your users (possibly, new app versions) but unable to collect consent for the rest of your users (possibly, on old app versions), follow the steps below. + +## 1. On Dashboard + +Follow these steps: + +1. Log in to the Dashboard. +2. Navigate to **Settings** → **Configuration**. +3. Enable the **Collect Consent from Customers** feature. This means that Razorpay is responsible for collecting the customer consent. + +## 2. In Integration Code + +#### Business Collecting Customer Consent + +If you are collecting customer consent, ensure that you pass the following parameters in the **Create Payment** request: + +```js: Custom Checkout + + Pay + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg", + name: "", + }); + var data = { + amount: 6666, + currency: "", + email: "", + order_id: "order_ISsp1ekSCHgoAw", + contact: , + notes: { + address: "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + customer_id: "cust_1Aa00000000001", + save: 1, + consent_to_save_card: 1, + method: "card", + card[number]: '4242424242424242', + card[expiry_month]: '11', + card[expiry_year]: '23', + card[cvv]: '123', + card[name]: '' + }; + + document.getElementById("rzp-button1").onclick = function(){ + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id) + }); + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); +} + +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can convert a token BIN received in response to an **actual BIN** using [token APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/apis.md). +> + +#### Business Not Collecting Customer Consent + +If you are not collecting customer consent, ensure that you pass the following parameters in the **Create Payment** request: + +```js: Custom Checkout + + Pay + + var razorpay = new Razorpay({ + key: "", + image: "https://i.imgur.com/n5tjHFD.jpg", + name: "", + }); + var data = { + amount: 6666, + currency: "", + email: "", + order_id: "order_ISsp1ekSCHgoAw", + contact: , + notes: { + address: "Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru", + }, + customer_id: "cust_1Aa00000000001", + save: 1, + method: "card", + card[number]: '4242424242424242', + card[expiry_month]: '11', + card[expiry_year]: '23', + card[cvv]: '123', + card[name]: '' + }; + + document.getElementById("rzp-button1").onclick = function(){ + razorpay.createPayment(data); + razorpay.on("payment.success", function(resp) { + alert(resp.razorpay_payment_id) + }); + razorpay.on("payment.error", function(resp){alert(resp.error.description)}); +} + +``` + +> **INFO** +> +> +> **Handy Tips** +> +> You can convert a token BIN received in response to an **actual BIN** using [token APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/apis.md). +> diff --git a/llm-content/payments/payment-gateway/web-integration/custom/features/saved-vpa.md b/llm-content/payments/payment-gateway/web-integration/custom/features/saved-vpa.md new file mode 100644 index 00000000..ddbde051 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/features/saved-vpa.md @@ -0,0 +1,292 @@ +--- +title: Saved VPA +description: Check the Saved VPA feature for Custom Web Integration. +--- + +# Saved VPA + +Razorpay enables you to save the VPAs of a customer. The VPAs entered by the customer is stored and secured as tokens in Razorpay. The customers can select the saved VPA and complete the payment on subsequent visits. +- This saves the customer the hassle of entering the VPA again for every transaction. +- Without Saved VPAs, the customers may enter invalid VPAs or forget their VPAs, which could lead to higher drop-off rates. + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#intent-flow). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md). +> + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## User Flow + +The user flow for accepting payments using tokens is as follows: + +1. The customer enters VPA to make UPI payments at your checkout. +2. The entered **VPAs are saved as tokens** by Razorpay. +3. On a repeat visit to your site, all the tokens saved for a customer are displayed on your checkout. +4. From the displayed list of VPAs, the customer selects VPAs of their choice to complete the payment. + +## Prerequisites + +To authenticate API requests sent to Razorpay servers, send the API key, a combination of `Key_Id` and `Key_Secret`, in the request header. [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + +## Integration Steps + +The steps required to integrate tokens in the payment flow are as follows: + +### 1.1 Create a Customer + +Create a customer, whose VPAs should be saved, with details such as `email` and `contact`. + +/customers + +```cURL: Sample Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9900000000", + "fail_existing": "0" +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject request = new JSONObject(); +request.put("name", ); +request.put("email", ); + +Customer customer = razorpayClient.Customers.create(request); + +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create(data=data) + +```php: PHP +$api = new Api($key_id, $secret); + +$customer = $api->customer->create(array('name' => 'Razorpay User', 'email' => 'customer@razorpay.com')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", "customer name"); +options.Add("contact", "9000090000"); +options.Add("email", "foo@example.com"); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customer = Razorpay::Customer.create email: 'test@razorpay.com', contact: '9876543210' +puts customer.id #cust_6vRXClWqnLhV14 + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({name, email, contact, notes}) + +```json: Response +{ + "id" : "cust_EIW4T2etiweBmG", + "entity": "customer", + "name" : "Gaurav Kumar", + "email" : "gaurav.kumar@example.com", + "contact" : "9900000000", + "gstin": null, + "created_at ": 1234567890 +} +``` + +Know more about [Customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md). + +### 1.2 Create an Order + +An order must be created before initiating payment on your Checkout. + +/orders + +```cURL: Sample Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 200, + "currency": "INR" +}' +```json: Response +{ + "id": "order_Ee0biRtLOqzRjP", + "entity": "order", + "amount": 200, + "amount_paid": 0, + "amount_due": 200, + "currency": "INR", + "receipt": null, + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1586789358 +} +``` + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +### 1.3 Create Tokens for a Customer + +While making the UPI collect payment, the customer enters the VPA on the checkout. To save the VPA, send `customer_id` and `save` attributes along with the other [Checkout fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md#checkout-options) as shown below: + +```js: Custom Checkout Sample Code +razorpay.createPayment({ + amount: 200, + contact: '9900000000', + email_id: 'gaurav.kumar@example.com', + customer_id: 'cust_EIW4T2etiweBmG', + save: 1, + order_id: 'order_Ee0biRtLOqzRjP', + method: 'upi' + vpa: '9900000000@upi' +}); +``` + +`customer_id` +: `string` Unique identifier of the customer. This can be obtained from the response of [Step 1](#step-1-create-a-customer). + +`save` +: `integer` Specifies if the VPA should be stored as tokens. Possible values are: + - `1`: Saves the VPA details. + - `0`(default): Does not save the VPA details. + +### 1.4 Fetch all Tokens of the Customer + +All the VPA tokens of a customer can be retrieved as follows: + +/customers/:customer_id/tokens + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X GET https://api.razorpay.com/v1/customers/cust_EIW4T2etiweBmG/tokens +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "token_EeO65VIv8BXZg5", + "entity": "token", + "token": "D7Qun28CcPwNVy", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "9900000000", + "handle": "upi", + "name": null + }, + "recurring": false, + "recurring_details": { + "status": "not_applicable", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1586872080, + "created_at": 1586872080, + "start_time": null, + "dcc_enabled": false + }, + { + "id": "token_EeroOjvOvorT5L", + "entity": "token", + "token": "4ydxm47GQjrIEx", + "bank": null, + "wallet": null, + "method": "card", + "card": { + "entity": "card", + "name": "Gaurav Kumar", + "last4": "8430", + "network": "Visa", + "type": "credit", + "issuer": "HDFC", + "international": false, + "emi": true, + "expiry_month": 12, + "expiry_year": 2022, + "flows": { + "otp": true, + "recurring": true + } + }, + "vpa": null, + "recurring": false, + "auth_type": null, + "mrn": null, + "used_at": 1586976724, + "created_at": 1586976724, + "expired_at": 1672511399, + "dcc_enabled": false + } + ] +} +``` + +### 1.5 Create Payments Using Tokens + +Once the VPAs are tokenized, in all the repeat transactions on your website, customers can complete their UPI payments without having to enter their VPAs again. + +In subsequent payments, instead of `vpa`, pass `customer_id` and `token` attributes along with the other [Checkout fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md#checkout-options) as shown below: + +```js: Custom Checkout Sample Code +.... //beginning of your custom code +razorpay.createPayment({ + amount: 100, + contact: '9900000000', + email_id: 'gaurav.kumar@example.com', + customer_id: 'cust_EIW4T2etiweBmG', + order_id: 'order_EAFrKULhM6Eopk', + method: 'upi', + token: 'token_EeO65VIv8BXZg5' +}); +...... //rest of the code +``` + +`customer_id` +: `string` Unique identifier of the customer. + +`token` +: `string` Token of the saved VPA obtained in the [previous step](#14-fetch-all-tokens-of-the-customer). diff --git a/llm-content/payments/payment-gateway/web-integration/custom/features/validate-vpa.md b/llm-content/payments/payment-gateway/web-integration/custom/features/validate-vpa.md new file mode 100644 index 00000000..054cbaaa --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/features/validate-vpa.md @@ -0,0 +1,42 @@ +--- +title: Custom Web Integration - Validate VPA +description: Validate VPA feature for Custom Web Integration. +--- + +# Custom Web Integration - Validate VPA + +If the selected payment method is `upi`, the user has to enter the `vpa` in the Checkout form. You can check if the entered `vpa` is valid or not using the following code: + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#intent-flow). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md). +> + +#### Sample Code + +```js +var razorpay = new Razorpay({ + key: 'YOUR_KEY_ID', +}); +razorpay.verifyVpa(vpa) + .then(() => { + // VPA is valid, ask the user to click Pay + }) + .catch(() => { + // VPA is invalid, show an error to the user + }); +``` diff --git a/llm-content/payments/payment-gateway/web-integration/custom/features/webview.md b/llm-content/payments/payment-gateway/web-integration/custom/features/webview.md new file mode 100644 index 00000000..6e316375 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/features/webview.md @@ -0,0 +1,30 @@ +--- +title: About Webview for Mobile Apps +description: Reuse web integration code to accept payments via WebView on your Android and iOS mobile apps. +--- + +# About Webview for Mobile Apps + +If you want to accept payments on your Android or iOS apps without integrating with our native SDKs, reuse your Custom Integration code. This opens the checkout form in a WebView on your mobile app. Pass the **callback_url** parameter along with other checkout options to process payments. + +## Why Webview Checkout is Problematic + +Users seem to utilise web checkout within webviews rather than integrating with our SDKs. While this allows you to reuse your existing web integration and avoid re-implementing cart/checkout in the SDK, it introduces multiple issues and is **not recommended**. + +Integrating web checkout within webviews can result in several critical issues including but not limited to: + +- **Popup Restrictions**: Flows requiring popups may be disabled or may not function as expected. +- **UPI Intent Configuration**: Additional configuration is required to make UPI intent work within webviews. +- **Bank Transfers and Downloads**: Payment methods like bank transfer, which rely on downloads, will fail as webviews do not support downloads by default. + +## Recommended Approach + +We strongly recommend migrating to our [SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md) instead of using webviews to ensure full compatibility and a smoother experience. + +If you still decide to proceed with webview-based checkout, please consider the below adjustments to minimise issues, including but not limited to. + +## Webview Integration Guide (For Users Proceeding Anyway) + +- **Implement Callback URL Handling**: Ensure your integration correctly handles [callback URLs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/callback-url.md) to receive payment status updates reliably. +- **Configure UPI Intent**: Follow additional steps to ensure [UPI intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods/upi-intent-mweb.md) payments function correctly on [Android](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/webview/upi-intent-android.md) or [iOS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/webview/upi-intent-ios.md). +- **Handle Download Restrictions**: Implement solutions for payment methods that require file downloads. For now, you will need to manage downloads on your end. diff --git a/llm-content/payments/payment-gateway/web-integration/custom/features/webview/upi-intent-android.md b/llm-content/payments/payment-gateway/web-integration/custom/features/webview/upi-intent-android.md new file mode 100644 index 00000000..0b4c3109 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/features/webview/upi-intent-android.md @@ -0,0 +1,179 @@ +--- +title: UPI Intent in WebView - Android +description: Enable UPI Intent in WebView on your Android app. +--- + +# UPI Intent in WebView - Android + +Follow the steps given below to enable UPI intent in WebView on your android application: + +**1.1** [Add WebView to Android App](#11-add-webview-to-android-app) + +**1.2** [Setup WebViewClient](#12-setup-webviewclient) + +**1.3** [Handle Deep Links in shouldOverrideUrlLoading()](#13-handle-deep-links-in-shouldoverrideurlloading-) + +**1.4** [Enable UPI Intent Support](#14-enable-upi-intent-support) + +## 1.1 Add WebView to Android App + +Add a WebView to the layout of your Android app. You can add the code given below to the layout XML file of your app: + +```xml + +``` + +## 1.2 Setup WebViewClient + +To setup a `WebViewClient` that handles URL requests, create a new class using the code given below extending the `MyWebViewClient` and overriding the `shouldOverrideUrlLoading()` method. + +```java: Java +class MyWebViewClient extends WebViewClient { + + private Activity activity; + + public MyWebViewClient(Activity activity) { + this.activity = activity; + } + + /** This function is used to handle deeplink in webview */ + @Override + public Boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) { + return true; + } + +} + +// Use CustomWebviewClient created above in the webview object. +class MainActivity extends Activity { + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + WebView webView = findViewById(R.id.webview); + webView.setWebViewClient(new MyWebViewClient(MainActivity.this)); + } + +} + +```kotlin: Kotlin +class MyWebViewClient(private val activity: Activity) : WebViewClient() { + override fun onPageFinished(view: WebView?, url: String?) { + super.onPageFinished(view, url) + } + + /** This function is used to handle deeplink in webview */ + override fun shouldOverrideUrlLoading(view: WebView?, request: WebResourceRequest?): Boolean { + return true + } +} + +// Use CustomWebviewClient created above in the WebView object. +class MainActivity : Activity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + val webView = findViewById(R.id.webview) + webView.setWebViewClient(MyWebViewClient(this@MainActivity)) + } +} +``` + +## 1.3 Handle Deep Links in shouldOverrideUrlLoading() + +To handle deep links in the `shouldOverrideUrlLoading()` method, check if the URL is a deep link and then launch the corresponding activity using the intent class. In this example, we are checking if the URL starts with `http://` or `https://`. If not, then we create a new intent with `ACTION_VIEW` and URL as the data and start the activity with this intent. + +```java: Java +import android.app.Activity; +import android.content.ActivityNotFoundException; +import android.content.Intent; +import android.graphics.Bitmap; +import android.net.Uri; +import android.webkit.WebResourceRequest; +import android.webkit.WebView; +import android.webkit.WebViewClient; + +class MyWebViewClient extends WebViewClient { + + @Override + public void onPageFinished(WebView view, String url) { + super.onPageFinished(view, url); + } + + /** This function is used to handle deeplink in webview */ + @Override + public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) { + String url = request.getUrl().toString(); + if (!url.startsWith("https") || !url.startsWith("http")) { + try { + Intent i = new Intent(Intent.ACTION_VIEW); + i.setData(Uri.parse(request.getUrl().toString())); + activity.startActivityForResult(i, 2001); + } catch (ActivityNotFoundException ignored) { + + } + } + return true; + } +} + +```kotlin: Kotlin +import android.app.Activity +import android.content.ActivityNotFoundException +import android.content.Intent +import android.graphics.Bitmap +import android.net.Uri +import android.webkit.WebResourceRequest +import android.webkit.WebView +import android.webkit.WebViewClient + +class MyWebViewClient(private val activity: Activity): WebViewClient() { + + override fun onPageFinished(view: WebView?, url: String?) { + super.onPageFinished(view, url) + + } + + /** This function is used to handle deeplink in webview */ + override fun shouldOverrideUrlLoading(view: WebView?, request: WebResourceRequest?): Boolean { + val url = request!!.url.toString() + if (!url.startsWith("https") || !url.startsWith("http")){ + try { + val i = Intent(Intent.ACTION_VIEW) + i.setData(Uri.parse(request.url.toString())) + activity.startActivityForResult(i, 2001) + } catch (e: ActivityNotFoundException) { + + } + } + return true + + } + +} +``` + +## 1.4 Enable UPI Intent Support + +To enable and test UPI intent in WebView-based Checkout: +1. Open your website integrated with custom checkout. +2. Pass `webview_intent: true` parameter in the [payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md#132-instantiate-custom-checkout) sent to checkout to enable UPI intent support. +3. Ensure that UPI intent is triggered when the payment request is made. + +> **WARN** +> +> +> **Watch Out!** +> +> By default, the top PSP apps appear on the customer's mobile irrespective of the installation status of the UPI apps. +> + +## List of Supported UPI Intent Apps + +Given below is the list of supported UPI apps for Mobile Web. + +- `gpay` +- `phonepe` +- `paytm` +- `any` + +The `any` option triggers the other UPI payment apps installed on your customer's mobile. diff --git a/llm-content/payments/payment-gateway/web-integration/custom/features/webview/upi-intent-ios.md b/llm-content/payments/payment-gateway/web-integration/custom/features/webview/upi-intent-ios.md new file mode 100644 index 00000000..f17539ef --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/features/webview/upi-intent-ios.md @@ -0,0 +1,154 @@ +--- +title: UPI Intent in WebView - iOS +description: Enable UPI Intent in WebView on your iOS app. +--- + +# UPI Intent in WebView - iOS + +Follow the steps given below to enable UPI intent in WebView on your iOS application: + +**1.1** [Setup App to Handle Deep Links](#11-setup-app-to-handle-deep-links) + +**1.2** [Setup WKNavigationDelegate for WKWebView](#12-setup-wknavigationdelegate-for-wkwebview) + +**1.3** [Conforming to WKNavigationDelegate](#13-conforming-to-wknavigationdelegate) + +**1.4** [Enable UPI Intent Support](#14-enable-upi-intent-support) + +## 1.1 Setup App to Handle Deep Links + +Add the code given below to your `AppDelegate`. In this example, we override the `application(_:open:options:)` method to handle deep link URLs. You can use this method to parse the URL and determine which screen or content to display in your app. + +```swift: Swift +func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool { + return true +} +```objectivec: Objective C +func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { + return true +} +``` + +## 1.2 Setup WKNavigationDelegate for WKWebView + +Get a reference to your `WKWebView` and call the `navigationDelegate` property to setup `WKWebView` using the following code. Add the `loadWebPage` function to load your content. + +```swift: Swift +class CheckoutPaymentViewController: UIViewController { + + var checkoutUrl: String? + + // You can assign the checkout URL String to checkoutUrl property or pass it from previous page. + + @IBOutlet weak var wkWebView: WKWebView! + + override func viewDidLoad() { + super.viewDidLoad() + wkWebView.navigationDelegate = self + self.loadWebPage() + } + + func loadWebPage() { + guard let urlString = self.checkoutUrl else { return } + guard let url = URL(string: urlString) else { return } + self.wkWebView.load(URLRequest(url: url)) + } +} +```objectivec: Objective C +#import + +@interface WebViewController () +{ + IBOutlet WKWebView *webView; +} +@end + +@implementation WebViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + webView.navigationDelegate = self; + [self loadWebPage]; +} + +- (void)loadWebPage +{ + NSURL *url = [[NSURL alloc] initWithString:@""]; + NSMutableURLRequest *urlRequest = [[NSMutableURLRequest alloc] initWithURL:url]; + [webView loadRequest:urlRequest]; +} +``` + +## 1.3 Conforming to WKNavigationDelegate + +Create a `WKNavigationDelegate` to handle navigation events in your `WKWebView`. +In this example, we override the WebView`(_:decidePolicyFor:decisionHandler:)` method to handle navigation events in the WKWebView. If the URL scheme is not `http` or `https`, then we check if the URL can be opened using the `UIApplication.shared.canOpenURL()` method. +- If yes, then we open the URL using the `UIApplication.shared.open()` method. +- If not, then we allow the navigation to continue using the `decisionHandler(.allow)` method. + +```swift: Swift +extension CheckoutPaymentViewController: WKNavigationDelegate { + func webView(_ webView: WKWebView, + decidePolicyFor navigationAction: WKNavigationAction, + decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) { + + // If the request is a non-http(s) schema, then have the UIApplication handle opening the request. + if let url = navigationAction.request.url, + !url.absoluteString.hasPrefix("http://"), + !url.absoluteString.hasPrefix("https://"), + UIApplication.shared.canOpenURL(url) { + + // Have UIApplication handle the url (sms:, tel:, mailto:, ...) + UIApplication.shared.open(url, options: [:], completionHandler: nil) + + // Cancel the request (handled by UIApplication). + decisionHandler(.cancel) + } + else { + // Allow the request. + decisionHandler(.allow) + } + } +} +```objectivec: Objective C +- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler { + NSURL *url = navigationAction.request.URL; + NSString *urlString = url.absoluteString; + BOOL hasHttpPrefix = [[urlString lowercaseString] hasPrefix:@"http://"]; + BOOL hasHttpsPrefix = [[urlString lowercaseString] hasPrefix:@"https://"]; + BOOL canOpenUrl = [[UIApplication sharedApplication] canOpenURL:url]; + + if (!hasHttpPrefix && !hasHttpsPrefix && canOpenUrl) { + NSDictionary *options = [[NSDictionary alloc] init]; + [[UIApplication sharedApplication] openURL:url options:options completionHandler:nil]; + + decisionHandler(WKNavigationActionPolicyCancel); + } else { + decisionHandler(WKNavigationActionPolicyAllow); + } +} +``` + +## 1.4 Enable UPI Intent Support + +To enable and test UPI intent in WebView-based Checkout: +1. Open your website integrated with custom checkout. +2. Pass `webview_intent: true` parameter in the [payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md#132-instantiate-custom-checkout) sent to checkout to enable UPI intent support. +3. Ensure that UPI intent is triggered when the payment request is made. + +> **WARN** +> +> +> **Watch Out!** +> +> By default, the top PSP apps appear on the customer's mobile irrespective of the installation status of the UPI apps. +> + +## List of Supported UPI Intent Apps + +Given below is the list of supported UPI apps for Mobile Web. + +- `gpay` +- `phonepe` +- `paytm` diff --git a/llm-content/payments/payment-gateway/web-integration/custom/go-live-checklist.md b/llm-content/payments/payment-gateway/web-integration/custom/go-live-checklist.md new file mode 100644 index 00000000..25c8c8b8 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/go-live-checklist.md @@ -0,0 +1,53 @@ +--- +title: 3. Go-live Checklist +description: Check the go-live checklist for Razorpay Payment Gateway Custom Web integration. +--- + +# 3. Go-live Checklist + +Consider these steps before taking the integration live. + +## Accept Live Payments + +You can perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. However, make sure that you **swap the Test API Key with the Live Key**. + +Watch this video to generate an API Key in Live Mode. + +[Video: https://www.youtube.com/embed/30REpNtYSak] + +To generate an API Key in Live Mode: + +1. Log in to the Dashboard and switch to **Live Mode** on the menu. +2. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +3. Download the keys and save them securely. +4. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + +## Payment Capture + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git a/llm-content/payments/payment-gateway/web-integration/custom/input-restriction.md b/llm-content/payments/payment-gateway/web-integration/custom/input-restriction.md new file mode 100644 index 00000000..98464089 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/input-restriction.md @@ -0,0 +1,111 @@ +--- +title: Input Restriction in Custom Fields +description: Add custom fields and implement input restriction methods in your Custom Checkout Form. +--- + +# Input Restriction in Custom Fields + +While using Custom Checkout, you can add custom fields and restrict their input. + +```js +var formatter = Razorpay.setFormatter(parentFormElement) + +formatter.add('card', cardField) + .on('change', function() { + this.value; // contains the latest unformatted value + this.el; // contains the reference to cardField + this.prettyValue; // contains formatted value. It might not immediately reflect in DOM + this.caretPosition; // index at which caret is right now. reflects element.selectionStart + this.type; // card network. Possible values listed below + this.maxLen; // maximum permissible length for this type of card + this.isValid(); // card number validity + }) + .on('network', function(o) { + // same params as change event + }) + +// restrict format to "MM / YY" format +formatter.add('expiry', expiryField) + +// restrict to numbers only. typing characters would not produce anything. +formatter.add('number', numberField) + +// this will restrict to numbers, with "+" allowed at first character +formatter.add('contact', contactField) + +// unbind events once done +formatter.off() +``` + +## Change and Network Events + +`change` +: Event fired when unformatted value of target input field changes. + +`network` +: Event specific to card fields, fired when card type changes. + +## Possible Values + +`card network type` + - `visa` + - `mastercard` + - `maestro16` (Maestro cards with 16 digits that also have **cvv** and **expiry**) + - `maestro` + - `rupay` + - `American Express` + - `discover` + + +`maxLen` + - `15` + - `16` + - `19` + +```js + +``` + +### Example + +Check an example code below: + +```js +// shortcut function for document.getElementById +var getEl = document.getElementById.bind(document); +var formatter = Razorpay.setFormatter(getEl('parent-form')); +var cvvField = getEl('card_cvv'); + +formatter.add('card', getEl('card_number')) + .on('network', function(o) { + + var type = this.type; // for example, 'visa' + + // set length of cvv element based on mastercard card + var cvvlen = type === 'amex' ? 4 : 3; + cvvField.maxLength = cvvlen; + cvvField.pattern = '^[0-9]{' + cvvlen + '}$'; + + getEl('card_type').innerHTML = type; + }) + .on('change', function() { + var isValid = this.isValid(); + getEl('card_valid').innerHTML = isValid ? 'valid' : 'invalid'; + + // automatically focus next field if card number is valid and filled + if (isValid && this.el.value.length === this.caretPosition) { + getEl('card_expiry').focus(); + } + }) + +formatter.add('expiry', getEl('card_expiry')) + .on('change', function() { + var isValid = this.isValid(); + getEl('expiry_valid').innerHTML = isValid ? 'valid' : 'invalid'; + + // automatically focus next field if card number is valid and filled + if (isValid && this.el.value.length === this.caretPosition) { + getEl('card_cvv').focus(); + } + }) +``` diff --git a/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md b/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md new file mode 100644 index 00000000..f70c6731 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md @@ -0,0 +1,805 @@ +--- +title: Additional Support for Payment Methods +description: Check the various form fields you can use in the Checkout Form used in Razorpay Checkout integrations. +--- + +# Additional Support for Payment Methods + +The Razorpay Web Custom SDK lets you integrate the supported payment methods on your website's checkout form. + +## Fetch Payment Methods + +Use the [Fetch Payment Methods API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/build-integration.md#14-fetch-payment-methods) to fetch the payment methods available for your account. + +Below are the sample payloads for each payment method. + +## Bank Transfer + +This payment method allows you to display your Customer Identifier details on the checkout. Your customers can make online bank transfers to this account. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +There are no specific request parameters to be passed. Instead, you must pass the `fetchVirtualAccount` method for your Customer Identifier to get created and the details to appear on the checkout. Know more about [integrating bank transfer with Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer/custom-integration.md). + +## Debit and Credit Card + +In this case, `data.method` should be specified as `card`. Other required fields: + +- `card[name]` +- `card[number]` +- `card[cvv]` +- `card[expiry_month]` +- `card[expiry_year]` + +```js: Example +razorpay.createPayment({ + amount: 5000, + email: 'gaurav.kumar@example.com', + contact: '9123456780', + order_id: 'order_9A33XWu170gUtm', + method: 'card', + 'card[name]': 'Gaurav Kumar', + 'card[number]': '4386289407660153', + 'card[cvv]': '566', + 'card[expiry_month]': '10', + 'card[expiry_year]': '20' +}); +``` + +If you want to securely store the customer's card details as network tokens, know about [Saved Cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards.md). + +## EMI on Credit and Debit Cards + +For EMIs, data is the same as the card, with the following differences: + +- `method` should be `emi` +- An additional field, `emi_duration` corresponding to the number of months for EMI, should be included. After the customer selects the desired plan, pass the corresponding value in the `emi_duration` field. + +Use the code given below: + +```js: Example +razorpay.createPayment({ + amount: 300000, + email: 'gaurav.kumar@example.com', + contact: '9000090000', + order_id: 'order_9A33XWu170gUtm', + method: 'emi', + emi_duration: 9, + 'card[name]': 'Gaurav Kumar', + 'card[number]': '5241810000000000', + 'card[cvv]': '123', + 'card[expiry_month]': '10', + 'card[expiry_year]': '30' +}); +``` + +#### Fetch EMI Plans + +To display the available EMI plans, use the Razorpay checkout helper methods to fetch the details of the EMI plans and display them. You can use the event ready, as shown below: + +```javascript: Request +var razorpay = new Razorpay(...); // as before + + /** + * The above code remains the same. + * You can fetch the available EMI plans by adding the below code in your options. + */ +razorpay.once('ready', function() { + console.log(razorpay.methods.emi_plans); + console.log(razorpay.methods.netbanking); +}) +```json: Response +{ + "HDFC": { + "min_amount": 300000, + "plans": { + "3": 12, + "6": 12, + "9": 13, + "12": 13, + "18": 15, + "24": 15 + } + }, + "AMEX": { + "min_amount": 500000, + "plans": { + "3": 15, + "6": 15, + "9": 15, + "12": 15 + } + } + // etc.. +} +``` + +`razorpay.methods.emi_plans` +: `string` Lists the EMI-supported banks with their respective interest rates. + +`razorpay.methods.netbanking` +: `string` Contains the list of all banks and bank codes. + +#### Calculate EMI + +You can use the function `Razorpay.emi.calculator` to calculate instalment amounts as shown below: + +```javascript: Request +Razorpay.emi.calculator(principal_amount, duration_in_month, annual_interest_rate); +``` + +The below code will calculate EMI for a principal amount of 10000(in paisa), that is, ₹100 over 12 months with an annual interest rate of 9%: + +```javascript: Request +Razorpay.emi.calculator(10000, 12, 9); += 874 +``` + +> **INFO** +> +> +> **Handy Tips** +> +> The above code does not do any unit conversion of the principal amount. The returned amount will have the same unit as the principal. If the principal amount is in *paisa*, the returned EMI amount will also be in *paisa*. +> + +## Cardless EMI + +Cardless EMI is a checkout payment method that allows customers to convert their payment amount to EMIs. The user does not require a debit or credit card. Make payments via credits approved by the supported Cardless EMI payment partner. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +Use the code given below: + +```js: Example +razorpay.createPayment({ + amount: 5000, + email: 'gaurav.kumar@example.com', + contact: '9000090000', + order_id: 'order_9A33XWu170gUtm', + method: 'cardless_emi', + provider: '' +}); +``` +Possible values for `provider`: + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `zestmoney` + - `earlysalary` + - `walnut369` + - `shopse` + - `snapmint` + +## Netbanking + +When `method` is `netbanking`, you need to pass an additional field `bank` as shown below: + +```js: Example +razorpay.createPayment({ + amount: 5000, + email: 'gaurav.kumar@example.com', + contact: '9123456780', + order_id: 'order_9A33XWu170gUtm', + method: 'netbanking', + bank: 'SBIN' +}) +``` + +You can list the available banks using a drop-down for customers. You can obtain a list of banks using the [Fetch Supported Methods API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md#12-fetch-payment-methods). + +## Wallet + +When `method` is `wallet`, you need to pass an additional field `wallet` as shown below: + +```js: Example +razorpay.createPayment({ + amount: 5000, + email: 'gaurav.kumar@example.com', + contact: '9000090000', + order_id: 'order_9A33XWu170gUtm', + method: 'wallet', + wallet: 'mobikwik' +}); +``` + +Possible values for `wallet`: +- `payzapp` (default) +- `olamoney` (requires [approval](https://razorpay.com/support/#request)) +- `phonepe` (requires [approval](https://razorpay.com/support/#request)) +- `airtelmoney` (requires [approval](https://razorpay.com/support/#request)) +- `mobikwik` (requires [approval](https://razorpay.com/support/#request)) +- `jiomoney` (requires [approval](https://razorpay.com/support/#request)) +- `amazonpay` (requires [approval](https://razorpay.com/support/#request)) +- `bajajpay` (requires [approval](https://razorpay.com/support#request)) +- `paypal` (requires [approval](https://razorpay.com/support/#request) and [onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paypal.md)) +- `phonepeswitch` (requires [approval](https://razorpay.com/support/#request)) + +#### PhonePe Switch + +You can accept in-app payments from your customers transacting in PhonePe Switch. Know more about [PhonePe Switch Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md). + +## UPI + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#intent-flow). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md). +> + +#### Intent Flow + +You can avail the UPI Intent flow by integrating with the [Google Pay SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/google-pay/custom-integration.md). + +#### Intent Flow for Mobile Web + +Using Razorpay, you can let your customers make UPI Intent payments on your mobile website. Customers can then proceed with the payment without navigating away from your mobile website. This leads to a faster checkout experience with higher success rates. + +Know how to integrate with [UPI Intent on Mobile Web](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods/upi-intent-mweb.md). + +> **INFO** +> +> +> **Feature Enablement** +> +> The UPI Intent feature is usually available by default. If you are unable to access this feature, raise a request with our [Support team](https://razorpay.com/support/#request) to get this enabled on your Razorpay account. +> + +#### Collect Flow + +Customers enter their `vpa` or [phone number](#upi-payments-using-phone-number) on your UI and complete the payments on their respective UPI apps in collect flow. + +You can now pass the `vpa` parameter in the `upi` array as shown below: + +```js: Example +razorpay.createPayment({ + amount: 5000, + email: 'gaurav.kumar@example.com', + contact: '9123456780', + order_id: 'order_9A33XWu170gUtm', + method: 'upi', + upi: + { + vpa: 'gauravkumar@somebank', + flow: 'collect' + } +}); +``` + +You will need to collect the Virtual Payment Address (VPA) from the user. This should be a text field that validates against the regex `^.+@.+$`. + + +### UPI Payments Using Phone Number + + You can accept UPI payments using phone number for the collect flow. Follow the steps given below: + + 1. You must collect the customer's phone number from your end. + 2. Check if any `vpa` is associated with the given number and get the `vpa_token` for that number using the sample code given below: + ```java: JavaScript + var razorpay = new Razorpay({ + key: '', + }); + + razorpay.verifyVpa(number) + .then((data) => { + // get and store data.vpa_token for initiating payment + // you will get data.masked_vpa in this response which you can show the end user to accept payment on this vpa associated app + }) + .catch(() => { + // no vpa associated with the number, show an error to the user + }); + ``` + 3. Pass the `vpa_token` parameter in the `upi` array as shown below: + ```java: JavaScript + razorpay.createPayment({ + amount: 5000, + email: 'gaurav.kumar@example.com', + contact: '9000090000', + order_id: 'order_9A33XWu170XXXX', + method: 'upi', + upi: { + vpa_token: 'f731951149df8903d374b117f921ab41', + flow: 'collect' + } + }); + ``` + + +You can accept UPI payments using the collect flow. Know more about [Validate VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/validate-vpa.md) and [Saved VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-vpa.md). + +#### UPI QR Code + +You can display a UPI QR Code at checkout. Customers can scan this QR code using a UPI app on their mobile phones to complete the payment. + +Razorpay supports two flows for UPI QR payments: +- [Non-Redirect Flow](#non-redirect-flow) *(Beta)*: Displays the QR directly on your checkout page. +- [Redirect Flow](#redirect-flow): Redirects customers to Razorpay's payment page to display the QR. + + +### Flow Comparison + + + Aspect | Non-Redirect Flow | Redirect Flow + --- + **Request** | Create payment with `flow: 'qr'`. | Create payment with `upi: { qr: true }`. + --- + **Response** | Returns UPI intent URL via event. | Redirects to Razorpay page. + --- + **QR Display** | You convert URL to QR and display on your page. | On Razorpay's payment page. + --- + **Customer Experience** | Stays on your checkout page. | Leaves your checkout page. + --- + **Implementation Effort** | Requires QR generation library. | Simple - no QR generation needed. + --- + **Feature Availability** | Requires approval. | Available to all businesses. + + + +#### Non-Redirect Flow *(Beta)* + +Display UPI QR codes directly on your checkout page without redirecting customers to Razorpay's payment page. This flow allows you to: +- Receive a UPI intent URL from Razorpay. +- Convert it to a QR code on your checkout page. +- Keep customers on your site for a seamless experience. + +> **INFO** +> +> +> **Feature Enablement** +> +> - This is an on-demand feature. Raise a request with your account manager to get this feature enabled on your account. +> - This flow is available only for desktop websites. +> + +Add the `flow` parameter to enable non-redirect flow: + +```javascript: Request +razorpay.createPayment( + { + amount: 100000, + method: 'upi', + email: 'gaurav.kumar@example.com', + contact: '+919000090000' + }, + { + app: 'any', + flow: 'qr' // Enables non-redirect flow + } +); +```javascript: Success Response +razorpay.on("payment.upi.qr", (data) => { + // data = { + // qr_url: "upi://....", // undefined if expired + // expires_on: 1757523607185, + // status: "created" | "expired" + // } +}); +```javascript: Failure Response +{ + code: 'BAD_REQUEST_ERROR', + description: 'UPI QR non-redirection flow not supported', + reason: 'Feature not enabled' +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is ₹100.00, enter `10000` in this field. + +`method` _mandatory_ +: `string` The payment method selected by the customer. Must be set to `upi` for UPI QR payments. + +`email` _optional_ +: `string` Email address of the customer. + +`contact` _optional_ +: `string` Phone number of the customer. + +`app` _optional_ +: `string` UPI app preference for payment. Set to `any` to allow customers to use any UPI app for payment. + +`flow` _optional_ +: `string` Determines the UPI QR flow type. Set to `qr` to enable non-redirect flow where the UPI intent URL is returned instead of redirecting to Razorpay's payment page. If undefined or any other value, the standard redirect flow is used. + + + +### Response Parameters + +`qr_url` +: `string` UPI intent URL that needs to be converted to a QR code image for display on your checkout page. The value is `undefined` when the status is `expired`. + +`expires_on` +: `integer` Unix timestamp indicating when the QR code will expire. The QR code is valid for 10 minutes from creation. + +`status` +: `string` Current status of the UPI QR code. Possible values: + - `created`: QR code is active and can be scanned for payment. + - `expired`: QR code has expired and cannot be used for payment. + + +#### Redirect Flow + +With this flow, customers are redirected to Razorpay's payment page where the QR code is displayed. + +> **INFO** +> +> +> **Sample QR Code on Checkout** +> +> Ensure that you invoke/activate the QR Code only after a user clicks **Show QR Code**. +> ![UPI QR code on Razorpay Payment Gateway custom web integration.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-qr-custom-web.jpg.md) +> + +Pass the `qr` parameter in the `upi` array as shown below: + +```js: Example +razorpay.createPayment({ + amount: 5000, + email: 'gaurav.kumar@example.com', + contact: '+919000090000', + order_id: 'order_9A33XWu170XXXX', + method: 'upi', + upi: + { + qr: true, + timeout: 10 + } +}); +``` + +`timeout` _optional_ +: `integer` Indicates the time (in minutes) after which the QR code will expire. Possible values are between `1` to `10`. The default value is `10`. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +> **INFO** +> +> +> **Handy Tips** +> +> For the best experience, show QR codes only on desktops. +> + +## Pay Later + +You can enable your customers to make payments using the **Pay Later** service offered by various third-party providers such as: + +Provider | Provider Code | Availability | Minimum Transaction | Maximum Transaction +--- +LazyPay | `lazypay` | [Requires Approval](https://razorpay.com/support/#request) | ₹1 | ₹10,000 +--- +PayPal | `paypal` | [Requires Approval](https://razorpay.com/support/#request) | ₹100 | Based on the customer's approved limit. + +Before you begin, follow the steps given below: + +- Contact our [Support Team](https://razorpay.com/support/#request) to get this payment method enabled for your account. +- Customers should be registered account holders of the Pay Later service providers. + +#### Sample Code + +After creating an order and obtaining the customer's payment details, send the information to Razorpay to complete the payment. You can do this by invoking `createPayment` and passing `method=paylater` and `provider=`. + +Available providers with provider code: +- **LazyPay**: `lazypay` +- **PayPal**: `paypal` + +```js: Example +razorpay.createPayment({ + amount: 200000, + currency: 'INR', + email: 'gaurav.kumar@example.com', + contact: '9111145678', + order_id: 'order_DPzFe1Q1dEObDv', + method: 'paylater', + provider: +}); +``` + +## Emandate + +You can accept recurring payments from your customers using `emandate`, `card` or `upi` as the method. For more information about authorisation and subsequent payments, refer to the [Recurring Payments documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments.md). + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +#### Workflow + +1. [Create a customer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md#create-a-customer). +2. Create an Order with method as `emandate`, `nach` or `upi`. +3. Collect authorisation transaction. + - Using custom checkout. + - Using an authorisation link. +4. Verify Tokens. +5. Charge subsequent payments. + +Know more about [Recurring Payments APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom.md). + +#### Collect Authorisation Transaction + +Use the sample checkout code given below: + +```js: Emandate (Netbanking) +razorpay.createPayment({ + amount: 0, + currency: 'INR', + email: 'gaurav.kumar@example.com', + contact: '9111145678', + order_id: 'order_EAbtuXPh24LrEc', + customer_id: 'cust_E9penp7VGhT5yt', + recurring: '1', + method: 'emandate', + bank: 'HDFC', + auth_type: 'netbanking', + 'bank_account[name]': 'Gaurav Kumar', + 'bank_account[account_number]': '1121431121541121', + 'bank_account[account_type]': 'savings', + 'bank_account[ifsc]': 'HDFC0000001' +}); +```js: Emandate (Debit Card) +razorpay.createPayment({ + amount: 0, + currency: 'INR', + email: 'gaurav.kumar@example.com', + contact: '9111145678', + order_id: 'order_EAbtuXPh24LrEc', + customer_id: 'cust_E9penp7VGhT5yt', + recurring: '1', + method: 'emandate', + bank: 'HDFC', + auth_type: 'debitcard', + 'bank_account[name]': 'Gaurav Kumar', + 'bank_account[account_number]': '1121431121541121', + 'bank_account[account_type]': 'savings', + 'bank_account[ifsc]': 'HDFC0000001' +}); +```js: Emandate (Aadhaar) +razorpay.createPayment({ + amount: 0, + currency: 'INR', + email: 'gaurav.kumar@example.com', + contact: '9111145678', + order_id: 'order_EAbtuXPh24LrEc', + customer_id: 'cust_E9penp7VGhT5yt', + recurring: '1', + method: 'emandate', + bank: 'HDFC', + auth_type: 'aadhaar', + 'bank_account[name]': 'Gaurav Kumar', + 'bank_account[account_number]': '1121431121541121', + 'bank_account[account_type]': 'savings', + 'bank_account[ifsc]': 'HDFC0000001' +}); +```js: Card +razorpay.createPayment({ + amount: 100, + currency: 'INR', + email: 'gaurav.kumar@example.com', + contact: '9111145678', + order_id: 'order_EAbtuXPh24LrE0', + customer_id: 'cust_E9penp7VGhTkeD', + recurring: '1', + method: 'card', + 'card[number]': '4047458064386281', + 'card[cvv]': '123', + 'card[expiry_month]': '01', + 'card[expiry_year]': '22', + 'card[name]': 'Gaurav Kumar' +}); +```js: UPI +razorpay.createPayment({ + "amount": 100, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9111145678", + "order_id": "order_IxWD8iKBkMLwUu", + "customer_id": "cust_H0Hs5VmLjN0ir7", + "recurring": 1, + "method": "upi", + "upi" : { + "flow": "collect", + "vpa": "9876543211@ybl"//Payer VPA in case of collect request + } +``` + +## CRED + +To add CRED as a payment method, you need to: +- Pass the `app_offer` parameter in Orders API. +- Pass the `method` and `provider` parameters in [Create Payment Method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md#133-submit-payment-details). + +#### 1. Pass app_offer Parameter in Order + +You must create an order using Orders API. In the response, you obtain an `order_id` which you must pass to Checkout. + + /orders + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true +}' +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true + }) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => 'receipt#1', 'amount' => 1000, 'currency' => 'INR', 'app_offer'=> true)); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 1000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("app_offer", true); +Order order = client.Order.Create(options); + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000, + currency: "INR", + receipt: "receipt#1", + app_offer: true +}) + +```go: go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 1000, + "currency": "INR", + "receipt": "receipt#1", + "app_offer": true +} +body, err := client.Order.Create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 1000, currency: 'INR', receipt: 'receipt#1', app_offer: true + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); // amount in the smallest currency unit +orderRequest.put("currency", "INR"); +orderRequest.put("receipt", "receipt#1"); +orderRequest.put("app_offer", true); + +Order order = razorpay.orders.create(orderRequest); + +```json: Response +{ + "id": "order_FNPoKwCtPyhJOt", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1596703420 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Default is `INR`. + +`app_offer` _optional_ +: `boolean` Allow/do not allow customers to use CRED coins to make payments. This is used to prevent double discounting scenarios where customers have already availed discounts using voucher/coupon and you do not want them to redeem Coins as well. Possible values: + - `true`: Customer not allowed to use CRED coins to make payment. + - `false` (default): Customer can use CRED coins to make payment. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### 2. Pass Method and Provider Parameters During Payment Creation + +```js: Cred +razorpay.createPayment({ + amount: 12340, + currency: 'INR', + email: 'gaurav.kumar@example.com', + contact: '9111145678', + order_id: 'order_EAbtuXPh24LrEc', + method: 'app', + provider: 'cred' +}); +``` + +#### Request Parameters + +Along with the other checkout options, you must pass: + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it must be `app`. + +`provider` _mandatory if method=app_ +: `string` Name of the PSP app. Here, it must be `cred`. diff --git a/llm-content/payments/payment-gateway/web-integration/custom/payment-methods/upi-intent-mweb.md b/llm-content/payments/payment-gateway/web-integration/custom/payment-methods/upi-intent-mweb.md new file mode 100644 index 00000000..a4e395e0 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/payment-methods/upi-intent-mweb.md @@ -0,0 +1,245 @@ +--- +title: UPI Intent on Mobile Web +description: Let your customers make UPI Intent payments on your mobile websites. +--- + +# UPI Intent on Mobile Web + +Integrate UPI Intent on your mobile app. UPI Intent works for UPI PSP apps and is available on Android and iOS. + +> **WARN** +> +> +> **Watch Out!** +> +> Razorpay UPI Intent is currently not available on CFB (Customer Fee Bearer) model. +> + +## Prerequisites +- [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. +- Integrate with [Razorpay Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). + +## Integration Steps + +Follow the steps given below to integrate UPI intent on your mobile app: + +**1.1** [Show Available Apps](#11-show-available-apps) + +**1.2** [Initiate Payments Using the Intent App](#12-initiate-payment-using-the-intent-app) + +### 1.1 Show Available Apps + +Follow the steps given below to show the available UPI intent apps to your customers: + +1. Add Razorpay.js file to your website. Skip this step if you have already completed it. + + ```js: JavaScript + + ``` + +2. Instantiate Razorpay with your Key ID generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). Skip this step if you have already completed it. + + ```js: JavaScript + var razorpay = new Razorpay({ key: '' }); + ``` + +3. Call the `getSupportedUpiIntentApps` method to get a list of the supported UPI Intent apps. + + ```js: JavaScript + razorpay.getSupportedUpiIntentApps() + .then(() => { + // get list of apps available for payment + }) + .catch(() => { + // no apps available + }); + ``` + + We recommend calling the above function and showing only these options to your customers: + + + +### List of Supported UPI Apps - One-Time Payments + + + Android | iOS + --- + - gpay +- phonepe +- paytm +- cred +- bhim +- popclubapp +- mobikwik +- super_money +- moneyview +- icici +- navi +- payzapp +- any + | - gpay +- phonepe +- paytm +- cred +- bhim +- popclubapp +- mobikwik +- super_money + + + + +> **INFO** +> +> +> **Handy Tips** +> +> The below functionality is only available for Android. +> +> - The `any` option triggers the other UPI payment apps installed on your customer's mobile. +> - You can use `razorpay.checkPaymentAdapter` to check if Gpay is available on your customer's mobile device. You can show only a specific app using the following: +> +> ```js: Gpay +> razorpay.checkPaymentAdapter('gpay') +> .then(() => { +> // gpay is installed +> }) +> .catch(() => { +> // gpay app not installed +> }); +> ``` +> + + + + +### List of Supported UPI Apps - Recurring Payments + + + Android | iOS + --- + - Google Pay +- BHIM +- PhonePe +- PayTM +- Amazon Pay +| - Google Pay +- PhonePe +- PayTM + + + + + + + +### 1.2 Initiate Payment Using the Intent App + +Use the code below to initiate UPI intent payments from your app: + +```js: JavaScript +var paymentData = { + amount: 100000, //pass in paise (amount: 100000 equals ₹1000) + method: 'upi', + contact: '9000090000', // customer's mobile number + email: 'gaurav.kumar@example.com', //customer's email address + order_id: 'order_00000000000001' //.. and other payment parameters, as usual + }; + razorpay.createPayment(paymentData, { app: 'phonepe'}); + razorpay.on('payment.success', function(response) { + // response.razorpay_payment_id + // response.razorpay_order_id + }); + razorpay..on('payment.error', function(error) { + // display error to customer + }); +``` + +## List of Possible Errors + +Below is a list of errors you might face while initiating payments: + +```js: JSON +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Payment failed with selected app.", + "reason": "intent_no_apps_error" + }, + "_silent": false +} + +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "UPI transactions are not enabled for the merchant", + "source": "NA", + "step": "NA", + "reason": "NA", + "metadata": {} + }, + "status_code": 400 +} + +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Payment failed with selected app.", + "reason": "intent_no_apps_error" + }, + "_silent": false +} + +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "You may have cancelled the payment or there was a delay in response from the UPI app.", + "source": "customer", + "step": "payment_authentication", + "reason": "payment_cancelled", + "metadata": { + "payment_id": "pay_LA4ZngnumqsKFW" + } + }, + "status_code": 400, + "_silent": false +} +``` + +#### Error Response Parameters + +Given below is a list of possible errors, and their causes: + +Error | Cause +--- +Payment failed with selected app | The app passed in create payments methods is not supported +Example: If you pass 'phone' instead of 'phonepe'. +--- +UPI transactions are not enabled for the merchant | UPI and UPI Intent methods are not supported. +--- +Payment failed with selected app | Razorpay is not able to open the selected app. +--- +Payment Canceled | Customer calls `cancelPayment` by triggering the exposed method. + +### Best Practices + +Follow these best practices while integrating Razorpay UPI intent with your mobile website: + +1. Only activate the UPI payment intent when a customer initiates it rather than when the page loads. +2. Create a payment immediately after the customer clicks the pay button without extended async operations between these two steps. +3. When a customer chooses a UPI payment method, pass the value into `razorpay.createPayment(paymentData, {app: 'phonepe'})`. +4. Display a loading screen after starting the UPI payment intent flow. Wait until you receive a "success" or "failure" response before cancelling the flow. + + +> **INFO** +> +> +> **Handy Tips** +> +> If you have enabled `redirect: true` on your end, you will receive the success or failure case as a POST request on the callback URL. +> + + +5. We recommend you provide an option to cancel the payment to your customers on the loading screen. +6. Call the `razorpay.emit('payment.cancel')` method to cancel the payment. You can also call this method if a customer exits your app without completing the transaction. Razorpay will then terminate the payment. diff --git a/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md b/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md new file mode 100644 index 00000000..b58ff46b --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md @@ -0,0 +1,541 @@ +--- +title: PhonePe Switch Integration +description: Integrate your Razorpay Custom web application to accept payments in PhonePe Switch platform. +--- + +# PhonePe Switch Integration + +PhonePe Switch platform allows customers to switch seamlessly between PhonePe and their preferred apps within the PhonePe app itself. With a single tap, customers can log in to these apps without downloading them. For example, customers can book cabs or hotel rooms right on the PhonePe app and utilize offers provided by PhonePe. + +PhonePe enables various businesses to integrate their web apps or mobile sites with the Switch platform and instantly reach out to the PhonePe user base. By integrating Razorpay APIs with PhonePe Switch payment flow, you can accept in-app payments made by your customers without having to worry about handling settlements or reconciliation separately. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## User Flow + +The user's journey through this entire flow is outlined below: + +1. Customers log in to the PhonePe app and click **PhonePe Switch**. +2. In the PhonePe Switch, customers select your app, place orders and click **Proceed to Pay**. +3. Customers are redirected to the PhonePe payment page. +4. After the successful payment on the PhonePe payment page, customers are redirected to your website. + +## Prerequisites + +Before integrating with the Checkout, run through this checklist: + +- Check if your webapp is integrated with PhonePe Switch. +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md). +- Sign up for a Razorpay Account. +- Generate the API keys from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#api-keys). Use the test API Keys to test out the integration. + +Watch the video to see how to generate API key in Test Mode. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +> **WARN** +> +> +> **PCI DSS Certification** +> +> A customer's payment information should never reach your servers, unless you are PCI DSS certified. +> + +## Integration Steps + +Steps to integrate Custom Checkout in your site: + +1. [Create an Order from your Server](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md#step-1-create-an-order-from-your-server). +1. [Invoke Checkout and Pass Order Id and Other Options to it](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md#step-2-invoke-checkout-and-pass-order-id) + 1. [Include the JavaScript code in your Webpage](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md#step-21-include-the-javascript-code-in-your). + 1. [Instantiate Razorpay Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md#step-22-instantiate-razorpay-custom-checkout). + 1. [Submit Payment Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md#step-23-submit-payment-details). +1. [Store Fields in Your Server](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md#step-3-store-fields-in-your-server). +1. [Verify the Signature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md#step-4-verify-the-signature). + +### Step 1: Create an Order in your Server + +When a customer places an order on your website or application, use the details to create an order on Razorpay. + +/orders + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ + -d '{ + "amount": 1000, + "currency": "INR", + "receipt": "merchant_txn_id" + "phonepe_switch_context" : "{\n\"orderContext\":{\"trackingInfo\":{\n\"type\":\"HTTPS\",\"url\":\"https://google.com\"}},\"fareDetails\":{\n\"payableAmount\":3900,\"totalAmount\":3900},\"cartDetails\":{\"cartItems\":[{\"quantity\":1,\"address\":{\"addressString\":\"TEST\",\"city\":\"TEST\",\"pincode\":\"TEST\",\"country\":\"TEST\",\n\"latitude\":1,\"longitude\":1},\"shippingInfo\":{\n\"deliveryType\":\"STANDARD\",\"time\":{\"timestamp\":1561540218,\"zoneOffSet\":\"+05:30\"\n\n\n}},\n\n\n\n\n\"category\":\"SHOPPING\",\"itemId\":\"1234567890\",\n\"price\":3900,\"itemName\":\"TEST\"}]}}" +}' +```json: Response +{ + "id": "order_EdUtuxhupLSOUH", + "entity": "order", + "amount": 1000, + "amount_paid": 0, + "amount_due": 1000, + "currency": "INR", + "receipt": "merchant_txn_id", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1586677700 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. + You can create Orders in **INR** only. + +`receipt` _optional_ +: `string` Your receipt ID for this order can be passed here. Maximum length is 40 characters. + +`phonepe_switch_context` _optional_ + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Step 2: Invoke Checkout and Pass Order Id and Other Options to it + +#### Step 2.1: Include the JavaScript code in your Webpage + +Include the following script, preferably in `` section of your page: + +```html: Index HTML + +``` + +> **INFO** +> +> +> **Including the Javascript, not the Library** +> +> Include the script from `https://checkout.razorpay.com/v1/razorpay.js` instead of serving a copy from your own server. This allows new updates and bug fixes to the library to get automatically served to your application. +> +> We always maintain backward compatibility with our code. +> + +#### Step 2.2: Instantiate Razorpay Custom Checkout + +#### Single Instance on a Page + +```js: Invoke a Single Instance +var razorpay = new Razorpay({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}); +``` + +#### Multiple Instances on Same Page + +If you need multiple razorpay instances on same page, you can globally set some of the options: + +```js: Invoke Multiple Instances +Razorpay.configure({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}) +new Razorpay({}); // will inherit key and image from above. +``` +#### Step 2.3: Submit Payment Details + +Once the order is created and the customer's payment details are obtained, the information should be sent to Razorpay to complete the payment. The data that needs to be submitted depends upon the payment method selected by the customer. + +You can do this by invoking `createPayment` method: + +```js: createPayment with handler Function + var data = { + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR", + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: "order_EdUtuxhupLSOUH", // Enter the order ID obtained from Step 1 + method: 'wallet', + wallet: 'phonepeswitch' + }; + + var btn = document.querySelector('#btn'); + btn.addEventListener('click', function(){ + razorpay.createPayment(data); + + razorpay.on('payment.success', function(resp){ + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature) + }); // will pass payment ID, order ID, and Razorpay signature to success handler. + + razorpay.on('payment.error', function(resp){ + alert(resp.error.description)}); // will pass error object to error handler + }); +```js: createPayment with callback URL + var data = { + callback_url: 'https://www.examplecallbackurl.com/', + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR", + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: "order_EdUtuxhupLSOUH", // Enter the order ID obtained from Step 1 + method: 'wallet', + wallet: 'phonepeswitch' + }; + + var btn = document.querySelector('#btn'); + btn.addEventListener('click', function(){ + razorpay.createPayment(data); + }); +``` + +> **ERROR** +> +> +> **Note** +> +> The `createPayment` method should be called within an event listener triggered by user action to prevent the popup from being blocked. For example: +> + +> ```js +> $('button').click( function (){ razorpay.createPayment(...) }) +> ``` +> + +> **INFO** +> +> +> **Handler Function vs Callback URL** +> +> - **Handler Function**: +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL**: +> +When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. +> + +### Step 3: Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +### Step 4: Verify the Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +## Payment Capture Settings + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +### Related Information + +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) (Recommended) +- [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) (Recommended) +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md) +- [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md) +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) diff --git a/llm-content/payments/payment-gateway/web-integration/custom/test-integration.md b/llm-content/payments/payment-gateway/web-integration/custom/test-integration.md new file mode 100644 index 00000000..a8b55eeb --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/test-integration.md @@ -0,0 +1,137 @@ +--- +title: 2. Test Integration +description: Steps to test if the custom Web integration was successful. +--- + +# 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## Next Steps + +[Step 3: Go Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/go-live-checklist.md) diff --git a/llm-content/payments/payment-gateway/web-integration/custom/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/web-integration/custom/troubleshooting-faqs.md new file mode 100644 index 00000000..cf9ef4fb --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/custom/troubleshooting-faqs.md @@ -0,0 +1,16 @@ +--- +title: Troubleshooting & FAQs +description: Troubleshoot common errors and find answers to frequently asked questions related to Razorpay Web Custom Checkout Integration. +--- + +# Troubleshooting & FAQs + +### 1. I am getting errors like “Your Payment was not successful as you have entered invalid card details. To pay successfully try adding the right details” or “Your Payment could not be completed as this bank is not enabled by the business. To complete the payment, use another account.” What should I do? + + You may be experiencing the above errors because your account may not have the necessary payment methods and banks enabled. To enhance your customer experience, please contact our [Support team](https://razorpay.com/support/) and enable the correct methods and banks for your account. + + + +### 2. Which payment methods appear on Instagram/Facebook browsers? + + UPI Intent is the only payment method that appears on Instagram/Facebook browsers. These browsers do not support payment methods that open in a pop-up page. diff --git a/llm-content/payments/payment-gateway/web-integration/hosted.md b/llm-content/payments/payment-gateway/web-integration/hosted.md new file mode 100644 index 00000000..70dffcf5 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/hosted.md @@ -0,0 +1,50 @@ +--- +title: Prerequisites | Razorpay Hosted Checkout +heading: Prerequisites +description: Check the prerequisites before you integrate with Razorpay Hosted Checkout. +--- + +# Prerequisites + +- **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about Hosted Web Integration. + +Hosted Checkout is a standard redirection-based integration where the complete checkout is developed and managed by Razorpay. + +- Hosted Checkout lets you hand over the control of the entire checkout process to Razorpay. As the customer payment information is securely stored with Razorpay, you do not have to worry about implementing the PCI compliance requirements at your end. +- Unlike Standard Checkout, where customers enter their payment details on a pop-up page, Hosted Checkout securely redirects customers to a separate page hosted by Razorpay. The payment details submitted by the customer are sent to our server. + +![](/docs/assets/images/hosted-payments.jpg) + +## Supported Payment Methods + +Payment Methods such as netbanking, credit and debit cards, wallets, UPI and Pay Later are available by default on Hosted Checkout. + +> **WARN** +> +> +> +> **Watch Out!** +> +> We do not support EMI, Offers and UPI intent on Hosted Checkout. +> + +Know how to [enable](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md#enable-payment-methods) and [disable](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md#disable-payment-methods) Payment Methods from the Dashboard. + +## Integration Steps + +**Before you proceed:** + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +Follow these integration steps: + +- [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/hosted/integration-steps.md#1-build-integration) +- [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/hosted/integration-steps.md#2-test-integration) +- [Go-live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/hosted/integration-steps.md#3-go-live-checklist) + +### Related Information + +- [Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/hosted/best-practices.md) +- [Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/hosted/troubleshooting-faqs.md) diff --git a/llm-content/payments/payment-gateway/web-integration/hosted/best-practices.md b/llm-content/payments/payment-gateway/web-integration/hosted/best-practices.md new file mode 100644 index 00000000..212dc477 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/hosted/best-practices.md @@ -0,0 +1,39 @@ +--- +title: Hosted Web Integration - Best Practices | Razorpay Payment Gateway +heading: Best Practices +description: Best practices for a smoother Hosted Web Integration and payment experience. +--- + +# Best Practices + +Follow these best practices while integrating with Hosted Checkout: + +## 1. Capture Payment Using Payment Capture Settings + +You must capture the authorised payments for the settlement of the payments in your bank account. Use the [Payment Capture Setting](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/hosted/integration-steps.md#3-go-live-checklist/#payment-capture) to configure the capture settings at an account level via the Dashboard. + +## 2. Integrate Orders API + +Orders bind multiple payment attempts for a single order. This helps to prevent multiple payments. Integrate with Orders API on your server-side and pass the `order_id` to Checkout. + +## 3. Verify Signature to Avoid Data Tampering + +This mandatory step allows you to confirm the authenticity of the details returned to the Checkout form for successful payments. [Verify payment signature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/hosted/integration-steps.md#1-build-integration/#14-verify-payment-signature). + +## 4. Check Payment/Order Status before Providing Services + +Check the payment/order status, that is, if the payment's status is `captured` and the order's status is `paid` before proving the services to the customers. + + + - [Fetch Status of a Payment using Payment ID API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md) + + - [Fetch Status of an Order using Order ID API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) + + + +## 5. Implement Webhooks + +Implement webhooks or the query API to avoid any cases of callback failure (drop-offs could be connectivity or network failure) and to verify the payment details via an S2S call. Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). You should enable the following webhooks: + - `payment.captured` + - `payment.failed` + - `order.paid` diff --git a/llm-content/payments/payment-gateway/web-integration/hosted/integration-steps.md b/llm-content/payments/payment-gateway/web-integration/hosted/integration-steps.md new file mode 100644 index 00000000..160f9333 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/hosted/integration-steps.md @@ -0,0 +1,737 @@ +--- +title: Hosted Integration - Integration Steps | Razorpay Payment Gateway +heading: Integration Steps +description: Steps to integrate with Razorpay Hosted Web Integration. +--- + +# Integration Steps + +### Video Tutorial + + Watch this video to know how to integrate Razorpay Hosted Checkout on your website. + +[Video: https://www.youtube.com/embed/5FdxeGK2Wfo?si] + + + +Follow these steps to integrate the Hosted Checkout form on your website: + +1. [Build Integration](#1-build-integration): Use the sample codes to integrate the Razorpay Hosted Integration on your website. +2. [Test Integration](#2-test-integration): Make a test payment using the payment methods configured at checkout to ensure the integration is working as expected. +3. [Go-live Checklist](#3-go-live-checklist): Check the go-live checklist before taking the integration live. + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Create an Order in Server + + **Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order using: + + + Use this endpoint to create an order using the Orders API. + + /orders + + ```curl: Curl + curl -X POST https://api.razorpay.com/v1/orders + -U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -H 'content-type:application/json' + -d '{ + "amount": 50000, + "currency": "", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230 + }' + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", ""); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + DATA = { + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } + } + client.order.create(data=DATA) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('receipt' => '123', 'amount' => 50000, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + ```csharp: .NET + RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.add("receipt", "order_rcptid_11"); + options.add("currency", ""); + Order order = client.Order.Create(options); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + options = amount: 50000, currency: '', receipt: '' + order = Razorpay::Order.create + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "", + receipt: "receipt#1", + notes: { + key1: "value3", + key2: "value2" + } + }) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "", + "receipt": "some_receipt_id" + } + body, err := client.Order.Create(data) + ``` + + ```json: Success Response + { + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 + } + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + + You can use the Postman workspace below to create an order: + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + + You can create an order manually by integrating the API sample codes on your server. + + + + Request Parameters + + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `22225`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of ₹7,000 is to be received from the customer in two installments of #1 - ₹5,000, #2 - ₹2,000, then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + +### 1.2 Pass Payment Options to Hosted Checkout + + Add the Pay button on your web page using the checkout code given below. The hosted checkout page is displayed when the customers click the Pay button. + + + 1.2.1 Code to Add Pay Button + + The Checkout options are sent as form-data to the following URL in a POST request. + + `POST: https://api.razorpay.com/v1/checkout/embedded` + + + + The sample code is given below: + + ```html: Hosted Checkout + + + + + + + + + + + + + + + Submit + + ``` + + + + + - For every successful payment, `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` are submitted via a POST request to the `callback_url` passed in payment options. + - If your customer cancels the transaction or clicks the back button, they are redirected to the `cancel_url` via a GET request. + - If the payment fails, a POST request is made to the `callback_url`, with the error fields as payload. + + + + + +### 1.2.2 Checkout Options + +`key_id` _mandatory_ +: `string` Enter [YOUR_Key_ID] generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + +`name` _mandatory_ +: `string` The business name to be shown in the checkout form. + +`description`_optional_ +: `string` Description of the item purchased shown in the checkout form. + +`image` _optional_ +: `string` URL of the logo that must appear on the checkout form. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order, created using the Orders API. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, `INR`. Refer to the [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) for a list of supported international currencies. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`method` _optional_ +: `string` Use this parameter to display a specific payment method in Checkout. Possible values: + - `card` + - `netbanking` + - `wallet` + - `upi` + - `paylater` + +`prefill` +: The fields that can be pre-populated in the Checkout form. + + `name` _optional_ + : `string` Name of the cardholder. + + `email` _mandatory_ + : `string` Email address of the customer. + + `contact` _mandatory_ + : `string` Customer's phone number. + +`notes`_optional_ +: `object` An additional set of fields that you want to associate with the payment. For example, you can add "shipping address" and "alternate contact" in the Notes field. You can specify up to 15 note fields. + + `Shipping address` + : `string` 106, Razorpay, Bangalore + + `Alternate contact` + : `string` 9000090000 + +`callback_url` _mandatory_ +: `string` Page to which the customers are redirected to after a successful payment. `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` are sent as form-data through a `POST` request to the `callback_url`. + + +> **INFO** +> +> +> **Handy Tips** +> +> Callback URL is not required if you are using the native SDK for Android/iOS. +> + +`cancel_url`_optional_ +: `string` The URL customers are redirected to after the cancellation of a payment. + + + + + + +### 1.3 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.4 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + Here are the links to our [SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md#github-and-documentation-links-for-sdks) for the supported platforms. + + + +### 1.5 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +## 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +You can make test payments using one of the payment methods configured at the Checkout. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + + +### Supported Payment Methods + + Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others require approval from us. Raise a request from the Dashboard to enable such payment methods. + + + + + Payment Method | Code | Availability + --- + [Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ + --- + [Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ + --- + [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ + --- + [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ + --- + [Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ + --- + [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + + + + + + + + + ### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + ### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the following lists: + - [Supported UPI Flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + - [UPI Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/upi.md). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + ### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + #### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + - [Test Error Scenarios](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards). + + #### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + ### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + + + + + +## 3. Go-live Checklist + +Check the go-live checklist for Razorpay Hosted Checkout integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/payment-gateway/web-integration/hosted/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/web-integration/hosted/troubleshooting-faqs.md new file mode 100644 index 00000000..67ac8359 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/hosted/troubleshooting-faqs.md @@ -0,0 +1,53 @@ +--- +title: Hosted Web Integration - Troubleshooting & FAQs | Razorpay Payment Gateway +heading: Troubleshooting & FAQs +description: Troubleshoot common errors and find answers to frequently asked questions related to Razorpay Hosted Web Integration. +--- + +# Troubleshooting & FAQs + +### 1. What is Razorpay Hosted Checkout? + + Razorpay Hosted Checkout is a secure and customisable solution for accepting payments on your website. It allows you to redirect customers to a Razorpay-hosted page to complete their transactions, ensuring data security and compliance with payment regulations. + + + +### 2. What payment methods are supported by Razorpay Hosted Checkout? + + Razorpay Hosted Checkout supports a wide range of payment methods including netbanking, credit and debit cards, wallets, UPI and Pay Later . You can offer your customers multiple payment options to enhance their checkout experience. + + + +> **WARN** +> +> +> **Watch Out!** +> +> We do not support EMI, Offers and UPI intent on Hosted Checkout. +> + + + + + + + +### 3. Which webhook events should I enable to ensure proper payment tracking? + + To ensure proper payment tracking and receive real-time updates, you should enable the following webhook events: + + - `payment.captured` + - `payment.failed` + - `order.paid` + + + +### 4. How can I avoid cases of callback failure? + + To avoid cases of callback failure due to connectivity or network issues, implement webhooks or use the query API. Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + + + +### 5. Will an order_id be generated each time a user visits the pricing page? How can I handle the order_id when there is limited time to make a POST form call? + + The order_id can be generated in real time as required. Your implementation should be designed to handle the order_id generation at the moment it is required, ensuring that the necessary POST form call can be made efficiently. diff --git a/llm-content/payments/payment-gateway/web-integration/standard.md b/llm-content/payments/payment-gateway/web-integration/standard.md new file mode 100644 index 00000000..f99259ba --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard.md @@ -0,0 +1,130 @@ +--- +title: Prerequisites | Razorpay Standard Checkout +heading: Prerequisites +description: Check the prerequisites before you integrate with Razorpay Web Standard Checkout. +--- + +# Prerequisites + +- **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about Web Standard Checkout Integration. + +You can start accepting payments from customers on your website using the Razorpay Web Standard Checkout. Razorpay has developed the Standard Checkout method and manages it. You can configure payment methods, orders, company logo and also select custom colour based on your convenience. + +![Razorpay Payment Gateway Demo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/demo.gif.md) + +> **WARN** +> +> +> **Watch Out!** +> +> Razorpay Checkout is not supported on the Internet Explorer browser. +> + + + Check the list of features Razorpay offers to help you build a world-class payment experience. + + + - **Video Tutorial**: Watch this video to know how to integrate Razorpay Web Standard Checkout on your HTML and JS-based website. + +## Client Libraries + +The client SDK libraries are available on GitHub. You can use the API keys generated above to try out the API sample codes: + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + +## Integration Steps + +**Before you proceed:** + + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +Follow these integration steps: + + - **1. Build Integration**: Integrate Web Standard Checkout. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +> **INFO** +> +> +> **Other Solutions** +> +> - If you use WordPress, Magento, WooCommerce, Shopify and other **ecommerce platforms** for your platform, use our [ecommerce plugins](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins.md). +> +> - You can use [Razorpay Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md) to gain control over the checkout experience. Custom Checkout integration is more complex than Standard Checkout integration and you will require a development team on your end to complete the integration. +> +> +> - Need a **Pay** button without doing any integration? Use [Razorpay Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md). +> +> + +### Related Information + +- [Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/troubleshooting-faqs.md) +- [Bank Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/downtime-updates.md) diff --git a/llm-content/payments/payment-gateway/web-integration/standard/best-practices.md b/llm-content/payments/payment-gateway/web-integration/standard/best-practices.md new file mode 100644 index 00000000..d6d30d67 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/best-practices.md @@ -0,0 +1,40 @@ +--- +title: Best Practices for Standard Checkout Integration +description: Best practices for a smoother Standard Checkout web integration and payment experience. +--- + +# Best Practices for Standard Checkout Integration + +Follow the best practices for a smooth Standard Checkout web integration. + +1. **Capture Payment Using Payment Capture Settings** + + You **must capture** the authorised payments for the **settlement of the payments** in your bank account. Use the [Payment Capture Setting](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) to configure the capture settings at an account level via the Dashboard. + +2. **Integrate Orders API** + + Orders bind multiple payment attempts for a single order. This helps to **prevent multiple payments**. [Integrate with Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#11-create-an-order-in-server) on your server-side and pass the `order_id` to Checkout. + +3. **Verify Signature to Avoid Data Tampering** + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. Know how to [verify payment signature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#15-verify-payment-signature). + +4. **Check Payment/Order Status before Providing Services** + + Check the payment/order status, that is if the payment's status is `captured` and the order's status is `paid` before proving the services to the customers. + + - [Fetch All Payments for an Order API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-payments.md) + - [Fetch Status of a Payment using Payment id API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md) + - [Fetch Status of an Order using Order id API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) + +5. **Implement Webhooks** + + Implement webhooks or the query API to avoid callback failure (drop-offs could be due to connectivity or network failure) and to verify the payment details via an S2S call. Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md). You should enable the following webhooks: + + - `payment.captured` + - `payment.failed` + - `order.paid` + +6. **Implement Callback URL** + + Sites like Instagram, Facebook Messenger, Opera and UC browser do not support i-frame. You should implement [callback URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/callback-url.md) if your customers use any of these for making payments. diff --git a/llm-content/payments/payment-gateway/web-integration/standard/chargeback.md b/llm-content/payments/payment-gateway/web-integration/standard/chargeback.md new file mode 100644 index 00000000..11f272cd --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/chargeback.md @@ -0,0 +1,51 @@ +--- +title: Web Integration - Razorpay Standard Checkout +description: Integrate Razorpay Standard Checkout with your website to start accepting payments. +--- + +# Web Integration - Razorpay Standard Checkout + +You can start accepting payments from customers on your website using the Razorpay Web Standard Checkout. Razorpay has developed the Standard Checkout method and manages it. You can configure payment methods, orders, company logo and also select custom colour based on your convenience. + +![Razorpay Payment Gateway Demo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/demo.gif.md) + +> **WARN** +> +> +> **Watch Out!** +> +> Razorpay Checkout is not supported on the Internet Explorer browser. +> + +## Prerequisites + +Before integrating with the Checkout, run through this checklist: + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. +- Know about the [Razorpay Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md). + +> **WARN** +> +> +> +> **Watch Out!** +> +> A customer's payment information should never reach your servers unless you are PCI-DSS certified. +> + +## Integration Steps + +Follow these integration steps: + +1. Build Integration +- [E-Commerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/chargeback/build-integration-ecommerce.md) +- [Hotel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/chargeback/build-integration-hotel.md) +- [Travel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/chargeback/build-integration-travel.md) +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/chargeback/test-integration.md) +3. [Go-Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/chargeback/go-live-checklist.md) + +### Related Information + +- [Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/best-practices.md) +- [Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/payment-gateway/web-integration/standard/chargeback/build-integration-ecommerce.md b/llm-content/payments/payment-gateway/web-integration/standard/chargeback/build-integration-ecommerce.md new file mode 100644 index 00000000..5b4c35c3 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/chargeback/build-integration-ecommerce.md @@ -0,0 +1,1059 @@ +--- +title: 1. E-Commerce Build Integration +description: Steps to integrate the Standard Checkout form on your website. +--- + +# 1. E-Commerce Build Integration + +Follow these steps to integrate the standard checkout form on your website: + +**1.1** [Generate API Keys](#11-generate-api-keys). + +**1.2** [Create an order in server](#12-create-an-order-in-server). + +**1.3** [Integrate with checkout on client-side](#13-integrate-with-checkout-on-client-side). + +**1.4** [Handle payment success and failure](#14-handle-payment-success-and-failure). + +**1.5** [Store fields in server](#15-store-fields-in-your-server). + +**1.6** [Verify payment signature](#16-verify-payment-signature). + +**1.7** [Verify payment status](#17-verify-payment-status). + +## 1.1 Generate API Keys + +Follow these steps to generate API keys: + + + Watch this video to see how to generate API keys in the Test mode. + + +[Video: https://www.youtube.com/embed/VOn8JlGPG2I?si=WTAbAeLB3Hnp1n3r] + + + + + Watch this video to see how to generate API keys in the Live mode. + + +[Video: https://www.youtube.com/embed/Cer8UfBGX_E?si=Libr1RXoFSEDfY1c] + + + +1. Log in to your Dashboard with the appropriate credentials. +2. Select the mode (**Test** or **Live**) for which you want to generate the API key. + - **Test Mode**: The test mode is a simulation mode that you can use to test your integration flow. **Your customers will not be able to make payments in this mode**. + - **Live Mode**: When your integration is complete, switch to live mode and generate live mode API keys. In the integration, **replace test mode keys with live mode keys to accept customer payments**. +3. Navigate to **Account & Settings** → **API Keys** (under **Website and app settings**) → **Generate Key** to generate key for the selected mode. + +> **WARN** +> +> +> **Watch Out!** +> +> - After generating the keys from the Dashboard, download and save them securely. You can use only one set of API keys. If you do not remember your API keys, you must [regenerate them](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#regenerate-api-keys) from the Dashboard and update them wherever the previous keys were used for payment gateway integrations. +> - API Keys are universal; that is, they are applicable to all websites and apps that you have whitelisted for your Merchant ID. +> - **Do not share your API Key secret** with anyone or on any public platforms. **This can pose security threats to your Razorpay account**. +> - Once you generate the API Keys, only the **Key Id** is visible on the Dashboard, **not the Key secret**, as it can pose security threats to your Razorpay account. +> - Use the **Live API Keys** to accept live payments and the **Test API Keys** for test transactions. +> + +Once generated, you will be able to see the Key id, the date the key was created and the expiry date for the API Key on screen. + +> **WARN** +> +> +> **Watch Out!** +> +> Save your Key ID and Key Secret securely (never expose the Key Secret in client-side code). +> + +## 1.2 Create an Order in Server + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The order_id received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "partial_payment": false, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "shipping_details": { + "method": "sameday", + "gift_wrap": false + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "e_commerce", + "sku": "1gr367", + "name": "TEST", + "description": "TEST", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "e_commerce": { + "other_product_codes": { + "upc": "12r34", + "ean": "123r4", + "unspsc": "123s4" + } + } + } + ], + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +``` + +```json: Response +{ + "id": "order_QU1wpqJfs7smfR", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "created_at": 1747055716 +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _optional_ + : `json object` Details about the customer/user. + + `name` _optional_ + : `string` The customer’s name. For example, `Gaurav Kumar`. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `+919000090000`. + + `email` _optional_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the merchant platform. For example, `22`. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the merchant platform. For example, `4`. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, `1234567890`. + + `shipping_address` _optional_ + : `Json object` This will have details about the order's shipping address. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560068`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `billing_address` _optional_ + : `Json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `shipping_details` _optional_ + : `Json object` This will have the order's shipping details. + + `method` _optional_ + : `enum` Shipping method for the product. Possible values: + - `lowcost`: Lowest-cost service. + - `sameday`: Courier or same-day service. + - `oneday`: Next-day or overnight service. + - `twoday`: Two-day service. + - `threeday`: Three-day service. + - `pickup`: Store pick-up. + - `other`: Other shipping method. + - `none`: No shipping method because the product is a service or subscription. + + `gift_wrap` _optional_ + : `boolean` Indicates whether the customer requested gift wrapping for this purchase. This field can contain one of the following values: + - `1`: The customer requested gift wrapping. + - `0`: The customer did not request gift wrapping. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `sku` _optional_ + : `string ` The unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business runs a discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `e_commerce` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `other_product_codes` _optional_ + : `object` Array to collect different codes that can identify the item type. Possible values: + + `upc` _optional_ + : `string` Universal Product Code (UPC; redundantly: UPC code) is a barcode symbology used worldwide to track trade items in stores. UPC consists of 12 numeric digits that are uniquely assigned to each trade item + + `ean` _optional_ + : `string` European Article Numbers (EAN) is a type of barcode that encodes an article number. Contains 8 (EAN-8) or 13 (EAN-13) numerical digits. + + `unspsc` _optional_ + : `string` The United Nations Standard Products and Services Code (UNSPSC) is a taxonomy of products and services used in eCommerce. It is a four-level hierarchy coded as an eight-digit number, with an optional fifth level adding two more digits. + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `JSON object` Details of the campaign. *Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, PQR12453. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Example values: google, newsletter. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: cpc, banner, etc. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +## 1.3 Integrate with Checkout on Client-Side + +Add the Pay button on your web page using the checkout code, Handler Function or Callback URL. + +### Handler Function or Callback URL + +**Handler Function** | **Callback URL** +--- +When you use this: - On successful payment, the customer is shown your web page. +- On failure, the customer is notified of the failure and asked to retry the payment. + | When you use this: - On successful payment, the customer is redirected to the specified URL, for example, a payment success page. +- On failure, the customer is asked to retry the payment. + +### Code to Add Pay Button + +Copy-paste the parameters as `options` in your code: + +```html: Callback URL (JS) Checkout Code +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise + "currency": "INR", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_9A33XWu170gUtm", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information especially their phone number + "name": "Gaurav Kumar", //your customer's name + "email": "gaurav.kumar@example.com", + "contact": "9000090000" //Provide the customer's phone number for better conversion rates + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +```html: Handler Functions (JS) Checkout Code +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise + "currency": "INR", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_9A33XWu170gUtm", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information, especially their phone number + "name": "Gaurav Kumar", //your customer's name + "email": "gaurav.kumar@example.com", + "contact": "9000090000" //Provide the customer's phone number for better conversion rates + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); +}); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +``` + + +### Checkout Parameters + + `key` _mandatory_ + : `string` API Key ID generated from the Dashboard. + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `name` _mandatory_ + : `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + + `description` _optional_ + : `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + + `image` _optional_ + : `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + + `order_id` _mandatory_ + : `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + `prefill` + : `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + + `notes` _optional_ + : `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + + `theme` + : `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + + `modal` + : `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + + `subscription_id` _optional_ + : `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + + `subscription_card_change` _optional_ + : `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + + `recurring` _optional_ + : `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + + `callback_url` _optional_ + : `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + + `redirect` _optional_ + : `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + + `customer_id` _optional_ + : `string` Unique identifier of customer. Used for: + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + + `remember_customer` _optional_ + : `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + + `timeout` _optional_ + : `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + + `readonly` + : `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `hidden` + : `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `send_sms_hash` _optional_ + : `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + + `allow_rotation` _optional_ + : `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + + `retry` _optional_ + : `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + + `config` _optional_ + : `object` Parameters that enable checkout configuration. + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + +> **INFO** +> +> +> +> **Handy Tips** +> +> The open method of Razorpay object (`rzp1.open()`) must be invoked by your site's JavaScript, which may or may not be a user-driven action such as a click. +> + +## Errors + +Given below is a list of errors you may face while integrating with checkout on the client-side. + +Error | Cause | Solution +--- +The id provided does not exist. | Occurs when there is a mismatch between the API keys used while creating the `order_id`/`customer_id` and the API key passed in the checkout. | Make sure that the API keys passed in the checkout are the same as the API keys used while creating the `order_id`/`customer_id`. +--- +Blocked by CORS policy. | Occurs when the server-to-server request is hit from the front end instead. | Make sure that the API calls are made from the server side and not the client side. + +### Configure Payment Methods (Optional) + +Multiple payment methods are available on the Razorpay Web Standard Checkout. +- The payment methods are **fixed** and cannot be changed. +- You can configure the order or make certain payment methods prominent. Know more about [configuring payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + +## 1.4 Handle Payment Success and Failure + +The way the Payment Success and Failure scenarios are handled depends on the [Checkout Sample Code](#code-to-add-pay-button) you used in the last step. + +### Checkout with Handler Function + +If you used the sample code with the handler function: + + + The customer sees your website page. The checkout returns the response object of the successful payment (**razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature**). Collect these and send them to your server. + + + + + The customer is notified about payment failure and asked to retry the payment. Know about the [error parameters.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md#response-parameters) + + ```js: Failure Handling Code + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + } + ``` + + +### Checkout with Callback URL + +If you used the sample code with the callback URL: + + + + Razorpay makes a POST call to the callback URL with the **razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature** in the response object of the successful payment. Only successful authorisations are auto-submitted. + + + + + In case of failed payments, the checkout is displayed again to facilitate payment retry. + + +## 1.5 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +## 1.6 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +Here are the links to our [SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#client-libraries) for the supported platforms. + +## 1.7 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/chargeback/test-integration.md) diff --git a/llm-content/payments/payment-gateway/web-integration/standard/chargeback/build-integration-hotel.md b/llm-content/payments/payment-gateway/web-integration/standard/chargeback/build-integration-hotel.md new file mode 100644 index 00000000..6e4ec359 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/chargeback/build-integration-hotel.md @@ -0,0 +1,1152 @@ +--- +title: 1. Hotel Build Integration +description: Steps to integrate the Standard Checkout form on your website. +--- + +# 1. Hotel Build Integration + +Follow these steps to integrate the standard checkout form on your website: + +**1.1** [Generate API Keys](#11-generate-api-keys). + +**1.2** [Create an order in server](#12-create-an-order-in-server). + +**1.3** [Integrate with checkout on client-side](#13-integrate-with-checkout-on-client-side). + +**1.4** [Handle payment success and failure](#14-handle-payment-success-and-failure). + +**1.5** [Store fields in server](#15-store-fields-in-your-server). + +**1.6** [Verify payment signature](#16-verify-payment-signature). + +**1.7** [Verify payment status](#17-verify-payment-status). + +## 1.1 Generate API Keys + +Follow these steps to generate API keys: + + + Watch this video to see how to generate API keys in the Test mode. + + +[Video: https://www.youtube.com/embed/VOn8JlGPG2I?si=WTAbAeLB3Hnp1n3r] + + + + + Watch this video to see how to generate API keys in the Live mode. + + +[Video: https://www.youtube.com/embed/Cer8UfBGX_E?si=Libr1RXoFSEDfY1c] + + + +1. Log in to your Dashboard with the appropriate credentials. +2. Select the mode (**Test** or **Live**) for which you want to generate the API key. + - **Test Mode**: The test mode is a simulation mode that you can use to test your integration flow. **Your customers will not be able to make payments in this mode**. + - **Live Mode**: When your integration is complete, switch to live mode and generate live mode API keys. In the integration, **replace test mode keys with live mode keys to accept customer payments**. +3. Navigate to **Account & Settings** → **API Keys** (under **Website and app settings**) → **Generate Key** to generate key for the selected mode. + +> **WARN** +> +> +> **Watch Out!** +> +> - After generating the keys from the Dashboard, download and save them securely. You can use only one set of API keys. If you do not remember your API keys, you must [regenerate them](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#regenerate-api-keys) from the Dashboard and update them wherever the previous keys were used for payment gateway integrations. +> - API Keys are universal; that is, they are applicable to all websites and apps that you have whitelisted for your Merchant ID. +> - **Do not share your API Key secret** with anyone or on any public platforms. **This can pose security threats to your Razorpay account**. +> - Once you generate the API Keys, only the **Key Id** is visible on the Dashboard, **not the Key secret**, as it can pose security threats to your Razorpay account. +> - Use the **Live API Keys** to accept live payments and the **Test API Keys** for test transactions. +> + +Once generated, you will be able to see the Key id, the date the key was created and the expiry date for the API Key on screen. + +> **WARN** +> +> +> **Watch Out!** +> +> Save your Key ID and Key Secret securely (never expose the Key Secret in client-side code). +> + +## 1.2 Create an Order in Server + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The order_id received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1101", + "partial_payment": false, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "hotel", + "sku": "1gr367", + "name": "Grand Palace Hotel", + "description": "2BHK villa", + "quantity": 2, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "hotel": { + "sub_type": "stay", + "checkin_date": "2019-07-16", + "checkout_date": "2019-07-16", + "property_type": "", + "star_rating": 5, + "brand": "Grand Mercure", + "address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "class": "business", + "identity": { + "unique_national_id": "ABCDE1234Z", + "tax_id": "ABCDE1234Z" + } + }, + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "class": "business", + "identity": { + "unique_national_id": "ABCDE1234Z", + "tax_id": "ABCDE1234Z" + } + } + ] + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +``` + +```json: Response +{ + "id": "order_QU1wpqJfs7smfR", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "created_at": 1747055716 +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _optional_ + : `json object` Details about the customer/user. + + `name` _optional_ + : `string` The customer’s name. For example, Gaurav Kumar. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, +919000090000. + + `email` _optional_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the merchant platform. For example, `22`. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the merchant platform. For example, `4`. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, `1234567890`. + + `billing_address` _optional_ + : `Json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e-commerce` + - `mutual_fund` + + `sku` _optional_ + : `string ` unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business is running any discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `hotel` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `sub_type` _optional_ + : `enum` The sub-type of the line item. Possible values: + - `stay` + - `breakfast` + - `dinner` + - `lunch` + - `early_checkin` + - `late_chechout` + - `others` + + `checkin_date` _optional_ + : `string` Represents an ISO 8601-encoded date string. For example, September 7, 2019 is represented as "2019-07-16". + + `checkout_date` _optional_ + : `string` Represents an ISO 8601-encoded date string. For example, September 7, 2019 is represented as "2019-07-16". + + `property_type` _optional_ + : `string` Represents the type of the property. Possible values: + - `resort` + - `hostel` + - `hotel` + - `inn` + - `lodge` + - `motel` + - `apartment` + - `bed_and_breakfast` + - `tent` + - `villa` + + `star_rating` _optional_ + : `integer` Denotes the star rating of the property. Possible values: 1 to 7. + + `brand` _optional_ + : `string` Brand name of the property. For example, `Marriott Group`. + + `address` _optional_ + : `json object` Details of the property address. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `travellers` _optional_ + : `JSON object` Details associated with passengers/travellers/beneficiaries. + + `name` _optional_ + : `string` Name of the passenger/traveler/beneficiary. + + `email` _optional_ + : `string` Email address of the passenger/traveler/beneficiary. + + `contact` _optional_ + : `JSON object` Details associated with passengers/travelers/beneficiaries. + + `age` _optional_ + : `integer` UNIX timestamp of the date of birth of the individual. For example, `1234567890`. + + `class` _optional_ + : `string` Type of the flight ticket. Possible values: + - `Business` + - `Suite` + - `Premium` + - `Deluxe` + - `Standard` + + `identity` _optional_ + : `JSON object` Identity details of the passenger/beneficiary. + + `unique_national_id` _optional_ + : `string` National ID number. For example, Adhaar number for India. + + `tax_id` _optional_ + : `string` Passport number of the individual. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `JSON object` Details of the campaign. *Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, PQR12453. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Example values: google, newsletter. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: cpc, banner, etc. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +## 1.3 Integrate with Checkout on Client-Side + +Add the Pay button on your web page using the checkout code, Handler Function or Callback URL. + +### Handler Function or Callback URL + +**Handler Function** | **Callback URL** +--- +When you use this: - On successful payment, the customer is shown your web page. +- On failure, the customer is notified of the failure and asked to retry the payment. + | When you use this: - On successful payment, the customer is redirected to the specified URL, for example, a payment success page. +- On failure, the customer is asked to retry the payment. + +### Code to Add Pay Button + +Copy-paste the parameters as `options` in your code: + +```html: Callback URL (JS) Checkout Code +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise + "currency": "INR", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_9A33XWu170gUtm", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information especially their phone number + "name": "Gaurav Kumar", //your customer's name + "email": "gaurav.kumar@example.com", + "contact": "9000090000" //Provide the customer's phone number for better conversion rates + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +```html: Handler Functions (JS) Checkout Code +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise + "currency": "INR", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_9A33XWu170gUtm", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information, especially their phone number + "name": "Gaurav Kumar", //your customer's name + "email": "gaurav.kumar@example.com", + "contact": "9000090000" //Provide the customer's phone number for better conversion rates + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); +}); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +``` + + +### Checkout Parameters + + `key` _mandatory_ + : `string` API Key ID generated from the Dashboard. + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `name` _mandatory_ + : `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + + `description` _optional_ + : `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + + `image` _optional_ + : `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + + `order_id` _mandatory_ + : `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + `prefill` + : `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + + `notes` _optional_ + : `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + + `theme` + : `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + + `modal` + : `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + + `subscription_id` _optional_ + : `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + + `subscription_card_change` _optional_ + : `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + + `recurring` _optional_ + : `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + + `callback_url` _optional_ + : `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + + `redirect` _optional_ + : `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + + `customer_id` _optional_ + : `string` Unique identifier of customer. Used for: + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + + `remember_customer` _optional_ + : `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + + `timeout` _optional_ + : `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + + `readonly` + : `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `hidden` + : `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `send_sms_hash` _optional_ + : `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + + `allow_rotation` _optional_ + : `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + + `retry` _optional_ + : `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + + `config` _optional_ + : `object` Parameters that enable checkout configuration. + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + +> **INFO** +> +> +> +> **Handy Tips** +> +> The open method of Razorpay object (`rzp1.open()`) must be invoked by your site's JavaScript, which may or may not be a user-driven action such as a click. +> + +## Errors + +Given below is a list of errors you may face while integrating with checkout on the client-side. + +Error | Cause | Solution +--- +The id provided does not exist. | Occurs when there is a mismatch between the API keys used while creating the `order_id`/`customer_id` and the API key passed in the checkout. | Make sure that the API keys passed in the checkout are the same as the API keys used while creating the `order_id`/`customer_id`. +--- +Blocked by CORS policy. | Occurs when the server-to-server request is hit from the front end instead. | Make sure that the API calls are made from the server side and not the client side. + +### Configure Payment Methods (Optional) + +Multiple payment methods are available on the Razorpay Web Standard Checkout. +- The payment methods are **fixed** and cannot be changed. +- You can configure the order or make certain payment methods prominent. Know more about [configuring payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + +## 1.4 Handle Payment Success and Failure + +The way the Payment Success and Failure scenarios are handled depends on the [Checkout Sample Code](#code-to-add-pay-button) you used in the last step. + +### Checkout with Handler Function + +If you used the sample code with the handler function: + + + The customer sees your website page. The checkout returns the response object of the successful payment (**razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature**). Collect these and send them to your server. + + + + + The customer is notified about payment failure and asked to retry the payment. Know about the [error parameters.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md#response-parameters) + + ```js: Failure Handling Code + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + } + ``` + + +### Checkout with Callback URL + +If you used the sample code with the callback URL: + + + + Razorpay makes a POST call to the callback URL with the **razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature** in the response object of the successful payment. Only successful authorisations are auto-submitted. + + + + + In case of failed payments, the checkout is displayed again to facilitate payment retry. + + +## 1.5 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +## 1.6 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +Here are the links to our [SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#client-libraries) for the supported platforms. + +## 1.7 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/chargeback/test-integration.md) diff --git a/llm-content/payments/payment-gateway/web-integration/standard/chargeback/build-integration-travel.md b/llm-content/payments/payment-gateway/web-integration/standard/chargeback/build-integration-travel.md new file mode 100644 index 00000000..db0c6eee --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/chargeback/build-integration-travel.md @@ -0,0 +1,1149 @@ +--- +title: 1. Travel Build Integration +description: Steps to integrate the Standard Checkout form on your website. +--- + +# 1. Travel Build Integration + +Follow these steps to integrate the standard checkout form on your website: + +**1.1** [Generate API Keys](#11-generate-api-keys). + +**1.2** [Create an order in server](#12-create-an-order-in-server). + +**1.3** [Integrate with checkout on client-side](#13-integrate-with-checkout-on-client-side). + +**1.4** [Handle payment success and failure](#14-handle-payment-success-and-failure). + +**1.5** [Store fields in server](#15-store-fields-in-your-server). + +**1.6** [Verify payment signature](#16-verify-payment-signature). + +**1.7** [Verify payment status](#17-verify-payment-status). + +## 1.1 Generate API Keys + +Follow these steps to generate API keys: + + + Watch this video to see how to generate API keys in the Test mode. + + +[Video: https://www.youtube.com/embed/VOn8JlGPG2I?si=WTAbAeLB3Hnp1n3r] + + + + + Watch this video to see how to generate API keys in the Live mode. + + +[Video: https://www.youtube.com/embed/Cer8UfBGX_E?si=Libr1RXoFSEDfY1c] + + + +1. Log in to your Dashboard with the appropriate credentials. +2. Select the mode (**Test** or **Live**) for which you want to generate the API key. + - **Test Mode**: The test mode is a simulation mode that you can use to test your integration flow. **Your customers will not be able to make payments in this mode**. + - **Live Mode**: When your integration is complete, switch to live mode and generate live mode API keys. In the integration, **replace test mode keys with live mode keys to accept customer payments**. +3. Navigate to **Account & Settings** → **API Keys** (under **Website and app settings**) → **Generate Key** to generate key for the selected mode. + +> **WARN** +> +> +> **Watch Out!** +> +> - After generating the keys from the Dashboard, download and save them securely. You can use only one set of API keys. If you do not remember your API keys, you must [regenerate them](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#regenerate-api-keys) from the Dashboard and update them wherever the previous keys were used for payment gateway integrations. +> - API Keys are universal; that is, they are applicable to all websites and apps that you have whitelisted for your Merchant ID. +> - **Do not share your API Key secret** with anyone or on any public platforms. **This can pose security threats to your Razorpay account**. +> - Once you generate the API Keys, only the **Key Id** is visible on the Dashboard, **not the Key secret**, as it can pose security threats to your Razorpay account. +> - Use the **Live API Keys** to accept live payments and the **Test API Keys** for test transactions. +> + +Once generated, you will be able to see the Key id, the date the key was created and the expiry date for the API Key on screen. + +> **WARN** +> +> +> **Watch Out!** +> +> Save your Key ID and Key Secret securely (never expose the Key Secret in client-side code). +> + +## 1.2 Create an Order in Server + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The order_id received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "partial_payment": false, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "line_items_total": 5000, + "line_items": [ + { + "sku": "1gr367", + "name": "Flight Ticket", + "description": "Flight tickets", + "quantity": 2, + "type": "travel", + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "travel": { + "mode": "flight", + "sub_type": "ticket", + "carrier_code": "AA123", + "departure_city": "UAM", + "departure_timestamp": "1234567890", + "arrival_city": "UAM", + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + }, + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + } + ] + } + }, + { + "sku": "1gr368", + "name": "Travel_Insurance", + "description": "Flight_Travel_Insurance", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "type": "travel", + "travel": { + "mode": "flight", + "sub_type": "insurance", + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + } + ] + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +``` + +```json: Response +{ + "id": "order_QU1wpqJfs7smfR", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "created_at": 1747055716 +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _optional_ + : `json object` Details about the customer/user. + + `name` _optional_ + : `string` The customer’s name. For example, `Gaurav Kumar`. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, +919000090000. + + `email` _optional_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the merchant platform. For example, `22`. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the merchant platform. For example, `4`. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + `true`: If the user is logged into the account. + `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the business. For example, 1234567890. + + `billing_address` _optional_ + : `Json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` City of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` Name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `sku` _optional_ + : `string ` Unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa (needs to be inclusive of tax). + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business is running any discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `travel` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `mode` _optional_ + : `string` The mode of travel. Possible values: + - `flight` + - `train` + - `bus` + - `cab` + - `others` + + `sub_type` _optional_ + : `string` The subtype of the line item. Possible values: + - `ticket` + - `meal` + - `insurance` + - `preferred_seat` + - `others` + + `carrier_code` _optional_ + : `string` Full flight number for this leg of the journey. For example, `AA123`. + + `departure_city` _optional_ + : `string` 3 letter IATA airport code, also known as an IATA location identifier, IATA station code. For example, CPH for Copenhagen. + + `departure_timestamp` _optional_ + : `integer` UNIX timestamp. For example, 1234567890. + + `arrival_city` _optional_ + : `string` 3 letter IATA airport code, also known as an IATA location identifier, IATA station code. For example, CPH for Copenhagen + + `travellers` _optional_ + : `JSON object` Details associated with passengers/travellers/beneficiaries. + + `name` _optional_ + : `string` Name of the passenger/traveler/beneficiary. + + `email` _optional_ + : `string` Email address of the passenger/traveler/beneficiary. + + `age` _optional_ + : `integer` UNIX timestamp of the date of birth of the individual. For example, `1234567890`. + + `nationality` _optional_ + : `string` ISO3 country code to share the nationality of the individual. For example, `IND`. + + `class` _optional_ + : `string` Type of the flight ticket. Possible values: + - `economy` + - `premium_economy` + - `business` + - `SL` + - `3A` + - `2A` + - `1A` + - `CC` + - `others` + + `identity` _optional_ + : `JSON object` Identity details of the passenger/beneficiary. + + `tax_id` _optional_ + : `string` Tax ID number. For example, PAN number for India. + + `unique_national_id` _optional_ + : `string` National ID number. For example, Adhaar number for India. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of the `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `JSON object` Details of the campaign. *Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, `PQR12453`. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Example values: + - `google` + - `newsletter` + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: + - `cpc` + - `banner` + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +## 1.3 Integrate with Checkout on Client-Side + +Add the Pay button on your web page using the checkout code, Handler Function or Callback URL. + +### Handler Function or Callback URL + +**Handler Function** | **Callback URL** +--- +When you use this: - On successful payment, the customer is shown your web page. +- On failure, the customer is notified of the failure and asked to retry the payment. + | When you use this: - On successful payment, the customer is redirected to the specified URL, for example, a payment success page. +- On failure, the customer is asked to retry the payment. + +### Code to Add Pay Button + +Copy-paste the parameters as `options` in your code: + +```html: Callback URL (JS) Checkout Code +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise + "currency": "INR", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_9A33XWu170gUtm", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information especially their phone number + "name": "Gaurav Kumar", //your customer's name + "email": "gaurav.kumar@example.com", + "contact": "9000090000" //Provide the customer's phone number for better conversion rates + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +```html: Handler Functions (JS) Checkout Code +Pay + +var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise + "currency": "INR", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_9A33XWu170gUtm", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information, especially their phone number + "name": "Gaurav Kumar", //your customer's name + "email": "gaurav.kumar@example.com", + "contact": "9000090000" //Provide the customer's phone number for better conversion rates + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } +}; +var rzp1 = new Razorpay(options); +rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); +}); +document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); +} + +``` + + +### Checkout Parameters + + `key` _mandatory_ + : `string` API Key ID generated from the Dashboard. + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `name` _mandatory_ + : `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + + `description` _optional_ + : `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + + `image` _optional_ + : `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + + `order_id` _mandatory_ + : `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + `prefill` + : `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + + `notes` _optional_ + : `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + + `theme` + : `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + + `modal` + : `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + + `subscription_id` _optional_ + : `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + + `subscription_card_change` _optional_ + : `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + + `recurring` _optional_ + : `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + + `callback_url` _optional_ + : `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + + `redirect` _optional_ + : `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + + `customer_id` _optional_ + : `string` Unique identifier of customer. Used for: + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + + `remember_customer` _optional_ + : `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + + `timeout` _optional_ + : `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + + `readonly` + : `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `hidden` + : `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `send_sms_hash` _optional_ + : `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + + `allow_rotation` _optional_ + : `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + + `retry` _optional_ + : `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + + `config` _optional_ + : `object` Parameters that enable checkout configuration. + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + +> **INFO** +> +> +> +> **Handy Tips** +> +> The open method of Razorpay object (`rzp1.open()`) must be invoked by your site's JavaScript, which may or may not be a user-driven action such as a click. +> + +## Errors + +Given below is a list of errors you may face while integrating with checkout on the client-side. + +Error | Cause | Solution +--- +The id provided does not exist. | Occurs when there is a mismatch between the API keys used while creating the `order_id`/`customer_id` and the API key passed in the checkout. | Make sure that the API keys passed in the checkout are the same as the API keys used while creating the `order_id`/`customer_id`. +--- +Blocked by CORS policy. | Occurs when the server-to-server request is hit from the front end instead. | Make sure that the API calls are made from the server side and not the client side. + +### Configure Payment Methods (Optional) + +Multiple payment methods are available on the Razorpay Web Standard Checkout. +- The payment methods are **fixed** and cannot be changed. +- You can configure the order or make certain payment methods prominent. Know more about [configuring payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + +## 1.4 Handle Payment Success and Failure + +The way the Payment Success and Failure scenarios are handled depends on the [Checkout Sample Code](#code-to-add-pay-button) you used in the last step. + +### Checkout with Handler Function + +If you used the sample code with the handler function: + + + The customer sees your website page. The checkout returns the response object of the successful payment (**razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature**). Collect these and send them to your server. + + + + + The customer is notified about payment failure and asked to retry the payment. Know about the [error parameters.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md#response-parameters) + + ```js: Failure Handling Code + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + } + ``` + + +### Checkout with Callback URL + +If you used the sample code with the callback URL: + + + + Razorpay makes a POST call to the callback URL with the **razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature** in the response object of the successful payment. Only successful authorisations are auto-submitted. + + + + + In case of failed payments, the checkout is displayed again to facilitate payment retry. + + +## 1.5 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +## 1.6 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +Here are the links to our [SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#client-libraries) for the supported platforms. + +## 1.7 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/chargeback/test-integration.md) diff --git a/llm-content/payments/payment-gateway/web-integration/standard/chargeback/go-live-checklist.md b/llm-content/payments/payment-gateway/web-integration/standard/chargeback/go-live-checklist.md new file mode 100644 index 00000000..48d03814 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/chargeback/go-live-checklist.md @@ -0,0 +1,48 @@ +--- +title: 3. Go-live Checklist +description: Check the go-live checklist for Razorpay Payment Gateway Standard Web integration. +--- + +# 3. Go-live Checklist + +Consider these steps before taking the integration live. + +## Accept Live Payments + +You can perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. However, make sure that you **swap the Test API Key with the Live Key**. + +Watch this video to generate an API Key in Live Mode. + +[Video: https://www.youtube.com/embed/30REpNtYSak] + +To generate an API Key in Live Mode: + +## Payment Capture + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). diff --git a/llm-content/payments/payment-gateway/web-integration/standard/chargeback/test-integration.md b/llm-content/payments/payment-gateway/web-integration/standard/chargeback/test-integration.md new file mode 100644 index 00000000..57706450 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/chargeback/test-integration.md @@ -0,0 +1,137 @@ +--- +title: 2. Test Integration +description: Steps to test if the custom Web integration was successful. +--- + +# 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## Next Steps + +[Step 3: Go Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/chargeback/go-live-checklist.md) diff --git a/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md b/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md new file mode 100644 index 00000000..a9ea1cfb --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md @@ -0,0 +1,53 @@ +--- +title: About Payment Methods Configuration +description: Configure the payment methods of your choice at Razorpay Checkout. +--- + +# About Payment Methods Configuration + +You can configure the payment methods of your choice on the Razorpay Checkout to provide a highly personalised experience for your customers. This provides a simple and accessible experience to your customers increasing your sales and your success rates. + + + + +## Use Cases + +Depending on the use cases that you might have, Razorpay allows you to create any configuration of the payment methods, of your choice: + +- **Highlighting certain payment instruments on the Checkout.** For example, **Google Pay** could be displayed outside the UPI block as a separate payment method. **HDFC Netbanking** could come out of the Netbanking container as a different payment method. + +- **Restricting the kind of network, issuer, BIN and card type, different card properties, to accept payments.** For example, you can choose to accept payments only from **HDFC Visa Debit cards** on the Checkout. + +- **Removing a certain payment method or instrument.** For example, any wallet can be removed as a payment instrument from wallets. The entire **Netbanking** block or a certain bank in Netbanking can be removed from the Checkout. + +- **Reordering of payment methods on the Checkout.** You can choose to arrange **UPI** as the first section instead of **Cards** on the Checkout. You can again order the PSPs within the UPI block according to your need. + +- **Grouping of payment instruments.** For example, you can choose to group **Netbanking** and **UPI** payment methods of a bank as a block that will be labelled as **Pay via Bank** on the Checkout. + +## Configuring Payment Methods + +To control payment methods on the Checkout, there are different ways to pass the configuration to the Checkout: + +- **Configure via Dashboard**: Choose the payment methods and instruments you want to display at checkout, arrange them in your preferred order, and tailor the checkout experience to match your business needs. Create custom payment blocks for specific customer segments on the Razorpay Dashboard. Know more about [Payment Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-configuration.md). + +- **Pass Configuration at Runtime**: Pass the configuration to the `options` parameter of the Checkout code at the run time. This is useful when you want to modify the order of the payment methods for a particular set of payments while rendering the Checkout. See the [Sample Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/sample-code.md) for details. + +- **Use a Configuration ID**: Create a global setting of the payments as a **Configuration ID** and pass these values while creating the Order. This is useful when you want control the checkout configurations dynamically using different **Configuration IDs**. You can create a **Configuration ID** through the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-configuration.md). There are two ways to pass the Configuration ID: + - While creating the order: Add the `checkout_config_id` field in the order creation request. + - While opening the checkout: Include the `checkout_config_id` in the checkout options. + + ```json: Pass config id + "checkout_config_id": "YourConfigIDHere" + ``` + +## Next Steps + +[Understand the Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/understand-configuration.md) + +### Related Information + +- [Customise Checkout Appearance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-styling.md) +- [Customise Checkout Experience](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md) +- [Customise Payment Methods on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-configuration.md) +- [Supported Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md) +- [Sample Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/sample-code.md) diff --git a/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/display-configuration.md b/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/display-configuration.md new file mode 100644 index 00000000..30e0edc6 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/display-configuration.md @@ -0,0 +1,177 @@ +--- +title: Display the Configuration +description: Display the configured payment methods on Razorpay Checkout. +--- + +# Display the Configuration + +The `display` configuration can be passed in the Checkout options. + +You can use the `display` configuration to put together all the modules, that is, `blocks`, `sequence`, `preferences`, and `hide` instruments as shown below: + +```js: display configuration +let config = { + display: { + blocks: { + code: { + name: "The name of the block", // The title of the block + instruments: [instrument, instrument] // The list of instruments + }, + + anotherCode: { + name: "Another block", + instruments: [instrument] + } + }, + + hide: [ + { + method: "method" + } + ], + + sequence: ["block.code"], // The sequence in which blocks and methods should be shown + + preferences: { + show_default_blocks: true // Should Checkout show its default blocks? + } + } +}; + +```js: JavaScript Checkout options +// beginning of the Checkout code +..... + +let options = { + key: "[YOUR_KEY_ID]", + amount: 60000, + currency: "", + + config: { + display: { + // The display config + } + } +}; + +let razorpay = new Razorpay(options); + +razorpay.open(); +.... +//rest of the Checkout code + +``` + +## Checkout options + +Descriptions for the checkout options parameters are present in the [Checkout Options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#123-checkout-options) table. + +## Orders API Sample Code + +Given below is the sample code: + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/orders +-H "content-type: application/json" +-d '{ + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "checkout_config_id": "config_Ep0eOCwdSfgkco" +}' +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "checkout_config_id": "config_Ep0eOCwdSfgkco" + }) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => 'receipt#1', 'amount' => 50000, 'currency' => '', 'checkout_config_id' => 'config_Ep0eOCwdSfgkco')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", ""); +options.Add("checkout_config_id", "config_Ep0eOCwdSfgkco"); +Order order = client.Order.Create(options); + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 50000, + currency: "", + receipt: "receipt#1", + checkout_config_id: "config_Ep0eOCwdSfgkco" +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "checkout_config_id": "config_Ep0eOCwdSfgkco" +} +body, err := client.Order.Create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: '', receipt: 'receipt#1', checkout_config_id: 'config_Ep0eOCwdSfgkco' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 50000); // amount in the smallest currency unit +orderRequest.put("currency", ""); +orderRequest.put("receipt", "receipt#1"); +orderRequest.put("checkout_config_id", "config_Ep0eOCwdSfgkco"); + +Order order = razorpay.orders.create(orderRequest); + +```json: Response +{ + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071 +} +``` + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Request Parameters + +Descriptions for the request parameters are present in the [Create an Order Request Parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md) table. + +#### Response Parameters + +Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + +### Related Information + +- [Supported Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md) +- [Sample Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/sample-code.md) diff --git a/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/sample-code.md b/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/sample-code.md new file mode 100644 index 00000000..dc88d606 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/sample-code.md @@ -0,0 +1,426 @@ +--- +title: Sample Codes +description: Sample codes to help you integrate the payment methods of your choice on Razorpay Checkout. +--- + +# Sample Codes + +If you want to list all the payment methods offered by `Axis` bank, allow card payments for `ICICI` bank only and hide `upi` payment method from the Checkout, you can do so as follows: + + + ![payment gateway customised checkout on mobile](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-methods-customise-checkout-mweb.jpg.md) + + + ![payment gateway customised checkout on desktop](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-methods-customised-checkout.gif.md) + + +```html: Checkout Code + +** Own Checkout + + var options = { + "key": "[YOUR_KEY_ID]", // Enter the Key ID generated from the Dashboard + "amount": "1000", + "currency": "", + "description": "Acme Corp", + "image": "example.com/image/rzp.jpg", + "prefill": + { + "email": "", + "contact": , + }, + config: { + display: { + blocks: { + utib: { //name for Axis block + name: "Pay Using Axis Bank", + instruments: [ + { + method: "card", + issuers: ["UTIB"] + }, + { + method: "netbanking", + banks: ["UTIB"] + }, + ] + }, + other: { // name for other block + name: "Other Payment Methods", + instruments: [ + { + method: "card", + issuers: ["ICIC"] + }, + { + method: 'netbanking', + } + ] + } + }, + hide: [ + { + method: "upi" + } + ], + sequence: ["block.utib", "block.other"], + preferences: { + show_default_blocks: false // Should Checkout show its default blocks? + } + } + }, + "handler": function (response) { + alert(response.razorpay_payment_id); + }, + "modal": { + "ondismiss": function () { + if (confirm("Are you sure, you want to close the form?")) { + txt = "You pressed OK!"; + console.log("Checkout form closed by the user"); + } else { + txt = "You pressed Cancel!"; + console.log("Complete the Payment") + } + } + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +``` + +> **WARN** +> +> +> +> **Watch Out!** +> +> You can use the payment methods enabled for your account on the Dashboard. Also, you can raise a request with our [Support Team](https://razorpay.com/support/) for additional payment methods or providers. +> + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/standard-integration.md). +> + +## Show OlaMoney + +Use the code given below to show OlaMoney on Checkout: + +```js: Ola Money +config: { + display: { + blocks: { + banks: { + name: 'Methods With Offers', + instruments: [ + { + method: 'wallet', + wallets: ['olamoney'] + }] + }, + }, + sequence: ['block.banks'], + preferences: { + show_default_blocks: true, + }, + }, + }, +}; +``` + + + ![](/docs/assets/images/payment-methods-customise-olamoney-mweb.jpg) + + + ![](/docs/assets/images/payment-methods-customise-olamoney-dweb.jpg) + + +## Show Most Used Methods + +Use the code given below to show the most used methods: + +```js: Most Used Methods +config: { + display: { + blocks: { + banks: { + name: 'Most Used Methods', + instruments: [ + { + method: 'wallet', + wallets: ['payzapp'] + }, + { + method: 'upi' + }, + ], + }, + }, + sequence: ['block.banks'], + preferences: { + show_default_blocks: true, + }, + }, + }, +}; +``` + + + ![](/docs/assets/images/payment-methods-customise-sample-code-show-most-used.jpg) + + + ![](/docs/assets/images/payment-methods-customize-sample-code-show-most-used-dweb.jpg) + + +## Show Instruments of a Certain Bank Only + +Use the code given below to show the instruments of a certain bank only on Checkout: + +```js: Instruments of Axis Bank Only +config: { + display: { + blocks: { + banks: { + name: 'Pay Using Axis Bank', + instruments: [ + { + method: 'netbanking', + banks: ['UTIB'], + }, + { + method: 'card', + issuers: ['UTIB'], + } + ], + }, + }, + sequence: ['block.banks'], + preferences: { + show_default_blocks: false, + }, + }, + }, +}; +``` + +> **WARN** +> +> +> **Watch Out!** +> +> This configuration is not applicable for [Recurring Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments.md). +> + + + ![](/docs/assets/images/payment-methods-customise-instruments-certain-bank.jpg) + + + ![](/docs/assets/images/payment-methods-customize-instruments-certain-bank-dweb.jpg) + + +## Highlight Instruments of a Certain Bank + +Use the code given below to highlight the instruments of a certain bank only on Checkout: + +```js: Highlight Instruments of Axis Bank +config: { + display: { + blocks: { + banks: { + name: 'Pay Using Axis Bank', + instruments: [ + { + method: 'netbanking', + banks: ['UTIB'], + }, + { + method: 'card', + issuers: ['UTIB'], + } + ], + }, + }, + sequence: ['block.banks'], + preferences: { + show_default_blocks: true, + }, + }, + }, +}; +``` + + + ![](/docs/assets/images/payment-methods-customise-certain-bank.jpg) + + + ![](/docs/assets/images/payment-methods-customize-certain-bank-dweb.jpg) + + +## Reorder Payment Methods + +Use the code given below to reorder payment methods on Checkout: + +```js: Reorder Payment Methods +config: { + display: { + blocks: { + banks: { + name: 'All Payment Options', + instruments: [ + { + method: 'upi' + }, + { + method: 'card' + }, + { + method: 'wallet' + }, + { + method: 'netbanking' + } + ], + }, + }, + sequence: ['block.banks'], + preferences: { + show_default_blocks: false, + }, + }, + }, +}; +``` + +![reorder payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-methods-reorder-customise.jpg.md) + +## Remove a Method from Checkout + +Use the code given below to remove a method from Checkout: + +```js: EMI Removed from Checkout +config: { + display: { + hide: [ + { + method: 'emi' + } + ], + preferences: { + show_default_blocks: true, + }, + }, + }, +}; +``` + + + ![](/docs/assets/images/payment-methods-customise-hide-payment-method.jpg) + + + ![](/docs/assets/images/payment-methods-customize-hide-payment-method-dweb.jpg) + + +## Show Only a Certain Payment Method on Checkout + +Use the code given below to show only a certain payment method on Checkout: + +### Card + +```js: Land on Card +config: { + display: { + blocks: { + cards_only: { + name: "Pay via Card", + instruments: [ + { + method: "card", + }, + ], + }, + }, + sequence: ["block.cards_only"], + preferences: { + show_default_blocks: false, + }, + }, + }, +}; +``` + +![](/docs/assets/images/payment-methods-customise-sample-code-land-on-card.jpg) + +### UPI + +```js: Land on UPI +config: { + display: { + blocks: { + banks: { + name: 'Pay via UPI', + instruments: [ + { + method: 'upi' + } + ], + }, + }, + sequence: ['block.banks'], + preferences: { + show_default_blocks: false, + }, + }, + }, +}; +``` + +![](/docs/assets/images/payment-methods-customise-sample-code-land-on-upi.jpg) + +### EMI + +```js: Land on EMI +config: { + display: { + blocks: { + banks: { + name: "Pay Using HDFC Bank", + instruments: [ + { + method: "emi", + issuers: ["HDFC"], + types: ["debit"], + iins: [438628] + }, + ] + }, + }, + sequence: ["block.banks"], + preferences: { + show_default_blocks: false + } + } +} +``` +![](/docs/assets/images/payment-methods-customise-sample-code-land-on-emi.jpg) + +### Related Information +- [Supported Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md) +- [Configurability of Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md) diff --git a/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md b/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md new file mode 100644 index 00000000..d58c0052 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md @@ -0,0 +1,894 @@ +--- +title: Supported Methods +description: List of supported payment methods and instruments. +--- + +# Supported Methods + +All the supported payment methods and instruments are listed below: + +## Supported Banks + +**Bank Name** | **Code** +--- +AU Small Finance Bank | `AUBL` +--- +Aditya Birla Idea Payments Bank | `ABPB` +--- +Airtel Payments Bank | `AIRP` +--- +Allahabad Bank | `ALLA` +--- +Andhra Bank | `ANDB` +--- +Andhra Bank Corporate Banking | `ANDB_C` +--- +Axis Bank | `UTIB` +--- +Bandhan Bank | `BDBL` +--- +Bank of Bahrain and Kuwait | `BBKM` +--- +Bank of Baroda Retail Banking | `BARB_R` +--- +Bank of India | `BKID` +--- +Bank of Maharashtra | `MAHB` +--- +Bassein Catholic Co-operative Bank | `BACB` +--- +Canara Bank | `CNRB` +--- +Catholic Syrian Bank | `CSBK` +--- +Central Bank of India | `CBIN` +--- +City Union Bank | `CIUB` +--- +Corporation Bank | `CORP` +--- +Cosmos Co-operative Bank | `COSB` +--- +DCB Bank | `DCBL` +--- +Dena Bank | `BKDN` +--- +Deutsche Bank | `DEUT` +--- +Development Bank of Singapore | `DBSS` +--- +Dhanlaxmi Bank | `DLXB` +--- +Dhanlaxmi Bank Corporate Banking | `DLXB_C` +--- +ESAF Small Finance Bank | `ESAF` +--- +Equitas Small Finance Bank | `ESFB` +--- +Federal Bank | `FDRL` +--- +HDFC Bank | `HDFC` +--- +ICICI Bank | `ICIC` +--- +IDBI | `IBKL` +--- +IDBI Corporate Banking | `IBKL_C` +--- +IDFC FIRST Bank | `IDFB` +--- +Indian Bank | `IDIB` +--- +Indian Overseas Bank | `IOBA` +--- +Indusind Bank | `INDB` +--- +Jammu and Kashmir Bank | `JAKA` +--- +Janata Sahakari Bank (Pune) | `JSBP` +--- +Kalupur Commercial Co-operative Bank | `KCCB` +--- +Kalyan Janata Sahakari Bank | `KJSB` +--- +Karnataka Bank | `KARB` +--- +Karur Vysya Bank | `KVBL` +--- +Kotak Mahindra Bank | `KKBK` +--- +Lakshmi Vilas Bank Corporate Banking | `LAVB_C` +--- +Lakshmi Vilas Bank Retail Banking | `LAVB_R` +--- +Mehsana Urban Co-operative Bank | `MSNU` +--- +NKGSB Co-operative Bank | `NKGS` +--- +North East Small Finance Bank | `NESF` +--- +PNB (Erstwhile-Oriental Bank of Commerce) | `ORBC` +--- +PNB (Erstwhile-United Bank of India) | `UTBI` +--- +Punjab & Sind Bank | `PSIB` +--- +Punjab National Bank Retail Banking | `PUNB_R` +--- +RBL Bank | `RATN` +--- +RBL Bank Corporate Banking | `RATN_C` +--- +Saraswat Co-operative Bank | `SRCB` +--- +Shamrao Vithal Bank Corporate Banking | `SVCB_C` +--- +Shamrao Vithal Co-operative Bank | `SVCB` +--- +South Indian Bank | `SIBL` +--- +Standard Chartered Bank | `SCBL` +--- +State Bank of Bikaner and Jaipur | `SBBJ` +--- +State Bank of Hyderabad | `SBHY` +--- +State Bank of India | `SBIN` +--- +State Bank of Mysore | `SBMY` +--- +State Bank of Patiala | `STBP` +--- +State Bank of Travancore | `SBTR` +--- +Suryoday Small Finance Bank | `SURY` +--- +Syndicate Bank | `SYNB` +--- +Tamilnadu Mercantile Bank | `TMBL` +--- +Tamilnadu State Apex Co-operative Bank | `TNSC` +--- +Thane Bharat Sahakari Bank | `TBSB` +--- +Thane Janata Sahakari Bank | `TJSB` +--- +UCO Bank | `UCBA` +--- +Union Bank of India | `UBIN` +--- +Varachha Co-operative Bank | `VARA` +--- +Vijaya Bank | `VIJB` +--- +Yes Bank | `YESB` +--- +Yes Bank Corporate Banking | `YESB_C` +--- +Zoroastrian Co-operative Bank | `ZCBL` + +## Supported Cards + +Any card issued by the following banks: + +**Bank Name** | **Code** +--- +AU Small Finance Bank | `AUBL` +--- +Aditya Birla Idea Payments Bank | `ABPB` +--- +Airtel Payments Bank | `AIRP` +--- +Allahabad Bank | `ALLA` +--- +Andhra Bank | `ANDB` +--- +Andhra Bank Corporate Banking | `ANDB_C` +--- +Axis Bank | `UTIB` +--- +Bandhan Bank | `BDBL` +--- +Bank of Bahrein and Kuwait | `BBKM` +--- +Bank of Baroda Retail Banking | `BARB_R` +--- +Bank of India | `BKID` +--- +Bank of Maharashtra | `MAHB` +--- +Bassein Catholic Co-operative Bank | `BACB` +--- +Canara Bank | `CNRB` +--- +Catholic Syrian Bank | `CSBK` +--- +Central Bank of India | `CBIN` +--- +City Union Bank | `CIUB` +--- +Corporation Bank | `CORP` +--- +Cosmos Co-operative Bank | `COSB` +--- +DCB Bank | `DCBL` +--- +Dena Bank | `BKDN` +--- +Deutsche Bank | `DEUT` +--- +Development Bank of Singapore | `DBSS` +--- +Dhanlaxmi Bank | `DLXB` +--- +Dhanlaxmi Bank Corporate Banking | `DLXB_C` +--- +ESAF Small Finance Bank | `ESAF` +--- +Equitas Small Finance Bank | `ESFB` +--- +Federal Bank | `FDRL` +--- +HDFC Bank | `HDFC` +--- +ICICI Bank | `ICIC` +--- +IDBI | `IBKL` +--- +IDBI Corporate Banking | `IBKL_C` +--- +IDFC FIRST Bank | `IDFB` +--- +Indian Bank | `IDIB` +--- +Indian Overseas Bank | `IOBA` +--- +Indusind Bank | `INDB` +--- +Jammu and Kashmir Bank | `JAKA` +--- +Janata Sahakari Bank (Pune) | `JSBP` +--- +Kalupur Commercial Co-operative Bank | `KCCB` +--- +Kalyan Janata Sahakari Bank | `KJSB` +--- +Karnataka Bank | `KARB` +--- +Karur Vysya Bank | `KVBL` +--- +Kotak Mahindra Bank | `KKBK` +--- +Lakshmi Vilas Bank Corporate Banking | `LAVB_C` +--- +Lakshmi Vilas Bank Retail Banking | `LAVB_R` +--- +Mehsana Urban Co-operative Bank | `MSNU` +--- +NKGSB Co-operative Bank | `NKGS` +--- +North East Small Finance Bank | `NESF` +--- +PNB (Erstwhile-Oriental Bank of Commerce) | `ORBC` +--- +PNB (Erstwhile-United Bank of India) | `UTBI` +--- +Punjab & Sind Bank | `PSIB` +--- +Punjab National Bank Retail Banking | `PUNB_R` +--- +RBL Bank | `RATN` +--- +RBL Bank Corporate Banking | `RATN_C` +--- +Saraswat Co-operative Bank | `SRCB` +--- +Shamrao Vithal Bank Corporate Banking | `SVCB_C` +--- +Shamrao Vithal Co-operative Bank | `SVCB` +--- +South Indian Bank | `SIBL` +--- +Standard Chartered Bank | `SCBL` +--- +State Bank of Bikaner and Jaipur | `SBBJ` +--- +State Bank of Hyderabad | `SBHY` +--- +State Bank of India | `SBIN` +--- +State Bank of Mysore | `SBMY` +--- +State Bank of Patiala | `STBP` +--- +State Bank of Travancore | `SBTR` +--- +Suryoday Small Finance Bank | `SURY` +--- +Syndicate Bank | `SYNB` +--- +Tamilnadu Mercantile Bank | `TMBL` +--- +Tamilnadu State Apex Co-operative Bank | `TNSC` +--- +Thane Bharat Sahakari Bank | `TBSB` +--- +Thane Janata Sahakari Bank | `TJSB` +--- +UCO Bank | `UCBA` +--- +Union Bank of India | `UBIN` +--- +Varachha Co-operative Bank | `VARA` +--- +Vijaya Bank | `VIJB` +--- +Yes Bank | `YESB` +--- +Yes Bank Corporate Banking | `YESB_C` +--- +Zoroastrian Co-operative Bank | `ZCBL` + +### Supported Card Types + +- `credit` for credit cards +- `debit` for debit cards + +### Supported Card Networks + +**Card Network Name** | **Code** +--- +American Express | `American Express` +--- +Diners Club | `Diners Club` +--- +Maestro | `Maestro` +--- +MasterCard | `MasterCard` +--- +RuPay | `RuPay` +--- +Visa | `Visa` +--- +Bajaj Finserv | `Bajaj Finserv` +--- + +## Supported Debit Card EMI Providers + +Bank Code | Issuer Bank +--- +HDFC | HDFC Bank +--- +ICIC | ICICI Bank + +> **INFO** +> +> +> **Handy Tips** +> +> Know the standard debit card interest rates charged by the [banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#5-can-you-provide-a-list-of-the). +> + +## Supported Credit Card EMI Providers + +Bank Code | Issuer Bank +--- +AMEX | American Express +--- +BARB | Bank of Baroda +--- +CITI | Citibank +--- +FDRL | Federal Bank +--- +HDFC | HDFC Bank +--- +HSBC | HSBC Bank +--- +ICIC | ICICI Bank +--- +INDB | IndusInd Bank +--- +KKBK | Kotak Mahindra Bank +--- +RATN | RBL Bank +--- +SBIN | State Bank of India +--- +SCBL | Standard Chartered +--- +UTIB | Axis Bank +--- +YESB | Yes Bank + +### Other Cards + +Code | Card Network Name +--- +Onecard | Onecard + +> **INFO** +> +> +> **Handy Tips** +> +> Know the standard credit card interest rates charged by the [banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#1-what-are-the-standard-credit-card-interest). +> + +## Supported Cardless EMI Providers + +Banks | Provider Code +--- +ICICI Bank | `icic` +--- +IDFC Bank | `idfb` +--- +HDFC Bank | `hdfc` +--- +Kotak Bank| `kkbk` +--- +axio | `walnut369` +--- +Fibe | `earlysalary` +--- +ZestMoney | `zestmoney` + +> **INFO** +> +> +> **Handy Tips** +> +> Know the standard interest rates charged by: +> - [Banks/Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#1-what-are-the-standard-interest-rates-charged) +> - [Pay Later Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#2-what-are-the-standard-interest-rates-charged) +> + +## Supported Wallets + +**Wallet provider** | **Wallet Code** +--- +PhonePe | `phonepe` +--- +Mobikwik | `mobikwik` +--- +PayZapp | `payzapp` +--- +Ola Money | `olamoney` +--- +Airtel Money | `airtelmoney` +--- +Amazon Pay | `amazonpay` +--- +JioMoney | `jiomoney` +--- +PayPal | `paypal` + +## Supported UPI Apps + +App Name | Package Name +--- +Google Pay | `com.google.android.apps.nbu.paisa.user` +--- +BHIM | `in.org.npci.upiapp` +--- +BHIM UCO | `com.lcode.ucoupi` +--- +BHIM IOB | `com.euronet.iobupi` +--- +BHIM CSB | `com.lcode.csbupi` +--- +PhonePe | `com.phonepe.app` +--- +Paytm | `net.one97.paytm` +--- +ICICI iMobile | `com.csam.icici.bank.imobile` +--- +ICICI Pocket | `com.icicibank.pockets` +--- +SBI | `com.sbi.upi` +--- +Axis Pay | `com.upi.axispay` +--- +Axis | `com.axis.mobile` +--- +Samsung Pay | `com.samsung.android.spay` +--- +HDFC Bank | `com.snapwork.hdfc` +--- +PayZapp | `com.hdfcbank.payzapp` +--- +Bank of Baroda | `com.bankofbaroda.upi` +--- +Freecharge | `com.freecharge.android` +--- +KVB | `com.mycompany.kvb` +--- +JK UPI | `com.fss.jnkpsp` +--- +IDFC | `com.fss.idfcpsp` +--- +IDFC First | `com.idfcfirstbank.optimus` +--- +Yes Bank | `com.YesBank` +--- +YesBank Iris | `in.irisbyyes.app` +--- +Microsoft Kaizala | `com.microsoft.mobile.polymer` +--- +Lotza | `com.upi.federalbank.org.lotza` +--- +Fed Mobile | `com.fedmobile` +--- +IndusInd Pay | `com.mgs.induspsp` +--- +IndusInd Mobile | `com.fss.indus` +--- +Indus Indie | `com.indusind.indie` +--- +Wizely | `ai.wizely.android` +--- +Amazon | `in.amazon.mShop.android.shopping` +--- +RBL MoBank | `com.rblbank.mobank` +--- +CRED | `com.dreamplug.androidapp` +--- +Finserve | `in.bajajfinservmarkets.app` +--- +Fampay | `com.fampay.in` +--- +Mobikwik | `com.mobikwik_new` +--- +PNB Bank | `com.mgs.pnbupi` +--- +PNB One | `com.Version1` +--- +Digibank | `com.dbs.in.digitalbank` +--- +Jupiter | `money.jupiter` +--- +Navi | `com.naviapp` +--- +Slice | `indwin.c3.shareapp` +--- +Tata Neu | `com.tatadigital.tcp` +--- +Groww | `com.nextbillion.groww` +--- +Shriram One | `com.shriram.one` +--- +Fave | `com.pinelabs.fave` +--- +Ultracash | `com.ultracash.payment.customer` +--- +Timepay | `com.npst.timepay.society` +--- +Goibibo | `com.goibibo` +--- +Kotak | `com.msf.kbank.mobile` +--- +Kotak811 | `com.kotak811mobilebankingapp.instantsavingsupiscanandpayrecharge` +--- +DakPay | `com.fss.ippbpsp` +--- +India Post | `com.iexceed.appzillon.ippbMB` +--- +Canara | `com.canarabank.mobility` +--- +MyJio | `com.jio.myjio` +--- +IndOASIS | `com.IndianBank.IndOASIS` +--- +Tvam | `com.atyati.tvamapp` +--- +PopClub | `com.popclub.android` +--- +Vyom | `com.infrasoft.uboi` +--- +Super Money | `money.super.payments` +--- +Omnicard | `com.eroute.omnicard` +--- +AU0101 | `com.ausmallfinancebank.amb` +--- +Cent Mobile | `com.infrasofttech.CentralBank` +--- +Kiwi | `in.gokiwi.kiwitpap` +--- +Digi Khata | `com.paypointz.wallet` +--- +Moneyview | `com.whizdm.moneyview.loans` + +### Supported UPI flows + +Given below are the supported UPI flows: + +- `collect` for flow via VPA +- `intent` for flow via UPI apps + +> **INFO** +> +> +> **Handy Tips** +> +> The supported UPI apps for intent on android mobile web are **Google Pay** and **PhonePe**. +> + +- `qr` for flow via UPI QR + +## Supported Pay Later Providers + +**Provider name** | **Provider Code** +--- +LazyPay | `lazypay` +--- +PayPal | `paypal` + +> **INFO** +> +> +> **Handy Tips** +> +> - PayPal now supports the Pay Later feature. You should enable both [PayPal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paypal.md#to-enable-paypal) and the Pay Later options under Account & Settings → Pay Later (under Payment methods) on the Dashboard to enable the Pay Later feature. +> + +## Supported Apps + +**App** | **Code** +--- +CRED Pay | `cred` + +## Supported Debit Card EMI Providers + +Bank Code | Issuer Bank +--- +HDFC | HDFC Bank +--- +ICIC | ICICI Bank + +> **INFO** +> +> +> **Handy Tips** +> +> Know the standard debit card interest rates charged by the [banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#5-can-you-provide-a-list-of-the). +> + +## Supported Credit Card EMI Providers + +Bank Code | Issuer Bank +--- +AMEX | American Express +--- +BARB | Bank of Baroda +--- +CITI | Citibank +--- +FDRL | Federal Bank +--- +HDFC | HDFC Bank +--- +HSBC | HSBC Bank +--- +ICIC | ICICI Bank +--- +INDB | IndusInd Bank +--- +KKBK | Kotak Mahindra Bank +--- +RATN | RBL Bank +--- +SBIN | State Bank of India +--- +SCBL | Standard Chartered +--- +UTIB | Axis Bank +--- +YESB | Yes Bank + +### Other Cards + +Code | Card Network Name +--- +Onecard | Onecard + +> **INFO** +> +> +> **Handy Tips** +> +> Know the standard credit card interest rates charged by the [banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#1-what-are-the-standard-credit-card-interest). +> + +## Supported Wallets + +**Wallet provider** | **Wallet Code** +--- +PhonePe | `phonepe` +--- +Mobikwik | `mobikwik` +--- +PayZapp | `payzapp` +--- +Ola Money | `olamoney` +--- +Airtel Money | `airtelmoney` +--- +Amazon Pay | `amazonpay` +--- +JioMoney | `jiomoney` +--- +PayPal | `paypal` + +## Supported UPI Apps + +App Name | Package Name +--- +Google Pay | `com.google.android.apps.nbu.paisa.user` +--- +BHIM | `in.org.npci.upiapp` +--- +BHIM UCO | `com.lcode.ucoupi` +--- +BHIM IOB | `com.euronet.iobupi` +--- +BHIM CSB | `com.lcode.csbupi` +--- +PhonePe | `com.phonepe.app` +--- +Paytm | `net.one97.paytm` +--- +ICICI iMobile | `com.csam.icici.bank.imobile` +--- +ICICI Pocket | `com.icicibank.pockets` +--- +SBI | `com.sbi.upi` +--- +Axis Pay | `com.upi.axispay` +--- +Axis | `com.axis.mobile` +--- +Samsung Pay | `com.samsung.android.spay` +--- +HDFC Bank | `com.snapwork.hdfc` +--- +PayZapp | `com.hdfcbank.payzapp` +--- +Bank of Baroda | `com.bankofbaroda.upi` +--- +Freecharge | `com.freecharge.android` +--- +KVB | `com.mycompany.kvb` +--- +JK UPI | `com.fss.jnkpsp` +--- +IDFC | `com.fss.idfcpsp` +--- +IDFC First | `com.idfcfirstbank.optimus` +--- +Yes Bank | `com.YesBank` +--- +YesBank Iris | `in.irisbyyes.app` +--- +Microsoft Kaizala | `com.microsoft.mobile.polymer` +--- +Lotza | `com.upi.federalbank.org.lotza` +--- +Fed Mobile | `com.fedmobile` +--- +IndusInd Pay | `com.mgs.induspsp` +--- +IndusInd Mobile | `com.fss.indus` +--- +Indus Indie | `com.indusind.indie` +--- +Wizely | `ai.wizely.android` +--- +Amazon | `in.amazon.mShop.android.shopping` +--- +RBL MoBank | `com.rblbank.mobank` +--- +CRED | `com.dreamplug.androidapp` +--- +Finserve | `in.bajajfinservmarkets.app` +--- +Fampay | `com.fampay.in` +--- +Mobikwik | `com.mobikwik_new` +--- +PNB Bank | `com.mgs.pnbupi` +--- +PNB One | `com.Version1` +--- +Digibank | `com.dbs.in.digitalbank` +--- +Jupiter | `money.jupiter` +--- +Navi | `com.naviapp` +--- +Slice | `indwin.c3.shareapp` +--- +Tata Neu | `com.tatadigital.tcp` +--- +Groww | `com.nextbillion.groww` +--- +Shriram One | `com.shriram.one` +--- +Fave | `com.pinelabs.fave` +--- +Ultracash | `com.ultracash.payment.customer` +--- +Timepay | `com.npst.timepay.society` +--- +Goibibo | `com.goibibo` +--- +Kotak | `com.msf.kbank.mobile` +--- +Kotak811 | `com.kotak811mobilebankingapp.instantsavingsupiscanandpayrecharge` +--- +DakPay | `com.fss.ippbpsp` +--- +India Post | `com.iexceed.appzillon.ippbMB` +--- +Canara | `com.canarabank.mobility` +--- +MyJio | `com.jio.myjio` +--- +IndOASIS | `com.IndianBank.IndOASIS` +--- +Tvam | `com.atyati.tvamapp` +--- +PopClub | `com.popclub.android` +--- +Vyom | `com.infrasoft.uboi` +--- +Super Money | `money.super.payments` +--- +Omnicard | `com.eroute.omnicard` +--- +AU0101 | `com.ausmallfinancebank.amb` +--- +Cent Mobile | `com.infrasofttech.CentralBank` +--- +Kiwi | `in.gokiwi.kiwitpap` +--- +Digi Khata | `com.paypointz.wallet` +--- +Moneyview | `com.whizdm.moneyview.loans` + +### Supported UPI flows + +Given below are the supported UPI flows: + +- `collect` for flow via VPA +- `intent` for flow via UPI apps + +> **INFO** +> +> +> **Handy Tips** +> +> The supported UPI apps for intent on android mobile web are **Google Pay** and **PhonePe**. +> + +- `qr` for flow via UPI QR + +## Supported Pay Later Providers + +**Provider name** | **Provider Code** +--- +LazyPay | `lazypay` +--- +PayPal | `paypal` + +> **INFO** +> +> +> **Handy Tips** +> +> - PayPal now supports the Pay Later feature. You should enable both [PayPal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paypal.md#to-enable-paypal) and the Pay Later options under Account & Settings → Pay Later (under Payment methods) on the Dashboard to enable the Pay Later feature. +> + +### Related Information +- [Understand the Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/understand-configuration.md) +- [Sample Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/sample-code.md) diff --git a/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/understand-configuration.md b/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/understand-configuration.md new file mode 100644 index 00000000..d7fb07b6 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/understand-configuration.md @@ -0,0 +1,247 @@ +--- +title: Understand the Configuration +description: Understand the building blocks that are required to build a configuration of your choice. +--- + +# Understand the Configuration + +Let us understand the building blocks that are required to build a configuration of your choice: + +1. [Payment Methods](#payment-methods) +2. [Payment Instruments](#payment-instruments) +3. [Blocks](#blocks) +4. [Sequence](#sequence) +5. [Preferences](#preferences) + +## Payment Methods + +Before deciding the payment methods or payment instruments that you want to configure on the Checkout, refer to the [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) supported by Razorpay. + +## Payment Instruments + +A payment instrument is a combination of the payment method and its associated properties. For example, a payment instrument can be an **AXIS Debit card**, where **card** is the payment method and the issuer (AXIS bank) is the associated **instrument**. + +An instrument is a JSON object with a key named `method`. Each method and its associated properties are described in the sections below: + +### Card + +Payment instruments for the `method: card` are listed below: + +Name | Type | Description | Values | Examples +--- +issuers | array | List of issuers that are allowed | [Any bank code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md#supported-banks) | `issuers: ["HDFC", "ICIC"]` +--- +networks | array | List networks that are allowed | [Any card network](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md#supported-card-networks) | `networks: ["Visa", "MasterCard"]` +--- +types | array | List of card types that are allowed | [Any card type](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md#supported-cards) | `types: ["credit", "debit"]` + +```js: JavaScript +// beginning of the code +.... +card: { \\name for cards + name: "Pay Via Cards" + instruments: [ + { + method: "card", + issuers: ["HDFC"], + networks: ["Visa"], + types: ["debit","credit"] + } + ] +}, +... +//rest of the code +``` + +### Netbanking + +Payment instruments for the `method: netbanking` are listed below: + +Name | Type | Description | Values | Examples +--- +banks | array`` | List of all banks that are allowed | [Any bank code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md#supported-banks) | `banks: ["HDFC", "ICIC"]` + +### Wallet + +Payment instruments for the `method: wallet` are listed below: + +Name | Type | Description | Values | Examples +--- +wallets | string | Wallets to be allowed | [Any wallet code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md#supported-wallets) | `wallets: ["payzapp"]` + +### UPI + +Payment instruments for the `method: upi` are listed below: + +Name | Type | Description | Values | Examples +--- +flows | string | Flows to show | [Any supported UPI flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md#supported-upi-flows) | `flows: [ "qr"]` +--- +apps | string | Apps to show, for intent | [Any supported UPI apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md#supported-upi-apps) | `apps: ["google_pay", "phonepe"]` + +### EMI + +Payment instruments for the `method: emi` are listed below: + +Name | Type | Description | Values | Examples +--- +issuers | array`` | Providers to be allowed | [Any EMI issuers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md#supported-emi-providers) | `issuers: ["HDFC, ICIC"]` +--- +types | array`` | Providers to be allowed | Any [credit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md#supported-credit-card-emi-providers) and [debit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md#supported-debit-card-emi-providers) card EMI type | `types: ["debit, credit"]` +--- +iins | array`` | Providers to be allowed | [Any EMI IIN](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md#supported-emi-providers) | `iins: ["438600"]` + +### Cardless EMI + +Payment instruments for the `method: cardless_emi` are listed below: + +Name | Type | Description | Values | Examples +--- +providers | string | Providers to be allowed | [Any Cardless EMI provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md#supported-cardless-emi-providers) | `providers: ["zestmoney"]` + +### Pay Later + +For the method: `paylater`, the payment instruments are listed below: + +Name | Type | Description | Values | Examples +--- +providers | string | Providers to be allowed | [Any paylater provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md#supported-paylater-providers) | `providers: ["hdfc"]` + +### Apps + +For the method `app`, the payment instrument is listed below: + +Name | Type | Description | Values | Examples +--- +providers | string | Providers to be allowed | [Any app provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md#supported-apps) | `providers: ["cred"]` + +```js: JavaScript +// beginning of the code +.... +{ + "custom": { + "name": "Pay with Apps", + "instruments": [ + { + "method": "app", + "providers": [ + "cred" + ] + } + ] + } +} +... +//rest of the code +``` + +## Blocks + +A block is a collection of one or more payment instruments. Each block has a `name` and `code` associated as shown below: + +```js: JavaScript +// Block creation +let myPayments = { + name: "My Custom Block", + instruments: ["gpay"] +}; +// Usage in config +let config = { + display: { + blocks: { + highlighted: myPayments + } + } +}; +``` + +Here, `highlighted` is the code associated with `myPayments`. Multiple blocks can be added to the config at the same time. + +## Sequence + +You can specify the `sequence`, that is the order, in which the payment methods should be displayed on the Checkout. + +A sequence is an `array` of strings, where each string is the name of the payment method or a `block`. + +In a sequence, you can include any block using the `block.${code}` format. The block with code **highlighted** should be represented as `block.highlighted` as shown below: + +```js: JavaScript +let sequence = ["block.highlighted", "upi", "netbanking"]; +``` + +The above sequence will place the code `highlighted` first followed by the payment methods `upi` and `netbanking` in that particular order. + +> **INFO** +> +> +> +> **Handy Tips** +> +> Every block defined has to be present in the sequence. If you do not wish to reorder the methods and want to place your block, the sequence should contain `block.highlighted` with just one item in it. +> + +## Preferences + +Using the `preferences` object, you can enhance the configuration of the Checkout. By setting this value, you can decide whether the default list of payment methods should be displayed or not. + +Possible values are: + +`true` +: Checkout will display the sequence of the payment methods configured by you alongside with the default order of payment methods available in the Checkout. + +`false` +: Checkout will only show the sequence of the payment methods configured by you. + +## Hide Payment Instruments + +You can also hide or remove certain instruments from the Checkout. + +This is an `array` containing the `method` key used to hide either the payment method and/or the payment instrument associated with that payment method. For example, you can hide the methods, `card` and `HDFC netbanking` on the Checkout. + +```js: JavaScript +let cardInstrument = { + method: "card" +}; + +let instrumentOfSomeBank = { + method: "netbanking", + banks: ["HDFC"] +}; + +let hiddenInstruments = [cardInstrument, instrumentOfSomeBank]; +``` + +This is an `array` containing the `method` key used to hide either the payment method and/or the payment instrument associated with that payment method. For example, you can hide the methods, `card` and `Axis netbanking` on the Checkout. + +```js: JavaScript +let cardInstrument = { + method: "card" +}; + +let instrumentOfSomeBank = { + method: "netbanking", + banks: ["UTIB"] +}; + +let hiddenInstruments = [cardInstrument, instrumentOfSomeBank]; +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> Hiding any instrument using `hide` does not affect the similar instrument defined in `blocks`. So, if you want to hide `UTIB` bank from `netbanking` and have defined the same instrument in one of your blocks, Axis bank will still be displayed in that block. +> + +![ceratin bank](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-methods-customise-certain-bank.jpg.md) + +## Next Steps + +[Display the Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/display-configuration.md) + +### Related Information + +- [Supported Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/supported-methods.md) +- [Sample Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods/sample-code.md) diff --git a/llm-content/payments/payment-gateway/web-integration/standard/configure-restrict-payment-methods.md b/llm-content/payments/payment-gateway/web-integration/standard/configure-restrict-payment-methods.md new file mode 100644 index 00000000..b632c19c --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/configure-restrict-payment-methods.md @@ -0,0 +1,1099 @@ +--- +title: Standard Web Integration - Configurability of Payment Methods +description: Configure the payment methods of your choice on Razorpay Checkout. +--- + +# Standard Web Integration - Configurability of Payment Methods + +Razorpay Standard Checkout hosts a variety of payment methods for customers to make payments. The order of these payment methods on the Checkout used to be fixed and could not be interchanged. There can be situations where you want certain payment methods to be shown more prominently or rearrange the order in which the payment methods are displayed on the Checkout. + +Now, you can configure the payment methods of your choice on the Checkout to provide a highly personalized experience for your customers. This simple and accessible experience for them will increase your sales and success rates. + +**Original Checkout** | **Customized Checkout** +--- +![Original checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-method-customise-original-checkout.jpg.md) | ![Customised checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-methods-customize-custom-checkout.jpg.md) + +## Use Cases + +Razorpay allows you to configure the payment methods depending on your use case. + +- Highlighting certain payment instruments on the Checkout. +For example **Google Pay** could be displayed outside the UPI block as a separate payment method. **HDFC Netbanking** could come out of the Netbanking container as a separate payment method. Similarly, **OlaMoney** can be pulled out of the wallet block. + +- Restricting the kind of network, issuer, BIN and card type, different properties of the card, to accept payments. +For example, you can choose to accept payments only from **HDFC Visa Debit cards** on the Checkout. + +- Removing a certain payment method or instrument. +For example, **OlaMoney** can be removed as a payment method from wallets. The entire **Netbanking** block or a certain bank in Netbanking can be removed from the Checkout. + +- Reordering of payment methods on the Checkout. +You can choose to have **UPI** as the first section instead of **Cards** on the Checkout. Within the UPI block, you can again order the PSPs, according to your need. + +- Grouping of payment instruments. +For example, you can choose to group **Netbanking** and **UPI** payment methods of a bank as a block that will be labelled as **Pay via Bank** on the Checkout. + +## Examples + +**Highlight Instruments of a Certain Bank** | **Regroup Payment Methods** | **Remove UPI** +--- +![Certain bank](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-methods-customise-certain-bank.jpg.md) | ![Regroup PM](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-methods-customize-hdfc-block.jpg.md) | ![Remove UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-methods-customize-hide-payment-method.jpg.md) + +## Configuring Payment Methods + +Depending on how you want to control the payment methods on the Checkout, there are different ways in which the configuration can be passed to the Checkout: + +- Pass the configuration in the `options` parameter of the Checkout code at the run time. + This is useful when you want to modify the order of the payment methods for a particular set of payments while rendering the Checkout. See the [sample code](#sample-code) for details. + +- Create a global setting of the payments as a **Configuration ID** and pass these values while creating the Order. +This is useful when you want to fix the order of the payment methods on all the Checkout renderences. + +> **INFO** +> +> **Note:** +Contact our [Support Team](https://razorpay.com/support/#raise-a-request) for more details about the Configuration ID. + +## Understanding the Configuration + +Let us understand the building blocks that are required to build a configuration of your choice: + +1. [Payment Methods](#payment-methods) +2. [Payment Instruments](#payment-instruments) +3. [Blocks](#blocks) +4. [Sequence](#sequence) +5. [Preferences](#preferences) + +### Payment Methods + +Before deciding the payment methods or payment instruments that you want to configure on the Checkout, refer to the [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) supported by Razorpay. + +### Payment Instruments + +A payment instrument is a combination of the payment method and its associated properties. For example, a payment instrument can be an **AXIS Debit card**, where **card** is the payment method and the issuer (AXIS bank) is the associated **instrument**. + +An instrument is a JSON object with a key named `method`. Each method and its associated properties are described in the sections below: + +#### Card + +Payment instruments for the `method: card` are listed below: + +name | type | description | values | examples +--- +issuers | array | List of issuers that are allowed | [Any bank code](#supported-banks) | issuers: ["HDFC", "ICIC"] +--- +networks | array | List networks that are allowed | [Any card network](#supported-card-networks) | `networks: ["Visa", "MasterCard"]` +--- +types | array | List of card types that are allowed | [Any card type](#supported-card-types) | `types: ["credit"]` + +```js: JavaScript +// beginning of the code +.... +card: { \\name for cards + name: "Pay Via Cards" + instruments: [ + { + method: "card", + issuers: ["UTIB"], + networks: ["MasterCard"], + types: ["debit","credit"] + } + ] +}, +... +//rest of the code +``` + +#### Netbanking + +Payment instruments for the `method: netbanking` are listed below: + +name | type | description | values | examples +--- +banks | array`` | List of all banks that are allowed | [Any bank code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md#supported-banks) | `banks: ["HDFC", "ICIC"]` + +#### Wallet + +Payment instruments for the `method: wallet` are listed below: + +name | type | description | values | examples +--- +wallets | string | Wallets to be allowed | [Any wallet code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md#supported-wallets) | `wallets: ["olamoney"]` + +#### UPI + +Payment instruments for the `method: upi` are listed below: + +name | type | description | values | examples +--- +flows | string | Flows to show | [Any supported UPI flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md#supported-upi-flows) | `flows: [ "qr"]` +--- +apps | string | Apps to show, for intent | [Any supported UPI apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md#supported-upi-apps) | `apps: ["google_pay", "phonepe"]` + +#### Cardless EMI + +Payment instruments for the `method: cardless_emi` are listed below: + +name | type | description | values | examples +--- +providers | string | Providers to be allowed | [Any Cardless EMI provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md#supported-cardless-emi-providers) | `providers: ["zestmoney"]` + +#### PayLater + +For the method: `paylater`, the payment instruments are listed below: + +name | type | description | values | examples +--- +providers | string | Providers to be allowed | [Any paylater provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md#supported-paylater-providers) | `providers: ["hdfc"]` + +#### Apps + +For the method `app`, the payment instrument is listed below: + +name | type | description | values | examples +--- +providers | string | Providers to be allowed | [Any app provider](#supported-apps) | `providers: ["cred"]` + +```js: JavaScript +// beginning of the code +.... +{ + "custom": { + "name": "Pay with Apps", + "instruments": [ + { + "method": "app", + "providers": [ + "cred" + ] + } + ] + } +} +... +//rest of the code +``` + +### Blocks + +A block is a collection of one or more payment instruments. Each block has a `name` and `code` associated as shown below: + +```js: JavaScript +// Block creation +let myPayments = { + name: "My Custom Block", + instruments: ["gpay"] +}; +// Usage in config +let config = { + display: { + block: { + highlighted: myPayments + } + } +}; +``` + +Here, `highlighted` is the code associated with `myPayments`. Multiple blocks can be added to the config at the same time. + +### Sequence + +You can specify the `sequence`, that is the order, in which the payment methods should be displayed on the Checkout. + +A sequence is an `array` of strings, where each string is the name of the payment method or a `block`. + +In a sequence, you can include any block using the `block.${code}` format. The block with code **highlighted** should be represented as `block.highlighted` as shown below: + +```js: JavaScript +let sequence = ["block.highlighted", "upi", "netbanking"]; +``` + +The above sequence will place the code `highlighted` first followed by the payment methods `upi` and `netbanking` in that particular order. + +> **INFO** +> +> +> **Important** +> +> Every block defined has to be present in the sequence. If you do not wish to reorder the methods and want to place your block, the sequence should contain `block.highlighted` with just one item in it. +> + +## Preferences + +Using the `preferences` object, you can enhance the configuration of the Checkout. By setting this value, you can decide whether the default list of payment methods should be displayed or not. + +Possible values are: + +`true` +: Checkout will display the sequence of the payment methods configured by you alongside the default order of payment methods available in the Checkout. + +`false` +: Checkout will only show the sequence of the payment methods configured by you. + +### Hide Payment Instruments + +You can also hide or remove certain instruments from the Checkout. + +This is an `array` containing the `method` key used to hide either the payment method and/or the payment instrument associated with that payment method. For example, you can hide the methods, `card` and `HDFC netbanking` on the Checkout. + +```js: JavaScript +let cardInstrument = { + method: "card" +}; + +let instrumentOfSomeBank = { + method: "netbanking", + banks: ["HDFC"] +}; + +let hiddenInstruments = [cardInstrument, instrumentOfSomeBank]; +``` + +> **INFO** +> +> +> **Note** +> +> Hiding any instrument using `hide` does not affect the similar instrument defined in `blocks`. So, if you want to hide `HDFC` bank from `netbanking` and have defined the same instrument in one of your blocks, HDFC bank will still be displayed in that block. +> + +![Certain bank](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-methods-customise-certain-bank.jpg.md) + +## Building the Configuration + +This section contains details about the `display` configuration and the `restrictions` configuration. + +### Display Configuration + +Using the `display` config, you can put together all the modules, that is, `blocks`, `sequence`, `preferences`, `hide` instruments as shown below: + +The `display` config can be passed in the Checkout options or in the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) request using the `checkout_config_id` parameter. + +> **INFO** +> +> +> **Handy Tips** +> +> Contact our [Support Team](https://razorpay.com/support/#raise-a-request) to get your `checkout_config_id` parameter. +> + +```js: display config +let config = { + display: { + blocks: { + code: { + name: "The name of the block", // The title of the block + instruments: [instrument, instrument] // The list of instruments + }, + + anotherCode: { + name: "Another block", + instruments: [instrument] + } + }, + + hide: [ + { + method: "method" + } + ], + + sequence: ["block.code"], // The sequence in which blocks and methods should be shown + + preferences: { + show_default_blocks: true // Should Checkout show its default blocks? + } + } +}; +```js: JavaScript Checkout options +// beginning of the Checkout code +..... + +let options = { + key: "", + amount: 60000, + currency: "INR", + + config: { + display: { + // The display config + } + } +}; + +let razorpay = new Razorpay(options); + +razorpay.open(); +.... +//rest of the Checkout code +```curl: Orders Sample Request +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "checkout_config_id": "config_Ep0eOCwdSfgkco", + "notes": { + "reference_no": "IBFA10106201500002" + } +}' +``` + +### Restrictions Configuration + +Using the `display` config, you can reorder, highlight or hide instruments and methods, and display the modules on the Checkout, whereas using the `restrictions` config you can accept payments using only certain instruments. + +For example, if you want to accept payments only from specific cards such as Rupay or Diners Card/only HDFC or Axis Bank Cards/Cards of a particular BIN. + +To restrict the payments, it is recommended to use `restrictions` config. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +The `restrictions` config must be sent in Orders API request as shown below: + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/orders +-H "content-type: application/json" +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "checkout_config_id": "config_Ep0eOCwdSfgkco" +}' +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "checkout_config_id": "config_Ep0eOCwdSfgkco" + }) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => 'receipt#1', 'amount' => 50000, 'currency' => 'INR', 'checkout_config_id' => 'config_Ep0eOCwdSfgkco')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("checkout_config_id", "config_Ep0eOCwdSfgkco"); +Order order = client.Order.Create(options); + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 50000, + currency: "INR", + receipt: "receipt#1", + checkout_config_id: "config_Ep0eOCwdSfgkco" +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "checkout_config_id": "config_Ep0eOCwdSfgkco" +} +body, err := client.Order.Create(data, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', checkout_config_id: 'config_Ep0eOCwdSfgkco' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 50000); // amount in the smallest currency unit +orderRequest.put("currency", "INR"); +orderRequest.put("receipt", "receipt#1"); +orderRequest.put("checkout_config_id", "config_Ep0eOCwdSfgkco"); + +Order order = razorpay.orders.create(orderRequest); +``` + +[Learn more about Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Sample Code + +Let us assume you want to list all the payment methods offered by `HDFC` bank, allow card payments for `ICICI` bank only and hide `upi` payment method from the Checkout. You can do so using the code given below: + +![custom checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-methods-customize-custom-checkout.jpg.md) + +```html: Checkout Code + +** Own Checkout + + var options = { + "key": "", // Enter the Key ID generated from the Dashboard + "amount": "1000", + "currency": "INR", + "description": "Acme Corp", + "image": "http://example.com/image/rzp.jpg", + "prefill": + { + "email": "gaurav.kumar@example.com", + "contact": +919900000000, + }, + config: { + display: { + blocks: { + hdfc: { //name for HDFC block + name: "Pay using HDFC Bank", + instruments: [ + { + method: "card", + issuers: ["HDFC"] + }, + { + method: "netbanking", + banks: ["HDFC"] + }, + ] + }, + other: { // name for other block + name: "Other Payment modes", + instruments: [ + { + method: "card", + issuers: ["ICIC"] + }, + { + method: 'netbanking', + } + ] + } + }, + hide: [ + { + method: "upi" + } + ], + sequence: ["block.hdfc", "block.other"], + preferences: { + show_default_blocks: false // Should Checkout show its default blocks? + } + } + }, + "handler": function (response) { + alert(response.razorpay_payment_id); + }, + "modal": { + "ondismiss": function () { + if (confirm("Are you sure, you want to close the form?")) { + txt = "You pressed OK!"; + console.log("Checkout form closed by the user"); + } else { + txt = "You pressed Cancel!"; + console.log("Complete the Payment") + } + } + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +``` + +## Reference + +All the supported payment methods and instruments are listed below: + +## Supported Cards + +Any card issued by the following banks: + +**Bank Name** | **Code** +--- +AU Small Finance Bank | `AUBL` +--- +Aditya Birla Idea Payments Bank | `ABPB` +--- +Airtel Payments Bank | `AIRP` +--- +Allahabad Bank | `ALLA` +--- +Andhra Bank | `ANDB` +--- +Andhra Bank Corporate Banking | `ANDB_C` +--- +Axis Bank | `UTIB` +--- +Bandhan Bank | `BDBL` +--- +Bank of Bahrein and Kuwait | `BBKM` +--- +Bank of Baroda Retail Banking | `BARB_R` +--- +Bank of India | `BKID` +--- +Bank of Maharashtra | `MAHB` +--- +Bassein Catholic Co-operative Bank | `BACB` +--- +Canara Bank | `CNRB` +--- +Catholic Syrian Bank | `CSBK` +--- +Central Bank of India | `CBIN` +--- +City Union Bank | `CIUB` +--- +Corporation Bank | `CORP` +--- +Cosmos Co-operative Bank | `COSB` +--- +DCB Bank | `DCBL` +--- +Dena Bank | `BKDN` +--- +Deutsche Bank | `DEUT` +--- +Development Bank of Singapore | `DBSS` +--- +Dhanlaxmi Bank | `DLXB` +--- +Dhanlaxmi Bank Corporate Banking | `DLXB_C` +--- +ESAF Small Finance Bank | `ESAF` +--- +Equitas Small Finance Bank | `ESFB` +--- +Federal Bank | `FDRL` +--- +HDFC Bank | `HDFC` +--- +ICICI Bank | `ICIC` +--- +IDBI | `IBKL` +--- +IDBI Corporate Banking | `IBKL_C` +--- +IDFC FIRST Bank | `IDFB` +--- +Indian Bank | `IDIB` +--- +Indian Overseas Bank | `IOBA` +--- +Indusind Bank | `INDB` +--- +Jammu and Kashmir Bank | `JAKA` +--- +Janata Sahakari Bank (Pune) | `JSBP` +--- +Kalupur Commercial Co-operative Bank | `KCCB` +--- +Kalyan Janata Sahakari Bank | `KJSB` +--- +Karnataka Bank | `KARB` +--- +Karur Vysya Bank | `KVBL` +--- +Kotak Mahindra Bank | `KKBK` +--- +Lakshmi Vilas Bank Corporate Banking | `LAVB_C` +--- +Lakshmi Vilas Bank Retail Banking | `LAVB_R` +--- +Mehsana Urban Co-operative Bank | `MSNU` +--- +NKGSB Co-operative Bank | `NKGS` +--- +North East Small Finance Bank | `NESF` +--- +PNB (Erstwhile-Oriental Bank of Commerce) | `ORBC` +--- +PNB (Erstwhile-United Bank of India) | `UTBI` +--- +Punjab & Sind Bank | `PSIB` +--- +Punjab National Bank Retail Banking | `PUNB_R` +--- +RBL Bank | `RATN` +--- +RBL Bank Corporate Banking | `RATN_C` +--- +Saraswat Co-operative Bank | `SRCB` +--- +Shamrao Vithal Bank Corporate Banking | `SVCB_C` +--- +Shamrao Vithal Co-operative Bank | `SVCB` +--- +South Indian Bank | `SIBL` +--- +Standard Chartered Bank | `SCBL` +--- +State Bank of Bikaner and Jaipur | `SBBJ` +--- +State Bank of Hyderabad | `SBHY` +--- +State Bank of India | `SBIN` +--- +State Bank of Mysore | `SBMY` +--- +State Bank of Patiala | `STBP` +--- +State Bank of Travancore | `SBTR` +--- +Suryoday Small Finance Bank | `SURY` +--- +Syndicate Bank | `SYNB` +--- +Tamilnadu Mercantile Bank | `TMBL` +--- +Tamilnadu State Apex Co-operative Bank | `TNSC` +--- +Thane Bharat Sahakari Bank | `TBSB` +--- +Thane Janata Sahakari Bank | `TJSB` +--- +UCO Bank | `UCBA` +--- +Union Bank of India | `UBIN` +--- +Varachha Co-operative Bank | `VARA` +--- +Vijaya Bank | `VIJB` +--- +Yes Bank | `YESB` +--- +Yes Bank Corporate Banking | `YESB_C` +--- +Zoroastrian Co-operative Bank | `ZCBL` + +### Supported Card Types + +- `credit` for credit cards +- `debit` for debit cards + +### Supported Card Networks + +**Card Network Name** | **Code** +--- +American Express | `American Express` +--- +Diners Club | `Diners Club` +--- +Maestro | `Maestro` +--- +MasterCard | `MasterCard` +--- +RuPay | `RuPay` +--- +Visa | `Visa` +--- +Bajaj Finserv | `Bajaj Finserv` +--- + +## Supported Banks + +**Bank Name** | **Code** +--- +AU Small Finance Bank | `AUBL` +--- +Aditya Birla Idea Payments Bank | `ABPB` +--- +Airtel Payments Bank | `AIRP` +--- +Allahabad Bank | `ALLA` +--- +Andhra Bank | `ANDB` +--- +Andhra Bank Corporate Banking | `ANDB_C` +--- +Axis Bank | `UTIB` +--- +Bandhan Bank | `BDBL` +--- +Bank of Bahrain and Kuwait | `BBKM` +--- +Bank of Baroda Retail Banking | `BARB_R` +--- +Bank of India | `BKID` +--- +Bank of Maharashtra | `MAHB` +--- +Bassein Catholic Co-operative Bank | `BACB` +--- +Canara Bank | `CNRB` +--- +Catholic Syrian Bank | `CSBK` +--- +Central Bank of India | `CBIN` +--- +City Union Bank | `CIUB` +--- +Corporation Bank | `CORP` +--- +Cosmos Co-operative Bank | `COSB` +--- +DCB Bank | `DCBL` +--- +Dena Bank | `BKDN` +--- +Deutsche Bank | `DEUT` +--- +Development Bank of Singapore | `DBSS` +--- +Dhanlaxmi Bank | `DLXB` +--- +Dhanlaxmi Bank Corporate Banking | `DLXB_C` +--- +ESAF Small Finance Bank | `ESAF` +--- +Equitas Small Finance Bank | `ESFB` +--- +Federal Bank | `FDRL` +--- +HDFC Bank | `HDFC` +--- +ICICI Bank | `ICIC` +--- +IDBI | `IBKL` +--- +IDBI Corporate Banking | `IBKL_C` +--- +IDFC FIRST Bank | `IDFB` +--- +Indian Bank | `IDIB` +--- +Indian Overseas Bank | `IOBA` +--- +Indusind Bank | `INDB` +--- +Jammu and Kashmir Bank | `JAKA` +--- +Janata Sahakari Bank (Pune) | `JSBP` +--- +Kalupur Commercial Co-operative Bank | `KCCB` +--- +Kalyan Janata Sahakari Bank | `KJSB` +--- +Karnataka Bank | `KARB` +--- +Karur Vysya Bank | `KVBL` +--- +Kotak Mahindra Bank | `KKBK` +--- +Lakshmi Vilas Bank Corporate Banking | `LAVB_C` +--- +Lakshmi Vilas Bank Retail Banking | `LAVB_R` +--- +Mehsana Urban Co-operative Bank | `MSNU` +--- +NKGSB Co-operative Bank | `NKGS` +--- +North East Small Finance Bank | `NESF` +--- +PNB (Erstwhile-Oriental Bank of Commerce) | `ORBC` +--- +PNB (Erstwhile-United Bank of India) | `UTBI` +--- +Punjab & Sind Bank | `PSIB` +--- +Punjab National Bank Retail Banking | `PUNB_R` +--- +RBL Bank | `RATN` +--- +RBL Bank Corporate Banking | `RATN_C` +--- +Saraswat Co-operative Bank | `SRCB` +--- +Shamrao Vithal Bank Corporate Banking | `SVCB_C` +--- +Shamrao Vithal Co-operative Bank | `SVCB` +--- +South Indian Bank | `SIBL` +--- +Standard Chartered Bank | `SCBL` +--- +State Bank of Bikaner and Jaipur | `SBBJ` +--- +State Bank of Hyderabad | `SBHY` +--- +State Bank of India | `SBIN` +--- +State Bank of Mysore | `SBMY` +--- +State Bank of Patiala | `STBP` +--- +State Bank of Travancore | `SBTR` +--- +Suryoday Small Finance Bank | `SURY` +--- +Syndicate Bank | `SYNB` +--- +Tamilnadu Mercantile Bank | `TMBL` +--- +Tamilnadu State Apex Co-operative Bank | `TNSC` +--- +Thane Bharat Sahakari Bank | `TBSB` +--- +Thane Janata Sahakari Bank | `TJSB` +--- +UCO Bank | `UCBA` +--- +Union Bank of India | `UBIN` +--- +Varachha Co-operative Bank | `VARA` +--- +Vijaya Bank | `VIJB` +--- +Yes Bank | `YESB` +--- +Yes Bank Corporate Banking | `YESB_C` +--- +Zoroastrian Co-operative Bank | `ZCBL` + +## Supported Wallets + +**Wallet provider** | **Wallet Code** +--- +PhonePe | `phonepe` +--- +Mobikwik | `mobikwik` +--- +PayZapp | `payzapp` +--- +Ola Money | `olamoney` +--- +Airtel Money | `airtelmoney` +--- +Amazon Pay | `amazonpay` +--- +JioMoney | `jiomoney` +--- +PayPal | `paypal` + +## Supported UPI Apps + +App Name | Package Name +--- +Google Pay | `com.google.android.apps.nbu.paisa.user` +--- +BHIM | `in.org.npci.upiapp` +--- +BHIM UCO | `com.lcode.ucoupi` +--- +BHIM IOB | `com.euronet.iobupi` +--- +BHIM CSB | `com.lcode.csbupi` +--- +PhonePe | `com.phonepe.app` +--- +Paytm | `net.one97.paytm` +--- +ICICI iMobile | `com.csam.icici.bank.imobile` +--- +ICICI Pocket | `com.icicibank.pockets` +--- +SBI | `com.sbi.upi` +--- +Axis Pay | `com.upi.axispay` +--- +Axis | `com.axis.mobile` +--- +Samsung Pay | `com.samsung.android.spay` +--- +HDFC Bank | `com.snapwork.hdfc` +--- +PayZapp | `com.hdfcbank.payzapp` +--- +Bank of Baroda | `com.bankofbaroda.upi` +--- +Freecharge | `com.freecharge.android` +--- +KVB | `com.mycompany.kvb` +--- +JK UPI | `com.fss.jnkpsp` +--- +IDFC | `com.fss.idfcpsp` +--- +IDFC First | `com.idfcfirstbank.optimus` +--- +Yes Bank | `com.YesBank` +--- +YesBank Iris | `in.irisbyyes.app` +--- +Microsoft Kaizala | `com.microsoft.mobile.polymer` +--- +Lotza | `com.upi.federalbank.org.lotza` +--- +Fed Mobile | `com.fedmobile` +--- +IndusInd Pay | `com.mgs.induspsp` +--- +IndusInd Mobile | `com.fss.indus` +--- +Indus Indie | `com.indusind.indie` +--- +Wizely | `ai.wizely.android` +--- +Amazon | `in.amazon.mShop.android.shopping` +--- +RBL MoBank | `com.rblbank.mobank` +--- +CRED | `com.dreamplug.androidapp` +--- +Finserve | `in.bajajfinservmarkets.app` +--- +Fampay | `com.fampay.in` +--- +Mobikwik | `com.mobikwik_new` +--- +PNB Bank | `com.mgs.pnbupi` +--- +PNB One | `com.Version1` +--- +Digibank | `com.dbs.in.digitalbank` +--- +Jupiter | `money.jupiter` +--- +Navi | `com.naviapp` +--- +Slice | `indwin.c3.shareapp` +--- +Tata Neu | `com.tatadigital.tcp` +--- +Groww | `com.nextbillion.groww` +--- +Shriram One | `com.shriram.one` +--- +Fave | `com.pinelabs.fave` +--- +Ultracash | `com.ultracash.payment.customer` +--- +Timepay | `com.npst.timepay.society` +--- +Goibibo | `com.goibibo` +--- +Kotak | `com.msf.kbank.mobile` +--- +Kotak811 | `com.kotak811mobilebankingapp.instantsavingsupiscanandpayrecharge` +--- +DakPay | `com.fss.ippbpsp` +--- +India Post | `com.iexceed.appzillon.ippbMB` +--- +Canara | `com.canarabank.mobility` +--- +MyJio | `com.jio.myjio` +--- +IndOASIS | `com.IndianBank.IndOASIS` +--- +Tvam | `com.atyati.tvamapp` +--- +PopClub | `com.popclub.android` +--- +Vyom | `com.infrasoft.uboi` +--- +Super Money | `money.super.payments` +--- +Omnicard | `com.eroute.omnicard` +--- +AU0101 | `com.ausmallfinancebank.amb` +--- +Cent Mobile | `com.infrasofttech.CentralBank` +--- +Kiwi | `in.gokiwi.kiwitpap` +--- +Digi Khata | `com.paypointz.wallet` +--- +Moneyview | `com.whizdm.moneyview.loans` + +### Supported UPI flows + +Given below are the supported UPI flows: + +- `collect` for flow via VPA +- `intent` for flow via UPI apps + +> **INFO** +> +> +> **Handy Tips** +> +> The supported UPI apps for intent on android mobile web are **Google Pay** and **PhonePe**. +> + +- `qr` for flow via UPI QR + +## Supported PayLater Providers + +**Provider name** | **Provider Code** +--- +LazyPay | `lazypay` +--- +PayPal | `paypal` + +> **INFO** +> +> +> **Handy Tips** +> +> - PayPal now supports the Pay Later feature. You should enable both [PayPal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paypal.md#to-enable-paypal) and the Pay Later options under Account & Settings → Pay Later (under Payment methods) on the Dashboard to enable the Pay Later feature. +> + +## Supported Cardless EMI Providers + +Banks | Provider Code +--- +ICICI Bank | `icic` +--- +IDFC Bank | `idfb` +--- +HDFC Bank | `hdfc` +--- +Kotak Bank| `kkbk` +--- +axio | `walnut369` +--- +Fibe | `earlysalary` +--- +ZestMoney | `zestmoney` + +> **INFO** +> +> +> **Handy Tips** +> +> Know the standard interest rates charged by: +> - [Banks/Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#1-what-are-the-standard-interest-rates-charged) +> - [Pay Later Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#2-what-are-the-standard-interest-rates-charged) +> + +## Supported Apps + +**App** | **Code** +--- +CRED Pay | `cred` diff --git a/llm-content/payments/payment-gateway/web-integration/standard/configure-restrict-payment-methods/sample-code.md b/llm-content/payments/payment-gateway/web-integration/standard/configure-restrict-payment-methods/sample-code.md new file mode 100644 index 00000000..68d60f57 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/configure-restrict-payment-methods/sample-code.md @@ -0,0 +1,307 @@ +--- +title: Sample Codes - Configurability of Payment Methods +description: Sample codes to help you integrate the payment methods of your choice on Razorpay Checkout. +--- + +# Sample Codes - Configurability of Payment Methods + +## Show OlaMoney + +Use the code given below to show OlaMoney on Checkout: + +```js: Ola Money +config: { + display: { + blocks: { + banks: { + name: 'Methods With Offers', + instruments: [ + { + method: 'wallet', + wallets: ['olamoney'] + }] + }, + }, + sequence: ['block.banks'], + preferences: { + show_default_blocks: true, + }, + }, + }, +}; +``` + + + ![](/docs/assets/images/payment-methods-customise-olamoney-mweb.jpg) + + + ![](/docs/assets/images/payment-methods-customise-olamoney-dweb.jpg) + + +## Show Most Used Methods + +Use the code given below to show the most used methods: + +```js: Most Used Methods +config: { + display: { + blocks: { + banks: { + name: 'Most Used Methods', + instruments: [ + { + method: 'wallet', + wallets: ['payzapp'] + }, + { + method: 'upi' + }, + ], + }, + }, + sequence: ['block.banks'], + preferences: { + show_default_blocks: true, + }, + }, + }, +}; +``` + + + ![](/docs/assets/images/payment-methods-customise-sample-code-show-most-used.jpg) + + + ![](/docs/assets/images/payment-methods-customize-sample-code-show-most-used-dweb.jpg) + + +## Show Instruments of a Certain Bank Only + +Use the code given below to show the instruments of a certain bank only on Checkout: + +```js: Instruments of Axis Bank Only +config: { + display: { + blocks: { + banks: { + name: 'Pay Using Axis Bank', + instruments: [ + { + method: 'netbanking', + banks: ['UTIB'], + }, + { + method: 'card', + issuers: ['UTIB'], + } + ], + }, + }, + sequence: ['block.banks'], + preferences: { + show_default_blocks: false, + }, + }, + }, +}; +``` + +> **WARN** +> +> +> **Watch Out!** +> +> This configuration is not applicable for [Recurring Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments.md). +> + + + ![](/docs/assets/images/payment-methods-customise-instruments-certain-bank.jpg) + + + ![](/docs/assets/images/payment-methods-customize-instruments-certain-bank-dweb.jpg) + + +## Highlight Instruments of a Certain Bank + +Use the code given below to highlight the instruments of a certain bank only on Checkout: + +```js: Highlight Instruments of Axis Bank +config: { + display: { + blocks: { + banks: { + name: 'Pay Using Axis Bank', + instruments: [ + { + method: 'netbanking', + banks: ['UTIB'], + }, + { + method: 'card', + issuers: ['UTIB'], + } + ], + }, + }, + sequence: ['block.banks'], + preferences: { + show_default_blocks: true, + }, + }, + }, +}; +``` + + + ![](/docs/assets/images/payment-methods-customise-certain-bank.jpg) + + + ![](/docs/assets/images/payment-methods-customize-certain-bank-dweb.jpg) + + +## Reorder Payment Methods + +Use the code given below to reorder payment methods on Checkout: + +```js: Reorder Payment Methods +config: { + display: { + blocks: { + banks: { + name: 'All Payment Options', + instruments: [ + { + method: 'upi' + }, + { + method: 'card' + }, + { + method: 'wallet' + }, + { + method: 'netbanking' + } + ], + }, + }, + sequence: ['block.banks'], + preferences: { + show_default_blocks: false, + }, + }, + }, +}; +``` + +![reorder payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-methods-reorder-customise.jpg.md) + +## Remove a Method from Checkout + +Use the code given below to remove a method from Checkout: + +```js: EMI Removed from Checkout +config: { + display: { + hide: [ + { + method: 'emi' + } + ], + preferences: { + show_default_blocks: true, + }, + }, + }, +}; +``` + + + ![](/docs/assets/images/payment-methods-customise-hide-payment-method.jpg) + + + ![](/docs/assets/images/payment-methods-customize-hide-payment-method-dweb.jpg) + + +## Show Only a Certain Payment Method on Checkout + +Use the code given below to show only a certain payment method on Checkout: + +### Card + +```js: Land on Card +config: { + display: { + blocks: { + cards_only: { + name: "Pay via Card", + instruments: [ + { + method: "card", + }, + ], + }, + }, + sequence: ["block.cards_only"], + preferences: { + show_default_blocks: false, + }, + }, + }, +}; +``` + +![](/docs/assets/images/payment-methods-customise-sample-code-land-on-card.jpg) + +### UPI + +```js: Land on UPI +config: { + display: { + blocks: { + banks: { + name: 'Pay via UPI', + instruments: [ + { + method: 'upi' + } + ], + }, + }, + sequence: ['block.banks'], + preferences: { + show_default_blocks: false, + }, + }, + }, +}; +``` + +![](/docs/assets/images/payment-methods-customise-sample-code-land-on-upi.jpg) + +### EMI + +```js: Land on EMI +config: { + display: { + blocks: { + banks: { + name: "Pay Using HDFC Bank", + instruments: [ + { + method: "emi", + issuers: ["HDFC"], + types: ["debit"], + iins: [438628] + }, + ] + }, + }, + sequence: ["block.banks"], + preferences: { + show_default_blocks: false + } + } +} +``` +![](/docs/assets/images/payment-methods-customise-sample-code-land-on-emi.jpg) diff --git a/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md b/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md new file mode 100644 index 00000000..73e9a74c --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md @@ -0,0 +1,1116 @@ +--- +title: Standard Checkout - Integration Steps | Razorpay Payment Gateway +heading: Integration Steps +description: Steps to integrate the Standard Checkout form on your website. +--- + +# Integration Steps + +Follow these steps to integrate the Standard Checkout form on your website: + + - **1. Build Integration**: Integrate Web Standard Checkout. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +[Video: https://www.youtube.com/embed/SFHbcs-lSio] + +## 1. Build Integration + +Follow the steps given below: + + +### 1.1 Create an Order in Server + + Given below are the order states and the corresponding payment states: + + + + Payment Stages | Order State | Payment State | Description + --- + Stage I | created | created | The customer submits the payment information, which is sent to Razorpay. The payment is **not processed** at this stage. + --- + Stage II | attempted | authorized/failed | An order moves from **created** to **attempted** state when payment is first attempted. It remains in this state until a payment associated with the order is captured. + --- + Stage III | paid | captured | After the payment moves to the **captured** state, the order moves to the **paid** state. - No more payment requests are allowed after an order moves to the **paid** state. +- The order continues to be in this state even if the payment for this order is **refunded**. + + + + +> **INFO** +> +> +> **Capture Payments Automatically** +> +> You can capture payments automatically with the one-time [Payment Capture setting configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) on the Dashboard. +> + + **Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order using: + + + Use this endpoint to create an order using the Orders API. + + /orders + + ```curl: Curl + curl -X POST https://api.razorpay.com/v1/orders + -U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -H 'content-type:application/json' + -d '{ + "amount": 50000, + "currency": "", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230 + }' + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", ""); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); + } catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); + } + ```Python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + DATA = { + "amount": 50000, + "currency": "", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } + } + client.order.create(data=DATA) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('receipt' => '123', 'amount' => 50000, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + ```csharp: .NET + RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.add("receipt", "order_rcptid_11"); + options.add("currency", ""); + Order order = client.Order.Create(options); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + options = amount: 50000, currency: '', receipt: '' + order = Razorpay::Order.create + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "", + receipt: "receipt#1", + notes: { + key1: "value3", + key2: "value2" + } + }) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "", + "receipt": "some_receipt_id" + } + body, err := client.Order.Create(data) + ``` + + ```json: Success Response + { + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 + } + ```json: Failure Response + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } + } + ``` + + + You can use the Postman workspace below to create an order: + + [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + + You can create an order manually by integrating the API sample codes on your server. + + + + Request Parameters + + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `22225`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of ₹7,000 is to be received from the customer in two installments of #1 - ₹5,000, #2 - ₹2,000, then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + +### 1.2 Integrate with Checkout on Client-Side + + Add the Pay button on your web page using the checkout code. You can use the handler function or callback URL. + + + + + + + 1.2.1 Handler Function or Callback URL + + + + **Handler Function** | **Callback URL** + --- + When you use this: - On successful payment, the customer is shown your web page. +- On failure, the customer is notified of the failure and asked to retry the payment. + | When you use this: - On successful payment, the customer is redirected to the specified URL, for example, a payment success page. +- On failure, the customer is asked to retry the payment. + + + + + + + +### 1.2.2 Code to Add Pay Button + + Copy-paste the parameters as `options` in your code: + + ```html: Callback URL (JS) Checkout Code + Pay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_9A33XWu170gUtm", // This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information especially their phone number + "name": "", //your customer's name + "email": "", + "contact": "" //Provide the customer's phone number for better conversion rates + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ```html: Handler Functions (JS) Checkout Code + Pay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", //your business name + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_9A33XWu170gUtm", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { //We recommend using the prefill parameter to auto-fill customer's contact information, especially their phone number + "name": "", //your customer's name + "email": "", + "contact": "" //Provide the customer's phone number for better conversion rates + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + }); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ``` + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Test your integration using these [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#2-test-integration). +> + + + + +### 1.2.3 Checkout Options + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + +> **INFO** +> +> +> +> **Handy Tips** +> +> The open method of Razorpay object (`rzp1.open()`) must be invoked by your site's JavaScript, which may or may not be a user-driven action such as a click. +> + + + + +### 1.2.4 Errors + + Given below is a list of errors you may face while integrating with checkout on the client-side. + + + + Error | Cause | Solution + --- + The id provided does not exist. | Occurs when there is a mismatch between the API keys used while creating the `order_id`/`customer_id` and the API key passed in the checkout. | Make sure that the API keys passed in the checkout are the same as the API keys used while creating the `order_id`/`customer_id`. + --- + Blocked by CORS policy. | Occurs when the server-to-server request is hit from the front end instead. | Make sure that the API calls are made from the server side and not the client side. + + + + + +### 1.2.5 Configure Payment Methods *(Optional)* + + Multiple payment methods are available on the Razorpay Web Standard Checkout. + - The payment methods are **fixed** and cannot be changed. + - You can configure the order or make certain payment methods prominent. Know more about [configuring payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + + + + + + +### 1.3 Handle Payment Success and Failure + + The way the Payment Success and Failure scenarios are handled depends on the [Checkout Sample Code](#122-code-to-add-pay-button) you used in the last step. + + ### Checkout with Handler Function + + If you used the sample code with the handler function: + + + + #### On Payment Success + + The customer sees your website page. The checkout returns the response object of the successful payment (**razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature**). Collect these and send them to your server. + + + + + #### On Payment Failure + + The customer is notified about payment failure and asked to retry the payment. Know about the [error parameters.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md#response-parameters) + ```js: Failure Handling Code + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + } + ``` + + + ### Checkout with Callback URL + + If you used the sample code with the callback URL: + + + + #### On Payment Success + + Razorpay makes a POST call to the callback URL with the **razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature** in the response object of the successful payment. Only successful authorisations are auto-submitted. + + + #### On Payment Failure + + In case of failed payments, the checkout is displayed again to facilitate payment retry. + + + + + +### 1.4 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.5 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + + Here are the links to our [SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md#client-libraries) for the supported platforms. + + + + +### 1.6 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + + You can track the payment status in three ways: + + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + + + + +## 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +## 3. Go-live Checklist + +Check the go-live checklist for Razorpay Web Standard Checkout integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + + Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/payment-gateway/web-integration/standard/troubleshooting-faqs.md b/llm-content/payments/payment-gateway/web-integration/standard/troubleshooting-faqs.md new file mode 100644 index 00000000..f490d484 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/troubleshooting-faqs.md @@ -0,0 +1,190 @@ +--- +title: Payment Gateway | Web Integration - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common errors and find answers to frequently asked questions related to Razorpay Web Standard Checkout Integration. +--- + +# Troubleshooting & FAQs + +### 1. Why are my customer payments being automatically refunded? + + Payments made without an `order_id` cannot be captured and are automatically refunded. Create an order using the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#11-create-an-order-in-server) before initiating payments. + ``` + + + +### 2. What can cause an overflow issue on an HTML page, and how can I resolve it? + + Overflow issue can occur if the viewport meta tag is not present in your code. Check if the meta tag is added. If not, add the following line. + + ```html: View Port Meta Tag + + ``` + + + +### 3. Is a timeout applicable on transactions? + + Transaction timeout is applicable only when your customer attempts the payment. It times outs between 3 to 15 minutes. + + The customer is redirected to the checkout if a payment fails due to timeout. + + + +### 4. Can I track the status of the checkout modal? + + Yes, you can track the status of the checkout modal. You can do this by passing a modal object with `ondismiss: function(){}` as `options`. The `ondismiss` function is called when the modal is closed by the user. + + ```javascript: Javascript + var options = { + "key": "", // Enter the Key ID generated from the Dashboard + "amount": "29935", + "name": "Acme Corp", + "description": "A Wild Sheep Chase is the third novel by Japanese author Haruki Murakami", + "image": "http://example.com/your_logo.jpg", + "handler": function (response){ + alert(response.razorpay_payment_id); + }, + /** + * You can track the modal lifecycle by * adding the below code in your options + */ + "modal": { + "ondismiss": function(){ + console.log('Checkout form closed'); + } + } + }; + var rzp1 = new Razorpay(options); + ``` + You can utilise the `handler` function called on every successful transaction for tracking payment completion. + + + +### 5. What is the difference between webhooks and callback URL? + + You can use Callback URL and webhook to get the status of the transaction for a payment source. + + + Particulars | Webhooks | Callback URL + --- + About | Webhooks allow you to build or set up integrations that subscribe to certain events on Razorpay APIs. When one of those events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. + Know more about [webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). | A callback URL is an address that a server provides, and any computer in the Internet/private network can POST data to it. For Razorpay integrations, callback URL is the address at which Razorpay should send the transaction response. You can pass the URL in the `https://` format in the `callback_url` request parameter. Know more about [callback URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/callback-url.md). + --- + When to use | Use webhooks to receive real-time notifications when specific events occur. For example, receive notifications upon payment failure.| Use callback URL to redirect your customers to a particular page. For example: + - You can send customers to a payment success page after successful payment. This page will receive payment details such as the payment id. +- The Razorpay Checkout pop-up page does not appear in certain browsers, for example, on Facebook and Instagram browsers. In such cases, you can use the callback URL to redirect customers from your Facebook/Instagram page to another page where the Razorpay Checkout appears. Customers can complete the payments on this redirected page. + + + + + +### 6. How do I resolve a 500 internal server error? + + Multiple factors can cause a 500 internal server error. Ensure that the required features are enabled on your account. Additionally, verify that you are calling the API correctly. If the issue is still not resolved, contact our [Support team](https://razorpay.com/support/#request). + + + +### 7. Is Razorpay Checkout supported on Internet Explorer? + + No, Razorpay Checkout is not supported on the Internet Explorer browser. + + + +### 8. How can I enable customer information autofill at checkout? + + Customer information autofill is enabled by default for all businesses using Razorpay Standard Checkout. It prefills details like contact information, addresses and more, making the checkout process faster and smoother for your customers. + + + +### 9. Can customers edit pre-filled information on checkout? + + Yes, customers can edit all pre-filled information based on their requirement. + + + +### 10. Is the autofill feature supported on all platforms? + + No, autofill is supported only on Instagram, Facebook and iOS browsers. + + + +### 11. Can I accept payments through my Instagram page even if I do not have a website? + + Yes, you can accept payments without a website using Razorpay's no-code products such as [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md), [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md) or [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md), as Razorpay does not offer a direct Instagram integration. + + + +### 12. Are language-based SDKs available? + + Yes, language-based SDKs are available [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration.md). + + + +### 13. The netbanking bank page is not opening on the Firefox browser. How to resolve this? + + Mozilla Firefox users may not be able to open the bank page while making a netbanking payment on your checkout. This issue may be due to a browser setting that blocks the webpage from opening a pop-up page. + + Your customers can follow these steps to unblock the pop-up page: + - At **page level**: Modify settings on the bank page. + - At **browser level**: Modify Firefox browser's settings. + + ### Page Level + + Modify the settings on your bank page. Follow these steps: + 1. Open Mozilla Firefox. + 2. Navigate to **Tools** → **Page Info** → **Permissions** + 3. Set **Open Pop-up Windows** to Allow. + + ### Browser Level + + Modify the settings of your Firefox browser. Follow these steps: + 1. Open Mozilla Firefox. + 2. Navigate to **Preferences** → **Privacy & Security** → **Permissions**. + 3. Disable the **Block pop-up windows** option. + + + +### 14. Which payment methods appear on Instagram/Facebook browsers? + + Payment methods like [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md) and [Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) will appear on Instagram/Facebook browsers. These browsers do not support any other payment method that opens on a pop-up page. + + + +### 15. Can I enable UPI Intent in WebView on my app? + + Yes, you can enable UPI Intent in WebView on your: + - [Android app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-android.md) + - [iOS app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-ios.md) + + + +### 16. While using Razorpay UPI Intent, my customers are encountering this error, "Safari cannot open the page because the address is invalid." How can I resolve this? + + To resolve the error, request your customers to refresh the page and clear the browser cache. + + + +### 17. How can I accept payments on my Android or iOS apps without integrating with the native SDKs? + + If you want to accept payments on your Android or iOS apps without integrating with our native SDKs, you can reuse your Standard Integration code. This approach opens the checkout form in a WebView within your mobile app. Know more about [Webview for Mobile Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview.md). + + + +### 18. How do I accept international payments on checkout? + + You need to enable the international payments feature on your Razorpay account. Refer to [international payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md). + + + +### 19. What languages are supported on Razorpay checkout? + + Razorpay checkout fields support multiple languages, with English as the default. Customers can also choose Hindi, Marathi, Gujarati, Telugu, Tamil, Bengali and Kannada. Know more about [checkout in local languages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features.md). + + + +### 20. Can I switch between Standard Integration and Quick Integration? + + Yes, it is possible to easily switch from one integration method to another. If you were earlier using Standard Integration, you can switch to using [Quick Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/quick-integration.md). + + - This is possible because the Standard Integration searches for the `data-key` field inside the `` tag, that when found, switches to automatic mode. + - It also creates a button alongside the `` tag and attaches its 'onclick event handler' (created internally) to the `.open` method of the Razorpay object. diff --git a/llm-content/payments/payment-gateway/web-integration/standard/webview.md b/llm-content/payments/payment-gateway/web-integration/standard/webview.md new file mode 100644 index 00000000..a7338af5 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/webview.md @@ -0,0 +1,33 @@ +--- +title: About Webview for Mobile Apps +description: Reuse web integration code to accept payments via WebView on your Android and iOS mobile apps. +--- + +# About Webview for Mobile Apps + +If you want to accept payments on your Android or iOS apps without integrating with our native SDKs, reuse your Standard Integration code. This opens the checkout form in a WebView on your mobile app. Pass the **callback_url** parameter along with other checkout options to process payments. + +![Webview in Mobile App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-method-webview-mobile.jpg.md) + +## Why Webview Checkout is Problematic + +Users seem to utilise web checkout within webviews rather than integrating with our SDKs. While this allows you to reuse your existing web integration and avoid re-implementing cart/checkout in the SDK, it introduces multiple issues and is **not recommended**. + +Integrating web checkout within webviews can result in several critical issues including but not limited to: + +- **Popup Restrictions**: Flows requiring popups may be disabled or may not function as expected. +- **UPI Intent Configuration**: Additional configuration is required to make UPI intent work within webviews. +- **Bank Transfers and Downloads**: Payment methods like bank transfer, which rely on downloads, will fail as webviews do not support downloads by default. + +## Recommended Approach + +We strongly recommend migrating to our [SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md) instead of using webviews to ensure full compatibility and a smoother experience. + +If you still decide to proceed with webview-based checkout, please consider the below adjustments to minimise issues, including but not limited to. + +## Webview Integration Guide (For Users Proceeding Anyway) + +- **Integration Steps**: Follow the [integrations steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/integration-steps.md) for a seamless setup. +- **Implement Callback URL Handling**: Ensure your integration correctly handles [callback URLs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/callback-url.md) to receive payment status updates reliably. +- **Configure UPI Intent**: Follow additional steps to ensure UPI intent payments function correctly on [Android](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-android.md) or [iOS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-ios.md). +- **Handle Download Restrictions**: Implement solutions for payment methods that require file downloads. For now, you will need to manage downloads on your end. diff --git a/llm-content/payments/payment-gateway/web-integration/standard/webview/integration-steps.md b/llm-content/payments/payment-gateway/web-integration/standard/webview/integration-steps.md new file mode 100644 index 00000000..90270150 --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/webview/integration-steps.md @@ -0,0 +1,123 @@ +--- +title: Integration Steps +description: Steps to integrate with Razorpay WebView for Mobile Apps. +--- + +# Integration Steps + +## Create a WebView on Mobile App + +#### Code Sample + +```JavaScript: JavaScript +var options = { + ... // existing options + callback_url: 'https://your-server/callback_url', + redirect: true +} +``` + +The script that `callback_url` points to should to handle incoming `POST` requests. + +For a successful payment, the callback URL will have **razorpay_payment_id**. In addition, **razorpay_order_id** and **razorpay_signature** will be returned in the request body, provided your server-side has been integrated with Orders API. Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can set query parameters with `callback_url` to map it with entities at your end. For example, following is a valid callback URL: `https://your-site.com/callback?cart_id=12345` +> + +#### Failed Payment + +Parameter | Present? | Example +--- +`error` | `Array` Always present | +--- +`error [code]` | Always present | BAD_REQUEST_ERROR +--- +`error [description]` | Always present | Payment failed due to incorrect card number +--- +`error [field]`| Present if payment fails due to basic validation error | card [number] + +## Hand Over Payment Result to Native App + +If you are loading the checkout form to WebView on your native mobile app without using the Razorpay SDK, provide a `callback_url` in the Razorpay Checkout parameters. After a successful payment, a redirect is made to the specified URL. You can enable the handover control from the page loaded at **callback_url** to your native app code. + +## Payment Callbacks to Android Native Code + +The webpage will be loaded into a WebView class. To communicate anything from the webpage loaded into WebView to native code, you would need to add a JavaScriptInterface to the WebView. + +#### Add JavascriptInterface to WebView + +```java: +webView.addJavascriptInterface("PaymentInterface", new PaymentInterface()); +``` + +```java: +class PaymentInterface{ + @JavascriptInterface + public void success(String data){ + } + + @JavascriptInterface + public void error(String data){ + } +} +``` + +The JavaScript code loaded into WebView calls the native methods of **PaymentInterface** class, **PaymentInterface.success()** and **PaymentInterface.error()**. + +## Enable Cookies + +You should enable cookies on your app to access features such as **saved cards**. Know more about [saved cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). + +## Code to Enable Cookies + +Add the following code to your WebView to enable cookies. + +```java: Enable Cookies +if (android.os.Build.VERSION.SDK_INT >= 21) { + CookieManager.getInstance().setAcceptThirdPartyCookies(mWebView, true); +} else { + CookieManager.getInstance().setAcceptCookie(true); +} +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> Use `setAcceptThirdPartyCookies` for API level 21 and above. +> + +## Payment Callbacks to iOS Native Code + +**WKWebView** framework is used to implement a bridge between JavaScript and the native code as **UIWebView** does not provide this functionality. The bridge is added by passing an instance of **WKScriptMessageHandler** and a string (which is the name of the bridge). + +```Swift: swift +webView.configuration.userContentController.add(self, name: "PaymentJSBridge") +``` +The instance of WKScriptMessageHandler which is passed needs to implement a function userContentController(WKUserContentController, WKScriptMessage). Once the function is implemented, the data is sent by JavaScript and can be retrieved inside the function. + +```Swift: swift +public func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) { + if let messageBody = message.body as? [AnyHashable:Any]{ + + } +} +``` + +At the JavaScript end, data is sent to the iOS native code by evaluating the following JavaScript. + +```JavaScript: JavaScript +window.webkit.messageHandlers.PaymentJSBridge.postMessage(messageBody) +``` + +**Handy Tips** + +Only the function `userContentController` can be called from the JavaScript by evaluating the above-mentioned script. The `messageBody` passed by the script must contain the appropriate data to control the flow of the native code. diff --git a/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-android.md b/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-android.md new file mode 100644 index 00000000..c816d71b --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-android.md @@ -0,0 +1,179 @@ +--- +title: UPI Intent in WebView - Android +description: Enable UPI Intent in WebView on your Android app. +--- + +# UPI Intent in WebView - Android + +Follow the steps given below to enable UPI intent in WebView on your android application: + +**1.1** [Add WebView to Android App](#11-add-webview-to-android-app) + +**1.2** [Setup WebViewClient](#12-setup-webviewclient) + +**1.3** [Handle Deep Links in shouldOverrideUrlLoading()](#13-handle-deep-links-in-shouldoverrideurlloading-) + +**1.4** [Enable UPI Intent Support](#14-enable-upi-intent-support) + +## 1.1 Add WebView to Android App + +Add a WebView to the layout of your Android app. You can add the code given below to the layout XML file of your app: + +```xml + +``` + +## 1.2 Setup WebViewClient + +To setup a `WebViewClient` that handles URL requests, create a new class using the code given below extending the `MyWebViewClient` and overriding the `shouldOverrideUrlLoading()` method. + +```java: Java +class MyWebViewClient extends WebViewClient { + + private Activity activity; + + public MyWebViewClient(Activity activity) { + this.activity = activity; + } + + /** This function is used to handle deeplink in webview */ + @Override + public Boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) { + return true; + } + +} + +// Use CustomWebviewClient created above in the webview object. +class MainActivity extends Activity { + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + WebView webView = findViewById(R.id.webview); + webView.setWebViewClient(new MyWebViewClient(MainActivity.this)); + } + +} + +```kotlin: Kotlin +class MyWebViewClient(private val activity: Activity) : WebViewClient() { + override fun onPageFinished(view: WebView?, url: String?) { + super.onPageFinished(view, url) + } + + /** This function is used to handle deeplink in webview */ + override fun shouldOverrideUrlLoading(view: WebView?, request: WebResourceRequest?): Boolean { + return true + } +} + +// Use CustomWebviewClient created above in the WebView object. +class MainActivity : Activity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + val webView = findViewById(R.id.webview) + webView.setWebViewClient(MyWebViewClient(this@MainActivity)) + } +} +``` + +## 1.3 Handle Deep Links in shouldOverrideUrlLoading() + +To handle deep links in the `shouldOverrideUrlLoading()` method, check if the URL is a deep link and then launch the corresponding activity using the intent class. In this example, we are checking if the URL starts with `http://` or `https://`. If not, then we create a new intent with `ACTION_VIEW` and URL as the data and start the activity with this intent. + +```java: Java +import android.app.Activity; +import android.content.ActivityNotFoundException; +import android.content.Intent; +import android.graphics.Bitmap; +import android.net.Uri; +import android.webkit.WebResourceRequest; +import android.webkit.WebView; +import android.webkit.WebViewClient; + +class MyWebViewClient extends WebViewClient { + + @Override + public void onPageFinished(WebView view, String url) { + super.onPageFinished(view, url); + } + + /** This function is used to handle deeplink in webview */ + @Override + public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) { + String url = request.getUrl().toString(); + if (!url.startsWith("https") || !url.startsWith("http")) { + try { + Intent i = new Intent(Intent.ACTION_VIEW); + i.setData(Uri.parse(request.getUrl().toString())); + activity.startActivityForResult(i, 2001); + } catch (ActivityNotFoundException ignored) { + + } + } + return true; + } +} + +```kotlin: Kotlin +import android.app.Activity +import android.content.ActivityNotFoundException +import android.content.Intent +import android.graphics.Bitmap +import android.net.Uri +import android.webkit.WebResourceRequest +import android.webkit.WebView +import android.webkit.WebViewClient + +class MyWebViewClient(private val activity: Activity): WebViewClient() { + + override fun onPageFinished(view: WebView?, url: String?) { + super.onPageFinished(view, url) + + } + + /** This function is used to handle deeplink in webview */ + override fun shouldOverrideUrlLoading(view: WebView?, request: WebResourceRequest?): Boolean { + val url = request!!.url.toString() + if (!url.startsWith("https") || !url.startsWith("http")){ + try { + val i = Intent(Intent.ACTION_VIEW) + i.setData(Uri.parse(request.url.toString())) + activity.startActivityForResult(i, 2001) + } catch (e: ActivityNotFoundException) { + + } + } + return true + + } + +} +``` + +## 1.4 Enable UPI Intent Support + +To enable and test UPI intent in WebView-based Checkout: +1. Open your website integrated with standard checkout. +2. Pass `webview_intent: true` parameter in the [payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#122-code-to-add-pay-button) sent to checkout to enable UPI intent support. +3. Ensure that UPI intent is triggered when the payment request is made. + +> **WARN** +> +> +> **Watch Out!** +> +> By default, the top PSP apps appear on the customer's mobile irrespective of the installation status of the UPI apps. +> + +## List of Supported UPI Intent Apps + +Given below is the list of supported UPI apps for Mobile Web. + +- `gpay` +- `phonepe` +- `paytm` +- `any` + +The `any` option triggers the other UPI payment apps installed on your customer's mobile. diff --git a/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-ios.md b/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-ios.md new file mode 100644 index 00000000..09ab468b --- /dev/null +++ b/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-ios.md @@ -0,0 +1,154 @@ +--- +title: UPI Intent in WebView - iOS +description: Enable UPI Intent in WebView on your iOS app. +--- + +# UPI Intent in WebView - iOS + +Follow the steps given below to enable UPI intent in WebView on your iOS application: + +**1.1** [Setup App to Handle Deep Links](#11-setup-app-to-handle-deep-links) + +**1.2** [Setup WKNavigationDelegate for WKWebView](#12-setup-wknavigationdelegate-for-wkwebview) + +**1.3** [Conforming to WKNavigationDelegate](#13-conforming-to-wknavigationdelegate) + +**1.4** [Enable UPI Intent Support](#14-enable-upi-intent-support) + +## 1.1 Setup App to Handle Deep Links + +Add the code given below to your `AppDelegate`. In this example, we override the `application(_:open:options:)` method to handle deep link URLs. You can use this method to parse the URL and determine which screen or content to display in your app. + +```swift: Swift +func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool { + return true +} +```objectivec: Objective C +func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { + return true +} +``` + +## 1.2 Setup WKNavigationDelegate for WKWebView + +Get a reference to your `WKWebView` and call the `navigationDelegate` property to setup `WKWebView` using the following code. Add the `loadWebPage` function to load your content. + +```swift: Swift +class CheckoutPaymentViewController: UIViewController { + + var checkoutUrl: String? + + // You can assign the checkout URL String to checkoutUrl property or pass it from previous page. + + @IBOutlet weak var wkWebView: WKWebView! + + override func viewDidLoad() { + super.viewDidLoad() + wkWebView.navigationDelegate = self + self.loadWebPage() + } + + func loadWebPage() { + guard let urlString = self.checkoutUrl else { return } + guard let url = URL(string: urlString) else { return } + self.wkWebView.load(URLRequest(url: url)) + } +} +```objectivec: Objective C +#import + +@interface WebViewController () +{ + IBOutlet WKWebView *webView; +} +@end + +@implementation WebViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + webView.navigationDelegate = self; + [self loadWebPage]; +} + +- (void)loadWebPage +{ + NSURL *url = [[NSURL alloc] initWithString:@""]; + NSMutableURLRequest *urlRequest = [[NSMutableURLRequest alloc] initWithURL:url]; + [webView loadRequest:urlRequest]; +} +``` + +## 1.3 Conforming to WKNavigationDelegate + +Create a `WKNavigationDelegate` to handle navigation events in your `WKWebView`. +In this example, we override the WebView`(_:decidePolicyFor:decisionHandler:)` method to handle navigation events in the WKWebView. If the URL scheme is not `http` or `https`, then we check if the URL can be opened using the `UIApplication.shared.canOpenURL()` method. +- If yes, then we open the URL using the `UIApplication.shared.open()` method. +- If not, then we allow the navigation to continue using the `decisionHandler(.allow)` method. + +```swift: Swift +extension CheckoutPaymentViewController: WKNavigationDelegate { + func webView(_ webView: WKWebView, + decidePolicyFor navigationAction: WKNavigationAction, + decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) { + + // If the request is a non-http(s) schema, then have the UIApplication handle opening the request. + if let url = navigationAction.request.url, + !url.absoluteString.hasPrefix("http://"), + !url.absoluteString.hasPrefix("https://"), + UIApplication.shared.canOpenURL(url) { + + // Have UIApplication handle the url (sms:, tel:, mailto:, ...) + UIApplication.shared.open(url, options: [:], completionHandler: nil) + + // Cancel the request (handled by UIApplication). + decisionHandler(.cancel) + } + else { + // Allow the request. + decisionHandler(.allow) + } + } +} +```objectivec: Objective C +- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler { + NSURL *url = navigationAction.request.URL; + NSString *urlString = url.absoluteString; + BOOL hasHttpPrefix = [[urlString lowercaseString] hasPrefix:@"http://"]; + BOOL hasHttpsPrefix = [[urlString lowercaseString] hasPrefix:@"https://"]; + BOOL canOpenUrl = [[UIApplication sharedApplication] canOpenURL:url]; + + if (!hasHttpPrefix && !hasHttpsPrefix && canOpenUrl) { + NSDictionary *options = [[NSDictionary alloc] init]; + [[UIApplication sharedApplication] openURL:url options:options completionHandler:nil]; + + decisionHandler(WKNavigationActionPolicyCancel); + } else { + decisionHandler(WKNavigationActionPolicyAllow); + } +} +``` + +## 1.4 Enable UPI Intent Support + +To enable and test UPI intent in WebView-based Checkout: +1. Open your website integrated with standard checkout. +2. Pass `webview_intent: true` parameter in the [payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#122-code-to-add-pay-button) sent to checkout to enable UPI intent support. +3. Ensure that UPI intent is triggered when the payment request is made. + +> **WARN** +> +> +> **Watch Out!** +> +> By default, the top PSP apps appear on the customer's mobile irrespective of the installation status of the UPI apps. +> + +## List of Supported UPI Intent Apps + +Given below is the list of supported UPI apps for Mobile Web. + +- `gpay` +- `phonepe` +- `paytm` diff --git a/llm-content/payments/payment-gateway/zoho.md b/llm-content/payments/payment-gateway/zoho.md new file mode 100644 index 00000000..7bd02c61 --- /dev/null +++ b/llm-content/payments/payment-gateway/zoho.md @@ -0,0 +1,66 @@ +--- +title: Zoho Integration +description: Integrate Razorpay Payment Gateway with your Zoho suite via your Zoho Dashboard. +--- + +# Zoho Integration + +Zoho is a web-based online office suite that contains software for word processing, spreadsheets, presentations, databases, note-taking, wikis, web conferencing, customer relationship management (CRM), project management, invoicing and other business activities. + +Integrating your Zoho suite with Razorpay allows you to accept payments from customers via the Razorpay Payment Gateway. You can accept payments via debit card, credit card, netbanking, UPI or through any of our supported wallets. + +> **WARN** +> +> +> **Watch Out!** +> +> - Ensure the email ID used for both your Zoho and Razorpay accounts is the same. +> - Ensure you have logged in as the owner. You cannot integrate if you login via other roles. +> - Perform the integration in your browser's Incognito or private browsing mode. +> + +## Integration Steps + +To integrate Razorpay with your Zoho suite: +1. [Set up your Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#1-sign-up). +2. Log in to your Zoho Dashboard and click **Settings**. + ![Zoho Dashboard login](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/channel-partners-zoho-link-razorpay-zoho-1.jpg.md) +3. Click **Integrations**. + ![Integrate Zoho suite with Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/channel-partners-zoho-link-razorpay-zoho-2.jpg.md) +4. Find **Razorpay** on the **Customer Payments** page and click **Setup Now**. + ![Naviagte to customer payments to start the setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/channel-partners-zoho-link-razorpay-zoho-3.jpg.md) +5. You are redirected to the Razorpay login page. Enter your credentials on this page and click **Login**. + ![Enter your credentials to login](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/channel-partners-zoho-link-razorpay-zoho-4.jpg.md) +6. Click **Authorize**. + ![Allow Zoho to access your account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/channel-partners-zoho-link-razorpay-zoho-5.jpg.md) +7. The integration is complete, Razorpay is marked as `Active` and you can start accepting payments from your customers using the Razorpay Payment Gateway. + ![Integration is complete](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/channel-partners-zoho-link-razorpay-zoho-6.jpg.md) + +The short animation below shows you how to integrate your Zoho suite with Razorpay. +![See how to integrate with Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/channel-partners-zoho-integrate-razorpay-on-zoho.gif.md) + +> **INFO** +> +> +> **Recurring Billing** +> +> To enable Recurring Billing for your Razorpay account, email [the Zoho Support Team](mailto:support.india@zohobooks.com). Refer to the [Zoho FAQs page](https://www.zoho.in/books/kb/razorpay/does-razorpay-support-recurring-payments.html) for more details about this. +> + +## Zoho Checkout + +To integrate Zoho Checkout with Razorpay: + +1. [Set up your Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#1-sign-up). +1. Log in to [Zoho Checkout](https://checkout.zoho.in/app#/getting-started) and click **Set up a payment gateway**. + ![Log in to Zoho Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/channel-partners-zoho-link-razorpay-zoho-7.jpg.md) +2. Click **Configure Account** under **Razorpay**. + ![Configure your account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/channel-partners-zoho-link-razorpay-zoho-8.jpg.md) +3. You are redirected to the Razorpay login page. Enter your credentials on this page and click **Login**. + ![Enter your credentials to login](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/channel-partners-zoho-link-razorpay-zoho-4.jpg.md) +4. Click **Authorize**. + ![Allow Zoho to access your account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/channel-partners-zoho-link-razorpay-zoho-5.jpg.md) +5. The integration is complete, Razorpay is marked as `Active` and you can start accepting payments from your customers using the Razorpay Payment Gateway. + ![Integration is complete](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/channel-partners-zoho-link-razorpay-zoho-9.jpg.md) + +Reach out to the [Zoho Support team](https://help.zoho.com/portal/en/home#contactus) in case of errors. Connect with our [support team](https://razorpay.com/support/) if there are specific requirements from Razorpay. diff --git a/llm-content/payments/payment-links.md b/llm-content/payments/payment-links.md new file mode 100644 index 00000000..93d8d99e --- /dev/null +++ b/llm-content/payments/payment-links.md @@ -0,0 +1,86 @@ +--- +title: Payments | Payment Links +heading: About Payment Links +description: Create Razorpay Payments Links and share them with your customers from the Razorpay Dashboard or using APIs and start accepting payments. Check the advantages, payment methods, international currency support and more. +--- + +# About Payment Links + +Razorpay Payment Links let you accept payments without a website or app. + +Generate a unique link from your [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md) and share it with customers via email, SMS, or social media. Customers can use these links to pay securely and easily. + +You can manage all Payment Links directly from the Dashboard - create, cancel, duplicate, search, or update them. You can also get instant notifications by subscribing to Webhook events. Most of these actions can also be performed using APIs. + + + + + + + +## Advantages + +- **Create-to-Collect in a matter of minutes**: Create Payment Links easily with a few clicks and share them with customers. + +- **Automatic sharing of link**: The customers receive a Payment Link on SMS or email using which they can quickly pay. + +- **Set expiry date**: Set due dates for Payment Links after which the links expire. + +- **Partial payments**: Allow your customers to make [partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md). You can also decide the first installment amount to be paid by customers in case of partial payments. + +- **Set reminders**: Send automated SMS to your customers to remind them about outstanding payments. + +## List of Supported Payment Methods + +**Online Payment** + +Customers can make online payments using [Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md), [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md), [NetBanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md), [Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/amazon-pay.md), [EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md), [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md) and [Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/bank-transfer.md) options. + +## International Currency Support + +You can create Payment Links in any of the supported [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) using the Dashboard or APIs. + +### Address Verification System + +If you are accepting international payments, you can use Razorpay's Address Verification System (AVS). AVS verifies if a customer's billing address (postal code and the billing street address) matches the billing address on file with the card issuer. Based on the response from the issuer, Razorpay will accept or cancel the transaction. This helps in the prevention of fraud in international payments. Know more about [Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md). + +## Get Started + +Ensure you have a [Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md). Log in to the Dashboard and click Payment Links. + +## Integrate With Existing Systems + +You can easily integrate Razorpay Payment Links with your existing order management and billing solution using the Dashboard. + +## Supported Platforms + +Razorpay Payment Links is supported on the following platforms: + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + + + Web | Android | iOS | Webview + --- + x | x | x | x + + + +#### Related Information + +- [How Payment Links Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/how-it-works.md) + +- [Standard Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/standard.md) + +- [UPI Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/upi.md) + +- [Payment Links States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/states.md) + +- [Create a Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md) + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/faqs.md) diff --git a/llm-content/payments/payment-links/announcements/retry-link.md b/llm-content/payments/payment-links/announcements/retry-link.md new file mode 100644 index 00000000..f0f321b0 --- /dev/null +++ b/llm-content/payments/payment-links/announcements/retry-link.md @@ -0,0 +1,24 @@ +--- +title: Increase Order Conversion Rate with Retry Links +description: Use Retry Links to convert customers who dropped off from your website/app due to payment failures. +--- + +# Increase Order Conversion Rate with Retry Links + +With so much investment in getting customers to visit your website/app, drop-off should be the last problem to have because a payment has failed. + +Presenting **Retry Links**, a new feature to help convert customers who dropped off because of failed payments! + +## How does it Work? + +- When a payment fails on your website, your customers will receive the following notification on the payment gateway. + ![Payment Failed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pl-payment-retry-notification.jpg.md) +- They will also receive an SMS with a link to retry the payment. + ![Payment Failed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pl-payment-retry-message.jpg.md) +- The link will take them to the checkout page where they can complete their order. + ![Payment Failed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pl-retry-link.jpg.md) + +This feature will be made available for your account on **9th February 2022**. +More details and reports will be available under the report section of the Dashboard. + +For any questions, feedback, or to turn off this feature for your account, please feel free to contact us at [retrylink@razorpay.com](mailto:retrylink@razorpay.com). diff --git a/llm-content/payments/payment-links/apis.md b/llm-content/payments/payment-links/apis.md new file mode 100644 index 00000000..84ba170d --- /dev/null +++ b/llm-content/payments/payment-links/apis.md @@ -0,0 +1,60 @@ +--- +title: Payment Links APIs +description: Create, update, cancel and fetch Payment Links and resend notifications using Payment Links APIs. +--- + +# Payment Links APIs + +Payment Links help you to receive payments from customers by sending them links via email and SMS. Use our APIs to create Payment Links. You can enter details such as amount, link expiry time, and more and send the link to the customer via email or SMS. The customer can select their desired payment method and complete the payment. Once the customer makes the payment, you will receive the amount in your bank account according to your settlement cycle. + +There are two types of Payment Links: + +- **Standard Payment Links**: Customers can make payments through netbanking, cards, wallets, UPI and bank transfer payment methods using Standard Payment Links. + +- **UPI Payment Links**: Customers can select the UPI app of your choice to make payments using UPI Payment Links. + +## Payment Link APIs + +### Using Callback URL Parameter + +Upon successful payment, customers can be directed to a designated URL through the `callback_url` and `callback_method` parameters. For example, you can redirect customers to `https://example-callback-url.com/`. + +Parameter | Description +--- +`razorpay_payment_id` | Payment ID of the successful payment. +--- +`razorpay_payment_link_id` | Payment Link ID generated at the time of link creation. +--- +`razorpay_payment_link_reference_id` | Internal order ID set by you for business reference using the `reference_id` parameter at the time of link creation. No value is returned if `reference_id` parameter was not used. +--- +`razorpay_payment_link_status` | Current status of the link. +--- +`razorpay_signature` | Signature for server-side validation to be calculated as HMAC hex digest using SHA256 algorithm. This is described below with a sample code. + +The query parameters are added to the URL as shown: + +```json: Query Parameters +https://example-callback-url.com/?razorpay_payment_id=pay_Fc8mUeDrEKf08Y&razorpay_payment_link_id=plink_Fc8lXILABzQL7M& +razorpay_payment_link_reference_id=TSsd1989& +razorpay_payment_link_status=partially_paid&razorpay_signature=b0ea302006 +``` + +### Verify Signature + +You can verify the `razorpay_signature` parameter to validate that it is authentic and sent from Razorpay servers. + +The `razorpay_payment_link_id​` attribute should be stored in your system against an order, right after it is returned in the create [Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md) response. This is displayed as just `id` (for example, `"id": "plink_FKeEiabyAAiSVQ"`) in the response. + +- The `razorpay_signature` should be validated by your server. In order to verify the signature, you need to create a signature using + - `razorpay_payment_link_id` + - `razorpay_payment_link_reference_id` + - `razorpay_payment_link_status` + - `razorpay_payment_id​` + as payload and your `key_secret​` (your API secret) as secret. + +After validating the signature, you should fetch the order in your system corresponding to the `razorpay_payment_link_id`​ and mark this order as successful. + +### Related Information + +- [Payment Links APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/subscribe-to-webhooks.md) diff --git a/llm-content/payments/payment-links/bank-transfer.md b/llm-content/payments/payment-links/bank-transfer.md new file mode 100644 index 00000000..3ccbeb7f --- /dev/null +++ b/llm-content/payments/payment-links/bank-transfer.md @@ -0,0 +1,55 @@ +--- +title: Payment Links | Bank Transfer Payments +heading: Receive Payments via Bank Transfer +description: Accept payments from customers using bank transfer as the payment method in Payment Links. +--- + +# Receive Payments via Bank Transfer + +Accept payments from customers in the form of bank transfers using the Razorpay Payment Links. Customers can select **Bank Transfer** as the payment method at the Checkout and copy your account details. They can then initiate online bank transfers from their netbanking account. + +Usually, businesses accept online payments from their customers via NEFT. However, the payment reconciliation process requires a lot of time and manual effort. Using Razorpay **Customer Identifiers** you can accept payments through online methods, such as NEFT, RTGS and IMPS via transactions made to a Customer Identifier. Since each Payment Link is associated with a Customer Identifier, payment reconciliation is effortless. + + to get this feature activated on your Razorpay account. + +> **WARN** +> +> +> **Watch Out!** +> +> This feature is not available for UPI Payment Links. +> + +## Use Cases + +Payment via bank transfers is useful for: + +- Personal loan payment recollection: If you are a credit provider who offers personal loans, your customers can now repay the loan amount through an online bank transfer. + +- Advance or token amount collection in case of large transactions: If you operate a business that requires you to collect an advance or token booking amount, your customers can now pay the amount through bank transfer. + +## Workflow + +To create Payment Links with Bank Transfer as a payment method: + +1. Create a Payment Link and send them to your customers using + [ Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md) or [Bulk Upload feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/batch.md). +1. Each Payment Link will have a designated Customer Identifier. This Customer Identifier has an account number and IFSC associated with it. +1. Customers open the Payment Link and select **Bank Transfer** as the payment method. + + ![Payment Links - select bank transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-bank_transfer.gif.md) + +1. Customers copy the account number and IFSC number provided at Checkout and make an NEFT or RTGS transfer to the mentioned Customer Identifier. + + ![Bank transfer on Payment Links checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-bank_transfer_checkout.jpg.md) + +1. The amount is transferred to the designated Customer Identifier. Later, based on your settlement schedule, we will settle the net amount (payment minus fees and tax) to your bank account. +1. You can view the payment under the **Transactions** → **Payments** tab on the Dashboard. + +### Related Information + +- [Bank Transfer FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/faqs.md#bank-transfer) + +- [Bank Transfer as a Payment Method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) + +- [About Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) diff --git a/llm-content/payments/payment-links/batch.md b/llm-content/payments/payment-links/batch.md new file mode 100644 index 00000000..cb8b0245 --- /dev/null +++ b/llm-content/payments/payment-links/batch.md @@ -0,0 +1,293 @@ +--- +title: Create Payment Links in Batches +description: Generate Razorpay Payment Links in bulk using the Batch Upload feature. +--- + +# Create Payment Links in Batches + +You can generate and process Payment Links in batches on the Dashboard and save time, eliminating the hassle of creating multiple individual links. + + to get this feature activated on your Razorpay account. + +## Workflow + + +### 1. Download Batch File Format + + Download the sample batch file from the Dashboard. The batch file is a simple **.xlsx** or **.csv** file. + + + ![Download Sample file from Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/batch-pl-download.jpg.md) + + + + + +### 2. Add Payment Details in Batch File + + +> **INFO** +> +> +> +> **Handy Tips** +> +> - The size of a batch file can be up to 10 MB. You can add up to 50,000 rows in a particular file. The Payment Links are processed in the same sequence as listed in the file. +> - The Field names/headers in a batch should not be modified. Modifications can cause upload failure. +> + + + + Watch this video to see how to add payment details in the batch file. + + +[Video: https://www.youtube.com/embed/aMsG7zDLbww] + + + + The batch file contains all the necessary details to create Payment Links. Given below are the required fields for creating a batch file: + + `Reference Id` _optional_ + : Enter a unique number for each Payment Link. This is mapped to the `receipt` value provided while creating an Order on your server-side. This field has a limit of 40 characters. + + `Customer Name` _optional_ + : Name of the customer. This field has a limit of 40 characters. + + `Customer Email` _optional_ + : Email address of the customer. + + + + `Customer Contact` _optional_ + : Contact number of the customer. You can enter domestic as well as international numbers. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. + + `Upi Link` _mandatory_ + : Determines the type of Payment Link to be created. Possible values: + - `0`: Indicates a Standard Payment Link will be created. + - `1`: Indicates a UPI Payment Link will be created. + + `Currency` _optional_ + : Defaults to `INR`. We also accept payments in international currencies. + + `Amount` _mandatory_ + : Amount to be paid by the customer in currency subunits. That is, if currency selected is 'INR', the amount must be in paise. For example, enter 29995 for an amount of ₹299.95. The minimum amount should be ₹100, that is 10000. + + + + + + + `Description` _mandatory_ + : Brief description of the Payment Link. + + `Expire by` _optional_ + : Date and Time at which the Payment Link expires. Supported formats: +`DD-MM-YYYY HH:mm:ss` (For example, 14-12-2018 18:45:00) +`DD-MM-YYYY HH:mm` +`DD-MM-YYYY` + + + + `Partial Payment` _optional_ + : Indicates whether partial payments are enabled. Set to `1` to enable partial payments and `0` to disable. + +> **INFO** +> +> **Handy Tips** +Partial payments are not allowed for UPI Payment Links. + + `First Payment Min Amount (In Paise)` _optional_ + : Minimum amount to be paid by the customer as the first partial payment. For example, if an amount of ₹7,000 is to be received from the customer in two installments of #1 - ₹5,000 and #2 - ₹2,000, you can set this value as `500000`. + + + `Notes` _optional_ + : The notes object is a set of key-value pairs used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, each 255 characters long (maximum). + + + + Ensure that the date format does not get modified. Watch this video to see how to fix date formatting issues: + + ![Fix date formatting issues in batch file](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-batch-batch-pl.gif.md) + + + + + +### 3. Upload Batch File on Dashboard + + **To upload a batch file:** + + 1. Navigate to **Payment Links** → **Batch Uploads**. + 2. Click the **Click here to upload** button. + + + ![Upload batch file button on Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pl-batch-upload-click.jpg.md) + + + + 3. On the pop-up page, drag and drop the file over the highlighted area. Alternatively, click the **Click to Upload** option to select your file from your system. + + + + ![Batch upload page with Click to Upload button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/batch_pl.jpg.md) + + + + The file is validated and uploaded to the Razorpay server. After the file is successfully uploaded, a snippet view of the file is displayed in the **Batch Upload** pop-up page. + + #### Add Details to Batch Upload Pop-up Page + + **To add details to Batch upload:** + + 1. Enter a relevant file name in the **BATCH FILE NAME** field. + 2. Select **Send auto reminders** if you want to send automatic reminders for all Payment Links. By default, reminders are not enabled during batch creation of Payment Links. + 3. Follow these steps to determine whether the links should be sent immediately or later. Also, select the medium of link sharing: + + - If you want to send links immediately, select **via SMS** and/or **via Email** next to the **NOTIFY** check box options and click **Create**. + - If you want to send them later, do not select any medium and click **Create**. + + + + ![Add details to batch upload pop-up page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/batch_create_pl.jpg.md) + + + + Know how to [handle errors](#step-5-handle-errors) that occur during batch upload. + + + +### 4. Perform Post-batch Creation Actions + + After the batch is created, you can see a **Batch Created Successfully** pop-up page. Click **Close** and reload the page. The newly created batch file will appear in the list of **Batch Uploads**. + + The **Batch Uploads** screen displays the following fields: + + + + ![Perform Post batch creation actions page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-batch-screen.jpg.md) + + + + + + + + Field | Descriptions + --- + Batch ID | Unique identifier of a batch upload. + --- + Batch Name | Name of the batch file. + --- + Count | The number of processed rows in a batch. + --- + Status | Current [state](#batch-file-states) of the batch file. + --- + Actions | The operations you can perform on a particular batch file. For example, Download Report File and Send all links. + + + + + Watch this video to see how to generate the batch file report: + + +[Video: https://www.youtube.com/embed/IobQMjW0XUs] + + + + **To view more details about the batch file:** + + 1. Click the **Download** button to download the **Batch File Report**. This report provides you with details of the links created. Also, it displays any errors that occurred during the process. + + + + Batch File States + + The batch file states are explained in the table given below: + + + + State | Description + --- + **Created** | You have successfully uploaded the file. No action has been performed on the file by us. + --- + **Processing** | We are processing the file. + --- + **Processed** | The file has been processed by us. + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> - The **Processed** state does not mean all rows in the file were successfully processed. It just means the file was successfully processed, with or without errors. +> - Download the **Bulk Upload** report to check for errors. You can correct these errors and upload the data again in another file. +> + + + + + + 2. Click the Batch ID to view the **Total rows processed**, **Payment Links created**, and the number of **Paid** and **Expired** links. You can also view the **Status** and **Created At** information of the batch. The details of individual Payment Links created from the batch are also displayed here. + + ![Batch file status page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/batch_details.jpg.md) + + + +### Send Unsent Payment Links + + After a batch is successfully created and is in the **Processed** state, you can see either an **All links sent** or a **Send all links** option under the **Actions** based on your notification choice above. + + To send the Payment Links: + + 1. Click the **Send all links** button. + 2. Select **Send SMS** and/or **Send Email** on the **Send Reminder?** pop-up page that appears. + 3. Click **Yes, Send all**. This enables Razorpay to process and issue Payment Links to their respective recipients as defined in the batch file. + + + + + + +### 5. Handle Errors + + Batch file errors are detected during file upload. You can also download the batch file report after the upload to check for errors. + + A processed batch file does not necessarily mean that all Payment Links were created successfully. There is a chance that a few Payment Links did not get created because of certain issues in the entered data. For example, data was missing in a few fields. + + Download the **Batch Report** to understand the reason for the error. This contains the following additional fields to help you check if a Payment Link was issued for a row or not. + + + Additional Fields | Datatype | Description + --- + Status | _string/null_ | This indicates the processing status of the row. It can either be "success" or "failed". + --- + Payment Link ID | _string/null_ | The unique identifier of the Payment Link. This is null/empty if there are errors during the creation. + --- + Payment Link Short URL | _string/null_ | The URL of the Payment Link. This is null/empty if there are errors during the creation. + --- + Error Code | _string/null_ | In case of an error, this column has an error code. + --- + Error Description | _string/null_ | In case of an error, this column has the error message. + + + To fix the errors, make the required changes and re-upload the batch file. + + + + Watch this video to see how to handle errors found on the batch file report. + + +[Video: https://www.youtube.com/embed/N2_lrWc-rEw] + + + + +### Related Information + +- [How Payment Links Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/how-it-works.md) +- [Payment Links States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/states.md) +- [Create a Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/faqs.md) diff --git a/llm-content/payments/payment-links/cancel.md b/llm-content/payments/payment-links/cancel.md new file mode 100644 index 00000000..97d67719 --- /dev/null +++ b/llm-content/payments/payment-links/cancel.md @@ -0,0 +1,37 @@ +--- +title: Payments Links | Cancel a Payment Link +heading: Cancel a Payment Link +description: Cancel Payment Links that are in the created state from the Razorpay Dashboard. +--- + +# Cancel a Payment Link + +You can cancel Payment Links issued to your customers. Your customers will not be able to make payments using the cancelled links. + +> **INFO** +> +> +> **Handy Tips** +> +> You can only cancel Payment Links that are in the `created` state. +> + +## Cancel a Payment Link From Dashboard + +Watch this video to see how to cancel a Payment Link. + +[Video: https://www.youtube.com/embed/m8L41QL7Dlg?si=PVZdSIB7ctmRkZ9U] + +To cancel a Payment Link: + +1. Log in to the Dashboard. +1. Navigate to **Payment Links**. +1. Click on the Payment Link you want to cancel. +1. Click **Cancel Link**. +1. Click **Yes, Cancel**. + +#### Related Information + +- [Create a Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md) + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/faqs.md) diff --git a/llm-content/payments/payment-links/create.md b/llm-content/payments/payment-links/create.md new file mode 100644 index 00000000..cfc64c14 --- /dev/null +++ b/llm-content/payments/payment-links/create.md @@ -0,0 +1,130 @@ +--- +title: Create a Payment Link +description: Create Standard Payment Links and UPI Payment Links. +--- + +# Create a Payment Link + +You can create 2 types of Payment Links using the Razorpay Dashboard: +- [Standard Payment Links](#create-a-standard-payment-link-from-dashboard) +- [UPI Payment Links](#create-a-upi-payment-link-from-dashboard) + +## Create a Standard Payment Link From Dashboard + +You can create a Standard Payment Link to accept payments from your customers. When you create a Payment Link, it moves to **Issued** state by default. + +Watch this video to see how to create a Standard Payment Link. + +[Video: https://www.youtube.com/embed/_FrOVkuqGVo] + + +### To create a Standard Payment Link: + + 1. Log in to the Dashboard. + 2. Go to the **PAYMENT PRODUCTS** section and click **Payment Links**. + 3. Click **+ Create Payment Link**. + 4. Enter the required details in the Standard Payment Link pop-up page. + + - **Amount** (Mandatory): Select the currency and amount for the Payment Link. For example, select `₹` and enter`1000` for ₹1,000. You can also accept payments in [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + - **Payment For** (Optional): Enter a description entered. For example, `School fees for Gaurav Kumar - Class XII B`. + + - **Customer Details** (Optional): Enter the customer's email and phone number. For example, `9876543210` and `gaurav.kumar@example.com`. + + - **Notify via Email** (Optional): Select this option if you want us to send the Payment Link to the customer via email. Available only if you have entered the customer's email. + +Customers receive email in the following format: + ![Payment link email format](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-link-email-templete.jpg.md) + - **Notify via SMS** (Optional): Select this option if you want us to send the Payment Link to the customer via SMS. Available only if you have entered the customer's phone number. + Customers receive SMS in the following format: + For example, `Acme Corp has requested payment of INR 100. You can pay through this link: https://rzp.io/rzp/D6W1Xk3u - Razorpay` + + - **Reference Id** (Optional): Provide a unique reference number for the link. For example, `Adbb001`. + + + + - **Notes** (Optional): Provide the internal notes for the Payment Link. For example: +Title (key): Acme Corp. +- Description (value): Birthday cake Feb. + + - Review the details and click **Create Payment Link**. + + + + +## Create a UPI Payment Link From Dashboard + +You can create a UPI Payment Link to collect funds from your customers via the Dashboard. When you create a Payment Link, it moves to the **Issued** state by default. + +Watch this video to see how to create a UPI Payment Link. + +[Video: https://www.youtube.com/embed/aBLKnhu-J14?si=sxFruRjb96YUQi0L] + + +### To create a UPI Payment Link: + + 1. Log in to the Dashboard. + 1. Navigate to **Payment Links**. + 1. Click **Create Payment Link**. + 1. Click **UPI Payment Link**. + 1. Enter the required details in the UPI Payment Link pop-up page. + + - **Amount** (Mandatory): Select the currency and amount for the Payment Link. For example, select `₹` and enter`1000` for ₹1,000. + + - **Payment For**: Enter a description entered. For example, `School fees for Gaurav Kumar - Class XII B`. + + - **Customer Details**: Enter the customer's email and phone number. For example, `9876543210` and `gaurav.kumar@example.com`. + + - **Notify via Email** (Optional): Select this option if you want us to send the Payment Link to the customer via email. Available only if you have entered the customer's email. + +Customers receive email in the following format: + ![Payment link email format](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-link-email-templete.jpg.md) + - **Notify via SMS** (Optional): Select this option if you want us to send the Payment Link to the customer via SMS. Available only if you have entered the customer's phone number. +Customers receive SMS in the following format: + For example, `Acme Corp has requested payment of INR 100. You can pay through this link: https://rzp.io/rzp/D6W1Xk3u - Razorpay` + + - **Reference Id**: Provide a unique reference number for the link. For example, `Adbb001`. + + - **Link Expiry**: The date and time at which the Payment Link should expire. + + - **Internal Notes**: Provide the internal notes for the Payment Link. For example:Title (key): Acme Corp. +- Description (value): Birthday cake Feb. + + + 1. Review the details and click **Create Payment Link**. + + After a UPI Payment Link created, it appears in the list of Payment Links. + + +## Make Test Payments for Payment Links + +> **INFO** +> +> +> **Handy Tips** +> +> We recommend you to create Payment Links in **Test Mode** for testing purposes. +> + + +### To make test payments for Payment Links: + + 1. Log in to the Dashboard. + 2. Navigate to **Payment Links**. + 3. Select the Payment Links you wish to test. + 4. Copy the link URL and open it in your browser. + ![Payment Link Test Payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pl-dashboard-test-payment.jpg.md) + 5. Select the payment method of your choice and proceed with the payment. + 6. Select **Success** or **Failure**, depending on which flow you wish to test. + ![Test Payment Success or Failure Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pl-test-payment-success.jpg.md) + 7. You should see a confirmation message depending on the flow you have selected. + ![image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pl-test-payments-success.jpg.md) + + +## Create a Payment Link Using API + +You can create a Payment Link using: +- [Create a Standard Payment Link API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/create-standard.md) +- [Create a UPI Payment Link API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/create-upi.md) + +#### Related Information diff --git a/llm-content/payments/payment-links/customise.md b/llm-content/payments/payment-links/customise.md new file mode 100644 index 00000000..d89bd83a --- /dev/null +++ b/llm-content/payments/payment-links/customise.md @@ -0,0 +1,49 @@ +--- +title: Customise Payment Links +description: Customise the Payment Links payment request page using Razorpay APIs. Make changes to the payment details and checkout sections. +--- + +# Customise Payment Links + +You can send standard Payment Links to customers via email and SMS. When customers click on the link, they are redirected to a page hosted by us where they can complete the payment. + +The payment request page consists of two sections: +- **Payment Details**: Displays details about the payment description, expiry date, payable amount and in case of partial payments, partial amount paid and due. +- **Checkout**: Displays the **Phone** and **Email** fields and list the various payment methods available. + +![payment links payment request page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-customize-pl_original.jpg.md) + +You can customise this hosted page as per your brand and business requirements. For example, you may display only specific payment methods, change the color of Checkout, and so on. + +> **INFO** +> +> +> **Handy Tips** +> +> - This feature is not available for UPI Payment Links. +> - You can only customise the payment request page using API. It is not possible to do this from the Dashboard. +> + +## Customise Payment Links Using API + +You can customise the payment request page to suit your business requirements. You can do this by passing the customisation parameters in the Create Payment Links API request. + +Shown below is an example of a **customised payment request page**. You can customise the field labels in the **Payment Details** section and modify the look-and-feel of the **Checkout** in the payment request page to meet your brand and business requirements. + +![payment links customized payment request page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-customize-sample_custom_checkout.jpg.md) + +As you can see, the labels in the Payment Details section have been renamed, while the Checkout displays only two payment methods instead of the default four. + +### Checkout Section + +You can customise the following fields in the checkout section: + +- [Implement thematic changes in Payment Links checkout section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/checkout-theme.md) +- [Change business name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/change-business-name.md) +- [Customise payment methods - options and method parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/customise-payment-methods.md) +- [Customise payment methods - options and config parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/customise-options-config.md) + +#### Related Information + +- [Payment Links APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/faqs.md) diff --git a/llm-content/payments/payment-links/duplicate.md b/llm-content/payments/payment-links/duplicate.md new file mode 100644 index 00000000..5eecca77 --- /dev/null +++ b/llm-content/payments/payment-links/duplicate.md @@ -0,0 +1,27 @@ +--- +title: Duplicate a Payment Link +description: Duplicate a Payment Link from the Razorpay Dashboard. +--- + +# Duplicate a Payment Link + +You can duplicate an existing Payment Link from the Dashboard. This saves you time and effort when creating multiple links to be sent to different customers. You can duplicate links in any state. Know more about [Payment Link states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/states.md). + +## Duplicate a Payment Link From Dashboard + +Watch this video to see how to make a duplicate of a Payment Link. + +[Video: https://www.youtube.com/embed/l9nYCZ6L1rQ] + +To duplicate a Payment Link: +1. Log in to the Dashboard. +1. Navigate to **Payment Links**. +1. Click on the Payment Link you want to duplicate. The details appear on the right panel. +1. Click the duplicate icon. +1. Edit the required fields on the **Create Payment Link** screen. For example, customer details, receipt number and notes. +1. Click **Create Payment Link**. + +#### Related Information + +- [Create a Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/faqs.md) diff --git a/llm-content/payments/payment-links/edit.md b/llm-content/payments/payment-links/edit.md new file mode 100644 index 00000000..59c07e3c --- /dev/null +++ b/llm-content/payments/payment-links/edit.md @@ -0,0 +1,41 @@ +--- +title: Edit a Payment Link +description: Know how to edit Payment Links. +--- + +# Edit a Payment Link + +You can edit Payment Links issued to customers. Given below are the different operations that you can perform based on the state of the Payment Link: + +## Edit a Payment Link From Dashboard + +Watch this video to see how to edit a Payment Link. + +[Video: https://www.youtube.com/embed/rMeOZFe72_I] + +To edit a Payment Link: +1. Log in to the Dashboard. +1. Navigate to **Payment Links**. +1. Click the **Payment Link** you want to edit. The details of the **Payment Link** appear on the right panel. +1. Add/edit the fields you want. + +### Disable Reminders by Editing Payment Link + +To disable reminders by editing Payment Link: +1. Log in to Dashboard and navigate to **Payment Links**. +2. Click a **Payment Link ID** to view its details in the side panel appears. +3. Enable or disable **Send auto reminders** for the Payment Link. + +![](/docs/assets/images/payment-links-reminders-disable-reminder-pl-edit.jpg) + +## Edit a Payment Link Using API + +You can edit a Payment Link using: +- [Update a Standard Payment Link API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/update-standard.md) +- [Update a UPI Payment Link API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/update-upi.md) + +#### Related Information + +- [Create a Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md) + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/faqs.md) diff --git a/llm-content/payments/payment-links/faqs.md b/llm-content/payments/payment-links/faqs.md new file mode 100644 index 00000000..dfda087f --- /dev/null +++ b/llm-content/payments/payment-links/faqs.md @@ -0,0 +1,194 @@ +--- +title: Payment Links | FAQs +heading: FAQs (Frequently Asked Questions) +description: Find answers to frequently asked questions about Razorpay Payment Links. +--- + +# FAQs (Frequently Asked Questions) + +## For Businesses + + +### 1. I do not have a website or app. Can I still use Payment Links to accept payments from customers? + + Yes, you can. You do not need a website or mobile app to use Payment Links. You can create and send Payment Links in 3 easy steps: + 1. Log in to the Dashboard and create a Payment Link. + 1. Send it to the customer via SMS and/or email. + 1. The customer opens the link and completes the payment. + + + +### 2. Can I create a Payment Link using which customers can pay an amount of their choice? + + No. You can create Payment Links with fixed amounts only. Customers cannot enter an amount of their choice. Use [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md) if you want to allow customers to enter an amount of their choice. + + + +### 3. Can I accept recurring payments using Payment Links? + + No. Payment Links can only be used to accept one-time payments. Use [Razorpay Subscriptions](https://razorpay.com/docs/payments/subscriptions/) to collect recurring payments from customers. + + + +### 4. Can I show support details such as helpline, support webpage and email address on the Payment Link? + + Yes, you can show support details on the Payment Link. + + Follow these steps: + + 1. Log in to the Dashboard + 2. Navigate to **Account & Settings** → **Business settings**. + 3. In the **Customer support details** section, enter these details: + - **Phone Number** + - **Email id** + - **Website/Contact us link** + 4. Click **Submit**. + + + +### 5. Why is there a Report Payment Link option on a Payment Link created for my business? + + As per Razorpay's risk policy, the **Report Payment Link** option will be displayed by default for all Payment Links. + + + +### 6. Why is the customer email address and phone number I specified during Payment Link creation not auto-populating on the hosted payment page? + + As per our updated security policy, even if the customer's email address and phone number are provided while creating the Payment Link, these details are not auto-populated on the Checkout section of the Payment Link hosted page. The customer will have to enter these details manually while making the payment. + + + +### 7. Why is there a Report Payment Link option on a Payment Link request email sent for my business? + + As per our risk policy, the **Report Payment Link** option will be displayed by default on all Payment Link request emails. + + + +### 8. Can I set a minimum upfront payment amount when I enable Partial Payments for a Payment Link on the Dashboard? + + + + + +### 9. Can I cancel a Payment Link if it is in "partially_paid" state? + + No. You cannot cancel a payment link if it is in `paid` or `partially_paid` state. You can only cancel a payment link if it is in `issued` state. + + + +### 10. Can I automatically send an invoice to customers after they complete payment via a Payment Link using Razorpay Invoices? + + No, you cannot send an invoice automatically. [Razorpay's Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is designed to initiate payments, not for post-payment invoicing. You need to handle invoice generation on your end after receiving payment confirmation. + + + +### 11. Can I accept international payments using Payment Links? + + Yes, you can accept international payments using Payment Links. Know more about [international payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md). + + + +### 12. Can I use a Payment Link to accept payments from multiple customers? + + No, you can only accept payments from a single customer using a Payment Link. Use [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md) if you want to use one link to accept payments from multiple customers. + + + +### 13. Why is the "callback_url" not working for UPI Payment Links on Android? + + UPI Payment Links will not redirect to "callback_url" on an Android device even if the parameter is passed while creating a Payment Link. + + + +### 14. Can the UPI Payment Link be used if the customer is the fee bearer? + + UPI Payment Links do not work if the customer is the fee bearer. + + +### 15. How do I get webhook notifications for Payment Links? + + To receive webhook notifications for Payment Link events, you need to set up Payment Link-specific webhook events in your Razorpay Dashboard. + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings** → **Webhooks**. + 3. Subscribe to events such as `payment_link.paid`, `payment_link.cancelled`, `payment_link.expired` and `payment_link.partially_paid`. + + These events will notify you whenever a Payment Link status changes and include details like Payment Link id, amount, status and customer information. This allows you to track Payment Link transactions separately from regular payment or order events. For detailed implementation steps and payload structure, refer to the [Payment Link Webhooks documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/subscribe-to-webhooks.md). + + +### 16. Can I automate Payment Link generation from Salesforce and send them via WhatsApp? + + Yes, you can automate Payment Link generation using the [Payment Links API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/create-standard.md). Integrate the API into your Salesforce workflow to programmatically create links based on your business logic. + + Razorpay does not provide direct WhatsApp integration, but you can use the built-in SMS and email notification system by setting the `notify` parameters in the API request. + + +## For Bank Transfer Payments + + +### 1. What is a Customer Identifier? + + A Customer Identifier is a customisable virtual receiver (with customer identifier number and IFSC) created on top of your current/escrow account. You can share the Customer Identifier information with your customers/businesses and collect payments. + + Normally, reconciling online payments (like NEFT) requires significant time and manual effort. Customer Identifiers solve this by allowing you to accept payments via NEFT, RTGS, and IMPS through a dedicated virtual receiver. + + Since each payment transaction is automatically linked to a specific Customer Identifier, the reconciliation process becomes instant and effortless. + + + +### 2. How will the payments made by customers be settled to my bank account? + + The net amount (payment minus fees and taxes) is transferred from the Customer Identifier to your bank account as per your settlement schedule. + + + +### 3. If I enable Bank Transfers as a payment method for Payment Links, will it appear as a payment option on other Razorpay products as well? + + Yes, once this feature is enabled, it will appear in all instances of Razorpay Checkout, be it Invoices, Payment Pages or the Checkout integrated on your website . You cannot enable or disable it for specific products. + + + +### 4. Will a new Customer Identifier be created for multiple partial payments made on a Payment Link? + + No. Each Payment Link will have only one Customer Identifier associated with it. Even if multiple partial payments are made against the link, the amount will be received by the same Customer Identifier. + + +## For Customers + + +### 1. I have received a Payment Link that looks suspicious and fraudulent. How can I report it? + + + There are two ways by which you can report a fraudulent Payment Link: + - Using the Payment Link hosted page. + - Using the email notification you received. + + **Using the Payment Link Hosted Page** + + Follow these steps: + 1. Click the Payment Link and open the hosted page. + 2. Click **Report Payment Link**. + ![report payment link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-report-a-link.jpg.md) + + **Using an Email Notification You Received** + + Follow these steps: + 1. Open the email received from the business. + 2. Click **Report Email**. + ![Email Report Payment ink](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-email-report.jpg.md) + + **On Clicking Report Option** + + After you click the report link, a form is displayed. Enter the following details: + 1. **Reason to report this merchant**: Click the drop-down list to select the relevant reason. For example, **Reporting fake website/company**. + 2. **Email ID**: Enter your email address at which we can contact you for additional information. + 3. **Contact No** (optional): Enter your contact number. + 4. **Name** (optional): Enter your name. + 5. Complete the captcha step and click **SUBMIT REPORT**. + + ![report payment link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-report-payment-link.jpg.md) + + **Additional Steps** + + If you have already completed the payment, you can choose to: + - Request a refund by contacting the business' support team. The support details are available on the Payment Link hosted page. + - File a dispute against the business. Know more about [Disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md). diff --git a/llm-content/payments/payment-links/glossary.md b/llm-content/payments/payment-links/glossary.md new file mode 100644 index 00000000..cc34741c --- /dev/null +++ b/llm-content/payments/payment-links/glossary.md @@ -0,0 +1,21 @@ +--- +title: Payment Links | Glossary +heading: Glossary +description: List of commonly used terms related to Razorpay Payment Links. +--- + +# Glossary + +The following table lists all the commonly used terms and their definitions used in Payment Links: + +Terms | Description +--- +Expiry Date | The Expiry Date is the date after which the customer cannot pay for the Payment Link. +--- +Payment Link | A short URL added in the invoice notifications that are sent to the customers via email or SMS. The customers can click the link to make online payments. +--- +Partial Payment | A feature using which customer can make payments in installments. This feature is available only on Standard Payment Links. +--- +UPI Payment Links | Payment Links for which customers can make payments only using UPI. +--- +Reminders | SMS reminders sent to customers to notify them about outstanding payments. diff --git a/llm-content/payments/payment-links/how-it-works.md b/llm-content/payments/payment-links/how-it-works.md new file mode 100644 index 00000000..cbb9e86d --- /dev/null +++ b/llm-content/payments/payment-links/how-it-works.md @@ -0,0 +1,63 @@ +--- +title: How Payment Link Works +description: Create Payment Links and send them to customers to receive payments and perform other actions. +--- + +# How Payment Link Works + +Understand the complete end-to-end flow about how you can use Razorpay Payment Links. + +![payment link flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-pl-workflow.jpg.md) + +## Workflow + +The steps given below give a detailed view on the lifecycle of a Payment Link. + + +### Step 1: Create a Payment Link + + [Create a Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md) by providing all the required details. You can set an expiry date and enable partial payments. + + + + + +### Step 2: Send a Payment Link + + Send a Payment Link to a customer via email and/or SMS. The customer receives the link via SMS and email. They can open the link and pay using one of the available [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md#list-of-supported-payment-methods). + + + +### Step 3: Receive Payments + + The customer clicks the Payment Link and tries to make the payment. + + - The customer makes the payment. If [partial payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) is enabled, the customer can choose the amount to be paid. + - The customer chooses the mode of payment. + + The customer makes a successful payment. The Payment Link is marked as `paid` or `partially` paid. You receive a notification about the payment. + + +> **INFO** +> +> +> **Handy Tips** +> +> After the payment is captured, the amount is settled to your account as per the settlement schedule. Know more about [payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md), [settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md) [, refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) and [disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md). +> + + + + +### Step 4: Track Payment Links and Reports + + - **Notifications:** You receive notifications regarding activity on Payment Links via emails and webhook. Know more about [subscribing to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/subscribe-to-webhooks.md). + - **Track Payments:** Track payments made against the issued Payment Links on Dashboard. Click **Payment Links** from the left menu. All the links are listed with their status under Payment Links. + - **Reports:** Detailed insights can be gained using reports and real-time data on the Dashboard. These reports can then be used for accounting and reconciliation purposes. Know more about [reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md#payment-links). + + +#### Related Information + +- [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md) + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/faqs.md) diff --git a/llm-content/payments/payment-links/legacy.md b/llm-content/payments/payment-links/legacy.md new file mode 100644 index 00000000..ee3e5fce --- /dev/null +++ b/llm-content/payments/payment-links/legacy.md @@ -0,0 +1,60 @@ +--- +title: Payment Links - Legacy +description: Know about API and Razorpay Dashboard actions on Legacy Contract Payment Links. +--- + +# Payment Links - Legacy + +> **WARN** +> +> +> +> **Deprecation** +> +> The legacy version of Payment Links (Dashboard app and API) will be deprecated on ~~31st March 2021~~ 15th August 2021. Raise a request with our [support team](https://razorpay.com/support/#request) to enable the new version of the app/API on your account. We will be enabling the new version for you post-July end. +> + +## Which Version Do I Have + +Check your Dashboard to see which version you have access to. + +- If you see the new tag beside Documentation on the Dashboard, you are using the latest version of the app. + + ![Documentation tag Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-new-contract-identifier.jpg.md) + +- If the new tag is NOT shown on Dashboard, you are using the legacy version of the app. We recommend you migrate to the new version of the app for more features, improved scalability and better support. Raise a request with our [support team](https://razorpay.com/support/#request) to enable the new version of the app on your account. + +### Supported Features + +The legacy version of Payment Links supports the following features: +- [Partial Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/partial-payments.md) +- [International Currency Support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md) +- [Bulk Upload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/batch.md) +- [Reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) +- [Customization](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/customise.md) +- [Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/offers.md) +- [Bank Transfers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/bank-transfer.md) + +> **WARN** +> +> +> **UPI Payment Links Not Supported** +> +> The legacy version does not support the UPI Payment Links feature. +> + +## API and Dashboard Operations + +You can perform Payment Links operations via [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md) or the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md). + +## Webhooks + +The table below lists the various webhooks available for legacy version of the app. Sample payloads are available [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/invoices.md). + +Webhook Events | Description +--- +`invoice.partially_paid` | Triggered when a partial payment is made against a payment link. +--- +`invoice.paid` | Triggered when a payment link is successfully paid. +--- +`invoice.expired` | Triggered when a payment link expires. diff --git a/llm-content/payments/payment-links/manage-team.md b/llm-content/payments/payment-links/manage-team.md new file mode 100644 index 00000000..3c25cf5c --- /dev/null +++ b/llm-content/payments/payment-links/manage-team.md @@ -0,0 +1,225 @@ +--- +title: Payment Links | Manage Team +heading: Manage Team +description: Mange your team, add or remove users and provide appropriate role to control access for Payment Links. +--- + +# Manage Team + +You can manage your team of users who can access the Dashboard. You can provide specific access to a user or a set of users for Payment Links. + +**Example** + +You need someone in your organisation to perform day-to-day operations such as creating a Payment Link or a webhook. In this case, you can give access of your Dashboard to a person and assign the **Operations** role. This limits the access to actions related to refunds and settlements only. + +## Standard User Roles +Following are the predefined user roles that you can assign to your team members: + + + The Owner can perform all the actions. + + + + The Admin can perform all the actions. + + + + Check all the actions that a Manager can perform. + + + + Check all the actions that a team member with Operations role can/cannot perform. + + + + Check all the actions that a team member with Finance role can/cannot perform. + + + + + Check all the actions that a a team member with ePOS role can/cannot perform. + + + + Check all the actions that a team member with Support role can/cannot perform. + + +> **INFO** +> +> +> **Handy Tips** +> +> +> - Assign a role to your team member. +- Each role is tied to an email address. +- Assign multiple roles to a team member using multiple email addresses. +- Limit a user's access to the Dashboard using these roles. + +> +> + +### Owner + +Actions Allowed +--- +✔ Generate API Keys +--- +✔ Create and manage webhooks +--- +✔ View all transactions and settlements +--- +✔ Configure payment capture settings +--- +✔ Capture transactions +--- +✔ Create refunds +--- +✔ Create and manage Payment Links +--- +✔ Create and upload batch files +--- +✔ Download and email reports +--- +✔ Use Payments Mobile App +--- +✔ Add Funds/Balance +--- +✔ Install OAuth Apps + +### Admin + +Actions Allowed +--- +✔ Generate API Keys +--- +✔ Create and manage webhooks +--- +✔ View all transactions and settlements +--- +✔ Configure payment capture settings +--- +✔ Capture transactions +--- +✔ Create refunds +--- +✔ Create and manage Payment Links +--- +✔ Create and upload batch files +--- +✔ Download and email reports +--- +✔ Use Payments Mobile App + +### Manager + + Actions Allowed/Not Allowed +--- + ✔ Create and manage webhooks +--- +✔ View all transactions and settlements +--- +✔ Configure payment capture settings +--- +✔ Capture transactions +--- +✔ Create refunds +--- +✔ Create and manage Payment Links +--- +✔ Create and upload batch files +--- +✔ Download and email reports +--- +✔ Use Payments Mobile App +--- +✘ Generate API Key + +### Operations + +Actions Allowed/Not Allowed +--- +✔ Create and manage webhooks +--- +✔ View all transactions and settlements +--- +✔ Configure payment capture settings +--- +✔ Capture transactions +--- +✔ Create refunds +--- +✔ Create and manage Payment Links +--- +✔ Create and upload batch files +--- +✔ Download and email reports +--- +✔ Use Payments Mobile App +--- +✖ Generate API Keys + +### Finance + +Actions Allowed/Not Allowed +--- +✔ View all transactions and settlements +--- +✔ Configure payment capture settings +--- +✔ Create and upload batch files +--- +✔ Download and email reports +--- +✔ Use Payments Mobile App +--- +✖ Generate API Keys +--- +✖ Create and manage webhooks +--- +✖ Capture transactions +--- +✖ Create refunds +--- +✖ Create and manage Payment Links + +### ePOS + +Actions Allowed/Not Allowed +--- +✔ Create Invoices and Payment Links in INR only +--- +✖ Generate API Keys +--- +✖ Create and manage webhooks +--- +✖ Manage Teams +--- +✖ View all transactions and settlements +--- +✖ Capture transactions +--- +✖ Create refunds +--- +✖ Create and upload batch files +--- +✖ Download and email reports +--- +✖ View Payment Links created by other users + +### Support + +Actions Allowed/Not Allowed +--- +✔ View all transactions and settlements +--- +✖ Generate API Keys +--- +✖ Create and manage webhooks +--- +✖ Capture transactions +--- +✖ Create refunds +--- +✖ Create and manage Invoices, Payment Pages, Payment Links, Plans and Subscription Links, Customers and Virtual Accounts +--- +✖ Create and upload batch files diff --git a/llm-content/payments/payment-links/offers.md b/llm-content/payments/payment-links/offers.md new file mode 100644 index 00000000..275aef56 --- /dev/null +++ b/llm-content/payments/payment-links/offers.md @@ -0,0 +1,32 @@ +--- +title: Payment Links | Offers +heading: Offers on Payment Links +description: Provide offers to customers making payments using Payment Links. +--- + +# Offers on Payment Links + +Use Razorpay Offers to provide discounts or cashback on Payment Links issued to customers. You can restrict the payment methods on which the Offers are applied and limit their usage to a defined period. + +## Enable Offers for Payment Links + +Select the **Checkout Visibility** option to display discount and cashback offers on Payment Links. + +## How Offers Appear for Payment Links + +Watch this video to see how offers appear for Payment Links when customers want to make payments using Payment Links. + +[Video content] + +> **WARN** +> +> +> **Watch Out!** +> +> This feature is not available for UPI Payment Links. +> + +#### Related Information + +- [About Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers.md) +- [Create Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md) diff --git a/llm-content/payments/payment-links/partial-payments.md b/llm-content/payments/payment-links/partial-payments.md new file mode 100644 index 00000000..d95ce78e --- /dev/null +++ b/llm-content/payments/payment-links/partial-payments.md @@ -0,0 +1,90 @@ +--- +title: Enable Partial Payments | Enhance Customer Convenience +heading: Enable Partial Payments +description: Enable partial payments for Payment Links issued to customers from the Dashboard or APIs. +--- + +# Enable Partial Payments + +You can configure the Standard Payment Links to receive partial payments from your customer for a particular order. + +## When to Use Partial Payments + +The **Partial Payment** feature comes in handy while dealing with large transactions, where the customer finds paying the total amount in parts more convenient than paying the entire amount upfront. + +> **INFO** +> +> +> **Handy Tips** +> +> This feature is not available for UPI Payment Links. +> + +#### Example + +A tourism company, Acme Corp. offers expensive travel packages. As per the company's payment terms, a fixed booking amount should be collected from the customer before making any tour reservations. + +With the **Partial Payments** feature, Acme Corp. issues a Payment Link using which the customer pays the booking amount for an order. The customer can make multiple payments for the remaining balance amount for the same order using the same Payment Link. + +## How Partial Payments Work + +Here is how Partial Payments work: + +![partial payment workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-partial-payments.jpg.md) + +1. You create a Payment Link of . +2. The customer chooses to pay an amount of out of the due amount mentioned in the Payment Link. +3. Since the customer pays less than the due amount, the Payment Link would show `partially_paid` status until the amount due is zero or until the link gets `expired` or `canceled`. +4. After the full amount has been paid, the status of the Payment Link changes to `paid`. + +Just like any other payment, each partial payment would have a unique `payment_id`, but will be tied to the same `order_id`, thereby allowing customers to easily make multiple payments for the same order using the same **Payment Link**. This makes it easier to track the status of a particular order. Know more about [Payment Links States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/states.md). + +## Enable Partial Payments From Dashboard + +You can enable partial payments while creating the Payment Link. You can also edit an issued Payment Link to allow partial payments. + + + + Watch this video to see how to enable partial payments while creating the Payment Links. + + +[Video: https://www.youtube.com/embed/9f9bMw5rxEY] + + + + To enable partial payments during Payment Link creation: + 1. Log in to the Dashboard. + 1. Navigate to **Payment Links**. + 1. Click **+ Create Payment Link**. + 1. Enter the necessary details such as **Amount** and **Payment For**. + 1. Select the **Enable Partial Payments** option. + 1. Click **Create Payment Link**. + + + + + To enable partial payments after Payment Link is issued: + + 1. Log in to the Dashboard. + 1. Navigate to **Payment Links**. + 1. Click on the Payment Link for which you want to enable/disable partial payments. + 1. Select the **Enable Partial Payment** option. + + + + ![enable partial payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-partial-payments-once-issued.jpg.md) + + + + + + +#### Related Information + +- [How Payment Links Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/how-it-works.md) + +- [Payment Links States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/states.md) + +- [Create a Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md) + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/faqs.md) diff --git a/llm-content/payments/payment-links/reminders.md b/llm-content/payments/payment-links/reminders.md new file mode 100644 index 00000000..b3a89977 --- /dev/null +++ b/llm-content/payments/payment-links/reminders.md @@ -0,0 +1,159 @@ +--- +title: Send Reminders +description: Enable or disable reminders for Payment Links. +--- + +# Send Reminders + +You can send your customers automated SMS and email reminders for Payment Links. Setting reminders helps you to: + +- Increase the number of paid Payment Links. +- Reduce cost and manual effort required to collect payments. +- Reduce the number of days taken by your customer to make the payment. + +## Types of Reminders + +Following are the various types of reminders you can set for Payment Links: + +- [For all Payment Links](#set-reminders-for-all-payment-links): This is an account-level setting for all Payment Links where the Payment Link reminder is sent at similar time intervals. For example, 2 days after creation or 3 days before expiry. +- [For an individual Payment Link](#set-reminders-for-individual-payment-links): Enable reminders for specific Payment Links. +- [For Payment Links created using bulk upload](#set-reminders-for-bulk-payment-links): Enable reminders for Payment Links created using bulk upload. + +## Set Reminders for All Payment Links + +This is an account-level setting. If enabled, all Payment Links have the same reminder configurations. + + +### To set reminders for all Payment Links: + + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings** → **Payments and refunds** → **Reminders**. + 3. Enable the **Payment Links Reminders** toggle. + 4. Configure reminders for links with and without an expiry date. You can set a maximum of 3 reminders. + 5. Select the channel to send the reminders — SMS, email, or both. + + ![Payment Links Reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-reminders_enabled.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> Customers will receive the reminder email or SMS only if their contact and email details were provided when the Payment Link was created. Know more about [creating Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md). +> + + +### Payment Links With Expiry Date + + If you have set an expiry date for the Payment Link, you can configure a maximum of three reminders based on the expiry date. For example, if you have issued a Payment Link with an `expiry date of 30 Nov 2024`, you can set three reminders: + + + Expiry Date | Reminders to be sent + --- + 30 Nov 2024 | 3 days before expiry date - `27 Nov 2024` + 2 days before expiry date - `28 Nov 2024` + 1 day before expiry date - `29 Nov 2024` + + + ![](/docs/assets/images/dashboard-guide-reminders_expiry_pl.jpg) + + + +### Payment Links Without Expiry Date + + If you have not set any expiry date for the Payment Link, you can configure a maximum of three reminders to be sent after the issued date. For example, if you have `issued a Payment Link on 25 Nov 2024`, you can set three reminders: + + + Issued Date | Reminders to be sent + --- + 25 Nov 2024 | 3 days after issued date - `28 Nov 2024` + 7 days after issued date - `02 Dec 2024` + 10 days after issued date - `05 Dec 2024` + + + ![](/docs/assets/images/dashboard-guide-reminders_pl_issued_date.jpg) + + +## Advanced Settings + +Select the **Channels** through which the reminders must be sent. Available channel options are SMS and email. + +> **INFO** +> +> +> **Handy Tips** +> +> Reminders are sent only between 11AM–12PM and 3PM–5PM. +> + +## Set Reminders For Individual Payment Links + +You can enable or disable reminders for individual Payment Links. + + +### During Payment Link Creation + + To enable reminders while creating a Payment Link: + 1. Log in to the Dashboard. + 1. Navigate to **Payment Links**. + 1. Click **+ Create Payment Link**. + 1. Enter the necessary details such as **Amount** and **Payment For**. + 1. Enable the **Send auto reminders** option. + 1. Click **Create Payment Link** to create the Payment Link. + + + ![Enable or disable reminders when creating a Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-auto-reminders.jpg.md) + + + + + + +### After Payment Link is Issued + + You can edit the Payment Link and enable or disable reminders after issuing it. + + To enable or disable reminders by editing a Payment Link: + 1. Log in to the Dashboard. + 1. Navigate to **Payment Links**. + 1. Click the Payment Link for which you want to enable or disable reminders. The details of the Payment Link appear on the right pane. + 1. Enable or disable the **Send auto reminders** option. + + + ![Edit reminders for an issued Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-send-auto-reminders.jpg.md) + + + + + +## Set Reminders For Bulk Payment Links + +You can set reminders for Payment Links when creating them via bulk upload. + +> **INFO** +> +> +> **Handy Tips** +> +> By default, reminders are not enabled during batch creation of Payment Links. +> + +![Reminders for bulk uploads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-bulk-reminders.jpg.md) + +Know more about enabling or disabling reminders when creating [Payment Links using Bulk Upload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/batch.md#:~:text=Send%20auto%20reminders). + +## Send Reminders Using API + +You can send reminders for Payment Links to customers using the API. Reminders are enabled by default during Payment Link creation. + +- `reminder_enable` parameter in [Create a Standard Payment Link API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/create-standard.md) +- `reminder_enable` parameter in [Create a UPI Payment Link API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/create-upi.md) + +#### Related Information + +- [How Payment Links Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/how-it-works.md) +- [Payment Link States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/states.md) +- [Create a Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md) +- [Payment Links APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/faqs.md) diff --git a/llm-content/payments/payment-links/resend.md b/llm-content/payments/payment-links/resend.md new file mode 100644 index 00000000..f0fc1e57 --- /dev/null +++ b/llm-content/payments/payment-links/resend.md @@ -0,0 +1,35 @@ +--- +title: Resend a Payment Link +description: Resend a Payment Link via email and SMS to a customer. +--- + +# Resend a Payment Link + +You can resend Payment Links in the **Issued** state to your customer. + +## Resend Payment Links From Dashboard + +Watch this video to see how to resend Payment Links to your customers. + +[Video: https://www.youtube.com/embed/hFnSPMHQy_U] + +To resend a Payment Link: +1. Log in to the Dashboard. +1. Navigate to **Payment Links**. +1. Select the Payment Link which you wish to resend. The details appear on the right-side pane. +1. Click the resend icon. + + ![resend icon](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-resend-icon.jpg.md) + +1. Select the modes (Email or SMS or both) in which you want to resend the Payment Link. + + ![resend mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-resend-mode.jpg.md) + +1. Click **Send Link**. + +#### Related Information + +- [Payment Links States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/states.md) +- [Create a Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/faqs.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/subscribe-to-webhooks.md) diff --git a/llm-content/payments/payment-links/search.md b/llm-content/payments/payment-links/search.md new file mode 100644 index 00000000..9667d190 --- /dev/null +++ b/llm-content/payments/payment-links/search.md @@ -0,0 +1,44 @@ +--- +title: Search a Payment Link +description: Search for a Payment Link using the various search filters. +--- + +# Search a Payment Link + +You can search for Payment Links on the Dashboard by specifying various filters. Know more about [Payment Link states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/states.md). + +## Search a Payment Link From Dashboard + +To search a Payment Link: + +1. Log in to the Dashboard. +2. Go to the **PAYMENT PRODUCTS** section and click **Payment Links**. +3. In the list of Payment Links that appears, search for the link by specifying filters. + +![Search for a payment link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-search-pl.jpg.md) + +Filter | Description +--- +Payment Link Status | The status of the Payment Link. +--- +Payment Link ID | Unique identifier of the Payment Link. +--- +Batch Id | Unique identifier of the batch as part of which you created the Payment Link. +--- +Reference Id | Unique reference number of the Payment Link. +--- +Customer Contact | Registered contact of the customer. +--- +Customer Email | Email address of the customer. +--- +Notes | Additional information stored in the Customer Notes field while creating the Payment Link. +--- +Payment Link Type | The type of Payment Link. You can use this filter to search for Standard or UPI Payment Links. +--- +Duration | The time range within which the Payment Link was created. + +#### Related Information + +- [Payment Links States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/states.md) +- [Create a Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/faqs.md) diff --git a/llm-content/payments/payment-links/standard.md b/llm-content/payments/payment-links/standard.md new file mode 100644 index 00000000..c7b8c120 --- /dev/null +++ b/llm-content/payments/payment-links/standard.md @@ -0,0 +1,54 @@ +--- +title: Standard Payment Links +description: Create Standard Payment Links and share them with your customers through SMS and emails. +--- + +# Standard Payment Links + +You can send the Standard Payment Links as URLs to customers through SMS and emails. Customers can open these URLs and make payments using netbanking, cards, wallets, UPI and bank transfer payment methods. + +You can also use [UPI Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/upi.md) to receive UPI payments. + +## Payment Link States + +Know about the different [Standard Payment Link states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/states.md#standard-payment-links). + +## Create + +## Standard Payment Link Vs. UPI Payment Link + +You can also use [UPI Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/upi.md) to receive UPI payments. The table below lists the applicable features for Standard and [UPI Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/upi.md): + +Features | Standard Payment Links | UPI Payment Links +--- +Reminders for Payment Links | ✔ | ✔ +--- +Partial Payments | ✔ | ✘ +--- +Bulk Upload | ✔ | ✔ +--- +Customise Payment Links | ✔ | ✘ +--- +Offers on Payment Links | ✔ | ✘ +--- +Receive Payments via Bank Transfer | ✔ | ✘ + +## Customer Interaction + +Watch this video to see the customer flow for Standard Payment Links. + +[Video content] + +#### Related Information + +- [How Payment Links Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/how-it-works.md) + +- [Payment Links States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/states.md) + +- [UPI Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/upi.md) + +- [Create a Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md) + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/faqs.md) + +- [Payment Links APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/apis.md) diff --git a/llm-content/payments/payment-links/states.md b/llm-content/payments/payment-links/states.md new file mode 100644 index 00000000..b18f5faa --- /dev/null +++ b/llm-content/payments/payment-links/states.md @@ -0,0 +1,49 @@ +--- +title: Payment Link States +description: List of states of a Razorpay Payment Link and their significance. +--- + +# Payment Link States + +A Payment Link starts in the `issued` state and moves through several states in its life cycle. The life cycle differs for [Standard](#standard-payment-links) and [UPI](#upi-payment-links) Payment Links. + +## Standard Payment Links + +After a Standard Payment Link is created, you can track its status on your Dashboard on the Payment Link page. The diagram given below illustrates the life cycle of a Payment Link. + +The table below lists the various states and their descriptions in the Payment Link life cycle: + +## UPI Payment Links + +After you create a UPI Payment Link, you can track its status on your Dashboard on the **Payment Links** page. The diagram given below illustrates the life cycle of a UPI Payment Link. + +![life cycle - upi payment links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-upi-link-cycle.jpg.md) + +The table below lists the various states and their descriptions in the UPI Payment Link life cycle: + +Status | Description | Next Steps +--- +Created | Indicates that the Payment Link has been created. Know more about [creating a UPI Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md#create-a-standard-payment-link-from-dashboard). | Start accepting payments by sending the Payment Link to the customers. +--- +Paid | Indicates that the Payment Link has been paid in full. | NA +--- +Cancelled | Indicates that you have cancelled the Payment Link. Know more about [ cancelling Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/cancel.md). | Customers can no longer pay using this Payment Link. Create a new Payment Link to start accepting payments (If required). +--- +Expired | The payment link has expired. You can set the expiry date and time while creating the payment link. Know more about [creating a UPI Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md#create-a-upi-payment-link).| This link is no longer accessible to the customers. Create a new Payment Link to start accepting payments (if required). + +> **INFO** +> +> +> +> **Partial Payments Not Supported** +> +> UPI Payment Links do not support partial payments. Hence, the `partially_paid` state does not exist. +> + +#### Related Information + +- [How Payment Links Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/how-it-works.md) + +- [Create a Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md) + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/faqs.md) diff --git a/llm-content/payments/payment-links/subscribe-to-webhooks.md b/llm-content/payments/payment-links/subscribe-to-webhooks.md new file mode 100644 index 00000000..cdcf81bb --- /dev/null +++ b/llm-content/payments/payment-links/subscribe-to-webhooks.md @@ -0,0 +1,33 @@ +--- +title: Payment Links | Subscribe to Webhooks +heading: Subscribe to Webhooks +description: Subscribe to various webhook events related to Payment Links to receive instant notifications. +--- + +# Subscribe to Webhooks + +Subscribe to webhook events relevant to Payment Links. + +To subscribe to webhook events: +1. Log in to the Dashboard. +2. Navigate to **Account & Settings** → **Webhooks** to subscribe to any of the events mentioned in the following section. + +## Webhook Events and Descriptions + +Webhook Events | Description +--- +payment_link.paid | Triggered when a Payment Link is successfully paid. +--- +payment_link.partially_paid | Triggered when a partial payment is made against a Payment Link. +--- +payment_link.expired | Triggered when a Payment Link expires. +--- +payment_link.cancelled | Triggered when you cancel a Payment Link. + +Know more about [ Webhooks ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) and check the [sample payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payment-links.md). + +#### Related Information + +- [Payment Links States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/states.md) + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/faqs.md) diff --git a/llm-content/payments/payment-links/transfer-payments.md b/llm-content/payments/payment-links/transfer-payments.md new file mode 100644 index 00000000..4c87fe27 --- /dev/null +++ b/llm-content/payments/payment-links/transfer-payments.md @@ -0,0 +1,33 @@ +--- +title: Payment Links | Transfer Payments +heading: Transfer Payments Received Using Payment Links +description: Set up Payment Links to automatically transfer payments to a linked account, saving the need for a separate API call. +--- + +# Transfer Payments Received Using Payment Links + +You can configure your **Payment Links** to automatically transfer payments to a **linked account** once the payment is successfully received. This feature saves you the additional step of making a separate Transfer API call. + +Check the [transfer payments received using Payment Links API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/transfer-payments.md). + +## Workflow + +Follow these steps to transfer payments received using Payment Links to linked accounts. + +### Step 1: Create and Onboard Linked Accounts + +You need to use **Razorpay Route** to create and onboard linked accounts. You can do this directly from your Dashboard. + +> **WARN** +> +> +> **Watch Out\!** +> +> - You cannot create transfers on a Payment Link if the `accept_partial` parameter is enabled. Ensure this parameter is set to `false` and that you do not pass the `first_min_partial_amount` parameter. +> - Transfers are currently only supported for Payment Links created using `INR`. You cannot create transfers for Payment Links with an international currency. +> +> + +### Step 2: Transfer Payments + +Use the [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/transfer-payments.md) to transfer payments received using Payment Links. diff --git a/llm-content/payments/payment-links/upi.md b/llm-content/payments/payment-links/upi.md new file mode 100644 index 00000000..3abb3d2a --- /dev/null +++ b/llm-content/payments/payment-links/upi.md @@ -0,0 +1,60 @@ +--- +title: Create UPI Payment Link with Razorpay +heading: UPI Payment Links +description: Check how to create UPI Payment Link to accept UPI payments. +--- + +# UPI Payment Links + +You can send the UPI Payment Links as URLs to your customers to accept UPI payments. When the customers click on the URL, a list of UPI apps installed on their mobile device is displayed. Customers can select the UPI app of their choice to complete the payment. You can also use [Standard Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/standard.md) to receive payments using payment methods such as netbanking, cards and UPI. + +> **INFO** +> +> +> **Handy Tips** +> +> - This feature works only on Android mobile devices. +> - UPI Payment Links will work only in **Live Mode**. +> - **Enable Partial Payments** feature is not applicable for UPI Payment Links. +> + +## Advantages + +- UPI is a popular payment method that helps customers to make quick payments. +- Customers do not have to enter card details, netbanking login details, thus avoiding manual errors and failed payments. +- UPI payments have a high success rate compared to other payment methods. + +## Supported Features + +UPI Payment Links support the following features: [Reminders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/reminders.md) and [Batch Upload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/batch.md). + +## Payment Link States + +Know about the different [UPI Payment Link states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/states.md#upi-payment-links). + +## Create + +## UPI Apps Preinstalled/Not Installed + + + Watch this video to see how the UPI Payment Link works when your customers have UPI apps installed on their devices. + ![UPI Payment Link - customer interaction with preinstalled upi apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-upi-payment.gif.md) + + + Watch this video to see how the UPI Payment Link works when your customers do not have UPI apps installed on their devices. + ![UPI Payment Link - customer interaction without upi apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-links-upi-pl-no-apps.gif.md) + + Your customer can install any UPI app and try again to make the payment. + + +### Paid, Expired or Cancelled Payment Links + +When customers attempt payment for paid, expired or cancelled Payment Links, the respective statuses are displayed. They are not allowed to make payments using such links. + +#### Related Information + +- [How Payment Links Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/how-it-works.md) +- [Payment Links States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/states.md) +- [Standard Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/standard.md) +- [Create a Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/create.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links/faqs.md) diff --git a/llm-content/payments/payment-links/use-cases.md b/llm-content/payments/payment-links/use-cases.md new file mode 100644 index 00000000..e0d8bf25 --- /dev/null +++ b/llm-content/payments/payment-links/use-cases.md @@ -0,0 +1,84 @@ +--- +title: Payment Links Use Cases +description: Explore the diverse use cases of Razorpay Payment Links, a robust payment collection solution for businesses. +--- + +# Payment Links Use Cases + +Explore how Razorpay Payment Links simplify direct payments, providing a frictionless transaction experience for customers and efficient revenue collection for businesses across various industries. + + + + + + + + + + + + + + + + + + + + +### Retail + + Acme Electronics uses Razorpay Payment Links to offer customers a direct payment option for online orders, in-store pickups, and after-sales services. Here is how Payment Links help Acme: + - Create-to-Collect in Minutes: Generate and share Payment Links with customers quickly after an order is placed, simplifying the checkout process. + - Automatic Link Sharing: Send Payment Links via SMS or email, enabling customers to pay with ease. + - Set Expiry Dates: Encourage prompt payments by setting an expiration date for each Payment Link. + - Partial Payments: Offer customers the option to make partial payments, adding flexibility for higher-priced items or services. + - Easy API Integration: Integrate Payment Links seamlessly with your sales systems for a streamlined process. + - Set Reminders: Automatically remind customers of outstanding payments, ensuring a higher collection rate. + + + +### Freelancing and Professional Services + + Acme Freelancers leverage Razorpay Payment Links to bill clients for completed projects, ad-hoc tasks, or retainers. Here is how Payment Links help Acme: + - Project Milestone Payments: Send Payment Links at various project stages, ensuring timely compensation. + - Ad-Hoc Tasks: Quickly generate and send a Payment Link for immediate payment, useful for rush jobs or extra tasks. + - Retainer Services: Collect monthly retainer fees easily through Payment Links. + - Automatic Payment Reminders: Set up automated SMS reminders for due payments, reducing the need for manual follow-ups. + + + +### Hospitality + + Acme Hotels employs Razorpay Payment Links to facilitate bookings, additional service charges, and event reservations. Here is how Payment Links help Acme: + - Room Bookings: Guests receive a Payment Link to secure their booking, streamlining the reservation process. + - Additional Services: Easily send Payment Links for room upgrades or special requests, enhancing the guest experience. + - Event Reservations: Manage event bookings efficiently by sending Payment Links for immediate confirmation. + - Payment Link Expiration: Set deadlines for event reservation payments to manage capacity and planning. + + + +### Education + + AcmeHorizon Academy uses Razorpay Payment Links to collect tuition, fees for extra-curricular activities, and donations. Here is how Payment Links help AcmeHorizon: + - Tuition Fee Collection: Simplify fee payments by creating Payment Links in batches and sending parents a direct Payment Link for each term's tuition. Send your customers automated SMS and email reminders for Payment Links. + - Extracurricular Activities: Send Payment Links for additional classes or events, making it easier for parents to pay for their children's activities. + - Fundraising and Donations: Facilitate the donation process for school fundraising efforts with easily shareable Payment Links. + + + +### Healthcare + + Acme Clinics optimise patient billing by using Razorpay Payment Links for consultations, procedures, and health packages. Here is how Payment Links help Acme Clinics: + - Consultation Fees: Patients can pay for their appointments via Payment Links, confirming their slots conveniently. + - Medical Procedures: After treatment, patients receive a Payment Link to settle their bills without the need to queue. + - Health and Wellness Packages: Offer special health packages that patients can pay for through a Payment Link, right from their phone or computer. + + + +### Securities and Wealth Management + + Acme Securities validates bank accounts to accept payments from customers throughout their journey. Here is how Payment Links can help: + - Initial Funding: Send a Payment Link to new customers after they've finished onboarding, making it easy for them to add funds and begin trading. + - Demat Account Activation: If a payment fails during the demat account creation process, you can send a Payment Link to prevent the customer from dropping off. + - Top-Up Reminders: Notify customers when their trading account balance is low and use a Payment Link to help them quickly add more funds. diff --git a/llm-content/payments/payment-links/view-reports.md b/llm-content/payments/payment-links/view-reports.md new file mode 100644 index 00000000..1a9731a9 --- /dev/null +++ b/llm-content/payments/payment-links/view-reports.md @@ -0,0 +1,20 @@ +--- +title: Payment Links | View Reports +heading: View Reports +description: Generate the Razorpay Payment Links reports. +--- + +# View Reports + +You can generate the Standard Payment Links report from the Dashboard. + +To generate reports: + +1. Log in to the Dashboard. +1. Navigate to **Reports**. +1. On the Reports page, enter the following details: + 1. **Select Report Type**: Select the **Payment Links** report. + 1. **Select Period**: Select the period for which the report should be generated. + 1. **Select Format**: Select the file format. You can report in CSV, XLS and XLSX formats. + 1. **Email Report To**: You can send the report to the email address registered with Razorpay. +1. Click **Generate Report**. diff --git a/llm-content/payments/payment-links/whatsapp-bot.md b/llm-content/payments/payment-links/whatsapp-bot.md new file mode 100644 index 00000000..13b29c95 --- /dev/null +++ b/llm-content/payments/payment-links/whatsapp-bot.md @@ -0,0 +1,31 @@ +--- +title: Create Payment Links on WhatsApp +description: Add the Payment Links WhatsApp bot on your Smartphone. +--- + +# Create Payment Links on WhatsApp + +Install the Razorpay WhatsApp Bot for Payment Links and accept payments from your customers by creating and sharing Payment Links to them directly from WhatsApp. + +## Installation and Configuration + +> **INFO** +> +> +> **Handy Tips** +> +> If you lose all your contacts or misplace your mobile phone, you can recover access to the WhatsApp bot by following this process: +> Send a text message saying `Create 100` to this phone number: `+91 6364900106`. Please ensure you send this message from your number registered on WhatsApp. +> + +1. Log in to the Dashboard and navigate to the **App Store**. +2. Select the **Payment Links Bot**. + ![Select Payment Links Bot](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pl-app-store-whatsapp-bot.jpg.md) +3. Click **Install**. + ![Install Payment Links Bot](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pl-whatsapp-bot-install.jpg.md) +4. You will receive a welcome message on the mobile number which is associated with your Razorpay Admin account. + ![Install Payment Links Bot](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pl-whatsapp-welcome.jpg.md) +5. To create a Payment Link, Send `Create `. Eg. Send `Create 100` to create a Payment Link of INR 100. + ![Install Payment Links Bot](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pl-whatsapp-create.jpg.md) +6. You will receive the Payment Link from Razorpay which can now be shared with your customers. + ![Install Payment Links Bot](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pl-whatsapp-result.jpg.md) diff --git a/llm-content/payments/payment-methods.md b/llm-content/payments/payment-methods.md new file mode 100644 index 00000000..441bcf87 --- /dev/null +++ b/llm-content/payments/payment-methods.md @@ -0,0 +1,72 @@ +--- +title: About Payment Methods +description: Check the different payment methods that can be configured to accept payments from your customers using Razorpay products. +--- + +# About Payment Methods + +The Razorpay Checkout offers multiple payment methods, allowing your customer the flexibility to complete the payment using the payment method of their choice. This improves user experience and allows you to offer alternate payment methods to your customer in the case of downtimes or low success rate with one of the payment methods. + +For example, if you are facing downtime with netbanking, the customer can complete the payment using cards or wallets. + +You can view the payment methods enabled for your account or [raise requests for additional payment methods or providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md#enable-payment-methods) on the Dashboard. + +## View Payment Methods + +To view payment methods enabled for you: +1. Log in to the Dashboard. +2. Click **Account & Settings** in the left menu. + ![Dashboard - Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-methods-view.jpg.md) +3. Go to **Payment methods** to view the payment methods enabled for your Razorpay account. + ![Dashboard - Payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-method-enable.jpg.md) + +You can also request for [Additional Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md#request-for-payment-methods) from the Dashboard. + +## Supported Payment Methods + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Cash on Delivery](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md) | `cod` | Requires [Approval](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cod.md) and Integration. +--- +Debit Card | `debit` | ✓ +--- +Credit Card | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). +--- +[Sodexo ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/sodexo.md)| `TBD` | Requires [Approval](https://razorpay.com/support) if not on [Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer.md). + +## Supported UPI apps + +You can accept payments from customers through UPI apps, such as Google Pay, BHIM UPI and PhonePe. Razorpay supports multiple [third-party UPI apps](https://www.npci.org.in/what-we-do/upi/3rd-party-apps) and has direct integration with Google Pay. + +You can select the appropriate method of [UPI integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) based on the kind of checkout experience you want to give your customers. + +## Google Pay Integration + +In addition to the [standard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/google-pay.md) and [custom](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/google-pay/custom-integration.md) checkout integrations, there are certain intent-based payment flows that you can enable on your Checkout. Know more about [Omnichannel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/google-pay/omnichannel.md) and [Google Pay SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/google-pay/custom-integration.md#intent-based-integration) integrations. + +## Transaction Limits + +- [Transaction Limits for Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/transaction-limits.md) +- [UPI Transaction Limits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/transaction-limits/upi.md) + +## Payment Method Error Codes + +There are certain error codes specific for each payment method supported by Razorpay. Know more about the [Payment Method Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md). diff --git a/llm-content/payments/payment-methods/ach.md b/llm-content/payments/payment-methods/ach.md new file mode 100644 index 00000000..9161ff65 --- /dev/null +++ b/llm-content/payments/payment-methods/ach.md @@ -0,0 +1,73 @@ +--- +title: ACH Direct Debit +description: Accept payments with ACH Direct Debit Payment Method. +--- + +# ACH Direct Debit + +ACH Direct Debits are processed through the Automated Clearing House (ACH) payments system, which is operated by the National Automated Clearing House Association (NACHA). + +With ACH Direct Debit, customers can authorise businesses to pull funds directly from their bank accounts, providing a cost-effective alternative to card payments with fees as low as 0.5% (capped at $5) compared to typical card processing fees of 2.5-3%. + + +### Advantages + + - **Significant Cost Savings**: ACH Direct Debit processing fees are substantially lower than card network fees, saving businesses up to 70-85% on transaction costs. For a $5,000 transaction, businesses save up to $120-145 compared to card payments. + + - **Enterprise-Ready Solution**: ACH Direct Debit is the preferred payment method for B2B transactions, high-value payments and recurring billing across industries including education, healthcare and SaaS. + + - **Secure Transactions**: ACH Direct Debit payments are protected through bank-level security, automated verification systems and NACHA compliance standards, ensuring safe and reliable payment processing. + + - **Seamless Bank Verification**: Integration with Razorpay enables instant bank account verification, whilst manual entry options provide flexibility for all customer preferences. + + - **Extended Payment Capability**: ACH Direct Debit supports higher transaction values than card payments, making it ideal for enterprise contracts and large invoices without card limit constraints. + + +> **INFO** +> +> +> +> **Feature Request** +> +> This is an on-demand feature. Reach out to our [support team](https://razorpay.com/us/) to get this feature activated on your account. +> +> + +> **WARN** +> +> +> **Watch Out!** +> +> ACH Direct Debit is currently available only for US-based businesses processing payments in USD currency. Ensure your business is registered in the United States before enabling this payment method. +> + +## Payment Flow for Customers + +Given below is the payment flow for ACH Direct Debit at Razorpay checkout: + +1. The customer enters their contact details and clicks **Continue**. +2. They select **Bank Transfer**, enter personal details and address, and click **Continue**. + ![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ach-bank-transfer.jpg.md) +3. The customer enters bank details, selects either **Business account** or **Personal account**, and clicks **Pay Now**. + ![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ach-paynow.jpg.md) + +Upon successful submission, the customer receives an email confirmation with the payment id. + +> **WARN** +> +> +> **Settlement Timeline** +> +> Unlike card payments, ACH Direct Debit transactions are not processed in real-time. The payment settles in 3-5 business days, with funds available to businesses on T+5 (5 business days after transaction). Most returns occur within the first 5 days if there are issues with the bank account. +> +> ![ACH Settlement flow diagram](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ach-settlement-flow.jpg.md) +> + +## Understanding ACH Direct Debit Payment States + +ACH payments progress through the following states: + +- **Created**: Payment request has been initiated. +- **Authorised**: Payment has been accepted by Razorpay and submitted to the ACH network. +- **Captured**: Funds have been confirmed and will be settled to your account. +- **Failed**: Payment was rejected due to invalid account details, insufficient funds or other errors. diff --git a/llm-content/payments/payment-methods/alipay.md b/llm-content/payments/payment-methods/alipay.md new file mode 100644 index 00000000..c7247326 --- /dev/null +++ b/llm-content/payments/payment-methods/alipay.md @@ -0,0 +1,79 @@ +--- +title: Alipay +description: Accept payments from customers using Alipay. +--- + +# Alipay + +Alipay's payment platform offers seamless and secure transactions. It enables businesses to accept payments from customers, providing a familiar and trusted payment method. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +> **INFO** +> +> +> **Handy Tips** +> +> - List of [supported region and currencies](#supported-region-and-currencies). +> - Razorpay's [pay in native currency](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/dynamic-currency-conversion.md) feature will ensure that your customer is shown the right currency. +> + + +### Advantages + + - **Familiar Payment Experience:** Offers Chinese customers a payment method they trust, enhancing their comfort and confidence during transactions. + + - **Real-Time Currency Conversion:** Deducts payments in CNY from the consumer and settles in a foreign currency, simplifying cross-border transactions. + + - **Comprehensive Transaction Management:** Allows businesses to easily check and download transaction and settlement information. + + - **Multi-Currency Support:** Supports 11 currencies, providing a professional and global payment experience. + + - **Targeted Audience:** Primarily serves Chinese customers and travelers, offering tailored payment solutions for both local and overseas users. + + +### Refunds and Settlements + +Payments follow standard refund and settlement timelines. + +- You can refund customer payments made using Alipay by following the usual [refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) process. + +- Alipay payments take T+16 days to get settled to your Razorpay account. + +### Supported Integrations + +Secure Server-to-Server (S2S) integration that enables seamless and reliable processing and a smooth payment experience for your customers. + +- [Travel S2S Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/alipay/travel-s2s-integration.md) +- [Hotel S2S Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/alipay/hotel-s2s-integration.md) +- [Ecommerce S2S Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/alipay/ecommerce-s2s-integration.md) + +### Supported Region and Currencies + +Given below is the region and currencies that support Alipay payments: + +Region | Currency +--- +China, Global | AUD, CAD, CHF, CNY, EUR, GBP, HKD, JPY, NZD, SGD, USD + +### Minimum and Maximum Transaction Amounts for Alipay Payments + +Minimum Transaction Amount | Maximum Transaction Amount +--- +CNY 0.1 ^^^ | Bank card: CNY 50,000 (or lower depending on the bank) +--- + | Wallet balance: CNY 300,000 per transaction +--- + | Daily limit: CNY 300,000 diff --git a/llm-content/payments/payment-methods/alipay/ecommerce-s2s-integration.md b/llm-content/payments/payment-methods/alipay/ecommerce-s2s-integration.md new file mode 100644 index 00000000..ec43e6bf --- /dev/null +++ b/llm-content/payments/payment-methods/alipay/ecommerce-s2s-integration.md @@ -0,0 +1,521 @@ +--- +title: Alipay - Ecommerce S2S Integration +description: Let your customers make payments using Alipay on your website or app with S2S Integration. +--- + +# Alipay - Ecommerce S2S Integration + +Secure Server-to-Server (S2S) integration that enables seamless and reliable processing and a smooth payment experience for your customers. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +1. [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +2. Generate API Keys. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +3. Follow the [Razorpay S2S Integration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md). + +## Integrate Alipay on S2S + +Create an Order and a Payment. And pass `method` and `wallet` parameters in the create an order and a payment API. + +### Create an Order and a Payment + +Create an order along with payment using the consolidated order and payment API. This single API call combines order and payment creation, resulting in a more efficient and faster transaction process. + +Create an order along with payment by: + +- Making a single API call to Razorpay, combining order and payment creation. +- Authenticating using the provided credentials, ensuring access to the consolidated payment API. +- Manually integrating the API sample codes on your server. + +The following API will create an order along with payment with `wallet` as the payment method: + +#### API Sample Code + +The following is a sample API request and response for creating an order and payment: + +/orders + +```curl: Request +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "partial_payment": true, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "shipping_details": { + "method": "sameday", + "gift_wrap": false + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "e_commerce", + "sku": "1gr367", + "name": "TEST", + "description": "TEST", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "e_commerce": { + "other_product_codes": { + "upc": "12r34", + "ean": "123r4", + "unspsc": "123s4" + } + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "payment": { + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "method": "wallet", + "wallet": "alipay" + } +}' + +```json: Success +{ + "amount": 50000, + "amount_due": 50000, + "amount_paid": 0, + "attempts": 10, + "created_at": 1706507580, + "currency": "INR", + "entity": "order", + "id": "order_NUJs9C1Luflzts", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "payment_workflow": { + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/O0NSBQgY0BbC4b/authenticate" + } + ], + "razorpay_payment_id": "pay_O0NSBQgY0BbC4b" + }, + "receipt": "receipt#1111", + "status": "attempted" +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _mandatory_ + : `json object` Details about the customer/user. + + `name` _mandatory_ + : `string` The customer’s name. For example, `Gaurav Kumar`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `+919000090000`. + + `email` _mandatory_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, 1234567890. + + `shipping_address` _optional_ + : `Json object` This will have details about the order's shipping address. + + `line1` _optional_ + : `string` Address Line 1 of the address + + `line2` _optional_ + : `string` Address Line 2 of the address + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560068`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), e.g. 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), e.g. -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `billing_address` _mandatory_ + : `Json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address + + `line2` _optional_ + : `string` Address Line 2 of the address + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), e.g. 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), e.g. -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `shipping_details` _optional_ + : `Json object` This will have the order's shipping details. + + `method` _optional_ + : `enum` Shipping method for the product. Possible values: + - `lowcost`: Lowest-cost service. + - `sameday`: Courier or same-day service. + - `oneday`: Next-day or overnight service. + - `twoday`: Two-day service. + - `threeday`: Three-day service. + - `pickup`: Store pick-up. + - `other`: Other shipping method. + - `none`: No shipping method because the product is a service or subscription. + + `gift_wrap` _optional_ + : `boolean` Indicates whether the customer requested gift wrapping for this purchase. This field can contain one of the following values: + - `true`: The customer requested gift wrapping. + - `false`: The customer did not request gift wrapping. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `sku` _optional_ + : `string` The unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business runs a discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `e_commerce` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `other_product_codes` _optional_ + : `object` Array to collect different codes that can identify the item type. Possible values: + + `upc` + : `string` Universal Product Code (UPC; redundantly: UPC code) is a barcode symbology used worldwide to track trade items in stores. UPC consists of 12 numeric digits that are uniquely assigned to each trade item + + `ean` + : `string` European Article Numbers (EAN) is a type of barcode that encodes an article number. Contains 8 (EAN-8) or 13 (EAN-13) numerical digits. + + `unspsc` + : `string` The United Nations Standard Products and Services Code (UNSPSC) is a taxonomy of products and services used in eCommerce. It is a four-level hierarchy coded as an eight-digit number, with an optional fifth level adding two more digits. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `json object` Details of the campaign. Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, PQR12453. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Possible values: google, newsletter. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: cpc, banner and so on. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `payment` _mandatory_ + : `json object` Details about the payment. + + `contact` _mandatory_ + : `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `method` _mandatory_ + : `string` The method used to make the payment. Here, it should be `wallet`. + + `wallet` _mandatory_ + : `string` The wallet provider. Here, it should be `alipay`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` Indicates the next step to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the provider page. + + `url` + : `string` URL to be used for the action indicated. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). diff --git a/llm-content/payments/payment-methods/alipay/hotel-s2s-integration.md b/llm-content/payments/payment-methods/alipay/hotel-s2s-integration.md new file mode 100644 index 00000000..f4b6f61f --- /dev/null +++ b/llm-content/payments/payment-methods/alipay/hotel-s2s-integration.md @@ -0,0 +1,539 @@ +--- +title: Alipay - Hotel S2S Integration +description: Let your customers make payments using Alipay on your website or app with S2S Integration. +--- + +# Alipay - Hotel S2S Integration + +Secure Server-to-Server (S2S) integration that enables seamless and reliable processing and a smooth payment experience for your customers. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +1. [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +2. Generate API Keys. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +3. Follow the [Razorpay S2S Integration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md). + +## Integrate Alipay on S2S + +Create an Order and a Payment. And pass `method` and `wallet` parameters in the create an order and a payment API. +### Create an Order and a Payment + +Create an order along with payment using the consolidated order and payment API. This single API call combines order and payment creation, resulting in a more efficient and faster transaction process. + +Create an order along with payment by: + +- Making a single API call to Razorpay, combining order and payment creation. +- Authenticating using the provided credentials, ensuring access to the consolidated payment API. +- Manually integrating the API sample codes on your server. + +The following API will create an order along with payment with `wallet` as the payment method: + +#### API Sample Code + +The following is a sample API request and response for creating an order and payment: + +/orders + +```curl: Request +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "partial_payment": true, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "hotel", + "sku": "1gr367", + "name": "Grand Palace Hotel", + "description": "2BHK villa", + "quantity": 2, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "hotel": { + "sub_type": "stay", + "checkin_date": "2030-07-16", + "checkout_date": "2030-07-16", + "property_type": "", + "star_rating": 5, + "brand": "Grand Mercure", + "address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "class": "business", + "identity": { + "unique_national_id": "ABCDE1234Z", + "tax_id": "ABCDE1234Z" + } + }, + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "class": "business", + "identity": { + "unique_national_id": "ABCDE1234Z", + "tax_id": "ABCDE1234Z" + } + } + ] + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "payment": { + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "method": "wallet", + "wallet": "alipay" + } +}' + +```json: Success +{ + "amount": 50000, + "amount_due": 50000, + "amount_paid": 0, + "attempts": 11, + "created_at": 1706507580, + "currency": "INR", + "entity": "order", + "id": "order_NUJs9C1Luflzts", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "payment_workflow": { + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/O0NTY9HhENv91s/authenticate" + } + ], + "razorpay_payment_id": "pay_O0NTY9HhENv91s" + }, + "receipt": "receipt#1111", + "status": "attempted" +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _mandatory_ + : `json object` Details about the customer/user. + + `name` _mandatory_ + : `string` The customer’s name. For example, `Gaurav Kumar`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `+919000090000`. + + `email` _mandatory_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, 1234567890. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e-commerce` + - `mutual_fund` + + `sku` _mandatory_ + : `string` unique product id defined by the business. + + `name` _mandatory_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business is running any discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `hotel` _mandatory_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `sub_type` _mandatory_ + : `enum` The sub-type of the line item. Possible values: + - `stay` + - `breakfast` + - `dinner` + - `lunch` + - `early_checkin` + - `late_chechout` + - `others` + + `checkin_date` _optional_ + : `string` Represents an ISO 8601-encoded date string. For example, September 7, 2019 is represented as "2019-09-07". + + `checkout_date` _optional_ + : `string` Represents an ISO 8601-encoded date string. For example, September 7, 2019 is represented as "2019-09-07". + + `property_type` _optional_ + : `string` Represents the type of the property. Possible values: + - `resort` + - `hostel` + - `hotel` + - `inn` + - `lodge` + - `motel` + - `apartment` + - `bed_and_breakfast` + - `tent` + - `villa` + + `star_rating` _optional_ + : `integer` Denotes the star rating of the property. Possible values: 1 to 7. + + `brand` _optional_ + : `string` Brand name of the property. For example, Marriott Group. + + `address` _optional_ + : `json object` details of the property address. + + `line1` _optional_ + : `string` Address Line 1 of the address + + `line2` _optional_ + : `string` Address Line 2 of the address + + `city` _optional_ + : `string` city of the address. For example, Bengaluru + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, IND + + `state` _optional_ + : `string` Name of the state. For example, KA + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, 560001. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), e.g. 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), e.g. -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `travellers` _mandatory_ + : `json object` Details associated with passengers/travellers/beneficiaries. + + `name` _mandatory_ + : `string` Name of the passenger/traveler/beneficiary. + + `email` _optional_ + : `string` Email address of the passenger/traveler/beneficiary. + + `contact` _optional_ + : `json object` Details associated with passengers/travelers/beneficiaries. + + `age` _optional_ + : `integer` UNIX timestamp of the date of birth of the individual. For example, 1234567890. + + `class` _optional_ + : `string` Type of the flight ticket. Possible values: + - `Business` + - `Suite` + - `Premium` + - `Deluxe` + - `Standard` + + `identity` _optional_ + : `json object` Identity details of the passenger/beneficiary. + + `unique_national_id` _optional_ + : `string` National identification number. For example, Adhaar number for India. + + `tax_id` _optional_ + : `string` Passport number of the individual. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `json object` Details of the campaign. Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, PQR12453. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Possible values: google, newsletter. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: cpc, banner and so on. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `payment` _mandatory_ + : `json object` Details about the payment. + + `contact` _mandatory_ + : `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `method` _mandatory_ + : `string` The method used to make the payment. Here, it should be `wallet`. + + `wallet` _mandatory_ + : `string` The wallet provider. Here, it should be `alipay`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length should be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` Indicates the next step to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the provider page. + + `url` + : `string` URL to be used for the action indicated. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). diff --git a/llm-content/payments/payment-methods/alipay/travel-s2s-integration.md b/llm-content/payments/payment-methods/alipay/travel-s2s-integration.md new file mode 100644 index 00000000..c03b3772 --- /dev/null +++ b/llm-content/payments/payment-methods/alipay/travel-s2s-integration.md @@ -0,0 +1,533 @@ +--- +title: Alipay - Travel S2S Integration +description: Let your customers make payments using Alipay on your website or app with S2S Integration. +--- + +# Alipay - Travel S2S Integration + +Secure Server-to-Server (S2S) integration that enables seamless and reliable processing and a smooth payment experience for your customers. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +1. [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +2. Generate API Keys. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +3. Follow the [Razorpay S2S Integration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md). + +## Integrate Alipay on S2S + +- Create an Order and a Payment. +- Pass `method` and `provider` parameters in create an the order and a payment API. + +### Create an Order and a Payment + +Create an order along with payment using the consolidated order and payment API. This single API call combines order and payment creation, resulting in a more efficient and faster transaction process. + +Create an order along with payment by: + +- Authenticating using the provided credentials, ensuring access to the consolidated payment API. +- Manually integrating the API sample codes on your server. + +The following API will create an order along with payment with `wallet` as the payment method: + +/orders + +```curl: Request +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 200000, + "currency": "INR", + "receipt": "receipt#1111", + "partial_payment": true, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "line_items_total": 5000, + "line_items": [ + { + "sku": "1gr367", + "name": "Flight Ticket", + "description": "Flight tickets", + "quantity": 2, + "type": "travel", + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "travel": { + "mode": "flight", + "sub_type": "ticket", + "carrier_code": "VXI-2345", + "departure_city": "UAM", + "departure_timestamp": "1234567890", + "arrival_city": "UAM", + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + }, + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + } + ] + } + }, + { + "sku": "1gr368", + "name": "Travel_Insurance", + "description": "Flight_Travel_Insurance", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "type": "travel", + "travel": { + "mode": "flight", + "sub_type": "insurance", + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + } + ] + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "payment": { + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "method": "wallet", + "wallet": "alipay" + } +}' + +```json: Success +{ + "amount": 50000, + "amount_due": 50000, + "amount_paid": 0, + "attempts": 10, + "created_at": 1706507580, + "currency": "INR", + "entity": "order", + "id": "order_NUJs9C1Luflzts", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "payment_workflow": { + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/O0NSBQgY0BbC4b/authenticate" + } + ], + "razorpay_payment_id": "pay_O0NSBQgY0BbC4b" + }, + "receipt": "receipt#1111", + "status": "attempted" +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _mandatory_ + : `json object` Details about the customer/user. + + `name` _mandatory_ + : `string` The customer’s name. For example, `Gaurav Kumar`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `+919000090000`. + + `email` _mandatory_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the business. For example, 1234567890. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `sku` _mandatory_ + : `string` Unique product id defined by the business. It should contain 6 digit booking reference number. + + `name` _mandatory_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _mandatory_ + : `integer` Number of tickets/items/quantity to be purchased. + + `type` _mandatory_ + : `string` Defines the category type. Here it is `travel`. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _mandatory_ + : `integer` Unit price of the product in sub unit (needs to be inclusive of tax). + + `offer_price` _mandatory_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business is running any discount on the product. + + `tax_amount` _mandatory_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `travel` _mandatory_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `mode` _mandatory_ + : `string` The mode of travel. Possible values: + - `flight` + - `train` + - `bus` + - `cab` + - `others` + + `sub_type` _mandatory_ + : `string` The subtype of the line item. Possible values: + - `ticket` + - `meal` + - `insurance` + - `preferred_seat` + - `others` + + `carrier_code` _mandatory_ + : `string` International Air Transport Association (IATA) code for the carrier for this leg of the trip. + + `departure_city` _mandatory_ + : `string` 3 letter IATA airport code, also known as an IATA location identifier, IATA station code. For example, CPH for Copenhagen. + + `departure_timestamp` _mandatory_ + : `integer` UNIX timestamp. For example, 1234567890. + + `arrival_city` _mandatory_ + : `string` 3 letter IATA airport code, also known as an IATA location identifier, IATA station code. For example, CPH for Copenhagen. + + `travellers` _mandatory_ + : `json object` Details associated with passengers/travellers/beneficiaries. + + `name` _mandatory_ + : `string` Name of the passenger/traveler/beneficiary. + + `email` _optional_ + : `string` Email address of the passenger/traveler/beneficiary. + + `age` _optional_ + : `integer` UNIX timestamp of the date of birth of the individual. For example, 1234567890. + + `nationality` _optional_ + : `string` ISO3 country code to share the nationality of the individual. For example, IND. + + `class` _optional_ + : `string` Type of the flight ticket. Possible values: + - `economy` + - `premium_economy` + - `business` + - `SL` + - `3A` + - `2A` + - `1A` + - `CC` + - `others` + + `identity` _optional_ + : `json object` Identity details of the passenger/beneficiary. + + `tax_id` _optional_ + : `string` Tax id number. For example, PAN number for India. + + `unique_national_id` _optional_ + : `string` National identification number. For example, Adhaar number for India. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorised` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of the `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `json object` Details of the campaign. Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, PQR12453. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Possible values: + - `google` + - `newsletter` + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: + - `cpc` + - `banner` + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `payment` _mandatory_ + : `json object` Details about the payment. + + `contact` _mandatory_ + : `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `method` _mandatory_ + : `string` The method used to make the payment. Here, it should be `wallet`. + + `wallet` _mandatory_ + : `string` The wallet provider. Here, it should be `alipay`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length should be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` indicates the next step to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the provider page. + + `url` + : `string` URL to be used for the action indicated. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). diff --git a/llm-content/payments/payment-methods/apple-pay.md b/llm-content/payments/payment-methods/apple-pay.md new file mode 100644 index 00000000..7f50ff5a --- /dev/null +++ b/llm-content/payments/payment-methods/apple-pay.md @@ -0,0 +1,282 @@ +--- +title: Apple Pay +description: Accept Apple Pay payments from international customers with Razorpay Checkout. +--- + +# Apple Pay + +Apple Pay is a secure, contactless payment method that allows customers to pay using their Apple devices with Face ID/Touch ID authentication. Once Apple Pay is enabled and integrated, it appears on your Checkout page as a payment option, providing a frictionless checkout experience for international customers. Know more about [Apple Pay](https://www.apple.com/apple-pay/). + +> **INFO** +> +> +> +> **Feature Request** +> +> This is an on-demand feature. Please fill out the [form](https://razorpay.typeform.com/to/ALhOQrHG?utm_source=techdocs) to get this feature activated on your account. to get this feature activated on your account. +> +> + + +### Advantages + + Integrating Apple Pay as a payment method on Checkout offers you the following advantages: + + - **Higher Conversion Rates**: Up to 58% improvement in checkout conversion rates for international customers. + - **Reduced Friction**: Eliminate manual card entry with biometric authentication (Face ID/Touch ID). + - **Enhanced Security**: Benefit from Apple's tokenisation and liability shift protection. + - **Faster Checkout**: 45% reduction in checkout time for Apple device users. + - **Increased Average Order Value**: Potential 12% increase in transaction value. + - **Global Reach**: Accept payments from customers in 70+ countries. + + +## Prerequisites + +Before enabling Apple Pay, ensure you have: + +- Razorpay Standard Checkout with international payments feature enabled. +- HTTPS-enabled website with TLS 1.2 or higher. +- Access to your web server to upload verification files. +- Registered business entity (non-profit organisations are not eligible). +- Display the Apple Pay [brand mark](https://developer.apple.com/apple-pay/marketing/Apple-Pay-Mark.zip) on your website in the payment methods section. Follow [Apple's official marketing guidelines](https://developer.apple.com/apple-pay/marketing/) to display the Apple Pay brand mark to indicate support before checkout. + +## Integrate Apple Pay on Standard Checkout + +Follow the steps given below: + + +### Step 1: Domain Registration and Verification + + Apple Pay needs you to host a file in your domain. To find the list of these domains, please log in to the [dashboard](https://dashboard.razorpay.com/app/payment-methods/apple-pay). + + +> **INFO** +> +> +> **Handy Tip** +> +> Only domains whitelisted with the accounts service will be visible here. Similar domains are visible as well. Please contact our [Support team](https://razorpay.com/support/) if you cannot find your Apple Pay showing domain here. You need to whitelist your URL. +> + + + + +> **WARN** +> +> +> **Watch Out!** +> +> - The file path must be exactly as specified (case-sensitive). +> - File hosting is required on websites where Razorpay Checkout loads as an overlay/iframe. This includes: +> - WooCommerce, Magento and other ecommerce platforms where Razorpay appears as an overlay. Any website where `checkout.razorpay.com` iframe is embedded. +> - No file hosting required on: +> - Shopify, Mobile SDKs (Flutter, Native iOS, React Native) and Razorpay no-code solutions, such as [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md), [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md), [Payment Handles (razorpay.me)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app/accept-payments/razorpay-me.md) and [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md). +> - File hosting is required if you use both hosted checkouts and overlay iframe integration (a non-Shopify website where an iframe loads as an overlay and Payment Buttons) on your business id. Please do not activate Apple Pay if you have both these kinds of checkouts unless you have hosted the file at the exact path. +> + + #### Domain Verification Process: + + 1. Download the [verification file](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/apple-developer-merchantid-domain-association.zip.md). + + 2. Host the file on your server. + - Upload the file to this exact path on your website: + ``` + /.well-known/apple-developer-merchantid-domain-association + ``` + - For example, if your domain is `https://www.yourstorename.com`, the file must be accessible at: + ``` + https://www.yourstorename.com/.well-known/apple-developer-merchantid-domain-association + ``` + + 3. Ensure correct configuration. When setting up Apple Pay domain verification, follow these requirements: + + File Path and Response + - The verification file must be accessible at the exact path, `/.well-known/apple-developer-merchantid-domain-association`. + - The file must return a direct HTTP 200 status code and not a 301, 302 or any 3xx redirects. + - Apple does not support HTTP URL redirects for the domain association file. + + Server Configuration + - The file must be served via HTTPS 1.1 protocol. + - The file must have Content-Type: text/plain in the header. + - The file must be externally accessible (not behind authentication). + - The file must not be password protected. + - The file must not be behind a proxy or redirect. + + Network Access + - Ensure the file is not behind a firewall or access restrictions. + - If using a firewall, configure it to allow Apple's [IP addresses](https://developer.apple.com/documentation/applepayontheweb/setting-up-your-server). + + 4. + Dashboard Configuration and Verification + - Log in to the Dashboard and navigate to **Account & Settings** → **International payments** (under Payment methods). Click [**Apple Pay**](https://dashboard.razorpay.com/app/payment-methods/apple-pay). + ![Click Apple Pay on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/click-apple-pay.jpg.md) + +> **WARN** +> +> +> **Important** +> +> This will only be visible if the business has International payments activated. If you do not have international payments active, you will not see Apple Pay. +> + + - You will see a list of domains associated with your business account: + - **Verified domains**: Ready for Apple Pay. + - **Unverified domains**: Require file hosting and verification. + - Click **Verify domains** for any unverified domains. + - Domain status will change to "Verified" once file hosting is correctly configured. + + to enable Apple Pay. + + + + +### Step 2: Accept Terms and Conditions + + If you have uploaded the file or have not requested to opt out of Apple Pay, we will assume you are okay with [Apple's guidelines](https://developer.apple.com/apple-pay/acceptable-use-guidelines-for-websites/). + + + +### Step 3: Configuration (Automatic) + + Once domain verification is complete and terms are accepted: + - Apple Pay will automatically appear on your checkout when accessed by eligible customers. + - No code changes are required for Standard Checkout integration. + - The payment button displays dynamically based on device compatibility. + + +## Payment Flow For Customers + +Given below is the payment flow for Apple Pay at Razorpay Checkout: + +1. The customer selects **Apple Pay** at checkout. + ![Apply Pay on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/apple-pay.jpg.md) +2. Apple Pay displays their default card, billing address and the payment amount. +3. They authenticate using Face ID, Touch ID or double-click the side button following the on-screen prompt **Double Click to Pay**. + ![Double click to Pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/apple-pay-double-click-pay.jpg.md) +4. Upon successful authentication, the payment processes instantly and the customer is returned to your website or app with a confirmation. + +## Frequently Asked Questions + + +### 1. Why is Apple Pay button not appearing on my checkout page? + + If the Apple Pay button is not appearing, check for these common issues: + - Verify that your domain verification file is correctly hosted and accessible. + - Ensure your website is using HTTPS with proper TLS configuration. + - Confirm that international payments feature is enabled. + - Check if the customer's device supports Apple Pay. + + + +### 2. Why is my Apple Pay domain verification failing? + + Domain verification failures typically occur due to the following reasons: + - The verification file must return an HTTP 200 status code (not 301 or 302 redirects). + - The file path must be exactly `/.well-known/apple-developer-merchantid-domain-association`. + - The file must be accessible via HTTPS (not HTTP). + - The file content must exactly match what Razorpay provided, with no modifications or extra characters. + + + +### 3. Do I need to make any code changes to support Apple Pay on Standard Checkout? + + No code changes are required for Standard Checkout integration. Once domain verification is complete and Apple Pay is enabled on your account, it will automatically appear as a payment option for eligible customers. + + + +### 4. What is the additional cost for accepting Apple Pay? + + There are no additional charges for Apple Pay transactions. Standard Razorpay payment processing rates apply, same as regular card transactions. + + + +### 5. Can customers save their Apple Pay details for future purchases? + + Apple Pay uses device-specific tokens that are automatically available for repeat purchases. Customers do not need to manually save payment details as their Apple Wallet handles this seamlessly. + + + +### 6. How do I identify an Apple Pay transaction in my system? + + Apple Pay transactions can be identified by checking the payment `notes` field in the API response or webhook payload: + + ```json + "notes": { + "provider": "apple_pay" + } + ``` + + This `provider` field will always contain `apple_pay` for Apple Pay transactions, making it easy to distinguish them from regular card payments. + + + +### 7. What is the difference between Apple Pay and card payment webhooks? + + There are structural differences between Apple Pay and standard card payment webhook events: + + Apple Pay Payment: + + ```json + "notes": { + "provider": "apple_pay" + } + ``` + + Card Payment: + + ```json + "notes": [], + "token_id": "token_RIa2YPNM92wfzv" + ``` + Key differences: + - Apple Pay includes `provider: "apple_pay"` in the `notes` field. + - Card payments may include a `token_id` for saved cards. + + + +### 8. I am not able to verify my URL via the self-serve dashboard. What should I do? + + Check if the file is hosted correctly at your domain by visiting: + `https://www.yourstorename.com/.well-known/apple-developer-merchantid-domain-association`. + + Follow the [Apple Pay documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/apple-pay.md) and ensure the file is publicly accessible. + + + +### 9. How do I check if Apple Pay is active on my checkout? + + On Mobile: + - Open Safari in incognito mode on an iPhone with Apple Pay configured. + - Visit your checkout page. + - Apple Pay should appear at the top of payment options and under the cards menu. + + On Desktop: + - Use Safari on macOS with Apple Pay configured. + - Ensure you are signed into your Apple account. + - Apple Pay will be visible if you have cards linked to your Apple account. + + + +### 10. Will Apple Pay work in test mode? + + No, Apple Pay does not work in test mode. + + + +### 11. I cannot see Apple Pay on desktop. What should I do? + + Apple Pay will be visible on desktop under the following conditions: + + macOS Requirements: + - Customer must have Apple Pay cards linked to their Apple account. + - User must be signed into their Apple account on their macOS device. + + Alternative scenarios: + - If the transaction is initiated in a non-INR currency. + + + +### Related Information + +- [Apple Pay S2S Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/apple-pay/s2s-integration.md) +- [Apple Pay Custom Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/apple-pay/custom-integration.md) diff --git a/llm-content/payments/payment-methods/apple-pay/checkout-blocks.md b/llm-content/payments/payment-methods/apple-pay/checkout-blocks.md new file mode 100644 index 00000000..6bffbd0e --- /dev/null +++ b/llm-content/payments/payment-methods/apple-pay/checkout-blocks.md @@ -0,0 +1,445 @@ +--- +title: Checkout Blocks Integration +description: Enable express Checkout with digital Wallets like Apple Pay and Google Pay on your website using Razorpay Checkout Blocks SDK. +--- + +# Checkout Blocks Integration + +Razorpay Checkout Blocks is a client-side JavaScript SDK that enables businesses to offer express checkout experiences with digital wallets such as Apple Pay, Google Pay and more, directly on their own checkout page. The SDK abstracts the complexities of integrating individual wallet providers, allowing you to go live with single-click payments. Know more about [Razorpay Payments](https://razorpay.com/docs/payments). + +Instead of redirecting customers to a Razorpay-hosted page, the SDK renders natively on your site, providing a seamless, single-click payment experience with no extra page loads or redirects. + + +### Advantages + + - Offer single-click express checkout with digital wallet. No redirects, no extra page loads. + - Support multiple wallet (Apple Pay, Google Pay and more) through a single, unified SDK. + + + +### How It Works + + The Checkout Blocks SDK manages the full payment lifecycle for each supported wallet. At a high level: + + 1. Your Checkout page loads the Checkout Blocks SDK script. + 2. The SDK dynamically loads only the wallet adapters you need (for example, Apple Pay, Google Pay). + 3. You check wallet eligibility on the customer's device using `isSupported()`. + 4. If eligible, render the payment button and call `initiatePayment()` on user click. + 5. The SDK handles merchant validation, payment authorisation, DCC (if applicable) and completion. + 6. Your page receives payment events (`onPaymentComplete`, `onError`) via callbacks. + + No redirect to `api.razorpay.com` is required, the entire flow happens on your domain. + ![Express checkout flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/checkout-blocks-apple-pay-flow.jpg.md) + + +## Prerequisites + +Before you begin the integration, ensure you have: + +- **Active Razorpay Account**: A Razorpay account with payments enabled. +- **Order Creation via Backend**: Your server must be able to create orders using the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md) and pass the `order_id` to the frontend. +- **HTTPS Protocol**: Your website must be served over HTTPS for security compliance. Digital wallet require a secure context. + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay manages all Apple Pay certificates and business verification on your behalf. You only need to host the domain association file. +> + +## Integration Steps + +Follow the steps given below to integrate Checkout Blocks and accept express checkout payments on your website. + +**1.1** [Load the Checkout Blocks SDK](#11-load-the-checkout-blocks-sdk) + +**1.2** [Create an Order](#12-create-an-order) + +**1.3** [Initialise SDK and Check Wallet Eligibility](#13-initialise-sdk-and-check-wallet-eligibility) + +**1.4** [Handle Payment Events](#14-handle-payment-events) + +**1.5** [Verify Payment Signature](#15-verify-payment-signature) + +**1.6** [Integrate Payments Rainy Day Kit](#16-integrate-payments-rainy-day-kit) + +**1.7** [Verify Payment Status](#17-verify-payment-status) + +### 1.1 Load the Checkout Blocks SDK + +Add the Checkout Blocks SDK script to the `` section of your Checkout page. The SDK exposes a global `RazorpayCheckoutBlocks` object that you use to interact with wallet. + + +### Script Setup + + Add the following to your HTML ``: + +```html: HTML + --> + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> Adding `preconnect` and `dns-prefetch` hints can reduce script load time by up to 75%. We strongly recommend including these in your `` tag. +> + +The SDK core is under 10 KB (gzipped). Wallet-specific adapters are loaded dynamically only when needed: + + - Core SDK — `https://checkout.razorpay.com/checkout-blocks/checkout-blocks.js` + - Apple Pay Adapter — `https://checkout.razorpay.com/checkout-blocks/rzp-apple-pay.js` + - Google Pay Adapter — `https://checkout.razorpay.com/checkout-blocks/rzp-google-pay.js` + + +### 1.2 Create an Order + +Before initiating a payment, create an order on your backend using the [Razorpay Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). Pass the resulting `order_id` to your frontend to initialise the SDK. + +The SDK flow requires your site to call `Create Order (amount, currency)` on the Razorpay backend and receive an `order_id` in response. Use this `order_id` when initialising the SDK in [step 1.3](#13-initialise-sdk-and-check-wallet-eligibility). + +Refer to the [Orders API documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md) for detailed request and response parameters. + +### 1.3 Initialise SDK and Check Wallet Eligibility + +Once the SDK is loaded and you have an `order_id`, you can initialise Checkout Blocks and check whether the customer's device supports a given wallet. + + +### Integration Option 1: Razorpay-Managed Web Component + + Use this approach if you want Razorpay to handle button rendering and payment initiation automatically. Simply place the `` web component on your page. + +```js: JavaScript +// 1. Add checkout-blocks.js script tag in head + +// 2. Render the web component exposed by razorpay + +; + +// 3. Listen for events +document + .getElementById('apple-pay') + .addEventListener('complete-payment', () => {}); + +document.getElementById('apple-pay').attachListeners({ + onCompletePayment: () => {}, + onError: () => {}, +}); +``` + +The web component automatically checks device eligibility and renders the appropriate payment button. If the wallet is not supported on the customer's device, nothing is rendered. + + + +### Integration Option 2: Business-Controlled + + Use this approach if you want full control over button rendering and payment initiation. You use the SDK's JavaScript API to check eligibility and trigger payments programmatically. + +```js: JavaScript +// 1. Add checkout-blocks.js script tag in head + +const rce = window.RazorpayCheckoutBlocks; // Exposed by the script +rce.load(rce.APPLE_PAY, rce.GOOGLE_PAY); // Business chooses the wallet to accept payments from + +// 2. Check if wallet is supported and initiatePayment using razorpay +if (await rce.isSupported(rce.APPLE_PAY)) { + + Apple Pay + +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> `initiatePayment()` can only be called once per transaction. Calling it again will not start a new payment unless the current transaction has ended (completed, failed or cancelled). +> + + + +### 1.4 Handle Payment Events + +Subscribe to payment lifecycle events to track the payment status and update your UI accordingly. + + +### Available Events + + + Event | Description + --- + `onPaymentComplete` | Fired when payment is complete. Resolves to either success or failure. + --- + `onPaymentCancel` | Fired when payment is cancelled by the user. + --- + `onError` | Indicates any error that happens within the payment cycle. Could be vendor-specific or Razorpay-specific. + + + + +### Success Callback + + If the payment is successful, the `onPaymentComplete` event contains the following fields: + + - `razorpay_payment_id` + - `razorpay_order_id` + - `razorpay_signature` + + Send these values to your server for [signature verification](#15-verify-payment-signature). + + + +### Error Callback + + If the payment fails, the `onError` event contains details about the failure. Common error codes: + + + Error Code | Description | Retryable + --- + `BAD_REQUEST_ERROR` | Invalid request parameters or payment failure. | No + --- + `GATEWAY_ERROR` | Payment gateway error during processing. | Yes + --- + `SERVER_ERROR` | Internal server error. | Yes + --- + `INVALID_MERCHANT_ERROR` | Invalid merchant configuration. | No + --- + `PAYMENT_ALREADY_PROCESSED` | Payment already authorised/captured. | No + --- + `INSUFFICIENT_FUNDS` | Card has insufficient balance. | No + --- + `CARD_DECLINED` | Card declined by issuer. | No + --- + `AUTHENTICATION_FAILED` | 3DS authentication failed. | No + + + On retryable errors, the SDK automatically re-renders the payment buttons so the customer can attempt payment again. + + +### 1.5 Verify Payment Signature + +Signature verification is a mandatory step to ensure that the payment callback is authentic and sent by Razorpay. The `razorpay_signature` contained in the success callback can be regenerated by your system and verified as follows. + +Create a string to be hashed using the `razorpay_payment_id` contained in the callback and the `order_id` generated in step 1.2, separated by a `|`. Hash this string using SHA256 and your API Secret. + +``` +generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + +if (generated_signature == razorpay_signature) { + payment is successful +} +``` + +#### Generate Signature on your Server + + +### Sample code + +```java: Java +/** +* This class defines common routines for generating +* authentication signatures for Razorpay Webhook requests. +*/ +public class Signature +{ + private static final String HMAC_SHA256_ALGORITHM = "HmacSHA256"; + /** + * Computes RFC 2104-compliant HMAC signature. + * * @param data + * The data to be signed. + * @param key + * The signing key. + * @return + * The Base64-encoded RFC 2104-compliant HMAC signature. + * @throws + * java.security.SignatureException when signature generation fails + */ + public static String calculateRFC2104HMAC(String data, String secret) + throws java.security.SignatureException + { + String result; + try { + + // get an hmac_sha256 key from the raw secret bytes + SecretKeySpec signingKey = new SecretKeySpec(secret.getBytes(), HMAC_SHA256_ALGORITHM); + + // get an hmac_sha256 Mac instance and initialize with the signing key + Mac mac = Mac.getInstance(HMAC_SHA256_ALGORITHM); + mac.init(signingKey); + + // compute the hmac on input data bytes + byte[] rawHmac = mac.doFinal(data.getBytes()); + + // base64-encode the hmac + result = DatatypeConverter.printHexBinary(rawHmac).toLowerCase(); + + } catch (Exception e) { + throw new SignatureException("Failed to generate HMAC : " + e.getMessage()); + } + return result; + } +} + +```php: PHP +use Razorpay\Api\Api; +$api = new Api($key_id, $key_secret); +$attributes = array('razorpay_signature' => '23233', 'razorpay_payment_id' => '332' , 'razorpay_order_id' => '12122'); +$order = $api->utility->verifyPaymentSignature($attributes) + +```ruby: Ruby +require 'razorpay' +Razorpay.setup('key_id', 'key_secret') +payment_response = { + 'razorpay_order_id': '12122', + 'razorpay_payment_id': '332', + 'razorpay_signature': '23233' +} + +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET + Dictionary attributes = new Dictionary(); + + attributes.Add("razorpay_payment_id", paymentId); + attributes.Add("razorpay_order_id", Request.Form["razorpay_order_id"]); + attributes.Add("razorpay_signature", Request.Form["razorpay_signature"]); + + Utils.verifyPaymentSignature(attributes); +```nodejs: Node.js +var { validatePaymentVerification } = require('./dist/utils/razorpay-utils'); + +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); +```Go: Go +import ( + "crypto/hmac" + "crypto/sha256" + "crypto/subtle" + "encoding/hex" + "fmt" +) + +func main() { + signature := "477d1cdb3f8122a7b0963704b9bcbf294f65a03841a5f1d7a4f3ed8cd1810f9b" + secret := "qp3zKxwLZxbMORJgEVWi3Gou" + data := "order_J2AeF1ZpvfqRGH|pay_J2AfAxNHgqqBiI" + //fmt.Printf("Secret: %s Data: %s\n", secret, data) + + // Create a new HMAC by defining the hash type and the key (as byte array) + h := hmac.New(sha256.New, []byte(secret)) + + // Write Data to it + _, err := h.Write([]byte(data)) + + if err != nil { + panic(err) + } + + // Get result and encode as hexadecimal string + sha := hex.EncodeToString(h.Sum(nil)) + + fmt.Printf("Result: %s\n", sha) + + if subtle.ConstantTimeCompare([]byte(sha), []byte(signature)) == 1 { + fmt.Println("Works") + } +} +``` + + +### 1.6 Integrate Payments Rainy Day Kit + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + +### 1.7 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Apple Pay - Domain Verification + +To accept Apple Pay payments, your domain must be verified with Apple via Razorpay. Follow the steps below: + + +### Steps to Verify Your Domain + + 1. Log in to your [Razorpay Dashboard](https://dashboard.razorpay.com). + 2. Navigate to the Apple Pay settings section and download the domain association file provided by Razorpay. + 3. Host the file on your server at the following path: + `https://yourdomain.com/.well-known/apple-developer-merchantid-domain-association` + 4. Ensure the file is publicly accessible over HTTPS. + 5. Razorpay will use its own Apple Merchant ID. Your domain is whitelisted automatically once onboarding is complete. + +> **WARN** +> +> +> **Watch Out!** +> +> The domain association file must be served with `Content-Type: application/octet-stream` or `text/plain`. Ensure your server does not block or redirect requests to the `.well-known` directory. +> + + + +## Frequently Asked Questions + + +### 1. Can I integrate multiple wallet using a single SDK? + + Yes. Checkout Blocks is designed to support multiple digital wallet through a single integration. You load the SDK once and specify which wallet to enable. Each wallet adapter is loaded dynamically, keeping the core bundle lightweight. + + + +### 2. What happens if the customer's device does not support the wallet? + + The `isSupported()` method returns `false` for unsupported wallet. In the Web Component approach, the element simply does not render. You should always check eligibility before displaying a payment button. + + + +### 3. Can the customer retry a failed payment? + + Yes. On payment failure, the customer can attempt payment again without refreshing the page. diff --git a/llm-content/payments/payment-methods/apple-pay/custom-integration.md b/llm-content/payments/payment-methods/apple-pay/custom-integration.md new file mode 100644 index 00000000..9adf6a64 --- /dev/null +++ b/llm-content/payments/payment-methods/apple-pay/custom-integration.md @@ -0,0 +1,1178 @@ +--- +title: Apple Pay - Custom Integration (Beta) +description: Accept Apple Pay payments from international customers with Razorpay Custom Checkout Integration. +--- + +# Apple Pay - Custom Integration (Beta) + +Apple Pay is a secure, contactless payment method that allows customers to pay using their Apple devices with Face ID/Touch ID authentication. Once integrated, Apple Pay provides customers with a seamless and high-trust checkout experience. Know more about [Apple Pay](https://www.apple.com/apple-pay/). + +Apple Pay integration works seamlessly with your existing international card payment flow, add our Apple Pay button to your Razorpay Custom Checkout and include one additional parameter in your payment request. + + +### Advantages + + - Accept payments in over 120 currencies from international customers. + - Reduce checkout time by up to 75% with one-touch payments. + - Leverage biometric authentication (Face ID/Touch ID) for enhanced security. + - Go live quickly with minimal code changes to your existing S2S integration. + - No need to handle Apple certificates or domain verification - Razorpay manages it all. + + +## Prerequisites + +Before you begin the integration, ensure you have: + +- [**Existing Razorpay Custom Checkout Integration**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md): Active Custom Checkout integration with Razorpay. +- **International Payments Enabled**: Must be activated on your Razorpay account. +- **HTTPS Protocol**: Your website must be served over HTTPS for security compliance. +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + +## Integration Steps + +Follow the steps given below to integrate Custom Checkout in your site: + +## 1.1 Create an Order in Server + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The order_id received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + + +### API Sample Code + +The following is a sample API request and response for creating an order: + + /orders + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/orders + -U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -H 'content-type:application/json' + -d '{ + "amount": 10000, + "currency": "", + "receipt": "receipt#1111", + "partial_payment": false, + "customer_details": { + "name": "", + "contact": "", + "email": "", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "shipping_details": { + "method": "sameday", + "gift_wrap": false + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "e_commerce", + "sku": "1gr367", + "name": "TEST", + "description": "TEST", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "e_commerce": { + "other_product_codes": { + "upc": "12r34", + "ean": "123r4", + "unspsc": "123s4" + } + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value1", + "key2": "value2" + } + }' + + ```json: Response + { + "amount": 10000, + "amount_due": 10000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1737699908, + "currency": "", + "entity": "order", + "id": "order_PnBGZvFBDU81VZ", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "receipt": "receipt#11111", + "status": "created" + } + ``` + + + + + + + + +### Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KWD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _optional_ + : `json object` Details about the customer/user. + + `name` _optional_ + : `string` The customer’s name. For example, `Gaurav Kumar`. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `9876543210`. + + `email` _optional_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the merchant platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the merchant platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, 1234567890. + + `shipping_address` _optional_ + : `json object` This will have details about the order's shipping address. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `Bengaluru`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `billing_address` _optional_ + : `json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `Bengaluru`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `shipping_details` _optional_ + : `json object` This will have the order's shipping details. + + `method` _optional_ + : `enum` Shipping method for the product. Possible values: + - `lowcost`: Lowest-cost service. + - `sameday`: Courier or same-day service. + - `oneday`: Next-day or overnight service. + - `twoday`: Two-day service. + - `threeday`: Three-day service. + - `pickup`: Store pick-up. + - `other`: Other shipping method. + - `none`: No shipping method because the product is a service or subscription. + + `gift_wrap` _optional_ + : `boolean` Indicates whether the customer requested gift wrapping for this purchase. This field can contain one of the following values: + - `true`: The customer requested gift wrapping. + - `false`: The customer did not request gift wrapping. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `sku` _optional_ + : `string ` The unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business runs a discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `e_commerce` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `other_product_codes` _optional_ + : `object` Array to collect different codes that can identify the item type. Possible values: + + `upc` + : `string` Universal Product Code (UPC; redundantly: UPC code) is a barcode symbology used worldwide to track trade items in stores. UPC consists of 12 numeric digits that are uniquely assigned to each trade item + + `ean` + : `string` European Article Numbers (EAN) is a type of barcode that encodes an article number. Contains 8 (EAN-8) or 13 (EAN-13) numerical digits. + + `unspsc` + : `string` The United Nations Standard Products and Services Code (UNSPSC) is a taxonomy of products and services used in eCommerce. It is a four-level hierarchy coded as an eight-digit number, with an optional fifth level adding two more digits. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `json object` Details of the campaign. *Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, `PQR12453`. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Example values: `google`, `newsletter`. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: `cpc`, `banner`, etc. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +## 1.2 Fetch Payment Methods + +When creating a custom checkout form, display only the activated methods to the customer. Use the below methods to fetch all payments methods available to you: + +```js: Request +var razorpay = new Razorpay({ + key: '', + // logo, displayed in the popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}); +razorpay.once('ready', function(response) { + console.log(response.methods); +}) +```js: Response +{ + "methods": { + "entity": "methods", + "card": true, + "debit_card": true, + "credit_card": true, + "prepaid_card": true, + "card_networks": { + "AMEX": 0, + "DICL": 1, + "MC": 1, + "MAES": 1, + "VISA": 1, + "JCB": 1, + "RUPAY": 1, + "BAJAJ": 0 + }, + "amex": false, + "netbanking": { + ... + ... + "HDFC": "HDFC Bank", + "ICIC": "ICICI Bank" + ... + ... + }, + "wallet": { + "payzapp": true + }, + "emi": true, + "upi": true, + "cardless_emi": [], + "paylater": [], + "emi_subvention": "customer", + "emi_options": { + ... + ... + "ICIC": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 150000 + }, + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 150000 + } + ...// rest of the emi plans + ], + "HDFC": [ + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 300000 + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 300000 + } + ... + ...// rest of the emi plans + ] + } + } +} +``` + +Know more about [the various payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) offered by Razorpay. + +## 1.3 Invoke Checkout and Pass Order Id and Other Options to it + +### 1.3.1 Include JavaScript code in your Webpage + +Include the following script, preferably in the `` section of your page: + +```html: Index HTML + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Include the script from `https://checkout.razorpay.com/v1/razorpay.js` instead of serving a copy from your server. This allows the library's new updates and bug fixes to fit your application automatically. +> - We always maintain backward compatibility with our code. +> + +### 1.3.2 Add Apple Pay Button to Your Checkout + +Add the Apple Pay button to your checkout page to provide customers with the payment option. + + +### Button Design Guidelines + + +> **WARN** +> +> +> **Watch Out!** +> +> Use only Razorpay-provided Apple Pay button designs for both web and SDK implementations. +> + + - Follow official [Apple Pay guidelines](https://developer.apple.com/apple-pay/marketing/) for button usage and placement. + - Use Apple Pay button designs provided by Razorpay (see design below). + ![Apple Pay Button design](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/apple-pay-button.jpg.md) + - Maintain consistent sizing with other payment options. + - Position prominently in your payment methods section. + + + +### When to Display the Button + + + + 1. Integrate [Apple Pay JS API](https://developer.apple.com/documentation/applepayontheweb/apple-pay-js-api). + 2. Perform [Apple Pay capabilities](https://developer.apple.com/documentation/applepayontheweb/applepaysession/applepaycapabilities) check. + 3. Follow the display conditions below: + - If it returns `paymentCredentialsAvailable`, show button. + - If it returns `paymentCredentialStatusUnknown`, optionally show button (use this option only if you want customers to go through adding a new card journey, not recommended in the initial 2 months due to increased friction). + + + 1. Integrate [PassKit SDK](https://developer.apple.com/documentation/passkit/apple-pay) (internal SDK to iOS above iOS 6, has no size impact). + 2. Perform `canMakePayments(usingNetworks: [Visa, Mastercard])` check. + 3. Follow the display conditions below. + + Device Capability Check | Action | Reasoning + --- + `PKPaymentAuthorizationController.canMakePayments() = true` | Show | Device supports Apple Pay with specified networks. + --- + `PKPaymentAuthorizationController.canMakePayments() = false` | Hide | Device does not support Apple Pay. + + + +> **WARN** +> +> +> **Watch Out!** +> +> PassKit SDK is an internal SDK to iOS (available on iOS 6 and above) and has no size impact on your application. +> + + + + + +### 1.3.3 Instantiate Custom Checkout + + + ```js: Invoke a Single Instance + var razorpay = new Razorpay({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', + }); + ``` + + + If you need multiple Razorpay instances on the same page, you can globally set some of the options: + + ```js: Invoke Multiple Instances + Razorpay.configure({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', + }) + new Razorpay({}); // will inherit key and image from above. + ``` + + +#### Checkout Options + +While building a custom UI for accepting payments from your customers, you should be familiar with the fields supported in the `razorpay.js` script. + + +### Checkout Parameters + + + + + + + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.999, pass the value as `295999`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per VISA Guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + + + + + + + `currency` _mandatory_ + : `string` The currency in which the payment should be made by the customer. For example, `INR`. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (April 2023). +> + + + + + + + + + + + + `description` _optional_ + : `string` Description of the product shown in the Checkout form. It must start with an alphanumeric character. + + `image` _optional_ + : `string` Link to an image (usually your business logo) shown in the Checkout form. Can also be a **base64** string, if loading the image from a network is not desirable. + + `order_id` _mandatory_ + : `string` Order ID generated via the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + `notes` _optional_ + : `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + + + + `method` _mandatory_ + : `string` The payment method used by the customer on Checkout. +Possible values: + - `card` (default) + - `upi` (default) + - `netbanking` (default) + - `wallet` (default) + - `emi` (default) + - `cardless_emi` (requires [approval](https://razorpay.com/support/#request)) + - `paylater` (requires [approval](https://razorpay.com/support/#request)) + - `emandate` (requires [approval](https://razorpay.com/support/#request)) + + + + + + + + + + + + `card` _mandatory if method=card/emi_ + : `object` The details of the card that should be entered while making the payment. + + `number` + : `integer` Unformatted card number. + + `name` + : `string` The name of the cardholder. + + `expiry_month` + : `integer` Expiry month for card in MM format. + + `expiry_year` + : `integer` Expiry year for card in YY format. + + `cvv` + : `integer` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `emi_duration` + : `integer` Defines the number of months in the EMI plan. + + + + + + + + `method` _mandatory_ + : `string` Name of the payment method. Possible value is `card`. + + `app` _mandatory_ + : `object` Container object for payment app configuration. + + `name` _mandatory_ + : `string` Name of the app. Here it is `apple_pay`. + + + + `bank_account` _mandatory if method=emandate_ + : The details of the bank account that should be passed in the request. These details include bank account number, IFSC code and the name of the customer associated with the bank account. + + `account_number` + : `string` Bank account number used to initiate the payment. + + `ifsc` + : `string` IFSC of the bank used to initiate the payment. + + `name` + : `string` Name associated with the bank account used to initiate the payment. + + `bank` _mandatory if method=netbanking_ + : `string` Bank code. List of available banks enabled for your account can be fetched via [**methods**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#fetch-supported-methods). + + + + + + + + `wallet` _mandatory if method=wallet_ + : `string` Wallet code for the wallet used for the payment. Possible values: + - `payzapp` (default) + - `olamoney` (requires [approval](https://razorpay.com/support/#request)) + - `phonepe` (requires [approval](https://razorpay.com/support/#request)) + - `airtelmoney` (requires [approval](https://razorpay.com/support/#request)) + - `mobikwik` (requires [approval](https://razorpay.com/support/#request)) + - `jiomoney` (requires [approval](https://razorpay.com/support/#request)) + - `amazonpay` (requires [approval](https://razorpay.com/support/#request)) + - `paypal` (requires [approval](https://razorpay.com/support/#request)) + - `phonepeswitch` (requires [approval](https://razorpay.com/support/#request)) + + `provider` _mandatory if method=cardless_emi/paylater_ + : `string` Name of the cardless EMI provider partnered with Razorpay. + + Available options for Cardless EMI (requires [approval](https://razorpay.com/support/#request)): + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `zestmoney` + - `earlysalary` + - `walnut369` + + Available options for Pay Later: + - `lazypay` + - `paypal` + + `vpa` _mandatory if method=upi_ + : `string` UPI ID used for making the payment on the UPI app. + + +> **WARN** +> +> +> **Deprecation Notice** +> +> UPI Collect is deprecated effective 28 February 2026. This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [ migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md) to switch to UPI Intent. +> + + + + + + + + `callback_url` _optional_ + : `string` The URL to which the customer must be redirected upon completion of payment. The URL must accept incoming `POST` requests. The callback URL will have `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` as the request parameters for a successful payment. + + `redirect` _conditionally mandatory_ + : `boolean` Determines whether customer should be redirected to the URL mentioned in the + `callback_url` parameter. This is mandatory if `callback_url` parameter is used. Possible values: + - `true`: Customer will be redirected to the `callback_url`. + - `false`: Customer will not be redirected to the `callback_url` + + + + + + +### 1.3.4 Submit Payment Details + +After creating an order and obtaining the customer's payment details, send the information to Razorpay to complete the payment. The data that needs to be submitted depends on the customer's payment method. You can do this by invoking `createPayment` method. + +```js: createPayment with handler function +var data = { + amount: 1000, + currency: "", + email: '', + contact: '', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_CuEzONfnOI86Ab',// Replace with Order ID generated in Step 4 + method: 'card', + // method specific fields + app: { + name: "apple_pay" + } +}; +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + razorpay.on('payment.success', function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + razorpay.on('payment.error', function(resp){alert(resp.error.description)}); // will pass error object to error handler +}) + +```js: createPayment with callback URL +var data = { + callback_url: 'https://www.examplecallbackurl.com/', + amount: 1000, + currency: "", + email: '', + contact: '', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_CuEzONfnOI86Ab',// Replace with Order ID generated in Step 4 + method: 'card', + // method specific fields + app: { + name: "apple_pay" + } +}; +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); +}) +``` + +> **WARN** +> +> +> +> **Watch Out!** +> +> The `createPayment` method should be called within an event listener triggered by user action to prevent the popup from being blocked. For example: +> + +> ```js +> $('button').click( function (){ razorpay.createPayment(...) }) +> ``` +> + +> **INFO** +> +> +> +> **Handy Tips** +> +> - **Handler Function** +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL** +> +When you use a callback URL, Razorpay makes a post call to the callback URL, with the `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` in the response object of the successful payment (`razorpay_payment_id` and `razorpay_order_id`). +> + +## 1.4 Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + +### Failure Response + +A failed payment returns an error response. + +```json: Sample Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect otp", + "field": null, + "source": "customer", + "step": "payment_authentication", + "reason": "invalid_otp", + "metadata": { + "payment_id": "pay_EDNBKIP31Y4jl8", + "order_id": "order_DBJKIP31Y4jl8" + } + } +} +``` + +Know more about [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md). + + +## 1.5 Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +## 1.6 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/test-integration.md) diff --git a/llm-content/payments/payment-methods/apple-pay/s2s-integration.md b/llm-content/payments/payment-methods/apple-pay/s2s-integration.md new file mode 100644 index 00000000..94ce7025 --- /dev/null +++ b/llm-content/payments/payment-methods/apple-pay/s2s-integration.md @@ -0,0 +1,1567 @@ +--- +title: Apple Pay - S2S Integration +description: Accept Apple Pay payments from international customers with Razorpay S2S Integration. +--- + +# Apple Pay - S2S Integration + +Apple Pay is a secure, contactless payment method that allows customers to pay using their Apple devices with Face ID/Touch ID authentication. Once integrated, Apple Pay provides customers with a seamless and high-trust checkout experience. Know more about [Apple Pay](https://www.apple.com/apple-pay/). + +Apple Pay integration works seamlessly with your existing international card payment flow, add our Apple Pay button to your checkout and include one additional parameter in your payment request. + + +### Advantages + + - Accept payments in over 120 currencies from international customers. + - Reduce checkout time by up to 75% with one-touch payments. + - Leverage biometric authentication (Face ID/Touch ID) for enhanced security. + - Go live quickly with minimal code changes to your existing S2S integration. + - No need to handle Apple certificates or domain verification - Razorpay manages it all. + + +## Prerequisites + +Before you begin the integration, ensure you have: + +- [**Existing S2S Integration**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2/build-integration/international-cards/e-commerce.md): Active Server-to-Server integration with Razorpay. + +- **International Payments Enabled**: Must be activated on your Razorpay account. + +- **HTTPS Protocol**: Your website must be served over HTTPS for security compliance. + +## Integration Steps + +Follow the steps given below to integrate S2S JSON API with browser flow and accept payments using cards. + +**1.1** [Add Apple Pay Button to Your Checkout](#11-add-apple-pay-button-to-your-checkout) + +**1.2** [Integrate Razorpay Shield JS](#12-integrate-razorpay-shield-js) + +**1.3** [Create Order and Payment](#13-create-order-and-payment) + +**1.4** [Handle Payment Success and Error Events](#14-handle-payment-success-and-error-events) + +**1.5** [Verify Payment Signature](#15-verify-payment-signature) + +**1.6** [Integrate Payments Rainy Day Kit](#16-integrate-payments-rainy-day-kit) + +**1.7** [Verify Payment Status](#17-verify-payment-status) + +### 1.1 Add Apple Pay Button to Your Checkout + +Add the Apple Pay button to your checkout page to provide customers with the payment option. + + +### Button Design Guidelines + + +> **WARN** +> +> +> **Watch Out!** +> +> Use only Razorpay-provided Apple Pay button designs for both web and SDK implementations. +> + + - Follow official [Apple Pay guidelines](https://developer.apple.com/apple-pay/marketing/) for button usage and placement. + - Use Apple Pay button designs provided by Razorpay (see design below). + ![Apple Pay Button design](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/apple-pay-button.jpg.md) + - Maintain consistent sizing with other payment options. + - Position prominently in your payment methods section. + + + +### When to Display the Button + + + + 1. Integrate [Apple Pay JS API](https://developer.apple.com/documentation/applepayontheweb/apple-pay-js-api). + 2. Perform [Apple Pay capabilities](https://developer.apple.com/documentation/applepayontheweb/applepaysession/applepaycapabilities) check. + 3. Follow the display conditions below: + - If it returns `paymentCredentialsAvailable`, show button. + - If it returns `paymentCredentialStatusUnknown`, optionally show button (use this option only if you want customers to go through adding a new card journey, not recommended in the initial 2 months due to increased friction). + - For the value of `merchantIdentifier` to pass in this request, please contact our [Support team](https://razorpay.com/support/). + + + 1. Integrate [PassKit SDK](https://developer.apple.com/documentation/passkit/apple-pay) (internal SDK to iOS above iOS 6, has no size impact). + 2. Perform `canMakePayments(usingNetworks: [Visa, Mastercard])` check. + 3. Follow the display conditions below. + + Device Capability Check | Action | Reasoning + --- + `PKPaymentAuthorizationController.canMakePayments() = true` | Show | Device supports Apple Pay with specified networks. + --- + `PKPaymentAuthorizationController.canMakePayments() = false` | Hide | Device does not support Apple Pay. + + + +> **WARN** +> +> +> **Watch Out!** +> +> PassKit SDK is an internal SDK to iOS (available on iOS 6 and above) and has no size impact on your application. +> + + + + + +### 1.2 Integrate Razorpay Shield JS + +Integrate Shield JS and pass razorpay_session_id in the [Create Order and Payment](#13-create-order-and-payment) step. + +```Curl: JavaScript + +// later, at the time of payment initialisation: +const checkout_session_id = await RazorpayShield.getCheckoutSessionId() // pass it to your backend + +``` + +### 1.3 Create Order and Payment + +This step demonstrates how to create an Order and process a Payment using Razorpay APIs. Depending on your integration type, you can choose between: + + +### 1. Consolidated Order and Payment API + + Create an order along with payment using the consolidated order and payment API. This single API call combines order and payment creation, resulting in a more efficient and faster transaction process. + + Create an order along with payment by: + + - Making a single API call to Razorpay, combining order and payment creation. + - Authenticating using the provided credentials, ensuring access to the consolidated payment API. + - Manually integrating the API sample codes on your server. + + The following API will create an order along with payment with `card` as the payment method: + + /orders + + + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/orders + -U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -H 'content-type:application/json' + -d '{ + "amount": 50000, + "currency": "", + "receipt": "receipt#1111", + "partial_payment": false, + "customer_details": { + "name": "", + "contact": "", + "email": "", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "shipping_details": { + "method": "sameday", + "gift_wrap": false + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "e_commerce", + "sku": "1gr367", + "name": "TEST", + "description": "TEST", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "e_commerce": { + "other_product_codes": { + "upc": "12r34", + "ean": "123r4", + "unspsc": "123s4" + } + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "payment": { + "contact": "", + "email": "", + "callback_url": "https://merchant_callback_url..", + "method": "card", + "app": { + "name": "apple_pay" + }, + "authentication": { + "authentication_channel": "browser" + }, + "device_fingerprint": { + "checkout_session_id": "qwerty12345", + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100, + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" + }, + "ip": "105.106.107.108" + } + } + }' + + ```json: Response + { + "amount": 50000, + "amount_due": 50000, + "amount_paid": 0, + "attempts": 9, + "created_at": 1706507580, + "currency": "", + "entity": "order", + "id": "order_NUJs9C1Luflzts", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "payment_workflow": { + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/pg_router/v1/payments/pay_S3hhj7q9qpXKJ0/dcc_info" + } + ], + "razorpay_payment_id": "pay_S3hhj7q9qpXKJ0" + }, + "receipt": "receipt#1111", + "status": "attempted" + } + ``` + + + + + + + + + Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KWD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _optional_ + : `json object` Details about the customer/user. + + `name` _optional_ + : `string` The customer’s name. For example, `Gaurav Kumar`. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `9876543210`. + + `email` _optional_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the merchant platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the merchant platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, 1234567890. + + `shipping_address` _optional_ + : `json object` This will have details about the order's shipping address. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `Bengaluru`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `billing_address` _optional_ + : `json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `Bengaluru`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `shipping_details` _optional_ + : `json object` This will have the order's shipping details. + + `method` _optional_ + : `enum` Shipping method for the product. Possible values: + - `lowcost`: Lowest-cost service. + - `sameday`: Courier or same-day service. + - `oneday`: Next-day or overnight service. + - `twoday`: Two-day service. + - `threeday`: Three-day service. + - `pickup`: Store pick-up. + - `other`: Other shipping method. + - `none`: No shipping method because the product is a service or subscription. + + `gift_wrap` _optional_ + : `boolean` Indicates whether the customer requested gift wrapping for this purchase. This field can contain one of the following values: + - `true`: The customer requested gift wrapping. + - `false`: The customer did not request gift wrapping. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `sku` _optional_ + : `string ` The unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business runs a discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `e_commerce` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `other_product_codes` _optional_ + : `object` Array to collect different codes that can identify the item type. Possible values: + + `upc` + : `string` Universal Product Code (UPC; redundantly: UPC code) is a barcode symbology used worldwide to track trade items in stores. UPC consists of 12 numeric digits that are uniquely assigned to each trade item + + `ean` + : `string` European Article Numbers (EAN) is a type of barcode that encodes an article number. Contains 8 (EAN-8) or 13 (EAN-13) numerical digits. + + `unspsc` + : `string` The United Nations Standard Products and Services Code (UNSPSC) is a taxonomy of products and services used in eCommerce. It is a four-level hierarchy coded as an eight-digit number, with an optional fifth level adding two more digits. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `JSON object` Details of the campaign. *Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, `PQR12453`. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Example values: `google`, `newsletter`. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: `cpc`, `banner`, etc. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `payment` _mandatory_ + : `json object` Details about the payment. + + `contact` _mandatory_ + : `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `callback_url` _optional_ + : `string` URL endpoint where Razorpay will submit the final payment status. + + `method` _mandatory_ + : `string` Name of the payment method. Possible value is `card`. + + `app` _mandatory_ + : `object` Container object for payment app configuration. + + `name` _mandatory_ + : `string` Name of the app. Here it is `apple_pay`. + + `authentication` _optional_ + : `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + + `device_fingerprint` _mandatory_ + : `string` Details of the device fingerprint. + + + + `checkout_session_id` _mandatory_ + : `object` id of the checkout entity that is created. + + + + + + `browser` _mandatory_ + : `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `referrer` _optional_ + : `string` Referrer header passed by the client's browser. + + `user-agent` _mandatory_ + : `string` The User-Agent header of the user's browser. The default value will be passed by Razorpay if not provided by you. + + `ip` _mandatory_ + : `string` The customer's IP address. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` Indicates the next step to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the bank page. + + `url` + : `string` URL to be used for the action indicated. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + +### 2. Separate Order and Payment APIs + + If you are using separate APIs to create Order and process Payment, follow the steps given below: + + + + Step 1: Create an Order + + Use the Orders API to create an order before initiating a payment. + + + + /orders + + ```curl: Request + curl -X POST https://api.razorpay.com/v1/orders + -U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -H 'content-type:application/json' + -d '{ + "amount": 10000, + "currency": "", + "receipt": "receipt#1111", + "partial_payment": false, + "customer_details": { + "name": "", + "contact": "", + "email": "", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "shipping_details": { + "method": "sameday", + "gift_wrap": false + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "e_commerce", + "sku": "1gr367", + "name": "TEST", + "description": "TEST", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "e_commerce": { + "other_product_codes": { + "upc": "12r34", + "ean": "123r4", + "unspsc": "123s4" + } + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value1", + "key2": "value2" + } + }' + + ```json: Response + { + "amount": 10000, + "amount_due": 10000, + "amount_paid": 0, + "attempts": 0, + "created_at": 1737699908, + "currency": "", + "entity": "order", + "id": "order_PnBGZvFBDU81VZ", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "receipt": "receipt#11111", + "status": "created" + } + ``` + + + + + + + + + Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KWD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _optional_ + : `json object` Details about the customer/user. + + `name` _optional_ + : `string` The customer’s name. For example, `Gaurav Kumar`. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `9876543210`. + + `email` _optional_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the merchant platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the merchant platform. For example, 4. + + `tier` _optional_ + : `string ` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, 1234567890. + + `shipping_address` _optional_ + : `json object` This will have details about the order's shipping address. + + `line1` _optional_ + : `string` Address Line 1 of the address + + `line2` _optional_ + : `string` Address Line 2 of the address + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `Bengaluru`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `billing_address` _optional_ + : `json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address. + + `line2` _optional_ + : `string` Address Line 2 of the address. + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `Bengaluru`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), for example, 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), for example, -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `shipping_details` _optional_ + : `json object` This will have the order's shipping details. + + `method` _optional_ + : `enum` Shipping method for the product. Possible values: + - `lowcost`: Lowest-cost service. + - `sameday`: Courier or same-day service. + - `oneday`: Next-day or overnight service. + - `twoday`: Two-day service. + - `threeday`: Three-day service. + - `pickup`: Store pick-up. + - `other`: Other shipping method. + - `none`: No shipping method because the product is a service or subscription. + + `gift_wrap` _optional_ + : `boolean` Indicates whether the customer requested gift wrapping for this purchase. This field can contain one of the following values: + - `true`: The customer requested gift wrapping. + - `false`: The customer did not request gift wrapping. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `sku` _optional_ + : `string ` The unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business runs a discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `e_commerce` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `other_product_codes` _optional_ + : `object` Array to collect different codes that can identify the item type. Possible values: + + `upc` + : `string` Universal Product Code (UPC; redundantly: UPC code) is a barcode symbology used worldwide to track trade items in stores. UPC consists of 12 numeric digits that are uniquely assigned to each trade item + + `ean` + : `string` European Article Numbers (EAN) is a type of barcode that encodes an article number. Contains 8 (EAN-8) or 13 (EAN-13) numerical digits. + + `unspsc` + : `string` The United Nations Standard Products and Services Code (UNSPSC) is a taxonomy of products and services used in eCommerce. It is a four-level hierarchy coded as an eight-digit number, with an optional fifth level adding two more digits. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `json object` Details of the campaign. *Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, `PQR12453`. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Example values: `google`, `newsletter`. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: `cpc`, `banner`, etc. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + + +### Step 2: Create a Payment + + Once the order is created, pass the `order_id` from the Orders API response to the Payments API. + +/payments/create/json + +```curl: Request +curl -X POST \ +https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 10000, + "currency": "", + "contact": "", + "email": "", + "order_id": "order_PrcuyJDT7uSwaf", + "callback_url": "https://merchant_callback_url..", + "method": "card", + "app": { + "name": "apple_pay" + }, + "authentication": { + "authentication_channel": "browser" + }, + "browser": { + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +}' + +```json: Response +{ + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/pg_router/v1/payments/pay_Ps0cnb0OrxFcSH/dcc_info" + } + ], + "razorpay_payment_id": "pay_Ps0cnb0OrxFcSH" +} +``` + + + + Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` Currency code for the currency in which you want to accept the payment. For example, "INR". Refer to the list of supported currencies. The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `order_id` _mandatory_ + : `string` Unique identifier of the Order. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `contact` _mandatory_ + : `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `method` _mandatory_ + : `string` Name of the payment method. Possible value is `card`. + + `app` _mandatory_ + : `object` Container object for payment app configuration. + + `name` _mandatory_ + : `string` Name of the app. Here it is `apple_pay`. + + `user-agent` _mandatory_ + : `string` The User-Agent header of the user's browser. The default value will be passed by Razorpay if not provided by you. + + `ip` _mandatory_ + : `string` The customer's IP address. + + `authentication` _optional_ + : `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + + + + `browser` _mandatory_ + : `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `language` + : `string` Obtained from the payer's browser using the `navigator.language` HTML DOM property. Maximum limit of 8 characters. + + `notes` _optional_ + : `object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + + `callback_url` _optional_ + : `string` URL endpoint where Razorpay will submit the final payment status. + + `referrer` _optional_ + : `string` Referrer header passed by the client's browser. + + + +### Response Parameters + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` Indicates the next step to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the bank page. + + `url` + : `string` URL to be used for the action indicated. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + + + + + +### 1.4 Handle Payment Success and Error Events + +Once the payment is completed by the customer, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + + +### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + + + +### Failure Callback + +If the payment has failed, the callback will contain details of the error. Refer to [Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) for details. + + +### 1.5 Verify Payment Signature + +Signature verification is a mandatory step to ensure that the callback is sent by Razorpay. The `razorpay_signature` contained in the callback can be regenerated by your system and verified as follows. + +Create a string to be hashed using the `razorpay_payment_id` contained in the callback and the order id generated in the first step, separated by a `|`. Hash this string using SHA256 and your API Secret. + +``` +generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + +if (generated_signature == razorpay_signature) { + payment is successful +} +``` + +#### Generate Signature on your Server + + +### Sample code + +```java: Java +/** +* This class defines common routines for generating +* authentication signatures for Razorpay Webhook requests. +*/ +public class Signature +{ + private static final String HMAC_SHA256_ALGORITHM = "HmacSHA256"; + /** + * Computes RFC 2104-compliant HMAC signature. + * * @param data + * The data to be signed. + * @param key + * The signing key. + * @return + * The Base64-encoded RFC 2104-compliant HMAC signature. + * @throws + * java.security.SignatureException when signature generation fails + */ + public static String calculateRFC2104HMAC(String data, String secret) + throws java.security.SignatureException + { + String result; + try { + + // get an hmac_sha256 key from the raw secret bytes + SecretKeySpec signingKey = new SecretKeySpec(secret.getBytes(), HMAC_SHA256_ALGORITHM); + + // get an hmac_sha256 Mac instance and initialize with the signing key + Mac mac = Mac.getInstance(HMAC_SHA256_ALGORITHM); + mac.init(signingKey); + + // compute the hmac on input data bytes + byte[] rawHmac = mac.doFinal(data.getBytes()); + + // base64-encode the hmac + result = DatatypeConverter.printHexBinary(rawHmac).toLowerCase(); + + } catch (Exception e) { + throw new SignatureException("Failed to generate HMAC : " + e.getMessage()); + } + return result; + } +} + +```php: PHP +use Razorpay\Api\Api; +$api = new Api($key_id, $key_secret); +$attributes = array('razorpay_signature' => '23233', 'razorpay_payment_id' => '332' , 'razorpay_order_id' => '12122'); +$order = $api->utility->verifyPaymentSignature($attributes) + +```ruby: Ruby +require 'razorpay' +Razorpay.setup('key_id', 'key_secret') +payment_response = { + 'razorpay_order_id': '12122', + 'razorpay_payment_id': '332', + 'razorpay_signature': '23233' +} + +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET + Dictionary attributes = new Dictionary(); + + attributes.Add("razorpay_payment_id", paymentId); + attributes.Add("razorpay_order_id", Request.Form["razorpay_order_id"]); + attributes.Add("razorpay_signature", Request.Form["razorpay_signature"]); + + Utils.verifyPaymentSignature(attributes); +```nodejs: Node.js +var { validatePaymentVerification } = require('./dist/utils/razorpay-utils'); + +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); +```Go: Go +import ( + "crypto/hmac" + "crypto/sha256" + "crypto/subtle" + "encoding/hex" + "fmt" +) + +func main() { + signature := "477d1cdb3f8122a7b0963704b9bcbf294f65a03841a5f1d7a4f3ed8cd1810f9b" + secret := "qp3zKxwLZxbMORJgEVWi3Gou" + data := "order_J2AeF1ZpvfqRGH|pay_J2AfAxNHgqqBiI" + //fmt.Printf("Secret: %s Data: %s\n", secret, data) + + // Create a new HMAC by defining the hash type and the key (as byte array) + h := hmac.New(sha256.New, []byte(secret)) + + // Write Data to it + _, err := h.Write([]byte(data)) + + if err != nil { + panic(err) + } + + // Get result and encode as hexadecimal string + sha := hex.EncodeToString(h.Sum(nil)) + + fmt.Printf("Result: %s\n", sha) + + if subtle.ConstantTimeCompare([]byte(sha), []byte(signature)) == 1 { + fmt.Println("Works") + } +} +``` + + +### 1.6 Integrate Payments Rainy Day Kit + +Use Payments Rainy Day kit to overcome payments exceptions such as: +- [Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [Payment Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) +- [Payment Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) + +### 1.7 Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +## Frequently Asked Questions + + +### 1. Do I need to handle Apple certificates or domain verification? + + No, Razorpay handles all Apple Pay technical requirements including business verification and certificates. + + + +### 2. Can customers save their preference for Apple Pay? + + Yes, customers who use Apple Pay once can use it for future transactions with the same saved cards. + + + +### 3. What happens if the customer cancels on the Apple Pay page? + + They will be redirected to your failure URL with appropriate error codes, same as a failed card payment. + + + +### 4. Are there additional charges for Apple Pay transactions? + + Reach out to your account manager for details on Apple Pay transaction pricing. + + + +### 5. Which countries support Apple Pay? + + Apple Pay is available in 70+ countries. Customers from these regions can make payments to your business. See the full list of [supported countries](https://support.apple.com/en-in/102775). diff --git a/llm-content/payments/payment-methods/apps/reward-points.md b/llm-content/payments/payment-methods/apps/reward-points.md new file mode 100644 index 00000000..38524a0b --- /dev/null +++ b/llm-content/payments/payment-methods/apps/reward-points.md @@ -0,0 +1,62 @@ +--- +title: Pay with Reward Points +description: Know how you can enable your customers to redeem reward points on checkout. +--- + +# Pay with Reward Points + +With Razorpay, you can now allow your customers to pay with reward points accumulated on popular places like Flipkart (supercoins), IndusInd Bank, Equitas, Intermiles, Timespoints, Ola, BigBasket, and many more. Customers can make payments on your website or app using a combination of reward points and another payment method, such as cards, netbanking, wallets or UPI. + +For example, if a customer has shopped on your website for ₹1000, they can choose to redeem reward points worth ₹200 and pay the rest ₹800 using credit cards. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Advantages + +Some of the advantages of using this payment method are: + +- By redeeming reward points, your customers can avail discounts on the payments when using the points accumulated from their purchases on other e-commerce websites. +- Customers can afford higher-value purchases. +- Your sales volume increases as more customers opt to shop on your website with this added payment method. + +## Supported Partners + +Razorpay has partnered with Twid for this offering. Know more about [Twid](https://twidpay.com/). + +## Workflow + +Given below is an illustration of the workflow: + +![Pay with Rewards workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-methods-reward-points-twid-workflow.jpg.md) + +The workflow is explained below: +1. The customer selects `Pay with Reward Points` on your checkout UI and initiates the payment. +2. The customer is redirected to the Twid page where they enter their phone number and complete OTP authentication. +4. They select the reward points they wish to redeem (for example, Flipkart supercoins) and the other payment method (for example, card) and provide the necessary details. +5. They are redirected to your website once the payment is complete. + +## Video of Checkout Flow + +Watch this video to see the payment flow if a customer uses reward points (only) to make a payment. + +[Video: https://www.youtube.com/embed/mP88fDi2Ux8] + +Watch this video to see the payment flow if a customer uses reward points and a payment method to make a payment. + +[Video: https://www.youtube.com/embed/rtoBrRW63f4] + +### Related Information + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/apps/reward-points/faqs.md) diff --git a/llm-content/payments/payment-methods/apps/reward-points/custom-integration.md b/llm-content/payments/payment-methods/apps/reward-points/custom-integration.md new file mode 100644 index 00000000..b11ede98 --- /dev/null +++ b/llm-content/payments/payment-methods/apps/reward-points/custom-integration.md @@ -0,0 +1,62 @@ +--- +title: Pay with Reward Points - Custom Integration +description: Know how your customers can redeem reward points on your website or app using Custom Integration. +--- + +# Pay with Reward Points - Custom Integration + +Enable your customers to pay using a combination of reward points and another payment method such as cards, netbanking, wallets or UPI, on your Web custom integration. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +- Sign up for a Razorpay account. +- Generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) on the Dashboard. +- Configure [payment capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#dashboard-actions) on the Dashboard. +- Integrate Razorpay Custom Checkout on your [ website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). +- Customers should have earned reward points. In the absence of reward points, customers will get an error and will not be able to proceed with `Pay with Reward Points`. + +## Integrate Reward Points on Web Custom + +Follow the steps mentioned in the [Web Custom Integration document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). + +To add **Pay with Reward Points** as a payment method, you need to pass the `method` and `provider` parameters while creating the payment. + +#### Request Parameters + +Along with the other checkout options, you must pass: + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it should be `app`. + +`provider` _mandatory if method=app_ +: `string` Name of the service provider. Here, it should be `twid`. + +```js: Create Payment +razorpay.createPayment({ + amount: 12340, + currency: 'INR', + email: 'gaurav.kumar@example.com', + contact: '9111145678', + order_id: 'order_EAbtuXPh24LrEc', + method: 'app', + provider: 'twid' +}); +``` + +### Related Information + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/apps/reward-points/faqs.md) diff --git a/llm-content/payments/payment-methods/apps/reward-points/faqs.md b/llm-content/payments/payment-methods/apps/reward-points/faqs.md new file mode 100644 index 00000000..89efbf56 --- /dev/null +++ b/llm-content/payments/payment-methods/apps/reward-points/faqs.md @@ -0,0 +1,28 @@ +--- +title: FAQs - Pay with Reward Points +description: Frequently asked questions on redemption of reward points on checkout. +--- + +# FAQs - Pay with Reward Points + +Given below is a list of frequently asked questions. + +#### 1. How long will it take for the providers to be activated after I raise a request for enablement? + It will take 14 days to activate the providers on your account. + +#### 2. What are the minimum and maximum transaction limits for Twid? + The minimum transaction amount is ₹1. There is no maximum limit. + +#### 3. Is there a way to show reward points balance upfront before customers can select the payment option? + This feature is currently not available as the product is still in the beta stage. + +#### 4. Can my customers redeem all their reward points using "Pay with Reward Points" on a single transaction? + Customers selecting the `Pay with Reward Points` option at the checkout can make payments using a combination of reward points and another payment method, such as cards, netbanking, wallets or UPI. `Pay with Reward Points` via Twid aggregates all of your reward points from multiple partners such as IndusInd, Equitas, Intermiles, Timespoint, and more. For every transaction, the customers can view all their linked points in one place and use one of the available partner points in a given transaction clubbed with other payment modes. + + For example, if the customer has 100 points on IndusInd and 200 points on Intermiles, then they can use either Intermiles **or** IndusInd for that given transaction. The balance amount can be paid using cards, netbanking, UPI, or other available payment modes on `Pay with Reward Points` after selecting the points. Once the customer redeems the reward points and pays the balance (using one of the other methods), they will earn more reward points from the same point partner as per earning logic of the point partner. + +#### 5. How will refunds work? + Refunds will be returned to the source. For example, if the customer had used Intermiles points to make the payment, the refund will be processed to their Intermiles account. In case of partial refunds, the amount paid by cards, netbanking, UPI or wallet will be refunded first, and then the points balance will be refunded. Know more about [refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md). + +#### 6. Can I configure other offers on Twid from the Dashboard? + No, you cannot configure other offers on Twid from the Dashboard. diff --git a/llm-content/payments/payment-methods/apps/reward-points/s2s-integration/json.md b/llm-content/payments/payment-methods/apps/reward-points/s2s-integration/json.md new file mode 100644 index 00000000..58f8d3ca --- /dev/null +++ b/llm-content/payments/payment-methods/apps/reward-points/s2s-integration/json.md @@ -0,0 +1,413 @@ +--- +title: Pay with Reward Points on S2S Integration (JSON) +description: Know how your customers can redeem reward points on your website or app using S2S Integration. +--- + +# Pay with Reward Points on S2S Integration (JSON) + +You can enable your customers to pay using a combination of reward points and a payment method such as cards, netbanking, wallets or UPI, on your S2S integration. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +- Sign up for a Razorpay account. +- Generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) on the Dashboard. +- Configure [payment capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#dashboard-actions) on the Dashboard. +- Follow the [Razorpay S2S Integration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md). +- Customers should have earned reward points. In the absence of reward points, customers will get an error and will not be able to proceed with `Pay with Reward Points`. + +## Integration Steps + +Given below are the integration steps: + +1. [Fetch payment methods using the Methods API](#step-1-fetch-payment-methods-using-methods-api). +2. [Create an order using the Orders API](#step-2-create-an-order-using-orders-api). +3. [Create a payment using the S2S JSON Payments API](#step-3-create-a-payment-using-s2s-json). +4. [Handle payment success and failure](#step-4-handle-payment-success-and-failure). +5. [Fetch payment status](#step-5-fetch-payment-status). + +### Step 1: Fetch Payment Methods using Methods API + +To fetch a list of payment methods enabled for your account, send the following request: + +/methods + +```curl: Request +curl -u [YOUR_KEY_ID] \ +- X GET https://api.razorpay.com/v1/methods \ +```json: Response +{ + "entity": "methods", + ... + "apps": { + "twid": true, + "cred": true + }, + ... +} +``` + +### Step 2: Create an order using Orders API + +Create an order using the Orders API. Send the order request parameters to the following endpoint: + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +### Step 3: Create a Payment using S2S JSON Payments API + +Use the following API to create a payment with `app` as the payment method: + +/payments/create/json + +```curl: curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ + -d '{ + "amount": "100", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EKwxwAgItmmXdp", + "method": "app", + "provider": "twid" +}' +```json: Response +{ + "razorpay_payment_id": "pay_FVptEVkDdNzFx8", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/FVptEs3cSWX1fs/authorize" + } + ] +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is ₹100, enter `10000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`order_id` _mandatory_ +: `string` Order ID generated in the previous step. + +`email` _mandatory_ +: `string` Email address of the customer. + +`contact` _mandatory_ +: `string` Phone number of the customer. + +`method` _mandatory_ +: `string` Name of the payment method. Enter the value `app`. + +`provider` _mandatory_ +: `string` Name of the service provider partnered with Razorpay. Enter the value `twid`. + +`notes` _optional_ +: `object` Set of key-value pairs used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`ip` _optional_ +: `string` Customer IP Address. + +`referrer` _optional_ +: `string` Customer referrer. + +`user_agent` _optional_ +: `string` Customer user-agent. + +#### Response Parameters + +If the payment request is valid, the response contains the following fields. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. Possible value: + - `redirect`: Use this URL to redirect customers to the Twid page. Customers should select the reward points here and complete the redemption process/ + + `url` + : `string` URL to be used for the action indicated. + +### Step 4: Handle Payment Success and Failure + +Once the customer completes the payment, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + +#### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback Example +{ + "razorpay_payment_id": "pay_FVptEVkDdNzFx8", + "razorpay_order_id": "order_EKwxwAgItmmXdp", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +#### Failure Callback + +If the payment has failed, the callback will contain details of the error. Know more about [errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md). + +### Step 5: Fetch Payment Status + +Upon payment completion, you can fetch the status of the payment using: +- [Fetch Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) +- [Payments Webhooks (Recommended)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payments) + +### Related Information + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/apps/reward-points/faqs.md) diff --git a/llm-content/payments/payment-methods/apps/reward-points/s2s-integration/redirect.md b/llm-content/payments/payment-methods/apps/reward-points/s2s-integration/redirect.md new file mode 100644 index 00000000..8a1b1aec --- /dev/null +++ b/llm-content/payments/payment-methods/apps/reward-points/s2s-integration/redirect.md @@ -0,0 +1,407 @@ +--- +title: Pay with Reward Points on S2S Integration (Redirect) +description: Know how your customers can redeem reward points on your website or app using S2S integration. +--- + +# Pay with Reward Points on S2S Integration (Redirect) + +You can enable your customers to pay using a combination of reward points and a payment method such as cards, netbanking, wallets or UPI, on your S2S integration. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites +- Sign up for a Razorpay account. +- Generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) on the Dashboard. +- Configure [payment capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#dashboard-actions) on the Dashboard. +- Follow the [Razorpay S2S Integration (Redirect) documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/redirect.md). +- Customers should have earned reward points. In the absence of reward points, customers will get an error and will not be able to proceed with `Pay with Reward Points`. + +## Integration Steps + +Given below are the integration steps: + +1. [Fetch payment methods using the Methods API](#step-1-fetch-payment-methods-using-methods-api). +2. [Create an order using the Orders API](#step-2-create-an-order-using-orders-api). +3. [Create a payment using the S2S Payments Redirect API](#step-3-create-a-payment-using-s2s-redirect). +4. [Handle payment success and failure](#step-4-handle-payment-success-and-failure). +5. [Fetch payment status](#step-5-fetch-payment-status). + +### Step 1: Fetch Payment Methods using Methods API + +To fetch a list of payment methods enabled for your account, send the following request: + +/methods + +```curl: Request +curl -u [YOUR_KEY_ID] \ +- X GET https://api.razorpay.com/v1/methods \ +```json: Response +{ + "entity": "methods", + ... + "apps": { + "twid": true, + "cred": true + }, + ... +} +``` + +### Step 2: Create an order using Orders API + +Create an order using the Orders API. Send the order request parameters to the following endpoint: + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +### Step 3: Create a Payment using S2S Redirect Payments API + +Use the following API to create a payment with `app` as the payment method: + +/payments/create/redirect + +```curl: curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/redirect \ +-H "Content-Type: application/json" \ + -d '{ + "amount": "100", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EKwxwAgItmmXdp", + "method": "app", + "provider": "twid" +}' +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is ₹100, enter `10000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`order_id` _mandatory_ +: `string` Order ID generated in the previous step. + +`email` _mandatory_ +: `string` Email address of the customer. + +`contact` _mandatory_ +: `string` Phone number of the customer. + +`method` _mandatory_ +: `string` Name of the payment method. Enter the value `app`. + +`provider` _mandatory_ +: `string` Name of the service provider partnered with Razorpay. Enter the value `twid`. + +`notes` _optional_ +: `object` Set of key-value pairs used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`ip` _optional_ +: `string` Customer IP Address. + +`referrer` _optional_ +: `string` Customer referrer. + +`user_agent` _optional_ +: `string` Customer user-agent. + +#### Response Types + +`2OO OK` +: In this case, the response contains `200 OK` code along with the HTML content that needs to be opened in the customer's browser. This HTML content contains form fields that will be automatically posted to the bank or wallet URL (specified in the form) to continue with the payment process. + +`400 Bad Request` +: This can happen when incorrect parameters are passed in the request. For example, passing an invalid currency or wrong card number. + +```json: 400 Bad Request +{ + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "error_source": "gateway", + "error_step": "payment_authorization", + "error_reason": "payment_failed", +} +``` + +Refer to the [errors document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) for more details. + +The HTML form returned in the response should be opened in the customer's browser. The customer completes the payment on the displayed page. + +### Step 4: Handle Payment Success and Failure + +Once the customer completes the payment, a `POST` request is made to the `callback_url` provided in the payment request. The data contained in this request will depend on whether the payment was a **success** or a **failure**. + +#### Success Callback + +If the payment made by the customer is successful, the following fields are sent: + +- `razorpay_payment_id` +- `razorpay_order_id` +- `razorpay_signature` + +```json: Callback example +{ + "razorpay_payment_id": "pay_FVptEVkDdNzFx8", + "razorpay_order_id": "order_EKwxwAgItmmXdp", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +#### Failure Callback + +If the payment has failed, the callback will contain details of the error. Know more about [errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md). + +### Step 5: Fetch Payment Status + +Upon payment completion, you can fetch the status of the payment using: +- [Fetch Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) +- [Payments Webhooks (Recommended)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payments) + +### Related Information + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/apps/reward-points/faqs.md) diff --git a/llm-content/payments/payment-methods/bank-transfer.md b/llm-content/payments/payment-methods/bank-transfer.md new file mode 100644 index 00000000..8493bda2 --- /dev/null +++ b/llm-content/payments/payment-methods/bank-transfer.md @@ -0,0 +1,1017 @@ +--- +title: Payment Methods | Bank Transfer +heading: Bank Transfer +description: Offer bank transfer as a payment method to customers at Razorpay Checkout. +--- + +# Bank Transfer + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +### Step 2: Pass Order ID and Challan Fields to Hosted (Embedded) Checkout + +You need to pass the order id received in the response of step 1 to Hosted (Embedded) Checkout. Along with the usual parameters, you also need to pass the challan parameters. + +Given below is the sample code: + +```html: Hosted Checkout + + + + + + + + + + + + + + + + + + //optional + + //optional + + // optional + + Pay + +``` + + +### Request Parameters + +`key_id` _mandatory_ +: `string` Enter the API key ID generated from the Dashboard. + +`name` _mandatory_ +: `string` The business name to be shown in the checkout form. + +`description`_optional_ +: `string` Description of the item purchased shown in the checkout form. + +`image` _optional_ +: `string` By default the logo of the checkout page will be displayed on the Challan. If you want to display a different logo on challan, pass the image URL. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order, created using the Orders API. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, `INR`. + +`prefill` +: The fields that can be pre-populated in the Checkout form. + + `name` _optional_ + : `string` Name of the cardholder. + + `email` _mandatory_ + : `string` Email address of the customer. + + `contact` _mandatory_ + : `string` Customer's phone number. + +`notes`_optional_ +: `object` An additional set of fields that you want to associate with the payment. For example, you can add "shipping address" and "alternate contact" in the Notes field. You can specify up to 15 note fields. + + `shipping address` + : `string` For example, 106, Razorpay, Bangalore. + + `alternate contact` + : `string` For example, 9000090000. + +`callback_url` _mandatory_ +: `string` Page to which the customers are redirected to after a successful payment. `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` are sent as form-data through a `POST` request to the `callback_url`. + +`cancel_url`_optional_ +: `string` The URL customers are redirected to after the cancellation of a payment. + +`challan` _optional_ +: `array` Add the challan details such as student name, roll number, course, semester and fee type. + + `fields` _optional_ + : `array` A collection of key-value pairs that contains the challan information. For example, you can send values such as student name, roll number, course, semester and fee type. + + `disclaimers` _optional_ + : `array` A collection of key-value pairs that contain legal or informational notices which must be displayed to the user before they proceed with the payment or submission of the challan. + + `expiry` _optional_ + : `object` Option to set specific date and time for challan expiry. + + `date` _optional_ + : `string` The expiration date and time for the challan in Unix timestamp format. + + +## Troubleshooting & FAQs + + +### 1. Why is the bank transfer option not visible on the checkout? + + This could be because the bank transfer feature is not enabled for this account. Please send an email to your designated POC. + + + +### 2. Why are the bank transfer transactions not visible on the Dashboard? + + This could occur if the corresponding virtual account and order were not created successfully. Please send an email to your designated POC. + + +Accept payments from customers using online bank transfers at Razorpay Checkout. + +![Checkout screen with Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pm-checkout-bank-transfer.jpg.md) + + +### On-Demand Feature - Raise a Request + + + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + + + +> **WARN** +> +> +> **Watch Out!** +> +> Bank transfer downloads are not supported by default on webviews. This feature is only available on web and native SDKs. +> + +## How it Works + +1. Customer selects bank transfer as the payment method on Checkout. +2. A Customer Identifier is created with bank account number and IFSC details and displayed to customer. +3. Customer copies these details and make a netbanking payment from their online banking portal. + +These Customer Identifiers are linked to the bank account you have registered with Razorpay. The money will be settled to your account as per the settlement schedule. + +You can choose: + +- [**Method 1: Create New Customer Identifier Per Order**](#method-1-create-new-customer-identifier-per-order) +- [**Method 2: Create New Customer Identifier Per Customer**](#method-2-create-new-customer-identifier-per-customer) + +> **WARN** +> +> +> **Watch Out!** +> +> All bank transfer payments are auto-captured. [Manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#manually-capture-payments) of payments is not supported. +> + +## Method 1: Create New Customer Identifier Per Order + +This creates a new Customer Identifier per order, every time a customer selects bank transfer as the payment method on Checkout. + +#### Integration + +The bank transfer payment method will appear for the [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md) and products such as Payment Links and Payment Pages. + +> **INFO** +> +> +> **Payment Links and Payment Pages** +> +> No additional integration is required if you are using Payment Links and Payment Pages. Raise a request with our [Support Team](https://razorpay.com/support/#request) to activate the feature on your account. +> + +Apart from enabling this feature on your account, complete the following steps to integrate this feature on your Razorpay Standard Integration: + + +### Step 1: Track Checkout Modal Using `ondismiss` Function + + If you have integrated with [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md), you must implement the `ondismiss` function to track the lifecycle of the Checkout modal. This displays the `close` icon, which the customer can use to exit the Checkout. + + +> **INFO** +> +> +> **Handy Tips** +> +> If you are using [Android SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard.md), you can rely on the "payment cancelled by user" error response to track the lifecycle of the Checkout modal. +> + + ```js: ondismiss function + "modal": { + "ondismiss": function(){ + console.log(data); + } + } + ``` + + + +### Step 2: Attach Event Listeners to `Razorpay` Instance + + For bank transfer payments, Checkout will not give a success or a failure callback. You must attach event listeners to the `Razorpay` instance to track if and when the customer has selected the bank transfer payment method. + + ```js: Event Listener + var rzp = new Razorpay(options); + rzp.on('payment.submit', function (data) { + if (data.method === 'bank_transfer') { + // User has selected Bank Transfer + } + }); + ``` + + + +### Step 3: Subscribe to Webhook Event + + You must subscribe to the `virtual_account.credited` webhook event on the Dashboard to receive notifications whenever customers make payments using bank transfers. Know how to [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md). + + **Sample Payload** + + ```json: virtual_account.credited + { + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "virtual_account.credited", + "contains": [ + "payment", + "virtual_account", + "bank_transfer" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DETA2KrOlhqQzF", + "entity": "payment", + "amount": 50000, + "currency": "INR", + "status": "captured", + "order_id": "order_DBJOWzybf0sJbb", + "invoice_id": null, + "international": false, + "method": "bank_transfer", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": "NA", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_1Aa00000000004", + "notes": [], + "fee": 731, + "tax": 112, + "error_code": null, + "error_description": null, + "created_at": 1567675983 + } + }, + "virtual_account": { + "entity": { + "id": "va_DET8z3wBxfPB5L", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Virtual Account to test webhook", + "amount_expected": null, + "notes": { + "Important": "Notes for Internal Reference" + }, + "amount_paid": 50000, + "customer_id": "cust_1Aa00000000004", + "close_by": null, + "closed_at": null, + "created_at": 1567675923, + "receivers": [ + { + "id": "ba_DET8z5Z5ghv4hW", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "account_number": "1112220006712324" + } + ] + } + }, + "bank_transfer": { + "entity": { + "id": "bt_DETA2KSUJ3uCM9", + "entity": "bank_transfer", + "payment_id": "pay_DETA2KrOlhqQzF", + "mode": "NEFT", + "bank_reference": "156767598340", + "amount": 50000, + "payer_bank_account": { + "id": "ba_DETA2UuuKtKLR1", + "entity": "bank_account", + "ifsc": "KKBK0000007", + "bank_name": "Kotak Mahindra Bank", + "name": "Gaurav Kumar", + "account_number": "765432123456789" + }, + "virtual_account_id": "va_DET8z3wBxfPB5L" + } + } + }, + "created_at": 1567675983 + } + ``` + + +## Method 2: Create New Customer Identifier Per Customer + +This ensures that each customer will be allocated a unique Customer Identifier, whenever they use the bank transfer method on Checkout. This method requires specific integration steps, which are mentioned in the following section. + +#### Integration + +The bank transfer payment method will appear for the [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md) and products such as Payment Links and Payment Pages. + +> **INFO** +> +> +> **Payment Links and Payment Pages** +> +> No additional integration is required if you are using Payment Links and Payment Pages. Raise a request with our [Support Team](https://razorpay.com/support/#request) to activate the feature on your account. +> + +Apart from enabling this feature on your account, you must implement the following steps in your payment gateway integration: + + +### Step 1: Create a Customer + + You must create a customer using the Customers API. You can also do this using the Dashboard. + + The following endpoint creates or add a customer with basic details such as name and contact details. You can use this API for various Razorpay Solution offerings. + +/customers + +```cURL: Curl + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name",""); +customerRequest.put("contact",""); +customerRequest.put("email",""); +customerRequest.put("fail_existing", "0"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} + +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->create(array('name' => '', 'email' => '','contact'=>'','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", ""); +options.Add("contact", ""); +options.Add("email", ""); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +``` + +```json: Success Response +{ + "id" : "cust_1Aa00000000004", + "entity": "customer", + "name" : "", + "email" : "", + "contact" : "", + "gstin": null, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at ": 1234567890 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } +} +``` + + + + +`name` _optional_ +: `string` Customer's name. Alphanumeric value with period (.), apostrophe ('), forward slash (/), at (@) and parentheses are allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact ` _optional_ +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email ` _optional_ +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`fail_existing` _optional_ +: `string` Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + +`gstin` _optional_ +: `string` Customer's GST number, if available. For example, `29XAbbA4369J1PA`. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + + +`id` +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`name` +: `string` Customer's name. Alphanumeric, with period (.), apostrophe ('), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact` +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email` +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`gstin` +: `string` GST number linked to the customer. For example, `29XAbbA4369J1PA`. + +`notes` +: `json object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + + Pass the `customer_id` available in the response to Checkout. + + + + + +### Step 2: Create an Order + + **Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + + Request Parameters + + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + + + + +### Step 3: Pass `customer_id` and `order_id` to Checkout + + You must pass the `customer_id` and `order_id` generated in the previous steps to Checkout, as shown below: + + ```js: Standard Checkout + Pay + + + var options = { + "key": "", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise + "currency": "INR", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://cdn.razorpay.com/logos/BUVypPrCFaKDu3_large.jpg", + "order_id": "order_DBJOWzybf0sJbb", + "customer_id": "cust_1Aa00000000004", + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ``` + + + +### Step 4: Track Checkout Modal Using `ondismiss` Function + + (Only if you are using [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md#manual)) + + If you have integrated with Razorpay Standard Checkout, you must implement the `ondismiss` function to track the lifecyle of the Checkout modal. This displays the `close` icon, which the customer can use to exit the Checkout. + + ```js: ondismiss function + "modal": { + "ondismiss": function(){ + console.log(data); + } + } + ``` + + + +### Step 5: Attach Event Listeners to `Razorpay` Instance *[Optional]* + + For bank transfer payments, Checkout will not give a success or a failure callback. You must attach event listeners to the `Razorpay` instance to track if and when the customer has selected the bank transfer payment method. + + ```js: Event Listener + var rzp = new Razorpay(options); + rzp.on('payment.submit', function (data) { + if (data.method === 'bank_transfer') { + // User has selected Bank Transfer + } + }); + ``` + + + +### Step 6: Subscribe to Webhook Event + + You must subscribe to the `virtual_account.credited` webhook event on the Dashboard to receive notifications whenever customers make payments using bank transfers. Know how to [setup webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md#set-up-webhooks). + + **Sample Payload** + + ```json: virtual_account.credited + { + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "virtual_account.credited", + "contains": [ + "payment", + "virtual_account", + "bank_transfer" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DETA2KrOlhqQzF", + "entity": "payment", + "amount": 50000, + "currency": "INR", + "status": "captured", + "order_id": "order_DBJOWzybf0sJbb", + "invoice_id": null, + "international": false, + "method": "bank_transfer", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": "NA", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_1Aa00000000004", + "notes": [], + "fee": 731, + "tax": 112, + "error_code": null, + "error_description": null, + "created_at": 1567675983 + } + }, + "virtual_account": { + "entity": { + "id": "va_DET8z3wBxfPB5L", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Virtual Account to test webhook", + "amount_expected": null, + "notes": { + "Important": "Notes for Internal Reference" + }, + "amount_paid": 50000, + "customer_id": "cust_1Aa00000000004", + "close_by": null, + "closed_at": null, + "created_at": 1567675923, + "receivers": [ + { + "id": "ba_DET8z5Z5ghv4hW", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "account_number": "1112220006712324" + } + ] + } + }, + "bank_transfer": { + "entity": { + "id": "bt_DETA2KSUJ3uCM9", + "entity": "bank_transfer", + "payment_id": "pay_DETA2KrOlhqQzF", + "mode": "NEFT", + "bank_reference": "156767598340", + "amount": 50000, + "payer_bank_account": { + "id": "ba_DETA2UuuKtKLR1", + "entity": "bank_account", + "ifsc": "KKBK0000007", + "bank_name": "Kotak Mahindra Bank", + "name": "Gaurav Kumar", + "account_number": "765432123456789" + }, + "virtual_account_id": "va_DET8z3wBxfPB5L" + } + } + }, + "created_at": 1567675983 + } + ``` + + + +### Related Information + +- [Hosted Integration for Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer/hosted-integration.md) +- [Custom Integration for Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer/custom-integration.md) diff --git a/llm-content/payments/payment-methods/bank-transfer/custom-integration.md b/llm-content/payments/payment-methods/bank-transfer/custom-integration.md new file mode 100644 index 00000000..a19f1964 --- /dev/null +++ b/llm-content/payments/payment-methods/bank-transfer/custom-integration.md @@ -0,0 +1,563 @@ +--- +title: Bank Transfer on Custom Checkout +description: Know how to integrate bank transfer as a payment method on Razorpay Custom Checkout. +--- + +# Bank Transfer on Custom Checkout + +You can now accept payments from customers in the form of online bank transfers using the Razorpay Custom Checkout. + +## How it Works + +1. Customer selects bank transfer as the payment method on Checkout. +2. A Customer Identifier is created with the bank account number and IFSC details and displayed to the customer. +3. The customer copies these details and makes a netbanking payment from their online banking portal. + +These Customer Identifiers are linked to the bank account you have registered with Razorpay. The payments are settled in your account as per the settlement schedule. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +- [Create a Razorpay Account](https://dashboard.razorpay.com/signup). +- [Generate the API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). +- Integrate with [Razorpay Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). + +## Integration Steps + +1. [Create an order](#step-1-create-an-order). +2. [Add the `fetchVirtualAccount` method to the custom checkout integration](#step-2-add-fetchvirtualaccount-method-to-custom-checkout). +3. [Subscribe to the virtual account credited webhook event](#step-3-subscribe-to-webhook-event). + +### Step 1: Create an Order + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +### Step 2: Add `fetchVirtualAccount` method to Custom Checkout + +Use the method `fetchVirtualAccount` to create and fetch the virtual account details. The method is called with the following data. + +#### Sample Code + +```js: Bank Transfer +var data = { + + order_id: 'order_CuEzONfnOI86Ab',// Replace with Order ID generated in Step 1 + customer_id: "cust_1Aa00000000004", + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + } +}; + +razorpay.fetchVirtualAccount(data) +.then((response) => { + console.log(response) + }) + .catch((error) => { + // +}); + +```js: Sample Response +{ + "id":"va_DlGmm7jInLudH9", + "name":"Acme Corp", + "entity":"virtual_account", + "status":"active", + "description":"Virtual Account created for Raftar Soft", + "amount_expected":null, + "notes":{ + "project_name":"Banking Software" + }, + "amount_paid":0, + "customer_id":"cust_1Aa00000000004", + "receivers":[ + { + "id":"ba_DlGmm9mSj8fjRM", + "entity":"bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name":"Acme Corp", + "notes":[], + "account_number":"2223330099089860" + } + ], + "close_by":1681615838, + "closed_at":null, + "created_at":1574837626 +} +``` + +#### Request Parameters + +`order_id` _mandatory +: `string` The unique identifier of the order created in the previous step. + +`customer_id` _optional_ +: `string` The unique identifier of the customer. Learn how to create a customer using the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). This parameter is mandatory if you want to associate the virtual account with a specific customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`id` +: `string` The unique identifier of the virtual account. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the virtual account is in `active` or `closed` state. + +`description` +: `string` A brief description about the virtual account. + +`amount_paid` +: `integer` The amount paid by the customer. + +`notes` +: `json object` Any custom notes you might want to add to the virtual account can be entered here. Refer [Notes section of the API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to learn more. + +`customer_id` +: `string` Unique identifier of the customer to whom the virtual account is linked. Refer the [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) section to learn more. + +`receivers` +: `json object` Configuration of desired receivers for the virtual account. + + `id` + : `string` The unique identifier of the virtual bank account or virtual UPI ID. Sample IDs for: + - virtual bank account + - `ba_Di5gbQsGn0QSz3` + - virtual UPI ID + - `vpa_CkTmLXqVYPkbxx`. + + `entity` + : `string` Name of the entity. Possible values: + - `bank_account` + - `vpa` + + `ifsc` + : `string` The IFSC for the virtual bank account created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the virtual bank account. For example, `RBL Bank`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the virtual bank account or virtual UPI ID can be entered here. Refer [Notes section of the API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to learn more. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `username` + : `string` The UPI ID consists of the username and the bank handle. The `username` consists of the `namespace` (assigned by the bank to Razorpay), the `merchant prefix` (which can be customised by you) and the `descriptor` (which you provide to identify the customer). The unique identifier which forms the first half of the virtual UPI ID. For example, `rpy.payto00000gaurikumari`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + + `handle` + : `string` The bank name that forms the second half of the virtual UPI ID. For example, `icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + + `address` + : `string` The UPI ID that combines the `username` and the `handle` with the `@` symbol. For example, `rpy.payto00000gaurikumari@icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + +`close_by` +: `integer` UNIX timestamp at which the virtual account is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + +> **INFO** +> +> **Handy Tips** +Any request beyond `2147483647` UNIX timestamp will fail. + +`closed_at` +: `integer` UNIX timestamp at which the virtual account is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the virtual account was created. + +```json: Sample Entity +{ + "id":"va_CaVE4QbyJvQRdk", + "name":"Acme Corp", + "entity":"virtual_account", + "status":"active", + "description":"Virtual Account created for Gaurav Kumar", + "notes":{ + "flat no":"105" + }, + "amount_paid":0, + "customer_id":"cust_805c8oBQdBGPwS", + "receivers":[ + { + "id": "ba_DzXNNxY8yQu5iV", + "entity": "bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223333230231378" + }, + { + "id":"vpa_CkTmLXqVYPkbxx", + "entity":"vpa", + "username":"rpy.payto00000gaurikumari", + "handle":"icici", + "address":"rpy.payto00000gaurikumari@icici" + } + ], + "close_by": 1581615838, + "closed_at": null, + "created_at": 1577962694 +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> The above flow also works with the following cases: +> +> 1. With the Customer Fee bearer model, the amount validation should happen with Amount + Fee. +> 2. You can pass the customer id in Checkout to ensure that a static virtual account is created for each customer. +> + +### Step 3: Subscribe to Webhook Event + +You must subscribe to the `virtual_account.credited` webhook event on the Dashboard to receive notifications whenever customers make payments using bank transfers. Learn how to [setup webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md#set-up-webhooks). + +#### Sample Payload + +```json: virtual_account.credited +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "virtual_account.credited", + "contains": [ + "payment", + "virtual_account", + "bank_transfer" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DETA2KrOlhqQzF", + "entity": "payment", + "amount": 50000, + "currency": "INR", + "status": "captured", + "order_id": "order_DBJOWzybf0sJbb", + "invoice_id": null, + "international": false, + "method": "bank_transfer", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": "NA", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_1Aa00000000004", + "notes": [], + "fee": 731, + "tax": 112, + "error_code": null, + "error_description": null, + "created_at": 1567675983 + } + }, + "virtual_account": { + "entity": { + "id": "va_DET8z3wBxfPB5L", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Virtual Account to test webhook", + "amount_expected": null, + "notes": { + "Important": "Notes for Internal Reference" + }, + "amount_paid": 50000, + "customer_id": "cust_1Aa00000000004", + "close_by": null, + "closed_at": null, + "created_at": 1567675923, + "receivers": [ + { + "id": "ba_DET8z5Z5ghv4hW", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "account_number": "1112220006712324" + } + ] + } + }, + "bank_transfer": { + "entity": { + "id": "bt_DETA2KSUJ3uCM9", + "entity": "bank_transfer", + "payment_id": "pay_DETA2KrOlhqQzF", + "mode": "NEFT", + "bank_reference": "156767598340", + "amount": 50000, + "payer_bank_account": { + "id": "ba_DETA2UuuKtKLR1", + "entity": "bank_account", + "ifsc": "KKBK0000007", + "bank_name": "Kotak Mahindra Bank", + "name": "Gaurav Kumar", + "account_number": "765432123456789" + }, + "virtual_account_id": "va_DET8z3wBxfPB5L" + } + } + }, + "created_at": 1567675983 +} +``` diff --git a/llm-content/payments/payment-methods/bank-transfer/hosted-integration.md b/llm-content/payments/payment-methods/bank-transfer/hosted-integration.md new file mode 100644 index 00000000..83e290bb --- /dev/null +++ b/llm-content/payments/payment-methods/bank-transfer/hosted-integration.md @@ -0,0 +1,1019 @@ +--- +title: Bank Transfer on Hosted Checkout +description: Offer bank transfer as a payment method to customers on Razorpay Hosted Checkout. +--- + +# Bank Transfer on Hosted Checkout + +You can now accept payments from customers in the form of online bank transfers, using the Razorpay Checkout form. + +![](/docs/assets/images/bank-transfer-bank-transfer-hosted.jpg) + +## How it Works + +1. Customer selects bank transfer as the payment method on Hosted Checkout. +2. A virtual bank account is created with bank account number and IFSC details and displayed to the customer. +3. Customer copies these details and make a netbanking payment from their online banking portal. + +These virtual bank accounts are linked to the bank account you have registered with Razorpay. The money will be settled to your account as per the settlement schedule. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +You can choose: + +- [**Method 1: Create New Virtual Bank Account Per Order**](#method-1-create-new-virtual-bank-account-per) +- [**Method 2: Create New Virtual Bank Account Per Customer**](#method-2-create-new-virtual-bank-account-per) + +## Method 1: Create New Virtual Bank Account Per Order + +This creates a new virtual bank account every time a customer selects bank transfer as the payment method on Hosted Checkout. + +### Integration + +The bank transfer payment method will appear for the [payment gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/hosted.md) and products such as Payment Links, Payment Pages and Subscriptions. + +| Approval | Integration +--- +Payment Gateway | ✓ | ✓ +--- +Products such as Payment Links, Payment Pages, Invoices, etc. | ✓ | Not Required + +Complete the following steps to integrate this payment method on your Razorpay Hosted Checkout Integration: + +1. Create Order. +2. Pass `method` and `order_id` to Hosted Checkout. +3. Subscribe to webhooks event. + +### Step 1: Create an Order + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +### Step 2: Add `method` parameter to Hosted Checkout + +Update your integration with the `method` and `order` parameters as shown below. This will display bank transfer as a payment method. + +```html: Hosted Checkout + + "> + // Adds bank transfer payment method + //Generated using Orders API at server-side + + + + + + + + + + + Submit + +``` + +#### Request Parameter + +`method[smartcollect]` _mandatory_ +: `boolean` Display bank transfer payment method on Checkout. Possible values: + - `true`: Bank transfer payment method is displayed on Checkout. + - `false`: Bank transfer payment method is not displayed on Checkout. + +### Step 3: Subscribe to Webhook Event + +You must subscribe to the `virtual_account.credited` webhook event on the Dashboard to receive notifications whenever customers make payments using bank transfers. Know how to [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md#set-up-webhooks). + +#### Sample Payload + +```json: virtual_account.credited +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "virtual_account.credited", + "contains": [ + "payment", + "virtual_account", + "bank_transfer" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DETA2KrOlhqQzF", + "entity": "payment", + "amount": 50000, + "currency": "INR", + "status": "captured", + "order_id": "order_DBJOWzybf0sJbb", + "invoice_id": null, + "international": false, + "method": "bank_transfer", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": "NA", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_1Aa00000000004", + "notes": [], + "fee": 731, + "tax": 112, + "error_code": null, + "error_description": null, + "created_at": 1567675983 + } + }, + "virtual_account": { + "entity": { + "id": "va_DET8z3wBxfPB5L", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Virtual Account to test webhook", + "amount_expected": null, + "notes": { + "Important": "Notes for Internal Reference" + }, + "amount_paid": 50000, + "customer_id": "cust_1Aa00000000004", + "close_by": null, + "closed_at": null, + "created_at": 1567675923, + "receivers": [ + { + "id": "ba_DET8z5Z5ghv4hW", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "account_number": "1112220006712324" + } + ] + } + }, + "bank_transfer": { + "entity": { + "id": "bt_DETA2KSUJ3uCM9", + "entity": "bank_transfer", + "payment_id": "pay_DETA2KrOlhqQzF", + "mode": "NEFT", + "bank_reference": "156767598340", + "amount": 50000, + "payer_bank_account": { + "id": "ba_DETA2UuuKtKLR1", + "entity": "bank_account", + "ifsc": "KKBK0000007", + "bank_name": "Kotak Mahindra Bank", + "name": "Gaurav Kumar", + "account_number": "765432123456789" + }, + "virtual_account_id": "va_DET8z3wBxfPB5L" + } + } + }, + "created_at": 1567675983 +} +``` + +## Method 2: Create New Virtual Bank Account Per Customer + +This ensures that each customer will be allocated a unique virtual bank account, whenever they use bank transfer method on Hosted Checkout. This method requires specific integration steps, which are mentioned in the following section. + +### Integration + +The bank transfer payment method will appear for the [payment gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/hosted.md) and products such as Payment Links, Invoices and Subscriptions. + +| Approval | Integration +--- +Payment Gateway | ✓ | ✓ +--- +Products such as Payment Links, Payment Pages, Invoices, etc. | ✓ | Not Required + +Complete the following steps to integrate this payment method on your Razorpay Hosted Checkout Integration: + +1. Create a Customer. +2. Create an Order. +3. Pass `method`, `customer_id` and `order_id` to Hosted Checkout. +4. Subscribe to webhooks event. + +### Step 1: Create a Customer + +You must create a customer using the Customers ID. You can also do same using the Dashboard. + +The following endpoint creates or add a customer with basic details such as name and contact details. You can use this API for various Razorpay Solution offerings. + +/customers + +```cURL: Curl + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name",""); +customerRequest.put("contact",""); +customerRequest.put("email",""); +customerRequest.put("fail_existing", "0"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} + +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->create(array('name' => '', 'email' => '','contact'=>'','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", ""); +options.Add("contact", ""); +options.Add("email", ""); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +``` + +```json: Success Response +{ + "id" : "cust_1Aa00000000004", + "entity": "customer", + "name" : "", + "email" : "", + "contact" : "", + "gstin": null, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at ": 1234567890 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } +} +``` + +#### Request Parameters + +`name` _optional_ +: `string` Customer's name. Alphanumeric value with period (.), apostrophe ('), forward slash (/), at (@) and parentheses are allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact ` _optional_ +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email ` _optional_ +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`fail_existing` _optional_ +: `string` Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + +`gstin` _optional_ +: `string` Customer's GST number, if available. For example, `29XAbbA4369J1PA`. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Request Parameters + +`id` +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +`name` +: `string` Customer's name. Alphanumeric, with period (.), apostrophe ('), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact` +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email` +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`gstin` +: `string` GST number linked to the customer. For example, `29XAbbA4369J1PA`. + +`notes` +: `json object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` UNIX timestamp, when the customer was created. For example, `1234567890`. + +Pass the `customer_id` available in the response to Checkout. + +### Step 2: Create an Order + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +### Step 3: Pass `customer_id` and `order_id` to Hosted Checkout + +You must pass the `customer_id` and `order_id` generated in the previous steps to Checkout, as shown below: + +```html: Hosted Checkout + + "> + //Adds bank transfer payment method + //Customer identifier generated in Step 1 + /Order identifier generated in Step 2 + + + + + + + + + + + Submit + +``` + +#### Request Parameter + +`method[smartcollect]` _mandatory_ +: `boolean` Display bank transfer payment method on Checkout. Possible values: + - `true`: Bank transfer payment method is displayed on Checkout. + - `false`: Bank transfer payment method is not displayed on Checkout. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer to whom the virtual account has been allocated. [Generated in Step 1](#step-1-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order. [Generated in Step 2](#step-2-create-an-order). + +**Read More**: [List of parameters for Hosted Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/hosted/integration-steps.md#1-build-integration). + +#### Subscribe to Webhook Event + +You must subscribe to the `virtual_account.credited` webhook event on the Dashboard to receive notifications whenever customers make payments using bank transfers. Know how to [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md#set-up-webhooks). + +#### Sample Payload + +```json: virtual_account.credited +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "virtual_account.credited", + "contains": [ + "payment", + "virtual_account", + "bank_transfer" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DETA2KrOlhqQzF", + "entity": "payment", + "amount": 50000, + "currency": "INR", + "status": "captured", + "order_id": "order_DBJOWzybf0sJbb", + "invoice_id": null, + "international": false, + "method": "bank_transfer", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": "NA", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_1Aa00000000004", + "notes": [], + "fee": 731, + "tax": 112, + "error_code": null, + "error_description": null, + "created_at": 1567675983 + } + }, + "virtual_account": { + "entity": { + "id": "va_DET8z3wBxfPB5L", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Virtual Account to test webhook", + "amount_expected": null, + "notes": { + "Important": "Notes for Internal Reference" + }, + "amount_paid": 50000, + "customer_id": "cust_1Aa00000000004", + "close_by": null, + "closed_at": null, + "created_at": 1567675923, + "receivers": [ + { + "id": "ba_DET8z5Z5ghv4hW", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "account_number": "1112220006712324" + } + ] + } + }, + "bank_transfer": { + "entity": { + "id": "bt_DETA2KSUJ3uCM9", + "entity": "bank_transfer", + "payment_id": "pay_DETA2KrOlhqQzF", + "mode": "NEFT", + "bank_reference": "156767598340", + "amount": 50000, + "payer_bank_account": { + "id": "ba_DETA2UuuKtKLR1", + "entity": "bank_account", + "ifsc": "KKBK0000007", + "bank_name": "Kotak Mahindra Bank", + "name": "Gaurav Kumar", + "account_number": "765432123456789" + }, + "virtual_account_id": "va_DET8z3wBxfPB5L" + } + } + }, + "created_at": 1567675983 +} +``` + +### Try It Out + +To understand how your customers can transfer money to you: + +1. [Launch our demo Standard Checkout.](https://razorpay.com/demo/smartcollect/) +2. Provide your phone number and email address. +3. Select **Bank Transfer** as your payment method. +4. Click **Copy Details** to copy the account number, IFSC and Beneficiary Name. +5. Go to your preferred netbanking portal, enter the copied details and initiate an online bank transfer. + +> **WARN** +> +> +> **Live Payment** +> +> This initiates a live payment. The amount will be refunded within 5-7 days. +> diff --git a/llm-content/payments/payment-methods/bharatqr.md b/llm-content/payments/payment-methods/bharatqr.md new file mode 100644 index 00000000..08326bd5 --- /dev/null +++ b/llm-content/payments/payment-methods/bharatqr.md @@ -0,0 +1,69 @@ +--- +title: BharatQR +description: Learn how to facilitate BharatQR-based payments on your mobile app using Razorpay. +--- + +# BharatQR + +> **WARN** +> +> +> **Watch Out!** +> +> We have discontinued onboarding new users for BharatQR. The service is now limited to existing users only. If you are a new user, we encourage you to check out our alternative offering of [UPI QR Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes.md#create-a-qr-code). +> + +With the advent of digital payments, several businesses in India have moved from traditional methods such as NEFT and IMPS to more advanced solutions such as UPIs and wallets due to its scalability, mobile-friendliness, and quicker processing time. + +Under this umbrella, BharatQR (BQR) seems to be the fastest mode for receiving payments. The BharatQR Code payments transfer mechanism has made the payments process much easier, encouraging cashless electronic payment transactions. + +## What is BharatQR + +BharatQR is a secured payment collection method that facilitates merchant-to-person (M2P) transactions through a QR code. Once the BQR codes are deployed at your stores, customers can pay using BQR-enabled mobile banking apps, selecting a preferred payment method without sharing any user credentials. + +A QR (Quick Response) code is an information matrix in a machine-readable format containing the required details to accept payments from customers. BharatQR code accommodates information such as your name, contact address, business name, destination bank details and so on. This is how a sample QR code looks like: + +![BharatQR Title Image](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bharatqr.jpg.md) + +## How it Works + +BQR was built from the ground up keeping mobility around virtual account transactions at its core, thereby making it agnostic across various mobile devices and applications. + +In a BQR-based payment setting, a customer uses a BQR-enabled mobile app to scan a BQR code deployed on the merchant store. Upon a successful scan, customer is redirected to a checkout page where they enter their card details and proceeds with the payment for the charged amount. Once the payment is complete, both merchant and customer are notified of the payment status. Once the payment is successfully authorized and captured it is settled to your bank account as per your settlement schedule. + +![BharatQR workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bharatqr-workflow.jpg.md) + +The supported payment schemes include: +- UPI +- Credit/Debit cards + - Mastercard + - Visa + - RuPay + +@image bharatqr_2.gif + +## Advantages + +A BQR code is a 2-dimensional barcode but with the capability of carrying 10 times more information. Amongst its many advantages, a BQR payment: + +- Requires less or no setup cost. +- Charges no additional cost. It is just a new mode of payment. +- Is as secure as a UPI payment. Card details are not exposed. +- Is interoperable across most payment apps such as MobiKwik, PhonePe and Google Pay. + +## Use-cases + +BQR-based payments are being widely adopted by merchants with physical stores as it makes accepting and receiving payments a lot quicker and easier for them. The adoption of BQR-based payments may also replace: + +- Cash-on-delivery +- ID cards +- POS (Point of Sale) machines +- Paper receipts + +## Getting started with Razorpay BharatQR + +1. Contact your Sales POC or raise a request with [Razorpay Support](https://razorpay.com/support/#request) to activate BharatQR on your account. +2, Use Razorpay APIs to create a BharatQR. +3. Share the BharatQR with the customer who can make payments through Credit Card, Debit Card and UPI. +4. You can accept multiple payments via a single QR. +5. Close the BharatQR at any time to stop accepting payments. diff --git a/llm-content/payments/payment-methods/bharatqr/additional-operations.md b/llm-content/payments/payment-methods/bharatqr/additional-operations.md new file mode 100644 index 00000000..5ab21f79 --- /dev/null +++ b/llm-content/payments/payment-methods/bharatqr/additional-operations.md @@ -0,0 +1,22 @@ +--- +title: Additional Operations +--- + +# Additional Operations + +Razorpay lets you perform few additional operations around your BQR-based payment. + +## Sharing + +The QR code can be shared using `short_url`. The QR code gets downloaded by clicking on link. + +``` +short_url: rzp.io/i/XXXXX +``` + +The customer can embed the QR code image from this URL onto any preferred platform such as invoice, standee or ID card and start accepting payments. + +## Refunds + +You can create refunds for the payments received on your QR Code. When a payment is received via +UPI or Cards, it will be labeled as refund on the customer’s bank statement, crediting the refunded amount back to his/her account. Refunds are generally processed within 3-5 business days. The platform fee and GST charged on successful transactions will not be reversed in case of refunds. diff --git a/llm-content/payments/payment-methods/bharatqr/api.md b/llm-content/payments/payment-methods/bharatqr/api.md new file mode 100644 index 00000000..e6b2ca6f --- /dev/null +++ b/llm-content/payments/payment-methods/bharatqr/api.md @@ -0,0 +1,234 @@ +--- +title: API Reference +description: Razorpay APIs lets you create, fetch, fetch all payments made from BharatQR. +--- + +# API Reference + +Learn how to create a BQR payment and perform other operations using Razorpay APIs. To understand the basic concepts of our API usage, refer our [API Documentation.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md) + +## Get Postman Collection + +We have a Postman collection to make the integration quicker and easier. You can try out our APIs on the Razorpay Postman Public Workspace. + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-11b2db21-9019-4814-9669-c70305b8fd6e) + +## Create + +Each BharatQR is mapped to a virtual account. In order to generate a BharatQR, a virtual account must be created with the appropriate receiver type. The receiver defines the method of payment collection. In the case of BharatQR, the receiver type is QR Code which allows you to accept payments made via UPI or Cards. + +/virtual_accounts + +```curl:Example Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/virtual_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "receivers": { + "types": [ + "qr_code" + ] + }, + "description": "First Payment by BharatQR", + "customer_id": "cust_805c8oBQdBGPwS", + "notes": { + "reference_key": "reference_value" + } +}' +```json:Response +{ + "id": "va_4xbQrmEoA5WJ0G", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "First Payment by BharatQR", + "amount_expected": null, + "notes": { + "reference_key": "reference_value" + }, + "amount_paid": 0, + "customer_id": "cust_805c8oBQdBGPwS", + "receivers": [ + { + "id": "qr_4lsdkfldlteskf", + "entity": "qr_code", + "reference": "AgdeP8aBgZGckl", + "short_url": "https://rzp.io/i/PLs03pOc" + } + ], + "close_by": null, + "closed_at": null, + "created_at": 1607938184 +} +``` + +### Request Parameters + +`receivers` _mandatory_ +: `array` consisting of configured receivers types. + + `types` _mandatory_ + : `array` The receiver type. Here, it will be `qr_code`. + +`description` _optional_ +: `string` A brief description of the payment. + +`customer_id` _optional_ +: `string` Unique identifier of customer for whom BharatQR is being created. Refer [Customer API.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) + +`notes` _optional_ +: `object` consisting of key value pairs as notes. Refer [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + +`amount_expected` _optional_ +: `integer` The maximum amount you expect to receive in this virtual account. Pass `69999` for ₹699.99. + +## Response Parameters + +`id` +: `string` The unique identifier of the generated QR code. A sample `id` for a QR code will look like this: `qr_4lsdkfldlteskf`. + +`entity` +: `string` The name of the response entity. Here, it is `qr_code`. + +`reference` +: `string` A 14-digit reference number or a receipt for the payment. It will be the same as the value of `id` without the prefix `qr_`. A sample `reference` value will look like this: `4lsdkfldlteskf`. + +`short_url` +: The URL of the QR code. A sample short URL looks like this `http://rzp.io/l6MS`. Clicking on the link will download the code. This will be useful for offline merchants. + +`status` +: The status of the payment. It can have two values, `active` and `closed`. + +## Fetch a Payment + +The following endpoint retrieves details of a specific payment. + +/virtual_accounts/:id + +```curl: Curl +curl -u : \ + -X GET \ + https://api.razorpay.com/v1/virtual_accounts/va_4xbQrmEoA5WJ0G + +```json:Response +{ + "id": "va_4xbQrmEoA5WJ0G", + "entity": "virtual_account", + "description": "First Payment by BharatQR", + "customer_id": "cust_805c8oBQdBGPwS", + "status": "active", + "amount_paid": 10000, + "notes": { + "reference_key": "reference_value" + }, + "receivers": [ + { + "id": "qr_4lsdkfldlteskf", + "entity": "qr_code", + "reference": "AgdeP8aBgZGckl", + "short_url": "http://rzp.io/l6MS", + } + ], + "created_at": 1455696638 +} +``` + +## Fetch All Payments + +The following endpoint retrieves details of all the payments. + +/virtual_accounts + +```curl: Curl +curl -u : \ + -X GET \ + https://api.razorpay.com/v1/virtual_accounts +```json:Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "va_84lyVss1CRZ6eM", + "entity": "virtual_account", + "name": "Merchant Billing Label", + "description": "Second Payment by BharatQR", + "status": "active", + "amount_paid": 90000, + "notes": [], + "customer_id": null, + "receivers": [ + { + "id": "qr_4lsdkfldlteskf", + "entity": "qr_code", + "reference": "", + "short_url": "http://rzp.io/l6MS", + } + ], + "created_at": 1497873405 + }, + { + "id": "va_4xbQrmEoA5WJ0G", + "entity": "virtual_account", + "name": "Merchant Billing Label", + "description": "First Payment by BharatQR", + "status": "active", + "amount_paid": 10000, + "notes": { + "reference_key": "reference_value" + }, + "receivers": [ + { + "id": "qr_4lsdkfldlfr4er", + "entity": "qr_code", + "reference": "", + "short_url": "http://rzp.io/l6MS", + } + ], + "customer_id": "cust_805c8oBQdBGPwS", + "created_at": 1497922042 + } + ] +} +``` + +## Close + +/virtual_accounts/:id/close + +### Path Parameter + +`id` _mandatory_ +: `string`The unique identifier of the virtual account that is to be closed. + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/virtual_accounts/va_FaulaIlvXeGqfV/close\ +```json:Response +{ + "id": "va_FaulaIlvXeGqfV", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "closed", + "description": "Description for this QR Code", + "amount_expected": null, + "notes": { + "reference_key": "You can pass any notes here" + }, + "amount_paid": 0, + "customer_id": "cust_FPOJP9UkUpRO14", + "receivers": [ + { + "id": "qr_FaulaJ6gYWovHF", + "entity": "qr_code", + "reference": "FaulaJ6gYWovHF", + "short_url": "https://rzp.io/i/sA2Tjoc", + "created_at": 1599650857 + } + ], + "close_by": null, + "closed_at": 1599650868, + "created_at": 1599650857 +} + +``` diff --git a/llm-content/payments/payment-methods/bharatqr/faqs.md b/llm-content/payments/payment-methods/bharatqr/faqs.md new file mode 100644 index 00000000..f45766b5 --- /dev/null +++ b/llm-content/payments/payment-methods/bharatqr/faqs.md @@ -0,0 +1,40 @@ +--- +title: Frequently Asked Questions +description: Frequently asked questions about BharatQR. +--- + +# Frequently Asked Questions + +Below are some frequently asked questions (FAQs) about BharatQR. + +#### 1. How can I provide 'Scan and Pay' facility to my customers? +Razorpay can help facilitate BharatQR code for your business and provide a 'Scan and Pay' option at checkout. Just ask your Sales POC or raise a support ticket to enable this feature for your merchant ID. [Sign up with Razorpay](https://razorpay.com/). + +#### 2. How can you use BharatQR to make payments? +To make payments via BharatQR: + +1. [Register yourself as a business with Razorpay](https://dashboard.razorpay.com/?screen=sign_in&next=app%2Factivation). + +2. Download your preferred mobile banking app like BHIM, PhonePe, HDFC, PayZapp, ICICI Pockets, PayTM, Google Tez or WhatsApp, that supports payments via BharatQR. + +3. Razorpay generates BharatQR code for your business and provides **Scan and Pay** option at the checkout. + +4. Scan the QR code to proceed with the payment. + +5. Enter the amount and make the payment using debit card/UPI. + +#### 3. Is there a limit on the number of transactions carried out via BQR? +The current transaction limit is set to 1 Lac per transaction. However, a lower per day transaction limit may be set at the bank's end. + +#### 4. How will these payments reflect in my bank account? +The payments will be settled directly into your bank account. + +#### 5. Where all can I accept payments via Bharat QR? +You can accept payments via BharatQR for streaming DTH services, paying for groceries at the nearby kirana store, or paying for utilities at the retail outlets, by scanning QR code at their system/payment counter. + +#### 6. My customer claims to have made a payment using the QR. However, I am unable to view the payment on the Dashboard. What could be the reason? + +This could happen in situations where though the customer's account is debited, the transaction is still processing or yet to reach Razorpay’s partner bank account. Therefore, the payment is not created and does not reflect on the Dashboard. There are two possible cases: + +1. The transaction has failed and the money will be refunded back to the customer by the customer’s bank. +2. The transaction is successful. However, our banking partner failed to send the confirmation to Razorpay. In such cases, the payment will be created and authorised within 24 hours. This is done to ensure end-to-end visibility of transactions for you and the customer. Additionally, this will enable you to take refund-related actions on your own. diff --git a/llm-content/payments/payment-methods/bharatqr/notification.md b/llm-content/payments/payment-methods/bharatqr/notification.md new file mode 100644 index 00000000..c0da13fd --- /dev/null +++ b/llm-content/payments/payment-methods/bharatqr/notification.md @@ -0,0 +1,109 @@ +--- +title: Payment Methods | BharatQR - Notifications +heading: Notifications +description: Receive notifications for your Razorpay virtual account for payment captured event using webhooks and receive email notifications for payment successful event . +--- + +# Notifications + +You will be notified of any payments made to your virtual accounts via webhook and email. + +All payments made using BharatQR towards your account will show up on your Dashboard as well as in the usual payment API response as payments made with receiver `qr_code`. You can view the funds received by a virtual account using the `amount_paid` field in the virtual account entity. This field specifies the total amount (in Paise) that has been paid to the virtual account. + +## Webhooks +Payments made using this method will also trigger webhooks much like regular payments. Refer our [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) documentation to learn how to use webhooks. + +### Virtual Account Credited Event + +Payments made using BharatQR are notified via the `virtual_account.credited` webhook event. The payload for this event contains details of the payment itself, as well as the virtual account that the payment was made towards. + +```json: Virtual Account Credited +{ + "entity": "event", + "account_id": "acc_CJoeHMNpi0nC7k", + "event": "virtual_account.credited", + "contains": [ + "payment", + "virtual_account" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EsWT9LM5LNXtG6", + "entity": "payment", + "amount": 500, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Bharat Qr Payment", + "card_id": "card_EsWT9QCC3I1E1c", + "card": { + "id": "card_EsWT9QCC3I1E1c", + "entity": "card", + "name": "Razorpay", + "last4": "0153", + "network": "Visa", + "type": "debit", + "issuer": null, + "international": false, + "emi": false + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": null, + "contact": null, + "notes": { + "tea": "earl_grey" + }, + "fee": 5, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "created_at": 1589958324 + } + }, + "virtual_account": { + "entity": { + "id": "va_EsWSDoOxW3zhPV", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "test it", + "amount_expected": null, + "notes": { + "reference_key": "repeat" + }, + "amount_paid": 500, + "customer_id": null, + "close_by": null, + "closed_at": null, + "created_at": 1589958272, + "receivers": [ + { + "id": "qr_EsWSDoeAS1SREz", + "entity": "qr_code", + "reference": "EsWSDoeAS1SREz", + "short_url": "https://rzp.io/i/81k6IXD", + "created_at": 1589958272 + } + ] + } + } + }, + "created_at": 1589958325 +} +``` + +## Emails + +You will also receive a **payment successful** notification email, as you do for regular payments. diff --git a/llm-content/payments/payment-methods/bharatqr/status.md b/llm-content/payments/payment-methods/bharatqr/status.md new file mode 100644 index 00000000..25dfc142 --- /dev/null +++ b/llm-content/payments/payment-methods/bharatqr/status.md @@ -0,0 +1,16 @@ +--- +title: Statuses +description: Your Razorpay virtual account can have active or closed status. +--- + +# Statuses + +Once created, a QR code can be in the following states: + +## Active + +Upon creation, the QR code is said to be in an `active` state and can receive payments to the corresponding Virtual Account. + +## Closed + +The QR code will remain active until the underlying virtual account is [closed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bharatqr/api.md). Once the virtual account is `closed`, all the payments made to the QR code after the closure will be automatically refunded. diff --git a/llm-content/payments/payment-methods/bharatqr/testing.md b/llm-content/payments/payment-methods/bharatqr/testing.md new file mode 100644 index 00000000..d45a5aaa --- /dev/null +++ b/llm-content/payments/payment-methods/bharatqr/testing.md @@ -0,0 +1,36 @@ +--- +title: Testing +description: Create and manage your Razorpay Customer Identifiers in test mode before you start making and receiving actual payments. +--- + +# Testing + +You can create and manage your BQR code in test mode before you start receiving actual transactions. + +## Test Payments +Test payments can be initiated towards any BQR code created in test mode, using the BharatQR test payment route. + +### Request Parameters + +`reference` +: `string` The unique identifier of the QR code that receives the test payment. Length should be 17. For example, `qr_4lsdkfldlteskf`. + +`amount` +: `integer` Amount of the payment in Paise. + +`method` +: `string` Payment method for the test payment. Can have the following values: `card` or `upi`. + +```curl: Test Payment +curl -u : \ + -X POST https://api.razorpay.com/v1/bharatqr/pay/test \ + -H "Content-Type: application/json" \ + -d ' + { + "reference": "qr_4lsdkfldlteskf", + "amount": 500, + "method": "card" + }' +``` + +This will trigger the same webhook notifications that a live payment made via BharatQR code would. diff --git a/llm-content/payments/payment-methods/cards.md b/llm-content/payments/payment-methods/cards.md new file mode 100644 index 00000000..d5c3b619 --- /dev/null +++ b/llm-content/payments/payment-methods/cards.md @@ -0,0 +1,36 @@ +--- +title: About Card Payments +description: Accept payments from your customers using cards. Check the Payment Flow and supported card network. +--- + +# About Card Payments + +You can accept payments from your customers using debit or credit cards from all international providers. Check the various capabilities we offer with Cards: + +- [3D Secure 2.0 Authentication Protocol (3DS2)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/3ds2.0.md) +- [Saved Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md) +- [CVV-less Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/cvv-less-flow.md) + +## Payment Flow for Cards + +The diagram given below represents the payment flow for cards: + +![Payment Methods Cards Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-flow-card.jpg.md) + +## Supported Card Networks + +Razorpay supports the following card networks: +- Visa +- Mastercard +- American Express +- BAJAJ +- Maestro +- Rupay +- Diners + +## Test Cards + +Use test cards to test your payment integration before going live. The test cards simulate different payment scenarios and error conditions for all supported card networks. Know more about [Test Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md). +### Related Information + +[Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md) diff --git a/llm-content/payments/payment-methods/cards/authentication/native-otp.md b/llm-content/payments/payment-methods/cards/authentication/native-otp.md new file mode 100644 index 00000000..61277a3c --- /dev/null +++ b/llm-content/payments/payment-methods/cards/authentication/native-otp.md @@ -0,0 +1,568 @@ +--- +title: Authentication Type for Cards - Native OTP +description: Use Razorpay Native OTP to address customer payment issues such as payment failures due to low internet speeds and bank page redirects. Authenticate card payments using OTPs. +--- + +# Authentication Type for Cards - Native OTP + +Use Razorpay's Native OTP feature to provide an efficient and simple OTP flow to your customers, reduce payment failures due to low internet speeds and avoid payment failure due to redirects to bank pages. + +## Prerequisites + +Before implementing the Native OTP feature, check if the following requirements are in place: +1. Verify that you are PCI-compliant to accept and process the customer's card details. Know more about [PCI compliance](https://www.pcicomplianceguide.org/faq/#1). The compliance certificate should be updated as per the yearly renewal cycle. +2. Raise a request with [Razorpay Support](https://razorpay.com/support#request) to enable this feature on your Checkout page. +3. Understand the [payment process](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md). + +## Create Workflow for Native OTP + +1. [Creating a Razorpay order](#1-create-a-razorpay-order) +2. [Validating authentication type](#2-validate-authentication-type) +3. [Creating a payment](#3-create-a-payment) +4. [OTP Authentication](#4-otp-authentication) +5. [Payment Verification](#5-verify-the-payment) + +> **INFO** +> +> +> **API Authentication** +> +> Razorpay APIs are authenticated using **Basic Auth** method, where `your_key_id` is the **Username** and `your_key_secret` is the **Password**. You can access your API keys from the Dashboard. +> + +### 1. Create a Razorpay Order + +A **Razorpay Order** creates an Order ID corresponding to the unique order (transaction ID or checkout ID) created at your end. The Order ID is tied to all the payments made against that particular order. + +/orders + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The order_id received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "partial_payment": true, + "first_payment_min_amount": 23000 +}' +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => 'INR'// [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies).) +]); +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", "INR"); +Order order = client.Order.Create(options); +```ruby: Ruby +options = amount: 50000, currency: 'INR', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "INR", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +#### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Response Parameters + +Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) table. + +#### Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +### 2. Validate Authentication Type + +Validate the authentication type to set the value of `auth_type` in [payment creation](#3-create-a-payment). The transaction will fail if the value of `auth_type` is sent as `otp` for a BIN, which is not validated successfully. + +The following API endpoint allows Razorpay to verify the OTP-based authentication flow for a specific card: + +/payment/flows + +```curl: Example Request +curl -X POST https://api.razorpay.com/v1/payment/flows \ +-u : \ +-H 'content-type: application/json' +-d '{ + "card_number": "4242424242424242" +}' +```json: Validation Success +{ + "otp": true, + "pin": true/false +} + +```json: Validation Failure +{ + [] +} +``` + +### 3. Create a Payment + +Use the following API to create a payment using the Order ID. + +/payments/create/redirect + +#### Request Parameters + +`currency` _mandatory_ +: `string` The currency of the payment amount. Pass `INR` for Indian rupees as currently, we do not support foreign currencies. + +`amount` _mandatory_ +: `integer` The payment amount in **paise**. For example, if the payment amount is ₹195.55, pass `19555`. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created in [step 1](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/authentication/native-otp.md#creating-the-workflow-for-native-otp). + +`email` _mandatory_ +: `string` The customer's email address. For example, `gaurav.kumar@example.com`. + +`contact` _mandatory_ +: `string` The customer's contact number. For example, `+919123456780`. + +`method` _mandatory_ +: `string` The payment method selected by the customer. The only allowed value is `card`. + +`card[number]` _mandatory_ +: `integer` Unformatted card number. This field is required if value of `method` is `card`. Use one of our [ test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md) to try out the payment flow. + +`card[name]` _mandatory_ +: `string` The name of the cardholder. + +`card[expiry_month]` _mandatory_ +: `integer` The expiry month of the card in *MM* format. For example, `01` for January and `12` for December. + +`card[expiry_year]` _mandatory_ +: `integer` Expiry year for card in *YY* format. For example, `22` for 2022. + +`card[cvv]` _mandatory_ +: `integer` 3-digit code on the back of Master or Visa card or 4-digit code on the front of the AMEX card. + +`notes` _optional_ +: `object` A set of key-value pairs that you can attach to an entity. Maximum 15 pairs. Maximum 256 characters for each pair. This can be useful for storing additional information about the entity. + +`ip` _mandatory_ +: `string` The client's IP address. + +`referer` _mandatory_ +: `string` The client's referer URL. + +`user_agent` _mandatory_ +: `string` The client's User-Agent. + +[`auth_type`](#2-auth_type-verification) _mandatory_ +: `string` Indicates the authentication type for this integration method. + Defaults to `3ds`. Upon [successful validation](#2-validate-authentication-type), pass `auth_type=otp`. + @// Passing `auth_type=otp` when the [validation](#2-validate-authentication-type) has failed, will result in payment failure. + +#### Response Parameters + +`razorpay_payment_id` +: `string` Specifies the unique identifier of a payment. A sample payment ID: `pay_29QQoUBi66xm2f` + +`next` +: `array` Lists the subsequent payment actions available: `otp_submit` and `otp_resend` [Know more about `next` actions.](#4-otp-authentication) + +The following example request creates a payment of ₹50: + +> **INFO** +> +> +> **Handy Tips** +> +> The payment data is passed in `form-urlencoded` format, which ensures that nested keys are correctly passed. +> + +```cURL: Example Request with auth_type +curl -X POST \ +'https://api.razorpay.com/v1/payments/create/redirect' \ +-u : \ +-H "Content-Type: application/x-www-form-urlencoded" \ +-d 'amount=5000¤cy=INR&contact=9123456780&email=gaurav.kumar@example.com&method=card&card[number]=4386289407660153&card[name]=Gaurav%20Kumar&card[expiry_month]=01&card[expiry_year]=17&card[cvv]=111&user_agent=Razorpay%20SDK&ip=1.160.10.240&referer=https://www.example.com&auth_type=otp' +```json: Response with OTP +{ +"next": [ +"otp_submit", +"otp_resend" +], +"razorpay_payment_id": "pay_Bf9GPSOEQg0NTi" +} +@// { +@// "razorpay_payment_id": "pay_29QQoUBi66xm2f", +@// "razorpay_order_id": "order_9A33XWu170gUtm", +@// "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d", +@// "next": ["otp_submit", "otp_resend"] +@// } +``` + +#### Error Responses + +```json: Normal Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Your payment was not successful as you have an invalid expiry date. To pay successfully try adding the right details", + "source": "customer", + "step": "payment_authentication", + "reason": "incorrect_card_expiry_date", + "metadata": {} + } +} +```json: Feature Unavailable for the BIN +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The otp authentication type is not applicable on the given card", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": { + "payment_id": "pay_IAnwCdYqXiBjZ7" + } + } +} +``` + +**Know More**: Know more about [API error codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md#error-response). + +### 4. OTP Authentication + +After entering the OTP, the customer can perform either of the two actions, as described in the `next` parameter: + +1. [OTP Submit](#otp-submission) +2. [OTP Resend](#otp-resend) + +`next` +: `array` This array specifies the available actions as a comma-separated list. It can have the following predefined values: + + - `otp_submit` + - `otp_resend` + + In cases where two-factor authentication is not required or not available, the `next` object will not be returned in the response. + +`[next]otp_submit` +: `string` This value is consumed to display OTP submit option. + +`[next]otp_resend` +: `string` This value is consumed as a retry option for OTP submission. If the parameter is not present, the OTP resend option cannot be shown to the customers. The resend option may be unavailable after a certain number of retries. The bank determines the number of retries and not Razorpay. + +#### OTP Submission + +The customer needs to submit the OTP using your application frontend as part of the payment authentication process. + +For card payments, the customer receives the OTP using their preferred notification medium - SMS or email. + +> **INFO** +> +> +> **Handy Tips** +> +> Do not perform any validation on the length of the OTP since this can vary across banks. The OTP should not be blank. +> + +The OTP received must be submitted to the following endpoint: + +payments/:id/otp/submit + +```curl: Curl +curl -X POST \ +'https://api.razorpay.com/v1/payments/pay_29QQoUBi66xm2f/otp/submit' \ +-u : \ +-H "Content-Type: application/x-www-form-urlencoded" \ +-d 'otp=123456' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_29QQoUBi66xm2f"; + +String jsonRequest = "{\n" + + " \"otp\": \"123456\",\n" + + "}"; + +JSONObject requestJson = new JSONObject(jsonRequest); + +Payment payment = razorpayclient.payments.otpSubmit(paymentId, requestJson); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "otp": "123456" +} + +paymentId = "pay_29QQoUBi66xm2f"; + +Razorpay::Payment.otp_generate(paymentId, para_attr) + +```csharp: .NET + +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("otp", "123456"); + +Payment payment = client.Payment.OtpSubmit(paymentId, paymentRequest); + +```json: Success +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +```json: Failure +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Payment processing failed because of incorrect OTP", + "source": "customer", + "step": "payment_authentication", + "reason": "incorrect_otp", + "metadata": { + "payment_id": "pay_IAnpZpkZriWX1T" + }, + "action": "RETRY" + }, + "next": [ + "otp_submit", + "otp_resend" + ] +} +``` + +Know more about [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md#cards). + +#### OTP Resend + +For certain situations, the customers may need to re-enter the OTP sent to them. The card issuing bank sets the number of retries the customer is allowed to re-enter the OTP. + +payments/:id/otp/resend + +```curl: Curl +curl -X POST \ +'https://api.razorpay.com/v1/payments/pay_29QQoUBi66xm2f/otp/resend' \ +-u : +-H "Content-Type: application/x-www-form-urlencoded" + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_29QQoUBi66xm2f"; + +Payment payment = razorpayclient.payments.otpResend(paymentId); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_29QQoUBi66xm2f"; + +Razorpay::Payment.otp_resend(paymentId) + +```csharp: .NET + +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.OtpResend(paymentId); + +```json: Response with OTP +{ + "next": [ + "otp_submit", + "otp_resend" + ], + "razorpay_payment_id": "pay_Bf9GPSOEQg0NTi" +} + +```json: Success +{ + "next": ["otp_submit", "otp_resend"], + "razorpay_payment_id": "pay_29QQoUBi66xm2f" +} +``` + +### 5. Verify the Payment + +After the payment process is complete, Razorpay makes a `POST` request to the `callback_url` about whether the payment was a **success** or a **failure**. + +You can easily verify the payment signature using our SDKs: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_9A33XWu170gUtm"); +options.put("razorpay_payment_id", "pay_29QQoUBi66xm2f"); +options.put("razorpay_signature", "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```python: Python +params = { + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +client.utility.verify_payment_signature(params_dict) + +```php: PHP +$params = [ + 'razorpay_order_id' => 'order_9A33XWu170gUtm', + 'razorpay_payment_id' => 'pay_29QQoUBi66xm2f', + 'razorpay_signature' => '9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d' +]; +Razorpay\Api\Utility::verifyPaymentSignature($params); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_9A33XWu170gUtm', + razorpay_payment_id: 'pay_29QQoUBi66xm2f', + razorpay_signature: '9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d' + } +Razorpay::Utility.verify_payment_signature(payment_response) +``` + +If `razorpay_payment_id` is returned, the payment is successfully created and verified. + +> **INFO** +> +> +> **Post-processing** +> +> A successful transaction results in the creation of the `razorpay_order_id` in your database. You can mark the corresponding transaction at your end as `paid` and notify the customer. +> + +#### Failure + +An exception is thrown in the event of unsuccessful signature verification. If the `razorpay_payment_id` field is missing in the API request, the following error is displayed in the corresponding response body: + +```html: Failure POST Request +error%5Bcode%5D=BAD_REQUEST_ERROR&error%5Bdescription%5D=Payment+failed +``` diff --git a/llm-content/payments/payment-methods/cards/authentication/native-otp/custom-integration/android.md b/llm-content/payments/payment-methods/cards/authentication/native-otp/custom-integration/android.md new file mode 100644 index 00000000..353a4c15 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/authentication/native-otp/custom-integration/android.md @@ -0,0 +1,485 @@ +--- +title: Native OTP on Android Custom Checkout +description: Integrate the Razorpay Native OTP feature with Android custom checkout to avoid customer payment issues such as payment failures due to low internet speeds and bank page redirects. +--- + +# Native OTP on Android Custom Checkout + +Razorpay Payment Gateway supports one-time passwords (OTPs) at the Checkout itself, preventing the customers from being redirected to the ACS page of their respective issuing banks. + +## Advantages + +Using the Native OTP feature, you can: +- Increase success rates by up to 4%. +- Reduce payment failures due to low internet speeds. +- Avoid failures due to redirects to bank pages. +- Offer a consistent experience on mobile and web checkout. + +## Prerequisites + +Before implementing the Native OTP feature, check the following prerequisites: + +1. Log in to the Dashboard and generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md). +2. Integrate with the [Razorpay Android Custom SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom.md). + +## Integration Steps + +**1.1** [Update Razorpay Android Custom SDK version](#11-update-razorpay-android-custom-sdk-version). + +**1.2** [Implement `CardsFlowCallback` interface in the `getCardsFlow` function](#12-implement-cardsflowcallback-interface-in-getcardsflow-function). + +**1.3** [Call `razorpay.getCardOtpData(CardsFlowCallback)` Function.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/native-otp-integration.md#13-call-razorpaygetcardotpdata-cardsflowcallback-function) + +**1.4** [Handle Success and Error Events](#14-handle-success-and-error-events). + +**1.5** [Store Field in Server](#15-store-fields-in-server). + +**1.6** [Verify Payment Signature](#16-verify-payment-signature). + +### 1.1 Update Razorpay Android Custom SDK version + +Update the [Android Custom SDK version](https://rzp-1415-prod-mobile.s3.amazonaws.com/customui/razorpay-android-3.9.3.aar). This feature is available from version 3.9.3 and above. + +### 1.2 Implement CardsFlowCallback Interface in getCardsFlow Function + +Implement the `CardsFlowCallback` interface in the `getCardsFlow` function in the payment activity. +The SDK fires the `isNativeOtpEnabled` function and determines whether the native OTP flow is enabled for the BIN. + +#### Sample Code + +```java: Java +razorpay.getCardsFlow(payload, new CardsFlowCallback() { + @Override + public void isNativeOtpEnabled(boolean isNativeOtpEnabled) { + if (isNativeOtpEnabled) { + //this generates the OTP for the card holder + razorpay.getCardOtpData(this); + }else{ + //use your normal payment flow here + sendRequest(); + } + } +```kotlin: Kotlin +razorpay.getCardsFlow(payload, object : CardsFlowCallback() { + fun isNativeOtpEnabled(isNativeOtpEnabled: Boolean) { + if (isNativeOtpEnabled) { + //this generates the OTP for the card holder + razorpay.getCardOtpData(this) + } else { + //use your normal payment flow here + sendRequest() + } + } +``` + +### 1.3 Call razorpay.getCardOtpData(CardsFlowCallback) Function + +If Native OTP is enabled for BIN, you should call the `razorpay.getCardOtpData(CardsFlowCallback)` function. The SDK then fires the `otpGenerateResponse(boolean otpGenerated)` function and confirms if the OTP was successfully sent to the customer. Based on this information, you can display the generated OTP UI to the customer. + +After entering the OTP, the customer can either: +- **Submit OTP** + + The customer needs to submit the OTP for authenticating the payment. The customer receives the OTP through your application frontend. For card payments, the customer receives the OTP via their preferred notification medium, SMS or email. + + +> **INFO** +> +> +> **Handy Tips** +> +> Do not perform any validation on the length of the OTP since this can vary across banks. However, the OTP should not be blank. +> + +- **Request for OTP to be resent** + + There could be situations when customers have to re-enter the OTP sent to them. The bank determines the number of retries that the user is allowed. + +- **Cancel OTP** + + Cancel the payment by cancelling the OTP. + +#### Sample Code + +```java: Java +@Override + public void otpGenerateResponse(boolean otpGenerated) { + //check if otp was generated successfully and show UI + if (otpGenerated) { + //show UI to the user here + //will have submit_otp btn resend_otp btn & redirect_to_bank_page button + razorpay.otpSubmit(otpEnteredByUser,this);//for submitting OTP entered by USER, if payment was successful, the onPaymentSuccess function will be called. + razorpay.otpResend(this);//for resending the OTP to the user + razorpay.redirectToBankPage();//to open webview and redirect the user to bank page no callback for this + }else { + //otp wasn't generated call getCardOtpData again + razorpay.getCardOtpData(this); + } + } + @Override + public void otpResendResponse(boolean otpResent) { + //status response for otp_resend function, change UI accordingly + } + @Override + public void onOtpSubmitError(boolean otpSubmitError) { + //status response for error during otp submit. Wrong OTP, network issue, or timeout, this function will be called with the boolean + //change UI accordingly + } +```kotlin: Kotlin +fun otpGenerateResponse(otpGenerated: Boolean) { + //check if otp was generated successfully and show UI + if (otpGenerated) { + //show UI to the user here + //will have submit_otp btn resend_otp btn & redirect_to_bank_page button + razorpay.otpSubmit(otpEnteredByUser, this) //for submitting OTP entered by USER, if payment was successful, the onPaymentSuccess function will be called. + razorpay.otpResend(this) //for resending the OTP to the user + razorpay.redirectToBankPage() //to open webview and redirect the user to bank page no callback for this + } else { + //otp wasn't generated call getCardOtpData again + razorpay.getCardOtpData(this) + } + } + fun otpResendResponse(otpResent: Boolean) { + //status response for otp_resend function, change UI accordingly + } + fun onOtpSubmitError(otpSubmitError: Boolean) { + //status response for error during otp submit. Wrong OTP, network issue, or timeout, this function will be called with the boolean + //change UI accordingly + } +``` + +### 1.4 Handle Success and Error Events + +You must handle the payment success and error events as shown in the code sample below: + +```java: Java +try { + razorpay.submit(data, new PaymentResultListener() { + @Override + public void onPaymentSuccess(String razorpayPaymentId) { + // Razorpay payment ID is passed here after a successful payment + } + + @Override + public void onPaymentError(int code, String description) { + // Error code and description is passed here + } + }); + +} catch (Exception e) { + Log.e(TAG, "Error in submitting payment details", e); +} +```kotlin: Kotlin + override fun onPaymentError(errorCode: Int, errorDescription: String?) { + webView?.visibility = View.GONE + outerBox?.visibility = View.VISIBLE + Toast.makeText(this@PaymentOptions, "Error $errorCode : $errorDescription",Toast.LENGTH_LONG).show() + Log.e(TAG,"onError: $errorCode : $errorDescription") + } + + /** + * Is called if the payment was successful + * You can now destroy the webview + */ + override fun onPaymentSuccess(rzpPaymentId: String?) { + webView?.visibility = View.GONE + outerBox?.visibility = View.VISIBLE + Toast.makeText(this@PaymentOptions, "Payment Successful: $rzpPaymentId",Toast.LENGTH_LONG).show() + } + +``` + +> **INFO** +> +> +> +> **Handy Tips** +> +> To reuse the Razorpay Checkout web integration inside a web view on Android or iOS, pass a [callback_url](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/callback-url.md) along with other checkout options to process the desired payment. +> + +#### Use `PaymentResultWithDataListener` + +You have the option to implement `PaymentResultListener` or `PaymentResultWithDataListener` to receive callbacks for the payment result. + +- `PaymentResultListener` provides only payment_id as the payment result. +- `PaymentResultWithDataListener` provides additional payment data such as email and contact of the customer, along with the `order_id`, `payment_id`, `signature` and more. + +```java: Java +razorpay.submit(data, new PaymentResultWithDataListener() { + @Override + public void onPaymentSuccess(String razorpayPaymentId, PaymentData paymentData) { + // Razorpay payment ID and PaymentData passed here after a successful payment + } + + @Override + public void onPaymentError(int code, String description) { + // Error code and description is passed here + } + }); + +} catch (Exception e) { + Log.e(TAG, "Error in submitting payment details", e); +} +``` + +### Step 5: Store the Fields in Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +### Step 6: Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +## Test the Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). diff --git a/llm-content/payments/payment-methods/cards/corporate-cards.md b/llm-content/payments/payment-methods/cards/corporate-cards.md new file mode 100644 index 00000000..18f725d1 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/corporate-cards.md @@ -0,0 +1,66 @@ +--- +title: Corporate Card Payments +description: Know how you can accept payments from customers using corporate cards at Razorpay Checkout. +--- + +# Corporate Card Payments + +Using Razorpay, you can accept payments from Corporate Credit and Debit Cards by default. We support all types of Corporate Cards with different types of issuers and networks. + +## What is a Corporate Card + +A Corporate Card often called a Business Card, is a card issued by a bank to a business. It helps create a seamless reimbursement experience for SaaS subscriptions, cloud services and marketing expenses. Corporate Cards make compliance and reporting much more effortless. + +## How it Works + +A Corporate Card works like any other card. It can be used to make online payments and purchases at a point of sale (PoS) machine. + +Corporate Cards usually have higher transaction limits (sometimes up to ₹50 lacs). This means they have a higher transaction processing fee. The default pricing for Corporate Cards is 3% per transaction. Contact your Razorpay Sales SPOC for more details. + +### FAQs + + +### 1. How to enable Corporate Cards on my account? + + Corporate cards are enabled by default. However, when testing your integration, if you see the error message **Corporate Card is not allowed for this payment**, contact Razorpay Support from the Dashboard. + + + +### 2. How do I make an online payment using a Corporate Card? I do not see a Corporate Card option at my checkout. + + There is no separate option for Corporate Cards. To make online payments using Corporate Cards, select the **Card** option at the checkout, enter your card details and proceed to make the payment. + + + +### 3. How do I make an online payment using a Corporate Card? I do not see a Corporate Card option at my checkout. + + There is no separate option for Corporate Cards. To make online payments using Corporate Cards, select the **Card** option at the checkout, enter your card details and proceed to make the payment. + + + +### 4. What is the default pricing for Corporate Cards? + + The default pricing for Corporate Cards is 3% per transaction. Contact your Razorpay sales SPOC for more details. + + + +### 5. What Corporate Card networks does Razorpay support? + + Razorpay supports all types of Corporate Credit Cards with different types of issuers and networks. Generally, you will see Visa, Mastercard and American Express Corporate Cards. + + + +### 6. How do I disable Corporate Cards on my account? I do not want to accept payments using Corporate Cards. + + You can disable payments from Corporate Cards if you want. Contact Razorpay Support from the Dashboard and ask them to disable Corporate Cards for your account. + + + +### 7. How do I check if a payment was made using a Corporate Card or a regular card? + + You can check this on the Dashboard. + 1. Log in to the Dashboard. + 2. Navigate to **Transactions** → **Payments**. + 3. Click the **Payment Id** for which you want to check the details. + 4. Check the **Payment Method** in the right panel. If it says **Business**, it is a Corporate Card. If it says **Consumer**, it is a regular card. + ![Corporate Card payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/corporate_card.jpg.md) diff --git a/llm-content/payments/payment-methods/cards/dynamic-currency-conversion.md b/llm-content/payments/payment-methods/cards/dynamic-currency-conversion.md new file mode 100644 index 00000000..e5045ca3 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/dynamic-currency-conversion.md @@ -0,0 +1,37 @@ +--- +title: Dynamic Currency Conversion +description: Know how to allow the cardholder to convert international payments in INR (or other currency) to cardholders’ home currency via Razorpay Checkout. +--- + +# Dynamic Currency Conversion + +Razorpay Dynamic Currency Conversion (DCC) feature is available on Standard, Custom, and S2S Integrations. It allows the cardholders to pay in their native currency or any other currency. The customers can view the exact amount charged to them before making the transaction. + +> **WARN** +> +> +> **Watch Out!** +> +> - Dynamic Currency Conversion transactions do not support partial payments. +> - Dynamic Currency Conversion (DCC) is not available for [Razorpay Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer.md). +> + +## Advantages + +- **Currency Conversion** + + This feature allows the cardholder to convert international payments in INR (or other currency) to cardholders' home currency. +- **Transparency** + + The users know the amount that they are going to make beforehand. +- **Improved Success Rates** + + This improves the success rates in currency conversion transactions as the users have complete visibility about the actual amount they will pay before making the payment. +- **Pricing** + + There is no additional cost for this feature. + +### Related Information + +- [DCC Custom Checkout Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/dynamic-currency-conversion/custom-integration.md#dcc-custom-checkout-payment-flow) +- [DCC S2S Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/dynamic-currency-conversion/s2s-integration.md#dcc-s2s-payment-flow) diff --git a/llm-content/payments/payment-methods/cards/dynamic-currency-conversion/custom-integration.md b/llm-content/payments/payment-methods/cards/dynamic-currency-conversion/custom-integration.md new file mode 100644 index 00000000..e6bde1c4 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/dynamic-currency-conversion/custom-integration.md @@ -0,0 +1,45 @@ +--- +title: Dynamic Currency Conversion on Custom Checkout Integration +description: Know how to allow the cardholder to convert international payments in INR (or other currency) to cardholders home currency via Custom Checkout Integration. +--- + +# Dynamic Currency Conversion on Custom Checkout Integration + +Razorpay Dynamic Currency Conversion (DCC) feature is available on Custom Checkout. It allows the cardholders a choice to pay in their native currency or any other currency. The customers can view the exact amount that will be charged to them before making the transaction. + +The feature is available by default for all the Custom Checkout integrations. + +> **WARN** +> +> +> **Watch Out!** +> +> Dynamic Currency Conversion (DCC) is not available for [Razorpay Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer.md). +> + +## Video Tutorial + +Watch this video to integrate Custom Checkout using the Dynamic Currency Conversion feature. + +[Video content] + +## DCC Custom Checkout Payment Flow + +1. The cardholder selects the payment method on the custom checkout page and tries to make the payment. + +2. If the card is a non-INR card, the user is directed to the Dynamic Currency Conversion screen to change the currency. + +3. The users also get the option to change the currency as per their choice. Based on the selected currency, the amount is displayed. The user can check the amount in the selected currency and proceed to make the payment. + +> **INFO** +> +> +> **Handy Tips** +> +> DCC Custom Checkout payment flow is similar to the [S2S payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/dynamic-currency-conversion/s2s-integration.md). +> + +### Related Information + +- [DCC S2S Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/dynamic-currency-conversion/s2s-integration.md) +- [International Payment Support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md) diff --git a/llm-content/payments/payment-methods/cards/dynamic-currency-conversion/s2s-integration.md b/llm-content/payments/payment-methods/cards/dynamic-currency-conversion/s2s-integration.md new file mode 100644 index 00000000..abbf928c --- /dev/null +++ b/llm-content/payments/payment-methods/cards/dynamic-currency-conversion/s2s-integration.md @@ -0,0 +1,38 @@ +--- +title: Dynamic Currency Conversion on S2S Integration +description: Know how to allow the cardholder to convert international payments in INR (or other currency) to cardholders’ home currency via S2S Integration. +--- + +# Dynamic Currency Conversion on S2S Integration + +You can use Dynamic Currency Conversion (DCC) to offer international cardholders a choice to pay in the local currency or their home currency. The customers can view the exact amount they will be charged before making the transaction. This feature is enabled by default for all S2S integrations. + +For example, a customer whose home currency is INR and if the amount is displayed in USD, an INR equivalent of the USD amount is displayed to the user before making the payment. + +> **WARN** +> +> +> **Watch Out!** +> +> Dynamic Currency Conversion (DCC) is not available for [Razorpay Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer.md). +> + +## DCC S2S Payment Flow + +Below is the Dynamic Currency Conversion S2S payment flow: + +1. The cardholder selects the payment method on the S2S checkout page and tries to make the payment. + ![select payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-dynamic-currency-conversion-select-payment.jpg.md) +2. If the card is a non-INR card, the user is directed to the Currency Conversion screen to change the currency. + ![currency conversion screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-dynamic-currency-conversion-currency-conversion-screen.jpg.md) +3. The users also get the option to change the currency as per their choice. Based on the selected currency, the amount is displayed. The user can check the amount in the selected currency and proceed to make the payment. + ![conversion screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-dynamic-currency-conversion-conversion.jpg.md) + +### Disable Dynamic Currency Conversion + +The DCC feature is available by default for all the S2S integrations. Please contact the [Support Team](https://razorpay.com/support/#request) if you want to disable it. + +### Related Information + +- [DCC Custom Checkout Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/dynamic-currency-conversion/custom-integration.md) +- [International Payment Support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md) diff --git a/llm-content/payments/payment-methods/cards/faqs.md b/llm-content/payments/payment-methods/cards/faqs.md new file mode 100644 index 00000000..30e55782 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/faqs.md @@ -0,0 +1,77 @@ +--- +title: Payment Methods | Cards - FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about card as a payment method at Razorpay Checkout. +--- + +# Frequently Asked Questions (FAQs) + +### 1. What types of cards are supported by Razorpay for payments? + + Razorpay supports payments through multiple types of cards including credit, debit, and prepaid cards. It accepts both domestic and international card transactions. + + + +### 2. What card networks are supported by Razorpay? + + Razorpay supports major card networks such as Visa, Mastercard, American Express (AMEX), BAJAJ, Maestro, Rupay, and Diners. + + + +### 3. How secure is it to process card payments through Razorpay? + + 3D Secure and OTP-based authentication for card payments, ensuring safe transactions for businesses and customers. + + + +### 4. What is Tokenisation? + + Tokenisation is the process by which the original card number / Primary Account Number (PAN) is replaced with a surrogate value called a **token**. Razorpay’s RBI-compliant TokenHQ solution allows cardholders to tokenise their cards and securely process transactions through the tokenised cards. + + + +### 5. What is the saved card functionality in Razorpay? + + Razorpay allows customers to securely save their card details for faster future transactions. Saved card details are tokenised to ensure safety and can be used across various transactions without re-entering card information. + + + +### 6. How does Razorpay handle recurring payments via cards? + + Razorpay offers subscription or recurring payments through cards, enabling businesses to automate regular transactions. This is particularly useful for businesses offering subscription-based services. + + + +### 7. Does Razorpay support partial refunds for card transactions? + + Yes, Razorpay allows businesses to issue full and partial refunds for card transactions. + + + +### 8. Are there any limits on the transaction amount for card payments through Razorpay? + + The transaction limits for card payments depend on the customer's card issuer and the business' agreement with Razorpay. + + + +### 9. Does Razorpay offer integration for card payments with websites and mobile apps? + + Yes, Razorpay provides APIs and SDKs to integrate card payment options seamlessly into websites, mobile apps, and checkout pages. + + + +### 10. Can Razorpay handle declined card transactions? + + Yes, Razorpay provides detailed responses and logs for declined transactions, helping businesses understand the reasons and take corrective action. + + + +### 11. How can a business enable card payments on Razorpay? + + Businesses can enable card payments by signing up with Razorpay, completing the KYC process, and configuring the card payment option in the [dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md#request-for-payment-methods). + + + +### 12. Is there support for EMI payments through cards on Razorpay? + + Yes, Razorpay offers the ability to accept EMI payments through credit cards, allowing customers to split high-value transactions into installments. diff --git a/llm-content/payments/payment-methods/cards/features/3ds2.0.md b/llm-content/payments/payment-methods/cards/features/3ds2.0.md new file mode 100644 index 00000000..76dbcadf --- /dev/null +++ b/llm-content/payments/payment-methods/cards/features/3ds2.0.md @@ -0,0 +1,46 @@ +--- +title: 3D Secure 2.0 Authentication Protocol (3DS2) +description: Understand 3DS2, the payment flow and the supported authentication channels. +--- + +# 3D Secure 2.0 Authentication Protocol (3DS2) + +3DS2 is an authentication protocol, the successor of 3DS1, that enables businesses and payment providers to send additional information (such as customer device or browser data) to verify the transaction's authenticity. This helps the customer's bank to evaluate the transaction for risk and decide on the payment flow. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Razorpay offers 3DS2 support for international card payments only. +> +> - Razorpay supports [3DS2 transactions on S2S](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/cards/3ds2.0.md). +> + +## Supported Authentication Channels + +Razorpay supports the 3DS2 protocol on two authentication channels: browser and app/SDK. + +- **Browser**: All transactions, even those made from the native app are routed through the browser. This flow is available by default for all Standard and Custom Checkout users. No additional integration is needed. + +- **App/SDK**: Integrating with SDK increases the chances of higher success rates. It also offers a better user experience compared to the browser. Please contact [Razorpay support](https://razorpay.com/support/) to know more. + + to know more. + +## 3DS2 Payment Flow + +Given below is a diagram that explains the 3DS2 flow: + +![Cards 3DS2 Protocol](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-3ds-flowchart.jpg.md) + + +### Advantages + + - 3DS2 provides an extra layer of security in card-not-present online transactions. + - It provides a better customer experience by improving customer reliability and trust. + - Businesses can choose to process all payments as browser payments even if they are initiated from your native app. Integrating the SDK and routing them as app-based payments provides a better customer experience and higher success rates for international payments. + - The 3DS2 protocol allows businesses to pass additional customer and device data to issuing banks to reduce payment authentication failures. + - As compared to 3D Secure 1, 3D Secure 2 introduces Frictionless authentication and Challenge authentication flow. + - With Frictionless authentication flow, the transaction is authenticated without any additional input from the customer. + - 3DS2 enhances internal risk procedures to assess and score each transaction in real time. diff --git a/llm-content/payments/payment-methods/cards/features/card-sync.md b/llm-content/payments/payment-methods/cards/features/card-sync.md new file mode 100644 index 00000000..e4bc39bb --- /dev/null +++ b/llm-content/payments/payment-methods/cards/features/card-sync.md @@ -0,0 +1,112 @@ +--- +title: CardSync by Razorpay +description: Power cards saved on third-party apps like CRED on your Razorpay Checkout using secure device tokenisation. Boost conversions with seamless payments. +--- + +# CardSync by Razorpay + +CardSync is an industry-first payment solution that eliminates checkout friction. CardSync allows customers to use cards they have saved on popular apps like CRED directly on the Razorpay Checkout, with just one tap. Customers can complete payments instantly using their pre-saved card credentials instead of manually entering their 16-digit card number, CVV and expiry date every time. + +This streamlined experience is built on VISA's secure device tokenisation framework and fully complies with RBI guidelines for device tokenisation, ensuring both convenience and security. + +## Advantages +Here are some advantages of CardSync: + + + - **Reduced cart abandonment**: Eliminate payment friction that drives customers away. + - **Zero setup cost**: Included at no additional charge with your Razorpay account. + - **Instant implementation**: Automatically enabled for all Standard Checkout integrations. + - **Enhanced customer experience**: Build loyalty through effortless repeat transactions. + - **Link once, pay anywhere**: Link your card once on any Razorpay business and use it seamlessly across all instances of Razorpay Standard Checkout. + + + - **One-tap payments**: Skip entering 16-digit card numbers, CVV and expiry details every time. + - **Universal compatibility**: Saved cards work seamlessly across the entire Razorpay ecosystem. + - **Bank-grade security**: Secured by Visa's advanced tokenisation technology. + - **Zero friction setup**: Leverages cards already stored in trusted platforms like CRED. + - **Always synchronised**: Card updates in CRED automatically reflect across all businesses. + + +## Prerequisites +Your customers can use CardSync if they: + +1. Have an Android device with a Chromium browser for mobile web (iOS support coming soon). +2. Have the CRED app installed. +3. Have at least one VISA card saved in CRED (Mastercard support coming soon). +4. Have given permission in CRED to share information with partners. + +## Getting Started + +**Who Can Use CardSync**: All Razorpay businesses are eligible to use CardSync. The feature is currently enabled for Standard Checkout, with SDK and server-to-server support coming soon. + +## How CardSync Works + +Here is how CardSync works and what your customers experience: + + +### Setting Up (One Time Only) + + 1. Customer saves their card in CRED and provides consent to share information with Razorpay partners. + ![CardSync First Time User Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cardsync-ftu.gif.md) + 2. The card is safely stored on their Android device following banking rules. + 3. They are ready to shop anywhere that uses Razorpay. + + + +### Easy Shopping + + 1. At checkout, their saved CRED cards are shown (with their permission). + ![Select Your Saved Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cardsync-checkout-cardviacred.jpg.md) + 2. Card details are automatically displayed, so no typing is required. + 3. Customers tap to select their card and complete payment instantly. + + +Given below is a complete end-to-end flow about how customers can use CardSync: + +![CardSync Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cardsync-video-pm.gif.md) + +### Setup Process + +**For Standard Checkout Businesses**: CardSync is enabled automatically, so no changes are needed on your end. If it is not enabled for your account, contact your Account Manager for assistance. + +**SDK and Server-to-Server Businesses**: Support for SDK and S2S will be available soon. Minor code changes will be required for integration. The [Razorpay Support team](https://razorpay.com/support/) is available to help with implementation. + +**Cost**: CardSync is completely free for all Razorpay businesses. There are no additional costs for businesses who already accept card payments. + +## FAQs (Frequently Asked Questions) + +Here are some faqs regarding the CardSync Feature: + + +### 1. Which businesses are eligible for CardSync? + + All Razorpay businesses are eligible for this feature. As of now, it is enabled for Standard Checkout, with support for SDK and S2S following soon. + + + +### 2. How can businesses enable device tokenisation for their customers? + + Standard Checkout businesses have this feature enabled automatically. If it is not enabled, contact your Account Manager. + + + +### 3. What are the customer requirements for CardSync? + + Customers need an Android device with the CRED app installed, at least one saved card on CRED, must be logged into CRED using the same phone number as checkout, and must have given consent on the CRED app to share their information with partners. + + + +### 4. What types of payments does CardSync support? + + CardSync currently supports one-time payments only. + + + +### 5. What is the cost of CardSync for businesses? + + It is completely free. There is no additional cost for Razorpay businesses with the card payment method enabled. + + +### Related Information + +[Introducing CardSync: Razorpay’s Ecosystem-wide Saved Card Solution](https://razorpay.com/blog/introducing-razorpays-ecosystem-wide-tokenization-with-cardsync/) diff --git a/llm-content/payments/payment-methods/cards/features/cvv-less-flow.md b/llm-content/payments/payment-methods/cards/features/cvv-less-flow.md new file mode 100644 index 00000000..9b007328 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/features/cvv-less-flow.md @@ -0,0 +1,279 @@ +--- +title: CVV-less Flow for Card Payments +description: Save customer card details as tokens and enable CVV-less payment flows for customers via Razorpay. +--- + +# CVV-less Flow for Card Payments + +You can offer CVV-less payments for saved cards and let your customers complete a payment without the card CVV. CVV-less card payments are simple, fast and secure, and do not require the customers to remember the CVV. *Offering CVV-less saved card flows to your customers can increase the conversion rate by 4%.* + +We encourage the businesses to remove the CVV box on the checkout page. If you are live on Razorpay Standard Checkout, the UI changes reflect automatically. The customer can choose their saved cards as their preferred payment option and experience a faster transaction. + +![CVV Less Card Payment Flow GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pm-cvv-otp-less.gif.md) + +> **INFO** +> +> +> **Handy Tips** +> +> CVV-less payments on RuPay is an on-demand feature. +> + +## Frequently Asked Questions (FAQs) + + +### 1. How can I handle the CVV field for Razorpay payments with saved cards? + + The CVV field is optional by default for saved card payments on all networks. To implement this change, you can skip passing the CVV field in the payment request to this field to Razorpay. + + + +### 2. Does this mean I no longer need to accept CVV from customers? + + Yes. You need to make the necessary UI changes to stop accepting CVV from your customers on saved card payments only. + + + +### 3. Do all networks support CVV-less flow? + + CVV-less flow is supported for tokenised payments on all networks: Visa, Mastercard, RuPay, Amex and Diners. + + + +### 4. Which card issuers support CVV-less payments? + + Besides Rupay cards, all issuers support CVV-less payments on other networks. For Rupay, given below is the list of supported issuers: + + + S No. | Issuing Bank Name + --- + 1 | AXIS BANK + --- + 2 | ICICI BANK + --- + 3 | KOTAK MAHINDRA BANK + --- + 4 | STATE BANK OF INDIA + --- + 5 | UNION BANK OF INDIA + --- + 6 | BANK OF BARODA + --- + 7 | HDFC BANK + --- + 8 | CANARA BANK + --- + 9 | IDBI BANK + --- + 10 | THE FEDERAL BANK + --- + 11 | UCO BANK + --- + 12 | CENTRAL BANK OF INDIA + --- + 13 | IDFC Bank + --- + 14 | BANDHAN BANK + --- + 15 | KARNATAKA BANK + --- + 16 | YES BANK LIMITED + --- + 17 | THE BHARAT COOP BANK + --- + 18 | INDIA POST PAYMENTS BANK + --- + 19 | UTKARSH SMALL FINANCE BANK + --- + 20 | CITIZEN CREDIT COOPERATIVE BANK + --- + 21 | SARASWAT COOPERATIVE BANK + --- + 22 | BARODA UP BANK + --- + 23 | TAMILNAD MERCANTILE BANK + --- + 24 | THE TAMILNADU STATE APEX COOP BANK + --- + 25 | THE KALUPUR COMMERCIAL CO OP BANK + --- + 26 | THE JAMMU AND KASHMIR BANK + --- + 27 | J AND K GRAMEEN BANK + --- + 28 | THE MUNICIPAL CO OP BANK + --- + 29 | PAYTM PAYMENTS BANK + --- + 30 | KERALA GRAMIN BANK + --- + 31 | MAHARASHTRA GRAMIN BANK + --- + 32 | MIZORAM RURAL BANK + --- + 33 | CHHATTISGARH RAJYA GRAMIN BANK + --- + 34 | THE CITIZENS URBAN CO OP BANK LTD JALANDHAR + --- + 35 | RAJASTHAN MARUDHARA GRAMIN BANK + --- + 36 | SARVA HARYANA GRAMIN BANK + --- + 37 | ELLAQUAI DEHATI BANK + --- + 38 | MADHYANCHAL GRAMIN BANK + --- + 39 | ANDHRA PRAGATHI GRAMEENA BANK + --- + 40 | ASSAM GRAMIN VIKAS BANK + --- + 41 | ODISHA GRAMYA BANK + --- + 42 | BARODA GUJARAT GRAMIN BANK + --- + 43 | BARODA RAJASTHAN KSHETRIYA GRAMIN BANK + --- + 44 | KARNATAKA GRAMIN BANK + --- + 45 | JHARKHAND RAJYA GRAMIN BANK + --- + 46 | SAURASHTRA GRAMIN BANK + --- + 47 | THE KARNATAKA STATE COOPERATIVE APEX BANK + --- + 48 | THE DISTRICT CO OP BANK LTD DEHRADUN + --- + 49 | KOOKMIN BANK + --- + 50 | AMBARNATH JAIHIND COOP BANK + --- + 51 | KARNATAKA VIKAS GRAMEENA BANK + --- + 52 | RAIGANJ CENTRAL COOP BANK + --- + 53 | SANGLI URBAN COOP BANK + --- + 54 | THE KURMANCHAL NAGAR SAHAKARI BANK + --- + 55 | UTKAL GRAMEEN BANK + --- + 56 | CHAITANYA GODAVARI GRAMEENA BANK + --- + 57 | FINCARE SMALL FINANCE BANK + --- + 58 | JANA SMALL FINANCE BANK LTD + --- + 59 | THE MEGHALAYA COOPERATIVE APEX BANK + --- + 60 | ARUNACHAL PRADESH RURAL BANK + --- + 61 | INDUSIND BANK + --- + 62 | MEGHALAYA RURAL BANK + --- + 63 | TELENGANA GRAMEENA BANK + --- + 64 | ANDHRA PRADESH GRAMEENA VIKAS BANK + --- + 65 | BHOPAL COOPERATIVE CENTRAL BANK + --- + 66 | FINGROWTH COOP BANK + --- + 67 | IRINJALAKUDA TOWN CO OPERATIVE BANK + --- + 68 | JILA SAHAKARI KENDRIYA BANK MARYADIT DURG + --- + 69 | KOLAR AND CHIKBALLAPURA DISTRICT CENTRAL COOPERATI + --- + 70 | KRISHNA BHIMA SAMRUDDHI AREA BANK + --- + 71 | UTTARAKHAND GRAMIN BANK + --- + 72 | CHIKMAGALUR PATTANA SAHAKARA BANK NIYAMITHA + --- + 73 | COASTAL LOCAL AREA BANK + --- + 74 | COL RD NIKAM SAINIK SAHAKARI BANK + --- + 75 | JILA SAHAKARI KENDRIYA BANK MARYADIT DHAR + --- + 76 | JILA SAHAKARI KENDRIYA BANK MYDT AMBIKAPUR AS ISSU + --- + 77 | MALDA DISTRICT CENTRAL COOP BANK + --- + 78 | MUGBERIA CENTRAL COOP BANK + --- + 79 | THE BELLARY DISTRICT COOP CENTRAL BANK + --- + 80 | THE DAKSHIN DINAJPUR DISTRICT CENTRAL COOP BANK + --- + 81 | THE HASSAN DISTRICT COOP CENTRAL BANK + --- + 82 | THE JAIPUR CENTRAL COOP BANK + --- + 83 | THE JUNAGADH JILLA SAHAKARI BANK + --- + 84 | THE SABARKANTHA DIST CENTRAL COOP BANK + --- + 85 | THE WEST BENGAL STATE COOP BANK + --- + 86 | UTTARAKHAND STATE COOP BANK + + + + +### 5. I have integrated with Standard Checkout on Razorpay. How does this feature impact me? + + CVV-less flow will be automatically enabled for Visa, Mastercard and American Express cards on Razorpay Standard Checkout. + + + +### 6. I have integrated with Custom Checkout/S2S on Razorpay. How does this feature impact me? + + If you are integrated with Razorpay’s Custom Checkout/S2S APIs, you need not pass CVV to Razorpay for tokenised payments mandatorily. Update your integration as follows: + - Modify the UI to stop collecting CVV from customers. + - For tokenised payments, the CVV field in the cards object can either be: + - null + - empty + - removed entirely. + + +> **WARN** +> +> +> **Watch Out!** +> +> Do not pass dummy CVV values. +> + + + + +### 7. I use Juspay to route card payments to Razorpay. Can I stop sending the CVV to Juspay? + + + In this case, Juspay must send CVV-less card payments via Razorpay. We recommend you reach out to your Juspay POC. + + + +### 8. CVV validation was a mandatory step until now. Does this feature compromise my customer’s security? + + The new RBI guidelines for the **Card on File Tokenization (CoFT)** process ensure enhanced card security. Your customer’s card details are securely encrypted and stored, with access to only card networks and issuing banks. Considering this, Visa and Amex have made CVV validation optional for tokenised cards. This change is 100% compliant with all RBI regulations about card security. + + + +### 9. What is Tokenisation? + + Tokenisation is the process by which the original card number / Primary Account Number (PAN) is replaced with a surrogate value called a **token**. Razorpay’s RBI-compliant TokenHQ solution allows cardholders to tokenise their cards and securely process transactions through the tokenised cards. To know more about TokenHQ, + + + +### 10. Is this change applicable only to specific transactions, for example, less than INR 2000? + + CVV-less flows are applicable to all tokenised transactions for all networks, irrespective of the payment amount. + + + +### 11. Why is this introduced only on saved cards? Why not all cards? + + One of the ways cardholder authenticity and security are maintained for CVV-less transactions is via their consent and authorisation at the time of saving their card. Plain card payments still need to maintain cardholder security by mandating the CVV. diff --git a/llm-content/payments/payment-methods/cards/features/integrate-saved-cards.md b/llm-content/payments/payment-methods/cards/features/integrate-saved-cards.md new file mode 100644 index 00000000..c7d391a0 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/features/integrate-saved-cards.md @@ -0,0 +1,557 @@ +--- +title: Integrate Saved Cards at Standard Checkout +description: Know how to integrate saved cards at Standard Checkout. +--- + +# Integrate Saved Cards at Standard Checkout + +Check the prerequisites and the integration steps for [Saved Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md) on your standard checkout page. Know [how to integrate Saved Cards on Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards.md). + +## Prerequisites + + - Create a [Razorpay account](https://dashboard.razorpay.com/signup). + - [Generate API Keys on Dashboard.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) + + + Watch this video to know how to generate Test Mode API keys. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + + + + Watch this video to know how to generate Live Mode API keys. + +[Video: https://www.youtube.com/embed/30REpNtYSak] + + + + - [Integrate with our Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + + - [Generate API Keys on Dashboard.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) + - [Integrate with our Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + + ## Step 1: Enable Flash Checkout on Dashboard + +Flash Checkout, enabled by default on your Standard Checkout, lets your customers save their card details for future purchases. Customers can choose whether to save their card information during the payment process. All card details are stored securely using PCI-DSS-compliant technology. Know more about [Flash Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). + +## Step 2: Create a Customer + +Create a customer whose card details should be saved from the Dashboard or using the Customers API. You can create customers with basic details such as `email` and `contact` using the following endpoint: + + +### API Sample Code + + The following endpoint creates or add a customer with basic details such as name and contact details. You can use this API for various Razorpay Solution offerings. + +/customers + +```cURL: Curl + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name",""); +customerRequest.put("contact",""); +customerRequest.put("email",""); +customerRequest.put("fail_existing", "0"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} + +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->create(array('name' => '', 'email' => '','contact'=>'','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", ""); +options.Add("contact", ""); +options.Add("email", ""); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +``` + +```json: Success Response +{ + "id" : "cust_1Aa00000000004", + "entity": "customer", + "name" : "", + "email" : "", + "contact" : "", + "gstin": null, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at ": 1234567890 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } +} +``` + + Know more about [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + + + #### Request Parameters + + +`name` _optional_ +: `string` Customer's name. Alphanumeric value with period (.), apostrophe ('), forward slash (/), at (@) and parentheses are allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact ` _optional_ +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email ` _optional_ +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`fail_existing` _optional_ +: `string` Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + +`gstin` _optional_ +: `string` Customer's GST number, if available. For example, `29XAbbA4369J1PA`. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + + +## Step 3: Create an Order + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The order_id received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "partial_payment": true, + "first_payment_min_amount": 23000 +}' +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => 'INR'// [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies).) +]); +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", "INR"); +Order order = client.Order.Create(options); +```ruby: Ruby +options = amount: 50000, currency: 'INR', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "INR", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +#### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Response Parameters + +Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) table. + +#### Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +## Step 4: Enable Customer Card Saving on Checkout + +While making the payment, the customer enters card details and can choose to save them for future use. Pass `customer_id` along with the other parameters into the Checkout form. + + + + ```html: Web Standard Checkout + Pay + + + var options = { + "key": "", + "amount": "5076", + "currency": "", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "customer_id": "cust_EYqfYOviw62csf", + "order_id": "order_DBJOWzybf0sJbb", + "prefill":{ + "contact":"", + "email":"", + "name":"" + }, + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ``` + + #### Request Parameter + + `customer_id` _mandatory_ +: `string` Unique identifier of the customer. This can be obtained from the response of the previous step. + + Know more about [Checkout parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#123-checkout-options) for web integration. + + + + + To enable customers to save their cards, pass `customer_id` along with other parameters: + + ```java: Save Card + JSONObject payload = new JSONObject(); + payload.put("currency", ""); + payload.put("customer_id", "cust_4lsdkfldlteskf"); + payload.put("order_id", "order_DBJOWzybf0sJbb"); + // And the remaining fields + ``` + + #### Request Parameter + + `customer_id` _mandatory_ +: `string` Unique identifier of the customer. This can be obtained from the response of the previous step. + + Know more about [Checkout parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/integration-steps.md#141-checkout-options) for Android integration. + + + + + To enable customers to save their cards, pass `customer_id` along with other parameters. The `options` dictionary in Swift and Objective C are shown below: + + ```swift: Swift + internal func showPaymentForm(){ + let options: [String:Any] = [ + "customer_id":"cust_4lsdkfldlteskf", + "order_id":"order_DBJOWzybf0sJbb" + // And the remaining fields + ] + razorpay.open(options) + } + ```objectivec: Objective C + @"customer_id" : @"cust_4lsdkfldlteskf", + @"order_id": "order_DBJOWzybf0sJbb" + // And the remaining fields + ``` + + #### Request Parameter + + `customer_id` _mandatory_ +: `string` Unique identifier of the customer. This can be obtained from the response of the previous step. + + Know more about [other Checkout parameters for iOS integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard/integration-steps.md). + + + +## Step 5: Create Payments Using Saved Card + +Once the card is saved, customers can complete payments on repeat purchases by only entering the CVV. To fetch saved cards, pass the `customer_id` to the Checkout form. + + + Initiate payment by passing `customer_id` to Checkout along with the other options. + + ```html: Standard Checkout + Pay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", + "description": "Test Transaction", + "order_id":"order_CgmcjRh9ti2lP7", + "image": "https://example.com/your_logo", + "customer_id": "cust_EYqfYOviw62csf", + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ``` + + #### Request Parameter + + `customer_id` _mandatory_ +: `string` Unique identifier of the customer. [Created in Step 2](#step-2-create-a-customer). + + + + Initiate payment by passing `customer_id` to Checkout along with the other options. + + ```java: Initiate Payment + JSONObject payload = new JSONObject(); + payload.put("customer_id", "cust_4lsdkfldlteskf"); + // And the remaining fields + ``` + + #### Request Parameter + + `customer_id` _mandatory_ +: `string` Unique identifier of the customer. [Created in Step 2](#step-2-create-a-customer). + + + Initiate payment by passing `customer_id` to Checkout along with the other options. + + ```swift: Swift + internal func showPaymentForm(){ + let options: [String:Any] = [ + "amount": "100", + "currency": "",//Amount is in currency subunits. + "description": "purchase description", + "order_id": "order_4xbQrmEoA5WJ0G", + "image": "https://url-to-image.jpg", + "name": "business or product name", + "customer_id":"cust_4lsdkfldlteskf", + "prefill": [ + "contact": "", + "email": "" + ], + "theme": [ + "color": "#F37254" + ] + // And the remaining fields + ] + razorpay.open(options) + } + ```objectivec: Objective C + @"amount" : @(2000), + @"email" : @"", + @"contact" : @"", + @"customer_id" : @"cust_4lsdkfldlteskf" + // And the remaining fields + ``` + + #### Request Parameter + + `customer_id` _mandatory_ +: `string` Unique identifier of the customer. [Created in Step 2](#step-2-create-a-customer). + + + +## Test Integration + +Use test cards to test your payment integration before going live. The test cards simulate different payment scenarios and error conditions for all supported card networks. Know more about [Test Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#saved-cards). diff --git a/llm-content/payments/payment-methods/cards/features/saved-cards.md b/llm-content/payments/payment-methods/cards/features/saved-cards.md new file mode 100644 index 00000000..9795f968 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/features/saved-cards.md @@ -0,0 +1,143 @@ +--- +title: Save Customer Card Details at Standard Checkout +description: Store customer's card details securely as tokens to repeat transactions made by the customer. Manage saved cards. +--- + +# Save Customer Card Details at Standard Checkout + +Save your customers' card details with Razorpay using tokens. The next time the customer makes any transaction, they only need to enter the CVV of the previously saved card. This saves the customer the hassle of entering the card details multiple times for each transaction. + +Know [ how to integrate saved cards at Standard Checkout.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/integrate-saved-cards.md) + +As per the RBI guidelines, we save the cards in a tokenised form. Razorpay does not save sensitive card details and only saves the tokens. + + +### On Demand Feature - Raise a Request + + +> **INFO** +> +> +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - It takes approximately 5-7 working days to enable tokenisation for Visa, MasterCard and other networks. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + + + to get this feature activated on your account. +- It takes approximately 5-7 working days to enable tokenisation for Visa, MasterCard and other networks. + + to get this feature activated on your account. + +> **WARN** +> +> +> +> **Watch Out!** +> +> For a safer and secure payment experience, please advise your customers to log out of the Saved Cards feature after completing the payment. Doing so avoids any misuse of the card information. +> + +## Save Card Details + +To save card details, the customer: + +1. Opens Razorpay Checkout and selects **Card** as the payment method. +2. Provides the card details. +3. While making a card payment, the customer can choose to: + - Save their card details. + - Not save their card details. + + ![Saved cards checkout flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pm-saved-cards.gif.md) + +## Make Payments Using Saved Cards + +To make payment using saved cards: +1. The customers log in to the Razorpay Checkout. +2. They select **Card** as the payment method. +3. They enter the OTP sent to their phone or use their fingerprint if [Biometric Authentication](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features.md) biometric authentication is set up, then click **Verify**. +4. They select the saved card, enter the CVV and click **Pay**. +5. We recommend that customers log out of Checkout after they complete the transaction. To do this, they must: + 1. Open Razorpay Checkout. + 2. Select **Card** as the payment method. + 3. Click the drop-down list and select **Log out from all devices**. + +Your customers gain a faster and enhanced checkout experience with Razorpay OTP auto-submit. The system automatically reads the OTP received, with your customer’s consent, and submits it. It prevents errors and the users do not need to navigate or interact with additional elements to complete verification, making the process seamless. This is available by default on Android SDK and not available on iOS SDK. + +## Manage Saved Cards + +According to RBI Guidelines, all customers should have a way to delete their card details stored as tokens. Customers can manage saved tokens using our portal. + +Customers can manage their saved card details stored as tokens using our portal. + +To manage saved cards: +1. Log in to the [Portal](https://razorpay.com/flashcheckout/manage/) using their **Mobile Number** and enter your **Email**. Click **Send OTP**. +2. Enter the **OTP** sent to their mobile number for verification and click **Verify**. +3. They can choose to select a card and delete the website/app on that particular card, or they can also select a website/app and delete the card on that particular website/app. + + ![Delete/Edit a card on a particular website/app.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/delete-saved-card-choose.jpg.md) + + + +### To delete website/app on a particular card: + + 1. Select **Cards**. View a list of saved cards. + ![View list of Saved cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/delete-saved-card-choose-card.jpg.md) + 2. Select a card. For example, a customer selects a card from Paytm Payments Bank. They can now view a list of websites/apps they saved the card on earlier. + 3. Either click **Select All** or select the relevant **check box** against each website/app. + +> **INFO** +> +> +> **Handy Tips** +> +> If they cannot find a website/app, their card might be saved directly on Razorpay. They can select the **check box** to delete all the cards saved on Razorpay. +> + + 4. Click **Delete**. A pop-up appears to confirm the action, click **Yes, Delete**. + + + +### To delete card on a particular Website/App: + + 1. Select **Websites/Apps**. They view a list of websites/apps they have saved their cards on earlier. + ![View list of saved Websites/Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/delete-saved-card-website.jpg.md) + 2. Select a website/app. For example, a customer selects Zomato. They can now view the cards saved on Zomato. + 3. Either click **Select All** or select the relevant **check box** against each card. + 4. Click **Delete**. A pop-up appears to confirm the action, click **Yes, Delete**. + ![Delete confirmation.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/delete-saved-card-confirm.jpg.md) + + + + +> **WARN** +> +> +> **Watch Out!** +> +> For a safer experience, please advise your customers to log out of the **Manage saved cards portal** after deleting their cards. To logout, click **Logout** on the right below Contact Us. +> + +## Frequently Asked Questions (FAQs) + + +### 1. Why are my customers unable to access the saved cards? + + If your customers are using Google Chrome and not able to access saved cards, it may be due to their browser configurations. Go to Chrome **Settings**, select **Privacy and security** → **Cookies and other site data** → **Allow all cookies** and restart the browser. If they still cannot access them, contact our [Support team](https://razorpay.com/support/). + + ![Allow Cookies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/saved-cards-chrome-settings-3.jpg.md) + + + +### 2. My customers have accessed their saved cards on the Razorpay Checkout by providing OTP. How do they now log out? + + For a safer and secured payment experience, your customer must log out from the Razorpay Checkout by following these steps: + + 1. Open Razorpay Checkout. + 2. Select **Card** as the payment method. + 3. Click the drop-down and select **Log out from all devices**. + + This logs the customers out from the saved card feature on Checkout. diff --git a/llm-content/payments/payment-methods/cards/google-pay.md b/llm-content/payments/payment-methods/cards/google-pay.md new file mode 100644 index 00000000..b43ed70d --- /dev/null +++ b/llm-content/payments/payment-methods/cards/google-pay.md @@ -0,0 +1,74 @@ +--- +title: Google Pay Card Payments +description: Know how your customers can pay using cards saved in Google Pay on your Android app. +--- + +# Google Pay Card Payments + +Your customers can make payments on your android app using their Visa (Mastercard support will be added soon) credit and debit cards saved on Google Pay app. + +Google Pay has now added support for all Android users to add debit and credit cards to their Google Pay account. Customers can enter their card details on Google Pay, and use these cards to make payments on your app. + +> **INFO** +> +> +> **Available for Android Users only** +> +> Google Pay has launched the option of adding Cards to their Google Pay accounts only for Android users. +> + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +![Google Pay via Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-google-pay-workflow1.jpg.md) + +## Features + +A few of the salient features of Cards on Google Pay: + +- **Security** + + The sensitive card credentials are not exposed so your customers' card details are secured. +- **Faster Checkout** + + Customers do not have to manually enter card details such as CVV so checkout is faster. +- **No Redirection Flow** + + Better user experience as the customers are not redirected to their bank ACS pages to enter OTP/PIN to complete payment. +- **One Tap Payment** + + Customers enjoys one tap payment as OTP is auto-read and auto-submitted. + +## Advantages +- Reduces payment drop-offs due to customer entering wrong card details or delays in entering OTP. +- Improves user experience as customers no longer have to manually enter card details. + +## How it Works + +![](/docs/assets/images/cards-google-pay-workflow1.jpg) + +## Onboarding and Integration + +Follow these steps to sign up for a business account with Google Pay and complete integration: + +1. [Sign up](https://support.google.com/pay/business/answer/7684271?hl=en&ref_topic=7684388) for a business account with Google Pay. +2. Raise a request with Google by filling out the [Google Pay Cards Request form](https://docs.google.com/forms/d/e/1FAIpQLSd3y_j7iirZTwru3nV_be6-loztcQoda5KjsgTgx753Sr21kA/viewform). +3. Reach out to [Razorpay](https://razorpay.com/support/#request) to enable the Cards on Google Pay feature on your account. +4. Make necessary changes to your existing integration to support Pay with Google Cards: + - Android Integration + - [Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/google-pay/standard-integration.md) + - [Custom Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/google-pay/custom-integration.md) + - S2S Integration + - [JSON API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/google-pay/s2s-integration/json.md) + - [Redirect API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/google-pay/s2s-integration/redirect.md) diff --git a/llm-content/payments/payment-methods/cards/google-pay/custom-integration.md b/llm-content/payments/payment-methods/cards/google-pay/custom-integration.md new file mode 100644 index 00000000..2c06a7db --- /dev/null +++ b/llm-content/payments/payment-methods/cards/google-pay/custom-integration.md @@ -0,0 +1,613 @@ +--- +title: Google Pay Card Payments - Android Custom Integration +description: Know how to integrate Cards on Google Pay on your Razorpay Custom Integration. +--- + +# Google Pay Card Payments - Android Custom Integration + +Using this feature, you can allow your customers to make payments on your Android app using the cards they have saved on Google Pay. + +To support Google Pay Cards on your custom checkout implementation: + +1. [Show Google Pay as a separate option when Google Pay is set-up on your customer’s device](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/google-pay.md#onboarding-and-integration). +2. Trigger payment when the user clicks Google Pay Cards on your checkout. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites +- You should have already integrated [Razorpay Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom.md) on your Android app. +- Complete the onboarding process mentioned [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/google-pay.md). + +## Integration Steps + +1. [Add or update the Google SDKs](#step-1-add-or-update-the-google-sdks) +2. [Update the Razorpay Custom Integration SDK](#step-2-update-razorpay-custom-integration-sdk) +3. [Add dependencies in the Build Gradle file](#step-3-add-dependencies-in-build-gradle-file) +4. [Add metadata in the Android Manifest file](#step-4-add-metadata-in-android-manifest-file). +5. [Instantiate and initialize the Razorpay Android Custom SDK](#step-5-instantiate-and-initialize-razorpay-android-custom) +6. [Implement Orders API in your server-side](#step-6-implement-orders-api-in-your-server-side). +7. [Fetch payment methods](#step-7-fetch-payment-methods). +8. [Check if Google Pay Cards is setup on the customer's device](#step-8-check-if-google-pay-cards-is). +9. [Set up the WebView](#step-9-set-up-the-webview). +10. [Submit payment data and handle success and error events](#step-10-submit-payment-data-and-handle-success). +11. [Store fields in the server](#step-11-store-the-fields-in-the-server). +12. [Verify payment signature](#step-12-verify-payment-signature). + +### Step 1: Add or Update the Google SDKs + +You will need to integrate the Google SDK in your Android app. + +Import the SDK from our Maven repository by adding the following lines to your app's `build.gradle` file. + +```java: build.gradle +repositories { + mavenCentral() +} + +dependencies { + implementation 'com.razorpay:gpay:1.0.0' +} +``` + +### Step 2: Update Razorpay Custom Integration SDK + +Google Pay Cards is supported on Razorpay Android - Custom Checkout version 3.8.8 and higher. If you are using an older version, you will need to update the same. + +You can update the Custom Checkout version in your `build.gradle` file as shown below: + +```java: Update Razorpay Checkout version +dependencies { + ... + implementation(name:'razorpay-android-3.8.8', ext: 'aar')’) +} +``` + +### Step 3: Add Dependencies in Build Gradle File + +Add the following lines to your app's `build.gradle` file. + +```java: Dependencies +dependencies { + ... + implementation 'com.android.support:customtabs:26.1.0' + implementation 'com.google.android.gms:play-services-tasks:15.0.1' + implementation 'com.google.android.gms:play-services-wallet:18.0.0' + ... +} +``` + +### Step 4: Add Metadata in Android Manifest File + +Add the following lines inside the app’s `AndroidManifest.xml` file. + +```xml: Adds Meta Data + +``` + +### Step 5: Instantiate and Initialize Razorpay Android Custom SDK + +#### Instantiate +To instantiate Razorpay, pass a reference of your activity to the Razorpay constructor, as shown below: + +```java: Instantiate Razorpau +import com.razorpay.Razorpay +Razorpay razorpay = new Razorpay(activity); +``` + +#### Initialize +Add your Razorpay API keys to `AndroidManifest.xml`. + + +> **INFO** +> +> +> **Handy Tips** +> +> API keys should not be hardcoded in the app. It should be sent from your server-side as an app-related metadata fetch. +> + + +The sample `AndroidManifest.xml` file with auto-OTP reading feature enabled is shown below: + +```xml: AndroidManifest.xml file + + + + + +``` + +To set your API key programmatically, that is, at the runtime instead of statically defining it in your `AndroidManifest.xml`, you can pass it as a parameter to the Razorpay constructor, as shown below: + +```java: Set API Key Programmatically +Razorpay razorpay = new Razorpay(activity, "YOUR_KEY_ID"); +``` + +### Step 6: Implement Orders API in your Server-side + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The order_id received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "partial_payment": true, + "first_payment_min_amount": 23000 +}' +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => 'INR'// [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies).) +]); +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", "INR"); +Order order = client.Order.Create(options); +```ruby: Ruby +options = amount: 50000, currency: 'INR', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "INR", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +#### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Response Parameters + +Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) table. + +#### Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +The `razorpay_order_id`, returned on successful creation of the order, should be sent to the Checkout form. + +### Step 7: Fetch Payment Methods + +To get a list of available payment methods, call `getPaymentMethods`. This fetches the list of payment methods asynchronously and returns the result in JSON format in the `onPaymentMethodsReceived` callback. For the structure of the JSON result, you can refer: https://api.razorpay.com/v1/methods?key_id=`{Your_Key_ID}` + +```java: Java +razorpay.getPaymentMethods(new Razorpay.PaymentMethodsCallback() { + @Override + public void onPaymentMethodsReceived(String result) { + JSONObject paymentMethods = new JSONObject(result); + } + + @Override + public void onError(String error){ + + } + }); +}); +```kotlin: Kotlin + razorpay?.getPaymentMethods(object : PaymentMethodsCallback { + override fun onPaymentMethodsReceived(result: String?) { + /** + * This returns JSON data + * The structure of this data can be seen at the following link: + * https://api.razorpay.com/v1/methods?key_id=rzp_test_XXXXXXXXXXXXXX + * + */ + Log.d("Result", "" + result) + inflateLists(result) + } + + override fun onError(error: String?) { + Log.e("Get Payment error", error) + } + }) +``` + +Know [how to integrate the different payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods.md) using Razorpay Android Custom SDK in detail. + +### Step 8: Check if Google Pay Cards is Setup on Customer's Device + + +> **INFO** +> +> +> **Handy Tips** +> +> Ensure the Google Pay Cards feature is enabled for your account. If it is not enabled, [get in touch](https://razorpay.com/support/) with us to get it enabled on your account. +> + +Use the code given below to check if Google Pay cards are setup on your customer’s device. + +```java: Java +razorpay.isUserRegisteredOnGpay(this, new GPayCardsRegisteredListener(){ + @Override + public void isUserRegisteredOnGpay(boolean status){ + //status of user + } +} +```kotlin: Kotlin +Razorpay.isUserRegisteredOnGpay(this, object:GpayCardsRegisteredListener() { + fun isUserRegisteredOnGpay(response:Boolean) { + isUserRegisteredOnGpay = response + } +}) +``` + +You should show Google Pay cards method to your customers only when `isUserRegisteredOnGpay` returns true. + +### Step 9: Set Up the WebView + +The bank ACS pages are displayed to the user in a WebView. +You need to define a WebView in your layout and pass the reference to our SDK using `setWebView`, as shown below: + +```java: Java +webview = findViewById(R.id.payment_webview); +// Hide the WebView until the payment details are submitted +webview.setVisibility(View.GONE); +razorpay.setWebView(webview); +```kotlin: Kotlin +webView = findViewById(R.id.payment_webview) +private fun createWebView() { + razorpay?.setWebView(webView) + } +``` + +### Step 10: Submit Payment Data and Handle Success and Error Events + +Once you have received the customer's payment information, it needs to be sent to Razorpay to complete the `creation` step of the payment flow. You can do this by invoking the `submit` method. Before invoking this method, you have to make your WebView visible to the customer. The data that needs to be submitted in the form of a `JSONObject` is shown below: + +```java: Java +try { + + JSONObject data = new JSONObject(); + data.put("amount", 1000); // pass in currency subunits. For example, paise. Amount: 1000 equals ₹10 + data.put("order_id", "order_DgZ26rHjbzLLY2");//sample order_id. Generate orders using Orders API + data.put("email", "gaurav.kumar@example.com"); + data.put("contact", "9876543210"); + JSONObject notes = new JSONObject(); + notes.put("custom_field", "abc"); + data.put("notes", notes); + data.put("provider", "google_pay"); + + // Make WebView visible before submitting payment details + webview.setVisibility(View.VISIBLE); + + razorpay.submit(data, new PaymentResultListener() { + @Override + public void onPaymentSuccess(String razorpayPaymentId) { + // Razorpay payment ID is passed here after a successful payment + } + + @Override + public void onPaymentError(int code, String description) { + // Error code and description is passed here + } + }); + +} catch (Exception e) { + Log.e(TAG, "Error in submitting payment details", e); +} +```kotlin: Kotlin +try { + payload = JSONObject("{currency: 'INR'}") + payload.put("amount", "100") + payload.put("contact", "9000090000") + payload.put("email", "customer@name.com") + } catch (e: Exception) { + e.printStackTrace() + } + try { + payload.put("provider", "google_pay") + sendRequest() + } catch (e: Exception) { + e.printStackTrace() + } + } + + override fun onPaymentError(errorCode: Int, errorDescription: String?) { + webView?.visibility = View.GONE + outerBox?.visibility = View.VISIBLE + Toast.makeText(this@PaymentOptions, "Error $errorCode : $errorDescription",Toast.LENGTH_LONG).show() + Log.e(TAG,"onError: $errorCode : $errorDescription") + } + + /** + * Is called if the payment was successful + * You can now destroy the webview + */ + override fun onPaymentSuccess(rzpPaymentId: String?) { + webView?.visibility = View.GONE + outerBox?.visibility = View.VISIBLE + Toast.makeText(this@PaymentOptions, "Payment Successful: $rzpPaymentId",Toast.LENGTH_LONG).show() + } + +``` + +> **INFO** +> +> +> **Handy Tips** +> +> To reuse the Razorpay Checkout web integration inside a web view on Android or iOS, pass a [callback_url](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/callback-url.md) along with other checkout options to process the desired payment. +> + +#### Using `PaymentResultWithDataListener` + +You have the option to implement `PaymentResultListener` or `PaymentResultWithDataListener` to receive callbacks for the payment result. + +`PaymentResultListener` provides only `payment_id` as the payment result. +`PaymentResultWithDataListener` provides additional payment data, such as `email` and `contact` of the customer, along with the `order_id`, `payment_id`, `signature` and more. + +```java: Java +razorpay.submit(data, new PaymentResultWithDataListener() { + @Override + public void onPaymentSuccess(String razorpayPaymentId, PaymentData paymentData) { + // Razorpay payment ID and PaymentData passed here after a successful payment + } + + @Override + public void onPaymentError(int code, String description) { + // Error code and description is passed here + } + }); + +} catch (Exception e) { + Log.e(TAG, "Error in submitting payment details", e); +} +``` + +### Step 11: Store the Fields in the Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +### Step 12: Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). diff --git a/llm-content/payments/payment-methods/cards/google-pay/faqs.md b/llm-content/payments/payment-methods/cards/google-pay/faqs.md new file mode 100644 index 00000000..31cb1fd4 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/google-pay/faqs.md @@ -0,0 +1,40 @@ +--- +title: FAQS - Google Pay Cards +description: Commonly asked questions on making payments using cards on Google Pay. +--- + +# FAQS - Google Pay Cards + +1. #### Can customers pay using cards on Google Pay on iOS and web apps? + +No, card payments via Google Pay is supported only on Android apps. + +2. #### What are the supported card networks and issuers? + + + + Google Pay allows Visa cards issued by the following banks: + - Axis Bank. + - Kotak Mahindra Bank. + - State Bank of India. + - HDFC Bank. + - Standard Chartered Bank. + +1. #### I have already integrated with Razorpay Google Pay SDK. Do I need to re-integrate? + +No, you do not have to re-integrate. This feature works with existing integrations of Razorpay Google Pay SDK. + + +2. #### Will the `Pay via Cards on Google Pay` option appear if the customer has not added a card? + +No, the card must be saved on Google Pay before initiating the payment. Customers are not given the option to save card details while making a payment. + + +3. #### Can the customer add a card while making a payment on my app? + +No, the customer cannot add a card while making a payment. They must add the card on Google Pay before initiating the transaction on your app. + + +4. #### Does the customer need to load any money to make payment via card? + + No, as this is not a wallet, the customer does not have to load any money to make payments. diff --git a/llm-content/payments/payment-methods/cards/google-pay/s2s-integration/json.md b/llm-content/payments/payment-methods/cards/google-pay/s2s-integration/json.md new file mode 100644 index 00000000..4903159b --- /dev/null +++ b/llm-content/payments/payment-methods/cards/google-pay/s2s-integration/json.md @@ -0,0 +1,555 @@ +--- +title: Google Pay Card Payments - S2S Integration JSON API +description: Learn how to integrate Cards on Google Pay on your S2S Integration using JSON API. +--- + +# Google Pay Card Payments - S2S Integration JSON API + +Using this feature, you can allow your customers to make payments on your Android app using the cards they have saved on Google Pay. + +To support Google Pay Cards on your S2S integration: + +1. Show Google Pay as a separate option when Google Pay is set up on your customer's device (Know how to [check if Google Pay Cards is available](#step-3-check-if-gpay-cards-is-supported) on the customer's device). +2. Trigger payment when the user clicks Pay with Google Pay Cards on your checkout. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +- Sign up for a Razorpay account. +- Generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) on the Dashboard. +- Configure [payment capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#dashboard-actions) on the Dashboard. +- Follow the [Razorpay S2S Integration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v1.md). +- You must have a PCI compliance certificate to get this feature enabled on your account. + +## Integration Steps + +1. [Download the SDKs](#step-1-download-the-sdks) +2. [Add dependencies in Build Gradle file](#step-2-add-dependencies-in-build-gradle-file) +3. [Check if GPay Cards is supported](#step-3-check-if-gpay-cards-is-supported) +4. [Create an order](#step-4-create-an-order) +5. [Create a payment](#step-5-create-a-payment) +6. [Prepare payload for Initiating Payment to Google](#step-6-prepare-payload-for-initiating-payment-to) +7. [Invoke Google Pay App](#step-7-invoke-google-pay-app) +8. [Handle response from Google Pay App (optional)](#step-8-handle-response-from-google-pay-app) +9. [Verify payment status](#step-9-verify-payment-status) + +### Step 1: Download the SDKs + +Download the [Google Pay SDK](https://rzp-1415-prod-mobile.s3.amazonaws.com/android/googlepay-sdk/tez-client-api-0.9.4.aar) and add the .aar file to the application library. + +### Step 2: Add Dependencies in Build Gradle File + +Add the following lines to your app's `build.gradle` file. + +```java: Dependencies +dependencies { + ... + implementation(name:'tez-client-api-0.9.4', ext:'aar') + implementation 'com.android.support:customtabs:26.1.0' + implementation 'com.google.android.gms:play-services-tasks:15.0.1 + implementation 'com.google.android.gms:play-services-wallet:18.0.0' + ... +} +``` + +### Step 3: Check if Gpay Cards is Supported + +Show `Google Pay` as a payment option only when Google Pay is set up on your customer's device. Google Pay is set up when: +1. The Google Pay app is installed, **and** +2. Valid cards or bank accounts (UPI) are added to your customer's Google pay account. + +This will enable you to show only relevant payment methods to your users. + +Follow these steps to check if Google Pay Cards is supported: + +#### Step 3.1: Integrate the following code snippet in your app + +Given below is the code sample: + +```java: +Task task = null; +Context context = .this; +try { + task = mPaymentClient.isReadyToPay(context,jsonObjectRequest(payload)); +} catch (NoSuchAlgorithmException e) { + e.printStackTrace(); +} + +task.addOnCompleteListener(new OnCompleteListener() { + public void onComplete(Task task) { + boolean result = task.getResult(); + if (result == true) { + //Google Pay card is available & ready for transaction + } else { + //Google Pay card either isn't available or set up for usage. + } + } +}); +``` + +#### Step 3.2: Check if Google Pay Cards is set up + +Invoke the `isReadyToPay` function when you want to check if Google Pay Cards is set up on your customer's device, using the following payload: + +```java +"apiVersion": 2, +"apiVersionMinor": 0, +"allowedPaymentMethods"​:[ + { +​ "type"​:​ ​"CARD", +​ "parameters"​:​ { +​ "allowedCardNetworks"​ ​:​ ​["VISA", "MASTERCARD"], + } +​ }, + { +​ "type"​:​ ​"UPI", +​ } +] +``` + +Show `Pay with Google Pay cards` method to your end customers only when `isReadyToPay` function returns `true`. + +### Step 4: Create an Order + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The order_id received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "partial_payment": true, + "first_payment_min_amount": 23000 +}' +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => 'INR'// [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies).) +]); +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", "INR"); +Order order = client.Order.Create(options); +```ruby: Ruby +options = amount: 50000, currency: 'INR', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "INR", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +#### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Response Parameters + +Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) table. + +#### Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +The `razorpay_order_id` returned on successful creation of the order should be sent to the Checkout form. + +### Step 5: Create a Payment + +Once an order is created, your next step is to create a payment. The following API will create a payment with Pay with Google Pay Cards as the payment method: + +/payments/create/json + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ + -d '{ + "amount": "100", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EKwxwAgItmmXdp", + "provider": "google_pay", + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment" +}' +```json: Response +{ + "razorpay_payment_id": "pay_ERNEungCtXpZqM", + "next": [ + { + "action": "invoke_sdk", + "provider": "google_pay", + "provider_data": { + "google_pay": { + "card": { + "supported_networks": [ + "Visa", + "MasterCard" + ], + "gateway_reference_id": "XXXXXX" + }, + "upi": { + "payee_vpa": "gaurav.kumar@exampleupi", + "mcc": "0000", + "gateway_reference_id": "XXXXXX" + } + } + } + }, + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_ERNEungCtXpZqM" + } + ] +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is ₹100, enter `10000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`order_id` _mandatory_ +: `string` Order ID generated in the previous step. + +`email` _mandatory_ +: `string` Email address of the customer. + +`contact` _mandatory_ +: `string` Phone number of the customer. + +`provider` _mandatory_ +: `string` Name of the service provider partnered with Razorpay. Enter the value `google_pay`. + +`notes` _optional_ +: `object` Set of key-value pairs used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`ip` _optional_ +: `string` Customer IP Address. + +`referrer` _optional_ +: `string` Customer referrer. + +`user_agent` _optional_ +: `string` Customer user-agent. + +#### Response Parameters + +Given below are the response parameters: + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. Possible value: + - `invoke_sdk`: Contains the payload needed to create `loadPaymentData` payload as specified by the Google SDK specification. Use this to create the payload and pass it to the customer's device. Use the same to invoke the Google Pay app on the user's android app. + - `poll`: Contains the URL you must poll to fetch the payment status (`authorized` or `failed`). + +### Step 6: Prepare payload for Initiating Payment to Google + +As a next step, you need to initiate payment to Google SDK integrated in [Step 2](#step-2-add-dependencies-in-build-gradle-file). To initiate the payment, you need to create a payload in the format prescribed by Google. The payload structure is explained in this step: + +Google Pay payload: +Google expects following payload in payment request: + +```java:Google Pay Payload +{ + "apiVersion": 2, + "apiVersionMinor": 0, + "allowedPaymentMethods": [ + { + "type": "UPI", + "parameters": { + "payeeVpa": "", + "payeeName": "Some Name", + "referenceUrl": "Website URL", + "mcc": "", + "transactionReferenceId": "" + }, + "tokenizationSpecification": { + "type": "DIRECT" + } + }, + { + "type": "CARD", + "parameters": { + "allowedCardNetworks": [ + "VISA", + "MASTERCARD" + ] + }, + "tokenizationSpecification": { + "type": "PAYMENT_GATEWAY", + "parameters": { + "gateway": "razorpayindia", + "gatewayMerchantId": "", + "gatewayTransactionId": "" + } + } + } + ], + "transactionInfo": { + "currencyCode": "INR", + "totalPrice": "5000.00", + "totalPriceStatus": "FINAL" + } +} +``` + +#### Request Parameters + +As can be seen, the payload has a lot of fields. Razorpay will provide values to be passed in some of the fields. For the remaining fields, you would need to be pass the values from your end. +The value to be passed in each field is displayed in the table below: + +Parameter | Data Type | Description | Required? +--- +apiVersion | Integer | The Google Pay API version used. The current version is 2. | Y +--- +apiVersionMinor | Integer | The Google Pay API minor version used. The current version is 0. | Y +--- +allowedPaymentMethods | Array | An array of objects for each method to be allowed. In this case, it will have two objects one each for UPI and Cards respectively. Each of the objects are explained in subsequent tables. | Y +--- +transactionInfo.currencyCode | string | The value is `INR`. | Y +---- +transactionInfo.totalPrice | string | The payment amount passed in the API request in step 5. The amount here is in INR. | Y +--- +transactionInfo.totalPriceStatus | string | The value is `FINAL`. | Y + +#### UPI Object + +The table below explains the fields for the UPI object: + +Google Pay Field | Razorpay Field | Value +--- +parameters.payeeVpa +`required` | provider_data.google_pay.upi.payee_vpa | This is your VPA created by Razorpay. This will be provided by Razorpay in payment response in step 5. +--- +parameters.payeeName +`required` | NA | You need to pass the user-facing business name for your business. +--- +parameters.referenceUrl +`optional` | NA | Your website URL for this specific payment. You may pass your website URL here. +--- +parameters.mcc +`required` | provider_data.google_pay.upi.mcc | This is a digit category code for your business. This will be provided by Razorpay in payment response in step 5. +--- +parameters.transactionReferenceId +`required` | provider_data.google_pay.upi.gateway_reference_id | This is a unique ID generated for this UPI payment. This will be provided by Razorpay in payment response in step 5. +--- +tokenizationSpecification.type +`required` | DIRECT | Always `Direct` + +#### Card Object + +The table below explains the fields for the card object: + +Google Pay Field | Razorpay Field | Value +--- +parameters.allowedCardNetworks +`required` | provider_data.google_pay.card.supported_networks | This field indicates the card networks to be supported by Google. This will be provided by Razorpay in payment response in step 5. * You will need to transform network names in block letters.For example, convert Visa to `VISA` and MasterCard to `MASTERCARD`. +--- +tokenizationSpecification.type +`required` | DIRECT | Always `Direct`. +--- +tokenizationSpecification.parameters.gateway +`required` | razorpayindia | Always `razorpayindia`. +--- +tokenizationSpecification.parameters.gatewayMerchantId +`required` | NA | This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon on the top right corner. +--- +tokenizationSpecification.parameters.gatewayTransactionId +`required` | provider_data.google_pay.card.gateway_reference_id | This is a unique ID generated for this Card payment. This will be provided by Razorpay in payment response in step 5. + +### Step 7: Invoke Google Pay App + +The payload created by you in step 6 (using the data available in `invoke_sdk` action in next array) will be used here. You will need to pass the payload to your Android app and initiate the `loadPaymentData` function as shown below: + +```java:Sample code +mPaymentClient.loadPaymentData(MainActivity.this,transactionPayload,LOAD_PAYMENT_DATA_REQUEST_CODE​); +``` + +This will open the Google Pay app on the customer's device for payment processing. + +### Step 8: Handle response from Google Pay App (Optional) + +Google Pay app will return result to `onActivityResult` function as shown below: + +```java: onActivityResult +@Override +protected void onActivityResult(int requestCode, int resultCode, Intent data) { + if (requestCode == LOAD_PAYMENT_DATA_REQUEST_CODE​) { + switch (resultCode) { + case Activity.RESULT_OK: //payment was successful + String paymentData = WalletUtils.getPaymentDataFromIntent(data); + break; + case Activity.RESULT_FIRST_USER: //internal error, something went wrong + int statusCode = data.getIntExtra(WalletConstants.EXTRA_ERROR_CODE, WalletConstants.INTERNAL_ERROR); + handleResultStatusCode(click here)(statusCode); + break; + case Activity.RESULT_CANCELED: //the transaction was cancelled by USER + break; + } + } +} +``` + +Your app can further use the snippet code below to get more insight into the error code `RESULT_FIRST_USER` received in `onActivityResult`: + +```java: onActivityResult +private void handleResultStatusCode(int statusCode) { + switch (statusCode) { + case WalletConstants.ERROR_CODE_BUYER_ACCOUNT_ERROR: + break; + case WalletConstants.ERROR_CODE_MERCHANT_ACCOUNT_ERROR: + break; + case WalletConstants.ERROR_CODE_UNSUPPORTED_API_VERSION: + case WalletConstants.INTERNAL_ERROR: + case WalletConstants.DEVELOPER_ERROR: + default: + Toast.makeText(this,"Internal error", Toast.LENGTH_SHORT).show(); + //throw new IllegalStateException("Internal error."); + } +} +``` + +### Step 9: Verify Payment Status + +When your application gets `Result_OK` from the Google app, you can verify the same using any of the following methods: +- [Fetch Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) +- [Payments Webhooks (Recommended)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payments) +- [Orders Webhooks (Recommended)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/orders.md#orders) diff --git a/llm-content/payments/payment-methods/cards/google-pay/s2s-integration/redirect.md b/llm-content/payments/payment-methods/cards/google-pay/s2s-integration/redirect.md new file mode 100644 index 00000000..1fe13503 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/google-pay/s2s-integration/redirect.md @@ -0,0 +1,566 @@ +--- +title: Google Pay Card Payments - S2S Integration Redirect API +description: Learn how to integrate Cards on Google Pay on your S2S Integration Redirect API. +--- + +# Google Pay Card Payments - S2S Integration Redirect API + +Using this feature, you can allow your customers to make payments on your Android app using the cards they have saved on Google Pay. + +To support Google Pay Cards on your S2S integration: + +1. Show Google Pay as a separate option when Google Pay is set up on your customer's device (Know how to [check if Google Pay Cards is available](#step-3-check-if-gpay-cards-is-supported) on the customer's device). +2. Trigger payment when the customer taps the Google Pay payment option on your checkout. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites +- Sign up for a Razorpay account. +- Generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) on the Dashboard. +- Configure [payment capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#dashboard-actions) on the Dashboard. +- Follow the [Razorpay S2S Integration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/redirect.md). +- You must have a PCI compliance certificate to get this feature enabled on your account. + +## Integration Steps + +1. [Download the SDKs](#step-1-download-the-sdks) +2. [Add dependencies in Build Gradle file](#step-2-add-dependencies-in-build-gradle-file) +3. [Check if GPay Cards is supported](#step-3-check-if-gpay-cards-is-supported) +4. [Create an order](#step-4-create-an-order) +5. [Create a payment](#step-5-create-a-payment) +6. [Prepare payload for Initiating Payment to Google](#step-6-prepare-payload-for-initiating-payment-to) +7. [Invoke Google Pay App](#step-7-invoke-google-pay-app) +8. [Handle response from Google Pay App (optional)](#step-8-handle-response-from-google-pay-app) +9. [Verify payment status](#step-9-verify-payment-status) + +### Step 1: Download the SDKs + +Download the [Google Pay SDK](https://rzp-1415-prod-mobile.s3.amazonaws.com/android/googlepay-sdk/tez-client-api-0.9.4.aar) and add the .aar file to the application library. + +### Step 2: Add Dependencies in Build Gradle File + +Add the following lines to your app's `build.gradle` file. + +```java: Dependencies +dependencies { + ... + implementation(name:'tez-client-api-0.9.4', ext:'aar') + implementation 'com.android.support:customtabs:26.1.0' + implementation 'com.google.android.gms:play-services-tasks:15.0.1 + implementation 'com.google.android.gms:play-services-wallet:18.0.0' + ... +} +``` + +### Step 3: Check if Gpay Cards is supported + +Show `Google Pay` as a payment option only when Google Pay is set up on your customer's device. Google Pay is set up when: +1. The Google Pay app is installed, **and** +2. Valid cards or bank accounts (UPI) are added to your customer's Google pay account. + +This will enable you to show only relevant payment methods to your users. + +Follow these steps to check if Google Pay Cards is supported: + +#### Step 3.1: Integrate the following code snippet in your app + +Given below is the code sample: + +```java: +Task task = null; +Context context = .this; +try { + task = mPaymentClient.isReadyToPay(context,jsonObjectRequest(payload)); +} catch (NoSuchAlgorithmException e) { + e.printStackTrace(); +} + +task.addOnCompleteListener(new OnCompleteListener() { + public void onComplete(Task task) { + boolean result = task.getResult(); + if (result == true) { + //Google Pay card is available & ready for transaction + } else { + //Google Pay card either isn't available or set up for usage. + } + } +}); +``` + +#### Step 3.2: Check if Google Pay Cards is set up + +Invoke the `isReadyToPay` function when you want to check if Google Pay Cards is set up on your customer's device, using the following payload: + +```java +"apiVersion": 2, +"apiVersionMinor": 0, +"allowedPaymentMethods"​:[ + { +​ "type"​:​ ​"CARD", +​ "parameters"​:​ { +​ "allowedCardNetworks"​ ​:​ ​["VISA", "MASTERCARD"], + } +​ }, + { +​ "type"​:​ ​"UPI", +​ } +] +``` + +Show `Pay with Google Pay cards` method to your end customers only when `isReadyToPay` function returns `true`. + +### Step 4: Create an Order + +Order is an important step in the payment process. + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +- The order_id received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "partial_payment": true, + "first_payment_min_amount": 23000 +}' +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => 'INR'// [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies).) +]); +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", "INR"); +Order order = client.Order.Create(options); +```ruby: Ruby +options = amount: 50000, currency: 'INR', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "INR", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +#### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Response Parameters + +Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) table. + +#### Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +The `razorpay_order_id` returned on successful creation of the order should be sent to the in payment request in next step. + +### Step 5: Create a Payment + +Once an order is created, your next step is to create a payment. The following API will create a payment with Pay with Google Pay Cards as the payment method: + +/payments/create/redirect + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/redirect \ +-H "Content-Type: application/json" \ + -d '{ + "amount": "100", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EKwxwAgItmmXdp", + "provider": "google_pay", + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment" +}' +```json: Response +{ + "razorpay_payment_id": "pay_ERNKungCtXpZqM", + "provider": "google_pay", + "provider_data": { + "google_pay": { + "card": { + "supported_networks": [ + "Visa", + "MasterCard" + ], + "gateway_reference_id": "unsigned payment id" + }, + "upi": { + "payee_vpa": "gaurav.kumar@exampleupi", + "mcc": "0000", + "gateway_reference_id": "example id" + } + } + } +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is ₹100, enter `10000`. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`order_id` _mandatory_ +: `string` Order ID generated in the previous step. + +`email` _mandatory_ +: `string` Email address of the customer. + +`contact` _mandatory_ +: `string` Phone number of the customer. + +`provider` _mandatory_ +: `string` Name of the service provider partnered with Razorpay. Enter the value `google_pay`. + +`notes` _optional_ +: `object` Set of key-value pairs used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`ip` _optional_ +: `string` Customer IP Address. + +`referrer` _optional_ +: `string` Customer referrer. + +`user_agent` _optional_ +: `string` Customer user-agent. + +#### Response Parameters + +Given below are the response parameters: + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`provider` +: `string` The payment service provider. Here, it is `google_pay`. + +`google_pay` +: `object` Details about the associated card and UPI account. + + `card` + : `object` Details about the card, such as supported networks. + + `supported_networks` + : `array` The networks supported. Possible values: + - `visa` + - `mastercard` + + `gateway_reference_id` + : `string` Unique reference id for the gateway. + + `upi` + : `object` Details about the UPI account. + + `payee_vpa` + : `string` The customer's UPI ID. + + `mcc` + : `string` The merchant classification code. + + `gateway_reference_id` + : `string` Unique reference id for the gateway. + +### Step 6: Prepare payload for Initiating Payment to Google + +As a next step, you need to initiate payment to Google SDK integrated in [Step 2](#step-2-add-dependencies-in-build-gradle-file). To initiate the payment, you need to create a payload in the format prescribed by Google. The payload structure is explained in this step: + +Google Pay payload: +Google expects following payload in payment request: + +```java:Google Pay Payload +{ + "apiVersion": 2, + "apiVersionMinor": 0, + "allowedPaymentMethods": [ + { + "type": "UPI", + "parameters": { + "payeeVpa": "", + "payeeName": "Some Name", + "referenceUrl": "Website URL", + "mcc": "", + "transactionReferenceId": "" + }, + "tokenizationSpecification": { + "type": "DIRECT" + } + }, + { + "type": "CARD", + "parameters": { + "allowedCardNetworks": [ + "VISA", + "MASTERCARD" + ] + }, + "tokenizationSpecification": { + "type": "PAYMENT_GATEWAY", + "parameters": { + "gateway": "razorpayindia", + "gatewayMerchantId": "", + "gatewayTransactionId": "" + } + } + } + ], + "transactionInfo": { + "currencyCode": "INR", + "totalPrice": "5000.00", + "totalPriceStatus": "FINAL" + } +} +``` + +#### Request Parameters + +As can be seen, the payload has a lot of fields. Razorpay will provide values to be passed in some of the fields. For the remaining fields, you would need to be pass the values from your end. +The value to be passed in each field is displayed in the table below: + +Parameter | Data Type | Description | Required? +--- +apiVersion | Integer | The Google Pay API version used. The current version is 2. | Y +--- +apiVersionMinor | Integer | The Google Pay API minor version used. The current version is 0. | Y +--- +allowedPaymentMethods | Array | An array of objects for each method to be allowed. In this case, it will have two objects one each for UPI and Cards respectively. Each of the objects are explained in subsequent tables. | Y +--- +transactionInfo.currencyCode | string | The value is `INR`. | Y +---- +transactionInfo.totalPrice | string | The payment amount passed in the API request in step 5. The amount here is in INR. | Y +--- +transactionInfo.totalPriceStatus | string | The value is `FINAL`. | Y + +#### UPI Object + +The table below explains the fields for the UPI object: + +Google Pay Field | Razorpay Field | Value +--- +parameters.payeeVpa +`required` | provider_data.google_pay.upi.payee_vpa | This is your VPA created by Razorpay. This will be provided by Razorpay in payment response in step 5. +--- +parameters.payeeName +`required` | NA | You need to pass the user-facing business name for your business. +--- +parameters.referenceUrl +`optional` | NA | Your website URL for this specific payment. You may pass your website URL here. +--- +parameters.mcc +`required` | provider_data.google_pay.upi.mcc | This is a digit category code for your business. This will be provided by Razorpay in payment response in step 5. +--- +parameters.transactionReferenceId +`required` | provider_data.google_pay.upi.gateway_reference_id | This is a unique ID generated for this UPI payment. This will be provided by Razorpay in payment response in step 5. +--- +tokenizationSpecification.type +`required` | DIRECT | Always `Direct` + +#### Card Object + +The table below explains the fields for the card object: + +Google Pay Field | Razorpay Field | Value +--- +parameters.allowedCardNetworks +`required` | provider_data.google_pay.card.supported_networks | This field indicates the card networks to be supported by Google. This will be provided by Razorpay in payment response in step 5. * You will need to transform network names in block letters.For example, convert Visa to `VISA` and MasterCard to `MASTERCARD`. +--- +tokenizationSpecification.type +`required` | DIRECT | Always `Direct`. +--- +tokenizationSpecification.parameters.gateway +`required` | razorpayindia | Always `razorpayindia`. +--- +tokenizationSpecification.parameters.gatewayMerchantId +`required` | NA | This is the Razorpay merchant ID for your Razorpay account. You can find this by logging in to the Dashboard and clicking the user icon on the top right corner. +--- +tokenizationSpecification.parameters.gatewayTransactionId +`required` | provider_data.google_pay.card.gateway_reference_id | This is a unique ID generated for this Card payment. This will be provided by Razorpay in payment response in step 5. + +### Step 7: Invoke Google Pay App + +The payload created by you in step 6 will be used here. You will need to pass the payload to your Android app and initiate the `loadPaymentData` function as shown below: + +```java:loadPaymentData +mPaymentClient.loadPaymentData(MainActivity.this,transactionPayload,LOAD_PAYMENT_DATA_REQUEST_CODE​); +``` + +This will open the Google Pay app on the customer's device for payment processing. + +### Step 8: Handle response from Google Pay App (Optional) + +Google Pay app will return result to `onActivityResult` function as shown below: + +```java:onActivityResult +@Override +protected void onActivityResult(int requestCode, int resultCode, Intent data) { + if (requestCode == LOAD_PAYMENT_DATA_REQUEST_CODE​) { + switch (resultCode) { + case Activity.RESULT_OK: //payment was successful + String paymentData = WalletUtils.getPaymentDataFromIntent(data); + break; + case Activity.RESULT_FIRST_USER:// internal error, something went wrong + int statusCode = data.getIntExtra(WalletConstants.EXTRA_ERROR_CODE, WalletConstants.INTERNAL_ERROR); + handleResultStatusCode(click here)(statusCode); + break; + case Activity.RESULT_CANCELED: // the transaction was cancelled by USER + break; + } + } +} +``` + +Your app can further use the snippet code below to get more insight into the error code `RESULT_FIRST_USER` received in `onActivityResult`: + +```java:onActivityResult +private void handleResultStatusCode(int statusCode) { + switch (statusCode) { + case WalletConstants.ERROR_CODE_BUYER_ACCOUNT_ERROR: + break; + case WalletConstants.ERROR_CODE_MERCHANT_ACCOUNT_ERROR: + break; + case WalletConstants.ERROR_CODE_UNSUPPORTED_API_VERSION: + case WalletConstants.INTERNAL_ERROR: + case WalletConstants.DEVELOPER_ERROR: + default: + Toast.makeText(this,"Internal error", Toast.LENGTH_SHORT).show(); + //throw new IllegalStateException("Internal error."); + } +} +``` + +### Step 9: Verify Payment Status + +When your application gets `Result_OK` from the Google app, you can verify the same using any of the following methods: +- [Fetch Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) +- [Payments Webhooks (Recommended)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payments) +- [Orders Webhooks (Recommended)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/orders.md#orders) diff --git a/llm-content/payments/payment-methods/cards/google-pay/standard-integration.md b/llm-content/payments/payment-methods/cards/google-pay/standard-integration.md new file mode 100644 index 00000000..c12ffbcf --- /dev/null +++ b/llm-content/payments/payment-methods/cards/google-pay/standard-integration.md @@ -0,0 +1,109 @@ +--- +title: Google Pay Card Payments - Android Standard Checkout +description: Know how to integrate Cards on Google Pay at your Razorpay Android Standard Integration. +--- + +# Google Pay Card Payments - Android Standard Checkout + +Use this feature to let your customers to make payments on your Android app using cards they saved on Google Pay. + +> **INFO** +> +> +> **Available on Android Apps Only** +> +> Google Pay has launched the option of adding Cards to their Google Pay accounts only for Android users. +> + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +- You should have already integrated [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard.md) on your Android app. +- Complete the onboarding process mentioned [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/google-pay.md). + +## Integration Steps + +1. [Add or update the Google SDKs](#step-1-add-or-update-the-google-sdks) +2. [Update the Razorpay Standard Integration SDK](#step-2-update-razorpay-standard-integration-sdk) +3. [Add dependencies in the Build Gradle file](#step-3-add-dependencies-in-build-gradle-file) +4. [Add metadata in the Android Manifest file](#step-4-add-metadata-in-android-manifest-file) + +### Step 1: Add or Update the Google SDKs + +You will need to integrate the Google SDK in your android app. You may use one of the two methods listed below: + +- [**Method 1**: Import the SDK from our Maven Repository](#method-1-import-the-sdk-from-our-maven) +- [**Method 2**: Download from GitHub](#method-2-download-from-github) + +#### Method 1: Import the SDK from our Maven Repository + +Import the SDK from our Maven repository by adding the following lines to your app's `build.gradle` file. + +```java: build.gradle +repositories { + mavenCentral() +} + +dependencies { + implementation 'com.razorpay:gpay:1.0.0' +} +``` + +#### Method 2: Download from GitHub + +Download [Google Pay SDK](https://rzp-1415-prod-mobile.s3.amazonaws.com/android/googlepay-sdk/google-pay-client-api-1.0.0.aar) AAR file and add the following lines to your app's `build.gradle` file. + +```java: build.gradle +dependencies { + ... + implementation(name: 'rzp-googlepay-1.3.0', ext: 'aar') +} +``` + +### Step 2: Update Razorpay Standard Integration SDK + +Google Pay Cards is supported on Razorpay Android - Standard Checkout version number 1.6.5 and higher. If you are using an older version, you will need to update it. + +You can update the Standard Checkout version in your `build.gradle` file as shown below: + +```java: Update Razorpay Checkout version +dependencies { + ... + implementation('com.razorpay:checkout:1.6.12') +} +``` + +### Step 3: Add Dependencies in Build Gradle File + +Add the following lines to your app's `build.gradle` file. + +```java: Dependencies +dependencies { + ... + implementation 'com.android.support:customtabs:26.1.0' + implementation 'com.google.android.gms:play-services-tasks:15.0.1' + implementation 'com.google.android.gms:play-services-wallet:18.0.0' + ... +} +``` + +### Step 4: Add Metadata in Android Manifest File + +Add the following lines inside the app’s `AndroidManifest.xml` file. + +```xml: Adds Meta Data + +``` diff --git a/llm-content/payments/payment-methods/cards/token-hq.md b/llm-content/payments/payment-methods/cards/token-hq.md new file mode 100644 index 00000000..d8b33564 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq.md @@ -0,0 +1,94 @@ +--- +title: Tokenisation FAQs +description: Tokenisation and the 2021 RBI guidelines. +--- + +# Tokenisation FAQs + +Given below are FAQs on the Tokenisation guidelines issued by RBI that businesses must adopt by Sep 2022: + +#### 1. What is Tokenisation? + +Tokenisation is the process by which the original card number / Primary Account Number (PAN) is replaced with a surrogate value called a `token`. + +#### 2. Will the token be visible to the cardholder? + +No, the `token` will not be visible to the cardholder. It will be managed between the Token Requestor(TR) and Network. + +#### 3. Who can save the cards as per the new guidelines? + +Card networks and Card issuers are the only parties that can now save plain text cards. All other parties (Payment Acquirers (PA), Payment Gateway (PG), acquiring banks and businesses) can only have a tokenised card. They cannot save a plain text card. + +#### 4. Is customer consent required for token creation? + +Yes, customer consent and additional factor of authentication (AFA) are required for saving a card/creating a token. This can be the same 2FA used during the first transaction. + +#### 5. What fields can be saved by businesses, PAs & PGs? + +The last 4 digits of the actual card number and a card issuer name can be stored by entities for tracking/analytical purposes. Apart from this, metadata such as network name, issuer name and so on can continue being stored. + +#### 6. Will customers be allowed to view and delete saved card tokens? + +Issuing banks are expected to provide a portal where customers can view and delete the list of cards saved online across all businesses. Businesses are also expected to provide an interface for their customers to view and delete saved cards. + +#### 7. Are the Saved Card feature and Tokenisation feature the same? +Yes. As per the RBI guidelines, saved cards will be tokenised with networks and issuers to ensure compliance. + +#### 8. Why have card transactions significantly decreased for my business? +It is possible that you have not integrated with our **TokenHQ** APIs, an RBI-compliant solution that allows your customers to make saved card payments. + +#### 9. Is Razorpay compliant with RBI guidelines on all networks? +Yes, Razorpay is now compliant with RBI guidelines on all networks. + +#### 10. How has the token-creation success rate been at Razorpay? +Razorpay’s **TokenHQ** has a record success rate of >99% for token creation across all networks. + +#### 11. I am a Razorpay merchant and my account got activated. When will my customer be able to save the cards on checkout? +While the **TokenHQ** solution will be instantly enabled for your account, the onboarding process and turnaround time are different for each network. Our support team will start the onboarding process as soon as your account is activated. + +#### 12. How has the token-based payment processing success rate at Razorpay? +Razorpay’s **TokenHQ** has a record success rate of ~80-83% for token-based payment processing across all networks. + +#### 13. Why are my customers not able to see any of their saved cards on the Razorpay checkout? +In light of the new tokenisation guidelines, these saved cards of the customers are no longer compliant to be stored with us. Our **TokenHQ** product is an RBI-compliant solution that will help customers save their cards across networks. + +#### 14. I am not able to see card details in the Payment API response. Why? +As part of the RBI guidelines, sensitive card information that includes card number, BIN/IIN, cardholder name, expiry details of the card are no longer compliant to be shared from Oct 1, 2022. + +#### 15. I am a Razorpay merchant. What changes should I make to adopt the RBI tokenisation guideline? +Once the onboarding process with each network is complete, using **TokenHQ** APIs, your customers will be able to save cards on your platform. + +#### 16. Will refunds be impacted? +- There will be no impact on refunds with normal speed. + +- Since aggregators like ourselves are only allowed to store card data up to a maximum of T+4 days, Instant Refunds will be possible until Razorpay settles the payment amount with the merchant, up to a maximum of 4 days from the date of transaction. + +- Instant Refunds for payments with tokenised cards will be possible for VISA Debit Cards only, and refunds for all other card payments will be made via Razorpay’s normal refunds. + +#### 17. We were relying on Razorpay APIs for card transactions and are worried that these flows will break. What changes must I expect? +Several APIs are impacted due to the guidelines. Based on your integration with Razorpay, the following APIs are altered to return dummy values instead of sensitive card information. +1. [Fetch All Saved Cards for A Customer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-1.md#33-fetch-all-tokens-of-customer). +2. [Fetch A Specific Saved Card for a Customer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-1.md#34-fetch-card-properties-of-an-existing-token). +3. [Fetch Card Properties of Individual Token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-1.md#34-fetch-card-properties-of-an-existing-token). +4. [Fetch all tokens of a customer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-1.md#33-fetch-all-tokens-of-customer). +5. [Individual Token API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-1.md#34-fetch-card-properties-of-an-existing-token). +6. [Fetch expanded card details of a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-cards/scenario-1.md#34-fetch-card-properties-of-an-existing-token). +7. [Fetch card details of a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-card-details-of-a-payment). + +#### 18. Why am I unable to do Instant Refunds for the majority of cards? +- Since aggregators like ourselves are only allowed to store card data up to a maximum of T+4 days, Instant Refunds for guest checkout transactions will be possible up to a maximum of 4 days from the date of transaction. +- Instant Refunds for payments with tokenized cards will be possible for VISA Debit Cards only. Refunds for all other card payments will be made via Razorpay’s [normal refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/normal.md). + +#### 19. What would be the refund timeline post tokenisation? Normal refunds have no restrictions on the timeline. +As per the RBI circular, Razorpay can have the card data upto T+4 or settlement date (whichever is earlier). By this logic, Instant Refunds will be possible up to a maximum of 4 days from the date of transaction. +For tokenised cards, Instant Refunds will be available only for VISA debit cards. + +#### 20. In some cases, I am unable to access Instant Refunds after 4 days. Why? +Since aggregators like ourselves are only allowed to store card data up to a maximum of T+4 days, Instant Refunds will be possible up to a maximum of 4 days from the date of transaction. +You can still provide refunds to your customers using [normal refunds.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/normal.md) + +#### 21. What changes must I expect in my reports? +For all the [standard reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md) downloaded from the Dashboard, and the custom reports configured by your support POC, the changes will be as follows. These will be applicable for both older reports as well as newer reports getting generated. +- Cardholder name will be returned as the blank string "". +- Instead of the entire card number, only the last four digits will be shared. +- For international cards, reports will continue to show the complete cardholder name and card number. diff --git a/llm-content/payments/payment-methods/cards/token-hq/dual-token.md b/llm-content/payments/payment-methods/cards/token-hq/dual-token.md new file mode 100644 index 00000000..bfa5bad4 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/dual-token.md @@ -0,0 +1,705 @@ +--- +title: TokenHQ - Issuer Tokenisation +description: Know how to save customer card details as tokens using Razorpay TokenHQ. +--- + +# TokenHQ - Issuer Tokenisation + +TokenHQ, a complete RBI-compliant solution from Razorpay, enables you to save customer credentials as tokens with card networks and card-issuing banks. + +Razorpay provides a Dual Token process which works with networks and issuing banks both to create network and issuer tokens with a single Token Create request. + +Tokenisation is the process by which the original card number/Primary Account Number (PAN) is replaced with a surrogate value called a `token`. + +## Razorpay Dual Token + +When a customer tries to save a card on your platform, our Dual Token feature communicates with networks and issuers to generate one network and one issuer token against the card respectively. To the customer saving their card, this process is invisible, and they view a single saved instance of their card on your checkout page. When the customer tries attempting the payment via saved card, the payment is processed via issuer/network token depending on your preference or best possible success rate. + +> **INFO** +> +> +> **Handy Tips** +> +> Dual Tokenisation is currently only available for Axis-issued cards, and is a work in progress for HDFC, ICICI and other Banks. +> + +## List of APIs + +Given below is the list of APIs: + +1. [Tokenise Cards](#1-tokenise-cards) + - [Token Entity](#token-entity) + - [Create a Token](#11-create-a-token) + - [Delete a Token](#12-delete-a-token) +2. [Initiate a Tokenised Payment](#2-initiate-a-tokenised-payments) + - [Initiate Payment Using the Dual Token](#21-initiate-payment-using-the-dual-token) + - [Initiate Payment Using Only the Network Token](#22-initiate-payment-using-only-the-network-token) + +## 1. Tokenise Cards + +You can save customer card details in the form of tokens and then use these tokens to accept payments from customers. + +#### Token Entity + +Given below is a sample entity. + +```json: Entity +{ + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "Axis", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "active", + "status_reason": null, + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2030 + } + }, + { + "id": "spt_1234efgh", + "entity": "service_provider_token", + "provider_type": "issuer", + "provider_name": "Axis", + "interoperable": true, + "status": "active", + "status_reason": null, + "provider_data": { + "token_reference_number": "bass7wqaoidasdfssqwrjjk", + "payment_account_reference": null, + "token_iin":null, + "token_expiry_month": 12, + "token_expiry_year": 2021 + } + } + ], + "expired_at": 1748716199, // this will be maximum expiry of network/issuer token + "status": "active", + "status_reason": null, + "notes": [] +} +``` + +`id` +: `string` The unique identifier of the Razorpay token. + +`entity` +: `string` The name of the entity. Here, it is `token`. + +`customer_id` +: `string` This is the Razorpay customer id. You can create a token for a specific customer using their customer id. Use the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md) to create a customer id. This is an optional parameter. + +`method` +: `string` The type of object that was tokenised. Currently, it only supports `card`. + +`card` +: `object` The customer card details. + +`compliant_with_tokenisation_guidelines` +: `boolean` Indicates whether the token is compliant with the RBI guidelines. Possible values: + - `true`: The token is compliant with RBI guidelines. + - `false`: The token is not compliant with RBI guidelines. + +`service_provider_tokens` +: `array` Every Razorpay token will have one or more token service providers (card networks, issuing banks or Razorpay). For each service provider, Razorpay will return a service provider token. This service provider token is the raw token returned by the token service provider (card network or issuer). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> The `service_provider_tokens` object is an on-demand feature, made available only to PCI DSS-compliant businesses. +> + +`expired_at` +: `string` The expiry timestamp for the token. + +`status` +: `string` The overall status for the token. Possible values: + - `active` : The token attains this state if it is activated for at least one of the token service providers. + - `suspended` : The token attains this state if: + - The token is not activated for any one of the token service providers. + - The token is suspended for at least one of the token service providers. + - `deactivated` : The token attains this state if the token is not active/suspended for any one of the token service providers and is deactivated for at least one token service provider. Know about the complete list of [token states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/token-lifecycle.md). + +`status_reason` +: `string` When the token reaches the deactivated state, this field will provide the reason for deactivation. Possible values: + - `expired` + - `deactivated_by_bank` + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.1 Create a Token + +A token is an alias for the actual card number. Use this API to save your customer's card. + +1. When a merchant requests for token creation (with or without payment), the token id is created by Razorpay. +2. For those token id created, there are two calls made: + - to the network for a network token. + - to the issuer for an issuer token. +3. For both, these tokens (service provider) are mapped to the same token reference number is displayed to the business. + + /tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/tokens +-H "content-type: application/json" +-d'{ + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "number": "4386289407660153", + "cvv": "", + "expiry_month": "12", + "expiry_year": "30", + "name": "Gaurav Kumar" + }, + "authentication": { + "provider": "razorpay", + "provider_reference_id": "pay_123wkejnsakd", + "authentication_reference_number": "100222021120200000000742753928" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject tokenRequest = new JSONObject(); +tokenRequest.put("customer_id","cust_1Aa00000000001"); +tokenRequest.put("method","card"); + +JSONObject card = new JSONObject(); +card.put("number","4386289407660153"); +card.put("cvv",""); +card.put("expiry_month","12"); +card.put("expiry_year","30"); +card.put("name","Gaurav Kumar"); + +tokenRequest.put("card",card); + +JSONObject authentication = new JSONObject(); +authentication.put("provider","razorpay"); +authentication.put("provider_reference_id","pay_123wkejnsakd"); +authentication.put("authentication_reference_number","100222021120200000000742753928"); +tokenRequest.put("authentication",authentication); + +Token token = instance.token.create(tokenRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->token->create(array( + "customer_id" => "cust_1Aa00000000001", + "method" => "card", + "card" => array( + "number" => "4386289407660153", + "cvv" => "", + "expiry_month" => "12", + "expiry_year" => "30", + "name" => "Gaurav Kumar" + ), + "authentication" => array( + "provider" => "razorpay", + "provider_reference_id" => "pay_123wkejnsakd", + "authentication_reference_number" => "100222021120200000000742753928" + ), + "notes" => array() +)); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": map[string]interface{}{ + "number": "4386289407660153", + "cvv": "", + "expiry_month": "12", + "expiry_year": "30", + "name": "Gaurav Kumar" + }, + "authentication": map[string]interface{}{ + "provider": "razorpay", + "provider_reference_id": "pay_123wkejnsakd", + "authentication_reference_number": "100222021120200000000742753928" + }, + "notes": [] +} +body, err := client.Token.Create(data, nil); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.tokens.create({ + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "number": "4386289407660153", + "cvv": "", + "expiry_month": "12", + "expiry_year": "30", + "name": "Gaurav Kumar" + }, + "authentication": { + "provider": "razorpay", + "provider_reference_id": "pay_123wkejnsakd", + "authentication_reference_number": "100222021120200000000742753928" + }, + "notes": [] +}); + +``` + +```json: Success Response +{ + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "active", + "status_reason": null, + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2021 + } + }, + { + "id": "spt_1234efgh", + "entity": "service_provider_token", + "provider_type": "issuer", + "provider_name": "Axis", + "interoperable": true, + "status": "active", + "status_reason": null, + "provider_data": { + "token_reference_number": "bass7wqaoidasdfssqwrjjk", + "payment_account_reference": null, + "token_iin":null, + "token_expiry_month": 12, + "token_expiry_year": 2021 + } + } + ], + "expired_at": 1748716199, + "status": "active", + "status_reason": null, + "notes": [] +} + +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The number is invalid.", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "number" + } +} +``` + +#### Request Parameters + +`customer_id` _optional_ +: `string` The unique identifier of the customer created using [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md). + +`method` _mandatory_ +: `string` The type of object that needs to be tokenised. Currently, `card` is the only supported value. + +`card` _mandatory_ +: `object` The card details. + + `name` + : `string` The cardholder's name. + + `number` + : `string` The card number. + + `expiry_month` + : `string` The expiry month of the card in `mm` format. + + `expiry_year` + : `string` The expiry year of the card in `yy` format. + + `cvv` _mandatory_ + : `string` The card's CVV. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +`authentication` +: `object` Token authentication details. + + `provider` + : `string` The platform through which authentication was processed. + + `provider_reference_id` + : `string` The unique payment identifier of the payment used to collect AFA on any PA/PG. + + `authentication_reference_number` + : `string` A unique reference number generated when authentication is initiated. The maximum length supported is 26 characters. + +#### Response Parameters + +Descriptions for the response parameters are present in the [Token Entity parameters table](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/dual-token.md#token-entity). + +### 1.2 Delete a Token + +Use the following API to delete a token already saved with Razorpay. + +/tokens/delete + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/tokens/delete +-H "content-type: application/json" +-d '{ + "id" : "token_4lsdksD31GaZ09" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject productRequest = new JSONObject(); +productRequest.put("id","token_4lsdksD31GaZ09") + +List token = instance.token.delete(productRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->token->delete(array("id" => "token_4lsdksD31GaZ09")); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "id" : "token_4lsdksD31GaZ09", +} + +body, err := client.Token.DeleteToken(data, nil); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.tokens.delete({"id": "token_4lsdksD31GaZ09"}); + +```json: Response +[] + +``` + +#### Request Parameters + +`id` _mandatory_ +: `string` The unique identifier of the token to be deleted. + +> **WARN** +> +> +> **Watch Out!** +> +> Deleting a token will apply at a global level. That is, once you delete a token, you cannot use that token under any of the MIDs. +> + +## 2. Initiate a Tokenised Payment + +### 2.1 Initiate Payment Using the Dual Token + +Use this API to use either issuer or network token. + +Razorpay processes the payment using either the issuer or network token based on the one that gives the best success rate. + +> **INFO** +> +> +> **Handy Tips** +> +> - Payment in this case will be routed via issuer or network token depending on the better success rate. +> - Issuer tokens are not interoperable. + +> For example, ABD Corp cannot request Razorpay to process an issuer token created by Juspay. +> + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "order_id": "order_Fg6IGePNMKDICF", + "contact": "9090909090", + "method": "card", + "token": "token_IJr7WSRFECVBSX", + "card": { + "cvv": "" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' + +```json: Response +{ + "razorpay_payment_id": "pay_IFCxyfBO08Lmb4", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/IFCxyfBO08Lmb4/authenticate" + } + ] +} + +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is ₹299, then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, INR. Refer to the list of supported currencies. Length must be of 3 characters. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order generated in the first step. + +`email` _mandatory_ +: `string` Email address of the customer. Maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. Maximum length supported is 15 characters, inclusive of country code. + +`method` _mandatory_ +: `string` Name of the payment method. Possible value is `card`. + +`card` _mandatory_ +: `object` Details associated with the card. + + `cvv` + : `string` CVV printed on the back of card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +`ip` _mandatory_ +: `string` The customer's IP address. + +`user-agent` _mandatory_ +: `string` The User-Agent header of the user's browser. Default value will be passed by Razorpay if not provided by merchant. + +`description` _optional_ +: `string` A brief description of the Customer Identifier. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +Descriptions for the response parameters are present in the [Token Entity parameters table](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/dual-token.md#token-entity). + +### 2.2 Initiate Payment Using Only the Network Token + +Use the following API for initiating a payment using the network token. + +> **WARN** +> +> +> **Watch Out!** +> +> 1. Fetching the cryptogram value precedes the below request. +> 2. Make the fetch cryptogram request with your token service provider and then call the below API. +> + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "card": { + "number": "4154980604708430", + "expiry_month": "12", + "expiry_year": "30", + "name": "Gaurav Kumar", + "cryptogram_value": "as34ag3h78dsdasdsd1", + "cvv": "", + "tokenised": true, + "token_provider": "payu" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' + +```json: Response +{ + "razorpay_payment_id": "pay_IFCxyfBO08Lnb4", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/IFCxyfBO08Lmb4/authenticate" + } + ] +} + +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is ₹299, then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, INR. Refer to the list of supported currencies. Length must be of 3 characters. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order generated in the first step. + +`email` _mandatory_ +: `string` Email address of the customer. Maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. Maximum length supported is 15 characters, inclusive of country code. + +`method` _mandatory_ +: `string` Name of the payment method. Possible value is `card`. + +`card` _mandatory_ +: `object` Details associated with the card. + + `number` _mandatory_ + : `string` Unformatted card number. Required if the method is `card`. + + `name` _mandatory_ + : `string` Name of the cardholder. Required if the method is `card` + + `expiry_month` _mandatory_ + : `integer` Expiry month for card in `MM` format. Required if the method is `card`. + + `expiry_year` _mandatory_ + : `string` Expiry year for card in `YY` format. Required if the method is `card`. + + `cvv` _mandatory_ + : `string` CVV printed on the back of card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `cryptogram_value` _mandatory_ + : `string` The cryptogram value for the token. + + `tokenised` _mandatory_ + : `boolean` Indicates if the payment is made using tokenised card or actual card. Possible values: + - `true`: Pass `true` when you are making the payment using a token. + - `false` (default): Pass `false` when you are making the payment using a card. + + `token_provider` _mandatory_ + : `string` The name of the aggregator that provided the token. + +`ip` _mandatory_ +: `string` The customer's IP address. + +`user-agent` _mandatory_ +: `string` The User-Agent header of the user's browser. Default value will be passed by Razorpay if not provided by merchant. + +`description` _optional_ +: `string` A brief description of the Customer Identifier. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +Descriptions for the response parameters are present in the [Token Entity parameters table](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/dual-token.md#token-entity). diff --git a/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens.md b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens.md new file mode 100644 index 00000000..4402b91b --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens.md @@ -0,0 +1,70 @@ +--- +title: TokenHQ - Business as Token Requestor +description: Know how to save customer card details as tokens using Razorpay's TokenHQ solution. +--- + +# TokenHQ - Business as Token Requestor + +Tokenisation is the process by which the original card number / Primary Account Number (PAN) is replaced with a surrogate value called a `token`. + +For example, you can save a customer's card securely details during the first transaction in the form of a token. For the next transaction, the customer does not need to re-enter the card details. They can just provide the OTP and use their saved card to complete the transaction. + +The advantages of using tokens are: +- Faster checkout experience for the customers. +- Reduction in payment failures due to incorrect card details. + +## RBI Guidelines on Tokenisation + +According to the recent RBI guidelines on Card Tokenisation, Payment Aggregators (PA)/ Payment Gateway (PG) and businesses cannot save their customers' card numbers and other card data on their servers. + +Given below are some of the key takeaways from the guidelines: +- Card networks and card issuers are the only parties that can now save plain text cards. Businesses, Payment Gateways and Payment Aggregators are no longer allowed to store actual customer card details. +- To continue offering customers a 'saved card experience', businesses need to adopt a tokenisation solution. +- The token will not be visible to the cardholder. It will be managed between the Token Requestor and Network. +- Customer consent and additional factor of authentication (AFA) is required for saving a card / creating a token. This can be clubbed with the same 2FA used during the first transaction. + +## Razorpay TokenHQ + +In absence of tokenisation, your customers will not be able to avail a 'saved card experience' at checkout. Razorpay introduces an end-to-end RBI-compliant solution, TokenHQ, that allows you to save customer credentials as `tokens` with card networks and card-issuing banks. Customers can then use these `tokens` to make repeat purchases on your website, without re-entering card details. + +With TokenHQ, you can: +- Process payments through any PA/PG while tokenising cards through Razorpay. +- Use Razorpay Optimizer to route payments through the PA/PG of your choice. + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature and available only to PCI-compliant merchants. [Get in touch](https://razorpay.com/support/) with us to get this feature enabled on your account. +> + +**Onboard as a Token Requestor** + +In this flow, you will be onboarded with card networks and Issuers as token requestors as well as a merchant. + +## Flow + +Given below is the first payment tokenisation flow: + +![Tokenisation flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-tokenisation.jpg.md) + +1. The customer consents to save a card on your website/app checkout. +2. The saved card consent is stored by Razorpay Token Requestor after successful authentication of the transaction. +3. We initiate the tokenisation request at checkout. +4. The Card Network or issuing bank returns a unique Token corresponding to the tokenisation request, to the customer through Razorpay. + +Given below is the subsequent payment tokenisation flow: + +![Subsequent payment Tokenisation flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-tokenisation-subsequent-payment.jpg.md) + +1. The customer initiates payment using the token. +2. We automatically fetch the token cryptogram from the Card Network or the issuing bank. +3. The payment is initiated and processed using token cryptogram. +4. The payment is either processed or cancelled. + +### Related Information + +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/apis.md) +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/webhooks.md) +- [Tokenisation FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq.md) diff --git a/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/additional-information.md b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/additional-information.md new file mode 100644 index 00000000..39250a23 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/additional-information.md @@ -0,0 +1,12 @@ +--- +title: Additional Information +description: List of important points regarding tokenisation. +--- + +# Additional Information + +Given below are important points pertaining to tokenisation: + +- In case of network tokenised cards, the payment and the card entity will return the last 4 digits of the tokenised card and not the actual card. +- If there have been multiple tokenisation requests on a card, different tokens will be created. +- MasterCard and RuPay are instantly available after go-live for tokenisation. However, Visa will take 5 days for activation after go-live. diff --git a/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/alt-id-checkout.md b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/alt-id-checkout.md new file mode 100644 index 00000000..7d3c2a1a --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/alt-id-checkout.md @@ -0,0 +1,93 @@ +--- +title: Enable Guest Checkout Payments With Alt ID +description: Use Razorpay Alt ID feature and comply with RBI guidelines for guest checkout payments. +--- + +# Enable Guest Checkout Payments With Alt ID + +Razorpay offers Alternate Identifier (Alt id), a solution that is compliant with RBI guidelines for guest checkout payments. Alternate Identifier provides a smooth payment experience to customers. + +## Guest Checkout Payments Guidelines + +According to the RBI circular, if a customer manually enters the card details during the guest checkout (without saving the card information), the following guidelines must be adhered to: + +- Besides the card issuer and the network, the merchant or Payment Aggregator (PA) involved in the settlement of such transactions can save the data of a particular transaction for a maximum period of T+4 days (T being the transaction date) or till the settlement date, whichever is earlier. This data shall be used only for settlement of such transactions and must be deleted after that. + +- Entities in the transaction/payment chain shall deploy an alternate solution for handling guest checkout transactions by **October 31, 2023**. + +For RBI-compliant Guest Checkout payments, Razorpay will use an Alt id. Alt id is a unique code provided by card networks and issuers. It replaces the actual card number and supports all post-transaction activities such as refunds, settlements, and dispute handling. + +> **WARN** +> +> +> **Watch Out!** +> +> Alt id is not applicable for tokenised transactions. In such cases, as per the new tokenisation guidelines, the tokenised card number and cryptogram are used throughout the transaction's lifecycle. +> + +## FAQs + + +### 1. Is Razorpay compliant with RBI's guest checkout guidelines? + + Yes, Razorpay complies with RBI guidelines, facilitating guest checkout payments with the secure Alt id solution. + + + +### 2. What actions should I be taking to be compliant? + + Just like most of our features, you are automatically compliant with RBI's guest checkout regulations. + + + +### 3. I am a Juspay merchant. What should I do to ensure compliance? + + Juspay and Razorpay will take care of compliance on behalf of all Juspay merchants. No additional steps are required from your end. + + + +### 4. I use Razorpay Optimizer. How can I ensure that I am compliant? + + On behalf of all Optimizer merchants, Razorpay and your payment aggregator will take care of the compliance. No additional steps are required from your end. + + + +### 5. I have a direct integration with networks for tokenisation. How can I ensure compliance? + + In this case, you can consider either of the following: + - Approach 1 (Recommended). You continue to send us the card details. Razorpay will automatically: + - Generate Alt id in collaboration with networks. + - Process payments using Alt id. + You can continue to tokenise your card in this flow. + - Approach 2. You can generate an Alt id with networks and initiate a payment with Razorpay using these Alt details. For API details on this approach, please reach out to our [support team](https://razorpay.com/support/#request). + + +> **INFO** +> +> +> **Handy Tips** +> +> As per NPCI's specifications, Razorpay (payment processor) will be the token requestor for all Rupay-routed payments on Razorpay. In this case, you must pass clear card details to Razorpay. +> + + + + +### 6. What is Alt id? + + Alt id is a unique code provided by card networks and issuers. It replaces the actual card number and supports all post-transaction activities like refunds, settlements, and dispute handling. + + + +### 7. What are guest checkout payments? + + A guest checkout payment occurs when the cardholder enters the card details directly without the intention of saving the details. This can happen when: + - The card is not saved, and the user does not intend to save it. + - The card is being saved for the first time. + RBI has prohibited Payment Aggregators (PAs), Acquires, and Acquirer TSPs (gateways) from using the card number for guest checkout transactions, ensuring security and compliance. + + + +### 8. How do these changes affect the cardholder? + + With the introduction of Alt id and Alt cryptogram for each payment, we prioritise cardholder security. Alt id creates a safer environment for digital card payments. This means that Alt id enhances the benefits Razorpay offers to businesses and their users, contributing to a more secure and robust ecosystem for digital payments. diff --git a/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/apis.md b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/apis.md new file mode 100644 index 00000000..038d34ff --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/apis.md @@ -0,0 +1,1301 @@ +--- +title: Tokenisation APIs +description: List of APIs to tokenise customer cards. +--- + +# Tokenisation APIs + +According to recent Payment Acquirer (PA)/ Payment Gateway (PG) guidelines from RBI, businesses cannot save their customers' card numbers and other card data on their servers. Razorpay TokenHQ is a RBI-compliant solution that allows you to save customer credentials with card networks and card-issuing banks. You can use Razorpay Optimizer to route payments through the PA/PG of your choice. + +## List of APIs + +Given below is the list of APIs: + +1. [Tokenise cards](#1-tokenise-cards). + - [Token Entity](#token-entity) + - [Create a token](#11-create-a-token) + - [Fetch card properties of an existing token](#12-fetch-card-properties-of-an-existing-token) + - [Delete a token](#13-delete-a-token) +2. [Initiate payment using token saved with Razorpay](#2-initiate-payment-using-token-saved-with-razorpay). +3. [Process a payment on another PA/PG with token created on Razorpay](#3-process-a-payment-on-another-pa-pg). +4. [Initiate Payment on Razorpay with token created on another PA/PG](#4-initiate-payment-on-razorpay-with-token-created). +5. [Save card to vault token while making a payment on Razorpay](#5-save-card-to-vault-token-while-making). + +## 1. Tokenise Cards + +You can save customer card details in the form of tokens and then use these tokens to accept payments from customers. + +### Token Entity + +Given below is a sample entity. + +```json: Mastercard, Visa & RuPay +{ + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "0153", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "active", + "status_reason": null, + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2030 + }, + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect CVV", + "field": null, + "source": "bank", + "step": "token_creation", + "reason": "invalid_cvv", + "metadata": {} + } + }, + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "aggregator", + "provider_name": "razorpay", + "interoperable": false, + "status": "active", + "status_reason": null, + "provider_data": { + "expired_at": 1748716199 + }, + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect CVV", + "field": null, + "source": "bank", + "step": "token_creation", + "reason": "invalid_cvv", + "metadata": {} + } + } + ], + "expired_at": 1748716199, + "status": "active", + "status_reason": null, + "notes": [] +} +```json: Diners +{ + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "0153", + "network": "Diners Club", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "issuer", + "provider_name": "HDFC", + "interoperable": true, + "status": "active", + "provider_data": { + "token_requestor_id": "INBENRAZOVIVIWIBPAY56428", + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2030 + }, + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect CVV", + "field": null, + "source": "bank", + "step": "token_creation", + "reason": "invalid_cvv", + "metadata": {} + } + } + ], + "expired_at": 1748716199, + "status": "active", + "notes": [] +} +``` + + +### Entity Parameters + + `id` + : `string` The unique identifier of the Razorpay token. + + `entity` + : `string` The name of the entity. Here, it is `token`. + + `customer_id` + : `string` This is the Razorpay customer id. You can create token for a specific customer using their customer id. Use the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) to create customer id. This is an optional parameter. + + `method` + : `string` The type of object that was tokenised. Currently, it only supports `card`. + + `card` + : `object` The customer card details. + + `last4` + : `string` The last 4 digits of the tokenised card. + + `network` + : `string` The card network. Possible values: + - `Visa` + - `RuPay` + - `MasterCard` + - `American Express` + - `Diners Club` + - `Maestro` + - `JCB` + - `Union Pay` + + `issuer` + : `string` The 4-character issuer code unique to each issuing bank in India. For example, `HDFC`, `SBIN` and so on. + + `type` + : `string` The type of card. Possible values: + - `credit` + - `debit` + - `prepaid` + + `international` + : `boolean` Indicates whether the card is international (issued outside India) or domestic. Possible values: + - `true`: The card is international. + - `false`: The card is domestic. + + `emi` + : `boolean` Indicates whether the card is eligible for EMI payments or not. Possible values: + - `true`: The card is eligible for EMI payments. + - `false`: The card is not eligible for EMI payments. + + `sub_type` + : `string` The card sub_type for the given IIN. Pricing of card payment may change on the basis of card type. Possible values: + - `consumer` + - `business` + - `unknown` + + `token_iin` + : `string` The token IIN provided by the card network. When a token is created with card networks such as Visa or MasterCard, this field will have the token IIN. This will be useful to fetch all the token properties so that you can apply your existing IIN validations and processing. This field will be absent when the token is created by a token service provider other than the card network. + + `compliant_with_tokenisation_guidelines` + : `boolean` Indicates whether the token is compliant with the RBI guidelines. Possible values: + - `true`: The token is compliant with RBI guidelines. + - `false`: The token is not compliant with RBI guidelines. + + `service_provider_tokens` + : `array` Every Razorpay token will have one or more token service providers(card networks, issuing banks or Razorpay). For each service provider, Razorpay will return a service provider token. This service provider token is the raw token returned by the token service provider (card network or issuer). Currently, we will have only card networks as token service providers. In future, a token may be created with more than one service provider. A token can be created with one or more of the following service providers: + +> **INFO** +> +> **Handy Tips** + The `service_provider_tokens` object is an on-demand feature, made available only to PCI DSS compliant businesses. + + `id` + : `string` The unique identifier of the token. + + `entity` + : `string` The name of the entity. Here, it is `service_provider_token`. + + `provider_type` + : `string` The type of provider through which the token was created. Possible values: + - `network` + - `issuer` + - `aggregator` (When the token provider is Razorpay.) + + `provider_name` + : `string` The name of the provider through which the token was created. Possible values: + - `Visa` + - `MasterCard` + - `HDFC` + - `razorpay` + + `interoperable` + : `boolean` This field suggests if the token provided is interoperable across different acquirers. Possible values: + - `true`: The token is interoperable. + - `false`: The token is not interoperable. + + `status` + : `string` The current status for the token as provided by the token service provider. Possible values: + - `active` + - `suspended` + - `deactivated` + - `failed` + + Know about the complete list of [token states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/token-lifecycle.md). + + `status_reason` + : `string` When the token status is deactivated, this field will provide the reason for deactivation. Possible values: + - `expired` + - `deactivated_by_bank` + + `provider_data` + : `object` Service provider data. + + `token_reference_number` + : `string` The token reference number provider by the token provider. + + `payment_account_reference` + : `string` The unique card identifier provided by the token provider. If the `service_provider` is `network`, this identifier will be consistent for a given card across the card network ecosystem. + + `token_iin` + : `string` The IIN of the token thus created. The IIN will be helpful to fetch all the properties of the token and apply your existing IIN validations and processes. + + `token_expiry_month` + : `string` The expiry date for the token. The format used is `mm`. + + `token_expiry_year` + : `string` The expiry year for the token. The format used is `yyyy`. + + `token_requestor_id` + : `string` The tr_merchant_id provided by HDFC. (Displayed only for Diners tokens). + + `error` + : `object` Details of error. + + `code` + : `string` Type of the error. + + `description` + : `string` Description of the error. + + `field` + : `string` Name of the parameter that caused the error. + + `source` + : `string` The point of failure in token creation. + + `step` + : `string` The stage where the failure occurred. + + `reason` + : `string` The exact error reason. + + `metadata` + : `object` Contains additional information about the request. + + `expired_at` + : `string` The expiry timestamp for the token. + + `status` + : `string` The overall status for the token. Possible values: + - `active`: The token attains this state if the token is activated for at least one of the token service providers. + - `suspended`: The token attains this state if: + - The token is not activated for any one of the token service providers. + - The token is suspended for at least one of the token service providers. + - `deactivated`: The token attains this state if the token is not `active`/`suspended` for any one of the token service providers and is deactivated for at least one token service provider. + Know about the complete list of [token states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/token-lifecycle.md). + + `status_reason` + : `string` When the token reaches the `deactivated` state, this field will provide the reason for deactivation. Possible values: + - `expired` + - `deactivated_by_bank` + + `notes` + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + +### 1.1 Create a Token + +A token is an alias for the actual card number. Use this API to save your customer's card. + +As per RBI guidelines, customer consent and AFA (3ds authentication) are mandatory for saving a card. +- This API should be called only after authentication is complete. Authentication can be processed through any payment processor. +- You will receive a token as a response. + +> **INFO** +> +> +> **Handy Tips** +> +> If multiple tokenisation requests have been raised for the same card using this API, then for: +> - MasterCard and RuPay Cards: Different tokens will be created for each request. +> - Visa Cards: If a token has already been created, the API will return the same token for subsequent requests. +> This is in sync with the Network Tokenisation API. +> + +> **WARN** +> +> +> **Watch Out** +> +> This API is only available to businesses that are TRs and not available for Rupay payments. +> + + /tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/tokens +-H "content-type: application/json" +-d'{ + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "number": "4386289407660153", + "cvv": "", + "expiry_month": "12", + "expiry_year": "30", + "name": "Gaurav Kumar" + }, + "authentication": { + "provider": "razorpay", + "provider_reference_id": "pay_123wkejnsakd", + "authentication_reference_number": "100222021120200000000742753928" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject tokenRequest = new JSONObject(); +tokenRequest.put("customer_id","cust_1Aa00000000001"); +tokenRequest.put("method","card"); + +JSONObject card = new JSONObject(); +card.put("number","4386289407660153"); +card.put("cvv",""); +card.put("expiry_month","12"); +card.put("expiry_year","30"); +card.put("name","Gaurav Kumar"); + +tokenRequest.put("card",card); + +JSONObject authentication = new JSONObject(); +authentication.put("provider","razorpay"); +authentication.put("provider_reference_id","pay_123wkejnsakd"); +authentication.put("authentication_reference_number","100222021120200000000742753928"); +tokenRequest.put("authentication",authentication); + +Token token = instance.token.create(tokenRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->token->create(array( + "customer_id" => "cust_1Aa00000000001", + "method" => "card", + "card" => array( + "number" => "4386289407660153", + "cvv" => "", + "expiry_month" => "12", + "expiry_year" => "30", + "name" => "Gaurav Kumar" + ), + "authentication" => array( + "provider" => "razorpay", + "provider_reference_id" => "pay_123wkejnsakd", + "authentication_reference_number" => "100222021120200000000742753928" + ), + "notes" => array() +)); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": map[string]interface{}{ + "number": "4386289407660153", + "cvv": "", + "expiry_month": "12", + "expiry_year": "30", + "name": "Gaurav Kumar" + }, + "authentication": map[string]interface{}{ + "provider": "razorpay", + "provider_reference_id": "pay_123wkejnsakd", + "authentication_reference_number": "100222021120200000000742753928" + }, + "notes": [] +} +body, err := client.Token.Create(data, nil); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.tokens.create({ + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "number": "4386289407660153", + "cvv": "", + "expiry_month": "12", + "expiry_year": "30", + "name": "Gaurav Kumar" + }, + "authentication": { + "provider": "razorpay", + "provider_reference_id": "pay_123wkejnsakd", + "authentication_reference_number": "100222021120200000000742753928" + }, + "notes": [] +}); +``` + +```json: Response +{ + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "0153", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "active", + "status_reason": null, + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2030 + } + } + ], + "expired_at": 1748716199, + "status": "active", + "status_reason": null, + "notes": [] +} +```json: Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The number is invalid.", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "number" + } +} +``` + + +### Request Parameters + + `customer_id` _optional_ + : `string` The unique identifier of the customer created using [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + + `method` _mandatory_ + : `string` The type of object that needs to be tokenised. Currently, `card` is the only supported value. + + `card` _mandatory_ + : `object` The card details. + + `number` + : `string` The card number. If the card number has spaces, it will be trimmed by Razorpay for further processing. + + `cvv` + : `string` The card's CVV number. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `expiry_month` + : `string` The card expiry month in `mm` format. + + `expiry_year` + : `string` The card expiry year in `yy` or `yyyy` format. + + `name` + : `string` The cardholder's name. + + `authentication` _mandatory_ + : `object` Token authentication details. + + `provider` + : `string` The platform through which authentication was processed. Possible values: + - `amex` + - `axis_migs` + - `cashfree` + - `ccavenue` + - `cybersource` + - `first_data` + - `fss` + - `hdfc` + - `mpgs` + - `paysecure` + - `paytm` + - `payu` + - `zaakpay` + + `provider_reference_id` + : `string` The unique payment identifier of the payment used to collect AFA on any PA/PG. + + `authentication_reference_number` _conditional_ + : `string` A unique reference number generated for Amex and RuPay payments when the cardholder consents to tokenisation and AFA is successfully completed. This value must be obtained from the payment processor/gateway that handled the authentication and passed to Razorpay during token creation. It is mandatory for all Amex token creation requests. For RuPay, it is required only when generated and provided by the gateway. + + +> **WARN** +> +> +> **Watch Out!** +> +> To tokenise RuPay and Amex cards, the following information is required: +> - **authRefNo**: Provided by NPCI for RuPay transactions. +> - **AeVV**: Provided by Amex during payments where AFA was collected from the cardholder for tokenisation. + +> These values must be shared by the payment processor handling the transaction. For RuPay, this is required only if generated by the gateway. For Amex, it is mandatory for all payments. +> +> + +### Error Codes + +Given below is a list of sample error codes: + + +### Scenario 1: When any mandatory field is empty + + - Code: BAD_REQUEST_ERROR + - Description: The `` is required + - Source: internal + - Step: token_initiation + - Reason: input_validation_failed + + + +### Scenario 2: When the field name is invalid + + - Code: BAD_REQUEST_ERROR + - Description: The `` is invalid + - Source: internal + - Step: token_initiation + - Reason: input_validation_failed + + + +### Scenario 3: When the connection with token service provider times out + + - Code: TOKEN_SERVICE_PROVIDER_TIMEOUT + - Description: There is an issue in connecting with the token service provider + - Source: service_provider + - Step: token_creation + - Reason: token_service_provider_timed_out + + +### 1.2 Fetch Card Properties of an Existing Token + +Use this API to retrieve card details such as network, issuer and so on for a given token. + +/tokens/fetch + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/tokens/fetch +-H "content-type: application/json" +-d'{ + "id": "token_4lsdksD31GaZ09" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject productRequest = new JSONObject(); +productRequest.put("id","token_4lsdksD31GaZ09") + +Token token = instance.token.fetch(productRequest); + +```php:PHP +$api = new Api($key_id, $secret); + +$api->token->fetch(array("id" => "token_4lsdksD31GaZ09")); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "id" : "token_4lsdksD31GaZ09", +} +body, err := client.Token.FetchCardPropertiesByToken(data, nil); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.tokens.fetch({"id": "token_4lsdksD31GaZ09"}); + +```json: Response - Visa, MasterCard & RuPay +{ + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "0153", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "active", + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2030 + } + } + ], + "expired_at": 1748716199, + "status": "active", + "notes": [] +} +```json: Response - Diners +{ + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "0153", + "network": "Diners Club", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "issuer", + "provider_name": "hdfc", + "interoperable": true, + "status": "active", + "provider_data": { + "token_requestor_id": "INBENRAZOVIVIWIBPAY56428", + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2030 + } + } + ], + "expired_at": 1748716199, + "status": "active", + "notes": [] +} +``` + + +### Request Parameters + + `id` _mandatory_ + : `string` The unique identifier of the token. + + +### 1.3 Delete a Token + +Use the following API to delete a token already saved with Razorpay. + +/tokens/delete + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X https://api.razorpay.com/v1/tokens/delete +-H "content-type: application/json" +-d '{ + "id" : "token_4lsdksD31GaZ09" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject productRequest = new JSONObject(); +productRequest.put("id","token_4lsdksD31GaZ09") + +List token = instance.token.delete(productRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->token->delete(array("id" => "token_4lsdksD31GaZ09")); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "id" : "token_4lsdksD31GaZ09", +} + +body, err := client.Token.DeleteToken(data, nil); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.tokens.delete({"id": "token_4lsdksD31GaZ09"}); + +```json: Response +[] +``` + + +### Request Parameter + + `id` _mandatory_ + : `string` The unique identifier of the token to be deleted. + + +## 2. Initiate Payment using Token saved with Razorpay + +Use this API to make the payment when a customer initiates a subsequent payment using the saved card. Pass the token ID from the previous API request to initiate a payment using the token. + +/payments/create/json + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "order_id": "order_Fg6IGePNMKDICF", + "contact": "9000090000", + "method": "card", + "token": "token_IJr7WSRFECVBSX", + "card": { + "cvv": "123" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' +```json: Response +{ + "razorpay_payment_id": "pay_IFCxyfBO08Lmb4", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/IFCxyfBO08Lmb4/authenticate" + } + ] +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` The payment amount you want to collect from the customer. + + `currency` _mandatory_ + : `string` The 3-character ISO code of the currency. Here, it is `INR`. + + `order_id` _mandatory_ + : `string` The unique identifier of the order created for this payment. Create an order using the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + `email` _mandatory_ + : `string` The customer's email address. + + `contact` _mandatory_ + : `string` The customer's phone number. + + `method` _mandatory_ + : `string` The payment method. Here, it is `card`. + + `token` _mandatory_ + : `string` The unique identifier of the token. + + `card` _mandatory_ + : `object` The details of the card. + + `cvv` _optional_ + : `string` The card's CVV number. + + `notes` _optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + +> **INFO** +> +> +> **Handy Tips** +> +> Know more about the [S2S Integration payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2.md). +> + +## 3. Process a Payment on another PA/PG with Token Created on Razorpay + +To process a payment on the tokenised card on another PA/PG, you will need the token and relevant additional data for each token. You can pass the service provider token id or the token id. +- The data required may vary for different networks. +- Use the API given below to obtain the token and the relevant data. +- You can pass this data to any PA/PG to process the payment. + +/tokens/service_provider_tokens/token_transactional_data + +> **WARN** +> +> +> **Watch Out!** +> +> **This endpoint is decommissioned for Diners cards**. +> +> To use a Razorpay-created Diners token on a different Payment Aggregator (PA) or Payment Gateway (PG), switch to the `/tokens/fetch` API. Use the response from `/tokens/fetch` to retrieve the necessary `requestor_id` and `reference_number`. +> +> + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/tokens/service_provider_tokens/token_transactional_data +-H "content-type: application/json" +-d '{ + "id": "spt_4lsdksD31GaZ09" // Alternatively, you can pass token_id, e.g., "token_id": "token_IJmat4GwYATMtx" +}' + +```json: Response - Visa, MasterCard & RuPay +{ + "token_number": "4016981500100002", + "cryptogram_value": "a345345dfgdfasdfh45jtyhgjkyutsdasd2", + "token_expiry_month": 12, + "token_expiry_year": 2030 +} + +```json: Response - Amex +{ + "token_number": "4016981500100002", + "cvv": "1234", + "token_expiry_month": 12, + "token_expiry_year": 2030 +} +```json: Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The token is invalid.", + "source": "business", + "step": "get_cryptogram", + "reason": "invalid_token" + } +} +``` + + +### Request Parameters + + `id` + : `string` The unique identifier of the service provider token whose details are to be fetched. Pass either this id or the `token_id`. + + `token_id` + : `string` The unique identifier of the token. Pass either this id or the `spt_id`. + + + +### Response Parameters + + `token_number` + : `string` The unique reference number generated for the token. For example, `4016981500100002`. + + `cryptogram_value` + : `string` The token cryptogram value. + + `token_expiry_month` + : `integer` The token expiry month in `mm` format. + + `token_expiry_year` + : `integer` The token expiry year in `yyyy` format. + + `cvv` _amex only_ + : `integer` A dynamic 4-digit number printed on the front of the `Amex` card. This cvv should be passed in the CVV field to your PA/PG for processing the payment. + + +## 4. Initiate Payment on Razorpay with Token Created on another PA/PG + +Use this API to create a payment with token saved on another PA/PG. + +/payments/create/json + +```curl: Mastercard, Visa & RuPay +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "card": { + "number": "4386289407660153", + "expiry_month": "12", + "expiry_year": "30", + "cryptogram_value": "as34ag3h78dsdasdsd1", + "cvv": "", + "tokenised": true, + "token_provider": "payu", + "provider_type": "network" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' + +```curl: Amex +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "card": { + "number": "4386289407660153", + "expiry_month": "12", + "expiry_year": "30", + "cvv": "", + "tokenised": true, + "token_provider": "payu" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' + +```curl: Diners +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "card": { + "number": "4154980604708430", + "expiry_month": "12", + "expiry_year": "30", + "cvv": "123", + "tokenised": true, + "token_provider": "payu", + "last4": "8430", + "provider_type": "issuer", + "service_provider_token_data": { + "requestor_id": "INBENRAZOVIVIWIBPAY56428", + "reference_number": "349c969a-d749-46fd-a08f-b955f49207b9" + } + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' + +```json: Response +{ + "razorpay_payment_id": "pay_IFCxyfBO08Lnb4", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/IFCxyfBO08Lmb4/authenticate" + } + ] +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` The payment amount you want to collect from the customer. + + `currency` _mandatory_ + : `string` The 3-character ISO code of the currency. Here, it is `INR`. + + `order_id` _mandatory_ + : `string` The unique identifier of the order created for this payment. Create an order using the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + `email` _mandatory_ + : `string` The customer's email address. + + `contact` _mandatory_ + : `string` The customer's phone number. + + `method` _mandatory_ + : `string` The payment method. Here, it is `card`. + + `card` _mandatory_ + : `object` The details of the card. + + `number` _mandatory_ + : `string` If payment is made using an actual card, then this field should have the entire actual card number. If card number has spaces, Razorpay will trim them for further processing. If payment is made using a network token, then this field should have the token number. If token number has spaces, Razorpay will trim them for further processing. + + `expiry_month` _mandatory_ + : `string` If payment is made using an actual card, then this field should have the 2-digit expiry month for the card. If payment is made using a network token, then this field should have the 2-digit expiry month for the token. + + `expiry_year` _mandatory_ + : `string` If payment is made using an actual card, then this field should have the 2 or 4-digit expiry year for the card. If payment is made using a network token, then this field should have the 2 or 4-digit expiry year for the token. + + `cryptogram_value` _mandatory_ + : `string` The cryptogram value for the token. This will be provided by the entity which provided the token. This field is mandatory if `tokenised=true` only for Visa, Mastercard and Rupay. Do not pass this for Amex and Diners cards. + + `tokenised` _optional_ + : `boolean` Indicates if the payment is made using tokenised card or actual card. Possible values: + - `true`: Pass `true` when you are making the payment using a token. + - `false` (default): Pass `false` when you are making the payment using a card. + + `token_provider` _mandatory_ + : `string` The name of the aggregator that provided the token. Possible values: + - `amex` + - `axis_migs` + - `cashfree` + - `ccavenue` + - `cybersource` + - `first_data` + - `fss` + - `hdfc` + - `mpgs` + - `paysecure` + - `paytm` + - `payu` + - `zaakpay` + - `Visa` + - `RuPay` + - `MasterCard` + + `last4` _mandatory_ + : `string` The last four digits of the original card number. + + `provider_type` _optional_ + : `string` The type of provider through which the token was created. Possible values: + - `network` + - `issuer` + + `service_provider_token_data ` _mandatory for diners_ + : `object` Token service provider data created by the network/issuer. + + `requestor_id` + : `string` The `tr_merchant_id` provided by HDFC. + + `reference_number` + : `string` The token reference number provided by HDFC. + + `cvv` + : `string` The card's CVV number. For Amex tokenised cards, this will be a dynamic CVV provided by Amex for every payment on the tokenised card. Dynamic CVV is valid for about 20 minutes. + + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `notes` _optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + +> **INFO** +> +> +> **Handy Tips** +> +> Know more about the [S2S Integration payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2.md). +> + +## 5. Save Card to Vault Token While Making a Payment on Razorpay + +If you are using Razorpay to process the first payment from a new card, do not call the tokenisation API. Instead, initiate the existing Razorpay Payment API, with an additional parameter `save=true`. This avoids two API requests and processes payments faster. + +Use the following API to save card details while making a payment: + +/payments/create/json + +```curl: Request +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "card", + "card": { + "number": "4386289407660153", + "cvv": "123", + "expiry_month": "12", + "expiry_year": "30", + "name": "Gaurav Kumar" + }, + "save": true, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' +```json: Response +{ + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/FVmAtLUe9XZSGM/authorize" + }, + { + "action": "otp_generate", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate?track_id=FVmAtLUe9XZSGM&key_id=" + } + ] +} +``` + +Redirect the customer to the URL given in the response to complete the authentication. + +### Fetch a Payment API for Token Information + +The token will be created only if the cardholder successfully completes 3ds authentication. + +Use the Fetch Payment API to fetch the token. + +/payments/\{pay_id\} + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/payments/pay_DG4ZdRK8ZnXC3k +-H "content-type: application/json" +```json: Response +{ + "id": "pay_IJuRCejcSCxf2L", + "entity": "payment", + "amount": 500000, + "currency": "INR", + "status": "created", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": "Test payment", + "card_id": "card_IJr7VIQUzucNc2", + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "token_id": "token_IJr7WSRFECVBSX", + "notes": { + "note_key": "value1" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "033814379298", + "authentication_reference_number": "100222021120200000000742753928" + }, + "created_at": 1636549176, + "reference17": null +} +``` + + +### Path Parameter + + `id` _mandatory_ + : `string` The unique identifier of the payment. diff --git a/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/apis/payment.md b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/apis/payment.md new file mode 100644 index 00000000..2d849def --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/apis/payment.md @@ -0,0 +1,335 @@ +--- +title: Process Payments Directly Using Network Tokens API +description: API to directly process payments using network tokens. +--- + +# Process Payments Directly Using Network Tokens API + +Use this API to directly process payments with tokens saved on another PA/PG. + +/payments/create/json + +> **INFO** +> +> +> **Handy Tips** +> +> The payment processing flow is the same as mentioned [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2.md). However, you need to make the following changes: +> - Pass the token number and token expiry values instead of the card number and card expiry values. +> - Pass the cryptogram (TAVV) in the `cryptogram_value` field. +> + +## Card Payments + +```curl: Mastercard, Visa & RuPay +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "card": { + "number": "4854980604708430", + "expiry_month": "12", + "expiry_year": "21", + "cryptogram_value": "as34ag3h78dsdasdsd1", + "cvv": "123", + "tokenised": true, + "token_provider": "payu" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' +```curl: Amex +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "card": { + "number": "4854980604708430", + "expiry_month": "12", + "expiry_year": "21", + "cvv": "123", + "tokenised": true, + "token_provider": "payu" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +} +```json: Response +{ + "razorpay_payment_id": "pay_IFCxyfBO08Lnb4", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/IFCxyfBO08Lmb4/authenticate" + } + ] +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The payment amount you want to collect from the customer. + +`currency` _mandatory_ +: `string` The 3-character ISO code of the currency. Here, it is `INR`. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created for this payment. Create an order using the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`email` _mandatory_ +: `string` The customer's email address. + +`contact` _mandatory_ +: `string` The customer's phone number. + +`method` _mandatory_ +: `string` The payment method. Possible value is `card`. + +`card` _mandatory_ +: `object` The details of the card. + + `number` _mandatory_ + : `string` If payment is made using an actual card, then this field should have the entire actual card number. If card number has spaces, Razorpay will trim them for further processing. If payment is made using a network token, then this field should have the token number. If token number has spaces, Razorpay will trim them for further processing. + + `expiry_month` _mandatory_ + : `string` If payment is made using an actual card, then this field should have the 2-digit expiry month for the card. If payment is made using a network token, then this field should have the 2-digit expiry month for the token. + + `expiry_year` _mandatory_ + : `string` If payment is made using an actual card, then this field should have the 2 or 4-digit expiry year for the card. If payment is made using a network token, then this field should have the 2 or 4-digit expiry year for the token. + + `cryptogram_value` __conditionally mandatory_ + : `string` The cryptogram value for the token. This will be provided by the entity which provided the token. This field is mandatory if `tokenised=true` only for Visa, Mastercard and Rupay. Do not pass this for Amex cards. + + `tokenised` _optional_ + : `boolean` Indicates if the payment is made using tokenised card or actual card. Possible values: + - `true`: Pass `true` when you are making the payment using a token. + - `false` (default): Pass `false` when you are making the payment using a card. + + `token_provider` _optional_ + : `string` The name of the aggregator that provided the token. Possible values: + - `amex` + - `axis_migs` + - `cashfree` + - `ccavenue` + - `cybersource` + - `first_data` + - `fss` + - `hdfc` + - `mpgs` + - `paysecure` + - `paytm` + - `payu` + - `zaakpay` + - `Visa` + - `RuPay` + - `MasterCard` + + `cvv` _mandatory_ + : `string` The card's cvv. For Amex tokenised cards, this will be a dynamic CVV provided by Amex for every payment on the tokenised card. Dynamic CVV is valid for about 20 minutes. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + +`action` +: `string` An indication of the next step available to you to continue the payment process. Possible value: + - `redirect`: Use this URL to redirect the customer to submit the OTP on the bank page. + +`url` +: `string` URL to be used for the action indicated. + +## EMI Payments + +> **INFO** +> +> +> **Handy Tips** +> +> The payment processing flow is the same as mentioned [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md#emi). However, you need to make the following changes: +> - Pass the token number and token expiry values instead of the card number and card expiry values. +> - Pass the cryptogram (TAVV) in the `cryptogram_value` field. +> - Additionally, provide the actual card's last 4 digits along with tokens for EMI payments. +> + +```curl: Mastercard, Visa & RuPay +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "emi", + "emi_duration": 9, + "card": { + "number": "4154980604708430", + "expiry_month": "12", + "expiry_year": "21", + "cryptogram_value": "as34ag3h78dsdasdsd1", + "cvv": "123", + "tokenised": true, + "token_provider": "payu", + "last4": "8430" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' +```curl: Amex +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "emi", + "emi_duration": 9, + "card": { + "number": "4154980604708430", + "expiry_month": "12", + "expiry_year": "21", + "cvv": "123", + "tokenised": true, + "token_provider": "payu", + "last4": "8430" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' +```json: Response +{ + "razorpay_payment_id": "pay_IFCxyfBO08Lnb4", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/IFCxyfBO08Lmb4/authenticate" + } + ] +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The payment amount you want to collect from the customer. + +`currency` _mandatory_ +: `string` The 3-character ISO code of the currency. Here, it is `INR`. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created for this payment. Create an order using the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`email` _mandatory_ +: `string` The customer's email address. + +`contact` _mandatory_ +: `string` The customer's phone number. + +`method` _mandatory_ +: `string` The payment method. Possible value is `emi`. + +`emi_duration` _mandatory_ + : `integer` The EMI duration in months. + +`card` _mandatory_ +: `object` The details of the card. + + `number` _mandatory_ + : `string` If payment is made using an actual card, then this field should have the entire actual card number. If card number has spaces, they will be trimmed by Razorpay for further processing. If payment is made using a network token, then this field should have the token number. If token number has spaces, they will be trimmed by Razorpay for further processing. + + `expiry_month` _mandatory_ + : `string` If payment is made using an actual card, then this field should have the 2-digit expiry month for the card. If payment is made using a network token, then this field should have the 2-digit expiry month for the token. + + `expiry_year` _mandatory_ + : `string` If payment is made using an actual card, then this field should have the 2 or 4-digit expiry year for the card. If payment is made using a network token, then this field should have the 2 or 4-digit expiry year for the token. + + `cryptogram_value` __conditionally mandatory_ + : `string` The cryptogram value for the token. This will be provided by the entity which provided the token. This field is mandatory if `tokenised=true`. + + `tokenised` _optional_ + : `boolean` Indicates if the payment is made using tokenised card or actual card. Possible values: + - `true`: Pass `true` when you are making the payment using a token. + - `false` (default): Pass `false` when you are making the payment using a card. + + `token_provider` _optional_ + : `string` The name of the aggregator that provided the token. Possible values: + - `amex` + - `axis_migs` + - `cashfree` + - `ccavenue` + - `cybersource` + - `first_data` + - `fss` + - `hdfc` + - `mpgs` + - `paysecure` + - `paytm` + - `payu` + - `zaakpay` + - `Visa` + - `RuPay` + - `MasterCard` + + `cvv` _mandatory_ + : `string` The card's cvv. + + `last4` _conditionally mandatory_ + : `string` The last four digits of the credit card used to make the EMI payment. This parameter is mandatory if `method=emi` and `tokenised=true`. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + +`action` +: `string` An indication of the next step available to you to continue the payment process. Possible value: + - `redirect`: Use this URL to redirect the customer to submit the OTP on the bank page. + +`url` +: `string` URL to be used for the action indicated. diff --git a/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/cvv-less-flow.md b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/cvv-less-flow.md new file mode 100644 index 00000000..5dd0be64 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/cvv-less-flow.md @@ -0,0 +1,35 @@ +--- +title: CVV-less Flow for Card Payments +description: Save customer card details as tokens and enable CVV-less payment flows for customers via Razorpay. +--- + +# CVV-less Flow for Card Payments + +CVV-less payments are recently introduced for saved cards where the cardholder can complete a payment without the card CVV. CVV-less card payments are simple, fast and secure, and do not require a memory test of your customers! + +As a business, we encourage you to remove the CVV box completely in the checkout experience of the customer. By doing so, you are not only encouraging the customer to choose their saved cards as a convenient payment option, but you are also enabling them to have a faster checkout experience. + +If you are live on Razorpay Standard Checkout, the UI changes are automatically taken care of. + +> **INFO** +> +> +> +> **Handy Tips** +> +> Offering CVV-less saved card flows to your customers can increase the conversion rate by 4%. +> + +![CVV Less Card Payment Flow GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pm-cvv-otp-less.gif.md) + +> **INFO** +> +> +> **Handy Tips** +> +> CVV-less payments on RuPay is an on-demand feature for standard checkout merchants. Reach out to our [support team](https://razorpay.com/support/#request) for more information. +> + +## Related information + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/cvv-less-flow.md#frequently-asked-questions-faqs) diff --git a/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/guest-checkout-apis.md b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/guest-checkout-apis.md new file mode 100644 index 00000000..cb78cf68 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/guest-checkout-apis.md @@ -0,0 +1,291 @@ +--- +title: Guest Checkout APIs for Alt ID Requestors +description: Implement Alt ID for Guest Checkout payments, ensuring compliance with RBI guidelines. +--- + +# Guest Checkout APIs for Alt ID Requestors + +As per the latest RBI guidelines for Payment Acquirers (PA) and Payment Gateways (PG), guest checkout payments need to use an Alternate Identifier, known as Alt ID. + +If you are a token requestor directly integrated with a payment network, you can consider one of these approaches: + +1. [**You are the Alt ID requestor**](#approach-1-you-are-the-alt-id-requestor): Before initiating the payment, you fetch the Alt ID from networks and process the payment with Razorpay using Alt ID details. + +2. [**Razorpay is the Alt requestor and payment processor**](#approach-2-razorpay-as-the-alt-id-requestor): Razorpay will fetch the Alt ID from networks and process the payment. You can continue using our Create Payment APIs. + +> **INFO** +> +> +> **Handy Tips** +> +> The first approach is only possible for Visa, Mastercard, Amex and Diners payments. Razorpay will be the token and the Alt ID requestor for all Rupay payments. +> + +## Approach 1: You are the Alt ID Requestor + +Use this API to make the payment when a customer initiates a payment. + +/payments/create/json + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "content-type: application/json" \ +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKXXXX", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "card": { + "number": "4386289407660153", + "expiry_month": "12", + "expiry_year": "30", + "cryptogram_value": "as34ag3h78dsdasdsd1", + "cvv": "123", + "tokenised": false, + "token_provider": "Visa", + "provider_type": "network" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' +```json: Response +{ + "razorpay_payment_id": "pay_IFCxyfBO08Lnb4", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/IFCxyfBO08Lmb4/authenticate" + } + ] +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` The payment amount you want to collect from the customer. + +`currency` _mandatory_ +: `string` The 3-character ISO code of the currency. Here, it is `INR`. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created for this payment. Create an order using the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`email` _mandatory_ +: `string` The customer's email address. + +`contact` _mandatory_ +: `string` The customer's phone number. + +`method` _mandatory_ +: `string` The payment method. Here, it is `card`. + +`card` _mandatory_ +: `object` The details of the card. + + `expiry_month` + : `integer` The expiry month of Alt ID. + + +> **INFO** +> +> +> **Handy Tips** +> +> For Visa, add the original card expiry month. +> + + `expiry_year` + : `integer` The expiry year Alt ID. + + +> **INFO** +> +> +> **Handy Tips** +> +> For Visa, add the original card expiry year. +> + + + `number` _mandatory_ + : `integer` Alt ID. + + `cryptogram_value` + : `string` The Alt cryptogram value. + + `tokenised` _mandatory_ + : `boolean` Indicates if the payment is made using tokenised card or actual card. Possible values: + - `true`: Pass `true` when you are making the payment using a token. + - `false` (default): Pass `false` when you are making the payment using an Alt ID. + + `token_provider` _mandatory_ + : `string` The name of the aggregator that provided the token. Possible values: + - Visa + - Mastercard + - Amex + - Rupay + - HDFC for Diners + + `cvv` + : `string` The card's CVV number. + +## Approach 2: Razorpay as Alt ID Requestor + +Use this API to make the payment when a customer initiates a payment. + +> **INFO** +> +> +> **Handy Tips** +> +> Approach 2 is applicable only for Visa, Mastercard, Diners, and Amex payments. If you are processing Rupay payments, you should initiate the payment request using plain card details. +> + +/payments/create/json + +```curl: Request +curl -X POST \ +https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "contact": "9900008989", + "email": "gaurav.kumar@example.com", + "order_id": "order_DPzFe1Q1dEOKed", + "method": "card", + "card":{ + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, + "authentication":{ + "authentication_channel": "browser" + }, + "browser":{ + "java_enabled": false, + "javascript_enabled": false, + "timezone_offset": 11, + "color_depth": 23, + "screen_width": 23, + "screen_height": 100 + }, + "ip": "105.106.107.108", + "referer": "https://merchansite.com/example/paybill", + "user_agent": "Mozilla/5.0" +}' +```json: Response +{ + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/authorize" + }, + { + "action": "otp_generate", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate?track_id=FVmAtLUe9XZSGM&key_id=" + } + ] +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example, INR for Alt ID payments. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order generated in the first step. + +`email` _mandatory_ +: `string` Email address of the customer. The maximum length supported is 40 characters. + +`contact` _mandatory_ +: `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + +`method` _mandatory_ +: `string` Name of the payment method. Possible value is `card`. + +`card` _mandatory_ +: `object` Details associated with the card. + + `number` + : `string` Unformatted card number. + + `name` + : `string` Name of the cardholder. + + `expiry_month` + : `string` Expiry month for the card in MM format. + + `expiry_year` + : `string` Expiry year for the card in YY format. + + `cvv` + : `string` CVV printed on the back of the card. + +`user-agent` _mandatory_ +: `string` The User-Agent header of the user's browser. The default value will be passed by Razorpay if not provided by you. + +`ip` _mandatory_ +: `string` The customer's IP address. + +`authentication` _optional_ +: `object` Details of the authentication channel. + + `authentication_channel` + : `string` The authentication channel for the payment. Possible values: + - `browser` (default) + - `app` + +`browser` _mandatory_ +: `object` Information regarding the customer's browser. This parameter need not be passed when `authentication_channel=app`. + + `java_enabled` + : `boolean` Indicates whether the customer's browser supports Java. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser supports Java. + - `false`: Customer's browser does not support Java. + + `javascript_enabled` + : `boolean` Indicates whether the customer's browser can execute JavaScript. Obtained from the `navigator` HTML DOM object. Possible values: + - `true`: Customer's browser can execute JavaScript. + - `false`: Customer's browser cannot execute JavaScript. + + `timezone_offset` + : `integer` Time difference between UTC time and the cardholder's browser local time. Obtained from the `getTimezoneOffset()` method applied to the `Date` object. + + `screen_width` + : `integer` Total width of the payer's screen in pixels. Obtained from the `screen.width` HTML DOM property. + + `screen_height` + : `integer` Obtained from the `navigator` HTML DOM object. + + `color_depth` + : `integer` Obtained from the payer's browser using the `screen.colorDepth` HTML DOM property. + + `language` + : `string` Obtained from the payer's browser using the `navigator.language` HTML DOM property. Maximum limit of 8 characters. + +`notes` _optional_ +: `object` Key-value object used for passing tracking info. Refer to [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) for more details. + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`referrer` _optional_ +: `string` Referrer header passed by the client's browser. diff --git a/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/iin-validation.md b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/iin-validation.md new file mode 100644 index 00000000..753ed692 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/iin-validation.md @@ -0,0 +1,112 @@ +--- +title: IIN/BIN Validations on Tokens +description: API to fetch card properties using token IIN. +--- + +# IIN/BIN Validations on Tokens + +> **WARN** +> +> +> **Watch Out** +> +> - As per RBI guidelines, businesses and payment acquirers are allowed to save the last 4 card digits and the BIN only. +> - As per current interpretation, businesses and Payment Acquirer are not allowed to save the IIN of the card.* + +> *Razorpay is seeking clarification on this from the industry and RBI. +> + +## Token IIN API + +A token is an alias or surrogate value for the actual card number. Whenever the network tokenises a card, the token generated will be a numeric value with the same length as the actual card number. + +#### For Example + +Card Number | Token +--- +4386 2894 0766 0153 | 4123 4511 1111 1117 + +When a card is tokenised, the first 6 digits or the IIN of the card gets changed. +The new IIN for the card is referred to as token IIN. + +Use the following API to fetch the properties of the card using token IIN. + +/iins/:token_iin + +#### Path Parameter + +`token_iin` _mandatory_ +: `integer` The token IIN. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/iins/412345 +-H "content-type: application/json" + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String tokenIin = "412345"; + +Iin token = instance.iin.fetch(tokenIin); + +```php: PHP +$api = new Api($key_id, $secret); + +$tokenIin = "412345"; +$api->iin->fetch($tokenIin); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +tokenIin := "412345" + +body, err := client.Iin.Fetch(tokenIin, nil, nil) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var tokenIin = "412345"; + +instance.iins.fetch(tokenIin); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string tokenIin = "412345"; + +Iin iin = client.Iin.Fetch(tokenIin); + +```json: Response +{ + "iin": "412345", + "entity": "iin", + "network": "Visa", + "type": "credit", + "sub_type": "business", + "issuer_code": "HDFC", + "issuer_name": "HDFC Bank Ltd", + "international": false, + "is_tokenized": true, + "card_iin": "438628", + "emi":{ + "available": true + }, + "recurring": { + "available": true + }, + "authentication_types": [ + { + "type":"3ds" + }, + { + "type":"otp" + } + ] +} +``` + +### Related Information + +- [Fetch Card IIN Information API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/cards/iin-api.md) diff --git a/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/token-lifecycle.md b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/token-lifecycle.md new file mode 100644 index 00000000..5ae5dd05 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/token-lifecycle.md @@ -0,0 +1,71 @@ +--- +title: Token Lifecycle +description: Know about the different states attained by tokens. +--- + +# Token Lifecycle + +There are two types of tokens - service provider token and overall token. + +> **INFO** +> +> +> **Handy Tips** +> +> +> - Status will be available for the service provider token and the overall token entity. +> - The status of overall token entity is derived from the individual service provider tokens. +> - You may choose to consume one of them based upon your integration. +> +> + +Given below is a diagram representing the token lifecycle: + +![Token Lifecycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-token-hq-token-lifecycle.jpg.md) + +## Token States for Service Provider Token + +A service provider token will not have the `initiated` state. This is because the service provider token is created only when a token is successfully created. + +Status | Description +--- +**active** | The service_provider_token will have active status when the token is successfully created with token_service_providers (card networks). A service_provider_token in `active` status can be used for payment processing. +--- +**suspended** | The service_provider_token status changes to `suspended` when the token is suspended temporarily by the card issuing bank or network. A suspended token may be activated again by the token provider. A suspended token cannot be used for payment processing. +--- +**failed** | Razorpay failed to create the token with token service provider due to: +• The card not being eligible. +• The issue not being supported. +• An invalid card number. +--- +**deactivated** | The service provider token status will change to `deactivated` due to following reasons: +• service_provider_token has been deleted +• service_provider_token has expired +• service_provider_token is deactivated by bank. + + The exact reason for deactivation will be provided in the `status_reason` parameter. Possible values for status_reason are: +• expired +• deactivated_by_bank +A deactivated token cannot become active again and cannot be used for payment processing. + +## Overall Token States + +A token can have following statuses: + +Status | Description +--- +**initiated** | This is the token's primary state. This status indicates that Razorpay is working with token service providers to create the token. It may take a few seconds for the token to move to the `active` state. +--- +**active** | The token reaches the `active` state if the status of the service_provider_token is active for at least one of the token service providers. +--- +**suspended** | The token status changes to `suspended`: +• If status is not `active` for all the token service providers. +• If the token is in `suspended` state for at least one of the token service providers. +A `suspended` token cannot be used for payment processing. +--- +**failed** | The token status will be `failed` when the status is failed for all service providers. +--- +**deactivated** | Status will be `deactivated` when: +• Status is not active or suspended for all the token service providers. +• Status of the token is deactivated for at least one of the token service providers. + A deactivated token cannot be used for payment processing. diff --git a/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/webhooks.md b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/webhooks.md new file mode 100644 index 00000000..5f36bcdd --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/webhooks.md @@ -0,0 +1,553 @@ +--- +title: Tokenisation Webhooks +description: List of webhook events for token status updates. +--- + +# Tokenisation Webhooks + +Use Razorpay Webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. + +## Webhook Events for Token Status Updates + +The table below lists the webhook events available for tokens. + +Event | Description +--- +`token.initiated` | Triggered when tokenisation request is initiated. +--- +`token.service_provider.activated` | Triggered when, for a given service provider: +• The token status is changed to `activated` for the first time. +• The token status for a previously suspended token is changed to `activated` again. +--- +`token.service_provider.cancelled` | Triggered when, for a given service provider, the issuing bank temporarily suspends a token. +--- +`token.service_provider.deactivated` | Triggered when, for a given service provider, the issuing bank permanently deactivates a token. +--- +`token.service_provider.failed` | Triggered when, for a given service provider, the token creation is unsuccessful due to any reason. + +> **INFO** +> +> +> **Handy Tips** +> +> In case of network tokenised cards, the last 4 digits will be of the tokenised card and not the actual card. +> + +### token.initiated + +```json: Initiated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.initiated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "initiated", + "notes": [] + } + } + } +} +``` + +### token.service_provider.activated + +```json: Activated +{ + "entity": "event", + "account_id": "acc_BwStjpJx6XTnrr", + "event": "token.service_provider.activated", + "contains": [ + "token", + "service_provider_token", + "customer" + ], + "payload": { + "token": { + "entity": { + "id": "token_P4te1r2wJWRw6u", + "customer_id": "cust_P3n4TvVcp9CjWr", + "method": "card", + "created_at": 1728030886, + "expired_at": 1827599399, + "status": "active", + "notes": [], + "source": "issuer", + "entity": "token", + "card": { + "last4": "3925", + "network": "MasterCard", + "type": "credit", + "cobranding_partner": null, + "issuer": "UTIB", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "544635553" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_P4te4IRw3GtimW", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "mastercard", + "interoperable": true, + "provider_data": { + "token_reference_number": "DM4MMC1IN0000000baba944fc96e4036bfa21e3977e4b1c5", + "payment_account_reference": "50016T4RAH5SPGJPQUPSSIQCG8P08", + "token_expiry_month": 11, + "token_expiry_year": 27 + }, + "status": "active" + } + ], + "customer": { + "id": "cust_P3n4TvVcp9CjWr", + "entity": "customer", + "name": null, + "email": "qa.testing@razorpay.com", + "contact": "CONTACT_MASKED", + "gstin": null, + "notes": [], + "created_at": 1727789397 + } + } + }, + "service_provider_token": { + "entity": [ + { + "id": "spt_P4te4IRw3GtimW", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "mastercard", + "interoperable": true, + "provider_data": { + "token_reference_number": "DM4MMC1IN0000000baba944fc96e4036bfa21e3977e4b1c5", + "payment_account_reference": "50016T4RAH5SPGJPQUPSSIQCG8P08", + "token_expiry_month": 11, + "token_expiry_year": 27, + "card": [] + }, + "status": "active", + "tokenised_terminal_id": "NSmfkEiYIuPnRg" + } + ] + }, + "customer": { + "entity": { + "id": "P3n4TvVcp9CjWr", + "email": "qa.testing@razorpay.com", + "contact": "CONTACT_MASKED" + } + } + }, + "created_at": 1728030889 +} +``` + +### Sample Payload for token.service_provider.activated as part of payment + +```json: Token activated as part of payment +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.service_provider.activated", + "contains": [ + "service_provider_token", + "token" + ], + "payload": { + "service_provider_token": { + "entity": { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "activated", + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2021 + } + } + }, + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "activated", + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2021 + } + }, + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "aggregator", + "provider_name": "razorpay", + "interoperable": false, + "status": "activated", + "provider_data": { + "expired_at": 1748716199 + } + } + ], + "expired_at": 1748716199, + "status": "activated", + "notes": [] + } + }, + "payment": { + "entity": { + "id": "pay_FPoJKWQQ8lK13n", + "entity": "payment", + "amount": 500000, + "currency": "INR", + "base_amount": 500000, + "status": "captured", + "order_id": "order_FPoIeimWki9j8A", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 190000, + "amount_transferred": 0, + "refund_status": "partial", + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 11800, + "tax": 1800, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "4827433" + }, + "created_at": 1597226379 + } + } + } +} +``` + +### token.service_provider.cancelled + +```json: Suspended +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.service_provider.cancelled", + "contains": [ + "service_provider_token", + "token" + ], + "payload": { + "service_provider_token": { + "entity": { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "suspended", + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2021 + } + } + }, + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "suspended", + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2021 + } + }, + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "aggregator", + "provider_name": "razorpay", + "interoperable": false, + "status": "activated", + "provider_data": { + "expired_at": 1748716199 + } + } + ], + "expired_at": 1748716199, + "status": "activated", + "notes": [] + } + } + } +} +``` + +### token.service_provider.deactivated + +```json: Deactivated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.service_provider.deactivated", + "contains": [ + "service_provider_token", + "token" + ], + "payload": { + "service_provider_token": { + "entity": { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "deactivated", + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2021 + } + } + }, + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "deactivated", + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2021 + } + } + ], + "expired_at": 1748716199, + "status": "deactivated", + "notes": [] + } + } + } +} +``` + +### token.service_provider.failed + +```json: Failed +{ + "event": { + "name": "token.service_provider.failed", + "id": "RNR8hMNdcxoOdE", + "service": "api-live", + "payload": { + "entity": "event", + "account_id": "acc_J4wp4KDwgP3sX4", + "event": "token.service_provider.failed", + "contains": [ + "token", + "service_provider_token" + ], + "payload": { + "token": { + "entity": { + "id": "token_RNR8fPcREzZ8If", + "customer_id": null, + "method": "card", + "created_at": 1759153135, + "expired_at": 1885487399, + "status": "failed", + "notes": { + "key1": "value3 new notes", + "key2": "value2" + }, + "source": "business", + "entity": "token", + "card": { + "last4": "7474", + "network": "Visa", + "type": "debit", + "cobranding_partner": null, + "issuer": "ICIC", + "international": false, + "emi": false, + "sub_type": "consumer", + "token_iin": "442305271" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_RCEc38VJqgSyQ9", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "visa", + "interoperable": true, + "provider_data": { + "token_reference_number": "6f6b884be604faab0b251106abd90d0a", + "payment_account_reference": "V0010014623136258585767285530", + "token_expiry_month": 9, + "token_expiry_year": 2029 + }, + "status": "failed", + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Failed to tokenise the card", + "source": "internal", + "step": "token_creation", + "reason": "token_creation_failed", + "metadata": "{}" + } + } + ], + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Failed to tokenise the card", + "source": "internal", + "step": "token_creation", + "reason": "token_creation_failed", + "metadata": "{}" + } + } + }, + "service_provider_token": { + "entity": [ + { + "id": "spt_RCEc38VJqgSyQ9", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "visa", + "interoperable": true, + "provider_data": { + "token_reference_number": "6f6b884be604faab0b251106abd90d0a", + "payment_account_reference": "V0010014623136258585767285530", + "token_expiry_month": 9, + "token_expiry_year": 2029, + "card": [] + }, + "status": "failed", + "tokenised_terminal_id": "KHoy17IpWjN99l", + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Failed to tokenise the card", + "source": "internal", + "step": "token_creation", + "reason": "token_creation_failed", + "metadata": "{}" + } + } + ] + } + }, + "created_at": 1759153136 + }, + "owner_id": "J4wp4KDwgP3sX4", + "owner_type": "merchant" + } +} +``` diff --git a/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor.md b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor.md new file mode 100644 index 00000000..59b8771d --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor.md @@ -0,0 +1,70 @@ +--- +title: TokenHQ - Business as Token Requestor +description: Know how to save customer card details as tokens using Razorpay's TokenHQ solution. +--- + +# TokenHQ - Business as Token Requestor + +Tokenisation is the process by which the original card number / Primary Account Number (PAN) is replaced with a surrogate value called a `token`. + +For example, you can securely save a customer's card details during the first transaction in the form of a token. For the next transaction, the customer does not need to re-enter the card details. They can just provide the OTP and use their saved card to complete the transaction. + +The advantages of using tokens are: +- Faster checkout experience for the customers. +- Reduction in payment failures due to incorrect card details. + +## RBI Guidelines on Tokenisation + +According to the recent RBI guidelines on Card Tokenisation, Payment Aggregators (PA)/ Payment Gateway (PG) and businesses cannot save their customers' card numbers and other card data on their servers. + +Given below are some of the key takeaways from the guidelines: +- Card networks and card issuers are the only parties that can now save plain text cards. Businesses, Payment Gateways and Payment Aggregators are no longer allowed to store actual customer card details. +- To continue offering customers a 'saved card experience', businesses need to adopt a tokenisation solution. +- The token will not be visible to the cardholder. It will be managed between the Token Requestor and Network. +- Customer consent and additional factor of authentication (AFA) is required for saving a card / creating a token. This can be clubbed with the same 2FA used during the first transaction. + +## Razorpay TokenHQ + +In absence of tokenisation, your customers will not be able to avail a 'saved card experience' at checkout. Razorpay introduces an end-to-end RBI-compliant solution, TokenHQ, that allows you to save customer credentials as `tokens` with card networks and card-issuing banks. Customers can then use these `tokens` to make repeat purchases on your website, without re-entering card details. + +With TokenHQ, you can: +- Process payments through any PA/PG while tokenising cards through Razorpay. +- Use Razorpay Optimizer to route payments through the PA/PG of your choice. + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature and available only to PCI-compliant merchants. [Get in touch](https://razorpay.com/support/) with us to get this feature enabled on your account. +> + +**Onboard as a Token Requestor** + +In this flow, you will be onboarded with card networks and Issuers as token requestors as well as a merchant. + +## Flow + +Given below is the first payment tokenisation flow: + +![Tokenisation flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-tokenisation.jpg.md) + +1. The customer consents to save a card on your website/app checkout. +2. The saved card consent is stored by Razorpay Token Requestor after successful authentication of the transaction. +3. We initiate the tokenisation request at checkout. +4. The Card Network or issuing bank returns a unique Token corresponding to the tokenisation request, to the customer through Razorpay. + +Given below is the subsequent payment tokenisation flow: + +![Subsequent payment Tokenisation flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-tokenisation-subsequent-payment.jpg.md) + +1. The customer initiates payment using the token. +2. We automatically fetch the token cryptogram from the Card Network or the issuing bank. +3. The payment is initiated and processed using token cryptogram. +4. The payment is either processed or cancelled. + +### Related Information + +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/apis.md) +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/webhooks.md) +- [Tokenisation FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq.md) diff --git a/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/additional-information.md b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/additional-information.md new file mode 100644 index 00000000..39250a23 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/additional-information.md @@ -0,0 +1,12 @@ +--- +title: Additional Information +description: List of important points regarding tokenisation. +--- + +# Additional Information + +Given below are important points pertaining to tokenisation: + +- In case of network tokenised cards, the payment and the card entity will return the last 4 digits of the tokenised card and not the actual card. +- If there have been multiple tokenisation requests on a card, different tokens will be created. +- MasterCard and RuPay are instantly available after go-live for tokenisation. However, Visa will take 5 days for activation after go-live. diff --git a/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/apis.md b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/apis.md new file mode 100644 index 00000000..67d8d748 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/apis.md @@ -0,0 +1,840 @@ +--- +title: Tokenisation APIs +description: List of APIs to tokenise customer cards. +--- + +# Tokenisation APIs + +According to recent Payment Acquirer (PA)/ Payment Gateway (PG) guidelines from RBI, businesses cannot save their customers' card numbers and other card data on their servers. Razorpay TokenHQ is a RBI-compliant solution that allows you to save customer credentials with card networks and card-issuing banks. You can use Razorpay Optimizer to route payments through the PA/PG of your choice. + +## List of APIs + +Given below is the list of APIs: + +1. [Tokenise cards](#1-tokenise-cards). + - [Token Entity](#token-entity) + - [Create a token](#11-create-a-token) + - [Fetch card properties of an existing token](#12-fetch-card-properties-of-an-existing-token) + - [Delete a token](#13-delete-a-token) +2. [Initiate payment using token saved with Razorpay](#2-initiate-payment-using-token-saved-with-razorpay). +3. [Initiate Payment on Razorpay with token created on another PA/PG](#3-initiate-payment-on-razorpay-with-token-created). +4. [Save card to vault token while making a payment on Razorpay](#4-save-card-to-vault-token-while-making). + +## 1. Tokenise Cards + +You can save customer card details in the form of tokens and then use these tokens to accept payments from customers. + +### Token Entity + +Given on the right is a sample entity. + +```json: Entity +{ + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "active", + "status_reason": null, + "notes": [] +} +``` + +`id` +: `string` The unique identifier of the Razorpay token. + +`entity` +: `string` The name of the entity. Here, it is `token`. + +`customer_id` +: `string` This is the Razorpay customer id. You can create token for a specific customer using their customer id. Use the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md) to create customer id. This is an optional parameter. + +`method` +: `string` The type of object that was tokenised. Currently, it only supports `card`. + +`card` +: `object` The customer card details. + + `last4` + : `string` The last 4 digits of the tokenised card. + + `network` + : `string` The card network. Possible values: + - `Visa` + - `RuPay` + - `MasterCard` + - `American Express` + - `Diners Club` + - `Maestro` + - `JCB` + - `Union Pay` + + `issuer` + : `string` The 4-character issuer code unique to each issuing bank in India. For example, `HDFC`, `SBIN` and so on. + + `type` + : `string` The type of card. Possible values: + - `credit` + - `debit` + - `prepaid` + + `international` + : `boolean` Indicates whether the card is international (issued outside India) or domestic. Possible values: + - `true`: The card is international. + - `false`: The card is domestic. + + `emi` + : `boolean` Indicates whether the card is eligible for EMI payments or not. Possible values: + - `true`: The card is eligible for EMI payments. + - `false`: The card is not eligible for EMI payments. + + `sub_type` + : `string` The card sub_type for the given IIN. Pricing of card payment may change on the basis of card type. Possible values: + - `consumer` + - `business` + - `unknown` + +`compliant_with_tokenisation_guidelines` +: `boolean` Indicates whether the token is compliant with the RBI guidelines. Possible values: + - `true`: The token is compliant with RBI guidelines. + - `false`: The token is not compliant with RBI guidelines. + +`expired_at` +: `string` The expiry timestamp for the token. + +`status` +: `string` The overall status for the token. Possible values: + - `initiated`: The token attains this state after Razorpay has received the tokenisation request and is working with token service providers for creating the token. + - `active` - The token attains this state if the token is activated for at least one of the token service providers. + - `suspended` - The token attains this state if: +- The token is not activated for any one of the token service providers. +- The token is suspended for at least one of the token service providers. + - `deactivated`- The token attains this state if the token is not active/suspended for any one of the token service providers and is deactivated for at least one token service provider. Know about the complete list of [token states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/token-lifecycle.md). + +`status_reason` +: `string` When the token reaches the deactivated state, this field will provide the reason for deactivation. Possible values: + - `expired` + - `deactivated_by_bank` + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.1 Create a Token + +A token is an alias for the actual card number. Use this API to save your customer's card. + +As per RBI guidelines, customer consent and AFA (3ds authentication) are mandatory for saving a card. +- This API should be called only after authentication is complete. Authentication can be processed through any payment processor. +- You will receive a token as a response. + +> **INFO** +> +> +> **Handy Tips** +> +> For cases where all the card details are identical (duplicate requests), the API will return a new token. +> + +> **WARN** +> +> +> **Watch Out** +> +> This API is only available to businesses that are TRs. +> + + /tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/tokens +-H "content-type: application/json" +-d'{ + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "number": "4386289407660153", + "cvv": "", + "expiry_month": "12", + "expiry_year": "30", + "name": "Gaurav Kumar" + }, + "authentication": { + "provider": "razorpay", + "provider_reference_id": "pay_123wkejnsakd", + "authentication_reference_number": "100222021120200000000742753928" + }, + "notes": [] +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject tokenRequest = new JSONObject(); +tokenRequest.put("customer_id","cust_1Aa00000000001"); +tokenRequest.put("method","card"); + +JSONObject card = new JSONObject(); +card.put("number","4386289407660153"); +card.put("cvv",""); +card.put("expiry_month","12"); +card.put("expiry_year","30"); +card.put("name","Gaurav Kumar"); + +tokenRequest.put("card",card); + +JSONObject authentication = new JSONObject(); +authentication.put("provider","razorpay"); +authentication.put("provider_reference_id","pay_123wkejnsakd"); +authentication.put("authentication_reference_number","100222021120200000000742753928"); +tokenRequest.put("authentication",authentication); + +Token token = instance.token.create(tokenRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->token->create(array( + "customer_id" => "cust_1Aa00000000001", + "method" => "card", + "card" => array( + "number" => "4386289407660153", + "cvv" => "", + "expiry_month" => "12", + "expiry_year" => "30", + "name" => "Gaurav Kumar" + ), + "authentication" => array( + "provider" => "razorpay", + "provider_reference_id" => "pay_123wkejnsakd", + "authentication_reference_number" => "100222021120200000000742753928" + ), + "notes" => array() +)); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": map[string]interface{}{ + "number": "4386289407660153", + "cvv": "", + "expiry_month": "12", + "expiry_year": "30", + "name": "Gaurav Kumar" + }, + "authentication": map[string]interface{}{ + "provider": "razorpay", + "provider_reference_id": "pay_123wkejnsakd", + "authentication_reference_number": "100222021120200000000742753928" + }, + "notes": [] +} +body, err := client.Token.Create(data, nil); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.tokens.create({ + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "number": "4386289407660153", + "cvv": "", + "expiry_month": "12", + "expiry_year": "30", + "name": "Gaurav Kumar" + }, + "authentication": { + "provider": "razorpay", + "provider_reference_id": "pay_123wkejnsakd", + "authentication_reference_number": "100222021120200000000742753928" + }, + "notes": [] +}); +``` + +```json: Response +{ + "id": "token_IJmat4GwYATMtx", + "entity": "token", + "method": "card", + "card": { + "last4": "0153", + "network": "Visa", + "type": "credit", + "issuer": "IDFB", + "international": false, + "emi": false, + "sub_type": "consumer" + }, + "expired_at": 1701368999, + "compliant_with_tokenisation_guidelines": true, + "status": "active", + "notes": [] +} +```json: Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The card number is invalid.", + "source": "business", + "step": "token_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "number" + } +} +``` + +#### Request Parameters + +`customer_id` _optional_ +: `string` The unique identifier of the customer created using [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md). + +`method` _mandatory_ +: `string` The type of object that needs to be tokenised. Currently, `card` is the only supported value. + +`card` _mandatory_ +: `object` The card details. + + `number` + : `string` The card number. If the card number has spaces, it will be trimmed by Razorpay for further processing. + + `cvv` + : `string` The card CVV. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `expiry_month` + : `string` The card expiry month in `mm` format. + + `expiry_year` + : `string` The card expiry year in `yy` or `yyyy` format. + + `name` + : `string` The cardholder's name. + +`authentication` +: `object` Token authentication details. + + `provider` + : `string` The platform through which authentication was processed. Possible values: + - `amex` + - `axis_migs` + - `cashfree` + - `ccavenue` + - `cybersource` + - `first_data` + - `fss` + - `hdfc` + - `mpgs` + - `paysecure` + - `paytm` + - `payu` + - `zakpay` + + `provider_reference_id` + : `string` The unique payment identifier of the payment used to collect AFA on any PA/PG. + + `authentication_reference_number` _conditional_ + : `string` A unique reference number generated when authentication is initiated. The maximum length supported is 26 characters. This field is mandatory for RuPay cards only after June 30, 2022. + +> **WARN** +> +> +> **Watch Out!** +> +> For tokenising RuPay cards, you will need to provide the authRefNo provided by NPCI during the payment where AFA was collected from card_holder for tokenising the card. The validity of authRefNo is up to a few minutes. +> + +#### Error Codes + +Given below is a list of sample error codes: + +**Scenario 1: When any mandatory field is empty** + + - Code: BAD_REQUEST_ERROR + - Description: The `` is required + - Source: internal + - Step: token_initiation + - Reason: input_validation_failed + - Field: number + +**Scenario 2: When cvv provided is invalid** + + - Code: BAD_REQUEST_ERROR + - Description: The cvv must be between 3 and 4 digits + - Source: business + - Step: payment_initiation + - Reason: input_validation_failed + - Field: cvv + +**Scenario 3: When the connection with token service provider times out** + + - Code: TOKEN_SERVICE_PROVIDER_TIMEOUT + - Description: There is an issue in connecting with the token service provider + - Source: service_provider + - Step: token_creation + - Reason: token_service_provider_timed_out + +### 1.2 Fetch Card Properties of an Existing Token + +Use this API to retrieve card details such as network, issuer and so on for a given token. + +/tokens/fetch + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/tokens/fetch +-H "content-type: application/json" +-d'{ + "id": "token_4lsdksD31GaZ09" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject productRequest = new JSONObject(); +productRequest.put("id","token_4lsdksD31GaZ09") + +Token token = instance.token.fetch(productRequest); + +```php:PHP +$api = new Api($key_id, $secret); + +$api->token->fetch(array("id" => "token_4lsdksD31GaZ09")); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "id" : "token_4lsdksD31GaZ09", +} +body, err := client.Token.FetchCardPropertiesByToken(data, nil); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.tokens.fetch({"id": "token_4lsdksD31GaZ09"}); + +```json: Response +{ + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "active", + "status_reason": null, + "notes": [] +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the token. + +### 1.3 Delete a Token + +Use the following API to delete a token already saved with Razorpay. + +/tokens/delete + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X https://api.razorpay.com/v1/tokens/delete +-H "content-type: application/json" +-d '{ + "id" : "token_4lsdksD31GaZ09" +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject productRequest = new JSONObject(); +productRequest.put("id","token_4lsdksD31GaZ09") + +List token = instance.token.delete(productRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->token->delete(array("id" => "token_4lsdksD31GaZ09")); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "id" : "token_4lsdksD31GaZ09", +} + +body, err := client.Token.DeleteToken(data, nil); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.tokens.delete({"id": "token_4lsdksD31GaZ09"}); + +```json: Response +[] +``` + +#### Request Parameter + +`id` _mandatory_ +: `string` The unique identifier of the token to be deleted. + +## 2. Initiate Payment using Token saved with Razorpay + +Use this API to make the payment when a customer initiates a subsequent payment using the saved card. Pass the token ID from the previous API request to initiate a payment using the token. + +/payments/create/json + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The payment amount you want to collect from the customer. + +`currency` _mandatory_ +: `string` The 3-character ISO code of the currency. Here, it is `INR`. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created for this payment. Create an order using the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`email` _mandatory_ +: `string` The customer's email address. + +`contact` _mandatory_ +: `string` The customer's phone number. + +`method` _mandatory_ +: `string` The payment method. Here, it is `card`. + +`token` _mandatory_ +: `string` The unique identifier of the token. + +`card` _mandatory_ +: `object` The details of the card. + + `cvv` _mandatory_ + : `string` The card's cvv. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "order_id": "order_Fg6IGePNMKDICF", + "contact": "9090909090", + "method": "card", + "token": "token_IJr7WSRFECVBSX", + "card": { + "cvv": "" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' + +```json: Response +{ + "razorpay_payment_id": "pay_IFCxyfBO08Lmb4", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/IFCxyfBO08Lmb4/authenticate" + } + ] +} +``` + +## 3. Initiate Payment on Razorpay with Token Created on another PA/PG + +Use this API to create a payment with token saved on another PA/PG. + +/payments/create/json + +``` curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "card": { + "number": "4154980604708430", + "expiry_month": "12", + "expiry_year": "30", + "name": "Gaurav Kumar", + "cryptogram_value": "as34ag3h78dsdasdsd1", + "cvv": "", + "tokenised": true, + "token_provider": "payu" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' + +```json: Response +{ + "razorpay_payment_id": "pay_IFCxyfBO08Lnb4", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/IFCxyfBO08Lmb4/authenticate" + } + ] +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The payment amount you want to collect from the customer. + +`currency` _mandatory_ +: `string` The 3-character ISO code of the currency. Here, it is `INR`. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created for this payment. Create an order using the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`email` _mandatory_ +: `string` The customer's email address. + +`contact` _mandatory_ +: `string` The customer's phone number. + +`method` _mandatory_ +: `string` The payment method. Here, it is `card`. + +`card` _mandatory_ +: `object` The details of the card. + + `number` _mandatory_ + : `string` If payment is made using an actual card, then this field should have the entire actual card number. If card number has spaces, they will be trimmed by Razorpay for further processing. If payment is made using a network token, then this field should have the token number. If token number has spaces, they will be trimmed by Razorpay for further processing. + + `expiry_month` _mandatory_ + : `string` If payment is made using an actual card, then this field should have the 2-digit expiry month for the card. If payment is made using a network token, then this field should have the 2-digit expiry month for the token. + + `expiry_year` _mandatory_ + : `string` If payment is made using an actual card, then this field should have the 2 or 4-digit expiry year for the card. If payment is made using a network token, then this field should have the 2 or 4-digit expiry year for the token. + + `cryptogram_value` _mandatory_ + : `string` The cryptogram value for the token. This will be provided by the entity which provided the token. This field is mandatory if `tokenised_card=true`. + + `tokenised` _mandatory_ + : `boolean` Indicates if the payment is made using tokenised card or actual card. Possible values: + - `true`: Pass `true` when you are making the payment using a token. + - `false` (default): Pass `false` when you are making the payment using a card. + + `token_provider` _mandatory_ + : `string` The name of the aggregator that provided the token. Possible values: + - `amex` + - `axis_migs` + - `cashfree` + - `ccavenue` + - `cybersource` + - `first_data` + - `fss` + - `hdfc` + - `mpgs` + - `paysecure` + - `paytm` + - `payu` + - `zakpay` + + `cvv` _mandatory_ + : `string` The card's cvv. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +## 4. Save Card to Vault Token While Making a Payment on Razorpay + +If you are using Razorpay to process the first payment from a new card, do not call the tokenisation API. Instead, initiate the existing Razorpay Payment API, with an additional parameter `save=true`. This avoids two API requests and processes payments faster. + +Use the following API to save card details while making a payment: + +/payments/create/json + +```curl: Request +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "card": { + "number": "4854980604708430", + "cvv": "123", + "expiry_month": "12", + "expiry_year": "30", + "name": "Gaurav Kumar" + }, + "save": true, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' +```json: Response +{ + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/FVmAtLUe9XZSGM/authorize" + }, + { + "action": "otp_generate", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate?track_id=FVmAtLUe9XZSGM&key_id=" + } + ] +} +``` + +Redirect the customer to the URL given in the response to complete the authentication. + +#### Fetch a Payment API for Token Information + +The token will be created only if the cardholder successfully completes 3ds authentication. + +Use the Fetch Payment API to fetch the token. + +/payments/\{pay_id\} + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/payments/pay_DG4ZdRK8ZnXC3k +-H "content-type: application/json" +```json: Response +{ + "id": "pay_IJuRCejcSCxf2L", + "entity": "payment", + "amount": 500000, + "currency": "INR", + "status": "created", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": "Test payment", + "card_id": "card_IJr7VIQUzucNc2", + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919090909090", + "token_id": "token_IJr7WSRFECVBSX", + "notes": { + "note_key": "value1" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "033814379298", + "authentication_reference_number": "100222021120200000000742753928" + }, + "created_at": 1636549176, + "reference17": null +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment. diff --git a/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/iin-validation.md b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/iin-validation.md new file mode 100644 index 00000000..eb0cc9de --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/iin-validation.md @@ -0,0 +1,112 @@ +--- +title: IIN/BIN Validations on Tokens +description: API to fetch card properties using token IIN. +--- + +# IIN/BIN Validations on Tokens + +> **WARN** +> +> +> **Watch Out** +> +> - As per RBI guidelines, businesses and payment acquirers are allowed to save the last 4 card digits and the Bank Identification Number (BIN) only. +> - As per current interpretation, businesses and Payment Acquirer are not allowed to save the Issuer Identification Number (IIN) IN of the card.* + +> *Razorpay is seeking clarification on this from the industry and RBI. +> + +## Token IIN API + +A token is an alias or surrogate value for the actual card number. Whenever the network tokenises a card, the token generated will be a numeric value with the same length as the actual card number. + +#### For Example + +Card Number | Token +--- +4386 2894 0766 0153 | 4123 4511 1111 1117 + +When a card is tokenised, the first 6 digits or the IIN of the card gets changed. +The new IIN for the card is referred to as token IIN. + +Use the following API to fetch the properties of the card using token IIN. + +/iins/:token_iin + +#### Path Parameter + +`token_iin` _mandatory_ +: `integer` The token IIN. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/iins/412345 +-H "content-type: application/json" + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String tokenIin = "412345"; + +Iin token = instance.iin.fetch(tokenIin); + +```php: PHP +$api = new Api($key_id, $secret); + +$tokenIin = "412345"; +$api->iin->fetch($tokenIin); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +tokenIin := "412345" + +body, err := client.Iin.Fetch(tokenIin, nil, nil) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var tokenIin = "412345"; + +instance.iins.fetch(tokenIin); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string tokenIin = "412345"; + +Iin iin = client.Iin.Fetch(tokenIin); + +```json: Response +{ + "iin": "412345", + "entity": "iin", + "network": "Visa", + "type": "credit", + "sub_type": "business", + "issuer_code": "HDFC", + "issuer_name": "HDFC Bank Ltd", + "international": false, + "is_tokenized": true, + "card_iin": "438628", + "emi":{ + "available": true + }, + "recurring": { + "available": true + }, + "authentication_types": [ + { + "type":"3ds" + }, + { + "type":"otp" + } + ] +} +``` + +### Related Information + +- [Fetch Card IIN Information API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/cards/iin-api.md) diff --git a/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/token-lifecycle.md b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/token-lifecycle.md new file mode 100644 index 00000000..4392dd83 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/token-lifecycle.md @@ -0,0 +1,45 @@ +--- +title: Token Lifecycle +description: Know about the different states attained by tokens. +--- + +# Token Lifecycle + +A token goes through various states in its lifecycle. + +> **INFO** +> +> +> **Handy Tips** +> +> - Status will be available for the service provider token and the overall token entity. +> - The status of overall token entity is derived from the individual service provider tokens. +> - You may choose to consume one of them based on your integration. +> +> + +Given below is a diagram representing the token lifecycle: + +![Token Lifecycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-token-hq-token-lifecycle.jpg.md) + +## Overall Token States + +A token can have following statuses: + +Status | Description +--- +**initiated** | This is the token's primary state. This status indicates that Razorpay is working with token service providers to create the token. It may take a few seconds for the token to move to the `active` state. +--- +**active** | The token reaches the `active` state when the token is successfully created and activated by a token service provider, that is, card networks. A token in `active` status can be used for payment processing. +--- +**suspended** | The status changes to `suspended` when the token is suspended temporarily by the card issuing bank or network. A suspended token may become active later. A suspended token cannot be used for payment processing. +--- +**failed** | The token status will be `failed` when Razorpay fails to create the token with the token service providers due to: +• The card not being eligible. +• The issue not being supported. +• An invalid card number. +--- +**deactivated** | Status will be `deactivated` when: +• The token has expired. +• The token is deactivated by the bank. + A deactivated token cannot become active again, and cannot be used for payment processing. diff --git a/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/webhooks.md b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/webhooks.md new file mode 100644 index 00000000..c8f3b9ee --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/webhooks.md @@ -0,0 +1,293 @@ +--- +title: Tokenisation Webhooks +description: List of webhook events for token status updates. +--- + +# Tokenisation Webhooks + +Use Razorpay Webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. + +## Webhook Events for Token Status Updates + +The table below lists the webhook events available for tokens. + +Event | Description +--- +`token.initiated` | Triggered when the tokenisation request is initiated. +--- +`token.activated` | Triggered when: +• The token status is changed to active for the first time. +• The token status for a previously suspended token is changed to `active` again. +--- +`token.suspended` | Triggered when the issuing bank temporarily suspends a token. +--- +`token.deactivated` | Triggered when the token is permanently deactivated. +--- +`token.expiry_updated` | Triggered when the issuing bank updates the expiry date for a token. + +> **INFO** +> +> +> **Handy Tips** +> +> In case of network tokenised cards, the last 4 digits will be of the tokenised card and not the actual card. +> + +### token.initiated + +```json: Initiated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.initiated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "initiated", + "notes": [] + } + } + } +} +``` + +### token.activated + +```json: Activated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.activated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "active", + "notes": [] + } + } + } +} +``` + +### Sample Payload for token.activated as part of payment + +```json: Token activated as part of payment +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.activated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "active", + "notes": [] + } + }, + "payment": { + "entity": { + "id": "pay_FPoJKWQQ8lK13n", + "entity": "payment", + "amount": 500000, + "currency": "INR", + "base_amount": 500000, + "status": "captured", + "order_id": "order_FPoIeimWki9j8A", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 190000, + "amount_transferred": 0, + "refund_status": "partial", + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 11800, + "tax": 1800, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "4827433" + }, + "created_at": 1597226379 + } + } + } +} +``` + +### token.suspended + +```json: Suspended +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.suspended", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "suspended", + "notes": [] + } + } + } +} +``` + +### token.deactivated + +```json: Deactivated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.deactivated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "deactivated", + "notes": [] + } + } + } +} +``` + +### token.expiry_updated + +```json: Expiry updated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.expiry_updated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "active", + "notes": [] + } + } + } +} +``` diff --git a/llm-content/payments/payment-methods/cards/token-hq/push-tokenisation.md b/llm-content/payments/payment-methods/cards/token-hq/push-tokenisation.md new file mode 100644 index 00000000..714c916f --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/push-tokenisation.md @@ -0,0 +1,35 @@ +--- +title: Push Tokenisation +description: Enable your customers to save their cards directly through their bank's secure portal and enjoy seamless checkout experiences across multiple merchants. +--- + +# Push Tokenisation + +Push Tokenisation revolutionises how customers save their payment methods. Instead of entering card details at every business checkout, customers can now tokenise their cards once through their trusted bank portal and grant permissions to multiple businesses simultaneously. + +This innovation delivers a checkout experience similar to returning customers, without the friction of traditional card-saving methods. Customers complete the tokenisation during their card activation process at the bank, making transactions seamless from day one. + +## Advantages + +With Push Tokenisation, customers can experience: +- **Enhanced Security**: Card tokenisation happens through secure bank portals. +- **Increased Token Adoption**: Direct enablement during card activation ensures higher participation. +- **Partner Merchant Discovery**: Banks showcase partner merchants, helping businesses reach new customers. +- **Faster Checkout**: Customers skip entering card details, which saves time and helps improve conversion rates. + +## How it works + +Push Tokenisation creates a seamless connection between banks, businesses, and customers. + +1. Customer activates their card on the bank's portal. +2. Banks present a list of businesses during activation. +3. Customers select businesses to save their tokenised card with. +4. Businesses receive permission to use the tokenised card for future transations. +5. Customer enjoys saved card experience on Checkout. + +_Bank portal is powered by Razorpay for Razorpay exclusive banks._ + +## Related Information + +- [Integration Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/push-tokenisation/integration.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/push-tokenisation/faqs.md) diff --git a/llm-content/payments/payment-methods/cards/token-hq/push-tokenisation/faqs.md b/llm-content/payments/payment-methods/cards/token-hq/push-tokenisation/faqs.md new file mode 100644 index 00000000..ac735e5b --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/push-tokenisation/faqs.md @@ -0,0 +1,58 @@ +--- +title: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about the Push Tokenisation. +--- + +# Frequently Asked Questions (FAQs) + +### 1. What is Push Tokenisation? + + With Push Tokenisation, you can enable your customers to save their cards directly through their bank's secure portal and enjoy hasslefree checkout experience across multiple merchants. + + + +### 2. Can I use email instead of phone number? + + No, Push Tokenisation exclusively uses phone numbers as identifiers. This is a requirement from our banking partners to ensure consistent customer identification across systems. Make sure your checkout flow captures customer phone numbers. + + + +### 3. What if my integration only uses customer IDs? + + You will need to update your integration to collect phone numbers. We recommend: + - Adding phone number as a required field in your checkout. + - Updating existing customer records to include phone numbers. + - Using phone number as the primary identifier for token operations. + + + +### 4. How do I handle customers with multiple phone numbers? + + Tokens are linked to the specific phone number used during bank portal registration. Ensure customers use their registered phone number during checkout for successful token retrieval. + + + +### 5. Do all my customers automatically get Push Tokenisation? + + No, Push Tokenisation can be enabled only for customers who: + - Have cards from participating banks. + - Have opted for tokenisation through their bank portal. + - Have selected your business during the setup process. + + + +### 6. Which banks support Push Tokenisation? + + Push Tokenisation is supported by the following banks: Axis Bank, HDFC Bank, SBI Bank, RBL Bank, Yes Bank, Federal Bank, and Canara Bank. + + + +### 7. Is user consent required for token creation? + + Yes, user consent is required for saving a card/creating a token. This is done during push tokenisation on the bank's portal. + + + +### 8. Are the Saved Card feature and Tokenisation feature the same? + + Yes. As per the RBI guidelines, saved cards will be tokenised with networks and issuers to ensure compliance. diff --git a/llm-content/payments/payment-methods/cards/token-hq/push-tokenisation/integration.md b/llm-content/payments/payment-methods/cards/token-hq/push-tokenisation/integration.md new file mode 100644 index 00000000..a92c0094 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/push-tokenisation/integration.md @@ -0,0 +1,187 @@ +--- +title: Integrate Push Tokenisation +description: Steps to integrate Push Tokenisation with Standard Checkout, Custom Checkout and S2S. +--- + +# Integrate Push Tokenisation + +Integrating Push Tokenisation allows you to securely handle card details by converting them into tokens. Given below are the steps to integrate Push Tokenisation with Standard Checkout, Custom Checkout and S2S. + +## Prerequisites + +To integrate Push Tokenisation, you must: +- Have an active Razorpay Account +- Have a live payment integration such as Standard or Custom or S2S. + +Businesses must be onboarded with Razorpay to appear on bank portals for customer selection. The integration requirements vary by your current Razorpay implementation. + +## Standard Checkout + +**Integration Effort** - None. + +Razorpay provides a fully managed checkout experience with end-to-end control. To enable this feature for Standard Checkout, contact [Razorpay Support](https://razorpay.com/support/#request) for assistance. + +For more information, refer [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md) + +## Custom Checkout + +Existing Custom Checkout users are automatically eligible for Push Tokenisation. If your business has already integrated with Custom Checkout, you can retrieve all tokens associated with a cardholder by using the Fetch Token API. + +### Retrieve Token Via Fetch Token API + +You should continue using the same API. However, ensure that the user's phone number is provided in the same format as specified in the payload. You should pass this token to checkout to show customers the saved card details and help them complete the payment. + +Refer to the [Fetch Token API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-private.md) document for more information. + +> **WARN** +> +> +> **Watch Out!** +> +> While creating a customer, ensure that the phone number includes the country code and follows the specified format in the payload (for example, +919900990099) for accurate data mapping. +> + +## S2S (Server-to-Server) Integration + +**Integration Effort** - None. + +Current S2S Integration Users can use Push Tokenisation without modifications. Integrate with Razorpay’s webhook to receive and process push tokens. Enable relevant events to efficiently consume and manage these tokens. + +For more information, refer to the [S2S Integration - Tokenisation APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor/apis.md) documentation. + +## Third Party Solutions + +**Integration Effort** - Customised. + +Customised solutions are available based on specific requirements. Contact your Account Manager or raise a support request via [Razorpay Support](https://razorpay.com/support/#request) for assistance. + +## Implementation Requirements + +Push Tokenisation uses phone numbers as the unique customer identifier for fetch token operations, enabling seamless token sharing between banks and businesses. Email-only identification is not fully supported. + + +### Step 1 - Fetching Customer Tokens + + To be able to create tokens using Push Tokenisation, you must create a customer using phone number as the primary identifier. For more details, refer [Create a Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers/create.md). + The response will include all tokens the customer has authorised for your business account through their bank portal. + + + +### Step 2 - Webhook Enablement + + - **Event Configuration**: Confirm that the `token.service_provider.activated` event is enabled in your webhook configuration. This event captures successfully tokenised details, including push tokens. + - **Payload Mapping**: The event payload includes unique customer details. Ensure that you map these details with the unique customer identifier (in this case, phone number) when processing the data. + + +### Setting Up Webhooks for the First Time + +If you need to set up a webhook for the first time, follow these steps: + +1. Enable the following features: + - Ensure your Razorpay terminal is activated. + - Ensure tokenisation is activated for the relevant card networks. +2. Webhook Setup: + - Watch this [tutorial video](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) for detailed steps on setting up the webhook. + - Set Up Endpoint: Provide the URL of the endpoint where you want to receive webhook payloads. This should be the same endpoint used for storing token details during checkout. + - Whitelist Razorpay: Ensure your endpoint is configured to accept requests from Razorpay. + +3. The sample modified payload for push tokenisation with customer details + +## token.service_provider.activated + +```json: payload +{ + "entity": "event", + "account_id": "acc_EDUGNVWZIB7Ewb", + "event": "token.service_provider.activated", + "contains": [ + "token", + "service_provider_token" + "customer" + ], + "payload": { + "token": { + "entity": { + "id": "token_OGgK06YEVLnTc0", + "entity": "token", + "method": "card", + "card": { + "last4": "5003", + "network": "Visa", + "type": "credit", + "issuer": "ICICI", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "48202---", + "cobranding_partner": null + }, + "created_at": 1717066962, + "customer": { + "id": "cust_NgH3a3tGNtvCkA", + "entity": "customer", + "name": "Gaurav", + "email": "gaurav.kumar@example.com", + "contact": "+919900990099", + "gstin": null, + "notes": { + "notes_key_1": "Tea, Earl Grey", + "notes_key_2": "Tea, Earl" + }, + "created_at": 1709117745 + }, + "expired_at": 1853951399, + "status": "active", + "notes": [], + "source": "issuer", + "customer_id": "cust_NgH3a3--tvCkA", + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_OGgK1--ST1rE9", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "visa", + "interoperable": true, + "provider_data": { + "token_reference_number": "676dd1c68e5e24a48f1518ccee092a0b", + "payment_account_reference": "V0010015821281661606691594406", + "token_expiry_month": 9, + "token_expiry_year": 2028 + }, + "status": "active" + } + ] + } + }, + "service_provider_token": { + "entity": [ + { + "id": "spt_OGgK1aR3ST1rE9", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "visa", + "interoperable": true, + "provider_data": { + "token_reference_number": "676dd1c68e5e24a48f1518ccee092a0b", + "payment_account_reference": "V0010015821281661606691594406", + "token_expiry_month": 9, + "token_expiry_year": 2028, + "card": [] + }, + "status": "active", + "tokenised_terminal_id": "IPjK2jYGlbH3jq" + } + ] + }, + "customer": { + "entity": { + "id": "NgH3a3tGNtvCkA", + "email": "example@gmail.com", + "contact": "9--------0" + } + } + }, + "created_at": 1717066964, +} +``` diff --git a/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens.md b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens.md new file mode 100644 index 00000000..a91f6781 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens.md @@ -0,0 +1,88 @@ +--- +title: Tokenise Cards when Razorpay is Token Requestor +description: Know how to save customer card details as tokens using Razorpay's TokenHQ solution. +--- + +# Tokenise Cards when Razorpay is Token Requestor + +Tokenisation is the process by which the original card number / Primary Account Number (PAN) is replaced with a surrogate value called a `token`. + +For example, you can securely save a customer's card details during the first transaction in the form of a token. For the next transaction, the customer does not need to re-enter the card details. They can just provide the OTP and use their saved card to complete the transaction. + +The advantages of using tokens are: +- Faster checkout experience for the customers. +- Reduction in payment failures due to incorrect card details. + +## RBI Guidelines on Tokenisation + +According to the recent RBI guidelines on Card Tokenisation, Payment Aggregators (PA)/ Payment Gateway (PG) and businesses cannot save their customers' card numbers and other card data on their servers. + +Given below are some of the key takeaways from the guidelines: +- Card networks and card issuers are the only parties that can now save plain text cards. Businesses, Payment Gateways and Payment Aggregators are no longer allowed to store actual customer card details. +- To continue offering customers a 'saved card experience', businesses should adopt a tokenisation solution. +- The token will not be visible to the cardholder. It will be managed between the Token Requestor and Network. +- Customer consent and additional factor of authentication (AFA) is required for saving a card / creating a token. This can be clubbed with the same 2FA used during the first transaction. + +## Razorpay Card Tokenisation Solution + +In absence of tokenisation, your customers will not be able to avail a 'saved card experience' at checkout. Razorpay introduces an end-to-end RBI-compliant solution that allows you to save customer credentials as tokens with card networks and card-issuing banks. Customers can then use these `tokens` to make repeat purchases on your website, without re-entering card details. + +With this solution, you can: +- Process payments through any PA/PG while tokenising cards through Razorpay. +- Use Razorpay Optimizer to route payments through the PA/PG of your choice. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +> **INFO** +> +> +> **Onboarding as Token Requestor** +> +> In this integration, you can choose to be a Token Requestor(TR) or work with Razorpay as the Token Requestor. +> + +> **INFO** +> +> +> **Data Localisation Guidelines** +> +> This integration complies with data localisation guidelines. +> + +## Flow + +Given below is the first payment tokenisation flow: + +![Tokenisation flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-tokenisation.jpg.md) + +1. The customer consents to save a card on your website/app checkout. +2. The saved card consent is stored by Razorpay Token Requestor after successful authentication of the transaction. +3. We initiate the tokenisation request at checkout. +4. The Card Network or issuing bank returns a unique Token corresponding to the tokenisation request, to the customer through Razorpay. + +Given below is the subsequent payment tokenisation flow: + +![Subsequent payment Tokenisation flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-tokenisation-subsequent-payment-rtr.jpg.md) + +1. The customer initiates payment using the token. +2. We automatically fetch the token cryptogram from the Card Network or the issuing bank. +3. The payment is initiated and processed using token cryptogram. +4. The payment is either processed or cancelled. + +### Related Information + +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/apis.md) +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/webhooks.md) +- [Tokenisation FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq.md) diff --git a/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/additional-information.md b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/additional-information.md new file mode 100644 index 00000000..39250a23 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/additional-information.md @@ -0,0 +1,12 @@ +--- +title: Additional Information +description: List of important points regarding tokenisation. +--- + +# Additional Information + +Given below are important points pertaining to tokenisation: + +- In case of network tokenised cards, the payment and the card entity will return the last 4 digits of the tokenised card and not the actual card. +- If there have been multiple tokenisation requests on a card, different tokens will be created. +- MasterCard and RuPay are instantly available after go-live for tokenisation. However, Visa will take 5 days for activation after go-live. diff --git a/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/alt-id-checkout.md b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/alt-id-checkout.md new file mode 100644 index 00000000..7d3c2a1a --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/alt-id-checkout.md @@ -0,0 +1,93 @@ +--- +title: Enable Guest Checkout Payments With Alt ID +description: Use Razorpay Alt ID feature and comply with RBI guidelines for guest checkout payments. +--- + +# Enable Guest Checkout Payments With Alt ID + +Razorpay offers Alternate Identifier (Alt id), a solution that is compliant with RBI guidelines for guest checkout payments. Alternate Identifier provides a smooth payment experience to customers. + +## Guest Checkout Payments Guidelines + +According to the RBI circular, if a customer manually enters the card details during the guest checkout (without saving the card information), the following guidelines must be adhered to: + +- Besides the card issuer and the network, the merchant or Payment Aggregator (PA) involved in the settlement of such transactions can save the data of a particular transaction for a maximum period of T+4 days (T being the transaction date) or till the settlement date, whichever is earlier. This data shall be used only for settlement of such transactions and must be deleted after that. + +- Entities in the transaction/payment chain shall deploy an alternate solution for handling guest checkout transactions by **October 31, 2023**. + +For RBI-compliant Guest Checkout payments, Razorpay will use an Alt id. Alt id is a unique code provided by card networks and issuers. It replaces the actual card number and supports all post-transaction activities such as refunds, settlements, and dispute handling. + +> **WARN** +> +> +> **Watch Out!** +> +> Alt id is not applicable for tokenised transactions. In such cases, as per the new tokenisation guidelines, the tokenised card number and cryptogram are used throughout the transaction's lifecycle. +> + +## FAQs + + +### 1. Is Razorpay compliant with RBI's guest checkout guidelines? + + Yes, Razorpay complies with RBI guidelines, facilitating guest checkout payments with the secure Alt id solution. + + + +### 2. What actions should I be taking to be compliant? + + Just like most of our features, you are automatically compliant with RBI's guest checkout regulations. + + + +### 3. I am a Juspay merchant. What should I do to ensure compliance? + + Juspay and Razorpay will take care of compliance on behalf of all Juspay merchants. No additional steps are required from your end. + + + +### 4. I use Razorpay Optimizer. How can I ensure that I am compliant? + + On behalf of all Optimizer merchants, Razorpay and your payment aggregator will take care of the compliance. No additional steps are required from your end. + + + +### 5. I have a direct integration with networks for tokenisation. How can I ensure compliance? + + In this case, you can consider either of the following: + - Approach 1 (Recommended). You continue to send us the card details. Razorpay will automatically: + - Generate Alt id in collaboration with networks. + - Process payments using Alt id. + You can continue to tokenise your card in this flow. + - Approach 2. You can generate an Alt id with networks and initiate a payment with Razorpay using these Alt details. For API details on this approach, please reach out to our [support team](https://razorpay.com/support/#request). + + +> **INFO** +> +> +> **Handy Tips** +> +> As per NPCI's specifications, Razorpay (payment processor) will be the token requestor for all Rupay-routed payments on Razorpay. In this case, you must pass clear card details to Razorpay. +> + + + + +### 6. What is Alt id? + + Alt id is a unique code provided by card networks and issuers. It replaces the actual card number and supports all post-transaction activities like refunds, settlements, and dispute handling. + + + +### 7. What are guest checkout payments? + + A guest checkout payment occurs when the cardholder enters the card details directly without the intention of saving the details. This can happen when: + - The card is not saved, and the user does not intend to save it. + - The card is being saved for the first time. + RBI has prohibited Payment Aggregators (PAs), Acquires, and Acquirer TSPs (gateways) from using the card number for guest checkout transactions, ensuring security and compliance. + + + +### 8. How do these changes affect the cardholder? + + With the introduction of Alt id and Alt cryptogram for each payment, we prioritise cardholder security. Alt id creates a safer environment for digital card payments. This means that Alt id enhances the benefits Razorpay offers to businesses and their users, contributing to a more secure and robust ecosystem for digital payments. diff --git a/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/apis.md b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/apis.md new file mode 100644 index 00000000..b9d0412d --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/apis.md @@ -0,0 +1,740 @@ +--- +title: Tokenisation APIs +description: List of APIs to tokenise customer cards. +--- + +# Tokenisation APIs + +According to recent Payment Acquirer (PA)/ Payment Gateway (PG) guidelines from RBI, businesses cannot save their customers' card numbers and other card data on their servers. Razorpay TokenHQ is a RBI-compliant solution that allows you to save customer credentials with card networks and card-issuing banks. You can use Razorpay Optimizer to route payments through the PA/PG of your choice. + +**PA/PGs supported by Razorpay Optimizer** +--- +• `amex` +• `axis_migs` +• `cashfree` +• `ccavenue` +• `cybersource` +• `first_data` +• `fss` +• `hdfc` +• `mpgs` +• `paysecure` +• `paytm` +• `payu` +• `zakpay` + +## List of APIs + +Given below is the list of APIs: + +1. Token APIs + - [Token Entity](#token-entity) + - [Fetch card properties of an existing token](#11-fetch-card-properties-of-an-existing-token) + - [Delete a token](#12-delete-a-token) +2. [Save card request along with payment](#2-save-card-request-along-with-payment) +3. [Initiate a payment using a previously created token](#3-initiate-payment-using-saved-token) +4. [Process a Payment on another PA/PG with Token Created on Razorpay](#4-process-a-payment-on-another-pa-pg) + +## 1. Tokenise Cards + +You can save customer card details in the form of tokens and then use these tokens to accept payments from customers. + +### Token Entity + +Given on the right is a sample entity. + +```json: Entity +{ + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "active", + "status_reason": null, + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2021 + }, + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect CVV", + "field": null, + "source": "bank", + "step": "token_creation", + "reason": "invalid_cvv", + "metadata": {} + } + }, + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "aggregator", + "provider_name": "razorpay", + "interoperable": false, + "status": "active", + "status_reason": null, + "provider_data": { + "expired_at": 1748716199 + }, + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect CVV", + "field": null, + "source": "bank", + "step": "token_creation", + "reason": "invalid_cvv", + "metadata": {} + } + } + ], + "expired_at": 1748716199, + "status": "active", + "status_reason": null, + "notes": [] +} +``` + +`id` +: `string` The unique identifier of the Razorpay token. + +`entity` +: `string` The name of the entity. Here, it is `token`. + +`customer_id` +: `string` This is the Razorpay customer id. You can create token for a specific customer using their customer id. Use the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md) to create customer id. This is an optional parameter. + +`method` +: `string` The type of object that was tokenised. Currently, it only supports `card`. + +`card` +: `object` The customer card details. + + `last4` + : `string` The last 4 digits of the tokenised card. + + `network` + : `string` The card network. Possible values: + - `Visa` + - `RuPay` + - MasterCard` + - `American Express` + - `Diners Club` + - `Maestro` + - `JCB` + - `Union Pay` + + `issuer` + : `string` The 4-character issuer code unique to each issuing bank in India. For example, `HDFC`, `SBIN` and so on. + + `type` + : `string` The type of card. Possible values: + - `credit` + - `debit` + - `prepaid` + + `international` + : `boolean` Indicates whether the card is international (issued outside India) or domestic. Possible values: + - `true`: The card is international. + - `false`: The card is domestic. + + `emi` + : `boolean` Indicates whether the card is eligible for EMI payments or not. Possible values: + - `true`: The card is eligible for EMI payments. + - `false`: The card is not eligible for EMI payments. + + `sub_type` + : `string` The card sub_type for the given IIN. Pricing of card payment may change on the basis of card type. Possible values: + - `consumer` + - `business` + - `unknown` + + `token_iin` + : `string` The token IIN provided by the card network. When a token is created with card networks such as Visa or MasterCard, this field will have the token IIN. This will be useful to fetch all the token properties so that you can apply your existing IIN validations and processing. This field will be absent when the token is created by a token service provider other than the card network. + +`compliant_with_tokenisation_guidelines` +: `boolean` Indicates whether the token is compliant with the RBI guidelines. Possible values: + - `true`: The token is compliant with RBI guidelines. + - `false`: The token is not compliant with RBI guidelines. + +`service_provider_tokens` +: `array` Every Razorpay token will have one or more token service providers(card networks, issuing banks or Razorpay). For each service provider, Razorpay will return a service provider token. This service provider token is the raw token returned by the token service provider (card network or issuer). Currently, we will have only card networks as token service providers. In future, a token may be created with more than one service provider. A token can be created with one or more of the following service providers: + +> **INFO** +> +> +> **Handy Tips** +> +> The `service_provider_tokens` object is an on-demand feature, made available only to PCI DSS compliant businesses. +> + + `id` + : `string` The unique identifier of the token. + + `entity` + : `string` The name of the entity. Here, it is `service_provider_token`. + + `provider_type` + : `string` The type of provider through which the token was created. Possible values: + - `network` + - `issuer` + - `aggregator` (When the token provider is Razorpay.) + + `provider_name` + : `string` The name of the provider through which the token was created. Possible values: + - `Visa` + - `MasterCard` + - `HDFC` + - `razorpay` + + `interoperable` + : `boolean` This field suggests if the token provided is interoperable across different acquirers. Possible values: + - `true`: The token is interoperable. + - `false`: The token is not interoperable. + + `status` + : `string` The current status for the token as provided by the token service provider. Possible values: + - `active` + - `suspended` + - `deactivated` + - `failed` + + Know about the complete list of [token states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/token-lifecycle.md). + + `status_reason` + : `string` When the token status is deactivated, this field will provide the reason for deactivation. Possible values: + - `expired` + - `deactivated_by_bank` + + `provider_data` + : `object` Service provider data. + + `token_reference_number` + : `string` The token reference number provider by the token provider. + + `payment_account_reference` + : `string` The unique card identifier provided by the token provider. If the `service_provider` is `network`, this identifier will be consistent for a given card across the card network ecosystem. + + `token_iin` + : `string` The IIN of the token thus created. The IIN will be helpful to fetch all the properties of the token and apply your existing IIN validations and processes. + + `token_expiry_month` + : `string` The expiry date for the token. The format used is `mm`. + + `token_expiry_year` + : `string` The expiry year for the token. The format used is `yyyy`. + + `error` + : `object` Details of error. + + `code` + : `string` Type of the error. + + `description` + : `string` Description of the error. + + `field` + : `string` Name of the parameter that caused the error. + + `source` + : `string` The point of failure in token creation. + + `step` + : `string` The stage where the failure occurred. + + `reason` + : `string` The exact error reason. + + `metadata` + : `object` Contains additional information about the request. + +`expired_at` +: `string` The expiry timestamp for the token. + +`status` +: `string` The overall status for the token. Possible values: + - `initiated`: The token attains this state after Razorpay has received the tokenisation request and is working with token service providers for creating the token. + - `active`: The token attains this state if the token is activated for at least one of the token service providers. + - `suspended`: The token attains this state if: + - The token is not activated for any one of the token service providers. + - The token is suspended for at least one of the token service providers. + - `deactivated`: The token attains this state if the token is not `active`/`suspended` for any one of the token service providers and is deactivated for at least one token service provider. + + Know about the complete list of [token states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/merchant-requestor-with-network-tokens/token-lifecycle.md#overall-token-states). + +`status_reason` +: `string` When the token reaches the `deactivated` state, this field will provide the reason for deactivation. Possible values: + - `expired` + - `deactivated_by_bank` + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.1 Fetch Card Properties of an Existing Token + +Use this API to retrieve card details such as network, issuer and so on for a given token. + +/tokens/fetch + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the token. + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/tokens/fetch +-H "content-type: application/json" +-d'{ + "id": "token_4lsdksD31GaZ09" +}' +```json: Response +{ + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "active", + "status_reason": null, + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2021 + }, + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect CVV", + "field": null, + "source": "bank", + "step": "token_creation", + "reason": "invalid_cvv", + "metadata": {} + } + }, + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "aggregator", + "provider_name": "razorpay", + "interoperable": false, + "status": "active", + "status_reason": null, + "provider_data": { + "expired_at": 1748716199 + }, + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect CVV", + "field": null, + "source": "bank", + "step": "token_creation", + "reason": "invalid_cvv", + "metadata": {} + } + } + ], + "expired_at": 1748716199, + "status": "active", + "status_reason": null, + "notes": [] +} + "expired_at": 1748716199, + "status": "active", + "status_reason": null, + "notes": [] +} +``` + +### 1.2 Delete a Token + +Use the following API to delete a token already saved with Razorpay. + +/tokens/delete + +#### Request Parameter + +`id` _mandatory_ +: `string` The unique identifier of the token to be deleted. + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X https://api.razorpay.com/v1/tokens/delete +-H "content-type: application/json" +-d '{ + "id" : "token_4lsdksD31GaZ09" +}' +```json: Response +[] +``` + +## 2. Save Card Request along with Payment + +> **INFO** +> +> +> **Handy Tips** +> +> This API is available for testing. +> + +You can create the token when your customer opts to save their card on your checkout during the first payment. As per RBI guidelines, you must collect customer consent to save their card. + +- Use the following API to save the customer card details and create a token. +- Pass an additional field `save=true` to save and tokenise the card. +- Use Razorpay Optimizer to route this payment to a PA/PG of your preference. + +/payments/create/json + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The payment amount you want to collect from the customer. + +`currency` _mandatory_ +: `string` The 3-character ISO code of the currency. Here, it is `INR`. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created for this payment. Create an order using the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`customer_id` _optional_ +: `string` Unique identifier of customer. + +`email` _mandatory_ +: `string` The customer's email address. + +`contact` _mandatory_ +: `string` The customer's phone number. + +`method` _mandatory_ +: `string` The payment method. Here, it is `card`. + +`card` _mandatory_ +: `object` The details of the card. + + `name` + : `string` The cardholder's name. + + `number` + : `string` The card number. + + `expiry_month` + : `string` The expiry month of the card in `mm` format. + + `expiry_year` + : `string` The expiry year of the card in `yy` format. + + `cvv` _mandatory_ + : `string` The card's cvv. + +`save` _mandatory_ +: `boolean` Pass this parameter to save the card details. Possible values: + - `true`: Saves the card details. + - `false`: Does not save the card details. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d'{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "customer_id": "cust_DtHaBuooGHTuyZ", + "method": "card", + "card": { + "number": "4854980604708430", + "cvv": "123", + "expiry_month": "12", + "expiry_year": "21", + "name": "Gaurav Kumar" + }, + "save": true, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' +```json: Response +{ + { + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/FVmAtLUe9XZSGM/authorize" + }, + { + "action": "otp_generate", + "url" : "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate?track_id=FVmAtLUe9XZSGM&key_id=" + } + ] +} +``` + +Redirect the customer to the above URL to complete the authentication. + +#### Fetch the Token Information + +The token is created only if the cardholder successfully completes 3DS authentication. + +Use the Fetch Payment API to fetch the token. + +/payments/`\{id\}`?expand[]=token + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/payments/pay_DG4ZdRK8ZnXC3k?expand[]=token +```json: Response +{ + "id": "pay_G8VQzjPLoAvm6D", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "captured", + "order_id": "order_G8VPOayFxWEU28", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Purchase Shoes", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_DitrYCFtCIokBO", + "notes": [], + "fee": 24, + "tax": 4, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "033814379298" + }, + "created_at": 1606985209, + "token": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "method": "card", + "card": { + "last4": "8430", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "333135" + }, + "expiry_month": 12, + "expiry_year": 2021, + "expired_at": 1748716199, + "status": "active" + } +} +``` + +## 3. Initiate Payment using Saved Token + +When a customer initiates a subsequent payment using the saved card, use this API to make the payment. + +- Pass the token ID from the previous API request to initiate a payment using the token. +- Use Razorpay Optimizer to route this payment to a PA/PG of your preference. + +/payments/create/json + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The payment amount you want to collect from the customer. + +`currency` _mandatory_ +: `string` The 3-character ISO code of the currency. Here, it is `INR`. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created for this payment. Create an order using the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`email` _mandatory_ +: `string` The customer's email address. + +`contact` _mandatory_ +: `string` The customer's phone number. + +`method` _mandatory_ +: `string` The payment method. Here, it is `card`. + +`token` _mandatory_ +: `string` The unique identifier of the token. + +`card` _mandatory_ +: `object` The details of the card. + + `cvv` _optional_ + : `string` The card's cvv. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "token" : "token_4lsdksD31GaZ09", + "card": { + "cvv": "123" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' +```json: Response +{ + { + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/FVmAtLUe9XZSGM/authorize" + }, + { + "action": "otp_generate", + "url" : "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate?track_id=FVmAtLUe9XZSGM&key_id=" + } + ] +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> Know more about the [S2S Integration payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2.md). +> + +## 4. Process a Payment on another PA/PG with Token Created on Razorpay + +To process a payment on the tokenised card on another PA/PG, you will need the token and relevant additional data for each token. +- The data required may vary for different networks. +- Use the API given below to obtain the token and the relevant data. +- You can pass this data to any PA/PG to process the payment. + +/tokens/service_provider_tokens/token_transactional_data + +#### Request Parameters + +`id` _mandatory_ +: `string` The unique identifier of the token. + +#### Response Parameters + +`token_number` +: `string` The unique reference number generated for the token. For example, `4016981500100002`. + +`cryptogram_value` +: `string` The token cryptogram value. + +`token_expiry_month` +: `integer` The token expiry month in `mm` format. + +`token_expiry_year` +: `integer` The token expiry year in `yyyy` format. + +`cvv` _amex only_ +: `integer` A dynamic 4-digit number printed on the front of the `Amex` card. This cvv should be passed in the CVV field to your PA/PG for processing the payment. + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/tokens/service_provider_tokens/token_transactional_data +-H "content-type: application/json" +-d '{ + "id": "spt_4lsdksD31GaZ09" +}' +```json: Response - Visa, MasterCard & RuPay +{ + "token_number": "4016981500100002", + "cryptogram_value": "a345345dfgdfasdfh45jtyhgjkyutsdasd2", + "token_expiry_month": 12, + "token_expiry_year": 2021 +} +```json: Response - Amex +{ + "token_number": "4016981500100002", + "cvv": "1234", + "token_expiry_month": 12, + "token_expiry_year": 2021 +} +```json: Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "The token is invalid.", + "source": "business", + "step": "get_cryptogram", + "reason": "invalid_token" + } +} +``` diff --git a/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/iin-validation.md b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/iin-validation.md new file mode 100644 index 00000000..57827037 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/iin-validation.md @@ -0,0 +1,170 @@ +--- +title: IIN/BIN Validations on Tokens +description: API to fetch card properties using token IIN. +--- + +# IIN/BIN Validations on Tokens + +> **WARN** +> +> +> **Watch Out** +> +> - As per RBI guidelines, businesses and payment acquirers are allowed to save the last 4 card digits and the Bank Identification Number (BIN) only. +> - As per current interpretation, businesses and Payment Acquirer are not allowed to save the Issuer Identification Number (IIN) of the card.* + +> *Razorpay is seeking clarification on this from the industry and RBI. +> + +## Token IIN API + +A token is an alias or surrogate value for the actual card number. Whenever the network tokenises a card, the token generated will be a numeric value with the same length as the actual card number. + +#### For Example + +Card Number | Token +--- +4386 2894 0766 0153 | 4123 4511 1111 1117 + +When a card is tokenised, the first 6 digits or the IIN of the card gets updated. +The new IIN for the card is referred to as token IIN. + +Use the following API to fetch the properties of the card using token IIN. + +/iins/:token_iin + +#### Path Parameter + +`token_iin` _mandatory_ +: `integer` The token IIN. + +#### Response Parameters + +`iin` +: `string` The Issuer Identification Number (IIN). The first 6 digits of credit or debit card number. For example, 438628. + +`entity` +: `string` The name of the entity. Here, it is iin. + +`network` +: `string` The card network for the given IIN. Possible values: + - `Visa` + - `RuPay` + - `MasterCard` + - `American Express` + - `Diners Club` + - `Maestro` + - `JCB` + - `Union Pay` + - `Unknown` + +`type` +: `string` The card type for the given IIN. The card payment pricing may differ based on the card type. Possible values: + - `credit` + - `debit` + - `prepaid` + - `unknown` + +`sub_type` +: `string` The card sub-type for the given IIN. The card payment pricing may differ based on the card sub-type. Possible values: + - `consumer` + - `business` + - `unknown` + +`international` +: `boolean` Determines whether the card is international (issued outside India) or domestic. Possible values: + - `true`: Card issued outside India. + - `false`: Card issued within India. + +`issuer_code` +: `string` The 4-character issuer code unique to each issuing bank in India. For example, SBIN. + +`issuer_name` +: `string` The name of the issuing bank. Available for cards issued in India only. For example, State Bank of India. + +`issuer_logo` +: `string` URL pointing to the logo of the issuing bank hosted on the Razorpay server. + +`emi` +: `json object` A JSON object which provides information about the applicability of EMI on the IIN. + +`recurring` +: `json object` A JSON object which provides information about the applicability of recurring payments on the IIN. + +`authentication_types` +: `array` Array which lists the possible authentication types for which the IIN is eligible. Possible values: + - `type`: 3ds: Indicates that the card IIN supports normal 3ds payments. + - `type`: otp: Indicates that the card IIN supports native OTP payments. Native OTP gives you flexibility to accept the OTP entered by the cardholder on your screen. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/iins/412345 +-H "content-type: application/json" + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String tokenIin = "412345"; + +Iin token = instance.iin.fetch(tokenIin); + +```php: PHP +$api = new Api($key_id, $secret); + +$tokenIin = "412345"; +$api->iin->fetch($tokenIin); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +tokenIin := "412345" + +body, err := client.Iin.Fetch(tokenIin, nil, nil) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var tokenIin = "412345"; + +instance.iins.fetch(tokenIin); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string tokenIin = "412345"; + +Iin iin = client.Iin.Fetch(tokenIin); + +```json: Response +{ + "iin": "412345", + "entity": "iin", + "network": "Visa", + "type": "credit", + "sub_type": "business", + "issuer_code": "HDFC", + "issuer_name": "HDFC Bank Ltd", + "international": false, + "is_tokenized": true, + "card_iin": "438628", + "emi":{ + "available": true + }, + "recurring": { + "available": true + }, + "authentication_types": [ + { + "type":"3ds" + }, + { + "type":"otp" + } + ] +} +``` + +### Related Information + +- [Fetch Card IIN Information API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/cards/iin-api.md) diff --git a/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/token-lifecycle.md b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/token-lifecycle.md new file mode 100644 index 00000000..5f95d509 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/token-lifecycle.md @@ -0,0 +1,70 @@ +--- +title: Token Lifecycle +description: Know about the different states attained by tokens. +--- + +# Token Lifecycle + +There are two types of tokens - service provider token and overall token. + +> **INFO** +> +> +> **Handy Tips** +> +> - Status will be available for the service provider token and the overall token entity. +> - The status of overall token entity is derived from the individual service provider tokens. +> - You may choose to consume one of them based upon your integration. +> +> + +Given below is a diagram representing the token lifecycle: + +![Token Lifecycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-token-hq-token-lifecycle.jpg.md) + +## Token States for Service Provider Token + +A service provider token will not have the `initiated` state. This is because the service provider token is created only when a token is successfully created. + +Status | Description +--- +**active** | The service_provider_token will have active status when the token is successfully created with token_service_providers (card networks). A service_provider_token in `active` status can be used for payment processing. +--- +**suspended** | The service_provider_token status changes to `suspended` when the token is suspended temporarily by the card issuing bank or network. A suspended token may be activated again by the token provider. A suspended token cannot be used for payment processing. +--- +**failed** | Razorpay failed to create the token with token service provider due to: +• The card not being eligible. +• The issue not being supported. +• An invalid card number. +--- +**deactivated** | The service provider token status will change to `deactivated` due to following reasons: +• service_provider_token has been deleted +• service_provider_token has expired +• service_provider_token is deactivated by bank. + + The exact reason for deactivation will be provided in the `status_reason` parameter. Possible values for status_reason are: +• expired +• deactivated_by_bank +A deactivated token cannot become active again and cannot be used for payment processing. + +## Overall Token States + +A token can have following statuses: + +Status | Description +--- +**initiated** | This is the token's primary state. This status indicates that Razorpay is working with token service providers to create the token. It may take a few seconds for the token to move to the `active` state. +--- +**active** | The token reaches the `active` state if the status of the service_provider_token is active for at least one of the token service providers. +--- +**suspended** | The token status changes to `suspended`: +• If status is not `active` for all the token service providers. +• If the token is in `suspended` state for at least one of the token service providers. +A `suspended` token cannot be used for payment processing. +--- +**failed** | The token status will be `failed` when the status is failed for all service providers. +--- +**deactivated** | Status will be `deactivated` when: +• Status is not active or suspended for all the token service providers. +• Status of the token is deactivated for at least one of the token service providers. + A deactivated token cannot be used for payment processing. diff --git a/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/webhooks.md b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/webhooks.md new file mode 100644 index 00000000..1e0359bd --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens/webhooks.md @@ -0,0 +1,539 @@ +--- +title: Tokenisation Webhooks +description: List of webhook events for token status updates. +--- + +# Tokenisation Webhooks + +Use Razorpay Webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. + +## Webhook Events for Token Status Updates + +The table below lists the webhook events available for tokens. + +Event | Description +--- +`token.initiated` | Triggered when tokenisation request is initiated. +--- +`token.service_provider.activated` | Triggered when, for a given service provider: +• The token status is changed to `activated` for the first time. +• The token status for a previously suspended token is changed to `activated` again. +--- +`token.service_provider.cancelled` | Triggered when, for a given service provider, the issuing bank temporarily suspends a token. +--- +`token.service_provider.deactivated` | Triggered when, for a given service provider, the issuing bank permanently deactivates a token. +--- +`token.service_provider.failed` | Triggered when, for a given service provider, the token creation is unsuccessful due to any reason. + +> **INFO** +> +> +> **Handy Tips** +> +> In case of network tokenised cards, the last 4 digits will be of the tokenised card and not the actual card. +> + +### token.initiated + +```json: Initiated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.initiated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "initiated", + "notes": [] + } + } + } +} +``` + +### token.service_provider.activated + +```json: Activated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.service_provider.activated", + "contains": [ + "service_provider_token", + "token" + ], + "payload": { + "service_provider_token": { + "entity": { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "activated", + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2021 + } + } + }, + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "activated", + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2021 + } + }, + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "aggregator", + "provider_name": "razorpay", + "interoperable": false, + "status": "activated", + "provider_data": { + "expired_at": 1748716199 + } + } + ], + "expired_at": 1748716199, + "status": "activated", + "notes": [] + } + } + } +} +``` + +### Sample Payload for token.service_provider.activated as part of payment + +```json: Token activated as part of payment +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.service_provider.activated", + "contains": [ + "service_provider_token", + "token" + ], + "payload": { + "service_provider_token": { + "entity": { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "activated", + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2021 + } + } + }, + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "activated", + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2021 + } + }, + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "aggregator", + "provider_name": "razorpay", + "interoperable": false, + "status": "activated", + "provider_data": { + "expired_at": 1748716199 + } + } + ], + "expired_at": 1748716199, + "status": "activated", + "notes": [] + } + }, + "payment": { + "entity": { + "id": "pay_FPoJKWQQ8lK13n", + "entity": "payment", + "amount": 500000, + "currency": "INR", + "base_amount": 500000, + "status": "captured", + "order_id": "order_FPoIeimWki9j8A", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 190000, + "amount_transferred": 0, + "refund_status": "partial", + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 11800, + "tax": 1800, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "4827433" + }, + "created_at": 1597226379 + } + } + } +} +``` + +### token.service_provider.cancelled + +```json: Suspended +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.service_provider.cancelled", + "contains": [ + "service_provider_token", + "token" + ], + "payload": { + "service_provider_token": { + "entity": { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "suspended", + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2021 + } + } + }, + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "suspended", + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2021 + } + }, + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "aggregator", + "provider_name": "razorpay", + "interoperable": false, + "status": "activated", + "provider_data": { + "expired_at": 1748716199 + } + } + ], + "expired_at": 1748716199, + "status": "activated", + "notes": [] + } + } + } +} +``` + +### token.service_provider.deactivated + +```json: Deactivated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.service_provider.deactivated", + "contains": [ + "service_provider_token", + "token" + ], + "payload": { + "service_provider_token": { + "entity": { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "deactivated", + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2021 + } + } + }, + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_1234abcd", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "Visa", + "interoperable": true, + "status": "deactivated", + "provider_data": { + "token_reference_number": "sas7wqaoidasdfssdjjk", + "payment_account_reference": "8324ssdas7wqaoidassdjjk", + "token_iin": "453335", + "token_expiry_month": 12, + "token_expiry_year": 2021 + } + } + ], + "expired_at": 1748716199, + "status": "deactivated", + "notes": [] + } + } + } +} +``` + +### token.service_provider.failed + +```json: Failed +{ + "event": { + "name": "token.service_provider.failed", + "id": "RNR8hMNdcxoOdE", + "service": "api-live", + "payload": { + "entity": "event", + "account_id": "acc_J4wp4KDwgP3sX4", + "event": "token.service_provider.failed", + "contains": [ + "token", + "service_provider_token" + ], + "payload": { + "token": { + "entity": { + "id": "token_RNR8fPcREzZ8If", + "customer_id": null, + "method": "card", + "created_at": 1759153135, + "expired_at": 1885487399, + "status": "failed", + "notes": { + "key1": "value3 new notes", + "key2": "value2" + }, + "source": "business", + "entity": "token", + "card": { + "last4": "7474", + "network": "Visa", + "type": "debit", + "cobranding_partner": null, + "issuer": "ICIC", + "international": false, + "emi": false, + "sub_type": "consumer", + "token_iin": "442305271" + }, + "compliant_with_tokenisation_guidelines": true, + "service_provider_tokens": [ + { + "id": "spt_RCEc38VJqgSyQ9", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "visa", + "interoperable": true, + "provider_data": { + "token_reference_number": "6f6b884be604faab0b251106abd90d0a", + "payment_account_reference": "V0010014623136258585767285530", + "token_expiry_month": 9, + "token_expiry_year": 2029 + }, + "status": "failed", + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Failed to tokenise the card", + "source": "internal", + "step": "token_creation", + "reason": "token_creation_failed", + "metadata": "{}" + } + } + ], + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Failed to tokenise the card", + "source": "internal", + "step": "token_creation", + "reason": "token_creation_failed", + "metadata": "{}" + } + } + }, + "service_provider_token": { + "entity": [ + { + "id": "spt_RCEc38VJqgSyQ9", + "entity": "service_provider_token", + "provider_type": "network", + "provider_name": "visa", + "interoperable": true, + "provider_data": { + "token_reference_number": "6f6b884be604faab0b251106abd90d0a", + "payment_account_reference": "V0010014623136258585767285530", + "token_expiry_month": 9, + "token_expiry_year": 2029, + "card": [] + }, + "status": "failed", + "tokenised_terminal_id": "KHoy17IpWjN99l", + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Failed to tokenise the card", + "source": "internal", + "step": "token_creation", + "reason": "token_creation_failed", + "metadata": "{}" + } + } + ] + } + }, + "created_at": 1759153136 + }, + "owner_id": "J4wp4KDwgP3sX4", + "owner_type": "merchant" + } +} +``` diff --git a/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor.md b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor.md new file mode 100644 index 00000000..b5a6508c --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor.md @@ -0,0 +1,88 @@ +--- +title: Tokenise Cards when Razorpay is Token Requestor +description: Know how to save customer card details as tokens using Razorpay's TokenHQ solution. +--- + +# Tokenise Cards when Razorpay is Token Requestor + +Tokenisation is the process by which the original card number / Primary Account Number (PAN) is replaced with a surrogate value called a `token`. + +For example, you can securely save a customer's card details during the first transaction in the form of a token. For the next transaction, the customer does not need to re-enter the card details. They can just provide the OTP and use their saved card to complete the transaction. + +The advantages of using tokens are: +- Faster checkout experience for the customers. +- Reduction in payment failures due to incorrect card details. + +## RBI Guidelines on Tokenisation + +According to the recent RBI guidelines on Card Tokenisation, Payment Aggregators (PA)/ Payment Gateway (PG) and businesses cannot save their customers' card numbers and other card data on their servers. + +Given below are some of the key takeaways from the guidelines: +- Card networks and card issuers are the only parties that can now save plain text cards. Businesses, Payment Gateways and Payment Aggregators are no longer allowed to store actual customer card details. +- To continue offering customers a 'saved card experience', businesses should adopt a tokenisation solution. +- The token will not be visible to the cardholder. It will be managed between the Token Requestor and Network. +- Customer consent and additional factor of authentication (AFA) is required for saving a card / creating a token. This can be clubbed with the same 2FA used during the first transaction. + +## Razorpay Card Tokenisation Solution + +In absence of tokenisation, your customers will not be able to avail a 'saved card experience' at checkout. Razorpay introduces an end-to-end RBI-compliant solution that allows you to save customer credentials as tokens with card networks and card-issuing banks. Customers can then use these `tokens` to make repeat purchases on your website, without re-entering card details. + +With this solution, you can: +- Process payments through any PA/PG while tokenising cards through Razorpay. +- Use Razorpay Optimizer to route payments through the PA/PG of your choice. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +> **INFO** +> +> +> **Onboarding as Token Requestor** +> +> In this integration, you can choose to be a Token Requestor(TR) or work with Razorpay as the Token Requestor. +> + +> **INFO** +> +> +> **Data Localisation Guidelines** +> +> This integration complies with data localisation guidelines. +> + +## Flow + +Given below is the first payment tokenisation flow: + +![Tokenisation flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-tokenisation.jpg.md) + +1. The customer consents to save a card on your website/app checkout. +2. The saved card consent is stored by Razorpay Token Requestor after successful authentication of the transaction. +3. We initiate the tokenisation request at checkout. +4. The Card Network or issuing bank returns a unique Token corresponding to the tokenisation request, to the customer through Razorpay. + +Given below is the subsequent payment tokenisation flow: + +![Subsequent payment Tokenisation flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-tokenisation-subsequent-payment-rtr.jpg.md) + +1. The customer initiates payment using the token. +2. We automatically fetch the token cryptogram from the Card Network of the issuing bank. +3. The payment is initiated and processed using token cryptogram. +4. The payment is either processed or cancelled. + +### Related Information + +- [Tokenisation APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/apis.md) +- [Tokenisation Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/webhooks.md) +- [Tokenisation FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq.md) diff --git a/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/additional-information.md b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/additional-information.md new file mode 100644 index 00000000..39250a23 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/additional-information.md @@ -0,0 +1,12 @@ +--- +title: Additional Information +description: List of important points regarding tokenisation. +--- + +# Additional Information + +Given below are important points pertaining to tokenisation: + +- In case of network tokenised cards, the payment and the card entity will return the last 4 digits of the tokenised card and not the actual card. +- If there have been multiple tokenisation requests on a card, different tokens will be created. +- MasterCard and RuPay are instantly available after go-live for tokenisation. However, Visa will take 5 days for activation after go-live. diff --git a/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/apis.md b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/apis.md new file mode 100644 index 00000000..7bc55d42 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/apis.md @@ -0,0 +1,500 @@ +--- +title: Tokenisation APIs +description: List of APIs to tokenise customer cards. +--- + +# Tokenisation APIs + +According to recent Payment Acquirer (PA)/ Payment Gateway (PG) guidelines from RBI, businesses cannot save their customers' card numbers and other card data on their servers. Razorpay TokenHQ is a RBI-compliant solution that allows you to save customer credentials with card networks and card-issuing banks. You can use Razorpay Optimizer to route payments through the PA/PG of your choice. + +**PA/PGs supported by Razorpay Optimizer** +--- +• `amex` +• `axis_migs` +• `cashfree` +• `ccavenue` +• `cybersource` +• `first_data` +• `fss` +• `hdfc` +• `mpgs` +• `paysecure` +• `paytm` +• `payu` +• `zakpay` + +## List of APIs + +Given below is the list of APIs: + +1. [Token APIs](#1-token-apis). + - [Token Entity](#token-entity) + - [Fetch card properties of an existing token](#11-fetch-card-properties-of-an-existing-token) + - [Delete a token](#12-delete-a-token) +2. [Save card request along with payment](#2-save-card-request-along-with-payment). +3. [Initiate a payment using a previously created token](#3-initiate-payment-using-saved-token). + +## 1. Token APIs + +Customer card details are saved in the form of tokens. These tokens are used to accept payments from customers. + +### Token Entity + +Given below is a sample entity. + +```json: Entity +{ + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "active", + "status_reason": null, + "notes": [] +} +``` + +`id` +: `string` The unique identifier of the Razorpay token. + +`entity` +: `string` The name of the entity. Here, it is `token`. + +`customer_id` +: `string` This is the Razorpay customer id. You can create token for a specific customer using their customer id. Use the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) to create customer id. + +`method` +: `string` The type of object that was tokenised. Currently, it only supports `card`. + +`card` +: `object` The customer card details. + + `last4` + : `string` The last 4 digits of the tokenised card. + + `network` + : `string` The card network. Possible values: + - `Visa` + - `RuPay` + - `MasterCard` + - `American Express` + - `Diners Club` + - `Maestro` + - `JCB` + - `Union Pay` + + `issuer` + : `string` The 4-character issuer code unique to each issuing bank in India. For example, `HDFC`, `SBIN` and so on. + + `type` + : `string` The type of card. Possible values: + - `credit` + - `debit` + - `prepaid` + + `international` + : `boolean` Indicates whether the card is international (issued outside India) or domestic. Possible values: + - `true`: The card is international. + - `false`: The card is domestic. + + `emi` + : `boolean` Indicates whether the card is eligible for EMI payments or not. Possible values: + - `true`: The card is eligible for EMI payments. + - `false`: The card is not eligible for EMI payments. + + `sub_type` + : `string` The card sub_type for the given IIN. Pricing of card payment may change on the basis of card type. Possible values: + - `consumer` + - `business` + - `unknown` + + `token_iin` + : `string` The unique token IIN. + +`compliant_with_tokenisation_guidelines` +: `boolean` Indicates whether the token is compliant with the RBI guidelines. Possible values: + - `true`: The token is compliant with RBI guidelines. + - `false`: The token is not compliant with RBI guidelines. + +`expired_at` +: `string` The expiry timestamp for the token. + +`status` +: `string` The overall status for the token. Possible values: + - `activated`: This status is attained if the token is activated for at least one of the token service providers. + - `suspended`: This status is attained if: + - The token is not activated for any one of the token service providers. + - The token is suspended for at least one of the token service providers. + - `deactivated`: This status is attained if token is not activated/suspended for any one of the token service providers and is deactivated for each token service provider. + +`status_reason` +: `string` When the token reaches the deactivated state, this field will provide the reason for deactivation. Possible values: + - `expired` + - `deactivated_by_bank` + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### 1.1 Fetch Card Properties of an Existing Token + +Use this API to retrieve card details such as network, issuer and so on for a given token. + +/tokens/fetch + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the token. + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/tokens/fetch +-H "content-type: application/json" +-d'{ + "id": "token_4lsdksD31GaZ09" +}' +```json: Response +{ + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "active", + "status_reason": null, + "notes": [] +} +``` + +### 1.2 Delete a Token + +Use the following API to delete a token already saved with Razorpay. + +/tokens/delete + +#### Request Parameter + +`id` _mandatory_ +: `string` The unique identifier of the token to be deleted. + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X https://api.razorpay.com/v1/tokens/delete +-H "content-type: application/json" +-d '{ + "id" : "token_4lsdksD31GaZ09" +}' +```json: Response +[] +``` + +## 2. Save Card Request along with Payment + +> **INFO** +> +> +> **Handy Tips** +> +> This API is available for testing. +> + +You can create the token when your customer opts to save their card on your checkout during the first payment. As per RBI guidelines, you must collect explicit customer consent to save their card. + +- Use the following API to save the customer card details and create a token. +- Pass an additional field `save=true` to save and tokenise the card. +- Use Razorpay Optimizer to route this payment to a PA/PG of your preference. + +/payments/create/json + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The payment amount you want to collect from the customer. + +`currency` _mandatory_ +: `string` The 3-character ISO code of the currency. Here, it is `INR`. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created for this payment. Create an order using the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`email` _mandatory_ +: `string` The customer's email address. + +`contact` _mandatory_ +: `string` The customer's phone number. + +`method` _mandatory_ +: `string` The payment method. Here, it is `card`. + +`card` _mandatory_ +: `object` The details of the card. + + `name` + : `string` The cardholder's name. + + `number` + : `string` The card number. + + `expiry_month` + : `string` The expiry month of the card in `mm` format. + + `expiry_year` + : `string` The expiry year of the card in `yy` format. + + `cvv` _mandatory_ + : `string` The card's CVV. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + +`save` _mandatory_ +: `boolean` Pass this parameter to save the card details. Possible values: + - `true`: Saves the card details. + - `false`: Does not save the card detail. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "card": { + "number": "4854980604708430", + "cvv": "", + "expiry_month": "12", + "expiry_year": "21", + "name": "Gaurav Kumar" + }, + "save": true, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' + +```json: Response +{ + { + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/FVmAtLUe9XZSGM/authorize" + }, + { + "action": "otp_generate", + "url" : "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate?track_id=FVmAtLUe9XZSGM&key_id=" + } + ] +} +``` + +Redirect the customer to the above URL to complete the authentication. + +#### Fetch the Token Information + +The token is created only if the cardholder successfully completes 3DS authentication. + +Use the Fetch Payment API to fetch the token. + +/payments/\{id\} + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/payments/pay_DG4ZdRK8ZnXC3k +```json: Response +{ + "id": "pay_Ja8pfNSq9X0lKL", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_Ja8o6c5kiUQQ1J", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Test payment", + "card_id": "card_Ja8pfQ4lA8hEjD", + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919090909090", + "token_id": "token_Ja8pfWDe9HhH6U", + "notes": { + "note_key": "value1" + }, + "fee": 1, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "auth_code": "358332" + "arn": "74119663031031075351326", + "rrn": "303107535132" + }, + "created_at": 1653630396, + "authorized_at": 1653630866, + "auto_captured": true, + "captured_at": 1653630866, + "late_authorized": false +} +``` + +## 3. Initiate Payment using Saved Token + +When a customer initiates a subsequent payment using the saved card, use this API to make the payment. + +- Pass the token ID from the previous API request to initiate a payment using the token. +- Use Razorpay Optimizer to route this payment to a PA/PG of your preference. + +/payments/create/json + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The payment amount you want to collect from the customer. + +`currency` _mandatory_ +: `string` The 3-character ISO code of the currency. Here, it is `INR`. + +`order_id` _mandatory_ +: `string` The unique identifier of the order created for this payment. Create an order using the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`email` _mandatory_ +: `string` The customer's email address. + +`contact` _mandatory_ +: `string` The customer's phone number. + +`method` _mandatory_ +: `string` The payment method. Here, it is `card`. + +`token` _mandatory_ +: `string` The unique identifier of the token. + +`card` _mandatory_ +: `object` The details of the card. + + `cvv` + : `string` The card's CVV number. + + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”` `. + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/payments/create/json +-H "content-type: application/json" +-d '{ + "amount": 500000, + "currency": "INR", + "order_id": "order_Fg6IGePNMKDICF", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "card", + "token" : "token_4lsdksD31GaZ09", + "card": { + "cvv": "" + }, + "ip": "192.168.0.103", + "user_agent": "Mozilla/5.0", + "description": "Test payment", + "notes": { + "note_key": "value1" + } +}' + +```json: Response +{ + { + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/FVmAtLUe9XZSGM/authorize" + }, + { + "action": "otp_generate", + "url" : "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate?track_id=FVmAtLUe9XZSGM&key_id=" + } + ] +} +``` + +> **INFO** +> +> +> **Handy Tips** + +> Know more about the [S2S Integration payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2.md). +> + +### Related Information + +- [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) +- [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) +- [Server-to-Server JSON V2 Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2.md) diff --git a/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/cvv-less-flow.md b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/cvv-less-flow.md new file mode 100644 index 00000000..5dd0be64 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/cvv-less-flow.md @@ -0,0 +1,35 @@ +--- +title: CVV-less Flow for Card Payments +description: Save customer card details as tokens and enable CVV-less payment flows for customers via Razorpay. +--- + +# CVV-less Flow for Card Payments + +CVV-less payments are recently introduced for saved cards where the cardholder can complete a payment without the card CVV. CVV-less card payments are simple, fast and secure, and do not require a memory test of your customers! + +As a business, we encourage you to remove the CVV box completely in the checkout experience of the customer. By doing so, you are not only encouraging the customer to choose their saved cards as a convenient payment option, but you are also enabling them to have a faster checkout experience. + +If you are live on Razorpay Standard Checkout, the UI changes are automatically taken care of. + +> **INFO** +> +> +> +> **Handy Tips** +> +> Offering CVV-less saved card flows to your customers can increase the conversion rate by 4%. +> + +![CVV Less Card Payment Flow GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pm-cvv-otp-less.gif.md) + +> **INFO** +> +> +> **Handy Tips** +> +> CVV-less payments on RuPay is an on-demand feature for standard checkout merchants. Reach out to our [support team](https://razorpay.com/support/#request) for more information. +> + +## Related information + +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/cvv-less-flow.md#frequently-asked-questions-faqs) diff --git a/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/iin-validation.md b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/iin-validation.md new file mode 100644 index 00000000..324e9e33 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/iin-validation.md @@ -0,0 +1,112 @@ +--- +title: IIN/BIN Validations on Tokens +description: API to fetch card properties using token IIN. +--- + +# IIN/BIN Validations on Tokens + +> **WARN** +> +> +> **Watch Out** +> +> - As per RBI guidelines, businesses and payment acquirers are allowed to save the last 4 card digits and the Bank Identification Number (BIN) only. +> - As per current interpretation, businesses and Payment Acquirer are not allowed to save the Issuer Identification Number (IIN) of the card.* + +> *Razorpay is seeking clarification on this from the industry and RBI. +> + +## Token IIN API + +A token is an alias or surrogate value for the actual card number. Whenever the network tokenises a card, the token generated will be a numeric value with the same length as the actual card number. + +#### For Example + +Card Number | Token +--- +4386 2894 0766 0153 | 4123 4511 1111 1117 + +When a card is tokenised, the first 6 digits or the IIN of the card gets changed. +The new IIN for the card is referred to as token IIN. + +Use the following API to fetch the properties of the card using token IIN. + +/iins/:token_iin + +#### Path Parameter + +`token_iin` _mandatory_ +: `integer` The token IIN. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X GET https://api.razorpay.com/v1/iins/412345 +-H "content-type: application/json" + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String tokenIin = "412345"; + +Iin token = instance.iin.fetch(tokenIin); + +```php: PHP +$api = new Api($key_id, $secret); + +$tokenIin = "412345"; +$api->iin->fetch($tokenIin); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +tokenIin := "412345" + +body, err := client.Iin.Fetch(tokenIin, nil, nil) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var tokenIin = "412345"; + +instance.iins.fetch(tokenIin); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string tokenIin = "412345"; + +Iin iin = client.Iin.Fetch(tokenIin); + +```json: Response +{ + "iin": "412345", + "entity": "iin", + "network": "Visa", + "type": "credit", + "sub_type": "business", + "issuer_code": "HDFC", + "issuer_name": "HDFC Bank Ltd", + "international": false, + "is_tokenized": true, + "card_iin": "438628", + "emi":{ + "available": true + }, + "recurring": { + "available": true + }, + "authentication_types": [ + { + "type":"3ds" + }, + { + "type":"otp" + } + ] +} +``` + +### Related Information + +- [Fetch Card IIN Information API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/cards/iin-api.md) diff --git a/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/token-lifecycle.md b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/token-lifecycle.md new file mode 100644 index 00000000..1be7b50c --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/token-lifecycle.md @@ -0,0 +1,46 @@ +--- +title: Token Lifecycle +description: Know about the different states attained by tokens. +--- + +# Token Lifecycle + +A token goes through various states in its lifecycle. + +> **INFO** +> +> +> **Handy Tips** +> +> +> - Status will be available for the service provider token and the overall token entity. +> - The status of overall token entity is derived from the individual service provider tokens. +> - You may choose to consume one of them based on your integration. +> +> + +Given below is a diagram representing the token lifecycle: + +![Token Lifecycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-token-hq-token-lifecycle.jpg.md) + +## Overall Token States + +A token can have following statuses: + +Status | Description +--- +**initiated** | This is the token's primary state. This status indicates that Razorpay is working with token service providers to create the token. It may take a few seconds for the token to move to the `active` state. +--- +**active** | The token reaches the `active` state when the token is successfully created and activated by a token service provider, that is, card networks. A token in `active` status can be used for payment processing. +--- +**suspended** | The status changes to `suspended` when the token is suspended temporarily by the card issuing bank or network. A suspended token may become active later. A suspended token cannot be used for payment processing. +--- +**failed** | The token status will be `failed` when Razorpay fails to create the token with the token service providers due to: +• The card not being eligible. +• The issue not being supported. +• An invalid card number. +--- +**deactivated** | Status will be `deactivated` when: +• The token has expired. +• The token is deactivated by the bank. + A deactivated token cannot become active again, and cannot be used for payment processing. diff --git a/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/webhooks.md b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/webhooks.md new file mode 100644 index 00000000..83327421 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor/webhooks.md @@ -0,0 +1,293 @@ +--- +title: Tokenisation Webhooks +description: List of webhook events for token status updates. +--- + +# Tokenisation Webhooks + +Use Razorpay Webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. + +## Webhook Events for Token Status Updates + +The table below lists the webhook events available for tokens. + +Event | Description +--- +`token.initiated` | Triggered when tokenisation request is initiated. +--- +`token.activated` | Triggered when: +• The token status is changed to active for the first time. +• The token status for a previously suspended token is changed to active again. +--- +`token.suspended` | Triggered when the issuing bank temporarily suspends a token. +--- +`token.deactivated` | Triggered when a token is permanently deactivated. +--- +`token.expiry_updated` | Triggered when the issuing bank updates the expiry date for a token. + +> **INFO** +> +> +> **Handy Tips** +> +> In case of network tokenised cards, the last 4 digits will be of the tokenised card and not the actual card. +> + +### token.initiated + +```json: Initiated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.initiated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "initiated", + "notes": [] + } + } + } +} +``` + +### token.activated + +```json: Activated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.activated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "active", + "notes": [] + } + } + } +} +``` + +### Sample Payload for token.activated as part of payment + +```json: Token activated as part of payment +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.activated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "active", + "notes": [] + } + }, + "payment": { + "entity": { + "id": "pay_FPoJKWQQ8lK13n", + "entity": "payment", + "amount": 500000, + "currency": "INR", + "base_amount": 500000, + "status": "captured", + "order_id": "order_FPoIeimWki9j8A", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 190000, + "amount_transferred": 0, + "refund_status": "partial", + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 11800, + "tax": 1800, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "4827433" + }, + "created_at": 1597226379 + } + } + } +} +``` + +### token.suspended + +```json: Suspended +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.suspended", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "suspended", + "notes": [] + } + } + } +} +``` + +### token.deactivated + +```json: Deactivated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.deactivated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "deactivated", + "notes": [] + } + } + } +} +``` + +### token.expiry_updated + +```json: Expiry updated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "token.expiry_updated", + "contains": [ + "token" + ], + "payload": { + "token": { + "entity": { + "id": "token_4lsdksD31GaZ09", + "entity": "token", + "customer_id": "cust_1Aa00000000001", + "method": "card", + "card": { + "last4": "3335", + "network": "Visa", + "type": "debit", + "issuer": "HDFC", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": "453335" + }, + "compliant_with_tokenisation_guidelines": true, + "expired_at": 1748716199, + "status": "active", + "notes": [] + } + } + } +} +``` diff --git a/llm-content/payments/payment-methods/cards/token-private.md b/llm-content/payments/payment-methods/cards/token-private.md new file mode 100644 index 00000000..5e23eddc --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-private.md @@ -0,0 +1,77 @@ +--- +title: Tokens (Private) +description: Learn how to create tokens to save customer's card details using the Tokens API. +--- + +# Tokens (Private) + +A token represents a customer's card details stored in Razorpay servers. We use these tokens to securely fetch the saved details for making it quick and easy for customers to make payments. Tokens are generally created with every payment requests and Tokens API can be used to migrate them from your current system to Razorpay. + +> **WARN** +> +> +> **PCI-DSS Compliance** +> +> The customer's payment information should never reach your servers unless you are PCI-DSS certified. Your site must be **PCI-DSS** certified to accept, process, store or transmit customer's card details securely to Razorpay. +> + +## Tokens API + +/customers/:customer_id/tokens + +#### Request Parameters + +`customer_id` +: The unique customer ID. To create a customer, refer the [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) section. + +`method` +: The payment method selected by the customer on checkout. + +`card[number]` +: The card number. + +`card[name]` +: The name on the card. + +`card[expiry_month]` +: The expiry month of the card. + +`card[expiry_year]` +: The expiry year of the card. + +All server-side requests must be authenticated with Basic Auth using the **key-id** as username and **key-secret** as password. You can acces your keys on your Dashboard. Know more about [API authentication](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#authentication) to get started with Razorpay APIs. + +```curl: Example Request +curl -X POST \ + https://api.razorpay.com/v1/customers/cust_9W8HsFCULn3aTK/tokens \ + -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -d 'method=card' \ + -d 'card[name]=Gaurav Kumar' \ + -d 'card[number]=4386289407660153' \ + -d 'card[expiry_month]=1' \ + -d 'card[expiry_year]=2022' + +```json: Response +{ + "id": "token_94sMeNFjCouADt", + "entity": "token", + "bank": null, + "wallet": null, + "method": "card", + "card": { + "entity": "card", + "name": "gauravkumar", + "last4": "0153", + "network": "Visa", + "type": "credit", + "issuer": "UTIB", + "international": false, + "emi": true, + "expiry_month": 1, + "expiry_year": 2022 + }, + "recurring": false, + "used_at": 1505935715, + "created_at": 1488446398 +} +``` diff --git a/llm-content/payments/payment-methods/cards/token-public.md b/llm-content/payments/payment-methods/cards/token-public.md new file mode 100644 index 00000000..b781a6f7 --- /dev/null +++ b/llm-content/payments/payment-methods/cards/token-public.md @@ -0,0 +1,105 @@ +--- +title: Tokens (Public) +description: Learn how to create tokens to save customer's card details using the Tokens API. +--- + +# Tokens (Public) + +A token represents a customer's card details stored in Razorpay servers. We use these tokens to securely fetch the saved details for making it quick and easy for customers to make payments. Tokens are generally created with every payment requests and Tokens API can be used to migrate them from your current system to Razorpay. + +> **WARN** +> +> +> **PCI-DSS Compliance** +> +> The customer's payment information should never reach your servers unless you are PCI-DSS certified. Your site must be **PCI-DSS** certified to accept, process, store or transmit customer's card details securely to Razorpay. +> + +## Tokens API + +/customers/:customer_id/tokens/public + +```curl: Example Request +curl -X POST \ +https://api.razorpay.com/v1/customers/cust_EdxDIpddQC9o1F/tokens/public \ + -u '' \ + -h 'content-type: application/json' + -d '{ + "method": "card", + "card": { + "name": "Gaurav Kumar", + "number": "4386289407660153", + "expiry_month": "12", + "expiry_year": "2022" + } +}' +```json: Response +{ + "id": "token_EdzTmVX52ptw3H", + "entity": "token", + "token": "EygTXOq4WaMUDZ", + "bank": null, + "wallet": null, + "method": "card", + "card": { + "entity": "card", + "name": "Gaurav Kumar", + "last4": "0153", + "network": "Visa", + "type": "credit", + "issuer": null, + "international": false, + "emi": false, + "expiry_month": 12, + "expiry_year": 2022, + "flows": { + "recurring": true, + "iframe": false + } + }, + "recurring": false, + "auth_type": null, + "mrn": null, + "used_at": 1586785385, + "created_at": 1586785385, + "customer": { + "id": "cust_EdxDIpddQC9o1F", + "entity": "customer", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9988223355", + "gstin": null, + "notes": [], + "created_at": 1586777406 + }, + "expired_at": 1672511399, + "dcc_enabled": false +} +``` + +#### Path Parameter + +`customer-id` _mandatory_ +: `string` Unique identifier of the customer. You can create a customer using [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) or via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md#create-a-customer). + +#### Request Parameters + +`method` _mandatory_ +: `string` The payment method selected by the customer on checkout. Here, it should be `card`. + +`card` +: Details of the customer's card. + + `number` _mandatory_ + : `integer` The card number. + + `name` _mandatory_ + : `string` The name on the card. + + `expiry_month` _mandatory_ + : `string` The expiry month of the card in `MM` format. + + `expiry_year` _mandatory_ + : `string` The expiry year of the card in `YY` format. + +All server-side requests must be [ authenticated](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#authentication) with `Basic Auth` using the [KEY_ID] as username. You can generate your API keys on the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). diff --git a/llm-content/payments/payment-methods/cards/visa-safe-click.md b/llm-content/payments/payment-methods/cards/visa-safe-click.md new file mode 100644 index 00000000..a9c6587c --- /dev/null +++ b/llm-content/payments/payment-methods/cards/visa-safe-click.md @@ -0,0 +1,68 @@ +--- +title: Visa Safe Click for Payments via Juspay +description: Know how to accept card payments with Visa Safe Click, an innovative solution for your customers to make card payments without any OTP-based authentication or CVV. +--- + +# Visa Safe Click for Payments via Juspay + +Visa Safe Click is an innovative card payments solution using which your customers can make card payments without any OTP-based authentication or CVV. Your customers need to opt-in during enrollment. Subsequent payments of value less than ₹2000 will be processed without OTP or CVV. + +> **INFO** +> +> +> **Android Only** +> +> You can generate your API keys right from this screen if you have already provided your website address during sign-up. +> + +## Feature Availability + +This feature is currently available only to limited merchants based on approval from Visa. You can sign up for early access [here](https://razorpay.com/visa-safe-click/). + +## Salient Features + +Some of the salient features of Visa Safe Click are: +- **Secure and Compliant** + + All payments are secured with Visa and compliant with RBI guidelines. + +- **High Success Rates** + + Payment success rates are known to increase by 5-10%. + +- **Faster Checkout** + + Customers pay using their saved cards without any CVV or OTP, which makes checkout significantly faster. + +- **No Redirection Flow** + + Since customers do not need to enter OTP, there is no redirection to the bank ACS page. + +## Workflow + +There are two main steps: + +1. [Customer Enrollment](#1-customer-enrollment): The customer enrols into the Visa safe Click program with an OTP authentication. + +2. [Subsequent payments](#2-subsequent-payments): The customer selects the previously enrolled card and completed the payments without any OTP authentication. + +### 1. Customer Enrollment + +The enrollment flow is given below: + +1. The customer selects Card as the payment method at the Checkout. +2. They enter the card details and opt into the Visa Safe Click program. +3. An OTP is sent to the customer's registered contact number. +4. The customer enters the OTP and completes the payment. This enrolls the card for processing subsequent payments up to ₹2000 without an OTP on your app. + +### 2. Subsequent Payments + +The flow for subsequent payments is given below: + +1. The customer opens Razorpay Checkout and selects a Card as the payment method. +2. the list of all saved cards is shown. They can choose the card enrolled for Visa Safe Click. +3. The customer does not need to enter any OTP or CVV. The payment is completed with a single click. + +### Related Information + +- [FAQs](https://razorpay.com/visa-safe-click/#:~:text=Frequently) diff --git a/llm-content/payments/payment-methods/cod.md b/llm-content/payments/payment-methods/cod.md new file mode 100644 index 00000000..ef696444 --- /dev/null +++ b/llm-content/payments/payment-methods/cod.md @@ -0,0 +1,78 @@ +--- +title: Cash on Delivery | Razorpay Payment Methods +heading: Cash on Delivery +description: Offer Cash on Delivery (COD) as a payment method on the Razorpay Checkout page. +--- + +# Cash on Delivery + +You can now offer Cash on Delivery (COD) as a payment method on the Razorpay Checkout page. Customers can choose COD directly on the Checkout page, alongside UPI, cards, netbanking and more. This flow increases accessibility and builds trust among first-time buyers and high-value orders. + +> **INFO** +> +> +> **Handy Tips** +> +> [Razorpay Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout.md) supports Cash on Delivery (COD) by default. For a simplified experience without the address section, use this flow that directly opens the payment page. Both flows support COD as a payment method. +> + +## Prerequisites + +- [Create a Razorpay account](https://dashboard.razorpay.com/). +- Generate [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. +- Integrate with Razorpay Magic Checkout: + - [Native (Web)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/web.md) + - [Android](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/android-integration.md) + - [iOS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/ios-integration.md) + - [React Native: Android](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/react-native-android-integration.md) + - [React Native: iOS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/react-native-ios-integration.md) + - [Flutter](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/flutter-integration.md) + - [Capacitor](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout/capacitor-integration.md) + +> **WARN** +> +> +> **Watch Out!** +> +> This feature is currently supported only for native Razorpay integrations. It is not available on third-party platforms such as Shopify, WooCommerce and so on. +> + +## Integration Steps + +Follow the integration steps given below: + +1. Use your existing Magic Checkout integration. While configuring the checkout options, pass the `show_address` parameter as shown below to control the visibility of the address section: + + ```js: json + "options": { + "show_address": false + } + ``` + + `show_address` + : `boolean` Determines whether the shipping address section appears on the Checkout page. Possible values + - `true` (default): Show the address form. +- `false`: Hide the address form. + + + +> **INFO** +> +> +> **Handy Tips** +> +> Magic Checkout supports **Cash on Delivery (COD)** by default and the checkout flow includes an address section. Use the `show_address` parameter to remove this step and maintain a simplified checkout experience. +> + + +2. **Cash on Delivery** appears as one of the available payment methods on the Checkout interface. Customers can select COD and confirm the order. + +## Customer Experience + +The flow below displays how customers can view and select **Cash on Delivery** during Checkout: + +![COD on checkout - customer experience](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-methods-cod.gif.md) + +### Related Information + +[Payment Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-configuration.md#configure-payment-options) diff --git a/llm-content/payments/payment-methods/doku-ovo-linkaja.md b/llm-content/payments/payment-methods/doku-ovo-linkaja.md new file mode 100644 index 00000000..7af40bcc --- /dev/null +++ b/llm-content/payments/payment-methods/doku-ovo-linkaja.md @@ -0,0 +1,86 @@ +--- +title: DOKU, OVO, and LinkAja +description: Accept payments from customers using DOKU, OVO, and LinkAja. +--- + +# DOKU, OVO, and LinkAja + +DOKU, OVO, and LinkAja are prominent digital payment platforms in Indonesia, enabling consumers to make purchases using their Wallet. By integrating DOKU, OVO or LinkAja, you can offer a secure and seamless payment experience tailored to the Indonesian market. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +> **INFO** +> +> +> **Handy Tips** +> +> - List of [supported region and currency](#supported-region-and-currency). +> - Razorpay's [pay in native currency](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/dynamic-currency-conversion.md) feature will ensure that your customer is shown the right currency. +> + + +### Advantages + + - **Digital Wallet Integration**: All three platforms integrate digital wallet functionalities, allowing users to make secure cashless payments. + - **Available in Indonesia**: DOKU, OVO and LinkAja are widely used in Indonesia and support transactions in Indonesian Rupiah (IDR). + - **Session Timeout**: Each platform enforces a session timeout of 1 hour for completing transactions. + - **PPRO Integration**: DOKU, OVO and LinkAja are integrated via the PPRO payment processing system, providing customers with a streamlined payment experience. + + +### Refunds and Settlements + +Payments follow standard refund and settlement timelines. + +- You can refund customer payments made using DOKU, OVO, and LinkAja by following the usual [refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) process. + +- DOKU, OVO, and LinkAja payments take T+22 days to get settled to your Razorpay account. + +### Supported Integrations + +Secure [S2S integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/doku-ovo-linkaja/s2s-integration.md) for seamless payment processing. + +### Supported Region and Currency + +Given below is the region and currency that support DOKU, OVO and LinkAja payments: + +Region | Currency +--- +Indonesia | IDRs + +### Minimum and Maximum Transaction Amounts for DOKU, OVO, and LinkAja Payments + + + + Minimum Transaction Amount | Maximum Transaction Amount + --- + IDR 10,000^^ | Non-KYC Users: IDR 2,000,000 + --- + | KYC Users: IDR 10,000,000 + + + + + Minimum Transaction Amount | Maximum Transaction Amount + --- + IDR 10,000 | Non-KYC Users: IDR 100,000,000 + + + + + Minimum Transaction Amount | Maximum Transaction Amount + --- + IDR 10,000^^ | Non-KYC Users: IDR 2,000,000 + --- + | KYC Users: IDR 10,000,000 diff --git a/llm-content/payments/payment-methods/doku-ovo-linkaja/s2s-integration.md b/llm-content/payments/payment-methods/doku-ovo-linkaja/s2s-integration.md new file mode 100644 index 00000000..6145bcf4 --- /dev/null +++ b/llm-content/payments/payment-methods/doku-ovo-linkaja/s2s-integration.md @@ -0,0 +1,536 @@ +--- +title: DOKU, OVO, and LinkAja - S2S Integration +description: Let your customers make payments using DOKU, OVO, and LinkAja on your website or app with S2S integration. +--- + +# DOKU, OVO, and LinkAja - S2S Integration + +Secure Server-to-Server (S2S) integration that enables seamless and reliable processing and a smooth payment experience for your customers. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +1. [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +2. Generate API Keys. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +3. Follow the [Razorpay S2S Integration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md). + +## Integrate DOKU, OVO, or LinkAja on S2S + +Create an Order and a Payment. And pass `method` and `provider` parameters in the create an order and a payment API. + +### Create an Order and a Payment + +Create an order along with payment using the consolidated order and payment API. This single API call combines order and payment creation, resulting in a more efficient and faster transaction process. + +Create an order along with payment by: + +- Making a single API call to Razorpay, combining order and payment creation. +- Authenticating using the provided credentials, ensuring access to the consolidated payment API. +- Manually integrating the API sample codes on your server. + +The following API will create an order along with payment with `wallet` as the payment method: + +/orders + +```curl: Request +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "partial_payment": true, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "line_items_total": 5000, + "line_items": [ + { + "sku": "1gr367", + "name": "Flight Ticket", + "description": "Flight tickets", + "quantity": 2, + "type": "travel", + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "travel": { + "mode": "flight", + "sub_type": "ticket", + "carrier_code": "VXI-2345", + "departure_city": "UAM", + "departure_timestamp": "1234567890", + "arrival_city": "UAM", + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + }, + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + } + ] + } + }, + { + "sku": "1gr368", + "name": "Travel_Insurance", + "description": "Flight_Travel_Insurance", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "type": "travel", + "travel": { + "mode": "flight", + "sub_type": "insurance", + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + } + ] + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "payment": { + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "method": "wallet", + "provider": "doku" + } +}' + +```json: Success +{ + "amount": 50000, + "amount_due": 50000, + "amount_paid": 0, + "attempts": 10, + "created_at": 1706507580, + "currency": "INR", + "entity": "order", + "id": "order_NUJs9C1Luflzts", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "payment_workflow": { + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/O0NSBQgY0BbC4b/authenticate" + } + ], + "razorpay_payment_id": "pay_O0NSBQgY0BbC4b" + }, + "receipt": "receipt#1111", + "status": "attempted" +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _optional_ + : `json object` Details about the customer/user. + + `name` _optional_ + : `string` The customer’s name. For example, `Gaurav Kumar`. + + `contact` _optional_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `+919000090000`. + + `email` _optional_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the business. For example, 1234567890. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `sku` _optional_ + : `string` Unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in sub unit (needs to be inclusive of tax). + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business is running any discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `travel` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `mode` _optional_ + : `string` The mode of travel. Possible values: + - `flight` + - `train` + - `bus` + - `cab` + - `others` + + `sub_type` _optional_ + : `string` The subtype of the line item. Possible values: + - `ticket` + - `meal` + - `insurance` + - `preferred_seat` + - `others` + + `carrier_code` _optional_ + : `string` Full flight number for this leg of the journey. For example, `AA123`. + + `departure_city` _optional_ + : `string` 3 letter IATA airport code, also known as an IATA location identifier, IATA station code. For example, CPH for Copenhagen. + + `departure_timestamp` _optional_ + : `integer` UNIX timestamp. For example, 1234567890. + + `arrival_city` _optional_ + : `string` 3 letter IATA airport code, also known as an IATA location identifier, IATA station code. For example, CPH for Copenhagen. + + `travellers` _optional_ + : `json object` Details associated with passengers/travellers/beneficiaries. + + `name` _optional_ + : `string` Name of the passenger/traveler/beneficiary. + + `email` _optional_ + : `string` Email address of the passenger/traveler/beneficiary. + + `age` _optional_ + : `integer` UNIX timestamp of the date of birth of the individual. For example, 1234567890. + + `nationality` _optional_ + : `string` ISO3 country code to share the nationality of the individual. For example, IND. + + `class` _optional_ + : `string` Type of the flight ticket. Possible values: + - `economy` + - `premium_economy` + - `business` + - `SL` + - `3A` + - `2A` + - `1A` + - `CC` + - `others` + + `identity` _optional_ + : `json object` Identity details of the passenger/beneficiary. + + `tax_id` _optional_ + : `string` Tax id number. For example, PAN number for India. + + `unique_national_id` _optional_ + : `string` National identification number. For example, Adhaar number for India. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of the `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Know more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `json object` Details of the campaign. Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, PQR12453. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Possible values: + - `google` + - `newsletter` + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: + - `cpc` + - `banner` + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `payment` _mandatory_ + : `json object` Details about the payment. + + `contact` _mandatory_ + : `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `method` _mandatory_ + : `string` The method used to make the payment. Here, it should be `wallet`. + + `provider` _mandatory_ + : The wallet provider. Possible values: + - `doku` + - `ovo` + - `linkaja` + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` indicates the next step to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the provider page. + + `url` + : `string` URL to be used for the action indicated. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). diff --git a/llm-content/payments/payment-methods/duitnow-pay.md b/llm-content/payments/payment-methods/duitnow-pay.md new file mode 100644 index 00000000..b236db59 --- /dev/null +++ b/llm-content/payments/payment-methods/duitnow-pay.md @@ -0,0 +1,47 @@ +--- +title: DuitNow Pay +description: Accept payments using DuitNow Pay. +--- + +# DuitNow Pay + +Using DuitNow Pay, you can effortlessly accept payments from your customers in Malaysia through their preferred banking channels. DuitNow is an instant payment service facilitated by PayNet, Malaysia’s national payments network, and is supported by major banks and financial institutions across the country. + +With its real-time transaction capabilities and seamless user experience, DuitNow has become a widely trusted payment method in Malaysia. It enables you to offer customers a fast, secure, and convenient way to make payments using mobile numbers, NRIC, or business registration numbers. + +> **WARN** +> +> +> **Watch Out!** +> +> DuitNow Pay is currently in early access and is available to a limited set of businesses only. +> + +## Advantages + + +### Instant Transfers + + DuitNow Pay enables real-time payments, ensuring that funds are transferred instantly between banks and financial institutions. + + + +### Seamless Payment Experience + + Customers can make payments using their mobile numbers, National Registration Identity Card (NRIC), or business registration numbers, eliminating the need to remember complex banking details. + + + +### High Security Standards + + DuitNow Pay transactions are protected with strong encryption and authentication protocols, ensuring safe and secure payments for both businesses and customers. + + +## Payment Flow + +Given below is the payment flow for DuitNow Pay at Razorpay Curlec checkout: + +1. The customers select DuitNow at checkout. +2. They choose the bank and are redirected to the bank's portal. +3. They enter their banking credentials and complete the authorisation process. +4. Upon payment completion, the customer receives a notification and is redirected to your website or app. diff --git a/llm-content/payments/payment-methods/duitnow-rpp.md b/llm-content/payments/payment-methods/duitnow-rpp.md new file mode 100644 index 00000000..0cb1a142 --- /dev/null +++ b/llm-content/payments/payment-methods/duitnow-rpp.md @@ -0,0 +1,14 @@ +--- +title: DuitNow +description: Accept payments using DuitNow. +--- + +# DuitNow + +DuitNow is an electronic fund transfer service in Malaysia that allows individuals and businesses to make and receive payments using their mobile phone number or DuitNow ID. It is operated by Bank Negara Malaysia (BNM), the central bank of Malaysia, and is supported by a network of participating banks and financial institutions in the country. + +To use DuitNow, you need to have a bank account with a participating bank and activate the DuitNow service. You can then send or receive payments using the DuitNow ID or mobile phone number of the recipient. + +The DuitNow service is available 24/7 and allows for real-time transfers of funds between accounts. It is a convenient and secure way to make payments and transfers, especially in the current context of the COVID-19 pandemic, as it eliminates the need for physical contact. + +DuitNow can be accessed through participating banks' mobile banking apps or online banking platforms, as well as through the DuitNow app, which is available for download on the App Store and Google Play. diff --git a/llm-content/payments/payment-methods/ecod.md b/llm-content/payments/payment-methods/ecod.md new file mode 100644 index 00000000..618ace6c --- /dev/null +++ b/llm-content/payments/payment-methods/ecod.md @@ -0,0 +1,94 @@ +--- +title: eCOD +description: The delivery executives can collect payment digitally from the customers with Razorpay eCOD. You can integrate eCOD with all payment methods including UPI and link-based payments. +--- + +# eCOD + +Using eCOD your delivery executives can accept digital payments from your customers instead of cash. + +## Prerequisites + +Following are the prerequisites for integrating eCOD: + +- You should have an app for delivery executives. +- Delivery executives should have internet access on their device. +- eCOD is available as an Android SDK that can be embedded in your delivery app. The SDK handles the entire user interface for collecting payments through the various payment modes. + +## Supported Payment Methods + +eCOD supports all payment modes: card, netbanking, wallets and UPI. These modes can be divided into two categories: + +- [On Delivery App Methods](#on-delivery-app-methods): The customer need not open any link. +- [Link-Based Methods](#link-based-methods): The customer can use these payment modes on their device using a special link. + +### On Delivery App Methods + +Following are the Delivery App Methods: + +- [Wallet Payments](#wallet-payments): For wallet payments, if a customer has enough balance in the wallet, the payment can be made using OTP. +- [UPI Payments](#upi-payments) + +#### Wallet Payments + +The wallet payment flow is explained below: + +1. The delivery executive shows the wallet list to the customer on the phone (delivery executive's phone). +2. A customer selects a wallet and enters the phone number. +3. The customer receives an SMS (customer's phone) from the wallet provider. +4. The customer enters the OTP on the delivery executive’s phone. +5. The payment is complete! + +> **INFO** +> +> +> **No Internet Connection Required** +> +> This payment method does not require any internet connection at the customer’s end. +> + +#### UPI Payments + +UPI payments work through Collect request. Following is the UPI payment flow: + +1. The delivery executive selects UPI on the phone (delivery executive's phone). +2. The customer provides their VPA (Virtual payment address). +3. The customer receives a collect request on the phone (customer's phone). +4. The customer approves the collect request using MPIN. +5. The aayment is complete! + +> **INFO** +> +> +> **UPI Payments Require Internet Connection** +> +> This payment method requires the customer to have VPA configured and working internet as UPI payments do not work without internet. +> + +### Link-Based Methods + +Following are the link-based methods: + +- Debit/Credit Cards +- Netbanking +- Wallets +- UPI + +While wallets and UPI-based payments can also be made using the delivery executive’s device, card and netbanking payment methods are only available using a special link. + +Following is the payment flow for link-based payments: + +1. The customers notify the delivery executive that they want to make a payment on their device. +2. The delivery executive selects **Link Payments** on the phone (delivery executive's device). +3. The customer receives an SMS with a link. This link is a short link and is also visible on the delivery executive’s device in text as well as a QR format. +4. The customer can open the link on a computer or mobile. +5. The standard Razorpay Checkout form opens up using which the customer can pay using Card, Netbanking, Wallets or UPI. +6. The delivery executive receives a payment notification after the payment is complete. + +> **INFO** +> +> +> **Razorpay SDK Includes the User Interface (UI)** +> +> In all of the above payment methods, link-based and on-delivery app methods, the delivery executive interacts with a Razorpay developed user interface (UI). +> diff --git a/llm-content/payments/payment-methods/ecod/integration.md b/llm-content/payments/payment-methods/ecod/integration.md new file mode 100644 index 00000000..772f1064 --- /dev/null +++ b/llm-content/payments/payment-methods/ecod/integration.md @@ -0,0 +1,70 @@ +--- +title: Integrate eCOD +description: Integrate eCOD as a payment method. +--- + +# Integrate eCOD + +eCOD runs on top of Razorpay’s Invoices system. An eCOD payment is basically made against an invoice. + +## Integration Steps + +Following are the two steps of integration: + +1. Create an Invoice on your server. +2. Pass the `invoice_id` to Razorpay’s Android SDK. + +## Payment Flow + +The overall payment flow is explained below: + +1. The delivery executive selects an order on your (merchant) app. +1. The delivery executive clicks on **Initiate Payment**. +3. Your app makes a request to your server. +4. Your server calls the create invoice request on Razorpay’s API. +5. Razorpay’s API returns an `invoice_id`. This is passed on to your app by your server. +6. Your app invokes Razorpay’s Android SDK and passes the `invoice_id`. +7. Razorpay’s SDK displays a UI for selecting payment mode. +8. The customer selects a payment mode. +9. After the payment is completed, Razorpay’s Android SDK passes back the control to your app with the result, success or failure. + +### Create an Invoice (Server Side) + +Step 4 described above involves creating an Invoice using Razorpay’s API. For creating an Invoice, you require the amount and the contact number of the customer. Know more about the [Invoice APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/invoices.md). + +> **INFO** +> +> +> **Mandatory Fields for eCOD** +> +> For eCOD, you need to pass the following fields mandatorily to Create Invoice API: +> +> - type: ecod +> - view_less: true +> Without these fields, the eCOD functionality may not work properly. +> + +After this step is complete, you get an `invoice_id`. This needs to be passed to your mobile app. + +### Invoke Razorpay's Android SDK + +Step 6 involves invoking Razorpay's Android SDK. The standard documentation for integration the android SDK apply here too and is available [here](https://github.com/razorpay/razorpay-android-sample-app/releases). You can use the latest SDK available. + +In the JSON object options that you pass to the SDK, you must pass the following fields: + +- invoice_id: `` +- ecod: true + +Without these parameters, the eCOD checkout form will not display. + +### Complete Payment + +The delivery executive and the customer need to interact with the special eCOD checkout form displayed by the SDK. The customer has various options for completing the payment. In all the cases, after the payment is complete, the android SDK calls your app's onPaymentSuccess method and passes over the `payment_id`. + +### Handle Link-Based Payment + +If the customer chooses link-based payment, an SMS is automatically sent to the customer's phone. The customers can open this link on their phone or computer. After the payment is complete, the SDK detects that the payment is complete and calls your app's onPaymentSuccess method. + +## Support + +In case you have any issue integrating Payment Links, you can raise a ticket on our [Support Portal](https://razorpay.com/support). diff --git a/llm-content/payments/payment-methods/emi.md b/llm-content/payments/payment-methods/emi.md new file mode 100644 index 00000000..86bad336 --- /dev/null +++ b/llm-content/payments/payment-methods/emi.md @@ -0,0 +1,73 @@ +--- +title: About EMI +description: Let your customers avail various EMI plans at Razorpay Standard Checkout. Debit Cards, Credit Cards, No Cost EMI, Low Cost EMI and Cardless EMI. +--- + +# About EMI + +EMI provides an option to your customers for making total payment in easy equal monthly installments at the applicable interest rates from the list of banks and partners. This payment option encourages your customer to make big value purchases without worrying about paying the full amount upfront. Customers pay principal amount and interest in monthly equal installments. + +With Razorpay, you can offer your customers EMI as a payment method to buy various products on EMI using Debit Cards, Credit Cards, No Cost EMI, Low Cost EMI and Cardless EMI. + +> **WARN** +> +> +> **Watch Out!** +> +> Instant Refunds are not supported on EMI, Cardless EMI and Pay Later. +> + + + +## EMI Types + +EMI Types | Availability +--- +[Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md) | ✓ (SBI Credit Card requires [Approval](https://razorpay.com/support)) +--- +[Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) | ✓ +--- +[No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | ✓ (Debit and Credit card EMIs) +--- +[Low Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/low-cost-emi.md) | ✓ (Debit and Credit card EMIs) +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | Requires [Approval](https://razorpay.com/support) + +## Payment Flow on Standard Checkout + +On your website or app, customers select the products and proceed to Checkout. + + +### On the Checkout page, the customers: + + 1. Enter the **Phone Number** and click **Continue** + 2. Select **EMI**, **No Cost EMI** or **Low Cost EMI** as the payment method as highlighted below. + ![Select EMI or No Cost EMI option.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-no-low-cost-emi.jpg.md) + 3. Select a preferred EMI type, [Credit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) or [Cardless](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md). + 4. Choose a bank from the list and select the EMI tenure. This flow is for Credit Card EMI. Click **Continue**. + ![EMI tenure and click Select Plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-tenure-new.jpg.md) + 5. Enter the required details and choose if they want to **Save this card as per RBI guidelines** or pay without saving the card. + 6. Click **Continue**. + + After the successful payment, Razorpay redirects customers to your application or website. Customers' monthly statements will reflect the EMI amount with interest charged by the bank. You receive the full amount in your bank account as per your [settlement cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md#settlement-cycle). + + + + + +## Try EMI Flow on Checkout + +You can try the EMI flow by clicking the **Pay with Razorpay** button. This initiates a ₹5,500 payment. Provide the relevant details and complete the payment. + +> **WARN** +> +> +> **Live Transaction with Auto Refund** +> +> This is a real transaction and money will be deducted from your account. However, the amount debited will be auto-refunded to your account in 5-7 working days. +> + +[Pay with Razorpay](https://razorpay.com/emidemo/) + +## Test Card +You can use the test cards to test domestic payments, international payments and subscriptions. Know more about [Test Card details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#test-card-for-emi-payments). diff --git a/llm-content/payments/payment-methods/emi/cardless-emi.md b/llm-content/payments/payment-methods/emi/cardless-emi.md new file mode 100644 index 00000000..3449db95 --- /dev/null +++ b/llm-content/payments/payment-methods/emi/cardless-emi.md @@ -0,0 +1,131 @@ +--- +title: Cardless EMI at Razorpay Standard Checkout +heading: About Cardless EMI +description: Offer automatic EMI payments without using credit or debit cards to your customers. Check the payment flow and supported Cardless EMI providers. +--- + +# About Cardless EMI + +- **Cardless EMI Changelog**: Discover new features, updates and deprecations related to Cardless EMI (since Jan 2024). + +Offer Cardless EMI as a payment method to convert their payment amount to EMIs without a debit or credit card. Customers enjoy the benefits of the EMI as the payments are made using credits approved by the supported Cardless EMI Payment Partners. + +> **WARN** +> +> +> **Watch Out!** +> +> Instant Refunds are not supported on EMI, Cardless EMI and Pay Later. +> + +> **INFO** +> +> +> **Feature Enablement** +> +> Cardless EMI as a payment method is not enabled by default. Raise a request with our [Support Team](https://razorpay.com/support/#request) to enable this feature. +> +> + +## Supported Payment Partners + +Following is the list of supported Payment Partners for Cardless EMI and the minimum order amount stipulated by them: + + + + Banks | Provider Code | Minimum Order Amount + --- + ICICI Bank | `icic` | ₹7000 + --- + IDFC Bank | `idfb` | ₹5000 + --- + HDFC Bank | `hdfc` | ₹5000 + --- + Kotak Bank| `kkbk` | ₹3000 + --- + [axio](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi/axio.md) | `walnut369` | ₹900 + --- + Fibe | `earlysalary` | ₹3000 + --- + ZestMoney | `zestmoney` | ₹3000 + + +> **INFO** +> +> +> **Handy Tips** +> +> Check the standard [interest rates charged by Banks/Partners](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#1-what-are-the-standard-interest-rates-charged). +> + + + + + Payment Partners | Provider Code | Minimum Order Amount + --- + axio | `walnut369` | ₹900 + --- + Fibe | `earlysalary` | ₹3000 + --- + ZestMoney | `zestmoney` | ₹3000 + + + +> **INFO** +> +> +> **Handy Tips** +> +> Check the standard [ interest rates charged by Pay Later Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#2-what-are-the-standard-interest-rates-charged). +> + + + + + Payment Partners | Provider Code | Minimum Order Amount + --- + [ShopSe](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi/shopse.md) | `shopse` | ₹3000 + --- + [Snapmint](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi/snapmint.md) | `snapmint` | None + + + +> **INFO** +> +> +> **Handy Tips** +> +> Check the standard [ interest rates charged by Pay Later Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#2-what-are-the-standard-interest-rates-charged). +> + + + +## Payment Flow + +Given below is a diagram that explains the payment flow for Cardless EMI: + +![payment flow for Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-flow-cardless_emi.jpg.md) + +## Payment Flow on Standard Checkout + +Customers select the products on your website or app and proceed to Checkout. On the Checkout page, the customers: + +1. Enter their **Phone Number** and click **Continue**. +1. Select **EMI** as the payment method. + ![Select emi payment option on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-options-card.jpg.md) +1. Select **Cardless and Others**. + ![Select Cardless and Others](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-select-cardless.jpg.md) +1. Choose a payment instrument from the list and select the EMI tenure. Click **Continue**. + ![EMI tenure and click Select Plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-cardless-tenure.jpg.md) + +After the successful payment, Razorpay redirects customers to your application or website. Customers' monthly statements will reflect the EMI amount with interest charged by the bank. + +You will receive the entire payment amount from the Cardless EMI service provider. Based on the terms and conditions, the customer pays the total payment amount with additional interest (if any) as EMIs to the provider. + +## Standard Checkout Integration + +No additional integration is required to show Cardless EMI on your Standard Checkout page. + +## FAQs + +See: [Cardless EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#cardless-emi). diff --git a/llm-content/payments/payment-methods/emi/cardless-emi/axio.md b/llm-content/payments/payment-methods/emi/cardless-emi/axio.md new file mode 100644 index 00000000..0ded60e0 --- /dev/null +++ b/llm-content/payments/payment-methods/emi/cardless-emi/axio.md @@ -0,0 +1,75 @@ +--- +title: About axio Cardless EMI +description: Offer axio Cardless EMI payment option to your customers on checkout. +--- + +# About axio Cardless EMI + +axio, formerly Capital Float, is India's leading digital consumer finance company offering pay later and credit management under one seamless brand experience. Offer axio as a payment option where the customers can convert their payment amount to EMIs without a debit or credit card. + +> **INFO** +> +> +> **Minimum Order Amount** +> +> Your customers should place an order of at least ₹900 to use axio as the Cardless EMI payment provider. +> + +#### Advantages + +- **On-the-fly registration**: The customers can sign up right from Razorpay Checkout by providing their PAN, date of birth, and Aadhaar number for KYC verification. +- **High approval rate**: More than 40% of the customers who sign up for axio would be eligible for credit. +- **Zero integration efforts** + + If you use Standard Checkout, axio will be available once our team enables the feature. You do not need to make any changes to your integration. + +## Payment Flow for Standard Checkout + +Customers select the products on your website or app and proceed to Checkout. On the Checkout page, the customers: + +1. Enter their **Phone Number** and click **Continue**. +1. Select **EMI** as the payment method. + ![Select emi payment option on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-options-card.jpg.md) +1. Select **Cardless and Others**. + ![Select Cardless and Others](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-select-cardless.jpg.md) +1. Select **axio** as the Cardless EMI service provider. + ![Select axio payment instrument](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/select-axio-cardless.jpg.md) +1. An OTP is sent on their registered mobile numbers to authenticate the customer account. They enter the OTP and click **Verify**. +1. To complete the KYC verification, they enter their PAN and date of birth and click **Continue**. +1. They enter their Aadhaar card number and click **GET OTP**. An OTP is sent to the mobile number and email address registered with their Aadhaar. +1. They enter the OTP and click **VERIFY**. + + +> **INFO** +> +> +> **Handy Tips** +> +> Steps 7, 8 and 9 apply only to customers using axio for the first time. +> + +1. The EMI options are displayed to the customers. They can select the tenure and click **Select Plan**. + ![EMI options select Plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/axio-select-plan.jpg.md) +1. Customers make a down payment using the UPI payment method. A UPI collect request is sent to the customer. They can use their UPI PSP app to complete the payment. + +You will receive the entire transaction amount from axio. Depending on the terms and conditions, the customer pays the total order amount with additional interest (if any) as EMIs to axio. + +## Standard Checkout Integration + +No additional integration is required to show axio as a Cardless EMI service provider on your Standard Checkout integration. Know [how to integrate axio as a payment method on custom checkout.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi/axio/custom-integration.md) + +## Grievance Redressal Officer (GRO) Details + +The GRO details are given below: + +- **Name:** B S Yasaswi +- **Designation:** Grievance Redressal Officer +- **Address:** New No. 3 (Old No. 211), Gokaldas Platinum, Upper Palace Orchards, Bellary Road, Sadashiva Nagar, Bengaluru, Karnataka 560080 +- **Telephone/Mobile:** 080 6807 5001 +- **Email ID:** customersuccess@axio.co.in + +To access the Sachet portal, visit the [Sachet Portal - RBI](https://sachet.rbi.org.in/). + +## FAQs + +See: [axio FAQs](https://axio.co.in/faq/). diff --git a/llm-content/payments/payment-methods/emi/cardless-emi/axio/checkout-configuration.md b/llm-content/payments/payment-methods/emi/cardless-emi/axio/checkout-configuration.md new file mode 100644 index 00000000..1eec6e63 --- /dev/null +++ b/llm-content/payments/payment-methods/emi/cardless-emi/axio/checkout-configuration.md @@ -0,0 +1,250 @@ +--- +title: Highlight axio on Checkout +description: Configure and highlight axio as a payment method on Razorpay Checkout. +--- + +# Highlight axio on Checkout + +After [axio payment method is enabled](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md), it appears as a Cardless EMI provider under EMI on Razorpay Standard Checkout. You can highlight **axio** on the Razorpay Checkout using a configuration and make it more prominent. + +![Highlighted Axio on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cardless-emi-axio-axio-checkout.jpg.md) + +Follow these steps to highlight axio on Razorpay Checkout: + +1. [Configure payment methods](#1-configure-payment-methods). +2. [Build configuration](#2-build-the-configuration). + +## 1. Configure Payment Methods + +Based on how you want to control the payment methods at the Checkout, there are two different ways to pass the configuration to Checkout: **Options Parameter** and **Global Settings**. + + + Pass the configuration to the `options` parameter of the Checkout code at run time. *Use it when you want to modify the order of the payment methods for a particular set of payments while rendering the Checkout.* + + + Create a global setting of the payments as a **Configuration ID**. *Use it when you want to fix the order of the payment methods on all the instances of Checkout.* Check the [Sample Code](#sample-code). + + +> **INFO** +> +> +> **Attention Plugin Users** + +> If you are using one of our [plugins](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins.md) to accept payments, you can highlight axio on Checkout only by creating a global setting of the payments as a **Configuration ID**. Contact our [Support Team](https://razorpay.com/support/#raise-a-request) for more details about Configuration ID. +> + + + +## 2. Build Configuration + +Using the `display` config, you can put together all the modules, that is, `blocks`, `sequence`, `preferences`, `hide` instruments as shown below: + +You can pass the `display` config in the Checkout options or the Orders API request using the `checkout_config_id` parameter. + +```js: display config +let config = { + display: { + blocks: { + walnutBlock: { + name: "Pay With Axio", // The title of the block + instruments: [{ + "method": "cardless_emi", + "providers": ["walnut369"] + }] // The list of instruments + }, + }, + sequence: ["block.walnutBlock"], // The sequence in which blocks and methods should be shown + preferences: { + show_default_blocks: true // Should Checkout show its default blocks? + } + } +}; +```js: JavaScript Checkout options +// beginning of the Checkout code +..... +let options = { + key: "[YOUR_KEY_ID]", + amount: 60000, + currency: "INR", + config: { + display: { + blocks: { + walnutBlock: { + name: "Pay With axio", // The title of the block + instruments: [{ + "method": "cardless_emi", + "providers": ["walnut369"] + }] // The list of instruments + }, + }, + sequence: ["block.walnutBlock"], // The sequence in which blocks and methods should be shown + preferences: { + show_default_blocks: true // Should Checkout show its default blocks? + } + } + } +}; +let razorpay = new Razorpay(options); +razorpay.open(); +.... +//rest of the Checkout code +``` + +```curl: Orders Sample Request +//Contact our Support Team to get your `checkout_config_id` parameter. +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "checkout_config_id": "config_Ep0eOCwdSfgkco", + "notes": { + "reference_no": "IBFA10106201500002" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("checkout_config_id", "config_Ep0eOCwdSfgkco"); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python + +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ +"amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "checkout_config_id": "config_Ep0eOCwdSfgkco" + }) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => 'INR', checkout_config_id=> 'config_Ep0eOCwdSfgkco')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("checkout_config_id", "config_Ep0eOCwdSfgkco"); +Order order = client.Order.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', checkout_config_id: 'config_Ep0eOCwdSfgkco' + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 50000, + currency: "INR", + receipt: "receipt#1", + checkout_config_id: "config_Ep0eOCwdSfgkco" +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "checkout_config_id": "config_Ep0eOCwdSfgkco" +} +body, err := client.Order.Create(data, nil) + +``` + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +## Sample Code + + +### Given below is the sample code to highlight axio on Standard Checkout: + + ```html: Highlight axio on Standard Checkout + + Pay + + + var options = { + "key": " your key_id", // Enter the Key ID generated from the Dashboard + "amount": "500000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise + "currency": "INR", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + // "order_id": "order_9A33XWu170gUtm", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "config": { + "display": { + "blocks": { + "walnut": { + "name": 'Pay via axio', + "instruments": [ + { + "method": 'cardless_emi', + "providers":['walnut369'] + } + ], + }, + }, + "sequence": ['block.walnut'], + "preferences": { + "show_default_blocks": false, + }, + }, + }, + "prefill": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399CC" + } + }; + var rzp1 = new Razorpay(options); + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + }); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + + ``` + + +### Related Information + +[Configure Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md) on Razorpay Checkout diff --git a/llm-content/payments/payment-methods/emi/cardless-emi/axio/custom-integration.md b/llm-content/payments/payment-methods/emi/cardless-emi/axio/custom-integration.md new file mode 100644 index 00000000..87effbcd --- /dev/null +++ b/llm-content/payments/payment-methods/emi/cardless-emi/axio/custom-integration.md @@ -0,0 +1,60 @@ +--- +title: axio Cardless EMI - Custom Checkout +description: Extend easy cardless EMI payment options powered by axio for your customers on the Custom Checkout. +--- + +# axio Cardless EMI - Custom Checkout + +axio is a cardless EMI offering by Capital Float - a BNPL (Buy Now, Pay Later) and Credit platform. Using axio, your customers can convert their payment amount to EMIs without a debit or credit card. You can show axio as a cardless EMI service provider on your Custom Checkout integration. + +> **INFO** +> +> +> **Feature Enablement** +> +> This is an on-demand feature. You can sign-up for our early access program using this [form](https://forms.gle/pN5Q6Yhr9cscCByU6). +> + +> **INFO** +> +> +> **Minimum Order Amount** +> +> Your customers should place an order of at least ₹900 to use axio as the cardless EMI payment provider. +> + +## Prerequisites + +- Sign up for a Razorpay account. +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. +- Have [Razorpay Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md) integrated on your website. + +## Integrate axio on Custom Checkout + +To show axio as a cardless EMI provider, you should pass the `method` and `provider` parameters in the Create Payments API. + +```js: Sample Request +razorpay.createPayment({ + amount: 500000, + currency: 'INR', + email: 'gaurav.kumar@example.com', + contact: '9123456000', + order_id: 'order_EAkbvXiCJlwhHR', + method: 'cardless_emi', + provider: 'walnut369' +}); +``` + +#### Request Parameters + +Along with the other checkout options, you must pass: + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it should be `cardless_emi`. + +`provider` _mandatory_ +: `string` Name of the cardless EMI provider. Here, it should be `walnut369`. + +### Related Information + +- [Know more about axio](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi/axio.md). diff --git a/llm-content/payments/payment-methods/emi/cardless-emi/axio/faqs.md b/llm-content/payments/payment-methods/emi/cardless-emi/axio/faqs.md new file mode 100644 index 00000000..7bad7d3c --- /dev/null +++ b/llm-content/payments/payment-methods/emi/cardless-emi/axio/faqs.md @@ -0,0 +1,82 @@ +--- +title: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about axio. +--- + +# Frequently Asked Questions (FAQs) + +### 1. What is cardless EMI? + + Cardless EMI allows your customers to convert their payment amount to EMIs without a debit or credit card. + + + +### 2. What is axio? + + axio is a cardless EMI payment partner. Customers can register with axio during the payment flow on the Razorpay Checkout. + + + +### 3. How is axio different from other cardless EMI providers? + + The ease of customer sign-up differentiates axio from others. New axio customers can register directly on the Razorpay Checkout and complete the payment. + + + +### 4. What details do my customers need to provide to register with axio? + + Mobile number, PAN number, DOB and Aadhar number are required for registration. The mobile number and Aadhaar number are verified via OTP at registration. + + + +### 5. What is the platform fee applicable for axio? + + We charge 3% as the platform fee for cardless EMI transactions by default. The same applies to axio. + + + +### 6. What are the minimum and maximum transaction amounts customers can pay with axio? + + The maximum transaction amount is ₹40,000. The minimum transaction amount is ₹900. + + + +### 7. What is the minimum and maximum transaction limit for the customer? + + + axio decides dynamically after evaluating the customer's profile. + + + +### 8. Does the customer need to make any downpayment when paying with axio? + + + Yes, the customer must pay the first month's installment as advance EMI. + + + +### 9. What is the rate of interest? + + + The rate of interest is 24% p.a. for all EMI tenures. + + + +### 10. How does the repayment work for axio? + + + axio will remind the customer every month before the repayment due date by auto-raising a request on the UPI app, with the UPI ID used to make the advance EMI payment. + + + +### 11. What would be the flow of partial or full refunds? + + + The standard process of claiming [refund and partial refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) at Razorpay is followed. + + + +### 12. Where can I find more information about axio's lenders and product offerings? + + + For more detailed information on axio's lenders and product offerings, refer to [axio's FAQs](https://axio.co.in/faq/) section. diff --git a/llm-content/payments/payment-methods/emi/cardless-emi/custom-integration.md b/llm-content/payments/payment-methods/emi/cardless-emi/custom-integration.md new file mode 100644 index 00000000..956e96ae --- /dev/null +++ b/llm-content/payments/payment-methods/emi/cardless-emi/custom-integration.md @@ -0,0 +1,81 @@ +--- +title: Cardless EMI - Custom Checkout +description: Extend easy EMI payment options for your customers on the Custom Checkout. Customers can make automatic EMI payments without using any credit or debit card. +--- + +# Cardless EMI - Custom Checkout + +Using Razorpay, you can let your customers use Cardless EMI as a payment method to convert their payment amount to EMIs without the need of a debit or credit card. Customers enjoy the benefits of the EMI as the payments are made using credits approved by the supported Cardless EMI Payment Partners. + +> **INFO** +> +> +> **Feature Enablement** +> +> Cardless EMI as a payment method is not enabled by default. Raise a request with our [Support Team](https://razorpay.com/support/#request) to enable this feature. +> + +## Supported Payment Partners + +Following is the list of supported Payment Partners for Cardless EMI: + +Banks | Provider Code | Minimum Order Amount +--- +ICICI Bank | `icic` | ₹7000 +--- +IDFC Bank | `idfb` | ₹5000 +--- +HDFC Bank | `hdfc` | ₹5000 +--- +Kotak Bank| `kkbk` | ₹3000 +--- +axio | `walnut369` | ₹900 +--- +Fibe | `earlysalary` | ₹3000 +--- +ZestMoney | `zestmoney` | ₹3000 + +> **INFO** +> +> +> **Minimum Order Amount** +> +> To avail Cardless EMI payment option at your checkout, your customers should place a minimum order amount. +> - ₹1000 for **ZestMoney**. +> - ₹3000 for **Fibe**. +> - ₹5000 for the banks mentioned above. +> + +## Payment Flow + +The payment flow for a customer using cardless EMI at Custom Checkout is described below: + +1. Customers enter the required details on the Checkout form and select **EMI**. +1. Customer selects the preferred cardless EMI service provider. +1. If the amount entered in the Checkout is eligible for EMI, customers are sent an OTP on their registered mobile numbers to authenticate their account with the selected cardless EMI service provider. +1. In case, the entered mobile number is invalid, an error message is displayed that the user does not have an account with the service provider. +1. After the successful verification, customers select EMI plan of their choice and complete the transaction. + +You will receive the entire payment amount from the cardless EMI service provider. Based on the terms and conditions, the customer pays the total payment amount with additional interest (if any) as EMIs to the provider. + +## Prerequisites + +- Keep the API keys (a combination of `Key_Id` and `Key_Secret`) handy for integration. +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. +- Have [Razorpay Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md) integrated on your website or app. + +## Integration Steps + +After an order is created and the customer's payment details are obtained, the information should be sent to Razorpay to complete the payment. You can do this by invoking `createPayment` method `method = cardless_emi` and `provider=`. + +```js: Sample Request +razorpay.createPayment({ + amount: 500000, + currency: 'INR', + email: 'gaurav.kumar@example.com', + contact: '9123456000', + order_id: 'order_EAkbvXiCJlwhHR', + method: 'cardless_emi', + provider: 'zestmoney' +}); +``` diff --git a/llm-content/payments/payment-methods/emi/cardless-emi/instant-emi.md b/llm-content/payments/payment-methods/emi/cardless-emi/instant-emi.md new file mode 100644 index 00000000..e29416d4 --- /dev/null +++ b/llm-content/payments/payment-methods/emi/cardless-emi/instant-emi.md @@ -0,0 +1,49 @@ +--- +title: About Instant EMI Cardless +description: Offer Instant EMI Cardless payment option to your customers on checkout. +--- + +# About Instant EMI Cardless + +Instant EMI is an innovative EMI² solution and checkout option designed by Razorpay to cater to customers without access to credit or debit cards. Boost your average order value and conversion rates by providing credit options at checkout, especially targeting customers without access to EMI options on their credit/debit cards. + +This feature enables customers to avail EMIs on purchases in under 10 minutes through a fully automated, digital process with multiple lending partners. Instant EMI fully complies with the Reserve Bank of India's Digital Lending Guidelines, ensuring a secure and transparent transaction experience for the customer. + +> **INFO** +> +> +> **Handy Tips** +> +> To use Instant EMI for checkout, customers must place an order with a minimum value of ₹1,000 and a maximum value of ₹50,000. +> + +## Advantages + +- **On-the-fly Registration:** Customers can easily sign up for Instant EMI directly from Razorpay Checkout by providing their PAN, date of birth, and Aadhaar number for KYC verification. Depending on the lender's preferences, additional steps may be required to set up repayments via EMandate and E-Sign of loan/credit sanction agreements. + +- **Zero Integration Effort:** Instant EMI seamlessly integrates with Standard Checkout, eliminating the need for additional integrations. + +- **One Instrument, One Journey, Multiple Options:** Instant EMI integrates with multiple lenders at the backend to avoid the need for you to integrate with various lenders directly. This simplifies the lending process for customers during checkout. + +- **Transparent Pricing:** Instant EMI ensures transparency by clearly displaying all relevant details, including interest rates, processing fees, down payments, and other customer penalties. + +## Payment Flow for Standard Checkout + +Customers select the products on your website or app and proceed to Checkout. On the Checkout page, the customers: + +1. Enter their **Phone Number** and click **Proceed**. +2. Select **EMI** as the payment method and click **Continue**. + ![Payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-continue.jpg.md) +3. Select **Instant EMI** and click **Continue**. + ![Instant cardless emi](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/instant-emi-continue.jpg.md) +4. On the **Instant EMI** page, click **Get started**. An OTP is sent to their registered mobile number to authenticate the customer account. They enter the OTP and click **Submit OTP**. + ![Instant EMI Submit OTP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/instant-emi-submit-otp2.jpg.md) +5. To complete the KYC verification, they enter their PAN details and click **Submit PAN**. Verify PAN and personal information and click **Explore EMI Offers**. + ![Instant EMI PAN and DOB details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/instant-emi-enter-otp.jpg.md) +6. The EMI options are displayed to the customers. They can select the tenure and click **Continue**. Depending on the customer's status, additional steps such as KYC, E-Mandate, and E-Sign of loan agreements may be necessary. + ![Flash select EMI plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/instant-emi-offers1.jpg.md) +7. Once the setup is complete, customers authorise the loan/credit drawdown via OTP confirmation. They can also view the Key Fact Statement for their reference. + +You receive settlements for the entire transaction amount as per your [settlement cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md#settlement-cycle). Customers repay the total order amount and any applicable interest as EMIs to you. + +Know more about the various [schemes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi/instant-emi/faqs.md#4-what-are-the-different-schemes-supported-under) supported under Instant EMI. For more information on No cost EMI schemes, please contact instantemi@razorpay.com. diff --git a/llm-content/payments/payment-methods/emi/cardless-emi/instant-emi/faqs.md b/llm-content/payments/payment-methods/emi/cardless-emi/instant-emi/faqs.md new file mode 100644 index 00000000..0179dec5 --- /dev/null +++ b/llm-content/payments/payment-methods/emi/cardless-emi/instant-emi/faqs.md @@ -0,0 +1,22 @@ +--- +title: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Instant EMI. +--- + +# Frequently Asked Questions (FAQs) + +### 1. What is the minimum and maximum amount limit for Instant EMI? + + The minimum and maximum amount limit for Instant EMI is ₹1,000 and ₹50,000, respectively. + + + +### 2. What checkout types does Instant EMI support? + + Currently, Instant EMI is available on [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + + + +### 3. What pricing applies to using Instant EMI? + + The payment instrument takes the cardless EMI pricing configured for your account. However, separate pricing can also be configured. To know more about pricing, please contact your account manager or instantemi@razorpay.com. diff --git a/llm-content/payments/payment-methods/emi/cardless-emi/s2s-integration.md b/llm-content/payments/payment-methods/emi/cardless-emi/s2s-integration.md new file mode 100644 index 00000000..00e8ab26 --- /dev/null +++ b/llm-content/payments/payment-methods/emi/cardless-emi/s2s-integration.md @@ -0,0 +1,110 @@ +--- +title: Cardless EMI - S2S +description: Know how you can configure cardless EMI as a payment method on your S2S integration. +--- + +# Cardless EMI - S2S + +Using Razorpay, you can let your customers use Cardless EMI as a payment method to convert their payment amount to EMIs without needing their debit or credit card. Customers enjoy the benefits of the EMI as the payments are made using credits approved by the supported Cardless EMI Payment Partners. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Supported Payment Partners + +Following is the list of supported Payment Partners for Cardless EMI: + +Banks | Provider Code | Minimum Order Amount +--- +ICICI Bank | `icic` | ₹7000 +--- +IDFC Bank | `idfb` | ₹5000 +--- +HDFC Bank | `hdfc` | ₹5000 +--- +Kotak Bank| `kkbk` | ₹3000 +--- +axio | `walnut369` | ₹900 +--- +Fibe | `earlysalary` | ₹3000 +--- +ZestMoney | `zestmoney` | ₹3000 + +## Payment Flow + +The payment flow for a customer using Cardless EMI is described below: + +1. Customers enter the required details on the Checkout form and select **EMI**. +1. Customer selects the preferred cardless EMI service provider. +1. If the amount entered in the Checkout is eligible for EMI, customers are sent an OTP on their registered mobile numbers to authenticate their account with the selected cardless EMI service provider. +1. If the entered mobile number is invalid, an error message is displayed that the user does not have an account with the service provider. +1. After the successful verification, customers select EMI plan of their choice and complete the transaction. + +You will receive the entire transaction amount from the Cardless EMI service provider. As per the terms and conditions, the customers pay the total order amount with additional interest (if any) as EMIs to the provider. + +## Prerequisites + +- Keep the API keys (a combination of `Key_Id` and `Key_Secret`) handy for integration. +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. +- Integrate with [Razorpay APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2.md) to accept payments on your website or app. + +## Integration Step + +After the order is created and the customer's payment details are obtained, the information should be sent to Razorpay to complete the payment. You can do this by passing `method = cardless_emi` and `provider=` while creating the payment. + +/payments/create/json + +```curl: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ + -d '{ + "amount": "100", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_EAkbvXiCJlwhHR", + "method": "cardless_emi", + "provider_name": "earlysalary" +}' +```json: Response +{ + "razorpay_payment_id": "pay_FVptEVkDdNzFx8", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/FVptEs3cSWX1fs/authorize" + } + ] +} +``` + +#### Request Parameters +The payment request for each of the supported payment methods will slightly vary. Know more about the [relevant payment request fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md). + +#### Response Parameters + +If the payment request is valid, the response contains the following fields. + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. The value here is `redirect`. Use this URL to redirect the customer to the bank's page. + + `url` + : `string` URL to be used for the action indicated. diff --git a/llm-content/payments/payment-methods/emi/cardless-emi/shopse.md b/llm-content/payments/payment-methods/emi/cardless-emi/shopse.md new file mode 100644 index 00000000..80d7328b --- /dev/null +++ b/llm-content/payments/payment-methods/emi/cardless-emi/shopse.md @@ -0,0 +1,47 @@ +--- +title: About ShopSe Cardless EMI +description: Offer ShopSe Cardless EMI payment option to your customers on chekcout. +--- + +# About ShopSe Cardless EMI + +ShopSe Cardless EMI is a popular **Buy Now Pay Later (BNPL)** option that lets customers convert purchases into monthly instalments without requiring a credit card, and in some cases, not even a debit card. This digital finance solution helps make high-value purchases more affordable and accessible. + +> **INFO** +> +> +> **Handy Tips** +> +> This payment provider is available only with Optimizer. +> + +#### Advantages + +- **Streamlined digital process**: Quick, paperless approvals at checkout reduce friction and help lower cart abandonment rates. +- **No credit card required**: A flexible financing option for customers without a credit card or those who prefer not to use one. + +## ShopSe Payment Flow for Standard Checkout + +Customers select the products on your website or app and proceed to Checkout. On the Checkout page, the customers: + +1. Enter their **Phone Number** and click **Continue**. +1. Select **EMI** as the payment method. + ![Select emi payment option on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/standard-checkout-emi-option.jpg.md) +1. Select **Cardless and Others**. + ![Select Cardless and Others](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/standard-checkout-cardless-emi-option.jpg.md) +1. An OTP is sent to their registered mobile number to check their eligibility. They enter the OTP and click **Continue**. + ![Enter Eligibility OTP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/eligibility-otp.jpg.md) +1. Select **ShopSe Digital Finance** as the Cardless EMI service provider. + ![Select shopse payment instrument](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/select-shopse-cardless.jpg.md) +1. Select the EMI tenure and complete the payment. + ![EMI options select Plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopse-payment-options.jpg.md) + +You receive the full transaction amount from ShopSe. Customers then pay ShopSe the total order amount in EMIs, along with any applicable interest, as per their terms and conditions. + +## Standard Checkout Integration + +No additional integration is required to show ShopSe as a Cardless EMI service provider on your Standard Checkout integration. Know [how to integrate ShopSe as a payment method on custom checkout.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#cardless-emi) + +## Related Information + +[ShopSe FAQs](https://www.getshopse.com/customer-faq). diff --git a/llm-content/payments/payment-methods/emi/cardless-emi/snapmint.md b/llm-content/payments/payment-methods/emi/cardless-emi/snapmint.md new file mode 100644 index 00000000..b546df2d --- /dev/null +++ b/llm-content/payments/payment-methods/emi/cardless-emi/snapmint.md @@ -0,0 +1,47 @@ +--- +title: About Snapmint Cardless EMI +description: Offer Snapmint Cardless EMI payment option to your customers on chekcout. +--- + +# About Snapmint Cardless EMI + +Snapmint's Cardless EMI is a **buy now pay later (BNPL)** service that lets customers buy products on easy monthly instalments without a credit card. It offers a credit line, often linked to your customers' debit card or UPI, making purchases more accessible. + +> **INFO** +> +> +> **Handy Tips** +> +> This payment provider is available only with Optimizer. +> + +#### Advantages + +- **Quick and Seamless Integration**: Enjoy a straightforward integration and smooth digital checkout, reducing friction and boosting conversions. +- **Fast & Easy Approval**: Customers benefit from instant, digital approvals with minimal paperwork, avoiding long waits. +- **Higher Average Order Value (AOV)**: Instalment options encourage customers to buy more expensive items or add more to their cart, significantly increasing your average order value. + +## Snapmint Payment Flow for Standard Checkout + +Customers select the products on your website or app and proceed to Checkout. On the Checkout page, the customers: + +1. Enter their **Phone Number** and click **Continue**. +1. Select **EMI** as the payment method. + ![Select emi payment option on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/standard-checkout-emi-option.jpg.md) +1. Select **Cardless and Others**. + ![Select Cardless and Others](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/standard-checkout-cardless-emi-option.jpg.md) +1. An OTP is sent to their registered mobile number to check their eligibility. They enter the OTP and click **Continue**. + ![Enter Eligibility OTP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/eligibility-otp.jpg.md) +1. Select **Snapmint** as the Cardless EMI service provider. + ![Select snapmint payment instrument](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/select-snapmint-cardless.jpg.md) +1. Select the EMI tenure and complete the payment. + +You receive the full transaction amount from Snapmint. Customers then pay Snapmint the total order amount in EMIs, along with any applicable interest, as per their terms and conditions. + +## Standard Checkout Integration + +No additional integration is required to show Snapmint as a Cardless EMI service provider on your Standard Checkout integration. Know [how to integrate Snapmint as a payment method on custom checkout.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#cardless-emi) + +## Related Information + +[Snapmint FAQs](https://snapmint.com/faq). diff --git a/llm-content/payments/payment-methods/emi/cardless-emi/zestmoney.md b/llm-content/payments/payment-methods/emi/cardless-emi/zestmoney.md new file mode 100644 index 00000000..7986f09f --- /dev/null +++ b/llm-content/payments/payment-methods/emi/cardless-emi/zestmoney.md @@ -0,0 +1,31 @@ +--- +title: ZestMoney Cardless EMI +description: You can now provide Cardless EMI payment options for your customers on the Checkout through ZestMoney. +--- + +# ZestMoney Cardless EMI + +ZestMoney is the fastest way to pay using EMI without a credit card. You can pay for your entire cart amount in EMIs of your choice as and when made available to you by the lending partners. + +> **INFO** +> +> +> **Minimum Order Amount** +> +> Your customers should place an order of at least ₹99 to use ZestMoney as the Cardless EMI payment provider. +> + +## Payment Flow for Standard Checkout + +Customers select the products on your website or app and proceed to Checkout. On the Checkout page, the customers: + +1. Enter the **Phone Number** and click **Proceed**. +2. Select **EMI** as the payment method and click **Continue**. +3. Enter the **OTP** sent to their mobile number if they want to use their saved cards and click **Verify**. +4. Select **Cardless and Others** and click **Continue**. +5. Select **Zestmoney** as the Cardless EMI service provider. +6. Choose a payment instrument from the list and select the EMI tenure. Click **Select EMI Plan**. + +After the successful payment, Razorpay redirects customers to your application or website. Customers' monthly statements will reflect the EMI amount with interest charged by the bank. + +You will receive the entire payment amount from the Cardless EMI service provider. Based on the terms and conditions, the customer pays the total payment amount with additional interest (if any) as EMIs to the provider. diff --git a/llm-content/payments/payment-methods/emi/credit-card-emi.md b/llm-content/payments/payment-methods/emi/credit-card-emi.md new file mode 100644 index 00000000..7fae4a45 --- /dev/null +++ b/llm-content/payments/payment-methods/emi/credit-card-emi.md @@ -0,0 +1,1337 @@ +--- +title: About Credit Card EMI +description: Let your customers avail Credit Card EMIs at Razorpay Standard Checkout. +--- + +# About Credit Card EMI + +Razorpay Checkout supports EMIs on credit cards issued by major banks. EMI is available by default on Razorpay Standard Checkout. No additional integration is needed. + +> **WARN** +> +> +> **Watch Out!** +> +> Instant Refunds are not supported on EMI, Cardless EMI and Pay Later. +> + +## Supported Payment Partners + +Following is the list of supported Payment Partners for Credit Card EMI and the minimum order amount stipulated by them: + + + + Bank Code | Issuer Bank | Availability | Minimum Amount (in INR) + --- + AMEX | American Express | [Request Activation](https://dashboard.razorpay.com/app/payment-methods/emi) | 5000 + --- + BARB | Bank of Baroda | Enabled on first card transaction | 2500 + --- + CITI | Citibank | Enabled on first card transaction | 2500 + --- + FDRL | Federal Bank | Enabled on first card transaction | 2500 + --- + HDFC | HDFC Bank | [Request Activation](https://dashboard.razorpay.com/app/payment-methods/emi) | 1000 + --- + HSBC | HSBC Bank | Enabled on first card transaction | 2000 + --- + ICIC | ICICI Bank | Enabled on first card transaction | 1500 + --- + IDFB | IDFC Bank | Enabled on first card transaction | 2500 + --- + INDB | IndusInd Bank | Enabled on first card transaction | 2000 + --- + KKBK | Kotak Mahindra Bank | Enabled on first card transaction | 2500 + --- + RATN | RBL Bank | Enabled on first card transaction | 1500 + --- + SBIN | State Bank of India | [Request Activation](https://dashboard.razorpay.com/app/payment-methods/emi) | 2500 + --- + SCBL | Standard Chartered | Enabled on first card transaction | 2500 + --- + UTIB | Axis Bank | Enabled on first card transaction | 3000 + --- + YESB | Yes Bank | Enabled on first card transaction | 1500 + + + + + Code | Card Network Name | Availability | Minimum Amount (in INR) + --- + Onecard | OneCard | Enabled on first card transaction | 2500 + + + + + For HDFC Bank and State Bank of India (SBI), please raise a request [here](https://dashboard.razorpay.com/app/payment-methods/emi) to enable them (not enabled by default). + + + + Check the standard [credit card interest rates charged by major banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#1-what-are-the-standard-credit-card-interest). + + +### Fetch EMI Plans + +Use the below endpoint to fetch a list of EMI plans offered by banks: + +/methods + +> **INFO** +> +> +> **[YOUR_KEY_ID] Required** +> +> To fire this API, you must provide your [KEY_ID] for authorization. Your [KEY_SECRET] is not required and should not be passed. Know how to generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). +> + +```curl: Request +curl -u [YOUR_KEY_ID] \ +-X GET https://api.razorpay.com/v1/methods + +```json: Response +{ + "entity": "methods", + ... + ... + "emi_plans": { + "SCBL": { + "min_amount": 250000, + "plans": { + "6": 13, + "9": 14, + "12": 14, + "3": 11.880000000000001 + } + }, + "BARB": { + "min_amount": 250000, + "plans": { + "3": 13, + "18": 15, + "6": 14, + "9": 14, + "12": 15, + "24": 16 + } + }, + "AMEX": { + "min_amount": 500000, + "plans": { + "3": 14, + "6": 14, + "9": 14, + "12": 14, + "18": 15, + "24": 15 + } + }, + "onecard": { + "min_amount": 250000, + "plans": { + "3": 16, + "6": 16, + "9": 16, + "12": 16, + "18": 16, + "24": 16 + } + }, + "INDB": { + "min_amount": 200000, + "plans": { + "18": 15, + "24": 15, + "3": 14, + "6": 14, + "9": 15, + "12": 15 + } + }, + "HDFC": { + "min_amount": 100000, + "plans": { + "3": 16, + "18": 16, + "24": 16, + "6": 16, + "9": 16, + "12": 16 + } + }, + "KKBK": { + "min_amount": 250000, + "plans": { + "18": 16, + "24": 16, + "3": 16, + "6": 16, + "9": 16, + "12": 16 + } + }, + "RATN": { + "min_amount": 150000, + "plans": { + "3": 13, + "6": 14, + "9": 15, + "12": 15, + "18": 15, + "24": 15 + } + }, + "ICIC": { + "min_amount": 150000, + "plans": { + "3": 15.99, + "6": 15.99, + "9": 15.99, + "12": 15.99, + "18": 15.99, + "24": 15.99 + } + }, + "YESB": { + "min_amount": 150000, + "plans": { + "3": 16, + "6": 16, + "9": 16, + "12": 16, + "18": 16, + "24": 16 + } + }, + "CITI": { + "min_amount": 250000, + "plans": { + "3": 14, + "6": 14, + "9": 16, + "18": 16, + "24": 16, + "12": 16 + } + }, + "UTIB": { + "min_amount": 300000, + "plans": { + "18": 16, + "24": 16, + "3": 16, + "6": 16, + "9": 16, + "12": 16 + } + }, + "IDFB": { + "min_amount": 2500, + "plans": { + "3": 14, + "6": 15, + "9": 15, + "12": 15, + "18": 15, + "24": 15 + } + }, + "FDRL": { + "min_amount": 250000, + "plans": { + "3": 15.99, + "6": 15.99, + "9": 15.99, + "12": 15.99, + "18": 15.99, + "24": 15.99 + } + }, + "HSBC": { + "min_amount": 200000, + "plans": { + "3": 15, + "6": 15, + "9": 15, + "12": 15, + "18": 15, + "24": 15 + } + }, + "HDFC_DC": { + "min_amount": 300000, + "plans": { + "6": 16, + "9": 16, + "12": 16, + "18": 16, + "3": 16 + } + }, + "INDB_DC": { + "min_amount": 500000, + "plans": { + "3": 17, + "6": 17, + "9": 17, + "12": 17, + "18": 17, + "24": 17 + } + } + }, + "emi_options": { + "SCBL": [ + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "3.68" + }, + { + "duration": 9, + "interest": 14, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "5.59" + }, + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "7.19" + }, + { + "duration": 3, + "interest": 11.880000000000001, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "1.95" + } + ], + "BARB": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "2.13" + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "10.95" + }, + { + "duration": 6, + "interest": 14, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "3.96" + }, + { + "duration": 9, + "interest": 14, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "5.59" + }, + { + "duration": 12, + "interest": 15, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "7.67" + }, + { + "duration": 24, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "14.90" + } + ], + "AMEX": [ + { + "duration": 3, + "interest": 14, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "2.29", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 6, + "interest": 14, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "3.96", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 9, + "interest": 14, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "5.59", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "7.19", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "10.95", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "14.07", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + } + ], + "onecard": [ + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "2.61" + }, + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "4.51" + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "6.35" + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "8.15" + }, + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "11.62" + }, + { + "duration": 24, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "14.90" + } + ], + "INDB": [ + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "10.95", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "14.07", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 3, + "interest": 14, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "2.29", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 6, + "interest": 14, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "3.96", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 9, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "5.97", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 12, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "7.67", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + } + ], + "HDFC": [ + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "2.61", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "11.62", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 24, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "14.90", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "4.51", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "6.35", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "8.15", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + } + ], + "KKBK": [ + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "11.62", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 24, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "14.90", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "2.61", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "4.51", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "6.35", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "8.15", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + } + ], + "RATN": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "2.13", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 6, + "interest": 14, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "3.96", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 9, + "interest": 15, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "5.97", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 12, + "interest": 15, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "7.67", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "10.95", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "14.07", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + } + ], + "ICIC": [ + { + "duration": 3, + "interest": 15.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "2.61", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 6, + "interest": 15.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "4.50", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 9, + "interest": 15.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "6.35", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 12, + "interest": 15.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "8.15", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 18, + "interest": 15.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "11.61", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 24, + "interest": 15.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "14.89", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + } + ], + "YESB": [ + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "2.61", + "processing_fee_plan": { + "type": "percentage", + "percentage": 1 + } + }, + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "4.51", + "processing_fee_plan": { + "type": "percentage", + "percentage": 1 + } + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "6.35", + "processing_fee_plan": { + "type": "percentage", + "percentage": 1 + } + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "8.15", + "processing_fee_plan": { + "type": "percentage", + "percentage": 1 + } + }, + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "11.62", + "processing_fee_plan": { + "type": "percentage", + "percentage": 1 + } + }, + { + "duration": 24, + "interest": 16, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "14.90", + "processing_fee_plan": { + "type": "percentage", + "percentage": 1 + } + } + ], + "CITI": [ + { + "duration": 3, + "interest": 14, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "2.29", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + }, + { + "duration": 6, + "interest": 14, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "3.96", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "6.35", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + }, + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "11.62", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + }, + { + "duration": 24, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "14.90", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "8.15", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + } + ], + "UTIB": [ + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "11.62", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + }, + { + "duration": 24, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "14.90", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + }, + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "2.61", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + }, + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "4.51", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "6.35", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "8.15", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + } + ], + "IDFB": [ + { + "duration": 3, + "interest": 14, + "subvention": "customer", + "min_amount": 2500, + "merchant_payback": "2.29" + }, + { + "duration": 6, + "interest": 15, + "subvention": "customer", + "min_amount": 2500, + "merchant_payback": "4.23" + }, + { + "duration": 9, + "interest": 15, + "subvention": "customer", + "min_amount": 2500, + "merchant_payback": "5.97" + }, + { + "duration": 12, + "interest": 15, + "subvention": "customer", + "min_amount": 2500, + "merchant_payback": "7.67" + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 2500, + "merchant_payback": "10.95" + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 2500, + "merchant_payback": "14.07" + } + ], + "FDRL": [ + { + "duration": 3, + "interest": 15.99, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "2.61" + }, + { + "duration": 6, + "interest": 15.99, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "4.50" + }, + { + "duration": 9, + "interest": 15.99, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "6.35" + }, + { + "duration": 12, + "interest": 15.99, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "8.15" + }, + { + "duration": 18, + "interest": 15.99, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "11.61" + }, + { + "duration": 24, + "interest": 15.99, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "14.89" + } + ], + "HSBC": [ + { + "duration": 3, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "2.45", + "processing_fee_plan": { + "type": "fixed", + "amount": 9900 + } + }, + { + "duration": 6, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "4.23", + "processing_fee_plan": { + "type": "fixed", + "amount": 9900 + } + }, + { + "duration": 9, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "5.97", + "processing_fee_plan": { + "type": "fixed", + "amount": 9900 + } + }, + { + "duration": 12, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "7.67", + "processing_fee_plan": { + "type": "fixed", + "amount": 9900 + } + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "10.95", + "processing_fee_plan": { + "type": "fixed", + "amount": 9900 + } + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "14.07", + "processing_fee_plan": { + "type": "fixed", + "amount": 9900 + } + } + ], + "HDFC_DC": [ + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "4.51", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "6.35", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "8.15", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "11.62", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "2.61", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + } + ], + "INDB_DC": [ + { + "duration": 3, + "interest": 17, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "2.77", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 6, + "interest": 17, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "4.78", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 9, + "interest": 17, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "6.73", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 12, + "interest": 17, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "8.63", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 18, + "interest": 17, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "12.28", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 24, + "interest": 17, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "15.73", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + } + ] + }, + ... +} +``` + +## Payment Flow on Standard Checkout + +Customers select the products on your website or app and proceed to Checkout. On the Checkout page, the customers: + +1. Enter the **Phone Number** and click **Continue**. +2. Select **EMI** as the payment method. + + ![Select emi payment option on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-options-card.jpg.md) + +3. Select **Credit Card**. + + ![Select credit card payment option on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-credit-card.jpg.md) + +4. Choose a bank from the list and select the EMI tenure. Click **Continue**. + + ![EMI tenure and click Select Plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-credit-tenure1.jpg.md) + +5. Enter the relevant details. The eligibility depends on the customer's card's BIN (first 6 digits). If the card is not eligible, the customers can pay the full amount. +6. Choose if they want to **Save this card as per RBI guidelines** or pay without saving the card. + +After the successful payment, Razorpay redirects customers to your application or website. Customers' monthly statements will reflect the EMI amount with interest charged by the bank. + +When the customers complete the payment on the Checkout, the entire transaction amount is authorized by the customer's issuing bank and converted into EMIs within 3-4 days, depending on the payment terms agreed with the credit card provider. + +## FAQs + +[Credit Card EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#credit-card-emi). diff --git a/llm-content/payments/payment-methods/emi/credit-card-emi/onecard.md b/llm-content/payments/payment-methods/emi/credit-card-emi/onecard.md new file mode 100644 index 00000000..a4ce56be --- /dev/null +++ b/llm-content/payments/payment-methods/emi/credit-card-emi/onecard.md @@ -0,0 +1,33 @@ +--- +title: OneCard Credit Card EMI +description: Offer OneCard Credit Card EMI option to your customers on Razorpay Standard Checkout. +--- + +# OneCard Credit Card EMI + +Offer Credit Card EMIs by OneCard to your customers. The credit card is offered in collaboration with banks, such as IDFC First Bank, SBM Bank, South Indian Bank, Federal Bank, and Bank of Baroda Financial. OneCard is a new-age credit card built for the mobile generation with customer experience at its core. + +## Payment Flow + +Customers select the products on your website or app and proceed to Checkout. On the Checkout page, the customers: + +1. Enter the **Phone Number** and click **Continue**. +2. Select **EMI** as the payment method. + ![Select emi payment option on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-options-card.jpg.md) +3. Select **Credit Card**. + ![Select credit card payment option on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-credit-card.jpg.md) +4. Select **OneCard** from the list and the EMI tenure. Click **Continue**. + ![EMI tenure and click Select Plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-select-onecard.jpg.md) +5. Enter the OneCard Credit Card details and choose if they want to **Save this card as per RBI guidelines** or pay without saving the card. +6. Click **Continue**. +7. Razorpay Checkout redirects to OneCard for approval. You can either swipe right on your OneCard app to approve payment or click **Approve using OTP** and enter the OTP sent to your mobile number. + +When the customers complete the payment on the Checkout, the entire transaction amount is authorized by OneCard and converted into EMIs within 3-4 days, depending on the payment terms agreed with the credit card provider. + +> **INFO** +> +> +> **Handy Tips** +> +> Check the standard [credit card interest rates charged by OneCard.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#2-what-are-the-interest-rates-charged-by) +> diff --git a/llm-content/payments/payment-methods/emi/debit-card-emi.md b/llm-content/payments/payment-methods/emi/debit-card-emi.md new file mode 100644 index 00000000..56b94997 --- /dev/null +++ b/llm-content/payments/payment-methods/emi/debit-card-emi.md @@ -0,0 +1,67 @@ +--- +title: Debit Card EMI | Unlock Easy Installment Payments +heading: About Debit Card EMI +description: Offer Debit Card EMIs to your customers at Razorpay Checkout. Check the payment flow and supported Banks. +--- + +# About Debit Card EMI + +- **Debit Card EMI Changelog**: Discover new features, updates and deprecations related to Debit Card EMI (since Jan 2024). + +Using Razorpay, you can let your customers use Debit EMI as a payment method to buy various products on EMI using their Debit Cards without paying the entire amount immediately. Razorpay supports EMIs on debit cards issued by [major banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#5-can-you-provide-a-list-of-the). EMI is available by default on Razorpay Standard Checkout. No additional integration is needed. + +> **WARN** +> +> +> **Watch Out!** +> +> Instant Refunds are not supported on EMI, Cardless EMI and Pay Later. +> + +## Supported Banks for Debit Card EMIs + +Below is a list of banks that support debit card EMIs. + +Bank Code | Issuer Bank +--- +HDFC | HDFC Bank +--- +ICIC | ICICI Bank + +> **INFO** +> +> +> **Handy Tips** +> +> Check the [standard debit card interest rates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#5-can-you-provide-a-list-of-the) and the minimum amount charged by the banks. +> + +## Payment Flow on Standard Checkout + +Customers select the products on your website or app and proceed to Checkout. + +On the Checkout page, the customers: + +1. Enter the **Phone Number** and click **Continue**. +2. Select **EMI** as the payment method. + + ![Select emi payment option on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-options-card.jpg.md) + +3. Select **Debit Card**. + + ![Select debit card payment option on checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-debit-card.jpg.md) + +4. Choose a bank from the list and select the EMI tenure. Click **Continue**. + + ![EMI tenure and click Select Plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/emi-credit-tenure.jpg.md) + +5. They enter the relevant card details and choose if they want to **Save this card as per RBI guidelines** or pay without saving the card. +6. Click **Continue**. + +If the customers are not eligible, they can pay the full amount. + +After the successful payment, Razorpay redirects customers to your application or website. Customers' monthly statements will reflect the EMI amount with interest charged by the bank. + +## FAQs + +[Debit Card EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#debit-card-emi). diff --git a/llm-content/payments/payment-methods/emi/faqs.md b/llm-content/payments/payment-methods/emi/faqs.md new file mode 100644 index 00000000..1670d9e2 --- /dev/null +++ b/llm-content/payments/payment-methods/emi/faqs.md @@ -0,0 +1,1624 @@ +--- +title: Payment Methods | EMI - FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about EMI as a payment method supported at Razorpay Checkout. +--- + +# Frequently Asked Questions (FAQs) + +## Common + + +### 1. If a customer chooses EMI as the payment method, do I get the full amount upfront? + + Yes, you receive the full amount at once and the provider/bank converts it into EMI for the customer. + + + +### 2. What happens when the customer fails to pay the EMI? + + The loss is borne by the provider/bank. You receive the full payment upfront. + + + + +### 3. Can my customers avail Offers for EMI payments at Checkout? + + Yes, they can avail offer on debit and credit card EMIs. Know more about [creating EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers.md). + + + + +## Debit Card EMI + + +### 1. How do banks perform the EMI eligibility check during the transaction flow? + + Eligibility is checked using the card number and registered phone number. Therefore, customers should always use the phone number registered with the bank while making a payment. + + + +### 2. What is the minimum balance required in the customer's account to avail Debit Card EMI? + + None. Customers need not have any minimum balance in their accounts while placing the order. However, they need to ensure that their accounts have sufficient funds to pay the EMI due every month. + + + +### 3. How will the customers know that they are eligible for Debit Card EMI? + + Customers can check their eligibility by sending the SMS + + `DCEMI last 4 digits of Debit Card number` to `56767`, from their registered mobile number. + + + +### 4. What is the criteria to avail Debit Card EMI? + + To avail [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md), your customers should pass the eligibility criteria set by their banks. The minimum order amount on the Checkout should be ₹5000 (for HDFC and IndusInd debit cards). + + + +### 5. Can you provide a list of the EMI plans and interest rates of different banks that support Debit card EMI? + + The interest rates applied by each bank for Debit Card EMIs is provided below. + - The minimum transaction amount for which EMIs can be availed on debit cards can vary for each bank. + - The maximum transaction amount depends upon the available pre-approved limit for the customer. + + + + For **HDFC Bank (HDFC)**: + + + + Tenures in Months | Minimum Amount (in INR) | Interest rates | Maximum Amount + --- + 3 months | 3000 | 16% | NA + --- + 6 months | 5000 | 16% | NA + --- + 9 months | 5000 | 16% | NA + --- + 12 months | 5000 | 16% | NA + --- + 18 months | 5000 | 16% | NA + --- + 24 months | NA | NA | NA + + + + + + + +### For **ICICI Bank (ICIC)**: + + + + Tenures in Months | Minimum Amount (in INR) | Interest rates | Maximum Amount + --- + 3 months | 5000 | 16% | 100000 + --- + 6 months | 5000 | 16% | 100000 + --- + 9 months | 5000 | 16% | 100000 + --- + 12 months | 5000 | 16% | 100000 + --- + 18 months | 5000 | 16% | 100000 + --- + 24 months | 5000 | 16% | 100000 + + + + + + + + +### 6. Can the customers change the EMI plan after placing the order? + + No, EMI plans cannot be changed after an order is placed. + + + +### 7. Do customers need to pay any down-payment to avail Debit Card EMI? + + No, the customers need not pay any down-payment amount to avail the Debit Card EMI option. + + + +### 8. Is there a possibility to foreclose EMIs availed on Debit Cards? + + Yes, Debit Card EMIs can be foreclosed after clearing the first three EMIs. + + + +### 9. Which are the business categories for which Debit Card EMI is not allowed? + + The Debit Card EMI payment method is not allowed for certain business categories. Check the relevant Category section below for the list of sub-categories and support status. Debit Card EMI is not allowed for categories with **N** as the status. + + +> **WARN** +> +> +> **Watch Out!** +> +> Due to our partner bank restrictions, the Debit Card EMI payment methods may not be available to all the Merchant Categories and Subcategories. +> + + + + Financial Services + + + Sub Category | Description | Status + --- + mutual_fund | Mutual Fund | N + --- + lending | Lending | N + --- + cryptocurrency | Cryptocurrency | N + --- + insurance | Insurance | Y + --- + nbfc | NBFC | N + --- + cooperatives | Cooperatives | Y + --- + pension_fund | Pension Fund | Y + --- + forex | Forex | N + --- + securities | Securities | N + --- + commodities | Commodities | N + --- + accounting | Accounting and Taxes | Y + --- + financial_advisor | Financial and Investment Advisors/Financial Advisor | Y + --- + crowdfunding | Crowdfunding Platform | N + --- + trading | Stock Brokerage and Trading | N + --- + betting | Betting | N + --- + get_rich_schemes | Get Rich Schemes | N + --- + moneysend_funding | MoneySend Funding | Y + --- + wire_transfers_and_money_orders | WIRE TRANSFER MONEY ORDER | N + --- + tax_preparation_services | Tax Preparation Service | Y + --- + tax_payments | Tax Payments | Y + --- + digital_goods | Digital Goods-Multi-Category | Y + --- + atms | Financial Institutions-Automated Cash Disbursements | N + + + + +### Education + + + college | College + --- + schools | Schools + --- + university | University + --- + professional_courses | Professional Courses + --- + distance_learning | Distance Learning + --- + day_care | Pre-School/Day Care + --- + coaching | Coaching Institute + --- + elearning | E-Learning + --- + vocational_and_trade_schools | SCHOOLS, TRADE AND VOCATIONAL + --- + sporting_clubs | ATHLETIC FEES + --- + dance_halls_studios_and_schools | Dance Halls, Studios and Schools + --- + correspondence_schools | Schools, Correspondence + + + + +### Healthcare + + + Category Code | Category Name | Status + --- + pharmacy | Pharmacy | N + --- + clinic | Clinic | Y + --- + hospital | Hospital | Y + --- + lab | Lab | Y + --- + dietician | Dietician/Diet Services | Y + --- + fitness | Gym and Fitness | Y + --- + health_coaching | Health and Lifestyle Coaching | Y + --- + health_products | Health Products | Y + --- + healthcare_marketplace | Marketplace/Aggregator | N + --- + osteopaths | Osteopaths | Y + --- + medical_equipment_and_supply_stores | Dental/Laboratory/Medical/Ophthalmic Hospital Equipment and Supplies | Y + --- + drug_stores | DRUGS, DRUG PROPRIETARIES | N + --- + podiatrists_and_chiropodists | Podiatrists and Chiropodists | Y + --- + dentists_and_orthodontists | Dentists, Orthodontists | Y + --- + hardware_stores | Hardware Stores | Y + --- + ophthalmologists | Optometrists, Ophthalmologists | Y + --- + orthopedic_goods_stores | Orthopedic Goods-Artificial Limb Stores | Y + --- + health_practitioners_medical_services | Health Practitioners, Medical Services-not elsewhere classified | Y + --- + testing_laboratories | Testing Laboratories-Non medical | Y + --- + doctors | Doctors-not elsewhere classified | Y + + + + +### Utilities + + + Sub Category | Description | Status + --- + electricity | Electricity | Y + --- + gas | Gas | Y + --- + telecom | Telecom Service Provider | Y + --- + water | Water | Y + --- + cable | Cable operator | Y + --- + broadband | Broadband | Y + --- + dth | DTH | Y + --- + internet_provider | Internet service provider | Y + --- + bill_and_recharge_aggregators | Bill Payment and Recharge Aggregators | Y + --- + central | Central Department | Y + + + + +### Government + + + Sub Category | Description | Status + --- + central | Central Department | Y + --- + state | State Department | Y + --- + intra_government_purchases | Intra-Government Purchases -Government Only | Y + --- + goverment_postal_services | Postal Services -Government Only | Y + + + + +### Logistics + + + Sub Category | Description | Status + --- + freight | Freight Consolidation/Management | Y + --- + courier | Courier Shipping | Y + --- + warehousing | Public/Contract Warehousing | Y + --- + distribution | Distribution Management | Y + --- + end_to_end_logistics | End-to-end logistics | Y + --- + courier_services | Courier Services-Air &, Ground, Freight Forwarders | Y + + + + +### Tours and Travel + + + Sub Category | Description | Status + --- + aviation | Aviation | Y + --- + accommodation | Lodging and Accommodation | Y + --- + ota | OTA | Y + --- + travel_agency | Tours and Travel Agency | Y + --- + tourist_attractions_and_exhibits | Tourist Attractions and Exhibits | Y + --- + aquariums_dolphinariums_and_seaquariums | Aquariums, Dolphinariums, and Seaquariums | Y + --- + timeshares | Timeshares | Y + + + + +### Transport + + + Sub Category | Description | Status + --- + cab_hailing | Cab/auto hailing | Y + --- + bus | Bus ticketing | Y + --- + train_and_metro | Train and metro ticketing | Y + --- + automobile_rentals | National Car Rental | Y + --- + cruise_lines | CRUISE LINES | Y + --- + parking_lots_and_garages | Automobile Parking Lots and Garages | Y + --- + bridge_and_road_tolls | BRIDGE & ROAD FEES, TOLLS | Y + --- + freight_transport | Railroads and Freight | Y + --- + truck_and_utility_trailer_rentals | Truck and Utility Trailer Rentals | Y + --- + transportation | Transportation—Suburban and Local Commuter Passenger, including Ferries | Y + + + + +### Ecommerce + + + Sub Category | Description | Status + --- + ecommerce_marketplace | Horizontal Commerce/Marketplace | N + --- + agriculture | Agricultural products | Y + --- + books | Books and Publications | Y + --- + electronics_and_furniture | Electronics and Furniture | Y + --- + coupons | Coupons and deals | Y + --- + rental | Product Rental | Y + --- + fashion_and_lifestyle | Fashion and Lifestyle | Y + --- + gifting | Flowers and Gifts | Y + --- + grocery | Grocery | Y + --- + baby_products | Baby Care and Toys | Y + --- + office_supplies | Office Supplies | Y + --- + wholesale | Wholesale/Bulk trade | Y + --- + religious_products | Religious products | Y + --- + pet_products | Pet Care and Supplies | Y + --- + sports_products | Sports goods | Y + --- + arts_and_collectibles | Arts, crafts and collectibles | Y + --- + sexual_wellness_products | Sexual Wellness Products | Y + --- + drop_shipping | Dropshipping | N + --- + crypto_machinery | Crypto Machinery | Y + --- + tobacco | Tobacco | Y + --- + weapons_and_ammunitions | Weapons and Ammunitions | Y + --- + stamps_and_coins_stores | Stamps & Coins Stores | Y + --- + automobile_parts_and_equipements | MOTOR VEHICLE SUPPLIES | Y + --- + office_equipment | Office, Photographic, Photocopy, and Microfilm Equipment | Y + --- + garden_supply_stores | Lawn and Garden Supply Stores | Y + --- + household_appliance_stores | Household Appliance Stores | Y + --- + non_durable_goods | NONDURABLE GOODS | Y + --- + electrical_parts_and_equipment | Electrical Parts and Equipment | Y + --- + wig_and_toupee_shops | Wig and Toupee Shops | Y + --- + gift_novelty_and_souvenir_shops | Card, Gift, Novelty, and Souvenir Shops | Y + --- + duty_free_stores | Duty Free Stores | Y + --- + office_and_commercial_furniture | Office and Commercial Furniture | Y + --- + dry_goods | Piece Goods, Notions, and Other Dry Goods | Y + --- + books_and_publications | Book Stores | Y + --- + camera_and_photographic_stores | Camera and Photographic Supply Stores | Y + --- + meat_supply_stores | Freezer, Locker Meat Provisioners | Y + --- + leather_goods_and_luggage | Leather Goods and Luggage Stores | Y + --- + snowmobile_dealers | Snowmobile Dealers | Y + --- + men_and_boys_clothing_stores | Men’s and Boy’s Clothing and Furnishings Store | Y + --- + paint_supply_stores | Varnishes, Paints, Supplies | Y + --- + automotive_parts | Automotive Parts, Accessories Stores | Y + --- + jewellery_and_watch_stores | Precious Stones and Metals, Watches and Jewelry | Y + --- + auto_store_home_supply_stores | Auto Store, Home Supply Stores | Y + --- + tent_stores | Tent and Awning Shops | Y + --- + petroleum_and_petroleum_products | Petroleum and Petroleum Products | N + --- + department_stores | Department Stores | Y + --- + shoe_stores_retail | Shoe Stores | Y + --- + automotive_tire_stores | Automotive Tire Stores | Y + --- + sport_apparel_stores | Sports Apparel, Riding Apparel Stores | Y + --- + chemicals_and_allied_products | Chemicals and Allied Products | Y + --- + fireplace_parts_and_accessories | FIREPLACE FIREPLACE SCREENS AND ACCESSORIES STORES | Y + --- + commercial_equipments | COMMERCIAL EQUIPMENTS | Y + --- + family_clothing_stores | Family Clothing Stores | Y + --- + fabric_and_sewing_stores | Fabric, Needlework, Piece Goods, and Sewing Stores | Y + --- + camper_recreational_and_utility_trailer_dealers | Camper, Recreational and utility trailer dealers | Y + --- + record_shops | Record Shops | Y + --- + home_supply_warehouse | Home Supply Warehouse | Y + --- + clocks_and_silverware_stores | Clock, Jewelry, Watch, and Silverware Store | N + --- + art_supply_stores | Artist Supply Stores, Craft Shops | Y + --- + pawn_shops | Pawn Shops | Y + --- + school_supplies_and_stationery | Office, School Supply, and Stationery Stores | Y + --- + opticians_optical_goods_and_eyeglasse_stores | Opticians, Optical Goods, and Eyeglasses | Y + --- + watch_and_jewellery_repair_stores | Clock, Jewelry, and Watch Repair Shops | N + --- + wholesale_footwear_stores | Commercial Footwear | Y + --- + antique_stores | Antique Reproduction Stores | Y + --- + plumbing_and_heating_equipment | Plumbing and Heating Equipment | Y + --- + variety_stores | Variety Stores | Y + --- + liquor_stores | Package Stores, Beer, Wine, Liquor | N + --- + boat_dealers | Boat Dealers | Y + --- + cosmetic_stores | Cosmetic Stores | Y + --- + home_furnishing_stores | Miscellaneous House Furnishing Specialty Shops | Y + --- + telecommunication_equipment_stores | Telecommunication Equipment Including Telephone Sales | Y + --- + women_clothing | Womens Ready to Wear Stores | Y + --- + florists | Florists | Y + --- + commercial_photography_and_graphic_design_services | Commercial Art, Graphics, Photography | Y + --- + building_matrial_stores | Building Materials, Lumber Stores | Y + --- + candy_nut_confectionery_shops | Candy, Nut, Confectionery Stores | Y + --- + glass_and_wallpaper_stores | Glass, Paint, Wallpaper Stores | Y + --- + video_game_supply_stores | Video Amusement Game Supplies | Y + --- + drapery_and_window_coverings_stores | Drapery, Upholstery, and Window Coverings Stores | Y + --- + uniforms_and_commercial_clothing_stores | Men’s, Women’s, and Children’s Uniforms and Commercial Clothing | Y + --- + automotive_paint_shops | Automotive Paint Shops | Y + --- + durable_goods_stores | Durable Goods not elsewhere classified | Y + --- + fur_shops | Furriers and Fur Shops | Y + --- + industrial_supplies | Industrial Supplies | Y + --- + motorcycle_shops_and_dealers | Motorcycle Shops and Dealers | Y + --- + children_and_infants_wear_stores | Children’s and Infants’ Wear Stores | Y + --- + computer_software_stores | Computer Software Stores | Y + --- + women_accessory_stores | Women Accessory and Specialty Stores | Y + --- + books_periodicals_and_newspaper | Books, Periodicals and Newspapers | Y + --- + floor_covering_stores | Floor Covering Stores | Y + --- + crystal_and_glassware_stores | Crystal and Glassware Stores | Y + --- + hardware_equipment_and_supply_stores | Hardware Equipment and Supplies | Y + --- + discount_stores | Discount stores | Y + --- + computers_peripheral_equipment_software | Computers, Computer Peripheral Equipment, Software | Y + --- + automobile_and_truck_dealers | Automobile and Truck Dealers-Used Only-Sales | Y + --- + aircraft_and_farm_equipment_dealers | Miscellaneous Automotive, Aircraft, and Farm Equipment Dealers-not elsewhere classified | Y + --- + antique_shops_sales_and_repairs | Antique Shops-Sales, Repairs, and Restoration Services | Y + --- + bicycle_stores | Bicycle Shops-Sales and Service | Y + --- + hearing_aids_stores | Hearing Aids-Sales, Service, Supply Stores | Y + --- + music_stores | Music Stores-Musical Instruments, Pianos, Sheet Music | Y + --- + construction_materials | Construction Materials-not elsewhere classified | Y + --- + accessory_and_apparel_stores | Accessory and Apparel Stores-Miscellaneous | Y + --- + second_hand_stores | SECOND HAND STORES-USED MERCHANDISE STORES | Y + --- + fuel_dealers | Fuel Dealers-Coal, Fuel Oil, Liquefied Petroleum, Wood | N + --- + furniture_and_home_furnishing_store | Furniture and Home Furnishing store | Y + + + + +### Food and Beverages + + + Sub Category | Description | Status + --- + online_food_ordering | Online Food Ordering | Y + --- + restaurant | Restaurants | Y + --- + food_court | Food Courts/Corporate Cafeteria | Y + --- + catering | Catering Services | Y + --- + alcohol | Alcoholic Beverages | Y + --- + restaurant_search_and_booking | Restaurant search and reservations | Y + --- + dairy_products | Dairy Products Stores | Y + --- + bakeries | Bakeries | Y + + + + +### IT and Software + + + Sub Category | Description | Status + --- + saas | SaaS (Software as a service) | N + --- + paas | Platform as a service | N + --- + iaas | Infrastructure as a service | N + --- + consulting_and_outsourcing | Consulting and Outsourcing | N + --- + web_development | Web designing, development and hosting | Y + --- + technical_support | Technical Support | Y + --- + data_processing | Data processing | Y + + + + +### Gaming + + + Sub Category | Description | Status + --- + game_developer | Game developer and publisher | N + --- + esports | E-sports | N + --- + online_casino | Online Casino | N + --- + fantasy_sports | Fantasy Sports | N + --- + gaming_marketplace | Game distributor/Marketplace | N + + + + +### Media and Entertainment + + + Sub Category | Description | Status + --- + video_on_demand | Video on demand | Y + --- + music_streaming | Music streaming services | Y + --- + multiplex | Multiplexes | Y + --- + content_and_publishing | Content and Publishing | Y + --- + ticketing | Events and movie ticketing | Y + --- + news | News | Y + --- + video_game_arcades | Video Game Arcades/Establishments | N + --- + video_tape_production_and_distribution | Motion Pictures and Video Tape Production and Distribution | Y + --- + bowling_alleys | Bowling Alleys | Y + --- + billiard_and_pool_establishments | Billiard and Pool Establishments | Y + --- + amusement_parks_and_circuses | Amusement Parks, Carnivals, Circuses, Fortune Tellers | Y + --- + ticket_agencies | Theatrical Producers-except Motion Pictures, Ticket Agencies | Y + + + + +### Services + + + Sub Category | Description | Status + --- + repair_and_cleaning | Repair and cleaning services | Y + --- + interior_design_and_architect | Interior Designing and Architect | Y + --- + movers_and_packers | Movers and Packers | Y + --- + legal | Legal Services | Y + --- + event_planning | Event planning services | Y + --- + service_centre | Service Centre | Y + --- + consulting | Consulting Services | N + --- + ad_and_marketing | Ad and marketing agencies | Y + --- + services_classifieds | Services Classifieds | Y + --- + multi_level_marketing | Multi-level Marketing | Y + --- + construction_services | GENERAL CONTRACTORS | Y + --- + architectural_services | Horticultural and Landscaping Services | Y + --- + car_washes | CAR WASHES | Y + --- + motor_home_rentals | A MOTOR HOME AND RECREATIONAL | Y + --- + stenographic_and_secretarial_support_services | Stenographic and Secretarial Support Services | Y + --- + chiropractors | Chiropractors | Y + --- + automotive_service_shops | Automotive Service Shops | Y + --- + shoe_repair_shops | Hat Cleaning Shops, Shoe Repair Shops, Shoe Shine Parlors | Y + --- + telecommunication_service | Telecom Servc including but not ltd to prepaid phone serv | Y + --- + fines | FINES | N + --- + security_agencies | Agencies – Security Services | Y + --- + type_setting_and_engraving_services | Typesetting, Plate Making, Related Services | Y + --- + small_appliance_repair_shops | Appliance Repair Shops, Electrical and Small | Y + --- + photography_labs | Photo Developing, Photofinishing Laboratories | Y + --- + dry_cleaners | Dry Cleaners | Y + --- + electronic_repair_shops | Electronic Repair Shops | Y + --- + cleaning_and_sanitation_services | Specialty Cleaning, Polishing, and Sanitation Preparations | Y + --- + nursing_care_facilities | Nursing and Personal Care Facilities | Y + --- + direct_marketing | Direct Marketing Other Direct Marketers not elsewhere classified | Y + --- + veterinary_services | Veterinary Services | Y + --- + affliated_auto_rental | AFFILIATED AUTO RENTAL | Y + --- + alimony_and_child_support | COURT COST INCLUDING ALIMONY AND CHILD SUPPORT | Y + --- + airport_flying_fields | AIRPORT FLYING FIELDS | Y + --- + tire_retreading_and_repair_shops | Tire Retreading and Repair Shops | Y + --- + television_cable_services | Cable and other Pay Television Services | Y + --- + recreational_and_sporting_camps | Recreational and Sporting Camps | Y + --- + agricultural_cooperatives | AGRICULTURAL COOPERATIVES | Y + --- + carpentry_contractors | Carpentry Contractors | Y + --- + wrecking_and_salvaging_services | Wrecking and Salvage Yards | Y + --- + automobile_towing_services | Towing Services | Y + --- + barber_and_beauty_shops | Barber and Beauty Shops | Y + --- + video_tape_rental_stores | Video Tape Rental Stores | Y + --- + golf_courses | Golf Courses, Public | Y + --- + miscellaneous_repair_shops | Miscellaneous Repair Shops and Related Services | Y + --- + motor_homes_and_parts | MOTOR HOME DEALERS | Y + --- + debt_marriage_personal_counseling_service | Debt, Marriage, Personal Counseling Service | Y + --- + air_conditioning_and_refrigeration_repair_shops | Air Conditioning and Refrigeration Repair Shops | Y + --- + tailors | Alterations, Mending, Seamstresses, Tailors | Y + --- + massage_parlors | Massage Parlors | Y + --- + horse_or_dog_racing | Government Licensed Horse/Dog Racing | N + --- + credit_reporting_agencies | Consumer Credit Reporting Agencies | Y + --- + heating_and_plumbing_contractors | Air Conditioning, Heating, and Plumbing Contractors | Y + --- + electrical_contractors | ELECTRICAL CONTRACTORS | Y + --- + carpet_and_upholstery_cleaning_services | Carpet and Upholstery Cleaning | Y + --- + roofing_and_metal_work_contractors | Roofing and Siding, Sheet Metal Work Contractors | Y + --- + internet_service_providers | Computer Network/Information Services | Y + --- + laundry_services | Cleaning, Garment, and Laundry Services | Y + --- + recreational_camps | Trailer Parks and Campgrounds | Y + --- + masonry_contractors | Insulation, Masonry, Plastering, Stonework, and Tile Setting Contractors | Y + --- + exterminating_and_disinfecting_services | Exterminating and Disinfecting Services | Y + --- + ambulance_services | Ambulance Services | Y + --- + funeral_services_and_crematories | Funeral Services and Crematories | Y + --- + metal_service_centres | Metal Service Centers and Offices | Y + --- + copying_and_blueprinting_services | Quick Copy, Reproduction, and Blueprinting Services | Y + --- + fuel_dispensers | Fuel Dispenser, Automated | N + --- + lottery | Government Owned Lottery,Government Owned Lottery | N + --- + welding_repair | WELDING REPAIR | Y + --- + mobile_home_dealers | Mobile Home Dealers | Y + --- + concrete_work_contractors | CONCRETE WORK CONTRACTORS | Y + --- + boat_rentals | Boat Leases and Boat Rentals | Y + --- + personal_shoppers_and_shopping_clubs | Buying/Shopping Clubs, Services | Y + --- + door_to_door_sales | DOOR-TO-DOOR SALES | Y + --- + travel_related_direct_marketing | Direct Marketing-Travel-Related Arrangement Services | Y + --- + lottery_and_betting | Betting -including Lottery Tickets, Chips at Gaming Casinos, Off-Track Betting and Wagers at Race Tracks | N + --- + bands_orchestras_and_miscellaneous_entertainers | Bands, Orchestras, and Miscellaneous Entertainers-not elsewhere classified | Y + --- + furniture_repair_and_refinishing | Furniture-Reupholstery and Repair, Refinishing | Y + --- + direct_marketing_and_subscription_merchants | Direct Marketing-Continuity/Subscription Merchants | N + --- + typewriter_stores_sales_service_and_rentals | Typewriter Stores-Sales, Service, and Rentals | Y + --- + direct_marketing_insurance_services | Direct Marketing-Insurance Services | Y + --- + business_services | Business Services-not elsewhere classified | Y + --- + inbound_telemarketing_merchants | Direct Marketing-Inbound Telemarketing Merchants | N + --- + recreation_services | Recreation Services-not elsewhere classified | Y + --- + swimming_pools | Swimming Pools-Sales and Supplies | Y + --- + outbound_telemarketing_merchants | Direct Marketing-Outbound Telemarketing Merchants | N + --- + public_warehousing | Public Warehousing-Farm Products, Refrigerated Goods, | Y + --- + clothing_rental_stores | Clothing Rental-Costumes, Uniforms, and Formal Wear | Y + --- + contractors | Contractors, Special Trade-not elsewhere classified | Y + --- + transportation_services | Transportation Services-not elsewhere classified | Y + --- + electric_razor_stores | Electric Razor Stores-Sales and Service | Y + --- + service_stations | Service Stations with or without Ancillary Services | N + --- + photographic_studio | Photographic studios | Y + --- + professional_services | Professional services | Y + --- + + + + +### Housing and Real Estate + + + Sub Category | Description | Status + --- + developer | Developer | N + --- + facility_management | Facility Management Company | Y + --- + rwa | RWA | Y + --- + coworking | Co-working spaces | N + --- + realestate_classifieds | Real estate classifieds | N + --- + space_rental | Home or office rentals | N + + + + +### Not-for-Profit + + + Sub Category | Description | Status + --- + charity | Charity | Y + --- + educational | Educational | Y + --- + religious | Religious | Y + --- + personal | Personal | Y + + + + +### Social + + + Sub Category | Description | Status + --- + matchmaking | Dating and Matrimony platforms | N + --- + social_network | Social Network | Y + --- + messaging | Messaging and Communication | Y + --- + professional_network | Professional Network | Y + --- + neighbourhood_network | Local/Neighbourhood network | Y + --- + automobile_associations_and_clubs | Automobile Associations | Y + --- + political_organizations | Political Organizations | N + --- + country_and_athletic_clubs | Clubs-Country Clubs, Membership-Athletic, Recreation, Sports, Private Golf Courses | Y + --- + associations_and_membership | Associations and membership | Y + + + + + + + +## Credit Card EMI + + +### 1. What are the standard credit card interest rates charged by the banks for EMI? + + The interest rates charged by various banks for each of the tenures are provided for your reference. The minimum transaction amount for which EMIs are applicable can vary for each bank. The maximum amount is dependent on the card limit set by the issuing bank. + + + + **American Express (AMEX)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 5000 ^^^^^^^ | 199 ^^^^^^^ | 14% | October 12, 2023 ^^^^^^^ + --- + 6 months | | | 14% | + --- + 9 months | | | 14% | + --- + 12 months | | | 14% | + --- + 18 months | | | 15% | + --- + 24 months | | | 15% | + --- + 36 months | | | NA | + + + + + + +### **Bank of Baroda (BARB)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2500 ^^^^^^^ | NA ^^^^^^^ | 16% | July 26, 2024 ^^^^^^^ + --- + 6 months | | | 16% | + --- + 9 months | | | 16% | + --- + 12 months | | | 16% | + --- + 18 months | | | 16% | + --- + 24 months | | | 16% | + --- + 36 months | | | NA | + + + + + + +### **Citibank (CITI)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2500 ^^^^^^^ | A one-time processing fee of 1% or ₹100, whichever is higher, will be charged by the bank. ^^^^^^^ | 16% | April 08, 2024 ^^^^^^^ + --- + 6 months | | | 16% | + --- + 9 months | | | 16% | + --- + 12 months | | | 16% | + --- + 18 months | | | 16% | + --- + 24 months | | | 16% | + --- + 36 months | | | NA | + + + + + + +### **Federal Bank (FDRL)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2500 ^^^^^^^ | NA ^^^^^^^ | 15.99% | July 26, 2024 ^^^^^^^ + --- + 6 months | | | 15.99% | + --- + 9 months | | | 15.99% | + --- + 12 months | | | 15.99% | + --- + 18 months | | | 15.99% | + --- + 24 months | | | 15.99% | + --- + 36 months | | | NA | + + + + + + +### **HDFC Bank (HDFC)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 1000 | 299 ^^^^^^^ | 16% | July 23, 2025 ^^^^^^^ + --- + 6 months | 1000 | | 16% | + --- + 9 months | 1000 | | 16% | + --- + 12 months | 1000 | | 16% | + --- + 18 months | 3000 | | 16% | + --- + 24 months | 3000 | | 16% | + --- + 36 months | NA | | NA | + + + + + + +### **HSBC Bank (HSBC)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2000 ^^^^^^^ | 99 ^^^^^^^ | 15% | 21 February 2024 ^^^^^^^ + --- + 6 months | | | 15% | + --- + 9 months | | | 15% | + --- + 12 months | | | 15% | + --- + 18 months | | | 15% | + --- + 24 months | | | 15% | + --- + 36 months | | | NA | + + + + + + +### **ICICI Bank (ICIC)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 1500 ^^^^^^^ | 199 ^^^^^^^ | 15.99% | November 29, 2023 ^^^^^^^ + --- + 6 months | | | 15.99% | + --- + 9 months | | | 15.99% | + --- + 12 months | | | 15.99% | + --- + 18 months | | | 15.99% | + --- + 24 months | | | 15.99% | + --- + 36 months | | | NA | + + + + + + +### **IDFB Bank (IDFB)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2500 ^^^^^^^ | A one-time processing fee of 1% or ₹99, whichever is higher, will be charged by the bank. ^^^^^^^ | 16% | September 17, 2025 ^^^^^^^ + --- + 6 months | | | 16% | + --- + 9 months | | | 16% | + --- + 12 months | | | 16% | + --- + 18 months | | | 16% | + --- + 24 months | | | 16% | + --- + 36 months | | | 16% | + + + + + + +### **IndusInd Bank (INDB)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2000 ^^^^^^^ | 249 ^^^^^^^ | 16% | September 12, 2024 ^^^^^^^ + --- + 6 months | | | 16% | + --- + 9 months | | | 16% | + --- + 12 months | | | 16% | + --- + 18 months | | | 16% | + --- + 24 months | | | 16% | + --- + 36 months | | | 16% | + + + + + + +### **Kotak Mahindra Bank (KKBK)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2500 ^^^^^^^ | 249 ^^^^^^^ | 16% | February 21, 2024 ^^^^^^^ + --- + 6 months | | | 16% | + --- + 9 months | | | 16% | + --- + 12 months | | | 16% | + --- + 18 months | | | 16% | + --- + 24 months | | | 16% | + --- + 36 months | | | NA | + + + + + + +### **RBL Bank (RATN)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2000 ^^^^^^^ | 199 ^^^^^^^ | 13% | April 05, 2023 ^^^^^^^ + --- + 6 months | | | 14% | + --- + 9 months | | | 15% | + --- + 12 months | | | 15% | + --- + 18 months | | | 15% | + --- + 24 months | | | 15% | + --- + 36 months | | | NA | + + + + + + +### **State Bank of India (SBIN)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2500 ^^^^^^^ | NA | 16.75% | January 7, 2026 ^^^^^^^ + --- + 6 months | | A one-time processing fee of ₹40 will be charged if the transaction amount exceeds ₹20,000. | 16.50% | + --- + 9 months | | A one-time processing fee of ₹79 will be charged if the transaction amount exceeds ₹20,000. | 16.50% | + --- + 12 months | | A one-time processing fee of ₹159 will be charged if the transaction amount exceeds ₹20,000. | 16% | + --- + 18 months | | A one-time processing fee of ₹199 will be charged if the transaction amount exceeds ₹20,000. | 16.25% | + --- + 24 months | | A one-time processing fee of ₹299 will be charged if the transaction amount exceeds ₹20,000. | 16.25% | + --- + 36 months | | NA | NA | + + + + + + +### **Standard Chartered (SCBL)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 2500 ^^^^^^^ | A one-time processing fee of 1% will be charged by the bank. ^^^^^^^ | 11.88% | July 26, 2024 ^^^^^^^ + --- + 6 months | | | 13% | + --- + 9 months | | | 14% | + --- + 12 months | | | 14% | + --- + 18 months | | | NA | + --- + 24 months | | | NA | + --- + 36 months | | | NA | + + + + + + +### **Axis Bank (UTIB)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 3000 ^^^^^^^ | A one-time processingfee of 1% or ₹100, whichever is higher, will be charged by the bank. ^^^^^^^ | 16% | December 12, 2023 ^^^^^^^ + --- + 6 months | | | 16% | + --- + 9 months | | | 16% | + --- + 12 months | | | 16% | + --- + 18 months | | | 16% | + --- + 24 months | | | 16% | + --- + 36 months | | | NA | + + + + + + +### **Yes Bank (YESB)**: + + + + Tenures in Months[columWidth="20"] | Minimum Amount (in INR)[columWidth="20"] | Processing Fee (in INR) | Interest rates | Last Updated + --- + 3 months | 1500 ^^^^^^^ | 299 ^^^^^^^ | 16% | December 12, 2023 ^^^^^^^ + --- + 6 months | | | 16% | + --- + 9 months | | | 16% | + --- + 12 months | | | 16% | + --- + 18 months | | | 16% | + --- + 24 months | | | 16% | + --- + 36 months | | | NA | + + + + + + + +### 2. What are the interest rates charged by other credit cards for EMI? + + The interest rates charged by other cards for EMI is given below. + + + **OneCard**: + + + + Tenures in Months | Minimum Amount (in INR) | Interest rates + --- + 3 months | 2500 ^^^^^^ | 16% + --- + 6 months | | 16% + --- + 9 months | | 16% + --- + 12 months | | 16% + --- + 18 months | | 16% + --- + 24 months | | 16% + + + + + + + + +## Cardless EMI + + +### 1. What are the standard interest rates charged by the banks for cardless EMI? + + The standard interest rates charged by various banks for cardless EMI are provided for your reference. + + + Cardless EMI | Issuer Bank | Provider Code | Minimum Amount (in INR) | 3 months | 6 months | 9 months | 12 months | 18 months + --- + InstaCred | HDFC Bank | `hdfc` | 5000 | 16% | 16% | 16% | 16% | 16% + --- + InstaCred | ICICI Bank | `icic` | 7000 | 16% | 16% | 16% | 16% | NA + --- + InstaCred | IDFC First | `idfb` | 5000 | 24% | 24% | 24% | 24% | NA + --- + InstaCred | Kotak Mahindra Bank | `kkbk` | 3000| 20% | 20% | 20% | 20% | NA + --- + axio | NA | `walnut369` | 900 | 24% | 24% | 24% | NA | NA + --- + Fibe | NA | `earlysalary` | 3000 | 30% | 30% | 30% | NA | NA + --- + ZestMoney | NA | `zestmoney` | 3000 | 22% | 24% | 24% | NA | NA + + + + +### 2. What are the standard interest rates charged by Pay Later providers for cardless EMI? + + The standard interest rates charged by the providers for Pay Later providers are given below: + + + Pay Later | 15 days | 30 days | 45 days | 60 days | 90 days + --- + LazyPay | Interest free | NA | NA | NA | NA + --- + PayPal | Interest free | NA | NA | NA | NA + + + * Interest rates are determined on a case-to-case basis. [Contact support](https://razorpay.com/support/#request) for more information. + + +> **WARN** +> +> +> **Watch Out!** +> +> All interest rates mentioned above are per annum. +> + + + +## No Cost EMI + + +### 1. Who bears the cost for the discount given in No Cost EMI? + + You, as a merchant, would bear the cost of No Cost EMI. It will be given as an upfront discount on the product cost to the end consumer. The discount percentage will vary by the bank and period of EMI. + + + +### 2. Which payment methods can be used for No Cost EMI? + + No Cost EMI is available on all credit card and debit card EMI banks. + + + +### 3. Will the customers' banks continue to charge them interest? + + Yes, the customers' banks will continue to charge them interest. However, this interest charge has been provided to the customer as an upfront discount at the time of purchase, effectively giving them the benefit of a No Cost EMI. + + + +### 4. Can I enable No Cost EMIs at the Checkout? + + Yes. Razorpay enables you to display No Cost EMIs at the Checkout. Know more about [No Cost EMIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/no-cost-emi.md). + + + +### 5. How can I know about the percentage discount of the No Cost EMI that I bear? + + +> **INFO** +> +> +> **Handy Tips** +> +> The banks charge GST to end consumers on the interest paid over and above the following amount. +> + + Calculations on the cost incurred by the merchant at all standard plan and tenures are listed below: + + + Amount (in INR) | Interest (in %) | Tenure (in Months) | Amount Paid by Customer | Monthly EMI | No Cost EMI Discount | Discount | Pricing | Total Cost (in %) + --- + 10000 | 11% | 3 | 9,819.43 | 3333.33 | 180.57 | 1.81% | 3% | 4.81% + --- + 10000 | 12% | 3 | 9,803.28 | 3333.33 | 196.72 | 1.97% | 3% | 4.97% + --- + 10000 | 13% | 3 | 9,787.18 | 3333.33 | 212.82 | 2.13% | 3% | 5.13% + --- + 10000 | 14% | 3 | 9,771.13 | 3333.33 | 228.87 | 2.29% | 3% | 5.29% + --- + 10000 | 15% | 3 | 9,755.11 | 3333.33 | 244.89 | 2.45% | 3% | 5.45% + --- + 10000 | 11% | 6 | 9686.85 | 1666.67 | 313.15 | 3.13% | 3% | 6.13% + --- + 10000 | 12% | 6 | 9659.13 | 1666.67 | 340.87 | 3.41% | 3% | 6.41% + --- + 10000 | 13% | 6 | 9631.53 | 1666.67 | 368.47 | 3.68% | 3% | 6.68% + --- + 10000 | 14% | 6 | 9604.04 | 1666.67 | 395.96 | 3.96% | 3% | 6.96% + --- + 10000 | 15% | 6 | 9576.68 | 1666.67 | 423.32 | 4.23% | 3% | 7.23% + --- + 10000 | 11% | 9 | 9556.66 | 1111.11 | 443.34 | 4.43% | 3% | 7.43% + --- + 10000 | 12% | 9 | 9517.80 | 1111.11 | 482.20 | 4.82% | 3% | 7.82% + --- + 10000 | 13% | 9 | 9479.17 | 1111.11 | 520.83 | 5.21% | 3% | 8.21% + --- + 10000 | 14% | 9 | 9440.77 | 1111.11 | 559.23 | 5.59% | 3% | 8.59% + --- + 10000 | 15% | 9 | 9402.61 | 1111.11 | 597.39 | 5.97% | 3% | 8.97% + --- + 10000 | 11% | 12 | 9428.80 | 833.33 | 571.20 | 5.71% | 3% | 8.71% + --- + 10000 | 12% | 12 | 9379.23 | 833.33 | 620.77 | 6.21% | 3% | 9.21% + --- + 10000 | 13% | 12 | 9330.04 | 833.33 | 669.96 | 6.70% | 3% | 9.70% + --- + 10000 | 14% | 12 | 9281.21 | 833.33 | 718.79 | 7.19% | 3% | 10.19% + --- + 10000 | 15% | 12 | 9232.76 | 833.33 | 767.24 | 7.67% | 3% | 10.67% + --- + 10000 | 11% | 18 | 9179.92 | 555.56 | 820.08 | 8.20% | 3% | 11.20% + --- + 10000 | 12% | 18 | 9110.15 | 555.56 | 889.85 | 8.90% | 3% | 11.90% + --- + 10000 | 13% | 18 | 9041.13 | 555.56 | 958.87 | 9.59% | 3% | 12.59% + --- + 10000 | 14% | 18 | 8972.85 | 555.56 | 1027.15 | 10.27% | 3% | 13.27% + --- + 10000 | 15% | 18 | 8905.30 | 555.56 | 1094.70 | 10.95% | 3% | 13.95% + --- + 10000 | 11% | 24 | 8939.84 | 416.67 | 1060.16 | 10.60% | 3% | 13.60% + --- + 10000 | 12% | 24 | 8851.41 | 416.67 | 1148.59 | 11.49% | 3% | 14.49% + --- + 10000 | 13% | 24 | 8764.21 | 416.67 | 1235.79 | 12.36% | 3% | 15.36% + --- + 10000 | 14% | 24 | 8678.23 | 416.67 | 1321.77 | 13.22% | 3% | 16.22% + --- + 10000 | 15% | 24 | 8593.43 | 416.67 | 1406.57 | 14.07% | 3% | 17.07% + + + + +### 6. How does the No Cost EMI settlement work? + + The order amount minus the entire interest subvented by you as a discount is settled in your bank account as per your [settlement cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md#settlement-cycle). + + +> **WARN** +> +> +> **Watch Out!** +> +> However, Razorpay pricing is not included in this settlement, it will be applied in addition to the above amount. +> + + + + +### 7. Can I create No Cost EMI offers on Cardless EMI? + + No, we do not support No Cost EMI offers on Cardless EMI. + + +## Low Cost EMI + + +### 1. Why should I run Low Cost EMI Offers? + + Running Low Cost EMI Offers helps you attract a wider customer base by reducing the upfront cost barrier. This leads to increased sales and higher average order values. + + Additionally, offering discount on interest for longer tenures sets you apart in a competitive market and opens opportunities for upselling, contributing to overall business growth and financial stability. + + + +### 2. Who bears the cost for the discount given in Low Cost EMI? + + As a business, you would bear the partial cost of Low Cost EMI, which appears as an upfront discount on the product cost to the end consumer. + + You can decide the cost to subvent for each tenure and the customer bears the remaining cost. The interest percentage will vary by the bank and the EMI tenure. Know more about the [EMI Calculation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi.md#calculation-of-emi). + + + +### 3. Which payment methods can be used for Low Cost EMI? + + Low Cost EMI is available on all credit and debit card EMIs. + + + +### 4. Will the customers' banks continue to charge them interest? + + Yes, the customers' banks will continue to charge them interest. However, partial interest subvented by you appears as an upfront discount to the customers at the time of purchase. + + + +### 5. Can I enable Low Cost EMIs at the Checkout? + + Yes. Razorpay enables you to display Low Cost EMIs at the Checkout. Know more about [Low Cost EMIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi.md). + + + +### 6. How can I know about the percentage discount of the Low Cost EMI that I bear? + + You can decide how much percentage of the total interest you want to subvent during offer creation. This appears as an upfront discount on the product cost and the customer bears the remaining cost. + + + +### 7. How does the Low Cost EMI settlement work? + + The order amount minus the discount subvented by you is settled in your bank account as per your [settlement cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md#settlement-cycle). + + +> **WARN** +> +> +> **Watch Out!** +> +> Razorpay pricing is not included in this settlement, it will be applied in addition to the above amount. +> + + + + +### 8. Can I create Low Cost EMI offers on Cardless EMI? + + No, we do not support Low Cost EMI offers on Cardless EMI. diff --git a/llm-content/payments/payment-methods/emi/low-cost-emi.md b/llm-content/payments/payment-methods/emi/low-cost-emi.md new file mode 100644 index 00000000..b8bc3139 --- /dev/null +++ b/llm-content/payments/payment-methods/emi/low-cost-emi.md @@ -0,0 +1,36 @@ +--- +title: Razorpay Low Cost EMI +heading: Low Cost EMI +description: Let your customers avail Low Cost EMIs offered by all major banks. +--- + +# Low Cost EMI + +Offer Low Cost EMI to strike the perfect balance between providing affordable financing to customers while maintaining a sustainable financial model. You can decide the cost to support each EMI tenure, and the customer bears the remaining cost. Low Cost EMIs let customers enjoy the benefits of EMI at an affordable rate while minimising your overall cost. + +## Create Low Cost EMI Offers + +You can create [Low Cost EMI Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/low-cost-emi.md) for a selected issuer from your Dashboard. + +## How it Works + +Customers select the products on your website or app and proceed to Checkout. On the Checkout page, the customers: + +1. Enter the **Phone Number** and click **Continue**. +2. Select **EMI** as the payment method. +3. Select the EMI option where Low Cost EMI is available. If the amount entered in the Checkout is eligible for the discount, all the applicable EMI options are shown. + ![select EMI option where Low Cost EMI is available](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/low-cost-select-emi.jpg.md) +4. After customers select this option, all the applicable plans the card issuer provides are displayed for the entered amount. +5. Choose the EMI tenure and click **Continue**. + ![Select Low Cost EMI tenure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/low-cost-emi-select-tenure.jpg.md) + +6. They enter the relevant details and choose if they want to **Save this card as per RBI guidelines** or pay without saving the card. +After the successful payment, Razorpay redirects customers to your application or website. + + - **Handy Tips**: You can create Low Cost EMI Offers on Credit and Debit card EMIs only. + + - **Customer's Monthly Statement**: Customers' monthly statements will reflect the total interest charged by the bank. However, the Low Cost EMI discount amount is applied upfront to the purchase to cover it. + +## FAQs + +See: [Low Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#low-cost-emi). diff --git a/llm-content/payments/payment-methods/emi/no-cost-emi.md b/llm-content/payments/payment-methods/emi/no-cost-emi.md new file mode 100644 index 00000000..909d0f52 --- /dev/null +++ b/llm-content/payments/payment-methods/emi/no-cost-emi.md @@ -0,0 +1,36 @@ +--- +title: About No Cost EMI +description: Let your customers avail No Cost EMIs offered by all major banks. +--- + +# About No Cost EMI + +A No Cost EMI is an offer where customers pay for a product in installments with zero interest. Offer No Cost EMIs on credit and debit cards issued by all the major banks. EMI discount is applied to the customer's purchase to cover the interest that the bank charges. + +## Create No Cost EMI Offers + +1. You can create No Cost EMIs for a selected issuer from your Dashboard. +2. Follow the steps in Offers to [create No Cost EMIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers/create.md) on the Dashboard. + +## How it Works + +1. Enter the **Phone Number** and click **Continue**. +2. Select **EMI** as the payment method. +3. Select the EMI option where No Cost EMI is available. If the amount entered in the Checkout is eligible for the discount, all the applicable EMI options are shown. + ![Plans eligible for the card issurer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/select-bank.jpg.md) +4. Select the EMI tenure and click **Continue**. They enter the relevant details. + ![EMI tenure and click Select Plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/select-no-cost-emi-plan.jpg.md) +5. If the customers are: + - **Eligible** to avail of the EMI, they click **Continue**. + - **Not eligible** for availing the EMI, they have to pay the full amount. They click **Pay full amount** and are prompted to confirm the action. +6. Choose if they want to **Save this card as per RBI guidelines** or pay without saving the card. + +After the successful payment, Razorpay redirects customers to your application or website. By the end of the EMI cycle, the card issuer deducts the EMI amount from the customer’s bank. + +## FAQs + +See: [No Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#no-cost-emi). + +### Related Information + +[ Bajaj Finserv No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi/bajaj-finserv.md) diff --git a/llm-content/payments/payment-methods/emi/no-cost-emi/bajaj-finserv.md b/llm-content/payments/payment-methods/emi/no-cost-emi/bajaj-finserv.md new file mode 100644 index 00000000..eb09c76d --- /dev/null +++ b/llm-content/payments/payment-methods/emi/no-cost-emi/bajaj-finserv.md @@ -0,0 +1,253 @@ +--- +title: Bajaj Finserv No Cost EMIs +description: Let your customers avail No Cost EMIs offered by Bajaj Finserv. +--- + +# Bajaj Finserv No Cost EMIs + +Offer No Cost EMIs by Bajaj Finserv to your customers. No Cost EMIs are offered as an upfront discount to your customers. The interest levied on the EMIs is waived off. After the customer makes the purchase, they are charged as per the credit card billing cycle or payment terms agreed with Bajaj Finserv. + +## Prerequisites + +- The customer should be a registered user of the EMI card provider, **Bajaj Finserv**. +- Generate API keys from the [Dashboard](https://razorpay.com/dashboard). A combination of `key_id` and `key_secret` is required to authenticate API request sent to Razorpay servers. + +## How it Works + +For the customers to avail No Cost EMIs on the Razorpay Standard Checkout, follow the detailed steps as explained below: + + +### Step 1: Create No Cost EMI Offers + + Raise a request with the[ Razorpay Support team ](https://razorpay.com/support/#request)to create the relevant No Cost EMIs you want to display on the Checkout. Get the appropriate `offer_id` created for each EMI plan. + + + +### Step 2: Associate Offer with an Order + + Obtain the `offer_id`. Let us say, `offer_ANZoaxsOww2X53`, from our Support team. Create an order for the transaction amount for which the created offer should be applied. + + /orders + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 1000000, + "currency": "INR", + "discount": true, + "offers": [ + "offer_ANZoaxsOww2X53" + ] + }' + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("discount", true); + orderRequest.put("offers", Offer); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.order.create({ + "amount": 1000000, + "currency": "INR", + "receipt": "receipt#1", + "discount": true, + "offers": [ + "offer_ANZoaxsOww2X53" + ] + }) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('amount' => 1000000, 'currency' => 'INR', 'discount' => '1', 'offers'=> array('offer_JTUADI4ZWBGWur'))); + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + order = Razorpay::Order.create amount: 50000, currency: 'INR', discount: '1', receipt: 'receipt#1', offers: [ + 'offer_ANZoaxsOww2X53"' + ] + ```js: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 1000000, + currency: "INR", + receipt: "receipt#1", + discount: true, + offers: [ + "offer_ANZoaxsOww2X53" + ] + }) + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, + } + body, err := client.Order.Create(data, nil) + + ```json: Response + { + "id": "order_CjyoZFRpB8r0AH", + "entity": "order", + "amount": 1000000, + "amount_paid": 0, + "amount_due": 1000000, + "currency": "INR", + "receipt": null, + "offer_id": "offer_ANZoaxsOww2X53", + "offers": [ + "offer_ANZoaxsOww2X53" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1561018912 + } + ``` + + `amount` _mandatory_ + : `integer` Amount, in currency subunits, for which the order is created. For example, if the order is to be created for ₹30,000, enter the value 3000000 (in paise). + + `currency` _mandatory_ + : `string` ISO code of the currency associated with the order amount. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offers` _mandatory_ + : `array` Unique identifier of the offer. + Pass the `offer_id` obtained from Razorpay Support team. + + `discount`_optional_ + : `boolean` Indicates if a discount is to be applied by Razorpay or not. Possible values: + + - `true`: Discount is applied. + - `false`: Discount is not applied. + + + +### Step 3: Trigger Checkout + + The `order_id` obtained in the previous step can be passed to the Checkout page as follows: + + Copy-paste the parameters as `options` in your code: + + ```html: Checkout with Callback URL (JavaScript) + Pay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise + "currency": "INR", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_9A33XWu170gUtm", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ```html: Checkout with Handler Functions (JavaScript) + Pay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise + "currency": "INR", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_9A33XWu170gUtm", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + }); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + +``` + + +## How Customers Avail Offers on Checkout + +The customers can complete the payment as follows: + +1. On the Razorpay Checkout, customers enter the required details and select **EMI** as the payment method. + ![Standard checkout with bajaj finserv.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bajaj-finserv-emi-new-amount.jpg.md) + +2. They can select **Cardless and Others**. + ![Bajaj FinServ displayed in Cardless and Others section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bajaj-finserv-new-select-new.jpg.md) + +3. Customers select the EMI tenure and click **Continue**. + ![Select an EMI Plan and Select Plan.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bajaj-finserv-new-plan-select.jpg.md) + +4. They enter the details of Bajaj Finserv-issued card and click **Continue**. + ![details of Bajaj Finserv-issued card.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bajaj-finserv-new-card-details.jpg.md) + +After the successful payment, Razorpay redirects customers to your application or website. Customers' monthly statements will reflect the EMI amount with interest charged by the bank. You can check the status of the payment from the Dashboard. + +### FAQs + +See: [No Cost EMI FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/faqs.md#no-cost-emi). diff --git a/llm-content/payments/payment-methods/emi/no-cost-emi/bajaj-finserv/custom-integration.md b/llm-content/payments/payment-methods/emi/no-cost-emi/bajaj-finserv/custom-integration.md new file mode 100644 index 00000000..5c3dd5d1 --- /dev/null +++ b/llm-content/payments/payment-methods/emi/no-cost-emi/bajaj-finserv/custom-integration.md @@ -0,0 +1,592 @@ +--- +title: No Cost EMIs from Bajaj Finserv - Custom Checkout +description: Let your customers avail Bajaj Finserv EMI options on Razorpay Custom Checkout. +--- + +# No Cost EMIs from Bajaj Finserv - Custom Checkout + +You can display Bajaj Finserv No Cost EMI offers to your customers by integrating with Razorpay custom checkout. + +## Prerequisites + +- Create a [Razorpay account](https://razorpay.com/dashboard). +- Generate [API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. +- Refer to our [web custom integration document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). + +## Integration flow + +If you want to display the No Cost EMI offered by Bajaj Finserv on the Checkout, you must associate the offer with an order. Follow the integration steps given below: + +1. [Create No Cost EMI offers](#step-1-create-no-cost-emi-offers). +2. [Create an order](#step-2-create-an-order). +3. [Fetch payment methods](#step-3-fetch-payment-methods). +4. [Invoke checkout and pass order_id and other options](#step-4-invoke-checkout-and-pass-order-id). +5. [Store fields in your server](#step-5-store-fields-in-your-server). +6. [Verify payment signature](#step-6-verify-payment-signature). + +### Step 1: Create No Cost EMI Offers + +Raise a request with the [ Razorpay Support team ](https://razorpay.com/support/#request) to create the relevant No Cost EMIs you want to display on the Checkout. Get the appropriate `offer_id` created for each EMI plan. + +### Step 2: Create an Order + +Obtain the `offer_id`. Let us say, `offer_ANZoaxsOww2X53`, from our Support team. Create an order for the transaction amount for which the created offer should be applied. + +/orders + +`amount` _mandatory_ +: `integer` Amount in currency subunits for which the order is created. For example, if the order is for ₹30,000, enter the value `3000000` (in paise). + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the order amount. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`offers` _mandatory_ +: `array` Unique identifier of the Offer. + Pass the `offer_id` obtained from the Razorpay Support team. + +`discount`_optional_ +: `boolean` Indicate if a discount is to be applied by Razorpay or not. Possible values are: + - `true`: Discount is applied. + - `false`: Discount is not applied. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000000, + "currency": "INR", + "discount": true, + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("discount", true); + orderRequest.put("offers", Offer); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000000, + "currency": "INR", + "receipt": "receipt#1", + "discount": True, + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 1000000, 'currency' => 'INR', 'discount' => true, 'offers'=> array('offer_JTUADI4ZWBGWur'))); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', discount: 1, receipt: 'receipt#1', offers: [ + 'offer_ANZoaxsOww2X53"' +] +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000000, + currency: "INR", + receipt: "receipt#1", + discount: true, + offers: [ + "offer_ANZoaxsOww2X53" + ] +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "discount": true, + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_CjyoZFRpB8r0AH", + "entity": "order", + "amount": 1000000, + "amount_paid": 0, + "amount_due": 1000000, + "currency": "INR", + "receipt": null, + "offer_id": "offer_ANZoaxsOww2X53", + "offers": [ + "offer_ANZoaxsOww2X53" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1561018912 +} +``` + +### Step 3: Fetch Payment Methods + +When creating a custom checkout form, you need to ensure that only the methods that are activated for your account are displayed to the customer. + +Use the below methods to fetch all payments methods available to you. + +```js: Request +var razorpay = new Razorpay({ + key: '', + // logo, displayed in the popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}); +razorpay.once('ready', function(response) { + console.log(response.methods); +}) +```js: Response +{ + "methods": { + "entity": "methods", + "card": true, + "debit_card": true, + "credit_card": true, + "prepaid_card": true, + "card_networks": { + "AMEX": 0, + "DICL": 1, + "MC": 1, + "MAES": 1, + "VISA": 1, + "JCB": 1, + "RUPAY": 1, + "BAJAJ": 0 + }, + "amex": false, + "netbanking": { + ... + ... + "HDFC": "HDFC Bank", + "ICIC": "ICICI Bank" + ... + ... + }, + "wallet": { + "payzapp": true + }, + "emi": true, + "upi": true, + "cardless_emi": [], + "paylater": [], + "emi_subvention": "customer", + "emi_options": { + ... + ... + "ICIC": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 150000 + }, + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 150000 + } + ...// rest of the emi plans + ], + "HDFC": [ + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 300000 + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 300000 + } + ... + ...// rest of the emi plans + ] + } + } +} +``` + +Know more about [the various payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) offered by Razorpay. + +### Step 4: Invoke Checkout and Pass Order Id and Other Options + +The list of checkout parameters is available [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md). + +#### Step 4.1: Include the JavaScript code in your Webpage + +Include the following script, preferably in `` section of your page: + +```html: Index HTML + +``` + +> **INFO** +> +> +> **Including the Javascript, not the Library** +> +> Include the script from `https://checkout.razorpay.com/v1/razorpay.js` instead of serving a copy from your own server. This allows new updates and bug fixes to the library to get automatically served to your application. +> +> We always maintain backward compatibility with our code. +> + +#### Step 4.2: Instantiate Razorpay Custom Checkout + +You can choose to have: +- [A single instance on a page](#single-instance-on-a-page) +- [Multiple instances on the same page](#multiple-instances-on-same-page) + +#### Single Instance on a Page + +If you need a single instance on a page, use the code given below: + +```js: Invoke a Single Instance +var razorpay = new Razorpay({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}); +``` + +#### Multiple Instances on Same Page + +If you need multiple razorpay instances on same page, you can globally set some of the options: + +```js: Invoke Multiple Instances +Razorpay.configure({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}) +new Razorpay({}); // will inherit key and image from above. +``` + +#### Step 4.3: Submit Payment Details + +Once the order is created and the customer's payment details are obtained, the information should be sent to Razorpay to complete the payment. The data that needs to be submitted depends upon the payment method selected by the customer. + +You can do this by invoking `createPayment` method: + +```js: createPayment with handler function +var data = { + amount: 3000000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR",// Default is INR. We support more than 90 currencies. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_CjyoZFRpB8r0AH',// Replace with Order ID generated in Step 2 + method: "emi", + emi_duration: 3, + provider: "bajajfinserv" +}; + +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on('payment.success', function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + + razorpay.on('payment.error', function(resp){alert(resp.error.description)}); // will pass error object to error handler + +}) +```js: createPayment with callback URL +var data = { + callback_url: 'https://www.examplecallbackurl.com/', + amount: 3000000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR",// Default is INR. We support more than 90 currencies. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_CuEzONfnOI86Ab',// Replace with Order ID generated in Step 4 + method: "emi", + emi_duration: 3, + provider: "bajajfinserv" +}; + +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + +}) +``` + +> **WARN** +> +> +> **Watch Out!** +> +> The `createPayment` method should be called within an event listener triggered by user action to prevent the popup from being blocked. For example: +> + +> ```js +> $('button').click( function (){ razorpay.createPayment(...) }) +> ``` +> + +> **INFO** +> +> +> **Handler Function vs Callback URL** +> +> - **Handler Function** +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL** +> +When you use a callback URL, Razorpay makes a post call to the callback URL, with the `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` in the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id`. +> + +### Step 5: Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +### Step 6: Verify Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +### Payment Capture Settings + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +## Test Integration + +After the integration is complete, you need to test the integration to ensure that it is working as expected. You can make a test transaction using the test cards, verify the payment status from the Dashboard or through APIs or subscribe to related Webhook events to take appropriate actions at your end. After testing the integration in test mode, you can start accepting actual payments from your customers. + +#### Test Payments + +You can make test payments using any of the payment methods configured at the Checkout. No money is deducted from the customer's account as this is a simulated transaction. In the Checkout code, ensure that you have entered the API keys generated in the test mode. + +#### EMI Test Card + +You can use the EMI test card given below to make transactions in the test mode. Use any valid expiration date in the future and any random CVV to create a successful payment. + +Card Network | Card Number | CVV & Expiry Date +--- +Mastercard | 5241 8100 0000 0000 | Use a random CVV and any future date + +#### Verify Payment Status + +You can track the status of the payment from the Dashboard, subscribe to the Webhook event or poll our APIs. + +#### From Dashboard + +#### Subscribe to Webhook events + +You can subscribe to a Webhook event that is generated when a certain event happens in our server. When one of those events is triggered, Razorpay sends the Webhook payload to the configured URL. [Know how to set up Webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) + +#### Poll APIs + +You can retrieve the status of the payments by polling our [Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments). + +### Accept Live Payments + +After testing the flow of funds end-to-end in test mode and confident that the integration is working as expected, switch to the live mode and start accepting payments from customers. However, make sure that you **swap the test API keys with the live keys**. + +To generate API key in live mode: + +### Related Information + +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) (Recommended) +- [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) (Recommended) +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md) +- [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md) +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) + +### Next Steps + +Once the customer has successfully made the payment after availing the desired Offer, you can check the status of the payment from the Dashboard. diff --git a/llm-content/payments/payment-methods/emi/no-cost-emi/bajaj-finserv/s2s-integration.md b/llm-content/payments/payment-methods/emi/no-cost-emi/bajaj-finserv/s2s-integration.md new file mode 100644 index 00000000..f53d14b0 --- /dev/null +++ b/llm-content/payments/payment-methods/emi/no-cost-emi/bajaj-finserv/s2s-integration.md @@ -0,0 +1,243 @@ +--- +title: No Cost EMIs from Bajaj Finserv - S2S +description: Integrate directly with Razorpay APIs to enabling No Cost EMI offers provided by Bajaj Finserv in your payment flow. +--- + +# No Cost EMIs from Bajaj Finserv - S2S + +You can integrate Bajaj Finserv No Cost EMI offers with your payment flows by integrating directly with the Razorpay APIs. + +## Prerequisites + +- Generate API keys from the Dashboard. +- A combination of `key_id` and `key_secret` is required to authenticate each API request sent to Razorpay servers. + +## Workflow + +1. Obtain the relevant No Cost EMI offers created by our Support team. +2. Create orders for each of the offers. +3. Create a payment to be sent to the customer. +4. Verify the payment made by the customer. + +### Step 1: Create Offers + +Raise a request with the[ Razorpay Support team ](https://razorpay.com/support/#request)to create the relevant No Cost EMIs you want to display on the Checkout. Get the appropriate `offer_id` created for each EMI plan. + +### Step 2: Create an Order + +Pass the relevant `offer_id`, let us say `offer_Dlf8r40nEMm3wI` obtained from our Support team, in the Orders API as shown below: + +/orders + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000000, + "currency": "INR", + "discount": true, + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("discount", true); + orderRequest.put("offers", Offer); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000000, + "currency": "INR", + "receipt": "receipt#1", + "discount": True, + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 1000000, 'currency' => 'INR', 'discount' => true, 'offers'=> array('offer_JTUADI4ZWBGWur'))); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', discount: 1, offers: [ + 'offer_ANZoaxsOww2X53"' +] +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000000, + currency: "INR", + receipt: "receipt#1", + discount: true, + offers: [ + "offer_ANZoaxsOww2X53" + ] +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "discount": true, + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_CjyoZFRpB8r0AH", + "entity": "order", + "amount": 1000000, + "amount_paid": 0, + "amount_due": 1000000, + "currency": "INR", + "receipt": null, + "offer_id": "offer_ANZoaxsOww2X53", + "offers": [ + "offer_ANZoaxsOww2X53" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1561018912 +} +``` +`amount` _mandatory_ +: `integer` Amount, in currency subunits, for which the order is created. For example, if the order is to be created for ₹30,000, enter the value 3000000 (in paise). + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the order amount. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`offers` _mandatory_ +: `array` Unique identifier of the Offer. + Pass the `offer_id` obtained from Razorpay Support team. + +`discount`_optional_ +: `boolean` Indicates if a discount is to be applied by Razorpay or not. Possible values are: + - `true`: Discount is applied. + - `false`: Discount is not applied. + +### Step 3: Create a Payment + +Send the `order_id` obtained in the previous step along with the following attributes to create a payment: + +/payments/create/redirect + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. + For example, if the amount to be charged is ₹299, then pass `29900` in this field. + +`currency` _mandatory_ +: `string` Currency code for the currency in which you want to accept the payment. For example,`INR`. + +`order_id` _mandatory_ +: `string` Unique identifier of the Order created at your server-side. + Pass the Order ID created in the [Step 2](#step-2-create-an-order) response. + +`email` _mandatory_ +: `string` Email address of the customer. + +`contact` _mandatory_ +: `string` Phone number of the customer. + +`method` _mandatory_ +: `string` The payment method used to complete the payment. Here, it is `emi`. + +`emi_duration` _mandatory_ +: `integer` The duration of the EMI plans offered by the EMI card provider. + Possible values: + - `3` + - `6` + - `9` + - `12` + - `18` + - `24` + +`provider` _mandatory_ +: `string` Name of the EMI card provider. Supported value is `bajajfinserv`. + +`notes` _optional_ +: `json object` Key-value object used for passing additional information. + A maximum of 15 key-value pairs can be created. + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +`ip` _optional_ +: `string` IP Address of the client's browser. + +`referrer` _optional_ +: `string` Referrer URL of the client's browser. + +`user_agent` _optional_ +: `string` User-agent of the client's browser. + +```curl: Sample Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/payments/create/redirect \ + -H "Content-Type: application/json" \ + -d'{ + "amount": 300000, + "currency": "INR", + "contact": 8888888888, + "email": "gaurav.kumar@example.com", + "order_id": "order_DtEkng132N71M8", + "method": "emi", + "emi_duration": 3, + "provider": "bajajfinserv" + }' +``` + +#### Response Types + +`2OO OK` +: In this case, the response contains `200 OK` code along with the HTML content that needs to be opened in the customer's browser. This HTML content contains form-fields, which are automatically posted to the redirect URL for the payment to be completed by the customer. + +`400 Bad Request` +: This can happen when incorrect parameters are passed in the request. For example, when the limit set in offers is exceeded: + + ``` + { + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Offer Maximum Usage limit exceeded" + } + ``` + +Know more about [error codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#error-codes) for more details. + +The HTML form returned in the response should be opened in the customer's browser. The customer completes the payment on the displayed page. + +## Step 4: Verify the Payment + +Once the payment is completed by the customer, a `POST` request is sent to the `callback_url` provided in the [payment create request](#step-3-create-a-payment). The data contained in the `POST` request depends on the **success** or **failure** of the payment made by the customer. + +You can be notified of the payment status if you have configured the Webhook notifications or fetching the payment status by polling our [Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md#fetch-payments-based-on-orders). Know more about [configuring webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). diff --git a/llm-content/payments/payment-methods/emi/no-cost-emi/bajaj-finserv/standard-integration.md b/llm-content/payments/payment-methods/emi/no-cost-emi/bajaj-finserv/standard-integration.md new file mode 100644 index 00000000..e63baa75 --- /dev/null +++ b/llm-content/payments/payment-methods/emi/no-cost-emi/bajaj-finserv/standard-integration.md @@ -0,0 +1,148 @@ +--- +title: No Cost EMIs from Bajaj Finserv - Standard Checkout +description: Let your customers avail Bajaj Finserv EMI options on Razorpay Standard Checkout. +--- + +# No Cost EMIs from Bajaj Finserv - Standard Checkout + +Let your customers avail No Cost EMIs offered by Bajaj Finserv on Razorpay Standard Checkout. + +## Integration Flow + +If you want to display the No Cost EMI offered by Bajaj Finserv on the Checkout, you must associate the offer with an order. The details of the integration are listed below. + +### Step 1: Create No Cost EMI Offers + +Raise a request with the[ Razorpay Support team ](https://razorpay.com/support/#request)to create the relevant No Cost EMIs you want to display on the Checkout. Get the appropriate `offer_id` created for each EMI plan. + +### Step 2: Create an Order + +Obtain the `offer_id`. Let us say, `offer_ANZoaxsOww2X53`, from our Support team. Create an order for the transaction amount for which the created offer should be applied. + +/orders + +`amount` _mandatory_ +: `integer` Amount, in currency subunits, for which the order is created. For example, if the order is to be created for ₹30,000, enter the value 3000000 (in paise). + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the order amount. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`offers` _mandatory_ +: `array` Unique identifier of the Offer. + Pass the `offer_id` obtained from Razorpay Support team. + +`discount`_optional_ +: `boolean` Indicate if a discount is to be applied by Razorpay or not. Possible values are: + - `true`: Discount is applied. + - `false`: Discount is not applied. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 1000000, + "currency": "INR", + "discount": true, + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("discount", true); + orderRequest.put("offers", Offer); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 1000000, + "currency": "INR", + "receipt": "receipt#1", + "discount": True, + "offers": [ + "offer_ANZoaxsOww2X53" + ] +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 1000000, 'currency' => 'INR', 'discount' => true, 'offers'=> array('offer_JTUADI4ZWBGWur'))); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', discount: '1', receipt: 'receipt#1', offers: [ + 'offer_ANZoaxsOww2X53"' +] +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 1000000, + currency: "INR", + receipt: "receipt#1", + discount: true, + offers: [ + "offer_ANZoaxsOww2X53" + ] +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offers": []interface{}{ + "offer_JTUADI4ZWBGWur", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_CjyoZFRpB8r0AH", + "entity": "order", + "amount": 1000000, + "amount_paid": 0, + "amount_due": 1000000, + "currency": "INR", + "receipt": null, + "offer_id": "offer_ANZoaxsOww2X53", + "offers": [ + "offer_ANZoaxsOww2X53" + ], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1561018912 +} +``` + +### Step 3: Trigger the Checkout + +The `order_id` obtained in the previous step can be passed to Checkout form as follows: + +```js: JavaScript + +``` + +### Next Steps + +Once the customer has successfully made the payment after availing the desired Offer, you can check the status of the payment from the Dashboard. diff --git a/llm-content/payments/payment-methods/fpx.md b/llm-content/payments/payment-methods/fpx.md new file mode 100644 index 00000000..dc583103 --- /dev/null +++ b/llm-content/payments/payment-methods/fpx.md @@ -0,0 +1,36 @@ +--- +title: FPX +description: Accept payments using the FPX payment method. +--- + +# FPX + +Using FPX, you can seamlessly accept online payments from your customers through their preferred Malaysian bank. FPX is facilitated by Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and is backed by 11 other major financial institutions that are members of the PayNet Group. + +With nearly 90 million transactions recorded in 2018 alone, FPX is one of Malaysia's most trusted and widely used online payment methods. It offers merchants and customers a secure and convenient payment solution. + +## Advantages + +1. **Multiple Bank Options**: FPX supports transactions from a wide range of major banks in Malaysia, providing users with the flexibility to choose their preferred bank for payments. + +2. **Secure Transactions**: FPX ensures that users' financial information is protected through encryption and multi-factor authentication. + +3. **No Card Information Required**: With FPX, users can make payments without the need to enter sensitive card details online, minimising the risk associated with cyber threats and enhancing overall transaction security. + +## Enable FPX from the Dashboard + +Follow the steps to enable FPX: + +1. Log in to the Dashboard. +2. Click **Account & Settings** in the left menu. +3. Go to **Payment methods** and click the enable button next to FPX. +4. You can also request for [Additional Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md#request-for-payment-methods) from the Dashboard. + +## Payment Flow + +Given below is the payment flow for FPX at Razorpay Curlec checkout: + +1. The customer selects FPX at checkout. +2. They choose the bank and are redirected to the bank's portal. +3. They enter their banking credentials and complete the authorisation process. +4. Upon payment completion, the customer receives a UI notification and is redirected to your website or app. diff --git a/llm-content/payments/payment-methods/giropay.md b/llm-content/payments/payment-methods/giropay.md new file mode 100644 index 00000000..483758d5 --- /dev/null +++ b/llm-content/payments/payment-methods/giropay.md @@ -0,0 +1,67 @@ +--- +title: International Payments - Giropay +description: Accept payments from German customers using Giropay. +--- + +# International Payments - Giropay + +Giropay is a popular real-time bank transfer payment method that enables customers to make payments directly from their bank accounts. It integrates with more than 1,500 German banks. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +![](/docs/assets/images/giropay.jpg) + +## Advantages + +- **No card? No problem!** + + Customers who do not have access to cards or do not want to use them for online transactions can use Giropay to pay through their bank accounts. +- **No chargeback** + + Avoid unnecessary chargebacks with an authorised bank transfer solution. +- **Instant confirmation** + + Receive instant payment confirmation of whether the payment was successful. You will receive a notification for a small number of payments to confirm whether the payment was successful. +- **Higher transaction amount** + + We support payments up to $10,000. +- **Currency Conversion** + + Customers can initiate payments in their native currency and payments will be settled in your Indian bank account. Razorpay's [pay in native currency](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/dynamic-currency-conversion.md) feature will ensure that your German customer is shown the right currency. + +## How it Works + +1. After the payment method is enabled for your Razorpay account, it will appear automatically on Checkout without additional integration. +2. Your customer opens Razorpay Checkout and selects Giropay as the payment method. +3. Razorpay redirects the customer to a Giropay-hosted payment page with a list of available banks in their country. +4. The customer chooses the bank and logs into the online bank account. +5. The customer selects the account to make payment and completes the additional factor of authentication (OTP verification). +6. The customer completes the payment and is redirected to your website or app. + +## Pricing + +Giropay payments are charged at 3.0%. + +## Refunds and Settlements + +- You can refund customer payments made using Giropay by following the usual [refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) process. + +- Giropay payments take T+14 days to get settled to your Razorpay account. + +### Supported Integrations + +For [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md) no additional integration is needed. +- [Custom Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/giropay/custom-integration.md) +- [S2S Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/giropay/s2s-integration.md) diff --git a/llm-content/payments/payment-methods/giropay/custom-integration.md b/llm-content/payments/payment-methods/giropay/custom-integration.md new file mode 100644 index 00000000..172d9434 --- /dev/null +++ b/llm-content/payments/payment-methods/giropay/custom-integration.md @@ -0,0 +1,189 @@ +--- +title: Giropay - Custom Integration +description: Let your customers make payments on your website or app using Giropay at Razorpay Custom Checkout. +--- + +# Giropay - Custom Integration + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +1. [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +2. [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +3. Integrate Razorpay Custom Checkout on your [website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md), [Android app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom.md) or [iOS App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom.md). + +## Integrate Giropay on Custom Checkout + +- Create an Order. +- Pass `method` and `provider` parameters in [Create Payment Method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md#133-submit-payment-details). + +### Create an Order + +Order is an important step in the payment process. + +1. An order should be created for every payment. +2. You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +3. Pass the `order_id` received in response to the checkout. This ties the Order with the payment and secures the request from being tampered. + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11" +}' +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => 'INR'// [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies).) +]); +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", "INR"); +Order order = client.Order.Create(options); +```ruby: Ruby +options = amount: 50000, currency: 'INR', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "INR", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +#### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +### Pass method and provider Parameters During Payment Creation + +The following is a sample API to create a payment. + +```js: Giropay +razorpay.createPayment({ + "amount": 500, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": 9111145678, + "order_id": "order_EAbtuXPh24LrEc", + "method": "app", + "provider": "giropay" +}); +``` + +```json: Response +{ + "razorpay_payment_id": "pay_xxxx", + "next": [ + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_xxx/status" + } + ] +} +``` + +#### Request Parameters + +Along with the other checkout options, you must pass: + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it should be `app`. + +`provider` _mandatory if method=app_ +: `string` Name of the PSP app. Here, it should be `giropay`. diff --git a/llm-content/payments/payment-methods/giropay/s2s-integration.md b/llm-content/payments/payment-methods/giropay/s2s-integration.md new file mode 100644 index 00000000..fed5d7dc --- /dev/null +++ b/llm-content/payments/payment-methods/giropay/s2s-integration.md @@ -0,0 +1,206 @@ +--- +title: Giropay - S2S Integration +description: Let your customers make payments using Giropay on your website or app with S2S Integration. +--- + +# Giropay - S2S Integration + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +1. [Sign up for a Razorpay account](https://dashboard.razorpay.com/#/access/signup). +2. Generate API Keys + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +3. Follow the [Razorpay S2S Integration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md). + +## Integrate Giropay on S2S + +- Create an Order. +- Pass `method` and `provider` parameters in Create Payments API. + +### Create an Order + +Order is an important step in the payment process. + +1. An order should be created for every payment. +2. You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +3. The `order_id` received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11" +}' +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => 'INR'// [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies).) +]); +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", "INR"); +Order order = client.Order.Create(options); +```ruby: Ruby +options = amount: 50000, currency: 'INR', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "INR", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +#### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +### Pass method and provider Parameters in Create Payments API + +The following is a sample API to create a payment. + +```curl: Create Payment using JSON +curl -X POST https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type: application/json' +-d '{ + "amount": 1000, + "currency": "INR", + "contact": 9900988990, + "email": "gaurav.kumar@example.com", + "order_id": "order_4xbQrmEoA5WJ0G", + "provider": "giropay", + "method" : "app" +}' + +```curl: Create Payment using Redirect +curl -X POST https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type: application/json' +-d '{ + "amount": 1000, + "currency": "INR", + "contact": 9900988990, + "email": "gaurav.kumar@example.com", + "order_id": "order_4xbQrmEoA5WJ0G", + "provider": "giropay", + "method" : "app" +}' +``` + +```json: Response +{ + "razorpay_payment_id": "pay_xxxx", + "next": [ + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_xxx/status" + } + ] +} +``` + +#### Request Parameters + +Along with the other Create Payment API request parameters, you must pass: + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it should be `app`. + +`provider` _mandatory if method=app_ +: `string` Name of the PSP app. Here, it should be `giropay`. diff --git a/llm-content/payments/payment-methods/google-pay.md b/llm-content/payments/payment-methods/google-pay.md new file mode 100644 index 00000000..65e3ebba --- /dev/null +++ b/llm-content/payments/payment-methods/google-pay.md @@ -0,0 +1,169 @@ +--- +title: Google Pay +description: Enable Google Pay as a payment method for international customers using Razorpay Checkout. +--- + +# Google Pay + +Google Pay™ is a secure, digital wallet payment method that allows customers to pay using cards stored in their Google Account or tokenised cards on Android devices. Once Google Pay is enabled and integrated, it appears on your Checkout page as a payment option, providing a frictionless checkout experience for international customers. Know more about [Google Pay](https://pay.google.com/). + +> **INFO** +> +> +> +> **Auto-Enabled Feature** +> +> Google Pay is automatically enabled for eligible businesses with international payments activated on Standard Checkout. No integration changes are required. +> +> + + +### Advantages + + Integrating Google Pay as a payment method on Checkout offers you the following advantages: + + - **Higher Conversion Rates**: Up to 15% improvement in checkout conversion rates for international customers. + - **Reduced Friction**: Eliminate manual card entry with biometric authentication or device PIN. + - **Enhanced Security**: Benefit from Google's tokenisation and device-based authentication. + - **Faster Checkout**: 80% reduction in checkout time - from 100+ seconds to under 20 seconds. + - **Increased Success Rates**: Achieve 70%+ success rates compared to industry average of 50-55%. + - **Broad Device Coverage**: Support for Android devices, Windows, Linux and macOS users (45%+ of international traffic). + - **Global Reach**: Accept payments from customers using Google Pay across 100+ countries. + + +## Prerequisites + +Before using Google Pay, ensure you: + +- Integrate with Razorpay Standard Checkout with the international payments feature enabled. +- Are a Registered business entity (non-profit organisations are not eligible). + +> **WARN** +> +> +> +> **Watch Out!** +> +> All businesses using Google Pay must adhere to the [Google Pay and Wallet API's Acceptable Use Policy](https://payments.developers.google.com/terms/aup) and accept the terms defined in the [Google Pay API Terms of Service](https://payments.developers.google.com/terms/sellertos). +> +> + +## Google Pay on Standard Checkout + + +### Automatic Enablement + + Google Pay is automatically enabled for eligible businesses: + + - No code changes are required for Standard Checkout integration. + - The payment button displays dynamically based on device compatibility and user eligibility. + - Google Pay appears in the recommended payment methods section for eligible customers. + - Feature is enabled internally through a phased rollout approach. + + **Business Eligibility:** + - Existing Businesses with international payments enabled. + - New Businesses: Enabled automatically upon completing Razorpay international cards onboarding. + + + +### Understanding Google Pay Flows + + Google Pay supports two authentication flows: + + **1. CRYPTOGRAM_3DS Flow (Device-Tokenised Cards):** + - Uses tokenised cards stored on the device. + - No additional authentication required - faster checkout. + - Provides liability shift protection. + + **2. PAN_ONLY Flow (Stored Card Details):** + - Uses card details stored in Google Pay or Chrome. + - Requires 3D Secure (3DS) authentication with issuing bank. + - User completes OTP or biometric verification. + + +> **INFO** +> +> +> **Handy Tips** +> +> Razorpay automatically handles all cryptogram decryption, token validation and 3DS authentication. No technical integration or configuration is required from your end. +> + + + + +### Brand Guidelines Compliance + + When displaying Google Pay as a payment option: + + - Use the official Google Pay logo and button assets only. + - Follow [Google Pay web brand guidelines](https://developers.google.com/pay/api/web/guides/brand-guidelines) for web implementations. + - Follow [Google Pay Android brand guidelines](https://developers.google.com/pay/api/android/guides/brand-guidelines) for mobile implementations. + - Do not modify Google Pay asset colours, proportions or appearance. + + +## Supported Card Networks + +Google Pay on Razorpay supports the following international card networks: + +- Visa +- Mastercard +- American Express (Amex) (Coming Soon) +- Diners Club (Coming Soon) +- Discover (Coming Soon) + +Supported networks are automatically configured based on your business account settings and terminal availability. + +## Payment Flow For Customers + +Given below is the payment flow for Google Pay at Razorpay Checkout: + +1. The customer selects **Google Pay** at checkout. + ![Google Pay on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/google-pay-recommended.jpg.md) +2. If eligible for Dynamic Currency Conversion (DCC), the customer sees a currency selection screen. Select preferred currency (for example, INR or USD) and click **Pay with Google Pay** to proceed. + ![Google Pay DCC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/google-pay-conversion.jpg.md) +2. Google Pay displays the payment sheet with all the card options available. +3. Customer selects a card and completes the payment instantly. +4. Payment processes and the customer is returned to the website with a confirmation. + +## Device and Platform Support + +Google Pay automatically appears for eligible customers based on their device and browser: + +Device/OS | Browser | Google Pay Display +--- +Android | All browsers | Yes +--- +Windows | All browsers | Yes +--- +Linux | All browsers | Yes +--- +macOS | Chrome, Firefox, Edge | Yes +--- +macOS | Safari | No +--- +iOS | Safari | No +--- +iOS | Chrome, Firefox, other | Yes + +## Frequently Asked Questions + + +### 1. Do I need to make any code changes to support Google Pay on Standard Checkout? + + No code changes are required for Standard Checkout integration. Once Google Pay is enabled on your account (automatically for eligible businesses), it will appear as a payment option for eligible customers based on their device and browser compatibility. + + + +### 2. Can customers save their Google Pay details for future purchases? + + Google Pay uses cards stored in the user's Google Wallet or Google Account. Once customers add cards to their Google Wallet, these are automatically available for all future Google Pay transactions without needing to re-enter card details. + + +### Related Information + +For technical implementation details and API integration, refer to: +- [Google Pay Web Developer Documentation](https://developers.google.com/pay/api/web/) +- [Google Pay Android Developer Documentation](https://developers.google.com/pay/api/android/) +- [Google Pay Web Integration Checklist](https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist) +- [Google Pay Android Integration Checklist](https://developers.google.com/pay/api/android/guides/test-and-deploy/integration-checklist) diff --git a/llm-content/payments/payment-methods/gopay.md b/llm-content/payments/payment-methods/gopay.md new file mode 100644 index 00000000..530bca58 --- /dev/null +++ b/llm-content/payments/payment-methods/gopay.md @@ -0,0 +1,76 @@ +--- +title: GoPay +description: Accept payments from customers using GoPay. +--- + +# GoPay + +GoPay is part of the GoJek super app ecosystem, which is widely-used e-wallet in Indonesia, enabling you to accept payments directly from customers. With GoPay, customers can make secure and seamless transactions using their mobile devices. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +> **INFO** +> +> +> **Handy Tips** +> +> - List of [supported region and currency](#supported-region-and-currency). +> - Razorpay's [pay in native currency](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/dynamic-currency-conversion.md) feature will ensure that your customer is shown the right currency. +> + +## Advantages + +- **Wide Adoption:** GoPay is one of the most popular payment methods in Indonesia, offering businesses access to a large customer base. + +- **Flexible Transaction Limits:** Supports both low and high transaction amounts, catering to various customer needs, including both KYC and non-KYC users. + +- **Seamless Payment Experience:** The integration allows for a smooth transaction process, with customers completing payments through the GoJek app. + +- **Comprehensive Refund Options:** Offers partial, multiple partial, and full refunds, enhancing customer satisfaction and merchant flexibility. + +- **Secure Transactions:** Transactions are authenticated through a PIN entry, ensuring a secure payment process. + +### Refunds and Settlements + +Payments follow standard refund and settlement timelines. + +- You can refund customer payments made using GoPay by following the usual [refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) process. + +- GoPay payments take T+22 days to get settled to your Razorpay account. + +### Supported Integrations + +Secure [S2S integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/gopay/s2s-integration.md) for seamless payment processing. + +### Supported Region and Currency + +Given below is the region and currency that support DOKU, OVO and LinkAja payments: + +Region | Currency +--- +Indonesia | IDR + +### Minimum and Maximum Transaction Amounts for GoPay Payments + +Minimum Transaction Amount: IDR 1 + +Maximum Transaction Amount: + + + - Non-KYC User: IDR 2,000,000 per transaction + - KYC’ed User: IDR 20,000,000 per transaction + + + Limit varies based on the user’s spending and repayment history. The maximum possible limit is IDR 3,000,000. diff --git a/llm-content/payments/payment-methods/gopay/s2s-integration.md b/llm-content/payments/payment-methods/gopay/s2s-integration.md new file mode 100644 index 00000000..8f42d04e --- /dev/null +++ b/llm-content/payments/payment-methods/gopay/s2s-integration.md @@ -0,0 +1,517 @@ +--- +title: GoPay - S2S Integration +description: Let your customers make payments using GoPay on your website or app with S2S Integration. +--- + +# GoPay - S2S Integration + +Secure Server-to-Server (S2S) integration that enables seamless and reliable processing and a smooth payment experience for your customers. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +1. [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +2. Generate API Keys. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +3. Follow the [Razorpay S2S Integration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md). + +## Integrate GoPay on S2S + +Create an Order and a Payment. And pass `method` and `provider` parameters in the create an order and a payment API. + +### Create an Order and a Payment + +Create an order along with payment using the consolidated order and payment API. This single API call combines order and payment creation, resulting in a more efficient and faster transaction process. + +Create an order along with payment by: + +- Making a single API call to Razorpay, combining order and payment creation. +- Authenticating using the provided credentials, ensuring access to the consolidated payment API. +- Manually integrating the API sample codes on your server. + +The following API will create an order along with payment with `wallet` as the payment method: + +/orders + +```curl: Request +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "partial_payment": true, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "shipping_details": { + "method": "sameday", + "gift_wrap": false + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "e_commerce", + "sku": "1gr367", + "name": "TEST", + "description": "TEST", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "e_commerce": { + "other_product_codes": { + "upc": "12r34", + "ean": "123r4", + "unspsc": "123s4" + } + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "payment": { + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "method": "wallet", + "provider": "gopay" + } +}' + +```json: Success +{ + "amount": 50000, + "amount_due": 50000, + "amount_paid": 0, + "attempts": 10, + "created_at": 1706507580, + "currency": "INR", + "entity": "order", + "id": "order_NUJs9C1Luflzts", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "payment_workflow": { + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/O0NSBQgY0BbC4b/authenticate" + } + ], + "razorpay_payment_id": "pay_O0NSBQgY0BbC4b" + }, + "receipt": "receipt#1111", + "status": "attempted" +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _mandatory_ + : `json object` Details about the customer/user. + + `name` _mandatory_ + : `string` The customer’s name. For example, `Gaurav Kumar`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `+919000090000`. + + `email` _mandatory_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, 1234567890. + + `shipping_address` _optional_ + : `Json object` This will have details about the order's shipping address. + + `line1` _optional_ + : `string` Address Line 1 of the address + + `line2` _optional_ + : `string` Address Line 2 of the address + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560068`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), e.g. 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), e.g. -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `billing_address` _mandatory_ + : `Json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address + + `line2` _optional_ + : `string` Address Line 2 of the address + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), e.g. 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), e.g. -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `shipping_details` _optional_ + : `Json object` This will have the order's shipping details. + + `method` _optional_ + : `enum` Shipping method for the product. Possible values: + - `lowcost`: Lowest-cost service. + - `sameday`: Courier or same-day service. + - `oneday`: Next-day or overnight service. + - `twoday`: Two-day service. + - `threeday`: Three-day service. + - `pickup`: Store pick-up. + - `other`: Other shipping method. + - `none`: No shipping method because the product is a service or subscription. + + `gift_wrap` _optional_ + : `boolean` Indicates whether the customer requested gift wrapping for this purchase. This field can contain one of the following values: + - `true`: The customer requested gift wrapping. + - `false`: The customer did not request gift wrapping. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `sku` _optional_ + : `string` The unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business runs a discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `e_commerce` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `other_product_codes` _optional_ + : `object` Array to collect different codes that can identify the item type. Possible values: + + `upc` + : `string` Universal Product Code (UPC; redundantly: UPC code) is a barcode symbology used worldwide to track trade items in stores. UPC consists of 12 numeric digits that are uniquely assigned to each trade item + + `ean` + : `string` European Article Numbers (EAN) is a type of barcode that encodes an article number. Contains 8 (EAN-8) or 13 (EAN-13) numerical digits. + + `unspsc` + : `string` The United Nations Standard Products and Services Code (UNSPSC) is a taxonomy of products and services used in eCommerce. It is a four-level hierarchy coded as an eight-digit number, with an optional fifth level adding two more digits. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Know more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `json object` Details of the campaign. Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, PQR12453. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Possible values: google, newsletter. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: cpc, banner and so on. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `payment` _mandatory_ + : `json object` Details about the payment. + + `contact` _mandatory_ + : `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `method` _mandatory_ + : `string` The method used to make the payment. Here, it should be `wallet`. + + `provider` _mandatory_ + : The wallet provider. Here, it should be `gopay`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` Indicates the next step to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the provider page. + + `url` + : `string` URL to be used for the action indicated. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). diff --git a/llm-content/payments/payment-methods/grabpay-my.md b/llm-content/payments/payment-methods/grabpay-my.md new file mode 100644 index 00000000..c469c156 --- /dev/null +++ b/llm-content/payments/payment-methods/grabpay-my.md @@ -0,0 +1,69 @@ +--- +title: GrabPay (Malaysia) +description: Accept payments from Malaysian customers using GrabPay. +--- + +# GrabPay (Malaysia) + +GrabPay is an e-wallet payment provider widely used in Southeast Asia. It allows customers in Malaysia to make seamless cashless payments by maintaining a wallet balance. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +> **INFO** +> +> +> **Handy Tips** +> +> - List of [supported region and currency](#supported-region-and-currency). +> - Razorpay's [pay in native currency](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/dynamic-currency-conversion.md) feature will ensure that your Malaysian customer is shown the right currency. +> + + +### Advantages + + - **Localised Payment Experience:** GrabPay provides a familiar and secure payment experience tailored to Malaysian customers, with transactions processed in `MYR`. + + - **Flexible Refund Options:** Merchants can offer full, partial, or multiple partial refunds within 90 days, enhancing customer satisfaction. + + - **Secure Authentication:** Transactions are authenticated using a one-time password, ensuring security and reducing fraud. + + - **Extended Session Timeout:** With a session timeout of 3 hours, customers have ample time to complete their transactions, leading to fewer abandoned carts. + + +### Refunds and Settlements + +Payments follow standard refund and settlement timelines. + +- You can refund customer payments made using GrabPay by following the usual [refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) process. + +- GrabPay payments take T+23 days to get settled to your Razorpay account. + +### Supported Integrations + +Secure [S2S integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/grabpay-my/s2s-integration.md) for seamless payment processing. + +### Supported Region and Currency + +Given below is the region and currency that support GrabPay payments: + +Region | Currency +--- +Malaysia | MYR + +### Minimum and Maximum Transaction Amounts for GrabPay Payments + +Minimum Transaction Amount | Maximum Transaction Amount +--- +MYR 1.01 | MYR 1,500 diff --git a/llm-content/payments/payment-methods/grabpay-my/s2s-integration.md b/llm-content/payments/payment-methods/grabpay-my/s2s-integration.md new file mode 100644 index 00000000..761202fa --- /dev/null +++ b/llm-content/payments/payment-methods/grabpay-my/s2s-integration.md @@ -0,0 +1,517 @@ +--- +title: GrabPay (Malaysia) - S2S Integration +description: Let your customers make payments using GrabPay on your website or app with S2S Integration. +--- + +# GrabPay (Malaysia) - S2S Integration + +Secure Server-to-Server (S2S) integration that enables seamless and reliable processing and a smooth payment experience for your customers. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +1. [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +2. Generate API Keys. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +3. Follow the [Razorpay S2S Integration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md). + +## Integrate GrabPay on S2S + +Create an Order and a Payment. And pass `method` and `provider` parameters in the create an order and a payment API. + +### Create an Order and a Payment + +Create an order along with payment using the consolidated order and payment API. This single API call combines order and payment creation, resulting in a more efficient and faster transaction process. + +Create an order along with payment by: + +- Making a single API call to Razorpay, combining order and payment creation. +- Authenticating using the provided credentials, ensuring access to the consolidated payment API. +- Manually integrating the API sample codes on your server. + +The following API will create an order along with payment with `wallet` as the payment method: + +/orders + +```curl: Request +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "MYR", + "receipt": "receipt#1111", + "partial_payment": true, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "shipping_details": { + "method": "sameday", + "gift_wrap": false + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "e_commerce", + "sku": "1gr367", + "name": "TEST", + "description": "TEST", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "e_commerce": { + "other_product_codes": { + "upc": "12r34", + "ean": "123r4", + "unspsc": "123s4" + } + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "payment": { + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "method": "wallet", + "provider": "grabpay" + } +}' + +```json: Success +{ + "amount": 50000, + "amount_due": 50000, + "amount_paid": 0, + "attempts": 10, + "created_at": 1706507580, + "currency": "INR", + "entity": "order", + "id": "order_NUJs9C1Luflzts", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "payment_workflow": { + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/O0NSBQgY0BbC4b/authenticate" + } + ], + "razorpay_payment_id": "pay_O0NSBQgY0BbC4b" + }, + "receipt": "receipt#1111", + "status": "attempted" +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _mandatory_ + : `json object` Details about the customer/user. + + `name` _mandatory_ + : `string` The customer’s name. For example, `Gaurav Kumar`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `+919000090000`. + + `email` _mandatory_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, 1234567890. + + `shipping_address` _optional_ + : `Json object` This will have details about the order's shipping address. + + `line1` _optional_ + : `string` Address Line 1 of the address + + `line2` _optional_ + : `string` Address Line 2 of the address + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560068`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), e.g. 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), e.g. -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `billing_address` _mandatory_ + : `Json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address + + `line2` _optional_ + : `string` Address Line 2 of the address + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), e.g. 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), e.g. -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `shipping_details` _optional_ + : `Json object` This will have the order's shipping details. + + `method` _optional_ + : `enum` Shipping method for the product. Possible values: + - `lowcost`: Lowest-cost service. + - `sameday`: Courier or same-day service. + - `oneday`: Next-day or overnight service. + - `twoday`: Two-day service. + - `threeday`: Three-day service. + - `pickup`: Store pick-up. + - `other`: Other shipping method. + - `none`: No shipping method because the product is a service or subscription. + + `gift_wrap` _optional_ + : `boolean` Indicates whether the customer requested gift wrapping for this purchase. This field can contain one of the following values: + - `true`: The customer requested gift wrapping. + - `false`: The customer did not request gift wrapping. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `sku` _optional_ + : `string` The unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business runs a discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `e_commerce` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `other_product_codes` _optional_ + : `object` Array to collect different codes that can identify the item type. Possible values: + + `upc` + : `string` Universal Product Code (UPC; redundantly: UPC code) is a barcode symbology used worldwide to track trade items in stores. UPC consists of 12 numeric digits that are uniquely assigned to each trade item + + `ean` + : `string` European Article Numbers (EAN) is a type of barcode that encodes an article number. Contains 8 (EAN-8) or 13 (EAN-13) numerical digits. + + `unspsc` + : `string` The United Nations Standard Products and Services Code (UNSPSC) is a taxonomy of products and services used in eCommerce. It is a four-level hierarchy coded as an eight-digit number, with an optional fifth level adding two more digits. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `json object` Details of the campaign. Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, PQR12453. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Possible values: google, newsletter. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: cpc, banner and so on. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `payment` _mandatory_ + : `json object` Details about the payment. + + `contact` _mandatory_ + : `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `method` _mandatory_ + : `string` The method used to make the payment. Here, it should be `wallet`. + + `provider` _mandatory_ + : The wallet provider. Here, it should be `grabpay`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` Indicates the next step to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the provider page. + + `url` + : `string` URL to be used for the action indicated. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). diff --git a/llm-content/payments/payment-methods/grabpay-sg.md b/llm-content/payments/payment-methods/grabpay-sg.md new file mode 100644 index 00000000..7bff1b2a --- /dev/null +++ b/llm-content/payments/payment-methods/grabpay-sg.md @@ -0,0 +1,71 @@ +--- +title: GrabPay (Singapore) +description: Accept payments from Singaporean customers using GrabPay. +--- + +# GrabPay (Singapore) + +GrabPay is an e-wallet payment provider widely used in Southeast Asia. It allows customers in Singapore to make seamless cashless payments by maintaining a wallet balance. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +> **INFO** +> +> +> **Handy Tips** +> +> - List of [supported region and currency](#supported-region-and-currency). +> - Razorpay's [pay in native currency](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/dynamic-currency-conversion.md) feature will ensure that your Singaporean customer is shown the right currency. +> + + +### Advantages + + - **Convenient Payment Process:** GrabPay offers a seamless payment experience with simple authentication through a mobile number and OTP, making it user-friendly and minimising the risk of fraud. + + - **Localised Currency Support:** Transactions are processed and settled in SGD, providing a consistent and localised experience for Singaporean customers. + + - **High Transaction Limits:** Premium wallet users can transact up to 5000 SGD, catering to both small and large purchases. + + - **Flexible Refund Policy:** Businesses can offer refunds for up to one year, enhancing customer service and satisfaction. + + +### Refunds and Settlements + +Payments follow standard refund and settlement timelines. + +- You can refund customer payments made using GrabPay by following the usual [refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) process. + +- GrabPay payments take T+21 days to get settled to your Razorpay account. + +### Supported Integrations + +Secure [S2S integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/grabpay-sg/s2s-integration.md) for seamless payment processing. + +### Supported Region and Currency + +Given below is the region and currency that support GrabPay payments: + +Region | Currency +--- +Singapore | SGD + +### Minimum and Maximum Transaction Amounts for GrabPay Payments + +Minimum Transaction Amount | Maximum Transaction Amount +--- +SGD 0.01^^ | Premium Wallet Customers: SGD 5,000 +--- + | Basic Wallet Customers: SGD 1,000 diff --git a/llm-content/payments/payment-methods/grabpay-sg/s2s-integration.md b/llm-content/payments/payment-methods/grabpay-sg/s2s-integration.md new file mode 100644 index 00000000..2391adf9 --- /dev/null +++ b/llm-content/payments/payment-methods/grabpay-sg/s2s-integration.md @@ -0,0 +1,517 @@ +--- +title: GrabPay (Singapore) - S2S Integration +description: Let your customers make payments using GrabPay on your website or app with S2S Integration. +--- + +# GrabPay (Singapore) - S2S Integration + +Secure Server-to-Server (S2S) integration that enables seamless and reliable processing and a smooth payment experience for your customers. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +1. [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +2. Generate API Keys. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +3. Follow the [Razorpay S2S Integration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md). + +## Integrate GrabPay on S2S + +Create an Order and a Payment. And pass `method` and `provider` parameters in the create an order and a payment API. + +### Create an Order and a Payment + +Create an order along with payment using the consolidated order and payment API. This single API call combines order and payment creation, resulting in a more efficient and faster transaction process. + +Create an order along with payment by: + +- Making a single API call to Razorpay, combining order and payment creation. +- Authenticating using the provided credentials, ensuring access to the consolidated payment API. +- Manually integrating the API sample codes on your server. + +The following API will create an order along with payment with `wallet` as the payment method: + +/orders + +```curl: Request +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "SGD", + "receipt": "receipt#1111", + "partial_payment": true, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "shipping_details": { + "method": "sameday", + "gift_wrap": false + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "e_commerce", + "sku": "1gr367", + "name": "TEST", + "description": "TEST", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "e_commerce": { + "other_product_codes": { + "upc": "12r34", + "ean": "123r4", + "unspsc": "123s4" + } + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "payment": { + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "method": "wallet", + "provider": "grabpay" + } +}' + +```json: Success +{ + "amount": 50000, + "amount_due": 50000, + "amount_paid": 0, + "attempts": 10, + "created_at": 1706507580, + "currency": "INR", + "entity": "order", + "id": "order_NUJs9C1Luflzts", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "payment_workflow": { + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/O0NSBQgY0BbC4b/authenticate" + } + ], + "razorpay_payment_id": "pay_O0NSBQgY0BbC4b" + }, + "receipt": "receipt#1111", + "status": "attempted" +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _mandatory_ + : `json object` Details about the customer/user. + + `name` _mandatory_ + : `string` The customer’s name. For example, `Gaurav Kumar`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `+919000090000`. + + `email` _mandatory_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, 1234567890. + + `shipping_address` _optional_ + : `Json object` This will have details about the order's shipping address. + + `line1` _optional_ + : `string` Address Line 1 of the address + + `line2` _optional_ + : `string` Address Line 2 of the address + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560068`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), e.g. 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), e.g. -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `billing_address` _mandatory_ + : `Json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address + + `line2` _optional_ + : `string` Address Line 2 of the address + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), e.g. 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), e.g. -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `shipping_details` _optional_ + : `Json object` This will have the order's shipping details. + + `method` _optional_ + : `enum` Shipping method for the product. Possible values: + - `lowcost`: Lowest-cost service. + - `sameday`: Courier or same-day service. + - `oneday`: Next-day or overnight service. + - `twoday`: Two-day service. + - `threeday`: Three-day service. + - `pickup`: Store pick-up. + - `other`: Other shipping method. + - `none`: No shipping method because the product is a service or subscription. + + `gift_wrap` _optional_ + : `boolean` Indicates whether the customer requested gift wrapping for this purchase. This field can contain one of the following values: + - `true`: The customer requested gift wrapping. + - `false`: The customer did not request gift wrapping. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `sku` _optional_ + : `string` The unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business runs a discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `e_commerce` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `other_product_codes` _optional_ + : `object` Array to collect different codes that can identify the item type. Possible values: + + `upc` + : `string` Universal Product Code (UPC; redundantly: UPC code) is a barcode symbology used worldwide to track trade items in stores. UPC consists of 12 numeric digits that are uniquely assigned to each trade item + + `ean` + : `string` European Article Numbers (EAN) is a type of barcode that encodes an article number. Contains 8 (EAN-8) or 13 (EAN-13) numerical digits. + + `unspsc` + : `string` The United Nations Standard Products and Services Code (UNSPSC) is a taxonomy of products and services used in eCommerce. It is a four-level hierarchy coded as an eight-digit number, with an optional fifth level adding two more digits. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Know more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `json object` Details of the campaign. Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, PQR12453. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Possible values: google, newsletter. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: cpc, banner and so on. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `payment` _mandatory_ + : `json object` Details about the payment. + + `contact` _mandatory_ + : `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `method` _mandatory_ + : `string` The method used to make the payment. Here, it should be `wallet`. + + `provider` _mandatory_ + : The wallet provider. Here, it should be `grabpay`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` Indicates the next step to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the provider page. + + `url` + : `string` URL to be used for the action indicated. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). diff --git a/llm-content/payments/payment-methods/instalments.md b/llm-content/payments/payment-methods/instalments.md new file mode 100644 index 00000000..65fbd037 --- /dev/null +++ b/llm-content/payments/payment-methods/instalments.md @@ -0,0 +1,45 @@ +--- +title: Instalments +heading: About Instalments +description: Let your customers avail instalment plans at Razorpay Curlec Standard Checkout. +--- + +# About Instalments + +Instalments provide an option for your customers to make a payment in easy, equal monthly instalments at applicable interest rates from a list of banks and partners. This payment option encourages your customers to make big-value purchases without worrying about paying the full amount upfront. Customers pay the principal amount in monthly instalments. + +With Razorpay, you can let your customers pay for their purchases through credit card instalments. + +## Instalment Types + +Instalment Types | Availability +--- +[Credit Card Instalments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/instalments/credit-card-instalments.md) | ✓ + +> **WARN** +> +> +> **Payment Method Enablement** +> +> If you want to enable Instalment payment method, contact your account manager or raise a request with the [Support team](https://curlec.com/support/). +> + +## Payment Flow on Standard Checkout + +On your website or app, customers select the products and proceed to Checkout. + + +### On the Checkout page, the customers: + + 1. Enter the **Phone Number** and **Email address**. Click **Continue**. + 2. Select **Cards** as the payment method. + 3. Enter the required card details. If the card is eligible you will see the Instalment options, click **See all plans**. If the card is not eligible, customers can pay the full amount. + 4. Select an instalment plan from the available options and click **Continue**. + 5. Review the plan details. Choose if they want to **Save this card securely for future payments** or pay without saving the card. Click **Continue**. + + After successful payment, Razorpay Curlec redirects customers to your application or website. Customers' monthly statements will reflect the instalment amount. You receive the full amount in your bank account as per your [settlement cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md#settlement-cycle). + + +### Related Information + +[Credit Card Instalments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/instalments/credit-card-instalments.md) diff --git a/llm-content/payments/payment-methods/instalments/credit-card-instalments.md b/llm-content/payments/payment-methods/instalments/credit-card-instalments.md new file mode 100644 index 00000000..acc473d2 --- /dev/null +++ b/llm-content/payments/payment-methods/instalments/credit-card-instalments.md @@ -0,0 +1,71 @@ +--- +title: Credit Card Instalments +heading: About Credit Card Instalments +description: Let your customers avail Credit Card Instalments at Razorpay Curlec Standard Checkout. +--- + +# About Credit Card Instalments + +Razorpay Checkout supports instalments on credit cards issued by major banks through Visa. Instalments are available by default on Razorpay Standard Checkout. No additional integration is needed. + +## Supported Payment Partners + +Following is the list of supported Payment Partners for Credit Card Instalments and the minimum order amount stipulated by them: + +Bank Code | Issuer Bank | Minimum Amount (in MYR) | Availability +--- +HSBC | HSBC | 300 | Requires [Approval](https://curlec.com/support) +--- +ARBK | AmBank | 300 | Requires [Approval](https://curlec.com/support) +--- +SCBL | Standard Charter | 300 | Requires [Approval](https://curlec.com/support) + +> **WARN** +> +> +> **Watch Out!** +> +> Instalment options are subject to eligibility checks. For HSBC, AmBank and Standard Chartered, instalment plans will be offered based on the eligibility of the specific credit card. Eligibility is determined by the issuing bank's criteria during the payment process. +> +> + +## Payment Flow on Standard Checkout + +On your website or app, customers select the products and proceed to Checkout. + + +### On the Checkout page, the customers: + + 1. Enter the **Phone Number** and **Email address**. Click **Continue**. + 2. Select **Cards** as the payment method. + 3. Enter the required card details. If the card is eligible you will see the Instalment options, click **See all plans**. If the card is not eligible, customers can pay the full amount. + 4. Select an instalment plan from the available options and click **Continue**. + 5. Review the plan details. Choose if they want to **Save this card securely for future payments** or pay without saving the card. Click **Continue**. + + After successful payment, Razorpay Curlec redirects customers to your application or website. Customers' monthly statements will reflect the instalment amount. You receive the full amount in your bank account as per your [settlement cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md#settlement-cycle). + + +## Frequently Asked Questions + + +### What is the minimum transaction amount for Visa instalments? + + The minimum transaction amount for Visa instalments is MYR 300. + + + +### If a customer chooses instalments as the payment method, do I get the full amount upfront? + + Yes, you receive the full transaction amount at once in your settlement. The bank or provider converts it into instalments for the customer. + + + +### What happens when the customer fails to pay the instalment? + + The bank or provider bears the loss. Since you have already received the full amount in your settlement, any customer default or non-payment does not impact your business. + + + +### What are the standard credit card interest rates charged by banks for instalments? + + HSBC, AmBank and Standard Chartered offer interest-free instalments to customers. This means customers pay no additional interest charges on their instalment plans. diff --git a/llm-content/payments/payment-methods/instant-international-bank-transfer.md b/llm-content/payments/payment-methods/instant-international-bank-transfer.md new file mode 100644 index 00000000..c2e39699 --- /dev/null +++ b/llm-content/payments/payment-methods/instant-international-bank-transfer.md @@ -0,0 +1,98 @@ +--- +title: Instant International Bank Transfer +description: Offer instant international bank transfer as a payment method to customers at Razorpay Checkout. +--- + +# Instant International Bank Transfer + +Razorpay supports the following instant international bank transfer instruments to accept payments across different geographies and varied currencies. +- [Giropay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/giropay.md) for German customers +- [Sofort](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/sofort.md) for European customers +- [Trustly](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/trustly.md) for UK and European customers +- [POLi](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/poli.md) for Australian customers + +You can accept international payments from customers in the form of online instant international bank transfers using the Razorpay Checkout form. + +## Dashboard Actions + +1. Log in to the Dashboard. +2. Navigate to → **Payment Methods**. +3. Select **International Payments**. + +4. Click **Request** beside the **Instant Bank Transfer** under the **Bank Transfers Apps (International)**. + +5. An **Instant Bank Transfers Activation** request form appears. Select the payment instrument to be enabled on your Checkout. Click **Save & Next**. + + +> **INFO** +> +> +> **Handy Tips** +> +> You can accept either one or multiple payment instruments as per your needs. +> + + +6. Fill in the required details and click **Save & Next**. + + +> **INFO** +> +> +> **Handy Tips** +> - If you are an existing business, some of the required details will be auto-filled. +> - You can click the **Edit** button to fill in the incomplete details before submitting the form. +> + + + + +7. Fill in the **Management/Ownership** details in the form. When complete form details are filled, click **Submit form** button. + + + +8. After the form is submitted, the request is sent to activate the selected payment instruments. The feature enablement request goes to our banking partners and will take 15 - 20 business days to be approved. + + +After the payment instrument is enabled, you will see the **Activated** status beside the selected one. + +### Frequently Asked Questions (FAQs) + + +### 1. Am I eligible for this feature? + + All international-enabled businesses will have this feature on the Dashboard. + + + +### 2. What are the alternative payment methods available via Razorpay? + + Razorpay already supports PayPal, and has now launched POLi for Australians, Trustly for the UK and Europeans, Sofort for Europeans and Giropay for German customers. + + + +### 3. What are the prices for Alternative Payment Methods? + + You will be charged 3.0% Platform fee for accepting payments via the **Instant International Bank Transfer**. + + + +### 4. Why is my request rejected? + + The request can be rejected due to multiple reasons: + - Risky business category: The respective payment method (lets say, Trustly) is not comfortable with your business model. + - Incorrect account details: The banking partner rejects your request if you have provided any incorrect information at the time of your application. + - Unupdated website: The customer-facing website is thoroughly checked by our banking partners. The banking partner can reject your request if the website is not updated or has a limited information, including details such as **Terms & Conditions**, **Delivery timelines**, **Refund & Cancellation** policies and so on. + + + +### 5. Is this feature available on all Razorpay integrations? + + We will give early access to sellers on Razorpay Standard Checkout. The feature will be rolled out to custom and server-to-server (s2s) integration in the upcoming sprints. + + + +### 6. How much time will it take for my request to get approved? + + + The feature enablement request goes to our banking partners and will take 15 - 20 business days to be approved. diff --git a/llm-content/payments/payment-methods/international-apms.md b/llm-content/payments/payment-methods/international-apms.md new file mode 100644 index 00000000..6934c28a --- /dev/null +++ b/llm-content/payments/payment-methods/international-apms.md @@ -0,0 +1,28 @@ +--- +title: International Alternative Payment Methods +description: Explore the various international alternative payment methods (APMs) supported by Razorpay. +--- + +# International Alternative Payment Methods + +Explore the various international alternative payment methods (APMs) supported by Razorpay. Click on each payment method to learn more about its integration, features, and transaction details. + +## List of International Alternative Payment Methods + +Razorpay supports a variety of international alternative payment methods, enabling seamless transactions across global markets. The following APMs are available for integration: + +Payment Method | Region | Currency | Status +--- +[Alipay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/alipay.md) | China, Global | AUD, CAD, CHF, CNY, EUR, GBP, HKD, JPY, NZD, SGD, USD | Coming soon +--- +[DOKU, OVO, and LinkAja](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/doku-ovo-linkaja.md) | Indonesia | IDR | Available +--- +[GrabPay MY](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/grabpay-my.md) | Malaysia | MYR | Available +--- +[GrabPay SG](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/grabpay-sg.md) | Singapore | SGD | Available +--- +[GoPay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/gopay.md) | Indonesia | IDR | Available +--- +[Klarna](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/klarna.md) | UK and Europe | EUR, GBP, SEK, NOK, DKK, CHF, PLN | Coming soon +--- +[Zip](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/zip.md) | Australia and United States | AUD and USD | Coming soon diff --git a/llm-content/payments/payment-methods/klarna.md b/llm-content/payments/payment-methods/klarna.md new file mode 100644 index 00000000..9b2633df --- /dev/null +++ b/llm-content/payments/payment-methods/klarna.md @@ -0,0 +1,149 @@ +--- +title: Klarna +description: Accept payments from customers using Klarna. +--- + +# Klarna + +Klarna is a global payment provider that offers flexible payment solutions, allowing customers to Pay Now, Pay Later or pay in installments. These options make payments more convenient for customers and drive conversions for businesses. Here is a breakdown of Klarna's individual payment modes: + + +### Pay Now + + Customers can pay the full amount immediately using their bank account, debit card, or credit card. This option ensures that transactions are completed instantly, providing you with quick access to funds. + + + +### Pay Later + + Customers have the flexibility to defer the payment for a certain period after the purchase, giving them more time before completing the payment. + + + +### Pay in Installments (also known as Pay in 3 or 4) + + Customers can split their total purchase amount into smaller, interest-free payments over a set period (often 3 or 4 months). This offers customers financial flexibility without any additional costs, while you can enjoy full payment upfront from Klarna. + + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +> **INFO** +> +> +> **Handy Tips** +> +> - List of [supported region, currencies and payment methods](#supported-region-currencies-and-payment-methods). +> - Razorpay's [pay in native currency](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/dynamic-currency-conversion.md) feature will ensure that your customer is shown the right currency. +> + + +### Advantages + + - **Flexible Payment Options:** Customers are presented with multiple payment methods, such as Pay Now, Pay Later and pay in installments, allowing them to choose their preferred option during checkout. + - **Wide Availability:** Supports various countries and currencies, catering to international customers. + - **Seamless Integration:** Easily integrates into systems, enhancing the checkout experience. + - **High Transaction Limits:** Accommodates both small and large purchases with high transaction limits. + + +### Refunds and Settlements + +Payments follow standard refund and settlement timelines. + +- You can refund customer payments made using Klarna by following the usual [refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) process. + +- Klarna payments take T+21 days to get settled to your Razorpay account. + +### Supported Integrations + +Secure [S2S integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/klarna/s2s-integration.md) for seamless payment processing. + +### Supported Region, Currencies and Payment Methods + +Given below is the list of region, currencies and payment methods that support Klarna payments: + +Country | Currency Code | Pay Now (instruments vary by market) | Pay Later (in 30 days) | Pay in 3 (in 0, 30 & 60 days) [columWidth="50"] | Financing (6 - 36 months) +--- +🇦🇹 Austria (AT) | `EUR` | ✓ | ✓ | x | ✓ +--- +🇧🇪 Belgium (BE) | `EUR` | ✓ | ✓ | x | x +--- +🇩🇰 Denmark (DK) | `DKK` | x | ✓ | ✓ | x +--- +🇫🇮 Finland (FI) | `EUR` | x | ✓ | x | ✓ +--- +🇫🇷 France (FR) | `EUR` | x | x | ✓ | x +--- +🇩🇪 Germany (DE) | `EUR` | ✓ | ✓ | x | ✓ +--- +🇮🇹 Italy (IT) | `EUR` | ✓ | x | ✓ | x +--- +🇳🇱 Netherlands (NL) | `EUR` | ✓ | ✓ | x | x +--- +🇳🇴 Norway (NO) | `NOR` | x | ✓ | x | ✓ +--- +🇵🇱 Poland (PL) | `PLN` | x | ✓ | x | x +--- +🇵🇹 Portugal (PT) | `EUR` | x | x | ✓ | x +--- +🇪🇸 Spain (ES) | `EUR` | ✓ | x | ✓ | x +--- +🇸🇪 Sweden (SC) | `SEK` | ✓ | ✓ | x | ✓ +--- +🇨🇭 Switzerland (CH) | `CHF` | ✓ | ✓ | x | x +--- +🇬🇧 United Kingdom (GB) | `GBP` | x | ✓ | ✓ | x + +### Minimum and Maximum Transaction Amounts for Klarna Payments + + + + Country Code | 6 months | 12 months | 24 months | 36 months + --- + AT, DE | EUR 25 | EUR 120 | EUR 1,000 | EUR 1,500 + --- + FI | EUR 25 | EUR 500 | EUR 1,000 | EUR 1,500 + --- + NO, SE | NOK/SEK 250 | NOK/SEK 5,000 | NOK/SEK 10,000 | NOK/SEK 15,000 + --- + + + + - Minimum: EUR 35, GBP 25, or DKK 350 + + - Maximum: EUR 1,000, GBP 1,000, or DKK 50,000 + + + - Minimum: AT, DE = EUR 0.1 + + - Minimum: Other countries = EUR 1 or equivalent + + - Maximum: BE = EUR 1,500 (new users), EUR 2,500 (returning users) + + - Maximum: AT, FI, DE, NL = EUR 5,000 + + + - Minimum: EUR 0, SEK 0, or CHF 0 + + - Maximum: EUR 15,000, SEK 150,000, or CHF 15,000 + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Chargebacks are possible with this payment method. +> diff --git a/llm-content/payments/payment-methods/klarna/s2s-integration.md b/llm-content/payments/payment-methods/klarna/s2s-integration.md new file mode 100644 index 00000000..721d9368 --- /dev/null +++ b/llm-content/payments/payment-methods/klarna/s2s-integration.md @@ -0,0 +1,532 @@ +--- +title: Klarna - S2S Integration +description: Let your customers make payments using Klarna on your website or app with S2S integration. +--- + +# Klarna - S2S Integration + +Secure Server-to-Server (S2S) integration that enables seamless and reliable processing and a smooth payment experience for your customers. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +1. [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +2. Generate API Keys. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +3. Follow the [Razorpay S2S Integration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md). + +## Integrate Klarna on S2S + +Create an Order and a Payment. And pass `method` and `provider` parameters in the create an order and a payment API. + +### Create an Order and a Payment + +Create an order along with a payment using the consolidated order and payment API. This single API call combines order and payment creation, resulting in a more efficient and faster transaction process. + +Create an order along with a payment by: + +- Authenticating using the provided credentials, ensuring access to the consolidated payment API. +- Manually integrating the API sample codes on your server. + +The following API will create an order along with payment with `paylater` as the payment method: + +/orders + +```curl: Request +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 200000, + "currency": "INR", + "receipt": "receipt#1111", + "partial_payment": true, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + } + }, + "line_items_total": 5000, + "line_items": [ + { + "sku": "1gr367", + "name": "Flight Ticket", + "description": "Flight tickets", + "quantity": 2, + "type": "travel", + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "travel": { + "mode": "flight", + "sub_type": "ticket", + "carrier_code": "VXI-2345", + "departure_city": "UAM", + "departure_timestamp": "1234567890", + "arrival_city": "UAM", + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + }, + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + } + ] + } + }, + { + "sku": "1gr368", + "name": "Travel_Insurance", + "description": "Flight_Travel_Insurance", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "type": "travel", + "travel": { + "mode": "flight", + "sub_type": "insurance", + "travellers": [ + { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "age": 18, + "nationality": "IND", + "class": "business", + "identity": { + "unique_national_id": "ABCDE12345Z", + "tax_id": "ABCDE12345Z" + } + } + ] + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "payment": { + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "method": "paylater", + "provider": "klarna" + } +}' + +```json: Success +{ + "amount": 50000, + "amount_due": 50000, + "amount_paid": 0, + "attempts": 10, + "created_at": 1706507580, + "currency": "INR", + "entity": "order", + "id": "order_NUJs9C1Luflzts", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "payment_workflow": { + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/O0NSBQgY0BbC4b/authenticate" + } + ], + "razorpay_payment_id": "pay_O0NSBQgY0BbC4b" + }, + "receipt": "receipt#1111", + "status": "attempted" +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md). +> + + `receipt` _optional_ + : `string` The receipt id of the order. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _mandatory_ + : `json object` Details about the customer/user. + + `name` _mandatory_ + : `string` The customer’s name. For example, `Gaurav Kumar`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `+919000090000`. + + `email` _mandatory_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the business. For example, 1234567890. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _optional_ + : `json object` Details about the specific items added to the cart. + + `sku` _mandatory_ + : `string` Unique product id defined by the business. It must contain 6 digit booking reference number. + + `name` _mandatory_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _mandatory_ + : `integer` Number of tickets/items/quantity to be purchased. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _mandatory_ + : `integer` Unit price of the product in sub unit (needs to be inclusive of tax). + + `offer_price` _mandatory_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business is running any discount on the product. + + `tax_amount` _mandatory_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `travel` _optional_ + : `json object` Details about the type-specific data points. This will vary based on the type selected. + + `mode` _mandatory_ + : `string` The mode of travel. Possible values: + - `flight` + - `train` + - `bus` + - `cab` + - `others` + + `sub_type` _mandatory_ + : `string` The subtype of the line item. Possible values: + - `ticket` + - `meal` + - `insurance` + - `preferred_seat` + - `others` + + `carrier_code` _mandatory_ + : `string` International Air Transport Association (IATA) code for the carrier for this leg of the trip. + + `departure_city` _mandatory_ + : `string` The 3 letter IATA airport code of the departure city is also known as an IATA location identifier or IATA station code. For example, CPH for Copenhagen. + + `departure_timestamp` _mandatory_ + : `integer` UNIX timestamp. For example, 1234567890. + + `arrival_city` _mandatory_ + : `string` The 3 letter IATA airport code of the arrival city is also known as an IATA location identifier or IATA station code. For example, CPH for Copenhagen. + + `travellers` _optional_ + : `json object` Details associated with passengers/travellers/beneficiaries. + + `name` _mandatory_ + : `string` Name of the passenger/traveler/beneficiary. + + `email` _optional_ + : `string` Email address of the passenger/traveler/beneficiary. + + `age` _optional_ + : `integer` UNIX timestamp of the date of birth of the individual. For example, 1234567890. + + `nationality` _optional_ + : `string` ISO3 country code to share the nationality of the individual. For example, IND. + + `class` _optional_ + : `string` Type of the flight ticket. Possible values: + - `economy` + - `premium_economy` + - `business` + - `SL` + - `3A` + - `2A` + - `1A` + - `CC` + - `others` + + `identity` _optional_ + : `json object` Identity details of the passenger/beneficiary. + + `tax_id` _optional_ + : `string` Tax id number. For example, PAN number for India. + + `unique_national_id` _optional_ + : `string` National identification number. For example, Adhaar number for India. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorised` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of the `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Know more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `json object` Details of the campaign. Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, PQR12453. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Possible values: + - `google` + - `newsletter` + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: + - `cpc` + - `banner` + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `payment` _mandatory_ + : `json object` Details about the payment. + + `contact` _mandatory_ + : `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `method` _mandatory_ + : `string` The method used to make the payment. Here, it should be `paylater`. + + `provider` _mandatory_ + : The Pay Later provider. Here, it should be `klarna`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` indicates the next step to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the provider page. + + `url` + : `string` URL to be used for the action indicated. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). diff --git a/llm-content/payments/payment-methods/moto.md b/llm-content/payments/payment-methods/moto.md new file mode 100644 index 00000000..ce1c03ad --- /dev/null +++ b/llm-content/payments/payment-methods/moto.md @@ -0,0 +1,50 @@ +--- +title: About MOTO Payments +description: Accept MOTO (Mail-Order-Telephone-Order) payments to charge a customer's credit card without card CVV data and 2-factor-authentication. +--- + +# About MOTO Payments + +You can use MOTO (Mail-Order-Telephone-Order) transactions to charge a customer's credit card without using the CVV or 2-factor-authentication. You can extend this flow to your customers to reduce payment failures that may occur due to low internet speeds or redirects to bank pages. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +### PCI-DSS Compliance + +You must be PCI-compliant to accept and process customer's card details using the MOTO option. The compliance certificate should be updated as per the yearly renewal cycle. + +## Frequently Asked Questions + + +### 1. What card types or issuers can be used with MOTO? + + You can use the MOTO feature for all Visa and Mastercard credit cards. + + + +### 2. What is the payment flow for MOTO? + + All payments are authorized without card cvv data and 2-factor authentication. + + + +### 3. Is cryptogram value required to process MOTO transactions via tokenised cards? + + For MOTO transactions via tokenised cards, cryptogram value is not required to process the payment. + + +### Related Information + +[Batch MOTO Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/moto/batch.md) diff --git a/llm-content/payments/payment-methods/moto/batch.md b/llm-content/payments/payment-methods/moto/batch.md new file mode 100644 index 00000000..7ff7b247 --- /dev/null +++ b/llm-content/payments/payment-methods/moto/batch.md @@ -0,0 +1,197 @@ +--- +title: MOTO Batch Card Payments +description: Create MOTO card payments in batches from the Razorpay Dashboard. +--- + +# MOTO Batch Card Payments + +You can use the MOTO (Mail-Order-Telephone-Order) payment method to charge a customer's credit card without CVV or 2-factor authentication. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +#### PCI-DSS Compliance + +You must be PCI-compliant to accept and process customers' card details using the MOTO payment method. The compliance certificate should be updated as per the yearly renewal cycle. + +## Steps to Create Batch Card Payments + +Following are the steps to create MOTO card payments in batch: + +1. [Download sample batch file](#step-1-download-sample-batch-file). +2. [Fill in card and payment details](#step-2-fill-in-card-and-payment). +3. [Upload the filled batch file](#step-3-upload-the-filled-batch-file). +4. [Preview and confirm uploaded file](#step-4-preview-and-confirm-uploaded-file). +5. [View and download Batch Payment Report](#step-5-download-batch-payment-report). + +### Step 1: Download Sample Batch File + +1. Log in to the Dashboard. +2. Navigate to **Transactions** → **Batch Payments** and click **Download Sample File**. + +![](/docs/assets/images/batch_payments-1.jpg) + +[Download the sample template](https://cdn.razorpay.com/dashboard/sample_batch_payments.csv) to fill in the requisite details. + +### Step 2: Fill in Card and Payment Details + +In the downloaded file, fill the necessary details while ensuring that the header row is not modified. + +A sample data row is shown below: + +![](/docs/assets/images/batch-card-payment-sample-file.jpg) + +> **INFO** +> +> +> **Feature Request** +> +> MOTO payments can also be processed using Razorpay token id if you are using tokenisation or a [saved card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md) feature. +> This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> + + +### Batch File Details + + Different fields that need your input are listed below: + + `Header` _mandatory_ + : `string` Description of the batch file. + + `email` _mandatory_ + : `string` Customer's email address. For example, `gaurav.kumar@example.com`. + + `contact` _mandatory_ + : `integer` Customer's contact number. For example, `+919988998899`. + + `card_number` _mandatory_ + : `integer` Customer's card number or token id. For example, cards - `4386289407660153` and token id - `token_Kb9yf1HWGiZMhu`. + + `expiry_year` _conditionally mandatory_ + : `integer` Expiry year for the card in `YYYY` format. Mandatory only for cards. For example, `2022`. + + `expiry_month` _conditionally mandatory_ + : `integer` Expiry month for the card in `MM` format. Mandatory only for cards. For example, `08`. + + `cardholder_name` _conditionally mandatory_ + : `string` Cardholder's name. Mandatory only for cards. For example, `Gaurav Kumar`. + + `amount` _mandatory_ + : `integer` Amount that is to be charged to the customer. The amount should be in the currency subunit. For example, for an amount of ₹234.56, enter the value `23456`. + + `currency` _mandatory_ + : `string` The currency in which the payment is to be charged. For example, `INR`. +You can select any one of the [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md). + + `receipt` _optional_ + : `string` Unique reference entered by you the payment. For example, `#566`. + + `description` _optional_ + : `string` Description for the payment. For example, `Towards purchase of encyclopedia`. + + `notes` _optional_ + : `json object` Set of key-value pairs that can be associated with the payment. This can be useful for storing additional information about the payment. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. + + + +> **INFO** +> +> +> **Handy Tips** +> +> To fetch the token id, go to Reports on your Dashboard and download the **Custom Token Report**. +> + +### Step 3: Upload the Filled Batch File + +To upload a batch payment file: + +1. On the Dashboard, navigate to **Transactions** → **Batch Payments**. + + ![](/docs/assets/images/batch_payments-1.jpg) +1. Upload the filled-in template by clicking the **Click here to upload** button. Currently, CSV, XLS and XLSX file formats are supported. + + ![](/docs/assets/images/batch_payments-2.jpg) + +### Step 4: Preview and Confirm Uploaded File + +If the batch file is successfully uploaded with appropriate headers and attributes, you will be able to preview the first three rows of the uploaded document. After verifying the accuracy of the data, click **Process Payments** to confirm the upload. + +![](/docs/assets/images/batch_payments-3.jpg) + +### Step 5: Download Batch Payment Report + +After the file is processed, you can download a batch file report. The report includes the final state of each payment request. Click **Download** for the relevant **Batch Id**. + +![](/docs/assets/images/batch_payments-4.jpg) + + +### Batch Status + + The uploaded file can be in the following states: + + - `Created`: This is the initial state of the file when it is uploaded. It indicates that the upload is successful, and will be picked up for processing. + + - `Processed`: This is the final state of the file. Payments in a file in this state can either be successfully authorised or have errors during authorisation. There is a chance that a few of the payments did not get authorised due to issues such as invalid cards or an invalid expiry date. Download the file to check the status of the payments. + + The output file is the same as the uploaded file with additional columns added, which are as follows: + + `order_id` + : `razorpay_order_id` linked to the payment. + + `payment_id` + : `payment id` used to process the payment. + + `status` + : Indicates the status of the payment. Possible values: + - `success` + - `failed` + + `error_code` + : If the payment failed due to an error, this column will have an error code. + + `error_description` + : If the payment failed due to an error, this column will have the reason for the failure. + + +## Frequently Asked Questions + + +### 1. What card types or issuers can be used with MOTO? + + You can use the MOTO feature for all Visa and Mastercard credit cards. + + + +### 2. What is the payment flow for MOTO? + + All payments are authorised without card CVV data and 2-factor authentication. + + + +### 3. How many rows can I upload in a single batch file? + + You can upload a maximum of 500 rows in a single batch file. + + + +### 4. Once the batch file is uploaded, how long will it take for all the payments to be processed? + + Typically, all the payments are processed within 60 minutes after the batch file is uploaded successfully. + + + +### 5. Can duplicate transactions be included in the same file? + + Yes. Each row in the batch file is treated as a unique entry and processed without additional validation checks. diff --git a/llm-content/payments/payment-methods/netbanking.md b/llm-content/payments/payment-methods/netbanking.md new file mode 100644 index 00000000..f20d802a --- /dev/null +++ b/llm-content/payments/payment-methods/netbanking.md @@ -0,0 +1,315 @@ +--- +title: Netbanking +description: List of banks supported on Razorpay Payment Gateway for Netbanking payments. +--- + +# Netbanking + +You can accept payments from your customers using Netbanking. The customers enter their Netbanking credentials to make payments. This method is available by default. No additional integration or permissions are needed to enable this method at your application Checkout. + +## Netbanking Payment Flow + +The diagram given below represents the payment flow for netbanking: + +![Payment Flow for Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-flow-netbanking.jpg.md) + +To pay using the Netbanking payment method, customers: + +1. Select **Netbanking** as the payment method on the checkout page and choose their bank from the list of supported banks. +2. Are redirected to their bank's secure login page. +3. Enter their **Netbanking credentials (User ID and Password)** to authenticate. +4. Review the payment details and authorise the transaction. + + ![Payment Flow for Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/NB_Payment_Flow.gif.md) + +After successful payment, customers are redirected back to your website or app with the payment confirmation. + + +### Supported Platforms and Availability + + + **Supported Platforms** | **Availability** + --- + - Web +- Mobile web +- Android +- iOS + | Available by default. No additional integration or permissions needed. + + + +## Supported Banks + + +### List of supported banks: + + + +> **WARN** +> +> +> **Watch Out!** +> +> Allahabad Bank netbanking is merged with Indian Bank, and both the bank codes are supported. +> + + + + + Sl. No. | Bank Code | Bank Name + --- + 1 | AIRP | Airtel Payments Bank + --- + 2 | ALLA | Allahabad Bank + --- + 3 | AUBL | AU Small Finance Bank + --- + 4 | BARB_R | Bank of Baroda - Retail Banking + --- + 5 | BBKM | Bank of Bahrain and Kuwait + --- + 6 | BDBL | Bandhan Bank + --- + 7 | BKDN | Dena Bank + --- + 8 | BKID | Bank of India - Retail Banking + --- + 9 | CBIN | Central Bank of India + --- + 10 | CIUB | City Union Bank + --- + 11 | CNRB | Canara Bank + --- + 12 | CORP | Corporation Bank + --- + 13 | COSB | Cosmos Co-operative Bank + --- + 14 | CSBK | Catholic Syrian Bank + --- + 15 | DBSS | Development Bank of Singapore + --- + 16 | DCBL | DCB Bank + --- + 17 | DEUT | Deutsche Bank + --- + 18 | DLXB | Dhanlaxmi Bank + --- + 19 | ESAF | ESAF Small Finance Bank + --- + 20 | ESFB | Equitas Small Finance Bank + --- + 21 | FDRL | Federal Bank + --- + 22 | HDFC | HDFC Bank + --- + 23 | HSBC | HSBC + --- + 24 | IBKL | IDBI + --- + 25 | ICIC | ICICI Bank + --- + 26 | IDFB | IDFC FIRST Bank + --- + 27 | IDIB | Indian Bank + --- + 28 | INDB | Indusind Bank + --- + 29 | IOBA | Indian Overseas Bank + --- + 30 | JAKA | Jammu and Kashmir Bank + --- + 31 | JSBP | Janata Sahakari Bank (Pune) + --- + 32 | JSFB | Jana Small Finance Bank + --- + 33 | KARB | Karnataka Bank + --- + 34 | KCCB | The Kalupur Commercial Co-Operative Bank + --- + 35 | KJSB | Kalyan Janata Sahakari Bank + --- + 36 | KKBK | Kotak Mahindra Bank + --- + 37 | KVBL | Karur Vysya Bank + --- + 38 | LAVB_R | Lakshmi Vilas Bank - Retail Banking + --- + 39 | MAHB | Bank of Maharashtra + --- + 40 | MSNU | Mehsana Urban Bank + --- + 41 | NESF | North East Small Finance Bank + --- + 42 | NKGS | NKGSB Co-operative Bank + --- + 43 | NSPB | NSDL Payments Bank + --- + 44 | ORBC | Oriental Bank of Commerce + --- + 45 | PMCB | Punjab & Maharashtra Co-operative Bank + --- + 46 | PSIB | Punjab & Sind Bank + --- + 47 | PUNB_R | Punjab National Bank - Retail Banking + --- + 48 | RATN | RBL Bank + --- + 49 | SRCB | Saraswat Co-operative Bank + --- + 50 | SBBJ | State Bank of Bikaner and Jaipur + --- + 51 | SBHY | State Bank of Hyderabad + --- + 52 | SBIN | State Bank of India + --- + 53 | SBMY | State Bank of Mysore + --- + 54 | SBTR | State Bank of Travancore + --- + 55 | SCBL | Standard Chartered Bank + --- + 56 | SIBL | South Indian Bank + --- + 57 | STBP | State Bank of Patiala + --- + 58 | SURY | Suryoday Small Finance Bank + --- + 59 | SVCB | Shamrao Vithal Co-operative Bank + --- + 60 | SYNB | Syndicate Bank + --- + 61 | TJSB | Thane Janata Sahakari Bank + --- + 62 | TMBL | Tamilnadu Mercantile Bank + --- + 63 | TNSC | Tamilnadu State Apex Co-operative Bank + --- + 64 | UBIN | Union Bank of India + --- + 65 | UCBA | UCO Bank + --- + 66 | UTBI | United Bank of India + --- + 67 | UTIB | Axis Bank + --- + 68 | VARA | Varachha Co-operative Bank Limited + --- + 69 | YESB | Yes Bank + + + +## Fetch Supported Methods + +Use the below endpoint to fetch a list of banks Razorpay supports for netbanking payments: + +/methods + +> **WARN** +> +> +> **Watch Out!** +> +> To fire this API, provide your [KEY_ID] for authorization. Your `` is **NOT** required and should **NOT** be passed. +> + +```curl: Request +curl -u [YOUR_KEY_ID] \ + -X GET https://api.razorpay.com/v1/methods +```json: Response +{ + "entity": "methods", + ... + ... + ... + "netbanking": { + "AUBL": "AU Small Finance Bank", + "AIRP": "Airtel Payments Bank", + "ALLA": "Allahabad Bank", + "ANDB": "Andhra Bank", + "ANDB_C": "Andhra Bank - Corporate Banking", + "UTIB": "Axis Bank", + "BDBL": "Bandhan Bank", + "BBKM": "Bank of Bahrein and Kuwait", + "BARB_R": "Bank of Baroda - Retail Banking", + "BKID": "Bank of India", + "MAHB": "Bank of Maharashtra", + "BACB": "Bassein Catholic Co-operative Bank", + "CNRB": "Canara Bank", + "CSBK": "Catholic Syrian Bank", + "CBIN": "Central Bank of India", + "CIUB": "City Union Bank", + "COSB": "Cosmos Co-operative Bank", + "DCBL": "DCB Bank", + "BKDN": "Dena Bank", + "DEUT": "Deutsche Bank", + "DBSS": "Development Bank of Singapore", + "DLXB": "Dhanlaxmi Bank", + "DLXB_C": "Dhanlaxmi Bank - Corporate Banking", + "ESAF": "ESAF Small Finance Bank", + "ESFB": "Equitas Small Finance Bank", + "FDRL": "Federal Bank", + "FSFB": "Fincare Small Finance Bank", + "HDFC": "HDFC Bank", + "ICIC": "ICICI Bank", + "IBKL": "IDBI", + "IBKL_C": "IDBI - Corporate Banking", + "IDFB": "IDFC FIRST Bank", + "IDIB": "Indian Bank", + "IOBA": "Indian Overseas Bank", + "INDB": "Indusind Bank", + "JAKA": "Jammu and Kashmir Bank", + "JSFB": "Jana Small Finance Bank", + "JSBP": "Janata Sahakari Bank (Pune)", + "KCCB": "Kalupur Commercial Co-operative Bank", + "KJSB": "Kalyan Janata Sahakari Bank", + "KARB": "Karnataka Bank", + "KVBL": "Karur Vysya Bank", + "KKBK": "Kotak Mahindra Bank", + "LAVB_C": "Lakshmi Vilas Bank - Corporate Banking", + "LAVB_R": "Lakshmi Vilas Bank - Retail Banking", + "MSNU": "Mehsana Urban Co-operative Bank", + "NKGS": "NKGSB Co-operative Bank", + "NESF": "North East Small Finance Bank", + "ORBC": "PNB (Erstwhile-Oriental Bank of Commerce)", + "UTBI": "PNB (Erstwhile-United Bank of India)", + "PSIB": "Punjab & Sind Bank", + "PUNB_R": "Punjab National Bank - Retail Banking", + "RATN": "RBL Bank", + "RATN_C": "RBL Bank - Corporate Banking", + "SRCB": "Saraswat Co-operative Bank", + "SVCB_C": "Shamrao Vithal Bank - Corporate Banking", + "SVCB": "Shamrao Vithal Co-operative Bank", + "SIBL": "South Indian Bank", + "SCBL": "Standard Chartered Bank", + "SBBJ": "State Bank of Bikaner and Jaipur", + "SBHY": "State Bank of Hyderabad", + "SBIN": "State Bank of India", + "SBMY": "State Bank of Mysore", + "STBP": "State Bank of Patiala", + "SBTR": "State Bank of Travancore", + "SURY": "Suryoday Small Finance Bank", + "SYNB": "Syndicate Bank", + "TMBL": "Tamilnadu Mercantile Bank", + "TNSC": "Tamilnadu State Apex Co-operative Bank", + "TBSB": "Thane Bharat Sahakari Bank", + "TJSB": "Thane Janata Sahakari Bank", + "UCBA": "UCO Bank", + "UBIN": "Union Bank of India", + "CORP": "Union Bank of India (Erstwhile Corporation Bank)", + "VARA": "Varachha Co-operative Bank", + "YESB": "Yes Bank", + "YESB_C": "Yes Bank - Corporate Banking", + "ZCBL": "Zoroastrian Co-operative Bank" + }, + ... + ... + ... +} +``` + +## Third-Party Validation (TPV) + +Use Third-Party Validation if your business model requires customers to register a bank account and use the registered account to make payments. + +- [Third-Party Validation document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation.md) +- [List of banks that support TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/bank-list.md) diff --git a/llm-content/payments/payment-methods/netbanking/corporate.md b/llm-content/payments/payment-methods/netbanking/corporate.md new file mode 100644 index 00000000..f94f72c5 --- /dev/null +++ b/llm-content/payments/payment-methods/netbanking/corporate.md @@ -0,0 +1,99 @@ +--- +title: Corporate Netbanking +description: Enable Corporate Netbanking. Check the list of banks supported at Razorpay Payment Gateway for Corporate Netbanking payments. +--- + +# Corporate Netbanking + +Using Razorpay you can accept payments from your customers using Corporate Netbanking. The customers enter their Corporate Netbanking credentials to make payments. + +## Enable Corporate Netbanking + +You need to get corporate netbanking enabled for your Razorpay account. + +To do this: +1. Log in to the Dashboard. +2. Navigate to **Settings** → **Payment Methods**. +3. Click **Netbanking** → **Corporate Netbanking**. This shows the list of banks already active for your account. + ![Already Enabled Banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-methods-netbanking-existing-banks.jpg.md) + You can activate more banks. To do this: + 1. Click **Add more Banks** + 2. Click **Request** against the bank you want to add. + ![Add a Bank](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-methods-netbanking-add-bank.jpg.md) + 3. Click **Confirm**. + +Our support team will enable the bank for your account. + +Know how to [enable payment methods from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md). + +### List of Banks + +Given below is the list of banks for which Razorpay supports Corporate Netbanking. + +Bank Name | Bank Code | Maker Checker (Y/N) +--- +Axis Bank | UTIB | Yes +--- +AU Small Finance Bank | AUBL_C | Yes +--- +Bank of Baroda | BARB_C | Yes +--- +Bank of India | BKID_C | No +--- +Bank of Maharashtra | MAHB | No +--- +Central Bank of India | CBIN | Yes +--- +Cosmos Co-operative Bank | COSB | No +--- +Deutsche Bank | DEUT | No +--- +Development Credit Bank | DCBL | No +--- +Dhanlakshmi Bank | DLXB_C | No +--- +Federal Bank | FDRL | No +--- +ICICI Corporate Netbanking | ICIC_C | Yes +--- +IDBI Bank | IBKL | Yes +--- +Indian Overseas Bank | IOBA | No +--- +Jammu and Kashmir Bank | JAKA | No +--- +Janata Sahakari Bank Ltd Pune | JSBP | No +--- +Karnataka Bank | KARB | No +--- +Karur Vysya Bank | KVBL | No +--- +Lakshmi Vilas Bank | LAVB_C | No +--- +Oriental Bank of Commerce | ORBC | No +--- +Punjab National Bank | PUNB_C | Yes +--- +RBL Bank | RATN_C | Yes +--- +Saraswat Bank | SRCB | No +--- +Shamrao Vithal Co-operative Bank | SVCB_C | No +--- +South Indian Bank | SIBL | No +--- +State Bank of India | SBIN | Yes +--- +UCO Bank | UCBA | No +--- +Union Bank | UBIN | Yes +--- +Yes Bank | YESB_C | No + +> **INFO** +> +> +> **What is Maker-Checker?** +> +> Some banks require 2 individuals to complete a transaction - one person to create the transaction and another to approve it. This is a requirement from the bank, not Razorpay. +> diff --git a/llm-content/payments/payment-methods/otc.md b/llm-content/payments/payment-methods/otc.md new file mode 100644 index 00000000..27717384 --- /dev/null +++ b/llm-content/payments/payment-methods/otc.md @@ -0,0 +1,51 @@ +--- +title: Payment Methods | OTC (Cash & Cheque) +heading: OTC (Cash & Cheque) +description: Provide OTC (Over The Counter) payment method to customers on Checkout. Find integration steps. +--- + +# OTC (Cash & Cheque) + +To set up webhooks: + +1. Log in to the Dashboard and navigate to **Accounts & Settings**. +2. Click **Webhooks** under **Website and app settings**. +3. Click the **+ Add New Webhook** button. + + ![Add a new webhooks button on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-1.jpg.md) +4. In the **Webhook Setup** pop-up page: + - Enter the **URL** where you want to receive the webhook payload when an event is triggered. We recommend using an HTTPS URL. + + +> **INFO** +> +> +> **Handy Tips** +> +> - You can set up to **30 URLs** to receive Webhook notifications. Webhooks can only be delivered to public URLs. +> - If your URL contains `razorpay` as a domain, you will not be able to add the URL and will receive an error. +> - If you attempt to save a localhost endpoint as part of a webhook setup, you will notice an error. Know more about [testing Webhooks on an application running on localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#application-running-on-localhost). +> + + + - Enter a **Secret** for the webhook endpoint. The secret is used to validate that the webhook is from Razorpay. Do not expose the secret publicly. Know more about [how to validate webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> - When setting up the webhook, specify a secret. Use this secret to validate that the webhook is from Razorpay. Entering the secret is optional but recommended. The secret should never be exposed publicly. +> - The webhook secret does not need to be the Razorpay API key secret. +> + + + + - In the **Alert Email** field, enter the email address to which the notifications should be sent in case of webhook failure. You will receive webhook related notifications like failures, deactivation and so on. + - Select the required events from the list of **Active Events**. + ![List of active webhook events on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-2.jpg.md) + +5. Click **Create Webhook**. After you set up a webhook, it appears on the list of webhooks. + ![List of webhooks on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhooks-list.jpg.md) +6. You can select the webhook and click **Edit** to make more changes. diff --git a/llm-content/payments/payment-methods/pay-later.md b/llm-content/payments/payment-methods/pay-later.md new file mode 100644 index 00000000..cad08c91 --- /dev/null +++ b/llm-content/payments/payment-methods/pay-later.md @@ -0,0 +1,58 @@ +--- +title: Buy Now Pay Later +heading: Pay Later +description: Offer Pay Later (Buy Now, Pay Later) payment method at Razorpay Checkout. Check providers and payment flow. +--- + +# Pay Later + +- **Pay Later Changelog**: Discover new features, updates and deprecations related to Pay Later (since Jan 2024). + +Accept payments from your customers using the **Pay Later** service offered by various third-party providers. + +- Know about [how to enable/disable Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md#request-for-payment-methods-and-support) as a payment method for your account. +- No additional integration is required to show Pay Later on your Standard Checkout integration. + +> **WARN** +> +> +> **Watch Out!** +> +> Instant Refunds are not supported on EMI, Cardless EMI and Pay Later. +> + +## How it Works + +Based on the concept [Buy Now, Pay Later](https://en.wikipedia.org/wiki/Buy_now,_pay_later): + +1. The customers get a running line of credit by registering with any providers. +2. When customers buy goods or services on your website or apps, no money is debited from their accounts. +3. You receive the payments from their providers. +4. The customer pays back to the provider as per the fixed schedule defined by the provider. + +**At Razorpay Checkout:** + +1. At the Checkout, customers enter their contact details and from the displayed list of **Pay Later** providers, customers select their preferred provider. + + ![Pay Later payment method on Checkout screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pm-paylater-checkout.jpg.md) + +2. Customers authorise their accounts via the OTP sent to their registered phone numbers. + +3. Payment is completed after successful validation. + +## Supported Pay Later Providers + +**Provider name** | **Provider Code** +--- +LazyPay | `lazypay` +--- +PayPal | `paypal` + +> **INFO** +> +> +> **Handy Tips** +> +> - PayPal now supports the Pay Later feature. You should enable both [PayPal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paypal.md#to-enable-paypal) and the Pay Later options under Account & Settings → Pay Later (under Payment methods) on the Dashboard to enable the Pay Later feature. +> - Check the standard interest rates charged by [Pay Later providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#2-what-are-the-standard-interest-rates-charged). +> diff --git a/llm-content/payments/payment-methods/pay-later/custom-integration.md b/llm-content/payments/payment-methods/pay-later/custom-integration.md new file mode 100644 index 00000000..8ab67afa --- /dev/null +++ b/llm-content/payments/payment-methods/pay-later/custom-integration.md @@ -0,0 +1,55 @@ +--- +title: Pay Later - Custom Checkout +description: Let your customers make payments using the Pay Later payment method on the Razorpay Custom Checkout. +--- + +# Pay Later - Custom Checkout + +On the Razorpay Checkout form, you can let your customers make payments using the **Pay Later** service offered by various third-party providers. + +Based on the concept, *Buy now, Pay Later*, the customers get a running line of credit by registering with any providers. When customers buy goods or services on your website or apps, no money is debited from their accounts. Instead, you will receive the payments from their providers. The customer pays back to the provider as per the fixed schedule defined by the provider. + +## Providers + +Provider | Provider Code | Availability | Minimum Transaction | Maximum Transaction +--- +LazyPay | `lazypay` | [Requires Approval](https://razorpay.com/support/#request) | ₹1 | ₹10,000 +--- +PayPal | `paypal` | [Requires Approval](https://razorpay.com/support/#request) | ₹100 | Based on the customer's approved limit. + +## Payment Flow + +1. At the Checkout, customers enter the contact details and select **PayLater** as the payment method. + +2. From the displayed List of PayLater providers, customers select their preferred provider. + +3. Customers authorise their accounts via the OTP sent to their registered phone numbers. + +4. Payment is completed after successful validation. + +## Prerequisites + +- The [Razorpay Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md) should be integrated on your website or app. +- Keep the API keys (a combination of `Key_Id` and `Key_Secret`) handy for integration. +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. +- Customers should be registered account holders of the Pay Later service providers. + +## Integration Steps + +After an order is created and the customer's payment details are received, the information should be sent to Razorpay to complete the payment. You can do this by invoking `createPayment` and passing `method=paylater` and `provider=`. + +Available providers with provider code: +- **LazyPay**: `lazypay` +- **PayPal**: `paypal` + +```js: Sample Request +razorpay.createPayment({ + amount: 200000, + currency: 'INR', + email: 'gaurav.kumar@example.com', + contact: '9111145678', + order_id: 'order_DPzFe1Q1dEObDv', + method: 'paylater', + provider: +}); +``` diff --git a/llm-content/payments/payment-methods/paynow.md b/llm-content/payments/payment-methods/paynow.md new file mode 100644 index 00000000..d55aad3d --- /dev/null +++ b/llm-content/payments/payment-methods/paynow.md @@ -0,0 +1,76 @@ +--- +title: PayNow +description: Accept payments using the PayNow payment method. +--- + +# PayNow + +Using PayNow, accept instant payments from your customers through their preferred app from participating banks and non-bank financial institutions. The Monetary Authority of Singapore (MAS) oversees the operation of PayNow, which is supported by major Singaporean banks and financial institutions. + +It has become one of the most popular payment methods in Singapore, facilitating millions of transactions annually and offering a seamless and convenient payment experience for both businesses and consumers. + +## Advantages + +1. **Increased Conversions**: PayNow's popularity and ease of use can encourage more customers to complete their purchases, potentially boosting conversion rates. + +2. **Enhanced Customer Experience**: Businesses can strengthen customer loyalty and satisfaction by offering a familiar and trusted payment option. + +3. **Faster Settlements**: PayNow transactions typically settle within the same day, ensuring businesses receive their funds quickly and efficiently. + +## Enable PayNow from the Dashboard + +Follow the steps to enable PayNow: + +1. Log in to the Dashboard. +2. Click **Account & Settings** in the left menu. +3. Go to **Payment methods** and click the enable button next to PayNow. +4. You can also request for [Additional Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md#request-for-payment-methods) from the Dashboard. + +## Payment Flow + +Given below is the payment flow for PayNow: + +1. The user selects the PayNow option at checkout. +2. The user opens their bank app to scan the QR code: + - **Web Checkout**: The user opens their bank app on their phone to scan the QR code displayed on the merchant's website. + - **Phone Checkout**: The user takes a screenshot of the QR code, then opens their banking app and uses the screenshot to make the payment. The user can also save the QR code on their phone and make payments within the given time duration. + + +> **WARN** +> +> +> **Watch Out!** +> +> The QR code is active for only 10 minutes. Ensure the payment is completed within this timeframe to avoid issues. +> + +3. The user clicks the **Next** button and confirms the payment details. + + +> **INFO** +> +> +> **Handy Tips** +> +> The amount is pre-filled on the PayNow partner app. +> + + +4. The payment succeeds, and the user is redirected to the merchant's website upon completing the payment. +5. Once a successful payment is made, the QR code will no longer be usable. + +## Important Points to Note + +1. PayNow QR codes are single-use only. Attempts to pay with the same code again will be rejected by the customer's bank. +2. Transactions will only succeed if the customer has sufficient funds in their linked account to cover the payment. +3. PayNow transactions may fail if users exceed their daily transaction limit of 2000 SGD. +4. Transactions below the minimum transaction limit of 1 SGD will also fail. +5. If the bank's systems or the PayNow network are disrupted, transactions will not be processed until the outage is resolved. + +> **WARN** +> +> +> **Watch Out!** +> +> Refunds for PayNow transactions can only be processed within 30 days from the transaction date. +> diff --git a/llm-content/payments/payment-methods/poli.md b/llm-content/payments/payment-methods/poli.md new file mode 100644 index 00000000..597ff435 --- /dev/null +++ b/llm-content/payments/payment-methods/poli.md @@ -0,0 +1,74 @@ +--- +title: International Payments - POLi +description: Accept payments from Australian customers using POLi. +--- + +# International Payments - POLi + +Accept international payments from Australian customers using POLi, a popular payment method that enables customers to make payments directly from their bank accounts. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +![](/docs/assets/images/poli.jpg) + +## Advantages + +- **No card? No problem!** + + Customers who do not have access to cards or do not want to use them for online transactions can use POLi to pay through their bank accounts. +- **No chargeback or fraud** + + Avoid unnecessary chargebacks or frauds with an authorised bank transfer solution. +- **Instant confirmation** + + Receive instant payment confirmation, unlike Swift transfers which can take days. +- **Higher transaction amount** + + We support payments up to $10,000. + +## How it Works + +1. After the payment method is enabled for your Razorpay account, it will appear automatically on Checkout without additional integration. +2. Your customer opens Razorpay checkout and selects POLi as the payment method. +3. Razorpay redirects the customer to a POLi-hosted payment page with a list of available banks in their country. +4. The customer chooses the bank and logs into the online bank account. +5. The customer selects the account to make payment and completes the additional factor of authentication (OTP verification). +6. The customer completes the payment and is redirected to your website or app. + +### Pricing + +POLi payments are charged at 3.0%. + +### Refunds and Settlements + +- Refunds are not supported for POLi payments. + +- POLi payments take T+14 days to get settled to your Razorpay account. + +### Supported Integrations + +For [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md) no additional integration is needed. +- [Custom Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/poli/custom-integration.md) +- [S2S Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/poli/s2s-integration.md) + +### FAQ + +#### 1. My customer claims to have made a payment using POLi, but we have not received any confirmation from POLi. Should I ask the customer to make another payment? + +POLi transactions are asynchronous. In rare cases, POLi might not confirm whether a customer payment is successful. In this case, the customer may have transferred funds but not have received a receipt from POLi or you. + +This status can arise due to a bank or local issue at the customer's end. + +Ensure that when the customer clicks `Return to merchant's website`, they land on a page that displays a clear message asking them to check their bank account and verify that the amount has not been deducted before processing another transaction. This will reduce the chances of duplicate transactions. diff --git a/llm-content/payments/payment-methods/poli/custom-integration.md b/llm-content/payments/payment-methods/poli/custom-integration.md new file mode 100644 index 00000000..036a1159 --- /dev/null +++ b/llm-content/payments/payment-methods/poli/custom-integration.md @@ -0,0 +1,189 @@ +--- +title: POLi - Custom Integration +description: Let your customers make payments on your website or app using POLi at Razorpay Custom Checkout. +--- + +# POLi - Custom Integration + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +1. [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +2. [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +3. Integrate Razorpay Custom Checkout on your [website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md), [Android app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom.md) or [iOS App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom.md). + +## Integrate POLi on Custom Checkout + +- Create an Order. +- Pass `method` and `provider` parameters in [Create Payment Method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md#133-submit-payment-details). + +### Create an Order + +Order is an important step in the payment process. + +1. An order should be created for every payment. +2. You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +3. Pass the `order_id` received in response to the checkout. This ties the Order with the payment and secures the request from being tampered. + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11" +}' +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => 'INR'// [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies).) +]); +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", "INR"); +Order order = client.Order.Create(options); +```ruby: Ruby +options = amount: 50000, currency: 'INR', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "INR", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +#### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +### Pass method and provider Parameters During Payment Creation + +The following is a sample API to create a payment. + +```js: POLi +razorpay.createPayment({ + "amount": 500, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": 9111145678, + "order_id": "order_EAbtuXPh24LrEc", + "method": "app", + "provider": "poli" +}); +``` + +```json: Response +{ + "razorpay_payment_id": "pay_xxxx", + "next": [ + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_xxx/status" + } + ] +} +``` + +#### Request Parameters + +Along with the other checkout options, you must pass: + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it should be `app`. + +`provider` _mandatory if method=app_ +: `string` Name of the PSP app. Here, it should be `poli`. diff --git a/llm-content/payments/payment-methods/poli/s2s-integration.md b/llm-content/payments/payment-methods/poli/s2s-integration.md new file mode 100644 index 00000000..7acfe16b --- /dev/null +++ b/llm-content/payments/payment-methods/poli/s2s-integration.md @@ -0,0 +1,206 @@ +--- +title: POLi - S2S Integration +description: Let your customers make payments using POLi on your website or app with S2S Integration. +--- + +# POLi - S2S Integration + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +1. [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +2. [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +3. Follow the [Razorpay S2S Integration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md). + +## Integrate POLi on S2S + +- Create an Order. +- Pass `method` and `provider` parameters in Create Payments API. + +### Create an Order + +Order is an important step in the payment process. + +1. An order should be created for every payment. +2. You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +3. Pass the `order_id` received in response to the checkout. This ties the Order with the payment and secures the request from being tampered. + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11" +}' +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => 'INR'// [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies).) +]); +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", "INR"); +Order order = client.Order.Create(options); +```ruby: Ruby +options = amount: 50000, currency: 'INR', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "INR", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +#### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +### Pass method and provider Parameters in Create Payments API + +The following is a sample API to create a payment. + +```curl: Create Payment using JSON +curl -X POST https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type: application/json' +-d '{ + "amount": 1000, + "currency": "INR", + "contact": 9900988990, + "email": "gaurav.kumar@example.com", + "order_id": "order_4xbQrmEoA5WJ0G", + "provider": "poli", + "method" : "app" +}' + +```curl: Create Payment using Redirect +curl -X POST https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type: application/json' +-d '{ + "amount": 1000, + "currency": "INR", + "contact": 9900988990, + "email": "gaurav.kumar@example.com", + "order_id": "order_4xbQrmEoA5WJ0G", + "provider": "poli", + "method" : "app" +}' +``` + +```json: Response +{ + "razorpay_payment_id": "pay_xxxx", + "next": [ + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_xxx/status" + } + ] +} +``` + +#### Request Parameters + +Along with the other Create Payment API request parameters, you must pass: + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it should be `app`. + +`provider` _mandatory if method=app_ +: `string` Name of the PSP app. Here, it should be `poli`. diff --git a/llm-content/payments/payment-methods/sodexo.md b/llm-content/payments/payment-methods/sodexo.md new file mode 100644 index 00000000..d3dd2c4e --- /dev/null +++ b/llm-content/payments/payment-methods/sodexo.md @@ -0,0 +1,40 @@ +--- +title: Sodexo +description: Accept payments using Sodexo meal cards for food and beverage orders. +--- + +# Sodexo + +Accept payments using Sodexo meal cards for food and beverage purchases with Razorpay Optimizer. By incorporating Sodexo meal card payments, businesses can offer customers a seamless and familiar payment experience, expanding the range of payment options available for food and beverage purchases. +![sodexo checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sodexo-checkout.jpg.md) + +## Add Sodexo as a Payment Method + +> **INFO** +> +> +> **Handy Tips** +> +> Sodexo integration is supported on all checkout types: [standard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md), [custom](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md), and [server-to-server (S2S)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md). +> + +Follow the steps given below on the Razorpay Dashboard: + + +### Step 1: Enable Optimizer and Add PayU as Payment Provider + + 1. Enable [Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer.md) on your Razorpay account. + 2. Log in to the Dashboard and navigate to **Optimizer**. + 3. [Add PayU as a payment provider](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/payu.md#add-payu-as-a-payment-provider). + 4. Select `card` and `sodexo` payment methods and submit. + ![Add Salt Key sodexo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-key-salt-new-payu-sodexo.jpg.md) + + + +### Step 2: Configure Sodexo as a Payment Method + + 1. On the Razorpay Dashboard, navigate to **Account & Settings**. + 2. Select **Sodexo** from the list of payment methods and click **Request**. Know more about [how to request for a payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md#request-for-payment-methods). + ![sodexo request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sodexo-request.jpg.md) + + After the completion of the above steps, Sodexo appears on the Razorpay Checkout. diff --git a/llm-content/payments/payment-methods/sofort.md b/llm-content/payments/payment-methods/sofort.md new file mode 100644 index 00000000..88fb1885 --- /dev/null +++ b/llm-content/payments/payment-methods/sofort.md @@ -0,0 +1,88 @@ +--- +title: International Payments - Sofort +description: Accept payments from European customers using Sofort. +--- + +# International Payments - Sofort + +Sofort is a fast and easy payment method that enables customers to make payments directly from their bank accounts. It has a user base of 20 million in [8 countries](#supported-countries) across Europe. +You can make online purchases using your online banking details + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +![](/docs/assets/images/sofort.jpg) + +## Advantages + +- **No need to open foreign bank accounts** + + With Razorpay, you will get access to the Sofort payment method without any extra paperwork or compliance. You do not need to open a foreign bank account to accept bank transfers from your European customers. +- **No card? No problem!** + + Customers who do not have access to cards can use Sofort to pay through their bank accounts, making it easy for you to sell products in foreign countries with lower card coverage. +- **No chargeback or frauds** + + Avoid unnecessary chargebacks or frauds with an authorised bank transfer solution. +- **Instant confirmation** + + Receive instant payment confirmation, unlike Swift transfers which can take days. +- **Higher transaction amount** + + We support payments up to $10,000. +- **Automated fast refunds** + + Sofort's automated international refunds encourage customer loyalty, increase in basket size, and more frequent shopping. +- **Currency Conversion** + + Customers can initiate payments in their native currency and payments will be settled in your Indian bank account. Razorpay's [pay in native currency](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/dynamic-currency-conversion.md) feature will ensure that your European customer is shown the right currency. + +## How it Works + +Given below is the workflow: +1. After the payment method is enabled for your Razorpay account, it will appear automatically on Checkout without additional integration. +2. Your customer opens Razorpay checkout and selects Sofort as the payment method. +3. Razorpay redirects the customer to a Sofort-hosted payment page with a list of available banks in their country. +4. The customer chooses the bank and logs into the online bank account. +5. The customer selects the account to make the payment and completes the additional factor of authentication. +6. The customer completes the payment and is redirected to your website or app. + +### Pricing + +Sofort payments are charged at 3.0%. + +### Refunds and Settlements + +- You can refund customer payments made using Sofort by following the usual [refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) process. + +- Sofort payments take T+14 days to get settled to your Razorpay account. + +### Supported Integrations + +For [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md) no additional integration is needed. +- [Custom Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/sofort/custom-integration.md) +- [S2S Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/sofort/s2s-integration.md) + +### Supported Countries + +Given below is the list of countries that support Sofort payments: + +- 🇦🇹 Austria +- 🇧🇪 Belgium +- 🇩🇪 Germany +- 🇮🇹 Italy +- 🇳🇱 Netherlands +- 🇵🇱 Poland +- 🇪🇸 Spain +- 🇨🇭 Switzerland diff --git a/llm-content/payments/payment-methods/sofort/custom-integration.md b/llm-content/payments/payment-methods/sofort/custom-integration.md new file mode 100644 index 00000000..23a52f84 --- /dev/null +++ b/llm-content/payments/payment-methods/sofort/custom-integration.md @@ -0,0 +1,189 @@ +--- +title: Sofort - Custom Integration +description: Let your customers make payments on your website or app using Sofort at Razorpay Custom Checkout. +--- + +# Sofort - Custom Integration + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +1. [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +2. [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +3. Integrate Razorpay Custom Checkout on your [website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md), [Android app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom.md) or [iOS App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom.md). + +## Integrate Sofort on Custom Checkout + +- Create an Order. +- Pass `method` and `provider` parameters in [Create Payment Method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md#133-submit-payment-details). + +### Create an Order + +Order is an important step in the payment process. + +1. An order should be created for every payment. +2. You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +3. Pass the `order_id` received in response to the checkout. This ties the Order with the payment and secures the request from being tampered. + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11" +}' +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => 'INR'// [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies).) +]); +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", "INR"); +Order order = client.Order.Create(options); +```ruby: Ruby +options = amount: 50000, currency: 'INR', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "INR", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +#### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +### Pass method and provider Parameters During Payment Creation + +The following is a sample API to create a payment. + +```js: Sofort +razorpay.createPayment({ + "amount": 500, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": 9111145678, + "order_id": "order_EAbtuXPh24LrEc", + "method": "app", + "provider": "sofort" +}); +``` + +```json: Response +{ + "razorpay_payment_id": "pay_xxxx", + "next": [ + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_xxx/status" + } + ] +} +``` + +#### Request Parameters + +Along with the other checkout options, you must pass: + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it should be `app`. + +`provider` _mandatory if method=app_ +: `string` Name of the PSP app. Here, it should be `sofort`. diff --git a/llm-content/payments/payment-methods/sofort/s2s-integration.md b/llm-content/payments/payment-methods/sofort/s2s-integration.md new file mode 100644 index 00000000..55b3ef1a --- /dev/null +++ b/llm-content/payments/payment-methods/sofort/s2s-integration.md @@ -0,0 +1,206 @@ +--- +title: Sofort - S2S Integration +description: Let your customers make payments using Sofort on your website or app with S2S Integration. +--- + +# Sofort - S2S Integration + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +1. [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +2. Generate API Keys. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +3. Follow the [Razorpay S2S Integration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md). + +## Integrate Sofort on S2S + +- Create an Order. +- Pass `method` and `provider` parameters in Create Payments API. + +### Create an Order + +Order is an important step in the payment process. + +1. An order should be created for every payment. +2. You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +3. Pass the `order_id` received in response to the checkout. This ties the Order with the payment and secures the request from being tampered. + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11" +}' +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => 'INR'// [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies).) +]); +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", "INR"); +Order order = client.Order.Create(options); +```ruby: Ruby +options = amount: 50000, currency: 'INR', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "INR", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +#### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +### Pass method and provider Parameters in Create Payments API + +The following is a sample API to create a payment. + +```curl: Create Payment using JSON +curl -X POST https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type: application/json' +-d '{ + "amount": 1000, + "currency": "INR", + "contact": 9900988990, + "email": "gaurav.kumar@example.com", + "order_id": "order_4xbQrmEoA5WJ0G", + "provider": "sofort", + "method" : "app" +}' + +```curl: Create Payment using Redirect +curl -X POST https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type: application/json' +-d '{ + "amount": 1000, + "currency": "INR", + "contact": 9900988990, + "email": "gaurav.kumar@example.com", + "order_id": "order_4xbQrmEoA5WJ0G", + "provider": "sofort", + "method" : "app" +}' +``` + +```json: Response +{ + "razorpay_payment_id": "pay_xxxx", + "next": [ + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_xxx/status" + } + ] +} +``` + +#### Request Parameters + +Along with the other Create Payment API request parameters, you must pass: + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it should be `app`. + +`provider` _mandatory if method=app_ +: `string` Name of the PSP app. Here, it should be `sofort`. diff --git a/llm-content/payments/payment-methods/transaction-limits.md b/llm-content/payments/payment-methods/transaction-limits.md new file mode 100644 index 00000000..78461fcc --- /dev/null +++ b/llm-content/payments/payment-methods/transaction-limits.md @@ -0,0 +1,40 @@ +--- +title: Transaction Limits for Payment Methods +description: List of transaction limits for every payment method permitted on Razorpay. +--- + +# Transaction Limits for Payment Methods + +Using Razorpay you can provide a host of payment methods to your customers to make payments. However, due to restrictions from banking partners, there are transaction limits for the different payment methods. + +## Payment Methods and Transaction Limits + +The following table lists the various methods and the transaction limits: + +Payment Method | Maximum Transaction Limit +--- +Netbanking | ₹5,00,000 +--- +Cards | ₹5,00,000 +--- +UPI | ₹1,00,000 Know more about the [UPI transaction limits prescribed by different entities](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/transaction-limits/upi.md). +--- +Wallets | - For non-KYC Merchants: ₹10,000 +- For KYC Merchants: ₹1,00,000 + +--- +Pay Later | - ICICI Bank PayLater: ₹30,000 +- GetSimpl: ₹30,000 + +- FlexiPay by HDFC Bank: ₹60,000 (Minimum limit: ₹2,000) + +--- +PayPal | As per the limit of your verified PayPal account (this is usually USD 10,000 for the verified PayPal account). + +> **INFO** +> +> +> **Handy Tips** +> +> You can increase the transaction limits by raising a request with our [support team](https://razorpay.com/support/). +> diff --git a/llm-content/payments/payment-methods/transaction-limits/upi.md b/llm-content/payments/payment-methods/transaction-limits/upi.md new file mode 100644 index 00000000..35765669 --- /dev/null +++ b/llm-content/payments/payment-methods/transaction-limits/upi.md @@ -0,0 +1,340 @@ +--- +title: UPI Transaction Limits | Updated Limit by Banks, NPCI and BHIM +heading: UPI Transaction Limits +description: Check the UPI transaction limits set by banks, NPCI, BHIM and other PSP Apps. +--- + +# UPI Transaction Limits + +The UPI transaction limits prescribed by banks, NPCI and PSP Apps are provided in the following sections. + +## NPCI Prescribed Transaction Limits for Merchant Categories + +The following table lists the transaction limit for different merchant categories as per NPCI: + +Merchant Categories | Transaction Limits (₹) +--- +P2M Transactions | 1,00,000 +--- +BFSI | 2,00,000 +--- +Non-verified merchants | Collect payments up to 2,000 +--- +MCC 6211 for IPO and purchase of G-Sec through RBI Retail Direct Scheme (RDS) | 5,00,000 +--- +Healthcare | 5,00,000 +--- +Education | 5,00,000 + +## Limit Set by PSP Apps +Usually, most of the PSP apps allow daily payments of up to ₹1,00,000 or a maximum of 10 transactions per day. + +### Limit Set by BHIM App + +The following table lists the transaction limit set by the BHIM app: + +Transactions | Per Transaction Limit (₹) +--- +P2P | 40,000 +--- +P2M Verified | 1,00,000 +--- +P2M Non-verified | 40,000 +--- +Bill Pay | 20,000 + +## Other limits + +- To protect against fraud, some transactions might get flagged for further review by UPI apps or banks. +- UPI apps have risk engines to flag and block transactions. +- In addition, there is a [GPay transaction limit per day](https://razorpay.com/learn/gpay-transaction-limit/) depending on your bank. + +## Bank Prescribed Limits + +The following table lists the List of banks with their UPI transaction limits: + +S No | Bank Name | Bank Type | Sponsor Bank | UPI Transaction limit | UPI Daily Limit +--- +1 | Abhyudaya Co-operative Bank | Cooperative | NA | 5,000 | 25,000 +--- +2 | Adarsh Co-op Bank Ltd | Cooperative | HDFC Bank | 50,000 | 50,000 +--- +3 | Aditya Birla Idea Payments Bank | Payments Bank | NA | 1,00,000 | 1,00,000 +--- +4 | Airtel Payments Bank | Payments Bank | NA | 1,00,000 | 1,00,000 +--- +5 | Allahabad Bank | Public Sector Bank | NA | 25,000 | 1,00,000 +--- +6 | Allahabad UP Gramin Bank | RRB | Allahabad Bank | 20,000 | 40,000 +--- +7 | Andhra Bank Public | Sector Bank | NA | 1,00,000 | 1,00,000 +--- +8 | Andhra Pradesh Grameena Vikas Bank | RRB | SBI | 25,000 | 1,00,000 +--- +9 | Andhra Pragathi Grameena Bank | RRB | NA | 10,000 | 20,000 +--- +10 | Apna Sahakari Bank | Cooperative | NA | 1,00,000 | 1,00,000 +--- +11 | Assam Gramin Vikash Bank | RRB | United Bank of India | 5,000 | 25,000 +--- +12 | Axis Bank | Private | NA | 1,00,000 | 1,00,000 +--- +13 | Bandhan Bank | Private | NA | 1,00,000 | 1,00,000 +--- +14 | Bank Of Baroda | Public Sector Bank | NA | 25,000 | Not set +--- +15 | Bank Of India | Public Sector Bank | NA | 10,000 | 1,00,000 +--- +16 | Bank of Maharashtra | Public Sector Bank | NA | 1,00,000 | 1,00,000 +--- +17 | Baroda Gujarat Gramin Bank | RRB | Bank of Baroda | 25,000 | Not Set +--- +18 | Baroda Rajasthan Kshetriya Gramin Bank | RRB | Bank of Baroda | 25,000 | 25,000 +--- +19 | Baroda Uttar Pradesh Gramin Bank | RRB | Bank of Baroda | 25,000 | 25,000 +--- +20 | Bassein Catholic Coop Bank | Cooperative | NA | 20,000 | 40,000 +--- +21 | Bhilwara Urban Co operative Bank Ltd | Cooperative | HDFC | 5000 | 25000 +--- +22 | Canara Bank | Public Sector Bank | NA | 10,000 | 25,000 +--- +23 | Catholic Syrian Bank | Private | NA | 1,00,000 | 1,00,000 +--- +24 | Central Bank of India | Public Sector Bank | NA | 25,000 | 50,000 +--- +25 | Chaitanya Godavari Grameena Bank | RRB | Andhra Bank | 25,000 | 1,00,000 +--- +26 | Chhattisgarh Rajya Gramin Bank | RRB | SBI | 25,000 | 1,00,000 +--- +27 | Citibank Retail | Foreign Bank | NA | 1,00,000 | 1,00,000 +--- +28 | City Union Bank | Private | NA | 1,00,000 | 1,00,000 +--- +29 | Coastal Local Area Bank Ltd | Cooperative | BOM | 50,000 | 1,00,000 +--- +30 | Corporation Bank | Public Sector Bank | NA | 50,000 | 1,00,000 +--- +31 | DBS Digi Bank | Foreign Bank | NA | 1,00,000 | 1,00,000 +--- +32 | DCB Bank | Private | NA | 5,000 | 5000 +--- +33 | Dena Bank | Public Sector Bank | NA | 1,00,000 | 1,00,000 +--- +34 | Deutsche Bank AG (Web Collect) | Foreign Bank | NA | NA | NA +--- +35 | Dhanlaxmi Bank Ltd | Private | NA | 1,00,000 | 1,00,000 +--- +36 | Dombivali Nagrik Sahakari Bank | Cooperative | NA | 1,00,000 | 1,00,000 +--- +37 | Equitas Small Finance Bank | Small Finance Bank | NA | 25,000 | 1,00,000 +--- +38 | ESAF Small Finance Bank | Small Finance Bank | NA | 1,00,000 | 1,00,000 +--- +39 | Federal Bank | Private | NA | 1,00,000 | 1,00,000 +--- +40 | FINO Payments Bank | Payments Bank | NA | 1,00,000 | 1,00,000 +--- +41 | G P Parsik Bank | Cooperative | NA | 1,00,000 | 1,00,000 +--- +42 | HDFC Bank | Private | NA | 1,00,000 | 1,00,000 +--- +43 | Himachal Pradesh Gramin Bank | RRB | PNB | 50,000 | 50,000 +--- +44 | HSBC | Foreign Bank | NA | 1,00,000 | 1,00,000 +--- +45 | Hutatma Sahakari Bank Ltd | Cooperative | ICICI Bank | 1,00,000 | No limit +--- +46 | ICICI Bank | Private | NA | 10,000 (25000 for Google Pay users) | 10000 (25000 for Google Pay users) +--- +47 | IDBI Bank | Public Sector Bank | NA | 25,000 | 50,000 +--- +48 | IDFC First Bank | Private | NA | 1,00,000 | 1,00,000 +--- +49 | India Post Payment Bank | Payments Bank | NA | 25,000 | 50,000 +--- +50 | Indian Bank | Public Sector Bank | NA | 1,00,000 | 1,00,000 +--- +51 | Indian Overseas Bank | Public Sector Bank | NA | 10,000 | 20,000 +--- +52 | IndusInd Bank | Private | NA | 1,00,000 | 1,00,000 +--- +53 | J&K Grameen Bank | RRB | Jammu & Kashmir Bank | 20,000 | 20,000 +--- +54 | Jalgaona Janata Sahkari Bank | Cooperative | NA | 1,00,000 | 1,00,000 +--- +55 | Jammu & Kashmir Bank | Private | NA | 20,000 | 20,000 +--- +56 | Jana Small Finance Bank | Small Finance Bank | NA | 10,000 | 40,000 +--- +57 | Janta Sahakari Bank Pune | Cooperative | NA | 1,00,000 | 1,00,000 +--- +58 | Jio Payments Bank | Payments Bank | NA | 1,00,000 | 1,00,000 +--- +59 | Kallappanna Awade Ichalkaranji Janata Sahakari Bank Ltd. | Cooperative | NA | 25,000 | 2,00,000 +--- +60 | Karnataka Bank | Private | NA | 1,00,000 | 2,00,000 +--- +61 | Karnataka Vikas Gramin Bank | RRB | NA | 25,000 | 25,000 +--- +62 | Karur Vysaya Bank | Private | NA | 1,00,000 | 1,00,000 +--- +63 | Kashi Gomti Samyut Gramin Bank | RRB | NA | 1,00,000 | 1,00,000 +--- +64 | Kaveri Grameena Bank | RRB | SBI | 25,000 | 25,000 +--- +65 | Kerala Gramin Bank | RRB | NA | 20,000 | 20,000 +--- +66 | Kotak Mahindra Bank | Private | NA | 1,00,000 | 1,00,000 +--- +67 | Langpi Dehangi Rural Bank | RRB | SBI | 10,000 | 1,00,000 +--- +68 | Madhya Bihar Gramin Bank | RRB | PNB | 25,000 | 1,00,000 +--- +69 | Maharashtra Grameen Bank | RRB | BOM | 25,000 | 1,00,000 +--- +70 | Maharashtra State Cooperative Bank | Cooperative | NA | 5,000 | 50,000 +--- +71 | Malwa Gramin Bank (Merged with Punjab Gramin Bank) | RRB | SBI | 10,000 | 25,000 +--- +72 | Manipur Rural Bank | RRB | SBI | 10,000 | 10,000 +--- +73 | Maratha Cooperative Bank | Cooperative | NA | 1,00,000 | 1,00,000 +--- +74 | Meghalaya Rural Bank | Foreign Bank | SBI | 1,00,000 | 1,00,000 +--- +75 | Mizoram Rural Bank | RRB | SBI | 25,000 | 1,00,000 +--- +76 | NKGSB Co-op. Bank Ltd. | Cooperative | NA | 20,000 | 40,000 +--- +78 | Oriental Bank of Commerce | Public Sector Bank | NA | 1,00,000 | 1,00,000 +--- +79 | Paschim Banga Gramin Bank | RRB | UCO | 5,000 | 25,000 +--- +80 | Paytm Payments Bank | Payments Bank | NA | 1,00,000 | 1,00,000 +--- +81 | Pragathi Krishna Gramin Bank | RRB | NA | 20,000 | 20,000 +--- +82 | Prathama U.P. Gramin Bank | RRB | NA | 10,000 | 50,000 +--- +83 | Punjab and Maharastra Coop Bank | Cooperative | NA | 1,00,000 | 1,00,000 +--- +84 | Punjab and Sind Bank | Public Sector Bank | NA | 10,000 | 10,000 +--- +85 | Punjab Gramin Bank | RRB | PNB | 10,000 | 25,000 +--- +86 | Punjab National Bank | Public Sector Bank | NA | 25,000 | 50,000 +--- +87 | Purvanchal Bank | RRB | SBI | 25,000 | 1,00,000 +--- +88 | Rajasthan Marudhara Gramin Bank | RRB | SBI | 25,000 | 25,000 +--- +89 | Rajkot Nagari Sahakari Bank Ltd | Cooperative | NA | 1,00,000 | 1,00,000 +--- +90 | Samruddhi Co-op Bank Ltd | Cooperative | TJSB | 1,00,000 | 1,00,000 +--- +91 | Sarva Haryana Gramin Bank | RRB | PNB | 50,000 | 1,00,000 +--- +92 | Sarva UP Gramin Bank | RRB | PNB | 50,000 | 1,00,000 +--- +93 | Saurashtra Gramin Bank | RRB | SBI | 20,000 | 1,00,000 +--- +94 | Shree Kadi Nagarik Sahakari Bank Ltd. | Cooperative | Yes Bank | 1,00,000 | 1,00,000 +--- +95 | South Indian Bank | Private | NA | 1,00,000 | 1,00,000 +--- +96 | Standard Chartered | Foreign Bank | NA | 1,00,000 | 1,00,000 +--- +97 | State Bank Of India | Public Sector Bank | NA | 1,00,000 | 1,00,000 +--- +98 | Suco Souharda Sahakari Bank | Cooperative | ICICI Bank | 1,00,000 | 1,00,000 +--- +99 | Suryoday Small Finance Bank Ltd | Small Finance Bank | NA | 1,00,000 | 1,00,000 +--- +100 | Suvarnayug Sahakari Bank Ltd | Cooperative | HDFC | 1,00,000 | 1,00,000 +--- +101 | Syndicate Bank | Public Sector Bank | NA | 10,000 | 1,00,000 +--- +102 | Tamilnadu Mercantile Bank | Private | NA | 20,000 | 1,00,000 +--- +103 | Telangana Gramin Bank | RRB | SBI | 25,000 | 1,00,000 +--- +104 | Telangana State Co Operative Apex Bank | Cooperative | IDBI | 10,000 | 1,00,000 +--- +105 | Thane Bharat Sahakari Bank | Cooperative | NA | 1,00,000 | 1,00,000 +--- +106 | The Cosmos Co-Operative Bank Ltd | Cooperative | NA | 10,000 | 50,000 +--- +107 | The A.P. Mahesh Co-Operative Urban Bank | Cooperative | NA | 25,000 | 25,000 +--- +108 | The Ahmedabad District Co-operative Bank Ltd | Cooperative | GSCB | 10,000 | 25,000 +--- +109 | The Ahmedabad Mercantile Co-op Bank Ltd | Cooperative | HDFC Bank | 1,00,000 | 1,00,000 +--- +110 | The Andhra Pradesh State Cooperative | Cooperative | NA | 10,000 | 1,00,000 +--- +111 | The Baroda Central Co-operative Bank Ltd. | Cooperative | GSCB | 15,000 | 1,00,000 +--- +112 | The Gujarat State Co-operative Bank Limited | Cooperative | NA | 50,000 | 1,00,000 +--- +113 | The Hasti Co-operative Bank Ltd | Cooperative | NA | 1,00,000 | 1,00,000 +--- +114 | The Kalyan Janta Sahkari Bank | Cooperative | NA | 1,00,000 | 1,00,000 +--- +115 | The Lakshmi Vilas Bank Limited | Private | NA | 1,00,000 | 1,00,000 +--- +116 | The Mahanagar Co-Op. Bank Ltd | Cooperative | NA | 25,000 | 50,000 +--- +117 | The Malad Sahakari Bank Ltd. | Cooperative | PMCO | 10,000 | 50,000 +--- +118 | The Mehsana Urban Co-Operative Bank | Cooperative | NA | 1,00,000 | 1,00,000 +--- +119 | The Municipal Co-op Bank Ltd. | Cooperative | NA | 5,000 | 50,000 +--- +120 | The Muslim Co-Operative Bank Ltd | Cooperative | HDFC | 1,00,000 | 1,00,000 +--- +121 | The Nainital Bank Ltd | Private | NA | 20,000 | 40,000 +--- +122 | The Ratnakar Bank Limited | Private | NA | 25,000 | 25,000 +--- +123 | The Saraswat Co-Operative Bank | Cooperative | NA | 1,00,000| 1,00,000 +--- +124 | The Surat Peoples Co Op. Bank Ltd | Cooperative | NA | 25,000 | 1,00,000 +--- +125 | The Sutex Co-op Bank | Cooperative | ICICI Bank | 1,00,000 | 1,00,000 +--- +126 | The SVC Co-Operative Bank Ltd | Cooperative | NA | 10,000 | 20,000 +--- +127 | The Thane Janta Sahakari Bank Ltd | Cooperative | NA | 1,00,000 | 1,00,000 +--- +128 | The Udaipur Mahila Samridhi Urban Co-op Bank Ltd | Cooperative | ICICI Bank | 1,00,000 | 1,00,000 +--- +129 | The Udaipur Mahila Urban Co-op Bank Ltd | Cooperative | NA | 1,00,000 | 1,00,000 +--- +130 | The Urban Cooperative Bank Ltd Dharangaon | Cooperative | ICICI Bank | 20,000 | 25,000 +--- +131 | The Varachha Co-op Bank Ltd. | Cooperative | NA | 20,000 | 40,000 +--- +132 | The Vijay Cooperative Bank Ltd | Cooperative | ICIC Bank | 20,000 | 2,00,000 +--- +133 | The Vishweshwar Sahakari Bank Ltd | Cooperative | NA | 1,00,000 | 1,00,000 +--- +134 | Tripura Gramin Bank | RRB | SBI | 10,000 | 10,000 +--- +135 | UCO Bank | Public Sector Bank | NA | 1,00,000 | 1,00,000 +--- +136 | Ujjivan Small Finance Bank Limited | Small Finance Bank | NA | 50,000 | 1,00,000 +--- +137 | Union Bank of India | Public Sector Bank | NA | 1,00,000 | 2,00,000 +--- +138 | United Bank of India | Public Sector Bank | NA | 25,000 | 60,000 +--- +139 | Uttarakhand Gramin Bank | RRB | SBI | 25,000 | 1,00,000 +--- +140 | Vananchal Gramin Bank | RRB | SBI | 20,000 | 20,000 +--- +141 | Vasai Vikas Co-op Bank Ltd | Cooperative | NA | 1,00,000 | 1,00,000 +--- +142 | Vijaya Bank | Public Sector Bank | NA | 25,000 | 50,000 +--- +143 | Yes Bank | Private | NA | 1,00,000 | 1,00,000 diff --git a/llm-content/payments/payment-methods/trustly.md b/llm-content/payments/payment-methods/trustly.md new file mode 100644 index 00000000..6cf6f754 --- /dev/null +++ b/llm-content/payments/payment-methods/trustly.md @@ -0,0 +1,105 @@ +--- +title: International Payments - Trustly +description: Accept payments from European customers using Trustly. +--- + +# International Payments - Trustly + +Trustly is a popular payment method that enables customers to make payments directly from their bank accounts. It works for 600+ banks and has a user base of 500 million. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +![](/docs/assets/images/trustly.jpg) + +> **INFO** +> +> +> **Handy Tips** +> +> - List of [supported countries](#supported-countries). +> - Razorpay's [pay in native currency](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/dynamic-currency-conversion.md) feature will ensure that your European customer is shown the right currency. +> + +## Advantages + +- **No need to open foreign bank accounts** + + You do not need to open a foreign bank account to accept transfers from your European customers. With Razorpay, you can access the Trustly payment method without any extra paperwork or compliance. +- **No card? No problem!** + + Customers who do not have access to cards can use Trustly to pay through their bank accounts, making it easy for you to sell products in foreign countries with lower card coverage. +- **No chargeback or fraud** + + Avoid unnecessary chargebacks or frauds with an authorised bank transfer solution. +- **Instant confirmation** + + Receive instant payment confirmation, unlike Swift transfers which can take days. +- **Higher transaction amount** + + We support payments up to $10,000. +- **Automated fast refunds** + + Trustly’s automated international refunds encourage customer loyalty, increase basket size, and more frequent shopping. + +## How it Works + +Watch this video to know how a customer can make a Trustly payment on Razorpay Checkout. + +[Video: https://www.youtube.com/embed/bA2cipbYe98] + +Given below is the workflow: +1. After the payment method is enabled for your Razorpay account, it will appear automatically on Checkout without additional integration. +2. Your customer opens Razorpay checkout and selects Trustly as the payment method. +3. Razorpay redirects the customer to a Trustly-hosted payment page with a list of available banks in their country. +4. The customer chooses the bank and logs into the online bank account. +5. The customer selects the account to make the payment and completes the additional factor of authentication. +6. The customer completes the payment and is redirected to your website or app. + +### Pricing + +Trustly payments are charged at 3.0%. + +### Refunds and Settlements + +- You can refund customer payments made using Trustly by following the usual [refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) process. + +- Trustly payments take T+14 days to get settled to your Razorpay account. + +### Supported Integrations + +For [Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md) no additional integration is needed. +- [Custom Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/trustly/custom-integration.md) +- [S2S Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/trustly/s2s-integration.md) + +### Supported Countries + +Given below is the list of countries that support Trustly payments: + +- 🇦🇹 Austria +- 🇧🇪 Belgium +- 🇨🇿 Czech Republic +- 🇩🇰 Denmark +- 🇪🇪 Estonia +- 🇫🇮 Finland +- 🇩🇪 Germany +- 🇱🇻 Latvia +- 🇱🇹 Lithuania +- 🇳🇱 Netherlands +- 🇳🇴 Norway +- 🇵🇱 Poland +- 🇸🇰 Slovakia +- 🇪🇸 Spain +- 🇸🇪 Sweden +- 🇬🇧 United Kingdom diff --git a/llm-content/payments/payment-methods/trustly/custom-integration.md b/llm-content/payments/payment-methods/trustly/custom-integration.md new file mode 100644 index 00000000..39a0c6e4 --- /dev/null +++ b/llm-content/payments/payment-methods/trustly/custom-integration.md @@ -0,0 +1,189 @@ +--- +title: Trustly - Custom Integration +description: Let your customers make payments on your website or app using Trustly at Razorpay Custom Checkout. +--- + +# Trustly - Custom Integration + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +1. [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +2. [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +3. Integrate Razorpay Custom Checkout on your [website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md), [Android app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom.md) or [iOS App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom.md). + +## Integrate Trustly on Custom Checkout + +- Create an Order. +- Pass `method` and `provider` parameters in [Create Payment Method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md#133-submit-payment-details). + +### Create an Order + +Order is an important step in the payment process. + +1. An order should be created for every payment. +2. You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +3. Pass the `order_id` received in response to the checkout. This ties the Order with the payment and secures the request from being tampered. + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11" +}' +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => 'INR'// [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies).) +]); +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", "INR"); +Order order = client.Order.Create(options); +```ruby: Ruby +options = amount: 50000, currency: 'INR', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "INR", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +#### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +### Pass method and provider Parameters During Payment Creation + +The following is a sample API to create a payment. + +```js: Trustly +razorpay.createPayment({ + "amount": 500, + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": 9111145678, + "order_id": "order_EAbtuXPh24LrEc", + "method": "app", + "provider": "trustly" +}); +``` + +```json: Response +{ + "razorpay_payment_id": "pay_xxxx", + "next": [ + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_xxx/status" + } + ] +} +``` + +#### Request Parameters + +Along with the other checkout options, you must pass: + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it should be `app`. + +`provider` _mandatory if method=app_ +: `string` Name of the PSP app. Here, it should be `trustly`. diff --git a/llm-content/payments/payment-methods/trustly/s2s-integration.md b/llm-content/payments/payment-methods/trustly/s2s-integration.md new file mode 100644 index 00000000..de491ea2 --- /dev/null +++ b/llm-content/payments/payment-methods/trustly/s2s-integration.md @@ -0,0 +1,206 @@ +--- +title: Trustly - S2S Integration +description: Let your customers make payments using Trustly on your website or app with S2S Integration. +--- + +# Trustly - S2S Integration + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +1. [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +2. Generate API Keys + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +3. Follow the [Razorpay S2S Integration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md). + +## Integrate Trustly on S2S + +- Create an Order. +- Pass `method` and `provider` parameters in Create Payments API. + +### Create an Order + +Order is an important step in the payment process. + +1. An order should be created for every payment. +2. You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. +3. Pass the `order_id` received in response to the checkout. This ties the Order with the payment and secures the request from being tampered. + +#### API Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11" +}' +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "order_rcptid_11"); + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => 'INR'// [See the list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies).) +]); +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", "INR"); +Order order = client.Order.Create(options); +```ruby: Ruby +options = amount: 50000, currency: 'INR', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "INR", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +#### Request Parameters + +Here is the list of parameters and their description for creating an order: + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`id` _mandatory_ +: `string` Unique identifier of the customer. For example, `cust_1Aa00000000004`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +#### Error Response Parameters + +The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +### Pass method and provider Parameters in Create Payments API + +The following is a sample API to create a payment. + +```curl: Create Payment using JSON +curl -X POST https://api.razorpay.com/v1/payments/create/json \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type: application/json' +-d '{ + "amount": 1000, + "currency": "INR", + "contact": 9900988990, + "email": "gaurav.kumar@example.com", + "order_id": "order_4xbQrmEoA5WJ0G", + "provider": "trustly", + "method" : "app" +}' + +```curl: Create Payment using Redirect +curl -X POST https://api.razorpay.com/v1/payments/create/redirect \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type: application/json' +-d '{ + "amount": 1000, + "currency": "INR", + "contact": 9900988990, + "email": "gaurav.kumar@example.com", + "order_id": "order_4xbQrmEoA5WJ0G", + "provider": "trustly", + "method" : "app" +}' +``` + +```json: Response +{ + "razorpay_payment_id": "pay_xxxx", + "next": [ + { + "action": "poll", + "url": "https://api.razorpay.com/v1/payments/pay_xxx/status" + } + ] +} +``` + +#### Request Parameters + +Along with the other Create Payment API request parameters, you must pass: + +`method` _mandatory_ +: `string` The method used to make the payment. Here, it should be `app`. + +`provider` _mandatory if method=app_ +: `string` Name of the PSP app. Here, it should be `trustly`. diff --git a/llm-content/payments/payment-methods/upi-qr.md b/llm-content/payments/payment-methods/upi-qr.md new file mode 100644 index 00000000..a298253c --- /dev/null +++ b/llm-content/payments/payment-methods/upi-qr.md @@ -0,0 +1,22 @@ +--- +title: UPI QR Code +description: Accept UPI payments from your customers using the Razorpay UPI QR code. +--- + +# UPI QR Code + +Using Razorpay UPI QR Codes, you can accept UPI payments from your customers where the customers scan the QR codes using their mobile devices to make payments. You can control the payment amount and speed up your customers' payment experience. UPI QR Codes are useful when you want to collect offline or in-person payments from your customers. + +QR Code is an information matrix in a machine-readable format containing the required details to accept customers' payments. +![](/docs/assets/images/upi-qr.jpg) + +## How it Works + +1. On your payments app, enter the amount you want to collect from your customer and initiate the payment. +2. Display the QR Code (received from Razorpay) on the app. +3. Customers scan the QR Code using any of the UPI apps installed on their mobile devices. +4. After a successful payment, the customer and you receive a notification about the payment. + +### What Next + +[Integrate with our APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi-qr/api.md) to accept payments. Also, check the [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi-qr/faqs.md) related to UPI QR Codes. diff --git a/llm-content/payments/payment-methods/upi-qr/api.md b/llm-content/payments/payment-methods/upi-qr/api.md new file mode 100644 index 00000000..59f9439e --- /dev/null +++ b/llm-content/payments/payment-methods/upi-qr/api.md @@ -0,0 +1,382 @@ +--- +title: UPI QR Code API +description: Create UPI QR Codes and associate the received payments with respective customers using Razorpay Virtual Account APIs. +--- + +# UPI QR Code API + +UPI QR Code is a payment method that allows you to accept payments from your customers using the generated QR code. Razorpay UPI QR Codes are built around Razorpay's Virtual Account APIs. You can create virtual accounts and tag them to individual customers to track the customers' payments. Razorpay notifies you about the payment made to any of the virtual accounts and handles the complexity of reconciling these payments. + +## UPI QR Code Workflow + +1. Send a request to create a virtual account with `receiver.type` as `qr_code`. A QR code is generated as a result of virtual account creation. +2. Display the QR code on your app used for collecting payments. +3. Customers scan and pay using any of the UPI apps on their mobile devices. +4. Verify the payment status either by polling Razorpay APIs or by[ subscribing to Webhook events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + +## Prerequisites + +1. Ensure that you have the API key required for integration. + + - Log in to the Dashboard with appropriate credentials. + - Select the mode (**Test** or **Live**) for which you want to generate the API key. + +> **INFO** +> +> +> **Handy Tips** +> +> You have to generate separate API Keys for the test and live modes. No money is deducted from your account in the test mode. +> + + - Navigate to **Settings** → **API Keys** → **Generate Key** to generate key for the selected mode. + + + +> **WARN** +> +> +> **Watch Out!** +> +> After generating the keys from the Dashboard, download and save them securely. If you do not remember your API Keys, you need to re-generate them from the Dashboard. +> + + + +2. Verify that the `virtual_account` feature enabled on your account. + + If you are already using the [Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) product of Razorpay, this feature is enabled for your account. If you are not, then you must log in to Dashboard and complete the onboarding process of the Smart Collect product for the `virtual_account` feature to be enabled for your account. + + ![](/docs/assets/images/smart-collect-onboarding.jpg) + +3. Know about the [Virtual Accounts APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md). + +## Integration flow + +### Step 1: Creating a QR code + +To start accepting payments using UPI QR Code, a virtual account should be created with a `receiver`, which defines the payment collection method associated with it. For UPI QR Code, the receiver type is `qr_code`, which allows your customers to make payments using UPI by scanning the QR code. + +You need to create a virtual account by sending an API request to Razorpay for generating the QR code for each payment. + +/virtual_accounts + +#### Request Parameters + +`receivers` _mandatory_ +: `object` Object consisting of configured receivers types. + + `types` _mandatory_ + : `array` List of desired receiver types. + In this case, it will be `qr_code`. + + `qr_code` _mandatory_ + : `array` The payment method that should be used to make the payment. + + `card` _optional_ + : `boolean` Indicates whether card payment should be allowed with the QR Code or not. + By default, it is set to `true`. In case of UPI QR payments, set this value to `false`. + + `upi` _mandatory_ + : `boolean` Indicates whether UPI payment should be allowed with the QR Code or not. + By default, the value is set to `true`. + +`description` _optional_ +: `string` A brief description of the payment. + +`customer_id` _optional_ +: `string` Unique identifier of the customer for whom UPI QR Code is created. Know more about the [ Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + +`close_by`_optional_ +: `integer` Specifies the UNIX timestamp at which the virtual account is scheduled to be automatically closed. It should be set at least 15 minutes after the time of creation. + +`notes` _optional_ +: `object` Object consisting of key value pairs that allow you to store additional data. + Know more about[ Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). + +`amount_expected` _mandatory_ +: `integer` The maximum amount you expect to receive in this virtual account. Pass `69999` = ₹699.99 (INR is the default currency). + +```curl: Sample Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/virtual_accounts \ +-H "Content-Type: application/json" \ +-d' +{ + "customer_id": "cust_805c8oBQdBGPwS", + "description": "Test virtual account", + "receivers": { + "types": [ + "qr_code" + ], + "qr_code": { + "method": { + "card": false, + "upi": true + } + } + }, + "amount_expected": 100, + "notes": { + "purpose": "emi payment" + } +}' + +```json: Response +{ + "id": "va_E1yIDtgjgcHtxe", + "name": "acme", + "entity": "virtual_account", + "status": "active", + "description": "Test001", + "amount_expected": 100, + "notes": { + "purpose": "emi payment" + }, + "amount_paid": 0, + "customer_id": null, + "receivers": [ + { + "id": "qr_E1yIDu7viyCUFz", + "entity": "qr_code", + "reference": "E1yIDu7viyCUFz", + "short_url": "https://rzp.io/i/XNrJv6i", + "created_at": 1578484284 + } + ], + "close_by": null, + "closed_at": null, + "created_at": 1578484284 +} +``` + +#### Response Parameters + +`id` +: `string` Unique identifier of the generated QR Code. +For example, `qr_4lsdkfldlteskf` + +`entity` +: `string` Name of the entity in the response. In this case, it is `qr_code`. + +`short_url` +: `string` URL of the QR code. + A sample short URL looks like this http://rzp.io/l6MS. Clicking on the link will download the code for offline use. + +`status` +: `string` The status of the virtual account. Possible values: +-`active` +- `closed` + +`closed_at` +: `integer` Specifies the timestamp(in Unix format) at which the virtual account was closed. + +### Step 2: Verifying the Payment Status + +To know if the customer has made the payment or not, you can track the payment status either by polling the Razorpay servers or subscribing to [ specific events generated in our system](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + +#### Fetch All Virtual Accounts + +To fetch all the payments received using the QR Code, send the following API request to Razorpay: + +/virtual_accounts + +```curl: Sample Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X GET https://api.razorpay.com/v1/virtual_accounts \ + -H "Content-Type: application/json" \ +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "va_E1yX1U068dKylw", + "name": "acme", + "entity": "virtual_account", + "status": "active", + "description": "First Payment", + "amount_expected": 100, + "notes": { + "purpose": "emi payment from Gaurav" + }, + "amount_paid": 100, + "customer_id": null, + "receivers": [ + { + "id": "qr_E1yX1UMG8abT7R", + "entity": "qr_code", + "reference": "E1yX1UMG8abT7R", + "short_url": "https://rzp.io/i/hgNIkEI", + "created_at": 1578485124 + } + ], + "close_by": null, + "closed_at": null, + "created_at": 1578485124 + }, + { + "id": "va_E1yWYl9krnxANV", + "name": "acme", + "entity": "virtual_account", + "status": "active", + "description": "Second Payment", + "amount_expected": 100, + "notes": { + "purpose": "emi payment from Bhairav" + }, + "amount_paid": 0, + "customer_id": null, + "receivers": [ + { + "id": "qr_E1yWYlodgS1UH7", + "entity": "qr_code", + "reference": "E1yWYlodgS1UH7", + "short_url": "https://rzp.io/i/hooYNB7", + "created_at": 1578485098 + } + ], + "close_by": null, + "closed_at": null, + "created_at": 1578485098 + } + ] +} +``` + +#### Fetching a Virtual Account + +To fetch a specific payment, send the following request to Razorpay: + +/virtual_accounts/:id + +#### Path Parameters + +`id` _mandatory_ +: `string` Unique identifier of a specific virtual account whose details are to be retrieved. + +```curl: Sample Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X GET https://api.razorpay.com/v1/virtual_accounts/va_E1yX1U068dKylw \ + -H "Content-Type: application/json" \ +```json: Response +{ + "id": "va_E1yX1U068dKylw", + "name": "acme", + "entity": "virtual_account", + "status": "active", + "description": "First Payment", + "amount_expected": 100, + "notes": { + "purpose": "emi payment from Gaurav" + }, + "amount_paid": 100, + "customer_id": null, + "receivers": [ + { + "id": "qr_E1yX1UMG8abT7R", + "entity": "qr_code", + "reference": "E1yX1UMG8abT7R", + "short_url": "https://rzp.io/i/hgNIkEI", + "created_at": 1578485124 + } + ], + "close_by": null, + "closed_at": null, + "created_at": 1578485124 +} +``` + +#### Fetching all payments of a Virtual account + +To fetch all the payments made to a virtual account, send the following request: + +/virtual_accounts/:id/payments + +#### Path Parameters + +`id` _mandatory_ +: `string` Unique identifier of a virtual account whose payments should be retrieved. + +```curl: Sample Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X GET https://api.razorpay.com/v1/virtual_accounts/va_E1yX1U068dKylw/payments \ + -H "Content-Type: application/json" \ +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "pay_E1yZBuTpzBg1DJ", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 1, + "tax": 0, + "error_code": null, + "error_description": null, + "created_at": 1578485247 + } + ] +} +``` + +#### Closing a Virtual Account + +After you have received the payment, you may choose to close the virtual account. + +/virtual_accounts/:id/close + +#### Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the virtual account that should be closed. + +```curl: Sample Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/virtual_accounts/va_E1yX1U068dKylw/close \ + -H "Content-Type: application/json" \ +``` json: Response +{ + "id": "va_E1yX1U068dKylw", + "name": "acme", + "entity": "virtual_account", + "status": "closed", + "description": "First Payment", + "amount_expected": 100, + "notes": { + "purpose": "emi payment from Gaurav" + }, + "amount_paid": 100, + "customer_id": null, + "receivers": [ + { + "id": "qr_E1yX1UMG8abT7R", + "entity": "qr_code", + "reference": "E1yX1UMG8abT7R", + "short_url": "https://rzp.io/i/hgNIkEI", + "created_at": 1578485124 + } + ], + "close_by": null, + "closed_at": 1578485501, + "created_at": 1578485124 +} +``` diff --git a/llm-content/payments/payment-methods/upi-qr/faqs.md b/llm-content/payments/payment-methods/upi-qr/faqs.md new file mode 100644 index 00000000..02087a6d --- /dev/null +++ b/llm-content/payments/payment-methods/upi-qr/faqs.md @@ -0,0 +1,76 @@ +--- +title: FAQs - UPI QR Code +description: Frequently asked questions about UPI QR Code. +--- + +# FAQs - UPI QR Code + +## QR Creation + + +### 1. Can I create a static QR Code with the UPI QR API? + + It is not possible to create a static QR code that you can print to accept offline payments from your customers. You can create a one-time, non-reusable dynamic QR code to accept digital payments from your customers. + + + +### 2. For how long will the UPI QR Code be active? + + UPI QR code displayed will remain active as long as the virtual account is `active`. + + + +### 3. Is it possible to generate UPI QR Code from Dashboard? + + No, you cannot create UPI QR codes from the Dashboard. UPI QR codes can only be generated using APIs. + + +## Payments + + +### 1. Can customers make payments using debit or credit cards using UPI QR Code? + + No, the supported payment method is **UPI** only, and customers can make payments from any UPI app installed on their mobile devices. + + + +### 2. Can I use the same QR Code to accept payments from different customers? + + It is not possible to accept multiple payments from different customers using the same QR Code. + + + +### 3. Can a customer make multiple partial payments using the same UPI QR Code? + + A payment is marked successful only if a customer pays the expected amount in full. The customer cannot make multiple payments for the same UPI QR Code. + + + +### 4. If the customer has made the same payment twice using the UPI QR Code, what happens next? + + In case of duplicate payments, only the first successful payment is honored by Razorpay, and all the subsequent payments are refunded to the customer's account within 3-5 business days. + + +## Reconciliation + + +### 1. My customer claims to have made a payment using the QR Code. However, I am unable to view the payment on the Dashboard. What could be the reason? + + This could happen in situations where though the customer's account is debited, the transaction is still processing or yet to reach Razorpay’s partner bank account. Therefore, the payment is not created and does not reflect on the Dashboard. There are two possible cases: + - The transaction has failed, and the money will be refunded back to the customer by the customer’s bank. + + - The transaction is successful. However, our banking partner failed to send the confirmation to Razorpay. In such cases, the payment will be created and authorised within 24 hours. This is done to ensure end-to-end visibility of transactions for you and the customer. Additionally, this will enable you to take refund-related actions on your own. + + +## Post Payment Actions + + +### 1. What should I do once I receive the payment from a customer? + + You have to close the virtual account after the virtual account is credited successfully with the payment. You can either manually close the virtual account or set the time by when the virtual account should be closed. + + + +### 2. What happens to payments made to a closed virtual account? + + All the payments made to a closed virtual account are refunded to the customer's account within 4-7 business days. diff --git a/llm-content/payments/payment-methods/upi-qr/webhooks.md b/llm-content/payments/payment-methods/upi-qr/webhooks.md new file mode 100644 index 00000000..34e1b2b6 --- /dev/null +++ b/llm-content/payments/payment-methods/upi-qr/webhooks.md @@ -0,0 +1,233 @@ +--- +title: Webhook Notifications +description: Set Webhooks to get notified about the events related to virtual accounts. +--- + +# Webhook Notifications + +You can be notified of the events related to virtual accounts and payments by subscribing to the Webhooks available on the Dashboard. + +Watch this video to see how to set up a webhook. + +[Video: https://www.youtube.com/embed/Xiikw4_CcQk?si=b6kYHKIp1xikPrJZ] + +To set up webhooks: + +1. Log in to the Dashboard and navigate to **Accounts & Settings**. +2. Click **Webhooks** under **Website and app settings**. +3. Click the **+ Add New Webhook** button. + + ![Add a new webhooks button on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-1.jpg.md) +4. In the **Webhook Setup** pop-up page: + - Enter the **URL** where you want to receive the webhook payload when an event is triggered. We recommend using an HTTPS URL. + + +> **INFO** +> +> +> **Handy Tips** +> +> - You can set up to **30 URLs** to receive Webhook notifications. Webhooks can only be delivered to public URLs. +> - If your URL contains `razorpay` as a domain, you will not be able to add the URL and will receive an error. +> - If you attempt to save a localhost endpoint as part of a webhook setup, you will notice an error. Know more about [testing Webhooks on an application running on localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#application-running-on-localhost). +> + + + - Enter a **Secret** for the webhook endpoint. The secret is used to validate that the webhook is from Razorpay. Do not expose the secret publicly. Know more about [how to validate webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> - When setting up the webhook, specify a secret. Use this secret to validate that the webhook is from Razorpay. Entering the secret is optional but recommended. The secret should never be exposed publicly. +> - The webhook secret does not need to be the Razorpay API key secret. +> + + + + - In the **Alert Email** field, enter the email address to which the notifications should be sent in case of webhook failure. You will receive webhook related notifications like failures, deactivation and so on. + - Select the required events from the list of **Active Events**. + ![List of active webhook events on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-2.jpg.md) + +5. Click **Create Webhook**. After you set up a webhook, it appears on the list of webhooks. + ![List of webhooks on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhooks-list.jpg.md) +6. You can select the webhook and click **Edit** to make more changes. + +## Virtual Account Events + +In the **Active Events** section, select the following events: + +### virtual_account.created + +This event is triggered when a virtual account is created. + +```json: virtual_account.created +{ + "entity": "event", + "account_id": "acc_BTIVttuC4ACVOz", + "event": "virtual_account.created", + "contains": [ + "virtual_account" + ], + "payload": { + "virtual_account": { + "entity": { + "id": "va_Dzzpk3sCZKrcwf", + "name": "acme", + "entity": "virtual_account", + "status": "active", + "description": "Test001", + "amount_expected": null, + "notes": { + "purpose": "emi payment" + }, + "amount_paid": 0, + "customer_id": null, + "receivers": [ + { + "id": "qr_Dzzpk4GF9c87kT", + "entity": "qr_code", + "reference": "Dzzpk4GF9c87kT", + "short_url": "https://rzp.io/i/7WYVO8U", + "created_at": 1578053029 + } + ], + "close_by": null, + "closed_at": null, + "created_at": 1578053030 + } + } + }, + "created_at": 1578053030 +} +``` + +### virtual_account.credited + +This event is generated when the payment is made to a virtual account. + +```json: virtual_account.credited +{ + "entity": "event", + "account_id": "acc_BTIVttuC4ACVOz", + "event": "virtual_account.credited", + "contains": [ + "payment", + "virtual_account" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_Dzzhsw8OqB4LH3", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "l.-.l@ybl", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 1, + "tax": 0, + "error_code": null, + "error_description": null, + "acquirer_data": { + "rrn": null + }, + "created_at": 1578052582 + } + }, + "virtual_account": { + "entity": { + "id": "va_DzzhQ8z0VOy6N4", + "name": "acme", + "entity": "virtual_account", + "status": "active", + "description": "Test001", + "amount_expected": 100, + "notes": { + "purpose": "emi payment" + }, + "amount_paid": 100, + "customer_id": null, + "close_by": null, + "closed_at": null, + "created_at": 1578052556, + "receivers": [ + { + "id": "qr_DzzhQ9GuultaKH", + "entity": "qr_code", + "reference": "DzzhQ9GuultaKH", + "short_url": "https://rzp.io/i/romdKJQ", + "created_at": 1578052556 + } + ] + } + } + }, + "created_at": 1578052583 +} +``` + +### virtual_account.closed + +This event is triggered when a virtual account either expires on a date set or is manually closed by you. For example, you might want to stop accepting further payments for a virtual account. In such cases, the virtual account should be closed. + +```json: virtual_account.closed +{ + "entity": "event", + "account_id": "acc_BTIVttuC4ACVOz", + "event": "virtual_account.closed", + "contains": [ + "virtual_account" + ], + "payload": { + "virtual_account": { + "entity": { + "id": "va_DzzhQ8z0VOy6N4", + "name": "acme", + "entity": "virtual_account", + "status": "closed", + "description": "Test001", + "amount_expected": 100, + "notes": { + "purpose": "emi payment" + }, + "amount_paid": 100, + "customer_id": null, + "receivers": [ + { + "id": "qr_DzzhQ9GuultaKH", + "entity": "qr_code", + "reference": "DzzhQ9GuultaKH", + "short_url": "https://rzp.io/i/romdKJQ", + "created_at": 1578052556 + } + ], + "close_by": null, + "closed_at": 1578053294, + "created_at": 1578052556 + } + } + }, + "created_at": 1578053294 +} +``` + +### Related Information + +- [Set up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) +- [Validate Signature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md#validation) diff --git a/llm-content/payments/payment-methods/upi.md b/llm-content/payments/payment-methods/upi.md new file mode 100644 index 00000000..9641c94d --- /dev/null +++ b/llm-content/payments/payment-methods/upi.md @@ -0,0 +1,372 @@ +--- +title: Accept UPI Payments with Razorpay +heading: About UPI +description: Accept payments by enabling various UPI apps at Razorpay Checkout. Check all the supported UPI integrations. +--- + +# About UPI + +UPI checkout is a smooth payment experience for users as compared to other payment modes, thus provides higher transaction success rates for your business. + Razorpay supports multiple [third-party apps](https://www.npci.org.in/what-we-do/upi/3rd-party-apps) and has direct integration with [Google Pay.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/google-pay.md) + +Check the UPI payment flow and the various UPI integrations available with Razorpay. + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/standard-integration.md). +> + +## Special Onboarding Requirements for SEBI-Registered Intermediaries (MCC 6211) + +If your business is classified under **Merchant Category Code 6211 (Securities Brokers/Dealers)** and is a **SEBI-registered intermediary** (including Stockbrokers, Mutual Funds, PMS providers and so on), you must adhere to a special regulatory mandate for UPI collection, effective **October 1, 2025**. + +**UPI Identifier Requirements** + +- Businesses must **use a standardised UPI identifier** as mandated by SEBI for all registered intermediaries. +- The identifier must incorporate the `@validbankpsp` handle. For example, `@validhdfc` or `@validicici`. +- This specific `@validbankpsp` handle can only be allocated by a **Self-Certified Syndicate Bank (SCSB)**. +- The allocation by the SCSB must follow a prescribed validation process. + + +### List of Self-Certified Syndicate Banks Eligible to Issue UPI IDs + + 1. AU Small Finance Bank + 2. Axis Bank + 3. Bandhan Bank + 4. Bank of Baroda + 5. Bank of India + 6. Bank of Maharashtra + 7. Canara Bank + 8. Central Bank of India + 9. Citibank N.A + 10. City Union Bank + 11. DBS Bank India Limited + 12. DCB Bank + 13. Deustche Bank + 14. Dhanlaxmi Bank Limited + 15. Equitas Small Finance Bank + 16. GP Parsik Sahakari Bank Limited + 17. HDFC Bank Limited + 18. HSBC Bank + 19. ICICI Bank + 20. IDBI Bank Limited + 21. IDFC FIRST Bank + 22. Indian Bank + 23. Indian Overseas Bank + 24. IndusInd Bank + 25. Jana Small Finance Bank Limited + 26. Janata Sahakari Bank Limited + 27. Karnataka Bank Limited + 28. Karur Vysya Bank Limited + 29. Kotak Mahindra Bank + 30. Nutan Nagarik Sahakari Bank Limited + 31. Punjab & Sind Bank + 32. Punjab National Bank + 33. Rajkot Nagarik Sahakari Bank Limited + 34. RBL BANK + 35. Saraswat Co-operative Bank Limited + 36. South Indian Bank + 37. Standard Chartered Bank + 38. State Bank of India + 39. SVC Co-operative Bank Limited + 40. Tamilnad Mercantile Bank + 41. The Ahmedabad Mercantile Co-operative Bank Limited + 42. The Catholic Syrian Bank Limited + 43. The Federal Bank Limited + 44. The Jammu & Kashmir Bank Ltd + 45. The Kalupur Commercial Co-operative Bank Limited + 46. The Mehsana Urban Co-operative Bank Limited + 47. The Surat People's Co-op Bank Limited + 48. TJSB Sahakari Bank Limited + 49. UCO Bank + 50. Union Bank of India + 51. Utkarsh Small Finance Bank Limited + 52. Yes Bank + + +### Get Standardised UPI Address + +Follow the steps to successfully create your new UPI id. + + +### Step 1: Request Your `@valid` UPI ID (Mandatory Action on SI Portal) + + The standard Razorpay terminal request is **not supported**. All `@valid` UPI IDs must be requested and approved through the **SEBI Intermediary Portal (SI Portal)**. + + 1. Log in to the [SEBI Intermediary Portal](https://siportal.sebi.gov.in/intermediary/index.html) using your credentials. + 2. From the dropdown menu, navigate to: **Entity Category → @valid UPI ID Request → UPI Request Portal**. + 3. Click **Request New UPI IDs** or **View All Requests**. + 4. Click **Add new UPI ID**. + + Please determine your settlement model and bank account as a next step, before you continue to fill the form. + + + +### Step 2: Determine Your Settlement Model and Bank Account + + Your VPA creation and required bank accounts depend on how the funds are settled. You must create separate VPAs for **One-Time** and **Autopay** transactions, using **RZP1** and **RZP2** respectively. + + + + Model I: Settlement to the Intermediary (Broking, AMC, PMS) + + Funds settle directly into your entity's bank account. + + **Requirement**: You must use your own bank account that resides within the chosen PSP Bank. If you choose `@validhdfc`, you must use an **HDFC Bank account**. If you do not have an account, you must open one. + + **VPA Format Examples**: + + - **One-Time**: `mfhouse.rzp1.mf@validhdfc` + - **Autopay**: `mfhouse.rzp2.mf@validhdfc` + + + +### Model II: Settlement to the Clearing Corporation (Broking for Mutual Funds/Bonds) + + Funds settle into the bank account of a Clearing Corporation (**ICCL / NCL**). + + **Requirement**: You must use the specific Bank Account Number and IFSC provided by Razorpay that corresponds to the respective Clearing Corporation (ICCL or NCL) and PSP Bank (**ICICI/Axis/HDFC**). + + **VPA Format Examples**: + + - **MF Broker (ICCL)**: `mfbroker.icclrzp1.brk@validhdfc` + - **Bond Broker (NCL)**: `bondsbroker.nsecbricsrzp1.brk@validhdfc` + + + + + + +### Step 3: Fill Form to Request Your `@valid` UPI ID on SI Portal + + 5. Under **Entity Information**, enter the following details: + - Entity Name + - Registration Number + - PAN + - Category Code + 6. Under **Legal Account Holder Name**, enter the following details: + - Legal Account Holder Name + - Legal Account Holder PAN + - Set up different legal account holder based on your model: + + + + For Model I users: + + If the funds are intended to settle directly into your own SEBI-registered entity's bank account (applicable for most Brokers, AMCs and PMS providers): + + 1. Set **Different Legal Account Holder?** to **No**. The system will automatically use your **Entity's Name** as the Legal Account Holder. + 2. Proceed to enter your entity's bank account details (which must be with the chosen PSP Bank). + + + +### For Model II users: + + If the funds are intended to settle into the bank account of a Clearing Corporation (applicable for intermediaries facilitating transactions settled via an exchange, such as Broking for Mutual Funds or Bonds): + + 3. Set **Different Legal Account Holder?** to **Yes**. + 4. Select **Clearing Corporation**, under **Legal Account Holder Role***. + 5. Select **NSE Clearing Limited** or **Indian Clearing Corporation Limited** (as applicable), under **Legal Account Holder Name***. + + + + + 7. To use a registered Trade Name, set **Use Trade Name as Username:** to **Yes** and provide the **Trademark Registration Number**. + + The default username is based on your **Legal Entity Name**. + + 8. Under the **UPI Handle Request** section, fill up the below **Beneficiary Information**: + - Account Number + - IFSC Code + - Select the "**I confirm that Account Number: `123456789101112` and IFSC: `BANK123456` belongs to Gaurav (PAN: `ABCD123456`)**" checkbox. + + +> **INFO** +> +> +> **Handy Tips** +> +> This account must correspond to the chosen **PSP Bank (Model I)** or the respective **Clearing Corporation (Model II)**. +> + + 9. Enter a **Username**. The system auto-generates a unique UPI Username based on your entity information. + + If the default name is not descriptive enough, click **Generate Longer** to add more words from your Entity Name. Click **Reset** to revert to the original system-generated name. + + 10. Add an **Optional Parameter**. Click **Enable** to add this field. This parameter is **mandatory** to ensure the VPA can be successfully mapped to your Razorpay account. + + The primary purpose of this identifier is to allow you to create multiple unique VPAs using the same base username and PSP handle. + + - **First VPA Request**: Use `RZP1` + - **Second VPA Request**: Use `RZP2` + - **Subsequent VPAs**: Use sequential identifiers as needed (for example, `RZP3`, `RZP4` and so on). + + Each UPI id you request must have a unique optional parameter for sequencing. + + **Example VPA Structure**: `[yourname].rzp1.[suffix]@valid[bank]` + + 11. The **Payment Service Provider (PSP)** section determines which bank's `@valid` handle will be used in your UPI id (for example, `@validhdfc`). + + - The system automatically selects the bank that holds the **Beneficiary Bank Account** you provided (based on the IFSC). The dropdown will then only display the corresponding `@valid` handles from that bank. + - To use a PSP different from your bank account's bank, set **Do you wish to use beneficiary's bank as PSP?** option to **No**. + - Then, select the desired **Bank Name** from the new options and choose the suitable `@valid` **UPI Handle**. + + +> **INFO** +> +> +> **Handy Tips** +> +> If your preferred PSP is not listed, you must check with your bank as this indicates a configuration issue or restriction. +> + + + 12. Click **Add Record**. A record of your UPI handle request will be created. + 13. To submit your UPI handle request, go to **View All Requests** → click **Submit UPI Handle Request**. + + Once submitted, the request goes to the selected **Self-Certified Syndicate Bank (PSP)** for due diligence and document verification before approving the UPI id on the SI Portal. + + + + +### Step 4: Final Submission to Razorpay for Mapping + + After the bank confirms the UPI id allocation, you must share the final, approved VPA details with the [Razorpay support team](https://razorpay.com/support/) to link it to your Payment Gateway MIDs. + + 14. **Share the approved VPA(s)**, corresponding Bank Account, IFSC, Account Holder Name and the Razorpay Merchant IDs (MIDs) that need to be mapped. + 15. **Submit bank-specific documents** (as part of the bank's due diligence): + + + **PSP Bank** | **Required Documentation** + --- + **Axis Bank** | Only the VPA details are required. Razorpay will reach out if the bank needs additional documentation. + --- + **HDFC Bank** | **Mandatory:** You must provide a screenshot of the SEBI Portal landing page, clearly displaying the approved Bank A/c, IFSC, UPI ID and UTN No. + --- + **ICICI Bank** | You are required to complete and share the following directly with ICICI Bank: - Parent MID Sheet + - UPI Merchant Onboarding Form + - Corporate API Suite (CAS) + - Technical Details to Include in Forms: Port, IP, URL + You are required to complete and share the **Parent MID Sheet** and the **UPI Merchant Onboarding Form** directly with ICICI Bank. + + + 16. **Wait for Review:** Our Operations Team will manually review your request, validate your SEBI registration and coordinate with the necessary banking partners for handle allocation. + + This manual process typically takes **5 to 7 business days** to complete. + + +## UPI Payment Flow + +Given below is the payment flow for UPI: + +![Payment Flow for UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-flow-upi_collect.jpg.md) + +## Collect Flow + +The Collect Flow works like this: +1. Customers enter their VPAs or mobile number linked to their UPI in the Checkout. +2. Open the respective UPI apps and complete the payment after 2-factor authentication (UPI PIN and MPIN are entered) on their mobile devices. +3. Customers are redirected to your website or app after successful payment. Watch the video to see how UPI collect flow works. + +![Pay via UPI mobile number](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-collect.gif.md) + +The customers must accept the request they receive on their UPI app to make the payment successfully. + + +### Supported Platforms, UPI Apps and Availability + + + **Supported Platforms** | **Supported UPI Apps** | **Availability** + --- + - Web +- Mobile web +- Android + | [All](https://www.npci.org.in/what-we-do/upi/3rd-party-apps) | Available by default + + + +## Intent flow + +After customers select the UPI payment app on the Checkout, the app is launched automatically on their mobile devices. Customers need not enter VPA or phone number as these details are prefilled and submitted along with the other payment details. + +![UPI Checkout with Intent Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-pm-upi-intent-android.gif.md) + + +### Supported Platforms, UPI Apps and Availability + + + + + **Supported Platforms** | **Supported UPI Apps** | **Availability** + --- + - Mobile web +- Android +- iOS + | - PhonePe and GooglePay for Mobile-web on Google Chrome only +- Paytm, PhonePe and GooglePay for Android and iOS + | Available by default + + + +## Omnichannel + +This is an intent flow wherein customers enter their mobile numbers instead of VPAs in the UPI app. The payments are completed after 2-factor authentication (UPIN and MPIN are entered). + + +### Supported Platforms, UPI Apps and Availability + + + + **Supported Platforms** | **Supported UPI Apps** | **Availability** + --- + + Android only | Only for Google Pay | Requires Approval (Reach out to support) and [**Integration**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/google-pay/omnichannel.md) + + + + + +## Google Pay SDK + +This is an intent flow wherein the customer can complete the payment within your app itself without being redirected to the UPI app on the mobile device. This is particularly useful when you want the customer to experience a seamless payment experience while safeguarding your brand identity. + + +### Supported Platforms, UPI Apps and Availability + + + + **Supported Platforms** | **Supported UPI Apps** | **Availability** + --- + + Android only | Only for Google Pay | Requires [Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/google-pay/custom-integration.md#intent-based-integration-using-google-pay-sdk) + + + + + +> **INFO** +> +> +> **Third Party Validation** +> +> If your business model requires the customers to make transactions **only** from the bank account that was submitted to your business at the time of registration then know more about [Third-Party Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation.md). Check the [list of banks that support TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/bank-list.md). +> + +### Related Information + +- [UPI Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/upi.md) +- [UPI Transaction Limits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/transaction-limits/upi.md) diff --git a/llm-content/payments/payment-methods/upi/cc-on-upi.md b/llm-content/payments/payment-methods/upi/cc-on-upi.md new file mode 100644 index 00000000..5bf63845 --- /dev/null +++ b/llm-content/payments/payment-methods/upi/cc-on-upi.md @@ -0,0 +1,210 @@ +--- +title: RuPay Credit Card on UPI +description: Offer RuPay Credit Cards on UPI as a payment method to your customers. +--- + +# RuPay Credit Card on UPI + +Leverage the full potential of UPI Payments by integrating RuPay Credit Cards. + +Watch this video to know more about RuPay credit card on UPI. + +[Video: https://www.youtube.com/embed/8_N9o7291k4] + +### Advantages + + + - More touch points to make payments via their RuPay credit cards. + - Easy to make credit card payments without the need to enter the card details and OTP for every transaction. + - Carry out all RuPay credit card and bank account transactions without the need to carry a wallet. + + + - Reduce costs associated with maintaining a POS device by efficiently managing RuPay credit card payment. + - Increase in average spends per customer on UPI as customers tend to spend higher with credit cards. + - Enhance the payment experience for customers, ensuring a smoother process. + + +## Customer Fee Bearer + +Customer Fee Bearer (CFB) on Credit Card on UPI is a payment feature that allows you to pass on processing fees to customers when they make UPI payments using their linked credit cards. This feature enables you to maintain your profit margins while offering customers the convenience of using credit cards through UPI for everyday transactions. The checkout will: + +- Automatically detect when a customer selects UPI as the payment method. +- Display fee breakdown transparently before payment, showing the convenience fee separately from the order amount. +- Process payment seamlessly after customer confirmation. + +> **INFO** +> +> +> **Feature Enablement** +> +> This is an on-demand feature. Contact your account manager or raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature enabled. +> + + +### Advantages + + - **Cost Optimisation**: Pass processing fees directly to customers, protecting your margins while accepting premium payment methods. + - **Expanded Customer Base**: Tap into the growing UPI credit card user segment who prefer credit over debit for rewards and cash flow benefits. + - **Seamless Experience**: Customers enjoy the familiar UPI interface while accessing their credit lines. + - **Higher Transaction Values**: Credit card users typically have higher spending capacity compared to debit card users. + + +### Prerequisites + +- This feature is available on the Axis Switch gateway only. +- Integrate with [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md#integrate-payment-gateway-web-mobile-ecommerce-plugins). +- This feature is **not** available on UPI Collect method (NPCI restriction). +- Certain business categories are restricted as per NPCI guidelines. The following MCC codes cannot accept credit card payments on UPI: + + +### Restricted MCC codes + + + MCC Code | Category + --- + 6012 | Lending, NBFC, Cooperatives, Pension Fund + --- + 4829 | Wire Transfers and Money Orders + --- + 7322 | Debt Collection Agencies + --- + 6010 | Forex + --- + 6011 | ATMs + --- + 6051 | Cryptocurrency + --- + 6211 | Mutual Fund, Securities, Commodities, Trading + --- + 7800 | Lottery + --- + 7802 | Horse or Dog Racing + --- + 7995 | Lottery and Betting + + + +## Frequently Asked Questions (FAQs) + + +### 1. How can my customers link their RuPay Credit Cards to UPI? + + Linking a RuPay credit card to the UPI is similar to linking a savings bank account or debit card to UPI. + + To link a RuPay credit card to UPI, customers need to: + 1. Head over to the PSP app (BHIM, PhonePe, Paytm) on their smartphone. + 2. Tap the **Add credit card** option and select the bank that has issued the RuPay credit card. + 3. Enter the last six digits and validity details of their RuPay credit card. + 4. To verify, they need to enter the OTP received via SMS on the registered mobile number. Once the verification is complete, they can set up the PIN. + + Their registration of RuPay credit cards on UPI will then be complete. + + + +### 2. How will the customers make a UPI payment with RuPay Credit cards? + + To make a payment using RuPay credit card on UPI, the user must follow these steps: + 1. Select RuPay credit card as the payment option during the UPI payment process. + 2. Enter the UPI PIN set during the earlier process of linking the RuPay credit card. + + +> **WARN** +> +> +> **Watch Out!** +> +> To ensure a successful transaction, it is essential that the mobile number linked to the customer's UPI account is active on their smartphone and matches the mobile number linked to the credit card issued by their bank. +> + + + + + + +### 3. How can I identify UPI payments made using RuPay credit cards? + + You can retrieve the details of the account type (bank account or credit card) used for UPI payments through the Payment Webhook, Fetch Payment API, and the Dashboard. + + 1. **Payment Webhook**: The payment entity will now include the payer account type details. Refer to the [Payment Authorized Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payment-authorized). + 2. **Fetch Payment API**: The payment entity will now include the payer account type details. Refer to the [Fetch API sample code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#expanded-upi). + 1. Click on a UPI payment to look at the details of the payment. + 2. The payment drawer will display the following information for Credit Card payments on UPI: + 1. Payment Method: UPI + 2. Payer Account Type: Credit card + ![Image shows Credit Card payment via UPI on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cc-upi-dashboard.jpg.md) + + + + +### 4. What is the coverage of Credit Card acceptance via UPI? + + The following UPI apps support linking of RuPay credit cards to UPI: + - BHIM + - PhonePe + - Paytm + + In terms of bank coverage, RuPay card holders from the following issuing banks can link their credit cards to the UPI apps to make payments via RuPay credit cards on UPI: + - Axis Bank + - Bank of Baroda + - Canara Bank + - HDFC Bank + - Indian Bank + - Kotak Mahindra Bank + - Punjab National Bank + - Union Bank + + + +### 5. How do I enable Credit Card transactions via UPI for my business? + + Razorpay will take care of enabling this feature for you. + + + +### 6. Will I be charged for Credit Cards transactions via UPI? + + We charge a small fee for all credit card transactions via UPI. Refer to our [pricing policy](https://razorpay.com/pricing/). + + + + +### 7. Which businesses are currently not supported from accepting credit card payments on UPI? + + You will not be able to accept credit card payments on UPI if you fall under the following category: + 1. **Businesses on Customer fee bearer** + 2. **Restricted MCC codes** - NPCI will not support credit card payments on the following MCC codes. Businesses with these MCC codes will not be able to accept credit card payments on UPI. + + + MCC | Category + --- + 6010 | Financial institutions manual cash disbursements + --- + 6012 | Financial institutions merchandise and services + --- + 6013 | Cash Withdrawal ICCW + --- + 7407 | P2PM CHANGES + --- + 7408 | Lending Platform + --- + 7409 | Digital account openings + --- + 6011 | Financial institutions automated cash disbursements + --- + 6051 | Non-financial institutions foreign currency, money orders(not wire transfer), scrip and travellers checks + --- + 6211 | Securities brokers and dealers + --- + 7322 | Debt collection agencies + --- + 7800 | Government-Owned Lotteries + --- + 7801 | Government-Licensed On-Line Casinos (On-LineGambling) + --- + 7995 | Betting, including lottery tickets, casino gaming chips, off-track betting and wagers at race tracks + --- + 7802 | Government-Licensed Horse/Dog Racing + --- + 9406 | Government-Owned Lotteries (Specific Countries) + --- + 4829 | Wire transfers and money orders diff --git a/llm-content/payments/payment-methods/upi/faqs.md b/llm-content/payments/payment-methods/upi/faqs.md new file mode 100644 index 00000000..83fb6590 --- /dev/null +++ b/llm-content/payments/payment-methods/upi/faqs.md @@ -0,0 +1,116 @@ +--- +title: UPI Payment Methods | UPI - FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about UPI as a payment method at Razorpay Checkout. +--- + +# Frequently Asked Questions (FAQs) + +## UPI Collect Flow (Deprecated) + + +### 1. Why is UPI Collect being discontinued? + + The National Payments Corporation of India (NPCI) is sunsetting the UPI Collect flow to align with the latest ecosystem compliance standards and enhance transaction security. By supporting only UPI Intent flows (automatic app redirection on mobile) and Dynamic QR (on desktop), the ecosystem aims to reduce manual entry errors and curb fraudulent `pull` requests, leading to higher success rates for businesses. + + + +### 2. From when will UPI Collect stop working? + + NPCI is sunsetting UPI Collect across all devices and operating systems effective 28 February 2026. Razorpay is rolling out this transition in phases to ensure all businesses are compliant before the final deadline. + + + +### 3. Will this impact Standard, Custom and S2S Checkout? + + Yes, this change impacts all Razorpay integrations: + + - **Standard Checkout**: Razorpay will automatically handle the transition by removing the UPI Collect option and enabling Intent/QR flows for one-time and recurring payments. + - **Custom/S2S Checkout**: You must take manual action to remove the UPI Collect option from your UI and backend and ensure you have enabled UPI Intent or QR codes. + + Check deprecation and migration guides below: + - [Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/standard-integration.md). + - [Custom Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md) + - [S2S Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/s2s-integration.md) + + + +### 4. Is UPI Autopay affected by this change? + + Yes, but only for new mandate registrations. New registrations via the Collect flow will no longer be supported. Migrate to UPI Intent (for mobile) and Dynamic QR (for desktop) for setting up new mandates. + + Automatic debits for already registered mandates on the UPI Collect flow will continue to be supported. No changes are required for existing mandates. + + + + +### 5. What happens if I do not migrate before the deadline? + + Transactions initiated via the deprecated UPI Collect flow after the deadline may fail or be declined. If you have not enabled UPI Intent flows on your checkout, this could result in lost revenue. We recommend migrating as soon as possible. + + + +### 6. Will there be downtime during migration? + + No downtime is expected during this migration. The transition is being conducted in phases and we will keep you informed ahead of the sunset timelines. + + If you are using Custom/S2S checkout, ensure UPI Intent and QR payment modes are live on your checkout before removing the UPI Collect option to ensure a seamless experience for your customers. + + + +### 7. Who can I contact for migration support? + + - **Managed Accounts**: Contact your Razorpay Account Manager for dedicated assistance. + - **Self-Serve Accounts**: Raise a support ticket via your [Razorpay Dashboard](https://dashboard.razorpay.com) or email [support@razorpay.com](mailto:support@razorpay.com). + + + +### 8. My UPI payments stopped working after UPI Collect was disabled. What should I do? + + If UPI Collect was disabled on your account and you have not enabled UPI Intent or QR code, your checkout may break and prevent customers from completing UPI payments. + + + + - UPI Intent (mobile/mobile web) and UPI QR code (desktop) are automatically enabled on your checkout + - If you were not using these flows previously, you may need to configure them. + - Refer to the [Standard Checkout migration guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/standard-integration.md) for more information. + + + - You must manually integrate UPI Intent and QR code. + - Refer to the migration guides: + - [Custom integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md). + - [S2S integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/s2s-integration.md). + + + + **To prevent this issue:** + - Ensure UPI Intent and QR code are enabled and working on your checkout **before** UPI Collect is disabled. + - Test the new flows thoroughly. + - For Standard Checkout, verify that Intent/QR modes are active on your account even if you were not using them before. + + +## Common + + + +### 1. I am seeing an error while enabling UPI as payment method. How to resolve? + + If you are facing error while enabling UPI as payment method: + + - You might have made a request using a non-owner role. Please log in as an owner and try again. See [ Manage Team](https://razorpay.com/docs/payments/dashboard/account-settings/manage-team/). + - If the issue persists, clear your cookies and retry. + + If you still receive an error, reach out to your dedicated support HDFC Relationship Managerthe [Razorpay Support team](https://razorpay.com/support/). + + + +### 2. How can I enable UPI apps for my account? + + Navigate to **Account & Settings → Payment Methods** and check if UPI apps are reflecting along with other payment methods. If it is not enabled, you can reach out to the [Razorpay Support team](https://razorpay.com/support/) to get it enabled. + See [ UPI Payment Methods](https://razorpay.com/docs/payments/payment-methods/upi/). + + + +### 3. Which UPI apps does Razorpay support? + + Here is the [list of supported UPI apps](https://razorpay.com/docs/payments/payment-methods/upi/supported-apps/). diff --git a/llm-content/payments/payment-methods/upi/google-pay.md b/llm-content/payments/payment-methods/upi/google-pay.md new file mode 100644 index 00000000..01a0c9a6 --- /dev/null +++ b/llm-content/payments/payment-methods/upi/google-pay.md @@ -0,0 +1,154 @@ +--- +title: Google Pay +description: Use Google Pay at the Razorpay Standard or Custom Checkout page. +--- + +# Google Pay + +Your customers can make payments using Google Pay™ at the Razorpay checkout. You can integrate and show Google Pay on any of the following platforms: Desktop Browser, Mobile Web (M-Web) and Android App. + +## Integration on Standard Checkout - Web and Android + +If you are using Razorpay's Standard Checkout, you do not need to make any change to integrate Google Pay on your checkout page. Razorpay will display Google Pay as an option under the **UPI** section on the checkout page. + +![](/docs/assets/images/upi-checkout-header-changes.jpg) + +### Web + + + + On your website, all Google Pay requests are Collect requests. + + 1. The customer selects the Google Pay option, enters their UPI handle and clicks **Pay**. + 2. A request is sent to the Google Pay app installed on their mobile device. + 3. The customer manually opens the Google Pay app and approves the request. + + + + Customers can make intent-based payments using Google Pay on mobile-web applications. The customer is redirected to Google Pay’s application, installed on their mobile devices, to complete the payment. + + +> **WARN** +> +> +> **Watch Out!** +> +> This feature is only available for web pages running on HTTPS on Google Chrome for Android (v56 and above) and not on Google Chrome web views. +> + + + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + + + +### Android + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/standard-integration.md). +> + + + + When using the Standard Checkout, Google Pay is shown inside the payment method **UPI**. The customer selects Google Pay from the list of apps and click **Pay**. Customers are then redirected to the Google Pay application, provided it is installed on the mobile device they are using to access checkout, where they can make the payment. + + + + You also have the option to integrate Google Pay with the Standard Checkout on your Android app using Google's SDK. This lets you open Google Pay within your application for customers to make the payment without any redirection, enhancing the user experience. + + #### Prerequisites + + 1. [Sign up](https://support.google.com/pay/business/answer/7684271?hl=en&ref_topic=7684388) for a business account with Google Pay. + 1. and have them **whitelist your UPI ID/VPA**. + 1. Verify your UPI ID/VPA details on the [Google Merchant Console](https://support.google.com/pay/business/answer/7684398?hl=en&ref_topic=7684388). Google deposits a small amount into the bank account linked to your VPA (UPI ID). + 1. You should have already integrated [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + 1. [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. + + To integrate Google Pay with the Checkout on your Android app using Google's SDK: + +1. Download the [Google Pay SDK](https://rzp-1415-prod-mobile.s3.amazonaws.com/android/googlepay-sdk/google-pay-client-api-1.0.0.aar) and add the `.aar` files to the application library. + +> **INFO** +> +> +> **Handy Tips** +> +> The Razorpay-Google Pay SDK acts as a wrapper over the native Google-SDK. This SDK connects Razorpay's SDK with the Google SDK. You need all the 3 SDKs (listed below) for the flow to work. +> - Razorpay Android SDK +> - Google Pay SDK +> - Razorpay-Google Pay SDK +> + +1. Add the following lines of code to the `build.gradle` file of your application: + + ```java: build.gradle + dependencies { + implementation(name: 'razorpay-googlepay-1.3.0', ext: 'aar') + implementation(name:'google-pay-client-api-1.0.0 ', ext:'aar') + implementation 'com.android.support:customtabs:26.1.0' + implementation 'com.google.android.gms:play-services-tasks:15.0.1 + } + ``` + +This adds the dependencies for the SDK and creates a Google Pay UPI payment method on your Checkout form. + + + + This is same as [UPI Collect Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods.md#collect-flow). + + The customers enter their UPI handle in the **Enter your UPI ID** section at Checkout and click **Pay**. Collect the customer's UPI handle and pass it in the payment request with method as `upi`. + + Razorpay then triggers a Collect request. The Collection request is sent to the customer's Google Pay application where they can make the payment. + + + **NPCI Restrictions for UPI Collect Flow** + + - UPI Collect Flow is not available for these MCCs. You can use [UPI Intent Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md) as an alternative. + - 5816 + - 6540 + - 4812 + - 4814 + - 5413 + - 7408 + - 6513 + - 7995 + - 5412 + - 5413 + + + +## Integration on Custom Checkout + +To enable Google Pay on your custom checkout: + +1. Show Google Pay as a separate Option. +1. Trigger payment when a user clicks Google Pay on your checkout. + +Know more about [Google Pay Custom Checkout Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/google-pay/custom-integration.md). diff --git a/llm-content/payments/payment-methods/upi/google-pay/custom-integration.md b/llm-content/payments/payment-methods/upi/google-pay/custom-integration.md new file mode 100644 index 00000000..8642c3ac --- /dev/null +++ b/llm-content/payments/payment-methods/upi/google-pay/custom-integration.md @@ -0,0 +1,254 @@ +--- +title: Google Pay Integration - Custom Checkout +description: Integrate Google Pay at Razorpay's Custom Checkout page for desktop, mobile-web (M-Web) and Android apps. +--- + +# Google Pay Integration - Custom Checkout + +To enable Google Pay at your Custom Checkout: + +1. Show Google Pay as a separate option. +2. Trigger payment when the user clicks Google Pay at your checkout. + +Google Pay, [previously Google Tez](https://pay.google.com/intl/en_in/about/), can be integrated using two types of UPI flows: + +- **Collect Request Flow**: This flow is available on desktop and mobile browsers. The customers enter their Google Pay VPA on the checkout form. Upon triggering a payment request via Razorpay’s `upi` method, the Collect request reaches the customer’s Google Pay application. The customer then completes the payment. + +- **Intent-based Payment**: This flow is applicable only to mobile and mobile-web payments. In these cases, the customer is redirected to Google Pay’s application to complete the payment. Intent-based payments are available on the Android SDK and on Google Chrome for Android (v56 and above, but not on Google Chrome WebViews). + +## Prerequisites + +1. [Sign up](https://support.google.com/pay/business/answer/7684271?hl=en&ref_topic=7684388) for a business account with Google Pay. +1. [Contact our Support Team](https://razorpay.com/support/#request) and have them whitelist your VPA (UPI ID). +1. Verify your VPA (UPI ID) details on the [Google Merchant Console](https://support.google.com/pay/business/answer/7684398?hl=en&ref_topic=7684388). Google deposits a small amount into the bank account linked to your VPA (UPI ID). +1. You should have already integrated one of the following: + - [Razorpay Web Integration - Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). + - [Razorpay Android Integration - Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom.md). +1. [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + +### General Branding Guidelines + +Refer to [Google's Branding Guidelines](https://developers.google.com/pay/api/web/guides/brand-guidelines) to learn about the general branding guidelines for Google Pay on the front-end of your websites and apps. + +## Desktop Integration + +On desktop browsers, the Collect request flow works the same way as [Razorpay's UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#upi). + +1. Collect the customer's VPA and pass it in the payment request with method as `upi`. +2. Razorpay then triggers a Collect request. The collection request is sent to the customer's Google Pay application where they can make the payment. + +## Mobile-Web Integration (Google Chrome) + +> **INFO** +> +> +> **Handy Tips** +> +> As the APIs exposed by Google Pay are available only in Chrome's JavaScript engine, you will need to use our JavaScript-based integration. +> + +> **WARN** +> +> +> **Watch Out!** +> +> This feature is only available for webpages running on HTTPS. +> + +On mobile-web, for intent-based payments, the flow should be as follows: + +1. Check if Google Pay is installed on the user’s device. If installed, show the necessary UI elements. +1. Once the user chooses to pay using Google Pay, you can initiate an intent-based payment from your checkout. +1. Google Chrome will request the user to make a payment using Google Pay. + +![](/docs/assets/images/gpay-mweb-customui.jpg) + +### Detect Google Pay Installation on Device + +1. Add Razorpay.js to your website + + ```html + + ``` + + Know more about [Custom Web Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md). + +1. Instantiate Razorpay + + ```js + var razorpay = new Razorpay({ key: '' }); + ``` + +1. Detect if Google Pay on available on the device + + ```js + razorpay.checkPaymentAdapter('gpay') + .then(() => { + // Google Pay is available, show the payment option + }) + .catch(() => { + // Google Pay is unavailable + }); + ``` + +### Initiate Payment Using Google Pay + +1. Create a payment through Google Pay. Skip passing the `vpa` field in the payment data and pass `{ gpay: true }` as the second argument to `createPayment`. + + ```js + var paymentData = { + amount: 100000, //pass in paise (amount: 100000 equals ₹1000) + method: 'upi', + contact: '9000090000', // customer's mobile number + email: 'gaurav.kumar@example.com', //customer's email address + order_id: 'order_00000000000001'//.. and other payment parameters, as usual + }; + razorpay.createPayment(paymentData, { gpay: true }); + .on('payment.success', function(response) { + // response.razorpay_payment_id + // response.razorpay_order_id + }) + .on('payment.error', function(error) { + // display error to customer + }) + ``` + +Refer to the [Success/Error Callbacks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md#14-store-fields-in-your-server) section for more details. + +## Android Integration + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#intent-flow). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md). +> + +### Intent-Based Integration + +On Android, for intent-based payments, first you need to check if Google Pay is installed on the user’s device. You can use the `razorpay.getAppsWhichSupportUpi` method to retrieve the list of apps that support intent-based payments installed on a phone. + +When a user selects Google Pay as the payment method, you need to submit the Google Pay's package name along with other checkout options to the Razorpay function `razorpay.submit`: + +```java +try +{ + JSONObject data = new JSONObject(); + data.put("amount", 100000); //pass in paise (amount: 100000 equals ₹1000) + data.put("email", "gaurav.kumar@example.com"); //customer's email address + data.put("contact", "9876543210"); //customer's mobile number + data.put("order_id", "order_00000000000001"); //Razorpay Order id + JSONObject notes = new JSONObject(); + notes.put("custom_field", "Make it so."); //notes for the payment, if any + data.put("notes", notes); + + data.put("method", "upi"); //Method specific fields + data.put("_[flow]", "intent"); + data.put("upi_app_package_name", "com.google.android.apps.nbu.paisa.user"); + razorpay.submit(data, new PaymentResultWithDataListener() + + { + @Override + public void onPaymentSuccess(String razorpayPaymentId, PaymentData data) + { + // Razorpay payment ID, Razorpay order ID and Razorpay Signature is passed here after a successful payment + // You will need the payment ID to capture the payment on your end + } + + @Override + public void onPaymentError(int code, String description) + { + // Error code and description is passed here + } + }); +} +catch (Exception e) +{ + Log.e(TAG, "Error in submitting payment details", e); +} +``` + +Additionally, if you want to open Google Pay within your application for customers to make the payment without any redirection, you can do so by integrating with [Google Pay SDK](#intent-based-integration-using-google-pay-sdk). + +#### Intent-Based Integration Using Google Pay SDK + +You also have the option to integrate Google Pay with the Custom Checkout on your Android app using Google's SDK. + +This offers the advantage of letting you open Google Pay within your application for customers to make the payment without any redirection, improving the user experience. + +### Collect-Based Integration + +This is the same as the existing [UPI Collect Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods.md#collect-flow). + +1. Collect the customer's VPA and pass it in the payment request, with method as `upi`. +2. Razorpay then triggers a collect request. The collection request is sent to the customer's Google Pay application, where they can make the payment. + +**NPCI Restrictions for UPI Collect Flow** + +As per NPCI guidelines, the following MCC codes are restricted and cannot accept UPI Collect payments: + + +### Restricted MCC Codes + + + MCC Code | Category + --- + 5816 | Digital Goods: Games + --- + 6540 | POI Funding Transactions (excluding MoneySend) + --- + 4812 | Telecommunication Equipment and Telephone Sales + --- + 4814 | Telecommunication Services + --- + 7408 | Lending Platform + --- + 6513 | Real Estate Agents and Managers - Rentals + --- + 7995 | Betting/Lottery + --- + 5412 | Grocery Stores, Supermarkets + --- + 5413 | Grocery Stores, Supermarkets + + + +To integrate Google Pay with the Checkout on your Android app using Google's SDK: + +1. Download the [Google Pay SDK](https://rzp-1415-prod-mobile.s3.amazonaws.com/android/googlepay-sdk/google-pay-client-api-1.0.0.aar) and add the `.aar` files to the application library. + +> **INFO** +> +> +> **Handy Tips** +> +> The Razorpay-Google Pay SDK acts as a wrapper over the native Google-SDK. This SDK connects Razorpay's SDK with the Google SDK. You need all the 3 SDKs (listed below) for the flow to work. +> - Razorpay Android SDK +> - Google Pay SDK +> - Razorpay-Google Pay SDK +> + +1. Add the following lines of code to the `build.gradle` file of your application: + + ```java: build.gradle + dependencies { + implementation(name: 'razorpay-googlepay-1.3.0', ext: 'aar') + implementation(name:'google-pay-client-api-1.0.0 ', ext:'aar') + implementation 'com.android.support:customtabs:26.1.0' + implementation 'com.google.android.gms:play-services-tasks:15.0.1 + } + ``` + +This adds the dependencies for the SDK and creates a Google Pay UPI payment method on your Checkout form. diff --git a/llm-content/payments/payment-methods/upi/google-pay/omnichannel.md b/llm-content/payments/payment-methods/upi/google-pay/omnichannel.md new file mode 100644 index 00000000..1360cc87 --- /dev/null +++ b/llm-content/payments/payment-methods/upi/google-pay/omnichannel.md @@ -0,0 +1,48 @@ +--- +title: Google Pay Omnichannel Checkout +description: Let your customers make payments using Google Pay on their mobile devices without entering VPA. +--- + +# Google Pay Omnichannel Checkout + +Use Google Pay Omnichannel to initiate a payment using the customer's phone number. +- The customers receive a Google Pay request on their registered mobile devices, and complete the payment using the Google Pay app installed on their devices. +- This reduces the overhead of entering the VPA, leading to better success rates for your UPI transactions. + +## Workflow + +Request and accept payments from your customers using Omnichannel with the following steps: + +1. The customer selects **Google Pay** as the payment method to make the payment for the transaction. +2. The GooglePay app opens on the mobile device. The customer can complete the payment. + + ![Payment on Google Pay App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-gpay-omnichannel-2-new.jpg.md) + +## Integration on Standard Checkout + +Use Google Omnichannel at your Checkout to send a payment request to the customers directly on the Google Pay app. + +![Google Omnichannel Checkout Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/omnichannel-checkout-header-changes-2.jpg.md) + + to get this feature activated on your Razorpay account. + +### Prerequisites + +1. [Sign up](https://support.google.com/pay/business/answer/7684271?hl=en&ref_topic=7684388) for a business account with Google Pay. +1. and have them whitelist your UPI ID/VPA. +1. Verify your UPI ID/VPA details on the[ Google Merchant Console](https://support.google.com/pay/business/answer/7684398?hl=en&ref_topic=7684388). Google deposits a small amount into the bank account linked to your VPA (UPI ID). +1. You should have already integrated [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). +1. [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. + +### Integration Steps + +If you are using Razorpay Standard Checkout Integration for your web applications or Android apps, you do not require any additional integration to display **Google Pay** in the list of payment options. Get in touch with our [Support team](https://razorpay.com/support/#request) to help you to accept payments using Omnichannel at your application Checkout. + +## Integration on Custom Checkout + +[Integrate with Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/google-pay/omnichannel/custom-integration.md) + +### Related Information + +- [UPI Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) +- [UPI Transaction Limits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/transaction-limits/upi.md) diff --git a/llm-content/payments/payment-methods/upi/google-pay/omnichannel/custom-integration.md b/llm-content/payments/payment-methods/upi/google-pay/omnichannel/custom-integration.md new file mode 100644 index 00000000..53982ac4 --- /dev/null +++ b/llm-content/payments/payment-methods/upi/google-pay/omnichannel/custom-integration.md @@ -0,0 +1,59 @@ +--- +title: Google Omnichannel Integration - Custom Checkout +description: Integrate Google Omnichannel at Razorpay's Custom Checkout page for web and Android apps. +--- + +# Google Omnichannel Integration - Custom Checkout + +You can integrate your custom applications or Android Apps with Google Omnichannel to enable your customers to make payments via GPay. The customers can click the notification sent by Google Pay and complete the payment on their mobile phones. + +## Prerequisites + +1. [Sign up](https://support.google.com/pay/business/answer/7684271?hl=en&ref_topic=7684388) for a business account with Google Pay. +1. [Contact our Support Team](https://razorpay.com/support/#request) and have them whitelist your UPI ID/VPA. +1. Verify your UPI ID/VPA details on the [ Google Merchant Console](https://support.google.com/pay/business/answer/7684398?hl=en&ref_topic=7684388). Google deposits a small amount into the bank account linked to your VPA (UPI ID). +1. You should have already integrated the Razorpay Checkout with your application using one of the following: + - [Razorpay Web Integration - Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom.md) + - [Razorpay Android Integration - Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom.md) +1. [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + +## Web Integration + +While creating a request, there is no need to ask for vpa from your customer. The intent request is sent to the customer's registered phone number. + +```json: Example +razorpay.createPayment({ + "key": "", + "amount": 5000, + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "method": "upi", + "_[flow]": "intent", + "upi_provider": "google_pay" +}); +``` + +## Android Integration + +When the user enters the phone number, along with the Checkout fields, you need to submit `method`, `upi_provider` and `_[flow]` options along with the other Checkout fields as shown below: + +```java +try +{ + JSONObject data = new JSONObject(); + data.put("amount", 100000); //pass in paise (amount: 100000 equals ₹1000) + data.put("email", "gaurav.kumar@example.com"); //customer's email address + data.put("contact", "9876543210"); //customer's mobile number + + JSONObject notes = new JSONObject(); + notes.put("custom_field", "Make it so."); //notes for the payment, if any + data.put("notes", notes); + + data.put("method", "upi"); // mandatory for Omnichannel + data.put("_[flow]", "intent"); // mandatory for Omnichannel + data.put("upi_provider", "google_pay"); // mandatory for Omnichannel + razorpay.submit(data, new PaymentResultWithDataListener() + + .......... // add your custom logic +} +``` diff --git a/llm-content/payments/payment-methods/upi/google-pay/omnichannel/s2s-integration.md b/llm-content/payments/payment-methods/upi/google-pay/omnichannel/s2s-integration.md new file mode 100644 index 00000000..3b3ca00a --- /dev/null +++ b/llm-content/payments/payment-methods/upi/google-pay/omnichannel/s2s-integration.md @@ -0,0 +1,212 @@ +--- +title: Google Pay Omnichannel for Server-to-Server Integration +description: Using Razorpay's APIs, you can initiate a UPI intent payment that will be handled by the Google Pay app installed on your customer's mobile device. +--- + +# Google Pay Omnichannel for Server-to-Server Integration + +Use GooglePay Omnichannel API to initiate a UPI payment request that can be sent to your customers on their registered phone numbers. The customers need not enter the VPA while making the payment. On receiving the notification on the Google Pay app, the customer completes the payment. + +## Prerequisites + +1. [Sign up ](https://support.google.com/pay/business/answer/7684271?hl=en&ref_topic=7684388)for a business account with Google Pay. +1. [Contact our Support Team](https://razorpay.com/support/#request) and have them whitelist your UPI ID/VPA. +1. Verify your UPI ID/VPA details on the [Google Merchant Console](https://support.google.com/pay/business/answer/7684398?hl=en&ref_topic=7684388). Google deposits a small amount into the bank account linked to your VPA (UPI ID). +1. [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + +## Integration Steps + +Following are the steps of the payment flow: + +1. Create an Order using the Orders API. +2. Initiate an Omnichannel request on the provided `contact` number of the customer. +3. Poll at regular intervals or listen to Webhook event to check the order's status. + +### Step 1. Create an Order + +Orders API helps to prevent multiple payments by binding a single successful payment to an order. + +Here is the list of attributes for creating the order: + +`amount` _mandatory_ +: `integer` The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be `29935`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. + You can create Orders in **INR** only. + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +#### Sample Code + +The following is a sample API request and response for creating an order: + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11" +}' +```java: Java +try { + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 50000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "order_rcptid_11") + + Order order = razorpay.Orders.create(orderRequest); +} catch (RazorpayException e) { + // Handle Exception + System.out.println(e.getMessage()); +} +```Python: Python +import razorpay +client = razorpay.Client(auth=("api_key", "api_secret")) + +DATA = { + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} +client.order.create(data=DATA) +```php: PHP +$order = $client->order->create([ + 'receipt' => 'order_rcptid_11', + 'amount' => 50000, // amount in the smallest currency unit + 'currency' => 'INR' +]); +```csharp: .NET +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.add("receipt", "order_rcptid_11"); +options.add("currency", "INR"); +Order order = client.Order.Create(options); +```ruby: Ruby +options = amount: 50000, currency: 'INR', receipt: '' +order = Razorpay::Order.create +```javascript: Node.js +var options = { + amount: 50000, // amount in the smallest currency unit + currency: "INR", + receipt: "order_rcptid_11" +}; +instance.orders.create(options, function(err, order) { + console.log(order); +}); +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +A successful creation of the Order returns the `order_id` that you need to store against the Order defined in your system. + +### Step 2. Initiate a Payment + +To initiate a UPI payment request, invoke an API call with the following attributes: + +/payments/create/redirect + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. + For example, if the amount to be charged is ₹299, then pass `29900` in this field. + +`currency` _mandatory_ +: `string` ISO code for the currency in which you want to accept the payment. + You can accept payments in **INR** only. + +`order_id` _mandatory_ +: `string` `order_id` as returned in the response of the [Create Order step](#step-1-create-an-order). + +`notes` _optional_ +: `json object` Object consisting of key value pairs as [notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes). + +`method` _mandatory_ +: `string` Payment method used to make the payment. In this case, it is `upi`. + +`description` _optional_ +: `string` Description about the payment method. + +`_[flow]` _mandatory_ +: `string` Mode of UPI payment, in this case it is `intent`. + +`contact` _mandatory_ +: `string` Contact number of the customer. + +`email` _mandatory_ +: `string` Email ID of the customer. + +`upi_provider` _mandatory_ +: `string` Name of the UPI provider, in this case `google_pay`. + +`ip` _mandatory_ +: `string` Client's browser IP address. + +`referer` _mandatory_ +: `string` Value of `referer` header passed by the client's browser. + +`user_agent` _mandatory_ +: `string` Value of `user_agent` header passed by the client's browser. + +`callback_url` _optional_ +: `string` URL endpoint where Razorpay will submit the final payment status. + +#### Response + +As a result of the initiated payment, a collect request is sent to the customers' mobile devices. Customers can now complete the payment using the Google Pay app installed on their devices. + +#### Example + +```cURL: cURL +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/redirect \ +-H "Content-Type: application/json" \ +-d '{ + "amount":50000, + "email":"gaurav.kumar@gmail.com", + "currency":"INR", // Only INR is supported + "method":"upi", + "_":{ + "flow":"intent" + }, +"upi_provider":"google_pay", +"contact":9972006855 +}' +``` +### Step 3. Verify the Payment + +If you have configured `callback_url` parameter in the original payment request, a POST request is sent along with the `razorpay_payment_id` to the configured URL on your server. + +You can subscribe to the payment-related (`payment.authorized`, `payment.captured`) and order-related (`order.paid`) Webhooks to get notified once the customer completes the UPI payment. Know more about subscribing to [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + +#### Payment failure and re-initiating payment + +If you receive the `payment.failed` notification on the Webhook or the order is not marked `paid` within 2-3 minutes, you can send the request for the same payment again. diff --git a/llm-content/payments/payment-methods/upi/google-pay/omnichannel/standard-integration.md b/llm-content/payments/payment-methods/upi/google-pay/omnichannel/standard-integration.md new file mode 100644 index 00000000..aef6a4b1 --- /dev/null +++ b/llm-content/payments/payment-methods/upi/google-pay/omnichannel/standard-integration.md @@ -0,0 +1,30 @@ +--- +title: Google Omnichannel Integration - Standard Checkout +description: Integrate Google Omnichannel at the Razorpay Standard Checkout of your web applications or Android apps. +--- + +# Google Omnichannel Integration - Standard Checkout + +Use Google Omnichannel at your Checkout to send a payment request to the customers directly on the GooglePay app. + +![Google Omnichannel Checkout Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/omnichannel-checkout-header-changes-2.jpg.md) + +> **INFO** +> +> +> **Feature Enablement Request** +> +> This feature is not available by default. Contact our [Support Team](https://razorpay.com/support/#request) to get it enabled for your account. +> + +## Prerequisites + +1. [Sign up](https://support.google.com/pay/business/answer/7684271?hl=en&ref_topic=7684388) for a business account with Google Pay. +1. [Contact our Support Team](https://razorpay.com/support/#request) and have them whitelist your UPI ID/VPA. +1. Verify your UPI ID/VPA details on the[ Google Merchant Console](https://support.google.com/pay/business/answer/7684398?hl=en&ref_topic=7684388). Google deposits a small amount into the bank account linked to your VPA (UPI ID). +1. You should have already integrated [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). +1. [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + +## Integration + +If you are using Razorpay Standard Checkout Integration for your web applications or Android apps, you do not require any additional integration to display **Google Pay** in the list of payment options. Get in touch with our [Support team](https://razorpay.com/support/#request) to help you to accept payments using Omnichannel at your application Checkout. diff --git a/llm-content/payments/payment-methods/upi/google-pay/spot-platform-integration.md b/llm-content/payments/payment-methods/upi/google-pay/spot-platform-integration.md new file mode 100644 index 00000000..b3b0680e --- /dev/null +++ b/llm-content/payments/payment-methods/upi/google-pay/spot-platform-integration.md @@ -0,0 +1,699 @@ +--- +title: Google Spot Platform Integration +description: Accept payments using your app on the Google Pay Spot Platform at the Razorpay Custom Checkout. +--- + +# Google Spot Platform Integration + +You can use your existing Razorpay custom integration to accept payments via your app on the Google Pay Spot platform. + +## What is Google Pay Spot Platform + +You can use the Google Pay Spot Platform to set up your Spot on Google Pay. A Spot is a digital storefront that you can create, brand and host, the way you want. + +Know more about [Google Spot Platform](https://developers.google.com/pay/spot/). + +## Advantages + +Given below are the advantages: +- You need not handle reconciliation separately. +- You do not have to integrate directly with Google Pay. + +## Workflow + +Following are the payment flow steps: + +1. The customer logs into the Google Pay app. +1. The customer clicks on your app, selects a product or service, and clicks the **Pay** button. +1. The Razorpay Custom Checkout creates and sends a payment request to Google Pay. +1. The customer completes the payment on the Google Pay app. +1. After the payment is complete, the customer receives an order confirmation (After you get a payment confirmation from Custom Checkout). + +## Prerequisites + +1. Contact our [Support Team](https://razorpay.com/support/#request) to get a dedicated VPA (UPI ID). This VPA is for Google Spot Platform Integration. +1. [Sign up](https://support.google.com/pay/business/answer/7684271?hl=en&ref_topic=7684388) for a business account with Google Pay. +1. Verify your VPA (UPI ID) details on the [Google Merchant Console](https://support.google.com/pay/business/answer/7684398?hl=en&ref_topic=7684388). Here, Google deposits a small amount into the bank account linked to your VPA (UPI ID). It might take up to 48 hours for the money to reflect in your account. + +> **INFO** +> +> +> **Tips for Multiple VPAs** +> +> If you have multiple VPAs, you need to verify all of them individually on the Google Merchant Console. +> + +1. [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + +## Integration Steps + +> **WARN** +> +> +> **Watch Out!** +> +> This feature is available only on the Chrome browser on your Android mobile devices. +> + +### Step 1: Create an Order + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +### Step 2: Invoke Checkout and Pass Order ID and Other Options to it + +#### Step 2.1: Include the Razorpay Custom Checkout JavaScript + +Include the following script, preferably in the `` section of your page: + +```html: razorpay.js + +``` + +> **INFO** +> +> +> **Include the Javascript, Not the Library** +> +> Include the script from https://checkout.razorpay.com/v1/razorpay.js instead of serving a copy from your server. This allows new updates and bug fixes to the library to get automatically served to your application. +> +> We always maintain backward compatibility with our code. +> + +#### Step 2.2: Include the Google Spot JavaScript + +Include the following script, preferably in the `` section of your page: + +```html: microapps.js + +``` + +#### Step 2.3: Instantiate Razorpay Custom Checkout + +#### Single Instance on a Page + +```js +var razorpay = new Razorpay({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}); +``` + +#### Multiple Instances on Same Page + +If you need multiple Razorpay instances on the same page, you can globally set some of the options: + +```js +Razorpay.configure({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', +}) +new Razorpay({}); // will inherit key and image from above. +``` + +#### Step 2.4: Submit Payment Details + +Once the order is created and the customer's payment details are obtained, the information should be sent to Razorpay to complete the payment. The data that needs to be submitted depends upon the payment method selected by the customer. + +You can do this by invoking the `createPayment` method. + +The checkout parameters are listed [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/google-pay/spot-platform-integration/checkout-parameters.md). + +#### Apply Offers + +During checkout, if there is a co-branded offer run by GooglePay, you should apply the discount, and pass on the offer details to Google. Use [these offers parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/google-pay/spot-platform-integration/checkout-parameters.md#offers-parameters) to pass the offer details. + +The `razorpay.js` file receives this data and appends this to the existing data being shared with Google. + +> **INFO** +> +> +> **Handy Tips** +> +> Razorpay will be agnostic to whatever data is passed within this additional information section. You must structure the data as per Google's formats. +> + +```js: CreatePayment with handler function +var data = { + amount: 100, // in paise, 1000 equals ₹10, // in paise, 100 equals ₹1 + email: 'gaurav.kumar@example.com', + contact: '9876543210', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_F8RF6kSs1NXHJZ', + method: 'upi', + customer_id: 'cust_00000000000001', + additional_info: { //used to pass offer details to Google + "displayItems": [{ + "type": "SUBTOTAL", + "price": "20.00", + }, + { + "type": "DISCOUNT", + "price": "-10.00", + }], + "offerInfo": { + "offers": [{ + "redemptionCode": "DISCOUNT10", + } + ], + } + } +} +}; + +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + window.onload = function(){ + var paymentData = data; + razorpay.checkPaymentAdapter('microapps.gpay') + .then(() => { + // Google Pay Microapps API is available, show the payment option + pay(); + }) + .catch(() => { + console.log('Gpay adapter not available'); + }); + function pay(){ + var paymentData = data; + razorpay.createPayment(paymentData, { microapps: { gpay: true } }); + razorpay.on('payment.success', function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature), + alert(resp.transaction_reference)}); // will pass payment ID, order ID, Razorpay signature and transaction reference to success handler. + razorpay.on('payment.error', function(resp){alert(resp.error.description)}); // will pass error object to error handler + razorpay.on('payment.cancel', function(resp){alert(resp.error.description)}); + } +}) +```js: CreatePayment with callback URL +var data = { + callback_url: 'https://www.examplecallbackurl.com/', + amount: 100, // in paise, 1000 equals ₹10, // in paise, 100 equals ₹1 + email: 'gaurav.kumar@example.com', + contact: '9876543210', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_F8RF6kSs1NXHJZ', + method: 'upi', + customer_id: 'cust_00000000000001', + additional_info: { // Used to pass offer details to Google + "displayItems": [{ + "type": "SUBTOTAL", + "price": "20.00", + }, + { + "type": "DISCOUNT", + "price": "-10.00", + }], + "offerInfo": { + "offers": [{ + "redemptionCode": "DISCOUNT10", + } + ], + } + } +} + +}; + +var btn = document.querySelector('#btn'); +btn.addEventListener('click', function(){ + // has to be placed within user initiated context, such as click, in order for popup to open. + window.onload = function(){ + var paymentData = data; + razorpay.checkPaymentAdapter('microapps.gpay') + .then(() => { + // Google Pay Microapps API is available, show the payment option + pay(); + }) + .catch(() => { + console.log('Gpay adapter not available'); + }); + function pay(){ + var paymentData = data; + razorpay.createPayment(paymentData, { microapps: { gpay: true } }); + razorpay.on('payment.error', function(resp){alert(resp.error.description)}); // will pass error object to error handler + razorpay.on('payment.cancel', function(resp){alert(resp.error.description)}); + } +}) +``` + +### Step 3: Store fields in your Database + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +### Step 4: Verify the Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +### Step 5: Send Payment Details to Google + +Once the payment is complete and signature verified, you must pass the **UPI reference ID** to Google. + +1. Copy the **UPI reference ID** from `resp.transaction_reference` which you will receive as part of the `payment.success` response in [step 2.4](#step-24-submit-payment-details). +1. Add it as the value for the `transactionReferenceId` parameter in the Google Spot Orders API. +1. Fire the Google Spot Orders API. + +> **INFO** +> +> +> **Handy Tips** +> +> You need to be signed in with a whitelisted ID to view the Google Spot Orders API document. +> +> If you get a 404 error on the above link, contact [Google Support](mailto:spot-support@google.com) and ask them to whitelist your ID. +> + +### Payment Capture Settings + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +## Test Integration + +Now that the integration is complete, you must ensure that your integration works as expected. + +Make a test transaction, verify the payment status from Dashboard, APIs or subscribe to related Webhook events to take appropriate actions at your end. After testing the integration, you can start accepting payments from your customers in real-time. + +> **INFO** +> +> +> **Handy Tips** +> +> - The Google Pay Spot Platform only supported UPI payments. +> - Testing can only be done with real money. You can make low-value transactions to test the integration. +> + +#### Verify Payment Status + +You can track the payment status from the Dashboard or subscribe to the Webhook event or poll our APIs. + +#### From Dashboard + +1. Log in to the Dashboard and navigate to **Transactions** → **Payments**. +1. Look if a `payment_ID` has been generated. If no `payment_ID` has been generated, it means that the transaction has failed. + ![](/docs/assets/images/testpayment.jpg) + +#### Subscribe to Webhook events + +You can subscribe to a Webhook event that is generated when a specific event happens in our server. When one of those events is triggered, Razorpay sends the Webhook payload to the configured URL. + +Know more about how to [set up Webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) + +When the customer makes a successful payment on the Checkout, the `payment.authorized` event is created in Razorpay. + +#### Poll APIs + +You can retrieve the status of the payments by polling our [Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments). + +### Related Information + +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) (Recommended) +- [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) (Recommended) +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md) +- [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md) +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) diff --git a/llm-content/payments/payment-methods/upi/google-pay/spot-platform-integration/checkout-parameters.md b/llm-content/payments/payment-methods/upi/google-pay/spot-platform-integration/checkout-parameters.md new file mode 100644 index 00000000..256abdfc --- /dev/null +++ b/llm-content/payments/payment-methods/upi/google-pay/spot-platform-integration/checkout-parameters.md @@ -0,0 +1,180 @@ +--- +title: Custom Checkout Parameters +description: List of parameters that need to be passed in Custom checkout. +--- + +# Custom Checkout Parameters + +Given below are the checkout parameters that you must pass in the `razorpay.js` file. + +## Default Parameters + +`key` _mandatory_ +: `string` API Key ID generated from **Dashboard** → **Account & Settings** → [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + +`amount` _mandatory_ +: `integer` The amount to be paid by the customer in currency subunits. For example, if the amount is , enter `10000`. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. For example, `INR`. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`description` _optional_ +: `string` Description of the product shown in the Checkout form. It must start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown in the Checkout form. Can also be a **base64** string, if loading the image from a network is not desirable. + +`order_id` _mandatory_ +: `string` Order ID generated via the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`method` _mandatory_ +: `string` The payment method used by the customer on Checkout. +Possible values: + - `card` (default) + - `upi` (default) + - `netbanking` (default) + - `wallet` (default) + - `emi` (default) + - `cardless_emi` (requires [approval](https://razorpay.com/support/#request)) + - `paylater` (requires [approval](https://razorpay.com/support/#request)) + - `emandate` (requires [approval](https://razorpay.com/support/#request)) + +`card` _mandatory if method=card/emi_ +: `object` The details of the card that should be entered while making the payment. + + `number` + : `integer` Unformatted card number. + + `name` + : `string` The name of the cardholder. + + `expiry_month` + : `integer` Expiry month for card in MM format. + + `expiry_year` + : `integer` Expiry year for card in YY format. + + `cvv` + : `integer` CVV printed on the back of the card. + +> **INFO** +> +> +> **Handy Tips** +> +> - CVV is not required by default for tokenised cards across all networks. +> - CVV is optional for tokenised card payments. Do not pass dummy CVV values. +> - To implement this change, skip passing the `cvv` parameter entirely, or pass a `null` or empty value in the CVV field. +> - We recommend removing the CVV field from your checkout UI/UX for tokenised cards. +> - If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay. +> + + `emi_duration` + : `integer` Defines the number of months in the EMI plan. + +`bank_account` _mandatory if method=emandate_ +: The details of the bank account that should be passed in the request. These details include bank account number, IFSC code and the name of the customer associated with the bank account. + + `account_number` + : `string` Bank account number used to initiate the payment. + + `ifsc` + : `string` IFSC of the bank used to initiate the payment. + + `name` + : `string` Name associated with the bank account used to initiate the payment. + +`bank` _mandatory if method=netbanking_ +: `string` Bank code. List of available banks enabled for your account can be fetched via [**methods**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods.md#fetch-supported-methods). + +`wallet` _mandatory if method=wallet_ +: `string` Wallet code for the wallet used for the payment. Possible values: + - `payzapp` (default) + - `olamoney` (requires [approval](https://razorpay.com/support/#request)) + - `phonepe` (requires [approval](https://razorpay.com/support/#request)) + - `airtelmoney` (requires [approval](https://razorpay.com/support/#request)) + - `mobikwik` (requires [approval](https://razorpay.com/support/#request)) + - `jiomoney` (requires [approval](https://razorpay.com/support/#request)) + - `amazonpay` (requires [approval](https://razorpay.com/support/#request)) + - `paypal` (requires [approval](https://razorpay.com/support/#request)) + - `phonepeswitch` (requires [approval](https://razorpay.com/support/#request)) + +`provider` _mandatory if method=cardless_emi/paylater_ +: `string` Name of the cardless EMI provider partnered with Razorpay. + + Available options for Cardless EMI (requires [approval](https://razorpay.com/support/#request)): + - `hdfc` + - `icic` + - `idfb` + - `kkbk` + - `zestmoney` + - `earlysalary` + - `walnut369` + + Available options for Pay Later: + - `lazypay` + - `paypal` + +`vpa` _mandatory if method=upi_ +: `string` UPI ID used for making the payment on the UPI app. + + +> **WARN** +> +> +> **Deprecation Notice** +> +> UPI Collect is deprecated effective 28 February 2026. This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [ migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/custom-integration.md) to switch to UPI Intent. +> + +`callback_url` _optional_ +: `string` The URL to which the customer must be redirected upon completion of payment. The URL must accept incoming `POST` requests. The callback URL will have `razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature` as the request parameters for a successful payment. + +`redirect` _conditionally mandatory_ +: `boolean` Determines whether customer should be redirected to the URL mentioned in the +`callback_url` parameter. This is mandatory if `callback_url` parameter is used. Possible values: + - `true`: Customer will be redirected to the `callback_url`. + - `false`: Customer will not be redirected to the `callback_url` + +## Offers Parameters + +Pass these parameters to send offer details to Google. + +`additional_info` +: `object` Offer details. + + `displayItems` _mandatory_ + : `array` Used to display the shopping cart information. Possible values: + - `type`: For example, `SUBTOTAL`. + - `price`: For example, `20.00`. + + `offerInfo` _mandatory_ + : `object` Used to share information regarding the offer. + + `offers` _mandatory_ + : `array` Detailed information about the offer. + + `redemptionCode` _mandatory_ + : `string` The discount code used by the customer. For example, `DISCOUNT10`. diff --git a/llm-content/payments/payment-methods/upi/google-pay/standard-integration.md b/llm-content/payments/payment-methods/upi/google-pay/standard-integration.md new file mode 100644 index 00000000..0bc9e425 --- /dev/null +++ b/llm-content/payments/payment-methods/upi/google-pay/standard-integration.md @@ -0,0 +1,149 @@ +--- +title: Google Pay Integration - Standard Checkout +description: Integrate Google Pay on Razorpay's Standard Checkout page for web and Android apps. +--- + +# Google Pay Integration - Standard Checkout + +When using Razorpay Standard Checkout Integration, you do not require any extra integration to display the Google Pay option in the list of payment options.Google Pay is shown inside the **UPI** section on the checkout form. + +Google pay is shown under the **UPI** section on the checkout form. + +![Google Pay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-checkout-header-changes.jpg.md) + +## Web Integration + +### Collect flow + +On your website, all Google Pay requests will be Collect requests. The customer selects the Google Pay option, enters their UPI handle and clicks **Pay**. A request is sent to the Google Pay app installed on their mobile device. The customer has to manually open the Google Pay app and approve the request. + +### Intent flow + +Customers can make intent-based payments using Google Pay on mobile-web applications. Here, the customer is redirected to Google Pay’s application, installed on their mobile devices, to complete the payment. + +> **WARN** +> +> +> **Watch Out!** +> +> This feature is only available for web pages running on HTTPS on Google Chrome for Android (v56 and above) and not on Google Chrome web views. +> + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Android Integration + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/standard-integration.md). +> + +### Intent-Based Integration + +When using the Standard Checkout, Google Pay is shown inside the payment method **UPI**. The customer selects Google Pay from the list of apps and click **Pay**. Customers are then redirected to the Google Pay application, provided it is installed on the mobile device they are using to access checkout, where they can make the payment. + +#### Intent-Based Integration Using Google Pay SDK + +You also have the option to integrate Google Pay with the Standard Checkout on your Android app using Google's SDK. + +This offers the advantage of letting you open Google Pay within your application for customers to make the payment without any redirection, enhancing the user experience. + +#### Prerequisites + +1. [Sign up](https://support.google.com/pay/business/answer/7684271?hl=en&ref_topic=7684388) for a business account with Google Pay. +1. [Contact our Support Team](https://razorpay.com/support/#request) and have them **whitelist your UPI ID/VPA**. +1. Verify your UPI ID/VPA details on the [Google Merchant Console](https://support.google.com/pay/business/answer/7684398?hl=en&ref_topic=7684388). Here, Google deposits a small amount into the bank account linked to your VPA (UPI ID). +1. You should have already integrated [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). +1. [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + +### Collect-Based Integration + +This is same as [UPI Collect Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods.md#collect-flow). + +The customers enter their UPI handle in the **Enter your UPI ID** section on the Checkout form and click **Pay**. Collect the customer's UPI handle and pass it in the payment request with method as `upi`. + +Razorpay then triggers a Collect request. The Collection request is sent to the customer's Google Pay application where they can make the payment. + +**NPCI Restrictions for UPI Collect Flow** + +As per NPCI guidelines, the following MCC codes are restricted and cannot accept UPI Collect payments: + + +### Restricted MCC Codes + + + MCC Code | Category + --- + 5816 | Digital Goods: Games + --- + 6540 | POI Funding Transactions (excluding MoneySend) + --- + 4812 | Telecommunication Equipment and Telephone Sales + --- + 4814 | Telecommunication Services + --- + 7408 | Lending Platform + --- + 6513 | Real Estate Agents and Managers - Rentals + --- + 7995 | Betting/Lottery + --- + 5412 | Grocery Stores, Supermarkets + --- + 5413 | Grocery Stores, Supermarkets + + + +To integrate Google Pay with the Checkout on your Android app using Google's SDK: + +1. Download the [Google Pay SDK](https://rzp-1415-prod-mobile.s3.amazonaws.com/android/googlepay-sdk/google-pay-client-api-1.0.0.aar) and add the `.aar` files to the application library. + +> **INFO** +> +> +> **Handy Tips** +> +> The Razorpay-Google Pay SDK acts as a wrapper over the native Google-SDK. This SDK connects Razorpay's SDK with the Google SDK. You need all the 3 SDKs (listed below) for the flow to work. +> - Razorpay Android SDK +> - Google Pay SDK +> - Razorpay-Google Pay SDK +> + +1. Add the following lines of code to the `build.gradle` file of your application: + + ```java: build.gradle + dependencies { + implementation(name: 'razorpay-googlepay-1.3.0', ext: 'aar') + implementation(name:'google-pay-client-api-1.0.0 ', ext:'aar') + implementation 'com.android.support:customtabs:26.1.0' + implementation 'com.google.android.gms:play-services-tasks:15.0.1 + } + ``` + +This adds the dependencies for the SDK and creates a Google Pay UPI payment method on your Checkout form. diff --git a/llm-content/payments/payment-methods/upi/gst-on-upi.md b/llm-content/payments/payment-methods/upi/gst-on-upi.md new file mode 100644 index 00000000..c1180286 --- /dev/null +++ b/llm-content/payments/payment-methods/upi/gst-on-upi.md @@ -0,0 +1,347 @@ +--- +title: Send GST information in UPI transaction flows +description: Know how to adhere to CBIC regulatory guidelines and send GST information in UPI transaction flows. +--- + +# Send GST information in UPI transaction flows + +As per the 2020 circular issued by the Central Board of Indirect Taxes & Customs (CBIC), businesses meeting the eligibility conditions described below must pass GST information for UPI transactions: + +## Eligibility Conditions + +Given below are the eligibility conditions: + +- Businesses whose annual aggregate turnover exceeds ₹500 crores in any financial year from 2017-18 onwards. +- Businesses that generate B2C (Business-to-Customer) invoices. + +The following categories of business will be excluded: +- An insurer or a banking company, or a financial institution, including a non-banking financial company. +- A goods transport agency supplying services in relation to transportation of goods by road in a goods carriage. +- Businesses supplying passenger transportation service. +- Businesses supplying services by way of admission to exhibition of cinematograph in films in multiplex screens. + +## How to Comply with the Regulation + +We enable eligible businesses to comply with this regulation by making some simple changes to their integration. Non-eligible businesses can also make these changes, even though this regulation does not apply to them at the moment. + +1. [Make changes in Orders API integration](#step-1-make-changes-in-orders-api-integration). +2. [Handle API errors](#step-2-handle-api-errors). +3. [Make changes in webhook integration](#step-3-make-changes-in-webhooks-integration). + +### Step 1: Make Changes in Orders API Integration + +To comply with the change, you should use the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md) in your integration flow, along with the following additional parameters request parameters: + +#### Additional Request Parameters + +`tax_invoice` _optional_ +: `object` This object contains information about the invoices. If not provided, the transaction will default to the non-GST compliant UPI flow. + + `number` _optional_ + : `string` This is the invoice number against which the payment is collected. If not provided, the transaction will default to the non-GST compliant UPI flow. + + `date` _optional_ + : `integer` Timestamp, in Unix format, that indicates the issue date of the invoice. If not provided, it will default to the current date. + + `customer_name` _optional_ + : `string` The customer name on the invoice. If not provided, the transaction will default to non-GST compliant UPI flow. + + `gst_amount` _optional_ + : `integer` The GST amount on the invoice in paise. If not provided, Razorpay will compute the values based on the default values provided by you. If default values are not updated, the transaction will default to the non-GST compliant UPI flow. + + `cess_amount` _optional_ + : `integer` The cess amount on the invoice in paise. If not provided, Razorpay will compute the values based on the default values provided by you. If default values are not updated, the transaction will default to the non-GST compliant UPI flow. + + `supply_type` _optional_ + : `string` Supply type indicating whether the transaction is interstate or intrastate. Possible values: + - `interstate`: Supply of goods and services takes place across the borders of two states or union territories. Only IGST is to be paid. + - `intrastate`: Supply of goods and services takes place within the states. Both CGST and SGST should be paid. + + If not provided, the default value set by you on the Dashboard will be considered. If default values are not updated, the transaction will default to the non-GST compliant UPI flow. + + `business_gstin` _optional_ + : `string` The GSTIN mentioned on the invoice. If not passed, it will be taken from your Dashboard. + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "tax_invoice": + { + "number": "INV001", + "date": "1589994898", + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9603R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + + JSONObject tax_invoice = new JSONObject(); + tax_invoice.put("number", "INV001"); + tax_invoice.put("date", "1589994898"); + tax_invoice.put("customer_name, "Gaurav Kumar"); + tax_invoice.put("business_gstin", "06AABCU9603R1ZR"); + tax_invoice.put("gst_amount", 4000); + tax_invoice.put("cess_amount", 0); + tax_invoice.put("supply_type", "interstate"); + orderRequest.put("tax_invoice", tax_invoice); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "tax_invoice": + { + "number": "INV001", + "date": "1589994898", + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9603R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate" + } + + }) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'currency' => 'INR', tax_invoice => array( 'number' => 'INV001', 'date' => 1589994898, 'customer_name' => 'Gaurav Kumar', 'business_gstin' => '06AABCU9603R1ZR', 'gst_amount' => 4000, 'cess_amount' => 0, 'supply_type' => 'interstate'))); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +tax_invoice.number="INV001"; +tax_invoice.date="1589994898"; +tax_invoice.customer_name="Gaurav Kumar"; +tax_invoice.business_gstin="06AABCU9603R1ZR"; +tax_invoice.gst_amount="4000"; +tax_invoice.cess_amount="0"; +tax_invoice.supply_type="interstate"; + +options.Add("tax_invoice", tax_invoice); + +Order order = client.Order.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', tax_invoice: { number: 'INV001', date: '1589994898', customer_name: 'Gaurav Kumar', business_gstin: '06AABCU9603R1ZR', gst_amount: 4000, cess_amount: 0, supply_type: 'interstate' } + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 50000, + currency: "INR", + receipt: "receipt#1", + tax_invoice: + { + number: "INV001", + date: "1589994898", + customer_name: "Gaurav Kumar", + business_gstin: "06AABCU9603R1ZR", + gst_amount: 4000, + cess_amount: 0, + supply_type: "interstate" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "tax_invoice": + map[string]interface{}{ + "number": "INV001", + "date": "1589994898", + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9603R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate", + }, +} + +body, err := client.Order.Create(data, nil) +```json: Response +{ + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071, + "tax_invoice": + { + "number": "INV001", + "date": "1589994898", + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9603R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate" + } +} +``` + +### Step 2: Handle API Errors + +You could face two types of errors while sending GST information using Orders API: +- Data not in the correct format +- Data missing + +Given below is a sample error response. + +```json: Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "GSTIN Format is invalid", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + } +} +``` + +#### Data not in Correct Format + +Given below are the error codes and their description: + +Datapoint | Expected Value | Error Code | Source | Step | Reason | Description +--- +GSTIN not in proper format | 15 character Alphanumeric | BAD_REQUEST_ERROR | business | payment_initiation (Order Create) | input_validation_failed | GSTIN Format is invalid +--- +GST Amount not in proper format | positive integer | BAD_REQUEST_ERROR | business | payment_initiation (Order Create) | input_validation_failed | GST Amount Format is invalid +--- +CESS Amount not in proper format | positive integer | BAD_REQUEST_ERROR | business | payment_initiation (Order Create) | input_validation_failed | CESS Amount Format is invalid +--- +Supply Type is not in proper format | 10 character string, one of \{"Interstate”, "Intrastate” or NULL\}" | BAD_REQUEST_ERROR | business | payment_initiation (Order Create) | input_validation_failed | Supply Type is invalid +--- +Invoice Date not in proper format | integer | BAD_REQUEST_ERROR | business | payment_initiation (Order Create) | input_validation_failed | Invoice Date format is invalid + +#### Data Missing + +Given below are the error codes and their description: + +Datapoint | Expected Value | Error Code | Source | Step | Reason | Description +--- +GSTIN not present | 15 character Alphanumeric | No Error thrown. Default to non-GST UPI flow | NA | NA | NA | NA +--- +Customer Name not provided | string |No Error thrown. Default to non-GST UPI flow | NA | NA | NA | NA +--- +Invoice Number not provided | string | No Error thrown. Default to non-GST UPI flow | NA | NA | NA | NA +--- +GST Amount not passed & GST Rate not updated in the Razorpay Dashboard | positive integer | No Error thrown. Default to non-GST UPI flow | NA | NA | NA | NA +--- +GST & CESS is passed, but Supply Type is not passed | string | BAD_REQUEST_ERROR | business | payment_initiation (Order Create) | input_validation_failed | Supply Type is not present +--- +CESS Amount & Supply Type passed, but GST Amount is not passed | positive integer | BAD_REQUEST_ERROR | business | payment_initiation (Order Create) | input_validation_failed | GST Amount is not present +--- +GST Amount & Supply Type passed but CESS Amount is not passed | positive integer | BAD_REQUEST_ERROR | business | payment_initiation (Order Create) | input_validation_failed | CESS Amount is not present + +### Step 3: Make Changes in Webhooks Integration + +The GST information is also passed in the `order.paid` webhook payload, as shown below. Please make the necessary changes in your webhook integration. + +```json: Sample Order.paid Payload with GST information +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "order.paid", + "contains": [ + "payment", + "order" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DESyzxuld02Zul", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_DESxiijbl9xjDB", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "notes": [], + "fee": 2, + "tax": 0, + "error_code": null, + "error_description": null, + "created_at": 1567675356 + } + }, + "order": { + "entity": { + "id": "order_DESxiijbl9xjDB", + "entity": "order", + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "currency": "INR", + "receipt": "rcptid #1", + "offer_id": null, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1567675283, + "tax_invoice": { + "number": "INV001", + "date": "1589994898", + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9603R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate" + } + } + }, + "created_at": 1567675356 + } +} +``` diff --git a/llm-content/payments/payment-methods/upi/gst-on-upi/faqs.md b/llm-content/payments/payment-methods/upi/gst-on-upi/faqs.md new file mode 100644 index 00000000..ee0edac5 --- /dev/null +++ b/llm-content/payments/payment-methods/upi/gst-on-upi/faqs.md @@ -0,0 +1,18 @@ +--- +title: FAQs +description: List of commonly asked questions on the CBIC regulatory guidelines. +--- + +# FAQs + +#### 1. What will happen if I pass wrong information because of integration issues? + +NPCI and the government understand that there can be data mistakes due to integration issues. Therefore, if the number of errors is low, no penalty will be imposed on you. + +#### 2. What if I create an invoice after accepting payments? + +In that case, you do not have to send the GST parameters in the transaction. Rather, you will have to cross reference the online transaction by mentioning a unique identification of that payment (Payment ID). + +#### 3. What if I am a marketplace and I issue multiple invoices with different GSTIN? + +In this case, you do not need to share the GST information on UPI transactions. diff --git a/llm-content/payments/payment-methods/upi/saved-vpa.md b/llm-content/payments/payment-methods/upi/saved-vpa.md new file mode 100644 index 00000000..a6e56721 --- /dev/null +++ b/llm-content/payments/payment-methods/upi/saved-vpa.md @@ -0,0 +1,129 @@ +--- +title: Saved VPA +description: Save the VPA details entered by a customer at Razorpay Checkout and use them for future transactions made by the customer on your website or app. +--- + +# Saved VPA + +In an online transaction using UPI collect flow, the flow looks like this: +1. Customers enter their Virtual Payment Address (VPA) at the Checkout. +2. Open the respective UPI apps and complete the payment after successful two-factor authentication. +3. Customers are redirected to your website or app after successful payment. + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/standard-integration.md). +> + +## What is Saved VPA + +With Razorpay, you can save the VPAs (UPI ids) of a customer at the Checkout itself. +- The VPAs entered by the customer are stored and secured as **tokens** in Razorpay. +- The customers do not need to enter the VPAs and use the saved VPAs every time they make a transaction. + + +### On-Demand Feature - Raise a Request + + + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + + + +### Advantages + +- **Faster Checkout Experience**: By saving the VPAs at the Checkout, you can help your customers to complete their UPI payments faster, resulting in better success rates and better customer retention for you. +- **Global Tokens**: Razorpay utilizes global tokens functionality wherein tokens saved by a customer on one instance of Razorpay Standard Checkout are displayed in another instance. For example, on a visit to a store A, the customer has saved the `gaurav.kumar@okhdfcbank` on Razorpay Checkout. On a visit to store B, while making the UPI transaction on Razorpay Checkout, the customer will be shown `gaurav.kumar@okhdfcbank`, the VPA previously saved at store A's Checkout. + +## Prerequisites + +The customers should authenticate once (be logged in) through the saved card flow on Razorpay Checkout. + +## How this Works + +Watch the GIF to understand Saved VPA flow: + +![Saved VPA Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/saved-vpa2.gif.md) + +On the Checkout page, the customers: + +1. Enter the **Phone Number** and click **Continue**. + +2. Select **UPI** as the payment method. + +3. Enter the UPI ID, that is **VPA**, of their choice and select **Save UPI ID for future use** check box. Razorpay saves the VPAs as tokens. + + +> **INFO** +> +> +> **Handy Tips** +> +> All the saved VPAs are visible under the **UPI** tab at the Checkout. +> + +4. On a repeat visit, customer clicks **Cards**. If there are any saved card details associated to the entered phone number, an OTP is sent. +5. After customer enters OTP, the saved cards become visible. The customer can go back to the checkout screen and select **UPI**. + + to get this feature activated on your account. + + + + +### Advantages + + **Faster Checkout Experience**: By saving the VPAs at the Checkout, you can help your customers to complete their UPI payments faster, resulting in better success rates and better customer retention for you. + - For example, on a visit to a store A, the customer has saved the `gaurav.kumar@okhdfcbank` on Razorpay Checkout. + - On a visit to store B, while making the UPI transaction on Razorpay Checkout, the customer will be shown `gaurav.kumar@okhdfcbank`, the VPA previously saved at store A's Checkout. + +## Prerequisites + +The customers should authenticate once (be logged in) through the saved card flow on Razorpay Checkout. + +## How this Works + +On the Checkout page, the customers: + +1. Enter the **Phone Number** and click **Continue**. + +2. Select **UPI** as the payment method. + +3. Enter the UPI ID, that is **VPA**, of their choice and select **Save UPI ID for future use** check box. + + +> **INFO** +> +> +> **Handy Tips** +> +> All the saved VPAs are visible under the **UPI** tab at the Checkout. +> + +4. On a repeat visit, customer clicks **Cards**. If there are any saved card details associated to the entered phone number, an OTP is sent. +5. After customer enters OTP, the saved cards become visible. The customer can go back to the checkout screen and select **UPI**. diff --git a/llm-content/payments/payment-methods/upi/supported-apps.md b/llm-content/payments/payment-methods/upi/supported-apps.md new file mode 100644 index 00000000..d93bb173 --- /dev/null +++ b/llm-content/payments/payment-methods/upi/supported-apps.md @@ -0,0 +1,143 @@ +--- +title: List of UPI Apps Supported by Razorpay +heading: List of Supported UPI Apps +description: Check the UPI apps supported by Razorpay and their package names. +--- + +# List of Supported UPI Apps + +Given below is the list of supported UPI apps ranked on the basis of payment success rate. + +App Name | Package Name +--- +Google Pay | `com.google.android.apps.nbu.paisa.user` +--- +BHIM | `in.org.npci.upiapp` +--- +BHIM UCO | `com.lcode.ucoupi` +--- +BHIM IOB | `com.euronet.iobupi` +--- +BHIM CSB | `com.lcode.csbupi` +--- +PhonePe | `com.phonepe.app` +--- +Paytm | `net.one97.paytm` +--- +ICICI iMobile | `com.csam.icici.bank.imobile` +--- +ICICI Pocket | `com.icicibank.pockets` +--- +SBI | `com.sbi.upi` +--- +Axis Pay | `com.upi.axispay` +--- +Axis | `com.axis.mobile` +--- +Samsung Pay | `com.samsung.android.spay` +--- +HDFC Bank | `com.snapwork.hdfc` +--- +PayZapp | `com.hdfcbank.payzapp` +--- +Bank of Baroda | `com.bankofbaroda.upi` +--- +Freecharge | `com.freecharge.android` +--- +KVB | `com.mycompany.kvb` +--- +JK UPI | `com.fss.jnkpsp` +--- +IDFC | `com.fss.idfcpsp` +--- +IDFC First | `com.idfcfirstbank.optimus` +--- +Yes Bank | `com.YesBank` +--- +YesBank Iris | `in.irisbyyes.app` +--- +Microsoft Kaizala | `com.microsoft.mobile.polymer` +--- +Lotza | `com.upi.federalbank.org.lotza` +--- +Fed Mobile | `com.fedmobile` +--- +IndusInd Pay | `com.mgs.induspsp` +--- +IndusInd Mobile | `com.fss.indus` +--- +Indus Indie | `com.indusind.indie` +--- +Wizely | `ai.wizely.android` +--- +Amazon | `in.amazon.mShop.android.shopping` +--- +RBL MoBank | `com.rblbank.mobank` +--- +CRED | `com.dreamplug.androidapp` +--- +Finserve | `in.bajajfinservmarkets.app` +--- +Fampay | `com.fampay.in` +--- +Mobikwik | `com.mobikwik_new` +--- +PNB Bank | `com.mgs.pnbupi` +--- +PNB One | `com.Version1` +--- +Digibank | `com.dbs.in.digitalbank` +--- +Jupiter | `money.jupiter` +--- +Navi | `com.naviapp` +--- +Slice | `indwin.c3.shareapp` +--- +Tata Neu | `com.tatadigital.tcp` +--- +Groww | `com.nextbillion.groww` +--- +Shriram One | `com.shriram.one` +--- +Fave | `com.pinelabs.fave` +--- +Ultracash | `com.ultracash.payment.customer` +--- +Timepay | `com.npst.timepay.society` +--- +Goibibo | `com.goibibo` +--- +Kotak | `com.msf.kbank.mobile` +--- +Kotak811 | `com.kotak811mobilebankingapp.instantsavingsupiscanandpayrecharge` +--- +DakPay | `com.fss.ippbpsp` +--- +India Post | `com.iexceed.appzillon.ippbMB` +--- +Canara | `com.canarabank.mobility` +--- +MyJio | `com.jio.myjio` +--- +IndOASIS | `com.IndianBank.IndOASIS` +--- +Tvam | `com.atyati.tvamapp` +--- +PopClub | `com.popclub.android` +--- +Vyom | `com.infrasoft.uboi` +--- +Super Money | `money.super.payments` +--- +Omnicard | `com.eroute.omnicard` +--- +AU0101 | `com.ausmallfinancebank.amb` +--- +Cent Mobile | `com.infrasofttech.CentralBank` +--- +Kiwi | `in.gokiwi.kiwitpap` +--- +Digi Khata | `com.paypointz.wallet` +--- +Moneyview | `com.whizdm.moneyview.loans` diff --git a/llm-content/payments/payment-methods/upi/turbo-upi.md b/llm-content/payments/payment-methods/upi/turbo-upi.md new file mode 100644 index 00000000..6f339713 --- /dev/null +++ b/llm-content/payments/payment-methods/upi/turbo-upi.md @@ -0,0 +1,131 @@ +--- +title: Turbo UPI +description: Turbo UPI is a 1-step payment experience to enable seamless in-app UPI payments. Check use cases, Turbo UPI flows and how to integrate. +--- + +# Turbo UPI + +Turbo UPI by Razorpay enables businesses to accept UPI payments from their customers within their mobile application. Customers no longer need to switch to third-party UPI apps to complete payments. This helps increase payment success rates and improves customer experience. Given below is a sample UI representation: + +![Turbo UPI Standard Checkout Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-flow.jpg.md) + + +### On-Demand Feature - Raise a Request + + + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + + + +### Advantages + + + 1. Turbo UPI eliminates the need for transactions to be routed via an external third-party UPI application. + 2. The steps are reduced from 5 to 1 simple step. + 3. Improve UPI payment success rate with Turbo UPI compared to traditional third-party UPI apps. + 4. Single source for dispute resolution and refund handling. In case of payment failure or refunds, the customer will not be handling multiple parties to resolve the dispute and will have a single point of dispute resolution. + 5. 5x faster UPI payment versus regular UPI payments. + + + 1. Control over your customer's payment journey. + 2. Achieve a faster time-to-market. + 3. With customers never leaving your app, reduce timeout issues significantly, and get more visibility on payment failures. + 4. Higher success rate by 6-8%: With lesser opportunities for your customers to drop off in the payment experience. + 5. With Turbo UPI, know where your customers drop off in the payment journey and take action quickly to increase your conversion rate. This feature gives businesses complete control over the user journey. + 6. As new capabilities are added to the UPI application, such as Credit Cards on UPI, do not depend on adoption across third-party UPI apps. Go live on Turbo with each innovation and provide customers with a better payment experience. + + +## Use Cases + +Turbo UPI is helpful for businesses with high-frequency transactions. + + +### Examples + + - **Doorstep Food/Grocery Delivery** + + Customers select UPI to make quick payments for food/grocery delivery. However, they have to hop between the business and UPI apps, which causes friction. Customers are unsure which support team to contact for disputes - the UPI app or the business. With Turbo UPI, customers can experience 1-click payments and speedy dispute resolution on the business app. + - **Insurance** + + Customers use UPI to pay their insurance premiums, which could be high-ticket transactions. Insurance firms can use Turbo UPI to make the premium payment experience faster and smoother and achieve a higher payment success rate, which reassures customers. + + - **Investment** + + Investment companies must comply with regulations and collect payments from only customers' KYC-verified bank accounts. With Turbo UPI, investment companies can implement third-party validation on all customer payments and ensure regulatory compliance while providing a 1-click payment experience. + + - **Gaming** + + Turbo UPI enables customers to make in-app game purchases without leaving the gaming app. This enhances the customer's experience as they can make a quick UPI payment and continue playing. + + +## Turbo UPI Flows + +Turbo UPI has three flows: +- [Onboarding Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/turbo-upi.md#onboarding-flow) +- [Transactional Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/turbo-upi.md#transactional-flow) +- [ Non-Transactional Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/turbo-upi.md#non-transactional-flow) + +## Onboarding Flow + +Follow the steps to onboard customers: + +1. The customer navigates to your app's checkout screen and taps **+Link bank account**. + ![Razorpay Turbo UPI- Add bank account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-std-add-bank.jpg.md) +2. The customer needs to give permission so that we can validate the phone number with the bank. + ![Razorpay Turbo UPI- Allow Phone Permission](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-std-allow-phone.jpg.md) +3. The customer is shown a list of banks from which they can select one. + ![Razorpay Turbo UPI- Bank Selection](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-custom-select-bank-account.png.md) +4. This adds the customer's bank account. After the onboarding is complete the customer can also set up their UPI PIN. + ![Razorpay Turbo UPI- Bank Account Linked](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-in-app-acc-linked.jpg.md) +5. The customer can complete the payment using the newly added Bank account. + +> **INFO** +> +> +> **Handy Tips** +> +> If you have not set up the UPI PIN before, additional standard steps will be required, including entering card details and setting up the PIN. +> + +## Transactional Flow + +Transactional flow is the user journey of making the payment via Turbo UPI. + +1. The customer proceeds to the checkout and selects the bank account they want to make the payment. +2. The customer enters the UPI PIN. + +## Non-Transactional Flow + +The following methods should also be integrated along with Turbo UPI: + +- **Delete linked Bank Account**: Customers can delete their existing bank account linked to your app. +- **Check Balance**: Customers can check their account balance on your app. +- **Reset UPI PIN**: Customer can reset their UPI PIN for the bank account linked to your app. +- **Change UPI PIN**: Customer can change their UPI PIN for the bank account linked to your app. + +![View the non-transactional flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/turbo-upi-non-transactional.jpg.md) + +## Integrate Turbo UPI + +Perform the following steps to integrate Turbo UPI: + + + - [Android Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/turbo-upi.md) + - [iOS Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard/payment-methods/turbo-upi.md) + + + - [Android Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/custom/payment-methods/turbo-upi.md) + - [iOS Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom/payment-methods/turbo-upi.md) diff --git a/llm-content/payments/payment-methods/upi/upi-intent.md b/llm-content/payments/payment-methods/upi/upi-intent.md new file mode 100644 index 00000000..50d7de49 --- /dev/null +++ b/llm-content/payments/payment-methods/upi/upi-intent.md @@ -0,0 +1,284 @@ +--- +title: UPI Intent +description: Accept payments from your customers via UPI app on your mobile that supports the Intent flow using Razorpay. +--- + +# UPI Intent + +You can make UPI payments easier for your customers by enabling UPI Intent on your application Checkout. + +### Benefits +Enjoy the benefits such as higher conversion rates, decrease in abandoned carts and a decrease in time to complete the payment. Your customers are also benefited in the following ways: + +- No need to handle push or SMS notifications. +- No need to switch between applications to complete a payment (merchant, SMS and app). +- No need to remember their VPAs. + +## Understand Intent flow + +The payment flow for UPI Intent payments is given below. + +![Payment Flow for UPI Intent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-flow-upi_intent.jpg.md) + +1. In the UPI Intent flow, the customer selects UPI as the payment method on your website or app. A list of UPI apps supporting the intent flow is displayed. + + +> **WARN** +> +> +> **Watch Out!** +> +> By default, the top PSP (Payment Service Provider) apps appear on the customer's mobile irrespective of the installation status of the UPI apps. +> + + +2. The customers select their preferred app. The UPI app opens with pre-populated payment details. +3. The customers enter their UPI PIN to complete their transactions. +4. After the payment is successful, the customers are redirected to your app or website. + + +### Supported Platforms + + UPI Intent is supported on **mWeb (Android)** and **Mobile App (WebView)**. On **Desktop Web**, UPI Intent is not supported, a QR code is automatically displayed instead. + + + Platform | Procedure + --- + **mWeb** | Customers are redirected to their preferred UPI app to complete the payment. For the complete integration guide, refer to [UPI Intent on Mobile Web](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/payment-methods/upi-intent-mweb.md). + --- + **Mobile App (WebView)** | UPI Intent requires deep link handling in your Android or iOS app to launch UPI apps from the WebView. For the complete integration guide, refer to [UPI Intent in WebView: Android](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/webview/upi-intent-android.md) and [UPI Intent in WebView: iOS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/webview/upi-intent-ios.md). + --- + **Desktop Web** | UPI Intent is not supported. A QR code is automatically displayed for customers to scan with their preferred UPI app. No additional code changes are required. + + + +## Integrate on Android, iOS and Mobile Web + + + Use the Android SDK to support UPI Intent payments when a payment is processed through Razorpay in a WebView inside an app. + + ![UPI Checkout with Intent Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-pm-upi-intent-android.gif.md) + + #### Installation + + Download the JAR file and include it in the `libs` folder. + + #### Initialisation + + To initiate the SDK, call the Razorpay class constructor in your project and pass `key` as Razorpay API key and `webView` as the object that handles the payment flow. + + ```java: Java + import com.razorpay.Razorpay + + Razorpay razorpay = new Razorpay(key, webView, activity); + ```java: Kotlin + import com.razorpay.Razorpay; + + val razorpay = Razorpay(key, webview, activity) + ``` + + #### Passing Result to Razorpay + + After UPI is selected as the payment method, Razorpay invokes the **Intent Flow** page that lists all the available intent flows for the user to select and make the payment. Upon payment completion, the UPI app returns the result back to your `activity` in `onActivityResult` method. This should be passed to Razorpay as shown below: + + ```java: Java + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + if (requestCode == Razorpay.UPI_INTENT_REQUEST_CODE) { + razorpay.onActivityResult(requestCode, resultCode, data); + } + } + ```java: Kotlin + override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { + super.onActivityResult(requestCode, resultCode, data) + if (requestCode == Razorpay.UPI_INTENT_REQUEST_CODE) { + razorpay.onActivityResult(requestCode, resultCode, data) + } + } + ``` + + Refer to the [list of supported UPI intent apps for Android SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/supported-apps.md). + + + + Use the iOS Standard SDK to support UPI Intent payments on your iOS apps. + + ![Payment Process on iOS Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-intent-ios.gif.md) + + #### Prerequisites + + - Sign up for a Razorpay account. + - [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. + + + #### iOS Standard Checkout + + To enable UPI Intent on your iOS app's Standard Checkout: + + 1. Ensure that the [latest version of the iOS Standard SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard.md#list-of-razorpay-ios-standard-sdk-versions-last) is integrated with your app. + + 2. Your iOS app must seek permission from the device to open the UPI PSP app that the customer selects on Checkout. For this, you must make the following changes in your iOS app's info.plist file. + + ```xml: info.plist + LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + + + ``` + + #### UPI Intent on Recurring Payments + + Configure and initiate a recurring payment transaction on UPI Intent: + + ```swift: ViewController.swift + let options: [String:Any] = [ + "key": "YOUR_KEY_ID", + "order_id": "order_DBJOWzybfXXXX", + "customer_id": "cust_BtQNqzmBlXXXX", + "prefill": [ + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + ], + "image": "https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + "amount": 10000, // Amount should match the order amount + "currency": "INR", + "recurring": 1 // This key value pair is mandatory for Intent Recurring Payment. + ] + ```objectivec: ViewController.m + NSDictionary *options = @{ + @"key": @"YOUR_KEY_ID", + @"order_id": @"order_DBJOWzybfXXXX", + @"customer_id": @"cust_BtQNqzmBlXXXX", + @"prefill": @{ + @"contact": @"+919000090000", + @"email": @"gaurav.kumar@example.com" + }, + @"image": @"https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + @"amount": @(10000), // Amount should match the order amount + @"currency": @"INR", + @"recurring": @(1) // This key value pair is mandatory for Intent Recurring Payment. + }; + ``` + + + Using Razorpay you can let your customers make UPI Intent payments on your mobile website. + For example, when the customer selects a UPI PSP, the PSP app opens automatically. Customers can then proceed with the payment without navigating away from your mobile website. This leads to a faster checkout experience with higher success rates. + + +> **INFO** +> +> +> **Feature Enablement** +> +> The UPI Intent feature is usually available by default. If you are unable to access this feature, to get this enabled on your account. +> + + #### Features + + - The UPI intent on mobile web is available at Razorpay Standard Checkout and other products such as Payment Links, Payment Pages and Invoices. + - It works for UPI PSP apps. + + +> **WARN** +> +> +> **Watch Out!** +> +> By default, the top PSP apps appear on the customer's mobile irrespective of the installation status of the UPI apps. +> + + + - It works only on Android smartphones. + + #### Prerequisites + - . + - [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md) from the Dashboard. + - Integrate Razorpay Standard Checkout on your [Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + + #### Standard Checkout + + UPI Intent for mobile websites works automatically if the intent flow is enabled on your account. You can enable UPI Intent in WebView on your [Android app ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-android.md)or [iOS app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-ios.md). + + ### List of Supported UPI Intent Apps + + Given below is the list of supported UPI apps for Mobile Web: + + #### Android + + + Sr. No | App Name + --- + 1 | Google Pay + --- + 2 | PhonePe + --- + 3 | CRED + --- + 4 | PayTM + --- + 5 | BHIM + --- + 6 | AmazonPay + --- + 7 | iMobile by ICICI + --- + 8 | PayZapp + --- + 9 | Mobikwik + --- + 10 | Navi + + + #### iOS + + + Sr. No | App Name + --- + 1 | Google Pay + --- + 2 | PhonePe + --- + 3 | CRED + --- + 4 | PayTM + --- + 5 | BHIM + + + + +## Best Practices + +Following are the best practices to be followed to accept online payments using UPI intent flow. +You must show the list of UPI apps in 2 sections: +- Top performing apps (GPAY > PhonePe > Paytm > BHIM) +- Other apps + +### Related Information + +- [UPI Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) +- [UPI Transaction Limits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/transaction-limits/upi.md) diff --git a/llm-content/payments/payment-methods/upi/upi-intent/android.md b/llm-content/payments/payment-methods/upi/upi-intent/android.md new file mode 100644 index 00000000..29c8ab7b --- /dev/null +++ b/llm-content/payments/payment-methods/upi/upi-intent/android.md @@ -0,0 +1,49 @@ +--- +title: UPI Intent Flow for Android SDK +description: Use the Android UPI Intent SDK to accept UPI payments from your Android device customers. +--- + +# UPI Intent Flow for Android SDK + +Use the Android SDK to support UPI Intent payments when a payment is processed through Razorpay in a WebView inside an app. + +![UPI Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-checkout-header-changes.jpg.md) + +## Installation + +Download the JAR file and include it in the `libs` folder. + +## Initialization + +To initiate the SDK, call the Razorpay class constructor in your project and pass `key` as Razorpay API key and `webView` as the object that handles the payment flow. + +```java: Java +import com.razorpay.Razorpay + +Razorpay razorpay = new Razorpay(key, webView, activity); +```java: Kotlin +import com.razorpay.Razorpay; + +val razorpay = Razorpay(key, webview, activity) +``` + +### Passing the Result to Razorpay + +After UPI is selected as the payment method, Razorpay invokes the *Intent Flow* page that lists all the available intent flows for the user to select and make the payment. Upon payment completion, the UPI app returns the result back to your `activity` in `onActivityResult` method. This should be passed to Razorpay as shown below: + +```java: Java +@Override +protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + if (requestCode == Razorpay.UPI_INTENT_REQUEST_CODE) { + razorpay.onActivityResult(requestCode, resultCode, data); + } +} +```java: Kotlin +override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { + super.onActivityResult(requestCode, resultCode, data) + if (requestCode == Razorpay.UPI_INTENT_REQUEST_CODE) { + razorpay.onActivityResult(requestCode, resultCode, data) + } +} +``` diff --git a/llm-content/payments/payment-methods/upi/upi-intent/ios.md b/llm-content/payments/payment-methods/upi/upi-intent/ios.md new file mode 100644 index 00000000..242c413e --- /dev/null +++ b/llm-content/payments/payment-methods/upi/upi-intent/ios.md @@ -0,0 +1,87 @@ +--- +title: UPI Intent Flow for iOS SDK +description: Use iOS UPI Intent SDK to accept UPI payments from your iOS device customers. +--- + +# UPI Intent Flow for iOS SDK + +Use the iOS Standard SDK to support UPI Intent payments on your iOS apps. We support UPI Intent on iOS for these PSP apps: +- Google Pay +- PhonePe +- Paytm + +![Payment Process on iOS Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-intent-ios.gif.md) + +## Prerequisites +- Sign up for a Razorpay account. +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + +## iOS Standard Checkout + +To enable UPI Intent on your iOS app's Standard Checkout: + +1. Ensure that the [latest version of the iOS Standard SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard.md#list-of-razorpay-ios-standard-sdk-versions-last) is integrated with your app. +2. Your iOS app must seek permission from the device to open the UPI PSP app that the customer selects on Checkout. For this, you must make the following changes in your iOS app's info.plist file. + +```xml: info.plist +LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + +``` + +## UPI Intent on Recurring Payments + +Configure and initiate a recurring payment transaction on UPI Intent: + +```swift: ViewController.swift +let options: [String:Any] = [ + "key": "YOUR_KEY_ID", + "order_id": "order_DBJOWzybfXXXX", + "customer_id": "cust_BtQNqzmBlXXXX", + "prefill": [ + "contact": "+919000090000", + "email": "gaurav.kumar@example.com" + ], + "image": "https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + "amount": 10000, // Amount should match the order amount + "currency": "INR", + "recurring": 1 // This key value pair is mandatory for Intent Recurring Payment. +] +```objectivec: ViewController.m +NSDictionary *options = @{ + @"key": @"YOUR_KEY_ID", + @"order_id": @"order_DBJOWzybfXXXX", + @"customer_id": @"cust_BtQNqzmBlXXXX", + @"prefill": @{ + @"contact": @"+919000090000", + @"email": @"gaurav.kumar@example.com" + }, + @"image": @"https://spaceplace.nasa.gov/templates/featured/sun/sunburn300.png", + @"amount": @(10000), // Amount should match the order amount + @"currency": @"INR", + @"recurring": @(1) // This key value pair is mandatory for Intent Recurring Payment. +}; +``` diff --git a/llm-content/payments/payment-methods/upi/upi-intent/mobile-web.md b/llm-content/payments/payment-methods/upi/upi-intent/mobile-web.md new file mode 100644 index 00000000..c1709942 --- /dev/null +++ b/llm-content/payments/payment-methods/upi/upi-intent/mobile-web.md @@ -0,0 +1,49 @@ +--- +title: UPI Intent Flow for Mobile Web +description: Let your customers make UPI Intent payments on your mobile websites. +--- + +# UPI Intent Flow for Mobile Web + +Using Razorpay you can let your customers make UPI Intent payments on your mobile website. +For example, when the customer selects a UPI PSP, the PSP app opens automatically. Customers can then proceed with the payment without navigating away from your mobile website. This leads to a faster checkout experience with higher success rates. + +> **INFO** +> +> +> **Feature Enablement** +> +> The UPI Intent feature is usually available by default. If you are unable to access this feature, raise a request with our [Support team](https://razorpay.com/support/#request) to get this enabled on your Razorpay account. +> + +Watch the video below to see the payment flow via UPI Intent on Mobile Web. + +[Video: https://www.youtube.com/embed/d3eZE-xPBCY] + +## Features + +- The UPI intent on mobile web is available at Razorpay Standard Checkout and other products such as Payment Links, Payment Pages and Invoices. +- It works for UPI PSP apps. + + +> **WARN** +> +> +> **Watch Out!** +> +> By default, the top PSP apps appear on the customer's mobile irrespective of the installation status of the UPI apps. +> + + +- It works only on Android smartphones. + +## Prerequisites +- [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. +- Integrate Razorpay Standard Checkout on your [Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). + +## Standard Checkout + +UPI Intent for mobile websites works automatically if the intent flow is enabled on your account. You can enable UPI Intent in WebView on your: +- [Android app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-android.md) +- [iOS app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/webview/upi-intent-ios.md) diff --git a/llm-content/payments/payment-methods/upi/upi-intent/s2s-integration.md b/llm-content/payments/payment-methods/upi/upi-intent/s2s-integration.md new file mode 100644 index 00000000..995b2fbc --- /dev/null +++ b/llm-content/payments/payment-methods/upi/upi-intent/s2s-integration.md @@ -0,0 +1,410 @@ +--- +title: UPI Intent on iOS - S2S +description: Integrate with Razorpay APIs to support UPI Intent flow on your app. +--- + +# UPI Intent on iOS - S2S + +You can collect payments using the UPI intent flow that is handled by UPI apps installed on your customers' mobile devices. We support UPI Intent on iOS for these PSP apps: +- Google Pay +- PhonePe +- Paytm + +## Prerequisites + +- Sign up for a Razorpay account. +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + +## Workflow + +To enable UPI Intent on your customer's iOS device: + +1. [Create an Order](#step-1-create-an-order). +2. [Update your iOS app's `info.plist` file](#step-2-update-your-apps-infoplist-file). +3. [Check availability of PSP app on customer's device](#step-3-check-availability-of-psp-app-on). +4. [Initiate Payment using the intent URL](#step-4-initiate-the-payment). +5. [Deep link the URL by prefixing App Name](#step-5-deep-link-the-url-by-prefixing). +6. [Verify Payment Status](#step-6-verify-payment-status). + +### Step 1: Create an Order + +**Order is an important step in the payment process.** + +- An order should be created for every payment. +- You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) Orders API. +- The `order_id` received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered. + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + +You can create an order: +- Using the sample code on the Razorpay Postman Public Workspace. +- By manually integrating the API sample codes on your server. + +#### Razorpay Postman Public Workspace + +You can use the Postman workspace below to create an order: + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/request/12492020-6f15a901-06ea-4224-b396-15cd94c6148d) + +> **INFO** +> +> +> **Handy Tips** +> +> Under the **Authorization** section in Postman, select **Basic Auth** and add the Key Id and secret as the Username and Password, respectively. +> + +#### API Sample Code + +Use this endpoint to create an order using the Orders API. + +/orders + +```curl: Curl +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 500, + "currency": "INR", + "receipt": "qwsaq1", + "partial_payment": true, + "first_payment_min_amount": 230, + "notes": { + "key1": "value3", + "key2": "value2" + } +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); +```Python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 50000); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) +``` + +```json: Success Response +{ + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1642662092 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Order amount less than minimum amount allowed", + "source": "business", + "step": "payment_initiation", + "reason": "input_validation_failed", + "metadata": {}, + "field": "amount" + } +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) parameters table. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + + +### Step 2: Update your app's info.plist file + +Your iOS app must seek permission from the device to open the UPI PSP app that the customer selects on Checkout. For this, you must make the following changes in your iOS app's info.plist file. + +```xml: info.plist +LSApplicationQueriesSchemes + + tez + phonepe + paytmmp + credpay + mobikwik + in.fampay.app + bhim + amazonpay + navi + kiwi + payzapp + jupiter + omnicard + icici + popclubapp + sbiyono + myjio + slice-upi + bobupi + shriramone + indusmobile + whatsapp + kotakbank + +``` + +### Step 3: Check Availability of PSP App on Customer Device + +You must ensure that the UPI PSP app (Google Pay, PhonePe or Paytm) is available on the customer's device. This can be done by checking the URI scheme. + +If an app is not available, it will not be displayed on the Checkout. For example, if you want to determine availability of PhonePe on customer's device: + +```js: Check PSP App Availability +let urlPhonePe = "phonepe://" // This will open PhonePe URL. + +if let urlString = urlPhonePe.addingPercentEncoding(withAllowedCharacters: NSCharacterSet.urlQueryAllowed) { + if let phonepeURL = URL(string: urlString) { + if UIApplication.shared.canOpenURL(phonepeURL) { + //Show Phonepe image + } else { + // Hide Phonepe icon + } + } + } +``` + +### Step 4: Initiate the Payment + +/payments/create/upi + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/upi \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "order_id": "order_DBJOWzybf0sJbb", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "flow": "intent", + "ip": "105.106.107.108", + "referer": "http://merchantsite.com/pay", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "purpose": "UPI test payment" + } +}' +``` json: Response +{ + "razorpay_payment_id": "pay_FEmLehpBBG0ntV", + "link": "upi://pay?pa=upi@razopay&pn=Acme&tr=z5WHDd077OGFvPK&tn=razorpay&am=1&cu=INR&mc=5411" +} +``` + +#### Request Parameters + +Following are the request parameters: + +`amount` _mandatory_ +: `integer` Amount in paisa. The amount associated with the payment in smallest unit of the supported currency. For example, 2000 means ₹20. + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the payment amount. In this case, it is `INR`. + +`order_id` _mandatory_ +: `string` Unique identifier of the order, obtained from the response of the previous step. + +`contact` _mandatory_ +: `string` Phone number of the customer. + +`email` _mandatory_ +: `string` Email address of the customer. + +`method` _mandatory_ +: `string` Method used to make the payment. Here, it is `upi`. + +`flow` _mandatory_ +: `string` Type of the UPI method. In this case, it is `flow`. + +`ip` _mandatory_ +: `string` Client's browser IP address. For example, **117.217.74.98** + +`referer` _mandatory_ +: `string` Value of the`referer` header passed by the client's browser. For example, **https://example.com/** + +`user_agent` _mandatory_ +: `string` Value of the `user_agent` header passed by client's browser. For example, **Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36** + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`description` _optional_ +: `string` Descriptive text of the payment. + +`callback_URL` _optional_ +: `string` URL where Razorpay will submit the final payment status. + +### Step 5: Deep link the URL by prefixing App Name + +After the URL is generated in the response of the previous step, you should edit it and prefix the app name to the URL. For example, if you detect the presence of PhonePe on the customer's device, you should add a prefix to the URL as shown below: + +Original URL | Edited URL +--- +upi://pay?pa=upi@razopay&pn=Acme&tr=z5WHDd077OGFvPK&tn=razorpay&am=1&cu=INR&mc=5411 | phonepe://pay?pa=upi@razorpay&pn=Acme&tr=99fz4Q6LKearD1B&tn=razorpay&am=1&cu=INR&mc=5411 + +For Google Pay and Paytm, you should append the prefix to the URL as shown: + +App Name | Prefix-appended URL +--- +Google Pay | tez://upi/pay?pa=upi@razorpay&pn=Acme&tr=99fz4Q6LKearD1B&tn=razorpay&am=1&cu=INR&mc=5411 +--- +Paytm | paytmmp://upi/pay?pa=upi@razorpay&pn=Acme&tr=99fz4Q6LKearD1B&tn=razorpay&am=1&cu=INR&mc=5411 + +### Step 6: Verify Payment Status + +You can subscribe to the `order.paid`, `payment.authorized` and `payment.captured` Webhook events to get notified once the customer completes the UPI payment. Know more about[ Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + +You can also poll our APIs at regular intervals to track the status of the [payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-payments-based-on-orders) made for an order. + +#### Payment Failure and Re-initiating Payments + +If the order is not marked `paid` within 2-3 minutes, you can re-initiate payment for the same order. diff --git a/llm-content/payments/payment-methods/upi/vpa-validation.md b/llm-content/payments/payment-methods/upi/vpa-validation.md new file mode 100644 index 00000000..a47d6c6d --- /dev/null +++ b/llm-content/payments/payment-methods/upi/vpa-validation.md @@ -0,0 +1,72 @@ +--- +title: Validate VPA +description: Validate a customer's virtual payment address(VPA) used for making UPI collect payments. +--- + +# Validate VPA + +In UPI collect flow, the customers enter Virtual Payment Address (VPA) to make the payment. You can confirm the validity of VPA by sending an API request to Razorpay. + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/upi-intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/standard-integration.md). +> + +### API Sample Code + +/payments/validate/vpa + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/validate/vpa \ +-H "Content-Type: application/json" \ +-d '{ + "vpa": "gauravkumar@exampleupi" +}' +```json: Response +{ + "vpa": "gauravkumar@exampleupi", + "success": true, + "customer_name": "Gaurav Kumar" +} +``` + + + `vpa` _mandatory_ + : `string` The virtual payment address (VPA) you want to validate. For example, `gauravkumar@exampleupi`. + + +> **WARN** +> +> +> **Deprecation Notice** +> +> UPI Collect is deprecated effective 28 February 2026. This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [ migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/standard-integration.md) to switch to UPI Intent. +> + + + + `vpa` + : `string` The virtual payment address (VPA) sent as the request attribute. In this case, `gauravkumar@exampleupi`. + + `success` + : `boolean` Indicates whether the VPA exists. Possible values: + - `true`: The VPA exists. + - `false`: The VPA does not exist. + + `customer_name` + : `string` The name linked to the VPA. For example, `Gaurav Kumar`. Appears only when the value of `success` is `true`. diff --git a/llm-content/payments/payment-methods/upi/wallets-on-upi.md b/llm-content/payments/payment-methods/upi/wallets-on-upi.md new file mode 100644 index 00000000..46b1a10b --- /dev/null +++ b/llm-content/payments/payment-methods/upi/wallets-on-upi.md @@ -0,0 +1,117 @@ +--- +title: Prepaid Wallets on UPI +description: Offer Prepaid Wallets on UPI as a payment method to your customers. +--- + +# Prepaid Wallets on UPI + +Leverage the full potential of UPI Payments by integrating Prepaid Payment Instruments. + + Watch this video to know more about Prepaid Wallets on UPI. + +[Video: https://www.youtube.com/embed/2z5vI3SL7uY?si=EPw3-M2404o34YNy] + + + +### Advantages + + + - Increased touch points to make payments via their prepaid wallets irrespective of the wallets integrated with your business. + - Ease of completing wallet payments with better reach on UPI. + - Store money in their wallet without worrying about the amount being stuck in the wallet. + + + - Accept prepaid digital wallet payments without the costs of integration with a wallet issuer. + - Experience a high success rate of one-step wallet transactions on UPI. + - Enhance the payment experience for customers, ensuring a smoother process. + + +## Frequently Asked Questions (FAQs) + + +### 1. How can customers link their digital wallets to UPI? + + To link a wallet to UPI, customers need to: + 1. Head over to the wallet issuer app (Amazon Pay, PhonePe) on their smartphone. + 2. Secure a VPA address issued by the wallet issuer through mobile number verification. + 3. Once the VPA address is assigned, the registration of the wallet on UPI is complete. + + +> **INFO** +> +> +> **Handy Tips** +> +> Only those who have completed the KYC verification process can link their wallets with UPI. +> + + + + +### 2. How will the customer make a UPI payment with wallets? + + To make a payment via digital wallets on UPI: + 1. The customer can scan the UPI QR through their wallet app and make wallet payments on UPI. No UPI PIN is required while making a wallet transaction on UPI. + 2. The customer can also enter the VPA address or the phone number linked to their registered wallet on the checkout page to make UPI payments. + + +> **WARN** +> +> +> **Watch Out!** +> +> The mobile number linked to UPI should be in use on the smartphone and should be the same number linked to the wallet. +> + + + + +### 3. How can I identify UPI payments made using prepaid wallets? + + You can retrieve the details of the account type (bank account or credit card) used for UPI payments through the Payment Webhook, Fetch Payment API, and the Dashboard. + + - **Payment Webhook**: The payment entity will now include the payer account type details. Refer to the [Payment Authorized Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payment-authorized). + - **Fetch Payment API**: The payment entity will now include the payer account type details. Refer to the [Fetch API sample code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#expanded-upi). + - **On the Dashboard** : + 1. Click on a UPI payment to look at the payment details. + 2. The payment drawer will display the following information for wallet payments on UPI: + 1. Payment Method: UPI + 2. Paid from: Wallet + ![Image shows Wallet payment via UPI on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/wallet-upi-dashboard.jpg.md) + + + + + +### 4. What is the coverage of wallet acceptance via UPI? + + The following wallet issuers support linking wallets to UPI: + - Amazon Pay + - PhonePe + - Fampay + - OneCard + + In terms of bank coverage, the following banks will identify wallet transactions on UPI from **30th August 2023**: + - Axis Bank + - HDFC Bank + - Yes Bank + - ICICI Bank + + + +### 5. How do I enable wallet transactions via UPI for my business? + + Razorpay will take care of enabling this feature for you. + + + +### 6. Will I be charged for wallet transactions via UPI? + + A Platform fee of 2% is levied for all wallet transactions via UPI. This pricing is determined by rates shared by banks and a wallet issuer service charge. + + + + +### 7. Which businesses are currently not supported from accepting wallet payments on UPI? + + You will not be able to accept wallet payments on UPI if you fall under the [**businesses on Customer fee bearer (CFB)**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/configuration/convenience-fees.md) category. diff --git a/llm-content/payments/payment-methods/wallets.md b/llm-content/payments/payment-methods/wallets.md new file mode 100644 index 00000000..45c36153 --- /dev/null +++ b/llm-content/payments/payment-methods/wallets.md @@ -0,0 +1,100 @@ +--- +title: About Wallets +description: Accept payments using various Wallets like Bajaj Pay, Amazon Pay, PayPal and more at Razorpay Checkout. +--- + +# About Wallets + +With Razorpay, you can offer your customers Wallets as a payment method. A digital wallet is like a virtual version of your physical wallet. It stores your money and payment methods electronically on your device. You can use it to make quick and secure payments online or in stores, providing convenience and an extra layer of security compared to traditional methods. + +## Enable Wallets on Dashboard + +You can view the wallets enabled for your Razorpay account from the **Account & Settings** → **Payment methods** tab. + +![Enable Wallet - Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-pm-wallets.jpg.md) + +> **INFO** +> +> +> +> **Additional Payment Methods** +> +> You can raise requests for [additional payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md#request-for-payment-methods). Know more about [Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/payment-methods.md#request-for-payment-methods). +> + +## Supported Wallets + +The table below lists the various wallets available to you. Some of them are available by default, while others require approval from us. Raise a request with our [ Support Team](https://razorpay.com/support/#request) to enable such wallets. + +Wallet Provider | Availability | Wallet Code +--- +PayZapp | Requires [approval](https://razorpay.com/support) | `payzapp` +--- +Airtel Money | ✓ | `airtelmoney` +--- +MobiKwik | ✓ | `mobikwik` +--- +JioMoney | ✓ | `jiomoney` +--- +Ola Money | ✓ | `olamoney` +--- +Bajaj Pay | Requires [approval](https://razorpay.com/support) | `bajajpay` +--- +PhonePe | Requires [approval](https://razorpay.com/support) | `phonepe` +--- +[PhonePe Switch](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md) | **For businesses registered with PhonePe Switch only** | `phonepeswitch` +--- +[PayPal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paypal.md) | **International Payments Only**. +Requires [approval](https://razorpay.com/support) | `paypal` +--- +[Amazon Pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/amazon-pay.md)| Requires [approval](https://razorpay.com/support) | `amazonpay` + +. + +Wallet Provider | Wallet Code | Availability +--- +PayZapp | `payzapp` | Requires approval (Reach out to support team) +--- +Airtel Money | `airtelmoney` | ✓ +--- +MobiKwik | `mobikwik` | ✓ +--- +JioMoney| `jiomoney` | ✓ +--- +Ola Money | `olamoney` | ✓ +--- +PhonePe | `phonepe` | Requires approval (Reach out to support team) +--- +[PhonePe Switch](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md) | `phonepeswitch` | **For businesses registered with PhonePe Switch only** +--- +[PayPal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paypal.md) | `paypal` | **International Payments Only** +Requires approval (Reach out to support team) +--- +[Amazon Pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/amazon-pay.md) | `amazonpay` | Requires approval (Reach out to support team) + +## Related Information + +[Payment Methods and Transaction Limit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/transaction-limits.md#payment-methods-and-transaction-limits) + +. + +Wallet Provider | Wallet Code | Availability +--- +PayZapp | `payzapp` | Requires approval (Reach out to support team) +--- +Airtel Money | `airtelmoney` | ✓ +--- +MobiKwik | `mobikwik` | ✓ +--- +JioMoney| `jiomoney` | ✓ +--- +Ola Money | `olamoney` | ✓ +--- +PhonePe | `phonepe` | Requires approval (Reach out to support team) +--- +[PhonePe Switch](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/phonepe-switch.md) | `phonepeswitch` | **For businesses registered with PhonePe Switch only** +--- +[PayPal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paypal.md) | `paypal` | **International Payments Only** +Requires approval (Reach out to support team) +--- +[Amazon Pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/amazon-pay.md) | `amazonpay` | Requires approval (Reach out to support team) diff --git a/llm-content/payments/payment-methods/wallets/amazon-pay.md b/llm-content/payments/payment-methods/wallets/amazon-pay.md new file mode 100644 index 00000000..85324ae8 --- /dev/null +++ b/llm-content/payments/payment-methods/wallets/amazon-pay.md @@ -0,0 +1,98 @@ +--- +title: Amazon Pay - Standard Checkout +description: Offer Amazon Pay wallet as a payment method to your customers on Razorpay Standard Checkout. +--- + +# Amazon Pay - Standard Checkout + +Amazon Pay is a wallet-based payment method that allows customers with an Amazon account to make payments using their Amazon Pay balance. After Amazon Pay is enabled and integrated, it is listed on your website/app Checkout page as an option under the wallet payment method. Know more about [ Amazon Pay](https://www.amazonpay.in/). + + +### On-Demand Feature - Raise a Request + + + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + + + +## Integrate Amazon Pay on Standard Checkout - Web, Mobile and iOS + +You can accept payments through wallets which are available by default. However, if you want to accept payments from external wallets, such as Amazon Pay, integration is required. Razorpay does not process payments for external wallets and gives you the control along with all the customer data entered in the Checkout form. + +> **INFO** +> +> +> **Handy Tips** +> +> The wallet payment option can be used for a purchase amount of up to ₹20000 (2000000 in paise). +> +> + + + To list external wallets on your web application, you need to first integrate our [Checkout form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md). After you integrate, follow the steps given below: + + 1. Add a key `external` to `checkout.js` options. + 2. Set `wallets` with wallet name array in `external` as the first parameter. + + ```javascript: JavaScript + external: { + wallets: ['amazonpay'] + } + ``` + 3. Set `handler` with a callback function in `external` as the second parameter. + + ```javascript: JavaScript + external: { + wallets: ['amazonpay'], + handler: function(data) { + 'data' + console.log(this, data) + } + } + ``` + + The Amazon Pay is now shown in the wallets section. If the customer selects the external wallet and clicks **Submit**, our Standard Checkout library returns the control to you in the `external:handler:` method. You will get the selected wallet name as an argument. You will have to handle the payment flow for the wallet from hereon. + + + + To integrate Amazon Pay wallet with the Standard Checkout on your Android app: + + 1. Download the following SDKs and add the `aar` files to the application library. + - Download [Amazon-SDK](https://rzp-1415-prod-mobile.s3.amazonaws.com/android/googlepay-sdk/tez-client-api-0.9.4.aar). + - Download [Razorpay-Amazon Pay SDK](https://rzp-1415-prod-mobile.s3.amazonaws.com/android/googlepay-sdk/tez-client-api-0.9.4.aar). + +> **INFO** +> +> +> **Handy Tips** +> +> The Razorpay-Amazon Pay SDK acts as a wrapper over the native Amazon-SDK. +> + + 2. Add the following lines of code to the `build.gradle` file of your application: + + ```java: build.gradle + dependencies { + implementation(name: 'razorpay-amazonpay-1.3.0', ext: 'aar') + implementation(name:'PayWithAmazon', ext:'aar') + implementation 'com.android.support:customtabs:26.1.0' + } + ``` + This will add the dependencies for the SDK and display the Amazon Pay wallet on your Checkout form. + + ### iOS + + Amazon Pay as a payment method is available by default on iOS and no additional integration is needed. diff --git a/llm-content/payments/payment-methods/wallets/amazon-pay/custom-integration.md b/llm-content/payments/payment-methods/wallets/amazon-pay/custom-integration.md new file mode 100644 index 00000000..b9880f92 --- /dev/null +++ b/llm-content/payments/payment-methods/wallets/amazon-pay/custom-integration.md @@ -0,0 +1,139 @@ +--- +title: Amazon Pay - Custom Checkout +description: Let your customers make payments using the Amazon Pay payment method on the Razorpay Custom Checkout. +--- + +# Amazon Pay - Custom Checkout + +Amazon Pay is a wallet-based payment method that allows customers with an Amazon account to make payments using their Amazon Pay balance. After Amazon Pay is enabled and integrated, it is listed on your website/app Checkout page as an option under the wallet payment method. Know more about[ Amazon Pay](https://www.amazonpay.in/). + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Web Integration + +After an order is created and the customer's payment details are received, the information should be sent to Razorpay to complete the payment. You can do this by invoking `createPayment` method and passing `method = wallet` and `wallet=amazonpay`. + +```js: Example +razorpay.createPayment({ + amount: 5000, + email: 'gaurav.kumar@example.com', + contact: '9123456780', + order_id: 'order_9A33XWu170gUtm', + method: 'wallet', + wallet: 'amazonpay' +}); +``` + +## Android Integration + +To integrate Amazon Pay wallet with the Custom Checkout on your Android app: + +1. Download the following SDKs and add the `aar` files to the application library. + - Download [Amazon-SDK](https://rzp-1415-prod-mobile.s3.amazonaws.com/android/googlepay-sdk/tez-client-api-0.9.4.aar). + - Download [Razorpay-Amazon Pay SDK](https://rzp-1415-prod-mobile.s3.amazonaws.com/android/googlepay-sdk/tez-client-api-0.9.4.aar). + + +> **INFO** +> +> +> **Handy Tips** +> +> The Razorpay-Amazon Pay SDK acts as a wrapper over the native Amazon-SDK. +> + +1. Add the following lines of code to the `build.gradle` file of your application: + + ```java: build.gradle + dependencies { + implementation(name: 'razorpay-amazonpay-1.3.0', ext: 'aar') + implementation(name:'PayWithAmazon', ext:'aar') + } + ``` + +This will add the dependencies for the SDK and create an Amazon Pay payment method on your Checkout form. + +## iOS Integration + +The iOS integration for Amazon Pay is similar to the [Razorpay iOS Custom UI SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/custom.md) integration. + +> **INFO** +> +> +> **Handy Tips** +> +> - Always use the Live key with Amazon Pay, even for testing. +> + +> - Razorpay SDK has a minimum deployment target of iOS 10.0, built with Swift 4.2. It requires Xcode 10 and above to work. +> + +## Prerequisites + +Before you begin the integration, download the following SDKs: + - [Razorpay SDK](https://rzp-1415-prod-mobile.s3.amazonaws.com/android/googlepay-sdk/tez-client-api-0.9.4.aar) that has Amazon Pay enabled. + - [AmazonPay SDK](https://s3.ap-south-1.amazonaws.com/rzp-1415-prod-mobile/ios/CustomLinks/StripInvalidArchitectures.sh). + +## Integration Steps + +To use Amazon Pay via the Razorpay SDK: + +1. Add the Amazon Pay SDK to the project directory containing your _.xcodeproj_ or _.xcworkspace_ file. + +1. Add `$(PROJ_DIR)` to the framework search paths of your target and set the search type to recursive. + +1. Add the following code to your _info.plist_ file: + + ```xml + CFBundleURLTypes +     +         +            CFBundleURLName +            com.amazon.pwain +            CFBundleURLSchemes +             +                amzn.$(PRODUCT_BUNDLE_IDENTIFIER) +             +         +     + ``` + +1. Import the _PayWithAmazon_ file to your AppDelegate and implement the following function: + + ```swift: + func application(_ app: UIApplication, open url: URL, options: +        [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { +        #if canImport(PayWithAmazon) +        return PayWithAmazon.sharedInstance().handleRedirectURL(url, +          sourceApplication: "") +        #endif +        return false + } + ``` + +1. Use the following command to trigger Amazon Pay: + + ```swift: + let options: [String:Any] = [ +    "method": "wallet", +    "wallet": "amazonpay", +    "amount": 100, +    "contact": "9000090000", +    "email": "gaurav.kumar@example.com", +    "currency": "INR" + ] + razorpayInstance.payWithExternalPaymentEntity(options: dataSource.options) + ``` + + Here, `razorpayInstance` is an instance of Razorpay. diff --git a/llm-content/payments/payment-methods/wallets/bajaj-pay.md b/llm-content/payments/payment-methods/wallets/bajaj-pay.md new file mode 100644 index 00000000..6b9a776b --- /dev/null +++ b/llm-content/payments/payment-methods/wallets/bajaj-pay.md @@ -0,0 +1,52 @@ +--- +title: Bajaj Pay - Standard Checkout +description: Let your customers make payments using the Bajaj Pay wallet on Razorpay Standard Checkout. +--- + +# Bajaj Pay - Standard Checkout + +Bajaj Pay Wallet is a secure digital wallet that simplifies everyday payments for your customers. Customers can pay bills on the go or easily initiate fund transfers from their phones. + +## Enable Bajaj Pay Using Dashboard + +Enable Bajaj Pay payment method on the Dashboard if not already enabled: + +1. Log in to the Dashboard. +2. Navigate to **Account & Settings** → **Payment Methods**. +3. Select **Wallet**. +4. Click **Request** beside **Bajaj Pay Wallet**. + ![Dashboard image of bank transfer request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bajaj-pay-wallet-request.jpg.md) +5. A request form appears. Select the payment instrument to be enabled on your Checkout. Click **Save & Next**. +6. Fill in the required details and click **Save & Next**. + + +> **INFO** +> +> +> **Handy Tips** +> - If you are an existing business, some of the required details will be auto-filled. +> - You can click the **Edit** button to fill in the incomplete details before submitting the form. +> + +7. Fill in the **Management/Ownership** details in the form. When complete form details are filled, click **Submit Form**. +8. After the form is submitted, the request is sent to activate the selected payment instruments. The feature enablement request will take 2 business days to be approved. + +After the payment instrument is enabled, you will see the **Activated** status beside the selected one. + +### Standard Integration +After Bajaj Pay is enabled, it is listed on the Razorpay Standard Checkout as an option under the wallet payment method. No additional integration is needed. You can view the wallets enabled for your account under the **Account & Settings → Payment Methods** tab. + +## Payment Flow for Standard Checkout + +On your website or app, customers select the products and proceed to Checkout. On the Checkout page, the customers: + +1. Enter the **Phone Number** and click **Continue**. +2. Select **Wallet** as the payment method. + ![Select Wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-pm-wallets-checkout.jpg.md) +3. Select **Bajaj Pay** and click **Continue**. + ![Select Bajaj Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-pm-wallet-bajaj.jpg.md) +4. Enter the **OTP** sent to their mobile number. In case of insufficient balance, click **Add Funds**. + ![Bajaj Wallet - OTP Screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-pm-wallet-bajaj-otp.jpg.md) +5. The payment is completed if they have sufficient balance in the wallet. + +After the successful payment, customers are directed to your application or website. You receive the amount in your wallet as per your settlement cycle. diff --git a/llm-content/payments/payment-methods/wallets/boost.md b/llm-content/payments/payment-methods/wallets/boost.md new file mode 100644 index 00000000..70935f9f --- /dev/null +++ b/llm-content/payments/payment-methods/wallets/boost.md @@ -0,0 +1,22 @@ +--- +title: Boost +description: Offer your customers Boost as a payment method on Razorpay Curlec Standard Checkout. +--- + +# Boost + +Boost is a versatile electronic wallet (e-wallet) designed for the Malaysian market that offers a convenient way to manage and spend electronic money (e-money). With Boost, users can easily reload, make payments, and transfer funds directly from their smartphones, ensuring seamless transactions anytime and anywhere within Malaysia. + +## Boost Payment Flow on Desktop and Mobile + +Given below is the payment flow for Boost on Razorpay Curlec checkout: + + + 1. The customer selects **Wallets** → **Boost** at checkout. + 2. They are redirected to a web browser where a QR code is displayed. + 3. The customer uses the Boost app to scan the QR code, and complete the payment on their app. + + + 1. The customer selects **Wallets** → **Boost** at checkout. + 2. They are redirected to the Boost app on their phone. + 3. After completing the payment, the customer is redirected back to your website/app. diff --git a/llm-content/payments/payment-methods/wallets/external.md b/llm-content/payments/payment-methods/wallets/external.md new file mode 100644 index 00000000..840a178c --- /dev/null +++ b/llm-content/payments/payment-methods/wallets/external.md @@ -0,0 +1,139 @@ +--- +title: List of External Wallets +description: Accept payments through external wallets at Razorpay Checkout. +--- + +# List of External Wallets + +You can list external wallets (wallets not supported by Razorpay) on our Checkout form. Razorpay does not process payments for external wallets but hands over the control to you along with any other customer data entered in the checkout form. + +> **INFO** +> +> +> **Handy Tips** +> +> You must have a separate integration with the external wallet of choice. Razorpay passes the customer data, such as contact and email, entered in the Checkout to the handler object. You must pass this data to the external wallet integration. +> + +If you are using any of the following external wallets, you can make them appear in your checkout form. You must pass the required string value as an array against `external wallets`: + +Wallet Names | String Values +--- +Paytm | paytm +--- +Citrus Wallet | citrus +--- +Amazon Pay | amazonpay + +You can list these wallets on any of the following platforms: + +- **Web application** +- **Android** +- **iOS** + +> **INFO** +> +> +> **Handy Tips** +> +> The wallet payment method can be used for a purchase amount of up to ₹20000 (2000000 in paise). +> + +## Web Application + +To list external wallet on your web application, you need to first integrate our [checkout form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#checkout-options). After you integrate, follow the steps given below: + +1. Add a key `external` to `checkout.js` options. + +2. Set `wallets` with wallet name array in `external` as the first parameter. + + ```javascript: JavaScript + external: { + wallets: ['paytm'] + } + ``` +3. Set `handler` with a callback function in `external` as second parameter. This is where you receive a callback from which you can handle external wallets based on the parameters: + + ```javascript: JavaScript + external: { + wallets: ['paytm'], + handler: function (data) { + console.log(data) + } + } + ``` + +The external wallet sent in options will be shown in the wallets section. + +![](/docs/assets/images/external_wallet_checkout.jpg) + +If the customer selects external wallet and clicks **Submit**, our `checkout.js` library will return the control to you in the `external.handler` method. You will get the selected wallet name as an argument. You will now have to handle the external payment method. + +## Android + +To list external wallets on your Android app, you need to first integrate our [Android checkout SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard.md). After you integrate our Android checkout, follow the steps given below: + +1. Implement `ExternalWalletListener` in your activity. + + ``` + public class PaymentActivity extends Activity implements PaymentResultListener, ExternalWalletListener { + //.. + + @Override + public void onExternalWalletSelected(String walletName, PaymentData paymentData){ + // add your logic here to handle external wallet payments like + if(walletName.equals("paytm"){ + //handle paytm payment + } + + } + + } + ``` + +2. Send external wallet information to checkout in options. You can send it in the following way: + + ``` + JSONArray wallets = new JSONArray(); + wallets.put("paytm"); + JSONObject externals = new JSONObject(); + externals.put("wallets", wallets); + options.put("external", externals); + ``` +The external wallet sent in options will be shown in the wallets section. If the customer selects an external wallet and submits it, our SDK will return control to you in the `onExternalWalletSelected` method. You will get the selected wallet name as an argument. You will now have to handle your payment. + +## iOS + +To list external wallet on your iOS app, you need to first set up your framework. Know more about[ Razorpay iOS Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ios-integration/standard.md). Perform the following steps: + +1. Implement `ExternalWalletSelectionProtocol` in your view controller. + + ```ObjC + @interface ViewController () { + ``` + +2. Set `ExternalWalletSelectionDelegate` to get callback in delegate method. + + ```ObjC + [razorpay setExternalWalletSelectionDelegate:self]; + ``` + +3. Send external wallet information to Checkout in options. You can send it in the following way: + + ```ObjC + NSDictionary *options = @{ + @"amount" : @"20000", + @"currency" : @"INR", + @"description" : @"A Wild Sheep Chase is the third novel by Japanese author Haruki Murakami", + @"image" : http://example.com/your_logo.jpg, + @"name" : @"Gaurav Kumar", + @"external" : @{@"wallets" : @[ @"paytm" ]}, + @"prefill" : + @{@"email" : @"gaurav.kumar@example.com", @"contact" : @"9000090000"}, + @"theme" : @{@"color" : @"#3594E2"} + }; + ``` + +4. Implement `onExternalWalletSelected:WithPaymentData:` delegate method to receive callback and get control back. + +The external wallet sent in options will be shown in the wallets section. If the customer selects an external wallet and clicks **Submit**, our SDK will return control to you in the `onExternalWalletSelected` method. You will get the selected wallet name as an argument. You will now have to handle the external payment method. diff --git a/llm-content/payments/payment-methods/wallets/grab-pay.md b/llm-content/payments/payment-methods/wallets/grab-pay.md new file mode 100644 index 00000000..2ff5cb1b --- /dev/null +++ b/llm-content/payments/payment-methods/wallets/grab-pay.md @@ -0,0 +1,21 @@ +--- +title: GrabPay +description: Offer your customers GrabPay as a payment method on Razorpay Curlec Standard Checkout. +--- + +# GrabPay + +GrabPay is a digital wallet and online payment platform offered by Grab, a Singapore-based ride-hailing company. It allows users to pay for rides and other services within the Grab app, as well as make payments to businesses that accept GrabPay. + +To use GrabPay: +1. Users must first download the Grab app and set up an account. +2. They can then link their credit or debit card to their GrabPay account and start using the service. + +## GrabPay Payment Flow + +Given below is the payment flow for GrabPay on Razorpay Curlec checkout: + +1. The customer selects **Wallets** → **GrabPay** at checkout. +2. They are redirected to the GrabPay login page and sign in with their credentials. +3. They complete the authorisation process and select a payment option. +4. Upon payment completion, the customer receives a UI notification and is redirected to your website or app. diff --git a/llm-content/payments/payment-methods/wallets/mcash.md b/llm-content/payments/payment-methods/wallets/mcash.md new file mode 100644 index 00000000..3055d87a --- /dev/null +++ b/llm-content/payments/payment-methods/wallets/mcash.md @@ -0,0 +1,22 @@ +--- +title: MCash +description: Offer your customers MCash as a payment method on Razorpay Curlec Standard Checkout. +--- + +# MCash + +MCash is a digital wallet and online payment platform designed for Malaysian users. Developed with convenience and security in mind, MCash allows users to effortlessly manage their payments, whether it is for daily transactions, shopping online, or paying bills. It also supports peer-to-peer transfers, making it easier to send and receive money within Malaysia. + +To use MCash: + +1. Users must first download the MCash app and create an account. +2. They can then link their bank account or credit/debit card to their MCash account and start using the service instantly. + +## MCash Payment Flow + +Given below is the payment flow for MCash on Razorpay Curlec checkout: + +1. The customer selects **Wallets** → **MCash** at checkout. +2. They are redirected to the MCash login page and sign in with their credentials. +3. They complete the authorisation process and select a payment option. +4. Upon payment completion, the customer receives a UI notification and is redirected to your website or app. diff --git a/llm-content/payments/payment-methods/wallets/paypal.md b/llm-content/payments/payment-methods/wallets/paypal.md new file mode 100644 index 00000000..328647fa --- /dev/null +++ b/llm-content/payments/payment-methods/wallets/paypal.md @@ -0,0 +1,198 @@ +--- +title: PayPal +description: Integrate PayPal with Razorpay to accept international payments. Check how Razorpay handles currency conversions for you. +--- + +# PayPal + +PayPal is a payment method that you can integrate with your [Razorpay Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md#integration-types) to accept payments in [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +You can accept payments based on the transaction limit of your PayPal account. Know more about the other [payment methods and the transaction limits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/transaction-limits.md). + +### Advantages + +Integrating PayPal as a payment method on Checkout offers you the following advantages: + +- **Better Success Rates**: Enjoy up to 20% higher success rates. +- **Faster Settlement time**: Get paid on a T+1 settlement schedule. +- **Wide user base**: Reach Over 300 million PayPal users around the world. +- **No additional charges**: PayPal defines the rates for transactions. +- **Currency Conversion**: Handle currency conversions from INR to your customer's native currency. + +## Onboarding Process to Enable PayPal + +Watch this video to see the onboarding process to enable PayPal on your checkout form. + +[Video: https://www.youtube.com/embed/N5ZtN-_zye8?si=C0VWahb6kPT7Lk4s] + +> **INFO** +> +> +> **Handy Tips** +> +> - The PayPal section is visible only in the **Live** mode on the Dashboard. +> - PayPal now supports the Pay Later feature. You should enable both [PayPal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paypal.md#to-enable-paypal) and the Pay Later options under Account & Settings → Pay Later (under Payment methods) on the Dashboard to enable the Pay Later feature. +> +> + + +### To enable PayPal: + + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings** → **International payments** (under Payment methods). Scroll to the **PayPal** section and click **Link Account**. + ![Link PayPal Account on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/paypal-link-account.jpg.md) + 3. Upon redirection to PayPal: + - If you do not have a PayPal account, you need to complete the verification process and KYC. This will include confirming your email address by clicking on the link sent to you by PayPal. + - If you already have a PayPal account, you need to authorise Razorpay to accept payments. + + You should now be able to see your PayPal enablement status set to `Pending` on your Dashboard. PayPal will activate your account within 48 hours if all of the previous steps are successfully completed. + + You can now proceed with the integration. This depends on how you have integrated Razorpay on your website or application. + + By default, your PayPal account is configured to receive USD payments. You can enable more currencies on your account from your PayPal Dashboard. + + +> **WARN** +> +> +> **Watch Out!** +> +> - You should not use the same email ID for multiple MIDs. +> - Each business should set up a separate PayPal account for each MID. +> + + + +## Standard Checkout Integration + +If you are using Razorpay Standard Checkout, you just need to enable PayPal from your dashboard and complete the [onboarding procedure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets/paypal.md#onboarding-process-to-enable-paypal). After the onboarding is completed and PayPal is enabled for you, it appears on your checkout form for all supported currencies. + +## Currency Conversion + +Customers can use PayPal Currency Conversion to convert international payments in INR (or other currency) to a currency of their choice. This enables businesses to continue accepting payments via PayPal. + + +### Watch how currency conversion works at Razorpay checkout in this video + + +[Video content] + + + +- You will have your PayPal account configured to receive payments in all currencies. +- You can pass the currency in INR to Razorpay or enable more currencies on your account from your PayPal dashboard. +- Razorpay applies [open exchange rates](https://openexchangerates.org/) for currency conversion on an hourly basis. +- When converting currencies on a payment or transfer, the standard PayPal charges are applicable. + +> **INFO** +> +> +> **Handy Tips** +> +> - PayPal does not accept payment requests in INR. Razorpay facilitates currency conversions from INR to your customer's home currency. +> - By default, the PayPal conversion feature is enabled on Standard Checkout for all merchants with PayPal account linked with the Razorpay account. +> - This is currently supported only on Razorpay standard checkout integration. +> + +## Settlements + +You receive the payments made using PayPal directly to your PayPal wallet. PayPal makes the settlements in INR. + +## Refunds + +> **INFO** +> +> +> **Refunds - PayPal Balance Required** +> +> Ensure you have sufficient balance in your PayPal account before you initiate a refund. +> + +1. Refunds can be initiated by you either from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#issue-refunds) . +2. The refund amount is deducted from your PayPal account and credited to your customer's PayPal account. + +## Frequently Asked Questions (FAQs) + +. + + + +### 3. I have already registered for PayPal. How do I change the PayPal account which I had added to Razorpay? + + You can log in to your PayPal Dashboard, go to **Settings** and update your email address to your new account. + + If you want to keep both your accounts active, please raise a request with our [Support team](https://razorpay.com/support/). + + + +### 4. I have enabled PayPal and the status shows activated on my Dashboard. However, why is there no option to pay with PayPal on my checkout? + + PayPal will be shown on your checkout only if the purchasing currency is other than Indian Rupee (INR), for example, if the currency is USD or EUR. PayPal will not appear on your checkout otherwise. + + + +### 5. What is the pricing for PayPal? + + To know more about the pricing for PayPal check out the [documentation](https://www.paypal.com/in/webapps/mpp/paypal-seller-fees). + + + +### 6. By when will PayPal be activated on my Razorpay account? + + - **Existing PayPal Account**: Razorpay enables PayPal on your checkout in 2 days. + - **New PayPal Account**: After you complete all the onboarding steps on PayPal's website, Razorpay enables PayPal on your checkout within 5 working days. + + + +### 1. I am an existing Razorpay customer, are there any integration changes to be done to support international payments via Razorpay? + + There are no integration changes required for you to accept payments via an international debit or credit card. + However, if you want to display a foreign currency on your checkout, you need to pass the relevant code in the **currency** parameter in the Checkout code. + + + +### 2. How do I disable the PayPal payment method activated on my account? + + Please raise a support ticket with Razorpay over [here](https://razorpay.com/support/). + + + +### 3. I have already registered for PayPal. How do I change the PayPal account which I had added to Razorpay? + + You can log in to your PayPal Dashboard, go to **Settings** and update your email address to your new account. + + If you want to keep both your accounts active, please raise a request with our [Support team](https://razorpay.com/support/). + + + +### 4. I have completed my registration on PayPal. Why does my status on the Dashboard still say pending? + + Ensure you have uploaded your bank account and company details on the PayPal Dashboard before PayPal can complete your registration. + + Please log in to to your PayPal account and check if you have completed the 3 steps: + + a. Verify your email with PayPal. + + b. Upload and verify your PAN Card. + + c. Update your Bank Account details. + + + + +### 5. I have enabled PayPal and the status shows activated on my Dashboard. However, why is there no option to pay with PayPal on my checkout? + + PayPal will be shown on your checkout only if the purchasing currency is other than Indian Rupee (INR), for example, if the currency is USD or EUR. PayPal will not appear on your checkout otherwise. + + + +### 6. What is the pricing for PayPal? + + To know more about the pricing for PayPal check out the [documentation](https://www.paypal.com/in/webapps/mpp/paypal-seller-fees). + + + +### 7. By when will PayPal be activated on my Razorpay account? + + - **Existing PayPal Account**: Razorpay enables PayPal on your checkout in 2 days. + - **New PayPal Account**: After you complete all the onboarding steps on PayPal's website, Razorpay enables PayPal on your checkout within 5 working days. diff --git a/llm-content/payments/payment-methods/wallets/paytm.md b/llm-content/payments/payment-methods/wallets/paytm.md new file mode 100644 index 00000000..cb0dea88 --- /dev/null +++ b/llm-content/payments/payment-methods/wallets/paytm.md @@ -0,0 +1,89 @@ +--- +title: Paytm +description: Accept payments through Paytm wallet at Razorpay Checkout. +--- + +# Paytm + +Let your customers pay using their Paytm wallet on your website by integrating the wallet at the Razorpay Checkout. Once integrated, Paytm wallet appears under the Wallets section at the Razorpay Checkout: + +![Paytm Wallet on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/paytm-paytm-checkout.jpg.md) + +## Prerequisites + +- [Sign up](https://dashboard.razorpay.com/signup) for a Razorpay account. + +- Create a [Paytm account](https://dashboard.paytm.com/). + +## Enable Paytm Wallet on Razorpay Checkout + +1. [Get integration details from the Paytm Dashboard](#step-1-get-integration-details-from-the-paytm). +2. [Request access to Paytm as a payment method on the Razorpay Dashboard](#step-2-request-access-for-paytm-as-a). + +### Step 1: Get Integration Details from the Paytm Dashboard + +To get the integration details: +1. Log in to the [Paytm Merchant Dashboard](https://dashboard.paytm.com/). +2. Navigate to Developers → API Keys on the side menu. + + ![Developers API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/paytm-paytm-dashboard-api-key.jpg.md) +3. On the **API Keys** page, select **Production API Details**. + + ![Production API Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/paytm-api-details.jpg.md) +4. Click **Get integration key**. The following details are displayed: + + • Merchant ID + + • Merchant Key + + • Website Name + + • Industry Type + + ![Copy the details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/paytm-integration-key.jpg.md) +5. Copy the Merchant ID, Merchant Key, Website Name and Industry Type details from the **Production API Details** tab. + +#### Handle Non-availability of Paytm Production API details + +If Paytm Production API details are not available: + +1. Share the test API credentials with Razorpay. We will map the test account. +2. On receiving confirmation that the test account has been mapped, make three payments with Paytm on Razorpay `Test Mode`. A Payment ID will be generated for each payment. +3. Share these three Razorpay Payment IDs with Paytm. Paytm will acknowledge the test payments and enable Prod APIs on Paytm Dashboard. +4. Copy the Merchant ID, Merchant Key, Website Name and Industry Type details from the Production API Details tab. + +### Step 2: Request Access for Paytm as a Payment Method on Razorpay Dashboard + +To raise a request for Paytm as a Payment Method: +1. Log in to the Razorpay Dashboard. +2. Navigate to **Account & Settings** → **Payment Methods**. + + ![Go to Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-payment-methods-setting_1.jpg.md) +3. Go to **Wallets** → **Paytm**. + + ![Select Paytm](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settings-paytm-link-paytm-account.jpg.md) +4. Click **Link Account**. +5. On the pop-up page, select **I have a Registered Paytm Business Account** and click **Next**. + + ![Registered Paytm Business Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settings-paytm-registered-paytm-account.jpg.md) +6. Enter the details copied from the Paytm Dashboard and click **Submit**. + + ![Add Paytm Dashboard Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settings-paytm-paytm-production-details.jpg.md) + +Our team will activate the Razorpay Paytm Wallet within your Checkout flow. + +> **WARN** +> +> +> **Watch Out!** +> +> Do not make any changes to the details copied from the Production API Details tab. Entering incorrect details can lead to payment failures. +> + +You can now accept payments made by customers using Paytm. + +![Paytm Enabled](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settings-paytm-paytm-enabled.jpg.md) + +### Settlements + +Paytm payments are directly settled to your Razorpay account. Therefore, all Paytm payments will be automatically captured irrespective of the Capture Settings configured on the Razorpay Dashboard. diff --git a/llm-content/payments/payment-methods/wallets/shopback-pay.md b/llm-content/payments/payment-methods/wallets/shopback-pay.md new file mode 100644 index 00000000..e8bee18f --- /dev/null +++ b/llm-content/payments/payment-methods/wallets/shopback-pay.md @@ -0,0 +1,34 @@ +--- +title: ShopBack Pay +description: Offer your customers ShopBack Pay as a payment method on Razorpay Curlec Standard Checkout. +--- + +# ShopBack Pay + +ShopBack Pay is a card-based wallet that allows customers to link their Malaysian credit or debit cards for secure tokenised payments. It supports users in Malaysia and offers cashback incentives that are credited directly to customers' ShopBack balance for future use. + +> **INFO** +> +> +> **Wallet Enablement** +> +> This is an on-demand payment instrument. Raise a request with your account manager or our [Support team](https://curlec.com/support/) to get this enabled on your account. +> + +## Payment Flow + +Given below is the payment flow for ShopBack Pay on Razorpay Curlec checkout: + + + 1. The customer selects **Wallets** → **ShopBack Pay** at checkout. + 2. They are redirected to a web browser where a QR code is displayed. + 3. The customer is redirected to ShopBack where they can choose whether they want to open the app or continue in the browser. + 4. The customer uses the ShopBack app to scan the QR code and authenticate the payment. + 5. Payment is processed via their linked card and ShopBack credits cashback to their balance. + + + 1. The customer selects **Wallets** → **ShopBack Pay** at checkout. + 2. The ShopBack wallet interface opens for authentication and payment. + 3. Payment is processed via the customer's linked card. + 4. ShopBack credits cashback/refund to the customer's ShopBack balance. + 5. The customer is redirected back to your website/app. diff --git a/llm-content/payments/payment-methods/wallets/touch-n-go.md b/llm-content/payments/payment-methods/wallets/touch-n-go.md new file mode 100644 index 00000000..9128db78 --- /dev/null +++ b/llm-content/payments/payment-methods/wallets/touch-n-go.md @@ -0,0 +1,30 @@ +--- +title: Touch'n Go +description: Offer your customers Touch'n Go as a payment method at the Razorpay Curlec Standard Checkout. +--- + +# Touch'n Go + +The Touch'n Go eWallet is an electronic wallet (e-wallet) that holds electronic money (e-money). It provides services such as reloads, payments, funds transfer via your smartphone, anywhere and anytime within Malaysia. + +> **INFO** +> +> +> **Handy Tips** +> +> [iOS Standard Checkout SDK v1.3.14](https://github.com/razorpay/razorpay-pod/releases/tag/1.3.14) now supports native redirection for Touch'n Go. +> + +## Touch'n Go Payment Flow on Desktop and Mobile + +Given below is the payment flow for Touch'n Go on Razorpay Curlec checkout: + + + 1. The customer selects **Wallets** → **Touch'n Go** at checkout. + 2. They are redirected to a web browser where a QR code is displayed. + 3. The customer uses the Touch'n Go app to scan the QR code, and confirm the payment on their app. + + + 1. The customer selects **Wallets** → **Touch'n Go** at checkout. + 2. They are redirected to the Touch'n Go app on their phone. + 3. After confirming the payment, the customer is redirected back to your website/app. diff --git a/llm-content/payments/payment-methods/zip.md b/llm-content/payments/payment-methods/zip.md new file mode 100644 index 00000000..c32abc45 --- /dev/null +++ b/llm-content/payments/payment-methods/zip.md @@ -0,0 +1,71 @@ +--- +title: Zip +description: Accept payments from Australian customers using Zip. +--- + +# Zip + +Zip is a leading Buy Now, Pay Later (BNPL) service provider in Australia, offering customers flexible repayment options through Zip Pay. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +> **INFO** +> +> +> **Handy Tips** +> +> - List of [supported region and currencies](#supported-region-and-currencies). +> - Razorpay's [pay in native currency](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/dynamic-currency-conversion.md) feature will ensure that your Australian customer is shown the right currency. +> + +## Advantages + +- **Flexible Repayment Options:** Customers can tailor their repayment schedules to fit their financial needs, choosing from weekly, two-weekly, or monthly payments. + +- **High Credit Limits:** Offers substantial credit limits, up to AUD 1,000 with Zip Pay and up to AUD 50,000 with Zip Money, depending on eligibility. + +- **Seamless Integration:** The payment process is smooth, redirecting customers to Zip’s website for secure login and transaction completion. + +- **Comprehensive Refunds:** Supports full, partial, and multiple partial refunds with no time limit, giving merchants and customers greater flexibility. + +- **Chargeback Protection:** Zip provides a structured process for handling chargebacks, helping to resolve disputes effectively between customers and merchants. + +### Refunds and Settlements + +Payments follow standard refund and settlement timelines. + +- You can refund customer payments made using Zip by following the usual [refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) process. + +- Zip payments take T+17 days to get settled to your Razorpay account. + +### Supported Integrations + +Secure [S2S integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/zip/s2s-integration.md) for seamless payment processing. + +### Supported Region and Currencies + +Given below is the region and currencies that support Alipay payments: + +Region | Currency +--- +Australia and United States | AUD and USD + +### Minimum and Maximum Transaction Amounts for Zip Payments + +Minimum Transaction Amount | Maximum Transaction Amount (Zip Pay) | Maximum Transaction Amount (Zip Money) +--- +AUD 0.01 | Credit limit up to AUD 1,000 | Credit limit up to AUD 50,000 + +The approved credit limit depends on the user’s eligibility. diff --git a/llm-content/payments/payment-methods/zip/s2s-integration.md b/llm-content/payments/payment-methods/zip/s2s-integration.md new file mode 100644 index 00000000..fc6302a4 --- /dev/null +++ b/llm-content/payments/payment-methods/zip/s2s-integration.md @@ -0,0 +1,517 @@ +--- +title: Zip - S2S Integration +description: Let your customers make payments using Zip on your website or app with S2S Integration. +--- + +# Zip - S2S Integration + +Secure Server-to-Server (S2S) integration that enables seamless and reliable processing and a smooth payment experience for your customers. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +1. [Sign up](https://dashboard.razorpay.com/#/access/signup) for a Razorpay account. +2. Generate API Keys. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +3. Follow the [Razorpay S2S Integration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration.md). + +## Integrate Zip on S2S + +Create an Order and a Payment. And pass `method` and `provider` parameters in the create an order and a payment API. + +### Create an Order and a Payment + +Create an order along with payment using the consolidated order and payment API. This single API call combines order and payment creation, resulting in a more efficient and faster transaction process. + +Create an order along with payment by: + +- Making a single API call to Razorpay, combining order and payment creation. +- Authenticating using the provided credentials, ensuring access to the consolidated payment API. +- Manually integrating the API sample codes on your server. + +The following API will create an order along with payment with `wallet` as the payment method: + +/orders + +```curl: Request +curl -X POST https://api.razorpay.com/v1/orders +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1111", + "partial_payment": true, + "customer_details": { + "name": "Gaurav Kumar", + "contact": "+919000090000", + "email": "gauravkumar@example.com", + "insights": { + "order_count": "22", + "chargeback_count": "4", + "tier": "gold", + "booking_channel": "agent", + "has_account": true, + "registered_at": 1234567890 + }, + "shipping_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + }, + "billing_address": { + "line1": "Mantri apartment", + "line2": "Koramangala", + "city": "Bengaluru", + "country": "IND", + "state": "Karnataka", + "zipcode": "560032", + "latitude": null, + "longitude": null + } + }, + "shipping_details": { + "method": "sameday", + "gift_wrap": false + }, + "line_items_total": 5000, + "line_items": [ + { + "type": "e_commerce", + "sku": "1gr367", + "name": "TEST", + "description": "TEST", + "quantity": 1, + "image_url": "http://url", + "product_url": "http://url", + "price": 5000, + "offer_price": 5000, + "tax_amount": 0, + "e_commerce": { + "other_product_codes": { + "upc": "12r34", + "ean": "123r4", + "unspsc": "123s4" + } + } + } + ], + "payment_config": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + }, + "refund_allowed": "full", + "campaign": { + "external_campaign_id": "PQR1234", + "name": "", + "description": "", + "channel": "", + "source": "website", + "medium": "" + }, + "notes": { + "key1": "value3", + "key2": "value2" + }, + "payment": { + "contact": "9000090000", + "email": "gaurav.kumar@example.com", + "method": "paylater", + "provider": "zip" + } +}' + +```json: Success +{ + "amount": 50000, + "amount_due": 50000, + "amount_paid": 0, + "attempts": 10, + "created_at": 1706507580, + "currency": "INR", + "entity": "order", + "id": "order_NUJs9C1Luflzts", + "notes": { + "key1": "value3", + "key2": "value2" + }, + "offer_id": null, + "payment_workflow": { + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/O0NSBQgY0BbC4b/authenticate" + } + ], + "razorpay_payment_id": "pay_O0NSBQgY0BbC4b" + }, + "receipt": "receipt#1111", + "status": "attempted" +} +``` + + +### Request Parameters + + `amount` _mandatory_ + : `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as `295990`. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as `295`. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + + `currency` _mandatory_ + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). The length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + + `receipt` _optional_ + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `partial_payment` _optional_ + : `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + + `customer_details` _mandatory_ + : `json object` Details about the customer/user. + + `name` _mandatory_ + : `string` The customer’s name. For example, `Gaurav Kumar`. + + `contact` _mandatory_ + : `string` The customer's phone number. A maximum length of 15 characters, including country code. For example, `+919000090000`. + + `email` _mandatory_ + : `string` The customer’s email address. For example, `gaurav.kumar@example.com`. + + `insights ` _optional_ + : `json object` Additional details of the customer, including past transaction data. + + `order_count ` _optional_ + : `integer` Total orders placed by the account so far on the business platform. For example, 22. + + `chargeback_count ` _optional_ + : `integer` Total chargeback received for the customer account on the business platform. For example, 4. + + `tier` _optional_ + : `string` Your company's passenger classification, such as with a frequent flyer program. In this case, you might use values such as: + - `standard` + - `gold` + - `platinum` + + `booking_channel` _optional_ + : `string` To share if the user is an agent, corporate, or individual. Possible values: + - `agent` + - `corporate` + - `individual` + + `has_account` _optional_ + : `boolean` To denote if the buyer is on guest checkout or has logged into the account. Possible values: + - `true`: If the user is logged into the account. + - `false`: If the user is on guest checkout. + + `registered_at` _optional_ + : `integer` UNIX timestamp when the customer account was created with the merchant. For example, 1234567890. + + `shipping_address` _optional_ + : `Json object` This will have details about the order's shipping address. + + `line1` _optional_ + : `string` Address Line 1 of the address + + `line2` _optional_ + : `string` Address Line 2 of the address + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560068`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), e.g. 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), e.g. -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `billing_address` _mandatory_ + : `Json object` This will have details about the billing address of the customer/user. + + `line1` _optional_ + : `string` Address Line 1 of the address + + `line2` _optional_ + : `string` Address Line 2 of the address + + `city` _optional_ + : `string` city of the address. For example, `Bengaluru`. + + `country` _optional_ + : `string` ISO3 country code of the billing address. For example, `IND`. + + `state` _optional_ + : `string` name of the state. For example, `KA`. + + `zipcode` _optional_ + : `string` Zipcode of the state. For example, `560001`. + + `latitude` _optional_ + : `float` Latitude of the position expressed in decimal degrees (WSG 84), e.g. 6.244203. A positive value denotes the northern hemisphere or the equator, and a negative value denotes the southern hemisphere. The number of digits represents the precision of the coordinate. + + `longitude` _optional_ + : `float` Longitude of the position expressed in decimal degrees (WSG 84), e.g. -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude. The number of digits represents the precision of the coordinate. + + `shipping_details` _optional_ + : `Json object` This will have the order's shipping details. + + `method` _optional_ + : `enum` Shipping method for the product. Possible values: + - `lowcost`: Lowest-cost service. + - `sameday`: Courier or same-day service. + - `oneday`: Next-day or overnight service. + - `twoday`: Two-day service. + - `threeday`: Three-day service. + - `pickup`: Store pick-up. + - `other`: Other shipping method. + - `none`: No shipping method because the product is a service or subscription. + + `gift_wrap` _optional_ + : `boolean` Indicates whether the customer requested gift wrapping for this purchase. This field can contain one of the following values: + - `true`: The customer requested gift wrapping. + - `false`: The customer did not request gift wrapping. + + `line_items_total` _optional_ + : `integer` Total sum of the cart value. + + `line_items` _mandatory_ + : `json object` Details about the specific items added to the cart. + + `type` _mandatory_ + : `string` Defines the category type. Possible values: + - `travel` + - `hotel` + - `e_commerce` + - `mutual_fund` + + `sku` _optional_ + : `string` The unique product id defined by the business. + + `name` _optional_ + : `string` The name of the product. + + `description` _optional_ + : `string` Description of the product. + + `quantity` _optional_ + : `integer` Number of tickets/items/quantity to be purchased. + + `image_url` _optional_ + : `string` URL of the product image. + + `product_url` _optional_ + : `string` URL of the product’s listing page. + + `price` _optional_ + : `integer` Unit price of the product in paisa. (needs to be inclusive of tax) + + `offer_price` _optional_ + : `integer` Offer price of the product. The offer price can be lower than the price if the business runs a discount on the product. + + `tax_amount` _optional_ + : `integer` Tax amount that needs to be added to the product. In case the **offer_price** is tax-inclusive, keep it blank. + + `e_commerce` _optional_ + : `json object` Details about the type-specific data points. Will vary based on the type selected. + + `other_product_codes` _optional_ + : `object` Array to collect different codes that can identify the item type. Possible values: + + `upc` + : `string` Universal Product Code (UPC; redundantly: UPC code) is a barcode symbology used worldwide to track trade items in stores. UPC consists of 12 numeric digits that are uniquely assigned to each trade item + + `ean` + : `string` European Article Numbers (EAN) is a type of barcode that encodes an article number. Contains 8 (EAN-8) or 13 (EAN-13) numerical digits. + + `unspsc` + : `string` The United Nations Standard Products and Services Code (UNSPSC) is a taxonomy of products and services used in eCommerce. It is a four-level hierarchy coded as an eight-digit number, with an optional fifth level adding two more digits. + + `payment_config` _optional_ + : `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `optimum`: We try to process the refund instantly. We charge a small fee for this. If it is not possible to process an instant refund, we will process a normal refund in 5-7 working days. [Learn more about instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#how-instant-refunds-work). + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + + `refund_allowed` _optional_ + : `string` Denotes if the cart items are refundable or not. Possible values: + - `full` + - `partial` + - `not_allowed` + + `campaign` _optional_ + : `json object` Details of the campaign. Can be extended to share UTM parameters. + + `external_campaign_id` _optional_ + : `string` Unique identifier of the campaign. For example, PQR12453. + + `name` _optional_ + : `string` Name of the campaign. + + `description` _optional_ + : `string` A human-readable description of the campaign. + + `channel` _optional_ + : `string` The marketing channel used. + + `source` _optional_ + : `string` The referrer of the marketing event. Possible values: google, newsletter. + + `medium` _optional_ + : `string` The medium that the campaign is using. Example values: cpc, banner and so on. + + `notes` _optional_ + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `payment` _mandatory_ + : `json object` Details about the payment. + + `contact` _mandatory_ + : `string` Phone number of the customer. The maximum length supported is 15 characters, inclusive of country code. + + `email` _mandatory_ + : `string` Email address of the customer. The maximum length supported is 40 characters. + + `method` _mandatory_ + : `string` The method used to make the payment. Here, it should be `paylater`. + + `provider` _mandatory_ + : The Pay Later provider. Here, it should be `zip`. + + + +### Response Parameters + + `amount` + : `integer` The transaction amount, expressed in the currency subunit. For example, for an actual amount of , the value of this field should be `29935`. + + `amount_due` + : `integer` The amount pending against the order. + + `amount_paid` + : `integer` The amount paid against the order. + + `attempts` + : `integer` The number of payment attempts, successful and failed, that have been made against this order. + + `created_at` + : `integer` The UNIX timestamp at which the order is created. + + `currency` + : `string` The currency in which the transaction should be made. View the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be of 3 characters. + + `entity` + : `string` Name of the entity. Here, it is `order`. + + `id` + : `string` The unique identifier of the order. + + `notes` + : `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + + `offer_id` + : `string` The unique identifier of the offer. + + `next` + : `array` A list of action objects available to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` Indicates the next step to continue the payment process. Possible values: + - `otp_generate`: Use this URL to allow the customer to generate OTP and complete the payment on your webpage. + - `redirect`: Use this URL to redirect the customer to submit the OTP on the provider page. + + `url` + : `string` URL to be used for the action indicated. + + `razorpay_payment_id` + : `string` Unique identifier of the payment. Present for all responses. + + `receipt` + : `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + + `status` + : `string` The status of the order. Possible values: + - `created`: When you create an order, it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + + + +### Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). diff --git a/llm-content/payments/payment-pages.md b/llm-content/payments/payment-pages.md new file mode 100644 index 00000000..ee363d5e --- /dev/null +++ b/llm-content/payments/payment-pages.md @@ -0,0 +1,67 @@ +--- +title: About Payment Pages +description: Create custom-branded Razorpay Payment Pages in minutes with zero coding. Accept online payments instantly with memorable custom URLs. +--- + +# About Payment Pages + +Razorpay Payment Pages is the easiest way to accept payments with custom-branded hosted pages. + +- You do not need a website or an app to start accepting online payments from customers. +- Use Payment Pages to build webpages with customised content, rich-text support, media support and social media sharing options. +- Share the Payment Page link with your customers and start accepting payments instantly. + +[Video: https://www.youtube.com/embed/J9aPL57eUw4?si=yH1s83hYpcOjNjGJ] + +### Advantages + +- **Create-to-Collect in minutes**: Launch your payment collection system instantly without lengthy setup processes. +- **Zero coding effort**: Build professional Payment Pages using our intuitive **What You See Is What You Get** (WYSIWYG) editor. +- **Custom branded URLs**: Create memorable web addresses that align with your brand name and enhance customer trust. +- **Flexible design options**: Create and design custom pages as per your business requirements by adding your own logo, media and input fields. +- **Social Media Support**: Share your Payment Pages on popular social media platforms such as Facebook and X to receive payments instantly from your networks. + +## List of Supported Payment Methods + +Payment Pages support Online Payment Methods. Customers can make online payments using [Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md), [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md), [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md), [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md) and **wallets**. + +### International Currency Support + +You can receive payments in any of the [supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) from the Dashboard. + +#### Address Verification System + +If you are accepting international payments, you can use Razorpay's [Address Verification System (AVS)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md). AVS verifies if a customer's billing address (postal code and the billing street address) matches the billing address on file with the card issuer. Based on the response from the issuer, Razorpay will accept or cancel the transaction. This helps in the prevention of fraud in international payments. + +## Supported Platforms + +Razorpay Payment Pages is supported on the following platforms: + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + + + Web | Android | iOS | Webview + --- + x | x | x | x + + + +## Get Started + +Log in to the Dashboard and click **Payment Pages**. + +### What Next + +Understand [how you can use Razorpay Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/how-it-works.md) and the various [Payment Page states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/states.md). + +### Related Information + +- [Payment Pages Use Cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/use-cases.md) +- [Create a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md) +- [Add Images, Videos and Other Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/add-images-videos.md) diff --git a/llm-content/payments/payment-pages/80g-receipt.md b/llm-content/payments/payment-pages/80g-receipt.md new file mode 100644 index 00000000..f03d3074 --- /dev/null +++ b/llm-content/payments/payment-pages/80g-receipt.md @@ -0,0 +1,100 @@ +--- +title: Payment Pages | Configure 80G Receipts +heading: Configure 80G-Enabled Payment Pages Receipt +description: Generate, download and share 80G-enabled receipts for donations on NGO Payment Pages. Send email notifications and PDF receipts to your customers. +--- + +# Configure 80G-Enabled Payment Pages Receipt + +If you are an NGO using Payment Pages to accept donations, you can share payment receipts with 80G details to your customers via email once they make the payment. + +## Set Up Payment Receipt + +Payment Receipts can be generated and shared using **Automated Rececipts** or **Manual Receipts**. + +Watch this video on how to configure 80G-enabled Payment Receipts. + +[Video: https://www.youtube.com/embed/fLF3dOdi1CM] + +You can automatically share the payment receipt with customers via email and SMS. An auto-generated reference number is added by Razorpay. + +To configure automated Payment Page receipts: + +1. While creating or editing the Payment Page, select **Payment Receipts** from the top menu ribbon. + ![Edit an 80G-enabled Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-pp-receipt.jpg.md) +2. On the **Payment Receipts Settings** pop-up page, select **Send Automated Receipts**. +3. To show an input field such as `Name`, `Address` and its associated value on the receipt: + 1. Enable the **Show an Input Field on Receipt** option. + 2. In the drop-down list, select one of the custom input fields such as `Name`, `Address` or `Landmark`, used on the Payment Page. For example, if you selected `Name`, the patron's name `Gaurav Kumar` will appear on the payment receipt. + + ![Send automated receipts from 80G-enabled Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-pp-receipt-80g-setting.gif.md) + +4. To issue receipts with 80G details, enable the **Show 80G Details** option. +5. Use the **Click here** link to add relevant 80-G text to be displayed in the payment receipt. This opens the **Manage 80-G** pop-up page where you can add a description and upload the signature of the authorised signatory. + 1. Enter the description. For example: + + `Donation eligible for exemption under 80-G under IT Act 1861 .. with ID DIT(E)/2009-2010/W-110/15XX dated 24.09.2009` + 2. Upload an image of the **Signature of Authorized Signatory** field and click **Save**. + + ![Resend payment receipt from Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-pp-receipt-80g-sign.gif.md) +6. Click **Save**. + +You can also manually add a reference number to the receipt and share it with your customers. + +To configure manual Payment Page receipt: + +1. On the Payment Page creation page, select **Payment Receipts** from the top menu ribbon. + ![Edit an 80G-enabled Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-pp-receipt.jpg.md) +2. On the **Payment Receipts Settings** pop-up page, select **Send Manual Receipts**. +3. To show an input field such as `Name`, `Address` and its associated value on the receipt: + 1. Enable the **Show an Input Field on Receipt** feature. + 2. In the drop-down list, select one of the custom input fields such as `Name`, `Address` or `Landmark`, used on the Payment Page. For example, if you select `Name`, the patron's name `Gaurav Kumar` will appear on the payment receipt. + + ![Send manual receipts from 80G-enabled Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-80g-manual-pp-receipt.gif.md) + +4. To issue receipts with 80G details, enable the **Issue 80G Receipts** option. +5. Use the **Click here** link to add relevant 80-G text to be displayed in the payment receipt. This opens the **Manage 80G** pop-up page where you can add a description and upload the signature of the authorised signatory. + 1. Enter the description. For example: + + `Donation eligible for exemption under 80G under IT Act 1861 .. with ID DIT(E)/2009-2010/W-110/15XX dated 24.09.2009` + 2. Upload an image of the signature in the **Signature of the Authorised Signatory** field and click **Save**. + + ![Add 80G description and signature of the authorised signatory to send manual receipts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-80g-manual-pp-receipt-sign.gif.md) + +6. Click **Save**. +7. Navigate to the page's **Transactions Details** page. All the payments made using the Payment Page are listed here. + ![Transaction details of payments made using 80G-enabled Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-pp-transactions-send.jpg.md) + +8. Click the Payment id to view the payment details. +9. In the **Payment Receipt** field, click the **Send** button. +10. Enter a reference number for the receipt as per your business requirements. + ![Add a reference number for an 80G payment receipt](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-pp-manual-ref.jpg.md) + +11. Click **Send**. + +You can also download the payment receipt using the **Download** button. + +### Resend and Download Payment Receipt + +To resend the receipt to a customer: + +1. Navigate to the page's **Transactions Details** screen. All the payments made using the Payment Page are listed here. +2. Click on the Payment id to view the payment details. +3. In the **Payment Receipt** field, click the **Send** button. This will resend the receipt to the customer. + +[Video content] + +You can download the payment receipt using the **Download** button. + +### Email Notification to Customers + +After your customers complete the payment using the Payment Page, the payment receipt is sent to them via email as a PDF attachment. The details entered by the customer on the Payment Page appear on the email body as shown below: + +![80G Payment receipt sent via email notification to a customer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-email.jpg.md) + +### PDF Receipt to Customers + +Here is a sample PDF of the payment receipt. + +### Related Information +[Configure Payment Pages Receipt](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/receipt.md) diff --git a/llm-content/payments/payment-pages/add-images-videos.md b/llm-content/payments/payment-pages/add-images-videos.md new file mode 100644 index 00000000..9e50bfff --- /dev/null +++ b/llm-content/payments/payment-pages/add-images-videos.md @@ -0,0 +1,102 @@ +--- +title: Add Images, Videos and More +description: Add images, videos, hyperlinks, create lists and change font style and colour for your Razorpay Payment Pages. +--- + +# Add Images, Videos and More + +> **INFO** +> +> +> **Handy Tips** +> +> If you are using a template, the sample description only contains heading levels and content. +> + +You can add the following to your Payment Pages: + + +### Add Headings + + You can define up to 2 heading levels. Select **Heading** for your major level 1 headings and **Subheading** for level 2 heading and **Normal Text** for content. + +> **INFO** +> +> +> **Handy Tips** +> +> Defining heading levels in your description makes the information look more structured and neat. +> + + ![Add Heading to a Payment Page.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-addheading.jpg.md) + + + + +### Change Font Style and Color + + Choose a font color from 10 available colors. There are three font styles that you can apply to the text: boldface, italics and underline + + + + +### Create Lists + + You can create lists to display the information in a sequence. You can create bulleted lists and numbered lists. + + + + ![Add Lists to a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-add-lists.jpg.md) +There are 10 font colors from which you can choose to choose. There are three font styles that you can apply to the text: Boldface, Italics and Underline. + + + + + + +### Add an Image + + Click the image icon to upload an image from your local system. We support images with dimensions 40x40. Formats supported are JPG, JPEG, PNG and GIF. + + + + +### Add a Video + + Click the video icon and **Enter Video URL**. This will embed the hosted video into your page. + + ![Add Videos to a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-add-video.jpg.md) + + + + +### Add a Hyperlink + + URLs entered as plain-text in the Description field are automatically converted to hyperlinks. You can use the **Link** icon to add YouTube or Vimeo video links to text. You cannot add links to images. + + + + +### Add Sharing Options + + The **+Add social media share icons** option adds CTA (call-to-action) buttons for Facebook, X and WhatsApp. + + + + +### Add Contact Information + + Click **Add your contact information** to add contact details. You can add phone number and email address. + + + + +### Add Notes + + Click **Add Terms & Conditions** to add the terms and conditions for a transaction. + + + +### Related Information +- [Create a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md) +- [Customise Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/customise.md) diff --git a/llm-content/payments/payment-pages/batch.md b/llm-content/payments/payment-pages/batch.md new file mode 100644 index 00000000..c114f2ad --- /dev/null +++ b/llm-content/payments/payment-pages/batch.md @@ -0,0 +1,109 @@ +--- +title: Upload Data on Payment Pages in Batches +description: Share Razorpay Payment Page Link in bulk with customers via email and SMS. +--- + +# Upload Data on Payment Pages in Batches + +You can add or change fields on the Batch Payments Page to show important information for your business. Then, upload a file with the data. Your customers will see the data specific to them and can make a payment based on it. + + to get this feature activated on your Razorpay account. + +## How it Works + +1. **Payment Pages Creation and Customer Data Upload**: Businesses can create individualised Payment Pages with an option to upload a file containing specific customer data for their customer base. You can use this data to personalise the payment page for each customer. +2. **Automated Notifications**: After the business uploads the data, an automated system will send the Payment Page URLs to the customers via their registered email and mobile number. You can simply embed the page URL on your website if you do not wish to send notifications. +3. **Customer Validation**: Once customers click on the link, they are validated based on a predefined reference parameters that can be as per your, that is, the Business's requirement. This parameter forms part of the data initially uploaded by the business while creating the page. The validation step ensures a secure transaction environment and that only the intended customer can view their respective Payment Page. +4. **Customer-specific Details Access**: After successful validation, customers can view the specific details on their personalised Payment Page as per what was uploaded by you during the batch upload. + +## Steps to Create Payment Pages in Batches + +To create Payment Pages in batches: + +### 1. Create a Payment Page + +To create a Payment Page: + +1. Log in to the Dashboard and navigate to Payment Pages. +2. Select **Batch Payment Pages** and click **+ Create Payment Pages**. +3. Add Business Details to your Payment Page. Know more about how to add [Business Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md#add-business-details) to your Payment Page. +4. Add payment details to your Payment Page: + 1. Primary Reference Id and Secondary Reference Id are input fields that your customers will use to validate themselves on the page link shared. + 2. Modify the label of these fields as per your requirement. + 2. The Primary Reference Id and Secondary Reference Id input fields are mandatory and cannot be deleted from the page. + ![Shows the option to select an input field as a secondary reference Id.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-batch-secondary-reference-id.jpg.md) +5. Click **Save and Proceed to next Step**. You can download the sample file from here or do it later from the Dashboard. + ![Shows the interim step before publishing a Payment Page.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-batch-step-2.jpg.md) +6. Click **Create and Publish Page** to create the Payment Page. + +### 2. Download the Custom Sample Batch File and add details to the Batch File + +1. Navigate to **Batch Payment Pages** and select the Payment Page you have created. +2. Click **View Batch Details** and download the sample file by clicking **Download Sample File**. + + ![Shows the Download Sample File button on the Razorpay Dashboard.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-batch-download-sample.jpg.md) + + + +3. The batch file contains all the input fields you added in the Payment Details section of your Payment Page. + +4. Fill in the details in the batch file and save. Make sure you do not make any changes to the column labels as that will lead to batch upload failure later. + +### 3. Upload Batch File on Dashboard + +#### Upload Batch File + +1. Select **Click here to Upload** to upload the batch file. +2. On the pop-up page, drag and drop the file over the highlighted area. Alternatively, select the **click to upload** option to select your file from your system. + ![Pop-up that indicates where to upload Batch Upload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-batch-uploadhere.jpg.md) + +The file is validated and uploaded to the Razorpay server. After the file is successfully uploaded, a snippet view of the file is displayed in the **Batch Upload** pop-up page. + +#### Add Details to the Batch File + +To add details to Batch upload: +1. Enter a relevant file name in the **BATCH FILE NAME** field. +2. Follow these steps to determine whether the links should be sent immediately or later. Also, select the medium of link sharing: + - If you want to send links immediately, select **via SMS** and/or **via Email** next to the **NOTIFY** check box options and click **Create**. + - If you want to send them later, do not select any medium and click **Create**. + ![Adding Batch details to a Batch File.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-batch-details.jpg.md) + +### 4. Perform Post-batch Creation Actions + +After the batch is created, you can see a **Batch Created Successfully** pop-up page. Click **Close** and reload the page. The newly created batch file will appear in the list of **Batch Uploads**. The **Batch Uploads** screen displays the following fields: + +![Shows the Batch file in processed state.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-batch-fields.jpg.md) + +Field | Descriptions +--- +Batch Id | Unique identifier of a batch upload. +--- +Batch Name | Name of the batch file. +--- +Count | The number of processed rows in a batch. +--- +Status | Current [state](#batch-file-states) of the batch file. +--- +Actions | The operations you can perform on a particular batch file. For example, Download Report File and Send all links. + +#### Batch File States + +The batch file states are explained in the table given below: + +State | Description +--- +**Created** | You have successfully uploaded the file. We have not performed any action on the file. +--- +**Processing** | We are processing the file. +--- +**Processed** | We have processed this file. + +### 5. Handle Errors + +If there are any errors, they are mentioned in the batch file. Check the batch file, make the necessary corrections and upload the batch file again. + +### Related Information + +- [Create a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md) +- [Search for a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/search.md) +- [Manage Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/manage.md) diff --git a/llm-content/payments/payment-pages/create.md b/llm-content/payments/payment-pages/create.md new file mode 100644 index 00000000..f2f4ba9b --- /dev/null +++ b/llm-content/payments/payment-pages/create.md @@ -0,0 +1,274 @@ +--- +title: Create a Payment Page +description: Create a Payment Page to start accepting payments. +--- + +# Create a Payment Page + +You can build a Payment Page from your Dashboard to start accepting payments from customers. This method does not require any code or API integration. + +## Prerequisites + +- Ensure you have an account. +- Log in to the Dashboard and complete the KYC requirements. +- The Dashboard has [test and live modes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/test-live-modes.md). Use the test mode for a sandbox experience. You can switch to live mode when you are ready to accept payments. You will have to create a new Payment Page in live mode. +- Understand the [Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md). + +![Payment Pages Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-create_pp.jpg.md) + +## Steps to Create a Payment Page + +To create a Payment Page, you must complete the following actions: + +Navigate to Payment Pages and click **+ Create Payment Page**. + +Add business details, payment fields and custom input fields. + +Set up payment receipt configuration (optional). + +Customise URL, theme, expiry date and post-payment actions. + +Publish your page and share via URL, social media or embed button. + +Configure webhooks to receive payment notifications. + +### Step 1: Select Payment Page + +1. Log in to the Dashboard and navigate to Payment Pages. +2. Click the **+ Create Payment Page** button and select the **Select Payment page** button. + +![Select which product you want to use.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-select-choice.jpg.md) + +### Step 2: Add Page Details + +Add Business Details + +1. Enter the page title. The **Payment Page Title** cannot exceed 40 characters. +2. Fill in the page details: + 1. Enter a brief description for the page. + 2. You can use the [rich-text features](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/add-images-videos.md) to add images and videos. +3. Click **Add social media share icons**. This makes the Payment Page shareable on popular social media sites and Instant Messaging (IM) services such as Facebook, Twitter and WhatsApp. +4. Click **Add your contact information** to enter support email and contact number details. +5. Click **Add Terms & Conditions** to add your terms of business. For example, terms and conditions for refund of payment. + +> **INFO** +> +> +> **Optional Fields and Customisation** +> +> - Apart from `title` and `contact information`, all fields in this section are optional. +> - You can customise this section by adding videos, images and more, using our [rich-text features](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/add-images-videos.md). +> + +The section appears as shown once the details are filled in: +![Payment Pages - Business Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-completed_business_details.jpg.md) + +### Add Payment Details + +1. Create and configure the price field. Price fields are the products and services that you intend to sell. +2. Add description to `Phone` and `Email` fields. +3. Add any custom input fields you need to gather additional customer information. +4. Reorder fields if necessary. +5. Customise the Pay button label. + +Create and Configure Price Field + +1. Click **Add Price Field**. In the **Select Amount Type** menu, choose a price field type from the list: + 1. **Item with Quantity** - Select this type if you want the customer to buy more than one unit of the item. You can set additional parameters for minimum and maximum numbers of units the customer can buy. + 2. **Fixed Amount** - Select this type if you want to limit the customer to buy only one unit. + 3. **Customer Decides Amount** - Select this type if you want the customer to enter the price. For example, in the case of donations. You can set additional parameters for the minimum and maximum amount the customer can enter. +2. Add the label for the field. +3. Set the currency. By default, it is `₹`. We support international currencies too. +1. If you have selected `Item with Quantity` or `Fixed Amount` as the price field type, enter the price you want to charge. +2. Click the more icon to open the **Additional Options** menu to: + 1. Add image. + 2. Specify if the field is mandatory. + 3. Configure further for quantity and price. Know more about [Additional Options](#additional-options). +3. Click **Save**. + +> **INFO** +> +> +> **One Currency per Page** +> +> You can set only one currency for price fields on a Payment Page. +> + +### Additional Options + +**Add an image** +1. In the **Additional Options** menu, select **Add Image**. +2. You can add the thumbnail image by dragging and dropping or select the **Click to Upload** option. Ensure that the image size does not exceed 500 KB. Only PNG, JPG, JPEG or GIF files are allowed. +3. Crop the image as per your requirements using the zoom bar. +4. Click **Save**. + +![Payment Pages - Additional Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-image_added.jpg.md) + +You can remove the image by selecting **Remove Image** on the **Additional Options** menu. + +**Add a Description** +1. In the **Additional Options** menu, select **Add Description**. +2. Add the description in the field that appears beneath the price field. +3. Click **Save**. + +You can remove the description by selecting **Remove Description** on the **Additional Options** menu. + +**Mark the field Optional** +1. In the Additional Options menu, select **Make it Optional Item**. +2. Click **Save**. + +> **INFO** +> +> +> **Handy Tips** +> +> You can mark the field mandatory by selecting **Optional Item** on the **Additional Options** menu. +> + +**Quantity and Price Settings** + +Given below are the price field type settings and the applicable quantity and price rules: + +Feature | Item with Quantity | Fixed Amount | Customer decides Amount +--- +**Quantity Rules** - In **Units Available in Stock** field, select **limited** and set the quantity or choose **unlimited**. | Yes | Yes | Yes +--- +**Minimum and Maximum Quantity** - Set minimum and maximum number or units purchasable by customer. | Yes | No | No +--- +**Minimum and Maximum Price** - Set minimum and maximum price limits for customer. | No | No | Yes + +### Add Description to `Phone` and `Email` Fields + +`Email` and `Phone` fields appear by default and are mandatory. You cannot delete these. However, you may add descriptions to appear with these fields. +1. Click the edit icon. +2. Click **Add Description** to enter a brief description regarding the field. +![Payment Pages - Contact Details Description](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-phone_field.jpg.md) + +### Add Custom Input Fields + +You can add more fields to collect additional data from the customer. Let us add `Full Name` as a mandatory field. + +1. Click **Add new** and select **Input Field**. In the drop-down, select **Single Line Text** as the **Field Type**. + ![Payment Pages - Custom Input Fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-custom_field_1.jpg.md) +2. Add the label for the field - `Full Name`. + ![Payment Pages - Custom Input Fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-custom_field_ps.jpg.md) +3. Click **Save**. + +### Reorder Fields + +You can reorder the fields by dragging them up and down the section. Hover over a field and use the drag icon present in the left corner. + +![Payment Pages - Custom Input Fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-reorder_generic.gif.md) + +### Customise Pay Button Label + +1. Hover on the Pay button and click the edit icon. + ![Payment Pages - Custom Pay Button Label](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-pay_button_hover.jpg.md) +2. Enter a new label - `Book Tickets` and click the save icon. + ![Payment Pages - Custom Pay Button Label](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-pay_button.jpg.md) + +The label cannot exceed 16 characters. + +### Step 3: Configure Payment Receipt (Optional) + +You can ensure that your customers receive payment receipts via email once they complete the payment. Know how you can [send and download automated or manual payment receipts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/receipt.md). + +If you are an NGO, [know how you can send and download payment receipts with 80-G information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/80g-receipt.md). + +### Step 4: Configure Page Settings + +To configure page settings, click **Page Settings**. On the pop-up page: + +1. Choose a **custom URL** for the page. This is available only if you are in live mode. An example of a custom URL is `https://rzp.io/l/livingarts`. +2. Choose from the **Dark** or **Light** themes. +3. To set the expiry date for the page, disable **No Expiry**. In the calendar that is displayed, select the expiry date and set the time. +4. Under **Action after successful payment**, you can: + 1. Select **Show custom message** and enter a custom message to be shown to the customer once the payment is made. + 2. Select **Redirect to your website** and enter a URL. This redirects the customer to your official webpage once the payment is successful. +5. You can [put a hyperlink button on your website](#create-hyperlink-button). This can be done only after your page is published. +6. Click **Save**. + +![Configure Page Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-page-settings.jpg.md) + +### Step 5: Publish and Share + +Click **Save and Publish** to complete the Payment Page creation. + +### URL + +Copy the URL and share it. + +To customise the URL, go to **Page Settings** (only in live mode). Once the URL is ready, share the page on social media sites such as Facebook, X and WhatsApp. + +Enter the email and phone number of customers to send the page directly to them. + +An example of a custom URL is `https://rzp.io/l/grofersexpo`. + +![Enter Contact details to share Payment Page Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-payment-button-result.jpg.md) + +### Create Hyperlink Button + +You can add a hyperlink button on your website. When customers click on this button, the Payment Page will appear. + +To get a hyperlink button: +1. Click **Create** to customise and create a button. +1. In the pop-up page, customise the button text and select the button size. +1. Copy the HTML code to embed on your website and click **Done**. + +![Hyperlink Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-generic-embed-button.jpg.md) + +Here is a demo of how the Payment Button would appear, when embedded on your website. + +After you are done with the publish settings, click **Back to Dashboard**. Once the Payment Page is created, Razorpay generates a unique identifier for the page (for example, `pl_C4VFJaiO69EvdL`). The page is then added to the list of previously created Payment Pages. + + You can search for a Payment Page using filters, such as: **Title**, **Status** and **Count**. + +### Step 6: Set Up Webhooks + +You can set up webhooks to receive notifications on payments using the page. Know more about how to [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/subscribe-to-webhooks.md). + +## View Payment Page in Action +Your Payment Page is now live! + +![Sample Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-generic_hosted_page_view.jpg.md) + +## Payments + +You can view the payments as and when they are made in the [Transactions Details View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/view-reports.md) of the page. + +![Payment Page Transaction Tab](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-generic_report.jpg.md) + +### Export Data + +To export the report data into a CSV file: +1. Navigate to **Dashboard** → **Payment Pages**. +2. Select the relevant Payment Page. The Transactions Details View appears. +3. Click **Export All (CSV)** button. + +A .csv file downloads, allowing you to find a monthly report of all the payments made using your page. + +### Download and Resend Payment Receipt + +You can download and resend the payment receipt from the **Transaction Details View** screen. + +To download and resend payment receipt: +1. Click on the relevant **Payment Id**. For example, `pay_EWqq21bljDMbcl`. +2. In the side pane, click **Download** to download a PDF copy of the receipt. You can now save this for your reference or send it to the customer via email or WhatsApp. +3. Click **Resend** to automatically send the receipt to the customer via email. + +## Settlements +You will receive the payments in your bank account as per your settlement cycle. Usually, this is T+2 days. In case of international payments, the settlement cycle is T+7 days. + +> **INFO** +> +> +> **Try it Out** +> +> [Try creating the entire payment page yourself](https://dashboard.razorpay.com/app/paymentpages/new). +> + +### Related Information + +- [How Payment Pages Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/how-it-works.md) +- [Search for Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/search.md) +- [Manage Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/manage.md) diff --git a/llm-content/payments/payment-pages/customise.md b/llm-content/payments/payment-pages/customise.md new file mode 100644 index 00000000..cdd00443 --- /dev/null +++ b/llm-content/payments/payment-pages/customise.md @@ -0,0 +1,231 @@ +--- +title: Customise Payment Pages +description: Customise Payment Pages and send different versions of the same Payment Page to different customers. +--- + +# Customise Payment Pages + +You can customise Payment Pages for customers and send them custom links with the amount, email, phone and custom fields (such as First Name and Last Name) pre-populated. This serves as a personalisation value-add for customers. You can do this by making changes to the Payment Pages URL before sending it to customers. You can pre-populate [Input Fields](#pre-populate-input-fields) and [Amount Fields](#pre-populate-amount-fields) + +![Sample Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-prepopulate_pp.jpg.md) + +## Pre-populate Input Fields +You can pre-populate the input fields on your Payment Page, such as name, email and contact and send customised Payment Pages to customers. + +Name | Email | Phone Number +--- +Saurav Kumar | saurav.kumar@example.com | 8999999999 +--- +Bhairav Kumar | bhairav.kumar@example.com | 9999888899 + +### To pre-populate input fields: + + + +1. Log in to the Dashboard and create a Payment Page titled **Registration**. +2. Fill in the details of the event such as description, venue, time and more. +3. Create a price field of any type in the Payment Details Section. +4. Create an input field with type as `Single Line` to capture the customer's **Full Name**. +5. **Save and Publish** the Payment Page. +6. Copy and paste the Payment Page short URL on the browser. + +When you open the Payment Page short URL on the browser, it expands to a longer format. + +**Example** + +- Payment Page Title - `Registrations` +- Short URL - `https://rzp.io/l/pcsLir1` +- Long URL - `https://pages.razorpay.com/pl_CjbpJ6gnwk6Ehy/view` + +Here, add suffixes to the field names and values as shown: + +Field Name | Mandatory to create Payment Page | Value +--- +`email` | Yes | saurav.kumar@example.com +--- +`phone` | Yes | 8999999999 +--- +`full_name`(`_` denotes the space between the field name words) | No | Saurav%20Kumar (%20 denotes the space between the field value words) + +The long URL appears as shown: + +`https://pages.razorpay.com/pl_DOiqlZTGqnH9F8/view?amount=199&email=saurav.kumar@example.com&phone=8999999999&full_name=Saurav%20Kumar` + +This is a unique URL that can be shared with the customer named Saurav Kumar to accept payments from her.It appears as shown below: ![Payment Page - Prepopulate Input Fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-prepopulate_pp_sk.jpg.md) + +Similarly, you can add suffixes to these field names and values and create different versions of the same Payment Page for different customers. + +Payment Page appears customised for Bhairav Kumar: + +![Payment Page - Customised Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-prepopulate_pp_bk.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> - Use only `lower case` when suffixing field names and values in the long URL. You can use `upper case` in values of custom fields, such as Full Name. +> - The field-level validations are in place. Hence, if you enter a character in `amount` value, say `amount=100a` or `amount=Rs.Hundred%20only`, the field will not get populated. +> - If the custom field consists of two words, include an underscore as a separator of two words. For example, the two words in the Last Name field should be separated by an underscore, that is, `Last_Name`. +> + +## Pre-populate Amount Fields + +You can pre-populate amount fields on your Payment Page. That is, in case of amount field with type: + +### Case 1: Pre-populate Item Quantity + +Pre-populate the quantity of item to be purchased by customer. + +**Example** + +You want to sell iPhone 11 Pro smartphone cases for . You are creating a Payment Page titled `Limited Edition iPhone 11 Phone Case` to sell the product. You can ensure that when the customer opens the Payment Page, the quantity to be purchased appears pre-selected as `1`. However, this will work only when the field has been marked optional. + +To pre-populate item quantity: + +Add an optional amount field selected by default. + +1. On the Dashboard, create a Payment Page titled **Limited Edition iPhone 11 Phone Case**. +2. Fill in the details of the product. +3. In the Payment Details Section, create a price field called `Marble Pink Case` using `Item with Quantity` as the amount field type. + + ![Payment Page - Prepopulate Item with Quantity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-item_with_quantity.jpg.md) + +4. Create any additional fields required such as Name, Address and so on. +5. **Save and Publish** the Payment Page. +6. Copy and paste the Payment Page short URL on the browser. + +When you open the Payment Page short URL on the browser, it expands to a longer format. For example: + +- Payment Page Title - `Limited Edition iPhone 11 Phone Case` +- Short URL - `https://rzp.io/l/nfR16LE` +- Long URL - `https://pages.razorpay.com/pl_EZvXqNgFYRNZtS/view` + +Here, add suffixes to the field names and values as shown: + +Field Name | Value +--- +`marble_pink_case` | 1 + +The Long URL now appears as shown: + +`https://pages.razorpay.com/pl_EZvXqNgFYRNZtS/view?marble_pink_case=1` + +This is now a unique URL wherein the item quantity will always appear selected as `1`: + +![Payment Page - Customised Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-item_qty_selected.jpg.md) + +### Case 2: Pre-populate Fixed Amount Field + +Add an optional amount field that appears selected by default. + +**Example** + +You run a Creative Writing Academy that uses Payment Pages to collect online course registration fees from students. You offer two courses: + - Creative Writing (main course) + - Book Promotion Techniques (optional course) + +You can create a Payment Page titled `Creative Writing Course Registration` to collect registration fees. Also, you can ensure that when the student opens the Payment Page, the optional field, that is, the book promotion technique course appears pre-selected. + +To pre-populate fixed amount field: + +1. On the Dashboard, create a Payment Page titled **Creative Writing Course Registration**. +2. Fill in the details of the product. +3. In the Payment Details Section, create a price field called `Creative Writing Course Registration` using `Fixed Amount` as the amount field type. + + ![Payment Page - Prepopulate Fixed Amount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-fixed-amount.jpg.md) + + + +4. Create the additional fields: + - `How To Promote Your Book` - Create this price field with `fixed amount` type and mark it `optional`. + - Create other fields for collecting student details such as name. +5. **Save and Publish** the Payment Page. +6. Copy and paste the Payment Page short URL on the browser. + +When you open the Payment Page short URL on the browser, it expands to a longer format. For example: + +- Payment Page Title: `Creative Writing Course Registration` +- Short URL: `https://rzp.io/l/lz3xNr6` +- Long URL: `https://pages.razorpay.com/pl_EZxm4DFp4W0KPP/view` + +Here, add suffixes to the field names and values as shown: + +Field Name | Value +--- +`how_to_promote_your_book` | 1 + +The Long URL now appears as shown: +`https://pages.razorpay.com/pl_EZxm4DFp4W0KPP/view?how_to_promote_your_book=1` + +This is now a unique URL wherein the amount field will always be appear selected: + +![Payment Page - Customised Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-fixed_amount_selected.jpg.md) + +### Case 3: Display Different Amounts for Different Customers + +Add a field to display different amounts for different customers. + +**Example** + +You want to get registrations for an event. You are creating a Payment Page titled `Registrations` to accept the registration fee payments. You would like to set it up in such a way, wherein: + +- Early bird, Gaurav Kumar pays ₹199 +- Saurav Kumar pays ₹299 +- Last minute registrant, Bhairav Kumar pays ₹399 + +In this case, you do not have to create multiple Payment Pages. You can fix and pre-populate the amount you want each customer to pay. + +![Payment Page - Customised Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-prepopulate_pp.jpg.md) + +To display different amounts for different customers: + +1. On the Dashboard, create a Payment Page titled **Registration**. +2. Fill in the details of the event such as description, venue, time and more. +3. In the Payment Details Section, create a price field. - `Customer Decides Amount`. + ![Payment Page - Customer Decides Amount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-customer_decides_amount.jpg.md) + + +4. Create an input field with type as `Single Line` to capture the customer's **Full Name**. +5. **Save and Publish** the Payment Page. +6. Copy and paste the Payment Page short URL on the browser. + +When you open the Payment Page short URL on the browser, it expands to a longer format. For example: + +- Payment Page Title: `Registrations` +- Short URL: `https://rzp.io/l/pcsLir1` +- Long URL: `https://pages.razorpay.com/pl_CjbpJ6gnwk6Ehy/view` + +Here, add suffixes to the field names and values as shown: + +Field Name | Mandatory to create Payment Page | Value +--- +`amount` | Yes | 199 +--- +`email` | Yes | gaurav.kumar@example.com +--- +`phone` | Yes | 9000090000 +--- +`full_name`(`_` denotes the space between the field name words) | No | Gaurav%20Kumar (%20 denotes the space between the field value words) + +The long URL now appears as shown: + +`https://pages.razorpay.com/pl_CjbpJ6gnwk6Ehy/view/?amount=199&email=gaurav.kumar@example.com&phone=9000090000&full_name=Gaurav%20Kumar` + +This is a unique URL that can be shared with the customer named Gaurav Kumar to accept payments from him. It appears as shown below: + +![Payment Page - Prepopulate Fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-prepopulate_pp.jpg.md) + +> **INFO** +> +> +> **Points to Remember** +> +> - If using a custom field name for amount, ensure that the field name is entered in lowercase and is separated by an underscore. For example, if the amount field name is Registration Amount, enter the suffix as `registration_amount`. +> - If the amount field item is out of stock or has less quantity available, though the field will appear prefilled, the customer will not be able to make a purchase. +> - Pre-population of the amount field is subject to the Minimum and Maximum Input Price set for the amount field. For example, if Maximum Input Price has been set as , then the Registration Amount field cannot be prefilled with a value higher than . +> + +### Related Information + +- [Create a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md) +- [Add Images, Videos and More](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/add-images-videos.md) diff --git a/llm-content/payments/payment-pages/domain-linking.md b/llm-content/payments/payment-pages/domain-linking.md new file mode 100644 index 00000000..d58211d0 --- /dev/null +++ b/llm-content/payments/payment-pages/domain-linking.md @@ -0,0 +1,89 @@ +--- +title: Add Domain Link (Beta) +description: Create a customised URL for your Payment Page. +--- + +# Add Domain Link (Beta) + +You can link your domain to your Payment Page's URL with the custom domain linking feature. This helps you align your payment page with your website/brand. + +**Example** + +Let us assume that you have a blog website named `https://www.mahesh.com` and are charging fees for your course using a Payment Page. You can now link this page to your website by adding a custom slug using the Domain Linking feature. + +The URL will be `https://www.mahesh.com/blogcourse-payment` where `blogcourse-payment` is the custom slug given to your Payment Page. + + to get this feature activated on your Razorpay account. + +![Example website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-mahesh.jpg.md) + +### Connect Your Domain Link + +To connect your domain link to your Payment Page: + +1. Log in to the Dashboard and navigate to **Payment Pages**. +2. Select the page you wish to link to your domain and click **Edit Page**. + ![Edit Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-domain-edit-page.jpg.md) +3. This opens the page in edit mode. Click **Page Settings**. + ![Page Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-page-settings.jpg.md) +4. In the pop-up page that appears, click **Connect Domain**. + ![Connect Domain](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-connect-domain.jpg.md) +5. Select a subscription plan that works for you. We offer 3 subscription plans for you to choose from: + + + Plan | Price + --- + 6 Months | (350/month) + --- + 3 Months | (400/month) + --- + 1 Month | + --- + + ![Domain Linking Pricing Plans](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-domain-linking-pricing-plans.jpg.md) +6. Select a plan of your choice and click **Continue**. + ![Select Plan for Pricing](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-domain-linking-select-plan.jpg.md) +7. Enter the domain or sub-domain you wish to use as your Payment Page's URL and click **Next**. + ![Add Domain Name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-domain-name.jpg.md) +8. Go to your domain and update the DNS values after receiving them. Given below is an example from Google Domains: + ![Google Domain Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-google-domains.jpg.md) +9. After updating the DNS values, select the check box that asks if you have updated the DNS values and click **Verify connection**. + ![Update DNS Values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-update-dns.jpg.md) +10. After your domain is connected, customise the URL by clicking **Okay, customize URL**. + ![Domain Connected Message](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-domain-connected.jpg.md) + +### Customise your Domain Link (Optional) + +After successfully connecting your domain, you can customise your domain link by following the steps given below: + +1. Click **Page Settings**. +2. In the pop-up page that appears, select one of these: + - **Use my domain**: Select this option to customise your domain link name as per your preference. For example, assam-flood-relief-funds. + ![Use my Domain option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-use-my-domain.jpg.md) + - **Use Razorpay's domain**: Select this option to use Razorpay's domain. + ![Use Razorpay's Domain option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-use-rzp-domain.jpg.md) + - Click **Save**. +4. **Click Save and Update** after customising domain link. + ![Save your Domain](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-save-update.jpg.md) + +Your page is now live with the updated domain link. +![Domain changes saved](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-changes-saved.jpg.md) + +### Remove Your Domain Link + +You can choose to remove the domain link from your Payment Page. Follow the steps given below to remove your domain: + +1. Remove the DNS values from your Domain. +2. Click **Page Settings**. In the pop-up page that appears, click **Remove domain**. + ![Remove Domain option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-click-remove-domain.jpg.md) +3. Click **Yes, remove domain** to confirm the removal. + ![Domain removal confirmation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-confirmation-remove.jpg.md) +4. You have successfully removed your domain from your Payment Page. Click **Save**. + ![Domain removed confirmation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-domain-removed.jpg.md) + +### Related Information + +- [How Payment Pages Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/how-it-works.md) + +- [Create a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md) +- [Payment Pages States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/states.md) diff --git a/llm-content/payments/payment-pages/faqs.md b/llm-content/payments/payment-pages/faqs.md new file mode 100644 index 00000000..2a070f32 --- /dev/null +++ b/llm-content/payments/payment-pages/faqs.md @@ -0,0 +1,233 @@ +--- +title: Payment Pages | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Payment Pages. +--- + +# Frequently Asked Questions (FAQs) + +### 1. How can I add my business logo on the page? + + To add your business logo on the page: + + 1. In the Dashboard, navigate to **Account & Settings**. + 2. Click **Branding** under **Checkout settings**, and click **Choose File** in the **Your Logo** section. + 3. Upload the logo file. Ensure that the logo is a square image of minimum dimensions 256x256 px. Maximum file size allowed is 1MB. Formats supported are JPG, JPEG and PNG. + + + +### 2. How can I make the Payment Page elements reflect my brand colors? + + You can make the Payment Page elements such as Pay button, side bar and title underline appear in your brand colours. To change the colors of the Payment Page: + + 1. In the Dashboard, navigate to **Account & Settings**. + 2. Click **Branding** under **Checkout settings** and enter the HEX code for your brand. For example, `#6822CC` in the **Theme Color** section. + 3. Click **Save Changes**. + + + +### 3. How do I create a custom URL for my Payment Page? + + You must create the Payment Page in **Live Mode** in order to obtain a custom URL. You can only customise the suffix and not the entire URL. If your suffix is `livingarts`, the custom URL will appear as `https://pages.razorpay.com/livingarts`. + + +> **WARN** +> +> +> **Watch Out!** +> +> If another business that uses Razorpay Payment Pages has already created a custom URL with `livingarts` as the suffix, you will not be able to use `livingarts`. Your Payment Page suffix must be unique as two Payment Pages cannot have the same suffix. +> + + To create a custom URL for Payment Page: + 1. In the Dashboard, navigate to menu ribbon, click the drop-down button and select **Live Mode**. + 2. Create a **Payment Page** and fill in the Business Details section and set up the Payment Details section. + 3. Click **Save and Publish Page**. + 4. Click **Page Settings** and in the pop-up that appears, enter the suffix to create a custom URL for the page. Click **Save and Publish**. + + + +### 4. How do I add a quantity counter for the price field created on the Payment Page? + + While creating the price field, ensure that you select the `Item with Quantity` as the type. This adds the quantity counter, which the customer can use to add or reduce quantity. If you have already created the price field without this option, you must delete and recreate with `Item has quantity` type selected. + + + +### 5. I want to create a price field wherein customers can enter an amount of their choice. How do I do this? + + While creating the price field, make sure that you select `Customers Decide Amount` type. Once the page is published, in the customer view, the field appears with a blank space where the customer can enter the amount. + + + +### 6. What are the size requirements and supported formats for the image added to a price field? + + We support images with dimensions 40x40. Formats supported are JPG, JPEG, PNG and GIF. + + +> **INFO** +> +> +> **Handy Tip** +> +> GIFs with animations are converted and displayed as non-animated GIFs in the price field images. +> + + + + +### 7. How do I update the stock level of a price field (item) in my Payment Page? + + You can update the stock in two ways. + + **From the List of Payment Pages**: + 1. Navigate to the list of **Payment Pages** and click on the relevant page. The items appear on the top of the page, on the right-hand side. + 2. Click **Update Stock** and enter the number of units available for sale in the field. + 3. Click **Update**. + + **Using the Payment Page Edit Mode**: + 1. Navigate to the list of **Payment Pages** and click on the relevant page. Click the edit icon. + 2. In the **Payment Details** section, go to the price field and click the edit icon. + 3. Enter the number of units available for sale in the field. + 4. Click **Add**. + + + +### 8. What happens to my Payment Page if all the listed price fields (items) go out of stock? + + If all the items listed on your Payment Page go out of stock: + - If the **Price** field is **mandatory**, when the items goes out-of-stock, the Payment Page becomes inactive. The customers will not be able to access this page to make payments. + - If the **Optional** price fields go out-of-stock and there are other **Mandatory** Price fields which still have stock available, the Payment Page will remain in active state. + + + +### 9. Can I have two Price fields with different currencies appear on a single Payment Page? + + No. You cannot configure Price fields to have different currencies. When you attempt to configure the second price field with a different currency, a message appears on the screen displaying that only one currency can be applied. + + + +### 10. How to get the hyperlink button on my website? + + You can get the hyperlink button on your website to collect payments from your customers. + + To get the hyperlink button on your website: + 1. Go to **Dashboard** → **Payment Pages** and in the list of Payment Pages, click on the Payment Page name. + 2. The page opens in edit mode. Click **Page Settings**. + 3. Click **Create** against the get hyperlink button. In the pop-up that appears, customise the button text and select the button size. + 4. Copy the HTML code to embed on your website and click **Done**. + 5. In your website code, paste this code on the page where you want the payment button to appear. + + + +### 11. How do I track the payments made by customers? When will the amount be settled to my account? + + You can view the payments as and when they are made in the [Transactions Details View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/view-reports.md) of the page. + + ![Payment Page - View Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-view_report.jpg.md) + + + + +### 12. What payment methods can customers use to make payments on the page? Can I display additional payment methods? + + All the payment methods enabled for your account are displayed on the Payment Page. The default payment methods available are: + - Cards + - Netbanking + - UPI + - Wallet (PayZapp) + + If you want to show more wallets or [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) at Checkout, please raise a request with the [Razorpay Support team](https://razorpay.com/support/#request). + + + +### 13. What is the maximum payment amount allowed per transaction on a Payment Page? + + By default, a customer can make a maximum payment of ₹5,00,000. You can increase this limit by raising a request with our [Support team](https://razorpay.com/support/). + + + +### 14. Can I accept payments in international currency? + + You can accept payments in international currency using Payment Pages by following these steps: + 1. Follow [these steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md) to enable international payments for your account. + 2. While creating the Payment Page, click the currency drop-down list in the **Price** field and select the required currency. + + +> **INFO** +> +> +> **One Currency per Payment Page** +> +> You can set only one currency for the Price fields on a Payment Page. If you attempt to configure the second price field with a different currency, a message appears on the screen displaying that more than one currency cannot be applied. +> +> + + + + +### 15. Facebook Analytics tool is being withdrawn by 30 June 2021. Will this affect my existing Facebook Pixel integration with Payment Pages? + + Although the Facebook Analytics tool is being withdrawn, this will have no impact on your Facebook Pixel integration with Payment Pages. You can find more information about this [here](https://www.facebook.com/business/help/966883707418907?content_id=XxWPmeIfQg9ns0j). + + + +### 16. How many fields can I add to a Payment Page? + + The maximum number of fields that you can add to a Payment Page is **25**. + + + +### 17. I am getting a message that my domain was not connected. What should I do? + + Sometimes it can take up to an hour for the changes to save. Do not undo the changes you have made to your domain and try again after an hour. Raise a ticket with our [Support team](https://razorpay.com/support/) if you can still not connect your domain. + + + +### 18. I am getting an error message Failed to create link with given slug, please try a different value. What should I do in this case? + + This error message occurs when the custom URL provided by you already exists. Please use a different URL slug. + + + +### 19. How can I strike-through a text on Razorpay Payment Page description? + + Razorpay does not support the feature to strikethrough a text on the Payment Page description section. + + + +### 20. Can I create multiple URLs for a Payment Page? + + No, you cannot create multiple URLs for a Payment Page. ​A Payment Page allows you to collect multiple payments on the same link. + + + +### 21. How is the Total Revenue calculated on the Dashboard? + + The Total Revenue amount is the sum of captured and refunded payments. + + + if you can still not connect your domain. + + + +### 15. I am getting an error message Failed to create link with given slug, please try a different value. What should I do in this case? + + This error message occurs when the custom URL provided by you already exists. Please use a different URL slug. + + + +### 16. How can I strike-through a text on Razorpay Payment Page description? + + Razorpay does not support the feature to strikethrough a text on the Payment Page description section. + + + +### 17. Can I create multiple URLs for a Payment Page? + + No, you cannot create multiple URLs for a Payment Page. ​A Payment Page allows you to collect multiple payments on the same link. + + + +### 18. How is the Total Revenue calculated on the Dashboard? + + The Total Revenue amount is the sum of captured and refunded payments. diff --git a/llm-content/payments/payment-pages/glossary.md b/llm-content/payments/payment-pages/glossary.md new file mode 100644 index 00000000..6ec7a795 --- /dev/null +++ b/llm-content/payments/payment-pages/glossary.md @@ -0,0 +1,23 @@ +--- +title: Payment Pages | Glossary +heading: Glossary +description: List of commonly used terms related to Razorpay Payment Pages. +--- + +# Glossary + +The following table lists all the commonly used terms and their definitions used in Payment Pages: + +Terms | Description +--- +Fixed Amount | A price field where you decide the amount a customer should pay. +--- +Customers Decide Amount | A price field where customers can enter the amount they wish to pay. +--- +Item with Quantity | A price field with a quantity selection widget that facilitates the purchase of multiple quantities. +--- +80G | Section **80G** of the IT Act allows donations made to specified relief funds and charitable institutions as a deduction from gross total income before arriving at taxable income. +--- +Stock | The goods or merchandise stored with the business in a warehouse or a storage facility. +--- +Expiry Date | The Expiry Date is the date after which the customer cannot pay using the Payment Page. diff --git a/llm-content/payments/payment-pages/goal-tracker.md b/llm-content/payments/payment-pages/goal-tracker.md new file mode 100644 index 00000000..3ca49ff5 --- /dev/null +++ b/llm-content/payments/payment-pages/goal-tracker.md @@ -0,0 +1,133 @@ +--- +title: Configure Goal Tracker +description: Create and configure a Donation Goal Tracker on your Payment Pages. +--- + +# Configure Goal Tracker + +Increase your payment collection by highlighting how many people have backed your goal by using the Goal Tracker. This tracker can highlight your monetary goals, how many people have supported your goal and so on. The Donation Goal Tracker is an optional widget that you can edit or delete even after your Payment Page is live. + +![Payment Page - Goal Tracker](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-goal-tracker.jpg.md) + +## Use Cases + +1. Suitable for an NGO or a Non-Profit organisation seeking donations. +2. Suitable for fundraisers for your product/event. +3. You can also track any milestone you have for your product/event in general. + +## Create Goal Tracker + +There are two types of Goal Trackers you can set up [Track Amount-based Goal](#track-amount-based-goal) and [Track Supporter-based Goal](#track-supporter-based-goal). + +### Track Amount-Based Goal + +Use this tracker to highlight the amount you have collected for your goal. To set up an Amount-based Goal tracker: + + +### 1. Select Payment Page + +**1.1.** Log in to the Dashboard and navigate to **Payment Pages**. + +**1.2.** Click **Select Payment Page**. + + + + +### 2. Set up the Goal Tracker + +**2.1.** Click **+Add a Goal Tracker** and select **Track amount based goal**. + +![Payment Page - Amount Based Goal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/donation-goal-tracker.jpg.md) + +**2.2.** In the **Configure Your Goal Tracker** pop-up: + +- Enter your Goal Amount. + +- Select the **Display supporter count for this goal** check box if you wish to show the number of supporters that have contributed towards your goal on your Payment Page. + +- Select the **Goal has a fixed end date** check box if you want the tracker to be live for a limited time. Configure the end date and time. + +- Click **Save**. + +![Payment Page - Configure Goal Tracker](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/configure-donation-goal-tracker.jpg.md) + +**2.3.** Continue with the creation of your Payment Page. Know more about how to [Create a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md#step-2-add-page-details/). + + + +### Track Supporter-Based Goal + +Use this tracker to highlight the number of people that have supported your goal. To set up a Supporter-based Goal tracker: + + +### 1. Select Payment Page + +**1.1** Log in to the Dashboard and navigate to **Payment Pages**. + +**1.2.** Click the **+ Create Payment Page** button and click the **Select Payment page** button. + +![Payment Page - Select Template](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-create-your-own.jpg.md) + + + + +### 2. Set up Goal Tracker + +**2.1.** Click **+Add a Goal Tracker** and select **Track supporter based goal**. + +![Payment Page - Supporter Based Tracker](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/supporter-based-tracker.jpg.md) + +**2.2.** In the **Configure Your Goal Tracker** pop-up: + +- Select the **Display stock/unit sales** check box if you want to highlight the amount of stock/units you have sold so far. + +- You can select the **I have limited stocks/units available** check box if you have a limited quantity of stock available. Add the quantity below this check box to track how many units are remaining. + +- Select the **Display supporter count for this goal** check box if you wish to show the number of supporters that have contributed towards your goal on your Payment Page. + +- Select the **Goal has a fixed end date** check box if you want the tracker to be live for a limited time. Configure the end date and time. + +- Click **Save**. + +![Payment Page - Configure Goal Tracker](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/configure-supporter-goal-tracker.jpg.md) + +**2.3.** Continue with the creation of your Payment Page. Know more about how to [Create a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md#step-2-add-page-details/). + + + +## Edit Goal Tracker + +To edit your goal tracker: + +1. Navigate to **Payment Pages** on the Dashboard. +2. In the list of **Payment Pages** that appear, click on the link of the page that you want to modify. +3. In the top right corner of the page, click the **Edit** button. + + + + ![Payment Page - Edit Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/goal-tracker-edit.jpg.md) + + + +4. Click **Edit** below the Goal Tracker. You can now edit all the elements of the goal tracker including the amount, end date, supporter count etc. +5. You can also click **Remove** to delete the goal tracker from your Payment Page. + + + + ![Payment Page - Remove Goal Tracker](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/edit-remove-goal-tracker.jpg.md) + + + +6. Click **Save and Update** after you have completed editing your Payment Page. Know more about how to [Manage a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/manage.md). + +### Related Information + +- [How Payment Pages Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/how-it-works.md) + +- [Payment Pages States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/states.md) +- [Search for a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/search.md) +- [Create a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md) +- [Edit a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/manage.md) +- [Configure payment receipts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/receipt.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/subscribe-to-webhooks.md) +- [View Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/view-reports.md) diff --git a/llm-content/payments/payment-pages/how-it-works.md b/llm-content/payments/payment-pages/how-it-works.md new file mode 100644 index 00000000..a0934319 --- /dev/null +++ b/llm-content/payments/payment-pages/how-it-works.md @@ -0,0 +1,68 @@ +--- +title: How Payment Pages Work +description: Create Payment Pages, send them to customers to receive payments and perform other actions. +--- + +# How Payment Pages Work + +Given below are steps to use Razorpay Payment Pages when you: + +## How Payment Pages Work When You Do Not Have a Website + +You can create a Payment Page from your Dashboard and share the page link with your customers to start accepting online payments. + +![Payment Page Workflow for Not having a Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-no-website.jpg.md) + +#### 1. Sign Up for a Razorpay Account +Set up your [Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md). If you already have an account, log in to the Dashboard and click **Payment Pages**. + +#### 2. Select Payment Page +Click **Create a Payment Page** and then, click **Select Payment page**. Know [how to select Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md#step-1-select-payment-page). + +#### 3. Add Business Details + +Add your business details. For example, you can add business contact information, terms and conditions and so on. Know more about [adding business details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md#add-business-details). + +#### 4. Add Payment Details + +Configure the amount and input fields. For example, you can add quantity details, add a name field and so on. Know more about [adding payment details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md#add-payment-details). + +#### 5. Share and Start Accepting Payments + +Publish the page and share the URL with your customers. The customers visit this page, fill in the details, select a payment method and complete the payment. Know more about [publishing a page and sharing it with customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md#step-4-publish-and-share). + +## How Payment Pages Work When You Have a Website + +You can create a Payment Page from your Dashboard and embed it onto your site without any development effort from your end. + +![Payment Page Workflow for Having a Website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-embed-website.jpg.md) + +#### 1. Sign Up for a Razorpay Account + +Set up your [Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md). If you already have an account, log in to the Dashboard and click **Payment Pages**. + +#### 2. Select Payment Page + +Click **Create a Payment Page** and then, click **Select Payment page**. Know more about [how to select Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md#step-1-select-payment-page). + +#### 3. Add Business Details + +Add the business details. For example, you can add business contact information, terms and conditions and so on. Know more about [adding business details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md#add-business-details). + +#### 4. Add Payment Details + +Configure the amount and input fields. For example, you can add quantity details, add a name field and so on. Know more about [adding payment details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md#add-payment-details). + +#### 5. Get Hyperlink for Pay Button on Your Website and Start Accepting Payments + +Add the hyperlink to your website. When customers click on the **Pay** button, they will be redirected to the Razorpay Payment Page to complete the payment. Know more about [publishing a page and sharing it with customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md#step-4-publish-and-share). + +### Related Information + +- [Payment Pages States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/states.md) +- [Create a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md) +- [Search for Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/search.md) +- [Manage Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/manage.md) +- [Configure Payment Pages Receipt](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/receipt.md) +- [Configure Goal Tracker](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/goal-tracker.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/subscribe-to-webhooks.md) diff --git a/llm-content/payments/payment-pages/manage.md b/llm-content/payments/payment-pages/manage.md new file mode 100644 index 00000000..c85e9b15 --- /dev/null +++ b/llm-content/payments/payment-pages/manage.md @@ -0,0 +1,111 @@ +--- +title: Manage Payment Pages +description: Edit content, change settings or deactivate your Payment Page. +--- + +# Manage Payment Pages + +You can perform the following Payment Page actions: + +### Modify Payment Page Content + +To modify the Payment Page content: +1. Navigate to **Payment Pages** on the Dashboard. +2. In the list of pages that appear, click on the link of the page that you want to modify. +3. In the top right corner of the page, click the **Edit Page** button. + ![Edit Button - Manage Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-update_stock.jpg.md) + +4. The page appears in edit mode. You can now edit any of the fields to update the details, including the price fields. + +### Update Stock + +1. Navigate to **Payment Pages** on the Dashboard and select **Payment Pages**. + ![Dashboard Page type selection](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-pp-page-selection.jpg.md) +2. In the list of **Payment Pages** that appears, select the page you wish to modify. +3. In the top right corner, the different price fields are displayed. Click **Update Stock** against the relevant price item. +4. You can either make the stock quantity unlimited, using **No Limit** or enter an amount in the box given below. +5. Click **Save**. + +### Modify Settings + +To modify Payment Page settings: +1. Navigate to **Payment Pages** on the Dashboard and select **Payment Pages**. +2. Click on the page id. This opens the page details panel where you can perform the following actions: + +Action | Effect +--- +**Edit** the page | Editing reopens the editor with saved details. You can make changes to the page content. +--- +**Deactivate** the page | Deactivating a page makes it inaccessible to your customers. +--- +Configure **Expires on** | This option enables you to set the page's expiry date and time using the date and time picker. You can also select the **No Expiry** checkbox to run the page indefinitely. +--- +**Add New** notes on the page | You can add up to 5 custom notes on the Payment Page. + +![Modify Settings - Manage Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-edit_pp_2.jpg.md) + +> **INFO** +> +> +> **Best Practices** +> +> - To avoid confusion, ensure that no two pages have the same **Title**. +> - You can edit an expired or inactive Payment Page and republish it with new changes. This helps avoid page duplication and allows you to query the system efficiently. +> + +### Deactivate Payment Page + +A Payment Page can have two states, active and inactive. + +Status | Description +--- +`active` | The Page is published and live. +--- +`inactive` | The Page goes inactive due to one of the following actions:- Manual deactivation +- Page expiry +- Items out-of-stock + +You can make an existing page inactive if you no longer wish to accept payments using it. + +Manual Deactivation + +To deactivate manually: +1. Log in to Dashboard and navigate to **Payment Pages**. +2. Select **Payment Pages**. +3. Select the page you wish to deactivate. +4. In the page details screen, go to **Page Status** field and click **Deactivate**. +5. In the dialogue box that appears, confirm the action by clicking the **Yes, deactivate** button. + +![Deactivate Button - Manage Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-edit_pp.jpg.md) + +### Deactivation Using Expiry Date + +You can also automate page deactivation by setting an expiry date for the page. You can set expiry date: + +Know how to [set the page's expiry date](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md#step-3-configure-page-settings) at the time of creation. + +To set the expiry mode of a page from the list of **Payment Pages**: +1. Navigate to **Dashboard** → **Payment Pages**. +2. Select **Payment Pages**. +3. In the list of **Payment Pages** that appears, Select the page you wish to set expiry for. +4. In the page details screen, go to **Expires On** field and click **Change**. +5. The field now shows a **No Expiry** checkbox selected. Unselect the box for the calendar to appear. +6. In the calendar, set the date and time of expiry and click **Save**. + +![Save Button - Exipry Date - Manage Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-edit_pp_2.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> The expiry time must be at least 15 minutes after the current time. +> + +### Related Information + +- [Create a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md) +- [Search for Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/search.md) +- [Configure Payment Pages Receipt](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/receipt.md) +- [Configure Goal Tracker](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/goal-tracker.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/subscribe-to-webhooks.md) diff --git a/llm-content/payments/payment-pages/plugins-add-ons.md b/llm-content/payments/payment-pages/plugins-add-ons.md new file mode 100644 index 00000000..49c16f1b --- /dev/null +++ b/llm-content/payments/payment-pages/plugins-add-ons.md @@ -0,0 +1,16 @@ +--- +title: Track Payments Using Google Tracking ID and Facebook Pixel +description: Add your Google Tracking ID and Facebook Pixel to your Payment Pages to track payments and conversions from your Google and Facebook advertisements. +--- + +# Track Payments Using Google Tracking ID and Facebook Pixel + +If you use Razorpay Payment Pages to accept payments from customers and also: + +- Advertise on Google and use Google Tracking ID to track conversions +- Advertise on Facebook and use Facebook Pixel to track conversions + +You can do the following to track Google and Facebook ads and analyse conversions: +- [Add Google Analytics Tracking ID to Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/plugins-add-ons/google-analytics.md) +- [Add Facebook Pixel to Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/plugins-add-ons/fb-pixel.md) +- [Add Facebook Pixel to your payment success page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/plugins-add-ons/fb-payment-success.md) diff --git a/llm-content/payments/payment-pages/plugins-add-ons/fb-payment-success.md b/llm-content/payments/payment-pages/plugins-add-ons/fb-payment-success.md new file mode 100644 index 00000000..ba8aea56 --- /dev/null +++ b/llm-content/payments/payment-pages/plugins-add-ons/fb-payment-success.md @@ -0,0 +1,37 @@ +--- +title: Payment Pages | Add ons - Facebook Pixel +heading: Add Facebook Pixel on Payment Success Page +description: Add your Facebook Pixel on your payment success page. This helps you track payments and conversions from your Facebook advertisements. +--- + +# Add Facebook Pixel on Payment Success Page + +You should integrate Facebook Pixel on your payment success page to track and analyse the advertisement conversion to payments if you: +- Use Razorpay Payment Pages to accept payments from customers and redirect them to a success page post payment. +- And, advertise on Facebook and use Facebook Pixel to track conversions. + +## Prerequisites + +- [Create a Facebook Pixel](https://www.facebook.com/business/help/952192354843755?id=1205376682832142&recommended_by=1700857106877546). +- Create a payment success page on your domain and [add the Facebook Pixel to it](https://www.facebook.com/business/help/952192354843755?id=1205376682832142). + +## Workflow + +Let us assume you run a website selling pet supplies. You attract customers using advertisements on Facebook and sell them pet products using Razorpay Payment Pages. + +To track and measure the effectiveness of these Facebook advertisements and how many of them convert into purchases, you need to add a redirect from your Payment Page to this success page. + +To add a redirect: +1. Navigate to your Payment Page in the edit mode. +2. Click **Page Settings**. +3. In the **Action after Success Payment** field, select **Redirect to your website**. +4. Enter your website's success page URL here as shown: + +![](/docs/assets/images/payment-pages-v3-add-redirect-url.jpg) + +Every time a customer successfully completes a payment, they are directed to the success page. Facebook pixel tracks this event. + +### Related Information + +- [Add Facebook Pixel to Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/plugins-add-ons/fb-pixel.md) +- [Add Google Analytics Tracking ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/plugins-add-ons/google-analytics.md) diff --git a/llm-content/payments/payment-pages/plugins-add-ons/fb-pixel.md b/llm-content/payments/payment-pages/plugins-add-ons/fb-pixel.md new file mode 100644 index 00000000..b15657f8 --- /dev/null +++ b/llm-content/payments/payment-pages/plugins-add-ons/fb-pixel.md @@ -0,0 +1,46 @@ +--- +title: Add Facebook Pixel +description: Add your Facebook Pixel to your Payment Pages to track payments and conversions from your Facebook advertisements. +--- + +# Add Facebook Pixel + +You can add your Facebook Pixel to your Payment Pages Storefront to track payments and conversions from your Facebook advertisements. + +**Available Tracking Metrics** + +Metrics | Description +--- +Page Views | When a customer lands on your Payment Page. This is the default metric to track page visits. +--- +Add to Cart | When a customer clicks on an add-to-cart button. +--- +Initiate Checkout | When a customer clicks on a checkout button. +--- +Purchase | When a customer finishes the purchase or checkout flow and lands post-payment success page. + +## Prerequisites + +[Create a Facebook Pixel](https://www.facebook.com/business/help/952192354843755?id=1205376682832142&recommended_by=1700857106877546). + +## Add Facebook Pixel to Your Payment Page + +To add Facebook Pixel to your Payment Page: +1. Navigate to your Payment Page in the edit mode. +2. Click **Page Settings**. +3. Go to **Plugins and Add-ons** and click **Configure**. + ![Configure Plugins and Add Ons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-fb-pixel-configure-plugins-addons.jpg.md) +4. Add the details: + 1. **Facebook Pixel ID**: Enter the Facebook Pixel ID. + 2. Select the metrics you want to track from the following: + - Page Views + - Initiate Payment + - Add to Cart + - Payment Complete + ![Add Google Tracking ID and FB Pixel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-fb-pixel-fb-pixel-google-trackingid.jpg.md) +5. Click **Save**. + +### Related Information + +- [Add Facebook Pixel to your payment success page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/plugins-add-ons/fb-payment-success.md) +- [Add Google Analytics Tracking ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/plugins-add-ons/google-analytics.md) diff --git a/llm-content/payments/payment-pages/plugins-add-ons/google-analytics.md b/llm-content/payments/payment-pages/plugins-add-ons/google-analytics.md new file mode 100644 index 00000000..db7d4f77 --- /dev/null +++ b/llm-content/payments/payment-pages/plugins-add-ons/google-analytics.md @@ -0,0 +1,34 @@ +--- +title: Add Google Analytics Tracking ID +description: Add your Google Tracking ID to your Payment Pages to track payments and conversions from your Google advertisements. +--- + +# Add Google Analytics Tracking ID + +You can add your Google Tracking ID to your Payment Pages to track payments and conversions from your Google advertisements. Know more about [Tracking ID](https://support.google.com/analytics/answer/1008080?hl=en) and how to create one using Google Analytics account. + +**Available Tracking Metrics** + +Metric | Description +--- +Page View | When a customer lands on your Payment Page. This is the default metric to track page visits. + +## Prerequisites + +[Create a Google Tracking ID](https://support.google.com/analytics/answer/1008080?hl=en). + +## Add Google Tracking ID to Your Payment Page + +To add Google Tracking ID to your Payment Pages: +1. Navigate to your Payment Page/Webstore in the edit mode. +2. Click **Page Settings**. +3. Go to **Plugins and Add-ons** and click **Configure**. + ![Configure Plugins and Add Ons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-plugins-addons-configure.jpg.md) +4. Add the **Tracking ID** to track the page views. + ![Add Google Tracking ID and FB Pixel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-plugins-addons-GA.jpg.md) +5. Click **Save**. + +### Related Information + +- [Add Facebook Pixel to Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/plugins-add-ons/fb-pixel.md) +- [Add Facebook Pixel to your payment success page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/plugins-add-ons/fb-payment-success.md) diff --git a/llm-content/payments/payment-pages/plugins-add-ons/magic-checkout.md b/llm-content/payments/payment-pages/plugins-add-ons/magic-checkout.md new file mode 100644 index 00000000..3ce8f508 --- /dev/null +++ b/llm-content/payments/payment-pages/plugins-add-ons/magic-checkout.md @@ -0,0 +1,91 @@ +--- +title: Integrate Payment Pages with Magic Checkout +description: Integrate Payment Pages with Magic Checkout and start accepting payments. +--- + +# Integrate Payment Pages with Magic Checkout + +Use Magic Checkout to help customers easily complete transactions on your Razorpay Payment Page. Customers can add and securely save their addresses and preferred payment details at checkout as a one-time activity. They can then re-use these details while making repeat payments across any Payment Page in the Razorpay network. + +## Advantages + +- 20% rise in conversion rates as we prefill customer details for every subsequent purchase. +- Frictionless checkout experience reduces cart abandonment rates and increases sales. +- Customers can securely save their addresses and use them for repeat transactions, thus leading to lesser clicks and smoother checkout. + +## Integration Steps + +You can integrate your Payment Page with Magic Checkout using the following steps. + +1. Log in to the Dashboard and navigate to Payment Pages. +2. Click the **+ Create Payment Page** button. + ![Create](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-magic-create.jpg.md) +3. Select a template from the list or click **Create your Own**. + ![](/docs/assets/images/payment-pages-v3-create-your-own.jpg) +4. Click **Magic Checkout Settings**. + ![](/docs/assets/images/pp-shipping-settings.jpg) +5. Enable **Magic Checkout**. This will remove your customer input fields such as shipping and customer details. + ![](/docs/assets/images/pp-magic-enable.jpg) +6. Select the required **Delivery Charge**. The three different categories for delivery charges are: + - **No extra charge**: No charges applied for delivery. + - **Yes, a flat amount**: Add the amount the customer should pay for delivery charges. For example, if the order value is ₹500 and the delivery charge is ₹50, then the customer should pay ₹550 in total. + - **Depends on the order amount**: Specify the minimum and maximum order value and the respective delivery charge. For example, if the order value is between ₹0 to ₹100, the delivery charge can be ₹10. + ![](/docs/assets/images/pp-shiprocket-charge.jpg) +7. Click **Save**. After you save the changes, the following address fields are removed, and the customer's shipping address will be collected at checkout. Click **Confirm and Save**. + - Email + - Phone + - Address + - City + - State + - Pincode + ![](/docs/assets/images/pp-magic-fields.jpg) +8. Continue with the creation of your Payment Page. Know more about how to [Create a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md#step-2-add-page-details/). + +## Edit Payment Page + +To edit a Payment Page: +1. Navigate to **Payment Page** on the Dashboard. +2. In the list of **Payment Pages** that appears, click on the link of the page that you want to edit. +3. In the top right corner of the page, click the **Edit** button. + ![](/docs/assets/images/payment-pages-v3-edit-pp.jpg) +4. The page appears in edit mode. You can now edit any of the fields from [step 4](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/plugins-add-ons/magic-checkout.md#integration-steps:~:text=Click%20Magic%20Checkout%20Settings.) onwards. + +## Customer Experience + +After you publish the page and share it with your customers, they can perform the following steps to complete the payment successfully. + +Watch the GIF to understand the end-to-end payment flow. +![](/docs/assets/images/pp-magic.gif) + +When a customer clicks the Pay button, they should complete these steps on the Magic Checkout pop-up page: + +1. Enter the **Contact Details** which includes **Mobile Number** and **Email**. Click **Continue**. +2. Enter the **Pincode** and **Address**. +3. Enter **Full Name**. +4. Select the check box if the **Billing address is same as delivery address**. +5. Select the check box to **Save address** and use them for repeat transactions if required. Click **Continue**. +6. Enter the **OTP** to verify the mobile number. +7. Select a **Payment Method** and click **Pay Now**. +8. Enter the relevant details and complete the payment. + +## Shipping and Customer details + +Navigate to **Transactions** and select the relevant **Order Id** to view the shipping and customer details. + +![Payment details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-magic-payment-details.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> After you integrate Payment Pages with Magic Checkout, you can also integrate with [Shiprocket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/plugins-add-ons/shiprocket.md) if required. +> + +> **WARN** +> +> +> **Watch Out!** +> +> If you choose to disable magic checkout, your website/app will automatically fall back to your default Checkout experience +> diff --git a/llm-content/payments/payment-pages/plugins-add-ons/shiprocket.md b/llm-content/payments/payment-pages/plugins-add-ons/shiprocket.md new file mode 100644 index 00000000..b5f179c8 --- /dev/null +++ b/llm-content/payments/payment-pages/plugins-add-ons/shiprocket.md @@ -0,0 +1,39 @@ +--- +title: Integrate Payment Pages With Shiprocket +description: Integrate Shiprocket with Razorpay Payment Pages to automate shipping and dispatch products seamlessly to customers. +--- + +# Integrate Payment Pages With Shiprocket + +Shiprocket is India's leading logistics software, offering automated shipping solutions. With the help of Shiprocket, you can ship anywhere in India and abroad using the best courier companies and at discounted rates. Integrate with Shiprocket to dispatch your products seamlessly to your customers using the following steps: + +## 1. Enable Shiprocket Option on Payment Page + +1. Log in to the Dashboard and navigate to Payment Pages. +2. Click the **+ Create Payment Page** button. +3. Click **Select Payment page**. +4. Click **Page Settings**. + ![Payment Pages - Page Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-shiprocket-settings.jpg.md) +5. Scroll down to the **Create orders on Shiprocket** section and click **Enable**. + ![Payment Pages - Shiprocket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-shiprocket-enable.jpg.md) +6. A pop-up will appear informing you that the following fields will be added to your Payment Page. Click **Continue**. + - Name + - Address + - City + - State + - Pincode + ![Payment Pages - Shiprocket Options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-shiprocket-fields.jpg.md) +7. Continue with the creation of your Payment Page. Know more about how to [Create a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md#step-2-add-page-details/). + +## 2. Configure Your Shiprocket Account + +1. Log in to your [Shiprocket Account](https://app.shiprocket.in/login) or create one if you have not already. +2. On your Shiprocket Dashboard: + 1. Navigate to **All Channels** and click **+ Add New Channel**. + ![Shiprocket - Add New Channel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-shiprocket-integrate.jpg.md) + 2. Navigate to Razorpay Payment Pages and click **Integrate**. + 3. Click **Connect with Razorpay**. You will be redirected to the Razorpay login page. +3. Log in to your Razorpay Account. +4. On the **Authorize Shiprocket** page, click **Authorize** to verify your account integration with Shiprocket. + +After this, you will be redirected to the Shiprocket channel page. Here you can edit your Razorpay channel as per your preferences. diff --git a/llm-content/payments/payment-pages/plugins-add-ons/zapier.md b/llm-content/payments/payment-pages/plugins-add-ons/zapier.md new file mode 100644 index 00000000..cdf479cf --- /dev/null +++ b/llm-content/payments/payment-pages/plugins-add-ons/zapier.md @@ -0,0 +1,70 @@ +--- +title: Integrate Payment Pages With Zapier +description: Connect Razorpay Payment Pages with Zapier to automate workflows, sync data across apps like Mailchimp, Google Sheets and CRMs without writing any code. +--- + +# Integrate Payment Pages With Zapier + +Integrate Razorpay Payment Pages with [Zapier](https://zapier.com/) and move data between applications with triggers and actions. Zapier is a tool that helps you automate repetitive tasks between two or more apps without using a single line of code. When an event happens in one app, Zapier can tell another app to perform a particular action. + +## Use Cases + +Following are a few examples where you can use Payment Pages-Zapier integration: + +- Send automated notifications from popular email automation tools like Mailchimp or Gmail for new Razorpay payments. +- Update your customer data in your CRM tools like Hubspot or Salesforce without any hassle. +- Sync information seamlessly between your accounting apps like Zoho Books or Tally. +- Enrol students in learning courses with new successful payments on Razorpay. +- Add newly-captured Razorpay payments to rows in Google Sheets. +- Send SMS messages through messaging tools for new payments made through Razorpay. + +## Prerequisites + +1. Sign up for a [Razorpay account](https://dashboard.razorpay.com/signup). +2. Sign up for a [Zapier](https://zapier.com/sign-up) account. + +## Integration Steps + +Watch this video to know how to integrate Razorpay with your Zapier app. + +[Video: https://www.youtube.com/embed/8dVBLa8PEZs] + +To integrate Zapier with your Payment Page: + +1. Click on the **Create Zap** button on the top-left of the Zapier Dashboard page. + +> **INFO** +> +> +> **What is a Zap** +> +> A Zap is an automated workflow that connects your apps and services together. Every Zap consists of a trigger step and one or more action steps. When you turn your Zap on, it will run the action steps every time the trigger event occurs. +> + +2. Name your Zap. +3. Search for the Razorpay option in the list of triggers. + ![Razorpay Zapier Trigger](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/zapier-name-zap.jpg.md) +4. Select the **Payment Page Paid** event and click **Continue**. + ![Razorpay Payment Page Event](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/zapier-pp-paid.jpg.md) +6. Click the **Sign in to Razorpay** button to connect to your Razorpay account through OAuth. +7. You will see this screen if you are logged in, or else you will be prompted to log in. +8. Once authorised, you will be redirected back to the Zapier page. You are now linked to your account. +9. Click **Continue**. +10. Select the Payment Page you wish to set up the trigger for and click **Continue**. + +11. Click **Test trigger** for Zapier to run a test trigger. + + +> **INFO** +> +> +> **Tech Trigger** +> +> Test trigger is a sample payment that Zapier will pull from your account so that you can continue with the rest of your workflow. +> + + ![Razorpay Test Trigger](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/zapier-test-trigger.jpg.md) + +10. To get a test trigger, you need to have at least one success captured payment from the recent 1000 payments. You can repeat the process by choosing from a range of various apps. + + ![Zapier App Options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/zapier-select-app.jpg.md) diff --git a/llm-content/payments/payment-pages/receipt.md b/llm-content/payments/payment-pages/receipt.md new file mode 100644 index 00000000..f24a444d --- /dev/null +++ b/llm-content/payments/payment-pages/receipt.md @@ -0,0 +1,70 @@ +--- +title: Configure Payment Page Receipts | Customise and Automate +heading: Configure Payment Pages Receipt +description: Generate, download and share receipts with customers for payments on your Payment Pages. Send email notifications and PDF receipts to your customers. +--- + +# Configure Payment Pages Receipt + +You can share payment receipts with customers via email once they complete payments using the Payment Page. + +## Set Up Payment Receipt + +Payment Page Receipts can be generated and shared using **Automated Rececipts** or **Manual Receipts**. + +You can automatically share the payment receipt with customers via email and SMS. An auto-generated reference number is added by Razorpay. + +To configure automated Payment Page receipts: +1. While creating or editing the Payment Page, select **Payment Receipts** from the top menu ribbon. + ![Edit a Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-pp-receipt-non-ngo.jpg.md) +2. On the **Payment Receipts Settings** pop-up page, select **Send Automated Receipts**. +3. To show an input field such as Name, Address and its associated value in the receipt: + 1. Enable the **Show an Input Field on Receipt** option. + 2. In the drop-down list, select one of the custom input fields such as `Name`, `Address` or `Landmark`, used on the Payment Page. For example, if you have selected `Name`, the customer's name `Gaurav Kumar` will appear on the Payment Page receipt. +4. Click **Save**. + +![Send automated receipts from Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-pp-receipt-auto-settings.gif.md) + +You can also manually add a reference number to the receipt and share it with your customers. + +To configure manual Payment Page receipt: + +1. On the Payment Page creation page, select **Payment Receipts** from the top menu ribbon. + ![Payment Page creation page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-pp-receipt-non-ngo.jpg.md) +2. On the **Payment Receipts Settings** pop-up page, select **Send Manual Receipts**. +3. To show an input field such as `Name`, `Address` and its associated value in the receipt: + 1. Enable the **Show an Input Field on Receipt** option. + 2. In the drop-down list, select one of the custom input fields such as `Name`, `Address` or `Landmark`, used on the Payment Page. For example, if you selected `Name`, the customer's name `Gaurav Kumar` will appear on the Payment Page receipt. + ![Send manual receipts from Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-manual-pp-receipt.gif.md) +4. Click **Save**. +5. Navigate to the page's **Transactions Details** page. All the payments made using the Payment Page are listed here. + ![Transaction details of payments via Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-pp-transactions-send.jpg.md) +6. Click the Payment id to view the payment details. +7. In the **Payment Receipt** field, click the **Send Receipt** button. +8. Enter a reference number for the receipt as per your business requirements. + ![Add a reference number for a payment receipt](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-pp-manual-ref.jpg.md) +9. Click **Send**. + +You can also download the payment receipt using the **Download Receipt** button. + +### Resend and Download Payment Receipt + +To resend the receipt to a customer: + +1. Navigate to the page's **Transactions Details** screen. All the payments made using the Payment Page are listed here. +2. Click on the Payment id to view the payment details. +3. In the **Payment Receipt** field, click the **Send** button. This will resend the receipt to the customer. + +[Video content] + +You can download the payment receipt using the **Download** button. + +### Email Notification to Customers + +After your customers complete the payment using the Payment Page, the payment receipt is sent to them via email as a PDF attachment. The details entered by the customer on the Payment Page appear on the email body. + +![Payment receipt sent via email notification to a customer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-receipt-email-non80g.jpg.md) + +### Related Information + +[Configure 80G-Enabled Payment Pages Receipt](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/80g-receipt.md) diff --git a/llm-content/payments/payment-pages/search.md b/llm-content/payments/payment-pages/search.md new file mode 100644 index 00000000..f895f4ca --- /dev/null +++ b/llm-content/payments/payment-pages/search.md @@ -0,0 +1,30 @@ +--- +title: Search for Payment Pages +description: Search for a Payment Page on the Razorpay Dashboard. +--- + +# Search for Payment Pages + +You can search for a Payment Page on the Dashboard by specifying various filters. + +## Steps to Search Payment Pages + +To search for a Payment Page: + +1. Log in to the Dashboard. +2. Select **Payment Pages** from the left menu and search for a payment page by specifying filters. + +![Payment Pages List](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-payment-pages-list.jpg.md) + +Filter | Description +--- +Title | The title of the payment page. +--- +Status | The state of the payment page. Know more about [Payment Page states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/states.md#payment-pages-states-and-description/). + +### Related Information + +- [How Payment Pages Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/how-it-works.md) + +- [Payment Pages States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/states.md) +- [Create a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md) diff --git a/llm-content/payments/payment-pages/states.md b/llm-content/payments/payment-pages/states.md new file mode 100644 index 00000000..46a241ce --- /dev/null +++ b/llm-content/payments/payment-pages/states.md @@ -0,0 +1,30 @@ +--- +title: Payment Pages States +description: List of states of a Payment Page and their significance. +--- + +# Payment Pages States + +There are two states of a Payment Page, **Active** and **Inactive**. + +## Payment Pages States & Descriptions + +The following diagram is a simple illustration of the two states of Payment Pages: + +![Illustration of lifecycle of a page as active or inactive](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-pp-states.jpg.md) + +The table below lists the states of a Payment Page and a brief description of each state: + +Status | Description | Next Steps +--- +Active | Indicates the page has been created and saved. You can accept payments using this page. You can edit this page. | Customers can start making payments through this page. +--- +Inactive | Indicates the page has been deactivated or has expired. You cannot accept payments using this page. | Customers can no longer make payments through this page. You can reactivate the page to start accepting payments. There are three ways to reactivate the page:- Update Stock. +- Update Expiry Date. +- Click the **Reactivate** button. + +### Related Information + +- [How Payment Pages Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/how-it-works.md) +- [Create a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md) +- [Search for Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/search.md) diff --git a/llm-content/payments/payment-pages/subscribe-to-webhooks.md b/llm-content/payments/payment-pages/subscribe-to-webhooks.md new file mode 100644 index 00000000..b2e2b5a1 --- /dev/null +++ b/llm-content/payments/payment-pages/subscribe-to-webhooks.md @@ -0,0 +1,34 @@ +--- +title: Payment Pages | Subscribe to Webhooks +heading: Subscribe to Webhooks +description: Subscribe to various webhook events related to Payment Pages to receive instant notifications. +--- + +# Subscribe to Webhooks + +Subscribe to webhook events relevant to Payment Pages. + +To subscribe to webhook events: +1. Log in to the Dashboard. +2. Navigate to **Account & Settings** → **Webhooks** to subscribe to any of the events mentioned in the following section. + +## Webhook Events and Descriptions + +Webhook Events | Description +--- +`payment.authorized` | Triggered when a payment is authorized. +--- +`payment.captured` | Triggered when a payment is successfully captured. +--- +`payment.failed` | Triggered when a payment fails. +--- +`order.paid` | Triggered when an order is successfully paid. + +Know more about [webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) and check the [sample payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md). + +### Related Information + +- [How Payment Pages Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/how-it-works.md) + +- [Payment Pages States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/states.md) +- [Create a Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md) diff --git a/llm-content/payments/payment-pages/use-cases.md b/llm-content/payments/payment-pages/use-cases.md new file mode 100644 index 00000000..a4133c15 --- /dev/null +++ b/llm-content/payments/payment-pages/use-cases.md @@ -0,0 +1,154 @@ +--- +title: Payment Pages Use Cases +description: Explore the diverse use cases of Razorpay Payment Pages, a robust payment collection solution for businesses. +--- + +# Payment Pages Use Cases + +Use Razorpay Payment Pages, an ideal solution for businesses and organisations to manage their transactions efficiently and securely across diverse industries. With Payment Pages, you can accept payments for various purposes, including event tickets, donations, and educational fees. + + +### Events and Tickets + + Acme Conferences implements Razorpay Payment Pages to streamline ticket sales for a range of events, including professional conferences and exhibitions. Here is an example of a [Payment Page](https://pages.razorpay.com/grofersexpo). + + Benefits for Acme Conferences: + + + + Customisable Payment Pages + + Create branded, event-specific Payment Pages that can handle various ticketing options and add-ons. + + + +### Seamless User Experience + + Offer attendees a straightforward purchasing path from page visit to payment completion. + + + +### Timely Updates + + Keep track of sales with real-time notifications. + + + + + + +### Non-Profit Organisations + + Acme NGO uses Razorpay Payment Pages to accept donations for social causes, like supporting flood relief efforts. Here is an example: [Payment Page](https://pages.razorpay.com/saveourearth). + + Benefits for Acme NGO: + + + + Easy Donation Process + + Provide a simple and quick way for donors to contribute with pre-set or custom donation amounts. + + + +### Global Reach + + Accept donations from both local and international supporters with multiple currency options. + + + +### Donor Engagement + + Add a goal tracker to your Payment Page to highlight the progress of your campaign. You can also customise the donation page with impactful messages and images to connect with donors. + + + + +### 80G Receipt + + You can share payment receipts with 80G details to Indian customers via email once they make the payment. + + + + + + + +### Ecommerce + + Acme Store leverages Razorpay Payment Pages to sell handmade crafts and artwork directly to consumers online. Here is an example [Payment Page](https://pages.razorpay.com/brownshoecompay). + + Benefits for Acme Store: + + + + Product Showcase + + Display products with detailed descriptions and images on a dedicated Payment Page. + + + +### Instant Checkout + + Enable customers to make purchases directly from the Payment Page, reducing the steps to conversion. + + + +### Inventory Management + + Track product sales efficiently with integrated stock-keeping functionalities. + + + + + + +### Education + + Acme Institute adopts Razorpay Payment Pages to collect tuition and miscellaneous educational fees. + + Here is an example [Payment Page](https://pages.razorpay.com/exceldigital). + + + Benefits for Acme Institute: + + + + Organised Fee Collection + + Set up distinct Payment Pages for different courses and fee types, simplifying accounting processes. + + + +### Convenient Payment for Students + + Allow students to pay fees at their convenience without the need for physical queuing. + + + +### Automated Receipts + + Instantly generate and send receipts for each payment, ensuring transparency and record accuracy. + + + + + + +### Healthcare + + Acme Clinics uses Razorpay Payment Pages for the efficient billing of consultations, treatments, and health packages. + + Benefits for Acme Clinics: + + + + Easy Payment for Patients + + Patients can settle their medical bills using customised Payment Pages, enhancing their experience. + + + +### Secure Transactions + + Ensure patient data and payment information are protected with high-security standards. diff --git a/llm-content/payments/payment-pages/view-reports.md b/llm-content/payments/payment-pages/view-reports.md new file mode 100644 index 00000000..8a0d51df --- /dev/null +++ b/llm-content/payments/payment-pages/view-reports.md @@ -0,0 +1,52 @@ +--- +title: Payment Pages | View Reports +heading: View Reports +description: View the details of payments received for a specific Payment Page and download the report. +--- + +# View Reports + +You can generate and download the standard Payment Pages reports from the Dashboard. + +To view the payments made on a particular Payment Page: + +1. Navigate to **Payment Pages** on the Dashboard. +2. Click the required page id. The page details view appears. +3. Scroll down to the transaction details section. Here the list of all payments made to the page is displayed. + ![View Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-view-reportpp.jpg.md) +4. You can click on the payment_id for more details. + ![View Payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-view-paymentpp.jpg.md) + +## Download Report + +You can download the report pertaining to a Payment Page in the following formats: +- CSV +- Excel (xlsx) +- Old Excel (xls) + +To download a report: +1. Navigate to **Payment Pages** on the Dashboard. +2. Click the required page id. The page details view appears. +3. Scroll down to the transaction details section. Here the list of all payments made to the page is displayed. +4. Hover the mouse pointer on **Download Report**, and click one of the formats. + +![Download Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-view-reportpp.jpg.md) + + +### The downloaded report has the following columns: + + - Payment Page ID + - Payment Page ID + - Payment Page Title + - Payment Date + - Order ID + - Item Name + - Item Amount + - Item Quantity + - Item Payment Amount + - Total Payment Amount + - Currency + - Payment Status + - Input Fields, if any + - Email + - Phone diff --git a/llm-content/payments/payment-pages/x-tip-jar.md b/llm-content/payments/payment-pages/x-tip-jar.md new file mode 100644 index 00000000..a7a7a989 --- /dev/null +++ b/llm-content/payments/payment-pages/x-tip-jar.md @@ -0,0 +1,123 @@ +--- +title: Accept Payments Using X Tip Jar +description: Accept payments using X's Tip Jar feature on Payment Pages. +--- + +# Accept Payments Using X Tip Jar + +Use X's Tip Jar (available to select users) to receive money from other X users using third-party service providers. X users in India can use Razorpay to accept payments via the Tip Jar feature. + +> **INFO** +> +> +> **Feature Availability** +> +> X Tip Jar to accept payments is available only for iOS and Android users. +> + +If Tip Jar is enabled for you, you can easily accept payments using a Razorpay Payment Page. All you need to do is create a new Payment Page or use an existing one and link it to your Tip Jar account. + +## Prerequisites + +- [Set up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md) your Razorpay account and complete the KYC process. +- Create a [Payment Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/create.md) and copy the page URL. If you already have a Payment Page, follow the steps given below. + +## Steps to Accept Payments Using X Tip Jar + + + Add a custom suffix to make your Payment Page URL unique and easy to share. + + + + Connect your Payment Page to your X profile's Tip Jar feature. + + + + Let your followers support you by sending money via Razorpay. + + + + Track and view all payments received from X users on your Dashboard. + + +### 1. Customise Payment Page URL + +Customise the Payment Page URL by adding a suffix. For example, if your page is called Living Arts Exhibition 2021, you can customise the URL to `https://pages.razorpay.com/livingarts2021` by adding the suffix `livingarts2021`. You should customise your Payment Page URL and add the suffix to Tip Jar. + +> **INFO** +> +> +> **Unique Custom URLs** +> +> If another business that uses Razorpay Payment Pages has already created a custom URL with `livingarts` as the suffix, you will not be able to use `livingarts`. Your Payment Page suffix must be unique as two Payment Pages cannot have the same suffix. +> + +You can customise URLs: + + +### While Creating a New Payment Page + + To customise URL while creating a new Payment Page: + 1. Log in to the Dashboard. + 2. Navigate to **Payment Pages**. + 3. Click **Create Payment Page**. + 4. Fill in the necessary details and click **Page Settings**. + 5. In the **Choose custom URL for this page** field, enter the suffix. For example, if your page is called Living Arts Exhibition 2021, enter the phrase `livingarts2021`. The custom URL appears as `https://pages.razorpay.com/livingarts2021`. + 6. Save and publish the page. + 7. Copy the URL suffix. This suffix should be added to X Tip Jar. + + + +### By Editing an Existing Payment Page + + To customise URL by editing an existing Payment Page: + + 1. Log in to the Dashboard. + 2. Navigate to **Payment Pages**. + 3. Click the payment page title and click **Edit**. + 4. Click **Page Settings**. + 5. In the **Choose custom URL for this page** field, edit the suffix. For example, if your page is called Living Arts Exhibition 2021, enter the phrase `livingarts2021`. The custom URL appears as `https://pages.razorpay.com/livingarts2021`. If you had previously added a suffix, you can modify it in this step. + 6. Save and publish the page. + 7. Copy the URL suffix. This suffix should be added to X Tip Jar. + + +### 2. Link Payment Page to Tip Jar + +Link the Payment Page to your X profile. When X users tap the Tip Jar feature on your profile and select **Razorpay**, this Payment Page is displayed to make payments. + +To link the Payment Page with the Tip Jar: + +1. Log in to X. +2. Open X profile and tap on **Edit Profile**. +3. Set the **Tip Jar** feature to **On**. +4. Enable **Allow tips** and tap **Razorpay**. +5. Paste the Payment Page URL suffix copied from the Dashboard. For example, `livingarts2021`. +6. Save the changes. + +### 3. Receive Payments from Followers + +Your followers can support you by sending money via any of the payment partners. + +Steps for followers to send money: +1. Log in to X. +2. Open the profile of the user to whom they want to send money. +3. Tap the tips icon and select the payment service provider. +4. Select **Razorpay** and tap **Continue**. +5. The Payment Page opens. Enter the details, select a payment method and complete the payment. + +You can check the payments under **Transactions** on the Dashboard. + +### 4. View Settlements on Dashboard + +The payments received from the X users appear on the Razorpay Dashboard. + +To view the payments: + +1. Navigate to **Payment Pages** on the Dashboard. +2. Click the required page id. The page details view appears. +3. Scroll down to the transaction details section. A list of the payments made to the Payment Page is displayed. +4. Click on the payment_id for more details. + +## Support + +In case of any issues, reach out to the . diff --git a/llm-content/payments/payments.md b/llm-content/payments/payments.md new file mode 100644 index 00000000..670eed66 --- /dev/null +++ b/llm-content/payments/payments.md @@ -0,0 +1,45 @@ +--- +title: About Payments +description: Check payments, the various payment states and Razorpay Dashboard actions. Understand late authorisations. +--- + +# About Payments + +You can accept live payments using the Razorpay Payment Gateway once your account is activated. + +## Payment Life Cycle + +Following are the various states of a payment: + +States | Description +--- +`created` | This is the first state. The customer has provided the payment details, which are sent to Razorpay. The payment has not been processed yet. +--- +`authorized` | The payment state changes to `authorized` when the bank successfully authenticates the customer's payment details. The money is deducted from the customer’s account by Razorpay. The amount is settled to your account after the payment is manually or automatically captured. Payment in this state is auto-refunded to the customer if not captured within 3 days of creation. +--- +`captured` | When the payment status is changed to `captured`, the payment is verified as complete by Razorpay. The amount is settled to your account as per the settlement schedule. +--- +`refunded` | You can refund the payments that have been successfully captured at your end. The amount is reversed to the customer's account. +--- +`failed` | An unsuccessful payment attempt is marked as `failed`, and the customer will have to retry the payment. Any amount debited will be refunded into customers account in 5-7 working days. + +The following state diagram depicts the flow of money through the various payment states: + +![Different stages of Payments Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-capture-payment-states.jpg.md) + +## Dashboard Actions + +You can perform the following actions on payments from the Dashboard: + +- Configure settings to [auto-capture payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +- [Manually capture payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#manually-capture-payments) +- [Issue a refund for a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/issue.md) +- [View details of a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#view-payment-details) +- [View settlement details of a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/dashboard.md#view-settlements-using-dashboard) + +### Related Information + +- [Payment Methods ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) +- [Test Card Details ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md) +- [Payment Capture Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) +- [International Payment Support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md) diff --git a/llm-content/payments/payments/apis.md b/llm-content/payments/payments/apis.md new file mode 100644 index 00000000..7fa4b6bc --- /dev/null +++ b/llm-content/payments/payments/apis.md @@ -0,0 +1,33 @@ +--- +title: Razorpay Payments APIs +heading: Payments APIs +description: List of available Payments and Downtime APIs for various actions such as Capture, Fetch and Update. +--- + +# Payments APIs + +You can use the Payments APIs to perform various actions. You can perform a few of these actions from the Dashboard as well. + +## List of Payments APIs + +The table below lists the various Payments APIs and gives a brief description of each API: + + API | Description + --- + [Capture a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md) | API to capture a payment + --- + [Fetch a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md) | API to view details of a payment + --- + [Fetch multiple payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) | API to get details of all payments + --- + [Fetch payments based on orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-payments-orders.md)| API to get payments based on orders + --- + [Fetch card details for a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-card-details-payment.md)| API to get the card details for a payment + --- + [Update a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/update.md) | API to update notes of a payment + --- + [Payment Downtime API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) | API for payment downtime and webhooks + +### Related Information +- [ About Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md) +- [Payments - Dashboard Actions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md) diff --git a/llm-content/payments/payments/capture-settings.md b/llm-content/payments/payments/capture-settings.md new file mode 100644 index 00000000..af5a80a5 --- /dev/null +++ b/llm-content/payments/payments/capture-settings.md @@ -0,0 +1,223 @@ +--- +title: Payment Capture Settings +description: Configure auto and manual payment capture settings from Razorpay Dashboard and using APIs. +--- + +# Payment Capture Settings + +When a customer makes an online payment, it usually flows through different states. Know more about [payment states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#payment-life-cycle). + +By default, once your customer completes a payment, it is automatically moved to the `captured` state. + +However, the payment can remain in the `authorized` state in the following scenarios: + +- **Late authorization** + + Due to external factors such as network issues or technical errors, Razorpay may not immediately receive payment status from the bank. In this case, Razorpay polls the APIs intermittently for 3 days to check the status. If we receive the payment status as successful, the payment is moved to the `authorized` state. Know more about [ late authorization](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md). +- **Specific business use case** + + Some businesses such as those in the Ecommerce industry, may retain the payment in the `authorized` state and later move them to the `captured` state. + +> **WARN** +> +> +> **Watch Out!** +> +> - For **Direct Settlement** merchants, payments will be auto-captured irrespective of the configuration. +> - You must ensure that all payments in the authorized state are moved to the captured state within 3 days of creation. This is mandatory because payments that are not captured within this period will be refunded automatically to customers. +> + +You can configure **Payment Capture settings** on the Dashboard. You can choose to: + - [Auto-capture all payments](#auto-capture-all-payments) + - [Auto-capture with set timeouts](#auto-capture-with-custom-timeouts) + - [Manually capture timeout](#manual-capture-timeout) + +## Payment Capture Settings + +> **INFO** +> +> +> **Handy Tips** +> +> - Only the Razorpay account owner can configure payment capture settings on the Dashboard. +> - Payment Capture settings are applicable only for payments created using the Orders API. +> + +Option | Description +--- +Auto-capture all payments | All payments `authorized` within 3 days from the time of creation are auto-captured. +--- +Auto-capture timeouts | - Allows you to define custom auto-capture timeout. +- The minimum value is 12 minutes. +- The maximum value (default) is 3 days. + +--- +Manual capture timeout | - Allows you to define custom manual capture timeout. +- The minimum value is 12 minutes. +- The maximum value (default) is 3 days. + +--- +Auto-refund speed | Payments in the `authorized` state are auto-refunded after the timeout. The available option is **Normal Refund** where the payment is refunded to your customer in 5-7 working days. The refund speed selected here is only applicable to payments that are auto-refunded. + + account owner can configure payment capture settings on the Dashboard. +- Payment Capture settings are applicable only for payments created using the Orders API. + +Option | Description +--- +Auto-capture all payments | All payments `authorized` within 3 days from the time of creation are auto-captured. +--- +Auto-capture timeouts | - Allows you to define custom auto-capture timeout. +- The minimum value is 12 minutes. +- The maximum value (default) is 3 days. + +--- +Auto-refund speed | Payments in the `authorized` state are auto-refunded after the timeout. The available option is **Normal Refund** where the payment is refunded to your customer in 5-7 working days. The refund speed selected here is only applicable to payments that are auto-refunded. + +## Auto-capture All Payments + +You can use this setting to capture all `authorized` payments automatically. This eliminates the time and effort spent manually capturing payments. **This is the default setting for all customers.** + + +![ Auto-capture all payments process flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-capture-auto-capture-all-payments.jpg.md) + +Watch this video to know how to set up the **Automatic Capture** option. + +[Video: https://www.youtube.com/embed/1u0X1k6mh-U] + + + + +### To auto-capture all `authorized` payments: + + 1. Log in to the Dashboard. + 2. Navigate to the **Account & Settings** option and scroll to the **Payments Capture** option. + 3. Click the **Change** button next to **Automatic Capture**. + 4. Under **Automatic Capture**, click the drop-down and select the time period in the **Capture all payments authorised within** field. For example, 3 days. + 5. Click **Next**. + 6. Select **Refund Automatically** and click **Next**. + 7. Select Normal Refund as the **Refund Speed**. + 8. Click **Save**. + + +## Auto-capture With Custom Timeouts + +Once the payment is `created`, you can: + - Auto-capture payments that are `authorized` within a certain time period, and + - Manually capture payments that are `authorized` after that time period. + +You can do this by setting up custom timeouts for automatic and manual capture. + +### Auto-capture Timeout + +Let us say you only want to auto-capture payments that are `authorized` within 3 days from creation. + +--- +Capture Settings | - Select **Automatic Capture** +- Automatic capture timeout = 3 days. + +--- +Payments auto-refunded | If payments are `authorized` after 3 days. + + + +![Auto Capture Timeout process flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-capture-auto-capture-timeout.jpg.md) + +Watch this video to see how to set up the **Automatic Capture with Timeout** option. + +[Video: https://www.youtube.com/embed/_pll_tqFGhY?si=Kvl9jk4KoibLTQFb] + +### Auto-capture + Manual Capture Timeouts + +Let us say you want to: + - Auto-capture payments that are `authorized` within 2 days from creation. + - Manually capture payments that are `authorized` within 3 days from creation. + +--- +Capture Settings | - Select **Automatic Capture** +- Automatic capture timeout = 2 days. +- Manual capture timeout = 3 days. + +--- +Payments auto-refunded if | - Payments not `captured` by you within 3 days. +- Payments are `authorized` after 3 days. + +![Auto and Manual Capture Timeout process flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-capture-auto-capture-and-manual-capture-timeouts.jpg.md) + +Watch this video to see how to set up the **Automatic and Manual Capture with Timeout** option. + +[Video: https://www.youtube.com/embed/6vyGZ8vOqno?si=wqvPQNV4d9Cw-x_m] + + +### To configure capture settings: + + 1. Log in to your Dashboard. + 2. Navigate to the **Account & Settings** option and scroll to the **Payments Capture** option. + 3. Click the **Change** button next to **Automatic Capture**. + 4. Under **Automatic Capture**, click the drop-down and select the time period in the **Capture all payments authorised within** field. For example, 2 days. + 5. Click **Next**. + 6. Select **Capture manually via dashboard or API**. + 7. Click the drop-down and select the time period in the **Capture payments manually authorised within** field. For example, 3 days. + 8. Click **Next**. + 9. Select Normal Refund as the **Refund Speed**. + 10. Click **Save**. + + +## Manually Capture Payments + +You can use this setting to capture `authorized` payments manually. + +> **WARN** +> +> +> **Watch Out!** +> +> Manual capture of payments is not supported on [bank transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). All bank transfer payments are auto-captured. +> + +### Manual Capture Timeout + +Let us say you only want to manually capture payments that are `authorized` within 3 days from creation. To do this, you should set the manual capture timeout as 3 days. + +--- +Capture Settings | - Select **Manual Capture** +- Manual capture timeout = 3 days. + +--- +Payments auto-refunded if | - Payments not `captured` by you within 3 days. +- Payments are `authorized` after 3 days. + + + +![Manual Capture Timeout process flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-capture-manual-capture-only.jpg.md) + +Watch this video to set up the **Manual Capture** option. + +[Video: https://www.youtube.com/embed/zBcK1KIed30?si=F06RpJcegPNBI8ND] + + + + +### To set up the manual capture: + + 1. Log in to the Dashboard. + 2. Navigate to the **Account & Settings** option and scroll to the **Payments Capture** option. + 3. Click the **Change** button next to **Automatic Capture**. + 4. Select the **Manual Capture** option. + 5. Set the manual capture timeout to 3 days and click **Next**. + 6. Select Normal Refund as the **Refund Speed**. + 7. Click **Save**. + + +You can manually capture payments in the `authorized` state using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manual-capture-of-payments). All payments that are not captured within the manual timeout period will be auto-refunded. + +## Configure Payment Capture Settings Using Orders API + +Capture values passed in the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) take precedence over the Payment Capture settings configured on the Dashboard. You can use this to change the capture settings for individual payments. + +### Related Information + +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md) +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) +- Manually capture payments in the `authorized` state using the [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments) +- [Set up and Subscribe to Webhook events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) diff --git a/llm-content/payments/payments/capture-settings/api.md b/llm-content/payments/payments/capture-settings/api.md new file mode 100644 index 00000000..170df64c --- /dev/null +++ b/llm-content/payments/payments/capture-settings/api.md @@ -0,0 +1,287 @@ +--- +title: Configure Payment Capture Settings using Orders API +description: Configure auto-capture settings for individual payments using APIs. +--- + +# Configure Payment Capture Settings using Orders API + +Once your customer completes a payment, it is automatically moved to `captured` state. However, the payment can attain `authorized` state in the following scenarios: + +- **Late authorization** + + Due to external factors such as network issues or technical errors, Razorpay may not receive payment status from the bank immediately. In this case, Razorpay polls the APIs intermittently for 5 days to check the status. If we receive the payment status as successful, the payment is moved to the `authorized` state. [Learn more about late authorization](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md). +- **Specific business use case** + + Some businesses such as those in the Ecommerce industry may retain the payment in the `authorized` state and later move them to the `captured` state. + +You must ensure that all payments in the `authorized` state are moved to the `captured` state within 5 days of creation. This is mandatory because payments that are not captured within this time period will be refunded automatically to customers. + +You can configure **Payment Capture setting** for individual payments using the Orders API. + +> **WARN** +> +> +> **Watch Out!** +> +> The options sent in the below API take precedence over the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. +> + +## API + +Use the below endpoint to configure auto-capture settings for individual payments. + +/orders + +```cURL: Curl +curl -X POST https://api.razorpay.com/v1/orders +-u : +-H 'content-type:application/json' +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "payment": { + "capture": "automatic", + "capture_options": { + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",50000); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "rcptid_11"); +JSONObject payment = new JSONObject(); +payment.put("capture","automatic"); +JSONObject captureOptions = new JSONObject(); +captureOptions.put("automatic_expiry_period",12); +captureOptions.put("manual_expiry_period",7200); +captureOptions.put("refund_speed","optimum"); +payment.put("capture_options",captureOptions); +orderRequest.put("payment",payment); + +Order order = razorpay.orders.create(orderRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount':50000, + 'currency': 'INR', + 'receipt': 'rcptid_11', + 'payment': { + 'capture': 'automatic', + 'capture_options': { + 'automatic_expiry_period': 12, + 'manual_expiry_period': 7200, + 'refund_speed': 'optimum' + } + } +}) + +```php: PHP + +order->create( + array( + 'amount' => 50000, + 'currency' => 'INR', + 'receipt' => 'rcptid_11', + 'payment' => array( + 'capture' => 'automatic', + 'capture_options' => array( + 'automatic_expiry_period' => 12, + 'manual_expiry_period' => 7200, + 'refund_speed' => 'optimum' + ) + ) + ) +); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount":50000, + "currency": "INR", + "receipt": "rcptid_11", + "payment": { + "capture ": "automatic", + "capture_options ": { + "automatic_expiry_period ": 12, + "manual_expiry_period ": 7200, + "refund_speed": "optimum" + } + } +} +Razorpay::Order.create(para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount:50000, + currency: 'INR', + receipt: 'rcptid_11', + payment: { + capture : 'automatic', + capture_options : { + automatic_expiry_period : 12, + manual_expiry_period : 7200, + refund_speed : 'optimum' + } + } +}) + +```csharp: .NET +RazorpayClient client = new RazorpayClient(api_key, api_secret); + +Dictionary options = new Dictionary(); +options.Add("amount", 50000); // amount in the smallest currency unit +options.Add("receipt", "order_rcptid_11"); +options.Add("currency", "INR"); +payment.capture="automatic"; +payment.capture_options.automatic_expiry_period=12; +payment.capture_options.manual_expiry_period=7200; +payment.capture_options.refund_speed="optimum"; +options.Add("payment", payment); +Order order = client.Order.Create(options); +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) + +client := razorpay.NewClient("api_key", "api_secret") + +data := map[string]interface{}{ + "amount": 1234, + "currency": "INR", + "receipt": "some_receipt_id", + "payment": map[string]interface{}{ + "capture": "automatic", + "capture_options": map[string]interface{}{ + "automatic_expiry_period": 12, + "manual_expiry_period": 7200, + "refund_speed": "optimum" + } + } +} +body, err := client.Order.Create(data) +``` + +```json: Response +{ + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 +} +``` + +### Request Parameters + +`amount` _mandatory_ +: `integer` The amount, in currency subunit, for order. For example, for an amount of ₹295, enter `29500`. + +`currency` _mandatory_ +: `string` 3-letter ISO currency code for the payment. [List of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`payment` _optional_ +: `array` Payment capture settings for the payment. The options sent here override the [account level auto-capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) configured using the Dashboard. + + `capture` _mandatory_ + : `string` Option to automatically capture payment. Possible values: + - `automatic`: Payments are auto-captured according to the configurations specified in the `capture_options` array. + - `manual`: You have to manually capture payments using our [Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). + + `capture_options` _optional_ + : `array` Use this array to determine the expiry period for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md) of payments and the refund speed in the case of non-capture. + + `automatic_expiry_period` _mandatory if capture = automatic_ + : `integer` Time in minutes till when payments in the `authorized` state should be auto-captured. + Minimum value `12` minutes. This parameter is mandatory only if the value of `capture` parameter is `automatic`. + + `manual_expiry_period` _optional_ + : `integer` Time in minutes till when you can manually capture payments in the `authorized` state. + - Must be equal to or greater than the `automatic_expiry_period` value. + - Default value `7200` minutes. + - Maximum value `7200` minutes. + - Payments in the `authorized` state after the `manual_expiry_period` are auto-refunded. + + `refund_speed` _mandatory_ + : `string` Refund speed for payments that were not captured (automatically or manually). Possible values: + - `normal`: The refund is processed in 5-7 working days. + +If no value is passed, the refund is processed using the [default speed set on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md#setting-the-default-speed-of-refunds). + +`receipt` _optional_ +: `string` Maximum length is 40 characters. Receipt number, for internal reference, entered by you for the order. + +`notes` _optional_ +: `object` Key-value pair to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Response Parameters + +`id` +: `string` The unique identifier of the order. For example, `order_EKwxwAgItmmXdp`. + +`amount` +: `integer` The amount, in currency subunit, for the order. For example, for an amount of ₹295, enter `29500`. + +`amount_paid` +: `integer` The amount, in currency subunit, paid against the order. + +`amount_due` +: `integer` The amount, in currency subunit, pending against the order. + +`currency` +: `string` 3-letter ISO currency code for the payment. [List of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`receipt` +: `string` Maximum length is 40 characters. Receipt number, for internal reference, entered by you for the order. + +`status` +: `string` The status of the order. Possible values: + - `created`: When you create an order it is in the `created` state. +It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. +It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. +No further payment requests are permitted once the order moves to the `paid` state. +The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. For example, `1`. + +`notes` +: `object` Key-value pairs to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Timestamp, in Unix, when the order was created. For example, `1593607540`. + +**Handy Tips** + +- If `automatic_expiry_period` is `60` minutes and `manual_expiry_period` is `120` minutes, payments in the `authorized` state after `120` minutes are auto-refunded. +- If `automatic_expiry_period` is `0` minutes and `manual_expiry_period` is `120` minutes, payments in the `authorized` state after `120` minutes are auto-refunded. + +### Related Information + +- [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#payment-life-cycle) +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) +- [Manually capture payments using Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) +- [Manually capture payments from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments) +- [Set up and subscribe to Webhook events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) diff --git a/llm-content/payments/payments/dashboard.md b/llm-content/payments/payments/dashboard.md new file mode 100644 index 00000000..8253a665 --- /dev/null +++ b/llm-content/payments/payments/dashboard.md @@ -0,0 +1,102 @@ +--- +title: Payments - Dashboard Actions +description: View payment details, manually capture payments, issue a refund or view settlement details of a payment from the Razorpay Dashboard. +--- + +# Payments - Dashboard Actions + +You can use the Dashboard to perform the following actions: + +- [View Payment Details](#view-payment-details) + +- [View Settlement Details of a Payment](#view-settlement-details-of-a-payment) + +- [Manually Capture Payments](#manually-capture-payments) + +- [Issue a Refund](#issue-a-refund) + +- [Subscribe to Webhook Events](#subscribe-to-webhook-events) + +## View Payment Details + +Watch this video to see how to view the payment details. + +[Video: https://www.youtube.com/embed/lgeCPKJnNHk?si=-wR4AfdbYeCv_5Cm] + +To view the details of a payment made to your account: +1. Log in to your Dashboard. +2. Click **Transactions** → **Payments**. +3. Click a **Payment Id** to view details of the payment. + +## View Settlement Details of a Payment + +Watch this video to view the settlement details of a payment. + +[Video: https://www.youtube.com/embed/vatTtGeH9vU?si=fHNUcLgFPali5CFw] + +To view a detailed break-down of a settlement made to your account: +1. Log in to your Dashboard. +2. Navigate to **Transactions** → **Payments**. +3. Click on the specific **Payment Id** for which you want to view the settlement details. +4. In the **Payment Details** view, you can view the settlement details. +5. Click on the **settlement_id** to view the detailed breakdown. + +## Manually Capture Payments + +Watch this video to capture payments manually. + +[Video: https://www.youtube.com/embed/txOqhzbbwM4?si=bpN0HoEHcgcYVaFp] + +To manually capture payments: + +1. Log in to the Dashboard. +2. Navigate to **Transactions** → **Payments**. +3. Under the **Payments** tab, identify the authorized payment you want to capture. +4. Click the relevant **Payment Id**. +5. In the **Payment Details** pane, click **Capture Payment**. +6. A dialog box is displayed. Click **Yes, Capture**. + +## Issue a Refund + +You can issue refunds to your customers from the Dashboard. Know more about [issuing refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/issue.md). + +## Subscribe to Webhook Events + +You can subscribe to webhook events from the Dashboard. Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + +To subscribe to webhook events: +1. Log in to the Dashboard. +2. Navigate to **Accounts & Settings** → **Webhooks** to subscribe to events available for payments. + +The table below lists the webhook events available for payments. + +Webhook Event | Description +--- +`payment.authorized` | Triggered when a payment is authorised. +--- +`payment.captured` | Triggered when a payment is successfully captured. +--- +`payment.failed` | Triggered when a payment fails. + +> **INFO** +> +> +> **Handy Tips** +> +> - The payload for a Webhook is a snapshot of the entity when the event occurred. +> For example, when a customer makes a payment, its status changes to `authorized`. It can then immediately move to the `captured` state. + +> - The payment can be in the `captured` state when the `payment.authorized` Webhook is fired. However, the payload for the `payment.authorized` event contains details of the events when the payment was authorised, not when it was captured. + +> - In case of network tokenised cards, the last 4 digits will be of the tokenised card and not the actual card. +- The field `flow` is present only in the case of Turbo UPI Payments. + +> +> + +Know more about [webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) and check the [sample payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md). + +### Related Information + +- [About Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md) +- [Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/apis.md) diff --git a/llm-content/payments/payments/downtime-updates.md b/llm-content/payments/payments/downtime-updates.md new file mode 100644 index 00000000..ca5af19f --- /dev/null +++ b/llm-content/payments/payments/downtime-updates.md @@ -0,0 +1,82 @@ +--- +title: Downtime Updates +description: View various downtimes, grouped across different payment methods. +--- + +# Downtime Updates + +Downtime is a period during which one or more payment options under-perform, leading to considerable delays in payment processing. These downtimes are due to technical issues or outages at Razorpay's partner or issuing banks side. Razorpay informs you about the downtime to communicate it to your customers. + +## Bank Downtime Updates + +## View Downtime Details + +> **INFO** +> +> +> +> **Handy Tips** +> +> - The status is auto-refreshed every 5 minutes. +> - You can also do a manual refresh after every 5 minutes. +> + +## Downtime Communication on Checkout + +Razorpay identifies and sends you downtime updates via email for various payment instruments like cards and netbanking. Your customers will be able to view the downtime message on checkout, which will help them choose a payment method with a better success rate. + +> **WARN** +> +> +> **Watch Out!** +> +> We temporarily prevent customers from accessing payment instruments, which are bound to fail on checkout. For example, if all payments made via Netbanking are bound to fail, we show the option in a disabled state on checkout until it recovers. However, they can select an alternative instrument that is more likely to work to complete the payment successfully. +> +> +> Customer Experience +> +> ![payment instrument in a disabled state](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-downtime-disabled-state-v2.jpg.md) +> +> +> +> + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +Razorpay shares updates regarding downtimes on various payment methods at the checkout as shown: + + +### Card + + ![Downtime Communication on Checkout for Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/card-downtime-v2.jpg.md) + + + +### UPI + + ![Downtime Communication on Checkout for UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi-downtime-v2.jpg.md) + + + +### Netbanking + + ![Downtime Communication on Checkout for Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/netbanking-downtime-v2.jpg.md) + + + + +### Related Information + + - [Payment Downtime API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) diff --git a/llm-content/payments/payments/failure-analysis.md b/llm-content/payments/payments/failure-analysis.md new file mode 100644 index 00000000..6e719d17 --- /dev/null +++ b/llm-content/payments/payments/failure-analysis.md @@ -0,0 +1,72 @@ +--- +title: Payment Failure Analysis +description: Check for payment failures, reasons and the steps to resolve them. +--- + +# Payment Failure Analysis + +Payments can fail for a variety of reasons. Failure analysis gives you a brief understanding of the various reasons a payment can fail. Let us look at some of the common reasons why a payment can fail. + +There are 4 main reasons for payment failure: +- [Customer Drop-Offs](#customer-drop-offs) +- [Bank Failures](#bank-failures) +- [Business Failures](#business-failures) +- [Other Failures](#other-failures) + +## Customer Drop-offs +This can happen due to various reasons such as customer cancellations, incorrect CVV, insufficient funds, and so on. + +Reason | Explanation | Next Steps +--- +`authentication_failed` | The customer has entered incorrect card details. | The customer must use the correct card details to complete the payment. +--- +`card_not_enrolled` | If the card is not enrolled, this means that either the issuing bank (of the card) does not support 3DS or the card holder has not yet registered for the 3D secure service. | The customer must enroll the card with the issuer and retry the payment or use a different card or method. +--- +`insufficient_funds` | The customer does not have sufficient funds in the account to complete the payment. | The customer must retry with a different card or method. +--- +`payment_cancelled` | The customer has explicitly cancelled the payment due to which the authentication failed. | The customer must retry to complete the payment. +--- +`payment_collect_request_expired` | The UPI collect request time has expired. For example, in most collect requests, the expiry period is 5-10 minutes, within which the payment has to be completed by the customer on the UPI app. If a customer fails to complete the payment during this time, the collect request expires and the payment fails. | The customer must retry and complete the payment within the expiry time. + +## Bank Failures +In this case, the payment can fail because of the customer’s bank, UPI app, wallets and so on. Given below are few common errors which can be attributed to bank failures. + +Reason | Explanation | Next Steps +--- +`card_declined` | Issuer Banks can decline the card due to multiple checks at their end. The exact reason, in this case, is not shared with Razorpay. The customer needs to reach out to the issuing bank. | The customer can reach out to Issuer Bank to get more details. +--- +`gateway_technical_error` | Payment failed due to a technical error at the gateway. This usually occurs when the gateway server encounters a technical error while processing the payment. | Please retry with a different payment method or retry after some time. +--- +`payment_declined` | Issuer Bank or Gateway has declined the payment due to business or technical reasons. The exact reason in this case is not communicated to Razorpay. | The customer must reach out to the issuer bank. +--- +`payment_failed` | Payment processing failed due to error at bank or wallet gateway. No specific error code received from gateway in this case. | Please retry with a different payment method. +--- +`payment_timed_out` | The customer did not complete the transaction within the specified time. This error may also happen when no response is received from the gateway. | The customer must retry and complete the transaction within the time. + +## Business Failures +Business failures are payment failures that occur due to the non-activation of payment methods and international payments. + +Reason | Explanation | Next Steps +--- +`input_validation_failed` | Payment failed due to wrong request or input sent in the payment request. This is also seen while creating a payment with incorrect parameter values on the Dashboard. | Rectify the validation issues and try again. Check the error description and field parameters for more information about the error. +Check your integration/payment request or reach out to Razorpay. Refer to the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). +--- +`international_transaction_not_allowed` | International transactions are not enabled for your account or for a specific product. Refer to the error `description` parameter for more details.| Contact our [Support Team](https://razorpay.com/support) to get international transactions enabled for the product or account. +--- +`invalid_amount` | Amount or currency passed in the payment request is not supported or invalid. This can arise when you pass a different variable type in the amount field or pass an unsupported amount value. | Check your integration and payment request. +--- +`invalid_currency` | The currency type for the request you are sending is not enabled or not supported for your business. For example, you are attempting a payment in British pound when international currency is not enabled for your account. | +Reach out to [Razorpay Support](https://razorpay.com/support/#request) to enable the currency or get more information about the supported currencies. + +## Other Failures +Many payments fail for a good reason and do so to minimise the possibility of fraudulent payment. Other failures is a category where payments can fail because of fraud detection, internal Razorpay issues and so on. + +Reason | Explanation | Next Steps +--- +`bank_technical_error` | At the moment the payment was attempted, the Issuer Bank faced technical issues. This usually occurs when the Core Banking System encounters a technical error while processing the payment. | The customer must try using another bank account or another method. +--- +`server_error` | Technical error at Razorpay's server. This usually occurs when there is some server issue at Razorpay's end. | Please retry after some time or reach out to [Razorpay Support](https://razorpay.com/support/#request). +--- +`mobile_number_invalid` | The customer is using an invalid or an unregistered mobile number to complete the payment. This means that the mobile number is not mapped to the bank account. | The customer should check the mobile number mapped to their UPI account and reach out to bank to get the correct mobile number mapped. +--- +`payment_risk_check_failed` | Payment declined due to risk checks. Risk checks are performed by Razorpay, Gateway and Issuer Bank. The source parameter would give additional clarity where the risk check failed. | The customer must retry with a different card or method. diff --git a/llm-content/payments/payments/faqs.md b/llm-content/payments/payments/faqs.md new file mode 100644 index 00000000..1a74e7de --- /dev/null +++ b/llm-content/payments/payments/faqs.md @@ -0,0 +1,90 @@ +--- +title: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Payments. +--- + +# Frequently Asked Questions (FAQs) + +## Payments + + +### 1. How does a customer make payments using the Razorpay Payment Gateway? + + Try [Razorpay Checkout](https://razorpay.com/demopg3/). + +> **WARN** +> +> +> **Watch Out!** + +> This is a real transaction. The money will be deducted from your account when you complete the transaction. The money will be auto-refunded to your account in 4-5 days. +> + + + + +### 2. How much does Razorpay charge per transaction? + + Under the standard plan designed for small and medium enterprises, Razorpay charges 2% per transaction. Razorpay also offers an enterprise plan designed for large volumes, which gives you the best prices possible for your business. Know more about [pricing](https://razorpay.com/pricing/). + + + +### 3. Is GST mandatory to accept payments? + + No, GST is not mandatory if your business does not have an annual turnover of over ₹20 lakhs. However, if you do not provide your GST details, you would not be able to claim TDS at the time of filing your tax returns. + + + +### 4. What is the applicable GST? How is it charged? + + 18% GST is charged on the fee deducted for all payment methods except domestic card transactions of amount + + +### 2. How can we test our website or mobile app integration with Razorpay Payment Gateway? + + Razorpay offers a sandbox environment where you can test integrations before going live. To test your integration, [generate test API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) in test mode and implement them in your code. Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. No money is deducted as these are simulated transactions. + + + +### 3. What is Standard Capture? + + Standard capture is an authorisation followed by a `delayed` capture of the payment. In this scenario, if a customer makes a payment, the amount is deducted from the customer's bank account by Razorpay. The authorised amount is settled to your account only after you initiate a `capture` request. + + + +### 4. How do I manually capture a payment? + + You can manually capture payments: + - [From the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#manually-capture-payments) + - [Using APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) + + + +### 5. How are payments made by my customers settled to my account? Is any action required from my end? + + No action is required from your end for the settlements. Razorpay automatically settles the captured payments to your account as per your settlement cycle. + + + +### 6. A payment is marked as 'failed' on my Dashboard but money is debited from the customer’s account. What do I do? + + A payment is said to be in the 'failed' state when we do not receive a successful callback message on the transaction from the issuing bank. If the customer’s account is debited and we do not receive a successful callback, the amount will be auto-refunded by the customer’s issuing bank in working days. + + In case of a failed payment, we verify the status with the bank at regular intervals. If there is a change in status, the payment moves to the `authorized` state, and a notification is sent to you and the customer. + + In such scenarios, you can choose to do any one of the following: + - **Provide services**: Capture the payment and provide the service/good as was promised earlier to the customer. + - **Refund the transaction**: If you are not able to provide service to the customer as per the agreed terms (Such as time of delivery, cost of purchase or inventory issues), refund the payment to the customer. + + + +### 7. Is Razorpay PCI-DSS compliant? + + Yes, Razorpay is PCI-DSS compliant. + + + +### 8. What is Late Authorisation? + + + Late authorisation is a situation that arises when a payment is interrupted by external factors such as network issues or technical errors at customer's or bank's end. In such cases, funds may or may not get debited from the customer's bank account and Razorpay does not receive a payment status from the bank. Know more about [ Late Authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md). diff --git a/llm-content/payments/payments/late-authorisation.md b/llm-content/payments/payments/late-authorisation.md new file mode 100644 index 00000000..117cf9dc --- /dev/null +++ b/llm-content/payments/payments/late-authorisation.md @@ -0,0 +1,54 @@ +--- +title: Late Payment Authorisations +description: Check the Late Payment authorisation and its causes, differences between normal and late authorised payments and how to handle them. +--- + +# Late Payment Authorisations + +Late authorisation is a situation that arises when a payment is interrupted by external factors, such as network issues or technical errors at the customer's or bank's end. In such cases, funds may or may not get debited from the customer's bank account, and Razorpay does not receive a bank's payment status. + +## How Late Authorisations are Handled + +If there is no response from the bank about a payment that a customer has made, the Dashboard displays this transaction's status as `Created.` If there is no response, even after 10 minutes, the transaction is marked as `Failed` due to timeout. After that, Razorpay polls the bank at various intervals for 3 days, from the payment creation day. During this time, if our system receives the payment status from the bank as **Successful**, the payment is marked as `Authorized.` The payments authorised in this manner are considered as late authorised. + +![Handle Late authorisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/late_auth.jpg.md) + +> **INFO** +> +> +> +> **Handy Tips** +> +> On average, less than 0.5% of the total number of payments get late authorised. In cases where funds get debited from the customer's bank account and are not [captured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md), the amount is automatically refunded to the customer. As a best practice, you should subscribe to the [ **`payment.authorized`** webhook ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) to get notifications about authorised or failed payments. +> + +Not all payments that appear as failed are considered as late authorised. Late authorisation is a special case of handling technical or manual interruptions that prevent Razorpay from receiving payment status from the bank and proceed with the payment flow. + +## What Causes Late Authorisation + +Interruptions that prevent a payment gateway from receiving payment status information from the bank is a common cause for late authorisations. In most cases, payments are interrupted because of any of the following reasons: +- Network issues at the customer's end. +- Technical issues at the customer's bank's end. +- Customers closing the pop-up window or pressing the back button after submitting the OTP. + +If Razorpay receives the payment status from the bank later, payment is moved to the `authorized` state leading to late payment authorisation. You have little control over these interruptions. Know more about [handling late authorisations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation/handle.md) to avoid customer inconvenience. + +## Normal Authorisations Vs. Late Authorisations + +The difference in the payment flow for a normal payment and a late authorised payment is explained in the table below: + +**Normal Payment** [columWidth="50"] | **Late Authorised Payment** [columWidth="50"] +--- +The customer completes the payment; bank gateway notifies Razorpay. | The customer completes the payment; bank gateway fails to notify Razorpay. +--- +If the bank gateway response is **Successful** (customer's bank account is debited), Razorpay records this as an **Authorised** payment. | If there is no response from the bank, the payment remains in the **Created** state for the first 10 minutes and is later marked as **Failed** after getting timed out. The customer's bank account may or may not have been debited. +--- +Once authorised, you can either choose to **capture** or **refund** this payment. | This payment can be **Captured** or **Refunded** only if it is late authorised. + +**Handy Tips** + +Authorised payments are payments that the customer completes. You need to capture the payment for it to be settled in your account. + +### Related Information + +[ Handle Late Payment Authorisations ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation/handle.md) diff --git a/llm-content/payments/payments/late-authorisation/handle.md b/llm-content/payments/payments/late-authorisation/handle.md new file mode 100644 index 00000000..560d7003 --- /dev/null +++ b/llm-content/payments/payments/late-authorisation/handle.md @@ -0,0 +1,96 @@ +--- +title: Handle Late Authorised Payments +description: Use Orders API or webhooks to handle late authorisations. +--- + +# Handle Late Authorised Payments + +Late authorised payments are rare situations, as only less than 0.5% of the total payments get late authorised. The payments that are **late authorised** and not captured are auto-refunded in 5 days. + +Based on your business needs, you can decide how to handle payments that may get late authorised. This largely depends on whether you can provide services for the late authorised payment. + + timeouts) will be auto-refunded to customers within 5 working days (without considering the bank's processing time). + +For example, an online food ordering service needs to deliver food immediately on receiving payments. As the need to deliver the service is immediate in this business, you cannot oblige the customers if the payment gets authorised late. In this case, you can ignore the payment made as it will be auto-refunded and communicate to the customer accordingly. + + **Handy Tips** + + Auto refunds are issued within 5 days. However, if you want to issue a refund instantly, you can capture the payment and issue a refund as per your requirements. + + +## If You Wish to Provide Services Later + +You can keep a track of these payments and fulfil the order when it is authorised. + +For example, if you are an online marketplace merchant, who sells clothes and accessories, you can mark the order as 'pending' in your system and deliver the order when the payment gets authorised + +## If You Cannot Provide Services for Late Authorised Payments + +Ignore these orders and communicate to the customer. Payments that stay in an `Authorized` state are auto-refunded to customers within 5 working days (without considering the bank's processing time). + + +### Example + + If you are an online food delivery service, you need to deliver food immediately on receiving payments. In this case, you cannot wait for late authorisation of payments. Ignore this order and inform the customer about order cancellation and auto-refund of any amount that may have got debited from the customer's account. + + +**Handy Tips** + +Auto refunds are issued within 5 days. However, if you want to issue a refund instantly, you can capture the payment and issue a refund as per your requirements. Know more about [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md). + +## If You Want to Provide Services Later + +You can keep a track of these payments and fulfil the order when it is authorised. + + +### Example + + If you are an online marketplace merchant, who sells clothes and accessories, you can mark the order as 'pending' in your system and deliver the order when the payment gets authorised. + + +**Communicate with Your Customers** + +When customers reach out to you about a payment that was debited from their bank accounts before the successful order completion, ensure that you clearly communicate the payment status and how you will be handling it. You can choose to send out a message such as the following: + +If your order has failed, any amount debited will be auto-refunded in 5 working days (not considering your bank's processing time). + +## Payment Capture Settings + +This is the easiest way to handle late authorisation. This feature gives you control over which payments should be auto-captured and which payments should be auto-refunded by allowing you to: + - Automatically capture all payments. + - Setup custom timeouts for automatic and [manual capture](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md). + - Manually capture all payments. + +Know more about [Payment Capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + +## Orders API + +Orders API makes it easier to handle cases of late authorisation in the following ways: + +- It clubs multiple payment attempts against the same order. If one of the payments is successful and another attempt gets **Late Authorised**, the late authorised payment is refunded immediately, and only successful payment is marked against the Order. + +- Allows you to auto-capture payments based on the parameters passed in the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings/api.md). Capture values passed in the Orders API take precedence over the Payment Capture settings configured on the Dashboard. + +## Webhooks + +Webhooks send you notifications when payments move to the **Authorized** state. The webhook `payment.authorized` sends you a notification when the payment you were expecting to be **Late Authorized** moves to **Authorized** state. + +You can send email notifications to your customers about the payment status, asking them to take further action to deliver the service. You can set up webhooks from the Dashboard. Know more about [webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + +## Frequently Asked Question (FAQs) + + +### 1. Is Late Authorisation of payment specific to Razorpay? + + No. While other gateways also face these interruptions, Razorpay ensures that you have a way of handling late authorised payments using: + - [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md) + - [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) + - [Payment capture settings on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + You can track the status of the payment on the Dashboard. + + +### Related Information + +- [Late Authorisations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md) +- [About Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md) diff --git a/llm-content/payments/payments/success-rate-analytics.md b/llm-content/payments/payments/success-rate-analytics.md new file mode 100644 index 00000000..46a1325b --- /dev/null +++ b/llm-content/payments/payments/success-rate-analytics.md @@ -0,0 +1,188 @@ +--- +title: Success Rate Analytics +description: View the transaction success rate on the Razorpay Dashboard. +--- + +# Success Rate Analytics + +Success rate is the **ratio of successful transactions to the total number of transactions.** +**Success Rate** (SR)=Total number of successful (authorised) transactions / Total number of attempted transactions over a given period of time. +**Example** + +If you had 100 transactions in a week and 93 were successful, your success rate would be 93% for that week. + +View the success rate of all your transactions and perform the various actions: +- [All Payment Methods](#all-payment-methods) +- [UPI](#upi) +- [Cards](#cards) +- [Netbanking](#netbanking) + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Access Success Rate Analytics (SRA) Dashboard + +To access the Success Rate Analytics (SRA) Dashboard: + +1. Log in to your Dashboard. +2. Navigate to **Transactions** → **Success Rate**. + ![navigate to core success rate on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-dashboard-navigate.jpg.md) + + +### Using the Analytics Dashboard, you can: + + - Perform a detailed analysis of your recent transactions. + - View the details of each payment method by clicking on the respective method options such as Cards, UPI, Netbanking and Emandate. + ![analytics view of core success rate on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-dashboard-overview.jpg.md) + - View the payment volume distribution with the help of a pie diagram and understand the top reasons behind the payment failures. Know more about [failure reasons](#payment-failure-reasons). + ![payment volume distribution on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-dashboard-overview-two.jpg.md) + - Correlate downtime with your success rate trends for specific methods. + + +## Date Range +Select the date and time for which you want to perform a success rate analysis. You can use a predefined range or opt for a custom range. +![core success rate graph](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-date-range.jpg.md) + +> **INFO** +> +> +> **Handy Tips** + +> - The default date range is 6 hours. +> - You can select the date range from upto the last 90 days. +> - You can also select a specific time range as per your requirement. +> + +Additionally, in the success rate line graph, you can select the time frame for an hourly, daily, weekly, and monthly basis. The table below explains the availability of each time frame: + +Time Frame | Explanation +--- +Hourly | Hourly data for graphical representation is available only if the selected date range is less than 1 day. +--- +Daily | Daily data for graphical representation is available only if the selected date range is between 2 and 14 days. +--- +Weekly | Weekly data for graphical representation is available only if the selected date range is between 14 and 90 days. +--- +Monthly | Monthly data for graphical representation is available only if the selected date range is more than 2 months. + + +### Example: Hourly Data for Cards + + ![core success rate graph time frame](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-graph-timeframe.jpg.md) + + +## All Payment Methods +**All Payment Methods** provide a high-level view of your transactions and recent performance at the method level (Cards, UPI, Netbanking and Emandate). + + +### With the **All Payment Methods** option, you can: + + - View the success rate at the **payment method** level (UPI, Cards, Netbanking and Emandate). + ![view core success rate for all methods on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-dashboard-all-methods.jpg.md) + - The line graph shows the success rate distribution of all payment methods on an hourly, daily, weekly and monthly basis as per your date range selection. + ![view core sr graph for all methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-all-methods-graphical.jpg.md) + - View the payment volume distribution at the method level with the pie chart. + ![core sr pie diagram all methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-pie-diagram.jpg.md) + - View the top failure reasons along with the breakdown. Know more about [failure reasons](#payment-failure-reasons). + ![core sr error reasons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-failure-reasons.jpg.md) + + +## UPI +The **UPI** option provides a high-level view of all UPI transactions and recent performance for the selected date range along with the payment providers details. + + +### With the **UPI** option you can: + + - View the success rate of all UPI transactions. + ![core sr upi](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-upi-sr.jpg.md) + - The line graph shows the success rate distribution of **Intent**, **Collect** or **All flows (Intent and Collect)** on an hourly, daily, weekly and monthly basis as per your date range selection. You can select **Intent**, **Collect** or **All flows (Intent and Collect)** to compare the success rate. + ![core sr graph upi](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-graphical-upi.jpg.md) + - View the payment volume distribution of **Intent** and **Collect** with the pie chart. + ![core sr pie diagram upi](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-pie-diagram-upi.jpg.md) + - View the top failure reasons along with the breakdown. Know more about [failure reasons](#payment-failure-reasons). + ![core sr pie diagram](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-failure-reasons-upi.jpg.md) + + +## Cards +The **Cards** option provides a high-level view of all Cards transactions and recent performance along with various other details for the selected date range. + +Filters available for Cards are as follows: + + +> **WARN** +> +> +> **Watch Out!** + +> The sub-filters vary based on the top transacting **card type**, **card networks** and **banks** for the selected date range. +> + +Filters | Sub- Filters +--- +Card Networks | Examples: Visa, Mastercard, RuPay and Others. +--- +Banks | Examples: HDFC, ICICI, Axis and Others. + + +### With the **Cards** option you can: + + - View the success rate of all Card transactions. + ![core sr cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-cards-sr.jpg.md) + - Filter the transactions to view Cards payments received via **Card Type (Credit, Debit, Prepaid)**, **Card Networks**, or **Banks** as per your requirement. + ![core sr filters cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-filters-cards.jpg.md) + - In the success rate line chart, select different **Card Networks**, or **Banks** as per the filter selected to compare the rate between individual **Card Networks**, or **Banks**. + ![core sr graph cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-graphical-cards.jpg.md) + - View the payment volume distribution of all **Card Networks**, or **Banks** as per the filter selected with the pie chart. + ![core SR Pie diagram Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-pie-diagram-cards.jpg.md) + - View the top failure reasons along with the breakdown. Know more about [failure reasons](#payment-failure-reasons). + ![core SR Pie diagram cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-failure-reasons-cards.jpg.md) + + +## Netbanking +The **Netbanking** option provides a high-level view of all Netbanking transactions and recent performance along with various other details for the selected date range. + + +### With the **Netbanking** option you can: + + - View the success rate of all Netbanking transactions. + ![core sr netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-netbanking-sr.jpg.md) + - In the success rate line chart, select different banks to compare rate between various banks. + ![core sr graph netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-graphical-netbanking.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** + +> The various labels available apply only to the graphical representation. +> + + - View the payment volume distribution of all banks with the pie chart. + ![core sr pie diagram netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-pie-diagram-netbanking.jpg.md) + - View the top failure reasons along with the breakdown. Know more about [failure reasons](#payment-failure-reasons). + ![core sr pie diagram netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/core-sr-failure-reasons-netbanking.jpg.md) + + +## Payment Failure Reasons + +Failure Reason | Explanation +--- +Customer Related| Customer related failures occur from the customers side. For example: customer cancellations, incorrect CVV, insufficient funds. +--- +Banking Related | Banking related failures occur due to issues at customer's bank, UPI apps, and external gateways. +--- +Business Related | Business related failures occur due to issues at business side like non-activation of payment methods or international payments. +--- +Others | Other failures include errors due to fraud detection or internal provider issues. diff --git a/llm-content/payments/payments/test-card-details.md b/llm-content/payments/payments/test-card-details.md new file mode 100644 index 00000000..c8901368 --- /dev/null +++ b/llm-content/payments/payments/test-card-details.md @@ -0,0 +1,158 @@ +--- +title: Test Cards Details to Test Payments and Subscriptions +heading: Test Card Details +description: Use test cards to test Indian, international and EMI payments, and Subscriptions. +--- + +# Test Card Details + +You can test the payment flow using our test cards. + +> **WARN** +> +> +> +> **Watch Out!** +> +> - You can use these test cards to make payments in **test** mode only. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> - If you use these test cards for **live** mode payments, either of the following error message will be displayed: `card issuer is invalid` or `invalid card input`. +> + +Watch this video to see how to use the test card details. + +[Video: https://www.youtube.com/embed/2VR0hXpF9RA?si=-meoxCcUgdK8sQsO] + + +### To use the test card details: + + 1. At the Checkout, select Card as the payment method. + 1. Enter the **OTP** to access saved cards if required. + 1. Enter the card details. This depends on the flow you are testing. + 1. Enter any random CVV. + 1. Enter any future date as the expiry date. + 1. Click **Pay**. A sample payment page is displayed. + - Enter a random **OTP** between 4 to 10 digits to make the payment successful and click **Submit**. + - Enter a random **OTP** below 4 digits to fail the payment and click **Submit**. + + +Use the following cards for testing. You can use any random CVV and any future date as the expiry date. + +## Test Cards for Indian Payments + +Use the following test cards to test various payment scenarios for Indian payments. You can save any of the test cards below. The saved card flow allows customers to store their card details for future transactions. When a customer selects the option to save their card, Razorpay handles the tokenization process internally. Know more about [Saved Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md). + +Network | Card Number | CVV & Expiry Date +--- +Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ +--- +Mastercard | 5500 6700 0000 1002 | +--- +RuPay | 6527 6589 0000 1005 | +--- +Diners | 3608 280009 1007 | +--- +Amex | 3402 560004 01007 | + +### Error Scenarios + +Use these test cards to simulate and test various error conditions for the following networks. Once you initiate the payment, in success/failure screen, you must select failure to get the right error. Know more about [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + +### BAD_REQUEST_ERROR + + + Error reason | Error description | Network | Card number | CVV & expiry date + --- + `payment_timed_out` ^^ | Your payment could not be completed due to a temporary issue. Try again later. ^^ | Visa | 4100 2800 0009 0000 | Use a random CVV and any future date + --- + | | Mastercard | 5305 6200 0006 0000 | Use a random CVV and any future date + --- + `insufficient_fund` ^^ | Your payment could not be completed due to insufficient account balance. Try another card or payment method. ^^ | Visa | 4100 2800 0008 0001 | Use a random CVV and any future date + --- + | | Mastercard | 5305 6200 0005 0001 | Use a random CVV and any future date + --- + `payment_cancelled` ^^ | Your payment has been cancelled. Try again or complete the payment later. ^^ | Visa | 4100 2800 0007 0002 | Use a random CVV and any future date + --- + | | Mastercard | 5305 6200 0004 0002 | Use a random CVV and any future date + --- + `card_declined` ^^^^^^ | Your payment did not go through as it was declined by the bank. Try another payment method or contact your bank. ^^^^^^ | Visa | 4100 2800 0006 0003 | Use a random CVV and any future date + --- + | | Mastercard | 5305 6200 0003 0003 | Use a random CVV and any future date + --- + | | Visa | 4100 2800 0005 0004 | Use a random CVV and any future date + --- + | | Mastercard | 5305 6200 0002 0004 | Use a random CVV and any future date + --- + | | Visa | 4100 2800 0004 0005 | Use a random CVV and any future date + --- + | | Mastercard | 5305 6200 0001 0005 | Use a random CVV and any future date + --- + `card_disabled_for_` +`online_payments` ^^ | Your card is disabled for online payments. +Please reach to your bank or try with another card. ^^ | Visa | 4100 2800 0003 0006 | Use a random CVV and any future date + --- + | | Mastercard | 5305 6200 0000 0006 | Use a random CVV and any future date + --- + `card_number_invalid` ^^ | You have entered an incorrect card number. Try again. ^^ | Visa | 4100 2800 0001 0008 | Use a random CVV and any future date + --- + | | Mastercard | 5305 6200 0008 0008 | Use a random CVV and any future date + + + + +### GATEWAY_ERROR + + + Error reason | Error description | Network | Card number | CVV & expiry date + --- + `gateway_technical_error` ^^ | Your payment did not go through due to a temporary issue. Any debited amount will be refunded in 4-5 business days. ^^ | Visa | 4100 2800 0002 0007 | Use a random CVV and any future date ^^^^ + --- + | | Mastercard | 5305 6200 0009 0007 | + --- + `authentication_failed` ^^ | Your payment could not be completed due to incorrect OTP or verification details. Try another payment method or contact your bank for details. ^^ | Visa | 4100 2800 0000 0009 | + --- + | | Mastercard | 5305 6200 0007 0009 | + + + +## Test Cards for International Payments + +Card Network | Card Number | CVV & Expiry Date +--- +Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ +--- +Visa | 4012 8888 8888 1881 | + +> **INFO** +> +> +> **Handy Tips** +> +> You may encounter an address collection window when using the Mastercard test card number `5105 1051 0510 5100` for international payments. To complete the test payment, provide the following address details: +> - **Address Line 1**: 21 Applegate Apartment +> - **Address Line 2**: Rockledge Street +> - **City**: New York +> - **State**: New York +> - **Country**: US +> - **Zipcode**: 11561 +> + +## Test Cards for Subscriptions + +Type | Card Network | Card Type | Card Number | CVV & Expiry Date +--- +Domestic | Visa | Credit Card | 4718 6091 0820 4366 | Use a random CVV and any future date ^^^ +--- +International | Mastercard | Credit Card | 5104 0155 5555 5558 | +--- +International | Mastercard | Debit Card | 5104 0600 0000 0008 | + +## Test Card for EMI Payments + +Card Network | Card Number | CVV & Expiry Date +--- +Mastercard | 5241 8100 0000 0000 | Use a random CVV and any future date diff --git a/llm-content/payments/payments/test-upi-details.md b/llm-content/payments/payments/test-upi-details.md new file mode 100644 index 00000000..e54d7858 --- /dev/null +++ b/llm-content/payments/payments/test-upi-details.md @@ -0,0 +1,28 @@ +--- +title: Test UPI ID Details to Test Payment Flow +heading: Test UPI ID Details +description: Use test UPI IDs to test domestic (Indian) one-time payments. +--- + +# Test UPI ID Details + +You can test the payment flow using our test UPI IDs. + +Watch this video to see how to use the test UPI ID details. + +[Video: https://www.youtube.com/embed/hcoysDHJfGI] + +To use the test UPI ID details: +1. At the Checkout, select UPI as the payment method. +2. Enter the UPI ID. + - Test payment success flow using `success@razorpay`. + +> **WARN** +> +> +> **Watch Out!** +> +> In test mode, payment cancellation will result in a successful payment. Use the **live** mode to test payment cancellation on UPI. +> + + - Test payment failure flow using `failure@razorpay`. diff --git a/llm-content/payments/qr-codes.md b/llm-content/payments/qr-codes.md new file mode 100644 index 00000000..09222b7c --- /dev/null +++ b/llm-content/payments/qr-codes.md @@ -0,0 +1,44 @@ +--- +title: Payments | QR Codes +heading: About QR Codes +description: Create Razorpay QR Codes from the Razorpay Dashboard or using APIs and start accepting payments from customers. +--- + +# About QR Codes + +QR Codes are two-dimensional barcodes that can accommodate payment details such as business name, contact, destination bank details and more. + +## About Razorpay QR Codes + +Use Razorpay QR Codes to receive UPI payments from your customers. Create QR Codes from the Dashboard or using our APIs and share them with your customers. Customers can scan these codes and make payments. + + +### Advantages + + - **Instant Creation**: Generate QR Codes in **real-time** via the Dashboard and APIs. + - **Secure Payments**: QR Code payment is as secure as a UPI payment, as your bank details are not exposed to a third party. + - **Dynamic or Static QRs**: Create dynamic and static QR Codes to as per your need. + - **Works with a Range of PSPs**: Customers can use a range of UPI PSP apps such as PhonePe, Google Pay and others to make payments. + - **Easy Reconciliation**: View and manage every payment received from customers. + - **Real-time Notifications**: Get real-time notifications on payments with [QR Code webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/subscribe-to-webhooks.md). + + +Perform all the actions on QR Codes from the Dashboard - create, close or search. Subscribe to webhook events for immediate notifications. You can perform most of these actions [using QR Code APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/apis.md). + +## Get Started + +Log in to the Dashboard and click **QR Codes**. [Set up your Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md) if you do not have one already. + +## Prerequisites + +- to enable QR Codes for your account. +- Do check the [Glossary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/glossary.md) to understand the terminologies. + +## What Next +Understand [how you can use Razorpay QR Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/how-it-works.md) and the various [QR Codes states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/states.md). + +### Related Information +- [How QR Codes Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/how-it-works.md) +- [QR Code States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/states.md) +- [Create a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/create.md) +- [QR Code APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/apis.md) diff --git a/llm-content/payments/qr-codes/apis.md b/llm-content/payments/qr-codes/apis.md new file mode 100644 index 00000000..fcaf3a97 --- /dev/null +++ b/llm-content/payments/qr-codes/apis.md @@ -0,0 +1,99 @@ +--- +title: QR Code APIs +description: Checklist to integrate using QR Code APIs. List of QR Code APIs and GST QR Code APIs - Create, Close, Fetch and Refund. +--- + +# QR Code APIs + +You can use the QR Codes APIs to perform various actions. You can perform all of these actions from the Dashboard as well. + + +### Integration Checklist + +> **WARN** +> +> +> **Watch Out!** +> +> Once the QR Code has been created, you cannot edit its details. +> + +1. If you are creating a Dynamic QR Code, we suggest you create a single `customer_id` rather than making multiple ids for the same customer. In any case, if their details change, you can use the [Edit Customer Details API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md#edit-customer-details). +2. To keep a check on the duplicate customer details: + - If you use the `fail_existing : "1"` parameter, the API throws an error when existing customer details are added. + - If you use the `fail_existing : "0"` parameter, the API returns the `customer_id` when existing customer details are added. +3. Use [Payment Downtime API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) to check for any downtimes that might affect the UPI generation/transactions. +4. Please note that the Razorpay order id gets generated automatically when a customer makes the payment using the QR Code provided by you. +5. While [creating a QR Code via API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes.md#create-a-qr-code) or using the Dashboard, make sure that you pass all the critical parameters for non-GST and GST QR Codes. +6. Pass the type as `upi_qr` while creating the QR Code. Since we also have a BharatQR feature, not passing the type can lead to errors. +7. Check the difference between Static and Dynamic QR Codes: + + + Dynamic QR | Static QR + --- + Single use. Can be used only once. | Can be used multiple times. + --- + If it is generated for specific customers, then you can pass `customer_id`. | Not required to pass `customer_id`. + + +8. If the `fixed_amount` parameter is passed, you must pass the `amount` parameter at the time of QR Code creation. +9. To fetch the details about the QR Codes, you can use [QR Code webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/subscribe-to-webhooks.md) or use [Fetch a QR Code API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/fetch-with-id.md) to get details about payment activity or the status of your QR Codes. +10. We recommend using the [Fetch a QR Code API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/fetch-with-id.md) to fetch relative information about QR Codes. + +> **INFO** +> +> +> **Best Practices for Image Content Integration** +> +> You can check the contents passed in the QR Code using the response payload for [Create a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes.md#create-a-qr-code). The `image_content` parameter displays the QR Code content. For Example, once the `qr_image_content` feature is enabled, you can get the Create QR Code response as given on the right-hand side. +> + + + +## List of QR Code APIs + +The table below lists the various QR Code APIs and gives a brief description of each API: + +API | Description +--- +[Create a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/create.md) | API to create a new QR Code +--- +[Close a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/close.md) | API to close a QR Code +--- +[Fetch a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/fetch-with-id.md) | API to view details of a QR Code +--- +[Fetch a QR Code for Customer ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/fetch-customer-id.md) | API to view details of a QR Code for a customer id +--- +[Fetch a QR Code for Payment ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/fetch-payment-id.md) | API to view details of a QR Code for a payment id +--- +[Fetch payments made to a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/fetch-payments.md) | API to view details of payments made to a QR Code +--- +[Fetch multiple QR Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/fetch-all.md) | API to view a list of all QR Codes + +## List of QR GST Code APIs +The table below lists the various QR Code APIs and gives a brief description of each API: + +API | Description +--- +[Create a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/gst.md#create-a-qr-code/) | API to create a new QR Code +--- +[Close a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/gst.md#close-a-qr-code/) | API to close a QR Code +--- +[Fetch a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/gst.md#fetch-a-qr-code/) | API to view details of a QR Code +--- +[Fetch a QR Code for Customer ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/gst.md#fetch-qr-code-customer-id/) | API to view details of a QR Code for a customer id +--- +[Fetch a QR Code for Payment ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/gst.md#fetch-qr-code-payment-id/) | API to view details of a QR Code for a payment id +--- +[Fetch payments made to a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/gst.md#fetch-payments-qr-code/) | API to view details of payments made to a QR Code +--- +[Fetch multiple QR Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/gst.md#fetch-multiple-qr-codes/) | API to view a list of all QR Codes +--- +[Refund Payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md) | API to refund a payment + +### Related Information + +- [Create a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/create.md) +- [Search a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/search.md) +- [Close a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/close.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/subscribe-to-webhooks.md) diff --git a/llm-content/payments/qr-codes/close.md b/llm-content/payments/qr-codes/close.md new file mode 100644 index 00000000..2d72714b --- /dev/null +++ b/llm-content/payments/qr-codes/close.md @@ -0,0 +1,44 @@ +--- +title: Close a QR Code +description: Know how to close a QR Code. A customer cannot make payments for closed QR Codes. +--- + +# Close a QR Code + +You can close a QR Code. A customer cannot make payments for the closed QR Codes. Know more about [QR Code States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/states.md). + +> **INFO** +> +> +> **Handy Tips** +> +> QR Codes that support multiple payments cannot be closed. +> + +## Close a QR Code from the Dashboard + +Here is short video on how to close a QR code from the Dashboard. + +[Video: https://www.youtube.com/embed/gL9rYd4gv0w?si=NZIuLT42iCeY4_Dk] + +To close a QR Code: + +1. Log in to the Dashboard. +1. Click on **QR Code**. +1. [Search for the QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/search.md) that you want to close using the search criteria. +1. Select the **QR Code ID**. +1. On the right-hand side panel, click the **Close** button. + +1. On the **Close QR Code?** dialog box, click **Yes** to confirm the closure. + ![Confirm the closure of a QR code from the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-close-confirm-close.jpg.md) + +The closed QR Codes display a **Closed** status label. + +![QR code closed from the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-close-closed.jpg.md) + +### Related Information +- [QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes.md) +- [How QR Code Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/how-it-works.md) +- [QR Code States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/states.md) +- [Create a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/create.md) +- [Search a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/search.md) diff --git a/llm-content/payments/qr-codes/create.md b/llm-content/payments/qr-codes/create.md new file mode 100644 index 00000000..7fffb65a --- /dev/null +++ b/llm-content/payments/qr-codes/create.md @@ -0,0 +1,181 @@ +--- +title: Create a QR Code +description: Create a QR Code, add a custom brand name and view Payments from the Razorpay Dashboard. +--- + +# Create a QR Code + +Razorpay QR Code is a QR-based solution that enables you to accept digital payments from your customers. You can create a QR Code using the Dashboard or the API and share it with your customers. Customers then scan the code and complete the payment. + +## Create a QR Code from the Dashboard + +Here is a short video on how to create QR Codes on the Dashboard. + +[Video: https://www.youtube.com/embed/YUAU8C1PRDc] + +To create a QR Code: +1. Log in to the Dashboard. +1. Go to the **PAYMENT PRODUCTS** section and click **QR Codes** → **+Create QR Codes**. + ![Create QR codes on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-create-create-qrcode.jpg.md) +1. Provide the following details: + + +### QR Usage + + You can configure the QR Code to receive a single payment or multiple payments. + - **Multiple Payments**: Enables QR Code to receive multiple payments. + - **Single Payment**: Enables QR Code to receive only one payment. Once this payment is received, the QR Code is automatically closed. + + +> **WARN** +> +> +> **Watch Out!** +> +> - QR Codes that support multiple payments cannot be closed. +> - You can only accept a fixed amount for single payment QR Codes. +> + + + + +### Accept only fixed amount on this QR? + + You can decide whether to accept fixed amount or let the customer decide the amount: + - **Yes**: Set to **Yes** and specify the fixed amount you want to receive from customers. Customers will not be able to pay an amount greater than or lesser than the specified amount. + - **No**: Set to **No** to allow customers to pay an amount of their choice. + + + +### Description [Optional] + + Add a description for your reference. + ![Add a description while creating a QR code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-create-add-details.jpg.md) + - Details added in description will show up in the QR Image. + ![QR Image with description](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-code-image.jpg.md) + + + +### Advanced Options + + Click **View Advanced Options** to view and configure advanced options. + ![View advanced options while creating a QR code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-create-view-advanced-options.jpg.md) + - **Close By (Optional)**: Set a closure date for the QR Code. Select the **Close this QR Code after** option to select the date and time at which the account must be automatically closed. Ensure that the time specified is at least 15 minutes after the QR Code creation time. + + +> **WARN** +> +> +> **Watch Out!** +> +> The **Close By** feature is not available for QR Codes accepting **Multiple Payments**. +> + + + - **Customer**: Select the customer from the drop-down list. You can also [create a new customer](#create-a-new-customer-while-creating-qr-code) while creating the QR Code. + + +> **INFO** +> +> +> **Handy Tip** +> +> You may skip this step and proceed with creation, if you do not wish to tag it to a specific customer. However, you cannot modify the QR Code and tag it to a customer later. +> + + + + +### Name + + Add a name for the QR Code for your reference. This will appear on your Dashboard. + +> **INFO** +> +> +> **Handy Tip** +> +> This is for your reference only and will not be visible to the end user. +> + + + + +### Add Internal Note + + Add notes for internal reference. + ![Add customer, name and internal notes while creating a QR code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-create-configure.jpg.md) + - This helps with reconciliation and will be available in the payments reports for the payments captured via QR. + ![Internal notes of a payment captured via QR code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-internal-notes.jpg.md) + + + + +1. Click **Create QR Code**. The QR Code is created. + +![QR code created successfully](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-create-generated.jpg.md) + +You can download and share the QR Code image with your customers. The QR Code appears in the list. + +![List of QR codes on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-create-create-qrcode.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> - If you create a QR Code in **Test Mode** through the payment gateway flow, the QR Code will disappear after two seconds. +> - You can scan QR Codes that are created only in **Live Mode**. +> + +### Create a New Customer While Creating a QR Code + +To create a customer while creating a QR Code: + +1. Click **View Advanced Options**. +1. In the **Customers** field, click **+Add New**. + ![Create a new customer while creating a QR code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-create-add-new-customer.jpg.md) +1. Specify details such as **Company/Individual Name**, **Email** and +**Contact No.** + ![Add details to create a new customer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-create-add-customer-details.jpg.md) +1. Click **Create and add this customer**. + +The details of the newly created customer are auto-populated on the QR Code. This customer name is also displayed under the **Customers** menu, and you can create more QR Codes for them in the future. + +Know more about [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers.md). + +### Add a Custom Brand Name to Your QR Codes + +You can increase your brand outreach using QR Codes by customising your brand name. Customers who scan the QR Code will see your custom Business Name after they make the payment. Know more about how you can add a [brand name and logo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-styling.md#brand-name-and-logo) from the Dashboard. + +## View Payments + +The payments received on QR Codes appear on the **Payments** tab. + +To view payments made for QR Codes: + +1. Click **Payments**. +2. Select the **Payment Id** from the list. + ![List of payments made via QR codes on the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-create-payment.jpg.md) +3. The payment details appear in the right pane. You can perform the following operations from this tab: + 1. **Create Transfer**: Transfer the payment to a linked account. Know more about [Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route.md). + 2. **Create Refund**: Refund the payment to the customer. Know more about [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md). + ![Create a transfer or a refund for a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-create-payment-details.jpg.md) + +## What Next +Once you have created the QR Code, you can share the short URL with the customer. You can also print or download it and send the image. You can also choose to [close the QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/close.md). + +> **INFO** +> +> +> +> **Handy Tips** +> +> The position of the Business name on the scanned screen will depend on the PSP app. +> + +### Related information +- [QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes.md) +- [How QR Codes Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/how-it-works.md) +- [Search a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/search.md) +- [Close a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/close.md) diff --git a/llm-content/payments/qr-codes/faqs.md b/llm-content/payments/qr-codes/faqs.md new file mode 100644 index 00000000..fc76bb44 --- /dev/null +++ b/llm-content/payments/qr-codes/faqs.md @@ -0,0 +1,72 @@ +--- +title: QR Codes | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay QR Codes. +--- + +# Frequently Asked Questions (FAQs) + +### 1. Can I use QR Codes to accept international payments using Razorpay QR Codes? + + No, you cannot use QR Codes to accept international payments. + + + +### 2. I want to set a date by which the customer must make the payment. How do I do that? + + You can set a Close By Date for the QR Code. The customer should make a payment using the QR Code within this Close By Date. The customer cannot make payments for a closed QR Code. Know more about [ setting Close By Date for QR Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/create.md#create-a-qr-code-from-dashboard/). + + + +### 3. A customer wants to make payments in parts. How do I create such QR Codes? + + If a customer wants to pay in parts, during QR Code creation, you must ensure that: + 1. The full payment amount is entered in the **Total Amount Expected** field. + 2. The **Allow Multiple Payments on QR** option is enabled. + + + +### 4. What are the payment methods available to customers? + + Customers can make payments using UPI PSP apps such as PhonePe, GooglePay only. If the QR Code type is `bharat_qr`, customers can also make payments using cards. + + + +### 5. Where do I track the QR Code and their states? + + You get instant notifications about the QR Code. You can also subscribe to webhook events and generate reports. Know more about [tracking QR Code and viewing reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/how-it-works.md#step-4-track-qr-code-and-reports/). + + + +### 6. My customer has made payments using Airtel Payments Bank. However, these payments are not getting settled to my account and are instead getting auto-refunded. Why? + + We do not support payments made using Airtel Payments Bank. Such payments will be auto-refunded to the customers. Please ask your customer to use another bank. + + + +### 7. How can I get access to BharatQR? + + Once activated, you will see BharatQR as an option while generating a QR Code. + + + +### 8. I created a QR Code in Test mode. Why am I not able to scan it? + + You can scan QR Codes that are created only in **Live Mode**. + + + +### 9. How can I create a QR Code to receive multiple payments from different customers? + + You can create a multiple-use QR Code that accepts unlimited payments from different customers without expiring. + + **Via Dashboard:** + 1. Log in to the Dashboard and navigate to **QR Codes**. + 2. Click **+ Create QR Codes** + 3. Enable the **Multiple Payments** option under QR Usage. + 4. Complete the setup and generate the QR Code. + + **Via API:** + Use the [Create QR Code API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/create.md) and set the `usage` parameter to `multiple_use`. + + Know more about [Create a QR Codes from Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/create.md) or [Create a QR Code using API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/create.md). diff --git a/llm-content/payments/qr-codes/glossary.md b/llm-content/payments/qr-codes/glossary.md new file mode 100644 index 00000000..69392f7d --- /dev/null +++ b/llm-content/payments/qr-codes/glossary.md @@ -0,0 +1,19 @@ +--- +title: QR Codes | Glossary +heading: Glossary +description: List of commonly used terms related to Razorpay QR Codes and their definitions. +--- + +# Glossary + +The following table lists all the commonly used terms and their definitions used in QR Code: + +Terms | Description +--- +QR Code | QR (Quick Response) code is a machine-readable code consisting of an array of black and white squares, typically used for storing URLs or other information for reading using a smartphone camera. +--- +Multiple Payments | A QR Code which can receive multiple payments. Multiple payments can be made by many customers or one customer. +--- +Single Payments | A QR Code which can receive only one payment. This QR Code is automatically closed once the payment is received. +--- +Close By Date | Close By Date is the date after which the customer cannot pay using the QR Code. diff --git a/llm-content/payments/qr-codes/how-it-works.md b/llm-content/payments/qr-codes/how-it-works.md new file mode 100644 index 00000000..e185f0e8 --- /dev/null +++ b/llm-content/payments/qr-codes/how-it-works.md @@ -0,0 +1,67 @@ +--- +title: How QR Codes Work +description: Create and share QR Codes to receive payments. Track payments and generate reports. +--- + +# How QR Codes Work + +Given below is a complete end-to-end flow about how you can use QR Codes to accept payments. + +![QR Codes Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-flow.jpg.md) + +## QR Codes Workflow + +To accept payments using Razorpay QR Codes: + + - **1. Create a QR Code**: Create a QR Code that you can share with your customers to accept payments. + + - **2. Share the QR Code**: Print or download the QR Code to share with your customers to accept payments. + + - **3. Receive Payments**: Receive payments after your customer scans the QR Codes and makes payments. + + - **4. Track QR Code Payments and Reports**: Receive notifications, check payments and view reports for QR Code payments. + +### 1. Create a QR Code + +[Create a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/create.md) by providing all the required details. You can set a close by date and enable multiple payments. + +The QR Code is in `active` status. Know more about [QR Code states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/states.md). + +> **INFO** +> +> +> **Handy Tips** +> +> You can close a QR Code from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/close.md) or with the [Close a QR Code API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes.md#close-a-qr-code). +> +> + +### 2. Share the QR Code + +Print and download the QR Code to share it with the customers. Customers can scan the code and complete the payment using their preferred UPI PSP apps. Check the [supported UPI apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md#supported-upi-apps). + +### 3. Receive Payments + +Customer scans the QR Code with their UPI PSP app and completes the payment. They can make multiple payments if the option was enabled at the time of QR creation. You receive a notification about the payment. + +> **INFO** +> +> +> **Handy Tips** +> +> After the payment is captured, the amount is settled to your account as per the settlement schedule. Know more about [payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md), [settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md), [ refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) and [disputes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/disputes.md). +> + +### 4. Track QR Code Payments and Reports + +- Notifications: Receive notifications regarding activity on QR Code via email and webhooks. Know more about [subscribing to QR Code webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/subscribe-to-webhooks.md). +- Track Payments: Track payments made using the QR Code on the Dashboard. Click **QR Codes** from the left menu and select **Payments**. All the payments received on your QR Codes are listed with their status. +- Reports: Gain detailed insights using reports and real-time data on the Dashboard. These reports can then be used for accounting and reconciliation purposes. Know more about [reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md). + +### Related Information + +- [QR Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes.md) +- [QR Codes States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/states.md) +- [Create a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/create.md) +- [Subscribe to QR Code Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/subscribe-to-webhooks.md) +- [QR Codes APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/apis.md) diff --git a/llm-content/payments/qr-codes/migrate.md b/llm-content/payments/qr-codes/migrate.md new file mode 100644 index 00000000..3c73c191 --- /dev/null +++ b/llm-content/payments/qr-codes/migrate.md @@ -0,0 +1,153 @@ +--- +title: Migrate from BharatQR APIs to QR Codes APIs +description: Migrate from our BharatQR APIs to QR Code APIs. Compare features, API Parameters and Webhook events. +--- + +# Migrate from BharatQR APIs to QR Codes APIs + +Given below is the high-level migration process. +1. Explore the QR Codes APIs using the Postman collection. +2. Understand the QR Code API Request and Response structure and the webhook payloads. +3. Integrate with QR Code APIs. You can refer to the provided sample codes. + + +### Feature Comparison + +The table below lists the features availability on BharatQR API and QR Codes API: + +Feature | BharatQR API | QR Codes API +--- +Dynamic BharatQR | x | ✓ +--- +Static BharatQR | ✓ | ✓ +--- +Dynamic UPI QR | ✓ | ✓ +--- +Static UPI QR | x | ✓ +--- +Get count of payments collected on QR Code | x | ✓ +--- +Dashboard access | x | ✓ +--- +Your business branding on QR image | x | ✓ +--- +Dedicated VPA for your business | x | ✓ + + + + +### Comparison of API Parameters + +Compare BharatQR and QR Code API parameters. + + + + BharatQR Parameter | QR Codes Parameter | Description + --- + receivers.types | type | The type of QR Code. Possible values: - `upi_qr`: Create a QR Code that accepts only UPI payments. +- `bharat_qr`: Create a QR Code that accepts UPI and card payments. + + For `receivers.types`, the only possible value was `qr_code`. + --- + description | description | A brief description of the QR Code. + --- + customer_id | customer_id | Unique identifier of the customer the QR Code is linked with. + --- + close_by | close_by | UNIX timestamp at which the QR Code is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. + --- + notes | notes | Key-value pair that can be used to store additional information about the QR Code. Maximum 15 key-value pairs, 256 characters (maximum) each. + --- + amount_expected | NA | The maximum amount you expect to receive in this virtual account. + --- + NA | name | Label entered to identify the QR Code. For example, `Store Front Display`. + --- + NA | usage | Indicates if the QR Code should be allowed to accept single payment or multiple payments. Possible values: - `single_use`: QR Code will accept only one payment and then close automatically. +- `multiple_use` (default): QR Code will accept multiple payments. + + --- + NA | fixed_amount | Indicates if the QR should accept payments of specific amounts or any amount. Possible values: - `true`: QR Code accepts only a specific amount. +- `false` (default): QR Code will accept any amount. + + --- + NA | payment_amount | This parameter is mandatory if fixed_amount parameter is in use. The amount allowed for a transaction. If this is specified, then any transaction of amount less than or more than this value will not be allowed. For example, if this amount is set as `500000`, the customer cannot pay an amount less than or more than ₹5000. + + + **API Reference Links** + - BharatQR: [Create a virtual account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bharatqr/api.md#create) + - QR Code: [Create a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes.md#create-a-qr-code) + + + + For this action, only one path parameter needs to be passed, the QR Code id. + + + BharatQR Parameter | QR Codes Parameter | Description + --- + Virtual Account ID | QR Code ID | The unique identifier of the virtual account/QR Code that is to be closed. + + + **API Reference Links** + - BharatQR: [Close a virtual account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bharatqr/api.md#close) + - QR Code: [Close a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/close.md) + + + The fetch query parameters remain the same across the APIs as given below: + + + BharatQR Parameter | QR Codes Parameter | Description + --- + from | from | Timestamp, in seconds, from when QR Codes are to be fetched. + --- + to | to | Timestamp, in seconds, till when QR Codes are to be fetched. + --- + count | count | Number of QR Codes to be fetched. The default value is 10 and the maximum value is 100. This can be used for pagination, in combination with skip. + --- + skip | skip | Number of records to be skipped while fetching the QR Codes. This can be used for pagination, in combination with count. + + + **API Reference Links** + - BharatQR: [Fetch all virtual accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bharatqr/api.md#fetch-all-payments) + - QR Code: [Fetch all QR Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/fetch-all.md) + + + + For this action, only one path parameter needs to be passed, the QR Code id. + + + BharatQR Parameter | QR Codes Parameter | Description + --- + Virtual Account ID | QR Code ID | The unique identifier of the virtual account/QR Code whose details are to be fetched. + + + **API Reference Links** + - BharatQR: [Fetch a virtual account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bharatqr/api.md#fetch-a-payment) + - QR Code: [Fetch a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/fetch-with-id.md) + + + For this action, only one path parameter needs to be passed, the QR Code identifier. + + + BharatQR Parameter | QR Codes Parameter | Description + --- + Virtual Account ID | QR Code ID | The unique identifier of the virtual account/QR Code whose payment details are to be fetched. + + + **API Reference Links** + - BharatQR: [Fetch payments by id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bharatqr/api.md#fetch-a-payment) + - QR Code: [Fetch payments made to a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/qr-codes/fetch-payments.md) + + + + + +### Comparison of Webhook Events + +Given below is a comparison of BharatQR and QR Codes webhook events: + +Webhook Events | BharatQR | QR Codes +--- +QR Code created | [virtual_account.created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/smart-collect.md#virtual-account-created) | [qr_code.created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/subscribe-to-webhooks.md#qr-code-created) +--- +QR Code credited | [virtual_account.credited](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bharatqr/notification.md#webhooks) | [qr_code.credited](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/subscribe-to-webhooks.md#qr-code-credited) +--- +QR Code closed | [virtual_account.closed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/smart-collect.md#virtual-account-closed) | [qr_code.closed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/subscribe-to-webhooks.md#qr-code-closed) diff --git a/llm-content/payments/qr-codes/search.md b/llm-content/payments/qr-codes/search.md new file mode 100644 index 00000000..638c07be --- /dev/null +++ b/llm-content/payments/qr-codes/search.md @@ -0,0 +1,64 @@ +--- +title: Search a QR Code +description: Search for QR Codes and Payments on the Razorpay Dashboard using filters. +--- + +# Search a QR Code + +You can search for QR Codes on the Dashboard by specifying various filters. Know more about [QR Code States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes.md#qr-code-states/). + +## Search a QR Code from the Dashboard + +To search a QR Code: + +1. Log in to the Dashboard. +2. Select **QR Codes** from the left menu and search for a QR Code under **QR Codes** by specifying filters. + +Filter | Description +--- +QR Code Id | Unique identifier of the QR Code. +--- +QR Name | Name of the QR Code. +--- +Status | The status of the QR Code. +--- +Notes | Additional information stored in the `Internal Notes` field while creating the QR Code. +--- +Customer Name | Name of the customer. +--- +Customer Contact | Registered phone number of the customer. +--- +Customer Email | Email address of the customer. + +![Search for a QR code from the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-search-search-qr-code.jpg.md) + +## Search Payments + +To search payments made using the QR Codes: +1. Log in to the Dashboard. +2. Select **QR Codes** from the left menu and search for a payment under **Payments** by specifying filters. + +Filter | Description +--- +QR Code Id | Unique identifier of the QR Code. +--- +Payment Id | Unique identifier of the payment. +--- +Payment Status | The status of the payment. Know more about [payment states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md). +--- +Email | Email address of the customer. +--- +Bank Reference Number | Unique reference provided by the bank for the payment. +--- +Notes | Additional information stored in the `Internal Notes` field while creating the QR Code. +--- +Count | Number of records to be shown. + +![Search for a payment made using QR code from the Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-search-search-payments.jpg.md) + +### Related Information + +- [QR Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes.md) +- [Create a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/create.md) +- [Cancel a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/close.md) +- [QR Code APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/apis.md) diff --git a/llm-content/payments/qr-codes/states.md b/llm-content/payments/qr-codes/states.md new file mode 100644 index 00000000..509d3e7d --- /dev/null +++ b/llm-content/payments/qr-codes/states.md @@ -0,0 +1,25 @@ +--- +title: QR Code States +description: List of QR Code states. Find descriptions for active and closed states. +--- + +# QR Code States + +A QR Code can be in one of two states: `active` or `closed`. + +## QR Codes States and Descriptions + +The table below lists the various states of a QR Code and gives a brief description of each state: + +Status | Description +--- +`active` | Indicates that the QR Code has been created and is ready to accept payments. Know more about [creating a QR Code.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/create.md) +--- +`closed` | Indicates that the QR Code has been closed. Customers cannot make payments using a closed QR Code. Know more about [closing a QR Code.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/close.md) + +### Related Information +- [QR Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes.md) +- [Create a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/create.md) +- [Cancel a QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/close.md) +- [QR Code APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/apis.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/subscribe-to-webhooks.md) diff --git a/llm-content/payments/qr-codes/subscribe-to-webhooks.md b/llm-content/payments/qr-codes/subscribe-to-webhooks.md new file mode 100644 index 00000000..5b2d8fad --- /dev/null +++ b/llm-content/payments/qr-codes/subscribe-to-webhooks.md @@ -0,0 +1,40 @@ +--- +title: QR Codes | Subscribe to Webhooks +heading: Subscribe to Webhooks +description: Subscribe to various webhook events related to QR Codes to receive instant notifications. +--- + +# Subscribe to Webhooks + +Follow these steps to subscribe to webhook events: +1. Log in to the Dashboard. +2. Navigate to **Account & Settings** → **Webhooks** to subscribe to any of the events mentioned in the following section. + +## Webhook Events and Descriptions + +Webhook Events | Description +--- +`qr_code.created` | Triggered when a QR Code is created. +--- +`qr_code.credited` | Triggered when a payment is made using a QR Code. +--- +`qr_code.closed` | Triggered when a QR Code is closed. + +### Signature Validation + +If you need to validate QR Code webhook payloads, please use the following Node.js code: + +```nodejs: Node.js + +const {validateWebhookSignature} = require('razorpay/dist/utils/razorpay-utils') + +webhookBodyNew = JSON.stringify(webhookBody).replace(/\//g, "\\/") + +validateWebhookSignature(webhookBodyNew, webhookSignature, webhookSecret) +``` + +Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) and check the [sample payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/qr-codes.md). + +### Related Information +- [QR Code States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/states.md) +- [QR Code APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/qr-codes/apis.md) diff --git a/llm-content/payments/qr-codes/use-cases.md b/llm-content/payments/qr-codes/use-cases.md new file mode 100644 index 00000000..ee790103 --- /dev/null +++ b/llm-content/payments/qr-codes/use-cases.md @@ -0,0 +1,97 @@ +--- +title: QR Codes Use Cases +description: Explore the diverse use cases of Razorpay QR Codes, a robust payment collection solution for businesses. +--- + +# QR Codes Use Cases + +Razorpay QR Codes enable businesses to securely accept UPI payments. These codes integrate with existing payment workflows to provide instant transaction confirmation across various commercial use cases. + + +### Retail Stores + + Acme Grocery Store uses Razorpay QR Codes at the checkout for customers to make quick and secure payments for their purchases. + + **Benefits for Acme Grocery Store**: + + + + Secure Payments + + Ensure customers' banking details remain protected with UPI-level security during transactions. + + + +### Dynamic or Static QRs + + Use static QRs for a single checkout counter or dynamic QRs for each customer to facilitate individual transaction tracking. + + + +### Easy Reconciliation + + Keep track of every transaction efficiently, aiding in accurate financial management. + + + + + + +### Service Providers + + Acme Repairs shares Razorpay QR Codes with customers to receive payments for repair services rendered. + + **Benefits for Acme Repairs**: + + + + Secured Transaction Process + + Transactions are as safe as any UPI payment, with customer bank details kept confidential. + + + +### Flexible QR Options + + Utilise dynamic QRs for varied billing amounts or static QRs for standard service fees. + + + +### Effortless Reconciliation + + Easily track and reconcile payments made for services, eliminating any discrepancy. + + + + + + +### Freelancers and Consultants + + Acme Design Services uses Razorpay QR Codes to receive payments for consulting sessions or project deliveries. + + **Benefits for Acme Design**: + + + + High-Security Payment Method + + Transactions are conducted with full UPI security, ensuring peace of mind for both the freelancer and the client. + + + +### Adaptable QR Codes + + Choose between dynamic QRs for varying project fees or static QRs for hourly consultations. + + + +### All UPI PSPs Accepted + + Clients can pay using any UPI app they have installed, facilitating an easier payment process. + + + +### Simplified Payment Tracking + + Maintain clear records of payments received, aiding in personal financial management. diff --git a/llm-content/payments/qr-codes/view-reports.md b/llm-content/payments/qr-codes/view-reports.md new file mode 100644 index 00000000..d3b6af13 --- /dev/null +++ b/llm-content/payments/qr-codes/view-reports.md @@ -0,0 +1,55 @@ +--- +title: QR Codes | View Reports +heading: View Reports +description: Find out how to generate the QR Codes report from the Razorpay Dashboard. +--- + +# View Reports + +You can generate the QR Codes report from the Dashboard. + + +### To generate reports: + + 1. Log in to the Dashboard. + 2. Navigate to **Reports**. + 3. On the Reports page, enter the following details: + 1. **Select Report Type**: Select the **QR Codes Report**. + ![Select QR Codes Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-report.jpg.md) + 2. **Select Period**: Select the period for which the report should be generated. + 3. **Select Format**: Select the file format. You can report in CSV, XLS and XLSX formats. + 4. **Email Report To**: You can send the report to the email address registered with Razorpay. + 4. Click **Generate Report**. + ![Generate a QR Codes Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr-codes-report-2.jpg.md) + + Download a [sample QR Codes Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-qrcode-report.xlsx.md). + + +Once the report is generated, you can view the following fields: + +Field | Description +--- + +`id` | The unique id of a QR Code. +--- +`status` | The status of the QR Code. This can be either `active` or `closed`. +--- +`name` | The name given to the QR Code during its generation. +--- +`description` | The description given to the QR Code during its generation. +--- +`notes` | Any Internal Note added during the generation of the QR Code. +--- +`usage_type` | Indicates if the QR can accept only one payment or multiple payments. +--- +`fixed_amount` | Indicates if the QR Code can accept only a fixed amount or not. +--- +`amount` | This section displays the QR Code's amount only if it accepts a fixed amount. +--- +`provider` | Indicates which type of QR Code it is. This can either be `upi_qr` or `bharat_qr`. +--- +`payments_amount_received` | Indicates the total amount paid through a particular QR Code. +--- +`payments_received_count` | Indicates the total number of payments made through a particular QR Code. +--- +`close_reason` | Indicates the reason why a QR Code is Closed. diff --git a/llm-content/payments/quickstart.md b/llm-content/payments/quickstart.md new file mode 100644 index 00000000..0d9f64ea --- /dev/null +++ b/llm-content/payments/quickstart.md @@ -0,0 +1,160 @@ +--- +title: Quickstart Guide +description: Complete guide to get started with Razorpay's payments platform. +--- + +# Quickstart Guide + +Welcome to Razorpay! This guide will walk you through setting up your account and choosing the right products for your business needs. + +## Step 1: Create an Account + +Sign up for a [Razorpay account](https://razorpay.com/signup) and complete the KYC process. + +- Start using our products or SDK/API integration in Test Mode during the KYC verification process. +- After KYC completion and testing, live mode unlocks for real payments. + +### Test Mode vs Live Mode + + + + - Start integration immediately without KYC completion. + + - Use test transactions with dummy data. No real money involved. + + - API keys begin with `rzp_test_`. + + - Perfect for development and testing. + + + + + + + - Requires KYC verification (24-48 hours). + + - Accept real customer payments. + + - API keys begin with `rzp_live_`. + + - Full access to all features. + + + + +## Step 2: Select Product + +[Choose Razorpay products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md) based on your business requirements. + + +### Online Payments vs. Offline Payments + + Choose between digital payment processing for ecommerce and websites using [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md), [Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout.md) and [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md) or physical payment solutions for retail stores and face-to-face transactions with [Razorpay POS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos.md). Know more about [online and offline payment options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md#accept-payments). + + + +### One-time Payments vs. Recurring Payments + + Select single transaction processing for individual purchases using [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md), [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md) and [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md) or automated recurring billing for subscriptions and regular services with [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md). Know more about [one-time and recurring payment solutions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md#accept-payments). + + + +### No-code Products vs. Products with Coding Requirements + + Pick ready-to-use payment solutions with simple setup like [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md), [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md), [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) or refer to our [Payment Gateway SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md#integrate-payment-gateway-web-mobile-ecommerce-plugins) for advanced integration needs. Explore [no-code and developer-friendly options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md#accept-payments). + + + +### Solutions by Industry + + Find tailored payment solutions designed for your industry: [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md) for ecommerce, [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) for SaaS, [Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route.md) for marketplaces or [Razorpay POS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos.md) for traditional retail businesses. View [industry-specific payment solutions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md#solutions-by-industry). + + + +### Solutions by Platform + + Integrate payments seamlessly with popular ecommerce platforms like Shopify, WooCommerce, Magento using [Payment Gateway ecommerce plugins](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md#integrate-payment-gateway-web-mobile-ecommerce-plugins) or build custom solutions using our [Checkout SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md#integrate-payment-gateway-web-mobile-ecommerce-plugins) for Go, PHP, Python, Node.js and [mobile platforms](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md#integrate-payment-gateway-web-mobile-ecommerce-plugins) (Android, iOS, React Native, Flutter, Cordova, Capacitor). Browse [platform-specific integration guides](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md#solutions-by-platform). + + +## Step 3: Key Dashboard Actions + + +### Generate API Keys + + If you are using our APIs, SDKs or plugins, follow these steps to generate API keys for the integration: + 1. Log in to Dashboard. + 2. Navigate to **Account & Settings** → **API Keys** under Website and app settings. + 3. Click **Generate Key**. + 4. Download and save **Key ID** and **Key Secret** securely. + + **Important:** + - Only Owner and Admin roles can access API keys. + - Generate separate keys for Test and Live modes. + - Key Secret is only visible at generation time. + + [API Keys Documentation →](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md) + + + +### Add Team Members + + Follow these steps: + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings** → **Business settings** → **Manage Team**. + 3. Click **Invite New Member**. + 4. Enter their email address and select role from the dropdown. + 4. Click **Send Invitation**. + + [Team Management Guide →](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md) + + + +### Configure Webhooks + + We recommend setting up webhooks to receive notifications, if you are integrating with our APIs or SDKs. + 1. Log in to the Dashboard. + 1. Navigate to **Account & Settings** → **Webhooks**. + 2. Click **Add New Webhook**. + 3. Enter your endpoint URL. + 4. Select events to monitor. + 5. Add webhook secret for signature verification. + 6. Save and activate. + + [Webhooks Documentation →](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) + + + +### Payment Capture Settings + + Log in to the Dashboard. Navigate to the **Account & Settings** option and scroll to the **Payments Capture** section. + + + Option | Description + --- + Auto-capture all payments | All payments authorized within 3 days from the time of creation are auto-captured. + --- + Auto-capture timeouts | - Allows you to define custom auto-capture timeout. +- The minimum value is 12 minutes. +- The maximum value (default) is 3 days. + + --- + Manual capture timeout | - Allows you to define custom manual capture timeout. +- +The minimum value is 12 minutes.- The maximum value (default) is 3 days. + + --- + Auto-refund speed | Payments in the authorized state are auto-refunded after the timeout. With the Normal Refund option, your payment is refunded to your customer in 5-7 working days. The refund speed selected here is only applicable to payments that are auto-refunded. + + + + [Payment Capture Guide →](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) + + +## Next Steps + +Once your account is created: + +1. **Complete KYC**: [Submit KYC documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#2-submit-kyc-details) for live mode activation. +2. **Choose Product/Integration Method**: Select based on your business needs and technical capabilities. +3. **Test Thoroughly**: Use test mode before going live. +4. **Go Live**: Switch to live mode when ready. Use live mode keys if integrating with our APIs/SDKs/plugins. diff --git a/llm-content/payments/re-kyc.md b/llm-content/payments/re-kyc.md new file mode 100644 index 00000000..71fbe08c --- /dev/null +++ b/llm-content/payments/re-kyc.md @@ -0,0 +1,46 @@ +--- +title: Razorpay Re-KYC | RBI Compliance +heading: Re-KYC +description: Ensure compliance with RBI guidelines by completing your Re-KYC process. Update your KYC details securely to avoid service disruptions. +--- + +# Re-KYC + +As per [RBI guidelines](https://www.rbi.org.in/commonman/English/scripts/notification.aspx?id=2607#18), we must periodically collect and update KYC data to ensure compliance. + +When it is your turn to submit KYC again, a banner on your dashboard appears. Ensure to complete the process before the given date. To complete re-KYC: + +![update re-kyc](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/update-re-kyc-1.jpg.md) + +1. Click **Update KYC**. + + ![update re-kyc banner](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/update-re-kyc-2.jpg.md) + +2. Verify the information added for KYC at the time of onboarding, one by one. If the information is correct, you can click **My details are correct** or upload the updated document and click **Continue**. + + +### For example: + + 1. Click **Update contact name**. + ![update contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/update-re-kyc-3.jpg.md) + 2. Check the name, if it is correct, click **My details are correct** or enter your name and click **Continue**. + 3. Continue this process with all the other fields. Click the update button and verify your information. + + + + + You can view previously submitted information, verify and then click **My details are correct**. + ![my details are correct](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/update-re-kyc-4.jpg.md) + +3. Upload your latest documents and click **Continue**. You can upload `.pdf`, `.jpeg`, `.png` or `.jpg`. Ensure that the file size does not exceed 25 MB. Know more about [KYC Documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/business-types-kyc-documents.md#kyc-documents). + + Click **Upload File**, to select and upload the respective file and click **Continue**. + ![document upload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/update-re-kyc-6.jpg.md) + +4. Upon completing all the steps, select the check box and click **Submit for verification**. + + ![submit for verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/update-re-kyc-5.jpg.md) + +Once the above steps have been completed, the uploaded documents are reviewed. If any document is found to be incorrect, click **Resolve**, verify and upload the correct set of documents. + +![resolve](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/update-re-kyc-7.jpg.md) diff --git a/llm-content/payments/recurring-payments.md b/llm-content/payments/recurring-payments.md new file mode 100644 index 00000000..99d16319 --- /dev/null +++ b/llm-content/payments/recurring-payments.md @@ -0,0 +1,209 @@ +--- +title: Recurring Payments +description: Know how to create and collect an authorisation transaction from your customer and how you can charge the customer recurring payments. +--- + +# Recurring Payments + +Recurring Payments allow you to charge your customers repeatedly without requiring them to enter payment details each time. Your customers authorise their payment method once and you can charge them at intervals you control based on your business needs. + +Use Razorpay Recurring Payments to create flexible payment schedules for subscriptions, installments, usage-based billing or on-demand charges. Set up recurring payments quickly using our powerful REST APIs. + + to get this feature activated on your Razorpay account. + +> **SUCCESS** +> +> +> **What's New** +> - RuPay cards from all major banks are supported. (April 2024) +> + + +### How It Works + + 1. **Authorise**: Customer authorises their payment method. + 2. **Tokenise**: Payment method is securely tokenised after first successful payment. + 3. **Charge**: You initiate charges as needed using the token. + + + +### When to Use Recurring Payments + + Recurring Payments are ideal when you need: + - **Flexible billing cycles**: Charge customers based on usage, milestones or variable schedules. + - **Manual control**: You decide when to charge each payment. + + For automated, fixed-schedule billing (weekly, monthly, quarterly), consider using [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) instead. + + + +### Recurring Payments vs. Subscriptions + + + + + Feature | Recurring Payments | Subscriptions + --- + **Best For** | Variable billing, usage-based charges, on-demand payments | Fixed schedules (weekly, monthly, quarterly, yearly) + --- + **Scheduling** | You initiate each charge via API when needed | Automatically scheduled and charged by Razorpay + --- + **Control** | Full manual control over timing and amounts | Set-and-forget automation + --- + **Tokenisation** | After first successful payment | Based on selected frequency + --- + **Payment Methods** | - Credit Cards +- Debit Cards +- Emandate (Netbanking, Debit Card, Aadhaar) +- Paper NACH +- UPI + | - Credit Cards +- Debit Cards +- UPI +- Emandate + + + + + + + + + + +## Available Payment Methods + +Choose the payment method that best suits your business model: + + + Accept Recurring Payments with UPI Autopay. + + + + Accept Recurring Payments with Cards. + + + + Accept Recurring Payments with Emandate. + + + + Accept Recurring Payments with Paper NACH. + + +## Use Cases + + +### Usage-Based Billing - Online Marketing Agency + + **Scenario**: Acme Corp, an online marketing agency, charges clients based on actual ad clicks rather than fixed monthly fees. + + **Example**: A client wants to run campaigns for three months, paying per 5,000 clicks. + + **Solution**: Authorise the payment method once, then charge the customer each time they reach 5,000 clicks. The amount and timing varies based on actual usage. + + **Recommended Method**: Cards or UPI for quick authorisation (₹1 minimum) + + → [Set up with Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md) + + → [Set up with UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md) + + + + +### Flexible Investment Plans - Investment Management Company + + **Scenario**: Acme Finance, an investment company, offers mutual funds where customers make an initial investment and add variable amounts later. + + **Example**: Customer invests initially and can invest any amount (₹500, ₹2000, ₹5000) at any time. + + **Solution**: Charge the initial investment immediately during authorisation, then process subsequent investments as requested by the customer. + + **Recommended Method**: Emandate or Paper NACH for long-term investment commitments. + + + + → [Set up with Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-authorization-transaction.md) | [Set up with Paper NACH](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-authorization-transaction.md) + + + +## Get Started + +Select the [payment method](#available-payment-methods) based on your use case and customer preferences. Follow these steps to implement Recurring Payments: + + +### Step 1: Create Authorisation Payment + + + Set up the authorisation payment using: + - [APIs for Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md) + - [APIs for UPI Autopay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md) + - [APIs for UPI OTM](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-otm/authorization-transaction.md) + - [APIs for UPI TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-tpv/create-authorization-transaction.md) + - [APIs for Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-authorization-transaction.md) + - [APIs for Paper NACH](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-authorization-transaction.md) + + + + + + + + +### Step 2: Fetch Token Details + + + Fetch the customer's token detail to proceed with the authorisation payment using: + - [APIs for Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/tokens.md) + - [APIs for UPI Autopay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/tokens.md) + - [APIs for UPI TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-tpv/tokens.md) + - [APIs for UPI OTM](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-otm/tokens.md) + - [APIs for Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/tokens.md) + - [APIs for Paper NACH](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/tokens.md) + + + + + + +### Step 3: Charge Subsequent Payments + + + Use the token to charge customers as needed using: + - [APIs for Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-subsequent-payments.md) + - [APIs for UPI Autopay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-subsequent-payments.md) + - [APIs for UPI TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-tpv/create-subsequent-payments.md) + - [APIs for UPI OTM](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-otm/one-time-payment.md) + - [APIs for Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-subsequent-payments.md) + - [APIs for Paper NACH](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-subsequent-payments.md) + + + + + +## Supported Platforms + +Razorpay Recurring Payments is supported on the following platforms: + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ (excluding Paper NACH) | ✓ | ✓ + + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ (excluding Paper NACH) | ✓ | ✓ + + + +### Related Information + +- [Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) +- [Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/integrate.md) +- [Paper NACH](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/integrate.md) +- [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/integrate.md) +- [Optimizer Recurring Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer/recurring-payments.md) diff --git a/llm-content/payments/recurring-payments/batch-operations.md b/llm-content/payments/recurring-payments/batch-operations.md new file mode 100644 index 00000000..a952d064 --- /dev/null +++ b/llm-content/payments/recurring-payments/batch-operations.md @@ -0,0 +1,311 @@ +--- +title: Batch Operations +description: Create Recurring Payments using the batch upload feature from the Razorpay Dashboard. +--- + +# Batch Operations + +You can [create registration links](#create-registration-links) and [charge tokens](#charge-tokens) in bulk using the batch feature available from the Dashboard. You can check the status of the bulk action in the respective batch reports. + +## Batch Statuses + +The following table lists the various states of a batch file: + +Status | Description +--- +Created | This is the initial state of a batch. This indicates that the uploaded batch is created in Razorpay's database and is getting processed. +--- +Partially Processed | This means the batch file is getting processed. +--- +Processed | This is the final state of a batch and indicates that the batch file is processed. However, this does not mean all the rows are processed successfully. Individual data rows can be processed successfully or may generate errors. Please check the details in the Batch Report. +--- + +## Create Registration Links + +You can create registration links in bulk using the Batch Upload feature. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - You can upload batch files in either in the `.xlsx` or the `.csv` format. +> - The maximum file size is 55MB and 5,00,000 rows. +> - Ensure you enter the amount in paise. For example, if the amount is ₹1,000, you should enter the value as `100000`. +> - The links are processed in the same sequence as listed in the file. +> - **Do not modify the column headers**. Modifying the column headers causes the batch upload to fail. +> + +To create a registration link: +1. Log in to the Dashboard. +1. Under **PAYMENT PRODUCTS**, navigate to **Subscriptions** → **Batch Upload** → **Upload New Batch** → **Batch Registration Links**. +1. Download the sample file. +1. Add the required data. Know more about the Batch Fields from the [below table](#batch-fields). +1. Upload the file to the Dashboard. +1. Select the relevant notification options, SMS and/or Email. +1. Click **Create**. + +Watch this video to know how to create registration links using the batch feature from the Dashboard. + +[Video: https://www.youtube.com/embed/VM4XkCnP_UI] + +### Batch Fields + +The following table lists the fields required to create a registration link: + +`name` _optional_ +: The customer's name. For example, `Gaurav Kumar`. + +`email` _mandatory_ +: The customer's email address. For example, `gaurav.kumar@example.com`. + +`phone` _mandatory_ +: The customer's contact number. For example, `9876543210`. + +`amount` _mandatory if method = card/upi_ +: The registration amount you want to charge the customer in paise. + - For **Card**, the minimum value is 100 (that is ₹1). + - For **Emandate and NACH**, the authorization value is 0. + + +> **INFO** +> +> **Auto-charge First Payment** + You can choose to auto-charge the customer an initial payment immediately after authorisation by entering any value greater than 0. For example, if you enter 100000, the customer is auto-charged ₹1,000 as soon as the token is confirmed. + + - For **UPI**, the minimum value is 100 (that is ₹1). + +`currency` _mandatory if amount is provided_ +: The 3-letter ISO currency code for the payment. Currently, only `INR` is allowed. + +`method` _mandatory_ +: The payment method to be authorized. This can be: + - `emandate` + - `card` + - `nach` + - `upi` + +`token_expiry_by` _optional_ +: The date and time of expiry for a mandate. +Minimum value is 1 day. Defaults to `30 years` for Emandate and UPI. The maximum value you can set is `30 years` from the current date. Any value beyond this will throw an error. Supported formats: + - DD/MM/YYYY HH:mm:ss (For example, 31/12/2019 00:59:59) + - DD/MM/YYYY HH:mm + - DD/MM/YYYY + +`token_max_amount` _optional_ +: `Emandate, NACH and UPI only`. Maximum amount for the token (in paise). + - For emandate: + - Default value is `9999900` (₹99,999). + - Minimum value is `500` (₹5). + - Maximum value is is `1000000000` (₹1,00,00,000). + - For Paper NACH: + - Default value is `10000000` (₹1 lac). + - Minimum value is `500` (₹5). + - Maximum value is `1000000000` (₹1 cr). + - For UPI: + - Default value is `500000` (₹5,000). + - Minimum value is `100` (₹1). + - Maximum value is `500000` (₹5,000). + +`frequency` _mandatory if method = upi_ +: The frequency at which you can charge your customer. Possible values: + - `daily` + - `weekly` + - `monthly` + - `quarterly` + - `yearly` + - `fortnightly` + - `bimonthly` + - `half_yearly` + - `as_presented` + +`auth_type` _mandatory if mehtod =emandate and nach_ +: `Emandate, UPI and NACH only`. The payment authorisation type. Possible values: + - `netbanking` or `debitcard` for emandate. Leave this blank if you want to allow the customer to select their preferred option when making the payment. + - `physical` for NACH. + +`bank` _mandatory if method = nach_ +: `Emandate and NACH only`. Bank code to preselect a bank. For example, `HDFC`. +You can fetch bank codes by firing the following API as a GET request: +`https://@api.razorpay.com/v1/methods`. + +`account_holder_name` _mandatory if method = nach and upi_ +: `Emandate, UPI and NACH only`. Name of the account holder. For example, `Gaurav Kumar`. This field is mandatory for the UPI method only if you have enabled the TPV functionality. Please contact our [Support team](https://razorpay.com/support/#request) to enable TPV on your Razorpay account. + +`ifsc` _mandatory if method = emandate, nach and upi_ +: `Emandate, UPI and NACH only`. The bank's IFSC. For example, `HDFC0001234`. This field is mandatory for the UPI method only if you have enabled the TPV functionality. Please contact our [Support team](https://razorpay.com/support/#request) to enable TPV on your Razorpay account. + +`account_number` _mandatory if method = emandate, nach and upi_ +: `Emandate, UPI and NACH only`. Customer's bank account number. For example, `11214311215411`. This field is mandatory for the UPI method only if you have enabled the TPV functionality. Please contact our [Support team](https://razorpay.com/support/#request) to enable TPV on your Razorpay account. + +`account_type` _mandatory if method = emandate, nach and upi_ +: `Emandate, UPI and NACH only`. Bank account type. This field is mandatory for the UPI method only if you have enabled the TPV functionality. Please contact our [Support team](https://razorpay.com/support/#request) to enable TPV on your Razorpay account. Possible values: + - `savings` + - `current` + +`receipt` _optional_ +: A user-entered unique identifier for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`description` _mandatory_ +: A user-entered description for the registration link. For example, `12 p.m. Meals`. + +`link_expiry_by` _optional_ +: Date and time of expiry for the registration link. Supported format DD/MM/YYYY. For example, `17/12/2020`. + +`notes[custom 1]` _optional_ +: Key-value pair that can be used to store additional information about the entity. You can add up to 5 custom notes in the following format: + - notes[portfolio id] + - notes[transaction id] + +> **INFO** +> +> +> **Bank Details** +> +> For Emandate, you should provide all the required bank details or leave all the fields blank. Following are the required bank details: +> - `bank` +> - `account_holder_name` +> - `ifsc` +> - `account_number` +> - `account_type` +> +> If you enter details for a few fields and leave the other blank, will lead to failure. +> + +### Batch Report + +After a batch file is processed, you can download the batch report from the Dashboard. Click the **batch_id** to view details of how many rows were uploaded, how many rows were processed successfully and how many rows failed. + +![](/docs/assets/images/recurring-payments-view_batch_link_report_dashboard.jpg) + +Click **Download Report** to download the report. This report has the following additional fields that give you information about the authorisation link or the reason for failure. + +`Status` +: The status of the authorisation link. Possible values: + - `success` + - `failed` + +`authorization_link_id` +: The unique identifier for the authorisation link. For example, `inv_E7vb0PqKa4VpBc`. + +`authorization_link` +: The short URL for the authorisation link. For example, `https://rzp.io/i/Abcd5`. + +`link_status` +: The status of the authorisation link. For example, `issued`. + +`created_at` +: Timestamp, in Unix format, when the authorisation link was created. For example, `1580134092`. + +`Error Code` +: The error code for the failure. For example, `BAD_REQUEST_ERROR`. + +`Error Description` +: The reason for the error. For example: + - `Bank code provided is invalid.` + - `expire_by should be at least 15 minutes after current time` + - `The ifsc code field is required.` + +## Charge Tokens + +To charge tokens using the batch upload feature, you will first need the list of [Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) for which recurring payments are to be created. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - You can upload batch files in either in the `.xlsx` or the `.csv` format. +> - The maximum file size is 55MB and 5,00,000 rows. +> - Ensure you enter the amount in paise. For example, if the amount is ₹1,000, you should enter the value as `100000`. +> - The links are processed in the same sequence as listed in the file. +> - **Do not modify the column headers**. Modifying the column headers causes the batch upload to fail. +> + +Once you have the list of tokens you can either: +- [Charge the tokens immediately](#charge-tokens-immediately). +- [Schedule a charge on the tokens at a later time](#schedule-a-charge-on-tokens). + +### Charge Tokens Immediately + +Watch this video to know how to charge tokens immediately from the Dashboard using the batch feature. + +[Video: https://www.youtube.com/embed/tr8XCWVumxI] + +To charge tokens immediately: + +1. Log in to Dashboard. +1. Under **PAYMENT PRODUCTS**, navigate to **Subscriptions** → **Batch Upload** → **Upload New Batch** → **Batch Recurring Payments**. +1. Download the [sample file](https://cdn.razorpay.com/dashboard/sample_recurring_payments.csv). +1. Add the required data. Know more about the Batch Fields from the [below table](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/batch-operations.md#charge-token-batch-fields). +1. Upload the file to the Dashboard. +1. Select **Process Now**. +1. Click **Create**. + +### Schedule a Charge on Tokens + +You can schedule to charge tokens in bulk. + +Watch this video to know how to schedule a charge on tokens from the Dashboard using the bulk upload feature. + +[Video: https://www.youtube.com/embed/yAflrc4zt1s] + +To schedule to charge tokens: +1. Log in to Dashboard. +1. Under **PAYMENT PRODUCTS**, navigate to **Subscriptions** → **Batch Upload** → **Upload New Batch** → **Batch Recurring Payments**. +1. Download the [sample file](https://cdn.razorpay.com/dashboard/sample_recurring_payments.csv). +1. Add the required data. Know more about the Batch Fields from the [below table](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/batch-operations.md#charge-token-batch-fields). +1. Upload the file to the Dashboard. +1. Select **Schedule for Later** and select the date and time you want to charge the tokens. The schedule time should be at least 1 hour from the current time. +1. Click **Create**. + +### Charge Token Batch Fields + +The following table lists the fields required to charge a token: + +`token` _mandatory_ +: The unique identifier for the token. For example, `token_1Aa00000000001`. + +`customer_id` _mandatory_ +: The unique identifier of the customer. For example, `cust_1Aa00000000001`. + +`amount` _mandatory_ +: The amount, in paise, you want to charge the customer. For example, enter `69999` for ₹699.99. + +`currency` _mandatory_ +: The 3-letter ISO currency code for the payment. Currently, only `INR` is allowed. + +`receipt`_optional_ +: A user-entered unique identifier for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`description` _optional_ +: A user-entered description for the payment. For example, `12 p.m. Meals`. + +`notes[custom 1]` _optional_ +: Key-value pair that can be used to store additional information about the entity. You can add up to 5 custom notes in the following format: + - notes[portfolio id] + - notes[transaction id] + +### Processed Batch Fields + +Once a batch file is processed, you can download the processed file from the Dashboard. Click the `batch_id` to view details of how many rows were uploaded, how many rows were processed successfully and how many rows failed. + +Click `Download Report` to download the processed file. This file has the following additional fields that give you information about the authorization link or the reason for failure. + +`order_id` +: The unique identifier linked to the order for the payment. For example, `order_E16Yt72tHs34li`. + +`payment_id` +: The unique identifier for the payment. For example, `pay_E16YtBnEk38fAm`. + +`Error Code` +: The error code for the failure. For example, `BAD_REQUEST_ERROR`. + +`Error Description` +: The reason for the error. For example, `Payment amount exceeds the maximum amount allowed.` + +### Related Information +- [ Create Recurring Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md) +- [Paper NACH Form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upload-paper-nach-form.md) diff --git a/llm-content/payments/recurring-payments/cards/apis.md b/llm-content/payments/recurring-payments/cards/apis.md new file mode 100644 index 00000000..580c9286 --- /dev/null +++ b/llm-content/payments/recurring-payments/cards/apis.md @@ -0,0 +1,30 @@ +--- +title: Recurring Payments APIs for Cards +description: List of Recurring Payments APIs available for Cards. +--- + +# Recurring Payments APIs for Cards + +You can use the Recurring Payments APIs to perform various actions using Cards as a payment method. + +## List of Recurring Payments APIs + +The table below lists the various Recurring Payments APIs available for Cards and gives a brief description of each API: + +API | Description +--- +[Create Authorisation Transaction using Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md#11-using-razorpay-standard-checkout) | API to create an authorisation transaction using Razorpay Checkout. +--- +[Create Authorisation Transaction using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md#12-using-a-registration-link) | API to create an authorisation transaction using Registration Link. +--- +[Fetch Tokens using Payment id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/tokens.md#21-fetch-token-by-payment-id) | API to fetch tokens using the Payment id. +--- +[Fetch Tokens using Customer id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/tokens.md#22-fetch-tokens-by-customer-id) | API to fetch tokens using the Customer id. +--- +[Delete Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/tokens.md#23-delete-tokens) | API to delete tokens. +--- +[Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-subsequent-payments.md) | API to create subsequent payments. + +### Related Information +- [Integrate Recurring Payments Using Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/integrate.md) +- [Supported Banks and Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/supported-banks.md) diff --git a/llm-content/payments/recurring-payments/cards/faqs.md b/llm-content/payments/recurring-payments/cards/faqs.md new file mode 100644 index 00000000..dfa6c697 --- /dev/null +++ b/llm-content/payments/recurring-payments/cards/faqs.md @@ -0,0 +1,269 @@ +--- +title: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Recurring Payments using cards. +--- + +# Frequently Asked Questions (FAQs) + +### 1. Which banks have enabled Recurring Payments through Cards? + + Refer to the [list of banks that support cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/supported-banks.md). + +> **WARN** +> +> +> **Watch Out!** +> +> Please contact our support team if you are facing difficulties with card payments from any of the major banks on the above list. +> + + +> **INFO** +> +> +> **Handy Tips** +> +> We support Visa and Mastercard cards of all major banks. +> + + Watch this video to see how a customer registers for Recurring Payments using Cards. + + ![](/docs/assets/images/end_customer_card_registration.gif) + + + +### 2. What happens when a customer tries to use the card details of banks that are not yet available for Recurring Payments? + + If a customer enters card details of banks that are not available for Recurring Payments, an error message is displayed as `Card does not support recurring payments.` + + ![](/docs/assets/images/cards-mandatehq-error.jpg) + + + +### 3. Will the existing card tokens continue to work post September 30, 2021? + + We will migrate existing credit card tokens of OneCard bank by September 30, 2021. Therefore, you can continue to process recurring payments on such mandates even after September 30, 2021. As and when more banks become available for Recurring Payments using Cards, we will migrate the existing mandates of such banks. + + +> **WARN** +> +> +> **Watch Out!** +> +> All of the tokens that will be migrated are credit card based tokens as debit cards were not enabled to process Recurring Payments before. +> + + + + +### 4. Can we continue to process recurring payments through card tokens of banks that are not yet available for Recurring Payments on Cards? + + All the card tokens of the banks that are not yet available for Recurring Payments on cards are put in a `paused` state. You cannot debit these mandates. Please contact your customers and register new mandates using other methods such as UPI or Emandate. Know more about other [Recurring Payments methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments.md). Alternatively, use [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md) from the Dashboard or Razorpay [Mobile App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app.md) and collect payment from customers on the due date. + + + +### 5. How do I know the token status? + + You can go to the **Reports section** in your Dashboard and download the token report to know the status of all your tokens to take appropriate action. + + To download the token report: + + 1. Log in to the Dashboard and click the **Reports** from the left menu. + 2. Select **Token Report** from the **Select Report Type** drop-down list. + 3. Select the relevant **Period** from the **Select Period** drop-down list. + 4. Select the file format from the **Select Format** drop-down list. You can choose CSV, XLSX or XLS formats. + 5. Click **Generate Report** to download or get it emailed to your registered email address by selecting the **Email Report To** check box. + + Watch this video to see how to check the token status. + + ![](/docs/assets/images/check_token_report.gif) + + + +### 6. Are there any changes in the APIs for processing card-based mandates? + + There are no changes in the existing integration flow. However, we have added a few optional token parameters to the **Create Order API**. If these parameters are not passed in the request, the default values are assumed. Know more about [Recurring Payments APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md#112-create-an-order). + + + +### 7. Are there any changes in turnaround time (TAT) for registering mandates and for processing debits? + + 1. Raise the debit request 36 hours in advance for processing debits on registered mandates. + 2. A pre-debit notification will be sent to the customer’s registered mobile number or email id. + 3. If they do not pause or cancel the mandate, the recurring debit will be processed and you will get the notification through a webhook or in the Dashboard. + + Following is a sample of pre-debit notification: + + ![](/docs/assets/images/cards-mandatehq-pre-debit.jpg) + + + +### 8. Is there a maximum monetary limit for processing card-based mandates? + + - You can register mandates up to a maximum of ₹15,000 without any intervention from customers and process subsequent payments. + - If you fall under the following merchant category codes, you can increase the limit to ₹1,00,000 by making changes to your API request, without any intervention from customers and process subsequent payments: + - Mutual Funds: 6211 + - Insurance: 6300, 6529, 5960 + - Credit Card Bill Payment: 6012, 5413 + - For others to register and process mandates of amounts greater than ₹15,000, an Additional Factor Authentication (AFA) is required from customers for every subsequent debit. + + + +### 9. What is the new flow to process subsequent debits using cards under the new RBI guidelines? + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Businesses should initiate the debit. The banks and Razorpay take action on the rest of the process. +> + + To process subsequent debits **below ₹15,000**: + 1. Businesses initiate the debit for an amount less than ₹15,000. + 2. Bank will send a pre-debit notification SMS to the customer immediately. + 3. The amount will be debited 36 hours after the notification. + + ![](/docs/assets/images/cards-mandatehq-pre-debit.jpg) + + To process subsequent debits above ₹15,000 (upto ₹1,00,000 for [certain merchant categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/faqs.md#8-is-there-a-maximum-monetary-limit-for)): + 1. Businesses initiate the debit. + 2. Bank will send a notification with a link for Additional Factor Authentication (AFA) to the customer immediately. The AFA link will be active for 72 hours. + 3. The amount will be debited as soon as the customer provides AFA. + + Watch this video to see how the customers provide their consent through the AFA link. + + ![](/docs/assets/images/cards-mandatehq.gif) + + + +### 10. Are there any changes in processing recurring payments on international cards? + + No, there are no changes in processing recurring payments on international cards. The RBI guidelines apply only to domestic cards and not international cards. + + + +### 11. For card mandates, how long does it take for the token status to move from the `initiated` state to the `confirmed` state? + + + For card mandates, the status is updated in real-time. + + + + Method | Bank | TAT Guidelines + --- + Cards | All Banks | Real-time + --- + + + + +### 12. For card mandates, how long does it take a subsequent charge to move from the `created` state to the `authorized` state? + + In the case of cards, the status update takes 36 to 72 hours. + + + +### 13. What is the TAT for processing debits of cards mandates? + + - For processing debits **below ₹15,000**, the TAT is 24 hours after raising the debit request, subject to the customer not pausing or cancelling the mandate. + - For processing debits **above ₹15,000** (upto ₹1,00,000 for [certain merchant categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/faqs.md#8-is-there-a-maximum-monetary-limit-for)), the amount will be debited as soon as the customer provides consent through AFA, which has a validity of 72 hours. + + + +### 14. Can cardholders make changes to registered card tokens? How are businesses notified of such changes? + + Yes, cardholders can pause, resume and cancel card tokens from the portal provided by the bank to manage them. You will get notifications through multiple webhooks when a cardholder initiates any such changes to the card tokens. You can also see these changes on the Dashboard. + + + +### 15. Can I cancel a card mandate? + + Yes. You can use the cancel a card mandate by deleting the token. Tokens can be deleted: + - [From the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#delete-the-token) + - [Using APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/tokens.md#23-delete-tokens) + + + +### 16. Is it possible to skip the MandateHQ summary screen that appears before the bank page while making a transaction? + + Yes, you can skip the MandateHQ summary screen by enabling **Skip Mandate Summary Page for Cards** option from the Dashboard. + + To enable the option: + + 1. Log in to the Dashboard and click **Account & Settings** in the left menu. + 2. Click **Skip mandate summary page** under **Checkout settings**. + ![](/docs/assets/images/flash_checkout_settings.jpg) + 3. Enable the **Skip Mandate Summary Page for Cards** option. + ![](/docs/assets/images/skip_mandate_cards_rp.jpg) + + + +### 17. What types of cards are supported for Recurring Payments? + + - Credit cards from the following networks, issued by any bank in India: + - Mastercard + - Visa + - RuPay + - Debit cards on the Mastercard and Visa networks, issued by the following banks: + - ICICI Bank + - Kotak Mahindra Bank + - Citibank + - Canara Bank + + + +### 18. How do I enable Rupay Card support to collect recurring payments? + + We are doing a beta rollout for recurring payments via Rupay cards. This beta phase will include an on-demand enablement. You should reach out to your POCs to get this enabled. + + Also, alternatively, we will choose a set of merchants to enable this feature and inform them through the POCs. + + + +### 19. Is any additional integration required to enable RuPay? + + No. If you have already integrated Razorpay Subscriptions or CAW for Visa and Mastercard cards, no additional changes or integrations are required to enable RuPay cards. This applies to all cases, whether you are integrated on Standard Checkout, Custom Checkout or S2S (server-to-server integrations). + + + +### 20. What banks support recurring payments via RuPay cards? + + RuPay SI requires payment processors/aggregators and banks to work with NPCI to enable the support. NPCI is continuously working with more banks to support recurring payments on RuPay cards. Refer to the [Supported Banks and Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md#cards) document for the list of supported banks. + + + +### 21. Are the 2021 RBI guidelines for recurring payments on cards applicable to RuPay cards? + + Yes. The 2021 RBI guidelines apply to all cards issued in India across network schemes, including RuPay cards. + + + +### 22. Is tokenisation of cards required for RuPay SI flows? + + Yes. The card needs to be tokenised during the mandate registration to process subsequent payments on the respective mandate. In all cases, Razorpay will act as an on-behalf token requestor for the business while tokenising the card with the RuPay network. + + + +### 23. Are there any differences in functionalities/use cases supported via RuPay compared to Visa and Mastercard cards? + + Yes. As SI on RuPay is NPCI's new product, they continuously work to cover an exhaustive set of use cases from an ecosystem standpoint. However, RuPay card recurring is supported for all businesses' extensive and fundamental use cases. Below are the use cases not supported currently: + - **Mandate registration with saved card**: This is live for NPCI and Razorpay. + - **Debits greater than 15K**: Initial or subsequent debits greater than 15,000 INR are not allowed for RuPay card recurring transactions. NPCI is working to enable this shortly. + - **Pre-debit Notification with the same amount on a given mandate**: Currently, NPCI does not support the functionality of raising multiple pre-debits with the same amount simultaneously on a mandate. After a pre-debit notification for a given amount is raised on a mandate, the next pre-debit with the same amount will override the previous pre-debit notification. Hence, the next pre-debit with the same amount should only be raised after the debit is successfully done against the previous pre-debit notification or after the previous pre-debit notification expires(T+3 days to expire, where T is the debit date specified). + + +## Payment retries + + +### 1. Can I retry a failed payment? + + Payment re-tries are not automated. You can manually re-initiate the payment for the same order id in case of a failed payment after 36 hours of initiating the previous payment. + + + +### 2. How many times can I retry a payment? + + You can manually re-initiate a payment for the same order id, repeatedly, every 36 hours, until the payment is successful. diff --git a/llm-content/payments/recurring-payments/cards/integrate.md b/llm-content/payments/recurring-payments/cards/integrate.md new file mode 100644 index 00000000..8772638d --- /dev/null +++ b/llm-content/payments/recurring-payments/cards/integrate.md @@ -0,0 +1,209 @@ +--- +title: Integrate Recurring Payments Using Cards +description: Know how to integrate Recurring Payments using Card as a payment method. +--- + +# Integrate Recurring Payments Using Cards + +In India, recurring payments were restrictive in the past because of the RBI's requirement for a two-step verification process where the customer required to enter a One-Time Password (OTP), received via email or SMS, to complete the payment. In recent times, due to the relaxation of this requirement, you can define the interval in which you can charge customers automatically. + + +### Tokenisation for Card based Recurring Payments + + To process recurring mandates, customer card details must be secured/tokenised in accordance with applicable laws. Razorpay Checkout explicitly collects customer consent for tokenising the card to process e-mandate/recurring transactions. + + ![Tokenisation for card based Recurring Payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/caw-checkout.gif.md) + + +Recurring Payment integration involves the following steps: + +1. [Register Card Mandate Registration](#1-register-card-mandate) +2. [Fetch Card Mandate Registration Details](#2-fetch-card-mandate-registration-details) +3. [Charge Customers](#3-charge-customers) + +## 1. Register Card Mandate + +Mandate registration is a process of creating a payment checkout form for customers to make **Authorisation Transaction** and register their card mandate. A token will be generated once a customer makes this transaction. + +Using this authorisation transaction, we can authenticate the customer's card mandate and ensure that we can charge them recurring payments. The authorisation transaction can be created using the following methods: + + + Following is the authorisation transaction flow for Razorpay Standard Checkout method. + + ![Authorisation transaction flow for Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/recurring-payments-authorization_transaction_standard_checkout.jpg.md) + + To create checkout form for customers to complete authorisation transaction using the Razorpay Standard Checkout method: + + +> **WARN** +> +> +> +> **Watch Out!** +> +> The authorisation transaction using Standard Checkout can be created only using Razorpay APIs. +> + + 1. [**Create a customer**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md#111-create-a-customer) +This returns a `customer_id`. + 2. [**Create an order**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md#112-create-an-order) +This returns an `order_id`. The order must be created for: + 3. [**Create authorisation transaction**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md#113-create-an-authorization-payment) +Pass the `customer_id`, `order_id` and a few additional parameters in your checkout to create the authorisation payment. The customer completes the authorisation payment, which generates a `token`. + + + + + Registration Links are securely generated web addresses that allow your customers to complete the authorisation transaction. Registration links can be sent via SMS or email. + + Following is the authorisation transaction flow for Razorpay registration link method: + + ![Recurring Payments Using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/recurring-payments-recurring_payments_registration_link.jpg.md) + + For customers to complete the authorisation transaction via a registration link, you should **Create a registration link and send it to your customer**. + + You can create a Registration Link using: + + - [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md#121-create-a-registration-link) + - [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link) + + The customer completes the authorisation payment, which generates a `token`. + + +> **INFO** +> +> +> +> **No Need to Create a Customer and Order Separately** +> +> If you use a registration link to create the authorisation transaction, Razorpay automatically creates a customer and the order for you. +> + + #### Registration Link Statuses + + A registration link moves through the following states during its life cycle: + +Status | Description | Webhook +--- +Issued | A registration Link is created and sent to the customer. | NA +--- +Paid | Payment is made for the issued registration Link. +Once the registration Link is paid, search for Token corresponding to the payment. | [invoice.paid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#invoice-paid) +--- +Cancelled | The registration link has been canceled. In such cases, you need to create a registration link again.| NA +--- +Expired | The registration link has expired. You can set an expiry timestamp at the time of creation. | [invoice.expired](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#invoice-expired) + + + + + + +### Authorisation Payment Statuses + + Once the customer has made the Authorisation Payment, it moves through the following states as per the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md): + +Status | Description | Webhook +--- +Created | Payment is created when a customer enters and submits the payment information. | NA +--- +Authorized | Payment is authorized when the customer’s payment details are successfully authenticated by the bank. | [payment.authorized](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized) +--- +Captured | Indicates that the payment is verified by you. +Once a payment is captured you can [retrieve the token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token). | [payment.captured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-captured) or [order.paid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#order-paid) +--- +Failed | Indicates that the payment has failed. +If the payment has failed, you need to [create an authorisation transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md) again. | [payment.failed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-failed) + + + +## 2. Fetch Card Mandate Registration Details + +This is a process of fetching the token that contains the registration details of the customer and checking its status. + +A token represents a mandate registration and is generated after the authorisation transaction is successfully captured. A token contains customer's payment details stored by Razorpay and is used to create a recurring payment. + +> **INFO** +> +> +> +> **Handy Tips** +> +> For simplicity, tokens are considered to be mandates. Hence, the status of the token determines the status of the mandate registration. +> + +You can search for the tokens using: + +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/tokens.md) +- [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/subscribe-to-webhooks.md#token-states) + + +### Token Statuses + + As the authorisation transaction moves through its different states, the token that is generated also undergoes state changes. Following is the life cycle of a token: + + ![Token life cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rec-pmnts-2_1_1_1.jpg.md) + + + + + Know more about the turnaround time (TAT) for cards from the [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/faqs.md). + + + +## 3. Charge Customers + +This is the process of charging customers the actual subsequent amount using the fetched token and customer details. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Subsequent payments can be charged without the need of any intervention from the customer. However, subsequent payments need to be created manually by you. +> +> - Once a token goes to the confirmed state, you can start creating recurring payments for the customer as per your business requirements. +> +> + +You can create subsequent payments using Dashboard or APIs. + + + To create subsequent payments using the Dashboard: + + 1. [**Search for the token and check its status**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) +After the authorisation transaction is complete, a token is generated. You can use the search feature on the Dashboard to find the required token and check its status. + 2. [**Charge the token**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#4-charge-the-token) +After you have found the required confirmed token, you can create a subsequent payment by charging the token according to your business needs. + + +> **INFO** +> +> +> +> **Order is Created Automatically** +> +> While creating a subsequent charge using the Dashboard, Razorpay automatically creates an order for you when you charge a token. There is no need to create an order separately. +> + + + + + + ![Charge customers using APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rec-pmnts-4_1.jpg.md) + + + To create subsequent payments using APIs: + + 1. [**Create a new Order**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-subsequent-payments.md#31-create-an-order-to-charge-the-customer) +Like any other payment, each subsequent payment is tied to a unique order id. Associating a payment with an order id makes it easier to query Razorpay systems and handle multiple payment attempts and, allows automatic capturing of payments. + 2. [**Create a Payment**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-subsequent-payments.md#32-create-a-recurring-payment) +Once the order is created, you can create a payment for it. +After our system validates the payment along with `token_id`, a `razorpay_payment_id` is returned. In some cases, the payment entity returned is in the created state and may take 1 working day for confirmation. + + +### Related Information +- [Supported Banks and Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/supported-banks.md) +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/apis.md) diff --git a/llm-content/payments/recurring-payments/cards/supported-banks.md b/llm-content/payments/recurring-payments/cards/supported-banks.md new file mode 100644 index 00000000..14ad7de0 --- /dev/null +++ b/llm-content/payments/recurring-payments/cards/supported-banks.md @@ -0,0 +1,2822 @@ +--- +title: Supported Banks and Apps +description: List of banks and apps that support recurring payments via Cards. +--- + +# Supported Banks and Apps + +Given below is the list of banks and apps that support recurring payments via Cards. + +Bank Name | Bank Code +--- +ICICI Bank | ICIC +--- +HDFC Bank | HDFC +--- +Axis Bank | UTIB +--- +State Bank of India | SBIN +--- +Hongkong & Shanghai Banking Corporation | HSBC +--- +Allahabad Bank | ALLA +--- +Andhra Bank | ANDB +--- +AU Small Finance Bank | AUBL +--- +Bank of Baroda | BARB +--- +Bank of India | BKID +--- +Bank of Maharashtra | MAHB +--- +Canara Bank | CNRB +--- +CITI Bank | CITI +--- +City Union Bank | CIUB +--- +Corporation Bank | CORP +--- +DCB Bank | DCBL +--- +Dena Bank | BKDN +--- +Equitas Small Finance Bank | ESFB +--- +Federal Bank | FDRL +--- +IDBI | IBKL +--- +IDFC FIRST Bank | IDFB +--- +Indian Bank | IDIB +--- +Indian Overseas Bank | IOBA +--- +Indusind Bank | INDB +--- +Jupiter | Fintechs +--- +Karnataka Bank | KARB +--- +Karur Vysya Bank | KVBL +--- +Kotak Mahindra Bank | KKBK +--- +Niyo Global Cards | Fintechs +--- +One Card | Fintechs +--- +Punjab National Bank | PUNB +--- +RazorpayX Corporate Cards | Fintechs +--- +RBL Bank | RATN +--- +SBM Bank | STCB +--- +Slice | Fintechs +--- +South Indian Bank | SIBL +--- +Standard Chartered Bank | SCBL +--- +State Bank of Mysore | SBMY +--- +Syndicate Bank | SYNB +--- +Union Bank of India | UBIN +--- +Vijaya Bank | VIJB +--- +Yes Bank | YESB + +> **WARN** +> +> +> **Watch Out!** +> +> - Please contact our support team if you are facing difficulties with card payments from any of the major banks on the above list. +> - Bank downtime can affect success rates when processing recurring payments via debit cards. +> + +> **INFO** +> +> +> **Handy Tips** +> +> We support Visa, Mastercard and RuPay cards of all major banks. +> + +## Fetch Supported Methods + +Use the below endpoint to fetch a list of supported card networks and banks available for recurring payments. + +/methods + +> **INFO** +> +> +> **[YOUR_KEY_ID] Required** +> +> To fire this API, you need to provide your [KEY_ID] for authorization. Your [KEY_SECRET] is not required and should not be passed. +> + +```curl: Request +curl -u [YOUR_KEY_ID] \ + -X GET https://api.razorpay.com/v1/methods +```json: Response +{ + "entity":"methods", + "card":true, + "debit_card":true, + "credit_card":true, + "prepaid_card":true, + "card_networks":{ + "AMEX":1, + "DICL":1, + "MC":1, + "MAES":1, + "VISA":1, + "JCB":1, + "RUPAY":1, + "BAJAJ":0 + }, + "card_subtype":{ + "consumer":1, + "business":1 + }, + "amex":true, + "netbanking":{ + "AUBL":"AU Small Finance Bank", + "AIRP":"Airtel Payments Bank", + "ANDB":"Andhra Bank", + "UTIB":"Axis Bank", + "BDBL":"Bandhan Bank", + "BBKM":"Bank of Bahrein and Kuwait", + "BARB_R":"Bank of Baroda - Retail Banking", + "VIJB":"Bank of Baroda - Retail Banking (Erstwhile Vijaya Bank)", + "BKID":"Bank of India", + "MAHB":"Bank of Maharashtra", + "BACB":"Bassein Catholic Co-operative Bank", + "CNRB":"Canara Bank", + "CSBK":"Catholic Syrian Bank", + "CBIN":"Central Bank of India", + "CIUB":"City Union Bank", + "COSB":"Cosmos Co-operative Bank", + "DCBL":"DCB Bank", + "DEUT":"Deutsche Bank", + "DBSS":"Development Bank of Singapore", + "DLXB":"Dhanlaxmi Bank", + "DLXB_C":"Dhanlaxmi Bank - Corporate Banking", + "ESAF":"ESAF Small Finance Bank", + "ESFB":"Equitas Small Finance Bank", + "FDRL":"Federal Bank", + "FSFB":"Fincare Small Finance Bank", + "HDFC":"HDFC Bank", + "HSBC":"HSBC", + "ICIC":"ICICI Bank", + "IBKL":"IDBI", + "IBKL_C":"IDBI - Corporate Banking", + "IDFB":"IDFC FIRST Bank", + "IDIB":"Indian Bank", + "ALLA":"Indian Bank (Erstwhile Allahabad Bank)", + "IOBA":"Indian Overseas Bank", + "INDB":"Indusind Bank", + "JAKA":"Jammu and Kashmir Bank", + "JSFB":"Jana Small Finance Bank", + "JSBP":"Janata Sahakari Bank (Pune)", + "KCCB":"Kalupur Commercial Co-operative Bank", + "KJSB":"Kalyan Janata Sahakari Bank", + "KARB":"Karnataka Bank", + "KVBL":"Karur Vysya Bank", + "KKBK":"Kotak Mahindra Bank", + "LAVB_C":"Lakshmi Vilas Bank - Corporate Banking", + "LAVB_R":"Lakshmi Vilas Bank - Retail Banking", + "MSNU":"Mehsana Urban Co-operative Bank", + "NKGS":"NKGSB Co-operative Bank", + "NSPB":"NSDL Payments Bank", + "NESF":"North East Small Finance Bank", + "ORBC":"PNB (Erstwhile-Oriental Bank of Commerce)", + "UTBI":"PNB (Erstwhile-United Bank of India)", + "PSIB":"Punjab & Sind Bank", + "PUNB_R":"Punjab National Bank - Retail Banking", + "RATN":"RBL Bank", + "RATN_C":"RBL Bank - Corporate Banking", + "ABNA":"Royal Bank of Scotland N.V.", + "SRCB":"Saraswat Co-operative Bank", + "SVCB_C":"Shamrao Vithal Bank - Corporate Banking", + "SVCB":"Shamrao Vithal Co-operative Bank", + "SIBL":"South Indian Bank", + "SCBL":"Standard Chartered Bank", + "SURY":"Suryoday Small Finance Bank", + "SYNB":"Syndicate Bank", + "TMBL":"Tamilnadu Mercantile Bank", + "TNSC":"Tamilnadu State Apex Co-operative Bank", + "TBSB":"Thane Bharat Sahakari Bank", + "TJSB":"Thane Janata Sahakari Bank", + "UCBA":"UCO Bank", + "UBIN":"Union Bank of India", + "CORP":"Union Bank of India (Erstwhile Corporation Bank)", + "VARA":"Varachha Co-operative Bank", + "YESB":"Yes Bank", + "YESB_C":"Yes Bank - Corporate Banking", + "ZCBL":"Zoroastrian Co-operative Bank" + }, + "wallet":{ + "mobikwik":true, + "payzapp":true, + "olamoney":true, + "airtelmoney":true, + "jiomoney":true, + "openwallet":true, + "phonepe":true + }, + "emi":true, + "upi":true, + "cardless_emi":[ + + ], + "paylater":{ + "epaylater":true, + "getsimpl":true, + "icic":true, + "hdfc":true, + "lazypay":true + }, + "google_pay_cards":false, + "app":{ + "cred":0, + "twid":0 + }, + "gpay":false, + "emi_types":{ + "credit":true, + "debit":true + }, + "debit_emi_providers":{ + "HDFC":0 + }, + "nach":true, + "cod":false, + "bank_transfer":true, + "emi_subvention":"customer", + "emi_plans":{ + "KKBK":{ + "min_amount":300000, + "plans":{ + "3":12, + "6":12, + "9":14, + "12":14, + "18":15, + "24":15 + } + }, + "UTIB":{ + "min_amount":300000, + "plans":{ + "3":13, + "6":13, + "9":14, + "12":14, + "18":15, + "24":15 + } + }, + "INDB":{ + "min_amount":200000, + "plans":{ + "3":13, + "6":13, + "9":13, + "12":12, + "18":12, + "24":12 + } + }, + "RATN":{ + "min_amount":100000, + "plans":{ + "3":13, + "6":14, + "9":15, + "12":15, + "18":15, + "24":15 + } + }, + "HDFC":{ + "min_amount":300000, + "plans":{ + "18":15, + "24":15, + "3":15, + "6":15, + "9":15, + "12":15 + } + }, + "SCBL":{ + "min_amount":250000, + "plans":{ + "3":13, + "6":13, + "9":14, + "12":14 + } + }, + "BARB":{ + "min_amount":250000, + "plans":{ + "3":13, + "6":13, + "9":13, + "12":13, + "18":15, + "24":15 + } + }, + "ICIC":{ + "min_amount":150000, + "plans":{ + "3":12.99, + "6":13.99, + "9":13.99, + "12":13.99, + "24":14.99, + "18":14.99 + } + }, + "YESB":{ + "min_amount":150000, + "plans":{ + "18":15, + "24":15, + "9":14, + "3":14, + "6":14, + "12":15 + } + }, + "CITI":{ + "min_amount":250000, + "plans":{ + "3":13, + "6":13, + "9":15, + "12":15, + "18":15, + "24":15 + } + }, + "AMEX":{ + "min_amount":500000, + "plans":{ + "3":14, + "6":14, + "9":14, + "12":14, + "18":14, + "24":14 + } + }, + "onecard":{ + "min_amount":300000, + "plans":{ + "3":16, + "6":16, + "9":16, + "12":16, + "18":16, + "24":16 + } + }, + "HSBC":{ + "min_amount":200000, + "plans":{ + "3":12.5, + "6":12.5, + "9":13.5, + "12":13.5, + "18":13.5 + } + } + }, + "emi_options":{ + "KKBK":[ + { + "duration":3, + "interest":12, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"1.97" + }, + { + "duration":6, + "interest":12, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"3.41" + }, + { + "duration":9, + "interest":14, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"5.59" + }, + { + "duration":12, + "interest":14, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"7.19" + }, + { + "duration":18, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"10.95" + }, + { + "duration":24, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"14.07" + } + ], + "UTIB":[ + { + "duration":3, + "interest":12, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"1.97" + }, + { + "duration":6, + "interest":12, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"3.41" + }, + { + "duration":9, + "interest":13, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"5.21" + }, + { + "duration":12, + "interest":13, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"6.70" + }, + { + "duration":18, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"10.95" + }, + { + "duration":24, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"14.07" + }, + { + "duration":3, + "interest":13, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"2.13" + }, + { + "duration":6, + "interest":13, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"3.68" + }, + { + "duration":9, + "interest":14, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"5.59" + }, + { + "duration":12, + "interest":14, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"7.19" + } + ], + "INDB":[ + { + "duration":3, + "interest":13, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"2.13" + }, + { + "duration":6, + "interest":13, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"3.68" + }, + { + "duration":9, + "interest":13, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"5.21" + }, + { + "duration":12, + "interest":13, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"6.70" + }, + { + "duration":18, + "interest":15, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"10.95" + }, + { + "duration":24, + "interest":15, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"14.07" + }, + { + "duration":3, + "interest":13, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"2.13" + }, + { + "duration":6, + "interest":13, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"3.68" + }, + { + "duration":9, + "interest":13, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"5.21" + }, + { + "duration":12, + "interest":12, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"6.21" + }, + { + "duration":18, + "interest":12, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"8.90" + }, + { + "duration":24, + "interest":12, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"11.49" + } + ], + "RATN":[ + { + "duration":3, + "interest":13, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"2.13" + }, + { + "duration":6, + "interest":13, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"3.68" + }, + { + "duration":9, + "interest":13, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"5.21" + }, + { + "duration":12, + "interest":13, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"6.70" + }, + { + "duration":18, + "interest":13, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"9.59" + }, + { + "duration":24, + "interest":13, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"12.36" + }, + { + "duration":6, + "interest":14, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"3.96" + }, + { + "duration":9, + "interest":15, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"5.97" + }, + { + "duration":12, + "interest":15, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"7.67" + }, + { + "duration":18, + "interest":15, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"10.95" + }, + { + "duration":24, + "interest":15, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"14.07" + } + ], + "HDFC":[ + { + "duration":18, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"10.95" + }, + { + "duration":24, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"14.07" + }, + { + "duration":3, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"2.45" + }, + { + "duration":6, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"4.23" + }, + { + "duration":9, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"5.97" + }, + { + "duration":12, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"7.67" + } + ], + "SCBL":[ + { + "duration":3, + "interest":13, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"2.13" + }, + { + "duration":6, + "interest":13, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"3.68" + }, + { + "duration":9, + "interest":14, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"5.59" + }, + { + "duration":12, + "interest":14, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"7.19" + } + ], + "BARB":[ + { + "duration":3, + "interest":13, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"2.13" + }, + { + "duration":6, + "interest":13, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"3.68" + }, + { + "duration":9, + "interest":13, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"5.21" + }, + { + "duration":12, + "interest":13, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"6.70" + }, + { + "duration":18, + "interest":15, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"10.95" + }, + { + "duration":24, + "interest":15, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"14.07" + } + ], + "ICIC":[ + { + "duration":3, + "interest":12.99, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"2.13" + }, + { + "duration":6, + "interest":13.99, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"3.96" + }, + { + "duration":9, + "interest":13.99, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"5.59" + }, + { + "duration":12, + "interest":13.99, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"7.18" + }, + { + "duration":24, + "interest":14.99, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"14.06" + }, + { + "duration":18, + "interest":14.99, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"10.94" + } + ], + "YESB":[ + { + "duration":18, + "interest":15, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"10.95" + }, + { + "duration":24, + "interest":15, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"14.07" + }, + { + "duration":9, + "interest":14, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"5.59" + }, + { + "duration":3, + "interest":14, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"2.29" + }, + { + "duration":6, + "interest":14, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"3.96" + }, + { + "duration":12, + "interest":15, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"7.67" + } + ], + "CITI":[ + { + "duration":3, + "interest":13, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"2.13" + }, + { + "duration":6, + "interest":13, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"3.68" + }, + { + "duration":9, + "interest":15, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"5.97" + }, + { + "duration":12, + "interest":15, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"7.67" + }, + { + "duration":18, + "interest":15, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"10.95" + }, + { + "duration":24, + "interest":15, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"14.07" + } + ], + "AMEX":[ + { + "duration":3, + "interest":14, + "subvention":"customer", + "min_amount":500000, + "merchant_payback":"2.29" + }, + { + "duration":6, + "interest":14, + "subvention":"customer", + "min_amount":500000, + "merchant_payback":"3.96" + }, + { + "duration":9, + "interest":14, + "subvention":"customer", + "min_amount":500000, + "merchant_payback":"5.59" + }, + { + "duration":12, + "interest":14, + "subvention":"customer", + "min_amount":500000, + "merchant_payback":"7.19" + }, + { + "duration":18, + "interest":14, + "subvention":"customer", + "min_amount":500000, + "merchant_payback":"10.27" + }, + { + "duration":24, + "interest":14, + "subvention":"customer", + "min_amount":500000, + "merchant_payback":"13.22" + } + ], + "onecard":[ + { + "duration":3, + "interest":16, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"2.61" + }, + { + "duration":6, + "interest":16, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"4.51" + }, + { + "duration":9, + "interest":16, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"6.35" + }, + { + "duration":12, + "interest":16, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"8.15" + }, + { + "duration":18, + "interest":16, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"11.62" + }, + { + "duration":24, + "interest":16, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"14.90" + } + ], + "HSBC":[ + { + "duration":3, + "interest":12.5, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"2.05" + }, + { + "duration":6, + "interest":12.5, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"3.55" + }, + { + "duration":9, + "interest":13.5, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"5.40" + }, + { + "duration":12, + "interest":13.5, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"6.94" + }, + { + "duration":18, + "interest":13.5, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"9.93" + } + ] + }, + "recurring":{ + "card":{ + "credit":[ + "MasterCard", + "Visa" + ], + "debit":{ + "CITI":"CITI Bank", + "CNRB":"Canara Bank", + "CIUB":"City Union Bank", + "ESFB":"Equitas Small Finance Bank", + "HSBC":"HSBC", + "ICIC":"ICICI Bank", + "KVBL":"Karur Vysya Bank", + "KKBK":"Kotak Mahindra Bank" + } + }, + "emandate":{ + "APGB":{ + "auth_types":[ + "netbanking" + ], + "name":"Andhra Pragathi Grameena Bank" + }, + "UTIB":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Axis Bank" + }, + "BDBL":{ + "auth_types":[ + "netbanking" + ], + "name":"Bandhan Bank" + }, + "BARB_R":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Bank of Baroda - Retail Banking" + }, + "MAHB":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Bank of Maharashtra" + }, + "CITI":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"CITI Bank" + }, + "CNRB":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Canara Bank" + }, + "CSBK":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Catholic Syrian Bank" + }, + "CBIN":{ + "auth_types":[ + "netbanking", + "aadhaar" + ], + "name":"Central Bank of India" + }, + "CIUB":{ + "auth_types":[ + "netbanking", + "aadhaar" + ], + "name":"City Union Bank" + }, + "COSB":{ + "auth_types":[ + "netbanking", + "aadhaar" + ], + "name":"Cosmos Co-operative Bank" + }, + "DCBL":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"DCB Bank" + }, + "DEUT":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Deutsche Bank" + }, + "DBSS":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Development Bank of Singapore" + }, + "DLXB":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Dhanlaxmi Bank" + }, + "ESFB":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Equitas Small Finance Bank" + }, + "FDRL":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Federal Bank" + }, + "HDFC":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"HDFC Bank" + }, + "HSBC":{ + "auth_types":[ + "netbanking", + "aadhaar" + ], + "name":"HSBC" + }, + "ICIC":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"ICICI Bank" + }, + "IBKL":{ + "auth_types":[ + "netbanking", + "aadhaar" + ], + "name":"IDBI" + }, + "IDFB":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"IDFC FIRST Bank" + }, + "IDIB":{ + "auth_types":[ + "netbanking" + ], + "name":"Indian Bank" + }, + "IOBA":{ + "auth_types":[ + "netbanking" + ], + "name":"Indian Overseas Bank" + }, + "INDB":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Indusind Bank" + }, + "JSFB":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Jana Small Finance Bank" + }, + "JIOP":{ + "auth_types":[ + "netbanking" + ], + "name":"Jio Payments Bank" + }, + "KARB":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Karnataka Bank" + }, + "KVGB":{ + "auth_types":[ + "netbanking" + ], + "name":"Karnataka Vikas Grameena Bank" + }, + "KVBL":{ + "auth_types":[ + "netbanking", + "aadhaar" + ], + "name":"Karur Vysya Bank" + }, + "KKBK":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Kotak Mahindra Bank" + }, + "PYTM":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Paytm Payments Bank" + }, + "PSIB":{ + "auth_types":[ + "netbanking" + ], + "name":"Punjab & Sind Bank" + }, + "PUNB_R":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Punjab National Bank - Retail Banking" + }, + "RATN":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"RBL Bank" + }, + "SIBL":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"South Indian Bank" + }, + "SCBL":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Standard Chartered Bank" + }, + "SBIN":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"State Bank of India" + }, + "TMBL":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Tamilnadu Mercantile Bank" + }, + "UCBA":{ + "auth_types":[ + "netbanking", + "aadhaar" + ], + "name":"UCO Bank" + }, + "UJVN":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Ujjivan Small Finance Bank" + }, + "UBIN":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Union Bank of India" + }, + "VARA":{ + "auth_types":[ + "netbanking", + "aadhaar" + ], + "name":"Varachha Co-operative Bank" + }, + "YESB":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Yes Bank" + }, + "ABHY":{ + "auth_types":[ + "aadhaar" + ], + "name":"Abhyudaya Co-operative Bank" + }, + "APSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Adarniya P.d. Patilsaheb Sahakari Bank" + }, + "ACUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Adarsh Co-operative Urban Bank" + }, + "TACX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Adinath Co-operative Bank" + }, + "SATX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Adv.shamraoji Shinde Satyashodhak Bank" + }, + "AGCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Agrasen Co-operative Urban Bank" + }, + "AHUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ahilyadevi Urban Co-operative Bank Limited Solapur" + }, + "ADBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ahmedabad District Co-operative Bank" + }, + "AMCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ahmedabad Mercantile Co-operative Bank" + }, + "AHMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ahmednagar District Central Co-operative Bank" + }, + "AUCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ajara Urban Co-operative Bank" + }, + "AACX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Akhand Anand Co.op Bank" + }, + "AJKB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Akola Janata Commercial Co-operative Bank" + }, + "ALAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Alavi Co-operative Bank" + }, + "ALLX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Allahabad District Co-operative Bank" + }, + "AMAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Aman Sahakari Bank" + }, + "AJPX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ambajogai Peoples Co-operative Bank" + }, + "AJSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ambarnath Jai-hind Co-operative Bank" + }, + "AVDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Amravati District Central Co-operative Bank" + }, + "AMRX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Amreli Jilla Madhyastha Sahakari Bank" + }, + "TAMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Anand Mercantile Co-operative Bank" + }, + "ANSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Andaman & Nicobar State Co-operative Bank" + }, + "APGX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Andhra Pradesh Grameena Vikas Bank" + }, + "APBL":{ + "auth_types":[ + "aadhaar" + ], + "name":"Andhra Pradesh State Co-operative Bank" + }, + "ACKX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Annasaheb Chougule Urban Co-operative Bank" + }, + "ASKX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Arvind Sahakari Bank" + }, + "ASHX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ashta People's Co-operative Bank" + }, + "BUZX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Badaun Zila Sahkari Bank" + }, + "BKDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Banaskantha Dist Central Co-operative Bank" + }, + "BMPX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Banaskantha Mercantile Co-operative Bank" + }, + "BDUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Banda Urban Co-operative Bank" + }, + "TBMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bapunagar Mahila Co-operative Bank" + }, + "BSBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Baramati Sahakari Bank" + }, + "BARX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Baroda City Co-operative Bank" + }, + "BNBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Betul Nagrik Sahakari Bank Mydt" + }, + "BHDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bhadohi Urban Co-operative Bank Gyanpur" + }, + "BNSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bhagini Nivedita Sahakari Bank" + }, + "BHAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bhagyodaya Co-operative Bank" + }, + "BCBM":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bharat Co-operative Bank" + }, + "BKCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bhavasara Kshatriya Co-operative Bank" + }, + "BHUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bhilwara Urban Co-operative Bank" + }, + "BBLX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bhingar Urban Co-operative Bank" + }, + "BHCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bhuj Commercial Co-operative Bank" + }, + "BHJX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bhuj Mercentile Co-operative Bank" + }, + "TBSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bihar State Co-operative Bank" + }, + "BJUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bijnor Urban Co-operative Bank" + }, + "BMCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bombay Mercantile Co-operative Bank" + }, + "BORX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Boral Union Co-operative Bank" + }, + "BRMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bramhapuri Urban Co-operative Bank" + }, + "BURX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Burdwan Central Co-operative Bank" + }, + "CALX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Calicut Co-operative Urban Bank" + }, + "CBHX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Central Co-operative Bank Bhilwara" + }, + "CHBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Chamba Urban Co-operative Bank Chamba" + }, + "CSBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Chartered Sahakari Bank Niyamitha" + }, + "CJAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Citizens' Co-operative Bank Jammu" + }, + "CMLX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Commercial Co-operative Bank" + }, + "DHUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Dahod Urban Co-operative Bank" + }, + "DENS":{ + "auth_types":[ + "aadhaar" + ], + "name":"Delhi Nagrik Sehkari Bank" + }, + "TDMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Dhanera Mercantile Co-operative Bank" + }, + "DSUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Dharamvir Sambhaji Urban Co-operative Bank" + }, + "DNSB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Dombivli Nagari Sahakari Bank" + }, + "DBAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Dr Babasaheb Ambedkar Sahakari Bank Nasik" + }, + "ABDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Dr. Ambedkar Nagrik Sahakari Bank Mydt Gwalior" + }, + "DSPX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Durgapur Steel Peoples' Co-operative Bank" + }, + "EUCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Etah Urban Co-operative Bank" + }, + "FINX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Financial Co-operative Bank" + }, + "GPCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Gandevi People's Co-operative Bank" + }, + "GNCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Gandhi Co-operative Urban Bank" + }, + "GHPX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ghatal Peoples' Co-operative Bank" + }, + "GUCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Goa Urban Co-operative Bank" + }, + "PJSB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Gopinath Patil Parsik Janata Sahakari Bank" + }, + "GRAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Grain Merchants' Co-operative Bank" + }, + "GACX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Gujarat Ambuja Co-operative Bank" + }, + "GSCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Gujarat State Co-operative Bank" + }, + "GCBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Guruvayur Co-operative Urban Bank" + }, + "HAMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Hamirpur District Co-operative Bank" + }, + "HSDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Hassan District Co-operative Central Bank" + }, + "HMNX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Himatnagar Nagarik Sahakari Bank" + }, + "IMPX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Imphal Urban Co-operative Bank" + }, + "ITDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Income Tax Dept Co-operative Bank" + }, + "ICMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Indore Cloth Market Co-operative Bank" + }, + "IPSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Indore Paraspar Sahakari Bank" + }, + "IPCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Indore Premier Co-operative Bank Indore" + }, + "ICBL":{ + "auth_types":[ + "aadhaar" + ], + "name":"Industrial Co-operative Bank" + }, + "ITCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Irinjalakuda Town Co-operative Bank" + }, + "XJKG":{ + "auth_types":[ + "aadhaar" + ], + "name":"J&K Grameen Bank" + }, + "JPCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Jalgaon Peoples Co-operative Bank" + }, + "JMCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Jalna Merchants Co-operative Bank" + }, + "TJNX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Jamnagar Mahila Sahakari Bank" + }, + "JASB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Janaseva Sahakari Bank (Borivli)" + }, + "JSBP":{ + "auth_types":[ + "aadhaar" + ], + "name":"Janata Sahakari Bank (Pune)" + }, + "JSMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Janata Sahakari Bank Amravati" + }, + "JHAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Jharneshwar Nagrik Sahakari Bank Maryadit" + }, + "JVCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Jivan Commercial Co-operative Bank" + }, + "JODX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Jodhpur Central Co-operative Bank" + }, + "JONX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Jodhpur Nagrik Sahakari Bank" + }, + "KALX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Kalna Town Credit Co-operative Bank" + }, + "KNBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Kalol Nagarik Sahakari Bank" + }, + "KAMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Kamala Co-operative Bank Solapur" + }, + "KKMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Kankaria Mainagar Nagrik Sahakari Bank" + }, + "KSCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Karnataka State Co-operative Apex Bank" + }, + "KRNX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Karnavati Co-operative Bank" + }, + "KVCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Kavita Urban Co-operative Bank" + }, + "KHUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Khamgaon Urban Co-operative Bank" + }, + "KUCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Kolhapur Urban Co-operative Bank" + }, + "KTBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Kottayam District Co-operative Bank" + }, + "KDCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Kozhikode District Co-operative Bank" + }, + "KMCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Krishna Mercantile Co-operative Bank" + }, + "LATX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Latur Urban Co-operative Bank Latur" + }, + "LBMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Laxmibai Mahila Nagrik Sahakari Bank Maradit" + }, + "LKMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Lokmangal Co-operative Bank Solapur" + }, + "MSCI":{ + "auth_types":[ + "aadhaar" + ], + "name":"Maharashtra State Co-operative Bank" + }, + "MVCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Mahaveer Co-operative Bank" + }, + "MAKX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Makarpura Industrial Estate Co-operative Bank" + }, + "MSBL":{ + "auth_types":[ + "aadhaar" + ], + "name":"Malad Sahakari Bank" + }, + "MPDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Malappuram District Co-operative Bank" + }, + "MABL":{ + "auth_types":[ + "aadhaar" + ], + "name":"Malleshwaram Co-operative Bank" + }, + "MALX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Malviya Urban Co-operative Bank" + }, + "MSCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Manipur State Co-operative Bank" + }, + "MSOX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Manorama Co-operative Bank Solapur" + }, + "MGCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Mansing Co-operative Bank" + }, + "MRTX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Maratha Co-operative Bank" + }, + "MYAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Meghalaya Co-operative Apex Bank" + }, + "MSNX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Mehsana District Central Co-operative Bank" + }, + "MLCG":{ + "auth_types":[ + "aadhaar" + ], + "name":"Merchants Liberal Co-operative Bank" + }, + "MZCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Mizoram Urban Co-operative Development Bank" + }, + "TMSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Modasa Nagarik Sahkari Bank" + }, + "MDEX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Model Co-operative Bank" + }, + "MPCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Moirang Primary Co-operative Bank" + }, + "MUSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Muslim Co-operative Bank" + }, + "NCCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nabadwip Co-operative Credit Bank" + }, + "NGRX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nagar Sahkari Bank" + }, + "NVSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nagar Vikas Sahkari Bank" + }, + "NSIX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nagrik Sahakari Bank Indore" + }, + "NBMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nagrik Sahakari Bank, Vidisha" + }, + "NTBL":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nainital Bank" + }, + "TNMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nanded Merchants Co-operative Bank Nanded" + }, + "NJSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nasik Jilha Mahila Sahakari Bank" + }, + "NMCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nasik Merchants Co-operative Bank" + }, + "NBBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"National Co-operative Bank Bangalore" + }, + "NJCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nav Jeevan Co-operative Bank" + }, + "NMCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Navi Mumbai Co-operative Bank" + }, + "NAVX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Navnirman Co-operative Bank" + }, + "NAWX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nawanagar Co-operative Bank" + }, + "TNKX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Neela Krishna Co-operative Urban Bank" + }, + "NICB":{ + "auth_types":[ + "aadhaar" + ], + "name":"New India Co-operative Bank" + }, + "OMCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ojhar Merchant's Co-operative Bank" + }, + "ONSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Omkar Nagreeya Sahkari Bank" + }, + "OSMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Osmanabad Janata Sahakari Bank" + }, + "PALX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Pali Urban Co-operative Bank" + }, + "PLUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Palus Sahakari Bank" + }, + "PDUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Pandharpur Urban Co-operative Bank" + }, + "PASX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Paschim Banga Gramin Bank" + }, + "PCBL":{ + "auth_types":[ + "aadhaar" + ], + "name":"Patan Co-operativeeartive Bank" + }, + "PTSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Patan Nagarik Sahakari Bank" + }, + "PATX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Pathanmthitta District Co-operative Bank" + }, + "PUBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Peoples Urban Co-operative Bank" + }, + "PCUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Pochampally Co-operative Urban Bank" + }, + "PMEC":{ + "auth_types":[ + "aadhaar" + ], + "name":"Prime Co-operative Bank" + }, + "PCTX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Pune Cantonment Sahakari Bank" + }, + "PPBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Pune People's Co-operative Bank" + }, + "RECX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Railway Employees Co-operative Banking Society" + }, + "RCUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Rajadhani Co-operative Urban Bank" + }, + "RBBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Rajarambapu Sahakari Bank Peth" + }, + "RACX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Rajkot Commercial Co-operative Bank" + }, + "RAKX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Rajkot Peoples Co-operative Bank" + }, + "RRSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ramrajya Sahakari Bank" + }, + "REBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Rendal Sahakari Bank Rendal" + }, + "SKUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"S S L S A Kurundwad Urban Bank" + }, + "SADX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sabarkantha District Central Co-operative Bank" + }, + "SSKX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sadhana Sahakari Bank" + }, + "SASA":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sahyadri Sahakari Bank" + }, + "SPSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sandur Pattana Souharda Sahakari Bank Niyamitha" + }, + "SISX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sanmati Sahakari Bank" + }, + "SNGX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sarangpur Co-operative Bank" + }, + "SNAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Saraspur Nagarik Co-operative Bank" + }, + "SRCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Saraswat Co-operative Bank" + }, + "SAVX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sardar Vallabhbhai Sahakari Bank" + }, + "SACX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sarvodaya Co-operative Bank Mumbai" + }, + "SNBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sarvodaya Nagrik Sahkari Bank" + }, + "SDSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Satara District Central Co-operative Bank" + }, + "TSUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Saurashtra Co-operative Bank" + }, + "SVCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shamrao Vithal Co-operative Bank" + }, + "SHCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shimla Urban Co-operative Bank" + }, + "SPCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shirpur Peoples Co-operative Bank" + }, + "SSBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shivdaulat Sahakari Bank" + }, + "SBUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shree Balaji Urban Co-operative Bank" + }, + "KDIX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shree Kadi Nagarik Sahakari Bank" + }, + "SMNX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shree Mahuva Nagrik Sahakari Bank" + }, + "HPCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shree Parswanath Co-operative Bank" + }, + "ADCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shri Adinath Co-operative Bank" + }, + "SCNX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shri Chhani Nagrik Sahkari Bank" + }, + "SMUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shri Mahavir Urban Co-operative Bank" + }, + "SEWX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shri Mahila Sewa Sahakari Bank" + }, + "VCCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shri Veershaiv Co-operative Bank" + }, + "SKCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shrikrishna Co-operative Bank" + }, + "SNDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sind Co-operative Urban Bank" + }, + "SDCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sindhudurg District Central Co-operative Bank" + }, + "SIRX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sircilla Co-operative Urban Bank" + }, + "SDHX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Solapur Siddheshwar Sahakari Bank" + }, + "SONX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sonbhadra Nagar Sahkari Bank" + }, + "SNCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sonepat Urban Co-operative Bank" + }, + "SCUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sudha Co-operative Urban Bank" + }, + "SDCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Surat District Co-operative Bank" + }, + "SUMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Surat Mercantile Co-operative Bank" + }, + "SPCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Surat People's Co-operative Bank" + }, + "SUTB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sutex Co-operative Bank" + }, + "TJSB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Thane Janata Sahakari Bank" + }, + "TUCL":{ + "auth_types":[ + "aadhaar" + ], + "name":"The Union Co-operative Bank Mahinagar" + }, + "TTUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Tirur Urban Co-operative Bank" + }, + "TCUB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Trivandrum Co-operative Urban Bank" + }, + "TGMB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Tumkur Grain Merchant's Co-operativeerate Bank" + }, + "UCCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Udaipur Central Co-operative Bank" + }, + "UMAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Uma Co-operative Bank" + }, + "UNSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Unava Nagrik Sahakari Bank" + }, + "TUNX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Union Co-operative Bank" + }, + "UBBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Urban Co-operative Bank Basti" + }, + "UCDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Urban Co-operative Bank Dehradun" + }, + "UROX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Urban Co-operative Bank Rourkela" + }, + "UBGX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Uttar Bihar Gramin Bank" + }, + "VUCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Vaidyanath Urban Co-operative Bank" + }, + "VVCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Vallabh Vidyanagar Commercial Bank" + }, + "VERX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Veraval Mercantile Co-operative Bank" + }, + "TVPX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Veraval Peoples Co-operative Bank" + }, + "WKGX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Vidharbha Kokan Gramin Bank" + }, + "VSBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Vidya Sahakari Bank" + }, + "VSCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Vikas Souharda Co-operative Bank" + }, + "VIKX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Vikramaditya Nagrik Sahakari Bank" + }, + "VCBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Vishwas Co-operative Bank" + }, + "WAIX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Wai Urban Co-operative Bank" + }, + "YLNX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Yadagiri Lakshmi Narsimha Swamy Co-operative Urban Bank " + }, + "AUBL":{ + "auth_types":[ + "debitcard" + ], + "name":"AU Small Finance Bank" + }, + "BKID":{ + "auth_types":[ + "debitcard" + ], + "name":"Bank of India" + }, + "CNSX":{ + "auth_types":[ + "debitcard" + ], + "name":"Chembur Nagarik Sahakari Bank" + }, + "SHIX":{ + "auth_types":[ + "debitcard" + ], + "name":"Shivalik Mercantile Co-operative Bank" + } + }, + "upi":true, + "nach":true + }, + "upi_intent":true +} +``` + +### Related Information +- [Integrate Recurring Payments Using Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/integrate.md) +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/apis.md) diff --git a/llm-content/payments/recurring-payments/create.md b/llm-content/payments/recurring-payments/create.md new file mode 100644 index 00000000..6105abf0 --- /dev/null +++ b/llm-content/payments/recurring-payments/create.md @@ -0,0 +1,284 @@ +--- +title: Create a Recurring Payment +description: Know how to create a recurring payments using the Razorpay Dashboard. +--- + +# Create a Recurring Payment + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +To create a recurring payment: + +1. [Create a registration link](#1-create-a-registration-link) +2. [View the payment status](#2-view-the-payment-status) +3. [Search for the token](#3-search-for-the-token) +4. [Charge the token](#4-charge-the-token) + +> **INFO** +> +> +> +> **Handy Tips** +> +> Unlike integrating recurring payments from APIs, you do not have to create the order or the customer separately while integrating from the Dashboard. The customer will be added when creating a registration link and an order will be created when the customer makes the authentication payment. +> + +## 1. Create a Registration Link + +To create a registration link: +1. Log in to the Dashboard. +1. Under **PAYMENT PRODUCTS**, navigate to **Subscription** → **Registration Links**. +1. Click **+Create New Link** and follow the on-screen instructions. + +The registration link is sent to the customer. Once a customer successfully makes the authorisation payment, you need to wait for the payment to reach the `captured` state. + +> **INFO** +> +> +> +> **Create Registration Links via APIs** +> +> You can create registration links using APIs. Refer to the [API section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) for more details. +> + +### Registration Link Fields + +The below table lists and gives a brief description of the various fields available when creating a registration link from the Dashboard. + +`Description` _mandatory_ +: A brief description of the registration link. + +`Customer Name` _optional_ +: Name of the customer. If you have already created a customer via APIs, you must enter the same Customer Name here. + +`Customer Contact` _mandatory_ +: Phone number and email address of the customer. If you have already created a customer via APIs, you must enter the same email address and phone number here. + +`Notify` _optional_ +: There are two ways in which you can send notifications: + - **SMS** + - **Email** + +`Receipt No.` _optional_ +: A user-entered unique identifier for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`Registration Link Expiry` _optional_ +: The expiry date of the link. Defaults to **No Expire**. + +`Payment Method` _mandatory_ +: The payment method to make the authentication payment. Available options: + - Card + - Emandate + - UPI + - NACH + + `Card` + : Details to be filled when you select **Card** as the payment method. + + `Authorisation Amount` _mandatory_ + : The payment amount. For **Card**, the minimum amount is ₹1. + + `Billing Frequency` _mandatory_ + : The frequency at which the amount should be charged. Possible values: + - `Weekly` + - `Monthly` + - `Yearly` + + `Expiry of Token` _optional_ + : Specifies the expiry date for the token. That is, the duration for which you can charge the customer using the authorised payment method. The maximum value you can set is 30 years from the current date. Any value beyond this will throw an error. + + `Maximum Auto-debit Amount`_mandatory_ + : The maximum amount that has to be auto-debited. This is applicable only for domestic cards. + + +> **WARN** +> +> +> **Watch Out!** +> +> You can automatically charge the customer up to ₹15,000 for each recurring payment. Any amount greater than this requires an OTP verification from the customer. +> + + `Emandate` + : Details to be filled when you select **Emandate** as the payment method. + + `Skip Bank Details` _optional_ + : Select this option if you do not want to pre-fill bank details in the registration link. + + `Bank Details` + : The customer's bank details. + + `Select Bank` _mandatory_ + : Select the customer's bank. + + `IFSC` _mandatory_ + : Enter the customer's bank IFSC. + + `Account Details` + : Customer's account details. + + `Beneficiary Name` _mandatory_ + : Customer's name. + + `Account Number` _mandatory_ + : Customer's account number. + + `Select Account Type` _mandatory_ + : Customer's bank account type. + + `Expiry of Token` _optional_ + : Specifies the expiry date for the token. That is, the duration for which you can charge the customer using the authorised payment method. The maximum value you can set is 30 years from the current date. Any value beyond this will throw an error. + + `Maximum Billing Amount` _optional_ + : The maximum amount you can charge the customer once the authorisation transaction is completed. + - Defaults to ₹1 lakh. + - Maximum amount is ₹1 crore. + + `First Charge Amount` _optional_ + : The payment amount. For **Emandate**, the authorisation amount is ₹0. However, you can choose to auto-charge the customer an initial payment immediately after authorisation by entering any amount greater than ₹0. For example, if you enter ₹1,000, the customer is auto-charged ₹1,000 as soon as the token is confirmed. + + `UPI` + : Details to be filled when you select **Card** as the payment method. + + `Authorisation Amount` _optional_ + : The payment amount. For **Card**, the minimum amount is ₹1. + + `Billing Frequency` _mandatory_ + : The frequency at which the amount should be charged. Possible values: + - `Daily` + - `Weekly` + - `Fortnightly` + - `Bimonthly` + - `Monthly` + - `Quarterly` + - `Half Yearly` + - `Yearly` + - `As and when presented` + + `Expiry of Token` _optional_ + : Specifies the expiry date for the token. That is, the duration for which you can charge the customer using the authorised payment method. Defaults to 10 years. + + `Maximum Billing Amount` _optional_ + : The maximum amount you can charge the customer once the authorisation transaction is completed. + - Defaults to ₹2,00,000. + - Maximum amount is ₹2,00,000. + + `NACH` + : Details to be filled when you select Nach as the payment method. + + `Bank Details`_mandatory_ + : The customer's bank IFSC. + + `Account Details` + : Customer's account details. + + `Beneficiary Name` _mandatory_ + : Customer's name. + + `Account Number` _mandatory_ + : Customer's account number. + + `Bank Account Type` _mandatory_ + : The customer's bank account type. Available options: + - savings + - current + + `Reference 1` _optional_ + : A user-entered reference for the NACH form. + + `Reference 2` _optional_ + : A user-entered reference for the NACH form. + + `Expiry of Token` _optional_ + : Specifies the expiry date for the token. That is, the duration for which you can charge the customer using the authorised payment method. The maximum value you can set is 30 years from the current date. + + `Maximum Billing Amount` _optional_ + : The maximum amount you can charge the customer once the authorisation transaction is completed. + - Defaults to ₹1 lac. + - Maximum amount is ₹1cr. + + `First Charge Amount` _mandatory_ + : The payment amount. For **NACH**, the authorisation amount is ₹0. However, you can choose to auto-charge the customer an initial payment immediately after authorisation by entering any amount greater than ₹0. For example, if you enter ₹1,000, the customer is auto-charged ₹1,000 as soon as the token is confirmed. + + `Internal Notes` _optional_ + : User-entered notes for internal reference. + +## 2. View the Payment Status + +When an authorisation payment is `created`, the corresponding `payment_id` appears on the list of created payments along with an `order_id`. + +Watch the below video to know how to check the payment status from the Dashboard. + +[Video: https://www.youtube.com/embed/-jw7xjpJakU] + +To view the status of a recurring payment: +1. Log in to the Dashboard. +1. Under **PAYMENT PRODUCTS**, navigate to **Subscription** → **Payments**. You can view the payment status on the screen. Click a `payment_id` to view details of the payment. + +## 3. Search for the Token + +Tokens are not returned as part of the checkout response. However, you can view them on the Dashboard. You can also view the details of the token using APIs or Webhooks. + +Watch the below video to know how to search for a token from the Dashboard. + +[Video: https://www.youtube.com/embed/5UfdqUEKNvk] + +To search for a token: +1. Log in to the Dashboard. +1. Under **PAYMENT PRODUCTS**, navigate to **Subscriptions** → **Tokens**. +1. Search for the Token using the `token_id`. + +## 4. Charge the Token + +After your customer successfully makes an authorisation transaction, a payment is created and moved to the `authorized` state. A token is generated and is in the `initiated` state. After the payment moves to the `captured` state, the token next moves to the `confirmed` state. Once the token is `confirmed`, you can charge the token. + +Watch the below video to know how to charge a token from the Dashboard. + +[Video: https://www.youtube.com/embed/jGQS9QQ8wjw] + +To charge a Token: +1. Log in to the Dashboard. +1. Under **PAYMENT PRODUCTS**, navigate to **Subscriptions** → **Tokens**. +1. Search for the token using the `token_id`. +1. Click on the `token_id` to open the details page. +1. Click **Charge Now** to create a recurring payment. + +## Delete the Token + +You can delete a token from the Dashboard. + +> **WARN** +> +> +> +> **Watch Out!** +> +> Once a token is deleted, no further action can be performed on it. You will need to complete the authorisation process again to create a new token. +> + +Watch the below video to know how to delete tokens from the Dashboard. + +[Video: https://www.youtube.com/embed/RMiudQEq0Uk] + +To delete a token: +1. Log in to the Dashboard. +1. Under **PAYMENT PRODUCTS**, navigate to **Subscriptions** → **Tokens**. +1. Search for the token using the `token_id`. +1. Click on the `token_id` to open the details page. +1. Click **Delete Token**. + +### Related Information +- [Paper NACH Form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upload-paper-nach-form.md) +- [Batch Operations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/batch-operations.md) diff --git a/llm-content/payments/recurring-payments/emandate/apis.md b/llm-content/payments/recurring-payments/emandate/apis.md new file mode 100644 index 00000000..33809719 --- /dev/null +++ b/llm-content/payments/recurring-payments/emandate/apis.md @@ -0,0 +1,96 @@ +--- +title: Recurring Payments APIs for Emandate +description: List of Recurring Payments APIs available for Emandate. +--- + +# Recurring Payments APIs for Emandate + +You can use the Recurring Payments APIs to perform various actions using Emandate as a payment method. + +## API-wise Integration Checklist for Emandate + +### Emandate Registration using Standard Checkout +- We recommend that you create a single customer id rather than multiple customer ids for the same customer. If the cutomer's details change, you can use the [Edit Customer Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md#edit-customer-details) API. Duplicate validation is done based on email ID and phone number. +- Use the `fail_existing : "1"` parameter so that the [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-authorization-transaction.md#request-parameters) returns the same details of the customer created earlier. If the `fail_existing : "0"` is used, the API throws an error and does not fetch the customer id previously created. This can help in the end-user journey experience if a customer is signing up despite having signed up earlier. +- We recommend that you have the customer’s mode of payment. +- Let customers choose the method they want to authenticate the transaction. In this way, the customer gets to select the auth type in checkout and link. +- Let customers choose the bank account and fill in those details that they wish to make the recurring payment. This can reduce the load of having the details and we can handle the errors accordingly. +- Use the [Payments Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) API to check for any ongoing downtimes that might affect the Mandate registration. +- Ensure you pass all the token parameters while [creating an Order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-authorization-transaction.md#112-create-an-order) for the authorisation transaction using the Standard Checkout method. +- Ensure you pass the value of the `recurring` parameter as `1` in the [Create an Authorisation Payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-authorization-transaction.md#113-create-an-authorization-payment) API. If not passed, it would be considered a one-time payment. Once the authorisation payment is made, we request you verify the payment signature at your backend. +- You cannot edit the details of the token once you register the mandate. +- Enable webhooks to check the status of the [token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-token-status-using-webhooks) and [payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-payment-status-using-webhooks) and use this only if your business is using it in a non-critical way. In critical scenarios, we recommend you [fetch](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/tokens.md) APIs. +- Once the payment is made, we send a payment ID, order ID and signature in the response. After the signature verification is done, you can fetch the token using the [Fetch Token by Payment ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/tokens.md#21-fetch-token-by-payment-id) API. +- The token will be confirmed for HDFC and SBI in T+1 days. Refer to the [FAQ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md) section for more information. +- For all the payments, handle the error description on the server-side. + +### Emandate Registration using a Registration Link +- Share access to your team members based on the you would like to assign them if you create a registration link via the Dashboard. +- Ensure to pass the below parameters while creating a registration link using the API: + 1. Customer details such as `name`, `email` and `contact`. + 2. `currency` as `INR`. + 3. `sms_notify` and `email_notify` as `true` to send notifications to customers. + 4. `amount` as `0` and `type` as `link`. + 5. `description` of the link. + 6. `subscription_registration` details such as `method`. +- You can use the [Fetch a Payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md) API to know the status of the payment. + +### Create Subsequent Payments +- Ensure the amount does not exceed the max amount set while [creating an order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-subsequent-payments.md#31-create-an-order-to-charge-the-customer). +- Ensure the token id is in the `confirmed` state before initiating the recurring payment. +- Ensure the `token_id` passed is for the linked `customer_id` while creating a recurring payment. +- To ensure same-day debit authorization, Razorpay must receive the request by 8:59 a.m. on a bank working day. +- In the case of Emandate, the process varies from bank to bank. If the Emandate is registered using a Netbanking login, it can take up to 2 working days for payment authorization. + +Method | Bank | TAT Guidelines +--- +Emandate | ICICI Bank | Real-time +--- +Emandate | Axis | Same day +--- +Emandate | HDFC Bank | T+1 working days +--- +Emandate | State Bank of India | T+1 working days +--- +Emandate | All Banks under NPCI ENACH | Same day + +- Use [webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-payment-status-using-webhooks) to get real-time updates of payment. +- After the debit request is created, payment will be in the `created` state. You can use the [Fetch a Payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md) API to know the status of the payment. + +## List of Recurring Payments APIs + +The table below lists the various Recurring Payments APIs available for Emandate and gives a brief description of each API: + +API | Description +--- +[Create Authorisation Transaction using Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-authorization-transaction.md#11-using-razorpay-standard-checkout) | API to create an authorisation transaction using Razorpay Checkout. +--- +[Create Authorisation Transaction using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-authorization-transaction.md#12-using-a-registration-link) | API to create an authorisation transaction using Registration Link. +--- +[Fetch Tokens using Payment id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/tokens.md#21-fetch-token-by-payment-id) | API to fetch tokens using the Payment id. +--- +[Fetch Tokens using Customer id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/tokens.md#22-fetch-tokens-by-customer-id) | API to fetch tokens using the Customer id. +--- +[Delete Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/tokens.md#23-delete-tokens) | API to delete tokens. +--- +[Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-subsequent-payments.md) | API to create subsequent payments. + +### Registration and Charge First Payment Together + +API | Description +--- +[Create Authorisation Transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/auto-debit.md#1-create-an-authorization-transaction) | API to create an authorisation transaction. +--- +[Fetch Tokens using Payment id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/auto-debit.md#21-fetch-token-by-payment-id) | API to fetch tokens using the Payment id. +--- +[Fetch Tokens using Customer id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/auto-debit.md#22-fetch-tokens-by-customer-id) | API to fetch tokens using the Customer id. +--- +[Delete Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/auto-debit.md#23-delete-tokens) | API to delete tokens. +--- +[Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/auto-debit.md#3-create-subsequent-payments) | API to create subsequent payments. + +### Related Information +- [Integrate Recurring Payments Using Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) +- [Charge Customers During Registration - Use Cases and Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/charge-customer-during-registration.md) +- [Supported Banks and Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/supported-banks.md) +- [Handle Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/errors.md) diff --git a/llm-content/payments/recurring-payments/emandate/charge-customer-during-registration.md b/llm-content/payments/recurring-payments/emandate/charge-customer-during-registration.md new file mode 100644 index 00000000..54ccd0ce --- /dev/null +++ b/llm-content/payments/recurring-payments/emandate/charge-customer-during-registration.md @@ -0,0 +1,1546 @@ +--- +title: Charge Customers During Registration - Use Cases and Payment Methods +description: Register a customer's mandate and debit the first recurring payment as part of the same transaction using Emandate. +--- + +# Charge Customers During Registration - Use Cases and Payment Methods + +If you are using the existing emandate flow, you can only charge the customer after they complete the authorisation transaction and the token is confirmed. This means, you need to wait a few days before you can charge the customer. If the mandate registration fails, you have to start the process again, causing further delays. This may lead to a delay in onboarding the customer impacting your business. + +You can use this feature where you can charge any amount to your customer as part of the authorisation transaction. The customer is charged an amount immediately while initiating the mandate registration in the background. This helps you to onboard the customer immediately without waiting for the mandate to be registered. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Use Cases + +Following are a couple of use cases where you can use this feature: + +### Mutual Funds + +When a customer starts a new Systematic Investment Plan (SIP), the investment needs to be made immediately. The customer needs to be charged as part of the mandate registered process. It is not possible to wait for a few days while the mandate is registered before charging the customer. + +### Insurance + +If you are an insurance provider, you need to charge the customer the first premium immediately when selling them the policy. + +## Supported Banks + +Currently, only **HDFC** and **ICICI** support this feature. + +## Integration Steps + +The integration flow here is same as that for emandate registration. +1. [Create an authorisation transaction](#1-create-an-authorization-transaction). +1. [Check token status](#2-fetch-and-manage-tokens). +1. [Create subsequent charges](#3-create-subsequent-payments). + +## 1. Create an Authorisation Transaction + +You can create an authorisation transaction: + +- Using the [Razorpay Standard Checkout](#11-using-razorpay-standard-checkout). +- Using a [Registration Link](#12-using-a-registration-link). + +### 1.1. Using Razorpay Standard Checkout + +To create an authorisation transaction using the Razorpay Standard Checkout, you need to: + +1. [Create a Customer](#111-create-a-customer). +2. [Create an Order](#112-create-an-order). +3. [Create Authorisation Payment using Razorpay Standard Checkout](#113-create-an-authorisation-payment). + +#### 1.1.1. Create a Customer + +Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. + +You can create [customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) with basic information such as `email` and `contact` and use them for various Razorpay offerings. The following endpoint creates a customer. + +/customers + + +### Sample Code + + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/customers \ + -H "Content-Type: application/json" \ + -d '{ + "name": "", + "email": "", + "contact": "", + "fail_existing": "0", + "notes":{ + "note_key_1": "September", + "note_key_2": "Make it so." + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject customerRequest = new JSONObject(); + customerRequest.put("name",""); + customerRequest.put("contact",""); + customerRequest.put("email",""); + customerRequest.put("fail_existing", "0"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + notes.put("notes_key_2","Tea, Earl Grey… decaf."); + customerRequest.put("notes",notes); + + Customer customer = razorpay.customers.create(customerRequest); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.customer.create({ + 'name': '', + 'email': '', + 'contact': '', + 'fail_existing': "0", + 'notes': {'note_key_1': 'September', 'note_key_2': 'Make it so.'} + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "name": "", + "contact": , + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, + } + body, err := client.Customer.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->customer->create(array('name' => '', 'email' => '','contact'=>'','fail_existing' => "0", 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + + options.Add("name", ""); + options.Add("contact", ""); + options.Add("email", ""); + options.Add("fail_existing", "0"); + + Customer customer = Customer.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + para_attr = { + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + } + + Razorpay::Customer.create(para_attr) + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } + }) + ``` + + ```json: Response + { + "id":"cust_1Aa00000000001", + "entity":"customer", + "name":"", + "email":"", + "contact":"", + "gstin":null, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "created_at ":1234567890 + } + ``` + + + +##### Request Parameters + +`name` +: `string` The name of the customer. For example, `Gaurav Kumar`. + +`email` +: `string` The email address of the customer. For example, `gaurav.kumar@example.com`. + +`contact` +: `string` The phone number of the customer. For example, `9876543210`. + +`fail_existing` _optional_ +: `string` The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter `fail_existing` to get the existing customer's details in the response. Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### 1.1.2. Create an Order + +Use the below endpoint to create an order. + +/orders + +You can create a payment against the `order_id` generated in the response. + +```cURL: Emandate via Netbanking +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "method": "emandate", + "payment_capture": true, + "customer_id": "cust_1Aa00000000001", + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "token": { + "auth_type": "netbanking", + "max_amount": 9999900, + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "ifsc_code": "HDFC0000001" + } + } +}' +```json: Response +{ + "id": "order_1Aa00000000001", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "receipt": "Receipt No. 1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1": "Beam me up Scotty", + "notes_key_2": "Engage" + }, + "created_at": 1579700597, + "token": { + "method": "emandate", + "recurring_status": null, + "failure_reason": null, + "currency": "INR", + "max_amount": 9999900, + "auth_type": "netbanking", + "expire_at": 4102444799, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "bank_account": { + "ifsc": "HDFC0000001", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "account_number": "1121431121541121", + "account_type": "savings", + "beneficiary_email": "gaurav.kumar@example.com", + "beneficiary_mobile": "9000090000" + }, + "first_payment_amount": 0 + } +} +``` + +##### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. Pass `100` for ₹1. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`method` _mandatory_ +: `string` The authorisation method. In this case the value will be `emandate`. + +`payment_capture` _mandatory_ +: `boolean` Determines if payment should be automatically captured. Possible values: + - `true` (recommended): Automatically capture the payment. + - `false` (default/not recommended): You have to manually capture payments. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer, who is to be charged. For example, `cust_D0cs04OIpPPU1F`. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `rcptid #1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes`_optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`token` +: Details related to the authorization such as max amount and bank account information. + + `auth_type` _optional_ + : `string` Here, it has to be `netbanking`. + + `max_amount` _optional_ + : `integer` The maximum amount, in paise, that a customer can be charged in one transaction. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` _optional_ + : `integer` The timestamp, in Unix format, till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. Default is 10 years for `emandate`. The value can range from the current date to 31-12-2099 (`4101580799`). + + `bank_account` + : Customer bank account details. + + `account_number` _optional_ + : `string` Customer's bank account number. + + `ifsc_code` _optional_ + : `string` Customer's bank IFSC. For example `UTIB0000001`. + + `beneficiary_name` _optional_ + : `string` Customer's name. For example, `Gaurav Kumar`. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `notes`_optional_ + : `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### 1.1.3. Create an Authorisation Payment + +Create a payment checkout form for customers to make Authorisation Transaction and register their mandate. You can use the Handler Function or Callback URL. + +Handler Function | Callback URL +--- +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. | When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. + +> **WARN** +> +> +> +> **Watch Out!** +> +> - The callback URL is not supported for recurring payments created using the registration link. +> - While handling the first time authorisation payment response, consume the `error_reason` field with value `upi_dummy_payment` and `error_description` field with value `Payment was a dummy payment for one time mandate registration.` to identify successful mandate registration. The parent `error_code` will be `BAD_REQUEST_ERROR`. +> + +```html: Checkout with handler functions + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "handler": function (response) { + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature); + }, + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +```html: Manual checkout with Callback URL + Pay + + + var options = { + "key": "[YOUR_KEY_ID]", + "order_id": "order_1Aa00000000001", + "customer_id": "cust_1Aa00000000001", + "recurring": true, + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "notes":{ + "note_key_1":"September", + "note_key_2":"Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp1.open(); + e.preventDefault(); + } + +``` + +##### Additional Checkout Fields + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer created in the [first step](#111-create-a-customer). + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the [second step](#112-create-an-order). +`recurring` _mandatory_ +: `integer` In this case, the value has to be `1`. + +### 1.2. Using a Registration Link + +Registration Link is an alternate way of creating an authorisation transaction. You can create a registration link using the [API](#121-create-a-registration-link) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link). + +> **INFO** +> +> +> **Handy Tips** +> +> - You do not have to create a customer if you choose the registration link method for creating an authorisation transaction. +> - You can [use Webhooks to get notifications about successful payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-authorization-link-status-using-webhooks) against a registration link. +> + +When you create a registration link, an [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/invoices.md) is automatically issued to the customer. They can use this invoice to make the authorisation payment. + +#### 1.2.1. Create a Registration Link + +Use the below endpoint to create a registration link. + +/subscription_registration/auth_links + +```cURL: Emandate via Netbanking +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-X POST https://api.razorpay.com/v1/subscription_registration/auth_links +-H "Content-Type: application/json" \ +-d '{ + "customer": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780" + }, + "type": "link", + "amount": 100, + "currency": "INR", + "description": "12 p.m. Meals", + "subscription_registration": { + "method": "emandate", + "auth_type": "netbanking", + "expire_at": 1580480689, + "max_amount": 9999900, + "bank_account": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "11214311215411", + "account_type": "savings", + "ifsc_code": "HDFC0001233" + } + }, + "receipt": "Receipt no. 1", + "expire_by": 1880480689, + "sms_notify": true, + "email_notify": true, + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' +```json: Response +{ + "id": "inv_FHrY6tDtVP2dHg", + "entity": "invoice", + "receipt": "Receipt no. 25", + "invoice_number": "Receipt no. 25", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9123456780", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9123456780" + }, + "order_id": "order_FHrY6tiC2y7NNN", + "line_items": [], + "payment_id": null, + "status": "issued", + "expire_by": 1880480689, + "issued_at": 1595491063, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "pending", + "email_status": "pending", + "date": 1595491063, + "terms": null, + "partial_payment": false, + "gross_amount": 0, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 0, + "amount_paid": 0, + "amount_due": 0, + "currency": "INR", + "currency_symbol": "₹", + "description": "test registration link", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/DxEcNtR", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491063, + "idempotency_key": null +} +``` + +##### Request Parameters + +`customer` +: Details of the customer to whom the registration link will be sent. + + `name` _mandatory_ + : `string` Customer's name. + + `email` _mandatory_ + : `string` Customer's email address. + + `contact`_mandatory_ + : `string` Customer's phone number. + +`type` _mandatory_ +: `string` In this case, the value is `link`. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. Currently, only `INR` is supported. + +`amount` _mandatory_ +: `integer` The payment amount in the smallest currency sub-unit. + +`description` _mandatory_ +: `string` A description that appears on the hosted page. For example, `12:30 p.m. Thali meals (Gaurav Kumar)`. +`subscription_registration` +: Details of the authorisation payment. + + `method` _mandatory_ + : `string` The authorisation method. In this case, it will be `emandate`. + + `auth_type` _optional_ + : `string` Here, it has to be `netbanking`. + + `max_amount` _optional_ + : `integer` The maximum amount, in paise, that a customer can be charged in one transaction. Know about [maximum and default values](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#2-what-is-the-maximum-amount-which-can). + + `expire_at` _optional_ + : `integer` The timestamp, in Unix, till when you can use the token (authorization on the payment method) to charge the customer subsequent payments. Default is 10 years for `emandate`. The value can range from the current date to 31-12-2099 (`4101580799`). + + `bank_account` + : The customer's bank account details. + + `beneficiary_name` _optional_ + : `string` The account holder's name. For example `Gaurav Kumar`. + + `account_number` _optional_ + : `integer` Customer's bank account number. For example `11214311215411`. + + `account_type` _optional_ + : `string` Customer's bank account type. Possible values: + - `savings` (default) + - `current` + + `ifsc_code` _optional_ + : `string` Customer's bank IFSC. For example `HDFC0000001`. + +`sms_notify` _optional_ +: `boolean` Indicates if SMS notifications are to be sent by Razorpay. Can have the following values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`email_notify` _optional_ +: `boolean` Indicates if email notifications are to be sent by Razorpay. Can have the following values: + - `true` (default): Notifications are sent by Razorpay. + - `false`: Notifications are not sent by Razorpay. + +`expire_by` _optional_ +: `integer` The timestamp, in Unix, till when the registration link should be available to the customer to make the authorisation transaction. + +`receipt` _optional_ +: `string` A unique identifier entered by you for the order. For example, `Receipt No. 1`. This parameter should be mapped to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### 1.2.2. Send/Resend Notifications + +The following endpoint sends/resends notifications with the short URL to the customer: + +/invoices/:id/notify_by/:medium + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/notify_by/sms + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + String medium = "sms"; + + Invoice invoice = razorpay.invoices.notifyBy(invoiceId, medium); + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->notify($medium); + + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.notifyBy(invoiceId, medium) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.notify_by(invoiceId, medium) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_JDdNb4xdf4gxQ7" + + medium = "email" + + Razorpay::Invoice.notify_by(invoiceId, medium) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Notify("", "", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + string medium = "sms"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).NotifyBy(medium); + ``` + + ```json: Response + { + "success": true + } + ``` + + +##### Path Parameters + +`id`_mandatory_ +: `string` The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, `inv_1Aa00000000001`. + +`medium` _mandatory_ +: `string` Determines through which medium you want to resend the notification. Possible values: + - `sms` + - `email` + +#### 1.2.4. Cancel a Registration Link + +The following endpoint cancels a registration link. + +/invoices/:id/cancel + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel registration link in the `issued` state. +> + + +### Sample Code + + ```cURL: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] + -X POST https://api.razorpay.com/v1/invoices/inv_1Aa00000000001/cancel + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String invoiceId = "inv_1Aa00000000001"; + + Invoice invoice = razorpay.invoices.cancel(invoiceId); + + ```php:PHP + $api = new Api($key_id, $secret); + + $api->invoice->fetch($invoiceId)->cancel(); + ```javascript: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.invoices.cancel(invoiceId) + + ```python: Python + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.invoice.cancel(invoiceId) + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + invoiceId = "inv_1Aa00000000001" + + Razorpay::Invoice.cancel(invoiceId) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + body, err := client.Invoice.Cancel("", nil, nil) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + string invoiceId = "inv_Z6t7VFTb9xHeOs"; + + Invoice invoice = client.Invoice.Fetch(invoiceId).Cancel(); + ``` + + + + ```json: Response + { + "id": "inv_FHrfRupD2ouKIt", + "entity": "invoice", + "receipt": "Receipt No. 1", + "invoice_number": "Receipt No. 1", + "customer_id": "cust_BMB3EwbqnqZ2EI", + "customer_details": { + "id": "cust_BMB3EwbqnqZ2EI", + "name": "", + "email": "", + "contact": "", + "gstin": null, + "billing_address": null, + "shipping_address": null, + "customer_name": "", + "customer_email": "", + "customer_contact": "" + }, + "order_id": "order_FHrfRw4TZU5Q2L", + "line_items": [], + "payment_id": null, + "status": "cancelled", + "expire_by": 4102444799, + "issued_at": 1595491479, + "paid_at": null, + "cancelled_at": 1595491488, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1595491479, + "terms": null, + "partial_payment": false, + "gross_amount": 100, + "tax_amount": 0, + "taxable_amount": 0, + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "currency_symbol": "₹", + "description": "Registration Link for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "comment": null, + "short_url": "https://rzp.io/i/QlfexTj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "link", + "group_taxes_discounts": false, + "created_at": 1595491480, + "idempotency_key": null + } + + ``` + + + + + + + + + +##### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier for the invoice linked to the registration link that you want to cancel. For example, `inv_1Aa00000000001`. + +## 2. Fetch and Manage Tokens + +Once you capture a payment, Razorpay Checkout returns a `razorpay_payment_id`. You can use this id to fetch the `token_id`, which is used to create and charge subsequent payments. + +You can retrieve the `token_id` using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) or the APIs given below. + +### 2.1. Fetch Token by Payment ID + +The following endpoint retrieves the `token_id` using a `payment_id`. + +/payments/:id + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String paymentId = "pay_1Aa00000000002"; + +Payment payment = razorpay.payments.fetch(paymentId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->fetch($paymentId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.fetch(paymentId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.fetch(paymentId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +paymentId = "pay_1Aa00000000002" + +Razorpay::Payment.fetch(paymentId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Payment.Fetch("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string paymentId = "pay_Z6t7VFTb9xHeOs"; + +Payment payment = client.Payment.Fetch(paymentId); + +```json: Response +{ + "id": "pay_FHf9a7AO0iXM9I", + "entity": "payment", + "amount": 0, + "currency": "INR", + "status": "captured", + "order_id": "order_FHf9OwSeyetnKC", + "invoice_id": "inv_FHf9P2hhXEti7i", + "international": false, + "method": "emandate", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DtHaBuooGHTuyZ", + "token_id": "token_FHf9aAZR9hWJkq", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1595447410 +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be retrieved. For example, `pay_1Aa00000000002`. + +### 2.2. Fetch Tokens by Customer ID + +A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves tokens linked to a customer. + +> **WARN** +> +> +> **Watch Out!** +> +> This endpoint will not fetch the details of expired and unused tokens. +> + +/customers/:id/tokens + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +Customer customer = razorpay.customers.fetchTokens(customerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000002 " + +Razorpay::Customer.fetchTokens(customerId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_1Aa00000000001"; + +List token = client.Customer.Fetch(customerId).Tokens(); + +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "token_FHf94Uym9tdYFJ", + "entity": "token", + "token": "2wDPM7VAlXtjAR", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "netbanking", + "mrn": null, + "used_at": 1595447381, + "created_at": 1595447381, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 1689971140, + "dcc_enabled": false + }, + { + "id": "token_FHf9aAZR9hWJkq", + "entity": "token", + "token": "AwAwIFBmDSJ4p6", + "bank": "HDFC", + "wallet": null, + "method": "emandate", + "vpa": null, + "recurring": true, + "recurring_details": { + "status": "confirmed", + "failure_reason": null + }, + "auth_type": "debitcard", + "mrn": null, + "used_at": 1595447410, + "created_at": 1595447410, + "bank_details": { + "beneficiary_name": "Gaurav Kumar", + "account_number": "1121431121541121", + "ifsc": "HDFC0000001", + "account_type": "savings" + }, + "max_amount": 9999900, + "expired_at": 4102444799, + "dcc_enabled": false + } + ] +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the customer for whom tokens are to be retrieved. For example, `cust_1Aa00000000002`. + +### 2.3. Delete Tokens + +The following endpoint deletes a token. + +/customers/:customer_id/tokens/:token_id + +```curl: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/customers/cust_1Aa00000000002/tokens/token_1Aa00000000001 + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_1Aa00000000002"; + +String tokenId = "token_1Aa00000000001"; + +Customer customer = razorpay.customers.deleteToken(customerId, tokenId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->delete($tokenId); +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.deleteToken(customerId, tokenId) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.delete(customerId, tokenId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::Customer.fetch(customerId).deleteToken(tokenId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.Delete("", "", nil, nil) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +customerId = "cust_1Aa00000000004" + +tokenId = "token_Hxe0skTXLeg9pF" + +Razorpay::fetch(customerId).deleteToken(tokenId) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; + +String tokenId = "token_HouA2OQR5Z2jTL"; + +Customer customer = instance.customers.deleteToken(customerId, tokenId); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string customerId = "cust_Z6t7VFTb9xHeOs"; + +string tokenId = "token_1Aa00000000001"; + +Customer customer = client.Customer.Fetch(customerId).DeleteToken(tokenId); +``` +```json: Response +{ + "deleted": true +} +``` + +#### Path Parameter + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer with whom the token is linked. For example, `cust_1Aa00000000002`. + +`token_id` _mandatory_ +: `string` The unique identifier of the token that is to be deleted. For example, `token_1Aa00000000001`. + +## 3. Create Subsequent Payments + +Following are the two steps to create and charge your customer a subsequent payment: + +You should perform the following steps to create and charge your customer subsequent payments: + +1. [Create an order to charge the customer](#31-create-an-order-to-charge-the-customer) +1. [Create a recurring payment](#32-create-a-recurring-payment) + +### 3.1. Create an Order to Charge the Customer + +You have to create a new order every time you want to charge your customers. This order is different from the one created during the authorisation transaction. + +The following endpoint creates an order. + +/orders + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount", 1000); +orderRequest.put("currency", ""); +orderRequest.put("payment_capture", true); +orderRequest.put("receipt", "Receipt No. 1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +orderRequest.put("notes", notes); + +Order order = razorpay.orders.create(orderRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'payment_capture' => true, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + 'amount': 1000, + 'currency': '', + 'payment_capture': True, + 'receipt': 'Receipt No. 1', + 'notes': {'notes_key_1': 'Tea, Earl Grey, Hot', + 'notes_key_2': 'Tea, Earl Grey... decaf.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 1000, + "currency": "", + "payment_capture": true, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +} + +Razorpay::Order.create(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_S ECRET") + +data:= map[string]interface{}{ + "amount":1000, + "currency":"", + "payment_capture": true, + "receipt":"Receipt No. 1", + "notes": map[string]interface{}{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf.", + }, +} +body, err := client.Order.Create(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", ""); +orderRequest.Add("receipt", "receipt#12b"); +orderRequest.Add("payment_capture", true); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +``` + +```json: Success Response +{ + "id":"order_1Aa00000000002", + "entity":"order", + "amount":1000, + "amount_paid":0, + "amount_due":1000, + "currency":"", + "receipt":"Receipt No. 1", + "offer_id":null, + "status":"created", + "attempts":0, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at":1579782776 +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"The id provided does not exist", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` Amount in currency subunits. + +`currency` _mandatory_ +: `string` The 3-letter ISO currency code for the payment. + +`receipt` _optional_ +: `string` A user-entered unique identifier for the order. For example, `Receipt No. 1`. You should map this parameter to the `order_id` sent by Razorpay. + +`notes` _optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`payment_capture` _mandatory_ +: `boolean` Determines whether the payment status should be changed to `captured` automatically or not. Possible values: + - `true`: Payments are captured automatically. + - `false`: Payments are not captured automatically. You can manually capture payments using the [Manually Capture Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +### 3.2. Create a Recurring Payment + +Once you have generated an `order_id`, use it with the `token_id` to create a payment and charge the customer. The following endpoint creates a payment to charge the customer. + +/payments/create/recurring + +```cURL: Curl +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/create/recurring \ +-H "Content-Type: application/json" \ +-d '{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("email", ""); +paymentRequest.put("contact", ""); +paymentRequest.put("amount", 1000); +paymentRequest.put("currency", ""); +paymentRequest.put("order_id", "order_1Aa00000000002"); +paymentRequest.put("customer_id", "cust_1Aa00000000001"); +paymentRequest.put("token", "token_1Aa00000000001"); +paymentRequest.put("recurring", true); +paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar"); +JSONObject notes = new JSONObject(); +paymentRequest.put("notes_key_1","Tea, Earl Grey, Hot"); +paymentRequest.put("notes_key_2","Tea, Earl Grey… decaf."); + +Payment payment = razorpay.payments.createRecurringPayment(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createRecurring(array('email'=>'','contact'=>'','amount'=>100,'currency'=>'','order_id'=>'order_1Aa00000000002','customer_id'=>'cust_1Aa00000000001','token'=>'token_1Aa00000000001','recurring'=>true,'description'=>'Creating recurring payment for Gaurav Kumar')); + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createRecurringPayment({ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +}) + +```python: Python +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createRecurring({ + 'email': '', + 'contact': , + 'amount': 1000, + 'currency': '', + 'order_id': "order_1Aa00000000002", + 'customer_id': "cust_1Aa00000000001", + 'token': 'token_1Aa00000000001', + 'recurring': True, + 'description': 'Creating recurring payment for Gaurav Kumar', + 'notes': {'note_key 1': 'Beam me up Scotty', + 'note_key 2': 'Tea. Earl Gray. Hot.'} + }) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": { + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot." + } +} +Razorpay::Payment.create_recurring_payment(para_attr) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data:= map[string]interface{}{ + "email": "", + "contact": "", + "amount": 1000, + "currency": "", + "order_id": "order_1Aa00000000002", + "customer_id": "cust_1Aa00000000001", + "token": "token_1Aa00000000001", + "recurring": true, + "description": "Creating recurring payment for Gaurav Kumar", + "notes": map[string]interface{}{ + "note_key 1": "Beam me up Scotty", + "note_key 2": "Tea. Earl Gray. Hot.", + }, +} +body, err := Client.Payment.CreateRecurringPayment(data, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("email", ""); +paymentRequest.Add("contact", ""); +paymentRequest.Add("amount", 1000); +paymentRequest.Add("currency", ""); +paymentRequest.Add("order_id", "order_MZ35KPxZaqxfXq"); +paymentRequest.Add("customer_id", "cust_KUyah9o60OPhfj"); +paymentRequest.Add("token", "token_MZ37MsnhLNH4tN"); +paymentRequest.Add("recurring", true); +paymentRequest.Add("description", "Creating recurring payment for Gaurav Kumar"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey… decaf."); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateRecurringPayment(paymentRequest); +``` + +```json: Success Response +{ + "razorpay_payment_id" : "pay_1Aa00000000001" +} + +```json: Failure Response +{ + "error":{ + "code":"BAD_REQUEST_ERROR", + "description":"Amount exceeds maximum amount allowed", + "source":"business", + "step":"payment_initiation", + "reason":"input_validation_failed", + "metadata":{ + + } + } +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The amount you want to charge your customer. This should be the same as the order amount. + +`order_id`_mandatory_ +: `string` The unique identifier of the order created. For example, `order_1Aa00000000002`. + +`customer_id` _mandatory_ +: `string` The unique identifier of the customer you want to charge. For example, `cust_1Aa00000000002`. + +`token` _mandatory_ +: `string` The `token_id` generated when the customer successfully completes the authorisation payment. Different payment instruments for the same customer have different `token_id`. + +`recurring` _mandatory_ +: `boolean` Determines whether recurring payment is enabled or not. + - `true`: Recurring payment is enabled. + - `false`: Recurring payment is not enabled. + +`notes`_optional_ +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +### Related Information +- [Integrate Recurring Payments Using Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) +- [Supported Banks and Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/supported-banks.md) +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/apis.md) +- [Handle Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/errors.md) diff --git a/llm-content/payments/recurring-payments/emandate/errors.md b/llm-content/payments/recurring-payments/emandate/errors.md new file mode 100644 index 00000000..b5199948 --- /dev/null +++ b/llm-content/payments/recurring-payments/emandate/errors.md @@ -0,0 +1,212 @@ +--- +title: Handle Errors +description: Know about errors returned in the API responses from the different payment methods used for Recurring Payments. +--- + +# Handle Errors + +Razorpay aims to make every transaction successful for its customers. However, in the financial ecosystem errors might still occur because of intermittent communication and technical issues at multiple hops. Hence, it becomes critical for businesses to identify the `source` of the error, the payment `step` where the error occurred and the `reason` that caused the error. In short, you can identify the **who**, **where** and **why** of every payment error. This enables you to minimize or fix errors to reduce any losses. + +With the new error codes, Razorpay helps you build your own logic and take remedial action at your end, wherever possible. Deriving these insights can help your business to: +- Map and analyze top failure reasons. +- Identify the source of failure. + + Narrow down and understand if cause of the failure. Can be due to customer action or external factors (Razorpay, Gateway, Bank). +- Identify the payment step. +- Identify the exact reason of the failure. +- Handle actionable error codes. +- Avoid possible integration errors. +- Display valid responses to your customers. + +## Error Response + +All successful responses are returned with HTTP Status code 200. In case of failure, Razorpay API returns a JSON error response with the parameters that detail the reason for the failure. + +The error response contains `code`, `description`, `field`, `source`, `step`, `reason` and `metadata` parameters that help you diagnose and solve the error. + +```json: Sample Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Authentication failed due to incorrect otp", + "field": null, + "source": "customer", + "step": "payment_authentication", + "reason": "invalid_otp", + "metadata": { + "payment_id": "pay_EDNBKIP31Y4jl8", + "order_id": "order_DBJKIP31Y4jl8" + } + } +} +``` + +### Response Parameters + +`error` +: `object` The error object. + +`code` +: `string` Type of the error. + +`description` +: `string` Descriptive text about the error. + +`field` +: `string` Name of the parameter in the API request that caused the error. + +`source` +: `string` The point of failure in the specific operation (payment in this case). For example, customer, business. + +`step` +: `string` The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. + +`reason` +: `string` The exact error reason. It can be handled programmatically. + +`metadata` +: `object` Contains additional information about the request. + + `payment_id` + : `string` Unique identifier of the payment. + + `order_id` + : `string` Unique identifier of the order associated with the payment. + +## Error Parameters + +There are certain error codes specific for each payment method supported by Razorpay. To understand the errors and their `reasons`, it is recommended to know the `source` (stakeholders) and the `steps` involved in the payment flows. + + + The possible values for the `source` parameter for Emandate are listed below: + + - `customer` + - `bank` + - `business` + - `internal` + - `gateway` + - `issuer_bank` + + + The possible values for the `step` parameter, along with the description, are listed below: + + 1. `payment_initiation` + + Your system initiates and sends the payment request to our server. Our server validates your request, creates the payment flow and forwards the request to the Gateway. + + 1. `payment_authentication` + + The bank verifies the enrollment of the Emandate by asking customers to authenticate themselves. + + 1. `payment_authorization` + + Once the customer has completed the authentication, the bank authorizes the release of the funds. The authorization status is communicated to the Gateway which in turn communicates the same to Razorpay. + + + +## Error Reasons + +Below are the possible values for the `reason` parameter in the error response, their explanation and the next best action to be taken in case of a failure. + +## Emandate Registration + +Reason | Explanation | Next Steps +--- +`already_declined` | The bank has already declined a similar mandate registration attempt by the customer. NPCI blocks retry attempts to avoid duplicate requests to the bank. | The customer must retry after 24 hours. +--- +`authentication_failed` | The customer has entered incorrect card or bank login details. | The customer must use the correct card details to complete the registration. +--- +`bank_account_invalid` | The bank account is not valid. The customer or bank could have closed the account. | The customer must try using a valid bank account or another method. +--- +`bank_account_validation_failed` | The third party validation failed as the given bank account details were incorrect or could not be verified. | The customer should check the bank account details provided and try again. +--- +`bank_technical_error` | The destination bank was facing technical problems when the payment was attempted. This usually occurs when the Core Banking System encounters a technical error while processing the payment. | The customer must try using another bank account or try after sometime. +--- +`card_expired` | The customer is making the payment with an expired card. | The customer must use a different card or method. +--- +`card_number_invalid` | The customer has entered an incorrect card number which is not part of any BIN/ IIN. | The customer must enter the correct card number. +--- +`debit_instrument_blocked` | The customer is using a blocked card or account to complete the registration. The account or card could have been blocked by the bank or by customers themselves. | The customer must retry with a different method. +--- +`debit_instrument_inactive` | The customer is using an inactive or frozen card to complete the payment. The card could have been marked inactive by the issuer or by customer themselves. | The customer must use a different card or method. +--- +`duplicate_request` | A payment initiation request with the exact same parameters was passed to the gateway. The gateway is blocking duplicate requests. | The customer must retry after 30 min. +--- +`gateway_technical_error` | Payment failed due to a technical error at the gateway. This usually occurs when the gateway server encounters a technical error while processing the payment. | The customer must retry after some time. +--- +`incorrect_card_expiry_date` | The customer has entered an incorrect expiry date of the card. | The customer must enter the correct expiry date of the card. +--- +`incorrect_cvv` | The customer has entered an incorrect CVV to complete the payment. | The customer must retry with the correct CVV. +--- +`incorrect_otp` | The customer has entered an incorrect OTP to complete the payment. | The customer must retry and enter the correct OTP. +--- +`incorrect_pin` | The customer has entered an incorrect PIN to complete the payment. | The customer must retry with the correct PIN. +--- +`insufficient_funds` | The customer does not have sufficient funds in the account to complete the payment. | The customer must retry with sufficient balance in account. +--- +`joint_account_not_allowed` | The customer has tried to register the mandate on a joint account which is not allowed. Banks usually allow mandates to be registered on sole ownership accounts only. | The customer must retry with a different account. +--- +`otp_attempts_exceeded` | The customer has entered the wrong OTP multiple times and exceeded the limit. Some issuers limit the number of OTP retries, beyond which the card is temporarily blocked. | The customer must retry using a different method or after some time. +--- +`payment_cancelled` | The customer has explicitly cancelled the payment due to which the authentication failed to complete. | The customer must retry to complete the payment. +--- +`payment_failed` | Destination Bank or Gateway has declined the payment due to business or technical reasons. The exact reason in this case is not communicated to Razorpay. | The customer must use a different method or retry after some time. +--- +`payment_pending_approval` | The payment is currently pending approval by the bank. | Please wait for sometime for the payment status to be updated, or retry after sometime. +--- +`payment_risk_check_failed` | Payment declined due to risk checks. Risk checks are performed by Razorpay, Gateway and Issuer Bank. The source parameter would give additional clarity where the risk check failed. | The customer must not proceed with the payment at this time. +--- +`payment_timed_out` | The customer did not complete the transaction within the specified time. This error may also happen when no response is received from the gateway. | The customer must retry and complete the transaction within the time. +--- +`server_error` | Technical error at Razorpay's server. This usually occurs when there is some server issue at Razorpay's end. | Please retry after some time or reach out to Razorpay. +--- +`transaction_limit_exceeded` | The customers have exceeded the credit or debit limit set on their accounts. This error usually arises while doing high value transactions. | Please retry after informing the customer to update their transaction limits. +--- +`user_not_registered_for_netbanking` | The customer's bank account is not registered for netbanking. | The customer should register their account with the destination bank for netbanking. + +## Subsequent Payments + +Reason | Explanation | Next Steps +--- +`bank_account_invalid` | The customer's bank account is either closed or no longer valid. The customer or bank could have closed the account. | The customer must re-register for the mandate. +--- +`bank_account_validation_failed` | The bank could not validate the customer registration for debiting the customer. | Please retry after some time or reach out to Razorpay. +--- +`bank_technical_error` | The destination bank was facing technical problems at the moment the payment was attempted. This usually occurs when the Core Banking System encounters a technical error while processing the payment. | Please retry after some time or reach out to Razorpay. +--- +`debit_instrument_blocked` | Withdrawals on the customer's account are temprarily blocked by the bank. | The customer must reach out to their bank to get the account unblocked. +--- +`debit_instrument_inactive` | Withdrawals on the customer's account are temprarily blocked by the bank. | The customer must reach out to their bank to get the account unblocked. +--- +`gateway_technical_error` | Payment failed due to a technical error at the gateway. This usually occurs when the gateway server encounters a technical error while processing the payment. | Please retry after some time or reach out to Razorpay. +--- +`incorrect_ifsc` | The bank IFSC code is no longer valid. | The customer must re-register for the mandate. +--- +`input_validation_failed` | Payment failed due to wrong request or input sent in the payment request. This is also seen while creating a payment with incorrect parameter values on the Dashboard. | Rectify the validation issues and try again. Check the error description and field parameters for more information about the error. +Check your integration/payment request or reach out to Razorpay. Refer to the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). +--- +`insufficient_funds` | The customer does not have sufficient funds in the account to complete the payment. | Please retry after asking the customer to add funds to their bank account. +--- +`invalid_amount` | Amount or currency passed in the payment request is not supported or invalid. This can arise when you pass a different variable type in the amount field or pass an unsupported amount value. | Check your integration and payment request. +--- +`mandate_not_active` | The registered mandate is no longer active. The customer or bank could have cancelled the mandate. | The customer must re-register for the mandate. +--- +`payment_cancelled` | The customer has explicitly cancelled the payment. The customer could have given a cancellation instruction to their banks. | Please retry after informing the customer to remove the cancellation request. +--- +`payment_declined` | Destination Bank or Gateway has declined the payment due to business or technical reasons. The exact reason in this case is not communicated to Razorpay. | Please retry after some time or reach out to Razorpay. +--- +`payment_failed` | Destination Bank or Gateway has declined the payment due to business or technical reasons. The exact reason in this case is not communicated to Razorpay. | Please retry after some time or reach out to Razorpay. +--- +`payment_mandate_not_active` | The registered mandate is not yet activated at the bank. Banks sometimes take longer to activate the mandates at their end. | Please retry after some time or reach out to Razorpay. +--- +`payment_timed_out` | The bank where the mandate is registered could not debit the customer's account in time. | Please retry after some time or reach out to Razorpay. +--- +`server_error` | Technical error at Razorpay's server. This usually occurs when there is some server issue at Razorpay's end. | Please retry after some time or reach out to Razorpay. +--- +`transaction_limit_exceeded` | The customers have exceeded the credit or debit limit set on their accounts. This error usually arises while doing high value transactions. | Please retry after some time after informing the customer to update their transation limits. + +### Related Information +- [Integrate Recurring Payments Using Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) +- [Charge Customers During Registration - Use Cases and Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/charge-customer-during-registration.md) +- [Supported Banks and Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/supported-banks.md) +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/apis.md) diff --git a/llm-content/payments/recurring-payments/emandate/faqs.md b/llm-content/payments/recurring-payments/emandate/faqs.md new file mode 100644 index 00000000..5dc51ec2 --- /dev/null +++ b/llm-content/payments/recurring-payments/emandate/faqs.md @@ -0,0 +1,394 @@ +--- +title: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Recurring Payments using Emandate. +--- + +# Frequently Asked Questions (FAQs) + +## Registrations + + +### 1. How does the NPCI ENACH registration process work? + + Following is the registration flow of the NPCI ENACH: + + ![NPCI eNACH registration flow diagram](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/enach-registration.jpg.md) + + + +### 2. How does Emanate registration process work with Razorpay’s direct bank partnerships? + + Following is the registration flow of Emanate with Razorpay’s direct bank partnerships + + ![](/docs/assets/images/emandate-registration.jpg) + + + +### 3. Is there a video that we can share with customers to understand the registration flow? + + Yes, you can share the below video with customersto understand the registration flow. + + +[Video: https://www.youtube.com/embed/66tHtGcJjfo] + + + + +### 4. What can I do to ensure the best user experience for Emandate registrations? + + To improve the Emandate registration user experience for your customers: + - Before customers proceed with the authorisation transaction, you can display a message asking your customers to keep their netbanking credentials handy. This will help prevent time-out at the checkout. + - Inform your customers that there might be a ₹1 or ₹2 deduction during the authorisation transaction. This amount will be refunded to your customer in 3-5 bank working days. + + + +### 5. What is the timeline for Emandate token registration confirmation? + + The timeline for token confirmation depends on the authentication method and bank used for registration. Token confirmation is required before you can initiate debits on the mandate. + + **Confirmation Timelines by Authentication Type and Bank** + + + Authentication Type | Bank | Timeline | Details + --- + Debit Card, Netbanking | All Banks (NPCI eNACH) | Real-time | Once an Emandate registration request is created, the token status confirmation happens immediately in real-time. + --- + Aadhaar Card | All Banks (RBL eSign) | T+1 working days | After successful registration payment, the payment status changes to `authorized`. Token moves from `initiated` to `confirmed` based on the T+1 processing schedule below. + --- + Netbanking | ICICI Bank (direct integration) | Real-time | Once an Emandate registration request is created, the token status confirmation happens immediately in real-time. + --- + Netbanking | Axis Bank (direct integration) | Real-time | Once an Emandate registration request is created, the token status confirmation happens immediately in real-time. + --- + Netbanking | HDFC Bank (direct integration) | T+1 working days | After successful registration payment, the payment status changes to `authorized`. Token moves from `initiated` to `confirmed` based on the T+1 processing schedule below. + --- + Netbanking | State Bank of India (direct integration) | T+1 working days | After successful registration payment, the payment status changes to `authorized`. Token moves from `initiated` to `confirmed` based on the T+1 processing schedule below. + + + **T+1 Processing Schedule** + + Authorisation requests are processed based on submission time: + + - Requests created between **T-1 day 9:00 AM** and **T day 9:00 AM** are processed on **T during banking hours**. + - Requests created **after T day 9:00 AM** are processed in the **T+1 cycle**. + + **Important Considerations** + + - Delays: Token confirmation may be delayed up to 5 days in some instances due to bank-side issues or bank holidays. + - Debit timing: Debits can only be initiated after token confirmation is complete. + - NPCI eNACH partner banks: While registrations are instant with NPCI eNACH, partner banks may take up to 2 days to complete their registration process. Debits initiated before the bank completes registration will fail. Wait at least 2 days before retrying a failed debit. + + + +> **INFO** +> +> +> **Handy Tips** +> +> To ensure same-day token registration confirmation, submit your request to Razorpay by 8:59 AM on a bank working day. +> + + + + +### 6. How can I cancel my customer's registered mandates? + + For all mandates registered under ENACH, NPCI offers a facility to cancel the mandates which are either not in use or are requested by the customers to be cancelled. + + You can initiate cancellation and track the status by following these steps: + - Delete the mandate token using [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#delete-the-token) or [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/tokens.md#23-delete-tokens). + - Razorpay will initiate cancellation for the deleted tokens on the next working day. + - On acknowledgement from NPCI for cancellation, you will receive a 'Token Cancelled' [webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#token-cancelled), which can be taken as a confirmation of mandate cancellation. + + ![](/docs/assets/images/emandate-faq-5.jpg) + + + +### 7. Can Razorpay help schedule debits for Emandates? + + Razorpay will take care of your scheduled debits if you use our Subscriptions services. + + Know more about [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md). + + + +### 8. My customers are not able to register via one of the banks. What can I do? + + It may be a temporary issue of bank downtime on NPCI. If you see this as a consistent issue for more than 24 hours, raise a support ticket from your Dashboard. + + + +### 9. Which account types are allowed to sign up for online Emandates? + + Following are the supported account types for online Emandates: + - Savings + - Current + + +> **INFO** +> +> +> **Handy Tips** +> +> - If your customer is a sole proprietor of the business, they can register their Emandates using the `current` account type. +> - Suppose your customer’s business has a corporate cash-credit account. In that case, they can only register using Physical NACH, where we have an option of `cash credit` accounts for mandate registrations. +> + + + + +### 10. Can joint account holders sign up for Emandates? + + Joint accounts have multiple modes of operation. Suppose the customer trying to set up the mandate has access to operate the account without the joint account holder’s consent (mode of operation on account as `either or survivor` or `anyone or survivor`). In that case, they can register the mandates. + + However, if both joint holders’ approval is required for operating the account, then such account holders cannot register with Emandates. + + + +### 11. What are the prerequisites for customers to register using Emandates? + + Customers need to ensure the following while registering for emandates: + 1. Have the details for the selected mode of authentication. + 1. **NetBanking:** Login and Password + 2. **Debit Card:** Card Number, Expiry and Debit Card PIN + 3. **Aadhaar:** Aadhaar Number and Registered mobile number as on Aadhaar + 2. Ensure the bank account used for authentication with NetBanking or Debit Card is the same as the account number used for registration. For Aadhaar based authentication, ensure to map the Aadhaar Number to the bank account on which the mandate is being registered. + 3. Maintain average monthly balance in the bank account where the mandate is being registered. + 4. Ensure that the selected bank account is in the `active` state. + + + +### 12. Which banks are supported for Emandates? + + You can refer to the [Supported Banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/supported-banks.md) page for the list of supported banks for Emandates. + + + +### 13. What information should we collect from a user to successfully register their Emandate? + + You should collect the following information from the customer: + 1. Customer Name + 2. Account Number + 3. IFSC Code + 4. Account Type + 5. Bank Name + + + +### 14. I have recently signed up with Razorpay and my Razorpay account balance is ₹0. I cannot capture my payments and they are stuck in the `authorized` state. What should I do? + + As there is no payment at the time of Emandate registrations, you need to have a sufficient balance in your Razorpay account to pay the transaction charges for registrations. + + We recommend you top up your Razorpay account with a minimum amount to take care of registration charges until you start generating continuous cash flow via Razorpay. + + + +### 15. How do I enable Aadhaar as an auth type for emandates? Do I need to make changes in my Integration to use the aadhaar emandate? + + Aadhaar emandate is available only on request. Raise a request on our [Support Portal](https://razorpay.com/support/#request) to get this feature enabled. + + After it is enabled on your account, pass `auth_type=aadhaar` in the existing emandate APIs. + + +## Debits Presentments + + +### 1. How does the debit presentment work with NPCI ENACH? + + Following is the debit presentment flow of the NPCI ENACH: + + ![](/docs/assets/images/debit_presentment_enach.jpg) + + + +### 2. What is the maximum amount which can be debited from the customers? + + You can set the maximum amount while initiating registrations for your customers. The maximum amount varies depending on the authentication mode using which customers want to set up the mandate. + + If you do not set a limit for the mandate, the maximum limit defaults to ₹1,00,00,000 for Emandates. + + **For Emandates via NPCI** + + The following table lists the auth types and their maximum limit allowed for Emandates via NPCI. + + + **Auth Type** | **Maximum Allowed Limit** | Default Allowed limit(if no max amount mentioned) + --- + Netbanking | ₹1,00,00,000 | ₹1,00,00,000 + --- + Debit Card | ₹1,00,00,000 | ₹1,00,00,000 + --- + Aadhaar | ₹1,00,00,000 | ₹1,00,00,000 + + + **For Emandates - Direct bank integration (SBI, ICICI, Axis)** + + The following table lists the auth type and the maximum limit allowed for Emandates - Direct bank integration (SBI, ICICI, Axis). + + + **Auth Type** | **Maximum Allowed Limit** | Default Allowed limit(if no max amount mentioned) + --- + Netbanking | ₹1,00,00,000 | ₹1,00,00,000 + + + **For Emandates - Direct bank integration (HDFC)** + + The following table lists the auth type and the maximum limit allowed for Emandates - Direct bank integration (HDFC). + + + **Auth Type** | **Maximum Allowed Limit** | Default Allowed limit(if no max amount mentioned) + --- + Netbanking | ₹1,00,000 | ₹1,00,000 + + + + +### 3. Is there a cooling period for Emandates registered via NPCI ENACH for initiating the first debit after completing the registration process? + + The registrations are instant with NPCI ENACH and you can initiate debits immediately. + + However, there are instances where the registration confirmation at the partner bank side has not been completed. It could take up to 2 days to complete this process. + + We have observed that most debits get cleared even when presented as soon as the registration is complete. That said, we recommend waiting for 2 days before you retry after a failed debit. + + + +### 4. Is there a cooling period for Emandates registered via Aadhaar Esign for initiating the first debit after completing the registration process? + + Debits can be initiated once the token status changes to `confirmed`. There is no additional waiting or cooling period required after the successful validation of the Aadhaar eSign. + + + +### 5. Is there a cooling period for Emandates created via Direct Bank Integration (ICICI, Axis, HDFC, SBI) for initiating the first debit after completing the registration process? + + Debits can be initiated once the token status changes to `confirmed`. There is no additional waiting or cooling period required. + + + +### 6. For Emandates, how long does it take a subsequent charge to move from the `created` state to the `authorized` state? + + In the case of Emandate, the process varies from bank to bank and the authentication type used. Based on the integration used during Emandate registration, it can take up to 2 working days for subsequent debit payment authorisation. + + + + Bank | TAT Guidelines | TAT Examples + --- + All Banks under NPCI ENACH | T+2 working days | Debit requests created between **T-1 day 9 AM** and **T day 9 AM** are processed on **T by end of the day**. Requests after **T day 9 AM** are processed in **T+1 cycle**. + --- + All Banks under RBL eSign (registered using Aadhaar) | T+2 working days | Debit requests created between **T-1 day 9 AM** and **T day 9 AM** are processed on **T by end of the day**. Requests after **T day 9 AM** are processed in **T+1 cycle**. + --- + ICICI Bank | Real-time | Debit requests are processed in real-time. + --- + Axis | T+2 working days | Debit requests created between **T-1 day 9 AM** and **T day 9 AM** are processed on **T by end of the day**. Requests after **T day 9 AM** are processed in **T+1 cycle**. + --- + HDFC Bank | T+2 working days | Debit requests created between **T-1 day 9 AM** and **T day 9 AM** are processed on **T by end of the day**. Requests after **T day 9 AM** are processed in **T+1 cycle**. + --- + State Bank of India | T+2 working days | Debit requests created between **T-1 day 9 AM** and **T day 9 AM** are processed on **T by end of the day**. Requests after **T day 9 AM** are processed in **T+1 cycle**. + + + +> **INFO** +> +> +> **Handy Tips** +> +> To ensure same-day debit authorisation, Razorpay must receive the request by 8:59 am on a bank working day. +> + + + + +### 7. Will my debits get processed on holidays as well? + + Customer account debits for Emandates registered with NPCI ENACH will be done on all days, including weekends and public holidays. + + However, settlements for the debit payments captured on weekends and public holidays will only be made on the next working day as per your settlement schedule. + + + +### 8. I am getting an error saying `Customer has to refer to branch to complete registration` while initiating debits for my customers? + + This issue occurs when the bank has not completed the registration at their end. For such cases, you can retry debit after 5 working days. If this issue persists, inform your customers to contact their bank and get their mandate approved. + + + +### 9. I am getting an error saying `Payment failed because emandate is cancelled or inactive` while presenting debits for my customers? + + This failure can occur for 2 reasons: + 1. When the first debit is presented within a few days after registration. This means that the bank has not completed the mandate setup. You can retry after 5 days of the first failure in such cases. + 2. When the debit is presented more than a month after registration, then it means that the customers have cancelled the mandate by approaching their bank. In such cases, you will need to ask customers to register a new mandate. + + + +### 10. The payment status for debit presentment says `authorized` and I have not received a settlement for this payment yet. Why? + + Payments have to be `captured` for the corresponding settlement to take place. You can manually capture the payment from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#manually-capture-payments). + + Alternatively, to avoid manual dependency, you can enable Auto Capture for all your payments from the Dashboard. + + Know more about [Capture Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments). + + + +### 11. When can I retry subsequent debit if the first attempt fails for NPCI ENACH? + + If the first attempt fails, you can retry after 3 days from getting the confirmation or rejection of the last payment, as it may take more than 24 hours. + + For example: + - If the charge fails on 1 November 2023 and you receive the confirmation, you can retry the attempt on 4 November 2023. + - If the charge fails on 1 November 2023 and you receive the confirmation on 2 November 2023, you can retry the attempt on 5 November 2023. + + + +### 12. Will there be any charges applied for subsequent debit failures? + + Yes, we will charge for failed debit attempts after the prescribed retries. Please contact the [support team](https://razorpay.com/support/#request) for information on the exact charges. + + +## Charge Customer During Registration + + +### 1. Is the feature, Charging Customers During Registration, available on all authorisation methods? + + The feature, **Charging Customers During Registration**, is available only on emandate via netbanking. + + + +### 2. Is the feature, Charging Customers During Registration, supported by all banks? + + The feature, **Charging Customers During Registration**, is only supported by HDFC and ICICI. + + + +### 3. How is this feature, Charging Customers During Registration, different from the First Payment Amount feature? + + **First Payment Amount**: + + The first charge is automatically debited after NPCI confirms the mandate. The amount is debited from the customer's account within 2 days of token confirmation. + + **Charging Customers During Registration**: + + The customer is not immediately charged. First, the mandate is registered. We automatically charge the customer the first payment amount only after the mandate is successfully registered. + + + +### 4. What is the maximum amount I can charge a customer immediately using the Charging Customers During Registration feature? + + Currently, we support this for HDFC and ICICI. For HDFC, the maximum amount is ₹1,00,000. For ICICI, it is ₹1,00,00,000. + + +## Payment retries + + +### 1. Can I retry a failed payment? + + Payment re-tries are not automated. You can manually re-initiate the payment for the same order id in case of a failed payment. If the payment for the given order id is successful or refunded, then you cannot use the same order id to initiate the payment. + + However, if the payment has failed due to `insufficient_balance`, you can only re-initiate a payment 3 days after initiating the previous payment. + + + +### 2. How many times can I retry a payment? + + You can manually re-initiate a payment for the same order id, repeatedly, until the payment is successful. Once the payment is successful or refunded, you cannot use that order id to re-initiate the payment. + + However, if the payment has failed due to `insufficient_balance`, you can only re-initiate a payment 3 days after initiating the previous payment. diff --git a/llm-content/payments/recurring-payments/emandate/integrate.md b/llm-content/payments/recurring-payments/emandate/integrate.md new file mode 100644 index 00000000..da04e8ff --- /dev/null +++ b/llm-content/payments/recurring-payments/emandate/integrate.md @@ -0,0 +1,196 @@ +--- +title: Integrate Recurring Payments Using Emandate +description: Know how to integrate Recurring Payments using Emandate as a payment method. +--- + +# Integrate Recurring Payments Using Emandate + +The Recurring Payment integration involves the following steps: + +1. [Emandate Registration](#emandate-registration) +2. [Fetch Emandate Registration Details](#fetch-emandate-registration-details) +3. [Charge Customers](#charge-customers) + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Prerequisites + +- Check supported payment method for Emandate using the [Fetch Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/supported-banks.md#fetch-supported-methods) API. +- Check the list of [Supported Banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/supported-banks.md#emandate) for Emandate and enable the same for your account. + +## Emandate Registration + +Emandate registration is a process of creating a payment checkout form for customers to make **Authorisation Transaction** and register their Emandate. A token will be generated once a customer makes this transaction. + +Using this authorisation transaction, we can authenticate the customer's Emandate and ensure that we can charge them recurring payments. The authorisation transaction can be created using the following methods: + +- [Razorpay Standard Checkout](#using-razorpay-standard-checkout). +- [Registration Link](#using-a-registration-link). + +### Using Razorpay Standard Checkout + +Following is the authorisation transaction flow for Razorpay Standard Checkout method. + +To create checkout form for customers to complete authorisation transaction using the Razorpay Standard Checkout method: + +> **WARN** +> +> +> **Watch Out!** +> +> The authorisation transaction using standard checkout can be created only using Razorpay APIs. +> + +1. [**Create a customer**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-authorization-transaction.md#111-create-a-customer) +This returns a `customer_id`. +1. [**Create an order**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-authorization-transaction.md#112-create-an-order) +This returns an `order_id`. The order must be created for: +1. [**Create authorisation transaction**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-authorization-transaction.md#113-create-an-authorization-payment) +Pass the `customer_id`, `order_id` and a few additional parameters in your checkout to create the authorisation payment. The customer completes the authorisation payment, which generates a `token`. + +#### Video Tutorial + +Watch the below video to learn how to integrate recurring payments via the standard checkout method. + +[Video: https://www.youtube.com/embed/66tHtGcJjfo] + +### Using a Registration Link + +Following is the authorisation transaction flow for Razorpay registration link method: + +![Recurring Payments Using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/recurring-payments-recurring_payments_registration_link.jpg.md) + +For customers to complete the authorisation transaction via a registration link, you should **create a registration link and send it to your customer** + +You can create a Registration Link using: + +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-authorization-transaction.md#121-create-a-registration-link) +- [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link) + +The customer completes the authorisation payment, which generates a `token`. + +> **INFO** +> +> +> **No Need to Create a Customer and Order Separately** +> +> If you use a registration link to create the authorisation transaction, Razorpay automatically creates a customer and the order for you. +> + +#### Video Tutorials + +**Using Dashboard** + +Watch the below video to learn how to integrate recurring payments via the registration link method using Dashboard. + +[Video: https://www.youtube.com/embed/fgYra3f0C74] + +**Using APIs** + +Watch the below video to learn how to integrate recurring payments via the registration link method using APIs. + +[Video: https://www.youtube.com/embed/tQj5F3cotxs] + +#### Registration Link Statuses + +A registration link moves through the following states during its life cycle: + +### Authorisation Payment Statuses + +Once the customer has made the Authorisation Payment, it moves through the following states as per the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md): + +Status | Description | Webhook +--- +Created | Payment is created when a customer enters and submits the payment information. | NA +--- +Authorized | Payment is authorized when the customer’s payment details are successfully authenticated by the bank. | [payment.authorized](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized) +--- +Captured | Indicates that the payment is verified by you. +Once a payment is captured you can [retrieve the token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token). | [payment.captured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-captured) or [order.paid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#order-paid) +--- +Failed | Indicates that the payment has failed. +If the payment has failed, you need to [create an authorisation transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md) again. | [payment.failed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-failed) + +## Fetch Emandate Registration Details + +This is a process of fetching the token that contains the registration details of the customer and checking its status. + +A token represents a mandate registration and is generated after the authorisation transaction is successfully captured. A token contains customer's payment details stored by Razorpay and is used to create a recurring payment. + +> **INFO** +> +> +> **Handy Tips** +> +> For simplicity, tokens are considered to be mandates. Hence, the status of the token determines the status of the mandate registration. +> + +You can search for the tokens using the following: + +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/tokens.md) +- [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-token-status-using-webhooks) + +### Token Statuses + +As the authorisation transaction moves through its different states, the token that is generated also undergoes state changes. Following is the life cycle of a token: + +![ Token life cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rec-pmnts-2_1_1_1.jpg.md) + +Know more about the turnaround time (TAT) for Emandate from the [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/faqs.md#5-what-is-the-timeline-for-emandate-token). + +## Charge Customers + +This is the process of charging customers the actual subsequent amount using the fetched token and customer details. + +You can create subsequent payments using: + +- [Dashboard](#using-the-dashboard) +- [APIs](#using-apis) + +### Using the Dashboard + +To create subsequent payments using the Dashboard: + +1. [**Search for the token and check its status**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) +After the authorisation transaction is complete, a token is generated. You can use the search feature on the Dashboard to find the required token and check its status. +1. [**Charge the token**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#4-charge-the-token) +After you have found the required confirmed token, you can create a subsequent payment by charging the token according to your business needs. + +> **INFO** +> +> +> **Order is Created Automatically** +> +> While creating a subsequent charge using the Dashboard, Razorpay automatically creates an order for you when you charge a token. There is no need to create an order separately. +> + +### Using APIs + +![](/docs/assets/images/rec-pmnts-4_1.jpg) + +To create subsequent payments using APIs: + +1. [**Create a new Order**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-subsequent-payments.md#31-create-an-order-to-charge-the-customer) +Like any other payment, each subsequent payment is tied to a unique order id. Associating a payment with an order id makes it easier to query Razorpay systems and handle multiple payment attempts and allows automatic capturing of payments. +2. [**Create a Payment**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/create-subsequent-payments.md#32-create-a-recurring-payment) +Once the order is created, you can create a payment for it. +After our system validates the payment along with `token_id`, a `razorpay_payment_id` is returned. In some cases, the payment entity returned is in the created state and may take 1 working day for confirmation. + +### Related Information +- [Charge Customers During Registration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/charge-customer-during-registration.md) +- [Supported Banks and Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/supported-banks.md) +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/apis.md) +- [Handle Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/errors.md) diff --git a/llm-content/payments/recurring-payments/emandate/supported-banks.md b/llm-content/payments/recurring-payments/emandate/supported-banks.md new file mode 100644 index 00000000..f8e94117 --- /dev/null +++ b/llm-content/payments/recurring-payments/emandate/supported-banks.md @@ -0,0 +1,3242 @@ +--- +title: Supported Banks +description: Use the Methods API to fetch the list of banks that support recurring payments via Emandate (Netbanking, Debit Card, Aadhaar). +--- + +# Supported Banks + +Use the **Methods API** endpoint to fetch the list of banks that support Emandate payments using Netbanking, Aadhaar (eSign authentication) and Debit card authorisation types. + +/methods + +> **INFO** +> +> +> **[YOUR_KEY_ID] Required** +> +> To fire this API, you need to provide your [KEY_ID] for authorisation. Your [KEY_SECRET] is not required and should not be passed. +> + +```curl: Request +curl -u [YOUR_KEY_ID] \ +-X GET https://api.razorpay.com/v1/methods +```json: Response +{ + "entity": "methods", + "card": true, + "debit_card": true, + "credit_card": true, + "prepaid_card": true, + "card_networks": { + "AMEX": 0, + "DICL": 1, + "MC": 1, + "MAES": 1, + "VISA": 1, + "JCB": 1, + "RUPAY": 1, + "BAJAJ": 0, + "UNP": 0 + }, + "card_subtype": { + "consumer": 1, + "business": 1, + "premium": 0 + }, + "amex": false, + "netbanking": { + "AUBL": "AU Small Finance Bank", + "AIRP": "Airtel Payments Bank", + "BARB_R": "Bank of Baroda - Retail Banking", + "VIJB": "Bank of Baroda - Retail Banking (Erstwhile Vijaya Bank)", + "MAHB": "Bank of Maharashtra", + "CNRB": "Canara Bank", + "CSBK": "Catholic Syrian Bank", + "CBIN": "Central Bank of India", + "DCBL": "DCB Bank", + "DEUT": "Deutsche Bank", + "DLXB": "Dhanlaxmi Bank", + "ESFB": "Equitas Small Finance Bank", + "FSFB": "Fincare Small Finance Bank", + "IBKL": "IDBI", + "IDFB": "IDFC FIRST Bank", + "IDIB": "Indian Bank", + "ALLA": "Indian Bank (Erstwhile Allahabad Bank)", + "IOBA": "Indian Overseas Bank", + "INDB": "Indusind Bank", + "JAKA": "Jammu and Kashmir Bank", + "JSFB": "Jana Small Finance Bank", + "KARB": "Karnataka Bank", + "KVBL": "Karur Vysya Bank", + "LAVB_R": "Lakshmi Vilas Bank - Retail Banking", + "NSPB": "NSDL Payments Bank", + "ORBC": "PNB (Erstwhile-Oriental Bank of Commerce)", + "UTBI": "PNB (Erstwhile-United Bank of India)", + "PSIB": "Punjab & Sind Bank", + "PUNB_R": "Punjab National Bank - Retail Banking", + "RATN": "RBL Bank", + "SVCB": "SVC Co-Operative Bank Ltd.", + "SRCB": "Saraswat Co-operative Bank", + "SIBL": "South Indian Bank", + "TMBL": "Tamilnad Mercantile Bank", + "UCBA": "UCO Bank", + "UJVN": "Ujjivan Small Finance Bank", + "UBIN": "Union Bank of India", + "CORP": "Union Bank of India (Erstwhile Corporation Bank)", + "YESB": "Yes Bank" + }, + "wallet": { + "mobikwik": true, + "payzapp": true, + "olamoney": true, + "airtelmoney": true, + "jiomoney": true + }, + "emi": true, + "upi": true, + "cardless_emi": { + "earlysalary": true + }, + "paylater": [], + "google_pay_cards": false, + "app": { + "cred": 0, + "twid": 0, + "trustly": 0, + "poli": 0, + "sofort": 0, + "giropay": 0 + }, + "gpay": false, + "emi_types": { + "credit": true, + "debit": true, + "offline_credit": false, + "offline_debit": false + }, + "debit_emi_providers": { + "HDFC": 1, + "KKBK": 0, + "INDB": 0, + "ICIC": 0 + }, + "intl_bank_transfer": [], + "fpx": [], + "duitnow_pay": false, + "gift_cards": false, + "instalment": { + "vis": 0 + }, + "nach": true, + "offline_debit_emi_providers": { + "HDFC": 0, + "ICIC": 0, + "KKBK": 0 + }, + "offline_credit_emi_providers": { + "AMEX": 0, + "AUBL": 0, + "BARB": 0, + "CITI": 0, + "CNRB": 0, + "FDRL": 0, + "HDFC": 0, + "HSBC": 0, + "ICIC": 0, + "IDFB": 0, + "INDB": 0, + "JAKA": 0, + "KKBK": 0, + "PUNB": 0, + "RATN": 0, + "SBIN": 0, + "SCBL": 0, + "UTIB": 0, + "YESB": 0, + "ONECARD": 0 + }, + "cod": false, + "offline": false, + "sodexo": false, + "emi_subvention": "customer", + "emi_plans": { + "SCBL": { + "min_amount": 250000, + "plans": { + "3": 11.88, + "6": 13, + "9": 14, + "12": 14 + } + }, + "AMEX": { + "min_amount": 500000, + "plans": { + "3": 14, + "6": 14, + "9": 14, + "12": 14, + "18": 15, + "24": 15 + } + }, + "onecard": { + "min_amount": 250000, + "plans": { + "3": 16, + "6": 16, + "9": 16, + "12": 16, + "18": 16, + "24": 16 + } + }, + "BARB": { + "min_amount": 250000, + "plans": { + "3": 16, + "6": 16, + "9": 16, + "12": 16, + "18": 16, + "24": 16 + } + }, + "HDFC": { + "min_amount": 100000, + "plans": { + "3": 16, + "6": 16, + "9": 16, + "12": 16, + "18": 16, + "24": 16 + } + }, + "KKBK": { + "min_amount": 250000, + "plans": { + "3": 16, + "6": 16, + "9": 16, + "12": 16, + "18": 16, + "24": 16 + } + }, + "ICIC": { + "min_amount": 150000, + "plans": { + "3": 15.99, + "6": 15.99, + "9": 15.99, + "12": 15.99, + "18": 15.99, + "24": 15.99 + } + }, + "YESB": { + "min_amount": 150000, + "plans": { + "3": 16, + "6": 16, + "9": 16, + "12": 16, + "18": 16, + "24": 16 + } + }, + "UTIB": { + "min_amount": 300000, + "plans": { + "3": 16, + "6": 16, + "9": 16, + "12": 16, + "18": 16, + "24": 16 + } + }, + "FDRL": { + "min_amount": 250000, + "plans": { + "3": 15.99, + "6": 15.99, + "9": 15.99, + "12": 15.99, + "18": 15.99, + "24": 15.99 + } + }, + "HSBC": { + "min_amount": 200000, + "plans": { + "3": 15, + "6": 15, + "9": 15, + "12": 15, + "18": 15, + "24": 15 + } + }, + "IDFB": { + "min_amount": 250000, + "plans": { + "3": 16, + "6": 16, + "9": 16, + "12": 16, + "18": 16, + "24": 16, + "36": 16 + } + }, + "INDB": { + "min_amount": 200000, + "plans": { + "3": 16, + "6": 16, + "9": 16, + "12": 16, + "18": 16, + "24": 16, + "36": 16 + } + }, + "RATN": { + "min_amount": 200000, + "plans": { + "3": 13, + "6": 14, + "9": 15, + "12": 15, + "18": 15, + "24": 15 + } + }, + "AUBL": { + "min_amount": 200000, + "plans": { + "3": 16, + "6": 16, + "9": 16, + "12": 16, + "18": 16, + "24": 16 + } + }, + "HDFC_DC": { + "min_amount": 300000, + "plans": { + "3": 16, + "6": 16, + "9": 16, + "12": 16, + "18": 16 + } + } + }, + "emi_options": { + "SCBL": [ + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "3.68", + "processing_fee_plan": { + "type": "percentage", + "percentage": 1 + } + }, + { + "duration": 9, + "interest": 14, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "5.59", + "processing_fee_plan": { + "type": "percentage", + "percentage": 1 + } + }, + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "7.19", + "processing_fee_plan": { + "type": "percentage", + "percentage": 1 + } + }, + { + "duration": 3, + "interest": 11.88, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "1.95", + "processing_fee_plan": { + "type": "percentage", + "percentage": 1 + } + } + ], + "AMEX": [ + { + "duration": 3, + "interest": 14, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "2.29", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 6, + "interest": 14, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "3.96", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 9, + "interest": 14, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "5.59", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "7.19", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "10.95", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "14.07", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + } + ], + "onecard": [ + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "2.61" + }, + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "4.51" + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "6.35" + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "8.15" + }, + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "11.62" + }, + { + "duration": 24, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "14.90" + } + ], + "BARB": [ + { + "duration": 24, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "14.90" + }, + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "2.61" + }, + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "4.51" + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "6.35" + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "8.15" + }, + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "11.62" + } + ], + "HDFC": [ + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "2.61", + "processing_fee_plan": { + "type": "fixed", + "amount": 29900 + } + }, + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "11.62", + "processing_fee_plan": { + "type": "fixed", + "amount": 29900 + } + }, + { + "duration": 24, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "14.90", + "processing_fee_plan": { + "type": "fixed", + "amount": 29900 + } + }, + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "4.51", + "processing_fee_plan": { + "type": "fixed", + "amount": 29900 + } + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "6.35", + "processing_fee_plan": { + "type": "fixed", + "amount": 29900 + } + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 100000, + "merchant_payback": "8.15", + "processing_fee_plan": { + "type": "fixed", + "amount": 29900 + } + } + ], + "KKBK": [ + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "11.62", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 24, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "14.90", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "2.61", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "4.51", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "6.35", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "8.15", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + } + ], + "ICIC": [ + { + "duration": 3, + "interest": 15.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "2.61", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 6, + "interest": 15.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "4.50", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 9, + "interest": 15.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "6.35", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 12, + "interest": 15.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "8.15", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 18, + "interest": 15.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "11.61", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 24, + "interest": 15.99, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "14.89", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + } + ], + "YESB": [ + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "2.61", + "processing_fee_plan": { + "type": "fixed", + "amount": 29900 + } + }, + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "4.51", + "processing_fee_plan": { + "type": "fixed", + "amount": 29900 + } + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "6.35", + "processing_fee_plan": { + "type": "fixed", + "amount": 29900 + } + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "8.15", + "processing_fee_plan": { + "type": "fixed", + "amount": 29900 + } + }, + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "11.62", + "processing_fee_plan": { + "type": "fixed", + "amount": 29900 + } + }, + { + "duration": 24, + "interest": 16, + "subvention": "customer", + "min_amount": 150000, + "merchant_payback": "14.90", + "processing_fee_plan": { + "type": "fixed", + "amount": 29900 + } + } + ], + "UTIB": [ + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "11.62", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + }, + { + "duration": 24, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "14.90", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + }, + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "2.61", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + }, + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "4.51", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "6.35", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "8.15", + "processing_fee_plan": { + "type": "combination", + "percentage": 1, + "amount": 10000 + } + } + ], + "FDRL": [ + { + "duration": 3, + "interest": 15.99, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "2.61" + }, + { + "duration": 6, + "interest": 15.99, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "4.50" + }, + { + "duration": 9, + "interest": 15.99, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "6.35" + }, + { + "duration": 12, + "interest": 15.99, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "8.15" + }, + { + "duration": 18, + "interest": 15.99, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "11.61" + }, + { + "duration": 24, + "interest": 15.99, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "14.89" + } + ], + "HSBC": [ + { + "duration": 3, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "2.45", + "processing_fee_plan": { + "type": "fixed", + "amount": 9900 + } + }, + { + "duration": 6, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "4.23", + "processing_fee_plan": { + "type": "fixed", + "amount": 9900 + } + }, + { + "duration": 9, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "5.97", + "processing_fee_plan": { + "type": "fixed", + "amount": 9900 + } + }, + { + "duration": 12, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "7.67", + "processing_fee_plan": { + "type": "fixed", + "amount": 9900 + } + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "10.95", + "processing_fee_plan": { + "type": "fixed", + "amount": 9900 + } + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "14.07", + "processing_fee_plan": { + "type": "fixed", + "amount": 9900 + } + } + ], + "IDFB": [ + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "2.61", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "8.15", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "11.62", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 24, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "14.90", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 36, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "20.99", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "6.35", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 250000, + "merchant_payback": "4.51", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + } + ], + "INDB": [ + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "2.61", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "4.51", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "6.35", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "8.15", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "11.62", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 24, + "interest": 16, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "14.90", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + }, + { + "duration": 36, + "interest": 16, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "20.99", + "processing_fee_plan": { + "type": "fixed", + "amount": 24900 + } + } + ], + "RATN": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "2.13", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 6, + "interest": 14, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "3.96", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 9, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "5.97", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 12, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "7.67", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "10.95", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 24, + "interest": 15, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "14.07", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + } + ], + "AUBL": [ + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "2.61", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "4.51", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "6.35", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "8.15", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "11.62", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + }, + { + "duration": 24, + "interest": 16, + "subvention": "customer", + "min_amount": 200000, + "merchant_payback": "14.90", + "processing_fee_plan": { + "type": "fixed", + "amount": 19900 + } + } + ], + "HDFC_DC": [ + { + "duration": 6, + "interest": 16, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "4.51", + "processing_fee_plan": { + "type": "fixed", + "amount": 29900 + } + }, + { + "duration": 9, + "interest": 16, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "6.35", + "processing_fee_plan": { + "type": "fixed", + "amount": 29900 + } + }, + { + "duration": 12, + "interest": 16, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "8.15", + "processing_fee_plan": { + "type": "fixed", + "amount": 29900 + } + }, + { + "duration": 18, + "interest": 16, + "subvention": "customer", + "min_amount": 500000, + "merchant_payback": "11.62", + "processing_fee_plan": { + "type": "fixed", + "amount": 29900 + } + }, + { + "duration": 3, + "interest": 16, + "subvention": "customer", + "min_amount": 300000, + "merchant_payback": "2.61", + "processing_fee_plan": { + "type": "fixed", + "amount": 29900 + } + } + ] + }, + "upi_config": [], + "recurring": { + "card": { + "credit": [ + "MasterCard", + "Visa", + "RuPay" + ], + "prepaid": [ + "MasterCard", + "Visa", + "RuPay" + ], + "debit": { + "APMC": "A.P. Mahesh Co-operative Urban Bank", + "AUBL": "AU Small Finance Bank", + "ABHY": "Abhyudaya Co-operative Bank", + "ANDB": "Andhra Bank", + "ASBL": "Apna Sahakari Bank", + "UTIB": "Axis Bank", + "BARB": "Bank of Baroda", + "VIJB": "Bank of Baroda - Retail Banking (Erstwhile Vijaya Bank)", + "BKID": "Bank of India", + "MAHB": "Bank of Maharashtra", + "CITI": "CITI Bank", + "CNRB": "Canara Bank", + "CIUB": "City Union Bank", + "DCBL": "DCB Bank", + "BKDN": "Dena Bank", + "DNSB": "Dombivli Nagari Sahakari Bank", + "ESFB": "Equitas Small Finance Bank", + "FDRL": "Federal Bank", + "PJSB": "Gopinath Patil Parsik Janata Sahakari Bank", + "HCBL": "HASTI Co-operative Bank", + "HDFC": "HDFC Bank", + "HSBC": "HSBC", + "ICIC": "ICICI Bank", + "IBKL": "IDBI", + "IDFB": "IDFC FIRST Bank", + "IDIB": "Indian Bank", + "ALLA": "Indian Bank (Erstwhile Allahabad Bank)", + "IOBA": "Indian Overseas Bank", + "INDB": "Indusind Bank", + "JSFB": "Jana Small Finance Bank", + "JSBL": "Janakalyan Sahakari Bank", + "JANA": "Janaseva Sahakari Bank, Pune", + "KVBL": "Karur Vysya Bank", + "KKBK": "Kotak Mahindra Bank", + "MCBL": "Mahanagar Co-operative Bank", + "MSCI": "Maharashtra State Co-operative Bank", + "ORCB": "Odisha State Co-operative Bank", + "PSIB": "Punjab & Sind Bank", + "PUNB": "Punjab National Bank", + "RATN": "RBL Bank", + "STCB": "SBM Bank", + "SRCB": "Saraswat Co-operative Bank", + "SCBL": "Standard Chartered Bank", + "SBIN": "State Bank of India", + "SYNB": "Syndicate Bank", + "TJSB": "TJSB Sahakari Bank", + "TBSB": "Thane Bharat Sahakari Bank", + "UCBA": "UCO Bank", + "UBIN": "Union Bank of India", + "CORP": "Union Bank of India (Erstwhile Corporation Bank)", + "YESB": "Yes Bank" + } + }, + "emandate": { + "AACX": { + "auth_types": [ + "netbanking", + "aadhaar" + ], + "is_merged_bank": true, + "name": "AKHAND ANAND CO OP BANK LTD", + "bank_code": "HDFC" + }, + "ACUB": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE ARYAPURAM CO OP URBAN BANK LTD", + "bank_code": "HDFC" + }, + "ACUX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE ADARSH CO OP URBAN BANK LTD", + "bank_code": "ICIC" + }, + "ADBX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE AHMEDABAD DISTRICT CO OP BANK LTD", + "bank_code": "GSCB" + }, + "AIRP": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "AIRTEL PAYMENTS BANK LTD" + }, + "AKOX": { + "auth_types": [ + "netbanking", + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE AKOLA URBAN CO OP BANK LTD", + "bank_code": "YESB" + }, + "AMCB": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": false, + "name": "AHMEDABAD MERCANTILE CO-OPBANK LTD" + }, + "AMRX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "AMRELI JILLA MADHYASTHA SAHAKARI BANK LTD", + "bank_code": "GSCB" + }, + "APBL": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "THE ANDHRA PRADESH STATE CO OP BANK LTD" + }, + "APGB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "ANDHRA PRAGATHI GRAMEENA BANK" + }, + "APGX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "ANDHRA PRADESH GRAMEENA VIKAS BANK", + "bank_code": "SBIN" + }, + "ARCX": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "ARUNACHAL PRADESH STATE CO OP APEX BANK LTD", + "bank_code": "YESB" + }, + "ASOX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE ASSOCIATE CO OP BANK LTD", + "bank_code": "YESB" + }, + "AUBL": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "AU SMALL FINANCE BANK" + }, + "BARB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "BANK OF BARODA" + }, + "BBRX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE BANGALORE BANGALORE RURAL AND RAMANAGARA DCCB", + "bank_code": "KSCB" + }, + "BDBL": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "BANDHAN BANK LTD" + }, + "BDSX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": false, + "name": "THE BABASAHEB DESHMUKH SAHAKARI BANK LTD ATPADI" + }, + "BHOX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "BHOPAL CO-OP CENTRAL BANK", + "bank_code": "CBIN" + }, + "BKDX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE BANASKANTHA DIST CENTRAL CO OP BANK LTD", + "bank_code": "GSCB" + }, + "BKID": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "BANK OF INDIA" + }, + "BMPX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE BANASKANTHA MERCANTILE CO OP BANK LTD", + "bank_code": "HDFC" + }, + "BMSX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE BHAGYALAKSHMI MAHILA SAHAKARI BANK LTD", + "bank_code": "HDFC" + }, + "BRMX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "BRAMHAPURI URBAN CO OP BANK LTD", + "bank_code": "HDFC" + }, + "BRUX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE BHARUCH DISTRICT CENTRAL CO OP BANK LTD BHARUC", + "bank_code": "GSCB" + }, + "BSBX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE BARAMATI SAHAKARI BANK LTD", + "bank_code": "HDFC" + }, + "CBIN": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "CENTRAL BANK OF INDIA" + }, + "CGBX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "CHHATTISGARH RAJYA GRAMIN BANK", + "bank_code": "SBIN" + }, + "CHNX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": false, + "name": "THE CHARADA NAGARIK SAHAKARI BANK LTD" + }, + "CIUB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "CITY UNION BANK LTD" + }, + "CLBL": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "CAPITAL SMALL FINANCE BANK LTD" + }, + "CNRB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "CANARA BANK" + }, + "CNSX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE CHEMBUR NAGARIK SAHAKARI BANK", + "bank_code": "ICIC" + }, + "COLX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "COASTAL LOCAL AREA BANK LTD", + "bank_code": "MAHB" + }, + "COMX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE COOP BANK OF MEHSANA LTD", + "bank_code": "IBKL" + }, + "COSB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "THE COSMOS CO-OPERATIVE BANK LTD" + }, + "CRSX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "CG RAJYA SAHAKARI BANK LTD", + "bank_code": "CBIN" + }, + "CSBK": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "CSB BANK LIMITED" + }, + "DBSS": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "DBS BANK INDIA LTD" + }, + "DCBL": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "DCB BANK LTD" + }, + "DCUX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE DARUSSALAM CO OP URBAN BANK LTD", + "bank_code": "HDFC" + }, + "DDCX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "DARJEELING DISTRICT CENTRAL CO OP BANK LTD", + "bank_code": "WBSC" + }, + "DEUT": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "DEUTSCHE BANK AG" + }, + "DGBX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "TELANGANA GRAMEENA BANK", + "bank_code": "SBIN" + }, + "DHUX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE DAHOD URBAN CO OP BANK LTD", + "bank_code": "HDFC" + }, + "DLXB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "DHANALAXMI BANK" + }, + "DMKB": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "DMK JAOLI BANK", + "bank_code": "DMKJ" + }, + "ESAF": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "ESAF SMALL FINANCE BANK LTD", + "bank_code": "ESMF" + }, + "ESFB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "EQUITAS SMALL FINANCE BANK LTD" + }, + "FDRL": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "FEDERAL BANK" + }, + "FINO": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "FINO PAYMENTS BANK LTD" + }, + "GSCB": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "THE GUJARAT STATE CO OP BANK LTD" + }, + "GSSX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "GUARDIAN SOUHARDA SAHAKARI BANK NIYAMITA", + "bank_code": "SVCB" + }, + "HDFC": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "HDFC BANK LTD" + }, + "HPSX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE HIMACHAL PRADESH STATE CO OP BANK LTD", + "bank_code": "YESB" + }, + "HSBC": { + "auth_types": [ + "netbanking", + "aadhaar" + ], + "is_merged_bank": false, + "name": "THE HONGKONG AND SHANGHAI BANKING CORPORATION LTD" + }, + "HUTX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "HUTATMA SAHAKARI BANK LTD", + "bank_code": "IBKL" + }, + "IBKL": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "IDBI BANK" + }, + "ICIC": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "ICICI BANK LTD" + }, + "IDFB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "IDFC FIRST BANK LTD" + }, + "IDIB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "INDIAN BANK" + }, + "INDB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "INDUSIND BANK" + }, + "IOBA": { + "auth_types": [ + "netbanking", + "aadhaar" + ], + "is_merged_bank": false, + "name": "INDIAN OVERSEAS BANK" + }, + "IPCX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "INDORE PREMIER CO OP BANK LTD INDORE", + "bank_code": "CBIN" + }, + "IPPB": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "INDIA POST PAYMENTS BANK LTD", + "bank_code": "IPOS" + }, + "JAKA": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "THE JAMMU AND KASHMIR BANK LTD" + }, + "JANA": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "JANASEVA SAHAKARI BANK LTD PUNE" + }, + "JBHX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": " JILA SAHAKRI KENDRIYA BANK MARYADIT BHIND", + "bank_code": "CBIN" + }, + "JBIX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHKARI KENDRIYA BANK MARYADIT BILASPUR", + "bank_code": "UTIB" + }, + "JBMX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT SAGAR", + "bank_code": "CBIN" + }, + "JCHX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT CHHATARPUR", + "bank_code": "CBIN" + }, + "JGWX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI BANK MYDT GWALIOR", + "bank_code": "CBIN" + }, + "JHSX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT HOSHANGABAD", + "bank_code": "CBIN" + }, + "JIBX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT ,BALAGHAT", + "bank_code": "CBIN" + }, + "JICX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT CHHINDWARA", + "bank_code": "CBIN" + }, + "JIDX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHKARI KENDRIYA BANK MYDT DAMOH", + "bank_code": "CBIN" + }, + "JIGX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT ,GUNA", + "bank_code": "CBIN" + }, + "JIKX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDARIYA BANK MYDT KHANDWA", + "bank_code": "CBIN" + }, + "JIMX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT MANDLA", + "bank_code": "CBIN" + }, + "JIOX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT SHAHDOL", + "bank_code": "CBIN" + }, + "JJHX": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT,JHABUA", + "bank_code": "CBIN" + }, + "JJSB": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "JALGAON JANATA SAHKARI BANK LTD" + }, + "JKDX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MYDT JABALPUR", + "bank_code": "CBIN" + }, + "JKHX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT ,KHARGONE", + "bank_code": "CBIN" + }, + "JKMX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT JAGDALPUR", + "bank_code": "UTIB" + }, + "JKRX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILLA SAHAKARI KENDRIYA BANK MYDT RAISEN", + "bank_code": "CBIN" + }, + "JLSX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MYDT VIDISHA", + "bank_code": "CBIN" + }, + "JMAX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MYDT MANDSAUR", + "bank_code": "CBIN" + }, + "JMBX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT BETUL", + "bank_code": "CBIN" + }, + "JMCX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JALNA MERCHANTS CO OP BANK LTD", + "bank_code": "HDFC" + }, + "JMDX": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHKARI KENDRIYA BANK MYDT DATIA", + "bank_code": "CBIN" + }, + "JMOX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT MORENA", + "bank_code": "CBIN" + }, + "JMYX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MYDT DURG", + "bank_code": "UTIB" + }, + "JNAX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT,NARSINGHPUR", + "bank_code": "CBIN" + }, + "JNDX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE JUNAGADH JILLA SAHAKARI BANK LTD", + "bank_code": "GSCB" + }, + "JPAX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MYDT PANNA", + "bank_code": "CBIN" + }, + "JRAX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT RATLAM", + "bank_code": "CBIN" + }, + "JRKX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MYDT UJJAIN", + "bank_code": "CBIN" + }, + "JRNX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT RAJNANDGAON", + "bank_code": "UTIB" + }, + "JSBL": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": false, + "name": "JANAKALYAN SAHAKARI BANK" + }, + "JSBP": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": false, + "name": "JANATA SAHAKARI BANK LTD" + }, + "JSDX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT,DHAR", + "bank_code": "CBIN" + }, + "JSEX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT ,SEHORE", + "bank_code": "CBIN" + }, + "JSFB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "JANA SMALL FINANCE BANK LTD" + }, + "JSHX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MYDT SHAJAPUR", + "bank_code": "CBIN" + }, + "JSKX": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MARYADIT RAIPUR", + "bank_code": "UTIB" + }, + "JSSX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": false, + "name": "JANATA SAHAKARI BANK LTD SATARA" + }, + "JSTX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "JILA SAHAKARI KENDRIYA BANK MYDT SATNA", + "bank_code": "CBIN" + }, + "JUCX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE JUNAGADH COMMERCIAL CO OP BANK LTD", + "bank_code": "HDFC" + }, + "KACE": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "THE KANGRA CENTRAL CO OP BANK LTD" + }, + "KARB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "KARNATAKA BANK LTD" + }, + "KARX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE KAIRA DISTRICT CENTRAL CO OP BANK LTD", + "bank_code": "YESB" + }, + "KBSX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "KRISHNA BHIMA SAMRUDDHI LOCAL AREA BANK", + "bank_code": "HDFC" + }, + "KCCB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "THE KALUPUR COMMERCIAL CO OP BANK" + }, + "KDIX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "SHREE KADI NAGARIK SAHAKARI BANK LTD", + "bank_code": "YESB" + }, + "KJSB": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "THE KALYAN JANATA SAHAKARI BANK LTD" + }, + "KKBK": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "KOTAK MAHINDRA BANK LTD" + }, + "KLGB": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": false, + "name": "KERALA GRAMIN BANK" + }, + "KMCB": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "KOKAN MERCANTILE CO OP BANK LTD", + "bank_code": "KKBK" + }, + "KNBX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE KALOL NAGARIK SAHAKARI BANK LTD", + "bank_code": "IBKL" + }, + "KNSB": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "KURLA NAGARIK SAHAKARI BANK LTD", + "bank_code": "ICIC" + }, + "KRNX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE KARNAVATI CO OP BANK LTD", + "bank_code": "KKBK" + }, + "KUKX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE KUKARWADA NAGARIK SAHAKARI BANK LTD", + "bank_code": "HDFC" + }, + "KVBL": { + "auth_types": [ + "netbanking", + "aadhaar" + ], + "is_merged_bank": false, + "name": "KARUR VYSA BANK" + }, + "KVGB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "KARNATAKA VIKAS GRAMEENA BANK" + }, + "MADX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "MADHYANCHAL GRAMIN BANK", + "bank_code": "SBIN" + }, + "MAHB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "BANK OF MAHARASHTRA" + }, + "MDGX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "RAJASTHAN MARUDHARA GRAMIN BANK", + "bank_code": "SBIN" + }, + "MDMX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "MANN DESHI MAHILA SAHKARI BANK LTD", + "bank_code": "YESB" + }, + "MERX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "MEGHALAYA RURAL BANK", + "bank_code": "SBIN" + }, + "MGBX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "MAHARASHTRA GRAMIN BANK", + "bank_code": "MAHB" + }, + "MHSX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "MAHESH SAHAKARI BANK LTD PUNE", + "bank_code": "HDFC" + }, + "MNBX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "MAHILA CO OP NAGARIK BANK LTD BHARUCH", + "bank_code": "HDFC" + }, + "MPRX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "MADHYA PRADESH RAJYA SAHAKARI BANK MARYADIT", + "bank_code": "CBIN" + }, + "MSNU": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": false, + "name": "THE MEHSANA URBAN CO OP BANK" + }, + "MSNX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE MEHSANA DISTRICT CENTRAL CO OP BANK LTD", + "bank_code": "GSCB" + }, + "MUBL": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "THE MUNICIPAL CO OP BANK LTD" + }, + "MUSX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE MUSLIM CO OP BANK LTD", + "bank_code": "HDFC" + }, + "MVTX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": false, + "name": "THE MUVATTUPUZHA URBAN CO OPERATIVE BANK LTD" + }, + "MYAX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE MEGHALAYA CO OP APEX BANK LTD", + "bank_code": "YESB" + }, + "MZRX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "MIZORAM RURAL BANK", + "bank_code": "SBIN" + }, + "NAWX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE NAWANAGAR CO OP BANK LTD", + "bank_code": "IBKL" + }, + "NCBL": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE NATIONAL CO OP BANK LTD", + "bank_code": "KKBK" + }, + "NGKX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "NAGRIK SAHAKARI BANK MARYADIT GWALIOR", + "bank_code": "INDB" + }, + "NGSB": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": false, + "name": "NAGPUR NAGARIK SAHAKARI BANK LTD" + }, + "NJCX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE NAV JEEVAN CO OP BANK LTD", + "bank_code": "ICIC" + }, + "NMCX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "NAVI MUMBAI CO OP BANK LTD", + "bank_code": "IBKL" + }, + "NNSB": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": false, + "name": "NUTAN NAGARIK SAHAKARI BANK LTD" + }, + "NSPB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "NSDL PAYMENTS BANKS LTD" + }, + "PABX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "TAMIL NADU GRAMA BANK", + "bank_code": "IDIB" + }, + "PANX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE PANCHMAHAL DISTRICT CO OP BANK LTD", + "bank_code": "GSCB" + }, + "PBGX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "PUDUVAI BHARATHIAR GRAMA BANK", + "bank_code": "IDIB" + }, + "PDSX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "PRIYADARSHANI NAGARI SAHAKARI BANK LTD JALNA", + "bank_code": "KKBK" + }, + "PGBX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "KARNATAKA GRAMIN BANK", + "bank_code": "PKGB" + }, + "PMEC": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": false, + "name": "PRIME CO OP BANK LTD" + }, + "PNCX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE PANIPAT URBAN CO OP BANK LTD", + "bank_code": "YESB" + }, + "PPBX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "PUNE PEOPLES CO OP BANK LTD", + "bank_code": "IBKL" + }, + "PSIB": { + "auth_types": [ + "netbanking", + "aadhaar" + ], + "is_merged_bank": false, + "name": "PUNJAB AND SIND BANK" + }, + "PUNB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "PUNJAB NATIONAL BANK" + }, + "PYTM": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "PAYTM PAYMENTS BANK LTD" + }, + "QUCX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE QUILON CO OP URBAN BANK LTD", + "bank_code": "IBKL" + }, + "RACX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "RAJKOT COMMERCIAL CO OP BANK LTD", + "bank_code": "ICIC" + }, + "RATN": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "RBL BANK LIMITED" + }, + "RDCX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "RAIGAD DISTRICT CENTRAL CO OP BANK LTD", + "bank_code": "IBKL" + }, + "RJTX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "SHRI RAJKOT DISTRICT CO OP BANK LTD", + "bank_code": "GSCB" + }, + "RSSX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "RAJARSHI SHAHU SAHAKARI BANK LTD", + "bank_code": "HDFC" + }, + "SADX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE SABARKANTHA DISTRICT CENTRAL CO OP BANK LTD", + "bank_code": "GSCB" + }, + "SAGX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "SAURASHTRA GRAMIN BANK", + "bank_code": "SBIN" + }, + "SBCX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE SULTANS BATTERY CO OP URBAN BANK LTD", + "bank_code": "ICIC" + }, + "SBIN": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "STATE BANK OF INDIA" + }, + "SCBL": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "STANDARD CHARTERED BANK" + }, + "SDCB": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": false, + "name": "THE SURAT DISTRICT CO OP BANK" + }, + "SEWX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "SHRI MAHILA SEWA SAHAKARI BANK LTD", + "bank_code": "HDFC" + }, + "SHIX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "SHIVALIK SMALL FINANCE BANK LTD", + "bank_code": "SMCB" + }, + "SIBL": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "THE SOUTH INDIAN BANK LIMITED" + }, + "SMBX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "SAMPADA SAHAKARI BANK LTD PUNE", + "bank_code": "IBKL" + }, + "SNSX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "SMRITI NAGRIK SAHAKARI BANK", + "bank_code": "YESB" + }, + "SPBX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "SAPTAGIRI GRAMEENA BANK", + "bank_code": "IDIB" + }, + "SPCB": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "THE SURAT PEOPLES CO OP BANK LTD" + }, + "SPCX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE SHIRPUR PEOPLES CO OP BANK LTD", + "bank_code": "KKBK" + }, + "SRCB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "SARASWAT BANK" + }, + "STCB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "SBM BANK INDIA LTD" + }, + "SUNB": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "SURAT NATIONAL CO OP BANK LTD", + "bank_code": "HDFC" + }, + "SURY": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "SURYODAY SMALL FINANCE BANK LTD" + }, + "SVAX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "SRI VASAVAMBA CO OP BANK LTD", + "bank_code": "IBKL" + }, + "SVCB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "SVC CO OP BANK LTD" + }, + "SVCX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "SARVODAYA COMMERICAL CO OP BANK LTD", + "bank_code": "IBKL" + }, + "TASX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE ANNASAHEB SAVANT CO OP URBAN BANK MAHAD LTD", + "bank_code": "HDFC" + }, + "TBSB": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": false, + "name": "THANE BHARAT SAHAKARI BANK LTD" + }, + "TCBX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE CO OP BANK OF RAJKOT LTD", + "bank_code": "YESB" + }, + "TGCX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "TAMLUK GHATAL CENTRAL CO OP BANK LTD", + "bank_code": "WBSC" + }, + "TGNX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE GANDHINAGAR NAGRIK CO OP BANK LTD", + "bank_code": "HDFC" + }, + "TMBL": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "TAMILNAD MERCANTILE BANK LTD" + }, + "TSIX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE SHILLONG CO OP URBAN BANK LTD", + "bank_code": "IBKL" + }, + "UBIN": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "UNION BANK OF INDIA" + }, + "UCBA": { + "auth_types": [ + "netbanking", + "aadhaar" + ], + "is_merged_bank": false, + "name": "UCO BANK" + }, + "UGBX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "UTKAL GRAMEEN BANK", + "bank_code": "SBIN" + }, + "USFB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "UJJIVAN SMALL FINANCE BANK LTD", + "bank_code": "UJVN" + }, + "UTGX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "UTTARAKHAND GRAMIN BANK", + "bank_code": "SBIN" + }, + "UTIB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "AXIS BANK" + }, + "UTKS": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "UTKARSH SMALL FINANCE BANK LTD" + }, + "VARA": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "THE VARACHHA CO OP BANK LTD" + }, + "VERX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE VERAVAL MERCANTILE CO OP BANK LTD", + "bank_code": "HDFC" + }, + "VGBX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "JHARKHAND RAJYA GRAMIN BANK", + "bank_code": "SBIN" + }, + "VIDX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "VIDYASAGAR CENTRAL CO OP BANK LTD", + "bank_code": "WBSC" + }, + "VIJX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE VIJAY CO OP BANK LTD", + "bank_code": "HDFC" + }, + "VISX": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": true, + "name": "THE VISAKHAPATNAM CO OP BANK LTD", + "bank_code": "IBKL" + }, + "VVCX": { + "auth_types": [ + "aadhaar" + ], + "is_merged_bank": true, + "name": "THE VALLABH VIDYANAGAR COMMERCIAL BANK LTD", + "bank_code": "HDFC" + }, + "YESB": { + "auth_types": [ + "netbanking", + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "YES BANK" + }, + "ZCBL": { + "auth_types": [ + "aadhaar", + "debitcard" + ], + "is_merged_bank": false, + "name": "THE ZOROASTRIAN CO OP BANK LTD" + } + }, + "upi": true, + "upi_autopay": { + "collect": true, + "intent": true + }, + "nach": true + }, + "upi_intent": true +} +``` + +#### Related Information +- [Integrate Recurring Payments Using Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) +- [Charge Customers During Registration - Use Cases and Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/charge-customer-during-registration.md) +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/apis.md) +- [Handle Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/errors.md) diff --git a/llm-content/payments/recurring-payments/glossary.md b/llm-content/payments/recurring-payments/glossary.md new file mode 100644 index 00000000..e938b655 --- /dev/null +++ b/llm-content/payments/recurring-payments/glossary.md @@ -0,0 +1,23 @@ +--- +title: Glossary +description: Important terms related to Razorpay Recurring Payments. +--- + +# Glossary + +The following table lists all the commonly used terms and their definitions used in Recurring Payments: + +Term | Definition +--- +Customer | The person for whom you are creating the recurring payment or authorisation transaction. +--- +Order | Every payment should have an order associated with it. You must create a separate order for the authorisation transaction and every subsequent charge. +--- +Authorisation Transaction | The payment made by the customer to authorise the selected payment method. +--- +Authorisation Payment | One of the ways of collecting an authorisation transaction using the Razorpay Standard Checkout. +--- +Registration Link | One of the ways of collecting an authorisation transaction using a link sent to the customer. +--- +Token | When a customer's selected payment method is authorised, a token is generated. A token represents mandate registration. +--- diff --git a/llm-content/payments/recurring-payments/paper-nach/apis.md b/llm-content/payments/recurring-payments/paper-nach/apis.md new file mode 100644 index 00000000..0ece3833 --- /dev/null +++ b/llm-content/payments/recurring-payments/paper-nach/apis.md @@ -0,0 +1,91 @@ +--- +title: Recurring Payments APIs for Paper NACH +description: List of Recurring Payments APIs available for Paper NACH. +--- + +# Recurring Payments APIs for Paper NACH + +You can use the Recurring Payments APIs to perform various actions using Paper NACH as a payment method. + +## API-wise Integration Checklist for Paper NACH + +### Paper NACH Registration using Standard Checkout +- Enable webhooks to check the status of the [token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-token-status-using-webhooks) and [payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-payment-status-using-webhooks). +- We recommend that you create a single customer id rather than multiple customer ids for the same customer. If their details change, you can use the [Edit Customer Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md#edit-customer-details) API. Duplicate validation is done based on email id and phone number. +- Use the `fail_existing : "1"` parameter while [creating a customer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-authorization-transaction.md#111-create-a-customer). This helps reduce the number of customer id being created multiple times and will help in your reconciliation process. +- Use the [Payments Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) API to check for any ongoing downtimes that might affect the NACH registration. +- Ensure to pass the below parameters while creating an order: + 1. `currency` as `INR`. + 2. `amount` as `0`. + 3. `description` of the link. + 4. `method` as `nach`. + 5. Token details such as: + - `auth_type` as `physical` + - Bank account details such as `account_number`, `ifsc_code` and `beneficiary_name`. + - Any additional information to be printed on the NACH form that your customer will sign. +- For the custom checkout flow to upload the NACH form, you can use the [Upload the NACH File via Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) custom API. +- To create an authorisation payment, download the Paper NACH form and send it to customers. + - The image should be in jpeg, jpg and png formats. + - The maximum file size is 6 MB. + - You can either ask customers to fill the form and upload it using the [Upload via Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-authorization-transaction.md#1131-upload-the-nach-file-via-checkout) API or upload the received form using the [create NACH File](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-authorization-transaction.md#1132-upload-the-nach-file-via-api) API. + - Ensure you pass the mandatory parameters, such as `"recurring": "1"`. +- After the authorisation payment is made, we request you to verify the payment signature at your backend. +- To check the status of the token id use the [Fetch Token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/tokens.md) API. +- You can use the [Fetch a Payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md) API to know the status of the payment. + +### Paper NACH Registration using a Registration Link +- Enable webhooks to check the status of the [token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-token-status-using-webhooks) and [payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-payment-status-using-webhooks) and the [registration link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-registration-link-status-using-webhooks) using APIs. +- Ensure to pass the below parameters while creating a registration link using the API: + 1. Customer details such as `name`, `email` and `contact`. + 2. `sms_notify` and `email_notify` as `true` to send notifications to customers. + 3. `amount` as `0` and `type` as `link`. + 4. `description` of the link. +- To check the status of the token id use the [Fetch Token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/tokens.md) API. +- The following table indicates the time required to update the token status from the `initiated` state to the `confirmed` state for the physical mandates. + +Method | Bank | TAT Guidelines +--- +Paper NACH | All Banks | Up to ₹ 5,00,000, T+5 working days. + More than ₹ 5,00,000, T+10 working days. + +### Create Subsequent Payments +- Ensure the amount does not exceed the max amount set while [creating an order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-authorization-transaction.md#112-create-an-order). +- Ensure the `token_id` passed is for the linked `customer_id` while creating a recurring payment. +- Use [webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/subscribe-to-webhooks.md) to get real-time updates of payment. + +## List of Recurring Payments APIs + +The table below lists the various Recurring Payments APIs available for Paper NACH and gives a brief description of each API: + +API | Description +--- +[Create Authorisation Transaction using Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-authorization-transaction.md#11-using-razorpay-standard-checkout) | API to create an authorisation transaction using Razorpay Checkout. +--- +[Create Authorisation Transaction using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-authorization-transaction.md#12-using-a-registration-link) | API to create an authorisation transaction using Registration Link. +--- +[Fetch Tokens using Order id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/tokens.md#21-fetch-payment-id-using-order-id) | API to fetch tokens using the Order id. +--- +[Fetch Tokens using Payment id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/tokens.md#22-fetch-token-by-payment-id) | API to fetch tokens using the Payment id. +--- +[Fetch Tokens using Customer id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/tokens.md#23-fetch-tokens-by-customer-id) | API to fetch tokens using the Customer id. +--- +[Delete Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/tokens.md#24-delete-tokens) | API to delete tokens. +--- +[Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-subsequent-payments.md) | API to create subsequent payments. + +### Registration and Charge First Payment Together + +API | Description +--- +[Create Authorisation Transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/auto-debit.md#1-create-an-authorization-transaction) | API to create an authorisation transaction. +--- +[Fetch Tokens using Payment id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/auto-debit.md#21-fetch-token-by-payment-id) | API to fetch tokens using the Payment id. +--- +[Fetch Tokens using Customer id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/auto-debit.md#22-fetch-tokens-by-customer-id) | API to fetch tokens using the Customer id. +--- +[Delete Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/auto-debit.md#23-delete-tokens) | API to delete tokens. +--- +[Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/auto-debit.md#3-create-subsequent-payments) | API to create subsequent payments. + +### Related Information +- [Integrate Recurring Payments Using Paper NACH](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/integrate.md) diff --git a/llm-content/payments/recurring-payments/paper-nach/faqs.md b/llm-content/payments/recurring-payments/paper-nach/faqs.md new file mode 100644 index 00000000..97925984 --- /dev/null +++ b/llm-content/payments/recurring-payments/paper-nach/faqs.md @@ -0,0 +1,212 @@ +--- +title: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Recurring Payments using Paper NACH. +--- + +# Frequently Asked Questions (FAQs) + +## Registration + + +### 1. How can I create physical mandates? + + You can generate and submit physical mandates from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md) or [using our APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md). + + + +### 2. How does the NACH registration process work? + + Following is the registration flow of the NACH: + + ![](/docs/assets/images/nach-registration.jpg) + + + +### 3. Which account types are supported for Paper NACH registrations? + + Following are the account types supported for Paper NACH: + - `savings` (default) + - `current` + - `cc` (Cash Credit) + - `nre` (SB-NRE) + - `nro` (SB-NRO) + + + +### 4. What formats are supported when uploading the NACH form? + + The signed NACH form can only be uploaded as an image. We support the following file formats: + - .JPG + - .JPEG + - .PNG + + + +### 5. What do I do if I get an error when uploading the NACH form? + + If you get an error while uploading the NACH form, you can try to upload the form again. You can retry the upload as many times as you want, until a successful upload. + + +> **INFO** +> +> +> **Handy Tips** +> +> A few things to keep in mind when uploading the signed NACH form: +> - Do not change or write over any of the fields on the form. +> - Do not crop the border. +> - Review the information, sign and upload the form. +> + + + Below is a sample NACH form. + + ![Nach Form Sample](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/recurring-payments-sample-nach-form.jpg.md) + + + +### 6. Are there any additional requirements to set up recurring payments via Paper NACH for a current account? + + If you want to set up recurring payments on a current account via Paper NACH, you might be required to add your company seal on the NACH form. Use the blank space available for the 2nd and 3rd signatory to add the seal. + + + +### 7. For physical mandates, how long does it take for the token status to move from the `initiated` state to the `confirmed` state? + + The following table indicates the time required to update the token status from `initiated` state to the `confirmed` state for the physical mandates: + + + Bank | Expected Time to Complete + --- + All Banks | T+5 working days. + + + + +> **INFO** +> +> +> **Handy Tips** +> +> The registration token confirmation can take up to 5 to 7 days in some cases. +> + + + + + +### 8. Which banks support Recurring Payments through Paper NACH? + + All banks support Recurring Payments through Paper NACH. You can get the exhaustive list of banks [here](https://www.npci.org.in/what-we-do/nach/live-members/live-banks). + + + +### 9. How can I get access to the NACH form which the customer has signed? + + You can raise a ticket with our support team by mentioning the registered mandate's `token id` or the `payment id` used for registration. Our team will share the corresponding signed copies with you. + + + +### 10. What should I do if I have not received an update on my customer’s NACH registration for more than 30 days? + + If you do not receive an update for more than 30 days, the mandate registration has most likely failed. You can share the payment IDs with Razorpay support to enquire about these cases and we will get the payment status checked and updated. + + + +### 11. What can I do to ensure the best user experience for physical mandate registrations? + + To improve the Emandate registration user experience for your customers: + - Before customers proceed with the authorisation transaction, you can display a message asking your customers to keep their netbanking credentials handy. This will help prevent time-out at the checkout. + - Inform your customers that there might be a ₹1 or ₹2 deduction during the authorisation transaction. This amount will be refunded to your customer in 3-5 bank working days. + + + +### 12. Can I cancel a physical Mandate? + + Yes. You can use the cancel a physical mandate by deleting the token from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#delete-the-token) or [using APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/tokens.md#24-delete-tokens). + + + +### 13. What are the errors I get while uploading the NACH file? + + The below table lists the errors that may appear while uploading the NACH file, the reason, explanation and next steps: + + + Reason | Explanation | Next Steps + --- + `unknown_file_type` | The file type of the image is not supported. | Upload an image that is in either of `.jpeg`, `.jpg` or `.jpg` formats. + --- + `file_size_exceeds_limit` | The file size exceeds the permissible limits. | Upload an image of smaller size. + --- + `image_not_clear` | The uploaded image is not clear. This can either be due to poor resolution or because part of the image is cropped. | Upload an image with better quality without any cropping of the form. + --- + `form_mismatch` | The ID of the uploaded form does not match with that in our records. | Check that the form is uploaded against the correct order ID. + --- + `form_signature_missing` | The signature of the customer is either missing or could not be detected. | Check that the customer has signed in the appropriate box and that the image uploaded is clear. For current account, a company stamp may also be required. + --- + `form_data_mismatch` | One or more of the fields on the NACH form do not match with that in our records. | Check that the image is clear and that the data has not been tampered with before uploading again. + --- + `form_status_pending` | A form against this order is pending action on the destination bank. A new form cannot be submitted till a status is received. | Wait for an update from the destination bank on the approval/rejection of the mandate. + + + + +### 5. Is there a cooling period for Paper NACH mandates for initiating the first debit after completing the registration process? + + Debits can be initiated once the token status changes to `confirmed`. There is no additional waiting or cooling period required. + + +## Debits Presentments + + +### 1. The payment status for debit presentment says `authorized` and I have not received a settlement for this payment yet. Why? + + Payments have to be `captured` for the corresponding settlement to take place. You can manually capture the payment from the Dashboard. + + Alternatively, to avoid manual dependency, you can enable Auto Capture for all your payments from the Dashboard. + + + +### 2. How does the debit presentment work with NACH? + + Following is the debit presentment flow of the NPCI ENACH: + + ![](/docs/assets/images/debit_presentment_enach.jpg) + + + +### 3. Is there a limit on the debit amount in physical NACH? + + You can set the maximum amount while initiating registrations for your customers. The maximum limit you can set for NACH mandates is ₹1,00,00,000. + + If you do not set a limit for the mandate, the maximum limit defaults to ₹1,00,00,000 for NACH. + + + +### 4. What is the TAT to process the debit after creating the payment? + + The following table indicates the time required to update the token status from `created` state to the `authorized` state for the physical mandates: + + + Bank | TAT Guidelines | Details + --- + All Banks | T+2 working days | Debit requests created between **T-1 day 9 AM** and **T day 9 AM** are processed on **T by end of the day**. Requests after **T day 9 AM** are processed in **T+1 cycle**. + + + +> **WARN** +> +> +> **Handy Tips** +> +> To ensure same-day debit authorisation, Razorpay must receive the request by 8:59 am on a bank working day. +> + + + + +### 5. Will my debits get processed on holidays as well? + + Customer account debits for Emandates registered with Paper NACH will be done on all days, including weekends and public holidays. + + However, settlements for the debit payments captured on weekends and public holidays will only be made on the next working day as per your settlement schedule. diff --git a/llm-content/payments/recurring-payments/paper-nach/integrate.md b/llm-content/payments/recurring-payments/paper-nach/integrate.md new file mode 100644 index 00000000..a71b8902 --- /dev/null +++ b/llm-content/payments/recurring-payments/paper-nach/integrate.md @@ -0,0 +1,179 @@ +--- +title: Integrate Recurring Payments Using Paper NACH +description: Integrate Recurring Payments using Paper NACH as a payment method. +--- + +# Integrate Recurring Payments Using Paper NACH + +Recurring Payment integration involves the following steps: + +1. [NACH Mandate Registration](#nach-mandate-registration) +2. [Fetch NACH Mandate Registration Details](#fetch-nach-mandate-registration-details) +3. [Charge Customers](#charge-customers) + +## Prerequisites + +- Raise a request with our [Support team](https://razorpay.com/support/#request) to get Recurring Payments (NACH) activated on your account you are trying to integrate. +- Check if the NACH is enabled using the [Fetch Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/supported-banks.md#fetch-supported-methods) API. + +## NACH Mandate Registration + +Mandate registration is a process of creating a payment checkout form for customers to make **Authorisation Transaction** and register their NACH mandate. A token will be generated once a customer makes this transaction. + +Using this authorisation transaction, we can authenticate the customer's NACH mandate and ensure that we can charge them recurring payments. + +The flow to complete an authorisation transaction using paper NACH is a little different from the regular recurring payment flow. The flow when using paper NACH is: + +1. Create a customer. +2. Create an order by passing the `customer_id` and method `nach`. When you do this, Razorpay generates a NACH form with the customer information pre-filled and ready to sign. +3. The customer signs the form. The customer can obtain the form in one of the following ways: + - You can download the form from the Dashboard and send it to the customer. + - Download from the Hosted page (in the case of registration links). +4. The signed form is uploaded to Razorpay. This can be done in one of the following ways: + - Using the Standard Checkout page. + - Hosted page (in the case of registration links). + - The customer can send you the form and you can upload the form for the customer. The acceptable image formats and size are: + - .jpeg + - .jpg + - .png + - Maximum accepted size is 6 MB. + +Once the details are validated, the authorisation transaction is completed and a token is generated. You can charge your customer as per your business model once the token status changes to `confirmed`. + +The authorisation transaction can be created using the following methods: + +- [Razorpay Standard Checkout](#using-razorpay-standard-checkout). +- [Registration Link](#using-a-registration-link). + +### Using Razorpay Standard Checkout + +Following is the authorisation transaction flow for Razorpay Standard Checkout method. + +To create checkout form for customers to complete authorisation transaction using the Razorpay Standard Checkout method: + +> **WARN** +> +> +> **Watch Out!** +> +> The authorisation transaction using standard checkout can be created only using Razorpay APIs. +> + +1. [**Create a customer**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-authorization-transaction.md#111-create-a-customer) +This returns a `customer_id`. +1. [**Create an order**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-authorization-transaction.md#112-create-an-order) +This returns an `order_id`. +1. [**Create authorisation transaction**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-authorization-transaction.md#113-create-an-authorization-payment) +Pass the `customer_id`, `order_id` and a few additional parameters in your checkout to create the authorisation payment. The customer completes the authorisation payment, which generates a `token`. + +### Using a Registration Link + +Following is the authorisation transaction flow for Razorpay registration link method: + +![Recurring Payments Using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/recurring-payments-recurring_payments_registration_link.jpg.md) + +For customers to complete the authorisation transaction via a registration link, you should **Create a registration link and send it to your customer**. + +You can create a Registration Link using: + +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-authorization-transaction.md#121-create-a-registration-link) +- [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link) + +The customer completes the authorisation payment, which generates a `token`. + +> **INFO** +> +> +> **No Need to Create a Customer and Order Separately** +> +> If you use a registration link to create the authorisation transaction, Razorpay automatically creates a customer and the order for you. +> + +#### Registration Link Statuses + +A registration link moves through the following states during its life cycle: + +### Authorisation Payment Statuses + +Once the customer has made the Authorisation Payment, it moves through the following states as per the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md): + +Status | Description | Webhook +--- +Created | Payment is created when a customer enters and submits the payment information. | NA +--- +Authorized | Payment is authorized when the customer’s payment details are successfully authenticated by the bank. | [payment.authorized](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized) +--- +Captured | Indicates that the payment is verified by you. +Once a payment is captured you can [retrieve the token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token). | [payment.captured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-captured) or [order.paid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#order-paid) +--- +Failed | Indicates that the payment has failed. +If the payment has failed, you need to [create an authorisation transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md) again. | [payment.failed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-failed) + +## Fetch NACH Mandate Registration Details + +This is a process of fetching the token that contains the registration details of the customer and checking its status. + +A token represents a mandate registration and is generated after the authorisation transaction is successfully captured. A token contains customer's payment details stored by Razorpay and is used to create a recurring payment. + +> **INFO** +> +> +> **Handy Tips** +> +> For simplicity, tokens are considered to be mandates. Hence, the status of the token determines the status of the mandate registration. +> + +You can search for the tokens using the following: + +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/tokens.md) +- [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-token-status-using-webhooks) + +### Token Statuses + +As the authorisation transaction moves through its different states, the token that is generated also undergoes state changes. Following is the life cycle of a token: + +![ Token life cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rec-pmnts-2_1_1_1.jpg.md) + +Know more about the turnaround time (TAT) for NACH from the [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/faqs.md#7-for-physical-mandates-how-long-does-it). + +## Charge Customers + +This is the process of charging customers the actual subsequent amount using the fetched token and customer details. + +You can create subsequent payments using: + +- [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/integrate.md#using-the-dashboard) +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/integrate.md#using-apis) + +### Using the Dashboard + +To create subsequent payments using the Dashboard: + +1. [**Search for the token and check its status**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) +After the authorisation transaction is complete, a token is generated. You can use the search feature on the Dashboard to find the required token and check its status. +1. [**Charge the token**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#4-charge-the-token) +After you have found the required confirmed token, you can create a subsequent payment by charging the token according to your business needs. + +> **INFO** +> +> +> **Order is Created Automatically** +> +> While creating a subsequent charge using the Dashboard, Razorpay automatically creates an order for you when you charge a token. There is no need to create an order separately. +> + +### Using APIs + +![](/docs/assets/images/rec-pmnts-4_1.jpg) + +To create subsequent payments using APIs: + +1. [**Create a new Order**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-subsequent-payments.md#31-create-an-order-to-charge-the-customer). +Like any other payment, each subsequent payment is tied to a unique order id. Associating a payment with an order id makes it easier to query Razorpay systems and handle multiple payment attempts and allows automatic capturing of payments. +2. [**Create a Payment**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/paper-nach/create-subsequent-payments.md#32-create-a-recurring-payment). +Once the order is created, you can create a payment for it. +After our system validates the payment along with `token_id`, a `razorpay_payment_id` is returned. In some cases, the payment entity returned is in the created state and may take 1 working day for confirmation. + +### Related Information +- [Paper NACH APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/apis.md) diff --git a/llm-content/payments/recurring-payments/subscribe-to-webhooks.md b/llm-content/payments/recurring-payments/subscribe-to-webhooks.md new file mode 100644 index 00000000..6a35966c --- /dev/null +++ b/llm-content/payments/recurring-payments/subscribe-to-webhooks.md @@ -0,0 +1,48 @@ +--- +title: Webhooks +description: Configure Webhooks to receive alerts about the status of tokens and recurring payments as they occur. +--- + +# Webhooks + +You can use Razorpay [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) to receive notifications of all events related to payment states and the token in the recurring payments workflow. + +## Check Payment Status Using Webhooks + +You can [set up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#setup-webhooks) to get notifications about the following: +- [Authorisation payment states](#authorisation-payment-states) +- [Registration link states for recurring payments](#registration-link-states) +- [Token states](#token-states) + +### Authorisation Payment States + +Once the customer has made the Authorisation Payment, it moves through the following states as per the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md): + +Status | Description | Webhook +--- +Created | Payment is created when a customer enters and submits the payment information. | NA +--- +Authorized | Payment is authorized when the customer’s payment details are successfully authenticated by the bank. | [payment.authorized](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized) +--- +Captured | Indicates that the payment is verified by you. +Once a payment is captured you can [retrieve the token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token). | [payment.captured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-captured) or [order.paid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#order-paid) +--- +Failed | Indicates that the payment has failed. +If the payment has failed, you need to [create an authorisation transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md) again. | [payment.failed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-failed) + +### Registration Link States + +A registration link moves through the following states during its life cycle: + +### Token States + +## Sample Payloads + +Know more about the [Webhook payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#sample-payloads). + +### Related Information + +- [Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) +- [Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/cards/integrate.md) +- [Paper NACH](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/integrate.md) +- [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/integrate.md) diff --git a/llm-content/payments/recurring-payments/upi-reserve-pay.md b/llm-content/payments/recurring-payments/upi-reserve-pay.md new file mode 100644 index 00000000..05440486 --- /dev/null +++ b/llm-content/payments/recurring-payments/upi-reserve-pay.md @@ -0,0 +1,179 @@ +--- +title: UPI Reserve Pay +description: Block customer funds upfront, debit as you deliver value. Boost conversion rates, reduce payment failures and enhance customer experience with UPI Reserve Pay. +--- + +# UPI Reserve Pay + +UPI Reserve Pay with Single Block Multi Debit (SBMD) enables businesses to block customer funds upfront and debit automatically as products or services are delivered. This payment method eliminates common issues with traditional online transactions where payment timing does not align with service delivery. + +- Instead of customers paying the full amount upfront for uncertain outcomes or businesses delivering services before guaranteed payment collection, Reserve Pay allows customers to authorise a spending limit once. +- Businesses can then debit exact amounts automatically as they fulfill orders, complete services or deliver products - without requiring additional customer authentication. + +## How Reserve Pay Works + +Reserve Pay enables businesses to collect payments seamlessly through a simple four-step process: + +1. **Customer Reserves Funds**: Customers block estimated spending amount in their account via UPI PIN authorisation. +2. **Deliver Your Service**: Provide products, complete rides, deliver food or render services as usual. +3. **Automatic Payment Collection**: Debit exact amounts instantly from the pre-approved limit set by the customer. +4. **Guaranteed Settlement**: Receive funds in your account with industry-leading success rates and faster reconciliation. + +## Advantages + + + - **Reduced Cart Abandonment**: Remove payment friction that causes customers to abandon purchases at checkout. + - **High Payment Success Rate**: Eliminate revenue loss from payment failures that typically cost 10% of transactions. + - **Guaranteed Collection**: Funds are pre-blocked, ensuring you receive payment regardless of customer's later financial situation. + + + - **One-time Setup**: Customers authorise their spending limit once using UPI PIN. + - **Automatic Payments**: No repeated authentication or PIN entries for subsequent transactions. + - **Transparent Control**: Clear visibility of reserved amounts and remaining balance in UPI apps. + - **Instant Transactions**: Payments process immediately without delays or failures. + + +## Use Cases + + +### Quick Commerce & Grocery Delivery + + Acme Quick uses Reserve Pay to handle payment failures during peak hours and streamline grocery ordering. Here is how Reserve Pay helps Acme Quick: + - **Guaranteed Payment Processing**: Customers reserve ₹2,000 monthly for groceries, ensuring payments process automatically even during bank downtimes or peak traffic. + - **Voice-Based Ordering**: Enable seamless AI assistant integration with pre-authorised payment methods for hands-free grocery shopping. + - **Peak Hour Reliability**: Process transactions successfully during high-demand periods when traditional payment systems may throttle or fail. + + + +### Transportation & Mobility + + Acme Ride uses Reserve Pay to handle variable fares and billing disputes during rides. Here is how Reserve Pay helps Acme Ride: + + - **Automated Fare Collection**: Block estimated trip amount upfront, then debit actual fare automatically after ride completion including tolls and waiting charges. + - **Driver Payment Guarantee**: Ensure drivers receive guaranteed payments without collection issues at trip end. + - **Dispute Reduction**: Minimise customer support queries related to payment disputes through transparent pre-authorisation. + + + +### Travel & Hospitality + + Acme Trips uses Razorpay Reserve Pay to reduce booking abandonment and handle price fluctuations. Here is how Reserve Pay helps Acme Trips: + + - **Hotel Bookings**: Block estimated stay amount during reservation, charge only after successful check-in to reduce booking anxiety. + - **Flight Price Protection**: Handle fare changes during booking process without requiring customer re-authentication. + - **Package Tours**: Charge incrementally as each travel service is delivered throughout the itinerary. + + + +### Food Delivery Services + + Acme Eats uses Reserve Pay to maintain service availability during system outages. Here is how Reserve Pay helps Acme Eats: + + - **Downtime Protection**: Process food orders using reserved balance even when banking systems are temporarily unavailable. + - **Express Checkout**: Enable faster order completion for repeat customers with pre-authorised payment methods. + - **Order Success Rate**: Reduce cancellations due to payment failures during critical meal times. + + + +### E-commerce & Marketplace + + Acme Kart uses Reserve Pay to handle complex multi-vendor transactions. Here is how Reserve Pay helps Acme Kart: + + - **Multi-Vendor Orders**: Block total cart value upfront, then release payments to individual sellers as items ship from different locations. + - **Partial Fulfillment**: Prevent order cancellations when some items in a multi-product cart are unavailable. + - **Seller Cash Flow**: Provide predictable payment schedules for marketplace vendors based on shipping milestones. + + + +### Healthcare Services + + Acme Health uses Reserve Pay to streamline billing for ongoing treatments. Here is how Reserve Pay helps Acme Health: + + - **Treatment Cost Management**: Block estimated treatment amount, then debit automatically as medical expenses occur throughout the care period. + - **Administrative Efficiency**: Reduce billing overhead by eliminating multiple small payment transactions during treatment. + - **Family Experience**: Minimise payment-related stress for families during medical emergencies with pre-authorised coverage. + + +## Implementation Examples + +Watch how apps can implement UPI Reserve Pay for their customers: + + + +[Video: https://www.youtube.com/embed/Py5LJR0KJvc?si=FVhrbyK6broF7Y4Y] + + + + +[Video content] + + + + +[Video content] + + + +## Limits + +The following standard limits apply to UPI Reserve Pay: + +Parameter | Limit | +--- +Maximum block amount | ₹10,000 +--- +Token validity | Up to 90 days +--- +Debits per token | Multiple (until blocked amount is exhausted or token expires) + +> **INFO** +> +> +> **Handy Tips** +> +> Contact our [Support team](https://razorpay.com/support) to check eligibility or discuss custom configurations for specific use cases. +> + +## Supported Apps and Issuers + + + - Paytm + - Navi + - BHIM + - BHIM SBI + - PhonePe (Coming Soon) + - BOB epay (Coming Soon) + - GPay (Coming Soon) + + + + Issuer | Names + --- + Credit Card | - ICICI (Only Sapphiro Cards) + - City Union Bank + - Punjab National Bank + - Bank of India + - Canara Bank + - Union Bank + - Indian Bank + - Axis Rupay + + --- + Credit Lines | - City Union Bank + - Bank of Baroda + - Tamilnad Mercantile Bank + - South Indian Bank + - Union Bank + + --- + Savings Account | - Axis Bank + - ICICI Bank + + + + +## Next Steps + +- Raise a request with our [Support team](https://razorpay.com/support/#request) to get UPI Reserve Pay activated on your account. +- Ensure your business category supports UPI mandate features and Single Block Multi Debit (SBMD) functionality. +- Integrate with [Integrate Razorpay UPI Reserve APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-reserve-pay/integration-steps.md). diff --git a/llm-content/payments/recurring-payments/upi.md b/llm-content/payments/recurring-payments/upi.md new file mode 100644 index 00000000..28b8df5a --- /dev/null +++ b/llm-content/payments/recurring-payments/upi.md @@ -0,0 +1,196 @@ +--- +title: About UPI Autopay +description: Accept UPI Autopay payments from customers with Recurring Payments integration. +--- + +# About UPI Autopay + +Razorpay UPI Autopay enables businesses to offer a frictionless recurring payment experience to their customers using UPI mandates. With one-time authentication via UPI apps like Google Pay, PhonePe or Paytm, customers can authorise recurring payments without having to manually approve every transaction. + +Built on top of the NPCI's UPI Autopay framework, Razorpay's solution allows you to easily create, manage and track mandates with full compliance and real-time payment insights. Whether you are a SaaS provider, a D2C brand or a fintech company, UPI Autopay helps you reduce dropoff, improve retention and deliver a superior billing experience. + +## How it Works + +UPI Autopay operates through a three-phase process that ensures regulatory compliance and seamless recurring payment collection. + + +### Phase 1: Mandate Registration + + UPI mandates for businesses are fundamentally **Payer Initiated Mandates** where customers must explicitly begin the process, even when starting within your business application. + + The customer logs into your application and chooses UPI Autopay for a service (such as monthly subscriptions). They specify the maximum amount, frequency (monthly, weekly or as-presented) and validity period. + + The customer then completes the authorisation transaction and register their UPI. A token will be generated once a customer makes this transaction. + + Using this authorisation transaction, we can authenticate the customer's UPI and ensure that we can charge them recurring payments. This authorisation transaction can be created using Razorpay Standard Checkout or Registration Link. + + [Mandate Registration →](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/integrate.md#1-mandate-registration) + + + +### Phase 2: Fetch Token + + This is a process of fetching the token that contains the registration details of the customer and checking its status. + + A token represents a mandate registration and is generated after the authorisation transaction is successfully captured. A token contains customer's payment details stored by Razorpay and is used to create a recurring payment. + + + [Token Fetch →](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/integrate.md#2-fetch-mandate-registration-details) + + + +### Phase 3: Subsequent Debits + + This phase represents the actual revenue collection process based on the approved mandate. + + + A critical regulatory requirement mandates notifying the customer at least 24 hours prior to initiating each debit. This is called Pre-Debit Notification (PDN). This allows customers to ensure fund availability or manage the mandate if needed. + + On the scheduled date, your Acquiring Bank/Payee PSP initiates a Collect Request to the UPI system. + + The UPI system routes the request to the customer's Payer PSP/Remitter Bank. If valid, funds are debited without requiring the customer to enter their UPI PIN again, eliminating the need for additional authentication. + + Funds are transferred and credited to your account following the existing UPI settlement process. + + [Charge Subsequent Payments →](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/integrate.md#3-charge-customers) + + +![UPI Autopay Process Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/autopay-flow.jpg.md) + +## Get Started + +Given below are the steps to proceed with UPI Autopay. + + + If you are new to Razorpay, [set up your account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md) to start accepting payments using UPI Autopay. + + + UPI Autopay is already enabled for existing Razorpay users. To verify activation: + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings** → **UPI/QR** under **Payment methods**. + 3. Check if UPI Autopay is activated. If not activated, contact your Account Manager or reach out to the [support team](https://razorpay.com/support/). + + +## Setup & Configuration + +Razorpay offers two primary approaches for setting up UPI Autopay mandates: Recurring Payments and Subscriptions. + +Choose the right approach based on your business model. + +Feature | Subscriptions | Recurring Payments +--- +**Setup Complexity** | Requires creating Plans first, then Subscriptions for each customer. | Direct token creation and charging without plan structure. +--- +**Payment Configuration** | Schedule payments with predefined frequency (weekly, monthly, quarterly and yearly). Razorpay automatically creates debits per the selected frequency. | Cannot auto-schedule debits. You initiate debit requests as needed and Razorpay processes them according to your request. +--- +**Intervention for Debits** | Schedule a Plan and Subscription - Razorpay creates debits automatically per the agreed Plan. No intervention required. | You must raise debit requests per your schedule and Razorpay processes them. +--- +**Best For** | Predictable, fixed-amount recurring billing | Variable or usage-based charging + +**Recommendations:** +- Use **Subscriptions** for predictable, fixed-amount recurring billing. Know more about [Razorpay Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md). +- Use **Recurring Payments (CAW)** for variable or usage-based charging. Given below are the various variants and integration methods available. + + +### Switch from Razorpay Subscriptions to Razorpay Recurring Payments + + [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) allow you to automatically charge your customers at regular intervals. The system handles the scheduling and execution of payments based on predefined plans, reducing manual intervention and ensuring consistent revenue collection. + + As a Razorpay Subscriptions user you can switch to Recurring Payments. Similarly, an existing Recurring Payments user can switch to Subscriptions. + - **From Subscriptions to CAW:** Reach out to support for guidance on transitioning your existing customer base + - **From CAW to Subscriptions:** Contact your Account Manager for feature enablement and migration assistance + + +## UPI Autopay Variants & Integration Options + +Apart from the regular Razorpay UPI Autopay option, we offer multiple variants to meet your unique business requirements. Also, Razorpay offers multiple checkout integration options. +- **Standard Checkout**: Quick setup, minimal customisation. +- **Custom Checkout**: Custom UI, branded experience. +- **Server-to-Server (S2S)**: Full control, PCI DSS compliance. + +The section below elaborates on each variant type and lists the available integration options. + + +### UPI Autopay + + The standard UPI Autopay solution that helps businesses to offer frictionless recurring payments through UPI mandates. With one-time authentication via UPI apps like Google Pay, PhonePe or Paytm, customers authorise recurring payments without manual approval for each transaction. + + **Available Integrations** + + + Integrations | Docs Link + --- + Standard Checkout | [Link to Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md) + --- + Custom Checkout | [Link to Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/upi/create-authorization-transaction.md) + --- + S2S APIs | - [Link to S2S Collect Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi/authorization-transaction.md) +- [Link to S2S Intent Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-intent/authorization-transaction.md) + + + + + +### UPI TPV (Third Party Validation) + + Third-Party Validation (TPV) of bank accounts is a mandatory requirement for businesses in the BFSI (Banking, Financial Services and Insurance) sector dealing with Securities, Broking and Mutual Funds. As per Securities and Exchange Board of India (SEBI) guidelines, transactions must be made by the investors only from those bank accounts provided when they registered with your business. + + With Razorpay UPI TPV APIs, you can comply with the SEBI guidelines for online payment collections by offering TPV integrations with major banks. + + + Integrations | Docs Link + --- + Standard Checkout | [Link to Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-tpv/create-authorization-transaction.md) + --- + Custom Checkout | [Link to Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/custom/upi-tpv/create-authorization-transaction.md) + --- + S2S APIs | [Link to Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-tpv/authorization-transaction.md) + + + + +### UPI OTM (One Time Mandate) + + Create a one time mandate on UPI to let your customers block an amount and pay later. The amount gets blocked on the customer's bank account and can be debited once within the expiry of the mandate. A one time mandate on UPI can help charge customers post-delivery of products or services, helping make the customer experience delightful for businesses like Ecommerce, Travel, Transport, Healthcare and many more. + + **Example** + + Gaurav Kumar wants to reserve a room at Acme Hotel. However, he is still determining the travel plan. He wants to pay after check-in. + + Using UPI One Time Mandate, Gaurav Kumar can consent to block the hotel booking amount and only let Acme Hotel debit the amount after check-in. + + + Integrations | Docs Link + --- + Standard Checkout | [Link to Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi-otm/authorization-transaction.md) + --- + Custom Checkout | Not Applicable + --- + S2S APIs | - [Link to S2S Collect Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/collect/authorization-transaction.md) +- [Link to S2S Intent Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/recurring-payments/upi-otm/intent/authorization-transaction.md) + + + + + +### UPI Reserve Pay with Single Block Multiple Debit(SBMD) + + UPI Reserve Pay with Single Block Multiple Debit (SBMD) enables you to block a specific amount in the customer's account and debit smaller amounts multiple times until the blocked amount is exhausted, perfect for usage-based billing models. + + **Example** + + Gaurav Kumar using the Acme Quick commerce app authorises a one-time UPI block of ₹2000 for future purchases. When he places a ₹400 order on Monday and a ₹600 order on Wednesday, both amounts are automatically debited from that reserved fund. Gaurav never has to enter a PIN at checkout, making his repeat orders completely frictionless. + + + +### Irrevocable Mandate + + Irrevocable Mandates (applicable for Lending businesses only) provide enhanced security for recurring transactions by ensuring that once created, cannot be cancelled by the end-user, thus ensuring better collection rates. + + +## Next Steps + +1. **Choose Your Integration:** Select between Recurring Payments or Subscriptions based on your business model. +2. **Select Variant and Implementation Method:** Pick the right variant and integration approach that fits your technical requirements. +3. **Test Integration:** Use our test environment to validate your implementation. +4. **Go Live:** Contact support for production enablement and go-live assistance. diff --git a/llm-content/payments/recurring-payments/upi/apis.md b/llm-content/payments/recurring-payments/upi/apis.md new file mode 100644 index 00000000..0f198b5f --- /dev/null +++ b/llm-content/payments/recurring-payments/upi/apis.md @@ -0,0 +1,57 @@ +--- +title: Recurring Payments APIs for UPI +description: List of Recurring Payments APIs available for UPI. +--- + +# Recurring Payments APIs for UPI + +You can use the Recurring Payments APIs to perform various actions using UPI as a payment method. + +## API-wise Integration Checklist for UPI + +### UPI Registration using Standard Checkout +- We recommend that you create a single customer id rather than multiple customer ids for the same customer. If their details change, you can use the [Edit Customer Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md#edit-customer-details) API. Duplicate validation is done based on email ID and phone number. +- Use the `fail_existing : "1"` parameter so that the [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md) returns the same details of the customer created earlier. If the `fail_existing : "0"` is used, the API throws an error and does not fetch the customer id previously created. This can help in the end-user journey experience if a customer is signing up despite having signed up earlier. +- Use the [Payments Downtime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/downtime.md) API to check for any ongoing downtimes that may impact the UPI Recurring. +- Ensure you pass all the token parameters while [creating an Order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md#112-create-an-order) for the authorisation transaction using the Standard Checkout method. +- Ensure you pass the value of the `recurring` parameter as `1` in the [Create an Authorisation Payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md#113-create-an-authorization-payment) API. If not passed, it would be considered a one-time payment. Once the authorisation payment is made, we request you verify the payment signature at your backend. +- To check the status of the token ID use the [Fetch Token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/tokens.md) API. +- Enable webhooks to check the status of the [token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-token-status-using-webhooks) and [payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-payment-status-using-webhooks) and the [registration link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-registration-link-status-using-webhooks). Use this only if your business is using it in a non-critical way. In critical scenarios, we recommend that you [fetch](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/emandate/tokens.md) APIs. +- A pre-debit notification is sent before the payment is deducted by the issuing bank. It is recommended that you check the presentment time in the [FAQ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/faqs.md) document before proceeding with the recurring payments. + +### UPI Registration using a Registration Link +- Ensure to pass the below parameters while creating a registration link using the API: + 1. Customer details such as `name`, `email` and `contact`. + 2. `sms_notify` and `email_notify` as `true` to send notifications to customers. + 3. `amount` as `0` and `type` as `link`. + 4. `description` of the link. + 5. `subscription_registration` details such as: + - `method` as `upi` + - `max_amount` as `500` + - `frequency` as `monthly` or `as_presented` + +### Create Subsequent Payments +- Ensure the `token_id` passed is for the linked `customer_id` while creating a recurring payment. +- Use [webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/subscribe-to-webhooks.md) to get real-time updates of payment. + +## List of Recurring Payments APIs + +The table below lists the various Recurring Payments APIs available for UPI and gives a brief description of each API: + +API | Description +--- +[Create Authorisation Transaction using Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md#11-using-razorpay-standard-checkout) | API to create an authorisation transaction using Razorpay Checkout. +--- +[Create Authorisation Transaction using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md#12-using-a-registration-link) | API to create an authorisation transaction using Registration Link. +--- +[Fetch Tokens using Payment id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/tokens.md#21-fetch-token-by-payment-id) | API to fetch tokens using the Payment id. +--- +[Fetch Tokens using Customer id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/tokens.md#22-fetch-tokens-by-customer-id) | API to fetch tokens using the Customer id. +--- +[Delete Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/tokens.md#23-delete-tokens) | API to delete tokens. +--- +[Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-subsequent-payments.md) | API to create subsequent payments. + +### Related Information +- [Integrate Recurring Payments Using UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/integrate.md) +- [Supported Banks and Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/supported-banks.md) diff --git a/llm-content/payments/recurring-payments/upi/faqs.md b/llm-content/payments/recurring-payments/upi/faqs.md new file mode 100644 index 00000000..68797865 --- /dev/null +++ b/llm-content/payments/recurring-payments/upi/faqs.md @@ -0,0 +1,283 @@ +--- +title: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Recurring Payments using UPI. +--- + +# Frequently Asked Questions (FAQs) + +### 1. What is the maximum amount I can charge per transaction? + + The maximum transaction amount allowed is ₹15,000 when using UPI as a recurring payment method. Any auto debit above ₹15,000 undergoes an additional authorisation from the customer. + + + +### 2. Which banks and apps support UPI Autopay? + + Refer to the [NPCI list of banks and apps supported for UPI Autopay](https://www.npci.org.in/product/autopay/all-members). + + + +### 3. Which are the intent-supported PSP apps? + + The below table gives information about the frequently used intent-supported PSP apps on different platforms and checkout integrations. + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | x | ✓ | ✓ + --- + PhonePe | ✓ | ✓ | ✓ + --- + Paytm | ✓ | ✓ | ✓ + --- + Amazon Pay | x | x | x + --- + BHIM | x | ✓ | x + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | x + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | x + --- + Amazon Pay | x | ✓ | x + --- + BHIM | x | ✓ | x + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | x + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | x + --- + Amazon Pay | ✓ | ✓ | x + --- + BHIM | ✓ | ✓ | x + --- + + + + + +> **WARN** +> +> +> **Watch Out!** +> +> - You should contact our [Support team](https://razorpay.com/support/#request) to enable UPI Intent on standard checkout. Watch this video on how to get it enabled. +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> - UPI Intent is not supported for @okaxis handle. +> + + + + +### 4. Which are the intent-supported PSP apps for TPV? + + The below table gives information about the frequently used intent-supported PSP apps for TPV on different platforms and checkout integrations. + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | ✓ + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | ✓ + --- + Amazon Pay | x | ✓ | x + --- + BHIM | x | ✓ | x + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | ✓ + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | ✓ + --- + Amazon Pay | x | ✓ | x + --- + BHIM | x | ✓ | x + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | x + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | x + --- + Amazon Pay | ✓ | ✓ | x + --- + BHIM | ✓ | ✓ | x + --- + + + + + +> **WARN** +> +> +> **Watch Out!** +> +> - You should contact our [Support team](https://razorpay.com/support/#request) to enable PSP apps other than PhonePe and Paytm on Standard Checkout for UPI TPV. Watch this video on how to get it enabled. +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> - UPI Intent TPV is not supported for @okaxis handle. +> + + + + +### 5. How long does mandate registration take? + + Mandate registrations occur in real time. Once the customer enters the MPIN, the mandate is authorised and a token is created on the customer. You can then use this token for subsequent debits on the customer's account. + + + +### 5. Can I charge customer payments in international currencies via a UPI mandate? + + No, you cannot charge customer payments in international currencies. UPI mandates only support `INR` payments. + + + +### 6. For UPI mandates, how long does it take for the token status to move from the `initiated` state to the `confirmed` state? + + For UPI mandates, the token status is updated from `initiated` state to the `confirmed` state in real-time. + + + + Method | Bank | Expected Time to Complete + --- + UPI | All supported banks | Real-time. + + + + +### 7. For UPI mandates, how long does it take a subsequent charge to move from the `created` state to the `authorized` state? + + For UPI mandates, subsequent charges are initiated **25 hours after the Pre Debit notification** is sent to the customer. Once initiated, + - For amount ₹15,000: An additional authorisation is requested of the customer. Once received, the amount is debited from the customer's bank. + + + +### 8. What is pre-debit notification? + + Pre-debit notifications are notifications sent to consumers 24 hours prior to the payment. These notices intimate the customer ahead of the actual debit, allowing them the option to pause or cancel the e-mandate. + + + + +### 9. Can I cancel a UPI mandate? + + Yes, you can cancel a UPI mandate from the Dashboard. + + + +### 10. Can I revoke a UPI mandate? + + You can revoke a UPI mandate directly from the Dashboard. To do so, cancel the mandate first and then delete it. + + + +### 11. Once registered, can I pause a UPI mandate? + + No, you cannot pause a UPI mandate. + + + +### 12. Once registered, can I modify a UPI mandate? + + No, it is not possible to modify or update a UPI mandate. However, you can cancel the UPI mandate. + + + +### 13. Once registered, can my customer cancel a UPI mandate? + + Yes, your customers can cancel a UPI mandate from their UPI app. + + + +### 14. Once registered, can my customer pause a UPI mandate? + + Yes, your customers can pause a UPI mandate from their UPI app. + + + +### 15. Once registered, can my customer modify a UPI mandate? + + No, it is not possible to modify or update a UPI mandate. However, your customers can pause or cancel the UPI mandate from their UPI app. + + + +### 16. What are some best practices I can follow when creating subsequent payments for UPI recurring payment? + + For UPI, **do not** create subsequent payments on the last day of the cycle. This will cause the payment to fail. + + + +### 17. What is the supported amount limit on PSP applications? + + + + PSP apps | Mandate Maximum Amount ₹15,000 + --- + PhonePe | Yes | No + --- + GooglePay - okhdfcbank | Yes | Yes + --- + GooglePay - okaxis | Yes | Yes + --- + GooglePay - okicici | Yes | Yes + --- + GooglePay - oksbi | Yes | Yes + --- + BHIM | Yes | No + --- + Paytm | Yes | Yes + --- + Amazon Pay | Yes | Yes + + + + + +### 18. Is QR Code supported for UPI Autopay? + + Yes, [QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/qr-codes.md) is supported on Standard Checkout to collect Recurring Paymennts. The customers can scan the QR using any PSP app and make the payment. + + + +### 19. Can I restrict my customers from pausing and cancelling the mandate? + + Yes, you can restrict your customers from pausing and cancelling the mandate by enabling OC125 functionality. After enabling, the **Pause** and **Cancel** mandate buttons are not available on PSP apps as shown in the image below. + + ![Checkout with OC125 Enabled](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi_oc125.jpg.md) + + This functionality is supported only for lending businesses. Please contact our [Support team](https://razorpay.com/support/#request) for more information. diff --git a/llm-content/payments/recurring-payments/upi/integrate.md b/llm-content/payments/recurring-payments/upi/integrate.md new file mode 100644 index 00000000..03f97ed3 --- /dev/null +++ b/llm-content/payments/recurring-payments/upi/integrate.md @@ -0,0 +1,177 @@ +--- +title: Integrate Recurring Payments Using UPI +description: Know how to integrate Recurring Payments using UPI as a payment method. +--- + +# Integrate Recurring Payments Using UPI + +The Recurring Payment integration involves the following steps: + +1. [Mandate Registration](#1-mandate-registration) +2. [Fetch Mandate Registration Details](#2-fetch-emandate-registration-details) +3. [Charge Customers](#3-charge-customers) + +## Prerequisites + +- Raise a request with our [Support team](https://razorpay.com/support/#request) to get Recurring Payments activated on your account you are trying to integrate. +- Check if the UPI is enabled using the [Fetch Supported Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/supported-banks.md#fetch-supported-methods) API. Also, check the list of [supported banks and apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/supported-banks.md) for UPI Recurring and enable it for your account. + +## 1. Mandate Registration + +Mandate registration is a process of creating a payment checkout form for customers to make **Authorisation Transaction** and register their UPI. A token will be generated once a customer makes this transaction. + +Using this authorisation transaction, we can authenticate the customer's UPI and ensure that we can charge them recurring payments. The authorisation transaction can be created using Razorpay Standard Checkout or Registration Link. + +> **INFO** +> +> +> **Handy Tips** +> +> The lending businesses can restrict their customers from pausing and cancelling the mandate by enabling OC125 functionality. Raise a request with our [Support team](https://razorpay.com/support/#request) to enable the same. +> + + + Following is the authorisation transaction flow for Razorpay Standard Checkout method. + + + + + + To create checkout form for customers to complete authorisation transaction using the Razorpay Standard Checkout method: + + +> **WARN** +> +> +> **Watch Out!** +> +> The authorisation transaction using standard checkout can be created only using Razorpay APIs. +> + + 1. [**Create a customer**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md#111-create-a-customer) +This returns a `customer_id`. + 1. [**Create an order**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md#112-create-an-order) +This returns an `order_id`. The order must be created for: + 1. [**Create authorisation transaction**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md#113-create-an-authorization-payment) +Pass the `customer_id`, `order_id` and a few additional parameters in your checkout to create the authorization payment. The customer completes the authorization payment, which generates a `token`. + + + + Registration Links are securely generated web addresses that allow your customers to complete the authorisation transaction. Registration links can be sent via SMS or email. + + Following is the authorisation transaction flow for Razorpay registration link method: + + ![Recurring Payments Using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/recurring-payments-recurring_payments_registration_link.jpg.md) + + For customers to complete the authorisation transaction via a registration link, you should **Create a registration link and send it to your customer**. When the customer completes the authorisation payment, a `token` is generated. + + You can create a Registration Link using: + + - [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-authorization-transaction.md#121-create-a-registration-link) + - [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link) + + +> **INFO** +> +> +> **No Need to Create a Customer and Order Separately** +> +> If you use a registration link to create the authorization transaction, Razorpay automatically creates a customer and the order for you. +> + + #### Registration Link Statuses + + A registration link moves through the following states during its life cycle: + + + +### Authorisation Payment Statuses + +Once the customer has made the Authorisation Payment, it moves through the following states as per the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md): + +Status | Description | Webhook +--- +Created | Payment is created when a customer enters and submits the payment information. | NA +--- +Authorized | Payment is authorized when the customer’s payment details are successfully authenticated by the bank. | [payment.authorized](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized) +--- +Captured | Indicates that the payment is verified by you. +Once a payment is captured you can [retrieve the token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token). | [payment.captured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-captured) or [order.paid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#order-paid) +--- +Failed | Indicates that the payment has failed. +If the payment has failed, you need to [create an authorisation transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md) again. | [payment.failed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-failed) + +## 2. Fetch Mandate Registration Details + +This is a process of fetching the token that contains the registration details of the customer and checking its status. + +A token represents a mandate registration and is generated after the authorisation transaction is successfully captured. A token contains customer's payment details stored by Razorpay and is used to create a recurring payment. + +> **INFO** +> +> +> **Handy Tips** +> +> For simplicity, tokens are considered to be mandates. Hence, the status of the token determines the status of the mandate registration. +> + +You can search for the tokens using the following: + +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/tokens.md) +- [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#check-token-status-using-webhooks) + +### Token Statuses + +As the authorisation transaction moves through its different states, the token that is generated also undergoes state changes. Following is the life cycle of a token: + +![ Token life cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rec-pmnts-2_1_1_1.jpg.md) + +Know more about the turnaround time (TAT) for UPI from the [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/faqs.md). + +## 3. Charge Customers + +This is the process of charging customers the actual subsequent amount using the fetched token and customer details. + +> **WARN** +> +> +> **Watch Out!** +> +> - It may take 24-36 hours for the subsequent payment to reflect on your Dashboard. This is because of the failure of pre-debit notification and/or any retries that we attempt for the payment. +> - **Do not** create subsequent payments on the last day of the cycle. This will cause the payment to fail. +> +> - Subsequent payments can be charged without the need of any intervention from the customer. However, subsequent payments need to be created manually by you. +> + +Once a token goes to the confirmed state, you can start creating recurring payments for the customer as per your business requirements. + +You can create subsequent payments using Dashboard or APIs. + + + To create subsequent payments using the Dashboard: + 1. [**Search for the token and check its status**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) +After the authorisation transaction is complete, a token is generated. You can use the search feature on the Dashboard to find the required token and check its status. + 1. [**Charge the token**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#4-charge-the-token) +After you have found the required confirmed token, you can create a subsequent payment by charging the token according to your business needs. + + +> **INFO** +> +> +> **Order is Created Automatically** +> +> While creating a subsequent charge using the Dashboard, Razorpay automatically creates an order for you when you charge a token. There is no need to create an order separately. +> + + + + ![](/docs/assets/images/rec-pmnts-4_1.jpg) + + To create subsequent payments using APIs: + + 1. [**Create a new Order**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-subsequent-payments.md#31-create-an-order-to-charge-the-customer) +Like any other payment, each subsequent payment is tied to a unique order id. Associating a payment with an order id makes it easier to query Razorpay systems and handle multiple payment attempts and allows automatic capturing of payments. + 2. [**Create a Payment**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/upi/create-subsequent-payments.md#32-create-a-recurring-payment) +Once the order is created, you can create a payment for it. +After our system validates the payment along with `token_id`, a `razorpay_payment_id` is returned. In some cases, the payment entity returned is in the created state and may take 1 working day for confirmation. diff --git a/llm-content/payments/recurring-payments/upi/qr-codes.md b/llm-content/payments/recurring-payments/upi/qr-codes.md new file mode 100644 index 00000000..1327e962 --- /dev/null +++ b/llm-content/payments/recurring-payments/upi/qr-codes.md @@ -0,0 +1,41 @@ +--- +title: QR Codes for Recurring Payments +description: Display QR Codes on Razorpay Standard Checkout for UPI Autopay to collect Recurring Payments. +--- + +# QR Codes for Recurring Payments + +QR codes on Standard Checkout are a great way to provide faster and more convenient options for customers to make payments. It saves time, reduces multiple steps and allows for contactless payments. + +> **WARN** +> +> +> **Watch Out!** +> +> The QR code on the checkout is dynamic. The customer can only make a single payment. +> + +## Advantages + +- The QR code allows you to easily manage Subscriptions and Recurring Payments and increase the success rate by simplifying the checkout process for customers. +- Customers do not have to remember the VPA. They can make the payment by scanning the QR Code using any PSP app. + +## Customer Journey + +Below is the customer journey with QR Code on Standard Checkout + +1. The QR Code is available on the desktop Standard Checkout for UPI Autopay. + ![Recurring Payments QR Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr_rp.gif.md) +2. Customers scan the QR Code using any PSP app and approve the payment. + +## FAQs + +Given below are some of the frequently asked questions. + +#### 1. Can I use the QR code to accept international payments? + +Yes. You can use the QR Code to accept Recurring payments in any of our [supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +#### 2. Are there any additional steps to enable a QR Code on Standard Checkout? + +No, QR Codes are enabled by default for all businesses on Standard Checkout. diff --git a/llm-content/payments/recurring-payments/upi/supported-banks.md b/llm-content/payments/recurring-payments/upi/supported-banks.md new file mode 100644 index 00000000..8ea36c3c --- /dev/null +++ b/llm-content/payments/recurring-payments/upi/supported-banks.md @@ -0,0 +1,2917 @@ +--- +title: Supported Banks and Apps +description: List of banks and apps that support recurring payments via UPI. +--- + +# Supported Banks and Apps + +We support all the apps and banks mentioned in the [NPCI list](https://www.npci.org.in/what-we-do/autopay/list-of-banks-and-apps-live-on-autopay). + +> **INFO** +> +> +> **Handy Tips** +> +> For certain MCCs, the maximum amount limit for one transaction is ₹1,00,000. +> Refer to the [list of supported MCCs, issuing banks and PSP applications](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md#supported-mccs). +> + +### Intent Support with PSP Apps + +The below table gives information about the frequently used intent-supported PSP apps on different platforms and checkout integrations. + + + + PSP Apps | Android (mWeb) | Android (SDK) | iOS (mWeb) | iOS (SDK) + --- + GPay | ✓ | ✓ | ✓ | ✓ + --- + PhonePe | ✓ | ✓ | ✓ | ✓ + --- + Paytm | ✓ | ✓ | ✓ | ✓ + --- + Cred | ✓ | ✓ | ✓ | ✓ + --- + BHIM | ✓ | ✓ | ✓ | ✓ + --- + SuperMoney | ✓ | ✓ | ✓ | ✓ + --- + Navi | ✓ | ✓ | ✓ | ✓ + --- + Mobikwik | x | x | x | x + --- + Pop | Coming Soon | ✓ | Coming Soon | Coming Soon + --- + Amazon Pay | x | x | x | x + --- + BharatPe | Coming Soon | ✓ | x | x + --- + PayZapp | x | x | x | x + --- + iMobile | x | ✓ | x | x + --- + + + + + PSP Apps | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ + --- + PhonePe | ✓ | ✓ + --- + Paytm | ✓ | ✓ + --- + Amazon Pay | ✓ | x + --- + BHIM | ✓ | x + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | x + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | x + --- + Amazon Pay | ✓ | ✓ | x + --- + BHIM | ✓ | ✓ | x + --- + + + +#### Intent Support with PSP Apps for TPV + +The below table gives information about the frequently used intent-supported PSP apps for TPV on different platforms and checkout integrations. + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | ✓ + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | ✓ + --- + Amazon Pay | x | ✓ | x + --- + BHIM | x | ✓ | x + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | ✓ + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | ✓ + --- + Amazon Pay | x | ✓ | x + --- + BHIM | x | ✓ | x + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | x + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | x + --- + Amazon Pay | ✓ | ✓ | x + --- + BHIM | ✓ | ✓ | x + --- + + + +> **WARN** +> +> +> **Watch Out!** +> +> - Contact our [Support team](https://razorpay.com/support/#request) to enable PSP apps other than PhonePe and Paytm on Standard Checkout for UPI TPV. Watch this video on how to get it enabled. +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> - UPI Intent TPV is not supported for @okaxis handle. +> + +### Intent Support with PSP Apps for OC125 + +The below table gives information about the frequently used intent-supported PSP apps for OC125 (restrict pausing and cancelling mandate) on different platforms and checkout integrations. + +> **WARN** +> +> +> **Watch Out!** +> +> OC125 is supported only for lending businesses. +> + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | ✓ + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | ✓ + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | ✓ + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | ✓ + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | x + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | x + --- + + + +> **WARN** +> +> +> **Watch Out!** +> - Contact our [Support team](https://razorpay.com/support/#request) to enable UPI Intent on Standard Checkout. Watch this video on how to get it enabled. +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> - UPI Intent is not supported for @okaxis handle. +> + +## Fetch Supported Methods + +Use the below endpoint to fetch a list of all methods enabled for your account. + +/methods + +> **INFO** +> +> +> **[YOUR_KEY_ID] Required** +> +> To fire this API, you need to provide your [KEY_ID] for authorization. Your [KEY_SECRET] is not required and should not be passed. +> + +```curl: Request +curl -u [YOUR_KEY_ID] \ + -X GET https://api.razorpay.com/v1/methods +```json: Response +{ + "entity":"methods", + "card":true, + "debit_card":true, + "credit_card":true, + "prepaid_card":true, + "card_networks":{ + "AMEX":1, + "DICL":1, + "MC":1, + "MAES":1, + "VISA":1, + "JCB":1, + "RUPAY":1, + "BAJAJ":0 + }, + "card_subtype":{ + "consumer":1, + "business":1 + }, + "amex":true, + "netbanking":{ + "AUBL":"AU Small Finance Bank", + "AIRP":"Airtel Payments Bank", + "ANDB":"Andhra Bank", + "UTIB":"Axis Bank", + "BDBL":"Bandhan Bank", + "BBKM":"Bank of Bahrein and Kuwait", + "BARB_R":"Bank of Baroda - Retail Banking", + "VIJB":"Bank of Baroda - Retail Banking (Erstwhile Vijaya Bank)", + "BKID":"Bank of India", + "MAHB":"Bank of Maharashtra", + "BACB":"Bassein Catholic Co-operative Bank", + "CNRB":"Canara Bank", + "CSBK":"Catholic Syrian Bank", + "CBIN":"Central Bank of India", + "CIUB":"City Union Bank", + "COSB":"Cosmos Co-operative Bank", + "DCBL":"DCB Bank", + "DEUT":"Deutsche Bank", + "DBSS":"Development Bank of Singapore", + "DLXB":"Dhanlaxmi Bank", + "DLXB_C":"Dhanlaxmi Bank - Corporate Banking", + "ESAF":"ESAF Small Finance Bank", + "ESFB":"Equitas Small Finance Bank", + "FDRL":"Federal Bank", + "FSFB":"Fincare Small Finance Bank", + "HDFC":"HDFC Bank", + "HSBC":"HSBC", + "ICIC":"ICICI Bank", + "IBKL":"IDBI", + "IBKL_C":"IDBI - Corporate Banking", + "IDFB":"IDFC FIRST Bank", + "IDIB":"Indian Bank", + "ALLA":"Indian Bank (Erstwhile Allahabad Bank)", + "IOBA":"Indian Overseas Bank", + "INDB":"Indusind Bank", + "JAKA":"Jammu and Kashmir Bank", + "JSFB":"Jana Small Finance Bank", + "JSBP":"Janata Sahakari Bank (Pune)", + "KCCB":"Kalupur Commercial Co-operative Bank", + "KJSB":"Kalyan Janata Sahakari Bank", + "KARB":"Karnataka Bank", + "KVBL":"Karur Vysya Bank", + "KKBK":"Kotak Mahindra Bank", + "LAVB_C":"Lakshmi Vilas Bank - Corporate Banking", + "LAVB_R":"Lakshmi Vilas Bank - Retail Banking", + "MSNU":"Mehsana Urban Co-operative Bank", + "NKGS":"NKGSB Co-operative Bank", + "NSPB":"NSDL Payments Bank", + "NESF":"North East Small Finance Bank", + "ORBC":"PNB (Erstwhile-Oriental Bank of Commerce)", + "UTBI":"PNB (Erstwhile-United Bank of India)", + "PSIB":"Punjab & Sind Bank", + "PUNB_R":"Punjab National Bank - Retail Banking", + "RATN":"RBL Bank", + "RATN_C":"RBL Bank - Corporate Banking", + "ABNA":"Royal Bank of Scotland N.V.", + "SRCB":"Saraswat Co-operative Bank", + "SVCB_C":"Shamrao Vithal Bank - Corporate Banking", + "SVCB":"Shamrao Vithal Co-operative Bank", + "SIBL":"South Indian Bank", + "SCBL":"Standard Chartered Bank", + "SURY":"Suryoday Small Finance Bank", + "SYNB":"Syndicate Bank", + "TMBL":"Tamilnadu Mercantile Bank", + "TNSC":"Tamilnadu State Apex Co-operative Bank", + "TBSB":"Thane Bharat Sahakari Bank", + "TJSB":"Thane Janata Sahakari Bank", + "UCBA":"UCO Bank", + "UBIN":"Union Bank of India", + "CORP":"Union Bank of India (Erstwhile Corporation Bank)", + "VARA":"Varachha Co-operative Bank", + "YESB":"Yes Bank", + "YESB_C":"Yes Bank - Corporate Banking", + "ZCBL":"Zoroastrian Co-operative Bank" + }, + "wallet":{ + "mobikwik":true, + "payzapp":true, + "olamoney":true, + "airtelmoney":true, + "jiomoney":true, + "openwallet":true, + "phonepe":true + }, + "emi":true, + "upi":true, + "cardless_emi":[ + + ], + "paylater":{ + "epaylater":true, + "getsimpl":true, + "icic":true, + "hdfc":true, + "lazypay":true + }, + "google_pay_cards":false, + "app":{ + "cred":0, + "twid":0 + }, + "gpay":false, + "emi_types":{ + "credit":true, + "debit":true + }, + "debit_emi_providers":{ + "HDFC":0 + }, + "nach":true, + "cod":false, + "bank_transfer":true, + "emi_subvention":"customer", + "emi_plans":{ + "KKBK":{ + "min_amount":300000, + "plans":{ + "3":12, + "6":12, + "9":14, + "12":14, + "18":15, + "24":15 + } + }, + "UTIB":{ + "min_amount":300000, + "plans":{ + "3":13, + "6":13, + "9":14, + "12":14, + "18":15, + "24":15 + } + }, + "INDB":{ + "min_amount":200000, + "plans":{ + "3":13, + "6":13, + "9":13, + "12":12, + "18":12, + "24":12 + } + }, + "RATN":{ + "min_amount":100000, + "plans":{ + "3":13, + "6":14, + "9":15, + "12":15, + "18":15, + "24":15 + } + }, + "HDFC":{ + "min_amount":300000, + "plans":{ + "18":15, + "24":15, + "3":15, + "6":15, + "9":15, + "12":15 + } + }, + "SCBL":{ + "min_amount":250000, + "plans":{ + "3":13, + "6":13, + "9":14, + "12":14 + } + }, + "BARB":{ + "min_amount":250000, + "plans":{ + "3":13, + "6":13, + "9":13, + "12":13, + "18":15, + "24":15 + } + }, + "ICIC":{ + "min_amount":150000, + "plans":{ + "3":12.99, + "6":13.99, + "9":13.99, + "12":13.99, + "24":14.99, + "18":14.99 + } + }, + "YESB":{ + "min_amount":150000, + "plans":{ + "18":15, + "24":15, + "9":14, + "3":14, + "6":14, + "12":15 + } + }, + "CITI":{ + "min_amount":250000, + "plans":{ + "3":13, + "6":13, + "9":15, + "12":15, + "18":15, + "24":15 + } + }, + "AMEX":{ + "min_amount":500000, + "plans":{ + "3":14, + "6":14, + "9":14, + "12":14, + "18":14, + "24":14 + } + }, + "onecard":{ + "min_amount":300000, + "plans":{ + "3":16, + "6":16, + "9":16, + "12":16, + "18":16, + "24":16 + } + }, + "HSBC":{ + "min_amount":200000, + "plans":{ + "3":12.5, + "6":12.5, + "9":13.5, + "12":13.5, + "18":13.5 + } + } + }, + "emi_options":{ + "KKBK":[ + { + "duration":3, + "interest":12, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"1.97" + }, + { + "duration":6, + "interest":12, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"3.41" + }, + { + "duration":9, + "interest":14, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"5.59" + }, + { + "duration":12, + "interest":14, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"7.19" + }, + { + "duration":18, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"10.95" + }, + { + "duration":24, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"14.07" + } + ], + "UTIB":[ + { + "duration":3, + "interest":12, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"1.97" + }, + { + "duration":6, + "interest":12, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"3.41" + }, + { + "duration":9, + "interest":13, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"5.21" + }, + { + "duration":12, + "interest":13, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"6.70" + }, + { + "duration":18, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"10.95" + }, + { + "duration":24, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"14.07" + }, + { + "duration":3, + "interest":13, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"2.13" + }, + { + "duration":6, + "interest":13, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"3.68" + }, + { + "duration":9, + "interest":14, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"5.59" + }, + { + "duration":12, + "interest":14, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"7.19" + } + ], + "INDB":[ + { + "duration":3, + "interest":13, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"2.13" + }, + { + "duration":6, + "interest":13, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"3.68" + }, + { + "duration":9, + "interest":13, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"5.21" + }, + { + "duration":12, + "interest":13, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"6.70" + }, + { + "duration":18, + "interest":15, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"10.95" + }, + { + "duration":24, + "interest":15, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"14.07" + }, + { + "duration":3, + "interest":13, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"2.13" + }, + { + "duration":6, + "interest":13, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"3.68" + }, + { + "duration":9, + "interest":13, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"5.21" + }, + { + "duration":12, + "interest":12, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"6.21" + }, + { + "duration":18, + "interest":12, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"8.90" + }, + { + "duration":24, + "interest":12, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"11.49" + } + ], + "RATN":[ + { + "duration":3, + "interest":13, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"2.13" + }, + { + "duration":6, + "interest":13, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"3.68" + }, + { + "duration":9, + "interest":13, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"5.21" + }, + { + "duration":12, + "interest":13, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"6.70" + }, + { + "duration":18, + "interest":13, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"9.59" + }, + { + "duration":24, + "interest":13, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"12.36" + }, + { + "duration":6, + "interest":14, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"3.96" + }, + { + "duration":9, + "interest":15, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"5.97" + }, + { + "duration":12, + "interest":15, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"7.67" + }, + { + "duration":18, + "interest":15, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"10.95" + }, + { + "duration":24, + "interest":15, + "subvention":"customer", + "min_amount":100000, + "merchant_payback":"14.07" + } + ], + "HDFC":[ + { + "duration":18, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"10.95" + }, + { + "duration":24, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"14.07" + }, + { + "duration":3, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"2.45" + }, + { + "duration":6, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"4.23" + }, + { + "duration":9, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"5.97" + }, + { + "duration":12, + "interest":15, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"7.67" + } + ], + "SCBL":[ + { + "duration":3, + "interest":13, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"2.13" + }, + { + "duration":6, + "interest":13, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"3.68" + }, + { + "duration":9, + "interest":14, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"5.59" + }, + { + "duration":12, + "interest":14, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"7.19" + } + ], + "BARB":[ + { + "duration":3, + "interest":13, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"2.13" + }, + { + "duration":6, + "interest":13, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"3.68" + }, + { + "duration":9, + "interest":13, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"5.21" + }, + { + "duration":12, + "interest":13, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"6.70" + }, + { + "duration":18, + "interest":15, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"10.95" + }, + { + "duration":24, + "interest":15, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"14.07" + } + ], + "ICIC":[ + { + "duration":3, + "interest":12.99, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"2.13" + }, + { + "duration":6, + "interest":13.99, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"3.96" + }, + { + "duration":9, + "interest":13.99, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"5.59" + }, + { + "duration":12, + "interest":13.99, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"7.18" + }, + { + "duration":24, + "interest":14.99, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"14.06" + }, + { + "duration":18, + "interest":14.99, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"10.94" + } + ], + "YESB":[ + { + "duration":18, + "interest":15, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"10.95" + }, + { + "duration":24, + "interest":15, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"14.07" + }, + { + "duration":9, + "interest":14, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"5.59" + }, + { + "duration":3, + "interest":14, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"2.29" + }, + { + "duration":6, + "interest":14, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"3.96" + }, + { + "duration":12, + "interest":15, + "subvention":"customer", + "min_amount":150000, + "merchant_payback":"7.67" + } + ], + "CITI":[ + { + "duration":3, + "interest":13, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"2.13" + }, + { + "duration":6, + "interest":13, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"3.68" + }, + { + "duration":9, + "interest":15, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"5.97" + }, + { + "duration":12, + "interest":15, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"7.67" + }, + { + "duration":18, + "interest":15, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"10.95" + }, + { + "duration":24, + "interest":15, + "subvention":"customer", + "min_amount":250000, + "merchant_payback":"14.07" + } + ], + "AMEX":[ + { + "duration":3, + "interest":14, + "subvention":"customer", + "min_amount":500000, + "merchant_payback":"2.29" + }, + { + "duration":6, + "interest":14, + "subvention":"customer", + "min_amount":500000, + "merchant_payback":"3.96" + }, + { + "duration":9, + "interest":14, + "subvention":"customer", + "min_amount":500000, + "merchant_payback":"5.59" + }, + { + "duration":12, + "interest":14, + "subvention":"customer", + "min_amount":500000, + "merchant_payback":"7.19" + }, + { + "duration":18, + "interest":14, + "subvention":"customer", + "min_amount":500000, + "merchant_payback":"10.27" + }, + { + "duration":24, + "interest":14, + "subvention":"customer", + "min_amount":500000, + "merchant_payback":"13.22" + } + ], + "onecard":[ + { + "duration":3, + "interest":16, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"2.61" + }, + { + "duration":6, + "interest":16, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"4.51" + }, + { + "duration":9, + "interest":16, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"6.35" + }, + { + "duration":12, + "interest":16, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"8.15" + }, + { + "duration":18, + "interest":16, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"11.62" + }, + { + "duration":24, + "interest":16, + "subvention":"customer", + "min_amount":300000, + "merchant_payback":"14.90" + } + ], + "HSBC":[ + { + "duration":3, + "interest":12.5, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"2.05" + }, + { + "duration":6, + "interest":12.5, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"3.55" + }, + { + "duration":9, + "interest":13.5, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"5.40" + }, + { + "duration":12, + "interest":13.5, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"6.94" + }, + { + "duration":18, + "interest":13.5, + "subvention":"customer", + "min_amount":200000, + "merchant_payback":"9.93" + } + ] + }, + "recurring":{ + "card":{ + "credit":[ + "MasterCard", + "Visa" + ], + "debit":{ + "CITI":"CITI Bank", + "CNRB":"Canara Bank", + "CIUB":"City Union Bank", + "ESFB":"Equitas Small Finance Bank", + "HSBC":"HSBC", + "ICIC":"ICICI Bank", + "KVBL":"Karur Vysya Bank", + "KKBK":"Kotak Mahindra Bank" + } + }, + "emandate":{ + "APGB":{ + "auth_types":[ + "netbanking" + ], + "name":"Andhra Pragathi Grameena Bank" + }, + "UTIB":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Axis Bank" + }, + "BDBL":{ + "auth_types":[ + "netbanking" + ], + "name":"Bandhan Bank" + }, + "BARB_R":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Bank of Baroda - Retail Banking" + }, + "MAHB":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Bank of Maharashtra" + }, + "CITI":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"CITI Bank" + }, + "CNRB":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Canara Bank" + }, + "CSBK":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Catholic Syrian Bank" + }, + "CBIN":{ + "auth_types":[ + "netbanking", + "aadhaar" + ], + "name":"Central Bank of India" + }, + "CIUB":{ + "auth_types":[ + "netbanking", + "aadhaar" + ], + "name":"City Union Bank" + }, + "COSB":{ + "auth_types":[ + "netbanking", + "aadhaar" + ], + "name":"Cosmos Co-operative Bank" + }, + "DCBL":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"DCB Bank" + }, + "DEUT":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Deutsche Bank" + }, + "DBSS":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Development Bank of Singapore" + }, + "DLXB":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Dhanlaxmi Bank" + }, + "ESFB":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Equitas Small Finance Bank" + }, + "FDRL":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Federal Bank" + }, + "HDFC":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"HDFC Bank" + }, + "HSBC":{ + "auth_types":[ + "netbanking", + "aadhaar" + ], + "name":"HSBC" + }, + "ICIC":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"ICICI Bank" + }, + "IBKL":{ + "auth_types":[ + "netbanking", + "aadhaar" + ], + "name":"IDBI" + }, + "IDFB":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"IDFC FIRST Bank" + }, + "IDIB":{ + "auth_types":[ + "netbanking" + ], + "name":"Indian Bank" + }, + "IOBA":{ + "auth_types":[ + "netbanking" + ], + "name":"Indian Overseas Bank" + }, + "INDB":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Indusind Bank" + }, + "JSFB":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Jana Small Finance Bank" + }, + "JIOP":{ + "auth_types":[ + "netbanking" + ], + "name":"Jio Payments Bank" + }, + "KARB":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Karnataka Bank" + }, + "KVGB":{ + "auth_types":[ + "netbanking" + ], + "name":"Karnataka Vikas Grameena Bank" + }, + "KVBL":{ + "auth_types":[ + "netbanking", + "aadhaar" + ], + "name":"Karur Vysya Bank" + }, + "KKBK":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Kotak Mahindra Bank" + }, + "PYTM":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Paytm Payments Bank" + }, + "PSIB":{ + "auth_types":[ + "netbanking" + ], + "name":"Punjab & Sind Bank" + }, + "PUNB_R":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Punjab National Bank - Retail Banking" + }, + "RATN":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"RBL Bank" + }, + "SIBL":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"South Indian Bank" + }, + "SCBL":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Standard Chartered Bank" + }, + "SBIN":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"State Bank of India" + }, + "TMBL":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Tamilnadu Mercantile Bank" + }, + "UCBA":{ + "auth_types":[ + "netbanking", + "aadhaar" + ], + "name":"UCO Bank" + }, + "UJVN":{ + "auth_types":[ + "netbanking", + "debitcard" + ], + "name":"Ujjivan Small Finance Bank" + }, + "UBIN":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Union Bank of India" + }, + "VARA":{ + "auth_types":[ + "netbanking", + "aadhaar" + ], + "name":"Varachha Co-operative Bank" + }, + "YESB":{ + "auth_types":[ + "netbanking", + "aadhaar", + "debitcard" + ], + "name":"Yes Bank" + }, + "ABHY":{ + "auth_types":[ + "aadhaar" + ], + "name":"Abhyudaya Co-operative Bank" + }, + "APSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Adarniya P.d. Patilsaheb Sahakari Bank" + }, + "ACUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Adarsh Co-operative Urban Bank" + }, + "TACX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Adinath Co-operative Bank" + }, + "SATX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Adv.shamraoji Shinde Satyashodhak Bank" + }, + "AGCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Agrasen Co-operative Urban Bank" + }, + "AHUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ahilyadevi Urban Co-operative Bank Limited Solapur" + }, + "ADBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ahmedabad District Co-operative Bank" + }, + "AMCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ahmedabad Mercantile Co-operative Bank" + }, + "AHMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ahmednagar District Central Co-operative Bank" + }, + "AUCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ajara Urban Co-operative Bank" + }, + "AACX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Akhand Anand Co.op Bank" + }, + "AJKB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Akola Janata Commercial Co-operative Bank" + }, + "ALAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Alavi Co-operative Bank" + }, + "ALLX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Allahabad District Co-operative Bank" + }, + "AMAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Aman Sahakari Bank" + }, + "AJPX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ambajogai Peoples Co-operative Bank" + }, + "AJSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ambarnath Jai-hind Co-operative Bank" + }, + "AVDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Amravati District Central Co-operative Bank" + }, + "AMRX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Amreli Jilla Madhyastha Sahakari Bank" + }, + "TAMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Anand Mercantile Co-operative Bank" + }, + "ANSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Andaman & Nicobar State Co-operative Bank" + }, + "APGX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Andhra Pradesh Grameena Vikas Bank" + }, + "APBL":{ + "auth_types":[ + "aadhaar" + ], + "name":"Andhra Pradesh State Co-operative Bank" + }, + "ACKX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Annasaheb Chougule Urban Co-operative Bank" + }, + "ASKX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Arvind Sahakari Bank" + }, + "ASHX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ashta People's Co-operative Bank" + }, + "BUZX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Badaun Zila Sahkari Bank" + }, + "BKDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Banaskantha Dist Central Co-operative Bank" + }, + "BMPX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Banaskantha Mercantile Co-operative Bank" + }, + "BDUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Banda Urban Co-operative Bank" + }, + "TBMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bapunagar Mahila Co-operative Bank" + }, + "BSBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Baramati Sahakari Bank" + }, + "BARX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Baroda City Co-operative Bank" + }, + "BNBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Betul Nagrik Sahakari Bank Mydt" + }, + "BHDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bhadohi Urban Co-operative Bank Gyanpur" + }, + "BNSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bhagini Nivedita Sahakari Bank" + }, + "BHAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bhagyodaya Co-operative Bank" + }, + "BCBM":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bharat Co-operative Bank" + }, + "BKCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bhavasara Kshatriya Co-operative Bank" + }, + "BHUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bhilwara Urban Co-operative Bank" + }, + "BBLX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bhingar Urban Co-operative Bank" + }, + "BHCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bhuj Commercial Co-operative Bank" + }, + "BHJX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bhuj Mercentile Co-operative Bank" + }, + "TBSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bihar State Co-operative Bank" + }, + "BJUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bijnor Urban Co-operative Bank" + }, + "BMCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bombay Mercantile Co-operative Bank" + }, + "BORX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Boral Union Co-operative Bank" + }, + "BRMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Bramhapuri Urban Co-operative Bank" + }, + "BURX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Burdwan Central Co-operative Bank" + }, + "CALX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Calicut Co-operative Urban Bank" + }, + "CBHX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Central Co-operative Bank Bhilwara" + }, + "CHBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Chamba Urban Co-operative Bank Chamba" + }, + "CSBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Chartered Sahakari Bank Niyamitha" + }, + "CJAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Citizens' Co-operative Bank Jammu" + }, + "CMLX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Commercial Co-operative Bank" + }, + "DHUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Dahod Urban Co-operative Bank" + }, + "DENS":{ + "auth_types":[ + "aadhaar" + ], + "name":"Delhi Nagrik Sehkari Bank" + }, + "TDMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Dhanera Mercantile Co-operative Bank" + }, + "DSUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Dharamvir Sambhaji Urban Co-operative Bank" + }, + "DNSB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Dombivli Nagari Sahakari Bank" + }, + "DBAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Dr Babasaheb Ambedkar Sahakari Bank Nasik" + }, + "ABDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Dr. Ambedkar Nagrik Sahakari Bank Mydt Gwalior" + }, + "DSPX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Durgapur Steel Peoples' Co-operative Bank" + }, + "EUCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Etah Urban Co-operative Bank" + }, + "FINX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Financial Co-operative Bank" + }, + "GPCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Gandevi People's Co-operative Bank" + }, + "GNCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Gandhi Co-operative Urban Bank" + }, + "GHPX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ghatal Peoples' Co-operative Bank" + }, + "GUCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Goa Urban Co-operative Bank" + }, + "PJSB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Gopinath Patil Parsik Janata Sahakari Bank" + }, + "GRAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Grain Merchants' Co-operative Bank" + }, + "GACX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Gujarat Ambuja Co-operative Bank" + }, + "GSCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Gujarat State Co-operative Bank" + }, + "GCBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Guruvayur Co-operative Urban Bank" + }, + "HAMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Hamirpur District Co-operative Bank" + }, + "HSDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Hassan District Co-operative Central Bank" + }, + "HMNX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Himatnagar Nagarik Sahakari Bank" + }, + "IMPX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Imphal Urban Co-operative Bank" + }, + "ITDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Income Tax Dept Co-operative Bank" + }, + "ICMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Indore Cloth Market Co-operative Bank" + }, + "IPSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Indore Paraspar Sahakari Bank" + }, + "IPCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Indore Premier Co-operative Bank Indore" + }, + "ICBL":{ + "auth_types":[ + "aadhaar" + ], + "name":"Industrial Co-operative Bank" + }, + "ITCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Irinjalakuda Town Co-operative Bank" + }, + "XJKG":{ + "auth_types":[ + "aadhaar" + ], + "name":"J&K Grameen Bank" + }, + "JPCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Jalgaon Peoples Co-operative Bank" + }, + "JMCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Jalna Merchants Co-operative Bank" + }, + "TJNX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Jamnagar Mahila Sahakari Bank" + }, + "JASB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Janaseva Sahakari Bank (Borivli)" + }, + "JSBP":{ + "auth_types":[ + "aadhaar" + ], + "name":"Janata Sahakari Bank (Pune)" + }, + "JSMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Janata Sahakari Bank Amravati" + }, + "JHAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Jharneshwar Nagrik Sahakari Bank Maryadit" + }, + "JVCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Jivan Commercial Co-operative Bank" + }, + "JODX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Jodhpur Central Co-operative Bank" + }, + "JONX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Jodhpur Nagrik Sahakari Bank" + }, + "KALX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Kalna Town Credit Co-operative Bank" + }, + "KNBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Kalol Nagarik Sahakari Bank" + }, + "KAMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Kamala Co-operative Bank Solapur" + }, + "KKMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Kankaria Mainagar Nagrik Sahakari Bank" + }, + "KSCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Karnataka State Co-operative Apex Bank" + }, + "KRNX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Karnavati Co-operative Bank" + }, + "KVCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Kavita Urban Co-operative Bank" + }, + "KHUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Khamgaon Urban Co-operative Bank" + }, + "KUCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Kolhapur Urban Co-operative Bank" + }, + "KTBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Kottayam District Co-operative Bank" + }, + "KDCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Kozhikode District Co-operative Bank" + }, + "KMCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Krishna Mercantile Co-operative Bank" + }, + "LATX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Latur Urban Co-operative Bank Latur" + }, + "LBMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Laxmibai Mahila Nagrik Sahakari Bank Maradit" + }, + "LKMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Lokmangal Co-operative Bank Solapur" + }, + "MSCI":{ + "auth_types":[ + "aadhaar" + ], + "name":"Maharashtra State Co-operative Bank" + }, + "MVCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Mahaveer Co-operative Bank" + }, + "MAKX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Makarpura Industrial Estate Co-operative Bank" + }, + "MSBL":{ + "auth_types":[ + "aadhaar" + ], + "name":"Malad Sahakari Bank" + }, + "MPDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Malappuram District Co-operative Bank" + }, + "MABL":{ + "auth_types":[ + "aadhaar" + ], + "name":"Malleshwaram Co-operative Bank" + }, + "MALX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Malviya Urban Co-operative Bank" + }, + "MSCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Manipur State Co-operative Bank" + }, + "MSOX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Manorama Co-operative Bank Solapur" + }, + "MGCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Mansing Co-operative Bank" + }, + "MRTX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Maratha Co-operative Bank" + }, + "MYAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Meghalaya Co-operative Apex Bank" + }, + "MSNX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Mehsana District Central Co-operative Bank" + }, + "MLCG":{ + "auth_types":[ + "aadhaar" + ], + "name":"Merchants Liberal Co-operative Bank" + }, + "MZCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Mizoram Urban Co-operative Development Bank" + }, + "TMSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Modasa Nagarik Sahkari Bank" + }, + "MDEX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Model Co-operative Bank" + }, + "MPCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Moirang Primary Co-operative Bank" + }, + "MUSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Muslim Co-operative Bank" + }, + "NCCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nabadwip Co-operative Credit Bank" + }, + "NGRX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nagar Sahkari Bank" + }, + "NVSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nagar Vikas Sahkari Bank" + }, + "NSIX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nagrik Sahakari Bank Indore" + }, + "NBMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nagrik Sahakari Bank, Vidisha" + }, + "NTBL":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nainital Bank" + }, + "TNMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nanded Merchants Co-operative Bank Nanded" + }, + "NJSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nasik Jilha Mahila Sahakari Bank" + }, + "NMCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nasik Merchants Co-operative Bank" + }, + "NBBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"National Co-operative Bank Bangalore" + }, + "NJCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nav Jeevan Co-operative Bank" + }, + "NMCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Navi Mumbai Co-operative Bank" + }, + "NAVX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Navnirman Co-operative Bank" + }, + "NAWX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Nawanagar Co-operative Bank" + }, + "TNKX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Neela Krishna Co-operative Urban Bank" + }, + "NICB":{ + "auth_types":[ + "aadhaar" + ], + "name":"New India Co-operative Bank" + }, + "OMCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ojhar Merchant's Co-operative Bank" + }, + "ONSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Omkar Nagreeya Sahkari Bank" + }, + "OSMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Osmanabad Janata Sahakari Bank" + }, + "PALX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Pali Urban Co-operative Bank" + }, + "PLUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Palus Sahakari Bank" + }, + "PDUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Pandharpur Urban Co-operative Bank" + }, + "PASX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Paschim Banga Gramin Bank" + }, + "PCBL":{ + "auth_types":[ + "aadhaar" + ], + "name":"Patan Co-operativeeartive Bank" + }, + "PTSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Patan Nagarik Sahakari Bank" + }, + "PATX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Pathanmthitta District Co-operative Bank" + }, + "PUBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Peoples Urban Co-operative Bank" + }, + "PCUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Pochampally Co-operative Urban Bank" + }, + "PMEC":{ + "auth_types":[ + "aadhaar" + ], + "name":"Prime Co-operative Bank" + }, + "PCTX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Pune Cantonment Sahakari Bank" + }, + "PPBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Pune People's Co-operative Bank" + }, + "RECX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Railway Employees Co-operative Banking Society" + }, + "RCUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Rajadhani Co-operative Urban Bank" + }, + "RBBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Rajarambapu Sahakari Bank Peth" + }, + "RACX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Rajkot Commercial Co-operative Bank" + }, + "RAKX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Rajkot Peoples Co-operative Bank" + }, + "RRSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Ramrajya Sahakari Bank" + }, + "REBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Rendal Sahakari Bank Rendal" + }, + "SKUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"S S L S A Kurundwad Urban Bank" + }, + "SADX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sabarkantha District Central Co-operative Bank" + }, + "SSKX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sadhana Sahakari Bank" + }, + "SASA":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sahyadri Sahakari Bank" + }, + "SPSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sandur Pattana Souharda Sahakari Bank Niyamitha" + }, + "SISX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sanmati Sahakari Bank" + }, + "SNGX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sarangpur Co-operative Bank" + }, + "SNAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Saraspur Nagarik Co-operative Bank" + }, + "SRCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Saraswat Co-operative Bank" + }, + "SAVX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sardar Vallabhbhai Sahakari Bank" + }, + "SACX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sarvodaya Co-operative Bank Mumbai" + }, + "SNBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sarvodaya Nagrik Sahkari Bank" + }, + "SDSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Satara District Central Co-operative Bank" + }, + "TSUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Saurashtra Co-operative Bank" + }, + "SVCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shamrao Vithal Co-operative Bank" + }, + "SHCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shimla Urban Co-operative Bank" + }, + "SPCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shirpur Peoples Co-operative Bank" + }, + "SSBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shivdaulat Sahakari Bank" + }, + "SBUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shree Balaji Urban Co-operative Bank" + }, + "KDIX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shree Kadi Nagarik Sahakari Bank" + }, + "SMNX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shree Mahuva Nagrik Sahakari Bank" + }, + "HPCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shree Parswanath Co-operative Bank" + }, + "ADCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shri Adinath Co-operative Bank" + }, + "SCNX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shri Chhani Nagrik Sahkari Bank" + }, + "SMUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shri Mahavir Urban Co-operative Bank" + }, + "SEWX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shri Mahila Sewa Sahakari Bank" + }, + "VCCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shri Veershaiv Co-operative Bank" + }, + "SKCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Shrikrishna Co-operative Bank" + }, + "SNDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sind Co-operative Urban Bank" + }, + "SDCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sindhudurg District Central Co-operative Bank" + }, + "SIRX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sircilla Co-operative Urban Bank" + }, + "SDHX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Solapur Siddheshwar Sahakari Bank" + }, + "SONX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sonbhadra Nagar Sahkari Bank" + }, + "SNCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sonepat Urban Co-operative Bank" + }, + "SCUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sudha Co-operative Urban Bank" + }, + "SDCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Surat District Co-operative Bank" + }, + "SUMX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Surat Mercantile Co-operative Bank" + }, + "SPCB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Surat People's Co-operative Bank" + }, + "SUTB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Sutex Co-operative Bank" + }, + "TJSB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Thane Janata Sahakari Bank" + }, + "TUCL":{ + "auth_types":[ + "aadhaar" + ], + "name":"The Union Co-operative Bank Mahinagar" + }, + "TTUX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Tirur Urban Co-operative Bank" + }, + "TCUB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Trivandrum Co-operative Urban Bank" + }, + "TGMB":{ + "auth_types":[ + "aadhaar" + ], + "name":"Tumkur Grain Merchant's Co-operativeerate Bank" + }, + "UCCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Udaipur Central Co-operative Bank" + }, + "UMAX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Uma Co-operative Bank" + }, + "UNSX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Unava Nagrik Sahakari Bank" + }, + "TUNX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Union Co-operative Bank" + }, + "UBBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Urban Co-operative Bank Basti" + }, + "UCDX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Urban Co-operative Bank Dehradun" + }, + "UROX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Urban Co-operative Bank Rourkela" + }, + "UBGX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Uttar Bihar Gramin Bank" + }, + "VUCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Vaidyanath Urban Co-operative Bank" + }, + "VVCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Vallabh Vidyanagar Commercial Bank" + }, + "VERX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Veraval Mercantile Co-operative Bank" + }, + "TVPX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Veraval Peoples Co-operative Bank" + }, + "WKGX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Vidharbha Kokan Gramin Bank" + }, + "VSBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Vidya Sahakari Bank" + }, + "VSCX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Vikas Souharda Co-operative Bank" + }, + "VIKX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Vikramaditya Nagrik Sahakari Bank" + }, + "VCBX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Vishwas Co-operative Bank" + }, + "WAIX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Wai Urban Co-operative Bank" + }, + "YLNX":{ + "auth_types":[ + "aadhaar" + ], + "name":"Yadagiri Lakshmi Narsimha Swamy Co-operative Urban Bank " + }, + "AUBL":{ + "auth_types":[ + "debitcard" + ], + "name":"AU Small Finance Bank" + }, + "BKID":{ + "auth_types":[ + "debitcard" + ], + "name":"Bank of India" + }, + "CNSX":{ + "auth_types":[ + "debitcard" + ], + "name":"Chembur Nagarik Sahakari Bank" + }, + "SHIX":{ + "auth_types":[ + "debitcard" + ], + "name":"Shivalik Mercantile Co-operative Bank" + } + }, + "upi":true, + "nach":true + }, + "upi_intent":true +} +``` +### Related Information + +- [Integrate Recurring Payments Using UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/integrate.md) +- [Recurring Payments APIs for UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/apis.md) diff --git a/llm-content/payments/recurring-payments/upload-paper-nach-form.md b/llm-content/payments/recurring-payments/upload-paper-nach-form.md new file mode 100644 index 00000000..a7529e2e --- /dev/null +++ b/llm-content/payments/recurring-payments/upload-paper-nach-form.md @@ -0,0 +1,39 @@ +--- +title: Paper NACH Form +description: Know how to download the Paper Nach Form and upload a customer-signed copy. +--- + +# Paper NACH Form + +If the method for the [authorisation transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/paper-nach/integrate.md#nach-mandate-registration) is Paper NACH, a pre-filled NACH form is generated when you create an order or a registration link. This form needs to be downloaded, signed by the customer and uploaded for processing. + +The pre-filled form can be downloaded in the *.pdf* format. You can upload the signed NACH form only as an image. Following are the supported formats: +.JPG,.JPEG and .PNG. + +There are two ways to complete authorisation using Paper NACH: +- You download Paper NACH form and upload a customer-signed copy. +- The customer downloads Paper NACH form and uploads the signed copy. + +## You Download Paper NACH Form and Upload a Customer-signed Copy + +Watch the below video to know how to download the NACH form and upload the signed copy from the Dashboard. + +[Video: https://www.youtube.com/embed/VJ03wlFjmf8] + +To download and upload the form: +1. You download the form from the Dashboard. +2. Send it to the customer to sign. +3. The customer signs the form and sends it back to you. +4. You upload the signed form from the Dashboard. + +## The Customer Downloads Paper NACH Form and Uploads the Signed Copy + +Request your customer to download, sign and upload the signed form either on your Checkout (when integrating with Razorpay Standard Checkout) or on the hosted page (when using Registration Links). + +Watch this video to see how your customer can download the NACH form, sign it and upload the form. + +[Video: https://www.youtube.com/embed/kHeRIVLOqvM] + +### Related Information +- [ Create Recurring Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md) +- [Batch Operations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/batch-operations.md) diff --git a/llm-content/payments/recurring-payments/wallets/apis.md b/llm-content/payments/recurring-payments/wallets/apis.md new file mode 100644 index 00000000..e2b9146f --- /dev/null +++ b/llm-content/payments/recurring-payments/wallets/apis.md @@ -0,0 +1,29 @@ +--- +title: Recurring Payments APIs for Wallets +description: List of Recurring Payments APIs available for Wallets. +--- + +# Recurring Payments APIs for Wallets + +You can use the Recurring Payments APIs to perform various actions using Wallets as a payment method. + +## List of Recurring Payments APIs + +The table below lists the various Recurring Payments APIs available for Wallets and gives a brief description of each API: + +API | Description +--- +[Create Authorisation Transaction using Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/wallets/create-authorization-transaction.md#11-using-razorpay-standard-checkout) | API to create an authorisation transaction using Razorpay Checkout. +--- +[Create Authorisation Transaction using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/wallets/create-authorization-transaction.md#12-using-a-registration-link) | API to create an authorisation transaction using Registration Link. +--- +[Fetch Tokens using Payment id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/wallets/tokens.md#21-fetch-token-by-payment-id) | API to fetch tokens using the Payment id. +--- +[Fetch Tokens using Customer id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/wallets/tokens.md#22-fetch-tokens-by-customer-id) | API to fetch tokens using the Customer id. +--- +[Delete Tokens](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/wallets/tokens.md#23-delete-tokens) | API to delete tokens. +--- +[Create Subsequent Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/wallets/create-subsequent-payments.md) | API to create subsequent payments. + +### Related Information +[Integrate Recurring Payments using wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/wallets/integrate.md) diff --git a/llm-content/payments/recurring-payments/wallets/integrate.md b/llm-content/payments/recurring-payments/wallets/integrate.md new file mode 100644 index 00000000..54f49970 --- /dev/null +++ b/llm-content/payments/recurring-payments/wallets/integrate.md @@ -0,0 +1,172 @@ +--- +title: Integrate Recurring Payments Using Wallets +description: Steps to integrate Recurring Payments using Wallet. +--- + +# Integrate Recurring Payments Using Wallets + +Set up recurring payments using Touch'n Go wallet. Customers authorise their wallet once and subsequent payments are processed automatically without additional authentication. + +## Integration Flow + +The recurring payments integration involves three main steps: + +1. [Register Wallet Mandate](#1-register-wallet-mandate): Customer authorises their wallet for future charges. +2. [Fetch Token Details](#2-fetch-token-details): Retrieve and verify the mandate registration. +3. [Charge Customers](#3-charge-customers): Create subsequent payments as needed. + +## 1. Register Wallet Mandate + +Mandate registration creates an **authorisation transaction** where customers provide consent to charge their Touch'n Go wallet for future payments. This generates a secure **token** that represents the customer's payment authorisation. + + + + +> **WARN** +> +> +> **Watch Out!** +> +> Standard Checkout authorisation can only be created using Razorpay Curlec APIs. +> + + **Step 1:** [**Create a Customer**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/wallets/create-authorization-transaction.md#111-create-a-customer) + + Create a customer record in Razorpay Curlec to associate the mandate with. This returns a `customer_id` to be used in subsequent steps. + + **Step 2:** [**Create an Order**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/wallets/create-authorization-transaction.md#112-create-an-order) + + Create an order for the authorisation amount. You can set this to RM 1 for minimal authorisation or the actual first payment amount. Pass the token parameters including `max_amount` and `expire_at` to set mandate limits. + + **Step 3:** [**Create Authorisation Payment**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/wallets/create-authorization-transaction.md#113-create-an-authorization-payment) + + Initialise Razorpay Curlec Checkout with the `order_id`, `customer_id` and recurring-specific parameters. Specify `wallet` as the payment method. The customer completes the authorisation on Touch'n Go interface. Once the authorisation is successful, you receive a `token_id` in the payment response. This token represents the customer's wallet mandate. + + + + + ### Registration Link Flow + + ![Recurring Payments Using Registration Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/recurring-payments-recurring_payments_registration_link.jpg.md) + + **Create a Registration Link** using: + - [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/wallets/create-authorization-transaction.md#121-create-a-registration-link) + - [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#1-create-a-registration-link) + + Specify the authorisation amount, customer details, wallet type (Touch'n Go) and token parameters (max_amount and expire_at). The link can be sent to your customer via email or SMS. + + **Send the link** to your customer. The customer clicks the link, is redirected to Touch'n Go wallet interface, and completes the authorisation. + + +> **INFO** +> +> +> **No Need to Create Customer and Order Separately** +> +> When using registration links, Razorpay Curlec automatically creates both the customer and order records for you. +> + + ### Registration Link Statuses + + A registration link moves through the following states during its life cycle: + + + + +### Authorisation Payment Statuses + + Once the customer has made the Authorisation Payment, it moves through the following states as per the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md): + +Status | Description | Webhook +--- +Created | Payment is created when a customer enters and submits the payment information. | NA +--- +Authorized | Payment is authorized when the customer’s payment details are successfully authenticated by the bank. | [payment.authorized](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-authorized) +--- +Captured | Indicates that the payment is verified by you. +Once a payment is captured you can [retrieve the token](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token). | [payment.captured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-captured) or [order.paid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#order-paid) +--- +Failed | Indicates that the payment has failed. +If the payment has failed, you need to [create an authorisation transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/cards/create-authorization-transaction.md) again. | [payment.failed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/webhooks.md#payment-failed) + + + +## 2. Fetch Token Details + +After the authorisation transaction is complete, a **token** is generated. The token securely stores the customer's wallet authorisation and represents their mandate. + +You can retrieve token information using: + +- [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/wallets/tokens.md) +- [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/subscribe-to-webhooks.md#token-states) + + +### Token Lifecycle + + Tokens move through different states from creation to expiry: + + ![Token life cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rec-pmnts-2_1_1_1.jpg.md) + + + + + +## 3. Charge Customers + +Once the token is in **confirmed** state, you can create recurring payments without customer intervention. Each subsequent payment requires you to create a new charge request. + +> **WARN** +> +> +> **Important** +> +> - Always ensure the charge amount does not exceed the `max_amount` specified during token creation. Charges exceeding this limit will fail. +> - Ensure customers maintain sufficient balance in their Touch'n Go wallet for successful recurring charges. +> + +### How to Charge Customers + + + + **Step 1:** [**Find the Token**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#3-search-for-the-token) + + Use the Dashboard search to locate the customer's token. Verify the token status is **confirmed**. + + **Step 2:** [**Create a Charge**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/create.md#4-charge-the-token) + + Click **Charge Token** and enter the payment amount. Razorpay Curlec automatically creates an order and processes the payment. + + +> **INFO** +> +> +> **Automatic Order Creation** +> +> When charging via Dashboard, Razorpay Curlec automatically creates the order for you - no need to create it separately. +> + + + + + **Step 1:** [**Create an Order**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/wallets/create-subsequent-payments.md#31-create-an-order-to-charge-the-customer) + + Each subsequent payment must be associated with a unique order. This allows you to track payments and handle retries. Specify the charge amount, currency (MYR) and optional notes for tracking. + + **Step 2:** [**Create a Recurring Payment**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments/wallets/create-subsequent-payments.md#32-create-a-recurring-payment) + + Use the `token_id` to create a payment for the order. No customer action required. The payment is processed automatically against the customer's Touch'n Go wallet balance. + + +> **SUCCESS** +> +> +> **Best Practice** +> +> Set up webhooks to receive real-time notifications about payment status changes. This ensures you are immediately notified of successful or failed charges. +> + + + +### Related Information +[List of Wallets APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/wallets/apis.md) diff --git a/llm-content/payments/referral-program.md b/llm-content/payments/referral-program.md new file mode 100644 index 00000000..7e643d84 --- /dev/null +++ b/llm-content/payments/referral-program.md @@ -0,0 +1,127 @@ +--- +title: Razorpay Referral Program +description: Refer other businesses to Razorpay by participating in our Referral Program and earn free credits. +--- + +# Razorpay Referral Program + +The Razorpay Referral Program is a quick and easy way for you to become a Razorpay brand advocate. Join this program and invite businesses in your circle to use Razorpay products and earn up to ₹5,00,000 worth of amount credits! Refer to the [Program Rewards](#program-rewards) section for more information. + +![Razorpay Merchant Referral Program](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-merchant-referral-program.jpg.md) + +## Program Rewards + +Given below are the program rewards for you (the brand advocate) and your friends (the referred businesses). + + +### For You + + - You will get free amount credits of ₹1,00,000 for each of your referred businesses that signs up and becomes a successful referral. This means collections of up to ₹5,00,000 will be absolutely free. Know more about [credits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/credits.md#amount-credits). + + - You can refer as many businesses as you want, but you will be rewarded ₹1,00,000 free credits each only for the first 5 successful referrals. + + +> **INFO** +> +> +> **Handy Tips** +> +> A successful referral is a business that accepts payments of ₹2,000 or more. +> + + + + +### For Your Friend + + Referred businesses will get free amount credits of ₹1,00,000 when they sign up and accept payments worth ₹2,000 (irrespective of the number of transactions). + + +## Eligibility Criteria + +You can participate in this program only if: +1. Your Razorpay account has been completely activated for at least 3 days. +2. You have completed at least 3 transactions using Razorpay. +3. Your overall transaction volume is equal to or more than ₹3,000. + +## How To Refer + + +### Through Web Dashboard + + Watch this video to know how to refer a business from the Dashboard. + + +[Video content] + + To refer a business to Razorpay through the Dashboard: + 1. Log in to your Dashboard. + 2. In the **Home** page, click **Refer Now**. + ![Razorpay Merchant Referral Program](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-merchant-referral-program-refer-desktop.jpg.md) + 3. You can choose to: + - Copy the referral link and share it with other businesses via a channel of your choice. + - Enter your friend's email address and click **Send**. + - Share as a social media post using your business handles. + + ![Razorpay Merchant Referral Program](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-merchant-referral-program.jpg.md) + + The following success message is displayed after the referred business signs up for a Razorpay account and completes transactions of minimum ₹2,000. + + ![Razorpay Referral Program Desktop Success](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-referral-program-desktop-success.jpg.md) + + + +### Through Mobile App + + Watch this video to know how to refer a business from the [Razorpay Mobile App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/mobile-app.md). + + +[Video content] + + To refer a business to Razorpay via the Mobile App: + 1. Open the Razorpay Payments Mobile App and sign in. + 2. In the **Home** page, open the menu and tap **Refer and Earn**. + ![Razorpay Referral Program App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-referral-program-app-menu.jpg.md) + 3. Copy the referral link and tap **Refer Now** to share it with other businesses. + ![Razorpay Referral Program](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-referral-program-app-refer-now.jpg.md) + + You can share it via a channel of your choice. + + ![Razorpay Referral Program Mobile App Share](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-referral-program-app-share.jpg.md) + + The following success message is displayed after the referred business signs up for a Razorpay account and completes transactions of minimum ₹2,000. + + ![Razorpay Referral Program Mobile App Success](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-referral-program-app-success.jpg.md) + + +## FAQs + +#### 1. How can I check the rewards I got from my referrals? + +You can check credits earned through referrals on the Dashboard. + +1. Log in to the Dashboard. +2. Navigate to **Account & Settings** → **Credits**. + +> **INFO** +> +> +> **Handy Tips** +> +> Credits allotment can take up to 3 hours after the referred business completes the transaction(s) worth ₹2,000. +> + +#### 2. Why has the business I had referred not received free credits yet? + +This could be due to one of the following reasons: +- Credits allotment can take up to 3 hours after the referred business completes the transaction(s) worth ₹2,000. +- You, as the referrer, have already received total amount credits worth ₹5,00,000 (₹1,00,000 each from 5 successful referrals). + +#### 3. Is there an expiry on the free amount credits earned through referrals? +Yes, the free amount credits received via referrals will expire in 3 months. + +#### 4. I signed up via referral link but did not receive free credits? + +This could be due to one of the following reasons: +- As a referred business, you will get free credits only after accepting transactions worth ₹2,000. You are allowed to accept multiple payments to achieve this number. +- Credits allotment can take up to 3 hours after the referred business completes the transaction(s) worth ₹2,000. diff --git a/llm-content/payments/refunds.md b/llm-content/payments/refunds.md new file mode 100644 index 00000000..630d413b --- /dev/null +++ b/llm-content/payments/refunds.md @@ -0,0 +1,86 @@ +--- +title: Pay Refunds to Customers +heading: About Refunds +description: Initiate Normal and Instant Refund payments using Razorpay Dashboard and APIs for your customers. +--- + +# About Refunds + +There could be situations when customers request a refund of the payments made for the products or services purchased or availed on your website or app. + +> **INFO** +> +> +> +> **Customer Looking for Refund** +> +> If you are a customer looking for a refund, know about [customer refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers/customer-refunds.md). +> + +## Refund Types + +Following are the various types of refunds that you can use to refund payments to your customers: + +- [Normal Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/normal.md) + +Amount is refunded within 5-7 working days. + +- [Instant Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/instant.md) + +Amount is refunded almost immediately. + By issuing instant refunds to your customers, you can provide a better user experience for them. This also helps in improving their reliability and trust in your business. + +- [Batch Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/batch.md) + +Issue refunds in bulk using an XLSX or CSV file. Once you upload a file, it is picked up for processing after 70 minutes. You can cancel a batch upload in the 70 minutes before it is picked up for processing. + +## Dashboard Actions + +You can perform the following actions on refunds from the Dashboard: + +- [View Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/view.md) +- [Issue Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/issue.md) +- [View Settlement Details of a Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/view.md#view-settlement-details-of-a-refund) +- [Subscribe to Webhook Events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/subscribe-to-webhooks.md) + +## Refund States + +Following are the various states of a refund: + +States | Description +--- +`processed` | This is the final state of the refund. +--- +`failed` | A refund can attain the failed state in the following scenarios:- Normal refunds are not possible for a payment which is more than 6 months old. +- Instant refunds can sometimes fail because of customer's account or bank-related issues. + +> **WARN** +> +> +> **Watch Out!** +> +> Usually, Razorpay moves a refund to the `processed` state before receiving the ARN/RRN number from the Gateway. You can ensure that a refund moves to the `processed` state only after receiving confirmation from the Gateway by activating this feature on your account by raising a [support request](https://razorpay.com/support/#request). +> + +## Handle Refund Chargeback + +For the prevention of chargebacks, Razorpay only does **source refunds**. It means that money is refunded to the payment method that the customer used to make the payment. For example, if a credit card was used to make the payment, the refund is pushed to the same credit card. Similarly, in the case of UPI payments, the refund is pushed to the VPA used while making the payment. + +If a chargeback is received for an instantly refunded payment, the processed refund will have a **UTR (Unique Transfer Reference)** in the callback. This UTR appears against the **ARN (Application Reference Number)** parameter in the Refund entity. The UTR serves as a proof of refund completed between you and Razorpay. + +Additionally, Razorpay passes the **RRN (Razorpay Reference Number)** of the payment in the Fund Transfer Request sent for the refund. This ties the instant refund back to the parent payment, thereby, serving as a proof of the refund. This data can also be used as a defense against a future chargeback or arbitration case. + +## Reports + +Detailed insights can be gained using reports and real-time data on the Dashboard. These reports can then be used for accounting and reconciliation purposes. Know more about [reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md). + +Understand [how the Refund process works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/normal.md#how-normal-refunds-work). + +### Related Information + +- [EMI and Pay Later Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/emi-pay-later.md) +- [Add funds to your account to process refunds (low account balance)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/balances.md#add-funds-to-your-current-balance) +- [Handle refund errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/errors.md) +- [Refunds API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/apis.md) +- [Refund Communication](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/communication.md) +- [Refunds FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/faqs.md) diff --git a/llm-content/payments/refunds/apis.md b/llm-content/payments/refunds/apis.md new file mode 100644 index 00000000..e0d51fad --- /dev/null +++ b/llm-content/payments/refunds/apis.md @@ -0,0 +1,48 @@ +--- +title: Refunds APIs +description: List of Refunds APIs to perform actions like creating, viewing and updating refunds. +--- + +# Refunds APIs + +You can use the Refunds APIs to perform various actions. You can perform a few of these actions by logging in to the Dashboard as well. + +## List of Refunds APIs + +The table below lists the various Refunds APIs and gives a brief description of each API: + + API | Description + --- + [Create a Normal refund ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/create-normal.md) | API to create a Normal refund + --- + [Create an Instant refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md#create-an-instant-refund) | API to create an Instant refund + --- + [View multiple refunds for a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-multiple-refund-payment.md) | API to retrieve multiple refunds for a payment + --- + [Create an Instant Refund (Idempotent Request)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/instant-refunds-idempotent.md) | API to create an Instant refund (idempotent request) + --- + [Create a Normal Refund (Idempotent Request)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/normal-refunds-idempotent.md) | API to create a Normal refund (idempotent request) + --- + [View refund for a specific refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md) | API to retrieve details of a specific refund made for a payment + --- + [View all refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-all.md) | API to view details of all refunds + --- + [View refund details by refund id ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-with-id.md) | API to retrieve refund details using the refund id + --- + [Update refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/update.md) | API to update the 'Notes' field of an existing refund + +### Related Information + +- [About Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) + +- [Normal Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/normal.md) + +- [Instant Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/instant.md) + +- [Batch Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/batch.md) + +- [Issue Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/issue.md) + +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/subscribe-to-webhooks.md) + +- [Refunds FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/faqs.md) diff --git a/llm-content/payments/refunds/batch.md b/llm-content/payments/refunds/batch.md new file mode 100644 index 00000000..3da67b5e --- /dev/null +++ b/llm-content/payments/refunds/batch.md @@ -0,0 +1,147 @@ +--- +title: Batch Refunds +description: Create and cancel refunds in bulk to your customers using Batch Refunds. +--- + +# Batch Refunds + +Use Batch refunds to make refunds in bulk using an XLSX or CSV file. Once you upload a file, it is picked up for processing after 70 minutes. You can cancel a batch upload in the 70 minutes before it is picked up for processing. + + to get this feature activated on your Razorpay account. + +## Batch States + +A batch file can be in any of these states: +- `created`: This is the initial state of the file when it is uploaded. Once you upload a file, it stays in the `created` state for 70 minutes. You can cancel the upload during this time. +- `processing`: This state indicates that the batch file is getting processed. +- `processed`: This is the final state of the file. It indicates that all the rows in the batch file were processed, either successfully or unsuccessfully. Download the Batch Refund Report from the Dashboard to check the status of each refund. +- `cancelled`: You can only cancel batch uploads in the `created` state. You cannot cancel batch uploads in the `processing` or `processed` states. + +## Refund Fees + + + Razorpay does not charge any processing fee for Normal refunds. However, the transaction fee and GST levied by Razorpay at the time of payment capture will not be reversed to your account. + + + + + Razorpay charges a small transaction fee to process Instant refunds. The fees is deducted directly from your account balance and reflects under the **Refunds** tab on the Dashboard. In cases where the Instant refund fails and the refund takes 5-7 working days, the levied fee is credited back to your balance. The fee break-up is shown in the end-of-the-month invoice generated by Razorpay. View and download the details of fees charged in the **Instant Refunds Reports** from the Dashboard. + + For more details about pricing, [raise a Razorpay Support request](https://razorpay.com/support/#request). + + + +## Create a Batch Refund + +Follow the steps given below to create refunds in bulk using batch refund. + +To create a batch refund: +1. Log in to the Dashboard. +2. Go to **Transactions** and click **View All** on the **Refunds** tab. Select **Batch Refunds** and click **Click here to upload**. + ![batch refunds new](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/batch-refunds-new.gif.md) +3. Download the sample file. +4. Add the required data to the sample file. Know more about [Batch File Fields](#batch-file---fields). +5. Upload the file to the Dashboard, check the preview to ensure details are correct, and click **Submit Batch**. + ![Create a Batch Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/refunds-upload-batch-file.jpg.md) + +### Batch File - Fields + +Download the sample file, add your data and upload it for processing. We support CSV, XLS and XLSX file formats for the batch file. We do not support custom headers. + +Shown below is a sample data from a batch file: + +![Batch File Sample Data](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/refunds-batch-file.jpg.md) + +The below table lists the various headers in the sample batch file and briefly describes each. + +`Payment Id`_mandatory_ +: `string` The unique identifier for the payment that is to be refunded. For example, `pay_F1JdjAyjRexm9T`. + +`amount`_mandatory_ +: `integer` The amount, in subunits, to be refunded. For example, pass `1000` to process a refund of 10. + +`speed` _optional_ +: `string` The speed at which the refund should be processed. Possible values: + - `normal` : The refund is processed in 5-7 working days. + - `optimum` : Instant Refunds. If it is not possible to process the refund instantly, we will process the refund in 5-7 working days. Know more about [Instant Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/instant.md). + +If no value is passed, the refund is processed using the default Refund speed set on the Dashboard. + +## Cancel a Batch Upload + +You can cancel a batch upload from the Dashboard. + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can only cancel batch uploads in the `created` states. You cannot cancel batch uploads in the `processing` and `processed` states. +> + +To cancel a batch upload: +1. Log in to the Dashboard. +2. Go to **Transactions** and click **View All** on the **Refunds** tab. Select **Batch Refunds**. + ![batch refunds new](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/batch-refunds-new.gif.md) +3. Click **Cancel** for the **Batch Id** that you want to cancel. + +## Batch Refund Report + +Though a batch file may have acquired `processed` state, all the refunds may not have been successful due to errors. For example, if an incorrect payment id is added to the file, the file might be `processed`, but the refund would have failed. + +You can download the Batch Refund report to check the status of each data row. + +To download the Batch Refund report: +1. Log in to the Dashboard. +2. Go to **Transactions** and click **View All** on the **Refunds** tab. Select **Batch Refunds**. + ![batch refunds new](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/batch-refunds-new.gif.md) +3. Click **Download** for the required **Batch Id** to download the Batch Refund Report. + - If a payment was successfully refunded, the corresponding data row is populated with a `Refund Id`. + - If a payment was not successfully refunded, the corresponding data row is populated with `Error Code` and `Error Description`. + +### Batch Report - Fields + +Given below is a sample data from a processed batch file: + +![Processed Batch File Sample Data](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/refunds-processed-batch-file.jpg.md) + +The below table describes each of the headers of the processed batch file: + +`Payment Id` +: `string` The unique identifier for the payment that is to be refunded. For example, `pay_F1JdjAyjRexm9T`. + +`Amount` +: `integer` The amount, in subunits, to be refunded. For example, pass `1000` to process a refund of 10. + +`Refund Id` +: `string` The unique identifier of the refund. For example, `rfnd_EqWThTE7dd7utf`. + +`Refunded Amount` +: `integer` The amount, in subunits, refunded to the customer. For example, `1000` means 10 was refunded to the customer. + +`status` +: `string` The status of the refund. Possible values: + - `processed` : The refund was successfully processed by us. + - `failure` : The refund was not processed. You need to create the refund again. + +`speed` _optional_ +: `string` The speed at which the refund should be processed. Possible values: + - `normal` : The refund is processed in 5-7 working days. + - `optimum` : Instant Refunds. If it is not possible to process the refund instantly, we will process the refund in 5-7 working days. Know more about [Instant Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/instant.md). + +`Error Code` +: `string` The error code for the failure. For example, `BAD_REQUEST_ERROR`. + +`Error Description` +: `string` The reason for the error. For example, `The refund amount provided is greater than the unrefunded amount`. + +### Related Information + +- [About Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) + +- [Normal Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/normal.md) + +- [Instant Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/instant.md) + +- [Refunds FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/faqs.md) diff --git a/llm-content/payments/refunds/chargeback.md b/llm-content/payments/refunds/chargeback.md new file mode 100644 index 00000000..2783ac2c --- /dev/null +++ b/llm-content/payments/refunds/chargeback.md @@ -0,0 +1,12 @@ +--- +title: Handling Chargebacks for Refunds +description: Prevent and handle chargebacks. +--- + +# Handling Chargebacks for Refunds + +For the prevention of chargebacks, Razorpay only does **source refunds**. It means that money is refunded to the payment method that the customer used to make the payment. For example, if a credit card was used to make the payment, the refund is pushed to the same credit card. Similarly, in UPI payments, the refund is pushed to the VPA used while making the payment. + +If a chargeback is received for an instantly refunded payment, the processed refund will have a **UTR (Unique Transfer Reference)** in the callback. This UTR appears against the **ARN (Application Reference Number)** parameter in the Refund entity. The UTR serves as proof of refund completed between you and Razorpay. + +Additionally, Razorpay passes the **RRN (Razorpay Reference Number)** of the payment in the Fund Transfer Request sent for the refund. This ties the instant refund back to the parent payment, thereby serving as proof of the refund. This data can also be used as a defence against a future chargeback or arbitration case. diff --git a/llm-content/payments/refunds/communication.md b/llm-content/payments/refunds/communication.md new file mode 100644 index 00000000..f0285efe --- /dev/null +++ b/llm-content/payments/refunds/communication.md @@ -0,0 +1,47 @@ +--- +title: Refund Emails to Customers +heading: Refund Communication +description: Check the refund-related emails sent to your customers after the refunds are initiated. +--- + +# Refund Communication + +If a customer is asking for a refund, the banking partner provides a unique reference number (either RRN, ARN or UTR) when a refund is processed. The customer can use this reference number to track the refund status with the bank. + +As a customer, you will be notified of the specific payment to be refunded in 7-10 working days. + +> **INFO** +> +> +> **Customer Looking for Refund** +> +> If you are a customer looking for a refund, know more about [customer refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers/customer-refunds.md). +> + +## Refund Mailers + +Razorpay sends you the following email communications for refunds: + +- Refund Mailer + After you process the refund, Razorpay sends you an email with the refund id and unique reference number (ARN, RRN or UTR) provided by the bank. + +![Refund Mailer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/normal_refund_mailer1.jpg.md) + +- RRN/ARN Update Mailer + When you refund a credit card payment, the banking partner will share an ARN with Razorpay. Razorpay sends you an email with this ARN number. + + +![RRN/ARN Update Mailer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/normal_arn_mailer.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> Razorpay sends the **Refund** and **RRN/ARN Update** emailers only if the customer email is passed to us. +> + +### Related Information + +- [Customer Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers/customer-refunds.md) +- [Refunds APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/apis.md) diff --git a/llm-content/payments/refunds/emi-pay-later.md b/llm-content/payments/refunds/emi-pay-later.md new file mode 100644 index 00000000..928d6e80 --- /dev/null +++ b/llm-content/payments/refunds/emi-pay-later.md @@ -0,0 +1,212 @@ +--- +title: EMI and Pay Later Refunds +description: Initiate the process of Refunds for EMI transactions and Pay Later. +--- + +# EMI and Pay Later Refunds + +You can refund payments to customers who have used EMI methods, such as Debit Card EMI, Credit Card EMI, Cardless EMI and so on, offered by different banks that have partnered with Razorpay. + +You can also process refunds to your customers who have made payments using the [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md) option. Know more about the various [third-party providers offering Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md). + +## How EMI and Pay Later Refunds Work + +When your customer makes an online purchase using EMI methods on your website or app, the transaction amount is converted into Equated Monthly Instalments (EMIs). Following is the EMI payment flow from the customer to the merchant: + +1. Customer purchases for Total_Amt via EMI on your website or app. +2. Bank pays Razorpay (Razorpay_Amt = Total_Amt - Bank Commission). +3. Razorpay pays you (Merchant_Amt = Razorpay_Amt - Razorpay Commission). + +> **INFO** +> +> +> **Handy Tips** +> +> The EMI includes a portion of the principal outstanding and interest component, which your customer needs to pay every month until the full amount is paid. +> + +## Refund Flow for EMI Transactions + +1. You receive a refund request from your customer. +2. You will raise a Refund Request with Razorpay, indicating the amount to be refunded, which is ₹X. + +> **INFO** +> +> +> **Handy Tips** +> +> You can set the required payment terms and conditions. +> + +3. Razorpay then passes the Refund Request with the bank, indicating the amount to be refunded. +4. The bank refunds the amount, Min (₹X, Total Principal paid). + - If ₹X = Total Principal Amount paid by the customer, it is a **Full Refund**. + - If ₹X **INFO** +> +> +> **Handy Tips** +> +> - Your customer may be charged cancellation charges by the bank over and above the refund amount. +> - The interest paid for EMI payments cannot be refunded. +> + +### Use Cases + + + + If your customer purchases a product from your website or app using the Debit Card EMI option and raises a refund request, only a full refund request can be raised. + + Debit Card EMI does not support multiple partial refunds as order information or product details are not sent to the bank processing the EMI payments. Razorpay team shares the reconciliation file with the bank, and the bank refunds the amount based on the calculations. + + +> **INFO** +> +> +> **Handy Tips** +> +> - For DC EMI, only a full refund is allowed. A partial refund is not supported. +> - The interest paid for EMI payments cannot be refunded and is directly managed by the issuing bank. +> + + **Examples - How refund is processed for Debit Cards EMIs** + + - A customer purchases 3 products - Product A, B and C, in a single payment using the Debit Card EMI option. The customer cancels Product A within 5 days of purchase and then cancels Product B on the 7th day. Here, a partial refund will not be supported as there are multiple items/orders, and Razorpay does not provide an order-level split up to the bank. A full refund request can be raised with the bank for all the 3 products. + - A customer purchases 2 products - Product A (₹2000) and Product B (₹7000). In a 3-month EMI plan, the customer needs to pay an EMI amount of ₹3100 (Total payment of ₹9300 in 3 months). After paying the first installment, the customer returns Product A. In this case, for a Debit Card EMI option, you cannot raise a partial refund request for ₹2000. You will have to raise a full refund request for the entire amount of ₹9000. The interest of ₹100 that the customer paid as part of the first EMI installment cannot be refunded. + + Know more about [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md). + + + If a customer purchases a product on your website or app using the Credit Card EMI option and requests for refund, there can be the following two scenarios in case the refund is processed: + + - For a full refund request made by your customer, the full principal amount is refunded. + - For a partial refund, the principal amount will be reduced by the amount that has been refunded. + + **Examples - How refund is processed for Credit Cards EMIs** + + - A customer purchases 2 products - Product A (₹2000) and Product B (₹7000). In a 3-month EMI plan, the customer needs to pay an EMI amount of ₹3100 (Total payment of ₹9300 in 3 months). The customer decides to return both Product A and Product B. In this case, for a Credit Card EMI option, the entire amount of ₹9000 will be refunded to your customer. However, the interest or any other processing charges levied for using the EMI option may not be reversed. + - A customer purchases 2 products - Product A (₹2000) and Product B (₹7000). In a 3-month EMI plan, the customer needs to pay an EMI amount of ₹3100 (Total payment of ₹9300 in 3 months). The customer decides to return Product A. In this case of partial refund, for a Credit Card EMI option, the principal amount of ₹2000 will be refunded to your customer. The remaining EMIs will be re-calculated basis the new principal amount, which is the Original amount - Refunded amount. + + +> **INFO** +> +> +> **Handy Tips** +> +> - The interest paid for EMI payments cannot be refunded and is directly managed by the issuing bank. +> - Depending on the card issuer and their terms and conditions, the processing charges levied for using the EMI option may or may not be reversed. +> - Whether it is a full refund or a partial refund, the GST and other charges already levied by the bank may not get refunded. +> - To cancel a Credit Card EMI, your customer should contact the credit card issuing bank. +> + + To cancel a Credit Card EMI, your customer must reach out to the bank. Know more about [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi.md). + + + The No Cost EMI Refund process is similar to a normal [EMI Refunds](#refund-flow-for-emi-transactions) process. The only difference is that the Principal Amount used in calculations is the amount after subtracting the discount amount. + + **Example** + Let us consider the example of buying a mobile phone worth ₹15000 using the No Cost EMI on a 3-month EMI period. The bank charges 15% interest per annum. In this case, the retailer offers a discount of ₹367.33. + + + **Original Cost of Mobile Phone** | **No Cost EMI Discount Offered by Retailer** | **Net Cost of Phone** | **Total interest to be paid under EMI (In case of purchase on EMI)** | **Final Price** | **EMI for 3 months** + --- + ₹15000 | ₹367.33 | ₹14632.67 | ₹367.33 | ₹15000 | ₹5000 + + + In the above example, the Principal Amount = ₹14632.67 (and not ₹15000). The original price is discounted by ₹367.33. This cost is borne by the retailer. For a bank charging 15% interest per annum with an EMI period of 3 months, the discount is 2.45%. The discounted amount is ₹367.33 (₹15000 * 2.45%). +Your customer will pay interest on a discounted amount of ₹14632.67. The interest paid by them would-be ₹367.33. + + +> **INFO** +> +> +> **Handy Tips** +> +> - Your customer may be charged cancellation charges by the bank over and above the refund amount. +> - Interest already billed in a particular transaction is not refundable under any circumstances. +> - The processing charges levied by the bank for using the No Cost EMI option cannot be refunded to the customer. +> + + Know more about [No Cost EMIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md). + + + Your customer purchases a product from your website or app using the Cardless EMI option and requests for a refund. Any EMI instalments paid by the customer is refunded to the same payment mode or account that was used to make the payment. + +> **INFO** +> +> +> **Handy Tips** +> +> Razorpay does not do calculations for Cardless EMI. +> + + Know more about [Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md). + + +## Refund Flow for Pay Later + +1. You receive a refund request from your customer. +2. You will raise a Refund Request with Razorpay, indicating the amount to be refunded. +3. Razorpay passes the refund request details to the respective [Pay Later providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md#supported-pay-later-providers), where the refund takes place before the Payback Period: + - If it is a **full refund**, your customer’s loan is closed by the respective provider. They are no longer billed to repay this amount. + - If it is a **partial refund**, your customer is billed and will need to repay the balance amount to the Pay Later provider. Here, the refunded amount gets adjusted against the loan amount. + + +> **INFO** +> +> +> **Handy Tips** +> +> - The refund will take place within 5-7 business days, depending on the provider’s processing time. +> - Where the amount is repaid to the Pay Later provider, your customer gets a good credit limit (amount of credit available for use) with the refund amount. This balance amount can be used for subsequent payments. +> + +Know more about [Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md). + +## Refund Timelines + +Below is the list of refund timelines supported by cardless EMI and pay later providers. + + + + Providers | Refund Timelines + --- + axio | 30 days + --- + Zestmoney | 1 year + --- + Fibe | Infinite + --- + InstaCred | Infinite + + + + + Providers | Refund Timelines + --- + Lazypay | 6 months + --- + PayPal | 6 months + + + +## Frequently Asked Questions (FAQs) + + +### 1. How can the customers track the EMI refund amount in their accounts? + + For the EMI refund, a record is displayed in the customer's bank statement stating the Refund/Reversal amount for the payment towards EMI. The EMI amount refunded to your customer depends upon their bank based on the cancellation fee, processing fee, or any other bank charges. + + + +### 2. What happens to the EMIs if the customer cancels an order? + + If your customer cancels or returns an order purchased using the Credit Card or Debit Card EMI option, the entire purchase amount is immediately refunded to the customer's card. The EMI is also canceled at your (merchant) end. If the customer has paid any down-payment amount, it is refunded to the customer's card within 5-7 business days. The customers should contact their bank to confirm the EMI cancellation. + + + +### 3. How will future EMI payments be affected in case there is a pending amount to be paid after a refund? + + Suppose there is a balance amount to be paid by the customer. In that case, the remaining EMIs will be re-calculated basis the new principal amount, which is the Original amount, the refunded amount. +In order to close the loan, the customer has to pay the pending amount and only then it would be complete closure. However, this is a very rare case scenario. Refer to the following examples: + - A customer purchases 2 products - Product A and Product B. After paying a few EMIs, the customer decides to cancel the complete order. In this case, the customer needs to pay the full refund. The original loan booking amount will be debited in full and get adjusted against the full refund credit. The interest debits done earlier will be credited. However, the customer might need to follow up with the bank to ensure that the EMI transaction is canceled and that no more EMIs are debited. + - A customer purchases 2 products - Product A (₹2000) and Product B (₹7000). In a 3-month EMI plan, the customer needs to pay an EMI amount of ₹3100 (A total payment of ₹9300 in 3 months). After paying for a couple of monthly installments, the customer returns Product B. In this case, the customer will pay as per the regular EMI plan, that is, without affecting the EMI booking. The refund amount will reflect as a credit on the card. However, the interest already billed will not be reversed. diff --git a/llm-content/payments/refunds/errors.md b/llm-content/payments/refunds/errors.md new file mode 100644 index 00000000..56aea6d2 --- /dev/null +++ b/llm-content/payments/refunds/errors.md @@ -0,0 +1,76 @@ +--- +title: Handle Refund Errors +description: Check the errors that may occur while processing Refunds and how to handle these errors. +--- + +# Handle Refund Errors + +Sometimes when you try to process a refund request, it fails to get processed and you may encounter `BAD_REQUEST_ERROR` messages stating refunds are not supported. This happens because most of the banks do not support refunds for payments that are more than 6 months old. + +## List of Possible Refund Errors + +Given below is a refund error example. + +```json: Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Refund is not supported by the bank because the payment is more than 6 months old", + "source": null, + "step": null, + "reason": null, + "metadata": {} + } +} +``` + +You can try to process such refunds using [**Instant Refund**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/instant.md). To check the refund status, navigate to the **Refund Details** pop-up by clicking on the specific **Refund Id** under the **Transactions** → **Refunds** tab. + +You can get the ARN/RRN for successfully processed refunds under the [Dashboard Refunds tab](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/view.md) or using the [Fetch Refund API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md#fetch-refund-by-id). This is a unique reference number which can be used by the customers to track refunds. + +> **INFO** +> +> +> +> **Instant Refund Fee** +> +> We charge a [small fee to process instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/instant.md#refund-fees). +> + +If **Instant Refund** for a payment that is more than 6 months old is not supported, an error message is displayed on the **Refund Payment** pop-up. + +You will encounter the following error code and error message in the API response: + +```json: Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Refund is not supported by the bank because the payment is more than 6 months old", + "source": null, + "step": null, + "reason": null, + "metadata": {} + } +} +``` + +> **INFO** +> +> +> +> **Instant Refund Fee Reversal** +> +> If the instant refund fails, any fee charged will be reversed to your account. +> + +### Related Information + +- [About Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) + +- [Normal Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/normal.md) + +- [Instant Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/instant.md) + +- [Batch Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/batch.md) + +- [Refunds FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/faqs.md) diff --git a/llm-content/payments/refunds/faqs.md b/llm-content/payments/refunds/faqs.md new file mode 100644 index 00000000..9a4ecf62 --- /dev/null +++ b/llm-content/payments/refunds/faqs.md @@ -0,0 +1,181 @@ +--- +title: Payments | Refunds - FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Refunds via Razorpay and IRCTC refunds. +--- + +# Frequently Asked Questions (FAQs) + +## General FAQs + + +### 1. How do I initiate a refund? + + You can issue partial or full refund using: + - [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/issue.md#issue-refunds). + - [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md). + + By default, the entire amount is refunded. If you issue a partial refund, ensure the partial refund option is selected and enter the desired value in INR. + + +> **WARN** +> +> +> +> **Watch Out!** +> +> Razorpay issues immediate refunds. Once a refund is issued, it cannot be canceled or reversed. +> + + + + +### 2. Do you charge for refund? + + - **Refunds** + + No, we do not charge for the regular refunds. However, fees and taxes charged for a captured payment are not reversed. + - **Instant Refunds** + + Yes, we charge a small fee to issue instant refunds. Know more about [instant refund pricing](https://razorpay.com/pricing/). + + + +### 3. I am unable to refund a payment. What do I do? + + If your current balance is less than the amount you are trying to refund, you can either initiate the refund once you receive further payments or you can [add funds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#add-funds) to your account from the Dashboard. + + + +### 4. When a refund is initiated, can its status remain 'pending' until settlement? How should I track the final status (processed/failed)? + + Yes, a refund status can remain in a 'pending' state, particularly when the refund cannot be processed instantly. This state indicates that the refund has been accepted by Razorpay but is still being processed by the bank or payment network. + + The **`refund.processed` webhook** is the **most reliable and recommended** way to receive the final status update (Processed, Failed or Reversed). + + We strongly suggest implementing **both** the Refund API response handler (for immediate status) and the **`refund.processed` webhook** (for the definitive final status update) to ensure reliable status tracking and update your inventory/ledger accurately. + + + +### 5. Do all refunds (including Instant Refunds) always return a 'processed' status instantly via the Refund API? + + No, not all refunds return 'processed' instantly. + + - **Instant Refunds (Optimum Speed):** If the refund is successfully processed instantly, the API response will typically show a `processed` status immediately or shortly after. + - **Normal Refunds (Standard Speed) or Failed Instant Refunds:** If the refund defaults to the normal processing speed (5-7 business days) or if the API call is synchronous but the bank processing takes time, the initial API response might return a **`pending`** status. + + In all scenarios, rely on the **`refund.processed` webhook** for the final, verified status update to ensure your application records are correct. + + +## IRCTC Customers + + +### 1. I have cancelled my ticket. When will I receive my refund? + + After you cancel a booking, IRCTC has to initiate the refund. You will receive the credit in your account within 7-10 working days from the date of refund. + + + +### 2. How can I check the status of my transaction if I have not received a confirmation mail? + + If you have not received the email, check your booking status directly on the IRCTC portal or contact IRCTC support. + + + +### 3. My account has been debited but I have not received my tickets. How do I proceed? + + If you have not received your booking confirmation mail from IRCTC after paying for your tickets, it means your payment was unsuccessful. + + In such cases, your money is credited back to your account within 7-10 working days from the transaction date. Know more about the [refund timelines](https://razorpay.com/blog/why-do-refunds-take-time/). + + If you have not received the amount even after 10 days, [contact support](https://razorpay.com/support/) with the following details: + + - IRCTC transaction id. + - A copy of the bank statement from the date of debit to the current date. + - UPI Reference number (if the transaction is via UPI). + + +. + + +> **WARN** +> +> +> **Watch Out!** +> +> Razorpay issues immediate refunds. Once a refund is issued, it cannot be canceled or reversed. +> + + + + +### 2. Do you charge for a refund? + + No, we do not charge for the regular refunds. However, fees charged for a captured payment are not reversed. + + + +### 3. I am unable to refund a payment. What do I do? + + If your current balance is less than the amount you are trying to refund, you can initiate the refund once you receive further payments. + + + +### 4. When a refund is initiated, can its status remain 'pending' until settlement? How should I track the final status (processed/failed)? + + Yes, a refund status can remain in a 'pending' state, particularly when the refund cannot be processed instantly. This state indicates that the refund has been accepted by Razorpay but is still being processed by the bank or payment network. + + The **`refund.processed` webhook** is the **most reliable and recommended** way to receive the final status update (Processed, Failed or Reversed). + + We strongly suggest implementing **both** the Refund API response handler (for immediate status) and the **`refund.processed` webhook** (for the definitive final status update) to ensure reliable status tracking and update your inventory/ledger accurately. + + + +### 5. Do all refunds (including Instant Refunds) always return a 'processed' status instantly via the Refund API? + + No, not all refunds return 'processed' instantly. + + - **Instant Refunds (Optimum Speed):** If the refund is successfully processed instantly, the API response will typically show a `processed` status immediately or shortly after. + - **Normal Refunds (Standard Speed) or Failed Instant Refunds:** If the refund defaults to the normal processing speed (5-7 business days) or if the API call is synchronous but the bank processing takes time, the initial API response might return a **`pending`** status. + + In all scenarios, rely on the **`refund.processed` webhook** for the final, verified status update to ensure your application records are correct. + + +. + + +> **WARN** +> +> +> **Watch Out!** +> +> Razorpay issues immediate refunds. Once a refund is issued, it cannot be canceled or reversed. +> + + + + +### 2. I am unable to refund a payment. What do I do? + + If your current balance is less than the amount you are trying to refund, you can initiate the refund once you receive further payments. + + + +### 4. When a refund is initiated, can its status remain 'pending' until settlement? How should I track the final status (processed/failed)? + + Yes, a refund status can remain in a 'pending' state, particularly when the refund cannot be processed instantly. This state indicates that the refund has been accepted by Razorpay but is still being processed by the bank or payment network. + + The **`refund.processed` webhook** is the **most reliable and recommended** way to receive the final status update (Processed, Failed or Reversed). + + We strongly suggest implementing **both** the Refund API response handler (for immediate status) and the **`refund.processed` webhook** (for the definitive final status update) to ensure reliable status tracking and update your inventory/ledger accurately. + + + +### 5. Do all refunds (including Instant Refunds) always return a 'processed' status instantly via the Refund API? + + No, not all refunds return 'processed' instantly. + + - **Instant Refunds (Optimum Speed):** If the refund is successfully processed instantly, the API response will typically show a `processed` status immediately or shortly after. + - **Normal Refunds (Standard Speed) or Failed Instant Refunds:** If the refund defaults to the normal processing speed (5-7 business days) or if the API call is synchronous but the bank processing takes time, the initial API response might return a **`pending`** status. + + In all scenarios, rely on the **`refund.processed` webhook** for the final, verified status update to ensure your application records are correct. diff --git a/llm-content/payments/refunds/instant.md b/llm-content/payments/refunds/instant.md new file mode 100644 index 00000000..ab60ef8a --- /dev/null +++ b/llm-content/payments/refunds/instant.md @@ -0,0 +1,86 @@ +--- +title: About Instant Refunds +description: Check Instant Refunds, how they are processed, supported payment methods, processing time and refund fees. +--- + +# About Instant Refunds + +You can refund the amount to your customer almost instantly using Instant Refunds. This provides a better user experience for them. This also helps in improving their reliability and trust in your business. + +> **INFO** +> +> +> **Handy Tips** +> +> Instant Refunds feature is enabled by default for your account. You should set the refund speed to `optimum` when creating a refund request to ensure refunds are processed instantly. We will consider the default speed if you do not specify the same during the refund request. Know more about [setting the default speed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/refund-speed.md) from the Dashboard. +> + +Refunds will be processed at an optimal speed based on Razorpay's internal fund transfer logic: +- If the refund can be processed instantly, Razorpay will do so irrespective of the payment method used to make the payment. +- If an Instant Refund is not possible, Razorpay will initiate a refund that is processed at the normal speed. + +> **INFO** +> +> +> +> **Customer Looking for Refund** +> +> If you are a customer looking for a refund, know more about [customer refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers/customer-refunds.md). +> + +## How Instant Refunds Work + +When an Instant Refunds request is sent to Razorpay, our system processes the refunds instantly. The customer receives the refund within minutes (or an hour, sometimes) on their original payment source. + +Instant Refunds is a value-added service provided by Razorpay; if and when you opt, Razorpay will charge due consideration for providing Instant Refunds services. You must agree to read and understand the terms of Instant Refunds before signing up. + +Following is a typical flow for instant refunds: + +![Instant Refund Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/instant-refund-flow.jpg.md) + +### Payment Methods + +We support the following payment methods for Instant refunds. The list of banks that support Instant refunds differs according to payment methods. + +- [List of supported banks for Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/supported-payment-methods.md#netbanking) +- [List of supported banks for UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/supported-payment-methods.md#upi) + +Refunds are sent back to the original payment method used in making the payment. For example, if netbanking was used to make the payment, the refund amount was pushed to the same netbanking details. + +### Processing Time + +For all transactions, the time taken depends on the amount to be refunded: + +**Refund Amount** | **Time Taken for refund** +--- +Up to | Credited immediately to the customer's account. +--- +More than | Credited within two hours during business hours. +For refunds raised beyond working hours, it can take up to 1 business day for the refund to reflect in the customer's account. + +### Refund Fees + +Razorpay charges a small transaction fee to process Instant Refunds. The fees is deducted directly from your account balance and reflects under the Dashboard Refunds tab. In cases where the Instant refund fails and the refund takes 5-7 working days, the levied fee is credited back to your account balance. The fee break-up is shown in the end-of-the-month invoice generated by Razorpay. You can view and download the details from the **Instant Refunds Reports** from the Dashboard. Visit the [pricing page](https://razorpay.com/pricing/) for more details. + +> **WARN** +> +> +> +> **Watch Out!** +> +> In the case of instant refunds, the Platform fee charged or deducted for the transaction will not be refunded. +> + +## Dashboard and API Actions + +You can perform the following actions: +- [Issue Instant refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/issue.md) +- [Handle refund errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/errors.md) + +### Related Information + +- [Payment Methods for Instant Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/supported-payment-methods.md) +- [Batch Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/batch.md) +- [Refunds API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/apis.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/subscribe-to-webhooks.md) +- [Refunds FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/faqs.md) diff --git a/llm-content/payments/refunds/issue.md b/llm-content/payments/refunds/issue.md new file mode 100644 index 00000000..edb90f11 --- /dev/null +++ b/llm-content/payments/refunds/issue.md @@ -0,0 +1,72 @@ +--- +title: Issue Refunds +description: Issue refunds to customers using Razorpay Dashboard and APIs. +--- + +# Issue Refunds + +You can issue refunds to your customers using the Dashboard or APIs. Refunds are possible for `captured` payments only. + +> **INFO** +> +> +> +> **Customer Looking for Refund** +> +> If you are a customer looking for a refund, know about [customer refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers/customer-refunds.md). +> + +## Full and Partial Refunds + +Refunds can be made either in **full** or in **part**. + +- **Full Refund** + +You can refund the entire amount that you received in the payment. + +- **Partial Refund** + +You can refund part of the amount received in the payment. You can issue multiple, partial refunds as long as their sum does not exceed the captured amount. + +A payment moves to the `refunded` state only when the entire amount is refunded to the customer. In case of partial refunds, the payment remains in the `captured` state till the entire payment is refunded. + +## Issue Refunds + +### Issue Refunds Using Dashboard + +Watch this video to see how to issue a refund. + +[Video: https://www.youtube.com/embed/O-tkAsnvV1w?si=WKjXZtkSYrdCVDVW] + +To issue refunds: + +1. Log in to the Dashboard. +2. Navigate to **Transactions** → **Payments**. +3. Select the payment for which refund is requested. The payment should be in the `captured` state. +4. On the **Refund Payment** page, in the **amount** field, enter an amount lesser than the captured amount for issuing a partial refund. +By default, the entire amount will be refunded. +5. Look for the **Refund Instantly** check box. + - If you want to issue a normal refund, unselect the **Refund Instantly** check box. + ![Unselect Refund Instantly to issue a normal refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/instant_refunds_self_serve-normal-refund-payment.jpg.md) + - If you want to issue an [instant refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/instant.md), select the **Refund Instantly** check box. + ![Select Refund Instantly to issue Instant Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/instant_refunds_self_serve-instant-refund-payment.jpg.md) +6. Review the fees that will be levied for the refund to be processed instantly. +7. Click the **Issue Full Refund** or **Issue Partial Refund** button, depending on the amount to be refunded. + +### Issue Refunds Using API + +To create a normal refund, use [Create a Normal Refund API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/create-normal.md). + +### Related Information + +- [About Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) + +- [Normal Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/normal.md) + +- [Instant Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/instant.md) + +- [Batch Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/batch.md) + +- [View Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/view.md) + +- [Refunds FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/faqs.md) diff --git a/llm-content/payments/refunds/normal.md b/llm-content/payments/refunds/normal.md new file mode 100644 index 00000000..17d46da0 --- /dev/null +++ b/llm-content/payments/refunds/normal.md @@ -0,0 +1,71 @@ +--- +title: Normal Refunds +description: Check how to issue Normal Refunds to your customers, the refund process, processing time and refund fees. +--- + +# Normal Refunds + +You can issue Normal refunds to your customers which are processed within 7-10 working days. + +> **INFO** +> +> +> **Customer Looking for Refund** +> +> If you are a customer looking for a refund, know more about [customer refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers/customer-refunds.md). +> + +## How Normal Refunds Work + +When you make a Normal refund request to Razorpay, the information is sent to banking partners or other related stakeholders. Each of them have their own process for refund requests. After processing the refund request, the refund amount is sent to the customer's bank account or card balance. + +Following is a typical flow for card refunds: + +![Normal Refund Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/normal-refund-flow.jpg.md) + +### Payment Methods + +We support all payment methods for Normal refunds. + +Refunds are sent back to the original payment method used in making the payment. For example, if a credit card was used to make the payment, the refund amount is pushed to the same credit card. + +### Processing Time + +When you send a Normal refund request to Razorpay, the information is sent to our banking partners. Depending on the bank's processing time, it can take 7-10 business days for the refunds to reflect in the customer's bank account or card balance. + +The time taken to process a normal refund depends on the payment mode used while making the payment. + +**Payment Method** | **Refund Time** +--- +`credit` or `debit` cards | 5-10 days +--- +`netbanking` | 2-10 days +--- +`wallet` | 0-3 days +--- +`upi` | 2-7 days + +### Refund Fees + +For Normal refunds, Razorpay does not charge any processing fee. However, the transaction fee and GST levied by Razorpay at the time of payment capture will not be reversed to your account (merchant's account). + +## Dashboard and API Actions + +You can perform the following actions: +- [Issue Normal refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/issue.md) +- [View Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/view.md) +- [Handle refund errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/errors.md) + +### Related Information + +- [Batch Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/batch.md) + +- [Instant Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/instant.md) + +- [Add funds to your account to process refunds (low account balance)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/balances.md#add-funds-to-your-current-balance) + +- [Refunds API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/apis.md) + +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/subscribe-to-webhooks.md) + +- [Refunds FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/faqs.md) diff --git a/llm-content/payments/refunds/refund-speed.md b/llm-content/payments/refunds/refund-speed.md new file mode 100644 index 00000000..2cf354e9 --- /dev/null +++ b/llm-content/payments/refunds/refund-speed.md @@ -0,0 +1,71 @@ +--- +title: Set Refund Speed +description: Set the default refund speed at which to process refunds. You can also override the default refund speed. +--- + +# Set Refund Speed + +You can configure the speed at which all the refunds should be processed for your customers. + +## Set Default Speed of Refunds + +Depending on your business needs, you can select from the following: + +- **Normal Refund** + +In this mode, the speed attribute is set to `normal`. The customers will receive their refunds within 5-7 business days. + +- **Instant Refund** + +In this mode, the speed attribute is set to `optimum`. Razorpay attempts to initiate fund transfer using IMPS, NEFT or UPI. The customer will receive the refunds instantly. If unsuccessful, Razorpay processes the refund via the `normal` speed. + +The selected speed is set as the **default speed** and all the refunds, thereafter, will be processed at the chosen speed. + +To set the default speed for all the refunds: + +1. Log in to the Dashboard. +2. Navigate to **Account & Settings** and click **Capture and refund settings** under the **Payments and refunds** section. +3. In the **Default Refund Speed** section, choose between **Normal Refund** and **Instant Refund**. + + + **Handy Tips** + + The chosen value is also applied as the default speed in the [Refund API request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md). + + +## Override Default Refund Speed + +You can override the default refund speed while refunding a payment from the **Transactions** → **Payments** tab of the Dashboard. + +Watch this video to see how to override the default refund speed while issuing a refund. + +[Video: https://www.youtube.com/embed/hOhr1x_xAls] + +The possible ways in which you can switch between Normal and Instant Refunds are listed below: + +**Default Speed setting** | **All Refunds** | **Refund Payment option** | **Processed speed of the Refund** +--- +**Normal Refund** | All the refunds are processed at the `normal` speed. | **Refund Instantly** option is selected. | The refund is processed at the `optimum` speed. If an instant refund is not possible, Razorpay initiates a normal refund. +--- +**Instant Refund** | All the refunds are processed at an `optimum` speed. + If an instant refund is not possible, Razorpay initiates a normal refund. | **Refund Instantly** option is unselected. | The refund is processed at the `normal` speed. + +To set the default speed for all the refunds: + +1. Log in to the Dashboard. +2. Navigate to **Account & Settings** and select **Capture and refund settings**. +3. In the **Default Refund Speed** section, choose between **Normal Refund** and **Instant Refund**. + + + **Handy Tips** + + The chosen value is also applied as the default speed in the [Refund API request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md). + + +### Related Information +- [About Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) +- [Normal Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/normal.md) +- [Batch Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/batch.md) +- [Issue Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/issue.md) +- [View Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/view.md) +- [Refunds FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/faqs.md) diff --git a/llm-content/payments/refunds/subscribe-to-webhooks.md b/llm-content/payments/refunds/subscribe-to-webhooks.md new file mode 100644 index 00000000..af0721e3 --- /dev/null +++ b/llm-content/payments/refunds/subscribe-to-webhooks.md @@ -0,0 +1,33 @@ +--- +title: Refunds | Subscribe to Webhooks +heading: Subscribe to Webhooks +description: Subscribe to various webhook events related to Refunds to receive instant notifications. +--- + +# Subscribe to Webhooks + +Get notified by subscribing to webhook events available for refunds. + +To subscribe to webhook events: +1. Log in to the Dashboard. +2. Navigate to **Account & Settings** → **Webhooks** to subscribe to any of the events listed below. + +## List of Webhook Events + +The table below lists the webhook events available for refunds. + +Webhook Event | Description +--- +`refund.created` | Triggered when a refund is created. +--- +`refund.processed` | Triggered when the refund is successfully processed. +--- +`refund.failed` | Triggered when we are not able to process a refund. +--- +`refund.speed_changed` | Triggered when refund speed is changed. + +Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) and check the [sample payloads.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/refunds.md) + +### Related Information +- [About Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) +- [Refunds APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/apis.md) diff --git a/llm-content/payments/refunds/supported-payment-methods.md b/llm-content/payments/refunds/supported-payment-methods.md new file mode 100644 index 00000000..72234920 --- /dev/null +++ b/llm-content/payments/refunds/supported-payment-methods.md @@ -0,0 +1,30 @@ +--- +title: Supported Payment Methods +description: List of payment methods that support Instant Refunds. +--- + +# Supported Payment Methods + +We support the following payment methods for instant refunds. The list of banks that support instant refunds differ according to payment methods - [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/supported-payment-methods.md#netbanking) and [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/supported-payment-methods.md#upi). + +Refunds will be sent back to the original payment method used in making the payment. For example, if netbanking was used to make the payment, the refund will be pushed to the same netbanking details. + +## Netbanking + +We support instant refunds for netbanking payments made from the following banks: + +Bank Name | Bank Code +--- +Bank of Baroda | `BARB_R` +--- +Canara Bank | `CNRB` +--- +Central Bank of India | `CBIN` +--- +Equitas Bank | `ESFB` +--- +IndusInd Bank | `INDB` +--- +Karur Vysya Bank | `KVBL` +--- +RBL Bank | `RBL` diff --git a/llm-content/payments/refunds/view.md b/llm-content/payments/refunds/view.md new file mode 100644 index 00000000..01e04840 --- /dev/null +++ b/llm-content/payments/refunds/view.md @@ -0,0 +1,39 @@ +--- +title: View Refunds +description: View details of Refunds and Settlements using the Razorpay Dashboard and APIs. +--- + +# View Refunds + +After issuing a refund for a payment, you can check its status in the **Refunds** tab. You can also view details of settled refunds. + +## View Details of a Refund + +Watch this video to see how you can view the details of a refund. + +[Video: https://www.youtube.com/embed/0InIsDOFFYc?si=okGBDREys7eSescV] + +To view a refund: +1. Log in to the Dashboard. +2. Click **Transactions** on the left navigation and **View All** on the **Refunds** tab. +3. Click a **Refund Id** to view details of the refund. + +## View Settlement Details of a Refund + +Watch this video to see how you can view settlement details of a refund. + +[Video: https://www.youtube.com/embed/69rO4FIBRNo?si=q_DFpeDSyqoZNhML] + +To view a detailed break-down of a settlement made to your account: +1. Log in to the Dashboard. +2. Navigate to **Transactions** → **Refunds**. +3. Click the **Refund Id** for which you want to view the settlement details. +4. In the **Refund Details** view, you can see the settlement details. +5. Click on the **settlement_id** to view a detailed breakdown. + +### Related Information + +- [Normal Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/normal.md) +- [Batch Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/batch.md) +- [Issue Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/issue.md) +- [Refunds FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/faqs.md) diff --git a/llm-content/payments/route.md b/llm-content/payments/route.md new file mode 100644 index 00000000..fd823950 --- /dev/null +++ b/llm-content/payments/route.md @@ -0,0 +1,81 @@ +--- +title: Route +heading: About Route +description: Use Razorpay Route to split payments between third parties and manage settlements, refunds and reconciliation by creating Linked Accounts. +--- + +# About Route + +Razorpay Route simplifies complex payment flows by enabling you to easily split incoming funds among multiple third-parties, sellers or bank accounts. This solution is ideally suited for businesses, such as marketplaces or platforms, that operate on a `one-to-many` disbursement model. + + +### Features + + - Add and manage Linked Accounts. + - Split payments and transfer funds to multiple Linked Accounts. + - Reverse transferred funds and manage customer refunds with automated reversals. + - Manage Linked Account settlements. + - Move from manual and file-based reconciliation to an entirely API-driven process. + + + +### Advantages + + - **Instant Transfers**: Instant transfers, ensuring recipients receive payments promptly. Beneficial for businesses and individuals who rely on timely disbursements + - **Multiple Payment Transfers**: Splits payments into various portions for seamless transfer to multiple parties — ideal for marketplaces where sellers, service providers and platform owners receive their respective shares. + - **Easy Integration**: Seamlessly integrates into existing payment systems via APIs, enhancing payment capabilities without major system changes. + - **Transparent Reporting and Settlements**: Comprehensive reporting and analytics for tracking transactions, transfers and settlements. + + +## Prerequisites + +You should add Linked Accounts using the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md#add-and-manage-linked-accounts) or [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-linked-account.md) before using Route. + +## How Route Works + +Given below is the funds flow in Route: + +![Route Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route_flow.gif.md) + +1. A customer makes a purchase on your site. +2. You can choose to: + - Initiate transfer of funds to Linked Accounts. + - Defer the transfer settlement. + - Define a custom delay period for settlement. +3. Razorpay settles funds to the Linked Account and sends a webhook notification to you. + +## Get Started + +To get started with Route: + +1. Log in to the Dashboard and click **Route** under **PAYMENT PRODUCTS**. +1. After log in, you should add linked accounts to start using Route. Refer to the [Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md) page for more information. +1. Once Linked Accounts are added, you can then start creating transfers to those accounts. Refer to the [Transfer Funds to Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-funds-to-linked-accounts.md) page for more information. + +Explore the [Route Use Cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/use-cases.md) to gain insights into the practical applications of Route. + +### Supported Platforms + +Route is supported on the following platforms: + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + +### Related Information + +- [Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md) +- [Transfer Funds to Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-funds-to-linked-accounts.md) +- [Initiate Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/initiate-refund.md) +- [Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/view-reports.md) diff --git a/llm-content/payments/route/account-code.md b/llm-content/payments/route/account-code.md new file mode 100644 index 00000000..eefada41 --- /dev/null +++ b/llm-content/payments/route/account-code.md @@ -0,0 +1,38 @@ +--- +title: Account Code +description: Create an Account Code for your Linked Account and use it as an alternative for Linked Account id. +--- + +# Account Code + +When a linked account is created, a unique identifier is generated for it. This account id should be passed in all APIs. For some businesses, this can slow down the process of mapping these account ids to the internal reference values in the database. Also, this affects the integration time for large enterprises that depend on in-house hosting. + +Using the Account Code feature on Route, you can now provide aliases during account onboarding via your Dashboard. Therefore, in addition to the linked account id, you can alternatively use aliases to create direct transfers and transfers via orders or payments API. + +Suppose you have a linked account called GoodWill Traders North, with an account_id `acc_CNo3jSI8OkFJJJ`. You can use the account code feature to create an alias called `Acme_Corp_North` and use it in the APIs. + +Characteristics of the Account Code: +- **Type** +Varchar(255) type +- **Minimum and Maximum length** +Minimum 3 characters and maximum 20 characters length. +- **Allowed characters** +Alphanumeric (A-Z, a-z, 0-9), periods (.), dashes(-) and underscores(_). Alphabets are case-sensitive (A and a will be considered differently). +- **Unique value** +Each linked account must have a unique account code. + +An example of an account code is `GoodWill_Traders-1.` + + to get this feature activated on your Razorpay account. + +## Use Account Code + +Know more about: +- Creation of [Account Code for linked accounts on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/account-code/dashboard.md). +- Usage of [Account Code in Transfers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/account-code/api.md). + +### Related Information + +- [Route Product Documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route.md) +- [Route API Reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md) +- [Route Dashboard Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/batch-upload.md) diff --git a/llm-content/payments/route/account-code/api.md b/llm-content/payments/route/account-code/api.md new file mode 100644 index 00000000..241674d4 --- /dev/null +++ b/llm-content/payments/route/account-code/api.md @@ -0,0 +1,629 @@ +--- +title: Transfers API and Webhooks +description: Use Account Code parameter as an alternative to Account ID in the Transfers API. +--- + +# Transfers API and Webhooks + +The `account_code` parameter must be passed only in Transfers API. + +## Postman Collection + +We have a Postman collection to make the integration quicker and easier. Click the **Download Postman Collection** button below to get started. + +[Download Postman Collection](https://app.getpostman.com/run-collection/e35a6d91a76a57519889) + +## Instructions for Using Postman Collection + +- All Razorpay APIs are authenticated using Basic Authentication. + - [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + - Add your API Keys in Postman. Selected the required API → Auth → Type = Basic Auth → Username = [Your_Key_ID]; Password = [Your_Key_secret] + ![](/docs/assets/images/api-postman_basic_auth.gif) +- Some APIs in the collection require data specific to your account either in the request body or as path or query parameters. + - For example, the create Transfers via Payments API requires you to add the `pay_id` as a path parameter in the endpoint. + - These parameters are enclosed in \{\} in the collection. For example, \{pay_id\}. + - The API throws an error if this value is incorrect or does not exist in your system. + +## Transfer Entity + +The attributes of the `transfer` entity are listed below: + +`id` +: `string` Unique identifier of the transfer. + +`entity` +: `string` The name of the entity. Here, it is `transfer`. + +`source` +: `string` Unique identifier of the transfer source. The source can be a `payment` or an `order`. + +`recipient` +: `string` Unique identifier of the transfer destination, that is, the linked account. + +`account_code` +: `string` An alternative to the linked account ID. +- Minimum character length is 3 and maximum is 20. +- Alphanumeric (A-Z, a-z, 0-9), periods (.), dashes(-) and underscores(_). Alphabets are case-sensitive. + +`amount` +: `integer` The amount to be transferred to the linked account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`currency` +: `string` ISO currency code. We support route transfers only in `INR`. + +`amount_reversed` +: `integer` Amount reversed from this transfer for refunds. + +`notes` +: `json object` Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "bangalore"`. + +`linked_account_notes` +: `array` List of keys from the `notes` object which needs to be shown to linked accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + +`on_hold` +: `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + +`on_hold_until` +: `integer` Timestamp, in Unix format, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + +`recipient_settlement_id` +: `string` Unique identifier of the settlement. + +`created_at` +: `integer` Timestamp, in Unix, at which the record was created. + +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "trf_ECB6hBEYWuQkEC", + "entity": "transfer", + "source": "pay_EB1R2s8D4vOAKG", + "recipient": "acc_CPRsN1LkFccllA", + "account_code": "GoodWill_Traders-1." + "amount": 100, + "currency": "INR", + "amount_reversed": 0, + "notes": { + "name": "Gaurav Kumar", + "roll_no": "IEC2011025" + }, + "fees": 1, + "tax": 0, + "on_hold": true, + "on_hold_until": 1671222870, + "recipient_settlement_id": null, + "created_at": 1580712811, + "linked_account_notes": [ + "roll_no" + ], + "processed_at": 1580712811 + }, + { + "id": "trf_ECB6hP5cyN30pU", + "entity": "transfer", + "source": "pay_EB1R2s8D4vOAKG", + "recipient": "acc_CNo3jSI8OkFJJJ", + "account_code": "GoodWill_Traders-2." + "amount": 100, + "currency": "INR", + "amount_reversed": 0, + "notes": { + "name": "Saurav Kumar", + "roll_no": "IEC2011026" + }, + "fees": 1, + "tax": 0, + "on_hold": false, + "on_hold_until": null, + "recipient_settlement_id": null, + "created_at": 1580712811, + "linked_account_notes": [ + "roll_no" + ], + "processed_at": 1580712811 + } + ] +} +``` + +## Create Transfers from Orders + +Use the following endpoint to create transfers from orders. + +/orders + +```curl: Request +curl -X POST https://api.razorpay.com/v1/orders \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type: application/json' +-d '{ + "amount": 2000, + "currency": "INR", + "transfers": [ + { + "account_code": "GoodWill_Traders-1." + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "GoodWill Traders Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": true, + "on_hold_until": 1671222870 + }, + { + "account_code": "GoodWill_Traders-2." + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "GoodWill Traders Bangalore South", + "name": "Saurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": false + } + ] +}' + +```json: Response +{ + "id": "order_E9uTczH8uWPCyQ", + "entity": "order", + "amount": 2000, + "amount_paid": 0, + "amount_due": 2000, + "currency": "INR", + "receipt": null, + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1580217565, + "transfers": [ + { + "recipient": "acc_CPRsN1LkFccllA", + "account_code": "GoodWill_Traders-1." + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "GoodWill Traders Bangalore North", + "name": "Gaurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": true, + "on_hold_until": 1671222870 + }, + { + "recipient": "acc_CNo3jSI8OkFJJJ", + "account_code": "GoodWill_Traders-2." + "amount": 1000, + "currency": "INR", + "notes": { + "branch": "GoodWill Traders Bangalore South", + "name": "Saurav Kumar" + }, + "linked_account_notes": [ + "branch" + ], + "on_hold": false, + "on_hold_until": null + } + ] +} +``` + +You can set up transfer of funds right at the time of order creation using the Orders API. This can be done by passing the `transfers` parameters as part of the Order API request body. + +/orders + +### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount, in paise. For example, for an amount of ₹299.35, the value of this field should be 29935. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. We support only `INR` for Route transactions. + +`receipt` _optional_ +: `string` Unique identifier that you can use for internal reference. + +`transfers` +: `json object` Details regarding the transfer. + + `account` _mandatory if `account_code` is not passed_ + : `string` Unique identifier of the linked account to which the transfer is to be made. + + `account_code` _mandatory if `account` is not passed_ + : `string` An alternative unique identifier of the linked account ID. + + `amount` _mandatory_ + : `integer` The amount to be transferred to the linked account. For example, for an amount of ₹200.35, the value of this field should be 20035. This amount cannot exceed the order amount. + + `currency` _mandatory_ + : `string` The currency in which the transfer should be made. We support only `INR` for Route transactions. + + `notes` _optional_ + : `json object` Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "bangalore"`. + + `linked_account_notes` _optional_ + : `array` List of keys from the `notes` object which needs to be shown to linked accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + + `on_hold` _optional_ + : `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + + `on_hold_until` _optional_ + : `integer` Timestamp, in Unix format, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + +> **INFO** +> +> +> **Note** +> +> Pass either account or account_code. Do not pass both the parameters. +> + +### Response Parameters + +`id` +: `string` Unique identifier of the Order created. + +`entity` +: `string` The name of the entity. Here, it is `order`. + +`amount` +: `integer` The Order amount, in paise. For example, for an amount of ₹299.35, the value of this field should be 29935. + +`amount_paid` +: `integer` The amount paid against the Order. + +`amount_due` +: `integer` The amount pending against the Order. + +`currency` +: `string` The currency in which the order should be created. We support only `INR` for Route transactions. + +`receipt` +: `string` Unique identifier that you can use for internal reference. + +`status` +: `string` The status of the Order. Possible values: + - created + - attempted + - paid + +`notes` +: `json object` Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. + +`created_at` +: `integer` Timestamp, in Unix, that indicates when this Order was created. + +`transfers` +: `json object` Details regarding the transfer. + + `recipient` + : `string` Unique identifier of the linked account to which the transfer is to be made. + + `account_code` + : `string` An alternative unique identifier of the linked account ID. + + `amount` + : `integer` The amount to be transferred to the linked account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035. This amount cannot exceed the order amount. + + `currency` + : `string` The currency in which the transfer should be made. We support only `INR` for Route transactions. + + `notes` + : `json object` Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "bangalore"`. + + `linked_account_notes` + : `array` List of keys from the `notes` object which needs to be shown to linked accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + + `on_hold` + : `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + + `on_hold_until` + : `integer` Timestamp, in Unix, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + +> **INFO** +> +> +> **Notes** +> +> - You cannot create transfers on an order which has `partial_payment` parameter enabled. Ensure that this parameter is set to `0`. +> - You cannot create transfers on an order for international currencies. Currently, this feature only supports orders created using INR. +> + +## Create Transfers from Payments + +You can create and capture payments in the regular payments flow, using [Razorpay Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md) and [Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment). + +To disburse payments using Razorpay Route, there is an additional step in the payment flow called transfers which is described below: + +1. Customer pays the amount via normal payment flow. +2. Once the payment is `captured`, you can initiate a transfer to linked accounts with a transfer API call. You have to specify the details of the `account_id` and `amount`. + +The following endpoint transfers a `captured` payment to one or more linked accounts using `account_id`. On a successful transfer, a response will be generated with a collection of transfer entities created for the payment. + +/payments/:id/transfers + +> **WARN** +> +> +> **Transfer Requirements** +> +> - Your account must have sufficient funds to process the transfer to the linked account. The transfer will fail in case of insufficient funds. +> - Only `captured` payments can be transferred. +> - You can create more than one transfer on a `payment_id`. This holds good as long as the total transfer amount does not exceed the captured payment amount. +> - A transfer cannot be requested on a payment once a refund has been initiated. +> + +In the sample request given, transfers to multiple linked accounts are specified. The payments transferred to the linked accounts will be settled to their respective bank accounts as per the pre-defined `settlement_period`. + +```curl: Request +curl -X POST https://api.razorpay.com/v1/payments/pay_E8JR8E0XyjUSZd/transfers \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] +-H 'content-type: application/json' +-d '{ + "transfers": [ + { + "account_code": "GoodWill_Traders-1." + "amount": 100, + "currency": "INR", + "notes": { + "name": "Gaurav Kumar", + "roll_no": "IEC2011025" + }, + "linked_account_notes": [ + "roll_no" + ], + "on_hold": true, + "on_hold_until": 1671222870 + }, + { + "account_code": "GoodWill_Traders-2." + "amount": 100, + "currency": "INR", + "notes": { + "name": "Saurav Kumar", + "roll_no": "IEC2011026" + }, + "linked_account_notes": [ + "roll_no" + ], + "on_hold": false + } + ] +}' + +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "trf_E9uhYLFLLZ2pks", + "entity": "transfer", + "source": "pay_E8JR8E0XyjUSZd", + "recipient": "acc_CPRsN1LkFccllA", + "account_code": "GoodWill_Traders-1." + "amount": 100, + "currency": "INR", + "amount_reversed": 0, + "notes": { + "name": "Gaurav Kumar", + "roll_no": "IEC2011025" + }, + "fees": 1, + "tax": 0, + "on_hold": true, + "on_hold_until": 1671222870, + "recipient_settlement_id": null, + "created_at": 1580218356, + "linked_account_notes": [ + "roll_no" + ], + "processed_at": 1580218357 + }, + { + "id": "trf_E9uhYYeckSXd5H", + "entity": "transfer", + "source": "pay_E8JR8E0XyjUSZd", + "recipient": "acc_CNo3jSI8OkFJJJ", + "account_code": "GoodWill_Traders-1." + "amount": 100, + "currency": "INR", + "amount_reversed": 0, + "notes": { + "name": "Saurav Kumar", + "roll_no": "IEC2011026" + }, + "fees": 1, + "tax": 0, + "on_hold": false, + "on_hold_until": null, + "recipient_settlement_id": null, + "created_at": 1580218357, + "linked_account_notes": [ + "roll_no" + ], + "processed_at": 1580218357 + } + ] +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment on which the transfer must be created. + +### Request Parameters + +`transfers` +: `json object` Details regarding the transfer. + + `account` _mandatory if `account_code` is not passed_ + : `string` Unique identifier of the linked account to which the transfer is to be made. + + `account_code` _mandatory if `account` is not passed_ + : `string` An alternative unique identifier of the linked account ID. + + `amount` _mandatory_ + : `integer` The amount to be transferred to the linked account. For example, for an amount of ₹200.35, the value of this field should be 20035. + + `currency` _mandatory_ + : `string` The currency in which the transfer should be made. We support only `INR` for Route transactions. + + `notes` _optional_ + : `json object` Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "bangalore"`. + + `linked_account_notes` _optional_ + : `array` List of keys from the `notes` object which needs to be shown to linked accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + + `on_hold` + : `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + + `on_hold_until` + : `integer` Timestamp, in Unix, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + +> **INFO** +> +> +> **Note** +> +> Pass either account or account_code. Do not pass both the params. +> + +### Response Parameters + +The response parameters are same as the [transfer entity parameters](#transfer-entity). + +## Direct Transfers + +You can transfer funds to your linked accounts directly from your account balance using the Direct Transfers API. + +/transfers + +This API creates a direct transfer of funds from your account to linked account. +On successful creation, the API responds with the created `transfer` entity. + +```curl: Request +curl -X POST https://api.razorpay.com/v1/transfers \1 +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H 'content-type: application/json' \ +-d '{ + "account_code": "GoodWill_Traders-1." + "amount": 100, + "currency": "INR" +}' + +```json: Response +{ + "id": "trf_E9utgtfGTcpcmm", + "entity": "transfer", + "source": "acc_CJoeHMNpi0nC7k", + "recipient": "acc_CPRsN1LkFccllA", + "account_code": "GoodWill_Traders-1." + "amount": 100, + "currency": "INR", + "amount_reversed": 0, + "notes": [], + "fees": 1, + "tax": 0, + "on_hold": false, + "on_hold_until": null, + "recipient_settlement_id": null, + "created_at": 1580219046, + "linked_account_notes": [], + "processed_at": 1580219046 +} +``` + +### Request Parameters + +`account` _mandatory if `account_code` is not passed_ +: `string` Unique identifier of the linked account to which the transfer must be made. + +`account_code` _mandatory if `account` is not passed_ +: `string` Alternate unique identifier of the linked account to which the transfer must be made. + +`amount` _mandatory_ +: `integer` The amount (in paise) to be transferred to the linked account. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`currency` _mandatory_ +: `string` The currency used in the transaction. We support only `INR` for Route transactions. + +`notes` _optional_ +: `json object` Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. + +> **INFO** +> +> +> **Note** +> +> Pass either account or account_code. Do not pass both the params. +> + +The response parameters are same as the [transfer entity parameters](#transfer-entity). + +## Webhook + +The `account_code` parameter appears in the `transfer.processed` event payload. + +```json: transfer.processed +{ + "entity": "event", + "account_id": "acc_CJoeHMNpi0nC7k", + "event": "transfer.processed", + "contains": [ + "transfer" + ], + "payload": { + "transfer": { + "entity": { + "id": "trf_EB1gHgrzOZff6d", + "entity": "transfer", + "source": "order_EB1gHfAfmr65cS", + "recipient": "acc_CNo3jSI8OkFJJJ", + "account_code": "GoodWill_Traders-1.", + "amount": 100, + "currency": "INR", + "amount_reversed": 0, + "notes": { + "branch": "GoodWill Traders Bangalore South", + "name": "Saurav Kumar" + }, + "fees": 1, + "tax": 0, + "on_hold": false, + "on_hold_until": null, + "recipient_settlement_id": null, + "created_at": 1580461276, + "linked_account_notes": [ + "branch" + ], + "processed_at": 1580461335 + } + } + }, + "created_at": 1580461335 +} +``` diff --git a/llm-content/payments/route/account-code/dashboard.md b/llm-content/payments/route/account-code/dashboard.md new file mode 100644 index 00000000..c2f4526d --- /dev/null +++ b/llm-content/payments/route/account-code/dashboard.md @@ -0,0 +1,50 @@ +--- +title: Dashboard +description: Create an Account Code for your Linked Accounts. +--- + +# Dashboard + +You can create a unique Account Code for each linked account, while adding accounts, from the Dashboard. + +## Add and Manage Linked Accounts + +From the Dashboard, create a linked account and provide the bank account details: +1. Click **Accounts** tab, and then click **+ Add Account**. + ![Add Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-add-account1.jpg.md) +2. Enter **Account Name**, **Account Email** and **Account Code**. +3. If you want to enable the Dashboard access for the linked account, turn on the toggle bar. +4. If you want to allow the customer refunds for the linked account, turn on the toggle bar. + +> **INFO** +> +> +> **Handy Tips** +> +> You must add Email ID to enable Dashboard access and customer refunds for the linked account. +> + +5. Click **Add**. + ![Add Account pop-up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-add-account-pop-up1.jpg.md) + +In the **KYC Form**, enter **Business Details** and **Bank Account Details**, and then click **Submit Form**. + +![Submit KYC details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-add-account-kyc.jpg.md) + +## Dashboard Access + +Once logged in, linked accounts can invite other team members to manage their account. + +Also, they can perform other actions such as processing refunds. Know more [about Linked Account Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md). + +> **INFO** +> +> +> **Handy Tips** +> +> - While you can create a linked account without adding their email, you cannot grant them Dashboard access. The access can be granted or provided only after you add the email address of the linked account. +> ![add email to enable Razorpay Dashboard access](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-add-email1.jpg.md) +> - You cannot access the linked account Dashboard unless they add you as a team member from their linked account Dashboard. +> + +[Learn more about Dashboard operations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/batch-upload.md). diff --git a/llm-content/payments/route/apis.md b/llm-content/payments/route/apis.md new file mode 100644 index 00000000..aea6d413 --- /dev/null +++ b/llm-content/payments/route/apis.md @@ -0,0 +1,116 @@ +--- +title: Route APIs +description: List of Route APIs available to perform various actions. +--- + +# Route APIs + +You can use the Route APIs to perform various actions. You can perform all of these actions from the Dashboard as well. + +## API-wise Integration Checklist for Route + +- Ensure the currency is in INR when creating an `order_id`. +- Ensure orders created have the `partial_payment` parameter set to `false`. Transfers will only occur if the orders are paid and the payments move to the `captured` state. +- Ensure to pass the Linked Account id while creating an order. +- Ensure the amount passed in the `transfers` object is not greater than the order amount. +- If the amount passed in the `transfers` object is less than the main amount, the balance will automatically move to the Razorpay nodal account. + +**Example:** + +Amount Type | Amount INR +--- +Base amount | 10,000 +--- +Amount in `transfers` object | 7,500 +--- +Balance amount (Automatically added to the main Razorpay nodal account) | 2,500 + +- Once the payment has been successfully made, verify the [Payment Signature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation.md#step-6-verify-signature) at your backend. +- You can use [Fetch Transfer for an Order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md) API for reconciliation. +- You can also [subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) and set up the `transfer.processed` Webhook event. + +- Use [Fetch a Payment by ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md) API to confirm the payment status before running the [Transfers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md) API. +- Ensure the payment is in the `captured` state. +- Ensure the amount does not exceed the initial payment amount. +- Ensure the amount you want to transfer to a Linked Account is less than the initial amount. + +> **WARN** +> +> +> **Watch Out!** +> +> You must subtract fees and tax to calculate the amount allowed to be transferred. +> + +- Ensure the nodal account has sufficient balance for the amount to be transferred. +- Ensure the amount that needs to be transferred is correct as there is no `maker-checker` facility after creating the transfer. +- Ensure the currency is in INR. + + +### List of Transfers APIs + + The table below provides the list of various Transfers APIs and their brief description: + + + + API | Description + --- + [Create Transfers from Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-transfers-orders.md) | API to create Transfers from the received Orders + --- + [Create Transfers from Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-transfers-payments.md) | API to create Transfers to linked accounts once the payments are captured. + --- + [Direct Transfers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/direct-transfers.md) | API to transfer funds directly from your account balance to the linked accounts + --- + [Fetch Transfers for a Payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/fetch-transfers-payment.md) | API to fetch transfers created for a specific payment + --- + [Fetch Transfer for an Order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/fetch-transfer-order.md) | API to fetch transfers created for a specific Order ID + --- + [Fetch a Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/fetch-a-transfer.md) | API to view specific transfer details + --- + [Fetch Transfers for a Settlement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/fetch-transfers-for-a-settlement.md) | API to retrieve the collection of transfers created for a particular Settlement ID + --- + [Fetch Settlement Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/fetch-settlement-details.md) | API to view the details of settlements made to linked accounts + --- + [Fetch Payments of a Linked Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/fetch-payments-linked-account.md) | API to view all the payments received by a linked account + --- + [Refund Payments and Reverse Transfer from a Linked Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/refund-payments-and-reverse-transfer.md) | API to initiate a payment refund to a customer + --- + [Reverse a Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/reverse-a-transfer.md) | API to initiate a reversal of funds from the linked account to your account + --- + [API to modify Settlement Hold for Transfers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/modify-settlement-hold.md) | API to modify the settlement configuration for a particular `transfer_id` + + + + + +### List of Linked Account APIs + + The table below provides the list of various Linked Account APIs and their brief description: + + + + API | Description + --- + [Create a Linked Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-linked-account.md) | API to create a Linked Account. + --- + [Update Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/update-linked-accounts.md) | API to update Linked Accounts. + --- + [Fetch a Linked Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/fetch-with-id.md) | API to retrieve details of a Linked Account. + --- + [Create a Stakeholder](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-stakeholder.md) | API to create a Stakeholder account. + --- + [Update a Stakeholder Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/update-stakeholder.md) | API to update a Stakeholder account. + --- + [Request a Product Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/request-product-config.md) | API to request a product configuration. + --- + [Update a Product Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/update-product-config.md) | API to update a product configuration. + --- + [Fetch a Product Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/fetch-product-config.md) | API to fetch a product configuration. + + + + +### Related Information +- [Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route.md) +- [Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md) +- [Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/view-reports.md) diff --git a/llm-content/payments/route/batch-linked-accounts.md b/llm-content/payments/route/batch-linked-accounts.md new file mode 100644 index 00000000..4e08925d --- /dev/null +++ b/llm-content/payments/route/batch-linked-accounts.md @@ -0,0 +1,50 @@ +--- +title: Linked Accounts Creation Via Batch +description: Create Linked Accounts in batch using your Razorpay Dashboard. +--- + +# Linked Accounts Creation Via Batch + +If you want to create linked accounts in a batch or in bulk, contact our [Support Team](https://razorpay.com/support/#request). + +## Steps + +- Create a CSV file containing rows with the linked account's data. The file format and the data per row must be as described below. +- Raise a request to process the file on the [support page](https://razorpay.com/support/#request) as an existing customer. Also, share Razorpay merchant Id in the email body. +- After the file is processed from our side, we will share the same file with you which contains a few new columns appended per row. For every row, the first column will have success or failure values. If successful, the second column will have Razorpay account Id (newly created linked account). In case of failure, the subsequent column will contain an error description. These accounts will also be available on the Dashboard. + +## Handle error-ed rows + +You are requested to create a new file using the error rows from the processed file and fix the errors as per the description. Remove the extra error columns, and then share the same file with us again. + +If you find any linked accounts with incorrect bank account details, create a file with corrected values and provide Razorpay account Id in the last column of the row (as described below). We will update the existing linked account with the new bank account details. + +## File format and data constraints + +- Provided file must be a valid CSV with no heading values. +- Every row should contain values as per linked account in order and described as following: + +Field | Description | Type & Validation +--- +business_name | Name of the vendor | string, Max length - 255 +--- +bank_account_type | Type of account (savings/current) | string (alphabets and spaces), Max length - 20 +--- +bank_account_name | Bank account name | string (alphanumeric and spaces), Max length - 120 +--- +bank_branch_ifsc | Bank IFSC | string (alphanumeric), Length - 11 characters +--- +bank_account_number | Account number | string (alphanumeric), Min length - 5, Max Length - 20 +--- +reference_id | Identifier for the account on your systems (We don't store this reference) | string, Max length - 255 +--- +account_id | Razorpay account id for newly created linked account (This should be empty in provided file) | string, Length - 18 + + Some sample rows shown here for your understanding. + +```csv +ABC Corp,current,ABC Crop Bank Account Name,HDFC0000060,12345678910121,INTERNAL_REF, +XYZ Corp,current,XYZ Crop Bank Account Name,HDFC0000060,12345678910121,INTERNAL_REF, +``` + +Contact our [Support Team](https://razorpay.com/support) for any queries. diff --git a/llm-content/payments/route/batch-upload.md b/llm-content/payments/route/batch-upload.md new file mode 100644 index 00000000..9d0667f7 --- /dev/null +++ b/llm-content/payments/route/batch-upload.md @@ -0,0 +1,386 @@ +--- +title: Batch Upload for Linked Accounts and Transfers +description: Create Linked Accounts and transfers using the batch upload feature. +--- + +# Batch Upload for Linked Accounts and Transfers + +Generate and process Linked Accounts and Transfers in bulk (batches) by uploading a batch file in the Dashboard. This simplifies the process of creating these individually. + +## Create Batches + +To create batches: +1. Download the sample file from the Dashboard. +2. Update the file with the required information. +3. Upload the file back to the Dashboard. + +> **WARN** +> +> +> **Watch Out!** +> +> The sample file should be in `.csv` or `.xlsx` format. +> + +#### Actions Using Batches + +You can perform the following actions using batch upload: +- [Create Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/batch-upload.md#create-linked-accounts-via-batch-upload) +- [Create Transfers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/batch-upload.md#create-transfers-via-batch-upload) + +### Batch Upload Statuses + +The following table lists the upload statuses and their description. + +Status | Description +--- +Created | This is the initial state of the upload and indicates that the batch is created and processed in Razorpay database. +--- +Processing | This state indicates that the uploaded batch file is under process. +--- +Processed | This is the final state of the batch file and indicates that the batch file is successfully processed and individual rows could be processed successfully or with errors. You can check the details via the Batch Report. +--- +Scheduled | This state indicates that the file is scheduled to be processed at a later time. +--- +Cancelled | This state indicates that you cancelled the processing of the batch file. This applies only to Batches in processing or scheduled state. +--- + +### Create Linked Accounts via Batch Upload + +You can create multiple linked accounts in bulk by uploading a batch file on the Dashboard. + +> **WARN** +> +> +> **Watch Out!** +> +> For Mutual Funds Distributors (MFDs), Linked Accounts with their Asset Management Company (AMC) details are automatically created after they get access to the Route. MFDs do not need to create any Linked Accounts from the Dashboard. Please get in touch with our [support team](https://razorpay.com/support/) for any help on creating Linked Accounts. +> + +Watch this video to see how to create Linked Accounts in bulk using a batch file. + +[Video: https://www.youtube.com/embed/gQ22EbqfwII] + +### To create Linked Accounts using batch upload: + +1. Log in to the Dashboard and click **Route** under **PAYMENT PRODUCTS**. +1. Click **Batch Upload**. +1. Hover on **Upload New Batch** and click **Linked Accounts**. The **Batch Upload** pop-up page appears. +1. Click **download sample file** to download the sample file. +1. Update and save the file with the following details. Refer to the [Linked Accounts Batch Fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/batch-upload.md#linked-account-batch-fields) section for more information. + - `account_name` + - `account_email` + - `dashboard_access` + - `customer_refunds` + - `business_name` + - `business_type` + - `ifsc_code` + - `account_number` + - `beneficiary_name` +1. Upload the updated file to the **Dashboard** in the **Batch Upload** pop-up page. +1. Verify the details and enter the file name in the **BATCH FILE NAME** text box. +1. You can choose to process the file immediately or schedule it for later. +1. Click **Create**. + +You can view the status and other details of the upload under the **Batch Upload** section on the Dashboard. + +### Linked Account Batch Fields + +The following table lists the fields required to create linked accounts and their description. + +Field | Description and Possible Values +--- +`account_name` | Name for the linked account. +--- +`account_email` | Email for the linked account. This is an optional filed. +--- +`dashboard_access` | Option to choose whether to provide Dashboard access or not. Possible values are: - `0`: No + - `1`: Yes + +--- +`customer_refunds` | Option to choose whether to allow refund or not. Possible values are: - `0`: No + - `1`: Yes + +--- +`business_name` | Business name of the linked account. +--- +`business_type` | Business type of the linked account. Possible values are: - `llp` + - `ngo` + - `individual` + - `partnership` + - `proprietorship` + - `public_limited` + - `private_limited` + - `trust` + - `society` + - `not_yet_registered` + - `educational_institutes` + +--- +`ifsc_code` | IFSC code of the linked account bank. +--- +`account_number` | Account number of the linked account. +--- +`beneficiary_name` | Beneficiary name of the linked account. +--- + +Download the sample input file of the Linked Account creation for reference. + +### Batch File After Processing + +Once a batch file is processed, you can view and download the processed file from the Dashboard. Click the **Batch Id** to view the details and click **Download** to download the file. Information such as the uploaded rows, successfully processed and failed rows are displayed in the file. + +![Route processed batch file after processing](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-processed_batch_file.jpg.md) + +The downloaded file has the following additional fields that provide information about the created linked accounts or the reason for failure. + +Field | Description and Possible Values +--- +`account_id` | Unique ID of the linked account in the `acc_FinZs6b5lL1Nmv` format. +--- +`account_name` | Name for the linked account. +--- +`account_email` | Email for the linked account. +--- +`dashboard_access` | Option to choose whether to provide Dashboard access or not. Possible values are: - `0`: No + - `1`: Yes + +--- +`customer_refunds` | Option to choose whether to allow refund or not. Possible values are: - `0`: No + - `1`: Yes + +--- +`business_name` | Business name of the linked account. +--- +`business_type` | Business type of the linked account. +--- +`ifsc_code` | IFSC code of the linked account bank. +--- +`account_number` | Account number of the linked account. +--- +`beneficiary_name` | Beneficiary name of the linked account. +--- +`account_status` | The status of the linked account. Possible values: - `success` + - `failed` + +--- +`Error Code` | The error code for the failure. For example, `BAD_REQUEST_ERROR`. +--- +`Error Description` | The reason for the error. For example, `The IFSC code field is required`. +--- + +### Create Transfers via Batch Upload + +You can create transfers to Linked Accounts in bulk by uploading a batch file with the required details. Watch this video to see how to create transfers to linked accounts in bulk using a batch file. + +[Video: https://www.youtube.com/embed/Brm1nGdy5cs] + + +### To create Transfers in bulk: + + 1. Log in to the Dashboard and click **Route** under **PAYMENT PRODUCTS**. + 1. Click **Batch Upload**. + 1. Hover on **Upload New Batch** and click **Transfers**. The **Batch Upload** pop-up page appears. + 1. Click **download sample file** to download the sample file. + 1. Update and save the file with the following details. Refer to the Transfers Batch Fields section for more information. + - `payment_id` + - `account_id` + - `amount` + - `currency` + - `transfer_notes` + - `linked_account_notes` + - `on_hold` + - `on_hold_until` + + +> **WARN** +> +> +> **Watch Out!** +> +> You should enter the amount in paise. For example, if you want to transfer ₹500, then you should enter 50000. +> + + 1. Upload the updated file to the **Dashboard** in the **Batch Upload** pop-up page. + 1. Verify the details and enter the file name in the **BATCH FILE NAME** text box. + 1. You can choose to process the file immediately or schedule it for later. + 1. Click **Create**. + + You have successfully created transfers in bulk. + + + +### Transfers Batch Fields + + The following table lists the fields required to create transfers and their description. + + + + Field | Description and Possible Values + --- + `payment_id` | `string` Unique identifier of the payment on which the transfer must be created. This field is required only in the case of Transfers via Payment. + --- + `amount` | `integer` The amount that has to be transferred to the linked account. For example, for an amount of ₹200.35, the value of this field should be 20035. + --- + `currency` | `string` The currency in which the transfer should be made. We support only INR for Route transactions. + --- + `account_id` | `string` Unique identifier of the linked account to which the transfer is to be made. + --- + `transfer_notes` | `json object` Set of key-value pairs that can be associated with an entity. These keys are useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. + --- + `linked_account_notes` | `array` List of the keys from the notes object, which needs to be shown to linked accounts on their Dashboard. + --- + `on_hold` | `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: - `1`: Puts the settlement on hold. + - `0`: Releases the settlement. + + --- + `on_hold_until` | `integer` Timestamp, in Unix, indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. + --- + + + Download the sample input file of Transfers creation for reference. + +### Batch File After Processing + +Once a batch file is processed, you can view and download the processed file from the Dashboard. Click the **Batch Id** to view the details and click **Download** to download the file. Information such as the uploaded rows, successfully processed and failed rows are displayed in the file. + +![Route transfers Batch Upload report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-transfers_Bu_report.jpg.md) + +The downloaded file has the following additional fields that provide information about the created transfers or the reason for failure. + +Field | Description and Possible Values +--- +`transfer_id` | `string` Unique identifier of the transfer. +--- +`payment_id` | `string` Unique identifier of the payment on which the transfer must be created. This field is required only in the case of Transfers via Payment. +--- +`account_id` | `string` Unique identifier of the linked account to which the transfer is to be made. +--- +`amount` | `integer` The amount that has to be transferred to the linked account. For example, for an amount of ₹200.35, the value of this field should be 20035. +--- +`currency` | `string` The currency in which the transfer should be made. We support only INR for Route transactions. +--- +`transfer_notes` | `json object` Set of key-value pairs that can be associated with an entity. These keys are useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. +--- +`linked_account_notes` | `array` List of the keys from the notes object, which needs to be shown to linked accounts on their Dashboard. +--- +`on_hold` | `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: - `1`: Puts the settlement on hold. + - `0`: Releases the settlement. + +--- +`on_hold_until` | `integer` Timestamp, in Unix, indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. +--- +`created_at` | Timestamp of when the transfer is created. +--- +`Error Code` | The error code for the failure. For example, `BAD_REQUEST_ERROR`. +--- +`Error Description` | The reason for the error. For example, `The IFSC code field is required`. +--- + +## View all Batches + + +### The Batch Upload section in the Dashboard displays the following fields: + + + + Field | Description + --- + Batch ID | ID of the newly uploaded batch. + --- + Batch Name | Business defined label for the batch. + --- + Count | Total number of rows uploaded. + --- + Type | Type of the uploaded file. The value can be either of the following: - Linked Account + - Transfers + + --- + Status | Status of the uploaded file. The value can be either of the following: - Created + - Processed + - Processing + - Scheduled + - Cancelled + + --- + Actions | Action buttons for the uploaded file. Following are the available options: - Download + - Cancel + + --- + + + You can also search for the required batch file using the following search options: + - Batch Upload Id: This option allows you to search using the upload ID. + - Batch Type: This option lets you search using batch type. Select the required type from the **Batch Type** list. + - Count: This option allows you to search using the number of rows uploaded. + + +## Schedule a Batch + +You can choose to process the batch upload immediately or schedule it for later. + + +### To schedule a batch: + + 1. Log in to the Dashboard and click **Route** under **PAYMENT PRODUCTS**. + 1. Click **Batch Upload**. + 1. Hover on **Upload New Batch** and click the required batch type. The **Batch Upload** pop-up page appears. + 1. Click **download sample file** to download the sample file. + 1. Update the file with the required details. + 1. Upload the updated file to the **Dashboard** in the **Batch Upload** pop-up page. + 1. Select **Schedule for Later** and select the date and time you want to start the batch upload. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure the scheduled time is at least 1 hour from the current time. +> + + 1. Click **Create**. + + The batch upload starts at the scheduled time. + + +## Errors During and After Batch Upload + + +### Errors During Upload + + If any error happens in the data rows during the upload step, it will be displayed on the screen. You can also download the report from the Dashboard that contains errors and their reasons. This helps you to fix the errors and upload the file. + + Some of the common errors during upload are: + - Same file uploaded multiple times + - Uploaded file type not supported + + You can fix the errors by making the required changes in the file and re-upload it in the Dashboard. + + + +### Errors After Upload + + A processed batch file does not necessarily mean that all linked accounts and transfers were created successfully. Few rows may not get created because of certain issues in the entered data. + + Download the Batch Report that contains the following additional fields to help you check if a link was issued for a row or not. + + + + Field | Description + --- + Status | The status of the Transfer. Possible values are: - Success + - Failed + + --- + Error Code | The error code for the failure. For example, `BAD_REQUEST_ERROR`. + --- + Error Description | The reason for the error. For example, `The IFSC code field is required`. + --- + Transfer Id/Linked Account Id | `string` Unique identifier of the transfer/linked account. + --- + + + +### Related Information + +[Route FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/faqs.md) diff --git a/llm-content/payments/route/dashboard.md b/llm-content/payments/route/dashboard.md new file mode 100644 index 00000000..3cc335f5 --- /dev/null +++ b/llm-content/payments/route/dashboard.md @@ -0,0 +1,187 @@ +--- +title: Route Dashboard +description: Access Razorpay Route Dashboard, split payments to multiple third parties and initiate reversals and refunds. +--- + +# Route Dashboard + +Use the Dashboard to add and manage linked accounts, transfer funds to them and initiate reversals in case of refunds to customers. + +To access Route: +1. Log in to the Dashboard. +2. Click **Route** from the left pane. + +You can perform the following actions using Route: +- Add and Manage Linked Accounts +- Initiate a Transfer + - Direct Transfer - Transfer amount to linked account from current balance. + - Transfer from Payments - Transfer payment received from customers to linked accounts. +- Issue a Refund +- Create a Reversal +- View Transfers and Reversals Reports + +## Add and Manage Linked Accounts + +From the Dashboard, create a linked account and provide the bank account details: +1. Click **Accounts** tab, and then click **+ Add Account**. + ![Route account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-account.jpg.md) +2. Enter **Account Name** and **Account Email**. +3. If you want to enable the Dashboard access for the linked account, turn on the toggle bar. +4. Click **Add**. +![](/docs/assets/images/route-add-linked-account.jpg) + +In the **KYC Form**, enter **Business Details** and **Bank Account Details**, and then click **Submit Form**. + +![Submit KYC details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-add-account-kyc.jpg.md) + +## Grant Dashboard Access for Linked Accounts + +You can grant Dashboard access, enable refunds capability and refund credits for the linked accounts. + +### Grant Dashboard Access + +You can grant Dashboard access to your linked accounts. After the access is granted, the recipient linked account is notified of this action through a mail (sent to the email address used for onboarding), along with a password reset option. + +You can provide Dashboard access while adding a new account. + +If you want to provide access to the Dashboard for an existing account: +1. Navigate to the **Accounts** tab. +2. Turn on the **Dashboard Access** toggle against the relevant account. + +For more details, refer to the [Linked Account Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md#grant-dashboard-access-to-linked-accounts) documentation. + +### Enable Refunds Capability + +Due to government regulations, in certain cases, linked accounts have to directly process refunds to customers. + +You can enable refunds capability while adding a new account. + +If you want to enable refunds capability for an existing account: +1. Navigate to the **Accounts** tab. +2. Turn on the **Enable Refunds** toggle against the relevant account. + +### Enable Refund Credits + +By default, refunds are processed using the linked account’s unsettled balance. However, Razorpay Route provides the option to use a Refund Credits pool to process these transactions, instead of the existing unsettled balance. + +Upon gaining access, funds can be transferred to the Refunds Credits pool through a specific account number shared by you. Enable Refund Credits for a linked account by sending an email to your Razorpay account manager with these details: +- Linked account name +- Email ID +- Balance type (Refund Credit) + +## Export Account Information + +You can export account information in .csv format for your business needs. Click **Export All (CSV)** to initiate the download. + +## Initiate a Transfer + +### Direct Transfer + +You can transfer funds to your linked accounts directly from your account balance using Direct Transfers. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +Follow these steps to create a direct transfer to a linked account: +1. Log in to the Dashboard. +2. Under **PAYMENT PRODUCTS**, navigate to **Route** → **Transfers**. +3. Click **+Create Direct Transfer**. + ![View Direct Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-create-direct-transfer.jpg.md) +4. In the popup, provide the following details: + 1. **Account** - Select the linked account to whom the amount should be transferred. + 2. **Billing Amount** - Enter the amount to be transferred. + 3. **Settlement Schedule** - The following options are available: + - **Settle Now** - Settle the transfer in the next available settlement slot. + - **Schedule Settlement on** - Settle the amount on a scheduled date. + - **Put on hold** - Put the settlement on hold indefinitely. + 4. **Notes** - You can add any additional information regarding the transfer. +5. Click **Create Transfer**. + +![View Direct Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-add-transfer-details.jpg.md) + +#### View Direct Transfers + +Once created, the direct transfer appears on the Transfers list. Click on the transfer id to view the details on the side panel. For a direct transfer, the **account id** will appear as the source. + +![View Direct Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-view-direct-transfer.jpg.md) + +### Transfer from a Payment + +The payments received from customers appear in the **Transactions** tab. To view these in detail, click the relevant Payment ID. After the payment is captured, you can initiate the transfer to the linked account: + +1. Under the **Payments** tab, click the relevant **Payment ID**. +2. In the Payment details pane, + 1. Select the linked account to transfer to from the drop-down list. + 2. Enter the billing amount. It can be a full or partial transfer. + 3. Select the **Settlement Schedule** option + 1. **Settle Now** - Use this to settle in the next available settlement slot. If your schedule is T+3, the transfer will happen accordingly. + 2. **Schedule Settlement On** - Select this to schedule the transfer to a later date using the calendar. + 3. **Put on Hold** - Use this to defer the transfer until specified otherwise. +3. Add internal notes relevant to the transfer if any. You can choose to share the note with your linked account. +4. Click **Create Transfer**. + +![Route account make transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-make-transfer.jpg.md) + +The transaction is available in the **Route** section under the **Payments** and **Transfers** tabs. From here, you can initiate transfers and reversals for linked accounts. + +## Issue a Refund + +To issue a refund to the customer: +1. Under the **Payments** tab, click the relevant **Payment ID**. +2. In the **Payment details** pane, click **Issue Refund**. + 1. For a full refund, enter the total transaction amount. Enter comments if required, and then click **Issue Full Refund**. + 2. For a partial refund, enter the amount. Enter comments if required, and then click **Issue Partial Refund**. +3. The refund transfer takes place from your primary account. Hence, you must create a corresponding reversal for the linked account. This can be done manually, or you may use the **Reverse all Route Transfers as well** option for automatic reversal. +4. In the dialog box that appears, confirm refund by clicking **Yes, Refund**. + +![Route account make partial refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-make-partial-refund.jpg.md) + +## Create a Reversal + +To move funds back from the linked account to your account, follow the below steps: +1. Under the **Transfers** tab, click the relevant **Transfer ID**. +2. In the **Transfers details** pane, click **Create Reversal**. + 1. For a full reversal, enter the total transfer amount. Add internal notes and share it with linked account if required. Click **Create Full Reversal**. + 2. You can also make a partial reversal. Enter the amount, add notes if required and click **Issue Partial Refund**. +3. In the dialog box that appears, confirm reversal by clicking **Yes, Reverse**. + +You can view the reversal in the **Reversals** tab. + +![Route account make reversal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-make-reversal.jpg.md) + +## View Transfers and Reversals Reports + +You can view the transfers made to and reversals initiated from linked accounts in the Transfers and Reversals reports available in **Dashboard** → **Reports**. + +### Transfers Report + +To view the **Transfers** report: +1. Under the **Transfers** tab, select the **Period** - Daily or Monthly and choose the date or month. +2. Select the file format - You can choose CSV, XLSX or XLS formats. +3. Click **Download Report** or get it emailed to your registered email address by clicking **Email Report**. + +This report is displayed as shown below: + +![Route account transfers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route_transfers.jpg.md) + +### Reversals Report + +To view the Reversals report: +1. Under the **Reversals** tab, select the **Period** - Daily or Monthly and choose the date or month. +2. Select the file format - You can choose CSV, XLSX or XLS formats. +3. Click **Download Report** or get it emailed to your registered email address by clicking **Email Report**. + +This report is displayed as shown below: + +![Route account reversals](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route_reversals.jpg.md) diff --git a/llm-content/payments/route/faqs.md b/llm-content/payments/route/faqs.md new file mode 100644 index 00000000..895d743c --- /dev/null +++ b/llm-content/payments/route/faqs.md @@ -0,0 +1,382 @@ +--- +title: Route | FAQs +heading: FAQs (Frequently Asked Questions) +description: Find answers to frequently asked questions about Razorpay Route. +--- + +# FAQs (Frequently Asked Questions) + +### 1. How can I transfer money to customers? + + You can use Razorpay Route from the Dashboard or using APIs to transfer money to customers. + + **To use Route from the Dashboard**: + + 1. Log in to the Dashboard. + 2. Find a payment on the Transactions panel (left column). Click on the Payment id to view its details on the right panel. Create a transfer from the payment. + 3. Alternatively, find a payment under the Payments tab on the Route panel. Click on the Payment id to view its details, and create a transfer. + + You can also use [Route Transfers APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md) to transfer money. + + + +### 2. How can I track the status of transactions initiated using Route? + + When a transfer is created from the Dashboard or using the Route APIs, you are notified if the transfer creation was successful or not. + + The transfer is processed asynchronously and on success, `transfer.processed` webhook is sent (if enabled). Know more about [setting up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/subscribe-to-webhooks.md). + + + +### 3. How can I track the status of funds transferred to linked accounts? + + The `transfer.processed` webhook is sent for every successful transfer. The webhook indicates that the requested transfer is processed, funds are debited from the merchant and credited to the linked account. + + Know more about [setting up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/subscribe-to-webhooks.md). + + + +### 4. Can you reverse a transfer? + + Yes, you can reverse transfers. You can initiate a reversal from the Dashboard or using APIs. + + **To create a reversal from the Dashboard**: + + 4. Log in to the Dashboard. + 5. Go to **Route** → **Transfers**. Click on a **Transfer id** to view the details. Click on the **Create Reversal** button to reverse the transfer. + - You can also use the [Reverse Transfers from all Linked Accounts API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/reverse-a-transfer.md) to reverse money transfer. + - You can also [refund payment and simultaneously reverse ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/refund-payments-and-reverse-transfer.md) all the transfers made on that payment. + + + +### 5. Can I create transfers on an order for international currencies? + + No, you cannot create transfers on an order for international currencies. The transfer reversal is available only for **INR**. + + + +### 6. When should I initiate Transfer using Payments? + + You should initiate Transfer using Payments when information regarding payment split is decided post customer transaction and/or has some other approval/verification dependencies on the linked accounts. For example, in life insurance, you can only transfer funds to a linked account post-approval and policy issuance. + + + +### 7. When should I initiate Direct Transfers? + + **Direct Transfers** is an on-demand feature. Raise a request with [our Support team](https://razorpay.com/support/) to get it enabled for your account. +You should initiate Direct Transfers when fund transfers to a linked account is not necessarily linked to any incoming payments. You can also use this feature for payouts. + + + +### 8. I have created a linked account on the Dashboard in the Test mode. Can I use it on the Live mode? + + You can use a linked account created in the **Test** mode on the **Live** mode and vice versa. + + + +### 9. Does Razorpay Route support international currencies? + + Currently, we support only **INR** for Razorpay Route. + + + +### 10. How do I create linked accounts using bulk upload? + + You can create linked accounts using bulk upload from the Dashboard. Know more about [Batch Upload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/batch-upload.md). + + + +### 11. Should the linked account websites be whitelisted to use route? + + No. Your linked account websites do not need to be whitelisted to use Route. The only requirement is that your website, from which your customers will make the payment, must be whitelisted with Razorpay. + + + +### 12. Why am I not able to create Linked Accounts from the Dashboard? + + If you are a Mutual Funds Distributor (MFD), Linked Accounts with Asset Management Company (AMC) details are automatically created after you get access to the Route. You do not need to create any Linked Accounts from the Dashboard. Please get in touch with our [support team](https://razorpay.com/support/) for any help on creating Linked Accounts. + + + +### 13. Can I use the same Razorpay API Keys on multiple websites or domains? + + Yes, you can use the same set of Live Mode API Keys on multiple websites or domains. + + The Live Mode keys are tied to your single Razorpay account, allowing them to process live transactions from any domain where they are implemented. Using the same keys on a new website **will not impact** the live payments running on your existing, whitelisted website. + + **For Testing:** + + We strongly recommend using your **Test Mode API Keys** when integrating Razorpay on any new website. Test payments are simulated and ensure that your live payment processing on existing sites remains unaffected during development. + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure your new website's domain is whitelisted in your Razorpay account to avoid payment disruptions once you switch to Live Mode. +> + + + + +### 14. How should I manage API Keys when working with a developer for integration? + + API Keys are generated and managed by the **Owner or Admin** roles in the Dashboard. Razorpay does not offer a separate Developer Access Role. + + To securely facilitate integration and testing (for example, for platforms like WooCommerce, where direct API key input might be required for some plugins), follow this standard workflow: + + - **Phase 1: Testing (Integration)** + The Owner or Admin must generate and securely share the **Test Mode API Keys** with the developer. The developer will use these keys to build and test the integration without affecting any live payments. + - **Phase 2: Go-Live** + Once testing is complete, the Owner or Admin must generate the **Live Mode API Keys** and provide them to the developer to replace the Test Keys in the final application setup. + + This ensures security and maintains clear control over your live payment environment. + + + + +### 15. How do I transfer funds using the Route API after accepting a payment via a Razorpay Payment Link? + + You can transfer funds to Linked Accounts using the Route API by referencing the Payment id generated by the Payment Link transaction. This approach is called Create Transfers from Payments. + + You can execute the transfer in three ways: + + 1. **Dashboard:** Initiate a transfer directly from the specific Payment id within the Transactions or Route section of your Dashboard. + 2. **API:** Use the **Create Transfers from Payments API**, where you specify the Payment id to be split among your Linked Accounts. + 3. **Automatic:** If you set up an automatic split before the payment link is generated, the funds will be split instantly upon successful payment. + + Know more about the [Create Transfers from Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-transfers-payments.md). + + + + +### 16. What are the different fees involved when splitting a payment using Razorpay Route? + + A Route transaction involves two distinct types of fees deducted from your account balance: + + 4. **Payment Gateway Fee:** This fee is charged on the **full Payment Amount** received from the customer, before any funds are split. This covers the cost of processing the original transaction. + 5. **Transfer Fee:** This fee is charged on the **Amount Transferred** to each Linked Account. This covers the cost of facilitating the money transfer from your main account to the Linked Account(s). + + Both fees are calculated based on your agreed-upon pricing plan and are subject to GST (or local equivalent tax, where applicable). Your final commission or retained amount is the remaining balance after both fees and the transfer amount have been deducted. + + For detailed calculation examples, refer to our [Transfers and Related Fees Examples](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-fees-example.md) page. + + + +## Penny Testing + + +### 1. What is Penny Testing? + + Penny Testing is a process of validating the bank details. Razorpay will transfer a nominal amount to the bank account details submitted to verify them. Transfers are allowed only on successful validation. + + + +### 2. Is the Penny testing feature enabled for all Linked Accounts? + + No. The Penny Testing feature is enabled: + - Only for **new** Linked Accounts. + - Only for those accounts which have this feature enabled. + + + +### 3. How long does it take for a Linked Account to get activated with the Penny Testing feature enabled? + + The Linked Account should get activated immediately. It should not take more than a minute to verify the bank details. Based on the verification results, it goes to the `activated` or `verification_failed` state. + + **Verification Failed** + + ![Route - Linked Account Verification Failed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route_la_pt_vf.jpg.md) + + **Activated** + + ![Route - Linked Account Activated](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route_la_pt_act.jpg.md) + + **Verification Pending** + + ![Route - Linked Account Verification Pending](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route_la_pt_vp.jpg.md) + + **Not Activated** + + ![Route - Linked Account Not Activated](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route_la_pt_na.jpg.md) + + + +### 4. What are the different activation statuses of a Linked Account? + + + + Status | Description + --- + `activated` | Linked Account bank details are successfully verified with Penny Testing and ready for transfers. + --- + `verification_pending` | Linked Account bank details are submitted for verification. It moves to the `activated` state if details are successfully verified. You cannot make transfers when Linked Accounts are in the `verification_pending` state. + --- + `verification_failed` | The Linked Account bank details are not verified successfully. You have to update the bank details to make transfers to this Linked Account by reaching out to the [Support team](https://razorpay.com/support/) . + --- + `not_activated` | The activation form for the Linked Account is not filled. Fill out the activation form to start the activation process. + + + + +### 5. What happens to merchant's existing Linked Accounts when the Penny Testing feature is enabled? + + All the existing linked accounts are marked as **Bank Details Verified**, and they will remain activated. No Penny Testing will be done for old Linked Accounts. You can operate those Linked Accounts as usual. + + + +### 6. Can I create multiple Linked Accounts with the same email address? + + Yes, you can create multiple Linked Accounts with the same email address. + - A Linked Account can have the same email address across different parent merchants. + - At a merchant level, however, the email address of multiple Linked Accounts should be unique. + + **Example:** + Acme Corp has Linked Account LA1 with the email address `la1@gmail.com`. Acme Corp will not be able to create more Linked Accounts with the same email address. However, other businesses such as Raftar Soft and ABC Co can still create Linked Accounts with the email `la1@gmail.com`. Further, la1@gmail.com can be used to create a regular merchant account if it does not exist already. + + + +### 7. Does Razorpay perform Penny Testing when I update a Linked Account's bank details? + + You should raise a support request to update the details of a Linked Account. Once they update the details, the Penny Testing will happen again, and the status of the Linked Account will be automatically updated as per the result. + + + +### 8. Can I modify the bank account details of the Linked Account or create another one if bank verification via Penny Testing fails? + + Razorpay will create the Linked Account even if the bank verification fails. Hence, creating another Linked Account will result in a duplicate check failure. You should raise a support request to update the bank account details. + + + + +### 9. How many Linked Accounts can I create in bulk for Penny Testing? + + You can upload 50,000 rows in one go with 11 MB as the max file size using the [Bulk Upload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/batch-upload.md#create-linked-accounts-via-batch-upload) feature. Below is the expected TAT: + + + + No. of Records | TAT + --- + 1,000 | 5min + --- + 10,000 | 50min + --- + 50,000 | 4h + + + + +### 10. Will I receive a notification when the batch upload is completed? + + No. You can check the status of the upload only from the Dashboard. + + + +### 11. Will I receive a notification when the Linked Account is activated? + + No. You do not get any notification when the Linked Account is activated. + + + +### 12. Will I receive a notification when the Linked Account verification fails? + + No. You do not get any notification when the Linked Account verification fails. + + + +### 13. Will the Penny Testing be done in the test mode? + + Yes. Penny Testing is supported in both the test and live modes. + + + +### 14. Can I update my Linked Account’s email address after they are created? + + Yes. You can update the email address of the created Linked Account using the Dashboard. + + + + + + . + --- + `not_activated` | The activation form for the Linked Account is not filled. Fill out the activation form to start the activation process. + + + + +### 5. What happens to merchant's existing Linked Accounts when the Penny Testing feature is enabled? + + All the existing linked accounts are marked as **Bank Details Verified**, and they will remain activated. No Penny Testing will be done for old Linked Accounts. You can operate those Linked Accounts as usual. + + + +### 6. Can I create multiple Linked Accounts with the same email address? + + Yes, you can create multiple Linked Accounts with the same email address. + - A Linked Account can have the same email address across different parent merchants. + - At a merchant level, however, the email address of multiple Linked Accounts should be unique. + + **Example:** + Acme Corp has Linked Account LA1 with the email address `la1@gmail.com`. Acme Corp will not be able to create more Linked Accounts with the same email address. However, other businesses such as Raftar Soft and ABC Co can still create Linked Accounts with the email `la1@gmail.com`. Further, la1@gmail.com can be used to create a regular merchant account if it does not exist already. + + + +### 7. Does Razorpay perform Penny Testing when I update a Linked Account's bank details? + + You should raise a support request to update the details of a Linked Account. Once they update the details, the Penny Testing will happen again, and the status of the Linked Account will be automatically updated as per the result. + + + +### 8. Can I modify the bank account details of the Linked Account or create another one if bank verification via Penny Testing fails? + + Razorpay will create the Linked Account even if the bank verification fails. Hence, creating another Linked Account will result in a duplicate check failure. You should raise a support request to update the bank account details. + + + + +### 9. How many Linked Accounts can I create in bulk for Penny Testing? + + You can upload 50,000 rows in one go with 11 MB as the max file size using the [Bulk Upload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/batch-upload.md#create-linked-accounts-via-batch-upload) feature. Below is the expected TAT: + + + + No. of Records | TAT + --- + 1,000 | 5min + --- + 10,000 | 50min + --- + 50,000 | 4h + + + + +### 10. Will I receive a notification when the batch upload is completed? + + No. You can check the status of the upload only from the Dashboard. + + + +### 11. Will I receive a notification when the Linked Account is activated? + + No. You do not get any notification when the Linked Account is activated. + + + +### 12. Will I receive a notification when the Linked Account verification fails? + + No. You do not get any notification when the Linked Account verification fails. + + + +### 13. Will the Penny Testing be done in the test mode? + + Yes. Penny Testing is supported in both the test and live modes. + + + +### 14. Can I update my Linked Account’s email address after they are created? + + Yes. You can update the email address of the created Linked Account using the Dashboard. diff --git a/llm-content/payments/route/glossary.md b/llm-content/payments/route/glossary.md new file mode 100644 index 00000000..626a0b29 --- /dev/null +++ b/llm-content/payments/route/glossary.md @@ -0,0 +1,28 @@ +--- +title: Route | Glossary +heading: Glossary +description: List of commonly used terms related to Razorpay Route. +--- + +# Glossary + +The following table lists all the commonly used terms and their definitions used in Route: + +Terms | Description +--- +Funds | Payments collected from the customer for products and services offered. +--- +Linked Accounts | Accounts created for third-party sellers once they are onboarded on the Razorpay platform. +--- +Onboarding | The process of adding individual sellers on the Razorpay platform. This process requires submission of the mandatory information such as bank account details of the linked accounts. +--- +Refund | The process of returning funds to the customers from the linked accounts. +--- +Refund Credit | A separate pool of funds created by you or the linked account to process refunds from. +--- +Reversal | The process of moving the transferred funds back from the linked account to your account. This is initiated by you. +--- +Settlement | The process of completing a payment transaction, wherein Razorpay does a transfer of pending funds to your bank account and your linked account's bank account. +--- +Transfer | The process of moving funds from your account to the linked account. +--- diff --git a/llm-content/payments/route/integration-guide.md b/llm-content/payments/route/integration-guide.md new file mode 100644 index 00000000..020120aa --- /dev/null +++ b/llm-content/payments/route/integration-guide.md @@ -0,0 +1,245 @@ +--- +title: Integrate With Route +description: Step-by-step guide on how to integrate Razorpay Route. +--- + +# Integrate With Route + +Razorpay Route can split payments between third parties, sellers or bank accounts. + +## Prerequisites + +- Create a Razorpay account. + +- Log in to the Dashboard and [generate the API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). You need to use these keys while using our APIs and Checkout. + +## Integration Steps + +Follow these steps to integrate Razorpay Route: + + - **1. Build Integration**: Integrate Route. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +## 1. Build Integration + +Follow these steps to create Linked Accounts and transfer funds to them. + + +### Step 1.1 Create Linked Accounts + + To transfer funds to various third parties, sellers, bank accounts or vendors, you should add them as Linked Accounts. When you add a Linked Account, you gain complete visibility and control of all the fund movements, such as transfers, reversals and refunds for each of your Linked Accounts. + + You can create Linked Accounts using [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md#add-and-manage-linked-accounts) and APIs. Follow these steps to create Linked Accounts using APIs: + + + + 1.1.1 Create a Linked Account + + [Create a Linked Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-linked-account.md) using the API. A unique `account_id` will be assigned to the created account. + + + +### 1.1.2. Create a Stakeholder + + You should now [create a stakeholder](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-stakeholder.md) using the `account_id`. A unique `stakeholder_id` will be assigned to the created stakeholder account. + + + +### 1.1.3. Request a Product Configuration + + Now that both Linked Account and stakeholder are created, you should [request a Route product configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/request-product-config.md). + + + +### 1.1.4. Update a Product Configuration + + You should now trigger the [update product configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/update-product-config.md) API with the bank account details of the Linked Account. The configuration will be activated if the information review is successful. + + If the `activation_status` moves to the `needs_clarification` state, you can check the `requirements` array in the response for `needs_clarification` reasons. The array will contain the following information: + + + Requirements | Description + --- + `field_reference` | The field reference which has an issue. + --- + `resolution_url` | The URL to address the requirement. You should use the API endpoint to update the missing field. + --- + `reason_code` | The reason code for showing in the requirement. + --- + `status` | The status of the requirement. + + + You should use the endpoint in the `resolution_url` to update the details and get the configuration activated. + + + + + + + +### Step 1.2 Transfer Funds to Linked Accounts + + After you create Linked Accounts, you can start transferring funds to them. You can transfer funds using the following methods: + - [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-funds-to-linked-accounts.md#transfer-via-orders): You can set up transfers at the time of order creation. The transfer is automatically created and settled to the respective Linked Accounts after the payment is captured and the order is paid. + - [Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-funds-to-linked-accounts.md#transfers-via-payments): You can initiate a transfer from the received payments. + - [Direct Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-funds-to-linked-accounts.md#direct-transfers): You can transfer funds to Linked Accounts directly from your account balance using Direct Transfers. + + +> **INFO** +> +> +> **Requirements to Initiate a Transfer** +> +> - Maintain sufficient funds to successfully process the transfer to the Linked Account. +> - You can only transfer the `captured` payments. +> - You can create more than one transfer on a `payment_id`. However, the total transfer amount (payment amount + fee) should not exceed the captured payment amount. +> - You cannot request a transfer on payment once a refund has been initiated. +> + + + + +## 2. Test Integration + +After completing the integration, you can simulate a test transfer in the test mode using the [Transfer via Payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-funds-to-linked-accounts.md#transfers-via-payments) or [Direct Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-funds-to-linked-accounts.md#direct-transfers) methods from the Dashboard. + +> **WARN** +> +> +> **Watch Out!** +> +> Transfers via orders can only be done using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-transfers-orders.md). +> + +## 3. Go-live Checklist + +Consider the following steps before taking your integration live. + + +### 3.1 Switch Test API Keys With Live API Keys + + - After confirming your integration is working successfully, you can take the integration live by switching the Test Mode API Keys with the Live Mode Keys. + + Watch this video to learn how to generate Live API keys: + + +[Video: https://www.youtube.com/embed/30REpNtYSak?si=j9Lm_y-D4bwTspv6] + + - You can create live Transfers to Linked Accounts created in the Test Mode. + + + +### 3.2 Subscribe to Webhooks + + [Set up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. You can subscribe to these [Route webhook events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/route.md#route). + + +## Appendix + +This section provides information about business type, category, sub-category, KYC requirements and their possible values. + + +### Business Type + + The following table lists the supported Business Types: + + + Values + --- + - `llp` + - `ngo` + - `other` + - `individual` + - `partnership` + - `proprietorship` + - `public_limited` + - `private_limited` + - `trust`, `society` + - `not_yet_registered` + - `educational_institutes` + + + + + +### Business Category + + The following table lists the possible values for Business Category: + + + Values + --- + `financial_services`; `education`; `healthcare`; `utilities`; `government`; `logistics`; `tours_and_travel`; `transport`; `ecommerce`; `food`; `it_and_software`; `gaming`; `media_and_entertainment`; `services`; `housing`; `not_for_profit`; `social`; `others` + + + + +### Business Sub-Category + + The following table lists the possible values for Business Sub-Category: + + + Attribute | Values + --- + FINANCIAL_SERVICES | mutual_fund, lending, cryptocurrency, insurance, nbfc, cooperatives, pension_fund, forex, securities, commodities, accounting, financial_advisor, crowdfunding, trading, betting, get_rich_schemes, moneysend_funding, wire_transfers_and_money_orders, tax_preparation_services, tax_payments, digital_goods, atms + --- + EDUCATION | college, schools, university, professional_courses, distance_learning, day_care, coaching, elearning, vocational_and_trade_schools, sporting_clubs, dance_halls_studios_and_schools, correspondence_schools + --- + HEALTHCARE | pharmacy, clinic, hospital, lab, dietician, fitness, health_coaching, health_products, drug_stores, healthcare_marketplace, osteopaths, medical_equipment_and_supply_stores, podiatrists_and_chiropodists, dentists_and_orthodontists, hardware_stores, ophthalmologists, orthopedic_goods_stores, testing_laboratories, doctors, health_practitioners_medical_services, testing_laboratories + --- + ECOMMERCE | ecommerce_marketplace, agriculture, books, electronics_and_furniture, coupons, rental, fashion_and_lifestyle, gifting, grocery, baby_products, office_supplies, wholesale, religious_products, pet_products, sports_products, arts_and_collectibles, sexual_wellness_products, drop_shipping, crypto_machinery, tobacco, weapons_and_ammunitions, stamps_and_coins_stores, office_equipment, automobile_parts_and_equipements, garden_supply_stores, household_appliance_stores, non_durable_goods, pawn_shops, electrical_parts_and_equipment, wig_and_toupee_shops, gift_novelty_and_souvenir_shops, duty_free_stores, office_and_commercial_furniture, dry_goods, books_and_publications, camera_and_photographic_stores, record_shops, meat_supply_stores, leather_goods_and_luggage, snowmobile_dealers, men_and_boys_clothing_stores, paint_supply_stores, automotive_parts, jewellery_and_watch_stores, auto_store_home_supply_stores, tent_stores, shoe_stores_retail,petroleum_and_petroleum_products, department_stores, automotive_tire_stores, sport_apparel_stores, variety_stores, chemicals_and_allied_products, commercial_equipments,fireplace_parts_and_accessories, family_clothing_stores, fabric_and_sewing_stores, home_supply_warehouse, art_supply_stores, camper_recreational_and_utility_trailer_dealers, clocks_and_silverware_stores, discount_stores,school_supplies_and_stationery, second_hand_stores, watch_and_jewellery_repair_stores, liquor_stores, boat_dealers, opticians_optical_goods_and_eyeglasse_stores, wholesale_footwear_stores, cosmetic_stores, home_furnishing_stores, antique_stores, plumbing_and_heating_equipment, telecommunication_equipment_stores, women_clothing, florists, computer_software_stores, building_matrial_stores, candy_nut_confectionery_shops, glass_and_wallpaper_stores,commercial_photography_and_graphic_design_services, video_game_supply_stores, fuel_dealers,drapery_and_window_coverings_stores, hearing_aids_stores, automotive_paint_shops, durable_goods_stores,uniforms_and_commercial_clothing_stores, fur_shops, industrial_supplies, bicycle_stores, second_hand_stores, motorcycle_shops_and_dealers, children_and_infants_wear_stores, women_accessory_stores, construction_materials, books_periodicals_and_newspaper, floor_covering_stores, crystal_and_glassware_stores, accessory_and_apparel_stores,hardware_equipment_and_supply_stores, computers_peripheral_equipment_software, automobile_and_truck_dealers, aircraft_and_farm_equipment_dealers, antique_shops_sales_and_repairs, hearing_aids_stores, music_stores, furniture_and_home_furnishing_store + --- + SERVICES | repair_and_cleaning, interior_design_and_architect, movers_and_packers, legal, event_planning, service_centre, consulting, ad_and_marketing, services_classifieds, multi_level_marketing, construction_services, architectural_services, car_washes, motor_home_rentals, stenographic_and_secretarial_support_services, chiropractors, automotive_service_shops, shoe_repair_shops, telecommunication_service, fines, security_agencies, tailors,type_setting_and_engraving_services, small_appliance_repair_shops, photography_labs, dry_cleaners, massage_parlors,electronic_repair_shops, cleaning_and_sanitation_services, nursing_care_facilities, direct_marketing, lottery,veterinary_services, affliated_auto_rental, alimony_and_child_support, airport_flying_fields, golf_courses, tire_retreading_and_repair_shops, television_cable_services, recreational_and_sporting_camps, barber_and_beauty_shops, agricultural_cooperatives, carpentry_contractors, wrecking_and_salvaging_services, automobile_towing_services, video_tape_rental_stores, miscellaneous_repair_shops, motor_homes_and_parts, horse_or_dog_racing, laundry_services,electrical_contractors, debt_marriage_personal_counseling_service, air_conditioning_and_refrigeration_repair_shops, credit_reporting_agencies, heating_and_plumbing_contractors, carpet_and_upholstery_cleaning_services, swimming_pools, roofing_and_metal_work_contractors, internet_service_providers, recreational_camps, masonry_contractors, exterminating_and_disinfecting_services, ambulance_services, funeral_services_and_crematories, metal_service_centres, copying_and_blueprinting_services, fuel_dispensers, welding_repair, mobile_home_dealers, concrete_work_contractors, boat_rentals, personal_shoppers_and_shopping_clubs, door_to_door_sales, travel_related_direct_marketing, lottery_and_betting, bands_orchestras_and_miscellaneous_entertainers, furniture_repair_and_refinishing, contractors, direct_marketing_and_subscription_merchants, typewriter_stores_sales_service_and_rentals, recreation_services, direct_marketing_insurance_services, business_services, inbound_telemarketing_merchants, public_warehousing, outbound_telemarketing_merchants, clothing_rental_stores, transportation_services, electric_razor_stores, service_stations, photographic_studio, professional_services + --- + HOUSING | developer, facility_management, rwa, coworking, realestate_classifieds, space_rental + --- + NOT_FOR_PROFIT | charity, educational, religious, personal + --- + SOCIAL | matchmaking, social_network, messaging, professional_network, neighbourhood_network, political_organizations, automobile_associations_and_clubs, country_and_athletic_clubs, associations_and_membership + --- + MEDIA_AND_ENTERTAINMENT | video_on_demand, music_streaming, multiplex, content_and_publishing, ticketing, news, video_game_arcades, video_tape_production_and_distribution, bowling_alleys, billiard_and_pool_establishments, amusement_parks_and_circuses, ticket_agencies + --- + GAMING | game_developer, esports, online_casino, fantasy_sports, gaming_marketplace + --- + IT_AND_SOFTWARE | saas, paas, iaas, consulting_and_outsourcing, web_development, technical_support, data_processing + --- + FOOD | online_food_ordering, restaurant, food_court, catering, alcohol, restaurant_search_and_booking, dairy_products, bakeries + --- + UTILITIES | electricity, gas, telecom, water, cable, broadband, dth, internet_provider, bill_and_recharge_aggregators + --- + GOVERNMENT | central, state, intra_government_purchases, goverment_postal_services + --- + LOGISTICS | freight, courier, warehousing, distribution, end_to_end_logistics, courier_services + --- + TOURS_AND_TRAVEL | aviation, accommodation, ota, travel_agency, tourist_attractions_and_exhibits, timeshares, aquariums_dolphinariums_and_seaquariums + --- + TRANSPORT | cab_hailing, bus, train_and_metro, automobile_rentals, cruise_lines, parking_lots_and_garages, transportation, bridge_and_road_tolls, freight_transport, truck_and_utility_trailer_rentals + + + + +### KYC Requirements + + Given below are the KYC Requirements. + + + + KYC Requirements | Number | API Name | Not Yet Registered | Individual | Proprietorship | Public Limited | Private Limited | LLP | Partnership | Trust | NGO | Society | Educational Institutes + --- + Owner PAN/Signatory PAN | Number | Stakeholder | Yes | Yes | Conditional | No | No | No | No | No | No | No | No + --- + Business PAN | Number | Linked Account Onboarding | NA | NA | Optional | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes + --- + Bank Account | Number | Product Configuration | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes + --- + GST | Number | Linked Account Onboarding | NA | NA | Optional | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes + + + +### Related Information + +- [Route API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md) +- [Route Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/subscribe-to-webhooks.md) diff --git a/llm-content/payments/route/linked-account.md b/llm-content/payments/route/linked-account.md new file mode 100644 index 00000000..698f488b --- /dev/null +++ b/llm-content/payments/route/linked-account.md @@ -0,0 +1,163 @@ +--- +title: Linked Accounts +description: Use Linked Accounts to split payments between multiple third-parties, bank accounts and vendors. Add Linked Accounts and provide them access to issue refunds, view reversals and settlements and manage their profile. +--- + +# Linked Accounts + +Businesses need to distribute payments across multiple recipients - marketplaces paying sellers, platforms sharing revenue with partners or companies managing vendor payments. Manual fund transfers and reconciliation create operational complexity. + +Razorpay Route automates this through **Linked Accounts**, splitting payments between multiple recipients while giving you central control and each recipient self-service capabilities. + +## What are Linked Accounts + +Linked Accounts are dedicated entities within your Route setup that receive a portion of incoming funds. Each Linked Account: + +- Receives funds based on your split payment configuration. +- Has a unique `account_id` for API integration and tracking. +- Can access a dedicated dashboard for self-service operations. +- Processes refunds using available balance or Refund Credits. + +### Features + + + - **Split Payments**: Automatically divide incoming funds between multiple recipients. + - **Central Management**: Handle settlements, refunds and reconciliations for all Linked Accounts. + - **Access Control**: Grant or revoke dashboard permissions for each Linked Account. + - **Complete Visibility**: Track all fund movements, transfers and operations. + + + - [Process individual and bulk refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/initiate-refund.md). + - [View reversals and settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/reversals-settlements.md). + - [Manage profile and team members](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/manage-profile.md). + + +## Add Linked Accounts + + + + Watch this video to see how to add Linked Accounts: + + +[Video: https://www.youtube.com/embed/aLLI9UwNMl0?si=aWXZKs6BEM9R1QxM] + + To create a Linked Account: + + 1. Log in to the Dashboard and navigate to **Route** under **PAYMENT PRODUCTS** + 2. Click the **Accounts** tab, then **+ Add Account** + 3. In the **Add Account** popup: + - Enter **Account Name** and **Account Email** + - Toggle **Dashboard Access** if you want to enable immediate access + - Click **Add** + 4. Complete the **KYC Form** with: + - **Business Details**: Company information and contact details + - **Bank Account Details**: Account number, IFSC, beneficiary name + - Click **Submit Form** + + The Linked Account is created and activated immediately. + + +> **WARN** +> +> +> **Important Notes** +> +> - **MFDs (Mutual Fund Distributors)**: Linked Accounts are automatically created with AMC details after Route access. Contact [support](https://razorpay.com/support/) for assistance. +> - **Settlement Timing**: Linked Account settlements take 2 working days, regardless of your primary settlement schedule. +> + + + + Create Linked Accounts programmatically using the [Route APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md) for automated onboarding and bulk operations. + + +### Required Information + +Provide these details when creating a Linked Account: + + + - Linked Account name + - Contact number + - Email address (required for dashboard access) + + + + - Account number + + - Account type + + - IFSC code + + + - Beneficiary name + + + + +### Account Verification via Penny Testing + +To avoid settlement failure, we will penny test Linked Accounts when added. Razorpay will transfer a nominal amount to the bank account details submitted to verify them. Transfers are allowed only on successful validation. This will be performed on the newly created Linked Accounts and the existing accounts when the bank account details are updated via the Dashboard. + +Know more about [penny testing](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/faqs.md#penny-testing). + +## Manage Linked Account Access + + +### Dashboard Access + + Grant dashboard access to allow Linked Account users to manage their own operations: + 1. Log in to the Dashboard. + 2. Select **Route** and navigate to the **Accounts**. + 3. Find the relevant Linked Account and enable **Dashboard Access**. + ![Grant Dashboard access to linked accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/allow-dashboard-access-la.jpg.md) + + The Linked Account user receives login credentials via email and can access their dedicated dashboard. + + +> **WARN** +> +> +> **Access Requirements** +> +> - While you can create a Linked Account without adding their email, you cannot grant them Dashboard access. The access can be granted or provided only after you add the email address of the Linked Account. +> ![Grant Dashboard access to linked accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-la-email.jpg.md) +> - As a Linked Account user, you cannot access the Linked Account Dashboard unless the primary account owner adds you as a team member from their Linked Account Dashboard. +> + + + + +### Refund Capabilities + + Due to government regulations, in certain cases, the Linked Accounts need to directly process refunds to customers. You can enable refunds capability while adding a new account. + + To enable refunds capability for an existing account: + + 1. Navigate to the **Accounts** tab. + 2. Turn on the **Allow Refunds** toggle against the relevant account. + ![Grant refund access to linked accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/permit-refund-la.jpg.md) + + + +### Refund Credits + + Refund Credits help the Linked Account to process customer refunds from a dedicated fund than using the unsettled balance. You can enable Refund Credits for a Linked Account by sending an email to your Razorpay account manager with these details: + + - Linked account name + - Email ID + - Balance type (Refund Credit). + + +## Export Account Data + +Download complete account information in CSV format: +- Click **Export All (CSV)** from the Accounts tab +- Includes all account details, settlement history, and configuration + +## Related Information + +- [Route Overview](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route.md) +- [Processing Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/initiate-refund.md) +- [Settlements and Reversals](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/reversals-settlements.md) +- [Profile Management](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/manage-profile.md) +- [Route APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route.md) diff --git a/llm-content/payments/route/linked-account/initiate-refund.md b/llm-content/payments/route/linked-account/initiate-refund.md new file mode 100644 index 00000000..662007f1 --- /dev/null +++ b/llm-content/payments/route/linked-account/initiate-refund.md @@ -0,0 +1,95 @@ +--- +title: Initiate Refund - Linked Account Dashboard +description: Initiate a refund from the Linked Account Dashboard. +--- + +# Initiate Refund - Linked Account Dashboard + +The Linked Account users can initiate a refund for individual transaction levels or in batches from the Linked Account Dashboard. They can also make full and partial refunds to the customers. + +## Use Refund Credits + +By default, refunds are processed using the Linked Account’s unsettled balance. However, Razorpay Route provides the option to use a Refund Credits pool to process these transactions, instead of the existing unsettled balance. + +The Linked Account holders must send an offline request to you to use [Refund Credits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md#enable-refund-credits). Upon gaining access, funds can be transferred to the Refund Credits pool through the account number that you share. + +Once enabled, only Refund Credits can be used to process refunds. The **Refund Credits** can be seen on the **Reversals** screen as shown below: + +![Refund credits on the Reversals screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/Route-Refund-Credits.jpg.md) + +You can initiate the following types of refunds from the Linked Account: [Individual Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/initiate-refund.md#individual-refunds), [Full Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/initiate-refund.md#full-refund), [Partial Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/initiate-refund.md#partial-refund) and [Batch Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/initiate-refund.md#batch-refunds). + +## Refund Checklist + +- Ensure you have sufficient nodal balance to create a refund. +- To enable Refund Credits for a Linked Account, send an email to your Razorpay Account Manager with details of the linked account, email id and balance type (refund credits). +- To allow refund capability for an existing account, go to the **Accounts** tab and enable the **Allow Refunds** option against the relevant account. + + +![Refund checklist page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route_allow_refund.jpg.md) + +## Initiate Refund + +See how you can initiate the following types of refunds from your Dashboard. + +### Individual Refund + +Watch this video to see how to initiate a refund for an individual transaction. + +[Video: https://www.youtube.com/embed/cAiogcxYWj4] + +To issue an individual refund: + +1. Log in to the Dashboard and click **Route** under **PAYMENT PRODUCTS**. +2. Go to the **Transfers** tab. +3. Select the **Refund to Customer** option. +4. Enter the refund amount and add a description in the **Notes** field. + +### Full Refund + +To initiate a full refund: +1. Enter the full transaction amount. +2. Click **Create Full Refund**. + +The screen appears as shown below: + +![Full refund page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/Route-Full-Refund.jpg.md) + +### Partial Refund + +To initiate a partial refund: +1. Enter an amount lower than the total transaction value. +2. Click **Create Partial Refund**. + +The screen appears as shown below: + +![Partial refund page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/Route-Partial-Refund.jpg.md) + +### Batch Refund + +Using Batch refund, you can process a large volume of refund from the Linked Accounts Dashboard. + +To initiate batch refund: +1. Download the Batch Refund Format - Click the download button to obtain the .csv format, wherein the transaction details can be entered. +2. Enter the necessary information in the file. +3. Upload the Batch Refund Format - After entering all the necessary details, upload the file. + +Once uploaded, if the funds are sufficient, the batch file is processed. + +> **WARN** +> +> +> **Watch Out!** +> +> While performing batch refund, the Linked Account user must ensure that the refund amount is entered in paise and not in INR. +> + +#### Process Batch Refund + +After the batch refund is processed, you can download the output file to view the reversals. In case some of the batch records were not processed, an error is displayed for such records. You may then attempt a repeat refund after handling the errors. + +### Related Information +- [Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route.md) +- [Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md) +- [Reversals and Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/reversals-settlements.md) +- [Manage Profile and Team](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/manage-profile.md) diff --git a/llm-content/payments/route/linked-account/manage-profile.md b/llm-content/payments/route/linked-account/manage-profile.md new file mode 100644 index 00000000..a3435ca3 --- /dev/null +++ b/llm-content/payments/route/linked-account/manage-profile.md @@ -0,0 +1,34 @@ +--- +title: Manage Profile and Team - Linked Account Dashboard +description: Manage your Linked Account profile and add team members from the Linked Account Dashboard. +--- + +# Manage Profile and Team - Linked Account Dashboard + +Linked Account users can access [Profile](#manage-profile) and manage their [Team](#manage-team). + +## Manage Profile + +You can view the business details of the Linked Account under the **Profile** tab. + +To view and manage profile: +1. Log in to the Linked Account Dashboard and click **Account Settings**. The **Profile** section appears as shown below: + ![Profile section under account settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/la-profile.jpg.md) +2. You can perform the following actions: Change **Password** and Change **Display Name** + +## Manage Team + +The admin of the Linked Account can invite other team members to view the **Dashboard** by entering the email addresses. These team members have view access except access to **Bank Details** and **Manage Team**. + +To invite team members: +1. Log in to the Linked Account Dashboard and click **Account Settings** menu from the left pane. +2. Go to **Manage Team** tab. +3. Enter the email address of the member you want to invite and click **Send Invitation**. + +An email is sent to the member. They should accept the invitation from their **Profile** section. + +### Related Information +- [Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route.md) +- [Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md) +- [Initiate Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/initiate-refund.md) +- [Reversals and Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/reversals-settlements.md) diff --git a/llm-content/payments/route/linked-account/reversals-settlements.md b/llm-content/payments/route/linked-account/reversals-settlements.md new file mode 100644 index 00000000..dc9d0a09 --- /dev/null +++ b/llm-content/payments/route/linked-account/reversals-settlements.md @@ -0,0 +1,46 @@ +--- +title: Reversals and Settlements - Linked Account Dashboard +description: View Reversals and Settlements made from the Linked Account Dashboard. +--- + +# Reversals and Settlements - Linked Account Dashboard + +The Linked Account users can view the reversals and settlements from the Linked Account Dashboard. + +## View Reversals + +Reversal is the process of moving the transferred funds from the Linked Account to your account. You (not sellers) can initiate the reversals. + +To view reversals: +1. Log in to the Linked Account Dashboard. +2. Click the **Reversals** from the left pane and then click the relevant **Reversal Id**. + +The following details are displayed: + +Field | Description +--- +Amount | The amount refunded to the customer +--- +Initiated By | Name of the Link Account holder +--- +Customer Refund ID | Refund ID of the customer +--- +Created At | Date and time at which the refund is initiated +--- +Source ID | Transfer ID of the refund + +Click the **Source ID** to view details such as Parent Account name, the amount refunded, type of reversal (Full or Partial) and settlement type. + +## View Settlements + +All the payments that are settled to the Linked Account can be viewed under settlements. + +To view settlements: +1. Log in to the Linked Account Dashboard. +2. Click the **Settlements** from the left pane and then click the relevant **Settlement Id**. + +### Related Information +- [Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route.md) +- [Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md) +- [Initiate Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/initiate-refund.md) +- [Manage Profile and Team](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/manage-profile.md) diff --git a/llm-content/payments/route/other-features.md b/llm-content/payments/route/other-features.md new file mode 100644 index 00000000..5af9f906 --- /dev/null +++ b/llm-content/payments/route/other-features.md @@ -0,0 +1,22 @@ +--- +title: Other Features +--- + +# Other Features + +## Linked Account API Access + +You can access the various Razorpay APIs as a linked account. This allows +you to, for example, fetch a list of all the payments received by a linked +account using the `GET \payments` API. To achieve this, you need to send the +linked account ID in the `X-Razorpay-Account` API request header, as shown in +the cURL example given below: + +```curl +curl https://api.razorpay.com/v1/payments \ + -u {KEY}:{SECRET} \ + -H "X-Razorpay-Account: acc_a1b2c3d4e5f6g7" +``` + +The request given above will fetch the list of payments for account_id - +`acc_a1b2c3d4e5f6g7` diff --git a/llm-content/payments/route/plugins/woocommerce.md b/llm-content/payments/route/plugins/woocommerce.md new file mode 100644 index 00000000..f501f0ef --- /dev/null +++ b/llm-content/payments/route/plugins/woocommerce.md @@ -0,0 +1,57 @@ +--- +title: Route | WooCommerce +heading: Razorpay Route for WooCommerce +description: Transfer funds to Linked Accounts from your WooCommerce-enabled WordPress site using Razorpay Route. +--- + +# Razorpay Route for WooCommerce + +Use Razorpay Route on your WooCommerce website to split payments received using the Razorpay Payment Gateway and transfer the funds to Linked Accounts. Razorpy Route is available in the [Razorpay Payment Gateway for WooCommerce plugin](https://woocommerce.com/products/razorpay-for-woocommerce/?quid=57ce5a37ef6413695523cb3fd68f1c1b). + +## Plugin Dependencies + +You must have the following installed for the plugin to work: + +Platform/Plugin/Language | Version +--- +WordPress | 3.9.2 or higher +--- +[WooCommerce Plugin for WordPress](https://wordpress.org/plugins/woocommerce/) | 2.4 or higher +--- +[Razorpay WooCommerce Plugin](https://wordpress.org/plugins/woo-razorpay/) | 2.8.0 and above +--- + +## Prerequisites + +- Integrate your [WooCommerce website](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce.md) with the Razorpay Payment Gateway plugin. +- Create [Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md#create-linked-accounts) to split the received payments. +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. + +## How it Works + +1. You enable the Route Module in the Razorpay Payment Gateway plugin for WooCommerce. +2. You define the transfer details, such as the Linked Account number and amount, while creating a product. + +> **INFO** +> +> +> **Handy Tips** +> +> The Route Module is a product-specific feature. You can exclude this module for the required product by not defining the transfer details while creating a product. +> + +3. The transfer will be initiated automatically after the customer makes the payment. + +## Integration Steps + +Follow these steps to integrate Razorpay Route on your WooCommerce-enabled WordPress website: + + - **1. Build Integration**: Integrate Route Using WooCommerce plugin. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +## Support + +If you have any queries, raise a ticket on the [Razorpay Support Portal](https://razorpay.com/support/). diff --git a/llm-content/payments/route/plugins/woocommerce/create-reversals.md b/llm-content/payments/route/plugins/woocommerce/create-reversals.md new file mode 100644 index 00000000..11d3d932 --- /dev/null +++ b/llm-content/payments/route/plugins/woocommerce/create-reversals.md @@ -0,0 +1,21 @@ +--- +title: Create Reversals +description: Create reversals from and view payments, transfers and reversal details on the WordPress Admin Dashboard. +--- + +# Create Reversals + +Reverse transfers from the WordPress Admin Dashboard. You can also view payments, transfers and reversal details. + +## Create Reversals From WordPress Admin Dashboard + +To create a reversal: + +1. Log in to the **WordPress Admin Dashboard** and navigate to **Razorpay Route woocommerce** → **Transfers**. +2. Click the required **Transfer Id** to create a reversal. +3. Click **Create Reversal**. + ![](/docs/assets/images/woocommerce-route-reversals.jpg) +4. Enter the **Reversal Amount** and click **Create Reversal**. + ![](/docs/assets/images/woocommerce-route-reversals-create.jpg) + +The amount is reversed. You can see the details in the **Reversals** tab. diff --git a/llm-content/payments/route/plugins/woocommerce/integration-steps.md b/llm-content/payments/route/plugins/woocommerce/integration-steps.md new file mode 100644 index 00000000..73fe223e --- /dev/null +++ b/llm-content/payments/route/plugins/woocommerce/integration-steps.md @@ -0,0 +1,321 @@ +--- +title: Integration Steps | Razorpay Route WooCommerce Plugin +heading: Integration Steps +description: A step-by-step guide to integrate Razorpay Route using the Razorpay Payment Gateway Plugin with your WooCommerce-enabled WordPress website +--- + +# Integration Steps + +Follow these steps to integrate Razorpay Route on your WooCommerce-enabled WordPress website: + + - **1. Build Integration**: Integrate Route Using WooCommerce plugin. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +## 1. Build Integration + +Follow the integration steps based on how you want to transfer funds to the Linked Accounts using Razorpay Route: + + +### Transfers Via Orders or Payments + + Given below are the steps to transfers funds via orders or payments through the WooCommerce Payment Gateway plugin: + + + + 1.1 Enable Route Module On Your WordPress Site + + + To enable the Route Module: + + 1. Log in to the **WordPress Admin Dashboard** and navigate to **WooCommerce** → **Settings**. + ![](/docs/assets/images/woocommerce-route-settings.jpg) + 2. Go to **Payments** and click **Razorpay – Credit Card/Debit Card/NetBanking**. + ![](/docs/assets/images/woocommerce-settings-payments.jpg) + 3. Select **Enable route module?** and click **Save changes**. + ![](/docs/assets/images/woocommerce-route-enable.jpg) + + + + + + + +### 1.2 Transfer via Orders or Payments (Automatic Transfers) On Your WordPress Site + + You can initiate a automatic transfer via orders or payments by providing the transfer details while creating a product. A transfer will be automatically initiated after the customer makes the payment. + + To provide the transfer details while creating a product: + + 1. Log in to the **WordPress Admin Dashboard** and navigate to **Products** → **Add New**. + 2. Click **Razorpay Route** in the **Product data** section. + ![](/docs/assets/images/woocommerce-route-transfers.jpg) + 3. Select any of the following options. You can transfer the funds to linked accounts from orders or payments. + - **Transfer from Order**: This will initiate a transfer at the time of order creation. + - **Transfer from Payment**: This will initiate a transfer after the customer makes the payment. + 4. Provide the **Linked Account Number** and the transfer **Amount**. + 5. Select your required option from the **Hold Settlement:** drop-down menu. + 6. You can add multiple transfer details by using the **Add Field** button. + ![](/docs/assets/images/woocommerce-route-transfers-details.jpg) + + + + +### 1.3 Enable Webhooks on the Dashboard + + These 3 webhooks are auto-configured for the Route Module: + + - `transfer.processed` + - `settlement.processed` + - `transfer.failed` + + [Enable Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md#set-up-webhooks) to receive notifications for these events. + + + +### 1.4 Create Manual Trasfers from Payments + + You can manually create a transfer after the customer makes the payment. + + To create a transfer manually from the received payment: + + 1. Log in to the **WordPress Admin Dashboard** and navigate to **Razorpay Route woocommerce** → **Payments**. + 2. Click the required **Payment Id** to create a transfer. + ![](/docs/assets/images/woocommerce-route-payment-transfer.jpg) + 3. Click **Create Transfer** and provide the following details: + - **Transfer Amount**: Amount to be transferred. The transfer amount cannot be greater than the payment/order amount. + - **Linked Account Number**: ID of the Linked Account to which the amount should be transfered. + - **Settlement schedule**: Define the settlement schedule. + ![](/docs/assets/images/woocommerce-route-manual-transfer.jpg) + 4. Click **Create** to create a transfer. + ![](/docs/assets/images/woocommerce-route-payment-transfer-create.jpg) + + +> **INFO** +> +> +> **Handy Tips** +> +> The transfer amount will be settled into the Linked Account depending on the defined schedule. +> + + + + + + + +### 1.5 Schedule Settlements + + You can schedule a settlement of the initiated transfer from the WordPress Admin Dashboard. + + +> **WARN** +> +> +> **Watch Out!** +> +> - You can schedule a settlement only after the customer makes the payment and the transfer is initiated. +> - You cannot schedule a settlement of a transfer with the **Settlement Status** as **Settled**. +> + + To schedule a settlement: + 1. Log in to the **WordPress Admin Dashboard** and navigate to **Razorpay Route woocommerce**. + 2. Click the **Transfer Id** to schedule a settlement. + 3. Click **Change** under **Transfer Details**. + ![](/docs/assets/images/woocommerce-route-settlement-change.jpg) + 4. Select either of the following **Settlement Schedule** options: + - **Schedule settlement on**: Select this to schedule the transfer to a later date using the calendar. + - **Put on hold**: Use this to defer the transfer until specified otherwise. + - **Settle in next slot**: Use this to settle the payment in the next settlement slot. + ![](/docs/assets/images/woocommerce-route-settlement-schedule.jpg) + 5. Click **Save**. + + + + +### 1.6 Verify Payment Status + + + + + + ##### Verify Payment Status from the WordPress Admin Dashboard + + To verify the payment status: + + 1. Log in to the **WordPress Admin Dashboard** and navigate to **Razorpay Route woocommerce** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. Know more about various [payment states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md#payment-life-cycle). + ![Check if the payment id is generated and the status is captured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/woocommerce-route-payment-status.jpg.md) + + + + + + + + +### Direct Transfers + + Given below are the steps to directly transfer funds to Linked Accounts from a WooCommerce-based website using Razorpay Route. + + to get this feature activated on your Razorpay account. + + + + 1.1 Enable Route Module On WordPress Site + + + To enable Route Module: + + 1. Log in to the **WordPress Admin Dashboard** and navigate to **WooCommerce** → **Settings**. + ![](/docs/assets/images/woocommerce-route-settings.jpg) + 2. Go to **Payments** and click **Razorpay – Credit Card/Debit Card/NetBanking**. + ![](/docs/assets/images/woocommerce-settings-payments.jpg) + 3. Enable the **Route Module** on the **Razorpay Payment Gateway** page and click **Save Changes**. + ![](/docs/assets/images/woocommerce-route-enable.jpg) + + + + +### 1.2 Create a Direct Transfer on WordPress Site + + You can create a Direct Transfer from the WordPress Admin Dashboard. The transfer amount will be deducted from your account. + + To create Direct Transfers: + + 1. Log in to the **WordPress Admin Dashboard** and click **Razorpay Route woocommerce**. + 2. Click **Create Direct Transfer**. + ![](/docs/assets/images/woocommerce-route-direct-transfer.jpg) + 3. Enter the **Transfer Amount** and **Linked Account Number** to create a Transfer. + 4. Click **Create**. + ![](/docs/assets/images/woocommerce-route-direct-transfer2.jpg) + + The transfer is successful. You can see the details in the **Transfers** tab. + + ![](/docs/assets/images/woocommerce-route-direct-transfer-details.jpg) + + + + +### 1.3 Enable Webhooks on Dashboard + + + These 3 webhooks are auto-configured for the Route Module: + - `transfer.processed` + - `settlement.processed` + - `transfer.failed` + + [Enable Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md#set-up-webhooks) to receive notifications for these events. + + + + + + +## 2. Test Integration + +After completing the integration, you can simulate a test payment transfer. After the test is successful, you can start accepting real-time payments and transferring them to linked accounts. + +![](/docs/assets/images/woocommerce-route-test-integration.jpg) + +> **WARN** +> +> +> **Watch Out!** +> +> You can make test payments using one of the payment methods configured at the Checkout. +> - No money is deducted from the customer's account as this is a simulated transaction. +> - Ensure you have entered [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) in the Checkout code. +> + + +### 2.1 UPI/Test Cards + + #### UPI IDs + + You can enter one of the following UPI IDs: + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + #### Test Cards + You can use one of the test cards to make transactions in the test mode. Use any valid expiration date in the future and any random CVV to create a successful payment. + + + +Type | Card Network | Card Type | Card Number | CVV & Expiry Date +--- +Domestic | Visa | Credit Card | 4718 6091 0820 4366 | Use a random CVV and any future date ^^^ +--- +International | Mastercard | Credit Card | 5104 0155 5555 5558 | +--- +International | Mastercard | Debit Card | 5104 0600 0000 0008 | + + + + +### 2.2 View Test Transfer Details + + You can check the test transfer details on the **WordPress Admin Dashboard** after the transaction is successful. + + To check the test transfer: + + 1. Log in to the **WordPress Admin Dashboard** and click **Razorpay Route woocommerce** from the left menu. The list of recent transfers is displayed. + 2. Click the recent **Transfer Id** to view the details. + ![](/docs/assets/images/woocommerce-route-test-transfers.jpg) + + +## 3. Go-Live Checklist + +You can perform an end-to-end simulation of funds flow in the Test Mode. Once you are confident that the integration is working as expected, switch to Live Mode to accept live payments and transfer them to Linked Accounts. + + +### 3.1 Create Linked Accounts + + You should create Linked Accounts in Live Mode to transfer live payments. Watch this video to create a Linked Account in Live Mode. + +[Video: https://www.youtube.com/embed/aLLI9UwNMl0] + + +> **WARN** +> +> +> **Watch Out!** +> +> For Mutual Funds Distributors (MFDs), Linked Accounts with their Asset Management Company (AMC) details are automatically created after they get access to the Route. MFDs do not need to create any Linked Accounts from the Dashboard. Please get in touch with our [support team](https://razorpay.com/support/) for any help on creating Linked Accounts. +> + + To create a Linked Account: + + + + + You have successfully created Linked Accounts. + + + +### 3.2 Generate an API Key in Live Mode + + Watch this video to generate an API Key in Live Mode. + + +[Video: https://www.youtube.com/embed/30REpNtYSak] + + To generate an API Key in Live Mode: + + + + + + You have successfully generated your API keys in Live Mode. Use this pair of `Key_ID` and `Key_Secret` to accept payments from your customers and route them to the involved third parties using [Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route.md). diff --git a/llm-content/payments/route/pricing.md b/llm-content/payments/route/pricing.md new file mode 100644 index 00000000..436785d0 --- /dev/null +++ b/llm-content/payments/route/pricing.md @@ -0,0 +1,25 @@ +--- +title: Pricing Model +--- + +# Pricing Model + +Apart from the regular pricing that is applicable for Razorpay payments +(refer our Pricing plan [here](https://razorpay.com/pricing/)), the following +charge applies for Razorpay Route: + +> **INFO** +> +> +> **Note** +> +> These prices are exclusive of GST. +> + +## Charge per Transfer + +A fee of 0.25% is charged per transfer to a linked account. + +For example, on a transfer of ₹100 made to a linked account, a +0.25% charge (₹0.25) is applicable. Hence, ₹100.25 will be debited from +the merchant, and the linked account will be credited with an amount of ₹100. diff --git a/llm-content/payments/route/refund.md b/llm-content/payments/route/refund.md new file mode 100644 index 00000000..160a7240 --- /dev/null +++ b/llm-content/payments/route/refund.md @@ -0,0 +1,31 @@ +--- +title: Refund to Customers +description: Issue a refund to the customer from the Razorpay Dashboard. +--- + +# Refund to Customers + +Customers may cancel the order sometimes, and you may have to refund the amount. In such cases, you can initiate a refund to the customers from the Dashboard. You can issue a full or a partial refund to customers. + +## Issue a Refund + +Watch this video to see how to issue refunds to your customers. + +[Video: https://www.youtube.com/embed/_Ap2gpk5EDs] + +To issue a refund: +1. Log in to the Dashboard and click **Route** under **PAYMENT PRODUCTS**. +2. Click the **Payments** tab and then click the relevant **Payment ID**. +3. In the **Payment details** pane, click **Issue Refund**. + 1. For a full refund, enter the total transaction amount. Enter comments if required, and then click **Issue Full Refund**. + 2. For a partial refund, enter the amount. Enter comments if required, and then click **Issue Partial Refund**. +4. The refund transfer happens from your primary account. Hence, you must create a corresponding reversal for the Linked Account. This can be done manually, or you may use the **Reverse all Route Transfers as well** option for automatic reversal. +5. A dialog box is displayed. Click **Yes, Refund**. + +![Issue Refund confirmation dialog](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-make-partial-refund.jpg.md) + +### Related Information +- [Transfer Funds to Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-funds-to-linked-accounts.md) +- [Transfers and Related Fees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-fees-example.md) +- [Schedule Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/schedule-settlement.md) +- [Payment Reversals](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/reversal.md) diff --git a/llm-content/payments/route/reversal.md b/llm-content/payments/route/reversal.md new file mode 100644 index 00000000..b9c1b02e --- /dev/null +++ b/llm-content/payments/route/reversal.md @@ -0,0 +1,47 @@ +--- +title: Payment Reversals +description: Initiate a partial and full payment reversal to your business account. +--- + +# Payment Reversals + +Initiate a reversal operation of the funds transferred to your Linked Account using your Dashboard. + +- You can initiate a full or partial reversal. +- You can initiate a reversal even if the funds are settled to a Linked Account, as long as there is a floating balance available. +- For all refund requests made by the end customer, the fund transfer happens from the primary account or Linked Account. Hence, you need to initiate a reversal of funds from your Linked Accounts and initiate the customer's refund. You can also use the automated method of reversing funds before a refund. Upon enabling the `Reverse All` option on a payment refund request, we will automatically reverse all transfers made on the payment before refunding the payment to the customer. + +![Payments reversal flow description](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route_refund.jpg.md) + +In certain cases, Linked Accounts must directly refund the amount to the customers. To handle this, you can [enable customer refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md#enable-refunds-capability) for linked accounts from your Dashboard. The Linked Account users can [issue refund to the customer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/initiate-refund.md) from the Linked Account Dashboard. + +## Reversal Checklist + +- Ensure the Linked Account has sufficient nodal balance to create a reversal. +- Pass the `reverse_all` parameter for the reversal from all the linked accounts where the transfer has been made. +- The `reverse_all` parameter cannot be applied on partial refunds. + +## Create a Reversal + +Watch this video to see how to create a reversal. + +[Video: https://www.youtube.com/embed/juSVcD0Hmk4] + +To initiate a reversal: + +1. Log in to the Dashboard and click **Route** under **PAYMENT PRODUCTS**. +2. Click the **Transfers** tab and then click the relevant **Transfer ID**. +3. In the **Transfers details** pane, click **Create reversal**. + 1. For a full reversal, enter the total transfer amount. Add internal notes and share it with Linked Account if required. Click **Create Full Reversal**. + 2. You can also make a partial reversal. Enter the amount, add notes if required and click **Issue Partial Refund**. +4. A dialog box is displayed. Click **Yes, Reverse**. + +You can view the reversal details under the **Reversals** tab. + +![Create reversal confirmation dialog](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-make-reversal.jpg.md) + +### Related Information +- [Transfer Funds to Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-funds-to-linked-accounts.md) +- [Transfers and Related Fees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-fees-example.md) +- [Schedule Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/schedule-settlement.md) +- [Refund to Customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/refund.md) diff --git a/llm-content/payments/route/schedule-settlement.md b/llm-content/payments/route/schedule-settlement.md new file mode 100644 index 00000000..103050c6 --- /dev/null +++ b/llm-content/payments/route/schedule-settlement.md @@ -0,0 +1,61 @@ +--- +title: Schedule Settlements +description: Schedule settlements for your Linked Accounts. +--- + +# Schedule Settlements + +You can assign a settlement schedule for your linked accounts and update it anytime. By default, every new Linked Account is created with the same settlement schedule assigned to your main account. + +**Example** + +If your main Razorpay account has a T+2 schedule, all Linked Accounts you create will also have a T+2 schedule by default. + +> **INFO** +> +> +> **Settlement Schedule for Linked Accounts** +> +> - Reach out to our [Support team](https://razorpay.com/support/#request) to set or update the settlement schedule of your Linked Accounts. +> - Settlement schedule for the Linked Accounts can only exceed or be equal to the settlement schedule of the main account. For example, if the main account settlement schedule is set to T+2, the Linked Account's settlement schedule should not be lesser than T+2. +> + +## Settlement Settings for Linked Accounts + +In addition to the account-level schedule explained above, you can also define the settlement of the individual transfer using the following options: + + + By default, all payment transfers are settled according to the settlement schedule defined for the Linked Account. You can choose to defer settlements for a transfer indefinitely by putting it on hold. In this case, the settlement for the transfer happens once you allow it. + + + You can set a time until which the settlement for the transfer should defer. Once this time has elapsed, Razorpay settles the funds to the Linked Account on the next business day. + + For example, if you have set an `on_hold_until.` timestamp corresponding to 7:00 PM on 23/03/2021, we will settle the amount to the Linked Account on 24/03/2021. + + You can modify the above mentioned transfer settlement options via the API or Dashboard. On enabling the settlement, the initially defined settlement schedule will apply. + + **Example** + A Linked Account follows a T+2 cycle settlement schedule. + + - If a transfer is created with `settle = false` and is set to `true` after 10 days, the settlement for that transfer happens immediately (during bank business hours). + - If the transfer settlement is allowed on T+1, the settlement happens only on T+2. + + +### Settlement Status + +The following table lists settlement statuses and their description: + +Status | Description +--- +`pending` | This status indicates that the transfer is processed and the settlement is pending. You can create the reversal if required. +--- +`on_hold` | If you have used the `on_hold` parameter to hold settlements for the transfer and do not pass the `on_hold_until` parameter to define till when it should be `on_hold`, the transfer will be on hold indefinitely. We will mark such transfers as `on_hold.` +--- +`settled` | When the transfer is settled to the Linked Account. +--- + +### Related Information +- [Transfer Funds to Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-funds-to-linked-accounts.md) +- [Transfers and Related Fees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-fees-example.md) +- [Payment Reversals](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/reversal.md) +- [Refund to Customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/refund.md) diff --git a/llm-content/payments/route/subscribe-to-webhooks.md b/llm-content/payments/route/subscribe-to-webhooks.md new file mode 100644 index 00000000..4a771675 --- /dev/null +++ b/llm-content/payments/route/subscribe-to-webhooks.md @@ -0,0 +1,28 @@ +--- +title: Route | Subscribe to Webhooks +heading: Subscribe to Webhooks +description: Subscribe to various Webhook events related to Razorpay Route to receive instant notifications. +--- + +# Subscribe to Webhooks + +To subscribe to webhook events: + +1. Log in to the Dashboard. +2. Navigate to **Accounts & Settings** → **Webhooks** to subscribe to any of the events mentioned in the following section. + +## Webhook Events and Descriptions + +Webhook Event | Description +--- +`transfer.processed` | Triggered when a transfer made to a Linked Account is processed. +--- +`settlement.processed` | Triggered when a transfer made to a Linked Account is settled with the parent merchant. (Available only for [Razorpay Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route.md)). +--- +`transfers.failed` | Triggered when a transfer made to a Linked Account is failed. + +Know more about [ Webhooks ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) and check the [sample payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/route.md). + +### Related Information + +[Route APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/apis.md) diff --git a/llm-content/payments/route/transfer-fees-example.md b/llm-content/payments/route/transfer-fees-example.md new file mode 100644 index 00000000..4b1970da --- /dev/null +++ b/llm-content/payments/route/transfer-fees-example.md @@ -0,0 +1,103 @@ +--- +title: Transfers and Related Fees Example +description: Transfers amount and related fee calculations for payments made to Linked Accounts using Route. +--- + +# Transfers and Related Fees Example + +Following are examples of transfers to Linked Accounts and how Payment Gateway and transfer fees apply to the transactions. + +### Transfer to Single Linked Account + +In this example, you are making a transfer to a single Linked Account. Following are the details: + +- **Payment Amount** = ₹1,000.00 +- **Payment Pricing Plan** = 2% +- **Transfer Fees** = 0.25% +- **Your Commission** = ₹100.00 +- **Amount Transferred to Linked Account** = ₹900.00 +- **GST Levied** = 18% + +Transaction Details | Your Account Balance (₹) +--- +**Payment received from Customer** | 1,000.00 +--- +**Gateway Fee Charged on Capture** + + Payment Amount * Pricing Plan * GST + + 1000 * 2/100 * (1+(18/100))| -23.60 + +--- +**The Account Balance after deduction** | **976.40** +--- +**Transfer Fee Charged** + +Transfer Amount * Pricing Plan * GST + +900 * 0.25/100 * (1+(18/100)) | -2.66 + +--- +**Amount Transferred to Linked Account** | -900.00 + +--- +**Final Account Balance** | **73.74** + +### Transfer to Two Linked Accounts + +In this example, you are making transfers to two Linked Accounts. Following are the details: + +- **Payment Amount** = ₹1,000.00 +- **Payment Pricing Plan** = 2% +- **Transfer Fees** = 0.25% +- **Your Commission** = ₹100.00 +- **Amount Transferred to Linked Account 1** = ₹300.00 +- **Amount Transferred to Linked Account 2** = ₹700.00 +- **GST Levied** = 18% + +Transaction Details | Your Account Balance (₹) +--- +**Payment received from Customer** | 1,000.00 +--- +**Gateway Fee Charged on Capture** + + Payment Amount * Pricing Plan * GST + + 1000 * 2/100 * (1+(18/100))| -23.60 + +--- +**Account Balance after Deduction** | **976.40** +--- +**Linked Account 1 Transfer Fee Charged** + +Transfer Amount * Pricing Plan * GST + +300 * 0.25/100 * (1+(18/100)) | -0.89 + +--- +**Amount Transferred to Linked Account 1** | -300.00 + +--- +**Net Account Balance** | **675.51** +--- +**Linked Account 2 Transfer Fee Charged** + +Transfer Amount * Pricing Plan * GST + +700 * 0.25/100 * (1+(18/100)) | -2.07 + +--- +**Amount Transferred to Linked Account 2** | -700.00 + +--- +**Final Account Balance** | **-26.56** + + + +The transfer happens **only if** you have an account balance equal to or greater than ₹26.56. + +### Related Information +- [Transfer Funds to Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-funds-to-linked-accounts.md) +- [Schedule Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/schedule-settlement.md) +- [Payment Reversals](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/reversal.md) +- [Refund to Customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/refund.md) diff --git a/llm-content/payments/route/transfer-funds-to-linked-accounts.md b/llm-content/payments/route/transfer-funds-to-linked-accounts.md new file mode 100644 index 00000000..7496edba --- /dev/null +++ b/llm-content/payments/route/transfer-funds-to-linked-accounts.md @@ -0,0 +1,155 @@ +--- +title: Transfer Funds to Linked Accounts +description: Transfer funds via Orders, Payments or directly to your Linked Accounts. +--- + +# Transfer Funds to Linked Accounts + +You can transfer funds to your Linked Accounts using the following methods: + + - **Orders**: Transfer funds to Linked Accounts at the time of order creation. + + - **Payments**: Transfer funds to Linked Accounts from the payment received from a customer. + +- **Direct Transfer**: Transfer funds to Linked Accounts directly from your account balance using Direct Transfers. + +#### Prerequisites + +1. Create Linked Accounts. **Linked Accounts have a cooling period of 24 hours after which you can initiate transfers.** +2. Provide [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md) access to the Linked Account to ensure transparency between the two parties, such as: + - Linked Account holders can also download reports for further processing and reconciliation. + - Linked Account holders can view all transactions reflected on one single dashboard. +3. Ensure the Direct Transfer feature is enabled for your account. Contact our [support team](https://razorpay.com/support/#request) for more information. + +## Transfer Funds to Linked Account via Orders + +The transfers can be set up at the time of order creation. After the payment is captured and the order is paid, the transfer is automatically created and settled to the respective Linked Accounts. + +This eliminates the extra step of triggering the [Direct Transfers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/direct-transfers.md) or [Transfers via Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-transfers-payments.md). + +> **WARN** +> +> +> **Watch Out!** +> +> The Transfers set up during order creation can only be done using APIs. +> + +To initiate transfers while creating orders: +1. Create an Order using the [Transfer via Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-transfers-orders.md). +2. [Capture the Payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md#capture-payments). +3. Set up the [ webhook event `transfer.processed`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md). + +> **WARN** +> +> +> **Watch Out!** +> +> - You cannot create transfer on an order which has `partial_payment` parameter enabled. Ensure that this parameter is set to `false`. +> - You cannot create transfers on an order for international currencies. This feature is available for INR currency only. +> - If a **Transfer via Order** initiated by you fails, we will retry this transfer starting from the next day on consecutive days. There will be a maximum of 3 retries. +> + +## Transfers Funds to Linked Accounts via Payments + +You can initiate a transfer from a payment received from a customer. This can be done from the Dashboard or using the [Create Transfers from Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-transfers-payments.md). + +### Transfers Funds to Linked Accounts via Payments Using Dashboard + +**Checklist for Dashboard Operation** + +- The currency of the payment should be INR. +- The payment through which you want to make a transfer should be in the `captured` state. +- The amount should not exceed the initial payment amount. +- The amount you want to transfer to a Linked Account is less than the initial amount. + + + +> **WARN** +> +> +> **Watch Out!** +> +> You must subtract fees and tax to calculate the amount that is to be allowed to transfer. +> + +Watch this video to see how to transfer funds to a Linked Account from the payment received from the customer. + +[Video: https://www.youtube.com/embed/r62VCFALyOk?si=t832v-6iYzuJZrp7] + +### To initiate a transfer via payment from the Dashboard: + +1. Log in to the Dashboard and click **Route** under **PAYMENT PRODUCTS**. +2. Under the **Payments** tab, click the relevant **Payment ID**. +3. On the Payment details pane, + 1. Select the Linked Account to which you want to transfer payment. + 2. Enter the billing amount. It can be a full or partial transfer. + 3. Select either of the following **Settlement Schedule** option: + 1. **Settle Now**: Use this to settle the payment in the next settlement slot. If your schedule is T+3, the transfer will happen accordingly. + 2. **Schedule Settlement On**: Select this to schedule the transfer to a later date using the calendar. + 3. **Put on Hold**: Use this to defer the transfer until specified otherwise. +4. Add internal notes relevant to the transfer if any. You can choose to share the note with your Linked Account. +5. Click **Create Transfer**. + +![Create Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-make-transfer.jpg.md) + +## Transfer Funds to Linked Accounts Via Direct Transfers + +You can transfer funds to your Linked Accounts directly from your account balance using Direct Transfers. You can make direct transfers from the Dashboard or using the [Direct Transfer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/direct-transfers.md). + +> **INFO** +> +> +> +> **Handy Tips** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your account. +> - For Dashboard operation, ensure the nodal account has sufficient balance for the amount to be transferred. +> + +Watch this video to see how to direct transfer funds to a Linked Account. + +[Video: https://www.youtube.com/embed/ZYCo4uk2I8g] + +### To initiate a direct transfer from the Dashboard: + +1. Log in to the Dashboard and click **Route** under **PAYMENT PRODUCTS**. +2. Under the **Transfers** tab, click **+Create Direct Transfer**. + ![View Direct Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-create-direct-transfer.jpg.md) +3. On the **Create Direct Transfer** pop-up page, provide the following details: + 1. **Account**: Select the Linked Account to whom the amount should be transferred. + 2. **Billing Amount**: Enter the amount to be transferred. + 3. **Settlement Schedule**: The following options are available: + 1. **Settle Now**: Settle the transfer in the next settlement cycle. + 2. **Schedule Settlement on**: Settle the amount on a scheduled date. + 3. **Put on hold**: Put the settlement on hold indefinitely. + 4. **Notes**: You can add any additional information regarding the transfer. +4. Click **Create Transfer**. + ![View Direct Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-add-transfer-details.jpg.md) + +## Transfer Status + +The following table lists transfer statuses and their description: + +Status | Description +--- +`created` | As soon as the transfer is initiated, it moves to the `created` state. Transfers via payments and direct transfers will immediately move to the `pending` state from the `created` state. However, the transfer will stay in the `created` state for transfers via orders until the order is paid. +--- +`pending` | The transfer will be in the `pending` state till the transfer is waiting to be processed. +--- +`processed` | Once the transfer is processed, the status will change from `pending` to `processed`. + You can initiate the reversal if required. +--- +`failed` | If the transfer processing fails because of errors like insufficient balance, the transfer status will change to the `failed` state. + You can proceed to create a new transfer request. +--- +`reversed` | If the complete reversal is done for the transfer, then it will be marked as `reversed`. +--- +`partially_reversed` | If the partial reversal is done on transfer, it will be marked as `partially_reversed`. +--- + +### Related Information +- [Transfers and Related Fees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-fees-example.md) +- [Schedule Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/schedule-settlement.md) +- [Payment Reversals](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/reversal.md) +- [Refund to Customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/refund.md) diff --git a/llm-content/payments/route/use-cases.md b/llm-content/payments/route/use-cases.md new file mode 100644 index 00000000..01c41df4 --- /dev/null +++ b/llm-content/payments/route/use-cases.md @@ -0,0 +1,122 @@ +--- +title: Route Use Cases +description: Discover how Razorpay Route can simplify and streamline your business's payment operations by optimising payment processing and improving customer experience. +--- + +# Route Use Cases + +Go through the use cases on how Route has helped businesses across industries transform their payment operations - Ecommerce, Healthcare, Education, Financial Services and more. + +Use Route to improve transaction success rates, reduce payment processing costs and enhance customer satisfaction. + + + + + + + + + + + + + + + + + +### Educational Technology (EdTech) + + EdTech companies use technology to enhance teaching, learning and educational processes. + + Acme provides an online platform for tutors to offer their courses and classes to students. They are using Route in their system for timely and hassle-free payment transfers. + + Here is how Route helps Acme: + + ![EdTech Use Case](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route_use_case_edtech.gif.md) + + **Step 1: Tutor Registration and Course Creation** + + Tutors sign up on the Acme platform and create their courses with the enrolment fees or subscription charges for students. + + **Step 2: Students Enrolment** + + Students enrol for courses by making payments through the Acme platform, which uses Razorpay as the underlying technology. + + **Step 3: Fee Routing and Transfer** + + This is where Razorpay Route comes into play. Route platform allows Acme to transfer the received payment into two portions: the tutor’s share and the platform’s commission or service fee. + + + +### Ecommerce + + Ecommerce (electronic commerce) industries involve buying and selling products and services online. + + Acme is a wholesale supplier, partnering with various suppliers and vendors to stock their inventory. They use Razorpay Route to simplify and automate supplier payment transfers. + + Here is how Route helps Acme: + + ![Ecommerce Use Case](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route_use_case-ecom.gif.md) + + **Step 1: Supplier Registration and Verification** + + Suppliers register with Acme and get verified. + + **Step 2: Inventory Procurement and Invoicing** + + Acme procures inventory from various suppliers to stock its wholesale stores and place purchase orders with them, specifying the quantity and pricing of the products needed. Suppliers generate and submit invoices for the supplied products to Acme. + + **Step 3: Fund Routing and Disbursement** + + Razorpay Route splits the payment amount into the supplier's payment and Acme's commission or service fee. The supplier's amount is instantly disbursed to their registered bank account or the preferred payment method through Route. + + + +### IT & Software Solutions + + These companies focus on developing, selling and delivering information technology solutions and software products to businesses and individuals. + + Acme offers quick and hassle-free loans to individuals through its digital lending platform. To ensure a seamless and efficient loan disbursement process, Acme uses Razorpay Route in its system. + + Here is how Route helps Acme: + + ![IT and Software Use Case](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route_use_case_itandsoft.gif.md) + + **Step 1: Loan Application and Approval** + + Customers apply for loans through Acme's platform by providing the necessary information and documentation. + + **Step 2: Loan Disbursement Request** + + Acme initiates a loan disbursement request for the approved loan amount through Razorpay Route. + + **Step 3: Fund Routing and Disbursement** + + Razorpay Route helps Acme to split the loan amount into multiple portions, such as the principal amount, interest and so on and transfers the loan amount to the borrower's registered bank account. + + + +### Food + + Food as a business category involves various sectors and activities related to producing, processing, distributing, and selling food products. + + Acme, a food platform, collaborates with multiple Acme outlets to serve customers. To ensure smooth and efficient payment disbursements to their outlets, Acme uses Razorpay Route in their system. + + Here is how Route helps Acme: + + ![Food Sector Use Case](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route_use_case_food.gif.md) + + **Step 1: Order Placement and Payment** + + Customers place their pizza orders through Acme's website or app and make the payment. + + **Step 2: Routing Payment** + + When the Acme outlet marks an order as complete, Acme's platform initiates a payment transfer request through Razorpay Route. The payment is automatically split into the outlet's earnings and the platform's commission or service fee. + + + +### Build Your Custom Use Case + + You can extend and use Razorpay Route in all business models where you want to automate the disbursal of funds to one or more bank accounts. You can explore Razorpay Route and find how best it can serve your unique business model. Contact our [Support team](https://razorpay.com/support/#request) for any queries. diff --git a/llm-content/payments/route/view-reports.md b/llm-content/payments/route/view-reports.md new file mode 100644 index 00000000..e434aafb --- /dev/null +++ b/llm-content/payments/route/view-reports.md @@ -0,0 +1,76 @@ +--- +title: Route | View Reports +heading: View Reports +description: Generate Razorpay Route reports for transfers, reversals and a combined report for all transactions for linked accounts. +--- + +# View Reports + +You can export reports related to all fund movements between your account and your Linked Accounts using the Dashboard and APIs. + +## Settlement Reports + +The settlement recon API generates a detailed report of all the settlements made towards your account. You can use this report to verify transactions and reconcile payments. These reports can be exported for each Linked Account. You can also generate a consolidated report containing transactions for all the Linked Accounts. + +Know more about [generating settlement reports using APIs.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/settlements.md#settlement-recon) + +## Transfers and Reversals Reports + +You can fetch reports of all transfer and reversal operations that occurred on your account. + + + Watch this video to see how to generate the Transfers report. + + + + Watch this video to see how to generate the Reversals report. + + + +### To view the transfers report: + + 1. Log in to the Dashboard and click **Reports**. + 2. Select **Transfers** from the **Select Report Type** drop-down list. + 3. Select the relevant **Period** from the **Select Period** drop-down list. The following options are available: + - **Today** + - **Yesterday** + - **Last 7 Days** + - **Last Month** + - **Daily** - Select a date. + - **Monthly** - Select a month. + - **Custom** - Select the start and end date. You can also select a time. + 4. Select the file format from the **Select Format** drop-down list. You can choose CSV, XLSX or XLS formats. + 5. Click **Generate Report** or get it emailed to your registered email address by selecting the **Email Report To** check box. + + Following is a report sample: + + ![Sample Transfer Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route_transfers.jpg.md) + + + +### To view the reversals report: + + + 1. Log in to the Dashboard and click **Reports** under **PAYMENT PRODUCTS**. + 2. Select **Reversals** from the **Select Report Type** drop-down list. + 3. Select the relevant **Period** from the **Select Period** drop-down list. The following options are available: + - **Today** + - **Yesterday** + - **Last 7 Days** + - **Last Month** + - **Daily** - Select a date. + - **Monthly** - Select a month. + - **Custom** - Select a start and end date. You can also select a time. + 4. Select the file format from **Select Format** drop-down list. You can choose CSV, XLSX or XLS formats. + 5. Click **Generate Report** or get it emailed to your registered email address by selecting the **Email Report To** check box. + + Following is a report sample: + + ![Sample Reversal Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route_reversals.jpg.md) + + +### Related Information +- [Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route.md) +- [Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md) +- [Transfer Funds to Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-funds-to-linked-accounts.md) +- [Initiate Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account/initiate-refund.md) diff --git a/llm-content/payments/server-integration.md b/llm-content/payments/server-integration.md new file mode 100644 index 00000000..8d8284ec --- /dev/null +++ b/llm-content/payments/server-integration.md @@ -0,0 +1,73 @@ +--- +title: About Server Integrations +description: Integrate the Razorpay Payment Gateway using our server SDKs available in multiple languages. +--- + +# About Server Integrations + +By using Razorpay Payment Gateway, you can integrate your server using the below listed languages: + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + + + - **Integrate**: + + + - **GitHub Repo**: + + + + +Know more about [how server integration works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md). After you integrate successfully, you can accept payments using any of the supported [Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md). diff --git a/llm-content/payments/server-integration/dot-net.md b/llm-content/payments/server-integration/dot-net.md new file mode 100644 index 00000000..225b6570 --- /dev/null +++ b/llm-content/payments/server-integration/dot-net.md @@ -0,0 +1,101 @@ +--- +title: Prerequisites | Razorpay .NET SDK +heading: Prerequisites +description: Check the prerequisites before you integrate with Razorpay .NET server-side SDK. +--- + +# Prerequisites + +- **.NET Changelog**: Discover new features, updates and deprecations related to the Razorpay .NET SDK (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about Razorpay .NET SDK. + +Install the Razorpay .NET SDK and integrate it with your .NET-based website to accept payments, initiate refunds and do much more. + +## Dependencies + +You must use .NET v4.5 or higher with TLS version 1.2. Using it with a lower .NET version will lead to [ errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/dot-net/troubleshooting-faqs.md). Know more about the [latest .NET versions](https://versionsof.net/framework/). + +## .NET Client API + +The .NET Client API follows the below practices: + +- Namespaced under `Razorpay.Api`. +- The .NET client throws exceptions instead of returning errors. +- Options are passed as a Dictionary instead of multiple arguments, wherever possible. +- All requests and responses are communicated over JSON. + +## Installation + +Install Razorpay using either: + + + To install the SDK using NuGet Package Manager: + 1. [Download the latest source code zip file](https://github.com/razorpay/razorpay-dot-net/releases) from the releases section on GitHub. + 2. [Download the NuGet Package Manager](https://marketplace.visualstudio.com/items?itemName=NuGetTeam.NuGetPackageManager) and install it. + +> **INFO** +> +> +> **Handy Tips** +> +> The NuGet Package Manager only supports .NET 4.0 and higher. Ensure that you have the appropriate version of .NET installed. +> + + 3. Run the following command on the NuGet Package Manager: + + ``` + Install-Package Razorpay -Version {version_number} + ``` + + + + +> **INFO** +> +> +> **Handy Tips** +> +> You must have [.NET Core CLI](https://dotnet.microsoft.com/download) installed on your system to use this method. +> + + To install the SDK from the command prompt: + + 1. [Download the latest source code file](https://www.nuget.org/packages/Razorpay) from the nuget.org. + 2. Run the following command: + ``` + dotnet add package Razorpay --version {version_number} + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> In case the last command fails with `invalid cert received from server`, run the following commands: +> +> ``` bash: Certification Manager commands +> yes | certmgr -ssl -m https://go.microsoft.com +> yes | certmgr -ssl -m https://nugetgallery.blob.core.windows.net +> yes | certmgr -ssl -m https://myget.org +> yes | certmgr -ssl -m https://nuget.org +> mozroots --import --sync --quiet +> ``` +> + + + + - **Payment Gateway**: Integrate with Razorpay Payment Gateway. + + - **API Sample Codes**: Integrate using API sample codes. + +## Support + +- **Queries**: If you have queries, [contact support](https://razorpay.com/support/). + +- **Feature Request:** If you have a feature request, raise an issue on [GitHub](https://github.com/razorpay/razorpay-dot-net/issues/new). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/server-integration/dot-net/integration-steps.md b/llm-content/payments/server-integration/dot-net/integration-steps.md new file mode 100644 index 00000000..58dda496 --- /dev/null +++ b/llm-content/payments/server-integration/dot-net/integration-steps.md @@ -0,0 +1,1057 @@ +--- +title: Integration Steps | .NET SDK +heading: Integration Steps +description: Integrate your .NET-based website with our SDK to start accepting payments using the Razorpay Payment Gateway. +--- + +# Integration Steps + +Start accepting domestic and international payments from customers on your website using the Razorpay Payment Gateway. Razorpay has developed the Standard Checkout method and manages it. You can configure **payment methods, orders, company logo** and also select **custom colour** based on your convenience. Razorpay supports these [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) and [ international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +![Configure .NET integrated payment gateway checkout based on your requirement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/web-integration-checkout-new.jpg.md) + +Watch this video to know how to integrate Razorpay Payment Gateway on your .NET-based website. + +[Video: https://www.youtube.com/embed/JkwfjHjS33E] + + + We recommend you check the Razorpay .NET Sample App, created using the video tutorial. + + + + Download the latest [razorpay-dot-net.zip](https://github.com/razorpay/razorpay-dot-net/releases) file from GitHub. It is pre-compiled to include all dependencies. + + +### Project Structure + +Before you begin, we recommend you check the Razorpay .NET Sample App and verify that your project contains the following files: + +> **INFO** +> +> +> **Handy Tips** +> +> This test app uses a Nuget package based SDK integration. If you are not using nuget, [download latest version of the SDK from GitHub](https://github.com/razorpay/razorpay-dot-net/releases) and add the required version of DLL in your project reference. +> + +File Name | Purpose +--- +Payment.aspx | Contains the code to invoke Razorpay Checkout. +--- +Payment.aspx.cs | Contains the code for order creation using Orders API. +--- +Charge.cs | Contains the code for verifying payment signature. + +**Before you proceed:** + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **1. Build Integration**: Integrate with your .NET-based website. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +### 1. Build Integration + + +### 1.1 Create an Order in Server + + Order is an important step in the payment process. + - An order should be created for every payment. + - You can create an order using the [Orders API](#api-sample-code) in the **app.js** file. It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. + - The `order_id` received in the response should be passed to checkout in the **index.html** file. This ties the Order with the payment and secures the request from being tampered. + + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + + + + +> **INFO** +> +> +> **Handy Tips** +> +> You can capture payments automatically with one-time [Payment Capture setting configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/dot-net/integration-steps.md#3-go-live-checklist) on the Dashboard. +> + + + + + + 1.1.1 Sample Code + + In the sample app, the **Payment.aspx.cs** file contains the code for order creation using Orders API. + + ```csharp: Request + Dictionary input = new Dictionary(); + input.Add("amount", 100); // Amount is in currency subunits. + input.Add("currency", ""); + input.Add("receipt", "12121"); + + string key = ""; + string secret = ""; + + RazorpayClient client = new RazorpayClient(key, secret); + + Razorpay.Api.Order order = client.Order.Create(input); + orderId = order["id"].ToString(); + + ```json: Response + { + "id": "order_Z6t7VFTb9xHeOs", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071 + } + ``` + + + + +### 1.1.2 Request Parameters + + Here is the list of parameters for creating an order: + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### 1.1.3 Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) table. + + + +### 1.1.4 Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#error-response-parameters). + + + + + + +### 1.2 Add Checkout Options + + In the sample app, the **Payment.aspx** file contains the code to invoke Razorpay Checkout. This is the code that creates a **Pay** button on your web page using the checkout code and either the callback URL or handler function. + + + + 1.2.1 Callback URL or Handler Function + + + **Callback URL** | **Handler Function** + --- + When you use this: +- On successful payment, the customer is redirected to the specified URL, for example, a payment success page. + +- On failure, the customer is asked to retry the payment. + | When you use this: +- On successful payment, the customer is shown your web page. + +- On failure, the customer is notified of the failure and asked to retry the payment. + + + + + + + + + + + +### 1.2.2 Code to Add Pay Button + + Copy-paste the parameters as `options` in your code: + + ```html: Handler Functions Checkout Code + + + + + + Razorpay .Net Sample App + + + + + + + + + Pay with Razorpay + + + var orderId = "" + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", + "description": "Buy Green Tea", + "order_id": orderId, + "image": "https://example.com/your_logo", + "prefill": { + "name": "", + "email": "", + "contact": "", + }, + "notes": { + "address": "Hello World" + }, + "theme": { + "color": "#3399cc" + } + } + // Boolean whether to show image inside a white frame. (default: true) + options.theme.image_padding = false; + options.handler = function (response) { + document.getElementById('razorpay_payment_id').value = response.razorpay_payment_id; + document.getElementById('razorpay_order_id').value = orderId; + document.getElementById('razorpay_signature').value = response.razorpay_signature; + document.razorpayForm.submit(); + }; + options.modal = { + ondismiss: function () { + console.log("This code runs when the popup is closed"); + }, + // Boolean indicating whether pressing escape key + // should close the checkout form. (default: true) + escape: true, + // Boolean indicating whether clicking translucent blank + // space outside checkout form should close the form. (default: false) + backdropclose: false + }; + var rzp = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp.open(); + e.preventDefault(); + } + + + + + ```html: Callback URL Checkout Code + + + + + + Razorpay .Net Sample App + + + + + + + + + Pay with Razorpay + + + var orderId = "" + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", + "description": "Buy Green Tea", + "order_id": orderId, + "image": "https://example.com/your_logo", + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "redirect": true, + "prefill": { + "name": "", + "email": "", + "contact": "", + }, + "notes": { + "address": "Hello World" + }, + "theme": { + "color": "#3399cc" + } + } + var rzp = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function (e) { + rzp.open(); + e.preventDefault(); + } + + + + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> - Ensure you do the following while using the sample app: +> +> 1. Edit the [KEY_ID] inside **Payment.aspx**. Use the test keys while testing your application. Know how to [Generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). +> 2. Edit the `[key_id]` and `[key_secret]` in **charge.aspx**. +> 3. Enforce the appropriate TLS version in the app, as shown: + +> +> ```csharp: Enforce TLS +> System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; +> ``` +> - Test your integration using these [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/dot-net/integration-steps.md#2-test-integration). +> + + + + +### 1.2.3 Checkout Options + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + +> **INFO** +> +> +> **Handy Tips** +> +> The open method of the Razorpay object (`rzp1.open()`) must be invoked by your site's JavaScript, which may or may not be a user-driven action such as a click. +> + + + + +### 1.2.4 Handle Payment Success and Failure + + The way the Payment Success and Failure scenarios are handled depends on the [Checkout Sample Code](#122-code-to-add-pay-button) you used in the last step. + + + + Checkout with Callback URL + + If you used the sample code with the callback URL: + + + + Razorpay makes a POST call to the callback URL with the **razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature** in the response object of the successful payment. Only successful authorisations are auto-submitted. + + + In case of failed payments, the checkout is displayed again to facilitate payment retry. + + + + + +### Checkout with Handler Function + + If you used the sample code with the handler function: + + + + The customer sees your website page. The checkout returns the response object of the successful payment (**razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature**). Collect these and send them to your server. + + + The customer is notified about payment failure and asked to retry the payment. + + + + Use the Success/Failure Handling code given below: + + ```js: Success Handling Code + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature)} + ```js: Failure Handling Code + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + } + ``` + + + + + + +### 1.2.5 Configure Payment Methods *(Optional)* + + Multiple payment methods are available on Razorpay Standard Checkout. + - The payment methods are **fixed** and cannot be changed. + - You can configure the order or make certain payment methods prominent. Know more about configuring payment methods. Know more about [configuring payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + + + + + +### 1.3 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.4 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. In the sample app, the **Charge.cs** file contains the code for verifying the payment signature. + + To verify the `razorpay_signature` returned to you by the Checkout form: + 1. Create a signature in your server using the following attributes: + + Attribute | Description + --- + `order_id` | Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by checkout. + --- + `razorpay_payment_id` | Returned during checkout. + --- + `key_secret` | Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct an HMAC hex digest as shown below: + + ``` + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + #### Generate Signature on Your Server + + Use the code given below to generate signature on your server: + + ```csharp: Verify Payment Signature + + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + options.Add("razorpay_order_id", "order_IEIaMR65"); + options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); + options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + + Utils.verifyPaymentSignature(options); + ``` + + + +### 1.5 Verify Payment Status + + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + You can track the payment status in three ways: + + + To verify the payment status from the Dashboard: + + 1. Log in to the Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + + ![Check if the payment id is generated and the status is captured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/testpayment.jpg.md) + + + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + Given below is the webhook signature verification sample code. + + ```csharp: .NET + /* Dot Net SDK: https://github.com/razorpay/razorpay-dot-net */ + + Utils.verifyWebhookSignature(webhookBody, webhookSignature, webhookSecret); + #webhookBody should be raw webhook request body + ``` + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +### 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +### 3. Go-live Checklist + +Check the go-live checklist for Razorpay Web Standard Checkout integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + + Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + +### Related Information + +[Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/dot-net/troubleshooting-faqs.md) diff --git a/llm-content/payments/server-integration/dot-net/troubleshooting-faqs.md b/llm-content/payments/server-integration/dot-net/troubleshooting-faqs.md new file mode 100644 index 00000000..0b26c15e --- /dev/null +++ b/llm-content/payments/server-integration/dot-net/troubleshooting-faqs.md @@ -0,0 +1,48 @@ +--- +title: Server Integration | .NET - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common error scenarios and find answers to frequently asked questions about Razorpay .NET SDK. +--- + +# Troubleshooting & FAQs + +### 1. How to resolve the following error displayed during Orders API integration? + + Following are the solutions for two possible errors: + + ### Server Response: Array + + + Error | Cause + --- + The server did not send back a well-formed response. Server Response: Array. | This error appears if you are using TLS v1 on your client-side. + + + **Resolution** + - **Fix 1**: Verify if client supports TLS v1.1 using this website: [How's My SSL?](https://www.howsmyssl.com/s/api.html). If yes, upgrade the client to `TLS v1.1+`. + - **Fix 2**: Use the code given below to force TLS v1.2: + + ```c: Force TLS v1.2 + System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; + ``` + + ### Exception User-Unhandled + + Error | Cause + --- + Exception User-Unhandled | This error appears if you are using TLS v1 on your client-side + + + **Resolution** + + Use the code given below to force TLS v1.2. + + ```c: Force TLS v1.2 + System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; + ``` + + + +### 2. Does Razorpay support ASP.NET? + + We only have the .NET framework on which ASP.NET works; we do not support it for .NET core. diff --git a/llm-content/payments/server-integration/go.md b/llm-content/payments/server-integration/go.md new file mode 100644 index 00000000..0b9871c4 --- /dev/null +++ b/llm-content/payments/server-integration/go.md @@ -0,0 +1,38 @@ +--- +title: Prerequisites | Razorpay Go SDK +heading: Prerequisites +description: Check the prerequisites before you integrate with Razorpay Go server-side SDK. +--- + +# Prerequisites + +- **Go Changelog**: Discover new features, updates and deprecations related to the Razorpay Go SDK (since Jan 2024). + +Install the Razorpay Go SDK and integrate it with your Go-based website to accept payments, initiate refunds and do much more. + +## Go Client API + +The API follows the following practices: + +- This will require a GitHub Package. +- The Go client throws exceptions instead of returning errors. +- Options are passed as an `array` instead of multiple arguments, wherever possible. +- All requests and responses are mapped to a `string`. + +## Dependencies + +You must use Go v1.22 or higher. Know more about the [latest Go versions](https://go.dev/doc/devel/release). + + - **Payment Gateway**: Integrate with Razorpay Payment Gateway. + + - **API Sample Codes**: Integrate using API sample codes. + +## Support + +- **Queries**: If you have queries, [contact support](https://razorpay.com/support/). + +- **Feature Request:** If you have a feature request, raise an issue on [GitHub](https://github.com/razorpay/razorpay-go/issues/new). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/server-integration/go/integration-steps.md b/llm-content/payments/server-integration/go/integration-steps.md new file mode 100644 index 00000000..a6e9143a --- /dev/null +++ b/llm-content/payments/server-integration/go/integration-steps.md @@ -0,0 +1,980 @@ +--- +title: Integration Steps | Go SDK +heading: Integration Steps +description: Integrate your Go-based website with our SDK to start accepting payments using the Razorpay Payment Gateway. +--- + +# Integration Steps + +Start accepting domestic and international payments from customers on your website using the Razorpay Payment Gateway. Razorpay has developed the Standard Checkout method and manages it. You can configure **payment methods, orders, company logo** and also select **custom colour** based on your convenience. Razorpay supports these [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) and [ international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +![Configure Go integrated payment gateway checkout based on your requirement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/web-integration-checkout-new.jpg.md) + +Watch this video to know how to integrate Razorpay Payment Gateway on your Go-based website. + +[Video: https://www.youtube.com/embed/BXr6dGjbGrA] + + + We recommend you check the Go Sample App, created using the video tutorial. + + + + Download the latest [razorpay-go.zip](https://github.com/razorpay/razorpay-go/releases) file from GitHub. It is pre-compiled to include all dependencies. + + +### Project Structure + +Before you begin, we recommend you check the Go Sample App, created using the video tutorial, and verify that your project contains the following files: + +File | Description +--- +main.go | Main class, starts the Gin application. +--- +go.mod | Manages project dependencies (adds Razorpay Go SDK). +--- +.env | Configures the application. +--- +config.go | Loads configuration from environment variables. +--- +order.go | Handles server-side order logic (create order, get API key). +--- +checkout.go | Handles checkout page rendering. +--- +payment.go | Handles server-side payment logic (verify callback). +--- +models/order.go | Defines order data structures. +--- +index.html | Frontend payment page; initiates Razorpay Checkout via JS. +--- +success.html | Displays payment success message to user post-verification. +--- +failure.html | Displays payment failure message to user post-verification. + +**Before you proceed:** + + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **1. Build Integration**: Integrate with your Go-based website. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +### 1. Build Integration + + +### 1.1 Create an Order in Server + + Order is an important step in the payment process. + - An order should be created for every payment. + - You can create an order using the [Orders API](#api-sample-code) in the **app.js** file. It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. + - The `order_id` received in the response should be passed to checkout in the **index.html** file. This ties the Order with the payment and secures the request from being tampered. + + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + + + + +> **INFO** +> +> +> **Handy Tips** +> +> You can capture payments automatically with one-time [Payment Capture setting configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/go/integration-steps.md#3-go-live-checklist) on the Dashboard. +> + + + + + + 1.1.1 Sample Code + + Create a file, for example, `main.go` and add the API code given below: + + ```go: Request + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, // Amount is in currency subunits. + "currency": "", + "receipt": "some_receipt_id", + } + body, err := client.Order.Create(data, nil) + + ```json: Response + { + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071 + } + ``` + + + + +### 1.1.2 Request Parameters + + Here is the list of parameters for creating an order: + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### 1.1.3 Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) table. + + + +### 1.1.4 Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#error-response-parameters). + + + + + + +### 1.2 Add Checkout Options + + Add the Razorpay Checkout options in your project. For example, if you are using HTML for your frontend, create a page called **app.html** and add the Pay button on your web page using the checkout code and either the callback URL or handler function. + + + + 1.2.1 Callback URL or Handler Function + + + **Callback URL** | **Handler Function** + --- + When you use this: +- On successful payment, the customer is redirected to the specified URL, for example, a payment success page. + +- On failure, the customer is asked to retry the payment. + | When you use this: +- On successful payment, the customer is shown your web page. + +- On failure, the customer is notified of the failure and asked to retry the payment. + + + + + + + + + + + +### 1.2.2 Code to Add Pay Button + + Copy-paste the parameters as `options` in your code: + + ```html: Handler Function (JS) Checkout Code + Pay with Razorpay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_IluGWxBm9U8zJ8", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { + "name": "", + "email": "", + "contact": "" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + }); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ```html: Callback URL (JS) Checkout Code + Pay with Razorpay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is . Hence, 50000 refers to 50000 paise + "currency": "", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_IluGWxBm9U8zJ8", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { + "name": "", + "email": "", + "contact": "" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> Test your integration using these [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/go/integration-steps.md#2-test-integration). +> + + + + +### 1.2.3 Checkout Options + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + +> **INFO** +> +> +> **Handy Tips** +> +> The open method of the Razorpay object (`rzp1.open()`) must be invoked by your site's JavaScript, which may or may not be a user-driven action such as a click. +> + + + + +### 1.2.4 Handle Payment Success and Failure + + The way the Payment Success and Failure scenarios are handled depends on the [Checkout Sample Code](#122-code-to-add-pay-button) you used in the last step. + + + + Checkout with Callback URL + + If you used the sample code with the callback URL: + + + + Razorpay makes a POST call to the callback URL with the **razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature** in the response object of the successful payment. Only successful authorisations are auto-submitted. + + + In case of failed payments, the checkout is displayed again to facilitate payment retry. + + + + + +### Checkout with Handler Function + + If you used the sample code with the handler function: + + + + The customer sees your website page. The checkout returns the response object of the successful payment (**razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature**). Collect these and send them to your server. + + + The customer is notified about payment failure and asked to retry the payment. + + + + Use the Success/Failure Handling code given below: + + ```js: Success Handling Code + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature)} + ```js: Failure Handling Code + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + } + ``` + + + + + + +### 1.2.5 Configure Payment Methods *(Optional)* + + Multiple payment methods are available on Razorpay Standard Checkout. + - The payment methods are **fixed** and cannot be changed. + - You can configure the order or make certain payment methods prominent. Know more about configuring payment methods. Know more about [configuring payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + + + + + +### 1.3 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.4 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + To verify the `razorpay_signature` returned to you by the Checkout form: + 1. Create a signature in your server using the following attributes: + + Attribute | Description + --- + `order_id` | Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by checkout. + --- + `razorpay_payment_id` | Returned during checkout. + --- + `key_secret` | Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct an HMAC hex digest as shown below: + + ``` + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + #### Generate Signature on Your Server + + Use the code given below to generate signature on your server: + + ```go: Verify Payment Signature + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", + } + + signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; + secret := "EnLs21M47BllR3X8PSFtjtbd"; + utils.VerifyPaymentSignature(params, signature, secret) + ``` + + + +### 1.5 Verify Payment Status + + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + You can track the payment status in three ways: + + + To verify the payment status from the Dashboard: + + 1. Log in to the Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + + ![Check if the payment id is generated and the status is captured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/testpayment.jpg.md) + + + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + Given below is the webhook signature verification sample code. + + ```go: Go + /* Go SDK: https://github.com/razorpay/razorpay-go */ + + webhookbody := `{"entity":"event","account_id":"acc_HVFD0PFnHPAzKj","event":"payment.authorized","contains":["payment"],"payload":{"payment":{"entity":{"id":"pay_JUEM4c0pSLpFEW","entity":"payment","amount":12300,"currency":"","status":"authorized","order_id":"order_JUELuT6cFaHkvd","invoice_id":null,"international":false,"method":"netbanking","amount_refunded":0,"refund_status":null,"captured":false,"description":"#JUELZ1z1EC0pwi","card_id":null,"bank":"SBIN","wallet":null,"vpa":null,"email":"","contact":"+919999999999","notes":[],"fee":null,"tax":null,"error_code":null,"error_description":null,"error_source":null,"error_step":null,"error_reason":null,"acquirer_data":{"bank_transaction_id":"6416615"},"created_at":1652339804}}},"created_at":1652339806}`; + + signature := "56df260ab4647b07b729b0b48d2a95b71de42f109884949e5ec387a2bb8b6919"; + webhook_secret := "123456"; + body := utils.VerifyWebhookSignature(webhookbody, signature, webhook_secret) + ``` + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +### 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +### 3. Go-live Checklist + +Check the go-live checklist for Razorpay Web Standard Checkout integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/server-integration/java.md b/llm-content/payments/server-integration/java.md new file mode 100644 index 00000000..c86f54f9 --- /dev/null +++ b/llm-content/payments/server-integration/java.md @@ -0,0 +1,67 @@ +--- +title: Prerequisites | Razorpay Java SDK +heading: Prerequisites +description: Check the prerequisites before you integrate with Razorpay Java server-side SDK. +--- + +# Prerequisites + +- **Java Changelog**: Discover new features, updates and deprecations related to the Razorpay Java SDK (since Jan 2024). + +Install the Razorpay Java SDK and integrate it with your Java-based website to accept payments, initiate refunds and much more. + +## Dependencies + +- You must use Java v15 or higher. Know more about the [latest java versions](https://www.java.com/releases/). + +- Import the following packages before your get started: + + ```json: Import Package + import org.json.JSONObject; + import com.razorpay.*; + ``` + +## Installation + +You can install Razorpay using Maven or Gradle. + + + 1. Download and install [Maven](https://maven.apache.org/download.cgi) on your system. + 2. Download the [latest Source code](https://github.com/razorpay/razorpay-java/releases) zip file from the Releases section of GitHub. + 3. Unzip the file and add this dependency to the project object model (POM) of your project. + + ```java: Java + + com.razorpay + razorpay-java + x.y.z //x.y.z = the version you want to install + + ``` + + + + 1. [Download](https://gradle.org/releases) and [install](https://docs.gradle.org/current/userguide/installation.html) Gradle on your system. + 2. Download the [latest Source code](https://github.com/razorpay/razorpay-java/releases) zip file from the Releases section of GitHub. + 3. Unzip the file and add this dependency to the build file of the project: + + ```java: Java + implementation 'com.razorpay:razorpay-java:x.y.z" //x.y.z = the version you want to install + ``` + + + + - **Payment Gateway**: Integrate with Razorpay Payment Gateway. + + - **API Sample Codes**: Integrate using API sample codes. + + - **Other Razorpay Products**: Integrate with other Razorpay products. + +## Support + +- **Queries**: If you have queries, [contact support](https://razorpay.com/support/). + +- **Feature Request:** If you have a feature request, raise an issue on [GitHub](https://github.com/razorpay/razorpay-java/issues/new). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/server-integration/java/integration-steps.md b/llm-content/payments/server-integration/java/integration-steps.md new file mode 100644 index 00000000..7dfabde0 --- /dev/null +++ b/llm-content/payments/server-integration/java/integration-steps.md @@ -0,0 +1,1000 @@ +--- +title: Integration Steps | Java SDK +heading: Integration Steps +description: Integrate your Java-based website with our SDK to start accepting payments using the Razorpay Payment Gateway. +--- + +# Integration Steps + +- **Payment Gateway**: Integrate with Razorpay Payment Gateway. + + - **Other Razorpay Products**: Integrate with other Razorpay products using API sample codes. + +## Integrate With Razorpay Payment Gateway + +Start accepting domestic and international payments from customers on your website using the Razorpay Payment Gateway. Razorpay has developed the Standard Checkout method and manages it. You can configure **payment methods, orders, company logo** and also select **custom colour** based on your convenience. Razorpay supports these [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) and [ international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +![Configure .NET integrated payment gateway checkout based on your requirement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/web-integration-checkout-new.jpg.md) + +Watch this video to know how to integrate Razorpay Payment Gateway on your Java-based website. + +[Video: https://www.youtube.com/embed/Qph08VLmPhc] + + + We recommend you check the Java Sample App, created using the video tutorial. + + + + Download the latest [razorpay-java.zip](https://github.com/razorpay/razorpay-java/releases/) file from GitHub. It is pre-compiled to include all dependencies. + + +### Project Structure + +Before you begin, we recommend you check the Java Sample App, created using the video tutorial and verify that your project contains the following files: + +File Name | Purpose +--- +PaymentController.java | Contains the Orders API and verify callback. +--- +index.html | Contains the checkout code. +--- +succes.html | Displays payment success message to user. +--- +failure.html | Displays payment failure message to user. + +**Before you proceed:** + + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **1. Build Integration**: Integrate with your Java-based website. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +### 1. Build Integration + + +### 1.1 Create an Order in Server + + Order is an important step in the payment process. + - An order should be created for every payment. + - You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. + - The `order_id` received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + + + +> **INFO** +> +> +> **Handy Tips** +> +> You can capture payments automatically with one-time [Payment Capture setting configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/java/integration-steps.md#3-go-live-checklist) on the Dashboard. +> + + + + + + 1.1.1 Sample Code + + In the sample app, the **PaymentController.java** file contains the code for order creation using Orders API. + + ```Java: Request + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount",50000); // Amount is in currency subunits. + orderRequest.put("currency",""); + orderRequest.put("receipt", "receipt#1"); + JSONObject notes = new JSONObject(); + notes.put("notes_key_1","Tea, Earl Grey, Hot"); + orderRequest.put("notes",notes); + + Order order = instance.orders.create(orderRequest); + ```json: Response + { + "id": "order_GAWN9beXgaXXXX", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": "Tea, Earl Grey, Hot", + "created_at": 1573044247 + } + ``` + + + +### 1.1.2 Request Parameters + + Here is the list of parameters for creating an order: + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### 1.1.3 Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) table. + + + +### 1.1.4 Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#error-response-parameters). + + + + + + +### 1.2 Add Checkout Options + + Add the Razorpay Checkout options to your project. For example, if you are using HTML for your frontend, create a page called **index.html** and add the Pay button on your web page using the checkout code and either the callback URL or handler function. + + + + 1.2.1 Callback URL or Handler Function + + + **Callback URL** | **Handler Function** + --- + When you use this: +- On successful payment, the customer is redirected to the specified URL, for example, a payment success page. + +- On failure, the customer is asked to retry the payment. + | When you use this: +- On successful payment, the customer is shown your web page. + +- On failure, the customer is notified of the failure and asked to retry the payment. + + + + + + + + + + + +### 1.2.2 Code to Add Pay Button + + Copy-paste the parameters as `options` in your code: + + ```html: Handler Function (JavaScript) Checkout Code + Pay with Razorpay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_IluGWxBm9U8zJ8", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { + "name": "", + "email": "", + "contact": "" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + }); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + + ```html: Callback URL (JavaScript) Checkout Code + Pay with Razorpay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_IluGWxBm9U8zJ8", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { + "name": "", + "email": "", + "contact": "" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> Test your integration using these [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/java/integration-steps.md#2-test-integration). +> + + + + +### 1.2.3 Checkout Options + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + +> **INFO** +> +> +> **Handy Tips** +> +> The open method of Razorpay object (`rzp1.open()`) must be invoked by your site's JavaScript, which may or may not be a user-driven action such as a click. +> + + + + +### 1.2.4 Handle Payment Success and Failure + + The way the Payment Success and Failure scenarios are handled depends on the [Checkout Sample Code](#122-code-to-add-pay-button) you used in the last step. + + + + Checkout with Callback URL + + If you used the sample code with the callback URL: + + + + Razorpay makes a POST call to the callback URL with the **razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature** in the response object of the successful payment. Only successful authorisations are auto-submitted. + + + In case of failed payments, the checkout is displayed again to facilitate payment retry. + + + + + +### Checkout with Handler Function + + If you used the sample code with the handler function: + + + + The customer sees your website page. The checkout returns the response object of the successful payment (**razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature**). Collect these and send them to your server. + + + The customer is notified about payment failure and asked to retry the payment. + + + + Use the Success/Failure Handling code given below: + + ```js: Success Handling Code + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature)} + ```js: Failure Handling Code + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + } + ``` + + + + + + +### 1.2.5 Configure Payment Methods *(Optional)* + + Multiple payment methods are available on Razorpay Standard Checkout. + - The payment methods are **fixed** and cannot be changed. + - You can configure the order or make certain payment methods prominent. Know more about configuring payment methods. Know more about [configuring payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + + + + + +### 1.3 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.4 Verify Payment Signature + + This is a mandatory step that allows you to confirm the authenticity of the details returned to the checkout for successful payments. + + To verify the `razorpay_signature` returned to you by the checkout: + 1. Create a signature in your server using the following attributes: + + Attribute | Description + --- + `order_id` | Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by checkout. + --- + `razorpay_payment_id` | Returned during checkout. + --- + `key_secret` | Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct an HMAC hex digest as shown below: + + ``` + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the checkout, the payment received is from an authentic source. + + Use the code given below to generate signature on your server: + + ```java: Verify Payment Signature + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + String secret = "EnLs21M47BllR3X8PSFtjtbd"; + + JSONObject options = new JSONObject(); + options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); + options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); + options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + + boolean status = Utils.verifyPaymentSignature(options, secret); + ``` + + + +### 1.5 Verify Payment Status + + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + You can track the payment status in three ways: + + + To verify the payment status from the Dashboard: + + 1. Log in to the Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + + ![Check if the payment id is generated and the status is captured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/testpayment.jpg.md) + + + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + Given below is the webhook signature verification sample code. + + ```java: Java + /* Java SDK: https://github.com/razorpay/razorpay-java */ + + Utils.verifyWebhookSignature("", "", ""); + ``` + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +### 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +### 3. Go-live Checklist + +Check the go-live checklist for Razorpay Web Standard Checkout integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + + Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + +## Integrate With Other Razorpay Products + +Razorpay offers a range of [payment products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md) to meet your business requirements. Visit our [GitHub repository](https://github.com/razorpay/razorpay-java) for sample codes. diff --git a/llm-content/payments/server-integration/nodejs.md b/llm-content/payments/server-integration/nodejs.md new file mode 100644 index 00000000..bec52825 --- /dev/null +++ b/llm-content/payments/server-integration/nodejs.md @@ -0,0 +1,41 @@ +--- +title: Prerequisites | Razorpay Node.js SDK +heading: Prerequisites +description: Check the prerequisites before you integrate with Razorpay Node.js server-side SDK. +--- + +# Prerequisites + +- **Node.js Changelog**: Discover new features, updates and deprecations related to the Razorpay Node.js SDK (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about Razorpay Node.js SDK. + +Install the Razorpay Node.js SDK before you start integrating with your Node.js-based application. + +## Dependencies + +You must use Node.js v22.2 or higher. Know more about the [latest Node.js versions](https://nodejs.org/en/about/previous-releases). + +## Installation + +Open your project folder and run the following command on your command prompt to install the Razorpay Node.js SDK: + +```js: Install the SDK +npm i razorpay +``` + + - **Payment Gateway**: Integrate with Razorpay Payment Gateway. + + - **API Sample Codes**: Integrate using API sample codes. + + - **Other Razorpay Products**: Integrate with other Razorpay products. + +## Support + +- **Queries**: If you have queries, [contact support](https://razorpay.com/support/). + +- **Feature Request:** If you have a feature request, raise an issue on [GitHub](https://github.com/razorpay/razorpay-node/issues/new). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/server-integration/nodejs/integration-steps.md b/llm-content/payments/server-integration/nodejs/integration-steps.md new file mode 100644 index 00000000..7c70ed4a --- /dev/null +++ b/llm-content/payments/server-integration/nodejs/integration-steps.md @@ -0,0 +1,1101 @@ +--- +title: Integration Steps | Node.js SDK +heading: Integration Steps +description: Integrate your Node.js-based website with our SDK to start accepting payments using the Razorpay Payment Gateway. +--- + +# Integration Steps + +- **Payment Gateway**: Integrate with Razorpay Payment Gateway. + + - **Other Razorpay Products**: Integrate with other Razorpay products using API sample codes. + +## Integrate With Razorpay Payment Gateway + +Start accepting domestic and international payments from customers on your website using the Razorpay Payment Gateway. Razorpay has developed the Standard Checkout method and manages it. You can configure **payment methods, orders, company logo** and also select **custom colour** based on your convenience. Razorpay supports these [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) and [ international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +![Configure node.js integrated payment gateway checkout based on your requirement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/web-integration-checkout-new.jpg.md) + +Watch this video to know how to integrate Razorpay Payment Gateway on your Node.js app. + +[Video: https://www.youtube.com/embed/6OyFk8Snb9g] + + + We recommend you check the Node.js Sample App, created using the video tutorial. + + + + Download the latest [razorpay-node.zip](https://github.com/razorpay/razorpay-node/releases/) file from GitHub. It is pre-compiled to include all dependencies. + + +### Project Structure + +Before you begin, we recommend you check the Node.js Sample App, created using the video tutorial, and verify that your project contains the following files: + +File Name | Purpose +--- +index.html | Contains Checkout code. +--- +app.js | Contains Orders API and payment verification code. +--- +success.html | A page to redirect users once the payment is successful. + +**Before you proceed:** + + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **1. Build Integration**: Integrate with your Node.js-based website. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +### 1. Build Integration + + +### 1.1 Instantiate Razorpay + + In your server file, instantiate the Razorpay instance with your `key_id` and `key_secret`. You should generate the API keys on the Dashboard and add them here. + + Given below is the command: + + ```js: Instantiate the Razorpay Instance + var instance = new Razorpay({ + key_id: 'YOUR_KEY_ID', + key_secret: 'YOUR_KEY_SECRET', + }); + ``` + + The resources can be accessed using the instance. All the methods invocations follow the namespaced signature: + + ```js: Resource + // API signature + // {razorpayInstance}.{resourceName}.{methodName}(resourceId [, params]) + // example + + instance.payments.fetch(paymentId) + ``` + + Every resource method returns a promise. + + ```js: Promise + instance.payments.all({ + from: '2016-08-01', + to: '2016-08-20' + }).then((response) => { + // handle success + }).catch((error) => { + // handle error + }) + ``` + + If you want to use callbacks instead of promises, every resource method accepts a callback function as the last parameter. The callback function acts as **Error First Callbacks**. + + ```js: Callbacks + instance.payments.all({ + from: '2016-08-01', + to: '2016-08-20' + }, (error, response) => { + if (error) { + // handle error + } else { + // handle success + } + }) + ``` + + + +### 1.2 Create an Order in Server + + Order is an important step in the payment process. + - An order should be created for every payment. + - You can create an order using the [Orders API](#api-sample-code) in the **app.js** file. It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. + - The `order_id` received in the response should be passed to checkout in the **index.html** file. This ties the Order with the payment and secures the request from being tampered. + + +> **INFO** +> +> +> **Handy Tips** +> +> You can capture payments automatically with one-time [Payment Capture setting configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/nodejs/integration-steps.md#3-go-live-checklist) on the Dashboard. +> + + + + + + 1.2.1 Sample Code + + In the sample app, the **app.js** file contains the code for order creation using Orders API. + + ```nodejs: Request + const Razorpay = require('razorpay'); + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + var options = { + amount: 50000, // Amount is in currency subunits. + currency: "", + receipt: "order_rcptid_11" + }; + instance.orders.create(options, function(err, order) { + console.log(order); + }); + ```json: Response + { + "id": "order_DBJOWzybf0sJbb", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "order_rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 + } + ``` + + + + +### 1.2.2 Request Parameters + + Here is the list of parameters for creating an order: + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### 1.2.3 Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) table. + + + +### 1.2.4 Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#error-response-parameters). + + + + + + +### 1.3 Add Checkout Options + + Add the Razorpay Checkout options to your project. For example, if you are using HTML for your frontend, create a page called **index.html** and add the Pay button on your web page using the checkout code and either the callback URL or handler function. + + + + 1.3.1 Callback URL or Handler Function + + + **Callback URL** | **Handler Function** + --- + When you use this: +- On successful payment, the customer is redirected to the specified URL, for example, a payment success page. + +- On failure, the customer is asked to retry the payment. + | When you use this: +- On successful payment, the customer is shown your web page. + +- On failure, the customer is notified of the failure and asked to retry the payment. + + + + + + + + + + +### 1.3.2 Code to Add Pay Button + + Copy-paste the parameters as options in your code: + + +> **INFO** +> +> +> **Handy Tips** +> +> You can also integrate the Razorpay Checkout with [React.js](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/nodejs/troubleshooting-faqs.md#3-can-i-integrate-razorpay-checkout-with-reactjs) using the sample code. +> + + ```html: Node.js Checkout Code + + + + + + Razorpay Payment + + + Razorpay Payment Gateway Integration + + Amount: + + Pay Now + + + + + async function payNow() { + const amount = document.getElementById('amount').value; + + // Create order by calling the server endpoint + const response = await fetch('/create-order', { + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify({ amount, currency: '', receipt: 'receipt#1', notes: {} }) + }); + + const order = await response.json(); + + // Open Razorpay Checkout + const options = { + key: 'YOUR_KEY_ID', // Replace with your Razorpay key_id + amount: '50000', // Amount is in currency subunits. + currency: '', + name: 'Acme Corp', + description: 'Test Transaction', + order_id: 'order_IluGWxBm9U8zJ8', // This is the order_id created in the backend + callback_url: 'http://localhost:3000/payment-success', // Your success URL + prefill: { + name: '', + email: '', + contact: '9999999999' + }, + theme: { + color: '#F37254' + }, + }; + + const rzp = new Razorpay(options); + rzp.open(); + } + + + + + ```html: Callback URL (JS) Checkout Code + Pay with Razorpay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_IluGWxBm9U8zJ8", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { + "name": "", + "email": "", + "contact": "" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + + ```html: Handler Function (JS) Checkout Code + Pay with Razorpay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_IluGWxBm9U8zJ8", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { + "name": "", + "email": "", + "contact": "" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + }); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> Test the integration using these [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/nodejs/integration-steps.md#2-test-integration). +> + + + + +### 1.3.3 Checkout Options + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + + + +### 1.3.4 Handle Payment Success and Failure + + The way the Payment Success and Failure scenarios are handled depends on the [Checkout Sample Code](#132-code-to-add-pay-button) you used in the last step. + + + + Checkout with Callback URL + + If you used the sample code with the callback URL: + + + + Razorpay makes a POST call to the callback URL with the **razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature** in the response object of the successful payment. Only successful authorisations are auto-submitted. + + + In case of failed payments, the checkout is displayed again to facilitate payment retry. + + + + + +### Checkout with Handler Function + + If you used the sample code with the handler function: + + + The customer sees your website page. The checkout returns the response object of the successful payment (**razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature**). Collect these and send them to your server. + + + The customer is notified about payment failure and asked to retry the payment. + + + + Use the Success/Failure Handling code given below: + + ```js: Success Handling Code + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature)} + ```js: Failure Handling Code + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + } + ``` + + + + + + +### 1.3.5 Configure Payment Methods *(Optional)* + + Multiple payment methods are available on Razorpay Standard Checkout. + - The payment methods are **fixed** and cannot be changed. + - You can configure the order or make certain payment methods prominent. Know more about configuring payment methods. Know more about [configuring payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + + + + + +### 1.4 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.5 Verify Payment Signature + + This is a mandatory step that allows you to confirm the authenticity of the details returned to the checkout for successful payments. + + To verify the `razorpay_signature` returned to you by the checkout: + 1. Create a signature in your server using the following attributes: + + Attribute | Description + --- + `order_id` | Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by checkout. + --- + `razorpay_payment_id` | Returned during checkout. + --- + `key_secret` | Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct an HMAC hex digest as shown below: + + ``` + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the checkout, the payment received is from an authentic source. + + Use the code given below to generate signature on your server: + + ```nodejs: Verify Payment Signature + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); + validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + ``` + + Add the following code in the front-end: + + ```nodejs: Call Signature Validate Method + var settings = { + "url": "/api/payment/verify", + "method": "POST", + "timeout": 0, + "headers": { + "Content-Type": "application/json" + }, + "data": JSON.stringify({response}), + } + ``` + + + +### 1.6 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + You can track the payment status in three ways: + + + To verify the payment status from the Dashboard: + + 1. Log in to the Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + + ![Check if the payment id is generated and the status is captured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/testpayment.jpg.md) + + + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + Given below is the webhook signature verification sample code. + + ```javascript: Node.js + /* NODE SDK: https://github.com/razorpay/razorpay-node */ + const {validateWebhookSignature} = require('razorpay/dist/utils/razorpay-utils') + + validateWebhookSignature(JSON.stringify(webhookBody), webhookSignature, webhookSecret) + #webhook_body should be raw webhook request body + + ``` + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +### 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +### 3. Go-live Checklist + +Check the go-live checklist for Razorpay Web Standard Checkout integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + +## Integrate With Other Razorpay Products + +Razorpay offers a range of [payment products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md) to meet your business requirements. Visit our [GitHub repository](https://github.com/razorpay/razorpay-node) for the sample codes. + +#### Partner Authentication + +If you are a partner and want to use the API as a particular merchant, you must authenticate your account by passing an additional header `X-Razorpay-Account` with the merchant `account_id` as the value. + +#### Example + +``` +var instance = new Razorpay({ + key_id: '', + key_secret: '', + headers: { + "X-Razorpay-Account": "" + } +}); + +instance.orders.all().then(console.log).catch(console.error); +``` + +### Related Information + +[Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/nodejs/troubleshooting-faqs.md) diff --git a/llm-content/payments/server-integration/nodejs/troubleshooting-faqs.md b/llm-content/payments/server-integration/nodejs/troubleshooting-faqs.md new file mode 100644 index 00000000..9e5c9bda --- /dev/null +++ b/llm-content/payments/server-integration/nodejs/troubleshooting-faqs.md @@ -0,0 +1,181 @@ +--- +title: Payment Gateway - Node.js | Node.js - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common error scenarios and find answers to frequently asked questions about Razorpay Node.js SDK. +--- + +# Troubleshooting & FAQs + +### 1. I have configured the payment method. But, I still see the following error message, `payment method is not configured`. How do I fix this? + + This error may also appear if the API key ID is not added to the checkout code. Check and add the API key ID. + + + +### 2. I got an error saying `id is not valid`. Which id do I look for? + + If the order id is not replaced in the checkout code, the `id is not valid` error appears. Replace the order id. + + The `order_id` is available in following code: + + ```html: Handler Function (JS) Checkout Code + Pay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_IluGWxBm9U8zJ8", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { + "name": "", + "email": "", + "contact": "" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + }); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ```html: Callback URL (JS) Checkout Code + Pay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_IluGWxBm9U8zJ8", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { + "name": "", + "email": "", + "contact": "" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ``` + + + + +### 3. Can I integrate Razorpay Checkout with React.js? + + Yes, you can integrate the Razorpay Payment Gateway with React.js. Follow the [Node.js integration steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/nodejs/integration-steps.md) and to add a pay button use the React.js sample code given below: + + + ```js: React.js + import logo from './logo.svg'; + import './App.css'; + + function loadScript(src) { + return new Promise((resolve) => { + const script = document.createElement('script') + script.src = src + script.onload = () => { + resolve(true) + } + script.onerror = () => { + resolve(false) + } + document.body.appendChild(script) + }) + } + + function App() { + + async function displayRazorpay () { + + const res = await loadScript('https://checkout.razorpay.com/v1/checkout.js') + + if (!res){ + alert('Razropay failed to load!!') + return + } + + const data = await fetch('http://localhost:1769/razorpay', {method: 'POST'}).then((t) => + t.json() + ) + + console.log(data) + + const options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_IluGWxBm9U8zJ8", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url":"http://localhost:1769/verify", + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + const paymentObject = new window.Razorpay(options); + paymentObject.open(); + } + + return ( + + + + + Pay now + + + + ); + } + + export default App; + ``` + + + + +### 4. While installing the SDK, I encountered an error "Please verify that the package.json has a valid main entry." How do I fix this? + + This error may occur due to the installation process. Try re-installing npm by deleting the node modules folder and running `npm i`. diff --git a/llm-content/payments/server-integration/php.md b/llm-content/payments/server-integration/php.md new file mode 100644 index 00000000..9d3c16bb --- /dev/null +++ b/llm-content/payments/server-integration/php.md @@ -0,0 +1,51 @@ +--- +title: Prerequisites | Razorpay PHP SDK +heading: Prerequisites +description: Check the prerequisites before you integrate with Razorpay PHP server-side SDK. +--- + +# Prerequisites + +- **PHP Changelog**: Discover new features, updates and deprecations related to the Razorpay PHP SDK (since Jan 2024). + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about Razorpay PHP SDK. + + - **Troubleshooting & FAQs**: Troubleshoot common error scenarios and find answers to frequently asked questions about Razorpay PHP SDK. + +Integrate the Razorpay PHP SDK with your PHP-based website to accept payments, initiate refunds and much more. + +## Dependencies + +You must use PHP v8.3 or higher. Know more about the [latest PHP versions](https://www.php.net/supported-versions.php). + +## Installation + +You can either download the file or run a composer command to install the Razorpay PHP SDK. + + + Download the latest [razorpay-php.zip file](https://github.com/razorpay/razorpay-php/releases/) from the releases section on GitHub. The razorpay-php.zip is pre-compiled to include all dependencies. + + + You can install Razorpay using a composer command. Run the below command on your Composer: Unzip the SDK file and include the Razorpay.php file in your project. + + ```php: Install using Composer + composer require razorpay/razorpay:2.* + ``` + + + + - **Payment Gateway**: Integrate with Razorpay Payment Gateway. + + - **API Sample Codes**: Integrate using API sample codes. + + - **Other Razorpay Products**: Integrate with other Razorpay products. + +## Support + +- **Queries**: If you have queries, [contact support](https://razorpay.com/support/). + +- **Feature Request**: If you have a feature request, [create an issue on GitHub](https://github.com/razorpay/razorpay-php/issues/new). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/server-integration/php/integration-steps.md b/llm-content/payments/server-integration/php/integration-steps.md new file mode 100644 index 00000000..fbb1b735 --- /dev/null +++ b/llm-content/payments/server-integration/php/integration-steps.md @@ -0,0 +1,1009 @@ +--- +title: Integration Steps | PHP SDK +heading: Integration Steps +description: Integrate your PHP-based website with our SDK to start accepting payments using the Razorpay Payment Gateway. +--- + +# Integration Steps + +- **Payment Gateway**: Integrate with Razorpay Payment Gateway. + + - **Other Razorpay Products**: Integrate with other Razorpay products using API sample codes. + +## Integrate With Razorpay Payment Gateway + +Start accepting domestic and international payments from customers on your website using the Razorpay Payment Gateway. Razorpay has developed the Standard Checkout method and manages it. You can configure **payment methods, orders, company logo** and also select **custom colour** based on your convenience. Razorpay supports these [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) and [ international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +![Configure PHP integrated payment gateway checkout based on your requirement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/web-integration-checkout-new.jpg.md) + +Watch this video to know how to integrate Razorpay Payment Gateway on your PHP app. + +[Video: https://www.youtube.com/embed/xBBxOwAdNnQ] + + + We recommend you check the PHP Sample App, created using the video tutorial. + + + + Download the latest [razorpay-php.zip](https://github.com/razorpay/razorpay-php/releases/) file from GitHub. It is pre-compiled to include all dependencies. + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are using 5.6 or a higher version of the [PHP Official SDK](https://www.php.net/downloads). +> + +> **INFO** +> +> +> **Handy Tips** +> +> You can also download the [Razorpay PHP Test App](https://github.com/razorpay/razorpay-php-testapp) directly from GitHub. +> + +### Project Structure + +Before you begin, we recommend you check the PHP Sample App, created using the video tutorial, and verify that your project contains the following files: + +File Name | Purpose +--- +index.php | Contains the Orders API and Checkout code. +--- +config.php | Contains the API Keys. +--- +verify.php | Contains the payment signature verification code. +--- +success.html | A page to redirect users once the payment is successful. + +**Before you proceed:** + + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **1. Build Integration**: Integrate with your PHP-based website. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +### 1. Build Integration + + +### 1.1 Create an Order in Server + + Order is an important step in the payment process. + - An order should be created for every payment. + - You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. + - The `order_id` received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + + + +> **INFO** +> +> +> **Handy Tips** +> +> You can capture payments automatically with one-time [Payment Capture setting configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/php/integration-steps.md#3-go-live-checklist) on the Dashboard. +> + + + + + 1.1.1 Sample Code + + In the sample app, the **index.php** file contains the code for order creation using Orders API. + + ```php: Request + $api->order->create(array('receipt' => '123', 'amount' => 5000, 'currency' => '', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); // Amount is in currency subunits. + + ```json: Response + { + "id": "order_EKwxwAgItmmXXX", + "entity": "order", + "amount": 5000, + "amount_paid": 0, + "amount_due": 5000, + "currency": "", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071 + } + ``` + + + +### 1.1.2 Request Parameters + + Here is the list of parameters for creating an order: + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### 1.1.3 Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) table. + + + +### 1.1.4 Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#error-response-parameters). + + + + + + +### 1.2 Add Checkout Options + + Add the Razorpay Checkout options to your project. For example, if you are using HTML for your front-end, create a page called **pay.html** and add the Pay button on your web page using the checkout code and either the callback URL or handler function. + + + + 1.2.1 Callback URL or Handler Function + + + **Callback URL** | **Handler Function** + --- + When you use this: +- On successful payment, the customer is redirected to the specified URL, for example, a payment success page. + +- On failure, the customer is asked to retry the payment. + | When you use this: +- On successful payment, the customer is shown your web page. + +- On failure, the customer is notified of the failure and asked to retry the payment. + + + + + + + + + + + +### 1.2.2 Code to Add Pay Button + + Copy-paste the parameters as `options` in your code: + + ```html: PHP Checkout Code + $data = [ + "key" => $YOUR_KEY_ID, // Enter the Key ID generated from the Dashboard + "amount" => $5000, // Amount is in currency subunits. + "currency" => $, + "name" => "Acme Corp", + "description" => "Test transaction", + "image" => "https://cdn.razorpay.com/logos/GhRQcyean79PqE_medium.png", + "prefill" => [ + "name" => "", + "email" => "", + "contact" => "", + ], + "notes" => [ + "address" => "Razorpay Corporate Office", + "merchant_order_id" => "12312321", + ], + "theme" => [ + "color" => "#3399cc" + ], + "order_id" => $order_IluGWxBm9U8zJ8, // This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + ]; + + $json = json_encode($data); + require("checkout/{$checkout}.php"); + + ```html: Checkout Code (JS) + // Set your callback URL + $callback_url = "http://localhost:8000/success.html"; + + // Include Razorpay Checkout.js library + echo ''; + + // Create a payment button with Checkout.js + echo 'Pay with Razorpay'; + + // Add a script to handle the payment + echo ' + function startPayment() { + var options = { + key: "' . $YOUR_KEY_ID . '", // Enter the Key ID generated from the Dashboard + amount: ' . $order->5000 . ', // Amount is in currency subunits. + currency: "' . $order-> . '", + name: "Acme Corp", + description: "Test transaction", + image: "https://cdn.razorpay.com/logos/GhRQcyean79PqE_medium.png", + order_id: "' . $order_IluGWxBm9U8zJ8 . '", // This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + prefill: { + name: "", + email: "", + contact: "" + }, + notes: { + address: "Razorpay Corporate Office" + }, + theme: { + "color": "#3399cc" + }, + callback_url: "' . $callback_url . '" + }; + var rzp = new Razorpay(options); + rzp.open(); + } + '; + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> - If you want to use this as your final code, follow the steps given below: +> +> 1. Edit the `[KEY_ID]` inside the html file. Use the test keys while testing your application. Know how to [Generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). +> 2. Edit the `[KEY_ID]` and `[KEY_SECRET]` in **config.php**. + +> +> - Test your integration using these [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/php/integration-steps.md#2-test-integration). +> +> + + + + +### 1.2.3 Checkout Options + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + +> **INFO** +> +> +> **Handy Tips** +> +> The open method of Razorpay object (`rzp1.open()`) must be invoked by your site's JavaScript, which may or may not be a user-driven action such as a click. +> + + + + +### 1.2.4 Handle Payment Success and Failure + + The way the Payment Success and Failure scenarios are handled depends on the [Checkout Sample Code](#122-code-to-add-pay-button) you used in the last step. + + + + Checkout with Callback URL + + If you used the sample code with the callback URL: + + + + Razorpay makes a POST call to the callback URL with the **razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature** in the response object of the successful payment. Only successful authorisations are auto-submitted. + + + In case of failed payments, the checkout is displayed again to facilitate payment retry. + + + + + +### Checkout with Handler Function + + If you used the sample code with the handler function: + + + + The customer sees your website page. The checkout returns the response object of the successful payment (**razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature**). Collect these and send them to your server. + + + The customer is notified about payment failure and asked to retry the payment. + + + + Use the Success/Failure Handling code given below: + + ```js: Success Handling Code + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature)} + ```js: Failure Handling Code + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + } + ``` + + + + + + +### 1.2.5 Configure Payment Methods *(Optional)* + + Multiple payment methods are available on Razorpay Standard Checkout. + - The payment methods are **fixed** and cannot be changed. + - You can configure the order or make certain payment methods prominent. Know more about configuring payment methods. Know more about [configuring payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + + + + + +### 1.3 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.4 Verify Payment Signature + + This is a mandatory step that allows you to confirm the authenticity of the details returned to the checkout for successful payments. + + To verify the `razorpay_signature` returned to you by the checkout: + 1. Create a signature in your server using the following attributes: + + Attribute | Description + --- + `order_id` | Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by checkout. + --- + `razorpay_payment_id` | Returned during checkout. + --- + `key_secret` | Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct an HMAC hex digest as shown below: + + ``` + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the checkout, the payment received is from an authentic source. + + Use the code given below to generate signature on your server: + + ```php: Verify Payment Signature + $api = new Api($key_id, $secret); + + $api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + ``` + + + +### 1.5 Verify Payment Status + + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + You can track the payment status in three ways: + + + To verify the payment status from the Dashboard: + + 1. Log in to the Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + + ![Check if the payment id is generated and the status is captured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/testpayment.jpg.md) + + + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + Given below is the webhook signature verification sample code. + + ```php: PHP + /* PHP SDK: https://github.com/razorpay/razorpay-php */ + use Razorpay\Api\Api; + $api = new Api("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + $api->utility->verifyWebhookSignature($webhookBody, $webhookSignature, $webhookSecret); + // $webhookBody should be raw webhook request body + ``` + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +### 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +### 3. Go-live Checklist + +Check the go-live checklist for Razorpay Web Standard Checkout integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + + Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + +## Integrate With Other Razorpay Products + +Razorpay offers a range of [payment products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md) to meet your business requirements. Visit our [GitHub repository](https://github.com/razorpay/razorpay-php) for sample codes. + +#### Initialisation + +```PHP: php +use Razorpay\Api\Api; + +$api = new Api($api_key, $api_secret); +``` + +### Related Information + +[Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/php/troubleshooting-faqs.md) diff --git a/llm-content/payments/server-integration/php/troubleshooting-faqs.md b/llm-content/payments/server-integration/php/troubleshooting-faqs.md new file mode 100644 index 00000000..bc69f3e3 --- /dev/null +++ b/llm-content/payments/server-integration/php/troubleshooting-faqs.md @@ -0,0 +1,17 @@ +--- +title: Server Integration | PHP - Troubleshooting & FAQs +heading: Troubleshooting & FAQs +description: Troubleshoot common error scenarios and find answers to frequently asked questions about Razorpay PHP SDK. +--- + +# Troubleshooting & FAQs + +### 1. Why is the Pay button not appearing on my website/app after completing the SDK integration? + + The Pay button may not appear on your website/app if you are using an older SDK version. To resolve this, update the SDK with the latest version or replace the old lib/requests folder with the one from the latest SDK. + + + +### 2. How do I integrate Razorpay with Laravel? + + You can integrate Razorpay with Laravel using [Razorpay PHP SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/php.md) which is compatible with Laravel and other PHP frameworks. diff --git a/llm-content/payments/server-integration/python.md b/llm-content/payments/server-integration/python.md new file mode 100644 index 00000000..70ce95a8 --- /dev/null +++ b/llm-content/payments/server-integration/python.md @@ -0,0 +1,41 @@ +--- +title: Prerequisites | Razorpay Python SDK +heading: Prerequisites +description: Check the prerequisites before you integrate with Razorpay Python server-side SDK. +--- + +# Prerequisites + +- **Python Changelog**: Discover new features, updates and deprecations related to the Razorpay Python SDK (since Jan 2024). + +Install the Razorpay Python SDK and integrate it with your Python-based website to accept payments, initiate refunds and do much more. + +## Dependencies + +You must use Python v3.12 or higher. Know more about the [latest Python versions](https://www.python.org/downloads/). + +Download the latest source code zip file from [GitHub](https://github.com/razorpay/razorpay-python/releases). Unzip the file and add it to your project. + +After setting up the client, set up your app details before making requests to Razorpay. Run the following command to set up your app details: + +```PYTHON +client.set_app_details({"title" : "", "version" : ""}) +``` + +The app title and version is a `string`. For example, you can set the title to **Django** and version to **1.8.17**. + + - **Payment Gateway**: Integrate with Razorpay Payment Gateway. + + - **API Sample Codes**: Integrate using API sample codes. + + - **Other Razorpay Products**: Integrate with other Razorpay products. + +## Support + +- **Queries**: If you have queries, [contact support](https://razorpay.com/support/). + +- **Feature Request**: If you have a feature request, raise an issue on [GitHub](https://github.com/razorpay/razorpay-python/issues/new). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/server-integration/python/integration-steps.md b/llm-content/payments/server-integration/python/integration-steps.md new file mode 100644 index 00000000..d56caf9b --- /dev/null +++ b/llm-content/payments/server-integration/python/integration-steps.md @@ -0,0 +1,968 @@ +--- +title: Integration Steps | Python SDK +heading: Integration Steps +description: Integrate your Python-based website with our SDK to start accepting payments using the Razorpay Payment Gateway. +--- + +# Integration Steps + +- **Payment Gateway**: Integrate with Razorpay Payment Gateway. + + - **Other Razorpay Products**: Integrate with other Razorpay products using API sample codes. + +## Integrate With Razorpay Payment Gateway + +Start accepting domestic and international payments from customers on your website using the Razorpay Payment Gateway. Razorpay has developed the Standard Checkout method and manages it. You can configure **payment methods, orders, company logo** and also select **custom colour** based on your convenience. Razorpay supports these [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) and [ international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +![Configure python integrated payment gateway checkout based on your requirement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/web-integration-checkout-new.jpg.md) + +Watch this video to know how to integrate Razorpay Payment Gateway on your Python app. + +[Video: https://www.youtube.com/embed/ujZlxjs_IRg] + + + We recommend you check the Python Sample App, created using the video tutorial. + + + + Download the latest [razorpay-python.zip](https://github.com/razorpay/razorpay-python/releases/) file from GitHub. It is pre-compiled to include all dependencies. + + +> **INFO** +> +> +> **Handy Tips** +> +> You can also download the [Razorpay Python Test App](https://github.com/razorpay/razorpay-python-testapp) directly from github. +> + +### Project Structure + +Before you begin, we recommend you check the Python Sample App, created using the video tutorial, and verify that your project contains the following files: + +File Name | Purpose +--- +app.py | Contains Orders API and payment signature verification code. +--- +index.html | Contains Checkout code. +--- +success.html | A page to redirect users once the payment is successful. + +**Before you proceed:** + + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **1. Build Integration**: Integrate with your Python-based website. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +### 1. Build Integration + + +### 1.1 Create an Order in Server + + Order is an important step in the payment process. + - An order should be created for every payment. + - You can create an order using the [Orders API](#api-sample-code). It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. + - The `order_id` received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered. + + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + + +> **INFO** +> +> +> **Handy Tips** +> +> You can capture payments automatically with the [Payment Capture setting configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/python/integration-steps.md#3-go-live-checklist) on the Dashboard. +> + + + + 1.1.1 Sample Code + + Create a file, for example, `app.py` and add the API code given below: + + ```python: Request + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + data = { "amount": 50000, "currency": "", "receipt": "order_rcptid_11" } + payment = client.order.create(data=data) // Amount is in currency subunits. + + ```json: Response + { + "id": "order_IluGWxBm9U8zJ8", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "rcptid_11", + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1566986570 + } + ``` + + + + +### 1.1.2 Request Parameters + + Here is the list of parameters for creating an order: + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### 1.1.3 Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) table. + + + +### 1.1.4 Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#error-response-parameters). + + + + + + +### 1.2 Add Checkout Options + + Add the Razorpay Checkout options to your project. For example, if you are using HTML for your front-end, create a page called **index.html** and and add the Pay button on your web page using the checkout code and either the callback URL or handler function. + + + + 1.2.1 Callback URL or Handler Function + + + **Callback URL** | **Handler Function** + --- + When you use this: +- On successful payment, the customer is redirected to the specified URL, for example, a payment success page. + +- On failure, the customer is asked to retry the payment. + | When you use this: +- On successful payment, the customer is shown your web page. + +- On failure, the customer is notified of the failure and asked to retry the payment. + + + + + + + + + + +### 1.2.2 Code to Add Pay Button + + Copy-paste the parameters as `options` in your code: + + ```html: Handler Function (JS) Checkout Code + Pay with Razorpay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_IluGWxBm9U8zJ8", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { + "name": "", + "email": "", + "contact": "" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + }); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ```html: Callback URL (JS) Checkout Code + Pay with Razorpay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_IluGWxBm9U8zJ8", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { + "name": "", + "email": "", + "contact": "" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> - If you wish to use the above code as your final code, edit the `[KEY_ID]` and `[KEY_SECRET]` inside **app.py**. Use the test keys while testing your application. + Know how to [Generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). +> - Test your integration using these [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/python/integration-steps.md#2-test-integration). +> + + + + +### 1.2.3 Checkout Options + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + +> **INFO** +> +> +> **Handy Tips** +> +> The open method of Razorpay object (`rzp1.open()`) must be invoked by your site's JavaScript, which may or may not be a user-driven action such as a click. +> + + + + +### 1.2.4 Handle Payment Success and Failure + + The way the Payment Success and Failure scenarios are handled depends on the [Checkout Sample Code](#132-code-to-add-pay-button) you used in the last step. + + + + Checkout with Callback URL + + If you used the sample code with the callback URL: + + + + Razorpay makes a POST call to the callback URL with the **razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature** in the response object of the successful payment. Only successful authorisations are auto-submitted. + + + In case of failed payments, the checkout is displayed again to facilitate payment retry. + + + + + +### Checkout with Handler Function + + If you used the sample code with the handler function: + + + The customer sees your website page. The checkout returns the response object of the successful payment (**razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature**). Collect these and send them to your server. + + + The customer is notified about payment failure and asked to retry the payment. + + + + Use the Success/Failure Handling code given below: + + ```js: Success Handling Code + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature)} + ```js: Failure Handling Code + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + } + ``` + + + + + + +### 1.2.5 Configure Payment Methods *(Optional)* + + Multiple payment methods are available on Razorpay Standard Checkout. + - The payment methods are **fixed** and cannot be changed. + - You can configure the order or make certain payment methods prominent. Know more about configuring payment methods. Know more about [configuring payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + + + + + +### 1.3 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.4 Verify Payment Signature + + This is a mandatory step that allows you to confirm the authenticity of the details returned to the checkout for successful payments. + + To verify the `razorpay_signature` returned to you by the checkout: + 1. Create a signature in your server using the following attributes: + + Attribute | Description + --- + `order_id` | Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by checkout. + --- + `razorpay_payment_id` | Returned during checkout. + --- + `key_secret` | Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ``` + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the checkout, the payment received is from an authentic source. + + Use the code given below to generate signature on your server: + + ```python: Verify Payment Signature + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + ``` + + + +### 1.5 Verify Payment Status + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + You can track the payment status in three ways: + + + To verify the payment status from the Dashboard: + + 1. Log in to the Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + + ![Check if the payment id is generated and the status is captured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/testpayment.jpg.md) + + + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + Given below is the webhook signature verification sample code. + + ```python: Python + /* Python SDK: https://github.com/razorpay/razorpay-python */ + import razorpay + client = razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]")) + + client.utility.verify_webhook_signature(webhook_body, webhook_signature, webhook_secret) + // #webhook_body should be raw webhook request body + + ``` + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +### 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +### 3. Go-live Checklist + +Check the go-live checklist for Razorpay Web Standard Checkout integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + +## Integrate With Other Razorpay Products + +Razorpay offers a [range of payment products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md) to meet your business requirements. Visit our [GitHub](https://github.com/razorpay/razorpay-python) repository for sample codes. diff --git a/llm-content/payments/server-integration/ruby.md b/llm-content/payments/server-integration/ruby.md new file mode 100644 index 00000000..10f19daf --- /dev/null +++ b/llm-content/payments/server-integration/ruby.md @@ -0,0 +1,53 @@ +--- +title: Prerequisites | Razorpay Ruby SDK +heading: Prerequisites +description: Check the prerequisites before you integrate with Razorpay Ruby server-side SDK. +--- + +# Prerequisites + +- **Ruby Changelog**: Discover new features, updates and deprecations related to the Razorpay Ruby SDK (since Jan 2024). + +Install the Razorpay Ruby SDK and integrate it with your Ruby-based website to accept payments, initiate refunds and do much more. + +## Dependencies + +You must use Ruby v3.23 or higher. Know more about the [latest Ruby versions](https://www.ruby-lang.org/en/downloads/releases/). + +## Installation + +You can install the Ruby SDK in the following ways: + + + 1. Add the below line to your Gemfile of the application: + + ```ruby: Ruby + gem 'razorpay' + ``` + 2. Execute the following command: + + ```ruby: Ruby + $ bundle + ``` + + + Alternatively, you can install it by executing the following command: + + ```ruby: Ruby + $ gem install razorpay + ``` + + + - **Payment Gateway**: Integrate with Razorpay Payment Gateway. + + - **API Sample Codes**: Integrate using API sample codes. + +## Support + +- **Queries**: If you have queries, [contact support](https://razorpay.com/support/). + +- **Feature Request:** If you have a feature request, raise an issue on [GitHub](https://github.com/razorpay/razorpay-ruby/issues/new). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/server-integration/ruby/integration-steps.md b/llm-content/payments/server-integration/ruby/integration-steps.md new file mode 100644 index 00000000..883dabf4 --- /dev/null +++ b/llm-content/payments/server-integration/ruby/integration-steps.md @@ -0,0 +1,952 @@ +--- +title: Integration Steps | Ruby SDK +heading: Integration Steps +description: Integrate your Ruby-based website with our SDK to start accepting payments using the Razorpay Payment Gateway. +--- + +# Integration Steps + +Start accepting domestic and international payments from customers on your website using the Razorpay Payment Gateway. Razorpay has developed the Standard Checkout method and manages it. You can configure **payment methods, orders, company logo** and also select **custom colour** based on your convenience. Razorpay supports these [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) and [ international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +![Configure Ruby integrated payment gateway checkout based on your requirement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/web-integration-checkout-new.jpg.md) + +Watch this video to know how to integrate Razorpay Payment Gateway on your Ruby-based website. + +[Video: https://www.youtube.com/embed/kuEMuJw3Kis] + + + Download the latest [razorpay-ruby.zip](https://github.com/razorpay/razorpay-ruby/releases) file from GitHub. It is pre-compiled to include all dependencies. + + +### Project Structure + +Before you begin, we recommend you check that your project contains the following files: + +File Name | Purpose +--- +**payments.erb** | Contains the frontend code for Checkout. +--- +**rubysample.rb** | Contains the payment code for order creation. +--- +**verify.rb** | Contains a code for signature verification. + +**Before you proceed:** + + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). + +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. + + - **1. Build Integration**: Integrate with your Ruby-based website. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +### 1. Build Integration + + +### 1.1 Create an Order in Server + + Order is an important step in the payment process. + - An order should be created for every payment. + - You can create an order using the [Orders API](#api-sample-code) in the **app.js** file. It is a server-side API call. Know how to [authenticate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) Orders API. + - The `order_id` received in the response should be passed to checkout in the **index.html** file. This ties the Order with the payment and secures the request from being tampered. + + +> **WARN** +> +> +> **Watch Out!** +> +> Payments made without an `order_id` cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing. +> + + + + +> **INFO** +> +> +> **Handy Tips** +> +> You can capture payments automatically with one-time [Payment Capture setting configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/ruby/integration-steps.md#3-go-live-checklist) on the Dashboard. +> + + + + + + 1.1.1 Sample Code + + In the sample app, the **rubysample.rb** file contains the code for order creation using Orders API. + + ```ruby: Request + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + order = Razorpay::Order.create amount: 50000, currency: '', receipt: 'TEST' // Amount is in currency subunits. + + ```json: Response + { + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "", + "receipt": "TEST", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1582628071 + } + ``` + + + + +### 1.1.2 Request Parameters + + Here is the list of parameters for creating an order: + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is , then pass `29900` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. See the [list of supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). Length must be 3 characters. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`receipt` _optional_ +: `string` Your receipt id for this order should be passed here. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`partial_payment` _optional_ +: `boolean` Indicates whether the customer can make a partial payment. Possible values: + - `true`: The customer can make partial payments. + - `false` (default): The customer cannot make partial payments. + +`first_payment_min_amount` _optional_ +: `integer` Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as `500000`. This parameter should be passed only if `partial_payment` is `true`. + +Know more about [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + + + +### 1.1.3 Response Parameters + + Descriptions for the response parameters are present in the [Orders Entity](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/entity.md) table. + + + +### 1.1.4 Error Response Parameters + + The error response parameters are available in the [API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#error-response-parameters). + + + + + + +### 1.2 Add Checkout Options + + In the sample app, the **payments.erb** file contains the frontend code for Checkout and add the Pay button on your web page using the checkout code and either the callback URL or handler function. + + + 1.2.1 Callback URL or Handler Function + + + **Callback URL** | **Handler Function** + --- + When you use this: +- On successful payment, the customer is redirected to the specified URL, for example, a payment success page. + +- On failure, the customer is asked to retry the payment. + | When you use this: +- On successful payment, the customer is shown your web page. + +- On failure, the customer is notified of the failure and asked to retry the payment. + + + + + + + + + + + +### 1.2.2 Code to Add Pay Button + + Copy-paste the parameters as `options` in your code: + + ```html: Handler Function (JS) Checkout Code + Pay with Razorpay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_IluGWxBm9U8zJ8", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { + "name": "", + "email": "", + "contact": "" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + }); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ```html: Callback URL (JS) Checkout Code + Pay with Razorpay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. + "currency": "", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_IluGWxBm9U8zJ8", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { + "name": "", + "email": "", + "contact": "" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ``` + + +> **INFO** +> +> +> **Handy Tips** +> +> Test your integration using these [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration/ruby/integration-steps.md#2-test-integration). +> + + + + +### 1.2.3 Checkout Options + + `key` _mandatory_ +: `string` API Key ID generated from the Dashboard. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is , enter `222250` in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295. + + +> **WARN** +> +> +> **Watch Out!** +> +> As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as `99990` and not `99991`. +> + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. See the list of [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> +> **Handy Tips** +> +> Razorpay has added support for zero decimal currencies, such as JPY, and three decimal currencies, such as KWD, BHD, and OMR, allowing businesses to accept international payments in these currencies. Know more about [Currency Conversion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/currency-conversion.md) (May 2024). +> + +`name` _mandatory_ +: `string` Your Business/Enterprise name shown on the Checkout form. For example, **Acme Corp**. + +`description` _optional_ +: `string` Description of the purchase item shown on the Checkout form. It should start with an alphanumeric character. + +`image` _optional_ +: `string` Link to an image (usually your business logo) shown on the Checkout form. Can also be a **base64** string if you are not loading the image from a network. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md). + +`prefill` +: `object` You can prefill the following details at Checkout. + + +> **INFO** +> +> +> **Boost Conversions and Minimise Drop-offs** +> +> - Autofill customer contact details, especially phone number to ease form completion. Include customer’s phone number in the `contact` parameter of the JSON request's `prefill` object. Format: +(country code)(phone number). Example: "contact": "+919000090000". +> - This is not applicable if you do not collect customer contact details on your website before checkout, have Shopify stores or use any of the no-code apps. +> +> + + `name` _optional_ + : `string` Cardholder's name to be prefilled if customer is to make card payments on Checkout. For example, **Gaurav Kumar**. + + `email` _optional_ + : `string` Email address of the customer. + + `contact` _optional_ + : `string` Phone number of the customer. The expected format of the phone number is `+ {country code}{phone number}`. If the country code is not specified, `91` will be used as the default value. This is particularly important while prefilling `contact` of customers with phone numbers issued outside India. **Examples**: + - +14155552671 (a valid non-Indian number) + - +919977665544 (a valid Indian number). +If 9977665544 is entered, `+91` is added to it as +919977665544. + + `method` _optional_ + : `string` Pre-selection of the payment method for the customer. Will only work if `contact` and `email` are also prefilled. Possible values: + + - `card` + + - `netbanking` + + - `wallet` + + - `upi` + + - `emi` + + + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`theme` +: `object` Thematic options to modify the appearance of Checkout. + + `color` _optional_ + : `string` Enter your brand colour's HEX code to alter the text, payment method icons and CTA (call-to-action) button colour of the Checkout form. + + `backdrop_color` _optional_ + : `string` Enter a HEX code to change the Checkout's backdrop colour. + +`modal` +: `object` Options to handle the Checkout modal. + + `backdropclose` _optional_ + : `boolean` Indicates whether clicking the translucent blank space outside the Checkout form should close the form. Possible values: + - `true`: Closes the form when your customer clicks outside the checkout form. + - `false` (default): Does not close the form when customer clicks outside the checkout form. + + `escape` _optional_ + : `boolean` Indicates whether pressing the **escape** key should close the Checkout form. Possible values: + - `true` (default): Closes the form when the customer presses the **escape** key. + - `false`: Does not close the form when the customer presses the **escape** key. + + `handleback` _optional_ + : `boolean` Determines whether Checkout must behave similar to the browser when back button is pressed. Possible values: + - `true` (default): Checkout behaves similarly to the browser. That is, when the browser's back button is pressed, the Checkout also simulates a back press. This happens as long as the Checkout modal is open. + - `false`: Checkout does not simulate a back press when browser's back button is pressed. + + `confirm_close` _optional_ + : `boolean` Determines whether a confirmation dialog box should be shown if customers attempts to close Checkout. Possible values: + - `true`: Confirmation dialog box is shown. + - `false` (default): Confirmation dialog box is not shown. + + `ondismiss` _optional_ + : `function` Used to track the status of Checkout. You can pass a modal object with `ondismiss: function()\{\}` as options. This function is called when the modal is closed by the user. If `retry` is `false`, the `ondismiss` function is triggered when checkout closes, even after a failure. + + `animation` _optional_ + : `boolean` Shows an animation before loading of Checkout. Possible values: + - `true`(default): Animation appears. + - `false`: Animation does not appear. + +`subscription_id` _optional_ +: `string` If you are accepting recurring payments using Razorpay Checkout, you should pass the relevant `subscription_id` to the Checkout. Know more about [Subscriptions on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#checkout-integration). + +`subscription_card_change` _optional_ +: `boolean` Permit or restrict customer from changing the card linked to the subscription. You can also do this from the [hosted page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#update-the-payment-method-via-our-hosted-page). Possible values: + - `true`: Allow the customer to change the card from Checkout. + - `false` (default): Do not allow the customer to change the card from Checkout. + +`recurring` _optional_ +: `boolean` Determines if you are accepting [recurring (charge-at-will) payments on Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/recurring-payments.md) via instruments such as emandate, paper NACH and so on. Possible values: + - `true`: You are accepting recurring payments. + - `false` (default): You are not accepting recurring payments. + +`callback_url` _optional_ +: `string` Customers will be redirected to this URL on successful payment. Ensure that the domain of the Callback URL is allowlisted. + +`redirect` _optional_ +: `boolean` Determines whether to post a response to the event handler post payment completion or redirect to Callback URL. `callback_url` must be passed while using this parameter. Possible values: + - `true`: Customer is redirected to the specified callback URL in case of payment failure. + - `false` (default): Customer is shown the Checkout popup to retry the payment with the suggested next best option. + +`customer_id` _optional_ +: `string` Unique identifier of customer. Used for: + + - [Local saved cards feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md#manage-saved-cards). + - Static bank account details on Checkout in case of [Bank Transfer payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md). + +`remember_customer` _optional_ +: `boolean` Determines whether to allow saving of cards. Can also be configured via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). Possible values: + - `true`: Enables card saving feature. + - `false` (default): Disables card saving feature. + +`timeout` _optional_ +: `integer` Sets a timeout on Checkout, in seconds. After the specified time limit, the customer will not be able to use Checkout. + + +> **WARN** +> +> +> **Watch Out!** +> +> Some browsers may pause `JavaScript` timers when the user switches tabs, especially in power saver mode. This can cause the checkout session to stay active beyond the set timeout duration. +> + +`readonly` +: `object` Marks fields as read-only. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + + `name` _optional_ + : `boolean` Used to set the `name` field as readonly. Possible values: + - `true`: Customer will not be able to edit this field. + - `false` (default): Customer will be able to edit this field. + +`hidden` +: `object` Hides the contact details. + + `contact` _optional_ + : `boolean` Used to set the `contact` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + + `email` _optional_ + : `boolean` Used to set the `email` field as optional. Possible values: + - `true`: Customer will not be able to view this field. + - `false` (default): Customer will be able to view this field. + +`send_sms_hash` _optional_ +: `boolean` Used to auto-read OTP for cards and netbanking pages. Applicable from Android SDK version 1.5.9 and above. Possible values: + - `true`: OTP is auto-read. + - `false` (default): OTP is not auto-read. + +`allow_rotation` _optional_ +: `boolean` Used to rotate payment page as per screen orientation. Applicable from Android SDK version 1.6.4 and above. Possible values: + - `true`: Payment page can be rotated. + - `false` (default): Payment page cannot be rotated. + +`retry` _optional_ +: `object` Parameters that enable retry of payment on the checkout. + + `enabled` + : `boolean` Determines whether the customers can retry payments on the checkout. Possible values: + - `true` (default): Enables customers to retry payments. + - `false`: Disables customers from retrying the payment. + + `max_count` + : `integer` The number of times the customer can retry the payment. We recommend you to set this to 4. Having a larger number here can cause loops to occur. + +> **WARN** +> +> +> **Watch Out!** +> +> Web Integration does not support the `max_count` parameter. It is applicable only in Android and iOS SDKs. +> + + +`config` _optional_ +: `object` Parameters that enable checkout configuration. Know more about how to [configure payment methods on Razorpay standard checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + `display` + : `object` Child parameter that enables configuration of checkout display language. + + `language` + : `string` The language in which checkout should be displayed. Possible values: + - `en`: English + - `ben`: Bengali + - `hi`: Hindi + - `mar`: Marathi + - `guj`: Gujarati + - `tam`: Tamil + - `tel`: Telugu + + +> **INFO** +> +> +> **Handy Tips** +> +> The open method of the Razorpay object (`rzp1.open()`) must be invoked by your site's JavaScript, which may or may not be a user-driven action such as a click. +> + + + + +### 1.2.4 Handle Payment Success and Failure + + The way the Payment Success and Failure scenarios are handled depends on the [Checkout Sample Code](#122-code-to-add-pay-button) you used in the last step. + + + + Checkout with Callback URL + + If you used the sample code with the callback URL: + + + + Razorpay makes a POST call to the callback URL with the **razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature** in the response object of the successful payment. Only successful authorisations are auto-submitted. + + + In case of failed payments, the checkout is displayed again to facilitate payment retry. + + + + + +### Checkout with Handler Function + + If you used the sample code with the handler function: + + + + The customer sees your website page. The checkout returns the response object of the successful payment (**razorpay_payment_id**, **razorpay_order_id** and **razorpay_signature**). Collect these and send them to your server. + + + The customer is notified about payment failure and asked to retry the payment. + + + + Use the Success/Failure Handling code given below: + + ```js: Success Handling Code + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature)} + ```js: Failure Handling Code + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + } + ``` + + + + + + +### 1.2.5 Configure Payment Methods *(Optional)* + + Multiple payment methods are available on Razorpay Standard Checkout. + - The payment methods are **fixed** and cannot be changed. + - You can configure the order or make certain payment methods prominent. Know more about configuring payment methods. Know more about [configuring payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/configure-payment-methods.md). + + + + + + +### 1.3 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.4 Verify Payment Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + To verify the `razorpay_signature` returned to you by the Checkout form: + 1. Create a signature in your server using the following attributes: + + Attribute | Description + --- + `order_id` | Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by checkout. + --- + `razorpay_payment_id` | Returned during checkout. + --- + `key_secret` | Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct an HMAC hex digest as shown below: + + ``` + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + #### Generate Signature on Your Server + + Use the code given below to generate signature on your server: + + ```ruby: Verify Payment Signature + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } + Razorpay::Utility.verify_payment_signature(payment_response) + ``` + + + +### 1.5 Verify Payment Status + + + +> **INFO** +> +> +> **Handy Tips** +> +> On the Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + You can track the payment status in three ways: + + + To verify the payment status from the Dashboard: + + 1. Log in to the Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + + ![Check if the payment id is generated and the status is captured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/testpayment.jpg.md) + + + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + Given below is the webhook signature verification sample code. + + ```ruby: Ruby + /* Ruby SDK: https://github.com/razorpay/razorpay-ruby */ + + require razorpay + + Razorpay::Utility.verify_webhook_signature(webhook_body, webhook_signature, webhook_secret) + #webhook_body should be raw webhook request body + ``` + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-multiple-payments) to check the payment status. + + + + +### 2. Test Integration + +After the integration is complete, a **Pay** button appears on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test transaction is successful. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others may require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md) | `wallet` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +You can make test payments using one of the payment methods configured at the Checkout. + + +### Netbanking + + You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + + Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + + + +### UPI + + You can enter one of the following UPI IDs: + + - `success@razorpay`: To make the payment successful. + - `failure@razorpay`: To fail the payment. + + Check the list of [supported UPI flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + + + + +### Cards + + You can use the following test cards to test transactions for your integration in Test Mode. + + ### Domestic Cards + + Use the following test cards for Indian payments: + + + Network | Card Number | CVV & Expiry Date + --- + Visa | 4100 2800 0000 1007 | Use a random CVV and any future date ^^^^^ + --- + Mastercard | 5500 6700 0000 1002 | + --- + RuPay | 6527 6589 0000 1005 | + --- + Diners | 3608 280009 1007 | + --- + Amex | 3402 560004 01007 | + + + #### Error Scenarios + + Use these test cards to simulate payment errors. See the [complete list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md#error-scenario-test-cards) of error test cards with detailed scenarios. + Check the following lists: + - [Supported Card Networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + - [Cards Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/cards.md). + + ### International Cards + + Use the following test cards to test international payments. Use any valid expiration date in the future in the MM/YY format and any random CVV to create a successful payment. + + + Card Network | Card Number | CVV & Expiry Date + --- + Mastercard | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 | Use a random CVV and any future date ^^ + --- + Visa | 4012 8888 8888 1881 | + + + Check the list of [supported card networks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md). + + + +### Wallet + + You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the wallet login portals. + + Check the list of [supported wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/wallets.md#supported-wallets). + + +### 3. Go-live Checklist + +Check the go-live checklist for Razorpay Web Standard Checkout integration. Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + + + +### 3.3 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/set-up.md b/llm-content/payments/set-up.md new file mode 100644 index 00000000..6db302b1 --- /dev/null +++ b/llm-content/payments/set-up.md @@ -0,0 +1,630 @@ +--- +title: Set up a Razorpay Account +description: Set up a Razorpay account, submit your KYC using CKYC/Video KYC and start using the various Razorpay Payments and Banking Plus products. +--- + +# Set up a Razorpay Account + +You must sign up for a Razorpay account to use the Razorpay Payments products, access the Dashboard and accept payments from customers. + + + [Set up an account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#set-up-account) to use Razorpay products to accept customer payments. +You can also [set up multiple accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#set-up-multiple-accounts) with the same mobile number and email id. + + + + Submit your KYC documents to get your account verified and get the payments settled in your account. + + +Watch this video to create a new account on Razorpay and complete your KYC. + +[Video: https://www.youtube.com/embed/0PCo0bEK10Q?si=y5r6ALScK_o_rXnz] + +> **INFO** +> +> +> **Fast-Track Onboarding with Central KYC (CKYC) - Effective January 1, 2026** +> +> Streamline your onboarding with instant CKYC verification. +> +> Razorpay now offers immediate identity validation for businesses with existing Central KYC records. This enables full account activation in minutes by removing the necessity for Video KYC and manual document uploads. +> +> Know more about [CKYC and Traditional KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#ckyc-verification-vs-traditional-verification). +> +> **Key Benefits** +> +> - **Instant Verification**: If you have existing CKYC records (from bank, mutual fund, insurance), verification happens in seconds. +> - **No Document Uploads**: Many required documents are auto-fetched from CKYC. +> - **Skip Video KYC**: Businesses can bypass Video KYC completely. +> - **Faster Activation**: Complete onboarding in minutes instead of days. +> +> + +> **SUCCESS** +> +> +> **Assisted Onboarding** +> +> Hire a dedicated onboarding manager for an additional fee to assist you through your onboarding journey. The onboarding manager will provide end-to-end assistance, from sign-up and KYC document submission to verification and account activation. Know more about [Assisted Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#assisted-onboarding/). +> +> + +## Set Up a Razorpay Account and Complete KYC + +To set up a Razorpay Account, go to the [Razorpay website](https://razorpay.com/) and click **Sign Up**. Follow these steps for a smooth sign up process: + + +### Set Up Account + + Provide your contact details to get started: + + 1. Enter an **email address or 10-digit phone number**. + ![Enter phone number or email address](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-sign-up-enter-email-phone.jpg.md) + 2. Create a **password**. Ensure that the criteria is fulfilled. + 3. **Enter the OTP** sent to your email address or phone number. Click **Verify**. + If you did not receive the OTP, click **Resend OTP**. + 4. Click **Submit OTP**. + ![Submit OTP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-sign-up-enter-otp.jpg.md) + 5. Select **business type**. Click **Proceed**. + + + +### Basic Details + + Provide your basic details to set up your account. + + 1. Enter your **Full name**. This name must be of the person who will be completing the onboarding. Click **Continue**. + ![Enter name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-basic-details-enter-name.jpg.md) + 2. Enter your **Mobile number**. Click **Continue**. + ![Enter phone number](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-basic-details-enter-number.jpg.md) + 3. **Enter the OTP** sent to your mobile number. Click **Continue**. + ![Enter otp](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-basic-details-enter-otp.jpg.md) + 4. **Select the platforms** where you would like to accept payments. Click **Continue**. + ![Select platforms](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-basic-details-select-platforms.jpg.md) + 5. Add **website or application links**. Click **Continue**. If you wish to add these later, click **Add later**. + ![Enter website or app links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-basic-details-add-web-app-links.jpg.md) + 6. Add the **Social media links** that are available. Click **Continue**. If you wish to add these later, click **Add later**. + ![Enter social media links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-basic-details-add-social-links.jpg.md) + 7. **Review** the basic details you entered. Click **Continue** after verifying the information. + ![Review basic details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-basic-details-review.jpg.md) + + + +### Business Details + + Provide your business details. + + 1. Select your business type: **Registered or Unregistered**. Click **Continue**. + ![Select business type](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-business-details-biz-type.jpg.md) + 2. Select your **business sub-type** based on the available options. Click **Continue**. + ![Select business subtype](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-business-details-biz-subtype.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> Additional PAN may be required based on your business type: +> - **Individuals:** Business Owner's PAN +> - **Registered Business:** Business PAN (Company PAN) and Authorised Signatory PAN (Director/Partner) +> - **Proprietorship:** Authorised Signatory/Proprietor's PAN +> + + + + If you are an unregistered Individual business: + + 1. Enter your **personal PAN number**. Click **Continue**. + ![Enter personal PAN number](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-business-details-enter-pan.jpg.md) + 2. Razorpay will automatically capture your details based on your PAN number. Review your PAN. + + If the details are correct, click **Yes, confirm**. Or, click **Edit PAN**. + + ![Review PAN](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-business-details-review-pan.jpg.md) + 3. Select your **brand name**. If the available options do not match your brand name, click **Other** and enter your brand name. Click **Continue**. + ![Review PAN](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-business-details-brand-name.jpg.md) + 4. **Review** the business details you entered. Click **Continue** after verifying the information. + ![Review business details - Unregistered](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-business-details-review-unregd.jpg.md) + + + +### If you are a registered business: + + 5. Enter the **full name** of your business name. Ensure you do not use any special characters. Click **Continue**. + ![Enter business full name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-business-details-enter-business-name.jpg.md) + 6. Enter your **Personal PAN number**. + 7. Select the **Date of Incorporation**. + ![Enter business full name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-business-details-pan-doi.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> Date of incorporation can be found on your business GST Document or UDYAM (MSME) certificate. +> + + 8. Razorpay will automatically capture your details based on your PAN number. Review your PAN. + + If the details are correct, click **Yes, confirm**. Or, click **Edit PAN**. + + ![Review PAN](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-business-details-review-pan.jpg.md) + 9. Select your **brand name**. If the available options do not match your brand name, click **Other** and enter your brand name. Click **Continue**. + ![Review PAN](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-business-details-brand-name.jpg.md) + 10. **Review** the business details you entered. Click **Continue** after verifying the information. + ![Review business details - Registered](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-business-details-review-regd.jpg.md) + + + + + + + +### Business Documents (For Registered Businesses) + + Provide your business documents to help us verify your business identity. + + You must provide **at least 1 required document and 1 additional document**. Below is the list of accepted required and additional documents: + + **Required documents (Any 1)**: + - GST certificate + - MSME (UDYAM) Certificate + + **Additional (Any 1)**: + - Shop Establishment Certificate (SEC) + - Import Export Certificate (IEC) + - Mobile Postpaid Bill + + 1. Enter your **GSTIN number**. If you have a GSTIN, you must **upload your GST certificate**. If you do not, select the **I don't have a GSTIN** option. Click **Continue**. + ![Enter GSTIN](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-business-documents-gstin.jpg.md) + 2. Enter your **UDYAM MSME number** and **upload the MSME certificate**. Click **Continue**. + ![Enter UDYAM MSME details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-business-documents-udyam-msme.jpg.md) + 3. Select an **Additional document** and upload it. Click **Continue**. + ![Upload additional documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-business-documents-additional-docs.jpg.md) + 4. **Review** the business documents you provided. Click **Continue** after verifying the information. + ![Review business documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-business-documents-review.jpg.md) + + + +### KYC Details + + Complete your KYC to start accepting payments using Razorpay. + + + + For unregistered Individual businesses: + + 1. Enter your **mobile number** linked to your CKYC to avoid performing a video KYC. Click **Generate OTP**. + ![Review business details - Unregistered](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-ckyc-autofill.jpg.md) + 2. Enter the OTP. Click **Verify OTP**. + + If your details are successfully fetched, the screen appears as shown: + + ![Fetched CKYC details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-ckyc-details-fetched.jpg.md) + + If your CKYC verification fails, follow the below steps to share your Aadhar details using **Digilocker** or **upload manually**. + ![Add identity proof](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-add-identity-proof.jpg.md) + + + + Submit id proof using Digilocker + + 1. Select **Share Aadhar details via Digilocker**. Ensure that your mobile number is linked with your Aadhar. Click **Continue**. + 2. To accept Digilocker's Aadhar terms and conditions, click **Continue to digilocker**. + ![Add identity proof](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-digilocker-terms.jpg.md) + 3. Enter your **Aadhar number**. Click **Next**. + 4. Enter the captcha text. + ![Add](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-digilocker-enter-aadhar.jpg.md) + 5. **Enter the OTP** sent to your linked mobile number. Click **Continue**. + ![Add Aadhar](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-digilocker-enter-otp.jpg.md) + 6. Enter your **6-digit Digilocker pin**. + ![Add Aadhar](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-digilocker-enter-pin.jpg.md) + 7. **Provide consent** to share any issued document for KYC purpose. Click **Allow**. + + You will now be redirected back to Razorpay's onboarding page. Once the verification is successful, you can continue with the remaining steps. + ![Add Aadhar](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-digilocker-select-doc.jpg.md) + + + +### Upload id proof manually + + 1. Select **Upload Identity Proof Manually**. Click **Continue**. + 2. Select a **document to upload manually**. Click **Continue**: + - Aadhar Card + - Voter id + - Passport + ![Add Aadhar](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-manual-select-doc.jpg.md) + + + + + 3. Select and confirm your **business category and sub-category**. Click **Continue**. + ![Confirm business category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-confirm-category.jpg.md) + 4. Select your **Average delivery time after receiving an order**. You will be asked for this information only if your CKYC failed. + ![Confirm business category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-avg-del-time.jpg.md) + 5. Add your **Bank details**. + ![Add Aadhar](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-bank-details.jpg.md) + + Razorpay will now deposit ₹1 to this account to verify. If the bank verification fails you must **upload a proof of the bank account**. Choose from the given options: + - Video of cancelled cheque + - Letter/email from Branch Manager confirming account + ![Add Aadhar](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-bank-details-proof.jpg.md) + 6. You are now ready to submit your application. Click **Submit Application**. + ![Add Aadhar](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-submit-application.jpg.md) + + You can unlock international payments by clicking **Unlock International**. Know more about [International Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md). Or you can proceed to explore your dashboard by clicking **Explore Test Dashboard**. + + Once your details are verified by our team, **Live mode** will be enabled. + + +> **WARN** +> +> +> **Watch Out!** +> +> During the review process, we may reach out to you for clarifications. You can address these queries on the Dashboard. +> + + + + +### For registered businesses: + + 7. Select how you want us to collect your KYC details. You can: + - **Fetch details with PAN & OTP** + - **Share Aadhaar details via Digilocker** + - **Upload documents manually** + + If your details are successfully fetched, the screen appears as shown: + + ![Fetched CKYC details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-ckyc-details-fetched.jpg.md) + + If your CKYC verification fails, follow the below steps to share your Aadhar details using **Digilocker** or **upload manually**. + ![Add identity proof](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-add-identity-proof.jpg.md) + + + + Submit id proof using Digilocker + + 1. Select **Share Aadhar details via Digilocker**. Ensure that your mobile number is linked with your Aadhar. Click **Continue**. + 2. To accept Digilocker's Aadhar terms and conditions, click **Continue to digilocker**. + ![Add identity proof](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-digilocker-terms.jpg.md) + 3. Enter your **Aadhar number**. Click **Next**. + 4. Enter the captcha text. + ![Add](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-digilocker-enter-aadhar.jpg.md) + 5. **Enter the OTP** sent to your linked mobile number. Click **Continue**. + ![Add Aadhar](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-digilocker-enter-otp.jpg.md) + 6. Enter your **6-digit Digilocker pin**. + ![Add Aadhar](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-digilocker-enter-pin.jpg.md) + 7. **Provide consent** to share any issued document for KYC purpose. Click **Allow**. + + You will now be redirected back to Razorpay's onboarding page. Once the verification is successful, you can continue with the remaining steps. + ![Add Aadhar](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-digilocker-select-doc.jpg.md) + + + +### Upload id proof manually + + 8. Select **Upload Identity Proof Manually**. Click **Continue**. + 9. Select a **document to upload manually**. Click **Continue**: + - Aadhar Card + - Voter id + - Passport + ![Add Aadhar](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-manual-select-doc.jpg.md) + + + + + 8. Enter the **Authorised Signatory's name**. Click **Continue**. + ![Enter authorised signatory name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-enter-name.jpg.md) + 9. Select and confirm your **business category and sub-category**. Click **Continue**. + ![Confirm business category](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-confirm-category.jpg.md) + 10. Add the **Registered Business Address**. You will be asked for this information only if your CKYC failed. + ![Add Aadhar](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-regd-business-address.jpg.md) + 11. Add your **Bank details**. + ![Add Aadhar](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-bank-details.jpg.md) + + Razorpay will now deposit ₹1 to this account to verify. If the verification fails you must **upload a proof of the bank account**. Choose from the given options: + - Video of cancelled cheque + - Letter/email from Branch Manager confirming account + ![Add Aadhar](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-kyc-details-bank-details-proof.jpg.md) + 12. You are now ready to submit your application. Click **Submit Application**. + ![Add Aadhar](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-submit-application.jpg.md) + + You can unlock international payments by clicking **Unlock International**. Know more about [International Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md). Or you can proceed to explore your dashboard by clicking **Explore Test Dashboard**. + + Once your details are verified by our team, **Live mode** will be enabled. + + +> **WARN** +> +> +> **Watch Out!** +> +> During the review process, we may reach out to you for clarifications. You can address these queries on the Dashboard. +> + + + + + + + +### Video KYC (For Individual Unregistered Businesses If CKYC Fails) + + + 1. If your CKYC failed, you must proceed with the Video KYC process. Click **Start Video KYC**. + ![Start Video KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-video-kyc-start.jpg.md) + 2. Confirm if you are the authorised signatory proceeding with the video KYC process. Click **Continue**. + ![Start Video KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-video-kyc-confirm-auth-sign.jpg.md) + 3. If you are not the authorised signatory, you can share the VKYC shareable link with them. + ![Start Video KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-video-kyc-share-link.jpg.md) + 4. If you are the authorised signatory, review the instructions and click **Start**. + + +> **INFO** +> +> +> **Handy Tips** +> +> Ensure you have physical copies of your PAN and Aadhaar card ready. +> + + 5. Click **Accept & Proceed** to accept the terms and conditions. + ![Accept Video KYC Terms](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onboarding-video-kyc-accept-proceed.jpg.md) + 6. Click **Proceed** to start checking for camera, microphone and location. + + +> **INFO** +> +> +> **Handy Tips** +> +> Ensure no Proxy/VPN/TOR is active on your device. +> + + 7. A Razorpay agent will join and verify your documents on video. + + You have successfully completed your onboarding process. + + + +### After Your Account is Created + + - In some cases, additional details may be required once your account is created. + - You can accept payments and make payouts using a [range of products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md#product-suite). + - You can access the **Test** mode on the Dashboard to test and experience the products offered by Razorpay. Test mode does not involve actual money transactions. + - You have to generate separate API keys for Live and Test modes. Know more about [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). + + + +### Successful Activation + + Your **KYC Verification** is complete. You can: + + - Accept payments without any amount limits. + - Razorpay will automatically settle payments in your bank account as per your [settlement cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md#settlement-cycle). + - Request for [other payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md#view-payment-methods) and apply for [international payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#enable-payments-from-international-debit-and-credit-cards). + + +## CKYC Verification vs. Traditional Verification + +Complete KYC to start accepting payments with Razorpay. The new Master KYC-compliant process offers two verification paths: + + +### CKYC Verification + + - Instant verification using existing CKYC records + - No document uploads needed + - No Video KYC required + + + + How CKYC Works + + 1. **Enter PAN Details** + - **For registered businesses**: Business PAN and Date of Incorporation + - **For individuals**: Personal PAN + 2. **CKYC Record Check**: + - Razorpay checks if CKYC record exists for your PAN. + 3. **Consent via OTP**: + - If CKYC record is found, you must enter the mobile number linked to the CKYC. + - Enter the OTP sent by the CKYC system to provide consent. + 4. **Instant Verification** + - Documents auto-fetched from CKYC + - Identity verified instantly + - Proceed to additional requirements (if any) + 5. **CKYC Consent Process** + - **For Registered Businesses**: Your CKYC record is looked up using **Business PAN and Date of Incorporation**. + - **Date of Incorporation Sources**: + - Certificate of Incorporation + - GST Certificate + - Udyam Registration + - Business PAN document + - **For Individuals/Proprietorships**: Your CKYC record is looked up using **Personal PAN and Mobile OTP verification**. + + + + + + +### Traditional Verification + Video KYC + + - Required when CKYC data unavailable + - Upload required documents + - Complete Video KYC with Authorised Signatory + + +> **INFO** +> +> +> **Handy Tips** +> +> You can provide information in any order you prefer during KYC. Review and modify details from account creation if needed. Check the [complete list of KYC documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/business-types-kyc-documents.md) required for your business type. +> +> + +> **INFO** +> +> +> **Handy Tips** +> +> - During KYC verification process, you can provide the required information in any order you prefer. +> - You should review the details submitted during account creation and make changes if required. +> + +## Account States + +The status of your Dashboard account after signing up and submitting your KYC details might be in one of the following states: + +Account Status | Description +--- +`under_review`| When you have successfully submitted the KYC requirements and our team is reviewing the request. +--- +`needs_clarification`| When you are asked to provide clarifications related to the KYC details submitted. +--- +`activated`| When your KYC is approved and your account is ready to accept payments and settlements. +--- +`suspended`| When your account is disabled due to risk and compliance reasons. Contact our [support team](https://razorpay.com/support/#request) for a resolution. +--- +`rejected`| When the KYC details submitted by you are rejected. You can try creating a new account with correct KYC details. + +## 1. Sign Up + +To set up a Razorpay Account, go to the [Razorpay website](https://razorpay.com/) and click **Sign Up**. Follow these steps for a smooth sign up process: + + +### Contact Details + + Provide your contact details to get started: + + 1. Enter your **Mobile Number**. + 2. Click **Send OTP**. + 3. Enter the **OTP** sent to your mobile number. If you did not receive the OTP, click **Resend OTP**. + 4. Click **Submit OTP**. + 5. Enter your **Name** and click **Continue**. + + + +### Business Details + + Provide the following business details: + + 1. Enter your **Brand Name**. This should be the name of your business that your customers recognise. + 2. Click **Continue**. + + + +### Communication Details + + Provide details to receive account updates: + + 1. Enter your **email id** to receive account updates on your email and click **Send OTP**. + 2. Enter the **OTP** sent to your email id and click **Continue**. + + You can start accepting payments from customers once your KYC is completed. + + +> **INFO** +> +> +> +> **After Your Account is Created** +> +> - You can accept payments using a [range of products after KYC completion](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md#product-suite). +> - You can access the **Test** mode on the Dashboard to test and experience the products offered by Razorpay. Test mode does not involve actual money transactions. +> - You have to generate separate API keys for Live and Test modes. Know more about [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). +> + +## 2. Submit KYC Details + +Upon creating an account, you can start accepting payments from customers once your KYC is completed. The operations team will subsequently contact you to activate your account. + +**After Successful Activation** + +- Accept payments without any amount limits. +- Razorpay will automatically settle payments in your bank account as per your [settlement cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md#settlement-cycle). +- Request for [other payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md#view-payment-methods). + +## Set Up Multiple Accounts + +As a business owner, you may need different accounts for different kinds of work. +However, it is challenging to obtain a new mobile number each time you want to set up an account. With Multi-Account, you can set up different accounts using the same mobile number and email id as your existing account. + +#### Example + +Assume Gaurav is an Indian business owner who has an account with Razorpay using Mobile Number: `9000090000` and Email Id: `gaurav.kumar@example.com`. + +Gaurav uses **Multi-Account** feature to set up another account. Razorpay will use the same number and email id as shown above to set up the other account. This will work in a similar way in your respective country. + + +### Set up Another Account Using Website + + 1. Go to the [website](https://razorpay.com/) and click **Sign Up**. + 1. Enter your mobile number or email id and click **Continue**. + 1. Enter the OTP sent to your registered mobile number and click **Verify**. + 1. All the accounts linked to the entered number/email is are displayed. Click **Create a new account**. + ![Create another account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-multi-account.jpg.md) + 1. Select the country and click **Verify**. + 1. Your existing number and email id is already registered with the new account. Enter your name and continue with [Sign Up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#platform-details) and [KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#2-submit-kyc-details). + + + +### Set Up Another Account Using Dashboard + + 1. Log in to the Dashboard. + 1. Click the profile icon → **Switch Merchant**. + 1. Click **Create A New Account**. + ![Create multi account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-new-account-switch-merchant.jpg.md) + 1. Select the country and click **Verify**. + 1. Your existing number and email id is already registered with the new account. Enter your name and continue with [Sign Up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#platform-details) and [KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#2-submit-kyc-details). + + +> **WARN** +> +> +> **Watch Out!** +> +> If your mobile number is already linked to multiple user accounts with different email ids, you cannot use the **Multi-Account** feature to set up multiple accounts using that number. In this case, use another mobile number or sign up using your email id. +> +> +> +> Assume _Gaurav_ has 2 accounts with Razorpay. +> +> Assume Saurav is an Indian business owner and has 2 accounts with Razorpay. +> +> +> +> - Account 1: Mobile Number: `9123456789` | Email Id: `saurav.kumar@example.com` +> - Account 2: Mobile Number: `9123456789` | Email Id: `saurav.kumar+99@example.com` +> +> If Saurav tries to use the **Multi-Account** feature to make another account, Razorpay will block the creation of a new account. This will work similarly in your respective country. +> +> + +## Assisted Onboarding + + +### Why Hire an Onboarding Manager + + - **Dedicated onboarding manager**: Receive personalised support with a dedicated onboarding manager assigned to you within **1 hour**. + - **Swift account activation**: Get your account activated within 8 business hours and start accepting payments via Razorpay. + - **End-to-end assistance**: Receive comprehensive support until you complete your first transaction, addressing any queries throughout the process. + + + +### How to Hire an Onboarding Manager + + 1. On the [Razorpay sign-up page](https://easy.razorpay.com/), sign up using your mobile number. + 2. Click **Know more** under **Hire an onboarding manager for faster account set up!**. Complete the payment. + ![Hire a Razorpay onboarding manager.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/hire-onboarding-manager.jpg.md) + + An onboarding manager will be assigned to you within 1 hour to help you set up your account. + + +### Related Information + +- [KYC Documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/business-types-kyc-documents.md) +- [Frequently Asked Questions (FAQs)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/faqs.md) diff --git a/llm-content/payments/settlements.md b/llm-content/payments/settlements.md new file mode 100644 index 00000000..49efc8db --- /dev/null +++ b/llm-content/payments/settlements.md @@ -0,0 +1,131 @@ +--- +title: About Settlements +description: Check how Razorpay settles money received from your customers to your bank account- Settlement Cycle, Partial Settlements and Settlement States. +--- + +# About Settlements + +Settlement is the process in which the money received from your customers is settled in your bank account. Settlements for all payments are done in INR (Indian Rupees), irrespective of the currency in which the customer made the payment. Once Razorpay receives the amount, it is settled in your bank account after deducting fees. + +#### Prerequisites + +Following are some of the prerequisites for settlements of payments from customers to your bank account: +- Your account must be KYC approved. +- Your account must be fully activated for payments to be settled to your bank account. Know more about [KYC Verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#2-submit-kyc-details). +- The payment must be captured. Know more about [capturing payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + +## Settlement Cycle + +We automatically settle captured payments to the bank account you submitted to us during your [KYC verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#2-submit-kyc-details) following our settlement cycle. The settlement cycle is subject to bank approval and can vary based on your business vertical, risk factors and so on. + +![Checkout screen with details of Settlement Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settlement_cycle.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> Working days do not include the bank holidays. +> + +## Domestic Settlements + +The standard settlement cycle for domestic payments is **T+2** working days (where **T** is the date of transaction capture). + + +### Example + + You captured 20 payments on February 02, 2019 at 9:00 a.m., and your settlement schedule is **T+2** days. The payments you captured on February 02, 2019 is settled to your bank account on February 04, 2019 at 9:00 a.m. If the settlement day is a bank holiday, the settlement is made on the next working day after the bank holiday. + + +## International Settlements + +The default settlement cycle for international payments is as per applicable law(s). You can view your settlement cycle on the Razorpay Dashboard. + +Settlements for all payments is done in INR (Indian Rupees), irrespective of the currency in which the payment was made. The payment is converted using the exchange rate at the time of payment creation. + +Razorpay allows you to accept payments in any of the [supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +### Example + + You captured 7 international payments on February 02, 2019 and your settlement schedule is T+7 days 9:00 a.m. The payments you captured on February 02, 2019 is settled in your account on February 09, 2019 at 9:00 a.m.If the settlement day is a bank holiday, the settlement is made on the next working day after the bank holiday. + + +## Instant Settlements + +Using Instant Settlements, you can access your funds as and when you want. Normally, you would receive settlements according to your settlement cycle. Razorpay Instant Settlements helps you reduce your settlement period from **T+2** days (default settlement cycle) to a few minutes (from the time of the transaction), thus enabling your business to avoid cash-flow challenges and prepare better for working capital requirements. Know more about [Instant Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/instant.md). + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Partial Settlements + +Razorpay initiates partial settlements when your amount that requires settlement exceeds your current live balance (when the settlement is scheduled). Razorpay accurately calculates the amount that requires settlement based on the live balance, ensuring that settlements are not skipped. When settling transactions, we will only choose the ones that add up to your current live balance. + +This ensures that your settlements are timely and regular and you can maintain stable cash flow. + + +### Example 1 + + You captured a payment of ₹1000 on July 02, 2023, and your settlement schedule is T+2 days 5:00 p.m. Hence, the live balance is ₹1000, which will be the settlement amount. + + However, on July 02, 2023, you had to refund your customer ₹100. Due to this, your live balance is ₹900. As the current live balance is lesser than the settlement scheduled, Razorpay will initiate partial settlements and settle your current live balance of ₹900. + + + +### Example 2 + + You captured three payments of P1 - ₹500, P2 - ₹300 and P3 - ₹200 on July 02, 2023, and your settlement schedule is T+2 days 5:00 p.m. Hence, the live balance is ₹1000, which will be the settlement amount. + + However, on July 02, 2023, you had to refund your customer ₹100. Due to this, your live balance is ₹900. As the current live balance is lesser than the settlement scheduled, Razorpay will initiate partial settlements and settle transactions P1 and P2 on T+2 as it adds upto ₹900. P3 will be scheduled for the next day, shown as an upcoming settlement, and paid in the next slot. + + + 1000 on July 02, 2023, and your settlement schedule is T+2 days 5:00 p.m. Hence, the live balance is 1000, which will be the settlement amount. + + However, on July 02, 2023, you had to refund your customer 100. Due to this, your live balance is 900. As the current live balance is lesser than the settlement scheduled, Razorpay will initiate partial settlements and settle your current live balance of 900. + + + +### Example 2 + + You captured three payments of P1 - 500, P2 - 300 and P3 - 200 on July 02, 2023, and your settlement schedule is T+2 days 5:00 p.m. Hence, the live balance is 1000, which will be the settlement amount. + + However, on July 02, 2023, you had to refund your customer 100. Due to this, your live balance is 900. As the current live balance is lesser than the settlement scheduled, Razorpay will initiate partial settlements and settle transactions P1 and P2 on T+2 as it adds upto 900. P3 will be scheduled for the next day, shown as an upcoming settlement, and paid in the next slot. + + +## Settlement States + +Following are the various states of a settlement: + +![Settlement Life Cycle flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settlement_life_cycle.jpg.md) + +Some reasons for settlement failure: +- Your bank account is inactive or frozen. +- Incorrect bank account details. +- The settlement was rejected by your bank. + +## Dashboard Actions + +You can perform the following actions from the Razorpay Dashboard: + +- [View settlement details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/dashboard.md#view-settlements-using-dashboard) +- [Check settlements break-up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/dashboard.md#settlements-break-up-description) +- [Enable settlements on hold](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/dashboard.md#enable-settlements-placed-on-hold) +- [View reports related to settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/dashboard.md#reports) + +### Related Information + +- [Settlements APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/apis.md) +- [ Settlement FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/faqs.md) diff --git a/llm-content/payments/settlements/apis.md b/llm-content/payments/settlements/apis.md new file mode 100644 index 00000000..3aafe374 --- /dev/null +++ b/llm-content/payments/settlements/apis.md @@ -0,0 +1,39 @@ +--- +title: Settlements APIs +description: List of Settlements APIs and Instant Settlements (On-demand Settlement) APIs available to perform actions. +--- + +# Settlements APIs + +You can use the Settlement APIs to perform various actions. You can perform a few of these actions from the Dashboard as well. + +## List of Settlements API + +The table below lists the various Settlement APIs and gives a brief description of each API: + +API | Description +--- +[View All Settlements ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/settlements/fetch-all.md) | API to view all settlements. +--- +[View Settlements by Id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/settlements/fetch-with-id.md) | API to view settlement details by providing the settlement id. +--- +[Settlement Recon](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/settlements/fetch-recon.md) | API to view all transactions such as payments, refunds, transfers and adjustment settled to you for a particular day or month. + +List of Instant Settlements APIs: + +Term | Description +--- +[Create Instant Settlements ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/settlements/instant/create.md) | API to create an Instant Settlement. +--- +[Fetch all Instant Settlements ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/settlements/instant/fetch-all.md) | API to view all Instant Settlements. +--- +[Fetch Instant Settlements by id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/settlements/instant/fetch-with-id.md) | API to view Instant Settlement details by providing the settlement id. +--- +[Fetch all Instant Settlements with Payout Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/settlements/instant/fetch-all-payout.md) | API to retrieve payout details as part of the response for all instant settlements requests. +--- +[Fetch Instant Settlements with Payout ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/settlements/instant/fetch-with-id-payout.md) | API to retrieve payout details as part of the response for a specific instant settlement request. + +### Related Information +- [About Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md) +- [Settlements - Dashboard Actions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/dashboard.md) +- [ Settlement FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/faqs.md) diff --git a/llm-content/payments/settlements/dashboard.md b/llm-content/payments/settlements/dashboard.md new file mode 100644 index 00000000..3afcb208 --- /dev/null +++ b/llm-content/payments/settlements/dashboard.md @@ -0,0 +1,217 @@ +--- +title: Settlements - Dashboard Actions +description: View settlement details, check the settlements break-up, enable settlements on hold and view reports from the Razorpay Dashboard. +--- + +# Settlements - Dashboard Actions + +## View Settlements Using Dashboard + +You can view details of settlements made to you from the Dashboard. + +- View a detailed break-down of the amount settled to you from the Dashboard. +- View details, such as the total settlement amount (credit + debit amount), applicable service fees, service tax, adjustments, and so on. + +Watch this video to see how to view settlements from the Dashboard. + +[Video: https://www.youtube.com/embed/mmn2WkrmKwI?si=y3kf7FxP07YhHEpZ] + +To view settlement details: +1. Log in to the Dashboard. +2. Navigate to **Settlements**. +3. Click on the **details** of the settlement ID that you wish to refer to. + +### View Channel-Wise Settlements + + +### Benefits of Channel-Wise Settlements + + - **Zero cross-channel failures**: POS settlements will not fail due to online refunds. + - **Clear fund visibility**: Know exactly how much you have in each channel. + + +If you are an omni-channel business (Online (Domestic transactions + International Cards)) or cross-border business (Alternate Payment Method (International)), your settlements are processed separately for each channel type. This provides complete fund isolation and eliminates cross-channel settlement failures. + +### Understand Segregated Settlements + +With balance segregation, settlements are organised by channel type: + +Channel Type | Description | Transactions Included | Additional Details +--- +Online (Domestic transactions + International Cards) | Domestic online payments and international card transactions | PG domestic transactions (cards, UPI, netbanking and wallets), international card payments | Supports Instant Settlements. +--- +In-Person | POS terminal transactions | All POS/offline transactions | POS device rentals are automatically collected from this balance. Operates independently from online transactions. +--- +Alternate Payment Method (International) | Balance from international payment methods such as PayPal, Stripe and other cross-border payment methods | International bank transfers, cross-border payments via supported APM providers | Settled separately from domestic balances. Subject to forex conversion and international settlement timelines. + +![razorpay settlements details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-settings-settlements-details-segg-bal.jpg.md) + +Each channel type has its own settlement schedule and settlement history. + +#### View Settlements by Channel + +To view channel-wise settlements: + +1. Log in to the Dashboard. +2. Navigate to **Settlements**. +3. Use the **Balance Type** filter to select the channel you want to view: + + - **Online (Domestic transactions + International Cards)** + - **In-Person** + - **Alternate Payment Method (International)** + +The settlements list will display only settlements for the selected channel. + +#### Settlement Cards on Home Page + +On the Dashboard home page, you will see separate settlement cards for each active balance: + +- Each card shows the current balance, last settlement amount and next settlement date. +- Click on any card to view detailed settlement history for that channel. + +> **INFO** +> +> +> +> **Handy Tips** +> +> With segregated balances, you can now enable Instant Settlements for your PG Online balance even if you have POS or Cross-Border enabled. Previously, Instant setting were restricted for cross-border and omni-channel businesses. +> +> + +### View Settlements Using API + +You can view settlement details using the [Settlements API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/settlements.md). + +### Settlements Break-Up Description + +The following screenshot displays the settlement break-up: + +![Settlement break-up description image](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/settlements-2.jpg.md) + +A settlement has the following components: + +`Payment` +: The total payment amount that is being settled before deductions. + +`Adjustment` +: Adjustments to transactions, if any. + +`Tax` +: Tax deducted on the payment. + +`Fee` +: Fees deducted by Razorpay for the transactions. + +`Transfer` +: Transfers made if any, Transfers are payouts made to your [linked accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md). + + Linked accounts are accounts created for third-party sellers by you after onboarding them onto the Razorpay platform. + +`Refunds` +: Refunds made if any, are refunds you have issued to your customer. + + +### Example + + In this example, the amount settled to your account = Payment - Adjustment - Tax - Fee - Transfer + Refunds + + + + Transaction Details | Amount(₹) + --- + Payment | 50.00 + --- + Refunds | 10.00 + --- + Tax | 2.88 + --- + Fee | 16.00 + --- + Total amount settled in your account | 20.94 + + + + +### Example: Gross Settelements and Deductions Calculations + + Following is an example of gross settlements and deductions calculations of your settlement: + + ![settlement components detail view](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/settlement-components-view.jpg.md) + + The gross settlements and deductions calculations only apply to merchants on the prepaid model. + + + +--- +Payment | 18012.00 +--- +Adjustment | 6.00 +--- +Tax | 65.56 +--- +Fee | 364.24 +--- +Total amount settled in your account | 17576.20 + +A settlement has the following components: + +`Payment` +: The total payment amount that is being settled before deductions. + +`Adjustment` +: Adjustments to transactions, if any. + +`Tax` +: Tax deducted on the payment. + +`Fee` +: Fees deducted by Razorpay for the transactions. + +## View Settlement Timeline on Dashboard + +You can view the settlement timeline to check when the settlement for a particular payment will be credited. + +To view the settlement timeline: + +1. Log in to the Dashboard. +2. Navigate to **Settlements**. +3. Click on the **details** of the settlement id for which you want to view the timeline. +4. You will be able to see the settlement timeline for that particular settlement id. + + ![Razorpay Dashboard - View settlement timeline](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/settlements-details-timeline.jpg.md) + +5. Upon expanding the settlement timeline, you will be able to see the settlement schedule for that particular payment. + + +## Enable Settlements Placed On Hold + +Your settlement can be placed on hold if we detect some risk with your payments or with your Razorpay account. You are notified about this on your Dashboard. + +Contact the [support team](https://razorpay.com/support) to enable settlements that are placed on hold. + +![Settlements placed on hold](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/settlements-risk-soh-notice.jpg.md) + +To enable settlements when they are put on hold: +1. Log in to the Dashboard. +2. Navigate to **Home**. +3. Click **Resolve** on the notification as shown above.. + +## Reports + +Detailed insights can be gained using reports and real-time data on the Dashboard. These reports can then be used for accounting and reconciliation purposes. Know more about [ reports.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md) + +### Channel-Wise Settlement Reports + +For businesses with segregated balances, settlement reports include: + +- **Channel Type**: Identifies whether the transaction was from Online (Domestic transactions + International Cards), In-person and Alternate Payment Method (International). +- **Balance Account id**: Unique identifier for the specific balance account. + +You can filter reports by channel type to reconcile settlements for each balance separately. + +### Related Information + +- [About Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md) +- [Settlements API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/apis.md) +- [ Settlement FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/faqs.md) diff --git a/llm-content/payments/settlements/direct.md b/llm-content/payments/settlements/direct.md new file mode 100644 index 00000000..dc15babd --- /dev/null +++ b/llm-content/payments/settlements/direct.md @@ -0,0 +1,129 @@ +--- +title: Direct Settlements +description: Overview of how Razorpay manages Direct Settlements. Know how the money gets settled in your bank account. +--- + +# Direct Settlements + +In Direct Settlements, the bank settles the amount directly to your bank account. Razorpay does not have access to your funds as the bank directly settles the amount into your account. + +## Advantages + +With Razorpay Direct Settlements, you can: + +- Accept payments via multiple payment modes, such as net banking, UPI, or certain credit and debit cards. +- Look forward to faster settlements as it facilitates the bank to settle money directly to your account. +- Expect clean fee management. This is the fee that Razorpay charges for the amount settled in your account. + +## Prerequisites + +To facilitate a successful end-to-end Direct Settlement transaction: +- Create a Razorpay Account. +- Ensure to have a banking account after successful [KYC verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#kyc-verification). + +## Direct Settlement Flow + +Unlike [Razorpay Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md), the **Direct Settlement** process skips the flow of money into your Razorpay account. It lets the partner payment gateway or an acquiring bank settle funds directly into your account. As this is a merchant-level configuration, it prevents settlement creation for payments received on your Razorpay account. + +Following is the Direct Settlement flow diagram: + +![direct settlement cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-direct-settlement-cycle.jpg.md) + +The credits settled to your account are authorized by Razorpay, regardless of the settlement transaction data available in the Razorpay system. + +> **INFO** +> +> +> **Handy Tips** +> +> Any payments for Direct Settlements are auto-captured irrespective of using the Orders API. +> + +## Managing Credits + +Following are the two scenarios on how Razorpay manages extra credits for Direct Settlement merchants: + +- **Scenario 1** + +Where the payment is marked as `failed` by the Razorpay system but is settled to your account, Razorpay can forcefully authorise the transaction as per the confirmation from the bank. +- **Scenario 2** + +Sometimes, multiple payments with the same Payment ID get created due to the **payment retry option** provided by Payment Service Provider (PSP)/bank gateway. These payments never reach Razorpay and are directly settled to your account. As Razorpay does not receive the payment information, your Dashboard does not reflect such payments. Due to this, you are also unable to refund the payment. To tackle such situations, Razorpay will create new payments and authorise them for the extra credits. You will have complete control over refunding such transactions. + +## Payment Methods + +We support the following payment methods for Direct Settlements. The banks that support Direct Settlements are based on the payment methods. You can accept payments using the following payment methods: + +### Netbanking + +We support direct settlements for netbanking payments made from the following banks: + +Bank Name | Bank Code +--- +Axis Bank | `UTIB` +--- +HDFC Bank | `HDFC` +--- +ICICI Bank | `ICIC` +--- +IDFC First Bank | `IDFB` +--- +IndusInd Bank | `INDB` +--- +Kotak Bank | `KKBK` +--- +State Bank of India | `SBIN` +--- +YES Bank | `YESB` + +### Debit and Credit Cards + +We support direct settlements for debit and credit card payments made from the following banks: + +Bank Name | Bank Code +--- +American Express | `AMEX` +--- +HDFC Bank | `HDFC` + +### UPI + +We support direct settlements for UPI payments made from the following bank: + +Bank Name | Bank Code | TPV flow +--- +Axis Bank | UTIB | Collect +--- +ICICI Bank | ICIC | Intent and Collect + +## Handling Fees +Following are the two models in which Razorpay charges the fees: + +- **Prepaid model**: The fee amount is either subtracted from your account balance or adjusted with fee credits. Razorpay settles the entire transaction amount to your account. +- **Postpaid model**: Razorpay settles the entire transaction amount to your account and raises an invoice at the end of the month for fees due on all the transactions. + +## Handling Refunds + +Direct Settlement refunds are handled by banks, and Razorpay has no control over them. Following are the two ways in which we support refunds for Direct Settlements: + +- **Direct Settlements with Refund** + - Settlements for payments are credited to your bank account. + - The refund amount is instantly debited from your bank account. +- **Direct Settlements without Refund** + - Settlements for payments are credited to your bank account. + - The refund amount is instantly debited from your Razorpay account balance and is debited from the net settlements in the subsequent settlement cycle between Razorpay and merchants. + +## Use Cases + +Refer to the following scenarios about how Direct Settlements helps you to accept payments. + +- **Acceptance of Payments Using Various Modes** + + You can accept payments from various payment methods. Integrate with Razorpay to enable payments for those modes for which Razorpay cannot become an acquirer. + +- **Time-bound Settlements** + + These settlements require the money to be settled to them before a particular time of the day. + + ### Example + Acme Corporation offers various mutual fund products and brokerage services to its customers. They require the money to be settled to them before a certain time of the day, without fail, for the customer to get the NAV (Net Asset Value) of that particular day. With Razorpay, Acme Corporation opts for Direct Settlements, as it expects funds immediately for NAV bookings. It saves time as the Direct Settlement process skips the step of flowing money into your Razorpay account and lets the partner payment gateway/PSP or an acquiring bank settle funds directly. diff --git a/llm-content/payments/settlements/direct/route.md b/llm-content/payments/settlements/direct/route.md new file mode 100644 index 00000000..c1c60759 --- /dev/null +++ b/llm-content/payments/settlements/direct/route.md @@ -0,0 +1,263 @@ +--- +title: Direct Settlements for Linked Accounts on Route +heading: Direct Settlements on Route +description: Route for Direct Settlement (DS) automates payment splits for DS transactions, letting businesses auto-distribute funds to linked accounts. +--- + +# Direct Settlements on Route + +is an enhancement to Razorpay's existing Route product that enables businesses using Direct Settlement transactions to automatically split payments among multiple vendors, suppliers or linked accounts. + +Direct Settlement refers to the settlement of money directly from the gateway to the business without involving Razorpay in the money movement. In DS transactions, funds move from the customer to the gateway, then directly to the business' account, bypassing Razorpay's escrow system. + +> **INFO** +> +> +> +> **Feature Request** +> +> - This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> - Watch this video to know how to raise a feature enablement request on the Dashboard. +> +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> + + to get this feature activated on your account. + +## Advantages + + +### For Banking Partners + + - **Eliminates Manual Processing**: No need to manually calculate and distribute funds to linked accounts. + - **Reduces Operational Overhead**: Streamlined process reduces time and resources spent on settlement management. + - **Improves Accuracy**: Automated processing significantly reduces errors in split calculations. + - **Enhanced Reconciliation**: Simplified reconciliation process with consistent reporting. + + + +### For Businesses + + - **Faster Vendor Payouts**: Automated splits enable quicker payments to suppliers and partners. + - **Consistent Experience**: Same Route functionality regardless of settlement method (DS or standard). + - **Operational Efficiency**: Reduced manual intervention in payment distribution. + + + +### For Linked Account Holders (Vendors/Suppliers) + + - **Timely Payments**: Faster receipt of funds without manual processing delays. + - **Predictable Settlement**: Automated processing ensures consistent payment timing. + + +## Standard Route vs. + + operates differently from standard Route by bypassing the traditional balance check mechanism while maintaining all other Route functionalities. + + +### Standard Route vs. + + + + **Feature**|Standard Route| | + --- + **Balance Check**|Required|Bypassed| + --- + **Fund Flow**|Through Razorpay escrow|Direct to business| + --- + **Settlement Speed**|T+2 (standard)|Based on banking partner schedule| + --- + **Transfer Limit**|Based on Razorpay dashboard balance|As per original transaction amount| + --- + **Availability**|Business hours dependent|Banking partner dependent| + --- + **Money Movement**|Razorpay-managed|Banking partner-managed| + --- + **Refund Impact**|Standard process| | + --- + **Additional Fees**|Standard Route fees|As per banking partner| + + + + +## Use Cases + +Here is a list of use cases for : + + +### E-commerce Marketplaces + + E-commerce marketplaces connect buyers and sellers, often on a large scale. They use technology to manage product listings, payments, and order fulfillment. + + Acme Marketplace provides an online platform where multiple sellers can list their products. The platform uses to manage payments seamlessly. + + Here is how helps Acme Marketplace: + + **Step 1: Customer Purchase** + + A customer buys products from various sellers in a single transaction. + + **Step 2: Payment Collection** + + The payment is processed and collected by Acme Marketplace through its payment gateway. Since they use Direct Settlement, the funds are instantly settled to the marketplace's bank account. + + **Step 3: Payment Split** + + Once the payment is settled, automatically splits the amount. The platform's commission is retained, and the remaining amount is disbursed to the respective sellers. + + + +### Service Aggregators + + Service aggregators bring together various service providers under one platform, like home services, freelance work, or ride-sharing. They use technology to match customers with providers and handle payment logistics. + + Acme Services is a platform that connects customers with freelance photographers. They use for efficient payment management. + + Here is how helps Acme Services: + + **Step 1: Customer Booking** + + A customer books a photography session with a freelance photographer through the Acme Services app and makes a payment. + + **Step 2: Payment Settlement** + + The payment is settled directly into Acme Services' bank account using Direct Settlement. + + **Step 3: Fee Distribution** + + automatically splits the payment. The platform retains its service fee, and the rest is transferred to the photographer's account, ensuring both parties are paid accurately and on time. + + + +### Franchise Operations + + Franchise businesses consist of a central headquarters and multiple independent franchise locations. They use technology to maintain brand consistency and streamline financial operations. + + Acme Fitness is a national gym chain with multiple franchise locations. They use to centralise membership fee collection while ensuring each location receives its share. + + Here is how helps Acme Fitness: + + **Step 1: Member Payment** + + A new member signs up and pays for a membership at their local Acme Fitness branch. The payment is processed through the central headquarters' payment gateway. + + **Step 2: Direct Settlement** + + The funds are instantly settled into the headquarters' bank account via Direct Settlement. + + **Step 3: Payment Routing** + + automatically routes a portion of the payment to the specific franchise location where the membership was purchased, after deducting the headquarters' royalty fees. + + + +### Supply Chain Finance + + Supply chain finance involves the technologies and processes used to manage the financial flow between buyers and suppliers. This often includes automated payment systems to improve efficiency and cash flow. + + Acme Manufacturing produces industrial parts and has a network of suppliers. They use Route on Collect Now to automate payments to these suppliers upon fulfilling an order. + Here is how Route on Collect Now helps Acme Manufacturing: + + **Step 1: Customer Order** + + A customer places a large order for parts on Acme Manufacturing's platform. + + **Step 2: Payment and Settlement** + + The customer's payment is collected and settled directly into Acme Manufacturing's account. + + **Step 3: Automated Supplier Payments** + + Upon the order's completion, Route on Collect Now automatically disburses payments to the relevant suppliers for the materials they provided, ensuring timely and hassle-free payments across the supply chain. + + + +## Supported and Non-Supported Transaction Types + + supports the following transaction and transfer types: + + + + **Payment Transfers** + + - Created after payment capture via webhook integration. + - Can be created through Payment Transfer API or Razorpay dashboard. + - Linked account holder responsibility to retry failed transfers. + - Fees and taxes must be deducted before creating transfers. + + + + + - **Direct Transfers**: Not supported for DS transactions as these require balance deduction from Razorpay escrow account. + - **International Currencies**: Currently limited to INR transactions only. + - **Partial Payment Orders**: Orders with `partial_payment` parameter enabled cannot use transfers. + - **Order transfers**: To use payments, you must create a transfer at the time of the payment, not the order. + + + +## Linked Account Management + + + + + + + #### Onboarding Methods + + - **S2S APIs**: Server-to-server integration for programmatic onboarding. + - **Bulk Upload**: CSV-based bulk account creation. + - **Razorpay Dashboard**: Manual onboarding through web interface. + + #### Features Available + + - Full self-service linked account management. + - Real-time account status updates. + - Dashboard access for linked account holders (configurable). + - Flexible permissions and access controls. + + + supports a comprehensive refund scenario: + + +### Direct Settlement with Refunds + + **Configuration**: Gateway (partner bank) directly handles refund processing and money movement. + + #### Refund Settlement Process + + - Refund amount is directly deducted from business' bank account by the gateway. + - Razorpay processes refund request and communicates to partner bank. + - No impact on Razorpay's escrow balance. + + #### Refund Scenarios + + + + Transfer Status|Refund Available|Process| + --- + Settled|Yes|Business can reverse amount from linked account first, then refund.| + --- + Not Settled|Yes|Transfer reversal not required as funds have not moved.| + + + + ### Refund Processing Options + + **Partial Refunds**: Supported for both configurations with proportional linked account adjustments. + + #### Failure Scenarios + + - **With Refunds**: Bank may reject if insufficient business balance. + - **Without Refunds**: Refund creation fails if insufficient Razorpay balance. + + #### Actions Required + + - Monitor refund status and handle failures appropriately. + - Maintain adequate balances based on refund configuration. + - Implement proper error handling for refund API responses. + + +### Related Information + +- [Setup and Configuration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/direct/route/setup.md) +- [Troubleshooting FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/direct/route/troubleshooting-faqs.md) diff --git a/llm-content/payments/settlements/direct/route/setup.md b/llm-content/payments/settlements/direct/route/setup.md new file mode 100644 index 00000000..a6980d3d --- /dev/null +++ b/llm-content/payments/settlements/direct/route/setup.md @@ -0,0 +1,101 @@ +--- +title: Setup Direct Settlements on Route +heading: Setup and Configuration +description: Enable Route for Direct Settlement payments. Setup guide, eligibility criteria, linked account management and troubleshooting tips. +--- + +# Setup and Configuration + +can use the Route integration to automatically split payments. + +Eliminate manual calculations and reduce operational overhead with faster vendor payouts. This solution requires a new integration and the use of additional APIs for transfer creation. + +## Primary Eligibility Criteria + + +### VAS Partners under Banking Organisations + + - Businesses acquired by banking partners (such as HDFC Bank). + - Currently using Razorpay's payment stack through banking partnerships. + - Part of programs like HDFC Collect Now or similar banking initiatives. + + +## Setup and Configuration + +One of the key advantages of is the minimal setup required: + +- **New API for Transfer Creation**: A new API is used to create transfers. +- **No Code Changes (for existing Route users)**: If you already have a Route implementation, it will work seamlessly with Direct Settlement transactions. + +**Things that will remain the same for existing Route users:** + +- **API endpoints and request/response formats**: If you are already using Razorpay Route, you will continue to use the same API endpoints and formats. +- **Webhook configurations and event handling**: Your existing webhook configurations and event handling processes will remain unchanged. +- **Dashboard interface and reporting**: The dashboard interface and reporting will be familiar. +- **Transfer creation and management processes**: + +> **WARN** +> +> +> +> **Watch Out!** +> +> No technical setup is required from businesses. This feature must be enabled by your banking partner or [Razorpay support team](https://razorpay.com/support/) through appropriate feature flags. +> +> + +## Use Current Setup + +Businesses who have already integrated with Razorpay Route can continue with their existing setup and patterns. + +### API Compatibility + +All existing Route APIs work with DS transactions: + +- [`POST /payments/{id}/transfers`](https://razorpay.com/docs/api/payments/route/create-transfers-payments) +- [`GET /payments/{id}/transfers`](https://razorpay.com/docs/api/payments/route/fetch-transfers-payment) +- [`GET /transfers/{id}`](https://razorpay.com/docs/api/payments/route/fetch-a-transfer) + +## Linked Account Setup + +### Onboarding Process + +Banking partners manage the linked account setup similar to parent business onboarding: + + +### Information Collection + + - Account holder details (Name, email and phone). + - Business information (Registration type, PAN and GST). + - Settlement details (Beneficiary name, account number and IFSC). + + + +### Bulk Processing + + - Bank provides linked account details via operations process. + - Accounts onboarded through bulk CSV upload. + - Validation through batch processing system. + + + +### Account Validation + + - Verify batch processing status. + - Confirm accounts appear in Razorpay dashboard. + - Test transfer creation capabilities. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> For technical support during migration or troubleshooting: +> +> - Contact your banking partner for Account-related issues. +> - Reach out to for API and technical problems. +> - Use your designated account manager for strategic guidance. +> +> diff --git a/llm-content/payments/settlements/direct/route/troubleshooting-faqs.md b/llm-content/payments/settlements/direct/route/troubleshooting-faqs.md new file mode 100644 index 00000000..e7a51971 --- /dev/null +++ b/llm-content/payments/settlements/direct/route/troubleshooting-faqs.md @@ -0,0 +1,219 @@ +--- +title: Troubleshooting & FAQs +description: Troubleshoot common error scenarios and find answers to frequently asked questions. +--- + +# Troubleshooting & FAQs + +## Frequently Asked Questions (FAQs) + + +### 1. How do I know if I am eligible for ? + + You are eligible if: + - You must be a partner under a banking partner (like HDFC Bank) + - You need to split payments among multiple vendors or accounts + + Contact your banking partner or Razorpay account manager to confirm your eligibility and get the feature enabled. + + + +### 2. If I am already integrated with Razorpay Route, do I need to change my existing integration to support DS payments? + + No, your existing Razorpay Route integration will automatically work for DS payments once the feature is enabled. The system detects DS transactions and processes them accordingly without any code modifications. + + + + + +### 3. What happens if I try to create a transfer larger than my payment amount? + + If your total transfer amount exceeds the payment amount, you will get an error: "Transfer amount can't be greater than the payment." This prevents over-distribution of funds. + + + +### 4. Can I use Direct Transfers with ? + + No, Direct Transfers are not supported for . Direct Transfers require deducting money from your Razorpay balance, but payments do not flow through Razorpay's escrow account. You can only use Payment Transfers with . + + + +### 5. Will I see settlement entries on my dashboard for ? + + Yes, you will see settlement entries, but they will show net amount as 0 since the actual money movement is handled by your banking partner. This maintains visibility and reporting consistency while reflecting the true settlement flow. + + + +### 6. How long do take to reach linked accounts? + + transfer timing depends on your banking partner's settlement schedule and processes. Unlike standard Route transfers, there is no instant settlement option for DS since funds flow directly through your banking partner rather than Razorpay's escrow. + + + +### 7. Are there any additional fees for using Route on DS? + + Please get in touch with the bank SPOC for details regarding fees. + + + +### 8. Can I accept different payment methods like cards, UPI, and netbanking on the same account? + + Yes. Since DS (Direct Settlement) is configured at the terminal level, you can accept a mix of payment methods like cards, UPI, and netbanking. Route automatically applies the correct logic based on which terminal processed the payment. + + + +### 9. What reports are available for Route transactions? + + You have access to the same reporting as standard Route: + - Transaction reports (shared with banking partners for settlement processing) + - Transfer reports showing all split payment details + - Dashboard analytics for monitoring transfer performance + - Settlement reports reflecting the split amounts + + + +### 10. What should I do if my transfers are failing consistently? + + Contact your banking partner for settlement-related problems for API-related issues. + + You may check for the following: + 1. Are you using supported transfer types (Payment transfers)? + 2. Is your total transfer amount less than or equal to the payment amount? + + + + +### 11. How do I track if a transfer was successful? + + Use the same APIs you use for regular transfers: + - `GET /transfers/{id}` to check individual transfer status. + - `GET /payments/{id}/transfers` to see all transfers for a payment. + - Monitor your dashboard for transfer status updates. + - Check with your banking partner for actual settlement confirmation. + + + +### 12. Can linked accounts access their own dashboards for ? + + Dashboard access for linked accounts is configurable and can be defined during the onboarding process. Your banking partner or parent business can control what level of access each linked account has to transaction and settlement information. + + + +### 13. Can I use with international transactions? + + Currently, is limited to INR transactions only. Support for international currencies is not available in the current implementation but may be considered for future releases based on market demand. + + + +### 14. How to fix insufficient linked account balance issue? + + This issue occurs when transfer reversal fails due to insufficient linked account balance. + + - **Symptoms**: + + - Reversal API returns insufficient balance error. + - Dashboard shows failed reversal status. + - Settlement file shows incomplete settlement entries. + + - **Solutions**: + + - **Check Linked Account Balance**: Verify available balance before attempting reversal. + - **Partial Reversals**: Create multiple smaller reversal amounts. + - **Alternative Recovery**: Coordinate with banking partner for manual recovery process. + - **Prevention**: Implement balance checks in your application logic. + + + + +### 15. How to fix invalid account details issue? + + This issue occurs when a linked account is setup with incorrect banking information. + + - **Symptoms**: + + - Settlement failures in processing. + - Banking partner reports invalid account errors. + - Transfers show processed but funds not credited. + + **Solutions**: + + - **Account Verification**: Re-verify account number, IFSC, and beneficiary name. + - **Update Process**: Contact banking partner to update account details. + - **Test Transfers**: Perform small test transfers before full implementation. + - **Documentation**: Maintain accurate records of all linked account details. + + + +### 16. How to fix a transfer block due to compliance issues? + + Transfers can get blocked due to regulatory or compliance restrictions. Below are a few symptoms to help you identify if an issue is compliance-related. + + - **Symptoms**: + + - Transfers fail with compliance-related error codes. + - Banking partner flags certain transactions. + - Sudden transfer failures for previously working accounts. + + - **Solutions**: + + - **Documentation Review**: Ensure all KYC and business documents are current. + - **Banking Partner Coordination**: Work with bank compliance team to resolve blocks. + - **Transaction Limits**: Verify transfers are within approved limits. + - **Regular Monitoring**: Implement alerts for compliance-related failures. + + + +### 17. Bank holiday delayed my settlement transaction. What do I do? + + settlements follow your banking partner's schedule, which means they may be delayed during banking holidays and weekends. Since your banking partner manages the actual money movement, settlement timing is outside of Razorpay's control. + + - **Expected Behavior**: + + - settlements follow banking calendar, not 24/7 processing. + - Settlement file processing may be delayed. + - Linked accounts receive funds based on banking working days. + + - **Management Strategies**: + + - **Holiday Calendar Planning**: Account for banking holidays in settlement expectations. + - **Customer Communication**: Inform linked accounts about expected delays. + - **Buffer Management**: Plan cash flow around known banking holidays. + - **Alternative Arrangements**: Coordinate with banking partner for urgent settlements. + + + +### 18. How do I perform a large value transfer smoothly? + + High-value transfers require additional processing time + - **Threshold Considerations**: + + - Transfers above certain limits may trigger additional verification. + - Banking partner risk controls may delay processing. + - Manual approval required for exceptional amounts. + + - **Best Practices**: + + - **Amount Splitting**: Break large transfers into smaller batches. + - **Advance Notice**: Inform banking partner of planned large transfers. + - **Documentation**: Provide supporting documents for high-value transactions. + - **Timing Coordination**: Plan large transfers during optimal processing windows. + + + +### 19. Transaction delayed due to technical issue. What do I do? + + + Sometimes, system or integration problems affect transfer processing. Here a few common scenarios: + + - **Common Scenarios**: + + - API timeouts during transfer creation. + - Settlement file generation delays. + - Dashboard reporting inconsistencies. + + - **Resolution Steps**: + + - **Status Monitoring**: Regularly check transfer and settlement status. + - **Support Escalation**: Reach out to for technical issues. + - **Backup Processes**: Have manual reconciliation procedures ready. + - **System Health Checks**: Monitor API response times and success rates. diff --git a/llm-content/payments/settlements/faqs.md b/llm-content/payments/settlements/faqs.md new file mode 100644 index 00000000..6b05b58f --- /dev/null +++ b/llm-content/payments/settlements/faqs.md @@ -0,0 +1,331 @@ +--- +title: Payments | Settlements - FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Payment Settlements. +--- + +# Frequently Asked Questions (FAQs) + +## Settlements + + +### 1. What are settlements? + + Settlement is the process in which the money received from your customers is settled to your bank account. Settlements for all payments will be done in INR (Indian Rupees), irrespective of the currency in which the payment was made by the customer. Settlement cycle is subject to bank approval and can vary based on your business vertical, risk factor, and so on. Each settlement generated has a unique settlement id attached to it along with the amount settled. Know more about [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md). + + + +### 2. What is the settlement cycle you offer? + + Our standard settlement cycle is T+2 working days, T being the date of transaction capture. This means that the captured payments are settled within 2 working days from the date of capture. + +> **INFO** +> +> +> +> **Handy Tips** +> +> Working days do not include second and fourth Saturdays, Sundays and bank holidays. +> + + + + +### 3. How do I check settlements in my bank account? + + Each settlement has a Unique Transaction Reference (UTR) number, which is provided by our banking partners. You can see this number in the settlement section when you click on a particular settlement id. You can also download **Settlement Reports** from the **Reports** section to view UTR. This is a unique reference number available across banks, which can be used to track a specific settlement in your bank account. + ![UTR](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/settlements-utr.jpg.md) + + + +### 4. The status of my settlement shows as failed on the Dashboard. What do I do? + + Razorpay sends emails regarding blocked or failed settlements to your registered email address. Please revert to the email with the necessary details. If you have not received any email from Razorpay, please contact our [Support Team](https://razorpay.com/support/#request) for assistance. + + + +### 5. How to reconcile settlements along with the transactions made? + + You can [download a daily or a monthly report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md#generate-reports) for the **Settlement Reconciliation Report** from the **Reports** section on the Dashboard. The report contains transactions and the corresponding settlement ids. + + + + +### 6. Why are my settlements blocked? + + Razorpay sends emails regarding blocked or failed settlements to your registered email address. Please revert to the email with the necessary details. If you have not received any email from Razorpay, please contact our [Support Team](https://razorpay.com/support/#request) for assistance. + + +## Balance Segregation + + +### 1. What is Balance Segregation? + + Balance Segregation is a feature that maintains separate balances for each payment channel type. + + Instead of having one combined balance, you now have multiple isolated balances: + - **Online (Domestic transactions + International Cards)**: Domestic PG transactions and international card payments. + - **In-Person**: POS terminal transactions. + - **Alternate Payment Method (International)**: Balances from international bank transfer. + + This ensures complete fund isolation, regulatory compliance and eliminates cross-channel settlement failures. + + + +### 2. Why are my balances now showing separately on the Dashboard? + + If you are an omni-channel business (using both PG and POS) or a cross-border business, your balances are automatically segregated by channel type. This is to ensure compliance with RBI guidelines that prohibit co-mingling of funds across different payment channels and to provide you with better visibility and control over your funds. + + + + +### 3. What is included in the Online (Domestic transactions + International Cards) balance? + + The Online (Domestic transactions + International Cards) balance includes: + - All domestic PG transactions (cards, UPI, netbanking, domestic wallets). + - International card transactions. + + This balance is separate from your In-Person (POS) and APM International balances. + + + +### 4. What is included in the In-Person balance? + + The In-Person balance includes all transactions processed through POS terminals. This balance is used for: + - POS transaction settlements. + - POS device rental deductions (if applicable). + - Refunds for POS transactions. + + It operates completely independently from your Online (Domestic transactions + International Cards) balance. + + + +### 5. What is included in the APM (International) balance? + + The Alternate Payment Method (International) balance includes cross-border transactions made through international bank transfers. + + This is separate from international card transactions, which are included in the Online (Domestic transactions + International Cards) balance. + + + +### 6. How does Balance Segregation affect my settlements? + + **With Balance Segregation**: + + - Settlements are processed separately for each balance account (Online (Domestic transactions + International Cards), In-Person, APM International). + - Each balance has its own settlement schedule. + - Refunds and chargebacks are debited only from the respective channel balance. + - You can enable Instant Settlements independently for each balance. + - Settlement failures due to cross-channel fund usage are eliminated. + + + +### 7. I am a PG + POS business. Can I now use Instant Settlements? + + Yes. With Balance Segregation, Instant Settlements is now available for omni-channel businesses. You can enable Instant Settlements on your PG Online balance independently of your POS balance. This was previously restricted to prevent cross-channel fund utilisation issues, which are now resolved with segregated balances. + + + +### 8. I am a Cross-border business. How does Balance Segregation benefit me? + + For cross-border businesses, Balance Segregation provides: + - Separate balance for APM (International) transactions. + - International card transactions tracked in your Online (Domestic transactions + International Cards) balance. + - Instant Settlements enabled for your Online (Domestic transactions + International Cards) balance. + - Clear visibility of domestic vs international transaction funds. + + + +### 9. What happens to refunds with segregated balances? + + Refunds are now processed from the same channel balance where the original payment was received: + - Online payment refund → debited from Online (Domestic transactions + International Cards) balance + - In-Person (POS) payment refund → debited from In-Person balance + - APM International payment refund → debited from APM International balance + + This ensures that refunds in one channel never impact settlements in another channel. + + + +### 10. Will my existing balance be migrated to segregated balances? + + No, existing balances are not migrated. Balance Segregation applies to new transactions going forward. Your current combined balance will continue to be settled as per your existing settlement cycle, while new transactions will be credited to the appropriate segregated balance based on channel type. + + + +### 11. How do I view my segregated balances on the Dashboard? + + You can view your segregated balances in multiple places on the Dashboard: + - **Home Page**: Separate balance cards for each channel type (Online (Domestic transactions + International Cards), In-Person, APM International). + - **Settlements Page**: Filter settlements by balance type. + - **Account & Settings → Balances**: Detailed view of all your balance accounts. + + Each balance card shows the current amount, next settlement date and settlement cycle. + + + +### 12. Can I transfer funds between my segregated balances? + + No, inter-channel fund transfers are not currently supported. Each balance operates independently to maintain fund isolation and regulatory compliance. If you have specific requirements, please contact our [Support Team](https://razorpay.com/support/#request). + + + +### 13. How are POS device rentals collected with Balance Segregation? + + With Balance Segregation, POS device rentals are automatically collected from your POS (In-Person) balance only. This ensures that rental deductions never impact your PG Online balance or cause settlement failures. The collection is automated through the Meter Pricing Platform for businesses enrolled in the program. + + + +### 14. Will my settlement reports change with Balance Segregation? + + Yes, settlement reports now include additional fields: + - **Channel Type**: Identifies the source channel (Online (Domestic transactions + International Cards), In-Person, APM International). + - **Balance Account id**: Unique identifier for the balance account. + + You can filter reports by channel type to reconcile each balance separately. The Settlement Reconciliation Report will show transactions grouped by their respective balance accounts. + + + +### 15. I see multiple balances but I only use PG Online. Why? + + If you only use PG Online for domestic transactions, you will typically see just one balance account (Online (Domestic transactions + International Cards)). Multiple balances appear only when you have: + + - Both PG Online and POS enabled (In-person). + - International bank transfers (APM International balance). + - International card payments (included in Online (Domestic transactions + International Cards) balance). + + If you believe there is an error in your balance configuration, please contact our [Support Team](https://razorpay.com/support/#request). + + + +### 16. Are international card transactions and international APM transactions in the same balance? + + No, they are in separate balances: + - **International card transactions** are included in the **Online (Domestic transactions + International Cards)** balance along with domestic transactions. + - **International APM transactions** (international bank transfers) are in the separate **APM (International)** balance. + This separation ensures proper fund isolation for different payment method types. + + +, irrespective of the currency in which the payment was made by the customer. Settlement cycle is subject to bank approval and can vary based on your business vertical, risk factor, and so on. Each settlement generated has a unique settlement id attached to it along with the amount settled. Know more about [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md). + + + +### 2. What is the settlement cycle you offer? + + Our standard settlement cycle is T+2 working days, T being the date of transaction capture. This means that the captured payments are settled within 2 working days from the date of capture. + + + +### 3. The status of my settlement shows as failed on the Dashboard. What do I do? + + Check if you have received a email from our Support Team. Please revert to the mail with the necessary details. If you have not received any email from Razorpay, please contact our for assistance. + + + +### 4. How to reconcile settlements along with the transactions made? + + You can [download a daily or a monthly report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md#generate-reports) for the **Settlement Reconciliation Report** from the **Reports** section on the Razorpay Dashboard. The report contains transactions and the corresponding settlement ids. + + +## Instant Settlements + + +### 1. What are Instant Settlements? + + By default, the settlement cycle is T+2 days for domestic payments and T+7 days for international payments, where `T` is the date the payment was captured. + + The Instant Settlement feature allows you to settle your current balance to your bank account instantly 24x7 for a small fee. You can either settle your current balance in full or choose to settle a portion of it as per your needs. + + + +### 2. Are there any additional charges for Instant Settlements? + + Yes. We charge a [small fee](https://razorpay.com/capital/instant-settlements/#capital-pricing-section) to process Instant Settlements. + + + +### 3. How is the fees and tax for an Instant Settlement deducted? + + The fees and tax for an Instant Settlement is deducted from the request settlement amount. + For example, you place a request for . Fees of and tax of is deducted from the requested amount and the remaining amount, is settled to your bank account. + + + +### 4. Why is there a limit on Instant Settlements? + + We have introduced the limits on Instant Settlements to make the settlement process more predictable for your daily needs. With limits, you can: + - Settle a definite amount from the assigned limit until the next working day. + - Enjoy a quicker and higher success rate throughout the working day. + + For any queries, [contact support](https://razorpay.com/support/#request) or your Relationship Manager. + + + +### 5. Once enabled, do I need to make Instant Settlement request for all my settlements? + + No. You can create an Instant Settlement request when you need the money. If you do not create an Instant Settlement, your current balance is settled to your bank account as per your settlement cycle. + + + +### 6. What happens to my current balance if I do not make any Instant Settlement requests? + + Your current balance is settled to your bank account as per your settlement cycle. + + + +### 7. Once Instant Settlements are enabled, will I be charged for all my settlements? + + No. You will only be charged for the Instant settlements you create. You will not be charged for settlements that happen according to your settlement cycle. + + + +### 8. How do I enable instant settlements? + + Instant settlements is an on-demand feature. [Raise a request](https://razorpay.com/support/#request) with our support team to get this feature activated on your account. Know more about [initiating instant settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/instant.md#initiate-instant-settlements). + + +## Smart Settlements + + +### 1. What are Smart Settlements? + + [Smart Settlement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/instant.md#initiate-smart-settlements) is an extended form of [Instant Settlement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/instant.md#initiate-instant-settlements) that allows you to settle amounts above ₹ 5 L in one shot using the RTGS channel. A settlement done via Smart Settlements reflects as a single entry in your bank statement making reconciliation much easier. + + + +### 2. What is the amount cap for Smart Settlements? + + You can initiate a Smart Settlement if the amount is abover ₹ 5 L. The maximum ceiling is ₹ 50 Cr per settlement. + + + +### 3. Is it mandatory to use Smart Settlements if the amount is > 5 L? + + No, Smart Settlement is a recommended option for amounts > 5 L and 5 Cr are settled through Smart Settlements only. Instant Settlement option is automatically disabled for amounts > 5Cr.** + + Find out more about [Instant Vs Smart Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/instant.md#instant-vs-smart-settlements) + + + +### 4. Do I have to request for enabling Smart Settlements? + + No, Smart Settlement feature is automatically enabled if the Instant Settlement feature is activated for your dashboard. However, Instant Settlement is an on-demand feature. [Contact support](https://razorpay.com/support/#request) to get this feature enabled. + + + +### 5. Is there a separate fee for Smart Settlements? + + No, Smart Settlements follow the same fee structure as Instant Settlements. Click to know more about [Instant Settlement pricing.](https://razorpay.com/capital/instant-settlements/#capital-pricing-section) + + + +### 6. How is the fees and tax for a Smart Settlement deducted? + + The fees and taxes for Smart Settlements are deducted from the requested settlement amount. + For example, you place a request for , fees of and tax of is deducted from the requested amount and the remaining amount, is settled to your bank account. + + + +### 7. What is the settlement cycle for Smart Settlements? + + The settlement cycle is **T+0** for Smart Settlements. Since Smart Settlements are routed through RTGS channel, the transaction usually happens real-time. However, depending on bank channel traffic, it may sometimes take up to 1 hour. diff --git a/llm-content/payments/settlements/instant.md b/llm-content/payments/settlements/instant.md new file mode 100644 index 00000000..40f87347 --- /dev/null +++ b/llm-content/payments/settlements/instant.md @@ -0,0 +1,126 @@ +--- +title: Instant Settlements +description: Use the Instant Settlement feature to settle funds instantly to your bank account. +--- + +# Instant Settlements + +You can use the **Instant Settlement** feature in Razorpay to settle your available balance to your bank account instantly, 24x7, for a small fee. +- Settle your available balance to your bank account in full, or choose to settle a portion of it. Note that there is a **maximum daily withdrawable limit**. +- The **maximum daily withdrawable limit** is a limit set for every Razorpay merchant for instant settlements that resets automatically at the beginning of each business day. + +- By default, the settlement cycle is **T+2 days for domestic payments** and for **international payments it is as per applicable law(s)**. **T** refers to the captured payment date. With Instant Settlements, you receive funds on a T+0 basis. +- You can use [Instant Settlements](#initiate-instant-settlements) to settle amounts ₹5 Cr and + +> **INFO** +> +> +> +> **Feature Request** +> +> This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> + + +## How it Works +1. Amounts up to ₹5 Lakhs are settled instantly through Instant Settlements. Instant Settlements are routed through the IMPS channel. +2. Smart Settlements option also is enabled when the entered amount is between ₹5 Lakhs to ₹5 Crores. You can choose between Instant or Smart Settlements here. + 1. With Smart Settlements, the settlement amount will reflect as a single credit in your bank statement since it uses the RTGS channel. + 1. With Instant Settlement, the amount will show as multiple credits in your bank statement as IMPS channel has an upper limit of ₹5 Lakhs per transaction. +3. Amounts between ₹5 Crores to ₹50 Crores are settled only through Smart Settlements. + +## Instant Vs Smart Settlements + + + Benefits of Instant Settlement are: + - Easy and instant access to your money. + - Increased cash flows enabling better payment cycles. + - Better management of inventory and stock. + + + Benefits of Smart Settlements are: + - Settle large sums (between ₹5 Lakhs to up to ₹50 Crores) to your Current Account in one shot and access it within an hour. + - View the settlement as a single entry in your account statement. + - Manage cash flows and payments in a better way. + + + + Feature| Instant Settlement | Smart Settlements | + --- + Minimum amount per settlement | ₹100 | ₹5 Lakhs | + --- + Maximum amount per settlement | ₹5 Crores | ₹50 Crores | + --- + **Timings** | **24*7** | **02:00 AM to 9:30 PM** | + --- + **Holidays** | **None** | **Jan 26, August 15 and April 1** | + --- + Settlement channel | IMPS | RTGS | + --- + Dashboard support | Yes | Yes | + --- + **API support** | **Yes** | **No** | + --- + **Settlement TAT** | **Instant** | **0-60 min** | + --- + **No. of credits in bank statement** | **Multiple** | **Single** | + --- + Example | Settlement amount: ₹5 Crores No. of credits in bank account: ₹5 Lakhs * 100 | Settlement amount: ₹5 Crores No. of credits in bank account: ₹5 Crores * 1 | + --- + + + +## Initiate Instant Settlements + +Settle amounts **up to ₹5 Crores** through **Instant Settlement** feature via Dashboard and API: + + + Create Instant Settlements from the Dashboard. + + 1. Log in to the Dashboard. + 2. Navigate to **Settlements**. + 3. Click **Settle Now** to go to the **Instant Settlements** window. + 4. Your current balance, maximum daily withdrawal limit and the current withdrawable amount are displayed. Enter the amount you want to settle to your bank account. + + ![Instant Settlement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/IS1.jpg.md) + + 4. Click **Next**. A pop-up showing **Instant Settlement** opens. + The fees + tax for the Instant Settlement and the net amount that will be credited to your account will be displayed in the pop up. + + 5. Click **Settle Now** to settle instantly. + + + + + Create and retrieve Instant Settlements requests using APIs. Refer to the [list of Instant Settlements APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/apis.md#list-of-settlements-api). + + +## Initiate Smart Settlements + +Use the **Smart Settlements** feature to settle amounts **between ₹5 Lakhs to ₹50 Crores** in a single shot within a time span of 1 hour. + + 1. Log in to the Dashboard. + 2. Navigate to **Settlements**. + 3. Click **Settle Now** to go to the **Instant Settlements** window. + 4. Your current balance, maximum daily withdrawal limit and the current withdrawable amount are displayed. Enter the amount you want to settle to your bank account. + 4. Click **Next**. A pop-up showing Instant Settlement and Smart Settlements opens. + The pop-up displays the total fees plus tax for the Instant Settlement, along with the exact net amount that will be credited to your account. + 4. For amounts more than ₹5 Lakhs, the recommended option is Smart Settlements. + + ![Smart Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/SS1.jpg.md) + + 5. Click **Settle Now** after selecting **Smart Settlements**. + + The Smart Settlements request is created. The requested amount will be settled to your bank account within 1 hour. + + +> **WARN** +> +> +> **Watch Out!** +> +> - Smart Settlements can be used via Dashboard only. +> - For amounts more than ₹5 Crores, only the Smart Settlements option is enabled in the pop-up. +> + +You can check the Dashboard for latest updates on the limits and availability of instant settlements. diff --git a/llm-content/payments/settlements/instant/route.md b/llm-content/payments/settlements/instant/route.md new file mode 100644 index 00000000..b70171e3 --- /dev/null +++ b/llm-content/payments/settlements/instant/route.md @@ -0,0 +1,175 @@ +--- +title: Instant Settlements for Linked Accounts on Route +heading: Instant Settlements on Route +description: Explore how instant settlements on Razorpay Route's Linked Accounts work and how to enable the feature. +--- + +# Instant Settlements on Route + +[Instant settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/instant.md) on Route enable you to settle payments instantly to your Linked Accounts for a small fee. You can choose which Linked Account to enable instant settlements on, and all subsequent transfers to that account will be processed instantly. + +Transactions settled instantly are credited to your Linked Accounts' bank accounts within 10 minutes. Instant settlements on Route are available 24/7, including on banking holidays. + + +### Use Cases and Examples + + - **Lending** + + Suppose you are Acme Corp, a Loan Service Provider (LSP) who sources customers via your product for multiple NBFCs. + + Your lending partners may wish to receive loan repayments instantly when the payment is captured instead of on a T+2 basis (T being the payment date), which enables them to disburse loans faster for other applicants. + + With instant settlements, you can [create a Linked Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md#add-and-manage-linked-accounts) on Route, initiate a transfer and settle the payments to them instantly. + + - **Logistics** + + You are Acme Movers, a logistics company that connects customers with retail packers and movers. One or many logistics partners may require instant payments from you to manage their cashflow. + + To facilitate this, you can enable instant settlements on the particular logistics partners' Linked Account and settle the payments to them instantly. + + + +### Advantages + + Instant settlements on Route offers the following advantages: + - Instant settlements within 10 minutes. + - Available on all days of the year, 24*7, including banking holidays. + - Seamless transfers to Linked Accounts from when the payment was captured. + + +## Prerequisites + +To enable instant settlements on Route, ensure the following: +- You have an [existing/created Linked Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md#add-and-manage-linked-accounts) on Route. +- You have [disabled refunds from Linked Accounts](#how-to-disable-refunds-for-a-linked-account). + +> **WARN** +> +> +> **Watch Out!** +> +> Instant Settlements on Route fail when: +> - The [transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/faqs.md#1-how-can-i-transfer-money-to-customers) amount exceeds 5 lakhs. +> +> For example, if you choose to transfer ₹17 lakhs, you must create 3 transfers of 5 lakhs each and another transfer of ₹2 lakhs. +> - You have not disabled refunds on Linked Accounts. +> + +## How it Works + +To use instant settlements on Route: + +1. Create a Linked Account for your vendors. +1. Contact support to enable instant settlements on Route for the Linked Accounts. +1. Initiate transfers to your Linked Account. +1. The Linked Account/Vendor receives the transferred amount instantly. + ![Instant settlements on Route How it Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/settlements-instant-route-v2.jpg.md) + +### 1. Enable Feature + +There are two steps to enable instant settlements on Route: + +1. Reach out to your sales POC or [contact support](https://razorpay.com/support/#request). + + +> **INFO** +> +> +> +> **Feature Request** +> +> This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> + +1. Disable **Allow Refunds** for your Linked Accounts. + + + +### How to disable refunds for a Linked Account? + + To disable refunds on a Linked Account: + + 1. Log in to the Dashboard. + 1. Go to **Route** in the left menu. + 1. Navigate to the **Accounts** tab. + 1. View the relevant Linked Accounts and click the **Allow Refunds** toggle to disable it. + ![Disable refunds on Razorpay Dashboard for Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-is-route-disable-refunds.jpg.md) + 1. In the **Disable Allow Refunds** pop-up modal, click **Disable**. + + You have successfully disabled refunds from this Linked Account. + + + + +This successfully enables instant settlements on Route for your account. + +### 2. Initiate Transfers + +After we enable the feature, you must initiate a transfer via Orders or Payments to the Linked Accounts. The initiated transfers are settled instantly, within minutes. You can also use the APIs to initiate transfers. + +Know how to initiate a transfer via: +- [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-funds-to-linked-accounts.md#transfer-via-orders). +- [Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-funds-to-linked-accounts.md#transfers-via-payments). +- [Create Transfers from Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-transfers-orders.md). +- [Create Transfers from Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/route/create-transfers-payments.md). + +> **WARN** +> +> +> **Watch Out!** +> +> - You cannot settle transfers instantly to Linked Accounts via Direct transfers. +> - When you create a transfer, ensure you process it in batches of 5 lakhs each. +> + +### Frequently Asked Questions + + +### 1. What happens if my upper limit for a transfer is greater than 5 lakhs? + + We create a transfer but the amount will not be settled to your Linked Accounts, leading to a transfer failure. This is due to [daily transfer limits](https://razorpay.com/learn/imps-limit/) on IMPS. + + For transfers greater than 5 lakhs, we recommend you split the amount in batches of 5 lakhs and initiate the transfer. Otherwise, you can choose NEFT as the default trasfer mode to increase the upper limit. + + + +### 2. I routinely create transfers that are greater than 5 lakhs per transaction. How can I instantly settle such transactions? + + You can either: + - Create transfers in batches of 5 lakhs each. + - Use NEFT as your default transfer mode. + + Note that NEFT credits the amount to your Linked Accounts within 2 hours instead of 10 minutes. + + + +### 3. How can I modify my default payment mode from IMPS to NEFT for some of my Linked Accounts? + + While IMPS is the default transfer mode, you can choose NEFT to be the default mode. Reach out to your sales POC or [contact support](https://razorpay.com/support/#request). + + Note that [NEFT limitations](https://razorpay.com/learn/neft-timings/) are applicable. NEFT transfers are settled within 2 hours instead of 10 minutes. + + + +### 4. Are there any additional charges for using this feature? + + Yes, instant settlements on Route is a paid feature. Contact your sales POC to discuss the pricing and invoice. + + + +### 5. If I do not manually set the upper limit of 5 lakhs on transfers, will Razorpay set it? + + No, you must batch the transfers in multiples of 5, or as applicable. For example, if you choose to transfer ₹17 lakhs, you must create 3 transfers of 5 lakhs each and another transfer of ₹2 lakhs, as follows: + + - Transfer A: 5 lakhs + - Transfer B: 5 lakhs + - Transfer C: 5 lakhs + - Transfer D: 2 lakhs + + + +### 6. Can I customise which transactions to enable instant settlements on? + + No, you can only choose the Linked Account to which you want to settle the transfers instantly. + + All the transfers initiated to that Linked Account will be settled instantly. diff --git a/llm-content/payments/smart-collect.md b/llm-content/payments/smart-collect.md new file mode 100644 index 00000000..b3f8b102 --- /dev/null +++ b/llm-content/payments/smart-collect.md @@ -0,0 +1,136 @@ +--- +title: Payments | Smart Collect +heading: About Smart Collect +description: Create Customer Identifiers on-demand for customers to pay via NEFT, RTGS and IMPS using Smart Collect and UPI transfers via Smart Collect 2.0. +--- + +# About Smart Collect + +Discover new features, updates and deprecations related to Razorpay Smart Collect (since Jan 2024). + +Razorpay Smart Collect empowers businesses to create on-demand Customer Identifiers (CI) for receiving payments via NEFT, RTGS, and IMPS. Smart Collect 2.0 expands this functionality to include UPI payments through Virtual UPI IDs. These identifiers are linked to your registered bank account, and Razorpay automates payment reconciliation and provides notifications for received payments. + +#### What is a Customer Identifier and a Virtual UPI ID? + +**Customer Identifier** + +Customer identifier is a customisable virtual receiver (with customer identifier number and IFSC) created on top of your current/escrow account. You can share the Customer Identifier information with your customers/businesses and collect payments. + +**Virtual UPI ID** + +Virtual UPI id is an extension of Customer Identifier. It is a customisable UPI id that your customers/businesses can use to pay you. It combines the ease of UPI payments and id customisation to offer you a seamless payment reconciliation experience. + +> **INFO** +> +> +> **Handy Tips** +> +> - Understand the Razorpay [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) that Smart Collect follows to collect payments. +> - Smart Collect also supports [Third-Party Validation (TPV)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/third-party-validation.md). +> +> + + +### Advantages + + + + Smart Collect has the following advantages: + + - **Instant Identifier Creation**: Generate Customer Identifiers in real-time using the Dashboard and APIs. + - **Multiple Payment Avenues**: Enable customers to make payments via NEFT, RTGS and IMPS. + - **Automatic Reconciliation**: Eliminate the difficulty of manual reconciliation and save time and cost. + - **Account-level Visibility**: View and manage every payment received from customers. + - **Real-time Notifications**: Get real-time notifications on payments with Webhooks. + - **Third-Party Validation (TPV)**: Smart Collect supports Third-Party Validation. + + + Smart Collect 2.0 offers the following additional advantages: + - **UPI Transactions**: In addition to NEFT, RTGS, and IMPS, use Smart Collect 2.0 to accept payments using UPI. + - **Customisable Customer Identifiers**: Personalise your Customer Identifiers to align with your brand, making it easier for internal tracking. + - **Automatic Payment Mode Differentiation**: Automated distinction based on the payment method used, simplifying reconciliation and reporting. + - **Real-time Payment Confirmations via Webhooks**: Receive instant notifications through webhooks (if enabled), allowing for immediate updates and actions. + - **Creation of Unlimited Identifiers**: Generate unlimited Customer Identifiers and Virtual UPI IDs, providing scalability for businesses with diverse needs. + - **Transaction-Level Breakup of Payments**: Detailed, transaction-level information for all payments, enhancing reconciliation accuracy. + + + + + +### Smart Collect 2.0 vs Smart Collect + + Smart Collect and Smart Collect 2.0 use the same APIs to create and maintain Customer Identifiers. Smart Collect 2.0 offers additional benefits, such as: + + + Features | Smart Collect 2.0 | Smart Collect + --- + NEFT/RTGS/IMPS | ✓ | ✓ + --- + UPI | ✓ | x + --- + Settlement time | Direct and real time | T+2 working days + --- + APIs to create/disable customer identifiers/VPAs | ✓ | ✓ + --- + API-based notifications | ✓ | ✓ + --- + TPV Check | ✓ | ✓ + --- + Auto-refund for closed/disabled customer identifiers/virtual UPI ids | ✓ | ✓ + --- + Supported banks | Yes Bank, Axis Bank, RBL Bank | NA + --- + Receive Payment Gateway Settlements via customer identifiers/Virtual UPI ids | ✓ | x + --- + Transaction-level breakup in account | ✓ | x + + + + + + +### Smart Collect Use Cases + + Explore the [Smart Collect Use Cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/use-cases.md) to gain deeper insights into the capabilities and practical applications of Smart Collect and Smart Collect 2.0. + + +## Prerequisites + + + 1. Ensure that you do not fall under the `Individuals` merchant category as Smart Collect is not available for this Merchant Category Code (MCC). + 2. Read and understand the [pricing model](https://razorpay.com/smart-collect/#pricing) and have the [API documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md) for Smart Collect handy. + 3. Ensure that the business use case is well charted. Smart Collect supports **many customers - one account** and **many customers - many accounts** models. + 4. Raise a request through a Point of Contact (POC) or the Dashboard to enable Smart Collect and Smart Collect TPV for your account. + 5. Do check the [list of banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/bank-list.md#list-of-banks-supporting-tpv-for-smart-collect) which support Smart Collect with TPV. + + + 1. You must open a [Current account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/current-account.md)/[Escrow account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/escrow.md). We enable you in this process. + 2. All the prerequisites for Smart Collect are also applicable for Smart Collect 2.0. + + +## Supported Platforms + +Razorpay Smart Collect is supported on the following platforms: + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + +### Related Information + +- [How Smart Collect Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/how-it-works.md) +- [Customer Identifier States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/states.md) +- [Auto Third Party Validation (TPV) on Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/third-party-validation.md) +- [Smart Collect APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/subscribe-to-webhooks.md) diff --git a/llm-content/payments/smart-collect/apis.md b/llm-content/payments/smart-collect/apis.md new file mode 100644 index 00000000..f58e121b --- /dev/null +++ b/llm-content/payments/smart-collect/apis.md @@ -0,0 +1,580 @@ +--- +title: Smart Collect APIs +description: List of Smart Collect 2.0, Smart Collect and Smart Collect with TPV APIs. Check the API integration checklist. +--- + +# Smart Collect APIs + +Use Razorpay Smart Collect to create Customer Identifiers and accept large payments from your customers in the form of bank transfers via NEFT, RTGS and IMPS. Customer Identifiers are similar to bank accounts wherein customers can transfer payments. You can create, retrieve and close Customer Identifiers using the Smart Collect APIs. + +> **INFO** +> +> +> **Smart Collect 2.0** +> +> Use [Smart Collect 2.0 ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md)to collect payments using UPI and other banking modes. +> + +## Smart Collect 2.0 APIs + +Use Smart Collect 2.0 APIs to create and manage Customer Identifiers of the type `VPA (UPI)`. You can use the Smart Collect APIs to manage Customer Identifiers of the type `Bank Account`. + + +### List of Smart Collect 2.0 APIs + + Refer to the list of Smart Collect 2.0 APIs to create and manage Customer Identifiers of the type `VPA (UPI)`. + + + API | Description + --- + [Create a Customer Identifier With VPA Receiver](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-2/create-cust-id-vpa.md) | API to create a Customer Identifier with VPA receiver. + --- + [Create a Customer Identifier With VPA and Bank Account Receivers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-2/create-cust-id-bank-account-vpa.md) | API to create a Customer Identifier with VPA and bank account receivers. + --- + [Fetch Payments Using UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-2/fetch-payments-upi.md) | API to retrieve details of a UPI payment using the Payment id. + --- + [Add Receiver to an Existing Customer Identifier With VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-2/add-receiver-vpa.md) | API to add receiver to an existing Customer Identifier. + --- + [Add Receiver to an Existing Customer Identifier With Bank Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-2/add-receiver-bank-transfer.md) | API to add receiver to an existing Customer Identifier. + + + + +### List of Smart Collect 2.0 API for TPV + + Refer to the list of Smart Collect 2.0 APIs to create and manage Customer Identifiers of the type `VPA (UPI)`with TPV. + + + API | Description + --- + [Add VPA Receiver to an Existing Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-2/tpv-add-receiver-vpa.md) | API to add receiver to an existing Customer Identifier. + --- + [Add Bank Account Receiver to an Existing Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-2/tpv-add-receiver-bank-transfer.md) | API to add receiver to an existing Customer Identifier. + --- + + + +## Smart Collect APIs + + +### List of Smart Collect APIs + + + API | Description + --- + [Create Customer Identifier With Bank Account Receiver](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect/create-cust-id-bank-account.md) | API to create a Customer Identifier with bank account receiver. + --- + [Fetch a Customer Identifier With ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect/fetch-with-id.md) | API to Fetch a Customer Identifier by ID. + --- + [Fetch all Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect/fetch-all.md) | API to fetch all Customer Identifiers. + --- + [Fetch Payments for a Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect/fetch-payments-cust-id.md)| API to fetch payments made against a particular Customer Identifier. + --- + [Fetch Payment Details using ID and Transfer Method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect/fetch-payments-bank-transfer.md) | API to retrieve details of a payment using the Payment ID and transfer method. + --- + [Fetch Payments Using Bank Transfer via UTR](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect/fetch-payments-bank-transfer-utr.md) | API to retrieve details of a payment using bank transfer method via UTR. + --- + [Update a Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect/update.md) | API to update a Customer Identifier. + --- + [Close a Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect/close.md) | API to close a Customer Identifier. + + + + +### API-wise Integration Checklist for Smart Collect + + + + - Use [Create a Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md#create-a-customer) if a Customer Identifier/UPI ID will be mapped to a unique customer. + - You can use the **fail_existing** (set to `"1"`) API parameter to create a customer. This helps you avoid `customer_id` being created multiple times for the same customer and will help in your reconciliation process. + - We request you to create a single `customer_id` rather than making multiple IDs for the same customer. If their details change, you can use the [Edit Customer Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md#edit-customer-details) API. Duplicate validation is done based on the combination of email ID and phone number. + + + - UPI Customer Identifiers are supported only in Live mode. + - The combination of merchant prefix and descriptor must be 20 characters. The length of the merchant prefix can vary between 4-10 characters and the length of the descriptor from 10-16 characters. + - Payments made to the Customer Identifiers must be within the [transaction limits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/transaction-limits.md). + - We recommend that you use [Fetch APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md#fetch-a-virtual-account-by-id) to make a GET call for any downstream dependencies. Webhooks are just a recommended layer on top of this. + - We recommend you [Close the Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md#close-a-customer-identifier) once the payment is received. + + + + + +### List of APIs for Smart Collect TPV + + To know more about Third Party Validation (TPV), click [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/third-party-validation.md). + + API | Description + --- + [Create Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-tpv/create.md) | API to create a Customer Identifier. + --- + [Add an Allowed Payer Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-tpv/add-allowed-payer.md) | API to add allowed payers account details to a Customer Identifier. + --- + [Fetch a Customer Identifier by ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-tpv/fetch-with-id.md) | API to Fetch a Customer Identifier by ID. + --- + [Fetch all Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-tpv/fetch-all.md) | API to fetch all Customer Identifiers. + --- + [Fetch Payments for a Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-tpv/fetch-payments.md)| API to fetch payments made against a particular Customer Identifier. + --- + [Fetch Payment Details using ID and Transfer Method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-tpv/fetch-payment-id-transfer.md) | API to retrieve details of a payment using the Payment ID and transfer method. + --- + [Delete an Allowed Payer Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-tpv/delete-allowed-payer.md) | API to delete allowed payers account details added to a Customer Identifier. + --- + [Close a Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-tpv.md#close-a-virtual-account) | API to close a Customer Identifier. + + + + +### API-wise Integration Checklist for Smart Collect TPV + + + + - Use [Create a Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md#create-a-customer) if a Customer Identifier is mapped to a unique customer. + - You can use the **fail_existing** (set to `"1"`) API parameter to create a customer. This helps you avoid `customer_id` being created multiple times for the same customer and will help in your reconciliation process. + - We request you to create a single `customer_id` rather than making multiple IDs for the same customer. If their details change, you can use the [Edit Customer Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md#edit-customer-details) API. Duplicate validation is done based on the combination of email ID and phone number. + + + - Smart Collect with TPV is supported only for Netbanking. + - The combination of merchant prefix and descriptor must be 20 characters. The length of the merchant prefix can vary between 4-10 characters and the length of the descriptor from 10-16 characters. + - Avoid ambiguous account numbers. Consider the following: + - When displaying a bank account number to a customer, the font may cause the customer to misread the alphanumeric characters (if any) in the number. Customers can commit typos while entering the beneficiary account number. Misreading the letter `O` in an account number as the numeral `0`, for example, is extremely common. + - Payments made to such mistyped accounts are considered invalid. They are refunded to the customer's account within 1 working day. However, this is still a massive inconvenience for the customer, who now has to wait 24 hours to receive a refund for what is often a rather large payment. + - We strongly advise against using the following characters in your descriptor for alphanumeric accounts, as they may appear ambiguous in specific fonts. + - `0` or `O` + - `1` or `I` + - `5` or `S` + - `8` or `B` + - `2` or `Z` + - You can add up to 10 allowed payers while creating the Customer Identifier. + - The allowed payer can be deleted or added later using the [Add an Allowed Payer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-tpv.md#add-an-allowed-payer-account) and the [Delete an Allowed Payer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-tpv.md#delete-an-allowed-payer-account) APIs. + + + + + +### List of Banks Supporting TPV for Smart Collect + + Given below is the list of banks supporting TPV for Smart Collect. + + +Bank Name | Bank Code +--- +A. P Mahesh Bank | APMC +--- +Abhyudaya Co-op Bank | ABHY +--- +Adarsh Cooperative Bank Ltd | ACBX +--- +Ahmedabad Mercanatile Co-op Bank | AMCB +--- +Airtel Payments Bank | AIRP +--- +Allahabad Bank | ALLA +--- +Andhra Bank | ANDB +--- +Andhra Pragathi Grameena Bank | APGB +--- +Andhra Pragathi Grameena Vikas Bank | APGV +--- +Apna Sahakari Bank | ASBL +--- +Assam Gramin Vikash Bank | AGVX +--- +Associate Co-operative Bank Limited,Surat | ASOX +--- +AU Small Finance Bank | AUBL +--- +Axis Bank | UTIB +--- +Banaskantha Mercantile Co-operative Bank Limited | BMPX +--- +Bandhan Bank | BDBL +--- +Bank of America | BOFA +--- +Bank Of Baroda | BARB +--- +Bank Of India | BKID +--- +Bank of Maharashtra | MAHB +--- +Baroda Central Co-operative Bank | BRDX +--- +Baroda Gujarat Gramin Bank | BGGX +--- +Baroda Rajasthan Khetriya Gramin Bank | BRGX +--- +Baroda Uttar Pradesh Gramin Bank | BUGX +--- +Bassein Catholic Coop Bank | BACB +--- +Bhagini Nivedita Sahakari Bank Ltd,Pune | BNSB +--- +Bharat Co-operative Bank | BCBM +--- +Bhilwara Urban Co-operative Bank Ltd | BHUX +--- +Canara Bank | CNRB +--- +Capital Small Finance Bank | CLBL +--- +Catholic Syrian Bank | CSBK +--- +Central Bank of india | CBIN +--- +Chaitanya Godavari Grameena Bank | CGGX +--- +Chartered Sahakari Bank Niyamitha | CSBX +--- +Chhattisgarh Rajya Gramin Bank | CGBX +--- +Citibank Retail | CITI +--- +Citizen Co-operative Bank Ltd - Noida | CCBX +--- +Citizens Co-operative Bank Ltd. | CTBX +--- +City Union Bank | CIUB +--- +Costal Local Area Bank Ltd | COAS +--- +Dakshin Bihar Gramin Bank | MBGX +--- +DBS Digi Bank | DBSS +--- +DCB Bank | DCBL +--- +Dena Bank | BKDN +--- +Dena Gujarat Gramin Bank | DEGX +--- +Deutsche Bank AG | DEUT +--- +Dhanalaxmi bank | DLXB +--- +Dombivli Nagrik Sahakari Bank | DNSB +--- +Equitas Small Finance Bank | ESFB +--- +ESAF Small Finance Bank | ESAF,ESMF +--- +Federal Bank | FDRL +--- +Fincare Small Finance Bank | FSFB +--- +Fingrowth Co-operative Bank Ltd | FGCB +--- +FINO Payments Bank | FINO +--- +G P Parsik Bank | PJSB +--- +HDFC | HDFC +--- +Himachal Pradesh Gramin Bank | HMBX +--- +HSBC | HSBC +--- +Hutatma Sahakari Bank Ltd | HUTX +--- +ICICI Bank | ICIC +--- +IDBI Bank | IBKL +--- +IDFC | IDFB +--- +India Post Payment Bank | IPOS +--- +Indian Bank | IDIB +--- +Indian Overseas Bank | IOBA +--- +Indore Paraspar Sahakari Bank Ltd | IPSX +--- +IndusInd Bank | INDB +--- +J & K Grameen Bank | JAKA +--- +Jalgaona Janata Sahkari Bank | JJSB +--- +Jalna Merchant's Co-operative Bank Ltd. | JMCX +--- +Jammu & Kashmir Bank | JAKA +--- +Jana Small Finance Bank | JSFB +--- +Janakalyan Sahakari Bank | JSBL +--- +Janaseva Sahakari Bank Ltd Pune | JANA,JASB +--- +Janta Sahakari Bank Pune | JSBP +--- +Jio Payments Bank | JIOP +--- +Jivan Commercial co-operative Bank Ltd. | JVCX +--- +Kallappanna Awade Ichalkaranji Janata Sahakari Bank Ltd. | KAIJ +--- +Kalupur Commercial Co-operative Bank | KCCB +--- +Karnataka Bank | KARB +--- +Karnataka vikas Gramin Bank | KVGB +--- +Karur Vysaya Bank | KVBL +--- +Kashi Gomti Samyut Gramin Bank | KGSX +--- +Kerala Gramin Bank | KLGB +--- +Kokan Merchantile Co-Operative Bank Ltd | KMCB +--- +Kolhapur District Central Co-operative Bank Limited | KPCX +--- +Kotak Mahindra Bank | KKBK +--- +Krishna Bhima Samruddhi Local Area Bank | KBSX +--- +Maharashtra Grameen Bank | MAHG +--- +Maharashtra state co opp Bank | MSCI +--- +Malad Sahakari Bank | MSBL +--- +Malviya Urban Co-operative Bank Limited | MALX +--- +Manipur Rural Bank | MRBX +--- +Manvi Pattana Souharda Sahakari Bank | MVIX +--- +Maratha Cooprative Bank Ltd | MRTX +--- +Meghalaya Rural Bank | MERX +--- +Mizoram Rural Bank | MZRX +--- +Model Co-operative Bank Limited | MDBK +--- +Nagarik Sahakari Bank Maryadit, Vidisha | NBMX +--- +Nanital Bank Ltd | NTBL +--- +NKGSB | NKGS +--- +NSDL Payments Bank | NSPB +--- +Nutan Nagrik Sahakari Bank | NNSB +--- +Pali Urban Co-operative Bank Ltd. | PALX +--- +Paschim Banga Gramin Bank | PASX +--- +Patan Nagrik Sahakari Bank Ltd | PTSX +--- +Paytm Payments Bank | PYTM +--- +Pragathi Krishna Gramin Bank | PGBX +--- +Prathama Bank | PRTH +--- +Prime Co-operative Bank Ltd. | PMEC +--- +Priyadarshini Nagari Sahakari Bank Ltd. | PDSX +--- +Pune Cantonment Sahakari Bank Ltd | PCTX +--- +Punjab and Maharastra Co. bank | PMCB +--- +Punjab and Sind Bank | PSIB +--- +Punjab Gramin Bank | PUGX +--- +Punjab National Bank | PUNB +--- +Purvanchal Bank | NA +--- +Rajasthan Marudhara Gramin Bank | RMGB +--- +Rajkot Nagari Sahakari Bank Ltd | RNSB +--- +Rani Channamma Mahila Sahakari Bank Belagavi | ZRNB +--- +Samarth Sahakari Bank Limited | SBLS +--- +Samruddhi Co-op bank ltd | SCOB +--- +Sandue Pattana Souharda Sahakari Bank | SPSX +--- +Sarva Haryana Gramin Bank | HGBX +--- +Sarva UP Gramin Bank | SUBX +--- +Sarvodaya Commercial Co-operative Bank | SVCX +--- +Saurashtra Gramin Bank | SAGX +--- +SBM BANK (INDIA) LIMITED | STCB +--- +Shree Dharati Co-operative Bank Ltd. | SRHX +--- +Shree Kadi Nagarik Sahakari Bank Ltd | KDIX +--- +Shri Arihant Co-operative Bank Ltd. | SACB +--- +Shri Basaveshwar Sahakari Bank Niyamit, Bagalkot | BASX +--- +Shri Chhatrapathi Rajarsshi Shahu Bank | CRUB +--- +Shri Mahila Sewa Sahakari Bank Limited | SEWX +--- +Shri Rajkot District Co-operative Bank Ltd | RJTX +--- +Shri Veershaiv Co-op Bank Ltd. | VCCX +--- +Sindhudurg Co-operative Bank | SIDC +--- +Smriti Nagrik Sahakari Bank Maryadit, Mandsaur | SNSX +--- +South Indian Bank | SIBL +--- +Sri Rama Co-operative Bank Ltd | NA +--- +Sri Vasavamba Cooperative Bank Ltd | SVAX +--- +Standard Chartered | SCBL +--- +State Bank Of India | SBIN +--- +Sterling Urban Co-operative Bank Ltd | STRX +--- +Suco Souharda Sahakari bank | SSDX +--- +Surat People Cooperative Bank | SPCB +--- +Suryoday Small Finance Bank Ltd | SURY +--- +Sutex Co operative Bank | SUTB +--- +Suvarnayug Sahakari Bank Ltd | SUVX +--- +SVC Co-operative Bank | SVCB +--- +Syndicate Bank | SYNB +--- +Tamilnad Mercantile Bank | TMBL +--- +Telangana Gramin Bank | DGBX +--- +Telangana State Co Operative Apex Bank | TSAB +--- +Thane Bharat Sahakari Bank | TBSB +--- +The Adarsh Urban Co-op. Bank Ltd., Hyderabad | ACUX +--- +The Ahmedabad District Coop bank | ADBX +--- +The Ahmednagar Merchants Co-operative Bank | AMDN +--- +The Anand Mercantile Co-Op. Bank Ltd. | TAMX +--- +The Andhra Pradesh state cooperative | APBL +--- +The Banaskantha District Central Co-Op. Bank Ltd. | BKDX +--- +The Baramati Sahakari Bank Ltd. | BARA +--- +The Cosmos Co-Operative Bank LTD | COSB +--- +The Darussalam Co-operative Urban Bank Ltd. | DCUX +--- +The Gadchiroli District Central Co-operative Bank | GDCB +--- +The Gayatri Co-operative Urban Bank Ltd. | GCUX +--- +The Gujarat State Co-operative Bank Limited | GSCB +--- +The Hasti Co-operative Bank Ltd | HCBL +--- +The Himachal Pradesh State Co-operative Bank Ltd | HPSC,HPSC +--- +The Kaira District Central Co-Op. Bank Ltd. | KARX +--- +The Kalyan Janta Sahkari Bank | KJSB +--- +The Kanakmahalakshmi Co-operative Bank Ltd | IBKL +--- +The Lakshmi Vilas Bank Limited | LAVB_R +--- +The Mahanagar Co-Op. Bank Ltd | MCBL +--- +The Mehsana Urban Co-Operative Bank | MSNU +--- +The Merchants Souharda Sahakari Bank Ltd | MSSX +--- +The Modasa Nagarik Sahakari Bank Limited | TMSX +--- +The Municipal Co-op Bank | MUBL +--- +The Muslim Co-operative Bank Ltd. | MSLM +--- +The Pochampally Co-operative Urban bank Ltd | PCUX +--- +The Ratnakar Bank Limited | RATN +--- +The Sabarkantha district Central Coop Bank Ltd | SADX +--- +The Saraswat Co-Operative Bank | SRCB +--- +The Satara Distric Central Co-operative Bank Ltd. | SDCE +--- +The SSK Co-operative Bank | NA +--- +The Surat District Co-op Bank Ltd. | SDCB +--- +The Thane Janta Sahakari Bank Ltd(TJSB) | TJSB +--- +The Udaipur Mahila Samridhi Urban Co-operative Bank Ltd. | UMSX +--- +The Udaipur Mahila Urban Co-op Bank Ltd | TUMX +--- +The Udaipur Urban Co-operative Bank ltd. | UUCX,UUCB +--- +The Urban Cooperative Bank Ltd Dharangaon | TUDX +--- +The Vallabh Vidyanagar Commercial Co-operative Bank Ltd | VVCX +--- +The Varachha Co-op Bank Ltd. | VARA +--- +The Vijay Co-operative Bank Ltd, Ahmedabad | VCOB +--- +The Visakhapatnam Co-operative Bank Ltd. | VISX +--- +The Vishweshwar Sahakari Bank Ltd | VSBL +--- +Tripura Gramin Bank | TGBX +--- +UCO Bank | UCBA +--- +Ujjivan Small Finance Bank Limited (Web Collect) | UJVN +--- +Union Bank of India | UBIN +--- +Uttarakhand Gramin Bank | UTGX +--- +Vananchal Gramin Bank | VGBX +--- +Vasai Vikas Co-op Bank Ltd | VVSB +--- +Vijaya Bank | VIJB +--- +Vikas Souharda Co-operative Bank Ltd. | VSCX +--- +Yadagiri Lakshmi Narasimha Swamy Co-Op Urban Bank Ltd | YLNX +--- +Yes Bank | YESB + + + +### Related Information +- [Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) +- [How Smart Collect Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/how-it-works.md) diff --git a/llm-content/payments/smart-collect/axis-bank-migration.md b/llm-content/payments/smart-collect/axis-bank-migration.md new file mode 100644 index 00000000..1436d822 --- /dev/null +++ b/llm-content/payments/smart-collect/axis-bank-migration.md @@ -0,0 +1,128 @@ +--- +title: Account Migration - Axis Bank +description: Update your setup to work with our new banking partners. +--- + +# Account Migration - Axis Bank + +To continue delivering the best services, we are switching our banking partner in Smart Collect. This upgrade will help us deliver a superior experience with bank transfers. + +## 1. Account Migration - Change in IFSC Code for Existing Customer Identifiers + +Your existing Smart Collect Customer Identifiers will undergo a transition to our new banking partner, Axis Bank. Though the account number associated with these customer identifiers remains unchanged, the previous IFSC code will be replaced with a new one. You must communicate this change to your customers, directing them to use the updated IFSC code for subsequent payments. + +The migration process will encompass all current Customer Identifiers. Post-migration, the new IFSC code will be displayed on the Dashboard and provided through the API alongside a reference to the original IFSC code. + +> **WARN** +> +> +> **Watch Out!** +> +> Transfers using IMPS mode via PSP apps (such as Google Pay, PhonePe etc.) are not supported for recipients with Axis Bank virtual bank accounts. +> + +## 2. New Customer Identifier Creation With Axis Bank + +Going forward, all new Customer Identifiers for unregulated merchants will be created with Axis Bank as the banking partner. All new Customer Identifiers created with Axis Bank will have no dormancy and will remain active until you close them. + +> **WARN** +> +> +> **Watch Out!** +> +> Notify your customers with your Customer Identifiers that they can add a new beneficiary with updated IFSC code, but the same bank account number. +> + +## Impact Overview + +1. All active Customer Identifiers will be migrated from RBL Bank to Axis Bank within 2 days from the date of confirmation from your side. + 1. The Bank Account number will stay the same. + 2. The IFSC code will be changed to `UTIB000RAZP`. +2. All new Customer Identifiers will be created with Axis Bank as the banking partner. +3. Inform your customers using your Customer Identifiers about the newly migrated Customer Identifier details, which retains the same bank account number but features an updated IFSC code. + +> **WARN** +> +> +> **Watch Out!** +> +> Post **30th September 2024**, the IFSC Code for all newly issued Customer Identifiers will be `UTIB000RAZP`. The account number will stay the same. +> + +## API Interface + +The updated API response will include two entries in the receiver's array: +1. The former RBL Bank Customer Identifier +2. The new Axis Bank Customer Identifier. + +To verify the new Axis Customer Identifier, look for the IFSC Code `UTIB000RAZP`. + +```json: API Sample Response Code +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "va_IirUUD9dDm4G4i", + "name": "Test Account", + "entity": "virtual_account", + "status": "active", + "description": "Vishnu Jangid", + "amount_expected": null, + "notes": { + "project_name": "Vishnu Jangid" + }, + "amount_paid": 0, + "customer_id": null, + "receivers": [ + { + "id": "ba_IirUUYO8caNoK5", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Test Account", + "notes": [], + "account_number": "2223330053041804" + }, + { + "id": "ba_IirUUYO8sh1602", + "entity": "bank_account", + "ifsc": "UTIB000RAZP", + "bank_name": "Axis Bank", + "name": "Test Account", + "notes": [], + "account_number": "2223330053041804" + } + ], + "close_by": 1681615838, + "closed_at": null, + "created_at": 1641997300 + } + ] +} +``` + +## Dashboard Interface + +After the migration, you can view the previous and updated Customer Identifier details by selecting the Customer Identifier. While the new identifier maintains the same account number, its IFSC code has been changed to `UTIB000RAZP`. + +![Customer Identifier Dasboard view post migration.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sc-migration-axis.jpg.md) + +## Frequently Asked Questions + + +### 1. What changes can I expect in the Customer Identifiers, and what information should I communicate to my customers? + + The main change in the Customer Identifiers will be the IFSC code, which will update to `UTIB000RAZP`, even though the account number remains the same. You should inform your customers about this updated IFSC code while emphasising that the account number remains unchanged. + + + +### 2. When is the shutdown date for the old Customer Identifiers? + + Shutdown for all merchants will happen soon. + + + +### 3. How will I identify the new Bank Account details in the API response? + + The IFSC code serves as an identifier for the new bank account. In the API response, all new Customer Identifiers will display `UTIB000RAZP` as their IFSC code. diff --git a/llm-content/payments/smart-collect/bulk.md b/llm-content/payments/smart-collect/bulk.md new file mode 100644 index 00000000..d1605617 --- /dev/null +++ b/llm-content/payments/smart-collect/bulk.md @@ -0,0 +1,89 @@ +--- +title: Batch Creation +description: Create Customer Identifiers in bulk using the batch feature. +--- + +# Batch Creation + +Customer Identifiers can be created via batch. This may be necessary when you have a large number of customers to be onboarded simultaneously, and using the API would be unfeasible. Batch creation allows you to place all the information related to customer and Customer Identifier creation in a single file, ready for upload. + +## Process + +- Create a CSV, XLS or XLSX file containing all the required data to create Customer Identifiers. The format and sample row data are given in the following sections. +- Raise a request to process the file on the [support page](https://razorpay.com/support/#request) as an existing customer. Also share the 14-character Razorpay merchant Id in email body. +- Once we process the file on our side, we will share the same file with you with a few new columns appended per row. For every row, the status column will mention whether the Customer Identifier is active or not. + - If the process is a success, the row will contain the Razorpay Customer ID, the Customer Identifier ID (a newly created Customer Identifier) and associated bank account details. + - If there is a failure, subsequent columns will have an error description. + +You may use this data for various operations on your end. All this information would also be available on your Dashboard as well as via API. + +## Handle Errors + +For rows that were not processed due to errors, create a new file with data corrected as per the error description. Send us the file again for processing. Do not include the error column in the new file. + +## File Format And Data Constraints + +- Provided file must be a valid CSV/XLS/XLSX +- Every row should contain values per the following format: + +`customer_id` _string_ +: ID of an existing Razorpay customer. Can be used if it is not required to create a new customer. + +`customer_name` _string_ +: Name of the customer. Can be used if a new customer is required to be created. Max length: 50 + +`customer_contact` _string_ +: Contact number of the customer. Can be used if a new customer is required to be created. Must be a valid contact number. + +`customer_email` _string_ +: Email address of the customer. Can be used if a new customer is required to be created. Must be a valid email address. + +`virtual_account_descriptor` _string_ +: Used for custom account numbers. This is to be left blank as all account numbers are numeric by default. + +`virtual_account_description` _string_ +: Description for the Customer Identifier. Max length: 2048 + +`virtual_account_notes` _string_ +: Notes field to be used while creating the Customer Identifier. Must be a valid JSON string. +Refer the [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) section for more information. + +Note that if `customer_id` field is being used, i.e. an existing customer is being referred to, then fields 2-4 can be left blank. + +Sample rows in the file would look similar to the following: + +```csv +cust_8gRzzeoemUfb5k,,,,,VA for Existing Customer,"{""key1"":""value1""}" +,Gaurav Kumar,9000090000,test@test.com,,VA for new customer,"{""key1"":""value1"",""key2"":""value2""}" +``` + +## Output File Format + +`customer_id` _string_ +: ID of an existing, or a newly created customer. + +`customer_name` _string_ +: Name of the customer. + +`customer_contact` _string_ +: Contact number of the customer. + +`customer_email` _string_ +: Email address of the customer. + +`virtual_account_id` _string_ +: ID of the newly created Customer Identifier. + +`bank_account_id` _string_ +: ID of the newly created bank account. + +`bank_account_name` _string_ +: Name associated with the newly created bank account. + +`bank_account_number` _string_ +: Account number of the newly created bank account. + +`bank_account_ifsc` _string_ +: IFSC of the newly created bank account. + +Contact our [Support Team](https://www.razorpay.com/support) if you have any queries. diff --git a/llm-content/payments/smart-collect/close.md b/llm-content/payments/smart-collect/close.md new file mode 100644 index 00000000..545249aa --- /dev/null +++ b/llm-content/payments/smart-collect/close.md @@ -0,0 +1,31 @@ +--- +title: Close Customer Identifiers +description: Close a Customer Identifier using the Razorpay Dashboard. +--- + +# Close Customer Identifiers + +Customer Identifiers can be closed in two ways, automatically and manually. + +## Close Customer Identifiers Automatically + +To close Customer Identifiers automatically, specify a **Close By** date and time during [Customer Identifier creation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/create.md). + +![Enable/Disable Auto close by while creating Virtual Account.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-auto-close-by.jpg.md) + +## Close Customer Identifiers Manually + +To close Customer Identifiers manually: + +1. Log in to the Dashboard and click **Smart Collect**. +2. Select the Customer Identifier id you wish to close from the Customer Identifier list. + +3. In the right pane that appears, click **Close Customer Identifier**. + +4. A dialog box appears to confirm the closing. Click **Yes**. + +### Related Information +- [Create Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/create.md) +- [Refund Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/refund.md) +- [Make Test Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/test-payments.md) +- [Search for a Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/search.md) diff --git a/llm-content/payments/smart-collect/create-tpv.md b/llm-content/payments/smart-collect/create-tpv.md new file mode 100644 index 00000000..2503a445 --- /dev/null +++ b/llm-content/payments/smart-collect/create-tpv.md @@ -0,0 +1,89 @@ +--- +title: Create Customer Identifiers with TPV +description: Create and view Customer Identifiers and UPI IDs using the Razorpay Dashboard. +--- + +# Create Customer Identifiers with TPV + +Smart Collect makes reconciling payments received through bank transfers easy by allowing you to create Customer Identifiers for specific customers and reconciling payments automatically. + +You can create virtual UPI IDs for each of your customers, who can then add these IDs to their UPI PSP (Payment Service Provider) apps and make UPI payments. + +## Create Customer Identifiers with TPV + +> **INFO** +> +> +> **Handy Tips** +> +> Currently, we support creation of virtual UPI IDs in the live mode only. However, Customer Identifiers can be created in the test and live modes. +> + +To create a Customer Identifier from the Dashboard: +1. Log in to the Dashboard and click **Smart Collect**. +2. Click **+ Create Customer Identifier**. + +3. Select the type of receiver in **Methods to accept payments in this account** field. + Both **Bank Transfers (NEFT, RTGS, IMPS)** and **UPI Transfer** are enabled by default. You can choose to disable either as needed. + - Enable **Bank Transfer (NEFT, RTGS, IMPS)** to create a Customer Identifier. + - Enable **UPI Transfer** to create a virtual UPI ID. + - Create custom UPI ID - Enter a custom identifier for the customer in the UPI ID field (12 characters of letters and numbers, for example, `gauravkumar1`). If left blank, the UPI ID will be auto-generated. + ![Create Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-create_ci.jpg.md) + - The prefix, `acmecorp` can be modified using the **click here** link. This opens a small modal where you can enter a new prefix. + + +> **INFO** +> +> +> **Handy Tips** +> +> An individual cannot modify the structure (prefix and descriptor) of the UPI ID. +> + +4. Select **Customer** from the drop-down list. You can also create a new customer instantly. You may skip this step and proceed with creation, if you do not wish to tag it to a specific customer. However, you cannot modify the Customer Identifier and tag it to the customer later. +5. Click **View Advance Options**. +6. Complete these steps to add account details for the **Third Party Validation**: + + 1. Select the **Bank Transfers (NEFT, RTGS, IMPS)** checkbox to create Customer Identifier details with TPV for bank transfers. + + +> **INFO** +> +> +> **Handy Tips** +> +> Refer to the [Third Party Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/third-party-validation.md) document for more details. +> + + 2. Click **Configure** to add details of **Authorised Accounts**. + ![Smart Collect TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-tpv.jpg.md) + 3. Enter **IFSC Code** and **Account Number**. + ![TPV - Add Bank Account no and IFSC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-authorised_accounts.jpg.md) + 4. Click **+ Add Another Account** to add accounts. You can add up to 10 **Authorised Accounts**. + 5. Click **Save**. + +Complete the other steps mentioned on screen and click **Create Customer Identifier**. + +Once the Customer Identifier has been created, you can copy the details and share them with your customer. + +> **INFO** +> +> +> **Handy Tips** +> +> While sharing the details of CIs (created using RBL bank) with the customers, ensure that the fifth character in the IFSC is number `0` and not the letter O. For example, valid IFSC is `RATN0VAAPIS` and not `RATNOVAAPIS`. +> + +![Customer Identifier Created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-va_list.jpg.md) + +The Customer Identifier appears in the list as shown below: + +![Created CI list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-va-created-list.jpg.md) + +## View Payments + +You can view the payments made to your Customer Identifiers on the Dashboard. + +To do this: +1. Log in to the Dashboard. +2. Navigate to **Smart Collect** → **Payments**. diff --git a/llm-content/payments/smart-collect/create.md b/llm-content/payments/smart-collect/create.md new file mode 100644 index 00000000..c2691423 --- /dev/null +++ b/llm-content/payments/smart-collect/create.md @@ -0,0 +1,195 @@ +--- +title: Create Customer Identifiers +description: Create and view Customer Identifiers and UPI IDs using the Razorpay Dashboard. +--- + +# Create Customer Identifiers + +Smart Collect simplifies the reconciliation of payments received via bank transfers. It allows you to create unique Customer Identifiers for specific customers. Payments are then automatically reconciled against these identifiers, reducing manual effort. + +> **WARN** +> +> +> **Watch Out** +> +> - You can create Customer Identifiers associated with UPI Transfers only with Smart Collect 2.0. +> - Bank account is mandatory to create a Customer Identifier. You cannot create a Customer Identifier using VPA (UPI) alone. +> + +## Create Customer Identifiers for Smart Collect + +You can create a Customer Identifier from the Dashboard: + +### To create Smart Collect Customer Identifiers: + +1. Log in to the Dashboard and click **Smart Collect**. +2. Click **+ Create Customer Identifier**. +3. Select the type of receiver in **Methods to accept payments in this customer identifier**. Only Bank Transfer (NEFT, RTGS, IMPS) is live, and enabled by default. + + ![Create Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-ci-smart-collect.jpg.md) +4. Select **Customer** from the drop-down list. You can also create a new customer instantly. You may skip this step and proceed with creation, if you do not wish to tag it to a specific customer. However, you cannot modify the Customer Identifier and tag it to the customer later. +5. Click **View Advance Options**. +6. Add an **Account Description** for your internal reference. +7. You can set a closure date for the Customer Identifier using the **Close By** option. Click **Disable Auto Close** option and select the date and time at which the account must be automatically closed. Ensure that the time specified is at least 15 minutes after the creation time. + ![Set a Close-by date for your Virtual Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-close-by-date.jpg.md) +8. Click **Add Internal Note** to enter any notes for internal reference. +9. Click **Create Customer Identifier**. + +![Customer Identifier Created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-va_list.jpg.md) + +After the Customer Identifier is created, copy the details and share them with your customer. The Customer Identifier appears in the list as shown below: + +![Created CI list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-va-created-list.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> - If a Customer Identifier has been inactive for 90 days without any transactions, it will be considered dormant and subsequently closed. +> - While sharing the details of CI (created using RBL bank) with the customers, ensure that the fifth character in the IFSC is number `0` and not the letter O. For example, valid IFSC is `RATN0VAAPIS` and not `RATNOVAAPIS`. +> + +### View Payments + +You can view the payments made to your Customer Identifiers on the Dashboard. + +To view payments made to Customer Identifiers: +1. Log in to the Dashboard. +2. Navigate to **Smart Collect** → **Payments**. + + +### To create Smart Collect Customer Identifiers with TPV: + + 1. Follow the same steps as **Create Customer Identifiers** until customer selection. + 2. Click **View Advance Options**. + 3. Complete these steps to add account details for the **Third Party Validation**: + + 1. Select the **Bank Transfers (NEFT, RTGS, IMPS)** checkbox to create Customer Identifier details with TPV for bank transfers. Know more about [Third Party Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/third-party-validation.md). + 2. Click **Configure** to add details of **Authorised Accounts**. + ![Smart Collect TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-tpv.jpg.md) + 3. Enter **IFSC Code** and **Account Number**. + ![TPV - Add Bank Account no and IFSC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-authorised_accounts.jpg.md) + 4. Click **+ Add Another Account** to add accounts. You can add up to 10 **Authorised Accounts**. + 5. Click **Save**. + +Complete the other steps mentioned on screen and click **Create Customer Identifier**. After a Identifier is created, copy the details and share them with your customer. + +![Customer Identifier Created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-va_list.jpg.md) + +The Customer Identifier appears in the list as shown below: + +![Created CI list](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-va-created-list.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> While sharing the details of CIs (created using RBL bank) with the customers, ensure that the fifth character in the IFSC is number `0` and not the letter O. For example, valid IFSC is `RATN0VAAPIS` and not `RATNOVAAPIS`. +> + +## Create Customer Identifiers for Smart Collect 2.0 + +You can create Customer Identifiers via the Dashboard or using the APIs: + + +### To create Smart Collect 2.0 Customer Identifiers: + + + + 1. Log in to the [ Dashboard](https://dashboard.razorpay.com/#/access/signin). + 1. Navigate to **Smart Collect** in the left menu → click **+ Create Customer Identifier**. + ![ Dashboard create SC 2.0 Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-sc2-create-ci.jpg.md) + 1. Select the type of receiver in **Methods to accept payments in this customer identifier**. Both **Bank Transfers (NEFT, RTGS, IMPS)** and **UPI Transfer** are enabled by default. You can choose to disable either as needed. + - Enable **Bank Transfer (NEFT, RTGS, IMPS)** to create a Customer Identifier. + - Enable **UPI Transfer** to create a virtual UPI ID. + ![Create Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-create_ci.jpg.md) + 1. Select **Customer** from the drop-down list. You can also create a new customer instantly. This is an optional step. Select the **Add Billing Address** check box if necessary. + + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot modify customers for Customer Identifiers after you create and save them. Ensure you tag the Customers to Customer Identifiers when you create them. +> + + + #### Configure Advance Options + The following advance options are available when you click **View Advance Options**: + - Configure **Third Party Validation**. Authorise bank accounts using IFSC and Account Number. + - Add an **Customer Identifier Description** for your internal reference. + - Add a closure date for the Customer Identifier. + - Clear the **Disable Auto Close** option to close the Customer Identifier on a certain future date. + - Select **Disable Auto Close** option and choose the date and time when the Identifier must automatically close. Ensure that the time specified is at least 15 minutes after the creation time. + + ![Set a Close-by date for your Virtual Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-close-by-date.jpg.md) + - Click **Add Internal Note** to enter any notes for internal reference. + + 1. Click **Create Customer Identifier**. + + This successfully creates a Customer Identifier. Click **Copy Customer Identifier Details** and share it with your merchants/customers. + + ![Smart Collect 2 Customer Identifier success](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-sc2-ci-create-success.jpg.md) + + + Use any of the following APIs to create Customer Identifiers as necessary: + + - [Create Customer Identifier With Bank Account Receiver](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect/create-cust-id-bank-account.md) + - [Create a Customer Identifier With VPA Receiver](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-2/create-cust-id-vpa.md) + - [Create a Customer Identifier With VPA and Bank Account Receivers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-2/create-cust-id-bank-account-vpa.md) + + + + + +### To create Smart Collect 2.0 Customer Identifiers with TPV: + + + + 1. Follow the steps to [create Smart Collect 2.0 Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/create.md#to-create-smart-collect-20-customer-identifiers). + 1. Click **View Advance Options**. + 1. Click **Configure** for **Third Party Validation**. + 1. In the **Authorised Accounts** pop-up modal, **IFSC Code** and **Account Number**. You can add up to 10 accounts. + + For RBL banks, ensure the fifth character in the IFSC is number `0` and not the letter O. + 1. Click **Save**. + ![SC 2.0 Customer Identifier with TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payments-sc2-ci-tpv.jpg.md) + 1. Add other Advance Options as necessary. + 1. Click **Create Customer Identifier**. + + This successfully creates a [Customer Identifiers with TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/create-tpv.md). + + + + Use any of the following APIs to create Customer Identifiers as necessary: + + - [Create Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-tpv/create.md) + - [Add an Allowed Payer Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-tpv/add-allowed-payer.md) + - [Add VPA Receiver to an Existing Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-2/add-receiver-vpa.md) + - [Add Bank Account Receiver to an Existing Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-2/add-receiver-bank-transfer.md) + + + + + + +> **INFO** +> +> +> **Handy Tips** +> +> - After you create a Customer Identifier, it moves to `active` status. Know more about the [states of Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/states.md). +> - You can disable/[close a Customer Identifier using APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect/close.md) if you no longer need it to accept payments. +> - You can create as many Customer Identifiers as required for your business. Share the Customer Identifiers with your beneficiaries to receive payments. +> + + + +### Related Information +- [Close Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/close.md) +- [Refund Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/refund.md) +- [Make Test Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/test-payments.md) +- [Search for a Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/search.md) diff --git a/llm-content/payments/smart-collect/custom.md b/llm-content/payments/smart-collect/custom.md new file mode 100644 index 00000000..359389ad --- /dev/null +++ b/llm-content/payments/smart-collect/custom.md @@ -0,0 +1,122 @@ +--- +title: Custom Account Numbers +--- + +# Custom Account Numbers + +> **INFO** +> +> +> **Enabling Custom Account Numbers** +> +> To enable Custom Accounts for your account, contact our [Support Team](https://razorpay.com/support) for any queries. +> + +By default, any Customer Identifier created by you will have randomly generated numeric bank account number. + +However, Razorpay Smart Collect also allows you to create custom bank accounts with customizable account numbers. This means you will be able to create Customer Identifiers that have the account number `XXXXXXXXYYYYYYYY`, where the X-segment remains static, but the content of the Y-segment is within your control. + +The possible options that can be set for the `bank_account` receiver are given below. + +Attribute | Mandatory/Optional (in request) | Type | Description +--- +`receivers` | Mandatory | JSON Object | Configuration of desired receivers for the Customer Identifier +--- +`receivers.types` | Mandatory | array | List of desired receiver types. Currently `bank_account` is the only supported type. +--- +`receivers.bank_account.numeric` | Optional, default: 1 | integer | Flag to indicate whether a numeric or alphanumeric account is desired. +--- +`receivers.bank_account.descriptor` | Optional | string | String that is to be used for account number generation. If not sent, a random 8-digit descriptor will be used. +--- + +## Prefix + +The first 8 characters in your account number will remain fixed for all your generated account numbers, eg. `22233344`. This is ordinarily set to a completely numeric value for your account, but an alphanumeric value can also be set upon request, eg. `RAZORPXY`. + +## Descriptor + +The `descriptor` field can be used to define the last eight characters of the generated bank account number. + +```json:JSON Input +{ + "receivers": { + "types": [ + "bank_account" + ], + "bank_account": { + "descriptor": "00000001" + } + }, + "customer_id": "cust_805c8oBQdBGPwS", + "description": "Custom Virtual Account" +} +```json:Output +{ + "id": "va_4xbQrmEoA5WJ0G", + "entity": "virtual_account", + "description": "Custom Virtual Account", + "customer_id": "cust_805c8oBQdBGPwS", + "status": "active", + "amount_paid": 0, + "receivers": [ + { + "id": "ba_4lsdkfldlteskf", + "entity": "bank_account", + "name": "Merchant Billing Label", + "account_number": "2223334400000001", + "ifsc": "RAZR0000001" + } + ], + "created_at": 1455696638 +} +``` + +Here in this example, a descriptor `00000001` is being used to generate an account number, while prefix `22233344` is pre-decided. + +> **WARN** +> +> +> **Descriptor Usage** +> +> The descriptor can have a maximum length of upto 8 characters. This is because some banks do not allow addition of beneficiary accounts that have an account number longer than 16 characters. +> +> This `descriptor` field can only be used if custom Customer Identifiers are enabled for your account. If it is not set, sending any value in the descriptor field will return an error. +> +> ```json:Error +> { +> "error": { +> "description": "Descriptor cannot be used with your account.", +> "code": "BAD_REQUEST_ERROR" +> } +> } +> ``` +> +> The `descriptor` is required to be unique amongst your active Customer Identifiers. If a descriptor is sent, which is already in use by another active Customer Identifier, the following error is returned. +> +> ```json:Error +> { +> "error": { +> "description": "An active Customer Identifier with the same descriptor already exists for your account.", +> "code": "BAD_REQUEST_ERROR" +> } +> } +> ``` +> + +> **WARN** +> +> +> **Avoiding Ambiguous Account Numbers** +> +> When displaying a bank account number to a customer, the font used may cause the customer to misread the alphanumeric characters (if any) in the number. This means customers are very liable to committing typos when required to enter the beneficiary account while initiating a payment. Misreading the letter 'O' in an account number as the numeral '0', for example, is extremely common. +> +> Payments made to such mistyped accounts are considered invalid, and are refunded back to the customer's account within 1 working day. However, this is still a huge inconvenience for the customer, who now has to wait 24 hours to receive a refund for what is often a rather large payment. +> +> For this reason, we strongly advice against using the following characters in your descriptor for alphanumeric accounts, as they may appear ambiguous in certain fonts. +> +> - `0` or `O` +> - `1` or `I` +> - `5` or `S` +> - `8` or `B` +> - `2` or `Z` +> diff --git a/llm-content/payments/smart-collect/faqs.md b/llm-content/payments/smart-collect/faqs.md new file mode 100644 index 00000000..601032d1 --- /dev/null +++ b/llm-content/payments/smart-collect/faqs.md @@ -0,0 +1,200 @@ +--- +title: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Smart Collect, Third Party Validation and Smart Collect 2.0. +--- + +# Frequently Asked Questions (FAQs) + +## Smart Collect + + +### 1. How can a customer make a payment to a Smart Collect Customer Identifier? + + The customer can make a transaction to the bank account via a simple NEFT, RTGS or IMPS transaction from their preferred internet banking portal. + + + +### 2. Can a customer make payment to a Customer Identifier via an offline transaction? + + Yes, customers can visit their bank and fill out an RTGS form, or a NEFT challan with the beneficiary details provided by Razorpay and initiate a transfer from their account. + + +> **INFO** +> +> +> **Handy Tips** +> +> Customers cannot deposit cash into a Customer Identifier. Only NEFT, RTGS or IMPS transactions are permitted. +> + + + + +### 3. What does a Smart Collect Customer Identifier look like? + + Exactly like a normal account! Here's an example: + + ``` + Account Number: 11122219877893452 + IFSC: RAZR0000001 + Name: Acme Corporation + ``` + + + +### 4. What name will be associated with a Smart Collect customer identifier? + + Your merchant billing label will be used as the name on your customer identifier. + + + +### 5. What happens if a customer makes an NEFT, RTGS or IMPS payment to a `Closed` customer identifier? + + Once the customer identifier is `Closed`, we will automatically refund all payments back to the source. Refunds are generally processed within 1 business day via the same mode used by the customer. + + + +### 6. Can I pass a dynamic merchant identifier via API? + + Currently, this feature is not available. + + + +### 7. Can I create customer identifiers in bulk? + + Yes, you can create customer identifiers in bulk. To do this, please contact our [support team](https://razorpay.com/support/#request). + + + +### 8. How to close a customer identifier? + + A customer identifier can be closed in two ways: + - Automatically, by using the `close_by` option at the time of customer identifier creation, via Dashboard or API. + - Manually, from the Dashboard or using the API. + Once a customer identifier is in closed state, customers cannot make payments to that account. + + + +### 9. Where can I find pricing details for Smart Collect? + + Check the [Smart Collect Pricing](https://razorpay.com/smart-collect/#pricing). + + + +### 10. I have created an ICICI-based customer identifier. When I try to make a bank transfer using a UPI PSP app such as Google Pay, I am getting errors. Why? + + Currently, we do not support a bank transfer to an ICICI-based customer identifier, using a UPI PSP app. + + + +### 11. Does Razorpay process an RBL to RBL transfer using Smart Collect? + + Yes, we support RBL to RBL Internal Fund Transfer (IFT) transactions on Smart Collect RBL customer identifiers. + + + +### 12. Are Google Spot payments supported on Smart Collect VPAs? + + Currently, we do not support Google Spot integration on Smart Collect VPAs. + + + +### 13. Can I create Smart Collect VPAs in the test mode? + + Currently, we support creation of Smart Collect VPAs in the live mode only. + + + +### 14. Is TR field supported on Smart Collect VPAs? + + Currently, we do not support TR field on Smart Collect VPAs. + + +## Third Party Validation + + +### 1. What is Third-Party Validation (TPV)? + + Third-Party Validation (TPV) of bank accounts is a mandatory requirement for merchants in securities, broking and mutual funds operating in the BFSI (Banking, Financial Services and Insurance) sector. + + As per Securities and Exchange Board of India (SEBI) guidelines, transactions must be made by the customers only from those bank accounts that were submitted to your business at the time of registration. + + + +### 2. Does it require a ​manual verification of account details for the customer identifier? + + No. Smart Collect eliminates the need for manually verification of account details. + + All you have to do is pass the customer's account details when creating the customer identifier. Razorpay verifies the customer's account details on every payment made to the customer identifier. + + + +### 3. How do I know the allowed payers list? + + You can fetch the `allowed_payers` list using [Webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/smart-collect.md) or API response. + + + +### 4. Is there a limit on the number of bank accounts for TPV validation for customer identifiers? + + Customer Identifiers support TPV validation for a maximum of 10 bank accounts. + + + +### 5. What happens if a customer attempts a payment from a different account which is not in the allowed payers? + + If a payment is made from an account that is different from what is provided in the `allowed_payer` attribute, the amount is instantly refunded to the customer via the same mode NEFT/RTGS/IMPS. + + You can view these payments on the **Transactions** → **Refunded** tab on your Dashboard. These payments have the following description: `Bank Account Validation Failed`. + + +## Smart Collect 2.0 + + +### 1. What is the difference between Smart Collect and Smart Collect 2.0? + + Smart Collect 2.0 offers solutions that Smart Collect does not. With Smart Collect 2.0, you can: + - Collect and settle payments instantly from customers and third parties. + - Create alphanumeric Customer Identifiers as well as virtual UPI IDs to collect payments. + + + +### 2. What is a Smart Collect 2.0 Customer Identifier? + + Customer Identifiers (CI) are 16-digit numbers used to collect funds via IMPS/NEFT/RTGS. Payments made to Customer Identifiers are settled instantly. + + + +### 3. How do I know if I need an Escrow account or a Current account? + + You must open an Escrow account if the end beneficiary is a third party. However, if your end beneficiary is a merchant/customer, you need a Current account. + + + +### 4. With which banks can I open a Current/Escrow Account? + + You can open a [Current account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/current-account.md)/[Escrow account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/escrow.md) with Yes Bank or Axis Bank. + + + +### 5. How do I make payouts from the Escrow/Current account? + + You can make payouts using the [Payouts APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/api.md). + + + +### 6. Do I need to make changes to the Smart Collect APIs to use Smart Collect 2.0? + + Yes. You must update the Customer Identifiers when using the Smart Collect APIs. Smart Collect Customer Identifiers are numeric whereas Smart Collect 2.0 Customer Identifiers are alphanumeric. That is the only change you must make. + + + +### 7. Is it mandatory to migrate from Smart Collect to Smart Collect 2.0? + + No, it is not mandatory. You can migrate from Smart Collect to Smart Collect 2.0 based on your business requirements. + + + +### 8. How is the fee for Smart Collect 2.0 collected? + + We collect the Smart Collect 2.0 usage fee from your [Fee Credits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/credits.md#fee-credits). If your Fee Credits are low, we charge it from your [settlement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md#settlement-cycle). diff --git a/llm-content/payments/smart-collect/glossary.md b/llm-content/payments/smart-collect/glossary.md new file mode 100644 index 00000000..e491f27f --- /dev/null +++ b/llm-content/payments/smart-collect/glossary.md @@ -0,0 +1,22 @@ +--- +title: Glossary +description: List of all the commonly used terms related to Razorpay Smart Collect. +--- + +# Glossary + +The following table lists all the commonly used terms and their definitions used in Smart Collect: + +Terms | Description +--- +Customer Identifier | Customer Identifiers are bank accounts that have no physical existence, are temporary, and transact on behalf of a real, physical account. A customer identifier has a unique account number that makes it easy to trace the funds coming through it and helps to identify the source or the payer. +--- +NEFT | National Electronic Funds Transfer or NEFT is a form of money transfer routed via RBI by the banks. Transfers from the source bank are sent in batches once in every 30 minutes to the RBI which is then forwarded to the beneficiary bank. It quickly transfers money between banks throughout India. A bank branch must be NEFT-enabled for a customer to be able to transfer the funds to another party. +--- +RTGS | Real Time Gross Settlement or RTGS is also a form of money transfer routed via RBI by the banks. Unlike NEFT, transactions made using this method are settled instantly. It can be used only when the minimum amount to be transferred is ₹2,00,000/- or more. +--- +IMPS | Immediate Payment Service or IMPS is an instant and 24x7 available money transfer service that is routed through NPCI (National Payments Corporation of India) from the source bank to the beneficiary bank. The maximum amount cap per transaction is ₹2,00,000/-. +--- +Beneficiary | Beneficiary is the person or entity to which money is credited in a payout/payment. A beneficiary can be a person or a business entity. Beneficiary Account is the account of the Beneficiary. +--- +Third Party Validation (TPV) | Third Party Validation (TPV) is essentially a process of confirming customer’s information by an external organisation. TPV plays an important role in securing transactions made in the BFSI Sector (Banking, Financial Services and Insurance). diff --git a/llm-content/payments/smart-collect/how-it-works.md b/llm-content/payments/smart-collect/how-it-works.md new file mode 100644 index 00000000..687e34fd --- /dev/null +++ b/llm-content/payments/smart-collect/how-it-works.md @@ -0,0 +1,39 @@ +--- +title: How Smart Collect Works +description: Create a Customer Identifier and send them to customers for receiving payments. +--- + +# How Smart Collect Works + +The following steps explain how Smart Collect uses Customer Identifiers to receive payments from the customers: + +![How Smart Collect Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-sc_workflow.jpg.md) + +1. Set up your [Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md). +2. Create Customer Identifiers tagged to the customer. +3. The account details of the Customer Identifier created by Razorpay (such as account number, IFSC and Name) should be shared with the customer. +4. The customer adds the bank account as a beneficiary on their preferred netbanking portal and transfers the money using NEFT, RTGS or IMPS. +5. Payment deposited in these customer identifiers is settled into your bank account linked with Razorpay. + +> **INFO** +> +> +> **Payment Confirmation** +> +> You can consider a payment to be successful only when you receive the notification from Razorpay. You can [check the payment status on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/create.md#view-payments). Also, you can choose to configure [webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/subscribe-to-webhooks.md) and subscribe to the `virtual_account.credited` event to receive notifications when customers make payments. +> + +## Customer Identifier Format + +You can create a unique Customer Identifier using Smart Collect to receive payments from your customers. The Customer Identifier consists of 16 digits. + +``` +Bank Account Number: 1112220040042526 +``` +Know more about [Customer Identifier States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/states.md). + +### Related Information +- [Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) +- [Auto Third Party Validation (TPV) on Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/third-party-validation.md) +- [Smart Collect APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/subscribe-to-webhooks.md) diff --git a/llm-content/payments/smart-collect/notification-wo-payer-details.md b/llm-content/payments/smart-collect/notification-wo-payer-details.md new file mode 100644 index 00000000..21a3991c --- /dev/null +++ b/llm-content/payments/smart-collect/notification-wo-payer-details.md @@ -0,0 +1,86 @@ +--- +title: Notification (prior to 24/05/19) +description: Receive notifications for your Razorpay Customer Identifier for payment captured event using webhooks and receive email notifications for payment successful event. +--- + +# Notification (prior to 24/05/19) + +All payments made using Smart Collect will show up on your Dashboard as well as in the usual payment response APIs, as payments made with method `bank_transfer`. + +## Webhooks +Payments made using this method will also trigger webhooks much like regular payments. To use webhooks, refer our [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) documentation. + +### Virtual Account Credited Event + +You are notified about payments made using Smart Collect via the `virtual_account.credited` webhook. + +The payload for this event contains details of the payment as well as the Customer Identifier that the payment was made towards. + +Given below is the webhook payload for `virtual_account.credited`. + +``` +{ + "event": "virtual_account.credited", + "entity": "event", + "contains": [ + "payment", + "virtual_account" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_6X6jcHoHdRdy79", + "entity": "payment", + "amount": 50000, + "currency": "INR", + "status": "captured", + "amount_refunded": 0, + "refund_status": null, + "method": "bank_transfer", + "order_id": "order_6X4mcHoSXRdy79", + "card_id": null, + "bank": null, + "captured": true, + "email": "saurav.kumar@example.com", + "contact": "9123456780", + "description": "Payment Description", + "error_code": null, + "error_description": null, + "fee": 200, + "tax": 10, + "international": false, + "notes": [], + "vpa": null, + "wallet": null + } + }, + "virtual_account": { + "entity": { + "id": "va_4xbQrmEoA5WJ0G", + "entity": "virtual_account", + "description": "First Virtual Account", + "customer_id": "cust_805c8oBQdBGPwS", + "status": "active", + "amount_paid": 50000, + "notes": { + "reference_key": "reference_value" + }, + "receivers": [ + { + "id": "ba_4lsdkfldlteskf", + "entity": "bank_account", + "name": "Merchant Billing Label", + "account_number": "11122219877893452", + "ifsc": "RAZR0000001" + } + ], + "created_at": 1455696638 + } + }, + "created_at": 1400826760 + } +} +``` + +## Emails +You will also receive a 'payment successful' notification email, as you do for regular payments. diff --git a/llm-content/payments/smart-collect/pa-pg-migration.md b/llm-content/payments/smart-collect/pa-pg-migration.md new file mode 100644 index 00000000..3492d1ce --- /dev/null +++ b/llm-content/payments/smart-collect/pa-pg-migration.md @@ -0,0 +1,107 @@ +--- +title: Account Migration - New PA/PG Guidelines +description: Update your setup to work with our new banking partners. +--- + +# Account Migration - New PA/PG Guidelines + +RBI [revised guidelines](https://www.rbi.org.in/scripts/FS_Notification.aspx?Id=11822&fn=9&Mode=0) for PA/PG requires Razorpay to have an escrow account with RBL as banking partner. Existing Customer Identifiers with Yes Bank and ICICI Bank will be shut down, and all banking ops moved to RBL escrow account. Dashboard shows both old and newly created Customer Identifier until Jan 31, 2022. + +## API Interface Post Migration + +Post migration, new virtual response for Customer Identifier built on Yes Bank/ICICI Bank will contain two objects in receivers array, one for new RBL CI and one for existing Yes Bank/ICICI Bank CI. Confirm new RBL CI by checking IFSC Code `RATN0VAAPIS`. + +The following sample response code can be used as a reference: + +```json: API Sample Response Code +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "va_IirUUD9dDm4G4i", + "name": "Test Account", + "entity": "virtual_account", + "status": "active", + "description": "Vishnu Jangid", + "amount_expected": null, + "notes": { + "project_name": "Vishnu Jangid" + }, + "amount_paid": 0, + "customer_id": null, + "receivers": [ + { + "id": "ba_IirUUYO8caNoK5", + "entity": "bank_account", + "ifsc": "YESB0CMSNOC", + "bank_name": "Yes Bank", + "name": "Test Account", + "notes": [], + "account_number": "2223330053041804" + }, + { + "id": "ba_IirUUYO8sh1602", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Test Account", + "notes": [], + "account_number": "2223330053041804" + } + ], + "close_by": 1681615838, + "closed_at": null, + "created_at": 1641997300 + } + ] +} +``` + +## Frequently Asked Questions (FAQs) + + +### 1. Does this impact the Customer Identifiers I create? + + All existing Smart Collect merchants who create Customer Identifiers with Yes Bank or ICICI are impacted. Merchants with Customer Identifiers through RBL Bank are not impacted. + + + +### 2. Are all the Customer Identifiers migrated to RBL Bank? + + Only Customer Identifiers created with Yes Bank and ICICI Bank are migrated to RBL Bank. + + + +### 3. What is the impact on my Customer Identifiers? + + The Customer Identifiers created with Yes Bank and ICICI bank have been shut down on 31st January 2022. Post that, transfer of any funds to these Customer Identifiers are not being processed. + + + +### 4. What if I specifically want a Customer Identifier with Yes Bank or ICICI Bank? + + Due to revised guidelines, we do not support issuing Customer Identifiers with Yes Bank or ICICI Bank. + + + +### 5. Can I continue using my existing Customer Identifiers? + + After 31st January 2022, you cannot receive payments on the existing Customer Identifiers. + + + +### 6. What actions do I need to take? + + - The account number and/or IFSC codes for all impacted Customer Identifiers change. + - You must inform your customers so they can add the new Customer Identifiers as beneficiaries for NEFT/IMPS/RTGS payments. + - Until 31st January 2022, incoming payments were being received on both old and new Customer Identifiers. + - Post 31st January 2022, fund transfers to old Customer Identifiers are not being processed. + + +### Related Information +- [Razorpay Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) +- [How Smart Collect Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/how-it-works.md) +- [Customer Identifier States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/states.md) +- [Smart Collect APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/subscribe-to-webhooks.md) diff --git a/llm-content/payments/smart-collect/receiver-types.md b/llm-content/payments/smart-collect/receiver-types.md new file mode 100644 index 00000000..12f1091d --- /dev/null +++ b/llm-content/payments/smart-collect/receiver-types.md @@ -0,0 +1,98 @@ +--- +title: API Endpoints +--- + +# API Endpoints + +Base URL: `https://api.razorpay.com/v1/` + +The Customer Identifier response contains attributes such as `id` and `customer_id`, and also a field `receivers`. This is an array that defines what receivers are available for the Customer Identifier. + +For example, if the `receiver_types` field of the original request contained `bank_account`, then the response will contain a `receivers` array with one element, which gives details of that `bank_account` receiver such as account number, IFSC, etc. + +## Create + +> **WARN** +> +> +> **Note** +> +> The request format for Customer Identifier creation recently underwent a change, and the updated format can be found [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md). The request format given below will eventually be deprecated. +> +> For new integrations, we strongly recommend you use the updated request format, as it allows a host of new features, most particularly the support for completely-numeric account numbers by default. +> + +/virtual_accounts + +```bash: cURL +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST \ + --data "receiver_types[]=bank_account" \ + --data "description=First Customer Identifier" \ + --data "notes[reference_key]=reference_value" \ + https://api.razorpay.com/v1/virtual_accounts +```json:Response +{ + "id": "va_4xbQrmEoA5WJ0G", + "entity": "virtual_account", + "description": "First Customer Identifier", + "customer_id": "cust_805c8oBQdBGPwS", + "status": "active", + "amount_paid": 0, + "notes": { + "reference_key": "reference_value" + }, + "receivers": [ + { + "id": "ba_4lsdkfldlteskf", + "entity": "bank_account", + "name": "Merchant Billing Label", + "account_number": "11122219877893452", + "ifsc": "RAZR0000001" + } + ], + "created_at": 1455696638 +} +``` + +With the exception of the `Create` API, the request format for all other API endpoints remains the same, and can be checked [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md). + +## Migration + +To migrate to the new request format, simply replace the `receiver_types` parameter in the request body with the equivalent `receivers.types` parameters. + +```json:Older Request +{ + "receiver_types": [ + "bank_account" + ], + "description": "First Customer Identifier", + "customer_id": "cust_805c8oBQdBGPwS", + "notes": { + "reference_key": "reference_value" + } +} +```json:Updated Request +{ + "receivers": { + "types": [ + "bank_account" + ] + }, + "description": "First Customer Identifier", + "customer_id": "cust_805c8oBQdBGPwS", + "notes": { + "reference_key": "reference_value" + } +} +``` + +Note that `receiver.types` is a mandatory parameter. + +> **INFO** +> +> +> **Note** +> +> By default, the account number generated using the new request format is wholly numeric, thus allowing it to be used on a wider range of platforms. This is a change from the older request format, which produced only alphanumeric account numbers. +> diff --git a/llm-content/payments/smart-collect/refund-failures.md b/llm-content/payments/smart-collect/refund-failures.md new file mode 100644 index 00000000..4b7da184 --- /dev/null +++ b/llm-content/payments/smart-collect/refund-failures.md @@ -0,0 +1,37 @@ +--- +title: Refund Failures +description: Check different refund failure scenarios of a Customer Identifier. +--- + +# Refund Failures + +There are some situations where it is **not** possible to refund a payment received on a Customer Identifier. These are listed below: + +- UPI payments initiated from UPI PSP apps such as Google Pay, PhonePe. Such payments do not show remitter bank account details and it is not possible to process a refund. + +- IMPS Payments made from a small number of banks that do not share the payer's account number and such payments cannot be automatically refunded. + +- Payments made from Non-Resident External (NRE) bank accounts. In such cases, Razorpay is not permitted to deposit money into the account and it is not possible to process a refund. + +In each of these cases, if a refund is still necessary, you can obtain alternate bank account details from your customer and raise a request on the [Support Portal](https://razorpay.com/support/#request) to initiate a refund. + +> **INFO** +> +> +> **Handy Tips** +> +> You can create refunds for the payments received on a Customer Identifier. Refunds are generally processed within 3-5 business days via the same mode used by your customer. The platform fee and GST charged on successful transactions will not be reversed in the case of refunds. +> +> You can initiate refunds from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/refund.md) or using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md). +> +> + +### Related Information +- [Razorpay Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) +- [How Smart Collect Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/how-it-works.md) +- [Customer Identifier States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/states.md) +- [Auto Third Party Validation (TPV) on Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/third-party-validation.md) +- [Search for a Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/search.md) +- [Make Test Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/test-payments.md) +- [Smart Collect APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/subscribe-to-webhooks.md) diff --git a/llm-content/payments/smart-collect/refund.md b/llm-content/payments/smart-collect/refund.md new file mode 100644 index 00000000..0e6608f7 --- /dev/null +++ b/llm-content/payments/smart-collect/refund.md @@ -0,0 +1,25 @@ +--- +title: Refund Payments +description: Refund payments made by customers to your Customer Identifiers. +--- + +# Refund Payments + +You can refund the payment made by a customer. This refund can be in full or parts. + +To initiate a refund from your Customer Identifier: +1. In the **Payments** tab, click the Payment Id. +2. In the right pane, click the **Issue Refund** button. + ![Issue Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/va_issue_refund.jpg.md) +3. A dialog box appears where the refund amount can be entered. + - Full Refund: Enter **Comments**, if any, and click the **Issue Full Refund** button. + ![Issue Full Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sc_full_refund.jpg.md) + - Partial Refund: Enter the amount you want to refund. Enter **Comments**, if any, and click the **Issue Partial Refund** button. + ![Partial Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/va_partial_refund.jpg.md) +4. A confirmation dialog box appears. Click **Yes, Refund** to complete the process. + +### Related Information +- [Create Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/create.md) +- [Close Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/close.md) +- [Make Test Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/test-payments.md) +- [Search for a Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/search.md) diff --git a/llm-content/payments/smart-collect/search.md b/llm-content/payments/smart-collect/search.md new file mode 100644 index 00000000..0d1af4c2 --- /dev/null +++ b/llm-content/payments/smart-collect/search.md @@ -0,0 +1,27 @@ +--- +title: Search for a Customer Identifier +description: Search for a Customer Identifier using the Razorpay Dashboard. +--- + +# Search for a Customer Identifier + +You can search for a Customer Identifier on the Dashboard by specifying various filters. + +To search for a Customer Identifier: + +1. Log in to the Dashboard. +2. Select **Smart Collect** from the left menu and search for a Customer Identifier under **Customer Identifiers** by specifying filters. + +![Customer Identifier List](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-virtual-account-search.jpg.md) + +Filter | Description +--- +Customer Identifier Id | The unique ID of the Customer Identifier. +--- +Notes | The Internal Note added by you during the creation of the Customer Identifier. + +### Related Information +- [Create Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/create.md) +- [Close Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/close.md) +- [Refund Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/refund.md) +- [Make Test Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/test-payments.md) diff --git a/llm-content/payments/smart-collect/states.md b/llm-content/payments/smart-collect/states.md new file mode 100644 index 00000000..97552133 --- /dev/null +++ b/llm-content/payments/smart-collect/states.md @@ -0,0 +1,25 @@ +--- +title: Customer Identifier States +description: List of states of a Customer Identifier and their significance. +--- + +# Customer Identifier States + +There are two states for a Customer Identifier, **Active** and **Closed**. Given below is an illustration of the life cycle of a Customer Identifier. + +![Illustration of lifecycle of customer identifier as active or inactive](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-virtual-account-states.jpg.md) + +The table below lists the various states of a Customer Identifier and gives a brief description of each state: + +Status | Description | Next Steps +--- +Active | Indicates the Customer Identifier has been created and saved. You can accept payments using this account. | Customers can start making payments to this Customer Identifier. +--- +Closed | Indicates the Customer Identifier has been deactivated or has expired. You cannot accept payments using this account. | Customers can no longer make payments to this Customer Identifier. You cannot reactivate the Customer Identifier. You need to create a new Customer Identifier to start accepting payments. + +### Related Information +- [Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) +- [How Smart Collect Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/how-it-works.md) +- [Auto Third Party Validation (TPV) on Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/third-party-validation.md) +- [Smart Collect APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/subscribe-to-webhooks.md) diff --git a/llm-content/payments/smart-collect/status.md b/llm-content/payments/smart-collect/status.md new file mode 100644 index 00000000..7e4b9b2a --- /dev/null +++ b/llm-content/payments/smart-collect/status.md @@ -0,0 +1,20 @@ +--- +title: Customer Identifier Status +description: Learn about the different states of the Customer Identifier. +--- + +# Customer Identifier Status + +The Customer Identifier is Active or Closed state in its life cycle. + +## Active + +When you create a Customer Identifier via [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/create.md) or [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md#create-virtual-account), it is `active` and ready to accept payments. + +## Closed + +You can close a Customer Identifier using any of the following methods: +- Automatically, by using the `close_by` option at the time of Customer Identifier creation, via [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/create.md) or [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md#create-virtual-account). +- Manually, from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/close.md) or using the [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md#close-a-virtual-account). + +Once the account is in the `closed` state, your customers cannot make payments to that closed account. diff --git a/llm-content/payments/smart-collect/subscribe-to-webhooks.md b/llm-content/payments/smart-collect/subscribe-to-webhooks.md new file mode 100644 index 00000000..1e6bea3e --- /dev/null +++ b/llm-content/payments/smart-collect/subscribe-to-webhooks.md @@ -0,0 +1,49 @@ +--- +title: Smart Collect | Subscribe to Webhooks +heading: Subscribe to Webhooks +description: Subscribe to various webhook events related to Smart Collect to receive instant notifications. +--- + +# Subscribe to Webhooks + +Subscribe to webhook events relevant to Smart Collect. + +To subscribe to webhook events: +1. Log in to the Dashboard. +2. Navigate to **Dashboard** → **Account & Settings** → **Webhooks** to subscribe to any of the events mentioned in the following section. + +> **INFO** +> +> +> **Handy Tips** +> +> - Ensure that you mitigate possible webhook failures. +> - Ensure that you have subscribed to [Smart Collect Events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/smart-collect.md#smart-collect). +> - If the Customer Identifier is customer-specific, please pass `customer_id` while creating the Customer Identifier. Customer_id will be reflected in webhooks as well for easy reconciliation. +> - To uniquely identify the payment, store the `bank_reference` (unique reference number on the customer's bank statement) received in [webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/smart-collect.md#smart-collect) or the [Fetch API response](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md#fetch-a-customer-identifier-by-id). +> + +## Webhook Events and Descriptions + +Webhook Events | Description +--- +virtual_account.created | Triggered when a Customer Identifier is created. +--- +virtual_account.credited | Triggered when a payment is made to a Customer Identifier. +--- +virtual_account.closed | Triggered when a Customer Identifier expires on a date set by you or is manually closed by you. + +Know more about [ Webhooks ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) and check the [sample payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/smart-collect.md). + +### Related Information +- [Razorpay Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) +- [How Smart Collect Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/how-it-works.md) +- [Customer Identifier States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/states.md) +- [Smart Collect Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) +- [Create Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/create.md) +- [Close Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/close.md) +- [Refund Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/refund.md) +- [Refund Failures](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/refund-failures.md) +- [Search for a Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/search.md) +- [Make Test Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/test-payments.md) +- [Smart Collect APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md) diff --git a/llm-content/payments/smart-collect/test-payments.md b/llm-content/payments/smart-collect/test-payments.md new file mode 100644 index 00000000..196a0262 --- /dev/null +++ b/llm-content/payments/smart-collect/test-payments.md @@ -0,0 +1,39 @@ +--- +title: Make Test Payments +description: Make test payments to Customer Identifiers in Test Mode. +--- + +# Make Test Payments + +You can make a test payment to a Customer Identifier only in Test Mode. + +> **INFO** +> +> +> **No Test Payments on Live Mode** +> +> - The **Make Test Payments** feature is only available in **Test Mode**. +> - You can toggle between Live and Test Modes on your **Dashboard**. Navigate to the top menu ribbon and click the drop-down icon against **Live Mode**. Toggle to **Test Mode** and create a new customer identifier. +> + +## Test Payment to a Customer Identifier + +To make test payments to a Customer Identifier: + +1. Log in to the Dashboard and click **Smart Collect**. +2. In the list of Customer Identifiers, select the Customer Identifier id to which you want to make a test payment. +3. In the right pane, click **Make a Test Payment**. + ![Smart Collect - Test Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-va_test_payments.jpg.md) +4. Enter the following details in the form: + 1. **Amount**: Enter the amount to be transferred to the Customer Identifier as the test payment. + ![SC - Test Payment Method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sc_test_payment.jpg.md) + 2. **Method**: Select the payment method. You can choose NEFT, RTGS or IMPS. +5. Click **Create**. + +A success message **test payment successful** appears, indicating that the payment has gone through. You can verify this on the Customer Identifier list as well. + +### Related Information +- [Create Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/create.md) +- [Close Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/close.md) +- [Refund Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/refund.md) +- [Search for a Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/search.md) diff --git a/llm-content/payments/smart-collect/testing.md b/llm-content/payments/smart-collect/testing.md new file mode 100644 index 00000000..fa7a4b07 --- /dev/null +++ b/llm-content/payments/smart-collect/testing.md @@ -0,0 +1,23 @@ +--- +title: Test Payments in Smart Collect +description: Learn how you can accept payments to Customer Identifiers in test mode before accepting live payments in Razorpay Smart Collect product. +--- + +# Test Payments in Smart Collect + +You can create and manage your Customer Identifiers in test mode before you start making and receiving actual transactions. + +To generate Test Keys for API: +1. Log in to the Dashboard. +2. Select the **Test Mode** from menu ribbon. +3. Navigate to **Settings** > **API Keys**. +4. Click **Generate Test Key**. +5. Click **Download Key Details** and save the Test Key details on your system. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +## Test Payments + +Test payments can be initiated towards any Customer Identifier created in test mode, via the `Make Test Payment` option on your Dashboard. This option will trigger the webhook notifications similar to the live payment made via NEFT/IMPS/RTGS. + +Follow these steps to [Make a Test Payment from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/test-payments.md). diff --git a/llm-content/payments/smart-collect/third-party-validation.md b/llm-content/payments/smart-collect/third-party-validation.md new file mode 100644 index 00000000..0d63f3c9 --- /dev/null +++ b/llm-content/payments/smart-collect/third-party-validation.md @@ -0,0 +1,24 @@ +--- +title: Auto Third-Party Validation (TPV) on Smart Collect +description: Perform auto third-party validation of bank accounts provided by your customers using Razorpay Smart Collect API. +--- + +# Auto Third-Party Validation (TPV) on Smart Collect + +Third-party validation is a very important step in the Banking, Financial Services and Insurance sector. As per SEBI guidelines, businesses operating in these sectors must ensure that payments are accepted from the customers' registered, KYC-approved bank accounts only. + +![Auto Third-Party-Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/smart-collect-tpv-process.jpg.md) + +- Using Razorpay Smart Collect API, you can comply with the regulatory guidelines to ensure that the customers make payments only from their registered bank accounts (TPV). +- If payments are made from the unregistered accounts (non-TPV), they are automatically refunded to the customers. +- When you create a Customer Identifier, send the `allowed_payers` array with the customer's bank `account_number` and `ifsc`. This helps to identify TPV transactions and automatically refund non-TPV transactions. + +Know more about [API Endpoints](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect-tpv.md) and [the list of banks that support TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/bank-list.md). + +### Related Information +- [Razorpay Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) +- [How Smart Collect Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/how-it-works.md) +- [Customer Identifier States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/states.md) +- [Refund Failures](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/refund-failures.md) +- [Smart Collect APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/smart-collect.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/subscribe-to-webhooks.md) diff --git a/llm-content/payments/smart-collect/update-expiry.md b/llm-content/payments/smart-collect/update-expiry.md new file mode 100644 index 00000000..7b560a5d --- /dev/null +++ b/llm-content/payments/smart-collect/update-expiry.md @@ -0,0 +1,16 @@ +--- +title: Update Expiry Date for an Individual Customer Identifier +description: Know how you can update the Expiry Date of an Individual Customer Identifier. +--- + +# Update Expiry Date for an Individual Customer Identifier + +Learn how to update the Close by date (Expiry Date) for an Individual Customer Identifier. + +To update the Expiry Date of an Individual Customer Identifier: +1. Log in to the Dashboard and navigate to Smart Collect. +2. Click on the Customer Identifier ID for which you wish to update the expiry date. +3. In the pop-up that appears, in the **Close by** section, click **Change**. + ![](/docs/assets/images/smart-collect-individual-expiry.jpg) +4. Update the Expiry date as per requirement and click **Save**. You can also select the **No closing date** check box if you wish to not have an expiry date for your Customer Identifier. + ![](/docs/assets/images/individual-expiry-update.jpg) diff --git a/llm-content/payments/smart-collect/update-expiry/bulk.md b/llm-content/payments/smart-collect/update-expiry/bulk.md new file mode 100644 index 00000000..77e4f0f7 --- /dev/null +++ b/llm-content/payments/smart-collect/update-expiry/bulk.md @@ -0,0 +1,125 @@ +--- +title: Update Customer Identifier Expiry Date in Bulk +description: Know how to update the expiry date of Customer Identifiers in bulk. +--- + +# Update Customer Identifier Expiry Date in Bulk + +Follow the steps given below to update the expiry dates of Customer Identifiers in bulk. + +## Workflow + +1. [Download the sample batch file](#step-1-download-the-sample-batch-file). +2. [Add Customer Identifier details in the file](#step-2-add-customer-identifier-details-in-the). +3. [Upload batch file on Dashboard](#step-3-upload-batch-file-on-dashboard). +4. [Perform post-batch creation operations](#step-4-perform-post-batch-creation-actions). +5. [Handle errors, if any](#step-5-handle-errors). + +## Step 1: Download the Sample Batch File +1. Log in to the Dashboard and navigate to Smart Collect. +2. Click **Batch Expiry Update** → **Download Sample File** to download the sample batch file. + +![](/docs/assets/images/smart-collect-batch-upload-new.jpg) + +## Step 2: Add Customer Identifier details in the file + +> **INFO** +> +> +> **Handy Tips** +> +> - The size of a batch file can be up to 10 MB. You can add up to 10,000 rows in a particular file. Customer Identifiers are processed in the same sequence as listed in the file. +> - The Field names/headers in a batch should not be modified. Modifications can cause upload failure. +> + +The batch file contains all the necessary details to update the expiry date. Given below are the required fields for creating a batch file: + +`Virtual Account Id` _mandatory_ +: The Customer Identifier Id for which you wish to update the expiry date. + +`Expire By` _mandatory_ +: The updated expiry date for your Customer Identifier. The correct format to enter expiry date is DD-MM-YYYY hh:mm. + +Below is a table showing what a sample batch file will look like: + +Virtual Account ID | Expire By +--- +va_IpAsyvL7psCbxH | 12-12-2023 12:12 +--- +va_IVSvSuaskJqc8n | 29-12-2023 12:12 + +## Step 3: Upload Batch File on Dashboard + +To upload a batch file: +1. Navigate to **Smart Collect** → **Batch Expiry Update**. +2. Click the **Upload New Batch** button. +3. On the pop-up page, drag and drop the file over the highlighted area. Alternatively, click the **Click to Upload** option to select your file from your system. + +The file is validated and uploaded to the Razorpay server. After the file is successfully uploaded, a snippet view of the file is displayed in the **Batch Upload** pop-up page. + +![](/docs/assets/images/sm-bulk-upload-preview.jpg) + +## Step 4: Perform Post-batch Creation Actions + +After the batch is created, you can see a **Batch Created Successfully** pop-up page. Click **Close** and reload the page. The newly created batch file will appear in the list of **Batch Uploads**. + +The **Batch Uploads** screen displays the following fields: + +Field | Descriptions +--- +Batch ID | Unique identifier of a batch upload. +--- +Batch Name | Name of the batch file. +--- +Count | The number of processed rows in a batch. +--- +Created At | The time when the batch file was created. +--- +Status | Current [state](#batch-file-states) of the batch file. +--- +Actions | The operations you can perform on a particular batch file. For example, Download Report. + +![](/docs/assets/images/sm-bulk-expiry-actions.jpg) + +### Batch File States + +The batch file states are explained in the table given below: + +State | Description +--- +**Created** | This is the initial state of the file when it is uploaded. Once you upload a file, it stays in the **Created** state for 70 minutes. +--- +**Processing** | This state indicates that the batch file is getting processed. +--- +**Processed** | This is the final state of the file. It indicates that all the rows in the batch file were processed, either successfully or unsuccessfully. + +> **INFO** +> +> +> **Handy Tips** +> +> - The **Processed** state does not mean all rows in the file were successfully processed. It just means the file was successfully processed, with or without errors. +> - Download the report to check for errors. You can correct these errors and upload the data again in another file. +> + +## Step 5: Handle Errors + +Batch file errors are detected during file upload. You can also download the batch file report after the upload to check for errors. + +A processed batch file does not necessarily mean that that the expiry dates were updated for all Customer Identifiers. There is a chance that a few Customer Identifiers did not get added because of certain issues in the entered data. For example, data was missing in a few fields. + +Download the **Batch Report** to understand the reason for the error. This contains the following additional fields to help you check if the expiry date for a Customer Identifier is update or not. + +Additional Fields | Datatype | Description +--- +Virtual Account Id | _string_ | The unique identifier of the Customer Identifier. This is null/empty if there are errors during the creation. +--- +Expire By | _string_ | The updated expiry date for the Customer Identifier. This is null/empty if there are errors during the creation. +--- +Success | _string_ | This indicates the processing status of the row. It can either be "true" or "false". +--- +Error Code | _string_ | In case of an error, this column has an error code. +--- +Error Description | _string_ | In case of an error, this column has the error message. + +To fix the errors, make the required changes and re-upload the batch file. diff --git a/llm-content/payments/smart-collect/update-individual-expiry.md b/llm-content/payments/smart-collect/update-individual-expiry.md new file mode 100644 index 00000000..7b560a5d --- /dev/null +++ b/llm-content/payments/smart-collect/update-individual-expiry.md @@ -0,0 +1,16 @@ +--- +title: Update Expiry Date for an Individual Customer Identifier +description: Know how you can update the Expiry Date of an Individual Customer Identifier. +--- + +# Update Expiry Date for an Individual Customer Identifier + +Learn how to update the Close by date (Expiry Date) for an Individual Customer Identifier. + +To update the Expiry Date of an Individual Customer Identifier: +1. Log in to the Dashboard and navigate to Smart Collect. +2. Click on the Customer Identifier ID for which you wish to update the expiry date. +3. In the pop-up that appears, in the **Close by** section, click **Change**. + ![](/docs/assets/images/smart-collect-individual-expiry.jpg) +4. Update the Expiry date as per requirement and click **Save**. You can also select the **No closing date** check box if you wish to not have an expiry date for your Customer Identifier. + ![](/docs/assets/images/individual-expiry-update.jpg) diff --git a/llm-content/payments/smart-collect/upi-id-format.md b/llm-content/payments/smart-collect/upi-id-format.md new file mode 100644 index 00000000..75341bd2 --- /dev/null +++ b/llm-content/payments/smart-collect/upi-id-format.md @@ -0,0 +1,38 @@ +--- +title: Virtual UPI ID Format +description: Indicates the format in which the created UPI ID will appear. +--- + +# Virtual UPI ID Format + +Using Smart Collect, you can create unique UPI IDs to be shared with your customers. The structure and components of these are explained below. + +A UPI ID comprises of the following: +- Username + + The username comprises of the prefix, the merchant identifier and the descriptor. For example,`rpy.payto00000gaurikumari@icici` consists of: + - Prefix + + Static information. Value is `rpy`. + - Merchant Prefix +`payto00000` is the standard merchant prefix. You can opt for a custom, 4-10 character merchant prefix as per your brand requirements. For example, `acmevendor`. To configure this prefix, click the **click here** button. + ![VPA Configure Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/vpa-configure-button.jpg.md) + - Add the custom prefix and click **Save**. + ![Custom VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/vpa-new-custom-name.jpg.md) + - Descriptor + + 10-16 character unique identifier of your customer provided by you. For example, `gaurikumari`. +- Handle + + The name of the partner bank. For example, `@icici`. + +![](/docs/assets/images/smart-collect-upiid_components.jpg) + +> **INFO** +> +> +> **Handy Tips** +> +> - The combination of merchant identifier and custom descriptor **must be exactly 20 characters**. Special characters are not allowed in merchant identifier or descriptor. +> - Razorpay will auto-generate the descriptor if it is not provided at the time of customer identifier creation. +> diff --git a/llm-content/payments/smart-collect/use-cases.md b/llm-content/payments/smart-collect/use-cases.md new file mode 100644 index 00000000..344df397 --- /dev/null +++ b/llm-content/payments/smart-collect/use-cases.md @@ -0,0 +1,149 @@ +--- +title: Smart Collect Use Cases +description: Explore the diverse use cases of Smart Collect and Smart Collect 2.0, a robust payment collection solution for businesses. +--- + +# Smart Collect Use Cases + +Both Smart Collect and Smart Collect 2.0 are powerful payment collection solutions by Razorpay that help businesses automate reconciliation of direct bank transfers. While they share core functionality, Smart Collect 2.0 introduces enhanced features and additional use cases that make it superior for modern businesses. + +- **For businesses already using Smart Collect:** Upgrade to Smart Collect 2.0 for UPI support, instant settlements, and enhanced features. +- **For new businesses:** Start directly with Smart Collect 2.0 for maximum functionality. + +## Smart Collect 2.0 Use Cases + + +### UPI Payment Integration (NEW IN 2.0) + + + **Industry:** All sectors requiring UPI collections + + **How Smart Collect 2.0 Helps** + - Creates Virtual UPI IDs (VPAs) in addition to Customer Identifiers + - Enables UPI payments alongside traditional bank transfers + - Customers can pay using any UPI app with branded VPAs + - 99.99% success rate for UPI transactions + + + +### Multi-Branch/Franchise Operations (NEW IN 2.0) + + **Industry:** Restaurants, Retail Chains, QSRs, Pharmacies, Theatres + **Examples:** Restaurant chains, Jewellery showrooms, Travel agencies + + **How Smart Collect 2.0 Helps** + - Creates branch-specific or franchise-specific Customer Identifiers + - Tracks branch-wise sales and partner-wise collections in real-time + - Customises Identifiers with company branding for better trust + - Provides transaction-level breakup for each branch/franchise + - Simplifies multi-location reconciliation + + + +### Department-wise Collections (NEW IN 2.0) + + **Industry:** Hospitals, Large Corporations, Service Centers + **Examples:** Multi-department hospitals, Universities with various faculties + + **How Smart Collect 2.0 Helps** + - Tracks internal department-wise collections seamlessly + - Creates separate Identifiers for different departments/services + - Provides detailed reporting at identifier level + - Enables better cost center management + + + +### Payment Gateway Integration (NEW IN 2.0) + + **Industry:** E-commerce, Online Services + + **How Smart Collect 2.0 Helps** + - Customer Identifiers displayed on Payment Gateway checkout + - Generates new unique Identifiers for each transaction + - Customers can choose between gateway and direct bank transfer + - Seamless integration with existing payment flows + + + +### High-Value Transaction Management (ENHANCED IN 2.0) + + **Industry:** Real Estate, Broking, Financial Services, B2B Marketplaces + **Examples:** Cars24, Real Estate Builders, AIFs + + **How Smart Collect 2.0 Helps** + - Instant settlements eliminate cash flow challenges (vs T+2 in traditional methods) + - 99.99% success rate for high-value transactions + - Customer preference for netbanking over gateways for large amounts + - Third Party Verification (TPV) for enhanced security + + + +### Wallet Top-ups and Service Payments (ENHANCED IN 2.0) + + **Industry:** Fintech, Gaming, Digital Services + **Examples:** Digital wallets, Gaming platforms, Service providers + + **How Smart Collect 2.0 Helps** + - Instant notifications for IMPS and UPI payments + - Real-time wallet crediting improves customer experience + - Supports both traditional bank transfers and UPI methods + - Automated refunds for closed identifiers or failed TPV + + +## Smart Collect Use Cases + + +### Financial Services - Loan Repayments + + + **Industry:** NBFC, Banks, Lending Companies + **Example:** Acme Loans + + **How Smart Collect Helps** + - Automates loan repayment process with Customer Identifiers + - Supports NEFT, RTGS, and IMPS payment methods + - Provides real-time updates on payment statuses + - Reduces manual reconciliation errors in financial reporting + - Borrowers receive unique account details based on repayment schedules + + + +### E-commerce Platforms - Supplier Payments + + + **Industry:** E-commerce, Marketplaces + **Example:** Acme SuperMart + + **How Smart Collect Helps** + - Creates unique Customer Identifiers for different marketing campaigns + - Eliminates need to manually identify payment sources + - Provides automatic reconciliation with real-time status updates + - Streamlines payment processes for enhanced accuracy and efficiency + + + +### IT Services - Invoice Management + + **Industry:** Software Development, IT Services + **Example:** Acme Solutions + + **How Smart Collect Helps** + - Handles large volume invoice payments efficiently + - Clients can add bank accounts as beneficiaries in netbanking portals + - Supports NEFT, RTGS, and IMPS transfers + - Provides real-time payment notifications via webhooks + - Ensures swift and informed decision-making + + + +### Educational Institutions - Fee Collection + + **Industry:** Schools, Universities, Educational Services + **Example:** AcmeHorizon School + + **How Smart Collect Helps** + - Accepts large one-time fee payments + - Generates unique Customer Identifiers for each student/fee cycle + - Provides automated reconciliation for accurate financial reporting + - Offers real-time insights into institutional financial health + - Seamless webhook notifications revolutionise data flow diff --git a/llm-content/payments/smart-collect/va-vpa-qr.md b/llm-content/payments/smart-collect/va-vpa-qr.md new file mode 100644 index 00000000..9d596935 --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr.md @@ -0,0 +1,160 @@ +--- +title: Razorpay Smart Collect +description: Learn about Razorpay Smart Collect with which you can create virtual bank accounts, UPI IDs and QR Codes on-demand, for customers to pay via NEFT, RTGS, IMPS and UPI. +--- + +# Razorpay Smart Collect + +For years, businesses have been collecting large payments from customers in the form of bank transfers. Collecting is easy, but reconciling payments is a tough task as it is prone to human errors and increases administrative costs. + +Using Razorpay Smart Collect, you can generate virtual bank accounts, virtual payment addresses (UPI IDs) and QR code on-demand and share the details with customers to accept payments via NEFT, RTGS, IMPS and UPI. These virtual bank accounts, UPI IDs and QR codes are linked to the bank account you have registered with Razorpay. + +Since a new virtual bank account, UPI ID or QR code can be created for each customer, you can easily track payments made by them. Razorpay notifies you of payments made to any of your accounts, UPI IDs or QR codes and also handles the complexity of reconciling these payments on your behalf. + +![](/docs/assets/images/smart-collect-smart-collect-flow1.jpg) + +> **INFO** +> +> +> **Note** +> +> Payments made using Smart Collect largely follow existing Razorpay [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md). If you are new to Razorpay, it is recommended to understand this flow before you proceed to read the document. +> + +## Advantages + +- **Instant Creation** + + Generate virtual bank accounts, virtual UPI IDs and QR code tagged to individual customers in **real-time** via Dashboard and APIs. + +- **Personalization** + + Create custom UPI IDs to match your business need and branding. For example, `rpy.acmecellno8449472988@icici` and `rpy.acmevendorakashkumar@icici`. + +- **Multiple Payment Avenues** + + Enable customers to make payments via NEFT, RTGS, IMPS and QR Code UPI. + +- **Automatic Reconciliation** + + Eliminate the difficulty of manual reconciliation and save time and cost. + +- **Account-level Visibility** + + View and manage every payment received from customers. + +- **Real-time Notifications** + + Get real-time notifications on payments with Webhooks. + +## Use Cases + +Here are some examples of how Smart Collect enables you to accept payments. +- **Single, large one-time payments** + + If you want to accept a single, large one-time payment from a customer (preferably via NEFT, RTGS, IMPS or UPI), you can create a virtual bank account, UPI ID or QR code and share the generated account details (account number and IFSC), UPI ID or QR code. When the customer makes the payment, Razorpay notifies you so that the account can be closed. + +- **Regular payments of large volume** + + If you want to send customers regular invoices for payments of large volume, you can create a virtual bank account, UPI ID or QR code for them and share the details. Customer: + - Adds the bank account as a beneficiary on their preferred netbanking portal and transfers the money using NEFT, RTGS or IMPS + - Adds the UPI ID on their UPI payment service provider app such as Google Pay and transfers the money using UPI. + Razorpay notifies you every time a payment is made towards the account, thus simplifying the reconciliation process + - Scans the QR code to make the payments. + +- **Campaign or event-based payment** + + If you want to accept several payments from multiple sources for a range of campaigns or events, you can use Smart Collect to create a virtual bank account, UPI ID or QR code for each campaign and share details accordingly. For every payment made towards any of these accounts, UPI ID or QR code, Razorpay notifies you of the account, UPI ID or QR code used, thus eliminating the need to identify which campaign the payment was made for. + +## How Smart Collect Works + +1. Sign up for a Razorpay Account. +2. You create virtual bank accounts, virtual UPI IDs or QR code tagged to the customer. +3. Share account details (such as account number, IFSC and Name), UPI ID or QR code with the customer. +4. Customer: + - Adds the bank account as a beneficiary on their preferred netbanking portal and transfers the money using NEFT, RTGS or IMPS + - Adds the UPI ID on their UPI payment service provider app, such as Google Pay and transfers the money using UPI. + - Scans the QR code to make the payments. +5. Payment deposited in these Virtual Accountss, UPI ID or QR code is settled into your bank account linked with Razorpay. + +> **INFO** +> +> +> **Payment Confirmation** +> +> You can consider a payment to be successful only when you receive the notification from Razorpay. You can check the [payment status on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/dashboard/create.md#view-payments). Also, you can choose to configure [webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/notification.md) and subscribe to the `virtual_account.credited` event to receive notifications when customers make payments. +> + +![](/docs/assets/images/smart-collect-sc_workflow1.jpg) + +## Virtual Accounts Format + +Using Razorpay Smart Collect, you can create a unique virtual bank account number, UPI ID or QR code to be shared with your customers. The structure and components of these are explained below. + +### Virtual Bank Account Number + +The virtual bank account number consists of 16 digits. + +``` +Bank Account Number: 1112220040042526 +``` + +### Virtual UPI ID + +A UPI ID comprises of the following: +- Username + + The username comprises of the prefix, the merchant identifier and the descriptor. For example,`rpy.payto00000gaurikumari@icici` consists of: + - Prefix + + Static information. Value is `rpy`. + - Merchant Prefix +`payto00000` is the standard merchant prefix. You can opt for a custom, 4-10 character merchant prefix as per your brand requirements. For example, `acmevendor`. Contact [Razorpay Support](https://razorpay.com/support) to get this configured for your Razorpay account. + - Descriptor + + 10-16 character unique identifier of your customer provided by you. For example, `gaurikumari`. +- Handle + + The name of the partner bank. For example, `@icici`. + +![](/docs/assets/images/smart-collect-upiid_components.jpg) + +> **SUCCESS** +> +> +> **Merchant Identifier + Descriptor** +> +> The combination of merchant identifier and custom descriptor **must be exactly 20 characters**. Special characters are not allowed in merchant identifier or descriptor. +> + +> **INFO** +> +> +> **Note** +> +> Razorpay will auto-generate the descriptor if it is not provided at the time of Virtual Accounts creation. +> + +### QR Code + +Create Virtual Accounts API request, send the `receivers.types` as `qr_code`. From the API response, open the `short_url` in the browser to download the QR code for your account and share it with your customers. + +![](/docs/assets/images/smart-collect-QrCode.jpeg) + +## Life Cycle + +There are two possible statuses for a Virtual Accounts: `active` and `closed`. + +## Active + +When first created via [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/dashboard/create.md) or [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/api/create.md), a Virtual Accounts is said to be in the `active` status. That is, it is ready to accept payments. + +## Closed + +A Virtual Accounts can be closed in two ways: +- Automatically, by using the `close_by` option at the time of Virtual Accounts creation, via [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/dashboard/create.md) or [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/api/create.md). +- Manually, from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/dashboard/close.md) or using the [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/api/close.md). + +Once the account is in `closed` state, customers cannot make payments to that account. + + See [API Endpoints](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/api.md) for more details. diff --git a/llm-content/payments/smart-collect/va-vpa-qr/api.md b/llm-content/payments/smart-collect/va-vpa-qr/api.md new file mode 100644 index 00000000..8572b40e --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/api.md @@ -0,0 +1,222 @@ +--- +title: Smart Collect APIs +description: Razorpay Smart Collect APIs let you create Customer Identifiers, fetch payments made to a Customer Identifier and close Customer Identifiers. Find sample request and response here. +--- + +# Smart Collect APIs + +The Smart Collect APIs enable you to create Customer Identifiers, fetch details of payments made and also close the Customer Identifiers. + +## Prerequisite + +Ensure you have read the [product document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr.md) before you proceed with the API integration. + +### API Authentication + +All Razorpay APIs are authenticated using `Basic Auth`. Basic auth requires the following: +- `[YOUR_KEY_ID]` +- `[YOUR_KEY_SECRET]` + +Basic auth expects an `Authorization` header for each request in the `Basic base64token` format. Here, `base64token` is a base64 encoded string of `YOUR_KEY_ID:YOUR_KEY_SECRET`. + +> **WARN** +> +> +> **Watch Out!** +> +> The `Authorization` header value should strictly adhere to the format mentioned above. Invalid formats will result in authentication failures. +> Few examples of **invalid** headers are: `BASIC base64token`, `basic base64token`, `Basic "base64token"` and `Basic $base64token`. +> + +### API Gateway + +For most of the Razorpay APIs, the Gateway URL is `https://api.razorpay.com/v1`. You need to include this before each API endpoint to make API calls. However, certain APIs are on V2. Hence, the gateway URL may differ for certain APIs. + + +### Example + + + + - Use the URL `https://api.razorpay.com/v1/payments` to access payment resources. + + - Use the URL `https://api.razorpay.com/v2/accounts` to access Route (Linked Account)-related resources. + + + + + + +### Generate API Keys + +Follow these steps to generate API keys: + + + Watch this video to see how to generate API keys in the Test mode. + + +[Video: https://www.youtube.com/embed/VOn8JlGPG2I?si=WTAbAeLB3Hnp1n3r] + + + + + Watch this video to see how to generate API keys in the Live mode. + + +[Video: https://www.youtube.com/embed/Cer8UfBGX_E?si=Libr1RXoFSEDfY1c] + + + +1. Log in to your Dashboard with the appropriate credentials. +2. Select the mode (**Test** or **Live**) for which you want to generate the API key. + - **Test Mode**: The test mode is a simulation mode that you can use to test your integration flow. **Your customers will not be able to make payments in this mode**. + - **Live Mode**: When your integration is complete, switch to live mode and generate live mode API keys. In the integration, **replace test mode keys with live mode keys to accept customer payments**. +3. Navigate to **Account & Settings** → **API Keys** (under **Website and app settings**) → **Generate Key** to generate key for the selected mode. + +> **WARN** +> +> +> **Watch Out!** +> +> - After generating the keys from the Dashboard, download and save them securely. You can use only one set of API keys. If you do not remember your API keys, you must [regenerate them](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#regenerate-api-keys) from the Dashboard and update them wherever the previous keys were used for payment gateway integrations. +> - API Keys are universal; that is, they are applicable to all websites and apps that you have whitelisted for your Merchant ID. +> - **Do not share your API Key secret** with anyone or on any public platforms. **This can pose security threats to your Razorpay account**. +> - Once you generate the API Keys, only the **Key Id** is visible on the Dashboard, **not the Key secret**, as it can pose security threats to your Razorpay account. +> - Use the **Live API Keys** to accept live payments and the **Test API Keys** for test transactions. +> + +## Customer Identifiers Workflow + +To start accepting payments using Customer Identifiers, you must: +- [Create a customer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) (optional) +- [Create a Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/api/create.md) +- Share Customer Identifier details with customer +- [Setup webhooks to receive payment notifications](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/notification.md) (optional) + +## Smart Collect Entity + +`id` +: `string` The unique identifier of the virtual account. + +`name` +: `string` The `merchant billing label` as it appears on the Dashboard. + +`entity` +: `string` Indicates the type of entity. Here, it is `virtual account`. + +`status` +: `string` Indicates whether the virtual account is in `active` or `closed` state. + +`description` +: `string` A brief description about the virtual account. + +`amount_paid` +: `integer` The amount paid by the customer into the virtual account. + +`notes` +: `json object` Any custom notes you might want to add to the virtual account can be entered here. Refer [Notes section of the API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to learn more. + +`customer_id` +: `string` Unique identifier of the customer the virtual account is linked with. Refer the [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) section to learn more. + +`receivers` +: `json object` Configuration of desired receivers for the virtual account. + + `id` + : `string` The unique identifier of the virtual bank account or virtual UPI ID. Sample IDs for: + + + - virtual bank account - `ba_Di5gbQsGn0QSz3` + - virtual UPI ID - `vpa_CkTmLXqVYPkbxx` + - virtual qr code - `qr_F7BtWoRgpM7eOn`. + + `entity` + : `string` Name of the entity. Possible values are + - `bank_account` + - `vpa` + - `qr_code` + + `ifsc` + : `string` The IFSC for the virtual bank account created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `bank_name` + : `string` The bank associated with the virtual bank account. For example, `RBL Bank`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `name` + : `string` The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `notes` + : `json object` Any custom notes you might want to add to the virtual bank account or virtual UPI ID can be entered here. Refer [Notes section of the API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to learn more. This parameter appears in the response only when `bank_account` is passed as the receiver `type`. + + `username` + : `string` The UPI ID consists of the username and the bank handle. The `username` consists of the `namespace` (assigned by the bank to Razorpay), the `merchant prefix` (which can be customised by you) and the `descriptor` (which you provide to identify the customer). The unique identifier which forms the first half of the virtual UPI ID. For example, `rpy.payto00000gaurikumari`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + + `handle` + : `string` The bank name that forms the second half of the virtual UPI ID. For example, `icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + + `address` + : `string` The UPI ID that combines the `username` and the `handle` with the `@` symbol. For example, `rpy.payto00000gaurikumari@icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + + `reference` + : `string` The reference number. This parameter appears in the response only when `qr_code` is passed as the receiver `type`. + + `short_url` + : `string` The URL to download the QR code. For example, `https://rzp.io/i/y0hrZw2`. This parameter appears in the response only when `qr_code` is passed as the receiver `type`. + +`close_by` +: `integer` UNIX timestamp at which the virtual account is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + +> **INFO** +> +> **Note**: +Any request beyond `2147483647` UNIX timestamp will fail. + +`closed_at` +: `integer` UNIX timestamp at which the virtual account is automatically closed. + +`created_at` +: `integer` UNIX timestamp at which the virtual account was created. + +```json: Sample Entity +{ + "id":"va_CaVE4QbyJvQRdk", + "name":"Acme Corp", + "entity":"virtual_account", + "status":"active", + "description":"Virtual Account created for Gaurav Kumar", + "notes":{ + "flat no":"105" + }, + "amount_paid":0, + "customer_id":"cust_805c8oBQdBGPwS", + "receivers":[ + { + "id": "ba_DzXNNxY8yQu5iV", + "entity": "bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223333230231378" + }, + { + "id":"vpa_CkTmLXqVYPkbxx", + "entity":"vpa", + "username":"rpy.payto00000gaurikumari", + "handle":"icici", + "address":"rpy.payto00000gaurikumari@icici" + }, + { + "id": "qr_F7BtWoRgpM7eOn", + "entity": "qr_code", + "reference": "F7BtWoRgpM7eOn", + "short_url": "https://rzp.io/i/y0hrZw2", + } + ], + "close_by": 1581615838, + "closed_at": null, + "created_at": 1577962694 +} +``` diff --git a/llm-content/payments/smart-collect/va-vpa-qr/api/close.md b/llm-content/payments/smart-collect/va-vpa-qr/api/close.md new file mode 100644 index 00000000..776015ba --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/api/close.md @@ -0,0 +1,62 @@ +--- +title: Close a Customer Identifier +description: This API helps you close a Customer Identifier. +--- + +# Close a Customer Identifier + +Once you have received the payment, you may choose to close the Customer Identifier. + +/virtual_accounts/:id/close + +## Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the virtual account that is to be closed. + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/virtual_accounts/va_Di5gbNptcWV8fQ/close +```json: Response +{ + "id": "va_Di5gbNptcWV8fQ", + "name":"Acme Corp", + "entity": "virtual_account", + "status": "closed", + "description":"Virtual Account created for M/S ABC Exports", + "amount_expected": null, + "notes":{ + "material":"teakwood" + }, + "amount_paid": 239000, + "customer_id": "cust_DOMUFFiGdCaCUJ", + "receivers": [ + { + "id": "ba_F8M0o4ZdaeR1q8", + "entity": "bank_account", + "ifsc": "YESB0CMSNOC", + "bank_name": "Yes Bank", + "name": "Intuit India", + "notes": [], + "account_number": "2223333259705413" + }, + { + "id": "vpa_F8M0npsLNjnZcL", + "entity": "vpa", + "username": "rpy.payto00000gaurikumari", + "handle": "icici", + "address": "rpy.payto00000gaurikumari@icici" + }, + { + "id": "qr_F8M0o50kAJjqIE", + "entity": "qr_code", + "reference": "F8M0o50kAJjqIE", + "short_url": "https://rzp.io/i/jpiGilg", + "created_at": 1593414941 + } + ], + "close_by": 1681615838, + "closed_at": 1593422551, + "created_at": 1593414941 +} +``` diff --git a/llm-content/payments/smart-collect/va-vpa-qr/api/create.md b/llm-content/payments/smart-collect/va-vpa-qr/api/create.md new file mode 100644 index 00000000..5a07cb42 --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/api/create.md @@ -0,0 +1,256 @@ +--- +title: Create a Customer Identifier +description: Learn how you can use Smart Collect APIs to create virtual bank accounts and virtual UPI IDs linked to specific customers. +--- + +# Create a Customer Identifier + +You can create a new virtual bank account, virtual UPI ID or QR code using this API. You can choose to link it to a specific customer. + +> **INFO** +> +> +> **Note** +> +> Currently, we support creation of virtual UPI IDs in the live mode only. However, virtual bank accounts can be created in the test and live modes. +> + +## Request Parameters + +> **INFO** +> +> +> **Custom Descriptor** +> +> You can customize the descriptor of the vpa as per your business requirements. This is an on-demand feature and is not available by default. To enable creation of custom descriptors, raise a request on our [Support Portal](https://razorpay.com/support/#request). +> + +`receivers` _mandatory_ +: `json object` Configuration of desired receivers for the virtual account. + + `types` + : `array` List of desired receiver types. Possible values are: + - `bank_account` + - `vpa` + - `qr_code` + + `vpa` _optional_ + : `json object` Descriptor details for the virtual UPI ID. This is to be passed only when `vpa` is passed as the receiver `types`. + + `descriptor` + : `string` You can provide a custom descriptor for the UPI ID. This is a unique identifier provided by you to identify the customer. For example, `gaurikumari` and `akashkumar` are the descriptors in the usernames `rpy.payto00000gaurikumari` and `rpy.payto00000akashkumar` respectively. The combination of merchant prefix and descriptor must be 20 characters. The length of the merchant prefix can vary between 4-10 characters, and the length of descriptor from 10-16 characters. + +`description` _optional_ +: `string` A brief description of the virtual account. + +`customer_id` _optional_ +: `string` Unique identifier of the customer to whom the virtual account must be tagged. Refer to the [Customer API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md) documentation to learn how to create a customer. + +`notes` _optional_ +: `json object` Any custom notes you might want to add to the virtual account can be entered here. Refer to the [Notes section of the API Reference Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) to learn more. + +`close_by` _optional_ +: `integer` UNIX timestamp at which the virtual account is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + +> **INFO** +> +> **Note**: +Any request beyond `2147483647` UNIX timestamp will fail. + +> **INFO** +> +> +> **Note** +> +> While sharing the details of VAs (created using RBL bank) with the customers, ensure that the fifth character in the IFSC is number `0` and not the letter O. For example, valid IFSC is `RATN0VAAPIS` and not `RATNOVAAPIS`. +> + +```curl: Request - bank_account +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/virtual_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "receivers": { + "types": [ + "bank_account" + ] + }, + "description": "Virtual Account created for Raftar Soft", + "customer_id": "cust_CaVDm8eDRSXYME", + "close_by": 1681615838, + "notes": { + "project_name": "Banking Software" + } +}' +```json: Response +{ + "id":"va_DlGmm7jInLudH9", + "name":"Acme Corp", + "entity":"virtual_account", + "status":"active", + "description":"Virtual Account created for Raftar Soft", + "amount_expected":null, + "notes":{ + "project_name":"Banking Software" + }, + "amount_paid":0, + "customer_id":"cust_CaVDm8eDRSXYME", + "receivers":[ + { + "id":"ba_DlGmm9mSj8fjRM", + "entity":"bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name":"Acme Corp", + "notes":[], + "account_number":"2223330099089860" + } + ], + "close_by":1681615838, + "closed_at":null, + "created_at":1574837626 +} +``` curl: Request - vpa +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/virtual_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "receivers": { + "types": [ + "vpa" + ], + "vpa": { // Pass this only for custom descriptor. + "descriptor": "gaurikumari" + } + }, + "description": "Receive payment instalment from Gaurav Kumar- Flat No 105", + "customer_id": "cust_BM8NbnFAk1BVDA", + "close_by": 1681615838 +}' +```json: Response +{ + "id": "va_DzaBLzIz494C64", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Receive payment instalment from Gaurav Kumar- Flat No 105", + "amount_expected": null, + "notes": [], + "amount_paid": 0, + "customer_id": "cust_BM8NbnFAk1BVDA", + "receivers": [ + { + "id": "vpa_DzaBM9AEJew8H1", + "entity": "vpa", + "username": "rpy.payto00000gaurikumari", + "handle": "icici", + "address": "rpy.payto00000gaurikumari@icici" + } + ], + "close_by": 1681615838, + "closed_at": null, + "created_at": 1577962694 +} +``` curl: Request - qr_code +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/virtual_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "receivers": { + "types": [ + "qr_code" + ] + }, + "description": "Virtual Account created for Raftar Soft", + "customer_id": "cust_BM8NbnFAk1BVDA", + "close_by": 1681615838, + "notes": { + "project_name": "Banking Software" + } +}' +```json: Response +{ + "id": "va_F7BtWoDKRnOzkt", + "name": "Intuit India", + "entity": "virtual_account", + "status": "active", + "description": "Receive payment instalment from Gaurav Kumar- Flat No 105", + "amount_expected": null, + "notes": { + "project_name": "Banking Software" + }, + "amount_paid": 0, + "customer_id": "cust_BM8NbnFAk1BVDA", + "receivers": [ + { + "id": "qr_F7BtWoRgpM7eOn", + "entity": "qr_code", + "reference": "F7BtWoRgpM7eOn", + "short_url": "https://rzp.io/i/y0hrZw2", + "created_at": 1593160971 + } + ], + "close_by": 1681615838, + "closed_at": null, + "created_at": 1593160971 +} +``` + +Here is a sample request and response which can be used to create a virtual account with all the receiver types `bank_account`, `vpa` and `qr_code`. + +```curl: Request - All types +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/virtual_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "receivers": { + "types": [ + "vpa", + "bank_account", + "qr_code" + ] + }, + "description": "Receive payment instalment from Gaurav Kumar- Flat No 105", + "customer_id": "cust_BM8NbnFAk1BVDA", + "close_by": 1681615838 +}' +```json: Response +{ + "id": "va_DzaznJGgvduD1R", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Receive payment instalment from Gaurav Kumar- Flat No 105", + "amount_expected": null, + "notes": [], + "amount_paid": 0, + "customer_id": "cust_BM8NbnFAk1BVDA", + "receivers": [ + { + "id": "ba_Dzaznb0XK1yx1l", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223333226676435" + }, + { + "id": "vpa_DzaznS24HKkTBY", + "entity": "vpa", + "username": "rpy.payto000005138396165", + "handle": "icici", + "address": "rpy.payto000005138396165@icici" + }, + { + "id": "qr_F7BtWoRgpM7eOn", + "entity": "qr_code", + "reference": "F7BtWoRgpM7eOn", + "short_url": "https://rzp.io/i/y0hrZw2", + } + ], + "close_by": 1681615838, + "closed_at": null, + "created_at": 1577965559 +} +``` diff --git a/llm-content/payments/smart-collect/va-vpa-qr/api/fetch.md b/llm-content/payments/smart-collect/va-vpa-qr/api/fetch.md new file mode 100644 index 00000000..831008ca --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/api/fetch.md @@ -0,0 +1,604 @@ +--- +title: Fetch Customer Identifiers +description: Learn how to fetch Customer Identifiers and payments made to specific Customer Identifiers using the Smart Collect APIs. +--- + +# Fetch Customer Identifiers + +You can retrieve details of Customer Identifiers and payments made to Customer Identifiers using these APIs. + +APIs are available to: +- [Fetch Customer Identifier by ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/api/fetch.md#fetch-virtual-account-by-id) +- [Fetch All Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/api/fetch.md#fetch-all-virtual-accounts) +- [Fetch Payments made to a Customer Identifier](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/api/fetch.md#fetch-payments-made-to-a-virtual-account) +- [Fetch Payment Details using ID and Transfer Method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/api/fetch.md#fetch-payment-details-using-id-and-transfer-method) + +## Fetch Customer Identifier by ID + +/virtual_accounts/:id + +Retrieves a specific Customer Identifier using its ID. + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET \ +https://api.razorpay.com/v1/virtual_accounts/va_D6Vw6zyJ0OmRZg \ +```json: Response - bank_account +{ + "id": "va_D6Vw6zyJ0OmRZg", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Virtual Account for Raftar Soft", + "amount_expected": 5000, + "notes": [], + "amount_paid": null, + "customer_id": "cust_9xnHzNGIEY4TAV", + "receivers": [ + { + "id": "ba_D6Vw76RrHA3DC9", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223330025991681" + } + ], + "close_by": null, + "closed_at": 1568109789, + "created_at": 1565939036 +} +```json: Response - vpa +{ + "id": "va_D6Vw6zyJ0OmRZg", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Virtual Account for Raftar Soft", + "notes": [], + "amount_paid": 5000, + "customer_id": "cust_9xnHzNGIEY4TAV", + "receivers": [ + { + "id": "vpa_CkTmLXqVYPkbxx", + "entity": "vpa", + "username": "rpy.payto00000gaurikumari", + "handle": "icici", + "address": "rpy.payto00000gaurikumari@icici" + } + ], + "close_by": null, + "closed_at": 1568109789, + "created_at": 1565939036 +} +```json: Both types +{ + "id": "va_D6Vw6zyJ0OmRZg", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Virtual Account for Raftar Soft", + "notes": [], + "amount_paid": 5000, + "customer_id": "cust_9xnHzNGIEY4TAV", + "receivers": [ + { + "id": "ba_D6Vw76RrHA3DC9", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223330025991681" + }, + { + "id": "vpa_CkTmLXqVYPkbxx", + "entity": "vpa", + "username": "rpy.payto00000gaurikumari", + "handle": "icici", + "address": "rpy.payto00000gaurikumari@icici" + } + ], + "close_by": null, + "closed_at": 1568109789, + "created_at": 1565939036 +} +``` + +## Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the virtual account whose details are to be fetched. + +## Fetch All Customer Identifiers + +/virtual_accounts + +Retrieves all the Customer Identifiers that are created by you. + +```cURL:Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET \ +https://api.razorpay.com/v1/virtual_accounts \ +```json:Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "va_Di5gbNptcWV8fQ", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "closed", + "description": "Virtual Account created for M/S ABC Exports", + "amount_expected": 2300, + "notes": { + "material": "teakwood" + }, + "amount_paid": 239000, + "customer_id": "cust_DOMUFFiGdCaCUJ", + "receivers": [ + { + "id": "ba_Di5gbQsGn0QSz3", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "1112220061746877" + } + ], + "close_by": 1574427237, + "closed_at": 1574164078, + "created_at": 1574143517 + }, + { + "id": "va_Dho86Avmdw6h09", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Virtual Account created for Raftar Soft", + "amount_expected": null, + "notes": { + "material": "oakwood" + }, + "amount_paid": 0, + "customer_id": "cust_DOMUFFiGdCaDNK", + "receivers": [ + { + "id": "ba_Dho86DoV16LqiO", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "1112220046254840" + } + ], + "close_by": 1574427237, + "closed_at": null, + "created_at": 1574081690 + } + ] +} +``` + +## Query Parameters + +`from` +: `integer` Timestamp, in seconds, from when virtual accounts are to be fetched. + +`to` +: `integer` Timestamp, in seconds, till when virtual accounts are to be fetched. + +`count` +: `integer` Number of virtual accounts to be fetched. The default value is 10 and the maximum value is 100. This can be used for pagination, in combination with `skip`. + +`skip` +: `integer` Number of records to be skipped while fetching the virtual accounts. This can be used for pagination, in combination with `count`. + +## Fetch Payments made to a Customer Identifier + +/virtual_accounts/:id/payments + +Retrieves all the payments made to a specific Customer Identifier for a given ID. + +```cURL:Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET \ +https://api.razorpay.com/v1/virtual_accounts/va_CminDKtoToBGmd/payments \ +```json:Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "pay_Di5iqCqA1WEHq6", + "entity": "payment", + "amount": 239000, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "bank_transfer", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "saurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_DOMUFFiGdCaCUJ", + "notes": [], + "fee": 2820, + "tax": 430, + "error_code": null, + "error_description": null, + "created_at": 1574143644 + } + ] +} +``` + +## Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the virtual account for which the payment details are to be fetched. + +The response parameters are the same as those mentioned in [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md). + +## Query Parameters + +`from` +: `integer` Timestamp, in seconds, from when payments are to be fetched. + +`to` +: `integer` Timestamp, in seconds, till when payments are to be fetched. + +`count` +: `integer` Number of payments to be fetched. The default value is 10 and the maximum value is 100. This can be used for pagination, in combination with `skip`. + +`skip` +: `integer` Number of records to be skipped while fetching the payments. This can be used for pagination, in combination with `count`. + +## Fetch Payment Details using ID and Transfer Method + +Retrieve the payment details for a given payment ID and transfer method. + +### Bank Transfer + +/payments/:id/bank_transfer + +Retrieves the bank transfer details of a given payment ID. + +```cURL:Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET \ +https://api.razorpay.com/v1/payments/pay_CmiztqmYJPtDAu/bank_transfer \ +```json:Response +{ + "id": "bt_Di5iqCElVyRlCb", + "entity": "bank_transfer", + "payment_id": "pay_Di5iqCqA1WEHq6", + "mode": "NEFT", + "bank_reference": "157414364471", + "amount": 239000, + "payer_bank_account": { + "id": "ba_Di5iqSxtYrTzPU", + "entity": "bank_account", + "ifsc": null, + "bank_name": null, + "name": "Acme Corp", + "notes": [], + "account_number": "765432123456789" + }, + "virtual_account_id": "va_Di5gbNptcWV8fQ", + "virtual_account": { + "id": "va_Di5gbNptcWV8fQ", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "closed", + "description": "Virtual Account created for M/S ABC Exports", + "amount_expected": 2300, + "notes": { + "material": "teakwood" + }, + "amount_paid": 239000, + "customer_id": "cust_DOMUFFiGdCaCUJ", + "receivers": [ + { + "id": "ba_Di5gbQsGn0QSz3", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "1112220061746877" + } + ], + "close_by": 1574427237, + "closed_at": 1574164078, + "created_at": 1574143517 + } +} +``` + +> **INFO** +> +> +> **Note** +> +> If Razorpay does not receive the bank account information of the customer from the remitting bank, the `payer_bank_account` key will be set to null. +> + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment made to the virtual account. + +### Response Parameters + +`id` +: `string` The unique identifier of the bank transfer. + +`entity` +: `string` The name of the entity. Here, it is `bank_transfer`. + +`payment_id` +: `string` The unique identifier of the payment. + +`mode` +: `string` The mode of bank transfer used. Possible values are: + +- `NEFT` + +- `RTGS` + +- `IMPS` + +- `UPI` + +`bank_reference` +: `string` Unique reference number provided by the bank for the transaction. + +`payer_bank_account` +: `object` The payer bank account details from which payment is received. + + `id` + : `string` The unique identifier of the customer's bank account. + + `entity` + : `string` The name of the entity. Here, it is `bank_account`. + + `ifsc` + : `string` The IFSC associated with the bank account. + + `bank_name` + : `string` The name of the bank in which the customer has an account. + + `notes` + : `object` Any custom notes added to the virtual bank account. + + `account_number` + : `string` The unique account number of the customer. + +`virtual_account_id` +: `string` The unique identifier of the virtual account. + +`virtual_account` +: `object` Details of the virtual account. + + `id` + : `string` The unique identifier of the virtual account. + + `name` + : `string` The `merchant billing label` as it appears on Dashboard. + + `entity` + : `string` The name of the entity. Here, it is `virtual account`. + + `status` + : `string` Indicates the status of the virtual account. Possible values are: +- `active` +- `closed` + + `description` + : `string` A brief description about the virtual account. + + `amount_paid` + : `integer` The amount paid by the customer to the virtual account. + + `notes` + : `object` Any custom notes added during the creation of the virtual account. + + `customer_id` + : `string` The unique identifier of the customer the virtual account is linked with. For more details, refer to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + + `receivers` + : `object` Configuration of desired receivers for the virtual account. + + `id` + : `string` The unique identifier of the virtual bank account. For example, `ba_Di5gbQsGn0QSz3`. + + `entity` + : `string` The name of the entity. Here, it is `bank_account`. + + `ifsc` + : `string` The IFSC for the virtual bank account created. For example, `RATN0VAAPIS`. + + `bank_name` + : `string` The bank associated with the virtual bank account. For example, `RBL Bank`. + + `account_number` + : `string` The unique account number provided by the bank. For example, `1112220061746877`. + + `name` + : `string` The `merchant billing label` as it appears on Dashboard. + + `notes` + : `object` Any custom notes added during the creation of the virtual account.. + + `close_by` + : `integer` UNIX timestamp at which the virtual account is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + +> **INFO** +> +> **Note**: +Any request beyond `2147483647` UNIX timestamp will fail. + + `closed_at` + : `integer` UNIX timestamp at which the virtual account is automatically closed. + + `created_at` + : `integer` UNIX timestamp at which the virtual account was created. + +### UPI + +/payments/:id/upi_transfer + +Retrieves the UPI transfer details of a given payment ID. + +```cURL:Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET \ +https://api.razorpay.com/v1/payments/pay_E5YETrWuVgP3fI/upi_transfer \ +```json:Response +{ + "id": "ut_E5YEUKb9yA0YvX", + "entity": "upi_transfer", + "amount": 100, + "payer_vpa": "gauravkumar@exampleupi", + "payer_bank": "HDFC BANK LTD", + "payer_account": "50100093961111", + "payer_ifsc": "HDFC0000004", + "payment_id": "pay_E5YETrWuVgP3fI", + "npci_reference_id": "001718859181", + "virtual_account_id": "va_E5V3Rb3sQaMS5v", + "virtual_account": { + "id": "va_E5V3Rb3sQaMS5v", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "First Virtual Account", + "amount_expected": null, + "notes": [], + "amount_paid": 200, + "customer_id": "cust_9xnHzNGIEY4TAV", + "receivers": [ + { + "id": "vpa_E5V3RsO1g4QK7t", + "entity": "vpa", + "username": "rpy.payto00000gaurikumari", + "handle": "icici", + "address": "rpy.payto00000gaurikumari@icici" + } + ], + "close_by": null, + "closed_at": null, + "created_at": 1579254678 + } +} +``` + +### Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment made to the virtual account. + +### Response Parameters + +`id` +: `string` The unique identifier of the UPI transfer. + +`entity` +: `string` The name of the entity. Here, it is `upi_transfer`. + +`amount` +: `integer` The amount paid by the customer. + +`payer_vpa` +: `string` The UPI ID of the customer that is used to make the payment. + +`payer_bank` +: `string` The name of the customer's bank. + +`payer_account` +: `string` The bank account number of the customer that is linked to the UPI ID. + +`payer_ifsc` +: `string` The IFSC associated with the bank account. + +`payment_id` +: `string` The unique identifier of the payment made by the customer. + +`npci_reference_id` +: `string` The unique reference number provided by NPCI for the payment. + +`virtual_account_id` +: `string` The unique identifier of the virtual account. + +`virtual_account` +: `object` Details of the virtual account. + + `id` + : `string` The unique identifier of the virtual account. + + `name` + : `string` The `merchant billing label` as it appears on Dashboard. + + `entity` + : `string` The name of the entity. Here, it is `virtual account`. + + `status` + : `string` Indicates the status of the virtual account. Possible values are: +- `active` +- `closed` + + `description` + : `string` A brief description about the virtual account. + + `amount_paid` + : `integer` The amount paid by the customer into the virtual account. + + `notes` + : `object` Any custom notes added during the creation of the virtual account. + + `customer_id` + : `string` The unique identifier of the customer the virtual account is linked with. For more details, refer to the [Customers API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md). + + `receivers` + : `object` Configuration of desired receivers for the virtual account. + + `id` + : `string` The unique identifier of the virtual UPI ID. For example, `vpa_CkTmLXqVYPkbxx`. + + `entity` + : `string` The name of the entity. Here, it is `vpa`. + + `username` + : `string` The unique identifier which forms the first half of the virtual UPI ID. For example, `rpy.payto00000gaurikumari`. + + `handle` + : `string` The bank name that forms the second half of the virtual UPI ID. For example, `icici`. + + `address` + : `string` The UPI ID that combines the `username` and the `handle` with the `@` symbol. For example, `rpy.payto00000gaurikumari@icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. + + `close_by` + : `integer` UNIX timestamp at which the virtual account is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). + +> **INFO** +> +> **Note**: +Any request beyond `2147483647` UNIX timestamp will fail. + + `closed_at` + : `integer` UNIX timestamp at which the virtual account is automatically closed. + + `created_at` + : `integer` UNIX timestamp at which the virtual account was created. diff --git a/llm-content/payments/smart-collect/va-vpa-qr/api/postman-collection.md b/llm-content/payments/smart-collect/va-vpa-qr/api/postman-collection.md new file mode 100644 index 00000000..a86433d3 --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/api/postman-collection.md @@ -0,0 +1,21 @@ +--- +title: Postman Collection +description: Download the Postman collection for Razorpay Smart Collect APIs. +--- + +# Postman Collection + +We have a Postman collection to make the integration quicker and easier. Click the **Download Postman Collection** button below to get started. + +[Download Postman Collection](https://app.getpostman.com/run-collection/d2d3a71a2cf38a0792c0) + +## Instructions to Use Postman Collection + +- All Razorpay APIs are authenticated using Basic Authentication. + - [Generate API Keys from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). +- Add your API Keys in Postman. Selected the required API → Auth → Type = Basic Auth → Username = [Your_Key_ID]; Password = [Your_Key_secret] + ![](/docs/assets/images/api-postman_basic_auth.gif) +- Some APIs in the collection require data specific to your account either in the request body or as path parameters. + - For example, the Fetch a Customer Identifier by ID API requires you to add the `va_id` as a path parameter in the endpoint. + - These parameters are enclosed in \{\} in the collection. For example, \{va_id\}. + - The API throws an error if this value is incorrect or does not exist in your system. diff --git a/llm-content/payments/smart-collect/va-vpa-qr/api/refunds.md b/llm-content/payments/smart-collect/va-vpa-qr/api/refunds.md new file mode 100644 index 00000000..8487d25f --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/api/refunds.md @@ -0,0 +1,77 @@ +--- +title: Refund Payments made to a Customer Identifier +description: Learn about the Refund API that enables you to refund payments made into a Customer Identifier. +--- + +# Refund Payments made to a Customer Identifier + +You can process refunds for a payment made towards a Customer Identifier. The following endpoint refunds a payment using the payment ID. + +/payments/:id/refund + +## Path Parameter + +`id` _mandatory_ +: `string` The unique identifier of the payment to be refunded. + +```curl: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/payments/pay_E54n391WnEAV9H/refund \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "notes": { + "key_1": "value1", + "key_2": "value2" + } +}' +```json: Response +{ + "id": "rfnd_E6j36ZEKvsWsEn", + "entity": "refund", + "amount": 100, + "currency": "INR", + "payment_id": "pay_E54n391WnEAV9H", + "notes": { + "key_1": "value1", + "key_2": "value2" + }, + "receipt": null, + "acquirer_data": { + "rrn": null + }, + "created_at": 1579522301 +} +``` + +## Request Parameters + +`amount` _optional_ +: `string` Amount to be refunded. If no value is passed, a full refund is issued. + +`notes` _optional_ +: `json object` Array of notes fields. You can enter custom data in key-value pairs. Refer the [Notes section of the API Reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) documentation to learn more. + +## Response Parameters + +`id` +: `string` The unique identifier of the refund. + +`amount` +: `integer` The amount that is refunded to the customer. + +`currency` +: `string` The currency in which the payment is made. We support [international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +`payment_id` +: `string` The unique identifier of the payment. + +`notes` +: `json object` Array of notes fields. You can enter custom data in key-value pairs. + +`created_at` +: `integer` UNIX Timestamp that indicates when the refund was processed. + +Refer [Refunds API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md) to perform other refund-related operations: +- Fetch a particular refund or a list of refunds for a payment ID. +- Update a refund to modify the Notes field. diff --git a/llm-content/payments/smart-collect/va-vpa-qr/api/update.md b/llm-content/payments/smart-collect/va-vpa-qr/api/update.md new file mode 100644 index 00000000..84864fae --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/api/update.md @@ -0,0 +1,13 @@ +--- +title: Update Customer Identifier +description: Learn how to update a Customer Identifier and add a receiver type using Razorpay Smart Collect API. +--- + +# Update Customer Identifier + +--- +title: Update Customer Identifier +desc: Learn how to update a Customer Identifier and add a receiver type using Razorpay Smart Collect API. +index: false +layout: api +--- diff --git a/llm-content/payments/smart-collect/va-vpa-qr/batch.md b/llm-content/payments/smart-collect/va-vpa-qr/batch.md new file mode 100644 index 00000000..da6a2bb3 --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/batch.md @@ -0,0 +1,89 @@ +--- +title: Batch Creation +description: Learn how to create Customer Identifiers in bulk using the batch feature. +--- + +# Batch Creation + +Customer Identifiers can be created via batch. This may be necessary when you have a large number of customers to be onboarded simultaneously, and using the API would be unfeasible. Batch creation allows you to place all the information related to customer and Customer Identifier creation in a single file, ready for upload. + +## Process + +- Create a CSV, XLS or XLSX file containing all the required data to create Customer Identifiers. The format and sample row data are given in the following sections. +- Raise a request to process the file on the [support page](https://razorpay.com/support/#request) as an existing customer. Also share the 14-character Razorpay merchant Id in email body. +- Once we process the file on our side, we will share the same file with you with a few new columns appended per row. For every row, the status column will mention whether the Customer Identifier is active or not. + - If the process is a success, the row will contain the Razorpay Customer ID, the Customer Identifier ID (a newly created Customer Identifier) and associated bank account details. + - If there is a failure, subsequent columns will have an error description. + +You may use this data for various operations on your end. All this information would also be available on your Dashboard as well as via API. + +## Handle Errors + +For rows that were not processed due to errors, create a new file with data corrected as per the error description. Send us the file again for processing. Do not include the error column in the new file. + +## File Format And Data Constraints + +- Provided file must be a valid CSV/XLS/XLSX +- Every row should contain values per the following format: + +`customer_id` _string_ +: ID of an existing Razorpay customer. Can be used if it is not required to create a new customer. + +`customer_name` _string_ +: Name of the customer. Can be used if a new customer is required to be created. Max length: 50 + +`customer_contact` _string_ +: Contact number of the customer. Can be used if a new customer is required to be created. Must be a valid contact number. + +`customer_email` _string_ +: Email address of the customer. Can be used if a new customer is required to be created. Must be a valid email address. + +`virtual_account_descriptor` _string_ +: Used for custom account numbers. This is to be left blank as all account numbers are numeric by default. + +`virtual_account_description` _string_ +: Description for the Customer Identifier. Max length: 2048 + +`virtual_account_notes` _string_ +: Notes field to be used while creating the Customer Identifier. Must be a valid JSON string. +Refer the [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) section for more information. + +Note that if `customer_id` field is being used, i.e. an existing customer is being referred to, then fields 2-4 can be left blank. + +Sample rows in the file would look similar to the following: + +```csv +cust_8gRzzeoemUfb5k,,,,,VA for Existing Customer,"{""key1"":""value1""}" +,Gaurav Kumar,9000090000,test@test.com,,VA for new customer,"{""key1"":""value1"",""key2"":""value2""}" +``` + +## Output File Format + +`customer_id` _string_ +: ID of an existing, or a newly created customer. + +`customer_name` _string_ +: Name of the customer. + +`customer_contact` _string_ +: Contact number of the customer. + +`customer_email` _string_ +: Email address of the customer. + +`virtual_account_id` _string_ +: ID of the newly created Customer Identifier. + +`bank_account_id` _string_ +: ID of the newly created bank account. + +`bank_account_name` _string_ +: Name associated with the newly created bank account. + +`bank_account_number` _string_ +: Account number of the newly created bank account. + +`bank_account_ifsc` _string_ +: IFSC of the newly created bank account. + +Contact our [Support Team](https://www.razorpay.com/support) if you have any queries. diff --git a/llm-content/payments/smart-collect/va-vpa-qr/custom.md b/llm-content/payments/smart-collect/va-vpa-qr/custom.md new file mode 100644 index 00000000..c3dc1c5b --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/custom.md @@ -0,0 +1,129 @@ +--- +title: Custom Account Numbers +--- + +# Custom Account Numbers + +> **INFO** +> +> +> **Enabling Custom Account Numbers** +> +> To enable Custom Accounts for your account, contact our [Support Team](https://razorpay.com/support) for any queries. +> + +By default, any Customer Identifier created by you will have randomly generated numeric bank account number. + +However, Razorpay Smart Collect also allows you to create custom bank accounts with customizable account numbers. This means you will be able to create virtual bank accounts that have the account number `XXXXXXXXYYYYYYYY`, where the X-segment remains static, but the content of the Y-segment is within your control. + +The possible options that can be set for the `bank_account` receiver are given below. + +Attribute | Mandatory/Optional (in request) | Type | Description +--- +`receivers` | Mandatory | JSON Object | Configuration of desired receivers for the Customer Identifier +--- +`receivers.types` | Mandatory | array | List of desired receiver types. Currently `bank_account` is the only supported type. +--- +`receivers.bank_account.numeric` | Optional, default: 1 | integer | Flag to indicate whether a numeric or alphanumeric account is desired. +--- +`receivers.bank_account.descriptor` | Optional | string | String that is to be used for account number generation. If not sent, a random 8-digit descriptor will be used. +--- + +## Prefix + +The first 8 characters in your account number will remain fixed for all your generated account numbers, eg. `22233344`. This is ordinarily set to a completely numeric value for your account, but an alphanumeric value can also be set upon request, eg. `RAZORPXY`. + +## Descriptor + +The `descriptor` field can be used to define the last eight characters of the generated bank account number. + +```json:JSON Input +{ + "receivers": { + "types": [ + "bank_account" + ], + "bank_account": { + "descriptor": "00000001" + } + }, + "customer_id": "cust_805c8oBQdBGPwS", + "description": "Custom Customer Identifier" +} +```json:Output +{ + "id": "va_4xbQrmEoA5WJ0G", + "entity": "virtual_account", + "description": "Custom Customer Identifier", + "customer_id": "cust_805c8oBQdBGPwS", + "status": "active", + "amount_paid": 0, + "receivers": [ + { + "id": "ba_4lsdkfldlteskf", + "entity": "bank_account", + "name": "Merchant Billing Label", + "account_number": "2223334400000001", + "ifsc": "RAZR0000001" + } + ], + "created_at": 1455696638 +} +``` + +Here in this example, a descriptor `00000001` is being used to generate an account number, while prefix `22233344` is pre-decided. + +> **WARN** +> +> +> **Descriptor Usage** +> +> The descriptor can have a maximum length of upto 8 characters. This is because some banks do not allow addition of beneficiary accounts that have an account number longer than 16 characters. +> + +> This `descriptor` field can only be used if custom Customer Identifiers are enabled for your account. If it is not set, sending any value in the descriptor field will return an error. +> + +> ```json:Error +> { +> "error": { +> "description": "Descriptor cannot be used with your account.", +> "code": "BAD_REQUEST_ERROR" +> } +> } +> ``` +> + +> The `descriptor` is required to be unique amongst your active Customer Identifiers. If a descriptor is sent, which is already in use by another active Customer Identifier, the following error is returned. +> + +> ```json:Error +> { +> "error": { +> "description": "An active Customer Identifier with the same descriptor already exists for your account.", +> "code": "BAD_REQUEST_ERROR" +> } +> } +> ``` +> + +> **WARN** +> +> +> **Avoiding Ambiguous Account Numbers** +> +> When displaying a bank account number to a customer, the font used may cause the customer to misread the alphanumeric characters (if any) in the number. This means customers are very liable to committing typos when required to enter the beneficiary account while initiating a payment. Misreading the letter 'O' in an account number as the numeral '0', for example, is extremely common. +> + +> Payments made to such mistyped accounts are considered invalid, and are refunded back to the customer's account within 1 working day. However, this is still a huge inconvenience for the customer, who now has to wait 24 hours to receive a refund for what is often a rather large payment. +> + +> For this reason, we strongly advice against using the following characters in your descriptor for alphanumeric accounts, as they may appear ambiguous in certain fonts. +> + +> - `0` or `O` +> - `1` or `I` +> - `5` or `S` +> - `8` or `B` +> - `2` or `Z` +> diff --git a/llm-content/payments/smart-collect/va-vpa-qr/dashboard.md b/llm-content/payments/smart-collect/va-vpa-qr/dashboard.md new file mode 100644 index 00000000..6cbb3457 --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/dashboard.md @@ -0,0 +1,19 @@ +--- +title: About Smart Collect Dashboard +description: Learn how to access the Smart Collect Dashboard and create virtual bank accounts and UPI IDs to receive payments from customers. +--- + +# About Smart Collect Dashboard + +Using Dashboard you can create and manage virtual bank accounts and UPI IDs tagged to specific customers. + +To access Smart Collect: +1. Log in to Dashboard. +2. Click **Smart Collect** from the left pane. + +You can perform the following actions: +- [Create Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/dashboard/create.md) +- [Make Test Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/dashboard/test-payments.md) +- [Refund Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/dashboard/refund.md) +- [Close Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/dashboard/close.md) +- [Search Customer Identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/dashboard/search.md) diff --git a/llm-content/payments/smart-collect/va-vpa-qr/dashboard/close.md b/llm-content/payments/smart-collect/va-vpa-qr/dashboard/close.md new file mode 100644 index 00000000..217f68db --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/dashboard/close.md @@ -0,0 +1,18 @@ +--- +title: Close Customer Identifier +description: Learn how you can close a Customer Identifier using the Razorpay Dashboard. +--- + +# Close Customer Identifier + +Customer Identifiers can be closed in two ways: +- Automatically, by specifying a **Close By** date and time during [Customer Identifier creation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/dashboard/create.md). +- Manually, using the **Close Account** button on the Customer Identifier details pane: + 1. In the list, select the Customer Identifier ID. + 2. In the right pane that appears, click **Close Account**. + + + ![](/docs/assets/images/smart-collect-va_close.jpg) + + + 3. A dialog box appears to confirm the closing. Click **Yes**. diff --git a/llm-content/payments/smart-collect/va-vpa-qr/dashboard/create.md b/llm-content/payments/smart-collect/va-vpa-qr/dashboard/create.md new file mode 100644 index 00000000..43a3dc9d --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/dashboard/create.md @@ -0,0 +1,72 @@ +--- +title: Create Customer Identifiers +description: Learn how to create and view Virtual Bank Accounts and UPI IDs using the Razorpay Dashboard. +--- + +# Create Customer Identifiers + +Reconciling payments received from customers through bank transfers is a time consuming and cumbersome process. With Razorpay Smart Collect, you can create virtual bank accounts for specific customers and share the details with them. As these Customer Identifiers are tagged to specific customers, reconciliation is easy and automatic. + +You can create virtual UPI IDs for each of your customers, who can then add these IDs to their UPI PSP(Payment Service Provider) apps and make UPI payments. + +You can create virtual bank accounts and UPI IDs using the Dashboard. + +> **INFO** +> +> +> **Note** +> +> Currently, we support creation of virtual UPI IDs in the live mode only. However, virtual bank accounts can be created in the test and live modes. +> + +To create a Customer Identifier from the Dashboard: +1. Log in to the **Dashboard** and click **Smart Collect**. +1. Click **+ Create Customer Identifier**. + + ![](/docs/assets/images/smart-collect-create_va_new.jpg) +2. Select the type of receiver in **Accept Payments Via** field. + + By default, both **Bank Transfer (NEFT, RTGS, IMPS)** and **UPI Transfer** are enabled. This means that both virtual bank account and UPI ID can be created for the customer. You can choose to disable either as per your needs. + - Enable **Bank Transfer (NEFT, RTGS, IMPS)** to create a virtual bank account. + - Enable **UPI Transfer** to create a virtual UPI ID. + - Create custom UPI ID - You can enter the descriptor, that is, the unique identifier of the customer, in the **UPI ID** field. It can be a combination of letters and numbers. For example, `gauravkumar1`. If left blank, the UPI ID will be auto-generated. +3. Select the **Customer** from the drop-down list. You can also create a new customer on-the-fly. You may skip this step and proceed with creation, if you do not wish to tag it to a specific customer. However, you cannot modify the Customer Identifier and tag it to the customer later. +4. Add an **Account Description** for your internal reference. +5. You can set a closure date for the Customer Identifier using the **Close By** option. **Disable Auto Close** option and select the date and time at which the account must be automatically closed. Ensure that the time specified is at least 15 minutes after the creation time. +6. Click **Add Internal Note** to enter any notes for internal reference. +7. Click **Create Customer Identifier**. + +![](/docs/assets/images/smart-collect-create_va_complete_new.jpg) + +Once the Customer Identifier has been created, you can copy the details and share them with your customer. + +> **INFO** +> +> +> **Note** +> +> While sharing the details of VAs (created using RBL bank) with the customers, ensure that the fifth character in the IFSC is number `0` and not the letter O. For example, valid IFSC is `RATN0VAAPIS` and not `RATNOVAAPIS`. +> + +![](/docs/assets/images/smart-collect-copy_va_details_new.jpg) + +The Customer Identifier appears in the list as shown below: + +![](/docs/assets/images/smart-collect-virtual_accounts_list.jpg) + +## Search + +You can search for Customer Identifiers in the list using these parameters: +- Customer Identifier ID +- Notes + +## View Payments + +You can view the payments made to your Customer Identifiers on the Dashboard. + +To do this: +1. Log in to the Dashboard. +2. Navigate to **Smart Collect** → **Payments**. + +List of payments made by customers is displayed here: +![](/docs/assets/images/smart-collect-sc-payments-tab.jpg) diff --git a/llm-content/payments/smart-collect/va-vpa-qr/dashboard/refund.md b/llm-content/payments/smart-collect/va-vpa-qr/dashboard/refund.md new file mode 100644 index 00000000..92182fb9 --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/dashboard/refund.md @@ -0,0 +1,25 @@ +--- +title: Refund Payments +description: Learn how to refund payments made by customers to your Customer Identifiers. +--- + +# Refund Payments + +You can refund the payment made by a customer. This refund can be in full or parts. + +To initiate a refund from your Customer Identifier: +1. In the **Payments** tab, click the Payment Id. +2. In the right pane that appears, click the **Issue Refund** button. + + + + + ![](/docs/assets/images/va_issue_refund.jpg) + + +3. A dialog box appears where the refund amount can be entered. + - In case of full refund, enter the payment amount in full. Enter **Comments**, if any, and click the **Issue Full Refund** button. + ![](/docs/assets/images/sc_full_refund.jpg) + - In case of partial refund, enter the amount you want to refund. Enter **Comments**, if any, and click the **Issue Partial Refund** button. + ![](/docs/assets/images/va_partial_refund.jpg) +4. A confirmation dialog box appears. Click **Yes, Refund** to complete the process. diff --git a/llm-content/payments/smart-collect/va-vpa-qr/dashboard/search.md b/llm-content/payments/smart-collect/va-vpa-qr/dashboard/search.md new file mode 100644 index 00000000..164dae0e --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/dashboard/search.md @@ -0,0 +1,50 @@ +--- +title: Search Customer Identifier and Payments +description: Learn how to search Customer Identifiers and payments made to these Customer Identifiers using filters. +--- + +# Search Customer Identifier and Payments + +## Search Customer Identifiers + +You can search for Customer Identifiers on the Dashboard. + +To do this: +1. Log in to the Dashboard. +2. Navigate to **Smart Collect** → **Customer Identifiers**. A list of Customer Identifiers is displayed here: + ![](/docs/assets/images/smart-collect-va-search.jpg) +3. Use the following filters to find the relevant Customer Identifier: + - Customer Identifier Id + - Customer Name + - Customer Contact + - Email + - Account Description: Enter a minimum of 4 characters. + - Notes + - Count + +> **INFO** +> +> +> **Note** +> +> Search is not case-sensitive. You can search for Customer Identifiers by entering details in lower, upper or mixed case. +> + + + +## Search Payments + +You can search for the payments made to your Customer Identifiers on the Dashboard. + +To do this: +1. Log in to the Dashboard. +2. Navigate to **Smart Collect** → **Payments**. A list of payments made by customers is displayed here: + ![](/docs/assets/images/smart-collect-payments-search.jpg) +3. Use the following filters to find the relevant payment: + - Customer Identifier Id + - Payment Id + - Payment Status + - Email + - Bank Reference Number + - Notes + - Count diff --git a/llm-content/payments/smart-collect/va-vpa-qr/dashboard/test-payments.md b/llm-content/payments/smart-collect/va-vpa-qr/dashboard/test-payments.md new file mode 100644 index 00000000..f2982f7d --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/dashboard/test-payments.md @@ -0,0 +1,45 @@ +--- +title: Make Test Payments +description: Learn how to make test payments to virtual bank accounts and UPI IDs in Test Mode. +--- + +# Make Test Payments + +> **INFO** +> +> +> **No Test Payments on Live Mode:** +> +> You cannot make test payments to Customer Identifiers created in Live Mode. +> +> + +> You can toggle between Live and Test Modes on your **Dashboard**. Navigate to the top menu ribbon and click the drop-down icon against **Live Mode**. Toggle to **Test Mode** and create a new Customer Identifier. +> + +You can make a test payment to a virtual bank account or UPI ID only in Test Mode. + +## Test Payment to a Virtual Bank Account + +Follow these steps to make test payments to a virtual bank account. +1. In the list, select the Customer Identifier ID. +2. In the right pane that appears, click **Make a Test Payment**. + ![](/docs/assets/images/smart-collect-va_test_payments.jpg) +3. Enter the following details in the form that appears: + 1. **Amount** - Enter the amount to be transferred to the Customer Identifier as the test payment. + 2. **Method** - Select the method of transfer to simulate. You can choose NEFT, RTGS or IMPS. + + + + + ![](/docs/assets/images/sc_test_payment.jpg) + +4. Click **Create**. + +A success message **test payment successful** appears, indicating that the payment has gone through. The same is reflected on the Customer Identifier list as well: + +![](/docs/assets/images/smart-collect-va_test_payment_complete.jpg) + +## Test Payment to a Virtual UPI ID + +At present, you cannot make a test payment to a virtual UPI ID. This feature will be available soon. diff --git a/llm-content/payments/smart-collect/va-vpa-qr/faqs.md b/llm-content/payments/smart-collect/va-vpa-qr/faqs.md new file mode 100644 index 00000000..89dee8ac --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/faqs.md @@ -0,0 +1,76 @@ +--- +title: FAQs +description: Questions frequently asked on Smart Collect. +--- + +# FAQs + +1. **How can a customer make a payment to a Smart Collect virtual bank account or UPI ID?** + + The customer can make a transaction to the bank account via a simple NEFT, RTGS or IMPS transaction from their preferred internet banking portal. + + In case of a virtual UPI ID, the customer can add the UPI ID in their UPI PSP (Payment Service Provider) app and make a payment. + +1. **Can a customer make payment to a virtual bank account via an offline transaction?** + + Yes, customers can visit their bank and fill out an RTGS form, or a NEFT challan with the beneficiary details provided by Razorpay and initiate a transfer from their account. + + +> **INFO** +> +> +> **Note**: +> Customers cannot deposit cash into a virtual bank account. Only NEFT, RTGS or IMPS transactions are permitted. +> + +1. **What does a Smart Collect virtual bank account look like?** + +Exactly like a normal account! Here's an example: + + +> **SUCCESS** +> +> +> **Account Number** +> +> **IFSC**: RAZR0000001 + +> **Name**: Acme Corporation +> + +1. **What does a Smart Collect virtual UPI ID look like?** + +Like a normal virtual payment address! Here's an example: + +> **SUCCESS** +> +> +> **UPI ID**: rpy.payto00000gaurikumari@icici +> + +1. **What name will be associated with a Smart Collect virtual account?** + + Your merchant billing label will be used as the name on your virtual account. + +1. **What happens if a customer makes an NEFT, RTGS, IMPS or UPI payment to a `Closed` virtual account?** + Once the virtual account is `Closed`, we will automatically refund all payments back to the source. Refunds are generally processed within 1 business day via the same mode used by the customer. + +1. **Can I pass a dynamic merchant identifier via API?** + +Currently, this feature is not available. + +1. **Is third party validation possible for payments via Smart Collect?** + +Payer bank account details are made available in the webhook and reports. As a merchant, you can choose to refund the payment if payer bank account details are not from a KYC verified account. + +1. **Can I create virtual accounts in bulk?** + +Yes, you can create virtual accounts in bulk. To do this, please contact our [support team](https://razorpay.com/support/#request). + +1. **How to close a virtual account?** + +A virtual account can be closed in two ways: + - Automatically, by using the `close_by` option at the time of virtual account creation, via Dashboard or API. + - Manually, from the Dashboard or using the API. + +Once a virtual account is in closed state, customers cannot make payments to that account. diff --git a/llm-content/payments/smart-collect/va-vpa-qr/notification-wo-payer-details.md b/llm-content/payments/smart-collect/va-vpa-qr/notification-wo-payer-details.md new file mode 100644 index 00000000..134d0dba --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/notification-wo-payer-details.md @@ -0,0 +1,86 @@ +--- +title: Notification (prior to 24/05/19) +description: Receive notifications for your Razorpay virtual account for payment captured event using webhooks and receive email notifications for payment successful event. +--- + +# Notification (prior to 24/05/19) + +All payments made using Smart Collect will show up on your Dashboard as well as in the usual payment response APIs, as payments made with method `bank_transfer`. + +## Webhooks +Payments made using this method will also trigger webhooks much like regular payments. To use webhooks, refer our [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) documentation. + +### Virtual Account Credited Event + +You are notified about payments made using Smart Collect via the `virtual_account.credited` webhook. + +The payload for this event contains details of the payment as well as the virtual account that the payment was made towards. + +Given below is the webhook payload for `virtual_account.credited`. + +``` +{ + "event": "virtual_account.credited", + "entity": "event", + "contains": [ + "payment", + "virtual_account" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_6X6jcHoHdRdy79", + "entity": "payment", + "amount": 50000, + "currency": "INR", + "status": "captured", + "amount_refunded": 0, + "refund_status": null, + "method": "bank_transfer", + "order_id": "order_6X4mcHoSXRdy79", + "card_id": null, + "bank": null, + "captured": true, + "email": "saurav.kumar@example.com", + "contact": "9123456780", + "description": "Payment Description", + "error_code": null, + "error_description": null, + "fee": 200, + "tax": 10, + "international": false, + "notes": [], + "vpa": null, + "wallet": null + } + }, + "virtual_account": { + "entity": { + "id": "va_4xbQrmEoA5WJ0G", + "entity": "virtual_account", + "description": "First Virtual Account", + "customer_id": "cust_805c8oBQdBGPwS", + "status": "active", + "amount_paid": 50000, + "notes": { + "reference_key": "reference_value" + }, + "receivers": [ + { + "id": "ba_4lsdkfldlteskf", + "entity": "bank_account", + "name": "Merchant Billing Label", + "account_number": "11122219877893452", + "ifsc": "RAZR0000001" + } + ], + "created_at": 1455696638 + } + }, + "created_at": 1400826760 + } +} +``` + +## Emails +You will also receive a 'payment successful' notification email, as you do for regular payments. diff --git a/llm-content/payments/smart-collect/va-vpa-qr/notification.md b/llm-content/payments/smart-collect/va-vpa-qr/notification.md new file mode 100644 index 00000000..64abf709 --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/notification.md @@ -0,0 +1,390 @@ +--- +title: Notifications +description: Receive notifications for your Razorpay virtual account for payment captured event using webhooks and receive email notifications for payment successful event. +--- + +# Notifications + +All payments made using Smart Collect will show up on your Dashboard as well as in the usual payment response APIs. + +## Webhooks + +Payments made using Smart Collect will also trigger webhooks much like regular payments. To use webhooks, refer our [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) documentation. + +### Event - Virtual Account Created + +When a virtual account is created the `virtual_account.created` webhook event is fired. The payload is given below: + +```json: virtual_account.created +{ + "entity":"event", + "account_id":"acc_BFQ7uQEaa7j2z7", + "event":"virtual_account.created", + "contains":[ + "virtual_account" + ], + "payload":{ + "virtual_account":{ + "entity":{ + "id":"va_DET8z3wBxfPB5L", + "name":"Acme Corp", + "entity":"virtual_account", + "status":"active", + "description":"Virtual Account to test webhook", + "amount_expected":null, + "notes":{ + "Important":"Notes for Internal Reference" + }, + "amount_paid":0, + "customer_id":"cust_BtQNqzmBlAXyTY", + "receivers":[ + { + "id":"ba_DET8z5Z5ghv4hW", + "entity":"bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name":"Acme Corp", + "notes": [], + "account_number":"1112220006712324" + }, + { + "id": "vpa_DzZcAjcRevv5JO", + "entity": "vpa", + "username": "rpy.payto00000gaurikumari", + "handle": "icici", + "address": "rpy.payto00000gaurikumari@icici" + }, + { + "id": "qr_F8ibAwwQs5H1kb", + "entity": "qr_code", + "reference": "F8ibAwwQs5H1kb", + "short_url": "https://rzp.io/i/o60mXWk", + "created_at": 1593494482 + } + ], + "close_by":null, + "closed_at":null, + "created_at":1567675923 + } + } + }, + "created_at":1567675923 +} +``` + +### Event - Virtual Account Credited + +Payments made using Smart Collect are notified via the `virtual_account.credited` webhook event. + +```json: bank_transfer +{ + "entity":"event", + "account_id":"acc_BFQ7uQEaa7j2z7", + "event":"virtual_account.credited", + "contains":[ + "payment", + "virtual_account", + "bank_transfer" + ], + "payload":{ + "payment":{ + "entity":{ + "id":"pay_DETA2KrOlhqQzF", + "entity":"payment", + "amount":61900, + "currency":"INR", + "status":"captured", + "order_id":null, + "invoice_id":null, + "international":false, + "method":"bank_transfer", + "amount_refunded":0, + "amount_transferred":0, + "refund_status":null, + "captured":true, + "description":"NA", + "card_id":null, + "bank":null, + "wallet":null, + "vpa":null, + "email":"gaurav.kumar@example.com", + "contact":"+919000090000", + "customer_id":"cust_BtQNqzmBlAXyTY", + "notes":[], + "fee":731, + "tax":112, + "error_code":null, + "error_description":null, + "created_at":1567675983 + } + }, + "virtual_account":{ + "entity":{ + "id":"va_DET8z3wBxfPB5L", + "name":"Acme Corp", + "entity":"virtual_account", + "status":"active", + "description":"Virtual Account to test webhook", + "amount_expected":null, + "notes":{ + "Important":"Notes for Internal Reference" + }, + "amount_paid":61900, + "customer_id":"cust_BtQNqzmBlAXyTY", + "close_by":null, + "closed_at":null, + "created_at":1567675923, + "receivers":[ + { + "id":"ba_DET8z5Z5ghv4hW", + "entity":"bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name":"Acme Corp", + "account_number":"1112220006712324" + } + ] + } + }, + "bank_transfer":{ + "entity":{ + "id":"bt_DETA2KSUJ3uCM9", + "entity":"bank_transfer", + "payment_id":"pay_DETA2KrOlhqQzF", + "mode":"NEFT", + "bank_reference":"156767598340", + "amount":61900, + "payer_bank_account":{ + "id":"ba_DETA2UuuKtKLR1", + "entity":"bank_account", + "ifsc": "KKBK0000007", + "bank_name": "Kotak Mahindra Bank", + "name":"Saurav Kumar", + "account_number":"765432123456789" + }, + "virtual_account_id":"va_DET8z3wBxfPB5L" + } + } + }, + "created_at":1567675983 +} +```json: vpa +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "virtual_account.credited", + "contains": [ + "payment", + "virtual_account", + "upi_transfer" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DETA2KrOlhqQzF", + "entity": "payment", + "amount": 500, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": "Virtual UPI ID payment", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gauravkumar@icic", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_BM8NbnFAk1BVDA", + "notes": [], + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "acquirer_data": { + "rrn": null + }, + "created_at": 1567675983 + } + }, + "virtual_account": { + "entity": { + "id": "va_DzYPeYqvsYEdNq", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Receive payment instalment from Gaurav Kumar- Flat No 105", + "amount_expected": null, + "notes": [], + "amount_paid": 500, + "customer_id": "cust_BM8NbnFAk1BVDA", + "close_by": 1580491859, + "closed_at": null, + "created_at": 1577956463, + "receivers": [ + { + "id": "vpa_DzYPeu6ntqxhcE", + "entity": "vpa", + "username": "rpy.payto00000gaurikumari", + "handle": "icici", + "address": "rpy.payto00000gaurikumari@icici" + } + ] + } + }, + "upi_transfer": { + "entity": { + "id": "ut_DzZjcnY8n3oU65", + "entity": "upi_transfer", + "amount": 500, + "payer_vpa": "gauravkumar@icic", + "payer_bank": "Kotak Mahindra Bank", + "payer_account": "765432123456789", + "payer_ifsc": "KKBK0000007", + "payment_id": "pay_DETA2KrOlhqQzF", + "rrn": "006516367819", + "virtual_account_id": "va_DzYPeYqvsYEdNq" + } + } + }, + "created_at": 1567675984 +} +```json: qr_code +{ + "entity": "event", + "account_id": "acc_8TgNt9DVrJB0bl", + "event": "virtual_account.credited", + "contains": [ + "payment", + "virtual_account" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_F8ik6ycZZEvZgK", + "entity": "payment", + "amount": 100000, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Bharat Qr Payment", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@icici", + "email": "k@u.com", + "contact": "+911231231234", + "customer_id": "cust_F77cxV1BsMDubi", + "notes": [], + "fee": 1, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "created_at": 1593494989 + } + }, + "virtual_account": { + "entity": { + "id": "va_F8ibAfPwwkvCW7", + "name": "Intuit India", + "entity": "virtual_account", + "status": "active", + "description": "Receive payment instalment from Gaurav Kumar- Flat No 105", + "amount_expected": null, + "notes": [], + "amount_paid": 100, + "customer_id": "cust_F77cxV1BsMDubi", + "close_by": 1681615838, + "closed_at": null, + "created_at": 1593494482, + "receivers": [ + { + "id": "qr_F8ibAwwQs5H1kb", + "entity": "qr_code", + "reference": "F8ibAwwQs5H1kb", + "short_url": "https://rzp.io/i/o60mXWk", + "created_at": 1593494482 + } + ] + } + } + }, + "created_at": 1593494989 +} +``` + +### Event - Virtual Account Closed + +When a virtual account is closed the `virtual_account.closed` webhook event is fired. The payload is given below: + +```json: virtual_account.closed +{ + "entity":"event", + "account_id":"acc_BFQ7uQEaa7j2z7", + "event":"virtual_account.closed", + "contains":[ + "virtual_account" + ], + "payload":{ + "virtual_account":{ + "entity":{ + "id":"va_DET8z3wBxfPB5L", + "name":"Acme Corp", + "entity":"virtual_account", + "status":"closed", + "description":"Receive payment instalment from Gaurav Kumar- Flat No 105", + "amount_expected":null, + "notes":[], + "amount_paid":500, + "customer_id":"cust_BM8NbnFAk1BVDA", + "receivers":[ + { + "id":"ba_DzYPeiYdd2RVSc", + "entity":"bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name":"Acme Corp", + "account_number":"1112220006712324" + }, + { + "id": "vpa_DzYPeu6ntqxhcE", + "entity": "vpa", + "username": "rpy.payto00000gaurikumari", + "handle": "icici", + "address": "rpy.payto00000gaurikumari@icici" + }, + { + "id": "qr_F8M0o50kAJjqIE", + "entity": "qr_code", + "reference": "F8M0o50kAJjqIE", + "short_url": "https://rzp.io/i/jpiGilg", + "created_at": 1593414941 + } + ], + "close_by":1580491859, + "closed_at":1567677769, + "created_at":1567675923 + } + } + }, + "created_at":1567677769 +} +``` + +## Emails +You will also receive a `payment successful` notification email, as you do for regular payments. diff --git a/llm-content/payments/smart-collect/va-vpa-qr/receiver-types.md b/llm-content/payments/smart-collect/va-vpa-qr/receiver-types.md new file mode 100644 index 00000000..743bccad --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/receiver-types.md @@ -0,0 +1,98 @@ +--- +title: API Endpoints +--- + +# API Endpoints + +Base URL: `https://api.razorpay.com/v1/` + +The virtual account response contains attributes such as `id` and `customer_id`, and also a field `receivers`. This is an array that defines what receivers are available for the virtual account. + +For example, if the `receiver_types` field of the original request contained `bank_account`, then the response will contain a `receivers` array with one element, which gives details of that `bank_account` receiver such as account number, IFSC, etc. + +## Create + +> **WARN** +> +> +> **Note** +> +> The request format for virtual account creation recently underwent a change, and the updated format can be found [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/api.md). The request format given below will eventually be deprecated. +> +> For new integrations, we strongly recommend you use the updated request format, as it allows a host of new features, most particularly the support for completely-numeric account numbers by default. +> + +/virtual_accounts + +```bash: cURL +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST \ + --data "receiver_types[]=bank_account" \ + --data "description=First Virtual Account" \ + --data "notes[reference_key]=reference_value" \ + https://api.razorpay.com/v1/virtual_accounts +```json:Response +{ + "id": "va_4xbQrmEoA5WJ0G", + "entity": "virtual_account", + "description": "First Virtual Account", + "customer_id": "cust_805c8oBQdBGPwS", + "status": "active", + "amount_paid": 0, + "notes": { + "reference_key": "reference_value" + }, + "receivers": [ + { + "id": "ba_4lsdkfldlteskf", + "entity": "bank_account", + "name": "Merchant Billing Label", + "account_number": "11122219877893452", + "ifsc": "RAZR0000001" + } + ], + "created_at": 1455696638 +} +``` + +With the exception of the `Create` API, the request format for all other API endpoints remains the same, and can be checked [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/api.md). + +## Migration + +To migrate to the new request format, simply replace the `receiver_types` parameter in the request body with the equivalent `receivers.types` parameters. + +```json:Older Request +{ + "receiver_types": [ + "bank_account" + ], + "description": "First Virtual Account", + "customer_id": "cust_805c8oBQdBGPwS", + "notes": { + "reference_key": "reference_value" + } +} +```json:Updated Request +{ + "receivers": { + "types": [ + "bank_account" + ] + }, + "description": "First Virtual Account", + "customer_id": "cust_805c8oBQdBGPwS", + "notes": { + "reference_key": "reference_value" + } +} +``` + +Note that `receiver.types` is a mandatory parameter. + +> **INFO** +> +> +> **Note** +> +> By default, the account number generated using the new request format is wholly numeric, thus allowing it to be used on a wider range of platforms. This is a change from the older request format, which produced only alphanumeric account numbers. +> diff --git a/llm-content/payments/smart-collect/va-vpa-qr/refunds.md b/llm-content/payments/smart-collect/va-vpa-qr/refunds.md new file mode 100644 index 00000000..de219521 --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/refunds.md @@ -0,0 +1,22 @@ +--- +title: Refunds +description: Learn how to refund payments received on a virtual account. +--- + +# Refunds + +You can create refunds for the payments received on a virtual account. Refunds are generally processed within 3-5 business days via the same mode used by your customer. The platform fee and GST charged on successful transactions will not be reversed in the case of refunds. + +You can initiate refunds from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/dashboard/refund.md) or using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/api/refunds.md). + +## Refund Failures + +There are some situations where it is **not** possible to refund a payment received on a virtual account. These are listed below: + +- UPI payments initiated from UPI PSP apps such as Google Pay, PhonePe. Such payments do not show remitter bank account details and it is not possible to process a refund. + +- IMPS Payments made from a small number of banks that do not share the payer's account number and such payments cannot be automatically refunded. + +- Payments made from Non-Resident External (NRE) bank accounts. In such cases, Razorpay is not permitted to deposit money into the account and it is not possible to process a refund. + +In each of these cases, if a refund is still necessary, you can obtain alternate bank account details from your customer and raise a request on the [Support Portal](https://razorpay.com/support/#request) to initiate a refund. diff --git a/llm-content/payments/smart-collect/va-vpa-qr/status.md b/llm-content/payments/smart-collect/va-vpa-qr/status.md new file mode 100644 index 00000000..1f395b0d --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/status.md @@ -0,0 +1,20 @@ +--- +title: Virtual Account Status +description: Learn about the different states of the virtual account. +--- + +# Virtual Account Status + +The virtual account is Active or Closed state in its life cycle. + +## Active + +When you create a virtual account via [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/dashboard/create.md) or [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/api/create.md), it is `active` and ready to accept payments. + +## Closed + +You can close a virtual account using any of the following methods: +- Automatically, by using the `close_by` option at the time of virtual account creation, via [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/dashboard/create.md) or [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/api/create.md). +- Manually, from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/dashboard/close.md) or using the [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/api/close.md). + +Once the account is in the `closed` state, your customers cannot make payments to that closed account. diff --git a/llm-content/payments/smart-collect/va-vpa-qr/testing.md b/llm-content/payments/smart-collect/va-vpa-qr/testing.md new file mode 100644 index 00000000..11cb7873 --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/testing.md @@ -0,0 +1,23 @@ +--- +title: Test Payments in Smart Collect +description: Learn how you can accept payments to virtual accounts in test mode before accepting live payments in Razorpay Smart Collect product. +--- + +# Test Payments in Smart Collect + +You can create and manage your virtual accounts in test mode before you start making and receiving actual transactions. + +To generate Test Keys for API: +1. Log in to the Dashboard. +2. Select the **Test Mode** from menu ribbon. +3. Navigate to **Settings** > **API Keys**. +4. Click **Generate Test Key**. +5. Click **Download Key Details** and save the Test Key details on your system. + +[Video: https://www.youtube.com/embed/6mJnOWZDhDo] + +## Test Payments + +Test payments can be initiated towards any virtual account created in test mode, via the `Make Test Payment` option on your Dashboard. This option will trigger the webhook notifications similar to the live payment made via NEFT/IMPS/RTGS. + +Follow these steps to [Make a Test Payment from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/dashboard/test-payments.md). diff --git a/llm-content/payments/smart-collect/va-vpa-qr/vanity.md b/llm-content/payments/smart-collect/va-vpa-qr/vanity.md new file mode 100644 index 00000000..9f31f037 --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/vanity.md @@ -0,0 +1,145 @@ +--- +title: Vanity Account Numbers +description: Learn how to enable Vanity Accounts for your virtual accounts. +--- + +# Vanity Account Numbers + +> **INFO** +> +> +> **Enable Vanity Account Numbers** +> +> To enable Vanity Accounts for your account, contact our [support](https://razorpay.com/support/), with the desired merchant [handle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/va-vpa-qr/vanity.md#handle). +> + +By default, any virtual account created by you will have a randomly generated numeric bank account number. + +However, Razorpay Smart Collect also allows you to create custom bank accounts with vanity account numbers. This means you will be able to create Customer Identifiers that have the account number `RZRPXXXXYYYYYYYYY`, where the contents of the XY-segment is entirely within your control. + +> **INFO** +> +> +> **Alphanumeric Account Numbers** +> +> By default, the account numbers generated are always numeric. To use Vanity Accounts, you must set the `receivers.bank_account.numeric` option to 0, and set the `receivers.bank_account.descriptor` option to the desired custom value. +> + +> If `receivers.bank_account.descriptor` is set without setting `receivers.bank_account.numeric` to 0, the request will result in an error: "Descriptor cannot be used for numeric accounts." +> + +The possible options that can be set for the `bank_account` receiver are given below. + +Attribute | Mandatory/Optional (in request) | Type | Description +--- +`receivers` | Mandatory | JSON Object | Configuration of desired receivers for the virtual account +--- +`receivers.types` | Mandatory | array | List of desired receiver types. Currently `bank_account` is the only supported type. +--- +`receivers.bank_account.numeric` | Optional, default: 1 | integer | Flag to indicate whether a numeric or alphanumeric account is desired. +--- +`receivers.bank_account.descriptor` | Optional | string | Alphanumeric string that is to be used for account number generation, only valid if `numeric` is 0. + +## Handle + +The 5th through the 8th character, X-segment, in the account number (`XXXX` in the above example) is referred to as the merchant handle and can be set on request. This segment is fixed and will then be used in the generation of all your alphanumeric virtual account numbers. + +> **WARN** +> +> +> **Avoid Ambiguous Handles** +> +> When displaying a virtual account to a customer, the font used may cause the customer to misread the alphanumeric characters (if any) in the account number. The customers may commit typos while entering the beneficiary account during the payment initiation. It is very common to misread the letter 'O' in an account number as the numeral '0'. +> + +> Payments made to such mistyped accounts are considered invalid and are refunded to the customer's account within 1 working day. This could cause inconvenience to customers as they have to wait for 24 hours when large amounts should be refunded. +> + +> For this reason, we strongly recommend not to use the following characters in your handle, as they may appear ambiguous in certain fonts. +> + +> - `0` or `O` +> - `1` or `I` +> - `5` or `S` +> - `8` or `B` +> - `2` or `Z` +> + +## Descriptor + +The `descriptor` field defines the last 9 characters of the generated bank account number. + +```json:JSON Input +{ + "receiver": { + "types": [ + "bank_account" + ], + "bank_account": { + "descriptor": "000000001", + "numeric": 0 + } + }, + "customer_id": "cust_805c8oBQdBGPwS", + "description": "Vanity Virtual Account" +} +```json:Output +{ + "id": "va_4xbQrmEoA5WJ0G", + "entity": "virtual_account", + "description": "Vanity Virtual Account", + "customer_id": "cust_805c8oBQdBGPwS", + "status": "active", + "amount_paid": 0, + "receivers": [ + { + "id": "ba_4lsdkfldlteskf", + "entity": "bank_account", + "name": "Merchant Billing Label", + "account_number": "RZRPABCD000000001", + "ifsc": "RAZR0000001" + } + ], + "created_at": 1455696638 +} +``` + +Here in this example, a descriptor `000000001` is used to generate an account number, while merchant handle `ABCD` is pre-decided. + +> **WARN** +> +> +> **Descriptor Usage** +> +> The descriptor can have a maximum length of 9 characters. This is because some banks do not allow the addition of beneficiary accounts that have an account number of more than 17 characters. +> + +> This `descriptor` field can only be used if your merchant handle is set. If it is not set, sending any value in the descriptor field will return an error. +> + +> ```json:Error +> { +> "error": { +> "description": "Descriptor field cannot be used as merchant handle is not set for your account.", +> "code": "BAD_REQUEST_ERROR" +> } +> } +> ``` +> + +> The `descriptor` must be unique for each active virtual account. If a descriptor is sent, which is already in use by another active virtual account, the following error is returned. +> + +> ```json:Error +> { +> "error": { +> "description": "An active virtual account with the same descriptor already exists for your account.", +> "code": "BAD_REQUEST_ERROR" +> } +> } +> ``` +> + +**Note** + +If the `descriptor` field is not sent but `numeric` is set to 0, the account number will be a randomly generated alphanumeric string that still uses the merchant handle. diff --git a/llm-content/payments/smart-collect/va-vpa-qr/yesbank-moratorium-migration.md b/llm-content/payments/smart-collect/va-vpa-qr/yesbank-moratorium-migration.md new file mode 100644 index 00000000..e90bff51 --- /dev/null +++ b/llm-content/payments/smart-collect/va-vpa-qr/yesbank-moratorium-migration.md @@ -0,0 +1,251 @@ +--- +title: Account Migration due to Yes Bank Moratorium +description: Updating your setup to work with our new banking partners. +--- + +# Account Migration due to Yes Bank Moratorium + +Due to [Yes Bank moratorium](https://economictimes.indiatimes.com/industry/banking/finance/banking/govt-limits-withdrawals-from-yes-bank-at-rs-50000/articleshow/74498382.cms?utm_campaign=Yes%20Bank%20Moratarium&utm_source=hs_email&utm_medium=email&_hsenc=p2ANqtz--EYqAIp-sSFuL_W5KQKGvfKAwON8T78jF5TA1xsFyQgBji1f-zNiL1x0XioKukSc-FJT3G), Customer Identifiers via YesBank were temporarily disabled between March 6, 2020 and March 18, 2020. During this time period, Razorpay onboarded a new partner bank and issued the same Customer Identifiers numbers with an updated IFSC as `RATN0VAAPIS`. Customers had to use the same account number, but switch the IFSC. Now that the moratorium has been lifted, if your virtual account was created before March 6, 2020, it would now appear as shown below: + +![](/docs/assets/images/smart-collect-va_pre_moratorium.jpg) + +Your customers can make payments using the account number and either of the IFSCs: +- `RATN0VAAPIS` +- `YESB0CMSNOC` + +> **INFO** +> +> +> **New Customer Identifiers** +> +> +> Post March 6, 2020, IFSC for all newly issued Customer Identifiers will be `RATN0VAAPIS`. +> + +## Smart Collect Integration + +Your Virtual Account integration will likely work in one of the following ways: + +- By mapping your customers/orders to **Razorpay virtual account IDs.** +- By mapping your customers/orders to **Razorpay customer IDs.** +- By mapping your customers/orders to **Customer Identifiers.** +- By mapping your customers/orders to **your own reference identifiers**, which you passed in the notes array of your virtual account creation request. + +In each of these cases, the Razorpay `virtual_account.credited` webhook is responsible for informing your server about which order to fulfill. + +```json: Existing Virtual Account Credited Webhook +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "virtual_account.credited", + "contains": [ + "payment", + "virtual_account", + "bank_transfer" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DETA2KrOlhqQzF", + "entity": "payment", + "amount": 61900, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "bank_transfer", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": "NA", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_BtQNqzmBlAXyTY", + "notes": [], + "fee": 731, + "tax": 112, + "error_code": null, + "error_description": null, + "created_at": 1567675983 + } + }, + "virtual_account": { + "entity": { + "id": "va_DET8z3wBxfPB5L", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Virtual Account to test webhook", + "amount_expected": null, + "notes": { + "internal_order_id": "12345" + }, + "amount_paid": 0, + "customer_id": "cust_BtQNqzmBlAXyTY", + "receivers": [ + { + "id": "ba_DET8z5Z5ghv4hW", + "entity": "bank_account", + "ifsc": "YESB0CMSN5C", + "bank_name": "Yes Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223330012341234" + } + ], + "close_by": null, + "closed_at": null, + "created_at": 1567675923 + } + }, + "bank_transfer": { + "entity": { + "id": "bt_DETA2KSUJ3uCM9", + "entity": "bank_transfer", + "payment_id": "pay_DETA2KrOlhqQzF", + "mode": "NEFT", + "bank_reference": "156767598340", + "amount": 61900, + "payer_bank_account": { + "id": "ba_DETA2UuuKtKLR1", + "entity": "bank_account", + "ifsc": "KKBK0000007", + "bank_name": "Kotak Mahindra Bank", + "name": "Saurav Kumar", + "account_number": "765432123456789" + }, + "virtual_account_id": "va_DET8z3wBxfPB5L" + } + } + }, + "created_at": 1567675983 +} +``` + + **Reconciliation ID** | **Example** | **Location in credit webhook** + --- + Razorpay virtual account ID | `va_EPeK1ykH2PRtnD` | `payload.virtual_account.entity.id` + --- + Razorpay customer ID | `cust_EPeLtyhSwk5tub` | `payload.virtual_account.entity.customer_id` + --- + Customer Identifier | `2223330012341234` | `payload.virtual_account.entity.receivers.0.account_number` + --- + Virtual Account Notes ID | `internal_order_id: 12345` | `payload.virtual_account.entity.notes.internal_order_id` + +The webhook payload for the migrated virtual accounts will look like this. + +```json: Virtual Account Credited Webhook for Migrated Account +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "virtual_account.credited", + "contains": [ + "payment", + "virtual_account", + "bank_transfer" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DETA2KrOlhqQzF", + "entity": "payment", + "amount": 61900, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "bank_transfer", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": "NA", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_BtQNqzmBlAXyTY", + "notes": [], + "fee": 731, + "tax": 112, + "error_code": null, + "error_description": null, + "created_at": 1567675983 + } + }, + "virtual_account": { + "entity": { + "id": "va_DET8z3wBxfPB5L", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Virtual Account to test webhook", + "amount_expected": null, + "notes": { + "internal_order_id": "12345" + }, + "amount_paid": 0, + "customer_id": "cust_BtQNqzmBlAXyTY", + "receivers": [ + { + "id": "ba_DET8z5Z5ghv4hW", + "entity": "bank_account", + "ifsc": "YESB0CMSN5C", + "bank_name": "Yes Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223330012341234" + }, + { + "id": "ba_EPf3KwRHCgEnum", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "2223330012341234" + } + ], + "close_by": null, + "closed_at": null, + "created_at": 1567675923 + } + }, + "bank_transfer": { + "entity": { + "id": "bt_DETA2KSUJ3uCM9", + "entity": "bank_transfer", + "payment_id": "pay_DETA2KrOlhqQzF", + "mode": "NEFT", + "bank_reference": "156767598340", + "amount": 61900, + "payer_bank_account": { + "id": "ba_DETA2UuuKtKLR1", + "entity": "bank_account", + "ifsc": "KKBK0000007", + "bank_name": "Kotak Mahindra Bank", + "name": "Saurav Kumar", + "account_number": "765432123456789" + }, + "virtual_account_id": "va_DET8z3wBxfPB5L" + } + } + }, + "created_at": 1567675983 +} +``` + +As you can see, while a new bank account receiver block has been added to the receivers array of the virtual account, all considered reconciliation IDs are still present in the Razorpay webhook, *in the same location*. + +Notably, since the old receiver is still a part of the webhook, your server will still be correctly notified of the virtual account that received the payment, and of the order on your end that needs to be fulfilled. + +**This means as long as your integration uses one of the 4 considered identifiers for payment reconciliation, it does not require any changes.** diff --git a/llm-content/payments/smart-collect/vanity.md b/llm-content/payments/smart-collect/vanity.md new file mode 100644 index 00000000..c424c43a --- /dev/null +++ b/llm-content/payments/smart-collect/vanity.md @@ -0,0 +1,145 @@ +--- +title: Vanity Account Numbers +description: Enable Vanity Accounts for your Customer Identifiers. +--- + +# Vanity Account Numbers + +> **INFO** +> +> +> **Enable Vanity Account Numbers** +> +> To enable Vanity Accounts for your account, contact our [support](https://razorpay.com/support/), with the desired merchant [handle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/vanity.md#handle). +> + +By default, any Customer Identifier created by you will have a randomly generated numeric bank account number. + +However, Razorpay Smart Collect also allows you to create custom bank accounts with vanity account numbers. This means you will be able to create Customer Identifiers that have the account number `RZRPXXXXYYYYYYYYY`, where the contents of the XY-segment is entirely within your control. + +> **INFO** +> +> +> **Alphanumeric Account Numbers** +> +> By default, the account numbers generated are always numeric. To use Vanity Accounts, you must set the `receivers.bank_account.numeric` option to 0, and set the `receivers.bank_account.descriptor` option to the desired custom value. +> + +> If `receivers.bank_account.descriptor` is set without setting `receivers.bank_account.numeric` to 0, the request will result in an error: "Descriptor cannot be used for numeric accounts." +> + +The possible options that can be set for the `bank_account` receiver are given below. + +Attribute | Mandatory/Optional (in request) | Type | Description +--- +`receivers` | Mandatory | JSON Object | Configuration of desired receivers for the Customer Identifier +--- +`receivers.types` | Mandatory | array | List of desired receiver types. Currently `bank_account` is the only supported type. +--- +`receivers.bank_account.numeric` | Optional, default: 1 | integer | Flag to indicate whether a numeric or alphanumeric account is desired. +--- +`receivers.bank_account.descriptor` | Optional | string | Alphanumeric string that is to be used for account number generation, only valid if `numeric` is 0. + +## Handle + +The 5th through the 8th character, X-segment, in the account number (`XXXX` in the above example) is referred to as the merchant handle and can be set on request. This segment is fixed and will then be used in the generation of all your alphanumeric Customer Identifier. + +> **WARN** +> +> +> **Avoid Ambiguous Handles** +> +> When displaying a Customer Identifier to a customer, the font used may cause the customer to misread the alphanumeric characters (if any) in the account number. The customers may commit typos while entering the beneficiary account during the payment initiation. It is very common to misread the letter 'O' in an account number as the numeral '0'. +> + +> Payments made to such mistyped accounts are considered invalid and are refunded to the customer's account within 1 working day. This could cause inconvenience to customers as they have to wait for 24 hours when large amounts should be refunded. +> + +> For this reason, we strongly recommend not to use the following characters in your handle, as they may appear ambiguous in certain fonts. +> + +> - `0` or `O` +> - `1` or `I` +> - `5` or `S` +> - `8` or `B` +> - `2` or `Z` +> + +## Descriptor + +The `descriptor` field defines the last 9 characters of the generated bank account number. + +```json:JSON Input +{ + "receiver": { + "types": [ + "bank_account" + ], + "bank_account": { + "descriptor": "000000001", + "numeric": 0 + } + }, + "customer_id": "cust_805c8oBQdBGPwS", + "description": "Vanity Virtual Account" +} +```json:Output +{ + "id": "va_4xbQrmEoA5WJ0G", + "entity": "virtual_account", + "description": "Vanity Virtual Account", + "customer_id": "cust_805c8oBQdBGPwS", + "status": "active", + "amount_paid": 0, + "receivers": [ + { + "id": "ba_4lsdkfldlteskf", + "entity": "bank_account", + "name": "Merchant Billing Label", + "account_number": "RZRPABCD000000001", + "ifsc": "RAZR0000001" + } + ], + "created_at": 1455696638 +} +``` + +Here in this example, a descriptor `000000001` is used to generate an account number, while merchant handle `ABCD` is pre-decided. + +> **WARN** +> +> +> **Descriptor Usage** +> +> The descriptor can have a maximum length of 9 characters. This is because some banks do not allow the addition of beneficiary accounts that have an account number of more than 17 characters. +> + +> This `descriptor` field can only be used if your merchant handle is set. If it is not set, sending any value in the descriptor field will return an error. +> + +> ```json:Error +> { +> "error": { +> "description": "Descriptor field cannot be used as merchant handle is not set for your account.", +> "code": "BAD_REQUEST_ERROR" +> } +> } +> ``` +> + +> The `descriptor` must be unique for each active Customer Identifier. If a descriptor is sent, which is already in use by another active Customer Identifier, the following error is returned. +> + +> ```json:Error +> { +> "error": { +> "description": "An active Customer Identifier with the same descriptor already exists for your account.", +> "code": "BAD_REQUEST_ERROR" +> } +> } +> ``` +> + +**Note** + +If the `descriptor` field is not sent but `numeric` is set to 0, the account number will be a randomly generated alphanumeric string that still uses the merchant handle. diff --git a/llm-content/payments/solutions/bfsi.md b/llm-content/payments/solutions/bfsi.md new file mode 100644 index 00000000..f8c5f253 --- /dev/null +++ b/llm-content/payments/solutions/bfsi.md @@ -0,0 +1,118 @@ +--- +title: Banking, Financial Services & Insurance (BFSI) | Razorpay Solutions +heading: Banking, Financial Services & Insurance +description: Explore Razorpay's BFSI solutions to streamline transactions and enhance security with seamless integration and real-time analytics for superior service and growth. +--- + +# Banking, Financial Services & Insurance + +Razorpay provides comprehensive payment solutions that solve unique challenges across the lending, wealth management and insurance sectors. Following is the use case and recommended products. + +## Manage Collections + +Payment failures in financial services can result in significant revenue loss, with over 50% of customers dropping off if payments fail on the first attempt. Our suite of intelligent features is built to address this and provide best-in-class success rates. Following are the recommended products: + + + - Integrate with a wide coverage of SDKs and plugins for popular marketplaces like Shopify, WooCommerce, and more. + + - Access 100+ payment methods including UPI, Cards (debit and credit), EMI, Netbanking, International Payments, Wallet, Pay Later, and more. + + + + + - Quickly recoup 15% of your failed payments on the first attempt with seamless and intuitive retry. + + Know more about [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md). + + + - Share Payment Links via email, SMS, or messenger and get paid immediately. + + - Use the Razorpay WhatsApp Bot to create and share Payment Links directly from WhatsApp. + + - Recover abandoned carts by sending customers a Payment Link, encouraging them to complete their purchase. + + Know more about [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md). + + +## Third Party Validation + +Third-Party Validation (TPV) of bank accounts is a mandatory requirement for businesses in the BFSI sector dealing with securities, broking and mutual funds. Following are the recommended products: + + + - One-Click Retry on Razorpay Checkout. + - Methods Available: UPI, Debit Card and Netbanking. + + Know more about [Payment Gateway with TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation.md). + + + - Share Payment Links with customers calling the call center for investing. + - Remind customers to add funds to trading accounts and notify them of low balances. + - Prevent drop-offs by sending Payment Links to resolve demat account payment issues. + + Know more about [Payment Links with TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/third-party-validation.md). + + + - Create Customer Identifiers to accept large payments from your customers. + - Supports NEFT/RTGS/IMPS transactions. + + Know more about [Smart Collect with TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect/apis.md). + + + - Achieve higher success rates with a smoother payment experience. + - Complete in-app flow with no redirections for better control over the user journey. + - Significantly reduce timeout issues as customers never leave your app. + + Know more about [Turbo UPI with TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/android-integration/standard/payment-methods/integration-tpv.md). + + +## Automate Recurring Revenues + +Recurring revenues are core to financial services, including insurance premiums, SIPs and loan repayments. With Razorpay, you can offer easy and tailor-made subscription plans to your customers through a platform built for automation. Following are the recommended products: + + + - Register customers for SIP payments via E-mandate/Paper NACH. + - Set up mandates for lump sum payments with first-time registration. + - Facilitate mandate migration. + + Know more about [E-mandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments.md). + + + - Enable users to set up periodic premium payments through their UPI apps. + - Support daily, weekly, monthly, quarterly, or yearly plans to make products or services more affordable. + - Supported by major UPI apps like AmazonPay, BHIM, PayTM, PhonePe, Google Pay, and [various banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md#upi-autopay). + + Know more about [UPI Autopay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/faqs.md#upi). + + + - Set up E-mandates, authorising the bank to deduct loan instalments automatically from their bank accounts at predefined intervals. + - Provide flexible repayment schedules based on customer preferences and loan terms. + - Automate the reconciliation of loan repayments, provide real-time visibility into payment statuses and reduce the chances of errors in financial reporting. + + Know more about [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md). + + +## End-to-End Cash Flow Management + +Financial companies face complex cash flows where money is collected from multiple sources and routed to various accounts - customers, investors, vendors, and service providers. Following are the recommended products: + + + - Split payments as per the broking index (NSE, BSE, MCX, and more). + - Distribute payments according to MF scheme bank accounts. + + Know more about [Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route.md). + + + - Improve payment routing to ensure transactions go through the best available acquirer or gateway, reducing failed transactions and increasing success rates. + - Automatically send transactions to the best-performing gateway without customer input. + - Smart Router routes payments to providers with a higher probability of success. + + Know more about [Optimizer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/optimizer.md). + + +## Explore RazorpayX for Advanced Business Banking + +You can explore the RazorpayX product suite for these use cases: + +- Managing multiple bank accounts via [RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard.md). +- [Automated payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) to bank accounts, debit cards, credit cards or prepaid cards. +- Streamlined salary disbursements through [RazorpayX Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll.md). diff --git a/llm-content/payments/solutions/ecommerce.md b/llm-content/payments/solutions/ecommerce.md new file mode 100644 index 00000000..1096eb65 --- /dev/null +++ b/llm-content/payments/solutions/ecommerce.md @@ -0,0 +1,138 @@ +--- +title: Ecommerce | Razorpay Solutions +heading: Ecommerce +description: Explore Razorpay's recommended products for the ecommerce industry, enabling easy access and management of payments, refunds, transfers, subscriptions, and more. +--- + +# Ecommerce + +Manage all your payments and financial operations from a consolidated Dashboard. Create an online store, track payments, and issue refunds within minutes. Make better business decisions with real-time reporting. Following are the use cases and recommended products. + +## Handle End-to-End Payments + +Experience the future of payments with the easiest integration, online onboarding and feature-filled checkout. Avail of the lowest industry charges. Following are the recommended products: + + + - One-Click Retry on Razorpay Checkout. + - Integrate with a wide coverage of SDKs and plugins for all popular marketplaces such as Shopify, WooCommerce, Magento and more. + - Enjoy high success rates on UPI and Card payments. + - 100+ Methods Available: UPI, Cards (debit and credit), EMI, Netbanking, International Payments, Wallet, Pay Later and more. + + Know more about [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md). + + + - Enables seamless prepaid and COD transactions on your platform. + - Integrate with plugins for popular marketplaces such as Shopify and WooCommerce. + + Know more about [Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout.md). + + + - Share the Payment Link via an email, SMS or messenger and get paid immediately. + - Install the Razorpay WhatsApp Bot for Payment Links and accept payments from your customers by creating and sharing Payment Links to them directly from WhatsApp. + - Recover abandoned carts by sending customers a Payment Link, encouraging them to return and complete their purchase. + + Know more about [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md). + + + - Add a pay button to your website to accept one-time and subscription payments on your website in less than 5 minutes. + - Share automated payment receipts with your customers. + + Know more about [Payment Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-button.md). + + +## Improve Checkout Experience and Conversion Rates + +Despite high traffic, ecommerce businesses have to deal with high cart abandonment rates and lower payment conversions. Razorpay offers a combination of solutions to enhance the checkout experience and conversion rates. Following are the recommended products: + + + - Improve order conversions by 40% by offering a 5X Faster checkout experience + - Reduce COD RTOs by 50% by dynamically blocking the COD payment method for high RTO-risk users based on Razorpay’s proprietary AI/ML model. + - Securely store customer addresses and payment information during checkout. + - Personalised checkout and payment experience and no redirections. + + Know more about [Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout.md). + + + - Integrate credit card payment with your Shopify store directly on the checkout page. + - Collect credit card payments on your Shopify websites without any redirections to a payment gateway page and boost conversions. + + Know more about [Razorpay Direct for Shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/ecommerce-plugins/razorpay-direct-credit-card.md). + + + - Highlight the best offers and eligible payment methods to consumers upfront and reduce drop-offs. + - Encourage more purchases with higher spending power. + - Boost average order values by enabling customers to unlock bigger discounts and calculate additional savings with the Discount Whisperer feature. + - Help customers check their eligibility and complete the purchase directly from the widget itself, eliminating friction. + - Available on Shopify, WooCommerce, Android app and custom-built websites. + + Know more about [Affordability Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget.md). + + + - Showcase our Trusted Badge on checkout and embed the Razorpay Trusted Business Widget on your website to instil credibility amongst site visitors. + - Reduce the share of COD orders and increase the share of prepaid orders by being perceived as a trusted business. + - Boost customer confidence about your business's legitimacy and minimise drop-offs. + - Available on Shopify, WooCommerce and custom-built websites. + + Know more about [Razorpay Trusted Business](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/trusted-business.md). + + + - Create attractive payment offers on your website, increasing sales. + - Provide interest-free EMI options with No Cost EMI Offers. + - With the help of Low Cost EMI Offers, provide upfront discounts by splitting the interest cost with your customers. + - Incremental offers lead to higher average order value, thereby boosting sales. + + Know more about [Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers.md). + + +## Automate Recurring Revenues +Recurring revenues are core to financial services, including insurance premiums, SIPs, and loan repayments. With Razorpay, you can offer easy and tailor-made subscription plans to your customers through a platform built for automation. We recommend: + + + - Offer customers various Subscription plans, such as monthly, quarterly, and yearly options. + - Securely store card information, eliminating the need for customers to enter card details every time they make a recurring payment. + - Automate the entire payment process, charging customers' cards at predefined intervals based on their chosen Subscription frequency. + - Provide discounts or cashback to increase average order value, thereby boosting sales. + + Know more about [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md). + + +## Go Global + +Businesses tend to find accepting international payments quite cumbersome due to issues such as currency conversion, FIRS collection from banks and the constant threat of credit card fraud. Following are the recommended products: + + + - Accept international payments in nearly 100 foreign currencies, with real-time, automatic currency conversion + - Supported payment methods: Cards, PayPal, Trustly, Poli, Sofort and Giropay. + + Know more about [International Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md). + + + - Generate FIRS automatically from our Dashboard. + - Free of cost, generated with a single click. There is no need to visit the bank and pay the fee. + + Know more about [Automated FIRS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/firs-automated-process.md). + + + - Confirm that the card user is the rightful owner. + - Verify the cardholder’s billing address and card details. + + Know more about [Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md). + + +## Improve Customer Post-Purchase Experience + +Razorpay solves issues related to high RTO costs, COD transactions involving cash handling, high RTO risk, and so on. Additionally, it also helps build loyalty and retention with increasing competition. Given below are the recommended products: + + + - Use our RTO Prediction capabilities to identify risk and dynamically disable the COD option, thereby reducing RTO. + - Convert COD orders to prepaid by offering incentives to customers via Whatsapp. + + Know more about [Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout.md). + + +## Explore RazorpayX for Advanced Business Banking + +- Make [instant Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) individually or in bulk via IMPS, NEFT, RTGS, UPI or Bank Transfer. +- Share [Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md) with customers and reduce wait time for payouts. +- Automate vendor payouts with [RazorpayX Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md). +- Ensure tax compliance with [RazorpayX Tax Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments.md). diff --git a/llm-content/payments/solutions/travel.md b/llm-content/payments/solutions/travel.md new file mode 100644 index 00000000..def142f3 --- /dev/null +++ b/llm-content/payments/solutions/travel.md @@ -0,0 +1,132 @@ +--- +title: Travel | Razorpay Solutions +heading: Travel +description: Explore Razorpay's recommended products for the travel industry, ensuring secure and efficient transactions for seamless booking experiences. +--- + +# Travel + +Manage all your travel-related payments and financial operations from a consolidated Dashboard. Create an online booking platform, track payments, and issue refunds within minutes. Make better business decisions with real-time reporting. Following are the use cases and recommended products. + +## Simplify Payment Processes + +Efficient payment processes are vital in travel. They ensure seamless transactions across platforms and methods, enhancing booking efficiency for travellers and operators alike. Following are the recommended products: + + + - One Click Retry on Razorpay Checkout. + - Integrate with a wide coverage of SDKs and plugins for all popular marketplaces such as Shopify, Woocommerce, Magento and more. + - Enjoy high success rates on UPI and Card payments. + - 100+ Methods Available: UPI, Cards (debit and credit), EMI, Netbanking, International Payments, Wallet, Pay Later and more. + + Know more about [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md). + + + - Simplifies the booking process, minimising the effort required from customers. + - Ensures safe transactions, protecting user data and building trust. + - Easily integrates with existing travel booking systems, reducing implementation complexity. + + Know more about [Turbo UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/turbo-upi.md). + + +## Streamline Customer Payments + +Streamlined payment solutions optimise booking processes by offering convenient payment methods and quick transaction confirmations, improving overall customer satisfaction in the travel sector. Following are the recommended products: + + + - Share Payment Links via email, SMS, or messenger and get paid immediately. + - Use the Razorpay WhatsApp Bot to create and share Payment Links directly from WhatsApp. + - Recover abandoned carts by sending customers a Payment Link, encouraging them to complete their purchase. + + Know more about [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md). + + + - Generate Customer Identifiers in real time via the Dashboard and APIs. + - Enable customers to make payments via NEFT, RTGS and IMPS. + - Eliminate the difficulty of manual reconciliation and save time and cost. + + Know more about [Smart Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md). + + +## Enhance Customer Experience + +Enhancing customer experience in travel involves providing flexible payment options and personalised services that cater to diverse traveller preferences, ultimately boosting satisfaction and loyalty. Following are the recommended products: + + + - Offer a pre-eligibility check on emi² instruments, allowing customers to verify their credit eligibility directly from the widget. + - Provide a variety of payment methods tailored to your customer's preferences, including EMIs and Pay Later options. + - Use the Affordability Widget to raise customers' awareness of emi²-based payment options and offers on your website or app before they reach checkout. + + Know more about [Affordability Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget.md). + + + - Create attractive payment offers on your website, increasing sales. + - Provide interest-free EMI options with No Cost EMI Offers. + - With the help of Low Cost EMI Offers, provide upfront discounts by splitting the interest cost with your customers. + - Incremental offers lead to higher average order value, thereby boosting sales. + + Know more about [Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/offers.md). + + + - Showcase our Trusted Badge on checkout and embed the Razorpay Trusted Business Widget on your website to instil credibility amongst site visitors. + - Reduce the share of COD orders and increase the share of prepaid orders by being perceived as a trusted business. + - Boost customer confidence about your business's legitimacy and minimise drop-offs. + - Available on Shopify, WooCommerce and custom-built websites. + + Know more about [Razorpay Trusted Business](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/trusted-business.md). + + + - Simplifies the payment process, making it faster and more convenient for travellers. + - Ensures high security, building trust and confidence in the booking platform. + - Provides real-time payment confirmation, ensuring smooth travel planning. + + Know more about [Turbo UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/turbo-upi.md). + + +## Manage Transactions Efficiently + +Efficient transaction management, including quick refunds and automated billing, ensures smooth operations and builds trust among travellers by offering reliable service and support. Following are the recommended products: + + + - Refund the amount to your customer almost instantly using Instant refunds. + - We support netbanking and UPI for Instant refunds. Refunds are sent back to the original payment method used in making the payment. + + Know more about [Instant Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/instant.md). + + + - Offer customers various Subscription plans, such as monthly, quarterly, and yearly options. + - Securely store card information, eliminating the need for customers to enter card details every time they make a recurring payment. + - Automate the entire payment process, charging customers' cards at predefined intervals based on their chosen Subscription frequency. + - Provide discounts or cashback to increase average order value, thereby boosting sales. + + Know more about [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md). + + +## Go Global + +Businesses tend to find accepting international payments quite cumbersome due to issues such as currency conversion, FIRS collection from banks and the constant threat of credit card fraud. Following are the recommended products: + + + - Accept international payments in nearly 100 foreign currencies, with real-time, automatic currency conversion + - Supported payment methods: Cards, PayPal, Trustly, Poli, Sofort and Giropay. + + Know more about [International Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md). + + + - Generate FIRS automatically from our Dashboard. + - Free of cost, generated with a single click. There is no need to visit the bank and pay the fee. + + Know more about [Automated FIRS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/firs-automated-process.md). + + + - Confirm that the card user is the rightful owner. + - Verify the cardholder’s billing address and card details. + + Know more about [Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md). + + +## Explore RazorpayX for Advanced Business Banking + +- Make [instant Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) individually or in bulk via IMPS, NEFT, RTGS, UPI or Bank Transfer. +- Share [Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md) with customers and reduce wait time for payouts. +- Automate vendor payouts with [RazorpayX Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md). +- Ensure tax compliance with [RazorpayX Tax Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments.md). diff --git a/llm-content/payments/subscriptions.md b/llm-content/payments/subscriptions.md new file mode 100644 index 00000000..e66aa2ab --- /dev/null +++ b/llm-content/payments/subscriptions.md @@ -0,0 +1,123 @@ +--- +title: Payments | Subscriptions +heading: About Subscriptions +description: Use Razorpay Subscriptions to accept recurring payments from your customers. Check the available billing models and the supported currencies. +--- + +# About Subscriptions + +Discover new features, updates and deprecations related to Razorpay Subscriptions (since Jan 2024). + +Use Razorpay Subscriptions to set up and manage recurring payments. + +- Create a plan with your pricing and billing schedule, then create a subscription for customers. Razorpay automatically charges them at regular intervals. + +- Manage all Subscriptions directly from the Dashboard - create plans, manage customer subscriptions, handle upgrades/downgrades, or pause billing. + +- Receive near real-time notifications by subscribing to Webhook events. + +## Advantages + +* **Automated Billing**: Create a plan once and Razorpay automatically charges customers on schedule. +* **Multiple Billing Models**: Support fixed amounts, usage-based billing or add-ons for extra services. +* **Flexible Plans**: Set up trial periods, upfront charges and multiple pricing tiers. +* **Customer Management**: Allow customers to upgrade, downgrade, pause or cancel subscriptions. +* **Smart Payment Retries**: Automatic retry logic maximises successful collections. +* **Seamless Integration**: Integrate using Dashboard links or APIs. +* **Auto-Invoicing**: Invoices are automatically generated for every billing cycle. + +## When to Use Subscriptions vs Recurring Payments + +**Subscriptions** are plan-based recurring payments. You create a plan (pricing and billing schedule), create a subscription for each customer and Razorpay automatically charges them at the defined intervals. Billing is fully automated and managed from the Dashboard. + +**Recurring Payments** let you charge customers repeatedly after they authorise their payment method once. You control when each charge is initiated using tokens. There is no built-in plan or automatic schedule; you trigger charges via API based on your business logic. + + +### Choose Subscriptions when you have: + + - Fixed billing schedules (weekly, monthly, quarterly, yearly) + - Multiple pricing plans for customers to choose from + - Need for automated, hands-off billing + + + +### Choose Recurring Payments when you need: + + - Flexible billing based on usage or milestones + - Manual control over when to charge each payment + - On-demand or variable payment amounts + + See [Recurring Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments.md) for flexible, usage-based billing. + + +## Supported Payment Methods + + + Customers can make payments using credit and debit cards. Card details are securely tokenised as per RBI guidelines. + + + Accept subscription payments via all major UPI apps including PhonePe, Google Pay, Paytm, BHIM and Amazon Pay. + + + Enable automated recurring transactions via Aadhaar, netbanking or debit card-based mandates. + + + + +See [Supported Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-payment-methods.md) for complete details on limits and supported banks. + +## Prerequisites + + +### 1. Sign up for Account + + Ensure you have a [Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md). + + + +### 2. Enable Flash Checkout + + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings → Checkout Features** and enable **Flash checkout**. + + ![Enable Flash Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/flash_checkout_settings.jpg.md) + + + +### 3. Understand Tokenisation + + For card-based subscriptions, customer card details are securely tokenised with explicit consent during authorisation. + + ![Card tokenization flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/subscriptions-tokenisation.gif.md) + + +## Get Started + +1. Log in to the Dashboard and navigate to **Subscriptions** under **PAYMENT PRODUCTS**. +2. [Create a Plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md#plan) to define your product, pricing and billing frequency. +3. [Create a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md#subscription) to link a customer to a plan using Dashboard or APIs. +4. Verify your subscription flow in [test mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/test.md). + +## Integrate With Your Systems + +You can integrate Razorpay Subscriptions with your existing systems: + + + Create [Plans](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-plans.md) and [Subscription Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md) and share via email/SMS - no coding required. + + + Integrate Subscriptions with your website or app using [Subscriptions APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md). + + + Set up [webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/subscribe-to-webhooks.md) to receive real-time notifications for subscription events. + + +#### Related Information + +- [How Subscriptions Work](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/workflow.md) +- [Subscription Use Cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/use-cases.md) +- [Subscription States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) +- [Create Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md) +- [Integration Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/integration-guide.md) +* [Subscriptions APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/apis.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/faqs.md) diff --git a/llm-content/payments/subscriptions/apis.md b/llm-content/payments/subscriptions/apis.md new file mode 100644 index 00000000..07809222 --- /dev/null +++ b/llm-content/payments/subscriptions/apis.md @@ -0,0 +1,49 @@ +--- +title: Subscriptions APIs +description: List of available Subscriptions APIs for various actions. +--- + +# Subscriptions APIs + +You can use the Subscriptions APIs to perform various actions. You can perform all of these actions from the Dashboard as well. + +## List of Subscriptions APIs +The table below provides the list of various Subscriptions APIs and their brief description: + +API | Description +--- +[Create a Plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/create-plan.md) | API to create a plan. +--- +[Fetch all Plans](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/fetch-all-plans.md) | API to fetch all the created plans. +--- +[Fetch a Plan by ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/fetch-a-plan.md) | API to fetch a plan by its unique identifier. +--- +[Create a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/create-subscription.md) | API to create a Subscription. +--- +[Create a Subscription Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/create-subscription-link.md) | API to create a Subscription link. +--- +[Fetch All Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/fetch-subscriptions.md) | API to fetch all the created Subscriptions. +--- +[Fetch Subscription by ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/fetch-subscription-id.md) | API to allows fetch a Subscription details using its unique identifier. +--- +[Cancel a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/cancel-subscription.md) | API to cancel a Subscription. +--- +[Update a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/update-subscription.md) | API to update a Subscription. +--- +[Fetch Details of a Pending Update](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/fetch-pending-update-details.md) | API to fetch details about any update of a Subscription. +--- +[Cancel an Update](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/cancel-update.md) | API to cancel an update. +--- +[Pause a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/pause-subscription.md) | API to pause an active Subscription +--- +[Resume a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/resume-subscription.md) | API to resume a `paused` Subscription. +--- +[Fetch All Invoices for a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/fetch-invoices.md) | API to fetch all the generated invoices for a Subscription. +--- + +### Related Information + +- [Subscription Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/workflow.md) +- [Subscription States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) +- [Create Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md) +- [Test Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) diff --git a/llm-content/payments/subscriptions/create-add-ons.md b/llm-content/payments/subscriptions/create-add-ons.md new file mode 100644 index 00000000..6a0ed900 --- /dev/null +++ b/llm-content/payments/subscriptions/create-add-ons.md @@ -0,0 +1,55 @@ +--- +title: Create Add-ons +description: Create add-ons for Subscriptions from the Razorpay Dashboard. +--- + +# Create Add-ons + +Add-ons can be charged to your customers at any time during the life of a Subscription. Add-ons are typically charged for extra services taken by a customer during the billing cycle. + +### Example +Consider, Acme Corp. is providing DTH services. A customer wants to add the sports channel pack, which costs an additional , to his Subscription only for the next month. + +Before the next billing cycle, Acme Corp. can add to the customer's current bill amount as an add-on. + +Add-ons can be created: +- [Using APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#create-an-add-on). +- [Using the Dashboard](#create-add-ons-from-dashboard). + +> **WARN** +> +> +> +> **Watch Out!** +> +> - You can only add an Add-on to an upcoming invoice and not to the ones already created. +> - You can charge Add-ons for a single billing cycle only. They are not recurring in nature and will not automatically be added to any future invoices. +> + +## Create Add-ons From Dashboard + +Watch this video to see how to add add-ons to the Subscriptions. + +[Video: https://www.youtube.com/embed/GN9y853DO1Q] + +To create an add-on: +1. Log in to the Dashboard and click **Subscriptions** under **PAYMENT PRODUCTS** in the left menu. +1. Click on the **Subscription Id** for which you want to create an add-on. Details of the Subscription appear in the right pane. Click the next invoice listed under the **Invoices detail** section. +1. Click **+ Include Add-on**. +1. Enter the following details: + 1. **Name** for the add-on. + 1. **Description** for the add-on, this is optional. + 1. **Price per unit** for the add-on. This is in the same currency as the plan. + 1. **Quantity**, that is the number of times the customer wants to avail the add-on during the billing cycle. +1. Click **Include**. The add-on amount is added to the Subscription amount and the total is updated. + +## Create Add-on Using APIs +You can create add-ons for the Subscriptions using [Create an Add-on](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#create-an-add-on) API. + +### Related Information + +- [Create and view Plans](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-plans.md) +- [Create Subscriptions via Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md) +- [Charge a Card Manually](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/manually-charge-card.md) +- [Update a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/update.md) +- [Subscriptions Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/settings.md) diff --git a/llm-content/payments/subscriptions/create-plans.md b/llm-content/payments/subscriptions/create-plans.md new file mode 100644 index 00000000..4b00b22d --- /dev/null +++ b/llm-content/payments/subscriptions/create-plans.md @@ -0,0 +1,77 @@ +--- +title: Create and View Plans +description: Create a Subscription Plan and view a list of created plans. +--- + +# Create and View Plans + +You must create a Plan before you create a Subscription. + +> **INFO** +> +> +> +> **International Currency** +> +> Create the plan in the currency you want to charge the customer. You can select any one of our [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) to create a Plan. +> + +## Create a Plan + +You can create a Plan in two ways: [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-plans.md#create-a-plan-from-dashboard) and [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-plans.md#create-a-plan-using-apis) + +> **WARN** +> +> +> +> **Watch Out!** +> +> - Plans with `daily` frequency should have the interval set to a value greater than 7. +> - Once a Plan is created, you cannot edit or delete it. +> + +### Create a Plan From Dashboard + +Watch this video to see how to create a Plan from the Dashboard. + +[Video content] + +To create a plan: + +1. Log in to the Dashboard and click **Subscriptions** under **PAYMENT PRODUCTS** in the left menu. +2. Go to **Plans** and click **+ New Plan**. The **New Plan** window displays. +3. Enter the following details: + 1. **Plan Name:** Name of the plan. + 1. **Plan Description:** A brief description for the plan. This is an optional field. + 1. **Billing Frequency:** How often should the customer be charged. + 1. **Billing Amount:** Amount to be charged. Refer to the [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) page for information on currencies. + 1. **Internal Notes:** Any internal notes if required. +4. Click **Create Plan**. + +### Create a Plan Using APIs + +You can create a Subscription Plan using the [create a plan API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#create-a-plan). + +## View Plan Details + +You can view Plan details in two ways: [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-plans.md#view-plan-details-using-dashboard) and [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-plans.md#view-plan-details-using-api) + +### View Plan Details Using Dashboard + +To view Plan details: + +1. Log in to the Dashboard and click **Subscriptions** under **PAYMENT PRODUCTS** in the left menu. +2. Go to **Plans** and click on the required **Plan Id** to view its details. + +![](/docs/assets/images/view_plan_details.jpg) + +### View Plan Details Using API +- View all Plans using the [fetch all plans API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#fetch-all-plans). +- View a Plan with an id using the [fetch a plan by id API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#fetch-a-plan-by-id). + +### Related Information + +- [Create Subscriptions via Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md) +- [Charge a Card Manually](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/manually-charge-card.md) +- [Update a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/update.md) +- [Subscriptions Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/settings.md) diff --git a/llm-content/payments/subscriptions/create-subscription-links.md b/llm-content/payments/subscriptions/create-subscription-links.md new file mode 100644 index 00000000..a70ea15d --- /dev/null +++ b/llm-content/payments/subscriptions/create-subscription-links.md @@ -0,0 +1,104 @@ +--- +title: Create Subscriptions via Links +description: Create a Subscription link from the Razorpay Dashboard. +--- + +# Create Subscriptions via Links + +If you do not have a website or app, you can still create and send Subscriptions to customers using a link. When the customer opens the link, they are taken to a checkout page hosted by Razorpay, where they make the authorisation payment. You can also use this feature to create and send custom Subscriptions to customers. + +Subscription Links can be created from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md#create-a-subscription-link-from-dashboard) or using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md#create-a-subscription-link-using-api). + +## Subscriptions via Links Flow + +Below is a high-level overview of Subscriptions via links. + +To create a Subscriptions link from the Dashboard, you need to: +1. [Create a plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-plans.md#create-a-plan). +1. [Create and send a Subscription link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md#create-a-subscription-link). + +## Create a Subscription Link From Dashboard + +Watch this video to see how to create Subscription Links. + +[Video: https://www.youtube-nocookie.com/embed/PgvzuvbNQlM] + + +### To create a Subscription Link: + + 1. Log in to the Dashboard and click **Subscriptions** under **PAYMENT PRODUCTS** in the left menu. + 1. Click **+ Create New Subscription**. The **Create Subscription** screen displays. + 1. Select the required plan from the **Select Plan** drop-down list. + 1. Select the **Subscription Start Date**. + +> **INFO** +> +> +> **Trial Period** +> +> To create a trial period for your customers, all you need to provide is a future start date. The actual billing cycle automatically starts at the specified date, essentially creating a trial period. +> + + 1. Enter the **Total Count**. This defines how many times the customer should be charged (the number of billing cycles). + + +> **INFO** +> +> +> **Handy Tips** +> +> You can create a Subscription for a maximum of 30 years, and the **Total Count** differs depending on the selected plan. For example, If you select a monthly plan, the **Total Count** is calculated as per the below formula: +> +> *Monthly=>(Number of months in a year(12) * Number of Years supported (30)) / Interval (1 as every month in this example)* +> +> As per this formula, the **Total Count** for the monthly Subscription should be, *(12 * 30)/1 = 1200* +> + + 1. Select the required offer from the **Offer** drop-down and click **Next**. + 1. Select **I want to add an upfront amount**. + 1. Click the drop-down and click **+Create New Item**. The **Add Upfront Amount** screen appears in a pop-out window. + 1. Add the following details and click **Save**. + - **Name** + - **Rate per unit** + - **Description** (optional) + 1. You can add additional items using the **Add New Item** option. + 1. Click **Next** once you have added all items tagged as upfront amount. + + +> **INFO** +> +> +> **Handy Tips** +> +> - All the created add-on items display in the **Select Item to Add** drop-down. +> - The upfront amount and add-ons will have the same currency as the plan. +> + + 1. Enter the customer's mobile number and/or email address. + 1. Select the **Notify Customer** check box if you want Razorpay to automatically send the Subscription Link to the customer via email to make the authorisation payment. + 1. Set an expiry date for the link. + 1. Add internal notes, if required. + 1. Click **Next** once you have entered all the required details. + + +> **INFO** +> +> +> **Handy Tips** +> +> If the **Notify Customer** check box is **not** selected, Razorpay does not send the customer the Subscription Link to make the authorisation payment. +> + + 1. Review the details and click **Create Subscription Link** to send the link to the customer. + + +## Create a Subscription Link Using API + +You can create a Subscription Links using [Create a Subscription Link API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/create-subscription-link.md). + +### Related Information + +- [Create and View Plans](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-plans.md) +- [Charge a Card Manually](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/manually-charge-card.md) +- [Update a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/update.md) +- [Subscriptions Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/settings.md) diff --git a/llm-content/payments/subscriptions/create.md b/llm-content/payments/subscriptions/create.md new file mode 100644 index 00000000..a3e152bf --- /dev/null +++ b/llm-content/payments/subscriptions/create.md @@ -0,0 +1,85 @@ +--- +title: Create Subscriptions +description: Create Razorpay Subscriptions and Plans for your customers. Set the Trial Period and Upfront Amount. +--- + +# Create Subscriptions + +Use the following steps to create Subscriptions for your customers: + +1. [Create a Plan](#plan) +2. [Create a Subscription](#subscription) + +## 1. Create a Plan + +A Plan is a foundation on which a Subscription is built. It acts as a reusable template and contains details of the goods or services offered with the amount to be charged and the frequency at which the customer should be charged (billing cycle). Depending upon your business, you can create multiple Plans with different billing cycles and pricing. + +You should create a Plan before creating a Subscription. You can create Plans from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-plans.md#create-a-plan) or using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/create-plan.md). + +> **INFO** +> +> +> +> **International Currencies** +> +> You can create a Plan using any of the [supported currencies.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies) +> + +## 2. Create a Subscription + +A Subscription contains details like the Plan, the start date, total number of billing cycles, free trial period (if any) and upfront amount to be collected. + +Subscriptions can be created from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md#create-a-subscription-link) or using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/create-subscription.md). + +### Trial Period + +You can create a fully-customised trial period of Subscriptions that does not have to follow the typical 1-week or 1-month trial template. + +To create a trial period for your customers, provide a future start date when creating the Subscription. The actual billing cycle automatically starts at the specified date, creating a free trial period. + +**Example** + +1. Acme Corp. provides video streaming services and wants to offer a 1-month free trial. +2. The customer selects the Plan on March 5, 2025 and completes the **authentication transaction**. +3. During the authentication transaction, Acme Corp. creates a Subscription with start date of April 5, 2025. +4. Now, although the authentication transaction was done on March 5, 2025, the customer’s card will be charged only from April 5, 2025. +5. The customer or the business can decide to cancel the Subscription at any time before that. The time between March 5, 2025 and April 5, 2025 is treated as the trial period. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - When creating a Subscription link from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md#create-a-subscription-link-from-dashboard), you can add a trial period by setting the start date to any future date. +> - When creating a Subscription or a Subscription link using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/create-subscription-link.md), you can add a trial period by passing a future start date in the `start-at` parameter. +> + +### Upfront Amount + +There might be scenarios where you want to charge the customers an extra amount either at the start of the Subscription or even before the Subscription starts. For example, you might want to charge the customer a delivery fee or a setup fee. You can add this to the Subscription as an upfront amount as part of the authentication transaction. + +**Example** + +1. Acme Corp. provides furniture on rent. +2. Acme Corp. charges as security deposit. This needs to be collected before the furniture is delivered. +3. While creating a Subscription for the customer, Acme Corp. adds an upfront amount of . +4. When the customer subscribes to the service (during authentication transaction), is collected from the customer. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - When creating a Subscription link from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md#create-a-subscription-link-from-dashboard), you can add an upfront amount by selecting the **I want to add an upfront amount** check box and following the instructions on screen. +> - When creating a Subscription or a Subscription link using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/create-subscription-link.md), you can add an upfront amount by passing an `addons` key in the request. +> + +### Related Information + +- [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) +- [Subscriptions Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/workflow.md) +- [Subscriptions States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) +- [Test Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/test.md) +- [Subscriptions APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/apis.md) diff --git a/llm-content/payments/subscriptions/faqs.md b/llm-content/payments/subscriptions/faqs.md new file mode 100644 index 00000000..c07d0542 --- /dev/null +++ b/llm-content/payments/subscriptions/faqs.md @@ -0,0 +1,1313 @@ +--- +title: Payments | Subscriptions - FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Subscriptions and Subscription links. +--- + +# Frequently Asked Questions (FAQs) + +## General + + +### 1. How does two-factor authentication (2FA) work with Subscriptions? + + The first transaction needs to go through the 2FA process. Further charges can be made automatically, without 2FA. + + + + Methods | Authorisation + --- + Debit cards | OTP/3D secure + --- + Credit cards | OTP/3D secure + --- + UPI | UPI PIN + --- + Emandate | NetBanking + --- + + + + +### 2. One of my customers received the following SMS from their bank: `Your trx is debited to xxxx Bank CREDIT Card for Rs. xx.xx. This is not an authenticated trx as per RBI Mandate effective 1 May 12.` What is this? + + Some customers may receive such messages from the bank for subscription transactions. However, there is no need to worry about it as this communication is for information only. We assure you that all transactions on Razorpay are authorised as per RBI compliance. + + + +### 3. How long can a Subscription remain active? + + We support Subscriptions for a maximum duration of 100 years. The number of billing cycles depends if the subscription is billed daily, weekly, monthly or yearly. + + + +### 4. Which ecommerce plugins support Subscriptions? + + The plugins that support subscriptions are Woocommerce, Magento and OpenCart. + + + +### 5. The order status remains "Pending Payment", even after a successful Razorpay payment. Why is WooCommerce not updating my subscription payments? + + Follow the links given below to integrate with WooCommerce Subscription plugin: + - [Subscriptions plugin for WooCommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/woocommerce.md) + - [Subscriptions plugin for WooCommerce Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/woocommerce/build-integration.md) + + If you have already followed the integration steps in the above links and the problem still persists, Reach out to our [Support team](https://razorpay.com/support/) with the versions of both Razorpay and WooCommerce plugin that you are currently using. + + + +### 6. Is WooCommerce Subscriptions plugin dependent on the Razorpay WooCommerce plugin? What are the compatible versions? + + Yes, the WooCommerce Subscriptions plugin depends on the Razorpay WooCommerce plugin. The WooCommerce Subscriptions plugin is fully compatible with Razorpay WooCommerce plugin equal to or greater than v2.4, including the latest v3.0 release. Know more about [plugin dependencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/woocommerce.md#plugin-dependencies). + + + +### 7. Why am I unable to use Add-ons? + + You are unable to use the Add-Ons feature since it is deprecated. + + +## Plans + + +### 1. Can I update or delete a Plan? + + No. You cannot update or delete a Plan. You should create a new Plan. Alternatively, you can duplicate and modify an existing Plan as per your requirements. + + To duplicate a Plan: + 1. Log in to the Dashboard and click **Subscriptions** under **PAYMENT PRODUCTS** in the left menu. + 2. Go to **Plans** and click on the required **Plan Id**. + 3. Click the **Duplicate Plan** icon in the top-right corner of the pop-up, as shown in the screenshot below. + ![Plan duplicate option on Subscription plan duplicate page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/subscription_plan_duplicate.jpg.md) + 4. Edit the plan details as required and click **Create Plan**. + + +## Capture Payments + + +### 1. Do I need to capture the authorisation payment used to validate a customer's card or UPI ID? + + No. You do not need to capture the token authorisation payment used to validate a customer's card or UPI ID. This amount is auto-refunded to the customer. + + + +### 2. Do I need to capture the Subscription payments made by customers? + + No. You do not need to capture payments made for a Subscription. Upfront amount and subsequent charges are auto-captured. + + +> **WARN** +> +> +> **Watch Out!** +> +> The payment will not be captured if you cancel the Subscription before it gets authorised. +> + + + +## Update Subscriptions + + +### 1. Can I update the plan amount or duration of Subscription when it is live? + + Yes. You can update details such as the plan amount, duration and quantity of a Subscription, even if it is live. Refer to the [Update Subscription section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/update.md) for more details. + + +> **WARN** +> +> +> **Watch Out!** +> +> You can only update a Subscription authorised using cards and not via UPI and Emandate. +> + + + + +### 2. When can I update a Subscription? + + You can only update a Subscription when it is in `authenticated` and `active` states. There is no state change when you update a Subscription. Know about [Updating a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/update.md). + + + +> **WARN** +> +> +> **Watch Out!** +> +> You can only update a Subscription authorised using cards and not via UPI and Emandate. +> + + + + +## Pause Subscriptions + + +### 1. Who can pause a Subscription? + + This depends on the payment method used for the subscription. Given below is payment method-wise information on who can pause subscription. + + + Method | Business | Customer + --- + Debit Cards | ✓ | x + --- + Credit Cards | ✓ | x + --- + UPI | ✓ | ✓ + --- + Emandate | ✓ | x + --- + + + +> **WARN** +> +> +> **Watch Out!** +> +> For UPI Subscriptions, you cannot resume a Subscription paused by your customer. If your customer pauses a Subscription, only they can resume it. +> + + + + +### 2. Can all Subscriptions be paused? + + Subscriptions in the `active` state can be paused. You cannot pause a Subscription in any other state. Refer to the [life cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) section for more details. + + + +### 3. How can I pause a Subscription? + + You can pause a Subscription: + - [From the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/pause-resume-cancel.md#pause-subscription-via-the-dashboard). + - [Using APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#pause-a-subscription). + + + +### 4. How can my customer pause a Subscription? + + Your customer can pause Subscriptions authorised via UPI from their UPI app. + + +## Resume Subscriptions + + +### 1. Who can resume a Subscription? + + + + This depends on the payment method used for the subscription. Given below is payment method-wise information on who can resume a subscription. + + Method | Merchant | Customer + --- + Debit Cards | ✓ | x + --- + Credit Cards | ✓ | x + --- + UPI | ✓ | ✓ + --- + Emandate | ✓ | x + --- + + + +> **WARN** +> +> +> **Watch Out!** +> +> For UPI Subscriptions, you cannot resume a Subscription paused by your customer. If your customer pauses a Subscription, only they can resume it. +> + + + + +### 2. How can I resume a Subscription? + + You can resume a Subscription: + - [From the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/pause-resume-cancel.md#resume-subscription-via-the-dashboard). + - [Using APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#resume-a-subscription). + + + +### 3. Can I resume a Subscription paused by my customer? + + No. You cannot resume a Subscription paused by your customer. Only your customer can resume such Subscriptions. + + + +### 4. How can my customer resume a Subscription? + + Your customer can resume Subscriptions authorised via UPI from their UPI app. + + +## Cancel Subscriptions + + +### 1. Can I cancel a Subscription? + + Yes. You can cancel a Subscription: + - [From the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/pause-resume-cancel.md). + - [Using APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#cancel-a-subscription). + + + +### 2. Can my customer cancel a Subscription? + + Your customer can cancel only those subscriptions authorised via UPI from their UPI app. They should refer to their respective app's documentation for steps to cancel subscriptions. + + + +### 3. How can I know when my customer cancels a Subscription? + + You can set up the [subscription.cancelled](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/subscriptions.md#subscription-cancelled) webhook event to get a notification when your customer cancels their Subscription. Know more about [subscribing to a webhook event](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/subscribe-to-webhooks.md). + + +## Payment Methods + + +### 1. What payment methods are available for Subscriptions? + + The following payment methods are available for Subscriptions: + - Credit Cards + - Debit Cards + +> **WARN** +> +> +> **Watch Out!** +> +> Bank downtime can affect success rates when processing recurring payments via debit cards. +> + + - UPI (early access) + - Emandate (limited access) + + + +### 2. I want to enable customers to make payments through UPI only. How can I configure payment methods? + + Follow these steps to enable or disable payment methods (Cards and UPI): + 1. Log in to the Dashboard. + 2. Navigate to **Subscriptions** → **Settings**. + 3. Configure the payment methods: + - **Card**: Enable this to accept recurring payments via cards for your subscriptions in any of our supported international currencies. + - **UPI**: Enable this to accept UPI payments when recurring charge is less than ₹15,000. Only INR is supported. + - **eMandates (NetBanking)**: Enable this to accept recurring payments via Emandate (NetBanking) for your subscriptions. Only INR is supported. + + + +### 3. Which banks and apps support UPI Subscriptions? + + **Supported Applications** + + Below are the UPI applications and their handles that support UPI Autopay: + + **Frequently Used Applications** + + Below are some of the frequently used UPI applications and their handles: + + + + Applications | Handles ₹ 15,000 + --- + PhonePe | @ybl, @ibl and @axl | N/A + --- + GooglePay | @okhdfcbank, @okicici and @okaxis | @okhdfcbank, @okicici and @okaxis + --- + Paytm | @paytm | @paytm + --- + BHIM | @upi | N/A + --- + Amazon Pay | @apl and @yapl | @apl and @yapl + --- + IndusInd Bank App | @indus | N/A + + + **Other Applications** + + Below are the other UPI applications and their handles: + + + + Applications | Handles + --- + BHIM Axis Pay | @axisbank and @sliceaxis + --- + Bhim Baroda Pay | @barodampay + --- + BHIM BOI UPI | @boi + --- + BHIM DLB UPI | @dlb + --- + BHIM IndusPay | @indus + --- + Canara Bank | @cnrb + --- + iMobile Pay | @icici + --- + NSDL Payments Bank | @nsdl + --- + DakPay | @postbank + --- + MobiKwik | @ikwik + --- + Digibank | @dbs + --- + PayZapp | @pz + + + **Supported Banks** + + Refer to the [list of banks that support UPI Autopay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/supported-banks.md#supported-banks). + + + +### 4. Which are the intent-supported PSP apps? + + The below table gives information about the frequently used intent-supported PSP apps on different platforms and checkout integrations. + + **Standard Checkout Integration** + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | x | ✓ | ✓ + --- + PhonePe | ✓ | ✓ | ✓ + --- + Paytm | ✓ | ✓ | ✓ + --- + Amazon Pay | x | x | x + --- + BHIM | x | ✓ | x + --- + + + **Custom Checkout Integration** + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | x + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | x + --- + Amazon Pay | x | ✓ | x + --- + BHIM | x | ✓ | x + --- + + + **S2S Checkout Integration** + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | x + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | x + --- + Amazon Pay | ✓ | ✓ | x + --- + BHIM | ✓ | ✓ | x + --- + + + +> **WARN** +> +> +> **Watch Out!** +> +> - You should contact our [Support team](https://razorpay.com/support/#request) to enable UPI Intent on standard checkout. Watch this video on how to get it enabled. +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> - UPI Intent is not supported for @okaxis handle. +> + + + + +### 5. How do I enable or disable payment methods for Subscriptions? + + Contact our [support team](https://razorpay.com/support/) to enable or disable a payment method for Subscriptions. This cannot be done from the Dashboard. + + + +### 6. What do I do if a payment method is not available on my account? + + Contact our [support team](https://razorpay.com/support/) if a payment method is not available for Subscriptions on your account. + + +## Cards + + +### 1. Which banks are live on the cards, and what does this mean for businesses? + + Businesses like yours can onboard customers and process recurring payments through debit, credit and prepaid cards of the following banks from October 1, 2021. Customers can now sign up for Subscription plans using their card details easily. + + Refer to the [list of banks that support cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md#cards). + + +> **WARN** +> +> +> **Watch Out!** +> +> Please contact our support team if you are facing difficulties with card payments from any of the major banks on the above list. +> + + +> **INFO** +> +> +> **Handy Tips** +> +> We support Visa, Mastercard and RuPay cards from all major banks. +> + + + + +### 2. What happens when a customer tries to use the card details of banks that are not live? + + If a customer tries to enter card details of banks that are not live, an error message saying `Card does not support recurring payments` will be displayed, as shown below. + + ![Error message when card does not support recurring payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-mandatehq-error-sub.jpg.md) + + + +### 3. Will the existing subscription plans continue to work post September 30, 2021? + + We will migrate existing Subscription plans of City Union Bank (CUB), OneCard and Karur Vysya Bank by September 30, 2021. Wel will continue to process debits on such Subscription plans even after September 30, 2021. For banks that will go live after September 30, 2021, we will migrate the Subscription plans of such banks as and when they go live. + + +> **WARN** +> +> +> **Watch Out!** +> +> All of the Subscriptions that will be migrated are credit card based Subscriptions as debit cards of these banks were not enabled before. +> + + + + +### 4. What happens to debits of Subscriptions plans of banks that are not live by September 30, 2021? + + All the Subscription plans of banks that are not live will be moved to the `pending` state on their respective billing dates starting from October 1, 2021. We will notify your customers through email with the following options to activate the Subscription again: + + **Option 1:** Update with new card details of banks that are live. + + **Option 2:** Use UPI as the alternate payment method and register to re-activate the subscription. + + **Alternate Approach** - Register for a new Subscription + + In case you wish to reach out to your customers to sign up for new Subscriptions, you can do the following: + 1. Cancel all card-based Subscriptions, and the status will be moved to the `cancelled` state. + 2. Notify your customers about the cancelled Subscriptions and send new subscription links, and request them to register afresh using UPI or the cards of banks that are live. + + Refer to the [Subscriptions document](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) for more information. + + + +### 5. Are there any changes in turnaround time (TAT) for processing debits on Subscriptions? + + Starting October 1, 2021, we will initiate the debit on every Subscription 24 hours in advance. The respective banks will send a pre-debit notification to the customer’s registered mobile number or email ID. If the customer does not pause or cancel the Subscription, then the debit will be processed, and you will get the notification through a webhook or in the Dashboard. A sample pre-debit notification is given below for your reference: + + ![Sample pre-debit notification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-mandatehq-pre-debit.jpg.md) + + + +### 6. Are there any changes in APIs for processing card-based Subscriptions? + + No, there are no changes in APIs to process card-based Subscriptions. + + + +### 7. Is there a maximum monetary limit for processing card-based Subscriptions? + + For plans up to a maximum of ₹15,000, debits are processed without any intervention from customers. + + If you fall under the following merchant category codes, you can process plans up to ₹1,00,000 without any intervention from customers: + - Mutual Funds: 6211 + - Insurance: 6300, 6529, 5960 + - Credit Card Bill Payment: 6012, 5413 + + For all other businesses, plans above ₹15,000 require an Additional Factor Authentication (AFA) from customers for every subsequent debit of the Subscription plan. + + + +### 8. What is the new flow to process card-based Subscriptions under the new RBI guidelines? + + +> **INFO** +> +> +> **Handy Tips** +> +> All the steps mentioned below will be taken care of by Razorpay and banks. No additional effort is required from businesses and customers. +> + + To process debits of amounts below ₹15,000: + 1. Razorpay will initiate the debit 36 hours before the actual debit date. + 2. Bank will send a pre-debit notification SMS to the customer immediately. + 3. The amount will be debited 36 hours after the notification provided the customer does not pause or cancel the Subscription. + + To process debits of amounts above ₹15,000 (upto ₹1,00,000 for [certain merchant categories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md#supported-mccs)): + 1. Razorpay will initiate the debit 36 hours before the actual debit date. + 2. Bank will send a notification with a link for Additional Factor Authentication (AFA) to the customer immediately. The AFA link will be active for 72 hours. + 3. The amount will be debited once the customer provides AFA. + + The short animation below shows the customer side flow of giving consent through the AFA link. + + ![Customer flow for consent through AFA link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cards-mandatehq.gif.md) + + + +### 9. Are there any changes in processing debits for Subscriptions using international cards? + + No, there are no changes in processing debits for Subscriptions using international cards. The RBI guidelines apply only to domestic cards and not international cards. + + + +### 10. Can cardholders make changes to active Subscriptions? + + Yes, cardholders can pause, resume and cancel active Subscriptions from the portal provided by the bank to manage them. You will get notifications through multiple webhooks when a cardholder initiates any such changes to the Subscriptions. You can also see these changes in the Dashboard. + + + +### 11. What types of cards do Subscriptions support? + + - **Credit cards** from the following card networks issued by any bank in India. + - Mastercard + - Visa + - RuPay + - **Debit cards** on Mastercard, Visa and RuPay network issued by the following banks. + - ICICI Bank + - Kotak Mahindra Bank + - Citibank + - Canara Bank + + + +### 12. How do Subscriptions on Credit Cards work in India? + + Subscriptions are allowed on the following network credit cards provided the customer authorises the first transaction using 2FA authentication or 3D Secure. + - American Express + - MasterCard + - Visa + - RuPay + + + +### 13. How do Subscriptions work on Debit Cards work in India? + + Subscriptions are allowed on Mastercard, Visa and RuPay network cards issued by the following banks provided the customer authorises the first transaction using two-factor authentication or 3D Secure. + - Citibank + - Canara Bank + - ICICI Bank + - Kotak Mahindra Bank + + + +### 14. When is Card shown as a payment method on the checkout? + + Cards are always shown as a payment method for subscriptions. + + + + Method | Condition | Checkout + --- + Card | Plan amount + upfront amount ₹2,000. | ✓ + --- + Card | Authentication amount + upfront amount > ₹2,000. | ✓ + --- + + + + +### 15. Can I disable cards as a payment method on the checkout? + + Yes. You can disable cards as a payment method using the **Settings** feature on the **Subscriptions** tab. + + + +### 16. How long does it take to process card payments? + + + + Method | Payment | TAT Guidelines + --- + Card | authorisation payment | Real-time. + --- + Card | Subsequent charge | Real-time. + --- + + + + +### 17. Are all Subscription frequencies allowed when using Card as a payment method for Subscriptions? + + Yes. All the Subscription frequencies are allowed when using Card as a payment method for Subscriptions. + + + +### 18. Are there any restrictions when using Card as a payment method for Subscriptions? + + No. There are no restrictions when using Card as a payment method for Subscriptions. + + + +### 20. Can I display the MandateHQ summary screen before the bank page while making a transaction? + + Yes, you can display the MandateHQ summary screen by enabling the **Show Mandate Summary Page for Cards** option from the Dashboard. + + To enable the option: + + 1. Log in to the Dashboard and click **Account & Settings** in the left menu. + 2. Click **Mandate summary page** under **Checkout settings**. + ![Mandate summary page option under Checkout settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/mandate_settings.jpg.md) + 3. Enable the **Show Mandate Summary Page for Cards** option. + ![Enable show Mandate Summary Page for cards option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/show_mandate_cards_rp.jpg.md) + + + +### 21. How do I enable Rupay Card support to collect recurring payments? + + We are doing a beta rollout for recurring payments via Rupay cards. This beta phase will include an on-demand enablement. You should reach out to your POCs to get this enabled. + + Also alternatively, we will choose a set of merchants to enable this feature and inform them through the POCs. + + + +### 22. Is any additional integration required to enable RuPay? + + No. If you have already integrated Razorpay Subscriptions or CAW for Visa and Mastercard cards, no additional changes or integrations are required to enable RuPay cards. This applies to all cases, whether you are integrated on Standard Checkout, Custom Checkout, or S2S (server-to-server integrations). + + + +### 23. What banks support recurring payments via RuPay cards? + + RuPay SI requires payment processors/aggregators and banks to work with NPCI to enable the support. NPCI is continuously working with more banks to support recurring payments on RuPay cards. Refer to the [Supported Banks and Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md#cards) document for the list of supported banks. + + + +### 24. Are the 2021 RBI guidelines for recurring payments on cards applicable to RuPay cards? + + Yes. The 2021 RBI guidelines apply to all cards issued in India across network schemes, including RuPay cards. + + + +### 25. Is tokenisation of cards required for RuPay SI flows? + + Yes. The card needs to be tokenised during the mandate registration to process subsequent payments on the respective mandate. In all cases, Razorpay will act as an on-behalf token requestor for the business while tokenising the card with the RuPay network. + + + +### 26. Are there any differences in functionalities/use cases supported via RuPay compared to Visa and Mastercard cards? + + Yes. As SI on RuPay is NPCI's new product, they continuously work to cover an exhaustive set of use cases from an ecosystem standpoint. However, RuPay card recurring is supported for all businesses' extensive and fundamental use cases. Below are the use cases not supported currently: + - **Mandate registration with saved card**: This is live for NPCI and Razorpay. + - **Debits greater than 15K**: Initial or subsequent debits greater than 15,000 INR are not allowed for RuPay card recurring transactions. NPCI is working to enable this shortly. + - **Pre-debit Notification with the same amount on a given mandate**: Currently, NPCI does not support the functionality of raising multiple pre-debits with the same amount simultaneously on a mandate. After a pre-debit notification for a given amount is raised on a mandate, the next pre-debit with the same amount will override the previous pre-debit notification. Hence, the next pre-debit with the same amount should only be raised after the debit is successfully done against the previous pre-debit notification or after the previous pre-debit notification expires(T+3 days to expire, where T is the debit date specified). + + +## UPI + + +### 1. I have already integrated with Razorpay Subscriptions. Do I need to make changes to my Integration to accept UPI payments for Subscriptions? + + There are no changes to the existing APIs. However, there is a new API to pause Subscriptions that you will have to add to your integration. + + + +### 2. Which banks and apps support UPI Subscriptions? + + **Supported Applications** + + Below are the UPI applications and their handles that support UPI Autopay: + + **Frequently Used Applications** + + Below are some of the frequently used UPI applications and their handles: + + + + Applications | Handles ₹ 15,000 + --- + PhonePe | @ybl, @ibl and @axl | N/A + --- + GooglePay | @okhdfcbank, @okicici and @okaxis | @okhdfcbank, @okicici and @okaxis + --- + Paytm | @paytm | @paytm + --- + BHIM | @upi | N/A + --- + Amazon Pay | @apl and @yapl | @apl and @yapl + --- + IndusInd Bank App | @indus | N/A + + + **Other Applications** + + Below are the other UPI applications and their handles: + + + + Applications | Handles + --- + BHIM Axis Pay | @axisbank and @sliceaxis + --- + Bhim Baroda Pay | @barodampay + --- + BHIM BOI UPI | @boi + --- + BHIM DLB UPI | @dlb + --- + BHIM IndusPay | @indus + --- + Canara Bank | @cnrb + --- + iMobile Pay | @icici + --- + NSDL Payments Bank | @nsdl + --- + DakPay | @postbank + --- + MobiKwik | @ikwik + --- + Digibank | @dbs + --- + PayZapp | @pz + + + **Supported Banks** + + Refer to the [list of banks that support UPI Autopay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/supported-banks.md#supported-banks). + + + +### 3. Which are the intent-supported PSP apps? + + The below table gives information about the frequently used intent-supported PSP apps on different platforms and checkout integrations. + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | x | ✓ | ✓ + --- + PhonePe | ✓ | ✓ | ✓ + --- + Paytm | ✓ | ✓ | ✓ + --- + Amazon Pay | x | x | x + --- + BHIM | x | ✓ | x + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | x + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | x + --- + Amazon Pay | x | ✓ | x + --- + BHIM | x | ✓ | x + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | x + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | x + --- + Amazon Pay | ✓ | ✓ | x + --- + BHIM | ✓ | ✓ | x + --- + + + + + +> **WARN** +> +> +> **Watch Out!** +> +> - You should contact our [Support team](https://razorpay.com/support/#request) to enable UPI Intent on standard checkout. Watch this video on how to get it enabled. +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> - UPI Intent is not supported for @okaxis handle. +> + + + + +### 4. Is there a limit on the debit amount in UPI? + + For UPI, the maximum amount for any one transaction is ₹1,00,000, and for BFSI (Banking, Financial Services and Insurance) merchants, it is ₹2,00,000. + + + +### 5. When is UPI shown as a payment method on the checkout? + + UPI is shown on the checkout in the following cases: + + + + Method | Condition | Checkout + --- + UPI | Plan amount + upfront amount ₹15,000. | x + --- + UPI | Authentication amount + upfront amount > ₹15,000. | x + --- + + + + +### 6. How long does it take to process UPI payments? + + + + Method | Payment Type | TAT Guidelines + --- + UPI | Authorisation Payment | Real-time. + --- + UPI | Subsequent Charge | All UPI Autopay auto-debits are processed and completed by 9:00 PM IST on the scheduled debit date. ***** + + + ***** Due to [payment retries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md#retry-model-for-upi), this may extend to T+1. + + + +### 7. Can I disable UPI as a payment method on the checkout? + + Yes. You can disable UPI as a payment method using the **Settings** feature on the **Subscriptions** tab. + + + +### 8. Can I update a Subscription authorised via UPI? + + No. Currently, you cannot update a Subscription authorised via UPI. + + + +### 9. Can I create an additional charge for a Subscription authorised via UPI? + + No. Currently, this is not possible. + + + +### 10. Can I pause a Subscription authorised via UPI? + + Yes. You can pause a Subscription authorised via UPI. + + + +### 11. Can I cancel a Subscription authorised via UPI? + + Yes. You can cancel a Subscription authorised via UPI. + + + +### 12. Can my customer update a Subscription authorised via UPI? + + No. Currently, it is not possible to update a Subscription authorised via UPI. + + + +### 13. Can my customer cancel a Subscription authorised via UPI? + + Yes. Customers can manage, modify or cancel their mandates anytime directly from their UPI app ([Google Pay](https://support.google.com/pay/india/answer/10840624?hl=en-IN#zippy=%2Cunable-to-cancel-revoke-or-find-the-option-to-cancel-autopay%2Cfind-your-mandate-in-google-pay%2Ccant-find-autopay-section%2Crevoke-or-cancel-a-mandate), [Paytm](https://paytm.com/faqs/upi/how-to-cancel-upi-mandate), PhonePe and so on) or by contacting your business. Once cancelled, no further payments are processed. + + + +### 14. Can my customer pause a Subscription authorised via UPI? + + Yes. Your customers can pause a Subscription authorised via UPI from their UPI app. + + + +### 15. Can I charge UPI payments in international currencies? + + No. Currently, UPI only supports `INR` payments. + + + +### 16. Can my customers use UPI as the payment method for Subscriptions? + + Yes, your customer can use UPI as a payment method for Subscriptions. + + + +### 17. Are all subscription frequencies allowed for UPI Subscriptions? + + Yes, all frequencies are allowed when using UPI as a payment method. + + + +### 18. Are there any restrictions when using UPI as the payment method for Subscriptions? + + Yes. The maximum transaction amount allowed is ₹15,000 when using UPI as a payment method for Subscriptions. + + +> **INFO** +> +> +> **Handy Tips** +> +> For certain MCCs, the maximum amount limit for one transaction is ₹1,00,000. Refer to the [the list of supported MCCs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md#supported-mccs), issuing banks and PSP applications. +> + + + + +### 19. What is the supported amount limit on PSP applications? + + + + PSP apps | Mandate Maximum Amount ₹15,000 + --- + PhonePe | Yes | No + --- + GooglePay - okhdfcbank | Yes | Yes + --- + GooglePay - okaxis | Yes | Yes + --- + GooglePay - okicici | Yes | Yes + --- + GooglePay - oksbi | Yes | Yes + --- + BHIM | Yes | No + --- + Paytm | Yes | Yes + --- + Amazon Pay | Yes | Yes + + + + + +### 20. Is QR Code supported for UPI Autopay? + + Yes, [QR Code](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/qr-codes.md) is supported on Standard Checkout to collect Subscription payments. The customers can scan the QR using any PSP app and make the payment. + + + +### 21. I am getting an error message `Payment Failed. Please contact the site admin.` during the authentication transaction. Why? + + This error occurs when the amount of a plan exceeds the pricing plan configured to the business account for UPI. Ensure the minimum amount is greater than or equal to the configured pricing plan for UPI. + + + +### 22. Can I charge a UPI handle manually? + + No. You cannot charge a UPI handle manually. + + + +### 23. Can I restrict my customers from pausing and cancelling the mandate? + + Yes, you can restrict your customers from pausing and cancelling the mandate by enabling OC125 functionality. After enabling, the **Pause** and **Cancel** mandate buttons are not available on PSP apps as shown in the image below. + + ![Checkout with OC125 Enabled](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/upi_oc125.jpg.md) + + This functionality is supported only for lending businesses. Please contact our [Support team](https://razorpay.com/support/#request) for more information. + + + +### 24. Which are the intent-supported PSP apps for TPV? + + The below table gives information about the frequently used intent-supported PSP apps for TPV on different platforms and checkout integrations. + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | ✓ + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | ✓ + --- + Amazon Pay | x | ✓ | x + --- + BHIM | x | ✓ | x + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | ✓ + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | ✓ + --- + Amazon Pay | x | ✓ | x + --- + BHIM | x | ✓ | x + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | x + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | x + --- + Amazon Pay | ✓ | ✓ | x + --- + BHIM | ✓ | ✓ | x + --- + + + + + +> **WARN** +> +> +> **Watch Out!** +> +> - You should contact our [Support team](https://razorpay.com/support/#request) to enable PSP apps other than PhonePe and Paytm on Standard Checkout for UPI TPV. Watch this video on how to get it enabled. +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> - UPI Intent TPV is not supported for @okaxis handle. +> + + + +## Emandate + + +### 1. What is Emandate? + + Similar to Cards, Emandate is a digital payment service that can be used to set up recurring payments for Subscriptions on your bank account. With Emandate, you can provide standard instructions to your issuing bank, allowing them to debit the mentioned amount from your bank account automatically. + + + +### 2. How do I enable Emandate as a payment method on the checkout? + + Emandate is automatically enabled for you on the **Settings** page, and hence there are no additional steps required to enable it. + + + +### 3. Can I disable Emandate as a payment method on the checkout? + + Yes. You can disable Emandate as a payment method from the **Settings** page on the **Subscriptions** tab. + + + +### 4. Which banks have enabled Subscription through Emandate? + + Currently, Subscription through Emandate is available for a few banks. Refer to the [Supported Banks and Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md) page for more information. + + + +### 5. Is there a maximum amount limit per debit request for Emandate? + + You can set the maximum amount while initiating registrations for your customers. The maximum amount varies depending on the authentication mode using which customers want to set up the mandate. + + If you do not set a limit for the mandate, the maximum limit defaults to ₹1,00,00,000 for Emandates. + + **For Emandates via NPCI** + + The following table lists the auth types and their maximum limit allowed for Emandates via NPCI. + + + **Auth Type** | **Maximum Allowed Limit** | Default Allowed limit(if no max amount mentioned) + --- + Netbanking | ₹1,00,00,000 | ₹1,00,00,000 + --- + Debit Card | ₹1,00,00,000 | ₹1,00,00,000 + --- + Aadhaar | ₹1,00,00,000 | ₹1,00,00,000 + + + **For Emandates - Direct bank integration (SBI, ICICI, Axis)** + + The following table lists the auth types and their maximum limit allowed for Emandates - Direct bank integration (SBI, ICICI, Axis). + + + **Auth Type** | **Maximum Allowed Limit** | Default Allowed limit(if no max amount mentioned) + --- + Netbanking | ₹1,00,00,000 | ₹1,00,00,000 + + + **For Emandates - Direct bank integration (HDFC)** + + The following table lists the auth types and their maximum limit allowed for Emandates - Direct bank integration (HDFC). + + + **Auth Type** | **Maximum Allowed Limit** | Default Allowed limit(if no max amount mentioned) + --- + Netbanking | ₹1,00,000 | ₹1,00,000 + + + + +### 6. The Subscription state is still `created` and not `active`, even after paying the registration payment. Why? + + The Subscription changes to `active` when both registration and subsequent payments are made. This is a bank constraint as the payment and registration cannot happen on the same day. The update on this may take T+1 days. If the payment still fails, the Subscription remains in the `created` state. + + + +### 7. Does the charge happen on bank holidays? + + No. If the charge day (T) is a bank holiday, we will charge on T-1 days. Similarly, if the charge day (T) and the previous day (T-1) are bank holidays, we will charge on T-3 days. This process will not affect your charge cycle for the subsequent months. + + + +### 8. Can my customer pause or cancel a Subscription that is authorised via Emandate? + + No, your customer cannot pause or cancel a Subscription that is authorised via Emandate. However, they can directly contact the bank and cancel a Subscription, and the subsequent payment will fail for such Subscriptions. + + + +### 9. The payment was supposed to happen on Day T. However, I have neither got a payment update nor the Subscription status changed to `subscription.pending`. Why? + + Occasionally Emandate payment may get delayed from the bank side. You would get an update in 1 to 2 days, and the Subscription status will be changed accordingly. + + + +### 10. How can I modify or edit a mandate that has already been created? + + You cannot modify or edit a mandate that has already been created. In this case, you need to create a new mandate for the user if any changes need to be made. + + + +### 11. Which authentication type is supported for the Aadhaar based authentication? + + Razorpay supports eSign as an [authentication type](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md#emandate) for the Aadhaar authentication. + + +## Offers + + +### 1. When can I link an offer to a Subscription? + + You can link an offer to a Subscription when creating the Subscription of after it has gone live. + + know more about [Subscription Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers.md). + + + +### 2. Do I have to link an offer to a Subscription when creating the Subscription? + + You can link an offer to a Subscription when creating the Subscription of after it has gone live. + + + +### 3. How do I link an offer to a Subscription? + + You can link an offer to a Subscription either using our APIs or from the Dashboard. + + Know more about [Subscription Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers.md). + + + +### 4. Can I link an offer to a Subscription using APIs? + + You can link an offer to a Subscription either using our APIs or from the Dashboard. + + Know more about [Subscription Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers.md). + + + +### 5. Can I link an offer to a Subscription from the Dashboard? + + You can link an offer to a Subscription either using our APIs or from the Dashboard. + + Know more about [Subscription Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers.md). + + + +### 6. Can I link an offer to a Subscription after it has gone live? + + Yes. You can [link an offer to a Subscription after it has gone live](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/link.md#link-offer-to-an-existing-subscription). + + + +### 7. Can I upgrade a Subscription when it has an offer linked to it? + + Yes. You can upgrade a Subscription even it has an offer linked to it. However, you cannot downgrade a Subscription when an offer is linked to it. + + To downgrade the Subscription, you will have to remove the offer linked to it, downgrade the Subscription and then reapply the offer to it. + + + +### 8. Can I downgrade a Subscription when it has an offer linked to it? + + No. You cannot downgrade a Subscription when an offer is linked to it. + + To downgrade the Subscription, you will have to remove the offer linked to it, downgrade the Subscription and then reapply the offer to it. + + + +### 9. What state should the Subscription be in to link an offer to it? + + To link an offer to a Subscription it should be in the active state. + + + +### 10. What state should a subscription be in to remove an offer to it? + + You can remove an offer linked to a Subscription in any state. Do remember that invoices generated after the offer is removed will be charged in full. + + +## International Payments + + +### 1. Can I accept Subscription payments in currencies other than INR? + + Yes. You can accept Subscription payments in any of the [supported currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + +> **INFO** +> +> +> **Handy Tips** +> +> Only card payments support international currencies. UPI payments do not support international currencies. +> + + + + +### 2. In what currency are international payments settled? + + Settlements are always made in `INR`. The payment is converted using the exchange rate at the time of payment creation. + + Refer to our [International Payments page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md) for more details. diff --git a/llm-content/payments/subscriptions/glossary.md b/llm-content/payments/subscriptions/glossary.md new file mode 100644 index 00000000..686616d6 --- /dev/null +++ b/llm-content/payments/subscriptions/glossary.md @@ -0,0 +1,23 @@ +--- +title: Payments | Subscriptions - Glossary +heading: Glossary +description: List of all the commonly used terms related to Razorpay Subscriptions. +--- + +# Glossary + +The following table lists all the commonly used terms and their definitions used in Subscriptions: + +Terms | Description +--- +Plan | A Plan is like a reuseable template where you define what should be billed, for what price and when. You can then have multiple customers subscribe to a Plan. +For example, you can define a Plan for to be charged monthly or another Plan for to be charged yearly. You can define multiple Plans and call them Basic, Intermediate, Pro and so on. +--- +Subscription | When a customer subscribes to a Plan, it is called a Subscription. Subscription defines the date at which the customer wants to subscribe to the Plan (start date) and for how long (duration). You can also create Subscriptions with a trial period and an upfront amount. +--- +Trial Period | A period where the customer can avail the service or goods you offer without paying for it. The trial period is offered to the customer once they complete the authorisation transaction. You can create a fully-customized trial period that does not have to follow the typical 1-week or 1-month trial period. +--- +Upfront Amount | You can charge customers an upfront amount as part of the authentication transaction. If a Subscription or a Subscription link is created with an upfront amount, the customer is charged an extra amount during the authentication transaction. +--- +Authentication Transaction | The authentication transaction is a 3D secure authentication step before recurring payments are charged on your customer's card. It is an approval process from the customer who is subscribing to a Plan and also a way to validate the card to which a Subscription would be charged on a periodic basis. The authentication transaction is an RBI-mandate for all recurring payments in India. There are two ways to obtain an authentication transaction for Subscriptions: - Via your checkout + - Sending the customer a link that will direct them to a Razorpay hosted page to make the payment diff --git a/llm-content/payments/subscriptions/integration-guide.md b/llm-content/payments/subscriptions/integration-guide.md new file mode 100644 index 00000000..2dcbe5fe --- /dev/null +++ b/llm-content/payments/subscriptions/integration-guide.md @@ -0,0 +1,247 @@ +--- +title: Integrate With Subscriptions +description: Step-by-step guide on how to integrate Razorpay Subscriptions. +--- + +# Integrate With Subscriptions + +Check the prerequisites and steps to integrate Razorpay Subscriptions: + +## Prerequisites + +- Create a Razorpay account. +- Log in to the Dashboard and [generate the API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). You need to use these keys while using our APIs and Checkout. + +## Integration Steps + +Follow these steps to integrate Razorpay Subscriptions: + + - **1. Build Integration**: Create Plan, Subscription and integrate with Standard Checkout. + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + +### 1. Build Integration + +Follow these steps to create plans, subscriptions and accept payments from customers. + + +### Step 1.1 Create a Plan + + A Plan is a foundation on which a Subscription is built. It acts as a reusable template and contains details of the goods or services offered with the amount to be charged and the frequency at which the customer should be charged (billing cycle). Depending on your business, you can create multiple Plans with different billing cycles and pricing. + + - Create a Plan before creating a Subscription using your checkout. + - Create Plans from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-plans.md#create-a-plan) or using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/create-plan.md). + + + +### Step 1.2 Create a Subscription + + A Subscription contains details like the Plan, the start date, total number of billing cycles, free [trial period](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md#trial-period) (if any) and [upfront amount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md#upfront-amount) to be collected. + + Subscriptions can be created from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md#create-a-subscription-link-from-dashboard) or using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/create-subscription.md). + + + +### Step 1.3 Integrate With Standard Checkout + + After you create a Subscription, you need the customer's permission to charge their card at periodic intervals. For this, the customer has to complete an authentication/authorisation transaction. + + #### Authentication Transaction + + You can collect the authorisation transaction by passing the subscription_id along with the other options to the Razorpay Standard Checkout. + + Once the authorisation transaction is successful, Razorpay returns the `razorpay_payment_id`, `razorpay_subscription_id` and the `razorpay_signature`. + + + + Code to Add Pay Button + + + Use the sample code to initiate Razorpay Standard Checkout. Check the [list of checkout parameters](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#123-checkout-options). + + ```js: Checkout with Callback URL + Pay + + + var options = { + "key": "key_id", + "subscription_id": "sub_00000000000001", + "name": "Acme Corp.", + "description": "Monthly Test Plan", + "image": "/your_logo.jpg", + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { + "name": "", + "email": "", + "contact": "" + }, + "notes": { + "note_key_1": "Tea. Earl Grey. Hot", + "note_key_2": "Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e) { + rzp1.open(); + e.preventDefault(); + } + + ```js: Checkout with Handler function + Pay + + + var options = { + "key": "key_id", + "subscription_id": "sub_00000000000001", + "name": "Acme Corp.", + "description": "Monthly Test Plan", + "image": "/your_logo.jpg", + "handler": function(response) { + alert(response.razorpay_payment_id), + alert(response.razorpay_subscription_id), + alert(response.razorpay_signature); + }, + "prefill": { + "name": "", + "email": "", + "contact": "" + }, + "notes": { + "note_key_1": "Tea. Earl Grey. Hot", + "note_key_2": "Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e) { + rzp1.open(); + e.preventDefault(); + } + + ```json: Failure response + { + "code": "BAD_REQUEST_ERROR", + "description": "Payment failed. Please contact the site admin", + "source": "business", + "step": "payment_initiation", + "reason": "amount_less_than_minimum_amount", + "metadata":{ + }, + "field": "amount" + } + ``` + + + +### Failure Reasons and Next Steps + + + + + Error | Cause | Solution + --- + Customer payment is not allowed for the Subscription at this stage. | This error occurs when you are trying to make a payment for the next billing cycle during the current cycle. | Users cannot pay for the next billing cycle during the current cycle. + --- + Payment failed. Please contact the site admin. | This error occurs when the amount of a plan exceeds the pricing plan configured to the business account for UPI. | Ensure the minimum amount is greater than or equal to the configured pricing plan for the respective payment method, such as UPI recurring. + --- + `end_time` must be between `946684800` and `4765046400`. | This error occurs when the end date of the Subscription is beyond the acceptable limits or if the current start and end are null. | Currently, you can only charge a Subscription for up to 10 years. + --- + Oops! Something went wrong. Please contact the merchant for further assistance. | - This error occurs when Flash Checkout is not enabled on the Dashboard. +- This error also occurs if the `subscription_id` is in the cancelled/expired state. + | - Ensure that flash checkout is enabled on the Dashboard by navigating to Dashboard → Account & Settings → [Flash Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/checkout-features.md#flash-checkout). +- Ensure that the Subscription is in the authenticated or active state. + + + + + + + + + + +### Payment Verification + + This is a mandatory step that allows you to confirm the authenticity of the card details returned to the Checkout form for successful payments. + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + + Parameter | Description + --- + `subscription_id` | Retrieve the subscription_id from your server. Do not use the razorpay_subscription_id returned by Checkout. + --- + `razorpay_payment_id` | Returned by Checkout. + --- + `key_secret` | Available in your server. The key_secret that was generated from the Dashboard. + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `subscription_id` to construct an HMAC hex digest as shown below: + + ```html: Code + generated_signature = hmac_sha256(razorpay_payment_id + "|" + subscription_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + + + + +### 2. Test Integration + +You can test the integration by making a test payment using our cards: + +Type | Card Network | Card Type | Card Number | CVV | Expiry Date +--- +Domestic | Mastercard | Debit Card | 5104 0600 0000 0008 | Random CVV | Any future date. +--- +Domestic | Visa | Credit Card | 4718 6091 0820 4366 | Random CVV | Any future date. +--- +International | Mastercard | Credit Card | 5104 0155 5555 5558 | Random CVV | Any future date. + +### 3. Follow Go-live Checklist + +Consider the following steps before taking your integration live. + + +### Switch Test API Keys With Live API Keys + + After confirming if your integration is working successfully, you can take the integration live by switching the Test Mode API Keys with the Live Mode Keys. + + + Watch this video to know how to generate Live API keys: + + +[Video: https://www.youtube.com/embed/30REpNtYSak?si=j9Lm_y-D4bwTspv6] + + + + + +### Subscribe to Webhooks + + [Set up Razorpay Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Subscribe to these [Subscriptions webhook events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/subscribe-to-webhooks.md#webhook-events-and-descriptions). + + +## Best Practices + +Follow the best practices for a smooth Subscriptions integration. +- [Verify Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/integration-guide.md#payment-verification): Verify the received payments to confirm the authenticity of the mandate details returned to the Checkout form for successful payments. +- [Implement Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/integration-guide.md#subscribe-to-webhooks): Implement Razorpay Webhooks to receive notifications on various events of Subscriptions. + +### Related Information + +- [Subscriptions API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md) +- [Razorpay Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md) diff --git a/llm-content/payments/subscriptions/manually-charge-card.md b/llm-content/payments/subscriptions/manually-charge-card.md new file mode 100644 index 00000000..5f7b1dba --- /dev/null +++ b/llm-content/payments/subscriptions/manually-charge-card.md @@ -0,0 +1,31 @@ +--- +title: Charge a Card Manually +description: Manually charge a card for Razorpay Subscriptions from the Razorpay Dashboard. +--- + +# Charge a Card Manually + +If one or more auto-charge attempts fail, you will receive a webhook notification. Know more about [webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/subscriptions.md). In such scenarios, you can manually charge the card linked to the Subscription from the Dashboard. Until a successful charge is made, the invoice will be in the `issued` state. + +> **WARN** +> +> +> **Watch Out!** +> +> Manual charging of a domestic card is not supported. +> + +## Manually Charge a Card From Dashboard + +To manually charge a card: + +1. Log in to the Dashboard and click **Subscriptions** under **PAYMENT PRODUCTS** in the left menu. +1. Click the **Subscription Id** in the `pending` state that is to be charged. +1. Click the invoice in the `issued` state and click **Attempt Charge**. Alternatively, you can click **Attempt Charge** against the invoice in the `issued` state on the details panel. + +### Related Information + +- [Create and View Plans](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-plans.md) +- [Create Subscriptions via Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md) +- [Update a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/update.md) +- [Subscriptions Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/settings.md) diff --git a/llm-content/payments/subscriptions/notifications.md b/llm-content/payments/subscriptions/notifications.md new file mode 100644 index 00000000..c136fbd2 --- /dev/null +++ b/llm-content/payments/subscriptions/notifications.md @@ -0,0 +1,60 @@ +--- +title: Subscriptions | Notifications +heading: Notifications +description: Check the types of notifications available for Subscriptions, how they work and the steps to set up webhook events. +--- + +# Notifications + +There are three types of notifications for Subscriptions: Email, SMS and Webhook notifications. + +## Email and SMS + +Your customers will receive an email and SMS at various events such as: + +- The start of the Subscription. +- When a payment is successfully charged. +- When a payment fails. +- Action required by the customer in the event of a payment failure +- When the card linked to a Subscription is changed or updated. +- When a Subscription is moved to the `halted` state post 3 retry attempts of payment failure. +- When a Subscription is cancelled. +- When the details of a Subscription (such as plan, quantity or billing frequency) are updated. + +### Types of Emails and SMS + +Razorpay sends emails and SMS to customers at 8 different stages during the life cycle of a Subscription. + +Stage | Description +--- +`Created`| An email and SMS is sent when you create and send a new Subscription link to a customer to make the authentication payment. The authenticated amount depends on the `upfront_amount` for the Subscriptions. +--- +`Initialized`| An email and SMS is sent after the customer successfully makes the authentication payment. +--- +`Charged Successfully`| An email and SMS is sent when we make a successful automated charge on the Subscription as per the billing cycle. +--- +`Completed` | An email and SMS is sent to the customer when the Subscription moves to the `completed` state. There is no notification sent if the Subscription moves to the same state. This is because the Subscription is already in the `completed` state, and a charge was made on an older invoice. +--- +`Charged Failed`| An email and SMS is sent when a charge on a card fails. When an automated charge on a Subscription fails, we retry an auto-charge on the card. If the retries are not exhausted, the Subscription moves to the `pending` state. We send out a notification (email and SMS) every time the Subscription moves to the `pending` state. The email and SMS contains an **Update Card** option for the customer to change the card details associated with the Subscription. +--- +`Card Updated` | An email and SMS is sent whenever a customer changes the card details associated with the Subscription. This notification notifies the customer that their new card details are now successfully updated. +--- +`Invoice Charge`| An email and SMS is sent when a manual charge is made on an old Subscription invoice (either by you or the customer). If the Subscription was in the `halted` state, we also mention that the Subscription is now `active`, and we will resume the automated charges from the next cycle onwards in the notification. +--- +`Halted`| When an automated charge on a Subscription fails, we retry an auto-charge on the card. When all the retries are exhausted, it moves to the `halted` state. We send out a notification (email and SMS) every time the Subscription moves to the `halted` state. These notifications contain the **Update Card** option to change the card linked to the Subscription. +--- +`Cancelled`| An email and SMS is sent when the Subscription moves to the `cancelled` state. This happens because either you or your customer cancelled the Subscription. +--- +`Subscription Updated`| An email and SMS is sent when the Subscription is successfully updated. There is no state change when a Subscription is updated. + +## Webhooks + +Know more about [how to set up and subscribe to Subscriptions webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/subscribe-to-webhooks.md). + +### Related Information + +- [Subscription Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/workflow.md) +- [Subscription States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) +- [Create Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md) +- [Test Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/test.md) +- [Subscriptions APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/apis.md) diff --git a/llm-content/payments/subscriptions/offers.md b/llm-content/payments/subscriptions/offers.md new file mode 100644 index 00000000..cc5bb726 --- /dev/null +++ b/llm-content/payments/subscriptions/offers.md @@ -0,0 +1,168 @@ +--- +title: Subscriptions | About Offers +heading: About Offers +description: Check the Razorpay Subscription Offers available for your customers. +--- + +# About Offers + +You can use Subscription Offers to provide discounts or cashback on Subscriptions. This attracts more customers, retains existing customers and increases sales. You have complete control over the offers you provide to your customers, such as the payment methods on which the Offer should be applied, maximum number of customers who can avail the offers and define the time of offers. + +## How it Works + +You can create and apply offers for Subscriptions in 3 easy steps: +1. [Create an Offer from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/create.md). +1. [Create a Plan for the Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-plans.md#create-a-plan). +1. [Link the Offer to a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/link.md). + +After you create a Subscription with an Offer, customers can select the offer when making the payment, and it is applied immediately. + +![](/docs/assets/images/subscriptions-offers-offers_preview_checkout.jpg) + +## How are Discounts Calculated + +There are 2 types of discount calculations: +- [Percentage Discount Calculations](#percentage-discount-calculations) +- [Flat Discount Calculations](#flat-discount-calculations) + +### Percentage Discount Calculations + +Let us say you sell keto meals. + +- Plan amount = ₹1,000/month +- Quantity = 2 units +- Upfront amount (delivery fee) = ₹250/month +- Add-on (keto chips) = ₹250/month +- You offer a 10% discount up to ₹300. + +``` +Total amount = (Plan amount x Quantity) + Upfront Amount +Total amount = (₹1,000 x 2) + ₹250 +Total amount = 2,250 +Discount amount = Total amount x Discount percentage +Discount amount = ₹2,250 x 10% +Discount amount = ₹225 +``` + +### Flat Discount Calculations + +Let us say you sell keto meals. + +- Plan amount = ₹1,000/month +- Quantity = 2 units +- Upfront amount (delivery fee) = ₹250/month +- You offer a flat discount of ₹150. + +``` +Total amount = (Plan amount x Quantity) + Upfront Amount +Total amount = (₹1,000 x 2) + ₹250 +Total amount = 2,250 +Discount amount = ₹150 +``` + +## Subscription Offers States + +A Subscription Offer has 2 states: +- **Enabled**: The Offer is active and available to your customers. +- **Disabled**: The Offer is disabled and no longer available to your customers. + +![](/docs/assets/images/subscriptions-offers-offers_life_cycle.jpg) + +## Customise Subscription Offers + +There are 3 main parameters that you can use to customise and control Offers: **Subscription Offer Type**, **Discount Type** and **Payment Method**. You can also use **Other Parameters** to configure attributes, such as the start and end dates and the number of times the Offer can be used. + + +### Subscription Offer Types + + Following are the 3 types of offers you can create for Subscriptions: + + + Subscription Offer Type | Description + --- + Single Use | This is a one-time discount offered to the customer. + --- + Limited number of cycles | You can specify the number of cycles the Offer should be applied. + For example, you can apply an Offer for the first 3 cycles of a 12-month Subscription. + --- + Forever | The Offer is applied for the entire duration of the Subscription. + + + + +### Discount Type + + Following are the 2 types of discounts you can provide on Subscription Offers: + + + Discount Type | Description + --- + Flat | A flat discount is offered to the customer. + --- + Percentage | The discount offered is a percentage of the Subscription amount. + + + +> **WARN** +> +> +> **Watch Out!** +> +> Offers can only be applied if the chargeable amount after applying the Offer is greater than ₹1. +> + + + + +### Payment Methods + + Following are the 2 payment methods available for Offers on Subscriptions: + + + Payment Method | Description + --- + Card | Offers will be applied to Subscriptions paid using cards. The options available for cards are listed below: - **Card type**: Credit card, debit card or both. +- **Bank**: Card issuing bank. For example, HDFC Bank, Axis Bank. You can select 1 bank or all available banks. You cannot select multiple banks. +- **Network**: Card network. For example, Visa, RuPay. You can select 1 network or all available networks. You cannot select multiple networks. +- **Max Usage Per Card**: How many times a particular card be used to avail the Offer. +- **IINs**: The card IINs on which the Offer should be applied. You can enter multiple IINs separated by commas. + + --- + UPI | Offers will be applied to Subscriptions paid using UPI apps. + --- + + + + +### Other Parameters + + Following are the other parameters available to you when creating an Offer: + + + Parameter | Description + --- + Offer Name | A name for the Offer. This appears on the checkout. For example, **Monsoon Offer**. + --- + Display Text | A description of the Offer. This appears on the checkout. For example, **10% discount on all card payments**. + --- + Terms | Terms and conditions of the Offer. + --- + Starting On | The date and time from which the Offer will appear on the checkout. + --- + Expires On | The date and time at which the Offer will no longer appear on the checkout. + --- + On Payment Failure | What happens when an Offer validation (such as payment method) fails. You can:- Allow the customer to complete the payment without the Offer. +- Do not allow the payment to go through. + + --- + Max Usage | The number of time the Offer can be used. +For example, you can use this parameter to limit the Offer to the first 100 customers. + + + +### Related Information + +- [Create Subscription Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/create.md) +- [Link an Offer to a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/link.md) +- [Update an Offer Linked to a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/update.md) +- [Delete an Offer Linked to a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/delete.md) diff --git a/llm-content/payments/subscriptions/offers/create.md b/llm-content/payments/subscriptions/offers/create.md new file mode 100644 index 00000000..5d0b0245 --- /dev/null +++ b/llm-content/payments/subscriptions/offers/create.md @@ -0,0 +1,31 @@ +--- +title: Create Subscription Offers +description: Create and manage offers for Razorpay Subscriptions from the Razorpay Dashboard. +--- + +# Create Subscription Offers + +You can create offers only from the Dashboard. You can control the discounts you offer your customers, restrict the payment methods on which offers are applied and limit their usage to a defined time period. + +## Create Offers + +## Disable Offers + +In certain scenarios, you might want to disable an existing offer. When you disable an offer it is no longer available to your customers. + +> **INFO** +> +> +> **Handy Tips** +> +> Disabling an offer does not mean it is deleted from any subscriptions to which it is linked. It only means the offer will no longer be available to your customers. +> +> Know how to [delete an offer linked to a subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/delete.md). +> + +### Related Information + +- [About Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers.md) +- [Link an Offer to a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/link.md) +- [Update an Offer Linked to a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/update.md) +- [Delete an Offer Linked to a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/delete.md) diff --git a/llm-content/payments/subscriptions/offers/delete.md b/llm-content/payments/subscriptions/offers/delete.md new file mode 100644 index 00000000..7707fc8d --- /dev/null +++ b/llm-content/payments/subscriptions/offers/delete.md @@ -0,0 +1,91 @@ +--- +title: Delete an Offer Linked to a Subscription +description: Remove an Offer from a Subscrition using Dashboard or APIs. +--- + +# Delete an Offer Linked to a Subscription + +You can delete an Offer linked to a Subscription from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/delete.md#delete-an-offer-linked-to-a-subscription-from) or using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/delete.md#delete-an-offer-linked-to-a-subscription-using). The invoices generated after the offer is deleted will be charged in full. + +## Delete an Offer Linked to a Subscription From Dashboard + +To delete an Offer linked to a Subscription: + +1. Log in to the Dashboard and click **Subscriptions** under **PAYMENT PRODUCTS** in the left menu. +1. Click on the **Subscription Id** for which you want to update the offer. +1. Click **Remove** against Offer. + +> **WARN** +> +> +> **Watch Out!** +> +> The offer will be removed from the Subscription only at the end of the cycle. It is not possible to remove an offer linked to a Subscription immediately. +> + +1. Click **Yes, Remove**. + + +## Delete an Offer Linked to a Subscription Using APIs + +Use the [Delete an offer Linked to a Subscription API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/delete-offer.md). + +```curl: Curl +curl -u [YOUR_KEY_ID]:YOUR_KEY_SECRET] \ +-X DELETE https://api.razorpay.com/v1/subscriptions/sub_00000000000001/offer_JHD834hjbxzhd38d \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String subscriptionId = "sub_00000000000001"; + +String offerId = "offer_JHD834hjbxzhd38d"; + +Subscription subscription = razorpay.subscription.deleteSubscriptionOffer(subscriptionId, offerId); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->subscription->fetch($subscriptionId)->deleteOffer($offerId) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.subscriptions.deleteOffer(subscriptionId, offerId) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.subscription.delete_offer(subscriptionId, offerId) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +subscriptionId = "sub_00000000000001" + +offerId = "offer_JHD834hjbxzhd38d" + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Subscription.DeleteOffer("", "", nil, nil) + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +string subscriptionId = "sub_I3GGEs7Xgmnozy"; + +string offerId = "offer_JCTD1XMlUmzF6Z"; + +Subscription subscription = client.Subscription.Fetch(subscriptionId).DeleteOffer(offerId); +``` + +### Related Information + +- [About Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers.md) +- [Create Subscription Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/create.md) +- [Link an Offer to a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/link.md) +- [Update an Offer Linked to a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/update.md) diff --git a/llm-content/payments/subscriptions/offers/link.md b/llm-content/payments/subscriptions/offers/link.md new file mode 100644 index 00000000..bae06494 --- /dev/null +++ b/llm-content/payments/subscriptions/offers/link.md @@ -0,0 +1,67 @@ +--- +title: Link an Offer to a Subscription +description: Link an Offer to a Subscription on the Razorpay Dashboard. +--- + +# Link an Offer to a Subscription + +After creating an Offer and a Subscription Plan, you need to link the Offer to a Subscription. + +- [Link an Offer while creating a Subscription](#link-an-offer-when-creating-a-subscription) +- [Link an Offer to an active Subscription](#link-an-offer-to-an-existing-subscription) + +You can also [delete an Offer linked to a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/delete.md). + +## Link an Offer While Creating a Subscription + +Watch this video to see how to link an Offer to a Subscription. + +[Video: https://www.youtube.com/embed/SoGr8jsfp24] + +You can link an Offer while creating a Subscription from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/link.md#link-an-offer-while-creating-a-subscription-from) or using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/link.md#link-an-offer-while-creating-a-subscription-using). + +> **WARN** +> +> +> **Watch Out!** +> +> Offers for Subscriptions are only available when using Razorpay Standard Checkout. +> + +### Link an Offer While Creating a Subscription From Dashboard + +You can link an Offer to a Subscription by selecting the required Offer using the **Offer** drop-down list when creating the Subscription. + +![link offer when creating a subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/subscriptions-offers-link_offer_when_creating_subscription.jpg.md) + +Know more about [Subscription Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md). + +### Link an Offer While Creating a Subscription Using APIs + +Use the [Link an Offer to a Subscription API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#link-an-offer-to-a-subscription). + +## Link an Offer to an Existing Subscription + +You can link an Offer to a Subscription or update the Offer linked to a Subscription from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/link.md#link-an-offer-to-an-existing-subscription-from) or using [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/link.md#link-an-offer-to-an-existing-subscription-using). + +- This is possible only if the Subscription is in the `active` state and not in any other state. +- The Offer is applied to the Subscription at the end of the current billing cycle. It is not possible to update an Offer linked to a Subscription immediately. + +### Link an Offer to an Existing Subscription From Dashboard + +You can link an Offer to an existing active Subscription by selecting the required Offer using the **Offer** drop-down when updating the Subscription. + +![link an offer to an existing active subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/subscriptions-offers-link_offer_to_existing_subscription.jpg.md) + +Know more about [updating a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/update.md). + +### Link an Offer to an Existing Subscription Using APIs + +Use the [Update a Subscription API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#update-a-subscription) to link an Offer to an existing active Subscription by passing the `offer_id: ` in the request body. + +### Related Information + +- [About Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers.md) +- [Create Subscription Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/create.md) +- [Update an Offer Linked to a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/update.md) +- [Delete an Offer Linked to a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/delete.md) diff --git a/llm-content/payments/subscriptions/offers/update.md b/llm-content/payments/subscriptions/offers/update.md new file mode 100644 index 00000000..136d401b --- /dev/null +++ b/llm-content/payments/subscriptions/offers/update.md @@ -0,0 +1,18 @@ +--- +title: Update an Offer Linked to a Subscription +description: Update an Offer linked to a Subscription from the Razorpay Dashboard. +--- + +# Update an Offer Linked to a Subscription + +You can link an Offer to a Subscription or update the Offer linked to a Subscription from the Dashboard. + +- It is possible to do this only if the Subscription is in the `active` state and not in any other state. +- The offer is applied to the Subscription only at the end of the current billing cycle. It is not possible to update an offer linked to a Subscription immediately. + +### Related Information + +- [About Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers.md) +- [Create Subscription Offers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/create.md) +- [Link an Offer to a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/link.md) +- [Delete an Offer Linked to a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/offers/delete.md) diff --git a/llm-content/payments/subscriptions/pause-resume-cancel.md b/llm-content/payments/subscriptions/pause-resume-cancel.md new file mode 100644 index 00000000..49ffd7a6 --- /dev/null +++ b/llm-content/payments/subscriptions/pause-resume-cancel.md @@ -0,0 +1,56 @@ +--- +title: Pause, Resume and Cancel a Subscription +description: Pause, resume or cancel a Razorpay Subscription from the Razorpay Dashboard. +--- + +# Pause, Resume and Cancel a Subscription + +You can [pause](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/pause-resume-cancel.md#pause-a-subscription-using-dashboard), [resume](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/pause-resume-cancel.md#resume-a-subscription-using-dashboard) and [cancel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/pause-resume-cancel.md#cancel-a-subscription-using-dashboard) a subscription from the Dashboard. + +## Pause a Subscription Using Dashboard + +To pause a subscription from your Dashboard: + +1. Log in to the Dashboard and click **Subscriptions** under **PAYMENT PRODUCTS** in the left menu. +2. Click the **Subscription Id** you want to pause. +3. Click **Pause Subscription**. The subscription is paused immediately. +4. Click **Yes, Pause**. + +## Resume a Subscription Using Dashboard + +To resume a subscription from your Dashboard: + +1. Log in to the Dashboard and click **Subscriptions** under **PAYMENT PRODUCTS** in the left menu. +2. Click the **Subscription Id** you want to resume. +3. Click **Resume Subscription**. The subscription is resumed immediately. +4. Click **Yes, Resume**. + +## Cancel a Subscription Using Dashboard + +> **INFO** +> +> +> +> **Hand Tips** +> +> +> You can either cancel the subscription immediately or at the end of the current billing cycle. +> + +Watch the below video to know how to pause, resume and cancel a Subscription from the Dashboard. + +[Video content] + +To cancel a subscription from your Dashboard: + +1. Log in to the Dashboard and click **Subscriptions** under **PAYMENT PRODUCTS** in the left menu. +2. Click the **Subscription Id** you want to cancel. +3. Click **Cancel Subscription**. You can choose to either cancel the subscription immediately or at the end of the current billing cycle. +4. Click **Yes, Cancel**. + +### Related Information + +- [Create and View Plans](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-plans.md) +- [Create Subscriptions via Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md) +- [Charge a Card Manually](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/manually-charge-card.md) +- [Subscriptions Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/settings.md) diff --git a/llm-content/payments/subscriptions/payment-retries.md b/llm-content/payments/subscriptions/payment-retries.md new file mode 100644 index 00000000..98be1f6b --- /dev/null +++ b/llm-content/payments/subscriptions/payment-retries.md @@ -0,0 +1,268 @@ +--- +title: Payment Retries +description: Handle payment retries when an auto-charge fails for Razorpay Subscriptions. Check different failure scenarios and handle them using webhooks. +--- + +# Payment Retries + +Recurring payments for a Subscription are auto-debited based on the scheduled day that you defined. However, these payments could fail. + +## Reasons for Payment Failures + +- The card has expired. +- The bank has blocked the card. +- The customer's account has insufficient balance. +- The customer has cancelled the mandate from their end. + +## What Happens in Case of a Payment Failure + +Here is the Subscription flow if a payment fails: + +1. The Subscription will move to the `pending` state. +2. You are notified about it via our webhooks. We automatically retry the payment on the following day. + - We automatically charge the last invoice if the customer changes the card when the Subscription is in the `pending` state. + - If this charge is successful, the Subscription moves to the `active` state. +3. If the payment fails after all retries, the Subscription will move to the `halted` state. + - If the customer successfully changes the card details when a Subscription is in the `halted` state, it moves to the `active` state. Invoices for such Subscriptions are still created. However, we will not charge these invoices. You will have to charge them manually. + +> **INFO** +> +> +> +> **Handy Tips** +> +> This process will not affect the charge cycle for the subsequent months. +> + +### Notifications + +- If you have enabled the `subscription.pending` and `subscription.halted` webhook, you receive notifications every time a Subscription moves to one of the above-mentioned states. You can then decide to hold off the delivery of the service as per your business model. +- We also send an email to the customer notifying them about the payment failure. This email contains a link that the customer can use to change the card details associated with the Subscription. + +## Retry Model +Following is the retry model for Emandate, UPI and Cards: + + + In failure scenarios, we attempt to retry only when we get the confirmation or rejection of the last payment, as it may take more than 24 hours. + + Below is the retry model: + + 1. If the charge day (T) is a bank holiday, we will charge on T-1 days + 1. If the charge day (T) and the previous day (T-1) are bank holidays, we will charge on T-3 days. + + The customer can switch to a different payment method to continue with the payment process. + + + For UPI payments, below is the retry model: + + 1. Let T=0 be the charge day. On this day, we attempt the charge. + 1. If the charge fails, the subscription moves to the `pending` state, and we automatically reattempt the charge on T+1 day. + 1. If the charge fails again, we automatically reattempt the charge two more times on T+2 and T+3 days, respectively. + 1. If the charge still fails, the subscription moves to the `halted` state. + + The customer can switch to a different payment method to continue with the payment process. + + + In failure scenarios, we automatically retry the payment the next day without your interference. + In a T+3 days cycle, we will retry the payment thrice. That is, once every day for 3 days, excluding the date of the charge. If the payment fails on all retires, the Subscription moves to the `halted` state. + + Below is the retry model: + + 1. Let T=0 be the charge day. + 1. On T=0, we attempt to charge the card. + 1. If the charge fails, the Subscription moves to the `pending` state, and we automatically reattempt the charge on T+1 day. + 1. If the charge fails again, we automatically reattempt the charge two more times on T+2 and T+3 days, respectively. + 1. If the charge still fails, the Subscription moves to the `halted` state. + + The customer can switch to a different payment method to continue with the payment process. + + +## Handle Failed Charge (Cards) + +There are two ways to handle a failed charge: +- [Manually attempt to charge the same card](#manual-charge-on-same-card) +- [Change the card details associated with the Subscription](#change-card-linked-to-subscription) + +### Manual Charge on Same Card + +When an auto-charge fails, you can manually attempt to charge the invoice as long as the invoice is in the `issued` state. + +> **WARN** +> +> +> **Watch Out!** +> +> Manual charging of a domestic card is not supported. +> + +**Example** + +The customer's account might have an insufficient balance when you attempt to auto-charge. When they receive the payment failure email, they add money to their account and inform you about this. You can [attempt a manual charge on the invoice using the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/manually-charge-card.md). + +- If you have enabled the `subscription.pending` and `subscription.halted` webhook, you receive notifications every time a Subscription moves to one of the above-mentioned states. You can then decide to hold off the delivery of the service as per your business model. +- We also send an email to the customer notifying them about the payment failure. This email contains a link that the customer can use to change the card details associated with the Subscription. + +### Change Card Linked to Subscription + +1. When an auto-charge fails, we send the customer an email about the payment failure. This email has a link that the customer can use to change the card linked to the Subscription. +2. You can ask the customer to change the card linked to the Subscription. + + +### Change Card Using Checkout + + You can ask the customer to change the card details associated with the Subscription on your checkout using our APIs. Use the `subscription_card_change` parameter to control this feature: + + - 1 : Allow the customer to change the card details from your checkout + - 0 : Do not allow the customer to change the card details from your checkout + + + ```html: Checkout with handler function + Pay + + + var options = { + "key": "key_id", + "subscription_id": "sub_00000000000001", + "name": "Acme Corp.", + "description": "Monthly Test Plan", + "image": "/your_logo.jpg", + "subscription_card_change": true, + "handler": function(response) { + alert(response.razorpay_payment_id), + alert(response.razorpay_subscription_id), + alert(response.razorpay_signature); + }, + "prefill": { + "name": "", + "email": "", + "contact": "" + }, + "notes": { + "note_key_1": "Tea. Earl Grey. Hot", + "note_key_2": "Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e) { + rzp1.open(); + e.preventDefault(); + } + + ```html: Manual checkout with callback URL + Pay + + + var options = { + "key": "key_id", + "subscription_id": "sub_00000000000001", + "name": "Acme Corp.", + "description": "Monthly Test Plan", + "image": "/your_logo.jpg", + "subscription_card_change": true, + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { + "name": "", + "email": "", + "contact": "" + }, + "notes": { + "note_key_1": "Tea. Earl Grey. Hot", + "note_key_2": "Make it so." + }, + "theme": { + "color": "#F37254" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e) { + rzp1.open(); + e.preventDefault(); + } + + ``` + + + +> **INFO** +> +> +> +> **Handler Function vs Callback URL** +> +> +> Handler Function| Callback URL +> --- +> When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the checkout form. You need to collect these and send them to your server. | When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the callback URL. +> +> + + + + +### Update Payment Method on Our Hosted Page + + You can use our ready-made hosted page solution to handle payment failures when you attempt an auto-charge. Here is how the hosted page handles payment failure: + + + - The customer is notified via email about the payment failure. + + - The payment failure email contains a link that allows the customer to take further action on the failed payment. + + - Customers can either retry the payment on the same card or update the card details or change the payment method to UPI or Emandate (bank accounts) using the link. These actions are handled seamlessly by the hosted page. + + + + The following table lists the supported payment method change. + + + + Current Payment Method | Change to Card | Change to UPI | Change to Emandate + --- + Card | Yes | Yes | Yes + --- + UPI | Yes | No | No + --- + Emandate | Yes | No | No + + + - A sample hosted page is shown below: + + ![Sample hosted page for payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sub-update-payment-method.jpg.md) + + - After the customer clicks the **Update Payment Method** button, the checkout page appears as shown. The customer can choose a card (of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md)), UPI or Emandate (of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md#emandate)) to make the payment. If the payment is successful, the Subscription moves back to the `actived` state. + + ![Checkout page to update payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sub-select-payment-method.jpg.md) + + - Use the Dashboard status filter to search for `halted` and `pending` Subscriptions. You can send the Subscription link to the respective customers to clear dues and make those Subscriptions active. + + ![Sub Subscription links for halted and pending subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sub-subscription-link.jpg.md) + + + The following table lists the supported payment method change. + + + + Current Payment Method | Change to Card | Change to Wallet (Touch'n Go) + --- + Card | Yes | Yes + --- + Wallet (Touch'n Go) | Yes | Yes + + + + Use the Dashboard status filter to search for `halted` and `pending` Subscriptions. You can send the Subscription link to the respective customers to clear dues and make those Subscriptions active. + + + + + +### Related Information + +- [Subscription Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/workflow.md) +- [Subscription States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) +- [Create Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md) +- [Test Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/test.md) +- [Subscriptions APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/apis.md) diff --git a/llm-content/payments/subscriptions/plugins/magento.md b/llm-content/payments/subscriptions/plugins/magento.md new file mode 100644 index 00000000..feaa534e --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/magento.md @@ -0,0 +1,218 @@ +--- +title: Razorpay Subscriptions Plugin for Magento +description: Accept recurring payments on your Magento site using the Razorpay Subscription for Magento plugin. +--- + +# Razorpay Subscriptions Plugin for Magento + +You can now accept recurring payments on your Magento site using the Razorpay Subscriptions for Magento. This plugin is built on the Razorpay Subscriptions product and offers seamless integration, allowing you to create and sell subscription services on your website. + +Click the below button to download the Magento plugin. + +[Magento](https://github.com/razorpay/subscriptions-magento-plugin/releases) + +## Advantages +- Razorpay Subscription Plugin has a very quick and customer-friendly integration. +- There is no need to create Plans or Subscriptions using the Razorpay Dashboard or Razorpay APIs. All this can be done easily from your Magento Dashboard. +- Customers are not redirected from your website to make payments. +- You can accept recurring payments using Razorpay Subscription Plugin on your Magento website itself via Credit Card, Debit Card, Netbanking and UPI payment methods. + +## Plugin Dependencies + +You must have the following installed for the plugin to work: + +Platform/Plugin/Language | Version +--- +Magento | 2.3 or higher +--- +[Razorpay Magento PG plugin](https://github.com/razorpay/razorpay-magento) | 3.5 or higher +--- +[Razorpay Magento Subscriptions Plugin](https://github.com/razorpay/subscriptions-magento-plugin) | 1.0.0 +--- +PHP | 5.6.0 or higher +--- +php-curl | N/A + +## Prerequisites + +- Sign up for a Razorpay Account. +- Generate API Keys from the Dashboard. + +## Integration Steps + +To start accepting subscription payments using the plugin: + +On Your Magento Site: +1. [Install the Razorpay Subscriptions for Magento Plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/magento.md#install-the-razorpay-subscriptions-for-magento-plugin). +2. [Configure Magento Store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/magento.md#configure-magento-store). +3. [Create a Plan for a Subscription Product](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/magento.md#create-a-plan-for-subscription-product). +4. [Enable Subscriptions for your Product](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/magento.md#configure-your-product-for-subscriptions). +5. [Test it out - Sign up for a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/magento/test-it-out.md). + +### Install the Razorpay Subscriptions for Magento Plugin + +There are two methods to install the Razorpay Subscription for Magento plugin: +- Install with Composer +- Manual without Composer + +#### Install the Razorpay Module with Composer + +You can install the extension on your Magento store using the Composer Package Manager. + +Composer is an application-level package manager for the PHP programming language that provides a standard format for managing dependencies of PHP software and required libraries. + +To install the Razorpay module using the Composer Package Manager: + +1. Go to your installation root directory of Magento and execute the following command. + + ```php: Deploy Commands + composer require razorpay/subscriptions-magento-plugin + bin/magento module:enable Razorpay_Subscription + ``` + +2. Run the following command to check the installation status. + + ```php: Installation Status Commands + bin/magento module:status + ``` + +#### Install the Razorpay Module without Composer + +To install the Razorpay Subscriptions without the Composer Package Manager: + +1. Download the `code.zip` file from the [latest release](https://github.com/razorpay/subscriptions-magento-plugin/releases) and extract the zip. +2. Place the `code` folder in your `app` folder. If you are updating the Razorpay Subscriptions, replace or overwrite the existing `code` folder. +3. Enable and deploy the Razorpay module using the following commands. + +```php: Deploy Commands +bin/magento module:enable Razorpay_Subscription +bin/magento setup:upgrade +``` + +### Configure Magento Store + +To configure your Magento store for Razorpay: + +1. Log in to your [Magento store](https://business.adobe.com/products/magento/magento-commerce.html/). +2. Click **Stores** in the left menu and navigate to **Settings** → **Configuration**. + ![](/docs/assets/images/sub_config_magento_configuration.jpg) +3. Expand **Sales** in the left menu and click **Payment Methods**. + ![](/docs/assets/images/sub_config_magento_payment_meth.jpg) +4. Go to **Razorpay** in the **Payment Methods** page. +5. Enter your test mode [KEY_ID] and [KEY_SECRET]. These can be generated from your Dashboard. +6. Select the webhook events from the **Webhook Events** drop-down list to enable webhook notifications. +7. Select **Yes** from the **Enabled** drop-down list to enable the option to sell the Subscriptions. + ![](/docs/assets/images/sub_config_magento_enable_rzp.jpg) +8. Click **Save Config**. + +This activates your account in the Test Mode. You can use this account to make a few test payments to ensure a successful workflow. + +### Create a Plan for Subscription Product. + +To create a plan for a Subscription product: + +1. Log in to your [Magento store](https://business.adobe.com/products/magento/magento-commerce.html/). +2. Navigate to **Razorpay Subscription** → **Manage Plans**. + ![](/docs/assets/images/sub_magento_manage_palns.jpg) +3. Click **Add New Plan**. +4. Enter the all the required details. +5. Click **Save Plan**. + ![](/docs/assets/images/sub_magento_plan_save.jpg) + +> **WARN** +> +> +> **Watch Out!** +> +> +> You can enable or disable a plan only after it is created. +> +> ![](/docs/assets/images/sub_magento_enable_disable_plan.jpg) +> + +### Enable Subscriptions for your Product + +To configure your product for Subscription in the Magento store: + +1. Log in to your [Magento store](https://business.adobe.com/products/magento/magento-commerce.html/). +2. Navigate to **Catalog** → **Products**. + ![](/docs/assets/images/sub_magento_catalog_products.jpg) +3. Select any product you want to enable Subscription and go to **Subscription By Razorpay** section. +4. Enable the Subscription on the product level. You can select the Subscription mode. Following are the options available. + - **Subscription Only:** Customers will get an option of only a Subscription with a respective plan, and they will be unable to buy a product for one time. + ![](/docs/assets/images/sub_magento_sub_only.jpg) + - **With Subscription:** Customers will have both the option for buying a product once for all and a Subscription. + ![](/docs/assets/images/sub_magento_sub_one_time.jpg) +5. Click **Save** to save the product. + +#### Buy a Product on a Subscription Basis + +To buy a product on a Subscription basis: + +1. Go to your [Magento website](https://business.adobe.com/products/magento/magento-commerce.html/) and select the product which you have enabled for Subscription. +2. Select the **Subscribe to this product** option and select the Subscription frequency from the **Select Frequency** drop-down list. +3. Click **Add to Cart** to proceed. +4. After the product is added to your cart, the Subscription details will be shown in the cart and the mini cart. +5. Click **Proceed to Checkout** to proceed with the checkout. + +## Enable Webhooks + +You can set up a webhook from the Dashboard and configure separate URLs for live and test mode. + +> **INFO** +> +> +> **Handy Tips** +> +> For details of available events and sample payloads, refer to the [Webhook Events section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce/troubleshooting-faqs.md). +> + +### Setup Webhooks + +Watch this video to see how to set up a webhook. + +[Video: https://www.youtube.com/embed/Xiikw4_CcQk?si=b6kYHKIp1xikPrJZ] + +To set up webhooks: + +1. Log in to the Dashboard and navigate to **Accounts & Settings**. +2. Click **Webhooks** under **Website and app settings**. +3. Click the **+ Add New Webhook** button. + + ![Add a new webhooks button on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-1.jpg.md) +4. In the **Webhook Setup** pop-up page: + - Enter the **URL** where you want to receive the webhook payload when an event is triggered. We recommend using an HTTPS URL. + + +> **INFO** +> +> +> **Handy Tips** +> +> - You can set up to **30 URLs** to receive Webhook notifications. Webhooks can only be delivered to public URLs. +> - If your URL contains `razorpay` as a domain, you will not be able to add the URL and will receive an error. +> - If you attempt to save a localhost endpoint as part of a webhook setup, you will notice an error. Know more about [testing Webhooks on an application running on localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#application-running-on-localhost). +> + + + - Enter a **Secret** for the webhook endpoint. The secret is used to validate that the webhook is from Razorpay. Do not expose the secret publicly. Know more about [how to validate webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> - When setting up the webhook, specify a secret. Use this secret to validate that the webhook is from Razorpay. Entering the secret is optional but recommended. The secret should never be exposed publicly. +> - The webhook secret does not need to be the Razorpay API key secret. +> + + + + - In the **Alert Email** field, enter the email address to which the notifications should be sent in case of webhook failure. You will receive webhook related notifications like failures, deactivation and so on. + - Select the required events from the list of **Active Events**. + ![List of active webhook events on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-2.jpg.md) + +5. Click **Create Webhook**. After you set up a webhook, it appears on the list of webhooks. + ![List of webhooks on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhooks-list.jpg.md) +6. You can select the webhook and click **Edit** to make more changes. diff --git a/llm-content/payments/subscriptions/plugins/magento/manage.md b/llm-content/payments/subscriptions/plugins/magento/manage.md new file mode 100644 index 00000000..d751ef74 --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/magento/manage.md @@ -0,0 +1,63 @@ +--- +title: Manage Subscriptions +description: Reactivate, refund, cancel or put an existing Razorpay Subscription on hold for Magento plugin. +--- + +# Manage Subscriptions + +## Update the Subscription Product + +Razorpay Subscriptions plugin for Magento does not support updating an existing subscription product. + +Creating a new subscription product is recommended instead of updating an existing one. You cannot update the details of a subscription for a customer or upgrade or downgrade the subscription for them once it has gone live. + +If you modify the details of an existing subscription product on **WooCommerce** and make a test payment, it will appear as a **New Plan** on the . Hence, you must cancel the existing subscription and create a new one, and hereafter the customer will have to subscribe to the newly created subscription. + +When a subscription has been put on hold, you can use the **reactivate** option to restart the subscription once you successfully charge the customer's card. This changes the subscription status to **active** on the . Note that the **reactivate** button will only be displayed where the payment is not due. + +![](/docs/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-16.jpg) + +## Cancel a Subscription + +The `cancel` option is used to cancel the subscription altogether. You can cancel a subscription: + +- Immediately OR +- At the end of the current billing cycle + +Following are the steps to cancel a subscription: + +1. Navigate to **WooCommerce** → **Subscriptions**. +1. Hover over the subscription you want to put on hold and click **Cancel**. + +![](/docs/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-17.jpg) + +Once an existing subscription is cancelled, it cannot be restarted. + +![](/docs/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-18.jpg) + +## Pause a Subscription + +The `suspend` option is used to pause the subscription. + +When a store manager suspends a subscription, all payments will stop for the period the subscription is suspended. + +Following are the steps to pause a subscription: + +- Navigate to **WooCommerce** → **Subscriptions**. +- Hover over a subscription to see actions that can be performed on the subscription. +- To temporarily pause a subscription, click **Suspend**. + +## Resume a Subscription +The `reactivate` option is used to resume the subscription. + +When a subscription is reactivated, the payment schedule will continue as before the subscription was suspended. + +Following are the steps to pause a subscription: + +- Navigate to **WooCommerce** → **Subscriptions** +- Hover over a subscription to see actions that can be performed on the subscription. +- To resume a suspended subscription, click **Reactivate**. + +## Refund Subscription Amount + +You also need to mark the subscription as refunded on [WooCommerce in WordPress Dashboard](https://docs.woocommerce.com/document/woocommerce-refunds/#section-4) by selecting the **Refunded** option from the **Order Status** drop-down list. diff --git a/llm-content/payments/subscriptions/plugins/magento/status.md b/llm-content/payments/subscriptions/plugins/magento/status.md new file mode 100644 index 00000000..18268871 --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/magento/status.md @@ -0,0 +1,23 @@ +--- +title: Subscriptions | Magento | Subscription Status +heading: Subscription Status +description: Comparison between the states of Razorpay Subscriptions and Magento. +--- + +# Subscription Status + +## Understand the Subscription Status + +The subscription status names used by Razorpay and Magento are different. The table below shows the mapping between the subscription statuses names used by Razorpay and Magento. Refer to the Razorpay Subscriptions status flow [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md). + +Magento Subscription Status | Razorpay Subscription Status | Description +--- +Pending | Created | This is the initial status of the subscription before the authentication/first payment transaction is complete. +--- +Active | Authenticated, Active | This is the Subscription status once the payment transaction has been completed. +--- +On-hold | Pending | The subscription acquires this status when it has been suspended or halted. This is done when a charge on the customer's card is unsuccessful. +--- +Cancelled | Cancelled | The `cancel` option is used to cancel the subscription altogether. Once a subscription is cancelled, it cannot be restarted. +--- +Expired | Complete | The subscription acquires this status when the expiry period mentioned during the subscription creation comes to an end. diff --git a/llm-content/payments/subscriptions/plugins/magento/test-it-out.md b/llm-content/payments/subscriptions/plugins/magento/test-it-out.md new file mode 100644 index 00000000..2368ced3 --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/magento/test-it-out.md @@ -0,0 +1,41 @@ +--- +title: Test it out - Sign up for a Subscription +description: Make a test purchase of a Subscription on your Magento site without incurring any charges. +--- + +# Test it out - Sign up for a Subscription + +Let us sign up for a subscription to **GoFlicks PremiumWatch HD**. + +> **WARN** +> +> +> **Watch Out!** +> +> Use the Test API keys when testing the product so that no real money is used. +> + +1. In your Magento site, add the product to your cart and proceed to checkout. +2. The Razorpay Checkout pop-up appears. + + ![](/docs/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-6.jpg) + +Since this is a test transaction, you can choose to make it a success or failure. Let us make this transaction a success. + +![](/docs/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-7.jpg) + +## On the Magento Site + +### Customer View + +The order success screen appears. The subscription amount has not been charged to the card because of the 15 days trial period. Once the trial period is over, the subscription amount of ₹999 will be charged to the customer's card. + +An authentication charge of ₹5 is levied and is subsequently auto-refunded. + +![](/docs/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-9.jpg) + +Navigate to **My Account** → **My Subscriptions** to view the Subscription details. + +### Admin View + +As an **Admin**, you can view the subscription captured on the **Sales** → **Razorpay Subscription** page. diff --git a/llm-content/payments/subscriptions/plugins/magento/webhook-events.md b/llm-content/payments/subscriptions/plugins/magento/webhook-events.md new file mode 100644 index 00000000..c6317e3e --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/magento/webhook-events.md @@ -0,0 +1,424 @@ +--- +title: Subscriptions | Magento - Webhook Events +heading: Webhook Events +description: Check the webhook payloads for events relevant to Magento Plugin for Razorpay Subscriptions. +--- + +# Webhook Events + +Webhooks (Web Callback, HTTP Push API or Reverse API) automatically notify your application when specific events occur. Instead of continuously polling APIs to check for updates, webhooks push notifications directly to your server when events happen. + +## Webhooks vs APIs + +Here is how webhooks compare to traditional API polling: + +Aspect | APIs | Webhooks +--- +**Data retrieval** | Pull-based (you request) | Push-based (we send) +--- +**Timing** | On-demand | Near real-time when events occur +--- +**Resource usage** | Requires polling | Event-driven, efficient + +## How Razorpay Webhooks Work + +When you subscribe to webhook events, Razorpay sends an HTTP POST request with JSON payload to your configured endpoint URL whenever those events are triggered. + +Suppose you have subscribed to the `order.paid` webhook event, you will receive a notification every time a user pays you for an order, in the configured endpoint URL. + +### Use Cases + +There can be multiple uses for webhook events. Two of these are listed below. + + +### Capturing Late Authorised Payments + + Capturing payments for which you did not receive a response on the client-side is perhaps the most important use case for the `payment.authorized` event. + + Sometimes, the communication between the bank and Razorpay or between you and Razorpay may not occur. This could be because of a slow network connection or your customer closing the window while processing the payment. This could lead to a payment being marked as **Failed** on the Dashboard but changed to **Authorized** at a later time. Know more about [late authorisation of payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md). + + You can use webhooks to get notified about payments that get authorised and analyse this data to decide whether to capture the payment or not. + + + +### Notifications on Failed Payments + + When a payment attempted by your customer fails, we receive the failed payment status from the bank. This payment gets recorded in our system as **Failed**. + + Suppose you have enabled the `payment.failed` webhook, you will receive a notification from us about the failed payment. You can then further analyse this payment and notify your customer about the failure. + + + +### Setup and Configuration + +- You can set up webhooks from your Dashboard and configure separate URLs for **Live** mode and **Test** mode. Know more about setting up [Payment webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) and [Payout webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md). +- A **Test** mode webhook receives events for your test transactions. Know more about [testing webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). +- Webhook URLs must use ports **80** or **443** only. +- Ensure Razorpay webhook IPs are whitelisted on your server. Even if your server accepts all incoming requests, webhooks may still be blocked by cloud security groups or network configurations. Refer to [Razorpay IPs and Certificates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#webhook-ips) for the complete list of webhook IP addresses. + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + +Currently, webhooks are available for the following events: + +Webhook Event | Description +--- +`payment.authorized` | Sent when the authorisation payment has been made for the Subscription. A nominal amount is charged to validate the card details and is then automatically refunded. +--- +`order.paid` | Triggered when an order is successfully paid. +--- +`subscription.paused` | Sent when a Subscription is paused and moved to the `paused` state. +--- +`subscription.cancelled` | Sent when a subscription is cancelled and moved to the cancelled state. +--- +--- +`payment.failed` | Sent when the payment attempt for a Subscription fails. +--- +`subscription.cancelled` | Sent when a Subscription is cancelled and moved to the `cancelled` state. +--- + +## Webhook Sample Payloads + +> **INFO** +> +> +> **Handy Tips** +> +> The payload for all these events would contain the Subscription entity. They would also contain a payment entity if a payment attempt was made before the event was triggered. +> + +### payment.authorized + +```JSON: Payload Sample +{ + "entity":"event", + "account_id":"acc_DDiURNtiQ5kFsb", + "event":"payment.authorized", + "contains":[ + "payment" + ], + "payload":{ + "payment":{ + "entity":{ + "id":"pay_DGoUVWeFLKKacL", + "entity":"payment", + "amount":6000, + "currency":"INR", + "status":"authorized", + "order_id":"order_DGoUOaUvWLGnEO", + "invoice_id":"inv_DGoUOZNF6uGBcA", + "international":false, + "method":"upi", + "amount_refunded":0, + "refund_status":null, + "captured":false, + "description":"Order 251", + "card_id":null, + "bank":null, + "wallet":null, + "vpa":"123@upi", + "email":"gaurav.kumar@example.com", + "contact":"+919999999998", + "customer_id":"cust_DG44HEGMbfRm1N", + "token_id":"token_DG4GL5OAv8tSYE", + "notes":{ + "magento_order_id":"", + "merchant_quote_id":"36" + }, + "fee":null, + "tax":null, + "error_code":null, + "error_description":null, + "error_source":null, + "error_step":null, + "error_reason":null, + "acquirer_data":{ + "rrn":"001000100002", + "upi_transaction_id":"npci_txn_id_for_IilTQTf37sXXNX" + }, + "created_at":1641976110 + } + } + }, + "created_at":1641976110 +} +``` + +### order.paid + +```JSON: Sample Payload +{ + "entity":"event", + "account_id":"acc_FzO2PyLE5ZYkW8", + "event":"order.paid", + "contains":[ + "payment", + "order" + ], + "payload":{ + "payment":{ + "entity":{ + "id":"pay_IilTQTf37sXXNX", + "entity":"payment", + "amount":6000, + "currency":"INR", + "base_amount":6000, + "status":"captured", + "order_id":"order_IilT1yadIMdg9b", + "invoice_id":"inv_IilT1w4sLgP3s2", + "international":false, + "method":"upi", + "amount_refunded":0, + "amount_transferred":0, + "refund_status":null, + "captured":true, + "description":null, + "card_id":null, + "bank":null, + "wallet":null, + "vpa":"123@upi", + "email":"roni_cost@example.com", + "contact":"+1234567890", + "customer_id":"cust_IilSzuBJCNvrsu", + "token_id":"token_IilTQiLc4NU0je", + "notes":{ + "merchant_order_id":"", + "merchant_quote_id":"36" + }, + "fee":142, + "tax":22, + "error_code":null, + "error_description":null, + "error_source":null, + "error_step":null, + "error_reason":null, + "acquirer_data":{ + "rrn":"001000100002", + "upi_transaction_id":"npci_txn_id_for_IilTQTf37sXXNX" + }, + "created_at":1641976110 + } + }, + "order":{ + "entity":{ + "id":"order_IilT1yadIMdg9b", + "entity":"order", + "amount":6000, + "amount_paid":6000, + "amount_due":0, + "currency":"INR", + "receipt":null, + "offer_id":null, + "status":"paid", + "attempts":1, + "notes":[ + + ], + "created_at":1641976087 + } + } + }, + "created_at":1641976113 +} +``` + +### subscription.charged + +```JSON: Sample Payload +{ + "entity":"event", + "account_id":"acc_FzO2PyLE5ZYkW8", + "event":"subscription.charged", + "contains":[ + "subscription", + "payment" + ], + "payload":{ + "subscription":{ + "entity":{ + "id":"sub_IilT1Ob70FQPp3", + "entity":"subscription", + "plan_id":"plan_IilSFBnjkbmBuP", + "customer_id":"cust_IilSzuBJCNvrsu", + "status":"active", + "current_start":1641976110, + "current_end":1644949800, + "ended_at":null, + "quantity":1, + "notes":{ + "source":"magento-subscription", + "magento_quote_id":"36" + }, + "charge_at":1644949800, + "start_at":1641976110, + "end_at":1657045800, + "auth_attempts":0, + "total_count":6, + "paid_count":1, + "customer_notify":false, + "created_at":1641976086, + "expire_by":null, + "short_url":null, + "has_scheduled_changes":false, + "change_scheduled_at":null, + "source":"magento-subscription", + "payment_method":"upi", + "offer_id":null, + "remaining_count":5 + } + }, + "payment":{ + "entity":{ + "id":"pay_IilTQTf37sXXNX", + "entity":"payment", + "amount":6000, + "currency":"INR", + "status":"captured", + "order_id":"order_IilT1yadIMdg9b", + "invoice_id":"inv_IilT1w4sLgP3s2", + "international":false, + "method":"upi", + "amount_refunded":0, + "amount_transferred":0, + "refund_status":null, + "captured":"1", + "description":null, + "card_id":null, + "bank":null, + "wallet":null, + "vpa":"123@upi", + "email":"roni_cost@example.com", + "contact":"+1234567890", + "customer_id":"cust_IilSzuBJCNvrsu", + "token_id":"token_IilTQiLc4NU0je", + "notes":{ + "merchant_order_id":"", + "merchant_quote_id":"36" + }, + "fee":142, + "tax":22, + "error_code":null, + "error_description":null, + "acquirer_data":{ + "rrn":"001000100002", + "upi_transaction_id":"npci_txn_id_for_IilTQTf37sXXNX" + }, + "created_at":1641976110 + } + } + }, + "created_at":1641976178 +} +``` + +### subscription.paused + +```JSON: Sample Payload +{ + "entity":"event", + "account_id":"acc_FzO2PyLE5ZYkW8", + "event":"subscription.paused", + "contains":[ + "subscription" + ], + "payload":{ + "subscription":{ + "entity":{ + "id":"sub_IilT1Ob70FQPp3", + "entity":"subscription", + "plan_id":"plan_IilSFBnjkbmBuP", + "customer_id":"cust_IilSzuBJCNvrsu", + "status":"paused", + "type":3, + "current_start":1641976110, + "current_end":1644949800, + "ended_at":null, + "quantity":1, + "notes":{ + "source":"magento-subscription", + "magento_quote_id":"36" + }, + "charge_at":null, + "start_at":1641976110, + "end_at":1657045800, + "auth_attempts":0, + "total_count":6, + "paid_count":1, + "customer_notify":false, + "created_at":1641976086, + "expire_by":null, + "short_url":null, + "has_scheduled_changes":false, + "change_scheduled_at":null, + "source":"magento-subscription", + "payment_method":"upi", + "offer_id":null, + "remaining_count":5, + "pause_initiated_by":"self", + "cancel_initiated_by":null + } + } + }, + "created_at":1641976696 +} +``` + +### subscription.cancelled + +```JSON: Sample Payload +{ + "entity": "event", + "account_id": "acc_FzO2PyLE5ZYkW8", + "event": "subscription.cancelled", + "contains": [ + "subscription" + ], + "payload": { + "subscription": { + "entity": { + "id": "sub_IilT1Ob70FQPp3", + "entity": "subscription", + "plan_id": "plan_IilSFBnjkbmBuP", + "customer_id": "cust_IilSzuBJCNvrsu", + "status": "cancelled", + "type": 3, + "current_start": 1641976110, + "current_end": 1644949800, + "ended_at": 1641976760, + "quantity": 1, + "notes": { + "source": "magento-subscription", + "magento_quote_id": "36" + }, + "charge_at": null, + "start_at": 1641976110, + "end_at": 1657045800, + "auth_attempts": 0, + "total_count": 6, + "paid_count": 1, + "customer_notify": false, + "created_at": 1641976086, + "expire_by": null, + "short_url": null, + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "magento-subscription", + "payment_method": "upi", + "offer_id": null, + "remaining_count": 5 + } + } + }, + "created_at": 1641976762 + } +``` diff --git a/llm-content/payments/subscriptions/plugins/opencart.md b/llm-content/payments/subscriptions/plugins/opencart.md new file mode 100644 index 00000000..5b553a48 --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/opencart.md @@ -0,0 +1,54 @@ +--- +title: Razorpay Subscriptions Plugin for OpenCart +description: Accept recurring payments on your OpenCart enabled site using the Razorpay Subscription for OpenCart plugin. +--- + +# Razorpay Subscriptions Plugin for OpenCart + +Integrate your Subscriptions plugin for [OpenCart](https://www.opencart.com/) with the Razorpay Payment Gateway. + +Click the below button to download the OpenCart plugin. + +[OpenCart](https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=38152&filter_search=razorpay) + +## Advantages +- Razorpay Subscriptions plugin provides a quick and customer-friendly integration. +- This plugin allows for refunds, works across all browsers and is compatible with the latest OpenCart 3.0.3.8. +- You can easily create and manage Subscriptions and get instant alerts on payment activity and the status of Subscriptions. +- You can accept recurring payments using Razorpay Subscriptions plugin on your OpenCart website via Credit Card, Debit Card, Netbanking and UPI payment methods. + +## Plugin Dependencies + +You must have the following installed for the plugin to work: + +Platform/Plugin/Language | Version +--- +OpenCart | 3.0.3.8 or higher +--- +[OpenCart Razorpay Subscriptions Plugin](https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=38152) | 5.0.0 and above +--- +PHP | 7.3 and 7.4 + +## Prerequisites + +- Create a [Razorpay Account](https://dashboard.razorpay.com/signup). + +- Log in to the Dashboard and click **Subscriptions** in the left menu. +- Razorpay Subscriptions is based on the existing Razorpay [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. If you are new to Razorpay, we recommend you to understand this flow before you read further. +- Generate the API keys from the Dashboard by navigating to **Account & Settings** → **API Keys**. You can use the Test mode keys for testing and later switch to Live mode keys when going live with the integration. + +## Integration Steps + +1. [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/opencart/build-integration.md) +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/opencart/test-integration.md) +3. [Go Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/opencart/go-live-checklist.md) + +## Support + +- Queries: If you have queries, raise a ticket on the [Razorpay Support Portal](https://razorpay.com/support/). + +- Feature Request: If you have a feature request, create an issue on [GitHub](https://github.com/razorpay/razorpay-opencart). + +### Related Information + +- [Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/subscriptions/plugins/opencart/build-integration.md b/llm-content/payments/subscriptions/plugins/opencart/build-integration.md new file mode 100644 index 00000000..2a04e368 --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/opencart/build-integration.md @@ -0,0 +1,63 @@ +--- +title: Subscriptions | OpenCart | Build Integration +heading: 1. Build Integration +description: A step-by-step guide on how to integrate OpenCart enabled site with Razorpay. +--- + +# 1. Build Integration + +Follow the steps given below to integrate Razorpay Payment Gateway with your OpenCart enabled site using the Razorpay Subscription for OpenCart plugin. + +## Integration Steps + +Follow these steps to complete the integration: + +### On Your OpenCart Site +1. [Install the Razorpay Subscriptions for OpenCart Plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/opencart/build-integration.md#step-1-install-razorpay-subscriptions-for-opencart-plugin). +1. [Configure OpenCart Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/opencart/build-integration.md#step-2-configure-opencart-settings). +1. [Create a Plan for Subscriptions product](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/opencart/build-integration.md#step-3-create-a-plan-for-subscriptions-product). +1. [Test integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/opencart/test-integration.md). + +1. [Enable Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/opencart/build-integration.md#subscribe-to-webhook-events). + +#### Step 1: Install Razorpay Subscriptions for OpenCart Plugin + +To install Razorpay Subscriptions for OpenCart plugin: +1. Download the latest source code ZIP file of the Razorpay OpenCart Subscriptions plugin from the repository on Github. + 1. [OpenCart 3](https://github.com/razorpay/razorpay-opencart/releases) + 2. [OpenCart 2](https://github.com/razorpay/razorpay-opencart/releases/tag/opencart2-3.0.0) + 3. [OpenCart 1.5](https://github.com/razorpay/razorpay-opencart/releases/tag/opencart1.5-1.0.0) + + +> **WARN** +> +> +> **Watch Out!** +> +> Subscriptions is available only on [OpenCart 3](https://github.com/razorpay/razorpay-opencart/releases). +> + +2. Copy all files/folders recursively to the OpenCart installation directory. + +#### Step 2: Configure OpenCart Settings + +#### Step 3: Create a Plan for Subscriptions Product + +> **WARN** +> +> +> **Watch Out!** +> +> You can enable or disable plans only after creating them. +> + +To create a Plan for Subscriptions product: +1. Go to the **Admin Panel** → **Razorpay Subscription** → **Plans** to add a new Plan. +2. Click **Add new** to create a new Plan. +3. Enter the required details and click **Save** to save the Plan. + + ![](/docs/assets/images/opencart-create-plan.jpg) + +### Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/opencart/test-integration.md) diff --git a/llm-content/payments/subscriptions/plugins/opencart/go-live-checklist.md b/llm-content/payments/subscriptions/plugins/opencart/go-live-checklist.md new file mode 100644 index 00000000..44bfc957 --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/opencart/go-live-checklist.md @@ -0,0 +1,24 @@ +--- +title: Subscriptions | OpenCart | Go-live Checklist +heading: 3. Go-live Checklist +description: Know how to start accepting Live Payments through the Razorpay Payment Gateway. +--- + +# 3. Go-live Checklist + +Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. diff --git a/llm-content/payments/subscriptions/plugins/opencart/manage-subscriptions.md b/llm-content/payments/subscriptions/plugins/opencart/manage-subscriptions.md new file mode 100644 index 00000000..3a5f25ec --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/opencart/manage-subscriptions.md @@ -0,0 +1,63 @@ +--- +title: Manage Subscriptions +description: Reactivate, cancel or put on hold an existing Razorpay Subscription plugin for OpenCart and initiate refunds. +--- + +# Manage Subscriptions + +If you no longer want to use Subscriptions, you can cancel the product. You can also refund the subscription amount to your customers. If you want to update a Subscriptions product, you need to create a new Subscription product. + +## View a Subscription Details + +To view a Subscription details: + +1. Log in to the [OpenCart](https://www.opencart.com/index.php?route=common/home) and go to **My Account**. +2. Click **My subscription** in the right menu to see the list of your Subscriptions. + + ![](/docs/assets/images/opencart-rzp-subs-plugin-sub-list.jpg) + +3. Click on the red eye button against the required Subscription to see the details. + + ![](/docs/assets/images/opencart-rzp-subs-plugin-sub-details.jpg) + +## Update Subscriptions Product + +Razorpay Subscriptions plugin for OpenCart does not support updating an existing Subscription product. So, if you want to update a subscription product, you should create a new subscription product. + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot update the details of a Subscription for a customer or upgrade or downgrade the Subscription for them once it has gone live. +> - If you modify the details of an existing Subscription product on OpenCart and make a test payment, it will appear as a New Plan on the Razorpay Dashboard. Hence, you must cancel the existing Subscription and create a new one and ask your customer to subscribe to the newly created Subscription. +> - When a Subscription is put on-hold, you can use the **reactivate** option to restart the subscription, once you successfully charge the customer's card. This changes the Subscription status to active on the Razorpay Dashboard. The reactivate button will only be displayed where the payment is not due. +> + +![](/docs/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-16.jpg) + +## Cancel a Subscription + +The `cancel` option is used to cancel the Subscription. You can cancel a Subscription: + +- Immediately +- At the end of the current billing cycle + +To cancel a Subscription: + +1. Navigate to **OpenCart** → **Subscriptions**. +1. Hover over the subscription you want to put on hold and click **Cancel**. + +![](/docs/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-17.jpg) + +> **WARN** +> +> +> **Watch Out!** +> +> After you cancel an existing Subscription, you cannot restart it. +> + +![](/docs/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-18.jpg) + +## Refund Subscription Amount diff --git a/llm-content/payments/subscriptions/plugins/opencart/subscriptions-status.md b/llm-content/payments/subscriptions/plugins/opencart/subscriptions-status.md new file mode 100644 index 00000000..3734d4fb --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/opencart/subscriptions-status.md @@ -0,0 +1,23 @@ +--- +title: Subscriptions | OpenCart | Subscription Status +heading: Subscription Status +description: Check the different Subscription statuses mapped between OpenCart and Razorpay Subscriptions. +--- + +# Subscription Status + +## OpenCart Subscriptions Status And Razorpay Subscription Status Mapping + +The subscription status names used by Razorpay and OpenCart are different. The table below shows the mapping between the subscription statuses names used by Razorpay and OpenCart. Know more about the [Razorpay Subscriptions states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md). + +OpenCart Subscription Status | Razorpay Subscription Status | Description +--- +Pending | Created | This is the initial status of the subscription before the authentication/first payment transaction is complete. +--- +Active | Authenticated, Active | This is the status of the subscription once the payment transaction is successfully completed. +--- +On-hold | Pending | The subscription acquires this status when it is suspended or halted. This is done when a charge on the customer's card is unsuccessful. +--- +Cancelled | Cancelled | The `cancel` option is used to cancel the subscription altogether. Once a subscription is cancelled, it cannot be restarted. +--- +Expired | Complete | The subscription acquires this status when the expiry period mentioned during the subscription creation comes to an end. diff --git a/llm-content/payments/subscriptions/plugins/opencart/test-integration.md b/llm-content/payments/subscriptions/plugins/opencart/test-integration.md new file mode 100644 index 00000000..9bc8e68a --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/opencart/test-integration.md @@ -0,0 +1,66 @@ +--- +title: Subscriptions | OpenCart | Test Integration +heading: 2. Test Integration +description: Do test payments to make sure that your integration works. +--- + +# 2. Test Integration + +After the integration is complete, Razorpay will appear as a payment option on your web page/app. You need to make a test transaction to ensure that the integration is working as expected. You can start accepting actual payments from your customers once the test is successful. + +## Buy a Product on Subscription + +To buy a product on Subscription: + +1. Select the recurring options of the product for which the recurring option has been enabled. +2. Click **Add to Cart**. + + ![](/docs/assets/images/opencart-rzp-subs-plugin-18.jpg) + +3. Select **Pay by Razorpay** as your payment method and click **Continue**. + + ![](/docs/assets/images/opencart-rzp-subs-plugin-payment.jpg) + +4. Verify the details and click **Confirm Order**. + +You can make test payments using one of the payment methods configured at the Checkout. +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API keys generated in the test mode in the Checkout code. + +### Netbanking +You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment a `success` or a `failure`. Since it is the test mode, we will not redirect you to the bank login portals. + +### UPI +You can enter one of the following UPI IDs: +- `success@razorpay`: To make the payment successful. +- `failure@razorpay`: To fail the payment. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + +### Wallet +You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment a `success` or a `failure`. Since it is the test mode, we will not redirect you to the wallet login portals. + +### Cards +You can use one of the test cards to make transactions in the test mode. Use any valid expiration date in the future and any random CVV to create a successful payment. + +Card Network | Domestic/International | Card Number +--- +Mastercard | Domestic | 5267 3181 8797 5449 +--- +Visa | Domestic | 4386 2894 0766 0153 +--- +Mastercard | International | 5555 5555 5555 4444 +5105 1051 0510 5100 +5104 0600 0000 0008 +--- +Visa | International | 4012 8888 8888 1881 + +### Next Steps + +[Step 3: Go Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/opencart/go-live-checklist.md) diff --git a/llm-content/payments/subscriptions/plugins/opencart/webhook-events.md b/llm-content/payments/subscriptions/plugins/opencart/webhook-events.md new file mode 100644 index 00000000..23026863 --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/opencart/webhook-events.md @@ -0,0 +1,70 @@ +--- +title: Subscriptions | OpenCart - Webhook Events +heading: Webhook Events +description: Check the webhook payloads for events relevant to OpenCart Plugin for Razorpay Subscriptions. +--- + +# Webhook Events + +Webhooks (Web Callback, HTTP Push API or Reverse API) automatically notify your application when specific events occur. Instead of continuously polling APIs to check for updates, webhooks push notifications directly to your server when events happen. + +## Webhooks vs APIs + +Here is how webhooks compare to traditional API polling: + +Aspect | APIs | Webhooks +--- +**Data retrieval** | Pull-based (you request) | Push-based (we send) +--- +**Timing** | On-demand | Near real-time when events occur +--- +**Resource usage** | Requires polling | Event-driven, efficient + +## How Razorpay Webhooks Work + +When you subscribe to webhook events, Razorpay sends an HTTP POST request with JSON payload to your configured endpoint URL whenever those events are triggered. + +Suppose you have subscribed to the `order.paid` webhook event, you will receive a notification every time a user pays you for an order, in the configured endpoint URL. + +### Use Cases + +There can be multiple uses for webhook events. Two of these are listed below. + + +### Capturing Late Authorised Payments + + Capturing payments for which you did not receive a response on the client-side is perhaps the most important use case for the `payment.authorized` event. + + Sometimes, the communication between the bank and Razorpay or between you and Razorpay may not occur. This could be because of a slow network connection or your customer closing the window while processing the payment. This could lead to a payment being marked as **Failed** on the Dashboard but changed to **Authorized** at a later time. Know more about [late authorisation of payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md). + + You can use webhooks to get notified about payments that get authorised and analyse this data to decide whether to capture the payment or not. + + + +### Notifications on Failed Payments + + When a payment attempted by your customer fails, we receive the failed payment status from the bank. This payment gets recorded in our system as **Failed**. + + Suppose you have enabled the `payment.failed` webhook, you will receive a notification from us about the failed payment. You can then further analyse this payment and notify your customer about the failure. + + + +### Setup and Configuration + +- You can set up webhooks from your Dashboard and configure separate URLs for **Live** mode and **Test** mode. Know more about setting up [Payment webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) and [Payout webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md). +- A **Test** mode webhook receives events for your test transactions. Know more about [testing webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). +- Webhook URLs must use ports **80** or **443** only. +- Ensure Razorpay webhook IPs are whitelisted on your server. Even if your server accepts all incoming requests, webhooks may still be blocked by cloud security groups or network configurations. Refer to [Razorpay IPs and Certificates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#webhook-ips) for the complete list of webhook IP addresses. + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> diff --git a/llm-content/payments/subscriptions/plugins/woocommerce.md b/llm-content/payments/subscriptions/plugins/woocommerce.md new file mode 100644 index 00000000..6ab2cdc3 --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/woocommerce.md @@ -0,0 +1,68 @@ +--- +title: Razorpay Subscriptions Plugin for WooCommerce +description: Accept recurring payments on your WooCommerce-enabled WordPress site using the Razorpay Subscription for WooCommerce plugin. +--- + +# Razorpay Subscriptions Plugin for WooCommerce + +Integrate your [Subscriptions plugin for WooCommerce](https://woocommerce.com/products/woocommerce-subscriptions/) with the Razorpay Payment Gateway. + +## Advantages + +- Razorpay Subscriptions plugin provides a quick and customer-friendly integration. +- No need to create Plans or Subscriptions using the Razorpay Dashboard or Razorpay APIs. All this can be done easily from your WooCommerce Dashboard. +- Customers can make payments on your website without any redirections. +- You can accept recurring payments using Razorpay Subscriptions plugin on your WooCommerce website via Credit Card, Debit Card, Netbanking and UPI payment methods. + +## Video Tutorial + +Watch this video to know how to integrate Razorpay Payment Gateway with your WooCommerce Subscriptions website using our plugin. + +[Video: https://www.youtube.com/embed/Z3GskrZXELE] + +## Plugin Dependencies + +You must have the following installed for the plugin to work: + +Platform/Plugin/Language | Version +--- +WordPress | 3.9.2 or higher +--- +[WooCommerce Plugin for WordPress](https://wordpress.org/plugins/woocommerce/) | 2.4 or higher +--- +[WooCommerce Subscriptions Plugin](https://woocommerce.com/products/woocommerce-subscriptions/) | 2.2 and above +--- +[Razorpay WooCommerce Plugin](https://wordpress.org/plugins/woo-razorpay/) | 2.0.0 and above +--- +PHP | 5.6.0 or higher +--- +PHP-cURL | N/A + +> **WARN** +> +> +> **Watch Out!** +> +> Subscriptions plugin v2.3.6 for WooCommerce relies on [Razorpay WooCommerce Plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/ecommerce-plugins/woocommerce.md) v4.5.4. +> + +## Prerequisites + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup) +- Understand the [payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) process. +- Generate the API keys from the Dashboard. You can use the [Test mode keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#test-mode-api-keys) for testing and later switch to [Live mode keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#live-mode-api-keys) when going live with the integration. + +## Integration Steps + +1. [Build Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/woocommerce/build-integration.md) +2. [Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/woocommerce/test-integration.md) +3. [Go Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/woocommerce/go-live-checklist.md) + +## Support + +- **Queries**: If you have any queries, raise a ticket on the Razorpay [Support Portal](https://razorpay.com/support/). +- **Feature Request**: If you have a feature request, create an issue on [GitHub](https://github.com/razorpay/razorpay-woocommerce-subscriptions/issues/new). + +### Related Information + +[Address Verification System](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/address-verification-system.md) diff --git a/llm-content/payments/subscriptions/plugins/woocommerce/build-integration.md b/llm-content/payments/subscriptions/plugins/woocommerce/build-integration.md new file mode 100644 index 00000000..d35fac56 --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/woocommerce/build-integration.md @@ -0,0 +1,180 @@ +--- +title: Subscriptions | WooCommerce | Build Integration +heading: 1. Build Integration +description: A step-by-step guide on how to integrate WooCommerce-enabled WordPress site with Razorpay. +--- + +# 1. Build Integration + +Follow the steps given below to integrate Razorpay Payment Gateway to your WooCommerce-enabled WordPress site using the Razorpay Subscription for WooCommerce plugin. + +## Integration Steps + +Follow these steps to complete the integration: + +### On Your WordPress Site + +1. [Install the Razorpay Subscriptions for WooCommerce Plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/woocommerce/build-integration.md#step-1-install-razorpay-subscriptions-for-woocommerce-plugin). +1. [Configure WooCommerce Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/woocommerce/build-integration.md#step-2-configure-woocommerce-settings). +1. [Create a Subscriptions product using WooCommerce](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/woocommerce/build-integration.md#step-3-create-a-subscriptions-products). +1. [Test integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/woocommerce/test-integration.md). + +1. [Enable Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/woocommerce/build-integration.md#you-can-track-the-payment-status-in-three). + These 3 webhooks are auto configured for woocommerce subscription plugin: + - `subscription.cancelled` + - `subscription.paused` + - `subscription.resumed` + +#### Step 1: Install Razorpay Subscriptions for WooCommerce Plugin + +There are two methods to install the Razorpay Subscription for WooCommerce plugin: +- Install via WordPress Plugin Directory +- Manual Installation + +#### Install via WordPress Plugin Directory + +You can search for the plugin on the WordPress Admin Dashboard and add it. +1. In the **WordPress Admin Dashboard**, navigate to **Plugins** → **Add New**. +2. Search for **Razorpay Subscriptions for WooCommerce** and click **Install Now**. + ![Install Razorpay Subscription via wordpress plugin directory](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-1.jpg.md) +3. Click **Activate**. + +#### Manual Installation +1. [Download a ZIP file](https://github.com/razorpay/razorpay-woocommerce-subscriptions/releases) of the Razorpay WooCommerce Subscriptions Plugin from the repository on Github. +2. Unzip this file and upload the contents in `wp-content` → Plugins. + ![Install Razorpay subscription via manual installation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-2.jpg.md) +3. The plugin now appears in your **WordPress Dashboard** → **Plugins** folder. +4. Click **Activate**. + +#### Step 2: Configure WooCommerce Settings + +On your WordPress Dashboard, navigate to **WooCommerce** → **Settings** → **Payments** tab. + +#### Settings for Razorpay Payment Gateway + +1. Under the **Payments** tab, go to **Razorpay** → **Allow customers to securely pay via Razorpay** and click **Manage**. + + + ![Configure Woocommerce settings on Razorpay Payments page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-3.jpg.md) +2. On the **Razorpay Payment Gateway** page, fill in the following field details and click **Save**: + + + Field | Description + --- + Enable/Disable | Ensure that the **Enable this module?** option is selected. + --- + Title | Add the title that is visible to the customer during checkout of a product with type - `Simple Product`. + --- + Description | Enter a short description that is visible to the customer during checkout. + --- + Key ID | Enter the Key ID generated from the Dashboard. + --- + Key Secret | Enter the API Key Secret generated from the Dashboard. + --- + Payment Action | To automatically capture successful payments, select `Authorize and Capture` option in the drop-down. Select `Authorize` if you want to capture payments manually from the [Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manual-capture-of-payments) or using [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/capture.md). + --- + Order Completion Message | Enter the message that must be displayed after an order is successfully placed. + --- + Enable Webhook | Ensure that **Enable Razorpay Webhook** option is selected. [Set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) from the Dashboard. + --- + Webhook Secret | Enter the webhook secret here. Webhook secret is used for webhook signature verification. This must match with the one added on the Razorpay Dashboard. + --- + + + + ![Enter field details on Razorpay Payment Gateway page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-19.jpg.md) + +#### Settings for Razorpay Subscriptions + +1. Under the **Payments** tab, go to **Razorpay Subscriptions** → **Allow customers to securely pay via Razorpay** and click **Manage**. +2. On the **Razorpay Subscriptions Payment Gateway** page, fill in the following field details and click **Save**: + + + Field | Description + --- + Enable/Disable | Ensure that the **Enable this module?** option is selected. + --- + Title | Add the title that is visible to the customer during checkout of the subscription product with type `Simple Subscription`. + --- + Description | Enter a short description that is visible to the customer during checkout. + --- + + + + ![Enter details on Razorpay Subscriptions Payment Gateway page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-20.jpg.md) + +#### Step 3: Create a Subscriptions Product + +**Example:** +Let us assume Acme Corp. provides a streaming service called **GoFlicks**. There are two plans, **GoFlicks PremiumWatch** and **GoFlicks StandardWatch**. The details are mentioned below: + +Plan Name | Rate/Month (₹) | Free Trial (days) +--- +GoFlicks PremiumWatch HD | 999 | 15 +--- +GoFlicks StandardWatch | 499 | N/A + +Let us create a Subscriptions product for **GoFlicks PremiumWatch HD**. + +1. In the WordPress Dashboard, navigate to **Products** → **Add New**. +2. Enter the product name and add a brief description. +3. In the Product data section, enter the following details and click **Publish**: + 1. Select **Simple Subscription** as the product type in the drop-down list. + 2. Select **Virtual** check box as `GoFlicks` is a streaming service. + 3. Under the **General** tab, enter the following details: + 1. **Subscription Price:** Enter the price, select every as the **interval** and month as the **duration**. + 2. **Expire after:** Select the period after which the subscription will expire. This period is in addition to any free trial or time provided before a synchronised first renewal date. Do not select **Never Expire** as it is not supported by Razorpay. + +> **INFO** +> +> +> **Handy Tips** +> +> WooCommerce supports Subscriptions for a maximum of 24 months. +> + + 3. **Sign-up fee:** Add an amount to be charged at the outset of the subscription. This fee will be charged immediately, even if the product has a free trial. + 4. **Free trial:** Enter the period up to which the subscriber can use the product for free. The trial period cannot exceed 90 days, 52 weeks, 24 months or 5 years. A sign-up fee will still be charged from the outset of the subscription. + 5. **Sale Price:** Enter the discounted price at which you want to offer the product. For example, you may offer **GoFlicks PremiumWatch HD** at INR 899 per month for a limited period. You can schedule the special price by clicking **Schedule** and selecting the required dates on the calendar. + + ![Create a Subscriptions product for GoFlicks PremiumWatch HD](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-4.jpg.md) + +The product is created successfully. Similarly, create another Subscriptions product for **GoFlicks StandardWatch**. +- Check that the products are visible on the website to the users so that they can add it to their cart. +- [Make a test transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/woocommerce/test-integration.md) to ensure that the integration is working properly. + +## Verify Payment Status + +> **INFO** +> +> +> **Handy Tips** +> +> On the Razorpay Dashboard, ensure that the payment status is `captured`. Refer to the payment capture settings page to know how to [capture payments automatically](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). +> + + +### You can track the payment status in three ways: + + + To verify the payment status from the Razorpay Dashboard: + + 1. Log in to the Razorpay Dashboard and navigate to **Transactions** → **Payments**. + 2. Check if a **Payment Id** has been generated and note the status. In case of a successful payment, the status is marked as **Captured**. + ![](/docs/assets/images/testpayment.jpg) + + + You can use Razorpay webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. Know how to [set up webhooks.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + + #### Example + If you have subscribed to the `order.paid` webhook event, you will receive a notification every time a customer pays you for an order. + + + [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) to check the payment status. + + + + +### Next Steps + +[Step 2: Test Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/woocommerce/test-integration.md) diff --git a/llm-content/payments/subscriptions/plugins/woocommerce/go-live-checklist.md b/llm-content/payments/subscriptions/plugins/woocommerce/go-live-checklist.md new file mode 100644 index 00000000..c6220c19 --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/woocommerce/go-live-checklist.md @@ -0,0 +1,24 @@ +--- +title: Subscriptions | WooCommerce | Go-live Checklist +heading: 3. Go-live Checklist +description: Accept live payments through the Razorpay Payment Gateway. +--- + +# 3. Go-live Checklist + +Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. diff --git a/llm-content/payments/subscriptions/plugins/woocommerce/manage-subscriptions.md b/llm-content/payments/subscriptions/plugins/woocommerce/manage-subscriptions.md new file mode 100644 index 00000000..8cf61593 --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/woocommerce/manage-subscriptions.md @@ -0,0 +1,59 @@ +--- +title: Manage Subscriptions +description: Reactivate, cancel or put on hold an existing Razorpay Subscription plugin for WooCommerce and initiate refunds. +--- + +# Manage Subscriptions + +You can cancel a Subscriptions product. You can also refund the subscription amount to your customers. If you want to update a Subscriptions product, you need to create a new Subscription product. + +## Update a Subscriptions Product + +Razorpay Subscriptions plugin for WooCommerce does not support updating existing products. You must create a new subscription product for any changes. + +> **WARN** +> +> +> **Watch Out!** +> +> Once a customer's subscription is live, you cannot modify its details (including upgrades or downgrades). +> - **Modifying Existing Subscriptions**: If you modify an existing WooCommerce subscription product and process a test payment, it will be registered as a New Plan on the Razorpay Dashboard. Hence, you must: +> 1. Cancel the customer's existing subscription. +> 2. Create a new subscription product. +> 3. Have the customer subscribe to the newly created plan. +> - R**eactivating On-Hold Subscriptions**: For subscriptions that are on-hold, you can use the Reactivate option to resume service after successfully charging the customer's card. This updates the subscription status to Active on the Razorpay Dashboard. + +> +> The Reactivate button is only displayed when no payment is currently due. +> + +![Update Subscriptions product](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-16.jpg.md) + +## Cancel a Subscription + +The `cancel` option is used to cancel the Subscription. You can cancel a Subscription: + +- Immediately +- At the end of the current billing cycle + +To cancel a Subscription: + +1. Navigate to **WooCommerce** → **Subscriptions**. +1. Hover over the subscription you want to put on hold and click **Cancel**. + +![Cancel a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-17.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> After you cancel an existing Subscription, you cannot restart it. +> + +![WooCommerce Subscriptions after cancellation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rzp-subscriptions-plugin-rzp-subs-plugin-18.jpg.md) + +## Refund Subscription Amount + +- To refund the subscription amount to a customer, you need to do this manually from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#issue-a-refund). +- You also need to mark the subscription as refunded on [WooCommerce in WordPress Dashboard](https://docs.woocommerce.com/document/woocommerce-refunds/#section-4) by selecting the **Refunded** option from the **Order Status** drop-down list. diff --git a/llm-content/payments/subscriptions/plugins/woocommerce/subscriptions-status.md b/llm-content/payments/subscriptions/plugins/woocommerce/subscriptions-status.md new file mode 100644 index 00000000..039019fd --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/woocommerce/subscriptions-status.md @@ -0,0 +1,23 @@ +--- +title: Subscriptions | WooCommerce | Subscription Status +heading: Subscription Status +description: Check the different Subscription statuses mapped between WooCommerce and Razorpay Subscriptions. +--- + +# Subscription Status + +## WooCommerce and Razorpay Subscription Status Mapping + +The subscription status names used by Razorpay and WooCommerce are different. The table below shows the mapping between the subscription statuses names used by Razorpay and WooCommerce. Know more about the [Razorpay Subscriptions states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md). + +WooCommerce Subscription status | Razorpay Subscription Status | Description +--- +Pending | Created | This is the initial status of the subscription before the authentication/first payment transaction is complete. +--- +Active | Authenticated, Active | This is the status of the subscription once the payment transaction has been successfully completed. +--- +On-hold | Pending | The subscription acquires this status when it has been suspended or halted. This is done when a charge on the customer's card is unsuccessful. +--- +Cancelled | Cancelled | The `cancel` option is used to cancel the subscription altogether. Once a subscription is cancelled, it cannot be restarted. +--- +Expired | Complete | The subscription acquires this status when the expiry period mentioned during the subscription creation comes to an end. diff --git a/llm-content/payments/subscriptions/plugins/woocommerce/test-integration.md b/llm-content/payments/subscriptions/plugins/woocommerce/test-integration.md new file mode 100644 index 00000000..9d763121 --- /dev/null +++ b/llm-content/payments/subscriptions/plugins/woocommerce/test-integration.md @@ -0,0 +1,45 @@ +--- +title: Subscriptions | WooCommerce | Test Integration +heading: 2. Test Integration +description: Run test payments to make sure that your integration works. +--- + +# 2. Test Integration + +After the integration is complete, Razorpay will appear as a payment option on your web page/app. You need to click the button and make a test transaction to ensure that the integration is working as expected. You can start accepting actual payments from your customers once the test is successful. + +![WooCommerce subscriptions plugin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/woocommerce-subscriptions-plugin.jpg.md) + +You can make test payments using one of the payment methods configured at the Checkout. +- No money is deducted from the customer's account as this is a simulated transaction. +- Ensure you have entered the API keys generated in the test mode in the Checkout code. + +## UPI + +You can enter one of the following UPI IDs: +- `success@razorpay`: To make the payment successful. +- `failure@razorpay`: To fail the payment. + +> **INFO** +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + +## Cards + +You can use one of the test cards to make transactions in the test mode. Use any valid expiration date in the future and any random CVV to create a successful payment. + +Type | Card Network | Card Type | Card Number | CVV & Expiry Date +--- +Domestic | Visa | Credit Card | 4718 6091 0820 4366 | Use a random CVV and any future date ^^^ +--- +International | Mastercard | Credit Card | 5104 0155 5555 5558 | +--- +International | Mastercard | Debit Card | 5104 0600 0000 0008 | + +### Next Steps + +[Step 3: Go Live Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/plugins/woocommerce/go-live-checklist.md) diff --git a/llm-content/payments/subscriptions/qr-codes.md b/llm-content/payments/subscriptions/qr-codes.md new file mode 100644 index 00000000..decf8f5b --- /dev/null +++ b/llm-content/payments/subscriptions/qr-codes.md @@ -0,0 +1,48 @@ +--- +title: QR Codes for Subscriptions +description: Display QR Codes on Razorpay Standard Checkout for UPI Autopay to collect Subscription payments. +--- + +# QR Codes for Subscriptions + +QR codes on Standard Checkout are a great way to provide faster and more convenient options for customers to make payments. It saves time, reduces multiple steps, and allows for contactless payments. + +> **WARN** +> +> +> **Watch Out!** +> +> The QR code on the checkout is dynamic, and the customer can only make a single payment. +> + +## Advantages + +- The QR code allows you to easily manage Subscriptions and Recurring Payments and increase the success rate by simplifying the checkout process for customers. +- Customers do not have to remember the VPA. They can make the payment by scanning the QR Code using any PSP app. + +## Customer Journey + +Below is the customer journey with a QR Code on Standard Checkout: + +1. The QR Code is available on the desktop Standard Checkout for UPI Autopay. +2. Customers scan the QR Code using any PSP app and approve the payment. +![Subscription QR Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/qr_sub.gif.md) + +## FAQs + + +### 1. Can I use the QR code to accept international payments? + + Yes. You can use the QR Code to accept Subscriptions payments in any of our [supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + + + +### 2. Are there any additional steps to enable a QR Code on Standard Checkout? + + No, QR Codes are enabled by default for all businesses on Subscriptions Standard Checkout. + + +### Related Information + +- [About Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) +- [Supported Banks and Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md) diff --git a/llm-content/payments/subscriptions/settings.md b/llm-content/payments/subscriptions/settings.md new file mode 100644 index 00000000..b7cfdb85 --- /dev/null +++ b/llm-content/payments/subscriptions/settings.md @@ -0,0 +1,43 @@ +--- +title: Subscriptions Settings +description: Configure payment method settings for Razorpay Subscriptions. +--- + +# Subscriptions Settings + +You can configure the payment methods (Cards, UPI and Emandate) using which you would like to accept subscription payments from your customers. + +> **INFO** +> +> +> **Handy Tips** +> +> Cards and UPI currently support recurring payments up to ₹15,000. Charges of higher value would automatically fail for domestic cards. +> + +## Enable Payment Methods + +To enable payment methods: + +1. Log in to the Dashboard and click **Subscriptions** under **PAYMENT PRODUCTS** in the left menu. +2. Go to **Settings**. +3. Enable the payment methods. + + - **Card**: Enable this to accept recurring payments via cards for your Subscriptions. + + - **UPI**: Enable this to accept UPI payments when a recurring charge is less than ₹15,000. Only INR is supported. +- **eMandate**: Enable this to accept recurring payments via Emandate (NetBanking) for your Subscriptions only in INR. This payment method will be enabled by default. You can disable it whenever required. + + + + + ![Configure Payment Methods using Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/subscriptions-Emandate-subscription.jpg.md) + + + +### Related Information + +- [Create and View Plans](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-plans.md) +- [Create Subscriptions via Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md) +- [Charge a Card Manually](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/manually-charge-card.md) +- [Update a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/update.md) diff --git a/llm-content/payments/subscriptions/states.md b/llm-content/payments/subscriptions/states.md new file mode 100644 index 00000000..0dfe5f55 --- /dev/null +++ b/llm-content/payments/subscriptions/states.md @@ -0,0 +1,144 @@ +--- +title: Subscriptions States +description: List of various Subscription states and their meanings. +--- + +# Subscriptions States + +You can track a Subscription through its various stages from creation to completion. While the life cycle for a Subscription includes creation, authentication, active and then completion, you also have the option to cancel a Subscription. + +## Subscriptions States and Descriptions + +During its life cycle, a Subscription can go through the following states: + +![subscription life cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/subscriptions-subscription-lifecycle.jpg.md) + + +### Created + + A Subscription attains the `created` state once it is created. + + + +### Authenticated + + A Subscription goes to the `authenticated` state when the customer completes the authentication transaction. + + **Subscriptions with an Immediate Start Date** + + The Subscription with an immediate start date remains in the `created` state till the first charge is made and moves to the `active` state after the first charge. + + **Subscriptions with a Trial Period** + + - The Subscription with an add-on amount remains in the `created` state and moves to the `authenticated` state after the add-on amount is processed. + - The Subscription without an add-on amount moves to the `authenticated` state when the customer completes the authentication transaction. + + + +### Active + + A Subscription goes to the `active` state when the billing cycle for the Subscription starts. + + + + ##### Action on Razorpay + + + When a Subscription moves to the `active` state from the `authenticated` state, we attempt to charge the authorized card against the invoice amount. + + + + +### Pending + + - A Subscription goes to the `pending` state when an auto-charge on a payment is unsuccessful. We continue to retry the payment while it is in this state. In the meanwhile, you can ask the customer to authenticate another card, if required. + - After all the retry attempts have been exhausted, the Subscription moves to the `halted` state. + + + + **Action on Razorpay** + + + - When the Subscription moves to the `halted` state from the `pending` state, invoices continue to be generated as per the billing cycles. However, no auto-charge is attempted. It is important to note that once the Subscription moves back to the `active` state, the previous charges **will not be** re-attempted. Only future billing cycles are charged automatically. + - When the Subscription moves to the `pending` state from the `active` state, you are notified about the failed attempt via our webhooks. For Subscriptions authenticated via cards, we continue to automatically process a retry without you having to take any action. We also send the customer an email notifying them about the failure. This email has a call-to-action from the customer to change the card that is associated with the Subscription. + + **Action on Business or Customer** + To move the Subscription back to the `active` state from the `pending` state, the customer needs to authenticate another card. This enables us to successfully perform a charge on it. You or the customer can also manually attempt a charge on the same card by attempting to charge any of the older unpaid invoices. If they go through successfully, the Subscription moves back to the `active` state. + + + +### Halted + + The Subscription goes to the `halted` state when the last auto-charge is unsuccessful and all retries are exhausted. + + +> **INFO** +> +> +> +> **Handy Tips** +> +> It is possible for the Subscription to continue to remain in the `halted` state for more than one billing cycle. In such scenarios: +> - Invoices are generated for all billing cycles, but no auto-charge is attempted. +> - The customer needs to authenticate another card or you or the customer needs to manually attempt a charge on an older unpaid invoice. If the older invoice is successfully charged, the Subscription will automatically move to the `active` state. +> + + The Subscription moves to the `active` state once the customer changes their card details and we are able to successfully perform a charge on it. It can also move to the `active` state if a charge on an older invoice is attempted and it goes through successfully. + + +> **WARN** +> +> +> **Watch Out!** +> +> Once the Subscription moves to the `active` state from the `halted` state, the previous charges are not re-attempted. Only future payments are charged automatically. +> + + + + +### Cancelled + + - When you cancel a Subscription, it moves to the `cancelled` state. Once cancelled, a Subscription cannot be restarted. + - A Subscription can be cancelled using the [Cancel API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#cancel-a-subscription) or from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/pause-resume-cancel.md#cancel-a-subscription-via-the-dashboard). + + + +### Paused + + - Only Subscriptions in the `active` state can be paused. + - You can pause a Subscription. + - From the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/pause-resume-cancel.md#pause-a-subscription-via-the-dashboard). + - Using [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#pause-a-subscription). + + +> **WARN** +> +> +> +> **Watch Out!** +> +> If you pause a Subscription in the `authenticated` state, the Subscription goes to the `cancelled` state. +> + + + + +### Expired + + If the `start_at` time for the Subscription has been set and the authentication transaction has not been done by the `start_at` time, the Subscription moves to the `expired` state and cannot be used again. + + + +### Completed + + A Subscription moves to the `completed` state when it reaches the end of its life cycle as per the `end_date` set for the Subscription. + + +### Related Information + +- [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) +- [Subscription Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/workflow.md) +- [Create Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md) +- [Test Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/test.md) +- [Subscriptions APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/apis.md) diff --git a/llm-content/payments/subscriptions/subscribe-to-webhooks.md b/llm-content/payments/subscriptions/subscribe-to-webhooks.md new file mode 100644 index 00000000..7a39f39e --- /dev/null +++ b/llm-content/payments/subscriptions/subscribe-to-webhooks.md @@ -0,0 +1,42 @@ +--- +title: Subscribe to Webhooks +description: Subscribe to various webhook events related to Subscriptions to receive instant notifications. +--- + +# Subscribe to Webhooks + +You can use Razorpay [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) to receive notifications of all events related to Subscriptions. + +To subscribe to webhook events: + +1. Log in to the Dashboard. +2. Navigate to **Accounts & Settings** → **Webhooks** to subscribe to any of the events mentioned in the following section. + +## Webhook Events and Descriptions + +Webhook Event | Description +--- +`subscription.authenticated` | Sent when the first payment is made on the subscription. This can either be the authorization amount, the upfront amount, the plan amount or a combination of the plan amount and the upfront amount. +--- +`subscription.activated` | Sent when the subscription moves to the `active` state either from the `authenticated`, `pending` or `halted` state. If a Subscription moves to the `active` state from the `pending` or `halted` state, only the subsequent invoices that are generated are charged. Existing invoices that were already generated are not charged. +--- +`subscription.charged` | Sent every time a successful charge is made on the subscription. +--- +`subscription.completed`| Sent when all the invoices are generated for a subscription and the subscription moves to the `completed` state. +--- +`subscription.updated` | Sent when a subscription is successfully updated. There is no state change when a subscription is updated. +--- +`subscription.pending` | Sent when the subscription moves to the `pending` state. This happens when a charge on the card fails. We try to charge the card on a periodic basis while it is in the `pending` state. If the payment fails again, the Webhook is triggered again. +--- +`subscription.halted`| Sent when all retries have been exhausted and the subscription moves from the `pending` state to the `halted` state. The customer has to manually retry the charge or change the card linked to the subscription, for the subscription to move back to the `active` state. +--- +`subscription.cancelled` | Sent when a subscription is cancelled and moved to the `cancelled` state. +--- +`subscription.paused`| Sent when a subscription is paused and moved to the `paused` state. +--- +`subscription.resumed`| Sent when a subscription is resumed and moved to the `resumed` state. + +Know more about [ Webhooks ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) and check the [sample payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/subscriptions.md). + +### Related Information +[Subscriptions APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/apis.md) diff --git a/llm-content/payments/subscriptions/supported-banks-apps.md b/llm-content/payments/subscriptions/supported-banks-apps.md new file mode 100644 index 00000000..1b46158d --- /dev/null +++ b/llm-content/payments/subscriptions/supported-banks-apps.md @@ -0,0 +1,2769 @@ +--- +title: Supported Banks and Apps +description: List of banks and apps that support Subscription using Emandate (Netbanking, Debit Card, Aadhaar), card and UPI. +--- + +# Supported Banks and Apps + +Check the banks and apps that support Subscriptions via Emandate (Netbanking, Debit Card, Aadhaar), Card and UPI. + +## Emandate + +The following table has links to the list of banks that support Emandate payments using netbanking, Aadhaar (eSign authentication) and debit card authorization types. + + +### List of Banks - Emandate Payments Using Netbanking + + + Bank Name | Bank Code + --- + State Bank of India | SBIN + --- + Axis Bank | UTIB + --- + HDFC Bank | HDFC + --- + ICICI Bank | ICIC + --- + Bank of Baroda | BARB_R + --- + Bank of Maharashtra | MAHB + --- + Bandhan Bank | BDBL + --- + Canara Bank | CNRB + --- + Central Bank of India | CBIN + --- + Citi Bank | CITI + --- + City Union Bank | CIUB + --- + Cosmos Co-op Bank | COSB + --- + Dhanalaxmi Bank | DLXB + --- + DBS Bank India Ltd | DBSS + --- + Deutsche Bank AG | DEUT + --- + Equitas Small Finance Bank | ESFB + --- + Federal Bank | FDRL + --- + Hongkong and Shanghai Banking Corporation (HSBC) | HSBC + --- + IDBI Bank | IBKL + --- + IDFC First Bank | IDFB + --- + Indian Bank | IDIB + --- + Indusind Bank | INDB + --- + Jana Small Finance Bank | JSFB + --- + Jio Payments Bank | JIOP + --- + Karnataka Bank Ltd | KARB + --- + Karur Vysya Bank | KVBL + --- + Kotak Mahindra Bank | KKBK + --- + Oriental Bank of Commerce | ORBC + --- + Paytm Payments Bank | PYTM + --- + Punjab National Bank | PUNB_R + --- + RBL Bank | RATN + --- + Standard Charted Bank | SCBL + --- + South Indian Bank | SIBL + --- + Syndicate Bank | SYNB + --- + Tamilnadu Mercantile Bank | TMBL + --- + Ujjivan Small Finance Bank | UJVN + --- + Union Bank of India | UBIN + --- + Yes Bank | YESB + --- + Karnataka Vikas Grameena Bank | KVGB + --- + DCB Bank Ltd | DCBL + --- + Andhra Pragathi Grameena Bank | APGB + --- + The Varachha Co-op Bank Ltd | VARA + --- + AU Small Finance Bank | AUBL + --- + The Catholic Syrian Bank | CSBK + --- + Ujjivan Small Finance Bank Ltd | USFB + --- + Airtel Payments Bank Ltd | AIRP + --- + ESAF Small Finance Bank Ltd | ESAF + --- + NSDL Payments Bank | NSPB + --- + Suryoday Small Finance Bank Ltd | SURY + --- + Punjab & Sind Bank | PSIB + + + + +### List of Banks - Emandate Payments Using Debit Card + + + Bank Name | Bank Code + --- + State Bank of India | SBIN + --- + Axis Bank | UTIB + --- + HDFC Bank | HDFC + --- + ICICI Bank | ICIC + --- + AU Small Finance Bank | AUBL + --- + Bank of Baroda | BARB_R + --- + Bank of Maharashtra | MAHB + --- + Canara Bank | CNRB + --- + Citi Bank | CITI + --- + City Union Bank | CIUB + --- + Dhanalaxmi Bank | DLXB + --- + DBS Bank India Ltd | DBSS + --- + DCB Bank | DCBL + --- + Deutsche Bank AG | DEUT + --- + IDBI Bank | IBKL + --- + Indian Bank | IDIB + --- + Equitas Small Finance Bank | ESFB + --- + Federal Bank | FDRL + --- + IDFC First Bank | IDFB + --- + Indusind Bank | INDB + --- + Jana Small Finance Bank | JSFB + --- + Karnataka Bank Ltd | KARB + --- + Kotak Mahindra Bank | KKBK + --- + Paytm Payments Bank | PYTM + --- + Punjab National Bank | PUNB_R + --- + RBL Bank | RATN + --- + South Indian Bank | SIBL + --- + Standard Charted Bank | SCBL + --- + Tamilnadu Mercantile Bank | TMBL + --- + Ujjivan Small Finance Bank | UJVN + --- + Union Bank of India | UBIN + --- + Yes Bank | YESB + --- + The Meghalaya Co-op Apex Bank Ltd | MYAX + --- + Airtel Payments Bank | AIRP + --- + Central Bank of India | CBIN + --- + Capital Small Finance Bank Ltd | CLBL + --- + The Kurla Nagarik Sahakari Bank Ltd | KNSB + --- + Mahesh Sahakari Bank Ltd Pune | MHSX + --- + The National Co-op Bank Ltd | NCBL + --- + The Zoroastrian Co-op Bank Ltd | ZCBL + --- + The Chembur Nagarik Sahakari Bank Ltd | CNSX + --- + Shivalik Small Finance Bank Ltd | SHIX + --- + The Adarsh Co-op Urban Bank Ltd | ACUX + --- + The Junagadh Commercial Co-op Bank Ltd | JUCX + --- + The Surat Peoples Co-op Bank Ltd | SPCB + --- + Bank of India | BKID + --- + The Catholic Syrian Bank | CSBK + --- + Ujjivan Small Finance Bank Ltd | USFB + --- + ESAF Small Finance Bank Ltd | ESAF + --- + NSDL Payments Bank | NSPB + --- + Suryoday Small Finance Bank Ltd | SURY + --- + Punjab & Sind Bank | PSIB + --- + Fincare Small Finance Bank Ltd | FINF + --- + The Kalupur Commercial Co-op Bank | KCCB + --- + Utkarsh Small Finance Bank Ltd | UTKS + --- + The Hongkong And Shanghai Banking Corporation Ltd | HSBC + --- + Bandhan Bank Ltd | BDBL + --- + Indian Overseas Bank | IOBA + --- + Karur Vysa Bank | KVBL + --- + UCO Bank | UCBA + --- + SBM Bank India Ltd | STCB + --- + Andhra Pragathi Grameena Bank | APGB + --- + The Cosmos Co-op Bank Ltd | COSB + --- + The Varachha Co-op Bank Ltd | VARA + --- + Karnataka Vikas Grameena Bank | KVGB + --- + The Jammu And Kashmir Bank Ltd | JAKA + --- + Chhattisgarh Gramin Bank | CGBX + --- + Ellaquai Dehati Bank | EDBX + --- + Fino Payments Bank Ltd | FINO + --- + Jio Payments Bank Ltd | JIOP + --- + Rajarshi Shahu Sahakari Bank Ltd | RSSX + + + + +### List of Banks - Emandate Payments using Aadhaar + + + Bank Name | Bank Code + --- + UTIB | Axis Bank + --- + HDFC | HDFC Bank + --- + ICIC | ICICI Bank + --- + ABHY | Abhyudaya Co-op Bank + --- + ACUX | The Adarsh Co-op Urban Bank Ltd + --- + AHMX | The Ahmednagar District Central Co-op Bank Ltd + --- + AMAX | Aman Sahakari Bank Ltd + --- + AJSX | Ambarnath Jai Hind Co-op Bank Ltd + --- + APBL | The Andhra Pradesh State Co-op Bank Ltd + --- + ALAX | Alavi Co-op Bank Ltd + --- + MAHB | Bank of Maharashtra + --- + BKID | Bank of India + --- + BARB_R | Bank of Baroda + --- + BARX | The Baroda City Co-op Bank Pvt Ltd + --- + BCBM | Bharat Co-op bank + --- + CNRB | Canara Bank + --- + CBIN | Central Bank of India + --- + CIUB | City Union Bank + --- + COSB | Cosmos Co-op Bank + --- + DCBL | DCB Bank + --- + DEUT | Deutsche Bank AG + --- + DSPX | Durgapur Steel Peoples Co-op Bank Ltd + --- + FDRL | Federal Bank + --- + PJSB | GP Parsik Sahakari Bank Ltd Kalwa Thane + --- + GSCB | The Gujarat State Co-op Bank Ltd + --- + HSBC | Hongkong and Shanghai Banking Corporation (HSBC) + --- + IBKL | IDBI Bank + --- + IDFB | IDFC First Bank + --- + INDB | Indusind Bank + --- + JPCB | The Jalgaon Peoples Co-op Bank Ltd + --- + XJKG | J & K Grameen Bank + --- + KARB | Karnataka Bank Ltd + --- + KVBL | Karur Vysya Bank + --- + KKBK | Kotak Mahindra Bank + --- + MSOX | Manorama Co-op Bank Ltd Solapur + --- + MDEX | Model Co-op Bank Ltd + --- + NICB | New India Co-op Bank Ltd + --- + ORBC | Oriental Bank of Commerce + --- + OSMX | Osmanabad Janata Sahakari Bank Ltd + --- + PLUX | Palus Sahakari Bank Ltd + --- + PASX | Paschim Banga Gramin Bank + --- + PCUX | The Pochampally Co-op Urban Bank Ltd + --- + PUNB_R | Punjab National Bank + --- + RCUX | Rajadhani Co-op Urban Bank Limited + --- + RATN | RBL Bank + --- + REBX | Rendal Sahakari Bank Ltd Rendal + --- + SNAX | Saraspur Nagarik Co-op Bank Ltd + --- + SRCB | Saraswat Co-op Bank Ltd + --- + KDIX | Shree Kadi Nagarik Sahakari Bank Ltd + --- + SKCX | Shrikrishna Co-op Bank Ltd Umrer + --- + SCBL | Standard Charted Bank + --- + SIRX | The Sircilla Co-op Urban Bank Ltd + --- + SDCB | The Surat District Co-op Bank + --- + SUMX | The Surat Mercantile Co-op Bank Ltd + --- + SUTB | The Sutex Co-op Bank Ltd + --- + SVCB | SVC Co-op Bank Ltd + --- + AUCX | The Ajara Urban Co-op Bank Ltd + --- + BURX | The Burdwan Central Co-op Bank Ltd + --- + ITDX | The Income Tax Dept Co-op Bank Ltd + --- + TGMB | Tumkur Grain Merchants Co-op Bank Ltd + --- + UCBA | UCO Bank + --- + UBIN | Union Bank of India + --- + TUNX | The Union Co-op Bank Ltd + --- + VARA | Varachha Co-op Bank + --- + YESB | Yes Bank + --- + WAIX | The Wai Urban Co-op Bank Ltd + --- + KHUX | The Khamgaon Urban Co-op Bank Ltd + --- + ADBX | The Ahmedabad District Co-op Bank Ltd + --- + ASKX | Arvind Sahakari Bank Ltd + --- + GACX | Gujarat Ambuja Co-op Bank Ltd + --- + SDHX | Solapur Siddheshwar Sahakari Bank Ltd + --- + NTBL | The Nainital Bank Ltd + --- + MRTX | Maratha Co-op Bank Ltd + --- + SPCB | The Surat Peoples Co-op Bank Ltd + --- + TUCL | The Union Co-op Bank Ltd Mahinagar + --- + MUSX | The Muslim Co-op Bank Ltd + --- + MSBL | The Malad Sahakari Bank Ltd + --- + MGCX | Mansing Co-op Bank Ltd + --- + RAKX | Rajkot Peoples Co-op Bank Ltd + --- + NAVX | The Navnirman Co-op Bank Ltd + --- + DSUX | Dharmavir Sambhaji Urban Co-op Bank Ltd + --- + GUCX | The Goa Urban Co-op Bank Ltd + --- + NSIX | Nagrik Sahakari Bank Ltd Indore + --- + GRAX | The Grain Merchants Co-op Bank Ltd + --- + MLCG | Merchants Liberal Co-op Bank + --- + HPCX | Parshwanath Co-op Bank Ltd + --- + ASHX | The Ashta Peoples Co-op Bank Ltd + --- + KTBX | The Kottayam District Co-op Bank Ltd + --- + KDCX | The Kozhikode District Co-op Bank + --- + APGX | Andhra Pradesh Grameena Vikas Bank + --- + AJKB | Akola Janata Commercial Co-op Bank Ltd + --- + MPDX | Malappuram District Co-op Bank + --- + UBGX | Uttar Bihar Gramin Bank + --- + PATX | Pathanamthitta District Co-op Bank + --- + SATX | Adv. Shamraoji Shinde Satyashodhak Sahakari Bank Ltd + --- + PMEC | Prime Co-op Bank Ltd + --- + PALX | Pali Urban Co-op Bank Ltd + --- + OMCX | The Ojhar Merchant Co-op Bank Ltd + --- + DHUX | The Dahod Urban Co-op Bank Ltd + --- + SNBX | The Sarvodaya Nagarik Sahakari Bank Ltd + --- + SEWX | Shri Mahila Sewa Sahakari Bank Ltd + --- + SDCX | Sindhudurg District Central Co-op Bank Ltd + --- + BHJX | The Bhuj Mercantile Co-op Bank Ltd + --- + AMRX | Amreli Jilla Madhyastha Sahakari Bank Ltd + --- + AMCB | Ahmedabad Mercantile Co-op Bank Ltd + --- + HMNX | The Himatnagar Nagarik Sahakari Bank Ltd + --- + MAKX | Makarpura Industrial Estate Co-op Bank Ltd + --- + KSCB | The Karnataka State Co-op Apex Bank Ltd + --- + CALX | The Calicut Co-op Urban Bank Ltd + --- + BMCB | Bombay Mercantile Co-op Bank Ltd + --- + VCBX | Vishwas Co-op Bank Ltd + --- + UNSX | The Unava Nagrik Sahakari Bank Ltd + --- + UMAX | Uma Co-op Bank Ltd + --- + UCDX | Urban Co-op Bank Ltd Dehradun + --- + BHCX | The Bhuj Commercial Co-op Bank Ltd + --- + TMSX | The Modasa Nagarik Sahakari Bank Ltd + --- + VVCX | The Vallabh Vidhyanagar Commercial Co-op Bank Ltd + --- + VSBX | Vidya Sahakari Bank Ltd + --- + SSBX | Shivdaulat Sahakari Bank Ltd + --- + SPSX | Sandur Pattana Souharda Sahakari Bank Niyamitha + --- + SPCX | The Shirpur Peoples Co-op Bank Ltd + --- + SCNX | Shree Chhani Nagarik Sahakari Bank + --- + TVPX | The Veraval Peoples Co-op Bank Ltd + --- + TDMX | The Dhanera Mercantile Co-op Bank Ltd + --- + TBMX | The Bapunagar Mahila Co-op Bank Ltd + --- + TACX | The Adinath Co-op Bank Ltd + --- + NCCX | The Nabadwip Co-op Credit Bank Ltd + --- + NAWX | The Nawanagar Co-op Bank Ltd + --- + NAWX | The Nawanagar Co-op Bank Ltd + --- + MVCX | The Mahaveer Co-op Bank Ltd + --- + SADX | The Sabarkantha District Central Co-op Bank Ltd + --- + RACX | Rajkot Commercial Co-op Bank Ltd + --- + PUBX | Peoples Urban Co-op Bank Ltd + --- + PPBX | Pune Peoples Co-op Bank Ltd + --- + JVCX | Jivan Commercial Co-op Bank Ltd + --- + JMCX | Jalna Merchants Co-op Bank Ltd + --- + JASB | Janaseva Sahakari Bank (Borivli) Ltd + --- + GPCX | The Gandevi Peoples Co-op Bank Ltd + --- + MSNX | The Mehsana District Central Co-op Bank Ltd + --- + MSCI | Maharashtra State Co-op Bank Ltd + --- + KUKX | The Kukarwada Nagarik Sahakari Bank Ltd + --- + KNBX | The Kalol Nagarik Sahakari Bank Ltd + --- + BMPX | The Banaskantha Mercantile Co-op Bank Ltd + --- + APSX | Adarniya P.D.Patilsaheb Sahakari Bank Ltd + --- + AACX | Akhand Anand Co-op Bank Ltd + --- + FINX | The Financial Co-op Bank Ltd + --- + DBAX | Dr. Babasaheb Ambedkar Sahkari Bank Ltd + --- + BUZX | Budaun Jila Sahkari Bank Ltd Budaun + --- + BNSX | Bhagini Nivedita Sahakari Bank Ltd + --- + BSBX | The Baramati Sahakari Bank Ltd + --- + ABDX | Dr. Ambedkar Nagrik Sahakari Bank Maryadit Gwalior + --- + UBBX | Urban Co-op Bank Ltd Basti + --- + CMLX | The Commercial Co-op Bank Ltd Jamnagar + --- + SONX | Sonbhadra Nagar Sahakari Bank Ltd + --- + MZCX | Mizoram Urban Co-op Development Bank Ltd + --- + KVCX | Kavita Urban Co-op Bank Ltd + --- + KUCX | Kolhapur Urban Co-op Bank Ltd + --- + LKMX | Lokmangal Co-op Bank Ltd Solapur + --- + LATX | The Latur Urban Co-op Bank Ltd Latur + --- + NBBX | The National Co-op Bank Ltd Bangalore + --- + MPCX | The Moirang Primary Co-op Bank Ltd + --- + PDUX | The Pandharpur Urban Co-op Bank Ltd + --- + NVSX | Nagar Vikas Sahakari Bank Ltd + --- + SBUX | Shree Balaji Urban Co-op Bank Ltd + --- + RBBX | Rajarambapu Sahakari Bank Ltd Peth + --- + SKUX | S S L S A Kurundwad Urban Co-op Bank Ltd + --- + SHCX | The Shimla Urban Co-op Bank Ltd + --- + SSKX | Sadhana Sahakari Bank Ltd + --- + SMNX | Shree Mahuva Nagrik Sahakari Bank Ltd + --- + UCCX | The Udaipur Central Co-op Bank Ltd + --- + TTUX | The Tirur Urban Co-op Bank Ltd + --- + HSDX | The Hassan District Co-op Central Bank Ltd + --- + HAMX | The Hamirpur District Co-op Bank Ltd + --- + IMPX | The Imphal Urban Co-op Bank Ltd + --- + ICMX | Indore Cloth Market Co-op Bank Ltd + --- + IPSX | Indore Paraspar Sahkari Bank Ltd + --- + IPCX | Indore Premier Co-op Bank Ltd Indore + --- + JHAX | Jharneshwar Nagrik Sahakari Bank Maryadit + --- + ITCX | Irinjalakuda Town Co-op Bank + --- + JSBP | Janata Sahakari Bank Ltd + --- + JODX | The Jodhpur Central Co-op Bank Ltd + --- + KMCX | Krishna Mercantile Co-op Bank Ltd + --- + KALX | The Kalna Town Credit Co-op Bank Ltd + --- + VCCX | Shri Veershaiv Co-op Bank Ltd + --- + UROX | The Urban Co-op Bank Ltd Rourkela + --- + VIKX | Vikramaditya Nagrik Sahakari Bank + --- + VERX | The Veraval Mercantile Co-op Bank Ltd + --- + WKGX | Vidharbha Konkan Gramin Bank + --- + VUCX | The Vaidyanath Urban Co-op Bank Ltd + --- + GNCX | The Gandhi Co-op Urban Bank Ltd + --- + PCTX | Pune Cantonment Sahakari Bank Ltd + --- + RECX | Railway Employees Co-op Banking Society Limited + --- + EUCX | Etah Urban Co-op Bank Ltd + --- + TNMX | The Nanded Merchants Co-op Bank Ltd Nanded + --- + SISX | Sanmati Sahakari Bank Ltd + --- + NBMX | Nagrik Sahakari Bank Maryadit Vidisha + --- + DNSB | Dombivli Nagari Sahakari Bank Ltd + --- + CSBX | Chartered Sahakari Bank Niyamitha + --- + CJAX | The Citizens Co-op Bank Ltd Jammu + --- + CHBX | The Chamba Urban Co-op Bank Ltd Chamba + --- + BKCX | The Bhavasara Kshatriya Co-op Bank Ltd + --- + BJUX | The Bijnor Urban Co-op Bank Ltd + --- + BHDX | Bhadohi Urban Co-op Bank Ltd Gyanpur + --- + BBLX | Bhingar Urban Co-op Bank Ltd + --- + CBHX | The Central Co-op Bank Ltd Bhilwara + --- + BRMX | Bramhapuri Urban Co-op Bank Ltd + --- + BORX | The Boral Union Co-op Bank Ltd + --- + BNBX | Betul Nagrik Sahakari Bank Mydt + --- + LBMX | Laxmibai Mahila Nagrik Sahakari Bank Maradit + --- + GHPX | The Ghatal Peoples Co-op Bank Ltd + --- + AGCX | The Agrasen Co-op Urban Bank Ltd + --- + ALLX | Allahabad District Central Co-op Bank Ltd + --- + SACX | The Sarvodaya Co-op Bank Ltd Mumbai + --- + ONSX | Omkar Nagreeya Sahkari Bank Ltd + --- + NJCX | The Nav Jeevan Co-op Bank Ltd + --- + SNDX | The Sind Co-op Urban Bank Ltd + --- + SNGX | The Sarangpur Co-op Bank Ltd + --- + MSCX | The Manipur State Co-op Bank Ltd + --- + SCUX | Sudha Co-op Urban Bank Ltd + --- + TBSX | The Bihar State Co-op Bank Ltd + --- + SNCX | The Sonepat Urban Co-op Bank Ltd + --- + AHUX | Ahilyadevi Urban Co-op Bank Ltd Solapur + --- + ANSX | Andaman Nicobar State Co-op Bank Ltd + --- + AJPX | Ambajogai Peoples Co-op Bank Ltd + --- + AVDX | The Amravati District Central Co-op Bank Ltd + --- + TAMX | The Anand Mercantile Co-op Bank Ltd + --- + TSUX | The Saurashtra Co-op Bank Ltd + --- + SAVX | Sardar Vallabhbhai Sahakari Bank Ltd + --- + SMUX | Shree Mahaveer Urban Co-op Bank Ltd + --- + TJNX | The Jamnagar Mahila Sahakari Bank Ltd + --- + JSMX | Janata Sahakari Bank Ltd Amravati + --- + VSCX | Vikas Souharda Co-op Bank Ltd + --- + PTSX | Patan Nagarik Sahakari Bank Ltd + --- + GCBX | The Guruvayur Co-op Urban Bank Ltd + --- + KRNX | The Karnavati Co-op Bank Ltd + --- + BHAX | The Bhagyodaya Co-op Bank Ltd + --- + DENS | Delhi Nagrik Sehkari Bank + --- + NMCB | The Nasik Merchants Co-op Bank Ltd + --- + SASA | The Sahyadri Sahakari Bank Ltd + --- + MABL | The Malleswaram Co-op Bank Ltd + --- + NJSX | The Nasik Jilha Mahila Sahakari Bank Ltd + --- + NMCX | Navi Mumbai Co-op Bank Ltd + --- + NGRX | Nagar Sahakari Bank Ltd + --- + KAMX | Kamala Co-op Bank Ltd Solapur + --- + JONX | Jodhpur Nagrik Sahakari Bank Ltd + --- + TNKX | The Neela Krishna Co-op Urban Bank Ltd + --- + YLNX | Yadagiri Lakshmi Narsimha Swamy Co-op Urban Bank Ltd + --- + RRSX | Ramrajya Sahakari Bank Ltd + --- + PCBL | Patan Co-op Bank Ltd + --- + BKDX | The Banaskantha District Central Co-op Bank Ltd + --- + ADCX | Shri Adinath Co-op Bank Ltd + --- + ICBL | Industrial Co-op Bank Ltd + --- + BHUX | Bhilwara Mahila Urban Co-op Bank Ltd + --- + BDUX | Banda Urban Co-op Bank Ltd + --- + ACKX | Dr. Annasaheb Chougule Urban Co-op Bank Ltd Vadgaon + --- + KKMX | Kankaria Maninagar Nagrik Sahkari Bank Ltd + --- + MALX | Malviya Urban Co-op Bank Ltd + --- + SDSX | The Satara District Central Co-op Bank Ltd + --- + TJSB | TJSB Sahakari Bank Ltd + --- + TCUB | The Trivandrum Co-op Urban Bank Ltd + --- + ABSB | The Abhinav Sahakari Bank Ltd + --- + ACBX | Adarsh Co-op Bank Ltd + --- + AGUX | Agartala Co-op Urban Bank Ltd + --- + APCX | The Alappuzha District Co-op Bank Ltd + --- + APGB | Andhra Pragathi Grameena Bank + --- + APJX | AP Janata Co-op Urban Bank Ltd + --- + APMC | AP Mahesh Co-op Bank Ltd + --- + APMX | The Ap Mahajan Co-op Urban Bank Ltd + --- + APNX | Apani Sahakari Bank Ltd + --- + APRX | Arunachal Pradesh Rural Bank + --- + ASBL | Apna Sahakari Bank Ltd + --- + ASBX | Ahmednagar Shahar Sahakari Bank Maryadit + --- + ASOX | The Associate Co-op Bank Ltd + --- + ASSX | Ashok Sahakari Bank Ltd + --- + AUCB | Almora Urban Co-Operative Bank Ltd + --- + AWCX | The Alwaye Urban Co-op Bank Ltd + --- + BACB | Bassein Catholic Co-op Bank Ltd + --- + BHMX | Brahmadeodada Mane Sahakari Bank Ltd + --- + BHOX | Bhopal Co-op Central Bank Ltd + --- + CHTX | The Chitnavispura Sahakari Bank Ltd + --- + COCX | The Co-op City Bank Ltd + --- + CSBK | The Catholic Syrian Bank + --- + CTBX | The Citizen Co-op Bank Ltd + --- + DDBX | Dharmapuri District Central Co-op Bank Ltd + --- + DEVX | Development Co-op Bank Ltd, Kanpur + --- + DLXB | Dhanalaxmi Bank + --- + DSCB | The Delhi State Co-op Bank Ltd + --- + DTCX | District Co-op Bank Ltd., Reabareli + --- + EDSX | The Ernakulam District Co-op Bank Ltd + --- + GSBX | GandhiBag Sahakari Bank Ltd., Nagpur + --- + HPSX | The Himachal Pradesh State Co-op Bank Ltd + --- + IDIB | Indian Bank + --- + IDUX | Idukki District Co-op Bank Ltd + --- + IOBA | Indian Overseas Bank + --- + JANA | Janaseva Sahakari Bank Ltd., Pune + --- + JCDX | Jamnagar District Co-op Bank Ltd + --- + JMHX | Jamshedpur Urban Co-op Bank Ltd + --- + JMPX | The Jamnagar People's Co-op Bank Ltd + --- + JSBL | Janakalyan Sahakari Bank + --- + KBCX | The Kanakamahalakshmi Co-op Bank Ltd + --- + KCUB | The Khattri Co-op Urban Bank Ltd + --- + KCUX | The Kannur Co-op Urban Bank Ltd + --- + KLGB | Kerala Gramin Bank + --- + KMSX | Kolhapur Mahila Sahakari Bank Ltd + --- + KOYX | The Koylanchal Urban Co-op Bank Ltd + --- + KSUX | Kashipur urban Co-op Bank Ltd + --- + LOKX | Lokvikas Nagari Sahakari Bank Ltd., Aurangabad + --- + MGBX | Maharashtra Gramin Bank + --- + MHNX | Mahanagar Nagrik Sahakari Bank Maryadit + --- + MSAX | Mansarovar Urban Co-op Bank Ltd + --- + NASX | Nashik District Central Co-op Bank Ltd + --- + NILX | Nilkanth Co-op Bank Ltd + --- + NSBX | Nagrik Sahkari Bank Ltd., Lucknow + --- + ODGB | Odisha Gramya Bank + --- + OIBA | Doha Bank QSC + --- + PBGX | Puduvai Bharathiar Grama Bank + --- + PGBX | Karnataka Gramin Bank + --- + PMNX | Pragati Mahila Nagrik Sahkari Bank, Bhilai + --- + PNSX | Poornawadi Nagrik Sahakari Bank, M.Beed + --- + PRPX | Paraspar Sahayak Co-op Bank Ltd + --- + PSBX | Pragati Sahakari Bank Ltd + --- + PSCX | The Punjab State Co-op Bank Ltd + --- + PTCX | The Patiala Central Co-op Bank Ltd + --- + PVCX | Purvanchal Co-op Bank Ltd., Ghazipur + --- + QUCX | Quilon Co-op Urban Bank Ltd + --- + RCCX | Ropar Central Co-op Bank + --- + RGCX | Ramgarhia Co-op Bank Ltd + --- + RGSX | Rajgurunagar Sahakari Bank Ltd + --- + RZSX | Rampur Zila Sahakari Bank Ltd + --- + SBNX | Shree Bhavnagar Nagrik Sahakari Bank Ltd + --- + SCSX | Sree Charan Souharda Co-op Bank Ltd + --- + SGSX | Sadguru Nagrik Sahakari Bank Maryadit + --- + SIBL | South Indian Bank + --- + SKNX | The Sankheda Nagarik Sahakari Bank Ltd + --- + SMVC | Sir M Visvesvaraya Co-op Bank Ltd + --- + SNKX | Shramik Nagrik Sahakari Bank Ltd + --- + SPBX | Saptagiri Grameena Bank + --- + SSLX | The Solapur Social Urban Co-op Bank Ltd + --- + SULX | Sulaimani Co-op Bank Ltd + --- + SVSX | Shri Vinayak Sahakari Bank Ltd + --- + TASX | The Annasaheb Savant Co-op Urban Bank Ltd., Mahad + --- + TBSB | Thane Bharat Sahakari Bank Ltd + --- + TDCB | The Thane District Central Co-op Bank Ltd + --- + TEHX | Tehri Garhwal Zila Sahkari Bank Ltd + --- + THOX | The Thoothukudi District Central Co-op Bank Ltd + --- + TIRX | The Tirunelveli District Central Co-op Bank Ltd + --- + TMBL | Tamilnadu Mercantile Bank + --- + TTLX | Textile Co-op Bank Ltd + --- + TUMX | The Udaipur Mahila Urban Co-op Bank Ltd + --- + UMCX | The Umreth Urban Co-op Bank Ltd + --- + UNIX | The United Co-op Bank Ltd + --- + VDYX | Vidyanand Co-op Bank Ltd + --- + VJSX | Vasai Janata Sahakari Bank Ltd + --- + ZSBL | Zila Sahkari Bank Ltd., Ghaziabad + --- + ZSGX | Zila Sahkari Bank Ltd., Garhwal Kotdwar + --- + ZSHX | Zila Sahakari Bank Ltd., Haridwar + --- + ZSMX | Zila Sahkari Bank Ltd., Meerut + --- + SBMX | Sree Banashankari Mahila Co-op Bank Ltd + --- + NGSX | Nagarik Sahakari Bank Maryadit Durg + --- + PGCX | Progressive Co-op Bank Ltd + --- + ADCC | The Akola District Central Co-op Bank Ltd + --- + AUBL | AU Small Finance Bank + --- + LDPX | Loknete Dattaji Patil Sahakari Bank Ltd + --- + PYTM | Paytm Payments Bank + --- + DOBX | Dapoli Urban Co-op Bank Ltd + --- + ISMX | Indore Swayamsiddh Mahila Co-op Bank Ltd + --- + BACX | The Bihar Awami Co-op Bank Ltd + --- + BANX | Banaras Mercantile Co-op Bank Ltd + --- + BASX | Shri Basaveshwar Sahakari Bank Nyt., Bagalkot + --- + RDNX | Col RD Nikam Sainik Sahakari Bank Ltd + --- + TUOX | The Urban Co-op Bank Ltd., Saharanpur + --- + YADX | Yavatmal District Central Co-op Bank Ltd + --- + NSBB | Nagarik Sahakari Bank Ltd., Bhiwandi + --- + HUCH | Hanamasagar Urban Co-op Bank Ltd + --- + SGMB | Shri Gajanan Maharaj Urban Co-op Bank Ltd + --- + ESAF | ESAF Small Finance Bank Ltd + --- + SURY | Suryoday Small Finance Bank Ltd + --- + PSIB | Punjab & Sind Bank + --- + FINF | Fincare Small Finance Bank Ltd + --- + ABUX | Abhinandan Urban Co-op Bank Amravati + --- + AGSX | The Agrasen Nagari Sahakari Bank Ltd + --- + BAVX | The Bavla Nagrik Sahakari Bank Ltd + --- + BCBX | The Bantra Co-op Bank Ltd + --- + BHEX | BHEL Employees Co-op Bank Ltd + --- + BHSX | Bharati Sahakari Bank Ltd Pune + --- + BNCX | Bhatpara Naihati Co-op Bank Ltd + --- + BRDX | The Baroda Central Co-op Bank Ltd + --- + CCCX | Chennai Central Co-op Bank Ltd + --- + CITI | Citibank N A + --- + CLBL | Capital Small Finance Bank Ltd + --- + CMCB | Colour Merchants Co-op Bank Ltd + --- + CMDX | The Coimbatore District Central Co-op Bank Ltd + --- + COMX | The Co-op Bank Of Mehsana Ltd + --- + CZCX | Citizen Co-op Bank Ltd Noida + --- + CZUX | Churu Zila Urban Co-op Bank Ltd + --- + DAHX | The Dahod Mercantile Co-op Bank Ltd + --- + DCBX | Dindigul Central Co-op Bank Ltd + --- + FINO | Fino Payments Bank Ltd + --- + GUNX | The Guntur Co-op Urban Bank Ltd + --- + HGBX | Sarva Haryana Gramin Bank + --- + JKSX | The J And K State Co-op Bank Ltd + --- + JMNX | Jabalpur Mahila Nagrik Sahkari Bank Maryadit + --- + KCCB | The Kalupur Commercial Co-op Bank + --- + KHDX | The Kheda Peoples Co-op Bank Ltd + --- + KRTX | The Kranthi Co-op Urban Bank Ltd + --- + MCSX | The Mattancherry Sarvajanik Co-op Bank Ltd + --- + MUPX | The Mehmadabad Urban Peoples Co-op Bank Ltd + --- + MYAX | The Meghalaya Co-op Apex Bank Ltd + --- + NAIX | Nainital District Co-op Bank Ltd + --- + NBSX | Navsarjan Industrial Co-op Bank Ltd + --- + PCSX | The Puducherry State Co-op Bank Ltd + --- + PDSX | Priyadarshani Nagari Sahakari Bank Ltd Jalna + --- + PNVX | Panvel Co-op Urban Bank Ltd + --- + PTNX | The Patan Urban Co-op Bank Ltd Patan + --- + SAHX | Sadhana Sahakari Bank Ltd Pune + --- + SBPX | SBPP Co-op Bank Ltd + --- + SBUJ | Shri Bharat Urban Co-op Bank Ltd Jaysingpur + --- + SEUX | The Sevalia Urban Co-op Bank Ltd + --- + SHRX | Shree Mahesh Co-op Bank Ltd Nashik + --- + SHSX | Sharad Sahakari Bank Ltd + --- + SRCX | Shree Bharat Co-op Bank Ltd + --- + SUNB | Surat National Co-op Bank Ltd + --- + SUVX | Suvarnayug Sahakari Bank Ltd + --- + SVCX | Sarvodaya Commerical Co-op Bank Ltd + --- + TGUX | The Gandhinagar Urban Co-op Bank Ltd + --- + TLPX | The Lunawada Peoples Co-op Bank Ltd + --- + TSIX | The Shillong Co-op Urban Bank Ltd + --- + UCUX | Universal Co-op Urban Bank Ltd + --- + UDVX | Udyam Vikas Sahakari Bank Ltd. Pune + --- + UPCX | Uttar Pradesh Co-op Bank Ltd + --- + VAIX | Vaishya Sahakari Bank Ltd Mumbai + --- + VCNB | The Vaish Co-op New Bank Ltd + --- + VICX | Vijay Commercial Co-op Bank Ltd + --- + WRCX | Warangal Urban Co-op Bank Ltd + --- + YAVX | The Yavatmal Urban Co-op Bank Ltd Yavatmal + + + + +### List of Banks - Consolidated + + + Bank Name | Bank Code | Netbanking | Debit Card | Aadhaar + --- + State Bank of India | SBIN | ✓ | ✓ | NA + --- + Axis Bank | UTIB | ✓ | ✓ | ✓ + --- + HDFC Bank | HDFC | ✓ | ✓ | ✓ + --- + ICICI Bank | ICIC | ✓ | ✓ | ✓ + --- + Abhyudaya Co-op Bank | ABHY | | | ✓ + --- + The Adarsh Co-op Urban Bank Ltd | ACUX | | | ✓ + --- + The Ahmednagar District Central Co-op Bank Ltd | AHMX | | | ✓ + --- + Aman Sahakari Bank Ltd. | AMAX | | | ✓ + --- + Ambarnath Jai Hind Co-op Bank Ltd | AJSX | | | ✓ + --- + The Andhra Pradesh State Co-op Bank Ltd | APBL | | | ✓ + --- + Alavi Co-op Bank Ltd | ALAX | | | ✓ + --- + AU Small Finance Bank | AUBL | ✓ | ✓ | ✓ + --- + Bank of Baroda | BARB_R | ✓ | ✓ | ✓ + --- + Bank of Maharashtra | MAHB | ✓ | ✓ | ✓ + --- + Bandhan Bank | BDBL | ✓ | | NA + --- + Bank of India | BKID | | ✓ | ✓ + --- + The Baroda City Co-op Bank Pvt Ltd | BARX | | | ✓ + --- + Bharat Co-op bank | BCBM | | | ✓ + --- + Canara Bank | CNRB | ✓ | | ✓ + --- + Central Bank of India | CBIN | ✓ | ✓ | ✓ + --- + Citi Bank | CITI | ✓ | ✓ | NA + --- + City Union Bank | CIUB | ✓ | | ✓ + --- + Cosmos Co-op Bank | COSB | ✓ | | ✓ + --- + Dhanalaxmi Bank | DLXB | ✓ | ✓ | ✓ + --- + DBS Bank India Ltd | DBSS | ✓ | ✓ | NA + --- + DCB Bank | DCBL | ✓ | ✓ | ✓ + --- + Deutsche Bank AG | DEUT | ✓ | ✓ | ✓ + --- + Durgapur Steel Peoples Co-op Bank Ltd | DSPX | | | ✓ + --- + Equitas Small Finance Bank | ESFB | ✓ | ✓ | NA + --- + Federal Bank | FDRL | ✓ | ✓ | ✓ + --- + GP Parsik Sahakari Bank Ltd Kalwa Thane | PJSB | | | ✓ + --- + The Gujarat State Co-op Bank Ltd | GSCB | | | ✓ + --- + Hongkong and Shanghai Banking Corporation (HSBC) | HSBC | ✓ | | ✓ + --- + IDBI Bank | IBKL | ✓ | | ✓ + --- + IDFC First Bank | IDFB | ✓ | ✓ | ✓ + --- + Indian Bank | IDIB | ✓ | | ✓ + --- + Indian Overseas Bank | IOBA | | | ✓ + --- + Indusind Bank | INDB | ✓ | ✓ | ✓ + --- + Jana Small Finance Bank | JSFB | ✓ | ✓ | NA + --- + The Jalgaon Peoples Co-op Bank Ltd | JPCB | | | ✓ + --- + J & K Grameen Bank | XJKG | | | ✓ + --- + Jio Payments Bank | JIOP | ✓ | | NA + --- + Karnataka Bank Ltd | KARB | ✓ | ✓ | ✓ + --- + Karur Vysya Bank | KVBL | ✓ | | ✓ + --- + Kotak Mahindra Bank | KKBK | ✓ | ✓ | ✓ + --- + Manorama Co-op Bank Ltd Solapur | MSOX | | | ✓ + --- + Model Co-op Bank Ltd | MDEX | | | ✓ + --- + New India Co-op Bank Ltd | NICB | | | ✓ + --- + Oriental Bank of Commerce | ORBC | ✓ | | ✓ + --- + Osmanabad Janata Sahakari Bank Ltd | OSMX | | | ✓ + --- + Palus Sahakari Bank Ltd | PLUX | | | ✓ + --- + Paschim Banga Gramin Bank | PASX | | | ✓ + --- + Paytm Payments Bank | PYTM | ✓ | ✓ | ✓ + --- + The Pochampally Co-op Urban Bank Ltd | PCUX | | | ✓ + --- + Punjab National Bank | PUNB_R | ✓ | ✓ | ✓ + --- + Rajadhani Co-op Urban Bank Limited | RCUX | | | ✓ + --- + RBL Bank | RATN | ✓ | ✓ | ✓ + --- + Rendal Sahakari Bank Ltd Rendal | REBX | | | ✓ + --- + Saraspur Nagarik Co Op Bank Ltd | SNAX | | | ✓ + --- + Saraswat Co-op Bank Ltd | SRCB | | | ✓ + --- + Shree Kadi Nagarik Sahakari Bank Ltd | KDIX | | | ✓ + --- + Shrikrishna Co-op Bank Ltd Umrer | SKCX | | | ✓ + --- + The Sircilla Co-op Urban Bank Ltd | SIRX | | | ✓ + --- + Standard Charted Bank | SCBL | ✓ | | ✓ + --- + South Indian Bank | SIBL | ✓ | ✓ | ✓ + --- + The Surat District Co-op Bank | SDCB | | | ✓ + --- + The Surat Mercantile Co-op Bank Ltd | SUMX | | | ✓ + --- + The Sutex Co-op Bank Ltd | SUTB | | | ✓ + --- + SVC Co-op Bank Ltd | SVCB | | | ✓ + --- + Syndicate Bank | SYNB | ✓ | | NA + --- + Tamilnadu Mercantile Bank | TMBL | ✓ | ✓ | ✓ + --- + The Ajara Urban Co-op Bank Ltd | AUCX | | | ✓ + --- + The Burdwan Central Co-op Bank Ltd | BURX | | | ✓ + --- + The Income Tax Dept Co-op Bank Ltd | ITDX | | | ✓ + --- + Tumkur Grain Merchants Co-op Bank Ltd | TGMB | | | ✓ + --- + UCO Bank | UCBA | | | ✓ + --- + Ujjivan Small Finance Bank | UJVN | ✓ | ✓ | NA + --- + Union Bank of India | UBIN | ✓ | ✓ | ✓ + --- + THE UNION CO-OP BANK LTD | TUNX | | | ✓ + --- + Varachha Co-op Bank | VARA | ✓ | | ✓ + --- + Yes Bank | YESB | ✓ | ✓ | ✓ + --- + The WAI URBAN CO-OP BANK LTD | WAIX | | | ✓ + --- + The Khamgaon Urban Co-op Bank Ltd | KHUX | | | ✓ + --- + The Ahmedabad District Co-op Bank Ltd | ADBX | | | ✓ + --- + Arvind Sahakari Bank Ltd | ASKX | | | ✓ + --- + Gujarat Ambuja Co-op Bank Ltd | GACX | | | ✓ + --- + Solapur Siddheshwar Sahakari Bank Ltd | SDHX | | | ✓ + --- + The Nainital Bank Ltd | NTBL | | | ✓ + --- + Maratha Co-op Bank Ltd | MRTX | | | ✓ + --- + The Surat Peoples Co-op Bank Ltd | SPCB | | | ✓ + --- + THE UNION CO-OP BANK LTD MAHINAGAR | TUCL | | | ✓ + --- + The Muslim Co-op Bank Ltd | MUSX | | | ✓ + --- + The Malad Sahakari Bank Ltd | MSBL | | | ✓ + --- + Mansing Co-op Bank Ltd | MGCX | | | ✓ + --- + Rajkot Peoples Co-op Bank Ltd | RAKX | | | ✓ + --- + The Navnirman Co-op Bank Ltd | NAVX | | | ✓ + --- + DHARMAVIR SAMBHAJI URBAN CO-OP BANK LTD | DSUX | | | ✓ + --- + The Goa Urban Co-op Bank Ltd | GUCX | | | ✓ + --- + NAGRIK SAHAKARI BANK LTD INDORE | NSIX | | | ✓ + --- + The Grain Merchants Co-op Bank Ltd | GRAX | | | ✓ + --- + Merchants Liberal Co-op Bank | MLCG | | | ✓ + --- + Parshwanath Co-op. Bank Ltd | HPCX | | | ✓ + --- + The Ashta Peoples Co-op Bank Ltd | ASHX | | | ✓ + --- + The Kottayam District Co-op Bank Ltd | KTBX | | | ✓ + --- + The Kozhikode District Co-op Bank | KDCX | | | ✓ + --- + Andhra Pradesh Grameena Vikas Bank | APGX | | | ✓ + --- + Akola Janata Commercial Co-op Bank Ltd | AJKB | | | ✓ + --- + Malappuram District Co-op Bank | MPDX | | | ✓ + --- + Uttar Bihar Gramin Bank | UBGX | | | ✓ + --- + Pathanamthitta District Co-op Bank | PATX | | | ✓ + --- + Adv. Shamraoji Shinde Satyashodhak Sahakari Bank Ltd | SATX | | | ✓ + --- + Prime Co-op Bank Ltd | PMEC | | | ✓ + --- + Pali Urban Co-op Bank Ltd | PALX | | | ✓ + --- + The Ojhar Merchant Co-op Bank Ltd | OMCX | | | ✓ + --- + The Dahod Urban Co-op Bank Ltd | DHUX | | | ✓ + --- + The Sarvodaya Nagarik Sahakari Bank Ltd | SNBX | | | ✓ + --- + Shri Mahila Sewa Sahakari Bank Ltd | SEWX | | | ✓ + --- + Sindhudurg District Central Co-op Bank Ltd | SDCX | | | ✓ + --- + The Bhuj Mercantile Co-op Bank Ltd | BHJX | | | ✓ + --- + Amreli Jilla Madhyastha Sahakari Bank Ltd | AMRX | | | ✓ + --- + Ahmedabad Mercantile Co-op Bank Ltd | AMCB | | | ✓ + --- + The Himatnagar Nagarik Sahakari Bank Ltd | HMNX | | | ✓ + --- + Makarpura Industrial Estate Co-op Bank Ltd | MAKX | | | ✓ + --- + The Karnataka State Co-op Apex Bank Ltd | KSCB | | | ✓ + --- + The Calicut Co-op Urban Bank Ltd | CALX | | | ✓ + --- + Bombay Mercantile Co-op Bank Ltd | BMCB | | | ✓ + --- + Vishwas Co-op Bank Ltd | VCBX | | | ✓ + --- + The Unava Nagrik Sahakari Bank Ltd | UNSX | | | ✓ + --- + Uma Co-op Bank Ltd | UMAX | | | ✓ + --- + Urban Co-op Bank Ltd Dehradun | UCDX | | | ✓ + --- + The Bhuj Commercial Co-op Bank Ltd | BHCX | | | ✓ + --- + The Modasa Nagarik Sahakari Bank Ltd | TMSX | | | ✓ + --- + The Vallabh Vidhyanagar Commercial Co-op Bank Ltd | VVCX | | | ✓ + --- + Vidya Sahakari Bank Ltd | VSBX | | | ✓ + --- + Shivdaulat Sahakari Bank Ltd | SSBX | | | ✓ + --- + Sandur Pattana Souharda Sahakari Bank Niyamitha | SPSX | | | ✓ + --- + The Shirpur Peoples Co-op Bank Ltd | SPCX | | | ✓ + --- + Shree Chhani Nagarik Sahakari Bank | SCNX | | | ✓ + --- + The Veraval Peoples Co-op Bank Ltd | TVPX | | | ✓ + --- + The Dhanera Mercantile Co-op Bank Ltd | TDMX | | | ✓ + --- + The Bapunagar Mahila Co-op Bank Ltd | TBMX | | | ✓ + --- + The Adinath Co-op Bank Ltd | TACX | | | ✓ + --- + The Nabadwip Co-op Credit Bank Ltd | NCCX | | | ✓ + --- + The Nawanagar Co-op Bank Ltd | NAWX | | | ✓ + --- + The Nawanagar Co-op Bank Ltd | NAWX | | | ✓ + --- + The Meghalaya Co-op Apex Bank Ltd | MYAX | | ✓ | NA + --- + The Mahaveer Co-op Bank Ltd | MVCX | | | ✓ + --- + The Sabarkantha District Central Co-op Bank Ltd | SADX | | | ✓ + --- + Rajkot Commercial Co-op Bank Ltd | RACX | | | ✓ + --- + Peoples Urban Co-op Bank Ltd | PUBX | | | ✓ + --- + Pune Peoples Co-op Bank Ltd | PPBX | | | ✓ + --- + Jivan Commercial Co-op Bank Ltd | JVCX | | | ✓ + --- + Jalna Merchants Co-op Bank Ltd | JMCX | | | ✓ + --- + Janaseva Sahakari Bank (Borivli) Ltd | JASB | | | ✓ + --- + The Gandevi Peoples Co-op Bank Ltd | GPCX | | | ✓ + --- + The Mehsana District Central Co-op Bank Ltd | MSNX | | | ✓ + --- + Maharashtra State Co-op Bank Ltd | MSCI | | | ✓ + --- + The Kukarwada Nagarik Sahakari Bank Ltd | KUKX | | | ✓ + --- + The Kalol Nagarik Sahakari Bank Ltd | KNBX | | | ✓ + --- + The Banaskantha Mercantile Co-op Bank Ltd | BMPX | | | ✓ + --- + Adarniya P.D.Patilsaheb Sahakari Bank Ltd | APSX | | | ✓ + --- + Akhand Anand Co-op Bank Ltd | AACX | | | ✓ + --- + The Financial Co-op Bank Ltd | FINX | | | ✓ + --- + Dr. Babasaheb Ambedkar Sahkari Bank Ltd | DBAX | | | ✓ + --- + Budaun Jila Sahkari Bank Ltd Budaun | BUZX | | | ✓ + --- + Bhagini Nivedita Sahakari Bank Ltd | BNSX | | | ✓ + --- + The Baramati Sahakari Bank Ltd | BSBX | | | ✓ + --- + Dr. Ambedkar Nagrik Sahakari Bank Maryadit Gwalior | ABDX | | | ✓ + --- + Urban Co-op Bank Ltd Basti | UBBX | | | ✓ + --- + The Commercial Co-op Bank Ltd Jamnagar | CMLX | | | ✓ + --- + Sonbhadra Nagar Sahakari Bank Ltd | SONX | | | ✓ + --- + Mizoram Urban Co-op Development Bank Ltd | MZCX | | | ✓ + --- + Kavita Urban Co-op Bank Ltd | KVCX | | | ✓ + --- + Kolhapur Urban Co-op Bank Ltd | KUCX | | | ✓ + --- + Lokmangal Co-op Bank Ltd Solapur | LKMX | | | ✓ + --- + The Latur Urban Co-op Bank Ltd Latur | LATX | | | ✓ + --- + The National Co-op Bank Ltd Bangalore | NBBX | | | ✓ + --- + The Moirang Primary Co-op Bank Ltd | MPCX | | | ✓ + --- + The Pandharpur Urban Co-op Bank Ltd | PDUX | | | ✓ + --- + Nagar Vikas Sahakari Bank Ltd | NVSX | | | ✓ + --- + Shree Balaji Urban Co-op Bank Ltd | SBUX | | | ✓ + --- + Rajarambapu Sahakari Bank Ltd Peth | RBBX | | | ✓ + --- + S S L S A Kurundwad Urban Co-op Bank Ltd | SKUX | | | ✓ + --- + The Shimla Urban Co-op Bank Ltd | SHCX | | | ✓ + --- + Sadhana Sahakari Bank Ltd | SSKX | | | ✓ + --- + Shree Mahuva Nagrik Sahakari Bank Ltd | SMNX | | | ✓ + --- + The Udaipur Central Co-op Bank Ltd | UCCX | | | ✓ + --- + The Tirur Urban Co-op Bank Ltd | TTUX | | | ✓ + --- + The Hassan District Co-op Central Bank Ltd | HSDX | | | ✓ + --- + The Hamirpur District Co-op Bank Ltd | HAMX | | | ✓ + --- + The Imphal Urban Co-op Bank Ltd | IMPX | | | ✓ + --- + Indore Cloth Market Co-op Bank Ltd | ICMX | | | ✓ + --- + Indore Paraspar Sahkari Bank Ltd | IPSX | | | ✓ + --- + Indore Premier Co-op Bank Ltd Indore | IPCX | | | ✓ + --- + Jharneshwar Nagrik Sahakari Bank Maryadit | JHAX | | | ✓ + --- + Irinjalakuda Town Co-op Bank | ITCX | | | ✓ + --- + Janata Sahakari Bank Ltd | JSBP | | | ✓ + --- + The Jodhpur Central Co-op Bank Ltd | JODX | | | ✓ + --- + Krishna Mercantile Co-op Bank Ltd | KMCX | | | ✓ + --- + The Kalna Town Credit Co-op Bank Ltd | KALX | | | ✓ + --- + Shri Veershaiv Co-op Bank Ltd | VCCX | | | ✓ + --- + The Urban Co-op Bank Ltd Rourkela | UROX | | | ✓ + --- + Vikramaditya Nagrik Sahakari Bank | VIKX | | | ✓ + --- + The Veraval Mercantile Co-op Bank Ltd | VERX | | | ✓ + --- + Vidharbha Konkan Gramin Bank | WKGX | | | ✓ + --- + The Vaidyanath Urban Co-op Bank Ltd | VUCX | | | ✓ + --- + The Gandhi Co-op Urban Bank Ltd | GNCX | | | ✓ + --- + Pune Cantonment Sahakari Bank Ltd | PCTX | | | ✓ + --- + Railway Employees Co-op Banking Society Limited | RECX | | | ✓ + --- + Etah Urban Co-op Bank Ltd | EUCX | | | ✓ + --- + The Nanded Merchants Co-op Bank Ltd Nanded | TNMX | | | ✓ + --- + Sanmati Sahakari Bank Ltd | SISX | | | ✓ + --- + Nagrik Sahakari Bank Maryadit Vidisha | NBMX | | | ✓ + --- + Dombivli Nagari Sahakari Bank Ltd | DNSB | | | ✓ + --- + Chartered Sahakari Bank Niyamitha | CSBX | | | ✓ + --- + The Citizens Co-op Bank Ltd Jammu | CJAX | | | ✓ + --- + The Chamba Urban Co-op Bank Ltd Chamba | CHBX | | | ✓ + --- + The Bhavasara Kshatriya Co-op Bank Ltd | BKCX | | | ✓ + --- + The Bijnor Urban Co-op Bank Ltd | BJUX | | | ✓ + --- + Bhadohi Urban Co-op Bank Ltd Gyanpur | BHDX | | | ✓ + --- + Bhingar Urban Co-op Bank Ltd | BBLX | | | ✓ + --- + The Central Co-op Bank Ltd Bhilwara | CBHX | | | ✓ + --- + Bramhapuri Urban Co-op Bank Ltd | BRMX | | | ✓ + --- + The Boral Union Co-op Bank Ltd | BORX | | | ✓ + --- + Betul Nagrik Sahakari Bank Mydt | BNBX | | | ✓ + --- + Laxmibai Mahila Nagrik Sahakari Bank Maradit | LBMX | | | ✓ + --- + The Ghatal Peoples Co-op Bank Ltd | GHPX | | | ✓ + --- + The Agrasen Co-op Urban Bank Ltd | AGCX | | | ✓ + --- + Allahabad District Central Co-op Bank Ltd | ALLX | | | ✓ + --- + The Sarvodaya Co-op Bank Ltd Mumbai | SACX | | | ✓ + --- + Omkar Nagreeya Sahkari Bank Ltd | ONSX | | | ✓ + --- + The Nav Jeevan Co-op Bank Ltd | NJCX | | | ✓ + --- + The Sind Co-op Urban Bank Ltd | SNDX | | | ✓ + --- + The Sarangpur Co-op Bank Ltd | SNGX | | | ✓ + --- + The Manipur State Co-op Bank Ltd | MSCX | | | ✓ + --- + Sudha Co-op Urban Bank Ltd | SCUX | | | ✓ + --- + The Bihar State Co-op Bank Ltd | TBSX | | | ✓ + --- + The Sonepat Urban Co-op Bank Ltd | SNCX | | | ✓ + --- + Ahilyadevi Urban Co-op Bank LTD Solapur | AHUX | | | ✓ + --- + Andaman Nicobar State Co-op Bank Ltd | ANSX | | | ✓ + --- + Ambajogai Peoples Co-op Bank Ltd | AJPX | | | ✓ + --- + The Amravati District Central Co-op Bank Ltd | AVDX | | | ✓ + --- + The Anand Mercantile Co-op Bank Ltd | TAMX | | | ✓ + --- + The Saurashtra Co-op Bank Ltd | TSUX | | | ✓ + --- + Sardar Vallabhbhai Sahakari Bank Ltd | SAVX | | | ✓ + --- + Shree Mahaveer Urban Co-op Bank Ltd | SMUX | | | ✓ + --- + The Jamnagar Mahila Sahakari Bank Ltd | TJNX | | | ✓ + --- + Janata Sahakari Bank Ltd Amravati | JSMX | | | ✓ + --- + Vikas Souharda Co-op Bank Ltd | VSCX | | | ✓ + --- + Patan Nagarik Sahakari Bank Ltd | PTSX | | | ✓ + --- + The Guruvayur Co-op Urban Bank Ltd | GCBX | | | ✓ + --- + The Karnavati Co-op Bank Ltd | KRNX | | | ✓ + --- + The Bhagyodaya Co-op Bank Ltd | BHAX | | | ✓ + --- + Delhi Nagrik Sehkari Bank | DENS | | | ✓ + --- + The Nasik Merchants Co-op Bank Ltd | NMCB | | | ✓ + --- + The Sahyadri Sahakari Bank Ltd | SASA | | | ✓ + --- + The Malleswaram Co-op Bank Ltd | MABL | | | ✓ + --- + The Nasik Jilha Mahila Sahakari Bank Ltd | NJSX | | | ✓ + --- + Navi Mumbai Co-op Bank Ltd | NMCX | | | ✓ + --- + Nagar Sahakari Bank Ltd | NGRX | | | ✓ + --- + Kamala Co-op Bank Ltd Solapur | KAMX | | | ✓ + --- + Jodhpur Nagrik Sahakari Bank Ltd | JONX | | | ✓ + --- + The Neela Krishna Co-op Urban Bank Ltd | TNKX | | | ✓ + --- + Yadagiri Lakshmi Narsimha Swamy Co-op Urban Bank Ltd | YLNX | | | ✓ + --- + Ramrajya Sahakari Bank Ltd | RRSX | | | ✓ + --- + Patan Co-op Bank Ltd | PCBL | | | ✓ + --- + The Banaskantha District Central Co-op Bank Ltd | BKDX | | | ✓ + --- + Shri Adinath Co-op Bank Ltd | ADCX | | | ✓ + --- + Industrial Co-op Bank Ltd | ICBL | | | ✓ + --- + Bhilwara Mahila Urban Co-op Bank Ltd | BHUX | | | ✓ + --- + Banda Urban Co-op Bank Ltd | BDUX | | | ✓ + --- + Dr. Annasaheb Chougule Urban Co-op Bank Ltd Vadgaon | ACKX | | | ✓ + --- + Kankaria Maninagar Nagrik Sahkari Bank Ltd | KKMX | | | ✓ + --- + Malviya Urban Co-op Bank Ltd | MALX | | | ✓ + --- + The Satara District Central Co-op Bank Ltd | SDSX | | | ✓ + --- + TJSB Sahakari Bank Ltd | TJSB | | | ✓ + --- + The Trivandrum Co-op Urban Bank Ltd | TCUB | | | ✓ + --- + Airtel Payments Bank | AIRP | | ✓ | NA + --- + Capital Small Finance Bank Ltd | CLBL | | ✓ | NA + --- + The Kurla Nagarik Sahakari Bank Ltd | KNSB | | ✓ | NA + --- + Mahesh Sahakari Bank Ltd Pune | MHSX | | ✓ | NA + --- + The National Co-op Bank Ltd | NCBL | | ✓ | NA + --- + The Zoroastrian Co-op Bank Ltd | ZCBL | | ✓ | NA + --- + Karnataka Vikas Grameena Bank | KVGB | ✓ | | NA + --- + Andhra Pragathi Grameena Bank | APGB | ✓ | | ✓ + --- + The Abhinav Sahakari Bank Ltd | ABSB | | | ✓ + --- + Adarsh Co-op Bank Ltd | ACBX | | | ✓ + --- + Agartala Co-op Urban Bank Ltd | AGUX | | | ✓ + --- + The Alappuzha District Co-op Bank Ltd | APCX | | | ✓ + --- + AP Janata Co-op Urban Bank Ltd | APJX | | | ✓ + --- + AP Mahesh Co-op Bank Ltd | APMC | | | ✓ + --- + The Ap Mahajan Co-op Urban Bank Ltd | APMX | | | ✓ + --- + Apani Sahakari Bank Ltd | APNX | | | ✓ + --- + Arunachal Pradesh Rural Bank | APRX | | | ✓ + --- + Apna Sahakari Bank Ltd | ASBL | | | ✓ + --- + Ahmednagar Shahar Sahakari Bank Maryadit | ASBX | | | ✓ + --- + The Associate Co-op Bank Ltd | ASOX | | | ✓ + --- + Ashok Sahakari Bank Ltd | ASSX | | | ✓ + --- + Almora Urban Co-Operative Bank Ltd | AUCB | | | ✓ + --- + The Alwaye Urban Co-op Bank Ltd | AWCX | | | ✓ + --- + Bassein Catholic Co-op Bank Ltd | BACB | | | ✓ + --- + Brahmadeodada Mane Sahakari Bank Ltd | BHMX | | | ✓ + --- + Bhopal Co-op Central Bank Ltd | BHOX | | | ✓ + --- + The Chitnavispura Sahakari Bank Ltd | CHTX | | | ✓ + --- + The Co-op City Bank Ltd | COCX | | | ✓ + --- + The Catholic Syrian Bank | CSBK | | | ✓ + --- + The Citizen Co-op Bank Ltd | CTBX | | | ✓ + --- + Dharmapuri District Central Co-op Bank Ltd | DDBX | | | ✓ + --- + Development Co-op Bank Ltd, Kanpur | DEVX | | | ✓ + --- + The Delhi State Co-op Bank Ltd | DSCB | | | ✓ + --- + District Co-op Bank Ltd., Reabareli | DTCX | | | ✓ + --- + The Ernakulam District Co-op Bank Ltd | EDSX | | | ✓ + --- + GandhiBag Sahakari Bank Ltd., Nagpur | GSBX | | | ✓ + --- + The Himachal Pradesh State Co-op Bank Ltd | HPSX | | | ✓ + --- + Idukki District Co-op Bank Ltd | IDUX | | | ✓ + --- + Janaseva Sahakari Bank Ltd., Pune | JANA | | | ✓ + --- + Jamnagar District Co-op Bank Ltd | JCDX | | | ✓ + --- + Jamshedpur Urban Co-op Bank Ltd | JMHX | | | ✓ + --- + The Jamnagar People's Co-op Bank Ltd | JMPX | | | ✓ + --- + Janakalyan Sahakari Bank | JSBL | | | ✓ + --- + The Kanakamahalakshmi Co-op Bank Ltd | KBCX | | | ✓ + --- + The Khattri Co-op Urban Bank Ltd | KCUB | | | ✓ + --- + The Kannur Co-op Urban Bank Ltd | KCUX | | | ✓ + --- + Kerala Gramin Bank | KLGB | | | ✓ + --- + Kolhapur Mahila Sahakari Bank Ltd | KMSX | | | ✓ + --- + The Koylanchal Urban Co-op Bank Ltd | KOYX | | | ✓ + --- + Kashipur urban Co-op Bank Ltd | KSUX | | | ✓ + --- + Lokvikas Nagari Sahakari Bank Ltd., Aurangabad | LOKX | | | ✓ + --- + Maharashtra Gramin Bank | MGBX | | | ✓ + --- + Mahanagar Nagrik Sahakari Bank Maryadit | MHNX | | | ✓ + --- + Mansarovar Urban Co-op Bank Ltd | MSAX | | | ✓ + --- + The Meghalaya Co-op Apex Bank Ltd | MYAX | | | ✓ + --- + Nashik District Central Co-op Bank Ltd | NASX | | | ✓ + --- + Nilkanth Co-op Bank Ltd | NILX | | | ✓ + --- + Nagrik Sahkari Bank Ltd., Lucknow | NSBX | | | ✓ + --- + Odisha Gramya Bank | ODGB | | | ✓ + --- + Doha Bank QSC | OIBA | | | ✓ + --- + Puduvai Bharathiar Grama Bank | PBGX | | | ✓ + --- + Karnataka Gramin Bank | PGBX | | | ✓ + --- + Pragati Mahila Nagrik Sahkari Bank, Bhilai | PMNX | | | ✓ + --- + Poornawadi Nagrik Sahakari Bank, M.Beed | PNSX | | | ✓ + --- + Paraspar Sahayak Co-op Bank Ltd | PRPX | | | ✓ + --- + Pragati Sahakari Bank Ltd | PSBX | | | ✓ + --- + The Punjab State Co-op Bank Ltd | PSCX | | | ✓ + --- + The Patiala Central Co-op Bank Ltd | PTCX | | | ✓ + --- + Purvanchal Co-op Bank Ltd., Ghazipur | PVCX | | | ✓ + --- + Quilon Co-op Urban Bank Ltd | QUCX | | | ✓ + --- + Ropar Central Co-op Bank | RCCX | | | ✓ + --- + Ramgarhia Co-op Bank Ltd | RGCX | | | ✓ + --- + Rajgurunagar Sahakari Bank Ltd | RGSX | | | ✓ + --- + Rampur Zila Sahakari Bank Ltd | RZSX | | | ✓ + --- + Shree Bhavnagar Nagrik Sahakari Bank Ltd | SBNX | | | ✓ + --- + Sree Charan Souharda Co-op Bank Ltd | SCSX | | | ✓ + --- + Sadguru Nagrik Sahakari Bank Maryadit | SGSX | | | ✓ + --- + Sir M Visvesvaraya Co-op Bank Ltd | SMVC | | | ✓ + --- + Shramik Nagrik Sahakari Bank Ltd | SNKX | | | ✓ + --- + Saptagiri Grameena Bank | SPBX | | | ✓ + --- + The Solapur Social Urban Co-op Bank Ltd | SSLX | | | ✓ + --- + Shri Vinayak Sahakari Bank Ltd | SVSX | | | ✓ + --- + The Annasaheb Savant Co-op Urban Bank Ltd., Mahad | TASX | | | ✓ + --- + Thane Bharat Sahakari Bank Ltd | TBSB | | | ✓ + --- + The Thane District Central Co-op Bank Ltd | TDCB | | | ✓ + --- + Tehri Garhwal Zila Sahkari Bank Ltd | TEHX | | | ✓ + --- + The Thoothukudi District Central Co-op Bank Ltd | THOX | | | ✓ + --- + The Tirunelveli District Central Co-op Bank Ltd | TIRX | | | ✓ + --- + Textile Co-op Bank Ltd | TTLX | | | ✓ + --- + The Udaipur Mahila Urban Co-op Bank Ltd | TUMX | | | ✓ + --- + The Umreth Urban Co-op Bank Ltd | UMCX | | | ✓ + --- + The United Co-op Bank Ltd | UNIX | | | ✓ + --- + Vidyanand Co-op Bank Ltd | VDYX | | | ✓ + --- + Vasai Janata Sahakari Bank Ltd | VJSX | | | ✓ + --- + Zila Sahkari Bank Ltd., Ghaziabad | ZSBL | | | ✓ + --- + Zila Sahkari Bank Ltd., Garhwal Kotdwar | ZSGX | | | ✓ + --- + Zila Sahakari Bank Ltd., Haridwar | ZSHX | | | ✓ + --- + Zila Sahkari Bank Ltd., Meerut | ZSMX | | | ✓ + --- + Sree Banashankari Mahila Co-op Bank Ltd | SBMX | | | ✓ + --- + Sree Banashankari Mahila Co-op Bank Ltd | SBMX | | | ✓ + --- + Nagarik Sahakari Bank Maryadit Durg | NGSX | | | ✓ + --- + Progressive Co-op Bank Ltd | PGCX | | | ✓ + --- + The Akola District Central Co-op Bank Ltd | ADCC | | | ✓ + --- + Loknete Dattaji Patil Sahakari Bank Ltd | LDPX | | | ✓ + --- + Dapoli Urban Co-op Bank Ltd | DOBX | | | ✓ + --- + Indore Swayamsiddh Mahila Co-op Bank Ltd | ISMX | | | ✓ + --- + The Bihar Awami Co-op Bank Ltd | BACX | | | ✓ + --- + Banaras Mercantile Co-op Bank Ltd | BANX | | | ✓ + --- + Shri Basaveshwar Sahakari Bank Nyt., Bagalkot | BASX | | | ✓ + --- + Col RD Nikam Sainik Sahakari Bank Ltd | RDNX | | | ✓ + --- + The Urban Co-op Bank Ltd., Saharanpur | TUOX | | | ✓ + --- + Yavatmal District Central Co-op Bank Ltd | YADX | | | ✓ + --- + Nagarik Sahakari Bank Ltd., Bhiwandi | NSBB | | | ✓ + --- + Hanamasagar Urban Co-op Bank Ltd | HUCH | | | ✓ + --- + Shri Gaja Maharaj Urban Co-op Bank Ltd | SGMB | | | ✓ + --- + ESAF Small Finance Bank Ltd | ESAF | ✓ | ✓ | ✓ + --- + NSDL Payments Bank | NSPB | ✓ | ✓ | NA + --- + Suryoday Small Finance Bank Ltd | SURY | ✓ | ✓ | ✓ + --- + Punjab & Sind Bank | PSIB | ✓ | ✓ | ✓ + --- + Fincare Small Finance Bank Ltd | FINF | | ✓ | ✓ + --- + The Kalupur Commercial Co-op Bank | KCCB | | ✓ | NA + --- + Utkarsh Small Finance Bank Ltd | UTKS | | ✓ | NA + --- + The Hongkong And Shanghai Banking Corporation Ltd | HSBC | | ✓ | NA + --- + Bandhan Bank Ltd | BDBL | | ✓ | NA + --- + Indian Overseas Bank | IOBA | | ✓ | NA + --- + Karur Vysa Bank | KVBL | | ✓ | NA + --- + UCO Bank | UCBA | | ✓ | NA + --- + SBM Bank India Ltd | STCB | | ✓ | NA + --- + Andhra Pragathi Grameena Bank | APGB | | ✓ | NA + --- + The Cosmos Co-op Bank Ltd | COSB | | ✓ | NA + --- + The Varachha Co-op Bank Ltd | VARA | | ✓ | NA + --- + Karnataka Vikas Grameena Bank | KVGB | | ✓ | NA + --- + The Jammu And Kashmir Bank Ltd | JAKA | | ✓ | NA + --- + Chhattisgarh Gramin Bank | CGBX | | ✓ | NA + --- + Ellaquai Dehati Bank | EDBX | | ✓ | NA + --- + Fino Payments Bank Ltd | FINO | | ✓ | NA + --- + Jio Payments Bank Ltd | JIOP | | ✓ | NA + --- + Rajarshi Shahu Sahakari Bank Ltd | RSSX | | ✓ | NA + --- + Abhinandan Urban Co-op Bank Amravati | ABUX | | | ✓ + --- + The Agrasen Nagari Sahakari Bank Ltd | AGSX | | | ✓ + --- + The Bavla Nagrik Sahakari Bank Ltd | BAVX | | | ✓ + --- + The Bantra Co-op Bank Ltd | BCBX | | | ✓ + --- + BHEL Employees Co-op Bank Ltd | BHEX | | | ✓ + --- + Bharati Sahakari Bank Ltd Pune | BHSX | | | ✓ + --- + Bhatpara Naihati Co-op Bank Ltd | BNCX | | | ✓ + --- + The Baroda Central Co-op Bank Ltd | BRDX | | | ✓ + --- + Chennai Central Co-op Bank Ltd | CCCX | | | ✓ + --- + Citibank N A | CITI | | | ✓ + --- + Capital Small Finance Bank Ltd | CLBL | | | ✓ + --- + Colour Merchants Co-op Bank Ltd | CMCB | | | ✓ + --- + The Coimbatore District Central Co-op Bank Ltd | CMDX | | | ✓ + --- + The Co-op Bank Of Mehsana Ltd | COMX | | | ✓ + --- + Citizen Co-op Bank Ltd Noida | CZCX | | | ✓ + --- + Churu Zila Urban Co-op Bank Ltd | CZUX | | | ✓ + --- + The Dahod Mercantile Co-op Bank Ltd | DAHX | | | ✓ + --- + Dindigul Central Co-op Bank Ltd | DCBX | | | ✓ + --- + Fino Payments Bank Ltd | FINO | | | ✓ + --- + The Guntur Co-op Urban Bank Ltd | GUNX | | | ✓ + --- + Sarva Haryana Gramin Bank | HGBX | | | ✓ + --- + The J And K State Co-op Bank Ltd | JKSX | | | ✓ + --- + Jabalpur Mahila Nagrik Sahkari Bank Maryadit | JMNX | | | ✓ + --- + The Kalupur Commercial Co-op Bank | KCCB | | | ✓ + --- + The Kheda Peoples Co-op Bank Ltd | KHDX | | | ✓ + --- + The Kranthi Co-op Urban Bank Ltd | KRTX | | | ✓ + --- + The Mattancherry Sarvajanik Co-op Bank Ltd | MCSX | | | ✓ + --- + The Mehmadabad Urban Peoples Co-op Bank Ltd | MUPX | | | ✓ + --- + The Meghalaya Co-op Apex Bank Ltd | MYAX | | | ✓ + --- + Nainital District Co-op Bank Ltd | NAIX | | | ✓ + --- + Navsarjan Industrial Co-op Bank Ltd | NBSX | | | ✓ + --- + The Puducherry State Co-op Bank Ltd | PCSX | | | ✓ + --- + Priyadarshani Nagari Sahakari Bank Ltd Jalna | PDSX | | | ✓ + --- + Panvel Co-op Urban Bank Ltd | PNVX | | | ✓ + --- + The Patan Urban Co-op Bank Ltd Patan | PTNX | | | ✓ + --- + Sadhana Sahakari Bank Ltd Pune | SAHX | | | ✓ + --- + SBPP Co-op Bank Ltd | SBPX | | | ✓ + --- + Shri Bharat Urban Co-op Bank Ltd Jaysingpur | SBUJ | | | ✓ + --- + The Sevalia Urban Co-op Bank Ltd | SEUX | | | ✓ + --- + Shree Mahesh Co-op Bank Ltd Nashik | SHRX | | | ✓ + --- + Sharad Sahakari Bank Ltd | SHSX | | | ✓ + --- + Shree Bharat Co-op Bank Ltd | SRCX | | | ✓ + --- + Surat National Co-op Bank Ltd | SUNB | | | ✓ + --- + Suvarnayug Sahakari Bank Ltd | SUVX | | | ✓ + --- + Sarvodaya Commerical Co-op Bank Ltd | SVCX | | | ✓ + --- + The Gandhinagar Urban Co-op Bank Ltd | TGUX | | | ✓ + --- + The Lunawada Peoples Co-op Bank Ltd | TLPX | | | ✓ + --- + The Shillong Co-op Urban Bank Ltd | TSIX | | | ✓ + --- + Universal Co-op Urban Bank Ltd | UCUX | | | ✓ + --- + Udyam Vikas Sahakari Bank Ltd. Pune | UDVX | | | ✓ + --- + Uttar Pradesh Co-op Bank Ltd | UPCX | | | ✓ + --- + Vaishya Sahakari Bank Ltd Mumbai | VAIX | | | ✓ + --- + The Vaish Co-op New Bank Ltd | VCNB | | | ✓ + --- + Vijay Commercial Co-op Bank Ltd | VICX | | | ✓ + --- + Warangal Urban Co-op Bank Ltd | WRCX | | | ✓ + --- + The Yavatmal Urban Co-op Bank Ltd Yavatmal | YAVX | | | ✓ + + + +## Cards + +Following is the list of banks that support cards. + +Bank Name | Bank Code +--- +ICICI Bank | ICIC +--- +HDFC Bank | HDFC +--- +Axis Bank | UTIB +--- +State Bank of India | SBIN +--- +Hongkong & Shanghai Banking Corporation | HSBC +--- +Allahabad Bank | ALLA +--- +Andhra Bank | ANDB +--- +AU Small Finance Bank | AUBL +--- +Bank of Baroda | BARB +--- +Bank of India | BKID +--- +Bank of Maharashtra | MAHB +--- +Canara Bank | CNRB +--- +CITI Bank | CITI +--- +City Union Bank | CIUB +--- +Corporation Bank | CORP +--- +DCB Bank | DCBL +--- +Dena Bank | BKDN +--- +Equitas Small Finance Bank | ESFB +--- +Federal Bank | FDRL +--- +IDBI | IBKL +--- +IDFC FIRST Bank | IDFB +--- +Indian Bank | IDIB +--- +Indian Overseas Bank | IOBA +--- +Indusind Bank | INDB +--- +Jupiter | Fintechs +--- +Karnataka Bank | KARB +--- +Karur Vysya Bank | KVBL +--- +Kotak Mahindra Bank | KKBK +--- +Niyo Global Cards | Fintechs +--- +One Card | Fintechs +--- +Punjab National Bank | PUNB +--- +RazorpayX Corporate Cards | Fintechs +--- +RBL Bank | RATN +--- +SBM Bank | STCB +--- +Slice | Fintechs +--- +South Indian Bank | SIBL +--- +Standard Chartered Bank | SCBL +--- +State Bank of Mysore | SBMY +--- +Syndicate Bank | SYNB +--- +Union Bank of India | UBIN +--- +Vijaya Bank | VIJB +--- +Yes Bank | YESB + +> **INFO** +> +> +> **Handy Tips** +> +> - We support Visa, Mastercard and RuPay cards of all major banks. +> - Please contact our support team if you are facing difficulties with card payments from any of the major banks on the above list. +> + +## UPI Autopay + +Following is the list of UPI Autopay supported banks and apps: + + +### Frequently Used UPI Autopay Applications + + Below are some of the frequently used UPI applications and their handles: + + + Applications | Handles ₹ 15,000 + --- + PhonePe | @ybl, @ibl and @axl | N/A + --- + GooglePay | @okhdfcbank, @okicici and @okaxis | @okhdfcbank, @okicici and @okaxis + --- + Paytm | @paytm | @paytm + --- + BHIM | @upi | N/A + --- + Amazon Pay | @apl and @yapl | @apl and @yapl + --- + IndusInd Bank App | @indus | N/A + + + + +### Other UPI Autopay Applications + + Below are the other UPI applications and their handles: + + + Applications | Handles + --- + BHIM Axis Pay | @axisbank and @sliceaxis + --- + Bhim Baroda Pay | @barodampay + --- + BHIM BOI UPI | @boi + --- + BHIM DLB UPI | @dlb + --- + BHIM IndusPay | @indus + --- + Canara Bank | @cnrb + --- + iMobile Pay | @icici + --- + NSDL Payments Bank | @nsdl + --- + DakPay | @postbank + --- + MobiKwik | @ikwik + --- + Digibank | @dbs + --- + PayZapp | @pz + + + + + + +### Supported Amount Limit + + + PSP apps | Mandate Maximum Amount ₹15,000 + --- + PhonePe | Yes | No + --- + GooglePay - okhdfcbank | Yes | Yes + --- + GooglePay - okaxis | Yes | Yes + --- + GooglePay - okicici | Yes | Yes + --- + GooglePay - oksbi | Yes | Yes + --- + BHIM | Yes | No + --- + Paytm | Yes | Yes + --- + Amazon Pay | Yes | Yes + + + + +### Supported MCCs + + For certain MCCs, the maximum amount limit for one transaction is ₹1,00,000. Given below is the list of supported MCCs, issuing banks and PSP applications. + + S No. | MCCs | Description + --- + 1 | 5413 | Credit Card Bill Payments + --- + 2 | 5960 | Direct Marketing Insurance Services + --- + 3 | 6012 | Financial Institutions Merchandise and Services + --- + 4 | 6211 | Securities brokers and dealers + --- + 5 | 6300 | Insurance sales, underwriting and premiums + --- + 6 | 6381 | Insurance Premiums + --- + 7 | 6399 | Insurance + --- + 8 | 6529 | LIC + + + +### Intent Support With PSP Apps + +The below table gives information about the frequently used intent-supported PSP apps on different platforms and checkout integrations. + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | x | ✓ | ✓ + --- + PhonePe | ✓ | ✓ | ✓ + --- + Paytm | ✓ | ✓ | ✓ + --- + Amazon Pay | x | x | x + --- + BHIM | x | ✓ | x + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | x + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | x + --- + Amazon Pay | x | ✓ | x + --- + BHIM | x | ✓ | x + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | x + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | x + --- + Amazon Pay | ✓ | ✓ | x + --- + BHIM | ✓ | ✓ | x + --- + + + +### Intent Support With PSP Apps for TPV + +The below table gives information about the frequently used intent-supported PSP apps for TPV on different platforms and checkout integrations. + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | ✓ + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | ✓ + --- + Amazon Pay | x | ✓ | x + --- + BHIM | x | ✓ | x + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | ✓ + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | ✓ + --- + Amazon Pay | x | ✓ | x + --- + BHIM | x | ✓ | x + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | x + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | x + --- + Amazon Pay | ✓ | ✓ | x + --- + BHIM | ✓ | ✓ | x + --- + + + +> **WARN** +> +> +> **Watch Out!** +> +> - You should contact our [Support team](https://razorpay.com/support/#request) to enable PSP apps other than PhonePe and Paytm on Standard Checkout for UPI TPV. Watch this video on how to get it enabled. +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> - UPI Intent TPV is not supported for @okaxis handle. +> + +### Intent Support With PSP Apps for OC125 + +The below table gives information about the frequently used intent-supported PSP apps for OC125 (restrict pausing and cancelling mandate) on different platforms and checkout integrations. + +> **WARN** +> +> +> **Watch Out!** +> +> OC125 is supported only for lending businesses. +> + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | ✓ + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | ✓ + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | ✓ + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | ✓ + --- + + + + + PSP Apps | mWeb | Android SDK | iOS SDK + --- + GPay | ✓ | ✓ | x + --- + PhonePe | ✓ | ✓ | x + --- + Paytm | ✓ | ✓ | x + --- + + + +> **WARN** +> +> +> **Watch Out!** +> +> - You should contact our [Support team](https://razorpay.com/support/#request) to enable UPI Intent on Standard Checkout. Watch this video on how to get it enabled. +> ![Feature Request GIF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/feature-request.gif.md) +> - UPI Intent is not supported for @okaxis handle. +> + +## List of Supported Banks - UPI Autopay + +Refer to the [list of banks that support UPI Autopay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/upi/supported-banks.md#supported-banks). + +## Fetch Supported Card Networks and Banks + +Use the below endpoint to fetch a list of supported card networks and banks available for subscription. + +/methods + +> **INFO** +> +> +> **[YOUR_KEY_ID] Required** +> +> To fire this API, you need to provide your [KEY_ID] for authorization. Your [KEY_SECRET] is not required and should not be passed. +> + +```curl: Request +curl -u [YOUR_KEY_ID] \ + -X GET https://api.razorpay.com/v1/methods +```json: Response +{ + "entity": "methods", + ... + ... + ... + "nach": true, + ... + ... + ... + "recurring": { + "card": { + "credit": [ + "MasterCard", + "Visa" + ] + }, + "emandate": { + "ANDB": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "Andhra Bank" + }, + "UTIB": { + "auth_types": [ + "netbanking" + ], + "name": "Axis Bank" + }, + "BARB_R": { + "auth_types": [ + "netbanking" + ], + "name": "Bank of Baroda - Retail Banking" + }, + "MAHB": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "Bank of Maharashtra" + }, + "CNRB": { + "auth_types": [ + "netbanking" + ], + "name": "Canara Bank" + }, + "CBIN": { + "auth_types": [ + "netbanking" + ], + "name": "Central Bank of India" + }, + "CIUB": { + "auth_types": [ + "netbanking" + ], + "name": "City Union Bank" + }, + "COSB": { + "auth_types": [ + "netbanking" + ], + "name": "Cosmos Co-operative Bank" + }, + "DEUT": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "Deutsche Bank" + }, + "DLXB": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "Dhanlaxmi Bank" + }, + "ESFB": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "Equitas Small Finance Bank" + }, + "FDRL": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "Federal Bank" + }, + "HDFC": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "HDFC Bank" + }, + "HSBC": { + "auth_types": [ + "netbanking" + ], + "name": "Hongkong & Shanghai Banking Corporation" + }, + "ICIC": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "ICICI Bank" + }, + "IBKL": { + "auth_types": [ + "netbanking" + ], + "name": "IDBI" + }, + "IDFB": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "IDFC FIRST Bank" + }, + "IOBA": { + "auth_types": [ + "netbanking" + ], + "name": "Indian Overseas Bank" + }, + "INDB": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "Indusind Bank" + }, + "KARB": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "Karnataka Bank" + }, + "KKBK": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "Kotak Mahindra Bank" + }, + "ORBC": { + "auth_types": [ + "netbanking" + ], + "name": "PNB (Erstwhile-Oriental Bank of Commerce)" + }, + "PYTM": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "Paytm Payments Bank" + }, + "PUNB_R": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "Punjab National Bank - Retail Banking" + }, + "RATN": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "RBL Bank" + }, + "SIBL": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "South Indian Bank" + }, + "SCBL": { + "auth_types": [ + "netbanking" + ], + "name": "Standard Chartered Bank" + }, + "SBIN": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "State Bank of India" + }, + "TMBL": { + "auth_types": [ + "netbanking" + ], + "name": "Tamilnadu Mercantile Bank" + }, + "USFB": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "Ujjivan Small Finance Bank" + }, + "UBIN": { + "auth_types": [ + "netbanking" + ], + "name": "Union Bank of India" + }, + "YESB": { + "auth_types": [ + "netbanking", + "debitcard" + ], + "name": "Yes Bank" + }, + "AUBL": { + "auth_types": [ + "debitcard" + ], + "name": "AU Small Finance Bank" + }, + "CITI": { + "auth_types": [ + "debitcard" + ], + "name": "CITI Bank" + }, + "DCBL": { + "auth_types": [ + "debitcard" + ], + "name": "DCB Bank" + } + }, + "nach": true + }, + ... + ... + ... +} +``` + +### Related Information + +- [About Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) +- [Subscription Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/workflow.md) +- [Subscription States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) +- [Create Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md) +- [Test Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/test.md) +- [Subscriptions APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/apis.md) diff --git a/llm-content/payments/subscriptions/supported-payment-methods.md b/llm-content/payments/subscriptions/supported-payment-methods.md new file mode 100644 index 00000000..515c9a00 --- /dev/null +++ b/llm-content/payments/subscriptions/supported-payment-methods.md @@ -0,0 +1,63 @@ +--- +title: Payments | Subscriptions +heading: Supported Payment Methods +description: Learn about the payment methods supported by Razorpay Subscriptions, including Cards, UPI Autopay and Emandate. +--- + +# Supported Payment Methods + +Razorpay Subscriptions supports Cards, UPI Autopay and Emandate. The table below provides a summary of each payment method, the supported networks or banks, and the maximum subscription amount allowed. + +## Payment Methods Overview + + +Payment Method | Supported Networks / Banks | Maximum Subscription Amount +---- +Cards | Visa, Mastercard and RuPay | [Refer to monetary limits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/faqs.md#7-is-there-a-maximum-monetary-limit-for) +--- +UPI Autopay | [Popular UPI apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md#upi-autopay) and [NPCI-supported banks](https://www.npci.org.in/product/autopay/all-members) | Up to ₹1,00,000 (mandate creation) +Frictionless debits: ₹15,000 (all) / ₹1,00,000 (BFSI only) +--- +Emandate (eNACH) | [NPCI-supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md#emandate) | ₹1,00,00,000 + +## Cards + +Customers can authorise subscriptions using their card. They enter their card details to authorise the subscription, similar to a regular one-time online payment. The payment is then debited automatically based on the selected plan. + +Standing Instructions (SI) on cards are supported on **Visa**, **Mastercard** and **RuPay** cards of all major banks. For the list of supported banks, see [Supported Banks — Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md#cards). + +For maximum monetary limits for card mandates, see [Card mandate limits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/faqs.md#7-is-there-a-maximum-monetary-limit-for). + +> **INFO** +> +> +> **Handy Tips** + +> +> For card-based subscriptions, customer card details must be tokenised as per applicable laws. Customer consent is explicitly taken for tokenising the card to process e-mandate/subscription transactions. +> + +## UPI Autopay + +With UPI Autopay, customers can pay for subscriptions using any UPI application. They must enter their UPI VPA and authorise the subscription first. Razorpay supports popular UPI apps including PhonePe, Google Pay, Paytm, BHIM and more. + +For the complete list of supported UPI applications, handles and banks, see [Supported Banks and Apps — UPI Autopay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md#upi-autopay). + +## Emandate (eNACH) + +Emandate is a digital payment service that enables customers to set up recurring payments using their bank account. With Emandate, the customer provides standing instructions to their issuing bank, allowing them to debit the specified amount from their bank account automatically at fixed intervals. + +Customers can authorise an Emandate subscription using one of the following methods: + +- **Netbanking**: The customer logs in to their bank's netbanking portal to authorise the mandate. +- **Debit Card**: The customer enters their debit card details to authorise. +- **Aadhaar**: The customer uses Aadhaar-based authentication to authorise. + +### Related Information + +- [About Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) +- [Subscription Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/workflow.md) +- [Supported Banks and Apps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/supported-banks-apps.md) +- [Create Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md) +- [Test Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/test.md) +- [Payment Retries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md) diff --git a/llm-content/payments/subscriptions/test.md b/llm-content/payments/subscriptions/test.md new file mode 100644 index 00000000..bd4dc705 --- /dev/null +++ b/llm-content/payments/subscriptions/test.md @@ -0,0 +1,436 @@ +--- +title: Test Subscriptions +description: Test Razorpay Subscriptions, Plans, authenticate transaction and cancellation using Razorpay APIs or from the Razorpay Dashboard. +--- + +# Test Subscriptions + +Check the Prerequisites and steps to test the Subscriptions and the various flows. + +## Prerequisites + +- Use your test [KEY_ID] and [KEY_SECRET] while testing. This can be generated from the Dashboard by [generating API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md) in the test mode. +- Ensure you are using your Dashboard in the test mode. Some options mentioned in this article are available only in the test mode. + +## Steps to Test Subscriptions + +To test Subscriptions: + + +### 1. Configure a Webhook + + Before you create Subscriptions, [configure a test webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) to receive notifications regarding Subscriptions. + + + +### 2. Create a Plan + + Create a Plan from your [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-plans.md#create-a-plan) and use them in your code while creating Subscriptions. You can also create Plans using [Razorpay Subscriptions APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/create-plan.md). + + ![Create a test plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/subscriptions-test-1.jpg.md) + + + + **Eaxmple** + + Create a Plan with a billing amount of and a cycle of 2 months. + + ```curl: Request + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/plans \ + -H "Content-Type: application/json" \ + -d '{ + "period": "monthly", + "interval": 1, + "item": { + "name": "Test plan", + "amount": 50000, + "currency": "", + "description": "500, charged every 2 months" + }, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } + }' + ```json:Response + { + "id": "plan_00000000000001", + "entity": "plan", + "interval": 1, + "period": "monthly", + "item": { + "id": "item_00000000000001", + "active": true, + "name": "Test plan", + "description": "500, charged every 2 months", + "amount": 50000, + "unit_amount": 50000, + "currency": "", + "type": "plan", + "unit": null, + "tax_inclusive": false, + "tax_id": null, + "tax_group_id": null, + "created_at": 1508762880, + "updated_at": 1508762880 + }, + "notes":{ + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at": 1508762880 + } + ``` + + + +### 3. Create a Subscription + + You must create a Subscription for every customer using a Plan. You can create Subscriptions from the Dashboard or using APIs. + + **Example** + + - Create **Subscription A**: A Subscription for the Plan created above, to be charged a total of 6 times and due to be started immediately. + - Create **Subscription B**: A second Subscription for the same Plan, to be charged a total of 6 times, due to start on 1st January 2026. + + If you create a Subscription using the Dashboard, it can only be created as a [Subscription Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md). + + + + + + You can also create Subscriptions using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/create-subscription.md). A sample request and response for the creation of **Subscription A** and **Subscription B** is given below. + + + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/subscriptions \ + -H "Content-Type: application/json" \ + -d '{ + "plan_id":"plan_00000000000001", + "total_count":6, + "notes":{ + "name":"Subscription A" + } + }' + ```json:Response + { + "id": "sub_00000000000001", + "entity": "subscription", + "plan_id": "plan_00000000000001", + "customer_id": null, + "status": "created", + "current_start": null, + "current_end": null, + "ended_at": null, + "quantity": 1, + "notes": { + "name": "Subscription A" + }, + "charge_at": null, + "start_at": null, + "end_at": null, + "auth_attempts": 0, + "total_count": 6, + "paid_count": 0, + "customer_notify": true, + "created_at": 1508763473 + } + ``` + + + To indicate a future starting date, pass the proper timestamp to the `start_at` parameter in the request. + + ```curl: Curl + curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ + -X POST https://api.razorpay.com/v1/subscriptions \ + -H "Content-Type: application/json" \ + -d '{ + "plan_id":"plan_00000000000001", + "total_count":6, + "start_at": 1577817000, + "notes":{ + "name":"Subscription B" + } + }' + ```json:Response + { + "id": "sub_00000000000001", + "entity": "subscription", + "plan_id": "plan_00000000000001", + "customer_id": null, + "status": "created", + "current_start": null, + "current_end": null, + "ended_at": null, + "quantity": 1, + "notes": { + "name": "Subscription B" + }, + "charge_at": 1577817000, + "start_at": 1577817000, + "end_at": 1580841000, + "auth_attempts": 0, + "total_count": 6, + "paid_count": 0, + "customer_notify": true, + "created_at": 1508763558 + } + ``` + + + + Both Subscriptions are now in the `created` state and await an authentication transaction where the payer authenticates the use of their card. + + + +### 4. Make Authorisation Payment + + To authenticate a Subscription using your checkout, that is, a Subscription created using APIs, make a regular payment using Razorpay, but pass an extra parameter `subscription_id` in the options sent to the Razorpay Standard Checkout request. + + To see this in action, use the following code on a test webpage, and hit the **Authenticate** button. This triggers a Razorpay payment that in turn authenticates the Subscription. + + ```html: Auth Payment + + + Authenticate + + + var options = { + "key": "", + "subscription_id": "sub_00000000000001", + "name": "My Billing Label", + "description": "Auth txn for sub_00000000000001", + "handler": function (response){ + alert(response.razorpay_payment_id); + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button').onclick = function(e){ + rzp1.open(); + } + + + + ``` + + The above code only contains the minimum required options that need to be sent to initiate a payment, that is, only `key` and `subscription_id` are mandatory. Check the [checkout fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#123-checkout-options) for a complete list of options that can be passed. + + + + Authenticate a Subscription Using a Link + + 1. Log in to your Dashboard, click **Subscriptions** under **PAYMENT PRODUCTS** and then click **Subscription Id** to be authenticated → **Start Subscription**. + ![Start Subscription to authenticate a subscription via link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/subscriptions-test-4.jpg.md) + 2. Click **PAY BY CARD**, enter a **CVV** and click **PAY**. + ![Click Pay by Card and enter the details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/subscriptions-test-5.jpg.md) + 3. Click **Success** to authenticate the payment. + ![Payment Confirmation popup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/subscriptions-test-6.jpg.md) + + + +### Test Card Details + + Use the following test card details to make the authentication payment: + + + + + + +Type | Card Network | Card Type | Card Number | CVV & Expiry Date +--- +Domestic | Visa | Credit Card | 4718 6091 0820 4366 | Use a random CVV and any future date ^^^ +--- +International | Mastercard | Credit Card | 5104 0155 5555 5558 | +--- +International | Mastercard | Debit Card | 5104 0600 0000 0008 | + + + + + + + +### Payment Amount + + Unlike a regular payment, you do not need to pass the amount as an option. This is because the amount to be charged is determined by the Subscription that is being authenticated. + + - For **Subscription A**, that is, to start immediately upon completion of this payment, the charge amount will be , that is the amount we used while creating the Plan. + - For **Subscription B**, this payment acts only as an authentication step, as the Subscription is not due to start until January 2026. So for **Subscription B**, the charge amount is , a token amount that is immediately refunded. + + To make a successful payment, the payment response contains a few fields carrying information about the Subscription that has been authenticated. Check the [payment verification section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/integration-guide.md#payment-verification) to know more about how this payment response can be authenticated. + + + +### After Authentication Payment + + After the payment is completed successfully, **Subscription A** is marked as `active`. + + **Subscription A** + + At this stage you receive the webhook payloads for the 2 events that **Subscription A** has gone through. + - First, you receive the `subscription.activated` webhook when **Subscription A** moves from the `authenticated` to the `active` state. + - Next, you receive the `subscription.charged` webhook when a payment is successfully charged on **Subscription A**. + + **Subscription B** + + Performing the same payment request on **Subscription B** results in being marked as `authenticated`. It is not charged, as it is not due to start for a few months. For this reason, no webhook events are triggered by performing an authentication payment for **Subscription B**. + + + + + + +### 5. Subsequent Charges + + After the initial payment (the authentication charge), all subsequent charges for a subscription are automatically triggered by Razorpay. Each time a charge is triggered, its outcome is communicated by the webhooks to the Subscriptions entity. + + In test mode, you can simulate these charges from the Dashboard using the Charge this now button. This allows you to trigger all the events associated with a due subscription, enabling testing without having to wait until the actual due date (for example, January 2026 for Subscription B). + + ![Charge this now button on subsequent charges](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/subscriptions-test-7.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot test the update subscription feature if any test charges (beyond the initial authentication payment) have been made. This feature can only be tested if no subsequent payments have been processed for the subscription. +> + + + + +### 6. Expected Webhooks + + You can now integrate with Razorpay webhooks to verify that different webhook events are being consumed correctly. + + **Example** + + - Triggering a test charge on Subscription A results in a single webhook event: `subscription.charged`. + - In contrast, triggering a test charge on Subscription B from the Dashboard causes it to move from the authenticated state to the active state. This indicates that the `start_at` time for Subscription B has passed, thereby triggering the `subscription.activated` webhook event. Immediately after, the charge is processed, resulting in the `subscription.charged` webhook being triggered. + + +## Manage Subscriptions + +Following are the steps to handle charge failures, halted Subscriptions, manually charge invoices and completed and cancelled Subscriptions: + + +### Handle Subscription Charge Failures + + After the first payment, that is, the authentication of the Subscription, all subsequent charges are triggered automatically by Razorpay. When Razorpay initiates the automatic charges, it is possible that a charge attempt on the card saved for a Subscription could fail. In this case, the failure event webhooks are triggered. + + To simulate this in test mode, the test charge option prompts you to choose the result of a manual charge attempt. + + + + - To charge a Subscription as a success, a new payment is simply created (and captured), and the `subscription.charged` webhook is triggered. + - To charge a Subscription as a failure, the Subscription moves from the `active` to the `pending` state, and the `subscription.pending` webhook event is triggered. With each failure, the number of charge attempts made on a Subscription increases, and the next charge time is updated by a single day, rather than the actual plan period, which in this case is two months. + - If you fail a charge 4 times in a row, all the available retries get exhausted. This results in a Subscription being marked as `halted` and the `subscription.halted` webhook event is triggered. + + + + Charge Failure Scenarios + + Following are some payment failure scenarios and how they can be handled: + + + + Card failure, but payment success on auto-retry + + When a payment fails, an auto-retry is attempted. If the payment succeeds on subsequent auto-retries made by the customer, we: + + - Trigger the `subscription.charged` webhook. + - If the customer notifications are handled by Razorpay, the customer receives an email confirmation. + - Move the Subscription from the `pending` to the `activated` state. + - Trigger the `subscription.activated` webhook. + + + +### Card failure and payment failure on auto-retry + + When the last auto-charge attempt made by your customers was unsuccessful and the subsequent retries were also exhausted, we: + + - Send an email requesting manual attempt of a charge or request change of the card if the customer notifications are handled on Dashboard. + - Move the Subscription to the `halted` state. + - Trigger the `subscription.halted` webhook. + - Continue generating invoices in the `halted` state, but we do not attempt a charge on them. + + If customer's notifications are not handled by Razorpay, you need to either request the customer to change their card or manually attempt a charge on the same card. + + + +### Customer changes card on payment failure + + When a customer changes the card due to failure of a recurring payment, we: + + - Automatically perform a charge on the new card. + - On a successful charge, the following webhooks are triggered: + - `subscription.charged` + - `subscription.activated` + - The Subscription is moved from the `halted` state to the `activated` state. + + + + + + + + If there are any incomplete charges, you have to manually attempt to charge the card again from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/manually-charge-card.md). + + + +### Halted Subscriptions + + Once a Subscription has reached `halted` state, Razorpay no automatic charge attempts are triggered on the saved card. However, invoices continue to be issued in accordance with the original plan. + + ![Issue Invoice button for Halted Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/subscriptions-test-9.jpg.md) + + In test mode, the **Charge This Now** button available on Dashboard is replaced with an **Issue Invoice** button for `halted` subscriptions. Using this option, a new invoice is issued, but no charge is attempted on the saved card. + + + +### Manually Charge an Invoice + + The invoices created by a Subscription may remain in the `issued` state if the charge attempts on the saved card results in a failure. Once the maximum number of retries attempts are exhausted: + + - The Subscription is moved to the `halted` state. + - The Subscription moves on to the next recurring payment, that is, the next invoice. + + However, the invoice that was skipped is still chargeable, after the customer has fixed the issue either by correcting the issue with their card or changing the card associated with a Subscription. This can be done via the **Attempt Charge** option available for each invoice on [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/manually-charge-card.md). + + ![Attempt Charge option for each invoice on Dashboard to charge manually](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/subscriptions-test-10.jpg.md) + + Using this option, a new charge attempt is triggered on the issued invoice, and does not increase the number of retries remaining for a Subscription. + + +> **INFO** +> +> +> **Manual Charging an Invoice Vs. Test Charging a Subscription** +> +> Manually charging an issued invoice is different from performing a test charge on a Subscription. +> - A manual charge on an invoice is possible even in live mode. This can be done anytime an invoice is observed to be in the `issued` state. A manual charge attempt does not count toward the remaining retries for a Subscription. +> - A test charge on a Subscription can be triggered only in test mode. The result of this charge attempt is up to you. If you choose to fail the attempt it counts toward the remaining retries that a Subscription has before it moves to the `halted` state. +> + + + + +### Complete and Cancelled Subscriptions + + A Subscription can be moved to any of the terminal states in the following ways: + + - Charging a Subscription repeatedly in test mode, until all the invoices for a Subscription have been issued. + - Cancelling a Subscription using [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/pause-resume-cancel.md#cancel-a-subscription-via-the-dashboard) or [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#cancel-a-subscription). + + +### Related Information + +- [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) +- [Subscription Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/workflow.md) +- [Subscription States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) +- [Create Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md) diff --git a/llm-content/payments/subscriptions/update.md b/llm-content/payments/subscriptions/update.md new file mode 100644 index 00000000..bc08db22 --- /dev/null +++ b/llm-content/payments/subscriptions/update.md @@ -0,0 +1,390 @@ +--- +title: Update a Subscription +description: Update a Subscription - start date, plan, quantity, duration and the notify customer flag. +--- + +# Update a Subscription + +You can update Subscriptions from the [Dashboard](#update-a-subscription-from-dashboard) or using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md#update-a-subscription). + +## What Can Be Updated in a Subscription + +You can update following parameters of a Subscription that is `active`: + +- `Plan` linked to the Subscription. +- `Quantity`, that is the number of times the amount should be charged to the customer per billing cycle. For example, this would be the number of users for a software product. +- `Subscription Start Date` for the updated Subscription details. This can either be immediate or any future date. You can choose to update a Subscription: + - [Immediately](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/update.md#update-subscriptions-immediately) + - [At the end of the current billing cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/update.md#update-subscription-at-the-end-of-the-current) +- `Total count`, that is the number of billing cycles. This determines the duration of the Subscription. + +- `Offer`, this is the offer linked to the Subscription. + +> **WARN** +> +> +> **Watch Out!** +> +> - For Subscriptions created using domestic cards, you can update only the offer that is linked to them. +> - You can only update the offer linked to the Subscription at the end of the cycle. It is not possible to update an offer linked to a Subscription immediately. +> + +**Example** + +A customer might want to update from a basic plan to an advanced plan that increases the frequency of your service, or they might want to decrease the number of users for a software product. You can update the Subscription for them in such cases, either immediately or at the end of the current billing cycle. + +> **WARN** +> +> +> +> **Watch Out!** +> - You can only update Subscriptions in the `authenticated` and `active` states. Subscriptions in the `created`, `pending` or `halted` state cannot be updated. There is no state change when a Subscription is updated. Know more about the [Subscription states.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) +> - You cannot update a Subscription if the difference amount after updating a Subscription (credit or refund) is less than the update quantity multiplied by the smallest currency subunit. +> + +## Update Subscriptions Immediately + +When you update a Subscription immediately, you may have to perform the following: + +- [Charge the customer an extra amount](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/update.md#charge-a-customer-extra) +- [Refund an amount to the customer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/update.md#refund-money-to-a-customer) + +If the remaining amount for the original Subscription is the same as the amount to be charged for the updated Subscription, no charge or refund needs to be done. + +> **INFO** +> +> +> +> **Handy Tips** +> - If you are updating a Subscription, ensure that the prorated amount difference between the existing and new plans is at least 50 currency subunits, that is, . You will get an error if the amount difference between the two plans is less than . +> - This is valid only when you update a Subscription immediately. +> + +### Charge a Customer Extra + +When upgrading a plan or increasing the number of users, you may have to charge a customer an extra amount. In such scenarios, Razorpay creates an invoice and charges the customer the difference amount. + +- If the charge is successful, the invoice is sent to the customer only if Razorpay handles the customer's notifications. You will be notified via the `subscription.updated` webhook. +- If the charge fails, the Subscription is not updated. + +### Refund Money to a Customer + +When downgrading a plan or reducing the number of users, you might have to give the customer a refund. In such scenarios, Razorpay refunds the amount to the customer. You will be notified about this via the `subscription.updated` webhook. + +#### Credit Note + +A refund to a customer is done using a Credit Note. Credit notes help you in reconciliation. + +- Credit notes are not created against invoices. They are created against the total value of payments made by the customer. This means that only one credit note is created even if refunds have to be made against multiple invoices. +- You can view credit notes on the Dashboard against the respective Subscription. +- The credit notes are refunded automatically. + +**Credit Note States** + +A credit note can have two states: +- `created`: The initial state of a credit note. A credit note stays in this state until a full refund is made to the customer. +- `refunded`: The final state of a refund. A credit note moves to this state once the refund is successfully processed. + +## Same Billing Frequency Example + +In the below examples, the Subscription is updated immediately, and there is no change in its billing cycle. + + +### Example 1 + + In the below example, we reduce the `plan amount` but increase the `quantity`. This change is done on the `1st` day the Subscription becomes `active`. The updates take effect immediately. + + + Subscription Details | Original Plan | Updated Plan + --- + Plan amount | | + --- + Quantity | 1 | 2 + --- + Billing Frequency | Monthly | Monthly + --- + Frequency at which the amount should be charged in days | 30 | 30 + --- + Plan amount per day | (Plan amount x Quantity)/Frequency at which the amount should be charged in days = | (Plan amount x Quantity)/Frequency at which the amount should be charged in days = + --- + Plan change day | 1 | N/A + --- + Days to be charged | Plan change day - 1 = 0 days +(since customers are charged at the end of the day) | Remaining days (original plan) = 30 + --- + Remaining days | Frequency at which the amount should be charged in days - Days to be charged = 30 | N/A + --- + Amount to be charged | Plan amount per day x Days to be charged = | Plan amount per day x Days to be charged = + --- + Remaining amount | Plan amount per day x Remaining days = | N/A + --- + Amount to be charged/refunded | N/A | Amount to be charged (new plan) - Remaining Amount (original plan) = + + + In this example, you neither have to charge the customer an extra amount nor give them a refund. + + + +### Example 2 + + + In the below example, we reduce the `plan amount` but increase the `quantity`. This change is done on the `15th` day after the Subscription becomes `active`. The updates take effect immediately. + + + Subscription Details | Original Plan | Updated Plan + --- + Plan amount | | + --- + Quantity | 1 | 2 + --- + Billing Frequency | Monthly | Monthly + --- + Frequency at which the amount should be charged in days | 30 | 30 + --- + Plan amount per day | (Plan amount x Quantity)/Frequency at which the amount should be charged in days = | (Plan amount x Quantity)/Frequency at which the amount should be charged in days = + --- + Plan change day | 15 | N/A + --- + Days to be charged | Plan change day - 1 = 14 days +(since customers are charged at the end of the day) | Remaining days (original plan) = 16 + --- + Remaining days | Frequency at which the amount should be charged in days - Days to be charged = 16 | N/A + --- + Amount to be charged | Plan amount per day x Days to be charged = | Plan amount per day x Days to be charged = + --- + Remaining amount | Plan amount per day x Remaining days = | N/A + --- + Amount to be charged/refunded | N/A | Amount to be charged (new plan) - Remaining Amount (original plan) = + + + In this example, you neither have to charge the customer an extra amount nor give them a refund. + + + +### Example 3 + + In the below example, we reduce the `plan amount` and the `quantity`. This change is done on the `6th` day after the Subscription becomes `active`. The updates take effect immediately. + + + Subscription Details | Original Plan | Updated Plan + --- + Plan amount | | + --- + Quantity | 2 | 1 + --- + BillingFrequency | Daily | Daily + --- + Frequency at which the amount should be charged in days | 8 | 8 + --- + Plan amount per day | (Plan amount x Quantity)/Frequency at which the amount should be charged in days = | (Plan amount x Quantity)/Frequency at which the amount should be charged in days = + --- + Plan change day | 6 | N/A + --- + Days to be charged | Plan change day -1 = 5 days +(since customers are charged at the end of the day) | Remaining days (original plan) = 3 + --- + Remaining days | Frequency at which the amount should be charged in days - Days to be charged = 3 | N/A + --- + Amount to be charged | Plan amount per day x Days to be charged = | Plan amount per day x Days to be charged = + --- + Remaining amount | Plan amount per day x Remaining days = | N/A + --- + Amount to be charged/refunded | N/A | Amount to be charged (new plan) - Remaining Amount (original plan) = -(refund) + + + In this example, you have to refund the customer . + + + +## Different Billing Frequency Example + +In the below examples, the Subscription is updated immediately, and there is a change in the billing cycle. + + +### Example 1 + + + In the below example, we are increasing the `plan amount`, keeping the `quantity` same and reducing the `billing frequency`. This change is done on the `1st` day the Subscription becomes `active`. The updates take effect immediately. + + + Subscription Details | Original Plan | Updated Plan + --- + Plan amount | | + --- + Quantity | 1 | 1 + --- + Billing Frequency | Daily | Weekly + --- + Frequency at which the amount should be charged in days | 7 | 1 + --- + Plan amount per day | (Plan amount x Quantity)/Frequency at which the amount should be charged in days = | N/A + --- + Plan change day | 1 | N/A + --- + Days to be charged | Plan change day -1 = 0 days +(since customers are charged at the end of the day) | N/A + --- + Remaining days | Frequency at which the amount should be charged in days - Days to be charged = 7 | N/A + --- + Amount to be charged | Plan amount per day x Days to be charged = | Plan amount x Quantity = + --- + Remaining amount | Plan amount per day x Remaining days = | N/A + --- + Amount to be charged/refunded | N/A | Amount to be charged (new plan) - Remaining Amount (original plan) = + + + In this example, you neither have to charge the customer an extra amount nor give them a refund. + + + + +### Example 2 + + In the below example, we are increasing the `plan amount`, keeping the `quantity` same and reducing the `billing frequency`. This change is done on the `245th` day the Subscription becomes `active`. The updates take effect immediately. + + +> **WARN** +> +> +> **Watch Out!** +> +> If the plans have different billing cycles, the new plan is billed at the new interval, starting on the day of the change. +> + + + Subscription Details | Original Plan| Updated Plan + --- + Plan amount | | + --- + Quantity | 1 | 1 + --- + Billing Frequency | Yearly | Monthly + --- + Frequency at which the amount should be charged in days | 365 | 30 + --- + Plan amount per day | (Plan amount x Quantity)/Frequency at which the amount should be charged in days = | N/A + --- + Plan change day | 245 | N/A + --- + Days to be charged | Plan change day -1 = 244 days +(since customers are charged at the end of the day) | Remaining days (original plan) = 121 + --- + Remaining days | Frequency at which the amount should be charged in days - Days to be charged = 121 | N/A + --- + Amount to be charged | Plan amount per day x Days to be charged = | Plan amount x Quantity = + --- + Remaining amount | Plan amount per day x Remaining days = | N/A + --- + Amount to be charged/refunded | N/A | Amount to be charged (new plan) - Remaining Amount (original plan) = (charge) + + + In this example, you have to charge the customer an extra amount of . + + + + +### Example 3 + + In the below example, let us increase the `plan amount`, `quantity` and the `billing frequency`. This change is done on the `27th` day the Subscription becomes `active`. The updates take effect immediately. + + +> **WARN** +> +> +> **Watch Out!** +> +> If the plans have different billing cycles, the new plan is billed at the new interval, starting on the day of the change. +> + + + Subscription Details | Original Plan | New Plan + --- + Plan amount | | + --- + Quantity | 1 | 2 + --- + Billing Frequency | Monthly | Quarterly + --- + Frequency at which the amount should be charged in days | 30 | 90 + --- + Plan amount per day | (Plan amount x Quantity)/Frequency at which the amount should be charged in days = | N/A + --- + Plan change day | 27 | N/A + --- + Days to be charged | Plan change day -1 = 26 days +(since customers are charged at the end of the day) | N/A + --- + Remaining days | Frequency at which the amount should be charged in days - Days to be charged = 4 | 90 days + --- + Amount to be charged | Plan amount per day x Days to be charged = | Plan amount x Quantity = + --- + Remaining amount | Plan amount per day x Remaining days = | N/A + --- + Amount to be charged/refunded | N/A | Amount to be charged (new plan) - Remaining Amount (original plan) = (charge) + + + In this example, you have to charge the customer an extra amount of . + + + +## Update Subscription at the End of the Current Billing Cycle + +When you update a Subscription at the end of the current billing cycle, there is no need for any amount adjustment with the customer. The Subscription is updated with the new values when the current billing cycle ends. + +## Update a Subscription From Dashboard + +To update a Subscription: + +1. Log in to the Dashboard and click **Subscriptions** under **PAYMENT PRODUCTS** in the left menu. +2. Click the **Subscription Id** you want to update. The details of the Subscription appear in the right pane. You can update the **Notify** flag from this tab. If enabled, notifications are sent to the customers. If disabled, you need to update the customer. +3. Click **Update** to update any of the following parameters: + - Plan + - Quantity + - Subscription Start Date + - Total count + - Apply changes + - Offer applied on the Subscription +4. Select **Immediately** or **End of Cycle** to update the offer immediately or at the end of the current billing cycle. + +> **INFO** +> +> +> **Handy Tips** +> +> The new offer will be linked to the Subscription only at the end of the cycle. It is not possible to update an offer linked to a Subscription immediately. +> + +5. Click **Next**. Review the changes are made and click **Update**. + +## Update a Subscription Using API + +Use the [Update a Subscription API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/update-subscription.md) to update a Subscription. + +## Cancel a Subscription Update + +You can cancel an update pending on a Subscription from the Dashboard. + +> **WARN** +> +> +> +> **Watch Out!** +> +> You can only cancel an update pending on a Subscription and not the live ones. +> + +Watch this video to see how to cancel an update for a Subscription. + +[Video: https://www.youtube-nocookie.com/embed/SsNExzkjmDM] + +To cancel a Subscription update: +1. Log in to the Dashboard and click **Subscriptions** under **PAYMENT PRODUCTS** in the left menu. +1. Click the **Subscription Id** for which you want to cancel the update and click **Cancel Update**. +1. Click **Yes, cancel**. + +### Related Information + +- [Create and View Plans](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-plans.md) +- [Create Subscriptions via Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md) +- [Charge a Card Manually](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/manually-charge-card.md) +- [Subscriptions Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/settings.md) diff --git a/llm-content/payments/subscriptions/use-cases.md b/llm-content/payments/subscriptions/use-cases.md new file mode 100644 index 00000000..ac8f43f7 --- /dev/null +++ b/llm-content/payments/subscriptions/use-cases.md @@ -0,0 +1,162 @@ +--- +title: Subscriptions Use Cases +description: Explore the use cases of Razorpay Subscriptions on how businesses streamline billing for memberships, premium content, and more. +--- + +# Subscriptions Use Cases + +Go through use cases on how Razorpay Subscriptions has helped businesses to manage their recurring revenue models. Whether you are a dynamic startup, an established e-commerce brand, a content creator or a fitness enterprise, Subscriptions equips you with the tools to effortlessly handle billing cycles, nurture customer relationships and drive sustained success. + + +### OTT Platforms + + + Acme is a popular OTT platform that offers a wide range of regional and international streaming content, including movies, TV shows, and original series. To enhance user satisfaction and simplify the payment process, Acme decided to implement Subscriptions. + + Here is how Subscriptions with UPI help Acme: + + + + Flexible Subscription Plans + + Acme uses Razorpay Subscriptions to create and manage various Subscription plans, catering to different user preferences. Users can choose plans based on their content consumption habits and budget. + + + +### Easy UPI Integration + + Seamless integration with UPI, allows Acme users to subscribe to plans and make recurring payments using their UPI-enabled apps. This provides a widely accepted and user-friendly payment option. + + + +### Automated Subscription Management + + Acme automates the entire Subscription management process. Users can easily upgrade, downgrade, or modify their Subscriptions, and the platform automatically adjusts billing accordingly. + + + +### Secure Transactions + + Razorpay ensures the security of UPI transactions by adhering to industry standards and employing robust encryption protocols. This builds trust among users regarding the safety of their payment information. + + + + + + +### Ecommerce + + Acme Women is a health and wellness company that offers subscription-based delivery services for women's hygiene and wellness products. To simplify the subscription billing process and improve customer convenience, Acme Women decides to integrate Razorpay Subscriptions with Cards. + + Here is how Subscriptions with Card help Acme: + + + + Subscription Plan Variety + + Acme integrates Razorpay Subscriptions to offer customers various Subscription plans, such as monthly, quarterly, and yearly options. Each plan provides different levels of benefits, encouraging customers to choose the plan that suits their preferences. + + + +### Card Payments Integration + + By integrating card payments, Acme ensures customers a secure and seamless payment experience. Razorpay securely stores card information, eliminating the need for customers to enter card details every time they make a recurring payment. + + + +### Automated Recurring Payments + + Acme can automate the entire payment process, charging customers' cards at predefined intervals based on their chosen Subscription frequency. This ensures timely payments and a hassle-free shopping experience. + + + +### Offers on Subscriptions + + Acme implements Offers to provide discounts or cashback on Subscriptions. These offers enable Acme to attract customers, retain existing customers, and increase sales. + + + + + + +### IT and Software Solutions + + Acme Solutions is a leading IT company offering various software products and services, including cloud-based tools and productivity software. To provide a frictionless Subscription billing experience for its customers, Acme Solutions integrates Razorpay Subscriptions with Emandate as a payment method. + + Here is how Subscriptions with Emandate help Acme: + + + + Subscription Plan Variety + + Acme Solutions uses Razorpay Subscriptions to create and manage various plans for its software products. Customers can choose plans depending on their needs and budget. + + + +### Emandate Integration + + By integrating Emandate as a payment method, Acme Solutions enables customers to authorise automated recurring payments directly from their bank accounts. This eliminates the need for customers to initiate payments manually each billing cycle. + + + +### Automated Billing + + Acme automates the entire billing process. Once customers set up Emandate, their payments are automatically deducted from their bank accounts at predefined intervals, ensuring uninterrupted access to software services. + + + + + + +### Banking, Financial Services, and Insurance + + Acme Bank is a leading BFSI institution offering a range of financial products, including personal loans and vehicle loans. It has implemented Razorpay Subscriptions with Emandate as a payment method to optimise the loan repayment process and reduce operational complexities. + + Here is how Subscriptions with Emandate help Acme: + + + + Automated Loan Repayments + + Acme Bank integrates Razorpay Subscriptions to automate the loan repayment process. Customers can set up Emandates, authorising the bank to deduct loan instalments automatically from their bank accounts at predefined intervals. + + + +### Flexible Repayment Schedules + + Acme Bank creates flexible repayment schedules based on customer preferences and loan terms. This ensures that repayment plans align with the financial capacities of individual borrowers. + + + +### Automated Reconciliation + + Razorpay Subscriptions automates the reconciliation of loan repayments, providing real-time visibility into payment statuses and reducing the chances of errors in financial reporting. + + + + + + +### Services + + Acme Solutions is a reputable IT services company offering its clients ongoing technical support and maintenance services. To ensure seamless payment experiences and improve client relationships, Acme Solutions has implemented Razorpay Subscriptions. + + Here is how Subscriptions help Acme: + + + + Subscription Plans + + Acme Solutions uses Razorpay Subscriptions to create various plans based on the types of services offered and the frequency of payments required by clients. + + + +### Automated Payments + + The company automates the entire payment process. Clients' payments are processed automatically at predefined intervals, reducing the need for manual intervention. + + + +### Payment Reminders + + Razorpay Subscriptions sends automated payment reminders to clients, keeping them informed about upcoming payments and due dates. This proactive approach enhances transparency and reduces payment delays. diff --git a/llm-content/payments/subscriptions/view.md b/llm-content/payments/subscriptions/view.md new file mode 100644 index 00000000..9a3af236 --- /dev/null +++ b/llm-content/payments/subscriptions/view.md @@ -0,0 +1,38 @@ +--- +title: View Subscription Details +description: View Subscription details on the Razorpay Dashboard. +--- + +# View Subscription Details + +You can view details of a Subscription from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/view.md#view-subscription-details-from-dashboard) or using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/view.md#view-subscription-details-using-apis). + +## View Subscription Details From Dashboard + +Watch this video to see how to view the details of a Subscription. + +[Video: https://www.youtube.com/embed/l9CY5xosoUg] + +To view details of a Subscription: +1. Log in to the Dashboard and click **Subscriptions** under **PAYMENT PRODUCTS** in the left menu. +2. Click on the required **Subscription Id** you want to view the details. The details about the Subscription is displayed in the right pane. You can charge or cancel the Subscription here. + +> **WARN** +> +> +> +> **Watch Out!** +> +> Contact information shown here is the information linked to the card or account from which the payment was made. This need not match the details of the person to whom the link was sent. +> + +## View Subscription Details Using APIs +- [Fetch All Subscriptions API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/fetch-subscriptions.md) +- [Fetch a Subscription With ID API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/fetch-subscription-id.md) + +### Related Information + +- [Create and View Plans](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-plans.md) +- [Charge a Card Manually](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/manually-charge-card.md) +- [Update a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/update.md) +- [Subscriptions Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/settings.md) diff --git a/llm-content/payments/subscriptions/workflow.md b/llm-content/payments/subscriptions/workflow.md new file mode 100644 index 00000000..2c160a7b --- /dev/null +++ b/llm-content/payments/subscriptions/workflow.md @@ -0,0 +1,150 @@ +--- +title: How Subscriptions Work +description: Check the Plans, free trial period, upfront (delivery or set up) amount, Subscriptions, checkout integration for Subscriptions and Subscription links. +--- + +# How Subscriptions Work + +Understand the Subscription flow and how to create Subscriptions from the Checkout or using links. + +## Subscription Life Cycle + +1. [Create a Plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md#plan). +1. After the Plan is created, you can then [create a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md#subscription) for your customer. +1. Customer makes the [Authentication Transaction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md#authentication-transaction). +1. The Subscription becomes active when the billing cycle starts. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - You do not need to capture any Subscriptions-related payment. All payments related to Subscriptions (except the authorisation payment) are **auto-captured**. The authorisation payment used to validate a customer's card is **auto-refunded**. +> - There is no need to create a customer when using Razorpay Subscriptions. Razorpay automatically creates a customer when the authentication payment is made. +> + +## Authentication Transaction + +The **authentication transaction** amount is the first amount you charge on the customer's card. The authentication transaction can either be a token amount that is refunded to the customer or an upfront amount or the plan amount that is not refunded to the customer. Based on your business needs, you can decide on the authentication transaction amount. + +> **INFO** +> +> +> +> **Immediate Start Dates** +> +> In case of immediate start dates, the authentication transaction amount is not refunded and invoices are generated in all the three scenarios. +> + + +### Authentication Amount - Various Combinations + + The following table below explains what authentication amount is collected from customers for various combinations of start date and the upfront amount. + + + Start Date | Upfront Amount | Authentication Amount + --- + Immediate | x | Plan Amount + --- + Future | x | (auto refunded) + --- + Immediate | ✓ | Upfront Amount + Plan Amount + --- + Future | ✓ | Upfront Amount + + + +You can collect the authentication transaction using Subscription via Checkout or using Subscription Links. + + + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can [integrate Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/integration-guide.md) into your checkout only using [Subscriptions APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions.md). +> + + You can integrate Razorpay Subscriptions with your Razorpay Checkout Form on your website or application. Customers can select their desired Subscription Plan on your website or application and proceed to make the authentication payment using Razorpay's Checkout. + + 1. [Create a Plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md#plan). + 1. The customer selects the Plan from your website or application. + 1. After the customer selects a Plan, a Subscription is created in Razorpay and the `subscription_id` received in the response, is passed on to the Razorpay Checkout via the checkout options. + 1. On the Checkout form, the customer makes the payment using the card details. + 1. This acts as an **authentication transaction**. On a successful payment, a customer is created and linked to the Subscription. + 1. Automated charges on the Subscription are now made as per the schedule that you defined while creating the plan. + + + + You can create a custom Subscription for a customer and send a [Subscription link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create-subscription-links.md) to them. Customers click the link and are taken to a checkout page hosted by Razorpay where they make the authentication payment via Razorpay's checkout page. There is no need to host the link on your website or application. + + 1. [Create a Plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md#plan). + 1. You create a Subscription link by: + - Selecting a Plan. + - Adding an upfront amount. + - Adding customer details. + 1. The Subscription link is sent to the customer via email and/or SMS. + 1. The customer clicks the link and is taken to the Razorpay Checkout form. + 1. The customer enters the card details and clicks **Pay** to make the payment. This acts as an **authentication transaction**. On a successful payment, a customer is created and linked to the Subscription. + 1. Automated charges on the Subscription are now made as per the schedule that you defined while creating the plan. + + + +## Subscriptions Actions + +You can perform the following actions on Subscriptions that are active: +- [Update a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/update.md) +- [Pause and Resume a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/pause-resume-cancel.md) +- [Cancel a Subscription](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/pause-resume-cancel.md#cancel-a-subscription-via-the-dashboard) + +## Invoice + +Invoices are automatically created for Subscriptions. Invoice includes details such as plan, amount, date of charge including merchant details. Invoices are created for every charge made on the customer's card for recurring payments, including the authentication transaction. + +- An invoice is generated at the beginning of each billing cycle for the defined plan and amount. +- A charge is attempted on the invoice. The invoice is in `issued` state on your Dashboard. +- If the charge is successful: + - An email is sent to the customer. + - The invoice is moved to `paid` state on your Dashboard. + - The `invoice.paid` webhook is fired. + + +Know more about the [Subscription states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md). + +> **WARN** +> +> +> **Watch Out!** +> +> Along with the invoice state, we recommend you check the Subscription charge status of the defined billing frequency before providing or continuing services to your customers. +> + + +### Invoice - Various Combinations + + The following table indicates when an invoice is sent for various combinations of start date and upfront amount. + + + + Start Date | Upfront Amount | Invoice sent + --- + Immediate | x | Yes + --- + Future | x | No (Reason: Auth transaction) + --- + Immediate | ✓ | Yes + --- + Future | ✓ | Yes + + + +### Related Information + +- [Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions.md) +- [Subscription States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/states.md) +- [Create Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/create.md) +- [Test Subscriptions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/test.md) +- [Payment Retries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/subscriptions/payment-retries.md) diff --git a/llm-content/payments/third-party-validation.md b/llm-content/payments/third-party-validation.md new file mode 100644 index 00000000..ee45c652 --- /dev/null +++ b/llm-content/payments/third-party-validation.md @@ -0,0 +1,62 @@ +--- +title: About Third-Party Validation (TPV) +description: Know how Razorpay performs Third-Party Validation (TPV) of your customers' bank accounts in real-time using Razorpay Standard Integration. +--- + +# About Third-Party Validation (TPV) + +- **Third-Party Validation Changelog**: Discover new features, updates and deprecations related to Third Party Validation (since Jan 2024). + +Third-Party Validation (TPV) of bank accounts is a mandatory requirement for businesses in the BFSI (Banking, Financial Services and Insurance) sector dealing with Securities, Broking and Mutual Funds. As per Securities and Exchange Board of India (SEBI) guidelines, transactions must be made by the investors **only** from those bank accounts provided when they registered with your business. + +With Razorpay, you can comply with the SEBI guidelines for online payment collections by offering TPV integrations with [major banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/bank-list.md) at Checkout. Investors can make payments using netbanking, debit card or UPI. Know [how to integrate TPV on Razorpay Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/standard-integration.md). + + to get this feature activated on your Razorpay account. + + +### How it Works + + 1. At the Checkout, investors complete the payment using the bank account details passed during the order creation. + 2. The payment is marked as successful only when the bank account details entered in the order match those entered by the investor on the Checkout. If the investor tries to make a payment with an account other than the registered account, Razorpay fails the transaction. + + ![TPV Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/tpv-standard-checkout.jpg.md) + + + +## Supported Products + +TPV is supported on the following products: +- [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/third-party-validation.md) +- [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway.md) + +## Supported Platforms + +TPV is supported on the following platforms: + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + + + Web | Android | iOS | Webview + --- + ✓ | ✓ | ✓ | ✓ + + + +## Integration Flow + +Know [how to integrate TPV on Razorpay Standard Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/standard-integration.md). + +### Related Information + +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) (Recommended) +- [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) (Recommended) +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md) +- [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md) +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) diff --git a/llm-content/payments/third-party-validation/bank-list.md b/llm-content/payments/third-party-validation/bank-list.md new file mode 100644 index 00000000..b80e6dc1 --- /dev/null +++ b/llm-content/payments/third-party-validation/bank-list.md @@ -0,0 +1,591 @@ +--- +title: Supported Banks +description: List of banks that Razorpay has partnered with for Third-Party Validation (TPV). +--- + +# Supported Banks + +Third-Party Validation (TPV) is an essential step in the Banking, Financial Services and Insurance sector. As per the SEBI guidelines, businesses operating in these sectors must ensure that the payments are accepted from the customers' registered, KYC-approved bank accounts only. + +Following is the list of banks that Razorpay has partnered with for third-party validation (TPV) of your customers' accounts. + +## List of Banks Supporting TPV for Netbanking + +Given below is the list of banks supporting TPV for netbanking. + +Bank Name | Bank Code +--- +Allahabad Bank | ALLA +--- +AU Small Finance Bank | AUBL +--- +Bank of Baroda (Retail) | BARB_R +--- +Bandhan Bank Limited (except Mutual Fund and Insurance) | BDBL +--- +Bank of India | BKID +--- +Bank of India (Corporate) | BKID_C +--- +Central Bank of India | CBIN +--- +City Union Bank | CIUB +--- +Canara Bank | CNRB +--- +Corporation Bank | CORP +--- +Catholic Syrian Bank | CSBK +--- +Development Bank of Singapore | DBSS +--- +DCB Bank | DCBL +--- +Deutsche Bank | DEUT +--- +Dhanlaxmi Bank | DLXB +--- +Equitas Small Finance Bank | ESFB +--- +Federal Bank | FDRL +--- +HDFC Bank | HDFC +--- +IDBI Bank | IBKL +--- +ICICI Bank | ICIC +--- +IDFC FIRST BANK | IDFB +--- +Indian Bank | IDIB +--- +Indusind Bank | INDB +--- +Indian Overseas Bank | IOBA +--- +Jammu and Kashmir Bank | JAKA +--- +Jana Small Finance Bank | JSFB +--- +Karnataka Bank | KARB +--- +Kotak Bank | KKBK +--- +Karur Vysya Bank | KVBL +--- +Lakshmi Vilas Bank (Retail) | LAVB_R +--- +Bank Of Maharashtra | MAHB +--- +Punjab National Bank (Retail) | PUNB_R +--- +RBL Bank | RATN +--- +State Bank of India | SBIN +--- +Standard Chartered | SCBL +--- +South Indian Bank | SIBL +--- +Saraswat Co-operative Bank | SRCB +--- +Shamrao Vithal Co.Operative Bank | SVCB +--- +Tamilnadu Mercantile Bank | TMBL +--- +Union Bank of India | UBIN +--- +UCO Bank | UCBA +--- +Ujjivan Bank | UJVN +--- +Axis Bank | UTIB +--- +Yes Bank | YESB +--- + +## List of Banks Supporting TPV for UPI + +Given below is the list of banks supported TPV for UPI. + +Bank Name | Bank Code +--- +A.P. Mahesh Co-operative Urban Bank | APMC +--- +Abhyudaya Co-operative Bank | ABHY +--- +Adarsh Co-operative Bank | ACBX +--- +Adarsh Co-operative Urban Bank | ACUX +--- +Aditya Birla Idea Payments Bank | ABPB +--- +Ahmedabad District Co-operative Bank | ADBX +--- +Ahmedabad Mercantile Co-operative Bank | AMCB +--- +Ahmednagar Merchants Co-operative Bank | AMDN +--- +Airtel Payments Bank | AIRP +--- +Akola District Central Co-operative Bank | ADCC +--- +Allahabad Bank | ALLA +--- +Allahabad Up Gramin Bank | AUGX +--- +Anand Mercantile Co-operative Bank | TAMX +--- +Andhra Bank | ANDB +--- +Andhra Pradesh Grameena Vikas Bank | APGV +--- +Andhra Pradesh State Co-operative Bank | APBL +--- +Andhra Pragathi Grameena Bank | APGB +--- +Apna Sahakari Bank | ASBL +--- +Assam Gramin Vikash Bank | AGVX +--- +Associate Co-operative Bank | ASOX +--- +AU Small Finance Bank | AUBL +--- +Axis Bank | AXIS +--- +Axis Bank | UTIB +--- +Banaskantha District Central Co-operative Bank | BKDX +--- +Banaskantha Mercantile Co-operative Bank | BMPX +--- +Bandhan Bank | BDBL +--- +Bank of America | BOFA +--- +Bank of Baroda (Retail) | BARB_R +--- +Bank of India | BKID +--- +Bank of Maharashtra | MAHB +--- +Baramati Sahakari Bank | BARA +--- +Baroda Central Co-operative Bank | BRDX +--- +Baroda Gujarat Gramin Bank | BGGX +--- +Baroda Rajasthan Kshetriya Gramin Bank | BRGX +--- +Baroda Uttar Pradesh Gramin Bank | BUGX +--- +Bassein Catholic Co-operative Bank | BACB +--- +Bhagini Nivedita Sahakari Bank Pune | BNSB +--- +Bharat Co-operative Bank | BCBM +--- +Bhilwara Urban Co-operative Bank | BHUX +--- +Canara Bank | CNRB +--- +Capital Small Finance Bank | CLBL +--- +Catholic Syrian Bank | CSBK +--- +Central Bank of India | CBIN +--- +Chaitanya Godavari Grameena Bank | CGGX +--- +Chartered Sahakari Bank Niyamitha | CSBX +--- +Chhattisgarh Rajya Gramin Bank | CGBX +--- +Chhattisgarh Rajya Gramin Bank | CRGB +--- +CITI Bank | CITI +--- +Citizen Co-operative Bank | CCBX +--- +Citizen Credit Co-operative Bank | CCBL +--- +Citizens Co-operative Bank | CTBX +--- +City Union Bank | CIUB +--- +Coastal Local Area Bank | COAS +--- +Coastal Local Area Bank | COLX +--- +Corporation Bank | CORP +--- +Cosmos Co-operative Bank | COSB +--- +Dakshin Bihar Gramin Bank | BGBX +--- +Dakshin Bihar Gramin Bank | MBGX +--- +Darussalam Co-operative Urban Bank | DCUX +--- +DCB Bank | DCBL +--- +Dena Bank | BKDN +--- +Dena Gujarat Gramin Bank | DEGX +--- +Deutsche Bank | DEUT +--- +Development Bank of Singapore | DBSS +--- +Dhanlaxmi Bank | DLXB +--- +Dombivli Nagari Sahakari Bank | DNSB +--- +Equitas Small Finance Bank | ESFB +--- +Esaf Small Finance Bank | ESMF +--- +Federal Bank | FDRL +--- +Fincare Small Finance Bank | FSFB +--- +Fingrowth Co-operative Bank | FGCB +--- +Fino Payments Bank | FINO +--- +Gadchiroli District Central Co-operative Bank | GDCB +--- +Gayatri Co-operative Urban Bank | GCUX +--- +Gopinath Patil Parsik Janata Sahakari Bank | PJSB +--- +Greater Bombay Co-operative Bank | GBCB +--- +Gujarat State Co-operative Bank | GSCB +--- +HASTI Co-operative Bank | HCBL +--- +HDFC Bank | HDFC +--- +Himachal Pradesh Gramin Bank | HMBX +--- +Himachal Pradesh State Co-operative Bank | HPSC +--- +Hongkong & Shanghai Banking Corporation | HSBC +--- +Hutatma Sahakari Bank | HUTX +--- +ICICI Bank | ICIC +--- +IDBI Bank | IBKL +--- +IDFC FIRST Bank | IDFB +--- +India Post Payments Bank | IPOS +--- +Indian Bank | IDIB +--- +Indian Overseas Bank | IOBA +--- +Indore Paraspar Sahakari Bank | IPSX +--- +Indusind Bank | INDB +--- +J&K Grameen Bank | XJKG +--- +Jalgaon Janata Bank | JJSB +--- +Jalna Merchants Co-operative Bank | JMCX +--- +Jammu and Kashmir Bank | JAKA +--- +Jana Small Finance Bank | JSFB +--- +Janakalyan Sahakari Bank | JSBL +--- +Janaseva Sahakari Bank, Pune | JANA +--- +Janata Sahakari Bank (Pune) | JSBP +--- +Jharkhand Rajya Gramin Bank | VGBX +--- +Jio Payments Bank | JIOP +--- +Jivan Commercial Co-operative Bank | JVCX +--- +Kaira District Central Co-operative Bank | KARX +--- +Kallappanna Awade Ichalkaranji Janata Sahakari Bank | KAIJ +--- +Kalupur Commercial Co-operative Bank | KCCB +--- +Kalyan Janata Sahakari Bank | KJSB +--- +Karnataka Bank | KARB +--- +Karnataka Gramin Bank | PKGB +--- +Karnataka State Co-operative Apex Bank | KSCB +--- +Karnataka Vikas Grameena Bank | KVGB +--- +Karur Vysya Bank | KVBL +--- +Kashi Gomti Samyut Gramin Bank | KGSX +--- +Kaveri Grameena Bank | KGRB +--- +Kerala Gramin Bank | KLGB +--- +Kokan Mercantile Co-operative Bank | KMCB +--- +Kolhapur District Central Co-operative Bank | KPCX +--- +Kotak Mahindra Bank | KKBK +--- +Krishna Bhima Samruddhi Local Area Bank | KBSX +--- +Lakshmi Vilas Bank (Retail) | LAVB_R +--- +Langpi Dehangi Rural Bank | LDRX +--- +Mahanagar Co-operative Bank | MCBL +--- +Maharashtra Gramin Bank | MAHG +--- +Maharashtra State Co-operative Bank | MSCI +--- +Malad Sahakari Ban | MSBL +--- +Malviya Urban Co-operative Bank | MALX +--- +Malwa Gramin Bank | MGRB +--- +Manipur Rural Bank | MRBX +--- +Manvi Pattana Souharda Sahakari Bank Ni | MVIX +--- +Maratha Co-operative Bank | MRTX +--- +Meghalaya Rural Ban | MERX +--- +Mehsana Urban Co-operative Bank | MSNU +--- +Merchants Souharda Sahakara Bank Niyamitha | MSSX +--- +Mizoram Rural Bank | MZRX +--- +Modasa Nagarik Sahakari Bank | TMSX +--- +Model Co-operative Bank | MDBK +--- +Mumbai District Central Co-operative Bank | MDCB +--- +Municipal Co-operative Bank | MUBL +--- +Muslim Co-operative Bank | MSLM +--- +Nagrik Sahakari Bank, Vidisha | NBMX +--- +Nainital Bank | NTBL +--- +NKGSB Co-operative Bank | NKGS +--- +North East Small Finance Bank | NESF +--- +NSDL Payments Bank | NSPB +--- +Nutan Nagarik Sahakari Bank | NNSB +--- +Oriental Bank of Commerce | ORBC +--- +Pali Urban Co-operative Bank | PALX +--- +Paschim Banga Gramin Bank | PASX +--- +Patan Nagarik Sahakari Bank | PTSX +--- +Paytm Payments Bank | PYTM +--- +Pochampally Co-operative Urban Bank | PCUX +--- +Pragathi Krishna Gramin Bank | PGBX +--- +Prathama Bank | PRTH +--- +Prathama UP Gramin Bank | SUBX +--- +Prime Co-operative Bank | PMEC +--- +Priyadarshani Nagari Sahakari Bank Jalna. | PDSX +--- +Pune Cantonment Sahakari Bank | PCTX +--- +Punjab & Maharashtra Co-operative Bank | PMCB +--- +Punjab & Sind Bank | PSIB +--- +Punjab Gramin Bank | PUGX +--- +Punjab National Bank (Retail) | PUNB_R +--- +Purvanchal Gramin Bank | PURX +--- +Rajasthan Marudhara Gramin Bank | MDGX +--- +Rajasthan Marudhara Gramin Bank | RMGB +--- +Rajgurunagar Sahakari Bank | RSBL +--- +Rajkot Nagarik Sahakari Bank | RNSB +--- +Rani Channamma Mahila Sahakari Bank | ZRNB +--- +RBL Bank | RATN +--- +Sabarkantha District Central Co-operative Bank | SADX +--- +Samarth Sahakari Bank | SBLS +--- +Samruddhi Co-operative Bank | SCOB +--- +Sandur Pattana Souharda Sahakari Bank Niyamitha | SPSX +--- +Saraswat Co-operative Bank | SRCB +--- +Sarva Haryana Gramin Bank | HGBX +--- +Sarvodaya Commerical Co-operative Bank | SVCX +--- +Satara District Central Co-operative Bank | SDCE +--- +Saurashtra Gramin Bank | SAGX +--- +Saurashtra Gramin Bank | SGBA +--- +SBM Bank | STCB +--- +Shivalik Small Finance Bank | SMCB +--- +Shree Dharati Co-operative Bank | SRHX +--- +Shree Kadi Nagarik Sahakari Bank | KDIX +--- +Shri Arihant Co-operative Bank | SACB +--- +Shri Basaveshwar Sahakari Bank Nyt.bagalkot | BASX +--- +Shri Chhatrapati Rajashri Shahu Urban Co-operative Bank | CRUB +--- +Shri Mahila Sewa Sahakari Bank | SEWX +--- +Shri Rajkot District Co-operative Bank | RJTX +--- +Shri Veershaiv Co-operative Bank | VCCX +--- +Sindhudurg District Central Co-operative Bank | SIDC +--- +Smriti Nagrik Sahakari Bank | SNSX +--- +South Indian Bank | SIBL +--- +Sri Vasavamba Co-operative Bank | SVAX +--- +Standard Chartered Bank | SCBL +--- +State Bank of India | SBIN +--- +Sterling Urban Co-operative Bank | STRX +--- +Suco Souharda Sahakari Bank | SSDX +--- +Surat District Co-operative Bank | SDCB +--- +Surat National Co-operative Bank | SUNB +--- +Surat People's Co-operative Bank | SPCB +--- +Suryoday Small Finance Bank | SURY +--- +Sutex Co-operative Bank | SUTB +--- +Suvarnayug Sahakari Bank | SUVX +--- +SVC Co-operative Bank | SVCB +--- +Syndicate Bank | SYNB +--- +Tamilnad Mercantile Bank | TMBL +--- +Telangana Grameena Bank | DGBX +--- +Telangana State Co-operative Apex Bank | TSAB +--- +Thane Bharat Sahakari Bank | TBSB +--- +Thane District Central Co-operative Bank | TDCB +--- +The Vijay Co-operative Bank | VCOB +--- +TJSB Sahakari Bank | TJSB +--- +Tripura Gramin Bank | TGBX +--- +UCO Bank | UCBA +--- +Udaipur Mahila Samridhi Urban Co-operative Bank | UMSX +--- +Udaipur Mahila Urban Co-operative Bank | TUMX +--- +Udaipur Urban Co-operative Bank | UUCB +--- +Udaipur Urban Co-operative Bank | UUCX +--- +Ujjivan Small Finance Bank | UJVN +--- +Union Bank of India | UBIN +--- +United Bank of India | UTBI +--- +Unity Small Finance Bank Limited | UNBA +--- +Urban Co-operative Bank Dharangaon | TUDX +--- +Utkarsh Small Finance Bank | UTKS +--- +Uttarakhand Gramin Bank | UTGX +--- +Vallabh Vidyanagar Commercial Bank | VVCX +--- +Varachha Co-operative Bank | VARA +--- +Vasai Vikas Sahakari Bank | VVSB +--- +Vijaya Bank | VIJB +--- +Vikas Souharda Co-operative Bank | VSCX +--- +Visakhapatnam Co-operative Bank | VISX +--- +Vishweshwar Sahakari Bank | VSBL +--- +Yadagiri Lakshmi Narsimha Swamy Co-operative Urban Bank | YLNX +--- +Yes Bank | YESB + +## List of Banks Supporting TPV for Debit Card + +S No. [columWidth="13"] | Banks | Supported +--- +1 | ICICI | ✓ +--- +2 | Federal | ✓ +--- +3 | Kotak | Coming Soon +--- +4 | Axis | Coming Soon +--- +5 | IDFC | Coming Soon +--- +6 | YES | Coming Soon diff --git a/llm-content/payments/third-party-validation/best-practices.md b/llm-content/payments/third-party-validation/best-practices.md new file mode 100644 index 00000000..a8880d32 --- /dev/null +++ b/llm-content/payments/third-party-validation/best-practices.md @@ -0,0 +1,53 @@ +--- +title: Best Practices +description: Follow these Best practices while doing TPV integration. +--- + +# Best Practices + +Given below are some of the best practices to be followed for a smooth TPV integration and payment experience: + + +### Capture Payment Using Payment Capture Settings + + When a payment made by your customer is authorised, it needs to be captured for it to be settled to your bank account. Use the [Payment Capture Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) to configure the capture settings at an account level using the Dashboard. + + + +### Integrate Orders API + + Orders help in binding multiple payment attempts against a single order. This helps to prevent multiple payments. Integrate with Orders API on your server-side and [pass the `order_id`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) to Checkout. + + + +### Verify Signature to Avoid Data Tampering + + This is a mandatory step that allows you to confirm the authenticity of the details returned to the Checkout form for successful payments. Know more about how to [verify payment signature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation.md#step-6-verify-signature). + + + +### Check Payment/Order Status Before Providing Services + + Check the payment/order status if the payment's status is `captured` and the order's status is `paid` before providing the services to the customers. + + You can determine payment and order status using: + - [Fetch All Payments for an Order API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-payments.md) + - [Fetch Status of a Payment using Payment ID API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md) + - [Fetch Status of an Order using Order ID API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) + + + +### Use Webhooks + + Use Webhooks or API query to avoid any cases of callback failure (drop-offs can be dues to connectivity or network failure) and to verify the payment details using an S2S call. Following are some of the Webhook events you should enable: + - `payment.captured` + - `payment.failed` + - `order.paid` + + Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + + + +### Use Callback URL + + Use the `callback_url` if your customers make online payments on browsers such as Instagram, Facebook Messenger, Opera, UC browsers and so on. This is because these browsers do not support i-frame. diff --git a/llm-content/payments/third-party-validation/custom-integration.md b/llm-content/payments/third-party-validation/custom-integration.md new file mode 100644 index 00000000..985235ee --- /dev/null +++ b/llm-content/payments/third-party-validation/custom-integration.md @@ -0,0 +1,965 @@ +--- +title: Third-Party Validation (TPV) - Custom Integration +description: Know how Razorpay performs Third-Party Validation (TPV) of your investors' bank accounts in real-time using Razorpay Custom Integration. +--- + +# Third-Party Validation (TPV) - Custom Integration + +Third-Party Validation (TPV) of bank accounts is a mandatory requirement for merchants in the BFSI (Banking, Financial Services and Insurance) sector dealing with Securities, Broking and Mutual Funds. As per Securities and Exchange Board of India (SEBI) guidelines, transactions must be made by the investors **only** from those bank accounts provided when they registered with your business. + +With Razorpay, you can comply with the SEBI guidelines for online payment collections by offering TPV integrations with [major banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/custom-integration/bank-list.md) at Checkout. Investors can make payments using netbanking, debit card or UPI. UPI supports both collect and intent flows at Razorpay Custom Integration checkout. + + to get this feature activated on your Razorpay account. + + +### Prerequisites + + - Contact our [Support Team](https://razorpay.com/support/#raise-a-request) to get this feature enabled for your account. + - Keep the API key (combination of `Key_Id` and `Key_Secret`) handy for integration. + - [Generate API Keys from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) if not done already. + - Configure the [payment capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) on the Dashboard. + + +## 1. Integration Flow + +In TPV integration flow, Razorpay maps the investors' bank accounts to ensure that the payment is processed only from their registered bank accounts. Follow the steps given below: + + +### 1.1 Collect Investor Bank Account details + + Collect the bank account details provided by the investor at the time of registration. + + + +### 1.2 Create an Order + + Pass the bank account details to the `bank_account` array of the Orders API: + + /orders + + The investor needs to pay using the payment method specified by you in the order. For example, if you want the investor to pay using UPI, you must pass `method=upi`. + + + + Netbanking + + Given below is the sample code when the `method` is `netbanking`. + + + ```curl: Curl + curl -u : \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 500, + "method": "netbanking", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }' + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "BILL13375649"); + orderRequest.put("method", "netbanking"); + + JSONObject bank_account = new JSONObject(); + bank_account.put("account_number", "765432123456789"); + bank_account.put("name", "Gaurav Kumar"); + bank_account.put("ifsc, "HDFC0000053"); + orderRequest.put("bank_account", bank_account); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); + + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.order.create({ + { + "amount": 500, + "method": "netbanking", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('amount' => 100, 'method' => 'netbanking', 'currency' => 'INR', bank_account => array( 'account_number' => '765432123456789', 'name' => 'Gaurav Kumar', 'ifsc' => 'HDFC0000053'))); + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.Add("receipt", "receipt#1"); + options.Add("method", "netbanking"); + options.Add("currency", "INR"); + bank_account.account_number="765432123456789"; + bank_account.name="Gaurav Kumar"; + bank_account.ifsc="HDFC0000053"; + + options.Add("bank_account", bank_account); + + Order order = client.Order.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + order = Razorpay::Order.create amount: 50000, currency: 'INR', method: 'netbanking', receipt: 'receipt#1', bank_account: { account_number: '765432123456789', name: 'Gaurav Kumar', ifsc: 'HDFC0000053'} + + ```js: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "INR", + method: "netbanking", + receipt: "receipt#1", + bank_account: { + account_number: "765432123456789", + name: "Gaurav Kumar", + ifsc: "HDFC0000053" + } + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "method": "netbanking", + "receipt": "receipt#1", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + } + body, err := client.Order.Create(data, nil) + + ```json: Response + { + "id": "order_GAWN9beXgaqRyO", + "entity": "order", + "amount": 500, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044247 + } + ``` + + + + +### Debit Card + + Given below is the sample code when the `method` is `card`. + + + ```curl: Curl + curl -u : \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 500, + "method": "card", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "BILL13375649"); + orderRequest.put("method", "card"); + + JSONObject bank_account = new JSONObject(); + bank_account.put("account_number", "765432123456789"); + bank_account.put("name", "Gaurav Kumar"); + bank_account.put("ifsc, "HDFC0000053"); + orderRequest.put("bank_account", bank_account); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.order.create({ + { + "amount": 500, + "method": "card", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + } + }) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('amount' => 100, 'currency' => 'INR', 'method' => 'card', bank_account => array( 'account_number' => '765432123456789', 'name' => 'Gaurav Kumar', 'ifsc' => 'HDFC0000053'))); + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.Add("receipt", "receipt#1"); + options.Add("currency", "INR"); + options.Add("method", "card"); + bank_account.account_number="765432123456789"; + bank_account.name="Gaurav Kumar"; + bank_account.ifsc="HDFC0000053"; + + options.Add("bank_account", bank_account); + + Order order = client.Order.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + order = Razorpay::Order.create amount: 50000, currency: 'INR', method: 'card', receipt: 'receipt#1', bank_account: { account_number: '765432123456789', name: 'Gaurav Kumar', ifsc: 'HDFC0000053'} + + ```js: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "INR", + method: "card", + receipt: "receipt#1", + bank_account: { + account_number: "765432123456789", + name: "Gaurav Kumar", + ifsc: "HDFC0000053" + } + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "method": "card", + "receipt": "receipt#1", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + } + body, err := client.Order.Create(data, nil) + + ```json: Response + { + "id": "order_GAWN9beXgaqRyO", + "entity": "order", + "amount": 500, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044247 + } + ``` + + + + +### UPI + + Given below is the sample code when the `method` is `upi`. + + ```curl: Curl + curl -u : \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 500, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "BILL13375649"); + orderRequest.put("method", "upi"); + + JSONObject bank_account = new JSONObject(); + bank_account.put("account_number", "765432123456789"); + bank_account.put("name", "Gaurav Kumar"); + bank_account.put("ifsc", "HDFC0000053"); + orderRequest.put("bank_account", bank_account); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.order.create({ + { + "amount": 500, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('amount' => 100, 'method' => 'upi', 'currency' => 'INR', bank_account => array( 'account_number' => '765432123456789', 'name' => 'Gaurav Kumar', 'ifsc' => 'HDFC0000053'))); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.Add("receipt", "receipt#1"); + options.Add("currency", "INR"); + options.Add("method", "upi"); + bank_account.account_number="765432123456789"; + bank_account.name="Gaurav Kumar"; + bank_account.ifsc="HDFC0000053"; + + options.Add("bank_account", bank_account); + + Order order = client.Order.Create(options); + + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', method: 'upi', bank_account: { account_number: '765432123456789', name: 'Gaurav Kumar', ifsc: 'HDFC0000053'} + ```js: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "INR", + receipt: "receipt#1", + method: 'upi', + bank_account: { + account_number: "765432123456789", + name: "Gaurav Kumar", + ifsc: "HDFC0000053" + } + }) + + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "method": "upi", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + } + body, err := client.Order.Create(data) + ```json: Response + { + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 500, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 + } + ``` + + + + + + #### Request Parameters + + Create a request payload using the following attributes: + + `amount` _mandatory_ +: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, the value of this field should be `100`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. You can create orders in **INR** only. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`method` _mandatory_ +: `string` The payment method used to make the payment. If this parameter is not passed, investors will be able to make payments using both netbanking and UPI payment methods. Possible values: + - `netbanking`: Investors can make payments only using netbanking. + - `card`: Investors can make payments using debit card. + - `upi`: Investors can make payments only using UPI. + +`bank_account` _mandatory_ +: `object` Details of the bank account that the investor has provided at the time of registration. + + `account_number` _mandatory_ + : `string` The bank account number from which the investor should make the payment. For example, `765432123456789` Payments will not be processed for an incorrect account number. + + `name` _mandatory_ + : `string` The name linked to the bank account. For example, `Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` The bank IFSC. For example, `HDFC0000053`. + + + +### 1.3 Fetch Payment Methods + + When creating a custom checkout form for TPV, you can ensure that only the netbanking, debit card and UPI methods are displayed to the investor. + + Use the sample code given below to fetch all payment methods available to you. + + ```js: Request + var razorpay = new Razorpay({ + key: '', + // logo, displayed in the popup + image: 'https://cdn.razorpay.com/logos/Du3F12cJXffdFe_large.jpg', + }); + razorpay.once('ready', function(response) { + console.log(response.methods); + }) + ```js: Response + { + "methods": { + "entity": "methods", + "card": true, + "debit_card": true, + "credit_card": true, + "prepaid_card": true, + "card_networks": { + "AMEX": 0, + "DICL": 1, + "MC": 1, + "MAES": 1, + "VISA": 1, + "JCB": 1, + "RUPAY": 1, + "BAJAJ": 0 + }, + "amex": false, + "netbanking": { + ... + ... + "HDFC": "HDFC Bank", + "ICIC": "ICICI Bank" + ... + ... + }, + "wallet": { + "payzapp": true + }, + "emi": true, + "upi": true, + "cardless_emi": [], + "paylater": [], + "emi_subvention": "customer", + "emi_options": { + ... + ... + "ICIC": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 150000 + }, + { + "duration": 6, + "interest": 13, + "subvention": "customer", + "min_amount": 150000 + } + ...// rest of the emi plans + ], + "HDFC": [ + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 300000 + }, + { + "duration": 18, + "interest": 15, + "subvention": "customer", + "min_amount": 300000 + } + ... + ...// rest of the emi plans + ] + } + } + } + ``` + + Know more about the various [ payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md). + + + +### 1.4 Invoke Checkout and Pass Order Id and Other Options + + + + 1.4.1 Include the JavaScript code in your Webpage + + + Include the following script, preferably in the `` section of your page: + + ```html: Index HTML + + ``` + + +> **INFO** +> +> +> **Include the Javascript, Not the Library** +> +> Include the script from `https://checkout.razorpay.com/v1/razorpay.js` instead of serving a copy from your own server. This allows new updates and bug fixes to the library to get automatically served to your application. +> +> We always maintain backward compatibility with our code. +> + + + + +### 1.4.2 Instantiate Razorpay Custom Checkout + + #### Single Instance on a Page + + ```js: Invoke a Single Instance + var razorpay = new Razorpay({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', + }); + ``` + + #### Multiple Instances on Same Page + + If you need multiple Razorpay instances on the same page, you can globally set some of the options: + + ```js: Invoke Multiple Instances + Razorpay.configure({ + key: '', + // logo, displayed in the payment processing popup + image: 'https://i.imgur.com/n5tjHFD.jpg', + }) + new Razorpay({}); // will inherit key and image from above. + ``` + + + +### 1.4.3 Submit Payment Details + + After the order is created and the investor's payment details are obtained, the information should be sent to Razorpay to complete the payment. The data that needs to be submitted depends upon the payment method selected by the investor. + + You can do this by invoking the `createPayment` method: + + ```js: Netbanking - Handler function + var data = { + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR",// Default is INR. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_Dd3Wbag7QXDuuL', // Order ID generated in Step 1 + method: 'netbanking', + bank: 'HDFC' + }; + + var btn = document.querySelector('#btn'); + btn.addEventListener('click', function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on('payment.success', function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + + razorpay.on('payment.error', function(resp){alert(resp.error.description)}); // will pass error object to error handler + + }) + ```js: Netbanking - Callback URL + var data = { + callback_url: 'https://www.examplecallbackurl.com/', + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR",// Default is INR. We support more than 90 currencies. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_CuEzONfnOI86Ab',// Order ID generated in Step 1 + method: 'netbanking', + bank: 'HDFC' + }; + + var btn = document.querySelector('#btn'); + btn.addEventListener('click', function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + }) + ```js: UPI - Handler function + var data = { + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR",// Default is INR. We support more than 90 currencies. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_Dd3Wbag7QXDuuL',//Order ID generated in Step 1 + method: 'upi', + vpa: 'gaurav.kumar@exampleupi' + }; + + var btn = document.querySelector('#btn'); + btn.addEventListener('click', function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on('payment.success', function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + + razorpay.on('payment.error', function(resp){alert(resp.error.description)}); // will pass error object to error handler + + }) + ```js: UPI - Callback URL + var data = { + callback_url: 'https://www.examplecallbackurl.com/', + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: 'INR',// Default is INR. We support more than 90 currencies. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_CuEzONfnOI86Ab',// Order ID generated in Step 1 + method: 'upi', + vpa: 'gaurav.kumar@exampleupi' + }; + + var btn = document.querySelector('#btn'); + btn.addEventListener('click', function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + }) + ```js: Debit Card - Handler function + var data = { + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR",// Default is INR. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_GAWRjlWkVcRh0V', // Order ID generated in Step 1 + method: 'card', + card[name]: 'Gaurav Kumar', + card[number]: '4386289407660153', + card[cvv]: '566', + card[expiry_month]: '10', + card[expiry_year]: '30' + }; + + var btn = document.querySelector('#btn'); + btn.addEventListener('click', function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + razorpay.on('payment.success', function(resp) { + alert(resp.razorpay_payment_id), + alert(resp.razorpay_order_id), + alert(resp.razorpay_signature)}); // will pass payment ID, order ID, and Razorpay signature to success handler. + + razorpay.on('payment.error', function(resp){alert(resp.error.description)}); // will pass error object to error handler + + }) + ```js: Debit Card - Callback URL + var data = { + callback_url: 'https://www.examplecallbackurl.com/', + amount: 1000, // in currency subunits. Here 1000 = 1000 paise, which equals to ₹10 + currency: "INR",// Default is INR. We support more than 90 currencies. + email: 'gaurav.kumar@example.com', + contact: '9123456780', + notes: { + address: 'Ground Floor, SJR Cyber, Laskar Hosur Road, Bengaluru', + }, + order_id: 'order_GAWRjlWkVcRh0V',// Order ID generated in Step 1 + method: 'card', + card[name]: 'Gaurav Kumar', + card[number]: '4386289407660153', + card[cvv]: '566', + card[expiry_month]: '10', + card[expiry_year]: '30' + }; + + var btn = document.querySelector('#btn'); + btn.addEventListener('click', function(){ // has to be placed within user initiated context, such as click, in order for popup to open. + razorpay.createPayment(data); + + }) + The `createPayment` method should be called within an event listener triggered by user action to prevent the pop-up from being blocked. For example: + + ```js + $('button').click( function (){ razorpay.createPayment(...) }) + ``` + + +> **INFO** +> +> +> **Handler Function Vs. Callback URL** +> +> - **Handler Function**: +> +When you use the handler function, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Checkout Form. You need to collect these and send them to your server. +> - **Callback URL**: +> +When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. +> + + + + + + + +### 1.5 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.6 Verify the Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + + +### Related Information + +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) (Recommended) +- [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) (Recommended) +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md) +- [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md) +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) diff --git a/llm-content/payments/third-party-validation/custom-integration/bank-list.md b/llm-content/payments/third-party-validation/custom-integration/bank-list.md new file mode 100644 index 00000000..f5bb3a90 --- /dev/null +++ b/llm-content/payments/third-party-validation/custom-integration/bank-list.md @@ -0,0 +1,1014 @@ +--- +title: Supported Banks +description: List of banks that Razorpay has partnered with for Third-Party Validation (TPV). +--- + +# Supported Banks + +Third-Party Validation (TPV) is an essential step in the Banking, Financial Services and Insurance sector. As per the SEBI guidelines, businesses operating in these sectors must ensure that the payments are accepted from the customers' registered, KYC-approved bank accounts only. + +Using the Razorpay Smart Collect API, you can comply with the regulatory guidelines to ensure that customers make payments only from their registered bank accounts (TPV). Any payment made from an unregistered account (non-TPV) is automatically refunded to the customer. + +Following is the list of banks that Razorpay has partnered with for third-party validation (TPV) of your customers' accounts. You can validate the customers' accounts using the payment methods supported by the banks. + +## List of Banks Supporting TPV for Netbanking + +Given below is the list of banks supporting TPV for netbanking. + +Bank Name | Bank Code +--- +Allahabad Bank | ALLA +--- +AU Small Finance Bank | AUBL +--- +Bank of Baroda (Retail) | BARB_R +--- +Bandhan Bank Limited (except Mutual Fund and Insurance) | BDBL +--- +Bank of India | BKID +--- +Bank of India (Corporate) | BKID_C +--- +Central Bank of India | CBIN +--- +City Union Bank | CIUB +--- +Canara Bank | CNRB +--- +Corporation Bank | CORP +--- +Catholic Syrian Bank | CSBK +--- +Development Bank of Singapore | DBSS +--- +DCB Bank | DCBL +--- +Deutsche Bank | DEUT +--- +Dhanlaxmi Bank | DLXB +--- +Equitas Small Finance Bank | ESFB +--- +Federal Bank | FDRL +--- +HDFC Bank | HDFC +--- +IDBI Bank | IBKL +--- +ICICI Bank | ICIC +--- +IDFC FIRST BANK | IDFB +--- +Indian Bank | IDIB +--- +Indusind Bank | INDB +--- +Indian Overseas Bank | IOBA +--- +Jammu and Kashmir Bank | JAKA +--- +Jana Small Finance Bank | JSFB +--- +Karnataka Bank | KARB +--- +Kotak Bank | KKBK +--- +Karur Vysya Bank | KVBL +--- +Lakshmi Vilas Bank (Retail) | LAVB_R +--- +Bank Of Maharashtra | MAHB +--- +Punjab National Bank (Retail) | PUNB_R +--- +RBL Bank | RATN +--- +State Bank of India | SBIN +--- +Standard Chartered | SCBL +--- +South Indian Bank | SIBL +--- +Saraswat Co-operative Bank | SRCB +--- +Shamrao Vithal Co.Operative Bank | SVCB +--- +Tamilnadu Mercantile Bank | TMBL +--- +Union Bank of India | UBIN +--- +UCO Bank | UCBA +--- +Ujjivan Bank | UJVN +--- +Axis Bank | UTIB +--- +Yes Bank | YESB +--- + +## List of Banks Supporting TPV for UPI + +Given below is the list of banks supporting TPV for UPI. + +Bank Name | Bank Code +--- +A.P. Mahesh Co-operative Urban Bank | APMC +--- +Abhyudaya Co-operative Bank | ABHY +--- +Adarsh Co-operative Bank | ACBX +--- +Adarsh Co-operative Urban Bank | ACUX +--- +Aditya Birla Idea Payments Bank | ABPB +--- +Ahmedabad District Co-operative Bank | ADBX +--- +Ahmedabad Mercantile Co-operative Bank | AMCB +--- +Ahmednagar Merchants Co-operative Bank | AMDN +--- +Airtel Payments Bank | AIRP +--- +Akola District Central Co-operative Bank | ADCC +--- +Allahabad Bank | ALLA +--- +Allahabad Up Gramin Bank | AUGX +--- +Anand Mercantile Co-operative Bank | TAMX +--- +Andhra Bank | ANDB +--- +Andhra Pradesh Grameena Vikas Bank | APGV +--- +Andhra Pradesh State Co-operative Bank | APBL +--- +Andhra Pragathi Grameena Bank | APGB +--- +Apna Sahakari Bank | ASBL +--- +Assam Gramin Vikash Bank | AGVX +--- +Associate Co-operative Bank | ASOX +--- +AU Small Finance Bank | AUBL +--- +Axis Bank | AXIS +--- +Axis Bank | UTIB +--- +Banaskantha District Central Co-operative Bank | BKDX +--- +Banaskantha Mercantile Co-operative Bank | BMPX +--- +Bandhan Bank | BDBL +--- +Bank of America | BOFA +--- +Bank of Baroda (Retail) | BARB_R +--- +Bank of India | BKID +--- +Bank of Maharashtra | MAHB +--- +Baramati Sahakari Bank | BARA +--- +Baroda Central Co-operative Bank | BRDX +--- +Baroda Gujarat Gramin Bank | BGGX +--- +Baroda Rajasthan Kshetriya Gramin Bank | BRGX +--- +Baroda Uttar Pradesh Gramin Bank | BUGX +--- +Bassein Catholic Co-operative Bank | BACB +--- +Bhagini Nivedita Sahakari Bank Pune | BNSB +--- +Bharat Co-operative Bank | BCBM +--- +Bhilwara Urban Co-operative Bank | BHUX +--- +Canara Bank | CNRB +--- +Capital Small Finance Bank | CLBL +--- +Catholic Syrian Bank | CSBK +--- +Central Bank of India | CBIN +--- +Chaitanya Godavari Grameena Bank | CGGX +--- +Chartered Sahakari Bank Niyamitha | CSBX +--- +Chhattisgarh Rajya Gramin Bank | CGBX +--- +Chhattisgarh Rajya Gramin Bank | CRGB +--- +CITI Bank | CITI +--- +Citizen Co-operative Bank | CCBX +--- +Citizen Credit Co-operative Bank | CCBL +--- +Citizens Co-operative Bank | CTBX +--- +City Union Bank | CIUB +--- +Coastal Local Area Bank | COAS +--- +Coastal Local Area Bank | COLX +--- +Corporation Bank | CORP +--- +Cosmos Co-operative Bank | COSB +--- +Dakshin Bihar Gramin Bank | BGBX +--- +Dakshin Bihar Gramin Bank | MBGX +--- +Darussalam Co-operative Urban Bank | DCUX +--- +DCB Bank | DCBL +--- +Dena Bank | BKDN +--- +Dena Gujarat Gramin Bank | DEGX +--- +Deutsche Bank | DEUT +--- +Development Bank of Singapore | DBSS +--- +Dhanlaxmi Bank | DLXB +--- +Dombivli Nagari Sahakari Bank | DNSB +--- +Equitas Small Finance Bank | ESFB +--- +Esaf Small Finance Bank | ESMF +--- +Federal Bank | FDRL +--- +Fincare Small Finance Bank | FSFB +--- +Fingrowth Co-operative Bank | FGCB +--- +Fino Payments Bank | FINO +--- +Gadchiroli District Central Co-operative Bank | GDCB +--- +Gayatri Co-operative Urban Bank | GCUX +--- +Gopinath Patil Parsik Janata Sahakari Bank | PJSB +--- +Greater Bombay Co-operative Bank | GBCB +--- +Gujarat State Co-operative Bank | GSCB +--- +HASTI Co-operative Bank | HCBL +--- +HDFC Bank | HDFC +--- +Himachal Pradesh Gramin Bank | HMBX +--- +Himachal Pradesh State Co-operative Bank | HPSC +--- +Hongkong & Shanghai Banking Corporation | HSBC +--- +Hutatma Sahakari Bank | HUTX +--- +ICICI Bank | ICIC +--- +IDBI Bank | IBKL +--- +IDFC FIRST Bank | IDFB +--- +India Post Payments Bank | IPOS +--- +Indian Bank | IDIB +--- +Indian Overseas Bank | IOBA +--- +Indore Paraspar Sahakari Bank | IPSX +--- +Indusind Bank | INDB +--- +J&K Grameen Bank | XJKG +--- +Jalgaon Janata Bank | JJSB +--- +Jalna Merchants Co-operative Bank | JMCX +--- +Jammu and Kashmir Bank | JAKA +--- +Jana Small Finance Bank | JSFB +--- +Janakalyan Sahakari Bank | JSBL +--- +Janaseva Sahakari Bank, Pune | JANA +--- +Janata Sahakari Bank (Pune) | JSBP +--- +Jharkhand Rajya Gramin Bank | VGBX +--- +Jio Payments Bank | JIOP +--- +Jivan Commercial Co-operative Bank | JVCX +--- +Kaira District Central Co-operative Bank | KARX +--- +Kallappanna Awade Ichalkaranji Janata Sahakari Bank | KAIJ +--- +Kalupur Commercial Co-operative Bank | KCCB +--- +Kalyan Janata Sahakari Bank | KJSB +--- +Karnataka Bank | KARB +--- +Karnataka Gramin Bank | PKGB +--- +Karnataka State Co-operative Apex Bank | KSCB +--- +Karnataka Vikas Grameena Bank | KVGB +--- +Karur Vysya Bank | KVBL +--- +Kashi Gomti Samyut Gramin Bank | KGSX +--- +Kaveri Grameena Bank | KGRB +--- +Kerala Gramin Bank | KLGB +--- +Kokan Mercantile Co-operative Bank | KMCB +--- +Kolhapur District Central Co-operative Bank | KPCX +--- +Kotak Mahindra Bank | KKBK +--- +Krishna Bhima Samruddhi Local Area Bank | KBSX +--- +Lakshmi Vilas Bank (Retail) | LAVB_R +--- +Langpi Dehangi Rural Bank | LDRX +--- +Mahanagar Co-operative Bank | MCBL +--- +Maharashtra Gramin Bank | MAHG +--- +Maharashtra State Co-operative Bank | MSCI +--- +Malad Sahakari Ban | MSBL +--- +Malviya Urban Co-operative Bank | MALX +--- +Malwa Gramin Bank | MGRB +--- +Manipur Rural Bank | MRBX +--- +Manvi Pattana Souharda Sahakari Bank Ni | MVIX +--- +Maratha Co-operative Bank | MRTX +--- +Meghalaya Rural Ban | MERX +--- +Mehsana Urban Co-operative Bank | MSNU +--- +Merchants Souharda Sahakara Bank Niyamitha | MSSX +--- +Mizoram Rural Bank | MZRX +--- +Modasa Nagarik Sahakari Bank | TMSX +--- +Model Co-operative Bank | MDBK +--- +Mumbai District Central Co-operative Bank | MDCB +--- +Municipal Co-operative Bank | MUBL +--- +Muslim Co-operative Bank | MSLM +--- +Nagrik Sahakari Bank, Vidisha | NBMX +--- +Nainital Bank | NTBL +--- +NKGSB Co-operative Bank | NKGS +--- +North East Small Finance Bank | NESF +--- +NSDL Payments Bank | NSPB +--- +Nutan Nagarik Sahakari Bank | NNSB +--- +Oriental Bank of Commerce | ORBC +--- +Pali Urban Co-operative Bank | PALX +--- +Paschim Banga Gramin Bank | PASX +--- +Patan Nagarik Sahakari Bank | PTSX +--- +Paytm Payments Bank | PYTM +--- +Pochampally Co-operative Urban Bank | PCUX +--- +Pragathi Krishna Gramin Bank | PGBX +--- +Prathama Bank | PRTH +--- +Prathama UP Gramin Bank | SUBX +--- +Prime Co-operative Bank | PMEC +--- +Priyadarshani Nagari Sahakari Bank Jalna. | PDSX +--- +Pune Cantonment Sahakari Bank | PCTX +--- +Punjab & Maharashtra Co-operative Bank | PMCB +--- +Punjab & Sind Bank | PSIB +--- +Punjab Gramin Bank | PUGX +--- +Punjab National Bank (Retail) | PUNB_R +--- +Purvanchal Gramin Bank | PURX +--- +Rajasthan Marudhara Gramin Bank | MDGX +--- +Rajasthan Marudhara Gramin Bank | RMGB +--- +Rajgurunagar Sahakari Bank | RSBL +--- +Rajkot Nagarik Sahakari Bank | RNSB +--- +Rani Channamma Mahila Sahakari Bank | ZRNB +--- +RBL Bank | RATN +--- +Sabarkantha District Central Co-operative Bank | SADX +--- +Samarth Sahakari Bank | SBLS +--- +Samruddhi Co-operative Bank | SCOB +--- +Sandur Pattana Souharda Sahakari Bank Niyamitha | SPSX +--- +Saraswat Co-operative Bank | SRCB +--- +Sarva Haryana Gramin Bank | HGBX +--- +Sarvodaya Commerical Co-operative Bank | SVCX +--- +Satara District Central Co-operative Bank | SDCE +--- +Saurashtra Gramin Bank | SAGX +--- +Saurashtra Gramin Bank | SGBA +--- +SBM Bank | STCB +--- +Shivalik Small Finance Bank | SMCB +--- +Shree Dharati Co-operative Bank | SRHX +--- +Shree Kadi Nagarik Sahakari Bank | KDIX +--- +Shri Arihant Co-operative Bank | SACB +--- +Shri Basaveshwar Sahakari Bank Nyt.bagalkot | BASX +--- +Shri Chhatrapati Rajashri Shahu Urban Co-operative Bank | CRUB +--- +Shri Mahila Sewa Sahakari Bank | SEWX +--- +Shri Rajkot District Co-operative Bank | RJTX +--- +Shri Veershaiv Co-operative Bank | VCCX +--- +Sindhudurg District Central Co-operative Bank | SIDC +--- +Smriti Nagrik Sahakari Bank | SNSX +--- +South Indian Bank | SIBL +--- +Sri Vasavamba Co-operative Bank | SVAX +--- +Standard Chartered Bank | SCBL +--- +State Bank of India | SBIN +--- +Sterling Urban Co-operative Bank | STRX +--- +Suco Souharda Sahakari Bank | SSDX +--- +Surat District Co-operative Bank | SDCB +--- +Surat National Co-operative Bank | SUNB +--- +Surat People's Co-operative Bank | SPCB +--- +Suryoday Small Finance Bank | SURY +--- +Sutex Co-operative Bank | SUTB +--- +Suvarnayug Sahakari Bank | SUVX +--- +SVC Co-operative Bank | SVCB +--- +Syndicate Bank | SYNB +--- +Tamilnad Mercantile Bank | TMBL +--- +Telangana Grameena Bank | DGBX +--- +Telangana State Co-operative Apex Bank | TSAB +--- +Thane Bharat Sahakari Bank | TBSB +--- +Thane District Central Co-operative Bank | TDCB +--- +The Vijay Co-operative Bank | VCOB +--- +TJSB Sahakari Bank | TJSB +--- +Tripura Gramin Bank | TGBX +--- +UCO Bank | UCBA +--- +Udaipur Mahila Samridhi Urban Co-operative Bank | UMSX +--- +Udaipur Mahila Urban Co-operative Bank | TUMX +--- +Udaipur Urban Co-operative Bank | UUCB +--- +Udaipur Urban Co-operative Bank | UUCX +--- +Ujjivan Small Finance Bank | UJVN +--- +Union Bank of India | UBIN +--- +United Bank of India | UTBI +--- +Unity Small Finance Bank Limited | UNBA +--- +Urban Co-operative Bank Dharangaon | TUDX +--- +Utkarsh Small Finance Bank | UTKS +--- +Uttarakhand Gramin Bank | UTGX +--- +Vallabh Vidyanagar Commercial Bank | VVCX +--- +Varachha Co-operative Bank | VARA +--- +Vasai Vikas Sahakari Bank | VVSB +--- +Vijaya Bank | VIJB +--- +Vikas Souharda Co-operative Bank | VSCX +--- +Visakhapatnam Co-operative Bank | VISX +--- +Vishweshwar Sahakari Bank | VSBL +--- +Yadagiri Lakshmi Narsimha Swamy Co-operative Urban Bank | YLNX +--- +Yes Bank | YESB + +## List of Banks Supporting TPV for Smart Collect + +Given below is the list of banks supporting TPV for Smart Collect. + +Bank Name | Bank Code +--- +A. P Mahesh Bank | APMC +--- +Abhyudaya Co-op Bank | ABHY +--- +Adarsh Cooperative Bank Ltd | ACBX +--- +Ahmedabad Mercanatile Co-op Bank | AMCB +--- +Airtel Payments Bank | AIRP +--- +Allahabad Bank | ALLA +--- +Andhra Bank | ANDB +--- +Andhra Pragathi Grameena Bank | APGB +--- +Andhra Pragathi Grameena Vikas Bank | APGV +--- +Apna Sahakari Bank | ASBL +--- +Assam Gramin Vikash Bank | AGVX +--- +Associate Co-operative Bank Limited,Surat | ASOX +--- +AU Small Finance Bank | AUBL +--- +Axis Bank | UTIB +--- +Banaskantha Mercantile Co-operative Bank Limited | BMPX +--- +Bandhan Bank | BDBL +--- +Bank of America | BOFA +--- +Bank Of Baroda | BARB +--- +Bank Of India | BKID +--- +Bank of Maharashtra | MAHB +--- +Baroda Central Co-operative Bank | BRDX +--- +Baroda Gujarat Gramin Bank | BGGX +--- +Baroda Rajasthan Khetriya Gramin Bank | BRGX +--- +Baroda Uttar Pradesh Gramin Bank | BUGX +--- +Bassein Catholic Coop Bank | BACB +--- +Bhagini Nivedita Sahakari Bank Ltd,Pune | BNSB +--- +Bharat Co-operative Bank | BCBM +--- +Bhilwara Urban Co-operative Bank Ltd | BHUX +--- +Canara Bank | CNRB +--- +Capital Small Finance Bank | CLBL +--- +Catholic Syrian Bank | CSBK +--- +Central Bank of india | CBIN +--- +Chaitanya Godavari Grameena Bank | CGGX +--- +Chartered Sahakari Bank Niyamitha | CSBX +--- +Chhattisgarh Rajya Gramin Bank | CGBX +--- +Citibank Retail | CITI +--- +Citizen Co-operative Bank Ltd - Noida | CCBX +--- +Citizens Co-operative Bank Ltd. | CTBX +--- +City Union Bank | CIUB +--- +Costal Local Area Bank Ltd | COAS +--- +Dakshin Bihar Gramin Bank | MBGX +--- +DBS Digi Bank | DBSS +--- +DCB Bank | DCBL +--- +Dena Bank | BKDN +--- +Dena Gujarat Gramin Bank | DEGX +--- +Deutsche Bank AG | DEUT +--- +Dhanalaxmi bank | DLXB +--- +Dombivli Nagrik Sahakari Bank | DNSB +--- +Equitas Small Finance Bank | ESFB +--- +ESAF Small Finance Bank | ESAF,ESMF +--- +Federal Bank | FDRL +--- +Fincare Small Finance Bank | FSFB +--- +Fingrowth Co-operative Bank Ltd | FGCB +--- +FINO Payments Bank | FINO +--- +G P Parsik Bank | PJSB +--- +HDFC | HDFC +--- +Himachal Pradesh Gramin Bank | HMBX +--- +HSBC | HSBC +--- +Hutatma Sahakari Bank Ltd | HUTX +--- +ICICI Bank | ICIC +--- +IDBI Bank | IBKL +--- +IDFC | IDFB +--- +India Post Payment Bank | IPOS +--- +Indian Bank | IDIB +--- +Indian Overseas Bank | IOBA +--- +Indore Paraspar Sahakari Bank Ltd | IPSX +--- +IndusInd Bank | INDB +--- +J & K Grameen Bank | JAKA +--- +Jalgaona Janata Sahkari Bank | JJSB +--- +Jalna Merchant's Co-operative Bank Ltd. | JMCX +--- +Jammu & Kashmir Bank | JAKA +--- +Jana Small Finance Bank | JSFB +--- +Janakalyan Sahakari Bank | JSBL +--- +Janaseva Sahakari Bank Ltd Pune | JANA,JASB +--- +Janta Sahakari Bank Pune | JSBP +--- +Jio Payments Bank | JIOP +--- +Jivan Commercial co-operative Bank Ltd. | JVCX +--- +Kallappanna Awade Ichalkaranji Janata Sahakari Bank Ltd. | KAIJ +--- +Kalupur Commercial Co-operative Bank | KCCB +--- +Karnataka Bank | KARB +--- +Karnataka vikas Gramin Bank | KVGB +--- +Karur Vysaya Bank | KVBL +--- +Kashi Gomti Samyut Gramin Bank | KGSX +--- +Kerala Gramin Bank | KLGB +--- +Kokan Merchantile Co-Operative Bank Ltd | KMCB +--- +Kolhapur District Central Co-operative Bank Limited | KPCX +--- +Kotak Mahindra Bank | KKBK +--- +Krishna Bhima Samruddhi Local Area Bank | KBSX +--- +Maharashtra Grameen Bank | MAHG +--- +Maharashtra state co opp Bank | MSCI +--- +Malad Sahakari Bank | MSBL +--- +Malviya Urban Co-operative Bank Limited | MALX +--- +Manipur Rural Bank | MRBX +--- +Manvi Pattana Souharda Sahakari Bank | MVIX +--- +Maratha Cooprative Bank Ltd | MRTX +--- +Meghalaya Rural Bank | MERX +--- +Mizoram Rural Bank | MZRX +--- +Model Co-operative Bank Limited | MDBK +--- +Nagarik Sahakari Bank Maryadit, Vidisha | NBMX +--- +Nanital Bank Ltd | NTBL +--- +NKGSB | NKGS +--- +NSDL Payments Bank | NSPB +--- +Nutan Nagrik Sahakari Bank | NNSB +--- +Pali Urban Co-operative Bank Ltd. | PALX +--- +Paschim Banga Gramin Bank | PASX +--- +Patan Nagrik Sahakari Bank Ltd | PTSX +--- +Paytm Payments Bank | PYTM +--- +Pragathi Krishna Gramin Bank | PGBX +--- +Prathama Bank | PRTH +--- +Prime Co-operative Bank Ltd. | PMEC +--- +Priyadarshini Nagari Sahakari Bank Ltd. | PDSX +--- +Pune Cantonment Sahakari Bank Ltd | PCTX +--- +Punjab and Maharastra Co. bank | PMCB +--- +Punjab and Sind Bank | PSIB +--- +Punjab Gramin Bank | PUGX +--- +Punjab National Bank | PUNB +--- +Purvanchal Bank | NA +--- +Rajasthan Marudhara Gramin Bank | RMGB +--- +Rajkot Nagari Sahakari Bank Ltd | RNSB +--- +Rani Channamma Mahila Sahakari Bank Belagavi | ZRNB +--- +Samarth Sahakari Bank Limited | SBLS +--- +Samruddhi Co-op bank ltd | SCOB +--- +Sandue Pattana Souharda Sahakari Bank | SPSX +--- +Sarva Haryana Gramin Bank | HGBX +--- +Sarva UP Gramin Bank | SUBX +--- +Sarvodaya Commercial Co-operative Bank | SVCX +--- +Saurashtra Gramin Bank | SAGX +--- +SBM BANK (INDIA) LIMITED | STCB +--- +Shree Dharati Co-operative Bank Ltd. | SRHX +--- +Shree Kadi Nagarik Sahakari Bank Ltd | KDIX +--- +Shri Arihant Co-operative Bank Ltd. | SACB +--- +Shri Basaveshwar Sahakari Bank Niyamit, Bagalkot | BASX +--- +Shri Chhatrapathi Rajarsshi Shahu Bank | CRUB +--- +Shri Mahila Sewa Sahakari Bank Limited | SEWX +--- +Shri Rajkot District Co-operative Bank Ltd | RJTX +--- +Shri Veershaiv Co-op Bank Ltd. | VCCX +--- +Sindhudurg Co-operative Bank | SIDC +--- +Smriti Nagrik Sahakari Bank Maryadit, Mandsaur | SNSX +--- +South Indian Bank | SIBL +--- +Sri Rama Co-operative Bank Ltd | NA +--- +Sri Vasavamba Cooperative Bank Ltd | SVAX +--- +Standard Chartered | SCBL +--- +State Bank Of India | SBIN +--- +Sterling Urban Co-operative Bank Ltd | STRX +--- +Suco Souharda Sahakari bank | SSDX +--- +Surat People Cooperative Bank | SPCB +--- +Suryoday Small Finance Bank Ltd | SURY +--- +Sutex Co operative Bank | SUTB +--- +Suvarnayug Sahakari Bank Ltd | SUVX +--- +SVC Co-operative Bank | SVCB +--- +Syndicate Bank | SYNB +--- +Tamilnad Mercantile Bank | TMBL +--- +Telangana Gramin Bank | DGBX +--- +Telangana State Co Operative Apex Bank | TSAB +--- +Thane Bharat Sahakari Bank | TBSB +--- +The Adarsh Urban Co-op. Bank Ltd., Hyderabad | ACUX +--- +The Ahmedabad District Coop bank | ADBX +--- +The Ahmednagar Merchants Co-operative Bank | AMDN +--- +The Anand Mercantile Co-Op. Bank Ltd. | TAMX +--- +The Andhra Pradesh state cooperative | APBL +--- +The Banaskantha District Central Co-Op. Bank Ltd. | BKDX +--- +The Baramati Sahakari Bank Ltd. | BARA +--- +The Cosmos Co-Operative Bank LTD | COSB +--- +The Darussalam Co-operative Urban Bank Ltd. | DCUX +--- +The Gadchiroli District Central Co-operative Bank | GDCB +--- +The Gayatri Co-operative Urban Bank Ltd. | GCUX +--- +The Gujarat State Co-operative Bank Limited | GSCB +--- +The Hasti Co-operative Bank Ltd | HCBL +--- +The Himachal Pradesh State Co-operative Bank Ltd | HPSC,HPSC +--- +The Kaira District Central Co-Op. Bank Ltd. | KARX +--- +The Kalyan Janta Sahkari Bank | KJSB +--- +The Kanakmahalakshmi Co-operative Bank Ltd | IBKL +--- +The Lakshmi Vilas Bank Limited | LAVB_R +--- +The Mahanagar Co-Op. Bank Ltd | MCBL +--- +The Mehsana Urban Co-Operative Bank | MSNU +--- +The Merchants Souharda Sahakari Bank Ltd | MSSX +--- +The Modasa Nagarik Sahakari Bank Limited | TMSX +--- +The Municipal Co-op Bank | MUBL +--- +The Muslim Co-operative Bank Ltd. | MSLM +--- +The Pochampally Co-operative Urban bank Ltd | PCUX +--- +The Ratnakar Bank Limited | RATN +--- +The Sabarkantha district Central Coop Bank Ltd | SADX +--- +The Saraswat Co-Operative Bank | SRCB +--- +The Satara Distric Central Co-operative Bank Ltd. | SDCE +--- +The SSK Co-operative Bank | NA +--- +The Surat District Co-op Bank Ltd. | SDCB +--- +The Thane Janta Sahakari Bank Ltd(TJSB) | TJSB +--- +The Udaipur Mahila Samridhi Urban Co-operative Bank Ltd. | UMSX +--- +The Udaipur Mahila Urban Co-op Bank Ltd | TUMX +--- +The Udaipur Urban Co-operative Bank ltd. | UUCX,UUCB +--- +The Urban Cooperative Bank Ltd Dharangaon | TUDX +--- +The Vallabh Vidyanagar Commercial Co-operative Bank Ltd | VVCX +--- +The Varachha Co-op Bank Ltd. | VARA +--- +The Vijay Co-operative Bank Ltd, Ahmedabad | VCOB +--- +The Visakhapatnam Co-operative Bank Ltd. | VISX +--- +The Vishweshwar Sahakari Bank Ltd | VSBL +--- +Tripura Gramin Bank | TGBX +--- +UCO Bank | UCBA +--- +Ujjivan Small Finance Bank Limited (Web Collect) | UJVN +--- +Union Bank of India | UBIN +--- +Uttarakhand Gramin Bank | UTGX +--- +Vananchal Gramin Bank | VGBX +--- +Vasai Vikas Co-op Bank Ltd | VVSB +--- +Vijaya Bank | VIJB +--- +Vikas Souharda Co-operative Bank Ltd. | VSCX +--- +Yadagiri Lakshmi Narasimha Swamy Co-Op Urban Bank Ltd | YLNX +--- +Yes Bank | YESB + +### List of Banks Supporting TPV for Debit Card + +Banks | Supported +--- +ICICI | ✓ +--- +Federal | ✓ +--- +Kotak | Coming Soon +--- +Axis | Coming Soon +--- +IDFC | Coming Soon +--- +YES | Coming Soon +--- diff --git a/llm-content/payments/third-party-validation/custom-integration/best-practices.md b/llm-content/payments/third-party-validation/custom-integration/best-practices.md new file mode 100644 index 00000000..012e12ce --- /dev/null +++ b/llm-content/payments/third-party-validation/custom-integration/best-practices.md @@ -0,0 +1,55 @@ +--- +title: Best Practices +description: Follow these Best practices while doing TPV integration. +--- + +# Best Practices + +Given below are some of the best practices to be followed for a smooth TPV integration and payment experience: + +- [Integrate Orders API](#1-integrate-orders-api) +- [Verify Signature to Avoid Data Tampering](#2-verify-signature-to-avoid-data-tampering) +- [Check Payment/Order Status before Providing Services](#3-check-paymentorder-status-before-providing-services) +- [Implement Webhooks](#4-implement-webhooks) +- [Implement Callback URL](#5-implement-callback-url) +- [Implement VPA Saving and Validation Features](#6-implement-vpa-saving-and-validation-features) + +## 1. Integrate Orders API + +Orders help in binding multiple payment attempts against a single order. This helps to prevent multiple payments. Integrate with Orders API on your server-side and pass the `order_id` to Checkout. + +## 2. Verify Signature to Avoid Data Tampering + +This is a mandatory step that allows you to confirm the authenticity of the details returned to the Checkout form for successful payments. + +Know more about [how to verify payment signature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/custom-integration.md#16-verify-the-signature). + +## 3. Check Payment/Order Status before Providing Services + +Check the payment/order status, that is, if the payment's status is `captured` and the order's status is `paid` before providing the services to the customers. + +You can determine payment and order status using: +- [Fetch All Payments for an Order API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-payments.md) +- [Fetch Status of a Payment using Payment ID API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md) +- [Fetch Status of an Order using Order ID API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) + +## 4. Implement Webhooks + +Implement Webhooks or the query API to avoid any cases of callback failure (drop-offs can be due to connectivity or network failure) and to verify the payment details using an S2S call. Following are some of the Webhook events that you should enable: +- `payment.captured` +- `payment.failed` +- `order.paid` + +Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + +## 5. Implement Callback URL + +Implement `callback_url` if your customer's make online payments on browsers such as Instagram, Facebook Messenger, Opera, UC browsers and so on. These browsers do not support i-frame. + +## 6. Implement VPA Saving and Validation Features + +Follow these best practices if you accept UPI collect payments from customers: + +1. Validate the VPA before initiating the payment request. Know more about [VPA Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/validate-vpa.md). +2. Add a custom UPI Collect expiry based on the business requirement to provide enough time for the customer to complete the payment. +3. Use the [Saved VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/saved-vpa.md) feature provided by Razorpay to provide a better customer experience and avoid payment failures. diff --git a/llm-content/payments/third-party-validation/qr-code.md b/llm-content/payments/third-party-validation/qr-code.md new file mode 100644 index 00000000..2f00547f --- /dev/null +++ b/llm-content/payments/third-party-validation/qr-code.md @@ -0,0 +1,235 @@ +--- +title: Generate TPV QR Codes Using UPI Intent Deep Links +description: Create TPV-enabled QR codes for securities businesses using UPI intent deep links and Third-Party QR code generation libraries. +--- + +# Generate TPV QR Codes Using UPI Intent Deep Links + +Generate TPV QR codes for your securities business using UPI intent deep links. Since TPV-enabled QR codes are not available as a direct product feature, create a deep link via S2S APIs and convert it to a QR code using third-party libraries. + +## Prerequisites + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Generate the [API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) from the Dashboard. To go live with the integration and start accepting real payments, generate Live Mode API Keys and replace them in the integration. +- Ensure the [Third-Party Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation.md) feature is activated on your account. + +## Sample Code + +After creating an order using the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md), use the following API call to generate a UPI intent deep link and convert the returned link into a QR code: + +```curl: Request +curl -X POST https://api.razorpay.com/v1/payments/create/upi \ +-U [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H 'content-type:application/json' \ +-d '{ + "amount": 200, + "currency": "INR", + "order_id": "order_OJsi0LlycSkGhn", + "email": "gaurav.kumar@example.com", + "contact": "9090909090", + "method": "upi", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "purpose": "UPI test payment" + }, + "upi": { + "flow": "intent" + } +}' +```json: Response +{ + "razorpay_payment_id": "pay_OJsij8Hf9lkUMD", + "link": "upi://pay?mc=5817&pa=merchant@axisbank&pn=MerchantName&tr=OJsij8Hf9lkUMD&tn=Testflow&am=2.00&cu=INR" +} +``` + + +### Request Parameters + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is ₹2.00, enter `200` in this field. + +`currency` _mandatory_ +: `string` The currency in which the payment should be made by the customer. For TPV QR codes, this should be `INR`. + +`order_id` _mandatory_ +: `string` Order ID generated via [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). + +`email` _mandatory_ +: `string` Email address of the customer. + +`contact` _mandatory_ +: `string` Phone number of the customer. The expected format is without country code for Indian numbers. Example: `9090909090`. + +`method` _mandatory_ +: `string` Payment method. For this integration, set this to `upi`. + +`ip` _optional_ +: `string` IP address of the customer. + +`referer` _optional_ +: `string` Referer header value. + +`user_agent` _optional_ +: `string` User agent of the customer's browser. + +`description` _optional_ +: `string` Description of the payment. + +`notes` _optional_ +: `object` Set of key-value pairs that can be used to store additional information about the payment. It can hold a maximum of 15 key-value pairs, each 256 characters long (maximum). + +`upi` _mandatory_ +: `object` UPI specific parameters. + + `flow` _mandatory_ + : `string` UPI flow type. Set this to `intent` to generate a deep link for QR code creation. + + + +### Response Parameters + +`razorpay_payment_id` +: `string` Unique identifier for the payment. + +`link` +: `string` UPI intent deep link that can be converted to a QR code using third-party libraries. + + +## Implementation Steps + +Follow these steps to implement TPV QR code payments: + +1. Call the UPI payment creation API with `"flow": "intent"`. +2. Extract the `link` from the response. +3. Use any QR code generation library to [convert this link into a QR code](#convert-upi-intent-deep-link-to-qr-code). +4. Display the QR code to your customers. +5. [Poll Payment APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md) to check the payment status. + +> **WARN** +> +> +> **Watch Out!** +> +> - **Expiry Management**: QR codes generated through this method require expiry handling on your application side. +> - **Payment Monitoring**: Continue monitoring payment status even after your intended QR expiry time, as users may complete payments later. +> - **Reconciliation**: Implement appropriate reconciliation processes to handle payments completed after your QR display period +> + +### Convert UPI Intent/Deep Link to QR Code + +Use widely available open-source libraries across all major programming languages to generate QR codes from any UPI Intent URL or Deep Link. + + +### Node.js + + Use the [qrcode library](https://github.com/soldair/node-qrcode): + + ```json: + npm install qrcode + ``` + + Given below is a sample code to generate QR code: + + ```javascript: Node.js + const QRCode = require("qrcode"); + + QRCode.toFile("upi_qr.png", "upi://pay?pa=merchant@upi&am=100"); + ``` + + **Supports:** PNG, SVG, Terminal output. + + + +### Python + + Use the [qrcode library](https://github.com/lincolnloop/python-qrcode): + + ```json: + pip install qrcode[pil] + ``` + + Given below is a sample code to generate QR code: + + ```python: Python + import qrcode + + img = qrcode.make("upi://pay?pa=merchant@upi&am=100") + img.save("upi_qr.png") + ``` + + + +### Java + + Use the [ZXing (Zebra Crossing) library](https://github.com/zxing/zxing), the most widely used QR generator in Java-based applications. Given below is a sample code to generate QR code: + + ```java: Java + QRCodeWriter writer = new QRCodeWriter(); + BitMatrix matrix = writer.encode(intentUrl, BarcodeFormat.QR_CODE, 300, 300); + ``` + + + +### Go + + Use the [skip2/go-qrcode library](https://github.com/skip2/go-qrcode): + + ```json: + go get github.com/skip2/go-qrcode + ``` + + Given below is a sample code to generate QR code: + + ```go: Go + qrcode.WriteFile(intentUrl, qrcode.Medium, 256, "upi_qr.png") + ``` + + + +### PHP + + Use the [endroid/qr-code library](https://github.com/endroid/qr-code): + + ```json: + composer require endroid/qr-code + ``` + + Given below is a sample code to generate QR code: + + ```php: PHP + use Endroid\QrCode\QrCode; + + $qr = QrCode::create($intentUrl)->writeFile('upi_qr.png'); + ``` + + + +### Android/iOS + + + + Use the [ZXing Android embedded](https://github.com/journeyapps/zxing-android-embedded) library. + + + Use Native CoreImage (no external dependency required). Given below is a sample code to generate QR code: + + ```swift: iOS Swift + let data = intentUrl.data(using: .ascii) + let filter = CIFilter.qrCodeGenerator() + filter.setValue(data, forKey: "inputMessage") + ``` + + + + +> **INFO** +> +> +> **Handy Tips** +> +> Any UPI Intent URL (for example, `upi://pay?...`) can be passed as a string to any of the above libraries to generate a QR code. These are public, open-source, stable and suitable for your integrations across web, backend and mobile applications. +> diff --git a/llm-content/payments/third-party-validation/s2s-integration.md b/llm-content/payments/third-party-validation/s2s-integration.md new file mode 100644 index 00000000..30623706 --- /dev/null +++ b/llm-content/payments/third-party-validation/s2s-integration.md @@ -0,0 +1,38 @@ +--- +title: Third-Party Validation (TPV) - S2S Integration +description: Know how Razorpay performs third-party validation (TPV) of your customers' bank accounts in real-time using Razorpay S2S Integration. +--- + +# Third-Party Validation (TPV) - S2S Integration + +Third-Party Validation (TPV) of bank accounts is a mandatory requirement for merchants in the BFSI (Banking, Financial Services and Insurance) sector dealing with Securities, Broking and Mutual Funds. As per Securities and Exchange Board of India (SEBI) guidelines, transactions must be made by the customers **only** from those bank accounts provided when they registered with your business. + +With Razorpay, you can comply with the SEBI guidelines for online payment collections by offering TPV integrations with [ major banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/s2s-integration/bank-list.md) at Checkout. Customers can make payments using netbanking, debit card or UPI. UPI supports both [Collect](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/s2s-integration/upi/collect.md) and [Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/s2s-integration/upi/intent.md) flows. + +> **SUCCESS** +> +> +> **What's New** +> +> Customers can now select card as the payment method and make payments only through their debit cards. Know more about [Debit Card TPV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/s2s-integration/debit-card.md) +> + + to get this feature activated on your Razorpay account. + +## Supported Payment Methods + +- [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/s2s-integration/netbanking.md) + +Customers select netbanking as the payment method and make payments only through their registered bank accounts. +- [Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/s2s-integration/debit-card.md) +Customers select card as the payment method and make payments only through their debit cards. + - **Guest Checkout**: Customers can add a new debit card for their purchase in this flow. They are given the option to save the card for future use or proceed with the purchase without saving the card details. + + - **[Coming Soon] Tokenized or Saved Card**: Soon, we'll introduce a streamlined checkout experience where customers can select a saved debit card for their purchase, eliminating the need to re-enter the card information. +- UPI + - [Collect Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/s2s-integration/upi/collect.md) + +Customers select UPI as the payment method and enter their registered UPI ID. They manually open their UPI PSP app and complete the payment. + - [Intent Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/s2s-integration/upi/intent.md) + +Customers select the UPI PSP app on your app. The UPI PSP app is launched automatically on their mobile devices, where they complete the payment. diff --git a/llm-content/payments/third-party-validation/s2s-integration/bank-list.md b/llm-content/payments/third-party-validation/s2s-integration/bank-list.md new file mode 100644 index 00000000..e6896ed5 --- /dev/null +++ b/llm-content/payments/third-party-validation/s2s-integration/bank-list.md @@ -0,0 +1,1014 @@ +--- +title: Supported Banks +description: List of banks that Razorpay has partnered with for Third-Party Validation (TPV). +--- + +# Supported Banks + +Third-Party Validation (TPV) is an essential step in the Banking, Financial Services and Insurance sector. As per the SEBI guidelines, businesses operating in these sectors must ensure that the payments are accepted from the customers' registered, KYC-approved bank accounts only. + +Using the Razorpay Smart Collect API, you can comply with the regulatory guidelines to ensure that customers make payments only from their registered bank accounts (TPV). Any payment made from an unregistered account (non-TPV) is automatically refunded to the customer. + +Following is the list of banks that Razorpay has partnered with for third-party validation (TPV) of your customers' accounts. You can validate the customers' accounts using the payment methods supported by the banks. + +## List of Banks Supporting TPV for Netbanking + +Given below is the list of banks supporting TPV for netbanking. + +Bank Name | Bank Code +--- +Allahabad Bank | ALLA +--- +AU Small Finance Bank | AUBL +--- +Bank of Baroda (Retail) | BARB_R +--- +Bandhan Bank Limited (except Mutual Fund and Insurance) | BDBL +--- +Bank of India | BKID +--- +Bank of India (Corporate) | BKID_C +--- +Central Bank of India | CBIN +--- +City Union Bank | CIUB +--- +Canara Bank | CNRB +--- +Corporation Bank | CORP +--- +Catholic Syrian Bank | CSBK +--- +Development Bank of Singapore | DBSS +--- +DCB Bank | DCBL +--- +Deutsche Bank | DEUT +--- +Dhanlaxmi Bank | DLXB +--- +Equitas Small Finance Bank | ESFB +--- +Federal Bank | FDRL +--- +HDFC Bank | HDFC +--- +IDBI Bank | IBKL +--- +ICICI Bank | ICIC +--- +IDFC FIRST BANK | IDFB +--- +Indian Bank | IDIB +--- +Indusind Bank | INDB +--- +Indian Overseas Bank | IOBA +--- +Jammu and Kashmir Bank | JAKA +--- +Jana Small Finance Bank | JSFB +--- +Karnataka Bank | KARB +--- +Kotak Bank | KKBK +--- +Karur Vysya Bank | KVBL +--- +Lakshmi Vilas Bank (Retail) | LAVB_R +--- +Bank Of Maharashtra | MAHB +--- +Punjab National Bank (Retail) | PUNB_R +--- +RBL Bank | RATN +--- +State Bank of India | SBIN +--- +Standard Chartered | SCBL +--- +South Indian Bank | SIBL +--- +Saraswat Co-operative Bank | SRCB +--- +Shamrao Vithal Co.Operative Bank | SVCB +--- +Tamilnadu Mercantile Bank | TMBL +--- +Union Bank of India | UBIN +--- +UCO Bank | UCBA +--- +Ujjivan Bank | UJVN +--- +Axis Bank | UTIB +--- +Yes Bank | YESB +--- + +## List of Banks Supporting TPV for UPI + +Given below is the list of banks supporting TPV for UPI. + +Bank Name | Bank Code +--- +A.P. Mahesh Co-operative Urban Bank | APMC +--- +Abhyudaya Co-operative Bank | ABHY +--- +Adarsh Co-operative Bank | ACBX +--- +Adarsh Co-operative Urban Bank | ACUX +--- +Aditya Birla Idea Payments Bank | ABPB +--- +Ahmedabad District Co-operative Bank | ADBX +--- +Ahmedabad Mercantile Co-operative Bank | AMCB +--- +Ahmednagar Merchants Co-operative Bank | AMDN +--- +Airtel Payments Bank | AIRP +--- +Akola District Central Co-operative Bank | ADCC +--- +Allahabad Bank | ALLA +--- +Allahabad Up Gramin Bank | AUGX +--- +Anand Mercantile Co-operative Bank | TAMX +--- +Andhra Bank | ANDB +--- +Andhra Pradesh Grameena Vikas Bank | APGV +--- +Andhra Pradesh State Co-operative Bank | APBL +--- +Andhra Pragathi Grameena Bank | APGB +--- +Apna Sahakari Bank | ASBL +--- +Assam Gramin Vikash Bank | AGVX +--- +Associate Co-operative Bank | ASOX +--- +AU Small Finance Bank | AUBL +--- +Axis Bank | AXIS +--- +Axis Bank | UTIB +--- +Banaskantha District Central Co-operative Bank | BKDX +--- +Banaskantha Mercantile Co-operative Bank | BMPX +--- +Bandhan Bank | BDBL +--- +Bank of America | BOFA +--- +Bank of Baroda (Retail) | BARB_R +--- +Bank of India | BKID +--- +Bank of Maharashtra | MAHB +--- +Baramati Sahakari Bank | BARA +--- +Baroda Central Co-operative Bank | BRDX +--- +Baroda Gujarat Gramin Bank | BGGX +--- +Baroda Rajasthan Kshetriya Gramin Bank | BRGX +--- +Baroda Uttar Pradesh Gramin Bank | BUGX +--- +Bassein Catholic Co-operative Bank | BACB +--- +Bhagini Nivedita Sahakari Bank Pune | BNSB +--- +Bharat Co-operative Bank | BCBM +--- +Bhilwara Urban Co-operative Bank | BHUX +--- +Canara Bank | CNRB +--- +Capital Small Finance Bank | CLBL +--- +Catholic Syrian Bank | CSBK +--- +Central Bank of India | CBIN +--- +Chaitanya Godavari Grameena Bank | CGGX +--- +Chartered Sahakari Bank Niyamitha | CSBX +--- +Chhattisgarh Rajya Gramin Bank | CGBX +--- +Chhattisgarh Rajya Gramin Bank | CRGB +--- +CITI Bank | CITI +--- +Citizen Co-operative Bank | CCBX +--- +Citizen Credit Co-operative Bank | CCBL +--- +Citizens Co-operative Bank | CTBX +--- +City Union Bank | CIUB +--- +Coastal Local Area Bank | COAS +--- +Coastal Local Area Bank | COLX +--- +Corporation Bank | CORP +--- +Cosmos Co-operative Bank | COSB +--- +Dakshin Bihar Gramin Bank | BGBX +--- +Dakshin Bihar Gramin Bank | MBGX +--- +Darussalam Co-operative Urban Bank | DCUX +--- +DCB Bank | DCBL +--- +Dena Bank | BKDN +--- +Dena Gujarat Gramin Bank | DEGX +--- +Deutsche Bank | DEUT +--- +Development Bank of Singapore | DBSS +--- +Dhanlaxmi Bank | DLXB +--- +Dombivli Nagari Sahakari Bank | DNSB +--- +Equitas Small Finance Bank | ESFB +--- +Esaf Small Finance Bank | ESMF +--- +Federal Bank | FDRL +--- +Fincare Small Finance Bank | FSFB +--- +Fingrowth Co-operative Bank | FGCB +--- +Fino Payments Bank | FINO +--- +Gadchiroli District Central Co-operative Bank | GDCB +--- +Gayatri Co-operative Urban Bank | GCUX +--- +Gopinath Patil Parsik Janata Sahakari Bank | PJSB +--- +Greater Bombay Co-operative Bank | GBCB +--- +Gujarat State Co-operative Bank | GSCB +--- +HASTI Co-operative Bank | HCBL +--- +HDFC Bank | HDFC +--- +Himachal Pradesh Gramin Bank | HMBX +--- +Himachal Pradesh State Co-operative Bank | HPSC +--- +Hongkong & Shanghai Banking Corporation | HSBC +--- +Hutatma Sahakari Bank | HUTX +--- +ICICI Bank | ICIC +--- +IDBI Bank | IBKL +--- +IDFC FIRST Bank | IDFB +--- +India Post Payments Bank | IPOS +--- +Indian Bank | IDIB +--- +Indian Overseas Bank | IOBA +--- +Indore Paraspar Sahakari Bank | IPSX +--- +Indusind Bank | INDB +--- +J&K Grameen Bank | XJKG +--- +Jalgaon Janata Bank | JJSB +--- +Jalna Merchants Co-operative Bank | JMCX +--- +Jammu and Kashmir Bank | JAKA +--- +Jana Small Finance Bank | JSFB +--- +Janakalyan Sahakari Bank | JSBL +--- +Janaseva Sahakari Bank, Pune | JANA +--- +Janata Sahakari Bank (Pune) | JSBP +--- +Jharkhand Rajya Gramin Bank | VGBX +--- +Jio Payments Bank | JIOP +--- +Jivan Commercial Co-operative Bank | JVCX +--- +Kaira District Central Co-operative Bank | KARX +--- +Kallappanna Awade Ichalkaranji Janata Sahakari Bank | KAIJ +--- +Kalupur Commercial Co-operative Bank | KCCB +--- +Kalyan Janata Sahakari Bank | KJSB +--- +Karnataka Bank | KARB +--- +Karnataka Gramin Bank | PKGB +--- +Karnataka State Co-operative Apex Bank | KSCB +--- +Karnataka Vikas Grameena Bank | KVGB +--- +Karur Vysya Bank | KVBL +--- +Kashi Gomti Samyut Gramin Bank | KGSX +--- +Kaveri Grameena Bank | KGRB +--- +Kerala Gramin Bank | KLGB +--- +Kokan Mercantile Co-operative Bank | KMCB +--- +Kolhapur District Central Co-operative Bank | KPCX +--- +Kotak Mahindra Bank | KKBK +--- +Krishna Bhima Samruddhi Local Area Bank | KBSX +--- +Lakshmi Vilas Bank (Retail) | LAVB_R +--- +Langpi Dehangi Rural Bank | LDRX +--- +Mahanagar Co-operative Bank | MCBL +--- +Maharashtra Gramin Bank | MAHG +--- +Maharashtra State Co-operative Bank | MSCI +--- +Malad Sahakari Ban | MSBL +--- +Malviya Urban Co-operative Bank | MALX +--- +Malwa Gramin Bank | MGRB +--- +Manipur Rural Bank | MRBX +--- +Manvi Pattana Souharda Sahakari Bank Ni | MVIX +--- +Maratha Co-operative Bank | MRTX +--- +Meghalaya Rural Ban | MERX +--- +Mehsana Urban Co-operative Bank | MSNU +--- +Merchants Souharda Sahakara Bank Niyamitha | MSSX +--- +Mizoram Rural Bank | MZRX +--- +Modasa Nagarik Sahakari Bank | TMSX +--- +Model Co-operative Bank | MDBK +--- +Mumbai District Central Co-operative Bank | MDCB +--- +Municipal Co-operative Bank | MUBL +--- +Muslim Co-operative Bank | MSLM +--- +Nagrik Sahakari Bank, Vidisha | NBMX +--- +Nainital Bank | NTBL +--- +NKGSB Co-operative Bank | NKGS +--- +North East Small Finance Bank | NESF +--- +NSDL Payments Bank | NSPB +--- +Nutan Nagarik Sahakari Bank | NNSB +--- +Oriental Bank of Commerce | ORBC +--- +Pali Urban Co-operative Bank | PALX +--- +Paschim Banga Gramin Bank | PASX +--- +Patan Nagarik Sahakari Bank | PTSX +--- +Paytm Payments Bank | PYTM +--- +Pochampally Co-operative Urban Bank | PCUX +--- +Pragathi Krishna Gramin Bank | PGBX +--- +Prathama Bank | PRTH +--- +Prathama UP Gramin Bank | SUBX +--- +Prime Co-operative Bank | PMEC +--- +Priyadarshani Nagari Sahakari Bank Jalna. | PDSX +--- +Pune Cantonment Sahakari Bank | PCTX +--- +Punjab & Maharashtra Co-operative Bank | PMCB +--- +Punjab & Sind Bank | PSIB +--- +Punjab Gramin Bank | PUGX +--- +Punjab National Bank (Retail) | PUNB_R +--- +Purvanchal Gramin Bank | PURX +--- +Rajasthan Marudhara Gramin Bank | MDGX +--- +Rajasthan Marudhara Gramin Bank | RMGB +--- +Rajgurunagar Sahakari Bank | RSBL +--- +Rajkot Nagarik Sahakari Bank | RNSB +--- +Rani Channamma Mahila Sahakari Bank | ZRNB +--- +RBL Bank | RATN +--- +Sabarkantha District Central Co-operative Bank | SADX +--- +Samarth Sahakari Bank | SBLS +--- +Samruddhi Co-operative Bank | SCOB +--- +Sandur Pattana Souharda Sahakari Bank Niyamitha | SPSX +--- +Saraswat Co-operative Bank | SRCB +--- +Sarva Haryana Gramin Bank | HGBX +--- +Sarvodaya Commerical Co-operative Bank | SVCX +--- +Satara District Central Co-operative Bank | SDCE +--- +Saurashtra Gramin Bank | SAGX +--- +Saurashtra Gramin Bank | SGBA +--- +SBM Bank | STCB +--- +Shivalik Small Finance Bank | SMCB +--- +Shree Dharati Co-operative Bank | SRHX +--- +Shree Kadi Nagarik Sahakari Bank | KDIX +--- +Shri Arihant Co-operative Bank | SACB +--- +Shri Basaveshwar Sahakari Bank Nyt.bagalkot | BASX +--- +Shri Chhatrapati Rajashri Shahu Urban Co-operative Bank | CRUB +--- +Shri Mahila Sewa Sahakari Bank | SEWX +--- +Shri Rajkot District Co-operative Bank | RJTX +--- +Shri Veershaiv Co-operative Bank | VCCX +--- +Sindhudurg District Central Co-operative Bank | SIDC +--- +Smriti Nagrik Sahakari Bank | SNSX +--- +South Indian Bank | SIBL +--- +Sri Vasavamba Co-operative Bank | SVAX +--- +Standard Chartered Bank | SCBL +--- +State Bank of India | SBIN +--- +Sterling Urban Co-operative Bank | STRX +--- +Suco Souharda Sahakari Bank | SSDX +--- +Surat District Co-operative Bank | SDCB +--- +Surat National Co-operative Bank | SUNB +--- +Surat People's Co-operative Bank | SPCB +--- +Suryoday Small Finance Bank | SURY +--- +Sutex Co-operative Bank | SUTB +--- +Suvarnayug Sahakari Bank | SUVX +--- +SVC Co-operative Bank | SVCB +--- +Syndicate Bank | SYNB +--- +Tamilnad Mercantile Bank | TMBL +--- +Telangana Grameena Bank | DGBX +--- +Telangana State Co-operative Apex Bank | TSAB +--- +Thane Bharat Sahakari Bank | TBSB +--- +Thane District Central Co-operative Bank | TDCB +--- +The Vijay Co-operative Bank | VCOB +--- +TJSB Sahakari Bank | TJSB +--- +Tripura Gramin Bank | TGBX +--- +UCO Bank | UCBA +--- +Udaipur Mahila Samridhi Urban Co-operative Bank | UMSX +--- +Udaipur Mahila Urban Co-operative Bank | TUMX +--- +Udaipur Urban Co-operative Bank | UUCB +--- +Udaipur Urban Co-operative Bank | UUCX +--- +Ujjivan Small Finance Bank | UJVN +--- +Union Bank of India | UBIN +--- +United Bank of India | UTBI +--- +Unity Small Finance Bank Limited | UNBA +--- +Urban Co-operative Bank Dharangaon | TUDX +--- +Utkarsh Small Finance Bank | UTKS +--- +Uttarakhand Gramin Bank | UTGX +--- +Vallabh Vidyanagar Commercial Bank | VVCX +--- +Varachha Co-operative Bank | VARA +--- +Vasai Vikas Sahakari Bank | VVSB +--- +Vijaya Bank | VIJB +--- +Vikas Souharda Co-operative Bank | VSCX +--- +Visakhapatnam Co-operative Bank | VISX +--- +Vishweshwar Sahakari Bank | VSBL +--- +Yadagiri Lakshmi Narsimha Swamy Co-operative Urban Bank | YLNX +--- +Yes Bank | YESB + +## List of Banks Supporting TPV for Smart Collect + +Given below is the list of banks supporting TPV for Smart Collect. + +Bank Name | Bank Code +--- +A. P Mahesh Bank | APMC +--- +Abhyudaya Co-op Bank | ABHY +--- +Adarsh Cooperative Bank Ltd | ACBX +--- +Ahmedabad Mercanatile Co-op Bank | AMCB +--- +Airtel Payments Bank | AIRP +--- +Allahabad Bank | ALLA +--- +Andhra Bank | ANDB +--- +Andhra Pragathi Grameena Bank | APGB +--- +Andhra Pragathi Grameena Vikas Bank | APGV +--- +Apna Sahakari Bank | ASBL +--- +Assam Gramin Vikash Bank | AGVX +--- +Associate Co-operative Bank Limited,Surat | ASOX +--- +AU Small Finance Bank | AUBL +--- +Axis Bank | UTIB +--- +Banaskantha Mercantile Co-operative Bank Limited | BMPX +--- +Bandhan Bank | BDBL +--- +Bank of America | BOFA +--- +Bank Of Baroda | BARB +--- +Bank Of India | BKID +--- +Bank of Maharashtra | MAHB +--- +Baroda Central Co-operative Bank | BRDX +--- +Baroda Gujarat Gramin Bank | BGGX +--- +Baroda Rajasthan Khetriya Gramin Bank | BRGX +--- +Baroda Uttar Pradesh Gramin Bank | BUGX +--- +Bassein Catholic Coop Bank | BACB +--- +Bhagini Nivedita Sahakari Bank Ltd,Pune | BNSB +--- +Bharat Co-operative Bank | BCBM +--- +Bhilwara Urban Co-operative Bank Ltd | BHUX +--- +Canara Bank | CNRB +--- +Capital Small Finance Bank | CLBL +--- +Catholic Syrian Bank | CSBK +--- +Central Bank of india | CBIN +--- +Chaitanya Godavari Grameena Bank | CGGX +--- +Chartered Sahakari Bank Niyamitha | CSBX +--- +Chhattisgarh Rajya Gramin Bank | CGBX +--- +Citibank Retail | CITI +--- +Citizen Co-operative Bank Ltd - Noida | CCBX +--- +Citizens Co-operative Bank Ltd. | CTBX +--- +City Union Bank | CIUB +--- +Costal Local Area Bank Ltd | COAS +--- +Dakshin Bihar Gramin Bank | MBGX +--- +DBS Digi Bank | DBSS +--- +DCB Bank | DCBL +--- +Dena Bank | BKDN +--- +Dena Gujarat Gramin Bank | DEGX +--- +Deutsche Bank AG | DEUT +--- +Dhanalaxmi bank | DLXB +--- +Dombivli Nagrik Sahakari Bank | DNSB +--- +Equitas Small Finance Bank | ESFB +--- +ESAF Small Finance Bank | ESAF,ESMF +--- +Federal Bank | FDRL +--- +Fincare Small Finance Bank | FSFB +--- +Fingrowth Co-operative Bank Ltd | FGCB +--- +FINO Payments Bank | FINO +--- +G P Parsik Bank | PJSB +--- +HDFC | HDFC +--- +Himachal Pradesh Gramin Bank | HMBX +--- +HSBC | HSBC +--- +Hutatma Sahakari Bank Ltd | HUTX +--- +ICICI Bank | ICIC +--- +IDBI Bank | IBKL +--- +IDFC | IDFB +--- +India Post Payment Bank | IPOS +--- +Indian Bank | IDIB +--- +Indian Overseas Bank | IOBA +--- +Indore Paraspar Sahakari Bank Ltd | IPSX +--- +IndusInd Bank | INDB +--- +J & K Grameen Bank | JAKA +--- +Jalgaona Janata Sahkari Bank | JJSB +--- +Jalna Merchant's Co-operative Bank Ltd. | JMCX +--- +Jammu & Kashmir Bank | JAKA +--- +Jana Small Finance Bank | JSFB +--- +Janakalyan Sahakari Bank | JSBL +--- +Janaseva Sahakari Bank Ltd Pune | JANA,JASB +--- +Janta Sahakari Bank Pune | JSBP +--- +Jio Payments Bank | JIOP +--- +Jivan Commercial co-operative Bank Ltd. | JVCX +--- +Kallappanna Awade Ichalkaranji Janata Sahakari Bank Ltd. | KAIJ +--- +Kalupur Commercial Co-operative Bank | KCCB +--- +Karnataka Bank | KARB +--- +Karnataka vikas Gramin Bank | KVGB +--- +Karur Vysaya Bank | KVBL +--- +Kashi Gomti Samyut Gramin Bank | KGSX +--- +Kerala Gramin Bank | KLGB +--- +Kokan Merchantile Co-Operative Bank Ltd | KMCB +--- +Kolhapur District Central Co-operative Bank Limited | KPCX +--- +Kotak Mahindra Bank | KKBK +--- +Krishna Bhima Samruddhi Local Area Bank | KBSX +--- +Maharashtra Grameen Bank | MAHG +--- +Maharashtra state co opp Bank | MSCI +--- +Malad Sahakari Bank | MSBL +--- +Malviya Urban Co-operative Bank Limited | MALX +--- +Manipur Rural Bank | MRBX +--- +Manvi Pattana Souharda Sahakari Bank | MVIX +--- +Maratha Cooprative Bank Ltd | MRTX +--- +Meghalaya Rural Bank | MERX +--- +Mizoram Rural Bank | MZRX +--- +Model Co-operative Bank Limited | MDBK +--- +Nagarik Sahakari Bank Maryadit, Vidisha | NBMX +--- +Nanital Bank Ltd | NTBL +--- +NKGSB | NKGS +--- +NSDL Payments Bank | NSPB +--- +Nutan Nagrik Sahakari Bank | NNSB +--- +Pali Urban Co-operative Bank Ltd. | PALX +--- +Paschim Banga Gramin Bank | PASX +--- +Patan Nagrik Sahakari Bank Ltd | PTSX +--- +Paytm Payments Bank | PYTM +--- +Pragathi Krishna Gramin Bank | PGBX +--- +Prathama Bank | PRTH +--- +Prime Co-operative Bank Ltd. | PMEC +--- +Priyadarshini Nagari Sahakari Bank Ltd. | PDSX +--- +Pune Cantonment Sahakari Bank Ltd | PCTX +--- +Punjab and Maharastra Co. bank | PMCB +--- +Punjab and Sind Bank | PSIB +--- +Punjab Gramin Bank | PUGX +--- +Punjab National Bank | PUNB +--- +Purvanchal Bank | NA +--- +Rajasthan Marudhara Gramin Bank | RMGB +--- +Rajkot Nagari Sahakari Bank Ltd | RNSB +--- +Rani Channamma Mahila Sahakari Bank Belagavi | ZRNB +--- +Samarth Sahakari Bank Limited | SBLS +--- +Samruddhi Co-op bank ltd | SCOB +--- +Sandue Pattana Souharda Sahakari Bank | SPSX +--- +Sarva Haryana Gramin Bank | HGBX +--- +Sarva UP Gramin Bank | SUBX +--- +Sarvodaya Commercial Co-operative Bank | SVCX +--- +Saurashtra Gramin Bank | SAGX +--- +SBM BANK (INDIA) LIMITED | STCB +--- +Shree Dharati Co-operative Bank Ltd. | SRHX +--- +Shree Kadi Nagarik Sahakari Bank Ltd | KDIX +--- +Shri Arihant Co-operative Bank Ltd. | SACB +--- +Shri Basaveshwar Sahakari Bank Niyamit, Bagalkot | BASX +--- +Shri Chhatrapathi Rajarsshi Shahu Bank | CRUB +--- +Shri Mahila Sewa Sahakari Bank Limited | SEWX +--- +Shri Rajkot District Co-operative Bank Ltd | RJTX +--- +Shri Veershaiv Co-op Bank Ltd. | VCCX +--- +Sindhudurg Co-operative Bank | SIDC +--- +Smriti Nagrik Sahakari Bank Maryadit, Mandsaur | SNSX +--- +South Indian Bank | SIBL +--- +Sri Rama Co-operative Bank Ltd | NA +--- +Sri Vasavamba Cooperative Bank Ltd | SVAX +--- +Standard Chartered | SCBL +--- +State Bank Of India | SBIN +--- +Sterling Urban Co-operative Bank Ltd | STRX +--- +Suco Souharda Sahakari bank | SSDX +--- +Surat People Cooperative Bank | SPCB +--- +Suryoday Small Finance Bank Ltd | SURY +--- +Sutex Co operative Bank | SUTB +--- +Suvarnayug Sahakari Bank Ltd | SUVX +--- +SVC Co-operative Bank | SVCB +--- +Syndicate Bank | SYNB +--- +Tamilnad Mercantile Bank | TMBL +--- +Telangana Gramin Bank | DGBX +--- +Telangana State Co Operative Apex Bank | TSAB +--- +Thane Bharat Sahakari Bank | TBSB +--- +The Adarsh Urban Co-op. Bank Ltd., Hyderabad | ACUX +--- +The Ahmedabad District Coop bank | ADBX +--- +The Ahmednagar Merchants Co-operative Bank | AMDN +--- +The Anand Mercantile Co-Op. Bank Ltd. | TAMX +--- +The Andhra Pradesh state cooperative | APBL +--- +The Banaskantha District Central Co-Op. Bank Ltd. | BKDX +--- +The Baramati Sahakari Bank Ltd. | BARA +--- +The Cosmos Co-Operative Bank LTD | COSB +--- +The Darussalam Co-operative Urban Bank Ltd. | DCUX +--- +The Gadchiroli District Central Co-operative Bank | GDCB +--- +The Gayatri Co-operative Urban Bank Ltd. | GCUX +--- +The Gujarat State Co-operative Bank Limited | GSCB +--- +The Hasti Co-operative Bank Ltd | HCBL +--- +The Himachal Pradesh State Co-operative Bank Ltd | HPSC,HPSC +--- +The Kaira District Central Co-Op. Bank Ltd. | KARX +--- +The Kalyan Janta Sahkari Bank | KJSB +--- +The Kanakmahalakshmi Co-operative Bank Ltd | IBKL +--- +The Lakshmi Vilas Bank Limited | LAVB_R +--- +The Mahanagar Co-Op. Bank Ltd | MCBL +--- +The Mehsana Urban Co-Operative Bank | MSNU +--- +The Merchants Souharda Sahakari Bank Ltd | MSSX +--- +The Modasa Nagarik Sahakari Bank Limited | TMSX +--- +The Municipal Co-op Bank | MUBL +--- +The Muslim Co-operative Bank Ltd. | MSLM +--- +The Pochampally Co-operative Urban bank Ltd | PCUX +--- +The Ratnakar Bank Limited | RATN +--- +The Sabarkantha district Central Coop Bank Ltd | SADX +--- +The Saraswat Co-Operative Bank | SRCB +--- +The Satara Distric Central Co-operative Bank Ltd. | SDCE +--- +The SSK Co-operative Bank | NA +--- +The Surat District Co-op Bank Ltd. | SDCB +--- +The Thane Janta Sahakari Bank Ltd(TJSB) | TJSB +--- +The Udaipur Mahila Samridhi Urban Co-operative Bank Ltd. | UMSX +--- +The Udaipur Mahila Urban Co-op Bank Ltd | TUMX +--- +The Udaipur Urban Co-operative Bank ltd. | UUCX,UUCB +--- +The Urban Cooperative Bank Ltd Dharangaon | TUDX +--- +The Vallabh Vidyanagar Commercial Co-operative Bank Ltd | VVCX +--- +The Varachha Co-op Bank Ltd. | VARA +--- +The Vijay Co-operative Bank Ltd, Ahmedabad | VCOB +--- +The Visakhapatnam Co-operative Bank Ltd. | VISX +--- +The Vishweshwar Sahakari Bank Ltd | VSBL +--- +Tripura Gramin Bank | TGBX +--- +UCO Bank | UCBA +--- +Ujjivan Small Finance Bank Limited (Web Collect) | UJVN +--- +Union Bank of India | UBIN +--- +Uttarakhand Gramin Bank | UTGX +--- +Vananchal Gramin Bank | VGBX +--- +Vasai Vikas Co-op Bank Ltd | VVSB +--- +Vijaya Bank | VIJB +--- +Vikas Souharda Co-operative Bank Ltd. | VSCX +--- +Yadagiri Lakshmi Narasimha Swamy Co-Op Urban Bank Ltd | YLNX +--- +Yes Bank | YESB + +## List of Banks Supporting TPV for Debit Card + +Banks | Supported +--- +ICICI | ✓ +--- +Federal | ✓ +--- +Kotak | Coming Soon +--- +Axis | Coming Soon +--- +IDFC | Coming Soon +--- +YES | Coming Soon +--- diff --git a/llm-content/payments/third-party-validation/s2s-integration/best-practices.md b/llm-content/payments/third-party-validation/s2s-integration/best-practices.md new file mode 100644 index 00000000..a0db4d9f --- /dev/null +++ b/llm-content/payments/third-party-validation/s2s-integration/best-practices.md @@ -0,0 +1,16 @@ +--- +title: Razorpay S2S Integration - Best Practices +description: Follow these Best practices while doing TPV integration. +--- + +# Razorpay S2S Integration - Best Practices + +S2S integration is an API-based white label integration provided by Razorpay wherein you can capture payment details on your page and pass on the same to Razorpay via a backend API call. + +Given below are some of the best practices to be followed for a smoother integration and payment experience: + +1. We recommended using [S2S JSON API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/json/v2.md) for S2S integration. +2. For redirect flow, you must open the HTML provided as part of the API response, as is from the customer's browser. +3. You should pass the actual `user_agent`, `customer IP` and `referrer` to avoid any failures due to risk. +4. You should integrate [webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) to get a callback via a server to server call. +5. Integrate the [Payments Rainy Day kit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/rainy-day.md) to tackle payment exceptions such as late authorized payments, payment downtimes and errors. diff --git a/llm-content/payments/third-party-validation/s2s-integration/debit-card.md b/llm-content/payments/third-party-validation/s2s-integration/debit-card.md new file mode 100644 index 00000000..91d19cdf --- /dev/null +++ b/llm-content/payments/third-party-validation/s2s-integration/debit-card.md @@ -0,0 +1,744 @@ +--- +title: TPV S2S Integration - Debit Card +description: Understand Third-Party Validation (TPV) support on S2S Integration with the debit card payment method by Razorpay. +--- + +# TPV S2S Integration - Debit Card + +Investors can pay with a debit card and input the necessary card details (card number, CVV, expiry information). When a debit card payment request is made, the system checks to confirm that the bank account associated with the debit card matches the registered bank account details. If this verification is successful, the customer is prompted to enter a one-time password (OTP) from the card to complete the payment. + +### Checkout Flow + +- **Guest Checkout**: Investors can add a new debit card for their purchase in this flow. They are given the option to save the card for future use or proceed with the purchase without saving the card details. + +- **[Coming Soon] Tokenized or Saved Card**: We will introduce a streamlined checkout experience where customers can select a saved debit card for their purchase, eliminating the need to re-enter the card information. + +> **INFO** +> +> +> **Handy Tips** +> +> - You must have a PCI compliance certificate to enable this feature on your account. For more details, refer to the [PCI Compliance](https://www.pcisecuritystandards.org/) website. +> - To begin accepting Debit Card payment requests, make sure to prominently display **Debit Cards** as a payment option in your user interface (UI). +> + +## Prerequisites + +- Contact our [Support Team](https://razorpay.com/support/#raise-a-request) to get this feature enabled for your account. +- Keep the API key (combination of `Key_Id` and `Key_Secret`) handy for integration. +- [Generate API Keys from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) if you have not done already. +- Configure the [payment capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) on the Dashboard. + +## Integration + +Given below are the steps: +1. [Collect Investor Bank Account Details](#step-1-collect-investor-bank-account-details) +2. [Create an Order](#step-2-create-an-order) +3. [Create a Payment](#step-3-create-a-payment) +4. [Store Fields in Your Server](#step-4-store-fields-in-your-server) +5. [Verify the Signature](#step-5-verify-the-signature) + +### Step 1: Collect Investor Bank Account details + +Collect the investor's bank details or UPI ID at the time of investor registration. + +### Step 2: Create an Order + +If the user is choosing debit cards on your UI, pass the method as `card`. + +/orders + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "method": "card", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 100); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "BILL13375649"); + orderRequest.put("method", "card"); + + JSONObject bank_account = new JSONObject(); + bank_account.put("account_number", "765432123456789"); + bank_account.put("name", "Gaurav Kumar"); + bank_account.put("ifsc, "HDFC0000053"); + orderRequest.put("bank_account", bank_account); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ +{ + "amount": 100, + "method": "card", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'receipt' => 'BILL13375649', 'method' => 'card', 'currency' => 'INR', 'bank_account'=> array('account_number'=> '765432123456789','name'=> 'Gaurav Kumar','ifsc'=>'HDFC0000053'))); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("method", "card"); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("account_number","765432123456789"); +bankAccount.Add("name","Gaurav Kumar"); +bankAccount.Add("ifsc","HDFC0000053"); +orderRequest.Add("bank_account", bankAccount); + +Order order = client.Order.Create(orderRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "method": "card", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +} + +Razorpay::Order.create(para_attr) + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 100, + "method": "card", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 100, + "method": "card", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": map[string]interface{}{ + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053", + }, +} + +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_GAWN9beXgaqRyO", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044247 +} +``` + +If the user selects the payment method within the Razorpay UI, there is no need to include the `method` field. Below is a sample code for reference. + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",100); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment":False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 100, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 +} +``` + +#### Request Parameters + +Create a request payload using the following attributes: + +`amount` _mandatory_ +: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, the value of this field should be `100`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. You can create orders in **INR** only. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`method` _mandatory_ +: `string` The payment method used to make the payment. If this parameter is not passed, investors will be able to make payments using both netbanking and UPI payment methods. Possible values: + - `netbanking`: Investors can make payments only using netbanking. + - `card`: Investors can make payments using debit card. + - `upi`: Investors can make payments only using UPI. + +`bank_account` _mandatory_ +: `object` Details of the bank account that the investor has provided at the time of registration. + + `account_number` _mandatory_ + : `string` The bank account number from which the investor should make the payment. For example, `765432123456789` Payments will not be processed for an incorrect account number. + + `name` _mandatory_ + : `string` The name linked to the bank account. For example, `Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` The bank IFSC. For example, `HDFC0000053`. + +### Step 3: Create a Payment + +/payments/create/json + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ + -d '{ + "amount": "100", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_GAWN9beXgaqRyO", + "method": "card", + "card":{ + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": "11", + "expiry_year": "30", + "cvv": "100" + }, +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount",100); +paymentRequest.put("currency","INR"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("contact", "9000090000"); +paymentRequest.put("order_id", "order_JZluwjknyWdhnU"); +paymentRequest.put("method", "card"); +JSONObject card = new JSONObject(); +card.put("number","4854980604708430"); +card.put("cvv","123"); +card.put("expiry_month","12"); +card.put("expiry_year","30"); +card.put("name","Gaurav Kumar"); +paymentRequest.put("card",card); + +Payment payment = instance.payments.createJsonPayment(paymentRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createPaymentJson({ + "amount": 100, + "currency": "INR", + "order_id": "order_EAkbvXiCJlwhHR", + "email": "gaurav.kumar@example.com", + "contact": 9000090000, + "method": "card", + "card":{ + "number": 4386289407660153, + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + } +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson(array('amount' => 100,'currency' => 'INR','email' => 'gaurav.kumar@example.com','contact' => '9000090000','order_id' => 'order_I6LVPRQ6upW3uh','method' => 'card','card' => array('number' => '4854980604708430','cvv' => '123','expiry_month' => '12','expiry_year' => '30','name' => 'Gaurav Kumar'))); + +```csharp: .NET +RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount", 100); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9000090000"); +paymentRequest.Add("order_id", "order_MScdJxfAb4NFbD"); +paymentRequest.Add("method", "card"); +Dictionary card = new Dictionary(); +card.Add("number", "4854980604708430"); +card.Add("cvv", "123"); +card.Add("expiry_month", "12"); +card.Add("expiry_year", "30"); +card.Add("name", "Gaurav Kumar"); +paymentRequest.Add("card", card); + +Payment payment = client.Payment.CreateJsonPayment(paymentRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "order_id": "order_EAkbvXiCJlwhHR", + "email": "gaurav.kumar@example.com", + "contact": 9000090000, + "method": "card", + "card":{ + "number": 4386289407660153, + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + } +} + +Razorpay::Payment.create_json_payment(para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createPaymentJson({ + "amount": 100, + "currency": "INR", + "order_id": "order_EAkbvXiCJlwhHR", + "email": "gaurav.kumar@example.com", + "contact": 9000090000, + "method": "card", + "card":{ + "number": 4386289407660153, + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100 + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr := map[string]interface{}{ + "amount": 100, + "currency": "INR", + "order_id": "order_EAkbvXiCJlwhHR", + "email": "gaurav.kumar@example.com", + "contact": 9000090000, + "method": "card", + "card": map[string]interface{}{ + "number": "4386289407660153", + "name": "Gaurav", + "expiry_month": 11, + "expiry_year": 30, + "cvv": 100, + }, +} +body, err := client.Payment.CreatePaymentJson(para_attr, nil) + +```json: Response +{ + "razorpay_payment_id": "pay_GAWOYqPlvrtPSi", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/pay_GAWOYqPlvrtPSi/authorize" + } + ] +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, this field's value should be `100`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. You can create Orders in **INR** only. + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the previous step. + +`method` _mandatory_ +: `string` The payment method used to make the payment. Possible value: `card` + +`card` _mandatory_ +: `object`` Details associated with the card. + + `number` + : `string` Unformatted card number. + + `name` + : `string` Name of the cardholder. + + `expiry_month` + : `string` Expiry month for the card in MM format. + + `expiry_year` + : `string` Expiry year for the card in YY format. + + `cvv` + `string` CVV printed on the back of the card. + +`email` _mandatory_ +: `string` The customer's email address. + +`contact` _mandatory_ +: `string` The customer's phone number. + +#### Response Parameters + +If the payment request is valid, the response contains the following fields: + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. Possible values: + - `redirect` - Use this URL to redirect the customer to the bank page. + - `poll` - A payment request notification is sent to the customer's UPI PSP app. + + `url` + : `string` URL to be used for the action indicated. + +### Step 4: Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +### Step 5: Verify the Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +### Payment Capture Settings + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +### Related Information + +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) (Recommended) +- [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) (Recommended) +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md) +- [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md) +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) diff --git a/llm-content/payments/third-party-validation/s2s-integration/methods-api.md b/llm-content/payments/third-party-validation/s2s-integration/methods-api.md new file mode 100644 index 00000000..1ed808b4 --- /dev/null +++ b/llm-content/payments/third-party-validation/s2s-integration/methods-api.md @@ -0,0 +1,376 @@ +--- +title: Methods API +description: Fetch the payment methods configured for your account using Razorpay APIs. +--- + +# Methods API + +You can configure payment methods of your choice for collecting payments from your customers. + +## Fetch Payment Methods + +To fetch a list of payment methods enabled for your account, send the following request: + +/methods + +```curl: Curl +curl -u \ +-X GET https://api.razorpay.com/v1/methods \ + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]"); + +Methods response = instance.payments.get("methods", null); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID")) + +client.payment.fetchPaymentMethods() + +```php: PHP +$api = new Api($key_id); + +$api->payment->fetchPaymentMethods(); + +```csharp: .NET +RazorpayClient client = new RazorpayClient(your_key_id); + +Method methods = client.Method.Fetch(); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID') + +Razorpay::PaymentMethods.all() + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID' }) + +instance.payments.fetchPaymentMethods(); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID") + +body, err := client.Payment.FetchMethods(nil, nil) + +```json: Response +{ + "entity": "methods", + "card": true, + "debit_card": true, + "credit_card": true, + "prepaid_card": true, + "card_networks": { + "AMEX": 0, + "DICL": 1, + "MC": 1, + "MAES": 1, + "VISA": 1, + "JCB": 1, + "RUPAY": 1, + "BAJAJ": 0 + }, + "card_subtype": { + "consumer": 1, + "business": 0 + }, + "amex": false, + "netbanking": { + "AUBL": "AU Small Finance Bank", + "ABPB": "Aditya Birla Idea Payments Bank", + "AIRP": "Airtel Payments Bank", + "ALLA": "Allahabad Bank", + "ANDB": "Andhra Bank", + "ANDB_C": "Andhra Bank - Corporate Banking", + "UTIB": "Axis Bank", + "BDBL": "Bandhan Bank", + "BBKM": "Bank of Bahrein and Kuwait", + "BARB_R": "Bank of Baroda - Retail Banking", + "BKID": "Bank of India", + "MAHB": "Bank of Maharashtra", + "BACB": "Bassein Catholic Co-operative Bank", + "CSBK": "CSB Bank", + "CNRB": "Canara Bank", + "CBIN": "Central Bank of India", + "CIUB": "City Union Bank", + "CORP": "Corporation Bank", + "COSB": "Cosmos Co-operative Bank", + "DCBL": "DCB Bank", + "BKDN": "Dena Bank", + "DEUT": "Deutsche Bank", + "DBSS": "Development Bank of Singapore", + "DLXB": "Dhanlaxmi Bank", + "DLXB_C": "Dhanlaxmi Bank - Corporate Banking", + "ESAF": "ESAF Small Finance Bank", + "ESFB": "Equitas Small Finance Bank", + "FDRL": "Federal Bank", + "HDFC": "HDFC Bank", + "ICIC": "ICICI Bank", + "IBKL": "IDBI", + "IBKL_C": "IDBI - Corporate Banking", + "IDFB": "IDFC FIRST Bank", + "IDIB": "Indian Bank", + "IOBA": "Indian Overseas Bank", + "INDB": "Indusind Bank", + "JAKA": "Jammu and Kashmir Bank", + "JSBP": "Janata Sahakari Bank (Pune)", + "KCCB": "Kalupur Commercial Co-operative Bank", + "KJSB": "Kalyan Janata Sahakari Bank", + "KARB": "Karnataka Bank", + "KVBL": "Karur Vysya Bank", + "KKBK": "Kotak Mahindra Bank", + "LAVB_C": "Lakshmi Vilas Bank - Corporate Banking", + "LAVB_R": "Lakshmi Vilas Bank - Retail Banking", + "MSNU": "Mehsana Urban Co-operative Bank", + "NKGS": "NKGSB Co-operative Bank", + "NESF": "North East Small Finance Bank", + "ORBC": "Oriental Bank of Commerce", + "PMCB": "Punjab & Maharashtra Co-operative Bank", + "PSIB": "Punjab & Sind Bank", + "PUNB_R": "Punjab National Bank - Retail Banking", + "RATN": "RBL Bank", + "RATN_C": "RBL Bank - Corporate Banking", + "SRCB": "Saraswat Co-operative Bank", + "SVCB_C": "Shamrao Vithal Bank - Corporate Banking", + "SVCB": "Shamrao Vithal Co-operative Bank", + "SIBL": "South Indian Bank", + "SCBL": "Standard Chartered Bank", + "SBBJ": "State Bank of Bikaner and Jaipur", + "SBHY": "State Bank of Hyderabad", + "SBIN": "State Bank of India", + "SBMY": "State Bank of Mysore", + "STBP": "State Bank of Patiala", + "SBTR": "State Bank of Travancore", + "SURY": "Suryoday Small Finance Bank", + "SYNB": "Syndicate Bank", + ... + }, + "wallet": { + "payzapp": true + }, + "emi": true, + "upi": true, + "cardless_emi": [], + "paylater": [], + "emi_subvention": "customer", + "emi_plans": { + "KKBK": { + "min_amount": 300000, + "plans": { + "3": 12, + "6": 12, + "9": 14, + "12": 14, + "18": 15, + "24": 15 + } + }, + "UTIB": { + "min_amount": 300000, + "plans": { + "3": 13, + "6": 13, + "9": 14, + "12": 14, + "18": 15, + "24": 15 + } + }, + "INDB": { + "min_amount": 200000, + "plans": { + "3": 13, + "6": 13, + "9": 13, + "12": 13, + "18": 15, + "24": 15 + } + }, + "RATN": { + "min_amount": 100000, + "plans": { + "3": 13, + "6": 13, + "9": 13, + "12": 13, + "18": 13, + "24": 13 + } + }, + "ICIC": { + "min_amount": 150000, + "plans": { + "3": 12.99, + "6": 13.99, + "9": 13.99, + "12": 13.99, + "24": 14.99, + "18": 14.99 + } + }, + "AMEX": { + "min_amount": 500000, + "plans": { + "3": 12, + "6": 12, + "9": 12, + "12": 12, + "18": 12, + "24": 12 + } + }, + "HDFC": { + "min_amount": 300000, + "plans": { + "12": 14, + "18": 15, + "24": 15, + "3": 13, + "6": 13, + "9": 14 + } + }, + "SCBL": { + "min_amount": 250000, + "plans": { + "3": 13, + "6": 13, + "9": 14, + "12": 14 + } + }, + "YESB": { + "min_amount": 250000, + "plans": { + "3": 12, + "6": 12, + "9": 13, + "12": 13, + "18": 14, + "24": 15 + } + }, + "BARB": { + "min_amount": 250000, + "plans": { + "3": 13, + "6": 13, + "9": 13, + "12": 13, + "18": 15, + "24": 15 + } + } + }, + "emi_options": { + "KKBK": [ + { + "duration": 3, + "interest": 12, + "subvention": "customer", + "min_amount": 300000 + }, + ... + ], + "UTIB": [ + { + "duration": 3, + "interest": 12, + "subvention": "customer", + "min_amount": 300000 + }, + ... + ], + "INDB": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 200000 + }, + ... + ], + "RATN": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 100000 + }, + ... + ], + "ICIC": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 150000 + }, + ... + ], + "AMEX": [ + { + "duration": 3, + "interest": 12, + "subvention": "customer", + "min_amount": 500000 + }, + ... + ], + "HDFC": [ + { + "duration": 12, + "interest": 14, + "subvention": "customer", + "min_amount": 300000 + }, + ... + ], + "SCBL": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 250000 + }, + ... + ], + "YESB": [ + { + "duration": 3, + "interest": 12, + "subvention": "customer", + "min_amount": 250000 + }, + ... + ], + "BARB": [ + { + "duration": 3, + "interest": 13, + "subvention": "customer", + "min_amount": 250000 + }, + ... + ] + }, + "recurring": { + "card": { + "credit": [ + "MasterCard", + "Visa" + ] + } + }, + "upi_intent": true +} +``` + +### Next Steps + +Now that you know the available payment methods, you can start creating payment requests using the [sample payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods.md) for the payment methods of your choice. + +To get additional payment methods enabled for your account, contact our [Support team](https://razorpay.com/support/#request). diff --git a/llm-content/payments/third-party-validation/s2s-integration/netbanking.md b/llm-content/payments/third-party-validation/s2s-integration/netbanking.md new file mode 100644 index 00000000..2e567e26 --- /dev/null +++ b/llm-content/payments/third-party-validation/s2s-integration/netbanking.md @@ -0,0 +1,668 @@ +--- +title: TPV S2S Integration - Netbanking +description: Know how we support Third-Party Validation (TPV) on S2S Integration with the netbanking payment method. +--- + +# TPV S2S Integration - Netbanking + +In the TPV integration flow, Razorpay maps the customer's bank accounts so that the payment is processed only from their registered bank accounts. + +## Prerequisites + +- Contact our [Support Team](https://razorpay.com/support/#raise-a-request) to get this feature enabled for your account. +- Keep the API key (combination of `Key_Id` and `Key_Secret`) handy for integration. +- [Generate API Keys from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) if you have not done already. +- Configure the [payment capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) on the Dashboard. + +## Integration + +Given below are the steps: +1. [Collect Customer Bank Account Details](#step-1-collect-customer-bank-account-details) +2. [Create an Order](#step-2-create-an-order) +3. [Create a Payment](#step-3-create-a-payment) +4. [Store Fields in Your Server](#step-4-store-fields-in-your-server) +5. [Verify the Signature](#step-5-verify-the-signature) + +### Step 1: Collect Customer Bank Account details + +Collect the customer's bank details or UPI ID at the time of registration. + +### Step 2: Create an Order + +Pass the bank account details to the `bank_account` array of the Orders API: + +/orders + +Given below is the sample code when `method` is `netbanking`. + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "method": "netbanking", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 100); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "BILL13375649"); + orderRequest.put("method", "netbanking"); + + JSONObject bank_account = new JSONObject(); + bank_account.put("account_number", "765432123456789"); + bank_account.put("name", "Gaurav Kumar"); + bank_account.put("ifsc, "HDFC0000053"); + orderRequest.put("bank_account", bank_account); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ +{ + "amount": 100, + "method": "netbanking", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'receipt' => 'BILL13375649', 'method' => 'netbanking', 'currency' => 'INR', 'bank_account'=> array('account_number'=> '765432123456789','name'=> 'Gaurav Kumar','ifsc'=>'HDFC0000053'))); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("method", "netbanking"); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("account_number","765432123456789"); +bankAccount.Add("name","Gaurav Kumar"); +bankAccount.Add("ifsc","HDFC0000053"); +orderRequest.Add("bank_account", bankAccount); + +Order order = client.Order.Create(orderRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "method": "netbanking", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +} + +Razorpay::Order.create(para_attr) + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 100, + "method": "netbanking", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 100, + "method": "netbanking", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": map[string]interface{}{ + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053", + }, +} + +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_GAWN9beXgaqRyO", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044247 +} +``` + +If the user selects the payment method within the Razorpay UI, there is no need to include the `method` field. Below is a sample code for reference. + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",100); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment":False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 100, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 +} +``` + +`amount` _mandatory_ +: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, the value of this field should be `100`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. You can create orders in **INR** only. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`method` _mandatory_ +: `string` The payment method used to make the payment. If this parameter is not passed, investors will be able to make payments using both netbanking and UPI payment methods. Possible values: + - `netbanking`: Investors can make payments only using netbanking. + - `card`: Investors can make payments using debit card. + - `upi`: Investors can make payments only using UPI. + +`bank_account` _mandatory_ +: `object` Details of the bank account that the investor has provided at the time of registration. + + `account_number` _mandatory_ + : `string` The bank account number from which the investor should make the payment. For example, `765432123456789` Payments will not be processed for an incorrect account number. + + `name` _mandatory_ + : `string` The name linked to the bank account. For example, `Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` The bank IFSC. For example, `HDFC0000053`. + +### Step 3: Create a Payment + +/payments/create/json + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/create/json \ +-H "Content-Type: application/json" \ + -d '{ + "amount": "100", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_GAWN9beXgaqRyO", + "method": "netbanking", + "bank": "HDFC" +}' +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 100); +paymentRequest.put("currency", "INR"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("contact", "9000090000"); +paymentRequest.put("order_id", "order_GAWN9beXgaqRyO"); +paymentRequest.put("method", "netbanking"); +paymentRequest.put("bank", "HDFC"); + +Payment payment = instance.payments.createJsonPayment(paymentRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createPaymentJson({ + 'amount': '100', + 'currency': 'INR', + 'email': 'gaurav.kumar@example.com', + 'contact': '9000090000', + 'order_id': 'order_GAWN9beXgaqRyO', + 'method': 'netbanking', + 'bank': 'HDFC', + }) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createPaymentJson(array('amount' => 100,'currency' => 'INR','email' => 'gaurav.kumar@example.com','contact' => '9000090000','order_id' => 'order_GAWN9beXgaqRyO','method' => 'netbanking', 'bank'=>'HDFC')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount",100); +paymentRequest.Add("currency","INR"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9000090000"); +paymentRequest.Add("order_id", "order_GAWN9beXgaqRyO"); +paymentRequest.Add("method", "netbanking"); +paymentRequest.Add("bank", "HDFC"); + +Payment payment = client.Payment.CreateJsonPayment(paymentRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +param_attr = { + "amount": "100", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_GAWN9beXgaqRyO", + "method": "netbanking", + "bank": "HDFC" +} + +Razorpay::Payment.create_json_payment(param_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createPaymentJson({ + "amount": "100", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_GAWN9beXgaqRyO", + "method": "netbanking", + "bank": "HDFC" +}); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr: = map[string] interface {} { + "amount": "100", + "currency": "INR", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "order_id": "order_GAWN9beXgaqRyO", + "method": "netbanking", + "bank": "HDFC", +} +body, err: = client.Payment.CreatePaymentJson(para_attr, nil) +```json: Response +{ + "razorpay_payment_id": "pay_GAWOYqPlvrtPSi", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/pay_GAWOYqPlvrtPSi/authorize" + } + ] +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, this field's value should be `100`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. You can create Orders in **INR** only. + +`order_id` _mandatory_ +: `string` Unique identifier of the order created in the previous step. + +`method` _mandatory_ +: `string` The payment method used to make the payment. Possible value: `netbanking` + +`bank` _mandatory_ +: `string` The customer's bank code. For example, `HDFC`. + +`email` _mandatory_ +: `string` The customer's email address. + +`contact` _mandatory_ +: `string` The customer's phone number. + +#### Response Parameters + +If the payment request is valid, the response contains the following fields: + +`razorpay_payment_id` +: `string` Unique identifier of the payment. Present for all responses. + +`next` +: `array` A list of action objects available to you to continue the payment process. Present when the payment requires further processing. + + `action` + : `string` An indication of the next step available to you to continue the payment process. Possible values: + - `redirect` - Use this URL to redirect the customer to the bank page. + - `poll` - A payment request notification is sent to the customer's UPI PSP app. + + `url` + : `string` URL to be used for the action indicated. + +### Step 4: Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +### Step 5: Verify the Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +### Payment Capture Settings + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +### Related Information + +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) (Recommended) +- [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) (Recommended) +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md) +- [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md) +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) diff --git a/llm-content/payments/third-party-validation/s2s-integration/upi/collect.md b/llm-content/payments/third-party-validation/s2s-integration/upi/collect.md new file mode 100644 index 00000000..cb26fe5b --- /dev/null +++ b/llm-content/payments/third-party-validation/s2s-integration/upi/collect.md @@ -0,0 +1,1711 @@ +--- +title: TPV S2S Integration - UPI Collect Flow +description: Integrate TPV using S2S integration with UPI Collect Flow. +--- + +# TPV S2S Integration - UPI Collect Flow + +With UPI payments, your customers can make payments using a Virtual Payment Address (VPA) without the need to enter the bank account details. In the UPI Collect flow, customers enter their registered VPA at checkout, open the UPI PSP app and complete the payment. + +> **WARN** +> +> +> **UPI Collect Flow Deprecated** +> +> According to NPCI guidelines, the UPI Collect flow is being deprecated effective 28 February 2026. Customers can no longer make payments or register UPI mandates by manually entering VPA/UPI id/mobile numbers. +> +> **Exemptions:** UPI Collect will continue to be supported for: +> - MCC 6012 & 6211 (IPO and secondary market transactions). +> - iOS mobile app and mobile web transactions. +> - UPI Mandates (execute/modify/revoke operations only) +> - eRupi vouchers. +> - PACB businesses (cross-border/international payments). +> +> **Action Required:** +> - If you are a new Razorpay user, use [UPI Intent](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/s2s-integration/payment-methods/upi/intent.md). +> - If you are an existing Razorpay user not covered by exemptions, you must migrate to UPI Intent or UPI QR code to continue accepting UPI payments. For detailed migration steps, refer to the [migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/s2s-integration.md). +> + +**NPCI Restrictions for UPI Collect Flow** + +As per NPCI guidelines, the following MCC codes are restricted and cannot accept UPI Collect payments: + + +### Restricted MCC Codes + + + MCC Code | Category + --- + 5816 | Digital Goods: Games + --- + 6540 | POI Funding Transactions (excluding MoneySend) + --- + 4812 | Telecommunication Equipment and Telephone Sales + --- + 4814 | Telecommunication Services + --- + 7408 | Lending Platform + --- + 6513 | Real Estate Agents and Managers - Rentals + --- + 7995 | Betting/Lottery + --- + 5412 | Grocery Stores, Supermarkets + --- + 5413 | Grocery Stores, Supermarkets + + + +## Best Practices + +Following are a few of the best practices to be followed to accept online payments using UPI Collect Flow: + +1. You should validate the VPA before initiating the payment request. Know more about[ VPA Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/features/validate-vpa.md). +2. You should add a custom UPI Collect expiry based on the business requirement to provide enough time for the customer to complete the payment. +3. You should use the [Saved VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/saved-vpa.md) feature provided by Razorpay to provide a better customer experience and have a better conversion. + +## Prerequisites + +- Contact our [Support Team](https://razorpay.com/support/#raise-a-request) to get this feature enabled for your account. +- Keep the API key (combination of `Key_Id` and `Key_Secret`) handy for integration. +- [Generate API Keys from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) if you have not done already. +- Configure the [payment capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) on the Dashboard. + +## UPI Collect Flow + +Following is the process for accepting payments using the UPI Collect Flow: + +1. The customer selects UPI as the payment method and enters their VPA on your app or website. Razorpay validates the VPA. +2. The customer saves the entered VPA details while completing the payment. Razorpay saves the valid VPA details as **tokens**. +3. The next time the customer wants to make a payment using VPA, the customer can select the saved VPA and complete the payment. + +## Integration Steps + +1. [Create a Payment and a VPA Token](#1-create-a-payment-and-a-vpa-token) +2. [Create Payments Using Tokens](#2-create-payments-using-tokens) + +### 1. Create a Payment and a VPA Token + +Follow these steps to create and save valid VPA tokens in the payment flow: + +1. [Create a customer or fetch the customer for whom VPA should be saved.](#step-11-create-a-customer) +2. [Create an order.](#step-12-create-an-order) +3. [Validate the VPA entered by the customer.](#step-13-validate-the-vpa) +4. [Initiate a payment.](#step-14-initiate-a-payment) + +### Step 1.1: Create a Customer + +Skip this step if the customer is already created for your account. + +Create a customer whose VPAs should be saved with details such as `email` and `contact`. + +The following endpoint creates or add a customer with basic details such as name and contact details. You can use this API for various Razorpay Solution offerings. + +/customers + +```cURL: Curl + +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/customers \ +-H "Content-Type: application/json" \ +-d '{ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject customerRequest = new JSONObject(); +customerRequest.put("name",""); +customerRequest.put("contact",""); +customerRequest.put("email",""); +customerRequest.put("fail_existing", "0"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_2","Tea, Earl Grey… decaf."); +customerRequest.put("notes",notes); + +Customer customer = razorpay.customers.create(customerRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.customer.create({ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": map[string]interface{}{ + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf.", + }, +} + +body, err := client.Customer.Create(data, nil) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->create(array('name' => '', 'email' => '','contact'=>'','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); + +options.Add("name", ""); +options.Add("contact", ""); +options.Add("email", ""); +options.Add("fail_existing", "0"); + +Customer customer = Customer.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.create({ + "name": "", + "contact": "", + "email": "", + "fail_existing": "0", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.create({ + name: "", + contact: "", + email: "", + fail_existing: "0", + notes: { + notes_key_1: "Tea, Earl Grey, Hot", + notes_key_2: "Tea, Earl Grey… decaf." + } +}) +``` + +```json: Success Response +{ + "id" : "cust_1Aa00000000004", + "entity": "customer", + "name" : "", + "email" : "", + "contact" : "", + "gstin": null, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at ": 1234567890 +} +```json: Failure Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Contact number should be at least 8 digits, including country code", + "source": "business", + "step": "NA", + "reason": "invalid_contact_number", + "metadata": {}, + "field": "contact" + } +} +``` + +#### Request Parameters + +`name` _optional_ +: `string` Customer's name. Alphanumeric value with period (.), apostrophe ('), forward slash (/), at (@) and parentheses are allowed. The name must be between 3-50 characters in length. For example, `Gaurav Kumar`. + +`contact ` _optional_ +: `string` The customer's phone number. A maximum length of 15 characters including country code. For example, `+919876543210`. + +`email ` _optional_ +: `string` The customer's email address. A maximum length of 64 characters. For example, `gaurav.kumar@example.com`. + +`fail_existing` _optional_ +: `string` Possible values: + - `1` (default): If a customer with the same details already exists, throws an error. + - `0`: If a customer with the same details already exists, fetches details of the existing customer. + + +`gstin` _optional_ +: `string` Customer's GST number, if available. For example, `29XAbbA4369J1PA`. + +`notes` _optional_ +: `object` This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +### Step 1.2: Create an Order + +You need to create an order before initiating the payment. + +/orders + +Given below is the sample code when `method` is `upi`. + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 100); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "BILL13375649"); + orderRequest.put("method", "upi"); + + JSONObject bank_account = new JSONObject(); + bank_account.put("account_number", "765432123456789"); + bank_account.put("name", "Gaurav Kumar"); + bank_account.put("ifsc, "HDFC0000053"); + orderRequest.put("bank_account", bank_account); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ +{ + "amount": 100, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'receipt' => 'BILL13375649', 'method' => 'upi', 'currency' => 'INR', 'bank_account'=> array('account_number'=> '765432123456789','name'=> 'Gaurav Kumar','ifsc'=>'HDFC0000053'))); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("method", "upi"); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("account_number","765432123456789"); +bankAccount.Add("name","Gaurav Kumar"); +bankAccount.Add("ifsc","HDFC0000053"); +orderRequest.Add("bank_account", bankAccount); + +Order order = client.Order.Create(orderRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +} + +Razorpay::Order.create(para_attr) + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 100, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 100, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": map[string]interface{}{ + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053", + }, +} + +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_GAWN9beXgaqRyO", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044247 +} +``` + +If the user selects the payment method within the Razorpay UI, there is no need to include the `method` field. Below is a sample code for reference. + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",100); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment":False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 100, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 +} +``` + +`amount` _mandatory_ +: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, the value of this field should be `100`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. You can create orders in **INR** only. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`method` _mandatory_ +: `string` The payment method used to make the payment. If this parameter is not passed, investors will be able to make payments using both netbanking and UPI payment methods. Possible values: + - `netbanking`: Investors can make payments only using netbanking. + - `card`: Investors can make payments using debit card. + - `upi`: Investors can make payments only using UPI. + +`bank_account` _mandatory_ +: `object` Details of the bank account that the investor has provided at the time of registration. + + `account_number` _mandatory_ + : `string` The bank account number from which the investor should make the payment. For example, `765432123456789` Payments will not be processed for an incorrect account number. + + `name` _mandatory_ + : `string` The name linked to the bank account. For example, `Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` The bank IFSC. For example, `HDFC0000053`. + +### Step 1.3: Validate the VPA + +Collect the VPA details of the customer and validate it as follows: + +/payments/validate/vpa + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/validate/vpa \ +-H "Content-Type: application/json" \ +-d '{ + "vpa": "gauravkumar@exampleupi" +}' + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.validateVpa({ + "vpa": "gauravkumar@exampleupi" +}) + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("vpa", "gauravkumar@exampleupi"); + +Payment payment = instance.payments.validateUpi(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->validateVpa(array('vpa'=>'gauravkumar@exampleupi')); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("vpa", "gauravkumar@exampleupi"); + +Payment payment = client.Payment.ValidateUpi(paymentRequest) + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "vpa": "gauravkumar@exampleupi" +} +Razorpay::Payment.validate_vpa(para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.validateVpa({ + "vpa": "gauravkumar@exampleupi" +}); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr: = map[string] interface {} { + "vpa": "gauravkumar@exampleupi", +} + +body, err: = client.Payment.ValidateVpa(para_attr, nil) + +```json: Response +{ + "vpa": "gauravkumar@exampleupi", + "success": true, + "customer_name": "Gaurav Kumar" +} +``` + +#### Request Parameters + +`vpa` _mandatory_ +: `string` The virtual payment address (VPA) you want to validate. For example, `gauravkumar@exampleupi`. + + +> **WARN** +> +> +> **Deprecation Notice** +> +> UPI Collect is deprecated effective 28 February 2026. This tab is applicable only for exempted businesses. If you are not covered by the exemptions, refer to the [ migration documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/announcements/upi-collect-migration/s2s-integration.md) to switch to UPI Intent. +> + +### Step 1.4: Initiate a Payment + +Once validated, save the VPA provided by the customer. Create a payment with the valid `vpa` as follows: + +/payments/create/upi + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/create/upi \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "order_id": "order_GAWRjlWkVcRh0V", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "save": true, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "note_key": "value1" + }, + "upi": { + "flow": "collect", + "vpa": "gauravkumar@exampleupi", + "expiry_time": 5 + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 100); +paymentRequest.put("currency", "INR"); +paymentRequest.put("order_id", "order_JZluwjknyWdhnU"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("contact", "9000090000"); +paymentRequest.put("method", "upi"); +paymentRequest.put("customer_id", "cust_EIW4T2etiweBmG"); +paymentRequest.put("save", true); +paymentRequest.put("ip", "192.168.0.103"); +paymentRequest.put("referer", "http"); +paymentRequest.put("user_agent", "Mozilla/5.0"); +paymentRequest.put("description", "Test flow"); +JSONObject notes = new JSONObject(); +notes.put("note_key", "value1"); +JSONObject upi = new JSONObject(); +upi.put("flow", "collect"); +upi.put("vpa", "gauravkumar@exampleupi"); +upi.put("expiry_time", 5); +paymentRequest.put("notes", notes); +paymentRequest.put("upi", upi); + +Payment payment = instance.payments.createUpi(paymentRequest); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createUpi(array("amount" => 100,"currency" => "INR","order_id" => "order_Jhgp4wIVHQrg5H","email" => "gaurav.kumar@example.com","contact" => "9000090000","method" => "upi","customer_id" => "cust_EIW4T2etiweBmG","save" => true,"ip" => "192.168.0.103","referer" => "http","user_agent" => "Mozilla/5.0","description" => "Test flow","notes" => array("note_key" => "value1"),"upi" => array("flow" => "collect","vpa" => "gauravkumar@exampleupi","expiry_time" => 5))); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createUpi({ + 'amount': 100, + 'currency': 'INR', + 'order_id': 'order_GAWRjlWkVcRh0V', + 'email': 'gaurav.kumar@example.com', + 'contact': '9000090000', + 'method': 'upi', + 'customer_id': 'cust_EIW4T2etiweBmG', + 'save': True, + 'ip': '192.168.0.103', + 'referer': 'http', + 'user_agent': 'Mozilla/5.0', + 'description': 'Test flow', + 'notes': {'note_key': 'value1'}, + 'upi': { + 'flow': 'collect', + 'vpa': 'gauravkumar@exampleupi', + 'expiry_time': 5}, + }) + +```csharp: .NET +RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount", 100); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("order_id", "order_MSd9LNbSEB2Gnv"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9000090000"); +paymentRequest.Add("method", "upi"); +paymentRequest.Add("customer_id", "cust_Z6t7VFTb9xHeOs"); +paymentRequest.Add("save", true); +paymentRequest.Add("ip", "192.168.0.103"); +paymentRequest.Add("referer", "http"); +paymentRequest.Add("user_agent", "Mozilla/5.0"); +paymentRequest.Add("description", "Test flow"); +Dictionary notes = new Dictionary(); +notes.Add("note_key", "value1"); +Dictionary upi = new Dictionary(); +upi.Add("flow", "collect"); +upi.Add("vpa", "gauravkumar@exampleupi"); +upi.Add("expiry_time", 5); +paymentRequest.Add("notes", notes); +paymentRequest.Add("upi", upi); + +Payment payment = client.Payment.CreateUpi(paymentRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "order_id": "order_GAWRjlWkVcRh0V", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "save": 1, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "note_key": "value1" + }, + "upi": { + "flow": "collect", + "vpa": "gauravkumar@exampleupi", + "expiry_time": 5 + } +} + +Razorpay::Payment.create_upi(para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createUpi({ + "amount": 100, + "currency": "INR", + "order_id": "order_GAWRjlWkVcRh0V", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "save": true, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "note_key": "value1" + }, + "upi": { + "flow": "collect", + "vpa": "gauravkumar@exampleupi", + "expiry_time": 5 + } +}); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr: = map[string] interface {} { + "amount": 100, + "currency": "INR", + "order_id": "order_GAWRjlWkVcRh0V", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "save": true, + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": map[string] interface {} { + "note_key": "value1", + }, + "upi": map[string] interface {} { + "flow": "collect", + "vpa": "gauravkumar@exampleupi", + "expiry_time": 5, + }, +} +body, err: = client.Payment.CreateUpi(para_attr, nil) + +```json: Response +{ + "razorpay_payment_id": "pay_EAm09NKReXi2e0" +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The amount associated with the payment in the smallest unit of the supported currency. For example, 2000 means ₹20. + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the payment amount. Only `INR` is supported. + +`order_id` _mandatory_ +: `string` Unique identifier of the order, obtained in the response of the previous step. + +`notes` _optional_ +: `json object` Key-value pairs that can hold additional information about the payment. Refer to the [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) section of the API Reference Guide. + +`description` _optional_ +: `string` Descriptive text of the payment. + +`contact` _mandatory_ +: `string` Phone number of the customer. + +`email` _mandatory_ +: `string` Email address of the customer. + +`save` +: `boolean` Specifies if the VPA should be stored as tokens. Possible values: + - `true`: Saves the VPA details. + - `false`(default): Does not save the VPA details. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer, obtained from the response of [Step 1](#step-1-create-a-customer). + +`callback_url` _optional_ +: `string` URL where Razorpay will submit the final payment status. + +`ip` _mandatory_ +: `string` The client's browser IP address. For example, **117.217.74.98** + +`referer` _mandatory_ +: `string` Value of `referer` header passed by the client's browser. For example, **https://example.com/** + +`user_agent` _mandatory_ +: `string` Value of `user_agent` header passed by the client's browser. +For example, **Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36** + +`upi` +: Details of the expiry of the UPI link + + `flow` _mandatory_ + : `string` Specify the type of the UPI payment flow. + Possible values: + - `collect` (default) + - `intent` + + `vpa` _mandatory_ + : `string` VPA of the customer where the collect request will be sent. + + `expiry_time` _mandatory_ + : `integer` Period of time (in minutes) after which the link will expire. The default value is **5**. + +## 2. Create Payments Using Tokens + +On a repeat transaction, customers can make payments using the VPA tokens, which were saved earlier. Follow these steps to create a payment using a saved token: + +1. [Create an Order.](#step-21-create-an-order) +2. [Fetch all tokens of a customer.](#step-22-fetch-vpa-tokens-of-a-customer) +3. [Initiate a payment with the token selected by the customer.](#step-23-initiate-a-payment-using-vpa-token) +4. [Verify Payment Signature](#step-24-verify-the-payment-signature) + +### Step 2.1: Create an Order + +You need to create an order before initiating the payment. + +/orders + +Given below is the sample code when `method` is `upi`. + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 100); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "BILL13375649"); + orderRequest.put("method", "upi"); + + JSONObject bank_account = new JSONObject(); + bank_account.put("account_number", "765432123456789"); + bank_account.put("name", "Gaurav Kumar"); + bank_account.put("ifsc, "HDFC0000053"); + orderRequest.put("bank_account", bank_account); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ +{ + "amount": 100, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'method' => 'upi', 'currency' => 'INR', bank_account => array( 'account_number' => '765432123456789', 'name' => 'Gaurav Kumar', 'ifsc' => 'HDFC0000053'))); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("amount", 100); // amount in the smallest currency unit +options.Add("receipt", "receipt#1"); +options.Add("currency", "INR"); +options.Add("method", "upi"); +bank_account.account_number="765432123456789"; +bank_account.name="Gaurav Kumar"; +bank_account.ifsc="HDFC0000053"; + +options.Add("bank_account", bank_account); + +Order order = client.Order.Create(options); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +order = Razorpay::Order.create amount: 100, currency: 'INR', receipt: 'receipt#1', method: 'upi', bank_account: { account_number: '765432123456789', name: 'Gaurav Kumar', ifsc: 'HDFC0000053'} + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + amount: 100, + currency: "INR", + receipt: "receipt#1", + method: 'upi', + bank_account: { + account_number: "765432123456789", + name: "Gaurav Kumar", + ifsc: "HDFC0000053" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "method": "upi", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +} +body, err := client.Order.Create(data) + +```json: Response +{ + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 +} +``` + +If the user selects the payment method within the Razorpay UI, there is no need to include the `method` field. Below is a sample code for reference. + +```curl: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +}' + +```json: Response +{ + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, the value of this field should be `100`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. You can create orders in **INR** only. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`method` _mandatory_ +: `string` The payment method used to make the payment. If this parameter is not passed, investors will be able to make payments using both netbanking and UPI payment methods. Possible values: + - `netbanking`: Investors can make payments only using netbanking. + - `card`: Investors can make payments using debit card. + - `upi`: Investors can make payments only using UPI. + +`bank_account` _mandatory_ +: `object` Details of the bank account that the investor has provided at the time of registration. + + `account_number` _mandatory_ + : `string` The bank account number from which the investor should make the payment. For example, `765432123456789` Payments will not be processed for an incorrect account number. + + `name` _mandatory_ + : `string` The name linked to the bank account. For example, `Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` The bank IFSC. For example, `HDFC0000053`. + +### Step 2.2: Fetch VPA Tokens of a Customer + +You can retrieve all the card and VPA tokens of a customer if they have been previously saved. + +/customers/:customer_id/tokens + +```curl: Curl +curl -u : \ +-X GET https://api.razorpay.com/v1/customers/cust_EIW4T2etiweBmG/tokens + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String customerId = "cust_DtHaBuooGHTuyZ"; +List token = instance.customers.fetchTokens(customerId); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.token.all(customerId) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->customer->fetch($customerId)->tokens()->all(); + +```csharp: .NET +RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + +string customerId = "cust_DtHaBuooGHTuyZ"; + +List token = client.Customer.Fetch(customerId).Tokens(); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +Razorpay::Customer.fetch(customerId).fetchTokens + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.customers.fetchTokens(customerId) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +body, err := client.Token.All("", nil, nil) + +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "token_EeO65VIv8BXZg5", + "entity": "token", + "token": "D7Qun28CcPwNVy", + "bank": null, + "wallet": null, + "method": "upi", + "vpa": { + "username": "gauravkumar", + "handle": "exampleupi", + "name": null, + "status": "valid", + "received_at": 1605620835 + }, + "recurring": false, + "recurring_details": { + "status": "not_applicable", + "failure_reason": null + }, + "auth_type": null, + "mrn": null, + "used_at": 1586872080, + "created_at": 1586872080, + "start_time": null, + "dcc_enabled": false + }, + { + "id": "token_EeroOjvOvorT5L", + "entity": "token", + "token": "4ydxm47GQjrIEx", + "bank": null, + "wallet": null, + "method": "card", + "card": { + "entity": "card", + "name": "Gaurav Kumar", + "last4": "8430", + "network": "Visa", + "type": "credit", + "issuer": "HDFC", + "international": false, + "emi": true, + "expiry_month": 12, + "expiry_year": 2022, + "flows": { + "otp": true, + "recurring": true + } + }, + "vpa": null, + "recurring": false, + "auth_type": null, + "mrn": null, + "used_at": 1586976724, + "created_at": 1586976724, + "expired_at": 1672511399, + "dcc_enabled": false + } + ] +} +``` + +### Step 2.3: Initiate a Payment Using VPA Token + +To initiate a payment using a VPA token, pass the `customer_id` and `token` parameters instead of the `vpa` parameter. + +/payments/create/upi + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/payments/create/upi \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "currency": "INR", + "order_id": "order_ExhN1Y0100Dkjw", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "token": "token_EeO65VIv8BXZg5" + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "note_key": "value1" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 100); +paymentRequest.put("currency", "INR"); +paymentRequest.put("order_id", "order_JZluwjknyWdhnU"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("contact", "9123456789"); +paymentRequest.put("method", "upi"); +paymentRequest.put("customer_id", "cust_EIW4T2etiweBmG"); +paymentRequest.put("token", "token_EeO65VIv8BXZg5"); +paymentRequest.put("ip", "192.168.0.103"); +paymentRequest.put("referer", "http"); +paymentRequest.put("user_agent", "Mozilla/5.0"); +paymentRequest.put("description", "Test flow"); +JSONObject notes = new JSONObject(); +notes.put("note_key", "value1"); +paymentRequest.put("notes", notes); + +Payment payment = instance.payments.createUpi(paymentRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createUpi({ + "amount": 100, + "currency": "INR", + "order_id": "order_ExhN1Y0100Dkjw", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "token": "token_EeO65VIv8BXZg5" + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "note_key": "value1" + } +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$paymentData = [ + "amount" => 100, + "currency" => "INR", + "order_id" => "order_Jhgp4wIVHQrg5H", + "email" => "gaurav.kumar@example.com", + "contact" => "9123456789", + "method" => "upi", + "customer_id" => "cust_EIW4T2etiweBmG", + "token" => "token_EeO65VIv8BXZg5", + "ip" => "192.168.0.103", + "referer" => "http", + "user_agent" => "Mozilla/5.0", + "description" => "Test flow", + "notes" => [ + "note_key" => "value1" + ], +]; + +$response = $api->payment->createUpi($paymentData); + +```csharp: .NET +RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount", 100); +paymentRequest.Add("currency", "INR"); +paymentRequest.Add("order_id", "order_MSd9LNbSEB2Gnv"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9999999999"); +paymentRequest.Add("method", "upi"); +paymentRequest.Add("customer_id", "cust_Z6t7VFTb9xHeOs"); +paymentRequest.Add("token", "token_EeO65VIv8BXZg5"); +paymentRequest.Add("ip", "192.168.0.103"); +paymentRequest.Add("referer", "http"); +paymentRequest.Add("user_agent", "Mozilla/5.0"); +paymentRequest.Add("description", "Test flow"); +Dictionary notes = new Dictionary(); +notes.Add("note_key", "value1"); +paymentRequest.Add("notes", notes); + +Payment payment = client.Payment.CreateUpi(paymentRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "order_id": "order_GAWRjlWkVcRh0V", + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "token": "token_EeO65VIv8BXZg5", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "note_key": "value1" + }, +} + +Razorpay::Payment.create_upi(para_attr) + +```javascript: Node.js +var instance = new Razorpay({ + key_id: "YOUR_KEY_ID", + key_secret: "YOUR_SECRET", +}); + +instance.payments.createUpi({ + amount: 100, + currency: "INR", + order_id: "order_GAWRjlWkVcRh0V", + email: "gaurav.kumar@example.com", + contact: "9123456789", + method: "upi", + customer_id: "cust_EIW4T2etiweBmG", + token: "token_EeO65VIv8BXZg5", + ip: "192.168.0.103", + referer: "http", + user_agent: "Mozilla/5.0", + description: "Test flow", + notes: { + note_key: "value1", + }, +}); + +```go: Go +client := razorpay.NewClient("", "") + +para_attr := map[string]interface{}{ + "amount": 100, + "currency": "INR", + "order_id": "order_GAWRjlWkVcRh0V", + "email": "gaurav.kumar@example.com", + "contact": "9123456789", + "method": "upi", + "customer_id": "cust_EIW4T2etiweBmG", + "token": "token_EeO65VIv8BXZg5", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": map[string]interface{}{ + "note_key": "value1", + }, +} + +body, err := client.Payment.CreateUpi(para_attr, nil) + +```json: Response +{ + "razorpay_payment_id": "pay_ExjU9GqiYqobDq" +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The amount associated with the payment in the smallest unit of the supported currency. For example, 2000 means ₹20. + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the payment amount. Only `INR` is supported. + +`order_id` _mandatory_ +: `string` Unique identifier of the order, obtained in the response of the previous step. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer. + +`token` _mandatory_ +: `string` Token of the saved VPA. + +`notes` _optional_ +: `json object` Key-value pairs that can hold additional information about the payment. Refer to the [Notes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/understand.md#notes) section of the API Reference Guide. + +`description` _optional_ +: `string` Descriptive text of the payment. + +`contact` _mandatory_ +: `string` Phone number of the customer. + +`email` _mandatory_ +: `string` Email address of the customer. + +`customer_id` _mandatory_ +: `string` Unique identifier of the customer. + +`callback_url` _optional_ +: `string` URL where Razorpay will submit the final payment status. + +`ip` _mandatory_ +: `string` The client's browser IP address. For example, **117.217.74.98** + +`referer` _mandatory_ +: `string` Value of `referer` header passed by the client's browser. For example, **https://example.com/** + +`user_agent` _mandatory_ +: `string` Value of `user_agent` header passed by the client's browser. +For example, **Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36** + +### Step 2.4: Verify the Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +### Payment Capture Settings + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +After the integration is complete, a **Pay** button will appear on your webpage/app. + +![Test integration on your webpage/app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/test-int.gif.md) + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test is successful. + +You can make test payments using one of the payment methods configured at the Checkout. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +### Supported Payment Methods + +Following are all the payment modes that the customer can use to complete the payment on the Checkout. Some of them are available by default, while others require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +[Debit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `debit` | ✓ +--- +[Credit Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md) | `credit` | ✓ +--- +[Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md) | `netbanking`| ✓ +--- +[UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md) | `upi` | ✓ +--- +EMI - [Credit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/credit-card-emi.md), [Debit Card EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/debit-card-emi.md) and [No Cost EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/no-cost-emi.md) | `emi` | ✓ +--- +[Cardless EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/emi/cardless-emi.md) | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +[Bank Transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/bank-transfer.md) | `bank_transfer` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Emandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/recurring-payments/emandate/integrate.md) | `emandate` | Requires [Approval](https://razorpay.com/support) and Integration. +--- +[Pay Later ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md)| `paylater` | Requires [Approval](https://razorpay.com/support). + +### Netbanking + +You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment `success` or a `failure`. Since this is Test Mode, we will not redirect you to the bank login portals. + +Check the list of [supported banks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md#supported-banks). + +### UPI + +You can enter one of the following UPI IDs: + +- `success@razorpay`: To make the payment successful. +- `failure@razorpay`: To fail the payment. + +Check the following lists: + - [Supported UPI Flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md). + - [UPI Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/upi.md). + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can use **Test Mode** to test UPI payments, and **Live Mode** for UPI Intent and QR payments. +> + +### Related Information + +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) (Recommended) +- [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) (Recommended) +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md) +- [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md) +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) diff --git a/llm-content/payments/third-party-validation/s2s-integration/upi/intent.md b/llm-content/payments/third-party-validation/s2s-integration/upi/intent.md new file mode 100644 index 00000000..cd279a6b --- /dev/null +++ b/llm-content/payments/third-party-validation/s2s-integration/upi/intent.md @@ -0,0 +1,779 @@ +--- +title: TPV S2S Integration - UPI Intent Flow +description: Integrate TPV using S2S integration with UPI Intent Flow. +--- + +# TPV S2S Integration - UPI Intent Flow + +You can collect payments using the UPI Intent Flow. In this flow, when customer selects UPI as the payment method, the list of UPI PSP apps is displayed. When the customer selects their preferred app, it opens automatically. They can complete the payment on the UPI PSP app. + +## Best Practices + +Following are a few of the best practices to be followed to accept online payments using UPI Intent Flow: + +1. **Do not change Intent URL** + + Do not make changes to the intent URL shared by Razorpay as part of the API response. Making changes to the intent URL can lead to payment failure. +2. **Host UPI apps** + + It is recommended to host the UPI apps on your page/app instead of just hosting the Intent URI where the native Android drawer shows the apps. This improves conversion. +3. **Rank UPI Apps by Success Rate** + + Show the UPI PSP apps in the order of their success rate. +4. **Mobile site** + + If you have higher traffic via mobile site, make sure you provide the option of UPI intent payment to your users using [our m-site integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/google-pay/custom-integration.md). This will help you achieve better success rates. +5. **Gpay SDK** + + If your UPI transaction volumes are high, you can also explore integrating [Gpay SDK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi/google-pay.md#android-integration-using-google-pay-sdk). This provides a better user experience and about a 3-5% improvement in success rate. + +## Prerequisites + +- Contact our [Support Team](https://razorpay.com/support/#raise-a-request) to get this feature enabled for your account. +- Keep the API key (combination of `Key_Id` and `Key_Secret`) handy for integration. +- [Generate API Keys from the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) if you have not done already. +- Configure the [payment capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md) on the Dashboard. + +## UPI Intent Flow + +Following is the process for accepting payments using the UPI Intent Flow: + +Customers need not enter VPA or phone number as these details are pre-filled and submitted along with the other payment details. While making the payment, customers select the UPI PSP app on your app. The UPI PSP app is launched automatically on their mobile devices, where the payment is completed. + +1. The customer selects UPI as the payment method. +2. The customer chooses their preferred UPI PSP app from the list. +3. The UPI PSP app opens automatically and the customer completes the payment. + +## Integration Steps + +1. [Create an order](#step-1-create-an-order). +2. [Initiate Payment using the intent URL](#step-2-initiate-a-payment). +3. [Store Fields in Your Server](#step-3-store-fields-in-your-server). +4. [Verify the Signature](#step-4-verify-the-signature). + +### Step 1: Create an Order + +/orders + +Given below is the sample code when `method` is `upi`. + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 100); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "BILL13375649"); + orderRequest.put("method", "upi"); + + JSONObject bank_account = new JSONObject(); + bank_account.put("account_number", "765432123456789"); + bank_account.put("name", "Gaurav Kumar"); + bank_account.put("ifsc, "HDFC0000053"); + orderRequest.put("bank_account", bank_account); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ +{ + "amount": 100, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('amount' => 100, 'receipt' => 'BILL13375649', 'method' => 'upi', 'currency' => 'INR', 'bank_account'=> array('account_number'=> '765432123456789','name'=> 'Gaurav Kumar','ifsc'=>'HDFC0000053'))); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("method", "upi"); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary bankAccount = new Dictionary(); +bankAccount.Add("account_number","765432123456789"); +bankAccount.Add("name","Gaurav Kumar"); +bankAccount.Add("ifsc","HDFC0000053"); +orderRequest.Add("bank_account", bankAccount); + +Order order = client.Order.Create(orderRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +} + +Razorpay::Order.create(para_attr) + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 100, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 100, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": map[string]interface{}{ + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053", + }, +} + +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_GAWN9beXgaqRyO", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044247 +} +``` + +If the user selects the payment method within the Razorpay UI, there is no need to include the `method` field. Below is a sample code for reference. + +```curl: Curl +curl -u : \ +-X POST https://api.razorpay.com/v1/orders \ +-H "Content-Type: application/json" \ +-d '{ + "amount": 100, + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } +}' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject orderRequest = new JSONObject(); +orderRequest.put("amount",100); +orderRequest.put("currency","INR"); +orderRequest.put("receipt", "receipt#1"); +JSONObject notes = new JSONObject(); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +notes.put("notes_key_1","Tea, Earl Grey, Hot"); +orderRequest.put("notes",notes); + +Order order = instance.orders.create(orderRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.order.create({ + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment":False, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); + +```csharp: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary orderRequest = new Dictionary(); +orderRequest.Add("amount", 100); +orderRequest.Add("currency", "INR"); +orderRequest.Add("receipt", "receipt#1"); +Dictionary notes = new Dictionary(); +notes.Add("notes_key_1", "Tea, Earl Grey, Hot"); +notes.Add("notes_key_2", "Tea, Earl Grey, Hot"); +orderRequest.Add("notes", notes); + +Order order = client.Order.Create(orderRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "notes": { + "key1": "value3", + "key2": "value2" + } +} + +Razorpay::Order.create(para_attr) + +```js: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.orders.create({ + "amount": 100, + "currency": "INR", + "receipt": "receipt#1", + "partial_payment": false, + "notes": { + "key1": "value3", + "key2": "value2" + } +}) + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +data := map[string]interface{}{ + "amount": 100, + "currency": "INR", + "receipt": "some_receipt_id", + "partial_payment": false, + "notes": map[string]interface{}{ + "key1": "value1", + "key2": "value2", + }, +} +body, err := client.Order.Create(data, nil) + +```json: Response +{ + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 100, + "amount_paid": 0, + "amount_due": 100, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 +} +``` + +#### Request Parameters + +`amount` _mandatory_ +: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, the value of this field should be `100`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. You can create orders in **INR** only. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this order, set for your internal reference. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`method` _mandatory_ +: `string` The payment method used to make the payment. If this parameter is not passed, investors will be able to make payments using both netbanking and UPI payment methods. Possible values: + - `netbanking`: Investors can make payments only using netbanking. + - `card`: Investors can make payments using debit card. + - `upi`: Investors can make payments only using UPI. + +`bank_account` _mandatory_ +: `object` Details of the bank account that the investor has provided at the time of registration. + + `account_number` _mandatory_ + : `string` The bank account number from which the investor should make the payment. For example, `765432123456789` Payments will not be processed for an incorrect account number. + + `name` _mandatory_ + : `string` The name linked to the bank account. For example, `Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` The bank IFSC. For example, `HDFC0000053`. + +### Step 2: Initiate a Payment + +/payments/create/upi + +```curl: Request + curl -u : \ + -X POST https://api.razorpay.com/v1/payments/create/upi \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 100, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "upi", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "purpose": "UPI test payment" + }, + "upi": { + "flow" : "intent" + } + }' + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +JSONObject paymentRequest = new JSONObject(); +paymentRequest.put("amount", 100); +paymentRequest.put("currency", "INR"); +paymentRequest.put("order_id", "order_JZluwjknyWdhnU"); +paymentRequest.put("email", "gaurav.kumar@example.com"); +paymentRequest.put("contact", "9000090000"); +paymentRequest.put("method", "upi"); +paymentRequest.put("ip", "192.168.0.103"); +paymentRequest.put("referer", "http"); +paymentRequest.put("user_agent", "Mozilla/5.0"); +paymentRequest.put("description", "Test flow"); +JSONObject notes = new JSONObject(); +notes.put("purpose", "UPI test payment"); +JSONObject upi = new JSONObject(); +upi.put("flow", "intent"); +paymentRequest.put("notes", notes); +paymentRequest.put("upi", upi); + +Payment payment = instance.payments.createUpi(paymentRequest); + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.payment.createUpi({ + 'amount': 100, + 'currency': 'INR', + 'order_id': 'order_Ee0biRtLOqzRjP', + 'email': 'gaurav.kumar@example.com', + 'contact': '9000090000', + 'method': 'upi', + 'ip': '192.168.0.103', + 'referer': 'http', + 'user_agent': 'Mozilla/5.0', + 'description': 'Test flow', + 'notes': { + 'purpose': 'UPI test payment + '}, + 'upi': { + 'flow': 'intent' + }, +}) + +```php: PHP +$api = new Api($key_id, $secret); + +$api->payment->createUpi(array("amount" => 100,"currency" => "INR","order_id" => "order_Jhgp4wIVHQrg5H","email" => "gaurav.kumar@example.com","contact" => "9000090000","method" => "upi","customer_id" => "cust_EIW4T2etiweBmG","ip" => "192.168.0.103","referer" => "http","user_agent" => "Mozilla/5.0","description" => "Test flow","notes" => array("note_key" => "value1"),"upi" => array("flow" => "intent"))); + +```csharp: .NET +RazorpayClient client = new RazorpayClient(your_key_id, your_secret); + +Dictionary paymentRequest = new Dictionary(); +paymentRequest.Add("amount",100); +paymentRequest.Add("currency","INR"); +paymentRequest.Add("order_id", "order_Z6t7VFTb9xHeOs"); +paymentRequest.Add("email", "gaurav.kumar@example.com"); +paymentRequest.Add("contact", "9000090000"); +paymentRequest.Add("method", "upi"); +paymentRequest.Add("ip", "192.168.0.103"); +paymentRequest.Add("referer", "http"); +paymentRequest.Add("user_agent", "Mozilla/5.0"); +paymentRequest.Add("description", "Test flow"); +Dictionary notes = new Dictionary(); +notes.Add("purpose","UPI test payment"); +Dictionary upi = new Dictionary(); +upi.Add("flow","intent"); +paymentRequest.Add("notes",notes); +paymentRequest.Add("upi",upi); + +Payment payment = client.Payment.CreateUpi(paymentRequest); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +para_attr = { + "amount": 100, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "upi", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "purpose": "UPI test payment" + }, + "upi": { + "flow": "intent" + } +} + +Razorpay::Payment.create_upi(para_attr) + +```javascript: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +instance.payments.createUpi({ + "amount": 100, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "upi", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": { + "purpose": "UPI test payment" + }, + "upi": { + "flow": "intent" + } +}); + +```go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +para_attr: = map[string] interface {} { + "amount": 100, + "currency": "INR", + "order_id": "order_Ee0biRtLOqzRjP", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "method": "upi", + "ip": "192.168.0.103", + "referer": "http", + "user_agent": "Mozilla/5.0", + "description": "Test flow", + "notes": map[string] interface {} { + "purpose": "UPI test payment", + }, + "upi": map[string] interface {} { + "flow": "intent", + }, +} +body, err: = client.Payment.CreateUpi(para_attr, nil) + +``` json: Response +{ + "razorpay_payment_id": "pay_CMeM6XvOPGFiF", + "link": "upi://pay?pa=success@razorpay&pn=xyz&tr=xxxxxxxxxxx&tn=gourav&am=1&cu=INR&mc=xyzw" +} +``` + +> **WARN** +> +> +> **Do Not Make Changes to Link Received in Response** +> +> Do not make changes to the link you receive in the response. This is the Razorpay Intent URL. Making changes to this URL can lead to payment failure or other unexpected errors with the payment. +> + +#### Request Parameters + +Following are the request parameters for the API: + +`amount` _mandatory_ +: `integer` The amount associated with the payment in the smallest unit of the supported currency. For example, 2000 means ₹20. + +`currency` _mandatory_ +: `string` ISO code of the currency associated with the payment amount. In this case, it is `INR`. + +`order_id` _mandatory_ +: `string` Unique identifier of the order obtained from the response of the previous step. + +`method` _mandatory_ +: `string` The payment method used to make the payment. Possible values: + - `netbanking` + - `upi` + +`notes` _optional_ +: `json object` Key-value pair used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`description` _optional_ +: `string` Descriptive text of the payment. + +`contact` _mandatory_ +: `string` Phone number of the customer. + +`email` _mandatory_ +: `string` Email address of the customer. + +`callback_url` _optional_ +: `string` URL where Razorpay will submit the final payment status. + +`ip` _mandatory_ +: `string` The client's browser IP address. For example, **117.217.74.98** + +`referer` _mandatory_ +: `string` Value of the `referer` header passed by the client's browser. For example, **https://example.com/**. + +`user_agent` _mandatory_ +: `string` Value of the `user_agent` header passed by client's browser. For example, **Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36** + +`upi` _mandatory_ +: Details of the UPI payment + + `flow` + : `string` Type of the UPI method. In this case, it is `intent`. + +You will get the UPI Intent URI as part of the payment response. + +To pass the payment data to the respective UPI app and to initiate the payment, use the following code: + +```js: Pass data to UPI app +Intent i = new Intent(Intent.ACTION_VIEW); + i.setData(Uri.parse(url)); //uri from the create S2S payment response + i.setPackage(packageName); //package name from the `upi://pay` intent response + +activity.startActivityForResult(i,2561); //unique activity code to get the callback +``` + +### Step 3: Store Fields in Your Server + +A successful payment returns the following fields to the Checkout form. + + +### Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + +### Step 4: Verify the Payment Signature + +This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + +### To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + +### Payment Capture Settings + +After payment is `authorized`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + + Authorized payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Razorpay Dashboard. Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/create.md). +> + + + + Each authorized payment can also be captured individually. You can manually capture payments using [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) or [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments). Know more about [capture settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + +### Related Information + +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) (Recommended) +- [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) (Recommended) +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md) +- [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md) +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) diff --git a/llm-content/payments/third-party-validation/standard-integration.md b/llm-content/payments/third-party-validation/standard-integration.md new file mode 100644 index 00000000..770b957c --- /dev/null +++ b/llm-content/payments/third-party-validation/standard-integration.md @@ -0,0 +1,1113 @@ +--- +title: Third Party Validation (TPV) on Razorpay Standard Integration +description: Know how to integrate TPV on Razorpay Standard Integration. +--- + +# Third Party Validation (TPV) on Razorpay Standard Integration + +[Third-Party Validation (TPV)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation.md) of bank accounts is a mandatory requirement for merchants in the BFSI (Banking, Financial Services and Insurance) sector dealing with Securities, Broking and Mutual Funds. As per Securities and Exchange Board of India (SEBI) guidelines, transactions must be made by the customers **only** from those bank accounts, which are provided when they registered with your business. + + +### Prerequisites + + Before you integrate TPV on Razorpay Standard integration, you should fulfill the following requirements: + + 1. Set up your [Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md), if you have not done already. + 2. Contact your dedicated support POC to enable the TPV feature for your account. + 3. [Generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) required to authenticate API requests sent to Razorpay servers. + 4. Check the [best practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/third-party-validation/best-practices.md). + + +## 1. Build Integration + +In the TPV integration flow, Razorpay maps the customers' bank accounts to ensure that the payment is processed only from their registered bank accounts. Follow the steps given below: + + +### 1.1 Collect Investor Bank Account details + + You should collect the bank account details provided by the investor at the time of registration. + + + +### 1.2 Create an Order + + Pass the investor bank account details to the `bank_account` array of the Orders API. You can choose to make the investor pay using a certain payment method or permit them to choose any of the supported payment method, that is, netbanking, UPI or debit card. + + +Scenario | Action Needed +--- +[Pay Using Specific Payment Method](#scenario-1-method-parameter-is-passed) |Pass the `method` parameter. +--- +[Pay Using Any Method (Netbanking/UPI/Debit Card)](#scenario-2-method-parameter-is-not-passed) | Do not pass the `method` parameter. + +/orders + + + Scenario 1: Method Parameter is Passed + + The investor needs to pay using the payment method specified by you in the order. For example, if you want the investor to pay using UPI, you must pass `method=upi`. + + + Netbanking + + Given below is the sample code when the `method` is `netbanking`. + + + ```curl: Curl + curl -u : \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 500, + "method": "netbanking", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }' + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "BILL13375649"); + orderRequest.put("method", "netbanking"); + + JSONObject bank_account = new JSONObject(); + bank_account.put("account_number", "765432123456789"); + bank_account.put("name", "Gaurav Kumar"); + bank_account.put("ifsc, "HDFC0000053"); + orderRequest.put("bank_account", bank_account); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); + + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.order.create({ + { + "amount": 500, + "method": "netbanking", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('amount' => 100, 'method' => 'netbanking', 'currency' => 'INR', bank_account => array( 'account_number' => '765432123456789', 'name' => 'Gaurav Kumar', 'ifsc' => 'HDFC0000053'))); + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.Add("receipt", "receipt#1"); + options.Add("method", "netbanking"); + options.Add("currency", "INR"); + bank_account.account_number="765432123456789"; + bank_account.name="Gaurav Kumar"; + bank_account.ifsc="HDFC0000053"; + + options.Add("bank_account", bank_account); + + Order order = client.Order.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + order = Razorpay::Order.create amount: 50000, currency: 'INR', method: 'netbanking', receipt: 'receipt#1', bank_account: { account_number: '765432123456789', name: 'Gaurav Kumar', ifsc: 'HDFC0000053'} + + ```js: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "INR", + method: "netbanking", + receipt: "receipt#1", + bank_account: { + account_number: "765432123456789", + name: "Gaurav Kumar", + ifsc: "HDFC0000053" + } + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "method": "netbanking", + "receipt": "receipt#1", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + } + body, err := client.Order.Create(data, nil) + + ```json: Response + { + "id": "order_GAWN9beXgaqRyO", + "entity": "order", + "amount": 500, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044247 + } + ``` + + + + + + +### Debit Card + + Given below is the sample code when the `method` is `card`. + + + ```curl: Curl + curl -u : \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 500, + "method": "card", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "BILL13375649"); + orderRequest.put("method", "card"); + + JSONObject bank_account = new JSONObject(); + bank_account.put("account_number", "765432123456789"); + bank_account.put("name", "Gaurav Kumar"); + bank_account.put("ifsc, "HDFC0000053"); + orderRequest.put("bank_account", bank_account); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.order.create({ + { + "amount": 500, + "method": "card", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + } + }) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('amount' => 100, 'currency' => 'INR', 'method' => 'card', bank_account => array( 'account_number' => '765432123456789', 'name' => 'Gaurav Kumar', 'ifsc' => 'HDFC0000053'))); + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.Add("receipt", "receipt#1"); + options.Add("currency", "INR"); + options.Add("method", "card"); + bank_account.account_number="765432123456789"; + bank_account.name="Gaurav Kumar"; + bank_account.ifsc="HDFC0000053"; + + options.Add("bank_account", bank_account); + + Order order = client.Order.Create(options); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + order = Razorpay::Order.create amount: 50000, currency: 'INR', method: 'card', receipt: 'receipt#1', bank_account: { account_number: '765432123456789', name: 'Gaurav Kumar', ifsc: 'HDFC0000053'} + + ```js: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "INR", + method: "card", + receipt: "receipt#1", + bank_account: { + account_number: "765432123456789", + name: "Gaurav Kumar", + ifsc: "HDFC0000053" + } + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "method": "card", + "receipt": "receipt#1", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + } + body, err := client.Order.Create(data, nil) + + ```json: Response + { + "id": "order_GAWN9beXgaqRyO", + "entity": "order", + "amount": 500, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044247 + } + ``` + + + + + + +### UPI + + Given below is the sample code when the `method` is `upi`. + + ```curl: Curl + curl -u : \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 500, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "BILL13375649"); + orderRequest.put("method", "upi"); + + JSONObject bank_account = new JSONObject(); + bank_account.put("account_number", "765432123456789"); + bank_account.put("name", "Gaurav Kumar"); + bank_account.put("ifsc", "HDFC0000053"); + orderRequest.put("bank_account", bank_account); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.order.create({ + { + "amount": 500, + "method": "upi", + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }) + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('amount' => 100, 'method' => 'upi', 'currency' => 'INR', bank_account => array( 'account_number' => '765432123456789', 'name' => 'Gaurav Kumar', 'ifsc' => 'HDFC0000053'))); + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.Add("receipt", "receipt#1"); + options.Add("currency", "INR"); + options.Add("method", "upi"); + bank_account.account_number="765432123456789"; + bank_account.name="Gaurav Kumar"; + bank_account.ifsc="HDFC0000053"; + + options.Add("bank_account", bank_account); + + Order order = client.Order.Create(options); + + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', method: 'upi', bank_account: { account_number: '765432123456789', name: 'Gaurav Kumar', ifsc: 'HDFC0000053'} + ```js: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "INR", + receipt: "receipt#1", + method: 'upi', + bank_account: { + account_number: "765432123456789", + name: "Gaurav Kumar", + ifsc: "HDFC0000053" + } + }) + + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "method": "upi", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + } + body, err := client.Order.Create(data) + ```json: Response + { + "id": "order_GAWRjlWkVcRh0V", + "entity": "order", + "amount": 500, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044206 + } + ``` + + + + + + +### Scenario 2: Method Parameter is Not Passed + + If you want the investor to select any of the payment method, do not pass the `method` field. This way, they can choose netbanking, debit card or UPI to make the payment, as per their convenience. + + + + ```curl: Curl + curl -u : \ + -X POST https://api.razorpay.com/v1/orders \ + -H "Content-Type: application/json" \ + -d '{ + "amount": 500, + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + }' + + ```java: Java + RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + ArrayList Offer = new ArrayList(); + Offer.add("offer_JTUADI4ZWBGWur"); + + JSONObject orderRequest = new JSONObject(); + orderRequest.put("amount", 1000); // amount in the smallest currency unit + orderRequest.put("currency", "INR"); + orderRequest.put("receipt", "BILL13375649"); + + JSONObject bank_account = new JSONObject(); + bank_account.put("account_number", "765432123456789"); + bank_account.put("name", "Gaurav Kumar"); + bank_account.put("ifsc, "HDFC0000053"); + orderRequest.put("bank_account", bank_account); + + Order order = razorpayclient.orders.create(orderRequest); + System.out.print(order); + + ```python: Python + import razorpay + client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + + client.order.create({ + { + "amount": 500, + "receipt": "BILL13375649", + "currency": "INR", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + } + }) + + ```go: Go + import ( razorpay "github.com/razorpay/razorpay-go" ) + client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + + data := map[string]interface{}{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "bank_account": { + "account_number": "765432123456789", + "name": "Gaurav Kumar", + "ifsc": "HDFC0000053" + } + } + body, err := client.Order.Create(data, nil) + + ```php: PHP + $api = new Api($key_id, $secret); + + $api->order->create(array('amount' => 100, 'currency' => 'INR', bank_account => array( 'account_number' => '765432123456789', 'name' => 'Gaurav Kumar', 'ifsc' => 'HDFC0000053'))); + + ```ruby: Ruby + require "razorpay" + Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + + order = Razorpay::Order.create amount: 50000, currency: 'INR', receipt: 'receipt#1', bank_account: { account_number: '765432123456789', name: 'Gaurav Kumar', ifsc: 'HDFC0000053'} + + ```js: Node.js + var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + + instance.orders.create({ + amount: 50000, + currency: "INR", + receipt: "receipt#1", + bank_account: { + account_number: "765432123456789", + name: "Gaurav Kumar", + ifsc: "HDFC0000053" + } + }) + + ```csharp: .NET + RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + + Dictionary options = new Dictionary(); + options.Add("amount", 50000); // amount in the smallest currency unit + options.Add("receipt", "receipt#1"); + options.Add("currency", "INR"); + bank_account.account_number="765432123456789"; + bank_account.name="Gaurav Kumar"; + bank_account.ifsc="HDFC0000053"; + + options.Add("bank_account", bank_account); + + Order order = client.Order.Create(options); + + ```json: Response + { + "id": "order_GAWN9beXgaqRyO", + "entity": "order", + "amount": 500, + "amount_paid": 0, + "amount_due": 500, + "currency": "INR", + "receipt": "BILL13375649", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1573044247 + } + ``` + + + + + + #### Request and Response Parameters + + Create a request payload using the following attributes: + + + + +`amount` _mandatory_ +: `integer` The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, the value of this field should be `100`. + +`currency` _mandatory_ +: `string` The currency in which the transaction should be made. You can create Orders in **INR** only. + +`receipt` _optional_ +: `string` Receipt number that corresponds to this Order, set for your internal reference. Maximum length is 40 characters. + +`notes` _optional_ +: `json object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`method` _mandatory_ +: `string` The payment method used to make the payment. If this parameter is not passed, investors will be able to make payments using both netbanking and UPI payment methods. Possible values: + - `netbanking`: Investors can make payments only using netbanking. + - `card`: Investors can make payments using debit card. + - `upi`: Investors can make payments only using UPI. + +`bank_account` +: Details of the bank account that the investor has provided at the time of registration. + + `account_number` _mandatory_ + : `string` The bank account number from which the investor should make the payment. For example, `765432123456789` Payments will not be processed for an incorrect account number. + + `name` _mandatory_ + : `string` The name linked to the bank account. For example, `Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` The bank IFSC. For example, `HDFC0000053`. + + + + +`id` +: `string` Unique identifier of the payment. + +`entity` +: `string` Indicates the type of entity. Here, it is order. + +`amount` +: `integer` The payment amount represented in the smallest unit of the currency passed. For example, amount = 100 translates to 100 paise, that is ₹1 (default currency is INR). + +`amount_paid` +: `integer` The amount that has been paid. + +`amount_due` +: `integer` The amount that is yet to be paid. + +`currency` +: `string` The 3-letter ISO currency code for the payment. Currently, we only support INR. + +`receipt` +: `string` A unique identifier of the order entered by the user. For example, `BILL13375649`. + +`status` +: `string` The status of the order. + +`notes` +: `object` Key-value pair you can use to store additional information about the entity. Maximum of 15 key-value pairs, 256 characters each. For example, "note_key": "Beam me up Scotty”. + +`created_at` +: `integer` The Unix timestamp at which the order was created. + +`offer_id` +: `string` Unique identifier of the offer. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + + + + + +### 1.3 Add Checkout Code + + Send the `order_id` obtained in the response of the previous step along with the other Checkout attributes to trigger Razorpay Checkout. + + Following are two sample codes for Checkout: + + + - On successful payment, your web page is displayed to the user. +- On payment failure, the customer is notified of the reason for failure and requested to retry the payment. + + + + - On successful payment, the customer is redirected to the specified URL. For example, a payment success page. +- On payment failure, the customer is requested to retry payment at Checkout. + + + + + Copy-paste the form parameters as `options` in your HTML code: + + ```html: Checkout with Handler Function + Pay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise + "currency": "INR", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_Dd3Wbag7QXDuuL", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature) + }, + "prefill": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + }); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ```html: Checkout with Callback URL + Pay + + + var options = { + "key": "YOUR_KEY_ID", // Enter the Key ID generated from the Dashboard + "amount": "50000", // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise + "currency": "INR", + "name": "Acme Corp", + "description": "Test Transaction", + "image": "https://example.com/your_logo", + "order_id": "order_Dd3Wbag7QXDuuL", //This is a sample Order ID. Pass the `id` obtained in the response of Step 1 + "callback_url": "https://eneqd3r9zrjok.x.pipedream.net/", + "prefill": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000" + }, + "notes": { + "address": "Razorpay Corporate Office" + }, + "theme": { + "color": "#3399cc" + } + }; + var rzp1 = new Razorpay(options); + document.getElementById('rzp-button1').onclick = function(e){ + rzp1.open(); + e.preventDefault(); + } + + ``` + + Know more about the[ Checkout Form Fields](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard/integration-steps.md#checkout-options). + + +> **INFO** +> +> +> **Handy Tips** +> +> - The open method of the Razorpay object (`rzp1.open()`) should be invoked by your site's JavaScript. This may or may not be a user-driven action such as a click. +> - UPI Intent Apps will appear on the standard checkout if the method is `upi` in the Orders API. +> + + + + +### 1.4 Handle Payment Success and Failure + + The way you handle payment success and failure scenarios depends on the Checkout sample code you opted for in the previous step. + + #### Checkout with Handler Function + + If you used **Sample Code with Handler Function**: + + + + Investor sees your application web page, and the Checkout returns the response object of the successful payment (`razorpay_payment_id`, `razorpay_order_id` and `razorpay_signature`). You need to collect these and send them to your server. + + ```js: Success Handling Code + "handler": function (response){ + alert(response.razorpay_payment_id); + alert(response.razorpay_order_id); + alert(response.razorpay_signature)} + ``` + + + On payment failure, the investor is notified about the reason for failure and requested to retry the payment. + + ```js: Failure Handling Code + rzp1.on('payment.failed', function (response){ + alert(response.error.code); + alert(response.error.description); + alert(response.error.source); + alert(response.error.step); + alert(response.error.reason); + alert(response.error.metadata.order_id); + alert(response.error.metadata.payment_id); + } + ``` + + Know more about[ the error parameters.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md#response-parameters) + + + + #### Checkout with Callback URL + + If you used the **Sample Code with the Callback URL**: + + + + When you use a Callback URL, the response object of the successful payment (`razorpay_payment_id`,`razorpay_order_id` and `razorpay_signature`) is submitted to the Callback URL. Only successful authorisations are auto-submitted. + + + In case of failed payments, the Checkout Form is displayed again for payment retry. + + + + + +### 1.5 Store Fields in Your Server + + A successful payment returns the following fields to the Checkout form. + + + Success Callback + +- You need to store these fields in your server. +- You can confirm the authenticity of these details by verifying the signature in the next step. + +```json: Success Callback +{ + "razorpay_payment_id": "pay_29QQoUBi66xm2f", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" +} +``` + +`razorpay_payment_id` +: `string` Unique identifier for the payment returned by Checkout **only** for successful payments. + +`razorpay_order_id` +: `string` Unique identifier for the order returned by Checkout. + +`razorpay_signature` +: `string` Signature returned by the Checkout. This is used to verify the payment. + + + + + +### 1.6 Verify Signature + + This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments. + + + To verify the `razorpay_signature` returned to you by the Checkout form: + + 1. Create a signature in your server using the following attributes: + - `order_id`: Retrieve the `order_id` from your server. Do not use the `razorpay_order_id` returned by Checkout. + - `razorpay_payment_id`: Returned by Checkout. + - `key_secret`: Available in your server. The `key_secret` that was generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys). + + 2. Use the SHA256 algorithm, the `razorpay_payment_id` and the `order_id` to construct a HMAC hex digest as shown below: + + ```html: HMAC Hex Digest + generated_signature = hmac_sha256(order_id + "|" + razorpay_payment_id, secret); + + if (generated_signature == razorpay_signature) { + payment is successful + } + ``` + + 3. If the signature you generate on your server matches the `razorpay_signature` returned to you by the Checkout form, the payment received is from an authentic source. + + + +### Generate Signature on Your Server + +Given below is the sample code for payment signature verification: + +```java: Java +RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +String secret = "EnLs21M47BllR3X8PSFtjtbd"; + +JSONObject options = new JSONObject(); +options.put("razorpay_order_id", "order_IEIaMR65cu6nz3"); +options.put("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.put("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"); + +boolean status = Utils.verifyPaymentSignature(options, secret); + +```php: PHP +$api = new Api($key_id, $secret); + +$api->utility->verifyPaymentSignature(array('razorpay_order_id' => $razorpayOrderId, 'razorpay_payment_id' => $razorpayPaymentId, 'razorpay_signature' => $razorpaySignature)); + +```ruby: Ruby +require "razorpay" +Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET') + +payment_response = { + razorpay_order_id: 'order_IEIaMR65cu6nz3', + razorpay_payment_id: 'pay_IH4NVgf4Dreq1l', + razorpay_signature: '0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f' + } +Razorpay::Utility.verify_payment_signature(payment_response) + +```python: Python +import razorpay +client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET")) + +client.utility.verify_payment_signature({ + 'razorpay_order_id': razorpay_order_id, + 'razorpay_payment_id': razorpay_payment_id, + 'razorpay_signature': razorpay_signature + }) + +```c: .NET +RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +Dictionary options = new Dictionary(); +options.Add("razorpay_order_id", "order_IEIaMR65"); +options.Add("razorpay_payment_id", "pay_IH4NVgf4Dreq1l"); +options.Add("razorpay_signature", "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50"); + +Utils.verifyPaymentSignature(options); + +```nodejs: Node.js +var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' }) + +var { validatePaymentVerification, validateWebhookSignature } = require('./dist/utils/razorpay-utils'); +validatePaymentVerification({"order_id": razorpayOrderId, "payment_id": razorpayPaymentId }, signature, secret); + +```Go: Go +import ( razorpay "github.com/razorpay/razorpay-go" ) +client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET") + +params := map[string]interface{}{ + "razorpay_order_id": "order_IEIaMR65cu6nz3", + "razorpay_payment_id": "pay_IH4NVgf4Dreq1l", +} + +signature := "0d4e745a1838664ad6c9c9902212a32d627d68e917290b0ad5f08ff4561bc50f"; +secret := "EnLs21M47BllR3X8PSFtjtbd"; +utils.VerifyPaymentSignature(params, signature, secret) +``` + + + + +### Post Signature Verification + +After you have completed the integration, you can [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md), make test payments, replace the test key with the live key and integrate with other [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md). + + + + + +## 2. Test Integration + +After the integration is complete, a **Pay** button will appear on your webpage/app. + +Click the button and make a test transaction to ensure the integration is working as expected. You can start accepting actual payments from your customers once the test is successful. + +You can make test payments using netbanking, card or UPI payment methods configured at the Checkout. + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mock payment page that uses your test API keys, test card and payment details. +> - Ensure you have entered only your [Test Mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md#generate-api-keys) in the Checkout code. +> - Test mode features a mock bank page with **Success** and **Failure** buttons to replicate the live payment experience. +> - No real money is deducted due to the usage of test API keys. This is a simulated transaction. +> + +## 3. Go-Live + +Consider these steps before taking the integration live. + + +### 3.1 Accept Live Payments + + Perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are switching your test API keys with API keys generated in Live Mode. +> + +To generate API Keys in Live Mode on your Razorpay Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Payment Capture + + After payment is `authorised`, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time. + + +> **WARN** +> +> +> +> **Watch Out** +> +> - You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments. +> - You can track the payment status using our [Fetch a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#fetch-a-payment) or webhooks. +> + + #### How to Capture Payments + + - **Auto-capture payments (recommended)** + +Authorised payments can be automatically captured. You can auto-capture all payments [using global settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) on the Dashboard. + +> **WARN** +> +> +> **Watch Out!** +> +> Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md#create-an-order). +> + + - **Manually capture payments** + +Each authorised payment can also be captured individually. You can manually capture payments using: + - [Payment Capture API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) + - [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/dashboard.md#manually-capture-payments) + + Know more about [Capture Settings for payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + + + Dashboard: + +1. Log in to the Razorpay Dashboard and switch to **Live Mode** on the menu. +1. Navigate to **Account & Settings** → **API Keys** → **Generate Key** to generate the API Key for Live Mode. +1. Download the keys and save them securely. +1. Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments. + + + + +### 3.2 Set Up Webhooks + + Ensure you have [set up webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) in the live mode and configured the events for which you want to receive notifications. + + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + + + + + + +### Related Information + +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) (Recommended) +- [Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors.md) (Recommended) +- [How Payment Gateway Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md) +- [Payment States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments.md) +- [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md) +- [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds.md) diff --git a/llm-content/payments/third-party-validation/troubleshooting-faqs.md b/llm-content/payments/third-party-validation/troubleshooting-faqs.md new file mode 100644 index 00000000..c56a433b --- /dev/null +++ b/llm-content/payments/third-party-validation/troubleshooting-faqs.md @@ -0,0 +1,83 @@ +--- +title: Troubleshooting & FAQs +description: Troubleshoot common error scenarios and find answers to frequently asked questions. +--- + +# Troubleshooting & FAQs + +### 1. What is Third-Party Validation (TPV)? + + Third-Party Validation (TPV) of bank accounts is a mandatory requirement for merchants in securities, broking and mutual funds operating in the BFSI (Banking, Financial Services and Insurance) sector. + + As per Securities and Exchange Board of India (SEBI) guidelines, transactions must be made by the customers only from those bank accounts that were submitted to your business at the time of registration. + + + +### 2. What can cause an overflow issue on an HTML page, and how can I resolve it? + + Overflow issues can occur if the viewport meta tag is not present in your code. Check if the meta tag is added. If not, add the following line. + ```html: View Port Meta Tag + + ``` + + + +### 3. Is a timeout applicable on transactions? + + Transaction timeout is applicable only when your customer attempts the payment. It times out between 3 to 15 minutes. + + The customer is redirected to the checkout if a payment fails due to timeout. + + + +### 4. Can I track the status of the checkout modal? + + Yes, you can track the status of the checkout modal. You can do this by passing a modal object with `ondismiss: function(){}` as `options`. The `ondismiss` function is called when the modal is closed by the user. + + ```javascript: Javascript + var options = { + "key": "", // Enter the Key ID generated from the Dashboard + "amount": "29935", + "name": "Acme Corp", + "description": "A Wild Sheep Chase is the third novel by Japanese author Haruki Murakami", + "order_id": "order_Dd3Wbag7QXDuuL", + "image": "http://example.com/your_logo.jpg", + "handler": function (response){ + alert(response.razorpay_payment_id); + }, + /** + * You can track the modal lifecycle by * adding the below code in your options + */ + "modal": { + "ondismiss": function(){ + console.log('Checkout form closed'); + } + } + }; + var rzp1 = new Razorpay(options); + ``` + You can utilise the `handler` function called on every successful transaction for tracking payment completion. + + + +### 5. What is the difference between webhooks and callback URLs? + + You can use the Callback URL and webhook to get the status of the transaction for a payment source. + + + Particulars | Webhooks | Callback URL + --- + About | Webhooks allow you to build or set up integrations that subscribe to certain events on Razorpay APIs. When one of those events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. + Know more about [webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). | A callback URL is an address that a server provides, and any computer in the Internet/private network can POST data to it. For Razorpay integrations, the callback URL is the address at which Razorpay should send the transaction response. You can pass the URL in the `https://` format in the `callback_url` request parameter. Know more about [callback URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/callback-url.md). + --- + When to use | Use webhooks to receive real-time notifications when specific events occur. For example, receive notifications upon payment failure.| Use callback URL to redirect your customers to a particular page. For example: + - You can send customers to a payment success page after successful payment. This page will receive payment details such as the payment id. +- The Razorpay Checkout pop-up page does not appear in certain browsers, for example, on Facebook and Instagram browsers. In such cases, you can use the callback URL to redirect customers from your Facebook/Instagram page to another page where the Razorpay Checkout appears. Customers can complete the payments on this redirected page. + + + + + +### 6. How do I resolve a 500 internal server error? + + Multiple factors can cause a 500 internal server error. Ensure that the required features are enabled on your MID. Additionally, verify that you are calling the API correctly. If the issue is still not resolved, contact our [Support team.](https://razorpay.com/support/#request) diff --git a/llm-content/payments/tpap-pro.md b/llm-content/payments/tpap-pro.md new file mode 100644 index 00000000..8436e736 --- /dev/null +++ b/llm-content/payments/tpap-pro.md @@ -0,0 +1,35 @@ +--- +title: About TPAP Pro +description: Razorpay TPAP Pro as a service solution empowers businesses to transform into UPI TPAPs. Check TPAP flows and how to integrate. +--- + +# About TPAP Pro + +The Razorpay TPAP Pro (Third Party Application Provider) as a service solution empowers businesses to transform into UPI TPAPs. It addresses critical challenges faced by TPAPs, unlocking flexibility, innovation and enhanced success rates. + +With this solution, businesses can become a full scope P2P+P2M UPI app via Razorpay's seamless integration. Users on these business apps will be able to access all the features of a UPI app such as onboard onto UPI, send money, receive money, scan and pay, manage accounts and handle mandates and complaints. + + +### Features + + - **Next-Gen Tech Stack:** Scale effortlessly to handle 10,000 transactions per second with sub-100ms latency. + - **On-Cloud Hosted Model:** Experience exceptional operational continuity (99.99%) with a cloud-based model, deployed at Razorpay. + - **Multi-Bank Powerhouse:** Integrate once, go live with lightning speed across multiple Razorpay-powered banks on Switch. + - **GTM Partner:** Breeze through your NPCI certification with Razorpay, your trusted go-to-market partner. + + +## TPAP Pro Supported Flows + +Following are the TPAP Pro supported flows: + +- [Customer Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md#customer-onboarding) +- [Manage Funds and Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md#funds-and-accounts-management) +- [Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md#payments) +- [Manage Mandates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md#mandates) +- [Complaints API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md#complaints-api) +- [UPI Mapper](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md#upi-mapper) +- [Credit Card on UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md#credit-card-on-upi) +- [UPI One-time Mandate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md#upi-one-time-mandate) +- [Credit Lines on UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md#credit-lines-on-upi) +- [UPI Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md#upi-lite) +- [Global UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/tpap-pro/integration-guide.md#global-upi) diff --git a/llm-content/payments/tpap-pro/integration-guide.md b/llm-content/payments/tpap-pro/integration-guide.md new file mode 100644 index 00000000..3a1bde7c --- /dev/null +++ b/llm-content/payments/tpap-pro/integration-guide.md @@ -0,0 +1,233 @@ +--- +title: Integrate With TPAP Pro +description: Step-by-step guide on how to integrate with TPAP Pro. +--- + +# Integrate With TPAP Pro + +Integrate TPAP Pro by following these steps: + +1. [Integrate TPAP Pro Flows](#1-tpap-pro-flows) +2. [Follow Go-live checklist](#2-follow-go-live-checklist) + +## 1. TPAP Pro Flows + +Following are the flows available on our TPAP stack: + + +### Customer Onboarding + + Customer onboarding is a process of binding and registering the customer device by validating the mobile number. The customer's payment sources are linked to ensure seamless and hassle-free transactions. Additionally, You must create a fingerprint that acts as a unique identifier generated based on various attributes of the device. Know more about [customer onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/customer-onboarding.md). + + + + Create a Device Fingerprint + + Create an unique identifier using various attributes of the device. This identifier is used to recognise the specific device during subsequent transactions. + + To generate a device fingerprint for the customer: + 1. Create a string with the following fields separated by a pipe (|). + + + Attributes | Description + --- + SSID | A sim subscriber id from the native sim module. + --- + APP.ID | The package name of the app. + --- + device.UUID | The advertisement id on Android. + --- + mobile_number | Customer’s phone number present on the device. + --- + customer_reference | The customer reference. + --- + timestamp | The current time in the UNIX timestamp. Ensure to pass the same timestamp in the request header for `x-device-fingerprint-timestamp`. + + + ```html: Code + SSID|APP.ID|device.UUID|mobile_number|merchantCustomerId|timestamp + ``` + 2. Hash this string using the SHA-256 algorithm. + + ```java: Java + deviceFingerprintPayload = + ""MessageDigest digest = MessageDigest.getInstance("SHA-256"); + byte[] deviceFingerprint = digest.digest(deviceFingerprintPayload.getBytes(StandardCharsets.UTF_8)); + ``` + 3. Send the timestamp within the headers. + + + +### Device Binding Status + + The following table lists the different device binding status and their description. Know more about [device binding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/customer-onboarding/bind-device.md). + + Status | Step | Description + --- + `mobile_verification_pending` | mobile_verification | The mobile number verification is still pending by the receiver. This means the PSP is yet to receive a callback from the entity that is supposed to verify the number. You must poll the API again. + --- + `mobile_verification_expired` | mobile_verification | PSP did not receive a callback from the entity that is supposed to verify the number within the expiry time. Hence, the device binding has expired. This is a terminal failure status, and you must stop polling. + --- + `mobile_verification_mismatch` | mobile_verification | The customer mobile number received from the entity that is supposed to verify the number differs from the one you passed. This is a terminal failure status, and you can stop polling. + --- + `verified` | mobile_verification | The verification is successful. + --- + `mobile_verification_failed` | mobile_verification | The mobile verification is failed due to the invalid device details. + --- + `device_already_verified` | device_binding | The device is already verified. + + + + + + + +### Funds and Accounts Management + + Funds and accounts management helps you manage payment sources and providers. The Razorpay APIs let you add more accounts, delete existing accounts and change PINs for accounts for hassle-free transactions. Know more about [managing funds and accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/funds-account-management.md). + + + +### Payments + + The Payment module enables you to make various transactions using payment APIs. Below are the supported transaction types: + - [Make Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/payments-flow/make-payments.md): Facilitate P2P (peer-to-peer) or P2M (peer-to-merchant) payments. The supported payment transfer types are: + - Pay from a VPA to VPA. + - Pay from a VPA to a payment source. + - Pay from a payment source to a VPA. + - Pay from one payment source to another. + + This API lets you enable the following payment options for customers: + - **Scan and Pay (UPI QR & Bharat QR):** Customers can QR codes and make payments. + - **Intent Payment:** Customers can make payment through an intent link. + - **Payment to a PSP merchant:** Customers can make a payment using the merchant VPA. + - **P2P Pay (VPA and Account+IFSC):** A person can pay to another person using a TPAP. + - **Self Pay:** Customers can make transactions between their own accounts. + - [Collect Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/payments-flow/collect-payments.md): This API lets you collect payments from others. + - [Approve Collect Requests](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/payments-flow/approve-collect-requests.md): This API lets you approve payment collect requests. + - [Reject Collect Requests](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/payments-flow/reject-collect-requests.md): This API lets you reject payment collect requests. + + + +### Mandates + + You can create and manage mandates using the Razorpay APIs. Know more about [managing mandates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/tpap-pro/mandate-flow.md). + + + +### Complaints API + + The Complaints API enables efficient handling of transaction-related issues. + + + Raise Complaint + + Submit complaints about transactions to ensure prompt resolution. + + + +### Check Complaint Status + + Track the progress and status of submitted complaints. + + + + + + +### UPI Mapper + + UPI Mapper provides a 1:1 mapping between VPAs and mobile or UPI numbers, enabling efficient and streamlined identification. + + + +### Credit Card on UPI + + Enable credit card payments via UPI for enhanced flexibility. All features of account management apply to credit cards as well. + + + +### UPI One-time Mandate + + Authorise one-time payments for specific transactions, offering greater flexibility and control. + + + +### Credit Lines on UPI + + Enable transactions using pre-approved credit lines, helping users manage finances more effectively. + + + +### UPI Lite + + Support low-value transactions with a simplified process, ensuring quick and seamless payments. + + + + Activation of Lite Service + + The user enables UPI Lite through their UPI app, and the request is processed via PSP, NPCI, and the bank, ensuring activation. + ![TPAP Pro UPI Lite Activation Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/tpap-upilite-activation.jpg.md) + + + +### Payment via UPI Lite + + The user makes a low-value transaction using UPI Lite, where the amount is deducted instantly from their Lite balance without requiring bank authentication. + ![Payment VIA UPI Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-via-upilite.jpg.md) + + + +### Disabling UPI Lite Service with Non-Zero Balance + + If the user disables UPI Lite with a remaining balance, the amount is credited back to their linked bank account before deactivation. + ![Disabling UPI Lite Service with Non-Zero Balance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/disabling-upilite-services.jpg.md) + + + + + + +### Global UPI + + Enable international UPI payments, making cross-border transactions smooth and hassle-free. + + +## 2. Follow Go-live Checklist + +Consider the following steps before taking your integration live. + + +### Switch Test API Keys With Live API Keys + + After confirming if your integration is working successfully, you can take the integration live by switching the Test Mode API Keys with the Live Mode Keys. + + Watch this video to know how to generate Live API keys: + + +[Video: https://www.youtube.com/embed/30REpNtYSak?si=j9Lm_y-D4bwTspv6] + + + + +### Subscribe to Webhooks + + [Set up Razorpay Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL. + + +## Header Information + +Below are the headers you should pass while polling different APIs. + +Header Name | Data Type | Mandatory/Optional | Description +--- +Authorisation | string | Mandatory | The standard authorisation. +--- +Content Type | string | Mandatory | The content type. Supported value: `application/json`. +--- +x-device-fingerprint | string | Mandatory | The device fingerprint used to validate the request coming from the expected device. +--- +x-device-fingerprint-timestamp | string | Mandatory | The UNIX timestamp to generate the device fingerprint. +--- +x-customer-reference | string | Mandatory | The unique identifier of the customer created by TPAP. diff --git a/llm-content/payments/wallet.md b/llm-content/payments/wallet.md new file mode 100644 index 00000000..de93247e --- /dev/null +++ b/llm-content/payments/wallet.md @@ -0,0 +1,35 @@ +--- +title: Razorpay White Label Wallet +description: Overview about Razorpay White Label Wallet +--- + +# Razorpay White Label Wallet + +> **WARN** +> +> +> **Watch Out!** +> +> We have discontinued support for this product, effective April 2023. As a result, we will not be onboarding new users for this product anymore. +> + +Razorpay White Label Wallet enables you to launch your own closed wallet using Razorpay APIs for a white-labeled solution. Razorpay wallet allows you to: + +- Load money into a wallet +- Accept payments from a wallet +- Refund payments to a wallet +- Send cashbacks to a wallet + +## Get Started + +Follow the below steps to create Razorpay Wallet: + +1. [Create a Customer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md#create-a-customer): You must create a customer before creating a wallet. You can create a customer using the Dashboard or APIs. After creating a customer, a unique `customer_id` will be generated. You can use the `customer_id` parameter to manage the customer's wallet using APIs. +2. [Load money into a wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/wallet-operations.md#load-a-wallet): After you load money for a customer, the first time, a wallet is created. + +After completing the above steps, you can start [accepting payments from the wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/wallet-operations.md#accept-payments-from-a-wallet). For more operations on the wallet, refer to the [Wallet Operations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/wallet-operations.md) page. + +### Related Information + +- [Wallet Operations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/wallet-operations.md) +- [Payments Wallet API Reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/api-reference.md) diff --git a/llm-content/payments/wallet/api-reference.md b/llm-content/payments/wallet/api-reference.md new file mode 100644 index 00000000..aa28e131 --- /dev/null +++ b/llm-content/payments/wallet/api-reference.md @@ -0,0 +1,1096 @@ +--- +title: API Reference +description: Check the Razorpay Wallet APIs. +--- + +# API Reference + +> **WARN** +> +> +> **Watch Out!** +> +> We have discontinued support for this product, effective April 2023. As a result, we will not be onboarding new users for this product anymore. +> + +Refer to the [API Reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md) guide to understand the basic concepts of API. + +> **INFO** +> +> +> **Handy Tips** +> +> Before creating a wallet, you must create a [customer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md#create-a-customer). +> + +## Transfer a Payment + +Use the below endpoint to transfer a payment to a customer's wallet. If the customer wallet entity does not exist, the `transfers` endpoint creates a wallet for a `customer_id`. The amount which you transfer gets credited to this wallet. + +/payments/:id/transfers + +When the request is successful, the wallet gets credited with the transferred amount and the corresponding `customer_transaction` and `transfer` entities are created. + +The following validations apply to the payment transfer request: +- The transfer amount can be set to a value less than or equal to the payment amount captured. +- The transfer amount is debited from your account balance. The transfer will fail if there is insufficient balance. +- You can only request for a transfer to one `customer_id` in an API call. +- The transfer request fails if the `customer_id` provided is invalid or does not exist. + +> **WARN** +> +> +> **Watch Out!** +> +> The wallet is created only if the customer’s contact number is a valid Indian mobile number, failing which, an error is returned. +> + +```curl: Request +curl -X POST https://api.razorpay.com/v1/payments/pay_00000000000001/transfers \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H 'content-type: application/json' \ +-d '{ + "transfers": [ + { + "customer": "cust_MrZYbZYSmbUxz9", + "amount": 100, + "currency": "INR", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey decaf" + } + } + ] +}' +```json: Response +{ + "entity": "collection", + "count": 1, + "items": [ + { + "id": "trf_N1vfI74toJ5WU0", + "entity": "transfer", + "status": "created", + "source": "pay_MrZifnGzMM6V3W", + "recipient": "cust_MrZYbZYSmbUxz9", + "amount": 100, + "currency": "INR", + "amount_reversed": 0, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey decaf" + }, + "linked_account_notes": [], + "on_hold": false, + "on_hold_until": null, + "recipient_settlement_id": null, + "created_at": 1700308808, + "processed_at": null, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_N1vfI74toJ5WU0", + "source": null, + "metadata": null + } + } + ] +} +``` + +#### Path Parameters + +`id` _mandatory_ +: `string` Unique identifier for the payment which you want to transfer to the wallet. For example, `pay_00000000000001`. + +#### Request Parameters + +`transfers` +: Details regarding the transfer. + + `customer` _mandatory_ + : `string` Unique identifier of the customer to whom the wallet is linked. + + `amount` _mandatory_ + : `integer` The amount to be transferred to the linked account. For an amount of ₹200.35, pass `20035`. + + `currency` _mandatory_ + : `string` The currency in which the transfer should be made. We support only `INR` for Route transactions. + + `notes` _optional_ + : `object` Key-value pairs you can attach to an entity for internal reference. Maximum 15 pairs, 256 characters each. For example,`"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`id` +: `string` Unique identifier of the transfer. For example, `trf_00000000000001`. + +`entity` +: `string` The name of the entity. Here, it is `transfer`. + +`status` +: `string` The status of the transfer. Possible values: + - `created` + - `processed` + - `failed` + + +> **WARN** +> +> +> **Watch Out!** +> +> The values `processed` and `failed` are relevant only for users who have subscribed to specific webhooks. Ensure that you have subscribed to the following webhooks to utilize these values: +> - `transfer_processed` +> - `transfer_failed` +> + +`source` +: `string` Unique identifier of the transfer source. For example, `pay_00000000000001`. + +`recipient` +: `string` Unique identifier of the customer to whom the transfer was made. For example, `cust_00000000000001`. + +`amount` +: `integer` The amount, in paise, to be transferred to the wallet. For an amount of ₹200.35, pass `20035`. + +`currency` +: `string` 3-letter ISO currency code for the transfer. Currently, we only support `INR`. + +`amount_reversed` +: `integer` Amount reversed from this transfer for refunds. + +`fees` +: `integer` Fees, in paise, charged for the transfer. `500` means ₹5. + +`tax` +: `integer` Tax, in paise, deducted for the fee charged. `200` means ₹2. + +`notes` +: `json object` Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "bangalore"`. + +`linked_account_notes` +: `array` List of keys from the `notes` object which needs to be shown to linked accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + +`on_hold` +: `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + +`on_hold_until` +: `integer` Timestamp, in Unix, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, and `on_hold` = 1, the settlement is put on hold indefinitely. + +`recipient_settlement_id` +: `string` Unique identifier of the settlement. + +`created_at` +: `integer` Timestamp, in Unix, at which the record was created. For example, `1462887226`. + +#### Webhooks + +The table below lists the Webhook events you can subscribe for this API: + +Webhook Event | Description +--- +`transfer.processed` | Triggered when a transfer made to a Linked Account is processed. +--- +`transfer.failed` | Triggered when a transfer made to a Linked Account has failed. + +#### Sample Payloads + +```json: Transfer Processed +{ + "entity": "event", + "account_id": "acc_MDbiQ3Ryz14HMM", + "event": "transfer.processed", + "contains": [ + "transfer" + ], + "payload": { + "transfer": { + "entity": { + "id": "trf_N1vfI74toJ5WU0", + "entity": "transfer", + "status": "processed", + "source": "pay_MrZifnGzMM6V3W", + "recipient": "cust_MrZYbZYSmbUxz9", + "amount": 100, + "currency": "INR", + "amount_reversed": 0, + "fees": 0, + "tax": 0, + "notes": { + "notes_key_1": "transfer2" + }, + "linked_account_notes": [], + "on_hold": false, + "on_hold_until": null, + "settlement_status": null, + "recipient_settlement_id": null, + "created_at": 1700308808, + "processed_at": null, + "error": { + "code": null, + "description": null, + "reason": null, + "field": null, + "step": null, + "id": "trf_N1vfI74toJ5WU0", + "source": null, + "metadata": null + } + } + } + }, + "created_at": 1700308808 +} + +```json: Transfer Failed +{ + "entity": "event", + "account_id": "acc_MDbiQ3Ryz14HMM", + "event": "transfer.failed", + "contains": [ + "transfer" + ], + "payload": { + "transfer": { + "entity": { + "id": "trf_N1vfI74toJ5WU0", + "entity": "transfer", + "status": "processed", + "source": "pay_MrZifnGzMM6V3W", + "recipient": "cust_MrZYbZYSmbUxz9", + "amount": 100, + "currency": "INR", + "amount_reversed": 0, + "fees": 0, + "tax": 0, + "notes": { + "notes_key_1": "transfer2" + }, + "linked_account_notes": [], + "on_hold": false, + "on_hold_until": null, + "settlement_status": null, + "recipient_settlement_id": null, + "created_at": 1700308808, + "processed_at": null, + "error": { + "code": "BAD_REQUEST_TRANSFER_INSUFFICIENT_BALANCE", + "description": "Transfer failed due to insufficient balance", + "reason": "insufficient_balance", + "field": null, + "step": "balance_check", + "id": "trf_N1vfI74toJ5WU0", + "source": "transfer", + "metadata": null + } + } + } + }, + "created_at": 1700308808 +} +``` + +## Create a Payment to a Customer's Wallet + +To create a payment to a wallet, you must: +1. [Create an Order](#create-an-order) +1. [Create a Payment](#create-a-payment) + +### Create an Order + +Use the below endpoint to create an order. + +/orders + +```cURL: Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X POST https://api.razorpay.com/v1/orders \ +-H "content-type: application/json" \ +-d '{ + "amount": 50000, + "currency": "INR", + "receipt": "receipt#1", + "payment_capture": true, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' +```json: Response +{ + "id": "order_EKwxwAgItmmXdp", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "receipt#1", + "offer_id": null, + "status": "created", + "attempts": 0, + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + }, + "created_at": 1582628071 +} +``` + +#### Request Parameters + +Following are the parameters to be sent in the request body: + +`amount` _mandatory_ +: `integer` The amount, in paise. For example, enter `69999` for ₹699.99. + +`currency` _mandatory_ +: `string` 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` _optional_ +: `string` Maximum 40 characters. User-entered reference for the order. + +`payment_capture` _mandatory_ +: `boolean` Determines if payment should be automatically captured. Possible values: + - `true` (recommended): Automatically capture the payment. + - `false` (default/not recommended): You have to manually capture payments. + +Know more about [payment capture settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md). + +`notes` _optional_ +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`id` +: `string` The unique identifier of the Order. For example, `order_Fa8N7puWEjpoQN`. + +`entity` +: `string` Here, it is `order`. + +`amount` +: `integer` The amount, in paise. For example, `69999` means ₹699.99. + +`amount_paid` +: `integer` The amount, in paise, paid against the Order. + +`amount_due` +: `integer` The amount, in paise, pending against the Order. + +`currency` +: `string` 3-letter ISO currency code for the payment. Currently, we only support `INR`. + +`receipt` +: `string` User-entered reference for the order. + +`offer_id` +: `string` Unique identifier of offers linked to the order. + +`status` +: `string` The status of the Order. Possible values: + - `created`: When you create an order it is in the `created` state. It stays in this state till a payment is attempted on it. + - `attempted`: An order moves from `created` to `attempted` state when a payment is first attempted on it. It remains in the `attempted` state till one payment associated with that order is captured. + - `paid`: After the successful capture of the payment, the order moves to the `paid` state. No further payment requests are permitted once the order moves to the `paid` state. The order stays in the `paid` state even if the payment associated with the order is refunded. + +`attempts` +: `integer` The number of payment attempts, successful and failed, that have been made against this order. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`created_at` +: `integer` Timestamp, in Unix, when this Order was created. + +### Create a Payment + +Use the below endpoint to create a payment for a wallet. + +/payments/create/openwallet + +> **WARN** +> +> +> **Customer Wallet Balance** +> +> If the customer's wallet has an insufficient balance for the requested payment, the API returns an error. The customer must [load sufficient amount in the wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/wallet-operations.md#load-a-wallet) to complete the transaction. +> + +```curl: Request +curl -X POST https://api.razorpay.com/v1/payments/create/openwallet \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H 'content-type: application/json' \ +-d '{ + "method": "wallet", + "wallet": "openwallet", + "customer_id": "cust_FVjPW3o1BxxOsa", + "order_id": "order_Fa8AceMp2VLhZs", + "amount": 5000, + "currency": "INR", + "contact": "9876543210", + "email": "gaurav.kumar@example.com", + "description": "Against order #1", + "notes": { + "notes_key_1":"Tea, Earl Grey, Hot", + "notes_key_2":"Tea, Earl Grey… decaf." + } +}' +```json: Response +{ + "razorpay_payment_id": "pay_Fa8AvBnnHXH0UZ", + "razorpay_order_id": "order_Fa8AceMp2VLhZs", + "razorpay_signature": "ebfc4102fc6351218e8af613235918fae4cf2ad00004781ed3fdfb35eb889f69" +} +``` + +#### Request Parameters + +`method` _mandatory_ +: `string` Here, it must be `wallet`. + +`wallet` _mandatory_ +: `string` Here, it must be `openwallet`. + +`customer_id` _mandatory_ +: `string` Unique identifier linked to the customer. For example, `cust_00000000000001`. + +`order_id` _mandatory_ +: `string` Unique identifier of the order created. For example, `order_00000000000001`. + +`amount` _mandatory_ +: `integer` Payment amount in the smallest currency subunit. For example, if the amount to be charged is ₹299, then pass `29900` in this field. + +`currency` _mandatory_ +: `string` 3-letter ISO code for the currency for the payment. You can make payments in **INR** only. + +`contact` _mandatory_ +: `string` Contact number of the customer. For example, `9876543210`. + +`email` _mandatory_ +: `string` email ID of the customer. For example, `gaurav.kumar@example.com`. + +`description` _optional_ +: `string` Description about the payment. For example, `Payment for seaweed`. + +`notes` _optional_ +: `object` Key-value pairs you can attach to an entity for internal reference. Maximum 15 pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameter + +`razorpay_payment_id` +: `string` Unique identifier of the created payment. For example, `pay_00000000000001`. + +`razorpay_order_id` +: `string` Unique identifier of the order. For example, `order_00000000000001`. + +`razorpay_signature` +: `string` Signature for the payment. This can be used to verify the payment. For example, `ebfc4102fc6351218e8af613235918fae4cf2ad00004781ed3fdfb35eb889f69`. + +## Refund to a Wallet + +Use the below endpoint to refund a payment made using the wallet. + +/payments/:id/refund + +```curl: Request +curl -X POST https://api.razorpay.com/v1/payments/pay_00000000000001/refund \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H 'content-type: application/json' \ +-d '{ + "amount": 50000, + "receipt": "Receipt #1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' +```json: Response +{ + "id": "rfnd_Fa8V6BCLMChVOg", + "entity": "refund", + "amount": 500, + "currency": "INR", + "payment_id": "pay_Fa8AvBnnHXH0UZ", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "receipt": "Receipt #1", + "acquirer_data": {}, + "created_at": 1599480881, + "batch_id": null, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "normal" +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the payment which is to be refunded. For example, `pay_00000000000001`. + +#### Request parameter + +`amount` _optional_ +: `integer` The refund amount, in paise. Pass `50000` to refund ₹500. + +`receipt` _optional_ +: `string` The unique identifier provided by you for your internal reference. For example, `Receipt #1`. + +`notes` _optional_ +: `object` Key-value pairs you can attach to an entity for internal reference. Maximum 15 pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +#### Response Parameter + +`id` +: `string` Unique identifier of the refund. For example, `rfnd_EcRsvf2ayIF9mE`. + +`entity` +: `string` Indicates the type of entity. Here, it is `refund`. + +`amount` +: `integer` The refund amount, in paise. `50000` means ₹500. + +`currency` +: `string` 3-letter ISO currency code for the refund. Currently, only `INR` is allowed. + +`payment_id` +: `string` Unique identifier of the payment for which the refund is initiated. For example, `pay_00000000000001`. + +`notes` +: `object` Key-value pairs you can attach to an entity for internal reference. Maximum 15 pairs, 256 characters each. For example, `"note_key": "Beam me up Scotty”`. + +`receipt` +: `string` User-entered reference for the order. + +`acquirer_data` +: `array` A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank. + +`created_at` +: `integer` Timestamp, in Unix format, when the refund was created. For example, `1462887226`. + +`status` +: `string` Indicates the state of the refund. Possible values include: + - `pending`: This state indicates that Razorpay is attempting to process the refund. + - `processed`: This is the terminal state of the refund. + +`speed_requested` +: `string` The processing mode of the refund seen in the refund response. Possible values: + - `normal`: Refund will be processed via the normal speed. That is, 5-7 working days. + - `optimum`: Refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. That is: + - If the refund can be processed instantly, Razorpay will do so, irrespective of the payment method used to make the payment. + - If an instant refund is not possible, Razorpay will initiate a refund that is processed at the normal speed. + +`speed_processed` +: `string` The mode used to process a refund. Possible values: + - `instant`: This means that the refund has been processed instantly via fund transfer. + - `normal`: The refund will take 5-7 working days. + +## Direct Transfer + +Use the below endpoint to create a cashback to a customer's wallet. + +/transfers + +> **INFO** +> +> +> **Handy Tips** +> +> The Direct Transfer endpoint does not consume `payment_id`. +> + +```curl: Request +curl -X POST https://api.razorpay.com/v1/transfers \ +-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-H 'content-type: application/json' \ +-d '{ + "customer": "cust_00000000000001", + "amount": 5000, + "currency": "INR", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' + +```json: Response +{ + "id": "trf_00000000000001", + "entity": "transfer", + "source": "acc_10000000000000", + "recipient": "cust_00000000000001", + "amount": 50000, + "currency": "INR", + "amount_reversed": 0, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "fees": 2, + "tax": 1, + "on_hold": false, + "on_hold_until": null, + "recipient_settlement_id": null, + "created_at": 1507798770, + "linked_account_notes": [], + "processed_at": null +} +``` + +#### Request Parameters + +`customer_id` _mandatory_ +: `string` Unique identifier linked to the customer. For example, ` cust_00000000000001`. + +`amount` _mandatory_ +: `integer` The amount (in paise) to be transferred to the linked account. For example, for an amount of ₹200.35, the value of this field should be 20035. + +`currency` _mandatory_ +: `string` 3-letter ISO currency code for the transaction. Currently, only `INR` is allowed. + +`notes` _optional_ +: `object` Key-value pairs you can attach to an entity for internal reference. Maximum 15 pairs, 256 characters each. For example,`"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`id` +: `string` Unique identifier of the transfer. For example, `trf_00000000000001`. + +`entity` +: `string` The name of the entity. Here, it is `transfer`. + +`source` +: `string` Unique identifier of the transfer source. Here, the source is `payment`. + +`recipient` +: `string` Unique identifier of the customer to whom the transfer was made. For example, `cust_00000000000001`. + +`amount` +: `integer` The amount, in paise, to be transferred to the wallet. For an amount of ₹200.35, pass `20035`. + +`currency` +: `string` 3-letter ISO currency code for the transfer. Currently, we only support `INR`. + +`amount_reversed` +: `integer` Amount reversed from this transfer for refunds. + +`fees` +: `integer` Fees, in paise, charged for the transfer. `500` means ₹5. + +`tax` +: `integer` Tax, in paise, deducted for the fee charged. `200` means ₹2. + +`on_hold` +: `boolean` Indicates whether the account settlement for transfer is on hold. Possible values: + - `true`: Puts the settlement on hold. + - `false`: Releases the settlement. + +`on_hold_until` +: `integer` Timestamp, in Unix, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, and `on_hold` = 1, the settlement is put on hold indefinitely. + +`recipient_settlement_id` +: `string` Unique identifier of the settlement. + +`created_at` +: `integer` Timestamp, in Unix, at which the transfer was created. For example, `1462887226`. + +`notes` +: `json object` Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, `"region": "south", "city": "bangalore"`. + +`linked_account_notes` +: `array` List of keys from the `notes` object which needs to be shown to linked accounts on their Dashboard. For example, `"region", "city"`. Only the keys will be shown, not values. + +`created_at` +: `integer` Timestamp, in Unix, at which the transfer was processed. For example, `1462887226`. + +## Payout from Customer's Wallet + +Payouts allow customers to transfer funds directly from their wallets to any of the linked bank (fund) accounts. + +To make a payout to a customer's wallet, you must: +1. [Create a Fund Account](#create-a-fund-account) +1. [Create a Payout](#create-a-payout) + +### Create a Fund Account + +You can use the below endpoint to create a fund account for a customer. + +/fund_accounts + +```curl: Example Request +curl -u : \ +-X POST https://api.razorpay.com/v1/fund_accounts \ +-H "Content-Type: application/json" \ +-d '{ + "customer_id":"cust_Aa000000000001", + "account_type":"bank_account", + "bank_account":{ + "name":"Gaurav Kumar", + "account_number":"11214311215411", + "ifsc":"HDFC0000053" + } +}' +```json: Response +{ + "id":"fa_Aa00000000001", + "entity":"fund_account", + "customer_id":"cust_Aa000000000001", + "account_type":"bank_account", + "bank_account":{ + "name":"Gaurav Kumar", + "account_number":"11214311215411", + "ifsc":"HDFC0000053", + "bank_name":"HDFC Bank" + }, + "active":true, + "created_at":1543650891 +} +``` + +#### Request Parameters + +`customer_id` _mandatory_ +: `string` This is the unique ID linked to a customer. For example, `cust_Aa000000000001`. + +`account_type` _mandatory_ +: `string` The type of account to be linked to the customer ID. Here, it will be `bank_account`. + +`bank_account` +: Customer bank account details. + + `name` _mandatory_ + : `string` Name of account holder as per bank records. For example, `Gaurav Kumar`. + + `ifsc` _mandatory_ + : `string` Customer's bank IFSC. For example, `HDFC0000053`. + + `account_number` _mandatory_ + : `string` Beneficiary account number. For example, `11214311215411`. + +#### Response Parameters + +`id` +: `string` The unique ID linked to the fund account. For example, `fa_Aa000000000001`. + +`entity` +: `string` The name of the Razorpay entity. Here, it will be `fund_account`. + +`customer_id` +: `string` The unique identifier for a customer. For example, `cust_Aa000000000001`. + +`account_type` +: `string` The type of account linked to the customer ID. Here, it will be `bank_account`. + +`bank_account` +: Customer bank account details. + + `name` + : `string` Name of account holder as per bank records. For example, `Gaurav Kumar`. + + `account_number` + : `string` Beneficiary account number. For example, `11214311215411`. + + `ifsc` + : `string` Customer's bank IFSC. For example, `HDFC0000053`. + + `bank_name` + : `string` Beneficiary bank name. For example `HDFC`. + +`active` +: `string` Status of the fund account. Possible values: + - `true`: Fund account is active. + - `false`: Fund account is inactive. + +`created_at` +: `integer` The timestamp, in Unix, from when the account was created at Razorpay. For example, `1543650891`. + +### Create a Payout + +Use the below endpoint to create a payout. Using a payout you can instantly transfer funds from a customer's wallet to the customer's fund account. + +/customers/:cust_id/payouts + +```curl: Request +curl -u : \ +-X POST https://api.razorpay.com/v1/customers/cust_FVjPW3o1BxxOsa/payouts \ +-H "Content-Type: application/json" \ +-d '{ + "fund_account_id": "fa_FaSwoEzHbedyPz", + "purpose": "refund", + "amount": 100, + "currency": "INR", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + } +}' +```json: Response +{ + "id": "pout_FaSx8rqhHoslRm", + "entity": "payout", + "customer_id": "cust_FVjPW3o1BxxOsa", + "fund_account_id": "fa_FaSwoEzHbedyPz", + "amount": 100, + "currency": "INR", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "fees": 2, + "tax": 1, + "status": "processing", + "purpose": "refund", + "utr": null, + "mode": null, + "reference_id": null, + "narration": "Abcd Fund Transfer", + "batch_id": null, + "failure_reason": null, + "created_at": 1599552906, + "fee_type": null +} +``` +#### Path Parameter + +`cust_id` _mandatory_ +: `string` The unique identifier of the customer to whom the fund account is linked. For example, `cust_FVjPW3o1BxxOsa`. + +#### Request Parameters + +`fund_account_id` _mandatory_ +: `string` The unique identifier of the fund account to which the payout is to be made. + +`purpose` _mandatory_ +: `string` The reason for the payout. For example, `refund`. + +`amount` _mandatory_ +: `integer` The payout amount (in paise). `500` means ₹5. + +`currency` _mandatory_ +: `string` 3-letter ISO currency code for the payout. Currently, only `INR` is allowed. + +`notes` _optional_ +: `object` Key-value pairs you can attach to an entity for internal reference. Maximum 15 pairs, 256 characters each. For example,`"note_key": "Beam me up Scotty”`. + +#### Response Parameters + +`id` +: `string` Unique identifier of the payout. For example, `pout_00000000000001`. + +`entity` +: `string` The name of the Razorpay entity. Here it is `payout`. + +`customer_id` +: `string` The unique identifier of the customer to whom the fund account is linked. For example, `cust_FVjPW3o1BxxOsa`. + +`fund_account_id` +: `string` Unique identifier for the fund account to which the payout is being made. For example, `fa_00000000000001`. + +`amount` +: `integer` The payout amount, in paise. `500` means ₹5. + +`currency` +: `string` 3-letter ISO currency code for the payout. Currently, only `INR` is allowed. + +`notes` +: `object` Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`. + +`fees` +: `integer` Fees, in paise, charged for the transfer. `500` means ₹5. + +`tax` +: `integer` Tax, in paise, deducted for the fee charged. `200` means ₹2. + +`status` +: `string` The status of the payout. The possible values are: + - `processing` + - `processed` + - `reversed` + +`purpose` +: `string` The reason for the payout. For example, `refund`. + +`utr` +: `string` A unique transaction reference (UTR) number generated for all transactions. You can obtain UTR from the [`payout.updated` webhook payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + +`reference_id` +: `string` Maximum length is 40 characters. A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction ID, if any. + +`narration` +: `string` Maximum length 30 characters. Allowed characters: a-z, A-Z, 0-9 and space. This is a custom note that also appears on the bank statement. + +> **INFO** +> +> +> **Handy Tips** +> +> - If no value is passed for this parameter, it defaults to the Merchant Billing Label. +- Ensure that the most important text forms the first 9 characters as banks may truncate the rest as per their standards. + +> + +`batch_id` +: `string` This parameter is populated if the contact was created as part of a bulk upload. For example, `batch_00000000000001`. + +`failure_reason` +: `string` The reason for the payout failing. + +`created_at` +: `integer` Timestamp, in UNIX, when the payout was created. + +`fee_type` +: `string` The fee type for the payout. + +## Fetch Wallet Balance + +Use the below endpoint to fetch the customer's wallet balance and the details about current usage. + +/customers/:id/balance + +> **INFO** +> +> +> **Handy Tips** +> +> The wallet APIs always return the amount in paise. +> + +```curl: Example Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/cust_00000000000001/balance +```json: Response +{ + "balance": 199800, + "monthly_usage": 200100, + "max_balance": 2000000 +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` Unique identifier for the customer to whom the wallet is linked. For example, `cust_00000000000001`. + +#### Response Parameters + +`balance` +: `integer` Balance in the wallet, in paise. `500` means ₹5. + +`monthly_usage` +: `integer` Monthly usage for the wallet. `500` means ₹5. + +`max_balance` +: `integer` Maximum balance in the wallet. `500` means ₹5. + +## Fetch Wallet Statement + +Use the below endpoint to fetch the transaction statement of a customer’s wallet associated with a `customer_id`. + +/customers/:id/statement + +Retrieves the transaction statement of the customer’s wallet using the customer `id`. + +```curl: Example Request +curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \ +-X GET https://api.razorpay.com/v1/customers/cust_00000000000001/statement +```json: Response +{ + "entity": "collection", + "count": 2, + "items": [ + { + "id": "ctxn_00000000000001", + "entity": "customer_transaction", + "source": "pay_00000000000001", + "status": "complete", + "type": "transfer", + "amount": 50000, + "currency": "INR", + "credit": 0, + "debit": 50000, + "balance": 100000, + "description": "Against order #1", + "created_at": 1507750332 + }, + { + "id": "ctxn_00000000000002", + "entity": "customer_transaction", + "source": "trf_00000000000001", + "status": "complete", + "type": "transfer", + "amount": 50000, + "currency": "INR", + "credit": 50000, + "debit": 0, + "balance": 150000, + "description": "NA", + "created_at": 1507749557 + } + ] +} +``` + +#### Path Parameter + +`id` _mandatory_ +: `string` Unique identifier of the customer to whom the wallet is linked. For example, `cust_00000000000001`. + +#### Query Parameters + +`from` +: `integer` The timestamp, in Unix, from when the statement is to be fetched. + +`to` +: `integer` The timestamp, in Unix, till when the statement is to be fetched. + +`count` +: `integer` The number of entries to be fetched. Default value is 10. Maximum value is 100. This can be used for pagination, in combination with `skip`. + +`skip` +: `integer` The number of entries to be skipped. Default value is 0. This can be used for pagination, in combination with `count`. + +#### Response Parameters + +`id` +: `string` Unique identifier for the transaction. For example, `ctxn_00000000000001`. + +`entity` +: `string` Name of the entity being fetched. Here, it is `customer_transaction`. + +`source` +: `string` Unique identifier of the transfer source. For example, `pay_00000000000001`. + +`status` +: `string` The status of the transaction. For example, `completed`. + +`type` +: `string` Type of transaction. Possible values: + - `transfer` + - `refund` + +`amount` +: `integer` Transaction amount, in paise. `500` means ₹5. + +`currency` +: `string` 3-letter ISO currency code. + +`credit` +: `integer` Credited amount, in paise. `500` means ₹5. + +`debit` +: `integer` Debited amount, in paise. `500` means ₹5. + +`balance` +: `integer` Wallet balance updated after the transaction, in paise. `500` means ₹5. + +`description` +: `string` Maximum 255 characters. Description for the transaction. For example, `Against order #1`. + +`created_at` +: `integer` Timestamp, in Unix, at which the record was created. For example, `1462887226`. diff --git a/llm-content/payments/wallet/wallet-operations.md b/llm-content/payments/wallet/wallet-operations.md new file mode 100644 index 00000000..3d442b4e --- /dev/null +++ b/llm-content/payments/wallet/wallet-operations.md @@ -0,0 +1,109 @@ +--- +title: Wallet Operations +description: Learn about the different Razorpay Wallet operations, such as loading a wallet, accepting payments from a wallet, initiating refunds and sending cashbacks to a wallet +--- + +# Wallet Operations + +> **WARN** +> +> +> **Watch Out!** +> +> We have discontinued support for this product, effective April 2023. As a result, we will not be onboarding new users for this product anymore. +> + +This section details the following wallet operations with an amount of ₹ 500 as an example: + +- [Load a Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/wallet-operations.md#load-a-wallet): Customer wants to add ₹ 500 to the wallet. +- [Accept Payments from a Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/wallet-operations.md#accept-payments-from-a-wallet): Customer wants to pay ₹ 500 from the wallet. +- [Refund to a Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/wallet-operations.md#refund-to-a-wallet): Merchant wants to refund ₹ 500 to a wallet. +- [Send Cashback to a Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/wallet-operations.md#send-cashback-to-a-wallet): Merchant wants to send ₹ 500 as a cashback to a wallet. +- [Make a Payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/wallet-operations.md#make-a-payout) + +## Prerequisites + +- [Set up your Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md). +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from Razorpay Dashoboard. +- [Create a Customer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/customers.md#create-a-customer). + +## Load a Wallet + +When a customer adds funds or money into the wallet, it is called loading a wallet. A wallet is created only when a customer adds funds or money into the wallet for the first time. + +Follow the below steps for loading a wallet: + +1. Customer proceeds to [Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md#checkout-form) from the normal payment flow for an amount, say ₹ 500, using the selected payment mode (**Net Banking**/**Debit card**/**Credit card**/**UPI**). +2. You authenticate the customer in your backend and make a [capture payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) request for the payment made and the amount gets credited to your account. +3. You make a [transfer payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/api-reference.md#transfer-a-payment) request of ₹ 500 to the customer’s wallet. +4. Customer’s wallet gets credited with ₹ 500 and your account gets debited with the same amount. +5. Razorpay sends a ‘success information’ response which you may show to your customer. + +The following image illustrates the flow of funds while loading a wallet: + +![Load Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/loading-wallet.jpg.md) + +Reloading the wallet at the time of checkout will have the same flow. This usually happens when the customer finds out that there is insufficient balance in the wallet at the time of making a payment. + +Refer to the [API Reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/api-reference.md#transfer-a-payment) to see the APIs with the examples that are used in this operation. + +## Accept Payments from a Wallet + +Follow the below steps for accepting payment from a wallet: + +1. The customer initiates payment of ₹ 500 for an order from the wallet. +2. You authenticate the customer in your backend and make a [create payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/api-reference.md#create-a-payment-to-a-customer-s-wallet) request with the `customer_id`. +3. You make a [capture payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) request for the payment of ₹ 500. +4. ₹ 500 gets debited from the customer’s wallet and your account gets credited with the same amount. + +The following image illustrates the flow of funds when a payment is made from a wallet: + +![Accept Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/accept-payments-wallet.jpg.md) + +Refer to the [API reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/api-reference.md#create-a-payment-to-a-customer-s-wallet) to see the APIs with the examples that are used in this operation. + +## Refund to a Wallet + +Follow the below steps to refund to a wallet when payment is made from a wallet: + +1. You make a [Refund to wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/api-reference.md#refund-to-a-wallet) request for a payment of ₹ 500 with the `payment_id`. +2. Customer’s wallet gets credited with ₹ 500 and your account gets debited with the same amount. + +**Handy Tips** + +Refunds are always made against a payment. While making a refund, the customer (payee) is identified using the `payment_id` that is generated at the time of payment. + +The following image illustrates the flow of refund made to a wallet: + +![Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/refund-to-wallet.jpg.md) + +Refer to the [API Reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/api-reference.md#refund-to-a-wallet) to see the APIs with the examples that are used in this operation. + +## Send Cashback to a Wallet + +Follow the below steps to send cashback to a wallet: + +1. You make a [direct transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/api-reference.md#direct-transfer) request of ₹ 500 with the `customer_id`. +1. Customer’s wallet gets credited with ₹ 500 and your account gets debited with the same amount. + +The following image illustrates the flow of cashback to a wallet: + +![Cashback](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cashback-wallet.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> As per RBI Domestic Money Transfer (DMT) guidelines, you can transfer a maximum of ₹ 25000 to other wallets in a calendar month. +> + +Refer to the [API Reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/api-reference.md#direct-transfer) to see the APIs with the examples that are used in this operation. + +## Make a Payout + +Payouts allow customers to transfer funds directly from their wallets to any of the linked bank accounts. + +If there are no bank accounts linked to a customer, send an API request to Razorpay with the bank account details to link the bank account to a customer. This allows Razorpay to tie the bank account with the particular Customer Id and thereby process a fund transfer initiated towards that account. + +Refer to the [API Reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/wallet/api-reference.md#payout-from-customer-s-wallet) to make a payout. diff --git a/llm-content/payments/webstore.md b/llm-content/payments/webstore.md new file mode 100644 index 00000000..c4f78a86 --- /dev/null +++ b/llm-content/payments/webstore.md @@ -0,0 +1,87 @@ +--- +title: About Razorpay Webstore +description: Setup your online store in minutes and start selling with Razorpay Webstore. +--- + +# About Razorpay Webstore + +Razorpay Webstore makes it easy to launch an online store. This no-code platform lets entrepreneurs and businesses create a product-centric online store, enabling quick setup and seamless customer payments. Its user-friendly interface supports detailed product descriptions and images, ensuring products are showcased attractively. + +With the ability to create and instantly share a Webstore, the platform helps businesses establish an online presence and accelerate growth. It simplifies product listing and payment collection, making it easier for businesses to reach and engage with customers worldwide. + +![Webstore Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webstore-flow.jpg.md) + +A quick glimpse of a Webstore. + +![Example of a Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/storefront-example.jpg.md) + +## Advantages + +- Create, customise, and start collecting payments in minutes. +- Build your Webstore with zero coding effort using the **What You See Is What You Get (WYSIWYG)** editor. +- Set up custom URLs that align with your brand and are easy to remember. +- Add multiple products, images, descriptions, and discounts effortlessly—no development work required. +- Manage product inventory seamlessly, giving you full control over demand and supply. +- Webstore is readily integrated with [Magic Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/magic-checkout.md) which comes with pre-filled address of 100M+ customer, reducing the cart drop-offs. + +### Use Cases + + +### 1. Small Business Owners + + **Small business owners** who want to start selling online but have limited technical knowledge or resources can use Razorpay Webstore to create an online store with no coding effort. They can add multiple products, add their images, descriptions and run discounts on them. It is a simple no code online store created without any development effort. + + + +### 2. Individuals or Hobbyists + + **Individuals or hobbyists** who want to sell their products online can create a simple and attractive Razorpay Webstore without the need for any technical skills. + + + +### 3. For Freelancers or Service Providers + + **Freelancers or Service providers** who want to offer their services or digital products can create a simple and efficient payment collection system with the Razorpay Webstore to add products and share the URL. + + + +### 4. For Event Organisers + + **Event organisers** who want to sell tickets or merchandise for their events can quickly set up an online store and share the link with their attendees to collect payments. + + + +### 5. For Artists or Creatives + + **Artists or Creatives** who want to sell their artwork or digital products can create an online store and share the webstore with their followers or customers. + + + +### 6. For Restaurants or Cafes + + **Restaurants or Cafes** that want to offer online ordering or sell merchandise can create an online store and easily add products to it. They can manage the inventory of products within it. This empowers them to manage the demand and supply of products they are selling in the store. + + +### Supported Payment Methods + +Customers can make online payments using [Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards.md), [Netbanking](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/netbanking.md), [UPI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/upi.md), and **wallets**. + +### International Currency Support + +You can receive payments in any of the [supported international currencies](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments.md#supported-currencies). + +## Get Started + +To create Razorpay Webstore, log in to the Dashboard and click **Payment Pages** → **Select Razorpay Webstore**. + +### What Next + +Understand [how you can use Razorpay Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/how-it-works.md). Know about the various [Webstore states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/states.md). + +### Related Information + +- [How Razorpay Webstore Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/how-it-works.md) +- [Webstore States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/states.md) +- [Create a Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/create.md) +- [Search for Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/search.md) +- [Manage Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/manage.md) diff --git a/llm-content/payments/webstore/create.md b/llm-content/payments/webstore/create.md new file mode 100644 index 00000000..83297d0a --- /dev/null +++ b/llm-content/payments/webstore/create.md @@ -0,0 +1,127 @@ +--- +title: Create a Razorpay Webstore +description: Create a Webstore to start accepting payments. +--- + +# Create a Razorpay Webstore + +You can build a Webstore from your Dashboard to start accepting payments from customers. This method does not require any code or API integration. + +> **INFO** +> +> +> **Prerequisites** +> - [Sign up](https://easy.razorpay.com/onboarding/l1/signup?field=MobileNumber) for a Razorpay account. +> - Log in to the Dashboard and complete the KYC requirements. +> - The Dashboard has [test and live modes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/test-live-modes.md). Use the test mode for a sandbox experience. You can switch to live mode when you are ready to accept payments. You will have to create a new Webstore in live mode. +> - Understand the [Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/how-it-works.md). +> + +## Steps + +To create a Webstore, you must complete the following actions: + +1. [Add Product Details](#step-1-add-product-details) +2. [Add Business Details](#step-2-add-business-details) +3. [Configure Page Settings](#step-3-configure-page-settings) +4. [Share and Start Accepting Payments](#step-4-share-and-start-accepting-payments) + +### Step 1: Add Product Details + +You can add your products and the accompanying details such as stock availability, description, images and so on in this section. + +1. Log in to the Dashboard and navigate to **Payment Pages**. +2. Click the **+ Create Payment Page** button and click **Create Razorpay Webstore**. + ![Select which product you want to use.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-select-choice.jpg.md) +3. Click **Add products to this page** and then click **Add a new product**. +4. Add a **Product name**. + +> **INFO** +> +> +> **Product Name Character Limit** +> +> The product name cannot exceed 100 characters. +> + +5. Add the **Price** of your product. In addition, you can add a **Discounted price**, which will serve as the final listed price for the product. Customers will see the following. + ![Webstore Discounted price view](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/store-discounted-price.jpg.md) +6. Add **Quantity in stock** if you have a limited quantity. +7. You can also upload up to five product images. +8. You can also add your product to a Category: + 1. Click on the Category drop-down and click **+Create new category**. + 2. Add a category name and click **Add category**. + +> **INFO** +> +> +> **Category Name Character Limit** +> +> The category name cannot exceed 100 characters. +> + + ![Adding category name for Webstores](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-category-name-add.jpg.md) +9. Add a brief description for your product if needed and click **Add product**. + ![Webstore Product Addition Preview](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-store-product-addition.jpg.md) + +### Step 2: Add Business Details + +Add you contact details such as phone number and email in this section. + +1. Click **More options**. + ![Webstore More Options section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-stores-more-options.jpg.md) +2. Enter you **Business email id**. +3. Enter your **Business phone no.** and click **Save contact details**. + ![Webstore Business Contact Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-stores-business-contact.jpg.md) + +### Step 3: Configure Page Settings + +Customise your Webstore by adding a custom URL, adding an expiry date and so on through the **Page Settings** option. + +1. Click **Page Settings**. +2. Add a unique URL slug in the **URL for this page** section. + + +> **WARN** +> +> +> **Watch Out!** +> +> This is a mandatory step. You will not be able to create a Webstore if you do not add a unique URL slug. +> + +3. You can add an expiry date for your Webstore. +4. You can also add a custom message for your customers and redirect to your preferred website after successful payment. +5. You can also configure Facebook Pixel and Google Analytics for your Webstore for metrics. Know more about how to add [Facebook Pixel and Google Analytics](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/plugins-add-ons.md) to your Webstore. +6. Click **Save**. + ![Configure Settings for your Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-store-settings.jpg.md) + +### Step 4: Share and Start Accepting Payments + +Share your Webstore with your customers and start accepting payments. + +1. Click **Publish Page** to go live. +2. Click **Copy** to copy the URL to share with your customers. You can also find the URL on the Dashboard in the Webstore list. + ![Webstore succesful creation.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/storefront-page-publish.jpg.md) + + +#### View Transaction Details on Dashboard + +You can view the payments as and when they are made in the **Transactions** section. + +1. Navigate to **Payment Pages** on the Dashboard and select **Razorpay Webstore**. +2. From the list, click the Webstore you wish to view. +3. Select the payment id you wish to check. + ![Transactions list on Webstore.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sp-transactions-view.jpg.md) +4. Once you open the payment id, you can check out the order details. + ![Transaction Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sp-transaction-details.jpg.md) +5. Click the order id to view the address details of the customer. + ![Order details of Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sp-order-details.jpg.md) + +### Related Information + +- [About Razorpay Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore.md) +- [How Razorpay Webstore Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/how-it-works.md) +- [Webstore States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/states.md) +- [Search for Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/search.md) +- [Manage Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/manage.md) diff --git a/llm-content/payments/webstore/faqs.md b/llm-content/payments/webstore/faqs.md new file mode 100644 index 00000000..0def28af --- /dev/null +++ b/llm-content/payments/webstore/faqs.md @@ -0,0 +1,150 @@ +--- +title: Razorpay Webstore | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Webstore. +--- + +# Frequently Asked Questions (FAQs) + +### 1. How can I add my business logo on the Webstore? + + To add your business logo: + + 1. In the Dashboard, navigate to **Account & Settings**. + 2. Click **Branding** under **Checkout settings**, and click **Choose File** in the **Your Logo** section. + 3. Upload the logo file. Ensure that the logo is a square image of minimum dimensions 256x256 px. Maximum file size allowed is 1MB. Formats supported are JPG, JPEG and PNG. + + + +### 2. How can I make the Webstore elements reflect my brand colors? + + You can make the Webstore elements appear in your brand colours. To change the colours: + + 1. In the Dashboard, navigate to **Account & Settings**. + 2. Click **Branding** under **Checkout settings** and enter the HEX code for your brand. For example, `#6822CC` in the **Theme Color** section. + 3. Click **Save Changes**. + + + +### 3. How do I create a custom URL for my Webstore? + + You must create the Webstore in **Live Mode** in order to have a custom URL. You can only customise the suffix and not the entire URL. If your suffix is `livingarts`, the custom URL will appear as `https://pages.razorpay.com/livingarts`. + + +> **WARN** +> +> +> **Watch Out!** +> +> - If another business that uses Razorpay Webstore has already created a custom URL with `livingarts` as the suffix, you will not be able to use `livingarts`. Your Webstore suffix must be unique as two Webstores cannot have the same suffix. +> - You cannot create a custom URL in **Test Mode**. This feature is only available in **Live Mode**. +> + + To create a custom URL for Webstore: + 1. In the Dashboard, navigate to menu ribbon, click the drop-down button and select **Live Mode**. + 2. While creating a Webstore, click **Page Settings** and in the pop-up that appears, enter the suffix to create a custom URL. Click **Save**. + 3. Click **Publish Page**. + + + +### 4. How do I add a quantity for my products added on the Webstore? + + While adding a product to your Webstore, add your quantity in the **Quantity in stock** section. + + + +### 6. What are the supported formats for the image added to a product? + + We support image uploads in the following formats: JPG, JPEG, PNG, and GIF. + + + +### 7. How do I update the stock level of a price field (item) in my Webstore? + + You can update the stock in two ways. + + **From the List of Webstore**: + 1. Select the relevant Webstore. The items appear on the top of the page, on the right-hand side. + 2. Click **Update Stock** and enter the number of units available for sale in the field. + 3. Click **Update**. + + **Using the Webstore Edit Mode**: + 1. Select the relevant webstore and click the edit icon. + 2. In the **Products** section, go to the price field and click the edit icon. + 3. Enter the number of units available for sale in the field. + 4. Click **Add**. + + + +### 8. What happens to my Webstore if all the listed products go out of stock? + + If all the items listed on your Webstore go out of stock, it will still remain active. However, all the products will show an **Out of Stock** label. + + + +### 9. How do I track the payments made by customers? When will the amount be settled to my account? + + You can view the payments as and when they are made in the [Transactions Details View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages/view-reports.md) of the Webstore. + + ![Transaction details view page for tracking payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-view_report.jpg.md) + + + +### 10. What payment methods can customers use to make payments on the Webstore? Can I display additional payment methods? + + All the payment methods enabled for your account are displayed on the Webstore. The default payment methods available are: + - Cards + - Netbanking + - UPI + - Wallets (PayZapp) + + If you want to show more wallets or [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) at Checkout, please raise a request with the [Razorpay Support team](https://razorpay.com/support/#request). + + + +### 11. What is the maximum payment amount allowed per transaction on a Webstore? + + By default, a customer can make a maximum payment of ₹5,00,000. You can increase this limit by raising a request with [Razorpay Support](https://razorpay.com/support/#request). + + + +### 12. Can I accept payments in international currency? + + You can accept payments in international currency using Webstore by following these steps: + 1. Follow [these steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/international-payments/international-debit-credit-cards.md#application-process) to enable international payments for your account. + 2. While creating the Webstore, click the currency drop-down list in the **Price** field and select the required currency. + + +> **INFO** +> +> +> **One Currency per Webstore** +> +> You can set only one currency for the Price fields on a Webstore. If you attempt to configure the second price field with a different currency, a message appears on the screen displaying that more than one currency cannot be applied. +> +> + + + + +### 13. How many products can I add to a Webstore? + + The maximum number of products that you can add to a Webstore is **100**. + + + +### 14. I am getting a message that my domain was not connected. What should I do? + + Sometimes it can take up to an hour for the changes to save. Do not undo the changes you have made to your domain and try again after an hour. Raise a ticket with our [support team](https://razorpay.com/support/) if you can still not connect your domain. + + + +### 15. I am getting an error message - Failed to create link with given slug, please try a different value. What should I do in this case? + + This error message occurs when the custom URL provided by you already exists. Please use a different URL slug. + + + +### 16. Can I create multiple URLs for a Webstore? + + No, you cannot create multiple URLs for a Webstore. ​A Webstore allows you to collect multiple payments on the same link. diff --git a/llm-content/payments/webstore/glossary.md b/llm-content/payments/webstore/glossary.md new file mode 100644 index 00000000..fc4dde09 --- /dev/null +++ b/llm-content/payments/webstore/glossary.md @@ -0,0 +1,15 @@ +--- +title: Razorpay Webstore | Glossary +heading: Glossary +description: List of commonly used terms related to Razorpay Webstore. +--- + +# Glossary + +The following table lists all the commonly used terms and their definitions used in Razorpay Webstore: + +Terms | Description +--- +Stock | The goods or merchandise stored with the business in a warehouse or a storage facility. +--- +Expiry Date | The Expiry Date is the date after which the customer cannot pay using the Razorpay Webstore. diff --git a/llm-content/payments/webstore/how-it-works.md b/llm-content/payments/webstore/how-it-works.md new file mode 100644 index 00000000..f4e7efb3 --- /dev/null +++ b/llm-content/payments/webstore/how-it-works.md @@ -0,0 +1,38 @@ +--- +title: How Razorpay Webstore Works +description: Easily create beautiful online stores with Razorpay Webstore, a powerful no-code ecommerce website builder featuring a user-friendly interface and robust management features. +--- + +# How Razorpay Webstore Works + +You can create a Webstore from the Dashboard and share the link with your customers to start accepting online payments. + +![How Razorpay Webstore Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webstore-how-it-works.jpg.md) + +## Step 1: Sign Up for a Razorpay Account + +To create a Webstore, you first need to set up your [Razorpay account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md). If you already have an account, log in to the Dashboard and navigate to **Payment Pages**. Click **+ Create Payment Page** and then click **Create Razorpay Webstore**. + +## Step 2: Add your Product Details + +Add your products and configure the amount and input fields. For example, you can add quantity details, upload product images and so on. Know more about [adding product details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/create.md#step-1-add-product-details). + +## Step 3: Add Business Details + +Add your business details such as your phone number and email address. Know more about [adding business details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/create.md#add-business-details). + +## Step 4: Configure Page Settings + +Configure page settings such as adding a custom URL slug, adding an expiry date and adding plugins and add-ons such as Facebook Pixel and Google Analytics. Know more about how to [configure page settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/create.md#step-3-configure-page-settings). + +## Step 5: Share and Start Accepting Payments + +Publish the Webstore and share the URL with your customers. The customers visit this Webstore, select the products they wish to buy, fill in the details, select a payment method and complete the payment. Know more about [publishing a Webstore and sharing it with customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/create.md#step-4-publish-and-share). + +### Related Information + +- [About Razorpay Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore.md) +- [Webstore States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/states.md) +- [Create a Razorpay webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/create.md) +- [Search for Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/search.md) +- [Manage Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/manage.md) diff --git a/llm-content/payments/webstore/manage.md b/llm-content/payments/webstore/manage.md new file mode 100644 index 00000000..1dcb407b --- /dev/null +++ b/llm-content/payments/webstore/manage.md @@ -0,0 +1,118 @@ +--- +title: Manage Razorpay Webstore +description: Edit content, change settings or deactivate your Webstore. +--- + +# Manage Razorpay Webstore + +You can perform the following actions: +- [Edit Webstore Content](#edit-webstore-content) +- [Update Stock](#update-stock) +- [Edit Webstore Settings](#edit-webstore-settings) +- [Deactivate Webstore](#deactivate-webstore) + +## Edit Webstore Content + +To edit content: +1. Navigate to **Payment Pages** on the Dashboard and select **Razorpay Webstore**. +2. From the list, select the Webstore you want to modify. +3. In the top right corner, click the **Edit Page** button. + ![Edit Button - Manage Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-update_stock.jpg.md) +The Webstore appears in edit mode. You can now edit any of the fields to update the details, including the price fields. + +## Update Stock + +You can update the stock quantity of a price field, for example `Individuals Entry Ticket`, in the edit mode of the Webstore. + +To update stock: +1. Navigate to **Payment Pages** on the Dashboard and select **Razorpay Webstore**. + ![Dashboard Page type selection](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-pp-page-selection.jpg.md) +2. Select the Webstore you want to modify. +3. In the top right corner, the different price fields are displayed. Click **Update Stock** against the relevant price item. +4. You can either make the stock quantity unlimited, using **No Limit**, or enter an amount in the box given below. +5. Click **Save**. + +![Save Button - Update Stock - Manage Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-update_stock.jpg.md) + +## Edit Webstore Settings + +To modify Webstore settings: +1. Navigate to **Payment Pages** on the Dashboard and select **Razorpay Webstore**. +2. Click on the Webstore id. This opens the Webstore details panel where you can perform the following actions: + +Action | Effect +--- +**Edit** the Webstore | Editing re-opens the editor with saved details. You can make changes to the Webstore content. +--- +**Deactivate** the Webstore | Deactivating a Webstore makes it inaccessible to your customers. +--- +Configure **Expires on** | Enables you to set an expiry date and time for the Webstore using the date and time picker. You can also select the **No Expiry** checkbox to run the Webstore for an indefinite time. +--- +**Add New** notes on the Webstore | You can add up to 5 custom notes on the Webstore. + +![Modify Settings - Manage Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-edit_pp_2.jpg.md) + +> **INFO** +> +> +> **Best Practices** +> +> - To avoid confusion, ensure that no two Webstores have the same **Title**. +> - You can edit an expired or inactive Webstore and republish it with new changes. This helps avoid Webstore duplication and allows you to query the system efficiently. +> + +## Deactivate Webstore + +A Webstore can have two states, active and inactive. + +Status | Description +--- +`active` | The Webstore is published and live. +--- +`inactive` | The Webstore becomes inactive due to one of the following actions:- Manual deactivation +- Webstore expiry + +You can make an existing Webstore inactive if you no longer wish to accept payments using it. + +### Manual Deactivation + +To deactivate manually: +1. Log in to Dashboard and navigate to **Payment Pages**. +2. Select **Razorpay Webstore**. +2. From the list, click the Webstore that you want to deactivate. +3. In the Webstore details screen, go to **Page Status** field and click **Deactivate**. +4. In the dialog box that appears, confirm the action by clicking the **Yes, deactivate** button. + +![Deactivate Button - Manage Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-edit_pp.jpg.md) + +### Deactivation Using Expiry Date +You can also automate Webstore deactivation by setting an expiry date. You can set expiry date: +- At the time of Creation +- After Creation + +#### At the Time of Creation +Know how to [set the Webstore's expiry date](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/create.md#step-3-configure-store-settings) at the time of creation. + +#### After Creation +To set the expiry mode: +1. Navigate to the Dashboard → **Payment Pages**. +2. Select **Razorpay Webstore**. +2. From the list, click the Webstore that you want to set expiry for. +3. In the Webstore details screen, go to **Expires On** field and click **Change**. +4. The field now shows a **No Expiry** checkbox selected. Unselect the box for the calendar to appear. +5. In the calendar, set the date and time of expiry and click **Save**. + +![Save Button - Expiry Date - Manage Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-edit_pp_2.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> The expiry time must be at least 15 minutes after current time. +> + +### Related Information + +- [Create a Razorpay Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/create.md) +- [Search for Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/search.md) diff --git a/llm-content/payments/webstore/plugins-add-ons.md b/llm-content/payments/webstore/plugins-add-ons.md new file mode 100644 index 00000000..a95bf158 --- /dev/null +++ b/llm-content/payments/webstore/plugins-add-ons.md @@ -0,0 +1,16 @@ +--- +title: Track Payments Using Google Tracking ID and Facebook Pixel +description: Add your Google Tracking ID and Facebook Pixel to your Razorpay Webstore to track payments and conversions from your Google and Facebook advertisements. +--- + +# Track Payments Using Google Tracking ID and Facebook Pixel + +If you use Razorpay Webstore to accept payments from customers and also: + +- Advertise on Google and use Google Tracking ID to track conversions +- Advertise on Facebook and use Facebook Pixel to track conversions + +You can do the following to track Google and Facebook ads and analyse conversions: +- [Add Google Analytics Tracking ID to Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/plugins-add-ons/google-analytics.md) +- [Add Facebook Pixel to Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/plugins-add-ons/fb-pixel.md) +- [Add Facebook Pixel to your payment success page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/plugins-add-ons/fb-payment-success.md) diff --git a/llm-content/payments/webstore/plugins-add-ons/fb-payment-success.md b/llm-content/payments/webstore/plugins-add-ons/fb-payment-success.md new file mode 100644 index 00000000..543190b2 --- /dev/null +++ b/llm-content/payments/webstore/plugins-add-ons/fb-payment-success.md @@ -0,0 +1,34 @@ +--- +title: Razorpay Webstore | Add ons - Facebook Pixel +heading: Add Facebook Pixel on Payment Success Page +description: Add your Facebook Pixel on your payment success page. This helps you track payments and conversions from your Facebook advertisements. +--- + +# Add Facebook Pixel on Payment Success Page + +You should integrate Facebook Pixel on your payment success page to track and analyse the advertisement conversion to payments if you: +- Use Razorpay Webstore to accept payments from customers and redirect them to a success page post payment. +- And, advertise on Facebook and use Facebook Pixel to track conversions. + +## Prerequisites + +- [Create a Facebook Pixel](https://www.facebook.com/business/help/952192354843755?id=1205376682832142&recommended_by=1700857106877546). +- Create a payment success page on your domain and [add the Facebook Pixel to it](https://www.facebook.com/business/help/952192354843755?id=1205376682832142). + +## Workflow + +Let us assume you run a website selling pet supplies. You attract customers using advertisements on Facebook and sell them pet products using Razorpay Webstore. + +To track and measure the effectiveness of these Facebook advertisements and how many of them convert into purchases, you need to add a redirect from your store to this success page. + +To do this: +1. Navigate to your Webstore in the edit mode. +2. Click **Page Settings**. +3. In the **Action after Success Payment** field, select **Redirect to your website**. +4. Enter your website's success page URL here as shown: + +Every time a customer successfully completes a payment, they are directed to the success page. Facebook pixel tracks this event. + +### Related Information +- [Add Facebook Pixel to Razorpay Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/plugins-add-ons/fb-pixel.md) +- [Add Google Analytics Tracking ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/plugins-add-ons/google-analytics.md) diff --git a/llm-content/payments/webstore/plugins-add-ons/fb-pixel.md b/llm-content/payments/webstore/plugins-add-ons/fb-pixel.md new file mode 100644 index 00000000..a1cbc58b --- /dev/null +++ b/llm-content/payments/webstore/plugins-add-ons/fb-pixel.md @@ -0,0 +1,44 @@ +--- +title: Add Facebook Pixel +description: Add your Facebook Pixel to your Razorpay Webstore to track payments and conversions from your Facebook advertisements. +--- + +# Add Facebook Pixel + +You can add your Facebook Pixel to your Webstore to track payments and conversions from your Facebook advertisements. + +**Available Tracking Metrics** + +Metrics | Description +--- +Page Views | When a customer lands on your Webstore. This is the default metric to track page visits. +--- +Add to Cart | When a customer clicks on an add-to-cart button. +--- +Initiate Checkout | When a customer clicks on a checkout button. +--- +Purchase | When a customer finishes the purchase or checkout flow and lands post-payment success page. + +## Prerequisites +[Create a Facebook Pixel](https://www.facebook.com/business/help/952192354843755?id=1205376682832142&recommended_by=1700857106877546). + +## Add Facebook Pixel to Your Webstore + +To add Facebook Pixel to your Webstore: +1. Navigate to your Webstore in the edit mode. +2. Click **Page Settings**. +3. Go to **Plugins and Add-ons** and click **Configure**. + ![Configure Plugins and Add Ons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-fb-pixel-configure-plugins-addons.jpg.md) +4. Add the details: + 1. **Facebook Pixel ID**: Enter the Facebook Pixel ID. + 2. Select the metrics you want to track from the following: + - Page Views + - Initiate Payment + - Add to Cart + - Payment Complete + ![Add Google Tracking ID and FB Pixel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-fb-pixel-fb-pixel-google-trackingid.jpg.md) +5. Click **Save**. + +### Related Information +- [Add Facebook Pixel to your payment success page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/plugins-add-ons/fb-payment-success.md) +- [Add Google Analytics Tracking ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/plugins-add-ons/google-analytics.md) diff --git a/llm-content/payments/webstore/plugins-add-ons/google-analytics.md b/llm-content/payments/webstore/plugins-add-ons/google-analytics.md new file mode 100644 index 00000000..fc23444e --- /dev/null +++ b/llm-content/payments/webstore/plugins-add-ons/google-analytics.md @@ -0,0 +1,33 @@ +--- +title: Add Google Analytics Tracking ID +description: Add your Google Tracking ID to your Razorpay Webstore to track payments and conversions from your Google advertisements. +--- + +# Add Google Analytics Tracking ID + +You can add your Google Tracking ID to your Webstore to track payments and conversions from your Google advertisements. Know more about [Tracking ID](https://support.google.com/analytics/answer/1008080?hl=en) and how to create one using Google Analytics account. + +**Available Tracking Metrics** + +Metric | Description +--- +Page View | When a customer lands on your Webstore. This is the default metric to track page visits. + +## Prerequisites + +[Create a Google Tracking ID](https://support.google.com/analytics/answer/1008080?hl=en). + +## Add Google Tracking ID to Your Webstore + +To add Google Tracking ID to your Webstore: +1. Navigate to your Webstore in the edit mode. +2. Click **Page Settings**. +3. Go to **Plugins and Add-ons** and click **Configure**. + ![Configure Plugins and Add Ons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-plugins-addons-configure.jpg.md) +4. Add the **Tracking ID** to track the page views. + ![Add Google Tracking ID and FB Pixel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-plugins-addons-GA.jpg.md) +5. Click **Save**. + +### Related Information +- [Add Facebook Pixel to Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/plugins-add-ons/fb-pixel.md) +- [Add Facebook Pixel to your payment success page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/plugins-add-ons/fb-payment-success.md) diff --git a/llm-content/payments/webstore/search.md b/llm-content/payments/webstore/search.md new file mode 100644 index 00000000..9e4d6d78 --- /dev/null +++ b/llm-content/payments/webstore/search.md @@ -0,0 +1,51 @@ +--- +title: Search for Razorpay Webstore +description: Search for a Webstore on the Razorpay Dashboard. +--- + +# Search for Razorpay Webstore + +You can search for a Webstore on the Dashboard. +## Search for Webstore + +You can search for a Webstore on the Dashboard by specifying various filters. + +To search for a Webstore: + +1. Log in to the Dashboard. +2. Navigate to **Payment Pages** from the left menu and select **Razorpay Webstore**. +3. Search for the Webstore by specifying filters. + +![Webstore List](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-payment-pages-list.jpg.md) + +Filter | Description +--- +Title | The title of the store. +--- +Status | The state of the store. Know more about [Webstore states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/states.md). + +## Search for Product + +You can search for products added to your various stores on the Dashboard by specifying various filters. + +To search for a Product: + +1. Log in to the Dashboard. +2. Navigate to **Payment Pages** from the left menu and click **Products**. +3. Search for the product by specifying filters. + +![Webstore Product list on Razorpay Dashboard.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pp-stores-product-list.jpg.md) + +Filter | Description +--- +Product name | The name of the product. +--- +Status | The state of the product. Possible values are: - Available +- Out of Stock + +### Related Information + +- [How Webstore Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/how-it-works.md) +- [Webstore States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/states.md) +- [Create a Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/create.md) +- [Manage Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/manage.md) diff --git a/llm-content/payments/webstore/states.md b/llm-content/payments/webstore/states.md new file mode 100644 index 00000000..3cd3aafe --- /dev/null +++ b/llm-content/payments/webstore/states.md @@ -0,0 +1,26 @@ +--- +title: Razorpay Webstore States +description: List of states of a Razorpay Webstore and their significance. +--- + +# Razorpay Webstore States + +There are two states of a Webstore, **Active** and **Inactive**. Given below is an illustration of the life cycle of a Webstore. + +![Illustration of lifecycle of a webstore as active or inactive](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-pages-v3-pp-states.jpg.md) + +The table below lists the various states of a Webstore and gives a brief description of each state: + +Status | Description | Next Steps +--- +Active | Indicates the store has been created and saved. You can accept payments using this Webstore. You can edit this Webstore. | Customers can start making payments through this store. +--- +Inactive | Indicates the Webstore has been deactivated or has expired. You cannot accept payments using this Webstore. | Customers can no longer make payments through this Webstore. You can reactivate it to start accepting payments. There are three ways to reactivate:- Update Expiry Date. +- Click the **Reactivate** button. + +### Related Information + +- [How Razorpay Webstore Works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/how-it-works.md) +- [Create a Razorpay Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/create.md) +- [Search for Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/search.md) +- [Manage Webstore](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/webstore/manage.md) diff --git a/llm-content/payments/whatsapp.md b/llm-content/payments/whatsapp.md new file mode 100644 index 00000000..4d5266e9 --- /dev/null +++ b/llm-content/payments/whatsapp.md @@ -0,0 +1,25 @@ +--- +title: Razorpay - Payments on WhatsApp +heading: About Razorpay - Payments on WhatsApp +description: Integrate your WhatsApp Business Account with Razorpay to provide a smooth payment experience entirely within WhatsApp. +--- + +# About Razorpay - Payments on WhatsApp + +Razorpay - Payments on WhatsApp enables a seamless and secure payment experience completely within WhatsApp. Your customers can order, pay using their preferred payment method and easily track their orders in one place, without leaving the app. + +## Advantages + +- **Powerful Razorpay Checkout** + + Accept payments using over 100 [payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) including UPI, domestic and international cards, netbanking paylater, and EMI. Enjoy industry-leading conversion rates with our saved cards, direct checkout with UPI apps and native OTP features. +- **Fully immersive payment experience to boost conversions** + + Our swift checkout experience blends with the conversation to offer a smooth flow, thereby improving conversion rates and reducing drop-offs. +- **Quick and easy integration** + + Integrate and go live in just a few hours. Payments received on WhatsApp will reflect on the linked Razorpay account, and your current settlement schedule will continue. + +## Get Started + +To get started, [integrate Razorpay with your WhatsApp Business Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/whatsapp/integrate.md). diff --git a/llm-content/payments/whatsapp/faqs.md b/llm-content/payments/whatsapp/faqs.md new file mode 100644 index 00000000..162b8a08 --- /dev/null +++ b/llm-content/payments/whatsapp/faqs.md @@ -0,0 +1,41 @@ +--- +title: Frequently Asked Questions (FAQs) +description: Find answers to common questions about Razorpay Payments on WhatsApp, including integration steps, supported payment methods and how to enable in-app payments. +--- + +# Frequently Asked Questions (FAQs) + +### 1. What is Razorpay Payments on WhatsApp? + + Razorpay Payments on WhatsApp is a native in-app payment experience that enables your customers to complete transactions without leaving the WhatsApp chat. Customers can pay using their preferred payment methods including cards, UPI, netbanking, wallets and EMI options, all within the conversation flow. + + + +### 2. How do I integrate my Razorpay account with WhatsApp? + + The integration involves two main steps: + + **Step 1: Integrate with WhatsApp Business API** + + You must first [integrate with WhatsApp Business API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/whatsapp/integrate.md) through a Business Solution Provider (BSP). If you have not done this yet, you can fill out [Razorpay's BSP inquiry form](https://form.typeform.com/to/ZpLyqJnU) or check [Meta's Partner Directory](https://betasite.razorpay.com/docs/razorpay/IN/ISS-1476065-integration-support-faqs/payments/whatsapp/integrate/#:~:text=Meta%20Partner%20directory) to find a suitable BSP. + + **Step 2: Link Razorpay Account with WhatsApp** + + The linking process depends on your WhatsApp Business Account (WABA) ownership: + + - [Self-Owned WABA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/whatsapp/integrate.md#self-owned-waba) + - [BSP-Owned WABA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/whatsapp/integrate.md#bsp-owned-waba-obo-model) + + + +### 3. What types of payments are supported on WhatsApp? + + Razorpay WhatsApp integration supports only one-time payments. Recurring payments and subscriptions mandates are not supported through the WhatsApp channel. + + + +### 4. I want to send payment reminders to my clients via WhatsApp. What integration do I need? + + You need to integrate Razorpay with WhatsApp Business API. This requires two main steps: + 1. Obtain access to WhatsApp Business API through a Business Solution Provider (BSP). + 2. Link your Razorpay account with your WhatsApp Business Account to enable payment functionalities. diff --git a/llm-content/payments/whatsapp/integrate.md b/llm-content/payments/whatsapp/integrate.md new file mode 100644 index 00000000..fe282371 --- /dev/null +++ b/llm-content/payments/whatsapp/integrate.md @@ -0,0 +1,70 @@ +--- +title: Integrate Razorpay with WhatsApp Business Account +heading: Integration Steps +description: Steps to integrate Razorpay with your WhatsApp Business Account to accept Razorpay payments on WhatsApp. +--- + +# Integration Steps + +To enable Razorpay - Payments on WhatsApp: +1. [Integrate with WhatsApp Business API](#1-integrate-with-whatsapp-business-api) +2. [Link Razorpay Account to WhatsApp](#2-link-razorpay-account-with-whatsapp) + +## 1. Integrate With WhatsApp Business API + +You must integrate with the WhatsApp Business API through a Business Service Provider (BSP) to accept Payments on WhatsApp. + + +### WhatsApp Business API and BSPs + + - WhatsApp Business API provides automated messaging, chatbots, and customisation features. You can send messages in bulk and create customised messaging experiences with chatbots. If you have already integrated with WhatsApp Business API, you will see a green tick next to your business name. + ![Integrated with WhatsApp Business API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/whatsapp-api-integrated.jpg.md) + - BSPs are a worldwide community of third-party solution providers for the WhatsApp Business Platform. BSPs assist you in communicating with your clients on the WhatsApp Business Platform for approved use cases such as customer service and time-sensitive, customised notifications. + + +The steps differ based on the current status of your WhatsApp Business API integration. + +### New to WhatsApp Business API + +If you have not integrated with WhatsApp Business APIs, you can: + +- Fill [this form](https://form.typeform.com/to/ZpLyqJnU?typeform-source=www.google.com), and we will help you find a fully integrated BSP to integrate and go live with just a few clicks. +- Refer to the [Meta Partner directory](https://www.facebook.com/business/partner-directory/search?solution_type=messaging&ref=fmp_about_solution_card&capabilities=Payments&countries=IN&platforms=whatsapp) to find a suitable BSP. + +### Already Integrated With WhatsApp Business API + +Razorpay has partnered with major BSPs in the country, enabling effortless integration with only a few steps. To integrate with us, contact your BSP to integrate your Razorpay account with the WhatsApp Business API. If your BSP does not offer Razorpay integration, ask them to contact the Meta team. + +## 2. Link Razorpay Account With WhatsApp + +After integrating with the WhatsApp Business API through a BSP, you need to link your Razorpay account with WhatsApp. The steps differ based on who owns the WhatsApp Business Account (WABA). + +- [Self-Owned WABA](#self-owned-waba) +- [BSP-Owned WABA (OBO model)](#bsp-owned-waba-obo-model) + +### Self-Owned WABA + +If you use a self-owned WABA, follow the below steps to link your Razorpay account with WhatsApp. + +1. Log in to your Facebook Business Manager account. +2. Create a **Direct Pay Method**. +3. On the form, fill in details and give the method a name. This will be used to make API calls. +4. Select **Payment Gateway** as the option and choose **Razorpay** in the drop-down menu. +5. On submission, you will be redirected to Razorpay. Log in and allow Meta to request payments on your behalf. + +Know more about [linking self-owned WABA with Razorpay](https://developers.facebook.com/docs/whatsapp/on-premises/payments-api/payments-in/pg#direct-or-embedded-signups). + +### BSP-Owned WABA (OBO Model) + +If you use a BSP-owned WABA, below is the workflow to link your Razorpay account with WhatsApp. + +1. The BSP logs in to WhatsApp Manager. +2. Creates a **Direct Pay Method** and selects **Razorpay** as the payment gateway. +3. Shares the link generated with the business that will redirect them to Razorpay. +4. The business logs in and allows Meta to request payments on their behalf. The business must log in using the Facebook Business Manager account linked to the WABA. + +Know more about [linking BSP-owned WABA with Razorpay](https://developers.facebook.com/docs/whatsapp/on-premises/payments-api/payments-in/pg#on-behalf-of--obo--signups). + +## Next Steps + +After linking your Razorpay account with WhatsApp, you must integrate with [On-premises API](https://developers.facebook.com/docs/whatsapp/on-premises/payments-api/payments-in/pg) or [Cloud API](https://developers.facebook.com/docs/whatsapp/cloud-api/payments-api/payments-in/pg), based on your use case. diff --git a/llm-content/payments/widgets.md b/llm-content/payments/widgets.md new file mode 100644 index 00000000..f1c42f40 --- /dev/null +++ b/llm-content/payments/widgets.md @@ -0,0 +1,13 @@ +--- +title: Razorpay Widgets +heading: About Razorpay Widgets +description: Integrate with Widgets offered by Razorpay to improve conversion rates. +--- + +# About Razorpay Widgets + +Discover the power of Razorpay Widgets to boost conversion rates and create a delightful shopping experience for your customers and grow your business. + +- [Razorpay Trusted Business Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/trusted-business.md): You can seamlessly embed the widget on your website with just two integration steps to enhance trust. It provides information about your business's legitimacy and product/service quality, effectively reducing doubt and minimising drop-offs. + +- [Affordability Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/widget.md): Spread awareness about the affordability-based payment options (such as EMI, Cardless EMI, and Pay Later) and offers available to your customers even before they reach checkout to educate them and reduce cart abandonment. diff --git a/llm-content/payments/widgets/buyer-protection.md b/llm-content/payments/widgets/buyer-protection.md new file mode 100644 index 00000000..8b619ec1 --- /dev/null +++ b/llm-content/payments/widgets/buyer-protection.md @@ -0,0 +1,57 @@ +--- +title: Razorpay Buyer Protection +description: Enhance your customers' shopping experience with Razorpay Buyer Protection. Customers can initiate free claims and receive full reimbursement based on eligibility and provided details. +--- + +# Razorpay Buyer Protection + +- **Buyer Protection Changelog**: Discover new features, updates and deprecations related to the Buyer Protection (since Jan 2024). + + - **Troubleshooting & FAQs**: Find answers to frequently asked questions about Razorpay Buyer Protection. + +The Razorpay Buyer Protection Program ensures the safety of your customers' purchases. It offers customers added assurance and protection when using our platform in accordance with our terms and conditions outlined in the user agreement. Customers can initiate a claim at **no cost**. + +If eligible, the program provides a full reimbursement of the transaction value to the customer. Razorpay reserves the right to determine the validity and eligibility of claims based on the program's criteria and any relevant information shared during the resolution process. + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. Fill in the [form](https://razorpay.typeform.com/to/YpJfvpE6#name=xxxxx) or raise a request with our [ support team](https://razorpay.com/support/) to get this feature enabled on your account. +> + +## Parties Involved + +Term | Description +--- +Seller | The business that lists products on their website or app and is affiliated with Razorpay. +--- +Buyer | Customers who purchase products from sellers. +--- +Razorpay | The platform through which buyers can initiate claims. + +## Advantages for Sellers + +- **Increase in Customer Conversion** + + By showcasing that your customers' purchases are protected, you build trust and reassure them of safety against fraudulent activities. This trust encourages customers to complete their purchases, resulting in higher conversion rates. + +- **Improved ROI** + + Higher conversion rates, increased prepaid orders, and better customer retention lead to significant profit growth. Confident customers and fewer drop-offs contribute to a substantial return on investment. + +- **Boost in Prepaid Orders** + + With the added assurance, customers are more inclined to choose prepaid payment options. This trust encourages them to make upfront payments, reducing cart abandonment. + +- **Customer Retention and Repeat Purchases** + + A secure purchasing experience builds customer trust and loyalty over time. Satisfied customers are more likely to return for future transactions, increasing repeat purchases and improving retention. + +### Integration +You can integrate the widget on your [Shopify Store](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/buyer-protection/shopify.md). + +### Related Information +- [Money Back Promise](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/buyer-protection/money-back-promise.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/buyer-protection/faqs.md) diff --git a/llm-content/payments/widgets/buyer-protection/faqs.md b/llm-content/payments/widgets/buyer-protection/faqs.md new file mode 100644 index 00000000..836d7dfb --- /dev/null +++ b/llm-content/payments/widgets/buyer-protection/faqs.md @@ -0,0 +1,71 @@ +--- +title: Razorpay Buyer Protection | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Buyer Protection. +--- + +# Frequently Asked Questions (FAQs) + +## Seller + + +### 1. Why do I need Razorpay to offer Buyer Protection? Why cannot I offer purchase protection on my own? + + Razorpay processes millions of transactions daily, leveraging this extensive data to provide cost-effective customer protection. Our experience and established trust help us offer a higher level of protection and credibility that is difficult to achieve independently. + + + +### 2. How does Razorpay Buyer Protection benefit my business? + + Razorpay Buyer Protection enhances customer trust, leading to higher conversion rates and more prepaid orders. It also promotes repeat business, boosting customer loyalty and improving your return on investment. Know how Razorpay Buyer Protection [benefits your business](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/buyer-protection.md#advantages-for-sellers). + + + +### 3. How do I sign up for Razorpay Buyer Protection? + + You can either fill in the [form](https://razorpay.typeform.com/to/YpJfvpE6#name=xxxxx) or raise a request with our [ support team](https://razorpay.com/support/) to get this feature enabled on your account. + + +## Buyer + + +### 1. What is the Razorpay Buyer Protection Program? + + The Razorpay Buyer Protection Program enhances your shopping experience by providing added assurance and protection when you make purchases through Razorpay. This program allows you to initiate claims and potentially receive a full reimbursement based on eligibility and provided information. + + + +### 2. Is there a cost to initiate a claim under Razorpay Buyer Protection? + + No, initiating a claim under the Razorpay Buyer Protection Program is free for buyers. + + + +### 3. What is the eligibility criteria for making a claim? + + Refer to the [terms and conditions.](https://razorpay.com/terms/money-back-promise/) + + + +### 4. How does the Razorpay Buyer Protection claim process work? + + The process works as follows: + - You make a purchase and either receive incorrect/defective/damaged product or do not receive the product from the seller. + - If you want to return a product, first initiate the return process with the seller. If the return is denied, you must wait before filing a claim with Razorpay. + - If you do not receive the product, raise a complaint with the seller. If the seller refuses delivery, you must wait before initiating a claim with Razorpay. + - You initiate a claim with Razorpay, where eligibility is assessed and the seller's perspective is considered. + - Razorpay reviews your claim. + - If your claim is approved, Razorpay initiates and completes the refund. + Know more about the [Buyer Protection claim process and timelines](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/buyer-protection/money-back-promise.md#how-it-works). + + + +### 5. Can I re-initiate a claim? + + If your claim is rejected, you cannot initiate it again. + + + +### 6. Where can I raise my claim? + + You can visit [Razorpay Support](https://razorpay.com/support/) to raise a claim. Ensure you refer to the [terms and conditions](https://razorpay.com/terms/money-back-promise/) before you begin. diff --git a/llm-content/payments/widgets/buyer-protection/money-back-promise.md b/llm-content/payments/widgets/buyer-protection/money-back-promise.md new file mode 100644 index 00000000..6c114938 --- /dev/null +++ b/llm-content/payments/widgets/buyer-protection/money-back-promise.md @@ -0,0 +1,101 @@ +--- +title: Money Back Promise Program | Razorpay Buyer Protection Program +heading: Money Back Promise Program +description: Enhance your shopping with Money Back Promise Program; initiate free claims and secure full reimbursement based on eligibility and provided information. +--- + +# Money Back Promise Program + +Money Back Promise Program is designed to enhance your shopping experience. We provide buyers with added assurance and protection when making purchases through our platform, as outlined in our terms and conditions, which are part of the user agreement. As a buyer, you can initiate a claim for **free**. + +If eligible, Razorpay's Buyer Protection Program entitles you to a reimbursement of the full transaction value. Razorpay will determine, at its sole discretion, whether your claim amount and validity is eligible based on the program’s eligibility requirements and any relevant information provided during the resolution process. + +> **INFO** +> +> +> **Terms and Conditions** +> +> Razorpay considers several factors to determine whether your claim is eligible. Before you begin, refer to the [terms and conditions](https://razorpay.com/terms/money-back-promise/). +> + +## How It Works + +The following diagram displays the buyer journey and the respective timelines: + +![Buyer Protection Claim Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/buyer-protection-claim-flow.jpg.md) + +## Initiate a Claim + +Follow the steps given below to initiate a claim: + +1. Visit [Razorpay Support](https://razorpay.com/support/). +2. Click **Customer**. +3. In the **Track Payments** section, you can track with **phone number**. +4. Enter your phone number. Enter the OTP, select the **I'm not a robot** check box and click **Check Status**. + + +> **WARN** +> +> +> **Watch Out!** +> +> If you are unable to check the status, your mobile number might be incorrect or not verified with us. Ensure your mobile number is correct. To verify your number, contact our [support team](https://razorpay.com/support/). +> + + ![Enter phone number to select the order to initiate claim](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/buyer-claim.gif.md) + +5. A list of transactions backed by Razorpay Money Back Promise is displayed. Select the order you want to initiate a claim. +6. Scroll down to the **Covered by Razorpay Money Back Promise** section and click **Initiate Claim**. + ![Click initiate claim](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/buyer-initiate-claim.jpg.md) +7. Upload the following documents: + - **Proof of purchase** + - **Bank debit slip indicative of purchase of item** + - **Confirmation from Razorpay about transaction and the amount** + - **Proof of communication with seller on the dispute** +8. Click **Submit**. + ![Submit proofs to initiate claim](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/buyer-submit-proofs.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> Once your claim is approved, Razorpay will send you a payout link. Enter the bank account details where you want to receive the refund. +> + +## Claim Statuses + +The following table lists the various states of a claim: + +![Money Back Promise Program claim lifecycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/magic-buyer-protect-claim-cycle.jpg.md) + + +### Statuses and Descriptions + + + Status | Description + --- + Claim Initiated | The initial state of a claim, indicating that the buyer has uploaded the required documents and submitted the claim. + --- + Claim In-progress | The claim is currently under inspection and review. + --- + Claim Approved | The claim has been approved. Once approved, the reimbursement amount is credited to the buyer's account. + --- + Claim Cancelled | The claim has been cancelled by either the buyer or Razorpay and the reason for cancellation is specified. + --- + Claim Rejected | The claim has been rejected and the reason for rejection is specified. + + + +> **WARN** +> +> +> **Watch Out!** +> +> If a claim is rejected, the buyer cannot initiate the claim again. +> + + + +### Related Information +[FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/buyer-protection/faqs.md) diff --git a/llm-content/payments/widgets/buyer-protection/shopify.md b/llm-content/payments/widgets/buyer-protection/shopify.md new file mode 100644 index 00000000..a13ff5b7 --- /dev/null +++ b/llm-content/payments/widgets/buyer-protection/shopify.md @@ -0,0 +1,114 @@ +--- +title: Integrate Razorpay Buyer Protection With Shopify +description: Enhance your customers' shopping experience with Razorpay Buyer Protection widget on your Shopify website's product page. +--- + +# Integrate Razorpay Buyer Protection With Shopify + +- **Razorpay Buyer Protection Widget on Shopify Changelog**: Discover new features, updates and deprecations related to RazorpayBuyer Protection Widget on Shopify (since Jan 2024). + + - **Troubleshooting & FAQs**: Find answers to frequently asked questions about Razorpay Buyer Protection. + +Integrate Razorpay Buyer Protection widget into your Shopify website's product pages. + +**Before you proceed:** + +- Sign up for a [Razorpay account](https://dashboard.razorpay.com/signup). +- Log in to the Dashboard and [generate the API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) in Live mode. +- Sign up for a [Shopify account](https://www.shopify.in). + +> **INFO** +> +> +> **Feature Request** +> +> This is an on-demand feature. Fill in the [form](https://razorpay.typeform.com/to/YpJfvpE6#name=xxxxx) or raise a request with our [ support team](https://razorpay.com/support/) to get this feature enabled on your account. +> + +Follow these integration steps: + + - **1. Build Integration**: Integrate Buyer Protection Widget + + - **2. Test Integration**: Test the integration by making a test payment. + + - **3. Go-live Checklist**: Check the go-live checklist. + + +### Video Tutorial + + Watch this video to know how to integrate Razorpay Buyer Protection Widget on your Shopify Store. + +[Video: https://www.youtube.com/embed/Lyangg3UhXg?si=jk_5nrkVcwMixdRc] + + + +## 1. Build Integration + +Follow the steps given below: + +1. Log in to your [Shopify account](https://www.shopify.in). +2. Search for Razorpay Trusted Business or install the app directly from the [Shopify app store](https://apps.shopify.com/razorpay-trusted-badges). + ![Shopify RTB App Install](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-rtb-app-install.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> - If you have multiple stores, select the store for which you want to install the Razorpay Trusted Business. +> - In case you have already installed the app, navigate to **Apps** and search for **Razorpay Trusted Business** on the Shopify Dashboard. +> + +3. After installing the app, you will be directed to your Shopify store. Enter your Razorpay Live API Key ID and click **Save**. This step is necessary to verify your eligibility for the widget. Know how to [generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + ![Live api key id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/live-api-key-id.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> In case you are not redirected to the theme editor page, then navigate to **Online Store** in the **Sales channels** section and click **Themes**. Click **Customize**. +> ![Shopify theme editor page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-widget-theme-editor.jpg.md) +> + + +4. You will be redirected to the Shopify product configuration page. Under the **Template** section, hover below the **Price** and click on the icon to **Add block**. We recommend adding the widget below the product price. +5. Navigate to **Apps** and select **rtb-widget** (Razorpay Trusted Business). The customers will be able to view the widget below the product price. + ![Shopify default product page - buyer protect widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/buyer-protect.gif.md) +6. Click **Save** in the top right corner. + +#### Successful Activation + +Here is a glimpse of the default widget with offers and payment method options enabled. + +![Glimpse of the default widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/widgets-buyer-protect.jpg.md) + +## 2. Test Integration + +You can now preview and test the widget on the page where you integrated it. Follow the checklist: + +- **Widget Rendering**: Confirm that the RTB widget renders correctly on the decided location of the desired page. +- **Widget Interaction**: Interact with the widget to verify that users can click the widget to access additional information on the RTB website. +- **Responsive Design**: Resize the browser window or access the page on different devices to test the widget's responsiveness. +- **Widget Loading**: Ensure the widget loads quickly and smoothly without causing any delays or disruptions on the page it is integrated. + +## 3. Go-live Checklist + +You can now preview the widget on your product description page. Here is a glimpse of the default widget. + + +### On Web + + ![View the Buyer Protect widget on desktop](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/buyer-widget-desktop.jpg.md) + + + +### On Mobile + + ![View the Buyer Protect widget on mobile](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/buyer-widget-mobile.jpg.md) + + +### Related Information +- [Money Back Promise](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/buyer-protection/money-back-promise.md) +- [FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/buyer-protection/faqs.md) diff --git a/llm-content/payments/widgets/trusted-business.md b/llm-content/payments/widgets/trusted-business.md new file mode 100644 index 00000000..a379636d --- /dev/null +++ b/llm-content/payments/widgets/trusted-business.md @@ -0,0 +1,209 @@ +--- +title: Razorpay Trusted Business Widget +heading: About Razorpay Trusted Business Widget +description: Enhance your business credibility with the Razorpay Trusted Business Widget. Boost customer confidence about your business's legitimacy and minimise drop-offs. +--- + +# About Razorpay Trusted Business Widget + +Razorpay Trusted Business (RTB) Widget offers a simple solution to enhance trust and reduce drop-offs. You can seamlessly embed the widget on your website with two integration steps. + +This widget provides information about your business's legitimacy and product/service quality. It dynamically adjusts its content to match the purchase journey, product, business category, and individual customers, effectively reducing doubt and minimising drop-offs. + +![View the RTB widget on desktop](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-desktop.jpg.md) + + +### Use Cases + + The Razorpay Trusted Business widget enhances sales and conversions by boosting authenticity, credibility, and transaction safety, reducing cart abandonment and hesitation. It provides transparent refund policies for a trustworthy customer experience for: + + - Ecommerce Business + - Educational Industry + - Banking, Financial Services and Insurance Industry + - Travel Industry + - Startup + - Micro Business and Freelancers + - NGO + + +## How it Works + +The following diagram depicts the customer journey after integrating the Razorpay Trusted Business widget on your website: +![RTB Widget Flow Diagram](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-flow.jpg.md) + +## Prerequisites + +- Create a [Razorpay account](https://dashboard.razorpay.com/signup). +- Generate the API Keys on the Dashboard. You can use the [Test Mode keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) to test the integration and preview the Widget. Later, switch to **Live Mode** on the Dashboard, generate the [Live API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) and replace it with the test keys. +- Check if you are [eligible](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features/trusted-business.md#eligibility-requirements) for Razorpay Trusted Business on the Dashboard. + + +> **INFO** +> +> +> **Handy Tips** +> +> - The widget appears on your website only if you are eligible for RTB. +> - It renders only on domains you have whitelisted. Hence, ensure that the domains you wish to display the widget on are whitelisted with Razorpay. +> - Domain Whitelisting happens during the onboarding process. If not, you can raise a request with our [Support team](https://razorpay.com/support/#request). +> + +- Currently, the RTB widget is supported on Web and [shopify](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/widgets/trusted-business/rtb-widget-shopify.md). + + +### Where to place the Widget on your website? + + We recommend the following locations on your website to display the widget for better conversions: + + + Business Category | Location + --- + Ecommerce Business | In the product details page near the: - Product image +- Ratings +- Offers +- Buy Now or Add to Cart button + + --- + Educational Industry | In the payment links near the: - Business name +- Product amount + + --- + Banking, Financial Services and Insurance Industry | In the repayment, investment, premium payment links and onboarding links near the: - Business name +- Product amount + + --- + Travel Industry | - In the landing page near the business name. +- The checkout page near the product amount or booking details. + + --- + Startup, Micro Business and Freelancers | In the pricing page and landing pages near the: - Business name +- Product amount + + --- + NGO | In the checkout page and landing page near the: - Business name +- Product amount + + + + +## Integration Steps + +Follow these steps to integrate the RTB widget on your website: + + +### Step 1: Embed JS File in Website + + Use the following code to embed the JavaScript file into your website in the head section: + + ```js: Embed JS + + + ``` + + + +### Step 2: Add Widget on Website + + Create a custom Razorpay Trusted Business widget HTML element based on where you want to place the widget and link the following code to your HTML file. Replace the key with your Test Key generated from the Dashboard. + + ```js: Add Widget + + ``` + + `key` _mandatory_ + : `string` API Key id generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). For example, `rzp_test_XXXX00000XXXX`. + + + +## Customise Widget + + +### Use the following code to customise the widget: + + ```java: Customise + + ``` + + `key` _mandatory_ + : `string` API Key id generated from the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys). For example, `rzp_test_XXXX00000XXXX`. + + `dark-mode` _optional_ + : `boolean` Enable or disable dark mode for the widget. Possible values: + - `true`: Enable dark mode. + - `false` (default): Disable dark mode. + + `hide_attributes` _optional_ + : `comma separated string` Hide any information you do not want to display on the widget and RTB website. Possible values: + + - `age`: Indicates your brand's historical presence and experience. + - `transaction_history`: Your past transaction records and history. + - `ratings_review`: User-generated ratings and reviews of your business and product. + - `return_policy`: Your policy regarding product returns. + - `user_testimonials`: Testimonials and endorsements from previous customers. + - `purchase_protection`: Purchase protection-related details. + - `serviceability_details`: Product/service availability and shipping-related details. + - `social_media_details`: Your presence and activity on social media platforms. + - `customer_support_details`: Contact and support information for customers. + + +> **INFO** +> +> +> **Handy Tips** +> +> - By default, all the necessary information is displayed on the widget and RTB website. +> - Attributes provide valuable information to customers about your business. The algorithm determines the most effective attributes and what information should appear on the widget and RTB website to enhance conversions. +> + + + +## Test Widget + +You can now preview and test the widget on the page you integrated it. + + +### Follow the checklist to test the integration: + + - **Widget Rendering**: Confirm that the RTB widget renders properly on the decided location of the desired page. + - **Widget Interaction**: Interact with the widget to verify that users can click the widget to access additional information on the RTB website. + - **Responsive Design**: Resize the browser window or access the page on different devices to test the widget's responsiveness. + - **Widget Loading**: Ensure the widget loads quickly and smoothly without causing any delays or disruptions on the page it is integrated. + + + + +## Go Live With Widget + +After you preview and test the widget on your Dashboard, switch to the live mode to generate live API keys. Replace the test keys with these live keys to take the integration live. Know more about [live API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys). + +Your customers can view the widget on your website. Once they click the widget, it redirects them them to the RTB website to access more information. + +- Here is a glimpse of the default widget: + + +### On Web + + ![View the RTB widget on desktop](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-desktop.jpg.md) + + + +### On Mobile + + ![View the RTB widget on mobile](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-mobile.jpg.md) + + + + +- Here is a glimpse of the RTB website: + + + +### On Web + + ![Desktop view of the RTB website for more information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-website-desktop.jpg.md) + + + +### On Mobile + + ![Mobile view of the RTB website for more information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-website-mobile.jpg.md) diff --git a/llm-content/payments/widgets/trusted-business/faqs.md b/llm-content/payments/widgets/trusted-business/faqs.md new file mode 100644 index 00000000..082f2013 --- /dev/null +++ b/llm-content/payments/widgets/trusted-business/faqs.md @@ -0,0 +1,58 @@ +--- +title: Razorpay Trusted Business Widget | FAQs +description: Find answers to frequently asked questions about Razorpay Trusted Business Widget. +--- + +# Razorpay Trusted Business Widget | FAQs + +## For Businesses + + +### 1. What is Razorpay Trusted Business? How does it benefit me? + + Razorpay Trusted Business offers a trust badge to businesses to showcase their trustability and win consumer trust. This helps in improving customer confidence and hence reduces drop-offs in your buying journey. + + + +### 2. What is new in Razorpay Trusted Business Widget? + + Razorpay Trusted Business (RTB) is a badge on Razorpay's Checkout for a limited set of businesses. Additionally, we have launched a tamper-proof Razorpay Trusted Business Widget, which you can integrate into websites/apps, allowing you to showcase trust throughout the shopping journey instead of checkout. The eligibility criteria are upgraded to include more trust-worthy businesses to avail of RTB features. + + + +### 3. Why do I need Razorpay to offer this? Can I put a badge and offer purchase protection on my own? + + - Razorpay processes millions of transactions per day across millions of businesses. The intelligence gained through these transactions allows Razorpay to offer customer protection at a lower cost, which is primarily a risk problem. + - Razorpay offers several advantages developed over the years, such as consumer trust and strong brand awareness that makes customers feel secure and confident. + + + +### 4. How does Razorpay Trusted Business Widget benefit my business? + + RTB helps in improving your sales, reducing customer acquisition cost and reducing your return frauds. These are expected to improve your topline by 10% and net revenue by 15%. + + + +### 5. How do I sign up for Razorpay Trusted Business Widget? Are there any costs associated with these products? + + Check if you are [eligible](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features/trusted-business.md#eligibility-requirements)for Razorpay Trusted Business on the Dashboard. If eligible, you can activate it for a nominal fee, depending on the nature and size of your business. If you are not eligible, you can follow the instructions on the Dashboard to make your business eligible. + + +## For Customers + + +### 1. What is Razorpay Trusted Business Widget? + + Razorpay Trusted Business (RTB) is a suite of products provided by India's leading payment solutions provider, Razorpay. It is exclusively available to businesses exhibiting authenticity and secure payment systems. When you choose a business with the RTB, it indicates they have been assessed for authenticity and transaction safety, ensuring a smooth shopping experience and facilitating your purchase decision. + + + +### 2. How can I validate that a business is Razorpay Trusted? + + You can validate that a business is a Razorpay Trusted Business by clicking on the RTB icon in any of the RTB assets on the business's website. It will display the checks done on the business to determine their eligibility for RTB. + + + +### 3. How does Razorpay Trusted Business Widget benefit me as a customer? + + With 58% of online transactors in India experiencing money loss due to scams, RTB serves as the signal for trust on the internet, helping you identify businesses that are authentic and provide reliable services. diff --git a/llm-content/payments/widgets/trusted-business/rtb-widget-shopify.md b/llm-content/payments/widgets/trusted-business/rtb-widget-shopify.md new file mode 100644 index 00000000..ccda2d90 --- /dev/null +++ b/llm-content/payments/widgets/trusted-business/rtb-widget-shopify.md @@ -0,0 +1,129 @@ +--- +title: Integrate Razorpay Trusted Business Widget on Shopify +description: Enhance brand trust, boost conversions, and display Razorpay Trusted Business widget on your Shopify website's product page. +--- + +# Integrate Razorpay Trusted Business Widget on Shopify + +- **Razorpay Trusted Business Widget on Shopify Changelog**: Discover new features, updates and deprecations related to Razorpay Trusted Business Widget on Shopify (since Jan 2024). + +Integrate Razorpay Trusted Business (RTB) widget into your Shopify website's product pages. + +[Download Plugin](https://apps.shopify.com/razorpay-trusted-badges) + +## Get Started + +Follow the [integration steps](#integration-steps) to integrate the RTB on your [Shopify](https://www.shopify.in/) website. + +## Prerequisites + +- Sign up for a [Razorpay account](https://dashboard.razorpay.com/signup). +- Sign up for a [Shopify account](https://www.shopify.in). + +## Integration Steps + +Follow these steps to proceed with the integration: + + - **1. Build Integration**: Install the plugin. + + - **2. Test Integration**: Test the RTB widget. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +### 1. Build Integration + +Follow the below steps to install the plugin: + + +### Install the Plugin + + +> **INFO** +> +> +> **Handy Tips** +> +> If you are an existing Razorpay user, you can directly begin the integration process from step 4. +> + + 1. Create a [Razorpay Account](https://dashboard.razorpay.com/signup). + 2. Submit your KYC, and if we need any further clarification, we will reach out to you on WhatsApp, SMS and email. Once our team completes KYC verification and you are enabled to accept payments, we will send a confirmation on WhatsApp, SMS and email. + 3. Log in to your [Shopify account](https://www.shopify.in). + 4. **Install** [Razorpay Trusted Business](https://apps.shopify.com/razorpay-trusted-badges) from the Shopify app store. + ![Shopify RTB App Install](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/shopify-rtb-app-install.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> If you have multiple stores, select the store for which you want to install the RTB widget. +> + + 5. After installing the app, you will be directed to your Shopify store and asked to enter your Razorpay Live API Key ID. This step is necessary to verify your eligibility for the RTB badge. Know how to [generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) from the Dashboard. + 6. After getting your Live API Key ID, go to your Shopify store, enter your live key and click **Save**. If you are eligible, you will be redirected to your theme page. + ![Live api key id](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/live-api-key-id.jpg.md) + 7. Perform the following steps on the theme page: + 1. Select the **Default product** from the drop-down list. + 2. Click **Add block** under **Product information** from the left menu. + ![Shopify default product page add block](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-product-page-add-block.jpg.md) + 3. Select the **rtb-widget** to insert the RTB widget in your product page. + ![Shopify default product page-widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-product-page-widget.jpg.md) + 8. The RTB widget appears on your product page. You can drag and drop it to relocate, depending on your requirements. Click **Save** at the top right of your screen after adjusting. + ![Shopify RTB product screen](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-product-page.jpg.md) + 9. Visit your website, access one of the product pages, and preview the widget to see how it appears to your buyers. + + This completes your integration. + + +### 2. Test Integration + +You can now preview and test the widget on the page where you integrated it. Follow the checklist: + +- **Widget Rendering**: Confirm that the RTB widget renders correctly on the decided location of the desired page. +- **Widget Interaction**: Interact with the widget to verify that users can click the widget to access additional information on the RTB website. +- **Responsive Design**: Resize the browser window or access the page on different devices to test the widget's responsiveness. +- **Widget Loading**: Ensure the widget loads quickly and smoothly without causing any delays or disruptions on the page it is integrated. + +### 3. Go-live Checklist + +After previewing and testing the widget on your Shopify Dashboard, you must replace the test mode API keys with the live mode API keys. You can generate the [live mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys). from the Dashboard. + +Your customers can view the widget on your website. After they click the widget, it redirects them to the RTB website to access more information. + +- Here is a glimpse of the default widget: + + +### On Web + + ![View the RTB widget on desktop](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-desktop.jpg.md) + + + +### On Mobile + + ![View the RTB widget on mobile](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-mobile.jpg.md) + + + + +- Here is a glimpse of the RTB webpage: + + + +### On Web + + ![Desktop view of the RTB website for more information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-website-desktop.jpg.md) + + + +### On Mobile + + ![Mobile view of the RTB website for more information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-website-mobile.jpg.md) + + + + +## Support + +Queries: If you have queries, raise a ticket on the [Razorpay Support Portal](https://razorpay.com/support/). diff --git a/llm-content/payments/widgets/trusted-business/rtb-widget-woocommerce.md b/llm-content/payments/widgets/trusted-business/rtb-widget-woocommerce.md new file mode 100644 index 00000000..7061cd3c --- /dev/null +++ b/llm-content/payments/widgets/trusted-business/rtb-widget-woocommerce.md @@ -0,0 +1,113 @@ +--- +title: Integrate Razorpay Trusted Business Widget on WooCommerce +description: Enhance brand trust, boost conversions, and display Razorpay Trusted Business widget on your WooCommerce website's product page. +--- + +# Integrate Razorpay Trusted Business Widget on WooCommerce + +- **Razorpay Trusted Business Widget on WooCommerce Changelog**: Discover new features, updates and deprecations related to Razorpay Trusted Business Widget on WooCommerce (since Jan 2024). + +Integrate Razorpay Trusted Business (RTB) widget into your WooCommerce website's product pages. + +[Download Plugin](https://github.com/razorpay/razorpay-woocommerce/releases) + +## Get Started + +Follow the [integration steps](#integration-steps) to integrate the RTB widget on your [WooCommerce](https://woo.com/) website. + +## Prerequisites + +- Sign up for a [Razorpay account](https://dashboard.razorpay.com/signup). +- Set up your [WooCommerce store](https://woo.com/). + +## Integration Steps + +Follow these steps to proceed with the integration: + + - **1. Build Integration**: Install the plugin. + + - **2. Test Integration**: Test the RTB widget. + +- **3. Go-Live Checklist**: Check the go-live checklist. + +### 1. Build Integration + +Follow the below steps to install the plugin: + + +### Install the plugin + + +> **INFO** +> +> +> **Handy Tips** +> +> If you are an existing Razorpay user, you can directly begin the integration process from step 3. +> + + 1. [Sign up](https://dashboard.razorpay.com/signup?) for a Razorpay account. + 2. Complete your KYC process. To confirm your successful activation or clarify any KYC queries, we will contact you via WhatsApp, SMS and email. + 3. From the Wordpress Plugins list, [install](https://wordpress.org/plugins/woo-razorpay/) the latest Razorpay for WooCommerce plugin with RTB widget. + 4. After you install the plugin, go to the plugin settings and enter the Razorpay [API Key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) ID and secret. Click **save** to check eligibility for the RTB. + ![Enter API key id and secret](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/woocommerce-enter-keyid-secret.jpg.md) + If you are eligible, the option to enable the RTB widget will appear. Select the checkbox against **Enable RTB Widget?** and click **Save changes**. If you are not eligible, refer to our [eligibility requirements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/features/trusted-business.md#eligibility-requirements-for-razorpay-trusted-business-badge). + ![Enable RTB widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/enable-rtb-widget.jpg.md) + + This completes your integration. + + To verify the integration, visit your WooCommerce website and access any of your product pages. Preview the page to check how the RTB widget appears to your buyers. + ![RTB widget demo page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-demo-page.jpg.md) + + +### 2. Test Integration + +You can now preview and test the widget on the page where you integrated it. Follow the checklist: + +- **Widget Rendering**: Confirm that the RTB widget renders correctly on the decided location of the desired page. +- **Widget Interaction**: Interact with the widget to verify that users can click the widget to access additional information on the RTB website. +- **Responsive Design**: Resize the browser window or access the page on different devices to test the widget's responsiveness. +- **Widget Loading**: Ensure the widget loads quickly and smoothly without causing any delays or disruptions on the page it is integrated. + +### 3. Go-live Checklist + +After previewing and testing the widget on your Wordpress Dashboard, you must replace the test mode API keys with the live mode API keys. You can generate the [live mode API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#live-mode-api-keys) from the Dashboard. + +Your customers can view the widget on your website. After they click the widget, it redirects them to the RTB website to access more information. + +- Here is a glimpse of the default widget: + + +### On Web + + ![View the RTB widget on desktop](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-desktop.jpg.md) + + + +### On Mobile + + ![View the RTB widget on mobile](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-mobile.jpg.md) + + + + +- Here is a glimpse of the RTB webpage: + + + +### On Web + + ![Desktop view of the RTB website for more information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-website-desktop.jpg.md) + + + +### On Mobile + + ![Mobile view of the RTB website for more information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rtb-widget-website-mobile.jpg.md) + + + + +## Support + +Queries: If you have queries, raise a ticket on the [Razorpay Support Portal](https://razorpay.com/support/). diff --git a/llm-content/payroll.md b/llm-content/payroll.md new file mode 100644 index 00000000..a53fe4cc --- /dev/null +++ b/llm-content/payroll.md @@ -0,0 +1,38 @@ +--- +title: Razorpay Payroll Automation Software Set Up and Sign Up +heading: RazorpayX Payroll +description: Overview of the payroll automation software, RazorpayX Payroll. +--- + +# RazorpayX Payroll + +RazorpayX Payroll is the most advanced Payroll Software for startups and enterprises. You can manage payroll, attendance, reimbursements and compliances - all in a single Dashboard! It fully automates payroll solutions for you, including [compliance payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md) and filings. + +Payroll accurately calculates and disburses salaries after considering leaves and statutory deductions. You can deposit salaries into your employees' accounts directly without manual intervention. + +It even takes care of onboarding formalities and exit processes for your employees with tools like the Offer Letter generator, CTC calculator and Full and final settlement module. + +[Explore RazorpayX Payroll](https://razorpay.com/payroll/?r=docs&utm_source=google&utm_medium=organic) + +## Features + +With Payroll, you can automate many recurring transactions and view data insights and reports over a period of time. Here are some more salient features: + +- [Maintain employee documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/documents-letters.md). +- [Track attendance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/attendance.md). +- [View employee payslips](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/payslips-form16.md). +- [Manage employee insurance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/insurance/pazcare.md). +- [Calculate and deposit taxes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md) and file returns. +- [Manage reimbursements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/reimbursements.md). +- [Set up one-time account settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/quickstart.md). +- [Create User Roles and Approval Workflows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/user-roles-workflows.md). +- [Integrations with Third-party software](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations.md). + +## Plans + +There are three operational plans: **Prime**, **Elite** and a customisable **Enterprise** plan. Know more about the [Payroll plans](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/plans.md) and features. + +### Related Information + +- [Payroll Dashboard](https://payroll.razorpay.com/login) +- [RazorpayX Payroll Pricing](https://razorpay.com/payroll/pricing/) diff --git a/llm-content/payroll/administrator.md b/llm-content/payroll/administrator.md new file mode 100644 index 00000000..8d7b8077 --- /dev/null +++ b/llm-content/payroll/administrator.md @@ -0,0 +1,241 @@ +--- +title: RazorpayX Payroll Administrator User Role +heading: Administrator Role +description: Understand and manage your employees and contractors. Explore Admin role in HR and provide special permissions in RazorpayX Payroll. +--- + +# Administrator Role + +People in an organization, primarily the employees and the contractors, are the company's most valuable asset. It is important to honour their needs and requirements. + +Payroll ensures efficiency in your people management processes and streamlines how you manage people operations in your company. + +> **INFO** +> +> +> **Handy Tips** +> +> All the people added to RazorpayX Payroll as an `employee` by default. +> + +## Add Employees & Contractors + + +### Differences between Employee and Contractor + + Employees and contractors are different fundamentally, structurally and legally. Due to this, their employment and compensation processes are different too. + + Misclassification of employment can severely damage the working experience and work environment. The following section lists down the key differences between an employee and a contractor. + + + **Point of Difference** | **Employee** | **Contractor** + --- + Nature of Contract | Employed through a **Contract of Service**. | Employed through a **Contract for Service**. + --- + Compensation and Remuneration | Paid monthly salary. | Paid professional fees/stipends for services provided on an ad-hoc basis, which can be monthly as well, similar to a salary. + --- + Roles and Responsibilities | Has a specific set of responsibilities as per their designation and job description (JD). | Works on short-term or long-term projects and has project-specific duties only. + --- + Payroll Member | Considered to be on the permanent payroll of the company and is automatically included in Payroll. | Not considered to be on the permanent payroll of the company; is a part of accounts payable, and payments are processed through one-time payments in Payroll. + --- + Compliance | PF, ESI, Professional Tax, TDS and more apply to employees, and Payroll manages them. | Compliance charges and benefits are not applicable. + --- + Employee Benefits | Companies must allow employee benefits as per the statutory laws governing the region. | Contractors are exempt from benefits recommended by statutory laws unless the company mentions providing them on the service agreement. + --- + Taxation | Tax is deducted at source for employees. Due to compliance and employee benefits, one can avail tax-free schemes as an employee. | Payroll calculates TDS and other taxes as applicable, but the contractor is wholly responsible for other taxes payable. + + + + +### Convert Contractors to Employees and Vice Versa + + You can convert your contractors to employees and vice versa. To change employee classification: + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Go to **People** → particular employee's profile. + 1. Click **EDIT** against **Basic Information**. + 1. Under **Type of Employee**, change the classification. + + ![Changing employee type in Payroll.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-change-emp-type.gif.md) + + + +### Create Custom Employee IDs + + You can customise your employees' IDs (and contractor IDs) completely, or customise the existing identification options available in Payroll. To customise IDs: + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **Settings** → **Employee Data** → **EDIT**. + 1. Select the **Completely custom** IDs checkbox to enable custom IDs. + + You can clear the check box to use non-custom IDs, add organisation prefixes and choose different series for employees and contractors. + + + + What are completely custom IDs? + + + Custom IDs are free-to-enter IDs for your employees/contractors as a combination of letters and numbers. In a custom ID setup, Payroll does not auto-generate a series of IDs when you add an employee. + + + +### What are non-custom IDs? + + When you maintain non-custom IDs, Payroll auto-generates employee/contractor IDs using an internal counter and assigns it to new employees. The IDs are numeric. You can only modify the organisation prefix. + + In this setup, you can: + - Add a default prefix to your employee IDs. For example, `ABC`. + - Maintain different internal counters for employees and contractors. + - Opt for a different prefix for employees and contractors. + - Decide the length of the ID. For example, if the default length is 6, the employee ID, including the prefix and the numbers, is 6. + + + + + +> **WARN** +> +> +> **Watch Out!** +> +> We recommend you do not change the employee ID setup after adding employees. +> + + 1. Click **CONTINUE** to save the changes. + + + +## Onboarding + +When you someone to your organisation's payroll as an employee or a contractor, Payroll sends them a [welcome email](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md#employee-onboarding). This allows the employees to access the Employee Dashboard on Payroll. + +### Two-Factor Authentication + +On the Payroll Dashboard, 2FA is enabled by default for all [user roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/user-roles-workflows.md) except employees. You can enable two-factor authentication (2FA) for your employees and enhance access security. + + +### What is Two-Factor Authentication (2FA)? + + Two-factor authentication (2FA) is an enhanced security process where access to your organisation's Payroll Dashboard is validated at two levels: + - **Authorisation**: During sign in using email id and password. + - **Authentication**: After sign in, using OTP. + The two authentication modes ensure unauthorised members do not access the Payroll Dashboard. + + 2FA provides an additional level of security where it prevents unauthorised access to your Payroll account, stops financial and sensitive data compromises and mitigates other risks. + - When you authenticating via email/SMS/authenticator app-OTP, you verify your identity as configured by your organisation. + - 2FA is possible using OTPs/passwords sent to your email ids or phone numbers, or via a third-party authenticator app such as Google or Microsoft Authenticator. + + +To enable 2FA for employees: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **ADMIN OPTIONS** → **Settings**. Click **EDIT** against **Two Factor Authentication** at the bottom. +1. Select the check box for **Enable Two Factor Authentication for employees**. + ![2FA on Razorpay Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-2fa.jpg.md) +1. Click **CONTINUE**. + +This enables 2FA for all employees. To disable 2FA, clear the check box for **Enable Two Factor Authentication for employees**. + +> **INFO** +> +> +> **Handy Tips** +> +> Your employees can choose their preferred mode of authentication. +> + +### Troubleshooting Login + +You can perform the following actions to resolve employees' login issues, if any. + + +### Mail not Received + + If your employees report [not receiving any email](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md#unable-to-find-email) from Payroll, the following could be the reasons: + + - **Typos in the email address entered/provided**: + + In such cases, please check the email address entered. You can ask the employee/s to confirm and update their email address. + + - **Email marked as spam**: + + The email provider may be blocking emails from Payroll as spam. + - Advise your employees to check their spam folders. + - The organisation administrators can also re-trigger a welcome email from the employee's profile page. + - Employee can also visit the [Payroll Dashboard](https://payroll.razorpay.com/dashboard) → click **Forgot password?** to send themselves a password reset email. + + If none of these work, [contact us](mailto:xpayroll@razorpay.com). We will share the password reset link with you directly. + + +> **WARN** +> +> +> +> **Watch Out!** +> +> Ensure that you contact us through your registered email address or use your organisation's administrator's email address. +> + + + + +### OTP Not Received + + In some cases, your employees may report not receiving the OTP at their registered email address due the employee's email id being invalid. + + To resolve this, change the employee's registered email id. + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **People** in the left menu. + 1. Select and open the employee's profile. Click **EDIT** against **Basic Information**. + + ![Change employee email Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-change-employee-email.jpg.md) + 1. On the **Edit** page, change your employee's email id in the **Email** text box. + 1. Click **CONTINUE**. + + This resends the onboarding email to the employee post which they can log in to the Payroll Dashboard. [Contact Support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#razorpayx-payroll) if you face further issues. + + + +### Disable Login + + You can control your employee/contactor's access to the Dashboard. Disabling login is useful if there are concerns about unauthorized access or when an employee avails sabbaticals during which they may not access the Dashboard. + + To disable login: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **People** from the left menu. + 1. In the employee/contractor list, click on the employee's profile whose Dashboard access you must temporarily restrict. + 1. Click **DISABLE LOGIN**. + + You have successfully disabled access for that particular employee. + + +## Download/Export Documents in Bulk + +You can download documents such as payslips, reimbursement proofs, investment submission proofs, and employee documents in bulk as a ZIP file from the Payroll Dashboard. + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **ADMIN OPTIONS** → **Reports**. +1. Click the specific report to view and verify the details. +1. On the specific Reports page, select the relevant option to download/export the report. + - For some reports, you can select the date range. + - You can also email it to your registered email address. + + For example, Tax Deductions report is available to download CSV file. Click Export at the top-right corner and select format and mode in the **Download Tax Deductions Report** pop-up modal. + + ![Payroll Dashboard download reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-reports-export-download.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> Not all reports are available to download as a CSV. +> + +### Related Information + +- [Employees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md) +- [Leaves](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/leaves.md) +- [Attendance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/attendance.md) +- [Payroll Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md) diff --git a/llm-content/payroll/advance-salary.md b/llm-content/payroll/advance-salary.md new file mode 100644 index 00000000..5bf639ff --- /dev/null +++ b/llm-content/payroll/advance-salary.md @@ -0,0 +1,100 @@ +--- +title: Pay Advance Salary in RazorpayX Payroll +heading: Advance Salary +description: Set up, pay and manage advance salary disbursals. +--- + +# Advance Salary + +You can provide salary advances to your employees on the Payroll Dashboard. + +Payroll automates the salary advance process. We settle the advance amount against future payroll executions via monthly deductions. You can also customise the EMIs so that the employee pays the advance over several months. + + +### How is Advance Salary different from Employee Loans? + + In a salary advance, the organisation pays a portion of the employee's salary as an advance. The advance paid is recovered in installments from the employee and is usually interest-free. + + [Employee loans](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/loans.md) are a loan facility employers provide to their employees at a lower interest rate than the market rate. The EMIs are deducted from the employee's salary and on Payroll, you can modify the employee's EMI or skip the EMI when necessary. + + +## Enable Advance Salary Requests + +By default, you can provide advance salary to your employees on the Payroll Dashboard. However, you can also allow employees to request advance salary as necessary. + +1. Log in to the Payroll Dashboard. +1. Navigate to **Setting** → **Payroll Setup** → **EDIT**. +1. Select the **Let employees request salary advances** check box. + +This allows your employees to raise salary advance requests. + +## Create Advance Salary Request + +To create an advance salary request on your employee's behalf: + +1. Log in to the Payroll Dashboard. +1. Navigate to **Pay Employees** → **Advance Salary**. +1. On the **Advance Salary** → **NEW ADVANCE** tab: + 1. Enter the **Employee Name** and the **Amount**. + 1. Provide the **EMI** amount to deduct from the monthly net pay. Enter 0 in the EMI field if you do not wish to recover advance salary via EMI/recover the amount lumpsum. + 1. Provide any **Remarks**, if any. You can also provide a reason. + + ![Provide Advance Salary details on RazorpayX Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-new-advance-salary.jpg.md) +1. Click **ADD TO PENDING PAYMENTS**. + +This creates an advance salary request on your employee's behalf. + +### Approve Requests + +All advance salary requests that employees have raised are listed in the **PENDING REQUESTS** tab. To approve the requests: + +1. Log in to the Payroll Dashboard. +1. Navigate to **Pay Employees** → **Advance Salary**. +1. Click the **PENDING REQUESTS** tab. +1. Review the request and select the check box for a employee. Click **APPROVE**. Click **REJECT** to cancel the request. + +You have successfully approved/rejected an advance salary request. All approved requests are now moved to the **Pending Payments** section. + +> **INFO** +> +> +> **Handy Tips** +> +> You can also delete any of the pending payments. Click the delete icon against a specific pending payment. +> + +## Pay Advance Salary + +To pay advance salary: +1. Follow the steps to [create advance salary](#create-advance-salary-request) and [approve the requests](#approve-requests). +1. In the right pane, click **PAY NOW**. Ensure you have sufficient funds. +1. Enter the OTP you receive at your registered email address/authenticator app and authorise the payment. + +This successfully pays the advance salary to the employee. + +## Record External Payment + +If you have paid advance salary outside of Payroll, you must record it on your Payroll Dashboard. + +1. Log in to the Payroll Dashboard. +1. Go to **People** → click specific employee's profile. +1. Click **EDIT** against **Compensation & Perquisites**. +1. Enter the advance salary amount in the **Current Advance Salary** field. You can add the EMI amount, if any. + + ![Edit Current Advance Salary on Razorpay Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-advance-salary-record-ex-pay.jpg.md) + +## Check Ledger Reports + +To check the history of advance salaries your organisation has paid or to view the transaction record: + +1. Log in to the Payroll Dashboard. +1. You can either: + - Navigate to **Pay Employees** → **Salary Advance** → **Ledger** in the right pane. + - Go to **ADMIN OPTIONS** → **Reports** → **Ledger**. +1. In the Ledger report, select **Advance Salary** in filter **Type**. + ![Check Advance Salary transactions in payroll ledger](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-advance-salary-ledger.jpg.md) + +### Related Information + +- [Payroll Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md) +- [Salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md) diff --git a/llm-content/payroll/approval-workflow.md b/llm-content/payroll/approval-workflow.md new file mode 100644 index 00000000..1629185d --- /dev/null +++ b/llm-content/payroll/approval-workflow.md @@ -0,0 +1,190 @@ +--- +title: Set up Approval Workflow in RazorpayX Payroll | RazorpayX Payroll +heading: Create Approval Workflow +description: Check how to set up and operate approval workflows for RazorpayX Payroll. +--- + +# Create Approval Workflow + +You can set up Approval Workflows for processes on the [Payroll Dashboard](https://payroll.razorpay.com/dashboard) to ensure compliance, security and accuracy in critical decision-making. + + +### Advantages of Approval Workflows + + With approval workflows, you can: + - Segregate duties, enforce smoother collaboration and manage teams better. + - Promote autonomy, accountability and efficiency. + - Mitigate risks associated with critical business decisions. + - Ensure compliance and transparency. + - Audit financial transactions and ownership to reduce fraud and conflicts of interest. + + + +### Approval Workflow Use Cases + + Approval Workflow enables multiple teams to collaborate smoothly with the allowed permissions. It is useful in the following ways: + + - Approvers can check critical information changes such as updating bank details, salary revision, bonuses, contractor payments and more. + - Administrator/s can assign roles and ensure there are approvers to review and audit the request when another user is unavailable in the organisation. + - Approvers can verify the payouts made to employees and contractors. + + +## How it Works + +1. Set up [user roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/user-roles-workflows.md) in Payroll. +1. Create and save approval workflows and assign one or two levels of approvers on the Dashboard. +1. Your team/[collaborators](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/user-roles-workflows.md#view-collaborators)/user roles make a request and send it for the approvers' review. +1. The approvers receive and approve/reject the request from the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + +## Available Workflows + +You can create approval workflows for the following Payroll actions: + +- [Edit Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#additions-and-deductions) +- [Finalise Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#execute-payroll) +- [Salary Revision](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#revise-salary) + +Know more about the [Approver Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/approval-workflow/checklist.md). + +> **WARN** +> +> +> **Watch Out!** +> +> You must set up [user roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/user-roles-workflows.md) before creating approval workflows. Go to **Settings** → **User Roles & Workflows** → **User Roles** → **EDIT** on the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +> + +## Set Up Workflow + +To set up the workflow: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard) as the admin. +1. Navigate to **Settings** → **User Roles & Workflows** → **Workflows** → **EDIT**. +1. On the **Workflows** page, choose a Payroll process from the left menu to set up an approval workflow. + ![Approval Workflow Set Up on the Razorpay Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-approval-workflow-setup.jpg.md) + +## Create Workflow + +To create an Approval Workflow: + +1. Navigate to the **Workflows** page as shown in [set up](#set-up-and-manage-workflow). +1. Select the Payroll action from the left menu. +1. Click **Set-up workflow**. For example, **Edit Payroll**. +1. On the **Workflows** page: + 1. Enter the names of all the users you want to assign as approvers in the text box. For example, two finance role users, Gauri Kumari and Gaurav Kumar. + + ![Add Approvers on Payroll Dashboard for Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-approval-workflow-add-approvers.jpg.md) + + Ensure the users have the appropriate permissions to approve/reject as defined in the [user roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/user-roles-workflows.md). + + 1. Select the minimum number of approvals required at this level from the drop-down list. + + +> **INFO** +> +> +> **Handy Tips** +> +> If you assign five approvers and choose the minimum number of approvals required as two, then any two of the five approvers can approve the request. +> + + + 1. Click **Done**. You can add a second level of approvers if required. + + +### To add Second Level Approvers: + + + + For some payroll actions like providing loans or salary advances, you need approvals from a senior level or cross-functional managers. In such cases, you can add another level of approvers to review the request on the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + + To add a second level of approvers: + 1. Click **+ Add Level 2 Approvers**. + ![Add Approvers on Payroll Dashboard for Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-approval-workflow-add-approvers.jpg.md) + 1. Enter the names of user roles in the text box. Ensure the approvers have user roles assigned to them. + 1. Select the minimum number of approvals required from the drop-down list. + 1. Click **Done**. + + You have successfully added a second level of approvers. + + + + 1. Click **End Workflow & Save**. + ![Payroll end Approval Workflow process](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-approval-workflow-add-approvers.jpg.md) + +You have successfully set up an Approval Workflow. + +## Manage Workflows + +You can manage the approval workflows in the following ways: + + +### Edit Workflow + + +> **WARN** +> +> +> **Watch Out!** +> +> Editing the workflow rejects the pending requests previously created using the workflow. After saving the changes, you must [create the requests](#create-a-request) again. +> + + To edit an approval workflow: + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard) as the admin. + 1. Navigate to [Workflow settings](#set-up-and-manage-workflow). + 1. Select the Payroll action from the left menu. + 1. Click **Edit Workflow** on the **Workflows** page. + ![Edit Approval Workflow on the Razorpay Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-approval-workflow-edit.jpg.md) + 1. Click **Edit** against the level of approvers and make the relevant changes. + 1. Click **End Workflow & Save**. + + You have successfully edited and saved the workflow. + + + +### Copy Workflow + + You can copy an existing workflow if the new workflow matches the conditions of an older workflow. + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard) as the admin. + 1. Navigate to [Workflow settings](#set-up-and-manage-workflow). + 1. Select the Payroll action from the left menu. + 1. When creating the workflow, click **Copy existing workflow**. + ![Approval Workflow Set Up on the Razorpay Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-approval-workflow-copy.jpg.md) + 1. Select an existing workflow from the drop-down list. + 1. Review the workflow and click **End Workflow & Save**. + + You have successfully copied and saved the workflow. + + + +### Delete Workflow + + You can delete the workflow if you no longer need an approval workflow for any Payroll action. If there are pending items that require approval, the workflow rejects those requests, post which the workflow gets deleted. + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard) as the admin. + 1. Navigate to [Workflow settings](#set-up-and-manage-workflow). + 1. Select the Payroll action from the left menu. + 1. Click **Delete** → **Yes, reject and delete**. + + ![Delete Workflow modal on the Razorpay Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-approval-workflow-delete.jpg.md) + + You have successfully deleted the workflow. + + +## Create a Request + +After setting up an Approval Workflow, any member of the organisation can create requests on the Dashboard as necessary. +- Requests are successfully created only when there are no errors. +- You cannot edit requests after sending them for approval. + +When a maker performs any action requiring approval on the Payroll Dashboard, the assigned approvers receive the notification via email and the Dashboard. Approvers can then view the request on the [Approvals Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/approval-workflow/approvers.md). + +## Related Information + +- [Approvals Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/approval-workflow/checklist.md) +- [Approvals Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/approval-workflow/approvers.md) +- [User Roles and Workflows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/user-roles-workflows.md) +- [Salary Actions in Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md) diff --git a/llm-content/payroll/approval-workflow/approvers.md b/llm-content/payroll/approval-workflow/approvers.md new file mode 100644 index 00000000..c82f87fd --- /dev/null +++ b/llm-content/payroll/approval-workflow/approvers.md @@ -0,0 +1,114 @@ +--- +title: Approve Requests received via Approval Workflow on RazorpayX Payroll | RazorpayX Payroll +heading: Approvals Dashboard +description: Check the actions available as an approver on the RazorpayX Payroll Dashboard. +--- + +# Approvals Dashboard + +When you log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard) as an approver, you can access your pending requests in three ways: + +1. On the Payroll Dashboard Home Page under: + - **Quick Reminders**. + - **ADMIN OPTIONS** → **Approvals** in the left menu. +1. Respective action pages. That is, if you have approvals pending for **Edit Payroll** action, requests needing approvals are indicated on the **Edit Payroll** page. + +## Dashboard Actions + +All your pending requests are available on the **Approvals** page. On this Dashboard, you can: + +- Sort requests basis the dates you received them. +- Bulk select and approve/reject requests using the check box. +- Open the summary view to check the request and approval history. +- Provide remarks when approving/rejecting a request. +- Withdraw a request you have initiated. +- Check the following: + - **Pending Approvals**: Approvals that require your review. + - **Initiated by Me**: Approval requests initiated by you if you are the maker of that request. + - **Completed**: Approval requests you have already taken action on. + +![Approval actions like bulk select and filters on the Razorpay Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-approval-workflow-approva-overview.jpg.md) + +You receive only those requests for which you are an approver via the Dashboard and email. + +### Review Requests + +To review requests: +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard) as an approver. +1. Navigate to **ADMIN OPTIONS** → **Approvals** in the left menu. +1. On the **Approvals** page, view the requests sent to you, indicated by the number visible on the Dashboard. +1. You can either: + + + + Hover on the row and click APPROVE. + ![Approve requests on the Razorpay Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-approve-requests.jpg.md) + + + Open the summary view and click **✓ Approve**. + ![Approve requests on the Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-approve-requests-summary.jpg.md) + + + +You have successfully approved the request. + +To reject requests: + +1. Click REJECT when you hover on the request or in the summary view. +1. Enter the remarks in the text box modal for the rejection and click **Reject**. + ![Reject an approval request on RazorpayX Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-approval-workflow-reject-request.jpg.md) + +You have successfully rejected the request. + +> **INFO** +> +> +> **Handy Tips** +> +> You can also bulk approve/reject requests by selecting the check box at the top-left. Select and clear the check boxes against the requests and click the **Approve** or **Reject** button. +> ![Summary view of approval request on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-approvals-bulk.jpg.md) +> + +### Withdraw Requests + +On the Approvals Dashboard, you can withdraw the requests you have created. This is only possible when you are an approver in a workflow. + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot review and approve/reject the requests you have created as a maker. You can only withdraw the request. +> + +To withdraw/revoke a request you have initiated: +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **ADMIN OPTIONS** → **Approvals** in the left menu. +1. Select the Payroll action from the left menu and go to the **Initiated by Me** tab. +1. Review the request to withdraw. Hover on the request and click **WITHDRAW** or click **Withdraw Request** in the summary view. + ![Withdraw requests on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-approvals-withdraw.jpg.md) + + You can also bulk-select and withdraw multiple requests. + +You have successfully withdrawn the request you have created. + +### Request Statuses + +Following are the statuses of a request from the time it is created. + +Status | Description +--- +`Raised by` | This is the status after the maker creates a request. +--- +`Approved` | This is the status when you approve the request. +--- +`Pending` | This is the status when a request awaits review from a second level of approvers. +--- +`Rejected` | This is the status when you reject the request. + +The above statuses are available in the summary view of the request. You can also view them in the Audit Report under **Settings** on the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + +### Related Information + +- [Approvals Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/approval-workflow/checklist.md) +- [Salary Actions in Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md) diff --git a/llm-content/payroll/approval-workflow/checklist.md b/llm-content/payroll/approval-workflow/checklist.md new file mode 100644 index 00000000..0cfb3a23 --- /dev/null +++ b/llm-content/payroll/approval-workflow/checklist.md @@ -0,0 +1,71 @@ +--- +title: Approval Workflow Checklist in RazorpayX Payroll | RazorpayX Payroll +heading: Approval Checklist +description: Refer to the workflow checklist before approving requests on RazorpayX Payroll. +--- + +# Approval Checklist + +Before you approve requests on the [Approvals Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/approval-workflow/approvers.md), refer to the following checklist to understand what an approver must review in the request. + + + + +### For Edit Payroll + + Verify the following as an approver when you receive requests for [Edit Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#additions-and-deductions) actions: + - Employee name and employee id + - Payroll month + - New Additions and the amount added + - Previous Additions and the amount added + - New Deductions amount calculated from [Loss of Pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#loss-of-pay) + - Previous Deductions amount calculated from [Loss of Pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#loss-of-pay) + - New Arrears amount + - Previous Arrears amount + + When you reject a request, the employee's salary remains unchanged. This is not applicable to [skipping](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#skip-salary>) or [resuming](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#resume-skipped-salary) employees' salaries. + + + +### For Finalise Payroll + + Verify the following as an approver when you receive requests for [Finalise Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#execute-payroll) actions: + - Payroll month + - Number of employees whose payroll is finalised + - Number of employees whose payroll is skipped + + + You can check the details in the Salary Register linked on the Dashboard. + + + +### For Salary Revision + + Verify the following as an approver when you receive requests for [Salary Revision](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#revise-salary): + - Employee name and employee id + - Effective date + - Old CTC + - New CTC + - Arrears + - Variable pay + + + If you use a [custom salary structure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll.md#custom-salary-structure), check the following: + - Basic Salary + - Dearness Allowance + - HRA + - LTA + - Special Allowance + - PF contribution + - ESI contribution + - Total Custom Allowances + + + After you approve any Salary Revision request, we email that employee's manager about the revision. You can also withdraw the request if the revision is no longer applicable. + + +### Related Information + +- [Payroll Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/execute-payroll.md) +- [Approvals Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/approval-workflow/approvers.md) +- [Salary Actions in Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md) diff --git a/llm-content/payroll/attendance.md b/llm-content/payroll/attendance.md new file mode 100644 index 00000000..72048b85 --- /dev/null +++ b/llm-content/payroll/attendance.md @@ -0,0 +1,169 @@ +--- +title: RazorpayX Payroll Attendance Setup and Tracking +heading: Attendance Setup +description: Configure the attendance process in RazorpayX Payroll and integrate biometric devices as per your leave set up. +--- + +# Attendance Setup + +To configure the attendance for your employees you can: +- [Track Attendance](#track-attendance). +- [Integrate, configure and track attendance](#integrate-and-configure-biometric-device) using a biometric device. + +## Track Attendance + +You have three options via Payroll to track the attendance of your employees. + + +### Dashboard Attendance + + As a part of the default Payroll subscription, you can use the attendance module as applicable to your organisation. You can also enable or disable it from **Settings** on your Dashboard. + + + +### Custom Biometric Device + + You can set up a biometric device and integrate it with Payroll to track attendance. The device can use fingerprints or swipe cards to automatically log the check-in/check-out timings of all the employees and contractors in your organisation. + + It automatically synchronises all data with Payroll so you can see your attendance data through the web interface as well. You can set up using the [Device Configuration Flow](#integrate-and-configure-biometric-device). + + + +### APIs + + If you have your internal mechanism for maintaining leave and attendance, but would like to synchronize that data with Payroll, then you can use our API. This automates data synchronisation. For more details on APIs, check under **Settings** → **API**. + + + +### Jibble Integration + + Jibble can be connected to your Payroll account using API credentials. Unpaid employee leaves or loss of pay data can easily be fetched from Jibble and added as respective deductions. Know more about [Jibble Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/jibble.md) for attendance. + + +## Integrate and Configure Biometric Device + +You can integrate a CAMS device or a third-party device with Payroll to sort time management, leaves and holidays for your employees. Explore the following about the custom device integration for attendance: + +- Points to note about the [biometric integration](#biometric-integration). +- Set up and configure two types of devices: + - [Third-party device](#third-party-device-integration). + - [CAMS device](#cams-device-integration). + +Check the [troubleshooting guide](#cams-biometric-device-troubleshooting-guide) when setting up your CAMS biometric device. + +### Biometric Integration + +> **INFO** +> +> +> **Handy Tips** +> +> 1. Payroll supports [these biometric devices](https://camsunit.com/product/home.html). +> +> 2. In particular, we recommend the [F31 Facebot](https://camsunit.com/product/cams-f31-faceBot-face-recognition-attendance-access-control-api-supported.html) or [RSP10i9](https://camsunit.com/product/biometric-fingerprint-attendance-RSP10i9.html). We are not compatible with the i32 Macronium. +> +> In case you already have a third-party biometric device, you can test and configure it as mentioned in the [Third-Party device integration flow](#third-party-device-integration) below. +> + +As an Payroll user, you can directly purchase a device from the link given above. While adding the device to the cart, ensure you have added the **Biometric Integration with Razorpay Payroll System** option as well. This is necessary to set up the biometric device. + +After you receive the device, you just need to power it and connect it to the internet via WiFI/LAN. All your employees, contractors and new additions get automatically pushed to the device over this connection. + +Users must be associated with their fingerprints (or faces, depending on the device), and once this is done, the device automatically runs a trial for the check-in/check-out timings. + +> **INFO** +> +> +> **Handy Tips** +> +> In case you have more than one account on Payroll, you can integrate the same biometric device with multiple accounts. +> + +### Third-Party Device Integration + +You can integrate a third-party biometric device with Payroll. Follow the below mentioned steps to do so: + +1. To start the integration, you must first test the device's compatibility with Payroll on this site: [developer.camsunit.com](https://developer.camsunit.com/). +2. On this page, enter all the requested information. If the device is compatible, a success message appears that says **Device Verified**. +3. Purchase the [Biometric APIs](https://camsunit.com/product/cams-protocol-update-for-enabling-api-to-biometric-attendance-system.html). +4. On the checkout page, under **Add Services**, select **Razorpay - Biometric Integration with Razorpay Payroll System**, as shown. + ![Add services drop-down menu showing integration option with RazorpayX Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-time-management-add-services.jpg.md) +5. You have now successfully integrated the third-party biometric device with Payroll. Refer to the rest of the [CAMS device integration flow](#cams-device-integration) to set up your new device. + +### CAMS Device Integration + +After you have purchased a CAMS device, you can now integrate it with Payroll. To do so, follow the steps mentioned below: + +1. Visit the [CAMS unit page](http://www.camsunit.com/), and log in. + ![CAMS log in Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-biometric-integration1.jpg.md) +2. Navigate to **Device Status** and confirm if your device is online. If it does not appear online, ensure your device is connected to the internet. + ![CAMS - Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-biometric-integration2.jpg.md) +3. Click **Device Management**. Copy-paste the **Service Tag ID** into a text file. +4. In the **Device Management** tab, to the left of **Device Status** tab: + - Click the **Manage** icon. + - Ensure the callback URL has this value: `https://api.opfin.com/api/camsunitv3`. + - Make sure the encryption key is empty and click on the button to generate an auth token. + - Copy-paste the auth token into a text file as well. +5. Then go to the Payroll integrations page for CAMS. Here, enter the callback URL under **add a new device**. Also enter the **Service Tag ID** and auth token from steps 3 and 4 above. +6. Once the device setup is complete, we automatically push all of your Payroll data of employees and contractors to the device. + +> **WARN** +> +> +> **Watch Out!** +> +> This process can take up to an hour. Please do not add the employee details manually to the device, since they need to be added by our system for the device to work properly. +> + +7. Once the employees details appear on the device, you can register their fingerprints/faces on the device. The device starts syncing the data with Payroll attendance instantly. + +In case your there are troubles and errors in the setup process, you can refer to the [troubleshooting guide](#cams-biometric-device-troubleshooting-guide) provided below. + +### CAMS Biometric Device Troubleshooting Guide + +If your CAMS biometric device has issues like synchronising check-in data with Payroll, or not displaying all of your employees/contractors, follow the steps mentioned below. + + +### No Connectivity + + Most of the time, the device has lost internet connectivity and that must be restored. + - To check this, log in to the CAMS portal and check the **Device Status** tab as mentioned in the [CAMS device integration flow](#cams-device-integration). + - On this page, check the device status (shown by a green dot), and the **Last device connection time**. + + If the device appears offline or the last connected time is not in the past couple of minutes, please check the device's internet connectivity. + + + +### Provide Auth Token + + If the device is online and is not operating, follow these steps: + 1. Go to the **Device Management** tab. + 1. Click the **Manage** icon, and check the auth token. The auth token should be the same as what you see under **Integration** → **CAMS** → **Manage** on Payroll. + 3. Check your **callback URL**. It should have this value - `https://api.opfin.com/api/camsunitv3`. + + + +### Sync Employee Data + + If all of the above methods have failed, you can try to re-sync the employee data with the biometric device. + + 1. On the CAMS integration page, click on the `re-sync` button. This process can take up to 1 hour. + +> **WARN** +> +> +> **Watch Out!** +> +> **Do NOT** add your employees details to the device manually. They have to be pushed by Payroll. +> + + 1. If your employees details have been pushed to the device, register their biometrics on the device and do a trial check. The attendance data must be updated within 1 minute on Payroll. + + +If none of the above works, please [contact us](mailto:xpayroll@razorpay.com). + +### Related Information + +- [Admin Role](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md) +- [Leaves](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/leaves.md) +- [Salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md) diff --git a/llm-content/payroll/audit-reporting.md b/llm-content/payroll/audit-reporting.md new file mode 100644 index 00000000..90126152 --- /dev/null +++ b/llm-content/payroll/audit-reporting.md @@ -0,0 +1,51 @@ +--- +title: RazorpayX Payroll Auditing and Reporting Best Practices +heading: Audit & Reporting +description: Explore the audit processes and reporting features on RazorpayX Payroll. +--- + +# Audit & Reporting + +In a complex organisation with collaboration between multiple teams, it is important stay vigilant of the changes and permissions available to employees. RazorpayX Payroll helps you stay compliant and keep track of all your transactions and organisational changes. + +## Audit Readiness + +RazorpayX Payroll enables you to be compliant and audit ready all the time. Know more about setting up [user roles and workflows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/user-roles-workflows.md). + +### Approval Workflow + +Approval Workflow offers a set of multi-tiered approval hierarchies, aligned with different organisational structures. This ensures meticulous review and authorisation for various payroll transactions, minimising compliance risks and enhancing operational transparency. + +### Audit Trails + +RazorpayX Payroll captures detailed audit trails for all changes/edits made in the system. Your audit team can refer to the audit trails and ensure you follow a compliant payroll process. + +> **INFO** +> +> +> **Handy Tips** +> +> RazorpayX Payroll verifies employee details like bank account and PAN to ensure that salary is transferred to the right person and avoid money-loss issues at an extra cost. +> + +## Reporting on Payroll + +RazorpayX Payroll facilitates advanced reporting and analytics capabilities by consolidating data on a centralised dashboard for informed decision-making. You can use pre-built reports or request for custom ones using the employee data. + +Following are some reporting features available on the RazorpayX Payroll Dashboard: + +- **Role-Based Access Controls**: Organisations can configure role-based access controls to maintain data privacy. With customised access permissions based on roles, sensitive information is exclusively accessible to authorised individuals. +- **Data Unification**: RazorpayX Payroll integrates your data from multiple sources into a single, reliable repository. This unification ensures data consistency and accuracy, providing a comprehensive view of payroll information. +- **On-Demand Custom Reports**: RazorpayX Payroll supports flexible reporting, allowing you to extract relevant insights tailored to your organisational requirements. + +> **INFO** +> +> +> **Handy Tips** +> +> You can request for custom reports with the RazorpayX Payroll team. We will analyse the ask and share a timeline on a case-to-case basis. +> + +### Related Information + +- [Salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md) diff --git a/llm-content/payroll/bonus.md b/llm-content/payroll/bonus.md new file mode 100644 index 00000000..386d14de --- /dev/null +++ b/llm-content/payroll/bonus.md @@ -0,0 +1,186 @@ +--- +title: Bonus Management | RazorpayX Payroll +heading: Bonus +description: See how to manage bonuses and clawbacks in RazorpayX Payroll. +--- + +# Bonus + +A bonus is a one-time payment to an employee given outside of an employee's total salary. You can provide bonuses, set clawbacks, edit and delete bonuses for your employees on the Payroll Dashboard. + + +### Difference between Bonus and Variable Pay + + + + - Bonus is a non-recurring payment. + - It is not included in the employee's CTC. + - It can have a clawback. Suppose an employee leaves the organisation before a certain period. In that case, the employee pays the bonus amount back to the organisation during the [FNFS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/resignation.md#process-full-final-settlement) process. + + Examples include festive, joining, retention, milestone bonuses and more. + + + - Can be a recurring or a non-recurring payment. + - It is a part of the employee's CTC. + - Clawback is not applicable on variable pay. + + + + +## Setup Bonus Types + +Before you create bonus for an employee, you must configure the types of bonuses applicable for your organisation. + +For example, when your business cycle is seasonal, you may provide festive bonuses or profit-sharing bonuses to employees, but choose to not provide a joining or retention bonus. + +To configure bonus set up: +1. Log in to the Payroll Dashboard. +1. Navigate to **ADMIN OPTIONS** → **Settings** → **Bonus Types**. Click **Edit**. + ![Settings Payroll Setup Bonus Types Edit on Razorpay Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-bonus-settings.jpg.md) +1. On the Bonus Types page, select the relevant bonuses as applicable. + + You can also create a custom bonus type. Enter the name of the bonus in the text box and click **Add**. + + ![Razorpay Payroll Bonus Setup Enter custom bonus name Add](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-bonus-configure.jpg.md) +1. Click **Save**. + +You have successfully enabled the bonus types for your organisation. You can now create bonuses for your employees. + +## Create Bonus + +There are two steps to create a bonus for an employee: + + + +### 1. Add the Bonus Details + + 1. Log in to the Payroll Dashboard. + 1. Go to **ADMIN OPTIONS** → **People** → specific employee's profile. + 1. Navigate to **Compensation & Perquisites** in the employee's profile view and click **Create Bonus**. + ![Create bonus for employee on RazorpayX Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employee-bonus-create.jpg.md) + + The **Bonuses for Employee** page opens. Here you can create and manage bonuses for your employees. + 1. Click **Create a new bonus**. + ![Bonus for Employees page on RazorpayX Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-create-bonus-for-employee.jpg.md) + 1. 1. On the **Create New Bonus** page: + 1. Select a **Bonus Type** from the drop-down list. Click the link under the drop-down box to modify the [bonus setup](#prerequisites) of your organisation. + 1. Enter the bonus amount awarded to the employee in the **Bonus Amount** text box. + 1. Choose the **Bonus Status** from the drop-down list. + - Choose **Yet To Be Paid** to schedule the bonus payout for the upcoming month. + - Choose **Paid Already (Outside XPayroll)** to add an externally paid bonus payout. + 1. Select the month and year in **Payout Month**. If you paid the bonus outside of Payroll, select the month and year when you paid the bonus. + 1. Choose whether the **TDS Deduction** happens instantly or on a prorated basis. + 1. Add remarks as applicable. + + ![Add bonus details to create bonus on Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-bonus-create-process.jpg.md) + 1. Click **Next →**. + + This opens the **Add Clawback Rules** page. You can add a clawback rule, if applicable to the bonus (such as joining bonus). + + If a clawback rule is not applicable: + 1. Select the **No, I don't have any clawback rule** option. + 1. Click **Create Bonus**. + + + +### 2. Add Clawback Rule + + Suppose an employee leaves the organisation before a certain period during which the bonus is applicable. In that case, the employee pays back the bonus amount to the organisation during the [FNFS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#full-and-final-settlement) process. + + To add the clawback rule: + 1. Click **Next →** to go to the **Add Clawback Rules** page and select from the following options: + - **No, I don't have any clawback rule**. + - **Yes, I have clawback rule**. + + For example, clawback rule may not apply to a festive bonus but is applicable on a joining bonus. + 1. If the clawback rule is applicable, select **Yes, I have a clawback rule**. + 1. Add the clawback duration in the **Number of Months** text box. + + If the employee leaves within these months, the clawback is applicable and is settled during the [FNFS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#full-and-final-settlement) process. + + ![Add clawback rule for bonus in RazorpayX Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-bonus-clawback.jpg.md) + + 1. Click **Create Bonus**. + + + + +You have successfully created a bonus with a clawback rule. You can view the bonus details in the following pages on Payroll: +- On the respective employee's profiles as shown in [Manage Bonus](#manage-bonus). +- Bonus Report on the banner on the **Run Payroll** page. You can also view the number of bonuses included in the monthly payroll here. +- In the [Bonus Report](https://payroll.razorpay.com/reports/bonus). + - You can download this report as a `CSV` file. + - You can also edit the bonus details from this page. + +## Manage Bonus + +To manage bonuses provided to an employee: + +1. Log in to the Payroll Dashboard. +1. Navigate to **ADMIN OPTIONS** → **People** → click specific employee's profile. +1. Go to **Compensation & Perquisites** → **Manage Bonus**. You can also view the number of bonuses provided to the employee here. + + ![Manage bonus for employee on Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-bonus-manage.jpg.md) + +You can [create additional new bonuses](#create-bonus), [edit](#edit-bonus), [delete](#delete-bonus) unpaid bonuses and manage [bonus settlement on dismissal](#settle-bonus-on-dismissal). + + +### Edit Bonus + + To edit a bonus: + + 1. Log in to the Payroll Dashboard. + 1. Go to the **Bonuses for Employee** page as shown in [manage bonus](#manage-bonus). + 1. Click on the bonus to edit the details. + 1. Change the required details on the **Manage Bonus** page and click **Next →**. + ![Edit bonus details in RazorpayX Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-bonus-edit.jpg.md) + 1. Edit the clawback rule as applicable. + 1. Click **Save Changes**. + + You have successfully edited and saved the changes to the employee's bonus. + + +> **WARN** +> +> +> **Watch Out!** +> +> You can edit only the clawback period of a bonus paid via Payroll. +> + + + + +### Delete Bonus + + In some cases, you may need to cancel an upcoming, unpaid bonus. To delete a bonus: + + 1. Log in to the Payroll Dashboard. + 1. Go to the **Bonuses for Employee** page as shown in [manage bonus](#manage-bonus). + 1. Click on the bin icon on a specific bonus to delete that bonus. + ![Delete bonus in Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-bonus-edit-delete.jpg.md) + 1. Click **Delete now** in the **Delete Bonus** pop-up window. + + You have successfully deleted a bonus. The number of bonuses for that employee decreases in their profile view. + + + +### Settle Bonus on Dismissal + + When you [dismiss an employee](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#terminate-and-run-last-payroll) on Payroll, we automatically calculate the bonus (when clawback is applicable) and settle it. + + It reflects on the **Full & Final Settlement** form as a deduction with Bonus Recovery as the **Label**. You can edit the recovery amount here. + ![Full & Final Settlement bonus deduction](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-bonus-fnf-edit.jpg.md) + + To check how the deduction reflects on the employee's payslip: + + 1. Log in to the Payroll Dashboard. + 1. Go to **ADMIN OPTIONS** → **Run Payroll**. + 1. Select the payroll month on the right pane. + 1. Click on the **Gross Pay** amount against the dismissed employee's details to view the preview version of the employee's payslip. + + +### Related Information + +- [Execute Payroll Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/execute-payroll.md) +- [Salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md) diff --git a/llm-content/payroll/bulk-onboarding.md b/llm-content/payroll/bulk-onboarding.md new file mode 100644 index 00000000..b1dce9e4 --- /dev/null +++ b/llm-content/payroll/bulk-onboarding.md @@ -0,0 +1,134 @@ +--- +title: RazorpayX Payroll Bulk Onboard Employees +heading: Bulk Onboard Employees +description: Learn how to onboard information for multiple employees using RazorpayX Payroll's bulk onboard feature. +--- + +# Bulk Onboard Employees + +The Bulk Onboard Employees feature in RazorpayX Payroll enables you to onboard multiple employees or part-time employees simultaneously. This functionality streamlines administrative processes and ensures data consistency across your workforce. When managing numerous employee records, this feature eliminates the need to add records individually, thereby increasing efficiency and accuracy. + +Common use cases include: +- **Fresh Hire Batches** + + Onboarding multiple employees simultaneously for seasonal hiring or project ramp-ups. This streamlines the integration process when bringing on groups of new permanent staff members during peak recruitment periods or when scaling teams for new initiatives. + +- **Contractual Resource Deployment** + + Rapidly onboarding multiple contractors for time-sensitive projects. This focuses on efficiently integrating specialised external talent to meet urgent business needs while ensuring proper access, training, and alignment with project objectives. + +## Step-by-Step Bulk Onboard Process + + +### Step 1: Access the Bulk Onboard Feature + + 1. Navigate to the **People** section in your RazorpayX Payroll dashboard. + 2. Click **Add** in the upper right corner + 3. Select **Multiple Employees** from the add drop-down menu. + ![](/docs/assets/images/multiple-employees.jpg) + +> **INFO** +> +> +> **Handy Tips** +> The Bulk Onboard feature works for both regular employees and part-time employees. You can onboard information for both categories in a single operation. +> + + + + +### Step 2: Download the Template + + 1. In the Bulk Onboard modal, click the **Download Template** button. + 2. The system will provide you with a downloadable template. This serves only as a format for the data and does not contain any pre-filled details. You will need to enter the employee information as per the template. + 4. Save the template to your local system. + + +> **INFO** +> +> +> **Handy Tips** +> The downloaded template contains the required format making it easier for you to identify which fields are mandatory. Only modify the information you wish to update and leave other fields unchanged. +> + + + + +### Step 3: Update the Template + + 1. Open the downloaded template in Microsoft Excel or a compatible spreadsheet application. + 2. Fill in the employees information who needs to be onboarded. + 3. Make the necessary changes to the relevant fields. + 4. Do not add or remove any columns from the template + 6. Save the file after making your updates. + + + +### Step 4: Upload the Updated Template + + 1. Return to the RazorpayX Payroll dashboard and the Bulk Onboard modal. + 2. In the **Upload** section, either: + - Click the **Upload** button and select your updated file. + - Drag and drop your file into the designated area. + 3. Only .xlsx and .xls formats are allowed with a maximum size of 5MB. + 4. Wait for the file to upload (a progress indicator will show the upload percentage). + ![](/docs/assets/images/bulk-update-button.jpg) + + +> **WARN** +> +> +> **Watch Out!** +> +> Once you have uploaded the template, you can download the error report (if any) using the **Download Report** button. +> +> ![](/docs/assets/images/bulk-error.jpg) +> +> + + + + + +### Step 5: Preview and Verify Updates + + 1. After uploading, the system displays a preview of all employees' data. + 2. The preview screen highlights what information is uploaded. + 3. Use the **Filter** options to focus on specific types of data. + ![](/docs/assets/images/bulk-filter-preview.jpg) + 4. Sort the data to organise the preview and identify potential misses. + 5. Review carefully for any errors or missing information + + +> **INFO** +> +> +> **Handy Tips** +> The preview stage is crucial for catching potential errors. Use the filter and sort options to systematically review different types of updates (For Example, filter by department to verify all department changes). +> + + + + +### Step 6: Complete the Upload Process + + 1. After carefully reviewing all changes, click the **Complete Upload** button. + ![](/docs/assets/images/bulk-preview.jpg) + 2. The system processes the updates and applies the changes to employee records. + 3. Upon successful processing, a confirmation message appears. + ![](/docs/assets/images/bulk-update-done.jpg) + + +After completing the bulk onboarding: + +1. All updates will be reflected from next unfinalised payroll. No changes shall be made to already finalised payroll. +2. Onboarded employees' information is immediately reflected in the system. +3. Reports will automatically incorporate the employees information and generate a missing error report in case of misses. +4. Any compliance implications from the onboarded list are automatically handled by the system. + +> **INFO** +> +> +> **Handy Tips** +> After a major onboarding, it is a good practice to verify a few random employee profiles to ensure that all the employees have been onboarded correctly. This can be done directly from the People dashboard. +> diff --git a/llm-content/payroll/bulk-update.md b/llm-content/payroll/bulk-update.md new file mode 100644 index 00000000..136a962e --- /dev/null +++ b/llm-content/payroll/bulk-update.md @@ -0,0 +1,146 @@ +--- +title: RazorpayX Payroll Bulk Update Employee Details +heading: Bulk Update Employee Details +description: Learn how to update information for multiple employees using RazorpayX Payroll's bulk update feature. +--- + +# Bulk Update Employee Details + +The Bulk Update Employee Details feature in RazorpayX Payroll enables you to update multiple employees or contractors simultaneously. This functionality streamlines administrative processes and ensures data consistency across your workforce. When managing numerous employee records, this feature eliminates the need to update records individually, thereby increasing efficiency and accuracy. + +Common use cases include: +- **Organisational Changes:** Updating information for multiple employees simultaneously during department restructures or designation changes. + +- **Compliance Data Updates:** Quickly updating statutory information such as PAN, PF UAN numbers, and other compliance-related details for multiple employees. + +## Step-by-Step Bulk Update Process + + +### Access the Bulk Update Feature + + 1. Navigate to the **People** section in your RazorpayX Payroll dashboard. + 2. Click **Add** in the upper right corner. + 3. Select **Bulk Update Employee Details** from the dropdown menu. + ![](/docs/assets/images/bulk-update-dropdown.jpg) + +> **INFO** +> +> +> **Handy Tips** +> The Bulk Update feature works for both regular employees and contractors. You can update information for both categories in a single operation. +> + + + + +### Download the Template + + 1. In the Bulk Update modal, click the **Download Template** button. + 2. The system will provide you with a downloadable template. This template contains the required format for your updates. + 3. Save the template to your local system. + + +> **INFO** +> +> +> **Handy Tips** +> The template has two tabs that need to be filled out as needed. Review the instructions carefully before proceeding with your updates. +> + + + + +### Review the Template Instructions + + Before updating the template, carefully review the instructions provided: + 1. The template has two tabs. Fill out both as needed. + 2. Do not add or remove any columns. + 3. There is a limit of 500 employees per upload. + 4. If a field is empty, leave it blank (do not enter "-", "NA", and so on.). + 5. Avoid using all capital letters for names, addresses, titles, etc. + 6. Mandatory fields are mentioned with * sign. + 7. Date should be mentioned in DD/MM/YYYY format. + 8. Bank account number should be added with leading "0" if applicable. + 9. Do not make any changes or updates to the employee's email ID. + + + +### Update the Template + + 1. Open the downloaded template in Microsoft Excel or a compatible spreadsheet application. + 2. Fill in the employees information who needs to be updated. + 3. Make the necessary changes to the relevant fields. + 4. Do not add or remove any columns from the template. + 5. Save the file after making your updates in .xlsx or .xls format. + + +> **INFO** +> +> +> **Handy Tips** +> Only modify the information you wish to update and leave other fields unchanged. This helps minimise errors and ensures only intended information is modified. +> + + + + +### Upload the Updated Template + + 1. Return to the RazorpayX Payroll dashboard and the Bulk Update modal. + 2. In the **Upload File** section, either: + - Click the **Upload** button and select your updated file. + - Drag and drop your file into the designated area. + 3. Only .xlsx and .xls formats are allowed with a maximum size of 5MB. + 4. Wait for the file to upload (a progress indicator will show the upload status). + 5. Once uploaded successfully, you will see a green checkmark next to the file name. + + +> **WARN** +> +> +> **Watch Out!** +> +> By updating employee details, you agree that RazorpayX will verify their PAN and bank account information for accuracy and compliance. Ensure all details are entered correctly to avoid verification issues. +> + + + + + +### Preview and Verify Updates + + 1. After uploading, click the **Upload & Preview** button to proceed to the preview screen. + 2. The system displays a preview of all employee data that will be updated. + 3. You can switch between regular **Employees** and **Part-Time Employees** tabs to review different categories. + 4. The preview shows details such as Name, Email Address, PAN, PF UAN, and other updated information. + ![](/docs/assets/images/bulk-update-preview.jpg) + 5. Use the filter options (such as "Employee Data: PAN, PF UAN") to focus on specific types of data. + 6. Review the information carefully for any errors or discrepancies. + 7. The system will show the total number of records being processed and how many are currently displayed. + + +> **INFO** +> +> +> **Handy Tips** +> The preview stage is crucial for catching potential errors. Use the pagination controls at the bottom of the screen to navigate through all records, especially when updating a large number of employees. +> + + + + +### Complete the Update Process + + 1. After carefully reviewing all changes, click the **Confirm Upload** button. + 2. The system processes the updates and applies the changes to employee records. + 3. Upon successful processing, a confirmation message appears. + 4. If you need to make any adjustments, click the **Back** button to return to the previous screen. + ![](/docs/assets/images/bulk-update-confirm-upload.jpg) + + +After completing the bulk update: + +1. All updates will be reflected in the employee/part-time employees profiles immediately. +2. Changes to salary or compensation details will be applied from the next unfinalised payroll. No changes shall be made to already finalised payroll. +3. Reports will automatically incorporate the updated information. +4. Any compliance implications from the updates are automatically handled by the system. diff --git a/llm-content/payroll/changelog.md b/llm-content/payroll/changelog.md new file mode 100644 index 00000000..b8928855 --- /dev/null +++ b/llm-content/payroll/changelog.md @@ -0,0 +1,48 @@ +--- +title: Changelog for RazorpayX Payroll documentation and product updates. +heading: Payroll Changelog +description: List of updates in RazorpayX Payroll, including new feature releases and improvements. +--- + +# Payroll Changelog + +- **API Changelog**: Discover new releases and updates regarding Razorpay APIs. + + - **RazorpayX Changelog**: Discover new releases and updates regarding RazorpayX products. + +The following table records changes made to RazorpayX Payroll since Jan 2024: + +Month-Year | Feature | Description +--- +April 2025 | Form 24Q | Payroll introduced check for [ accurate 24Q filing.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tds/form-24Q.md) +--- +March 2025 | Salary Component Library | Create [custom salary components](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/component-library.md) for your organisation. +--- +Feb 2025 | Provident Fund | Payroll has resumed automated registration and PF payments for employees. This was paused due to 2FA rule on the PF portal. +--- +Dec 2024 | Tax Deductions | Create [investment declaration and proof upload windows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tax-deductions-setup.md) for your organisation. +--- +Nov 2024 | 2FA | Introduced [2-factor authentication](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#two-factor-authentication) for the following actions: + - [Contractor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md#contractor-payments) +- [User role creation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/user-roles-workflows.md#create-user-roles) +- [Payroll execution](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#execute-payroll) +- [Pay advance salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/advance-salary.md#pay-advance-salary) +- [Pay reimbursements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/reimbursements.md#pay-reimbursements) +- [Create an employee loan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/loans.md#create-a-loan) +- API access + + +--- +Sep 2024 | Professional Tax | Due to mandatory 2FA implementation by the Karnataka Government, [automated PT payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/professional-tax.md#pt-payment-for-karnataka-employees) via Payroll for employees residing in Karnataka are temporarily paused. +--- +Aug 2024 | Provident Fund (PF) | Due to mandatory 2FA implemented by the EPFO, [automated PF payments and registration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/faqs.md#pf-payments) for employees via the Payroll Dashboard is temporarily paused. +--- +Aug 2024 | 2FA | Introduced mandatory [2-factor authentication](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#two-factor-authentication) for administrators and user roles during login when accessing the Payroll Dashboard for secure money movement. +--- +Aug 2024 | Budget Changes | Revised the payroll calculations per the [changes introduced](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md) in the Union Budget for the new regime. +--- +July 2024 | LWF | Introduced [enabling LWF for employees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md#labour-welfare-fund-lwf) from their profiles. +--- +May 2024 | Fund Loading | Introduced Source Account Validation to ensure secure fund transfer and payments. +--- +May 2024 | Approval Workflow | You can set up [approval workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/approval-workflow.md) and add approvers for core payroll and salary revision actions. diff --git a/llm-content/payroll/component-library.md b/llm-content/payroll/component-library.md new file mode 100644 index 00000000..b7ec0fa0 --- /dev/null +++ b/llm-content/payroll/component-library.md @@ -0,0 +1,173 @@ +--- +title: Customise salary components and tax deductions with RazorpayX Payroll’s settings +heading: Salary Component Library +description: Standardise payroll with RazorpayX Payroll’s Salary Component Library for accuracy & compliance. +--- + +# Salary Component Library + +The Salary Component Library in RazorpayX Payroll is a structured repository that standardises salary components. It categorises additions and deductions so you can easily define and manage salary components. It also ensures compliance with tax and statutory regulations. + +When setting up payroll, different components make up an employee's salary—some add to their pay like bonuses, while others deduct from it like ad-hoc damage repairs. In RazorpayX Payroll, you can customise both addition and deduction components to suit your organisation’s salary structure. + + +### Features + + + Feature | Improvement | Example + --- + **Standardised Salary Component** | Admins can set up a salary component library with predefined and custom components for consistency | Earlier, one employee's bonus was labelled “Performance Bonus” and another’s as “Year-end Bonus,” creating confusion. Now, admins define a single “Bonus” component, ensuring uniform payroll calculations. + --- + **Controlled Component Editing**| Only the amount can be modified while executing payroll by admins; name and taxability remain fixed for uniformity. | HR teams often renamed allowances per employee, leading to payroll mismatches. Now, admins lock names and taxability while allowing only amount adjustments for consistency. + --- + **Tax Calculations** | Admins ensure accurate tax handling with a clear distinction between gross and net pay deductions. | An employee eligible for a ₹15,000 exemption had only ₹10,000 exempted due to manual errors, resulting in unnecessary taxation. Now, predefined setup ensures the correct exemption based on salary eliminating errors and ensuring compliance. + --- + **Compliance Updates** | Payroll enables automatic tax compliance with government regulations. + | If the PF wage ceiling increased, outdated deductions could lead to penalties. Now, the system alerts admins to regulatory changes and blocks payroll processing until compliance is ensured, preventing errors and legal risks. + + + + + + + A Custom Addition Component is any salary element that increases an employee’s total earnings. + + + By defining addition components, you can ensure employees receive the right benefits while maintaining compliance with tax rules. You also get to standardise salary components so that similar components are treated the same way for all employees. + + To add a new custom addition component: + + 1. Navigate to the **Settings→Salary Component Library→Edit.** + ![](/docs/assets/images/component-lib-edit.jpg) + 2. Click **Create component** and select **Earning** from the dropdown. + ![](/docs/assets/images/create-component.jpg) + 3. Fill in the **General & Pay Configuration** details: + - Enter a **Component name** (make sure it's unique as two components cannot be of the same name). + - Add a **Display name in payslip and salary register**(this will show up in payslip and reports). + - Write a **Component Description** to explain what it is used for. + + 4. Set up **Prorations and Arrears**: + 5. Click **Next: Taxation** to Navigate to tax settings. + ![](/docs/assets/images/earning-component.jpg) + 6. Configure taxation details as per your organisation's policies. + - Review everything to make sure it's correct. + - Click **Next: Review** to check the customisations added to the salary component. + ![](/docs/assets/images/prorated-tds.jpg) + 7. Review all the customisations added in the salary component. + - Click **Create component** to add the new component you just created. + ![](/docs/assets/images/comp-review.jpg) + + To modify a custom addition component: + + 1. Navigate to the **Salary Component Library.** + 2. Select the component you want to edit. + 3. Click **View details** to open the component settings. + 4. Click **Modify** and make the necessary changes. + ![](/docs/assets/images/modify-t.jpg) + 5. Click **Save Component** to modify the component. + + To disable a custom addition component: + + 1. Follow steps **1-3** from the modification process. + + 2. Click the **Disable** button. + + +> **WARN** +> +> +> **Watch Out!** +> +> If the component is included in a current payroll that has not yet been executed, it cannot be disabled. Otherwise, it can be disabled. +> +> + + + + + + A Custom Deduction Component is an amount that is subtracted from an employee’s salary. These can be Ad-Hocs such as Laptop Repair Costs or Salary Advances' Recovery. + + Deductions can be applied either before tax (gross pay deductions) or after tax (net pay deductions). + + Set these up correctly to ensure your payroll is accurate, tax-compliant, and transparent for employees. + + To add a new custom deduction component: + + 1. Navigate to the **Settings→Salary Component Library.** + ![](/docs/assets/images/deduct-comp.jpg) + 2. Click **Create component** and select **Deduction** from the dropdown. + 3. Fill in the **General & Pay Configuration** details: + 4. Enter a **Component Name** (must be unique). + 5. Add a **Display name in payslip and salary register**(this will show up in payslip and reports). + 6. Write a **Component Description** explaining its purpose. + 7. Set the **Deduction Types** as Ad-Hoc. + 8. Set **Deduction Configuration:** + - **Calculate Arrears:** Configure whether system should calculate arrears based on this deduction. + - **Ad-Hoc** + Choose whether to Deduct from Gross Pay or Deduct from Net Pay + + - **Deduct from Gross Pay:** The deduction is applied before taxes and other statutory deductions are calculated. This affects the taxable income and may reduce tax liability. + - **Deduct from Net Pay:** The deduction is applied after taxes and other statutory deductions have been calculated. This does not affect tax calculations. + ![](/docs/assets/images/next-sc.jpg) + 9. Navigate to **Next: Pay Taxability** to configure tax details. + 10. Adjust tax settings based on your organisation’s policies. + 11. Click **Next: Review** to verify all details. + - Review all configurations. + - Click **Create component** to save it. + ![](/docs/assets/images/create-cp.jpg) + + + To modify a custom deduction component: + + 1. Navigate to the **Salary Component Library.** + 2. Select the deduction component you want to edit. + 3. Click **View details** to open details. + 4. Click **Modify** and make the required changes. + 5. Click **Save Component** to apply the changes. + + ![](/docs/assets/images/modify-dc.jpg) + + To disable a custom deduction component: + 1. Follow steps 1-3 from the modification process. + 2. Click the **Disable** button. + + + + +## Adding Components to Salary + +Once you’ve created and configured your custom salary components, you can apply them while executing payroll for your employees. RazorpayX Payroll ensures that only the **amount** of these components can be edited during payroll execution—**the name and taxability remain fixed** to maintain consistency and compliance. + +To add an addition component: + 1. Navigate to **Pay Employees → Run Payroll.** + ![](/docs/assets/images/run-sc.jpg) + 2. **Select** the employee whose salary you want to update. + 3. Click the **Edit** button next to the employee's salary details. + 4. In the edit screen, go to the **Addition** section. + ![](/docs/assets/images/edit-salary.jpg) + 5. Choose the predefined component from the dropdown. + 6. Enter the amount for the selected component. + ![](/docs/assets/images/edit-dropdown.jpg) + 7. **Save** the changes. + ![](/docs/assets/images/addition-sc2.jpg) + +The selected addition will now appear in the employee’s salary details next to the monthly CTC. + +Similarly, to add a **deduction component:** + +1. Navigate to **Pay Employees → Run Payroll.** + ![](/docs/assets/images/run-sc.jpg) +2. **Select** the employee whose salary you want to update. +3. Click the **Edit** button next to the employee's salary details. +4. In the edit screen, go to the **Deduction** section. + ![](/docs/assets/images/net-ded.jpg) +5. Choose the predefined component from the dropdown. +6. Enter the amount for the selected component. + ![](/docs/assets/images/net-dropdown.jpg) +7. **Save** the changes. + + Watch the video below to know how Salary Component Library Works: + + +[Video: https://www.youtube.com/embed/zMPQCxG_u2U] diff --git a/llm-content/payroll/data-security-support.md b/llm-content/payroll/data-security-support.md new file mode 100644 index 00000000..cae5742d --- /dev/null +++ b/llm-content/payroll/data-security-support.md @@ -0,0 +1,58 @@ +--- +title: RazorpayX Payroll Data Security and Customer Support | RazorpayX Payroll +heading: Data Security & Support +description: Explore how RazorpayX Payroll ensures data security and offers customer support. +--- + +# Data Security & Support + +Your data with Payroll is safeguarded by the following measures. We are accredited with robust certifications and we enforce strict pratices to keep your organisation secure. In case of queries, you can reach out to us via the [support channels](#customer-support) listed below. + +## Data Security + +Payroll offers the following data security measures. + + +### User Access & Controls + + Payroll enables user-based access. This means we offer department, location, and custom attribute-based controls. This ensures that a user can only access data relevant only to their team. Know more about [user roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/user-roles-workflows.md). + + For example, an HRBP will only be able to access salary data of employees under their purview. + + + +### SOC 2 Compliant + + Payroll is SOC 2 compliant. This certification signifies our adherence to the highest standards of data security, availability, and confidentiality. + + + +### Two-Factor Authentication (2FA) + + To ensure security beyond passwords, Payroll incorporates Two-Factor Authentication (2FA). This additional layer of authentication ensures that unauthorised individuals are barred from accessing your accounts. + + Know more about [Two-Factor Authentication](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#two-factor-authentication). + + + +### Single Sign-On + + With the Google Single Sign-On (SSO) feature on Payroll, we enhance user access efficiency and security. SSO simplifies access to Payroll through a unified login, reducing password fatigue for employees. + + This not only enhances productivity but also strengthens data security by eliminating the need for multiple credentials, which ensures a hassle-free and secure user experience. + + +## Customer Support + +We provide a prompt and personalised assistance throughout an organisation’s payroll journey on Payroll. + +- **Dedicated Account Manager (AM)**: Your AM is well-versed in your specific Payroll setup, providing proactive support, addressing concerns, and ensuring optimal utilisation of Payroll's capabilities. + +- **Agile Chat and Email Support**: Our payroll experts promise you with real-time assistance, clarifications and solutions to your queries to ensure uninterrupted operations. + +- **Additional Service - Dedicated Implementation Manager**: For an extra layer of assistance during the implementation phase, a dedicated Implementation Manager is available at an additional cost. This specialist ensures a smooth onboarding process, guiding you through setup, configuration, and your first Payroll. + +### Related Information + +- [Payroll Dashboard](https://payroll.razorpay.com/login) +- [Payroll Plans](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/plans.md) diff --git a/llm-content/payroll/documents-letters.md b/llm-content/payroll/documents-letters.md new file mode 100644 index 00000000..9755a0fb --- /dev/null +++ b/llm-content/payroll/documents-letters.md @@ -0,0 +1,154 @@ +--- +title: RazorpayX Payroll create and manage employee documents & letters +heading: Documents & Letters +description: Create and manage organisational documents and letters in RazorpayX Payroll. +--- + +# Documents & Letters + +Documents and letters are necessary for payroll purposes and in the process of maintaining Human Resource Information System (HRIS). On Payroll, you, your team and employees can view documents and others as applicable. + +## View Documents Uploaded by Employees + +To view all the documents uploaded by employees: +1. Log in to your [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Go to **Reports** → **Documents**. +1. In the table available under **Documents Report**, you can view the type of documents uploaded, by whom and when, and any description provided for it. + +## Delete Documents + +You can also delete documents on Payroll. To delete documents: +1. Log in to your [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. In **Reports** → **Documents** → **Documents Report** table, click on the employee's name. It opens up the employee's profile. +1. In the right pane, click on **View Documents**. +1. On the Documents page that appears with the table, look at the type of document and choose which document you want to delete. + +If you are an admin and wish to delete **Common Organisation Documents**, they are available to you in the **Documents** section on the left menu. + +## Create Common Organisation Documents + +You can keep common organisation documents publicly available to all the internal members of your company. Documents like HR and leave policy, code of conduct and more must be internally available. To make such documents visible for the entire organisation: + +1. Log in to your [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Go to **Documents**, and from the drop-down, select **Common Organisation Documents**. +2. Give a proper description, and upload the document (PDF preferably). + +This document immediately becomes visible to all your employees and on their Dashboards. You can add more documents by repeating this procedure. If you delete any such document, then it is removed for all employees as well. + +> **WARN** +> +> +> **Watch Out!** +> +> Only administrators and user roles who have been specifically granted this permission can upload common documents. Know more about [Payment Pages](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-pages.md) user permissions in Payroll. +> + +## Manage Templates + +You can upload your templates to your account on the Payroll Dashboard. +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +2. In **Quick Links**, click **Generate/edit letters**. +3. Click **Add Letter** from the right pane and add your templates. + +Here are the codes for some commonly used templates: + + + + ``` + + + + [Company_Logo] | + + + + + [Company_Name] | + + + + [Company_Address] | + + + + + + ``` + + + + + + ``` + + + Title A | + Title B | + Title C | + + + + Value 1A | + Value 1B | + Value 1C | + + + Value 2A | + Value 2B | + Value 2C | + + + Value 3A | + Value 3B | + Value 3C | + + + Value 4A | + Value 4B | + Value 4C | + + + Value 5A | + Value 5B | + Value 5C | + + + + ``` + + + + + + ``` + + ``` + + + + + ``` + + - Sample text for the first line + Sample text for inner line + + - Sample text for second inner line + + + - Sample text for the second line + + - Sample text for the third line + + - Sample text for the fourth line + + + ``` + + + +If not to add templates, you can use the **Generate Letter** menu to generate fresh letters from the drop-down and text fields. Fill in the required details and generate letters in just one click. + +### Related Information + +- [Admin Role - HR Operations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md) +- [Payroll Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md) diff --git a/llm-content/payroll/employee-bank-account-validation.md b/llm-content/payroll/employee-bank-account-validation.md new file mode 100644 index 00000000..4266c9a6 --- /dev/null +++ b/llm-content/payroll/employee-bank-account-validation.md @@ -0,0 +1,149 @@ +--- +title: RazorpayX Payroll Employee Bank Account Validation +heading: Employee Bank Account Validation +description: Learn how RazorpayX Payroll validates employee bank accounts to prevent errors and ensure accurate salary disbursements. +--- + +# Employee Bank Account Validation + +The Employee Bank Account Validation feature in RazorpayX Payroll ensures that salary payments reach the correct employee bank accounts. It validates bank account information during employee onboarding and when account details are modified, thereby preventing payment errors caused by incorrect bank details. + +The validation happens directly with the bank where it is checked if the bank account is active and the beneficiary name is accurate. + +Common use cases include: +- **Bank Detail Changes**: Verifying updated bank account information when employees modify their details. +- **Payment Error Reduction**: Minimising the risk of salary disbursements to incorrect accounts. +- **Recovery Process Avoidance**: Eliminating the need for lengthy fund recovery procedures. + +## Bank Account Validation Process + + + + For Current Accounts, the validation process involves: + + 1. **Penny Drop Verification**: System automatically conducts a small test transaction to verify account existence. + + 2. **Auto-approval**: The system conducts penny drop verification and auto-approves accounts when valid, while simultaneously employing an algorithm to match the fetched account holder name with the employee name in our records to ensure proper identity verification. + + 3. **Admin Review**: Administrators review only rejected validations and provide comments for rejection reasons. + + 4. **Secure Processing**: All validation data is securely processed and stored for compliance purposes. + + + + +### Employees + + To update your bank account details: + 1. Log in to your [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 2. Navigate to your profile section. + 3. Locate the Payment Information panel. + 4. Click EDIT to update your details. + 5. Enter or modify the following information: + - Bank Account Number. Enter your bank account number twice to confirm. + - IFSC (You can find the IFSC in your bank account's cheque book) + - Beneficiary Name (as it appears on your bank account) + 6. Click **Continue** to initiate the penny drop validation process. + 7. Wait for administrator approval notification. + ![Upload document and verfiy the info](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sent-approval-ca.jpg.md) + The system will automatically verify your account through a penny drop test transaction to confirm the account exists and matches your details. + + + +### Administrators + + 1. Log in to your [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 2. Navigate to the **Approvals** section. + 3. Review pending bank account validation requests. + 4. Check the account details and penny drop validation results. + 5. Make an approval decision: + - Approve the account if details are correct and validation is successful. + - Reject the account with a comment explaining the reason. + ![Approve or reject the bank account information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/approve-ca.jpg.md) + 6. Submit the decision which triggers notification to the employee. + + +> **WARN** +> +> +> **Watch Out!** +> +> You can view the status of bank account validation requests (approved or rejected) in the completed section. +> + + + + + + + + + For XPayroll Wallet Accounts, the validation process involves: + + 1. **Document Submission**: Employees upload either a cancelled cheque or bank statement showing account details. + 2. **Document Verification**: System registers the document for admin review. + 3. **Manual Validation**: Administrators verify account details against the provided documentation. + 4. **Decision Processing**: Admin approves or rejects the submission with appropriate comments. + 5. **Status Communication**: Employee receives notification about their account validation status. + 6. **Secure Processing**: All validation data is securely processed and stored for compliance purposes. + + + + + +### Employees + + In the Payment Information section, employees can: + 1. Log in to your [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 2. Navigate to your **profile** section. + 3. Locate the **Payment Information** panel. + 4. Click **EDIT** to update your details. + 5. Enter or modify the following information: + - **Bank Account Number** (enter twice to confirm) + - IFSC (find this in your cheque book or search at bankifsccode.com) + - Beneficiary Name (as it appears on your bank account) + - Payment Mode (Default, IMPS, or NEFT) + - Upload Document: You must provide one of the following: + 1. A cancelled cheque with your name printed on it. + 2. A recent bank statement showing your account details. + 6. Enter the OTP sent to your verified emailID. + ![enter OTP sent to your valid emailID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/otp-ca.jpg.md) + 7. Click **Continue** to send your information for review. + 8. Wait for administrator approval notification. + Your uploaded document will be manually verified by an administrator to confirm your account details before approval. + + + + +### Administrators + + + 1. Log in to your [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 2. Navigate to the **Approvals** section. + 3. Review pending bank account validation requests. + 4. Click **View** and review the account details and uploaded documentation. + 5. Verify and take an approval decision: + - Approve: If the account details are correct and documentation is valid. + - Reject: If the account details are not matching with a comment explaining the reason. + 6. Submit the decision which triggers notification to the employee. + + + + + + +After completing the bank account validation: + +1. All validated accounts are immediately eligible for payroll processing. +3. If an employee attempts to change bank account details, the validation process will automatically repeat. +4. The system maintains an update history for audit and compliance purposes. + +> **INFO** +> +> +> **Handy Tips** +> +> - The validation process works with all major Indian banks and financial institutions. +> - This feature significantly reduces the risk of salary disbursement errors, which previously could take up to two months to resolve through bank recovery processes. +> - While the validation system provides a robust security layer, it does not replace the need for organisational due diligence. +> diff --git a/llm-content/payroll/employees.md b/llm-content/payroll/employees.md new file mode 100644 index 00000000..8bd5ccf0 --- /dev/null +++ b/llm-content/payroll/employees.md @@ -0,0 +1,158 @@ +--- +title: Serve Onboarding and Razorpay Payroll Employee Login on Payroll Dashboard +heading: About Employee Dashboard +description: Explore how to log in to the Payroll Dashboard and complete the onboarding process. +--- + +# About Employee Dashboard + +As an employee, you can use the [Payroll Dashboard](https://payroll.razorpay.com/dashboard) to: + +- [View your payslips](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/payslips-form16.md). +- [Apply for leaves](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/attendance-leaves.md). +- [Apply for reimbursements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/reimbursements.md). +- [Manage Income Tax declarations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md). +- [Declare and submit Flexible Benefits proofs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations/flexible-benefits.md). +- [Apply for resignation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/resignation.md). + +> **SUCCESS** +> +> +> **Available Now!** +> +> Explore the [video tutorials](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/video-tutorials.md) for employee-facing features. +> + +## Create Account + +We automatically create an account for you when your organisation adds you to Payroll Dashboard. You can now: +- Sign in as a new user and complete the onboarding process. +- Sign in as an existing user and use the Dashboard features. + + + + To log in to the Payroll Dashboard as a new user: + + 1. Log in to the email inbox that your organisation's administrator has used to create your Payroll account. This email could be your personal or work email id. + 1. Search and open the email with subject: **[Organisation Name]** **Welcome to RazorpayX Payroll**. Click **GET STARTED**. + ![Payroll sign in to Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-get-started.jpg.md) + 1. Create a secure password of 8 characters, including special characters, numbers and upper case letters. + + + + To log in to the Payroll Dashboard as an existing user: + + 1. Use the link to log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. On the login page, use a combination of either your username and password, or your Google account to sign in. + + + +You have successfully logged into the Payroll Dashboard. + +### Troubleshooting steps + +If you are unable to log in to the Dashboard, refer to the troubleshooting steps below. + + +### Unable to Find Email + + If you are unable to find the email from RazorpayX Payroll, you can: + - Check your spam folder. + - [Reset your password](https://payroll.razorpay.com/forgotPassword) and log in. + - Report to your organisation's Administrator/HR/Manager. + + + +### Unable to Log In + + If you are unable to log in to your Payroll Dashboard, contact your organisation's Administrator/HR/Manager to change your registered email. + + +## Onboarding + +> **SUCCESS** +> +> +> **Available Now!** +> +> Watch the video on to how to complete the [employee onboarding process](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/video-tutorials.md#employee-login-and-onboarding). +> + +To complete the onboarding process: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **Reminders** → **profile**. + ![Payroll update bank info](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-onboarding.jpg.md) + +This opens the Employee Onboarding page. Complete the following three steps: + + +### 1. Review Basic Information + + On the **Employee Onboarding** page, review the information in the **THE BASICS** such as **Name** and **Email**. You can edit your name if required. + + + +### 2. Provide Bank Information + + On the **BANK INFORMATION** page: + 1. Add your **PAN** details. You can also follow the steps to [verify your PAN](https://incometaxindia.gov.in/Pages/tax-services/online-pan-verification.aspx) details. + 1. Provide your **Bank Account Number & IFSC**. Enter your bank account number twice to confirm. + + You can search your IFSC on [bankifsccode.com](https://bankifsccode.com/). IFSC is also available on your bank-issued cheque book. + 1. Enter the **Beneficiary Name** if you provided details of another bank account to receive salary and payments. If the bank account owner is you, leave the **Beneficiary Name** text box empty. + 1. Select the **Payment Mode** from the drop-down menu. This is mode via which you receive your salary payment. + 1. Click **CONTINUE**. + + ![Razorpay Payroll enter bank information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-payment-info.jpg.md) + + + +### 3. Enter Other Information + + On the **OTHER DETAILS** page: + 1. Enter your **Phone number**. Select the check box to receive your monthly payslips via WhatsApp. You can select checkbox only if your organisation has enabled the Payroll - WhatsApp integration. + 1. Select your **Gender** from the drop-down menu. + 1. Select your **Date of Birth** from the drop-down menu. + 1. Click **CONTINUE**. + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you provide the correct bank and payment details for Payroll to accurately process your salary. +> + +This completes the onboarding process. + +## Dashboard Features + +After you log in, you can view the Dashboard home page. Here you can: +- View **Reminders** and take action. +- Check any announcements created by your organisation. +- View **Personal transactions**. +- Check the **Employee Directory**. You can view employees by name or view employees department-wise. +- Use the search icon to quickly navigate to a specific page on the Payroll Dashboard. +- View recent notifications such as reimbursement updates, approvals and more. +- Access your **User Profile**. + +![RazorpayX Payroll View Dashboard Home page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-dashboard-homepage.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> You can access other Dashboard pages if you are authorised as a collaborator or are permitted to view the pages via [User Roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/user-roles-workflows.md). +> + +## Next Steps + +Complete your [User Profile Setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/my-profile.md). + +### Related Information + +- [Integrations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations.md) +- [IT Declarations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md) diff --git a/llm-content/payroll/employees/attendance-leaves.md b/llm-content/payroll/employees/attendance-leaves.md new file mode 100644 index 00000000..c657ce06 --- /dev/null +++ b/llm-content/payroll/employees/attendance-leaves.md @@ -0,0 +1,173 @@ +--- +title: Razorpay attendance and apply leaves as an employee on the Payroll Dashboard | RazorpayX Payroll +heading: Attendance & Leaves +description: Use the RazorpayX Payroll Dashboard as an employee to check attendance and apply for leaves. +--- + +# Attendance & Leaves + +Leaves and attendance form a critical part of every employee's payslip and personal management. On the Payroll Dashboard, you can: + +- [Mark attendance](#mark-attendance) + - [Update/Edit attendance for a past date](#edit-attendance) + - [Delete incorrect attendance information](#delete-attendance) +- [Apply for leaves](#apply-for-leaves) + - [Apply for leaves in bulk](#apply-leaves-in-bulk) + - [View Leaves Status](#leave-status-indicator) + - [View leave balance](#view-leave-balance) +- [Delete Leave & Attendance modification requests](#delete-requests) + +Once you apply for leaves, they are sent to your managers for approval as configured under **Profile** → **Basic Information**. Both administrators and your manager can approve leave requests. + +> **SUCCESS** +> +> +> **Available Now!** +> +> Watch the video on to how to [mark attendance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/video-tutorials.md#mark-and-modify-attendance) and [apply for leaves](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/video-tutorials.md#apply-for-leaves). +> + +> **INFO** +> +> +> **Handy Tips** +> +> - If your organisation has integrated [Payroll with Slack](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/slack.md), you can update your leaves and attendance from within the Slack App. Refer to the [leave commands](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/slack.md#how-it-works). +> - You can check in and check out of your organisation via the biometric device, if your organisation has enabled it. +> + +## Mark Attendance + +To mark attendance: +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **Attendance** in the left menu. +2. Use the **CHECK IN** and **CHECK OUT** options on the **Leave & Attendance** page to mark attendance for the day. You can also edit it on a future date and send it for approval. + ![Check in and check out for attendance RazorpayX Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-mark-attendance1.jpg.md) + +You have successfully marked your attendance for a single day. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you allow Payroll to access your device's location. Click **Allow** in the pop-up modal during check in and check out. +> + +#### Manage Attendance + +You can edit and delete incorrect attendance data on the Payroll Dashboard. After you make changes to your attendance, we send your request to your manager for approval. + + +### Edit Attendance + + You can edit attendance for a past date to update your attendance information. + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Go to to **Attendance** in the left menu → [**Attendance** table](#attendance-table). + 1. Navigate to the specific date for which you want to edit attendace. Click the edit icon in the **Edit** column against that date. + 1. In the **Change Attendance** pop-up window, update you attendance/leave information. + ![Apply leave on RazorpayX Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-leave-apply.jpg.md) + + This successfully raises the edit attendance request to the admin/manager for approval. + + + +### Delete Attendance + + You can delete attendance for a specific date if you have added and saved your attendance for the incorrect date. + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Go to **Attendance** in the left menu. + 1. Navigate to the specific date for which you want to delete your attendace. Click the edit icon in the **Edit** column against that date. + 1. In the **Change Attendance** pop-up window, click **DELETE ATTENDANCE**. + ![Apply leave on RazorpayX Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-leave-apply.jpg.md) + + This successfully raises the delete attendance request to your admin/manager for approval. + + + +### View Attendance + + After you mark your attendance for the day, we update the **Attendance** table. To view the attendance information for a specific date, navigate to the specific date in the table. + + Here you can view the **Date**, **Status**, **Check In** and **Check Out** times. We automatically update the **Duration** and add the **Remarks** provided by you or your manager in the specific columns. + + ![RazorpayX Payroll apply for leave](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-attendance-apply.jpg.md) + + +## Apply for Leaves + +To apply for a leave: +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Go to **Attendance** in the left menu. +1. In the [**Attendance** table](#attendance-table), find the date on which you are on leave. Click the edit icon in the **Edit** column. + + ![RazorpayX Payroll apply for leave](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-attendance-apply.jpg.md) +1. In the **Change Attendance** pop-up modal: + 1. Select the **Status**. Select the leave to avail from the drop-down menu. + 1. Leave the **Check In** and **Check Out** times blank. + 1. Enter **Remarks** as applicable. + 1. Click **SEND REQUEST**. + + ![Apply leave on RazorpayX Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-leave-apply.jpg.md) + +This successfully creates a leave request for the chosen date. We update your attendance calendar after your manager/HR's approval. + +#### Manage Leaves + +You can edit and update, or delete your leave and leaves modification requests on the Payroll Dashboard. + + +### Apply Leaves in Bulk + + To apply for leaves in bulk: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Go to **Attendance** in the left menu → [**Attendance** table](#attendance-table). + 1. Click **here** under the **Attendance** heading. + + This opens the **Apply for Leave** pop-up modal. + 1. Select the **From Date** and **To Date** in the modal. + 1. Click **SEND REQUEST**. + + ![Update bulk leaves on Razorpay Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-bulk-leave.jpg.md) + + + +### Leave Status Indicator + + Payroll indicates attendance/leaves using the following colours: + + + Colour | Description + --- + Green | Indicates `Present` days. + --- + Red | Indicates `Approved`leave days. + --- + Brown | Indicates `Pending Approval` from the Manager. + + + ![Razorpay Payroll leave status indicators](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-leave-codes.jpg.md) + + + +### View Leave Balance + + To view leave balance, click **VIEW LEAVES TAKEN** in the right pane. You can view the leaves taken and available balance in the **Leaves Taken** pop-up modal. + + +## Delete Requests + +When you modify your attendance or add a leave, we raise the leave as a request with your manager. You can also choose to delete the request before your manager's approval. + +1. Go to the **Open Requests** section on the **Leave & Attendance** page. +1. Select the check box against the list requests you have raised to delete them. + +![Modify leave request. Select the check box to update on Razorpay Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-leave-request.jpg.md) + +### Related Information + +- [Employee Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md) +- [Slack Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/slack.md) +- [IT Declarations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md) diff --git a/llm-content/payroll/employees/benefits.md b/llm-content/payroll/employees/benefits.md new file mode 100644 index 00000000..5c0e5450 --- /dev/null +++ b/llm-content/payroll/employees/benefits.md @@ -0,0 +1,113 @@ +--- +title: Other benefits on Razorpay Payroll +heading: Other Benefits +description: Explore other benefits your organisation has configured on the Payroll Dashboard. +--- + +# Other Benefits + +On the Payroll Dashboard, your organisation can configure other benefits for employees such as VPF, insurance, loans and more. Contact your HR/Manager to check if these benefits are available. + +> **WARN** +> +> +> **Watch Out!** +> +> You can avail the following benefits only if your organisation has configured them for employees. +> + +## Available Benefits + +The following benefits are available on the Dashboard for employees to avail: + + +### Employee Loans + + On the Payroll Dashboard, your organisation can disburse loans to employees basis the internal loan policy. As an employee, you can: + - Avail loan at a lower interest rate. + - Choose your EMI amount. + - Foreclose the loan amount. + - Skip EMIs when necessary. + + Contact your HR/Manager to avail employee loans. + + + +### Salary Advance + + On the Payroll Dashboard, your organisation can either provide a salary advance or allow employees to request a salary advance. + + In a salary advance, a portion of your salary is provided as an advance. The amount is recovered via monthly EMIs without any interest charges. + + You can request a salary advance from your HR/Manager or raise a salary advance request via the Dashboard. + + + +### Voluntary Provident Fund (VPF) + + Voluntary Provident Fund (VPF) is a monthly investment scheme earning up to 9% annual interest. + - It has a lock-in period of 5 years, after which the total withdrawable amount at maturity becomes tax-free. + - VPF is an EEE investment: exempt from tax on contribution, principal, and interest earned. + + Some organisations provide employees the option to contribute to Voluntary Provident Fund. As an employee, you can contact your HR/Manager to start contributing to VPF. + + If VPF is already available to you, you can change your monthly VPF contribution amount in **Tax Deductions** on the Payroll Dashboard. + + + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot contribute to VPF if you are not eligible for EPF. +> + + + + +### WhatsApp Integration for Payslips and Reimbursements + + You can now request or receive monthly payslips as well as raise reimbursements requests directly on WhatsApp, only if both you and your organisation have enabled it. + + - To check if your organisation has enabled the integration, contact your HR/Manager. + - To check if you have enabled it, go to **My profile** → **Other Information** on the Payroll Dashboard. + + Know more about the [WhatsApp Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/whatsapp-integration.md). + + + +### Slack App Integration for Leaves and Reimbursements + + If your organisation has enabled Slack integration, you can use the in-app commands to: + - Apply leaves + - Check the yearly holiday list + - Request reimbursements + - Check payslips + - Check-in and check out to mark attendance + + Know more about the [Slack integration guide for employees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/slack-integration.md). + + + +### Flexible Benefits Via Payroll & Zaggle + + Origanisations provide flexible benefits which allows employees to customise their CTC. Your organisation can set up flexible benefits in two ways: + - [Flexible Benefits module](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations/flexible-benefits.md). + - [Via the Zaggle integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations/zaggle.md). + + Contact your HR/Admin to know if flexible benefits are enabled for you and when the declaration and proof upload windows are open. + + + +### Insurance + + Payroll enables group insurance for employees. Your organisation must configure the relevant integrations to provide insurance benefits to you. + + Contact your HR/Manager for more information. + + +### Related Information + +- [Employee Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md) +- [Flexible Benefits Plan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations/flexible-benefits.md) diff --git a/llm-content/payroll/employees/declarations.md b/llm-content/payroll/employees/declarations.md new file mode 100644 index 00000000..2c9801b4 --- /dev/null +++ b/llm-content/payroll/employees/declarations.md @@ -0,0 +1,248 @@ +--- +title: RazorpayX Payroll Employees Declare Investments | RazorpayX Payroll +heading: Investment Declaration & Proof Upload +description: Declare your investments and upload proofs as an employee using the RazorpayX Payroll Dashboard. +--- + +# Investment Declaration & Proof Upload + +Investment declaration and uploading proof of investments are critical tax-saving activities for employees. + + +### About Investment Declaration and Proof Upload Activity + + - You can declare the investments planned for the year to your organisation. This happens when the declaration window is open. + - Basis your chosen tax regime, you can invest in tax-saving instruments such as insurance, PPS, NPS, and more. + - Submit the proof of investments at the end of the year when the proof upload window is open. + + +You can submit income tax/investment proofs in January every year. Payroll also verifies and auto-calculates the TDS liability, only if your organisation has enabled it. + + + Watch the video to understand how to declare and upload proofs when the proof upload window opens. + + + - **FAQs**: Explore FAQs about all employee-facing features. + +> **INFO** +> +> +> **Handy Tips** +> +> Declare your investments for the year and then select your tax regime. Payroll automatically calculates your tax liability to simplify decision-making. +> + +On the Payroll Dashboard, you can file your income tax declarations. Payroll supports the following tax declaration and filing features: + + - **Select or Change Regime**: Select regime or request your manager to change your tax regime. + + - **Declaration & Proof Upload**: Declare and upload proofs for HRA, Section 80 investments, interest on home loan and LTA. + +- **Resolve Failed Declarations**: Check how to resolve failed declarations. + +## Regime Changes + +On the Payroll Dashboard, you can: + + +### Select Regime + + To select your tax regime: + + 1. Log in to the Payroll Dashboard. + 1. Navigate to [**Tax Deductions**](https://payroll.razorpay.com/taxDeductions) from the left menu. + 1. On the **Tax Deductions FY** page, click **SWITCH REGIME** to change your tax regime. + + ![Payroll Dashboard select or change regime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-select-regime.jpg.md) + + For your consideration, Payroll also suggests which regime you can choose based on your income and declarations. + 1. Click **CONFIRM SELECTION** to finalise your tax regime. + + You have successfully changed your tax regime. This is a one-time setting. Contact your HR/Administrator for further details. + + Some organisations may have an approval mechanism. In such cases, the following message is displayed until your declarations are approved. Post-approval, the TDS is recalculated. + + + +### Request Regime Change + + After you select a regime, you cannot change it by yourself in the middle of the year. Contact your HR to change your tax regime. + + +> **WARN** +> +> +> **Watch Out!** +> +> - Ensure your payment details in the user profile are updated. +> - You can make declarations only when the respective windows are open. +> + +## Declare & Upload Proofs + +To make income tax declarations: + +1. Log in to the Payroll Dashboard. +1. Navigate to [**Tax Deductions**](https://payroll.razorpay.com/taxDeductions) from the left menu. + ![Tax Deductions option on left menu in Razorpay Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-tax-deductions.jpg.md) +1. Check your tax liability based on each tax regime and preview your upcoming payslip in the right pane. Click **EDIT** against the respective sections to: + - Declare [investments](#investments) when the window is open. + - Upload the relevant proofs when the window is open. + +### Investments + +> **WARN** +> +> +> **Watch Out!** +> +> Some investment options are unavailable if you choose the new tax regime. +> + +You can declare the following investments on the Payroll Dashboard. Contact your HR/Manager to know when the respective windows open. + + +### House Rent Allowance + + House Rent Allowance (HRA) is an Income Tax department-mandated expense allocated towards an employee's residential accommodation. Know more about [HRA](https://razorpay.com/payroll/learn/hra-calculation/). + + To declare HRA: + 1. Go to **Current home rent (as on date)** and click **EDIT**. + 1. On the **Paying home rent?** page, click **+ADD ANOTHER HOUSE RENT**. + 1. Enter the **Monthly Rent Amount**, **From** and **To Month**, **Landlord Name**, **Landlord PAN**, **Landlord Address**. Select the check box in **Metro** if you live in a Metro city. + ![Payroll Dashboard HRA for Employees upload proofs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-itd-hra.jpg.md) + 1. Click **Upload proofs** when the proof upload window is open. In the **Upload proofs** pop-up modal, click **Choose file(s)** and upload the rent receipts. + + +> **WARN** +> +> +> **Watch Out!** +> +> Rent receipts must be signed by the landlord. +> + + 1. Click **CONTINUE**. + + You have successfully uploaded proofs to claim HRA exemption. + + + +### Section 80 (80C, 80CCD, 80D, 80DD) Deductions + + Section 80 in the Income Tax Act of 1961 allows employees/taxpayers to reduce their taxable income by investing in tax-saving instruments. Know more about [Section 80 investments](https://razorpay.com/payroll/learn/section-80-80c-deductions-income-tax/). + + To declare Section 80 investments: + 1. Go to [**Tax Deductions**](#declare-it-investments) and click **EDIT** against **Section 80 deductions**. + 1. On the Section 80 deductions page, enter the **Declared amount**. + 1. Click **CONTINUE**. + You have successfully declared your investments. + + To upload proofs: + 1. Go to [**Tax Deductions**](#declare-it-investments) and click **EDIT** against **Section 80 deductions**. + 1. Click **Upload proofs** against the respective Section 80 deductions. + 1. Click **CONTINUE**. + This successfully uploads proofs for the respective investments. + + ![Upload section 80 investments on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-itd-80us.jpg.md) + + + +### Interest on Home Loan + + To declare interest on home loan as a tax-saving instrument: + 1. Go to [**Tax Deductions**](#declare-it-investments) and click **EDIT** against **Interest on home loan**. + 1. Enter the amounts in the relevant heads on the **Deductions Under House Property** page. + 1. When the proof upload window is open, click **Upload proofs** to upload the receipts/documents. + 1. Click **CONTINUE**. + This successfully declares/uploads your proofs. + + ![Upload house property receipts on Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-itd-house-prop.jpg.md) + + + +### Leave Travel Allowance + + Leave Travel Allowance (LTA) is partially tax-exempt under certain conditions. Know more about [LTA exemption](https://razorpay.com/payroll/learn/income-tax-allowances-salaried-individuals-india/). + + + + + + LTA Conditions + + To avail Leave Travel Allowance (LTA), you must meet the following conditions: + - You must travel to domestic places. LTA does not cover international journeys. For example, Bengaluru to Mumbai is covered. + - LTA exemption does not apply to journeys planned but not yet undertaken. Exemption is only allowed on the actual expenses incurred. + - Two journeys are allowed in a block of four calendar years. The current block is Jan 1, 2022 - Dec 31, 2025. + - LTA covers the employee, their dependants and two children (born after Oct 1, 1998). + - LTA does not cover travel during official holidays or weekends. Only travel expenses undertaken during working days is exempt. + + + + + To add leave and travel declaration when the window is open: + 1. Enter the exemptions you already claimed for the current block in the text box. + 1. If you already claimed exemptions, choose if you have claimed any exemption in the current financial year. Select **Yes** or **No** from the drop-down menu. + ![Payroll Dashboard enter LTA details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-LTA.jpg.md) + + - If you selected **Yes**, you cannot claim exemptions for the current financial year. + - If you selected **No**: + 1. Choose the **Travel Start Date** from the calendar pop-up modal. + 1. Enter the **Origin Destination** and the **Final Destination**. Enter the names of domestic cities only. For example, Bengaluru, Chennai, Mumbai. + 1. Enter an amount in the **Declared Travel Amount** text box. + 1. Click **CONTINUE**. + + This successfully updates your LTA exemptions. When the proof upload window opens, you can upload the travel receipts and make a portion of your salary tax-free. + + + +### Flexible Benefits + + See how to [declare flexible benefits and add proofs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations/flexible-benefits.md). + + +## Manage Investments + +Following are some ways in which you can manage your investments as well as the proof upload process. + + +### Resolve Failed Declarations + + Sometimes, you may receive an email from Payroll indicating changes or removal of your tax declarations. This happens because: + - You have not uploaded any investment proofs for your tax declaration before the due date. + - The amount in the proofs uploaded does not match your declarations. + + To resolve this: + 1. Navigate to [**Tax Deductions**](https://payroll.razorpay.com/taxDeductions) on your Dashboard. + 1. Upload the correct proofs. + + Your organisation's Payroll administrators must approve the corrected proofs. Payroll then updates your tax declarations. + + + +### Reduce Tax Liability + + You must pay tax on your annual income if it exceeds a specific limit. When you earn more, you pay more tax. Following are some ways by which you can reduce your tax liability: + + - **House Rent**: + + Provide your rent information on the **Tax Deductions** page in Payroll. If you pay more than ₹8,333 per month as rent, provide the landlord's name, address and PAN number. + + - **Make Investments**: + + Make investments that have tax benefits and deductions. You can enter an amount in the specific Payroll section even if you have yet to make any investments. However, ensure you have made those investments by the end of the financial year. + + - **Interest on Home Loan**: + + You can get a deduction of up to 2 lakhs on the interest paid on a home loan. + + Update the above information on your Payroll Dashboard to avail tax deductions and benefits. + + + + +### Related Information + +- [Section 80 Investments](https://razorpay.com/learn/section-80-80c-deductions-income-tax/) +- [Tax Declaration](https://razorpay.com/learn/how-to-make-tax-declaration-form12bb/) diff --git a/llm-content/payroll/employees/declarations/flexible-benefits.md b/llm-content/payroll/employees/declarations/flexible-benefits.md new file mode 100644 index 00000000..648a9842 --- /dev/null +++ b/llm-content/payroll/employees/declarations/flexible-benefits.md @@ -0,0 +1,135 @@ +--- +title: Declare Flexible Benefits on Razorpay Payroll Dashboard +heading: Flexible Benefits +description: Declare and reimburse flexible benefits your organisation provides on RazorpayX Payroll. +--- + +# Flexible Benefits + +Organisations provide [flexible benefits](https://razorpay.com/payroll/learn/flexible-benefit-plan-fbp-component/) for employees to customise their CTC. Employees can declare the list of benefits and upload proofs to claim reimbursement. After declaration, a portion of your CTC is allocated every month. This becomes the employee's flexible benefit plan. + +Most flexible benefits are non-taxable, which employees can utilise to reduce tax liability. + + +### What benefits are taxable/tax-free in both the tax regimes? + + Following is the list of taxable and tax-free benefits in both regimes. + + + Flexible Benefit | Income tax Section | Old Regime | New Regime + --- + Meal/Food allowance | Section 10 | ✓ | x + --- + Books and Periodicals allowance | Section 10 | ✓ | x + --- + Attire/Uniform allowance | Section 10 | ✓ | x + --- + Learning and Development allowance | Section 10 | ✓ | x + --- + Leave and Travel (LTA) allowance | Section 10 | ✓ | x + --- + Conveyance allowance | Section 10 | ✓ | ✓ + --- + Travel allowance | Section 10 | ✓ | ✓ + --- + Daily allowance | Section 10 | ✓ | ✓ + --- + Telecommunication or Phone allowance | Section 17 | ✓ | ✓ + --- + Fuel allowance | Section 17 | ✓ | ✓ + --- + Driver's salary | Section 17 | ✓ | ✓ + --- + Gadget or Device allowance | Section 17 | ✓ | ✓ + --- + Health and fitness allowance | Section 17 | ✓ | ✓ + --- + Gift allowance | Section 17 | ✓ | ✓ + + + +> **SUCCESS** +> +> +> **Available Now!** +> +> Watch the video on to how to [declare flexible benefits and upload proofs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/video-tutorials.md#declare-flexible-benefits-and-upload-proofs). +> + +## Declare Benefits + +Ensure the Flexi-benefit plan (FBP) declaration window is open. Contact your HR/Manager to understand when the window is open. + +To declare benefits: +1. Log in to the Payroll Dashboard. +1. Navigate to **Reminders** on the home page and click **Declare now** against FBP. + ![Click FBP Declare now on Razorpay Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-fbp-declare.jpg.md) +1. On the **Flexible benefit plan declaration** page, click **Edit Declaration**. +1. Select the check boxes for the components listed to choose the flexible benefits to declare. + + +> **WARN** +> +> +> **Watch Out!** +> +> Components are available to you basis your chosen tax regime. To change your tax regime, contact your Manager/HR. +> + +1. Click **Submit declaration**. You can also click **View how much tax you'll save** to check your tax savings. + ![Declare FBP amount on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-declare-fbp-amount.jpg.md) +1. Click **Continue** in the **Save declarations** pop-up modal. + +You have succesfully saved your declarations. + +You can edit the declared components until the window is open. You cannot declare/edit components after the window closes. + +## Upload FBP Proofs + +To upload flexible benefits proofs: + +1. Log in to the Payroll Dashboard. +1. Navigate to **Reminders** on the home page and click **Upload proofs** against FBP. + ![Click FBP Upload proofs on Razorpay Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-fbp-proofs.jpg.md) +1. On the **Flexible Benefits** FY page, select the **Flexible Benefit** from the drop-down menu. Only those benefits you declared are available for proof upload. +1. Enter the amount for reimbursing as part of FBP. For example, if you declared ₹2000 for Fuel Allowance, check your bills and enter the total amount spent on fuel bills. + + + +### What if my proof amount exceeds my declared amount? + + Consider the above example where the amount declared is ₹2000. Your proof upload amount is ₹3000. Here, the proof amount is greater than the declared amount. + + In such cases, your organisation may do the following two things: + - Pay only the approved amount for that month, that is ₹2000 only. + - Prorate the proof amount and pay only the undeclared amount from the FBP allocated for that month. The unpaid amount is adjusted in the upcoming month/s when the proof upload amount is less than the declared amount. + + Suppose your fuel bills are less than the declared amount in the upcoming month. In that case, your organisation can adjust the unpaid FBP amount. + + + +1. Provide a description for the proof uploaded. This is optional. +1. Click **Choose a file** in the **Images or documents (maximum 5MB each)** and add the proofs. + + +> **WARN** +> +> +> **Watch Out!** +> +> - You cannot withdraw proofs once uploaded. +> - You can only upload a single file in **Images or documents (maximum 5MB each)**. If you upload a new file, the older file is overwritten. +> + +1. Click **ADD REQUEST** to submit proofs. + + ![Upload flexible benefits proofs on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-fbp-upload.jpg.md) + +You have successfully submitted proofs for the flexible benefits you declared. + +After you submit the proofs, you can view the FBP request in the **Past Requests** section. Click the **#1** box to view the attachments added. + +### Related Information + +- [IT Investments Declarations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md) +- [Other benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll.md) diff --git a/llm-content/payroll/employees/declarations/nps.md b/llm-content/payroll/employees/declarations/nps.md new file mode 100644 index 00000000..9e4b3f06 --- /dev/null +++ b/llm-content/payroll/employees/declarations/nps.md @@ -0,0 +1,46 @@ +--- +title: Declare National Pension Scheme Contribution on RazorpayX Payroll Dashboard +heading: Declare NPS +description: Declare or change your NPS contribution on the RazorpayX Payroll Dashboard. +--- + +# Declare NPS + +National Pension Scheme (NPS) is a voluntary social security scheme that many employees avail to build a retirement corpus. Many organisations offer Employer's NPS as an added benefit. All NPS contributions are tax-exempt upto ₹7.5 lakhs under the IT Act, 1961 for employees. + +You can declare your Employer's NPS contribution on Payroll. + - This is possible only if your organisation has enabled you to declare. + - If your employer has enabled only NPS but has disabled contribution declaration, we contribute a fixed amount as set in your organisation's [salary structure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md#setup-salary-structure). This is up to 10% from the Basic Pay + Dearness Allowance. + +> **WARN** +> +> +> **Watch Out!** +> +> Your organisation handles the employer's NPS contribution only. Employees must handle self-contribution to NPS (as per Section 80CCD-1B) externally via investment/banking apps. +> + +## Declare NPS Contribution + +To declare NPS contribution as an employee: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Go to **Tax Deductions** in the left menu. You can also check the **Reminders** menu on the Payroll home page. +1. On the **Tax Deductions FY** page, click **NPS Declarations** in the right pane. This opens the **Employer NPS** page. + ![Declare NPS contribution percentage](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-employee-nps-declare.jpg.md) +1. Enter a percentage that is less than 10% (of Basic Pay + Dearness Allowance) in the text box for **Contribution Amount**. You can view your NPS contribution amount on the right pane. +1. Provide your Permanent Retirement Account Number (PRAN) in the text box. In case your PRAN is available with the organisation, we pre-fill the text box with the number. +1. Click **Calculate how much you'll save** to view the NPS contribution amount. + + You can also modify your NPS contribution. Edit the percentage in the **Contribution Amount** text box and click **Re-calculate**. Review the changes and the comparison to the previous declaration on the right pane. +1. Click **✓ Save Declaration**. + +You have successfully declared or changed your employer's contribution to NPS. Your declaration becomes visible on the Tax Deductions FY table on the **Tax Deductions** page. + +![NPS Declaration screen on RazorpayX Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-employee-nps-save.jpg.md) + +### Related Information + +- [Employer's NPS Contributions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/nps.md) +- [IT Declarations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md) +- [Tax Deductions under Sections 80 and 80C as per IT Act, 1961](https://razorpay.com/payroll/learn/section-80-80c-deductions-income-tax/) diff --git a/llm-content/payroll/employees/declarations/zaggle.md b/llm-content/payroll/employees/declarations/zaggle.md new file mode 100644 index 00000000..2d763ab3 --- /dev/null +++ b/llm-content/payroll/employees/declarations/zaggle.md @@ -0,0 +1,92 @@ +--- +title: Declare Flexible Benefits via Zaggle in Razorpay Payrol +heading: Flexible Benefits Plan (FBP) via Zaggle +description: Declare and reimburse flexible benefits via the Zaggle card. +--- + +# Flexible Benefits Plan (FBP) via Zaggle + +Organisations provide [flexible benefits](https://razorpay.com/payroll/learn/flexible-benefit-plan-fbp-component/) to allow employees to customise their CTC. On the Payroll Dashboard, you can declare and avail flexible benefits via Zaggle, only if it is enabled for your organisation. + +With the Zaggle integration, you no longer need to submit proof of expenses on the Dashboard. You can use your Zaggle card to make expenses, which are automatically recorded. This simplifies the reimbursement process. + + +### How Zaggle Works + + FBP via Zaggle provides the declaration benefits via dedicated wallets. After you declare the amounts, your organisation credits the declared and approved funds to the selected wallets on the Zaggle card. + + The following wallets are available on your card: + + - **Food wallet**: Can be spent on Swiggy, Zomato, BigBasket and more. + - **Fuel wallet**: Valid at all petrol pumps in India. + - **Telecom wallet**: Applicable for online phone bill payments and recharges. + - **Books and periodicals**: Applicable across books and periodicals purchases from Amazon, Flipkart and other online and offline stores. + + You can use the Zaggle card to make spends using these wallets. + + +## How it Works + +1. Select the flexible benefits to declare on the Payroll Dashboard. +1. Update personal infromation and complete KYC. +1. Receive the Zaggle card at the specified address. + +## Setup & Declare Benefits + +There are three steps to declare flexible benefits on Zaggle. + + +### 1. Declare Benefits + + Once your organisation has set up flexible benefits plan via Zaggle, you can declare your benefits on the Payroll Dashboard. + + 1. Log in to the Payroll Dashboard. + 1. Navigate to **Tax Deductions** in the left menu and go to **Flexible benefits plan** in right pane. + 1. Click **START DECLARING**. + 1. On the **Flexible Benefits** page, select the check boxes for the benefits you want to avail. + 1. Enter the monthly amount to declare. The amount you declare must be between the minimum and maximum allocated limits. + ![Select check boxes to declare benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-fbp-zaggle.jpg.md) + 1. Click **CONTINUE**. + + This saves your flexible benefits plan. + - To change FBP, select or clear the respective check boxes. The updated flexible benefits plan is effective starting the upcoming month. + - You can change your flexible benefits plan throughout the month until your organisation finalises the monthly payroll. + + + + +### 2. Update Personal Information + + You must verify your identity to receive your Zaggle card. + + Enter your details such as the Name, Phone number, Date of Birth and PAN and click **VERIFY & CONTINUE**. + + + +### 3. Recieve Card at Address + + Your organisation can choose to either: + - Deliver cards to your home address/doorstep + - Deliver cards to your office headquarters + + You can receive your cards at the address selected by your organisation. + + +## Fund Transfer + +After you declare the amounts, your organisation's HR/Admin transfers the approved funds to your wallet. The approved funds may be equal to or less than the declared amount. + +Once the fund transfer is complete, you receive an email notification. You can then use the Zaggle card to make purchases and collect proofs. + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot encash or transfer the declared/approved amounts to your personal bank account. +> + +### Related Information + +- [IT Declarations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md) +- [Employee Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md) diff --git a/llm-content/payroll/employees/instant-reimbursements.md b/llm-content/payroll/employees/instant-reimbursements.md new file mode 100644 index 00000000..d91b5920 --- /dev/null +++ b/llm-content/payroll/employees/instant-reimbursements.md @@ -0,0 +1,45 @@ +--- +--- + +--- +title: Claim Instant Reimbursements | RazorpayX Payroll +heading: Instant Reimbursements +desc: Get immediate reimbursement for your office expenses through RazorpayX Payroll's instant reimbursement feature. +index: false +tags: razorpayx payroll, employees, instant reimbursements +--- + + Get reimbursed promptly for your eligible expenses without waiting through lengthy approval cycles. The system validates your submitted proofs immediately using OCR technology and processes eligible reimbursements automatically based on your company settings. + +## How Instant Reimbursements Work + +Once you submit your reimbursement request: + +- The system immediately validates your submitted receipts and proofs using OCR technology. +- Eligible reimbursements are approved automatically based on your company's settings. +- Reimbursement amounts are processed instantly, subject to company-defined thresholds. +- You'll receive the funds in your linked account without waiting for manual approvals. + +## Claim Instant Reimbursements + +To claim an instant reimbursement: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +2. Navigate to the **Reimbursements** section. +3. Click on **Claim a Reimbursement.** +4. Select the type of reimbursement (Travel, Food, Fuel, and so on). +5. Enter the expense date. +6. Provide a description of the expense (optional if not made compulsory in settings by the administrator). +7. Enter the amount spent. +8. Upload supporting documents or images (required if attachments are made compulsory in the settings by the administrator). +9. Click **Request Reimbursement** to submit. + +![Request reimbursements on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-reimbursements.jpg.md) + +After submission, your reimbursement request is automatically approved. + +You can click **View Past Requests** to track your instant reimbursement requests made in the past. The approved amount shall be credited with your next salary, though instant reimbursements might be processed faster as per company policy. + +### Related Information +- [Employee Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md) +- [IT Declarations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md) diff --git a/llm-content/payroll/employees/my-profile.md b/llm-content/payroll/employees/my-profile.md new file mode 100644 index 00000000..f800c541 --- /dev/null +++ b/llm-content/payroll/employees/my-profile.md @@ -0,0 +1,237 @@ +--- +title: Customise and set up your user profile on Razorpay Payroll +heading: Profile Setup +description: Set up your employee user profile on the RazorpayX Payroll Dashboard. +--- + +# Profile Setup + +After you log in to your Payroll Account as a first-time user, you must set up your employee profile. This includes the following: +- [View and update your user profile](#set-up-profile) including statutory payments (TDS, PF and more), leave set up, user roles, benefits availed and more. +- [Upload an identity photo](#upload-photo). +- [Upload necessary documents](#upload-documents). +- [Customise notifications preferences](#set-preferences). +- [Customise and manage 2FA modes](#change-default-2fa-mode). + +## Set Up Profile + +The user profile provides a detailed view of your employment, attendance payment and benefits information. + +> **SUCCESS** +> +> +> **Available Now!** +> +> Watch the video on to how to [set up employee profile](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/video-tutorials.md#set-up-my-profile). +> + +To set up your user profile: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Go to the user profile icon at the top-right corner of the page and click **My profile**. This opens your user profile. + + ![Navigating to setting up profile on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-employee-get-started1.jpg.md) + +You can view and edit your personal, payment and employment details in **User Profile** such as the following: + + +### Basic Information + + In the **Basic Information** section, you can view your employment details: + - **Type** as in Employee or Contractor + - **Registered Email** + - **Date of Hiring** + - **Title** + - **Employee ID** + - **Department** + - **Manager** + - **Location** of employment + - **Last Login** + + Click **EDIT** and change your name as necessary. Click **CONTINUE** to save your changes. + + ![RazorpayX Payroll view basic information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-user-profile.jpg.md) + + + +### Upload Photo + + Click **Upload Photo** in the right pane to add your photo. + + Ensure your photo is a 300x300 pixels close-up of your face. Choose the file to upload and click **UPLOAD PHOTO**. + + + +### Compensation & Perquisites + + In the **Compensation & Perquisites** section, you can view: + - **Annual Salary**. This is your CTC. To view the salary break down, navigate to **My Pay Slips**. + - **Number of Bonuses**. Click **VIEW BONUS** to view the bonuses you were paid. + + Know more about [perquisites](https://razorpay.com/payroll/learn/perquisites-meaning/). + + + +### Advance Salary + + In the **Advance Salary** section, you can view: + - **Advance Salary**, if you have availed it. + - **Advance Salary EMI** amount. Your employer deducts this amount from your monthly salary. + + + +### Leaves & Attendance + + In the **Leaves & Attendance** section, you can view: + - **Shift timing**. This can be either: + - **Default shift** or the working hours defined in your offer letter. + - Custom shift with timings. For example, `12:30 - 17:30`. + - Total **Earned Leaves** balance. + - Other leaves' balance as configured by your organisation. For example, **Medical leaves**. + + + +### Past Payroll in FY + + In the **Past Payroll in FY** section, you can view: + - Total **Taxable Salary**. + - **Exemption** from salary. + - TDS deducted for the previous year. + - **Previous Employer(s) Taxable Salary**. + - **Previous Employe(s) TDS Deducted**. + + + +> **WARN** +> +> +> **Watch Out!** +> +> This section is visible to you only when previous financial year's payroll data is available with RazorpayX Payroll. +> + + + + + +### Payment Information + + In the Payment Information section, you can view the following. Click **EDIT** to change: + - PAN (Permanent Account Number) + - **Bank Account Number**. Enter your bank account number twice to confirm. + - **IFSC Code**. You can find the IFSC in your bank account's cheque book or you can search online at [bankifsccode.com](https://bankifsccode.com/). + - Beneficiary Name + - Payment mode. Possible options: + - Default, as set up by your organisation. + - IMPS + - NEFT + + Click **CONTINUE** to save your changes or click **SKIP** to provide details on a later date. + + + +### Provident Fund, Professional Tax, ESI, LWF + + In this section, you can check the compliance payments and their statuses. + - **PF Status**: Can be disabled for you, or you have opted in/opted out. Contact your HR/organisation administrator to make changes. + - **PF UAN**: Provide your UAN if applicable. If you do not have a UAN, Payroll can register you for PF and generate a UAN. + - **Professional Tax**: If your employment location state in India (as set in Basic information) collects Professional Tax, the status is `Enabled`. + - **ESIC Status**: Shows the status of your ESIC registration for employees. + - **ESIC IP Number**: View the unique ESIC ID called ESIC IP number. + + + +### Other Information + + In this section, you can add other information to your Payroll account. + - **Phone number**: Add your phone number to receive salary credit notifications from Payroll. + + You can also configure Two-factor authentication using your phone number and OTP and enhance security. 2FA is possible only if your employer has enabled it for you. + - **WhatsApp Integration**: If your organisation has integrated Payroll with WhatsApp, you can receive your monthly payslips on your WhatsApp chat. + + Select the check box to enable the feature. + - **Gender**: Select your gender from the options in the drop-down menu. + - **Date of Birth**: Click the text box to open the calendar modal and enter your date of birth. + - **Blood group**: Enter your blood group in the text box. + - **Business Unit**: Provide the business unit you belong to. This is usually pre-configured for you by your organisation. + + Click **CONTINUE** to save your changes. + - Click **SKIP** to save the changes made and skip adding the other information. + - Click **CANCEL** to discard your changes. + + + +### User Roles & Permissions + + In this section, you can view your role as defined by your organisation. By default, you are an **Employee/Contractor**. + + Other roles are visible if you are added as a collaborator or are assigned any User Roles by the Payroll Administrator. + + +## Set Preferences + +You can set email preferences for events and modify your password on the Preferences page. + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to the user profile icon and click **Preferences**. +1. On the Preferences page, you can change the following: + + + +### Change the Password + + To change your password: + 1. Click **RESET** against **Password**. + 1. In the Reset Password pop-up modal, click **RESET PASSWORD**. + + This sends you a password reset email to your registered email address. Follow the link in your email to reset your password. + + + +### Change Email Preferences + + To set email preferences: + 1. Go to **Email Preferences** on the **Preferences** page. + 1. Select and clear the check boxes against the events listed on-screen. + 1. Click **SAVE PREFERENCES**. + + You have successfully changed your email preferences to receive notifications only for the selected events. + + + +### Change Default 2FA Mode + + To change the default 2FA mode: + 1. Go to [**My profile**](#set-preferences) → **Preferences** page. + 1. Navigate to **Two Factor Authentication** → **MANAGE**. + 1. Select between either **Email** or **Authenticator app** as the preferred mode of authentication. Click **CONTINUE**. + + If you select **Authenticator app**: + 1. Download the preferred authenticator app on your mobile device. + 1. Scan the QR code displayed on the **Authenticator App Setup** page. + 1. Enter the 6-digit code from the authenticator app. + 1. Click **VERIFY & SETUP**. + + This successfully changes the default 2FA mode. + + + + +## Upload Documents + +As directed by your HR/Manager, you can upload the relevant documents on the Payroll Dashboard. To upload documents: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **Documents** in the left menu. You can also navigate to **Reminders** and click **documents**. +1. Select the type of document to upload using the drop-down menu. You can also add a description +1. Select the relevant documents to upload. Refresh the page to cancel the upload. +1. Click **UPLOAD DOCUMENT(S)**. + + ![Click Documents on Razorpay Payroll Dashboard and Upload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-upload-documents.jpg.md) + +You have successfully uploaded your documents to Payroll. + +### Related Information + +- [IT Declarations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md) +- [Employee Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md#onboarding) diff --git a/llm-content/payroll/employees/payslips-form16.md b/llm-content/payroll/employees/payslips-form16.md new file mode 100644 index 00000000..55d3e0ba --- /dev/null +++ b/llm-content/payroll/employees/payslips-form16.md @@ -0,0 +1,130 @@ +--- +title: View existing and upcoming payslips in RazorpayX Payroll and download Form 16 +heading: Payslips & Form 16 +description: View the latest, upcoming and older payslips on the RazorpayX Payroll Dashboard. +--- + +# Payslips & Form 16 + +A payslip is a document that provides a detailed view of an employee's total earnings, gross and net pay additions and deductions (such as bonus, professional tax, loss of pay, and more). It is also a proof of employment. + +On the Payroll Dashboard, you can: +- View year-wise payslips. + - [View and download the latest payslips](#download-older-payslips). + - [View the payslip for the current ongoing month](#preview-current-payslip). +- [View and download Form 16 when available](#about-form-16). +- [Request for a Salary Advance](#request-salary-advance). + +Know more about [payslips/salary slips](https://razorpay.com/payroll/learn/salary-slip/). + +> **SUCCESS** +> +> +> **Available Now!** +> +> Watch the video on to how to [check and download pay slips](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/video-tutorials.md#check-payslips-and-form-16s-on-the-dashboard). +> + +## Payslip Actions + +To view your payslips: +1. Log in to the Payroll Dashboard. +1. Navigate to **My Pay Slips** in the left menu. + +The following payslip actions are available on the Payroll Dashboard. + + +### View Latest Payslips + + To view the payslip for the latest months: + 1. Navigate to [**My Pay Slips**](#payslip-actions). + 1. **Select financial year** from the drop-down menu. By default, the current financial year is selected. + 1. Click the month to view the payslip for that month. + + ![My Pay Slips click month on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-latest-payslips.jpg.md) + + This opens the payslip for the selected month. On the **Payslip** page, you can: + - Click **DOWNLOAD** at the bottom of the page to download the selected payslip. + - Click **VIEW DETAILS** to view the month-wise comparative view of the salary received. + + + +### Download Older Payslips + + To download payslips of the previous year: + + 1. Navigate to [**My Pay Slips**](#payslip-actions). + 1. Click the month to open the payslip for the respective months. + 1. Click **Download Payslips**. The **Download Your Payslips** pop-up modal opens. + 1. Select the **Date Range** using the drop-down menu. We email the payslips to your registered email address. + + We email the older payslips to your registered email address, where you can download the `.zip` file. + + + +### Preview Current Payslip + + You can also preview the payslip for the current month. This lets you view your additions and deductions for the current month in real time. + + To view payslips for the current month: + 1. Log in to the Payroll Dashboard. + 1. Navigate to **Tax Deductions** in the left menu. + 1. Click **View Payslip** in the right pane. + ![View Payslip on the Razorpay Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-payslips.jpg.md) + + This opens the payslip preview for the current month. Click **VIEW DETAILS** at the bottom of the page to view the month-wise comparative view of the salary. + + +## About Form 16 + +Form 16 is a TDS certificate employees can download from the Payroll Dashboard. It is available to all employees whose yearly income is greater than ₹2.5 lakhs. Know more about [Form 16/Salary TDS Certificate](https://razorpay.com/payroll/learn/form-16/). + +> **WARN** +> +> +> **Watch Out!** +> +> Form 16s are available on the Dashboard from mid-June/early July onwards, after your organisation has completed the Q4 TDS filing activity in May. +> + +To download your Form 16s for the previous financial year/current assessment year: +1. Log in to the Payroll Dashboard. +1. Go to **My Pay Slips** in the left menu. +1. In the right pane, click **Form 16**. + ![Download Form 16 on Razorpay Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-form-16.jpg.md) + +This opens the Form 16 page, where you can download the document. + +## Request Salary Advance + +You can request a salary advance from the Payroll Dashboard. + +> **WARN** +> +> +> **Watch Out!** +> +> You can raise a salary advance request only if your employer has allowed employees to do so. If you cannot view the **Salary Advance** option in the right menu, contact your HR/Manager to avail the salary advance facility. +> + +To raise an advance salary request with your employer: + +1. Log in to the Payroll Dashboard. +1. Navigate to **My Pay Slips** in the left menu. +1. Click **Salary Advance** in the right pane. +1. On the **Advance Salary Requests** page: + 1. Enter the **Amount** in the text box. This is the total amount you require. + 1. Provide the **EMI** amount deductible every month. Your monthly salary is the net difference of your previous salary and the EMI. + 1. Provide a reason for availing the advance. + 1. Click **REQUEST ADVANCE**. + + ![Request Salary Advance Razorpay Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-request-salary-advance.jpg.md) + +This successfully creates an advance salary request. After approval, you can view your salary advance details in: +- **My profile** → **Advance Salary**. +- **My Pay Slips** → **Salary Advance**. + +### Related Information + +- [IT Declarations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md) +- [Employee Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md) diff --git a/llm-content/payroll/employees/reimbursements.md b/llm-content/payroll/employees/reimbursements.md new file mode 100644 index 00000000..398e3847 --- /dev/null +++ b/llm-content/payroll/employees/reimbursements.md @@ -0,0 +1,61 @@ +--- +title: Apply for Reimbursements | RazorpayX Payroll +heading: Reimbursements +description: Reimburse office expenses through your employer on the RazorpayX Payroll Dashboard. +--- + +# Reimbursements + +You can request reimbursements or avail imprest for expenses on the Payroll Dashboard. You receive the reimbursement payments either: +- As a one-time payment. +- Together with your monthly salary. + +> **INFO** +> +> +> **Handy Tips** +> +> You can also claim reimbursements via [WhatsApp](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/whatsapp-integration.md). +> + +> **SUCCESS** +> +> +> **Available Now!** +> +> Watch the video on to how to [claim reimbursements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/video-tutorials.md#claim-reimbursements). +> + +## Apply for Reimbursements + +To apply for reimbursements: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **Reimbursements** in the left menu. +1. On the Claim a Reimbursement page: + 1. Select the **Type of Reimbursement** from the drop-down menu. + 1. Choose the **Expense Date** from the calendar. + 1. Provide a **Description** for your reimbursement claim. This is optional but recommended. + 1. Enter the **Amount** to claim as reimbursement. + 1. Attach any **Supporting images or files**. Select **Choose file(s)** and upload files, each up to 5MB. + + +> **WARN** +> +> +> **Watch Out!** +> +> To upload multiple files as reimbursement proofs, select all the files and upload them together. If you upload a single file and reupload another file, the older file is overwritten. +> + + 1. Click **REQUEST REIMBURSEMENT**. + + ![Request reimbursements on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-reimbursements.jpg.md) + +You have successfully requested reimbursements from your employer. Once your manager approves the request, Payroll processes the reimbursement as chosen by your employer. You can click **View Past Requests** to view your past requests and their status. + +### Related Information + +- [Employee Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md) +- [WhatsApp Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/whatsapp.md) +- [IT Declarations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md) diff --git a/llm-content/payroll/employees/resignation.md b/llm-content/payroll/employees/resignation.md new file mode 100644 index 00000000..ff4f11b9 --- /dev/null +++ b/llm-content/payroll/employees/resignation.md @@ -0,0 +1,69 @@ +--- +title: Apply Resignation on RazorpayX Payroll | RazorpayX Payroll +heading: Resignation +description: Use the RazorpayX Payroll Dashboard as an employee for resignation. +--- + +# Resignation + +You can submit your resignation to your organisation on the Payroll Dashboard. After you submit a resignation request, your manager/administrator may approve it, post which we settle your full and final settlement (FNF). + +> **SUCCESS** +> +> +> **Available Now!** +> +> Watch the video on to how to [submit resignation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/video-tutorials.md#submit-resignation). +> + +> **WARN** +> +> +> +> **Watch Out!** +> +> You can submit resignation requests only if your organisation has enabled the resignation module. +> + +## Submit Resignation + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard) +1. Navigate to the user icon on the top right corner and click **My profile**. +1. On **User Profile** page, click **SUBMIT RESIGNATION** at the bottom of your profile. This opens the **Employee Resignation** page. + 1. Review the basic information such as the **Name**, **Email** and **Manager**. + 1. Provide the resignation details such as the **Date of Resignation**, **Reason for Resignation** and other **Comments**. + + + +### Is the Date of Resignation the same as the Last Working Day? + + No, they are not the same. + + - **Date of Resignation**: Marks the date when your notice period begins. + - **Last Working Day**: Marks the end of your notice period, after which you you are relieved from your duties in the organisation. + + Consider the following example: + + + Term | Date/Duration + --- + Date of Resignation | August 30 + --- + Notice Period Policy | One month/30 days + + + In this case, your Last Working Day (LWD) will be September 30, post which we process your FNF. + + + + 1. Click **SUBMIT RESIGNATION**. + + ![Payroll Dashboard Employee submit resignation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-resignation.jpg.md) + +You have successfully submitted a resignation request to your manager. We notify you about your resignation status via email. You can also check your status in the **My Profile** → **Resignation Status** section. + +### Related Information + +- [Employee Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md) +- [IT Declarations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md) +- [WhatsApp Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/whatsapp.md) diff --git a/llm-content/payroll/employees/slack-integration.md b/llm-content/payroll/employees/slack-integration.md new file mode 100644 index 00000000..e0f4e90c --- /dev/null +++ b/llm-content/payroll/employees/slack-integration.md @@ -0,0 +1,62 @@ +--- +title: Use the Slack Integration on RazorpayX Payroll +heading: Slack Integration +description: Connect and use the Slack app integration to apply leaves, reimbursements, view holiday lists and more. +--- + +# Slack Integration + +You can use your official Slack account to apply for leaves, reimbursements, check the status of approval, view payslips and more. You must connect your Slack account with Payroll to start using the Slack app integration. + +> **WARN** +> +> +> **Watch Out!** +> +> This is possible only if your organisation has integrated with Slack using the [Slack Integration Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/slack.md). +> + +## Connect to Payroll + +To connect your Slack account with Payroll: + +1. Log in to your official Slack account. +1. Navigate to **Apps** in your account and select RazorpayX Payroll. Else, you can also go to any channel and type `/xpayroll` to initiate the process. +1. Once initiated, your Payroll account opens in the browser with the option to complete the connection. Select **CONNECT**. + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you are signed in to your Payroll account. +> + +After you complete the configuration, you can check the list of commands available to you via the Slack app. + +## List of Commands + +Refer to the following list of commands you can use in the Slack app. Enter the commands with `/`. + +Command | Description +--- +`/apply-leave` | Employees can apply for leaves and get notified of their leave status; Admins and Managers can approve/reject leaves. +--- +`/on-leave` | Employees and the team can check their team members on leave for the next 5 days. +--- +`/leave-balance` | Employees can check their leave balance instantly. +--- +`/reimburse` | Employees can apply for reimbursements and get notified of the status when Admins or Managers approve/reject reimbursements, both within the Slack app. +--- +`/payslip` | Employees can view their payslips. +--- +`/holiday` | Employees can easily access to the organization's holiday list. +--- +`/check-in` and `/check-out` | Employees can check in and check out for attendance. +--- + +### Related Information + +- [Employee Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md) +- [Leaves and Attendance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/attendance-leaves.md) diff --git a/llm-content/payroll/employees/whatsapp-integration.md b/llm-content/payroll/employees/whatsapp-integration.md new file mode 100644 index 00000000..991d3ca5 --- /dev/null +++ b/llm-content/payroll/employees/whatsapp-integration.md @@ -0,0 +1,89 @@ +--- +title: Use WhatsApp to request Payslips and Reimbursements +heading: WhatsApp Integration +description: Request payslips and reimbursements via WhatsApp. +--- + +# WhatsApp Integration + +The WhatsApp integration is a quick and convenient method to raise and submit reimbursement requests and proofs, and also view the latest payslips. + +> **WARN** +> +> +> **Watch Out!** +> +> The WhatsApp integration is available only if: +> - Your organisation has integrated with WhatsApp. +> - You have [enabled the WhatsApp integration](#connect-whatsapp) for your phone number. +> + +## How it Works + +1. Ensure your organisation has integrated WhatsApp with Payroll. +1. Connect your WhatsApp account with Payroll. +1. Chat with the WhatsApp bot to raise requests. + +## Connect WhatsApp + +The WhatsApp integration is available only if your organisation has integrated WhatsApp with Payroll. You can also contact your Manager/HR to check if the integration is available. + +To check and enable the WhatsApp integration: +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **My profile** → **Other Information** → **EDIT**. +1. Check if the **Connect to WhatsApp** is visible. + + ![Payroll Dashboard Other Information enter phone number select check box](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-enable-whatsapp.jpg.md) +1. In the Phone Number text box, provide your WhatsApp-enabled phone number. +1. Select the **Enable WhatsApp for my phone number** check box. + +You have successfully enabled the WhatsApp integration. Open your WhatsApp application and view the text message from **RazorpayX Payroll**. Text `hi` to get started. + +## Use WhatsApp + +You can use the WhatsApp integration to: + + +### Claim Reimbursements + + To claim reimbursements via WhatsApp: + + 1. Open your WhatsApp application → RazorpayX Payroll chat. + 1. Text **Hi** in the chat. + 1. Tap **File Reimbursement**. + 1. Select the **Reimbursement Type** from the pop-up modal. You can select from the reimbursement types your organisation has configured. + 1. Type the **Reimbursement Amount** without any special characters. For example, `1500`. + ![Select options and enter amount Payroll WhatsApp integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employees-WA-reimbursement.jpg.md) + 1. **Enter Remarks**, if applicable. Else, tap **Skip**. + 1. Enter the expense date in a `DD/MM/YYYY` format. For example, `01/09/2024`. + - Ensure you enter the forward slashes `/` in the date entered. + - For single digits, add 0. For example, 01. + 1. **Upload Attachments**, if any. + - On your mobile phone, click the attachment icon to select an existing file or click the camera icon on your mobile phone to take a picture of the bill. + - On the web app, click the + icon to select an existing file. + 1. Click the send icon. + 1. Tap **Confirm** to proceed. To cancel or discard the reimbursement request, tap **Restart**. + + Your reimbursement request is successful. + + + +### View Payslips + + You can use the WhatsApp integration to view past payslips. + + 1. Open the WhatsApp application and text Hi. You can also click **Go Back to Main Menu**. + 1. Tap **View Past Payslips**. + 1. Select the **Number of Months** in the pop-up modal. + + ![Request and download Payroll payslips via WhatsApp](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-employee-WA-payslips.jpg.md) + + You have successfully requested to view the past payslips. + + You can download the PDFs of the payslips from the chat for the next three hours, after which the PDFs expire. + + +## Related Information + +- [Employee Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md) +- [Request Reimbursements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/reimbursements.md) diff --git a/llm-content/payroll/esi.md b/llm-content/payroll/esi.md new file mode 100644 index 00000000..7cd1f65e --- /dev/null +++ b/llm-content/payroll/esi.md @@ -0,0 +1,41 @@ +--- +title: Manage ESI compliance payments in RazorpayX Payroll +heading: Employee State Insurance (ESI) +description: Set up, pay and check ESI payments on RazorpayX Payroll. +--- + +# Employee State Insurance (ESI) + +Employees State Insurance (ESI) is a government mandated health insurance for employees. It is mandatory for organisations with more than 20 employees, whose monthly salary is lower than ₹21,000. + +> **WARN** +> +> +> **Watch Out!** +> +> Payroll does not offer initial registration for ESI. Follow [these steps](https://portal.esic.gov.in/ESICInsurance1/ESICInsurancePortal/Employer_Employee_registration_through_portal.pdf) to register on the ESIC Portal. +> + +If ESI is enabled for your organization, Payroll automatically deducts the ESI amount from all your employees' salary, whoever is qualified for it. +- ESI cannot be disabled for specific employees if they meet the qualification criteria for ESI. +- If an employee's salary increases above the threshold, the ESI contribution does not stop immediately. You can stop ESI only in April or October of every year. + +### Requirements and Exceptions + +- **ESI Registration for Employees**: + +ESI Corporation requires employers to register their employees within 10 days of their date of appointment. If ESI registration is done after these 10 days, a show cause notice is automatically sent to the employer asking for relevant documents. + +If an employer fails to provide this documentation, the date of registration is deemed as the date of appointment. Know more about the [ESI circular](https://www.esic.nic.in/attachments/circularfile/cc3953367ad8791a29149cd14d0d3ef5.pdf). + +- **ESI and Conveyance Allowance**: + +The Supreme Court of India passed an order dated 8 March 2021 that conveyance allowance or travel allowance do not fall under the definition of ESI wages. + +If you use a custom salary structure that includes an allowance called **Conveyance Allowance**, you must exempt it from ESI contributions and for computing the ceiling limit of ₹ 21,000 per month. + +### Related Information + +- [TDS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tds.md) +- [Statutory Compliance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md) +- [HR Operations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md) diff --git a/llm-content/payroll/exceptional-cases.md b/llm-content/payroll/exceptional-cases.md new file mode 100644 index 00000000..b4024d6d --- /dev/null +++ b/llm-content/payroll/exceptional-cases.md @@ -0,0 +1,117 @@ +--- +title: Resolve Salary Exceptional Cases in RazorpayX Payroll +heading: Exceptional Cases +description: Troubleshoot the possible exceptional cases when disbursing salaries in RazorpayX Payroll. +--- + +# Exceptional Cases + +Check the troubleshooting guide to resolve some exceptional cases in Payroll. The case, the reason, and the solutions to some issues are explained below. + +### Making Deduction Removes Custom Salary Structure + +Sometimes when you put in a deduction, Payroll removes the custom salary structure. This applies specifically to employees to whom ESI and PF apply. + +Consider an employee with the following custom salary structure: + +Basic Salary | 8,000 +--- +House Rent Allowance (HRA) | 4,000 +--- +Special Allowance | 4,000 +--- +Employer ESI Contribution | 520 +--- +Employer PF Contribution | 1,440 +--- +**Gross Monthly Earnings** | **17,960** + +Now, let us say we need to put a deduction of ₹5,000 to this month's payroll. The gross pay then is 17,960-5,000 = **₹12,960**. + +To make that deduction, it is sensible to remove the amount proportionately from the rest of the salary components, as shown. + +Basic Salary | 5500 (8000-2500) +--- +House Rent Allowance (HRA) | 2750 (4000-1250) +--- +Special Allowance | 2750 (4000-1250) +--- +Employer ESI Contribution | 520 +--- +Employer PF Contribution | 1,440 +--- +**Gross Monthly Earnings** | **12,960** + +But by doing so, **our ESI and PF of employer contributions will be incorrect**, as these are calculated as a percentage of other components. + +In such a case, you should manually lower the value of other components to correct the gross pay can as per the PF and ESI values, **which can pose discrepancies**. + - There is the added complication of unknown or missing components. + - It presents problems in the payroll database of the employee which can raise issues during audit. + +Overall, this problem cannot be reliably solved using mathematical calculations. + +Hence, in such cases, Payroll **removes the custom salary structure**, and assigns a new structure that back-calculates from the required gross pay. + +### Add External Payroll Information + +To accurately calculate an employee's TDS liability, you must provide the employee's previous payroll data. This is important even if you have joined Payroll recently and have already processed employees' salaries. + +To add previous payroll data: +1. Log in to the Payroll Dashboard. +1. Go to **People** and select the employee for whom you are adding the previous payroll data. +1. Navigate to **Past Payroll In FY 2023-2024** → **EDIT**. + 1. Enter the previous year's salary details in the first section. + 1. Enter the past salary details in the past employer(s) salary section. +1. Click **CONTINUE**. + +With the details provided, Payroll automatically calculates the TDS. + +### Error Message when Finalising Payroll + +In Payroll, to execute a payroll, it first needs to be **finalised**. + +- Previously, you could finalise payroll for different months and then request execution in any order. +- However, this often led to **incorrect TDS calculations** because Payroll only considers the past income from _executed payroll_, and not from _finalised payroll_. + +To combat this, effective from September 2021, Payroll has added a limitation: **you can finalise payroll for one month at a time only**. If a particular month's payroll is finalised and you attempt to finalise the payroll for another month, then Payroll shows an error message. + +In such a situation, you have two options - +- Go to the other month's payroll and un-finalise it by clicking on **Make Changes**. +- Go to the other month's payroll and execute it. + +### Modify Salary after Payroll is Executed + +You cannot modify the salary after the payroll for a month is executed. Such changes create inconsistencies in the salary disbursals process and can lead to differences in the compliance calculations. + +- In Payroll, **it is not possible to make modifications retrospectively**, especially after payroll **has already been executed**. +- If there is a necessity to change the salary or make changes to the employee's profile that affects the salary, we suggest you do so in the **upcoming payrolls**. + +For instance, if an employee's salary needed to be increased in the past month and was not, you can add the additional amount to the next or upcoming payrolls as arrears. + +That way, your past calculations will not change, and the employee receives the required modifications in their next payroll. + +> **INFO** +> +> +> **Handy Tips** +> +> On the **Run Payroll** dashboard, we use the following action buttons: +> - **FINALIZE PAYROLL** +> - **REQUEST EXECUTION** +> +> This is to imply a two-step process before positively finalising the payroll. You can always make changes to a finalised payroll by clicking on the **MAKE CHANGES** button and then clicking on **REQUEST EXECUTION**. +> + +You **cannot** make or request modifications after clicking **Request Execution**. + +### Execute Payroll after TDS returns are Filed + +You can execute payroll for past months for which TDS returns have already been filed. + +However, we **cannot change the TDS returns**. This can lead to inaccurate data for the employees whose payroll is executed later. Especially if TDS is deducted, the employee(s) will not see it in their [Form 16](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tds.md#form-16-16a). In such a case, you need to get a correction filed externally in such a case. + +### Related Information + +- [Salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md) +- [Run Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md) +- [One-time Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/one-time-payments.md) diff --git a/llm-content/payroll/execute-payroll.md b/llm-content/payroll/execute-payroll.md new file mode 100644 index 00000000..80614a69 --- /dev/null +++ b/llm-content/payroll/execute-payroll.md @@ -0,0 +1,113 @@ +--- +title: Refer to Execute Payroll Checklist in RazorpayX Payroll +heading: Execute Payroll Checklist +description: Use the RazorpayX Payroll execution checklist before executing your next payroll. +--- + +# Execute Payroll Checklist + +Once you complete [Payroll account setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/quickstart.md), you can execute payroll for your organisation. Payroll automates transactions and manages payroll as per settings enabled. Use the following checklist to execute payroll without any misses. + +> **WARN** +> +> +> **Watch Out!** +> +> Your employees and company depend on this one-click payroll processing mechanism. Use this checklist to ensure all prerequisite steps are completed before processing payroll. +> + +## 1. Update Employee List + +Before disbursing salaries, ensure that your employee list is up-to-date. Add, modify or dismiss employees according to their employment status and compensation changes. To do so: + +1. Log in to your [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. In the left menu, navigate to **Admin Options** → **People**. +1. Select the relevant employee as per from **ALL** or other tabs. +1. Click **EDIT** against the applicable sections, as shown. + ![Editing employee information in Payroll.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-modify-employee.gif.md) + +Edit their personal and payment information, their leaves and their attendance before the payroll execution date. + +## 2. Check Missing Information + +Check if any employee's critical information, like their bank account number, UAN, PAN or so on is missing. To do so: + +1. Log in to your [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Go to **Admin Options** → **Reports** +1. Click **Missing Information**. It provides a list of employees in the left column the information missing about them against their name. + +![Employee missing info highlighted in employee's missing info modal in RazorpayX Payroll.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-reports-missing-info.jpg.md) + +## 3. Adjust Variables + +Variables can either be an addition to the salary, a deduction based on a loss of pay, a recovery or a reimbursement. + +![Edit Salary window to enter amount and labels on Payroll.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-edit-salary-additions-deductions.jpg.md) + +### Additions + +To update your employees' **Additions**: +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to the payroll month, and click **EDIT** against the employee's name. +2. Add any bonus or incentives under **Additions**. +3. Click **Done** once updated. + +### Deductions + +To update your employees' **Deductions**: + +- If your organisation uses the Payroll attendance module to track leaves, navigate to **Reports** → **Attendance** → **Payroll Adjustments** and approve any loss of pay recommendations that Payroll suggests. + ![Leave reccomendations tab on Payroll on the right hand side menu.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-leave-suggestions.jpg.md) + +- If you are tracking the loss of pay (LOP) days outside of Payroll or using the [Jibble integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/jibble.md), follow the given steps: + + + Know how to [sync loss of pay data from Jibble](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/jibble.md#verify-lop-in-payroll). + + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **Pay Employees** → **Run Payroll**. Select the employee here. + 1. Click **EDIT** and update this data under **Deductions**. + 1. Click **Done**. + + + +Check how you can modify other salary components as part of [Run Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md). + +## 4. Verify Salaries + +Before processing payroll, check under **Reports** → **Salary Register** on your [Payroll Dashboard](https://payroll.razorpay.com/dashboard) whether your employees are paid as per the applicable cost-to-company (CTC). Cross-verify their salaries and update the information accurately. + +> **WARN** +> +> +> **Watch Out!** +> +> You **cannot** modify payroll after it is executed. +> + +## 5. Check Due Dates + +For Payroll to make timely compliance payments, you must execute Payroll on or before 5th or 10th of the month, depending on the compliances applicable to your organisation. + +Compliance | Payroll Due Date | Government Due Date +--- +TDS (Salaried/Employees) | 5th of the month | 7th of the month +--- +TDS (Non-salaried/Contractors) | 5th of the month | 7th of the month +--- +PF | 10th of the month | 15th of the month +--- +ESIC | 10th of the month | 15th of the month + +## 6. Finalise and Execute + +Finalise the payroll for the month. [Transfer the funds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md) required to process payroll and then **Request Execution** with ease. You **cannot** [make changes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/exceptional-cases.md) to payroll after you have executed it. + +Authorise the payroll execution using the OTP received at your registered email address/authenticator app. + +### Related Information + +- [Run Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md) +- [Salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md) +- [Statutory Compliance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md) diff --git a/llm-content/payroll/faqs.md b/llm-content/payroll/faqs.md new file mode 100644 index 00000000..60ba5314 --- /dev/null +++ b/llm-content/payroll/faqs.md @@ -0,0 +1,602 @@ +--- +title: RazorpayX Payroll | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about RazorpayX Payroll. +--- + +# Frequently Asked Questions (FAQs) + +- **Manage Tax Proofs Verifications**: Explore tax proofs verifications guidelines. + + - **2FA on PF Payments**: Explore FAQs about 2FA implementation on PF. + + - **2FA on Karnataka PT Payments**: Refer to FAQs about 2FA rule on Karnataka PT. + + - **TDS Filing**: Check when the TDS Returns are filed. + + - **Challans**: Explore when challans are available on the Payroll Dashboard. + + - **TDS Charges**: See how TDS is calculated on payroll payouts. + +## Payroll APIs + +To view the APIs, follow the links. + + + + +## Quick Links + +Explore the quick links as available on the Payroll Dashboard. + + +### How do I setup a Custom Salary Structure? + + You can setup two types of custom salary structures: + - Custom salary structure for the organisation. + - Custom salary structure for a specific employee. + + Know more about [Custom Salary Structure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md#custom-salary-structure). + + + +### Are there any best practices to note before I execute payroll? + + You can refer to the [Execute Payroll checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/execute-payroll.md). + + + +### How can I make one-time payments? + + Refer to the steps on how to create [one-time payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/one-time-payments.md#make-one-time-payments). + + + +### Can I revise salaries in bulk? + + Yes, you can [bulk revise salaries](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#revise-salary) on the Payroll Dashboard. + + + +### How do I upload additions, deductions and Loss of Pay in bulk? + + You can use the [bulk upload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#bulk-upload) feature to pay and deduct additions, deductions and loss of pay. + + + +### When will Payroll pay my ESIC/PT/PF/TDS dues? + + You can refer to the [Compliance payments due dates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md#payment-due-dates). + + +## Account & Settings + + +### 1. Why was my Payroll account deactivated? + + Your account may be deactivated due to inactivity for an extended period. We hibernate your account if you have not used Payroll to [finalise and execute payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md) for an extended period of time. + + + +### 2. Can I reactivate my Payroll account? + + Yes, you can reactivate your Payroll account. [Contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/plans.md#contact-support) with the reason for your inactivity and the plan for future Payroll usage to reactivate. + + + +### 3. Is it mandatory to use the core payroll module in Payroll? + + Yes, it is mandatory. You can use other payroll modules such as Leave and Attendance, Resignation, Bonus and more in addition to the core payroll module. Core payroll includes finalising and executing payroll. Know more about [Executing Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md). + + + +### 4. Can I use supplementary modules without using core payroll? + + No. You must use the core payroll module to access supplementary modules such as Bonus, Attendance, and more. + + + +### 5. How do I provide additional permissions to my HR/Operations/Finance team members? + + You can set up user roles to create permissions and provide or restrict access to certain modules on the Payroll Dashboard. + + For example, you can create a user role: `Human Resource`, configure permissions for the user role and assign it to employees. The assigned employee/s start to have access to the permitted Payroll modules. + + Know how to [create, edit and manage user roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/user-roles-workflows.md). Navigate to **Settings** → **User Roles** on the Dashboard. + + + +### 6. How can I create approval workflows for one-time payments and reimbursements? + + Currently, you cannot create approval workflows for one-time payments and reimbursements. You can check the [available approval workflows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/approval-workflow.md#available-workflows). + + You can instead [create user roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/user-roles-workflows.md) and assign it to your team members. + + +## Payroll Payouts + + +### 1. We processed the salaries and the payments are still In Progress. What do we do now? + + + If your payment status shows `In Progress`, it means that Payroll is awaiting payment confirmation status from the bank. + + Please wait for confirmation from the bank. You can also check the status in the **Ledger** on the Payroll Dashboard. Know more about the [payment status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md#check-payment-status) and the [Payout modes and TAT](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#payout-modes-and-tat). + + + +### 2. We processed the salaries. The payment status is successful but is yet to be credited to my employees. What to do now? + + If your payouts are processed successfully, yet the amount is not credited, please wait for 3 days for the payment to reflect in the employees' accounts. + + You can retry the payment from **Reports** → **Ledger** on the Payroll Dashboard after 3 days. Know more about [Payment Statuses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md#no-credit-after-payment-success). + + + +### 3. How long does Payroll take to process payments? By when should we prepare the monthly payroll for execution? + + Refer to the [fund credit timelines](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md#fund-credit-timelines) to understand how long Payroll takes to process salary payments. You can also check the [Payment Statuses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md#no-credit-after-payment-success). + + Payroll automates the monthly payroll calculations, so you need not manually prepare the monthly payroll. However, we recommend you execute payroll before the [Payroll due dates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/execute-payroll.md#5-check-due-dates). + + + +### 4. Can we reverse salary payments after execution? + + No, it is not possible to reverse salary payments after you execute payroll. Know why we restrict [payroll modification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/exceptional-cases.md#modify-salary-after-payroll-is-executed) after execution. + + You can instead add arrears or create deductions in the upcoming payroll activity. Know more about [payroll additions and deductions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#additions-and-deductions). + + Ensure you follow the [Execute Payroll checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/execute-payroll.md) before executing payroll for employees. + + + +### 5. How long does it take for employees to receive their salary post execution? + + It takes up to 8 hours for salaries to reflect in the employees' bank accounts. Know more about [fund credit timelines](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md#fund-credit-timelines). + + + +### 6. How can I reverse one-time payments? + + It is not possible to reverse one-time payments. + + +### Fund Loading, Transfer, Account Balance + +Transferring funds to your Payroll account updates your Payroll balance. Know more about [fund transfer and payroll payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md#transfer-funds) in Payroll. + + +### 1. When will Payroll update my account balance after I transfer funds? + + Payroll takes up to 24 hours to identify a successful fund transfer transaction and update your Payroll account balance. This is due to the dependency on the banking systems. + + + +### 2. How do I know if my fund transfer transaction is unsuccessful? Why was it unsuccessful and how do I resolve it? + + We inform you the transaction status through your registered email. + + Fund transfers may be unsuccessful or delayed due to the following reasons: + - You transferred the funds on a non-working day such as on bank holidays or Sundays. + - You transferred funds from a non-whitelisted bank account source. Fund transfer is only possible via validated accounts. + - Your bank account details could be incorrect. + + Know more about [fund transfer failure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md#funds-not-updated). + + To resolve this, retry the payment using the steps mailed to your registered email address. + + + +### 3. We transferred funds to the Payroll account today and the payroll execution date is tomorrow. Will my transactions be successful? + + Your transactions are successful **with a delay**. It takes up to 24 hours for the transferred funds to reflect as balance on your Payroll account. + + To ensure timely payroll payouts, you must transfer funds at least 24 hours before you execute payroll. + + + +### 4. Can we process salary on non-working days or banking holidays? + + While IMPS works on all days of the week, we highly recommend that you do not process employees' salaries on non-working days or banking holidays to reduce the risk of delayed payments. + + Know more about [payroll payout modes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md#modify-default-payout-mode). + + + +### 5. Is there minimum or a maximum limit when transferring funds to my Payroll account? + + No, there is no minimum or maximum limit for transferring funds. + + + +### 6. We are unable to transfer the funds from our Axis account to Payroll's Axis account available on the Dashboard. The account number says it is invalid. How to resolve this? + + It is possible you encounter errors while transferring funds from your personal/corporate Axis account to Payroll's Axis account. Follow the given steps to troubleshoot: + 1. On this Axis netbanking portal: + - Select **Other Bank Payees** instead of **Axis Payees** if you use Axis Bank's Corporate Banking portal. + ![Axis corp banking Payroll fund transfer resolution](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-axis-crbanking-fix.jpg.md) + - Select **Other Bank** under **Payee** if you use Axis Bank's Retail Banking portal. + ![Axis retail banking Payroll fund transfer resolution](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-axis-retailbanking-fix.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> You can transfer funds to Payroll only via Netbanking. +> + + + 1. Enter the account number and IFSC available on the **Money Transfer** page to add funds. You can transfer the funds to your Axis account between 1:30 am-9:30 pm. Know more about [fund transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md#transfer-funds). + + +## Compliance Payments + +Following are the frequently asked questions about compliance payments. + + +### 1. What happens when I disable compliance payments settings on the Payroll Dashboard? + + When you [disable compliance settings](#2-where-can-i-modify-the-compliance-payments), you disable Payroll from automating the compliance deductions. + + For example, an employee contributes ₹2,000 towards ESIC (total of employee and employer's contribution). + + If you clear the ESI setting check box, you are disabling Payroll from making the ESI payments automatically to the ESIC. + - The ESI deduction continues to appear on the employee's payslip to maintain payroll and payslip accuracy. + - Payroll does not deduct the ESI contribution when you execute payroll. + - You must pay the statutory dues to the respective compliance departments (ESIC here) manually and externally. + + + +### 2. Where can I modify the compliance payments settings for my organisation? + + To modify compliance payments settings: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **Settings** → **Payments & Compliance Setup** → **Edit**. + 1. Clear the relevant check boxes in the **Compliance Payments Settings** section. + + Due to [PF 2FA](#pf-payments) applicability, Provident Fund (PF) is automatically cleared. + ![Compliance Payments Setting section Clear checkboxes Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-compliance-settings-disable.jpg.md) + + You have successfully disabled Payroll's automatic deduction of compliance payments. + + Ensure you make the compliance payments externally with the respective departments [on time](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md#payment-due-dates) to avoid government notices and penalties. + + + +### 3. I have disabled compliance payments for my organisation. Does Payroll deduct the money required to make compliance payments from my account balance? + + No, Payroll does not deduct any amount from your account balance towards compliance payments as you have disabled compliance payment settings. You must make the payments manually and externally. + + + +### 4. Why do compliance payments deductions appear in my employees' payslips even after I have disabled them on the Dashboard? + + The compliances continue to appear on your employees' payslips as the payments are mandatory for employees. After disabling compliance settings, it is your responsibility to make the compliance payments [on time](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md#payment-due-dates). + + +### Professional Tax + + +### 1. Why has Payroll temporarily paused automated Professional Tax payments for Karnataka employees? + + The Karnataka government has introduced 2 Factor Authentication (2FA) which mandates OTP verification from the organisation's administrators. As a result, Payroll is unable to automate PT payments for Karnataka-based employees. + + + +### 2. Does the PT 2FA rule apply to employees not located in Karnataka? + + No, the PT 2FA rule change applies only to employees in Karnataka. Payroll will continue automatically making PT payments on the respective due dates for the rest of the states. + + + +### 3. Will Payroll continue to make TDS and ESIC payments? + + Yes, TDS and ESIC payments are unaffected. Know more about the [compliance payments due dates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md#payment-due-dates). + + + +### 4. Do I need to register employees on the PT portal? + + No, you need not register your employees on the PT portal. You only need to make the PT payments before the due date. + + + +### 5. How can I check the amount I must pay as Professional Tax? + + To check the PT amount payable to the Karnataka government: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **Reports** in the left menu. + 1. Click **Salary Register**. + 1. Use the **PT Location** filter to list the employees whose PT payments you must make. + 1. Scroll horizontally against the employees' names to view the PT amounts. + ![Payroll Dashboard PT payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-professional-tax-update.jpg.md) + + The amount mentioned in the **PT** column is the PT amount payable to the government. + + + +### 6. I have already executed the payroll for the month. Will Payroll process my PT payments for Karnataka-based employees? + + No, Payroll is unable to process PT payments for Karnataka-based employees. We refund the PT amount to your Payroll wallet. You must make the PT payments for your employees. + + + +### 7. By when must I make the Professional Tax payments? + + Ensure you make the pending PT payments to the Karnataka government by 20th of the month. Know more about the [compliance payments due dates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md#payment-due-dates). + + + +### 8. How can I make the PT payments for my employees based in Karnataka? + + You must [manually make PT payments for Karnataka-based employees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/professional-tax.md#pt-payment-for-karnataka-employees). + + +### PF Payments + + +### 1. When is Payroll resuming automated PF payments? + + Starting February 2025, Payroll has resumed making PF payments for your employees. You no longer need to manually register employees and make PF payments. + + + +### 2. How is the payroll amount calculated for PF since the 2FA rule change is in effect? + + Note that as of February 2025, Payroll has resumed automated registration and PF payments for employees. + + When you finalise payroll, the amount displayed on the **Run Payroll** pages does not include the PF payments you are yet to make to the EPFO. + + However, your employees' net pay/in-hand salary is paid after considering the PF deductions. + + For example, consider the following: + + + Term | Amount + --- + Employee's Gross Pay | ₹1000 + --- + PF Deduction | ₹100 + --- + Employee's Net Pay (Gross - Deductions) | ₹900 + + + The amount displayed on the **Run Payroll** page is ₹900 * the number of employees. The ₹100 is excluded on the **Run Payroll page**, but continues to appear on the employees' payslip as a PF deduction. This is in place due to the PF rule change. + + In such cases, the following are applicable: + - You can load ₹900 (multiplied by the total number of employees) into your Payroll wallet to process the monthly payroll. + - You must remit the ₹100 to the EPFO (due to Payroll temporarily pausing automated PF payments). Follow the steps to [make PF Payments via EPFO](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/provident-fund.md#make-pf-payments-on-epfo). + + We maintain the above calculation to generate accurate payslips for your employees. + + + +### 3. Why was automatic PF payments via Payroll Dashboard temporarily paused? + + Payroll uses your EPF login credentials to automate PF registration and payments for employees. This was paused due to mandatory 2FA during EPF login. + + However, as of Feb 2025, Payroll has resumed employee PF payments. You no longer need to make manual payments. + + + +### 4. How do I make PF payments for my employees? + + Note that as of February 2025, Payroll has resumed automated registrations and PF payments for employees. You no longer need to manually make PF payments for your employees. + + You can download the PF ECR file from the Payroll Dashboard and make the PF payments directly via the EPF portal. + - PF ECR files are available on the Payroll Dashboard from the 5th of the following month. + - Navigate to **Run Payroll** and click **here** in the **Urgent: PF payment is pending** warning. + + Know how to [make Provident Fund payments via EPFO](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/provident-fund.md#register-employees). + + + +### 5. What is the due date for PF payments? + + The due date for employees' PF payments is the 15th of the following month. For example, September 15, 2024 is the PF payment due date for August. + + + +### 6. Where can I download the PF ECR file? + + You can download the PF ECR file from the [Payroll Dashboard](https://payroll.razorpay.com/run-payroll). Know more about making [PF payments on the EPFO portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/provident-fund.md#1-download-pf-ecr-txt-file). + + +### ESIC + + +### 1. Why did ESIC registration for some of my employees fail? Where can I check the failure reasons and next steps? + + ESIC registration for your employees may fail due to insufficient employee data. + + To check the failure reasons: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **ESIC Registration Report**. + 1. On the **ESIC Registration Report** page, check the **Remarks** column to understand the failure reasons. + + +### Challans + + +### 1. Where can I download my ESIC, PF, PT challans from? + + To view ESIC, PT, PF challans: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **Reports** → **Provident Fund, ESI & Professional Tax**. + ![Challans PF, PT, TDS, ESI on Razorpay Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-reports-challans.jpg.md) + 1. On the **Compliance Documents** page, click the attachments under the respective compliance columns to download them. + + + +### 2. Where can I view my TDS challans on the Payroll Dashboard? + + TDS challans are available in **ADMIN OPTIONS** → **Reports** → **TDS** on the [Payroll Dashboard](https://payroll.razorpay.com/reports/tdsPayments). + + + +### 3. When are the challans for compliance payments available on the Payroll Dashboard? + + Challans for all the compliance payments are available by 28th of the current month on the [Payroll Dashboard](https://payroll.razorpay.com/). + + + +### 4. I am unable to view my TDS challans on the Dashboard. How do I resolve this? + + TDS challans could be unavilable due to incorrect IT credentials provided on the Payroll Dashboard. As a result, Payroll is unable to fetch the challans. + + To rectify, [update your Income Tax portal credentials](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/quickstart.md#enable-compliances) on the Payroll Dashboard. + + +### TDS & charges + + +### 1. What is the TDS impact on the Razorpay charges we paid? + + You need not pay TDS on Razorpay charges unless the charges are more than ₹30,000. If Razorpay charges are more than ₹30,000, you can deduct TDS using Payroll, or pay it manually. + + Know more about [TDS Charges](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tds.md#tds-for-razorpay-charges ). + + + +### 2. Will my TDS deduction increase if I pay bonus to my employees? + + Yes, your TDS increases as providing a bonus is an addition to the employee's salary. Know how bonus on top of salary affects TDS and how [treats such additions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tds.md#tds-on-bonus). + + + +### 3. We received a notice from TRACES with the subject 'Regular Statement filed is processed with defaults and/or PAN errors u/s 200A.' Why did we receive this and what needs to be done? + + You receive such an email when you file returns against an inoperative PAN of the employee/contractor. Due to an inoperative PAN, TDS is deducted at 20%. To verify this, download the Justification Report from the TRACES portal. + + Payroll does not support revised filings. Please log in to the TRACES portal and rectify the TDS excess/shortfall. + + +### Form 16 + + +### 1. When will my employees get the Form 16? + + Employees receive their Form 16 after the end of the financial year, around June. Know more about [Form 16](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tds.md#form-16-16a). + + + +### 2. Where do we see the Employees Form 16 once it is available? + + We mail the unsigned Employee Form 16s to your employees' email ids. + + However, we can mail your employees only if Payroll handles your 24Q filing. This is usually enabled by default for all organisations. You can check if you have enabled 24Q under **Settings** → **TDS Filing Setup** on the Payroll Dashboard. + + + +### 3. Do we get the Contractors Form 16A through Payroll? + + No. Payroll does not provide Form 16A by default. You can [contact Payroll Support](mailto:xpayroll@razorpay.com) to request Form 16As and mention the following in your email: + + - The Contractor's name and PAN. + - The quarter for which you need the Form 16A. + + However, you can request Form 16A only if you have used Payroll to pay your contractors and file 26Q returns. Know more about [Form 16A](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tds.md#tds-for-contractors). + + +## Bonus + + +### 1. How can I pay bonuses to my employees? + + There are three ways in which you can pay bonuses to your employees: + - Use the [Bonus module](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/bonus.md). + - Make [One-time payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/one-time-payments.md#make-one-time-payments) for bonus payouts. + - Add bonus as an [addition](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#additions) to the monthly salary. + + + +### 2. How can I pay an instant bonus to employees? + + You can [make one-time payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/one-time-payments.md#make-one-time-payments) to pay an instant bonus to your employees. + + + +### 3. The Bonus Type drop-down menu is empty. How to resolve this? + + The Bonus Type drop-down menu can be empty when you have not configured the types of bonuses applicable for your organisation. + + Ensure you [set up the bonus types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/bonus.md#setup-bonus-types) on the Payroll Dashboard before you create a bonus for an employee. + + + +### 4. Can I make bonus payments in bulk? + + Bulk bonus payments depend on whether the bonus payment has a clawback rule. + - If the bonus does not have a [clawback rule](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/bonus.md#2-add-clawback-rule), you can use the [bulk additions template](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#bulk-upload). + - If the bonus has a clawback rule, you cannot make bonus payments in bulk. + + + +### 5. If I pay a bonus to my employees, will it affect PF, ESI, PT or TDS calculations? + + Yes, paying a bonus can impact ESI, PT and TDS calculations, depending on how it is processed. However, PF deductions remain unaffected. + + **Provident Fund (PF)** + - Bonuses are not included in PF wage calculations, so paying a bonus will not affect PF deductions. Even if you process the bonus as a one-time payment or as an addition to monthly salary, it will still not impact PF unless the structure of Basic + DA changes. + + **Employee State Insurance (ESI)** + - ESI is calculated on gross earnings, including fixed salary and certain allowances. By default, bonus payments (whether one-time or as an addition) do not affect ESI deductions. + + - However, if you want bonuses to be included in ESI wage calculations: + + 1. Log in to the Payroll Dashboard. + 2. Navigate to **Settings** → **Payments & Compliance Setup** → **ESI Setup** in the left menu. + 3. Check the option **Include Payroll Additions & One-Time Payments in ESI Wages**. + + - If this setting is enabled, the bonus will be included in ESI wages, which may increase the ESI deduction. + + **Professional Tax (PT)** + - PT is calculated based on state-specific salary slabs. Since PT is derived from gross salary, adding a bonus (as a one-time payment or monthly addition) can increase the gross salary, which may push the employee into a higher PT slab, leading to a higher PT deduction. + + - The impact of bonuses on PT varies from state to state, so it’s essential to check the PT rules applicable in the respective state. + + **TDS** + + - TDS is [deducted on bonuses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/faqs.md#2-will-my-tds-deduction-increase-if-i) as per tax slabs, and it can increase the employee’s overall tax liability. + + + +## Leaves + + +### 1. Our leaves are carried forward to the next financial year even if we did not configure that. Why? + + By default, Payroll automatically carries forward the unused paid time off (PTOs) to the next financial year. + + To modify or remove carrying unused leaves forward to the next year, refer to the [Leave Setup Steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/leaves.md#configure-leave-setup) and configure it to 0/none. + + +## Salary + + +### 1. Payroll's Loss of Pay calculation is not matching with our calculation. Why? + + If LOP days do not match your calculations, it may be because LOP is calculated using total working days in the month instead of the total number of days in the month. Know more about [LOP Calculations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#calculations). + + + +### 2. Is my employee's personal email address necessary when processing Full and final settlement? + + We recommend adding the employee's personal email address as an alternative mode of communication. + + We email the necessary documents such as payslips, relieving letter, Form 16 and more to your employee's personal email id. + + + +### 3. What are the supported payment modes to process an employee's FNF? + + We support NEFT and IMPS to process the employee's full and final settlement. However, we recommend using NEFT as the default payment mode. Know more about [payroll payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md#make-payroll-payouts). + + + +### 4. Is it possible to revise salary in bulk? + + Yes, you can revise salary in bulk. Know more about [bulk salary revision](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#bulk-revision). diff --git a/llm-content/payroll/faqs/employees.md b/llm-content/payroll/faqs/employees.md new file mode 100644 index 00000000..4b8ecfc1 --- /dev/null +++ b/llm-content/payroll/faqs/employees.md @@ -0,0 +1,95 @@ +--- +title: RazorpayX Payroll | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions as an Employee about RazorpayX Payroll. +--- + +# Frequently Asked Questions (FAQs) + +## Employee FAQs + + +### 1. How can I change my tax regime? + + You can request your manager to [make changes to your tax regime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md#regime-changes). Otherwise, you can change when filing your Income Tax Returns (ITR) in July. + + + +### 2. How do I declare or modify proofs uploaded on the Payroll Dashboard? + + You can declare, modify and upload new proofs only when the Proof Upload window is open. Know how to [upload investment proofs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md#declare-upload-proofs). + + + +### 3. How can I save tax? + + Know how you can [reduce your tax liability](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md#reduce-tax-liability). + + + +### 4. Why was my proof rejected? + + Your proofs may be rejected due to incorrect or insufficient information to validate your declarations. Know how to [resolve failed declarations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md#resolve-failed-declarations). + + + +### 5. How do I apply for reimbursements? + + Follow the steps to [apply and claim reimbursements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/reimbursements.md). + + + +### 6. I am an employee and I have received an email that Payroll has changed/removed by tax declaration. Why is that? + + You receive such email when either your proofs do not match your declaration, or the proof uploaded has incorrect information. Know how to [resolve failed declarations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md#resolve-failed-declarations). + + + +### 7. Why is the TDS deducted from my salary higher than the previous month, due to which my in-hand salary is also less? + + Your in-hand salary is less due to a higher TDS deduction applicable on: + - A bonus payout you received. + + Suppose we do not deduct the increased TDS for a bonus in the current month. In that case, employees must pay the TDS shortfall in the following months. As a result, the in-hand salary also reduces for the following months even if the bonus was only for the current month. + + - Proofs verified and approved. + + Higher TDS deductions happen on the basis of the proofs approved by your organisation. Ensure you upload proofs that match your declaration amount. + + + +### 8. I am able to view my declared and approved tax deductions on the Tax Deductions page. However, they are not visible on my payslip. Why? + + If you are unable to view your deductions on your payslip, it is because you have not selected your preferred tax regime. [Select tax regime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md#select-regime) and confirm selection. + + Your deductions may also not appear on your payslip if you have chosen the new tax regime. + + + +### 9. My TDS deduction is higher in the current month than my previous months. Why? + + If you do not submit proofs or have submitted proofs lesser than the declared amount, the TDS deduction is higher. Ensure you [submit investment proofs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md#declare-upload-proofs) before the proof upload window closes. + + + +### 10. Are the PF deductions from my salary considered for tax exemptions? + + Yes, PF deductions from your salary are considered for tax exemptions. + + + +### 11. Where can I download Form 12BB from? + + Your employers can provide the signed Form 12BB. Form 12BB provides a list of declarations you have provided to your organisation. + + + +### 12. Is my organisation-provided medical insurance exempt from tax? + + Yes, the medical insurance provided by your organisation is exempt under Section 80D to a certain limit. + + + +### 13. My current monthly rent is shown 0 even after declaring the HRA. Why? + + Your current monthly rent may be 0 as the HRA declared is applicable for a different duration such as April 2024 to August 2024. Ensure you declare the HRA for the current month/quarter. diff --git a/llm-content/payroll/instant-reimbursement.md b/llm-content/payroll/instant-reimbursement.md new file mode 100644 index 00000000..4e4140c2 --- /dev/null +++ b/llm-content/payroll/instant-reimbursement.md @@ -0,0 +1,58 @@ +--- +title: Set Instant Reimbursements for employees on RazorpayX Payroll +heading: Instant Reimbursements +description: Enable automatic instant reimbursements to provide employees with immediate claim approvals. +--- + +# Instant Reimbursements + +RazorpayX Payroll's Instant Reimbursement feature eliminates the waiting period for expense reimbursements. + +Set up Instant Reimbursement feature for your organisation and your employees will receive their auto-approved business expense reimbursements within seconds, eliminating the typical waiting period. + +## Benefits + +- **Employee Experience:** By removing the friction of delayed reimbursements, you demonstrate trust in your employees and prioritise their financial well-being. +- **Talent Retention:** Progressive benefits like instant reimbursement help attract and retain employees who value employers that address practical workplace challenges. +- **Efficiency:** Automated processing reduces administrative work whilst maintaining proper financial controls and audit capabilities. +- **Trust:** Instant reimbursement signals confidence in your team's judgement and creates a high-trust work environment. + + +### Set-up Instant Reimbursements + + You configure instant reimbursements for your employees, enabling them to receive approved expense claims immediately rather than waiting for the approval cycle. + + To configure instant reimbursements: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 2. Navigate to **Settings** → **Reimbursements Setup.** + ![Set-up Instant Reimbursements on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/reimbursement-setup.jpg.md) + 3. Ensure **Reimbursements Enabled** is checked. + 4. Check **Include reimbursements with payroll** if you want approved reimbursements to be automatically included in the monthly payroll cycle. + ![Set-up Instant Reimbursements on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/include-reimbursement-payroll.jpg.md) + 5. In the reimbursement types section, you can specify which categories are eligible for instant reimbursements. For each reimbursement type, check the **Enabled** box to make it available for selection when employees submit claims. + 6. You can also add a new reimbursement type using the **Add** button. + ![Add New Reimbursements on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-new-reimbursement.jpg.md) + 7. Check the **Instant Reimbursements** box for categories that should be eligible for immediate processing (commonly used for Travel, Food, Fuel and so on). + 8. Set an **Instant Reimbursement Limit** (For example, ₹5000) which represents the maximum amount that can be automatically approved in a month. + 9. Click **Continue** to save your settings. + + +> **WARN** +> +> +> **Watch Out!** +> +> You can establish monthly reimbursement limits for employees, ensuring budgetary control whilst providing the convenience of instant payments. You can also ensure audit trails and maintain complete visibility into all instant transactions. +> + + + + +Once the Instant Reimbursement feature is enabled, employee claims will be automatically approved through our intelligent OCR (Optical Character Recognition) system that scans and validates submitted receipts and documents. In case the OCR method fails to process any claim, administrators can utilise the manual approval/rejection method. + +For detailed guidance on manual approvals, refer to [Reimbursements.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/reimbursements.md#approve-instant-reimbursements) + +### Related Information + +- [Salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md) +- [Reimbursements for Employees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md#reimbursements) diff --git a/llm-content/payroll/integrations.md b/llm-content/payroll/integrations.md new file mode 100644 index 00000000..a316c628 --- /dev/null +++ b/llm-content/payroll/integrations.md @@ -0,0 +1,50 @@ +--- +title: Integrate software with RazorpayX Payroll | RazorpayX Payroll +heading: About RazorpayX Payroll Integrations +description: Integrate your RazorpayX Payroll Account with Slack, WhatsApp and Current Account. +--- + +# About RazorpayX Payroll Integrations + +Payroll partners with leading organisations in the HR/Technology space that specialise in HRMS, attendance, flexible benefits, insurance, and so on to offer ready-to-use integrations. These integrations ensure auto-data synchronisation across systems. + +> **WARN** +> +> +> **Watch Out!** +> +> These partnerships are available at an extra cost. Know more about [Payroll plans](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/plans.md). +> + +Some of the popular Integrations that Payroll offers are: + +Tool Category | Integration Partners +--- +HRMS | - Darwinbox +- SAP SuccessFactors +- Oracle HCM +- PeopleStrong +- Keka +- GreytHr +- Zoho People + Contact your sales POC for more HRMS integration options. +--- +Attendance | - [Jibble Attendance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/jibble.md) +- [CAMS Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/attendance.md) + +--- +[Flexible Benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md#avail-flexible-benefits) & Expense Management | - Zaggle +- [WhatsApp](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/whatsapp.md) +- [Slack](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/slack.md) + +--- +Background Verification | SpringVerify +--- +Employee Insurance | - [Pazcare](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/insurance/pazcare.md) +- [Plum](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/insurance/plum.md) + +You can also integrate with [RazorpayX - Current Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/current-account.md) and simplify [Payroll Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md). + +### Related Information + +- [Biometric Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/attendance.md#integrate-and-configure-biometric-device) diff --git a/llm-content/payroll/integrations/current-account.md b/llm-content/payroll/integrations/current-account.md new file mode 100644 index 00000000..2115949a --- /dev/null +++ b/llm-content/payroll/integrations/current-account.md @@ -0,0 +1,92 @@ +--- +title: RazorpayX Payroll Integration with RazorpayX - Current Account +heading: Integrate with Current Account +description: Integrate RazorpayX Payroll with RazorpayX powered Current Account for easier transactions. +--- + +# Integrate with Current Account + +You can integrate your RazorpayX powered Current Account with Payroll integration to make transactions and reconciliation easier. + +Here's a rewritten version that removes the invite-basis requirement: + +RazorpayX powered Current Account integration is available for all eligible customers. To enable the integration, [contact support](mailto:Payroll@razorpay.com) and our Payroll team will assist with setting up the integration from our end. + +## Prerequisites + +- You must have a [RazorpayX - Current Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/current-account.md). +- Share your Razorpay MID when you request for the integration. You can find this on the [RazorpayX Dashboard](https://x.razorpay.com/auth) on the top-right corner under **Profile**. + ![RazorpayX Dashboard- Profile](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payroll-ca-int-profile-dashboard.jpg.md) + +- There should not be any `Pending` transactions in the ledger for your organization (**Reports** → **Ledger**). You cannot integrate if there are pending transactions. +- There should be no balance in your Payroll account before integration. + - If there is any balance, add the Current Account as a [Contractor](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#differences-between-employee-and-contractor) and [transfer funds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md#transfer-funds) to this account. + - Select **Reimbursement** / **No TDS** for the transfer. + + +## Points To Remember + +The integration process is easy and does not require much effort. However, there are a few things to keep in mind before you request for the integration. They are listed as follows: + +### Approval Workflows + +Approval Workflows or maker-checkers in RazorpayX provide different permissions to the team members. As such, you might have **Transactions Pending for Approval** on the Payroll Dashboard. + +- If you have [approval workflows (maker-checker)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled on your RazorpayX account, the same is applicable to all transactions originating from Payroll by default. +- The transactions made in Payroll (salary, contractor payments, reimbursements, advance salaries, and compliance payments) follow the Approval Workflow (in terms of both amount and approvers) that you have set up on RazorpayX. +- These transactions are not executed until they are approved from the [RazorpayX Dashboard](https://x.razorpay.com/auth). + +Watch this video to know more about the approval process on RazorpayX. + +![X Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payroll-approval-workflow.gif.md) + +[Contact support](mailto:Payroll@razorpay.com) if you wish to remove the approval workflow functionality for payouts happening via Payroll. + +### Visibility Of Transactions On RazorpayX Dashboard + +With the integration, all your transactions will happen via your RazorpayX account. These are visible on the RazorpayX Dashboard under **Payouts** and **Account Statements**. +- Every user who has access to your RazorpayX account can view the transactions that originate from Payroll on the RazorpayX Dashboard. +- All transactions, like salary transfers, contractor payments, reimbursements, salary advances and compliance payments, among others, are visible on the RazorpayX Dashboard. + +## Post Integration + +Once your RazorpayX powered Current Account is integrated with Payroll: + +- Your RBL Current Account balance replaces the Payroll Account on the Payroll Dashboard, as shown. + ![Payroll Account Balance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payroll-ca-int-acc-balance.jpg.md) + + You will see the balance of the current account. + +- Your Payroll Account becomes non-functional. + +> **WARN** +> +> +> **Watch Out!** +> +> Do not transfer any funds to your Payroll account after the integration since you cannot access this account. +> + +- All your transactions and payments from Payroll will now happen from your Current Account. +- For your employees, your company name reflects on the bank transfer narrations. +- You do not have to transfer funds between multiple accounts. + +## Remove Integration + +You can choose to remove the integration between Payroll and RazorpayX powered Current Account. + +> **WARN** +> +> +> **Watch Out!** +> +> The integration can be disconnected only when there are no `Pending` transactions in your Payroll account. If there are `Pending` transactions, then wait to clear them before disconnecting the accounts. +> + +[Contact support](mailto:Payroll@razorpay.com) to disconnect the integration. + +### Related Information + +- [RazorpayX - Current Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/current-account.md) +- [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) +- [Integrations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations.md) diff --git a/llm-content/payroll/integrations/hrms.md b/llm-content/payroll/integrations/hrms.md new file mode 100644 index 00000000..8a415552 --- /dev/null +++ b/llm-content/payroll/integrations/hrms.md @@ -0,0 +1,155 @@ +--- +title: RazorpayX Payroll Integration with HRMS Software +heading: Integrate with HRMS Software +description: Check the steps to integrate RazorpayX Payroll with any HRMS Software. +--- + +# Integrate with HRMS Software + +On the [Payroll Dashboard](https://payroll.razorpay.com/dashboard), you can integrate your Human Resource Management Systems (HRMS) tool with Payroll. You need not manually import data or switch from your current HRMS. + +Payroll seamlessly integrates with your HRMS using APIs to sync data between the two platforms. You can map employee roles and other employee details on Payroll to manage their monthly payroll. + + +### List of Supported HRMS Software + + - ADP Run + - ADP Workforce Now + - BambooHR + - Breathe + - Ceredian Dayforce + - Charlie HR + - Darwinbox + - Deel + - Employment Hero + - Factorial HR + - Freshteam + - Hibob + - HR One + - Humaans + - Keka HR + - Namely + - Oracle Cloud HCM + - Paychex + - Paycom + - Paycor + - Paylocity + - Personio + - Remote + - Rippling + - Sage + - SAP SuccessFactors + - UKG Pro + - Workday + - Workline + - WorQ + - Zenefits + - Zoho People + + + +### Advantages of Integration + + Following are the advantages of integrating your HRMS with Payroll. + + - **Platform Flexibility**: + + You can integrate your current HRMS software with Payroll seamlessly. With this integration, you no longer need to switch between your HRMS and payroll software. We support multiple HRMS tools to help you simplify payroll calculations. + + - **Unified Data View via Automation**: + + Suppose you onboard or offboard employees from your organisation or modify your employees' details, Payroll automatically reflects such changes via a daily data sync. This automated process provides a unified view of your employees' data. + + - **Boost Efficiency and Accuracy**: + + Payroll and HR management are cross-functional, sensitive processes that require precision and intense effort. With this integration, you boost your teams' efficiency by reducing manual effort and the scope for errors. + + +## How it Works + +1. [Integrate with the HRMS tool](#integration-steps) on the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Configure the integration. + +Once you successfully set up the integration, the HRMS becomes the single source of truth for employee information. + +With this integration, you can: +- Choose the entities and employee data from your HRMS software to map to Payroll [during setup](#integration-steps). +- Map your employee types as `employees` or `contractors`. Know more about [employee types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#employee-and-contractor) in Payroll. +- View up-to-date employee information on Payroll via daily automated sync. This includes existing employees' data modifications or new employees added to your HRMS. +- Sync dismissal dates from HRMS to calculate [Full and Final Settlement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#full-and-final-settlement/) in Payroll. + +> **WARN** +> +> +> **Watch Out!** +> +> Only the data from the HRMS software is synced to Payroll. You cannot sync Payroll Data to your HRMS software. +> + +### Video Tutorial + +Watch this video to know how to integrate your HRMS of choice with Payroll or read along. + +[Video: https://www.youtube.com/embed/dTsTQJI_b0U] + +## Integration Steps + +To integrate your HRMS software with Payroll: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **ADMIN OPTIONS** → **Integrations**. +1. Look for your HRMS software using the **HRMS** filter at the top and click **Explore**. + ![HRMS Integration options on RazorpayX Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-explore-hrms.jpg.md) +1. On the integration page, click **START INTEGRATION**. +1. Follow the on-screen instructions to authenticate the tool and map your employees on Payroll. + 1. Preview the employee information synced by Payroll. You can choose which employee data fields you want to sync to Payroll. Some fields are mandatory. + 1. Map your employees as employee or contractor [employee types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#employee-and-contractor) on Payroll. +1. Review the configuration summary, such as the details synced, the sync duration, and the employee types on the HRMS tool mapped as contractors and employees. +1. Type **confirm** in the text box to integrate. + +You have successfully completed the integration. + +## Post Integration + +Post integration, it takes up to 30 minutes for the data to appear on Payroll. +- The HRMS data overwrites any existing employees' information. To view a copy of the data previously available on Payroll, go to **ADMIN OPTIONS** → **Reports** → **Audit Report**. +- All the synced fields from the HRMS become uneditable on the employee's profile on Payroll. You can edit the unsynced fields only. +- We email any failed data sync to the administrator's email id. + +> **WARN** +> +> +> **Watch Out!** +> +> After integrating your HRMS with Payroll, you can modify the employee details only on the HRMS Dashboard. +> + +### Manage Integration + +To manage the integration: +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Go to **Integrations** in the left menu → HRMS tool. +1. Click **Manage**. + +Here you can: +- Manually sync data between HRMS and Payroll when necessary. Click **Sync now**. +- Change employee information such as bank account data, contractor to full-time employee or vice-versa, personal details of the employee, and so on using the **Modify Configuration** option. + + Suppose you must sync the bank account data from the HRMS after the integration, or a full-time employee is now a [contractor](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#differences-between-employee-and-contractor). You can change that information here. +- To disable the integration, click **Disable**. + +![Manage HRMS Integration on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-hrms-manage.jpg.md) + +### Bulk Update + +You can bulk update your employee/contractor information on the Payroll Dashboard. This applies only to fields not synced during the [integration process](#integration-steps), like your employee's PAN, UAN, bank account details and more. + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Go to **ADMIN OPTIONS** → **People** → **Bulk update** in the right pane. +1. Download the template from the Dashboard and follow the on-screen instructions to fill the template. +1. Upload the file. In case of errors, you can download the error report to rectify them and upload the file again. + +### Related Information + +- [About Integrations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations.md) +- [Contact Support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/plans.md#contact-support) diff --git a/llm-content/payroll/integrations/hrms/zoho.md b/llm-content/payroll/integrations/hrms/zoho.md new file mode 100644 index 00000000..83d46586 --- /dev/null +++ b/llm-content/payroll/integrations/hrms/zoho.md @@ -0,0 +1,182 @@ +--- +title: Integrate RazorpayX Payroll with Zoho People +heading: Integrate with Zoho People +description: Integrate your RazorpayX Payroll account with Zoho People and simplify people management across platforms. +--- + +# Integrate with Zoho People + +On the [Payroll Dashboard](https://payroll.razorpay.com/dashboard), you can integrate Zoho People with Payroll. You need not manually import data or switch from your current HRMS. + +After you set up the integration, Payroll uses APIs to sync data between the platforms. You can map employee roles and other employee details from Zoho People to Payroll and manage your monthly payroll seamlessly. + + +### Advantages + + - **Automated Data Sync**: + + Once you set up the integration, any changes to the employee details on Zoho People will automatically reflect on the Payroll Dashboard. + + - **Platform Flexibility**: + + You can integrate your current HRMS software with Payroll seamlessly. With this integration, you no longer need to switch between your HRMS and payroll software. We support multiple HRMS tools to help you simplify payroll calculations. + + +## Prerequisites + +Ensure the following prerequisites to integrate Payroll with Zoho People: +- You use Zoho People's paid plans. +- All your employees are onboarded on Zoho People. +- You have requested Payroll to enable the integration. + + + +### How to request the Zoho People integration? + + To request Zoho People integration: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **Integrations**. + 1. Look for your Zoho People using the **HRMS** filter at the top and click **I'm Interested**. We enable the integration for you. + ![HRMS Integration options on RazorpayX Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-zoho-integration-explore.jpg.md) + + + + +## Integration Steps + +There are three steps to integrate Zoho People with Payroll: + + +### 1. Authorise Payroll to Access Zoho People + + To start the integration, you must allow Payroll to access the data on Zoho People. + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **Integrations** → **Zoho People**. Click **Explore**. + 1. On the integration page, click **START INTEGRATION**. + 1. Select the check boxes on-screen. Ensure you meet the [prerequisites](#prerequisites). Click **CONNECT TO ZOHO PEOPLE**. + 1. On the authorisation page, authenticate using your Zoho credentials. Review the permissions and click **Accept**. + + This successfully initiates the integration. On the Payroll Dashboard, you must now complete the employee mapping. + + + +### 2. Map Employees and Details to Payroll + + There are three steps to map employee details from Zoho People to Payroll. This is one-time setting and allows Payroll to sync data from Zoho People. + + + + + + + 1. Map Employee Fields + + Employee fields refer to the employees' details such as their name, email address, identity information and more. + + You must select the fields to sync to Payroll from Zoho. + + 1. After you click **Accept**, you are redirected to the Payroll Dashboard. + 1. On the **Zoho integration setup** page, review and select the employee fields to sync with Payroll. + + You can click **Edit Fields** to select the information you want to import to Payroll. + + ![Select Zoho employee fields to Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-zoho-integration-select-fields.jpg.md) + 1. Click **Save and continue**. + + This successfully imports the selected employee details to Payroll. You can edit employees' details such as personal information on Zoho People only. + + + +### 2. Map Employee Types + + Payroll considers only two types of people: `employees` and `contractors`. When integrating with Payroll, you must accurately map the employee types. + + 1. On the **Employee type mapping** page, select the employee types check boxes on-screen for Payroll to consider as `employees`. + + For example, you can choose trainees, full-time employees, interns and more as `employees`. The unselected employee types are mapped as `contractors`. + + ![Zoho People employee mapping Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-zoho-integration-emp-type.jpg.md) + 1. Click **Next**. + + This completes the employee mapping. All the selected types are considered `employees` on the Payroll Dashboard. + + + +### 3. Map Employee Status + + Payroll considered two employee statuses for employees and contractors: `active` and `dismissed`. + + You must select the available statuses on Zoho People and map them on appropriately on Payroll. Only then the employees are considered as `active`. + + 1. On the **Employee status mapping** page, select the employee status check boxes on-screen. All selected options will be considered as active. + + For example, you can select active, notice period and sabbatical employees as `active`. All unselected statuses are mapped as `dismissed` employees. + + +> **INFO** +> +> +> **Handy Tips** +> +> - Dismissed employees are imported to RazorpayX Payroll but are not included in the monthly payroll. +> - Employees are also considered as `dismissed` when: +> - Employee status on Zoho People is `dismissed`. +> - Employee's **Date of Exit/Last Working Date** is available on Zoho People. +> - Unselected employee statuses are considered as `dismissed`. +> + + ![Zoho People employee status mapping Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-zoho-integration-emp-status-mapping.jpg.md) + 1. Click **Next**. + + This successfully imports employee data to Payroll. + + + + + You have successfully mapped the employees and imported the data to Payroll. + + + +### 3. Confirm Integration + + You must confirm the integration once you map the employee details to Payroll. + + 1. On the **Disclaimer** pop-up modal, review the integration details you have configured. + - This integration overwrites your existing employee data on Payroll. + - You cannot restore existing Payroll employees' data. + - You can download your current Payroll data from the HR Register on the Payroll Dashboard. + 1. Type `Confirm` in the text box. + + ![Payroll Zoho integration type Confirm in text box](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-zoho-integration-confirm.jpg.md) + 1. Click **Integrate**. + + +This successfully completes the Payroll integration with Zoho People. + +## Post Integration + +Post integration, your employee data from Zoho People is visible within 30 minutes of successful integration. +- We email any failed data sync to the administrator's email id. +- After the integration, you can change the employee type mapping between `employees` and `contractors`. + +## Manage Integration + +To manage the integration: +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Go to **Integrations** in the left menu → Zoho People. +1. Click **Manage**. + +On the **Manage Integration** page, you can: +- **Manually sync data** between HRMS and Payroll when necessary. Click **Sync now**. +- **Change employee information** such as bank account data, contractor to a full-time employee or vice-versa, employee personal details, and so on using the **Modify Configuration** option. + + Suppose you must sync the bank account data from the HRMS after the integration, or a full-time employee is now a [contractor](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#differences-between-employee-and-contractor). You can change that information here. +- To disable the integration, click **Disable**. + +![Zoho Payroll Dashboard successful integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-zoho-integration-succes.jpg.md) + +### Related Information + +- [About Payroll Integrations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations.md) +- [HRMS Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/hrms.md) diff --git a/llm-content/payroll/integrations/insurance/pazcare.md b/llm-content/payroll/integrations/insurance/pazcare.md new file mode 100644 index 00000000..0ac70891 --- /dev/null +++ b/llm-content/payroll/integrations/insurance/pazcare.md @@ -0,0 +1,70 @@ +--- +title: RazorpayX Payroll Insurance Integration with Pazcare +heading: Integrate with Pazcare +description: Check the steps to integrate RazorpayX Payroll with Pazcare. +--- + +# Integrate with Pazcare + +On the Payroll Dashboard, you can integrate with Pazcare Insurance and offer group insurance for your employees and their dependants. + +The Payroll - Pazcare integration provides the following benefits: + + +### Advantages of Integration + + - **Automated Data Syncing**: + + After you integrate with Pazcare, all your existing employees' details are available on the Pazcare Dashboard. New employees' onboarding and offboarding with [FNF settlement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#terminate-and-run-last-payroll) easy with this integration. + + - **Dedicated Relationship Manager**: + + You can always contact your dedicated Relationship Manager for queries about reimbursements, claims, maintenance, and more. + + - **Customised Group Insurance Policy**: + + With Pazcare, you can customise the group insurance policy for your organisation. Book a demo call with Pazcare from the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + + +## How it Works + +1. [Integrate with Pazcare](#integration-steps) on the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +2. [Set up the Pazcare Dashboard](#assign-benefits). Add Rules to manage the employee details imported from Payroll. + +After you integrate, Payroll automatically imports and regularly syncs employee data to Pazcare. This simplifies employees' insurance policy onboarding and maintenance. + +## Integration Steps + +To integrate with Pazcare: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **Integrations** in the left menu under **ADMIN OPTIONS**. +1. Check for the Pazcare integration and click **Explore**. + ![Explore Pazcare Integration on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-pazcare-integration.jpg.md) +1. On the integration page, click **CONNECT NOW**. +1. Click **Generate Now** to generate the API key and copy the key. You can refresh the key by clicking **Refresh Key**. +1. Go to the [Pazcare Dashboard](https://app.pazcare.com/dashboard/integrations). + 1. Navigate to **Settings** in the left menu → **Integrations**. + 1. Go to the Payroll card and click **Integrate**. + 1. Enter the API key you previously copied and click **Authenticate**. + 1. Map the employee and dependents data using filters. + + Your Payroll employee data is successfully imported to Pazcare. + +With this, you have completed the integration. Set up the process to manage employees' insurance details and policies on Pazcare. + +## Assign Benefits + +To assign the insurance benefits to your employees: + +1. Go to the [Pazcare Dashboard](https://app.pazcare.com/dashboard/integrations) → **Settings** → **Benefit Settings**. +1. In **Benefit Settings**, click **Add Rule**. +1. Add conditions to the Rule using the filters on the Pazcare Dashboard. This is a one-time process. Once done, click **Save and Next**. +1. Select the check box to assign benefits to employees meeting the Rule's conditions and click **Apply**. + +You have successfully added a Rule and updated the insurance benefits for all employees. Whenever the employment status of employees changes on the Payroll Dashboard, Pazcare automatically updates the benefits accordingly. + +### Related Information + +- [Plum Insurance Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/insurance/plum.md) +- [About Integrations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations.md) diff --git a/llm-content/payroll/integrations/insurance/plum.md b/llm-content/payroll/integrations/insurance/plum.md new file mode 100644 index 00000000..9ac10523 --- /dev/null +++ b/llm-content/payroll/integrations/insurance/plum.md @@ -0,0 +1,154 @@ +--- +title: RazorpayX Payroll Insurance Integration with Plum +heading: Integrate with Plum +description: Check the insurance policy, plans, prerequisites and post-purchase. +--- + +# Integrate with Plum + +Payroll covers insurance for all your employees. + +## Policy and Plan Design + +Following are the policies and plan designs available as a part of the Payroll-Insurance plan. + +### Policy Design + +There are three policy design options: + +S. no. | Plan | Description +--- +1 | **E Plan** | Covers employees only. +--- +2 | **ESC Plan** | Covers employees, spouses and up to 4 dependent children. +--- +3 | **ESCP Plan** | Covers employees, spouses, up to 4 dependent children, and 2 parents or in-laws. +--- + +### Insurance Plan + +There are three plans available: + +S. no. | Plan | Description +--- +1 | **Starter** | Covers all basic health insurance benefits after a 30-day waiting period. Pre-existing diseases are covered after 1 year. +--- +2 | **Essential** | Starter benefits + pre-existing coverage from day 0, no pre-disease capping or waiting period. +--- +3 | **Premium** | Includes all previous benefits + maternity and day 1 newborn cover. + +All employees between 18 to 80 years and dependent children between 3 months to 25 years can be covered. In the Premium plan, dependent children can be covered from birth. + +> **WARN** +> +> +> **Watch Out!** +> +> - Cross-selection between parents and in-laws is not allowed. You cannot take policies for specific family members either. +> - Under the ESC plan, you must cover the spouses of all married employees and all dependent children. +> - The total number of parents should be 1.6 times the number of employees. For example, if your organisation covers the parents of 10 employees, you must cover at least 16 parents in the policy. +> - [Contractors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#differences-between-employee-and-contractor) are not covered in the insurance plans. +> + +## Prerequisites + +1. Your organisation must be using RazorpayX Payroll for all the salary transfers and applicable [compliances](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md). + +1. Your organisation must have 2 or more full-time employees. + - The Starter plan is available for organisations with at least 2 employees. + - Essential and Premium plans are available for organisations with at least 5 employees. + +## Post Purchase + +Refer to the best practices to follow as an admin and an employee after you have purchased the suitable plan. + +### Information for Administrators + +Below are a few important points to note post-purchase: + +1. **Coverage**: Your team coverage is active from when the payment is made successfully to the insurer. The state of the payment is reflected in the **Reports** → **Ledger** and on the [Payroll Dashboard](https://payroll.razorpay.com/insurance/admin/details). + +2. **Payment Receipt**: We generate a payment receipt for the insurance payment. This receipt is available in the **Ledger** and is attached along with the transaction for the insurance purchase. + +3. **Admin Onboarding**: For new employees who join your organisation and their dependents, you can add them to your insurance plan directly from the [Payroll Dashboard](https://payroll.razorpay.com/insurance/admin/details). + +### Information for your Team + +1. **Employee Onboarding**: Your team receives onboarding emails from Plum, our insurance partner. The [Plum app](https://app.plumhq.com/) serves as a one-stop solution for your teams' insurance requirements. + - You can access their insurance, view inclusions and exclusions of the insurance policy, get support for their queries and even initiate requests for an insurance claim. + - Your team can log in to the [Plum app](http://app.plumhq.com/) using the same email address that they use for Payroll. + +2. **Digital Health IDs**: Generating digital health IDs takes up to 14 working days. These IDs are available to your team members on the [Payroll Dashboard](https://payroll.razorpay.com/insurance/user/insuranceDetails) and the [Plum app](http://app.plumhq.com/). + +3. **Claims**: Your team can initiate their request directly from the [Plum app](http://app.plumhq.com/). They can alternatively reach out to Plum at `care@plumhq.com`. + +## Insurance Payment Invoice + +The insurance on Payroll is under a master policy held by Razorpay. + +- Due to the nature of this policy, we provide a payment receipt for the complete premium payment. Razorpay generates this receipt for facilitating the transaction with the insurer. +- We also issue a certificate of insurance containing the premium and GST details at an employee level. + +You can use a combination of these for your accounting purposes. + +> **WARN** +> +> +> +> **Watch Out!** +> +> - You cannot claim GST input credit on health insurance premium payments. +> - You cannot avail 'No Claim Bonus'. +> - The insurance policies cover treatments and hospitalisations in India only. +> + +## Benefits of Plan + +1. Room and ICU rent limit: + - There are no further sub-limits within these limits. + - ICICI Lombard has [6500+ hospitals where cashless facilities are available](https://www.icicilombard.com/cashless-hospitals). + In the Plum app, your employees can search for the nearest hospital from their current location. + + The following table shows the Limit and concerned Insured Amount. + + + Limit | Insured Amount + --- + Room | 2% + --- + ICU | 4% + + +2. **Refund**: + + The refund process takes 2-3 weeks from the employee's exit date. This involves ICICI Lombard (the insurer) checking for employee's insurance claims, if any. Refunds are not issued if the employee has made insurance claims. + + After confirmation, you receive a prorated refund for the remaining time in the 1-year policy period. + + For instance, if the annual premium for a 30-year-old member is ₹2,000 and the employee leaves after 6 months, you will get a refund of ₹1,000. + +3. **Adding employees**: + + When you add employees to Payroll, their dependants are also added to the insurance coverage. More dependants can be added as per the plan, only in the event of marriage or childbirth. + + The admin must finalise the purchase for these new employees. Premiums for new employees are charged annually and the cover is active for 1 year from the payment date. + +4. Insurance covers require a minimum 24-hour hospitalisation and do not cover OPD visits, health checkups, or non-hospitalisation-related medicines. + +5. There is no limit on the number of insurance claims an employee can make during the policy period. However, the maximum amount is restricted to the sum insured for the year. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Health ID cards are not required for initiating a claim. +> - Both cashless treatments and reimbursement claims are available. +> - The ICICI Lombard plan covers [150 daycare procedures](https://www.icicilombard.com/health-insurance/ListOfDayCareSurgeries.pdf). Treatments like chemotherapy, dialysis, cataract surgery, kidney stone removal and so on are called daycare procedures as they are performed without requiring 24-hour hospitalisation. +> + +### Related Information + +- [Income Tax Declaration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md#income-tax-declaration) +- [Salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md) diff --git a/llm-content/payroll/integrations/jibble.md b/llm-content/payroll/integrations/jibble.md new file mode 100644 index 00000000..3ba34be1 --- /dev/null +++ b/llm-content/payroll/integrations/jibble.md @@ -0,0 +1,96 @@ +--- +title: RazorpayX Payroll Attendance Integration with Jibble +heading: Integrate with Jibble +description: Integrate RazorpayX Payroll with Jibble to manage employees' attendance and loss of pay calculations. +--- + +# Integrate with Jibble + +Integrate your RazorpayX Payroll account with Jibble and enhance time and attendance management for your employees. Jibble syncs your employees' leaves and shifts data with Payroll and automatically calculates [Loss of Pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/leaves.md#loss-of-pay-for-unpaid-excessive-leave-work) when executing payroll. + +The RazorpayX Payroll - Jibble integration offers the following benefits: + + +### Advantages of Integration + + - **Automatic Data Import and Syncing**: + + When you onboard or offboard employees and contractors on Payroll, the data is automatically imported and synced between Jibble and Payroll after the integration. + + - **Automated Loss of Pay (LOP) Calculations**: + + Loss of Pay is a critical salary calculation based on employees' attendance. After integrating, Payroll syncs time and attendance data from Jibble to provide accurate LOP calculations. All of this is automated. + + +## How it Works + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. [Set up the integration](#integration-steps) using Jibble's API keys. +1. [Sync the monthly Loss of Pay report](#verify-lop-in-payroll) before executing payroll. + +## Integration Steps + +To integrate with Jibble: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **Integrations** in the left menu under **ADMIN OPTIONS**. +1. Look for **Jibble** and click **Explore**. + ![Jibble Integration option on the Razorpay Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-jibble-explore.jpg.md) +1. Click **START INTEGRATION** on the Jibble Integration page. +1. You can choose to either create a new Jibble account or use an existing one. Select **Yes, we have a Jibble account for our organisation**. +1. Click **Proceed With Integration**. + + ![Proceed with Jibble Integration on Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-jibble-create-account.jpg.md) + +After you create a Jibble account, you can set up the integration with Jibble. + +1. On the **Jibble Integration** page (on the [Payroll Dashboard](https://payroll.razorpay.com/dashboard)), enter the Jibble API keys. To find the API keys, refer to the [Jibble Help](https://www.jibble.io/help/using-jibbles-api-for-your-custom-needs) article. +1. Click **VERIFY ACCOUNT**. +1. Select the minimum shift durations for a full day and half day as applicable to your organisation in the **Attendance Configuration** page. Click **CONTINUE**. +1. On the **Sync employees to Jibble** page, verify the number of employees. Click **SYNC EMPLOYEES AND COMPLETE INTEGRATION**. + + Payroll automatically creates Jibble accounts for your employees, post which your employees can authenticate and avail the [benefits](#advantages-of-integration). + +You have successfully integrated Payroll with Jibble. Set up your organisation's [leave and attendance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/leaves.md) policy on Jibble. Know how Payroll [retrieves the Loss of Pay data](#verify-lop-in-payroll) to calculate the monthly payroll. + +![Jibble integration success page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-jibble-active.jpg.md) + +### Manage Integration + +Once you complete the integration, you can manage the integration from **ADMIN OPTIONS** → **Integrations** → **MANAGE** on the Jibble card. On the configuration page, you can: + +- Modify the full and half-day working hours applicable to your organisation. +- Select whether Payroll should calculate loss of pay using on the total days in a month or the total working days. +- View the Jibble account integration status of your employees. Payroll regularly syncs data from Jibble and you can view that status at an employee level here. You can also: + - Find the Jibble code for your employees. + - Filter the employee details by their name or their integration status. + +## Verify LOP in Payroll + +Once your employees mark their attendance on Jibble, you can sync the loss of pay details from Jibble before you [execute payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md). To verify the loss of pay data: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Go to **ADMIN OPTIONS** in the left menu → **Pay Employees** → **Run Payroll**. +1. Select the payroll month from the drop-down list in the right pane. +1. Click **Get loss of pay report now >**. This opens the Loss of Pay report for the selected month. + ![Sync Jibble to get automated loss of pay report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-lop.jpg.md) +1. Modify the date range upto 31 days and click **Sync Loss of Pay Report**. Payroll retrieves the employees' leaves and shifts data from Jibble for the updated range. + ![xpayroll-Jibble loss of pay employee view](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-jibble-lop-report.jpg.md) +1. Verify the data report and the deduction amount. + - Click the edit icon against the employee's name in the **EDIT LOP DAYS** column to change the Loss of Pay days as required. Click **Save**. + - Select and clear check boxes against the employees' names to skip deducting the loss of pay amount for that month. +1. Click **ADD AS DEDUCTIONS ()** → **Add Deductions Now** in the confirmation pop-up modal. +1. Click **Go To Run Payroll Page** on the success modal. + +You have successfully added your employees' Loss of Pay amount as a deduction to the monthly payroll. To verify the deductions: + +1. Go to the Loss of Pay report page. +1. Check the **DEDUCTION ADDED TO PAYROLL?** column. + +You can edit the loss of pay days and deductions until you execute payroll. Know more about the [execute payroll checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/execute-payroll.md). + +### Related Information + +- [About Integrations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations.md) +- [Leaves and Attendance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/leaves.md) +- [Whatsapp Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/whatsapp.md) diff --git a/llm-content/payroll/integrations/slack.md b/llm-content/payroll/integrations/slack.md new file mode 100644 index 00000000..3b553c69 --- /dev/null +++ b/llm-content/payroll/integrations/slack.md @@ -0,0 +1,79 @@ +--- +title: RazorpayX Payroll - Slack Integration +heading: Integrate with Slack +description: Integrate RazorpayX Payroll with Slack for quick actions. +--- + +# Integrate with Slack + +Many organisations that use Payroll also use workspace tools like Slack or Microsoft Teams. Some common actions taken by the employee and the admin require them to log in to the Dashboard which may be time-consuming. + +The Payroll Slack App brings the functionality of Payroll within Slack. Your team no longer has to login repeatedly to perform routine payroll activities or leave update tasks. + +## How it Works + +In your Slack workspace, all you need to do is to type in any of the following controls shortcuts in a dedicated channel. The first version of the app enables the following features from within Slack: + +Command | Description +--- +`/apply-leave` | Employees can apply for leaves and get notified of their leave status; Admins and Managers can approve/reject leaves. +--- +`/on-leave` | Employees and the team can check their team members who are on leave for the next 5 days. +--- +`/leave-balance` | Employees can check their leave balance instantly. +--- +`/reimburse` | Employees can apply for reimbursements and get notified of the status; Admins and Managers can approve/reject reimbursements. +--- +`/payslip` | Employees can view their payslips. +--- +`/holiday` | Employees get quick access to the organization’s upcoming holiday list. +--- +`/check-in` and `/check-out` | Employees can check in and check out for attendance. +--- + +## Integrate Slack + +Watch the video to know how to setup the Payroll App on your Slack workspace. + +[Video: https://www.youtube.com/embed/nGMVDfav12I] + +To integrate Payroll with Slack: +1. In your [Payroll Dashboard](https://payroll.razorpay.com/dashboard), navigate to **Integrations** from the left menu. +1. Click **Explore** on the the **Slack card** from the available integrations. You can also select filter: **Communication** and find the Slack card. +1. Click **Add to Slack** to connect Payroll with your Slack Workspace. +1. Navigate to **Settings** → **Integrations** to the end of the page, and enable the Slack Integration. + +## Guides + +Take a look at how an admin and your team can use the Payroll's Slack integration within your workspace. + +> **WARN** +> +> +> **Watch Out!** +> +> Your Payroll admin and Slack admin may be different. Do check if you have the right permissions to install the app. +> + +### Admin Guide + +The Slack integration can be enabled only by your organisation's Slack Admin. If you are the admin, or you have admin rights on Slack, then, to enable Payroll on Slack: + +1. Go to **Admin Options** → **Settings**. +2. Select **Edit** for **Integrations** → **Slack**. +3. Click **Connect to Slack**. You will be redirected to a Slack permissions page. +4. Enure the correct workspace selected on the upper right and click `Allow`. + +Notify your team that it is ready for them to start using it! + +### Team Guide + +Once Slack is enabled, team members must type `/xpayroll` in the Slack chatbox to connect Slack to their Payroll account. This is a mandatory step. It enables the Payroll team to identify and authorise the team member on Slack and connect both accounts. + +After clicking `Connect`, the team member is redirected to Payroll to login and connect Payroll and Slack accounts. + +### Related Information + +- [Integrations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations.md) +- [Leaves](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/leaves.md) +- [Emplyoees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md) diff --git a/llm-content/payroll/integrations/ubitech.md b/llm-content/payroll/integrations/ubitech.md new file mode 100644 index 00000000..17e39ad4 --- /dev/null +++ b/llm-content/payroll/integrations/ubitech.md @@ -0,0 +1,233 @@ +--- +title: RazorpayX Payroll Integration with UbiAttendance Attendance Management Software +heading: Integrate with UbiAttendance +description: Check the steps to integrate RazorpayX Payroll with UbiAttendance to manage employees' attendance. +--- + +# Integrate with UbiAttendance + +Sync attendance data of employees by integrating Payroll Dashboard with UbiAttendance and make payroll calculations easier. +UbiAttendance also offers many advanced attendance marking and other enhanced reporting features. + +### Advantages + - Eliminates errors and challenges arising out of manual attendance and time inputs. + - Seamlessly syncs loss of pay information (LoP) data with Payroll, which influences monthly payroll calculations. + + +> **WARN** +> +> +> **Watch Out!** +> +> - API access is required for UbiAttendance integration. [Contact Support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/plans.md#contact-support) for API aceess. +> - You must be on the paid plans of UbiAttendance and RazorpayX Payroll. +> + +## How it Works + +1. Maps and integrates all employee data in Payroll to UbiAttendance (this is a one-time process). +2. Maps new employee data to UbiAttendance upon manual syncing. +3. Updates UbiAttendance LoP data to Payroll upon monthly manual syncing, to arrive at the right payroll calculation. + +## Prerequisites + +Following are some prerequisites before integrating with UbiAttendance: + +1. You **must** disable Payroll's Attendance Module. +1. Request access to RazorpayX Payroll APIs. + [Contact Support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/plans.md#contact-support) to request access to Payroll APIs. Integration with UbiAttendance requires Payroll's API ID and Key. +1. Ensure you have selected the following API permissions: + - Add additions and deductions to Payroll + - Modify attendance + - View profiles of employees and contractors + +> **WARN** +> +> +> **Watch Out!** +> +> - Additions to payroll arising due to overtime payments to employees must be manually added as [additions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#additions) on the Payroll Dashboard. UbiAttendance does not automatically transfer the additions data to Payroll. +> + +## Integration Steps + +There are four steps to integrate with UbiAttendance: + + +### 1. Disable Payroll Attendance Module + + To use UbiAttendance, you must disable Payroll's attendance module. + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **Settings** → **Holidays, Leave & Attendance** → **Edit**. + 1. Select **No** in the **Attendance Enabled?** drop-down menu. + 1. Click **Continue**. + + This successfully disables Payroll's attendance module. You can now integrate with UbiAttendance. + + + +### 2. Find and Copy Payroll Keys + + To integrate Payroll with UbiAttendance, you’ll need the following keys: + + - API ID + + - API Key + + - Client Key/Integration Key + + + +> **WARN** +> +> +> **Watch Out!** +> +> Please note that the **Client Key** and the **Integration Key** refer to the same value. Do not be confused by the different terms—both indicate the same credential required during the integration setup. +> + + + Here’s how to find them: + + 1. Go to Settings in RazorpayX Payroll. + + 2. Click on Integrations → Select UbiAttendance. + + 3. Click Edit next to the UbiAttendance integration. + + 4. Click Show Key — the Integration Key will be visible here. + + Make sure to copy and save these keys safely, as they are required during the integration setup with UbiAttendance. + + + + Payroll API ID and Key + + To copy the API ID and Key: + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **Settings** → **API Access** → **Edit**. + 1. On the **API Setup** page, copy the **API ID** and the **API Key**. + + +> **WARN** +> +> +> **Watch Out!** +> +> Without the API Key set up, UbiAttendance integration will fail. +> +> + + + + +### One-time API Setup + + + + If you are setting up APIs for the first time, you must set up the API key and select the API Permissions. + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. On the **API Setup** page, click **Set Key** to set up an API Key for your organisation. **API ID** for the organisation is provided by default. + 1. Select the relevant API permissions using the check boxes. + 1. Click **Continue** and verify with OTP. + + This successfully sets up your APIs. + + To integrate with UbiAttendance, ensure you have selected the following permissions: + - **Add additions and deductions to Payroll** + - **Modify attendance** + - **View profiles of employees and contractors** + + + + + Log in to the UbiAttendance portal to complete the next steps. + + + +### 3. Initiate Integration on UbiAttendance + + To start integrating with UbiAttendance: + 1. Log in to the UbiAttendance portal. + 1. Go to **Organisation** tab in the top menu → **Settings** in the left menu. Click **Integrations** → **RazorpayX Payroll**. + 1. Click **Setup** on the card. This opens the **Integration Setup** page. Here, you must enter the following: + - Integration Key + - Payroll key + - Payroll API id + 1. Paste the **Payroll Key**, **Integration Key**, **Payroll API ID** and **Integration key** in the respective text boxes on the **Razorpay Integration Setup** page. + 1. Click **Update Setup**. + + This successfully initiates the UbiAttendance integration. + + + +### 4. Sync Payroll Data to UbiAttendance + + After you integrate Payroll with UbiAttendance, ensure you sync payroll data from RazorpayX Payroll to UbiAttendance. This is a manual process. (Is this a manual process, or is the LoP one manual? Or both?) + + To sync employee data: + 1. Log in to the UbiAttendance portal. + 1. Go to **Organisation** tab in the top menu → **Settings** in the left menu. Click **Integrations** → **RazorpayX Payroll**. + 1. Click **Manage**. + + This opens the RazorpayX Payroll **Integrations** page, displaying two cards: **Map Employees** and **Sync Employee LoPs**. + 1. Click **Start Process** → **Integrate** → **Authenticate**. + 1. On the mapping page, click **Start Mapping** in the **All Employees** tab. + + If any employee's data is missing on UbiAttendance: + 1. Go to the **Specific Employee** tab. + 1. Enter the employee's email address in the text box and click **Search**. + + This automatically retrieves the updated information available on the Payroll Dashboard. + + If any details of the employees are missing, the integration will succeed only with the successfully synced details. To rectify the missing information, click **Download Error File** and make the relevant changes on the Payroll Dashboard. + + +This completes the integration process. + +## Sync LoP Data + +The integration with UbiAttendance allows you to easily sync LoP (Loss of Pay) data to Payroll. Once synced, payroll calculations and deductions for the month are processed automatically. + +To sync the data: + +1. Log in to the **UbiAttendance portal.** + +2. Navigate to **Organisation > Settings > Integrations > RazorpayX Payroll.** + +3. Click **Manage.** This opens the RazorpayX Payroll Integrations page with two options: Map Employees and Sync Employee LoPs. + +4. Click **Show Details** under **Sync Employee LoPs.** + +5. On the Sync LoP page, go to the **Synced LoPs Data** tab to view the LoP details of employees. + +6. Select the employees whose LoP data you want to sync manually. + +7. Click the **Sync icon** (top-right corner). + +8. In the pop-up, choose the month and click **Confirm**, then click **Sync Employees.** + +9. Click the **Refresh icon** at the top-right to pull the latest attendance data. + +This will trigger a manual sync, which means the selected employees' Loss of Pay (LoP) details from UbiAttendance will be pushed to RazorpayX Payroll for the selected month. These synced LoP values will then be used to automatically calculate payroll deductions for the respective employees during payroll processing. + +To verify if the sync worked: + +1. Navigate to **Run Payroll** on the **Payroll Dashboard.** +2. Make sure the correct month is selected and check the **Deductions** column for the employees listed on the Synced LoPs page. + +> **WARN** +> +> +> **Watch Out!** +> +> Once LoP data is synced from UbiAttendance, you can edit from the Payroll Dashboard. +> However, any changes made in Payroll won’t sync back to UbiAttendance. For example; if UbiAttendance shows 2 LoP days and you update it to 3 in Payroll, the change stays only in Payroll. UbiAttendance will still show 2 days. +> + +## For Employees + +Employees can log in to the UbiAttendance portal using their user id and password that they generated when signing into UbiAttendance for the first time. diff --git a/llm-content/payroll/integrations/whatsapp.md b/llm-content/payroll/integrations/whatsapp.md new file mode 100644 index 00000000..e84773b4 --- /dev/null +++ b/llm-content/payroll/integrations/whatsapp.md @@ -0,0 +1,51 @@ +--- +title: RazorpayX Payroll - WhatsApp Integration +heading: Integrate with WhatsApp +description: Connect WhatsApp with Payroll for Payslips and Reimbursements. +--- + +# Integrate with WhatsApp + +You can claim reimbursements and get monthly payslips right in your WhatsApp account. There are two ways to integrate WhatsApp with Payroll: + +## Method 1 + +Click **CONNECT WHATSAPP** on the Dashboard banner or from the **My Payslips** and **Reimbursements** page. Shown below are three places from which you can connect Payroll with WhatsApp. + + + The prompt to connect Payroll with WhatsApp is available on your Payroll Dashboard. + + ![Connect WhatsApp with Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-whatsapp-1.jpg.md) + + + Go to **My Pay Slips** to explore the integration. + + ![Connect WhatsApp with Payslips](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-whatsapp-2.jpg.md) + + + You can connect WhatsApp with Payroll from the **Reimbursements** tab as well. + + ![Connect WhatsApp with reimbursements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-whatsapp-3.jpg.md) + + +## Method 2 + +If the dashboard banner is not available, follow the steps given below to integrate WhatsApp with RazorpayX Payroll: + +1. Navigate to **My Profile**. + + ![Payroll- My Profile](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-whatsapp-4.jpg.md) + +2. Click **Edit** next to Other Information. + + ![Payroll- My Profile- Edit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-whatsapp-5.jpg.md) + +3. Select the checkbox under Connect to WhatsApp. + + ![Connect WhatsApp with Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-whatsapp-6.jpg.md) + +To disconnect WhatsApp, deselect the same checkbox under **Connect to WhatsApp**. + +### Related Information + +- [Integrations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations.md) diff --git a/llm-content/payroll/integrations/zaggle.md b/llm-content/payroll/integrations/zaggle.md new file mode 100644 index 00000000..45a1f987 --- /dev/null +++ b/llm-content/payroll/integrations/zaggle.md @@ -0,0 +1,119 @@ +--- +title: Integrate Razorpay Payroll with Zaggle +heading: Integrate with Zaggle +description: Integrate RazorpayX Payroll with Zaggle to simplify flexible benefits management for employees. +--- + +# Integrate with Zaggle + +Integrate with Zaggle to simplify the flexible benefits declaration and reimbursement process for your employees. + +With the Zaggle integration, employees can declare flexible benefits on their Zaggle card. You can then approve the declared amounts and transfer funds to their card, that employees can then use the card to make purchases. + + +### Advantages + + - **Central Data Tracking**: + + Your Payroll account maintains all employees' flexible benefits data. On the Payroll Dashboard, you can configure flexible benefits at an organisational level and allocate funds accordingly. + + - **Smooth Declaration and Reimbursement Process**: + + Employees can use their Zaggle cards to declare flexible benefits. After declaring, you can transfer the approved amount and funds to their Zaggle card. This streamlines the flexible benefits process. + + - **Simplified Reconcilaition**: + + Since employees use their Zaggle card to make payments from their declared benefits, collecting proofs for the declarations becomes easy. + + - **Automatic Data Sync**: + + Your organisation's employee data is automatically transferred to Zaggle during setup. This eliminates the manual effort and errors in exporting data to Zaggle. + + +## How it Works + +1. [Integrate Zaggle with Payroll](#integration-steps). +1. Set up flexible benefits plan (FBP) and allocate monthly amounts on the Payroll Dashboard. +1. Complete the KYC and arrange card delivery for employees. + +## Integration Steps + +To integrate with Zaggle: +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **Integrations** in the left menu under **ADMIN OPTIONS**. +1. Look for **Zaggle** and click **Explore**. +1. On the Zaggle integration page, click **CONTINUE SETUP** at the bottom. This opens the setup page. +1. On the setup page: + 1. In the **WALLETS** tab, select the check boxes to make flexible benefits available to your employees. Click **SAVE AND NEXT**. + ![Set up Zaggle FBP plan on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-integrations-zaggle-setup.jpg.md) + 1. In the **COMPONENT** tab, enter the maximum monthly amount allowed for flexible benefits at an employee level in the **Monthly amount** text box. + + If you enter 5000 in the text box, ₹5000 is the total flexible benefits amount allocated for every employee in your organisation. + + + +### What does this mean? + + - When you add a specific amount in the text box, Payroll creates flexible benefits component in your employees' salary structure. + - The amount added here is the sum total of all the flexible benefits and allocation. + + + + + Click **SAVE AND NEXT**. + + ![Add monthly amount on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-integrations-zaggle-component.jpg.md) + 1. In the **ADDRESS** tab, select whether Zaggle should deliver the cards to your organisation's address or individually to your employees' addresses. + + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot change the delivery address details after integrating. +> + + 1. On the **CONFIRM** tab, review the integration details and click **CONFIRM**. + +This successfully completes the integration. + +## Manage Integration + +To manage your integration with Zaggle on the Payroll Dashboard: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **Integrations** in the left menu under **ADMIN OPTIONS**. +1. Click **Manage** in the Zaggle card. + + ![Click Manage in Payroll Integrations Dashboard Zaggle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-integrations-zaggle-manage.jpg.md) + +The following actions are available: + + +### Update KYC + + You must complete the Zaggle KYC process to deliver your employees' cards. + + 1. Navigate to the [Zaggle integration page](#manage-integration) and click **START VERIFICATION**. + ![Zaggle Payroll Integration KYC and modify FBP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-integrations-zaggle-manage1.jpg.md) + 1. On the KYC Verification page, provide your **GSTIN Number**, **GSTIN Certificate** and a **Cancelled Cheque**. + 1. Click **Request Verification**. + + This successfully initiates the verification process. + + + +### Modify Flexible Benefit Plan + + To modify the flexible benefits plan: + 1. Navigate to the [Zaggle integration page](#manage-integration). + 1. **Click here** opens the FBP modification page. + 1. On the **WALLETS** page, you can re-configure the flexible benefits plan and the monthly amount in the **COMPONENT** tab. + 1. Click **SAVE AND NEXT**. + + +### Related Information + +- [About Payroll Integrations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations.md) +- [Integrate with Jibble for Attendance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/jibble.md) diff --git a/llm-content/payroll/investment-proofs-guidelines.md b/llm-content/payroll/investment-proofs-guidelines.md new file mode 100644 index 00000000..26fb22db --- /dev/null +++ b/llm-content/payroll/investment-proofs-guidelines.md @@ -0,0 +1,278 @@ +--- +title: Submit Investment Tax Proofs for Tax Savings on RazorpayX Payroll Dashboard +heading: Submit Investment Proofs +description: Refer to the guide on how to submit investment proofs to reduce the tax liability. +--- + +# Submit Investment Proofs + +Investment declarations and proof submission is a critical payroll activity that enables employees to reduce their total tax liability. There are two aspects to this: + + +### 1. Investment Declarations + + Employees declare those investments they have planned for the year which reduce their tax liability. + - Financial investments like NPS, PPF, insurance premium and others are exempt from tax up to a limit, which reduces the total taxable income. + - Employees can declare investments whenever the declaration window is open in Payroll. + - Proof of such investments are required towards the end of the year, usually between December to March. + + + +### 2. Proof Submission + + Organisations open proof submission windows to enable employees to upload the proof of investments, as declared at the start of the year. These proofs are approved basis the verified proof amount, as per the organisation's policy. + + Using the submitted proofs, organisations calculate the total taxable amount and the subsequent tax reduction. The proofs submitted ensure the correct amount of tax is deducted. The tax calculations then reflect in the employees' Form 16. + + You can always correct your tax deductions when filing your Income Tax Returns (ITR). + + +> **INFO** +> +> +> **Handy Tips** +> +> Investment proofs/tax proofs reduce the total taxable income via exemptions and deductions. TDS is calculated on the reduced income, which then reduces the tax liability. +> + + + Check how to declare and upload proofs when the proof upload window is open. + + + - **How to Upload Investment Proofs**: Know how to upload investment proofs as an employee on the Payroll Dashboard. + +## Submit Proofs + +Refer to the guidelines below to understand the proofs to submit for the respective components and investments. + + +### House Rent Allowance (HRA) Proofs + + Click the respective tabs to understand the exemption criteria and the proofs accepted. + + + + + - HRA component in the salary. + - Rent paid - 10% of basic pay. + - 40% of basic for non-metro cities and 50% of basic for metro cities (Delhi, Mumbai, Chennai, Kolkata). + + + - All rent receipts must: + - Bear your name, details of the accomodation such as addresses, amount of rent paid per month/quarter. + - Be duly signed by your landlord. + - Date from April/month you started renting the accomodation to March/month of the current financial year that you last rented the accomodation. + - You can submit both rent receipts or the rental agreement as proof of payment. + - You must submit owner's PAN if your monthly rent exceeds ₹8,333/- (₹1,00,000 per year). + + + + + +### Leave Travel Allowance (LTA) Proofs + + Click the respective tabs to understand the exemption criteria and the proofs accepted. + + + + - You can claim LTA two times in a span of 4 years (called a block). + - The current block is from January 1, 2022 to December 31, 2025. You can claim two journeys within this block. + - You can claim LTA for one trip per calendar year. + - The journey undertaken must be on your organisation's working days. Vacations on organisation-allocated holidays are not considered. For example, Sundays. + - Only the travel cost is exempt. Hotel, stay and food expenses are not exempt. + + + - Tickets/passes/invoices must bear your name. + - Every individual who undertook the journey must bear a separate ticket. + + + + + +### Section 80 Deductions + + Scroll horizontally on the section names to view the proof submission guidelines. + + + + + - **Life Insurance Premium and Public Provident Fund (PPF) Contribution**: + - Premiums paid in the current financial year is exempt under section (u/s) 80C. + - Submit the receipt of premium paid. + - Only the premium paid and taxes is exempt. Late fees, taxes on late fees and more are not exempt. + + - **National Savings Certificate (NSC)**: + - NSC is exempt upto ₹1.5 lakhs in a financial year. Submit a copy of proof of certificates along with the date of purchase and amount. + - Interest earned on NSC for the first four years is tax-exempt. It is taxable from the fifth year onwards. + + - **ULIP/LIC Mutual Funds**: + - Submit a copy of the ULIP statements for all months invested. + + - **Childrens' Tuition Expenditure**: + - Copy of receipts of the tuition and exam fees paid to any university/school/college. + - Excludes donations, development fees, bus, text books and uniform fees, private tuitions and more. + - Covers maximum 2 children. + - If receipt combines tuition fees and expenses, submit the receipt with the amounts break down. + + - **Post Office 5 Year Time Deposit Scheme/Other eligible investments**: + - Submit the copy of passbook/receipts/certificates/acknowledgements. + + + 80C allows deductions towards medical expenditure, insurance and disability claims. + + + + 80D Medical Insurance + + **Medical Insurance Premium**: + + Medical insurance premiums are exempt from tax in three cases: + 1. Upto ₹75,000 on the life of the taxpayer, spouse and dependent children. + 1. Preventive health check-ups of ₹5,000 for self, spouse and dependent children. Maximum exempt: ₹25,000 + 1. Additional deduction of ₹25,000 available of taxpayer's father and/or mother (if they are younger than 60 years). + + To submit proof: + + - Submit the premium payments' receipt, copy of the policy that contain the details such as the name and age of the taxpayer's parents. + + + +### 80DD/Medical Expenditure + + **Exemption Criteria/Criteria**: + Medical expenditure for training, treatment and others is exempt from tax upto a certain for your dependents with disabilities of various degrees. + - Flat ₹75,000 for disability conditions more than 40% + - Flat ₹1,25,000 for severe disability conditions more than 80% + - Dependent can be the taxpayer's parents, spouse, children and siblings. + - Dependent must not have claimed any deduction in the financial year. + + **Proof Submission Best Practices**: + - Proof of expenditure incurred or a duly signed declaration in writing. + - Writing must certify the actual expenditure amount and receipt/ acknowledgment for the amount paid/deposited into the specified schemes of LIC/UTI. + - Permanent Physical Disability Cetificate (Form 10-IA) must be obtained from a physician, oculist, surgeon, psychiatrist. + - Certificate must bear the employee's name. + - Certificate/acknowledgement must contain the % of disability if it is a severe disability. + + + +### 80U/Blindness & handicap + + Deductions/exemptions under 80U are for the taxpayer's disabilities. + - Flat ₹75,000 for disability conditions more than 40% + - Flat ₹1,25,000 for severe disability conditions more than 80% + + **Proof Submission Best Practices**: + - Permanent disability certificate (Form 10-I) must be obtained from a physician, oculist, surgeon, psychiatrist. + - Certificate must bear the employee's name. + - Certificate/acknowledgement must contain the % of disability if it is a severe disability. + + + +### Medical Slabs Information + + + ![Payroll medical slabs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-medical-info-slabs.jpg.md) + + + + + + Section 80 allows tax exemption on interest on multiple loan repayments. + + +### 80E/Interest on Repayment of Education Loan + + **Exemption Criteria/Criteria**: + Interest incurred on repayment of education loan is tax exempt in the following conditions: + - Interest incurred is on an education loan. + - Loan is availed by the employee for higher studies for self. + - Interest on repayment of up to 8 years/loan closure (whichever is earlier) is tax exempt. + - Principal loan amount is not exempt. + + **Proof Submission Best Practices**: + Letter/certificate from the bank/financial institution certifying: + - Loan is an education loan. + - Amount of actual interest paid in the current financial year is exempt. + + + +### 80EE/Interest on Repayment of Home Loan + + **Exemption Criteria/Criteria**: + Interest incurred on repayment of loan for purchase of residential house property is tax exempt in the following conditions: + - Loan was sanctioned between Apirl 1, 2016 - March 31, 2017. + - Stamp value of the property does not exceed ₹50 lakhs. + - Loan amount does not exceed ₹35 lakhs. + - Taxpayer must not own any existing residential property at the time of house purchase. + - Interest of up to ₹50,000 is exempt. + - Principal loan amount is not exempt. + + **Proof Submission Best Practices**: + Letter/certificate from the bank/financial institution certifying: + - Loan is a house loan. + - Amount of actual interest paid in the current financial year is exempt. + + + +### 80EEA/Home Loan or Certain House Property + + **Exemption Criteria/Criteria**: + Interest incurred on repayment of loan for purchase of certain house property is tax exempt in the following conditions: + - Loan was sanctioned between Apirl 1, 2019 - March 31, 2022. + - Value of the property does not exceed ₹45 lakhs. + - Loan amount does not exceed ₹35 lakhs. + - Maximum interest of up to ₹1,50,000 is exempt. + - Principal loan amount is not exempt. + + **Proof Submission Best Practices**: + Letter/certificate from the bank/financial institution certifying: + - Loan is a house loan. + - Amount of actual interest paid in the current financial year is exempt. + + + +### 80EEB/Electric Vehicles + + **Exemption Criteria/Criteria**: + Interest incurred on repayment of loan for purchase of electric vehicles is tax exempt in the following conditions: + - Loan was sanctioned between Apirl 1, 2019 - March 31, 2023. + - Maximum amount of up to ₹1,50,000 is exempt. + - Loan must be taken for purchase of an electric vehicle of any kind. + + **Proof Submission Best Practices**: + Letter/certificate from the bank/financial institution certifying: + - Loan is a house loan. + - Amount of actual interest paid in the current financial year is exempt. + + + + + + Employee's contribution of ₹50,000 towards National Pension Scheme (NPS) is exempt. Balance amount (of ₹1.5 lakhs), that is, a total of ₹2 lakhs can be claimed under Section 80C. + + Submit the NPS contribution receipt or the account statement. + + + Any donations to trusts, funds, political parties and others are exempt under 80G to a certain limit. + + Uploading 80G proofs is only possible if you allow employees' [80G contributions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tax-deductions-setup.md#disable-80g). + + Proof of payment and receipt must be submitted. + + + + + +### Sec 24 R.W 192 Loan on Construction + + Loan taken to construct a residential property can be claimed as tax exempt in the following conditions: + - Construction must be completed within 5 years. + - Maximum of ₹2,00,000 in interest paid for five years is spread out for the next five years to claim. + - Loan is before April 1, 1999: ₹30,000 + - Loan is after April 1, 1999: ₹2,00,000 + - Loan taken for repair, reconstruction, renewal: ₹30,000 is exempt. + - Loan must not be a personal loan taken for home use. + + **Proof submission best practices**: + - Submit the provisional interest certificate issued by your bank that details the principal amount and the interest payable. + - Submit the posession certificate from builder/society/electricity bill/sale deed/municipal tax receipt. diff --git a/llm-content/payroll/kyc.md b/llm-content/payroll/kyc.md new file mode 100644 index 00000000..b83c6b6c --- /dev/null +++ b/llm-content/payroll/kyc.md @@ -0,0 +1,148 @@ +--- +title: Documents Required for RazorpayX Payroll KYC Verification +heading: KYC Verification +description: Verify KYC and activate your RazorpayX Payroll account. Refer to the process and requirements. +--- + +# KYC Verification + +After you sign up with [Payroll](https://payroll.razorpay.com/dashboard), start the KYC verification process to use all the Payroll [features](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll.md). + +## How it Works + +There are two steps to verify KYC: +1. Verify bank account details. +1. Upload documents of: + 1. [Authorised signatory](https://razorpay.com/docs/payments/glossary/#:~:text=days%20of%20creation.-,Authorised%20Signatory,-A%20person%20who). + 1. Company's details using [applicable documents](#kyc-documents). + +![KYC onboarding page on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-kyc-setup.jpg.md) + +## Best Practices + +- You can complete your account activation process in any preferred order. We auto-save your application. +- Ensure all document copies uploaded are: + - Less than 5 MB in size. + - Not password protected. + - Not blurry and unclear. + - In `pdf`, `jpg`, `png` formats. +- Proof of identity (PAN) and [authorised signatory's](https://razorpay.com/docs/payments/glossary/#:~:text=days%20of%20creation.-,Authorised%20Signatory,-A%20person%20who) address proof (Aadhar Card and Passport) should belong to the same person. +- Do not close the window when verification is in progress. +- When providing company details: + - If you are an existing [Razorpay PG](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md) merchant, the KYC fields are auto-filled and verified. + - If you are an existing [RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) user or you are using Razorpay products for the first time, follow the [below steps](#get-started) to verify your KYC. + +## Verify KYC + +To initiate KYC and activate your Payroll account: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Click **Start** in the Organisation Setup widget on the Home Page. + ![KYC onboarding page on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-kyc-setup.jpg.md) +1. Upload your bank details like account number and IFSC. You can wait for the details to be automatically verified by the system or complete the KYC verification process manually. +1. Click **Verify**. You can proceed to provide KYC documents for company details. +1. Provide the following details: + 1. **Address Proof**: Upload your business address proof. + 1. Select an address proof document from the drop-down list. + 1. Upload your address proof document's front and back sides as applicable. + 1. **Identity Proof**: Upload your PAN card copy for identity proof verification. The authorised signatory's address proof and the personal PAN card must match. + 1. **Business Documents**: Upload the relevant [business documents](#kyc-documents) based on your business type. + + ![Upload relevant documents for Payroll KYC Verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-kyc-upload-docs.jpg.md) +1. Click **Verify** after uploading all the documents. The KYC verification process takes 1-2 working days. + +## KYC Documents + +Refer to the documents required for KYC verification per your business type. + +> **WARN** +> +> +> **Watch Out!** +> +> The PAN card and [authorised signatory's](https://razorpay.com/docs/payments/glossary/#:~:text=days%20of%20creation.-,Authorised%20Signatory,-A%20person%20who) address proof (Aadhar Card and Passport) should belong to the same person. +> + + +### LLP/Private Limited/Public Limited Companies + + + Following documents are required for KYC verification for Limited Liability Partnerships (LLPs)/Private Limited/Public Limited Companies. + + + Proof Required | Supporting Documents + --- + Proof of Business Identity | Certificate of Incorporation + --- + Proof of Business Existence | Income Tax Registration (Company PAN Card) + --- + Proof of Identity of Business Owners and Authorised Signatory | - Government-approved [authorised signatory](https://razorpay.com/docs/payments/glossary/#:~:text=days%20of%20creation.-,Authorised%20Signatory,-A%20person%20who) identity proof (like Aadhar Card/Voter Card/DL/Passport and so on.) +- Authorised signatory PAN Card details. + + + + + +### Partnership + + Following documents are required for KYC verification for Partnerships. + + + Proof Required | Supporting Documents + --- + Proof of Business Identity | - Registered Partnership Deed +- Any one of Sales Tax Registration **Or** VAT /TIN Registration **Or** Shops and Establishments Certificate **Or** Trade License + + --- + Proof of Business Existence | Income Tax Registration (Company PAN Card) + --- + Proof of Identity of Business Owners and Authorised Signatory | - Government-approved [authorised signatory](https://razorpay.com/docs/payments/glossary/#:~:text=days%20of%20creation.-,Authorised%20Signatory,-A%20person%20who) identity proof (like Aadhar Card/Voter Card/DL/Passport and so on.) +- Authorised signatory PAN Card details. + + + + + +### NGO/Trust + + Following documents are required for KYC verification for Non-Governmental Organisations (NGOs) and Trusts. + + + Proof Required | Supporting Documents + --- + Proof of Business Identity and Existence | - Registered Trust Deed +- Any one of Sales Tax Registration **Or** VAT /TIN Registration, Trade License and so on. + + --- + Proof of Business Existence | Income Tax Registration (Company PAN Card) + --- + Proof of Identity of Business Owners and Authorised Signatory | - Government-approved [authorised signatory](https://razorpay.com/docs/payments/glossary/#:~:text=days%20of%20creation.-,Authorised%20Signatory,-A%20person%20who) identity proof (like Aadhar Card/Voter Card/DL/Passport and so on.) +- Authorised signatory PAN Card details. + + + + + +### Sole Proprietorship + + Following documents are required for KYC verification for Sole Proprietorship. + + + Proof Required | Supporting Documents + --- + Proof of Business Identity and Existence | VAT Registration **Or** Shops and Establishments Certificate **Or** Trade License, TIN **Or** Sales Tax Registration **Or** GST Certificate. + --- + Proof of Business Working | - Current Account company bank statement (past three months) **Or** +- Cancelled cheque **Or** first page of settlement account + + --- + Proof of Identity of Business Owners | Income Tax Registration (PAN Card) + --- + Proof of address of Business Owners | Government-approved identity and address proof of Proprietor (like Aadhar Card/Voter Card/DL/Passport.) + + + +### Related Information + +- [Account Setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/quickstart.md) +- [KYC Glossary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/account-activation-support.md) diff --git a/llm-content/payroll/leaves.md b/llm-content/payroll/leaves.md new file mode 100644 index 00000000..9c1e72bc --- /dev/null +++ b/llm-content/payroll/leaves.md @@ -0,0 +1,118 @@ +--- +title: RazorpayX Payroll Leave Setup +heading: Leave Setup +description: Configure your organisation's leave and holiday setup in RazorpayX Payroll. +--- + +# Leave Setup + +Time management in Payroll can be done via the Leave and Attendance module after you enable and set it up. + +You can integrate biometric devices and configure your employees' leaves setup and attendance in Payroll: + +- [Configure leave and attendance module setup](#configure-leave-setup). +- [Calculate leaves based on Loss of Pay](#loss-of-pay-for-unpaid-excessive-leave-work). + +## Configure Leave Setup + +To set up a leave system for your organisation on Payroll: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **ADMIN OPTIONS** → **Settings** in the left menu. +1. Go to **Holidays, Leaves and Attendance**. +2. Under the **Types of Leaves** section, enter the different types of leaves your employee can avail and set the following parameters for each type of leave: + + + + **Type of Leave** | **Description** + --- + **Default Amount** | This is the number of leaves granted to an employee when they are added to Payroll. + --- + **Monthly Increment** | Every month, Payroll automatically increases the total leave count as per the increment set you have set. This increment happens on the 1st of every month and takes place for every active employee, irrespective of their date of joining. + --- + **Max Amount** | If you are using the monthly increment, then it is also helpful to set the maximum amount that this type of leave should not exceed. + --- + **Carry Forward** | At the end of your leave calendar (financial or calendar year), Payroll can automatically carry forward the leave balance to the next year. You can use this setting to specify the maximum carry forward. + Set this to `0` if you do not want the leaves to be carried forward. If this is not set, then the entire balance will be carried forward. + + +## Change Leave Types + +If you have already configured your leave setup on Payroll and you decide to change the number/types of leaves, it can lead to unexpected results. + +For example, if the first type of leave defined is `Casual Leave`, and you change this to `Annual Leave`. Then the system shows the Casual Leave balance/total as the new Annual Leave balance/total. + +This is not ideal as it create confusion for the employees on the type and the corresponding number of leaves available to them. + +If you have to make a change like this, you can: +1. Log in to the Payroll Dashboard. +1. Go to **Reports** → **Attendance** → **Leave Report**. +1. Download your current leave setup data. +1. Make the required changes and save it. + +Once the changes have been implemented, you might need to revisit this report, download and make changes to it using your backup, and upload it again. + +## Bulk Update Leave Balance + +To begin with, ensure the leave setup is configured for your organisation. + +To check this: +1. Go to **Settings** → **Holidays**, **Leave and Attendance**. +2. Click **EDIT**. Go through all the different options, and set up as required. + +Next, to update your employee's leave balance: + +1. Go to **Reports** → **Attendance** → **Leave Report**. You can see a table with all your employees and all the different kinds of leaves that are available to them (total, as well as remaining leaves). +2. To edit this, click the **Download CSV** button, save and update the total leave balance. + +> **INFO** +> +> +> **Handy Tips** +> +> The leave balance is calculated automatically, so editing those columns does not have any effect. +> + +3. Upload the file on the same page and all employees' leaves get updated. + +## Loss of Pay for Unpaid/Excessive Leave Work + +> **INFO** +> +> +> **Handy Tips** +> +> This section is only applicable if your organisation is using our Leave and Attendance feature. +> + +There are three options for adding loss-of-pay based on attendance, and you can select your desired option from **Settings** → **Holidays**, **Leaves and Attendance**. + + + If you enable this option, Payroll automatically adds loss-of-pay for your employees for the payroll month based on unpaid leaves in their attendance. + + The loss of pay is calculated as: **Salary** x **Number of unpaid leaves** / **total number of days in the month**. + + ![Automatically add loss-of-pay for unpaid leaves](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-holidays-leaves-attendance.jpg.md) + + + If the option for automatic loss-of-pay is disabled, then you can use our LOP suggestions report under **Reports** → **Attendance** → **Payroll Adjustments**. + + These suggestions are based on the same logic as the automatic adjustments, and you can manually select which loss-of-pay to add to the payroll. + + + If you want complete manual control of loss-of-pay, then the same can be done by adding a deduction manually. + + You must disable the option for automatic loss-of-pay disabled if you opt for this. + + +Know more about calculating [salary based on Loss of Pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#calculations). + +## Leave Encashment + +When an employee leaves your organisation, you can pay them for the leaves they have not availed from their balance. Know more about [Leave Encashment during exit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#full-and-final-settlement). + +### Related Information + +- [Human Resources](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md) +- [Run Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md) +- [Employees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md) diff --git a/llm-content/payroll/loans.md b/llm-content/payroll/loans.md new file mode 100644 index 00000000..0f9bc54f --- /dev/null +++ b/llm-content/payroll/loans.md @@ -0,0 +1,200 @@ +--- +title: Manage Employee Loans in RazorpayX Payroll +heading: Employee Loans +description: Create and manage loans for employees on the RazorpayX Payroll Dashboard. +--- + +# Employee Loans + +Employee loans are beneficial for both the employer and the employee. +- Employees choose to avail loans from their employers as the interest rates are lower. +- The employer trusts the employee to make timely repayments. In the case of a default, the employer can recover the amount easily. + +This makes the loan process more straightforward for employees and lucrative for organisations. + +On the Payroll Dashboard, you can easily add new loans and manage them. You can also analyse loan reports visually, get a centralised view of loans given, track loans and manage repayment and foreclosure, all in a single dashboard. + + +### Advantages of the Loan Module + + - Payroll's loan module automatically calculates all the loan conditions. + - Provides a centralised view of your organisation's loan portfolio. + - Single Platform to manage, modify and track employee loans. + - Streamlines loan modifications effortlessly. + - Detailed real-time reports on loan repayments and requests. + + + +### What is the difference between Advance Salary and Employee Loans? + + Employee loans are a loan facility employers provide to their employees at a lower interest rate than the market rate. The EMIs are deducted from the employee's salary and on Payroll, you can modify the employee's EMI or skip the EMI when necessary. + + In an [Advance Salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/advance-salary.md), the organisation pays a portion of the employee's salary as an advance. The advance paid is recovered in installments from the employee and is usually interest-free. + + +## Create and Manage Loans + +Explore how you can: +- [Create a Loan](#create-a-loan). +- [Skip Loan EMIs](#skip-loan-emis). +- [Modify Loan Duration](#modify-duration). +- [Record External Loan Recovery](#recover-loan). +- [View Loan Reports](#view-reports). + +### Create a Loan + +To create a loan as per your loan policy: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **ADMIN OPTIONS** → **Pay Employees** → **Loans** in the left menu. +1. Click **+ ADD NEW LOAN**. + ![Create Loan on Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-create-loan.jpg.md) +1. On the **Create Loan** page: + 1. Enter employee details. + 1. Search and enter the employee's name. + 1. Provide a loan name. For example, 'Personal Loan'. + 1. Specify the loan amount and duration details. + 1. Enter the total loan amount sanctioned to the employee. + 1. Choose the interest type between Flat rate or Reducing rate. + + +### Difference between Flat rate and Reducing rate + + + Flat Interest Rate | Reducing Interest Rate + --- + Is a fixed interest rate charged on the total principal availed by the employee. | Also a fixed interest rate, but is charged on the total outstanding principal amount after each EMI/repayment. + --- + Interest amount remains fixed throughout the loan tenure. | Interest amount changes after every EMI as the principal amount is reducing. + --- + Interest is easier to calculate and consistent. | Interest amount calculation is more complex than flat rate calculations. + --- + Interest increases the EMI amount. | Interest is charged proportionately on the outstanding amount. + + + + + 1. Enter the rate of interest. You must use SBI's loan products for reference. + 1. Provide the perquisite percentage. + + +### What is Perquisite Rate? + + Perquisite rate or perquisite % is the difference between SBI's interest rate on loans and the organisation's interest rate. + + - To calculate perquisite rate, you must refer to SBI's loan products. + - If your organisation provides personal loans, check SBI's personal loan products. Similarly, you can check SBI's marriage loan products for marriage loans. + + Suppose SBI's personal loan interest rate is 13% and your organisation's rate of interest is 8%. + + + Perquisite % | 13% - 8% + = 5% + --- + + + The 5% is a perquisite income to the employee and is charged under the selected tax regime, basis their tax bracket. + + + + 1. Determine the repayment terms. + - Provide the duration of the loan by entering the number of months. + - Choose from when the EMI deduction starts to provide flexibility to the employee. +1. Review the details and click **ADD TO PENDING LOANS**. + +You have successfully created a loan. This moves to the `pending` status as you must disburse the loan for the employee to receive the loan amount. + +To disburse the loan to the employee: +1. Go to **PENDING LOANS** on the Loans page. +1. Review the loan details. You can delete a loan entry if it is no longer required for the employee. +1. Click **DISBURSE LOAN ()**. This creates the loan payout to your employees. + ![Disburse loan to employees on Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-disburse-pending-loan.jpg.md) + + [Add funds to your Payroll account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md#transfer-funds) in case the **DISBURSE LOAN ()** option is not available. +1. Enter the OTP you you receive at your registered email address/authenticator app and authorise the loan disbursal. + +> **INFO** +> +> +> **Handy Tips** +> +> In the [employees' profile](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md#set-up-profile) view, you can either set a limit on the total perquisite amount allowed (only in [custom salary structure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md#setup-salary-structure)) or let Payroll calculate the amount allowed automatically. This is beneficial in cases of employee's [salary revision](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#revise-salary). +> + +Once you disburse the loan, you can view the details and summary on the [Manage Loans](#manage-loans) page. + +## Manage Loans + +To manage a particular loan: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **ADMIN OPTIONS** → **Pay Employees** → **Loans**. + ![Manage employee loans on Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-manage-loans.jpg.md) +1. Click **Manage** against the particular loan. + +You can filter active and closed loans using the drop-down list on this page. A loan is closed after the loan amount and interest is [recovered](#recover-loan). Click **PENDING LOANS** to view the loans you have created but are yet to disburse. + +### Skip Loan EMIs + +Sometimes an employee may request to skip a month's EMI. To skip the upcoming month's EMI: + +1. Navigate to the [Loan Details](#manage-loans) page. +1. Click **Skip EMI** in right pane. +1. Choose how to adjust the EMI repayment. You can either increase the EMI amount proportionally for the loan tenure or the total number of EMIs payable. You can preview the updated calculation in the table displayed below. + ![Adjust Employee Loan EMI on Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-skip-loan-emi.jpg.md) +1. Click **CONFIRM**. + +You have successfully skipped a month's EMI for the employee. + +### Modify Duration + +To modify the loan duration: + +1. Navigate to the [Loan Details](#manage-loans) page. +1. Click **Modify Instalment Terms** in the right pane. +1. Enter the new loan duration in months on the **Modify Loan Duration** page. Click **PREVIEW NEW TENURE** to check the change in the EMI and outstanding balance amount. +1. Click **CONFIRM**. + +You have successfully changed the EMI tenure for the loan. + +### Recover Loan + +In some cases, employees may be interested in foreclosing the loan. In such cases, you can recover the loan amount externally and update the recovery on Payroll. To enable foreclosure for your employees: + +1. Navigate to the [Loan Details](#manage-loans) page. +1. Click **Loan Recovery** in the right pane. +1. Choose between a Full or Partial Recovery of the loan. In case of a partial recovery, enter the amount you have recovered. + ![Record external loan recover on Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-recover-loan-external.jpg.md) +1. Click **Next**. +1. Review the updated loan tenure, EMI amount and the repayment status for the payroll months in the **Verify & Confirm** page and click **Confirm**. +1. In the **Confirm changes** pop-up modal, click **CONFIRM CHANGES**. + +You have successfully updated the loan status after recovery. + +> **INFO** +> +> +> **Handy Tips** +> +> You can [change the loan duration](#modify-duration) to 1 month to perform an early loan recovery. This automatically updates the loan status on Payroll. +> + +## View Reports + +To view the loan reports: + +1. Navigate to the [Loan Details](#manage-loans) page. Here you can view the loan details and terms. +1. Click **Report** in the right pane. This opens the Loan Summary report. +1. You can use the filter options and click **APPLY FILTER** to view the data. + +## For Employees + +Once the employee receives the loan amount: + +- Payroll deducts the EMI from their salary every month. Employees can view the deduction breakdown on their payslips. +- Employees can view their loan infomation from their [profile](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md#set-up-profile). + +### Related Information + +- [About Salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md) +- [Run Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md) diff --git a/llm-content/payroll/multi-location-esi.md b/llm-content/payroll/multi-location-esi.md new file mode 100644 index 00000000..630b8779 --- /dev/null +++ b/llm-content/payroll/multi-location-esi.md @@ -0,0 +1,245 @@ +--- +--- + +--- +title: Manage Multi-location ESI compliance payments in RazorpayX Payroll +heading: Multi-location ESI +desc: Set up, pay and check ESI payments across multiple locations on RazorpayX Payroll. +index: false +tags: razorpayx payroll, esi full form, esi employee registration, esi setup, multi state esi +--- + + Employees State Insurance (ESI) is a government mandated health insurance for employees. It is mandatory for organisations with more than 20 employees, whose monthly salary is lower than ₹21,000. RazorpayX Payroll now supports end-to-end automation for multi-location ESIC compliance, eliminating the need for manual handling or dependency on external CA partners. + +> **WARN** +> +> +> **Watch Out!** +> +> Payroll does not support initial ESI registration at the organization level, only individual employee registration is available. To register your organization on the ESIC Portal, please follow [the registration guide](https://portal.esic.gov.in/ESICInsurance1/ESICInsurancePortal/Employer_Employee_registration_through_portal.pdf). +> + +## What is Multi-Location ESIC? + +Organisations with employees spread across multiple states or locations are required by ESIC to: + +- Register each office location under a separate sub-code. +- Maintain distinct login credentials for each location. +- Generate location-specific contribution files. +- Process payments separately for each sub-code. + +> **WARN** +> +> +> **Watch Out!** +> +> Please note that multiple locations can share the same subcode, but each location must be distinctly identified. Hence, location mapping must be done with extreme care and precision. This is MANDATORY for all ESIC configurations. +> + +With our Multi-location ESIC feature, you can now automate the entire workflow through a single dashboard eleminitating the need for manual intervention as well as external CA support. + + **Key Benefits** + - Automated, state-wise contribution file generation. + - Location based employee registration and payment processing. + - You can register each office location under a separate sub-code. + - Streamlined operations with smart batch processing. + +## Setting Up Multi-Location ESIC + + +### Step 1: Enable ESIC Payment Feature + + 1. Navigate to **Settings > Compliance Setup > ESIC Payment Settings.** + 2. Enable the **ESIC** payment setting. + 3. A note will appear: "To enable payment processing for multiple locations, please configure your office locations and ESIC details in the **Company Details** section and enter credentials for these office locations." + + + +### Step 2: Enable ESIC Feature Flag + + Before using multi-location ESIC, you need to get the feature flag enabled for your organisation. + + ![](/docs/assets/images/esic-enabled.jpg) + + [Contact Payroll Support](mailto:xpayroll@razorpay.com) for assistance. + + + +### Step 3: Configure Office Locations + + 1. Go to the **Company Details** tab. + 2. Navigate to the office location section. + ![](/docs/assets/images/esic-office-location.jpg) + 3. Add each office location with the following details: + - Office Location Name(mandatory) + - Office State + - Office Pincode + - ESIC Sub-code + - Nearest ESIC Hospital/Dispensary + + + +> **WARN** +> +> +> **Watch Out!** +> +> Once a location is added, it cannot be modified or removed. +> Made a mistake? [Contact Payroll Support](mailto:xpayroll@razorpay.com) immediately. Do not create duplicate entries. +> + + + + + +### Step 4: Set Up ESIC Credentials + + 1. After adding your office locations, navigate to **External Credentials.** + 2. You'll see a table with columns: Office Location, Sub-code, Username, Password. + 3. For each office location: + - Select the office location from the dropdown. + ![](/docs/assets/images/esic-multi-location.jpg) + - The ESIC sub-code will be auto-filled based on your selection. + - Enter the username and password for that specific location. + + Example: + + + + | Office Location | Username | Password | + --- + | Koramangala | [Username] | [Password] | + --- + | HSR | [Username] | [Password] | + + + + +> **WARN** +> +> +> +> **Watch Out!** +> Once an office location is added, it cannot be edited or deleted. You can only add new locations. +> Before adding an office location: +> +> - Double-check all details are correct. +> - Verify the complete address. +> - Ensure all information is accurate. +> +> +> If you need to make changes to an existing office location, please [contact us](mailto:xpayroll@razorpay.com) for assistance. However, please first ensure all details are correct before submitting to avoid the need for changes. +> + + + + + + + +## Employee Office Location Assignment + +For multi-location ESIC to work correctly, each eligible employee must be assigned to the appropriate office location. + + + When adding a new employee: + + 1. Office location is a mandatory field in the new onboarding flow. Be very careful while adding your location as you cannot change or delete it afterwards. + 2. Select the appropriate office location for the employee. + 3. Based on the selected location, automation will: + - Use the corresponding ESIC sub-code and credentials. + - Register the employee in the correct ESIC portal. + - Update the employee profile with the registration details. + + + To update existing employees: + + 1. Go to the employee's profile. + 2. You cannot update existing locations - [contact us](mailto:xpayroll@razorpay.com) for assistance in updating an existing location. + 3. Save the changes. + + +## ESIC Registration Process + +The system automatically handles employee registration based on their assigned office location: +Based on the screenshots, here's the refined documentation for the ESIC registration process: + + + When an employee doesn't have an existing ESIC IP number: + + 1. Navigate to **People** → Select the employee → **ESI Registration.** + 2. Select **No** when asked "Does [Employee Name] have a ESIC IP Number?" + 3. Fill in all required information: + - Bank account details and proof (cancelled cheque/passbook) + - Personal details (DOJ, mobile, photo, PAN) + - Address information (present and permanent) + - Nominee details + - Dispensary selection + - Family member details (if applicable) + 4. Click **Request ESIC Addition.** + + Once this is done, the system retrieves the office location, ESIC sub-code, and nearest dispensary from the employee profile. It also: + - Retrieves the matching credentials for that sub-code/office location. + - Logs into the ESIC portal using those credentials. + - Registers the employee under that organisation. + - Retrieves the IP number and updates the employee record. + + + + When an employee already has an ESIC IP number from previous employment: + + 1. Navigate to **People** → Select the employee → **ESI Registration.** + 2. Select **Yes** when asked "Does [Employee Name] have a ESIC IP Number?" + 3. Enter the existing **ESIC IP** number in the field provided. + 4. Fill in the same required information(bank details, personal information, etc.). + 5. Click **Request ESIC Addition.** + + Once done, the system verifies the existing IP number. It then registers the employee under your organisation using the appropriate sub-code credentials. + + +## Contribution File Generation + +Once multi-location ESIC is configured, contribution files are automatically generated for each location: + +1. The system calculates ESIC contributions as usual. +2. Employees are segregated based on their office location. +3. Separate contribution files with their contribution details are generated for each sub-code/office location. +4. Files are formatted according to government specifications for direct upload. + +## Payment Processing + +When multi-location ESIC is enabled, the payment automation process works as follows: + +1. System identifies that multi-location is enabled. +2. Processes payments one sub-code/office location at a time: + - Selects a sub-code. + - Fetches all employees tagged to that location. + - Retrieves the credentials for that sub-code/office location. + - Logs in and processes the payment. +3. Repeats the process for all configured sub-codes/office locations. +4. Updates the dashboard with payment status for each location. + +## FAQs + + +### Do I need to pay different contribution rates for different locations? + + No. Since ESIC is governed by a central authority, deduction amounts remain the same regardless of the sub-code. + + + +### Can I add new office locations after enabling multi-location ESIC? + + Yes. You can add new office locations at any time through the Company Details section. + + + +### How do I handle employee transfers between locations? + + Update the employee's office location in their profile. The system will automatically use the correct sub-code for future compliance activities. + + + +### Is there a limit to how many office locations I can configure? + + No. The system supports an unlimited number of office locations and sub-codes. diff --git a/llm-content/payroll/nps.md b/llm-content/payroll/nps.md new file mode 100644 index 00000000..eda8c326 --- /dev/null +++ b/llm-content/payroll/nps.md @@ -0,0 +1,86 @@ +--- +title: Enable NPS Declaration for Employees on RazorpayX Payroll +heading: Enable NPS Declarations +description: Enable NPS for employees and allow them to choose NPS contribution percentage on the RazorpayX Payroll Dashboard. +--- + +# Enable NPS Declarations + +Organisations contribute up to 10% of employees' Basic Pay + Dearness Allowance as employer's contribution to the National Pension Scheme (NPS). This contribution is tax exempt upto ₹7.5 lakhs for organisations and is offered as an added benefit for employees. + +On Payroll, you can contribute towards NPS and also allow employees to choose their contribution percentage. + +> **WARN** +> +> +> **Watch Out!** +> +> - Employee's contribution to NPS via employer cannot be: +> - Greater than 10% of the employee's Basic Pay + Dearness Allowance. +> - Lesser than ₹500. +> - Payroll does not generate the Permanent Retirement Account Number (PRAN) for your employees. +> - Payroll does not handle the NPS payments. Your organisation is responsible for depositing the NPS contribution to the employee's PRAN. +> + +## How it Works + +Following is the workflow for administrators to manage employer's NPS contributions: + +1. [Enable NPS for the organisation](#enable-nps). +1. [Enable NPS contribution for eligible employees](#enable-nps-for-eligible-employees). +1. [Allow employees to choose NPS contribution percentage](#enable-nps-declaration). + +## Enable NPS + +On Payroll, you must first enable NPS for the oragnisation to allow contributions. To enable NPS for the organisation: +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **ADMIN OPTIONS** → **Settings** in the left menu. +1. Go to the **Employer NPS Setup** section and click **EDIT**. + ![Enable NPS for Organisation on RazorpayX Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-enable-nps-org.jpg.md) +1. Enable the toggle against **Enable/Disable NPS**. +1. Click **Save & Confirm**. + +### Enable NPS for Eligible Employees + +You must enable NPS for eligible employees to allow them to set their NPS preferences. + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **ADMIN OPTIONS** → **People** in the left menu. +1. Go to the particular employee's profile and navigate to the **Provident Fund, Professional Tax, ESI, LWF & NPS** section. **Click EDIT**. + + ![Enable NPS for employee](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-nps-employee-enable.jpg.md) +1. Go to the **NPS Status** section and select **Enabled** from the drop-down list. +1. Enter the employee's 12-digit PRAN in the text box. We pre-fill employee's PRAN if the employee provided their PRAN during [onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md#set-up-profile). +1. Click **CONTINUE**. + +You have successfully enabled the employee to contribute to NPS. + +### Enable NPS Declaration + +On Payroll, your eligible employees can choose their NPS contribution percentage. However, you must enable this setting separately. When disabled, we contribute the percentage reserved for NPS as specified in the [salary structure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md#setup-salary-structure). + +To allow eligible employees to declare NPS contribution percentage: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **ADMIN OPTIONS** → **Settings** in the left menu. +1. Go to **Employer NPS Setup** and click **EDIT**. +1. On the **NPS for Employer Setup** page, toggle the setting against **Employees can declare NPS contribution**. + + ![Setting to choose NPS contribution on RazorpayX Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-enable-nps-contribution-choose.jpg.md) + +This enables the setting. You must now select the frequency and duration for the declaration window to remain open. +1. Go to the **Declaration Window for NPS** section and select the custom duration from the drop-down list. You can choose from the following: + - **Always Open**: The declaration window remains open always. + - **Every month for a certain period**: Select the date range using the drop-down list to keep the declaration window open for that date range. + - **Custom range**: Select the date range using the drop-down calendar. Click **+ Add new range** to create multiple time ranges throughout the annual year. + + ![Choose NPS declaration window](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-nps-declaration-window.jpg.md) +1. Click **Save & confirm**. + +This allows employees to declare their NPS contribution. Whenever the declaration window is open, we send an email to the NPS eligible employees to declare or make changes to their NPS declaration. +- Ensure the declaration window is open during [onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md#employee-onboarding) and [salary revision](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#revise-salary) process. +- NPS contribution is recorded in the salary structure as a benefit. Enter an upper limit amount or a percentage for Payroll and custom salary structures respectively. This sets a limit for employees' NPS contribution. + +### Related Information + +- [Employee NPS Declaration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations/nps.md) diff --git a/llm-content/payroll/one-time-payments.md b/llm-content/payroll/one-time-payments.md new file mode 100644 index 00000000..6b9149f4 --- /dev/null +++ b/llm-content/payroll/one-time-payments.md @@ -0,0 +1,75 @@ +--- +title: Make One-time Payments in RazorpayX Payroll +heading: One-time Payments +description: Explore the use cases and taxes applied to make one-time Payments in RazorpayX Payroll. +--- + +# One-time Payments + +With Payroll, you can make one-time payments to your employees outside the monthly payroll process. + +## Use Cases + +One-time payments are beneficial when your employee is: +- Remunerated for an ad hoc project. +- Receives a performance incentive or other bonuses like a retention/joining bonus. + +> **WARN** +> +> +> **Watch Out!** +> +> You must **NOT** use one-time payments for the following: +> +> - **Not for salary payouts**: Do not make salary payouts such as the following using one-time payments: +> - Run payroll for just one employee. +> - Disburse your employee's last salary. +> - Pay employee's skipped salary. +> - Clear any outstanding salary arrears. + +> +> If any salary component is yet to be paid to your employee, add it to the immediate next payroll cycle. +> +> - **Not for compliance payments**: PF, TDS, PT and other compliance components are a part of the payroll process, and you must process them in **Run Payroll**. +> +> - **Not for paying Advance Salary**: The amount paid to employees using one-time payments gets added to their next gross pay and causes double entries and errors. +> + +## Make One-time Payments + +To make one-time payments: + +1. Log in to the Payroll Dashboard. + +2. Select the employee from the drop-down menu under **Who do you want to make the payment to?** + +3. Select Component: + - **Half Yearly Bonus:** Prorated Tax deduction + - **Incentive:** Instant tax deduction + - **Yearly:** Instant tax deduction + ![one time payment component](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/onetime-p.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> - **Prorated Tax Deduction**: Tax is spread across remaining months of the financial year, reducing immediate tax impact on employees. +> - **Instant Tax Deduction**: Full applicable tax is deducted immediately in the same payment cycle. +> + +4. Add the amount payable in the **Total Amount** field. + + + + + +- You can view the status of the one-time payment on the queue bar displayed on the screen or in the bottom right under the **Queued One-time payments** section. +- To check the history of all one-time payments, click on the **Ledger** section on the page. +- The one-time payment will reflect in the upcoming month's payslip for the employee. Tax is deducted as applicable if you have selected to deduct tax in the future payroll. + +### Related Information + +- [Salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md) +- [Run Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md) +- [Exceptional Pay Cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/exceptional-cases.md) diff --git a/llm-content/payroll/part-time-employees.md b/llm-content/payroll/part-time-employees.md new file mode 100644 index 00000000..bf4d541e --- /dev/null +++ b/llm-content/payroll/part-time-employees.md @@ -0,0 +1,120 @@ +--- +title: Part Time Employees +description: Manage and process payments to part-time employees through RazorpayX Payroll. +--- + +# Part Time Employees + +The Part-Time Employee Payments module processes payroll payments for your part-time employees, freelancers, and interns while ensuring compliance with TDS regulations. This module is designed specifically for payroll-related transactions and provides automatic TDS calculations and filing capabilities. + +## How it Works + +Part-Time Employee Payments enables you to pay individuals for payroll purposes with built-in compliance features. The system automatically calculates TDS based on the payment purpose and ensures all transactions comply with payroll regulations. + + **Supported Payment Purposes** + +The table below lists the payment purposes available for part-time employees: + +Purpose | TDS Rate | Tax Code | Description +--- +Part-time Employee Providing Professional Service | 10% | 194J | Consultancy services not requiring technical skills +--- +Part-time Employee Providing Technical Service | 2% | 194J | Consultancy services requiring technical skills +--- +Stipend for Intern | 0% | - | Educational stipend with no TDS deduction + +## Prerequisites + +Before using Part-Time Employee Payments, ensure: +- Your XPayroll account is active. +- You have the necessary permissions to process payments. +- Employee details including valid PAN numbers are available. +- Required employee details are prepared for upload. + +### Steps to Make Part-Time Employee Payments + +1. Navigate to **People > Pay Part-Time Employees** + +2. Fill in the following details: + - **Payment to:** Select the name of the employee. + - **Amount:** Enter the gross amount (including TDS, but excluding VAT, GST, and so on) + - **Remarks:** Add any notes which will be included in the email to the employee. + - **Payment Purpose:** Select one of the following options: + - **Part-time Employee Professional Service:** TDS deduction at 10%. + - **Part-time Employee Providing Technical Services:** TDS deduction at 2%. + - **Stipend for Intern:** No TDS deduction. + +3. Review all details and click **Confirm Payment** + +> **WARN** +> +> +> **Watch Out!** +> +> - **Business PAN Requirement:** If the beneficiary has a business PAN, you would need to process this transaction through XPayroll that has a linked Current Account as only Payroll-related transactions are allowed via Payroll wallet. Learn more [RazorpayX-powered Current Account](https://razorpay.com/docs/payroll/razorpayx-powered-current-account/) +> +> - **Scheduled Payments:** You can set up scheduled payments for regular part-time employees. +> +> - **Invoices:** Invoices are not required for part-time employee payments. +> +> - **Payment Tracking:** All part-time employee payments will be recorded in your ledger for easy tracking. +> + +## 26Q Filing for Part-Time Employee Payments + +Payroll automates 26Q filing for eligible part-time employee payments. + +### About 26Q Filing + +- **Scope:** Only payments processed within our system will be included in the 26Q filing. +- **Eligibility:** All part-time employee payments with applicable TDS deductions will be considered for 26Q filing. +- **Filing Period:** The 26Q form is filed quarterly as per the Income Tax Department requirements. + + +### How to Enable/Disable 26Q Filing + + 1. Navigate to **Settings > Tax Filing** + 2. Under the **TDS Filing** section, find the 26Q Filing option + 3. Toggle the switch to enable or disable automatic filing + 4. Save your preferences + + + +### Handling Missing PAN Information + + If a part-time employee's PAN information is missing: + 1. A "P" error will be displayed next to their payment record + 2. Payment will be blocked until the PAN is updated + 3. Once updated, the payment will be processed and included in the 26Q filing + + +## Frequently Asked Questions + + +### Can part-time employees request payments themselves? + + Yes, freelancers can use the payment request feature to streamline communication regarding payments. + + + +### Will I receive email notifications for part-time employee payments? + + Yes, confirmation emails are sent for all successful part-time employee payments. + + + +### What happens if a scheduled payment is blocked due to missing PAN or non-current account? + + The payment will not be processed, and an email notification will be sent to the employee explaining the reason and steps to resolve it. + + + +### Can I make one-time payments to part-time employees? + + Yes, one-time payments can be made through the Part-Time Employees payment section, separate from the monthly payroll. + + + +### How are part-time employee payments different from contractor payments? + + Part-time employee payments are specific to individuals working on a part-time basis with your company, while contractor payments are for vendors providing services. The TDS rates and documentation requirements may differ. diff --git a/llm-content/payroll/payroll-payouts.md b/llm-content/payroll/payroll-payouts.md new file mode 100644 index 00000000..2ed9be57 --- /dev/null +++ b/llm-content/payroll/payroll-payouts.md @@ -0,0 +1,245 @@ +--- +title: Make Payroll Payouts and transfer funds to Payroll account as an Admin in RazorpayX Payroll +heading: Fund Transfer & Payroll Payouts +description: Transfer funds and make payroll payouts in RazorpayX Payroll. +--- + +# Fund Transfer & Payroll Payouts + +After you log in to your [Payroll Dashboard](https://payroll.razorpay.com/dashboard) as an admin, add balance to your account to start making payroll payouts. You can also create and assign [user roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/user-roles-workflows.md) and [create Approval Workflows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/approval-workflow.md) to permit or restrict access. + +## Transfer Funds + +To execute payroll, you must add funds to your Payroll account. Ensure you add funds well before time to prevent payment delays. + +To transfer funds to your Payroll account: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Click **UPDATE BALANCE** in the right pane. +2. On the **Money Transfer** page, follow the instructions to wire money to the details listed on-screen. + - Funds can only be transferred electronically via your bank's internet banking portal/app. + - Other methods like cheque/UPI are **not supported**. +3. Once you initiate the transfer, your Payroll balance gets updated within 24 hours. You also receive an email confirmation once we receive the funds. + + +> **WARN** +> +> +> **Watch Out!** +> +> It takes up to 24 hours to update your Payroll account balance. Ensure you transfer funds well ahead of time. +> + +> **INFO** +> +> +> **Handy Tips** +> +> Explore the RazorpayX - Current Account [integration with Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/current-account.md) to simplify money transfer and fund management. +> + + +### Fund Transfer Best Practices + + Ensure the following before you attempt updating your balance: + - You update account balance at least **24 hours before** the payroll execution date. + + For example, your payroll execution date is October 31. In that case, you must add the required funds by October 30. + - You are transferring funds from a **whitelisted account**. + + Whitelisting your bank account via Source Account Validation (SAV) is critical to ensure secure and successful fund transfers. + + [Contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/plans.md#contact-support) to initiate SAV for your organisation. + - You transfer funds via IMPS. + + IMPS is a reliable payment mode that is available 24/7 on all non-working days and bank holidays. Know more about the [default payment mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md#modify-default-payout-mode). + + + +### Fund Credit Not Updated + + Balance updates can be delayed if: + - Funds are transferred using NEFT/RTGS during non-banking or bank holidays. + - There is an error in the beneficiary details in the bank account number/IFSC. + + If you have transferred funds to Payroll and your balance does not reflect the amount, raise a [support ticket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/plans.md). Include the funds transfer's receipt that shows the following details: + - Beneficiary account details. + - Date/Time of transfer. + - Amount transferred. + - UTR number. + + + +### Track Fund Transfer History + + You can view your fund loading history in **ADMIN OPTIONS** → **Reports** → **Ledger** on the Payroll Dashboard. + + + +### Transfer from YesBank to Axis + + Payroll processes account balance updates via Axis bank and you are required to transfer funds to the account details displayed on the **Money Transfer** page. + + If you transferred funds to your YesBank payee (Payroll's former bank account), we automatically return those funds to your Axis Bank account. You need not take any action here. + + However, ensure you [transfer funds](#transfer-funds) to the new Axis Bank account. You can find your account details on the **Money Transfer** page. + + +If you have any queries, raise a [support request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#razorpayx-payroll). + +## Make Payroll Payouts + +Payroll payouts happen after you [execute payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#execute-payroll). Following are some options and best practices available to you when making payroll payouts. + + +### Modify Default Payout Mode + + Payroll by default uses IMPS for any payout. IMPS is available 24/7 and works on all days, irrespective of whether it is a bank holiday or a weekend. + + However, the payment mode switches to NEFT automatically in the following cases: + - If the payment amount is more than ₹2,00,000. + - If the organisation has overridden the default settings. + - If your employee has chosen NEFT transfers under their [Payments Information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md) setup. + + If a money transfer has been made using NEFT when NEFT is unavailable, the transfer remains in the **Pending** status until NEFT is available again. + + + +### Modify Payment Narration + + When initiating the payout, we pass your company's name in the narration and cannot control what is else displayed on the beneficiary's account statement. + + To improve your payment narration, switch your payment method to NEFT by navigating to **Settings** → **Payments & Compliance**. This improves the narration issues with some beneficiary banks. + + You can also sign up for a [Current Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/current-account.md) powered by RazorpayX and [integrate it with Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/current-account.md). When you transfer money using your Current Account, the salary and contractor payments are routed through an existing account under your company's name. + + + +### Check Payment Status + + Payroll administrators can check the status of payments on the Dashboard. + + 1. Log in to the Payroll Dashboard. + 1. Navigate to **Reports** → **Ledger** and view the report. + + Here you can find an entry for the salary/contractor payment you have made through Payroll. + + ![Role of an Administrator - Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-role-of-administrator.jpg.md) + + You can identify a failed payment in the following ways: + - The entry is not in the Ledger. This means that no payment was made through Payroll. + - The entry is present. In such cases, check the status column: + + + + **Status** | **Description** + --- + **Pending** | The payment has not yet been completed by Payroll. + --- + **In Progress** | The payment has been made, but Payroll is awaiting confirmation from the bank that it is completed. This occurs when: +- Payment was made during non-banking hours/bank holiday. +- There are bank server issues. + + --- + **Success** | Payment has been made, and the bank has confirmed that it has been completed. + --- + **Failed** | The payment could not be completed for some reason. + + + + Whenever a [payment fails](#payment-failure-reasons), Payroll automatically sends an email to all the administrators of that organisation and the affected [employee/contractor](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#differences-between-employee-and-contractor) with the required information. + + + +### Fund Credit Timelines + + Following are the fund credit timelines for: + + + Fund Transfer Type | Timeline + --- + Account Balance Update | 24 hours + --- + Salary Credit | 24 hours + + + Transfer funds in time to ensure timely credit to bank accounts. + + + +### No Credit After Payment Success + + If the payment status is **Success** but the beneficiary has not received the funds, wait until 3 working days for the transfer to complete. + - This happens rarely due to issues within the banking system. + - After 3 days, you either receive the funds or the payment fails, post which you can retry the payment. + + + +### Payment Failure Reasons + + A Payment can fail for several reasons such as: + - Account information errors. Either the bank account number or IFSC was invalid. + - Issue with the sender/recipient bank. + - Issue with NPCI. + - Unknown problem somewhere in the banking system. + + When a payment fails, you can either: + - Retry the payment with the link sent to your registered email. + + The organisation's administrators and the recipient receive an automated email from Payroll when a payment fails. It has the payment details, reason for failure, troubleshooting steps and a link to retry the payment. + - Check in **Reports** → **Ledger** to re-attempt the payment. + + You need not make a new payment in case of failure. You can re-attempt the same payment. + + +## Invoices + +Invoices are generated against payouts and charges in Payroll. To find your invoices: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Go to **Reports** → **Ledger**. +1. Filter the results using **Type** : **Razorpay Charges**. + +All the invoices are hyperlinked sent to the admin's email. Check your spam folder if it is not visible in your primary inbox. + + +### Manage Invoice Failure + + As per government regulations, GSTIN invoices must be registered at the GSP portal from January 1, 2021. This is to validate your GSTIN with the place of supply. If they do not match, Payroll does not generate an e-invoice. + + To resolve this, you can either: + - Update your GSTIN to reach your place of supply. + - Remove your GSTIN and get a regular invoice. You cannot claim any GST credit using these invoices. + + + +### Make Subscription Invoice Payment + + Subscription invoice payments are made to RazorpayX Payroll. To pay a subscription invoice: + + 1. Log in to the Payroll Dashboard. + 1. Navigate to **Reminders** on the Home page and click on the invoice reminder. + 1. Review the invoice opened and click **PAY INVOICE**. Ensure you have sufficient balance in your account. + 1. Complete the payment by clicking PAY in the **Pay Invoice?** pop-up modal. + + You can view your payment details in **Reports** → **Ledger**. Select the filter **Type** as **Razorpay Charges**. + + +## Contractor Payments + +When you pay [contractors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#differences-between-employee-and-contractor/) on the Payroll Dashboard, charges for the payments are not immediately deducted. You instead receive a consolidated monthly invoice for all the payments. + +Payroll customers are charged for each contractor payment made. You must authorise the contractor payment using the OTP received at your registered email address/authenticator app. + +> **INFO** +> +> +> **Handy Tips** +> +> For contractor payments, the due date is calculated on the basis of invoice and payment date, whichever is earlier. +> + +### Related Information + +- [Account Setup Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/quickstart.md) +- [Statutory Compliance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md) diff --git a/llm-content/payroll/plans.md b/llm-content/payroll/plans.md new file mode 100644 index 00000000..3274a1a9 --- /dev/null +++ b/llm-content/payroll/plans.md @@ -0,0 +1,233 @@ +--- +title: Explore RazorpayX Payroll plans and process salary easily +heading: RazorpayX Payroll Plans +description: Compare the RazorpayX Payroll plans and features, facilities and support options available in them. +--- + +# RazorpayX Payroll Plans + +Payroll offers three plans: +- Prime Plan: For upto 11-30 employees. +- Elite Plan: For upto 31-1000 employees. +- Enterprise Plan: For more than 1001+ employees. [Contact support](#contact-support) to customise the plan for your organisation. + +Explore the facilities, features and support functions available under each plan below. + +## Common Features + +Following are the common payroll features available with each plan. + + +### Basic Payroll Functions + + + Facilities and Features | Prime | Elite | Enterprise + --- + Calculate Payroll | ✓ | ✓ | ✓ + --- + Generate Payslips | ✓ | ✓ | ✓ + --- + Direct salary payments | ✓ | ✓ | ✓ + --- + [One-time Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/one-time-payments.md) | ✓ | ✓ | ✓ + --- + Salary Adjustments | ✓ | ✓ | ✓ + --- + Salary Register | ✓ | ✓ | ✓ + + + + +### Other Payments + + + Facilities and Features | Prime | Elite | Enterprise + --- + Expense management/[Reimbursements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/reimbursements.md) | ✓ | ✓ | ✓ + --- + Contractor payments | ✓** | ✓** | ✓ + + \** Charged per Contractor Payment. + + + +### Compliance Payments, Calculation and Filing + + + Facilities and Features | Prime | Elite | Enterprise + --- + [Compliance Calculations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md) (PT, TDS) | ✓ | ✓ | ✓ + --- + Advance Compliance (ESI, PF) | ✓ | ✓ | ✓ + --- + Compliance Payments and Filing | ✓ | ✓ | ✓ + --- + Generate Form 16 | ✓ | ✓ | ✓ + + + + +### Advance Payroll + + + Facilities and Features | Prime | Elite | Enterprise + --- + Standard Roles and Permissions | ✓ | ✓ | ✓ + --- + [Custom Roles and Permissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/user-roles-workflows.md) | x | ✓ | ✓ + --- + [Custom Salary Structure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md#setup-salary-structure/) | ✓ | ✓ | ✓ + --- + NPS | ✓ | ✓ | ✓ + --- + Employee PF and VPF | ✓ | ✓ | ✓ + --- + Multiple Deductions | ✓ | ✓ | ✓ + --- + Hold Salary, Pay Compliance | ✓ | ✓ | ✓ + --- + Resettlement | ✓ | ✓ | ✓ + --- + [Salary Advance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#advance-salary) | ✓ | ✓ | ✓ + --- + Loan Management | ✓ | ✓ | ✓ + --- + [Flexible Benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md#avail-flexible-benefits) | ✓ | ✓ | ✓ + --- + Approval Workflows | x | ✓ | ✓ + --- + Bonus Management | ✓ | ✓ | ✓ + --- + [Investment Proof Verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md#set-up-flexi-benefits) | ✓ | ✓ | ✓ + + + + +### Time and Attendance + + + Facilities and Features | Prime | Elite | Enterprise + --- + Basic Attendance | ✓ | ✓ | ✓ + --- + Leaves | ✓ | ✓ | ✓ + --- + Bulk Attendance Upload | ✓ | ✓ | ✓ + --- + Shifts | ✓ | ✓ | ✓ + + + + +### Employee Delight Features + + + Facilities and Features | Prime | Elite | Enterprise + --- + Email and SMS Notifications | ✓ | ✓ | ✓ + --- + Payslips via [WhatsApp](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/whatsapp.md) | ✓ | ✓ | ✓ + --- + Payslips via and [Slack](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/slack.md) | ✓ | ✓ | ✓ + --- + Reimbursements via WhatsApp | ✓ | ✓ | ✓ + --- + Reimbursements via Slack | ✓ | ✓ | ✓ + --- + Salary Account | ✓ | ✓ | ✓ + --- + [Employee ITR Filing](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md#make-declarations) | ✓ | ✓ | ✓ + --- + [Letter Generation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/documents-letters.md) | ✓ | ✓ | ✓ + --- + Salary Account Integration | ✓ | ✓ | ✓ + + + + +### Support + + + Facilities and Features | Prime | Elite | Enterprise + --- + Self Serve | ✓ | ✓ | ✓ + --- + Email support | ✓ | ✓ | ✓ + --- + Chat support | ✓ | ✓ | ✓ + + + +## Value Added Features + +Following are the value added features available with each plan. + + +### White-Glove Support + + + Facilities and Features | Prime | Elite | Enterprise + --- + Dedicated Implementation Support | ✓* | ✓* | ✓* + --- + Dedicated Relationship Manager (RM) | x | ✓*** | ✓ + --- + Custom Reports on-Demand | x | ✓ | ✓ + + + \* Additional charges apply. + + \*** Free for 100+ employee count organisations only. + + + +### Integrations + + + Facilities and Features | Prime | Elite | Enterprise + --- + API and Webhooks | ✓ | ✓ | ✓ + --- + Third-party Flexible Benefits Integrations | ✓ | ✓ | ✓ + --- + Third-party HRMS Integrations | ✓* | ✓* | ✓* + --- + Third-Party Attendance Integrations | ✓* | ✓*** | ✓ + --- + Health Insurance via IRDA Partner | ✓* | ✓* | ✓* + --- + Background Verification | ✓* | ✓* | ✓* + --- + Other Third-Party Integrations | ✓* | ✓* | ✓* + + + \* Additional charges apply. + + \*** Free for 100+ employee count organisations only. + + +## Contact Support + +Your queries are better addressed via live chat or email. + +- To resolve additional questions or queries, email us at [**xpayroll@razorpay.com**](mailto:xpayroll@razorpay.com). +- You can use the Live chat option on your [Payroll Dashboard](https://payroll.razorpay.com/dashboard) to raise a query. + +> **WARN** +> +> +> **Watch Out!** +> +> - If you are on the annual plan, you cannot switch to a monthly plan before the end of its validity. +> - If you discontinue using Payroll mid-year and are on the annual subscription plan, the remaining months will not be refunded. +> - When the number of employees in your company increases or decreases, the cost is adjusted accordingly. +> - For increase in number of employees, you are charged monthly for the additional employees. +> - For decrease in number of employees, you receive extra free months after the 14th month. +> + +### Related Information + +- [RazorpayX Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll.md) +- [Pricing](https://razorpay.com/payroll/pricing/) +- [RazorpayX Payroll Dashboard](https://payroll.razorpay.com/login) +- [Enquire for Annual Subscription Plan](https://docs.google.com/forms/d/e/1FAIpQLSdBldXsR3eNaNx7Lvxs8MY6UuudwP0TtJgHqrK1rz239aaiCA/viewform) diff --git a/llm-content/payroll/professional-tax.md b/llm-content/payroll/professional-tax.md new file mode 100644 index 00000000..7124ec91 --- /dev/null +++ b/llm-content/payroll/professional-tax.md @@ -0,0 +1,227 @@ +--- +title: Check Professional Tax Management in RazorpayX Payroll +heading: Professional Tax (PT) +description: Set up, pay and check Professional Tax (PT) payments on RazorpayX Payroll. +--- + +# Professional Tax (PT) + +Professional Tax (PT) is a state-level, mandatory tax levied u/s 16 of the Income Tax Act, 1961. It varies between states and applies to all earning individuals regardless of their profession, trade or employment in India. + +Payroll seamlessly handles professional tax deductions for your employees based on the state in which you are registered. Know how you can set up and check payment records in Payroll. + +> **WARN** +> +> +> **Watch Out!** +> +> Automated Professional Tax (PT) payments for employees in Karnataka are temporarily unavailable on Payroll. Know more about the [PT rule change](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/faqs.md#professional-tax). +> +> You must make Professional Tax payments [via the e-Prerana portal](#pt-payments-via-pt-portal) for Karnataka employees after processing the monthly payroll. +> + +## Set Up PT + +Payroll only handles Professional Tax (PT) payments and filings, not the initial registration. Know more about the people and resources available for [initial registration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md#initial-registration). + + +### Set up Professional Tax (PT) Payments and Filings + + To set up PT payments for your organisation: + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **Company Details**. Here: + 1. Go to **Provident Fund / ESIC / Professional Tax / LWF** → **Edit**. + 1. Select **Enabled** from the **PT Status** drop-down menu and click **Continue**. + ![PT Setup on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pt-setup.jpg.md) + 1. On the **Company Details** page, go to **External Credentials** → **Edit**. + 1. Go to the **PT** section and update the credentials to the PT portal of your registered state. + 1. Go to **Settings** → **Payments & Compliance Setup** and enable PT Payments and Filings. + ![Payroll professional tax filings setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pt-setup-filings.jpg.md) + + +You have successfully set up PT for your organisation. +- Know more about [enabling compliances](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/quickstart.md#enable-compliances). +- If PT is disabled under **Company Details** → **Provident Fund** / **ESIC** / **Professional Tax**, it is not deducted for any employee. + +## Manage PT + +On the Payroll Dashboard, you can check and modify the PT settings for your organisation and review PT payments. + + +### Home State PT Deduction + + By default, when you add a new employee, they get added to the same state as your organisation. If PT applies to your state, it is also automatically enabled for the employee. + + PT is not deducted automatically for employees who are not in the home state. + + - If you are registered for PT in that employee's state, enable PT for that employee. + 1. Log in to your [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Go to the particular employee's profile. + 1. Edit the **Provident Fund, Professional Tax & ESI** section and enable PT. + - If you are not registered for PT in that employee's state, you can: + - Change the employee's location to your home state in Payroll. In this case, PT is deducted as per your state's policy. + - Keep the employee's current location/state as is. PT will not be deducted for them. + + + +### PT Deduction + + To check whether PT is being deducted for your employees: + 1. Log in to your [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Go to **Reports** → **Salary Register**. + 1. Look for PT as a **column** and ensure deductions are showing up for all employees. + + When you finalise the payroll for that employee, click on the Payroll Amount and ensure PT is visible as a **row**. + + + +### PT Payment + + Professional Tax payment and filing is done between the 15th and 31st of the following month, depending on the state. Until then, it remains in the `pending` state. To check the PT payment status: + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **Admin Options**. + 1. Go to **Reports** → **Ledger**. A filter view screen appears. + 1. Select filter **Type** and choose **Professional Tax**. + + After payment, you can find the challans under **Reports** → **Provident Fund, Professional Tax & ESI**. + + +## PT Payment for Karnataka Employees + +The Karnataka government has introduced 2-Factor Authentication (2FA) when logging into the PT portal, effective September 2024. Due to this, Payroll is unable to automate PT payments. + +You must manually make PT payments for your employees. Ensure you make the PT payments before October 20, 2024. + +#### PT Payments via PT Portal + +Watch the video below or read along. + +[Video: https://www.youtube.com/embed/BfQYOC3kxS4] + +There are three steps to make PT payments: + + +### List Employees with Pending PT Payments + + Your organisation may have employees from multiple locations. Use the filter option to list the employees located in Karnataka. This is a prerequisite step. + + To check the list of employees as well as the amount payable: + + 1. Log in [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **Reports** in the left menu. + 1. Click **Salary Register**. + 1. Use the **PT Location** filter to list the employees whose PT payments you must make. + 1. Scroll horizontally against the employees' names to view the PT amounts. + ![Payroll Dashboard PT payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-professional-tax-update.jpg.md) + + The amount mentioned in the **PT** column is the PT amount payable to the government. + 1. Click **Download CSV**. + + This downloads the salary report for the month. Filter the **PT Location** as Karnataka in the file and calculate the total amount payable for the number of employees whose PT payments are pending. + + + +### 1. File e-Return + + To file the e-Return: + 1. Log in to the Karnataka PT e-Prerana portal. + 1. Enter the OTP and authenticate your access to the portal. + 1. Click **File Return**. + ![e-Prerana portal RazorpayX Payroll File Return](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pt-update-prerana-portal.jpg.md) + 1. Select the **Return Entry** details from the respective drop-down menus. This includes: + - **Return Period Type:** Annual/Monthly. + - **Month:** + - **Year:** + - **Return Type:** Original/Revised + + ![Payroll PT Return details enter](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pt-update-file-return-details.jpg.md) + 1. Click **NEXT**. + 1. In the new table displayed on-screen, enter the number of employees with pending PT payments in the **No. of Employees** column. For example, `10`. + + The portal automatically calculates the total tax payable. + 1. Click **Save Return**. + + You have successfully filed the e-return, after which you receive the confirmation message on the same page. + + Click **Home** at the top-left corner to return to PT home page. + + + +### 2. Make E-Payment + + After filing the PT e-Return, you must make the E-Payment. + + 1. On the PT e-Prerana home page, click **Make E-Payment**. + ![e-Prerana portal RazorpayX Payroll File Return](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pt-update-prerana-portal.jpg.md) + 1. On the **Make E-Payment** page, you can view the returns filed in step 2. Click **Pay**. + 1. Review the **PT-Demand Details** as populated from the returns you filed. Click **Make e-Payment**. + 1. This redirects you to the Khajane II portal. Here: + - Select the **Mode of Payment** from the drop-down menu. We recommend you select netbanking as the payment mode. + - Select the **Type of E-Payment** as **SBI Aggregator**. + 1. Enter the captcha and click **Submit**. + + This successfully makes the PT payment for the month. You are automatically redirected to the PT portal. + + Click **Home** at the top-left corner to return to PT home page. + + + +### 3. Submit Returns + + After successfully making the E-Payments, you must submit the returns for which you made the PT payment. This is a mandatory reconciliation practice. + + 1. Click **Home** to go to the e-Prerana portal home page. Here, click **Submit Return**. + ![e-Prerana portal RazorpayX Payroll File Return](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pt-update-prerana-portal.jpg.md) + 1. Review the return details and click **Submit**. This opens the **Verify and Submit Return** page. + 1. Click **Add CTD reference number** to link the auto-generated CTD number with your submit return request. + + You can now view the tax payable details and the CTD reference number. + 1. Click **Verify & Submit**. + + You have successfully submitted the returns. Click **Home** at the top-left corner to return to PT home page. + + +You have successfully made the PT payments. You can view the details on the home page directly for the current FY. + +Click **Verify/Print** on the e-Prerana portal home page to download the Returns receipt. + +![e-Prerana portal RazorpayX Payroll download Return](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pt-update-verify-print.jpg.md) + +### Troubleshooting Steps + +When you submit Returns in step 4, you may not find the necessary details on the page. There are two ways to resolve this: + + +### Re-verify Payments + + 1. Navigate to e-Prerana portal home page and click **Verify failed payments**. + 1. Copy the CTD Reference number. + 1. Click **Verify** against the respective payments. + ![Click verify against respective payments PT portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pt-upadte-verify-failed-payments.jpg.md) + + This can verify your payments post which, you can submit the returns. + + + +### Verify Challan Payment Status + + If the above process fails, follow the below steps to verify failed payments. + + 1. Go to the [E-Khajane II Portal](https://k2.karnataka.gov.in/K2/index_en.html). + 1. Click **Verify Challan Payment Status**. + + ![Click Verify Challan Payment Status on Khajane portal Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pt-update-khajane-.jpg.md) + 1. Enter the CTD number you previously copied and the captcha on-screen. + 1. Ensure the transaction status is successful. + + This successfully verifies the failed payments. You can now [Submit Returns](#4-submit-returns). + + +### Related Information + +- [TDS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tds.md) +- [Statutory Compliance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md) +- [Provident Fund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/provident-fund.md) +- [Enable Compliance during Account Setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#welcome-mail-from-xpayroll) diff --git a/llm-content/payroll/professional-tax/2fa-automation.md b/llm-content/payroll/professional-tax/2fa-automation.md new file mode 100644 index 00000000..3d08af67 --- /dev/null +++ b/llm-content/payroll/professional-tax/2fa-automation.md @@ -0,0 +1,127 @@ +--- +title: Automate Karnataka PT payments on the Payroll Dashboard +heading: Automate Karnataka Professional Tax Payments +description: Automate Professional Tax payments for Karnataka employees on the Payroll Dashboard. +--- + +# Automate Karnataka Professional Tax Payments + +Due to the introduction of [2FA on the PT portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/faqs.md#professional-tax) by Karnataka government, Payroll enables you to automate PT payments (for Karnataka employees) via the Dashboard. Previously, we had paused PT payments via the Dashboard. + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you make the PT payments before 20th of the current month. +> + +## Automate PT Payments + +Watch the video below or read along to know how to make PT payments for Karnataka employees from the Payroll Dashboard. + +[Video: https://www.youtube.com/embed/1jnR_fungxA] + +### Best Practices and Points to Note + + Following are some points to note before you make PT payments for employees on the Payroll Dashboard: + + 1. **Payroll Execution and PT Payments**: + + Payroll makes PT payments only for those employees whose payroll you have executed. + - If you executed payroll for few employees, you can make PT payments for only those employees via the Payroll Dashboard. The employees must also be eligible for PT payments. + - For employees who payroll is not executed, you must manually make the PT payments externally. + - When initiating PT payments, Payroll displays the **Employee count**. This includes only those employees whose payroll is executed but PT payments are pending. + - **Employee count** does not include employees whose payroll is not executed. + 2. You can initiate PT payments only **once** from the Payroll Dashboard. + + If you executed payroll and made PT payments via the Payroll Dashboard once already, you can still execute payroll for other employees. However, you cannot make PT payments for these employees from the Payroll Dashboard. + 3. **Paid Externally** to mark as paid: + + - Use the **Paid Externally** feature after you make the PT payments externally. + - Once you mark a payment as paid, you cannot reverse it. + 4. If your PT payment is unsuccessful, you must reinitiate the PT payment from the Payroll Dashboard. + 5. You cannot make PT payments after 20th via Payroll. Make the payments externally via the PT portal and ensure you mark the payment as paid on the Payroll Dashboard. + + +### Initiate PT Payments + + To make Professional Tax payments for your employees based in Karnataka: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. [Finalise Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#execute-payroll) for the month and execute it. + + - Enter the OTP to initiate payroll processing. + - If you have enabled approval workflow, ensure the reviewer approves it. + + This executes the payroll successfully. You can now make Professional Tax payments for your employees. + 1. Go to **Pay Employees** → **Run Payroll**. + 1. Click the **Pay KA Professional Tax** tab and click **Initiate**. + ![Start PT automation on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pt-automation-ka.jpg.md) + + In the right pane, you can view the PT payment details such as the current status, the due date, employee count and more. + ![Payroll PT Automation view details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pt-ka-automation-initiate.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> - You can make PT payments only for those employees whose payroll is executed. +> - **Employee count** does not include the employees whose payroll you have not executed. +> - **Employee count** only includes the Karnataka employees. +> + + + 1. Click **Pay Now**. If your initiation failed, click **Retry**. + 1. In the **Second factor authentication** pop-up modal, enter the OTP you receive at your registered mobile number with Payroll. Click **Verify**. + + This successfully initiates the PT payments for employees. + + +### Check PT Payments Status + + To check the PT payments' status: + 1. Log in [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **Pay Employees** → **Run Payroll**. + 1. On the **Run Payroll** page, you can view the latest status of your PT payments and the next steps. + + +### Mark PT Payments as Paid + + To mark PT payments as paid: + 1. Log in [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **Pay Employees** → **Run Payroll**. + 1. On the **Run Payroll** page, follow the steps to [initiate PT payment](#initiate-pt-payments). + 1. In the right pane, click **Paid Externally**. + ![Payroll PT payments for Karnataka employees mark as paid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pt-ka-automation-initiate.jpg.md) + + This marks the PT payments for employees as paid. Once you mark as **Paid Externally**, you cannot reverse it. + + +### Troubleshoot PT Payments via Payroll + + Your PT payments may fail in some cases. Check how to resolve them. + + - **Incorrect credentials.** PT payments may fail when you initiate them due to incorrect PT credentials. + + To resolve this: + 1. Navigate to **ADMIN OPTIONS** → **Company Details**. + 1. Go to **External Credentials** → **Edit**. + 1. In the PT section, update your PT credentials for Karnataka. + + - **PT Payments have failed.** Due to timeouts or other errors on PT portal, your successful PT payment initiation may fail. + + To resolve this, retry the PT payment. + + - **Employees are not eligible for PT payments**. This error occurs when PT is not enabled for your organisation, or PT is not enabled for employee/s. + + To resolve this, ensure you enable PT for the organisation and ensure the employees' PT state is Karnataka. + + +## Related Information + +- [TDS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tds.md) +- [Statutory Compliance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md) +- [Provident Fund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/provident-fund.md) +- [Enable Compliance during Account Setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#welcome-mail-from-xpayroll) diff --git a/llm-content/payroll/provident-fund.md b/llm-content/payroll/provident-fund.md new file mode 100644 index 00000000..35349c68 --- /dev/null +++ b/llm-content/payroll/provident-fund.md @@ -0,0 +1,565 @@ +--- +title: Setup and manage Provident Fund settings, payment and troubleshooting in RazorpayX Payroll +heading: Setup Provident Fund (PF) +description: Set up and process provident fund calculations in RazorpayX Payroll. +--- + +# Setup Provident Fund (PF) + +[Employee Provident Fund (EPF)](https://razorpay.com/payroll/learn/employee-provident-fund-epf-scheme/) is a joint contribution made by both the employer and the employee. The employer contributes 12% of the employee’s basic salary and dearness allowance to PF. It is mandatory for all organisations to allocate EPF as part of an employee’s CTC. + + - **How to Calculate PF**: Know how PF is calculated. + + - **Setup PF**: Check how to set up Provident Fund for your organisation in Payroll. + + +### EPF Eligibility + + Employers and organisations qualify to contribute to EPF when any of the following conditions is true: + - The employee earns less than ₹15,000 per month. + - EPF is also available for employees earning more than ₹15,000. + - The employee has contributed to PF before through any past employer. + - The company has more than 20 employees. + + Organisations under 20 employees are not mandated to contribute to the EPF. However, such an organisation can still enable it voluntarily. + + + +### How PF is Calculated + + PF Wages refer to the employer's contribution to EPF and basic salary. It is calculated basis the employee's basic salary and allowances (excluding HRA). + + - If employee's basic salary is less than ₹15,000, PF Wages = Gross Pay (Basic + (Dearness Allowance) DA + Special allowances) - HRA + - If employee's basic salary is more than ₹15,000, PF Wages = Dearness Allowance + - If employee's basic salary is more than ₹15,000, and you [enforce PF upper limit](#setup-pf) of ₹15,000, PF Wages = ₹15,000. + + This means that employers contribute a percentage of ₹15,000 towards EPF. + + + +### PF Contribution + + The total 12% contribution from employer is divided into multiple categories. They include: + + + Category | Percentage of contribution from PF Wages (%) + --- + Employee Provident Fund | 3.67% + --- + Employee Pension Scheme (EPS) | 8.33% + --- + Employee’s Deposit Link Insurance Scheme (EDLIS) | 0.5% (Upper limit: ₹75) + --- + EPF Admin Charges | 0.5% (No upper limit) + --- + EDLIS Admin Charges | 0.01% + + + Employer's contribution to PF is only 3.67%. The remaining amount is added to Employee Pension Scheme (EPS). + + The employee's contribution of 12% is added entirely to the Employee's Provident Fund (EPF). + + +> **WARN** +> +> +> **Watch Out!** +> +> As of 2019, all allowances, excluding the House Rent Allowance (HRA), are considered PF wages. PF contribution must be calculated as the sum of basic salary and all other allowances, after excluding HRA. +> + + In specific cases, the employer can contribute only 10% to EPF instead of 12%. This is when: + - The number of employees is less than 20. + - The company incurs more losses than its net worth. + - The company is involved in the beedi, jute, brick, guar gum, and coir industries. + + To bridge the gender gap, some companies contribute 8% of new women employees' contribution towards EPF while maintaining 12% of the employer's contribution. + + +## Setup PF + +You must set up PF organisation on the Payroll Dashboard to collect employee information and process PF. + +> **WARN** +> +> +> **Watch Out!** +> +> - By default, Payroll calculates PF on all wages (except HRA). You can change this configuration. However, Payroll is NOT responsible for any compliance issues resulting from this. Know more about [PF Calculation](#how-pf-is-calculated). +> - Ensure you set up PF for your organisation before adding employees. +> + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Go to **Settings** → **Payments & Compliance Setup**. Click **EDIT**. + ![EDIT on Payroll Dashboard Settings > Payments & Compliance Setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pf-enable.jpg.md) +1. On the **Payments Settings** page, navigate to the **PF Settings** section. +1. Select the relevant check boxes to enable or disable PF Settings. You can choose to: + - Include [employer's contribution](#how-pf-is-calculated) in employee's CTC. + - Include PF EDLI and [admin charges](#additional-charges) in employee's CTC. + - Use only basic salary to calculate PF. + - Use PF limit as ₹15,000 when calculating PF contributions. + + ![Payroll Dashboard Setup PF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pf-edit-setup.jpg.md) +1. Click **CONTINUE**. + +You have successfully set up PF payments for your organisation and employees. + +## Register Employees + +You must register your employees for PF individually. You can register employees for Provident whose UAN is already available, and generate UAN for new employees as well. + +There are two steps to individually register employees for Provident Fund: + + + +### 1. Configure PF for Employees + + To configure employee-level PF settings: + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **People** from the left menu. + 3. Open the employee's profile and navigate to **Provident Fund, Professional Tax & ESI**. Click **EDIT**. + 4. In **PF Status**, select **Opt In**. Enter the UAN in the **Provident Fund UAN** text box. + + If the employee does not have a UAN, follow the steps to register employees for PF on the EPFO portal. + + ![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pf-register.jpg.md) + 1. Click **CONTINUE**. + + This saves the employee's UAN on the Payroll Dashboard. + + + +### 2. EPFO Digital Signature Certificate (DSC) Registration + + + The Employees' Provident Fund Organisation (EPFO) has **mandated Digital Signature Certificate (DSC) registration** for all establishments. In the absence of a registered DSC, **RazorpayX Payroll** will be unable to process your PF filings, and contribution processing for your employees will be blocked. We request you to kindly complete the DSC registration at the earliest to ensure uninterrupted PF compliance. + + + +> **WARN** +> +> +> **Watch Out!** +> +> If you’ve already registered your DSC and it is working for filings, no further action is needed. To verify your registration, visit the EPFO Unified Portal and navigate to **Establishment > DSC/e-sign > View Registered DSC** details first. +> + + + + #### Prerequisites + + Before beginning the DSC registration process, ensure you have: + + 1. **Digital Signature Certificate:** Class 2 or Class 3 DSC of the authorised signatory + 2. **DSC Token and PIN:** Physical USB token containing your DSC + 3. **DSC Driver Software:** Installed from the CD provided by your Certifying Authority + 4. **Java Environment:** + - Java installed (recommended: Java 8 Update 151 or 161) + - Java security settings configured to allow EPFO site + 5. **Browser Compatibility:** + - Internet Explorer 11 or Microsoft Edge in IE Mode (recommended) + - Mozilla Firefox ESR is also supported + 6. **Scanned Documents:** All required documents ready in digital format + 7. **Update EPFO Form 5A:** + - Make sure the authorised signatory's details are up to date in the "Ownership Details" section. + + ### Registration Process + + The DSC registration process for EPFO includes logging into the Employer Portal, updating and filing Form 5A, preparing and submitting the necessary signed documents, and completing DSC registration upon approval of Form 5A. + + Take a look at the detailed steps below to complete your DSC registration smoothly: + + #### Login to EPFO Employer Portal + + 1. Visit [EPFO Unified Portal](https://unifiedportal-emp.epfindia.gov.in/epfo/) + 2. Select "Employer Sign In" + 3. Enter your Establishment ID and Password to login + + #### Form 5A Filing and Document Preparation + + **Start Filing Form 5A** + + 1. Navigate to **Establishment → Form 5A** + ![](/docs/assets/images/form5a.jpg) + 2. Verify and update the following: + + - Establishment details + - Owner/Director details (must match MCA records) + - Bank details (upload cancelled cheque with company name printed) + ![](/docs/assets/images/form5a-submit.jpg) + 3. Authorized signatory details: + + - Name (must match exactly with the DSC) + - Designation + - PAN + - Mobile Number + - Email ID + + 4. Click Save and download Form 5A preview in PDF format + + + + **Preparation of Physical Documentation** + + +> **WARN** +> +> +> **Watch Out!** +> +> - All signatures must be physical and original (no digital/e-signatures allowed at this stage). +> - Use blue ink for all signatures. +> - All documents must bear the company seal/stamp. +> + + + + + Document | Requirements + --- + **Form 5A** | Printed on letterhead and signed by all directors and company seal on it. + --- + **DSC Registration Letter** | Signed by Authorized Signatory and Directors with Company Stamp. + --- + **Aadhaar Copies** | Aadhar copies of all directors and to be Signed by all directors along with company seal on it. + --- + **PAN Copies** | PAN copies of all directors and to be Signed by all directors along with company seal on it. + --- + **Cancelled Cheque** | Must have company Name Printed. + --- + **GST Registration Certificate** | Signed by all directors and stamped. + --- + **Certificate of Incorporation** | Signed by all directors and stamped. + --- + **Company PAN Card** | Signed by all directors and stamped. + + + + + +> **WARN** +> +> +> **Watch Out!** +> - EPFO authority verification and approval may take up days. +> - Track status regularly through the Employer Portal. +> - No digital transactions can be processed until approval is granted. +> + + #### Post-Approval: DSC Registration on EPFO + + After receiving approval for Form 5A: + + 1. Login to EPFO Employer Portal. + 2. Insert your DSC Token into your computer. + 3. Navigate to **Establishment → DSC/eSign → Register Certificate.** + ![](/docs/assets/images/dsc-form.jpg) + 4. Select the authorised signatory's name from the dropdown list (as per Form 5A). + 5. The system will launch a **DSC Signer Utility** (Java applet). + ![](/docs/assets/images/java-applet.jpg) + 6. Allow the Java applet to run when prompted. + 7. Select your DSC from the list of certificates displayed. + 8. Enter your DSC token PIN when prompted. + 9. Upon successful verification, a confirmation message will appear. + 10. Download and save the PDF acknowledgment for your records. + + #### Authorised Signatory Requirements + + The DSC must belong to the **appropriate authorised signatory** based on your organisation type: + + Organisation Type | Signatory + --- + **Sole Proprietorships** | Business owner/proprietor + --- + **Partnership Firms** | Any designated partner + --- + **Private/Public Limited Companies** | Director or Managing Director + --- + **Trusts/Societies** | Authorised trustee or office bearer + --- + **Any Organisation Type** | Individual legally authorised to sign PF documents + + + + +### 3. Employee Registration on EPFO + + When a new employee joins your organisation, you must either generate a UAN for that employee or map their existing UAN to your organisation. + + + + + + Video Tutorials + + Read the documentation below or watch the video tutorials on how to: + + + + +[Video: https://www.youtube.com/embed/iUgpmX5G-bk] + + + + +[Video: https://www.youtube.com/embed/YH_kHEfLwjs] + + + + + + + + To register employees for PF on the EPFO portal: + 1. Log in to the EPFO portal using your credentials. You can also retrieve your credentials from **Company Details** → **External Credentials** on the Payroll Dashboard. + 1. Enter the OTP sent to your registered mobile number to authenticate your log in. + 1. On the EPFO website, navigate to **Member** in the top menu. Click **REGISTER INDIVIDUAL** in the drop-down menu. + ![EPFO portal Payroll make PF payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pf-epfo-payments.jpg.md) + 1. On the **Member Registration** page and section: + - Select the **Yes** option for **Previous Employment/UAN** if the UAN if is already available for the employee. + - Select the **No** option to register the employee for PF. + 1. Provide the employee's identity details such as **Name** and **Date of Birth** as on Aadhaar, **Gender**, **Father/Husband's Name**, **Nationality**, **Religion**, **Marital Status** and more. + 2. Enter the **Date of Joining** and **Monthly EPF Wages as on Joining**. The monthly wages are as decided during [PF setup](#setup-pf). + + ![Payroll Register employee for PF New UAN](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pf-register-new-employee-UAN.jpg.md) + 1. In the KYC Details section, select the **Document Type** to verify employee details. Employee's Aadhaar is mandatory. + 1. Select the check boxes for the documents you choose to upload. + 1. Enter the **DOCUMENT NUMBER**. For Aadhaar, you must enter the employee's Aadhaar number. + 1. Enter the **Name as per Document**. + + ![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pf-register-new-UAN.jpg.md) + 1. Select the check box to affirm that you have the employee's consent to upload the above information. Click **Save**. + + This completes the registration process. Employee's details are now moved to the **Member details pending for approval section**. You can also edit or delete the registration as necessary. You must now approve the changes. + + 1. Navigate to **Member** in the top menu. Click **APPROVALS**. + 1. On the **Pending** page, review the details and click **Approve**. + + ![Approve changes on EPFO](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pf-register-UAN-approve.jpg.md) + + You have successfully registered your employees for PF via your organisation. Add the UAN on the employee's profile on the Payroll Dashboard. + + + + +## Manage PF Payments + + +### Calculate PF + + PF contributions on Payroll are calculated as 12% of **all fixed wages (except HRA)**. You can set a PF capping to see how the 12% calculation reflects as part of the basic salary. + + When enabled, Payroll will cap the fixed wages at ₹15,000. The maximum contribution calculated by Payroll will be 12% of ₹15,000, which is ₹1,800. This ₹1,800 will be deducted from the employee's salary and credited to their PF account. + + If you have not set a cap, the Payroll will calculate PF at 12% of basic salary, assuming it is above ₹15,000. + + + +### Additional Charges + + Employers’ contribution towards PF can be greater than 1%, depending on whether you choose to include and [allocate EDLI and admin charges](#setup-pf) in the employee’s CTC. + + The EPFO imposes a minimum of ₹500 as administration charges. If you have fewer than 7 employees, Payroll charges you this amount separately. + + + +### Delayed Payments + + Your organisation must make Provident Fund contribution payments on or before the 15th of the following month. For example, your January contribution to EPF must happen before February 15. + + If the PF payment is pending, EPFO sends notices with delayed amount payable under Damages (Section 14B) and Interest (Section 7Q). These delays occur due to the following reasons: + + + + Non-registration/Delayed registration of employees + + In some cases, new/existing employees' PF registration may be pending. Even though the salary is processed, the PF payment remains on hold due to incomplete PF/UAN information. Know more about [enabling compliances](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/quickstart.md#enable-compliances). + + To resolve this: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Go to **People** from the left menu → employee/s profiles → **Provident Fund, Professional Tax, ESI & LWF**. + + Check the status of your employee/s PF registration and ensure you complete it before the payroll execution date of the respective month. + + + +### Delayed Salary Execution + + Delayed salary processing can create delayed PF payments as the PF payment is made after the PF contribution due date (15th of the following month). For example, PF payment due for January 15 and is paid on January 20 creates delays in the PF payments. + + To resolve this: + 1. Log in to the [ EPFO portal](https://unifiedportal-emp.epfindia.gov.in/epfo/). + + 1. Navigate to to the **PAYMENTS** page from the drop-down menu on the portal. + 1. Click **Prepare 7Q-14B Challan** against **Damages and Interest** in the **ECR Quick Links** table and pay the delayed PF payments amount. + + + + + + +### PF Mismatch Error + + Due to recent changes in the EPFO portal, payroll finalisation will now be automatically skipped for employees where Employee and Employer PF contributions do not match exactly. + + The Employee PF contribution and Employer PF contribution must match **exactly to the rupee**. Even a ₹1 difference will cause the employee's payroll finalisation to be skipped. + + For example: + + + | Scenario | Employee PF | Employer PF | Match Status | Result | + --- + | **✅ Correct** | ₹1,800 | ₹1,800 | Matching | Payroll proceeds | + --- + | **❌ Incorrect** | ₹1,800 | ₹1,795 | ₹5 mismatch | Payroll skipped | + --- + | **❌ Incorrect** | ₹1,800 | ₹1,950 | ₹150 mismatch | Payroll skipped | + + + + +> **WARN** +> +> +> **Watch Out!** +> +> When comparing contributions, the Employer PF amount should exclude PF admin charges (0.5%) and EDLI charges (0.5%), which are paid separately by the employer. +> + + + If an employee is skipped due to PF mismatch, you can correct it by: + + **Step 1: Identify Affected Employees** + 1. Go to **Reports** → **Ledgers**. + 2. Select **Type: PF** and select the relevant month. + 3. Look for employees with **"Deferred"** status. + 4. Click on "PF - [Month] 2025" to open the employee's payslip. + + **Step 2: Check the Mismatch** + In the payslip's **Deduction** section: + - Note the **PF Employee Contribution** amount. + - Compare with **PF Employer Contribution**. + - These amounts should match. + + **Step 3: Update Employee Compensation** + 1. Go to **People** section. + 2. Search for the employee and open their profile. + 3. Navigate to **Compensation & Perquisites** → Click **Edit** → Click **Revise Compensation**. + + **Step 4: Correct Employer PF Contribution** + Update the Employer PF contribution to: + + + | Option | Condition | Set Employer PF Contribution to | + --- + | **Option A** | PF EDLI & Admin Charges are **NOT** part of CTC | Exact **Employee PF Contribution** amount from payslip | + --- + | **Option B** | PF EDLI & Admin Charges **ARE** part of CTC | **Employee PF Contribution + PF EDLI & Admin Charges** | + + + + +> **WARN** +> +> +> **Watch Out!** +> +> For Custom Salary Structures ensure: +> - Employer contribution matches the new validation requirements. +> - This correction is done for both current deferred payments and future months. +> +> + + + + + +### Make PF Payments on EPFO + + In August, due to 2FA implementation on Payroll, automated PF payments were paused. To make PF payments, you had to manually make payments on via EPFO. However, as of February 2025, Payroll has resumed making PF payments for employees automatically. + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you make the pending PF payments for August before **September 15, 2024**. +> + + Watch the video tutorial on how to make payments for all employees on the EPFO portal or read on. + + +[Video: https://www.youtube.com/embed/HF1qFDlOHu4] + + There are two steps to make PF payments on the EPFO portal: + + + + 1. Download PF ECR .txt File + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **Pay Employees** → **Run Payroll**. + 1. Click **Email ECR File**. + + This emails the PF ECR .txt file to your registered email address. You must now validate and verify this file on the EPFO portal. + + + +### 2. Upload, Validate & Verify ECR File on EPFO + + 1. Log in to the EPFO portal using your credentials. You can also retrieve your credentials from **Company Details** → **External Credentials** on the Payroll Dashboard. + 1. Enter the OTP sent to your registered mobile number and authenticate your login. + 1. On the EPFO portal, navigate to **Payments** tab in the top menu → **ECR/RETURN FILING** in the drop-down menu. + 1. Go to **ECR Quick Links** and click **ECR Upload**. + ![EPFO ECR file upload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pf-ecr-upload.jpg.md) + 1. On the **ECR Upload** page, enter the following: + 1. **Wage Month**. Select the payroll month, For example, August 2024. + 1. **Salary Disbursal Date**. + 1. **Select File**. Upload the .txt ECR downloaded from the Payroll Dashboard. + 1. **File Type**. Select **ECR**. + 1. **Contribution Rate %**. Select the number from the drop-down menu to indicate the percentage of employer's contribution. For example, 12%. + 1. **Remarks**. Specify the payroll month, or any other remarks. + + ![Update ECR details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pf-ecr-upload-details.jpg.md) + 1. Click **Upload**. + + This successfully submits your organisation's ECR file for validation. The processed ECR file now moves to **Draft ECR's**. + + 1. In the **Draft ECR's:** section, click the download icon in the **ECR Statement** column. + 1. Verify the ECR Statement. Click **Verify** in the **Action** column to proceed. + + ![Payroll PF ECR validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pf-ecr-validation.jpg.md) + + This successfully validates the ECR file. You can now prepare the PF challan to make the payment. + + 1. In the **In-Process ECR's** section, click **Prepare Challan** in the Action column. + ![EPFO click Prepare Challan](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pf-ecr-validate-stmt.jpg.md) + 1. The **Summary of Electronic Challan cum Return (ECR) page opens**. Here: + 1. Review the ECR details. + 1. Go to the **Employer details** section at the bottom of the challan. + 1. Enter the **Total number of Employees in the month**. These are the number of employees for whom ECR is generated. + 1. Provide the **Number of excluded employees** who are part of your organisation but are not present in the ECR file. + 1. Enter the **Gross wages of the Excluded employees**. If two employees were excluded, provide the sum of their wages. + 1. Click **Generate Challan** at the bottom of the page. + + ![Generate challan EPFO](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-pf-ecr-generate-challan.jpg.md) + + This successfully finalises the challan. Click **Pay** in the **Payment** column to make the PF payment. + + On the Challan Payment page: + 1. Select the bank from the drop-down menu to make the PF payment from. + 1. Click **Continue**. + 1. Log in to your banking account and complete the payment. + + + + + You have successfully made the PF payments for your employees. + + + +### Related Information + +[Statutory Compliance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md) diff --git a/llm-content/payroll/quickstart.md b/llm-content/payroll/quickstart.md new file mode 100644 index 00000000..f3cdfdfe --- /dev/null +++ b/llm-content/payroll/quickstart.md @@ -0,0 +1,169 @@ +--- +title: Quickstart Guide +description: Complete guide to get started with RazorpayX Payroll. +--- + +# Quickstart Guide + +After you sign up with [Payroll](https://payroll.razorpay.com/login), you can begin to set up your account and Dashboard. + +## Set Up Payroll Account + +The following guide provides a checklist of prerequisite steps and best practices to set up your organisation's payroll account and system. + +> **WARN** +> +> +> **Watch Out!** +> +> Automated Professional Tax (PT) payments for employees in Karnataka are temporarily unavailable on Payroll. Know more about the [PT rule change](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/faqs.md#professional-tax). +> + + +### Add All Employees + + You can add employees individually or in bulk on the Payroll Dashboard to set up the payroll recipients. + + To add employees: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **People**. + 1. Click **Add One** to add an individual employee, or **Add Multiple** to add multiple employees. You can also invite your employees using their email ids using **Invite many**. + ![Add employees on RazorpayX Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-add-emp.jpg.md) + 1. Enter the employees' information such as joining date, authorised email id, salary information and more. + 1. Click **CONTINUE**. + + You have successfully added employees/contractors to the Dashboard. Your employees can complete their [onboarding and profile set up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md#employee-onboarding) using the welcome mail they receive at their registered email id. + + +> **WARN** +> +> +> **Watch Out!** +> +> Sometimes your employees may not be added to your system due to operational discrepancies like [not receiving the welcome mail](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#welcome-mail). Re-trigger a welcome mail or invite them to your company and payroll system. +> + + + + +### Enable Compliances + + Update your organisation's compliance details as applicable. We support and automate many monthly [statutory compliance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md) payments. + + To enable compliances applicable: + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **Company Details** in the left menu. + 1. Click **Provident Fund / ESIC / Professional Tax / LWF** → **EDIT** and enable compliances from the respective drop-down menu as applicable. + 1. Click **CONTINUE** to save the changes. + + ![Changing compliance settings like PF and external credentials in Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payroll-enable-compliances.jpg.md) + + If you want us to handle your external compliances, connect your Payroll account to your compliance portals as applicable. + + 1. Go to **External Credentials** in **Company Details** → **EDIT**. + 1. Enter the user ids and passwords to authenticate your credentials. + 1. Click **CONTINUE** to save the changes. + + You have successfully enabled the applicable compliances. Know more about [compliance payments and automation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md). + + + +### Upload Company Logo + + You can upload your company logo to reflect on both the Dashboard and the payslips. Ensure you meet the following conditions for the logo: + + - Must be a PNG file. + - Must have a 5:1 aspect ratio or be rectangular shaped. + - Must have a transparent background. + + To upload the logo: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **Company Details** → **Name & Address** → **EDIT**. + 1. Upload the photograph and click **PREVIEW**. + + ![Upload Company Logo under Company Details in Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-upload-logo.jpg.md) + + + +### Setup Default Salary Structure + + See [default salary structure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md#setup-salary-structure) set up. + + + +### Check for Missing Information + + Before you [execute payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/execute-payroll.md), ensure you your employees' data is available and up-to-date. + + To check for missing information: + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Go to **ADMIN OPTIONS** → **Reports** → **Missing Information**. This opens the **Missing Information** page with a list of employees and their missing information. + 1. Select the checkboxes against the employees' names and click **SEND EMAILS**. You can also select all employees using the checkbox against **Employee Name**. + 1. Click **SEND EMAILS** to re-confirm. + + Your employee/s receive an email at their registered email address to update their missing information. + + ![Missing Information settings in Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-missing-info.jpg.md) + + + +### Confirm Salary Components + + You should re-check the salary components and net salary calculations. + + To re-check salary information: + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard) + 1. Navigate to **ADMIN OPTIONS** → **Reports**. + 1. Select **Salary Register** and select the relevant month. You can filter the information, download the payslips for that month and download the data as a .CSV file to process the data better. + + ![Salary Register in Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-check-salary-register.jpg.md) + + + +### Employee Tax Declarations + + You must ask your employees to update their tax deductions and declarations on the [Employee Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md). + + Employees must navigate to **Tax Deductions** on their Dashboard to update their tax details and minimise their deductible taxes. + + + +### Add RazorpayX Payroll as Beneficiary + + To enable fund transfers, you need to add your Payroll Account as a beneficiary. You can find your account details in the Payroll [Money Transfer page](https://payroll.razorpay.com/moneyTransfer). + + + +### Update UAN + + Update your employees' Universal Account Number (UAN) if applicable. + + To update UAN: + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **People**. + 1. Select the employee From the list of employees and open their profile. + 1. Update their PF details in **Provident Fund** → **Professional Tax & ESI**. + + + +### Enable Resignation + + You can enable employee resignations and allow employees to submit resignation requests. + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Go to **Settings** → **Employee Resignation Setup** → **EDIT**. + 1. Select the **Enable resignations feature** check box. + + +With all of the above done, your account is completely set up to process payroll. + +### Related Information + +- [Execute Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/execute-payroll.md) +- [Statutory Compliance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md) +- [Administrative Role](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md) +- [Salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md) diff --git a/llm-content/payroll/quickstart/custom-cycle.md b/llm-content/payroll/quickstart/custom-cycle.md new file mode 100644 index 00000000..f31cbefc --- /dev/null +++ b/llm-content/payroll/quickstart/custom-cycle.md @@ -0,0 +1,117 @@ +--- +title: Set up Custom Payroll & Attendance Cycles in RazorpayX Payroll | RazorpayX Payroll +heading: Custom Payroll & Attendance Cycle +description: Check how to set up and operate custom payroll & attendance cycles in RazorpayX Payroll. +--- + +# Custom Payroll & Attendance Cycle + +Every organisation uses an attendance cycle to record the employees' attendance data for a payroll month and pays salaries. In RazorpayX Payroll, you can set up a [payroll and attendance cycle](#meaning-of-payroll-and-attendance-cycle) of the same duration, or set up a custom payroll or attendance cycle. + + +### Meaning of Payroll and Attendance Cycle + + - **Payroll cycle**: + Refers to the duration between two payroll activities. It is the period for which employees' work is considered for compensation. + + In most organisations, payroll cycles follow the calendar month, that is, from the 1st of the month to the end of the month. + + - **Attendance cycle**: + This is the duration for which the organisation records the employees' attendance data for the payroll month. The payroll month is also the payroll cycle. + + Using an attendance cycle, organisations calculate the payroll for that employee in a specific month. + + +You can use an attendance cycle to freeze the employees' attendance for that month and finalise the payroll before [execution](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#execute-payroll). + +### How it Works + +1. Choose to make manual or automatic payments. +1. Set up/modify a payroll and attendance cycle. +1. Select the effective date from when the modified cycle/s are effective for the organisation. +1. Choose the payroll date for payroll execution. +1. Streamline automatic payroll payments using autopilot. + +### Video Tutorial + +Watch the video below to know how to create custom payroll and attendance cycles on the Payroll Dashboard or read along. + +[Video: https://www.youtube.com/embed/fevoeAtHRkI] + +## Set Up Payroll/Attendance Cycle + +To set up or modify the payroll/attendance cycle: +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **ADMIN OPTIONS** → **Settings** in the left menu. +1. Go to **Payroll Setup** → **EDIT**. This opens the **Payroll Setup** page. + +On the **Payroll Setup** page, you can modify the following settings: + +### 1. Automate Payroll Payments + +To allow RazorpayX Payroll to execute your monthly payroll: +1. Toggle the setting against **Let RazorpayX Payroll do the payments**. + ![Payroll set up payroll and attendance cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-custom-cycle-let-payments.jpg.md) +1. Navigate to **Payroll Date** section and select the payroll execution date from the drop-down menu. + ![Payroll enable payroll autopilot](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-custom-cycle-effective-date.jpg.md) + +This enables RazorpayX Payroll to pay salaries when you request execution on the **Run Payroll** page. If you deselect this setting, you must manually pay salaries to your employees. [Payroll autopilot](#set-up-payroll-autopilot) is also not available. + +Know more about [payroll execution](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/execute-payroll.md). + +### 2. Modify Payroll/Attendance Cycle + +To set up or modify the payroll/attendance cycle: +1. Go to the [**Payroll Setup** page](#set-up-payroll-attendance-cycle). +1. Review the current cycle per the calendar month in the **Payroll Cycle** section. + + To change the cycle, click on **+ Create custom cycle** tab and select the start date. We automatically add the end date with a 30-day gap. + + ![Payroll set up custom payroll and attendance cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-custom-cycle-setup.jpg.md) + +1. Toggle against the **Attendance Cycle** to follow the selected payroll cycle duration. Or you can set up a custom cycle. + + +> **WARN** +> +> +> **Watch Out!** +> +> You can either set up a custom payroll cycle OR a custom attendance cycle at once. +> - If you create a custom payroll cycle, the attendance cycle is the same as the payroll cycle. +> - Your payroll cycle must follow the calendar month to create a custom attendance cycle. +> + +1. [Choose the **Payroll Date**](#automate-payroll-payments) from the drop-down menu, if not already done. +1. Select the **New cycle effective month** from the drop-down menu. You can only select an [unfinalised payroll month](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#execute-payroll) for the updated payroll and attendance cycle to take effect. + + The Payroll Setup section on the **Payroll Settings** page shows the old cycle until the effective month. + + ![Payroll Setup Summary on RazorpayX Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-custom-cycle-sum.jpg.md) + +You have successfully set up/modified the payroll or attendance cycle. + +### 3. Set Up Payroll Autopilot + +You can allow Payroll to automatically make payments on the selected payroll date. On the **Payroll Setup** page: +1. Toggle the setting against **Payroll Autopilot**. This means that the Payroll automatically makes payroll payouts on the **Payroll Date**. + When disabled, you must manually [request execution](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/execute-payroll.md). + + ![Payroll enable payroll autopilot](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-custom-cycle-autopilot.jpg.md) +1. Click **Save Changes**. + +You have successfully changed the payroll and/or attendance cycle. + +### Cancel Upcoming Cycle + +When the upcoming effective cycle is no longer relevant for the organisation, you can cancel the upcoming cycle. + +1. Go to the [**Payroll Setup** page](#set-up-payroll-attendance-cycle). +1. Click **Cancel upcoming cycle** at the top of the page. + +This cancels the future effective cycle. + +### Related Information + +- [About Account Setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/quickstart.md) +- [About Execute Payroll Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/execute-payroll.md) diff --git a/llm-content/payroll/quickstart/custom-cycle/new-joiners-arrears.md b/llm-content/payroll/quickstart/custom-cycle/new-joiners-arrears.md new file mode 100644 index 00000000..4609684f --- /dev/null +++ b/llm-content/payroll/quickstart/custom-cycle/new-joiners-arrears.md @@ -0,0 +1,160 @@ +--- +title: Set up payroll cut-off date for new joinees and pay arrears | RazorpayX Payroll +heading: New Joiner's Arrears +description: Check how to set a cut-off date for new employees and pay new joiner arrears in RazorpayX Payroll. +--- + +# New Joiner's Arrears + +Most organisations freeze employees' payroll inputs by a specific day (say the 24th or 25th of the month) before finalising payroll. This creates a buffer period for the payroll teams to make changes to the monthly payroll. + +However, when new employees join the organisation during the buffer period, calculating payroll for the working days in a month becomes complex. In Payroll, you can set up a new joiner cut-off date and choose how to process the new joiner's salary. + + +### What is New Joiner's Cut-Off Date? + + In Payroll, the new joiner cut-off date determines whether Payroll should process a new employee's salary in the joining month or with arrears in the upcoming month. + + For example, if an employee joins the organisation on July 23rd, the new joiner cut-off date helps the payroll team process the employee's payroll either in July or August ([with arrears](#1-what-are-new-joiner-arrears)). + + +## How it Works + +1. Set up [payroll and attendance cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/quickstart/custom-cycle.md). +1. [Enable and select the new joiner cut-off](#set-up-new-joiner-cut-off-date) date for the organisation. +1. Basis the employee's date of joining (DOJ), Payroll either: + - Holds new employee's salary for the joining month and pays the prorated salary (including new joiner arrears) in the upcoming month. + - Pays the new joiner's salary in the joining/current month. + +## Set Up Cut-off Date + +To set up new joiner's cut-off date: +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **ADMIN OPTIONS** → **Settings** in the left menu. +1. Go to **Payroll Setup** → **EDIT**. This opens the **Payroll Setup** page. +1. Enable the toggle against **New Joiner Cut-Off**. +1. Select the cut-off date from the drop-down calendar. + ![Enable new joiner cut-off date Razorpay Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-newjoinee-cut-off.jpg.md) +1. Click **Save Changes**. + +This sets up the new joiner's cut-off date. Employees who join after the cut-off date receive their prorated salary in the upcoming month. + +## Edit Cut-off Date + +You can change the new joiner cut-off date to apply starting from a future month. To edit the cut-off date: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Follow the [steps to set up the new joiner cut-off date](#set-up-new-joiner-cut-off-date). +1. Select the **New cycle effective month** from the drop-down calendar. This ensures that the change applies starting the selected effective month. +1. Click **Save Changes**. + +You have successfully changed the cut-off date. + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot change the new joiner cut-off date if you have an upcoming effective [payroll and attendance cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/quickstart/custom-cycle.md). [Cancel the upcoming cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/quickstart/custom-cycle.md#cancel-upcoming-cycle) and then make changes to the new joiner cut-off date, payroll and attendance cycles. +> + +### Payroll Impact + +When an employee joins after the new joiner cut-off date, Payroll processes the employee's salary in the upcoming month. For example, an employee that joined your organisation in July after the cut-off date receives the prorated salary (including arrears) in the August payroll. + +> **INFO** +> +> +> **Handy Tips** +> +> You can make gross-pay changes like deductions, bonuses, or salary revision to the new joiner's payroll. [Finalise payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#execute-payroll) for the employee's joining month to view the prorated salary for the upcoming month. +> + +Know how we process payroll for the joining and upcoming months below. + + +### For the Joining Month + + - New joiner's payroll for the joining month is **On-Hold**. When you finalise payroll, the **Run Payroll** list for the joining/current month displays the following: + + ![Razorpay Payroll new joiner's salary held](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-newjoiner-arrears-finalise.jpg.md) + + - In the joining month, you can deduct [LOP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#loss-of-pay) days and salary revision for new employees. However, we process them only in the upcoming month. + + + +### For the Upcoming Month + + The new joiner's payroll for the upcoming month includes the current month's salary prorated with the [new joiner's arrears](#1-what-are-new-joiner-arrears) for the previous month. When you finalise payroll for the upcoming month, the **Run Payroll** list adds the arrears under the **Additions** column. + + In the **Addition details** pop-up modal, you can view the details of the additions added. + + ![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-newjoiner-arrears-next-month.jpg.md) + + +## Frequently Asked Questions (FAQs) + + +### 1. What are new joiner arrears? + + When an employee joins your organisation after the [new joiner's cut-off date](#set-up-new-joiner-cut-off-date), we process the employee's payroll in the upcoming month. We do not pay the new joiner for their working days in the joining month. + + Payroll prorates the salary to include the unpaid days as arrears in the upcoming month. These are referred to as new joiner's arrears. + + + +### 2. I am unable to finalise payroll for the upcoming month. How to resolve this? + + You cannot [finalise payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#execute-payroll) for the upcoming month because you have not finalised the new joiner's payroll for the previous month. + + Finalise payroll for the new employee's joining month. Then, finalise the payroll for the upcoming month to pay the arrears and the salary. + + + +### 3. I have paid a joining bonus to my employee. When will the employee receive it? + + If the employee has joined your organisation after the cut-off date, we pay the bonus in the upcoming month. + + For example, if your employee joins your organisation in January after the cut-off date, they receive their bonus payout in February along with the prorated salary. + + + +### 4. I cannot find the settings to set up a new joiner cut-off date for my organisation. What should I do to enable it? + + If you cannot find the new joiner cut-off date settings, you are using [Jibble](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/jibble.md) to manage employee's attendance, loss of pay and more. + + In such cases, you cannot set up a new joiner's cut-off date for your organisation. + + + +### 5. How do I add Reverse LOP for my newly joined employees? + + You cannot add [reverse LOP arrears](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#how-to-pay-lop-reversal-arrears) to a new employee's payroll. + + To reverse the LOP deductions, [make changes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#execute-payroll) to the employee's payroll for their joining month. + + + +### 6. Why cannot I update the additions/deductions in the bulk upload template? + + Your new employees' names appear in the downloadable template for bulk updating additions/deductions for their joining month. However, you cannot edit those fields as we hold their salary during that month. + + We do not support gross pay additions and deductions, except loss of pay for leaves. + + + +### 7. How can I revise my new employee's salary before paying the arrears? + + You must [make changes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#execute-payroll) to your finalised payroll in the previous month to revise salary for a new employee. + + + +### 8. How do I make changes/unfinalise payroll? + + Refer to the [Execute Payroll section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#execute-payroll) to know how to make changes to the monthly payroll. + + + +### 9. Is there any penalty for PF/ESI arrears due to skipping New Joiners' salaries? + + No, there are no penalties. diff --git a/llm-content/payroll/razorpayx-powered-current-account.md b/llm-content/payroll/razorpayx-powered-current-account.md new file mode 100644 index 00000000..026bbe1f --- /dev/null +++ b/llm-content/payroll/razorpayx-powered-current-account.md @@ -0,0 +1,71 @@ +--- +title: RazorpayX-powered Current Account Linked to Payroll +description: Understand the differences and advantages of linking a RazorpayX-powered Current Account to Payroll. +--- + +# RazorpayX-powered Current Account Linked to Payroll + +RazorpayX Payroll supports two ways to process your monthly payroll: +- Via Payroll Wallet +- Via RazorpayX-powered Current Account + +![](/docs/assets/images/current-account-x.jpg) + +## What's the Difference? + +This section highlights the key differences in features, benefits, and applications of each offering, enabling you to make an informed decision tailored to your circumstances. + +**Feature** | **RazorpayX Payroll via Wallet** | **RazorpayX Payroll via Linked-Current Account** +--- +**Core Payroll Features: Salary calculations, disbursals, Compliance payments & Filings** | ✓ | ✓ +--- +**Full Stack Contractor Payments & Filing: Part-time employee & Vendor Payments** | - Only Part-time Employee payments are supported +- NO automated 26Q filing + | - Part-time Employee Payments +- Vendor Payments +- Auto 26Q Filing + +--- +**Frictionless money movement** | - Manual fund loading every month + | - No manual fund loading(as payments are directly triggered via Current Account) +- Faster Salary Disbursals + +--- +**Exclusive features** | - | Access exclusive features like:- Bank Account Verification of all your Employees. +- Ensure salary is getting credited to the right Employee + +--- +**Access to RazorpayX Business Banking+ Platform** | ✗ | - Get access to our Business Banking+ dashboard for all your other Payouts like Refunds, Cashbacks, Incentives, Loans, Claims, Winnings, etc. +- Get access to APIs, Bulk, and Single Payouts + +## Opening a RazorpayX-powered Current Account + +Our comprehensive service eliminates the need for in-person office visits. We provide end-to-end assistance, including online application processing and convenient verification at your location through our dedicated Relationship Manager. + +### Partner Banks + +We currently have tech integrations with: +- RBL Bank +- Yes Bank +- IDFC First Bank +- Axis Bank + + +### Open a RazorpayX-powered Current Account + + Streamline your payroll operations with a dedicated business banking solution. Use [RazorpayX-powered Current Account.](https://razorpay.com/docs/x/account-types/current-account/) + + + +### Integrate Your RazorpayX-powered Current Account with Payroll + + Integrate your payroll system with a powerful business banking solution. Use [RazorpayX Payroll and Current Account integration.](https://razorpay.com/docs/payroll/integrations/current-account) + + +> **WARN** +> +> +> **Watch Out!** +> +> You can seamlessly upgrade from Payroll Wallet to Current Account at any time with zero operational disruption. Our team will provide full support throughout the transition process. +> diff --git a/llm-content/payroll/reimbursements.md b/llm-content/payroll/reimbursements.md new file mode 100644 index 00000000..b0ccfa14 --- /dev/null +++ b/llm-content/payroll/reimbursements.md @@ -0,0 +1,85 @@ +--- +title: Pay Reimbursements to employees on RazorpayX Payroll +heading: Reimbursements +description: Understand the reimbursement workflow. Pay your employees immediately or during monthly payroll. +--- + +# Reimbursements + +Your employees may incur expenses on your organisation's behalf. You can pay reimbursements from the Payroll Dashboard. You can also categorise the expense claims as per standard reimbursement categories. + +## Reimbursements + +An employee can [apply for reimbursement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/reimbursements.md) from their Dashboard whenever they pay for organisational expenses from their own pockets. + +Once the admin/manager of the employee approves the reimbursement request, you can reimburse the expense in two ways: + +- **With payroll**: Payroll automatically includes all approved reimbursements that are pending for payment whenever payroll is executed. +- **Adhoc-basis**: You can choose to pay approved reimbursements at any time, independent of payroll execution. + +To set this up: +1. Log in to your Payroll Dashboard. +1. Navigate to **Settings** → **Reimbursements Setup**. +1. Choose between Payroll and Adhoc modes. + +### View Pending Reimbursements + +To view any pending flexible benefits reimbursements: +1. Log in to the Payroll Dashboard. +1. Navigate to **Reports** → **Reimbursements**. +2. Go to **Pending Flexible Benefits Requests**. + +You can also find pending reimbursements to approve or evaluate in the right pane under **Reimbursements**. Once reimbursement is approved, Payroll automatically updates the tax calculation for future payrolls. + +### Pay Reimbursements + + To pay the reimbursement: + 1. Log in to the Payroll Dashboard. + 1. Navigate to **Pay Employees** → **Reimbursements**. + 2. Check the **Pending Payments** section. + 3. Select the employees that you would like to reimburse by selecting the checkbox and trigger the payout by clicking **PAY NOW**. + 4. Enter the OTP you receive at your registered email address/authenticator app and authorise the reimbursement. + + +### Approve Reimbursements + + For administrators and managers to approve instant reimbursement requests: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 2. Navigate to **Reimbursements** or check the dashboard for pending reimbursement notifications. + 3. Click on **Pending Approvals** to see all pending reimbursement requests. + 4. Review the list of employees with pending reimbursements. + 5. Click on a specific request to view details, including: + - Employee ID and name + - Reimbursement type + - Expense date + - Reason/description + - Amount requested + - Attached supporting documents + 6. After reviewing the details and supporting documents, click **Approve** to process the instant reimbursement. + 7. For instant reimbursement categories, the amount will be immediately processed and transferred to the employee's account, without waiting for the monthly payroll cycle. + + + +### Reject Reimbursement Requests + + If a reimbursement request does not meet company policy or lacks proper documentation: + 1. Review the reimbursement request details. + 2. Click **Reject** instead of **Approve.** + 3. The employee will be notified that their reimbursement request was rejected. + + + +### Monitor Reimbursement Status + + Both administrators and employees can track reimbursement status: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 2. Navigate to **Reimbursements** → **View Past Requests.** + 3. This displays all reimbursement requests with their current status (for example; Pending, Approved, Rejected). + 4. Administrators can also access the **Reimbursements Report** for a detailed analysis of all past reimbursements. + + +### Related Information + +- [Salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md) +- [Instant Reimbursement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/instant-reimbursement.md) +- [Reimbursements for Employees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md#reimbursements) diff --git a/llm-content/payroll/resignation.md b/llm-content/payroll/resignation.md new file mode 100644 index 00000000..c0380d05 --- /dev/null +++ b/llm-content/payroll/resignation.md @@ -0,0 +1,137 @@ +--- +title: Enable and manage resignations in RazorpayX Payroll +heading: Resgination Setup +description: Set up and handle resignations on the Payroll Dashboard. +--- + +# Resgination Setup + +On the Payroll Dashboard, you can dismiss employees at the end of their tenure at your organisation, or allow them to resign. After receiving a resignation request, you can process the [Full and final settlement](#process-fnf) and successfully dismiss the employee. + +> **INFO** +> +> +> **Handy Tips** +> +> Both the administrator and the employee's manager can approve resignations. +> + +## Enable Resignation + +To allow employees to resign, you must enable it. + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Go to **Settings** → **Employee Resignation Setup** → **EDIT**. + ![Scroll to Enable Resignation set up. Click EDIT on RazorpayX Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-enable-resignation.jpg.md) +1. Select the **Enable resignations feature** check box. + +This enables resignation submission for employees. + +## Pending Requests + +After an employee submits their resignation, you can view the request and take action on it. + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Click either of the following. The Resignation reports page opens. + + + + 1. Navigate to ADMIN OPTIONS → Reports. + 1. Click **Resignations**. + ![Resignation report in Settings on the Razorpay Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-resignation-report.jpg.md) + + + In the reminders tab, click **resignations**. + ![Resignation reminders on the RazorpayX Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-resignations-reminders.jpg.md) + + +1. View the resignation requests pending your review. Select the employee and click **REVIEW RESIGNATION**. You can only review one request at a time. +1. In the Update Resignation Request pop-up modal, you can: + - Change the employee's **Last Working Day**. + - Provide **Remarks** on the resignation request. +1. Click **UPDATE** to make changes to the employee's resignation. Then, click **APPROVE**. + ![Approve or Reject resignations on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-resignation-modal-approve-reject.jpg.md) + +This successfully approves the employee's resignation. +- To reject the request, click **REJECT**. +- Click View Resignation History on the right pane to view older requests. + - You can filter the older requests using the **Resignation Status** and duration. + - Click DOWNLOAD CSV to download the resignation data. + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot undo an approved resignation request. +> + +## Process Full & Final Settlement + +Once you approve the resignation request, you can process the employee's full and final settlement. + +1. On the Resignations report page, select the employee to process the FnF for. Click **PROCESS FNF SETTLEMENT**. This opens the **Full and final settlement** page. +1. On the Full and final settlement page: + 1. Provide the leave encashment details. You can either enter the number of leaves to encash or the total leave encashment amount. + 1. Enter any additions or deductions to the employee's salary. You can also enter the [Loss of Pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#loss-of-pay) days, or the [Jibble Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/jibble.md) to sync the LOP data automatically. + + ![Payroll Dashboard make additions deductions FNF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-fnf-additions-deductions.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure you do not include loan recovery, bonus clawback, gratuity payments and other salary components or deductions here. +> + + 1. Select whether the deductions happen from the employee's gross or net pay. + + +### What is the difference between Gross Pay and Net Pay? + + + + Gross pay is the total amount an employee earns before any relevant deductions, including taxes, benefits, bonuses, reimbursements, and more. This also includes the basic, ad hoc and the allowance components of an employee's salary. + + Examples of gross pay deductions include loss of pay, bonus recovery after clawback, and more, depending on the employee's performance. Gross pay deductions are mandatory and affect compliance payments (TDS, PF). + + + Net pay is the employee's take-home salary after all applicable deductions such as benefits, taxes, and compliances. Net pay = Gross pay - TDS - PF - PT - ad hoc deductions. + + Examples of net pay deductions include laptop repair recovery charges, penalties, insurance payments and more. + + + + + + 1. Enter the employee's personal email address for further communication. + + If Payroll had been handling the employee's [Form 16s](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md#employee-s-form-16), the employee receives it on their personal email address at the end of the financial year. + 1. Click **Add to Payment**. + +You have successfully modified the full and final settlement for the employee. The employee receives the settlement payment after you [execute payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#execute-payroll) for the month. + +### Maintain Employee Directory + +After dismissing employees, you can choose to: +- **DELETE EMPLOYEE** from the employee directory. +- **DISABLE LOGIN** for the employee during the notice period, if necessary. + +The above options are available on the employee's **User Profile**. + +## Reports + +You can access the following reports: + +Report Name | Description +--- +Resignation | View the resignation requests initiated and approved so far. +--- +Full and final settlement | View the details of full and final settlements processed month-wise. You can refresh the data and download it in a CSV file. + +### Related Information + +- [Dismiss Employees on the Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#terminate-and-run-last-payroll) +- [About Full and Final Settlement](https://razorpay.com/payroll/learn/full-and-final-settlement-fnf/) diff --git a/llm-content/payroll/run-payroll.md b/llm-content/payroll/run-payroll.md new file mode 100644 index 00000000..37c7f3ab --- /dev/null +++ b/llm-content/payroll/run-payroll.md @@ -0,0 +1,468 @@ +--- +title: Run Payroll Settings in RazorpayX Payroll +heading: Run Payroll +description: Execute payroll and pay advance salary to your employees in RazorpayX Payroll. +--- + +# Run Payroll + +After you have finalised the salary components, you can finally execute your payroll. Ensure you refer to the [payroll checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/execute-payroll.md) before doing so. + +> **WARN** +> +> +> **Watch Out!** +> +> Automated Professional Tax (PT) payments for employees in Karnataka are temporarily unavailable on Payroll. Know more about the [PT rule change](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/faqs.md#professional-tax). +> + +> **SUCCESS** +> +> +> **Union Budget Updates** +> +> Payroll has revised the salary computation as per the changes introduced in the Union Budget of July 2024. +> +> - **Old tax regime**: No changes to the tax slabs, surcharge, cess, rebate and standard deduction. +> - **New tax Regime**: In the new tax regime, the following changes are applicable: +> +> - Standard Deduction of ₹50,000 has increased to ₹75,000. +> - NPS contribution (10% of Basic + DA) has increased to 14%. +> - Income slabs have changed for people earning between 3 lakhs and 12 lakhs as follows. +> +> +> +> Revised Income Tax Slabs +> +> +> Previous Income Slabs | New Income Slabs | Tax Rate +> --- +> Upto 3,00,000 | Upto 3,00,000 | Nil +> --- +> 3,00,001-6,00,000 | 3,00,001-7,00,000 | 5% +> --- +> 6,00,001-9,00,000 | 7,00,001-10,00,000 | 10% +> --- +> 9,00,001-12,00,000 | 10,00,001-12,00,000 | 15% +> --- +> 12,00,001-15,00,000 | 12,00,001-15,00,000 | 20% +> --- +> Above 15,00,000 | Above 15,00,000 | 30% +> +> +> +> +> + +Given below are the various salary options and features available under **Run Payroll** in your Payroll Dashboard. + +## Execute Payroll + +> **WARN** +> +> +> **Watch Out!** +> +> Execute payroll before the [Payroll due dates](/payroll/execute-payroll/#5-check-due-dates) as applicable to your organisation. This enables Payroll to make timely compliance payments. +> + +To execute payroll: +1. Log in to the Payroll Dashboard. +1. Check the following: + - Make the additions and deductions as necessary. + - Skip salary or stop salary for the applicable employees. + - Ask your employees to declare their investments before the payroll execution date. + - Fulfil other components from the [execute payroll checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/execute-payroll.md). +1. Click **FINALIZE PAYROLL** to imply that you are satisfied with the current payroll details. + - If required, you can still make changes to your payroll by clicking on **MAKE CHANGES**. + - If your payroll looks good, you can click on **REQUEST EXECUTION**. +1. Enter the OTP you receive at your registered email address/authenticator app and authorise the execution request. + +You have successfully executed payroll. You cannot make [payroll modifications](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/exceptional-cases.md#modify-salary-after-payroll-is-executed) after you execute payroll. + +### Stop Salary + +If you wish to stop the salary for an existing payroll member, you have the following options to do so: + + + 1. Log in to the Payroll Dashboard. + 1. Navigate to **People** and select the employee's profile. + 2. Click **Compensation & Perquisites** → **EDIT** the annual Salary. + 3. Set the annual salary to 0. + + ![Set annual salary to 0 under Compensation & Perquisites.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-stop-salary.jpg.md) + + + 1. Log in to the Payroll Dashboard. + 1. Navigate to **People** and select the employee's profile. + 2. Scroll down to **Stop Salary**. + + ![Stop Salary option highlighted in the employee's profile in Payroll.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-stop-salary-2.jpg.md) + + + +On the other hand, if you wish to only pause an employee's salary for a particular month, you can [skip payroll for that month](#skip-salary). + +### Skip Salary + +You can skip employees' salaries on the Payroll Dashboard: +- [Individually](#individual-skip-salary) +- [In Bulk](#bulk-skip-salary) + +Filter the employees by their departments or locations and select them to skip their salary using the check box. You need not manually skip employees one-by-one with this add-on. + +#### Individual Skip Salary + +To individually skip or pause payroll: + +1. Log in to the Payroll Dashboard. +1. Navigate to **ADMIN OPTIONS** → **Pay Employees** → **Run Payroll**. +2. If required, select the month you want to skip the employee's salary. +3. Search the employee's name and click on the **Edit** icon on the right-most column. + ![Edit icon against employee details field](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-edit-employee.jpg.md) +4. Select **SKIP THIS** to skip the employee's salary for that month. + +![Skip Salary for employee in Payroll highlighted in Edit Salary.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-skip-salary.jpg.md) + +#### Bulk Skip Salary + +To skip salary in bulk: + +1. Log in to the Payroll Dashboard. +1. Go to **ADMIN OPTIONS** → **Pay Employees** → **Run Payroll**. +1. On the **Payroll Summary** page, click the check box above the employee's list view. You can search and filter the employees via Location or Department. + ![Bulk skip salary selection on Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-bulk-skip.jpg.md) +1. Select the employees you want to skip salary for. +1. Click **SKIP SELECTED** to skip the salaries. + +> **INFO** +> +> +> **Handy Tips** +> +> - With the Gross Pay status like `skipped`, the **SKIP SELECTED** button shows multiple salary actions like **Resume Selected**, **Skip All Except Selected** and more. +> - If the payroll is already finalised, click on **Make Changes** and update that month's salary disbursals. +> + +### Resume Skipped Salary + +To pay the same employee's salary later: + +1. Log in to the Payroll Dashboard. +1. Navigate back to **Run Payroll**. +2. Select the payroll month and the employee's profile whose salary you have skipped. +3. Click **EDIT**, and click **Resume Pay**. +4. Finalise the payroll again. + +If you want to exclude an employee from all future payroll processes, indefinitely or until chosen manually, you can [stop salary](#stop-salary). + +### Execute Payroll for One Employee + +Your employee is availing their salary earlier than usual, or is exiting the company and the final settlement needs to be done immediately. In such cases, you can run payroll for just that employee. To do so: + +1. Log in to the Payroll Dashboard. +1. Navigate to **Run Payroll**, and select the payroll month if required. +2. Search the employee for whom you want to execute payroll and click on the **Edit** icon in the last column. +3. Click **SKIP ALL EXCEPT THIS**. This will pause all the other employees' salaries for that month. + +![Edit Salary window where Skip All Except This is highlighted.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-skip-all-salary-except-this.jpg.md) + +Now you can finalise your payroll and request execution. + +### Resume Other Employees' Skipped Salaries + +Remember to resume the salaries for the rest of the employees. To do so: + +1. Log in to the Payroll Dashboard. +1. Navigate to **Run Payroll**, and select the payroll month if required. +2. Click any of the skipped employees' profiles (from step 2 to [execute payroll for one employee](#execute-payroll-for-one-employee)) and then on the **Edit** icon. +3. Click **Resume all skipped**. + +### Revise Salary + +You can set an employee-level salary revision with an effective date on the Payroll Dashboard: +- [Individually](#individual-revision) +- [In bulk](#bulk-revision) + +Know how Payroll treats [salary revision arrears](#how-to-pay-salary-revision-arrears). + +#### Individual Revision + +To revise employees' salary with an effective date individually: + +1. Log in to the Payroll Dashboard. +1. Navigate to **People** → Employee name. +1. Go to **EDIT** against **Compensation & Perquisites**. +1. Click **REVISE COMPENSATION**. + ![Revise Salary for employee](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-revise-salary.jpg.md) +1. On the **Revise compensation** page, modify the following as applicable: + 1. CTC in case of default salary structure adopted by Payroll. Or you can select [custom salary structure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md#setup-salary-structure) as applicable to your organisation. + 1. Add Voluntary Provident Fund. + 1. Perquisites. + 1. Deductible benefits. + ![Modify salary components to revise salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-revise-salary-comp.jpg.md) + 1. In the **Add Salary effective date** section, click **Add salary effective date** to customise the date for the salary changes to reflect in the employee's payslip. This is optional. + ![Add salary effective date](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-add-salary-eff-date.jpg.md) +1. Click **NEXT** to verify the arrears and finalise the revised salary. +1. Click **CONFIRM**. + +You have successfully revised an employee's salary. + +#### Bulk Revision + +To revise salaries for multiple employees, you can bulk upload revisions with the respective effective dates. + +1. Log in to the Payroll Dashboard. +1. Navigate to **People** → Employee name. +1. Go to **Compensation & Perquisites** → **EDIT**. +1. Click **Bulk Salary Revision**. + ![Revise Salary for employee](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-revise-salary.jpg.md) + +The **Salary revision & arrear calculation** page opens. +1. Select the salary effective date applicable for all employees. +1. Download the Salary Revision Sheet. +1. Enter the revised salary details against the relevant employee's names. + - Delete the employee rows for whom salary revisions are not applicable. + - Enter the revised CTC amount in the template in the Default Structure sheet. + - In the Custom Structure sheet, enter the revised CTC breakdown for each employee under [Custom Salary Structure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md#setup-salary-structure). +1. Save the file and upload the template. +1. Click **Continue**. +1. Preview the changes and confirm the revised salary and arrears. Download the arrear report to view the caclulations. +1. Click **Proceed to Confirm**. + +You have successfully revised salary in bulk for multiple employees. + +After revision, all the arrears are auto-applied for the particular employee. To check that: +1. Go to **Pay Employees** → **Run Payroll**. +1. On the **Payroll Summary** page, click the **Edit** icon against the employee's name. +1. Check the **Arrears** drop-down. You can further edit the arrears amount. + +#### Resolve Errors + +In case of errors in the upload file, the system provides an error report that you can download, fix and reupload. + +1. Click **Get error report**. +1. In the downloaded file, fix the errors highlighted in the errors column. +1. Click **Replace file** to reupload the fixed error file. + +### Terminate and Run Last Payroll + +You can terminate employees on the Payroll Dashboard and process their [full and final settlement (FnF)](https://razorpay.com/payroll/learn/full-and-final-settlement-fnf/). This enables you to offboard employees from your organisation and Payroll. + +To terminate/dismiss an employee: + +1. Log in to the Payroll Dashboard. +1. Navigate to **People** and click on the particular employee's profile. +1. Click **DISMISS EMPLOYEE** at the bottom of the page. This opens the **Initiate exit process** page. + ![Dismiss Employee on RazorpayX Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-dismiss-employee.jpg.md) +1. Select the **Last working date** (LWD) from the drop-down calendar and provide a reason for dismissal. If you have enabled the [resignation module](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/resignation.md), we automatically add the LWD once the employee submits their resignation. + +This initiates the full and final settlement process for the employee. Know how to [process employee's FNF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/resignation.md). + +You have successfully dismissed the employee from the organisation. View the employee's payslip to verify the payroll calculation before [executing payroll](#execute-payroll). + +### Pay Employee Level Arrears + +You can pay employees' arrears on the Payroll Dashboard. Manually calculate and add component-wise arrears to employee salaries, including allowances and deductible benefits. + +To add arrears to employee's salaries: +1. Log in to the Payroll Dashboard. +1. Go to **ADMIN OPTIONS** → **Pay Employees** → **Run Payroll**. +1. Click the **Edit** icon against the employee's profile you want to add arrears. + ![Edit icon against employee details field](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-edit-employee.jpg.md) +1. In the **Edit Salary** page, click to the **Arrears** section. +1. Enter the arrears amounts against the respective salary components. You can also reverse LOP deductions. + + ![RazorpayX Payroll manage employee arrears](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-employee-arrears.jpg.md) + + +### How to pay Salary Revision Arrears? + + You need not manually pay any salary revision arrears. After you [revise salary](#revise-salary) effective from a past date, we automatically calculate and display the arrears payable. + + ![RazorpayX Payroll pay salary revision arrears](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-salary-revision-arrears.jpg.md) + + We add and process the salary revision arrears automatically in the upcoming payroll cycle. + + + +1. Click **DONE** after finalising the component-wise arrears. + +You have successfully added component-wise arrears to your employee's salaries. +- To check the arrears in future, refer to the **Salary Register**. +- The arrears reflect on the payslip as additions. Click **Gross Pay** in the **Payroll Summary** page to view the updated payslip. + ![Check Gross Pay after adding arrears](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-check-gross-pay-after-arrears.jpg.md) +- TDS on arrears is deducted in the same month as arrears are added. + +> **WARN** +> +> +> **Watch Out!** +> +> You can only pay salary component arrears via the Payroll Dashboard. Do not pay compliance arrears using this feature. +> + +## Attendance-based Salary Calcuation + +You have three ways with which you can calculate [loss of pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/leaves.md#loss-of-pay-for-unpaid-excessive-leave-work) for Unpaid/Excessive Leave Work. Know how you can make salary deductions for the same below. + +### Additions and Deductions + +Payroll supports adding incentives, bonuses and other components to the monthly payroll activity. You can also make deductions in the employee's payroll. + +The additions and the deductions reflect in the employee's payslip and are taxable as applicable. + +![Making additions and deductions in Edit Salary window of employee's profile.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-edit-salary-additions-deductions.jpg.md) + +#### Additions +To add incentives and others to your employees' payroll, you must: + +1. Navigate to **Run Payroll** → **Select employee**. +2. Click the **EDIT** icon under the last, right-most column. + ![Against the employee name, click edit in the right-most column.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-edit-emp-additions.jpg.md) +3. Add the amounts under **Additions** and click **DONE**. +4. Click **Gross Pay** after you add a bonus to view the new payslip instantly. + +#### Deductions +To make deductions from your employee's payroll, you must: + +1. Navigate back to **Run Payroll** and select the employee. +2. Click the **EDIT** icon under the right-most column against the employee's name. +3. Navigate to **Deductions** enter the amount for **Recovery** or the [Loss of Pay](#loss-of-pay) Days. + +> **INFO** +> +> +> **Handy Tips** +> +> If the edit icon looks uneditable and says **Final**, click **Make Changes** on the right menu to make the column editable again. Know more about [making changes to payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/exceptional-cases.md#modify-salary-after-payroll-is-executed). +> + +### Loss of Pay +Payroll does not automatically deduct the loss of pay based on attendance. By default, attendance is considered `present` for all calendar days of the month in Payroll. Know more about [attendance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/attendance.md). + +Following are some ways to deduct salary for the Loss of Pay days: +- **Standard recovery of an amount**: Enter the total amount directly after calculating the total amount to be deducted from the employee's salary. +- **Loss of Pay days**: Enter the number of days to prorate the value automatically. +- **Jibble Integration**: Sync the loss of pay data from the Jibble Dashboard to automatically calculate and deduct loss of pay amount. Know more about the [Jibble attendance integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/integrations/jibble.md). + +To [pay Loss of Pay arrears](#how-to-pay-lop-reversal-arrears), follow the steps mentioned in **Run Payroll**. + +#### Calculations + +Loss of Pay is usually calculated on the total number of days in the month and not on the total working days of the month. + + +### Default Salary Structure + + Consider the following example where LOP days added is 2 in Payroll's default salary structure. LOP days are prorated on the gross salary of the employee. + + It is calculated on the basis of either: + + + Consider the following conditions to calculate LOP: + - Attendance is calculated on all working days in the month. + - All Sundays are off days. + - There is no other holiday in the month. + + In such a case, LOP is calculated as: + + (`Actual Monthly Salary` x `Total Days Worked`) / `Total Working Days` + + Where: + - Total working days in the month excludes 4 Sundays. + - Total Days Worked = Total Working Days (excluding week-offs/Sundays) - Employee Working Days (excluding week-offs/Sundays) + + Actual Gross Salary x 25 / 27 gives the Gross salary post LOP deductions. + + + If you configure to calculate attendance based on total number of days of the month, LOP is calculated as: + + (`Actual Monthly Salary` x `Total Days Worked`) / `Total Number of Days in Month` + + Where: + - Total working days in the month includes 4 Sundays. + - Total Days Worked = Total Working Days (including week-offs/Sundays) - Employee Working Days (including week-offs/Sundays) + + Actual Gross Salary x 29 / 31 gives the Gross salary post LOP deductions. + + + + + +### Custom Salary Structure + + If you use a custom salary structure, we do not prorate the employee/s LOP deduction based on the gross salary. All the salary components, except compliance payments, are prorated separately based on your organisation's [attendance setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/faqs.md#xpayroll-s-loss-of-pay-calculation-is-not) to arrive at the LOP deduction amount. + + Consider the following example where: + - LOP applicable = 1 day + - Total number of days in the month of March = 31 days + - Employee's working days = (31 - 1) = 30 + + LOP is calculated as follows: + + + Salary Components | Actual Salary | Salary post LOP + --- + Basic Pay | 1,16,667 | 1,12,904 + --- + HRA | 58,333 | 56,451 + --- + Special Allowances | 1,53,283 | 1,48,338 + --- + EPF Contribution | 1,800 | 1,800 + --- + Medical Allowance | 1,250 | 1,210 + --- + Conveyance Allowance | 2,000 | 1,935 + --- + **Gross Pay** | **3,33,333** | **3,22,683** + + + +### Bulk Upload + +You can change the additions, deductions and loss of pay for all your employees in bulk on the Payroll Dashboard. + +To navigate to the bulk upload feature: +1. Log in to the Payroll Dashboard. +1. Go to **ADMIN OPTIONS** → **Pay Employees** → **Run Payroll**. +1. On the **Run Payroll** page, click the **Edit** icon against any employee. + ![Edit icon against employee details field](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-edit-employee.jpg.md) + The **Edit Salary** pop-up page opens. +1. Click **Bulk Upload**. + ![Bulk upload attendance modification at the page bottom](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payroll-bulk-add-dedt-lop-option.jpg.md) +1. The **Bulk Additions/Deductions/Loss of Pay** page appears. + ![Bulk additions/deductions/Loss of Pay page on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-bulk-add-dedt-lop-page.jpg.md) + +On the **Bulk Additions/Deductions/Loss of Pay** page: + +1. Select the month for which you want to make the attendance-based salary modifications. +1. Click **Download Now**. The `.xlsx` template containing the employee details for the month is generated. Skipped employees' details are not downloaded. +1. Follow the on-screen instructions to finalise the template. + - Delete the rows for employees with unmodified salary details. + - Add new rows for each employee having any combination of additions/deductions/loss of pay. + + ![Payroll employee file download template with details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-bulk-add-dedt-lop-template-view.jpg.md) +1. Upload the updated `.xlsx` file. You can click **Replace File** to upload a different file. +1. Preview the file uploaded. When satisfied with the changes, click **Confirm** → **Proceed**. + +You have successfully uploaded the template with the attendance-based salary modifications. + +#### Resolve Template Errors + +When you upload an incorrect file, you see: +- The **Processing failed** message on the **Bulk Additions/Deductions/Loss of Pay** page. +- Total number of errors in the file. +- Option to download the Error Report. + +To resolve errors during template upload: +1. Click **Get error report**. +1. Make the required changes in the error file. +1. Reupload the error file to validate the corrections. + +### Related Information + +- [Salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md) +- [One-time Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/one-time-payments.md) +- [Reimbursements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/reimbursements.md) diff --git a/llm-content/payroll/run-payroll/fnf.md b/llm-content/payroll/run-payroll/fnf.md new file mode 100644 index 00000000..057faf3b --- /dev/null +++ b/llm-content/payroll/run-payroll/fnf.md @@ -0,0 +1,166 @@ +--- +title: Hold Salary Pay Compliance During Full and Final Settlement for Employees on RazorpayX Payroll +heading: FnF Hold Salary Pay Compliance +description: Hold employee salary for individual employees and continue compliance payments when processing full and final settlement on the RazorpayX Payroll Dashboard. +--- + +# FnF Hold Salary Pay Compliance + +You can terminate employees on the Dashboard and process their [full and final settlement (FnF)](https://razorpay.com/payroll/learn/full-and-final-settlement-fnf/). This enables you to offboard employees from your organisation and Payroll. Know more about [employee dismissal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/resignation.md#process-full-final-settlement). + +When dismissing employees, you can hold employees' salaries to recover employee overhead costs while also continuing to make compliance payments on Payroll. + +#### How Hold Salary Pay Compliance Works + +In some cases, you may need to withhold the employee's salary for the duration of their notice period to recover any losses incurred by the employee during their tenure of employment. However, you must continue to make the [compliance payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md). + +In such cases, you can enable the hold salary setting for that employee to withhold salary and continue to make compliance payments. + +**Example**: + +Your organisation has a 2-month notice period wherein you also withhold the employee's salary. This means: + +If Last Working Date (LWD) | Notice period starts from | Months Salary is Withheld +--- +March 31, 2024 | Jan 31, 2024 | 2 (February and March) + +On Payroll, you can dismiss employees and hold their salaries while continuing to make compliance payments. You can also manage the net pay and edit the final settlement payable. + +## Video Tutorial + +Watch the video below to know how to dismiss employees, hold their salary and settle net pay, or read along. + +[Video: https://www.youtube.com/embed/bDZSXFRgWTU] + +## Dismiss Employee + +To dismiss an employee: + +1. Log in to the Payroll Dashboard. +1. Navigate to **People** → particular employee's profile. +1. Click **DISMISS EMPLOYEE** at the bottom of the page. + +This initiates the employee's full and final settlement process and redirects you to the **Initiate exit process** page. + +### Hold Salary + +To hold the employee's salary: +1. Select the **Last working date** (LWD) from the calendar and provide a reason for dismissal. If you have enabled the [resignation module](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/resignation.md), we automatically add the LWD. + + +> **WARN** +> +> +> **Watch Out!** +> +> You can finalise the LWD only if you have not finalised the payroll for that month. +> + +1. In the **Salary during resignation months** section, select **Hold net pay till the last working month**. You can then select the start month for withholding salary from the **Hold net pay starting from** drop-down menu. + + ![Hold salary pay compliance during FnF on RazorpayX Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-hspc-dismiss-employee.jpg.md) + + You can select **Release Salary** to process the final settlement as per the regular [employee dismissal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/resignation.md#process-full-final-settlement) process. +1. Click **Dismiss Employee**. Click **Dismiss** in the modal to confirm employee dismissal. + +You have successfully dismissed the employee. To prorate salary calculations including the additions, loss of pay and deductions based on the LWD, follow the steps to go to the [settlement/Net Pay](#settlement) page. + +Once you hold salary for an employee, you notice an **Net pay on hold** label against the employee/s names on the payroll during payroll execution. Employees cannot avail payslips via their Dashboard/WhatsApp/email for the on-hold months. + +![RazorpayX Payroll Hold Salary Pay Compliance netpay on hold](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-hspc-netpay-onhold.jpg.md) + +### Settlement + +After you dismiss an employee, you can open their settlement details on the right pane on the employee's profile. On this settlement page, you can modify the Loss of Pay, additions and deductions details. + +To make adjustments to the settlement amount: + +1. Log in to the Payroll Dashboard. +1. Navigate to **ADMIN OPTIONS** → **People** and navigate to the particular employee's profile. +1. On the top-right pane, click **here** to open the resettlement page. + ![RazorpayX Payroll dismiss employee details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-hspc-dismissal.jpg.md) +1. This opens the **Full and final settlement** page for the employee. Enter the adjustments as per the usual [employee dismissal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/resignation.md#process-full-final-settlement) process. + + + +### What adjustments are available? + + You can make the following adjustments on the Full and final settlement page: + - Enter either the **Leave Encashment amount**, or the number of leaves to encash. + - **Additions (excluding gratuity)**. + - **Loss of pay deductions**. + - **Deductions (excluding salary advance)**. + - **Personal Email Address**. + + ![Payroll Dashboard make additions deductions FNF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-fnf-additions-deductions.jpg.md) + + + + +1. Click **Add to Payment**. + +You have successfully added the adjustments to the employee's net pay. +- You can preview the updated payslips for the employee on the **Full and final settlement** page. +- You can continue to make resettlements until you release net pay for the employees. + +## Release Net Pay + +After you fulfil the requirement for withholding employees' salary, you can adjust the total amount payable to the employee. This final amount payable is the employee's net pay. + +To release net pay: + +1. Navigate to **ADMIN OPTIONS** → **Pay Employees** → **Release Net Pay**. + ![RazorpayX Payroll release net pay for dismissed employees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-hspc-release-netpay.jpg.md) +1. Select the employee/s to view the net pay breakup in the right pane. + + To make any changes to the employees' additions/deductions, LOP or personal email id, you can either hover on the employee's details and click **Manage FNF**, or click **Manage FNF Settlement →** in the right pane. +1. Click **Release Full & final Settlement**. Ensure you have adequate balance in your account. +1. Enter the OTP you receive at your registered email address/authenticator app and authorise the net pay release. + +You have successfully released the net pay for the employee/s. + +## FAQs + + +### 1. I am unable to view the dismissal or net pay information of some of my dismissed employees. Why? + + You may not be able to view the dismissal or net pay information of some of your dismissed employees as the payroll for the employee's last working month is not finalised. + + [Finalise Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#execute-payroll) in **Run Payroll** for the dismissed employee's net pay information to reflect on the RazorpayX Dashboard. + + Suppose your employee's LWD is 15th May. In that case, finalise the payroll for the month of May for the employee's dismissal information to appear on the **Release Net Pay** page. + + + +### 2. Does Payroll immediately transfer the net pay after I choose 'Release Salary' when initiating FNF? + + No, choosing **Release Salary** does not immediately release the employee's net pay. Instead, Payroll processes the employee's [Full and final settlement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/resignation.md#process-full-final-settlement) as part of the monthly payroll activity. + + + +### 3. How can I add the previously skipped salaries of employees to their net pay? + + You need not manually add the skipped/withheld salaries. The employees' [net pay](#release-net-pay) automatically includes the previously withheld salaries. + + + +### 4. What are the supported payment modes to process employee's FNF? + + We support both NEFT and IMPS payment modes to process employee's full and final settlement. However, we recommend you choose NEFT as your default payment mode. Know more about [payroll payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md#make-payroll-payouts). + + + +### 5. Will PF/ESIC/TDS be paid within the respective months? + + Yes, we make the compliance payments (except PF payments) within the respective months for dismissed employees. + + + +### 6. How do we make additions/deductions such as Loss of Pay to an employee's net pay? + + You can adjust the employee's gross and net pay when processing the employee's full and final settlement. Refer to the steps in [Settlement](#settlement). + + +### Related Information + +- [Terminate Employee and Run Last Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/resignation.md#process-full-final-settlement) diff --git a/llm-content/payroll/run-payroll/fnf/bulk.md b/llm-content/payroll/run-payroll/fnf/bulk.md new file mode 100644 index 00000000..ed213514 --- /dev/null +++ b/llm-content/payroll/run-payroll/fnf/bulk.md @@ -0,0 +1,124 @@ +--- +title: Bulk Dimiss Employees on RazorpayX Payroll Dashboard and Hold Salary Pay Compliance During Full and Final Settlement +heading: Bulk Dismiss Employees +description: Dismiss employees in bulk on the RazorpayX Payroll Dashboard. +--- + +# Bulk Dismiss Employees + +On the Payroll Dashboard, you can dismiss multiple employees at once using the bulk dismissal and settlement feature. With this feature, you can also: +- Process [full and final settlements (FnF)](https://razorpay.com/payroll/learn/full-and-final-settlement-fnf/). +- [Hold Salary and Pay Compliance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll/fnf.md). + +Know more about [employee dismissal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#terminate-and-run-last-payroll). + +## How it Works + +1. Download the initiation template from the Payroll Dashboard. +1. Add employee details for dismissal and upload the sheet. +1. Download and update the settlement sheet. Upload the sheet again to process settlement. + +### Video Tutorial + +Watch the video below to know how to initiate employee dismissal in bulk and process bulk final settlement. + +[Video: https://www.youtube.com/embed/yMfosbhNnAU] + +## Bulk Dismissal + +To dismiss employees in bulk: + +1. Log in to the Payroll Dashboard. +1. Navigate to **ADMIN OPTIONS** → **People** and click **Bulk Full & final Initiation**. + ![RazorpayX Payroll Bulk FNF initiate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-bulk-fnf-people.jpg.md) +1. On the **Bulk Full & final Initiation** page: + 1. Download the template. + + + +### How to fill the template correctly? + + - Follow the instructions in the template to fill the sheet. + - Ensure the employees for whom you are initiating FnF in bulk are not the orgnaisation's [administrators](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/user-roles-workflows.md#view-collaborators). + - You can start [holding salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll/fnf.md) from a month where the payroll is not yet finalised. + - Ensure you upload the file in the `.xlsx` format. + + + + 1. Upload the updated sheet for us to validate it for any errors. Know how to [resolve the template errors](#resolve-errors). You can click **Replace file** to update the current sheet. + 1. Click **Upload & Preview**. + ![Payroll Create Bulk FnF ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-bulk-fnf-initiation.jpg.md) +1. Review the employee details validated as shown on the page. This includes information such as the number of employees, employees' whose [net pay is on hold](#hold-salary), dismissal details and more. +1. Click **Confirm** to proceed with the bulk dismissal process. + +You have successfully initiated the bulk dismissal process for multiple employees. The employee dismissal reflects on the specific employees profiles immediately. + +## Bulk Settlement + +Bulk settlement happens after you initiate the bulk dismissal. You can update the details or salary adjustments of the dismissed employees. You must dismiss employees to process bulk FnF settlements. + +To process bulk FnF settlements: +1. Log in to the Payroll Dashboard. +1. Navigate to **ADMIN OPTIONS** → **People** and click **Bulk Full & Final Settlement**. + ![RazorpayX Payroll Bulk FNF initiate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-bulk-fnf-people.jpg.md) +1. On the **Bulk Full & Final Settlement** page: + + 1. Click **Download Now** to download the settlement sheet from the Dashboard. The downloaded sheet contains employee information as uploaded in the [bulk initiation](#bulk-dismissal) step. + + + +### How to fill the template correctly? + + - To not make salary adjustments for specific employees, delete their rows from the pre-filled sheet. Deleting these rows does not cancel dismissal. + - In the **No. of Days** column in the template, enter the number of days for Leave encashment/LOP. We automatically calculate the amount. + - Leave the cells empty if some salary adjustments for an employee are not applicable. Do not enter '-' or 'NA' and more. + - If you select Leave encashment amount, do not enter the number of days in **No. of Days** column in the template. + - Provide labels for additions/deductions that do not have the leave encashment/LOP labels. Labels reflects on the payslip and denote the reason for salary adjustment. + - Ensure you upload the file in the `.xlsx` format. + + + + 1. Upload the updated sheet for us to validate it for errors. Know how to [resolve the template errors](#resolve-errors). + 1. Click **Upload & Preview**. + ![Payroll settle bulk FnF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-bulk-fnf-settlement.jpg.md) +1. On the **Preview** page, you can view the dismissed employees' salary adjustments. You can also use the filters above the table to understand the settlement action required for specific employees. +1. Verify the employees' details and click **Proceed To Confirm**. +1. Click **Confirm**. + +You have successfully confirmed the bulk settlement details. + +## Resolve Errors + +In some cases when the template upload process fails, you can download the error report, fix the errors in the report and reupload the corrected file. + +1. When you run into errors on the Bulk initiation/Bulk settlement page, click **Get error report**. +1. In the downloaded report, make changes to the fields with errors. +1. Click **Replace File** to re-upload the file on the Dashboard. + ![Payroll Bulk FnF Resolve errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-bulk-fnf-error.jpg.md) + +## FAQs + + +### 1. I want to hold the salary of a single employee. Is it possible? + + Yes, you can withhold the salary of an individual employee. Refer to [Hold Salary, Pay Compliance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll/fnf.md). + + + +### 2. Can we manually select employees when initiating Bulk FNF? + + Yes, you can manually select the employees. Enter the employee names in the [Bulk Dismissal initiation template file](#bulk-dismissal). + + + +### 3. What are the supported payment modes to process an employee's FNF? + + We support NEFT and IMPS to process the employee's full and final settlement. However, we recommend using NEFT as the default payment mode. Know more about [payroll payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/payroll-payouts.md#make-payroll-payouts). + + + + +### Related Information + +- [About Employee Dismissal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#terminate-and-run-last-payroll) +- [About Salary Additions/Deductions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#attendance-based-salary-calcuation) diff --git a/llm-content/payroll/run-payroll/rlop.md b/llm-content/payroll/run-payroll/rlop.md new file mode 100644 index 00000000..af2b0de0 --- /dev/null +++ b/llm-content/payroll/run-payroll/rlop.md @@ -0,0 +1,57 @@ +--- +title: Reverse Loss of Pay (RLOP) previously deducted on the Payroll Dashboard +heading: Reverse Loss of Pay (RLOP) +description: Reverse the previously deducted Loss of Pay (LOP) for employees. +--- + +# Reverse Loss of Pay (RLOP) + +In some cases, your employees may report incorrect loss of pay (LOP) deductions for the previous six months in their payslips. This creates Reverse LOP (RLOP) arrears, which you must pay. + +To pay the RLOP arrears, you can reverse the LOP deductions for such employees. Ensure you finalise the payroll for the previous months to add RLOP. + +## Add RLOP Arrears + +To add RLOP arrears: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **ADMIN OPTIONS** → **Pay Employees** → **Run Payroll**. +1. Click the **Edit** icon against the employee's name. + ![Edit Employee Run Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-run-payroll-rlop.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> If you are unable to view the edit icon, click **Make Changes** in the right pane. +> + +1. Click **Add Reverse LOP**. + ![RazorpayX Payroll add RLOP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-rlop-add.jpg.md) +1. On the **Add Reverse LOP** pop-up window: + 1. Click **+ For another month**. + 1. Select the month from the drop-down menu for which you are reversing the LOP deductions. + 1. Add the number of **Loss of pay days**. We automatically verify and compute the arrears amount. + + Ensure the number of LOP days you enter in the text box is less than the LOP days availed by the employee. + + ![Razorpay Payroll add RLOP days](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-rlop-add-days.jpg.md) + + You can also click **+ For another month** to reverse LOP for more than one month. +1. Click **Next** to view the revised salary and the breakdown. +1. Click **ADD RLOP ARREARS** to confirm the amounts. + +You have successfully reversed LOP to the employee/s. Until you execute payroll, you can edit the RLOP days. To edit RLOP, click **Manage RLOP Arrears**. + +![Manage RLOP on RazorpayX Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-rlop-manage.jpg.md) + +## Pay RLOP Arrears + +After you add the RLOP arrears, execute the monthly payroll. This reverses the LOP deductions and pays the RLOP arrears. + +### Related Information + +- [Loss of Pay Calculations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#loss-of-pay) +- [Leaves & LOP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/leaves.md#loss-of-pay-for-unpaid-excessive-leave-work) diff --git a/llm-content/payroll/salary.md b/llm-content/payroll/salary.md new file mode 100644 index 00000000..1f2b2f43 --- /dev/null +++ b/llm-content/payroll/salary.md @@ -0,0 +1,112 @@ +--- +title: Explore Salary payout and settings available in RazorpayX Payroll +heading: Salary Setup +description: Explore all the salary features in RazorpayX Payroll. Optimise your salary structure and enable Form 16s. +--- + +# Salary Setup + +On Payroll, you can automate paying your employees accurately and effortlessly. All payments are made directly to the employees' bank accounts and are systematically recorded in the [Salary Register](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/quickstart.md#confirm-salary-components). + +## Payroll Salary Actions + +With Payroll, salary disbursals are timely, precise and efficient. It can pay your employees in the folllowing ways: +- Execute monthly payroll using [Run Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md). +- Make [one-time payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/one-time-payments.md), as necessary. +- Approve and pay [Reimbursements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/reimbursements.md). +- Approve and pay Advance Salary. +- Create [bonuses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/bonus.md) and add clawbacks. +- Grant [employee loans](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/loans.md) at the time of need. +- Provide [flexible benefits](#avail-flexible-benefits) to employees. + +All of these options are available in the **Pay Employees** drop-down menu on your Payroll Dashboard. + +![Pay Employees drop-down higlighting: Run Payroll, One-time Payments, Advance Salary and Reimbursements.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-salary-pay-emp-tab.jpg.md) + +## Setup Salary Structure + +To pay salaries to your employees, you must first set up your salary structure for your organisation and configure flexible benefits for your employees. Know more about setting up a [default salary structure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/quickstart.md#setup-default-salary-structure). + +### Custom Salary Structure + +> **WARN** +> +> +> **Watch Out!** +> +> We do not recommend setting up a custom salary structure due to the following reasons: +> - Most organisations do this to reduce the tax liability of their employees. Payroll, by default, creates an automatically optimised salary structure for this. +> - Previously applicable allowances like conveyance and medical allowances are [no longer relevant](https://razorpay.com/payroll/learn/income-tax-allowances-salaried-individuals-india/#Standard-Deduction-Replacing-conveyance-and-medical-allowance) and do not offer any tax advantages. +> - If PF and ESI apply to an employee, you must enter the required amount. Doing so can avoid errors in the salary structuring when it is prorated (as per the month of joining/exiting the organisation). +> +> We recommend setting up custom salary structures only when you offer [flexible benefits](#flexi-benefits-in-custom-salary-structure) to your employees. +> +> + +You have the option to change the default salary structure that Payroll has assigned to your company and employees at the time of setting up your account. + +### Organisation Level Custom Salary Structure + +You can change the salary strcuture for your organisation at large. To change the salary structure: +1. Log in to your [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **Admin Options** → **Settings**. +1. Go to **Payroll Setup** → **Default Salary Structure** and click **EDIT**. + ![EDIT otpion highlighted against the Default Salary Structure option.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-edit-deflt-sal-structure.jpg.md) +2. Uncheck the option to **Use XPayroll's default salary structure** and define your salary structure. + ![Checked default salary structure checkbox in Payroll. Uncheck it to disable](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-change-default-salary-structure.jpg.md) + +This structure will automatically apply to your current and new employees if they are not using an [employee-customised salary structure](#employee-level-custom-salary-structure), as explained below. + +### Employee Level Custom Salary Structure + +You can set a salary structure for specific employees. This change applies if your employee is availing a joining bonus or other payroll services like advance salary. + +To set a salary structure for an employee: +1. Log in to your [Payroll Dashboard](https://payroll.razorpay.com/dashboard) +1. Navigate to the **People** tab on the left menu. +1. Click the employee's name. +1. Navigate to **Compensation & Perquisites** → **EDIT** and edit the employee's salary structure. + +![Changing salary strcuture in Compensation and Perquisites.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-changing-employee-salary-structure.jpg.md) + +Here you can review the salary figure and change the employees' annual salary, any advance salary due, perquisites, and others. + +If you wish to customise the salary structure for more than one employee, select the checkbox next to **Create a custom salary structure**, and then put in the various amounts under different heads. + +### Avail Flexible Benefits + +Employee benefits, fringe benefits, or flexible benefits are special allowances given to employees that help save expenses and taxes. + +It allows employees to choose the benefits they want to avail themselves, and they avail it in addition to their standard wages. + +For example, you may give your employees an **Internet Allowance**, which your employees can use to set up a high-speed broadband connection while working from home. + +By making this a flexible benefit, your employees can upload proof of the expense incurred by them and effectively make that part of the allowance tax-free. + +### Set Up Flexi Benefits + +To use flexible benefits, you must set up a [custom salary structure](#flexi-benefits-in-custom-salary-structure) for your employees and choose **flexi** under the **Taxable column**. + +![ Taxable column showing Yes/No/Flexi in Payroll.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-taxable-column.jpg.md) + +Your employees can upload proof of expenses by going to **Reimbursements** → **Reimburse Flexible Benefits**. After they have uploaded their proofs, you can view the [pending reimbursements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/reimbursements.md#view-pending-reimbursements). + +> **WARN** +> +> +> **Watch Out!** +> +> Payroll **does not validate** the proofs uploaded for flexible benefits. Your organisation must verify the documents internally. +> + +### Flexi Benefits in Custom Salary Structure + +You can set the **taxable column** as yes/no/flexi. **Flexi** stands for [flexible benefits](#avail-flexible-benefits), and implies that allowances are taxable by default. + +But the employees can upload any proof of expenses and make some part of their salary partially or fully tax-exempt. + +### Related Information + +- [Reimbursements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/reimbursements.md) +- [Attendance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/attendance.md) +- [Conveyance Allowance](https://razorpay.com/payroll/learn/conveyance-allowance/) diff --git a/llm-content/payroll/statutory-compliance.md b/llm-content/payroll/statutory-compliance.md new file mode 100644 index 00000000..caa1e2c6 --- /dev/null +++ b/llm-content/payroll/statutory-compliance.md @@ -0,0 +1,230 @@ +--- +title: Manage Statutory Compliance in RazorpayX Payroll +heading: About Statutory Compliance +description: Understand the compliance setup and deduction process from employee's payroll in Payroll. +--- + +# About Statutory Compliance + +Statutory compliance regulations are government mandated legal arrangements that a company and its employees adhere to. Every organisation that pays salaries to the people it has employed is bound by these laws. + +> **WARN** +> +> +> **Watch Out!** +> +> Automated Professional Tax (PT) payments for employees in Karnataka are temporarily unavailable on Payroll. Know more about the [PT rule change](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/faqs.md#professional-tax). +> + +On Payroll, you can automate registering your employees for compliances and payments (except [Provident Fund (PF)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/faqs.md#pf-payments)). We do not handle registrations for organisations. Talk to [these CA partners](#initiate-initial-registration-for-organisations) to start the initial registration. + + +### Compliance Payments Features that Payroll Handles + + Payroll helps you automate all the operational parts of compliances. With Payroll, you get access to: + - [PF UAN registration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/provident-fund.md), register management, monthly payments and filings. + - [ESI IP registration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/esi.md), register management, monthly payments and filings. + - [TDS payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tds.md) and Quarterly filings (24Q). + - One-Time [Tax Documentation Verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tax-deductions-setup.md) in January along with TDS Payments and Quarterly Filings (24Q). + - [Form 16](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md#employee-s-form-16) generation at the end of the year. + - [26Q filings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tds.md#file-tds-return), if enabled, and all contractors payments made via the platform. + + + +### Compliance Payments that Payroll DOES NOT Handle + + RazorpayX Payroll does not offer the following: + + - Company registrations for compliances like PF, PT, ESIC. + - Bulk registration requests of any kind. + - LWF payments and filings. + - Salary Structuring or HR services. + - PF transfers, withdrawal management, and so on. + - Assistance with ESI claims. + - TDS correction filing. + - Representation services of any kind. + - Nil filing entries. + + + +### Initiate Initial Registration for Organisations + + Payroll automates the payments and the filings. We **do not** help with the initial company registration. + + However, few CA partners who use Payroll to manage their clients on our platform can help you register your organisation for compliances. Their contact details are provided below: + + + CA firm Name | Website + --- + Startup-Movers | [startup-movers.com](https://www.startup-movers.com/) + --- + TaxMantra | [taxmantra.com](https://taxmantra.com/) + --- + QED Corporation | [qedcorp.co.in](http://qedcorp.co.in/) + --- + StartersCFO | [starterscfo.com](https://starterscfo.com/) + --- + Jain Ambavat & associates | [mumbaica.com](http://mumbaica.com/) + --- + + + You can add your CA partner as a [Contractor](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/quickstart.md#add-all-employees) who has [special access](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#special-access-and-permissions) to your Payroll account. + + Your partners then receive a [welcome email](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#welcome-mail-from-xpayroll) and will be able to login and access relevant sections of the platform as you choose. + + +## Prerequisites + +To ensure timely compliance payments, ensure you update all the required credentials under +**Company Details** ➔ **External Credentials** [during account set up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/quickstart.md). Ensure you have updated your credentials post TIN implementation. + +## Compliance Payments + +Payroll automates the following compliance payments: + + +### Tax Deducted at Source (TDS) + + Tax Deducted at Source, or simply TDS, is deducted from salary and one-time payments as applicable. Know more about [filing TDS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tds.md) with RazorpayX Payroll. + + + +### Provident Fund (PF) + + Payroll handles all the monthly payments, filings, and employee registration after the initial registration is complete. However, it does not offer initial registration for [Provident Fund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/provident-fund.md). + + + +### Employees State Insurance (ESI) + + Employees State Insurance (ESI) is a government-mandated health insurance for employees. We handle the register management, monthly payments and filings. Know more about [ESI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/esi.md). + + + +### Professional Tax (PT) + + Payroll only handles the tax payments and filing monthly returns, and does not handle the initial registration. Individual state governments have website portals to manage Professional Tax (PT) and you have to register accordingly. + + Know how to set up and handle [Professional Tax in Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/professional-tax.md). + + + +### Labour Welfare Fund (LWF) + + Labour Welfare Fund (LWF) is a statutory welfare fund. Many organisations mandatorily contribute to LWF across 16 states (Andhra Pradesh, Chandigarh, Chhattisgarh, Delhi, Goa, Gujarat, Haryana, Karnataka, Kerala, Madhya Pradesh, Maharashtra, Odisha, Punjab, Tamil Nadu, Telangana, West Bengal) in India. + + It provides socio-economic benefits such as housing, nutrition, healthcare benefits and more for certain eligible workers. + + On the Payroll Dashboard, you can set up LWF at an organisation or employee level. + + + + Organisation Level Configuration + + To enable LWF for all employees: + 1. Log in to the Payroll Dashboard. + 1. Navigate to **ADMIN OPTIONS** → **Company Details**. + 1. Click **Edit** against **Provident Fund / ESIC / Professional Tax / LWF**. + ![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-lwf-org-enable.jpg.md) + 1. Go to the **LWF Status** section and select **Enable** from the drop-down menu. + ![Razorpay Payroll enable LWF for org](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-lwf-enable.jpg.md) + 1. Click **Continue**. + + This successfully enables LWF for your organisation. You can also choose to include employer's LWF contribution in the employee when setting up/modifying employee's CTC. + + 1. On the Payroll Dashboard, navigate to **ADMIN OPTIONS** → **Settings**. + 1. Click **Edit** against **Payroll and Compliance Setup**. + 1. In the **LWF Settings** section, select the **Include employer contribution to LWF in employee CTC** check box. + ![Select check box to include employer contribution on Razorpay Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-lwf-employer-contri.jpg.md) + 1. Click **Continue**. + + This successfully makes employer's LWF contribution a part of the employee's CTC. Ensure you set up [employee's salary structure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md#setup-salary-structure) accordingly. + + + +### Employee Level Configuration + + You can configure employee-level LWF settings as well. + + 1. Log in to the Payroll Dashboard. + 1. Navigate to **People** in the left menu and go to the particular employee's profile. + 1. Go to **Provident Fund, Professional Tax, ESI, LWF & NPS** and click **Edit**. + ![Razorpay Payroll employee compliance LWF Edit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-lwf-employee-enable.jpg.md) + 1. Go to the **LWF Settings** section and select the following from the drop-down menu: + 1. **LWF Status** as **Enabled/Disabled**. + 1. **LWF Location** as **Use Company Default** or the specific state. + + ![Razorpay Payroll LWF Employee enable](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-lwf-employee-enable-location.jpg.md) + 1. Click **Continue**. + + This successfully saves your employee-level LWF settings. + + + + + + +### Payment Due Dates + +Following is the list of due dates by when you must make the compliance payments. Ensure you execute payroll before the [Payroll due dates](/payroll/execute-payroll/#5-check-due-dates). + +Compliance Payment | Due Date +--- +TDS* | 7th of the following month +--- +PF | 15th of the following month +--- +ESI | 7th of the following month +--- +PT** | 15th - 31st of the following month + +* For March specifically, the due date is April 30 of the following month. + +** **For PT Payments**: +- Automated Professional Tax (PT) payments for employees in Karnataka are [temporarily unavailable](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/faqs.md#professional-tax). +- For Professional Tax payments, due dates depend on the respective Indian state's due dates for PT. Some states require annual/half-yearly/quarterly filing. We defer PT payments until the due date in such cases. + +> **INFO** +> +> +> **Handy Tips** +> +> - All the compliance payments are made before 15th of the following month (15th or 20th in case of Professional Tax). +> - You can find the TDS challans under **Reports** → **TDS**. +> - For PF, ESI, and PT, navigate to **Reports** → **Provident Fund, ESI & Professional Tax**. +> - We display all compliance payments individually for all employees and contractors. Payroll does not file nil returns. +> + +### For Contractor Payments + +For Contractor Payments, the due date is 7th of the following month based on whether the invoice or the contractor payment was earlier. For example, if you make a contractor payment for an invoice dated January 10, we make the TDS payment by February 7. + +If invoice date is missing, we calculate the TDS payment date using the contractor payment date. + +## Check Compliance Payments + +After every payroll execution, check whether Payroll has made a deduction for any compliance. To check this: + +1. Log in to your Payroll Dashboard. +1. Navigate to **Reports** → **Ledger**. +1. Check the **Status** column in the ledger report. + - If the status is **Success**, then the payment has already been made. + - If the status is **Pending**, then the payment is yet to happen. + +In the Ledger Report section, Payroll displays all compliance payments individually for all employees and contractors. If there are no entries here, it means that Payroll has not made any such deductions. + +> **WARN** +> +> +> **Watch Out!** +> +> Payroll sometimes makes the payment before the due date. +> + +### Related Information + +- [ESI: Full form, Registration Process, and Eligibility](https://razorpay.com/payroll/learn/esi-full-form-registration/) +- [Enable Compliance during Account Setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#welcome-mail-from-xpayroll) +- [Provident Fund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/provident-fund.md) +- [TDS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tds.md) +- [ESI Meaning, Eligibility and Registration](https://razorpay.com/payroll/learn/esi-full-form-registration/) diff --git a/llm-content/payroll/tax-deductions-setup.md b/llm-content/payroll/tax-deductions-setup.md new file mode 100644 index 00000000..8f3cc14b --- /dev/null +++ b/llm-content/payroll/tax-deductions-setup.md @@ -0,0 +1,157 @@ +--- +title: Set up an Income Tax declaration window in RazorpayX Payroll | RazorpayX Payroll +heading: Tax Deductions Setup +description: Check how to set up and operate declaration and proof upload windows for RazorpayX Payroll. +--- + +# Tax Deductions Setup + +[Income tax declarations and proof submission](https://razorpay.com/payroll/investment-proof-submission/) is a critical payroll activity. Employees declare the investments they have planned for the year and towards the end of the financial year, organisations collect proofs of the declarations and adjust the amounts on which the tax is calculated and deducted. + +With Tax Deductions Setup on the Payroll Dashboard, you can set up: + + + Setup verification settings for your organisation. Explore the [tax verification process](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tax-verifications.md). + + + + Set up declaration windows for your organisation. + + + + Set up a proof upload window for employees in your organisation. + + + + Set up a custom window for specific employees in your organisation. + + + +### Meaning of Windows + + Declaration and Proof Upload windows refer to a duration where employees can perform declaration or proof upload activites on the Dashboard. + + It also creates a buffer period for your payroll team to finalise the monthly payroll and tax deductions. + + +## How it Works + +To set up tax deductions for your organisation: + +1. Enable tax deductions. +1. Define the tax verifications settings under General Settings. +1. Set up Declaration and Proof Upload windows. +1. Create custom windows as necessary. + +## Enable & Set Up + +To set up the IT Declaration windows: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **ADMIN OPTIONS** → **Settings**. +1. Go to the **Tax Deductions Setup** section. Click **Edit**. This opens the **General** settings page of **Tax Declaration & Proof Upload Settings**. +1. Toggle the setting against **Allow employees to update their tax deductions**. We usually enable this by default. + ![RazorpayX Payroll enable Tax Declaration for employees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-tax-declaration-general.jpg.md) + +You have now enabled your employees to declare investment proofs. If you turn this setting off, you cannot modify the declaration and window settings. + +## General Settings + +After you [enable the declaration settings](#enable-set-up), you can further modify the following: + +#### Verification Settings + +You can modify the following verification settings on the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + + +### Opt for Verification + + You can verify the investment proofs your employees submit in two ways. From the drop-down menu, you can select either: + - **Let XPayroll Verify** to allow Payroll to verify your proofs. + - **Let Organisation Verify** to carry out the [verification by yourself](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tax-verifications.md). + + + +### Select Financial Year + + You can select the financial year for which employees can declare and upload their investment proofs. This is useful to update employees' past/mid-year payroll information. You can select between: + - **Let XPayroll choose**. By default, we recommend you allow Payroll to select the year (usually the current financial year) to calculate taxes. + - The relevant financial years available in the drop-down menu. + + + +### Calculate Tax on Basis Of + + Choose on which basis your organisation calculates employees' taxes. Select either: + - **Declaration and verified proofs** to calculate tax based on the proofs employees submit. + - **Amount declared by employee** to calculate as per their investment declarations only. + + +> **WARN** +> +> +> **Watch Out!** +> +> For dimissed employees, tax is calculated on the approved amount, not the declared amount. +> + + + + +![RazorpayX Payroll Tax Verification Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-tax-declaration-verification-settings.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> - You cannot choose the [Calculate Tax On Basis Of](#calculate-tax-on-basis-of) if you chose **Let XPayroll Verify** when you [**Opt for Verification**](#opt-for-verification). +> - Payroll updates the Calculate Tax on Basis Of setting to **Amount declared by employee** after completing the verification process. +> - You can choose your organisation's [Proof Upload Window](#proof-upload-window) only if you choose **Let Organisation Verify** when you [**Opt for Verification**](#opt-for-verification). +> + +#### Auto-Open Window & 80G Settings + +You can choose to automatically enable the proof upload window for new joiners or dismissed employees on the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + + +### Auto-Open Window for New and Dismissed Employees + + You can automatically open the investment declaration window for new joiners and auto-enable the proof upload window for dismissed employees awaiting their Last Working Day (LWD). To enable this: + + 1. Select the toggle against **Auto open declaration window for new employees**. + 1. Enter the **Number of days** in the text box until the declaration window remains open. + + For dismissed employees, the investment proof upload window automatically opens when you dismiss the employee. It remains open until the employee's LWD. + + + +> **WARN** +> +> +> **Watch Out!** +> +> Payroll does not verify the proofs for employees dismissed between April and December as it falls outside Payroll's proof verification period. +> +> This applies to both the options in the [**Opt for Verification**](#opt-for-verification) settings. +> + + + + +### Disable 80G + + You can enable the setting to disable employees' 80G contributions. Select the toggle against **Disable 80G**. + + In such cases, the employee must individually declare their 80G contributions when they file their taxes in July. + + +![RazorpayX Payroll Auto-open Windows Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-tax-declaration-auto-open-settings.jpg.md) + +## For Employees + +Employees can declare their provisional investments and upload investment proofs via the [IT Declarations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md) page. We communicate the window availability to your employees via email. + +### Related Information + +- [About Statutory Compliance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md) diff --git a/llm-content/payroll/tax-deductions-setup/windows.md b/llm-content/payroll/tax-deductions-setup/windows.md new file mode 100644 index 00000000..9bc98799 --- /dev/null +++ b/llm-content/payroll/tax-deductions-setup/windows.md @@ -0,0 +1,99 @@ +--- +title: Set up an Income Tax declaration window in RazorpayX Payroll | RazorpayX Payroll +heading: Set up Tax Windows +description: Check how to set up declaration and proof upload windows for employees in RazorpayX Payroll. +--- + +# Set up Tax Windows + +After you enable tax deductions for your organisation, you can set up the following: + + - **Declaration Window**: Window to declare investments at the start of the year. + + - **Proof Upload Window**: Window to upload proof of investments at the end of the year. + + - **Custom Windows**: Custom windows set up for specific employees in exceptional cases. + +## Declaration Window + +After you [enable the declaration settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tax-deductions-setup.md#enable-set-up), you can choose the declaration window period for the year your employees can declare their investments. This usually happens at the beginning of the year. + + +### Set Up Investments Declaration Window + + To set up the declaration window: + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard) → **Settings** → **Tax Deductions Setup**. + 1. Go to the Declaration Window tab on the **IT Declaration & Proof Upload** page. + 1. Select any of the following options from the **Select employee IT declaration window period** drop-down menu: + - **Always open**: The declaration window remains open throughout the year for employees to declare and edit their declarations at any time. + - **Every month for a certain period**: The declaration window regularly opens for a certain period every month. To choose the date range, select the **Month start date** and **Month end date**. + - **Custom range**: The declaration window opens as defined by the date and month ranges specified in the **Start date** and **End date** drop-down menu. You can also click **+ Add new range** to add more than one declaration window. + + ![RazorpayX Payroll Tax Declaration Window](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-tax-declaration-window.jpg.md) + 1. Click **Save & Confirm** to save the declaration settings. + + +You have successfully created declaration window/s for the financial year. +- You can edit the window at any time throughout the year. +- Your employees cannot to declare investments when the window is unavailable, unless you create a [custom window](#advancecustom-settings). + +## Proof Upload Window + +The proof upload window opens towards the end of the year when employees upload their proof of investments to validate their investment declarations. You can customise this period as necessary. + +> **WARN** +> +> +> **Watch Out!** +> +> You can edit the Proof Upload Window only if you select **Let Organisation Verify** in **Opt for Verification**. +> + + +### Set Up Proof Upload Window + + To select the proof upload window: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard) → **Settings** → **Tax Deductions Setup**. + 1. Go to the **Proof Upload Window** tab. + 1. Confirm any of the following options from the **Select proof upload window period** drop-down menu: + - **Always open**: The proof upload window remains open throughout the year for employees to upload their investment proofs at any time. + - **Custom range**: The proof upload window opens as defined by the date and month ranges specified in the **Start date** and **End date** drop-down menu. You can also click **+ Add new range** to add more than one proof upload window. + + ![RazorpayX Payroll Proof Upload Window settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-tax-declaration-proof-upload-window.jpg.md) + 1. Click **Save & Confirm** to save the declaration settings. + + +You have successfully created a proof upload window. +- When the window is open, we communicate the availability to your employees via email. +- Your employees cannot upload proofs when the window is unavailable, unless you create a [custom window](#advancecustom-settings). + +## Advance/Custom Settings + +If your employees are unable to declare/submit proofs within the window duration, you can create custom windows for specific employees. + + +### Set Up Custom Windows for Investments Declaration or Proof Upload + + To create custom windows: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard) → **Settings** → **Tax Deductions Setup**. + 1. Click **+ Create new window**. + 1. In the **Create new window** pop-up window: + 1. Select between the Declaration or Proof upload window from the **Select window** drop-down menu. + 1. Select the date range using the **Open from** and **Till** drop-down calendars. The respective windows will remain open for this selected duration. + 1. Add the employees' email ids in the **Add employee(s) email IDs** text box. This enables the specific declaration/proof upload window for the chosen employees. + 1. Click **Create window**. + + ![RazorpayX Payroll Create Custom Window for Employees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-xpayroll-tax-declaration-custom-window.jpg.md) + 1. Click **Save & Confirm**. + + +You have successfully created a custom window for particular employees. You can also: +- Create additional windows using **+ Create new window**. +- Delete the created windows using the delete icon against the specific window. +- Click the number of employees to view the employees' names for which the window is enabled. + +### Related Information + +- [About Tax Deductions Setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tax-deductions-setup.md) +- [Verify Tax Proofs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tax-verifications.md) diff --git a/llm-content/payroll/tax-verifications.md b/llm-content/payroll/tax-verifications.md new file mode 100644 index 00000000..1ae62fdd --- /dev/null +++ b/llm-content/payroll/tax-verifications.md @@ -0,0 +1,145 @@ +--- +title: Check TDS Verification in RazorpayX Payroll +heading: Verify Tax Proofs +description: Check how to manually verify investment proofs in RazorpayX Payroll. +--- + +# Verify Tax Proofs + +Tax proofs verification begins after the proof upload window closes. Ensure that your employees have submitted their proofs on time. + +> **WARN** +> +> +> **Watch Out!** +> +> Tax verification depends on your verification settings. +> - If you chose **Let XPayroll Verify**, Payroll verifies the proofs for your employees. We update you once the activity is complete. +> - **Let Organisation Verify**: You must carry out the verification by yourself. +> + +## Accept Proofs + +To accept proof of investments for the investments declared by your employees, the proof upload window must be open. However, the duration of the proof upload window depends on your **Verification Settings**. + + + You can verify employee's tax proofs only if you have selected **Let Organisation Verify** in **General Settings** → **Verification Settings**. You can also check the verification status. + + + +### Check Verification Status + + To check the verification status: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **Reports** → **Tax Deductions**. + ![Tax Verifications Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-tax-verifications.jpg.md) + 1. In the **Proof Verification Status** column, you can check if the employees' proofs are verified. + ![Proof Verification Status on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-tax-verifications-proofs.jpg.md) + + + +### Verify Investment Proofs Manually + + To verify the investment proofs manually: + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **Reports** → **Tax Deductions**. + ![Tax Verifications Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-tax-verifications.jpg.md) + 1. In the **Proof Verification Status** column, you can check if the employees' proofs are verified. + ![Proof Verification Status on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-tax-verifications-proofs.jpg.md) + 1. To verify the employee's pending proofs, click on **PENDING**. + + This opens the investment pages where the proofs are yet to be verified. To verify the proofs: + 1. Click **Manage proofs**. + 1. Check the attachments in the **Proof Document** column. Click to view them in a new tab. + 1. Review the amount and comments. Click **Accept proof** or **Reject proof**. + ![Approve investment proofs Razorpay Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-tax-proofs-verify.jpg.md) + 1. In the pop-up modal, modify the amount as approved according to the proof submitted. Provide comments, if any. + + +> **INFO** +> +> +> **Handy Tips** +> +> Click **Undo verification** to undo proof verification. +> + + + 1. Click **Continue**. + + This successfully approves the proofs for one investment. Repeat the process across all the investments. + - After you verify the HRA proofs and click **Continue**, Payroll automatically moves to the next pending proof. For example, after HRA, you verify the Section 80 deductions. + - As there are many Section 80 deductions, clicking **Continue** moves you to the next pending proof within Section 80 deductions until the last proof is verified. + - You can also click **Next Deduction** to skip verifying the current proof. + ![Next Deduction to skip current page proof verification Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-investment-proofs-next.jpg.md) + - The **Proof Verification Status** remains in the `PENDING` status until you verify all the proofs the employee has uploaded. The status moves to **COMPLETED** when you verfiy all the proofs. + + + + + + If you select **Let Payroll Verify**, Payroll will verify the investment proofs uploaded by your employees. You can check the verification status on the Dashboard. + + + +### Check Verification Status + + To check the verification status: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **ADMIN OPTIONS** → **Reports** → **Tax Deductions**. + ![Tax Verifications Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-tax-verifications.jpg.md) + 1. In the **Proof Verification Status** column, you can check if the employees' proofs are verified. + ![Proof Verification Status on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-tax-verifications-proofs.jpg.md) + + + + + After we verify the proofs, we update the [Calculate Tax on Basis Of](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tax-deductions-setup.md#calculate-tax-on-basis-of) to **Declaration with verified proofs** to complete the proof verification activity. + + +> **INFO** +> +> +> **Handy Tips** +> +> Form 12BB is available for your employees on their dashboard under Tax Deductions. However, filling this form is non-mandatory. +> + +## Request Verification Delay + +Payroll verifies all the tax proofs submitted in January. However, some organisations that chose **Let Payroll Verify** might prefer to verify the tax proofs much later. To request a delay: +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +2. Go to **Settings** → **Tax Deductions Setup**. +3. Select **Let Organisation Verify**. + +This ensures that we exclude you from the regular cycle of verifications. + +> **WARN** +> +> +> **Watch Out!** +> +> We do not recommend requesting delay as a change (usually a reduction) in an employee's declaration increases their TDS. +> +> As a best practice, we optimise TDS deductions by deducting the tax over multiple months than in a single month. This ensures your employees receive a steady net take-home pay. +> + +To re-start verifying investment proofs: +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +1. Navigate to **Settings** → **Tax Deductions Setup**. +1. Select **Let Payroll Verify** in **Opt for Verification**. +1. [Contact Support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/plans.md#contact-support) and request to start verification. + +Note that we do this on a best efforts basis, and we do not guarantee it. + +### Post-Verification + +After verifying the investment proofs, you can disable the **Allow employees to update their tax deductions** to disallow any investments and proof-related changes. + +If you chose **Let Payroll Verify**, we update the [Calculate Tax on Basis Of](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/tax-deductions-setup.md#calculate-tax-on-basis-of) to **Declaration with verified proofs** to complete the proof verification activity. + +### Related Information + +- [Statutory Compliance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md) +- [Enable Compliance in Account Setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md#welcome-mail-from-xpayroll) diff --git a/llm-content/payroll/tds.md b/llm-content/payroll/tds.md new file mode 100644 index 00000000..e9d485de --- /dev/null +++ b/llm-content/payroll/tds.md @@ -0,0 +1,325 @@ +--- +title: Manage TDS Payments in RazorpayX Payroll +heading: About Tax Deducted at Source (TDS) +description: Explore TDS charges and processes in RazorpayX Payroll. +--- + +# About Tax Deducted at Source (TDS) + +Tax Deducted at Source (TDS) is an indirect tax that salaried employees and other eligible entities pay to the Income Tax department of India, as per the Section 192 of the Income Tax Act, 1961. + +Explore the following tax related settings availble on the Payroll Dashboard. + + - **TDS Filings**: View the TDS filing information on the Payroll Dashboard. + + - **TDS on Razorpay Charges**: View the TDS deductions applicable on Razorpay charges. + + - **Form 16 and Form 16A**: Know how to access employees' and contractors' Form 16 and 16A respectively. + + - **TDS on Bonus**: Check how the TDS deductions affect an employee's bonus payout. + +## Prerequisites + +Before you set up TDS automation on Payroll, verify the following: + + +### 1. TRACES Registration + + [TRACES](https://www.tdscpc.gov.in/app/login.xhtml) registration is required by Payroll to download your employees' and contractors' Form 16/16A data. + + If your organisation is currently not registered on TRACES, [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#razorpayx-payroll) after Payroll has completed filing TDS returns for any quarter. + + + +### 2. TDS Deductor + + The TDS Deductor is responsible for paying TDS on behalf of your organisation and employees. As such, the Income Tax department requires some information about the TDS Deductor. + + To update your TDS Deductor details: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard) → **Settings** in the left menu. + 1. Go to **TDS Filing Setup**. + 1. Navigate to the **TDS Deductor Details** and enter the details. + + If you do not have an existing TDS Deductor account, follow [these steps](https://www.incometax.gov.in/iec/foportal/help/taxdeductor/registration) to register. + + +## Tax Regimes + +In a company, TDS is deducted from the employee's salary income as per their annual earnings in lakhs. It depends on factors like: + +- Income/TDS from previous employer(s), if any. +- Each month's earnings in the current financial year. +- Perquisites (if any). +- Exemptions like professional tax, HRA, flexible benefits etc. +- Income tax deductions under different sections like Section 80C, Section 24, and more. +- Income tax regime. +- This deduction is based on the tax regime that the employee has chosen. +- The employer is responsible for filing TDS, while the employee manages the tax returns. + +The TDS deduction happens according to the employees' chosen tax regime. The employer files the TDS deductions and the employee manages the tax returns. + + +### Change Employee's Regime + + In some cases, you can allow employees to change their tax regime after the initial selection. + + To change employee's regime: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Navigate to **People** and open the particular employee's profile. + 1. Click **View Tax Deductions** from the right pane → **Reverse Regime Selection**. + ![Reverse regime selection on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payroll-tds-reverse-regime.jpg.md) + 1. In the **Reverse tax regime selection** pop-up modal, click **Reverse selection**. + + This successfully reverses the tax regime for the employee. You can select the regime or allow the employee select the regime from [Tax Deductions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md) on their dashboard. + + + +### Old and New Tax Regime and Slabs + + Individuals are required to pay income tax on their total annual earnings to the government. The tax payable is categorised into slabs according to the individuals incomes + + There are two available regimes that employees can choose to pay tax. + + + + + Income Tax Slabs (FY 24-25) | Income Tax Rate + --- + Upto 2,50,000 | Nil + --- + 2,51,001 - 5,00,000 | 5% + --- + 5,00,001 - 10,00,000 | 20% + --- + Above 10,00,001 | 30% + + + + + Income Tax Slabs (FY 24-25) | Income Tax Rate | Comments + --- + Upto 3,00,000 | Nil | NA + --- + 3,00,001 - 7,00,000 | 5% | Tax rebate under section (u/s) 87A upto ₹7 lakhs. + --- + 7,00,001 - 10,00,000 | 10% | NA + --- + 10,00,001 - 12,00,000 | 15% | NA + --- + 12,00,001 - 15,00,000 | 20% | NA + --- + Above 15,00,000 | 30% | NA + + + + + +Know more about [Income Tax Regimes and Budget Changes](https://razorpay.com/learn/budget-2024-tax-highlights/). + +## Form 16 & 16A + +Know how Payroll handles Form 16 and 16A on the Dashboard. + + +### Employee's Form 16 + + Employee's Form 16 is available after the financial year ends and the TDS Q4 filing is completed, that is, starting June of any year. + + For Payroll to generate Form 16 for your employees, ensure that we are handling your 24Q filing. + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Go to **Settings** in the left menu → **TDS Filing Setup**. + 1. Select the **Automatically File 24Q** check box. We usually enable this setting by default. + + Once the Form 16s are available to us, we upload all employees' **unsigned Form 16s** on the Payroll Dashboard in **My Pay Slips**. Know more about [Payslips and Form 16](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/payslips-form16.md). + + By default, we upload Form 16s without any digital signature as we do not have access to the employees' digital signatures. + - We email the unsigned Form 16s at your registered email address. + - Sign the forms with a tool like emSigner and email them back to us. + - [Contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/plans.md#contact-support) to upload the signed Form 16s on the Payroll Dashboard for your employees to access them. + + + +### Contractor's Form 16A + + Like the employee's Form 16, Contractor's TDS certificate is called Form 16A and is provided with the Form 26AS. + + Payroll does not provide Form 16A by default. If the contractor requests their Form 16A from your organisation, [contact support](mailto:xpayroll@razorpay.com) and provide the following details: + - The contractor's name/PAN. + - Quarter for which the form is required (Form 16A are generated for each quarter). + + You can avail Form 16A from Payroll's support team only when: + - You have used Payroll when making payments to your contractor. + - You have filed the 26Q TDS returns for that quarter using Payroll. + + As per your request, we send the Form 16A at your registered email address. Post that, you can forward the form to your contractor. + + + +### Change TDS + + +> **WARN** +> +> +> **Watch Out!** +> +> Changing an employee's TDS prevents Payroll from filing Q4 returns and generating Form 16s for all employees. We recommend you do not change TDS unless absolutely necessary. +> + + We **do not** recommend changing an employee's TDS deductions. However, if it is absolutely necessary, follow the given steps. + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 2. Finalise payroll for the specific month for which you want to make the modification. + 3. Write to us at [xpayroll@razorpay.com](mailto:xpayroll@razorpay.com). Do mention: + - The Employee ID. + - The payroll month. + - The current and the revised TDS values. + + +## Miscellaneous TDS Charges + +TDS can apply on One-time Payments, Razorpay charges, bonus provided, taxable column in Custom Salary Structure and more. + + +### TDS on Razorpay Charges + + TDS applies to Razorpay charges only when the amount is greater than ₹30,000. However, TDS calculations depend on whether Payroll handles your 26Q filings. + + To check this: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Go to **Settings** → **TDS Filing Setup** → **Edit**. + + View your current settings. + + + You must pay the TDS separately and share the TDS certificate (Form 16A) with the [support team](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/plans.md#contact-support). Payroll verifies this TDS amount and credits it to your Payroll account. + + + The only way to pay TDS in this case will be to switch to an annual plan. Here, you can make a contractor payment to Razorpay from within Payroll, and Payroll then deducts and pay the TDS automatically on your behalf. + + + + + +### TDS on One-time Payments + + On one-time payments, you can choose whether you want to pay TDS at the time of making the payment, or club it as a part of your monthly payroll activity. + + Know more about [TDS on One-time payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/one-time-payments.md#tds-on-one-time-payments). + + + +### TDS on Custom Salary Structure Components + + For Custom Salary Structure, you can set your organisation's salary structure components to be taxable or not, and allow employees to avail felxible benefits. + + Know more about [Custom Salary Structure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#setup-salary-structures). + + + +### TDS on Bonus + + When you pay a bonus (as a one-time payment or as a Payroll cycle [addition](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/run-payroll.md#additions-and-deductions)), specifically in the middle of the financial year, the employee's TDS liability increases. + + **Example**: + + Consider the example where an employee's earnings in a year are expected as ₹12,00,000. + + - Total TDS for the entire year = ₹1,79,400. + - It gets distributed in equal amounts, leading to: + - An in-hand pay = ₹85,050 + - TDS = ₹14,950. + + Assume a bonus of ₹1,00,000 is given to the employee. + - Total earnings = ₹13,00,000. + - Total TDS on this = ₹2,10,600 (an increase of ₹31,200). + + This additional liability of ₹31,200 is included in the same month as the bonus, and the employee's in-hand salary becomes: + - 2,00,000-(14,950 + 31,200) = ₹1,53,850. + + This is done because if additional TDS liability is not deducted, the employee's in-hand salary for the remaining months of the year drops greatly. That happens since they are paying more TDS every following month even though the bonus was only given for one month. + + +## File TDS and Returns + +Know how Payroll handles TDS filings and returns. + + +### Automate TDS Returns + + + You can automate TDS filing (for employees and contractors) on the Payroll Dashboard. To enable the automation: + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Go to **Settings** → **TDS Filing Setup**. + 1. Select the check box for the relevant returns: + - **Automatically file 24Q** + - **Automatically file 26Q** + + You have successfully automated the TDS returns for employees (24Q) and contractors (26Q). + + +> **INFO** +> +> +> **Handy Tips** +> +> If you want to take care of the current filing yourself, you can choose the FY quarter from when the filing should start. +> + + + + +### TDS Filing Dates and Payroll Processes + + TDS returns are filed by the following dates: + + + Quarter | Due date for filing TDS return + --- + Q1 (1 April - 30 June) | 31 July + --- + Q2 (1 July - 30 September) | 31 October + --- + Q3 (1 October - 31 December) | 31 January (of next year) + --- + Q4 (1 January - 31 March) | 31 May + --- + + + Payroll starts the filing process a week before the due date. During this period, you can view the TDS filing data under **Reports** → **TDS** → **View TDS Filings**. You can also view the acknowledgment in the **View TDS Filings** tab. + + After we receive the acknowledgment, you can view it on your [Payroll Dashboard](https://payroll.razorpay.com/dashboard). You also receive an email confirming that your filing is completed. + + +> **WARN** +> +> +> **Watch Out!** +> +> Payroll does not file nil TDS returns. If there was no TDS deducted for your company for an entire quarter, it implies that the TDS filing is not done. +> + + + + +### TDS Challans + + After we make your TDS payments, you can view your TDS challans on both the Income Tax portal as well as the Payroll Dashboard. + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 1. Go to **ADMIN OPTIONS** → **Reports** → **TDS**. + + CIN (Challan Identification Number) and Debit Advice (containing the bank transaction reference no.) are available here. Payroll uploads your challan by the 28th of the current month. + + To view the challan information on the Income Tax portal: + 1. Log in to [IT Portal](https://www.incometax.gov.in/iec/foportal/). + 1. Go to **e-File** → **E-Pay Tax** → **Payment History**. + 1. Under the **Actions** tab, click on the 3 dot menu against the required challan and click **Download**. + + +### Related Information + +- [Statutory Compliance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md) +- [Provident Fund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/provident-fund.md) +- [Salary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/salary.md) +- [Salary Exceptional Cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/exceptional-cases.md) diff --git a/llm-content/payroll/tds/form-24Q.md b/llm-content/payroll/tds/form-24Q.md new file mode 100644 index 00000000..b5d33c8e --- /dev/null +++ b/llm-content/payroll/tds/form-24Q.md @@ -0,0 +1,109 @@ +--- +title: Form 24Q Compliance +heading: Form 24Q for Employers +description: Ensure accurate Form 24Q compliance, payroll execution, and error handling for TDS filing. +--- + +# Form 24Q for Employers + +Form 24Q is a quarterly statement that employers must file to report Tax Deducted at Source (TDS) on salaries. It contains details of salaries paid and TDS deducted for each employee. Filing this form is mandatory, as it enables the generation of Form 16, which employees need for tax returns. + +## Quarterly Filing Deadlines + +Quarter | Month | Due Date +--- +Q1 | April – June | 31 July +--- +Q2 | July – September | 31 October +--- +Q3 | October – December | 31 January +--- +Q4 | January – March | 31 May + +### Q4 Specific Rules + +Since Q4 includes the full financial year’s salary and TDS details, specific salary data is required for active and dismissed employees to ensure accurate filing. + +- **Active Employees**: Salary details are taken from the **March payslip**. +- **Dismissed Employees**: Salary details are taken from the **Full & Final (F&F) settlement payslip**. + +## XPayroll Checks Before Filing + +We ensure accurate filing with two checks during the March payroll execution. + +### Check 1: Skipped Summary Report + +The **Skipped Summary Report** warns admins about missing **March and F&F payslips**, skipped or out-of-order payrolls, and unprocessed payrolls for active and dismissed employees. + +![](/docs/assets/images/Skipped-summary-report.jpg) + + The report includes: + - Months with skipped payrolls or missing payrolls + - Active employees whose March payroll is not executed + - Dismissed employees whose F&F payroll is not executed + + +> **WARN** +> +> +> Watch Out! +> - Payroll restricts out-of-order execution for March payroll of active employees, but allows it for other months *(For example, February payroll before January payroll)*. +> - For dismissed employees, only the last working month can not be executed out of order. +> + +### Check 2: Finalisation Error Report + +The Finalisation Error Report runs an additional check and is available for all months. If payroll finalisation fails, admins can click **View Issue** on the **Run Payroll** page to access the report. + +![](/docs/assets/images/finalisation-issue.jpg) + +If all Q4 filing criteria are met, finalisation proceeds without issues. + +It fails if any of these issues are found during the check: + - Negative net pay. + - March payroll of the same FY is already executed. + - F&F payroll is already executed. + +The finalisation error report includes: +- **Employee Details (Name, Email, Employee ID, Status - *Active/Dismissed*)** + - Helps identify the affected employees and their payroll status. + - Ensures the right employees are reviewed and corrected. + +- **Hire Date and Last Working Date** + - Confirms if an employee is active or dismissed. + - Ensures F&F payroll is processed correctly for dismissed employees. + - Helps validate if payroll execution aligns with their employment period. + +To make error resolution easier, we have also added filters for: +- Negative net pay +- Future payroll already executed +- March payroll of previous FY not executed +- March/F&F payroll not executed + +![](/docs/assets/images/finalisation-filter.jpg) + +If auto-payroll is enabled and finalisation fails due to an error, we send an email to the admin of the organisation with a link to the 'Finalisation Error' report. + +> **WARN** +> +> +> Watch Out! +> - Payroll restricts **April payroll** if **March payroll for active employees** or **F&F payroll for dismissed employees** from the previous FY is missing, as both are required for **Form 16**. +> + +## Error Resolution + +If payroll finalisation fails, the errors listed below must be addressed before proceeding. Use the suggested resolutions to fix them. + +Error | Resolution +--- +Employee's deductions exceeded earnings, resulting in negative net pay. | Add reimbursement to balance it (can be adjusted with the next payroll). +**Example:** An employee has a ₹5,000 deduction for a damaged company laptop, but their earnings are only ₹3,000, resulting in a negative net pay of ₹-2,000. To balance this, add a Travel Reimbursement of ₹2,000, ensuring zero net pay. +The reimbursement can be adjusted in the next payroll. +--- +The Employee’s previous FY March payroll was skipped. | The March [past FY] payslip must be executed for accurate Form 16 generation. To ensure correct FY earnings before finalization, generate a zero payslip by adding 30/31 days of Loss of Pay (LoP). +--- +Dismissed employee's F&F payroll has already been executed. | Once an employee's F&F payroll is executed, it cannot be redone. Generate a zero payslip by adding 30/31 days of Loss of Pay (LoP) to ensure accurate FY earnings before finalisation. +--- +An employee left in any previous month, but their F&F payroll was never executed. | F&F month payslip needs to be executed as we rely on this for Form 16 generation. Generate a zero payslip by adding 30/31 days of Loss of Pay (LoP) to ensure accurate FY earnings before finalisation. +--- diff --git a/llm-content/payroll/user-roles-workflows.md b/llm-content/payroll/user-roles-workflows.md new file mode 100644 index 00000000..3812e71d --- /dev/null +++ b/llm-content/payroll/user-roles-workflows.md @@ -0,0 +1,135 @@ +--- +title: Check User Roles, Permissions and Workflows available in RazorpayX +heading: User Roles & Workflows +description: Create, edit, delete and manage user roles on the Razorpay Dashboard. +--- + +# User Roles & Workflows + +You can customise pre-existing user roles, modify the permissions and set up workflows on the Dashboard. After sign up, the following roles are immediately available: + +- Administrator +- Human resources +- Payroll +- Report Viewer +- Reimbursements +- Chartered Accountant + +![User roles available on the RazorpayX Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-user-roles.jpg.md) + +Provide special access, like [administrator permissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/quickstart.md), to the people in your team. You can also [create custom roles](#create-user-roles). This is available with the [Elite and Enterprise Plans](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/plans.md) only. + +Explore how you can assign user roles, create custom roles and more. + +## User Role Actions + +Following are the user role actions available to you on the Dashboard. + +### Create User Roles + +To view the user roles available on the Dashboard: + +1. Log in to the Payroll Dashboard. +1. Navigate to **Settings** from the left menu. +1. Go to the **User Roles** section. Click **CREATE/EDIT ROLES**. + + On the User Roles & Permissions page, you can: + + + + 1. Click the user role. The **Manage Role** page opens. + 1. Under each section, select the permissions applicable for the role. + ![Select or clear the permissions to modify user role](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-edit-user-role.jpg.md) + 1. Click **SAVE CHANGES** to finalise the changes. + + + 1. Click **+ CREATE NEW ROLE**. + 1. You can either: + - Create a blank role and set permissions manually. + - Use the existing user roles and permissions as a template. + ![Create user roles on Dashbaord](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-create-custom-roles.jpg.md) + 1. On the **Manage Role** page, add a role name, set/modify the permissions and click **SAVE CHANGES**. + + +1. Enter the OTP you receive at your registered email address/authenticator app and authorise the changes. + +You have successfully created a user role. + +### Assign User Roles + +To assign the user roles you have created: + +1. Log in to the Payroll Dashboard. +1. Navigate to **People** and select the employee you want to assign the role to. +1. In the employee's profile, go to **User Roles & Permissions** → **EDIT**. +1. Select a role to assign from the drop-down list. + ![Assign a role to employee](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-assign-role.jpg.md) + +You have successfully assiged a new role to the employee. + +> **WARN** +> +> +> +> **Watch Out!** +> +> Ensure that the person you provide special access/role/permissions to is already a part of your organisation's payroll. Know more about [adding people to Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/quickstart.md#add-all-employees). +> + +### Edit User Roles + +You can modify the permissions of all the available user roles. + +1. Log in to the Payroll Dashboard. +1. Navigate to **Settings** from the left menu. +1. Go to **User Roles** → **CREATE/EDIT ROLES**. +1. Click the role you must modify. The **Manage Role** page opens. +1. Select or clear the check boxes to modify the permissions for that role. + ![Select or clear the permissions to modify user role](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-edit-user-role.jpg.md) +1. Enter the OTP you receive at your registered email address/authenticator app and click **SAVE CHANGES**. + +You have successfully modified the user role. + +### Delete User Roles + +When the role is no longer required, you can delete the role from the Dashboard in the following way: + +1. Log in to the Payroll Dashboard. +1. Navigate to **Settings** from the left menu. +1. Go to **User Roles** → **CREATE/EDIT ROLES**. +1. Click the role you must modify. The **Manage Role** page opens. +1. Click **DELETE ROLE**. + ![Delete user role on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-delete-role.jpg.md) + +You have successfully deleted a user role. + +> **WARN** +> +> +> **Watch Out!** +> +> You can delete custom user roles only. +> + +## Setup Workflows + +With user roles, you can also set up workflows on the Dashboard. For example, you can allow one employee to only edit the payroll, and allow another employee to only finalise the payroll. + +To set up workflows: + +1. Log in to the Payroll Dashboard. +1. Follow the steps to [create custom role](#create-user-roles) for both these actions. You must create separate user roles for each of them. + +You have successfully created a user role workflow. [Assign the user role](#assign-user-roles) to the specific employee in your organisation. + +## View Collaborators + +You can also view the list of people who have special user roles assigned to them. To do so, navigate to **Settings** → **Collaborators**. + ![List of employees with special permissions in Payroll.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xpayroll-view-collaborators.jpg.md) + +Once your users are all setup, you can start configuring their documents, leaves and attendance in [Leave Setup](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/leaves.md). + +### Related Information + +- [Audit Reporting](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/audit-reporting.md) +- [Human Resources](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/administrator.md) diff --git a/llm-content/payroll/video-tutorials.md b/llm-content/payroll/video-tutorials.md new file mode 100644 index 00000000..581e9775 --- /dev/null +++ b/llm-content/payroll/video-tutorials.md @@ -0,0 +1,111 @@ +--- +title: Explore video tutorials for employee features on Razorpay Payroll. +heading: Video Tutorials +description: Explore various tutorials for employee-facing features on the Payroll Dashboard. +--- + +# Video Tutorials + +Explore video tutorials for the features available to the employees of an organisation on the Payroll Dashboard. + +- Expand the relevant accordion to view the video tutorial. +- Click the documentation links within the accordion to view the detailed textual guide. + +## List of Tutorials + + +### Employee Login and Onboarding + + Know how to set up your account on RazorpayX Payroll as an employee. Log in to the Payroll Dashboard as a first time user and complete the [onboarding process](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md#onboarding). + + +[Video: https://www.youtube.com/embed/EDWtYqOg70Y] + + + + +### Set Up My profile + + Know how to [set up your employee profile](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/my-profile.md#set-up-profile) on the Payroll Dashboard. Review your employment details and update the necessary information. + + +[Video: https://www.youtube.com/embed/iakLVvOLqQg] + + + + +### Mark and Modify Attendance + + Know how to [mark attendance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content//payroll/employees/attendance-leaves.md#mark-attendance) on the Payroll Dashboard. Modify, delete and manage your attendance easily. + + +[Video: https://www.youtube.com/embed/Hb1i2NfNbBg] + + + + +### Apply for Leaves + + Know how you can [apply for leaves](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/attendance-leaves.md#apply-for-leaves), edit and modify leaves on the Payroll Dashboard. + + +[Video: https://www.youtube.com/embed/ClLnMnIGY8c] + + + + +### Claim Reimbursements + + Know how to [claim reimbursements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/reimbursements.md) for office expenses. + + +[Video: https://www.youtube.com/embed/qAM1Gh-9FfU] + + + + +### Declare Flexible Benefits and Upload Proofs + + Know how to declare and upload proofs for [flexible benefits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations/flexible-benefits.md) when the respective windows are open. + + +[Video: https://www.youtube.com/embed/xMlSKf1J4bU] + + + + +### Declare Investments and Upload Proofs + + Know how to [declare investments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/declarations.md) during the declaration window and upload proofs when the proof upload window is open. + + +[Video: https://www.youtube.com/embed/DQ-icur1xWM] + + + + +### Check Payslips and Form 16s on the Dashboard + + Know how to [check payslips](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/payslips-form16.md) and view Form 16 on the Payroll Dashboard. + + +[Video: https://www.youtube.com/embed/LEw6H57Xqj4] + + + + +### Submit Resignation + + Know how to [submit your resignation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees/resignation.md) on the Payroll Dashboard. This is possible only if your organisation has enabled the resignation module. + + +[Video: https://www.youtube.com/embed/D_6iD3NsyUw] + + + + + +## Related Information + +- [Employee Documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/employees.md) +- [Payroll Changelog](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/changelog.md) diff --git a/llm-content/payroll/voluntary-provident-fund.md b/llm-content/payroll/voluntary-provident-fund.md new file mode 100644 index 00000000..6ec484ab --- /dev/null +++ b/llm-content/payroll/voluntary-provident-fund.md @@ -0,0 +1,204 @@ +--- +title: Setup and manage Voluntary Provident Fund in RazorpayX Payroll +heading: Voluntary Provident Fund (VPF) +description: Set up and manage voluntary provident fund contributions in RazorpayX Payroll. +--- + +# Voluntary Provident Fund (VPF) + +Voluntary Provident Fund (VPF) is an additional contribution made by employees over and above the mandatory Employee Provident Fund (EPF). It is a tax-saving instrument that allows employees to contribute more towards their retirement savings while enjoying tax benefits under Section 80C of the Income Tax Act. + + +### VPF Eligibility + + Any employee who is already enrolled in the Employees' Provident Fund (EPF) scheme is eligible to contribute to VPF. The employee must have: + - An active Universal Account Number (UAN) + - An existing EPF contribution + + VPF contribution is completely voluntary and is initiated at the employee's request. + + + +### VPF Contribution Limits + + Employees can contribute any percentage of their PF wages towards VPF with the following conditions: + + - Minimum: 0% of PF wages + - Maximum: 88% of PF wages + + There is no absolute maximum amount limit, but the percentage-based restriction applies. The declaration can be maximum of ₹5,903 (88% of PF wages) for employees whose PF is calculated on the standard ₹15,000 limit. + + The VPF contribution amount will be deducted from the employee's monthly salary in addition to the regular EPF deduction. + + + +### Tax Benefits of VPF + + VPF offers excellent tax benefits under the Income Tax Act: + + - VPF contributions qualify for tax exemption under Section 80C of the Income Tax Act in the old tax regime. + - VPF contributions are not tax-exempt under the new tax regime. + - The interest earned on VPF is tax-free up to certain limits. + - The maturity amount received is also tax-free under certain conditions. + + +> **WARN** +> +> +> **Watch Out!** +> +> The tax benefits for VPF apply only to the old tax regime. If an employee has opted for the new tax regime, they will not receive tax exemptions for their VPF contributions. +> + + + +## Setup VPF + +Before employees can contribute to VPF, ensure that your organisation has properly set up the Provident Fund in RazorpayX Payroll. + +To enable VPF for your organisation: + +1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). +2. Go to **Settings** → **Payments & Compliance Setup**. Click **EDIT**. +3. In the **Compliance Payments Settings** section, select the applicable option under **PF Settings.** + Check the following options as needed: + - Include employer contributions to PF in employee CTC. + - Include PF with a senior margin in employee CTC. + - Use only basic salary for calculating PF (optional). + - Use PF limit of ₹15,000 while calculating contributions. + - Select the **Allow employees to update Voluntary PF** option. + ![Setup VPF option for employees](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/vpf-setup.jpg.md) +4. Click the **Save** button at the bottom of the section to apply your changes. + +Once PF is properly set up, employees can opt in for VPF contributions. + +> **WARN** +> +> +> **Watch Out!** +> +> Note that even if the organisation has switched off VPF contribution, admins can still edit the VPF. However, it is not possible for employees to make these changes themselves. +> + +## Manage VPF + + +### Opt In for VPF + + Employees can opt in for VPF contributions through their dashboard or request HR/Admin to enable it. + + To enable VPF for an employee: + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 2. Navigate to **People** from the left menu. + 3. Open the employee's profile and navigate to their **Compensation** tab. + 4. Click on the **Deductions** tab to view all deduction options. + 5. Locate the **Voluntary PF** section and click **Opt in to VPF**. + ![VPF contribution dialog box](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/opt-in-vpf.jpg.md) + + 6. In the **Voluntary PF** dialog box that appears: + - Enter the **Monthly Contribution** amount the employee wishes to contribute. + - Note the declaration can be maximum of 88% of PF wages. + - Check the confirmation box. + ![Opt in to VPF on Payroll Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/vpf-opt-in.jpg.md) + 7. Click **Opt in** to confirm. + + The VPF contribution will be applied from the next salary cycle. + + + +### Modify VPF Amount + + Employees can request to modify their VPF contribution amount at any time. To modify the VPF amount: + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 2. Navigate to **People** from the left menu. + 3. Open the employee's profile and navigate to their **Compensation** tab. + 4. Click on the **Deductions** tab to view all deduction options. + 5. Locate the **Voluntary PF** section and click **Manage VPF**. + ![Modify VPF amount option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/vpf-modify2.jpg.md) + 6. From the drop-down menu, select **Modify VPF amount**. + 7. In the **Modify VPF amount** dialog box: + - Enter the new **Monthly Contribution** amount. + - Note the declaration can be maximum of 88% of PF wages. + - Check the confirmation box if not already checked. + ![Modify VPF amount option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/vpf-modify3.jpg.md) + 8. Click **Modify** to save the changes. + + The modified VPF amount will be effective from the next salary cycle. + + + +### Opt Out of VPF + + Employees can choose to opt out of VPF contributions at any time. To opt out of VPF: + + 1. Log in to the [Payroll Dashboard](https://payroll.razorpay.com/dashboard). + 2. Navigate to **People** from the left menu. + 3. Open the employee's profile and navigate to their **Compensation** tab. + 4. Click on the **Deductions** tab to view all deduction options. + 5. Locate the **Voluntary PF** section and click **Manage VPF**. + 6. From the drop-down menu, select **Opt out of VPF**. + ![Opt out of VPF option](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/opt-out-vpf2.jpg.md) + 7. Click **Opt out** to confirm or **Cancel** to go back. + After opting out, the VPF contribution will stop from the next salary cycle. + + +> **WARN** +> +> +> **Watch Out!** +> +> When VPF configuration is disabled by your organisation, employees will see a message stating "VPF configuration is disabled by your organisation. Contact admin for further details." In such cases, the organisation admin must enable VPF settings first. +> ![Confirm opt out of VPF](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/vpf-disabled.jpg.md) +> + + + + +### VPF Processing + + Once VPF is enabled and the contribution amount is set: + + - The specified VPF amount is deducted from the employee's monthly salary, in addition to the regular EPF deduction. + - Both EPF and VPF contributions are processed together and remitted to the employee's PF account. + - VPF contributions are visible in the employee's payslip under the deductions section. + - The VPF amount is included in the ECR file generated for PF payments. + + No separate payment process is required for VPF as it is processed along with the regular PF contributions. + + + +### VPF in Tax Declarations + + VPF contributions are automatically included in tax declarations under Section 80C for employees on the old tax regime: + + 1. The VPF amount is automatically added to the total EPF contribution for tax calculation purposes. + 2. The combined EPF and VPF contributions are shown in the Form 16 under Section 80C deductions (for old tax regime only). + + + +### Troubleshooting VPF Issues + + Common VPF issues and their solutions: + + 1. **VPF not showing in payslip:** + - Verify that the VPF opt-in was completed before the payroll processing date. + - Check if the PF settings are properly configured for the organisation. + - Ensure the employee has an active UAN and is enrolled in EPF. + + 2. **Unable to modify VPF amount:** + - Check if there are any organisation-level restrictions on VPF modifications. + - Verify that the requested amount is within the allowed limits (maximum 88% of PF wages). + - Ensure the modification request was made before the payroll cut-off date for the month. + + 3. **VPF not reflecting in tax declarations:** + - Verify that the employee is on the old tax regime where VPF tax benefits apply. + - Check if the VPF contributions have been properly processed in previous payroll cycles. + + If issues persist, [Contact support](#contact-support) for assistance. + + +### Related Information + +- [Provident Fund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/provident-fund.md) +- [Statutory Compliance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll/statutory-compliance.md) diff --git a/llm-content/pos.md b/llm-content/pos.md new file mode 100644 index 00000000..4f5e3b61 --- /dev/null +++ b/llm-content/pos.md @@ -0,0 +1,146 @@ +--- +title: How Razorpay POS Works +description: Know about Razorpay POS, the advantages and features and explore the POS device suite. +--- + +# How Razorpay POS Works + +Razorpay POS is a point-of-sale payment solution that allows businesses to accept payments using UPI and credit or debit cards, with superfast processing and high transaction success rates. Use Razorpay POS to accept offline payments at multiple touchpoints, including: +- In-person purchases. +- Customer doorstep during delivery. +- Unattended/self-serve kiosks. +- Vending machines. + +![Razorpay POS Devices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pos.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> If you use Razorpay Payments (online payments) also, refer to our [Payments documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md). +> + + +### Advantages + + - **Best Success Rates** + + Enjoy industry-leading success rates with 99%+ for UPI transactions and 98%+ for card payments, along with instant refunds on failed UPI transactions. + - **Fastest Processing Time** + + Experience lightning-fast transactions with just 1.5 seconds for UPI and 15 seconds for card payments, ensuring quick checkouts even during peak hours. + - **High success rate and low downtime** + + Benefit from 99% uptime with in-house switching capabilities and smart on-us routing features for uninterrupted business operations. + - **Simple and Intuitive UI/UX** + + Get started immediately with an easy-to-use interface that requires no cashier training, enabling your team to process payments efficiently from day one. + - **Quick & Easy Integration** + + Start accepting payments within 7 days, with seamless integration available with 200+ billing partners. + - **Value-added Services** + + Avail a host of services like digital billing, logic-based routing, split settlement and more to improve operational efficiencies. + - **Best-in-Class Support** + + Enjoy the best support system of Razorpay with dedicated relationship managers. + + + +### Features + + - **All-in-one Dashboard** + + Track online and in-person payments on the same Dashboard. + - **Downtime alerts** + + Keep customers informed with automated downtime alerts. + - **Easy EMI payments** + + Razorpay POS offers the lowest EMI processing time with 95% bank coverage. The reconciliation is automated end-to-end. + - **Dashboard and analytics** + + Get real-time analytics and insights on your Dashboard. Generate transactions and usage reports. Grant hierarchy-based login access. + - **Automatic reconciliation** + + Reconcile payments seamlessly at an invoice level. Your reconciliation reports are generated and sent automatically via email. + + +## Explore POS Device Suite + +Razorpay offers a POS device for every use case. Check out our device suite to find the best POS device for your business. + + +### All-in-one Devices + + + Choose from the following devices to accept payments via Cards, UPI and Bank EMI. + + #### Android Smart POS with printer + + The Android Smart POS comes with a printer, 2MP camera barcode scanner and fingerprint scanner. + + ![Android Smart POS device](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/android-smart-pos.jpg.md) + + - Best suited for countertop transactions. + - Seamlessly integrates with complex apps or existing systems.  + - Instant audio confirmation, e-receipt and paper billing options. + - Universal payment acceptance; Credit and debit cards (tap, dip or swipe), wallets, QR, EMI, Sodexo. + - PayDroid OS powered by Android 6.0 with 4G data network, Wi-Fi or Bluetooth. + + #### Android Smart Mini POS (Printer-less) + + The Android Smart Mini comes with a 2MP camera barcode scanner. Wireless and does not require integration. + + ![Android Smart POS Mini](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/android-smart-pos-mini.jpg.md) + + - Best suited for small stores. + - Ideal for busting long queues at store counters. + - Complete view of previous transactions for any period up to 2 years. + - Instant audio confirmation for QR and card payments. + - Small in size and wireless for payments on the go. + - PayDroid OS powered by Android 8.1 with 4G data network, Wi-Fi or Bluetooth. + + #### Mini POS + + The Mini POS device works with handsets, kiosks and PCs. + + ![Mini POS device](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/mPOS.jpg.md) + + - Best suited for delivery and collections. + - Syncs with your smartphone. + - Large four-line display for easy readability. + - Android 5.0 and above, Windows with Bluetooth and USB. + + + +### QR Devices + + Choose from the following devices to accept payments via UPI. + + #### Soundbox + + Listen to instant audio confirmation and view on-screen information as soon as the transaction is made. The Soundbox has a powerful battery life. + + ![POS Soundbox device](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pos-soundbox.jpg.md) + + - Clear and vibrant digital display. + - LED indicators to confirm connectivity. + - Sound notifications on updates and charging. + + #### Dynamic Soundbox + + Integrate and use the Dynamic Soundbox to automatically generate QR Codes. You can view the transactions instantly. + + ![POS Dynamic QR Code device](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pos-dqr.jpg.md) + + - Immediate audio and on-screen transaction confirmation. + - Seamless integration with billing solution. + - Instant view of transaction status. + - RTOS with 4G and Wi-fi. + + +### Next Step + +[Get started](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/quickstart.md) with Razorpay POS, buy the POS devices. diff --git a/llm-content/pos/android-smart-mini-pos.md b/llm-content/pos/android-smart-mini-pos.md new file mode 100644 index 00000000..b25a65a7 --- /dev/null +++ b/llm-content/pos/android-smart-mini-pos.md @@ -0,0 +1,241 @@ +--- +title: Android Smart Mini POS Devices +description: Compact form factor payment terminals maintaining essential payment processing capabilities with Android operating system. +--- + +# Android Smart Mini POS Devices + +Android Smart Mini POS devices offer compact form factors while maintaining essential payment processing capabilities powered by the Android operating system. These devices are designed for businesses that require portability without sacrificing functionality, making them ideal for mobile operations, small retail counters, and table-side payments. + + +### Advantages + + ### Portability + - **Lightweight Design** + + Significantly lighter than full-size terminals. + - **Compact Dimensions** + + Easy to carry and store. + - **Ergonomic Form Factor** + + Comfortable for extended use. + + ### Full Functionality + - **Complete Payment Processing** + + Support for all major payment methods. + - **Android Versatility** + + Access to a wide range of business applications. + - **High-Quality Displays** + + Clear, responsive touchscreens for easy operation. + + ### Connectivity + - **Multiple Options** + + 4G, WiFi, and Bluetooth capabilities. + - **Reliable Communications** + + Stable connections for transaction processing. + - **Remote Management** + + Ability to update and manage devices remotely. + + + +### Industry Applications + + Android Smart Mini POS devices are particularly suited for: + + ### Retail + - **Small Counters** + + Space-efficient solution for limited counter space. + - **Boutique Shops** + + Elegant design that complements upscale environments. + - **Pop-up Stores** + + Portable solution for temporary retail locations. + + ### Food & Beverage + - **Table Service** + + Bring the payment terminal directly to customers. + - **Quick Service** + + Efficient transactions in fast-paced environments. + - **Food Trucks** + + Compact solution for mobile food service. + + ### Field Services + - **Home Services** + + Professionals can accept payments at customers' locations. + - **Delivery Services** + + Reliable payment acceptance upon delivery. + - **Mobile Professionals** + + Lightweight solution for professionals on the move. + + ### Transportation + - **Taxis and Rideshares** + + Compact payment solution for in-vehicle use. + - **Public Transportation** + + Efficient ticketing and payment processing. + - **Tour Operators** + + Mobile payment acceptance for tour bookings. + + + +### Choosing the Right Android Smart Mini POS + + When selecting an Android Smart Mini POS device, consider: + + 1. **Size Requirements** + + Determine the optimal balance between screen size and portability. + + 2. **Processing Power** + + Select appropriate specifications based on transaction volume. + + 3. **Battery Life** + + Consider operational requirements for all-day usage. + + 4. **Connectivity Needs** + + Evaluate the necessary communication options for your environment. + + 5. **Additional Features** + + Identify specific requirements such as scanning or camera capabilities. + + +## Device Suite + + +### Aisino A80 + + Aisino A80 is a rugged, slim, and handy Android MiniPOS with a variety of connectivity options. + + ### Key Features + - **Rugged Design**: Slim and handy form factor with durable construction + - **High-Definition Display**: 5" IPS display with multi-point capacitive touchscreen + - **Secure Processing**: Quad-core high-performance secure CPU + - **Efficient Scanning**: Quick code scanning for 1D/2D QR codes + + ### Technical Specifications + + + Feature | Improvement + --- + **Operating System** | VanDroid Based on Android 10.0 + --- + **Processor** | Quad-core Cortex-A53, 1.4GHz + Secure Processor + --- + **Memory** | RAM: 1GB (Optional 2GB), FLASH: 8GB (Optional 16GB), Micro SD Card up to 128GB + --- + **Display** | 5" IPS Display, 1280x720 Pixels, Multi-point Capacitive Touchscreen + --- + **Communications** | 4G (Support 3G/2G), Bluetooth 4.2, Wi-Fi 2.4GHz (Optional 5GHz) + --- + **Card Readers** | Smart Card Reader, Contactless Card Reader + --- + **Camera** | 2MP Rear Camera (Optional: 5MP Rear Camera with Auto Focus, Flashlight, 1D/2D Scanning) + --- + **Battery** | 3000mAh + --- + **Dimensions** | 150 x 75 x 15.8mm (L×W×H) + --- + **Certifications** | PCI PTS 6.x, EMV L1&L2, EMV CL L1, and multiple payment scheme certifications + + + + +### PAX A50 + + The PAX A50 is a compact mini POS terminal with high security features and reliable performance. + + ### Key Features + - **Secure & Reliable**: High security standards with PCI PTS 5.x SRED certification + - **Flexible Memory Options**: Available with standard or expanded memory + - **HD Touchscreen**: 4.5" IPS WXGA HD touchscreen + - **Optional Cameras**: Rear and front-facing camera options + + ### Technical Specifications + + + Feature | Improvement + --- + **Operating System** | PayDroid powered by Android 8.1 or 10.0 + --- + **Processor** | ARM + Cortex A53 + 1.4 GHz + --- + **Memory** | 1GB DDR (Optional: 2GB), 8GB eMMC (Optional: 16GB) + --- + **Display** | 4.5" IPS WXGA HD touchscreen (720 x 1280 pixels) + --- + **Card Readers** | Chip & PIN, NFC Contactless + --- + **Camera** | 2MP rear-facing (Optional: 0.3MP front-facing and 5MP rear-facing) + --- + **Battery** | 2500mAh + --- + **Dimensions** | 138mm (L) * 69.5mm (W) * 12mm (H) + --- + **Weight** | 163g + + + + +### PAX A77 + + The PAX A77 is a cutting-edge mini POS terminal with future-proof features and high-end specifications. + + ### Key Features + - **Future-Proof Design**: Latest Android OS with expanded memory options + - **Advanced Camera System**: Multiple camera configurations with scanning capability + - **Extended Battery Life**: High-capacity battery options + - **Versatile Connectivity**: Multiple connectivity options including 5GHz WiFi + + ### Technical Specifications + + + Feature | Improvement + --- + **Operating System** | PayDroid Powered by Android 10 + --- + **Processor** | ARM + Cortex A53 + --- + **Memory** | 1GB DDR (Optional: 2GB), 8GB eMMC (Optional: 16GB) + --- + **Display** | 5.5" IPS HD+ 720 x 1440 Pixels Multi-Point Capacitive Touch Screen + --- + **Card Readers** | Chip & PIN, Contactless, Magnetic Stripe + --- + **Cameras** | 2MP Front-Facing + 5MP Rear-Facing + Scanner (Optional: 5MP Front-Facing + 13MP Rear-Facing + Scanner) + --- + **Battery** | 5150mAh (Optional: 3020mAh) + --- + **Dimensions** | 158.8mm (L) * 76.4mm (W) * 17.8mm (H) + --- + **Weight** | 273g + + + +> **INFO** +> +> +> **Note:** +> - All devices support Chip & PIN, Contactless, and Magnetic Stripe card reading technologies, and are certified with PCI security standards appropriate for their generation. +> - Devices with optional specifications are subject to stock availability. +> diff --git a/llm-content/pos/android-smart-pos.md b/llm-content/pos/android-smart-pos.md new file mode 100644 index 00000000..4efdb0b5 --- /dev/null +++ b/llm-content/pos/android-smart-pos.md @@ -0,0 +1,259 @@ +--- +title: Android Smart POS Devices +description: Full-featured payment terminals that combine the versatility of Android operating system with robust payment acceptance capabilities. +--- + +# Android Smart POS Devices + +Android Smart POS devices are full-featured payment terminals that combine the versatility of Android operating system and payment acceptance capabilities. These devices offer comprehensive functionality including integrated printers, barcode scanners, and high-resolution touchscreens, making them suitable for a wide range of business environments. + +## Industry Applications + +Android Smart POS devices are ideal for: + +- **Retail & Fashion**: High-volume transaction environments with customer-facing displays. +- **Food & Beverage**: Fast-paced environments requiring durability and quick transaction processing. +- **Transportation**: Mobile payment acceptance with robust connectivity options. +- **Field Services**: Comprehensive functionality for on-the-go businesses. + +> **INFO** +> +> +> **Note:** +> All devices support Chip & PIN, Contactless, and Magnetic Stripe card reading technologies, and are certified with PCI security standards appropriate for their generation. +> + +## Device Suite + + +### PAX A99 + + PAX A99 is a redesigned smart mobile payment terminal suitable for various industries including fashion, retail, food & beverage, and transportation. + + ### Key Features + - **Modern Design**: Available in Glacier Blue or Ivory White + - **Dual Screen Options**: Available in keypad, full screen, or dual screen versions + - **PCI Compliant**: PCI PTS 6.x SRED certified for secure transactions + - **Versatile Connectivity**: 4G/3G/2G + Wi-Fi + Bluetooth connectivity + + ### Technical Specifications + + + Feature | Improvement + --- + **Operating System** | PayDroid Powered by Android 12 + --- + **Processor** | Cortex A53 Quad-Core, 1.4GHz + Secure Processor + --- + **Memory** | 8GB eMMC Flash + 1GB DDR3 RAM (Extended MicroSD Card Slot up to 128GB) + --- + **Display** | 4" IPS WVGA (480 x 800 pixels) Two-Point Capacitive Touch Screen or 5" FW (480 x 854 pixels) Multi-Point Capacitive Touch Screen (varies by model) + --- + **Card Readers** | Chip & PIN, Contactless, Magnetic Stripe + --- + **Camera** | 0.3MP FF Rear Camera with Flashlight (Optional: 2MP FF Rear Camera) + --- + **Printer** | 80mm/sec, Paper Roll Outer Diameter: 40mm + --- + **Battery** | 5200mAh + --- + **Dimensions** | 182.7 x 80 x 51.5 mm + --- + **Weight** | 395g-407g (varies by model) + + + + +### PAX A910S + + PAX A910S is an Android SmartPOS mobile terminal with advanced features for various retail environments. + + ### Key Features + - **High Performance**: Available in Premium (Android 12) and Standard (Android 10/12) versions. + - **HD Display**: 5.5" or 5" HD display options. + - **Advanced Connectivity**: Multiple connectivity options including 5GHz WiFi. + - **High-Resolution Camera**: Up to 8MP autofocus rear camera. + + ### Technical Specifications + + + Feature | Improvement + --- + **Operating System** | PayDroid Powered by Android 12 (PREMIUM), PayDroid Powered by Android 10 or 12 (STANDARD) + --- + **Processor** | Cortex A55 Octa-Core, 1.6GHz + Secure Processor (PREMIUM), Varies by OS version (STANDARD) + --- + **Memory** | 2GB DDR4 RAM + 16GB eMMC Flash (Optional: 4GB/64GB) (PREMIUM), Varies by OS version (STANDARD) + --- + **Display** | 5.5" IPS HD+ 720 x 1440 Pixels (PREMIUM), 5" IPS HD 720 x 1280 Pixels (STANDARD) + --- + **Card Readers** | Chip & PIN, Contactless, Magnetic Stripe (Both models) + --- + **Camera** | 5MP FF Rear camera with front camera (PREMIUM), 2MP FF Rear camera only (STANDARD) + --- + **Printer** | 80mm/sec (Both models) + --- + **Battery** | 6700mAh (PREMIUM), 6700mAh (STANDARD) + --- + **Dimensions** | 172.8 x 78 x 62 mm (Both models) + --- + **Weight** | 361g (Both models) + + + + +### PAX A920 + + PAX A920 is an elegant smart mobile terminal with a sleek design and comprehensive features. + + ### Key Features + - **Elegant Design**: Streamlined form factor with ergonomic grip. + - **Dual Cameras**: Front and rear-facing cameras. + - **Advanced Connectivity**: 4G, WiFi, and Bluetooth connectivity. + - **Comprehensive Accessories**: Multiple charging base options with additional connectivity. + + ### Technical Specifications + + + Feature | Improvement + --- + **Operating System** | PAXBiz® Powered by Android 5.1 + --- + **Processor** | Cortex A7 + ARM + --- + **Memory** | 8GB eMMC Flash + 1GB DDR RAM (Optional: 16GB/2GB) + --- + **Display** | 5" IPS WXGA 720 x 1280 Pixels Multi-Point Capacitive HD Touch Screen + --- + **Card Readers** | Chip & PIN, NFC Contactless, Magnetic Stripe + --- + **Cameras** | 5MP Rear-Facing + 0.3MP Front-Facing + --- + **Printer** | 40 lines/sec, Paper Roll Outer Diameter: 40mm + --- + **Battery** | 5250mAh + --- + **Dimensions** | 175.7 x 78 x 57mm + --- + **Weight** | 458g (including battery) + + + + +### PAX A920Pro + + PAX A920Pro is a powerful smart mobile terminal with enhanced scanning capabilities and robust features. + + ### Key Features + - **Triple Camera System**: Front, rear, and dedicated top-side scanner. + - **Latest Security**: PCI PTS 6.x SRED certified (Android 10 version). + - **High-Resolution Display**: 5.5" HD+ display. + - **Versatile Connectivity**: Multiple connectivity options with optional 5GHz WiFi. + + ### Technical Specifications + + + Feature | Improvement + --- + **Operating System** | PayDroid Powered by Android 10.0 (PCI 6) or Android 8.1 (PCI 5) + --- + **Processor** | ARM Cortex A53 Quad-Core, 1.4GHz + Secure Processor + --- + **Memory** | 8GB eMMC Flash + 1GB DDR RAM (Optional: 16GB/2GB) + --- + **Display** | 5.5" IPS HD+ 720 x 1440 Pixels Multi-Point Capacitive Touch Screen + --- + **Card Readers** | Chip & PIN, Contactless, Magnetic Stripe + --- + **Cameras** | 5MP Front-Facing + 8MP Rear-Facing + Top-Side Barcode Scanner + --- + **Printer** | 40 lines/sec, Paper Roll Outer Diameter: 40mm + --- + **Battery** | 5150mAh + --- + **Dimensions** | 178.3 x 78 x 54.2mm + --- + **Weight** | 390g (including battery) + + + + +### Verifone X990 + + The Verifone X990 is a full-size payment terminal with a secure operating system and comprehensive features. + + ### Key Features + - **Secure Operating System**: Verifone Secure OS, AVOS Based on Android 10. + - **High-Resolution Display**: 5.5" color LCD with capacitive multi-touch. + - **Comprehensive Connectivity**: 4G/3G/2G + WiFi + Bluetooth. + - **Dual Cameras**: Front and rear cameras for various applications. + + ### Technical Specifications + + + Feature | Improvement + --- + **Operating System** | Verifone Secure OS, AVOS Based on Android 10 + --- + **Processor** | ARM + Cortex A53 + 1.4 GHz + --- + **Memory** | 1GB DDR (Optional: 2GB), 8GB eMMC (Optional: 16GB) + --- + **Display** | 5.5" Color LCD, Capacitive Multi-Touch Screen, LED Backlight + --- + **Card Readers** | Magstripe, Smart Card, Contactless + --- + **Cameras** | Front 0.3MP Fixed Focus, Rear 5MP Fixed Focus + --- + **Battery** | 5200mAh + --- + **Dimensions** | 193mm (L) * 84mm (W) * 64mm (H) + --- + **Weight** | 420g + + + + +### Telpo TPS900 + + The Telpo TPS900 is a full-size payment terminal with high-end specifications and multiple configuration options. + + ### Key Features + - **Flexible Configuration**: Multiple memory and camera options. + - **High Performance**: Latest Android OS with powerful processor. + - **Large Battery Options**: Standard and extended battery configurations. + - **Advanced Card Reading**: Support for all major card reading technologies. + + ### Technical Specifications + + + Feature | Improvement + --- + **Operating System** | Android 10 + --- + **Processor** | 1.3 GHz + --- + **Memory** | 1GB DDR (Optional: 2GB, 3GB), 8GB eMMC (Optional: 16GB, 32GB) + --- + **Display** | 5.5-inch, 720*1280 + --- + **Printer** | Thermal Printer, Paper width: 58mm, Print speed: 80mm/s + --- + **Connectivity** | 4G/3G/2G + WiFi + Bluetooth + --- + **Cameras** | Rear: 5MP (Optional: 13MP), Front: 2MP (Optional) + --- + **Card Readers** | Magnetic Card Reader, Smart Card Reader, Contactless Card Reader + --- + **Battery** | 5700mAh (Optional: 8360mAh) + --- + **Dimensions** | 208mm (L) * 82mm (W) * 52mm (H) + + + +> **INFO** +> +> +> **Note:** +> Devices with optional specifications are subject to stock availability. +> diff --git a/llm-content/pos/billme.md b/llm-content/pos/billme.md new file mode 100644 index 00000000..62ddfee3 --- /dev/null +++ b/llm-content/pos/billme.md @@ -0,0 +1,26 @@ +--- +title: Razorpay Billme - Dynamic Digital Billing Platform +heading: About Razorpay Billme +description: Simplify billing operations and turn every bill into an opportunity to engage, promote and build customer relationship. +--- + +# About Razorpay Billme + +**Razorpay Billme** is a comprehensive digital billing platform that transforms your billing operations into powerful customer engagement opportunities. Generate digital invoices, manage multiple stores, and gain real-time insights into sales performance while building stronger customer relationships through automated campaigns and feedback collection. + + +### Why Choose Billme + + - **Complete Digital Billing Solution**: Generate and deliver invoices instantly via SMS, email, or WhatsApp while accessing real-time sales data and store performance through a unified dashboard. + - **Automated Customer Engagement**: Set up intelligent campaigns that trigger personalised offers, surveys, and promotions based on customer behaviour, driving repeat purchases with minimal manual effort. + - **Multi-Store Management**: Effortlessly scale across single or multiple locations with centralised billing, customer profiling, and location-based campaign management. + - **Enhanced Customer Experience**: Collect actionable feedback through embedded surveys, manage complaints efficiently, and reward customers with targeted loyalty programmes and coupons. + - **Sustainable & Efficient Operations**: Eliminate paper receipts while tracking environmental impact, reduce operational costs, and streamline workflows with fully automated digital systems. + - **Business Intelligence**: Build detailed customer profiles using transaction data and demographics for targeted marketing, while monitoring live performance metrics for informed decision-making. + + +### Related Information + +- [Billme Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/billme/dashboard.md) +- [Bills](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/billme/dashboard/bills.md) +- [Razorpay Bills API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/bills.md) diff --git a/llm-content/pos/billme/appendix.md b/llm-content/pos/billme/appendix.md new file mode 100644 index 00000000..c4e56aa4 --- /dev/null +++ b/llm-content/pos/billme/appendix.md @@ -0,0 +1,358 @@ +--- +title: Appendix | Billme API +heading: Appendix +description: Supplementary information to help with Billme API integration. +--- + +# Appendix + +Additional information required to complete Billme API integration is mentioned below. + +### Supported Currencies + +Given below is the list of supported currencies for Billme APIs: + +S No. | Currency Code +--- +1 | AED +--- +2 | AFN +--- +3 | ALL +--- +4 | AMD +--- +5 | ANG +--- +6 | AOA +--- +7 | ARS +--- +8 | AUD +--- +9 | AWG +--- +10 | AZN +--- +11 | BAM +--- +12 | BBD +--- +13 | BDT +--- +14 | BGN +--- +15 | BHD +--- +16 | BIF +--- +17 | BMD +--- +18 | BND +--- +19 | BOB +--- +20 | BRL +--- +21 | BSD +--- +22 | BTC +--- +23 | BTN +--- +24 | BWP +--- +25 | BYN +--- +26 | BZD +--- +27 | CAD +--- +28 | CDF +--- +29 | CHF +--- +30 | CLF +--- +31 | CLP +--- +32 | CNH +--- +33 | CNY +--- +34 | COP +--- +35 | CRC +--- +36 | CUC +--- +37 | CUP +--- +38 | CVE +--- +39 | CZK +--- +40 | DJF +--- +41 | DKK +--- +42 | DOP +--- +43 | DZD +--- +44 | EGP +--- +45 | ERN +--- +46 | ETB +--- +47 | EUR +--- +48 | FJD +--- +49 | FKP +--- +50 | GBP +--- +51 | GEL +--- +52 | GGP +--- +53 | GHS +--- +54 | GIP +--- +55 | GMD +--- +56 | GNF +--- +57 | GTQ +--- +58 | GYD +--- +59 | HKD +--- +60 | HNL +--- +61 | HRK +--- +62 | HTG +--- +63 | HUF +--- +64 | IDR +--- +65 | ILS +--- +66 | IMP +--- +67 | INR +--- +68 | IQD +--- +69 | IRR +--- +70 | ISK +--- +71 | JEP +--- +72 | JMD +--- +73 | JOD +--- +74 | JPY +--- +75 | KES +--- +76 | KGS +--- +77 | KHR +--- +78 | KMF +--- +79 | KPW +--- +80 | KRW +--- +81 | KWD +--- +82 | KYD +--- +83 | KZT +--- +84 | LAK +--- +85 | LBP +--- +86 | LKR +--- +87 | LRD +--- +88 | LSL +--- +89 | LYD +--- +90 | MAD +--- +91 | MDL +--- +92 | MGA +--- +93 | MKD +--- +94 | MMK +--- +95 | MNT +--- +96 | MOP +--- +97 | MRO +--- +98 | MRU +--- +99 | MUR +--- +100 | MVR +--- +101 | MWK +--- +102 | MXN +--- +103 | MYR +--- +104 | MZN +--- +105 | NAD +--- +106 | NGN +--- +107 | NIO +--- +108 | NOK +--- +109 | NPR +--- +110 | NZD +--- +111 | OMR +--- +112 | PAB +--- +113 | PEN +--- +114 | PGK +--- +115 | PHP +--- +116 | PKR +--- +117 | PLN +--- +118 | PYG +--- +119 | QAR +--- +120 | RON +--- +121 | RSD +--- +122 | RUB +--- +123 | RWF +--- +124 | SAR +--- +125 | SBD +--- +126 | SCR +--- +127 | SDG +--- +128 | SEK +--- +129 | SGD +--- +130 | SHP +--- +131 | SLL +--- +132 | SOS +--- +133 | SRD +--- +134 | SSP +--- +135 | STD +--- +136 | STN +--- +137 | SVC +--- +138 | SYP +--- +139 | SZL +--- +140 | THB +--- +141 | TJS +--- +142 | TMT +--- +143 | TND +--- +144 | TOP +--- +145 | TRY +--- +146 | TTD +--- +147 | TWD +--- +148 | TZS +--- +149 | UAH +--- +150 | UGX +--- +151 | USD +--- +152 | UYU +--- +153 | UZS +--- +154 | VEF +--- +155 | VES +--- +156 | VND +--- +157 | VUV +--- +158 | WST +--- +159 | XAF +--- +160 | XAG +--- +161 | XAU +--- +162 | XCD +--- +163 | XDR +--- +164 | XOF +--- +165 | XPD +--- +166 | XPF +--- +167 | XPT +--- +168 | YER +--- +169 | ZAR +--- +170 | ZMW +--- +171 | ZWL +--- diff --git a/llm-content/pos/billme/dashboard.md b/llm-content/pos/billme/dashboard.md new file mode 100644 index 00000000..344d1c89 --- /dev/null +++ b/llm-content/pos/billme/dashboard.md @@ -0,0 +1,83 @@ +--- +title: Billme Dashboard Overview +heading: Billme Dashboard +description: Get a complete view of your store’s billing, customer engagement and campaign performance with Billme Dashboard. +--- + +# Billme Dashboard + +The **Razorpay Billme** Dashboard provides seamless access to digital bills, data insights, CRM tools, and customer retention features in one unified platform. It also enables effective marketing channels and an extensive feedback collection mechanism, facilitating visible business growth for businesses. + +The **Billme** Dashboard's homepage is your business summary page, providing real-time overview of all activities across Billme. It presents essential insights into billing, transactions, store performance, customer feedback and recent complaints. + +![Razorpay Billme Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/billme-live-dashboard.jpg.md) + +## Overview + +The homepage provides a central view of your business operations, bringing together key data from the entire Billme platform. It enables you to monitor the day’s performance at a glance, helping you make quick, informed decisions. + +The Dashboard homepage has the following sections. + +### Billing + +The Billing section displays cumulative sales data for the current day across all your stores. + +- **Total Sales** +Total value of sales generated today. + +- **Total Transactions** +Total number of transactions processed today. + +- **Average Billing** +The average value per transaction for today. + +### Transactions + +The Transactions section provides an overview of the type of transactions and your business’s environmental impact through digital billing. + +- **Billme Usage (%)** +Percentage of transactions completed using digital invoices via Billme. + +- **Print Usage (%)** +Percentage of transactions completed with printed receipts. + +- **Billme + Print Usage (%)** +Percentage of transactions where both digital and printed invoices were issued. + +- **Trees Saved (Lifetime)** +Total estimated number of trees saved by reducing paper usage via digital billing. + +- **CO₂ Savings (Lifetime)** +Total estimated carbon emissions reduction achieved over time. + +### Store Summary + +The Store Summary offers a snapshot of your operational footprint. + +- **Active Stores** +Total number of stores actively processing bills. + +- **Active Bill Campaigns** +Number of ongoing promotional campaigns running via bill advertisements. + +- **Active Journeys** +Number of customer journeys currently in progress, such as loyalty or engagement programmes. + +- **Company Balance** +The total available recharge balance in your company account. + +### Feedback & Complaints + +The Feedback & Complaints section displays a list of recent customer feedback entries and customer complaints received across your stores. If no new feedback has been received today, previously collected feedback is shown for reference. + +## Dashboard Menu + +Hover over to the left side of the page to see the dynamic **Billme** dashboard menu. + +![Razorpay Billme Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/billme-dashboard-menu.jpg.md) + +### Related Information + +- [About Billme](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/billme.md) +- [Bills](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/billme/dashboard/bills.md) +- [Communication Channel](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/billme/dashboard/communication-channel.md) diff --git a/llm-content/pos/billme/dashboard/bills.md b/llm-content/pos/billme/dashboard/bills.md new file mode 100644 index 00000000..37277415 --- /dev/null +++ b/llm-content/pos/billme/dashboard/bills.md @@ -0,0 +1,99 @@ +--- +title: Manage Bills +heading: Bills +description: Create, view and manage digital bills in real-time. Track transaction history and simplify customer billing. +--- + +# Bills + +You can view and manage all the bills that you have sent to your customers in the **Bills** page. It provides complete visibility into each transaction along with options to manage, search and export billing data. + +![Billme Dashboard Bills Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bill-me-bills-page.jpg.md) + +### Store Data +Under this tab, you can view storewise billing data with options to filter, view, export and manage the transactions. + +![Bills Page Store Data](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/store-data-bills.jpg.md) + +### Graphs +Under this tab, you can see a graphical representation of your businesses performance over a period of time. You can analyse the sales trend graphs with real-time sales data, leading to improved business strategy. + +![Bills Page Graphs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/graphs-page-bills.jpg.md) + +### Select Stores and Groups + +You can view and manage bills pertaining to specific stores and store groups. + +To select stores and store groups: + +1. On the top right corner of the bills page, click **Select Stores & Groups**. ![Select Stores and Groups](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/billme-select-stores.jpg.md) + The **Select Stores & Groups** page appears. + +2. Click on the checkboxes against the stores you want to select. You can **Search by Store Name** on the search box. You can sort the stores based on States, Cities, Companies, Brands and Store Status.![Select Stores and Groups Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/select-billme-stores.jpg.md) + +3. Click **Load Stores**. + The list of selected stores appears. + +4. To view Store Groups, on the **Select Stores & Groups** page, click **Store Groups**. + +### Search + +You can also search for specific bills by specifying search parameters such as invoice number, store code, phone number and email. + +To search for a specific bill: + +1. Select the search parameter.![Search Stores](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bills-search-function.jpg.md) + +2. Enter the parameter value in the **Search by Parameter** box and click the search icon. +The requested bill appears. + +### Filter + +The filter option allows you to narrow down the list of bills quickly based on relevance. You can filter particular bills based on date and time range, transaction type and amount range. + +To filter bills: + +1. Click the filter icon on the bills page.![Bills List Filter Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bills-filter-icon.jpg.md) + The filter options popup page appears. + +2. Click on the date section to select a date range. You can click on the checkboxes before the filter parameters to make it active.![Bills Filter Options Popup Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bills-filter-options.jpg.md) + +3. Click **Save**. + The filtered list of bills is displayed. + +### Export + +The export action enables businesses to download the actual bill for record-keeping or sharing. Businesses can export billing data in CSV format. Filters can be applied to ensure that only relevant data is included in the export. As per business rules: + +- Businesses must select a date range before exporting bill data. +- Exported reports are sent to the user’s registered email address. +- Exported reports are not downloaded directly onto the local machine. + +## Bills Table + +The main bills table displays the following details for each transaction: + +- **Store Name** +- **Store Code** +- **Invoice Number** +- **Phone Number** +- **Email** +- **Date and Time** +- **Invoice Date and Time** +- **Bill Amount** +- **Transaction Type** + +### View and Resend Bill + +The view button, represented by an “eye” icon, allows you to: + +- View transaction details +- Resend the bill to the same customer or to a different recipient via email or phone number + +### Delete + +The delete button allows businesses to delete their copy of the bill from the Billme system. The customer’s copy of the bill remains accessible even after deletion. + +### Navigation + +The **Next** and **Previous** buttons, located at the bottom right corner of the page, allow you to navigate through multiple pages of billing records to view earlier or more recent bills. diff --git a/llm-content/pos/billme/dashboard/communication-channel.md b/llm-content/pos/billme/dashboard/communication-channel.md new file mode 100644 index 00000000..ed1e2a95 --- /dev/null +++ b/llm-content/pos/billme/dashboard/communication-channel.md @@ -0,0 +1,24 @@ +--- +title: About Communication Channel +description: Engage with your customers with personalised promotions and offers across multiple communication channels +--- + +# About Communication Channel + +Razorpay Billme's multichannel marketing capabilities allow you to send targeted single or multi-channel campaigns featuring personalised offers, surveys and much more. You can personalise these campaigns to drive higher conversions and effectively engage your audience across various touchpoints. + +Plan customer journeys based on real-time behaviour, whether customers interact with your website, physical store or both. This deep understanding allows you to design your customer’s entire post-purchase journey with precision and relevance. + +## Integrated Communication Channels + +Here is a list of the communication channels integrated with Razorpay Billme: + +1. SMS +2. E-mail +3. WhatsApp +4. Digital Bills: + - Banner in bill + - Ad below bill + - Add Survey Button + - Self below bill + - Popup over bill diff --git a/llm-content/pos/billme/dashboard/communication-channel/all-campaigns.md b/llm-content/pos/billme/dashboard/communication-channel/all-campaigns.md new file mode 100644 index 00000000..ec8d724f --- /dev/null +++ b/llm-content/pos/billme/dashboard/communication-channel/all-campaigns.md @@ -0,0 +1,165 @@ +--- +title: All Campaigns +description: Launch marketing campaigns, send targeted promotions and track real-time insights to boost customer engagement using the Billme Campaigns dashboard. +--- + +# All Campaigns + +The **All Campaigns** page under the Communication Channel allows businesses to create, manage and analyse all types of campaigns across multiple formats. This page acts as a central hub where businesses can control every aspect of their ongoing, past and future campaigns. + +## Overview + +Businesses can view, filter and create new campaigns according to their marketing needs. They can customise campaigns and turn digital bills into effective marketing tools using: +- Redirectable and clickable images +- GIFs +- Carousels supporting multiple image formats +- Surveys on bills +- Coupons on bills +- YouTube videos on bills + +![All Campaigns Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/all-campaigns-page-lists.jpg.md) + +Here is the information provided for each campaign type: + +- Campaign Name +- Campaign Status (live, inactive or Draft) +- Campaign Description +- Campaign Type (Whatsapp, SMS, Ad Below Bill, Banner in Bill, etc) +- Date Created +- Date Updated + +## Available Actions + +There are various actions you can perform on this page. + +### Select Campaign Type + +To select a campaign type: + +- Click on the dropdown icon behind **Select Campaign Listing** and select the campaign type. +![Select Campaigns List Dropdown](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/select-campaigns-list.jpg.md) + +### Search Campaign + +You can search for a specific campaign. + +To search for a specific campaign: + +- Click on the search icon on the right side of the page and enter the campaign name. +![Search Campaigns Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/search-campaigns.jpg.md) + +### Filter Campaigns + +You can filter campaigns based on time range and status of the campaign. + +To filter campaigns: + +1. Click on the filter icon behind the search icon. The filter popup page appears.![Filter Campaigns Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/campaign-filters-page.jpg.md) +2. Select the **Campaign State** and click **Save**. You can select multiple states. +3. Click **Time Frame** and select the time range you want to filter.![Filter Campaigns By Time Frame](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/filter-campaign-time-range.jpg.md) + +### Actions + +You can edit, view, duplicate and delete campaigns. You can also view and unpublish the live campaigns. + +To perform an action against a particular campaign: + +- Hover over to the ellipsis icon against a particular campaign. An actions menu appears. +![Campaigns Actions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/campaigns-actions.jpg.md) + +#### Edit + +The edit action allows businesses to modify all campaign details, including content, audience and scheduling. + +#### Delete + +The delete action permanently removes a campaign. Once deleted, the campaign cannot be retrieved. + +#### View + +The view action provides complete campaign details, including advert content and campaign settings. Campaigns can be viewed in three categories: + +- **Draft Campaigns**: Designed but not yet published. +- **Inactive Campaigns**: Unpublished by the businesses. +- **Active Campaigns**: Currently live and visible to customers. + +#### Duplicate + +The duplicate action allows businesses to copy an existing campaign. They can rename and modify details before publishing the duplicated version. + +#### Unpublish + +Unpublishes the campaign, preventing it from appearing on any future digital bills generated after unpublishing. + +#### Unpublish for All + +Unpublishes the campaign from both new and previously generated bills, removing its visibility completely. + +### New Campaign + +You can create a new campaign on this page. + +To create a new campaign: + +1. Click **New Campaign**. ![Campaigns Actions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/new-campaigns-option.jpg.md) +2. Select the Campaign type you want to create. +3. Enter the campaign name, description and other relevant details on the next page. +4. Preview your campaign, make any final changes and publish. + +### Types of Campaigns + +On the Billme dashboard, businesses can create various types of campaigns tailored for different communication channels and marketing goals: + +#### SMS Campaign + +Businesses can design targeted SMS campaigns. They control the messaging, targeted customer segment, start time and duration of the campaign. + +#### Email Campaign + +Businesses can create detailed email campaigns by defining the message, selecting the target segment, setting launch dates and previewing how the email will appear before publishing. + +#### Banner in Bill Campaign + +Businesses can create banners within digital bills by: + +- Filling in campaign details +- Designing banners using drag and drop elements +- Selecting brand and store +- Publishing immediately or scheduling for later +- Previewing before publishing + +#### Ad Below Bill + +Businesses can run ads below digital bills using: + +- Images +- GIFs +- Carousels +- YouTube videos + +The process includes adding campaign details, selecting stores, scheduling, previewing and publishing. + +#### Add Survey Button + +Businesses can add a survey button below the bill by: + +- Adding campaign details and selecting the survey +- Designing the survey button using drag and drop elements +- Adding supporting messages in JPG or GIF format +- Selecting brand and store +- Scheduling and publishing after preview + +#### Sell Below the Bill + +Businesses can upload a PDF file that appears below the bill. They provide campaign details, upload the file, select brand and store and then publish immediately or schedule for later. + +#### Popup Over Bill + +Businesses can create popups that appear over digital bills by: + +- Providing campaign details +- Designing the popup using drag and drop (image, GIF, carousel, YouTube or video) +- Configuring popup behaviour (immediate or delayed display) +- Adding redirect links +- Selecting brand and store +- Scheduling, previewing and publishing diff --git a/llm-content/pos/billme/dashboard/communication-channel/digital-bills.md b/llm-content/pos/billme/dashboard/communication-channel/digital-bills.md new file mode 100644 index 00000000..1afa12da --- /dev/null +++ b/llm-content/pos/billme/dashboard/communication-channel/digital-bills.md @@ -0,0 +1,58 @@ +--- +title: Digital Bills +heading: About Digital Bills +description: Customise your digital bills with banners, surveys, upsells and popups to boost engagement and retention. +--- + +# About Digital Bills + +Deliver smart, interactive digital bills with Razorpay Billme. Go beyond static receipts and add elements like banners, surveys, offers and popups to turn every bill into an opportunity for engagement or conversion. + +Billme’s Digital Bills act as a dynamic post-purchase canvas, allowing you to embed promotions, collect feedback, upsell products or redirect customers to actions like referrals or reorders. + +Below are the available enhancement options: + +| Feature Name | Description | Use Cases | Features | +--- +**Banner in Bill** | - Display a static or dynamic promotional banner right on top of the digital bill +- Ideal for announcements, limited-time offers or product highlights + | - Notify customers about upcoming sales +- Showcase referral or loyalty programs +- Cross-sell services or upgrades + | - Upload custom images or use preset templates +- Add clickable links to redirect users +- Schedule banner visibility by date/time + +--- +**Ad Below Bill** | - Place a visual advertisement or offer at the bottom of the digital bill +- Useful for subtle promotion without interrupting billing visibility + | - Promote partner brands or affiliate products +- Display discount codes for future purchases +- Announce store openings or launches + | - Supports image and text creatives +- Optional CTA with tracking link +- Auto-rotate ads for A/B testing + +--- +**Add Survey Button** | Embed a one-click feedback or survey button in your bill to capture customer sentiment immediately after a transaction. | - Collect NPS or CSAT ratings +- Ask product- or service-specific questions +- Trigger review collection for high scores + | - Supports custom survey tools or Billme native forms +- Real-time response tracking on dashboard +- Customisable placement and button text + +--- +**Sell Below Bill** | Enable one-click post-purchase upselling or cross-selling directly below the digital bill content. | - Offer add-ons or complementary products +- Suggest subscription plans or repeat buys +- Flash-sell limited stock items + | - Showcase product cards with pricing and CTA +- Instant purchase or redirect to cart +- Inventory-based display logic + +--- +**Popup Over Bill** | Trigger a full-screen or modal popup immediately after the bill is viewed, ideal for capturing immediate attention. | - Time-sensitive offers or coupon reveals +- Prompt to join loyalty program or sign up +- Display important updates or feedback requests + | - Fully customisable popup layout and timing +- Supports images, GIFs, buttons and forms +- Optional frequency cap and targeting rules diff --git a/llm-content/pos/billme/dashboard/communication-channel/digital-bills/ad-below-bill.md b/llm-content/pos/billme/dashboard/communication-channel/digital-bills/ad-below-bill.md new file mode 100644 index 00000000..5ec37f06 --- /dev/null +++ b/llm-content/pos/billme/dashboard/communication-channel/digital-bills/ad-below-bill.md @@ -0,0 +1,24 @@ +--- +title: Ad Below Bill +description: Add promotional ads to digital bills with image upload, clickable links and automated rotation to boost sales and customer engagement. +--- + +# Ad Below Bill + +Place ads at the bottom of your digital bills to promote partner brands, share discount codes or announce new store openings without disrupting the billing experience. Upload images or add text messages with clickable links to drive traffic and sales. Set up multiple ads to rotate automatically and test which ones work best for your customers. + +## Create New Ad Below Bill Campaign + +To create a new Ad Below Bill Campaign: + +1. Click **Ad Below Bill** under **Digital Bills**. The **Ad Below Bill** page appears with the list of all Ad Below Bills campaigns. +2. Click **+ New Ad Below Bill Campaign**. The **Ad Below Bill - New Campaign** page appears. +3. Enter the **Campaign Details**, select company and click **Next Step**. The **Advert Builder** page appears. + - You can add ad components such as images, Carousels, GIFs, Videos or YouTube Videos. + - You can choose media directly from your recent uploads. + - You can also add any coupons on the ad. +4. Select an image for more options such as adding redirect url, survey url or custom url. Click **Next Step**. +5. On the **Campaign Settings** page, select your **Brand** and **Stores**. You can also choose to publish the campaign immediately or schedule it. Click **Next Step**. +6. On the **Preview & Publish** page you can check all campaign details. Click **Export Report** and enter your email to opt for exporting campaign reports. Click **Publish**. + +Your **Ad Below Bill** Campaign is published and appears in the list of campaigns. diff --git a/llm-content/pos/billme/dashboard/communication-channel/digital-bills/add-survey-button.md b/llm-content/pos/billme/dashboard/communication-channel/digital-bills/add-survey-button.md new file mode 100644 index 00000000..0a95d97b --- /dev/null +++ b/llm-content/pos/billme/dashboard/communication-channel/digital-bills/add-survey-button.md @@ -0,0 +1,25 @@ +--- +title: Add Survey Button +description: Add survey buttons to digital bills for instant customer feedback collection with satisfaction ratings and real-time response tracking. +--- + +# Add Survey Button + +Add a one-click survey button to your digital bills to collect customer feedback right after they view their transaction. Gather NPS scores, satisfaction ratings or product reviews when customers are most engaged. Track responses in real-time and customise button placement and text to match your brand. + +## Create New Add Survey Button Campaign + +To create a new Add Survey Button Campaign: + +1. Click **Add Survey Button** under **Digital Bills**. +2. Click **+ New Add Survey Button Campaign**. The **Add Survey Button - New Campaign** page appears. +3. Enter the **Campaign Details**, select company and click **Next Step**. The **Select Survey** page appears. + - You can search and select a previously created survey. + - You can create a survey from the **Survey** feature under **Create** section. + ![Select Survey for Add Survey Button](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/select-survey-add-survey-button.jpg.md) +4. On the **Survey Button Builder** page, choose an image for your survey button. You can also click **Create From Scratch** to upload a new button image. Click **Next Step**. +5. On the **After Survey** page, select an image or gif which appears right after survey completion. You can upload a new image. You can also add a **Coupon**. Click **Next Step**. +6. On the **Campaign Settings** page, select your **Brand** and **Stores**. You can also choose to publish the campaign immediately or schedule it. Click **Next Step**. +7. On the **Preview & Publish** page you can check all campaign details. Click **Export Report** and enter your email to opt for exporting campaign reports. Click **Publish**. + +Your **Add Survey Button** Campaign is published and appears in the list of campaigns. diff --git a/llm-content/pos/billme/dashboard/communication-channel/digital-bills/banner-in-bills.md b/llm-content/pos/billme/dashboard/communication-channel/digital-bills/banner-in-bills.md new file mode 100644 index 00000000..a9dba607 --- /dev/null +++ b/llm-content/pos/billme/dashboard/communication-channel/digital-bills/banner-in-bills.md @@ -0,0 +1,29 @@ +--- +title: Banner in Bills +description: Customise your digital bills with banners, announcements, limited-time offers or product highlights, to boost engagement and retention. +--- + +# Banner in Bills + +Add eye-catching banners to the top of your digital bills to promote sales, announce special offers or showcase new services. Upload your own images or choose from ready-made templates, include clickable links and set when your banners appear. It's an easy way to reach customers and grow your business right from your bills. + +## Create New Banner In Bill Campaign + +To create a new Banner in Bill Campaign: + +1. Click **Banner in Bill** under **Digital Bills**. The **Banner In Bill** page appears with the list of all banner in bills campaigns. + ![Banner In Bills Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/banner-in-bill-page.jpg.md) +2. Click **+ New Banner In Bill Campaign**. The **Banner in Bill - New Campaign** page appears. + ![Create Banner In Bills](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-banner-in-bill.jpg.md) +3. Enter the **Campaign Details**, select company and click **Next Step**. The **Banner Builder** page appears. + - You can add banner components such as images, Carousels or GIFs. + - You can choose media directly from your recent uploads. + - You can also add any coupons on the banner. + ![Build Your Banner In Bills](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/banner-builder-banner-in-bill.jpg.md) +4. Select an image for more options such as adding redirect url, survey url or custom url. Click **Next Step**. + ![Embed URLs in Your Banner In Bills](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/banner-builder-embed-urls.jpg.md) +5. On the **Campaign Settings** page, select your **Brand** and **Stores**. You can also choose to publish the campaign immediately or schedule it. Click **Next Step**. + ![Campaign Settings in Banner In Bill](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/campaign-settings-banner-in-bill.jpg.md) +6. On the **Preview & Publish** page you can check all campaign details. Click **Export Report** and enter your email to opt for exporting campaign reports. Click **Publish**. + ![Preview and Publish Banner In Bill](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/preview-pane-banner-in-bills.jpg.md) +Your **Banner In Bill** Campaign is published and appears in the list of campaigns. diff --git a/llm-content/pos/billme/dashboard/communication-channel/digital-bills/popup-over-bill.md b/llm-content/pos/billme/dashboard/communication-channel/digital-bills/popup-over-bill.md new file mode 100644 index 00000000..d6a05bb3 --- /dev/null +++ b/llm-content/pos/billme/dashboard/communication-channel/digital-bills/popup-over-bill.md @@ -0,0 +1,30 @@ +--- +title: Popup Over Bill +description: Add attention-grabbing popups to digital bills for time-sensitive offers, loyalty signups and important announcements with custom design options. +--- + +# Popup Over Bill + +Display a full-screen popup immediately after customers view their bill to capture instant attention for important offers or announcements. Perfect for time-sensitive deals, loyalty program signups or urgent updates that need immediate visibility. Customise the popup design with images, buttons and forms, plus control when and how often customers see them. + +## Create New Popup Over Bill Campaign + +To create a new Popup Over Bill Campaign: + +1. Click **Popup Over Bill** under **Digital Bills**. The **Popup Over Bill** page appears with the list of all Popup Over Bill campaigns. +2. Click **+ New Popup Over Bill Campaign**. The **Popup Over Bill - New Campaign** page appears. +3. Enter the **Campaign Details**, select company and click **Next Step**. The **Popup** page appears. + - You can add ad components such as images, Carousels, GIFs, Videos or YouTube Videos. + - You can choose media directly from your recent uploads. + - You can also add any coupons on the ad. +4. Select an image for more options such as adding redirect url, survey url or custom url. Click **Next Step**. + The **Popup Settings** page appears. + ![Configure Popup Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/popup-settings-popup-over-bill.jpg.md) +5. On the **Popup Settings** page, you can: + - configure when to show the popup - immediately or after 'n' seconds. + - configure when to show the close popup button. + - add a custom redirect button. +4. On the **Campaign Settings** page, select your **Brand** and **Stores**. You can also choose to publish the campaign immediately or schedule it. Click **Next Step**. +5. On the **Preview & Publish** page you can check all campaign details. Click **Export Report** and enter your email to opt for exporting campaign reports. Click **Publish**. + +Your **Popup Over Bill** Campaign is published and appears in the list of campaigns. diff --git a/llm-content/pos/billme/dashboard/communication-channel/digital-bills/sell-below-bill.md b/llm-content/pos/billme/dashboard/communication-channel/digital-bills/sell-below-bill.md new file mode 100644 index 00000000..b71201d6 --- /dev/null +++ b/llm-content/pos/billme/dashboard/communication-channel/digital-bills/sell-below-bill.md @@ -0,0 +1,22 @@ +--- +title: Sell Below Bill +description: Add product recommendations below digital bills for instant upselling with one-click purchases and smart inventory-based displays. +--- + +# Sell Below Bill + +Add one-click product recommendations below your digital bills to boost sales with complementary items or upgrades. Show product cards with prices and buy buttons that let customers purchase instantly or add items to their cart. Perfect for offering add-ons, subscription plans or limited-time deals right when customers finish reviewing their bill. + +## Create New Sell Below Bill Campaign + +To create a new Sell Below Bill Campaign: + +1. Click **Sell Below Bill** under **Digital Bills**. The **Sell Below Bill** page appears with the list of all Sell Below Bill campaigns. +2. Click **+ New Sell Below Bill Campaign**. The **Sell Below Bill - New Campaign** page appears. +3. Enter the **Campaign Details**, select company and click **Next Step**. The **PDF Upload** page appears. + - You can upload a PDF of your product catalogue to display below each invoice. + ![Upload Catalogue PDF for Sell Below Bill Campaign ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pdf-upload-sell-below-bill.jpg.md) +4. On the **Campaign Settings** page, select your **Brand** and **Stores**. You can also choose to publish the campaign immediately or schedule it. Click **Next Step**. +5. On the **Preview & Publish** page you can check all campaign details. Click **Export Report** and enter your email to opt for exporting campaign reports. Click **Publish**. + +Your **Sell Below Bill** Campaign is published and appears in the list of campaigns. diff --git a/llm-content/pos/billme/dashboard/communication-channel/email.md b/llm-content/pos/billme/dashboard/communication-channel/email.md new file mode 100644 index 00000000..7701bcbd --- /dev/null +++ b/llm-content/pos/billme/dashboard/communication-channel/email.md @@ -0,0 +1,43 @@ +--- +title: Email Campaigns +description: Send automated, targeted email campaigns based on billing events, feedback and customer behaviour. +--- + +# Email Campaigns + +Create and manage effective post-purchase email campaigns using Razorpay Billme. Use customer purchase history, billing triggers and feedback responses to automate personalised email workflows. + +## Overview + +The Email Campaigns section allows you to set up targeted campaigns based on billing events such as successful purchases, feedback submissions and delayed payments. Segment your customers using smart filters and send personalised updates, offers and service notifications automatically. + +To access Email campaigns page: + +1. Select **E-mail** under **Communication Channel** in the left navigation menu. +2. Alternatively, you can also select **E-mail** in the **Select Campaign Listing** dropdown on the **All Campaigns** page. + +![Email Campaigns List](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/email-campaigns-list.jpg.md) + +## Create New Email Campaign + +To create a new email campaign: + +1. Click **+ New E-mail Campaign**. + The **Email - New Campaign** page appears. +2. Enter the Campaign Name, Description and select your Company. Select the **Email Route** and choose to either send the email by a name or an Email ID. Click **Next Step**. + ![Create New Email Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-email-campaign.jpg.md) + - Click **Add New** to configure an email service provider of your choice. + ![Select Provider for New Email Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/select-email-provider.jpg.md) +3. On the **Message** page, customise your email message with dynamic design options. Click **Next Step**. + ![Customise Message of Your Email Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/message-email-campaign.jpg.md) + - For example, drag and drop **Text** from the **Components** pane to the board and enter your text. + ![Customise the Text of Your Email Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/design-your-email-campaign.jpg.md) +4. On the **Whom To Send** page, select or upload a list of customers. Click **Next Step**. + ![Select Whom To Send Email Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/select-receivers-email-campaign.jpg.md) + - To upload a new list of customers, click **Upload New Data** and upload a CSV file. + ![Bulk Upload Receivers for Your Email Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bulk-upload-receivers-email.jpg.md) +5. On the **When To Send** page, select the time and date on which you want to send the email campaign. You have the option to select **Send Now**, **Send Later** and **Recurring**. Configure the timelines and click **Next Step**. + ![Select When To Send Email Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/when-to-send-email-campaign.jpg.md) +6. Preview the details of your email campaign and click **Publish**. + ![Preview and Publish Email Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/preview-email-campaign.jpg.md) + The Email Campaign is published and appears in the list of email campaigns. diff --git a/llm-content/pos/billme/dashboard/communication-channel/sms.md b/llm-content/pos/billme/dashboard/communication-channel/sms.md new file mode 100644 index 00000000..2f4b673a --- /dev/null +++ b/llm-content/pos/billme/dashboard/communication-channel/sms.md @@ -0,0 +1,52 @@ +--- +title: SMS Campaigns +description: Deliver timely messages through SMS for bills, offers and customer feedback. +--- + +# SMS Campaigns + +Reach customers instantly using SMS campaigns via Razorpay Billme. Share digital bills, send feedback prompts or offer promotions with short, effective messages. + +> **INFO** +> +> +> **Handy Tips** +> +> TRAI regulations require you to link your SMS service provider's Telemarketer ID with your DLT account when using SMS for campaigns. Complete this step to ensure SMS delivery as messages will not be delivered without it. +> + +## Overview + +SMS Campaigns are ideal for high-speed, high-visibility communication. Use Billme to automate transactional or promotional SMS based on billing events or customer actions. + +To access SMS campaigns page: + +1. Select **SMS** under **Communication Channel** in the left navigation menu. +2. Alternatively, you can also select **SMS** in the **Select Campaign Listing** dropdown on the **All Campaigns** page. + +![SMS Campaigns List](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sms-campaigns-page-cc.jpg.md) + +## Create New SMS Campaign + +To create a new SMS Campaign: + +1. Click **+ New SMS Campaign**. + The **SMS - New Campaign** page appears. +2. Enter the Campaign Name and Description, select your Company and Content Type and click **Next Step**. + Content Type can be: + - Promotional: Select for SMS Campaigns with promotions and ads. + - Service Explicit: Select to communicate service information such as activation or expiry of a service. + ![Create New SMS Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-new-sms-campaign.jpg.md) +3. Select or upload **Sender ID** and **Template**. Click **Next Step**. + ![Sender ID and Template of SMS Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-sms-upload-sender-id.jpg.md) +4. Enter the message and select the variable attributes if any. Click **Next Step**. + ![The Message of SMS Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-sms-message.jpg.md) +5. Select **Whom To Send** on this page and click **Next Step**. You can: + 1. Select **Uploaded Data** and add/upload the list of receivers for the SMS Campaigns. + 2. Select **Segmentation** and choose a specific customer segment for the SMS Campaigns. You can also add and select a new customer segment. + ![Select Whom To Send SMS Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-sms-whom-to-send.jpg.md) +6. Select **When To Send** on this page. You have the option to select **Send Now**, **Send Later** and **Recurring**. Configure the timelines and click **Next Step**. + ![Select When To Send SMS Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-sms-when-to-send.jpg.md) +7. Preview the SMS Campaign and test it on a valid phone number. You can only test it once. Click **Publish** to publish the campaign. + ![Preview and Publish the SMS Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-sms-preview.jpg.md) + The Published Campaign appears on the list of campaigns. diff --git a/llm-content/pos/billme/dashboard/communication-channel/whatsapp.md b/llm-content/pos/billme/dashboard/communication-channel/whatsapp.md new file mode 100644 index 00000000..48eed216 --- /dev/null +++ b/llm-content/pos/billme/dashboard/communication-channel/whatsapp.md @@ -0,0 +1,63 @@ +--- +title: WhatsApp Campaigns +description: Engage customers directly on WhatsApp with digital bills, feedback links and promotional messages. +--- + +# WhatsApp Campaigns + +Send high-engagement WhatsApp messages through Razorpay Billme. Share digital bills, service updates and post-purchase surveys with customers in real time. + +## Overview + +WhatsApp Campaigns offer a high-conversion channel to reach customers where they are most active. Send digital bills, payment confirmations, feedback requests or limited-time offers via verified WhatsApp messages. + +To access WhatsApp campaigns page: + +1. Select **WhatsApp** under **Communication Channel** in the left navigation menu. +2. Alternatively, you can also select **WhatsApp** in the **Select Campaign Listing** drop down menu on the **All Campaigns** page. +![WhatsApp Campaigns List](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/whatsapp-campaigns-list.jpg.md) + +## Create New WhatsApp Campaign + +To create a new whatsApp campaign: + +1. Click **+ New WhatsApp Campaign**. + The **WhatsApp - New Campaign** page appears. +2. Enter the Campaign Name and Description, select your Company and click **Next Step**. + ![Create a New WhatsApp Campaigns](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-whatsapp-campaign.jpg.md) +3. On the **Select Template** page, select a template for your WhatsApp campaign message and click **Next Step**. + ![Select a Template for WhatsApp Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/select-template-whatsapp.jpg.md) +4. On the **Message** page, enter the url of your pre-uploaded media, template header and footer, variable attributes of your message and select **Dark** or **Light** theme on the **Preview** pane. Click **Next Step**. + ![Customise Your Message for WhatsApp Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/message-whatsapp-campaign.jpg.md) +5. On the **Whom To Send** page, select your recipients from either **Uploaded Data** or any customer segment. You can also **Add New Segment** or **Upload Data**. Click **Next Step**. + ![Select Whom To Send WhatsApp Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/whom-to-send-whatsapp.jpg.md) + - Click **Add New Segment** to create a new customer segment. The **Create Segment** page appears. + ![Create Customer Segment for WhatsApp Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-customer-segment-page.jpg.md) + - Configure the customer segment you want to select for your WhatsApp campaign and click **Save**. +6. On the **When To Send** page, select the time and date on which you want to send the email campaign. You have the option to select **Send Now**, **Send Later** and **Recurring**. Select the timelines and click **Next Step**. + ![Select When To Send WhatsApp Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/when-to-send-whatsapp-message.jpg.md) +7. Preview the SMS Campaign and test it on a valid phone number. Click **Publish** to take the campaign live. + ![Preview and Publish WhatsApp Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/preview-and-publish-whatsapp.jpg.md) +Your new WhatsApp campaign is created and appears in the list of WhatsApp campaigns. + +## Templates + +You can create and manage your WhatsApp templates in multiple languages. + +To access WhatsApp templates: + +- Click **Templates** on the **WhatsApp** Campaigns page. + ![Preview and Publish WhatsApp Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/templates-whatsapp-campaigns.jpg.md) + +### Create a New Template + +To create a new template: + +1. Click **+New WhatsApp Template**. + ![Create WhatsApp Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-whatsapp-template.jpg.md) +2. Select your WhatsApp Account, enter the template name and description and select template category. Click **Next Step**. +3. Select the template language and **Template Type**. enter the **Content** details such as header, body and footer. You can also add a **Quick Reply** or a **Call to Action** button. Click **Next Step**. + ![Content for WhatsApp Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-content-whatsapp.jpg.md) +4. On the **Preview & Submit** page, click **Add Sample Content** to add the variables in the message. + ![Preview and Publish WhatsApp Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/preview-whatsapp-campaign.jpg.md) +5. Click **Publish** to take the template **live**. The new WhatsApp template appears in the list of WhatsApp templates and can be selected while creating a WhatsApp campaign. diff --git a/llm-content/pos/billme/dashboard/consumer-profiling.md b/llm-content/pos/billme/dashboard/consumer-profiling.md new file mode 100644 index 00000000..f06a6ea8 --- /dev/null +++ b/llm-content/pos/billme/dashboard/consumer-profiling.md @@ -0,0 +1,112 @@ +--- +title: Consumer Profiling +description: Create rich, dynamic customer profiles using purchase history, demographics and behaviour insights to enable smarter segmentation and precise targeting. +--- + +# Consumer Profiling + +The Consumer Profiling section helps businesses build rich, dynamic customer profiles by leveraging Billme’s integrated CRM and data platform. It enables seamless collection, storage and segmentation of customer data such as purchase history, demographics and behaviour, turning raw inputs into actionable insights. + +With this data, businesses can create detailed customer databases for personalisation, targeted marketing and improved engagement. The dashboard displays key customer details such as **Total Visits**, **Last Visit** and **Average Billing Amount** along with basic details, which can be exported for deeper analysis. + +### Ways to Collect Customer Data + +- **Manually**: Businesses can enter or upload customer details directly into the Consumer Profiling dashboard. + +- **Surveys**: Surveys integrated into Billme-powered digital bills allow customers to voluntarily share information during their post-purchase journey. This data is automatically captured and stored for future use. + +By understanding customer preferences and behaviour, you can drive loyalty, craft personalised experiences and boost revenue. + +### Key Capabilities + +- **Precise Data Collection and Segmentation**: Billme's digital bill-powered CRM ensures accurate collection of customer data. This data forms the basis for intelligent segmentation, allowing you to categorise your audience into meaningful groups for targeted efforts. + +- **Customer Insights Module**: Access a comprehensive range of customer data points through the dedicated Customer Insights module. This includes: + - Phone Number + - Email Address + - Customer Name + - Age + - Gender + - Region + - Marital Status + - Total Visits + - Last Visit + - Total Spend + - Average Spend + - Average Feedback + - Feedbacks Given + - Operating System (OS) + +- **Actionable Personalisation**: With deep customer understanding, you can create and deploy highly personalised marketing campaigns across all your segments. This ensures your messages resonate directly with individual customer needs and behaviours, leading to higher engagement and conversion rates. + +## Features + +Consumer Profiling section offers numerous features as explained below: + +### Consumer Profiling Table + +The main table lists: + +- Customer Name +- Age +- Gender +- Contact Details + +You can click on customer details to view additional information. + +### Filter + +You can filter the consumer profiles you want for business analysis or targeted marketing campaigns. +You can easily filter customer data based on: + +- Age +- Gender +- Relationship +- States +- Average Spend +- Total Spend +- Total Visit + +![Filter Consumer Profiles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/filter-consumer-profiles.jpg.md) + +### Export + +The export feature allows businesses to export detailed customer information in CSV format. Exported data can be filtered by: + +- Age +- Gender +- Relationship +- States +- Average Spend +- Total Spend +- Total Visit +- Emails + +![Filter Consumer Profiles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/export-filters-consumer-profiles.jpg.md) + +## Add / Upload + +Businesses can add or upload new customer data using the following two options: + +### Add New Customer + +Add individual customer details directly into the system using a form. + +![Add Consumer Profiles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/manually-add-consumer-profile.jpg.md) + +### Upload Bulk Consumer Profiles + +Bulk upload customer data by downloading the sample CSV template, filling in customer information and uploading it back into the system. + +![Add Consumer Profiles in Bulk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bulk-upload-consumer-profiles.jpg.md) + +#### Upload Instructions + +When uploading customer data, businesses should follow these important guidelines: + +- Do not delete or change the position of the headers in the sample CSV file. +- Do not add country codes with phone numbers. +- Do not use capital letters for city and state fields. +- Use capital letters only for names, professions, company names and spouse names. +- Use the **DD/MM/YY** format for date of birth and anniversary. +- Ensure you follow the additional instructions provided in the system before uploading data. diff --git a/llm-content/pos/billme/dashboard/create.md b/llm-content/pos/billme/dashboard/create.md new file mode 100644 index 00000000..cd534b60 --- /dev/null +++ b/llm-content/pos/billme/dashboard/create.md @@ -0,0 +1,30 @@ +--- +title: About Create +heading: Overview +description: Get started with creating and managing Auto Engagement Journeys, Surveys and Coupons within the Billme dashboard. +--- + +# Overview + +The **Create** section is your central hub for building and customising essential customer interaction tools within Billme. You can design powerful automated communication sequences, craft insightful feedback mechanisms and generate strategic promotional offers, all from one intuitive interface. + +This dedicated area empowers you to bring your engagement strategies to life, ensuring every customer touchpoint is purposeful and contributes to loyalty and revenue growth. Explore the options below to begin shaping your unique customer experiences. + +## What You Can Create + +You can create - Auto Engagement Journeys, Surveys and Coupons. + +### Auto Engagement +Automate personalised, multi-channel communication flows based on customer behaviour. These journeys are designed to boost loyalty, drive repeat purchases and enhance brand recall across SMS, Email, WhatsApp and more. + +![Auto Engagement Sample Journey](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/auto-eng-journey-overview.jpg.md) + +### Surveys +Build and deploy tailored survey campaigns to collect valuable, actionable insights directly from your customers. Distribute these surveys across various channels, including digital bills, to understand preferences and satisfaction. + +![Auto Engagement Sample Survey](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/auto-eng-sample-survey.jpg.md) + +### Coupons +Generate and manage custom discount codes or upload your existing coupons. Integrate these promotional offers into your campaigns to incentivise purchases and reward customer loyalty efficiently. + +![Auto Engagement Sample Coupon](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/auto-eng-sample-coupon.jpg.md) diff --git a/llm-content/pos/billme/dashboard/create/auto-engagement.md b/llm-content/pos/billme/dashboard/create/auto-engagement.md new file mode 100644 index 00000000..81191bf2 --- /dev/null +++ b/llm-content/pos/billme/dashboard/create/auto-engagement.md @@ -0,0 +1,218 @@ +--- +title: Automated Customer Engagement +heading: Auto Engagement +description: Automatically trigger promotions and campaigns based on customer actions and behaviour. +--- + +# Auto Engagement + +The Auto Engagement feature, also known as Journey Builder, allows brands to build powerful, personalised post-purchase marketing journeys that enhance customer loyalty, drive repeat purchases and increase overall revenue. + +![Auto Engagement Campaigns List](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/auto-engagement-page.jpg.md) + +## Overview + +The AutoEngagement feature in BillMe enables businesses to create automated, multi-channel customer engagement journeys triggered by billing events. This powerful tool allows you to design personalised customer experiences across digital bills, emails, SMS and surveys with intelligent timing and targeting. + +## Key Benefits + +- **Automated Customer Journeys**: Set up once and let the system handle customer engagement automatically +- **Multi-Channel Communication**: Engage customers through digital bills, emails, SMS and WhatsApp +- **Event-Driven Triggers**: Automatically initiate campaigns based on bill generation and other events +- **Intelligent Timing**: Control message timing with built-in delays and scheduling +- **Targeted Audience**: Segment customers by brands, stores and specific criteria +- **Real-Time Monitoring**: Track campaign performance and engagement metrics + +## Journey Creation Process + +The Auto Engagement feature requires you to configure customer journeys for post-purchase engagement. You can design your customer journeys based on the following steps: + +### Step 1: Journey Details + +Configure the basic parameters for your engagement campaign: + +**Required Fields:** +- **Journey Name**: Descriptive name for your campaign (For example - "Billme Promotion") +- **Journey Description**: Detailed explanation of the campaign purpose +- **Company Selection**: Choose the company account for this journey +- **Start Date & Time**: When the journey should begin accepting triggers +- **End Date & Time**: When the journey should stop processing new triggers + +**Best Practices:** +- Use clear, descriptive names that indicate the campaign purpose +- Set appropriate date ranges based on promotional periods +- Include campaign objectives in the description for team reference + +### Step 2: Audience Targeting + +Define who will receive your engagement messages: + +**Brand Selection:** +- Choose specific brands from your account +- Multiple brand selection supported +- Brand selection enables store filtering + +**Store Selection:** +- Select specific stores within chosen brands +- Store selection becomes available after brand selection +- Allows for location-specific campaigns + +**Targeting Options:** +- All customers from selected brands/stores +- Specific customer segments +- Individual customer targeting + +### Step 3: Journey Flow Builder + +Design your automated engagement sequence using the visual workflow builder: + +#### Available Components + +**Start Triggers:** +- **Event Occurrence**: Triggered by specific events like bill generation + - Event Type: Bill + - Sub Event: Bill Generation + +**Customer Targeting:** +- **All Customers**: Target entire customer base +- **Customer Segment**: Target specific customer groups +- **Specific Customer**: Target individual customers + +**Digital Bill Engagement:** +- **Bill Monitor**: Display monitoring information on bills +- **Ad Below**: Show advertisements below bill content +- **Sell Below**: Display sales content below bills +- **Banner**: Add promotional banners to bills +- **Survey**: Embed surveys within digital bills +- **Pop Over**: Show overlay messages on bills + +**Third-Party Engagement:** +- **Send SMS**: Automated SMS messaging +- **Send Email**: Automated email campaigns +- **Send WhatsApp**: WhatsApp message automation + +**Time Controls:** +- **Wait For Some Time**: Add delays between actions + - Configurable wait periods + - Date-based conditions + - Custom timing rules + +#### Building Your Flow + +1. **Start with a Trigger**: Drag "Event Occurrence" to begin your journey +2. **Add Customer Targeting**: Connect "All Customers" or specific segments +3. **Design Engagement Sequence**: Add engagement components in logical order +4. **Insert Timing Controls**: Use "Wait For Some Time" to space out communications +5. **Configure Components**: Set up each component with appropriate content and settings + +**Flow Example:** +``` +Event Occurrence (Bill Generation) + ↓ +All Customers + ↓ +Banner → Pop Over → Send Email + ↓ +Survey + ↓ +Wait For Some Time (Delay) + ↓ +Send SMS +``` + +### Step 4: Review & Publish + +Final review and launch your journey: + +**Campaign Summary:** +- Review all journey details and settings +- Verify audience targeting configuration +- Confirm engagement flow sequence + +**Journey Overview:** +- Visual representation of your complete workflow +- Component status indicators +- Flow validation check + +**Preview Functionality:** +- **Preview Pane**: Test your journey before going live +- Click tiles to preview individual components +- Validate message content and timing + +**Publishing:** +- Click **"Publish"** to activate your journey +- Journey will start processing triggers based on your start date +- Monitor performance through the main dashboard + +## Component Configuration + +You can configure various components of the journey based on your selections. + +### Event Occurrence Setup +- **Event Type**: Select "Bill" for billing-related triggers +- **Sub Event**: Choose "Bill Generation" for new bill triggers +- **Conditions**: Set additional trigger conditions if needed + +### Digital Bill Components + +**Banner Configuration:** +- Upload banner images or create text-based banners +- Set display duration and positioning +- Configure click-through actions + +**Pop Over Setup:** +- Design overlay content and messaging +- Set display timing and triggers +- Configure user interaction options + +**Survey Integration:** +- Create or select existing surveys +- Set survey display conditions +- Configure response handling + +### Third-Party Messaging + +**SMS Configuration:** +- Ensure DLT compliance for SMS campaigns +- Link Telemarketer ID with DLT account +- Create message templates with personalisation +- Set delivery timing and frequency limits + +**Email Setup:** +- Design email templates with rich formatting +- Configure sender information and reply-to addresses +- Set up email tracking and analytics +- Include unsubscribe options + +### Time Regulator +- **Wait Duration**: Set specific time delays (minutes, hours, days) +- **Conditional Waits**: Wait until specific dates or conditions +- **Business Hours**: Respect customer communication preferences + +## Best Practices + +These are the recommended best practices while creating a customer journey: + +### Journey Design +- **Start Simple**: Begin with basic flows and gradually add complexity +- **Customer Experience**: Consider the entire customer journey from their perspective +- **Timing Matters**: Space out communications to avoid overwhelming customers +- **Test Thoroughly**: Use preview functionality before publishing + +### Content Creation +- **Personalisation**: Use customer data to personalise messages +- **Brand Consistency**: Maintain consistent branding across all touchpoints +- **Clear CTAs**: Include clear calls-to-action in all communications +- **Mobile Optimisation**: Ensure content displays well on mobile devices + +### Compliance +- **SMS Regulations**: Follow TRAI guidelines for SMS marketing +- **Email Standards**: Include proper unsubscribe mechanisms +- **Data Privacy**: Respect customer data privacy and preferences +- **Opt-out Options**: Provide easy ways for customers to opt out + +### Performance Optimsation +- **Monitor Metrics**: Track engagement rates and conversion metrics +- **A/B Testing**: Test different content versions and timing +- **Continuous Improvement**: Regularly review and optimise journey performance +- **Customer Feedback**: Incorporate survey responses and feedback diff --git a/llm-content/pos/billme/dashboard/create/coupons.md b/llm-content/pos/billme/dashboard/create/coupons.md new file mode 100644 index 00000000..20ae0816 --- /dev/null +++ b/llm-content/pos/billme/dashboard/create/coupons.md @@ -0,0 +1,68 @@ +--- +title: Create Coupons & Offers +heading: Coupons +description: Generate coupons and promotional codes to drive repeat sales and customer loyalty. +--- + +# Coupons + +The **Coupons** page allows businesses to manage all their coupon code campaigns in one place. Businesses can create new coupons, view existing ones, export data and manage coupon usage for both internal and external purposes. + +Here, businesses can view the list of all coupon code campaigns in the system and add new coupon codes for future use. + +You can view, generate, export, delete and mark coupons for external use directly from this page. + +## Features + +The **Coupons** page provides the following features: + +### Coupon Code Table + +The main table displays key information for each coupon campaign: + +- Coupon Name +- Description +- Status of the Campaign +- Campaign Type +- Prefix +- Number of Coupons Used +- Date of Creation + +### Delete + +Existing coupons can be deleted using the delete icon in the actions column. Once deleted, the coupon cannot be retrieved. + +### Export + +Coupons can be exported in CSV format directly from the actions column. Businesses are advised to read the disclaimer and instructions displayed on-screen before exporting coupon data. + +### Mark External Coupon + +This action allows businesses to mark coupons for external use. Once marked for external use, these coupons can no longer be embedded within media content on digital bills. + +### Search + +Businesses can search existing coupons by their name to quickly locate specific campaigns. + +## Create New Coupons + +You can either upload or generate new coupons. + +### Generate New Coupons + +Businesses can create new coupon code campaigns easily by: + +- Entering the **Coupon Name** +- Providing a **Description** +- Defining the **Number of Coupons Needed** +- Setting the **Prefix** (refer to on-screen hints for prefix guidelines) + +To generate new coupons: + +1. Under **Create** section on the dashboard, click **Coupons**. The **Coupon Code Generator** page appears. +2. Click **+ New Coupons** and click **Generate Coupon**. The **Generate New Coupon** page appears. + ![Generate New Coupons](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/generate-new-coupon.jpg.md) +3. Enter the name, description, quantity and prefix of the coupons. +4. Click **Save & Exit**. + +The coupons are processed for approval and go live after admin-level approval. diff --git a/llm-content/pos/billme/dashboard/create/surveys.md b/llm-content/pos/billme/dashboard/create/surveys.md new file mode 100644 index 00000000..e5d5b495 --- /dev/null +++ b/llm-content/pos/billme/dashboard/create/surveys.md @@ -0,0 +1,105 @@ +--- +title: Create and Edit Surveys +heading: Surveys +description: Create, view, edit, delete or duplicate customer Surveys. +--- + +# Surveys + +The **Surveys** page allows businesses to create, manage, and analyse standalone surveys that collect valuable customer feedback across multiple channels. The survey feature offers businesses complete flexibility in designing feedback forms and viewing responses in real time. It is the central page to view, create, edit, duplicate, unpublish, delete and manage all standalone survey campaigns. + +Surveys help businesses collect vital customer feedback, analyse sentiment, improve service quality and enhance customer satisfaction. + +## Features + +The **Survey** page provides the following features: + +### Survey Table + +The main table displays: + +- Survey Name +- Status (Active, Inactive, Draft) +- Description +- Date of Creation +- Date of Update +- Actions + +### Search + +Quickly locate specific surveys using the search bar by entering the survey name. + +### Filter + +Filter surveys based on: + +- Survey Status (Active, Inactive, Draft) +- Time Frame (Creation or update date) + +### Actions + +The following actions are available for each survey via the actions column: + +#### View + +View the complete survey details including design, settings and configuration. + +#### Edit + +Modify campaign details, survey structure (single-page or multi-page), additional settings and response conditions. Surveys marked inactive cannot be edited. + +#### Delete + +Permanently delete a survey from the system. Deleted surveys cannot be retrieved. + +#### Duplicate + +Create a copy of an existing survey. While duplicating, businesses can rename and modify the survey before publishing. + +#### Unpublish + +Unpublish a survey to prevent it from appearing in any new media going forward. + +#### Unpublish for All + +Completely remove a survey from all channels, including emails, SMS, survey links and any previously distributed media. All links associated with the survey will stop functioning. + +#### View Survey Responses + +Access all responses submitted by customers for the selected survey. + +- **Sort**: Sort responses by newest first or oldest first. +- **Channel**: Filter responses based on the channel where responses were collected (Digital Bills, Emails, SMS and so on). +- **Export Survey Responses**: Export survey responses to a maximum of 10 recipients via email. If no email is provided, data will be sent to the registered email address. + +## Create New Survey + +Businesses can create standalone surveys by: + +1. Adding campaign details and survey name. +2. Designing the survey using drag-and-drop tools to create single-page or multi-page forms. +3. Configuring additional settings such as branching logic or response conditions if required. +4. Previewing the survey to check the final design. +5. Publishing the survey immediately or scheduling it for later. + +To create a new survey: + +1. Under **Create** section on the **Billme** Dashboard, click **Surveys**. The **Surveys** page appears. +2. Click **+ New Survey**. The **New Campaign** page appears. + ![Create New Survey](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/new-campaign-details.jpg.md) +3. Enter the **Campaign Details** such as Campaign name and description and Click **Next Step**. The **Survey Builder** page appears. + - Select if your survey is a **Single Page Survey** or a **Multi Page Survey** + - Add a header image for your survey. + - Add the survey name and description. + - Add the survey question and description. + - Select your question type from the dropdown. + - You can also add more questions, text fields and background colours. + ![Survey Builder for New Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/survey-builder-new-campaign.jpg.md) +4. Preview your survey and click **Next Step**. The **Survey Additional Settings** page appears. + - Add a welcome image and an exit image. + - Customise your survey font and button. + ![Survey Additional Settings for New Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/survey-additional-settings.jpg.md) +5. On the **Preview & Publish** page, preview the final look of your survey and click **Publish**. + ![Survey Publish for New Campaign](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/survey-preview-publish.jpg.md) + +Your new survey is created and appears on the list of recent surveys on the **Survey** page. diff --git a/llm-content/pos/billme/dashboard/feedback.md b/llm-content/pos/billme/dashboard/feedback.md new file mode 100644 index 00000000..ef324d9d --- /dev/null +++ b/llm-content/pos/billme/dashboard/feedback.md @@ -0,0 +1,98 @@ +--- +title: Customer Feedback +heading: Feedback +description: Collect customer feedback via bills, surveys and analyse responses to improve service and customer experience. +--- + +# Feedback + +The **Feedback** page provides a singular window to view and manage all customer feedback received across your stores. It helps you track customer sentiment and take timely action to improve service quality. The page is divided into two tabs: **Responses** and **Campaigns**. + +## Responses +You can view all the feedback posted by your customers. You can view, filter, delete, sort and export all the feedback from this page. + +The Responses tab includes multiple features to help you manage feedback effectively. + +![Responses Feedback Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/responses-feedback-billme.jpg.md) + +### Filter + +With the filter option, you can quickly narrow down feedback entries based on specific parameters. You can apply filters based on: + +- Date and Time +- Ratings +- Campaign +- Store + +**Sort By**: You can sort feedback entries in the order of newest first or oldest first, helping you prioritise recent or historical feedback as needed. + +**Reply**: You have the option to reply directly to customer feedback, allowing you to engage with customers and address their concerns or appreciation promptly. + +### Export + +With the Export option, you can export feedback data in CSV format for external analysis or reporting purposes. Filters can be applied before export to ensure only relevant feedback data is exported. + +## Campaigns + +The **Campaigns** page provides a singular window to view feedback related to all your past and ongoing campaigns, as well as create new feedback forms to collect customer feedback. This page gives you full control to manage, monitor and analyse campaign-specific feedback across your stores. + +It is a page to view all the feedback posted by the customers about your past and present campaigns and also create new feedback forms. + +You can view, filter, sort, create new feedback forms for your campaigns, search and export campaign feedback from here. + +![Campaigns Feedback Page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/campaigns-feedback-billme.jpg.md) + +### Campaign Table + +The main table displays the following details for each campaign: + +- Name +- Date +- Type +- Status (can be updated directly from the table) +- Actions + +### New Campaign + +The New Campaign feature allows you to create new feedback forms for your campaigns. + +#### Steps to create a new feedback form: + +- Select the brand or brands for which you want to create the form. +- Select the specific store. +- Enter the campaign name and click on next. +- A new window will open where you can configure auto-generated messages based on the star ratings your customers provide. +- You can add a rating caption and provide response options for each rating. +- To add an option, click on **+ add option**. +- To copy the message from the previous rating, click on **use as previous**. +- After configuring all details, click on **save campaign**. The newly created campaign will appear in the main table. + +### Edit Action + +This allows you to edit the automated responses set for each customer rating. You can also preview how the message will appear to customers in phone view. + +### Message Action + +You can view customer feedback for the selected campaign and reply to their ratings directly from here. + +### Export Action + +The export feature allows you to export campaign feedback data in Excel format for external analysis. + +### Reports Action + +The Reports action displays a summary of all ratings and feedback received for the selected campaign. + +### Sort By + +You can sort the campaigns by newest first or oldest first to easily manage recent and past campaigns. + +### Filter + +The filter allows you to quickly display campaigns of relevance based on: + +- Date and Time + +### Search + +The search feature enables you to search for specific campaigns using relevant keywords. diff --git a/llm-content/pos/billme/dashboard/manage.md b/llm-content/pos/billme/dashboard/manage.md new file mode 100644 index 00000000..62bcbac9 --- /dev/null +++ b/llm-content/pos/billme/dashboard/manage.md @@ -0,0 +1,18 @@ +--- +title: About Manage +heading: Overview +description: Access, organise and optimise everything from stores and users to customer data and complaints, directly from your Billme dashboard. +--- + +# Overview + +The **Manage** section in Razorpay Billme brings all key configuration and administrative tools under one unified space. From assigning user roles to handling customer complaints, this hub helps you keep your operations organised and secure. + +With **Manage**, you can: + +- Control user access levels +- Segment customers based on behavior and data +- Manage multiple store setups +- Organise creatives in a central media bank +- Address and resolve customer complaints +- Update system-wide settings from one place diff --git a/llm-content/pos/billme/dashboard/manage/customer-complaints.md b/llm-content/pos/billme/dashboard/manage/customer-complaints.md new file mode 100644 index 00000000..a5cb75d3 --- /dev/null +++ b/llm-content/pos/billme/dashboard/manage/customer-complaints.md @@ -0,0 +1,57 @@ +--- +title: Customer Complaints +description: Track, manage and resolve customer complaints submitted via digital feedback or support channels to improve satisfaction and service quality. +--- + +# Customer Complaints + +Access and resolve customer complaints with transparency and speed. Use this dashboard to stay on top of recurring issues or one-off concerns. + +The **Customer Complaints** page helps businesses manage and resolve customer grievances efficiently. By listing all submitted complaints in one place, the dashboard enables timely action and enhances the overall customer experience. + +This section enables businesses to search, filter, and respond to customer complaints, helping resolve issues faster and improving customer satisfaction. + +![Customer Complaints](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/customer-complaints-listing.jpg.md) + +### Key Capabilities + +- Track complaints per store or customer +- Assign internal owners for resolution +- Mark status as Open, In Progress or Resolved +- Link complaints to transaction or survey responses + +### Features + +The **Customer Complaints** section offers the following features: + +#### Customer Complaints Table + +The main table displays the following information for each complaint: + +- Customer Phone Number +- Email Address +- Store Name +- Complaint Type +- Date of Complaint +- Complaint Description + +#### Search + +Businesses can search for complaints by: + +- Phone Number +- Email Address +- Store Name + +This allows quick access to specific customer issues. + +#### Filter + +The filter option enables businesses to sort complaints based on the **date of submission**. This helps prioritise recent or time-sensitive grievances. + +#### View + +Clicking the **View** button (represented by an eye icon in the actions column) allows businesses to: + +- View the customer's digital bill associated with the complaint +- Review the complaint in full context before responding diff --git a/llm-content/pos/billme/dashboard/manage/customer-segmentation.md b/llm-content/pos/billme/dashboard/manage/customer-segmentation.md new file mode 100644 index 00000000..5de70108 --- /dev/null +++ b/llm-content/pos/billme/dashboard/manage/customer-segmentation.md @@ -0,0 +1,58 @@ +--- +title: Customer Segmentation +description: Segment customers by behavior, demographics or purchase history to enable targeted marketing and improve campaign effectiveness. +--- + +# Customer Segmentation + +Segment your customers to personalise communications and run smarter campaigns. Create dynamic groups based on actions, preferences or transaction history. + +The Customer Segmentation feature allows you to group your customers based on multiple behavioural and demographic data points. This empowers brands to deliver more relevant, targeted and effective communication. + +By creating highly specific customer segments, businesses can personalise campaigns across SMS, email, whatsApp, digital bills and other communication channels. This improves engagement, conversions and overall customer satisfaction. + +### Key Features + +- Filter by purchase frequency, value or location +- Auto-update segments in real time +- Use segments to target SMS, Email or WhatsApp campaigns +- Export or sync customer groups to external tools + +### Key Data Points for Segmentation: + +- **Visits**: Segment customers by visit frequency or recency. + +- **Products**: Group customers based on product interest or purchase history. + +- **Age**: Target campaigns to specific age groups. + +- **Gender**: Personalise messaging and offers based on gender. + +- **Spends**: Identify high-value or budget-conscious customers by spend range. + +- **Type of Phone**: Distinguish users by device type for optimised content delivery. + +- **Combined Attributes**: Combine multiple attributes for hyper-targeted customer profiles. + +### Use Case Example + +Create a segment of young, high-spending customers in metro cities who purchased specific product categories. Then, you can run a targeted email or digital bill campaign with exclusive offers tailored to them. + +## Create New Customer Segment + +To create a new customer segment: + +1. Under **Manage** section, on the **Customer Segmentations** page, click **+ Create New Segment**. The **Create New Segment** page appears. + ![Create New Customer Segment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-customer-segmentation.jpg.md) +2. Enter the Segment name and description. +3. You can configure various combinations of parameters based on which you want to create the customer segment. + - Select the segment type: Static or Real-time. + - Enter any keywords from the invoice. + - Enter values for total visits, last visit and average feedback. + - Specify age and gender. + - Enter **Billing & Expenses** details. + - Select storewise visits. + - Select OS of the customer device. + - Select POS type which the customer is using (if applicable). +4. Click **Save**. +Your new customer segment is created and can be used for multiple campaigns and auto engagement journeys. diff --git a/llm-content/pos/billme/dashboard/manage/media-bank.md b/llm-content/pos/billme/dashboard/manage/media-bank.md new file mode 100644 index 00000000..a8b3d596 --- /dev/null +++ b/llm-content/pos/billme/dashboard/manage/media-bank.md @@ -0,0 +1,31 @@ +--- +title: Media Bank for Campaigns +heading: Media Bank +description: Store and manage your marketing assets like banners, images and videos for quick access in campaigns. +--- + +# Media Bank + +The **Media Bank** lets you upload, store and manage images, banners, videos and logos in one central place. These media files can be used across **Billme Dashboard** for creating or designing user journeys, surveys, digital bills, campaigns and so on. + +![Media Bank](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/media-bank-manage.jpg.md) + +## Key Features + +- Upload and tag creative assets for easy reuse +- Use media across campaigns, banners and popups +- Preview formats and sizes before inserting +- Share media access with specific roles or teams + +## Upload and Manage New Media + +To upload a new media file: + +1. Under **Manage** section, click **Media Bank**. The **Media Bank** page appears. + ![Media Bank Features](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/media-bank-options.jpg.md) +2. Click **+ Upload Media**. The **Upload New Data** page appears. +3. Upload your file and enter a file name and description. +4. Click **Import Data**. The new media file is uploaded and stored in the **Media Bank**. +5. Hover over to **Actions** against the file you want to manage. + - You can view and download the files. + - You can delete the files. diff --git a/llm-content/pos/billme/dashboard/manage/settings.md b/llm-content/pos/billme/dashboard/manage/settings.md new file mode 100644 index 00000000..d136cb74 --- /dev/null +++ b/llm-content/pos/billme/dashboard/manage/settings.md @@ -0,0 +1,50 @@ +--- +title: Settings +description: Configure Bill Explicit Settings, DLT Settings and Consumer Profiling, as per your business needs. +--- + +# Settings + +The **Settings** page on the **Billme Dashboard** enables you to configure settings such as Bill Explicit Settings, DLT Settings and Consumer Profiling, as per your requirements. + +You can manage default configurations that apply across your Billme account or store using the **Settings** page. + +## Bill Explicit + +You can configure billing notifications from this page. You can also add default or custom messages to be sent with the bill. +![Bill Explicit Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/bill-explicit-settings.jpg.md) + +## DLT Settings + +DLT stands for Distributed Ledger Technology. To comply with **TRAI** regulations, you must upload sender id and templates on DLT Settings page and get them approved before proceeding with **SMS campaigns**. + +### Sender IDs + +You can upload, search, view and delete Sender id. You can see following details: +- Header ID +- Sender ID +- Sender ID Description +- Created Date + +![DLT Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dlt-settings.jpg.md) + +### Templates + +You can upload, search, view and delete an SMS template on this page. + +On the **DLT Settings** page, click the **Select Listings** dropdown and Select **Templates**. +The **Templates** table appears with the following details: +- Template ID +- Template Name +- Headers +- Status +- Template body +- Created Date + +![Templates Page DLT Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/templates-dlt-settings.jpg.md) + +## Consumer Profiling + +You can configure the fields for collection of customer data. You can also specify the number of fields. + +![Consumer Profiling Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/consumer-profiling-settings.jpg.md) diff --git a/llm-content/pos/billme/dashboard/manage/store-management.md b/llm-content/pos/billme/dashboard/manage/store-management.md new file mode 100644 index 00000000..2042e14f --- /dev/null +++ b/llm-content/pos/billme/dashboard/manage/store-management.md @@ -0,0 +1,368 @@ +--- +title: Store Management Settings +heading: Store Management +description: Update and configure settings for each store to ensure smooth billing processes. +--- + +# Store Management + +You can manage all your physical and online outlets with Billme’s **Store Management**. Each store can have its own branding, campaigns and analytics. + +The Store Management module in Billme provides a comprehensive solution for organising and managing your business hierarchy, from companies and brands to individual stores and their groupings. This centralised system enables efficient store operations, customer engagement targeting and access control across your entire business network. + +With Store Management, businesses can stay informed and in control of their entire retail footprint in real time. The Store Management page enables businesses to monitor store activity, maintain visibility across locations and take quick action if needed. + +![Store Management](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/store-management-company-page.jpg.md) + + +### Key Features + + - Add multiple stores under one account + - Customise branding (logo, theme, contact info) per store + - View store-specific dashboards and feedback + - Assign access control per store + + + +### Advantages + + - **Hierarchical Organisation**: Manage companies, brands and stores in a structured hierarchy + - **Multi-Channel Support**: Handle both retail and e-commerce stores from a single interface + - **Flexible Grouping**: Create custom store groups for targeted campaigns and management + - **Bulk Operations**: Efficiently add multiple stores using CSV uploads + - **Access Control**: Manage POS access keys and monitor store activity + - **Comprehensive Data**: Store detailed business, location and compliance information + + +The Store Management module consists of six main sections: + +1. **Company** - Business entity management +2. **Brands** - Brand portfolio management +3. **Retail Stores** - Physical store locations +4. **E-Commerce Stores** - Online store management +5. **Store Groups** - Logical store groupings +6. **Access Keys** - POS system access management + +### Company + +Companies form the top level of your business hierarchy. Each company represents a distinct business entity with its own legal and operational details. + +### Creating a New Company + +**Required Information:** +- **Company Name**: Full legal business name +- **Company Type**: Business structure (private, partnership and so on.) +- **Email ID**: Primary business email address +- **State**: Business registration state +- **City**: Business registration city +- **Contact Number**: Primary business phone number +- **PIN Code**: Business location postal code +- **Display Address**: Address to be shown on bills and documents + +**Additional Details:** +- **Incharge Name**: Primary business contact person +- **Country**: Business location country (auto-populates currency and country code) +- **GST Number**: Goods and Services Tax registration number +- **Billing Name**: Name to appear on billing documents +- **PAN**: Permanent Account Number +- **Address**: Complete business address + +### Brand + +### Creating a New Brand + +**Required Information:** +- **Brand Name**: Distinctive brand identifier +- **Brand Category**: Industry classification (Automotive, E-commerce, Food and Beverages, Education and so on.) + +**Optional Information:** +- **Brand Logo**: Visual brand identity (drag-and-drop upload) +- **Brand Description**: Detailed brand information + +### Brand Categories + +The system supports diverse brand categories including: +- Automotive +- E-commerce +- Food and Beverages +- Education +- Electricity +- Jewellery +- Groceries +- And more + +### Retail Store + +Retail stores represent physical business locations with specific addresses, staff and point-of-sale systems. Each retail store is associated with a company and brand. + +### Creating a New Retail Store + +**Basic Information:** +- **Company Selection**: Choose parent company (drop-down) +- **Brand Selection**: Select associated brand (drop-down) +- **Store Incharge Name**: Store manager or primary contact + +**Location Details:** +- **Country**: Store location country +- **State**: Store location state +- **City**: Store location city +- **PIN Code**: Store postal code +- **Address**: Complete physical address +- **Display Address**: Customer-facing address for bills + +**Contact Information:** +- **Primary Contact Number**: Main store phone number +- **Secondary Contact Number**: Backup contact number + +**Operational Details:** +- **Number of POS**: Point-of-sale terminals count +- **Store Code**: Unique store identifier +- **Number of Employees**: Staff count +- **Store Size**: Physical store dimensions or area + +**Legal and Compliance:** +- **GST Number**: Store-specific GST registration number +- **FSSAI License Number**: Food safety license number (for food businesses) +- **CIN Number**: Corporate identification number + +**Additional Features:** +- **Custom Links**: Add store-specific websites, social media or other links + +### Store Status + +**Status Options:** +- **Active**: Store is operational and accepting transactions +- **Inactive**: Store is temporarily closed or not processing transactions + +**Status Actions:** +- **View Store**: Access detailed store information +- **Edit Store**: Modify store details and settings +- **Reactivate Store**: Change inactive stores back to active status + +### E-Commerce Store + +E-commerce stores represent online business channels. They share most characteristics with retail stores but are optimised for digital operations without physical location constraints. + +### Creating a New E-Commerce Store + +**Key Differences from Retail Stores:** +- **No POS Requirement**: E-commerce stores don't require point-of-sale terminal counts +- **Digital Focus**: Optimised for online business operations +- **Same Compliance**: Maintains all legal and tax compliance requirements + +**Common Features:** +- Company and brand association +- Contact information management +- Legal compliance fields (GST, FSSAI, CIN) +- Custom links for digital properties +- Store status management + +### E-Commerce Specific Considerations + +**Store Codes:** +- Often reflect platform integration (e.g., marketplace codes) +- May include platform-specific identifiers +- Support for multiple channel management + +**Digital Properties:** +- Custom links for website URLs +- Social media integration +- Third-party marketplace associations + +### Store Groups + +Store Groups enable logical organisation of stores for targeted campaigns, reporting and management. Groups can be created based on geography, performance, store type or any business logic. + +### Creating Store Groups + +**Basic Information:** +- **Group Name**: Descriptive group identifier +- **Group Description**: Purpose and criteria for the group + +**Store Selection:** +- **Store Search**: Search by store code or display address +- **Multi-Select**: Add multiple stores to a single group +- **Real-Time Counter**: View selected store count + +### Common Store Group Types + +**Geographic Groups:** +- Regional stores (North, South, East, West) +- City-specific groups +- State-wise organsation + +**Performance Groups:** +- High-performing stores +- New store launches +- Underperforming locations requiring attention + +**Operational Groups:** +- Franchise vs. company-owned +- Store size categories +- Brand-specific groups + +### Access Keys + +Access Keys manage point-of-sale system access and monitor store-level technical operations. This section tracks POS device connections, versions and transaction activity. + +### Access Key Information + +**Data Tracked:** +- **Store Details**: Associated store information +- **Store Code**: Unique store identifier +- **Access Key**: POS system authentication key +- **POS Name**: Point-of-sale device identifier +- **MAC ID**: Hardware device identifier +- **Version**: Software version information +- **BIT**: System architecture information +- **Last Transaction**: Most recent transaction timestamp +- **Last Updated**: Access key update timestamp +- **Status**: Connection and operational status + +## Other Features + +Store Management page also offers advanced features such as bulk upload, search, filter, export, reporting and integration with auto-engagement journeys and POS systems. + +### Bulk Upload Operations + +Bulk Upload functionality enables efficient addition of multiple stores through CSV file uploads, significantly reducing manual data entry time. + +### Bulk Upload Process + +**1. Configuration Setup:** +- **Select Company**: Choose the parent company for all stores +- **Select Brand**: Choose the associated brand for all stores +- **Select Store Type**: Choose Retail, E-Commerce or both + +**2. File Preparation:** +- **Download Sample CSV**: Get the correct file format template +- **Prepare Data**: Fill in store information according to template +- **Validate Data**: Ensure all required fields are complete + +**3. File Upload:** +- **Drag & Drop**: Drop CSV file into upload area +- **Browse Files**: Use file browser to select CSV +- **File Validation**: System validates file format and content + +**4. Submit and Process:** +- **Review**: Confirm upload settings +- **Submit**: Process the bulk upload +- **Monitor**: Track upload progress and results + +### CSV File Requirements + +**Required Fields:** +- Store name and basic information +- Location details (address, city, state, PIN code) +- Contact information +- Store-specific identifiers + +**Optional Fields:** +- Employee count +- Store size +- Additional contact numbers +- Custom links +- Compliance numbers + +**Data Validation:** +- All required fields must be populated +- Geographic data validated against system standards +- Contact numbers verified for format +- Duplicate store codes prevented + +### Search and Filter Functionality + +You can search and filter your stores with dynamic options. + +### Search Capabilities + +**Global Search:** +- Search across all store management sections +- Find stores by name, code or address +- Quick access to specific entities + +**Section-Specific Search:** +- Company search by name or incharge +- Brand search by name or category +- Store search by multiple criteria +- Group search by name or description + +### Filter Options + +**Status Filtering:** +- Active vs. inactive stores +- Operational status tracking +- Performance-based filtering + +**Geographic Filtering:** +- Filter by country, state or city +- Regional store management +- Location-based operations + +**Brand and Company Filtering:** +- Multi-brand portfolio management +- Company-specific views +- Hierarchical filtering + +### Export and Reporting + +You can export store data and generate reports for business requirements. + +### Data Export + +**Export Formats:** +- CSV format for data analysis +- Excel compatibility for reporting +- Bulk data extraction capabilities + +**Export Options:** +- Complete dataset exports +- Filtered data exports +- Custom field selection +- Scheduled exports + +### Reporting Integration + +**Business Intelligence:** +- Store performance analytics +- Geographic distribution reports +- Brand-wise performance tracking +- Operational efficiency metrics + +**Compliance Reporting:** +- Tax compliance status +- License expiration tracking +- Legal documentation status +- Audit trail maintenance + +### Integration Capabilities + +You can integrate stores and store groups with AutoEngagement Journeys and POS System. + +### AutoEngagement Integration + +**Audience Targeting:** +- Use store groups for campaign targeting +- Brand-specific engagement campaigns +- Geographic campaign distribution +- Store performance-based targeting + +**Campaign Management:** +- Leverage store hierarchy for campaigns +- Brand-consistent messaging +- Location-specific promotions +- Group-based communication strategies + +### POS System Integration + +**Access Management:** +- Secure key distribution +- Device authentication +- Version control management +- Activity monitoring + +**Transaction Processing:** +- Real-time transaction tracking +- Store-level performance monitoring +- System health management +- Operational analytics diff --git a/llm-content/pos/billme/dashboard/manage/user-access.md b/llm-content/pos/billme/dashboard/manage/user-access.md new file mode 100644 index 00000000..d7b382e7 --- /dev/null +++ b/llm-content/pos/billme/dashboard/manage/user-access.md @@ -0,0 +1,51 @@ +--- +title: User Access Control +heading: User Access +description: Assign roles and manage user permissions for controlled access to different features. +--- + +# User Access + +The **User Access** page allows businesses to control who can access their Billme dashboard and define the level of access for each user. This helps maintain data security and operational control while enabling collaboration. + +Businesses can not only decide who gets access but also control which sections of the dashboard each user can access, ensuring only authorised users have visibility into specific business areas. + +## Key Capabilities + +- Add or remove users securely +- Assign roles such as Admin, Marketing, Support and so on. +- Set view-only or edit permissions +- Monitor user activity logs + +## Features + +The **User Access** section provides the following features: + +### Add User + +To grant dashboard access to selected users: + +- Enter the user’s **Email Address** and **Phone Number**. +- Select which pages the user can access by ticking the relevant boxes. +- Select the specific stores the user will have access to. +- Click **Submit** to save and apply the access permissions. + +This allows businesses to give role-based or store-specific access as per their operational needs. + +To create a new user: + +1. Under **Manage** section, click **User Access**. The **Add User** page appears. + ![Create New Users](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/user-access-page.jpg.md) +2. Select your store from the **Select Stores** dropdown. +3. Enter the email, phone and password for the new user. +4. Select the check boxes against the features you want to provide access for this user. +5. Click **Submit**. + The new user is created and appears in the list of current users. + +### Current Users + +The **Current Users** section displays: + +- List of all users who currently have access to the dashboard. +- User details including email address, phone number and store permissions. +- Total number of active users. diff --git a/llm-content/pos/billme/digi-printer.md b/llm-content/pos/billme/digi-printer.md new file mode 100644 index 00000000..b1a68ed7 --- /dev/null +++ b/llm-content/pos/billme/digi-printer.md @@ -0,0 +1,56 @@ +--- +title: Razorpay Digi Printer +heading: About Digi Printer +description: Digi Printer is a Windows solution that captures and converts print files into PNG, PDF, and TXT formats, offering seamless integration and flexibility for billing systems. +--- + +# About Digi Printer + +Digi Printer is a Billme local application designed specifically for Windows-based billing systems. It functions as an intermediary, capturing print files generated during checkout or billing operations and converting them into versatile file formats such as PNG, PDF, and TXT. Unlike traditional virtual printers, Digi Printer does not directly interface with billing software, ensuring seamless compatibility while offering enhanced flexibility in handling and processing print data. + +With its robust architecture, Digi Printer empowers merchants to streamline file processing, manage format conversions, and efficiently upload data to servers. Its design prioritises effortless integration, uninterrupted operations, and adaptability to diverse business needs while maintaining data accuracy and format integrity. + + to get this feature activated on your Razorpay account. + + +### Advantages + + - **Versatile File Conversion**: Converts print files into PNG, PDF, TXT, and more, catering to various business requirements. + + - **Automation**: Automates data extraction, file conversion, and uploads, minimising manual intervention. + + - **Seamless Integration**: Operates independently of billing software, offering broad compatibility with POS systems. + + - **Customisable Configurations**: Tailored registry settings allow flexibility to adapt to unique client requirements. + + - **Customer Convenience**: Simplifies repeat transactions by linking customer data through the Opt-In Feature. + + - **Data Accuracy**: Validates customer information and prevents duplicate invoices to ensure precise billing. + + - **Real-Time Monitoring**: Alerts server administrators about critical system events, ensuring operational continuity. + + - **Ease of Use**: Simplifies UI interactions for cashiers and automates complex processes for seamless operations. + + + +### Features + + - **AutoFetch**: Automatically fetches customer phone/email details from payment actions, eliminating the need for manual data entry. + + - **Opt-In Feature**: Stores and links customer data to their payment methods, allowing easy retrieval during future transactions. + + - **Auto Number Copy**: If previously linked, this function removes the customer's phone number from the database, speeding up the transaction process. + + - **BMAuto**: Automates actions like file uploads and data submission to the server without requiring a pop-up window. + + - **Number Validation**: Validates customer phone numbers to ensure correct and valid data entry, preventing errors. + + - **Duplicate Invoice Prevention**: Prevents the generation and upload of duplicate invoices by comparing timestamps and file extensions. + + - **Server Notification**: Sends real-time notifications to the server when critical events occur, such as service downtime or delayed file uploads. + + - **UI Control**: After the data is retrieved, disable UI components like the phone number text box to prevent accidental edits and ensure data consistency. + + +### Related Information +[Troubleshooting and FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/billme/digi-printer/troubleshooting-faqs.md) diff --git a/llm-content/pos/billme/digi-printer/troubleshooting-faqs.md b/llm-content/pos/billme/digi-printer/troubleshooting-faqs.md new file mode 100644 index 00000000..9a57a6a0 --- /dev/null +++ b/llm-content/pos/billme/digi-printer/troubleshooting-faqs.md @@ -0,0 +1,166 @@ +--- +title: Troubleshooting & FAQs | Razorpay Digi Printer +heading: Troubleshooting & FAQs +description: Troubleshoot common errors and find answers to frequently asked questions about Razorpay Digi Printer. +--- + +# Troubleshooting & FAQs + +### 1. Why is there a misalignment issue when printing directly? + + The misalignment issue may occur due to the paper size not matching the printed content, causing the alignment to be off. This can happen because: + 1. The `directprint` value in the registry is set, preventing the print pop-up from launching. + 2. The printer configurations on the system are incorrect. + 3. The printer model, such as a POS 8c printer, may require specific settings to ensure proper alignment. + + + +### 2. How can I fix the printer alignment issue? + + To resolve this issue, follow these steps: + 1. **Clear the `directprint` value in the registry:** This ensures that the print pop-up appears, allowing proper configuration before printing. + 2. **Check and correct the system's printer configurations:** Ensure that the paper size and scaling settings are accurate. + 3. **Use a POS 8c printer if available:** Adjust the datatype to **NT EMF 1.008** to ensure the image scales and fits correctly on the paper. + + + +### 3. What is the issue with the secondary screen during checkout? + + On checkout, the pop-up window displays the phone number correctly on the primary screen, but the secondary screen shows an incorrect message ("share your number for a digital bill") instead of the phone number. + + + +### 4. How can I fix the issue with the secondary screen not displaying the phone number? + + The issue can be resolved by adjusting the code to account for screen resolution differences between the primary and secondary screens. For example: + - **Primary screen resolution:** 1024x768 + - **Secondary screen resolution:** 600x800 + + + +### 5. Why does the "Failed to generate OTP for Razorpay EDC linking" error occur after running Upgrade.exe? + + This issue arises when the "Generate OTP" function in BillMeSettings is used after running Upgrade.exe. The error is likely caused by an incorrect configuration of the `DNSResolver` registry value. + + + +### 6. How can I fix the OTP generation issue? + + To resolve this error, ensure the registry value for **DNSResolver** is correctly configured: + - Set the value to **0** (default setting). + - Only set it to **1** if using MCD functionality. + + + +### 7. Why does the pop-up window show an empty text box instead of the previously used phone number during a transaction? + + This issue occurs when the system fails to auto-copy the previously used phone number into the pop-up text box. It may be caused by an incorrect configuration of the `NoExtractorFileType` registry value. + + + +### 8. How can I fix the auto-copy issue? + + To resolve this problem, ensure the registry value for `NoExtractorFileType` is set correctly. Set it to **"txt"** instead of **"raw"**. + + + +### 9. Why does the printed thermal copy show misalignment or cut off text on the right side? + + This issue occurs due to incorrect page dimension settings in the thermal printer configuration, causing the printed content to misalign or get truncated. + + + +### 10. How can I fix the thermal print alignment issue? + + To resolve this problem, follow these steps: + 1. Navigate to the `tpdps.gpd` file located in: `C:\Windows\System32\spool\drivers\x64\3` + 2. Open the file and adjust the **PageDimensions** for the **ThermalReceipt** setting. + 3. Experiment with new values for the page dimensions until the alignment is correct. + + + +### 11. Why is the printer incorrectly printing multiple copies during transactions? + + This issue occurs due to improper configuration of the **BMAuto** and **WhiteList** settings, leading to unintended printing behaviour. + + + +### 12. How can I fix the BMAuto setup issue? + + To resolve the problem, configure the following settings correctly: + 1. Set **BMAuto** to **2.** + 2. Set **BMCopies** to **0.** + 3. Set **WhiteList** to **1.** + 4. Ensure that the **WhiteListString** is properly defined for tax invoices. + + + +### 13. Why does no print file appear in the print queue when using an Epson printer, and why is the printer paused? + + This issue occurs because the printer’s print processor is not correctly configured to match the required `PrintDataType` format, causing the printer to pause and fail to process print jobs. + + + +### 14. How can I fix the hardware print issue with the Epson printer? + + To resolve this problem, follow these steps: + 1. Navigate to **Printer Properties** for the Epson printer. + 2. Go to the **Advanced Tab** and select **Print Processor.** + 3. Set the print processor to **NT EMF 1.008** to match the registry settings. + This adjustment ensures compatibility between the printer and the configured data type, allowing print jobs to appear in the queue and process correctly. + + + +### 15. Why is the total amount displayed incorrectly on the secondary screen (for example, 3000.00 appears as 300000.00)? + + This issue arises due to improper parsing of the total amount string, likely caused by incorrect spacing or formatting in the registry values for **MBILLPAY** and **FBILLPAY.** + + + +### 16. How can I fix the total amount parsing issue on the secondary screen? + + To resolve this issue, verify and adjust the registry values: + 1. Check the **MBILLPAY** and **FBILLPAY** registry settings. + 2. Ensure that proper spacing and formatting are included in the parsed strings. + Setting up the correct registry value with all the spaces from the txt file resolves this issue. + + + +### 17. Why are PDF files improperly formatted during printing, leading to incorrect paper usage? + + This issue occurs when there is a mismatch between the paper size settings in **BillMe** and the default printer, causing the PDF to print with incorrect formatting. + + + +### 18. How can I fix the paper size mismatch issue? + + To resolve this problem, align the paper size settings: + 1. Open the **Printer Properties** for the default printer. + 2. Adjust the paper size settings to match the configuration in **BillMe.** + + + +### 19. Why are transactions uploaded as CW instead of BM or BM+Print when files are moved or deleted from the upload/queued folder? + + This issue occurs when the number of files in the upload/queued folder exceeds the preconfigured limit, causing the system to incorrectly upload transactions as CW rather than BM or BM+Print. + + + +### 20. How can I fix the issue of suspicious transactions due to file count limits? + + To resolve this, adjust the **FileLimit** registry value. Increase the **FileLimit** from **10** to **11** or **12** to accommodate more files per transaction. + This adjustment will prevent transactions from being incorrectly uploaded and allow the system to handle a higher number of files. + + + +### 21. Why do multi-page invoices result in paper cuts after each printed page? + + This issue occurs when the printer is set to automatically cut the paper after each page, which causes the paper cuts between pages when printing multi-page invoices. + + + +### 22. How can I fix the issue of paper cuts when printing multi-page invoices? + + To resolve this, follow these steps: + 1. Enable the **IsMultiPageInvoice** registry setting by setting it to **1.** + 2. Adjust the printer settings to **disable** the automatic paper cutting after each page. diff --git a/llm-content/pos/billme/use-cases.md b/llm-content/pos/billme/use-cases.md new file mode 100644 index 00000000..af352f28 --- /dev/null +++ b/llm-content/pos/billme/use-cases.md @@ -0,0 +1,54 @@ +--- +title: Billme Use Cases +description: Explore the diverse use cases of Razorpay Billme. A robust system to issue bills to your customers. +--- + +# Billme Use Cases + +Explore how Razorpay Billme can streamline billing processes across various industries, enhancing efficiency and customer satisfaction. + + +### E-commerce Businesses + + E-commerce platforms can streamline their billing process by sending digital invoices directly to customers upon purchase. This ensures prompt payments and reduces the need for manual invoice generation. + + + +### Utility Providers + + Utility companies can utilise Razorpay Billme to send out digital bills for services like electricity, water, and internet. Real-time tracking helps manage payment statuses and send timely reminders for due payments. + + + +### Healthcare Providers + + Clinics, hospitals, and other healthcare providers can generate detailed bills for patients, ensuring clarity and accuracy in charges for treatments and services received. + + + +### Educational Institutions + + Schools, colleges, and training centers can issue invoices for tuition fees, course materials, and other expenses, providing a convenient payment method for students and parents. + + + +### Event Management + + Event organisers can use Razorpay Billme to handle billing for tickets, sponsorships, and vendor services, ensuring smooth financial transactions leading up to the event. + + + +### Hospitality Industry + + Hotels, restaurants, and travel agencies can use Razorpay Billme to manage billing for reservations, services, and packages, enhancing the customer experience with easy and efficient payment options. + + + +### Retail Stores + + Retail businesses can send digital bills for in-store and online purchases, providing a seamless payment experience and reducing the need for paper receipts. + + +### Related Information + +[About Billme](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/billme.md) diff --git a/llm-content/pos/dashboard.md b/llm-content/pos/dashboard.md new file mode 100644 index 00000000..653477a8 --- /dev/null +++ b/llm-content/pos/dashboard.md @@ -0,0 +1,59 @@ +--- +title: About Razorpay POS Dashboard +heading: About Dashboard +description: Introduction to the Razorpay POS Dashboard, prerequisites and various Razorpay Dashboard actions. +--- + +# About Dashboard + +Dashboard offers a wide range of features, such as: +- **Analytics** and **real-time charts** that provide valuable insight into your business performance. +- List of **recent activities** that may require your action. +- **Configure, operate and manage** your POS account and other Razorpay products. +- An overview of recent **payments, settlements and refunds**. + +### Prerequisites + +You must have a Razorpay account to access the Dashboard. Do not have a Razorpay account? [Sign up with Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/quickstart.md). + +## Transactions +Given below are the tabs present under Transactions and the supported actions: + +Tab | Actions +--- +Payments | [View details of a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/payments/dashboard.md#view-payment-details) +--- +Refunds | - [Issue full and partial refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/issue.md) +- [View details of a refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/view.md) + +--- +Orders | [View details of an order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/orders/dashboard.md#view-order-details) + +## Settlements +Given below are the actions supported for Settlements: + +- [Enable a Settlement placed on Hold](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/settlements/dashboard.md#enable-settlements-placed-on-hold) +- [View details of a settlement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/settlements/dashboard.md#view-settlements-using-dashboard) +- [View detailed breakup of a settlement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/settlements/dashboard.md#settlements-break-up-description) + +## Reports + +Given below are the actions supported for [Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md): +- [Download a Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/dashboard/reports.md#download-reports) +- [Increase report generation limit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/dashboard/reports.md#limit-on-reports) + +## Payments Products + +Given below is the Payment product and the supported actions: + +Product | Actions +--- +Route | [Create linked accounts and transfer funds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route.md#get-started) + +> **INFO** +> +> +> **Handy Tips** +> +> If you use both, in-person (POS) and online payments, all the [payment products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md#payments) are available for you. +> diff --git a/llm-content/pos/dashboard/reports.md b/llm-content/pos/dashboard/reports.md new file mode 100644 index 00000000..dec41008 --- /dev/null +++ b/llm-content/pos/dashboard/reports.md @@ -0,0 +1,132 @@ +--- +title: Download Razorpay POS Reports +heading: About Reports +description: Download and Schedule various types of reports from the Razorpay Dashboard. +--- + +# About Reports + +Razorpay offers many reports to track the cash flow of your business. +- **Download** all your transaction data for a specific day, month, or time frame according to your business requirements as a CSV, XLS, or XLSX file or get it emailed to the intended recipients. +- **Schedule** the reports you want to receive. Select the desired delivery frequency (daily, weekly, monthly), and specify the email address where the reports will be sent using the Dashboard. + +## Download Reports + + +### To download a report: + + 1. Log in to the Dashboard and click **Reports**. + ![Schedule Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/schedule-report-left-nav.jpg.md) + 2. Click **Download Report**. + 3. Click **What report is this?** to select the report type and format. + ![Download Reports Type and Format](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/download-report-type-format2.jpg.md) + 4. To select the time frame of the report, click **What will you receive in this report?**. You can also select a custom time range by clicking the **Custom** button and selecting your preferred time and date. + ![Download Reports Timeframe](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/download-report-time-select.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> You can select a maximum time frame of 95 days to download a report. +> + + + 5. Click **Yes** on the **Do you want this report in an email?** section to add the email recipients with whom you want to share the report and click **Start Download**. + ![Download Reports Add Email](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/download-report-add-email.jpg.md) + 6. Your report request will begin processing. You can track the status and download the report in the **Downloads** section. + ![Download Reports Add Email](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/downloads-section3.jpg.md) + + +## Schedule Reports + +Scheduling reports offers numerous advantages. It guarantees punctual and regular data provision, streamlining decision-making with timely information. + + +### To schedule a report: + + 1. Log in to the Dashboard and click **Reports**. + 2. Click **Schedule Report**. + 3. In the **What report is this?** section, select the type of report and enter the Schedule Name Select the format in which you want to receive the report. + 4. In the **What will you receive in this report?** section: + - Select the time duration for which you want to schedule the report. + + +> **INFO** +> +> +> **Handy Tips** +> +> When selecting the duration for a scheduled report, it is important to ensure that you choose the **T+1** date. The **T+1** date refers to the day immediately following the current date. +> + + + - Select the Data Duration from the drop-down. + - Select the frequency of the report schedule. + - Select the time of the day to schedule your report. + + 5. Click **Who will receive this report?** section to add the email recipients with whom you want to share the report and click **Create Schedule**. + + + +Your report will be scheduled. You can track and manage all your schedules in the **Schedules** section. +![schedule Reports section](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/schedule-section2.jpg.md) + +## View and Edit Schedules +You can also access and review previous schedules associated with a specific scheduled report. This allows you to view the scheduled report's history and corresponding configuration. You can also modify a scheduled report's configuration as per your requirements. + + +### To view and edit schedules: + + 1. Log in to the Dashboard and click **Reports**. + 2. Click **Schedules** and click **Open** on the schedule you want to view under **View Activity**. + 3. Click **Edit Schedule** to modify the existing settings of the scheduled report. + 4. Click **Edit Schedule** to save the changes. + ![save edit schedule reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/save-edit-activity.jpg.md) + + +## Limit on Reports + +There is a limit on the number of concurrent reports that can be generated from the Dashboard. Once the maximum threshold is reached, new reports will only be created after at least one of the reports in the **processing** state has been generated. + +> **INFO** +> +> +> **Handy Tips** +> +> You can generate a maximum of 3 reports at the same time. Get in touch with our [Support Team](https://razorpay.com/support/#raise-a-request) to increase this limit for your account. +> + +## List of Reports + +The table below lists the various reports supplied as default and gives a brief description of each report. Click the report name to download the sample report of that product. Know [how to download reports.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md#download-reports) + +Report Name | Description +--- +[In-Person Card Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-in-person-card-payments-report.xlsx.md) | This report provides details of all in-person card payments processed through POS devices in the selected time range. Available for Omni merchants with self-serve download and scheduling options. +--- +[In-Person UPI Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-in-person-upi-payments-report.xlsx.md) | This report provides details of all in-person UPI payments processed through POS devices in the selected time range. Available for Omni merchants with self-serve download and scheduling options. +--- +[In-Person Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-in-person-refunds-report.xlsx.md) | This report provides details of all in-person refunds processed through POS devices in the selected time range. Available for Omni merchants with self-serve download and scheduling options. +--- +[Omni Settlement Recon Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-omni-settlement-recon-report.xlsx.md) | This report provides a detailed list of all transactions (payments, refunds, and adjustments) against every settlement in the selected time range with additional POS details. +--- +[Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-settlements-report.xlsx.md) | This report provides a list of the settlement(s) in the selected time range, including in-person transactions for Omni merchants. +--- +[Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-payments-report.xlsx.md) | This report provides details of all payments that were created in the selected time range. +--- +[Combined Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-combined-report.xlsx.md) | This report provides all transactions (payments, refunds, adjustments and transfers) and settlements made in the selected time range, including in-person transactions for Omni merchants. +--- +[Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-orders-report.xlsx.md) | This report provides details of all orders that were created in the selected time range. +--- +[Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-refunds-report.xlsx.md) | This report provides details of all refunds that were initiated in the selected time range. +--- +[Instant Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-instant-refunds-report.xlsx.md) | This report provides details of all the instant refunds initiated in the selected time range. +--- +[Settlement Recon](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-settlements-recon-report.xlsx.md) | This report provides a detailed list of all transactions (payments, refunds, and adjustments) against every settlement in the selected time range. +--- +[Monthly Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample-monthly-invoice-report.xlsx.md) | An invoice for transactions and the corresponding payments. +> **INFO** +> +> **Handy Tips** You can currently download only the Monthly Invoices report. diff --git a/llm-content/pos/dashboard/support.md b/llm-content/pos/dashboard/support.md new file mode 100644 index 00000000..97235be5 --- /dev/null +++ b/llm-content/pos/dashboard/support.md @@ -0,0 +1,75 @@ +--- +title: Razorpay Support +heading: Contact Support +description: If you are a business using Razorpay products or exploring Razorpay solutions, contact our Support Team for all your technical and product queries. +--- + +# Contact Support + +> **INFO** +> +> +> +> **Customer Looking for Refunds** +> +> If you are a customer who has used one of the Razorpay products to make payments and looking for a refund, read about [Customer Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers/customer-refunds.md). +> + +If you are a registered Razorpay user and need help, connect with the [Razorpay Support team](https://razorpay.com/support/). Refer to [Razorpay Docs](https://razorpay.com/docs) to know more about our products. + +> **INFO** +> +> +> **You are a registered Razorpay User** +> +> If you have a Razorpay User ID (Merchant ID/MID), and you: +> - Run a business or are a freelancer. +> - Use Razorpay products to receive payments from your end-users and/or make payouts for business purposes. +> +> Not registered yet? [Sign up with Razorpay](https://easy.razorpay.com/). +> + +## Contact Razorpay Support + + +### To contact the Razorpay Support team: + + 1. Log in to the Dashboard. + 2. Click **Help & Support**. + ![Raise a Ticket - Help and Support pop-up - Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-support.jpg.md) + + 3. Check the FAQs for common concerns. If the FAQs can not resolve your concern, click **Contact Us**. + 4. You have the following options in the **Contact Us** section: + - [Create ticket](#create-support-ticket): Check existing queries or raise a new support ticket. + ![Raise a Ticket - Help and Support pop-up - Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-support-options-new.jpg.md) + + +## Create Support Ticket + +You can check existing queries or raise a new support ticket through the Dashboard. Watch this video to know how to raise a ticket. + +[Video: https://www.youtube.com/embed/TpEy5Fa2o9A] + + +### To raise a new ticket: + + 1. Log in to the Dashboard. + 2. Navigate to **Account & Settings** → **Support tickets** (under Business settings). + 3. Click **Support tickets**. + 4. Click **+ Raise New Query** and select the relevant topic and sub-topic. + 5. Enter the details of your query and **Upload file** if necessary. Click **Create support ticket**. + 6. **Confirm** your phone number. The support ticket is created and details are sent to your registered email id. Click **Done**. + + +### Track Status of Existing Tickets + +Know how to [track your support tickets](https://razorpay.com/docs/payments/dashboard/account-settings/support-tickets/) on the Dashboard. + +> **INFO** +> +> +> +> **Handy Tips** +> +> For a faster support experience, reply to the relevant existing ticket instead of creating a new ticket. +> diff --git a/llm-content/pos/device-selection.md b/llm-content/pos/device-selection.md new file mode 100644 index 00000000..6231ca37 --- /dev/null +++ b/llm-content/pos/device-selection.md @@ -0,0 +1,145 @@ +--- +title: Choosing the Right Razorpay POS Device +description: Comprehensive guide for selecting the optimal Razorpay POS device based on transaction volume, connectivity needs, form factor, expected lifespan, and budget considerations. +--- + +# Choosing the Right Razorpay POS Device + +Selecting the right payment terminal for your business requires careful consideration of various factors. Razorpay offers a comprehensive suite of POS devices to meet diverse business needs. This guide will help you navigate the selection process by evaluating key business requirements against device capabilities. + +## Device Selection Matrix + +Key Factor | Recommended Features | Suggested Device Type +--- +**Transaction Volume** | **High Volume (over 100 per day)** +- Faster processors +- Larger batteries +- Enhanced memory +**Medium Volume (between 30-100 per day)** +- Balanced performance +- Standard battery capacity +- Adequate processing power +**Low Volume (under 30 per day)** +- Basic processing capability +- Cost-effective solutions + | **High Volume (over 100 per day)** +- Android Smart POS (full-size) +- Premium models with octa-core processors +**Medium Volume (between 30-100 per day)** +- Android Smart POS (standard) +- Android Smart Mini POS +**Low Volume (under 30 per day)** +- Mini POS (Android and Normal) + +--- +**Connectivity** | **Fixed Location with Reliable Internet** +- WiFi connectivity +- Ethernet capability +- Charging base/dock +**Multiple Locations or Poor Internet** +- Mobile data connectivity (4G/LTE) +- Multi-network SIM support +- Offline transaction capability +**On-the-Go Businesses** +- Mobile data mandatory (4G/LTE) +- Extended battery life (over 8 hours) +- Lightweight design + | **Fixed Location with Reliable Internet** +- Android Smart POS (full-size) +- Countertop terminals with wired options +**Multiple Locations or Poor Internet** +- Android Smart POS with mobile data +- Android Smart Mini POS with cellular +**On-the-Go Businesses** +- Android Smart Mini POS +- Mini POS + +--- +**Form Factor & Usage** | **Counter-Based Operations** +- Larger screens (over 5 inches) +- Integrated thermal printer +- Fixed charging dock +**Mobile Within Premises** +- Moderate screen size (between 4-5 inches) +- Extended battery (between 6-8 hours) +- Lightweight +**Field Operations** +- Compact & rugged design +- Long battery life (over 8 hours) +- Mobile data connectivity +- Drop/water resistance + | **Counter-Based Operations** +- Android Smart POS (full-size) +- Countertop terminals with printer +**Mobile Within Premises** +- Android Smart Mini POS +- Mini POS +**Field Operations** +- Android Smart Mini POS (rugged) +- Mini POS with protective cases + +--- +**Expected Lifespan** | **Long-term (3-5+ years)** +- Latest Android OS (Android 11+) +- RAM: 3GB or more +- Upgradeable firmware +- Strong OEM support +**Short-term (1-2 years)** +- Android 8+ +- RAM: 2GB +- Basic functionality + | **Long-term (3-5+ years)** +- Premium Android Smart POS with future-proof specs +**Short-term (1-2 years)** +- Entry-level Android Smart POS +- Budget Mini POS models + +--- +**Budget Range** | **Premium (above ₹12,000)** +- High-end specifications +- Latest Android OS +- Premium build quality +- Extended warranty +**Mid-Range (between ₹6,000-12,000)** +- Balanced specifications +- Good performance +- Standard warranty +**Budget-Friendly (under ₹6,000)** +- Essential features only +- Cost optimization +- Basic support + | **Premium (above ₹12,000)** +- High-end Android Smart POS with advanced features +**Mid-Range (between ₹6,000-12,000)** +- Standard Android Smart POS +- Mid-tier Mini POS +**Budget-Friendly (under ₹6,000)** +- Entry-level Mini POS + +## Quick Selection Guide + +### For Retail Stores +- **High-volume retail**: Android Smart POS (full-size) with fast processor +- **Boutique shops**: Android Smart Mini POS with balanced features +- **Pop-up stores**: Mini POS with mobile data connectivity + +### For Service Businesses +- **Restaurants**: Android Smart POS with integrated printer +- **Salons/Spas**: Android Smart Mini POS for mobility +- **Home services**: Mini POS with rugged design and mobile data + +### For Mobile Businesses +- **Food trucks**: Android Smart Mini POS with mobile data +- **Markets/Events**: Mini POS with extended battery +- **Delivery services**: Compact Mini POS with drop resistance + +## Key Recommendations + +1. **Prioritise connectivity** - Choose mobile data-enabled devices if internet reliability is a concern +2. **Consider growth** - Select devices with headroom for increased transaction volumes +3. **Factor in lifespan** - Invest in future-proof specifications for long-term use +4. **Balance features with budget** - Focus on essential features that match your business needs + +## Need Help Choosing? + +Contact Razorpay support for personalised device recommendations based on your specific business requirements. Our team can help you select the optimal POS solution that balances performance, features, and budget for your unique needs. diff --git a/llm-content/pos/device.md b/llm-content/pos/device.md new file mode 100644 index 00000000..81a10bf9 --- /dev/null +++ b/llm-content/pos/device.md @@ -0,0 +1,88 @@ +--- +--- + +--- +title: Razorpay POS Device Suite +heading: About POS Devices +desc: Explore Razorpay's comprehensive suite of POS devices designed for various business needs across multiple industries. +index: true +tags: pos devices, payment terminals, card machines, contactless payments, mobile pos, razorpay hardware +--- + +Razorpay POS devices allow businesses to accept digital payments through various payment methods while maximising operational efficiency. + +Razorpay's POS ecosystem serves as the central hub for sales transactions, streamlining checkout processes and capturing valuable business data. + +The comprehensive device suite includes options for every business scenario, from retail counters to doorstep deliveries, unattended kiosks, and vending machines. + + +### Advantages + + - **Best Success Rates** + + Enjoy industry-leading success rates with 99%+ for UPI transactions and 98%+ for card payments, along with instant refunds on failed UPI transactions. + - **Fastest Processing Time** + + Experience lightning-fast transactions with just 1.5 seconds for UPI and 15 seconds for card payments, ensuring quick checkouts even during peak hours. + - **High success rate and low downtime** + + Benefit from 99% uptime with in-house switching capabilities and smart on-us routing features for uninterrupted business operations. + - **Simple and Intuitive UI/UX** + + Get started immediately with an easy-to-use interface that requires no cashier training, enabling your team to process payments efficiently from day one. + - **Quick & Easy Integration** + + Start accepting payments within 7 days, with seamless integration available with 200+ billing partners. + - **Value-added Services** + + Avail a host of services like digital billing, logic-based routing, split settlement and more to improve operational efficiencies. + - **Best-in-Class Support** + + Enjoy the best support system of Razorpay with dedicated relationship managers. + + + +### Features + + - **All-in-one Dashboard** + + Track online and in-person payments on the same Dashboard. + - **Downtime alerts** + + Keep customers informed with automated downtime alerts. + - **Easy EMI payments** + + Razorpay POS offers the lowest EMI processing time with 95% bank coverage. The reconciliation is automated end-to-end. + - **Dashboard and analytics** + + Get real-time analytics and insights on your Dashboard. Generate transactions and usage reports. Grant hierarchy-based login access. + - **Automatic reconciliation** + + Reconcile payments seamlessly at an invoice level. Your reconciliation reports are generated and sent automatically via email. + + +## Explore POS Device Suite + +Razorpay offers a POS device for every use case. Check out our device suite to find the best POS device for your business. + + - **Android Smart POS**: Complete point-of-sale solution with advanced features for businesses of all sizes. Combines powerful hardware with intuitive software for seamless transactions. + + + - **Android Smart Mini POS**: Compact and portable POS solution with full functionality. Perfect for small businesses and mobile merchants needing flexibility without compromising on features. + + + - **Mini POS**: Mobile point-of-sale solution that turns smartphones and tablets into payment terminals. Ideal for businesses on the go and those looking for cost-effective payment options. + + + - **Dynamic Soundbox**: Audio confirmation solution for transactions with customisable sound alerts. Enhances customer experience with clear payment notifications in busy environments. + + + - **Soundbox**: Simple audio payment confirmation device. Provides clear transaction status updates through voice alerts for merchants and customers. + + + - **Self-Healing POS**: Revolutionary AI-powered POS that automatically detects and resolves common device issues. Reduces transaction failures by 50% and ensures 99% uptime without merchant intervention. + + +### Next Step + +[Get started](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/quickstart.md) with Razorpay POS, buy the POS devices. diff --git a/llm-content/pos/digipos.md b/llm-content/pos/digipos.md new file mode 100644 index 00000000..4116575a --- /dev/null +++ b/llm-content/pos/digipos.md @@ -0,0 +1,209 @@ +--- +title: Razorpay DigiPOS +heading: DigiPOS +description: Razorpay DigiPOS for iOS enables Apple Premium Resellers to securely accept in-store payments on iPhones and iPads, streamlining the purchase process for Apple products. +--- + +# DigiPOS + +Razorpay DigiPOS is a comprehensive payment solution designed for Apple Premium Resellers (APRs). It allows them to seamlessly accept in-store payments through iPhones and iPads. + +With DigiPOS, businesses can offer a secure, efficient, and fully digital checkout experience, enhancing customer satisfaction while simplifying payment management. Ideal for resellers, DigiPOS integrates seamlessly with Apple devices, providing a modern and reliable way to process transactions. This will eliminate the dependency on Android POS devices and payment apps. Using DigiPOS one can complete the purchase on apple devices. + +## Frequently Asked Questions (FAQs) + +Here are some frequently asked questions for DigiPOS. + +### DigiPOS App + + +### 1. How do I download Razorpay DigiPOS? + + Razorpay DigiPOS is available for download on the [Apple App Store](https://apps.apple.com/in/app/razorpay-digipos/id6520383285?platform=iphone). + + + +### 2. Is there a fee for using the app? + + No. The app is free to use. + + + +### 3. Do I need user credentials to access DigiPOS? + + Yes, to access DigiPOS on each device, users must log in with their authorised usernames and passwords. + + + +### 4. Where can I find my user credentials? + + Your login credentials will be sent to you through email. You can also reach out to your dedicated Razorpay POC who can help you. + + + +### 5. Who should have the username and password credentials? + + Your login credentials should only be shared with trusted in-store employees who conduct transactions. APR stores are responsible for sharing login credentials. + + + +### 6. How do I change my store's user credentials? + + Contact your dedicated Razorpay POC to have your new credentials configured in the backend and ready for use. Alternatively, you can email us at `digipos-support@razorpay.com` for assistance. + + + +### 7. Can I install DigiPOS on all Apple devices? + + DigiPOS v1 supports iPadOS and iOS, allowing installation on iPhones and iPads. As it is not compatible with MacOS, it cannot be installed on MacBooks. + + + +### 8. What payment modes are supported on DigiPOS v1? + + DigiPOS v1 supports full-swipe card payments, UPI, Bank EMI, Apple brand EMI, and SMS Payment Links. + + + +### 9. Is Exchange flow supported on DigiPOS? + + Yes, exchange flow is supported on DigiPOS. + + + +### 10. What are the steps to do an Exchange transaction on DigiPOS? + + 1. Follow the standard steps for Brand EMI or Full Swipe Offers flows using cards or payment links. + 2. Select the Exchange Device checkbox on the Device Selection and IMEI Input screen if it is an exchange transaction. + 3. Enter the old device's IMEI or Serial Number. + 4. Proceed to complete the transaction. + + + +### 11. What transaction amount should I enter for an exchange transaction? + + Enter the original amount minus the value of the old device being exchanged. + + + +### 12. I cannot find the Exchange flow on the DigiPOS app. + + Please ensure you have updated the app to the latest version. Please visit Razorpay DigiPOS on the App Store to [update the app](https://apps.apple.com/in/app/razorpay-digipos/id6520383285). + + +### DigiPOS Device + + +### 1. Do I need another device apart from iPhone or iPad to accept payments? + + Yes, for card payments, a PAX DigiPOS device must be connected via Bluetooth to your iPhone or iPad. UPI and other non-card transactions can be processed directly on your device using DigiPOS without the DigiPOS device. + + + +### 2. What is the DigiPOS device used for? + + DigiPOS is a light, compact device used for card reading and PIN input. It securely processes card transactions. + + + +### 3. Can I connect multiple iPhones or iPads to a single DigiPOS device? + + No. Currently, you can connect only one iPhone or iPad to a single DigiPOS device at a time. To connect a different device, you should first disconnect from the existing device. + + + +### 4. I am facing issues with the DigiPOS device. How do I fix them? + + We apologise for the inconvenience. Contact your Razorpay Key Account Manager for a DigiPOS device replacement within 2 days, or email digipos-support@razorpay.com with your concerns and our team will respond within a business day. Meanwhile, please ensure you fully charge the DigiPOS device. + + + +### 5. Can I void a transaction from my iPad? + + Yes, void capability is available for card transactions in full-swipe, EMI, and payment link modes. Only authorised users with void access can perform void transactions to ensure security. + + + +### 6. How can I share the charge slip of the payment with customers? + + With DigiPOS, digital charge slips can be easily shared with customers by: + - Scanning the QR code on the payment success screen. + - Sending an SMS with the charge slip link by entering the customer’s phone number. + - Sending an email containing the charge slip by entering the customer’s email address. + + + +### 7. Can I print a charge slip? + + As the DigiPOS device is a compact, printerless device, DigiPOS v1 does not offer direct print capability. However, businesses can retrieve the digital chargeslip from the transaction success screen, transaction history, or Dashboard, and print it by connecting a printer to the Dashboard. + + + +### 8. How will I know whether my DigiPOS device is connected to my iPad? + + A device icon on the amount entry screen indicates whether the DigiPOS device is connected to the iPad. A green dot shows an active connection, while a red dot indicates no connection. Users can also check the device connection status on the accounts page. + + + +### 9. Can I initiate a card transaction without being connected to a DigiPOS device? + + On the amount entry page, users can select card payments after entering the amount. If no DigiPOS device connection is detected, they will be redirected to establish one. Card transactions cannot proceed without a connection. For card-not-present scenarios, an SMS payment link can be sent without needing a DigiPOS device connection. + + + +### 10. How can I get Apple Brand EMI enabled on DigiPOS device? + + Apple assigns a Dealer Code to verified businesses, including Apple Premium Resellers. Share your Apple-issued Dealer Code with your Razorpay Key Account Manager for backend activation. If you are an existing POS business, Razorpay will match your GST with Apple's business database to enable Apple Brand EMI. + + +### Account and Business Queries for APR HQ + + +### 1. How will I receive Settlements? + + As you are onboarded on the Direct model, all settlements will be handled by your acquiring bank. However, Razorpay POS will process Offer and Debit Card EMI settlements on a T+1 basis. + + + +### 2. What transaction details are included in the Offer Settlement Report? + + A single comprehensive report will be provided for both Card and Payment Link transactions, including details on: + - Instant Cashback for Offers + - Instant EMI Subvention for Brand EMI + - Debit Card EMI transactions + + + +### 3. When will I receive the funds and the report? + + Funds will be transferred on T+1 (T being the transaction day) at 6 pm, and the report will be sent to the APR HQ’s registered email address by 8 pm. + + + +### 4. Will UTR be shared in the Offer Settlement Report? + + Yes, the UTR will be included in the Offer Settlement Report as proof of settlement for easy reconciliation. + + + +### 5. How can I view the transaction details for all my stores in one place? + + As a Razorpay POS business, you can access the Razorpay POS Dashboard to view the transaction history of all your stores in one place. + + + +### 6. How can I create a username and password for the Dashboard? + + To create your username and password, provide the details to your dedicated Razorpay Key Account Manager, who will configure them for you in the backend. + + + +### 7. I have forgotten my username and password for the Dashboard. How can I recover them? + + You can contact your dedicated Razorpay Key Account Manager, and they will configure a new set of credentials for you in the backend. + + + +### 8. Is it possible to integrate DigiPOS with my billing software? + + DigiPOS v1 does not support billing integrations. Sales representatives should use DigiPOS as a standalone POS system, manually entering the payment amount on the iPad/iPhone screen. diff --git a/llm-content/pos/dynamic-soundbox.md b/llm-content/pos/dynamic-soundbox.md new file mode 100644 index 00000000..99ae636e --- /dev/null +++ b/llm-content/pos/dynamic-soundbox.md @@ -0,0 +1,111 @@ +--- +title: Razorpay Dynamic Soundbox +heading: About Dynamic Soundbox +description: Enable seamless UPI payments at your point of sale with Razorpay's Dynamic Soundbox, featuring automatic QR code generation and instant audio-visual confirmation. +--- + +# About Dynamic Soundbox + +Razorpay Dynamic Soundbox is a revolutionary device designed to streamline UPI payments at the point of sale. This innovative solution tackles common challenges faced in retail environments, such as long wait times, manual reconciliation errors, and payment confirmation uncertainties. The Dynamic Soundbox functions as a one-stop UPI solution that seamlessly integrates with merchants' existing billing systems or Razorpay POS machines. + +## Key Features + +### Automated Dynamic QR Generation +- **Integrated Billing System Connectivity**: Seamlessly connects with your existing billing system to generate dynamic QR codes automatically. +- **Zero Manual Input Required**: Eliminates the need for cashiers to manually enter transaction amounts, reducing billing time and human errors. +- **Invoice-Level QR Codes**: Generates unique QR codes for each invoice, ensuring accurate transaction tracking. + +### Dual Confirmation Capability +- **Audio Confirmation**: Provides instant voice alerts for successful transactions. +- **Visual Confirmation**: Displays transaction status and payment details on a bright, clear screen. +- **Customer-Facing Display**: 100% customer-facing display ensures maximum visibility of dynamic QR codes. + +### Network Connectivity +- **Multiple Connectivity Options**: Supports 4G and Wi-Fi connectivity. +- **Real-time Transaction Processing**: Processes transactions instantly with minimal latency. +- **Network Status Indicators**: LED indicators confirm connectivity status at a glance. + +### Robust Integration +- **API Integration**: Easy integration with existing POS and billing systems. +- **Fully Automated Reconciliation**: Enables end-to-end automated reconciliation at the invoice level. +- **Cross-Platform Compatibility**: Works with various billing software and ERP systems. + +## Technical Specifications + +Feature | Improvement +--- +**Operating System** | RTOS (Real-Time Operating System) +--- +**Display** | Clear and vibrant digital display with LED indicators +--- +**Connectivity** | 4G and Wi-Fi +--- +**Power** | Long-lasting battery with micro-USB charging port +--- +**Audio** | High-quality speaker for clear sound notifications +--- +**Dimensions** | Compact form factor for counter placement +--- +**Certification** | PCI DSS compliant for secure transactions + +> **WARN** +> +> +> **Watch Out!** +> +> The Dynamic Soundbox integrates seamlessly with 120+ billing partners, enabling go-live in just 2-3 days. +> + +## Benefits + +### Operational Efficiency +- **Reduced Billing Time**: Streamlines the checkout process by eliminating the need for manual entry. +- **Error-Free Transactions**: Dynamic QR codes eliminate the scope for numeric entry errors. +- **Fewer Failed Transactions**: Ensures smoother payment flows with instant refunds on failed UPI transactions. + +### Enhanced Customer Experience +- **Faster Checkouts**: Reduces customer wait time at billing counters. +- **Clear Payment Confirmation**: Both audio and visual confirmation builds customer trust. +- **Improved Queue Management**: Faster transaction processing helps reduce queue build-up. + +### Business Intelligence +- **Detailed Analytics**: Access transaction data through the Razorpay merchant portal. +- **Real-Time Reporting**: View transaction status instantly on both the device and dashboard. +- **Simplified Reconciliation**: Automated matching of transactions with bills reduces accounting workload. + +## Industry Applications + +The Dynamic Soundbox is ideal for various retail environments: + +- **Supermarkets and Hypermarkets**: Handle high transaction volumes efficiently. +- **Quick Service Restaurants**: Process payments rapidly during peak hours. +- **Retail Stores**: Provide a seamless checkout experience. +- **Pharmacies**: Ensure quick service for customers in need. +- **Electronics Stores**: Process high-value transactions with confidence. + +## Available Models + +Razorpay offers multiple Dynamic Soundbox models to suit different business needs: + +- **Aisino Q161**: Compact and reliable model with clear display and audio confirmation +- **ET389**: Advanced model with enhanced features for high-volume businesses +- **Brandworks AP101**: Efficient solution for seamless billing integration +- **Watchdata 10 and 11** (Pocket Soundbox): Ultra-portable pocket-sized devices for on-the-go businesses + +## Getting Started + +Setting up your Dynamic Soundbox is simple: + +1. Connect the device to power using the provided adapter. +2. Configure network settings for Wi-Fi or 4G connectivity. +3. Integrate with your billing system using Razorpay's API documentation. +4. Test the connection by generating a sample bill. +5. Start accepting payments with automated QR generation. + +> **INFO** +> +> +> **Note:** +> +> For optimal performance, ensure your device is placed in a customer-facing position with good network connectivity. Regular charging will maintain uninterrupted service during business hours. +> diff --git a/llm-content/pos/industry-applications.md b/llm-content/pos/industry-applications.md new file mode 100644 index 00000000..5dff1ec5 --- /dev/null +++ b/llm-content/pos/industry-applications.md @@ -0,0 +1,65 @@ +--- +title: Industry Applications for POS Devices +description: Explore how Razorpay POS devices serve different industry needs with tailored solutions for retail, food & beverage, transportation, and field services. +--- + +# Industry Applications for POS Devices + +Razorpay's comprehensive POS ecosystem serves as the central hub for sales transactions, streamlining checkout processes and capturing valuable business data. These payment terminals are designed to meet the specific needs of various industries, from retail counters to doorstep deliveries, unattended kiosks, and vending machines. + +## Industry-Specific POS Requirements + +Industry | Key Requirements | Benefits +--- +**Retail & Fashion** | - Touch Displays +- NFC Readers +- QR Scanners + | - Reduction in checkout times through faster processing with modern touch displays. Enhanced customer experience with interactive payment confirmation and product displays. +- Comprehensive sales analytics provide insights on product performance and customer preferences. + +--- +**Food & Beverage** | - Splash-proof Casing +- Sub-3s Processing +- Portable terminals +- Built in printer for printing chargeslips and bills on the go + | - Reduced wait times for customers through rapid transaction processing and tableside payment collection. +- Enhanced tip collection with tableside payments offering multiple gratuity options. +- Streamlined order management through integration with kitchen display systems and order tracking. + +--- +**Transportation** | - Super Fast 4G connectivity +- Long lasting all-day battery +- Terminal location tracking and management + | - Seamless on-the-go payment collection even in areas with variable network coverage. +- Reduced payment processing delays with rapid transaction authorisation. +- Improved customer convenience with multiple payment options and instant digital receipts. + +--- +**Field Services** | - Lightweight +- Dust and Water Resistant (IP54) +- Multi-SIM Support +- 12hr Battery + | - Increased payment collection rates by enabling immediate field transactions. +- Reduced paperwork and manual processing through digital receipt generation and signature capture. +- Enhanced professionalism at customer locations with sleek, reliable payment devices. +- Improved cash flow with immediate payment processing and same-day settlement options. + +--- +**Unattended Kiosks and Vending** | - Kiosk Integration Kit +- IP65 Rating +- Tap and Pay +- Remote Diagnostics + | - Expanded service hours with 24/7 payment availability that doesn't require staff supervision. +- Reduced operational staffing requirements through automated payment collection and reconciliation. +- Increased transaction volumes by offering convenient digital payment options. +- Enhanced customer convenience with rapid contactless payments and reduced transaction abandonment. + +## Choosing the Right Device for Your Industry + +When selecting a payment terminal for your specific industry, consider these factors: + +1. **Transaction Volume**: Higher transaction volumes benefit from faster processors and larger batteries. +2. **Connectivity Needs**: Consider whether 4G, WiFi, or both are necessary for your business environment. +3. **Form Factor**: Full-size terminals offer more features but mini terminals provide greater portability. +4. **Future-Proofing**: Newer Android versions and higher specifications provide longer useful life. +5. **Industry-Specific Features**: Consider special requirements such as scanning, printing, or durability. diff --git a/llm-content/pos/mpos.md b/llm-content/pos/mpos.md new file mode 100644 index 00000000..a7d4751b --- /dev/null +++ b/llm-content/pos/mpos.md @@ -0,0 +1,207 @@ +--- +title: Mini POS Devices +description: Ultra-compact payment acceptance solutions designed to work with smartphones or tablets for maximum mobility. +--- + +# Mini POS Devices + +Mini POS devices are ultra-compact payment acceptance solutions designed to work with smartphones and tablets. These pocket-sized terminals enable businesses to transform mobile devices into complete payment systems, offering maximum portability and flexibility for merchants of all sizes. + +## How Mini POS Works + +Mini POS solutions operate through a simple but effective system: + +1. **Hardware Connection**: The Mini POS device connects to a smartphone or tablet via Bluetooth +2. **Software Integration**: A companion application on the mobile device communicates with the Mini POS terminal +3. **Transaction Processing**: Payments are processed through the mobile device's internet connection +4. **Receipt Delivery**: Digital receipts can be sent via email or SMS, or printed with optional mobile printers + + +### Advantages + + ### Ultimate Portability + - **Pocket-Sized** + + Easily fits in a pocket or small bag. + - **Lightweight** + + Typically weighing less than 100g. + - **No Charging Base** + + Simple USB charging for convenience. + + ### Cost-Effective + - **Lower Initial Investment** + + More affordable than full-size terminals. + - **Leverages Existing Devices** + + Uses the smartphone or tablet you already own. + - **Reduced Infrastructure** + + Minimal additional equipment required. + + ### Flexibility + - **Multiple Payment Types** + + Supports chip, contactless, and magnetic stripe cards. + - **Cross-Platform** + + Works with various mobile operating systems. + - **Adaptable** + + Suitable for businesses of all sizes. + + +> **INFO** +> +> +> **Note:** +> All devices are certified with PCI security standards and support secure transaction processing through encrypted connections with companion mobile applications. +> + + + + +### Industry Applications + + Mini POS devices are particularly beneficial for: + + ### Micro-Merchants + - **Individual Sellers** + + Artists, crafters, and independent professionals. + - **Market Vendors** + + Sellers at farmers markets, craft fairs, and exhibitions. + - **Home-Based Businesses** + + Small operations with occasional payment needs. + + ### Mobile Services + - **Delivery Personnel** + + Food delivery, courier services, and home deliveries. + - **Field Technicians** + + Repair services, installations, and maintenance workers. + - **Home Healthcare** + + Medical professionals providing services at patients' homes. + + ### Pop-Up Retail + - **Temporary Stores** + + Short-term retail locations and seasonal shops. + - **Event Sales** + + Merchandise sales at concerts, festivals, and sporting events. + - **Trade Shows** + + Exhibition booths and convention sales. + + ### Transportation + - **Taxi Services** + + Independent drivers and small taxi companies. + - **Tour Operators** + + Guides offering on-the-spot booking and payment. + - **Mobile Ticket Sales** + + Event staff selling tickets at various locations. + + + +### Integration with Razorpay & Choosing the Right Mini POS + + ## Integration with Razorpay + + Razorpay's Mini POS solutions seamlessly integrate with its broader payment ecosystem: + + - **Unified Dashboard** + + View all transactions across different payment channels. + - **Comprehensive Reporting** + + Access detailed analytics and sales reports. + - **Customer Management** + + Build customer databases and implement loyalty programs. + + ## Choosing the Right Mini POS Solution + + When selecting a Mini POS device, consider: + + 1. **Mobile Platform Compatibility** + + Ensure compatibility with your existing smartphones or tablets. + + 2. **Transaction Volume** + + Select appropriate battery capacity based on daily usage. + + 3. **Payment Types** + + Confirm support for the payment methods your customers use. + + 4. **Connectivity Options** + + Evaluate Bluetooth version and compatibility requirements. + + 5. **Battery Life** + + Consider operational needs for mobile operations. + + +## PAX D180/D180C/D180S + +The PAX D180 series offers compact Mini POS solutions with essential payment acceptance features. + +### Key Features +- **Ultra-Compact**: Minimal form factor for maximum portability +- **Multiple Connectivity**: Bluetooth connectivity for pairing with mobile devices +- **Essential Card Readers**: Support for all major card reading technologies +- **Long Battery Life**: Efficient power management for all-day operation + +### Technical Specifications + +Feature | Improvement +--- +**Operating System** | Linux based +--- +**Processor** | ARM +--- +**Memory** | 128KB SRAM, 1MB Flash, External Storage: 4MB Flash +--- +**Display** | 128 x 64 Pixels LCD +--- +**Keys** | 13 Keys: 0~9, 3 Function Keys +--- +**Connectivity** | Bluetooth 4.2 +--- +**Card Readers** | Chip & PIN, NFC Contactless, Magnetic Stripe +--- +**Battery** | 250mAh +--- +**Dimensions** | 116mm (L) * 59.6mm (W) * 13mm (H) +--- +**Weight** | 83g + +### Available Models + +#### PAX D180 +The standard model with essential payment acceptance features. + +#### PAX D180C +Enhanced version with additional connectivity options and features. + +#### PAX D180S +Specialized version designed for specific industry requirements. + +> **INFO** +> +> +> **Note:** +> Devices with optional specifications are subject to stock availability. +> diff --git a/llm-content/pos/orders.md b/llm-content/pos/orders.md new file mode 100644 index 00000000..4a2f0d10 --- /dev/null +++ b/llm-content/pos/orders.md @@ -0,0 +1,46 @@ +--- +title: About Orders on Razorpay POS +heading: About Orders +description: All about Razorpay Orders, their states and Razorpay Dashboard actions. +--- + +# About Orders + +Order is an important step of the payment life cycle at Razorpay. When a customer clicks the pay button, an order is created with a unique identifier. This contains details such as the transaction amount and currency. The order id secures the payment request and one cannot tamper with the order amount. Pass this order id to the Razorpay Checkout. + +### Advantages + +- Single successful payment bound to an order. Prevents multiple payments. +- Quick and easy query in the database. Combines multiple payment attempts for a single order. + +## Order States + +Following are the various states of an order: + + Status | Description + --- + `created` | When a new order is created, it is in the `created` state. It stays in this state until payment is attempted on it. + --- + `attempted` | An order moves from `created` to `attempted` state when payment is first attempted on it. It remains in the `attempted` state until a payment associated with that order is captured. + --- + `paid` | After the payment is captured successfully, the order moves to the `paid` state. No further payment requests are allowed once the order moves to the `paid` state. The order continues to be in the `paid` state even if the payment associated with the order is refunded. + +> **WARN** +> +> +> **Watch Out!** +> +> If an order is in an `attempted` state with the associated payment id in the `authorized` state, initiating another payment using the same order id is not allowed. +> + +## Order and Payment Flows + +Following is a pictorial representation of how order and payment flows are closely related: + +![Pictorial representation of Order and Payment Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/orders-payment-flow.jpg.md) + +## Dashboard Actions + +Perform the following actions using the Dashboard: +- [View orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/orders/dashboard.md#view-order-details) +- [View reports related to orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/orders/dashboard.md#reports) diff --git a/llm-content/pos/orders/dashboard.md b/llm-content/pos/orders/dashboard.md new file mode 100644 index 00000000..895bcc3f --- /dev/null +++ b/llm-content/pos/orders/dashboard.md @@ -0,0 +1,30 @@ +--- +title: Orders on Razorpay POS +heading: Orders - Dashboard Actions +description: View Order details and view reports from the Razorpay Dashboard. +--- + +# Orders - Dashboard Actions + +You can use the Dashboard to perform the following actions: +- [View Order Details from Dashboard](#view-order-details-from-dashboard) +- [View reports](#reports) + +## View Order Details From Dashboard + +To view order details: +1. Log in to the Dashboard. +2. Select **Transactions** from the left menu and go to the **Orders** tab. +3. A list of all the orders is displayed. + + ![Order details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pos-view-orders.jpg.md) + +4. Click an **Order Id** to view the details of the order. + +## Reports + +Detailed insights can be gained using reports and real-time data on the Dashboard. These reports can then be used for accounting and recon purposes. Know more about [reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/dashboard/reports.md). + +### Related Information + +[About Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/orders.md) diff --git a/llm-content/pos/payment-methods.md b/llm-content/pos/payment-methods.md new file mode 100644 index 00000000..18fa6e3b --- /dev/null +++ b/llm-content/pos/payment-methods.md @@ -0,0 +1,48 @@ +--- +title: Payment Methods on Razorpay POS +heading: About Payment Methods +description: Check the different payment methods that can be configured to accept payments from your customers using Razorpay products. +--- + +# About Payment Methods + +Razorpay offers multiple payment methods, allowing your customer the flexibility to complete the payment using the payment method of their choice. This improves user experience and allows you to offer alternate payment methods to your customer in the case of downtimes or low success rates with one of the payment methods. + +## View Payment Methods + +To view payment methods enabled for you: +1. Log in to the Dashboard. +2. Click **Account & Settings** in the left menu. +3. Go to **Payment methods** to view the payment methods enabled for your Razorpay account. + ![Dashboard - Payment methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-method-enable.jpg.md) + +## Supported Payment Methods + +Following are all the payment modes that the customer can use to complete the payment. Some of them are available by default, while others require approval from us. Raise a request from the Dashboard to enable such payment methods. + +Payment Method | Code | Availability +--- +Debit Card | `debit` | ✓ +--- +Credit Card | `credit` | ✓ +--- +UPI | `upi` | ✓ +--- +EMI - Credit Card EMI & Debit Card EMI | `emi` | ✓ +--- +Cardless EMI | `cardless_emi` | Requires [Approval](https://razorpay.com/support). +--- +Pay Later | `paylater` | ✓ +--- +EMI by Razorpay Catalog (Brand EMI) | `brand` | ✓ + +Know more about [supported banks for EMI](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/payment-methods/emi/emi-by-razorpay.md). + +## Transaction Limits + +- [Transaction Limits for Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/transaction-limits.md) +- [UPI Transaction Limits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/transaction-limits/upi.md) + +## Payment Method Error Codes + +There are certain error codes specific to each payment method supported by Razorpay. Know more about the [Payment Method Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/payments/payment-methods-error-parameters.md). diff --git a/llm-content/pos/payment-methods/emi/emi-by-razorpay.md b/llm-content/pos/payment-methods/emi/emi-by-razorpay.md new file mode 100644 index 00000000..48d98582 --- /dev/null +++ b/llm-content/pos/payment-methods/emi/emi-by-razorpay.md @@ -0,0 +1,180 @@ +--- +title: EMI by Razorpay POS | Unlock Easy Installment Payments +heading: EMI by Razorpay +description: Offer EMIs to your customers at Razorpay Checkout. Check the payment flow and supported Banks. +--- + +# EMI by Razorpay + +Using Razorpay POS, you can let your customers use EMI as a payment method to buy various products on EMI using their cards without paying the entire amount immediately. Razorpay supports EMIs on cards issued by major banks. + +## Supported Banks for EMIs + +Given below is a list of banks or networks that support EMIs. + + + + Code | Issuer Bank/Network | Minimum Amount (in INR) | 3 months | 6 months | 9 months | 12 months | 18 months | 24 months | 36 months + --- + AUBL | AU Bank | 2000 | 16% | 16% | 16% | 16% | 16% | 16% | NA + --- + UTIB | Axis Bank | 3000 | 16% | 16% | 16% | 16% | 16% | 16% | NA + --- + CITI | Citibank | 3000 | 16% | 16% | 16% | 16% | 16% | 16% | NA + --- + BARB | Bank of Baroda | 3000 | 16% | 16% | 16% | 16% | 16% | 16% | NA + --- + HDFC | HDFC Bank | 1000 | 20% | 20% | 20% | 20% | 20% | 20% | NA + --- + HSBC | HSBC Bank | 2000 | 13% | 13% | 14.50% | 14.50% | 15% | 15% | NA + --- + INDB | IndusInd Bank | 3000 | 14% | 14% | 15% | 15% | 15% | 15% | 15% + --- + RATN | RBL Bank | 3000 | 13% | 14% | 15% | 15% | 15% | 15% | NA + --- + YESB | Yes Bank | 1500 | 16% | 16% | 16% | 16% | 16% | 16% | NA + --- + SCBL | Standard Chartered | 3000 | 11.88% | 14% | 15% | 15% | 15% | 15% | NA + --- + JAKA | Jammu and Kashmir Bank | 2500 | 12% | 12% | 12.50% | 12.50% | 13% | 13% | NA + --- + ICIC | ICICI Bank | 1500 | 15.99% | 15.99% | 15.99% | 15.99% | 15.99% | 15.99% | NA + --- + KKBK | Kotak Mahindra Bank | 3000 | 16% | 16% | 16% | 16% | 16% | 16% | 16% + --- + SBIN | State Bank of India | 2500 | 16.50% | 15% | 15% | 15% | 16% | 16% | NA + --- + FDRL | Federal Bank | 2500 | 15.99% | 15.99% | 15.99% | 15.99% | 15.99% | 15.99% | NA + --- + CNRB | Canara Bank | 5000 | 13% | 13% | 13% | 14% | 14% | 14% | NA + --- + IDFC | IDFC Bank | 2500 | 16% | 15% | 15% | 16% | 16% | 16% | NA + --- + Onecard | OneCard | 2500 | 16% | 16% | 16% | 16% | 16% | 16% | NA + + + + + Code | Issuer Bank/Network | Minimum Amount (in INR) | 3 months | 6 months | 9 months | 12 months | 18 months | 24 months | 36 months + --- + HDFC | HDFC Bank | 5000 | 20% | 20% | 20% | 20% | 20% | 20% | NA + --- + KKBK | Kotak Mahindra Bank | 3000 | 20.75% | 22% | 22% | 22% | NA | NA | NA + --- + ICIC | ICICI Bank | 5000 | 16% | 16% | 16% | 16% | NA | NA | NA + + + + + Code | Issuer Bank/Network + --- + `muthootfinance` | Muthoot Finance + + + + + Code | Issuer Bank/Network + --- + `hdfc` | FlexiPay by HDFC Bank + --- + `lazypay` | Lazypay + + + + +## EMI by Razorpay Catalog (Brand EMI) + +The EMI by Razorpay Catalog (Brand EMI) on POS simplifies the EMI transaction process by allowing easy discovery of No Cost EMI, Low Cost EMI, and other applicable offers on products. + +Given below is a list of brands that support Brand EMIs. + +List of OEMs | State/Agent Code | Dealer Code | GSTIN No. | Distributor Code +--- +Aiwa | ✖️ | ✖️ | ✖️ | ✖️ +--- +Akai | ✖️ | ✖️ | ✖️ | ✖️ +--- +Being Human | ✖️ | ✖️ | ✖️ | ✖️ +--- +BenQ | ✖️ | ✖️ | ✖️ | ✖️ +--- +Bluestar | ✖️ | ✅ | ✖️ | ✖️ +--- +Bosch | ✖️ | ✅ | ✖️ | ✖️ +--- +Canon | ✖️ | ✖️ | ✖️ | ✖️ +--- +Crayon Motors | ✖️ | ✖️ | ✖️ | ✖️ +--- +Daewoo | ✖️ | ✖️ | ✖️ | ✖️ +--- +Diasun | ✖️ | ✖️ | ✖️ | ✖️ +--- +ElanPro | ✖️ | ✖️ | ✖️ | ✖️ +--- +Elista (Dealer code is optional) | ✖️ | ✅ | ✖️ | ✖️ +--- +Evra Energy | ✖️ | ✖️ | ✖️ | ✖️ +--- +Havells | ✖️ | ✅ | ✖️ | ✖️ +--- +Infinix | ✖️ | ✅ | ✖️ | ✖️ +--- +Itel | ✖️ | ✅ | ✖️ | ✖️ +--- +Jajot | ✖️ | ✖️ | ✖️ | ✖️ +--- +KICK EV | ✖️ | ✖️ | ✖️ | ✖️ +--- +Lava | ✖️ | ✖️ | ✖️ | ✖️ +--- +Lebu Electric | ✖️ | ✖️ | ✖️ | ✖️ +--- +Leela-Eye Institute | ✖️ | ✖️ | ✖️ | ✖️ +--- +Lloyd | ✖️ | ✅ | ✖️ | ✖️ +--- +Lords Automative | ✖️ | ✖️ | ✖️ | ✖️ +--- +Micromax | ✖️ | ✖️ | ✖️ | ✖️ +--- +Next View | ✖️ | ✖️ | ✖️ | ✖️ +--- +Nexzu mobility | ✖️ | ✖️ | ✖️ | ✖️ +--- +Nokia | ✖️ | ✖️ | ✖️ | ✖️ +--- +Oneiric | ✖️ | ✖️ | ✖️ | ✖️ +--- +Oppo | ✅ | ✅ | ✖️ | ✖️ +--- +Realme | ✖️ | ✅ | ✖️ | ✅ +--- +Samsung | ✖️ | ✅ | ✖️ | ✖️ +--- +Sansui | ✖️ | ✖️ | ✖️ | ✖️ +--- +SENS | ✖️ | ✖️ | ✖️ | ✖️ +--- +Sharp | ✖️ | ✅ | ✖️ | ✖️ +--- +Siemens | ✖️ | ✅ | ✖️ | ✖️ +--- +Suzuma | ✖️ | ✖️ | ✖️ | ✖️ +--- +Symphony | ✖️ | ✖️ | ✖️ | ✖️ +--- +Tecno | ✖️ | ✅ | ✖️ | ✖️ +--- +Tejas | ✖️ | ✖️ | ✖️ | ✖️ +--- +Vivo | ✅ | ✅ | ✖️ | ✖️ +--- +Voltas | ✖️ | ✖️ | ✅ | ✖️ +--- +Voltas BeKo | ✖️ | ✖️ | ✅ | ✖️ +--- +Vsun | ✖️ | ✖️ | ✖️ | ✖️ +--- +Xiaomi | ✖️ | ✅ | ✖️ | ✖️ +--- diff --git a/llm-content/pos/payments.md b/llm-content/pos/payments.md new file mode 100644 index 00000000..8b1e7df6 --- /dev/null +++ b/llm-content/pos/payments.md @@ -0,0 +1,37 @@ +--- +title: Payments on Razorpay POS +heading: About Payments +description: Check payments, the various payment states and Razorpay Dashboard actions. Understand late authorisations. +--- + +# About Payments + +You can accept live payments using the Razorpay Payment Gateway once your Razorpay account has been activated. + +## Payment Life Cycle + +Following are the various states of a payment: + +States | Description +--- +`created` | This is the first state. The customer has provided the payment details, which are sent to Razorpay. The payment has not been processed yet. +--- +`authorized` | The payment state changes to `authorized` when the bank successfully authenticates the customer's payment details. The money is deducted from the customer’s account by Razorpay. The amount is settled to your account after the payment is manually or automatically captured. Payment in this state is auto-refunded to the customer if not captured within 3 days of creation. +--- +`captured` | When the payment status is changed to `captured`, the payment is verified as complete by Razorpay. The amount is settled to your account as per the settlement schedule. +--- +`refunded` | You can refund the payments that have been successfully captured at your end. The amount is reversed to the customer's account. +--- +`failed` | An unsuccessful payment attempt is marked as `failed`, and the customer will have to retry the payment. Any amount debited will be refunded into customers account in 5-7 working days. + +The following state diagram depicts the flow of money through the various payment states: + +![Different stages of Payments Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payment-capture-payment-states.jpg.md) + +## Dashboard Actions + +You can perform the following actions on payments from the Dashboard: + +- [Issue a refund for a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/issue.md) +- [View details of a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/payments/dashboard.md#view-payment-details) +- [View settlement details of a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/settlements/dashboard.md#view-settlements-using-dashboard) diff --git a/llm-content/pos/payments/dashboard.md b/llm-content/pos/payments/dashboard.md new file mode 100644 index 00000000..6d52c7d9 --- /dev/null +++ b/llm-content/pos/payments/dashboard.md @@ -0,0 +1,41 @@ +--- +title: POS Payments +heading: Dashboard Actions +description: View payment details, issue a refund or view settlement details of a payment from the Razorpay Dashboard. +--- + +# Dashboard Actions + +You can use the Dashboard to perform the following actions: +- [View Payment Details](#view-payment-details) +- [View Settlement Details of a Payment](#view-settlement-details-of-a-payment) + +## View Payment Details + +To view the details of a payment made to your account: +1. Log in to your Dashboard. +2. Click **Transactions** → **Payments**. +3. Click **Details** for the selected Payment ID. + +> **INFO** +> +> +> **Handy Tips** +> +> Click on the **Charge Slip** file name to view it. Click the download icon next to the **Charge Slip** file name to save it on your system. +> + +![POS payment details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pos-payment-details.jpg.md) + +## View Settlement Details of a Payment + +To view a detailed break-down of a settlement made to your account: +1. Log in to your Dashboard. +2. Navigate to **Transactions** → **Payments**. +3. Click on the specific **Payment Id** for which you want to view the settlement details. +4. In the **Payment Details** view, you can view the settlement details. +5. Click on the **settlement_id** to view the detailed breakdown. + +### Related Information + +- [About Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/payments.md) diff --git a/llm-content/pos/payments/faqs.md b/llm-content/pos/payments/faqs.md new file mode 100644 index 00000000..80231326 --- /dev/null +++ b/llm-content/pos/payments/faqs.md @@ -0,0 +1,23 @@ +--- +title: Razorpay Payments FAQs for POS +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Payments. +--- + +# Frequently Asked Questions (FAQs) + +### 1. How much does Razorpay charge per transaction? + + Razorpay offers an enterprise plan designed for large volumes, which gives you the best prices possible for your business. Know more about [pricing](https://razorpay.com/pricing/). + + + +### 2. Is GST mandatory to accept payments? + + No, GST is not mandatory if your business does not have an annual turnover of over ₹20 lakhs. However, if you do not provide your GST details, you would not be able to claim TDS at the time of filing your tax returns. + + + +### 3. What is the applicable GST? How is it charged? + + 18% GST is charged on the fee deducted for all payment methods except domestic card transactions of amount diff --git a/llm-content/pos/quickstart.md b/llm-content/pos/quickstart.md new file mode 100644 index 00000000..7516fc50 --- /dev/null +++ b/llm-content/pos/quickstart.md @@ -0,0 +1,147 @@ +--- +title: Quickstart Guide +description: Complete guide to get started with Razorpay's POS. +--- + +# Quickstart Guide + +- **1. Create a Razorpay POS Account**: Create a Razorpay POS account to get started. + + - **2. Submit KYC Details**: Submit the KYC details for account verification. + + - **3. Add Shop Images**: Upload front and interior images of your shop to order a Razorpay POS device. + +- **4. Buy Razorpay POS Devices**: Explore the different Razorpay POS devices available and place an order. + +## 1. Sign Up + +Go to the [Razorpay website](https://accounts.razorpay.com/auth/). + +To create a Razorpay account: + +1. Enter your 10-digit **Mobile Number**. Click **Continue**. +2. Enter the **OTP** sent to your mobile number. Select the check box below to receive updates on WhatsApp. Click **Verify**. If you did not receive the OTP, click **Resend OTP**. + ![Enter phone number to receive updates on WhatsApp](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/easy-mobile-POS.jpg.md) +3. Enter your **Name** and click **Continue**. +4. Select where you want to accept payments from the given options. You can also select multiple options if relevant. + ![Select business type](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pos-signup-select-business-type.jpg.md) +5. Select your business type from the list. Know more about [different business types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#2-submit-kyc-details). + +> **WARN** +> +> +> **Watch Out!** +> +> Currently, Razorpay POS is not supported for unregistered businesses. +> + +6. Click **Continue**. +7. Enter your **PAN**/**Business PAN** and click **Continue**. We will verify the details with the Central PAN database. +8. Enter the name associated with the PAN and click **Continue**. +9. Enter your **Brand Name**. This should be the name of your business that your customers recognise. Click **Continue**. +10. Select the relevant **Business Category** from the list. + ![Platform Details - Enter Brand Name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/easy-brand-name.jpg.md) +11. Choose a **Subcategory** from the list. For example, if you selected **Education**, specify the category under it from the list. +12. . Depending on the category and sub-category, choose the additional details as required. + +## 2. Submit KYC Details + +Provide the following information to complete KYC. + + ![Complete KYC Verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/easy-kyc.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> The fields under Bank Details, GST Details, and Business Documents will differ based on your business type. +> + + 1. **Business Address**: Add your business address. Select the check box if your **Operational address is the same as your Business address**. Click **Done**. This will be verified against your business documents. + +> **INFO** +> +> +> **Handy Tips** +> +> Operational Address is the current address from where you are operating your business. On the other hand, a Business Address is an address you register when you start your business. +> + + + ![Add your registered business address](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/easy-address.jpg.md) + + 2. **Business Documents**: Upload the relevant [business documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/business-types-kyc-documents.md) based on your business type. Click **Continue**. + 3. **Bank Details**: Fill in your bank account details such as **Account Number** and **IFSC Code**. This will be the account to which Razorpay settles your funds. Click **Done**. + 4. **Identity Proof**: You can upload your Aadhar Card, Passport or Voter ID. Upload the required documents and click **Continue**. + + +> **INFO** +> +> +> **Handy Tips** +> +> Select **Upload another ID proof** in case your Aadhar is not linked to your mobile number, and select a document from the list to submit your address proof. Upload the required documents. +> + + + 5. **GST Details**: This will be auto-filled in case your PAN verification is successful. If not, add your GST details for taxation and compliance. Select the check box if you do not have a GSTIN. Click **Done**. + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot claim GST input credit if GSTIN is not shared. +> + + +> **INFO** +> +> +> **Handy Tips** +> +> Extra fields may appear based on your business type. +> - For LLP: LLPIN (Limited Liability Partnership Identification Number) +> - For Public and Private Ltd: CIN (Corporate Identification Number) +> + + + 6. Once you provide all the required details for verification, click **Submit KYC**. + ![Business Details - Submit KYC Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/easy-submit.jpg.md) + +## 3. Add Shop Images + +Upload two images of your workplace: +- An image of your shop from the front. +- An image of the interior of your shop. + + ![Add shop pictures for KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pos-add-shop-pictures.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> You will not be able to order a POS device without completing the steps mentioned above. However, you can choose to **Add Later**. +> + + +After uploading both the images, click **Submit Details**. Our team will review the information submitted by you. It takes approximately 3-4 working days to complete the review process. + +## 4. Buy Razorpay POS Devices + +To buy a Razorpay POS device: + +1. Log in to the Dashboard. +2. Navigate to **POS** from the left navigation. +3. Explore the [POS device options](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos.md#explore-pos-device-suite), select one and click **Add to cart**. + ![Select the pos device](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-pos-device.jpg.md) +4. You can click **+** to add a combination of devices you want to order. +5. Click **Proceed to Order**. Review your order. You can **Edit** your order and **+ Add New Address** if required. +6. Click **Confirm Address & Pay**. + ![Order razorpay pos](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/buy-pos.jpg.md) +7. Select your preferred payment method and click **Pay Now**. + +Once the order is placed, you can find it in the **POS** → **Orders** tab. diff --git a/llm-content/pos/refunds.md b/llm-content/pos/refunds.md new file mode 100644 index 00000000..6cb7500a --- /dev/null +++ b/llm-content/pos/refunds.md @@ -0,0 +1,71 @@ +--- +title: Pay Refunds to Customers with Razorpay POS +heading: About Refunds +description: Initiate refunds using Razorpay POS Dashboard and APIs for your customers. +--- + +# About Refunds + +There could be situations when customers request a refund of the payments made for the products or services purchased or availed on your website or app. + +> **INFO** +> +> +> +> **Customer Looking for Refund** +> +> If you are a customer looking for a refund, know about [customer refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers/customer-refunds.md). +> + +## Refund Types + +You can use [Normal Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/normal.md) to refund payments to your customers. The amount is refunded within 5-7 working days. + +## Dashboard Actions + +You can perform the following actions on refunds from the Dashboard: + +- [View Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/view.md) +- [Issue Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/issue.md) +- [View Settlement Details of a Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/view.md#view-settlement-details-of-a-refund) + +## Refund States + +Following are the various states of a refund: + +States | Description +--- +`created` | This state indicates that the refund is initiated from Razorpay. This state will be displayed only on the Refunds API. +--- +`processed` | This is the final state of the refund. +--- +`failed` | A refund can attain the failed state in the following scenarios:- Normal refunds are not possible for a payment that is more than 6 months old. +- Instant refunds can sometimes fail because of the customer's account or bank-related issues. + +> **WARN** +> +> +> **Watch Out!** +> +> Usually, Razorpay moves a refund to the `processed` state before receiving the ARN/RRN number from the Gateway. You can ensure that a refund moves to the `processed` state only after receiving confirmation from the Gateway by activating this feature on your account by raising a [support request](https://razorpay.com/support/#request). +> + +## Handle Refund Chargeback + +For the prevention of chargebacks, Razorpay only does **source refunds**. It means that money is refunded to the payment method that the customer used to make the payment. For example, if a credit card was used to make the payment, the refund is pushed to the same credit card. Similarly, in the case of UPI payments, the refund is pushed to the VPA used while making the payment. + +If a chargeback is received for an instantly refunded payment, the processed refund will have a **UTR (Unique Transfer Reference)** in the callback. This UTR appears against the **ARN (Application Reference Number)** parameter in the Refund entity. The UTR serves as proof of refund completed between you and Razorpay. + +Additionally, Razorpay passes the **RRN (Razorpay Reference Number)** of the payment in the Fund Transfer Request sent for the refund. This ties the instant refund back to the parent payment, thereby, serving as proof of the refund. This data can also be used as a defense against a future chargeback or arbitration case. + +## Reports + +Detailed insights can be gained using reports and real-time data on the Dashboard. These reports can then be used for accounting and recon purposes. Know more about [reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md). + +Understand [how the Refund process works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/normal.md#how-normal-refunds-work). + +### Related Information + +- [Handle refund errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/errors.md) +- [Refunds API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/apis.md) +- [Refunds FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/faqs.md) diff --git a/llm-content/pos/refunds/apis.md b/llm-content/pos/refunds/apis.md new file mode 100644 index 00000000..2a5873fb --- /dev/null +++ b/llm-content/pos/refunds/apis.md @@ -0,0 +1,25 @@ +--- +title: Razorpay POS Refund APIs +heading: Refund APIs +description: List of Refunds APIs to perform actions like creating, viewing and updating refunds. +--- + +# Refund APIs + +## List of Refunds APIs + +The table below lists the various Refunds APIs and gives a brief description of each API: + + API | Description + --- + [Create a Normal refund ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/create-normal.md) | API to create a Normal refund + --- + [View multiple refunds for a payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-multiple-refund-payment.md) | API to retrieve multiple refunds for a payment + --- + [View refund for a specific refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md) | API to retrieve details of a specific refund made for a payment + --- + [View all refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-all.md) | API to view details of all refunds + --- + [View refund details by refund id ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-with-id.md) | API to retrieve refund details using the refund id + --- + [Update refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/update.md) | API to update the 'Notes' field of an existing refund diff --git a/llm-content/pos/refunds/errors.md b/llm-content/pos/refunds/errors.md new file mode 100644 index 00000000..91dc8774 --- /dev/null +++ b/llm-content/pos/refunds/errors.md @@ -0,0 +1,46 @@ +--- +title: Handle Refund Errors for Razorpay POS +heading: Handle Refund Errors +description: Check the errors that may occur while processing Refunds and how to handle these errors. +--- + +# Handle Refund Errors + +Sometimes when you try to process a refund request, it fails to get processed and you may encounter `BAD_REQUEST_ERROR` messages stating refunds are not supported. This happens because most of the banks do not support refunds for payments that are more than 6 months old. + +## List of Possible Refund Errors + +```json: Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Refund is not supported by the bank because the payment is more than 6 months old", + "source": null, + "step": null, + "reason": null, + "metadata": {} + } +} +``` + +```json: Error Response +{ + "error": { + "code": "BAD_REQUEST_ERROR", + "description": "Payment is more than 6 months old, only instant refund is supported", + "source": null, + "step": null, + "reason": null, + "metadata": {} + } +} +``` + +To check the refund status, navigate to the **Refund Details** pop-up by clicking on the specific **Refund Id** under the **Transactions** → **Refunds** tab. + +You can get the ARN/RRN for successfully processed refunds under the [ Dashboard Refunds tab](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/refunds/view.md) or using the [Fetch Refund API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md#fetch-refund-by-id). This is a unique reference number that can be used by customers to track refunds. + +### Related Information +- [About Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds.md) +- [Normal Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/normal.md) +- [Refunds FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/faqs.md) diff --git a/llm-content/pos/refunds/faqs.md b/llm-content/pos/refunds/faqs.md new file mode 100644 index 00000000..d9e31721 --- /dev/null +++ b/llm-content/pos/refunds/faqs.md @@ -0,0 +1,38 @@ +--- +title: Payments | Refunds - FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Refunds via Razorpay and IRCTC refunds. +--- + +# Frequently Asked Questions (FAQs) + +### 1. How do I initiate a refund? + + You can issue partial or full refund using: + - [The Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/issue.md#issue-refunds). + - [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds.md). + + By default, the entire amount is refunded. If you issue a partial refund, ensure the partial refund option is selected and enter the desired value in INR. + + +> **WARN** +> +> +> +> **Watch Out!** +> +> Razorpay issues immediate refunds. Once a refund is issued, it cannot be canceled or reversed. +> + + + + +### 2. Do you charge for refunds? + + No, we do not charge for the regular refunds. However, fees and taxes charged for a captured payment are not reversed. + + + +### 3. I am unable to refund a payment. What do I do? + + If your current balance is less than the amount you are trying to refund, you can either initiate the refund once you receive further payments or you can [add funds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings.md#add-funds) to your account from the Dashboard. diff --git a/llm-content/pos/refunds/issue.md b/llm-content/pos/refunds/issue.md new file mode 100644 index 00000000..07cfd381 --- /dev/null +++ b/llm-content/pos/refunds/issue.md @@ -0,0 +1,55 @@ +--- +title: Issue Refunds +description: Issue refunds to customers using Razorpay Dashboard and APIs. +--- + +# Issue Refunds + +You can issue refunds to your customers using the Dashboard or APIs. Refunds are possible for `captured` payments only. + +> **INFO** +> +> +> +> **Customer Looking for Refund** +> +> If you are a customer looking for a refund, know about [customer refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers/customer-refunds.md). +> + +## Full and Partial Refunds + +Refunds can be made either in **full** or in **part**. + +- **Full Refund** + +You can refund the entire amount that you received in the payment. + +- **Partial Refund** + +You can refund part of the amount received in the payment. You can issue multiple, partial refunds as long as their sum does not exceed the captured amount. + +A payment moves to the `refunded` state only when the entire amount is refunded to the customer. In case of partial refunds, the payment continues to remain in the `captured` state till the entire payment is refunded. + +## Issue Refunds + +### Issue Refunds Using Dashboard + +To issue refunds: + +1. Log in to the Dashboard. +2. Navigate to **Transactions** → **Payments**. +3. Select the payment for which a refund is requested. The payment should be in the `captured` state. +4. Scroll to the **Refund** section and click **Issue Refund**. +5. In the **amount** field, enter an amount lesser than the captured amount for issuing a partial refund. By default, the entire amount will be refunded. +5. Review the fees that will be levied for the refund to be processed instantly. +6. Click the **Issue Full Refund** or **Issue Partial Refund** button, depending on the amount to be refunded. + +### Issue Refunds Using API + +- To create a normal refund, use the [Create a Normal Refund API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/create-normal.md). + +### Related Information + +- [About Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds.md) +- [Normal Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/normal.md) +- [Refunds FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/faqs.md) diff --git a/llm-content/pos/refunds/normal.md b/llm-content/pos/refunds/normal.md new file mode 100644 index 00000000..d6c37722 --- /dev/null +++ b/llm-content/pos/refunds/normal.md @@ -0,0 +1,62 @@ +--- +title: Normal Refunds for POS +heading: Normal Refunds +description: Check how to issue Normal Refunds to your customers, the refund process, processing time and refund fees. +--- + +# Normal Refunds + +You can issue Normal refunds to your customers which is processed within 5-7 working days. + +> **INFO** +> +> +> +> **Customer Looking for Refund** +> +> If you are a customer looking for a refund, know more about [customer refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers/customer-refunds.md). +> + +## How Normal Refunds Work + +When you make a Normal refund request to Razorpay, the information is sent to banking partners or other related stakeholders. Each of them has their process for refund requests. After processing the refund request, the refund amount is sent to the customer's bank account or card balance. + +Following is a typical flow for card refunds: + +![Normal Refund Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/normal-refund-flow.jpg.md) + +### Payment Methods + +We support all payment methods for Normal refunds. + +Refunds are sent back to the original payment method used in making the payment. For example, if a credit card was used to make the payment, the refund amount is pushed to the same credit card. + +### Processing Time + +When you send a Normal refund request to Razorpay, the information is sent to our banking partners. Depending on the bank's processing time, it can take 5-7 business days for the refunds to reflect in the customer's bank account or card balance. + +The time taken to process a normal refund depends on the payment mode used while making the payment. + +**Payment Method** | **Refund Time** +--- +`credit` or `debit` cards | 5-10 days +--- +`netbanking` | 2-10 days +--- +`upi` | 2-7 days + +### Refund Fees + +For Normal refunds, Razorpay does not charge any processing fee. However, the transaction fee and GST levied by Razorpay at the time of payment capture will not be reversed to your account (merchant's account). + +## Dashboard and API Actions + +You can perform the following actions: +- [Issue Normal refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/issue.md) +- [View Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/view.md) +- [Handle refund errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/errors.md) + +### Related Information + +- [Add funds to your account to process refunds (low account balance)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/balances.md#add-funds-to-your-current-balance) +- [Refunds FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/faqs.md) diff --git a/llm-content/pos/refunds/view.md b/llm-content/pos/refunds/view.md new file mode 100644 index 00000000..3dfc2aa8 --- /dev/null +++ b/llm-content/pos/refunds/view.md @@ -0,0 +1,30 @@ +--- +title: View Refunds for Razorpay POS +heading: View Refunds +description: View details of Refunds and Settlements using the Razorpay Dashboard and APIs. +--- + +# View Refunds + +After issuing a refund for a payment, you can check its status in the **Refunds** tab. You can also view details of settled refunds. + +## View Details of a Refund + +To view a refund: +1. Log in to the Dashboard. +2. Click **Transactions** on the left navigation and **View All** on the **Refunds** tab. +3. Click a **Refund Id** to view details of the refund. + +## View Settlement Details of a Refund + +To view a detailed break-down of a settlement made to your account: +1. Log in to the Dashboard. +2. Navigate to **Transactions** → **Refunds**. +3. Click the **Refund Id** for which you want to view the settlement details. +4. In the **Refund Details** view, you can see the settlement details. +5. Click the **settlement_id** to view a detailed breakdown. + +### Related Information + +- [Normal Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/normal.md) +- [Refunds FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/refunds/faqs.md) diff --git a/llm-content/pos/route.md b/llm-content/pos/route.md new file mode 100644 index 00000000..87aede8d --- /dev/null +++ b/llm-content/pos/route.md @@ -0,0 +1,77 @@ +--- +title: Razorpay Route +heading: Route +description: Use Razorpay Route to split payments between third parties and manage settlements, refunds and reconciliation by creating Linked Accounts. +--- + +# Route + +Razorpay Route allows you to split payments between third parties, sellers or bank accounts. Using Route, you can easily manage settlements, refunds, reconciliation and make vendor payments. It is helpful for businesses that disburse payments in a `one-to-many` model. + +## Features + +Using Razorpay Route, you can: +- Add and manage Linked Accounts. +- Split payments and transfer funds to multiple Linked Accounts. +- Reverse transferred funds and manage customer refunds with automated reversals. +- Manage Linked Account settlements. +- Move from manual and file-based reconciliation to an entirely API-driven one and more. + +![What We Offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route-route_what_we_offer.jpg.md) + +## Advantages + + +### Instant Transfers + + Razorpay Route facilitates instant transfers, ensuring recipients receive their payments promptly. This benefits businesses and individuals relying on timely payments for their operations or financial needs. + + + +### Multiple Payment Transfers + + Razorpay Route splits payments into various portions, allowing for seamless funds transfer to different parties involved in a transaction. This is particularly useful in marketplaces, where sellers, service providers, and platform owners receive their respective shares. + + + +### Easy Integration + + You can easily integrate Razorpay Route within the existing payment system and platform. Its API-driven approach allows businesses to seamlessly incorporate Razorpay Route into their systems by enhancing payment capabilities without significant disruptions. + + + +### Transparent Reporting and Settlements + + Razorpay provides comprehensive reporting and analytics, allowing us to track transactions, transfers, and settlements. + + +## How Route Works + +Given below is the funds flow in Route: + +![Route Flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/route_flow.gif.md) + +1. The customer makes a purchase on your site. +2. You can choose to do any one of the following: + - Initiate transfer of funds to Linked Accounts. + - Defer the transfer from being settled. + - Define a time until which the transfer settlement should be delayed. +3. Razorpay settles funds to the Linked Account and sends a webhook payload to you. + +## Prerequisites + +You should add Linked Accounts using [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md#add-and-manage-linked-accounts). + +## Get Started + +To get started with Route: + +1. Log in to the Dashboard and click **Route** under **PAYMENT PRODUCTS**. +1. After login, you should add linked accounts to start using Route. Refer to the [Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md) page for more information. +1. Once linked accounts are added, you can then start creating transfers to those accounts. Refer to the [Transfer Funds to Linked Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/transfer-funds-to-linked-accounts.md) page for more information. + +Know more about [Route](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route.md) and the [Dashboard actions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/batch-upload.md). + +### Related information + +[Route Use Cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/use-cases.md) diff --git a/llm-content/pos/self-healing-pos.md b/llm-content/pos/self-healing-pos.md new file mode 100644 index 00000000..52e4583d --- /dev/null +++ b/llm-content/pos/self-healing-pos.md @@ -0,0 +1,97 @@ +--- +title: Razorpay Self-Healing POS +heading: Self-Healing POS +description: Experience uninterrupted operations with Razorpay's revolutionary Self-Healing POS technology that automatically detects and resolves common device issues. +--- + +# Self-Healing POS + +Razorpay Self-Healing POS represents a groundbreaking innovation in payment technology - the industry's first smart POS system that can detect, diagnose, and repair itself. This AI-powered technology proactively identifies and resolves up to 60% of common POS issues without requiring merchant intervention, ensuring maximum uptime, faster checkouts, and uninterrupted business operations even during peak hours. + +## Key Features + +### Proactive Issue Detection +- **Continuous Monitoring**: Constantly monitors over 10 early warning signals to identify potential problems. +- **Early Warning System**: Detects issues before they impact business operations. +- **Intelligent Diagnostics**: Uses AI to analyze device performance and predict potential failures. +- **Automated Alerting**: Notifies of potential issues while working to resolve them automatically. + +### Autonomous Problem Resolution +- **Self-Repair Capability**: Automatically implements fixes for common issues. +- **Zero Merchant Intervention**: Resolves problems without requiring merchant action. +- **Background Operation**: All repairs happen silently in the background without disrupting transactions. +- **Success Tracking**: Monitors the effectiveness of repairs and adapts strategies accordingly. + +### Smart Network Management +- **SignalHeal Engine**: Continuously monitors network health to prevent disruptions. +- **Automatic Network Optimization**: Intelligently switches to the strongest available network. +- **Real-Time Protocol Switching**: Changes connection protocols to maintain stability. +- **Connectivity Redundancy**: Maintains backup connection options for uninterrupted service. + +### Performance Optimization +- **SpeedHeal Engine**: Boosts processing speed by up to 65% through memory optimisation. +- **Background Resource Management**: Clears resource drains during peak business hours. +- **App Performance Monitoring**: Identifies and resolves app slowdowns before they affect transactions. +- **Intelligent Cache Management**: Optimizes caching for faster transaction processing. + +### Power Management +- **PowerHeal Engine**: Extends battery life through intelligent power management. +- **Battery Health Monitoring**: Continuously monitors battery performance and health. +- **Adaptive Charging**: Optimizes charging patterns to maximize battery lifespan. +- **Power Conservation**: Automatically adjusts device settings to conserve energy when needed. + +## Self-Diagnostic Features + +For issues that cannot be automatically resolved, the Self-Healing POS provides: + +- **Guided Troubleshooting**: Step-by-step on-screen guidance to resolve persistent problems. +- **Network Diagnostics**: Tools to identify and fix connectivity issues. +- **Battery Testing**: Battery health checks with optimization recommendations. +- **Performance Analysis**: System performance reports with improvement suggestions. + +> **INFO** +> +> +> **Note:** +> While the Self-Healing POS resolves most common issues automatically, maintaining proper charging routines and placing devices in areas with good network coverage will further enhance performance and reliability. +> + +## Technical Specifications + +Feature | Improvement +--- +**AI System** | Integrated AI-powered self-healing technology +--- +**Monitoring Signals** | 10+ early warning indicators continuously tracked +--- +**Healing Engines** | SignalHeal, SpeedHeal, and PowerHeal +--- +**Resolution Rate** | Resolves up to 60% of common POS issues automatically +--- +**Network Optimization** | Reduces network-related disruptions by up to 25% +--- +**Processing Speed** | Improves app performance by up to 65% +--- +**Implementation** | Available across all Razorpay POS devices +--- +**Integration** | Compatible with existing Razorpay POS systems + +## Benefits + +### Uninterrupted Business Operations +- **Reduced Transaction Failures**: Up to 50% fewer failed transactions. +- **Higher Device Uptime**: 99% device uptime, even during peak business hours. +- **Faster App Performance**: 65% faster app performance for smoother operations. +- **Extended Battery Life**: Longer operational hours without recharging. + +### Enhanced Customer Experience +- **Reduced Wait Times**: Faster checkouts without device-related delays. +- **Higher Payment Success Rate**: Fewer declined transactions and payment errors. +- **Consistent Service**: Reliable payment acceptance throughout business hours. +- **Professional Image**: Demonstrates technological sophistication and operational excellence. + +### Operational Efficiency +- **Lower Support Costs**: Fewer support tickets and service calls. +- **Reduced Downtime**: Minimize revenue loss from device failures. +- **Staff Productivity**: Less time spent troubleshooting device issues. +- **Predictable Operations**: More consistent performance during critical business periods. diff --git a/llm-content/pos/settlements.md b/llm-content/pos/settlements.md new file mode 100644 index 00000000..310e63ae --- /dev/null +++ b/llm-content/pos/settlements.md @@ -0,0 +1,86 @@ +--- +title: Settlements on Razorpay POS +heading: About Settlements +description: Check how Razorpay settles money received from your customers to your bank account- Settlement Cycle, Partial Settlements and Settlement States. +--- + +# About Settlements + +Settlement is the process in which the money received from your customers is settled in your bank account. Settlements for all payments are done in INR (Indian Rupees), irrespective of the currency in which the customer made the payment. Once Razorpay receives the amount, it is settled in your bank account after deducting fees. + +#### Prerequisites + +Following are some of the prerequisites for settlements of payments from customers to your bank account: +- Your account must be KYC approved. +- Your account must be fully activated for payments to be settled to your bank account. Know more about [KYC Verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#2-submit-kyc-details). + +## Settlement Cycle + +We automatically settle captured payments to the bank account you submitted to us during your [KYC verification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#2-submit-kyc-details) following our settlement cycle. The settlement cycle is subject to bank approval and can vary based on your business vertical, risk factors and so on. + +![Checkout screen with details of Settlement Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settlement_cycle.jpg.md) + +> **INFO** +> +> +> +> **Handy Tips** +> +> Working days do not include the bank holidays. +> + +## Domestic Settlements + +The standard settlement cycle for domestic payments is `T+1` working days (where `T` is the date of transaction capture). + + +### Example + + You captured 20 payments on February 02, 2019, at 9:00 a.m., and your settlement schedule is `T+1` days. The payments you captured on February 02, 2019, were settled in your bank account on February 03, 2019, at 9:00 a.m. If the settlement day is a bank holiday, the settlement is made on the next working day after the bank holiday. + + +## Partial Settlements + +Razorpay initiates partial settlements when your settleable amount exceeds your current live balance (when the settlement is scheduled). Razorpay accurately calculates the settleable amount based on the live balance, ensuring that settlements are not skipped. When settling transactions, we will only choose the ones that add up to your current live balance. + +This ensures that your settlements are timely and regular and you can maintain stable cash flow. + + +### Example 1 + + You captured a payment of ₹1000 on July 02, 2023, and your settlement schedule is T+1 days, 5:00 p.m. Hence, the live balance is ₹1000, which will be the settlement amount. + + However, on July 02, 2023, you had to refund your customer ₹100. Due to this, your live balance is ₹900. As the current live balance is lesser than the settlement scheduled, Razorpay will initiate partial settlements and settle your current live balance of ₹900. + + + +### Example 2 + + You captured three payments of P1 - ₹500, P2 - ₹300 and P3 - ₹200 on July 02, 2023, and your settlement schedule is T+1 days, 5:00 p.m. Hence, the live balance is ₹1000, which will be the settlement amount. + + However, on July 02, 2023, you had to refund your customer ₹100. Due to this, your live balance is ₹900. As the current live balance is lesser than the settlement scheduled, Razorpay will initiate partial settlements and settle transactions P1 and P2 on T+2 as it adds up to ₹900. P3 will be scheduled for the next day, shown as an upcoming settlement, and paid in the next slot. + + +## Settlement States + +Following are the various states of a settlement: + +![Settlement Life Cycle flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/dashboard-guide-settlement_life_cycle.jpg.md) + +Some reasons for settlement failure: +- Your bank account is inactive or frozen. +- Incorrect bank account details. +- The settlement was rejected by your bank. + +## Dashboard Actions + +You can perform the following actions from the Razorpay Dashboard: + +- [View settlement details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/settlements/dashboard.md#view-settlements-using-dashboard) +- [Check settlements break-up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/settlements/dashboard.md#settlements-break-up-description) +- [Enable settlements on hold](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/settlements/dashboard.md#enable-settlements-placed-on-hold) +- [View reports related to settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/settlements/dashboard.md#reports) + +### Related Information + +- [Settlement FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/settlements/faqs.md) diff --git a/llm-content/pos/settlements/dashboard.md b/llm-content/pos/settlements/dashboard.md new file mode 100644 index 00000000..7e114798 --- /dev/null +++ b/llm-content/pos/settlements/dashboard.md @@ -0,0 +1,141 @@ +--- +title: Settlements - Dashboard Actions +description: View settlement details, check the settlements break-up, enable settlements on hold and view reports from the Razorpay Dashboard. +--- + +# Settlements - Dashboard Actions + +You can use the Dashboard to perform the following actions: +- [View Settlements](#view-settlements-using-dashboard) +- [Settlements Break-Up Description](#settlements-break-up-description) +- [View Settelement Timeline](#view-settlement-timeline-on-dashboard) +- [Enable Settlements Places on Hold](#enable-settlements-placed-on-hold) +- [View Reports](#reports) + +## View Settlements Using Dashboard + +You can view details of settlements made to you from the Dashboard. + +To view settlement details: +1. Log in to the Dashboard. +2. Navigate to **Settlements**. +3. Click on the **details** of the settlement ID that you wish to refer. + +### Settlements Break-Up Description + +The following screenshot displays the settlement break-up: + +![Settlement break-up description image](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/settlements-2.jpg.md) + +A settlement has the following components: + +`Payment` +: The total payment amount that is being settled before deductions. + +`Adjustment` +: Adjustments to transactions, if any. + +`Tax` +: Tax deducted on the payment. + +`Fee` +: Fees deducted by Razorpay for the transactions. + +`Transfer` +: Transfers made if any, Transfers are payouts made to your [linked accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/route/linked-account.md). + + Linked accounts are accounts created for third-party sellers by you after onboarding them onto the Razorpay platform. + +`Refunds` +: Refunds made if any, are refunds you have issued to your customer. + + +### Example + + In this example, the amount settled to your account = Payment - Adjustment - Tax - Fee - Transfer + Refunds + + + + Transaction Details | Amount(₹) + --- + Payment | 50.00 + --- + Refunds | 10.00 + --- + Tax | 2.88 + --- + Fee | 16.00 + --- + Total amount settled in your account | 20.94 + + + + +### Example: Gross Settelements and Deductions Calculations + + Following is an example of gross settlements and deductions calculations of your settlement: + + ![settlement components detail view](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/settlement-components-view.jpg.md) + + The gross settlements and deductions calculations only apply to merchants on the prepaid model. + + + +--- +Payment | 18012.00 +--- +Adjustment | 6.00 +--- +Tax | 65.56 +--- +Fee | 364.24 +--- +Total amount settled in your account | 17576.20 + +A settlement has the following components: + +`Payment` +: The total payment amount that is being settled before deductions. + +`Adjustment` +: Adjustments to transactions, if any. + +`Tax` +: Tax deducted on the payment. + +`Fee` +: Fees deducted by Razorpay for the transactions. + +## View Settlement Timeline on Dashboard + +You can view the settlement timeline to check when the settlement for a particular payment will be credited. + +To view the settlement timeline: + +1. Log in to the Dashboard. +2. Navigate to **Settlements**. +3. Click on the **details** of the settlement ID for which you want to view the timeline. +4. You will be able to see the settlement timeline for that particular settlement ID. + ![POS settlement details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pos-settlement-details.jpg.md) + +## Enable Settlements Placed On Hold + +Your settlement can be placed on hold if we detect some risk with your payments or with your Razorpay account. You are notified about this on your Dashboard. + +Contact the [support team](https://razorpay.com/support) to enable settlements that are placed on hold. + +![Settlements placed on hold](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/settlements-risk-soh-notice.jpg.md) + +To enable settlements when they are put on hold: +1. Log in to the Dashboard. +2. Navigate to **Home**. +3. Click **Resolve** on the notification as shown above.. + +## Reports + +Detailed insights can be gained using reports and real-time data on the Dashboard. These reports can then be used for accounting and reconciliation purposes. Know more about [ reports.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/dashboard/reports.md) + +### Related Information + +- [About Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/settlements.md) +- [ Settlement FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/settlements/faqs.md) diff --git a/llm-content/pos/settlements/faqs.md b/llm-content/pos/settlements/faqs.md new file mode 100644 index 00000000..e7bdb613 --- /dev/null +++ b/llm-content/pos/settlements/faqs.md @@ -0,0 +1,46 @@ +--- +title: Payments | Settlements - FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Payment Settlements. +--- + +# Frequently Asked Questions (FAQs) + +### 1. What are settlements? + + Settlement is the process in which the money received from your customers is settled to your bank account. Settlements for all payments will be done in INR (Indian Rupees), irrespective of the currency in which the payment was made by the customer. Settlement cycle is subject to bank approval and can vary based on your business vertical, risk factor, and so on. Each settlement generated has a unique settlement id attached to it along with the amount settled. Know more about [Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/pos/settlements.md). + + + +### 2. What is the settlement cycle you offer? + + Our standard settlement cycle is T+1 working days, T being the date of transaction capture. This means that the captured payments are settled within 1 working days from the date of capture. + +> **INFO** +> +> +> +> **Handy Tips** +> +> Working days do not include second and fourth Saturdays, Sundays and bank holidays. +> + + + + +### 3. How do I check settlements in my bank account? + + Each settlement has a Unique Transaction Reference (UTR) number, which is provided by our banking partners. You can see this number in the settlement section when you click on a particular settlement id. You can also download **Settlement Reports** from the **Reports** section to view UTR. This is a unique reference number available across banks, which can be used to track a specific settlement in your bank account. + ![UTR](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/settlements-utr.jpg.md) + + + +### 4. The status of my settlement shows as failed on the Dashboard. What do I do? + + Check if you have received an email from our Support Team. Please revert to the mail with the necessary details. If you have not received any email from Razorpay, please contact our [Support Team](https://razorpay.com/support/#request) for assistance. + + + +### 5. How to reconcile settlements along with the transactions made? + + You can [download a daily or a monthly report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/reports.md#generate-reports) for the **Settlement Reconciliation Report** from the **Reports** section on the Razorpay Dashboard. The report contains transactions and the corresponding settlement ids. diff --git a/llm-content/pos/soundbox.md b/llm-content/pos/soundbox.md new file mode 100644 index 00000000..19d4e9fe --- /dev/null +++ b/llm-content/pos/soundbox.md @@ -0,0 +1,97 @@ +--- +title: Razorpay Soundbox +heading: About Soundbox +description: Accept UPI payments with instant audio confirmation using Razorpay's Soundbox - a compact, powerful solution for merchants of all sizes. +--- + +# About Soundbox + +Razorpay Soundbox is a compact yet powerful device that provides instant audio confirmation for UPI payments. Designed specifically for Indian merchants, this innovative solution enhances transaction management and customer trust by ensuring that every payment is acknowledged clearly and promptly. The Soundbox represents a significant advancement in retail payment technology, offering a perfect blend of cost-effectiveness, efficiency, and reliability. + +## Key Features + +### Instant Audio Confirmation +- **Real-Time Alerts**: Provides immediate voice notifications for every successful payment. +- **Multilingual Support**: Offers payment confirmations in multiple Indian languages. +- **Clear Sound Quality**: High-quality speaker ensures audible notifications even in noisy environments. + +### Visual Indicators +- **LED Confirmation**: Integrated LED strip provides immediate visual feedback of transaction status. +- **Status Indicators**: Shows device status, network connectivity, and battery level. +- **Payment Amount Display**: Clearly displays the payment amount received. + +### Robust Connectivity +- **Multiple Network Options**: Connects via cellular network for reliable operation. +- **Stable Connection**: Maintains consistent connectivity for uninterrupted service. +- **Network Status Indicator**: Visual indication of network strength and status. + +### Power Management +- **Long Battery Life**: Powerful battery that lasts throughout business hours. +- **Low Power Consumption**: Energy-efficient design for extended usage. +- **Charge Indicators**: Visual alerts for battery status and charging progress. +- **Micro-USB Charging**: Convenient charging using standard micro-USB cables. + +## Technical Specifications + +Feature | Improvement +--- +**Power Source** | Built-in rechargeable battery +--- +**Charging** | Micro-USB port +--- +**Connectivity** | Cellular network connectivity +--- +**Audio** | High-quality speaker for clear sound notifications +--- +**Visual Elements** | LED indicators for status and confirmation +--- +**Battery Life** | Extended usage on a single charge +--- +**Dimensions** | Compact form factor for counter placement +--- +**Weight** | Lightweight for easy portability + +## Benefits + +### Enhanced Payment Verification +- **Error-Free Confirmation**: Eliminates the need to constantly check phone for payment alerts. +- **Instant Notification**: Immediate confirmation of successful transactions. +- **Reduced Disputes**: Clear audio confirmation reduces customer-merchant disputes about payment status. + +### Operational Efficiency +- **Hands-Free Operation**: No need to check mobile phone for payment confirmations. +- **Continuous Operation**: Long battery life ensures all-day functionality. +- **Simple Setup**: Easy to set up and start using immediately. + +### Customer Experience +- **Trust Building**: Customers receive clear confirmation that their payment was successful. +- **Faster Checkout**: Speeds up the verification process, reducing queue times. +- **Professional Image**: Projects a modern, technology-enabled business image. + +## Industry Applications + +The Razorpay Soundbox is ideal for various merchant categories: + +- **Small Retail Shops**: Perfect for neighbourhood stores and small retailers. +- **Street Vendors**: Enables digital payments for mobile merchants. +- **Quick Service Food Outlets**: Speeds up payment verification during busy periods. +- **Kirana Stores**: Helps traditional retailers embrace digital payments. +- **Service Providers**: Suitable for professionals offering services at customer locations. + +## Getting Started + +Setting up your Soundbox is simple: + +1. Unbox the device and charge it using the provided micro-USB cable. +2. Power on the device using the power button. +3. Wait for network connection to establish (indicated by LED status). +4. Place the device in a prominent location near your payment counter. +5. Start receiving payment confirmations instantly. + +> **INFO** +> +> +> **Note:** +> +> For optimal performance, place the Soundbox in a location where both you and your customers can clearly hear the payment confirmations. Regular charging ensures uninterrupted service throughout your business hours. +> diff --git a/llm-content/razorpay-n8n-node.md b/llm-content/razorpay-n8n-node.md new file mode 100644 index 00000000..ae45a08d --- /dev/null +++ b/llm-content/razorpay-n8n-node.md @@ -0,0 +1,132 @@ +--- +title: About Razorpay n8n Community Node +description: Set up and use the Razorpay n8n Community Node to integrate Razorpay payment APIs with your n8n workflows for automated payment processing. +--- + +# About Razorpay n8n Community Node + +- **Razorpay n8n Node Repository**: View source code, report issues, and contribute to the Razorpay n8n Community Node. + + - **Razorpay n8n Node NPM Package**: Official npm package for the Razorpay n8n Community Node. + +The [Razorpay n8n Community Node](https://www.npmjs.com/package/@razorpay/n8n-nodes-razorpay) provides seamless integration between Razorpay payment APIs and [n8n workflow automation platform](https://n8n.io/). This node enables developers, operations teams, and business owners to automate payment operations, process transactions, manage refunds, and build sophisticated payment workflows without writing code. + +## Features +1. **No-Code Automation** + +Build complex payment workflows visually with drag-and-drop interface. + +2. **400+ App Integrations** + +Connect Razorpay with Google Sheets, Slack, WhatsApp, Gmail, Shopify and 400+ other services instantly. + +3. **Test & Live Modes** + +Develop and test workflows safely with test mode API keys before deploying to production. + +4. **Real-Time Processing** + +Process payments, refunds and settlements with minimal latency using efficient API operations. + +5. **Flexible Data Handling** + +Transform, filter and enrich payment data using built-in n8n nodes and custom functions. + +6. **Secure & Compliant** + +Enterprise-grade security with encrypted credential storage and PCI DSS-compliant operations. + +## Available Operations + +The Razorpay n8n Node provides comprehensive access to Razorpay APIs through **10 core operations**: + +Category | Operations | Key Use Cases +--- +**Orders** | Fetch All | Order management, payment tracking +--- +**Payment Links** | Create, Fetch | Instant payment collection, WhatsApp automation +--- +**Payments** | Fetch, Fetch All | Payment verification, reconciliation +--- +**Refunds** | Fetch All | Fetch refund information +--- +**Settlements** | Fetch, Fetch All | Daily settlement sync, accounting +--- +**Invoices** | Fetch Invoices for for Subscription | Subscription billing automation +--- +**Disputes** | Fetch All | Dispute monitoring and alerts + +View [Complete Operations Reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/operations-reference.md). + +> **INFO** +> +> +> **Extended Operations Available** +> +> Access **28 additional operations** via [Razorpay MCP Server](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server.md) integration. +> + +## Use Cases + +Explore real-world automation scenarios: + +- **WhatsApp Booking Automation**: Chat-to-order-to-payment workflow. +- **Daily Settlement Reconciliation**: Automated sync to Google Sheets. +- **High-Value Payment Alerts**: Real-time Slack notifications. +- **Refund Processing**: Automated refund creation based on rules. +- **Customer Payment Lookup**: Internal tool for support teams. + +View [Use Cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/use-cases.md). + +## Prerequisites + +Ensure you have the following before starting: + + +### n8n Platform + + - **n8n Version**: v1.104.2 or higher (minimum required). + - **Deployment**: n8n Cloud or self-hosted instance. + - **Admin Access**: Permission to install community nodes. + + + +### For Self-Hosted n8n + + - **Node.js**: Version 14.x or higher. + - **npm**: Version 6.x or higher. + - **Network Access**: HTTPS access to `api.razorpay.com`. + + + +### Razorpay Account + + - **Active Account**: Sign up at [razorpay.com](https://razorpay.com). + - **KYC Completed**: Required for live mode (not needed for test mode). + - **API Keys**: Generate [API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/api-keys.md) from the Razorpay Dashboard. + +> **INFO** +> +> +> **Start with Test Mode** +> +> Use test mode API keys (`rzp_test_*`) for development and testing. No real money transactions, no KYC required. Switch to live mode (`rzp_live_*`) after thorough testing. +> + + + +## Next Steps + +1. **[Install the Node](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/installation.md)**: Add Razorpay node to your n8n instance. +2. **Configure Credentials**: Generate and add your API keys. +3. **[Explore Use Cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/use-cases.md)**: Learn from real-world examples. +4. **Build Your Workflow**: Start with a simple automation. +5. **[Troubleshoot Issues](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/troubleshooting-faqs.md)**: Resolve common problems. + +### Related Documentation + +- [Razorpay API Reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md) +- [Webhook Integration Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) +- [Test Card Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md) +- [MCP Server Documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server.md) +- [n8n Documentation](https://docs.n8n.io/) diff --git a/llm-content/razorpay-n8n-node/installation.md b/llm-content/razorpay-n8n-node/installation.md new file mode 100644 index 00000000..fdcbf5c1 --- /dev/null +++ b/llm-content/razorpay-n8n-node/installation.md @@ -0,0 +1,145 @@ +--- +title: Install Razorpay n8n Community Node +description: Install and configure the Razorpay n8n Community Node. Follow this step-by-step guide to set up API keys and start automating payments. +--- + +# Install Razorpay n8n Community Node + +Follow the steps given below to install the Razorpay n8n Community Node. + +### Prerequisites + +Before installing, ensure you have: + +- **n8n Instance**: Running n8n v1.104.2 or higher +- **Node.js**: Version 14.x or higher (for self-hosted) +- **Razorpay Account**: Active account at [razorpay.com](https://razorpay.com) +- **Admin Access**: Permission to install community nodes + +## Step 1: Generate Razorpay API Keys + +You need to generate Razorpay API keys before using the node. + +### Access API Keys + +1. Log in to [Razorpay Dashboard](https://dashboard.razorpay.com/). +2. Navigate to **Account & Settings** → **API Keys** under **Website and app settings**. +3. Click **Generate Key**. +4. Copy both **Key ID** and **Key Secret**. + +> **WARN** +> +> +> **Watch out!** +> +> Save the Key id and Secret immediately - it will not be shown again. +> + +#### Understand Key Types + + + **For Development & Testing** + - Prefix: `rzp_test_` + - No real money transactions + - Free to use + - Use [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md) + + Always start with test keys for safe development. + + + **For Production** + - Prefix: `rzp_live_` + - Real money transactions + - Requires completed KYC + - Transaction fees apply + + Only use after thorough testing. + + +### Set Up API Keys in n8n + +In n8n, create a new Razorpay API credential: +1. Enter your credentials: + - Key id: Your Razorpay Key id (For example, `rzp_test_1234567890` or `rzp_live_1234567890`) + - Key Secret: Your Razorpay Key Secret. +2. Test the connection to ensure your credentials are working correctly. + +## Step 2: Install the Razorpay n8n Community Node + +Choose your installation method based on your n8n deployment: + + +### Method 1: Install via n8n Community Nodes (Recommended) + + 1. Log in to the **n8n Dashboard**. + 2. Click **Settings** in the left sidebar. + 3. Click **Community Nodes** in the settings menu. + 4. Install the Node. + 1. Click **Install a community node**. + 2. Enter the package name: `@razorpay/n8n-nodes-razorpay`. + 3. Click **Install**. + 5. Restart **n8n**. After restart, the Razorpay node will be available. + + + +### Method 2: Install via npm (Self-hosted) + + For self-hosted n8n installations, run the following commands: + + ```bash + # Navigate to n8n directory + cd ~/.n8n + + # Install the Razorpay community node + npm install @razorpay/n8n-nodes-razorpay + + # Restart n8n service + pm2 restart n8n + # OR + systemctl restart n8n + ``` + + + +### Method 3: Docker Installation + + If you are using n8n with Docker, add the package to your Docker setup: + ```yml: Add Package + # In your Dockerfile or docker-compose.yml + FROM n8nio/n8n:latest + USER root + RUN npm install -g @razorpay/n8n-nodes-razorpay + USER node + ``` + + +You have successfully installed the Razorpay n8n Community Node. + +## Next Steps + +After installation, you can proceed with the following: + +- Create a new workflow or open an existing one. +- Add the **Razorpay** node by searching and dragging it from the node panel. +- Set up your Razorpay API credentials. +- Choose the [operation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/operations-reference.md) you want to perform (Create Order, Fetch Payment and so on.) +- Configure the required parameters for your selected operation. +- Test your workflow to ensure everything works correctly. + +> **INFO** +> +> +> **Handy Tips** +> +> - Start with Test Mode: Always use test credentials when setting up and testing your workflows. +> - Check API Documentation: Refer to [Razorpay API documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api.md) for detailed parameter information. +> - Use Webhooks: Consider setting up [Razorpay webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) for real-time payment updates in your workflows. +> +> + +### Related Documentation + +- [Explore Use Cases & Examples](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/use-cases.md) +- [View Available Operations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/operations-reference.md) +- [Frequently Asked Questions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/troubleshooting-faqs.md) +- [Set up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) diff --git a/llm-content/razorpay-n8n-node/operations-reference.md b/llm-content/razorpay-n8n-node/operations-reference.md new file mode 100644 index 00000000..1a9d26e6 --- /dev/null +++ b/llm-content/razorpay-n8n-node/operations-reference.md @@ -0,0 +1,93 @@ +--- +title: Operations Reference +description: Complete reference for all available operations in the Razorpay n8n Community Node with detailed configuration and examples. +--- + +# Operations Reference + +The Razorpay n8n Community Node provides comprehensive access to Razorpay APIs through multiple operations. Each operation corresponds to specific Razorpay API endpoints and enables you to automate payment workflows. + +## Operations Overview + +The n8n node provides **12 core operations** organised across the following categories: + +> **INFO** +> +> +> **Extended Operations via MCP Server** +> +> The node can access an additional **28 operations** through the [Razorpay MCP Server](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/mcp-server.md) integration, bringing the total to 40 operations. +> + +## Complete Operations List + +### Orders + +Operation | Description | Required Parameters | Optional Parameters | API Documentation +--- +Fetch All Orders | Retrieve a list of all orders with optional filtering | - | from, to, count, skip, authorized, receipt | [API Docs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-all.md) + +### Payment Links + +Operation | Description | Required Parameters | Optional Parameters | API Documentation +--- +Create Payment Link | Generate a Payment Link for customers | amount (paise), currency | description, customer details, notify, callback_url, callback_method | [API Docs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/create-standard.md) +--- +Fetch Payment Link | Retrieve details of a specific Payment Link | payment_link_id | - | [API Docs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/payment-links/fetch-id-standard.md) + +### Payments + +Operation | Description | Required Parameters | Optional Parameters | API Documentation +--- +Fetch Payment by id | Get detailed information about a specific payment | payment_id | expand[] | [API Docs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md) +--- +Fetch All Payments | Retrieve all payments with filtering options | - | from, to, count, skip, expand[] | [API Docs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-all-payments.md) + +### Refunds + +Operation | Description | Required Parameters | Optional Parameters | API Documentation +--- +Fetch All Refunds | Retrieve all refunds with filtering | - | from, to, count, skip, payment_id | [API Docs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-all.md) + +### Settlements + +Operation | Description | Required Parameters | Optional Parameters | API Documentation +--- +Fetch Settlement by id | Get details of a specific settlement | settlement_id | expand[] | [API Docs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/settlements/fetch-with-id.md) +--- +Fetch All Settlements | Retrieve all settlements with filtering | - | from, to, count, skip | [API Docs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/settlements/fetch-all.md) + +### Invoices + +Operation | Description | Required Parameters | Optional Parameters | API Documentation +--- +Fetch Invoices for Subscription | Get all invoices for a specific subscription | subscription_id | - | [API Docs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/subscriptions/fetch-invoices.md) + +### Disputes + +Operation | Description | Required Parameters | Optional Parameters | API Documentation +--- +Fetch All Disputes | Retrieve all customer disputes | - | from, to, count, skip, payment_id | [API Docs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/disputes/fetch-all.md) + +## Best Practices + +1. Use Pagination for Large Datasets: Always paginate when fetching large numbers of records to prevent timeout errors and reduce API load. + +2. Filter by Date Range: Limit results using `from` and `to` parameters to improve response time and reduce data transfer. + +3. Expand Selectively: Only expand necessary nested objects to reduce response size and improve performance. + +4. Handle Errors Gracefully: Implement proper error handling to ensure workflow reliability and easier debugging. + +5. Test Mode First: Always test workflows with test credentials to prevent accidental real transactions and charges. + +6. Use Expressions for Dynamic Values: Reference data from previous nodes using expressions to create flexible, reusable workflows. + +7. Implement Rate Limit Handling: Add delays between batch operations to prevent rate limit errors (429 responses). + +8. Log Important Data: Use **Set** or **Function** nodes to log key information. + +## Next Steps + +- [View Use Cases & Examples](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/use-cases.md) +- [Troubleshooting & FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/troubleshooting-faqs.md) diff --git a/llm-content/razorpay-n8n-node/troubleshooting-faqs.md b/llm-content/razorpay-n8n-node/troubleshooting-faqs.md new file mode 100644 index 00000000..7c365673 --- /dev/null +++ b/llm-content/razorpay-n8n-node/troubleshooting-faqs.md @@ -0,0 +1,277 @@ +--- +title: FAQs & Troubleshooting +description: Common questions and solutions for the Razorpay n8n Community Node. +--- + +# FAQs & Troubleshooting + +## General FAQs + + +### 1. What is the Razorpay n8n Community Node? + + The Razorpay n8n Community Node connects Razorpay APIs with the n8n workflow automation platform. It enables you to automate payment operations, build no-code workflows and connect payments with 400+ other services. The node is officially maintained by Razorpay and is open-source. + + View [Getting Started Guide](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node.md). + + + + +### 2. Do I need a Razorpay account to use this node? + + Yes. You need an active Razorpay account and API keys. There are two types of API keys: + - **Test Mode** (`rzp_test_*`): Free, no KYC needed, for development. + - **Live Mode** (`rzp_live_*`): Requires completed KYC, for production. + + Generate keys from [Razorpay Dashboard](https://dashboard.razorpay.com/) → **Account & Settings** → **API Keys**. + + Start with test mode for safe development. + + + + +### 3. What operations are available in the node? + + View [Complete Operations Reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/operations-reference.md) to know about the available operations. + + + + +### 4. Can I use webhooks for real-time payment events? + + Currently, the node uses a polling approach to monitor payment events. You can set up automated workflows using the **Cron** node to check for new payments at regular intervals: + **Polling Workflow**: + + Cron (every 5 min) → Fetch Payments (last 5 min) → IF (new payments exist) → Process payments + **Implementation Steps**: + + 1. Add **Cron** node (set interval: every 2-5 minutes). + 2. Add **Razorpay** node (Fetch All Payments operation). + 3. Use date filters: `from` = last check time, `to` = now. + 4. Add **IF** node to check if results exist. + 5. Process new payments in subsequent nodes. + + This approach provides near real-time monitoring (2-5 minute delay) and works reliably for most use cases. + + + + +### 5. How do I convert rupees to paise for the amount field? + + **Critical**: Razorpay requires amounts in **paise** (smallest currency unit). + + **Conversion**: + + - ₹1 = 100 paise + - ₹100 = 10,000 paise + - ₹1,500 = 150,000 paise + + **Example**: To create a ₹500 Payment Link, use `amount: 50000`. + + + + +### 6. How do I handle pagination for large datasets? + + Use `count` (max 100) and `skip` parameters: + + **Example - Fetch 300 Payments**: + + - Page 1: `count: 100, skip: 0` + - Page 2: `count: 100, skip: 100` + - Page 3: `count: 100, skip: 200` + + **Implementation**: + + 1. Use **Loop Over Items** or **Split in Batches** node. + 2. Increment `skip` by 100 each iteration. + 3. Add **Wait** node (1-2 sec) between pages to avoid rate limits. + + + + +### 7. How do I test my workflows safely? + + **Testing Steps**: + + + 1. **Use Test Mode**: + - Create a credential with test keys (`rzp_test_*`). + - Use [test cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/test-card-details.md). + - No real money involved. + 2. **Test in n8n**: + - Click **Execute Workflow**. + - Verify each node output. + - Check for errors. + 3. **Go Live**: + - Create a separate production workflow. + - Use live keys (`rzp_live_*`). + - Test with small amounts first. + - Monitor execution logs. + + Always test thoroughly in test mode before production. + + +## Troubleshooting + + +### 1. I installed the node, but it is not showing up. What should I do? + + **Troubleshooting Steps**: + + + 1. Verify Installation. + ```bash + npm list @razorpay/n8n-nodes-razorpay + ``` + 2. Restart n8n: + ```bash + pm2 restart n8n # or systemctl restart n8n + ``` + 3. Enable Community Nodes: + - Settings → Community Nodes → Toggle ON + 4. Clear Browser Cache. + 5. Check Version: Minimum n8n v1.104.2 + ```bash + n8n --version + ``` + + + + +### 2. I cannot connect - it says my API key is invalid. How do I fix this? + + **Common Causes**: + - Incorrect Key id or Secret (typos, spaces). + - Keys regenerated in Dashboard (old keys invalid). + - Wrong environment (test keys with live data or vice versa). + + **Fix**: + + 1. Verify keys in Razorpay Dashboard → **Account & Settings** → **API Keys**. + 2. In n8n, go to **Settings** → **Credentials**. + 3. Edit your Razorpay credentials and update both Key and Secret. + 4. Ensure no leading/trailing spaces. + 5. Test connection. + + **Still failing?** Generate new keys and try again. + + + + +### 3. I get a "Bad Request" error when creating a Payment Link. What is wrong? + + **Common Causes**: + + - Missing required fields (amount, currency for Payment Links). + - Wrong amount format (rupees instead of paise). + - Invalid field values. + + **Fix**: + + 1. Check the error message for the specific field name. + 2. Verify required parameters: + - **Create Payment Link**: amount (paise), currency required. + - Amount must be an integer in paise: ₹100 = 10000. + 3. Check [Operations Reference](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/operations-reference.md) for required fields. + + **Example**: For ₹1,500 Payment Link, use `amount: 150000`, not `1500`. + + + + +### 4. The workflow says it cannot find my payment or order. What should I check? + + **Common Causes**: + - Incorrect id format or value. + - Resource in a different environment (test vs live). + - Resource from a different Razorpay account. + + **Fix**: + 1. Verify id format: + - Payment: `pay_*`. + - Order: `order_*`. + - Refund: `rfnd_*`. + - Payment Link: `plink_*`. + 2. Ensure API keys match resource environment (test/live). + 3. Copy id directly from Dashboard or previous workflow output. + + + + +### 5. My workflow keeps failing with "Too Many Requests". How do I fix this? + + **Common Causes**: + - Too many API calls in a short period. + - Polling interval too short. + - Multiple workflows hitting the same endpoints. + + **Fix**: + + 1. Add **Wait** node (1-2 seconds) between operations. + 2. Use **Split in Batches** for bulk operations. + 3. Increase polling interval (5-10 minutes instead of 1 minute). + 4. Use pagination: Fetch max 100 items per request. + 5. Contact Razorpay support for higher limits if needed. + + + + +### 6. The amounts in my Payment Links are incorrect. What am I doing wrong? + + **Common Mistakes**: + + - Entering amount in rupees instead of paise. + - Not rounding decimal values. + - Currency mismatch. + + **Examples**: + - ₹1 → 100 paise + - ₹100 → 10,000 paise + - ₹1,250.75 → 125,075 paise (rounded to 125,075) + + + + +### 7. My workflow times out when fetching payments. How can I fix this? + + **Common Causes**: + + - Fetching too much data without pagination. + - Network connectivity issues. + - API is experiencing high load. + + **Fix**: + + 1. **Use Pagination**: + - Fetch max 100 items per request. + - Use `count` and `skip` parameters. + 2. **Increase Timeout**: Adjust workflow timeout in n8n settings. + 3. **Check Network**: Verify connectivity to `api.razorpay.com`. + 4. **Add Retry Logic**: Use **Error Trigger** node to catch and retry failures. + + + + +### 8. The workflow runs successfully but returns no data. Why is this happening? + + **Common Causes**: + + - Filters too restrictive (no matching records). + - Wrong environment (test keys with live data or vice versa). + - Date range excludes all records. + - Missing expand parameter for nested data. + + **Fix**: + + 1. **Widen Filters**: Check `from` and `to` date ranges. + 2. **Verify Environment**: Test keys only see test data, live keys only see live data. + 3. **Use Expand**: Add `expand[]` parameter for nested objects (for example, `expand[]=card`). + 4. **Test in Dashboard**: Verify data exists in the Razorpay Dashboard with the same filters. + + +### Related Documentation + +- [Install the Node](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/installation.md) +- [Explore Use Cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/use-cases.md) +- [View Operations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/operations-reference.md) diff --git a/llm-content/razorpay-n8n-node/use-cases.md b/llm-content/razorpay-n8n-node/use-cases.md new file mode 100644 index 00000000..5090486a --- /dev/null +++ b/llm-content/razorpay-n8n-node/use-cases.md @@ -0,0 +1,249 @@ +--- +title: Razorpay n8n Node Use Cases & Workflow Examples +description: Explore payment automation use cases with Razorpay n8n Node. Includes WhatsApp booking, settlement reconciliation, alerts and workflow examples. +--- + +# Razorpay n8n Node Use Cases & Workflow Examples + +Discover how businesses use the Razorpay n8n Community Node to automate payment operations across different scenarios. + +## Payment Collection & Automation + + +### Multi-Channel Conversational Commerce + + **Example**: Acme Salon automates booking and payment via WhatsApp and Instagram. + + **What It Does**: Enable customers to book services and make payments through conversational interfaces on multiple platforms. + + **Workflow**: + + 1. Customer: "Hi" → Bot replies with service menu + prices + location + hours. + 2. Customer: "I want to book bridal makeup" → Bot confirms service (₹15,000) and asks date/time. + 3. Customer: "22nd November 6:00 p.m." → Bot checks calendar availability. + 4. Bot confirms slot, shows summary, asks for confirmation. + 5. Customer: "Yes proceed with payment link" → Razorpay creates booking fee Payment Link. + 6. Customer pays via UPI. + 7. Bot confirms: "Payment received, appointment secured". + + **Technologies**: n8n + WhatsApp/Instagram + AI/NLP + Razorpay (Create Payment Link) + Calendar + + **Business Impact**: 10+ hours weekly saved on manual booking and payment collection. Works across WhatsApp, Instagram and other messaging platforms. + + **Industry Applications**: + + - **Beauty & Wellness**: Salon appointments, spa bookings, fitness class reservations. + - **Healthcare**: Doctor appointments, diagnostic test bookings, health checkup scheduling. + - **Education**: Tutor bookings, class enrollments, workshop registrations. + - **Home Services**: Plumber, electrician, cleaning service bookings. + + + +### Automated Payment Link Generation + + **Example**: Acme Pizzeria automates payment collection for online orders. + + **What It Does**: Automatically create and send Payment Links based on customer actions or internal triggers. + + **Workflow**: + + 1. Customer sends WhatsApp message (for example, "order pizza"). + 2. Bot creates Payment Link with order amount. + 3. Payment Link sent back to customer via WhatsApp. + 4. Customer completes payment. + 5. Order forwarded to kitchen. + + **Technologies**: n8n + WhatsApp + Razorpay (Create Payment Link) + + **Business Impact**: Eliminates 5-10 minutes per transaction spent manually creating and sending Payment Links. + + **Industry Applications**: + + - **Restaurants & Food Services**: Order placement via chat, table reservations, catering inquiries. + - **Retail & E-commerce**: Product inquiries, custom orders, quote requests. + - **Professional Services**: Consultation bookings, project quotations, service requests. + - **Education**: Course enrollment, exam registration, workshop bookings. + + + + +### Order Fulfillment Automation + + **Example**: Acme Store automates their order processing workflow. + + **What It Does**: Automatically trigger fulfillment processes only after payment confirmation. + + **Workflow**: + + 1. Polling workflow checks for new payments every 5 minutes. + 2. When payment confirmed, order details added to Google Sheets. + 3. Operations team receives Slack notification. + 4. Inventory updated, shipping label generated. + + **Technologies**: n8n + Cron + Razorpay (Fetch Payments) + Google Sheets + Slack + + **Business Impact**: Eliminates 1-2 hours daily of manual order processing and data entry. + + **Industry Applications**: + + - **E-commerce**: Product orders, subscription boxes, merchandise sales. + - **Digital Products**: Software licenses, online courses, ebooks, templates. + - **Food Services**: Meal prep subscriptions, catering orders, bakery advance orders. + - **Event Management**: Ticket sales, registrations, merchandise. + + +> **INFO** +> +> +> **Handy Tips** +> +> Since webhook triggers are not available, use polling approach with Cron node to check for new payments every 2-5 minutes. +> + + + +## Financial Operations & Reconciliation + + +### Daily Settlement Sync + + **Example**: Acme Corp's finance team automates their daily reconciliation. + + **What It Does**: Automatically fetch and sync settlement data to accounting systems. + + **Workflow**: + + 1. Daily cron job runs at 9 AM. + 2. Razorpay node fetches previous day's settlements. + 3. Data transformed and appended to Google Sheets. + 4. Slack notification sent with summary (count, total amount, fees). + + **Technologies**: n8n + Cron + Razorpay (Fetch Settlements) + Google Sheets + Slack + + **Business Impact**: Reduces daily reconciliation from 2-4 hours to a few minutes. + + **Industry Applications**: + + - **E-commerce & Marketplaces**: Daily sales reconciliation, vendor settlement tracking. + - **SaaS Companies**: Subscription revenue reconciliation, MRR tracking. + - **Retail Chains**: Multi-location settlement consolidation, franchise accounting. + - **Service Businesses**: Monthly billing reconciliation, client payment tracking. + + + + +### Conversational Analytics + + **Example**: Acme Corp builds a Telegram bot for their operations team. + + **What It Does**: Enable operations teams to query payment data using natural language without accessing the Dashboard. + + **Workflow**: + + 1. Team member asks: "What are the number of orders last 6 months". + 2. Razorpay node fetches all orders filtered by date. + 3. Bot replies: "There are 45 orders within the last 6 months". + 4. Team member asks: "What is the average value of orders last 6 months". + 5. Razorpay node calculates from order data. + 6. Bot replies: "The average value is INR 3,780". + + **Technologies**: n8n + Telegram + AI/NLP + Razorpay (Fetch Orders, Fetch Payments, Fetch Refunds) + + **Business Impact**: Operations teams access payment insights instantly. Saves 30+ minutes daily on dashboard queries. + + **Industry Applications**: + + - **E-commerce**: Sales trends, top products, refund analysis. + - **Subscription Services**: MRR tracking, churn analysis, revenue forecasts. + - **Multi-Location Businesses**: Location-wise performance, comparative analysis. + - **Agencies**: Client billing summaries, project revenue tracking. + + + + +### Real-Time Exception Alerts + + **Example**: Acme Corp monitors high-value transactions and payment failures. + + **What It Does**: Monitor for high-value transactions, failed payments, or other exceptions requiring immediate attention. + + **Workflow**: + + 1. Cron job runs every 5 minutes. + 2. Razorpay node fetches recent payments or refunds. + 3. IF node checks conditions (amount > ₹50,000 or status = failed). + 4. Slack alert sent to finance team for priority handling. + + **Technologies**: n8n + Cron + Razorpay (Fetch Payments/Refunds) + Slack + + **Business Impact**: Critical transactions never missed, faster resolution of payment issues. + + **Industry Applications**: + + - **High-Ticket Services**: Luxury goods, premium memberships, enterprise contracts. + - **Financial Services**: Large transactions requiring approval, compliance monitoring. + - **B2B Businesses**: Bulk orders, enterprise deals, high-value contracts. + - **Healthcare**: Expensive procedures, surgery payments, insurance claims. + + +## Internal Tools & Data Access + + +### Support Team Payment Lookup + + **Example**: Acme Corp builds an internal tool for their support team. + + **What It Does**: Give support teams secure access to payment data without full Dashboard access. + + **Workflow**: + + 1. Support agent enters payment id in internal tool. + 2. Internal app calls n8n webhook with payment id. + 3. Razorpay node fetches payment details. + 4. Payment status and details returned to internal app. + 5. Support agent views information without Dashboard login. + + **Technologies**: n8n + Webhook + Razorpay (Fetch Payment by id) + + **Business Impact**: Saves 30-60 minutes daily of dashboard lookups. Provides controlled, secure access to specific payment data. + + **Industry Applications**: + + - **E-commerce**: Order status inquiries, refund requests, payment verification. + - **SaaS Companies**: Subscription payment checks, billing inquiries, account verification. + - **Service Businesses**: Booking confirmations, payment receipt requests, billing disputes. + - **Marketplaces**: Vendor payment queries, transaction verification, dispute resolution. + + + + +### Custom Reporting & Analytics + + **Example**: Acme Corp's operations team builds custom payment reports. + + **What It Does**: Build custom reports and dashboards without engineering tickets. + + **Workflow**: + + 1. Scheduled workflow fetches payments, refunds, settlements. + 2. Data aggregated and analysed. + 3. Results pushed to BI tools, spreadsheets or internal dashboards. + 4. Operations teams get custom views without waiting for engineering. + + **Technologies**: n8n + Cron + Razorpay (Multiple operations) + Data storage/visualisation tools + + **Business Impact**: Self-service analytics, no 2-week engineering wait times. + + **Industry Applications**: + + - **Multi-Brand Businesses**: Brand-wise revenue comparison, performance benchmarking. + - **Franchises**: Location-wise revenue reports, franchisee settlements. + - **Agencies**: Client billing reports, project profitability analysis. + - **SaaS Companies**: Plan-wise revenue, customer cohort analysis, churn metrics. + + +### Related Documentation + +- [Get Started with Installation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/installation.md) +- [Explore Available Operations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/operations-reference.md) +- [Troubleshooting & FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/razorpay-n8n-node/troubleshooting-faqs.md) diff --git a/llm-content/security.md b/llm-content/security.md new file mode 100644 index 00000000..ecfa1d8c --- /dev/null +++ b/llm-content/security.md @@ -0,0 +1,71 @@ +--- +title: About Razorpay Security +description: Know about Razorpay's compliance certifications, firewalls, and authentication methods. +--- + +# About Razorpay Security + +As a financial service provider, we take utmost care of your data. We are continuously working to keep our environment safe and secure for everyone to use. + +## Compliance + +We follow the most stringent data security practices in the payment industry. As a payment service provider dealing with card data, we have the following certifications: + +Certifications | Seal +--- +PCI-DSS Level 1 | View Certificate +--- +ISO 27001:2022 IEC | ![ISO Seal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/iso-seal.jpg.md) +--- +System and Organization Controls (SOC) 2 Type 2 | ![SOC Seal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/soc-seal.jpg.md) + +We can provide you with copies of our certifications. Please reach out to us via your Key Account Manager. + +### TLS Encryption + +At Razorpay, we employ the best encryption practices on our website and possess the highest assurance SSL certificate, the EV SSL (Extended Validity SSL) certificate. + +- All Razorpay services are served over HTTPS using TLS and configured with industry-standard cyphers. + +- You can download a copy of our [TLS certificate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#ssl-certificates). + +- We follow industry-standard AES-128-bit encryption for all user data. + +- Sensitive data, such as PII (Personal Identifiable Information) utilises field-level encryption. + +## Authentication + +Requests to Razorpay APIs are authenticated using Basic Authentication. +Know more about [API authentication](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md). + +Please ensure the security of your Dashboard credentials and API keys. + +## Fraud and Risk + +We are constantly building new processes to minimise the risk of online payment fraud. We actively monitor payment patterns and behaviour. +- Our robust fraud detection process identifies and flags fraudulent chargebacks for review. +- We check and flag hotlisted cards for every payment. (Hotlisting means that the card has been blocked temporarily or permanently for use.) +- We also use geographical and pattern-based transaction monitoring to identify fraudulent transactions. + +Know more about [fraud protection for customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/customers.md#fraud-and-risk). + +## Firewall + +If you want to limit or authenticate ingress/egress to Razorpay, we provide a list of IP addresses for APIs and Webhooks. + +- Razorpay API requests are resolved to these [IP addresses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#api-ips). +- Razorpay webhooks use these [IP addresses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#webhook-ips). + +## Vulnerability Disclosure Policy + +Razorpay looks forward to working with the security community to find vulnerabilities and protect our businesses and customers. We are dedicated to responsibly resolving any security concerns. + +If you have discovered any security vulnerabilities associated with our services, we appreciate your help in disclosing them to us responsibly. We encourage you to report any bugs on our [HackerOne page](https://hackerone.com/razorpay). Please provide a detailed description of the vulnerability found and the steps to replicate it. + +For more details on our bug bounty programme and to submit reports, visit our [HackerOne page](https://hackerone.com/razorpay). + +### Related Information + +- [Business Security Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/checklist.md) +- [Shared Responsibility Model](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/shared-responsibility-model.md) +- [Security For Customers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/customers.md) diff --git a/llm-content/security/checklist.md b/llm-content/security/checklist.md new file mode 100644 index 00000000..1efc2d42 --- /dev/null +++ b/llm-content/security/checklist.md @@ -0,0 +1,77 @@ +--- +title: Business Security Checklist +description: List of security measures and best practices to ensure secure transactions using Razorpay. +--- + +# Business Security Checklist + +Information security is critical for businesses handling financial transactions online. Being a technology-first online finance company, we ensure that every transaction made using Razorpay products is secure. + +The security of your business's online transactions and data is a shared responsibility between you and Razorpay. As a Razorpay user, ensure you use the security measures below to secure your online transactions. + +## General + +Following are the general security best practices: + +- Implement [Two-Factor Authentication (2FA)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md#2-step-verification-team-level) across your team for additional security. +- Use TLS and HTTPS, as they significantly decrease the risk of a man-in-the-middle attack on you or your customers. +- Use a password manager and set strong passwords. +- Maintain a checklist for timely onboarding and off-boarding of users. +- Do not share user accounts among employees. +- Back up your data regularly, and test the restoration periodically. + +## APIs + +It is essential to store your API keys safely. For the utmost security, follow the best practices listed below when integrating with Razorpay APIs. + +### Applications + +While integrating Razorpay APIs with your application, ensure that: + +- The API key secret is not included in version control (GitHub, Gitlab). +- You only provide access to the API secret to employees on a need-to-know basis. +- You store all secrets, such as the API secret, customer ID, and card tokens in a secure vault. +- All websites and APIs are accessed only using HTTPS, and they follow basic security best practices. + +### Mobile Application + +To secure your mobile application when integrating with Razorpay APIs, ensure that: + +- The [Razorpay API secret](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) is not included in the final Android or iOS build. +- The final build is scanned for security defects using a mobile application security scanner, such as [MobSF](https://github.com/MobSF/Mobile-Security-Framework-MobSF). + +### Payments API + +While integrating with our [Payments API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md), ensure that you: +- Use the [Capture a Payment API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments.md#capture-a-payment) to assert the payment status. +- Fetch the amounts of captured payments only from the backend or a trusted source. + +### Orders API + +While integrating with our [Orders API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders.md), ensure that: + +- [Payments are auto-captured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/capture-settings.md#auto-capture-all-payments) from the Dashboard. +- Signatures are validated in the callback request when using the Orders API to confirm payment status. +- Order ids are retrieved only from a trusted source, such as your database for the HMAC generation. + +## Webhooks + +To use our webhooks securely, ensure that: + +- All webhook requests are validated using Hash-based Message Authentication Code (HMAC). + +- [Razorpay IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#webhook-ips) are added to all the whitelisted webhook requests. + +## Accounts and Dashboard + +Following are the best practices for Dashboard usage: + +- Grant access to the Dashboard only for necessary users. +- Define [user roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md#standard-user-roles) for team members based on their usage of the Dashboard. +- Implement [Two-Factor Authentication (2FA)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/account-settings/manage-team.md#2-step-verification-team-level) on all your Razorpay accounts. +- Never share Razorpay Two-Factor Authentication OTPs among employees. + +### Related Information + +- [ Razorpay Security](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security.md) +- [Shared Responsibility Model](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/shared-responsibility-model.md) diff --git a/llm-content/security/customers.md b/llm-content/security/customers.md new file mode 100644 index 00000000..3efdb044 --- /dev/null +++ b/llm-content/security/customers.md @@ -0,0 +1,40 @@ +--- +title: Security For Customers +description: Know how Razorpay handles customer security, saved cards and frauds. +--- + +# Security For Customers + +Razorpay has strict processes to vet every company using our products to process payments. We adhere to stringent KYC norms and monitor transactions for fraudulent activities. + +## Saved Cards + +Razorpay is [PCI-DSS Level 1](https://seal.panaceainfosec.com/index.php?certid=CERTD5F9E9AA65) certified. We store your cards securely and handle all data in compliance with PCI-DSS guidelines and RBI regulations. This is the most stringent accreditation in the payments industry. + +Razorpay does not save sensitive card details. We only save the tokens. Your payment information will never reach the business’s servers unless they are PCI DSS certified. + +You can manage and delete your card details stored as tokens. Know how to [Manage Saved Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/features/saved-cards.md). + +## Fraud and Risk + +Our robust fraud detection process identifies fraudulent charges and flags them for review. We actively monitor payment and refund patterns and behaviour. We conduct extensive background and KYC verification. + +### Reporting Fraud + +You have the right to dispute suspicious charges on your card or accounts. +To report any frauds or suspicious activities, [contact the Support Team](https://razorpay.com/support/#request) with the transaction details. + +## Best Practices + +Follow the best practices listed below to avoid fraud and other risks.  +- Only enter your details on secure sites. Look for an HTTPS connection and valid security certificates. +- Keep your antivirus software and browsers up to date. +- Do not enter your card details on suspicious websites to avoid phishing attempts. +- Review the terms and conditions, return, cancellation, and refund policies on the business's website before paying. +- Never share your passwords and OTPs. + +- Keep track of all your bank messages and pay attention to spam warnings on your UPI app. + +### Related Information + +[Razorpay Security](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security.md) diff --git a/llm-content/security/shared-responsibility-model.md b/llm-content/security/shared-responsibility-model.md new file mode 100644 index 00000000..25c58a1c --- /dev/null +++ b/llm-content/security/shared-responsibility-model.md @@ -0,0 +1,70 @@ +--- +title: Shared Responsibility Model +description: Know about the security responsibilities shared between businesses and Razorpay. +--- + +# Shared Responsibility Model + +Razorpay is a shared payment service provider. You bear some responsibility for the security of your payment ecosystem. + +Razorpay is responsible for all the backend systems and payment data we process and share with banks. Our security and compliance programme ensures that we are always compliant against PCI-DSS, ISO 27001 and SOC 2 global compliance standards. + +We also provide you with a facility to [generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/authentication.md#generate-api-keys) and connect to our systems via automated computer programmes. Know how Razorpay does [Secret Management](https://razorpay.com/blog/secret-management-razorpay/). + +## While Using Our Payment Gateway + +You can integrate with the Razorpay Payment Gateway in 2 ways: +- [Standard Checkout](#standard-checkout) +- [Server To Server Checkout](#server-to-server-checkout) (PCI Compliant) + +### Standard Checkout + +It is critical to ensure the security of your **API keys** and **Dashboard credentials**. Ensure that you store these details in safe places and only share them with trusted team members. + +Additionally, ensure that a customer's payment information only reaches your servers if you are [PCI DSS](https://www.pcisecuritystandards.org/about_us/) certified. + +> **INFO** +> +> +> **Sensitive Data** +> +> On the Razorpay Payment Gateway, all the details entered by a user, like their name, address, and credit/debit card information, are used only to process and complete the order. Razorpay never stores sensitive information like CVV numbers, PINs and so on. +> + +### Server To Server Checkout + +> **INFO** +> +> +> +> **Feature Request** +> +> This is an on-demand feature. Please raise a request with our [Support team](https://razorpay.com/support/#request) to get this feature activated on your Razorpay account. +> + +All the security obligations for [Standard Checkout](#standard-checkout) also apply to Server To Server. Additionally, you must: +- Be compliant with [PCI DSS](https://www.pcisecuritystandards.org/about_us/) standards at all times. +- Share your PCI AOC (Attestation of Compliance) before every year's expiration date for continued access to this integration method. + +You would be responsible for any misuse by not handling keys or the Dashboard credentials securely. We have an intuitive [security checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/checklist.md) to review the security posture and help you interact with us securely. + +## While Using RazorpayX + +It is critical to ensure the security of your RazorpayX Dashboard credentials and API keys. + +### Payouts + +Follow the below security measures while making Payouts. + +- Ensure that no two fund accounts have the same `fund_account_id`. +- If you are not PCI-DSS compliant, you should **not** process your contact's card details at your backend. +- Use the public [Fund Account API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards.md) to create a Fund account with type card. The public Fund Account API only needs your ``. DO NOT send your `` when making this API call, as you will expose this on your website. Know more about [Payouts to Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards.md). + +#### Allowlisting IPs + +To protect your API payouts from malicious attacks, it is mandatory to allowlist the IPs you use for all payout-related API requests (such as create a contact, fund account, payout, fund account validation, and so on). Know how to [allowlist your IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md). + +### Related Information + +- [Razorpay Security](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security.md) +- [Security Checklist](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/checklist.md) diff --git a/llm-content/security/whitelists.md b/llm-content/security/whitelists.md new file mode 100644 index 00000000..f82e4bb1 --- /dev/null +++ b/llm-content/security/whitelists.md @@ -0,0 +1,113 @@ +--- +title: Razorpay IPs and Certificates +description: Download Razorpay SSL certificates and whitelist our API and Webhooks IP addresses. +--- + +# Razorpay IPs and Certificates + +You can whitelist Razorpay-issued SSL certificates and IP addresses to communicate with Razorpay APIs and Webhooks. By downloading Razorpay SSL certificates and whitelisting our IPs, you can verify that you are securely communicating with our servers. + +## SSL Certificates + +SSL certificates for `api.razorpay.com` with valid date ranges are listed below. + +Certificate File | Valid From | Expiry +--- +[X10.pem](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x10.pem.md) & [Chain](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x10-chain.pem.md) | Oct 9th, 2025 | Nov 10th, 2026 +--- +[X9.pem](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x9.pem.md) & [Chain](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x9-chain.pem.md) | Nov 11th, 2024 | Dec 12th, 2025 +--- +[X8.pem](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x8.pem.md) & [Chain](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x8-chain.pem.md) | Jan 5th, 2024 | Jan 4th, 2025 +--- +[X7.pem](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x7.pem.md) & [Chain](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x7-chain.pem.md) | Feb 3rd, 2023 | Feb 2nd, 2024 +--- +[X6.pem](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x6.pem.md) & [Chain](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x6-chain.pem.md) | May 19th, 2022 | May 19th, 2023 +--- +[X4.pem](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x4.pem.md) & [Chain](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x4-chain.pem.md) | July 7th, 2021 | June 7th, 2022 +--- +[X3.pem](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x3.pem.md) & [Chain](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x3-chain.pem.md) | March 13th, 2020 | July 28th, 2021 +--- +[X2.pem](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x2.pem.md) & [Chain](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x2-chain.pem.md) | April 10th, 2019 | April 15th, 2020 +--- +[X1.pem](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x1.pem.md) & [Chain](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x1-chain.pem.md) | Feb 7th, 2016 | April 12th, 2019 + +As we roll out our infrastructure changes gradually, we recommend whitelisting our certificate as per **Valid From/Expiry** timelines. You should whitelist all the certificates in that range if they overlap. + +> **WARN** +> +> +> **Watch Out!** +> +> +> We highly discourage pinning our SSL certificate to your applications. Use the certificates provided in the table above **only** if you are mandated by internal policies to whitelist Razorpay's SSL certificates. Instead, use the [latest CA Bundle](https://curl.haxx.se/docs/caextract.html) provided by your OS. +> + +## API IPs + +Requests to Razorpay APIs should be routed to `api.razorpay.com`. This will be resolved to various IPs controlled by our load balancers. However, if the IPs to which the requests should be sent are restricted, all your API requests can be routed to `prod-api-static.razorpay.com`. This will be resolved to any of the following IPs: + +```js: API Ingress IPs +52.66.140.48 +52.66.140.61 +13.235.207.57 +13.232.63.19 +13.234.135.6 +13.234.83.3 +13.235.208.84 +13.235.96.132 +15.206.46.184 +18.99.160.48/29 +``` + +> **INFO** +> +> +> **Handy Tips** +> +> - `18.99.160.0/29` is a CIDR range. All the IPs in the range `18.99.160.48 - 18.99.160.55` are utilised. +> +> - All our SDKs use proper DNS caching and honour the TTLs that we set. However, if you are not using our SDKs, ensure that DNS TTLs set by Razorpay are honoured and are not cached aggressively. +> + +## Webhook IPs + +Below is the list of IPs from which Webhooks are sent from our servers. + +```js: Egress IPs +52.66.75.174 +52.66.76.63 +52.66.151.218 +35.154.217.40 +35.154.22.73 +35.154.143.15 +13.126.199.247 +13.126.238.192 +13.232.194.134 +18.96.225.0/26 +18.99.161.0/26 +``` + +> **INFO** +> +> +> **Handy Tips** +> +> +> `18.96.225.0/26` and `18.99.161.0/26` are CIDR ranges. All the IPs in the range `18.96.225.0 - 18.96.225.63` and `18.99.161.0 - 18.99.161.63` are utilised for sending the webhooks. +> + +We highly recommend using [Webhook Signature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md#validation) to validate the integrity of the webhooks, even if you have whitelisted our Webhook IPs. + +## UAT Static IPs + +Below is the list of UAT egress IPs. + +```js: UAT Egress IPs +52.66.76.68 +52.66.95.207 +13.127.201.109 +``` + +### Related Information + +[Razorpay Security](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security.md) diff --git a/llm-content/security/whitelists/guidelines-ssl-cert-rotation.md b/llm-content/security/whitelists/guidelines-ssl-cert-rotation.md new file mode 100644 index 00000000..ca68cb8f --- /dev/null +++ b/llm-content/security/whitelists/guidelines-ssl-cert-rotation.md @@ -0,0 +1,92 @@ +--- +title: Guidelines for SSL Certificate Rotation +description: Technical guide for updating Razorpay SSL certificates. Steps for SSL pinning, certificate whitelisting and trust store updates to ensure uninterrupted payment processing. +--- + +# Guidelines for SSL Certificate Rotation + +Razorpay is rotating its SSL certificates as part of regular security maintenance to ensure continued secure communication between your applications and Razorpay's services. SSL certificate rotation is a standard security practice that involves replacing expiring certificates with new ones to maintain uninterrupted encrypted connections. + +Given below are the technical steps required to update SSL certificates for Razorpay integrations. + +## Important Information + +Certificate Details| Valid From | Expiry | Action Required By +--- +[X10.pem](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x10.pem.md) & [Chain](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/certs-x10-chain.pem.md) | October 9, 2025 | November 10, 2026 | November 24, 2025, 10:00 PM IST + +## Prerequisites +Before proceeding, determine if your application uses: + +- SSL certificate pinning +- Certificate whitelisting +- Custom certificate trust stores + +If you have never manually updated Razorpay certificates in your applications or servers, **no action is required** as your systems will automatically update certificates. + +> **INFO** +> +> +> **No Action Needed for Third-Party Platform Users** +> +> If you use a third-party platform (WooCommerce, Magento, CS Cart, OpenCart, Shopify, WHMCS, Arastta, Prestashop, WordPress, Easy Digital Downloads, WIX, BigCommerce or Drupal Commerce), you are not required to take any action. The platform handles SSL management. Read [FAQ #4](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists/guidelines-ssl-cert-rotation.md#4-how-do-i-check-whether-i-am) and [FAQ #5](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists/guidelines-ssl-cert-rotation.md#5-if-i-am-using-a-third-party-platform-am) for more details. +> + +## Update Procedures + +### SSL Certificate Pinning +If your application has pinned the Razorpay certificate, you must pin the [new certificate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#ssl-certificates) in addition to the current one. + +### Certificate Trust Store Updates +If you have a certificate trust store in the server environment that is not configured to auto-update certificates, you must ensure that the certificate trust store contains the [new certificate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#ssl-certificates). + +Refer to this [manual](https://manuals.gfi.com/en/kerio/connect/content/server-configuration/ssl-certificates/adding-trusted-root-certificates-to-the-server-1605.html) to learn how to update trust stores in different environments. + +## Additional Support + +If you encounter any difficulties during the process, our support team is here to help: + +1. Log in to the Dashboard. +2. Navigate to the **Help & Support** section at the bottom right. +3. Raise a ticket under the **Technical Assistance** category to contact our tech support team. + +## FAQs + + +### 1. I have received an email about a certificate change from Razorpay. Am I required to take action? + + You are not required to take action if you have never manually updated our certificate in your applications or servers. Your systems will automatically update the certificate without any intervention. + + + +### 2. How can you ensure my services remain uninterrupted after Razorpay's certificate rotation? + + You can test connectivity using the endpoint below, which has been updated with our latest certificate: `https://api-ssl-test.razorpay.com` + + +> **WARN** +> +> +> **Watch Out!** +> +> This is only a test domain and should not be used in production environments. +> + + + + +### 3. I am a new Razorpay user. Do I need to take any action? + + If you are a new user and have ever updated our certificate on any of your applications or systems manually, you will be required to update it before **November 24, 2025, 10:00 PM IST**, to avoid impact on your payment system. Visit the [certificates page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#ssl-certificates) to download the new certificate. Use the X10.pem & Chain Valid From Oct 9th, 2025, Expiry Nov 10th, 2026. + + + +### 4. How do I check whether I am using a third-party platform such as WooCommerce, Magento, CS Cart, OpenCart, Shopify, WHMCS, Arastta, Prestashop, WordPress, Easy Digital Downloads, WIX, BigCommerce or Drupal Commerce? + + If you are unsure about your integration setup, check if you use a custom admin panel provided by these third-party platforms to add stocks, offers or perform other tasks. If yes, you are using a third-party platform. + + + +### 5. If I am using a third-party platform. Do I need to take action? + + If you use a third-party platform (WooCommerce, Magento, CS Cart, OpenCart, Shopify, WHMCS, Arastta, Prestashop, WordPress, Easy Digital Downloads, WIX, BigCommerce or Drupal Commerce), you are not required to take any action. The platform handles SSL management. diff --git a/llm-content/test-ssr.md b/llm-content/test-ssr.md new file mode 100644 index 00000000..52550115 --- /dev/null +++ b/llm-content/test-ssr.md @@ -0,0 +1,8 @@ +--- +title: Testing SSR +description: Create a RazorpayX account to explore seamless financial management with payouts, payments, disbursals & refunds, automation and more. Do not delete, used for automation and testing. +--- + +# Testing SSR + +Test SSR page diff --git a/llm-content/webhooks.md b/llm-content/webhooks.md new file mode 100644 index 00000000..221ae684 --- /dev/null +++ b/llm-content/webhooks.md @@ -0,0 +1,79 @@ +--- +title: About Webhooks +description: Use webhooks to get notified about events related to the payment flow such as orders, payments, settlements, disputes and workflow steps related to other Razorpay Products. +--- + +# About Webhooks + +Webhooks (Web Callback, HTTP Push API or Reverse API) automatically notify your application when specific events occur. Instead of continuously polling APIs to check for updates, webhooks push notifications directly to your server when events happen. + +## Webhooks vs APIs + +Here is how webhooks compare to traditional API polling: + +Aspect | APIs | Webhooks +--- +**Data retrieval** | Pull-based (you request) | Push-based (we send) +--- +**Timing** | On-demand | Near real-time when events occur +--- +**Resource usage** | Requires polling | Event-driven, efficient + +## How Razorpay Webhooks Work + +When you subscribe to webhook events, Razorpay sends an HTTP POST request with JSON payload to your configured endpoint URL whenever those events are triggered. + +Suppose you have subscribed to the `order.paid` webhook event, you will receive a notification every time a user pays you for an order, in the configured endpoint URL. + +### Use Cases + +There can be multiple uses for webhook events. Two of these are listed below. + + +### Capturing Late Authorised Payments + + Capturing payments for which you did not receive a response on the client-side is perhaps the most important use case for the `payment.authorized` event. + + Sometimes, the communication between the bank and Razorpay or between you and Razorpay may not occur. This could be because of a slow network connection or your customer closing the window while processing the payment. This could lead to a payment being marked as **Failed** on the Dashboard but changed to **Authorized** at a later time. Know more about [late authorisation of payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payments/late-authorisation.md). + + You can use webhooks to get notified about payments that get authorised and analyse this data to decide whether to capture the payment or not. + + + +### Notifications on Failed Payments + + When a payment attempted by your customer fails, we receive the failed payment status from the bank. This payment gets recorded in our system as **Failed**. + + Suppose you have enabled the `payment.failed` webhook, you will receive a notification from us about the failed payment. You can then further analyse this payment and notify your customer about the failure. + + + +### Setup and Configuration + +- You can set up webhooks from your Dashboard and configure separate URLs for **Live** mode and **Test** mode. Know more about setting up [Payment webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) and [Payout webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md). +- A **Test** mode webhook receives events for your test transactions. Know more about [testing webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). +- Webhook URLs must use ports **80** or **443** only. +- Ensure Razorpay webhook IPs are whitelisted on your server. Even if your server accepts all incoming requests, webhooks may still be blocked by cloud security groups or network configurations. Refer to [Razorpay IPs and Certificates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#webhook-ips) for the complete list of webhook IP addresses. + +> **WARN** +> +> +> **Implementation Considerations** +> +> Webhooks are the primary and most efficient method for event notifications. They are delivered asynchronously in near real-time. For critical user-facing flows that need instant confirmation (like showing "Payment Successful" immediately), supplement webhooks with API verification. +> +> **Recommended approach** + +> - Rely on webhooks for all automation, which can be asynchronous. +> - If a critical user-facing flow requires instant status, but the webhook notification has not arrived within the time mandated by your business needs, perform an immediate API Fetch call ([Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/payments/fetch-with-id.md), [Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/orders/fetch-with-id.md) and [Refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/refunds/fetch-specific-refund-payment.md)) to verify the status. +> + +## Next Steps + +- Set up [Payment webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + +- Set up [Payout webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) + +- Review [webhook best practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/best-practices.md) + +- [Validate and test webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md) diff --git a/llm-content/webhooks/account-validation.md b/llm-content/webhooks/account-validation.md new file mode 100644 index 00000000..a300d998 --- /dev/null +++ b/llm-content/webhooks/account-validation.md @@ -0,0 +1,190 @@ +--- +title: Account Validation Webhook Events +description: List of Account Validation webhook events along with sample payloads. +--- + +# Account Validation Webhook Events + +Account Validation API validates your Contact's Fund Account details such as bank account or VPA (UPI). + +## List of Account Validation Webhook Events + +The table below lists the webhook events available for RazorpayX Account Validation. + +Webhook Event | Available For | Description +--- +`fund_account.validation.completed`| _Bank Account and VPA_ | Triggered whenever an account validation transaction is completed. +--- +`fund_account.validation.failed` | _Bank Account and VPA_ | Triggered whenever an account validation transaction fails. + +## Sample Payloads + +Given below are the sample payloads for Account Validation webhook events. + +### Fund Account Validation Completed + +```json: Bank Account +{ + "entity": "event", + "account_id": "acc_BfVUrG6tDiL7H0", + "event": "fund_account.validation.completed", + "contains": [ + "fund_account.validation" + ], + "payload": { + "fund_account.validation": { + "entity": { + "id": "fav_Fa6RwlxjoX0xeO", + "entity": "fund_account.validation", + "fund_account": { + "id": "fa_Fa6Rq1WwNrpMoK", + "entity": "fund_account", + "contact_id": "cont_FYSVUV5EeJKkKb", + "account_type": "bank_account", + "bank_account": { + "name": "Gaurav Kumar", + "bank_name": "HDFC", + "ifsc": "HDFC0000053", + "account_number": "1121431121541121" + }, + "batch_id": null, + "active": true, + "created_at": 1599473652 + }, + "status": "completed", + "amount": 127, + "currency": "INR", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "results": { + "account_status": "active", + "registered_name": "Gaurav Kumar", + "details": "The beneficiary account is valid.", + "name_match_score" : 100 + + }, + "created_at": 1599473659, + "utr": "XXXXR7310682908954385XX" + } + } + }, + "created_at": 1599473661 +} +```json: VPA +{ + "entity": "event", + "account_id": "acc_BfVUrG6tDiL7H0", + "event": "fund_account.validation.completed", + "contains": [ + "fund_account.validation" + ], + "payload": { + "fund_account.validation": { + "entity": { + "id": "fav_Fa6RwlxjoX0xeO", + "entity": "fund_account.validation", + "fund_account": { + "id": "fa_Fa6Rq1WwNrpMoK", + "entity": "fund_account", + "contact_id": "cont_FYSVUV5EeJKkKb", + "account_type": "vpa", + "vpa": { + "username": "gaurav.kumar", + "handle": "exampleupi", + "address": "gaurav.kumar@exampleupi" + }, + "batch_id": null, + "active": true, + "created_at": 1599473652, + }, + "status": "completed", + "amount": null, + "currency": null, + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "results": { + "account_status": "active", + "registered_name": "Gaurav Kumar", + "details": "The beneficiary account is valid.", + "name_match_score" : 100 + "bank_account" : { + "ifsc": "ICIC0000047", + "account_number": "1121431121541121", + "bank_name": "ICICI Bank", + "account_type": "saving" + }, + }, + "created_at": 1599473659, + "utr": null + } + } + }, + "created_at": 1599473661 +} +``` + +### Fund Account Validation Failed + +```json: Bank Account +{ + "entity": "event", + "account_id": "acc_BfVUrG6tDiL7H0", + "event": "fund_account.validation.failed", + "contains": [ + "fund_account.validation" + ], + "payload": { + "fund_account.validation": { + "entity": { + "id": "fav_Fa6RwlxjoX0xeO", + "entity": "fund_account.validation", + "fund_account": { + "id": "fa_Fa6Rq1WwNrpMoK", + "entity": "fund_account", + "contact_id": "cont_FYSVUV5EeJKkKb", + "account_type": "bank_account", + "bank_account": { + "name": "Gaurav Kumar", + "bank_name": "HDFC", + "ifsc": "HDFC0000053", + "account_number": "1121431121541121" + }, + "batch_id": null, + "active": true, + "created_at": 1599652242 + }, + "status": "failed", + "amount": 127, + "currency": "INR", + "notes": { + "random_key_1": "Make it so.", + "random_key_2": "Tea. Earl Grey. Hot." + }, + "results": { + "account_status": "", + "registered_name": "", + "details": "null", + "name_match_score" : null + }, + "created_at": 1599473659, + "utr": null + } + } + }, + "created_at": 1599473661 +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. +> +> - While generating a signature at your end, ensure that the webhook body is passed as an argument in the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> diff --git a/llm-content/webhooks/all.md b/llm-content/webhooks/all.md new file mode 100644 index 00000000..e2181b91 --- /dev/null +++ b/llm-content/webhooks/all.md @@ -0,0 +1,151 @@ +--- +title: All Webhook Events +description: List of all Payments, Partners and Payouts webhook events. +--- + +# All Webhook Events + +Given below is the complete list of webhook events for [Payments](#payments-webhooks), [Partners](#partners-oauth-webhooks) and [Payouts](#payouts-webhooks). + +Concept/Product | Webhook Event | Description +--- +Orders | [order.paid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/orders.md#order-paid) | Triggered when an order is successfully paid. +--- +Payments ^^^ | [payment.authorized](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payment-authorized) | Triggered when a payment is authorised. +--- + | [payment.captured](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payment-captured) | Triggered when a payment is successfully captured. +--- + | [payment.failed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payment-failed) | Triggered when a payment fails. +--- +Payment Downtime ^^^ | [payment.downtime.started](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payment-downtime-started) | Triggered at the beginning of the downtime. +--- + | [payment.downtime.resolved](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payment-downtime-resolved) | Triggered when a downtime is resolved. +--- + | [payment.downtime.updated](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#payment-downtime-updated) | Triggered when a downtime is updated. +--- +Refunds ^^^^ | [refund.created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/refunds.md#refund-created) | Triggered when a refund is created. +--- + | [refund.processed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/refunds.md#refund-processed) | Triggered when the refund is successfully processed. +--- + | [refund.failed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/refunds.md#refund-failed) | Triggered when we are not able to process a refund. +--- + | [refund.speed_changed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/refunds.md#refund-speed-changed) | Triggered when the refund speed is changed. +--- +Disputes ^^^^^^ | [payment.dispute.created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/disputes.md#payment-dispute-created) | Triggered when a dispute is raised by the customer's issuing bank against a payment. +--- + | [payment.dispute.won](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/disputes.md#payment-dispute-won) | Triggered when you win a dispute against a payment. +--- + | [payment.dispute.lost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/disputes.md#payment-dispute-lost) | Triggered when you lose a dispute against a payment. +--- + | [payment.dispute.closed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/disputes.md#payment-dispute-closed) | Triggered when a dispute is closed. +--- + | [payment.dispute.under_review](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/disputes.md#payment-dispute-under-review) | Triggered when you contest a dispute and submit the evidence for review. +--- + | [payment.dispute.action_required](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/disputes.md#payment-dispute-action-required) | Triggered when the evidence submitted is insufficient, unreadable or does not correspond to the contested amount. Please update/add evidences before contesting the dispute again. +--- +Invoices ^^^ | [invoice.partially_paid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/invoices.md#invoice-partially-paid) | Triggered when a partial payment is made against an invoice. +--- + | [invoice.paid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/invoices.md#invoice-paid) | Triggered when an invoice is successfully paid. +--- + | [invoice.expired](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/invoices.md#invoice-expired) | Triggered when an invoice expires. +--- +Subscriptions ^^^^^^^^^^ | [subscription.authenticated](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/subscriptions.md#subscription-authenticated) | Sent when the first payment is made on the subscription. This can either be the authorisation amount, the upfront amount, the plan amount or a combination of the plan amount and the upfront amount. +--- + | [subscription.activated](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/subscriptions.md#subscription-activated) | Sent when the subscription moves to the active state either from the authenticated, pending or halted state. If a Subscription moves to the active state from the pending or halted state, only the subsequent invoices that are generated are charged. Existing invoices that were already generated are not charged. +--- + | [subscription.charged](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/subscriptions.md#subscription-charged) | Sent every time a successful charge is made on the subscription. +--- + | [subscription.completed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/subscriptions.md#subscription-completed) | Sent when all the invoices are generated for a subscription and the subscription moves to the completed state. +--- + | [subscription.updated](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/subscriptions.md#subscription-updated) | Sent when a subscription is successfully updated. There is no state change when a subscription is updated. +--- + | [subscription.pending](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/subscriptions.md#subscription-pending) | Sent when the subscription moves to the pending state. This happens when a charge on the card fails. We try to charge the card on a periodic basis while it is in the pending state. If the payment fails again, the Webhook is triggered again. +--- + | [subscription.halted](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/subscriptions.md#subscription-halted) | Sent when all retries have been exhausted and the subscription moves from the pending state to the halted state. The customer has to manually retry the charge or change the card linked to the subscription, for the subscription to move back to the active state. +--- + | [subscription.cancelled](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/subscriptions.md#subscription-cancelled) | Sent when a subscription is cancelled and moved to the cancelled state. +--- + | [subscription.paused](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/subscriptions.md#subscription-paused) | Sent when a subscription is paused and moved to the paused state. +--- + | [subscription.resumed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/subscriptions.md#subscription-resumed) | Sent when a subscription is resumed and moved to the resumed state. +--- +Route (Transfers) ^^ | [transfer.processed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/route.md#transfer-processed) | Triggered when a transfer made to a Linked Account is processed. +--- + | [transfer.failed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/route.md#transfer-failed) | Triggered when a transfer made to a Linked Account is failed. +--- +Settlements | [settlement.processed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/route.md#settlement-processed) | Triggered when a settlement is successfully processed to your bank account. +--- +Route (Linked Accounts) ^^^ | [product.route.under_review](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/route.md#product-route-under-review) | Triggered when the Linked account is in the process of being verified by Razorpay. +--- + | [product.route.needs_clarification](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/route.md#product-route-needs-clarification) | Triggered when verification of the Linked account has failed, reasons are also included in the data object. +--- + | [product.route.activated](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/route.md#product-route-activated) | Triggered when a Linked account has been verified successfully and is activated. +--- +QR Codes ^^^ | [qr_code.created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/qr-codes.md#qr-code-created) | Triggered when a QR code is created. +--- + | [qr_code.credited](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/qr-codes.md#qr-code-credited) | Triggered when a payment is made using a QR code. +--- + | [qr_code.closed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/qr-codes.md#qr-code-closed) | Triggered when a QR code is closed. +--- +Virtual Accounts ^^^ | [virtual_account.created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/smart-collect.md#virtual-account-created) | Triggered when a virtual account is created. +--- + | [virtual_account.credited](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/smart-collect.md#virtual-account-credited) | Triggered when a payment is made to a virtual account. +--- + | [virtual_account.closed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/smart-collect.md#virtual-account-closed) | Triggered when a virtual account expires on a date set by you or is manually closed by you. +--- +Payment Links ^^^^ | [payment_link.paid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payment-links.md#payment-link-paid) | Triggered when a Payment Link is paid. +--- + | [payment_link.partially_paid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payment-links.md#payment-link-partially-paid) | Triggered when a partial payment is made on a Standard Payment Link. +--- + | [payment_link.cancelled](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payment-links.md#payment-link-cancelled) | Triggered when a Payment Link is cancelled by you. +--- + | [payment_link.expired](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payment-links.md#payment-link-expired) | Triggered when a Payment Link expires. +--- +Partners OAuth | [account.app.authorization_revoked](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/oauth.md#account-app-authorization-revoked) | Triggered when the sub-merchant revokes access to the partner application. +--- +Payouts ^^^^^^^^ | [payout.pending](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payouts.md#payout-pending) | Triggered whenever a payout moves to the pending state. The payout remains in this state till you approve or reject it. +--- + | [payout.rejected](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payouts.md#payout-rejected) | Triggered whenever a payout moves to the rejected state. The payout was rejected by someone from your team. +--- + | [payout.queued](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payouts.md#payout-queued) | Triggered whenever a payout moves to the queued state. - Payout goes to queued state when you do not have sufficient funds to process it or when the beneficiary bank/NPCI/partner bank is down. This event is applicable only for RazorpayX Lite. +- You will receive the reason for the payout to be in the queued state as part of the status_details object. + +--- + | [payout.initiated](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payouts.md#payout-initiated) | Triggered when the payout moves to the processing state when the payout is created or from the queued state when sufficient funds are available to process the payout. +--- + | [payout.processed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payouts.md#payout-processed) | Triggered when a payout moves to the processed state. This happens when the payout is processed by the contact's bank. +--- + | [payout.updated](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payouts.md#payout-updated) | Triggered whenever there is a change in the payout entity. For example, when we receive the UTR for the payout from the bank.- For NEFT transactions, this webhook is fired within 90 seconds. +- For IMPS and UPI transactions, this webhook is generally fired immediately. + +--- + | [payout.reversed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payouts.md#payout-reversed) | Triggered whenever a payout fails and the amount is returned to your business account. +--- + | [payout.failed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payouts.md#payout-failed) | Triggered when a payout is failed because the beneficiary bank OR NPCI OR processing partner bank is down. If the beneficiary bank/partner bank/NPCI does not recover within the stipulated SLA, a FAILED event will be sent with the respective reason. +--- +Payout Downtime ^^ | [payout.downtime.started](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payouts.md#payout-downtime-started) | Triggered when a payout downtime starts. Do not initiate a payout if this is triggered since the beneficiary bank is down and the payout will fail. +--- + | [payout.downtime.resolved](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payouts.md#payout-downtime-resolved) | Triggered when a payout downtime is resolved. Make payouts once this webhook is triggered as it indicates that the beneficiary bank downtime is resolved. +--- +Fund Account Validation ^^ | [fund_account.validation.completed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/account-validation.md#fund-account-validation-completed) | Triggered whenever an account validation transaction is completed. +--- + | [fund_account.validation.failed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/account-validation.md#fund-account-validation-failed) | Triggered whenever an account validation transaction fails. +--- +Payout Links ^^^^^^^^ | [payout_link.pending](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payout-links.md#payout-link-pending) | Triggered whenever a payout link moves to the pending state. This indicates that the payout link has been created. Applicable only for cases where approval workflow is set. +--- + | [payout_link.issued](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payout-links.md#payout-link-issued) | Triggered whenever a payout link moves to the issued state. This indicates that the payout link has been created. +--- + | [payout_link.processing](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payout-links.md#payout-link-processing) | Triggered whenever a payout link moves to the processing state. This indicates that your contact has entered their fund account details and the payout is being processed. +--- + | [payout_link.processed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payout-links.md#payout-link-processed) | Triggered whenever a payout link moves to the processed state. This indicates that the payout has been successfully made. +--- + | [payout_link.attempted](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payout-links.md#payout-link-attempted) | Triggered whenever the underlying payout has reversed and another attempt is required on the payout link. +--- + | [payout_link.cancelled](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payout-links.md#payout-link-cancelled) | Triggered whenever a payout link moves to the cancelled state. This indicates that you have cancelled the payout link. +--- + | [payout_link.rejected](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payout-links.md#payout-link-rejected) | Triggered whenever a payout link moves to the rejected state. This indicates that the Approver has rejected the payout link. Applicable only for cases where approval workflow is set. +--- + | [payout_link.expired](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payout-links.md#payout-link-expired) | Triggered whenever a payout link moves to the expired state. This indicates that the payout link has expired. +--- +Transactions | [transaction.created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/transactions.md#transaction-created) | Triggered whenever you: - Make a Payout (RazorpayX Lite). +- Add funds to your RazorpayX account (RazorpayX Lite). diff --git a/llm-content/webhooks/best-practices.md b/llm-content/webhooks/best-practices.md new file mode 100644 index 00000000..4775c7be --- /dev/null +++ b/llm-content/webhooks/best-practices.md @@ -0,0 +1,77 @@ +--- +title: Webhooks | Best Practices +heading: Best Practices +description: Best practices to adhere to when using Razorpay notification webhooks. +--- + +# Best Practices + +Webhooks provide an effective method to track the state of transactions and to take appropriate actions within your Razorpay account. Take a look at these best practices to ensure your webhooks remain secure and function seamlessly with your integration. + +## Delivery Attempts and Retries + +Every event that receives a non-2xx response is considered an event delivery failure by Razorpay's system. If there is a delivery failure, we retry the delivery in exponential backoff policy for 24 hours after event creation timestamp. + +> **WARN** +> +> +> **Watch Out!** +> +> Webhooks are delivered in near real-time and are asynchronous. For business-critical, synchronous use cases, you may choose to poll out APIs as well. +> + +### Disable Logic + +A webhook is retried at progressive intervals of time on failure, defined in the exponential backoff policy, for 24 hours. If the webhooks continue to fail for 24 hours, the webhook is disabled. You need to enable the webhook from the Dashboard after fixing the errors at your end. + +Whenever a webhook is disabled, you are notified on your **Alert Email Address** as configured during webhook setup. In case you have not provided an **Alert Email Address** during webhook set up, we send a mail to the email address configured under **Account & Settings** on the Dashboard. + +> **WARN** +> +> +> **Watch Out!** +> +> Please note that Razorpay considers any non-2xx response as an event delivery failure. Please make sure the API responds with 2xx when you successfully consume the event at your end. + +> + +You can also manually disable webhooks from the Dashboard. Know more about [Payments Deactivation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md#deactivation) and [RazorpayX Deactivation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md#deactivation). + +## Event Handling + +Correct handling of webhook events is crucial to ensuring your integration's business logic works as expected. + +### Handle Duplicate Events + +There could be scenarios where your endpoint might receive the same webhook event multiple times. This is an expected behaviour based on the webhook design. In such a scenario, we recommend you to follow [idempotency](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#idempotency). + +You could be receiving the same events multiple times as Razorpay follows at-least-once delivery semantics. In this approach, if we do not receive a successful response from your server, we resend the webhook. There could be situations where your server accepts the event but fails to respond in 5 seconds. In such cases, the session is marked timeout. It is assumed that the webhook was not processed and is sent again. + +> **INFO** +> +> +> **Handy Tips** +> +> To prevent an event from being missed: + +> - Ensure you configure your server to handle or receive the same event details multiple times. + +> - Check the value of the `x-razorpay-event-id` in the webhook request header. The value for this header is unique per event and can help you determine the duplicity of a webhook event. +> + +### Order Of Events + +Ideally, you should receive a webhook in the order in which the webhook events occur. However, you may not always receive the webhooks in order. Know more about [Order of Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#order-of-webhooks). + +## Security + +Maintaining your endpoints secure is crucial to protecting your customer's information. Razorpay provides various methods to verify that events are securely coming from us. + +### Receive events with an HTTPS server + +Razorpay Production environment does not support the older versions of TLS 1.0 and 1.1 due to security concerns around these protocols. The TLS protocol is used to encrypt your servers communications with Razorpay, so your integration must use the latest version (TLS 1.2 is much more secure than its predecessors). As an integration checklist, please whitelist all the [Webhook IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#webhook-ips). + +### Verify Events are Sent from Razorpay + +You can [verify webhook signatures](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#validate-webhooks) to confirm that received events are sent from Razorpay. +You can also [resolve webhook signature validation errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/faqs.md#3-how-to-resolve-webhook-signature-validation-errors). diff --git a/llm-content/webhooks/disputes.md b/llm-content/webhooks/disputes.md new file mode 100644 index 00000000..9e30c090 --- /dev/null +++ b/llm-content/webhooks/disputes.md @@ -0,0 +1,576 @@ +--- +title: Disputes Webhook Events +description: List of Disputes webhook events along with sample payloads. +--- + +# Disputes Webhook Events + +A **Dispute** occurs when a customer or issuing bank challenges a payment's validity due to unauthorised charges, non-delivery of goods, or excessive fees. + +## List of Disputes Webhook Events + +The table below lists the webhook events available for disputes. + +Webhook Event | Description +--- +`payment.dispute.created` | Triggered when a dispute is raised by the customer's issuing bank against a payment. +--- +`payment.dispute.won` | Triggered when you win a dispute against a payment. +--- +`payment.dispute.lost` | Triggered when you lose a dispute against a payment. +--- +`payment.dispute.closed` | Triggered when a dispute is closed. +--- +`payment.dispute.under_review` | Triggered when you contest a dispute and submit the evidence for review. +--- +`payment.dispute.action_required` | Triggered when the evidence submitted is insufficient, unreadable or does not correspond to the contested amount. Please update/add evidences before contesting the dispute again. + +## Sample Payloads + +Given below are the sample payloads for disputes webhook events. + +### Payment Dispute Created + +```json: Payment Dispute Created +{ + "entity": "event", + "account_id": "acc_CFvOKjkTwf3GQy", + "event": "payment.dispute.created", + "contains": [ + "payment", + "dispute" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EFtmUsbwpXwBHI", + "entity": "payment", + "amount": 5297600, + "currency": "INR", + "base_amount": 5297600, + "status": "captured", + "order_id": "order_EFtkA6f5jdkfud", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 700000, + "amount_transferred": 0, + "refund_status": "partial", + "captured": true, + "description": null, + "card_id": "card_EADblPSDnnk5ZG", + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919900000000", + "notes": [], + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1581525157 + } + }, + "dispute": { + "entity": { + "id": "disp_EsIAlDcoUr8CaQ", + "entity": "dispute", + "payment_id": "pay_EFtmUsbwpXwBHI", + "amount": 39000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "processed_invalid_expired_card", + "respond_by": 1590431400, + "status": "open", + "evidence": { + "amount": 39000, + "summary": null, + "shipping_proof": null, + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": null, + "submitted_at": null + }, + "phase": "chargeback", + "created_at": 1589907957 + } + } + }, + "created_at": 1589907977 +} +``` + +### Payment Dispute Won + +```json: Payment Dispute Won +{ + "entity": "event", + "account_id": "acc_CFvOKjkTwf3GQy", + "event": "payment.dispute.won", + "contains": [ + "payment", + "dispute" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EsIStomuIwFQ6U", + "entity": "payment", + "amount": 1000000, + "currency": "INR", + "base_amount": 1000000, + "status": "authorized", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": "card_EFEmBYkUF2ZzYw", + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919900000000", + "notes": [], + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "created_at": 1589909038 + } + }, + "dispute": { + "entity": { + "id": "disp_EsIUyp8XlaZOUt", + "entity": "dispute", + "payment_id": "pay_EsIStomuIwFQ6U", + "amount": 130000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "non_matching_account_number", + "respond_by": 1590431400, + "status": "won", + "phase": "chargeback", + "created_at": 1589909126, + "evidence": { + "amount": 130000, + "summary": "goods delivered", + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": [ + "doc_EFtmUsbwpXwBG9", + "doc_EFtmUsbwpXwBG8" + ], + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "submitted_at": 1589909726 + } + } + } + }, + "created_at": 1589909172 +} +``` + +### Payment Dispute Lost + +```json: Payment Dispute Lost +{ + "entity": "event", + "account_id": "acc_CFvOKjkTwf3GQy", + "event": "payment.dispute.lost", + "contains": [ + "payment", + "dispute" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EFtmUsbwpXwBHI", + "entity": "payment", + "amount": 5297600, + "currency": "INR", + "base_amount": 5297600, + "status": "captured", + "order_id": "order_EFtkA6f5jdkfud", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 700000, + "amount_transferred": 0, + "refund_status": "partial", + "captured": true, + "description": null, + "card_id": "card_EADblPSDnnk5ZG", + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "++919900000000", + "notes": [], + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "created_at": 1581525157 + } + }, + "dispute": { + "entity": { + "id": "disp_EsIAlDcoUr8CaQ", + "entity": "dispute", + "payment_id": "pay_EFtmUsbwpXwBHI", + "amount": 39000, + "currency": "INR", + "amount_deducted": 39000, + "reason_code": "processed_invalid_expired_card", + "respond_by": 1590431400, + "status": "lost", + "phase": "chargeback", + "evidence": { + "amount": 39000, + "summary": null, + "shipping_proof": null, + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": null, + "submitted_at": null + }, + "created_at": 1589907977 + } + } + }, + "created_at": 1589908238 +} +``` + +### Payment Dispute Closed + +```json: Payment Dispute Closed +{ + "entity": "event", + "account_id": "acc_CFvOKjkTwf3GQy", + "event": "payment.dispute.closed", + "contains": [ + "payment", + "dispute" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EsIKS2bpFiWghA", + "entity": "payment", + "amount": 10000, + "currency": "INR", + "base_amount": 10000, + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_ECijxX3uDiBYJ4", + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919900000000", + "notes": [], + "fee": 100, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "created_at": 1589908559 + } + }, + "dispute": { + "entity": { + "id": "disp_EsIMubKldQtcu5", + "entity": "dispute", + "payment_id": "pay_EsIKS2bpFiWghA", + "amount": 10000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "goods_or_services_not_received_or_partially_received", + "respond_by": 1590431400, + "status": "closed", + "phase": "fraud", + "evidence": { + "amount": 10000, + "summary": null, + "shipping_proof": null, + "billing_proof": null, + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": null, + "submitted_at": null + }, + "created_at": 1589908667 + } + } + }, + "created_at": 1589908856 +} +``` + +### Payment Dispute Under Review + +```json: Payment Dispute Under Review +{ + "entity": "event", + "account_id": "acc_CFvOKjkTwf3GQy", + "event": "payment.dispute.under_review", + "contains": [ + "payment", + "dispute" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EsIStomuIwFQ6U", + "entity": "payment", + "amount": 1000000, + "currency": "INR", + "base_amount": 1000000, + "status": "authorized", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": "card_EFEmBYkUF2ZzYw", + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919900000000", + "notes": [], + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "created_at": 1589909038 + } + }, + "dispute": { + "entity": { + "id": "disp_EsIUyp8XlaZOUt", + "entity": "dispute", + "payment_id": "pay_EsIStomuIwFQ6U", + "amount": 130000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "non_matching_account_number", + "respond_by": 1590431400, + "status": "under_review", + "phase": "chargeback", + "created_at": 1589909126, + "evidence": { + "amount": 100000, + "summary": "goods delivered", + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": [ + "doc_EFtmUsbwpXwBG9", + "doc_EFtmUsbwpXwBG8" + ], + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "submitted_at": 1589909726 + } + } + } + }, + "created_at": 1589909172 +} +``` + +### Payment Dispute Action Required + +```json: Payment Dispute Action Required +{ + "entity": "event", + "account_id": "acc_CFvOKjkTwf3GQy", + "event": "payment.dispute.action_required", + "contains": [ + "payment", + "dispute" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_EFtmUsbwpXwBHI", + "entity": "payment", + "amount": 5297600, + "currency": "INR", + "base_amount": 5297600, + "status": "captured", + "order_id": "order_EFtkA6f5jdkfud", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 700000, + "amount_transferred": 0, + "refund_status": "partial", + "captured": true, + "description": null, + "card_id": "card_EADblPSDnnk5ZG", + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919900000000", + "notes": [], + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": {}, + "created_at": 1581525157 + } + }, + "dispute": { + "entity": { + "id": "disp_EsIAlDcoUr8CaQ", + "entity": "dispute", + "payment_id": "pay_EFtmUsbwpXwBHI", + "amount": 390000, + "currency": "INR", + "amount_deducted": 0, + "reason_code": "processed_invalid_expired_card", + "respond_by": 1590431400, + "status": "open", + "phase": "chargeback", + "created_at": 1589907977 + }, + "evidence": { + "amount": 130000, + "summary": "goods delivered", + "shipping_proof": [ + "doc_EFtmUsbwpXwBH9", + "doc_EFtmUsbwpXwBH8" + ], + "billing_proof": [ + "doc_EFtmUsbwpXwBG9", + "doc_EFtmUsbwpXwBG8" + ], + "cancellation_proof": null, + "customer_communication": null, + "proof_of_service": null, + "explanation_letter": null, + "refund_confirmation": null, + "access_activity_log": null, + "refund_cancellation_policy": null, + "term_and_conditions": null, + "others": [ + { + "type": "receipt_signed_by_customer", + "document_ids": [ + "doc_EFtmUsbwpXwBH1", + "doc_EFtmUsbwpXwBH7" + ] + } + ], + "submitted_at": null + } + } + }, + "created_at": 1589907977 +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. +> +> - While generating a signature at your end, ensure that the webhook body is passed as an argument in the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> diff --git a/llm-content/webhooks/faqs.md b/llm-content/webhooks/faqs.md new file mode 100644 index 00000000..e3827550 --- /dev/null +++ b/llm-content/webhooks/faqs.md @@ -0,0 +1,146 @@ +--- +title: Webhooks | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay webhooks. +--- + +# Frequently Asked Questions (FAQs) + +### 1. How many webhooks are allowed per Merchant id? + + + - For Payments, you can create up to 30 different webhook URLs. + - For RazorpayX, currently, only one webhook is allowed per Merchant ID. + + + + + +### 2. Why am I getting an error message as "private ip found for host"? + + Webhooks can only be delivered to public URLs. If you attempt to save a localhost endpoint as part of a webhook setup, you will notice this error. Know more about the [ alternatives to localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#application-running-on-localhost). + + + +### 3. How to resolve webhook signature validation errors? + + - **Secret mismatch** + + Signature validation errors happen when the secret configured during webhook setup does not match the secret used during signature generation. Ensure the secret you pass while generating the signature matches the secret configured in the webhook setup. + + + +> **WARN** +> +> +> **Watch Out!** +> +> The webhook secret does not need to be the merchant secret key provided by Razorpay. +> + + If you do not remember the secret used during setup, change the secret by editing the webhook. Know more about [editing Payments webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) and [Editing Payouts Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md). + + - **Issue with the signature generation logic** + + While generating the signature at your end, you must ensure that the webhook body passed as an argument is the raw webhook request body. This is not recommended as your method of JSON encoding can be different from ours. Instead, you should be taking the raw body and using that directly. This should always result in the same signature. + + + - **Secret changed recently on the Dashboard** + + If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. The new secret can only be used for all events generated after the secret is updated. + + + +### 4. What will happen if the webhook event is not received? + + Every event that receives a non-2xx response is considered an event delivery failure by Razorpay's system. If there is a delivery failure, we retry the delivery in exponential backoff policy 24 hours after event creation timestamp. + + + +### 5. Can a webhook event be replayed from Razorpay's side? + + You can request a replay of a webhook event from Razorpay's side if it meets the following criteria: + - The webhook should be enabled on the dashboard during the occurrence of this event. + - The webhook event should not be older than 15 days. + - The webhook event's signature validation should be done using the same signature during the occurrence of this event. + - The webhook event should be specific to payments, orders and so on. + + +> **WARN** +> +> +> **Watch Out!** +> +> Currently, bulk replaying of webhook events is not possible.  +> + + + + ![Webhooks Replay Request.gif](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhook-replay-request.gif.md) + + + +### 6. Why is my webhook disabled? + + A webhook is retried at progressive intervals of time on failure, defined in the exponential backoff policy, for 24 hours. If the webhooks continue to fail for 24 hours, the webhook is disabled. You need to enable the webhook from the Dashboard after fixing the errors at your end. + + Whenever a webhook is disabled, you are notified on your **Alert Email Address** as configured during webhook setup. If no Alert Email Address was provided during webhook setup, an email is sent to the email address configured under **Settings** on the Dashboard. + + +> **WARN** +> +> +> **Watch Out!** +> +> Please note that Razorpay considers any non-2xx response as an event delivery failure. Please make sure the API responds with 2xx when you successfully consume the event at your end. + +> + + + + +### 7. Why am I receiving the same event multiple times? + + To avoid an event being missed, Razorpay follows at-least-once delivery semantics. In this approach, if we do not receive a successful response from your server, we resend the webhook. + + There could be situations where your server accepts the event but fails to respond in 5 seconds. In such cases, the session is marked timeout. It is assumed that the webhook was not processed and is sent again. + + 1. Ensure your server is configured to handle or receive the same event details multiple times. + 2. Check the value of `x-razorpay-event-id` in the webhook request header. The value for this header is unique per event and can help you determine the duplicity of a webhook event. + + + +### 8. Why am I not able to consume webhooks in the production environment, whereas I can consume in the test environment? + + Razorpay Production environment does not support the older versions of TLS 1.0 and 1.1 due to security concerns around these protocols. + + 1. The TLS protocol is used to encrypt your servers' communications with Razorpay, so it is important that your integration uses the latest version (TLS 1.2 is much more secure than its predecessors.). + + 2. As an integration checklist, please whitelist all the [ Webhook IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/security/whitelists.md#webhook-ips). + + + +### 9. Where can I find the webhooks log history? + + To view the webhooks log history: + 1. Log in to your Dashboard. + 2. On the left navigation, click **Developers** → **Webhooks**. + ![webhooks logs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhook-logs.jpg.md) + 3. Select the webhook for which you want to view the log history. + ![webhooks logs details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhook-log-details.jpg.md) + + + +### 10. Is there a standard webhook response structure for all payment methods? + + No, there is no standard webhook response structure across all payment methods. However, core parameters remain consistent while method-specific fields vary. Refer to [webhook events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/payments.md#sample-payloads) for payload examples for each payment method. + + + +### 11. How do I handle payment cancellation or timeout scenarios? + + For scenarios where users close payment windows, switch tabs, or abandon payments, use these webhook events: + - `payment.failed`: Triggered when payment fails or times out. + - `payment.authorized`: Monitor for late authorisations after apparent failures. + + Payment window closure does not always trigger immediate events. Use timeout handling and payment status verification for reliable payment flow management. diff --git a/llm-content/webhooks/invoices.md b/llm-content/webhooks/invoices.md new file mode 100644 index 00000000..27bdd8b2 --- /dev/null +++ b/llm-content/webhooks/invoices.md @@ -0,0 +1,1248 @@ +--- +title: Invoices Webhook Events +description: List of Invoices webhook events along with sample payloads. +--- + +# Invoices Webhook Events + +An **Invoice** is a digital document summarising transaction details, enabling customers to make payments while displaying product/service information, pricing and customer details. + +## List of Invoices Webhook Events + +The table below lists the webhook events available for Invoices. + +Webhook Event | Description +--- +`invoice.partially_paid` | Triggered when a partial payment is made against an invoice. +--- +`invoice.paid` | Triggered when an invoice is successfully paid. +--- +`invoice.expired` | Triggered when an invoice expires. + +## Sample Payloads + +Given below are the sample payloads for Invoices webhook events. + +### Invoice Partially Paid + +```json: Netbanking +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "invoice.partially_paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DEW499hvSyqk4Q", + "entity": "payment", + "amount": 10000, + "currency": "INR", + "status": "captured", + "order_id": "order_DEW1rvumj0vSXG", + "invoice_id": "inv_DEW1rqhJxTyZwz", + "international": false, + "method": "netbanking", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_DEW1rqhJxTyZwz", + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 236, + "tax": 36, + "error_code": null, + "error_description": null, + "created_at": 1567686213 + } + }, + "order": { + "entity": { + "id": "order_DEW1rvumj0vSXG", + "entity": "order", + "amount": 479030, + "amount_paid": 20000, + "amount_due": 459030, + "currency": "INR", + "receipt": "14", + "offer_id": null, + "status": "attempted", + "attempts": 2, + "notes": [], + "created_at": 1567686084 + } + }, + "invoice": { + "entity": { + "id": "inv_DEW1rqhJxTyZwz", + "entity": "invoice", + "receipt": "14", + "invoice_number": "14", + "customer_id": "cust_BtQNqzmBlAXyTY", + "customer_details": { + "id": "cust_BtQNqzmBlAXyTY", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "gstin": "24AABCJ1087G1ZT", + "billing_address": { + "id": "addr_DEVxnrfJblan6u", + "type": "billing_address", + "primary": true, + "line1": "84th Floor, Millennium Tower, ", + "line2": "Corner of 1st and 1st", + "zipcode": "560096", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "shipping_address": { + "id": "addr_DEVzXQePDJFIQJ", + "type": "billing_address", + "primary": true, + "line1": "Warehouse 1194, Warehouse Lane", + "line2": "Warehouse District", + "zipcode": "560128", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9000090000" + }, + "order_id": "order_DEW1rvumj0vSXG", + "payment_id": "pay_DEW3tZzpXkKWtO", + "status": "partially_paid", + "expire_by": 1569868199, + "issued_at": 1567686084, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1567682379, + "terms": "Terms and Conditions for Webhooks", + "partial_payment": true, + "gross_amount": 425000, + "tax_amount": 54030, + "taxable_amount": 425000, + "amount": 479030, + "amount_paid": 20000, + "amount_due": 459030, + "first_payment_min_amount": null, + "currency": "INR", + "description": "Invoice to Test Webhooks", + "notes": [], + "comment": "Customer Notes for Webhooks", + "short_url": "https: //rzp.io/i/01ZsZNj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "invoice", + "group_taxes_discounts": false, + "supply_state_code": "29", + "user_id": "BFQ7uKsprYMg6p", + "created_at": 1567686084, + "idempotency_key": null + } + } + }, + "created_at": 1567686215 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "invoice.partially_paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DEW3tZzpXkKWtO", + "entity": "payment", + "amount": 10000, + "currency": "INR", + "status": "captured", + "order_id": "order_DEW1rvumj0vSXG", + "invoice_id": "inv_DEW1rqhJxTyZwz", + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_DEW1rqhJxTyZwz", + "card_id": "card_DEW3tdWKODG8DV", + "card": { + "id": "card_DEW3tdWKODG8DV", + "entity": "card", + "name": "Neelesh Verma", + "last4": "5558", + "network": "MasterCard", + "type": "credit", + "issuer": "KARB", + "international": false, + "emi": false + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 200, + "tax": 0, + "error_code": null, + "error_description": null, + "created_at": 1567686199 + } + }, + "order": { + "entity": { + "id": "order_DEW1rvumj0vSXG", + "entity": "order", + "amount": 479030, + "amount_paid": 10000, + "amount_due": 469030, + "currency": "INR", + "receipt": "14", + "offer_id": null, + "status": "attempted", + "attempts": 1, + "notes": [], + "created_at": 1567686084 + } + }, + "invoice": { + "entity": { + "id": "inv_DEW1rqhJxTyZwz", + "entity": "invoice", + "receipt": "14", + "invoice_number": "14", + "customer_id": "cust_BtQNqzmBlAXyTY", + "customer_details": { + "id": "cust_BtQNqzmBlAXyTY", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "gstin": "24AABCJ1087G1ZT", + "billing_address": { + "id": "addr_DEVxnrfJblan6u", + "type": "billing_address", + "primary": true, + "line1": "84th Floor, Millennium Tower, ", + "line2": "Corner of 1st and 1st", + "zipcode": "560096", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "shipping_address": { + "id": "addr_DEVzXQePDJFIQJ", + "type": "billing_address", + "primary": true, + "line1": "Warehouse 1194, Warehouse Lane", + "line2": "Warehouse District", + "zipcode": "560128", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9000090000" + }, + "order_id": "order_DEW1rvumj0vSXG", + "payment_id": "pay_DEW3tZzpXkKWtO", + "status": "partially_paid", + "expire_by": 1569868199, + "issued_at": 1567686084, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1567682379, + "terms": "Terms and Conditions for Webhooks", + "partial_payment": true, + "gross_amount": 425000, + "tax_amount": 54030, + "taxable_amount": 425000, + "amount": 479030, + "amount_paid": 10000, + "amount_due": 469030, + "first_payment_min_amount": null, + "currency": "INR", + "description": "Invoice to Test Webhooks", + "notes": [], + "comment": "Customer Notes for Webhooks", + "short_url": "https: //rzp.io/i/01ZsZNj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "invoice", + "group_taxes_discounts": false, + "supply_state_code": "29", + "user_id": "BFQ7uKsprYMg6p", + "created_at": 1567686084, + "idempotency_key": null + } + } + }, + "created_at": 1567686201 +} +```json: Wallets +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "invoice.partially_paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DEW4Klrh5QZOcZ", + "entity": "payment", + "amount": 10000, + "currency": "INR", + "status": "captured", + "order_id": "order_DEW1rvumj0vSXG", + "invoice_id": "inv_DEW1rqhJxTyZwz", + "international": false, + "method": "wallet", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_DEW1rqhJxTyZwz", + "card_id": null, + "bank": null, + "wallet": "payzapp", + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 236, + "tax": 36, + "error_code": null, + "error_description": null, + "created_at": 1567686224 + } + }, + "order": { + "entity": { + "id": "order_DEW1rvumj0vSXG", + "entity": "order", + "amount": 479030, + "amount_paid": 30000, + "amount_due": 449030, + "currency": "INR", + "receipt": "14", + "offer_id": null, + "status": "attempted", + "attempts": 3, + "notes": [], + "created_at": 1567686084 + } + }, + "invoice": { + "entity": { + "id": "inv_DEW1rqhJxTyZwz", + "entity": "invoice", + "receipt": "14", + "invoice_number": "14", + "customer_id": "cust_BtQNqzmBlAXyTY", + "customer_details": { + "id": "cust_BtQNqzmBlAXyTY", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "gstin": "24AABCJ1087G1ZT", + "billing_address": { + "id": "addr_DEVxnrfJblan6u", + "type": "billing_address", + "primary": true, + "line1": "84th Floor, Millennium Tower, ", + "line2": "Corner of 1st and 1st", + "zipcode": "560096", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "shipping_address": { + "id": "addr_DEVzXQePDJFIQJ", + "type": "billing_address", + "primary": true, + "line1": "Warehouse 1194, Warehouse Lane", + "line2": "Warehouse District", + "zipcode": "560128", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9000090000" + }, + "order_id": "order_DEW1rvumj0vSXG", + "payment_id": "pay_DEW3tZzpXkKWtO", + "status": "partially_paid", + "expire_by": 1569868199, + "issued_at": 1567686084, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1567682379, + "terms": "Terms and Conditions for Webhooks", + "partial_payment": true, + "gross_amount": 425000, + "tax_amount": 54030, + "taxable_amount": 425000, + "amount": 479030, + "amount_paid": 30000, + "amount_due": 449030, + "first_payment_min_amount": null, + "currency": "INR", + "description": "Invoice to Test Webhooks", + "notes": [], + "comment": "Customer Notes for Webhooks", + "short_url": "https: //rzp.io/i/01ZsZNj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "invoice", + "group_taxes_discounts": false, + "supply_state_code": "29", + "user_id": "BFQ7uKsprYMg6p", + "created_at": 1567686084, + "idempotency_key": null + } + } + }, + "created_at": 1567686225 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "invoice.partially_paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DEW4fwWyn23Ufp", + "entity": "payment", + "amount": 10000, + "currency": "INR", + "status": "captured", + "order_id": "order_DEW1rvumj0vSXG", + "invoice_id": "inv_DEW1rqhJxTyZwz", + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_DEW1rqhJxTyZwz", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 236, + "tax": 36, + "error_code": null, + "error_description": null, + "created_at": 1567686243 + } + }, + "order": { + "entity": { + "id": "order_DEW1rvumj0vSXG", + "entity": "order", + "amount": 479030, + "amount_paid": 40000, + "amount_due": 439030, + "currency": "INR", + "receipt": "14", + "offer_id": null, + "status": "attempted", + "attempts": 4, + "notes": [], + "created_at": 1567686084 + } + }, + "invoice": { + "entity": { + "id": "inv_DEW1rqhJxTyZwz", + "entity": "invoice", + "receipt": "14", + "invoice_number": "14", + "customer_id": "cust_BtQNqzmBlAXyTY", + "customer_details": { + "id": "cust_BtQNqzmBlAXyTY", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "gstin": "24AABCJ1087G1ZT", + "billing_address": { + "id": "addr_DEVxnrfJblan6u", + "type": "billing_address", + "primary": true, + "line1": "84th Floor, Millennium Tower, ", + "line2": "Corner of 1st and 1st", + "zipcode": "560096", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "shipping_address": { + "id": "addr_DEVzXQePDJFIQJ", + "type": "billing_address", + "primary": true, + "line1": "Warehouse 1194, Warehouse Lane", + "line2": "Warehouse District", + "zipcode": "560128", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9000090000" + }, + "order_id": "order_DEW1rvumj0vSXG", + "payment_id": "pay_DEW3tZzpXkKWtO", + "status": "partially_paid", + "expire_by": 1569868199, + "issued_at": 1567686084, + "paid_at": null, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1567682379, + "terms": "Terms and Conditions for Webhooks", + "partial_payment": true, + "gross_amount": 425000, + "tax_amount": 54030, + "taxable_amount": 425000, + "amount": 479030, + "amount_paid": 40000, + "amount_due": 439030, + "first_payment_min_amount": null, + "currency": "MYR", + "description": "Invoice to Test Webhooks", + "notes": [], + "comment": "Customer Notes for Webhooks", + "short_url": "https: //rzp.io/i/01ZsZNj", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "invoice", + "group_taxes_discounts": false, + "supply_state_code": "29", + "user_id": "BFQ7uKsprYMg6p", + "created_at": 1567686084, + "idempotency_key": null + } + } + }, + "created_at": 1567686244 +} +``` + +### Invoice Paid + +```json: Netbanking +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "invoice.paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DEWHsM9ByjCjYS", + "entity": "payment", + "amount": 479030, + "currency": "INR", + "status": "captured", + "order_id": "order_DEWHZoU57pgISd", + "invoice_id": "inv_DEWHZlfIcdVIXL", + "international": false, + "method": "netbanking", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_DEWHZlfIcdVIXL", + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 11305, + "tax": 1724, + "error_code": null, + "error_description": null, + "created_at": 1567686993 + } + }, + "order": { + "entity": { + "id": "order_DEWHZoU57pgISd", + "entity": "order", + "amount": 479030, + "amount_paid": 479030, + "amount_due": 0, + "currency": "INR", + "receipt": "15", + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1567686976 + } + }, + "invoice": { + "entity": { + "id": "inv_DEWHZlfIcdVIXL", + "entity": "invoice", + "receipt": "15", + "invoice_number": "15", + "customer_id": "cust_BtQNqzmBlAXyTY", + "customer_details": { + "id": "cust_BtQNqzmBlAXyTY", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "gstin": "24AABCJ1087G1ZT", + "billing_address": { + "id": "addr_DEVxnrfJblan6u", + "type": "billing_address", + "primary": true, + "line1": "84th Floor, Millennium Tower, ", + "line2": "Corner of 1st and 1st", + "zipcode": "560096", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "shipping_address": { + "id": "addr_DEVzXQePDJFIQJ", + "type": "billing_address", + "primary": true, + "line1": "Warehouse 1194, Warehouse Lane", + "line2": "Warehouse District", + "zipcode": "560128", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9000090000" + }, + "order_id": "order_DEWHZoU57pgISd", + "payment_id": "pay_DEWHsM9ByjCjYS", + "status": "paid", + "expire_by": 1569868199, + "issued_at": 1567686976, + "paid_at": 1567686996, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1567682379, + "terms": "Terms and COnditions for Webhooks", + "partial_payment": true, + "gross_amount": 425000, + "tax_amount": 54030, + "taxable_amount": 425000, + "amount": 479030, + "amount_paid": 479030, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "description": "Test Invoice for Webhooks", + "notes": [], + "comment": "Customer Notes for Webhooks", + "short_url": "https: //rzp.io/i/FLy8PgO", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "invoice", + "group_taxes_discounts": false, + "supply_state_code": "29", + "user_id": "BFQ7uKsprYMg6p", + "created_at": 1567686976, + "idempotency_key": null + } + } + }, + "created_at": 1567686996 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "invoice.paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DEWIeCt2lQRUyU", + "entity": "payment", + "amount": 479030, + "currency": "INR", + "status": "captured", + "order_id": "order_DEWIPFOPVdHecC", + "invoice_id": "inv_DEWIP9zGRk1Col", + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_DEWIP9zGRk1Col", + "card_id": "card_DEWIeHKnSgpsAU", + "card": { + "id": "card_DEWIeHKnSgpsAU", + "entity": "card", + "name": "Neelesh Verma", + "last4": "5558", + "network": "MasterCard", + "type": "credit", + "issuer": "KARB", + "international": false, + "emi": false + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 11305, + "tax": 1724, + "error_code": null, + "error_description": null, + "created_at": 1567687037 + } + }, + "order": { + "entity": { + "id": "order_DEWIPFOPVdHecC", + "entity": "order", + "amount": 479030, + "amount_paid": 479030, + "amount_due": 0, + "currency": "INR", + "receipt": "16", + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1567687023 + } + }, + "invoice": { + "entity": { + "id": "inv_DEWIP9zGRk1Col", + "entity": "invoice", + "receipt": "16", + "invoice_number": "16", + "customer_id": "cust_BtQNqzmBlAXyTY", + "customer_details": { + "id": "cust_BtQNqzmBlAXyTY", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "gstin": "24AABCJ1087G1ZT", + "billing_address": { + "id": "addr_DEVxnrfJblan6u", + "type": "billing_address", + "primary": true, + "line1": "84th Floor, Millennium Tower, ", + "line2": "Corner of 1st and 1st", + "zipcode": "560096", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "shipping_address": { + "id": "addr_DEVzXQePDJFIQJ", + "type": "billing_address", + "primary": true, + "line1": "Warehouse 1194, Warehouse Lane", + "line2": "Warehouse District", + "zipcode": "560128", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9000090000" + }, + "order_id": "order_DEWIPFOPVdHecC", + "payment_id": "pay_DEWIeCt2lQRUyU", + "status": "paid", + "expire_by": 1569868199, + "issued_at": 1567687023, + "paid_at": 1567687038, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1567687004, + "terms": "Terms and Conditions for Webhooks", + "partial_payment": true, + "gross_amount": 425000, + "tax_amount": 54030, + "taxable_amount": 425000, + "amount": 479030, + "amount_paid": 479030, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "description": "Test Invoice for Webhooks", + "notes": [], + "comment": "Customer Notes for Webhooks", + "short_url": "https: //rzp.io/i/LgHpOdn", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "invoice", + "group_taxes_discounts": false, + "supply_state_code": "29", + "user_id": "BFQ7uKsprYMg6p", + "created_at": 1567687023, + "idempotency_key": null + } + } + }, + "created_at": 1567687038 +} +```json: Wallets +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "invoice.paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DEWJLgOQtiU34c", + "entity": "payment", + "amount": 479030, + "currency": "INR", + "status": "captured", + "order_id": "order_DEWJ5gDtAXLTbW", + "invoice_id": "inv_DEWJ5d9IgiW10t", + "international": false, + "method": "wallet", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_DEWJ5d9IgiW10t", + "card_id": null, + "bank": null, + "wallet": "payzapp", + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 11305, + "tax": 1724, + "error_code": null, + "error_description": null, + "created_at": 1567687077 + } + }, + "order": { + "entity": { + "id": "order_DEWJ5gDtAXLTbW", + "entity": "order", + "amount": 479030, + "amount_paid": 479030, + "amount_due": 0, + "currency": "INR", + "receipt": "17", + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1567687062 + } + }, + "invoice": { + "entity": { + "id": "inv_DEWJ5d9IgiW10t", + "entity": "invoice", + "receipt": "17", + "invoice_number": "17", + "customer_id": "cust_BtQNqzmBlAXyTY", + "customer_details": { + "id": "cust_BtQNqzmBlAXyTY", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "gstin": "24AABCJ1087G1ZT", + "billing_address": { + "id": "addr_DEVxnrfJblan6u", + "type": "billing_address", + "primary": true, + "line1": "84th Floor, Millennium Tower, ", + "line2": "Corner of 1st and 1st", + "zipcode": "560096", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "shipping_address": { + "id": "addr_DEVzXQePDJFIQJ", + "type": "billing_address", + "primary": true, + "line1": "Warehouse 1194, Warehouse Lane", + "line2": "Warehouse District", + "zipcode": "560128", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9000090000" + }, + "order_id": "order_DEWJ5gDtAXLTbW", + "payment_id": "pay_DEWJLgOQtiU34c", + "status": "paid", + "expire_by": 1569868199, + "issued_at": 1567687062, + "paid_at": 1567687078, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1567687045, + "terms": "Terms and Conditions for Webhooks", + "partial_payment": true, + "gross_amount": 425000, + "tax_amount": 54030, + "taxable_amount": 425000, + "amount": 479030, + "amount_paid": 479030, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "description": "Test Invoice for Webhooks", + "notes": [], + "comment": "Customer Notes for Webhooks", + "short_url": "https: //rzp.io/i/I6sb9cZ", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "invoice", + "group_taxes_discounts": false, + "supply_state_code": "29", + "user_id": "BFQ7uKsprYMg6p", + "created_at": 1567687062, + "idempotency_key": null + } + } + }, + "created_at": 1567687078 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "invoice.paid", + "contains": [ + "payment", + "order", + "invoice" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DEWKEXio2yzuPg", + "entity": "payment", + "amount": 479030, + "currency": "INR", + "status": "captured", + "order_id": "order_DEWJo825vIWdS2", + "invoice_id": "inv_DEWJo2pglrMHZw", + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Invoice #inv_DEWJo2pglrMHZw", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 11305, + "tax": 1724, + "error_code": null, + "error_description": null, + "created_at": 1567687127 + } + }, + "order": { + "entity": { + "id": "order_DEWJo825vIWdS2", + "entity": "order", + "amount": 479030, + "amount_paid": 479030, + "amount_due": 0, + "currency": "INR", + "receipt": "18", + "offer_id": null, + "offers": { + "entity": "collection", + "count": 0, + "items": [] + }, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1567687103 + } + }, + "invoice": { + "entity": { + "id": "inv_DEWJo2pglrMHZw", + "entity": "invoice", + "receipt": "18", + "invoice_number": "18", + "customer_id": "cust_BtQNqzmBlAXyTY", + "customer_details": { + "id": "cust_BtQNqzmBlAXyTY", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "gstin": "24AABCJ1087G1ZT", + "billing_address": { + "id": "addr_DEVxnrfJblan6u", + "type": "billing_address", + "primary": true, + "line1": "84th Floor, Millennium Tower, ", + "line2": "Corner of 1st and 1st", + "zipcode": "560096", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "shipping_address": { + "id": "addr_DEVzXQePDJFIQJ", + "type": "billing_address", + "primary": true, + "line1": "Warehouse 1194, Warehouse Lane", + "line2": "Warehouse District", + "zipcode": "560128", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9000090000" + }, + "order_id": "order_DEWJo825vIWdS2", + "payment_id": "pay_DEWKEXio2yzuPg", + "status": "paid", + "expire_by": 1569868199, + "issued_at": 1567687103, + "paid_at": 1567687127, + "cancelled_at": null, + "expired_at": null, + "sms_status": "sent", + "email_status": "sent", + "date": 1567687087, + "terms": "Terms and Conditions for Webhooks", + "partial_payment": true, + "gross_amount": 425000, + "tax_amount": 54030, + "taxable_amount": 425000, + "amount": 479030, + "amount_paid": 479030, + "amount_due": 0, + "first_payment_min_amount": null, + "currency": "INR", + "description": "Test Invoice for Webhooks", + "notes": [], + "comment": "Customer Notes for Webhooks", + "short_url": "https: //rzp.io/i/cY9S1ot", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "invoice", + "group_taxes_discounts": false, + "supply_state_code": "29", + "user_id": "BFQ7uKsprYMg6p", + "created_at": 1567687103, + "idempotency_key": null + } + } + }, + "created_at": 1567687127 +} +``` + +### Invoice Expired + +```json: invoice.expired +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "invoice.expired", + "contains": [ + "invoice" + ], + "payload": { + "invoice": { + "entity": { + "id": "inv_DEWZrK1R4nmaXu", + "entity": "invoice", + "receipt": "19", + "invoice_number": "19", + "customer_id": "cust_BtQNqzmBlAXyTY", + "customer_details": { + "id": "cust_BtQNqzmBlAXyTY", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9000090000", + "gstin": "24AABCJ1087G1ZT", + "billing_address": { + "id": "addr_DEVxnrfJblan6u", + "type": "billing_address", + "primary": true, + "line1": "84th Floor, Millennium Tower, ", + "line2": "Corner of 1st and 1st", + "zipcode": "560096", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "shipping_address": { + "id": "addr_DEVzXQePDJFIQJ", + "type": "billing_address", + "primary": true, + "line1": "Warehouse 1194, Warehouse Lane", + "line2": "Warehouse District", + "zipcode": "560128", + "city": "Bangalore", + "state": "Karnataka", + "country": "in" + }, + "customer_name": "Gaurav Kumar", + "customer_email": "gaurav.kumar@example.com", + "customer_contact": "9000090000" + }, + "order_id": "order_DEWZrMr2yNJek4", + "payment_id": null, + "status": "expired", + "expire_by": 1567708199, + "issued_at": 1567688015, + "paid_at": null, + "cancelled_at": null, + "expired_at": 1567708384, + "sms_status": "sent", + "email_status": "sent", + "date": 1567687757, + "terms": "Terms and Conditions for Webhooks", + "partial_payment": true, + "gross_amount": 425000, + "tax_amount": 54030, + "taxable_amount": 425000, + "amount": 479030, + "amount_paid": 0, + "amount_due": 479030, + "first_payment_min_amount": null, + "currency": "INR", + "description": "Test Invoice for Webhooks", + "notes": [], + "comment": "Customer Notes for Webhooks", + "short_url": "https: //rzp.io/i/ZF7Ljqp", + "view_less": true, + "billing_start": null, + "billing_end": null, + "type": "invoice", + "group_taxes_discounts": false, + "supply_state_code": "29", + "subscription_status": null, + "user_id": "BFQ7uKsprYMg6p", + "created_at": 1567688015, + "idempotency_key": null + } + } + }, + "created_at": 1567708384 +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. +> +> - While generating a signature at your end, ensure that the webhook body is passed as an argument in the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> diff --git a/llm-content/webhooks/orders.md b/llm-content/webhooks/orders.md new file mode 100644 index 00000000..596ee3ce --- /dev/null +++ b/llm-content/webhooks/orders.md @@ -0,0 +1,287 @@ +--- +title: Orders Webhook Events +description: List of Orders webhook events along with sample payloads. +--- + +# Orders Webhook Events + +Order creation is an important step as it helps you associate every payment with an order, thus preventing multiple payments. + +## List of Orders Webhook Events + +The table below lists the webhook events available for orders. + +Webhook Event | Description +--- +`order.paid` | Triggered when an order is successfully paid. + +### Comparison: order.paid vs. payment.captured + +Orders and payments go hand-in-hand. Once a payment is captured, the order is marked paid. This is reflected in the `order.paid` and `payment.captured` webhook events as well. These events are triggered when the payment associated with the order is captured. + +`order.paid` Webhook Event | `payment.captured` Webhook Event +--- +This event is triggered when a customer completes the checkout process and the order's status changes to `paid`. | This event is triggered when the payment is successfully captured. +--- +This payload includes both order and payment entities, making all relevant information available in a single payload. | This payload only contains the payment entity, providing details specific to the transaction, such as the amount, currency, and payment method. + +## Sample Payloads + +Given below is the sample payload for orders webhook event. + +### Order Paid + +```json: Netbanking +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "order.paid", + "contains": [ + "payment", + "order" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DESlfW9H8K9uqM", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_DESlLckIVRkHWj", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "notes": [], + "fee": 2, + "tax": 0, + "error_code": null, + "error_description": null, + "created_at": 1567674599 + } + }, + "order": { + "entity": { + "id": "order_DESlLckIVRkHWj", + "entity": "order", + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "currency": "INR", + "receipt": "rcptid #1", + "offer_id": null, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1567674581 + } + } + }, + "created_at": 1567674606 +} +```json: Card +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "order.paid", + "contains": [ + "payment", + "order" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DESp9bgForNoUd", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_DESoU0U4ikYA19", + "invoice_id": null, + "international": false, + "method": "card", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": "card_DESp9fNnu0RoNc", + "card": { + "id": "card_DESp9fNnu0RoNc", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "0153", + "network": "Visa", + "type": "debit", + "issuer": null, + "international": false, + "emi": false + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "notes": [], + "fee": 2, + "tax": 0, + "error_code": null, + "error_description": null, + "created_at": 1567674797 + } + }, + "order": { + "entity": { + "id": "order_DESoU0U4ikYA19", + "entity": "order", + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "currency": "INR", + "receipt": "rcptid #1", + "offer_id": null, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1567674759 + } + } + }, + "created_at": 1567674804 +} +```json: Wallets +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "order.paid", + "contains": [ + "payment", + "order" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DEStK8twGApHtW", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_DESso0U9bpuzQc", + "invoice_id": null, + "international": false, + "method": "wallet", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": "payzapp", + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "notes": [], + "fee": 2, + "tax": 0, + "error_code": null, + "error_description": null, + "created_at": 1567675034 + } + }, + "order": { + "entity": { + "id": "order_DESso0U9bpuzQc", + "entity": "order", + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "currency": "INR", + "receipt": "rcptid #1", + "offer_id": null, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1567675004 + } + } + }, + "created_at": 1567675037 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "order.paid", + "contains": [ + "payment", + "order" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DESyzxuld02Zul", + "entity": "payment", + "amount": 100, + "currency": "INR", + "status": "captured", + "order_id": "order_DESxiijbl9xjDB", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "notes": [], + "fee": 2, + "tax": 0, + "error_code": null, + "error_description": null, + "created_at": 1567675356 + } + }, + "order": { + "entity": { + "id": "order_DESxiijbl9xjDB", + "entity": "order", + "amount": 100, + "amount_paid": 100, + "amount_due": 0, + "currency": "INR", + "receipt": "rcptid #1", + "offer_id": null, + "status": "paid", + "attempts": 1, + "notes": [], + "created_at": 1567675283 + } + } + }, + "created_at": 1567675356 +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. +> +> - While generating a signature at your end, ensure that the webhook body is passed as an argument in the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> diff --git a/llm-content/webhooks/partners.md b/llm-content/webhooks/partners.md new file mode 100644 index 00000000..81108914 --- /dev/null +++ b/llm-content/webhooks/partners.md @@ -0,0 +1,58 @@ +--- +title: Sub-Merchant Onboarding Webhooks - Sample Payload +description: Sample payload for sub-merchant onboarding webhook events. +--- + +# Sub-Merchant Onboarding Webhooks - Sample Payload + +Following is the list of currently available sample payloads for Sub-Merchant Onboarding Events: + +## Onboarded Using APIs + +List of events if sub-merchant is onboarded using APIs: + +Status | Event +--- +Activated | - [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/activated.md#product-payment-gateway-activated) +- [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/activated.md#product-payment-link-activated) +- [Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/activated.md#account-activated) + +--- +Needs Clarification | - [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/needs-clarification.md#product-payment-gateway-needs-clarification) +- [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/needs-clarification.md#product-payment-link-needs-clarification) +- [Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/needs-clarification.md#account-needs-clarification) + +--- +Under Review | - [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/under-review.md#product-payment-gateway-under-review) +- [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/under-review.md#product-payment-link-under-review) +- [Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/under-review.md#account-under-review) + +--- +Rejected | - [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/rejected.md#product-payment-gateway-rejected) +- [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/rejected.md#product-payment-link-rejected) +- [Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/rejected.md#account-rejected) + +--- +Activated KYC Pending | - [Payment Gateway](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/activated-kyc-pending.md#product-payment-gateway-activated-kyc-pending) +- [Payment Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/activated-kyc-pending.md#product-payment-link-activated-kyc-pending) +- [Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/activated-kyc-pending.md#account-activated-kyc-pending) + +## Onboarded Using Dashboard + +List of events if sub-merchant is onboarded using the Dashboard: + +Status | Event +--- +Instantly Activated | [Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/instantly-activated.md#account-instantly-activated) +--- +Payment Enabled | [Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/payment-enabled.md#account-payment-enabled) +--- +Funds On Hold | [Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/funds-onhold.md) +--- +Under Review | [Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/under-review.md#account-under-review) +--- +Needs Clarification | [Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/needs-clarification.md#account-needs-clarification) +--- +Activated | [Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/activated.md#account-activated) +--- +Suspended | [Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/partners/suspended.md#account-suspended) diff --git a/llm-content/webhooks/partners/activated-kyc-pending.md b/llm-content/webhooks/partners/activated-kyc-pending.md new file mode 100644 index 00000000..29b67150 --- /dev/null +++ b/llm-content/webhooks/partners/activated-kyc-pending.md @@ -0,0 +1,256 @@ +--- +title: Sample Payloads When Status is Activated KYC Pending +description: List of webhook events and associated payloads when the account is in activated KYC pending state. +--- + +# Sample Payloads When Status is Activated KYC Pending + +> **INFO** +> +> +> **Handy Tips** +> +> This state is applicable only for no-document onboarded merchants onboarded via Onboarding APIs. +> + +## Product Payment Gateway Activated KYC Pending + +```json: Payment Gateway Activated KYC Pending +{ + "entity": "event", + "account_id": "acc_JI0zziTMTmOmSI", + "event": "product.payment_gateway.activated_kyc_pending", + "contains": [ + "merchant_product" + ], + "payload": { + "merchant_product": { + "entity": { + "id": "acc_prd_JI1B2u6icYerAJ", + "merchant_id": "acc_JI0zziTMTmOmSI", + "activation_status": "activated_kyc_pending" + }, + "data": [] + } + }, + "created_at": 1649674594 +} +``` + +## Product Payment Link Activated KYC Pending + +```json: Payment Link Activated KYC Pending +{ + "entity": "event", + "account_id": "acc_JNuCwk8oQ59DKR", + "event": "product.payment_links.activated_kyc_pending", + "contains": [ + "merchant_product" + ], + "payload": { + "merchant_product": { + "entity": { + "id": "acc_prd_JNuIbL01ZYCXas", + "merchant_id": "acc_JNuCwk8oQ59DKR", + "activation_status": "activated_kyc_pending" + }, + "data": [] + } + }, + "created_at": 1650965998 +} +``` + +## Account Activated KYC Pending + +```json: Account Activated KYC Pending +{ + "entity": "event", + "account_id": "acc_JNraR8O85H1atC", + "event": "account.activated_kyc_pending", + "contains": [ + "account" + ], + "payload": { + "account": { + "entity": { + "id": "JNraR8O85H1atC", + "entity": "merchant", + "name": "Test account", + "email": "gaurav.kumar@example.com", + "activated": true, + "activated_at": 1650951410, + "live": true, + "hold_funds": false, + "pricing_plan_id": "C4uidYkQYsDdgX", + "parent_id": null, + "website": "", + "category": "8211", + "category2": "pvt_education", + "international": false, + "linked_account_kyc": false, + "has_key_access": false, + "fee_bearer": "platform", + "fee_model": "prepaid", + "refund_source": "balance", + "billing_label": "Test account", + "receipt_email_enabled": true, + "receipt_email_trigger_event": "authorized", + "transaction_report_email": [ + "gaurav.kumar@example.com" + ], + "invoice_label_field": null, + "channel": "axis2", + "convert_currency": false, + "max_payment_amount": 50000000, + "max_international_payment_amount": null, + "auto_refund_delay": null, + "auto_capture_late_auth": false, + "brand_color": null, + "handle": null, + "risk_rating": 3, + "risk_threshold": 8, + "partner_type": null, + "created_at": 1650949582, + "updated_at": 1650953803, + "suspended_at": null, + "archived_at": null, + "icon_url": null, + "logo_url": null, + "org_id": "100000razorpay", + "notes": [], + "whitelisted_ips_live": [], + "whitelisted_ips_test": [], + "whitelisted_domains": [], + "merchant_detail": { + "contact_name": "Test webhook", + "contact_email": "gaurav.kumar@example.com", + "contact_mobile": "9000090000", + "contact_landline": null, + "business_type": "4", + "business_name": "Test account", + "business_description": null, + "business_dba": "Test account", + "business_website": "", + "business_international": false, + "business_paymentdetails": null, + "business_registered_address": "Kormangala ", + "business_registered_address_l2": null, + "business_registered_country": null, + "business_registered_state": "KA", + "business_registered_city": "Bengaluru", + "business_registered_district": null, + "business_registered_pin": "560068", + "business_operation_address": "Kormangala ", + "business_operation_address_l2": null, + "business_operation_country": null, + "business_operation_state": "KA", + "business_operation_city": "Bengaluru", + "business_operation_district": null, + "business_operation_pin": "560068", + "promoter_pan": "DAZPK0968P", + "promoter_pan_name": "Shivam Kumar", + "business_doe": null, + "gstin": null, + "p_gstin": null, + "company_cin": "L21091KA2019OPC141331", + "company_pan": "ABCTY1234D", + "company_pan_name": null, + "business_category": "education", + "business_subcategory": "schools", + "business_model": "Please give a brief description of the nature of your business. Please include examples of products you sell, the business category you operate under", + "transaction_volume": null, + "transaction_value": null, + "website_about": null, + "website_contact": null, + "website_privacy": null, + "website_terms": null, + "website_refund": null, + "website_pricing": null, + "website_login": null, + "steps_finished": "[]", + "activation_progress": 80, + "locked": true, + "activation_status": "activated_kyc_pending", + "bank_details_verification_status": "initiated", + "poa_verification_status": null, + "poi_verification_status": "initiated", + "clarification_mode": "email", + "archived": 0, + "allowed_next_activation_statuses": [], + "reviewer_id": null, + "issue_fields": "aadhar_front,aadhar_back", + "issue_fields_reason": "Invalid doc", + "internal_notes": "Invalid doc", + "marketplace_activation_status": null, + "virtual_accounts_activation_status": null, + "subscriptions_activation_status": null, + "submitted": true, + "submitted_at": 1650951410, + "transaction_report_email": null, + "bank_account_number": "1234567890", + "bank_account_name": "Shivam Kumar", + "bank_account_type": null, + "bank_branch": null, + "bank_branch_ifsc": "HDFC0000186", + "bank_beneficiary_address1": null, + "bank_beneficiary_address2": null, + "bank_beneficiary_address3": null, + "bank_beneficiary_city": null, + "bank_beneficiary_state": null, + "bank_beneficiary_pin": null, + "role": null, + "department": null, + "created_at": 1650949582, + "updated_at": 1650953803, + "activation_flow": "whitelist", + "international_activation_flow": "whitelist", + "live_transaction_done": 0, + "kyc_clarification_reasons": null, + "kyc_additional_details": null, + "additional_websites": [], + "estd_year": null, + "authorized_signatory_residential_address": null, + "authorized_signatory_dob": null, + "platform": null, + "fund_account_validation_id": null, + "gstin_verification_status": null, + "date_of_establishment": null, + "activation_form_milestone": "L2", + "company_pan_verification_status": "initiated", + "cin_verification_status": "initiated", + "company_pan_doc_verification_status": "initiated", + "personal_pan_doc_verification_status": null, + "bank_details_doc_verification_status": null, + "msme_doc_verification_status": null, + "shop_establishment_number": null, + "shop_establishment_verification_status": null, + "client_applications": [], + "business_suggested_pin": null, + "business_suggested_address": null, + "fraud_type": null, + "bas_business_id": null, + "iec_code": null + }, + "fee_credits_threshold": null, + "amount_credits_threshold": null, + "refund_credits_threshold": null, + "balance_threshold": null, + "display_name": null, + "activation_source": "primary", + "business_banking": false, + "second_factor_auth": false, + "restricted": false, + "default_refund_speed": "normal", + "partnership_url": null, + "external_id": null, + "product_international": "0000000000", + "signup_source": null, + "dcc_markup_percentage": 7, + "purpose_code": null + } + } + }, + "created_at": 1650953803 +} +``` diff --git a/llm-content/webhooks/partners/activated.md b/llm-content/webhooks/partners/activated.md new file mode 100644 index 00000000..ec45ab00 --- /dev/null +++ b/llm-content/webhooks/partners/activated.md @@ -0,0 +1,256 @@ +--- +title: Sample Payloads When Status is Activated +description: List of webhook events and associated payloads when the account is in activated state. +--- + +# Sample Payloads When Status is Activated + +## Product Payment Gateway Activated + +```json: Payment Gateway Activated +{ + "entity": "event", + "account_id": "acc_JI0zziTMTmOmSI", + "event": "product.payment_gateway.activated", + "contains": [ + "merchant_product" + ], + "payload": { + "merchant_product": { + "entity": { + "id": "acc_prd_JI1B2u6icYerAJ", + "merchant_id": "acc_JI0zziTMTmOmSI", + "activation_status": "activated" + }, + "data": [] + } + }, + "created_at": 1649674594 +} +``` + +## Product Payment Link Activated + +```json: Payment Link Activated +{ + "entity": "event", + "account_id": "acc_JNuCwk8oQ59DKR", + "event": "product.payment_links.activated", + "contains": [ + "merchant_product" + ], + "payload": { + "merchant_product": { + "entity": { + "id": "acc_prd_JNuIbL01ZYCXas", + "merchant_id": "acc_JNuCwk8oQ59DKR", + "activation_status": "activated" + }, + "data": [] + } + }, + "created_at": 1650965998 +} +``` + +## Account Activated + +> **WARN** +> +> +> **Watch Out!** +> +> Refer to the [Appendix](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/partners/aggregators/onboarding-api/appendix.md#business-type) for `business_type` parameter values. +> + +```json: Account Activated +{ + "entity": "event", + "account_id": "acc_JNraR8O85H1atC", + "event": "account.activated", + "contains": [ + "account" + ], + "payload": { + "account": { + "entity": { + "id": "JNraR8O85H1atC", + "entity": "merchant", + "name": "Test account", + "email": "gaurav.kumar@example.com", + "activated": true, + "activated_at": 1650951410, + "live": true, + "hold_funds": false, + "pricing_plan_id": "C4uidYkQYsDdgX", + "parent_id": null, + "website": "", + "category": "8211", + "category2": "pvt_education", + "international": false, + "linked_account_kyc": false, + "has_key_access": false, + "fee_bearer": "platform", + "fee_model": "prepaid", + "refund_source": "balance", + "billing_label": "Test account", + "receipt_email_enabled": true, + "receipt_email_trigger_event": "authorized", + "transaction_report_email": [ + "gaurav.kumar@example.com" + ], + "invoice_label_field": null, + "channel": "axis2", + "convert_currency": false, + "max_payment_amount": 50000000, + "max_international_payment_amount": null, + "auto_refund_delay": null, + "auto_capture_late_auth": false, + "brand_color": null, + "handle": null, + "risk_rating": 3, + "risk_threshold": 8, + "partner_type": null, + "created_at": 1650949582, + "updated_at": 1650953803, + "suspended_at": null, + "archived_at": null, + "icon_url": null, + "logo_url": null, + "org_id": "100000razorpay", + "notes": [], + "whitelisted_ips_live": [], + "whitelisted_ips_test": [], + "whitelisted_domains": [], + "merchant_detail": { + "contact_name": "Test webhook", + "contact_email": "gaurav.kumar@example.com", + "contact_mobile": "9000090000", + "contact_landline": null, + "business_type": "4", + "business_name": "Test account", + "business_description": null, + "business_dba": "Test account", + "business_website": "", + "business_international": false, + "business_paymentdetails": null, + "business_registered_address": "Kormangala ", + "business_registered_address_l2": null, + "business_registered_country": null, + "business_registered_state": "KA", + "business_registered_city": "Bengaluru", + "business_registered_district": null, + "business_registered_pin": "560068", + "business_operation_address": "Kormangala ", + "business_operation_address_l2": null, + "business_operation_country": null, + "business_operation_state": "KA", + "business_operation_city": "Bengaluru", + "business_operation_district": null, + "business_operation_pin": "560068", + "promoter_pan": "DAZPK0968P", + "promoter_pan_name": "Shivam Kumar", + "business_doe": null, + "gstin": null, + "p_gstin": null, + "company_cin": "L21091KA2019OPC141331", + "company_pan": "ABCTY1234D", + "company_pan_name": null, + "business_category": "education", + "business_subcategory": "schools", + "business_model": "Please give a brief description of the nature of your business. Please include examples of products you sell, the business category you operate under", + "transaction_volume": null, + "transaction_value": null, + "website_about": null, + "website_contact": null, + "website_privacy": null, + "website_terms": null, + "website_refund": null, + "website_pricing": null, + "website_login": null, + "steps_finished": "[]", + "activation_progress": 80, + "locked": true, + "activation_status": "activated", + "bank_details_verification_status": "initiated", + "poa_verification_status": null, + "poi_verification_status": "initiated", + "clarification_mode": "email", + "archived": 0, + "allowed_next_activation_statuses": [], + "reviewer_id": null, + "issue_fields": "aadhar_front,aadhar_back", + "issue_fields_reason": "Invalid doc", + "internal_notes": "Invalid doc", + "marketplace_activation_status": null, + "virtual_accounts_activation_status": null, + "subscriptions_activation_status": null, + "submitted": true, + "submitted_at": 1650951410, + "transaction_report_email": null, + "bank_account_number": "1234567890", + "bank_account_name": "Shivam Kumar", + "bank_account_type": null, + "bank_branch": null, + "bank_branch_ifsc": "HDFC0000186", + "bank_beneficiary_address1": null, + "bank_beneficiary_address2": null, + "bank_beneficiary_address3": null, + "bank_beneficiary_city": null, + "bank_beneficiary_state": null, + "bank_beneficiary_pin": null, + "role": null, + "department": null, + "created_at": 1650949582, + "updated_at": 1650953803, + "activation_flow": "whitelist", + "international_activation_flow": "whitelist", + "live_transaction_done": 0, + "kyc_clarification_reasons": null, + "kyc_additional_details": null, + "additional_websites": [], + "estd_year": null, + "authorized_signatory_residential_address": null, + "authorized_signatory_dob": null, + "platform": null, + "fund_account_validation_id": null, + "gstin_verification_status": null, + "date_of_establishment": null, + "activation_form_milestone": "L2", + "company_pan_verification_status": "initiated", + "cin_verification_status": "initiated", + "company_pan_doc_verification_status": "initiated", + "personal_pan_doc_verification_status": null, + "bank_details_doc_verification_status": null, + "msme_doc_verification_status": null, + "shop_establishment_number": null, + "shop_establishment_verification_status": null, + "client_applications": [], + "business_suggested_pin": null, + "business_suggested_address": null, + "fraud_type": null, + "bas_business_id": null, + "iec_code": null + }, + "fee_credits_threshold": null, + "amount_credits_threshold": null, + "refund_credits_threshold": null, + "balance_threshold": null, + "display_name": null, + "activation_source": "primary", + "business_banking": false, + "second_factor_auth": false, + "restricted": false, + "default_refund_speed": "normal", + "partnership_url": null, + "external_id": null, + "product_international": "0000000000", + "signup_source": null, + "dcc_markup_percentage": 7, + "purpose_code": null + } + } + }, + "created_at": 1650953803 +} +``` diff --git a/llm-content/webhooks/partners/funds-onhold.md b/llm-content/webhooks/partners/funds-onhold.md new file mode 100644 index 00000000..b70991a2 --- /dev/null +++ b/llm-content/webhooks/partners/funds-onhold.md @@ -0,0 +1,333 @@ +--- +title: Sample Payloads When Status is Funds On Hold +description: List of webhook events and associated payloads when the account is in Funds On Hold state. +--- + +# Sample Payloads When Status is Funds On Hold + +## Account Funds On Hold + +```json: Account Funds On Hold +{ + "entity": "event", + "account_id": "acc_JNraR8O85H1atC", + "event": "account.funds_hold", + "contains": [ + "account" + ], + "payload": { + "account": { + "entity": { + "id": "JNraR8O85H1atC", + "entity": "merchant", + "name": "Test account", + "email": "gaurav.kumar@example.com", + "activated": true, + "activated_at": 1650949704, + "live": true, + "hold_funds": true, + "pricing_plan_id": "C4uidYkQYsDdgX", + "parent_id": null, + "website": "", + "category": "8211", + "category2": "pvt_education", + "international": false, + "linked_account_kyc": false, + "has_key_access": false, + "fee_bearer": "platform", + "fee_model": "prepaid", + "refund_source": "balance", + "billing_label": "Test account", + "receipt_email_enabled": true, + "receipt_email_trigger_event": "authorized", + "transaction_report_email": [ + "gaurav.kumar@example.com" + ], + "invoice_label_field": null, + "channel": "axis2", + "methods": { + "merchant_id": "JNraR8O85H1atC", + "card": 1, + "amex": false, + "disabled_banks": [ + "BBKM", + "BKID", + "COSB", + "DBSS", + "JSBP", + "NKGS", + "SYNB", + "TNSC", + "ABNA", + "TJSB", + "KJSB", + "MSNU", + "BDBL", + "BACB", + "KCCB", + "TBSB", + "SURY", + "ESAF", + "VARA", + "NESF", + "ZCBL", + "CIUB", + "FDRL", + "HSBC", + "HDFC", + "SBIN", + "SBBJ", + "SBHY", + "SBMY", + "SBTR", + "STBP", + "LAVB_C", + "UTIB_C", + "IBKL_C", + "YESB_C", + "ANDB_C", + "RATN_C", + "DLXB_C", + "SVCB_C", + "BARB_C", + "PUNB_C", + "ICIC_C", + "KKBK_C", + "HDFC_C" + ], + "paytm": false, + "payzapp": true, + "payumoney": true, + "airtelmoney": true, + "mobikwik": true, + "olamoney": true, + "jiomoney": true, + "sbibuddy": true, + "openwallet": false, + "razorpaywallet": false, + "mpesa": true, + "emi": [ + "credit", + "debit" + ], + "upi": true, + "upi_type": { + "collect": 1, + "intent": 1 + }, + "aeps": false, + "emandate": false, + "nach": false, + "netbanking": true, + "debit_card": true, + "credit_card": true, + "prepaid_card": true, + "card_subtype": 3, + "entity": "methods", + "bank_transfer": true, + "amazonpay": false, + "cardless_emi": true, + "card_networks": { + "AMEX": 0, + "DICL": 0, + "MC": 1, + "MAES": 1, + "VISA": 1, + "JCB": 0, + "RUPAY": 1, + "BAJAJ": 0 + }, + "phonepe": false, + "phonepeswitch": true, + "paylater": true, + "paypal": false, + "apps": { + "cred": 0, + "twid": 0, + "trustly": 0, + "poli": 0 + }, + "debit_emi_providers": { + "HDFC": 1 + }, + "itzcash": false, + "oxigen": false, + "amexeasyclick": false, + "paycash": false, + "citibankrewards": false, + "cod": false, + "offline": false + }, + "convert_currency": false, + "max_payment_amount": 50000000, + "max_international_payment_amount": null, + "auto_refund_delay": null, + "auto_capture_late_auth": false, + "brand_color": null, + "handle": null, + "risk_rating": 3, + "risk_threshold": 8, + "partner_type": null, + "created_at": 1650949582, + "updated_at": 1650949670, + "suspended_at": null, + "archived_at": null, + "icon_url": null, + "logo_url": null, + "org_id": "100000razorpay", + "notes": [], + "whitelisted_ips_live": [], + "whitelisted_ips_test": [], + "whitelisted_domains": [], + "merchant_detail": { + "contact_name": "Test webhook", + "contact_email": "gaurav.kumar@example.com", + "contact_mobile": "9000090000", + "contact_landline": null, + "business_type": "4", + "business_name": "Test account", + "business_description": null, + "business_dba": "Test account", + "business_website": "", + "business_international": false, + "business_paymentdetails": null, + "business_registered_address": "Kormangala ", + "business_registered_address_l2": null, + "business_registered_country": null, + "business_registered_state": "KA", + "business_registered_city": "Bengaluru", + "business_registered_district": null, + "business_registered_pin": "560068", + "business_operation_address": "Kormangala ", + "business_operation_address_l2": null, + "business_operation_country": null, + "business_operation_state": "KA", + "business_operation_city": "Bengaluru", + "business_operation_district": null, + "business_operation_pin": "560068", + "promoter_pan": "DAZPK0968P", + "promoter_pan_name": "Gaurav Kumar", + "business_doe": null, + "gstin": null, + "p_gstin": null, + "company_cin": "L21091KA2019OPC141331", + "company_pan": "ABCTY1234D", + "company_pan_name": null, + "business_category": "education", + "business_subcategory": "schools", + "business_model": "Please give a brief description of the nature of your business. Please include examples of products you sell, the business category you operate under", + "transaction_volume": null, + "transaction_value": null, + "website_about": null, + "website_contact": null, + "website_privacy": null, + "website_terms": null, + "website_refund": null, + "website_pricing": null, + "website_login": null, + "steps_finished": "[]", + "activation_progress": 60, + "locked": false, + "activation_status": "instantly_activated", + "bank_details_verification_status": null, + "poa_verification_status": null, + "poi_verification_status": "initiated", + "clarification_mode": null, + "archived": 0, + "allowed_next_activation_statuses": [ + "under_review", + "activated", + "activated_mcc_pending" + ], + "marketplace_activation_status": null, + "virtual_accounts_activation_status": null, + "subscriptions_activation_status": null, + "submitted": false, + "submitted_at": null, + "transaction_report_email": null, + "bank_account_number": null, + "bank_account_name": null, + "bank_account_type": null, + "bank_branch": null, + "bank_branch_ifsc": null, + "bank_beneficiary_address1": null, + "bank_beneficiary_address2": null, + "bank_beneficiary_address3": null, + "bank_beneficiary_city": null, + "bank_beneficiary_state": null, + "bank_beneficiary_pin": null, + "role": null, + "department": null, + "stakeholder": { + "id": "sth_JNrc6LLF9Dkeyp", + "merchant_id": "JNraR8O85H1atC", + "email": null, + "name": "Gaurav Kumar", + "phone_primary": null, + "phone_secondary": null, + "director": null, + "executive": null, + "percentage_ownership": null, + "notes": [], + "poi_identification_number": "DAZPK0968P", + "poi_status": "pending", + "pan_doc_status": null, + "poa_status": null, + "aadhaar_esign_status": null, + "aadhaar_verification_with_pan_status": null, + "aadhaar_pin": null, + "aadhaar_linked": 1, + "bvs_probe_id": null + }, + "created_at": 1650949582, + "updated_at": 1650949705, + "activation_flow": "whitelist", + "international_activation_flow": "whitelist", + "live_transaction_done": 0, + "kyc_clarification_reasons": null, + "kyc_additional_details": null, + "additional_websites": [], + "estd_year": null, + "authorized_signatory_residential_address": null, + "authorized_signatory_dob": null, + "platform": null, + "fund_account_validation_id": null, + "gstin_verification_status": null, + "date_of_establishment": null, + "activation_form_milestone": "L1", + "company_pan_verification_status": "initiated", + "cin_verification_status": "initiated", + "company_pan_doc_verification_status": null, + "personal_pan_doc_verification_status": null, + "bank_details_doc_verification_status": null, + "msme_doc_verification_status": null, + "shop_establishment_number": null, + "shop_establishment_verification_status": null, + "client_applications": [], + "business_suggested_pin": null, + "business_suggested_address": null, + "fraud_type": null, + "bas_business_id": null, + "iec_code": null + }, + "fee_credits_threshold": null, + "amount_credits_threshold": null, + "refund_credits_threshold": null, + "balance_threshold": null, + "display_name": null, + "activation_source": null, + "business_banking": false, + "second_factor_auth": false, + "restricted": false, + "default_refund_speed": "normal", + "partnership_url": null, + "external_id": null, + "product_international": "0000000000", + "signup_source": null, + "purpose_code": null + } + } + }, + "created_at": 1650949670 +} +``` diff --git a/llm-content/webhooks/partners/funds-unhold.md b/llm-content/webhooks/partners/funds-unhold.md new file mode 100644 index 00000000..a144a52e --- /dev/null +++ b/llm-content/webhooks/partners/funds-unhold.md @@ -0,0 +1,200 @@ +--- +title: Sample Payloads When Status is Funds Unhold +description: List of webhook events and associated payloads when the account is in Funds Unhold state. +--- + +# Sample Payloads When Status is Funds Unhold + +## Account Funds Unhold + +```json: Account Funds Unhold +{ + "entity": "event", + "account_id": "acc_JNraR8O85H1atC", + "event": "account.funds_unhold", + "contains": [ + "account" + ], + "payload": { + "account": { + "entity": { + "id": "JNraR8O85H1atC", + "entity": "merchant", + "name": "Test account", + "email": "gaurav.kumar@example.com", + "activated": true, + "activated_at": 1650951410, + "live": true, + "hold_funds": false, + "pricing_plan_id": "C4uidYkQYsDdgX", + "parent_id": null, + "website": "", + "category": "8211", + "category2": "pvt_education", + "international": false, + "linked_account_kyc": false, + "has_key_access": false, + "fee_bearer": "platform", + "fee_model": "prepaid", + "refund_source": "balance", + "billing_label": "Test account", + "receipt_email_enabled": true, + "receipt_email_trigger_event": "authorized", + "transaction_report_email": [ + "gaurav.kumar@example.com" + ], + "invoice_label_field": null, + "channel": "axis2", + "convert_currency": false, + "max_payment_amount": 50000000, + "max_international_payment_amount": null, + "auto_refund_delay": null, + "auto_capture_late_auth": false, + "brand_color": null, + "handle": null, + "risk_rating": 3, + "risk_threshold": 8, + "partner_type": null, + "created_at": 1650949582, + "updated_at": 1650951410, + "suspended_at": null, + "archived_at": null, + "icon_url": null, + "logo_url": null, + "org_id": "100000razorpay", + "notes": [], + "whitelisted_ips_live": [], + "whitelisted_ips_test": [], + "whitelisted_domains": [], + "merchant_detail": { + "contact_name": "Test webhook", + "contact_email": "gaurav.kumar@example.com", + "contact_mobile": "9790058641", + "contact_landline": null, + "business_type": "4", + "business_name": "Test account", + "business_description": null, + "business_dba": "Test account", + "business_website": "", + "business_international": false, + "business_paymentdetails": null, + "business_registered_address": "Kormangala ", + "business_registered_address_l2": null, + "business_registered_country": null, + "business_registered_state": "KA", + "business_registered_city": "Bengaluru", + "business_registered_district": null, + "business_registered_pin": "560068", + "business_operation_address": "Kormangala ", + "business_operation_address_l2": null, + "business_operation_country": null, + "business_operation_state": "KA", + "business_operation_city": "Bengaluru", + "business_operation_district": null, + "business_operation_pin": "560068", + "promoter_pan": "DAZPK0968P", + "promoter_pan_name": "Gaurav Kumar", + "business_doe": null, + "gstin": null, + "p_gstin": null, + "company_cin": "L21091KA2019OPC141331", + "company_pan": "ABCTY1234D", + "company_pan_name": null, + "business_category": "education", + "business_subcategory": "schools", + "business_model": "Please give a brief description of the nature of your business. Please include examples of products you sell, the business category you operate under", + "transaction_volume": null, + "transaction_value": null, + "website_about": null, + "website_contact": null, + "website_privacy": null, + "website_terms": null, + "website_refund": null, + "website_pricing": null, + "website_login": null, + "steps_finished": "[]", + "activation_progress": 80, + "locked": true, + "activation_status": "activated", + "bank_details_verification_status": "initiated", + "poa_verification_status": null, + "poi_verification_status": "initiated", + "clarification_mode": "email", + "archived": 0, + "allowed_next_activation_statuses": [], + "reviewer_id": null, + "issue_fields": "aadhar_front,aadhar_back", + "issue_fields_reason": "Invalid doc", + "internal_notes": "Invalid doc", + "marketplace_activation_status": null, + "virtual_accounts_activation_status": null, + "subscriptions_activation_status": null, + "submitted": true, + "submitted_at": 1650951410, + "transaction_report_email": null, + "bank_account_number": "1234567890", + "bank_account_name": "Gaurav Kumar", + "bank_account_type": null, + "bank_branch": null, + "bank_branch_ifsc": "HDFC0000186", + "bank_beneficiary_address1": null, + "bank_beneficiary_address2": null, + "bank_beneficiary_address3": null, + "bank_beneficiary_city": null, + "bank_beneficiary_state": null, + "bank_beneficiary_pin": null, + "role": null, + "department": null, + "created_at": 1650949582, + "updated_at": 1650953803, + "activation_flow": "whitelist", + "international_activation_flow": "whitelist", + "live_transaction_done": 0, + "kyc_clarification_reasons": null, + "kyc_additional_details": null, + "additional_websites": [], + "estd_year": null, + "authorized_signatory_residential_address": null, + "authorized_signatory_dob": null, + "platform": null, + "fund_account_validation_id": null, + "gstin_verification_status": null, + "date_of_establishment": null, + "activation_form_milestone": "L2", + "company_pan_verification_status": "initiated", + "cin_verification_status": "initiated", + "company_pan_doc_verification_status": "initiated", + "personal_pan_doc_verification_status": null, + "bank_details_doc_verification_status": null, + "msme_doc_verification_status": null, + "shop_establishment_number": null, + "shop_establishment_verification_status": null, + "client_applications": [], + "business_suggested_pin": null, + "business_suggested_address": null, + "fraud_type": null, + "bas_business_id": null, + "iec_code": null + }, + "fee_credits_threshold": null, + "amount_credits_threshold": null, + "refund_credits_threshold": null, + "balance_threshold": null, + "display_name": null, + "activation_source": "primary", + "business_banking": false, + "second_factor_auth": false, + "restricted": false, + "default_refund_speed": "normal", + "partnership_url": null, + "external_id": null, + "product_international": "0000000000", + "signup_source": null, + "dcc_markup_percentage": 7, + "purpose_code": null + } + } + }, + "created_at": 1650951410 +} +``` diff --git a/llm-content/webhooks/partners/instantly-activated.md b/llm-content/webhooks/partners/instantly-activated.md new file mode 100644 index 00000000..a8e653d0 --- /dev/null +++ b/llm-content/webhooks/partners/instantly-activated.md @@ -0,0 +1,357 @@ +--- +title: Sample Payloads When Status is Instantly Activated +description: List of webhook events and associated payloads when the account is in Instantly Activated state. +--- + +# Sample Payloads When Status is Instantly Activated + +## Account Instantly Activated + +```json: Account Instantly Activated +{ + "entity": "event", + "account_id": "acc_JNraR8O85H1atC", + "event": "account.instantly_activated", + "contains": [ + "account" + ], + "payload": { + "account": { + "entity": { + "id": "JNraR8O85H1atC", + "entity": "merchant", + "name": "Test account", + "email": "gaurav.kumar@example.com", + "activated": true, + "activated_at": 1650949704, + "live": true, + "hold_funds": true, + "pricing_plan_id": "C4uidYkQYsDdgX", + "parent_id": null, + "website": "", + "category": "8211", + "category2": "pvt_education", + "international": false, + "linked_account_kyc": false, + "has_key_access": false, + "fee_bearer": "platform", + "fee_model": "prepaid", + "refund_source": "balance", + "billing_label": "Test account", + "receipt_email_enabled": true, + "receipt_email_trigger_event": "authorized", + "transaction_report_email": [ + "gaurav.kumar@example.com" + ], + "invoice_label_field": null, + "channel": "axis2", + "methods": { + "merchant_id": "JNraR8O85H1atC", + "card": 1, + "amex": false, + "disabled_banks": [ + "BBKM", + "BKID", + "COSB", + "DBSS", + "JSBP", + "NKGS", + "SYNB", + "TNSC", + "ABNA", + "TJSB", + "KJSB", + "MSNU", + "BDBL", + "BACB", + "KCCB", + "TBSB", + "SURY", + "ESAF", + "VARA", + "NESF", + "ZCBL", + "CIUB", + "FDRL", + "HSBC", + "HDFC", + "SBIN", + "SBBJ", + "SBHY", + "SBMY", + "SBTR", + "STBP", + "LAVB_C", + "UTIB_C", + "IBKL_C", + "YESB_C", + "ANDB_C", + "RATN_C", + "DLXB_C", + "SVCB_C", + "BARB_C", + "PUNB_C", + "ICIC_C", + "KKBK_C", + "HDFC_C" + ], + "paytm": false, + "payzapp": true, + "payumoney": true, + "airtelmoney": true, + "mobikwik": true, + "olamoney": true, + "jiomoney": true, + "sbibuddy": true, + "openwallet": false, + "razorpaywallet": false, + "mpesa": true, + "emi": [ + "credit", + "debit" + ], + "upi": true, + "upi_type": { + "collect": 1, + "intent": 1 + }, + "aeps": false, + "emandate": false, + "nach": false, + "netbanking": true, + "debit_card": true, + "credit_card": true, + "prepaid_card": true, + "card_subtype": 3, + "entity": "methods", + "bank_transfer": true, + "amazonpay": false, + "cardless_emi": true, + "card_networks": { + "AMEX": 0, + "DICL": 0, + "MC": 1, + "MAES": 1, + "VISA": 1, + "JCB": 0, + "RUPAY": 1, + "BAJAJ": 0 + }, + "phonepe": false, + "phonepeswitch": true, + "paylater": true, + "paypal": false, + "apps": { + "cred": 0, + "twid": 0, + "trustly": 0, + "poli": 0 + }, + "debit_emi_providers": { + "HDFC": 1 + }, + "itzcash": false, + "oxigen": false, + "amexeasyclick": false, + "paycash": false, + "citibankrewards": false, + "cod": false, + "offline": false + }, + "convert_currency": false, + "max_payment_amount": 50000000, + "max_international_payment_amount": null, + "auto_refund_delay": null, + "auto_capture_late_auth": false, + "brand_color": null, + "handle": null, + "risk_rating": 3, + "risk_threshold": 8, + "partner_type": null, + "created_at": 1650949582, + "updated_at": 1650949704, + "suspended_at": null, + "archived_at": null, + "icon_url": null, + "logo_url": null, + "org_id": "100000razorpay", + "notes": [], + "whitelisted_ips_live": [], + "whitelisted_ips_test": [], + "whitelisted_domains": [], + "merchant_detail": { + "contact_name": "Test webhook", + "contact_email": "gaurav.kumar@example.com", + "contact_mobile": "9000090000", + "contact_landline": null, + "business_type": "4", + "business_name": "Test account", + "business_description": null, + "business_dba": "Test account", + "business_website": "", + "business_international": false, + "business_paymentdetails": null, + "business_registered_address": "Kormangala ", + "business_registered_address_l2": null, + "business_registered_country": null, + "business_registered_state": "KA", + "business_registered_city": "Bengaluru", + "business_registered_district": null, + "business_registered_pin": "560068", + "business_operation_address": "Kormangala ", + "business_operation_address_l2": null, + "business_operation_country": null, + "business_operation_state": "KA", + "business_operation_city": "Bengaluru", + "business_operation_district": null, + "business_operation_pin": "560068", + "promoter_pan": "DAZPK0968P", + "promoter_pan_name": "Gaurav Kumar", + "business_doe": null, + "gstin": null, + "p_gstin": null, + "company_cin": "L21091KA2019OPC141331", + "company_pan": "ABCTY1234D", + "company_pan_name": null, + "business_category": "education", + "business_subcategory": "schools", + "business_model": "Please give a brief description of the nature of your business. Please include examples of products you sell, the business category you operate under", + "transaction_volume": null, + "transaction_value": null, + "website_about": null, + "website_contact": null, + "website_privacy": null, + "website_terms": null, + "website_refund": null, + "website_pricing": null, + "website_login": null, + "steps_finished": "[]", + "activation_progress": 60, + "locked": false, + "activation_status": "instantly_activated", + "bank_details_verification_status": null, + "poa_verification_status": null, + "poi_verification_status": "initiated", + "clarification_mode": null, + "archived": 0, + "allowed_next_activation_statuses": [ + "under_review", + "activated", + "activated_mcc_pending" + ], + "marketplace_activation_status": null, + "virtual_accounts_activation_status": null, + "subscriptions_activation_status": null, + "submitted": false, + "submitted_at": null, + "transaction_report_email": null, + "bank_account_number": null, + "bank_account_name": null, + "bank_account_type": null, + "bank_branch": null, + "bank_branch_ifsc": null, + "bank_beneficiary_address1": null, + "bank_beneficiary_address2": null, + "bank_beneficiary_address3": null, + "bank_beneficiary_city": null, + "bank_beneficiary_state": null, + "bank_beneficiary_pin": null, + "role": null, + "department": null, + "stakeholder": { + "id": "sth_JNrc6LLF9Dkeyp", + "merchant_id": "JNraR8O85H1atC", + "email": null, + "name": "Gaurav Kumar", + "phone_primary": null, + "phone_secondary": null, + "director": null, + "executive": null, + "percentage_ownership": null, + "notes": [], + "poi_identification_number": "DAZPK0968P", + "poi_status": "pending", + "pan_doc_status": null, + "poa_status": null, + "aadhaar_esign_status": null, + "aadhaar_verification_with_pan_status": null, + "aadhaar_pin": null, + "aadhaar_linked": 1, + "bvs_probe_id": null + }, + "created_at": 1650949582, + "updated_at": 1650949705, + "activation_flow": "whitelist", + "international_activation_flow": "whitelist", + "live_transaction_done": 0, + "kyc_clarification_reasons": null, + "kyc_additional_details": null, + "additional_websites": [], + "estd_year": null, + "authorized_signatory_residential_address": null, + "authorized_signatory_dob": null, + "platform": null, + "fund_account_validation_id": null, + "gstin_verification_status": null, + "date_of_establishment": null, + "activation_form_milestone": "L1", + "company_pan_verification_status": "initiated", + "cin_verification_status": "initiated", + "company_pan_doc_verification_status": null, + "personal_pan_doc_verification_status": null, + "bank_details_doc_verification_status": null, + "msme_doc_verification_status": null, + "shop_establishment_number": null, + "shop_establishment_verification_status": null, + "client_applications": [], + "business_suggested_pin": null, + "business_suggested_address": null, + "fraud_type": null, + "bas_business_id": null, + "iec_code": null + }, + "fee_credits_threshold": null, + "amount_credits_threshold": null, + "refund_credits_threshold": null, + "balance_threshold": null, + "display_name": null, + "activation_source": "primary", + "business_banking": false, + "second_factor_auth": false, + "restricted": false, + "default_refund_speed": "normal", + "partnership_url": null, + "external_id": null, + "product_international": "0000000000", + "signup_source": null, + "purpose_code": null + } + } + }, + "created_at": 1650949704 +} +``` + +## Product Payment Gateway Instantly Activated + +```json: Product Payment Gateway Instantly Activated +{ + "entity": "event", + "account_id": "acc_K7UFW5BQfdjwMc", + "event": "product.payment_gateway.instantly_activated", + "contains": [ + "merchant_product" + ], + "payload": { + "merchant_product": { + "entity": { + "id": "acc_prd_K7UO0khGS6bv5q", + "merchant_id": "acc_K7UFW5BQfdjwMc", + "activation_status": "instantly_activated" + }, + "data": [] + } + }, + "created_at": 1660911527 +} +``` diff --git a/llm-content/webhooks/partners/needs-clarification.md b/llm-content/webhooks/partners/needs-clarification.md new file mode 100644 index 00000000..3335896a --- /dev/null +++ b/llm-content/webhooks/partners/needs-clarification.md @@ -0,0 +1,296 @@ +--- +title: Sample Payloads When Status is Needs Clarification +description: List of webhook events and associated payloads when the account is in Needs Clarification state. +--- + +# Sample Payloads When Status is Needs Clarification + +## Product Payment Gateway Needs Clarification + +```json: Payment Gateway Needs Clarification +{ + "entity": "event", + "account_id": "acc_H7Tba8KmUr255a", + "event": "product.payment_gateway.needs_clarification", + "contains": [ + "merchant_product" + ], + "payload": { + "merchant_product": { + "entity": { + "id": "acc_prd_H7TsOEbwlqe5aY", + "merchant_id": "acc_H7Tba8KmUr255a", + "activation_status": "needs_clarification" + }, + "data": { + "requirements": [ + { + "field_reference": "legal_info.pan", + "resolution_url": "/accounts/acc_H7Tba8KmUr255a", + "status": "required", + "reason_code": "needs_clarification" + }, + { + "field_reference": "individual_proof_of_address.aadhar_back", + "resolution_url": "/accounts/acc_H7Tba8KmUr255a/stakeholders/sth_JI1ADtXrE6OHI2/documents", + "reason_code": "needs_clarification", + "description": "The document attached is not legible. Please resubmit a clearer copy", + "status": "required" + }, + { + "field_reference": "individual_proof_of_address.aadhar_front", + "resolution_url": "/accounts/acc_H7Tba8KmUr255a/stakeholders/sth_JI1ADtXrE6OHI2/documents", + "reason_code": "needs_clarification", + "description": "The document attached is not legible. Please resubmit a clearer copy", + "status": "required" + } + ] + } + } + }, + "created_at": 1622008278 +} +``` + +## Product Payment Link Needs Clarification + +```json: Payment Link Needs Clarification +{ + "entity": "event", + "account_id": "acc_JNuCwk8oQ59DKR", + "event": "product.payment_links.needs_clarification", + "contains": [ + "merchant_product" + ], + "payload": { + "merchant_product": { + "entity": { + "id": "acc_prd_JNuIbL01ZYCXas", + "merchant_id": "acc_JNuCwk8oQ59DKR", + "activation_status": "needs_clarification" + }, + "data": { + "requirements": [ + { + "field_reference": "business_name", + "resolution_url": "/accounts/acc_H7Tba8KmUr255a", + "status": "required", + "reason_code": "needs_clarification" + }, + { + "field_reference": "individual_proof_of_address.aadhar_back", + "resolution_url": "/accounts/acc_H7Tba8KmUr255a/stakeholders/sth_JI1ADtXrE6OHI2/documents", + "reason_code": "needs_clarification", + "description": "The document attached is not legible. Please resubmit a clearer copy", + "status": "required" + }, + { + "field_reference": "individual_proof_of_address.aadhar_front", + "resolution_url": "/accounts/acc_H7Tba8KmUr255a/stakeholders/sth_JI1ADtXrE6OHI2/documents", + "reason_code": "needs_clarification", + "description": "The document attached is not legible. Please resubmit a clearer copy", + "status": "required" + } + ] + } + } + }, + "created_at": 1650961595 +} +``` + +## Account Needs Clarification + +```json: Account Needs Clarification +{ + "entity": "event", + "account_id": "acc_JNraR8O85H1atC", + "event": "account.needs_clarification", + "contains": [ + "account" + ], + "payload": { + "account": { + "entity": { + "id": "JNraR8O85H1atC", + "entity": "merchant", + "name": "Test account", + "email": "gaurav.kumar@example.com", + "activated": true, + "activated_at": 1650951410, + "live": true, + "hold_funds": true, + "pricing_plan_id": "C4uidYkQYsDdgX", + "parent_id": null, + "website": "", + "category": "8211", + "category2": "pvt_education", + "international": false, + "linked_account_kyc": false, + "has_key_access": false, + "fee_bearer": "platform", + "fee_model": "prepaid", + "refund_source": "balance", + "billing_label": "Test account", + "receipt_email_enabled": true, + "receipt_email_trigger_event": "authorized", + "transaction_report_email": [ + "gaurav.kumar@example.com" + ], + "invoice_label_field": null, + "channel": "axis2", + "convert_currency": false, + "max_payment_amount": 50000000, + "max_international_payment_amount": null, + "auto_refund_delay": null, + "auto_capture_late_auth": false, + "brand_color": null, + "handle": null, + "risk_rating": 3, + "risk_threshold": 8, + "partner_type": null, + "created_at": 1650949582, + "updated_at": 1650951410, + "suspended_at": null, + "archived_at": null, + "icon_url": null, + "logo_url": null, + "org_id": "100000razorpay", + "notes": [], + "whitelisted_ips_live": [], + "whitelisted_ips_test": [], + "whitelisted_domains": [], + "merchant_detail": { + "contact_name": "Test webhook", + "contact_email": "gaurav.kumar@example.com", + "contact_mobile": "9000090000", + "contact_landline": null, + "business_type": "4", + "business_name": "Test account", + "business_description": null, + "business_dba": "Test account", + "business_website": "", + "business_international": false, + "business_paymentdetails": null, + "business_registered_address": "Kormangala ", + "business_registered_address_l2": null, + "business_registered_country": null, + "business_registered_state": "KA", + "business_registered_city": "Bengaluru", + "business_registered_district": null, + "business_registered_pin": "560068", + "business_operation_address": "Kormangala ", + "business_operation_address_l2": null, + "business_operation_country": null, + "business_operation_state": "KA", + "business_operation_city": "Bengaluru", + "business_operation_district": null, + "business_operation_pin": "560068", + "promoter_pan": "DAZPK0968P", + "promoter_pan_name": "Gaurav Kumar", + "business_doe": null, + "gstin": null, + "p_gstin": null, + "company_cin": "L21091KA2019OPC141331", + "company_pan": "ABCTY1234D", + "company_pan_name": null, + "business_category": "education", + "business_subcategory": "schools", + "business_model": "Please give a brief description of the nature of your business. Please include examples of products you sell, the business category you operate under", + "transaction_volume": null, + "transaction_value": null, + "website_about": null, + "website_contact": null, + "website_privacy": null, + "website_terms": null, + "website_refund": null, + "website_pricing": null, + "website_login": null, + "steps_finished": "[]", + "activation_progress": 80, + "locked": true, + "activation_status": "needs_clarification", + "bank_details_verification_status": "initiated", + "poa_verification_status": null, + "poi_verification_status": "initiated", + "clarification_mode": "email", + "archived": 0, + "allowed_next_activation_statuses": [ + "under_review" + ], + "reviewer_id": null, + "issue_fields": "aadhar_front,aadhar_back", + "issue_fields_reason": "Invalid doc", + "internal_notes": "Invalid doc", + "marketplace_activation_status": null, + "virtual_accounts_activation_status": null, + "subscriptions_activation_status": null, + "submitted": true, + "submitted_at": 1650951410, + "transaction_report_email": null, + "bank_account_number": "1234567890", + "bank_account_name": "Gaurav Kumar", + "bank_account_type": null, + "bank_branch": null, + "bank_branch_ifsc": "HDFC0000186", + "bank_beneficiary_address1": null, + "bank_beneficiary_address2": null, + "bank_beneficiary_address3": null, + "bank_beneficiary_city": null, + "bank_beneficiary_state": null, + "bank_beneficiary_pin": null, + "role": null, + "department": null, + "created_at": 1650949582, + "updated_at": 1650953650, + "activation_flow": "whitelist", + "international_activation_flow": "whitelist", + "live_transaction_done": 0, + "kyc_clarification_reasons": null, + "kyc_additional_details": null, + "additional_websites": [], + "estd_year": null, + "authorized_signatory_residential_address": null, + "authorized_signatory_dob": null, + "platform": null, + "fund_account_validation_id": null, + "gstin_verification_status": null, + "date_of_establishment": null, + "activation_form_milestone": "L2", + "company_pan_verification_status": "initiated", + "cin_verification_status": "initiated", + "company_pan_doc_verification_status": "initiated", + "personal_pan_doc_verification_status": null, + "bank_details_doc_verification_status": null, + "msme_doc_verification_status": null, + "shop_establishment_number": null, + "shop_establishment_verification_status": null, + "client_applications": [], + "business_suggested_pin": null, + "business_suggested_address": null, + "fraud_type": null, + "bas_business_id": null, + "iec_code": null + }, + "fee_credits_threshold": null, + "amount_credits_threshold": null, + "refund_credits_threshold": null, + "balance_threshold": null, + "display_name": null, + "activation_source": "primary", + "business_banking": false, + "second_factor_auth": false, + "restricted": false, + "default_refund_speed": "normal", + "partnership_url": null, + "external_id": null, + "product_international": "0000000000", + "signup_source": null, + "dcc_markup_percentage": 7, + "purpose_code": null + } + } + }, + "created_at": 1650951410 +} +``` diff --git a/llm-content/webhooks/partners/oauth.md b/llm-content/webhooks/partners/oauth.md new file mode 100644 index 00000000..05592121 --- /dev/null +++ b/llm-content/webhooks/partners/oauth.md @@ -0,0 +1,41 @@ +--- +title: Partners OAuth Webhook Events +description: List of Partners OAuth webhook events along with sample payloads. +--- + +# Partners OAuth Webhook Events + +Razorpay OAuth is a token-based authentication method where you can obtain an access token with the consent of the user, without them having to compromise their API key secret. OAuth lets the user decide who can access what level of resources within their Razorpay account. + +## List of OAuth Webhook Events + +The table below lists the webhook events available for OAuth partners. + +Event Name | Description +--- +`account.app.authorization_revoked` | Triggered when the sub-merchant revokes access to the partner application. + +## Sample Payloads + +Given below is the sample payload for the Partners Oauth webhook event. + +### Account App Authorization Revoked + +```json: account.app.authorization_revoked +{ + "event": "account.app.authorization_revoked", + "account_id": "acc_Dhk2qDbmu6FwZH", // merchant account id + "contains": [], + "created_at": 1678282666 +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. +> +> - While generating a signature at your end, ensure that the webhook body is passed as an argument in the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> diff --git a/llm-content/webhooks/partners/payment-enabled.md b/llm-content/webhooks/partners/payment-enabled.md new file mode 100644 index 00000000..22dd6730 --- /dev/null +++ b/llm-content/webhooks/partners/payment-enabled.md @@ -0,0 +1,333 @@ +--- +title: Sample Payloads When Status is Payment Enabled +description: List of webhook events and associated payloads when the account is in Payment Enabled state. +--- + +# Sample Payloads When Status is Payment Enabled + +## Account Payment Enabled + +```json: Account Payment Enabled +{ + "entity": "event", + "account_id": "acc_JNraR8O85H1atC", + "event": "account.payments_enabled", + "contains": [ + "account" + ], + "payload": { + "account": { + "entity": { + "id": "JNraR8O85H1atC", + "entity": "merchant", + "name": "Test account", + "email": "gaurav.kumar@example.com", + "activated": true, + "activated_at": null, + "live": true, + "hold_funds": false, + "pricing_plan_id": "C4uidYkQYsDdgX", + "parent_id": null, + "website": "", + "category": "8211", + "category2": "pvt_education", + "international": false, + "linked_account_kyc": false, + "has_key_access": false, + "fee_bearer": "platform", + "fee_model": "prepaid", + "refund_source": "balance", + "billing_label": "Test account", + "receipt_email_enabled": true, + "receipt_email_trigger_event": "authorized", + "transaction_report_email": [ + "gaurav.kumar@example.com" + ], + "invoice_label_field": null, + "channel": "axis2", + "methods": { + "merchant_id": "JNraR8O85H1atC", + "card": 1, + "amex": false, + "disabled_banks": [ + "BBKM", + "BKID", + "COSB", + "DBSS", + "JSBP", + "NKGS", + "SYNB", + "TNSC", + "ABNA", + "TJSB", + "KJSB", + "MSNU", + "BDBL", + "BACB", + "KCCB", + "TBSB", + "SURY", + "ESAF", + "VARA", + "NESF", + "ZCBL", + "CIUB", + "FDRL", + "HSBC", + "HDFC", + "SBIN", + "SBBJ", + "SBHY", + "SBMY", + "SBTR", + "STBP", + "LAVB_C", + "UTIB_C", + "IBKL_C", + "YESB_C", + "ANDB_C", + "RATN_C", + "DLXB_C", + "SVCB_C", + "BARB_C", + "PUNB_C", + "ICIC_C", + "KKBK_C", + "HDFC_C" + ], + "paytm": false, + "payzapp": true, + "payumoney": true, + "airtelmoney": true, + "mobikwik": true, + "olamoney": true, + "jiomoney": true, + "sbibuddy": true, + "openwallet": false, + "razorpaywallet": false, + "mpesa": true, + "emi": [ + "credit", + "debit" + ], + "upi": true, + "upi_type": { + "collect": 1, + "intent": 1 + }, + "aeps": false, + "emandate": false, + "nach": false, + "netbanking": true, + "debit_card": true, + "credit_card": true, + "prepaid_card": true, + "card_subtype": 3, + "entity": "methods", + "bank_transfer": true, + "amazonpay": false, + "cardless_emi": true, + "card_networks": { + "AMEX": 0, + "DICL": 0, + "MC": 1, + "MAES": 1, + "VISA": 1, + "JCB": 0, + "RUPAY": 1, + "BAJAJ": 0 + }, + "phonepe": false, + "phonepeswitch": true, + "paylater": true, + "paypal": false, + "apps": { + "cred": 0, + "twid": 0, + "trustly": 0, + "poli": 0 + }, + "debit_emi_providers": { + "HDFC": 1 + }, + "itzcash": false, + "oxigen": false, + "amexeasyclick": false, + "paycash": false, + "citibankrewards": false, + "cod": false, + "offline": false + }, + "convert_currency": false, + "max_payment_amount": 50000000, + "max_international_payment_amount": null, + "auto_refund_delay": null, + "auto_capture_late_auth": false, + "brand_color": null, + "handle": null, + "risk_rating": 3, + "risk_threshold": 8, + "partner_type": null, + "created_at": 1650949582, + "updated_at": 1650949670, + "suspended_at": null, + "archived_at": null, + "icon_url": null, + "logo_url": null, + "org_id": "100000razorpay", + "notes": [], + "whitelisted_ips_live": [], + "whitelisted_ips_test": [], + "whitelisted_domains": [], + "merchant_detail": { + "contact_name": "Test webhook", + "contact_email": "gaurav.kumar@example.com", + "contact_mobile": "9790058641", + "contact_landline": null, + "business_type": "4", + "business_name": "Test account", + "business_description": null, + "business_dba": "Test account", + "business_website": "", + "business_international": false, + "business_paymentdetails": null, + "business_registered_address": "Kormangala ", + "business_registered_address_l2": null, + "business_registered_country": null, + "business_registered_state": "KA", + "business_registered_city": "Bengaluru", + "business_registered_district": null, + "business_registered_pin": "560068", + "business_operation_address": "Kormangala ", + "business_operation_address_l2": null, + "business_operation_country": null, + "business_operation_state": "KA", + "business_operation_city": "Bengaluru", + "business_operation_district": null, + "business_operation_pin": "560068", + "promoter_pan": "DAZPK0968P", + "promoter_pan_name": "Gaurav Kumar", + "business_doe": null, + "gstin": null, + "p_gstin": null, + "company_cin": "L21091KA2019OPC141331", + "company_pan": "ABCTY1234D", + "company_pan_name": null, + "business_category": "education", + "business_subcategory": "schools", + "business_model": "Please give a brief description of the nature of your business. Please include examples of products you sell, the business category you operate under", + "transaction_volume": null, + "transaction_value": null, + "website_about": null, + "website_contact": null, + "website_privacy": null, + "website_terms": null, + "website_refund": null, + "website_pricing": null, + "website_login": null, + "steps_finished": "[]", + "activation_progress": 60, + "locked": false, + "activation_status": "instantly_activated", + "bank_details_verification_status": null, + "poa_verification_status": null, + "poi_verification_status": "initiated", + "clarification_mode": null, + "archived": 0, + "allowed_next_activation_statuses": [ + "under_review", + "activated", + "activated_mcc_pending" + ], + "marketplace_activation_status": null, + "virtual_accounts_activation_status": null, + "subscriptions_activation_status": null, + "submitted": false, + "submitted_at": null, + "transaction_report_email": null, + "bank_account_number": null, + "bank_account_name": null, + "bank_account_type": null, + "bank_branch": null, + "bank_branch_ifsc": null, + "bank_beneficiary_address1": null, + "bank_beneficiary_address2": null, + "bank_beneficiary_address3": null, + "bank_beneficiary_city": null, + "bank_beneficiary_state": null, + "bank_beneficiary_pin": null, + "role": null, + "department": null, + "stakeholder": { + "id": "sth_JNrc6LLF9Dkeyp", + "merchant_id": "JNraR8O85H1atC", + "email": null, + "name": "Gaurav Kumar", + "phone_primary": null, + "phone_secondary": null, + "director": null, + "executive": null, + "percentage_ownership": null, + "notes": [], + "poi_identification_number": "DAZPK0968P", + "poi_status": "pending", + "pan_doc_status": null, + "poa_status": null, + "aadhaar_esign_status": null, + "aadhaar_verification_with_pan_status": null, + "aadhaar_pin": null, + "aadhaar_linked": 1, + "bvs_probe_id": null + }, + "created_at": 1650949582, + "updated_at": 1650949705, + "activation_flow": "whitelist", + "international_activation_flow": "whitelist", + "live_transaction_done": 0, + "kyc_clarification_reasons": null, + "kyc_additional_details": null, + "additional_websites": [], + "estd_year": null, + "authorized_signatory_residential_address": null, + "authorized_signatory_dob": null, + "platform": null, + "fund_account_validation_id": null, + "gstin_verification_status": null, + "date_of_establishment": null, + "activation_form_milestone": "L1", + "company_pan_verification_status": "initiated", + "cin_verification_status": "initiated", + "company_pan_doc_verification_status": null, + "personal_pan_doc_verification_status": null, + "bank_details_doc_verification_status": null, + "msme_doc_verification_status": null, + "shop_establishment_number": null, + "shop_establishment_verification_status": null, + "client_applications": [], + "business_suggested_pin": null, + "business_suggested_address": null, + "fraud_type": null, + "bas_business_id": null, + "iec_code": null + }, + "fee_credits_threshold": null, + "amount_credits_threshold": null, + "refund_credits_threshold": null, + "balance_threshold": null, + "display_name": null, + "activation_source": null, + "business_banking": false, + "second_factor_auth": false, + "restricted": false, + "default_refund_speed": "normal", + "partnership_url": null, + "external_id": null, + "product_international": "0000000000", + "signup_source": null, + "purpose_code": null + } + } + }, + "created_at": 1650949670 +} +``` diff --git a/llm-content/webhooks/partners/rejected.md b/llm-content/webhooks/partners/rejected.md new file mode 100644 index 00000000..b776924d --- /dev/null +++ b/llm-content/webhooks/partners/rejected.md @@ -0,0 +1,254 @@ +--- +title: Sample Payloads When Status is Rejected +description: List of webhook events and associated payloads when the account is in Rejected state. +--- + +# Sample Payloads When Status is Rejected + +## Product Payment Gateway Rejected + +```json: Payment Gateway Rejected +{ + "entity": "event", + "account_id": "acc_H7Tba8KmUr255a", + "event": "product.payment_gateway.rejected", + "contains": [ + "merchant_product" + ], + "payload": { + "merchant_product": { + "entity": { + "id": "acc_prd_H7TsOEbwlqe5aY", + "merchant_id": "acc_H7Tba8KmUr255a", + "activation_status": "rejected" + }, + "data": { + "requirements": [] + } + } + }, + "created_at": 1622008278 +} +``` + +## Product Payment Link Rejected + +```json: Payment Link Rejected +{ + "entity": "event", + "account_id": "acc_H7Tba8KmUr255a", + "event": "product.payment_link.rejected", + "contains": [ + "merchant_product" + ], + "payload": { + "merchant_product": { + "entity": { + "id": "acc_prd_H7TsOEbwlqe5aY", + "merchant_id": "acc_H7Tba8KmUr255a", + "activation_status": "rejected" + }, + "data": { + "requirements": [] + } + } + }, + "created_at": 1622008278 +} +``` + +## Account Rejected + +```json: Account Rejected +{ + "entity": "event", + "account_id": "acc_JNraR8O85H1atC", + "event": "account.rejected", + "contains": [ + "account" + ], + "payload": { + "account": { + "entity": { + "id": "JNraR8O85H1atC", + "entity": "merchant", + "name": "Test account", + "email": "gaurav.kumar@example.com", + "activated": true, + "activated_at": 1650951410, + "live": true, + "hold_funds": true, + "pricing_plan_id": "C4uidYkQYsDdgX", + "parent_id": null, + "website": "", + "category": "8211", + "category2": "pvt_education", + "international": false, + "linked_account_kyc": false, + "has_key_access": false, + "fee_bearer": "platform", + "fee_model": "prepaid", + "refund_source": "balance", + "billing_label": "Test account", + "receipt_email_enabled": true, + "receipt_email_trigger_event": "authorized", + "transaction_report_email": [ + "gaurav.kumar@example.com" + ], + "invoice_label_field": null, + "channel": "axis2", + "convert_currency": false, + "max_payment_amount": 50000000, + "max_international_payment_amount": null, + "auto_refund_delay": null, + "auto_capture_late_auth": false, + "brand_color": null, + "handle": null, + "risk_rating": 3, + "risk_threshold": 8, + "partner_type": null, + "created_at": 1650949582, + "updated_at": 1650951410, + "suspended_at": null, + "archived_at": null, + "icon_url": null, + "logo_url": null, + "org_id": "100000razorpay", + "notes": [], + "whitelisted_ips_live": [], + "whitelisted_ips_test": [], + "whitelisted_domains": [], + "merchant_detail": { + "contact_name": "Test webhook", + "contact_email": "gaurav.kumar@example.com", + "contact_mobile": "9000090000", + "contact_landline": null, + "business_type": "4", + "business_name": "Test account", + "business_description": null, + "business_dba": "Test account", + "business_website": "", + "business_international": false, + "business_paymentdetails": null, + "business_registered_address": "Kormangala ", + "business_registered_address_l2": null, + "business_registered_country": null, + "business_registered_state": "KA", + "business_registered_city": "Bengaluru", + "business_registered_district": null, + "business_registered_pin": "560068", + "business_operation_address": "Kormangala ", + "business_operation_address_l2": null, + "business_operation_country": null, + "business_operation_state": "KA", + "business_operation_city": "Bengaluru", + "business_operation_district": null, + "business_operation_pin": "560068", + "promoter_pan": "DAZPK0968P", + "promoter_pan_name": "Gaurav Kumar", + "business_doe": null, + "gstin": null, + "p_gstin": null, + "company_cin": "L21091KA2019OPC141331", + "company_pan": "ABCTY1234D", + "company_pan_name": null, + "business_category": "education", + "business_subcategory": "schools", + "business_model": "Please give a brief description of the nature of your business. Please include examples of products you sell, the business category you operate under", + "transaction_volume": null, + "transaction_value": null, + "website_about": null, + "website_contact": null, + "website_privacy": null, + "website_terms": null, + "website_refund": null, + "website_pricing": null, + "website_login": null, + "steps_finished": "[]", + "activation_progress": 80, + "locked": true, + "activation_status": "rejected", + "bank_details_verification_status": "initiated", + "poa_verification_status": null, + "poi_verification_status": "initiated", + "clarification_mode": "email", + "archived": 0, + "allowed_next_activation_statuses": [ + "under_review" + ], + "reviewer_id": null, + "issue_fields": "aadhar_front,aadhar_back", + "issue_fields_reason": "Invalid doc", + "internal_notes": "Invalid doc", + "marketplace_activation_status": null, + "virtual_accounts_activation_status": null, + "subscriptions_activation_status": null, + "submitted": true, + "submitted_at": 1650951410, + "transaction_report_email": null, + "bank_account_number": "1234567890", + "bank_account_name": "Gaurav Kumar", + "bank_account_type": null, + "bank_branch": null, + "bank_branch_ifsc": "HDFC0000186", + "bank_beneficiary_address1": null, + "bank_beneficiary_address2": null, + "bank_beneficiary_address3": null, + "bank_beneficiary_city": null, + "bank_beneficiary_state": null, + "bank_beneficiary_pin": null, + "role": null, + "department": null, + "created_at": 1650949582, + "updated_at": 1650953650, + "activation_flow": "whitelist", + "international_activation_flow": "whitelist", + "live_transaction_done": 0, + "kyc_clarification_reasons": null, + "kyc_additional_details": null, + "additional_websites": [], + "estd_year": null, + "authorized_signatory_residential_address": null, + "authorized_signatory_dob": null, + "platform": null, + "fund_account_validation_id": null, + "gstin_verification_status": null, + "date_of_establishment": null, + "activation_form_milestone": "L2", + "company_pan_verification_status": "initiated", + "cin_verification_status": "initiated", + "company_pan_doc_verification_status": "initiated", + "personal_pan_doc_verification_status": null, + "bank_details_doc_verification_status": null, + "msme_doc_verification_status": null, + "shop_establishment_number": null, + "shop_establishment_verification_status": null, + "client_applications": [], + "business_suggested_pin": null, + "business_suggested_address": null, + "fraud_type": null, + "bas_business_id": null, + "iec_code": null + }, + "fee_credits_threshold": null, + "amount_credits_threshold": null, + "refund_credits_threshold": null, + "balance_threshold": null, + "display_name": null, + "activation_source": "primary", + "business_banking": false, + "second_factor_auth": false, + "restricted": false, + "default_refund_speed": "normal", + "partnership_url": null, + "external_id": null, + "product_international": "0000000000", + "signup_source": null, + "dcc_markup_percentage": 7, + "purpose_code": null + } + } + }, + "created_at": 1650951410 +} +``` diff --git a/llm-content/webhooks/partners/suspended.md b/llm-content/webhooks/partners/suspended.md new file mode 100644 index 00000000..87f06ff5 --- /dev/null +++ b/llm-content/webhooks/partners/suspended.md @@ -0,0 +1,198 @@ +--- +title: Sample Payloads When Status is Suspended +description: List of webhook events and associated payloads when the account is in Suspended state. +--- + +# Sample Payloads When Status is Suspended + +## Account Suspended + +```json: Account Suspended +{ + "entity": "event", + "account_id": "acc_HJpthGEfU5gmwc", + "event": "account.suspended", + "contains": [ + "account" + ], + "payload": { + "account": { + "entity": { + "id": "HJpthGEfU5gmwc", + "entity": "merchant", + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "activated": false, + "activated_at": null, + "live": false, + "hold_funds": true, + "pricing_plan_id": "FL6zMNWhnSUooe", + "parent_id": null, + "website": "https://www.villywonka.com/", + "category": "5691", + "category2": "ecommerce", + "international": false, + "linked_account_kyc": false, + "has_key_access": false, + "fee_bearer": "platform", + "fee_model": "prepaid", + "refund_source": "balance", + "billing_label": "Gaurav Kumar", + "receipt_email_enabled": true, + "receipt_email_trigger_event": "authorized", + "transaction_report_email": [ + "gaurav.kumar@example.com" + ], + "invoice_label_field": null, + "channel": "axis2", + "convert_currency": false, + "max_payment_amount": 50000000, + "auto_refund_delay": null, + "auto_capture_late_auth": false, + "brand_color": null, + "handle": null, + "risk_rating": 3, + "risk_threshold": 8, + "partner_type": null, + "created_at": 1622996099, + "updated_at": 1622996754, + "suspended_at": 1624781176, + "archived_at": null, + "icon_url": null, + "logo_url": null, + "org_id": "100000razorpay", + "notes": [], + "whitelisted_ips_live": [], + "whitelisted_ips_test": [], + "whitelisted_domains": [ + "villywonka.com" + ], + "merchant_detail": { + "contact_name": "Abdul Aziz Khan", + "contact_email": "gaurav.kumar@example.com", + "contact_mobile": "9082238664", + "contact_landline": null, + "business_type": "1", + "business_name": "Gaurav Kumar", + "business_description": null, + "business_dba": "Gaurav Kumar", + "business_website": "https://www.villywonka.com/", + "business_international": false, + "business_paymentdetails": null, + "business_registered_address": "Mumbai", + "business_registered_address_l2": null, + "business_registered_country": null, + "business_registered_state": "MH", + "business_registered_city": "Mumbai", + "business_registered_district": null, + "business_registered_pin": "400027", + "business_operation_address": "Mumbai", + "business_operation_address_l2": null, + "business_operation_country": null, + "business_operation_state": "MH", + "business_operation_city": "Mumbai", + "business_operation_district": null, + "business_operation_pin": "400027", + "promoter_pan": "ELZPK0377L", + "promoter_pan_name": "Abdul Aziz Khan", + "business_doe": null, + "gstin": "", + "p_gstin": null, + "company_cin": null, + "company_pan": null, + "company_pan_name": null, + "business_category": "fashion_and_lifestyle", + "business_subcategory": "fashion_and_lifestyle", + "business_model": "Online Clothing ( men, women, ethnic, modern ) fashion and lifestyle, accessories, t-shirt, shirt, track pant, shoes.", + "transaction_volume": 1, + "transaction_value": null, + "website_about": null, + "website_contact": null, + "website_privacy": null, + "website_terms": null, + "website_refund": null, + "website_pricing": null, + "website_login": null, + "steps_finished": "[]", + "activation_progress": 91, + "locked": false, + "activation_status": null, + "bank_details_verification_status": null, + "poa_verification_status": null, + "poi_verification_status": "pending", + "clarification_mode": null, + "archived": 0, + "allowed_next_activation_statuses": [], + "reviewer_id": null, + "issue_fields": null, + "issue_fields_reason": null, + "internal_notes": null, + "marketplace_activation_status": null, + "virtual_accounts_activation_status": null, + "subscriptions_activation_status": null, + "submitted": false, + "submitted_at": null, + "transaction_report_email": null, + "bank_account_number": "318702010408608", + "bank_account_name": "Abdul Aziz Khan", + "bank_account_type": null, + "bank_branch": null, + "bank_branch_ifsc": "UBIN0531871", + "bank_beneficiary_address1": null, + "bank_beneficiary_address2": null, + "bank_beneficiary_address3": null, + "bank_beneficiary_city": null, + "bank_beneficiary_state": null, + "bank_beneficiary_pin": null, + "role": null, + "department": null, + "created_at": 1622996099, + "updated_at": 1623679472, + "activation_flow": null, + "international_activation_flow": null, + "live_transaction_done": 0, + "kyc_clarification_reasons": null, + "kyc_additional_details": null, + "additional_websites": [], + "estd_year": null, + "authorized_signatory_residential_address": null, + "authorized_signatory_dob": null, + "platform": null, + "fund_account_validation_id": null, + "gstin_verification_status": null, + "date_of_establishment": null, + "activation_form_milestone": null, + "company_pan_verification_status": null, + "cin_verification_status": null, + "company_pan_doc_verification_status": null, + "personal_pan_doc_verification_status": "pending", + "bank_details_doc_verification_status": null, + "msme_doc_verification_status": null, + "shop_establishment_number": null, + "shop_establishment_verification_status": null, + "client_applications": [], + "business_suggested_pin": null, + "business_suggested_address": null, + "fraud_type": null, + "bas_business_id": null + }, + "fee_credits_threshold": null, + "amount_credits_threshold": null, + "refund_credits_threshold": null, + "display_name": null, + "activation_source": null, + "business_banking": false, + "second_factor_auth": false, + "restricted": false, + "default_refund_speed": "normal", + "partnership_url": null, + "external_id": null, + "product_international": "0000000000", + "signup_source": "primary", + "dcc_markup_percentage": 6 + } + } + }, + "created_at": 1622996754 +} +``` diff --git a/llm-content/webhooks/partners/under-review.md b/llm-content/webhooks/partners/under-review.md new file mode 100644 index 00000000..a8f61375 --- /dev/null +++ b/llm-content/webhooks/partners/under-review.md @@ -0,0 +1,270 @@ +--- +title: Sample Payloads When Status is Under Review +description: List of webhook events and associated payloads when the account is in Under Review state. +--- + +# Sample Payloads When Status is Under Review + +## Product Payment Gateway Under Review + +```json: Payment Gateway Under Review +{ + "entity": "event", + "account_id": "acc_JI0zziTMTmOmSI", + "event": "product.payment_gateway.under_review", + "contains": [ + "merchant_product" + ], + "payload": { + "merchant_product": { + "entity": { + "id": "acc_prd_JI1B2u6icYerAJ", + "merchant_id": "acc_JI0zziTMTmOmSI", + "activation_status": "under_review" + }, + "data": [] + } + }, + "created_at": 1649673723 +} +``` + +## Product Payment Link Under Review + +```json: Payment Link Under Review +{ + "entity": "event", + "account_id": "acc_JNuCwk8oQ59DKR", + "event": "product.payment_links.under_review", + "contains": [ + "merchant_product" + ], + "payload": { + "merchant_product": { + "entity": { + "id": "acc_prd_JNuIbL01ZYCXas", + "merchant_id": "acc_JNuCwk8oQ59DKR", + "activation_status": "under_review" + }, + "data": [] + } + }, + "created_at": 1650959936 +} +``` + +## Account Under Review + +```json: Account Under Review +{ + "entity": "event", + "account_id": "acc_JNraR8O85H1atC", + "event": "account.under_review", + "contains": [ + "account" + ], + "payload": { + "account": { + "entity": { + "id": "JNraR8O85H1atC", + "entity": "merchant", + "name": "Test account", + "email": "gaurav.kumar@example.com", + "activated": true, + "activated_at": 1650951410, + "live": true, + "hold_funds": true, + "pricing_plan_id": "C4uidYkQYsDdgX", + "parent_id": null, + "website": "", + "category": "8211", + "category2": "pvt_education", + "international": false, + "linked_account_kyc": false, + "has_key_access": false, + "fee_bearer": "platform", + "fee_model": "prepaid", + "refund_source": "balance", + "billing_label": "Test account", + "receipt_email_enabled": true, + "receipt_email_trigger_event": "authorized", + "transaction_report_email": [ + "gaurav.kumar@example.com" + ], + "invoice_label_field": null, + "channel": "axis2", + "convert_currency": false, + "max_payment_amount": 50000000, + "max_international_payment_amount": null, + "auto_refund_delay": null, + "auto_capture_late_auth": false, + "brand_color": null, + "handle": null, + "risk_rating": 3, + "risk_threshold": 8, + "partner_type": null, + "created_at": 1650949582, + "updated_at": 1650951410, + "suspended_at": null, + "archived_at": null, + "icon_url": null, + "logo_url": null, + "org_id": "100000razorpay", + "notes": [], + "whitelisted_ips_live": [], + "whitelisted_ips_test": [], + "whitelisted_domains": [], + "merchant_detail": { + "contact_name": "Test webhook", + "contact_email": "gaurav.kumar@example.com", + "contact_mobile": "9790058641", + "contact_landline": null, + "business_type": "4", + "business_name": "Test account", + "business_description": null, + "business_dba": "Test account", + "business_website": "", + "business_international": false, + "business_paymentdetails": null, + "business_registered_address": "Kormangala ", + "business_registered_address_l2": null, + "business_registered_country": null, + "business_registered_state": "KA", + "business_registered_city": "Bengaluru", + "business_registered_district": null, + "business_registered_pin": "560068", + "business_operation_address": "Kormangala ", + "business_operation_address_l2": null, + "business_operation_country": null, + "business_operation_state": "KA", + "business_operation_city": "Bengaluru", + "business_operation_district": null, + "business_operation_pin": "560068", + "promoter_pan": "DAZPK0968P", + "promoter_pan_name": "Gaurav Kumar", + "business_doe": null, + "gstin": null, + "p_gstin": null, + "company_cin": "L21091KA2019OPC141331", + "company_pan": "ABCTY1234D", + "company_pan_name": null, + "business_category": "education", + "business_subcategory": "schools", + "business_model": "Please give a brief description of the nature of your business. Please include examples of products you sell, the business category you operate under", + "transaction_volume": null, + "transaction_value": null, + "website_about": null, + "website_contact": null, + "website_privacy": null, + "website_terms": null, + "website_refund": null, + "website_pricing": null, + "website_login": null, + "steps_finished": "[]", + "activation_progress": 80, + "locked": true, + "activation_status": "under_review", + "bank_details_verification_status": "initiated", + "poa_verification_status": null, + "poi_verification_status": "initiated", + "clarification_mode": null, + "archived": 0, + "allowed_next_activation_statuses": [ + "needs_clarification", + "activated", + "rejected", + "activated_mcc_pending", + "activated_kyc_pending" + ], + "marketplace_activation_status": null, + "virtual_accounts_activation_status": null, + "subscriptions_activation_status": null, + "submitted": true, + "submitted_at": 1650951410, + "transaction_report_email": null, + "bank_account_number": "1234567890", + "bank_account_name": "Gaurav Kumar", + "bank_account_type": null, + "bank_branch": null, + "bank_branch_ifsc": "HDFC0000186", + "bank_beneficiary_address1": null, + "bank_beneficiary_address2": null, + "bank_beneficiary_address3": null, + "bank_beneficiary_city": null, + "bank_beneficiary_state": null, + "bank_beneficiary_pin": null, + "role": null, + "department": null, + "stakeholder": { + "id": "sth_JNrc6LLF9Dkeyp", + "merchant_id": "JNraR8O85H1atC", + "email": null, + "name": "Gaurav Kumar", + "phone_primary": null, + "phone_secondary": null, + "director": null, + "executive": null, + "percentage_ownership": null, + "notes": [], + "poi_identification_number": "DAZPK0968P", + "poi_status": "pending", + "pan_doc_status": null, + "poa_status": null, + "aadhaar_esign_status": null, + "aadhaar_verification_with_pan_status": null, + "aadhaar_pin": null, + "aadhaar_linked": 0, + "bvs_probe_id": null + }, + "created_at": 1650949582, + "updated_at": 1650951413, + "activation_flow": "whitelist", + "international_activation_flow": "whitelist", + "live_transaction_done": 0, + "kyc_clarification_reasons": null, + "kyc_additional_details": null, + "additional_websites": [], + "estd_year": null, + "authorized_signatory_residential_address": null, + "authorized_signatory_dob": null, + "platform": null, + "fund_account_validation_id": null, + "gstin_verification_status": null, + "date_of_establishment": null, + "activation_form_milestone": "L2", + "company_pan_verification_status": "initiated", + "cin_verification_status": "initiated", + "company_pan_doc_verification_status": "initiated", + "personal_pan_doc_verification_status": null, + "bank_details_doc_verification_status": null, + "msme_doc_verification_status": null, + "shop_establishment_number": null, + "shop_establishment_verification_status": null, + "client_applications": [], + "business_suggested_pin": null, + "business_suggested_address": null, + "fraud_type": null, + "bas_business_id": null, + "iec_code": null + }, + "fee_credits_threshold": null, + "amount_credits_threshold": null, + "refund_credits_threshold": null, + "balance_threshold": null, + "display_name": null, + "activation_source": "primary", + "business_banking": false, + "second_factor_auth": false, + "restricted": false, + "default_refund_speed": "normal", + "partnership_url": null, + "external_id": null, + "product_international": "0000000000", + "signup_source": null, + "purpose_code": null + } + } + }, + "created_at": 1650951410 +} +``` diff --git a/llm-content/webhooks/payment-links.md b/llm-content/webhooks/payment-links.md new file mode 100644 index 00000000..00d7c93f --- /dev/null +++ b/llm-content/webhooks/payment-links.md @@ -0,0 +1,560 @@ +--- +title: Payment Links Webhook Events +description: List of Payment Links webhook events along with sample payloads. +--- + +# Payment Links Webhook Events + +**Payment Links** enable businesses to accept payments without a website or app by generating and sharing secure links via email, SMS, or social media. + +## List of Payment Links Webhook Events + +The table below lists the webhook events available for Payment Links. + +Webhook Event | Description | Payment Link Type +--- +`payment_link.paid` | Triggered when a Payment Link is paid. | - Standard Payment Links +- UPI Payment Links + +--- +`payment_link.partially_paid` | Triggered when a partial payment is made on a Standard Payment Link. | Standard Payment Link +--- +`payment_link.cancelled` | Triggered when a Payment Link is cancelled by you. | - Standard Payment Links +- UPI Payment Links + +--- +`payment_link.expired` | Triggered when a Payment Link expires. |- Standard Payment Links +- UPI Payment Links + +## Sample Payloads + +Given below are the sample payloads for Payment Links webhook events. + +### Payment Link Paid + +```json: payment_link.paid (Standard) +{ + "account_id": "acc_OU2H3nkLn9jDVo", + "contains": [ + "payment_link", + "order", + "payment" + ], + "created_at": 1749618314, + "entity": "event", + "event": "payment_link.paid", + "payload": { + "order": { + "entity": { + "account_number": null, + "amount": 1000, + "amount_due": 0, + "amount_paid": 1000, + "app_offer": false, + "attempts": 1, + "authorized": true, + "bank": null, + "bank_account": null, + "checkout_config_id": null, + "created_at": 1749618325, + "currency": "INR", + "customer_id": null, + "discount": false, + "first_payment_min_amount": null, + "force_offer": null, + "id": "QflczVVaNJciLq", + "late_auth_config_id": null, + "merchant_id": "OU2H3nkLn9jDVo", + "method": null, + "notes": [], + "offers": {}, + "order_metas": [], + "order_relationships": [], + "partial_payment": false, + "payer_name": null, + "payment_capture": true, + "product_id": "QflcnnZqCekuvL", + "product_type": "payment_link_v2", + "provider_context": null, + "public_key": "rzp_live_XXXXXXXXXXXXXX", + "public_response": null, + "receipt": "23", + "reference2": null, + "reference3": null, + "reference4": null, + "reference5": null, + "reference6": null, + "reference7": null, + "reference8": null, + "source": null, + "status": "paid", + "transfers": null, + "updated_at": 1749618372 + } + }, + "payment": { + "entity": { + "acquirer_data": { + "rrn": "103608848276" + }, + "amount": 1000, + "amount_refunded": 0, + "amount_transferred": 0, + "bank": null, + "base_amount": 1000, + "captured": true, + "card": null, + "card_id": null, + "contact": "+919876543210", + "created_at": 1749618371, + "currency": "INR", + "description": "#QflcnnZqCekuvL", + "email": null, + "entity": "payment", + "error_code": null, + "error_description": null, + "error_reason": null, + "error_source": null, + "error_step": null, + "fee": 24, + "fee_bearer": "platform", + "id": "pay_Qfldmt5StKZFCB", + "international": false, + "invoice_id": null, + "method": "upi", + "notes": [], + "order_id": "order_QflczVVaNJciLq", + "refund_status": null, + "status": "captured", + "tax": 4, + "upi": { + "payer_account_type": "bank_account", + "vpa": "gaurav.kumar@exampleupi" + }, + "vpa": "gaurav.kumar@exampleupi", + "wallet": null + } + }, + "payment_link": { + "entity": { + "accept_partial": false, + "amount": 1000, + "amount_paid": 1000, + "cancelled_at": 0, + "created_at": 1749618314, + "currency": "INR", + "customer": { + "contact": "9000090000", + "email": "gauravkumar@example.com" + }, + "description": "Test Payment", + "expire_by": 0, + "expired_at": 0, + "first_min_partial_amount": 0, + "id": "plink_QflcnnZqCekuvL", + "notes": null, + "notify": { + "email": false, + "sms": false, + "whatsapp": false + }, + "order_id": "order_QflczVVaNJciLq", + "reference_id": "23", + "reminder_enable": false, + "reminders": { + "status": "failed" + }, + "short_url": "https://rzp.io/rzp/twH5w1Y", + "status": "paid", + "updated_at": 1749618371, + "upi_link": false, + "user_id": "HWPf1AudnADDV5", + "whatsapp_link": false + } + } + } +} +```json: payment_link.paid (UPI) +{ + "account_id": "acc_MWWeS9Ico5tQBk", + "contains": [ + "payment_link", + "order", + "payment" + ], + "created_at": 1748586679, + "entity": "event", + "event": "payment_link.paid", + "payload": { + "order": { + "entity": { + "account_number": null, + "amount": 100, + "amount_due": 0, + "amount_paid": 100, + "app_offer": false, + "attempts": 1, + "authorized": true, + "bank": null, + "bank_account": null, + "checkout_config_id": null, + "created_at": 1748586685, + "currency": "INR", + "customer_id": null, + "discount": false, + "first_payment_min_amount": null, + "force_offer": null, + "id": "Qb2gOAUzSm5zpv", + "late_auth_config_id": null, + "merchant_id": "MWWeS9Ico5tQBk", + "method": "upi", + "notes": { + "policy_name": "Jeevan Bima" + }, + "offers": {}, + "order_metas": [], + "order_relationships": [], + "partial_payment": false, + "payer_name": null, + "payment_capture": true, + "product_id": "Qb2gHrKr01Maky", + "product_type": "payment_link_v2", + "provider_context": null, + "public_key": "rzp_live_XXXXXXXXXXXXXX", + "public_response": null, + "receipt": "UPItest2", + "reference2": null, + "reference3": null, + "reference4": null, + "reference5": null, + "reference6": null, + "reference7": null, + "reference8": null, + "source": null, + "status": "paid", + "transfers": null, + "updated_at": 1748586717 + } + }, + "payment": { + "entity": { + "acquirer_data": { + "rrn": "551652213711" + }, + "amount": 100, + "amount_captured": null, + "amount_refunded": 0, + "amount_transferred": 0, + "bank": null, + "base_amount": 100, + "captured": true, + "card": null, + "card_id": null, + "contact": "+918840152270", + "created_at": 1748586694, + "currency": "INR", + "description": "#Qb2gHrKr01Maky", + "email": "gaurav.kumar@example.com", + "entity": "payment", + "error_code": null, + "error_description": null, + "error_reason": null, + "error_source": null, + "error_step": null, + "fee": 2, + "fee_bearer": "platform", + "id": "pay_Qb2gYRc7dxedX8", + "international": false, + "invoice_id": null, + "method": "upi", + "notes": { + "policy_name": "Jeevan Bima" + }, + "order_id": "order_Qb2gOAUzSm5zpv", + "provider": null, + "refund_status": null, + "reward": null, + "status": "captured", + "tax": 0, + "upi": { + "payer_account_type": "bank_account", + "vpa": "gaurav.kumar@okexample" + }, + "vpa": "gaurav.kumar@okexample", + "wallet": null + } + }, + "payment_link": { + "entity": { + "accept_partial": false, + "amount": 100, + "amount_paid": 100, + "callback_method": "get", + "callback_url": "https://example-callback-url.com/", + "cancelled_at": 0, + "created_at": 1748586679, + "currency": "INR", + "customer": { + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "name": "Gaurav Kumar" + }, + "description": "Payment for policy no #23456", + "expire_by": 1748587814, + "expired_at": 0, + "first_min_partial_amount": 0, + "id": "plink_Qb2gHrKr01Maky", + "notes": { + "policy_name": "Jeevan Bima" + }, + "notify": { + "email": true, + "sms": true, + "whatsapp": false + }, + "order_id": "order_Qb2gOAUzSm5zpv", + "reference_id": "UPItest2", + "reminder_enable": true, + "reminders": { + "status": "failed" + }, + "short_url": "https://rzp.io/rzp/S12PdyW", + "status": "paid", + "updated_at": 1748586718, + "upi_link": true, + "user_id": "", + "whatsapp_link": false + } + } + } +} +``` + +### Payment Link Cancelled + +```json: payment_link.cancelled (Standard) +{ + "account_id": "acc_MWWeS9Ico5tQBk", + "contains": [ + "payment_link" + ], + "created_at": 1748425318, + "entity": "event", + "event": "payment_link.cancelled", + "payload": { + "payment_link": { + "entity": { + "accept_partial": true, + "amount": 1000, + "amount_paid": 0, + "callback_method": "get", + "callback_url": "https://example-callback-url.com/", + "cancelled_at": 1748425346, + "created_at": 1748425318, + "currency": "INR", + "customer": { + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "name": "Gaurav Kumar" + }, + "description": "Payment for policy no #23456", + "expire_by": 1748426427, + "expired_at": 0, + "first_min_partial_amount": 100, + "id": "plink_QaIrRSjWiIuxAO", + "notes": null, + "notify": { + "email": true, + "sms": true, + "whatsapp": false + }, + "reference_id": "NewTestPayment4", + "reminder_enable": true, + "reminders": { + "status": "failed" + }, + "short_url": "https://rzp.io/rzp/zIUYsg6E", + "status": "cancelled", + "updated_at": 1748425346, + "upi_link": false, + "user_id": "", + "whatsapp_link": false + } + } + } +} +```json: payment_link.cancelled (UPI) +{ + "account_id": "acc_MWWeS9Ico5tQBk", + "contains": [ + "payment_link" + ], + "created_at": 1748586933, + "entity": "event", + "event": "payment_link.cancelled", + "payload": { + "payment_link": { + "entity": { + "accept_partial": false, + "amount": 100, + "amount_paid": 0, + "callback_method": "get", + "callback_url": "https://example-callback-url.com/", + "cancelled_at": 1748586950, + "created_at": 1748586933, + "currency": "INR", + "customer": { + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "name": "Gaurav Kumar" + }, + "description": "Payment for policy no #23456", + "expire_by": 1748588114, + "expired_at": 0, + "first_min_partial_amount": 0, + "id": "plink_Qb2kkyr7V58HsP", + "notes": { + "policy_name": "Jeevan Bima" + }, + "notify": { + "email": true, + "sms": true, + "whatsapp": false + }, + "reference_id": "UPItest3", + "reminder_enable": true, + "reminders": { + "status": "failed" + }, + "short_url": "https://rzp.io/rzp/ZT8PL5TF", + "status": "cancelled", + "updated_at": 1748586950, + "upi_link": true, + "user_id": "", + "whatsapp_link": false + } + } + } +} +``` + +### Payment Link Expired + +```json: payment_link.expired (Standard) +{ + "account_id": "acc_MWWeS9Ico5tQBk", + "contains": [ + "payment_link" + ], + "created_at": 1748424975, + "entity": "event", + "event": "payment_link.expired", + "payload": { + "payment_link": { + "entity": { + "accept_partial": true, + "amount": 1000, + "amount_paid": 0, + "callback_method": "get", + "callback_url": "https://example-callback-url.com/", + "cancelled_at": 0, + "created_at": 1748424975, + "currency": "INR", + "customer": { + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "name": "Gaurav Kumar" + }, + "description": "Payment for policy no #23456", + "expire_by": 1748426427, + "expired_at": 1748426438, + "first_min_partial_amount": 100, + "id": "plink_QaIlOGFf8KZNF8", + "notes": { + "Test": "True" + }, + "notify": { + "email": true, + "sms": true, + "whatsapp": false + }, + "reference_id": "NewTestPayment", + "reminder_enable": true, + "reminders": { + "status": "failed" + }, + "short_url": "https://rzp.io/rzp/REnL57hV", + "status": "expired", + "updated_at": 1748424975, + "upi_link": false, + "user_id": "", + "whatsapp_link": false + } + } + } +} +```json: payment_link.expired (UPI) +{ + "account_id": "acc_MWWeS9Ico5tQBk", + "contains": [ + "payment_link" + ], + "created_at": 1748586657, + "entity": "event", + "event": "payment_link.expired", + "payload": { + "payment_link": { + "entity": { + "accept_partial": false, + "amount": 100, + "amount_paid": 0, + "callback_method": "get", + "callback_url": "https://example-callback-url.com/", + "cancelled_at": 0, + "created_at": 1748586657, + "currency": "INR", + "customer": { + "contact": "+919000090000", + "email": "gaurav.kumar@example.com", + "name": "Gaurav Kumar" + }, + "description": "Payment for policy no #23456", + "expire_by": 1748587814, + "expired_at": 1748587838, + "first_min_partial_amount": 0, + "id": "plink_Qb2ftTb6oRGMmu", + "notes": { + "policy_name": "Jeevan Bima" + }, + "notify": { + "email": true, + "sms": true, + "whatsapp": false + }, + "order_id": "order_Qb2g8aDXbi3yQd", + "reference_id": "UPItest1", + "reminder_enable": true, + "reminders": { + "status": "failed" + }, + "short_url": "https://rzp.io/rzp/l9G3mEO", + "status": "expired", + "updated_at": 1748586671, + "upi_link": true, + "user_id": "", + "whatsapp_link": false + } + } + } +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. +> +> - While generating a signature at your end, ensure that the webhook body is passed as an argument in the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> diff --git a/llm-content/webhooks/payments.md b/llm-content/webhooks/payments.md new file mode 100644 index 00000000..914d6424 --- /dev/null +++ b/llm-content/webhooks/payments.md @@ -0,0 +1,1334 @@ +--- +title: Payments Webhook Events +description: List of Payments webhook events along with sample payloads. +--- + +# Payments Webhook Events + +You can accept customer payments using Razorpay products. By subscribing to payments webhook events you can get notified about payment state changes. + +## List of Payments Webhook Events + +The table below lists the webhook events available for payments. + +Webhook Event | Description +--- +`payment.authorized` | Triggered when a payment is authorised. +--- +`payment.captured` | Triggered when a payment is successfully captured. +--- +`payment.failed` | Triggered when a payment fails. + +> **INFO** +> +> +> **Handy Tips** +> +> - The payload for a Webhook is a snapshot of the entity when the event occurred. +> For example, when a customer makes a payment, its status changes to `authorized`. It can then immediately move to the `captured` state. + +> - The payment can be in the `captured` state when the `payment.authorized` Webhook is fired. However, the payload for the `payment.authorized` event contains details of the events when the payment was authorised, not when it was captured. + +> - In case of network tokenised cards, the last 4 digits will be of the tokenised card and not the actual card. +- The field `flow` is present only in the case of Turbo UPI Payments. + +> +> + +### Comparison: payment.captured vs order.paid + +Orders and payments go hand-in-hand. Once a payment is captured, the order is marked paid. This is reflected in the `order.paid` and `payment.captured` webhook events as well. These events are triggered when the payment associated with the order is captured. + +`payment.captured` Webhook Event | `order.paid` Webhook Event +--- +This event is triggered when the payment is successfully captured. | This event is triggered when a customer completes the checkout process and the order's status changes to `paid`. +--- +This payload only contains the payment entity, providing details specific to the transaction, such as the amount, currency, and payment method. | This payload includes both order and payment entities, making all relevant information available in a single payload. + +## Sample Payloads + +Given below are the sample payloads for payments webhook events. + +### Payment Authorised + +```json: Netbanking +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "payment.authorized", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DESlfW9H8K9uqM", + "entity": "payment", + "amount": 100, + "currency": "", + "status": "authorized", + "order_id": "order_DESlLckIVRkHWj", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "", + "contact": "", + "notes": [], + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "0125836177" + }, + "created_at": 1567674599 + } + } + }, + "created_at": 1567674606 +} + +```json: Card +{ + "account_id": "acc_BFQ7uQEaa7j2z7", + "contains": [ + "payment" + ], + "created_at": 1691735748, + "entity": "event", + "event": "payment.authorized", + "payload": { + "payment": { + "entity": { + "acquirer_data": { + "auth_code": "828553", + "rrn": "322206890934" + }, + "amount": 100, + "amount_refunded": 0, + "amount_transferred": 0, + "bank": null, + "captured": true, + "card": { + "emi": false, + "entity": "card", + "id": "card_DESp9fNnu0RoNc", + "iin": "999999", + "international": false, + "issuer": null, + "last4": "0153", + "name": "", + "network": "Visa", + "sub_type": "business", + "type": "debit" + }, + "card_id": "card_DESp9fNnu0RoNc", + "contact": "", + "created_at": 1567674797, + "currency": "INR", + "description": null, + "email": "", + "entity": "payment", + "error_code": "", + "error_description": "", + "error_reason": null, + "error_source": null, + "error_step": null, + "fee": null, + "id": "pay_DESp9bgForNoUd", + "international": false, + "invoice_id": null, + "method": "card", + "notes": [], + "order_id": "order_DESoU0U4ikYA19", + "refund_status": null, + "status": "authorized", + "tax": null, + "token_id": "token_MOfFlFTC1CBDOi", + "vpa": null, + "wallet": null + } + } + } +} + +```json: Wallets +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "payment.authorized", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DEStK8twGApHtW", + "entity": "payment", + "amount": 100, + "currency": "", + "status": "authorized", + "order_id": "order_DESso0U9bpuzQc", + "invoice_id": null, + "international": false, + "method": "wallet", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": "payzapp", + "vpa":null, + "email": "", + "contact": "+919876543210", + "notes": [], + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "transaction_id": null + }, + "created_at": 1567675034 + } + } + }, + "created_at": 1567675037 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "payment.authorized", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DESyzxuld02Zul", + "entity": "payment", + "amount": 100, + "currency": "", + "status": "authorized", + "order_id": "order_DESxiijbl9xjDB", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "", + "contact": "", + "notes": [], + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "0125836177" + }, + "created_at": 1567675356, + "upi": { + "payer_account_type": "credit_card", + "vpa": "gaurav.kumar@upi", + "flow": "intent" + } + } + } + }, + "created_at": 1567675356 +} +``` + +### Payment Captured + +```json: Netbanking +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "payment.captured", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DESlfW9H8K9uqM", + "entity": "payment", + "amount": 100, + "currency": "", + "base_amount": 100, + "status": "captured", + "order_id": "order_DESlLckIVRkHWj", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "", + "contact": "", + "notes": [], + "fee": 2, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "0125836177" + }, + "created_at": 1567674599 + } + } + }, + "created_at": 1567674606 +} + +```json: Card +{ + "account_id": "acc_BFQ7uQEaa7j2z7", + "contains": [ + "payment" + ], + "created_at": 1691735748, + "entity": "event", + "event": "payment.captured", + "payload": { + "payment": { + "entity": { + "acquirer_data": { + "auth_code": "828553", + "rrn": "322206890934" + }, + "amount": 100, + "amount_refunded": 0, + "amount_transferred": 0, + "bank": null, + "captured": true, + "card": { + "emi": false, + "entity": "card", + "id": "card_DESp9fNnu0RoNc", + "iin": "999999", + "international": false, + "issuer": null, + "last4": "0153", + "name": "", + "network": "Visa", + "sub_type": "business", + "type": "debit" + }, + "card_id": "card_DESp9fNnu0RoNc", + "contact": "", + "created_at": 1567674797, + "currency": "INR", + "description": null, + "email": "", + "entity": "payment", + "error_code": "", + "error_description": "", + "error_reason": null, + "error_source": null, + "error_step": null, + "fee": null, + "id": "pay_DESp9bgForNoUd", + "international": false, + "invoice_id": null, + "method": "card", + "notes": [], + "order_id": "order_DESoU0U4ikYA19", + "refund_status": null, + "status": "captured", + "tax": null, + "token_id": "token_MOfFlFTC1CBDOi", + "vpa": null, + "wallet": null + } + } + } +} + +```json: Wallets +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "payment.captured", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DEStK8twGApHtW", + "entity": "payment", + "amount": 100, + "currency": "", + "base_amount": 100, + "status": "captured", + "order_id": "order_DESso0U9bpuzQc", + "invoice_id": null, + "international": false, + "method": "wallet", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": "payzapp", + "vpa": null, + "email": "", + "contact": "", + "notes": [], + "fee": 2, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "transaction_id": null + }, + "created_at": 1567675034 + } + } + }, + "created_at": 1567675037 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "payment.captured", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DESyzxuld02Zul", + "entity": "payment", + "amount": 100, + "currency": "", + "base_amount": 100, + "status": "captured", + "order_id": "order_DESxiijbl9xjDB", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "", + "contact": "", + "notes": [], + "fee": 2, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "0125836177" + }, + "created_at": 1567675356, + "upi": { + "payer_account_type": "credit_card", + "vpa": "gaurav.kumar@upi", + "flow": "intent" + } + } + } + }, + "created_at": 1567675356 +} +``` + +> **WARN** +> +> +> +> **Watch Out!** +> +> You may occasionally observe a `payment.failed` webhook followed by a `payment.captured` webhook for the same transaction. While late authorisation is a known reason for this, user-initiated retries, particularly with UPI transactions, also cause this sequence. +> +> Here is a common scenario: +> +> A customer attempts a UPI payment via their Third-Party Application Provider (TPAP) such as PhonePe or Google Pay. The initial attempt fails, perhaps due to an **incorrect PIN** or **insufficient balance**. +> +> Most UPI TPAPs offer an immediate option to retry the payment directly within their app. When a customer retries, here is how our system responds: +> +> 1. We **trigger and send a `payment.failed` webhook** to your configured endpoint, indicating the initial payment failure. +> 2. If the customer retries the payment and successfully completes it (for example, by entering the correct PIN), the transaction concludes. +> 3. Subsequently, we **send a `payment.captured` webhook**, confirming the successful capture of funds for that same transaction. +> +> This sequence is **expected behaviour**. It allows customers to correct errors and complete their transactions without having to start a new payment process. +> +> + +### Payment Failed + +```json: Netbanking +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "payment.failed", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DEAU825sJlCbGa", + "entity": "payment", + "amount": 50000, + "currency": "", + "status": "failed", + "order_id": "order_DEATVTRRctwEGb", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "", + "contact": "", + "notes": [], + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "error_source": "bank", + "error_step": "payment_authorization", + "error_reason": "payment_failed", + "acquirer_data": { + "bank_transaction_id": null + }, + "created_at": 1567610214 + } + } + }, + "created_at": 1567610215 +} +```json: Card +{ + "account_id": "acc_BFQ7uQEaa7j2z7", + "contains": [ + "payment" + ], + "created_at": 1691735748, + "entity": "event", + "event": "payment.failed", + "payload": { + "payment": { + "entity": { + "acquirer_data": { + "auth_code": "828553", + "rrn": "322206890934" + }, + "amount": 100, + "amount_refunded": 0, + "amount_transferred": 0, + "bank": null, + "captured": true, + "card": { + "emi": false, + "entity": "card", + "id": "card_DESp9fNnu0RoNc", + "iin": "999999", + "international": false, + "issuer": null, + "last4": "0153", + "name": "", + "network": "Visa", + "sub_type": "business", + "type": "debit" + }, + "card_id": "card_DESp9fNnu0RoNc", + "contact": "+919000090000", + "created_at": 1567674797, + "currency": "", + "description": null, + "email": "", + "entity": "payment", + "error_code": "", + "error_description": "", + "error_reason": null, + "error_source": null, + "error_step": null, + "fee": null, + "id": "pay_DESp9bgForNoUd", + "international": false, + "invoice_id": null, + "method": "card", + "notes": [], + "order_id": "order_DESoU0U4ikYA19", + "refund_status": null, + "status": "failed", + "tax": null, + "token_id": "token_MOfFlFTC1CBDOi", + "vpa": null, + "wallet": null + } + } + } +} + +```json: Wallets +{ + "entity": "event", + "account_id": "acc_E6ztBHzyaVFgBV", + "event": "payment.failed", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_Epiu9wz2hXBGsJ", + "entity": "payment", + "amount": 10000, + "currency": "", + "status": "failed", + "order_id": "order_Epitst92Bya4gC", + "invoice_id": "inv_EpitssSmeINDJU", + "international": false, + "method": "wallet", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": "#inv_EpitssSmeINDJU", + "card_id": null, + "bank": null, + "wallet": "payzapp", + "vpa": null, + "email": "", + "contact": "", + "notes": [], + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "error_source": "issuer", + "error_step": "payment_authorization", + "error_reason": "payment_failed", + "acquirer_data": { + "transaction_id": null + }, + "created_at": 1589347098 + } + } + }, + "created_at": 1589347099 +} +```json: UPI +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "payment.failed", + "contains": [ + "payment" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DESyzxuld02Zul", + "entity": "payment", + "amount": 100, + "currency": "", + "status": "failed", + "order_id": "order_DESxiijbl9xjDB", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@upi", + "email": "", + "contact": "+919876543210", + "notes": [], + "fee": null, + "tax": null, + "error_code": "BAD_REQUEST_ERROR", + "error_description": "Payment failed", + "error_source": "issuer", + "error_step": "payment_authorization", + "error_reason": "payment_failed", + "acquirer_data": { + "rrn": null + }, + "created_at": 1567675356, + "upi": { + "payer_account_type": "credit_card", + "vpa": "gaurav.kumar@upi", + "flow": "intent" + } + } + } + }, + "created_at": 1567675356 +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - Do not hardcode the `vpa` parameter in the integration. If a UPI Intent payment fails, the `vpa` parameter may not get displayed at times. +> - The webhook sequence is not fixed in the **JSON** payload for payment events. +> - `payment.failed` is not triggered if the payment fails during authorisation (while making the first payment). +> + +## Payments Downtime + +Downtime is a period during which one or more payment options underperform, leading to considerable delays in payment processing. These downtimes are due to technical issues or outages at Razorpay's partner or issuing banks side. Razorpay informs you about the downtime to communicate it to your customers. + +### List of Payments Downtime Webhook Events + +The table below lists the webhook events available for payments downtime. + +Webhook Event | Description +--- +`payment.downtime.started` | Triggered at the beginning of the downtime. +--- +`payment.downtime.resolved` | Triggered when a downtime is resolved. +--- +`payment.downtime.updated` | Triggered when a downtime is updated. + +### Payment Downtime Started + +```json: Netbanking +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.started", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "netbanking", + "begin": 1591935238, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "bank": "VIJB" + }, + "instrument_schema": ["bank"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: Card - Issuer +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.started", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "card", + "begin": 1591935238, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "issuer": "SBIN", + "type": "credit" + }, + "instrument_schema": ["issuer", "type"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: Card - Network +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.started", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "card", + "begin": 1591935238, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "network": "MC", + "type": "credit" + }, + "instrument_schema": ["network", "type"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: UPI - VPA Handle +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.started", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "upi", + "begin": 1591935238, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "vpa_handle": "oksbi", + "flow":"collect" + }, + "instrument_schema": ["vpa_handle", "flow"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: UPI - PSP +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.started", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "upi", + "begin": 1591935238, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "psp": "bhim", + "flow":"collect" + }, + "instrument_schema": ["psp", "flow"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: Turbo UPI +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.started", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F8LCfthx90fMOo", + "method": "upi", + "begin": 1593412063, + "end": null, + "status": "started", + "scheduled": false, + "severity": "high", + "instrument": { + "flow": "in_app" + }, + "created_at": 1593412092, + "updated_at": 1593412092 + } + + } + }, + "created_at": 1591935238 +} +``` + +### Payment Downtime Resolved + +```json: Netbanking +{ + "entity": "event", + "account_id": "acc_DjF2cSbjtnqhJ5", + "event": "payment.downtime.resolved", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_ENCWhh1lon7Hpp", + "entity": "payment.downtime", + "method": "netbanking", + "begin": 1583119550, + "end": 1583119551, + "status": "resolved", + "scheduled": false, + "severity": "medium", + "instrument": { + "bank": "COSB" + }, + "instrument_schema": ["bank"], + "created_at": 1583119551, + "updated_at": 1591948663 + } + } + }, + "created_at": 1591948663 +} + +```json: Card - Issuer +{ + "entity": "event", + "account_id": "acc_DjF2cSbjtnqhJ5", + "event": "payment.downtime.resolved", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_ENCWhh1lon7Hpp", + "entity": "payment.downtime", + "method": "card", + "begin": 1583119550, + "end": 1583119551, + "status": "resolved", + "scheduled": false, + "severity": "medium", + "instrument": { + "issuer": "SBIN", + "type": "credit" + }, + "instrument_schema": ["issuer", "type"], + "created_at": 1583119551, + "updated_at": 1591948663 + } + } + }, + "created_at": 1591948663 +} + +```json: Card - Network +{ + "entity": "event", + "account_id": "acc_DjF2cSbjtnqhJ5", + "event": "payment.downtime.resolved", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_ENCWhh1lon7Hpp", + "entity": "payment.downtime", + "method": "card", + "begin": 1583119550, + "end": 1583119551, + "status": "resolved", + "scheduled": false, + "severity": "medium", + "instrument": { + "network": "MC", + "type": "credit" + }, + "instrument_schema": ["network", "type"], + "created_at": 1583119551, + "updated_at": 1591948663 + } + } + }, + "created_at": 1591948663 +} + +```json: UPI - VPA Handle +{ + "entity": "event", + "account_id": "acc_DjF2cSbjtnqhJ5", + "event": "payment.downtime.resolved", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_ENCWhh1lon7Hpp", + "entity": "payment.downtime", + "method": "upi", + "begin": 1583119550, + "end": 1583119551, + "status": "resolved", + "scheduled": false, + "severity": "medium", + "instrument": { + "vpa_handle": "oksbi", + "flow":"collect" + }, + "instrument_schema": ["vpa_handle", "flow"], + "created_at": 1583119551, + "updated_at": 1591948663 + } + } + }, + "created_at": 1591948663 +} + +```json: UPI - PSP +{ + "entity": "event", + "account_id": "acc_DjF2cSbjtnqhJ5", + "event": "payment.downtime.resolved", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_ENCWhh1lon7Hpp", + "entity": "payment.downtime", + "method": "upi", + "begin": 1583119550, + "end": 1583119551, + "status": "resolved", + "scheduled": false, + "severity": "medium", + "instrument": { + "psp": "bhim", + "flow":"collect" + }, + "instrument_schema": ["psp", "flow"], + "created_at": 1583119551, + "updated_at": 1591948663 + } + } + }, + "created_at": 1591948663 +} + +```json: Turbo UPI +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.resolved", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F8LCfthx90fMOo", + "method": "upi", + "begin": 1593412063, + "end": null, + "status": "resolved", + "scheduled": false, + "severity": "high", + "instrument": { + "flow": "in_app" + }, + "created_at": 1593412092, + "updated_at": 1593412092 + } + + } + }, + "created_at": 1591935238 +} +``` + +### Payment Downtime Updated + +```json: Netbanking +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.updated", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "netbanking", + "begin": 1591935238, + "end": null, + "status": "updated", + "scheduled": false, + "severity": "high", + "instrument": { + "bank": "VIJB" + }, + "instrument_schema": ["bank"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: Card - Network +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.updated", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "card", + "begin": 1591935238, + "end": null, + "status": "updated", + "scheduled": false, + "severity": "high", + "instrument": { + "network": "MC", + "type": "credit" + }, + "instrument_schema": ["network", "type"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: Card - Issuer +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.updated", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "card", + "begin": 1591935238, + "end": null, + "status": "updated", + "scheduled": false, + "severity": "high", + "instrument": { + "issuer": "SBIN", + "type": "credit" + }, + "instrument_schema": ["issuer", "type"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: UPI - VPA Handle +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.updated", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "upi", + "begin": 1591935238, + "end": null, + "status": "updated", + "scheduled": false, + "severity": "high", + "instrument": { + "vpa_handle": "oksbi", + "flow": "collect" + }, + "instrument_schema": ["vpa_handle", "flow"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: UPI - PSP +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.updated", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F1Zppa6lcVheSE", + "entity": "payment.downtime", + "method": "upi", + "begin": 1591935238, + "end": null, + "status": "updated", + "scheduled": false, + "severity": "high", + "instrument": { + "psp": "bhim", + "flow": "collect" + }, + "instrument_schema": ["psp", "flow"], + "created_at": 1591935238, + "updated_at": 1591935238 + } + } + }, + "created_at": 1591935238 +} + +```json: Turbo UPI +{ + "entity": "event", + "account_id": "acc_CWX291oykl9aZA", + "event": "payment.downtime.updated", + "contains": [ + "payment.downtime" + ], + "payload": { + "payment.downtime": { + "entity": { + "id": "down_F8LCfthx90fMOo", + "method": "upi", + "begin": 1593412063, + "end": null, + "status": "updated", + "scheduled": false, + "severity": "high", + "instrument": { + "flow": "in_app" + }, + "created_at": 1593412092, + "updated_at": 1593412092 + } + + } + }, + "created_at": 1591935238 +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. +> +> - While generating a signature at your end, ensure that the webhook body is passed as an argument in the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> diff --git a/llm-content/webhooks/payout-links.md b/llm-content/webhooks/payout-links.md new file mode 100644 index 00000000..9f2b6a15 --- /dev/null +++ b/llm-content/webhooks/payout-links.md @@ -0,0 +1,427 @@ +--- +title: Payout Links Webhook Events +description: List of Payout Links webhook events along with sample payloads. +--- + +# Payout Links Webhook Events + +Payout Links enable you to make payouts to those Contacts whose Fund Account details are not available. The payload remains the same irrespective of the `fund_account_type` to which payout was made. That is, the payload is same whether the payout was made to a bank account, VPA or card. + +## List of Payout Links Webhook Events + +The table below lists the webhook events available for RazorpayX Payout Links. + +Term | Description +--- +`payout_link.pending` | Triggered whenever a payout link moves to the `pending` state. This indicates that the payout link has been created. Applicable only for cases where approval workflow is set. +--- +`payout_link.issued` | Triggered whenever a payout link moves to the `issued` state. This indicates that the payout link has been created. +--- +`payout_link.processing` | Triggered whenever a payout link moves to the `processing` state. This indicates that your contact has entered their fund account details and the payout is being processed. +--- +`payout_link.processed` | Triggered whenever a payout link moves to the `processed` state. This indicates that the payout has been successfully made. +--- +`payout_link.attempted` | Triggered whenever the underlying payout has reversed and another attempt is required on the payout link. +--- +`payout_link.cancelled` | Triggered whenever a payout link moves to the `cancelled` state. This indicates that you have cancelled the payout link. +--- +`payout_link.rejected` | Triggered whenever a payout link moves to the `rejected` state. This indicates that the Approver has rejected the payout link. Applicable only for cases where approval workflow is set. +--- +`payout_link.expired`| Triggered whenever a payout link moves to the `expired` state. This indicates that the payout link has expired. + +> **INFO** +> +> **Handy Tips** + Expiry feature for Payout Links must be enabled before using this webhook event. Know more about how to [ enable the expiry feature.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md) + +## Sample Payloads + +Given below are the sample payloads for Payout Links webhook events. + +### Payout Link Attempted + +```json: payout_link.attempted +{ + "entity": "event", + "account_id": "acc_BfVUrG6tDiL7H0", + "event": "payout_link.attempted", + "contains": [ + "payout_link" + ], + "payload": { + "payout_link": { + "entity": { + "id": "poutlk_00000000000001", + "entity": "payout_link", + "contact_id": "cont_00000000000001", + "contact": { + "name": "Gaurav Kumar", + "contact": "912345678", + "email": "gaurav.kumar@example.com" + }, + "fund_account_id": "fa_00000000000001", + "purpose": "refund", + "status": "issued", + "amount": 1000, + "currency": "INR", + "description": "Payout link for Gaurav Kumar", + "attempt_count": 0, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "short_url": "https://rzp.io/i/3b1Tw6", + "send_sms": true, + "send_email": true, + "cancelled_at": null, + "created_at": 1545383037, + "expire_by": 1545384058, + "expired_at": null + } + } + }, + "created_at": 1545383037 +} +``` + +### Payout Link Issued + +```json: payout_link.issued +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "payout_link.issued", + "contains": [ + "payout_link" + ], + "payload": { + "payout_link": { + "entity": { + "id": "poutlk_FKkrBbaVLrr72C", + "entity": "payout_link", + "contact_id": "cont_FKkZzShONqnji5", + "contact": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210" + }, + "fund_account_id": null, + "purpose": "refund", + "status": "issued", + "amount": 1000, + "currency": "INR", + "description": "Payout link for Gaurav Kumar", + "attempt_count": 0, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "short_url": "https://rzp.io/i/hEHLODQ", + "send_sms": true, + "send_email": true, + "cancelled_at": null, + "created_at": 1596122515, + "expire_by": 1545384058, + "expired_at": null + } + } + }, + "created_at": 1596122515 +} +``` + +### Payout Link Pending + +```json: payout_link.pending +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "payout_link.pending", + "contains": [ + "payout_link" + ], + "payload": { + "payout_link": { + "entity": { + "id": "poutlk_FKkrBbaVLrr72C", + "entity": "payout_link", + "contact_id": "cont_FKkZzShONqnji5", + "contact": { + "name": "Gaurav Kumar", + "email": "gaurav.kumar@example.com", + "contact": "9876543210" + }, + "fund_account_id": null, + "purpose": "refund", + "status": "pending", + "amount": 1000, + "currency": "INR", + "description": "Payout link for Gaurav Kumar", + "attempt_count": 0, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "short_url": "https://rzp.io/i/hEHLODQ", + "send_sms": true, + "send_email": true, + "cancelled_at": null, + "created_at": 1596122515, + "expire_by": 1545384058, + "expired_at": null + } + } + }, + "created_at": 1596122515 +} +``` + +### Payout Link Processing + +The `fund_account_id` is populated at this stage. + +```json: payout_link.processing +{ + "entity": "event", + "account_id": "acc_BfVUrG6tDiL7H0", + "event": "payout_link.processing", + "contains": [ + "payout_link" + ], + "payload": { + "payout_link": { + "entity": { + "id": "poutlk_00000000000001", + "entity": "payout_link", + "contact_id": "cont_00000000000001", + "contact": { + "name": "Gaurav Kumar", + "contact": "912345678", + "email": "gaurav.kumar@example.com" + }, + "fund_account_id": "fa_00000000000001", + "purpose": "refund", + "status": "processing", + "amount": 1000, + "currency": "INR", + "description": "Payout link for Gaurav Kumar", + "attempt_count": 1, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "short_url": "https://rzp.io/i/3b1Tw6", + "send_sms": true, + "send_email": true, + "cancelled_at": null, + "created_at": 1545383037, + "expire_by": 1545384058, + "expired_at": null + } + } + }, + "created_at": 1545383037 +} +``` + +### Payout Link Processed + +```json: payout_link.processed +{ + "entity": "event", + "account_id": "acc_BfVUrG6tDiL7H0", + "event": "payout_link.processed", + "contains": [ + "payout_link" + ], + "payload": { + "payout_link": { + "entity": { + "id": "poutlk_00000000000001", + "entity": "payout_link", + "contact_id": "cont_00000000000001", + "contact": { + "name": "Gaurav Kumar", + "contact": "912345678", + "email": "gaurav.kumar@example.com" + }, + "fund_account_id": "fa_00000000000001", + "purpose": "refund", + "status": "processed", + "amount": 1000, + "currency": "INR", + "description": "Payout link for Gaurav Kumar", + "attempt_count": 1, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "short_url": "https://rzp.io/i/3b1Tw6", + "send_sms": true, + "send_email": true, + "cancelled_at": null, + "created_at": 1545383037, + "expire_by": 1545384058, + "expired_at": null + } + } + }, + "created_at": 1545383037 +} +``` + +### Payout Link Rejected + +```json: payout_link.rejected +{ + "entity": "event", + "account_id": "acc_BfVUrG6tDiL7H0", + "event": "payout_link.rejected", + "contains": [ + "payout_link" + ], + "payload": { + "payout_link": { + "entity": { + "id": "poutlk_00000000000001", + "entity": "payout_link", + "contact_id": "cont_00000000000001", + "contact": { + "name": "Gaurav Kumar", + "contact": "912345678", + "email": "gaurav.kumar@example.com" + }, + "fund_account_id": null, + "purpose": "refund", + "status": "rejected", + "amount": 1000, + "currency": "INR", + "description": "Payout link for Gaurav Kumar", + "attempt_count": 0, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "short_url": "https://rzp.io/i/3b1Tw6", + "send_sms": true, + "send_email": true, + "cancelled_at": null, + "created_at": 1545383037, + "expire_by": 1545384058, + "expired_at": null + } + } + }, + "created_at": 1545383037 +} +``` + +### Payout Link Cancelled + +```json: payout_link.cancelled +{ + "entity": "event", + "account_id": "acc_BfVUrG6tDiL7H0", + "event": "payout_link.cancelled", + "contains": [ + "payout_link" + ], + "payload": { + "payout_link": { + "entity": { + "id": "poutlk_00000000000001", + "entity": "payout_link", + "contact_id": "cont_00000000000001", + "contact": { + "name": "Gaurav Kumar", + "contact": "912345678", + "email": "gaurav.kumar@example.com" + }, + "fund_account_id": null, + "purpose": "refund", + "status": "cancelled", + "amount": 1000, + "currency": "INR", + "description": "Payout link for Gaurav Kumar", + "attempt_count": 0, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "short_url": "https://rzp.io/i/3b1Tw6", + "send_sms": true, + "send_email": true, + "cancelled_at": 1595383037, + "created_at": 1545383037, + "expire_by": 1545384058, + "expired_at": null + } + } + }, + "created_at": 1545383037 +} +``` + +### Payout Link Expired + +```json: payout_link.expired +{ + "entity": "event", + "account_id": "acc_BfVUrG6tDiL7H0", + "event": "payout_link.expired", + "contains": [ + "payout_link" + ], + "payload": { + "payout_link": { + "entity": { + "id": "poutlk_00000000000001", + "entity": "payout_link", + "contact_id": "cont_00000000000001", + "contact": { + "name": "Gaurav Kumar", + "contact": "912345678", + "email": "gaurav.kumar@example.com" + }, + "fund_account_id": null, + "purpose": "refund", + "status": "cancelled", + "amount": 1000, + "currency": "INR", + "description": "Payout link for Gaurav Kumar", + "attempt_count": 0, + "receipt": "Receipt No. 1", + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "short_url": "https://rzp.io/i/3b1Tw6", + "send_sms": true, + "send_email": true, + "cancelled_at": null, + "created_at": 1545383037, + "expire_by": 1545384058, + "expired_at": 1545384658 + } + } + }, + "created_at": 1545383037 +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. +> +> - While generating a signature at your end, ensure that the webhook body is passed as an argument in the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> diff --git a/llm-content/webhooks/payouts-approval.md b/llm-content/webhooks/payouts-approval.md new file mode 100644 index 00000000..a912c9fd --- /dev/null +++ b/llm-content/webhooks/payouts-approval.md @@ -0,0 +1,170 @@ +--- +title: Payouts Approval Webhook Events +description: List of Payouts Approval webhook events along with sample payloads. +--- + +# Payouts Approval Webhook Events + +Assign user roles to create and approve payouts using the [Payouts Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-approval.md). + +## List of Payouts Approval Webhook Events + +The table below lists the webhook events available for RazorpayX Payouts Approval. + +Webhook Event | Description +--- +`payout.pending` | Triggered whenever a payout moves to the pending state. The payout remains in this state till you approve or reject it. + +## Sample Payloads + +Given below are the sample payloads for Payouts Approval webhook events. + +### Payout Pending + +```json: UPI +{ + "entity": "event", + "account_id": "acc_BfVUrG6tDiL7H0", + "event": "payout.pending", + "contains": [ + "payout" + ], + "payload": { + "payout": { + "entity": { + "id": "pout_1Aa00000000001", + "entity": "payout", + "fund_account": { + "id": "fa_F681qr6Bqy1Je7", + "entity": "fund_account", + "contact_id": "cont_F681qmU11CfPDl", + "contact": { + "id": "cont_F681qmU11CfPDl", + "entity": "contact", + "name": "Gaurav Kumar", + "contact": "9876543210", + "email": "gaurav.kumar@example.com", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1592929016 + }, + "account_type": "bank_account", + "vpa": { + "username": "gaurav.kumar", + "handle": "exampleupi", + "address": "gaurav.kumar@exampleupi" + } + }, + "batch_id": "null", + "active": true, + "created_at": 1592929016 + }, + "amount": 100, + "currency": "INR", + "notes": { + "note_key 1": "Tea. Earl Gray. Hot.", + "note_key 2": "Tea. Earl Gray. Decaf." + }, + "fees": 0, + "tax": 0, + "status": "pending", + "purpose": "refund", + "utr": null, + "mode": "NEFT", + "reference_id": null, + "narration": "Test Fund Transfer", + "batch_id": null, + "status_details": { + "description": "Confirmation of the credit to the beneficiary is pending from HDFC bank. Please check the status after 24th October 2021, 10:40 PM", + "source": "beneficiary_bank" + }, + "created_at": 1580808301 + } + } +} +```json: Bank Account +{ + "entity": "event", + "account_id": "acc_BfVUrG6tDiL7H0", + "event": "payout.pending", + "contains": [ + "payout" + ], + "payload": { + "payout": { + "entity": { + "id": "pout_1Aa00000000001", + "entity": "payout", + "fund_account": { + "id": "fa_F681qr6Bqy1Je7", + "entity": "fund_account", + "contact_id": "cont_F681qmU11CfPDl", + "contact": { + "id": "cont_F681qmU11CfPDl", + "entity": "contact", + "name": "Gaurav Kumar", + "contact": "9876543210", + "email": "gaurav.kumar@example.com", + "type": "employee", + "reference_id": "Acme Contact ID 12345", + "batch_id": null, + "active": true, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "created_at": 1592929016 + }, + "account_type": "bank_account", + "bank_account": { + "ifsc": "HDFC0001234", + "bank_name": "HDFC Bank", + "name": "Gaurav Kumar", + "notes": [], + "account_number": "1121431121541121" + }, + "batch_id": null, + "active": true, + "created_at": 1592929016 + }, + "amount": 100, + "currency": "INR", + "notes": { + "note_key 1": "Tea. Earl Gray. Hot.", + "note_key 2": "Tea. Earl Gray. Decaf." + }, + "fees": 0, + "tax": 0, + "status": "pending", + "purpose": "refund", + "utr": null, + "mode": "NEFT", + "reference_id": null, + "narration": "Test Fund Transfer", + "batch_id": null, + "status_details": { + "description": "Confirmation of the credit to the beneficiary is pending from HDFC bank. Please check the status after 24th October 2021, 10:40 PM", + "source": "beneficiary_bank" + }, + "created_at": 1580808301 + } + } + } +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. +> +> - While generating a signature at your end, ensure that the webhook body is passed as an argument in the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> diff --git a/llm-content/webhooks/payouts.md b/llm-content/webhooks/payouts.md new file mode 100644 index 00000000..b5f68ad3 --- /dev/null +++ b/llm-content/webhooks/payouts.md @@ -0,0 +1,519 @@ +--- +title: Payouts Webhook Events +description: List of Payouts webhook events along with sample payloads. +--- + +# Payouts Webhook Events + +Payouts are transfer of funds from your business account to a contact's fund account. + +## List of Payouts Webhook Events + +The table below lists the webhook events available for RazorpayX Payouts. + +Webhook Event | Applicable For | Description +--- +`payout.pending` |_all payouts_ | Triggered whenever a payout moves to the `pending` state. The payout remains in this state till you approve or reject it. +--- +`payout.rejected` |_all payouts_ | Triggered whenever a payout moves to the `rejected` state. The payout was rejected by someone from your team. +--- +`payout.queued` |_all payouts_ | - Triggered whenever a payout moves to the queued state. Payout goes to queued state when you do not have sufficient funds to process it or when the beneficiary bank/NPCI/partner bank is down. This event is applicable only for RazorpayX Lite. +- You will receive the reason for the payout to be in the queued state as part of the status_details object. + +--- +`payout.initiated` |_all payouts_ | Triggered when the payout moves to the `processing` state when the payout is created or from the `queued` state when sufficient funds are available to process the payout. +--- +`payout.processed` |_all payouts_ | Triggered when a payout moves to the `processed` state. This happens when the payout is processed by the contact's bank. +--- +`payout.updated`|_all payouts_ | Triggered whenever there is a change in the payout entity. For example, when we receive the UTR for the payout from the bank. - For NEFT transactions, this webhook is fired within 90 seconds. +- For IMPS and UPI transactions, this webhook is generally fired immediately. + +--- +`payout.reversed` |_all payouts_ | Triggered whenever a payout fails and the amount is returned to your business account. +--- +`payout.failed` |_all payouts_ | Triggered when a payout is failed because the beneficiary bank OR NPCI OR processing partner bank is down. If the beneficiary bank/partner bank/NPCI does not recover within the stipulated SLA, a FAILED event will be sent with the respective reason. +> **INFO** +> +> **Handy Tips** It is mandatory to subscribe to the `payout.failed` event if you are using Payout APIs. + +--- +`payout.downtime.started` | _all payouts_ | Triggered when a payout downtime starts. Do not initiate a payout if this is triggered since the beneficiary bank is down and the payout will fail. +> **WARN** +> +> **Watch Out!** UPI mode is not supported by `payout.downtime` webhooks. + +--- +`payout.downtime.resolved` | _all payouts_ | Triggered when a payout downtime is resolved. Make payouts once this webhook is triggered as it indicates that the beneficiary bank downtime is resolved. + +**Handy Tips** + +The `error` object has been deprecated. + +## Sample Payloads + +Given below are the sample payloads for Payouts webhook events. + +### Payout Pending + +```json: payout.pending +{ + "entity":"event", + "account_id":"acc_BfVUrG6tDiL7H0", + "event":"payout.pending", + "contains":[ + "payout" + ], + "payload":{ + "payout":{ + "entity":{ + "id":"pout_1Aa00000000001", + "entity":"payout", + "fund_account_id":"fa_1Aa00000000001", + "amount":100, + "currency":"INR", + "notes":{ + "note_key 1":"Tea. Earl Gray. Hot.", + "note_key 2":"Tea. Earl Gray. Decaf." + }, + "fees":0, + "tax":0, + "status":"pending", + "purpose":"refund", + "utr":null, + "mode":"NEFT", + "reference_id":null, + "narration":"Test Fund Transfer", + "debit_account_number": "null", + "batch_id":null, + "status_details": { + "description": "Confirmation of the credit to the beneficiary is pending from HDFC bank. Please check the status after after 24th October 2021, 10:40 PM", + "source": "beneficiary_bank", + "reason": "beneficiary_bank_confirmation_pending" + } + "created_at":1580808301, + "fee_type": "" + } + } + }, + "created_at":1580808301 +} +``` + +Know about the [Payouts Approval Payload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-approval.md#webhooks). + +### Payout Rejected + +```json: payout.rejected +{ + "entity":"event", + "account_id":"acc_BfVUrG6tDiL7H0", + "event":"payout.rejected", + "contains":[ + "payout" + ], + "payload":{ + "payout":{ + "entity":{ + "id":"pout_1Aa00000000001", + "entity":"payout", + "fund_account_id":"fa_1Aa00000000001", + "amount":10000, + "currency":"INR", + "notes":{ + "note_key 1":"Tea. Earl Gray. Hot.", + "note_key 2":"Tea. Earl Gray. Decaf." + }, + "fees":0, + "tax":0, + "status":"rejected", + "purpose":"refund", + "utr":null, + "mode":"NEFT", + "reference_id":null, + "narration":"Acme Fund Transfer", + "debit_account_number": "null", + "batch_id":null, + "status_details": { + "description": "Payout rejected by beneficiary bank. Please contact beneficiary bank", + "source": "beneficiary_bank", + "reason": "beneficiary_bank_rejected" + } + "created_at":1581512005, + "fee_type": "" + } + } + }, + "created_at":1581512006 +} +``` + +### Payout Queued + +```json: payout.queued +{ + "entity":"event", + "account_id":"acc_BfVUrG6tDiL7H0", + "event":"payout.queued", + "contains":[ + "payout" + ], + "payload":{ + "payout":{ + "entity":{ + "id":"pout_1Aa00000000001", + "entity":"payout", + "fund_account_id":"fa_1Aa00000000001", + "amount":286540, + "currency":"INR", + "notes":{ + "note_key 1":"Tea. Earl Gray. Hot.", + "note_key 2":"Tea. Earl Gray. Decaf." + }, + "fees":0, + "tax":0, + "status":"queued", + "purpose":"payout", + "utr":null, + "mode":"IMPS", + "reference_id":null, + "narration":"Acme Fund Transfer", + "debit_account_number": "null", + "batch_id":null, + "status_details": { + "description": "Payout is queued as there is insufficient balance in your business account to process the payout", + "source": "business", + "reason": "low_balance" + } + "created_at":1580119445, + "fee_type": "" + } + } + }, + "created_at":1580119445 +} +``` + +### Payout Initiated + +```json: payout.initiated +{ + "entity":"event", + "account_id":"acc_BfVUrG6tDiL7H0", + "event":"payout.initiated", + "contains":[ + "payout" + ], + "payload":{ + "payout":{ + "entity":{ + "id":"pout_1Aa00000000001", + "entity":"payout", + "fund_account_id":"fa_1Aa00000000001", + "amount":100, + "currency":"INR", + "notes":{ + "note_key 1":"Tea. Earl Gray. Hot.", + "note_key 2":"Tea. Earl Gray. Decaf." + }, + "fees":590, + "tax":90, + "status":"processing", + "purpose":"refund", + "utr":null, + "mode":"NEFT", + "reference_id":null, + "narration":"Acme Fund Transfer", + "debit_account_number": "00228130001287", + "batch_id":null, + "status_details": { + "description": "Confirmation of the credit to the beneficiary is pending from HDFC bank. Please check the status after after 24th October 2021, 10:40 PM", + "source": "beneficiary_bank", + "reason": "beneficiary_bank_confirmation_pending" + } + "created_at":1579865132, + "fee_type": "", + } + } + }, + "created_at":1579865132 +} +``` + +### Payout Processed + +```json: payout.processed +{ + "entity": "event", + "account_id": "acc_Pup4LDLiA1DssX", + "event": "payout.processed", + "contains": [ + "payout" + ], + "payload": { + "payout": { + "entity": { + "id": "pout_R7ambiUdUvg6AD", + "entity": "payout", + "fund_account_id": "fa_R7amb4zOx1gJoF", + "fund_account": { + "id": "fa_R7amb4zOx1gJoF", + "entity": "fund_account", + "contact_id": "cont_R7ama5UMAMqHB2", + "account_type": "vpa", + "batch_id": null, + "vpa": { + "username": "exampleupi", + "handle": "ybl", + "address": "exampleupi@ybl" + }, + "active": true, + "created_at": 1755693655 + }, + "amount": 100, + "currency": "INR", + "notes": { + "notes_key_1": "Chai Tea Latte", + "notes_key_2": "Cafe, decaf.", + "VPA_HANDLE": "ybl", + "payee_ifsc": "KKBK0000197", + "payee_bank_name": "Kotak Mahindra Bank" + }, + "fees": 0, + "tax": 0, + "status": "processed", + "purpose": "payout", + "utr": "523223155921", + "mode": "UPI", + "reference_id": null, + "narration": "Payout to Acme Corp", + "batch_id": null, + "failure_reason": null, + "created_at": 1755693656, + "status_details": { + "reason": "payout_processed", + "description": "Payout is processed and the money has been credited into the beneficiary account.", + "source": "beneficiary_bank" + }, + "error": { + "source": null, + "reason": null, + "description": null, + "code": "NA", + "step": "NA", + "metadata": {} + } + } + } + }, + "created_at": 1755693679 + }, +``` + +### Payout Updated + +```json: payout.updated +{ + "entity":"event", + "account_id":"acc_BfVUrG6tDiL7H0", + "event":"payout.updated", + "contains":[ + "payout" + ], + "payload":{ + "payout":{ + "entity":{ + "id":"pout_1Aa00000000001", + "entity":"payout", + "fund_account_id":"fa_1Aa00000000001", + "amount":2000000, + "currency":"INR", + "notes":{ + "note_key 1":"Tea. Earl Gray. Hot.", + "note_key 2":"Tea. Earl Gray. Decaf." + }, + "fees":1062, + "tax":162, + "status":"processed", + "purpose":"refund", + "utr":"933815233814", + "mode":"IMPS", + "reference_id":null, + "narration":"Acme Fund Transfer", + "debit_account_number": "00228130001287", + "batch_id":null, + "status_details": { + "description": "Payout is processed and the money has been credited into the beneficiaries account", + "source": "beneficiary_bank", + "reason": "payout_processed" + } + "created_at":1579863747, + "fee_type": "" + } + } + }, + "created_at":1579863747 +} +``` + +### Payout Reversed + +```json: payout.reversed +{ + "entity":"event", + "account_id":"acc_BfVUrG6tDiL7H0", + "event":"payout.reversed", + "contains":[ + "payout" + ], + "payload":{ + "payout":{ + "entity":{ + "id":"pout_1Aa00000000001", + "entity":"payout", + "fund_account_id":"fa_1Aa00000000001", + "amount":212, + "currency":"INR", + "notes":{ + "note_key 1":"Tea. Earl Gray. Hot.", + "note_key 2":"Tea. Earl Gray. Decaf." + }, + "fees":9, + "tax":2, + "status":"reversed", + "purpose":"payout", + "utr":"qwer12uijaaasssd", + "mode":"IMPS", + "reference_id":null, + "narration":"Acme Fund Transfer", + "debit_account_number": "00228130001287", + "batch_id":null, + "status_details": { + "description": "Beneficiary bank systems are offline, please retry after 30 min", + "source": "beneficiary_bank", + "reason": "beneficiary_bank_offline" + } + "created_at":1580118057, + "fee_type": "" + } + } + }, + "created_at":1580118468 +} +``` + +### Payout Failed + +```json: payout.failed +{ + "entity": "event", + "account_id": "acc_BfVUrG6tDiL7H0", + "event": "payout.failed", + "contains": [ + "payout" + ], + "payload": { + "payout": { + "entity": { + "id": "pout_1Aa00000000001", + "entity": "payout", + "fund_account_id": "fa_1Aa00000000001", + "amount": 100, + "currency": "INR", + "notes": { + "note_key 1": "Tea. Earl Gray. Hot.", + "note_key 2": "Tea. Earl Gray. Decaf." + }, + "fees": 0, + "tax": 0, + "status": "failed", + "purpose": "payout", + "utr": "qwer12ui3323a22d", + "mode": "IMPS", + "reference_id": null, + "narration": "Acme Fund Transfer", + "debit_account_number": "00228130001287", + "batch_id": null, + "status_details": { + "description": "Payout failed as the beneficiary account is closed. Please contact the beneficiary bank", + "source": "beneficiary_bank", + "reason": "bank_account_closed" + } + "created_at": 1580120202, + "fee_type": "" + } + } + }, + "created_at": 1580120247 +} +``` + +### Payout Downtime Started + +```json: payout.downtime.started +{ + "entity": ​"event"​, + "account_id": ​"acc_CWX291oykl9aZA"​, + "event": ​"payout.downtime.started"​, + "contains": [ + ​"payout.downtime" + ], + "payload": { + "payout.downtime": { + "entity": { + "id": ​"poutdown_F1Zppa6lcVheSE"​, + "entity": ​"payout.downtime"​, + "scheduled": ​false​, + "method": ​["IMPS"]​, + "begin": ​1591935238​, + "end": ​null​, + "status": ​"started"​, + "source": ​"beneficiary"​, + "instrument": { + "bank": ​"SBI" + }, + "created_at": ​1591935238​, + "updated_at": ​1591935238 + } + } + }, + "created_at": ​1591935238 +} +``` + +> **INFO** +> +> +> **Handy Tips** +> +> The `payout.downtime.started` webhook is applicable for RTGS and NEFT modes also. +> + +### Payout Downtime Resolved + +```json: payout.downtime.resolved +{ + "entity": "event", + "event": "payout.downtime.resolved", + "payload": { + "payout.downtime": { + "entity": { + "begin": 1610430729, + "created_at": 1610430729, + "end": 1610431729, + "entity": "payout.downtime", + "id": "poutdown_GOHp6DSA5odXTu", + "instrument": { + "bank": "UTIB" + }, + "method": [ + "IMPS" + ], + "scheduled": false, + "source": "BENEFICIARY", + "status": "resolved", + "updated_at": 1610430729 + } + } + } +} +``` diff --git a/llm-content/webhooks/qr-codes.md b/llm-content/webhooks/qr-codes.md new file mode 100644 index 00000000..a18e1f56 --- /dev/null +++ b/llm-content/webhooks/qr-codes.md @@ -0,0 +1,361 @@ +--- +title: QR Codes Webhook Events +description: List of QR Codes webhook events along with sample payloads. +--- + +# QR Codes Webhook Events + +**QR Codes** are scannable two-dimensional barcodes that store payment details, enabling businesses to accept UPI payments seamlessly through customer scans. + +## List of QR Codes Webhook Events + +The table below lists the webhook events available for QR Codes. + +Webhook Events | Description +--- +`qr_code.created` | Triggered when a QR code is created. +--- +`qr_code.credited` | Triggered when a payment is made using a QR code. +--- +`qr_code.closed` | Triggered when a QR code is closed. + +## Sample Payloads + +Given below are the sample payloads for QR Codes webhook events. + +### QR Code Created + +```json: qr_code.created +{ + "entity": "event", + "account_id": "acc_CJoeHMNpi0nC7k", + "event": "qr_code.created", + "contains": [ + "qr_code" + ], + "payload": { + "qr_code": { + "entity": { + "id": "qr_HO2e0813YlchUn", + "entity": "qr_code", + "created_at": 1623914349, + "name": "Acme Groceries", + "usage": "multiple_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/X6QM7LL", + "payment_amount": null, + "status": "active", + "description": "Buy fresh groceries", + "fixed_amount": false, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "Branch": "Bangalore - Rajaji Nagar" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": "1625077799" + } + } + }, + "created_at": 1623914349 +} +```json: qr_code.created (GST) +{ + "entity": "event", + "account_id": "acc_CJoeHMNpi0nC7k", + "event": "qr_code.created", + "contains": [ + "qr_code" + ], + "payload": { + "qr_code": { + "entity": { + "id": "qr_HO2e0813YlchUn", + "entity": "qr_code", + "created_at": 1623914349, + "name": "Acme Groceries", + "usage": "multiple_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/X6QM7LL", + "payment_amount": null, + "status": "active", + "description": "Buy fresh groceries", + "fixed_amount": false, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "Branch": "Bangalore - Rajaji Nagar" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": "1625077799", + "tax_invoice": { + "number": "INV001", + "date": 1589994898, + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9605R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate" + } + } + } + }, + "created_at": 1623914349 +} +``` + +### QR Code Credited + +```json: qr_code.credited +{ + "entity": "event", + "account_id": "acc_CJoeHMNpi0nC7k", + "event": "qr_code.credited", + "contains": [ + "payment", + "qr_code" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_HO2fEpc9JeOQU5", + "entity": "payment", + "amount": 200, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "QRv2 Payment", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gauri.kumar@okhdfcbank", + "email": "gauri.kumari@example.com", + "contact": "+919000090000", + "customer_id": "cust_HKsR5se84c5LTO", + "notes": { + "Branch": "Bangalore - Rajaji Nagar" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "116812981837" + }, + "created_at": 1623914419 + } + }, + "qr_code": { + "entity": { + "id": "qr_HO2e0813YlchUn", + "entity": "qr_code", + "created_at": 1623914349, + "name": "Acme Groceries", + "usage": "multiple_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/X6QM7LL", + "payment_amount": null, + "status": "active", + "description": "Buy fresh groceries", + "fixed_amount": false, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "Branch": "Bangalore - Rajaji Nagar" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1625077799, + "closed_at": null, + "close_reason": null + } + } + }, + "created_at": 1623914419 +} +```json: qr_code.credited (GST) +{ + "entity": "event", + "account_id": "acc_CJoeHMNpi0nC7k", + "event": "qr_code.credited", + "contains": [ + "payment", + "qr_code" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_HO2fEpc9JeOQU5", + "entity": "payment", + "amount": 200, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "QRv2 Payment", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gauri.kumar@okhdfcbank", + "email": "gauri.kumari@example.com", + "contact": "+919000090000", + "customer_id": "cust_HKsR5se84c5LTO", + "notes": { + "Branch": "Bangalore - Rajaji Nagar" + }, + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "116812981837" + }, + "created_at": 1623914419 + } + }, + "qr_code": { + "entity": { + "id": "qr_HO2e0813YlchUn", + "entity": "qr_code", + "created_at": 1623914349, + "name": "Acme Groceries", + "usage": "multiple_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/X6QM7LL", + "payment_amount": null, + "status": "active", + "description": "Buy fresh groceries", + "fixed_amount": false, + "payments_amount_received": 0, + "payments_count_received": 0, + "notes": { + "Branch": "Bangalore - Rajaji Nagar" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1625077799, + "closed_at": null, + "close_reason": null, + "tax_invoice": { + "number": "INV001", + "date": 1589994898, + "customer_name": "Gauri Kumar", + "business_gstin": "06AABCU9605R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate" + } + } + } + }, + "created_at": 1623914419 +} +``` + +### QR Code Closed + +> **WARN** +> +> +> **Watch Out!** +> +> The webhook is activated only when the QR Code is closed manually. It is not triggered when the QR Code auto-expires. +> + +```json: qr_code.closed +{ + "entity": "event", + "account_id": "acc_CJoeHMNpi0nC7k", + "event": "qr_code.closed", + "contains": [ + "qr_code" + ], + "payload": { + "qr_code": { + "entity": { + "id": "qr_HO2e0813YlchUn", + "entity": "qr_code", + "created_at": 1623914349, + "name": "Acme Groceries", + "usage": "multiple_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/X6QM7LL", + "payment_amount": null, + "status": "closed", + "description": "Buy fresh groceries", + "fixed_amount": false, + "payments_amount_received": 200, + "payments_count_received": 1, + "notes": { + "Branch": "Bangalore - Rajaji Nagar" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1625077799, + "closed_at": 1623914515, + "close_reason": "on_demand" + } + } + }, + "created_at": 1623914515 +} +```json: qr_code.closed (GST) +{ + "entity": "event", + "account_id": "acc_CJoeHMNpi0nC7k", + "event": "qr_code.closed", + "contains": [ + "qr_code" + ], + "payload": { + "qr_code": { + "entity": { + "id": "qr_HO2e0813YlchUn", + "entity": "qr_code", + "created_at": 1623914349, + "name": "Acme Groceries", + "usage": "multiple_use", + "type": "upi_qr", + "image_url": "https://rzp.io/i/X6QM7LL", + "payment_amount": null, + "status": "closed", + "description": "Buy fresh groceries", + "fixed_amount": false, + "payments_amount_received": 200, + "payments_count_received": 1, + "notes": { + "Branch": "Bangalore - Rajaji Nagar" + }, + "customer_id": "cust_HKsR5se84c5LTO", + "close_by": 1625077799, + "closed_at": 1623914515, + "close_reason": "on_demand", + "tax_invoice": { + "number": "INV001", + "date": 1589994898, + "customer_name": "Gaurav Kumar", + "business_gstin": "06AABCU9605R1ZR", + "gst_amount": 4000, + "cess_amount": 0, + "supply_type": "interstate" + } + } + } + }, + "created_at": 1623914515 +} +``` diff --git a/llm-content/webhooks/refunds.md b/llm-content/webhooks/refunds.md new file mode 100644 index 00000000..4d63d19a --- /dev/null +++ b/llm-content/webhooks/refunds.md @@ -0,0 +1,331 @@ +--- +title: Refunds Webhook Events +description: List of Refunds webhook events along with sample payloads. +--- + +# Refunds Webhook Events + +A **Refund** is the reversal of a transaction, returning the customer's payment made for a product or service. + +## List of Refunds Webhook Events + +The table below lists the webhook events available for refunds. + +Webhook Event | Description +--- +`refund.created` | Triggered when a refund is created. +--- +`refund.processed` | Triggered when the refund is successfully processed. +--- +`refund.failed` | Triggered when we are not able to process a refund. +--- +`refund.speed_changed` | Triggered when refund speed is changed. + +## Sample Payloads + +Given below are the sample payloads for refunds webhook events. + +### Refund Created + +```json: Normal Refunds +{ + "entity": "event", + "account_id": "acc_E7OQJcEANmBHTC", + "event": "refund.created", + "contains": [ + "refund", + "payment" + ], + "payload": { + "refund": { + "entity": { + "id": "rfnd_FS8TWyPrCsa0OB", + "entity": "refund", + "amount": 50000, + "currency": "INR", + "payment_id": "pay_FPoJKWQQ8lK13n", + "notes": { + "comment": "Customer Notes for Webhooks." + }, + "receipt": null, + "acquirer_data": { + "arn": null + }, + "created_at": 1597734071, + "batch_id": null, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "optimum" + } + }, + "payment": { + "entity": { + "id": "pay_FPoJKWQQ8lK13n", + "entity": "payment", + "amount": 500000, + "currency": "INR", + "base_amount": 500000, + "status": "captured", + "order_id": "order_FPoIeimWki9j8A", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 190000, + "amount_transferred": 0, + "refund_status": "partial", + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 11800, + "tax": 1800, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "4827433" + }, + "created_at": 1597226379 + } + } + }, + "created_at": 1597734071 +} +``` + +### Refund Processed + +```json: Normal Refunds +{ + "entity": "event", + "account_id": "acc_E7OQJcEANmBHTC", + "event": "refund.processed", + "contains": [ + "refund", + "payment" + ], + "payload": { + "refund": { + "entity": { + "id": "rfnd_FS8TWyPrCsa0OB", + "entity": "refund", + "amount": 50000, + "currency": "INR", + "payment_id": "pay_FPoJKWQQ8lK13n", + "notes": { + "comment": "Customer Notes for Webhooks." + }, + "receipt": null, + "acquirer_data": { + "arn": null + }, + "created_at": 1597734071, + "batch_id": null, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "optimum" + } + }, + "payment": { + "entity": { + "id": "pay_FPoJKWQQ8lK13n", + "entity": "payment", + "amount": 500000, + "currency": "INR", + "base_amount": 500000, + "status": "captured", + "order_id": "order_FPoIeimWki9j8A", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 190000, + "amount_transferred": 0, + "refund_status": "partial", + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 11800, + "tax": 1800, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "4827433" + }, + "created_at": 1597226379 + } + } + }, + "created_at": 1597734071 +} +``` + +### Refund Failed + +```json: Normal Refunds +{ + "entity": "event", + "account_id": "acc_E7OQJcEANmBHTC", + "event": "refund.failed", + "contains": [ + "refund", + "payment" + ], + "payload": { + "refund": { + "entity": { + "id": "rfnd_FS8TWyPrCsa0OB", + "entity": "refund", + "amount": 50000, + "currency": "INR", + "payment_id": "pay_FPoJKWQQ8lK13n", + "notes": { + "comment": "Customer Notes for Webhooks." + }, + "receipt": null, + "acquirer_data": { + "arn": null + }, + "created_at": 1597734071, + "batch_id": null, + "status": "failed", + "speed_processed": "normal", + "speed_requested": "optimum" + } + }, + "payment": { + "entity": { + "id": "pay_FPoJKWQQ8lK13n", + "entity": "payment", + "amount": 500000, + "currency": "INR", + "base_amount": 500000, + "status": "captured", + "order_id": "order_FPoIeimWki9j8A", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 190000, + "amount_transferred": 0, + "refund_status": "partial", + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "notes": [], + "fee": 11800, + "tax": 1800, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "4827433" + }, + "created_at": 1597226379 + } + } + }, + "created_at": 1597734071 +} +``` + +### Refund Speed Changed + +```json: refund.speed_changed +{ + "entity": "event", + "account_id": "acc_BTIVttuC4ACVOz", + "event": "refund.speed_changed", + "contains": [ + "refund", + "payment" + ], + "payload": { + "refund": { + "entity": { + "id": "rfnd_EcPN8eJuzH5Yaz", + "entity": "refund", + "amount": 200, + "currency": "INR", + "payment_id": "pay_EcPJsxu8cSzOK6", + "notes": [], + "receipt": null, + "acquirer_data": {}, + "created_at": 1586439890, + "status": "processed", + "speed_processed": "normal", + "speed_requested": "optimum" + } + }, + "payment": { + "entity": { + "id": "pay_EcPJsxu8cSzOK6", + "entity": "payment", + "amount": 500000, + "currency": "INR", + "base_amount": 500000, + "status": "captured", + "order_id": "order_FPoIeimWki9j8A", + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 190000, + "amount_transferred": 0, + "refund_status": "partial", + "captured": true, + "description": null, + "card_id": null, + "bank": "HDFC", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919977665544", + "notes": [], + "fee": 11800, + "tax": 1800, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "4827433" + }, + "created_at": 1585226379 + } + }, + "created_at": 1586439890 + } +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. +> +> - While generating a signature at your end, ensure that the webhook body is passed as an argument in the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> diff --git a/llm-content/webhooks/route.md b/llm-content/webhooks/route.md new file mode 100644 index 00000000..eb692202 --- /dev/null +++ b/llm-content/webhooks/route.md @@ -0,0 +1,182 @@ +--- +title: Route Webhook Events +description: List of Route webhook events along with sample payloads. +--- + +# Route Webhook Events + +**Route** enables businesses to split payments among third parties, sellers, or bank accounts while managing settlements, refunds, and vendor payments in a one-to-many model. + +## List of Route Webhook Events + +The table below lists the webhook events available for Route. + +Webhook Event | Description +--- +`transfer.processed` | Triggered when a transfer made to a Linked Account is processed. +--- +`settlement.processed` | Triggered when a settlement is successfully processed to your bank account. +--- +`transfer.failed` | Triggered when a transfer made to a Linked Account is failed. +--- +`product.route.under_review` | Triggered when the Linked account is in the process of being verified by Razorpay. +--- +`product.route.needs_clarification` | Triggered when verification of the Linked account has failed, reasons are also included in the data object. +--- +`product.route.activated` | Triggered when a Linked account has been verified successfully and is activated. + +## Sample Payloads + +Given below are the sample payloads for Route webhook events. + +### Transfer Processed + +@include route/transfer.processed + +### Settlement Processed + +> **INFO** +> +> +> **Handy Tips** +> +> - The `settlement.processed` webhook is triggered when a transfer to a Linked Account settles with the parent merchant. +> + +Given below are the sample payloads for Settlement webhook events. + +```json: settlement.processed +{ + "entity": "event", + "account_id": "acc_PR7UDve9UNcOxW", + "event": "settlement.processed", + "contains": [ + "settlement" + ], + "payload": { + "settlement": { + "entity": { + "id": "setl_Rf8uva1MU98B4l", + "entity": "settlement", + "amount": 1524, + "status": "processed", + "fees": 0, + "tax": 0, + "utr": "AXISCN1153863727", + "created_at": 1763019089 + } + } + }, + "created_at": 1763021990 +} +``` + +### Transfer Failed + +@include route/transfer.failed + +### Product Route Under Review + +```json: product.route.under_review +{ + "entity": "event", + "account_id": "acc_QTzbto7NlAgZU4", + "event": "product.route.under_review", + "contains": [ + "merchant_product" + ], + "payload": { + "merchant_product": { + "entity": { + "id": "acc_prd_QTzcNTia8qHzYG", + "merchant_id": "acc_QTzbto7NlAgZU4", + "activation_status": "under_review" + }, + "data": [] + } + }, + "created_at": 1747047572 +} +``` + +### Product Route Needs Clarification + +```json: product.route.needs_clarification +{ + "entity": "event", + "account_id": "acc_QTzf1oMb6lfvIL", + "event": "product.route.needs_clarification", + "contains": [ + "merchant_product" + ], + "payload": { + "merchant_product": { + "entity": { + "id": "acc_prd_QTzgAPhwEwsO9Z", + "merchant_id": "acc_QTzf1oMb6lfvIL", + "activation_status": "needs_clarification" + }, + "data": { + "requirements": [ + { + "field_reference": "settlements.ifsc_code", + "resolution_url": "/accounts/acc_QTzf1oMb6lfvIL/products/acc_prd_QTzgAPhwEwsO9Z", + "reason_code": "needs_clarification", + "description": "Max retry exceeded for bank account details.", + "status": "required" + }, + { + "field_reference": "settlements.beneficiary_name", + "resolution_url": "/accounts/acc_QTzf1oMb6lfvIL/products/acc_prd_QTzgAPhwEwsO9Z", + "reason_code": "needs_clarification", + "description": "Max retry exceeded for bank account details.", + "status": "required" + }, + { + "field_reference": "settlements.account_number", + "resolution_url": "/accounts/acc_QTzf1oMb6lfvIL/products/acc_prd_QTzgAPhwEwsO9Z", + "reason_code": "needs_clarification", + "description": "Max retry exceeded for bank account details.", + "status": "required" + } + ] + } + } + }, + "created_at": 1747047833 +} +``` + +### Product Route Activated + +```json: product.route.activated +{ + "entity": "event", + "account_id": "acc_QTzbto7NlAgZU4", + "event": "product.route.activated", + "contains": [ + "merchant_product" + ], + "payload": { + "merchant_product": { + "entity": { + "id": "acc_prd_QTzcNTia8qHzYG", + "merchant_id": "acc_QTzbto7NlAgZU4", + "activation_status": "activated" + }, + "data": [] + } + }, + "created_at": 1747047578 +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. +> +> - While generating a signature at your end, ensure that the webhook body is passed as an argument in the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> diff --git a/llm-content/webhooks/settlements.md b/llm-content/webhooks/settlements.md new file mode 100644 index 00000000..113715f3 --- /dev/null +++ b/llm-content/webhooks/settlements.md @@ -0,0 +1,57 @@ +--- +title: Settlements Webhook Events +description: List of Settlements webhook events along with sample payloads. +--- + +# Settlements Webhook Events + +Track settlements by subscribing to settlement webhook events, which notify when funds are processed and settled to your account. + +### Settlement Processed + +> **INFO** +> +> +> **Handy Tips** +> +> - The `settlement.processed` event is triggered **after** Razorpay has successfully transferred funds to your bank account. +> - The settlement payload includes key financial details such as the settlement amount, fees deducted, applicable tax, UTR (Unique Transaction Reference) and the settlement period. +> - Use UTR to reconcile settlement funds received from Razorpay against your bank statement. +> - Settlement amounts are always provided in the smallest currency unit (for example, paise for INR, cents for USD). +> + +> **WARN** +> +> +> **Watch Out!** +> +> The `processed` status confirms the initiation of fund transfer, but does not mean that funds have been credited to your account. The amount will reflect in your bank account after the standard NEFT/RTGS/IMPS timeline, which can take up to **3 hours**. +> + +Given below is the sample payload for Settlement webhook events. + +```json: settlement.processed +{ + "entity": "event", + "account_id": "acc_PR7UDve9UNcOxW", + "event": "settlement.processed", + "contains": [ + "settlement" + ], + "payload": { + "settlement": { + "entity": { + "id": "setl_Rf8uva1MU98B4l", + "entity": "settlement", + "amount": 1524, + "status": "processed", + "fees": 0, + "tax": 0, + "utr": "AXISCN1153863727", + "created_at": 1763019089 + } + } + }, + "created_at": 1763021990 +} +``` diff --git a/llm-content/webhooks/setup-edit-payments.md b/llm-content/webhooks/setup-edit-payments.md new file mode 100644 index 00000000..a76edddc --- /dev/null +++ b/llm-content/webhooks/setup-edit-payments.md @@ -0,0 +1,133 @@ +--- +title: Set Up and Edit Payments Webhooks +description: Set up and edit Payments Webhooks from the Razorpay Dashboard. +--- + +# Set Up and Edit Payments Webhooks + +You can [set up](#set-up-webhooks), [edit](#edit-a-webhook), [enable/disable](#enabledisable-a-webhook) and [delete](#delete-a-webhook) webhooks from the Dashboard. + +## Set Up Webhooks + +Watch this video to see how to set up a webhook. + +[Video: https://www.youtube.com/embed/Xiikw4_CcQk?si=b6kYHKIp1xikPrJZ] + +To set up webhooks: + +1. Log in to the Dashboard and navigate to **Accounts & Settings**. +2. Click **Webhooks** under **Website and app settings**. +3. Click the **+ Add New Webhook** button. + + ![Add a new webhooks button on the Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-1.jpg.md) +4. In the **Webhook Setup** pop-up page: + - Enter the **URL** where you want to receive the webhook payload when an event is triggered. We recommend using an HTTPS URL. + + +> **INFO** +> +> +> **Handy Tips** +> +> - You can set up to **30 URLs** to receive Webhook notifications. Webhooks can only be delivered to public URLs. +> - If your URL contains `razorpay` as a domain, you will not be able to add the URL and will receive an error. +> - If you attempt to save a localhost endpoint as part of a webhook setup, you will notice an error. Know more about [testing Webhooks on an application running on localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#application-running-on-localhost). +> + + + - Enter a **Secret** for the webhook endpoint. The secret is used to validate that the webhook is from Razorpay. Do not expose the secret publicly. Know more about [how to validate webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). + + +> **INFO** +> +> +> **Handy Tips** +> +> - When setting up the webhook, specify a secret. Use this secret to validate that the webhook is from Razorpay. Entering the secret is optional but recommended. The secret should never be exposed publicly. +> - The webhook secret does not need to be the Razorpay API key secret. +> + + + + - In the **Alert Email** field, enter the email address to which the notifications should be sent in case of webhook failure. You will receive webhook related notifications like failures, deactivation and so on. + - Select the required events from the list of **Active Events**. + ![List of active webhook events on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-creation-2.jpg.md) + +5. Click **Create Webhook**. After you set up a webhook, it appears on the list of webhooks. + ![List of webhooks on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhooks-list.jpg.md) +6. You can select the webhook and click **Edit** to make more changes. + +> **INFO** +> +> +> **Handy Tips** +> +> Enter the default OTP `754081` when prompted, while setting up, editing or deleting a webhook in test mode. +> +> +> + +## Edit a Webhook + +You can edit your webhook to replace the webhook URL, modify the secret, change the alert email and add or remove events. + +To edit webhooks: +1. Log in to the Dashboard and navigate to **Accounts & Settings**. +1. Click **Webhooks** under **Website and app settings**. +1. In the list, select the webhook you want to edit. +1. In the right panel, click **Edit**. +1. The **Webhook Setup** pop-up page is displayed. You can modify the following: + - Webhook URL + - Secret + - Alert Email + - Active Events + ![Edit Webhooks on Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/webhooks-webhook-edit-2.jpg.md) +1. Click **Save Webhook** to save changes. + +> **INFO** +> +> +> **Handy Tips** +> +> You should validate and test your webhooks before you go live. Know more about [validating and testing your webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). +> + +## Deactivation + +All webhook responses must return a status code in the range `2XX` within a window of 5 seconds. If we receive response codes other than this or the request times out, it is considered a failure. + +On failure, a webhook is re-tried at progressive intervals of time, defined in the exponential back-off policy, for 24 hours. If the failures continue for 24 hours, the webhook is disabled. You need to enable the webhook from the Dashboard after fixing the errors at your end. Know more about [enabling Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md#enabledisable-a-webhook). + +> **INFO** +> +> +> **Handy Tips** +> +> When a webhook gets disabled, you receive an email notification on the email id you configured while setting up the webhooks. +> + +## Enable/Disable a Webhook + +To enable or disable a webhook: + +1. Log in to the Dashboard and navigate to **Accounts & Settings**. +2. Click **Webhooks** under **Website and app settings**. +3. In the list, select the webhook you want to edit. +4. Change the status to **Enabled** or **Disabled** in the right panel as required. + +## Delete a Webhook + +To delete a webhook: + +1. Log in to the Dashboard and navigate to **Accounts & Settings**. +1. Click **Webhooks** under **Website and app settings**. +1. In the list, select the webhook that you want to delete. +1. In the right panel, click **Delete**. Click **Yes, Delete** in the dialogue box to confirm. + +### Related Information + +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) + + - [Set Up and Edit Payout Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) + +- [Validate and Test Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md) diff --git a/llm-content/webhooks/setup-edit-payouts.md b/llm-content/webhooks/setup-edit-payouts.md new file mode 100644 index 00000000..5e261956 --- /dev/null +++ b/llm-content/webhooks/setup-edit-payouts.md @@ -0,0 +1,90 @@ +--- +title: Set Up and Edit Payout Webhooks +description: Set up and edit Payout Webhooks from the RazorpayX Dashboard. +--- + +# Set Up and Edit Payout Webhooks + +You can set up and edit webhooks from the RazorpayX Dashboard. + +## Set Up and Edit Webhooks + +> **INFO** +> +> +> **Handy Tips** +> +> It is important to validate and test webhooks before you start using them. To test webhooks, refer [Validate and Test Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). +> + +To set up webhooks: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com), and navigate to **My Account & Settings** → **Developer Controls**. +1. Click **Add Webhooks** if you are setting up a webhook or **Edit Webhook** to edit a previously saved webhook. +1. Enter the **Webhook URL** where you want to receive the webhook payload when an event is triggered. + +> **INFO** +> +> +> **Handy Tips** +> +> - You can set up to **30 URLs** to receive Webhook notifications. Webhooks can only be delivered to public URLs. +> - This webhook URL can be different from your [Razorpay Payment Gateway webhook URL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md). +> - If you attempt to save a localhost endpoint as part of a webhook setup, you will notice an error. Know more about [alternatives to localhost](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md#application-running-on-localhost). +> + +1. Enter a **Secret** for the webhook endpoint. This is an optional field and is used for [validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md). + +> **INFO** +> +> +> **Secret for Webhooks** +> +> - When setting up the Webhooks, you will be asked to specify a secret. Using this secret, you can validate that the webhook is from Razorpay. +> - Entering the secret is optional but recommended. The secret should never be exposed publicly. +> - The webhook secret does not need to be the merchant secret key provided by Razorpay. +> + +1. Select the events you want to subscribe from the list of **Active Events**. +1. Click **SAVE** to enable the webhook. + +To edit webhooks: +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com), and navigate to **My Account & Settings** → **Developer Controls**. +2. After you have configured the webhooks, you can click **Edit** to make changes to a previously saved webhook. + +> **INFO** +> +> +> **Handy Tips** +> +> Enter the default OTP `754081` when prompted, while setting up, editing or deleting a webhook in test mode. +> +> + +## Enable/Disable a Webhook + +To enable or disable a webhook: +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com) and navigate to **My Account & Settings** → **Developer Controls**. +2. Scroll down to the **WEBHOOKS** section. +3. Click **EDIT WEBHOOK**. +4. Use the **Webhook Active?** option to enable or disable the webhook as shown below: + ![](/docs/assets/images/webhooks-rzpx-webhooks-enable-disable.jpg) + +## Deactivation + +All webhook responses must return a status code in the range `2XX` within a window of 5 seconds. If we receive response codes other than this or the request times out, it is considered a failure. + +On failure, a webhook is re-tried at progressive intervals of time, defined in the exponential back-off policy, for 24 hours. If the failures continue for 24 hours, the webhook is disabled. You have to enable the webhook from the [RazorpayX Dashboard](https://x.razorpay.com) after fixing the errors at your end. Know more about [enabling webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md#enabledisable-a-webhook). + +> **INFO** +> +> +> **Handy Tips** +> +> When a webhook gets disabled, you receive an email notification on the email id you configured while setting up the webhooks. +> + +### Related Information +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) +- [Set Up and Edit Payments Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) +- [Validate and Test Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md) diff --git a/llm-content/webhooks/smart-collect.md b/llm-content/webhooks/smart-collect.md new file mode 100644 index 00000000..e2ea51b1 --- /dev/null +++ b/llm-content/webhooks/smart-collect.md @@ -0,0 +1,551 @@ +--- +title: Smart Collect Webhook Events +description: List of Smart Collect webhook events along with sample payloads. +--- + +# Smart Collect Webhook Events + +**Smart Collect** enables businesses to generate customer-specific identifiers for receiving payments via NEFT, RTGS, and IMPS while automating tracking, notifications, and reconciliation. + +## List of Smart Collect Webhook Events + +The table below lists the webhook events available for Smart Collect (Virtual Account). + +Webhook Event | Description +--- +`virtual_account.created` | Triggered when a virtual account is created. +--- +`virtual_account.credited` | Triggered when a payment is made to a virtual account. +--- +`virtual_account.closed` | Triggered when a virtual account expires on a date set by you or is manually closed by you. + +> **INFO** +> +> +> **Smart Collect with TPV** +> +> If the TPV feature is enabled for Smart Collect, the webhook payloads described above contain the `allowed_payers` object parameter. +> + +## Sample Payloads + +Given below are the sample payloads for Smart Collect webhook events. + +### Virtual Account Created + +```json: virtual_account.created +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "virtual_account.created", + "contains": [ + "virtual_account" + ], + "payload": { + "virtual_account": { + "entity": { + "id": "va_DET8z3wBxfPB5L", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Virtual Account to test webhook", + "amount_expected": null, + "notes": { + "Important": "Notes for Internal Reference" + }, + "amount_paid": 0, + "customer_id": "cust_BtQNqzmBlAXyTY", + "receivers": [ + { + "id": "ba_DET8z5Z5ghv4hW", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "notes": [], + "account_number": "1112220006712324" + }, + { + "id": "vpa_DzZcAjcRevv5JO", + "entity": "vpa", + "username": "rpy.payto00000468657501", + "handle": "icici", + "address": "rpy.payto00000468657501@icici" + } + ], + "close_by": null, + "closed_at": null, + "created_at": 1567675923 + } + } + }, + "created_at": 1567675923 +} +```json: virtual_account.created with TPV +{ + "entity":"event", + "account_id":"acc_BFQ7uQEaa7j2z7", + "event":"virtual_account.created", + "contains":[ + "virtual_account" + ], + "payload":{ + "virtual_account":{ + "entity":{ + "id":"va_DET8z3wBxfPB5L", + "name":"Acme Corp", + "entity":"virtual_account", + "status":"active", + "description":"Virtual Account to test webhook", + "amount_expected":null, + "notes":{ + "Important":"Notes for Internal Reference" + }, + "amount_paid":0, + "customer_id":"cust_BtQNqzmBlAXyTY", + "receivers":[ + { + "id":"ba_DET8z5Z5ghv4hW", + "entity":"bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name":"Acme Corp", + "notes": [], + "account_number":"1112220006712324" + } + ], + "allowed_payers": [ + { + "type": "bank_account", + "id":"ba_DlGmm9mSj8fjRM", + "bank_account": { + "ifsc": "UTIB0000013", + "account_number": "914010012345679" + } + }, + { + "type": "bank_account", + "id":"ba_Cmtnm5tSj6agUW", + "bank_account": { + "ifsc": "UTIB0000014", + "account_number": "914010012345680" + } + } + ], + "close_by":null, + "closed_at":null, + "created_at":1567675923 + } + } + }, + "created_at":1567675923 +} +``` + +### Virtual Account Credited + +```json: bank_transfer +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "virtual_account.credited", + "contains": [ + "payment", + "virtual_account", + "bank_transfer" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DETA2KrOlhqQzF", + "entity": "payment", + "amount": 61900, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "bank_transfer", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": "NA", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_BtQNqzmBlAXyTY", + "notes": [], + "fee": 731, + "tax": 112, + "error_code": null, + "error_description": null, + "created_at": 1567675983 + } + }, + "virtual_account": { + "entity": { + "id": "va_DET8z3wBxfPB5L", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Virtual Account to test webhook", + "amount_expected": null, + "notes": { + "Important": "Notes for Internal Reference" + }, + "amount_paid": 61900, + "customer_id": "cust_BtQNqzmBlAXyTY", + "close_by": null, + "closed_at": null, + "created_at": 1567675923, + "receivers": [ + { + "id": "ba_DET8z5Z5ghv4hW", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "account_number": "1112220006712324" + } + ] + } + }, + "bank_transfer": { + "entity": { + "id": "bt_DETA2KSUJ3uCM9", + "entity": "bank_transfer", + "payment_id": "pay_DETA2KrOlhqQzF", + "mode": "NEFT", + "bank_reference": "156767598340", + "amount": 61900, + "payer_bank_account": { + "id": "ba_DETA2UuuKtKLR1", + "entity": "bank_account", + "ifsc": "KKBK0000007", + "bank_name": "Kotak Mahindra Bank", + "name": "Saurav Kumar", + "account_number": "765432123456789" + }, + "virtual_account_id": "va_DET8z3wBxfPB5L" + } + } + }, + "created_at": 1567675983 +} +```json: vpa +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "virtual_account.credited", + "contains": [ + "payment", + "virtual_account", + "upi_transfer" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DETA2KrOlhqQzF", + "entity": "payment", + "amount": 500, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": "Virtual UPI ID payment", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gauravkumar@icic", + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_BM8NbnFAk1BVDA", + "notes": [], + "fee": 0, + "tax": 0, + "error_code": null, + "error_description": null, + "acquirer_data": { + "rrn": null + }, + "created_at": 1567675983 + } + }, + "virtual_account": { + "entity": { + "id": "va_DzYPeYqvsYEdNq", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Receive payment instalment from Gaurav Kumar- Flat No 105", + "amount_expected": null, + "notes": [], + "amount_paid": 500, + "customer_id": "cust_BM8NbnFAk1BVDA", + "close_by": 1580491859, + "closed_at": null, + "created_at": 1577956463, + "receivers": [ + { + "id": "vpa_DzYPeu6ntqxhcE", + "entity": "vpa", + "username": "rpy.payto00000468657501", + "handle": "icici", + "address": "rpy.payto00000468657501@icici" + } + ] + } + }, + "upi_transfer": { + "entity": { + "id": "ut_DzZjcnY8n3oU65", + "entity": "upi_transfer", + "amount": 500, + "payer_vpa": "gauravkumar@icic", + "payer_bank": "Kotak Mahindra Bank", + "payer_account": "765432123456789", + "payer_ifsc": "KKBK0000007", + "payment_id": "pay_DETA2KrOlhqQzF", + "rrn": "006516367819", + "virtual_account_id": "va_DzYPeYqvsYEdNq" + } + } + }, + "created_at": 1567675984 +} +```json: bank_transfer with TPV +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "virtual_account.credited", + "contains": [ + "payment", + "virtual_account", + "bank_transfer" + ], + "payload": { + "payment": { + "entity": { + "id": "pay_DETA2KrOlhqQzF", + "entity": "payment", + "amount": 61900, + "currency": "INR", + "status": "captured", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "bank_transfer", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": true, + "description": "NA", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919000090000", + "customer_id": "cust_BtQNqzmBlAXyTY", + "notes": [], + "fee": 731, + "tax": 112, + "error_code": null, + "error_description": null, + "created_at": 1567675983 + } + }, + "virtual_account": { + "entity": { + "id": "va_DET8z3wBxfPB5L", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "active", + "description": "Virtual Account to test webhook", + "amount_expected": null, + "notes": { + "Important": "Notes for Internal Reference" + }, + "amount_paid": 61900, + "customer_id": "cust_BtQNqzmBlAXyTY", + "close_by": null, + "closed_at": null, + "created_at": 1567675923, + "receivers": [ + { + "id": "ba_DET8z5Z5ghv4hW", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "account_number": "1112220006712324" + } + ], + "allowed_payers": [ + { + "type": "bank_account", + "id":"ba_DlGmm9mSj8fjRM", + "bank_account": { + "ifsc": "UTIB0000013", + "account_number": "914010012345679" + } + }, + { + "type": "bank_account", + "id":"ba_Cmtnm5tSj6agUW", + "bank_account": { + "ifsc": "UTIB0000014", + "account_number": "914010012345680" + } + } + ] + } + }, + "bank_transfer": { + "entity": { + "id": "bt_DETA2KSUJ3uCM9", + "entity": "bank_transfer", + "payment_id": "pay_DETA2KrOlhqQzF", + "mode": "NEFT", + "bank_reference": "156767598340", + "amount": 61900, + "payer_bank_account": { + "id": "ba_DETA2UuuKtKLR1", + "entity": "bank_account", + "ifsc": "KKBK0000007", + "bank_name": "Kotak Mahindra Bank", + "name": "Saurav Kumar", + "account_number": "765432123456789" + }, + "virtual_account_id": "va_DET8z3wBxfPB5L" + } + } + }, + "created_at": 1567675983 +} +``` + +### Virtual Account Closed + +```json: virtual_account.closed +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "virtual_account.closed", + "contains": [ + "virtual_account" + ], + "payload": { + "virtual_account": { + "entity": { + "id": "va_DET8z3wBxfPB5L", + "name": "Acme Corp", + "entity": "virtual_account", + "status": "closed", + "description": "Receive payment instalment from Gaurav Kumar- Flat No 105", + "amount_expected": null, + "notes": [], + "amount_paid": 500, + "customer_id": "cust_BM8NbnFAk1BVDA", + "receivers": [ + { + "id": "ba_DzYPeiYdd2RVSc", + "entity": "bank_account", + "ifsc": "RATN0VAAPIS", + "bank_name": "RBL Bank", + "name": "Acme Corp", + "account_number": "1112220006712324" + }, + { + "id": "vpa_DzYPeu6ntqxhcE", + "entity": "vpa", + "username": "rpy.payto00000468657501", + "handle": "icici", + "address": "rpy.payto00000468657501@icici" + } + ], + "close_by": 1580491859, + "closed_at": 1567677769, + "created_at": 1567675923 + } + } + }, + "created_at": 1567677769 +} +```json: virtual_account.closed with TPV +{ + "entity":"event", + "account_id":"acc_BFQ7uQEaa7j2z7", + "event":"virtual_account.closed", + "contains":[ + "virtual_account" + ], + "payload":{ + "virtual_account":{ + "entity":{ + "id":"va_DET8z3wBxfPB5L", + "name":"Acme Corp", + "entity":"virtual_account", + "status":"closed", + "description":"Receive payment instalment from Gaurav Kumar- Flat No 105", + "amount_expected":null, + "notes":[], + "amount_paid":500, + "customer_id":"cust_BM8NbnFAk1BVDA", + "receivers":[ + { + "id":"ba_DzYPeiYdd2RVSc", + "entity":"bank_account", + "ifsc":"RATN0VAAPIS", + "bank_name": "RBL Bank", + "name":"Acme Corp", + "account_number":"1112220006712324" + } + ], + "allowed_payers": [ + { + "type": "bank_account", + "id":"ba_DlGmm9mSj8fjRM", + "bank_account": { + "ifsc": "UTIB0000013", + "account_number": "914010012345679" + } + }, + { + "type": "bank_account", + "id":"ba_Cmtnm5tSj6agUW", + "bank_account": { + "ifsc": "UTIB0000014", + "account_number": "914010012345680" + } + } + ], + "close_by":1580491859, + "closed_at":1567677769, + "created_at":1567675923 + } + } + }, + "created_at":1567677769 +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. +> +> - While generating a signature at your end, ensure that the webhook body is passed as an argument in the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> diff --git a/llm-content/webhooks/subscriptions.md b/llm-content/webhooks/subscriptions.md new file mode 100644 index 00000000..68fb649b --- /dev/null +++ b/llm-content/webhooks/subscriptions.md @@ -0,0 +1,717 @@ +--- +title: Subscriptions Webhook Events +description: List of Subscriptions webhook events along with sample payloads. +--- + +# Subscriptions Webhook Events + +A **Subscription** is an automated recurring payment system that charges customers based on a predefined billing cycle without manual intervention. + +## List of Subscriptions Webhook Events + +The table below lists the webhook events available for Subscriptions. + +Webhook Event | Description +--- +`subscription.authenticated`| Sent when the first payment is made on the subscription. This can either be the authorisation amount, the upfront amount, the plan amount or a combination of the plan amount and the upfront amount. +--- +`subscription.activated` | Sent when the subscription moves to the `active` state either from the `authenticated`, `pending` or `halted` state. If a Subscription moves to the `active` state from the `pending` or `halted` state, only the subsequent invoices that are generated are charged. Existing invoices that were already generated are not charged. +--- +`subscription.charged` | Sent every time a successful charge is made on the subscription. +--- +`subscription.completed`| Sent when all the invoices are generated for a subscription and the subscription moves to the `completed` state. +--- +`subscription.updated` | Sent when a subscription is successfully updated. There is no state change when a subscription is updated. +--- +`subscription.pending` | Sent when the subscription moves to the `pending` state. This happens when a charge on the card fails. We try to charge the card on a periodic basis while it is in the `pending` state. If the payment fails again, the Webhook is triggered again. +--- +`subscription.halted`| Sent when all retries have been exhausted and the subscription moves from the `pending` state to the `halted` state. The customer has to manually retry the charge or change the card linked to the subscription, for the subscription to move back to the `active` state. +--- +`subscription.cancelled` | Sent when a subscription is cancelled and moved to the `cancelled` state. +--- +`subscription.paused`| Sent when a subscription is paused and moved to the `paused` state. +--- +`subscription.resumed`| Sent when a subscription is resumed and moved to the `resumed` state. + +> **INFO** +> +> +> **Handy Tips** +> +> The payload for all these events contain the subscription entity. They also contain a payment entity if a payment attempt was made before the event was triggered. +> + +## Sample Payloads + +Given below are the sample payloads for Subscription webhook events. + +### Subscription Authenticated + +```json: subscription.authenticated +{ + "entity": "event", + "account_id": "acc_F5Motm2sJ5Fomd", + "event": "subscription.authenticated", + "contains": [ + "subscription" + ], + "payload": { + "subscription": { + "entity": { + "id": "sub_F5aa7VaVXtXh80", + "entity": "subscription", + "plan_id": "plan_F5Zu0nrXVhHV2m", + "customer_id": "cust_F5ZuzTm0cqYpzp", + "status": "authenticated", + "current_start": null, + "current_end": null, + "ended_at": null, + "quantity": 1, + "notes": [], + "charge_at": 1593109800, + "start_at": 1593109800, + "end_at": 1598380200, + "auth_attempts": 0, + "total_count": 3, + "paid_count": 0, + "customer_notify": true, + "created_at": 1592811228, + "expire_by": null, + "short_url": null, + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count": 3 + } + } + }, + "created_at": 1592811255 +} +``` + +### Subscription Activated + +```json: Future start date and no upfront amount +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "subscription.activated", + "contains": [ + "subscription" + ], + "payload": { + "subscription": { + "entity": { + "id": "sub_DEX6xcJ1HSW4CR", + "entity": "subscription", + "plan_id": "plan_BvrFKjSxauOH7N", + "customer_id": "cust_C0WlbKhp3aLA7W", + "status": "active", + "current_start": 1570213800, + "current_end": 1572892200, + "ended_at": null, + "quantity": 1, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "charge_at": 1570213800, + "start_at": 1570213800, + "end_at": 1599244200, + "auth_attempts": 0, + "total_count": 12, + "paid_count": 0, + "customer_notify": true, + "created_at": 1567689895, + "expire_by": 1567881000, + "short_url": null, + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count": 11 + } + } + }, + "created_at": 1567690383 +} +```json: Immediate start date/Upfront amount/Both +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "subscription.activated", + "contains": [ + "subscription" + ], + "payload": { + "subscription": { + "entity": { + "id": "sub_DEX6xcJ1HSW4CR", + "entity": "subscription", + "plan_id": "plan_BvrFKjSxauOH7N", + "customer_id": "cust_C0WlbKhp3aLA7W", + "status": "active", + "type": 2, + "current_start": 1570213800, + "current_end": 1572892200, + "ended_at": null, + "quantity": 1, + "notes": { + "notes_key_1": "Tea, Earl Grey, Hot", + "notes_key_2": "Tea, Earl Grey… decaf." + }, + "charge_at": 1570213800, + "start_at": 1570213800, + "end_at": 1599244200, + "auth_attempts": 0, + "total_count": 12, + "paid_count": 1, + "customer_notify": true, + "created_at": 1567689895, + "expire_by": 1567881000, + "short_url": null, + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count": 11 + } + }, + "payment": { + "entity": { + "id": "pay_DEXFWroJ6LikKT", + "entity": "payment", + "amount": 100000, + "currency": "INR", + "status": "captured", + "order_id": "order_DEXFWXwO24pDxH", + "invoice_id": "inv_DEXFWVuM6rPqlK", + "international": false, + "method": "card", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": "1", + "description": "Recurring Payment via Subscription", + "card_id": "card_DEXFX0KGtXexrH", + "card": { + "id": "card_DEXFX0KGtXexrH", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "5558", + "network": "MasterCard", + "type": "credit", + "issuer": "KARB", + "international": false, + "emi": false, + "expiry_month": 2, + "expiry_year": 2022 + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_C0WlbKhp3aLA7W", + "token_id": null, + "notes": [], + "fee": 2900, + "tax": 0, + "error_code": null, + "error_description": null, + "created_at": 1567690382 + } + }, + "created_at": 1567690383 + } +} +``` + +### Subscription Charged + +```json: subscription.charged +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "subscription.charged", + "contains": [ + "subscription", + "payment" + ], + "payload": { + "subscription": { + "entity": { + "id": "sub_DEX6xcJ1HSW4CR", + "entity": "subscription", + "plan_id": "plan_BvrFKjSxauOH7N", + "customer_id": "cust_C0WlbKhp3aLA7W", + "status": "active", + "type": 2, + "current_start": 1570213800, + "current_end": 1572892200, + "ended_at": null, + "quantity": 1, + "notes": { + "Important": "Notes for Internal Reference" + }, + "charge_at": 1572892200, + "start_at": 1570213800, + "end_at": 1599244200, + "auth_attempts": 0, + "total_count": 12, + "paid_count": 1, + "customer_notify": true, + "created_at": 1567689895, + "expire_by": 1567881000, + "short_url": null, + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count": 11 + } + }, + "payment": { + "entity": { + "id": "pay_DEXFWroJ6LikKT", + "entity": "payment", + "amount": 100000, + "currency": "INR", + "status": "captured", + "order_id": "order_DEXFWXwO24pDxH", + "invoice_id": "inv_DEXFWVuM6rPqlK", + "international": false, + "method": "card", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": "1", + "description": "Recurring Payment via Subscription", + "card_id": "card_DEXFX0KGtXexrH", + "card": { + "id": "card_DEXFX0KGtXexrH", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "5558", + "network": "MasterCard", + "type": "credit", + "issuer": "KARB", + "international": false, + "emi": false, + "expiry_month": 2, + "expiry_year": 2022 + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_C0WlbKhp3aLA7W", + "token_id": null, + "notes": [], + "fee": 2900, + "tax": 0, + "error_code": null, + "error_description": null, + "created_at": 1567690382 + } + } + }, + "created_at": 1567690383 +} +``` + +### Subscription Completed + +```json: subscription.completed +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "subscription.completed", + "contains": [ + "subscription", + "payment" + ], + "payload": { + "subscription": { + "entity": { + "id": "sub_DEX6xcJ1HSW4CR", + "entity": "subscription", + "plan_id": "plan_BvrFKjSxauOH7N", + "customer_id": "cust_C0WlbKhp3aLA7W", + "status": "completed", + "type": 2, + "current_start": 1599244200, + "current_end": 1601836200, + "ended_at": 1599244200, + "quantity": 1, + "notes": { + "Important": "Notes for Internal Reference" + }, + "charge_at": null, + "start_at": 1570213800, + "end_at": 1599244200, + "auth_attempts": 0, + "total_count": 12, + "paid_count": 11, + "customer_notify": true, + "created_at": 1567689895, + "expire_by": 1567881000, + "short_url": null, + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count": 0 + } + }, + "payment": { + "entity": { + "id": "pay_DEXkZ54GsNwVk9", + "entity": "payment", + "amount": 100000, + "currency": "INR", + "status": "captured", + "order_id": "order_DEXkYoCpua7kn3", + "invoice_id": "inv_DEXkYmFDy966lT", + "international": false, + "method": "card", + "amount_refunded": 0, + "amount_transferred": 0, + "refund_status": null, + "captured": "1", + "description": "Recurring Payment via Subscription", + "card_id": "card_DEXkZBosDfKGEe", + "card": { + "id": "card_DEXkZBosDfKGEe", + "entity": "card", + "name": "Gaurav Kumar", + "last4": "0008", + "network": "MasterCard", + "type": "unknown", + "issuer": "", + "international": false, + "emi": false, + "expiry_month": 11, + "expiry_year": 2031 + }, + "bank": null, + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919876543210", + "customer_id": "cust_C0WlbKhp3aLA7W", + "token_id": null, + "notes": [], + "fee": 2900, + "tax": 0, + "error_code": null, + "error_description": null, + "created_at": 1567692144 + } + } + }, + "created_at": 1567692150 +} +``` + +### Subscription Updated + +```json: subscription.updated +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "subscription.updated", + "contains": [ + "subscription" + ], + "payload": { + "subscription": { + "entity": { + "id": "sub_DEXpmJhEIZK4fe", + "entity": "subscription", + "plan_id": "plan_BvrHngQ0xLNnNG", + "customer_id": "cust_C0WlbKhp3aLA7W", + "status": "active", + "type": 3, + "current_start": 1567692455, + "current_end": 1570213800, + "ended_at": null, + "quantity": 4, + "notes": { + "Important": "Notes for Internal Reference" + }, + "charge_at": 1570213800, + "start_at": 1567692455, + "end_at": 1599071400, + "auth_attempts": 0, + "total_count": 53, + "paid_count": 1, + "customer_notify": true, + "created_at": 1567692440, + "expire_by": 1567881000, + "short_url": null, + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count": 52 + } + } + }, + "created_at": 1567692560 +} +``` + +### Subscription Pending + +```json: subscription.pending +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "subscription.pending", + "contains": [ + "subscription" + ], + "payload": { + "subscription": { + "entity": { + "id": "sub_DEX6xcJ1HSW4CR", + "entity": "subscription", + "plan_id": "plan_BvrFKjSxauOH7N", + "customer_id": "cust_C0WlbKhp3aLA7W", + "status": "pending", + "type": 2, + "current_start": 1572892200, + "current_end": 1575484200, + "ended_at": null, + "quantity": 1, + "notes": { + "Important": "Notes for Internal Reference" + }, + "charge_at": 1572978600, + "start_at": 1570213800, + "end_at": 1599244200, + "auth_attempts": 1, + "total_count": 12, + "paid_count": 1, + "customer_notify": true, + "created_at": 1567689895, + "expire_by": 1567881000, + "short_url": null, + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count": 10 + } + } + }, + "created_at": 1567691026 +} +``` + +### Subscription Halted + +```json: subscription.halted +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "subscription.halted", + "contains": [ + "subscription" + ], + "payload": { + "subscription": { + "entity": { + "id": "sub_DEX6xcJ1HSW4CR", + "entity": "subscription", + "plan_id": "plan_BvrFKjSxauOH7N", + "customer_id": "cust_C0WlbKhp3aLA7W", + "status": "halted", + "type": 2, + "current_start": 1572892200, + "current_end": 1575484200, + "ended_at": null, + "quantity": 1, + "notes": { + "Important": "Notes for Internal Reference" + }, + "charge_at": 1575484200, + "start_at": 1570213800, + "end_at": 1599244200, + "auth_attempts": 4, + "total_count": 12, + "paid_count": 1, + "customer_notify": true, + "created_at": 1567689895, + "expire_by": 1567881000, + "short_url": null, + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count": 10 + } + } + }, + "created_at": 1567691269 +} +``` + +### Subscription Paused + +```json: subscription.paused +{ + "entity": "event", + "account_id": "acc_Fe3fPCmiStazv3", + "event": "subscription.paused", + "contains": [ + "subscription" + ], + "payload": { + "subscription": { + "entity": { + "id": "sub_FeQ9WWOjGUZMpG", + "entity": "subscription", + "plan_id": "plan_FeMmuaVVa1HR0W", + "customer_id": "cust_FeOEa4PPa0by07", + "status": "paused", + "type": 1, + "current_start": 1600416437, + "current_end": 1602959400, + "ended_at": null, + "quantity": 1, + "notes": [], + "charge_at": null, + "start_at": 1600416437, + "end_at": 1610908200, + "auth_attempts": 0, + "total_count": 5, + "paid_count": 1, + "customer_notify": true, + "created_at": 1600416405, + "expire_by": null, + "short_url": null, + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "payment_method": "card", + "remaining_count": 4, + "pause_initiated_by": "self", + "cancel_initiated_by": null + } + } + }, + "created_at": 1600416473 +} +``` + +### Subscription Resumed + +```json: subscription.resumed +{ + "entity": "event", + "account_id": "acc_Fe3fPCmiStazv3", + "event": "subscription.resumed", + "contains": [ + "subscription" + ], + "payload": { + "subscription": { + "entity": { + "id": "sub_FeQ9WWOjGUZMpG", + "entity": "subscription", + "plan_id": "plan_FeMmuaVVa1HR0W", + "customer_id": "cust_FeOEa4PPa0by07", + "status": "active", + "type": 1, + "current_start": 1600416437, + "current_end": 1602959400, + "ended_at": null, + "quantity": 1, + "notes": [], + "charge_at": 1602959400, + "start_at": 1600416437, + "end_at": 1610908200, + "auth_attempts": 0, + "total_count": 5, + "paid_count": 1, + "customer_notify": true, + "created_at": 1600416405, + "expire_by": null, + "short_url": null, + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "payment_method": "card", + "remaining_count": 4, + "pause_initiated_by": null, + "cancel_initiated_by": null + } + } + }, + "created_at": 1600416481 +} +``` + +### Subscription Cancelled + +```json: subscription.cancelled +{ + "entity": "event", + "account_id": "acc_BFQ7uQEaa7j2z7", + "event": "subscription.cancelled", + "contains": [ + "subscription" + ], + "payload": { + "subscription": { + "entity": { + "id": "sub_DEXpmJhEIZK4fe", + "entity": "subscription", + "plan_id": "plan_BvrHngQ0xLNnNG", + "customer_id": "cust_C0WlbKhp3aLA7W", + "status": "cancelled", + "type": 3, + "current_start": 1568226600, + "current_end": 1568831400, + "ended_at": 1567692729, + "quantity": 4, + "notes": { + "Important": "Notes for Internal Reference" + }, + "charge_at": null, + "start_at": 1567692455, + "end_at": 1599071400, + "auth_attempts": 0, + "total_count": 53, + "paid_count": 2, + "customer_notify": true, + "created_at": 1567692440, + "expire_by": 1567881000, + "short_url": null, + "has_scheduled_changes": false, + "change_scheduled_at": null, + "source": "api", + "offer_id":"offer_JHD834hjbxzhd38d", + "remaining_count": 51 + } + } + }, + "created_at": 1567692732 +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. +> +> - While generating a signature at your end, ensure that the webhook body is passed as an argument in the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> diff --git a/llm-content/webhooks/transactions.md b/llm-content/webhooks/transactions.md new file mode 100644 index 00000000..ef196ef9 --- /dev/null +++ b/llm-content/webhooks/transactions.md @@ -0,0 +1,105 @@ +--- +title: Transactions Webhook Events +description: List of Transactions webhook events along with sample payloads. +--- + +# Transactions Webhook Events + +Transactions are the records of inflow of funds to your business account, and payouts to a Contact's Fund Account and reversals. + +## List of Transactions Webhook Events + +The table below lists the webhook events available for RazorpayX transactions. + +Webhook Events | Description +--- +`transaction.created`| Triggered whenever you: - Make a Payout (RazorpayX Lite). +- Add funds to your RazorpayX account (RazorpayX Lite). + +## Sample Payloads +Given below are the sample payloads for transactions webhook events. + +### Transaction Created + +```JSON: Payload: Payout +{ + "entity":"event", + "account_id":"acc_1Aa00000000001", + "event":"transaction.created", + "contains":[ + "transaction" + ], + "payload":{ + "transaction":{ + "entity":{ + "id":"txn_1Aa00000000001", + "entity":"transaction", + "account_number":"7878780080749731", + "amount":218, + "currency":"INR", + "credit":0, + "debit":218, + "balance":4242, + "source":{ + "id":"pout_1Aa00000000001", + "entity":"payout", + "fund_account_id":"fa_1Aa00000000001", + "amount":100, + "notes":[], + "fees":118, + "tax":18, + "status":"processing", + "utr":null, + "mode":"IMPS", + "created_at":1565343608 + }, + "created_at":1565343678 + } + } + }, + "created_at":1565343678 +} +```json: Payload: Add Funds (Direct Bank Transfer) +{ +"entity": "event", +"account_id": "acc_00000000000001", +"event": "transaction.created", +"contains": ["transaction"], +"payload": { + "transaction": { + "entity": { + "id": "txn_00000000000001", + "entity": "transaction", + "account_number": "1121431121541121", + "amount": 10000000, + "currency": "INR", + "credit": 10000000, + "debit": 0, + "balance": 10000000, + "source": { + "id": "bt_00000000000001", + "entity": "bank_transfer", + "payer_name": "Saurav Kumar", + "payer_account": "6543266545411243", + "payer_ifsc": "UTIB0000001", + "mode": "NEFT", + "bank_reference": "AXIR000000000001", + "amount": 10000000 + }, + "created_at": 1545125568 + } + } + }, +"created_at": 1545125568 +} +``` + +> **WARN** +> +> +> **Watch Out!** +> +> - If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. +> +> - While generating a signature at your end, ensure that the webhook body is passed as an argument in the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> diff --git a/llm-content/webhooks/validate-test.md b/llm-content/webhooks/validate-test.md new file mode 100644 index 00000000..b2e5eb06 --- /dev/null +++ b/llm-content/webhooks/validate-test.md @@ -0,0 +1,149 @@ +--- +title: Validate and Test Webhooks +description: Validate and test Payments and Payout Webhooks before you start using them. Read about idempotency and the importance of the order of Webhook Events. +--- + +# Validate and Test Webhooks + +You need to validate and test the webhook before starting using them. It is also important to understand idempotency and the importance of the order of Webhook Events. + +## Test Webhooks + +You can test the webhooks to verify payloads or check if your webhook integration is working. Test events get triggered on a transaction done in the **Test** mode. As the payload structure remains the same in the **Live** and **Test** modes, you can rely on your stage testing. + +You can test webhooks: +- [Using request interceptor tools](#using-request-interceptor-tools) +- [On an application running on localhost](#application-running-on-localhost) +- [On an application running on your staging environment](#application-running-on-your-staging-environment) + +### Using Request Interceptor Tools +There are many free webhook testing tools available online. However, please note that certain domains are blacklisted for security reasons and cannot be used for webhook URLs. + +To test webhooks: +1. Choose a webhook testing service. +2. Create your endpoint. +3. Copy the endpoint created for you. +4. Proceed to set up webhooks, but with the following changes: + 1. Ensure you are using **Test** mode on the Dashboard. + 2. Paste the endpoint you copied in the previous step in the **Website URL** field. + +If you have enabled the appropriate webhook event during setup, you will receive the corresponding webhook payload on your requestbin.com site. + +### Blacklisted Domains + +For security reasons, the following domains are blacklisted and cannot be used as webhook URLs: + + + - `burpcollaborator.net` + - `oast.pro` + - `interact.sh` + - `canarytokens.com` + - `requestbin.com` + - `webhook.site` + - `hookbin.com` + - `beeceptor.com` + - `mockbin.org` + - `ngrok.io` + - `loca.lt` + + + - `metadata.google.internal` + - `metadata.google.internal.` + - `localhost` + - `localhost.localdomain` + - `.onion` + - `.local` + - `.internal` + - `.corp` + + +### Application Running on Localhost + +You cannot use localhost directly to receive webhook events as webhook delivery requires a public URL. Due to security restrictions, many common tunneling services are blacklisted. You can handle this by creating a tunnel to your localhost using `zrok`. Know more about [zrok](https://docs.zrok.io/docs/zrok/getting-started). + +### Application Running on Your Staging Environment + +You can test your webhook integration in the staging environment before taking it live. You should set up webhooks in the **Test** mode. You can configure your staging host endpoint in test mode and receive test events on it. + +> **INFO** +> +> +> **Handy Tips** +> +> Enter the default OTP `754081` when prompted, while setting up, editing or deleting a webhook in test mode. +> +> +> + +## Validate Webhooks + +When your webhook `secret` is set, Razorpay uses it to create a hash signature with each payload. This hash signature is passed with each request under the `X-Razorpay-Signature` header that you need to validate at your end. We provide support for validating the signature in all of our [language SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration.md). + +If you have changed your webhook secret, remember to use the old secret for webhook signature validation while retrying older requests. Using the new secret will lead to a signature mismatch. + +`X-Razorpay-Signature` +: The hash signature is calculated using HMAC with SHA256 algorithm; with your webhook secret set as the key and the webhook request body as the message. + +You can also validate the webhook signature yourself using a [HMAC](https://en.wikipedia.org/wiki/Hash-based_message_authentication_code) as shown below: + +```html: HMAC Hex Digest +key = webhook_secret +message = webhook_body // raw webhook request body +received_signature = webhook_signature + +expected_signature = hmac('sha256', message, key) + +if expected_signature != received_signature + throw SecurityError +end + +``` + +> **WARN** +> +> +> **Do Not Parse or Cast the Webhook Request Body** +> +> While generating the signature at your end, ensure that the webhook body passed as an argument is the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> + +## Idempotency + +There could be scenarios where your endpoint might receive the same webhook event multiple times. This is an expected behaviour based on the webhook design. + +To handle duplicate webhook events: +1. You can identify the duplicate webhooks using the `x-razorpay-event-id` header. The value for this header is unique per event. +2. Check the value of `x-razorpay-event-id` in the webhook request header. +3. Verify if an event with the same header is processed at your end. + +## Order of Webhooks + +Ideally, you should receive a webhook in the order in which the webhook events occur. However, you may not always receive the webhooks in the order. + +### Example - Payments + +For example, in the case of a payment, you should receive webhooks in the following order: +1. `payment.authorized` +2. `payment.captured` + +**The above order may not be followed at all times.** You should configure your webhook URL to not expect delivery of these events in this order and handle such scenarios. + +### Example - RazorpayX + +Take payouts in RazorpayX as an example. For payouts, you should receive webhooks in the following order: +1. `payout.pending` (if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled on your account) +2. `payout.queued` (in case your [business account does not have sufficient balance to process the payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/queued.md)) +3. `payout.initiated` +4. `payout.processed` or `payout.reversed` + +The above order **may not be followed at all times**. Please keep this in mind and configure your webhook URL to handle such scenarios. + +The `processed` and `reversed` states are the last states for a payout. Their corresponding webhooks `payout.processed` or `payout.reversed` indicate this state change. Any webhook received after these should be ignored. + +### Related Information + +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) + +- [Set Up and Edit Payments Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payments.md) + +- [Set Up and Edit Payout Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) diff --git a/llm-content/x.md b/llm-content/x.md new file mode 100644 index 00000000..440d65ac --- /dev/null +++ b/llm-content/x.md @@ -0,0 +1,48 @@ +--- +title: RazorpayX - Get Started +heading: RazorpayX +description: Create a RazorpayX account to explore seamless financial management with payouts, payments, disbursals & refunds, automation and more. +--- + +# RazorpayX + +RazorpayX supercharges your business banking experience. We help business owners and finance teams automate manual, repetitive financial tasks and provide insights into money flow. + +## Features + +Using RazorpayX, you can process: + +- Refunds for customers. +- Salary payouts with automated statutory payments such as PF and TDS. +- Vendor payouts with automated TDS payments. + +You can make timely payouts on RazorpayX either via our user-friendly Dashboard or developer-friendly APIs in 3 easy steps. + +![Create Payout Process on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-create-payout.jpg.md) + +Watch this video to know more about RazorpayX: + +[Video: https://www.youtube-nocookie.com/embed/d9DnZGM-AqA] + +> **INFO** +> +> +> **Handy Tips** +> +> - If you are an existing Razorpay user, you can use your Razorpay Payment Gateway credentials to sign into RazorpayX. +> +> - Use your existing API keys to fire Payout APIs. +> +> + +[Sign up and use the demo !](https://x.razorpay.com/demo/) + +## Next Steps + +- [Set up your RazorpayX account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/set-up.md) +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md) + +### Related Information + +- [RazorpayX Account Types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types.md) +- [Test Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md) diff --git a/llm-content/x/account-statement.md b/llm-content/x/account-statement.md new file mode 100644 index 00000000..369dec92 --- /dev/null +++ b/llm-content/x/account-statement.md @@ -0,0 +1,56 @@ +--- +title: Account Statements on RazorpayX +heading: View and Download Account Statements +description: Filter, view and download account statements from the RazorpayX Dashboard. +--- + +# View and Download Account Statements + +All your transactions on the [RazorpayX Dashboard](https://x.razorpay.com/auth) are visible under the **Account Statement** tab on the left navigation. + +> **WARN** +> +> +> **Is account statement not visible on your dashboard?** +> +> If the given view is not visible on your dashboard, know more about the [alternatives for viewing account statements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-statement/sftp.md). +> + +## View Account Statement +You can view all the transactions at once or filter it as per your requirement. + +![RazorpayX Dashboard Account Statement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-account-statement-filter.jpg.md) + +## Download Account Statement +You can download all of your transaction data for a specific day, month or any time frame as per your business requirements. This information can be downloaded as a `csv` or `xls` file, or sent via email to the intended recipients. + +To download account statement: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Navigate to **Account Statement** on the left navigation. +3. Click **EXPORT**. + ![Download Account Statement Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-account-statement-report-export.jpg.md) +4. Select the date range for which you require the statement from the drop-down. +5. Select the format in which you wish to download the statement. You can choose between `csv` or `xls` files. +6. **DOWNLOAD** the statement. + +> **WARN** +> +> +> +> **Watch Out!** +> +> - Generating statements can take up to 10 minutes. +> - The closing balance shown on the dashboard is generated by Razorpay and may differ slightly from real-time bank data. +> + +7. You can also **EMAIL** the statement. Select the receivers from the list and click **EMAIL**. + +## Integrate Accounting Software + +Know about [how to integrate account statement with accounting software](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting.md). + +### Related Information + +- [Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) +- [Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) diff --git a/llm-content/x/account-statement/api.md b/llm-content/x/account-statement/api.md new file mode 100644 index 00000000..eaf283e9 --- /dev/null +++ b/llm-content/x/account-statement/api.md @@ -0,0 +1,23 @@ +--- +title: RazorpayX | Transaction APIs +heading: Transaction APIs +description: List of RazorpayX Transaction APIs available to perform various actions. +--- + +# Transaction APIs + +You can use our APIs to perform various tasks related to making payouts. You can perform most of these actions from the [RazorpayX Dashboard](https://x.razorpay.com/auth) as well. + +## List of APIs +The table below lists the various Transaction APIs and gives a brief description of each API: + +API | Description +--- +[Fetch all Transactions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/transactions/fetch-all.md) | API to retrieve details of all the transactions. +--- +[Fetch Transaction with ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/transactions/fetch-with-id.md)| API to retrieve details of one transaction using its ID. + +### Related Information + +- [Account Statement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-statement.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/apis/subscribe.md) diff --git a/llm-content/x/account-statement/sftp.md b/llm-content/x/account-statement/sftp.md new file mode 100644 index 00000000..8015c03e --- /dev/null +++ b/llm-content/x/account-statement/sftp.md @@ -0,0 +1,68 @@ +--- +title: Account Statements via SFTP +description: Access your account statements through bank portals or secure file transfer protocol (SFTP) setup. +--- + +# Account Statements via SFTP + +RBL | ✓ | ✓ +--- +Yes Bank | ✓ | ✓ +--- +ICICI Bank | ✓ | x +--- +IDFC Bank | ✓ | ✓ +--- +Axis Bank | ✓ | ✓ + +## Bank Portal for Account Statements + +Login to your respective bank account portals to view and download the account statements. + +- [RBL Bank](https://www.rblbank.com/) +- [Yes Bank](https://www.yesbank.in/) +- [ICICI Bank](https://www.icicibank.com/) +- [IDFC Bank](https://www.idfcfirst.bank.in/) +- [Axis Bank](https://www.axis.bank.in/) + +## Secure File Transfer Protocol + +Set up SFTP with RazorpayX to access the previous day’s account statement in a .CSV format through a file access tool installed in your system. You will find raw account statements shared by the bank without extra information such as Payout IDs. + +To setup SFTP in your system: + +- **Express interest**: [Write to RazorpayX Support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#razorpayx-users) with your registered email ID to initiate the SFTP request. Upon receiving your request, we will work with the bank to setup account statement for you. + +- **Install file access tool**: Install a File Access tool in a trusted system. Ensure that only authorized personnel use this file access software to access SFTP files. You can use any File Access Tool. We recommend [FileZilla](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-statement/sftp.md#setup-filezilla). + +- **Generate public-private key pair**: You will be authenticated for accessing SFTP files through a public-private key mechanism. Generate these keys in your system that are used to access the account statement. Store the private key securely and do not share with anyone. + +- **Share authentication information with RazorpayX**: Share the public key and your IP address on the previously initiated email thread. + +- **Receive credentials from RazorpayX**: After receiving the the public key and IP Address from you and authorisation from the bank, RazorpayX will share necessary credentials with you (Username, Host) on the existing email thread. + +- **Connect to Razorpay SFTP**: Using the File Access tool installed on your system and the credentials, access the files on SFTP. + +If you choose to use FileZilla, you can follow the steps given below: + + +### Setup FileZilla + + To setup FileZilla: + + 1. Open the FileZilla software on your system. + 2. Go to **File** → **Site Manager**. + 3. Click **New Site** from the left pane + 4. Enter a name for the new server. This name is for display purpose only. We suggest you to choose a name that will help you remember the purpose of the server. + 5. Go to **Protocol** and select **SFTP Protocol**. + 6. Fill the **Site Manager** form with relevant details: + - **Host**: `sftp.razorpay.com` + - **Login type**: Key file + - **User**: Username shared by RazorpayX + - **Key file**: File path to the private key on your system + + ![Setup SFTP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-account-statement-sftp.jpg.md) + + 7. Click **Connect**. You will be able to see all the files in your SFTP folder. You will receive a new account statement file everyday around 9 AM in this folder for the transactions done on the previous day. + + If you face any problems setting up SFTP on your system, [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md). diff --git a/llm-content/x/account-types.md b/llm-content/x/account-types.md new file mode 100644 index 00000000..a5fe74c0 --- /dev/null +++ b/llm-content/x/account-types.md @@ -0,0 +1,83 @@ +--- +title: RazorpayX Account Types +heading: About Account Types +description: Choose between RazorpayX Lite, a digital account with instant KYC or a traditional Current Account. +--- + +# About Account Types + +To make payouts and use other banking features, you must have a bank account linked to your RazorpayX account. There are two types of accounts available to you: + +- [RazorpayX Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/razorpayx-lite.md): A digital account created in RazorpayX with simple and quick KYC verification process for businesses to start accepting payments within a short span of time. + +- [Current Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/current-account.md): A traditional banking account that offers all standard banking features like cheque book, debit card and account statements. Current Account is offered in partnership with Partner Banks. + +> **INFO** +> +> +> +> **Handy Tips** +> +> The Partner Banks for Current Account are [RBL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/company.md), [Yes Bank](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/company.md), [IDFC First](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/kyc.md) and [Axis Bank](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/axis-current-account.md#current-account-opening-required-documents)) presently. [Contact Support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) to open a Current Account with the bank of your choice (subject to individual approval). +> +> + +## RazorpayX Account Features + +By signing up for a RazorpayX account, you unlock a variety of features that streamlines your banking and financial management. These features are available on both RazorpayX Lite and Current Account. Few of them are: + +### Low Balance Alerts for RazorpayX Account + +If your account does not have a sufficient balance, payouts are queued and processed only after you add funds to your account. This could cause delays in processing payouts and a bad experience for your customers or vendors. + +To help you avoid low balance scenarios, you can set up email alerts when your account balance falls below the limit set by you. + +#### Set Up Email Alerts + + Watch this video to know how to set up low balance email alerts. + + +[Video: https://www.youtube.com/embed/qE4yFd_elk4] + + To set up email alerts: + + 1. Go to [RazorpayX Dashboard](https://x.razorpay.com/). + 2. Navigate to **My Accounts & Settings** → **Banking** → **Low Balance Alerts**. + 3. Enter the amount that you consider is a low balance and want to be alerted about. Select the frequency at which you want to receive those alerts. + 4. Finally, select the email addresses where you want to receive the low balance alerts. + + +> **WARN** +> +> +> **Watch Out!** +> +> You can set Low Balance Alerts **only in Live** mode. It does not work in Test mode. +> + + + +The following options are available when setting low balance alerts: + +#### Independent Limits + +You can set up independent limits for each bank account linked to your RazorpayX account. For example, you can set the limit as ₹50,000 for RazorpayX Lite and ₹75,000 for your current account. + +#### Notification Frequency + +You can select how often you want the email alerts to be sent to you. The default is set to 8 hours. The available options are 4, 8, 12 and 24 hours. + +> **INFO** +> +> +> **Handy Tips** +> +> You can set up alerts to multiple email addresses. You can also send these emails to users who are not part of your RazorpayX team. +> + +### Related Information + +- [Set up your RazorpayX account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/set-up.md) +- [Open a Current Account](https://razorpay.com/x/current-accounts/) +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md) +- [Test Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md) diff --git a/llm-content/x/account-types/current-account.md b/llm-content/x/account-types/current-account.md new file mode 100644 index 00000000..89c716ba --- /dev/null +++ b/llm-content/x/account-types/current-account.md @@ -0,0 +1,96 @@ +--- +title: About RazorpayX - Current Account +heading: Current Account +description: Explore RazorpayX powered Current Account, the application process, documents required and how to add funds. +--- + +# Current Account + +RazorpayX powered [Current Account](https://razorpay.com/x/current-accounts/) comes with a robust set of tools and integrations that make financial management powerful and easy. + +Current Accounts enable you to manage receivables and payables in one place and offer all standard banking features like a cheque book, debit card and account statement. + +> **INFO** +> +> +> **Handy Tips** +> +> The Partner Banks for Current Account are [RBL](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/company.md), [Yes Bank](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/company.md), [IDFC First](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/kyc.md) and [Axis Bank](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/axis-current-account.md#current-account-opening-required-documents)) presently. [Contact Support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) to open a Current Account with the bank of your choice (subject to individual approval). +> + +## Open a Current Account + +To open a RazorpayX powered Current Account: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Go to the Current Account [application link](https://x.razorpay.com/auth/signup/?intent=current_account). Keep your Business PAN/GSTIN readily available to make your application process quicker. +3. Provide your [Business PAN](https://razorpay.com/learn/company-permanent-account-number-pan-card/)/[GSTIN](https://razorpay.com/learn/what-is-gstin-all-you-know-about-your-15-digits-gstin/) to auto-fill your application. + ![Enter either Business PAN or GSTIN to autofill Current Account Application](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-new-ca-gstin-bizpan-apply.gif.md) + + You can also manually enter your business details. Refer to the list of [required documents](#required-documents). +4. Review the business details retrieved by the identity number you provided. + 1. Verify the address for the on-site visit and click **Open account at registered address**. You can also choose to provide a new address, if required. + ![Verify and select from the addresses fetched](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-new-ca-verify-address.jpg.md) + 2. Review the details of your account type, such as partner bank name and monthly minimum balance. Click **This works for me** to proceed with the account opening. + ![Review your current account details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-ca-new-rbl-acc.jpg.md) + 3. Edit your signatories/declarations. +5. Complete the OTP verification process. + +> **INFO** +> +> +> **Handy Tips** +> +> You can always check the status of your application on the Dashboard. +> + +After verifying your details, RazorpayX works to open your Current Account with the partner bank. You can access your Current Account details and avail the benefits on your RazorpayX [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard.md). + +Here is a sample dashboard after account activation: + +![RazorpayX Account Dashboard after Activation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-ca-activated.jpg.md) + +[Add funds](#add-funds) to your Current Account to get started. + +### Required Documents + +Check the documents required to open a Current Account with the following banks as per your business type in RazorpayX: + +### RBL/Yes Bank + - [Private / Public Limited Company / OPC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/company.md) + - [Limited Liability Partnership (LLP)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/llp.md) + - [Partnership](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/partnership.md) + - [Trust or Society](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/trust-society.md) + - [Sole Proprietorship](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/sole-proprietorship.md) + +### IDFC First Bank + - [Private / Public Limited Company / OPC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/pvt-ltd-co.md) + - [Limited Liability Partnership (LLP)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/llp.md) + - [Partnership](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/partnership.md) + - [Sole Proprietorship](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/sole-proprietorship.md) + +### Axis Bank + +- [Axis Bank](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/axis-current-account.md) (available only for Public/Private Limited Company, Limited Liability Partnership or Trust, Associations, Societies and Clubs) +## Add Funds + +After account activation, add funds to your RazorpayX account to make payouts. You can do this by direct bank transfer via: +- [NEFT/RTGS/IMPS](#direct-bank-transfer-netbanking) +- [UPI](#direct-bank-transfers-upi-apps) + +### Direct Bank Transfer: Netbanking + +You can transfer funds to your RazorpayX account via a direct bank transfer from bank accounts. + +### Direct Bank Transfers: UPI Apps +To transfer funds to RazorpayX Lite from your UPI app: +1. Log in to your UPI app. +2. Create a beneficiary using your RazorpayX account number and IFSC details. You can find these details on your Dashboard → [**My Account & Settings**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard.md#my-account-settings). +3. Transfer funds via IMPS. + +### Related Information + +- [About Current Account](https://razorpay.com/blog/business-banking/what-is-current-account/) +- [Open a Current Account](https://razorpay.com/x/current-accounts/) +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md) +- [Test Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md) diff --git a/llm-content/x/account-types/escrow.md b/llm-content/x/account-types/escrow.md new file mode 100644 index 00000000..e5e14f88 --- /dev/null +++ b/llm-content/x/account-types/escrow.md @@ -0,0 +1,53 @@ +--- +title: Escrow Accounts on RazorpayX +heading: About Escrow+ Account +description: Use RazorpayX Escrow Plus service for smooth and secure financial transactions. +--- + +# About Escrow+ Account + +Escrow is a financial service that acts as a trusted intermediary to securely hold funds on behalf of transacting parties until predefined conditions are met. It serves as a neutral third party, ensuring a fair and secure exchange of assets between buyers and sellers. + +RazorpayX Escrow Plus empowers businesses with the tools they need to conduct secure and transparent financial transactions. Whether you own a small startup or a large enterprise, our scalable solutions cater to your unique requirements. + +> **INFO** +> +> +> **Handy Tips** +> +> Escrow account is mandatory if you want to use [Smart Collect 2.0](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md). +> + + +### Advantages + + - RazorpayX Escrow addresses all the security protocols and ensures that your funds are held in a secure environment. + + - You can sign up for an Escrow Account with your existing workflows and allow for quick implementation, reducing the time and effort required to set up and manage Escrow Accounts. + + - Automated Workflows minimise manual intervention and reducing the risk of errors. You can define customised conditions and triggers that automatically release funds when predefined milestones are achieved. + + - You can access comprehensive insights and analytics to make informed decisions and optimize your financial processes. + + - RazorpayX Escrow is designed to comply with the highest regulatory standards, ensuring that your transactions adhere to legal and industry-specific requirements. + + +## Trustees + +"Trustee" is a neutral third party or an individual/entity that holds and manages the funds in the account on behalf of the transacting parties. A Trustee plays a crucial role in ensuring that the terms and conditions of the Escrow arrangement are met before releasing the funds to the designated recipient. Our trustees: + +- [Axis Trustee](https://www.axistrustee.in/) +- [Mitcon Credentia](https://mitconcredentia.in/) + +## Use Cases + +We offer Escrow Accounts for: + +- [Peer to Peer Lending](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/escrow/use-cases/p2p-lending.md): RazorpayX Escrow ensures trust between borrowers and lenders. It holds funds securely until both parties fulfill their commitments, creating a reliable financial handshake in the world of peer-to-peer loans. +- [Co-Lending](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/escrow/use-cases/co-lending.md): Since this involves multiple parties, funds are held securely until all parties involved meet their obligations, fostering collaboration and confidence in the realm of digital and co-lending transactions. + +[Connect with us](https://razorpay.com/x/escrow-accounts/) to understand Escrow Accounts for other use cases. + +## Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/account-types/escrow/use-cases/co-lending.md b/llm-content/x/account-types/escrow/use-cases/co-lending.md new file mode 100644 index 00000000..59a52438 --- /dev/null +++ b/llm-content/x/account-types/escrow/use-cases/co-lending.md @@ -0,0 +1,29 @@ +--- +title: Co-Lending with RazorpayX Escrow Accounts +heading: Co-Lending for NBFCs +description: RazorpayX Escrow holds funds securely until all parties involved meet their obligations, fostering collaboration and confidence in the realm of digital and co-lending transactions. +--- + +# Co-Lending for NBFCs + +The latest digital lending rules state that the loans must only be disbursed by Regulated Entities (RE) and the money flow must happen directly between the RE account and the borrower’s account. This makes it difficult for NBFCs to manage multiple accounts and flows without any support. You can use RazorpayX as an intermediary to disburse money by onboarding your borrower as a [Sub-Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/sub-accounts.md). + +With RazorpayX Escrow+ Account you can also work with other NBFCs to lend money. The money flows into an Escrow Account. Based on the agreement guidelines, the sum passes to the borrower. When the borrower makes a repayment back, that amount is collected in the Collections Escrow+ and distributed among the NBFCs that lent the money. Trustee is not mandatory for Co-Lending, however, you can reach out to your RazorpayX POC if require one. + +![RazorpayX escrow co-lending](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-escrow-co-lending.jpg.md) + +Signing up with RazorpayX and using our Escrow+ ensures: + +- Secure flow of money. +- Automated reconciliations and reporting. +- A finance management system with all the necessities in one place. + +## Onboarding for NBFCs + +Sign up with a [Master account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/sub-accounts.md#master-account) and raise a request with your point of contact (POC) at Razorpay for a Co-Lending Escrow+ Account or share your details on our [website](https://razorpay.com/x/escrow-accounts/). + +1. Your POC at Razorpay introduces you to the Escrow Trustee (if required) and Escrow Bank for opening the co-lending Escrow Account. +2. Sign the Escrow agreement with the Escrow Bank and Escrow Trustee. +3. Create two RazorpayX accounts to link the collection and disbursement of Escrow Accounts. Parallelly, we facilitate the account opening process with the partner bank. + +Connect with your RazorpayX POC or [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) for document templates, letters and other supporting material. diff --git a/llm-content/x/account-types/escrow/use-cases/p2p-lending.md b/llm-content/x/account-types/escrow/use-cases/p2p-lending.md new file mode 100644 index 00000000..d0ae1025 --- /dev/null +++ b/llm-content/x/account-types/escrow/use-cases/p2p-lending.md @@ -0,0 +1,94 @@ +--- +title: P2P Lending with RazorpayX Escrow Accounts +heading: Instant Disbursals for P2P lenders +description: Instantly disburse payouts for licensed P2P Lending NBFCs and their Loan Service Provider (LSP)/Fintech partners with RazorpayX Escrow Accounts. +--- + +# Instant Disbursals for P2P lenders + +Typically, payout disbursals for P2P NBFCs can take upto 4 calendar days as these transactions have to be approved by a Trustee. Businesses can reduce this by signing up for a RazorpayX Escrow Account. + +With RazorpayX Escrow Account, in partnership with Axis Trustee supports instant disbursals for P2P Escrow. This solution works 24x7x365 where the Trustee automatically approves a payout in under 2 seconds. Together with instant trustee approvals and IMPS payouts, borrowers and investors of the P2P platform can receive the credit in their bank accounts instantly. + +LSP partners are onboarded as [sub-accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/sub-accounts.md) with P2P Escrow as the master account. + +![How P2P lending works](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-escrow-p2p-lending.jpg.md) + +## Onboarding for NBFCs + +You can raise a request with your point of contact (POC) at Razorpay for a P2P Escrow+ Account or share your details on our [website](https://razorpay.com/x/escrow-accounts/). + +1. Your POC at Razorpay introduces you to the Escrow Trustee and Escrow Bank for opening the P2P escrow account. +2. Sign the Escrow agreement with the Escrow Bank and Escrow Trustee. +3. The escrow trustee creates two RazorpayX accounts to link the collection and disbursement of escrow accounts. Parallelly, we facilitate the account opening process with the partner bank. + +Raise a request to the trustee for allowing Dashboard access to the relevant team members. + +## Required Documents + +Connect with your RazorpayX POC or [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) for document templates, letters and other supporting material. + + +### Documents required by Trustee + + + S. No | Document | Source | When to Obtain + --- + 1 | Memorandum & Articles of Association; Certificate of Incorporation; Certificate of Commencement of Business | Axis Trustee | Before execution + --- + 2 | List of Directors including KMP if any | Axis Trustee | Before execution + --- + 3 | Shareholding Pattern | Axis Trustee | Before execution + --- + 4 | Latest quarterly results/Annual Report | Axis Trustee | Before execution + --- + 5 | CTC of the board resolution / duly accepted letter/email of offer/appointment / consent letter appointing ATSL as Escrow Agent. | NBFC | Before execution + --- + 6 | Specimen signatures of the signatories of all the parties to the escrow as authorised by the resolution with photo identity proof. | NBFC | Before execution + --- + 7 | CTC of the approval(s) received from RBI and RBI NBFC Licence | NBFC | Before execution + --- + 8 | CTC of the Resolution/Authority Letter/Power of Attorney authorising the employees to operate on the platform | NBFC | Before execution + --- + 9 | Name, number & email address of the employees who are authorised to operate the platform as per above point, in the format of a letter | NBFC | Before execution + --- + 10 | Confirmation from the Platform that no Breach of Any RBI Regulation during the Quarter | NBFC | Within 15 days from the end of quarter. + --- + 11 | Confirmation from the Platform that no Investor/Lender is onboarded to the Platform who has exceeded overall investment limit across platform during the quarter | NBFC | Within 15 days from the end of quarter. + --- + 12 | The Lender/Investor to Borrwer exposure limit is not breached in any transaction during the quarter | NBFC | Within 15 days from the end of quarter. + --- + 13 | Observations if any raised by the Regulator have been sufficiently addressed and there are no adverse remarks. If there are any adverse remarks details of the same and action taken report | NBFC | Within 15 days from the end of quarter. + --- + 14 | Details of NPA/Delinquency during the quarter | NBFC | Within 15 days from the end of quarter. + --- + 15 | Details of any Showcause Notice/Warning/Penalties/Orders issued by a regulator during the quarter | NBFC | Within 15 days from the end of quarter. + --- + 16 | The Platform/Company is in compliance with PMLA and KYC guidelines | NBFC | Within 15 days from the end of quarter. + + + +#### Documents required by Bank + +The bank Relationship Manager will reach out to the authorised signatories with the list of relevant documents and the account opening process. + +## Onboarding for LSPs + +S. No | Document | Source | When to Obtain +--- +1 | Authority Letter/Confirmation Letter from the P2P Platform for onboarding the LSP/Fintech | P2P NBFC | Before Onboarding the Partner +--- +2 | CTC of the Resolution/Authority Letter/Power of Attorney authorising the Employees to operate on the platform from the LSP/Fintech and Name, Number & email ID of the Employees who are authorised to operate the Platform | Partner Platform | Before On-Boarding the Partner +--- +3 | Copy the underlying agreement between the P2P Platform & the LSP/Fintech | P2P NBFC | Before On-Boarding the Partner + +## API Integration + +You can make payouts via your Escrow Account using our [Payout APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/api.md). + +Points to remember: + +- Ensure to follow all the payout [best practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/best-practices.md). +- Contact type must be `borrower` or `investor`. Know more about [Contact APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts/api.md). +- Payout purpose must be `Loan disbursement` or `Investor withdrawal`. Know more about [Payout purpose](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#payout-purpose). +- [Allowlist your IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md). diff --git a/llm-content/x/account-types/faqs.md b/llm-content/x/account-types/faqs.md new file mode 100644 index 00000000..42876699 --- /dev/null +++ b/llm-content/x/account-types/faqs.md @@ -0,0 +1,47 @@ +--- +title: RazorpayX Account Types | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about RazorpayX Account Types. +--- + +# Frequently Asked Questions (FAQs) + +### 1. What is a Business Account? + + Your [RazorpayX Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/razorpayx-lite.md) is referred to as a business account. This account has an account number and an IFSC. You can transfer funds to and from this account, store them and make payouts from it, as and when you wish. + + + +### 2. How do I get my Business account? + + Your business account is created when you [set up your RazorpayX account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/set-up.md). You can start transacting after account activation. + + + +### 3. Can I have more than one Business account? + + No, in the current version of the RazorpayX platform, you can only have one business account (RazorpayX Lite) per Merchant ID. However you can open [RazorpayX powered Current Account(s)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/current-account.md) which will be added as additional business account(s). + + + +### 4. Can I share my business account details with my business contacts to receive funds? + + Yes, you can share your business account number and IFSC with your business contacts to receive funds. They will be able to add your business account number to their bank portals and transfer funds to your account. + + + +### 5. How can I view all transactions against my business account? + + You can view all transactions made against your business account via your RazorpayX Dashboard under [Account Statement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-statement.md). You can also fetch all your transactions using [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/transactions/fetch-all.md). + + + +### 6. How can I check my current balance against my Business account? + + Your current balance is visible to you on the Dashboard as soon as you log in. + + + +### 7. Will I have access to all my merchant accounts on the RazorpayX platform? + + Yes. Just like on your Razorpay Dashboard, you can [switch between different accounts on your RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard.md), provided you have been added as a team member on your other RazorpayX accounts. diff --git a/llm-content/x/account-types/razorpayx-lite.md b/llm-content/x/account-types/razorpayx-lite.md new file mode 100644 index 00000000..c3a85b56 --- /dev/null +++ b/llm-content/x/account-types/razorpayx-lite.md @@ -0,0 +1,42 @@ +--- +title: RazorpayX Lite Account +heading: RazorpayX Lite +description: Check RazorpayX Lite and how to add funds to it. +--- + +# RazorpayX Lite + +RazorpayX Lite is a digital account created in RazorpayX for businesses to start making payouts within a short span of time. However, we recommend you to open a [Current ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/current-account.md) or [ Escrow account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/escrow.md) supercharged with the RazorpayX tech stack to seamlessly manage all your payables and receivables in a single dashboard. **The accounts are powered by our Partner Banks.** + +- RazorpayX Lite is available to you as soon as you complete the KYC process and have your account verified. The approval process is simple and fast. +- RazorpayX Lite has a customer identifier and IFSC. You can get these details on your RazorpayX Dashboard when you click **+ Add balance**. You will see your account details as shown here: + + ![RazorpayX Lite Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/addbalanceNew.jpg.md) + +## Create RazorpayX Lite + +1. You can kick start the activation process by completing the KYC form. The KYC form can be accessed using the **Fill KYC Form** button from the RazorpayX Dashboard as shown here: + ![Fill KYC Form to activate RazorpayX Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-va-kyc.jpg.md) + The KYC modal is displayed as shown here: + ![Complete KYC Form to activate RazorpayX Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-va-kyc-modal.jpg.md) + +1. Enter the details in each section of the modal and click **Next**. Once the form is submitted, the Razorpay team reviews your details and activates your account within 2-3 business days. + +## Add Funds + +For a safer and secured banking experience, you must add funds to your RazorpayX Lite through [validated bank accounts only](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/source-account-validation.md). You can add upto 5 accounts for fund loading on the RazorpayX Dashboard. + +## Direct Bank Transfers: Netbanking + +To add funds to your RazorpayX Lite via a direct bank transfer: + +1. Log in to your netbanking account. +2. Copy your RazorpayX Lite details. Account details include your customer identifier and IFSC details. +3. Create a beneficiary using your account details. +3. Transfer funds via IMPS, NEFT or RTGS. + +### Related Information + +- [Set up your RazorpayX account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/set-up.md) +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md) +- [Test Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md) diff --git a/llm-content/x/account-types/source-account-validation.md b/llm-content/x/account-types/source-account-validation.md new file mode 100644 index 00000000..2e0d280f --- /dev/null +++ b/llm-content/x/account-types/source-account-validation.md @@ -0,0 +1,55 @@ +--- +title: RazorpayX | Source Account Validation +heading: Source Account Validation +description: Validate bank accounts from which you can add funds to your RazorpayX Lite. +--- + +# Source Account Validation + +You can add funds to your RazorpayX Lite through bank transfers. However, you can make these transfers **only through validated bank accounts**. + +## Why Should I Validate Bank Accounts + +For a safer and secure banking experience on RazorpayX, you need to validate the bank account through which you want to add funds to your RazorpayX Lite. This assures that the funds are flowing in from verified sources only. + +## Validation Process + +The source account validation process consists of three steps: + +1. You add your bank account details on the RazorpayX Dashboard. +2. Razorpay validates these details and notifies you. +3. Once successfully validated, you use these accounts to add funds to your RazorpayX Lite. + +### Step 1: Adding Bank Account Details + +You need to add the bank account details on the Razorpay Dashboard. You can add a maximum of 5 bank accounts. Only **Owner** and **Admin** users can add bank account details for validation. + +To add bank account details: +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/). +2. Click **+ Add balance**. + ![RazorpayX Dashboard. '+ Add balance' is available at the top-middle edge of the screen.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-rzpx-activated-account.jpg.md) +3. Click **+Add Account**. + ![A pop-up screen from RazorpayX Dashboard after intiating '+ Add balance'. Click '+ Add Account' and then add funds as your account balance.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-add-account.jpg.md) +4. Enter the bank account details: + 1. **Account number**: Account from which you want to add funds. Enter the number again in the field given below. + 2. **IFSC**: The IFSC for the bank account branch. + 3. **Account holder**: Name of the bank account holder. + 4. **Type of account**: Add the account type. For example, `director account` or `own account`. + 5. **Upload Documents**: Upload supporting documents for the account. You can upload either a copy of a cancelled cheque or the account statement. + ![Account details screen asking for Bank Account details like Account Number, IFSC, Account holder, Type of Account and Upload documents.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-account-details.jpg.md) +5. Click **Submit**. + +### Step 2: Razorpay Validates Account Details + +Once your account details are saved, a ticket is created. The account approval process can take up to 3 days. You will receive a notification once the validation process is complete. + +Or, you can also check the status of the bank account on your Dashboard: + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/). + 2. Navigate to **Settings** → **Banking**. +Here you will find all the bank accounts that you have validated, and or require validation. + +### Step 3: Add Funds from Validated Accounts + +After the account details are validated, you can start adding funds to your RazorpayX Lite. + +Know more about [adding funds to RazorpayX Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/razorpayx-lite.md#add-funds). diff --git a/llm-content/x/accounting.md b/llm-content/x/accounting.md new file mode 100644 index 00000000..85e4f7a7 --- /dev/null +++ b/llm-content/x/accounting.md @@ -0,0 +1,28 @@ +--- +title: Accounting Integrations on RazorpayX +heading: About Accounting Integration +description: Integrate RazorpayX with Zoho Books or Tally and sync your account statements, payouts and vendor payments. +--- + +# About Accounting Integration + +You need accounting to accumulate and report on financial information about the performance, financial position and cash flows of your business. RazorpayX offers Accounting integration to ease the tedious tasks and make reconciliation easy. + +## Advantages of Accounting Integration + +Below listed are some of the advantages of accounting integration: + +- **Accuracy**: Minimizes human errors through automated data transfer, ensuring precise financial records. + +- **Time Savings**: Automates tasks like data entry and reporting, freeing up time for strategic analysis. + +- **Real-Time Insights**: Provides instant access to up-to-date financial data for informed decision-making. + +- **Cost Efficiency**: Reduces labor costs, identifies cost-saving opportunities and improves resource allocation. + +## Accounting Integrations + +With the RazorpayX Accounting feature, you can sync your [Account Statement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-statement.md), [Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) and [Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) with the accounting software of your choice. You can integrate RazorpayX with: + +1. [Zoho Books](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks.md) +2. [Tally](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally.md) diff --git a/llm-content/x/accounting/tally.md b/llm-content/x/accounting/tally.md new file mode 100644 index 00000000..c1d82ca3 --- /dev/null +++ b/llm-content/x/accounting/tally.md @@ -0,0 +1,128 @@ +--- +title: Integrate Tally with RazorpayX +heading: Integrate Tally +description: Integrate Tally with RazorpayX to sync account statement, vendor payments and payouts for easy reconciliation while accounting. +--- + +# Integrate Tally + +Tally is widely used accounting software known for its user-friendly interface. It helps businesses manage financial transactions, track inventory and comply with tax regulations. Tally provides customizable reports, ensures data security, and supports multi-user collaboration. + +Integrate RazorpayX with Tally to streamline your financial processes. It enables automatic reconciliation of payments, simplifies expense tracking and enhances overall financial management. This integration facilitates seamless data flow between your accounting and payment systems, reducing manual efforts and minimizing errors in your financial records. + +## Prerequisites + +You must ensure a few things on your tally software. + +1. You can either install the Tally plugin file or share your tally license number if you want us to enable it for you. + + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure your Tally is up to date. If not, navigate to **Help** → **Manage License** → **Update**. Enter your Tally net Id and password. +> + +2. Back up your Tally data before starting the integration process. +2. Navigate **Manage** → select the company you want sync with RazorpayX. +3. Create 0% ledgers for mapping where relevant ledgers are not available. (GST ledgers) +3. Go to **Enable RazorpayX Integration** and type **YES**. +4. **Enable Scheduler** for automatic timely data sync. +5. Click **RazorpayX Settings** and enter your MID and registered email ID (of the owner, admin or finance team) in lowercase, press enter. Authentication OTP is sent on your registered email. Enter the OTP, and start the integration on the RazorpayX Dashboard. + +## Tally Integration + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Navigate to **My Accounts & Settings** → **Integrations** → **Tally**. + + +> **INFO** +> +> +> **Handy Tips** +> +> - If you do not find relevant ledgers, click **Change** on the top of the screen and select all the relevant ledgers/groups and click **Apply Changes**. Only the selected group's ledgers appear to map with RazorpayX. +> - Click on the drop-down value that appears otherwise the mapping will not save. +> + + +3. **Configure Bank Ledgers**. Select the relevant bank Ledger to map with RazorpayX Lite account, and similarly map the relevant ledgers with your listed bank accounts. You can search in the drop-down. Click **Next**. +4. **Configure GST ledgers**. Select the relevant ledgers that records CGST, SGST and IGST- In case you have a common ledger, you can select the same ledger multiple times. Selecting GST ledgers are mandatory. +5. **Configure TDS Ledgers**. You can map the required TDS ledgers from the drop-down or click **Next** to skip TDS ledgers. +6. **Import Vendors from Tally**. You can either **Map Existing Vendors** or **Import all Vendors**. If you have an existing account on RazorpayX and Tally, we recommend you to **Map Existing Vendors** to avoid duplication. RazorpayX vendor list is displayed, select the relevant tally ledger for each vendor, manually. After the process is complete, click **Next**. +7. **Import Items from Tally**. You can either **Map Existing Items** or **Import all Items**. After the process is complete, click **Next**. +8. **Configure Indirect Income Ledgers**. Select the relevant ledger for **Discounts** and **Adjustments**. Click **Next**. +9. **Setup Expense and Purchase Ledgers**. Click **Change**, select the relevant ledger and click **Apply Changes** for purchase ledger and expense ledger, respectively. Click **Next**. + +Your Tally integration with RazorpayX is successful. The time it takes to sync depends on the number of ledgers you have on tally. It syncs only for the specific company that you choose and not all the companies stored in your tally account. + +The [**Accounting** tab](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting.md) appears on your RazorpayX Dashboard left navigation. You can change the existing settings from **Accounting** → [**Rules & Configuration**](#rules--configuration) at any time. + +> **INFO** +> +> +> **Handy Tips** +> +> We recommend you to hard refresh your RazorpayX Dashboard to ensure the synced data is updated at all times. +> - **Hard refresh for**: +> - **Mac users**: command ⌘ + shift + R +> - **Windows users**: Ctrl + F5 +> + +Go to Tally and click **RazorpayX Sync**. + +## Accounting on RazorpayX Dashboard + +After you integrate with Tally, navigate to the Accounting tab from the [RazorpayX Dashboard](https://x.razorpay.com/). You can sync your payouts and vendor payments to Tally here. + +![Accounting on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/accounting-tab.jpg.md) + +Payouts are listed under the **Expenses** tab and Vendor Payments are listed under the **Bills** tab. (update image to tally) + +![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/accounting-zohobooks.jpg.md) + +## Rules & Configuration + +The following are the available settings for your Tally Integration: + + +### General + + You can choose to disable or enable the following options: + + - Sync and Categorise [Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks/vendor-payments.md) from RazorpayX to Tally + - Sync and Categorise [Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks/payouts.md) from RazorpayX to Tally + + You can also **Refresh** Tally Expense Accounts, Bank Ledgers and Tax Groups. + + + +### Rules + + Setting rules will automate categorisation and hence reduce the manual effort drastically. You can set the following rules: + - Contact Rules + - Set contact rules for [categorisation of Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks/vendor-payments.md#categorise). + - Select the drop-down under Tally Expense Account and choose the relevant Account for the particular contact. You can also **Add Contact +** and add a new rule for it. + ![Contact rules](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/set-contact-rules.jpg.md) + - Purpose Rules + - Set purpose rules for [categorisation of Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks/payouts.md#categorise). + - Select the drop-down under Tally Expense Account and choose the relevant Account for the particular RazorpayX Purpose and select the relevant Tax Slab. You can also **Add Purpose +**. + ![Purpose rules](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/set-purpose-rules.jpg.md) + + + +### Contact Mapping + + Select the relevant Tally Vendor from the drop-down menu or **+ Create New Vendor** to map it to the particular RazorpayX Contact to avoid duplication of vendors on Tally. + + ![Contact mapping](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/contact-mapping.jpg.md) + + + +### Account Mapping + + Setup ledgers in Tally for RazorpayX accounts. Select the Tally Expense Account you want to map with the particular RazorpayX Account. + + ![Account mapping](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-mapping.jpg.md) diff --git a/llm-content/x/accounting/tally/account-statement.md b/llm-content/x/accounting/tally/account-statement.md new file mode 100644 index 00000000..14f9bb17 --- /dev/null +++ b/llm-content/x/accounting/tally/account-statement.md @@ -0,0 +1,126 @@ +--- +title: Tally Account Statement Integration with RazorpayX +heading: Tally Account Statement Integration +description: Integrate and sync your RazorpayX account statements with Tally with RazorpayX for reconciliation. +--- + +# Tally Account Statement Integration + +### Sync Account Statements + + You can integrate your RazorpayX Account Statement with Tally to sync payment information from RazorpayX and reconcile. After integration, all the transaction data on the RazorpayX bank statement flows into your accounting software, saving you time and effort. + + - Account Statement can be synced with both RazorpayX Lite and Current Account. + - It updates automatically at the given time, every day. + - It passes all the required context you need to categorise your transaction. + + + Term | Description + --- + App | The app used to make the payment. Possible values: +- `payout` +- `VP`: Vendor Payments +- `TP`: Tax Payments +- `PL`: Payout Links + + --- + TaxType | The tax category imposed on the payout. Possible values: +- `advance_tax` +- `gst` +- `tds` + + --- + Cpin | It is a Common Portal Identification Number. It is a 14 digit unique number to identify the challan. + --- + Purpose | The purpose for which the expense was incurred. + --- + Sub-total | The invoice amount before GST, Cess and other taxes. + --- + Invoice number | The invoice number your entered while creating the invoice. + --- + Invoice date | The invoice date you entered while creating the invoice. + --- + CGST+SGST/ IGST | The CGST+SGST/ IGST amount on the invoice. + --- + TDS | The TDS amount on the invoice. Tax deduction at source (TDS) means collecting tax on income in the form of salary, rent, asset sales, dividends. + --- + TDS Slab | The interest rates based on the amount. + --- + TDS Name | The TDS Category chosen on the invoice. + --- + RzpDesc | The RazorpayX description passed while creating the entity. + --- + Payout ID | The unique Payout ID recorded on RazorpayX. + --- + Account Number |The beneficiary bank account number. + --- + IFSC | The beneficiary bank IFSC. + --- + Payee | Name of the beneficiary to which the payment was made. + --- + VPA | The virtual payment address used to send or receive money without an IFSC code or bank account number. + --- + Notes | Additional Notes. + + + Navigate to **Account Statement** → **Automate Accounting** on the Dashboard and **Select** the software of your choice. + + ![Accounting Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-account-statement-integrate-softwares.jpg.md) + + +Integrate your RazorpayX Account Statement with your Tally application to sync payment information and reconcile. + +Once the integration is successful, all the transaction data on the RazorpayX bank statement will automatically flow into Tally, saving you time and effort. It works with both your RazorpayX Lite and Current Accounts. + +The [smart bank statement sync](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/bank-statement-sync.md) feature is available as part of the [Tally Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally.md). With this integration, you can understand your transactions in a business perspective, rather than just a banking perspective. + +The account statements is synced every day at **6:00 am** and **8:00 pm**. + +## Prerequisites + +See [RazorpayX-Tally Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/set-up.md). + +## Sync RazorpayX Account Statement with Tally + +1. Open Tally on your system. +2. Click **F1** → **TDLs & Add-ons** → **Manage Local TDS**. + ![image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-integration-1.png.md) +3. Go to file name, click **Specify Path** and paste the file path. +4. Select TCP file and type **YES** under **Load TDL** to enable it. Press enter. +5. Go back to the Gateway of Tally home screen. On your right, you will see 2 more options, **RazorpayX Settings** and **RazorpayX Sync**. +6. Click **RazorpayX Settings** and Enable RazorpayX Integration by entering **YES**. Under authentication settings, enter your MID (log in to Dashboard and click on profile to find yours) and enter your registered email ID. + ![image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-integration-2.png.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> Only the Admin account's details must be shared on Tally for the integration to work. Other team members's account details will not be accepted. We will send an OTP to the registered ID once a week to authenticate the admin. +> + +7. Enable **Sync all transaction from RazorpayX to the Bank Ledger** by selecting **YES**. You can also enable **Invoice Sync Settings** by selecting **YES**, if you have an existing vendor payment integration. +8. Click **Accept settings**. +9. An OTP is sent to your email. Enter the OTP for verification. + +This completes the integration. To select a ledger for the flow of transaction, follow the steps below: + +1. Upon successful integration, a pop-up saying **Map RazorpayX Bank Account to Bank Ledger** will appear on the screen which displays details of all the RazorpayX Accounts you have. +2. Under the Creation Method, you can either choose **Create New** or **Map to Existing** Ledgers and then under the Tally Bank Ledger, you can either select the existing Tally Bank Ledger or **Create New**. All your transaction details will flow into whichever ledger you select. + + ![image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-integration-3.png.md) +3. Press Enter. + +## Test feature + +After completing the above integration steps, try creating a Payout on RazorpayX. + +1. While entering the Payout Details, under Payout Purpose, you will be able to see additional payout purposes specific to a business’ expenses. This lets you add a reason behind a particular transaction. +2. Proceed and create a payout by clicking on Pay. +3. Now, go to Tally after the next scheduled sync (at **6:00 am or 8:00 pm**) and navigate to Gateway of Tally. Under Utilities, click on RazorpayX and then click on RazorpayX Bank Statement. Select the Bank Account Ledger for which you want to view the statement, i.e. the account used to create the recent payout. +4. You will be able to see all the bank transaction entries. Click on the entry for which you made the payment recently. +5. Under Narration at the bottom, you will be able to find all the details associated with the transaction, which you would have to manually share with your finance team. +6. You can convert this voucher into a payment entry, a receipt or a journal entry. After this, you approve it and that voucher will be posted to your Tally. + +Using this feature, you will be able to categorize your transactions into specific expense ledgers very quickly and make your reconciliation and compliance very smooth. diff --git a/llm-content/x/accounting/tally/advances.md b/llm-content/x/accounting/tally/advances.md new file mode 100644 index 00000000..0855fe23 --- /dev/null +++ b/llm-content/x/accounting/tally/advances.md @@ -0,0 +1,72 @@ +--- +title: Integrate RazorpayX Advances with Tally +description: Integrate and Sync RazorpayX Vendor Advances with Tally. +--- + +# Integrate RazorpayX Advances with Tally + +Tally may require more information than originally provided while making a payout. With this integration and the initial configuration, the process of filling up the required details is automated. You can make configurations with [**Rules & Configurations**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks.md#rules-configuration) under General and Account Mapping to start. [Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) made via your RazorpayX account are recorded as **Expenses** under Accounting. + +![Accounting Expenses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-accounting-expenses.jpg.md) + +You can filter and view the **Expenses** by: +- Debit Account +- Payment Method +- Payout Purpose +- Tally Account + +## Life Cycle + +Each payout appears under Accounting Expenses after it is `processed`. + +- It is first visible under the **Categorise** tab. +- Once you enter the required information, it moves to the **Review** tab. +- After you review the payout, it moves to the **Sync** tab, which means that the particular payout has been synced with your Tally account. + +![Accounting lifecycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/accounting-payout-zoho-lifecycle.jpg.md) + +## Categorise + +Certain payouts are not synced with Tally due to information unavailability. These payouts show up in the **Categorise** tab. To provide complete information: + +1. Click on the entry you want to categoise. +2. In the right-hand side pane, click **CATEGORISE**. +3. Select your Tally **Expense Account** and **Ledger** from the drop-down menu. +4. Select the **Tax Slab**. + +The payout moves to the **Review** tab. + +You can automate this process to an extent by setting [**Purpose Rules**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks.md#rules). This means that you can select a corresponding **Tax Slab** and the **Tally Expense Account** to which you want the payouts, with that particular purpose, to sync. + +**Example**: + +- Payouts **Purpose**: `Payslip` +- **Tax Slab** selected under Purpose Rules: `12%` +- **Tally Expenses Account** selected under Purpose Rules: `Employee Costs` + +This means, everytime a payout's purpose is recorded a `Payslip` while making the payout, we automatically sync it to the `Employee Costs` Expenses Account on Zoho with a `12%` Tax Slab. Hence, the payout directly appears on the **Review** tab instead of the **Categorise** tab and reduces the manual effort of categorising each time. + +> **INFO** +> +> +> **Handy Tips** +> +> - You can also choose to **EXCLUDE** the entry. With this, the payout will not be categorised in RazorpayX. It will remain in an intermediatory state and you can categorise it later directly on Tally. +> - It is also automatically excluded when the categorisation fails to sync. You can see the **Exclude** tab to check on any missed expenses on Tally. +> + +## Review + +If all the information is present, the payout is showed in the review tab. Select the payout you want to review and click **SYNC NOW** to sync the payout with Tally. You can also select multiple or all payouts in the Review tab and sync them. + +![Accounting Review](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-accounting-review.jpg.md) + +## Sync + +The **Sync** tab has all the payouts that were synced to your Tally account. Select the particular payout to view more details, including the timelines and find them in the right pane. You can also find the sync status of an entry under the **Payouts** tab. + +![Accounting Sync](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-accounting-sync.jpg.md) + +In case the sync fails, you can either **FIX & RETRY SYNC** or **EXCLUDE** the entry. If you choose to exclude, the payout will not be categorised. It will remain in an intermediatory state and you can categorise it later directly on Tally. + +![Zoho accounting sync fail](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-accounting-sync-failed.jpg.md) diff --git a/llm-content/x/accounting/tally/faqs.md b/llm-content/x/accounting/tally/faqs.md new file mode 100644 index 00000000..1faf4acf --- /dev/null +++ b/llm-content/x/accounting/tally/faqs.md @@ -0,0 +1,107 @@ +--- +title: Integrate Tally with RazorpayX | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Tally integration with RazorpayX. +--- + +# Frequently Asked Questions (FAQs) + +### 1. How are bills and payments synced to Tally? + + Bills or invoices you upload on RazorpayX can be synced to Tally as purchase vouchers. Similarly, any bill payments or advances made on RazorpayX are synced to Tally as payment voucher. + + + +### 2. Are bill payments and advances automatically reconciled against the respective bills? + + Yes, when we sync the advances or bill payments to Tally, we also update the reference of the bill against which the advance or payment is made. For example, you make an advance of ₹5,000 to a vendor. You can sync that to Tally and a payment voucher of ₹5,000 is created against that vendor. Later when a bill comes in and an advance is attached to the bill, the purchase voucher is created and the earlier synced payment voucher is automatically linked to this new purchase voucher. + + + +### 3. Can I import bills from Tally to RazorpayX? + + No, on Source to Pay with Tally you can upload bills on RazorpayX and they are synced to Tally, the vice-versa is not possible. + + + +### 4. What information is synced along with the bill in Tally? + + The purchase voucher is created with the right vendor ledger, items, purchase/expense account and GST & TDS details. In the narration we share the description added in RazorpayX along with an audit link, which includes the entire RazorpayX audit log of the bill. + + + +### 5. Can I import vendors and items created in Tally to RazorpayX? + + You can import Vendors and Items from Tally once, during the integration. + + + +### 6. If I create a new vendor/item in Tally, how can I import that to RazorpayX post integration? + + You cannot import vendors or items from Tally to RazorpayX post integration. You can create new vendor/item on RazorpayX and map it to the new one is Tally. + + + +### 7. How can I ensure that the right ledgers are debited and credited in Tally? + + During the Tally integration, you can map your RazorpayX entities to Tally ledgers to ensure accurate book-keeping. Your RazorpayX bank accounts are mapped to the bank ledgers, GST components are mapped to the GST ledgers and TDS components to the TDS ledgers. You can also choose your Tally purchase/expense ledgers while creating a bill in RazorpayX. + + + +### 8. How can I ensure duplicate vendors or items are not created in Tally? + + Whenever a new vendor/item is created in RazorpayX you can choose to map it to an existing vendor or item in Tally or create a new one from RazorpayX itself. + + + +### 9. I don’t want to sync some bills to Tally, is that possible? + + You can choose which bills you want to sync. This control can also be given to specific people in your team. You can exclude the bills that you do not want to sync to Tally. + + + +### 10. Are items synced to Tally and is inventory updated? + + Yes, you can choose to sync bills as an item voucher in which case the inventory is updated in Tally with the right quantity, rate, GST slab and purchase account. + + + +### 11. I don’t maintain inventory in Tally, can I still use the integration? + + Yes, you can choose to sync bills as accounting voucher type, in which case the purchase/expense ledgers is updated and inventory is not affected. + + + +### 12. How is the Tally plugin installed? + + Share your Tally license number with us and we enable the plugin for you, via cloud. Post that, you can enable the plugin in the company settings. Enter your RazorpayX merchant ID and your RazorpayX registered email. An OTP is sent to the email once a week to secure the connection. + + + +### 13. I have multiple companies in Tally, how will the integration work with it? + + One RazorpayX account can be integrated with one Tally company only. You can opt for a Sub-Account setup in RazorpayX where each sub account can be integrated with a Tally company. + + + +### 14. I have state wise GST ledgers, is that supported with the integration? + + Yes, you can map all the state wise GST ledgers, these ledgers will be updated based on the GSTIN you choose while creating a bill. + + + +### 15. Are the bills synced in real time? + + Yes, click **RazorpayX Sync** Tally on post integration to sync bills and payments data RazorpayX and Tally. You can also schedule the sync between RazorpayX and Tally everyday on a particular time. + + + +### 16. How are failures or edge cases handled? + + Any bills or payments which fail to sync, are shown in a separate section along with the failure reason. You can retry syncing or exclude them and account for them manually. + + + +### 17. Are updates to bills synced to Tally? + + Payment updates are synced to Tally, however details like vendor change, item change are not automatically updated in Tally once the bill is synced. However, you can choose to sync the bill only once all the details are finalised. diff --git a/llm-content/x/accounting/tally/vendor-payments.md b/llm-content/x/accounting/tally/vendor-payments.md new file mode 100644 index 00000000..07e81030 --- /dev/null +++ b/llm-content/x/accounting/tally/vendor-payments.md @@ -0,0 +1,69 @@ +--- +title: Integrate RazorpayX Vendor Payments with Tally +description: Integrate and Sync RazorpayX Vendor Payments with Tally. +--- + +# Integrate RazorpayX Vendor Payments with Tally + +Tally may require more information than originally provided while making a vendor payment. With this integration and the initial configuration, the process of filling up the required details is automated. You can make configurations with [**Rules & Configurations**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks.md#rules-configuration) under General, Account Mapping and Contact Mapping to start. [Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) are recorded as **Bills** under Accounting. They are recorded here as soon as the invoice is created. The invoice need not be in `paid` state for the sync to occur. + +![Accounting Bills](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-accounting-bills.jpg.md) + +You can filter and view the **Bills** by: +- Payment Status +- Tally Account + +## Life Cycle + +Each vendor payment appears under Accounting Bills after it is `processed`. + +- It is first visible under the **Categorise** tab. +- Once you enter the required information, it moves to the **Review** tab. +- After you review the vendor payment, it moves to the **Sync** tab, which means that the particular vendor payment has been synced with your Tally account. + +![Accounting lifecycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/accounting-zoho-lifecycle.jpg.md) + +## Categorise + +Certain invoices are not synced with Tally due to information unavailability. These vendor payments show up in the **Categorise** tab. To provide complete information: + +1. Click on the entry you want to categoise. +2. In the right-hand side pane, click **CATEGORISE**. +3. Select your Tally **Expense Account** and **Ledger** from the drop-down menu. +4. Select the **Tax Slab**. + +The vendor payment moves to the **Review** tab. + +You can automate this process to an extent by setting [**Contact Rules**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks.md#rules). This means that you can select a corresponding **Tally Expense Account** to which you want the vendor payments made to that particular vendor, to sync. + +**Example**: + +- Vendor **Contact** name: `Gaurav Kumar` +- **Tally Expenses Account** selected under Purpose Rules: `Regular Vendor` + +This means, everytime a payment is made to `Gaurav Kumar` via RazorpayX, we automatically sync it to the `Regular Vendor` Expenses Account on Tally. Hence, the vendor payment directly appears on the **Review** tab instead of the **Categorise** tab and reduces the manual effort of categorising each time. + +> **INFO** +> +> +> **Handy Tips** +> +> - You can also choose to **EXCLUDE** the entry. With this, the vendor payment will not be categorised in RazorpayX. It will remain in an intermediatory state and you can categorise it later directly on Tally. +> - It is also automatically excluded when the categorisation fails to sync. You can see the **Exclude** tab to check on any missed expenses on Tally. +> + +## Review + +If all the information is present, the vendor payment is showed in the review tab. Select the vendor payment you want to review and click **SYNC NOW** to sync the vendor payment with Tally. You can also select multiple or all vendor payments in the Review tab and sync them. + +![Accounting Review](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-accounting-review.jpg.md) + +## Sync + +The **Sync** tab has all the vendor payments that were synced to your Tally account. Select the particular vendor payment to view more details, including the timelines and find them in the right pane. You can also find the sync status of an entry under the **Vendor Payments** tab. + +![Accounting Sync](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-accounting-sync.jpg.md) + +In case the sync fails, you can either **FIX & RETRY SYNC** or **EXCLUDE** the entry. If you choose to exclude, the payout will not be categorised. It will remain in an intermediatory state and you can categorise it later directly on Tally. + +![Zoho accounting sync fail](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-accounting-sync-failed.jpg.md) diff --git a/llm-content/x/accounting/zohobooks.md b/llm-content/x/accounting/zohobooks.md new file mode 100644 index 00000000..5eb6bd58 --- /dev/null +++ b/llm-content/x/accounting/zohobooks.md @@ -0,0 +1,91 @@ +--- +title: Integrate RazorpayX with Zoho Books +description: Integrate RazorpayX with Zoho Books to sync account statement, vendor payments and payouts for easy reconciliation while accounting. +--- + +# Integrate RazorpayX with Zoho Books + +Zoho Books is a financial platform that enables you to create invoices, maintain and reconcile bank accounts, and make tax payments to ensure GST compliance. + +If you are a Zoho Books user, you can integrate your Zoho account with RazorpayX to sync payment information between RazorpayX to Zoho Books. This makes reconciliation easy. + +## Integrate with Zoho Books + +To start the integration process: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **Profile** → **My Accounts & Settings** → **Integrations**. +3. Select **ZOHOBOOKS** in the Accounting Tool Integration menu. +4. You can **Invite Finance Team →** or integrate on your own by clicking **Integrate Myself**. If you have invited your finance team, they can click **Integrate →**. +5. Select the domain in which your Zoho Books is hosted. + 1. Click **Proceed with .in** if your domain is .IN + 2. Click **Proceed with .com** if your domain is .COM +6. Now, RazorpayX will redirect to the Zoho Books website. Login to your Zoho Books account and click **Accept**. +7. You are then redirected back to RazorpayX to complete the final step. Select your organisation from the drop-down list which is synced from Zoho Books. +8. Your GSTIN is pre-filled. Click **NEXT**. This integration works only if you have a GSTIN attached to your Zoho Books account. +9. Connect your RazorpayX bank account/s to an existing Zoho Books ledger or create a new one by selecting from the drop-down menu. All payments made via the chosen RazorpayX bank account appear in the respective ledger on Zoho Books. + This works with both the Current account as well as RazorpayX Lite. +10. Review the settings. **Change Sync Settings** if you want to make any changes or click **NEXT →**. + +If you click **Change Sync Settings**, you can disable the functions listed below. All the functions are enabled by default. + - **Send invoices form RazorpayX to Zoho Books** + - **Sync Payouts data from RazorpayX to Zoho Books** + - **View RazorpayX bank account statement in Zoho Books** + + +This completes Zoho Books Integration and a success message is displayed as shown below. Either **Go to Accounting →** and explore the feature or **Setup a Demo Call**. + +## Accounting on RazorpayX Dashboard + +After you integrate with Zoho Books, navigate to the Accounting tab from the [RazorpayX Dashboard](https://x.razorpay.com/). You can sync your payouts and vendor payments to Zoho Books here. + +![Accounting on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/accounting-tab.jpg.md) + +Payouts are listed under the **Expenses** tab and Vendor Payments are listed under the **Bills** tab. + +![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/accounting-zohobooks.jpg.md) + +## Rules & Configuration + +The following are the available settings for your Zoho Books Integration: + + +### General + + You can choose to disable or enable the following options: + + - Sync RazorpayX Bank [Account Statement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks/account-statement.md) to Zoho Books + - Sync and Categorise [Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks/vendor-payments.md) from RazorpayX to Zoho Books + - Sync and Categorise [Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks/payouts.md) from RazorpayX to Zoho Books + + You can also **Refresh** Zoho Books Expense Accounts, Bank Ledgers and Tax Groups. + + + +### Rules + + Setting rules will automate categorisation and hence reduce the manual effort drastically. You can set the following rules: + - Contact Rules + - Set contact rules for [categorisation of Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks/vendor-payments.md#categorise). + - Select the drop-down under Zoho Books Expense Account and choose the relevant Account for the particular contact. You can also **Add Contact +** and add a new rule for it. + ![Contact rules](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/set-contact-rules.jpg.md) + - Purpose Rules + - Set purpose rules for [categorisation of Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks/payouts.md#categorise). + - Select the drop-down under Zoho Books Expense Account and choose the relevant Account for the particular RazorpayX Purpose and select the relevant Tax Slab. You can also **Add Purpose +**. + ![Purpose rules](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/set-purpose-rules.jpg.md) + + + +### Contact Mapping + + Select the relevant Zoho Vendor from the drop-down menu or **+ Create New Vendor** to map it to the particular RazorpayX Contact to avoid duplication of vendors on Zoho Books. + + ![Contact mapping](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/contact-mapping.jpg.md) + + + +### Account Mapping + + Setup ledgers in Zoho Books for RazorpayX accounts. Select the Zoho Books Expense Account you want to map with the particular RazorpayX Account. + + ![Account mapping](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/account-mapping.jpg.md) diff --git a/llm-content/x/accounting/zohobooks/account-statement.md b/llm-content/x/accounting/zohobooks/account-statement.md new file mode 100644 index 00000000..f8ccbfbd --- /dev/null +++ b/llm-content/x/accounting/zohobooks/account-statement.md @@ -0,0 +1,81 @@ +--- +title: Zoho Books Account Statement Integration with RazorpayX +heading: Zoho Books Account Statement Integration +description: Integrate and sync your account statements on Zoho Books with RazorpayX for reconciliation. +--- + +# Zoho Books Account Statement Integration + +You can integrate your RazorpayX Account Statement with Zoho Books to sync payment information from RazorpayX and reconcile. After integration, all the transaction data on the RazorpayX bank statement flows into your accounting software, saving you time and effort. + +- Account Statement can be synced with both RazorpayX Lite and Current Account. +- It updates automatically at the given time, every day. +- It passes all the required context you need to categorise your transaction. + +Term | Description +--- +App | The app used to make the payment. Possible values: +- `payout` +- `VP`: Vendor Payments +- `TP`: Tax Payments +- `PL`: Payout Links + +--- +TaxType | The tax category imposed on the payout. Possible values: +- `advance_tax` +- `gst` +- `tds` + +--- +Cpin | It is a Common Portal Identification Number. It is a 14 digit unique number to identify the challan. +--- +Purpose | The purpose for which the expense was incurred. +--- +Sub-total | The invoice amount before GST, Cess and other taxes. +--- +Invoice number | The invoice number your entered while creating the invoice. +--- +Invoice date | The invoice date you entered while creating the invoice. +--- +CGST+SGST/ IGST | The CGST+SGST/ IGST amount on the invoice. +--- +TDS | The TDS amount on the invoice. Tax deduction at source (TDS) means collecting tax on income in the form of salary, rent, asset sales, dividends. +--- +TDS Slab | The interest rates based on the amount. +--- +TDS Name | The TDS Category chosen on the invoice. +--- +RzpDesc | The RazorpayX description passed while creating the entity. +--- +Payout ID | The unique Payout ID recorded on RazorpayX. +--- +Account Number |The beneficiary bank account number. +--- +IFSC | The beneficiary bank IFSC. +--- +Payee | Name of the beneficiary to which the payment was made. +--- +VPA | The virtual payment address used to send or receive money without an IFSC code or bank account number. +--- +Notes | Additional Notes. + +Navigate to **Account Statement** → **Automate Accounting** on the Dashboard and **Select** the software of your choice. + +![Accounting Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-account-statement-integrate-softwares.jpg.md) + +[Video: https://www.youtube.com/embed/k_2wm9SiFQ8] + +- It updates automatically at **6:00 am** and **8:00 pm**, every day. +- It passes all the required context you need to categorise your transaction on Zoho Books. + +On Zoho Books, navigate to the **Banking Overview** section. Select the appropriate bank ledger, and find the necessary information under the statement details column. + +## Prerequisites + +To keep your opening balance up-to-date: + +1. Log in to your Zoho Books Account and navigate to **Settings**. +2. Select **Opening Balances** and **click Edit**. +3. Scroll to the **Bank** section and update your opening balance. + ![image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-zoho-account-statement-1.jpg.md) +4. Enter and click **Continue** to save the update. diff --git a/llm-content/x/accounting/zohobooks/payouts.md b/llm-content/x/accounting/zohobooks/payouts.md new file mode 100644 index 00000000..2ec75bb7 --- /dev/null +++ b/llm-content/x/accounting/zohobooks/payouts.md @@ -0,0 +1,73 @@ +--- +title: Integrate RazorpayX Payouts with Zoho Books +heading: Integrate Payouts with Zoho Books +description: Integrate and Sync RazorpayX Payouts with Zoho Books. +--- + +# Integrate Payouts with Zoho Books + +Zoho Books may require more information than originally provided while making a payout. With this integration and the initial configuration, the process of filling up the required details is automated. You can make configurations with [**Rules & Configurations**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks.md#rules-configuration) under General and Account Mapping to start. [Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) made via your RazorpayX account are recorded as **Expenses** under Accounting. + +![Accounting Expenses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-accounting-expenses.jpg.md) + +You can filter and view the **Expenses** by: +- Debit Account +- Payment Method +- Payout Purpose +- Zoho Books Account + +## Life Cycle + +Each payout appears under Accounting Expenses after it is `processed`. + +- It is first visible under the **Categorise** tab. +- Once you enter the required information, it moves to the **Review** tab. +- After you review the payout, it moves to the **Sync** tab, which means that the particular payout has been synced with your Zoho Books account. + +![Accounting lifecycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/accounting-payout-zoho-lifecycle.jpg.md) + +### Categorise + +Certain payouts are not synced with Zoho Books due to information unavailability. These payouts show up in the **Categorise** tab. To provide complete information: + +1. Click on the entry you want to categoise. +2. In the right pane, click **CATEGORISE**. +3. Select your Zoho Books **Expense Account** and **Ledger** from the drop-down menu. +4. Select the **Tax Slab**. + +The payout moves to the **Review** tab. + +You can automate this process to an extent by setting [**Purpose Rules**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks.md#rules). This means that you can select a corresponding **Tax Slab** and the **Zoho Books Expense Account** to which you want the payouts, with that particular purpose, to sync. + +**Example**: + +- Payouts **Purpose**: `Payslip` +- **Tax Slab** selected under Purpose Rules: `12%` +- **Zoho Books Expenses Account** selected under Purpose Rules: `Employee Costs` + +This means, everytime a payout's purpose is recorded a `Payslip` while making the payout, we automatically sync it to the `Employee Costs` Expenses Account on Zoho with a `12%` Tax Slab. Hence, the payout directly appears on the **Review** tab instead of the **Categorise** tab and reduces the manual effort of categorising each time. + +> **INFO** +> +> +> **Handy Tips** +> +> - You can also choose to **EXCLUDE** the entry. With this, the payout will not be categorised in RazorpayX. It will remain in an intermediatory state and you can categorise it later directly on Zoho Books. +> - It is also automatically excluded when the categorisation fails to sync. You can see the **Exclude** tab to check on any missed expenses on Zoho Books. +> + +### Review + +If all the information is present, the payout is showed in the review tab. Select the payout you want to review and click **SYNC NOW** to sync the payout with Zoho Books. You can also select multiple or all payouts in the Review tab and sync them. + +![Accounting Review](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-accounting-review.jpg.md) + +### Sync + +The **Sync** tab has all the payouts that were synced to your Zoho Books account. Select the particular payout to view more details, including the timelines and find them in the right pane. You can also find the sync status of an entry under the **Payouts** tab. + +![Accounting Sync](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-accounting-sync.jpg.md) + +In case the sync fails, you can either **FIX & RETRY SYNC** or **EXCLUDE** the entry. If you choose to exclude, the payout will not be categorised. It will remain in an intermediatory state and you can categorise it later directly on Zoho Books. + +![Zoho accounting sync fail](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-accounting-sync-failed.jpg.md) diff --git a/llm-content/x/accounting/zohobooks/vendor-payments.md b/llm-content/x/accounting/zohobooks/vendor-payments.md new file mode 100644 index 00000000..456a45f3 --- /dev/null +++ b/llm-content/x/accounting/zohobooks/vendor-payments.md @@ -0,0 +1,70 @@ +--- +title: Integrate RazorpayX Vendor Payments with Zoho Books +heading: Integrate Vendor Payments with Zoho Books +description: Integrate and Sync RazorpayX Vendor Payments with Zoho Books. +--- + +# Integrate Vendor Payments with Zoho Books + +Zoho Books may require more information than originally provided while making a vendor payment. With this integration and the initial configuration, the process of filling up the required details is automated. You can make configurations with [**Rules & Configurations**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks.md#rules-configuration) under General, Account Mapping and Contact Mapping to start. [Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) are recorded as **Bills** under Accounting. They are recorded here as soon as the invoice is created. The invoice need not be in `paid` state for the sync to occur. + +![Accounting Bills](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-accounting-bills.jpg.md) + +You can filter and view the **Bills** by: +- Payment Status +- Zoho Books Account + +## Life Cycle + +Each vendor payment appears under Accounting Bills after it is `processed`. + +- It is first visible under the **Categorise** tab. +- Once you enter the required information, it moves to the **Review** tab. +- After you review the vendor payment, it moves to the **Sync** tab, which means that the particular vendor payment has been synced with your Zoho Books account. + +![Accounting lifecycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/accounting-zoho-lifecycle.jpg.md) + +### Categorise + +Certain invoices are not synced with Zoho Books due to information unavailability. These vendor payments show up in the **Categorise** tab. To provide complete information: + +1. Click on the entry you want to categoise. +2. In the right pane, click **CATEGORISE**. +3. Select your Zoho Books **Expense Account** and **Ledger** from the drop-down menu. +4. Select the **Tax Slab**. + +The vendor payment moves to the **Review** tab. + +You can automate this process to an extent by setting [**Contact Rules**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks.md#rules). This means that you can select a corresponding **Zoho Books Expense Account** to which you want the vendor payments made to that particular vendor, to sync. + +**Example**: + +- Vendor **Contact** name: `Gaurav Kumar` +- **Zoho Books Expenses Account** selected under Purpose Rules: `Regular Vendor` + +This means, everytime a payment is made to `Gaurav Kumar` via RazorpayX, we automatically sync it to the `Regular Vendor` Expenses Account on Zoho Books. Hence, the vendor payment directly appears on the **Review** tab instead of the **Categorise** tab and reduces the manual effort of categorising each time. + +> **INFO** +> +> +> **Handy Tips** +> +> - You can also choose to **EXCLUDE** the entry. With this, the vendor payment will not be categorised in RazorpayX. It will remain in an intermediatory state and you can categorise it later directly on Zoho Books. +> - It is also automatically excluded when the categorisation fails to sync. You can see the **Exclude** tab to check on any missed expenses on Zoho Books. +> + +### Review + +If all the information is present, the vendor payment is showed in the review tab. Select the vendor payment you want to review and click **SYNC NOW** to sync the vendor payment with Zoho Books. You can also select multiple or all vendor payments in the Review tab and sync them. + +![Accounting Review](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-accounting-review.jpg.md) + +### Sync + +The **Sync** tab has all the vendor payments that were synced to your Zoho Books account. Select the particular vendor payment to view more details, including the timelines and find them in the right pane. You can also find the sync status of an entry under the **Vendor Payments** tab. + +![Accounting Sync](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-accounting-sync.jpg.md) + +In case the sync fails, you can either **FIX & RETRY SYNC** or **EXCLUDE** the entry. If you choose to exclude, the payout will not be categorised. It will remain in an intermediatory state and you can categorise it later directly on Zoho Books. + +![Zoho accounting sync fail](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-accounting-sync-failed.jpg.md) diff --git a/llm-content/x/apis.md b/llm-content/x/apis.md new file mode 100644 index 00000000..a6c847fb --- /dev/null +++ b/llm-content/x/apis.md @@ -0,0 +1,41 @@ +--- +title: Payout APIs +heading: About APIs +description: List of APIs available to perform various actions required to make payouts. +--- + +# About APIs + +You can use our APIs to make payouts. You can make payouts from the [RazorpayX Dashboard](https://x.razorpay.com/auth) as well. + +## List of APIs + +The table below lists the various APIs and gives a brief description of each API: + +API | Description +--- +[Contacts APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts/api.md) | APIs to create, fetch details, update, activate, or deactivate a contact to whom payouts can be made. +--- +[Fund Account APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts/api.md#fund-account-apis) | APIs to create, fetch details, activate, or deactivate a fund account to which payouts are made. +--- +[Account Validation APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts/api.md#account-validation-apis) | APIs to bank account and vpa creation and validation. +--- +[Payout APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/api.md#payout-apis) | APIs to create, fetch or cancel a payout made to a contact's fund account. +--- +[Payouts to Cards APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/api.md#payout-to-cards-apis) | APIs to make payouts to tokenised or unsaved cards. +--- +[Composite APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/api.md#payout-composite-api) | APIs to make payouts with just the contact details along with bank account details, UPI ID, or card details without having to create a fund account. +--- +[Payout Link APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/api.md) | APIs to create payout links for contacts whose fund account details are not available. Payouts can be made by sending a payout link to the contact. +--- +[Transaction APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-statement/api.md) | API to fetch all transactions made on your business account. +--- +[Fetch Balance API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation/balance-fetch.md) | API to fetch account balance(s). +--- +[Amazon Payout APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-wallet/amazon/api.md#list-of-apis) | APIs needed to make payouts via Amazon Pay. + +### Related Information + +- [Contacts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md) +- [Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/apis/subscribe.md) diff --git a/llm-content/x/apis/checklist.md b/llm-content/x/apis/checklist.md new file mode 100644 index 00000000..ee83c933 --- /dev/null +++ b/llm-content/x/apis/checklist.md @@ -0,0 +1,49 @@ +--- +title: API Integration Checklist for RazorpayX +heading: API Integration Checklist +description: Ensure you follow all the best practices listed here to use our APIs efficiently. +--- + +# API Integration Checklist + +The following table lists the recommended practices for a successful API Integration with RazorpayX. + +Checklist | Description +--- +Ensure you have a Live Account | You can access both, Live and Test mode. [Generate Key ID and Secret](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x.md#generate-api-key) in Live mode for real-time transactions. +--- +Select the Type of Account | - [Current Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/current-account.md) : A direct Integration with the bank is more economical. The beneficiary gets the registered company name in the narration field. +- [RazorpayX Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/razorpayx-lite.md) : A backup channel in case of primary channel failure. + +--- +Select the Type of API integration | While using standalone API's, the fund account can be re-used, which reduces the response time, which in turn, reduces the load on the data base. +--- +Choose a Payout Method | Bank accounts and UPI are available by default. [Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards.md) require PCI-DSS compliance. +--- +Make a [Penny Drop](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-account-validation.md) | Improved efficiency as fund accounts are validated before actual payout. +--- +Check for Additional Integration | You have the provision to include multiple solutions other than payouts to enhance end-user experience. +--- +Use [Source Account Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/source-account-validation.md) | Fund inflow from only trusted sources. +--- +Use [Payouts Pro](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/intelligent-payouts.md) | Increase success rate of payouts when the beneficiary bank is down. +--- +Check [Idempotency](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) Header ([Handling 5XX error](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x.md#handling-5xx-errors)) | Eliminate duplicate payouts due to human or network error. +--- +Check if Feature Enablement is required | [Contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) and enable the feature in case the required is not available on your dashboard. +--- +[Set up Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) | Receive realtime status update. There is less load on the Dashboard due to reduced fetch calls. +--- +[Fetch Transactions API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/transactions/fetch-all.md) | Combined with webhook reconciliation, the fetch API's provide an optimal/reliable reconciliation process. +--- +[Allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) | Non-allowlisted IP API calls are rejected, hence, improves security. +--- +Get [Custom Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/reports.md) | Efficiently collate data that is required to ease reconciliation. +--- +Enable [Downtime webhook events](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md#payout-downtime-started) | Provides proactive alerts in case of scheduled downtimes. +--- +[Contact support team](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) or your RazorpayX POC for Custom Integration | Custom builds are available for specific use cases. + +### Related Information + +- [Payouts Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/best-practices.md) diff --git a/llm-content/x/apis/subscribe.md b/llm-content/x/apis/subscribe.md new file mode 100644 index 00000000..9789ba95 --- /dev/null +++ b/llm-content/x/apis/subscribe.md @@ -0,0 +1,136 @@ +--- +title: RazorpayX | Subscribe to Webhooks +heading: Subscribe to Webhooks +description: Subscribe to various Webhook events related to RazorpayX to receive instant notifications. +--- + +# Subscribe to Webhooks + +Webhooks (Web Callback, HTTP Push API or Reverse API) are one of the ways in which one web application can send information to another application in real-time when a specific event happens. Know more about [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + +## Set Up and Edit Payout Webhooks +You must first [set up and edit Payout Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) as per your requirement. + +## Validate and Test Webhooks +Then you must [validate and test webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/validate-test.md) as a best practice. + +## Webhook Events and Descriptions + +Listed below are the various webhook events available in RazorpayX. The payload remains the same irrespective of the `fund_account_type`, that is, a bank account, VPA or card, to which the payout is made. + +The table below lists the webhook events available for RazorpayX Payouts. + +Webhook Event | Applicable For | Description +--- +`payout.pending` |_all payouts_ | Triggered whenever a payout moves to the `pending` state. The payout remains in this state till you approve or reject it. +--- +`payout.rejected` |_all payouts_ | Triggered whenever a payout moves to the `rejected` state. The payout was rejected by someone from your team. +--- +`payout.queued` |_all payouts_ | - Triggered whenever a payout moves to the queued state. Payout goes to queued state when you do not have sufficient funds to process it or when the beneficiary bank/NPCI/partner bank is down. This event is applicable only for RazorpayX Lite. +- You will receive the reason for the payout to be in the queued state as part of the status_details object. + +--- +`payout.initiated` |_all payouts_ | Triggered when the payout moves to the `processing` state when the payout is created or from the `queued` state when sufficient funds are available to process the payout. +--- +`payout.processed` |_all payouts_ | Triggered when a payout moves to the `processed` state. This happens when the payout is processed by the contact's bank. +--- +`payout.updated`|_all payouts_ | Triggered whenever there is a change in the payout entity. For example, when we receive the UTR for the payout from the bank. - For NEFT transactions, this webhook is fired within 90 seconds. +- For IMPS and UPI transactions, this webhook is generally fired immediately. + +--- +`payout.reversed` |_all payouts_ | Triggered whenever a payout fails and the amount is returned to your business account. +--- +`payout.failed` |_all payouts_ | Triggered when a payout is failed because the beneficiary bank OR NPCI OR processing partner bank is down. If the beneficiary bank/partner bank/NPCI does not recover within the stipulated SLA, a FAILED event will be sent with the respective reason. +> **INFO** +> +> **Handy Tips** It is mandatory to subscribe to the `payout.failed` event if you are using Payout APIs. + +--- +`payout.downtime.started` | _all payouts_ | Triggered when a payout downtime starts. Do not initiate a payout if this is triggered since the beneficiary bank is down and the payout will fail. +> **WARN** +> +> **Watch Out!** UPI mode is not supported by `payout.downtime` webhooks. + +--- +`payout.downtime.resolved` | _all payouts_ | Triggered when a payout downtime is resolved. Make payouts once this webhook is triggered as it indicates that the beneficiary bank downtime is resolved. + +The table below lists the webhook events available for RazorpayX transactions. + +Webhook Events | Description +--- +`transaction.created`| Triggered whenever you: - Make a Payout (RazorpayX Lite). +- Add funds to your RazorpayX account (RazorpayX Lite). + +When your webhook `secret` is set, Razorpay uses it to create a hash signature with each payload. This hash signature is passed with each request under the `X-Razorpay-Signature` header that you need to validate at your end. Support for validating the signature is provided in all our [language SDKs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/server-integration.md). + +> **WARN** +> +> +> **Do Not Parse or Cast the Webhook Request Body** +> +> While generating the signature at your end, ensure that the webhook body passed as an argument is the **raw webhook request body**. **Do not parse or cast the webhook request body**. +> + +```PHP:PHP +// PHP SDK: https://github.com/razorpay/razorpay-php +use Razorpay\Api\Api; +$api = new Api("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"); + +$api->utility->verifyWebhookSignature($webhookBody, $webhookSignature, $webhookSecret); +// $webhookBody should be raw webhook request body + +```PYTHON:Python +# Python SDK: https://github.com/razorpay/razorpay-python +import razorpay +client = razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]")) + +client.utility.verify_webhook_signature(webhook_body, webhook_signature, webhook_secret) +# webhook_body should be raw webhook request body + +```RUBY:Ruby +# Ruby SDK: https://github.com/razorpay/razorpay-ruby +require razorpay + +Razorpay::Utility.verify_webhook_signature(webhook_body, webhook_signature, webhook_secret) +# webhook_body should be raw webhook request body + +```C:C# +// C# SDK: https://github.com/razorpay/razorpay-dot-net + +Utils.verifyWebhookSignature(webhookBody, webhookSignature, webhookSecret); +// webhookBody should be raw webhook request body + +```Java:Java +// Java SDK: https://github.com/razorpay/razorpay-java + +Utils.verifyWebhookSignature(webhookBody, webhookSignature, webhookSecret); +// webhookBody should be raw webhook request body +``` + +`X-Razorpay-Signature` +: The hash signature is calculated using HMAC with SHA256 algorithm, your webhook secret set as the key and the webhook request body as the message. + +You can also validate the webhook signature yourself using an [HMAC](https://en.wikipedia.org/wiki/Hash-based_message_authentication_code) as shown below: + +``` +key = webhook_secret +message = webhook_body // raw webhook request body +received_signature = webhook_signature + +expected_signature = hmac('sha256', message, key) + +if expected_signature != received_signature + throw SecurityError +end +``` + +## Sample Payloads and Events + +See [Payout Sample Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md#payout-payloads). + +For transaction webhook events, check the [Transaction Sample Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md#transaction-payloads). + +### Related Information + +- [Set Up Webhooks for Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) +- [Payout APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts.md) diff --git a/llm-content/x/axis-current-account.md b/llm-content/x/axis-current-account.md new file mode 100644 index 00000000..c14b29e8 --- /dev/null +++ b/llm-content/x/axis-current-account.md @@ -0,0 +1,127 @@ +--- +title: RazorpayX x Axis Bank Current Account Documents +heading: Axis Bank +description: List of documents required to open a Current Account powered by RazorpayX in partnership with Axis Bank for Public / Private Limited, LLP and TASC. +--- + +# Axis Bank + +You are eligible for an Axis Bank Current Account powered by RazorpayX if your company is one of the following types: + +1. Public/ Private Limited Company +2. Limited Liability Partnership (LLP) +3. Trust, Associations, Societies and Club (TASC) + +> **WARN** +> +> +> **Watch Out!** +> +> This is currently unavailable for Sole Proprietorships and Partnerships. +> + +Get in touch with your POC from Razorpay or reach out to our [support team](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) to assist you with Axis Bank Current Account opening, powered by RazorpayX. + + +### Current Account Opening Required Documents + + Given below is the list of required documents: + + + S. no. | Document | Description + --- + 1 | - Memorandum of Association (MoA) +- Article of Association (AoA) +- Certificate of Incorporation (CoI) + | Self-attested hard copy required. + --- + 2 | Company PAN copy | Self-attested hard copy required. + --- + 3 | MCA Master copy | Self-attested hard copy required. + --- + 4 | GST Certificate | All 3 pages. Self-attested hard copy required. + --- + 5 | IE Certificate | If applicable. + --- + 6 | Board resolution (on letterhead of the firm) | Verifiable digitally signed documents are accepted. Signature required from any 2 Directors or Company Secretary. + --- + 7 | Board resolution of Trustee as per agreement (on letterhead of the firm) | Signed and sealed. + --- + 8 | Annexure II | Additional KYC declaration. + --- + 9 | Annexure III | Additional Information on Key Officials. + --- + 10 | Annexure-C | KYC Declaration for Legal Entity + --- + 11 | KYC & Account Opening form | All Signatories/ Directors / members signing Escrow agreement. Self-attested. + --- + 12 | KYC & Account Opening form | All Signatories/ Directors / members of 2nd party signing Escrow agreement. Self-attested. + --- + 13 | Share Holding Pattern (on letterhead of the firm) | Self-attested hard copy required. + --- + 14 | Existing credit details | + --- + 15 | Account Opening Form | + --- + 16 | Director's/Authorized Signatory “For” seal of company. | + --- + 17 | Account Opening Cheque from Existing Bank Account. | + --- + 18 | BO Declaration | + --- + 19 | CANEG Schedule of Charges (Current Account for New Economy Group or CANEG is an account designed by Axis Bank for E-commerce and Start-up companies which leverage technology to create innovative solutions) | + --- + 20 | List of Directors (on the letterhead) | + --- + 21 | Signatory KYCs | + --- + 22 | PAN copy | Self-attested hard copy required. + --- + 23 | Passport Size photograph | Self-attested hard copy required. + --- + 24 | Aadhar copy / DL / Passport (Clear in words and image) | Self-attested hard copy required. + + + +### Required Authorised Signatory Details + +- Email ID +- Mobile number +- City of Birth +- Mother's name + +Share the soft copy of company documents and signatory's KYC with us to prepare the Account Opening Form (AOF). A rectangular stamp with the correct company name would also be required. The assigned Relationship Manager from Axis Bank will assist you through the process. + +## Escrow Account with Axis Bank + +You can open an Axis Current Account powered by RazorpayX for [Escrow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/escrow.md). All the requirements mentioned above are needed along with: + +- The Escrow Agreement, signed by all 3 parties. + - The Email Indemnity Clause as an annexure to Escrow Agreement. + +## Account Linking Process Required Documents + + + To enable API, you require the following documents: + + - IDP Form. + - Board resolution on company letterhead with seal and signature, signed by any 2 Directors. + - Payment terms & conditions to be executed on ₹200 stamp paper (for Bangalore). Stamp paper value is state-specific. + - Pre-authorised letter on the Company letterhead. + - TSP Letter on the company letterhead. + - SFTP statement request letter. + + + To enable UPI, you require the following documents: + + - GST customer communication on company letterhead with seal and signature. + - UPI enrolment form signed on all pages, + - UPI merchant agreement to be executed on ₹200 stamp paper (for Bangalore). Stamp paper value will be state-specific. + - UPI Mapping letter; to be used for mapping corporate code on UPI, on company letterhead, sealed and signed by the authorised signatory. + - MMM file containing organisation details. + - Your business use case for UPI. + + +## Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/bulk-payouts.md b/llm-content/x/bulk-payouts.md new file mode 100644 index 00000000..d296692f --- /dev/null +++ b/llm-content/x/bulk-payouts.md @@ -0,0 +1,205 @@ +--- +title: Bulk Payouts by RazorpayX +heading: About Bulk Payouts +description: Use the Bulk Upload feature on the RazorpayX Dashboard to make payouts in bulk. +--- + +# About Bulk Payouts + +As a business owner, you may come across situations wherein you have to make payouts to multiple vendors or multiple payouts to vendor(s). You can use the Bulk Payouts feature to create multiple payouts in such cases. Apart from processing payouts, you can perform the following tasks: +- Make a payout to an existing [fund account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md). +- Create a new [contact and fund account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md#create-a-contact-with-fund-account) to make a payout. + +Alternatively, you can also [create contacts and fund accounts in bulk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts/bulk-uploads.md). + +## Create Bulk Payout + +Watch the video to know how to create bulk payouts on RazorpayX Dashboard. + +[Video: https://www.youtube.com/embed/LbUCrqIpWqU] + +To create bulk payouts: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Click **Payouts** on the left navigation menu and select **Bulk** on the top menu. +3. Click **+ Bulk Payouts**. + + +> **INFO** +> +> +> **Handy Tips** +> +> Alternatively, you can click the drop-down next to **+PAYOUTS** and select **Bulk Payouts**. +> + + +4. [Download the template](#download-templates) (`.xlsx` or `.csv`). Or download it from the Dashboard: + + +### How to download templates from the Dashboard? + + 1. Click **Download Template**. + 2. Select the Payment method relevant to you from the drop-down menu. You can select from: + - UPI + - NEFT/IMPS/RTGS + - Amazonpay Wallet + 3. Select the beneficiary information available. You can choose from: + - Beneficiary details (Bank details, UPI, Wallet no.) + - RazorpayX Fund Account ID (For existing contacts) + 4. Choose `.xlsx` or `.csv` format and click **Download**. + + +> **INFO** +> +> +> **Handy Tips** +> +> We recommend you to choose `.xlsx` format to see validations so that you can avoid errors during file upload. +> + + + + + + +5. Fill in the details based on the validations in the template. +6. Drag and drop your updated file or click **Browse** and select the file to upload from your system. +7. Once the file is successfully uploaded, click **Next**. +8. Select the **Payout Purpose** and the account you want to **Debit From**. +9. You can edit the **Batch Name** if required. +10. Click **Next** to make the payouts or [schedule the payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/scheduled.md). +11. Enter the OTP sent to the registered mobile number and email id to confirm the payout and create the batch. If Approval Workflow is enabled, click **Send for Approval** in the final step. + +> **INFO** +> +> +> **Handy Tips** +> +> Using this feature, you can make upto 50,000 payouts at once. +> + +You have successfully created a bulk payout batch. Your file then moves to the `processing` status. Hover over the file name to **View Payouts** and their status or click on the respective file name to find details on the right pane. + ![Bulk Payouts process complete](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-bulk-payouts-complete.jpg.md) + + +### Bulk Payouts batch processing vs Payouts Processing + + After the file is processed, you can see the accepted rows and invalid rows. + - **ACCEPTED ROWS**: These rows contain payouts that were successfully created. + - **INVALID ROWS**: These rows were not processed due to some errors. You can download the batch report from the left pane (given below) to view the errors. + + The **VALID AMOUNT** visible on the Dashboard is not the total of the created payouts amount. Only valid rows are processed. Check valid and invalid rows to rectify the mismatch. + + +## Bulk Payouts Templates + +Bulk Payouts Templates are available in `.xlsx` and `.csv`. You can find the templates [here](#download-templates). + +### Instructions to fill the Template + +- Fill all the mandatory columns. +- Hover over the empty cells to see the validation criteria (applicable for .xlsx files only). +- If you are copy-pasting data using an internal tool, use these shortcuts: + - MacOS : Cmd+Opt+V, then press V again + - WindowsOS : Ctrl+Alt+V then press V again + +> **WARN** +> +> +> **Watch Out!** +> +> - Do not use Command+V or Ctrl+V for pasting data. The validation and formatting which help to identify errors will be removed. +> +> - If you are generating a file in a template format from an internal tool, copy-paste the validations and formatting from the template to your file. +> + +#### File Requirement + + +Column | Requirement +--- +Number of Rows in the sheet | - Min: 1 +- Max: 50,000 + +--- +Number of sheets in the file | Only 1 sheet is permitted. +--- +Incorrect format of the file | Download and fill from the [templates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts.md#bulk-payouts-templates) provided. +--- + +#### Payouts Requirement + +Column | Requirement +--- +Bene Name | Between 3 - 60 characters. +--- +Bene Account number | Between 5 - 35 characters. +--- +Payout Amount | The amount should be:- =//= ₹2L for payout via RTGS +- =/ **INFO** +> +> **Example** +If you have chosen `Razorpay Fund Account ID` details along with `UPI` as the payout method, the [Fund Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md) ID provided by Razorpay for the respective contact must be linked to a UPI account. + +--- +Bene UPI ID | Valid UPI ID. +--- +Bene phone no. linked with amazonpay | Between 10-13 digits. + +You can select the template based on the payment method and the beneficiary to whom you want to credit the amount. Know more about the [payout modes, processing time and amount limit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#payout-modes-and-tat). + +### Resolve Errors + +The template throws errors in case the in-sheet validation fails. Ensure you follow the [instructions to fill the template](#instructions-to-fill-the-template) to avoid errors. + +### Download Templates + + +### XLSX Templates + + These templates are available in `.xlsx` format. + + Payout Method | Beneficiary Information | Download Template + --- + UPI | Beneficiary Details | Download file + --- + UPI | Razorpay Fund Account ID | Download file + --- + Amazonpay Wallet | Beneficiary Details | Download file + --- + Amazonpay Wallet | Razorpay Fund Account ID | Download file + --- + Bank Transfer | Beneficiary Details | Download file + --- + Bank Transfer | Razorpay Fund Account ID | Download file + --- + + + + +### CSV Templates + + These templates are available in `.csv` format. + + Payout Method | Beneficiary Information | Download Template + --- + UPI | Beneficiary Details | Download file + --- + UPI | Razorpay Fund Account ID | Download file + --- + Amazonpay Wallet | Beneficiary Details | Download file + --- + Amazonpay Wallet | Razorpay Fund Account ID | Download file + --- + Bank Transfer | Beneficiary Details | Download file + --- + Bank Transfer | Razorpay Fund Account ID | Download file + --- + + + +### Related Information + +- [Bulk Upload Status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts/uploads.md) +- [Bulk Payouts Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts/life-cycle.md) diff --git a/llm-content/x/bulk-payouts/approval-workflow.md b/llm-content/x/bulk-payouts/approval-workflow.md new file mode 100644 index 00000000..09f0fdd2 --- /dev/null +++ b/llm-content/x/bulk-payouts/approval-workflow.md @@ -0,0 +1,103 @@ +--- +title: Bulk Payouts Approvals +description: Explore the approvals process when you create bulk payout batches. +--- + +# Bulk Payouts Approvals + +After you set up an [approval workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) and [create bulk payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts.md#create-bulk-payout), you can review the bulk payout batch files and approve them with a single OTP. + +## How it Works + +Assume you have set up an approval workflow where: + +Total Amount Condition | Action +--- +0 - ₹10,000 | No approval from Owner is needed. +--- +₹10,000 - ₹50,000 | Approval from the Finance role is needed. +--- +Greater than ₹50,000 | Approval from the role Finance and Administrator is needed. + +Suppose you have created a bulk payout batch of 15 payouts each worth ₹1,000. The batch's total is ₹15,000. Approval workflow is applicable on: + +- **The individual payout's amount in a batch**: + + In this case, the bulk payout batch is not sent for approval as the individual payout's amount is not greater than ₹10,000. + + Only if there are individual payouts greater than ₹10,000 in a batch file, you must approve each payout. + +- **The sum of all the payout amounts in a batch**: + + In this case, batch total is ₹15,000. This batch is sent for approval as the total batch amount is > ₹10,000. + +Choose the second option in the [set up process](#set-up) to approve bulk payout batch with a single OTP. + +## Set Up + +To approve bulk payout batches with a single OTP, enable the setting: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth) as an [Owner/Admin](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams.md) and go to **My Account & Settings** under the user profile icon. +1. Navigate to **Workflows** from the left menu. +1. Click the edit icon against **Approvals on Bulk Payouts** section. + ![Click edit on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-bulk-payouts-approvals-enable-setting.jpg.md) +1. Select **Approve entire batch at a go** and click **Save**. + ![Enable setting to approve bulk payout with single OTP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-bulk-payouts-approvals.jpg.md) + +You have successfully enabled the setting to approve a batch of bulk payout with a single OTP. Your team can now create bulk payout batches using the [new templates](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts.md#download-templates) and send them for approval. + +## Review Bulk Payouts + +To approve/reject the bulk payout batches pending on you: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth) as an [Owner/Approver](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams.md). +1. To view bulk payout batches pending on the approver, you can: + 1. Access the Dashboard from the approval request email sent to your registered email id. + 1. Click the action items on the RazorpayX Dashboard Home Page. + ![RazorpayX Dashboard Home Page showing pending bulk payout actions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-bulk-payouts-approval-action-items.jpg.md) + 1. Go to **Payouts** in the left menu → **Bulk** tab. Check batches with the `pending` status. + +You can now approve or reject the bulk payout batches as necessary. + +## Approve Bulk Payout Batch + +To approve bulk payout batches: + +1. Hover on the batch item line to click **APPROVE**. You can also click the batch to view more details and take action on the bulk payout request. +1. Click **✓ Approve**. + ![Approve or reject a bulk payout batch on RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-bulk-payouts-approval-approve-reject.jpg.md) +1. Review the batch file details and approval workflow in the **Approve Bulk Payout** pop-up window. + ![Approve Bulk Payouts file on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-bulk-payouts-approvals-modal.jpg.md) +1. Click **Next** to enter the OTP and click **Approve**. + +You have successfully approved the bulk payout batch file. After all the level of approvers have approved the batch, the file moves to the `processing` status. + +> **WARN** +> +> +> **Watch Out!** +> +> Only the bulk payout batch file moves to the `processing` status. Know more about [Bulk Payouts batch processing vs Payout processing](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts.md#bulk-payouts-batch-processing-vs-payouts-processing). +> + +## Reject Bulk Payout Batch + +To reject the bulk payout batch file: + +1. Hover on the batch item line to click **REJECT**. You can also click the batch to view more details and take action on the bulk payout request. +1. Click **× Reject**. + ![Approve or reject a bulk payout batch on RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-bulk-payouts-approval-approve-reject.jpg.md) +1. Review the batch file details in the **Reject Bulk Payout** pop-up window and provide remarks for rejecting the bulk payouts batch. + ![Reject Bulk Payout file on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-bulk-payouts-approvals-reject-modal.jpg.md) +1. Click **Reject**. + +You have successfully rejected the bulk payout batch file post which the file moves to the `rejected` status. + +You can view the bulk payout batch files' history on the Dashboard. Select **All** in **Quick Filters**. + +![Bulk Payout files history in Quick Filters.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-bulk-payouts-approvals-filters.jpg.md) + +### Related Information + +- [Bulk Payouts Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts/life-cycle.md) +- [Bulk Upload Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts/report.md) diff --git a/llm-content/x/bulk-payouts/life-cycle.md b/llm-content/x/bulk-payouts/life-cycle.md new file mode 100644 index 00000000..1a045a34 --- /dev/null +++ b/llm-content/x/bulk-payouts/life-cycle.md @@ -0,0 +1,38 @@ +--- +title: RazorpayX Bulk Payouts Life Cycle +heading: Bulk Payouts Life Cycle +description: Check the statuses that Payouts follow when they are made using the Bulk Upload feature. +--- + +# Bulk Payouts Life Cycle + +A payout created using the Bulk Upload feature can have the following statuses during its life cycle: + +- `pending` +- `scheduled` +- `processing` +- `processed` +- `reversed` +- `cancelled` +- `rejected` +- `failed` + +![bulk payout life cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-scheduled_payout_life_cycle.jpg.md) + +Know more about [payout life cycle and statuses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md). + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Payouts created using the Bulk Upload feature are not queued. In case of insufficient balance, the payouts will fail. +> - The `pending` and `rejected` statuses are available only if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled on your account. +> + +### Related Information + +- [About Bulk Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts.md) +- [Bulk Upload Status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts/uploads.md) +- [Bulk Upload Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts/report.md) diff --git a/llm-content/x/bulk-payouts/report.md b/llm-content/x/bulk-payouts/report.md new file mode 100644 index 00000000..5290d728 --- /dev/null +++ b/llm-content/x/bulk-payouts/report.md @@ -0,0 +1,35 @@ +--- +title: RazorpayX Bulk Upload Report +heading: Bulk Upload Report +description: Download the Payouts Bulk Upload report for a summary of the Payouts, Contacts and Fund Accounts created, along with the failure reasons. +--- + +# Bulk Upload Report + +Download the Bulk Upload report from the [RazorpayX Dashboard](https://x.razorpay.com/) after your bulk upload file gets [processed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts/uploads.md#bulk-upload-status). + +## Fields in the Report + +The report contains: +- A summary of the processed file. +- The Contacts, Fund Accounts and Payouts created and related information. +- Additional details as per the [fields populated in the Bulk Upload file](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts.md#sample-template). + +The report has the following additional coulmns you can use to check if the individual payouts were created and processed. + +![bulk upload report excel file showing payout ids and its related error descriptions.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-bulk_upload_report.jpg.md) + +Payout Id and Error Description mention the reasons for when the payouts process has failed. + +`Payout Id` +: `string` Unique identifier for the payout. Value is returned only if the payout is successfully created. For example, `pout_FMfjLUuRS9Hlzc`. + +`Error Description` +: `string` The reason for the error. For example, `The id provided does not exist.` + +To troubleshoot the errors that appear in the report, see [Bulk Uploads Error Codes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts.md). + +### Related Information + +- [About Bulk Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts.md) +- [Bulk Payouts Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts/life-cycle.md) diff --git a/llm-content/x/bulk-payouts/uploads.md b/llm-content/x/bulk-payouts/uploads.md new file mode 100644 index 00000000..318ec62f --- /dev/null +++ b/llm-content/x/bulk-payouts/uploads.md @@ -0,0 +1,47 @@ +--- +title: RazorpayX Bulk Upload Status +heading: Bulk Upload Status +description: Check the status of your Payouts Bulk Upload file after you upload it on the RazorpayX Dashboard. +--- + +# Bulk Upload Status + +Check the status of your Bulk Upload file after you [upload it to your RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts.md#upload-and-process-file). + +## How it Works + +The sample template can create fund accounts or process payouts in bulk. To do so: +1. Download the required template from the [Dashboard](https://x.razorpay.com/), or find the [sample template here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts.md#sample-template). +2. Add the required data to the template. +3. Upload the template via the [RazorpayX Dashboard](https://x.razorpay.com/). + +## Bulk Upload Status + +After you upload your Bulk Upload file to the Dashboard, it moves through the following statuses: + +- `created`: + + This is the initial status of the Bulk Upload. It indicates that the Bulk Upload is created in the RazorpayX database and is ready to be processed. + No processing is done at this point, that is, the payouts are not created. + +- `processed`: + + A Bulk Upload file reaches this final status when the uploaded details are processed. + +![Bulk Upload status from uploaded → created → processed.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-bulk-upload.jpg.md) + +After the Bulk Upload is processed, you receive an email with a summary of how many rows of data were successfully processed. You can [download the Bulk Upload report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts/report.md) to understand the summary in more detail. + +> **WARN** +> +> +> **Watch Out!** +> +> - Bulk Upload having the `processed` status does not mean the Contacts, Fund accounts or the Payouts were created and processed. It just means that the bulk file was fully processed. +> - The Contacts, Fund account or Payouts may or may not have been created or processed. Download the [Bulk Upload report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts/report.md) to check these details. +> + +### Related Information + +- [About Bulk Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts.md) +- [Bulk Payouts Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts/life-cycle.md) diff --git a/llm-content/x/capital.md b/llm-content/x/capital.md new file mode 100644 index 00000000..20c74701 --- /dev/null +++ b/llm-content/x/capital.md @@ -0,0 +1,37 @@ +--- +title: Explore the advantages of Razorpay Capital and its products | Razorpay Capital +heading: About Razorpay Capital +description: Explore Razorpay's Capital lending products and its advantages to help you maintain and grow business operations. +--- + +# About Razorpay Capital + +Razorpay Capital is a lending platform that allows you to meet your cash flow challenges. Using Razorpay Capital, you can manage financial challenges of your business through quick settlements and collateral-free loans. You can avail a set of services that aim at lending a helping hand to your business in maintaining steady capital. + +#### Advantages + +Listed below are some reasons you should use Razorpay Capital: +- **Easy Financing**: Avoid costly short-term financing for your working capital needs. +- **Better Budgeting**: Manage your monthly budgeting, spending and investing perfectly. +- **Zero Backlogs**: Avoid backlog in your payment reconciliations. +- **Accessible Funds**: You are pre-approved on the basis of your customer payments. We do not look for a long business history or a high credit score. +- **Transparent Pricing**: You get simple pricing with best interest rates for your needs. We do not require collateral or personal guarantees. +- **Flexible Repayments**: You make automatic payments from your settlements when you can. We give you the freedom and flexibility to suit your business needs. + +## Types of Lending Products + +Razorpay Capital aims to give you easy access to credits when you need them the most. For this, we offer a range of lending products depending on your business requirements. + +You can choose any of the following lending products to acquire capital via Razorpay Capital: + +### Instant Settlements + +Reduce settlement period from T+2 days to T+0, that is same day settlements. You can have all your payments settled to your bank account at specific hours during the day or have your money settled early on key business days. Know more about the benefits of [Instant Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/instant.md) and how you can initiate them after getting the feature enabled. + +### RazorpayX Corporate Cards + +Simplify your company expenses. Pay for your marketing, SaaS or travel needs with 50-day interest-free credit and automatic repayments for hassle-free expense management. You can also avail [Add-on Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) for your team members. + +### Related Information + +- [Corporate Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) diff --git a/llm-content/x/capital/b2b-checkout-financing/buyer.md b/llm-content/x/capital/b2b-checkout-financing/buyer.md new file mode 100644 index 00000000..18afc634 --- /dev/null +++ b/llm-content/x/capital/b2b-checkout-financing/buyer.md @@ -0,0 +1,81 @@ +--- +title: Use Razorpay B2B Checkout Financing for invoice financing as a Buyer | Razorpay Capital +heading: Use Razorpay B2B Checkout Financing (Buyers) +description: Check how to use Razorpay B2B Checkout Financing as a Buyer. +--- + +# Use Razorpay B2B Checkout Financing (Buyers) + +Razorpay B2B Checkout Financing is a [Buy Now, Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md) (BNPL) facility buyers can use to pay for purchases made from [sellers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md). B2B Checkout Financing provides a seamless Checkout experience that not only improves the buyer and seller's business relationships but also provides payment flexibility to buyers. + + +### Who is a Buyer? + + Buyers are registered businesses regularly purchasing goods/sourcing goods to sellers. + + + +### Advantages of Razorpay B2B Checkout Financing for Buyers + + - Buyers enjoy payment flexibility and convenience with B2B Checkout Financing's payment experience. + - Razorpay sends timely payment reminders to streamline the payment process. You can use the credit payments experience on checkout along with all other payment methods as well. + - B2B Checkout Financing improves cash flow management for buyers by optimising up-front payments and paying in easy installments. + - Enjoy a flexible repayment period between the date of purchase and the repayment date. + - It improves seller and buyer relationships due to digitised processes, convenience, payment flexibility and more. + + +## How it Works + +1. Pay the seller for invoices billed to you. +1. Automate/manually make repayment on the due date. + +## Use B2B Checkout Financing + +Following is how buyers can onboard, use and repay Razorpay B2B Checkout Financing. + +### 1. Onboarding + +To use B2B Checkout Financing, use the link you receive either from Razorpay Checkout to start the onboarding process. This is a one-time process only. + +To complete your B2B Checkout Financing application: + +1. Enter your phone number and verify using OTP. +1. Provide your business details such as the business type, email id, business PAN and more. + ![Razorpay B2B Checkout Financing KYC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-capital-postpaid-onboarding-buyer.jpg.md) +1. Provide OTP to consent for a credit verification. +1. Share your bank statement for the previous 6 months using Netbanking or manual upload option to check eligibility. +1. Verify your business details again and proceed to the view and accept the offer. +1. Submit your KYC details and documents, and e-sign the offer. + +Once you complete KYC verification, we activate the RazorpayX account and Dashboard for you. You can now see B2B Checkout Financing as a payment option on the Checkout. + +### 2. Payment + +To use B2B Checkout Financing: + +1. Initiate the payment for the invoice shared by the seller via Razorpay Checkout. +1. Go to the **Pay Later** option under **All Payment Methods** and select **Razorpay B2B Checkout Financing** as the payment method. Click **Continue**. + ![Razorpay B2B Checkout Financing choose payment method](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-capital-postpaid-pay.jpg.md) +1. Select the available tenure on the Pay Later options page. + ![Razorpay B2B Checkout Financing select tenure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-capital-postpaid-pay-tenure.jpg.md) +1. Enter the OTP sent to your registered mobile number. + +You have successfully paid the seller using Razorpay B2B Checkout Financing. We email you the tenure and the due date. + +### 3. Repayment + +The repayment amount is automatically deducted from your bank account via NACH. You can also repay the upcoming due amount manually on the RazorpayX Dashboard. + +To repay upcoming dues manually: +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +1. Navigate to **B2B Checkout Financing** from the left menu. +1. On the B2B Checkout Financing home page, click **Repay Dues**. You can view the total amount due as well. + ![Razorpay B2B Checkout Financing repay manually](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-capital-postpaid-manually-repay.jpg.md) +1. Follow the on-screen instructions to make payment via Razorpay Checkout. + +You have successfully repaid the upcoming due manually. + +### Related Information + +- [About Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md) +- [Pay Later FAQs - Interest Rates and Tenures](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#pay-later) diff --git a/llm-content/x/capital/b2b-checkout-financing/seller.md b/llm-content/x/capital/b2b-checkout-financing/seller.md new file mode 100644 index 00000000..6c05d9b8 --- /dev/null +++ b/llm-content/x/capital/b2b-checkout-financing/seller.md @@ -0,0 +1,102 @@ +--- +title: Use Razorpay B2B Checkout Financing for invoice financing as an Seller | Razorpay Capital +heading: Use Razorpay B2B Checkout Financing (Sellers) +description: Check how to use Razorpay B2B Checkout Financing as an Seller. +--- + +# Use Razorpay B2B Checkout Financing (Sellers) + +Razorpay B2B Checkout Financing is a [Buy Now, Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md) (BNPL) facility with which sellers receive payments from their [buyers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) immediately. B2B Checkout Financing provides a seamless Checkout experience that sellers can use to improve business relationships with their buyers. + + +### Who is a Seller? + + Seller is a business or marketplace that sells products or services to registered business buyers. Sellers are the providers of goods and/or raw materials to businesses. + + + +### Advantages of Razorpay B2B Checkout Financing for Sellers + + - Razorpay B2B Checkout Financing outsources credit cycles so buyers can enjoy a frictionless and quick payment experience. This also facilitates quicker payment cycles for sellers. + - B2B Checkout Financing is [Digital Lending Guidelines (DLG)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/glossary.md#razorpayx-capital)-compliant. + - No specialised integration or product development is necessary. + - Enhances conversion rates of sellers as the buyers can spread out their payments flexibly. + - Convenient credit payment experience on Checkout and all other payment methods boost customer retention. + - Improves seller and buyer relationships due to digitised processes, convenience, payment flexibility and more. + + +## How it Works + +Following is a workflow of the B2B Checkout Financing process. + +1. [Enable Razorpay B2B Checkout Financing](#1-onboarding) for your business. +1. [Integrate Payment Gateway](#2-integration) and show B2B Checkout Financing as a payment option. +1. [Collect payments](#3-billing--payment) for the goods sold to buyers via Checkout using B2B Checkout Financing. + +## Use B2B Checkout Financing + +As a seller, you can onboard and set up B2B Checkout Financing on Razorpay Checkout for buyers in the following way. + +### 1. Onboarding + +Contact the Razorpay Capital [support team](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#raise-a-new-request) and convey your interest in enabling Razorpay B2B Checkout Financing for your buyers. + +### 2. Integration + +You can display B2B Checkout Financing on either the Standard Checkout or Custom Checkout using the following integrations. B2B Checkout Financing is also available as part of Pay Later payment options in the EMI² Suite. + +Checkout Type | Steps +--- +[Standard Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/standard.md) | No integration steps. Enable B2B Checkout Financing to display on Checkout. + You can also perform an [eligibility check](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/eligibility-check/standard.md) to display the most relevant payment methods to buyers. +--- +[Custom Checkout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md#12-fetch-payment-methods) | - [Enable Pay Later](#1-onboarding) as a payment method via onboarding. +- Follow the steps to [create an order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/web-integration/custom/build-integration.md#11-create-an-order-in-server) for the buyer. B2B Checkout Financing appears when you fetch the payment methods. + +> **INFO** +> +> +> **Handy Tips** +> +> You can [try out the Pay Later flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi².md#try-emi-flow-on-checkout) on the Demo after enabling B2B Checkout Financing. +> + +You have successfully enabled B2B Checkout Financing as a payment method for your buyers on the Checkout. + +### 3. Billing & Payment + +To use B2B Checkout Financing: + +1. Complete the [onboarding](#1-onboarding) and [integration](#2-integration) process. +1. Your buyers can use the B2B Checkout Financing option to pay for invoices you raise during the business cycle. This creates a loan on the buyer's name. + + The Lender pays the seller on the buyer’s behalf and we settle the amount to the you as per the schedule finalised [in the agreement](#1-onboarding). + +You have successfully billed and collected the payment from your buyers. The payment method is populated with **Pay Later** on the Razorpay Dashboard when buyers use Razorpay B2B Checkout Financing. + ![Razorpay B2B Checkout Financing narration after payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-capital-postpaid-txn-overview.jpg.md) + +### 4. Settlement + +After the buyer makes the payment on Checkout: +- Razorpay pays you on the buyer's behalf via [direct settlement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md). This means you receive the B2B Checkout Financing payment in your account separately from the regular settlement cycle. +- Payments are settled on a T+1 basis, where T is the date of payment. + +### Refunds + +You can initiate a refund from the Dashboard. The buyer receives the amount in their account on a T+1 basis, where T is the date you initiated the refund. + +1. Log in to the Dashboard. +1. Navigate to **Transactions** from the left menu. +1. Select the transaction to refund using the Payment id/Order id. +1. Click **Issue Refund** on the right pane. + ![Razorpay B2B Checkout Financing narration after payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-capital-postpaid-txn-overview.jpg.md) +1. Enter the amount to refund in the text box. You can issue partial refunds as well. + + The refund amount is deducted from your upcoming [settlement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements.md). + ![Issue Razorpay B2B Checkout Financing refund on Razorpay Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-capital-postpaid-refund.jpg.md) + +### Related Information + +- [About Pay Later](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/pay-later.md) +- [Pay Later FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-gateway/emi²/faqs.md#pay-later) +- [About Payment Methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods.md) diff --git a/llm-content/x/capital/cards-kyc.md b/llm-content/x/capital/cards-kyc.md new file mode 100644 index 00000000..98be7297 --- /dev/null +++ b/llm-content/x/capital/cards-kyc.md @@ -0,0 +1,77 @@ +--- +title: KYC Documents for Add-on Cards +description: List of KYC documents required to apply for Add-on Cards. +--- + +# KYC Documents for Add-on Cards + +## Private Companies + +- Certificate of Incorporation / Certificate of Commencement of business. +- Certified copy of Memorandum and Articles of Association of the company made up to date. +- A resolution from the Company’s Board of Directors, requesting SBM, our partner bank, to open an account in its name and specify the operating instructions and a list of authorized officials to operate the account. +- A list of present directors with their residential addresses, their PAN, and DIN +- Current landline / mobile no. and e-mail ID of the entity +- Communication address proof of the entity, if it is different from the one mentioned on the Registration Certificate / Certificate of Incorporation +- PAN Card of the company +- The shareholding structure of the company on letterhead. +- PAN and Address proof of all authorized signatories. + +We ensure all your information is processed securely. After you submit the documents, we will get back to you with your RazorpayX Corporate Card details. + +## Proprietorship + +- PAN card in the name of the Proprietor. +- Identity and Address proof of Proprietor. +- At least any two of the below listed documents in the name of the proprietary concern. +- Registration Certificate (in case Registered). +- Licence / Certificate issued by the Municipal authorities under Shops & Establishment Act. +- Sales and Income Tax return. +- CST / VAT certificate. +- Certificate/Registration document issued by Sales Tax/Service Tax/Professional Tax authorities. +- License / Certificate issued by the Registering authority like Certificate of Practice issued by Institute of Chartered Accountants of India (ICAI), Institute of Company Secretaries of India, Institute of Cost Accountants of India, Food & Drug Control Authorities, Indian Medical Council, etc. +- Registration / Licensing document issued in the name of the proprietary concern by the Central Government or State Government Authority/ Department, etc. +- Importer Exporter Code (IEC) is issued to the proprietary concern by the office of the Directorate General of Foreign Trade (DGFT). + +## Partnerships + +- Registration Certificate (in case Registered) +- Partnership Deed. +- Identity and Address proof of all partners / authorized signatories. +- Power of Attorney granted to a partner or an employee of the firm to transact the business on its behalf. +- A list of all partners along with their addresses on letterhead. +- List of the ultimate beneficiaries with their address and percentage of holding on letterhead. +- KYC document of the beneficial owner where they own or are entitled to more than 15% of capital or profits of the partnership. +- PAN card of the firm. +- Current landline / mobile no. and e-mail ID of the entity. + +We ensure all your information is processed securely. After you submit the documents, we will get back to you with your RazorpayX Corporate Card. + +## LLPs + +- LLP Certificate of Incorporation. +- LLP Constitutional agreement. +- List of all existing Designated Partners and Designated Partner Identification Number (DPIN) Issued by the Central Government. +- The resolution passed at the meeting of Designated Partners, requesting SBM to open an account in its name and specify the operating instructions and a list of authorized officials to operate the account. +- Sales Tax / Excise / VAT registration certificate in the name of the LLP. +- Property ownership deed i.e. Copy of Title deeds of the property in the LLP's name duly stamped and registered. +- List of the ultimate beneficiaries with their address and percentage of holding. +- KYC document of the beneficial owner where they own or are entitled to more than 15% of capital or profits of the partnership. +- PAN card of the firm. +- Passport size photographs of Authorized Signatories. +- Identity and Address proof of all authorized signatories. + +## Trust and Foundations + +- Trust Deed in case of public/private trusts or bye-laws in case of society/association/club. +- Certified copy of Memorandum and Articles of Association made up to date. +- Registration certificate (in case Registered). +- A Resolution signed by the trustees to open and operate the account and stipulating the conditions for the conduct of the account. +- List of trustees with their residential address. +- Power of Attorney granted to the authorized personnel to transact the business on its behalf. +- List of the ultimate beneficiaries with their address and percentage of holding. +- Identification document of the author of the trust, the trustee, the beneficiaries who have 15% or more interest in the trust. +- PAN card copy of an entity. +- Latest Address proof. +- Passport size photographs of Authorized Signatories along with cross signatures. +- Identity and Address proof of all authorized signatories. diff --git a/llm-content/x/capital/cash-advance.md b/llm-content/x/capital/cash-advance.md new file mode 100644 index 00000000..949e10ef --- /dev/null +++ b/llm-content/x/capital/cash-advance.md @@ -0,0 +1,271 @@ +--- +title: Withdraw and repay Razorpay Cash Advance Loan +heading: About Cash Advance +description: Check how to withdraw from Razorpay Cash Advance Loan and the repayment steps. +--- + +# About Cash Advance + +> **SUCCESS** +> +> +> **What's New** +> +> Cash Advance is now available on the [RazorpayX Dashboard](https://x.razorpay.com/auth)! +> + +Razorpay Cash Advance Loan is a self-serve loan portal offering low-interest, very short-term loans with a tenure between a few days and a few weeks. + +Upon withdrawal, you can choose your repayment schedule. We deduct from your [settlement's current balance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/dashboard.md#view-settlements-using-dashboard) to repay the loan instalments automatically. You can also make repayments manually. + + +### Necessary Terminology + + Following is a glossary of terms you frequently come across when using Cash Advance. + + Term | Description + --- + **Total Withdrawable Balance** | The original amount made available Cash Advance limit is approved. + --- + **Available Withdrawable Balance** | Available Withdrawable Balance is the maximum available balance you can withdraw from your line of credit. + + `**Available Withdrawable Balance** = Total Withdrawable Balance - Amount Due.` + --- + **Due Repayments** | This is the amount you have withdrawn and must repay. + `Due Repayments = Amount Withdrawn + Interest`. + + + + +### Example of Withdrawal and Repayment + + Assume your Available Withdrawable Balance is ₹20,000 and your Available Withdrawable Amount is ₹10,000. + + + | Available Withdrawable Balance | Due Repayments + --- + Opening Balance | ₹20,000 | ₹0 + --- + Withdraw ₹5,000 | ₹15,000 | ₹5,025 (Amount Withdrawn + Interest) + --- + Withdraw ₹10,000 | ₹5,000 | ₹15,075 (Pending Balance + Amount Withdrawn + Interest) + --- + Repay ₹3,000 | ₹8,000 | ₹12,075 (Pending Balance - Amount Repaid) + --- + Withdraw ₹8,000 | ₹0 | ₹20,115 (Pending Balance + Amount Withdrawn + Interest) + --- + Repay ₹12,500 | ₹12,500 | ₹7,615 (Pending Balance - Amount Repaid) + + + +Explore the following: +- [How to apply for Razorpay Cash Advance Loan](#apply-for-cash-advance). +- [Process for withdrawing from Cash Advance](#make-withdrawals). +- [Automatic and manual repayment methods](#make-repayments). +- [Pre-close Cash Advance Withdrawal from the RazorpayX Dashboard](#pre-close-withdrawal). + +## Apply For Cash Advance + +To apply for a Cash Advance: + +1. Visit the [Line of Credit](https://razorpay.com/x/line-of-credit/) page. You can also apply from the [Razorpay Dashboard](https://dashboard.razorpay.com/app/dashboard)/[RazorpayX Dashboard](https://x.razorpay.com/auth). +1. Follow these steps to apply for a [Line of Credit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit.md#apply-for-line-of-credit). The process is the same. + +Once the credit limit is approved, you can withdraw the amount from the [RazorpayX Dashboard](https://x.razorpay.com/auth). + +> **INFO** +> +> +> **Handy Tips** +> +> If you are an existing Razorpay user, follow the on-screen instructions to switch to the new Dashboard. +> + +## Make Withdrawals + +To make a Cash Advance withdrawal: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +1. Navigate to **Cash Advance** from the left menu. +1. Click **Withdraw Funds** on the Cash Advance home page. + ![Withdraw Cash Advance Funds on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-capital-ca-withdraw1.jpg.md) +1. Enter the amount you want to withdraw from your available withdrawable balance. Click **Proceed**. +1. Select the tenure in days. You can view the instalment amount in the modal under your selection. Click **Proceed**. +1. Review the withdrawal details, such as the repayment schedule, interest rate and repayment method, total amount credited after the processing fee deduction, and more. + ![Review Cash Advance Withdrawal Details on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-capital-ca-withrawal review.jpg.md) +1. Click **Confirm & withdraw** to proceed with the withdrawal. + +You have successfully made a withdrawal from your available Cash Advance limit. + +> **WARN** +> +> +> **Watch Out!** +> +> Withdrawing from your Available Withdrawable limit is not permitted if you have overdue repayments. Repay your dues to withdraw again. +> + +## Make Repayments + +There are two ways to make repayments: +- Daily Deductions (Automated and recommended) +- Manual Repayments + +### Daily Deductions + +By default, your repayments are automated via daily deductions. We debit your settlement balance on the due date to repay the Cash Advance loan's instalment. + +This happens on a daily basis and we recommend this for businesses using other [Razorpay products](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md). + +> **WARN** +> +> +> **Watch Out!** +> +> We only deduct from your Razorpay [settlement's current balance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/dashboard.md#view-settlements-using-dashboard) and not your linked bank account. +> + + +### Example + + Assume you withdrew ₹10,000 on July 02 and selected July 12 as the repayment date. The interest on this loan for 10 days is ₹20. The calculation then is as follows: + + - `Principle + total Interest for 10 days` = `₹10,000 + ₹20` + - `Tenure` = `10 Days` + - Daily Instalment: `(Principle + Interest)/Tenure` = `10,020/10` = ₹1,002/day + + ₹1,002 is collected daily from your settlement balance from July 03 till July 12. + + +### Manual Repayments + +You can also repay the loan instalments manually in two ways: +- From the Overview page. +- From the Withdrawal pane. + +To make repayments: +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +1. You can do either of the following: + + + 1. Click **Repay Dues**. + 1. Select the instalment to pay off in the **Repayment** pop-up modal. + 1. Click **Confirm Amount**. + 1. Select between your Razorpay [settlement's current balance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/dashboard.md#view-settlements-using-dashboard) for us to deduct your instalment amount or pay using UPI/Debit Card/Netbanking. + 1. Follow the on-screen checkout instructions to complete the payment. + + This is helpful when you prefer to pay off multiple instalments at once. + + + 1. Navigate to and select the specific instalment due yet to pay off. + 1. In the right pane, click **Repay Dues**. + ![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-capital-ca-repay-individual.jpg.md) + 1. Repay using UPI/Debit Card/Netbanking or your settlement balance. + + + +You have successfully repaid a Cash Advance loan instalment. + +## Pre-close Withdrawal + +You can pre-close a Cash Advance withdrawal on the RazorpayX Dashboard. + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +1. Navigate to **Cash Advance** in the left menu → specific withdrawal to pre-close. +1. In the right pane, click **Pre-close Withdrawal**. + ![Razorpay Loan Cash Advance pre-close withdrawal option on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-capital-ca-close-loan.jpg.md) +1. Review the preclosure details in the Pre-close Withdrawal pop-up modal and click **Pre-close Withdrawal**. +1. Pay the remaining amount due using settlement balance or UPI/Debit Card/Netbanking. + +You have successfully pre-closed the withdrawal. + +#### Withdrawal Request Status + +Status | Description +--- +`initiated` | When you request a withdrawal on your Dashboard, the withdrawal is in this status. +--- +`processed` | Your withdrawal is in this status when our lending partners acknowledge your request, and Razorpay prepares the instalment plan chosen. +--- +`disbursed` | When the funds requested are available in your account, the withdrawal reaches this status. +--- +`partially repaid` | If you repay less than the total due amount when [making repayments](#make-repayments), this is the status. For example, you withdrew ₹10,000 and repaid ₹6,000. +--- +`repaid` | This is the withdrawal status when you have repaid the withdrawn amount in full. +--- +`overdue` | This is the status if you have not paid the instalment amount after the due date. [Repay your overdue instalments](#make-repayments) to withdraw from your Razorpay Cash Advance loan limit. +--- +`failed` | Sometimes, your disbursal or repayments may fail due to unavoidable server downtimes. Retry the withdrawal/repayment process. You can [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#razorpayx-capital) from the RazorpayX Dashboard for any queries. +--- + +## FAQs + + +### 1. What is Cash Advance? + + Razorpay Cash Advance is a self-serve, short-term loan portal that gives you an unsecured line of credit. + + You can withdraw an amount of your choice from this credit limit as per your needs, which is then converted to a short-term loan. + + + +### 2. How do I apply for a Cash Advance? + + To apply for a Cash Advance: + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). + 2. Navigate to **Cash Advance** in the left menu. + 3. Fill in a few details and submit your application. + + + +### 3. How do I make withdrawals? + + You can [make withdrawals](#make-withdrawals) on the [RazorpayX Dashboard](https://x.razorpay.com/auth) at your convenience. + + + +### 4. How often can I make withdrawals? + + You can make as many withdrawals as you wish, provided: + - You have sufficient balance. + - You withdraw less than your **Available Withdrawable Amount**. + + + +### 5. How do I repay the money I withdrew? + + There are two types of repayments. + - Daily deductions from your settlement amount. + - Manual repayments made by you. This is in addition to the daily deductions from your settlement amount. + Refer to the [Make Repayments](#make-repayments) section for more details. + + + +### 6. Can I withdraw my entire line of credit in a single transaction? + + Yes. There is a limit to how much you can withdraw in a single withdrawal. This is defined by the **Available Withdrawable Amount** parameter. + Refer to the [Credit Details - Necessary Terminology](#necessary-terminology) section for more details. + + + +### 7. Is there a limit to how much I can withdraw in a single withdrawal? + + Yes. There is a limit to how much you can withdraw in a single withdrawal. This is defined by the **Available Withdrawable Amount** parameter. + Refer to the [Credit Details - Necessary Terminology](#necessary-terminology) section for more details. + + + +### 8. What is the interest on the Cash Advance loans? + + The interest rates start at 0.05% per day. + + + +### 9. My question is not answered here. + + [Raise a request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/support.md#raise-a-new-ticket) from your [RazorpayX Dashboard](https://x.razorpay.com/auth) in case of any queries. + + +#### Related Information + +- [Razorpay Capital Use Cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit.md#use-cases) diff --git a/llm-content/x/capital/corporate-cards.md b/llm-content/x/capital/corporate-cards.md new file mode 100644 index 00000000..cc5efb3d --- /dev/null +++ b/llm-content/x/capital/corporate-cards.md @@ -0,0 +1,183 @@ +--- +title: RazorpayX Corporate Cards +heading: Corporate Cards +description: Manage organisation expenses with RazorpayX Corporate Cards. +--- + +# Corporate Cards + +Razorpay Corporate Cards system is an expense management mechanism for an organisation. They offer a range of benefits that help you streamline your business spends and reconcile expenditure seamlessly. +- Corporate Cards are issued to business entities for the use of their employees to manage approved business expenses. +- They provide accountability and control over expenses of an employee for business purposes, enable businesses to manage their expenses better and make reconciliation easier. + +> **INFO** +> +> +> **Handy Tips** +> +> Razorpay Corporate Cards are currently offered in partnership with Yes Bank and RBL. You can view the issued card details in the respective bank dashboards. +> + +## Types and Uses of Corporate Cards + +Card Type| Use | Perks | Targeted User +--- +Travel & Entertainment Card | Flights, trains, hotels and meals for business travels | Travel specific benefits like airport lounge access, travel insurance, points on travel spends. | All employees +--- +Purchase Cards | Procurement of goods and services, office supplies, operational expenses and vendor payments. | Low Forex fees, offers on SaaS tools. | Top leadership and key personnel like CFO, CTO, and so on. +--- +Business Cards | Operational costs, business expenditure, subscriptions, utility payments, and so on. | Points based rewards which are redeemable for personal use. | Sole proprietors of businesses. Business cards are given to business owners based on their personal ITR. + +> **INFO** +> +> +> **Handy Tips** +> +> Razorpay Corporate Cards are available as Master Cards. +> + + +### Features + + - The card is issued in the name of the company and not any individual. Hence, the liability lies on the company. + - Eligibility is checked using CMR score (CIBIL MSME Rank which is a credit information report for companies) and not individual CIBIL score. + - Separate cards for business travels, operational expenses (like forex fees, vendor payments, and so on) and other business expenses (ads, subscriptions,and so on). + - Negotiator service (by Razorpay) for additional savings on subscriptions and purchases. + - Access card details from bank dashboard. + - Option to lock card and set card limits. + - Option to use [Add-on Cards](#get-an-add-on-card), set sub-limits and delegate spending to different teams (for example, finance,marketing, and so on) from a single credit card account without giving your card to anyone. + + + + +### Advantages + + - No dependency on OTP on personal device or personal credit score. + - Convenient payment methods for employees. + - Better visibility and clarity on business spends. + - No need to use personal credit card for business expenses. Segregate personal and business related spends on cards. + - No collateral required (for Unsecured Cards). + - No joining or annual fees and low forex fee (2.5%). + - Real savings on spends - up to 30% discount on 500 software tools and cashback on SaaS, marketing and cloud. + - Unlimited add-on cards at zero cost. + + +## Secured and Unsecured Cards +There are 2 categories of Corporate Cards - **Secured** and **Unsecured**. +Unsecured Cards are applicable for businesses that meet the unsecured criteria (business vintage and financials, for example). For businesses that do not meet the unsecured criteria or wish to build a credit history, RazorpayX offers a Secured Card backed by a Fixed Deposit (FD). + + + - Backed by fixed deposits and do not require any of the other criteria to be met. + - Suitable and recommended for entities failing to meet the criteria for Unsecured Cards by partner banks. + - Available for any registered entity (including trust, proprietorship, partnership and society). + - The deposit is lien-marked against the Corporate Card. + - Corporate Card for a maximum of 90% of deposit amount can be sanctioned. + - Minimum deposit required is 7 lakhs, which is negotiable up to 5 lakhs. The deposit will earn interest as per prevailing bank norms. + + + - No collateral or fixed deposits required. + - Sanctioned purely based on the other eligibility criteria specified by Razorpay and the partner bank. + - Eligibility is broadly based on Razorpay PG vintage, business financials, profitability, and so on. + + + +> **WARN** +> +> +> **Watch Out!** +> +> Premature closure of the lien-marked FD is not permitted while the card is active, though partial withdrawals may be allowed subject to the credit limit, as per the norms by the partner bank. +> + +Know more about the eligibility criteria and onboarding process of [RBL Bank](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/corporate-cards/rbl-onboarding.md) and [Yes Bank](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/corporate-cards/ybl-onboarding.md). + +## Get Started +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Click **Corporate Cards** on the left navigation to go to the Corporate Cards home page. +3. Click **Sign up Today**. + ![Corporate Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/corpcards1.jpg.md) + +4. You will be redirected to a [request form](https://razorpay.com/x/corporate-cards/signup/) where you are required to fill in the relevant information. +5. Click **Submit**. Our support team will get in touch with you soon. + + +### Get an Add-on Card + + To get an Add-on Card: + + 1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/auth). + 2. Navigate to **Corporate Credit Card** on the left menu. + 3. Under **Corporate Cards** → **Summary**, navigate to **+ Get an Add-on Card**. + + 1. Here, you can request the Add-on Card for a new team member with the role and also assign the credit limit. + 2. The new team member receives an email to complete individual KYC. + 3. Once their KYC is updated, they get access to the Dashboard as per their role. + 4. The user also gets a virtual card and a prompt to confirm the address for card delivery. Post that, they get their physical card in a few days. + + +## Use Cases +Some of the use cases that are addressed with the Razorpay Corporate Cards are: + + +### Start-ups + + - Use Razorpay Corporate Cards for all operational and marketing expenses. + - Save working capital to scale up the company without having to worry about investing in technology infrastructure. + - Lock or limit card usage based on usage. + - No more reconciliation hassles and reimbursement work. + - Employees' personal funds are not blocked. + + + +### Partnerships and Large Companies + + - The top management can allocate cards for various departments with fixed limits. + - Department heads (or designated approvers) can further grant add-on cards with sub-limits to different sections. + - Unused Add-on Card limit can remain in the floating balance and be allocated to other add-on cards. + - Use options to lock or limit card usage based on usage. + - Have more control over expenses and keep them within budget. + + + +### Proprietary Firms + + - Segregate personal and business spends. + - Easier accounts and finance management. + - Control expenditure by setting limits for card(s). + - Use Add-on Card to delegate expenditure with lesser personal interventions or approvals for each spend. + + +## Default User Roles + +**Role** | **Permission** +--- +Owner/Admin | Access to all Card operations and give final approval on actions. +--- +Finance | Access to all the transactions and card information; make repayments and change repayment settings. +--- +Cardholder | View transactions and card data linked to their user id. +--- +Viewer | View all cards of the organisation. + +## Billing and Repayment + +- Generation of statements and repayments work as usual with one single card. The credit account is the same for all cards, so repayment for all cards happens in just one bill. + +- Primary account holders (Owner/Admin) can control which Add-on Card user can manage repayment automatically or manually. + +> **WARN** +> +> +> **Watch Out!** +> +> Billing and repayment norms are decided by the respective Partner Banks and may change from bank to bank. +> + +## Related Information + +- [About RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) +- [About RazorpayX Corporate Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/corporate-cards.md) +- [Sign up for RazorpayX Corporate Cards](https://razorpay.com/x/corporate-cards/) +- [Docs Required for Corporate Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/corporate-cards/docs-required.md) +- [RBL Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/corporate-cards/rbl-onboarding.md) +- [Yes Bank Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/corporate-cards/ybl-onboarding.md) diff --git a/llm-content/x/capital/corporate-cards/docs-required.md b/llm-content/x/capital/corporate-cards/docs-required.md new file mode 100644 index 00000000..ac7f0958 --- /dev/null +++ b/llm-content/x/capital/corporate-cards/docs-required.md @@ -0,0 +1,85 @@ +--- +title: Docs for razorpayX Corporate Cards +heading: Documents Required +description: Documents required for RazorpayX Corporate Cards. +--- + +# Documents Required + +## Document Checklist + +Find the list of documents required for different business entity types. + +### Private and Public Limited Companies +#### Company KYC +1. Company PAN Card +2. Certificate of Incorporation (COI) +3. Memorandum of Association (MOA) & Articles of Association (AOA) +4. Company’s GST Registration Certificate (operational address proof) +5. Company address proof: Utility bill (not older than 60 days), registered and unexpired rent agreement or Udyam Registration. +6. Audited financials for the last 3 years + provisional financials for the current year (if applicable). +7. Last 6 months' bank Statements from your company main account (especially where Razorpay settlements are received). + +#### Directors / Authorised Signatories' KYC +1. PAN Card +2. Aadhaar, Passport or Voter id +3. Recent Photograph + +### Partnership Firms +#### Firm KYC +1. Partnership PAN Card +2. Partnership Deed +3. GST Registration (verify your operational address) +4. Current address proof: A utility bill (not older than 60 days), a registered and unexpired rent agreement, Udyam Registration, or a Trade License/Municipal License. +5. Last 6 months' bank Statements (digital copies preferred) + +#### Partner KYC +1. Partner's PAN Card +2. List of all partners with their name, Date of Birth and DIN/PAN/Form60 details +3. Aadhaar, Passport or Voter id +4. Recent Photograph + +### Limited Liability Partnerships (LLPs) +#### LLP Firm KYC +1. LLP PAN Card +2. LLP Agreement +3. ROC Registration +4. GST Registration (verify your operational address) +5. Current address proof: A utility bill (not older than 60 days), registered and unexpired rent agreement or Udyam Registration +6. Last 6 months' Bank Statements (digital copies preferred). +7. Board Resolution authorising the company to apply for the corporate card. + +#### Director/Partner KYC +1. List of all Directors/Partners with their name, Date of Birth and DIN/PAN/Form 60 details +2. Individual PAN Card +3. Aadhaar, Passport or Voter id +4. Recent Photograph + +### Proprietorships +#### Proprietary Firm KYC +1. PAN Card of the Proprietor (this acts as your business PAN) +2. Any 2 business existence proofs : GST Certificate, Udyam Registration, Shop & Establishment Act License, Trade License, or an MSME Certificate +3. Business address proof: If your business does not operate at the address on the above proofs, a registered rental agreement is required. +4. Last 6 months' bank statement. + +#### Proprietor KYC +1. PAN Card +2. Aadhaar, Passport or Voter id +3. Recent photograph + +> **INFO** +> +> +> **Handy Tips** +> +> - Contact us at capital.cards@razorpay.com to get assistance in adding a Borrowing Clause in your MOA, AOA or Resolution. +> - Minimum business vintage required for all private and public companies, LLPs and partnership firms is 1 year; 2 years for proprietary firms. +> + +## Related Information + +- [About RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) +- [About RazorpayX Corporate Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/corporate-cards.md) +- [Sign up for RazorpayX Corporate Cards](https://razorpay.com/x/corporate-cards/) +- [RBL Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/corporate-cards/rbl-onboarding.md) +- [Yes Bank Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/corporate-cards/ybl-onboarding.md) diff --git a/llm-content/x/capital/corporate-cards/rbl-onboarding.md b/llm-content/x/capital/corporate-cards/rbl-onboarding.md new file mode 100644 index 00000000..8968859a --- /dev/null +++ b/llm-content/x/capital/corporate-cards/rbl-onboarding.md @@ -0,0 +1,70 @@ +--- +title: RazorpayX RBL Corporate Cards +description: Know the onboarding process and eligibility criteria for RBL powered RazorpayX Corporate Cards. +--- + +# RazorpayX RBL Corporate Cards + +Understand in detail the onboarding process and eligibility criteria for RazorpayX Corporate Cards powered by RBL. + +## Onboarding Process + +1. [Contact Razorpay Support](https://razorpay.com/x/corporate-cards/signup/) to raise a request for Corporate Cards. +2. Razorpay checks eligibility based on policies. +3. Submit [required documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/corporate-cards/docs-required.md) for KYC verification by Razorpay and RBL. +4. Assessment of credit card limit by RBL. +5. Sanction letter issued by RBL. +6. Post-sanction documentation like signed agreements on stamp paper, original documents verification, and so on. +7. Final KYC and CKYC (Central KYC, a process of checking your KYC with the nation-wide Central repository of all registered KYCs). +8. Card issuance and despatch. +9. Card activation. + +## Eligibility Criteria + +Criteria | Start-up Unsecured | Enterprise Unsecured +--- +Max Amount | Up to 30 L | Up to 2 Cr +--- +Funding (last 12 months) | >= 8 Cr | NA +--- +TO (Turnover)/PG GMV (Gross Merchandise Value) | NA | Min +--- +TO (previous FY) | Not required | Min TO > 50Cr or Avg PG GMV (6 m)> 1 Cr +--- +PAT (Profit After Tax) | Healthy cash balance (12m + runway) | Positive for previous 2 years +--- +RazorpayX/PG Vintage| 6 months vintage + Avg PG GMV > 50 L| 6 months RazorpayX vintage (NA if TO > 50 Cr) +--- +Entity Type| Pvt Ltd, Public Ltd, LLP | Pvt Ltd, Public Ltd, LLP +--- +Launch Locations | Delhi NCR, Mumbai, Pune, Ahmedabad, Bengaluru, Chennai, Hyderabad | Delhi NCR, Mumbai, Pune, Ahmedabad, Bengaluru, Chennai, Hyderabad +--- +Business Vintage | 1+ years | 3+ years + +> **INFO** +> +> +> **Handy Tips** +> +> **Secured Cards** do not require the above eligibility criteria to be met. They are sanctioned solely based on Fixed Deposit(s). The deposit is lien-marked against the Corporate Card santioned. Secured Cards are: +> - Suitable and recommended for entities failing to meet the criteria for Unsecured Cards by partner banks. +> - Available for any registered entity (including trust, proprietorship, partnership and society). +> - Sanctioned for a maximum limit of 90% of the deposit amount. +> - Minimum deposit required is 7 lakhs, which is negotiable up to 5 lakhs. The deposit will earn interest as per prevailing bank norms. +> + +> **WARN** +> +> +> **Watch Out!** +> +> - All policy changes and final underwriting decisions rest solely with RBL, in accordance with applicable RBI regulations. +> - Premature closure of the lien-marked FD is not permitted while the card is active, though partial withdrawals may be allowed subject to the credit limit, as per the norms by the partner bank. +> + +## Related Information + +- [About RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) +- [About RazorpayX Corporate Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/corporate-cards.md) +- [Sign up for RazorpayX Corporate Cards](https://razorpay.com/x/corporate-cards/) +- [Yes Bank Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/corporate-cards/ybl-onboarding.md) diff --git a/llm-content/x/capital/corporate-cards/ybl-onboarding.md b/llm-content/x/capital/corporate-cards/ybl-onboarding.md new file mode 100644 index 00000000..5970fcce --- /dev/null +++ b/llm-content/x/capital/corporate-cards/ybl-onboarding.md @@ -0,0 +1,69 @@ +--- +title: RazorpayX Yes Bank Corporate Cards +heading: Yes Bank Onboarding +description: Know the onboarding process and eligibility criteria for Yes Bank powered RazorpayX Corporate Cards. +--- + +# Yes Bank Onboarding + +Understand in detail the onboarding process and eligibility criteria for RazorpayX Corporate Cards powered by Yes Bank. + +## Onboarding Process + +1. [Contact Razorpay Support](https://razorpay.com/x/corporate-cards/signup/) to raise a request for Corporate Cards. +2. Razorpay checks eligibility based on policies. +3. Submit [required documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/corporate-cards/docs-required.md) for KYC verification by Razorpay and YBL. +4. Assessment of credit card limit by YBL. +5. Sanction letter issued by YBL. +6. Post-sanction documentation like signed agreements on stamp paper, original documents verification, and so on. +7. Final KYC and CKYC (Central KYC, a process of checking your KYC with the nation-wide Central repository of all registered KYCs). +8. Card issuance and despatch. +9. Card activation. + +## Eligibility Criteria + +Criteria | Based on PG Policy | Based on PG + Financials Policy | Based on Financials Alone +--- +Max Amount | Up to 30 L | Up to 1.5 Cr | Up to 3 Cr +--- +PG Vintage| > 6 months | > 6 months | Not Required +--- +Avg 6 months Razorpay PG GMV (Gross Merchandise Value) | > 1 L | > 5 L | Not Required +--- +Turnover (previous FY) | Not Required | > 6 Cr | > 50 Cr +--- +PAT (Profit After Tax) | Not Required | Positive for previous 2 years | Positive for previous 2 years +--- +Entity Type| Pvt Ltd, Public Ltd, LLP, Partnership, Proprietorship | Pvt Ltd, Public Ltd, LLP, Partnership, Proprietorship | Pvt Ltd, Public Ltd, LLP, Partnership, Proprietorship +--- +Exclusions | Negative Industry List | Negative Industry List | Negative Industry List +--- +Business Vintage | 3+ years | 3+ years | 2+ years + +> **INFO** +> +> +> **Handy Tips** +> +> **Secured Cards** do not require the above eligibility criteria to be met. They are sanctioned solely based on Fixed Deposit(s). The deposit is lien-marked against the Corporate Card santioned. Secured Cards are: +> - Suitable and recommended for entities failing to meet the criteria for Unsecured Cards by partner banks. +> - Available for any registered entity (including trust, proprietorship, partnership and society). +> - Sanctioned for a maximum limit of 90% of the deposit amount. +> - Minimum deposit required is 7 lakhs, which is negotiable up to 5 lakhs. The deposit will earn interest as per prevailing bank norms. +> + +> **WARN** +> +> +> **Watch Out!** +> +> - All policy changes and final underwriting decisions rest solely with Yes Bank, in accordance with applicable RBI regulations. +> - Premature closure of the lien-marked FD is not permitted while the card is active, though partial withdrawals may be allowed subject to the credit limit, as per the norms by the partner bank. +> + +## Related Information + +- [About RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) +- [About RazorpayX Corporate Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/corporate-cards.md) +- [Sign up for RazorpayX Corporate Cards](https://razorpay.com/x/corporate-cards/) +- [RBL Onboarding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/corporate-cards/rbl-onboarding.md) diff --git a/llm-content/x/capital/faqs.md b/llm-content/x/capital/faqs.md new file mode 100644 index 00000000..6aee3ded --- /dev/null +++ b/llm-content/x/capital/faqs.md @@ -0,0 +1,192 @@ +--- +title: Razorpay Capital | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Razorpay Capital. +--- + +# Frequently Asked Questions (FAQs) + +## Common + + +### 1. How can I revoke the consent to pull my bureau report through Razorpay and partner? + + To revoke the consent you gave through Razorpay to pull your credit report, [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#razorpayx-users) from the RazorpayX Dashboard. + 1. Navigate to **Need Help?** in the bottom-right corner of the Dashboard. + 1. Click **Write To Us** and choose **Raise a new request**. + 1. Select **Corporate Cards Related** from the listed categories. + 1. Mention your request to revoke consent in the text box. + + For example, "I want to revoke the consent provided to Razorpay to pull my credit report when applying for RazorpayX Capital products." + 1. Click **Submit**. + + ![Raise a support request to revoke consent on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-capital-revoke-consent.jpg.md) + + +## Corporate Credit Card + + +### 1. How can I get a RazorpayX Corporate Card for my business? + + If you are already eligible, you can [apply for RazorpayX Corporate Card](https://razorpay.com/x/corporate-cards/). We evaluate your credit bureau reports and your business bank statements. + + A high credit score is not necessary to avail a RazorpayX Corporate Card. Your business performance on Razorpay or RazorpayX products is the most important factor. + + + +### 2. How do I check the status of my application? + + You can check the status of your application on the [RazorpayX Dashboard](https://razorpay.com/x/corporate-cards/) after completing the first two steps. Those include: + - Finishing a credit bureau check. + - Uploading your bank statements' PDFs using the perfios portal. + + If your application is still under review for more than a day, you can [raise a support request](https://razorpay.com/support/), and check your email for any clarifications needed from our representative. + + + +### 3. Should I upload bank statements to get a RazorpayX Corporate Card? + + Yes. In compliance with our credit and partners policy, we need your bank statements to evaluate the additional credit lines we can give after assessing your business health. + + + You can safely upload your details via perfios portal or upload pdfs on the [Corporate cards portal](https://x.razorpay.com/cards). + + + +### 4. I am unable to enter my OTP or upload bank statements. What should I do? + + Check again if you have entered the correct mobile number registered with the credit bureau. + + If you still face any issue, you can [raise a support request](https://razorpay.com/support/) with the Support Team. We can resolve it, or arrange for an alternative to help you complete your application at the earliest. + + + +### 5. My request got rejected when I tried to avail a RazorpayX Corporate Card. Why? When can I apply again? + + There are various reasons for which you may be rejected for a RazorpayX Corporate Card, and we are continuously evaluating our policies to give cards to more and many legitimate businesses. + + We request you to reapply for a Corporate Card after 3 months. + + + +### 6. How do I get Add-on Cards for my team members? + + You can get Add-On Cards for your team members right from your [RazorpayX Dashboard](https://x.razorpay.com/auth). + + + +### 7. How can I increase my credit limit on RazorpayX Corporate Card? + + Your credit limit increases or decreases automatically every month (generally in the first or second week) in line with your business performance, card usage and timely repayment behaviour. + + We send you a confirmation mail to get your consent to increase the limit. You can [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) for further query resolution. + + + +### 8. How do I change, enable or disable the auto-payment schedule for RazorpayX Corporate Card? + + You can change your current settings easily in [autopay settings](https://x.razorpay.com/settings/autopay). You can change the window or dates of repayment from the settlement balance of the payment gateway or disable it altogether. + + If you choose to disable the auto-repayment option, remember to pay your bill manually through the **Pay Now** button on your [RazorpayX Dashboard](https://x.razorpay.com/cards). + + + +### 9. How do I pay my bill manually with net-banking or UPI? + + You can pay your bill manually through the **Pay Now** button on your [RazorpayX Dashboard](https://x.razorpay.com/cards). + + + +### 10. My credit is low and I want to spend more. What can I do to increase it? + + You can load your card upfront or and prepay/repay before the bill is generated to increase your spending limit beyond your credit limit. Please use the **Pay More** or **Pay Now** button to do this. + + Factors that can naturally increase your credit limit include + - Increasing volume of payments on Razorpay payment gateway. + - Continuous usage of your card for at least three months. + - Timely repayments of your generated bill. + + You can continue to use 100% of your credit limit. Then repay it before the bill is generated or pre-pay/load the card upfront to increase your spending limit. + + +## Instant Settlements + + +### 1. What are On-demand Instant Settlements and Same-day Scheduled Settlements? + + With Razorpay Capital, you have the flexibility to pick and choose how quick and early you want your settlements to be, based on your business needs. + + - Instant settlements were previously called On-demand Instant Settlements. Razorpay processes these settlements within 10 seconds of capturing the payment. You can choose the amount required to settle instantly for a small fee. + - Same-day scheduled settlements are settled with a T+0 cycle at specific hours of the day by Razorpay. + + Know more about [Instant Settlements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/instant.md). + + + +### 2. What is the settlement schedule for Same-day Settlements? + + - For transactions successfully completed on any day between 09:00 hours to 16:59 hours, subject to the funds being captured during any bank working day, the settlements shall be initiated to the Merchant at 17:00 hours on the same bank working day. + + - For transactions successfully completed on any day between 17:00 pm hrs to 09:59 am (next day), subject to the funds being captured during any bank working day, the settlements shall be initiated to the Merchant at 09:00 am on the same bank working day. + + + +### 3. As a merchant, where and how do I find On-demand Instant Settlements, Same-day Settlements and pricing charged for them? + + Same-day settlements are the same as regular settlements, except that they are settled at T+0. You can find these settlements in the settlement report and the combined report on the payment gateway Dashboard. + + On-Demand Instant settlements are non-recurring payouts from your settlement balance. So such settlements appear as payouts in settlement reports, combined reports and also in the on-demand payouts on the [Razorpay Dashboard](https://dashboard.razorpay.com/app/instantsettlements). + + + +### 4. Which transactions get settled on the same-day after enabling Scheduled Same-day Settlements? + + Any transactions captured after enabling the Schedule Same-day Settlement are settled as per the Early Settlement schedule. However, any transaction captured before that and not settled yet are settled as per the merchant’s previous settlement schedule. + + + +### 5. How to enable Scheduled Same-day Settlements/Early Settlements/Automatic Settlements? + + You become eligible for unlimited Instant Settlements and Scheduled Same-day Settlements (both T+0 cycle) after 50 days of being active on the Payment Gateway. You should continue to use Razorpay for domestic payments and make sure your refund and dispute rates are low. We send you an email to confirm once you are eligible. + + Watch this video about [Availing Instant & Same day Settlements with Razorpay (Website)](https://youtu.be/URCU2CaFU6M) if you are already eligible. + + + +### 6. Are there any limits to Instant Settlements or Same-day Settlements? + + Only Instant Settlements are available from day 1 for most businesses with some exceptions and limits. + + To avail settling unlimited amounts through both instant and same-day settlements, you must have been consistently using the Dashboard in the first 50 days. + + + +### 7. How to remove the limit on Instant Settlements and make it unlimited? + + By being active on the Payment Gateway for 50+ days, you can avail unlimited Instant Settlements. Ensure your refund and dispute rates are low and continue using Razorpay for domestic payments. We send you an email once your settlement limits become unlimited. + + + +### 8. How long does it take for Instant settlements to become active for my account once I sign up? + + Instant settlements are activated upon demand, and are activated within a day of you raising the request to enable it. + + + +### 9. Where are the settlement charges deducted from? + + Scheduled Same-day Settlement charges are deducted from your Free Credits (if you have any). Otherwise, they are deducted from the settlement amount itself. + + For Instant Settlements, charges are deducted directly from the settlement amount. + + + +### 10. Is there an opt-out option for Same-day Settlements, i.e., can I switch back to my old settlement schedule? + + Yes, you can switch back to your old settlement schedule by [raising a support ticket](https://razorpay.com/support/) through a chatbot. + + + +### 11. As a merchant, where and how do I find if a payment was settled early? + + There are no special flags to show if a payment was settled early or not. You can choose to check the `payment initiated` timings and `settled` timings for further information. diff --git a/llm-content/x/capital/line-of-credit.md b/llm-content/x/capital/line-of-credit.md new file mode 100644 index 00000000..12c4c3ae --- /dev/null +++ b/llm-content/x/capital/line-of-credit.md @@ -0,0 +1,144 @@ +--- +title: Apply for and use Razorpay Credit Line | Razorpay Capital +heading: About Line of Credit +description: Explore the meaning, merits and workflow of Line of Credit withdrawals. +--- + +# About Line of Credit + +Razorpay [Line of Credit](https://razorpay.com/x/line-of-credit/) (LOC) is a convenient working capital solution offering flexible repayment options for a 12-month tenure. You can choose your repayment tenure and pay interest only on the amount you have withdrawn via equated monthly instalments (EMI) at your own pace. + +You can cover your planned and unexpected financial outflows with a Line of Credit and conveniently withdraw funds from your assigned credit limit. Explore the following about Line of Credit: +- [Features](#features). +- [Line of Credit Uses](#line-of-credit-uses). +- [Advantages](#advantages). +- [How to apply](#apply-for-line-of-credit). +- [Withdrawal statuses shown on the Dashboard](#withdrawal-workflow). + +## Get Started + +A Line of Credit is beneficial for your business's short-term monetary needs. Once the limit is sanctioned, you can withdraw and automate your repayments easily. + + +### Features + + Razorpay Line of Credit offers the following features: + + - Avail collateral-free Line of Credit. + - Withdraw and repay from a single Dashboard, 24*7. + - Better savings with automated repayments and zero pre-closure charges. + - Pay interest only on the borrowed amount. + - Manual repayment options for increased flexibility. + - Low interest rate starting 1.5% per month. + + + +### Line of Credit Uses + + Businesses often need capital to cover expenses, cash flow gaps, equipment maintenance and more. Following are some use cases of Line of Credit: + + - A Line of Credit can be helpful for large inventory purchases where you can avail discounts when you make bulk purchases. + - You can withdraw from your Line of Credit for short-term plans like marketing campaigns, product launches, festive bonuses, and more. + - In case of a business emergency or a tight cashflow situation, you can instantly use a Line of Credit to withdraw funds. + + You can read more about [using Line of Credit](https://razorpay.com/learn/business-banking/how-a-line-of-credit-can-help-your-business/). + + + +### Advantages + + - **Fixed Due Date** + + Pay EMIs on one fixed due date, no matter when in the month you have withdrawn. This induces better financial planning as you need not check if you have sufficient balance in your account for every different due date. + - **Automated Collection** + + The EMI amount is auto-debited from your account balance on the 5th of every month via automated NACH. You need to ensure there are enough funds to make the repayments. You can also make [manual repayments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit/dashboard.md#manual-emi-payments) as you wish. RazorpayX reminds you as you approach the due date via email. + - **Flexible Withdrawal and Repayment** + + Withdraw the necessary amount on any day of the month. Repay in monthly instalments as per your business needs. + - **No Additional Costs** + + There is no processing fee, pre-closure charges, or hidden charges when availing Line of Credit. You repay only the principal amount borrowed along with the interest payable on the due date. + + +## Apply for Line of Credit + +To apply for Line of Credit: + +1. Visit the [Line of Credit](https://razorpay.com/x/line-of-credit/) page. + 1. Enter your mobile number and complete the OTP verification process. + ![Apply for Line of Credit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-loc-apply.jpg.md) + 1. Enter your name to create an account with Razorpay. You are then redirected to the LOC application form. +1. Enter the necessary details required to complete the Line of Credit application. + 1. Provide business and personal details applicable as per your business type. + 1. Authorise Razorpay as a representative to conduct a credit check from CIBIL/Experian. + 1. Submit the form. + ![Submit the LOC form after filling your details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-loc-apply-1.jpg.md) +1. After we receive your details, we perform a credit verification and eligibility check. + 1. At this stage, you must either: + - Manually upload your bank account statement. + - Upload bank account statement through netbanking via Perfios. + 1. We process and review your details, and ask you to confirm your email. +1. Based on your eligibility, we evaluate an offer for you and show the sanctioned credit limit. + ![Line of Credit offer page with limit of Rs. 5 Lakhs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-loc-offer.jpg.md) +1. After you have accepted the offer, submit your KYC details and sign the relevant agreement documents. + +> **WARN** +> +> +> **Watch Out!** +> +> Only registered businesses operating for at least 12 months with an annual turnover of ₹20 lakhs can avail Line of Credit. +> + +You can now log in to your [RazorpayX Dashboard](https://x.razorpay.com/auth) and: +- [Withdraw funds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit/dashboard.md#make-withdrawals) from your line, 24/7. +- Choose the tenure within which you want to repay the withdrawn amount, including the interest accumulated. +- [Repay your withdrawals](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit/dashboard.md#make-repayments) in two different ways, or pre-close withdrawal. + +## Withdrawal Workflow + +In Line of Credit, you withdraw from an available credit limit and repay the amount withdrawn with interest. + +Following is the status flow for the withdrawal and repayment process: + +Status | Description +--- +`initiated` | When you request a withdrawal on your Dashboard, the withdrawal is in this status. +--- +`processed` | After requesting the withdrawal, our lending partner, Gromor, acknowledges it, and Razorpay prepares an EMI plan in this status. +--- +`disbursed` | When the funds requested are available in your account, the withdrawal reaches this status. +--- +`partially repaid` | If you repay less than total due amount when [repaying a withdrawal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit/dashboard.md#make-repayments), this is the status. +--- +`repaid` | If you have completely repaid the withdrawn amount in full, the withdrawal status is `repaid`. +--- +`overdue` | This is the status if you have not paid the EMI amount after the due date. You can only make further withdrawals when you pay the overdue EMI. +--- +`failed` | If your EMI repayment had failed, this is the status. This usually happens due to unavoidable server downtimes. Retry making the EMI payment. [Contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#razorpayx-capital) from the Dashboard for any queries. +--- + +You can always filter your EMIs basis their status using the **Quick Filters** menu, as shown. + +![Quickfilters menu on the RazorpayX Line of Credit Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-loc-quickfilters.jpg.md) + +### Calculations and Charges + +There are NO hidden charges when you withdraw from the Line of Credit. + +- However, **overdue charges are applicable** when you do not pay the EMIs on the due date. + + The interest accrued is shown on the right pane of the [withdrawal summary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit/dashboard.md) with ⓘ and is inclusive of the overdue charges when you view it after the due date. + ![tooltip icon that shows overdue charges when hovered over](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-loc-charges-tooltip.jpg.md) + +- Delayed interest is an overdue charge applicable if you do not pay your EMI on the due date. This interest is charged on a daily basis on the outstanding EMI amount. +- These calculations are specific to the credit line sanctioned and can be found in the Key Facts Statement and other loan agreement documents. + +All interests (broken period, delayed interest, EMI interest) and EMIs are rounded to the nearest rupee. This adjusts the principal to a rounded-off amount. + +### Related Information + +- [Razorpay Capital Use Cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit.md#use-cases) +- [Top 10 Advantages of a Business Line of Credit](https://razorpay.com/learn/business-banking/why-is-line-of-credit-necessary-for-businesses/) +- [Line of Credit FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit/faqs.md) diff --git a/llm-content/x/capital/line-of-credit/dashboard.md b/llm-content/x/capital/line-of-credit/dashboard.md new file mode 100644 index 00000000..6f2826a1 --- /dev/null +++ b/llm-content/x/capital/line-of-credit/dashboard.md @@ -0,0 +1,135 @@ +--- +title: Razorpay Credit Line make withdrawals and repayments | Razorpay Capital +heading: Make Withdrawals & Repayments +description: Make Line of Credit withdrawals for custom tenures and repay or pre-close EMIs on your RazorpayX Dashboard. +--- + +# Make Withdrawals & Repayments + +After your [credit limit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit.md#how-it-works) is available to you, you can start withdrawing from your credit line on the [RazorpayX Dashboard](https://x.razorpay.com/auth). Here you can: +- View your Line of Credit information, such as Withdrawal balance and Credit limit. +- [Make Withdrawals](#make-withdrawals). + - View your withdrawal summary. + - View your repayment schedule/EMI summary for the selected tenure. +- [Make Repayments](#make-repayments). + - Auto-repay your withdrawals. + - Manually repay your withdrawals. +- [Pre-close Withdrawals](#pre-close-withdrawal). + +## Make Withdrawals + +To make withdrawals: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +1. Navigate to **Line of Credit** from the left menu. +1. On the **Overview** page, click **Withdraw Funds**. + ![Click Withdraw Funds on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/loc-withdraw-funds.jpg.md) +1. On the funds withdrawal screen: + 1. Enter your withdrawal amount and click **Proceed**. + 1. Choose the EMI tenure for repayment. You can either: + - Select from the available tenures shown. + - Click **Custom Tenure** to customise your repayment tenure in months. + ![Select from the tenures provided or choose a custom tenure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/loc-fund-withdrawal-select-tenure.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> Some tenure options are unavailable when the withdrawal amount is too large. Change the preferred tenure or select from the suggested tenures to proceed. +> + + 1. Click **Proceed**. +1. In the **EMI Details** screen, you can preview some of the [withdrawal details](#view-withdrawal-summary). + 1. Click **See complete EMI schedule →** to view the repayment details and schedule. Following is a sample EMI schedule. + ![EMI Withdrawal summary](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/loc-withdrawal-details.jpg.md) +1. After reviewing the EMI details, click **Confirm & withdraw** to proceed with the withdrawal request. + +When the **Withdrawal Initiated** success message appears, you have successfully made a withdrawal. + +### View Withdrawal Summary + +The withdrawal summary is available in the **Withdrawals** section on the Dashboard, as shown. + ![EMI withdrawal summary shown in the right pane on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/withdrawal-summary-1.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> - The minimum withdrawal amount is ₹ 1,000. +> - Interest payable includes delayed charges, if applicable. It is shown using an ⓘ against the EMI amount. +> + +## Make Repayments + +You make EMI repayments in two ways from the RazorpayX Dashboard: +- [Autopay using NACH](#autopay-using-nach). +- [Make manual EMI Repayments](#manual-emi-payments). + +### Autopay Using NACH + +By default, EMI repayments are automated. On the 5th of every month, the EMI due amount is automatically debited from your account balance via NACH. You need to ensure there is sufficient balance in your account for the NACH to debit. + +- In case of insufficient balance, the automatic collection fails and you incur delayed interest. RazorpayX sends you reminders via email as you near the due date. View your upcoming dues on the Line of Credit Overview page. + ![Repay Dues on LOC Overview Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/loc-repay-dues-emi.jpg.md) +- When the NACH is created, you can view that information on your LOC Dashboard. +- Once the amount is debited, the withdrawal status is updated as per the [withdrawal workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit.md#withdrawal-workflow). + +### Manual EMI Payments + +You can pay your EMIs manually the following ways: + +- Pay from the Overview page. +- Pay from the Withdrawal tab. + + + When you want to repay more than one EMI at once, you can pay your EMIs directly from the Overview tab on the [RazorpayX Dashboard](https://x.razorpay.com/auth). + + To repay from the **Overview** tab: + + 1. Navigate to **Line of Credit** from the left menu. + 1. Click **Repay Dues** as shown. + ![Repay Dues on LOC Overview Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/loc-repay-dues-emi.jpg.md) + 1. The **Repayment** pop-up window opens. Review the total amount payable and the amount breakup by clicking the **View breakup** drop-down. + ![LOC Repayment pop-up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-via-emi-overview.jpg.md) + 1. Select or unselect the EMIs you want to pay. After reviewing, click **Confirm Amount** to initiate the EMI repayment. + ![Confirm Amount after reviewing EMIs payable](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-emi-overview-select-deselect.jpg.md) + 1. Enter your contact details and make a successful payment. + + After receiving your payment, the instalment history gets updated as per the [withdrawal workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit.md#withdrawal-workflow). + + + If you want to repay a single withdrawal EMI before the due date: + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth) → **Line of Credit** from the left menu. + 1. In the **Overview** page, go to the **Withdrawals** section. + 1. Click the withdrawal you want to pay off. In the right pane that opens, you can view the summary of the withdrawal along with the repayment history. + 1. Click **Repay Dues** in that pane. + ![Click Repay Dues to make a single EMI payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/pay-from-withdrawal-tab.jpg.md) + 1. Enter your contact details and make a successful payment. + + Once we receive your payment, the instalment history gets updated as per the [withdrawal workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit.md#withdrawal-workflow). + + +## Pre-close Withdrawal + +When you have the funds to pay off a withdrawal completely, you can choose to pre-close that withdrawal from the Dashboard. +- There are no pre-closure charges when you do so. +- This is a manual process. + +To pre-close withdrawal: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth) → **Line of Credit**. +1. Select the withdrawal EMI you want to pre-close from the Withdrawals section. The withdrawal summary pane opens to the right. +1. Click **Pre-close withdrawal** to the bottom-right. + ![Preclose your withdrawal from the withdrawal tab](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-loc-preclose-withdrawal.jpg.md) +1. In the pre-closure summary pop-up page, review the total amount and interest payable. Click **Preclose Withdrawal**. +1. Enter your contact details and make a successful payment. + +Once we receive your payment, the instalment history gets updated as per the [withdrawal workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit.md#withdrawal-workflow). You can withdraw 48 hours after pre-closing your EMI. + +### Related Information + +- [Razorpay Capital Use Cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit.md#use-cases) +- [Top 10 Advantages of a Business Line of Credit](https://razorpay.com/learn/business-banking/why-is-line-of-credit-necessary-for-businesses/) +- [Line of Credit FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit/faqs.md) diff --git a/llm-content/x/capital/line-of-credit/faqs.md b/llm-content/x/capital/line-of-credit/faqs.md new file mode 100644 index 00000000..5997d976 --- /dev/null +++ b/llm-content/x/capital/line-of-credit/faqs.md @@ -0,0 +1,64 @@ +--- +title: Razorpay Capital Line of Credit | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about Line of Credit. +--- + +# Frequently Asked Questions (FAQs) + +### 1. I am unable to make my EMI payment and the due date is close. What are the alternative ways in which I can make timely repayments? + + If you are unable to manually pay your EMIs from your Dashboard, it means we have already initiated a NACH to auto-debit the amount from your balance. + - If the autopay/NACH fails, we trigger a [Payment Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-links.md) to collect the overdue amount. The overdue amount is adjusted to include the [delayed interest](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit.md#delayed-interest) charges. + - If you still want to make a manual repayment, [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#razorpayx-capital). Any amount received from the NACH will be credited back to your account. + + + +### 2. How can I know if NACH is already initiated? + + + You can view if the [NACH is initated](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit/dashboard.md#autopay-using-nach) on your RazorpayX Dashboard. + + + +### 3. Where can I view my credit limit/balance? + + You can view it on your LOC [**Overview** page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit/dashboard.md#make-withdrawals). + - **Credit limit** is the maximum amount assigned to you from which you can withdraw. + - **Credit balance** is the balance remaining after withdrawing any amount from the credit limit. + + + +### 4. What is the fixed due date for every withdrawal? + + The fixed due date for all the EMIs payable is the 5th of every month. + + + +### 5. Where can I view my EMI details? + + On your LOC **Overview** page, click on the withdrawal you want to know about. You can view your EMI details for that withdrawal in the pop-up pane that opens to the right. + + Know more about [EMI details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit/dashboard.md#make-withdrawals). + + + +### 6. What are my modes of repayment? + + Your primary mode of repayment is automated via NACH collection that happens on the 5th of every month. Alternatively, you can repay your EMIs via: + - [Manual EMI payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit/dashboard.md#manual-emi-payments). + - [Pre-closing withdrawals](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit/dashboard.md#pre-close-withdrawal). + + + +### 7. I am unable to withdraw money from my available credit limit. Why? + + There are two reasons for this: + 1. You have an **overdue EMI**. + + Repay your existing overdue EMI to start withdrawing from your Line of Credit again. + 1. You are **making a fourth withdrawal**. + + In the current LOC EMI model, you cannot have more than three active EMIs. If you are unable to withdraw money even though you have not exhausted your credit limit, this is the reason. + + To withdraw again, close any one of the three active withdrawal EMIs. There are no [pre-closure charges](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/line-of-credit/dashboard.md#pre-close-withdrawal) for pre-payment. diff --git a/llm-content/x/capital/use-cases.md b/llm-content/x/capital/use-cases.md new file mode 100644 index 00000000..7f774b6b --- /dev/null +++ b/llm-content/x/capital/use-cases.md @@ -0,0 +1,90 @@ +--- +title: Explore Razorpay credit line and other Razorpay Capital product usecases | Razorpay Capital +heading: Razorpay Capital Use Cases +description: Explore the industry-wise use cases of the Razorpay Capital products. +--- + +# Razorpay Capital Use Cases + +Businesses need short-term funds for their daily business operations. Razorpay Capital offers timely assistance and best-in-industry features via the following products: + +- **[Corporate Cards](#corporate-cards)**: Get a Corporate Card and additional Add-on Cards for your teams. Create a robust expense management system, avail lucrative benefits and optimise business spending. + +## Corporate Cards + +With a Corporate Card, you get the benefit of short-term funds. You can also: +- Build an expense management system. +- Enforce spending controls for teams and members. +- Avail lucrative rewards on spending. + +Know more about the [features of RazorpayX Corporate Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md). + +Following are some industry-wise examples of how you can use the RazorpayX Corporate Card: + + +### Travel agency and expenses + + Whether you are a travel company or have employees in your organisation who travel for work, you can get a Corporate Card to: + - Pay for flights and hotel bookings. + - Pay for meals, stay and transportation. + - Avail offers and discounts from the Rewards program. + + The RazorpayX Corporate Card lets you manage your expenses on one card and simplifies expense tracking. It also makes the reimbursement process easy. + + If you provide Add-on Cards, you can set limits and controls on expenses. + + + +### Sales and Marketing + + Marketing and sales teams need short-term funds to act swiftly on business opportunities. + + You can use a Corporate Card to: + + - Cover expenses related to client meetings and entertainment. + - Manage promotional expenses as per marketing campaigns. + - Meet ad hoc advertising costs that arise. For example, cover shortages in event planning or meet immediate advertising costs. + + With Add-on Cards, you can authorise your teams to make business-approved expenses from their assigned limit. + + + +### Professional Services + + If you offer professional services, you can use a Corporate Card and build a professional identity in the following ways: + - Use short-term credit and cover all client meetings-related expenses easily. + - Instantly act on marketing and networking opportunities with unrestricted access to funds on your Corporate Card. + - You can avail offers and discounts on the business spends. + - View your spending and related generative insights on a single Dashboard and make strategic business decisions. + + + +### Retail and E-commerce + + Retail and e-commerce industries have rapid cash flow movements. To meet short-term funding needs, you can use the RazorpayX Corporate Card to: + + - Cover unexpected logistics, packaging, advertising, communication and other costs. + - Avail offers on commonly trusted e-commerce platforms. + - For inventory purchasing to establish a smooth supply chain. + - Set up a payment processing infrastructure. + - Develop business infrastructure such as the website, policies, communication, support and announcements channels. + + You can also assign Add-on Cards to your employees for authorised business purchases. + + + +### Manufacturing and Distribution + + Corporate Cards are highly beneficial in the manufacturing and distribution sector in the following ways: + + - Use short-term funding via the Corporate Card to meet rising demand during festive seasons. + - Quickly meet ad hoc costs in manufacturing and distribution. + - Help when the infrastructure and equipment needs upgrades, procurement, servicing, maintenance, leasing and more. + - Make timely payments to improve supplier and vendor relationships. + + For internal teams, you can provide Add-on Cards with spending limits for them to act on cost-saving opportunities. + + +### Related Information + +- [About Corporate Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) diff --git a/llm-content/x/capital/working-capital-loans.md b/llm-content/x/capital/working-capital-loans.md new file mode 100644 index 00000000..6492f8ba --- /dev/null +++ b/llm-content/x/capital/working-capital-loans.md @@ -0,0 +1,177 @@ +--- +title: Working Capital Loans +description: Check the process to avail a customised Working Capital loan from Razorpay and have funds disbursed to your account. +--- + +# Working Capital Loans + +Razorpay offers a customised working capital loan for small and medium businesses to meet their working capital needs. To avail access to Working Capital Loans, you are required to complete the Business Loan Application process, which involves a complete set of actions and services under the **Loan Origination System (LOS)**. + +LOS is a newly built, powerful self-assisted model of loan processing for digital onboarding of merchants looking for access to credit. It supports multiple credit products without significant changes to the customer journey/data collection process. + +Business Loan Application process is designed to provide a seamless experience while applying for loans, tracking disbursal amounts, as well as tracking collections. + +Complete your loan application process in just four simple steps, as shown below: +1. Check eligibility. +2. Apply for the loan. +3. Wait for the application evaluation. +4. Understand and sign the Agreement. + +And finally, you can use the loan amount. + +![Razorpay Capital Application Process](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-process.jpg.md) + +## Why Razorpay Capital + +- You can get loans from top NBFCs at affordable rates without collateral. +- We give consideration to your excellent history on Razorpay Payment Gateway. +- You have the flexibility to repay automatically as a percentage of your settlements. +- Online application with quick processing and disbursal. + +## Loan Application Process + +As an existing Razorpay merchant, you will receive an invitation for Loan/[Line of Credit from Razorpay](https://razorpay.com/x/line-of-credit/) on the basis of internal Transaction Data. You may hereby choose to accept and initiate the Business Loan Application process. + +![Start Capital Loan Application Process](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-loan-process.gif.md) + +### Initiate the Loan Process + +Following are the detailed steps to complete the loan application process and get funds disbursed to your account. + +1. Log in to the [Razorpay Dashboard](https://dashboard.razorpay.com/app/dashboard) with your credentials. + +1. On the left panel, browse to the **Loans** tab. Navigate to **Check your loan eligibility** and click **Start your application** button section to initiate the Business Loan Application process. + ![Start Business Loan Application Process](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-loan-tab.jpg.md) + +1. In the **Business Info** section, apart from the pre-filled basic details, you must select appropriate loan requirement details, such as **Monthly Business Value**, **Expected Loan Amount**, **Tenure** and **Purpose**. Click **Save & Next**. + ![Confirm Business Details and needs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-business-info.jpg.md) + +1. On the **Promoter Info** section, you must provide the Authorized Signatory's details. This information is verified with central PAN database and is used to pull the credit report on your behalf. Read through the Terms and Conditions and click **Save & Next**. + +> **WARN** +> +> +> **Watch Out!** +> +> The phone number you enter here must be the same as the phone number linked to your PAN. +> + + ![Enter and confirm Individual Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-promoter-info.jpg.md) + +1. Click **Modify** (in the right panel) to modify the offer details. + +### Credit Report + +We need your credit score to make a loan offer. We use your phone number and PAN to fetch your credit score. + +1. On the **Credit Report** section, enter the OTP sent your phone number and click **Submit OTP**. This authorizes us to view your credit score. + ![OTP Verification for Credit Report retrieval](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-otp-info.jpg.md) + +1. You can view your full credit report onscreen. We also send this report to the email address you have provided, as shown. Based on your credit history, we send you the loan offer status, that is: + - **Eligible for the loan**: The loan offer is approved. Click **Continue**. + ![Loan Approved](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-loan-approved.jpg.md) + - **Not eligible for the loan**: The loan offer is rejected. + ![Loan Rejected](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-loan-rejected.jpg.md) + - **Information Mismatch**: There is a mismatch between the information provided and the information in the central PAN database. Click **Try Again**, which navigates you to the **Check your loan Eligibility** section. Click **Continue applying** and update the information so it matches data in the central PAN database. + ![Information mismatch](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-info-mismatch.jpg.md) + +## Upload Your Documents + +As part of the KYC verification process, you must submit documents including Address Proof, Business Proof and Bank Statements to Razorpay via the **Documents Upload** section. + +> **INFO** +> +> +> +> **Handy Tips** +> +> The KYC documents submission will depend on the business type such as Private Limited, Proprietorship, Partnership, Individuals, Public, LLP or Trusts, Societies & NGO. +> + +- On the **Address Proof** tab, upload PDF copies of business documents such as Authorized Signatory's Address Proof and Business Owner PAN. +- On the **Business Proof** tab, upload PDF copies of business documents such as Business Registration Proof and Business PAN. +- On the **Bank Statement** tab, upload PDF copy of your last 6 months' Bank Account statement for us to evaluate your business transactions. + +Once you upload the required documents, click **Next**. + +![Upload required Documents in the three required tabs.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-document-upload.jpg.md) + +### Loan Offer + +Razorpay starts the review process to evaluate the loan offer. + +Once your loan is approved, you can see the actual approved loan amount that gets disbursed to your account in the **Loan Offer** section. You can also see the charges that apply. + +Click **Next** if you agree with the sanctioned amount and charges. + +![Loan Offer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-loan-offer.jpg.md) + +### Loan Agreement + +We generate and upload the loan agreement on the **Loan Agreement** tab. The loan agreement is also sent to you via email for you to sign. + +Once the agreement is ready, click **Sign Loan Agreement** to e-sign the legal agreements and then click **Next**. + +![Loan Agreement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-loan-agreement.jpg.md) + +### Paper NACH Process + +Once you have agreed to the final loan amount and the agreement is signed, a pre-filled NACH form is generated on the **Submit NACH form** section. You receive an email and SMS with the link to the pre-filled NACH form. + +Click the link, download, print and sign the NACH form. Use the same link to upload the signed form as a PDF file and click **Submit**. + +![Download NACH Form](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-nach-form.jpg.md) + +The details on the uploaded NACH form will be verified and you are updated via email about the same. + +![Upload NACH Form and click Submit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-nach-verification.jpg.md) + +### Document Collection + +Once the NACH form is submitted, you must select a slot (date and time) and schedule an appointment for the document collection to be done. Click **Next**. +![Select Slot for Document Collection](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-doorstep-collection.jpg.md) +A representative will be sent to collect your documents, including Proof of Address Individual, Business KYC, NACH, PDC and Loan Agreement. The collated documents are then sent to the lender for validation for a final loan approval followed by loan amount disbursal. +![Summary of the List of Documents being collected](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-collection-doc.jpg.md) + +### Final Review + +This is mandatory. At this stage, the lender will verify the documents and approve/reject the loan. In either case, you receive a call for a final confirmation about the disbursement of the loan amount. This process can take around 1-2 days. +![Documents under review](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-final-review.jpg.md) + +On a successful authorization, your loan offer will be approved. +![Loan Approved](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-loan-success.jpg.md) + +### Fund Disbursement + +The lender will disburse the net disbursal amount to your bank account and notify us about the same so we can start tracking the collections. +![Fund Disbursed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/working-capital-loan-fund-disbursement.jpg.md) + +## FAQs + +#### 1. What is a Working Capital Loan? +A working capital loan is a short term business loan, typically for 3 to 12 months, that can be used for day-to-day operations, purchasing inventory, paying salaries, rent or vendors, maintaining essential services and so on. + +#### 2. How do I apply for a Working Capital loan? +To apply for a working capital loan with Razorpay, log in to your Dashboard, navigate to **Loans** and apply for a loan. All you need to do is upload a few documents. We send you an offer within 3 working days from the time of application. + +#### 3. What is the interest on the working capital loan? +The interest rates start at 1.25% per month. + +#### 4. How do I pay back working capital loan? +Razorpay helps you pay your loans in installments of daily, weekly or monthly amounts according to your convenience. You can pay them automatically as a percentage of your settlements. + +#### 5. How can I increase my CIBIL (credit) score? +One way to improve your CIBIL (credit score) score is to pay your EMIs on time. Razorpay Capital can help you improve your credit score by getting loans that you can pay back on time automatically. + +#### 6. Will my credit score be affected if I generate a credit report? +No, your credit score is not affected if you generate a credit report. + +#### 7. I have already submitted bank details when I signed up with Razorpay. Should I submit them again? +Yes, as we need the last 6 months’ bank statement (till date) for processing your loan application. + +#### 8. The loan is approved, but I have not received the amount in my account as yet? +Reach out to [Razorpay Support](https://razorpay.com/support/), if you have not received the loan amount after approval. + +## Support + +If you have a query, raise a ticket on our [Support Portal](https://razorpay.com/support/#request). You can also drop an email to [Razorpay Capital Team](mailto:capital.support@razorpay.com). diff --git a/llm-content/x/changelog.md b/llm-content/x/changelog.md new file mode 100644 index 00000000..b9ca4f3b --- /dev/null +++ b/llm-content/x/changelog.md @@ -0,0 +1,64 @@ +--- +title: RazorpayX Changelog +description: List of updates in RazorpayX products, including new feature releases and improvements. +--- + +# RazorpayX Changelog + +- **API Changelog**: Discover new releases and updates regarding Razorpay APIs. + + - **Payments Changelog**: Discover new releases and updates regarding Razorpay Payments. + +The following table records changes made to RazorpayX since Jan 2024: + +Month-Year | Feature | Description +--- +Mar 2026 | Account Validation enabled via Reverse Penny Drop | Validate bank accounts using the [Reverse Penny Drop](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts/reverse-penny-drop.md) method, verifying the authenticity of both the account as well as the account holder. +--- +Nov 2025 | Introduced RazorpayX Corporate Cards. | You can now avail [RazorpayX Corporate Cards ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/capital/corporate-cards.md) powered by RBL and Yes Bank to manage and segregate your business expenses in a controlled way. +--- +Nov 2025 | Cashflow Insights enabled in RazorpayX Dashboard | You can now view the cashflow summary of your account(s) on your RazorpayX Dashboard using [Insights](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/cashflow-insights.md). +--- +Sept 2025 | Light Theme enabled in RazorpayX Dashboard.| You can now switch between [Dark and Light themes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard.md) for your Dashboard as per your choice. +--- +June 2025 | Allowlisting IPs for Payout Links APIs | Allowlisting IP addresses is made mandatory for using the [Payout Links APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/api.md). +--- +Mar 2025 | Smart Settlements | Introduced [Smart Settlement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/settlements/instant.md#initiate-smart-settlements), a sub-feature of Instant Settlements, which enables you to settle amounts upto ₹50 Cr instantly, as a single entry, using the RTGS channel. +--- +Mar 2025 | Idempotency Key Made Mandatory | [Idempotency Key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency.md) has been made mandatory for all payouts, starting March 15, 2025. +--- +Dec 2024 | Disengagement of ICICI as Partner Bank | The Partnership with ICICI for Current Account services has been closed. Existing RazorpayX customers maintaining Current Accounts with ICICI Bank will continue to receive services and support. +--- +Dec 2024 | IDFC First Onboarded as Partner Bank | RazorpayX has partnered with IDFC First Bank to offer Current Account services to customers. You now have the option to open a Current Account with IDFC First through RazorpayX. +--- +Dec 2024 | Payout Purpose Limit Increased | The maximum number of [Payout Purposes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#create-payout-purpose) that can be added has been increased from 200 to 400. +--- +Oct 2024 | Petty Cash Removal | Petty Cash Budgeting feature in RazorpayX has been deprecated. +--- +Aug 2024 | Bulk Import of Items | You can now [import Items in bulk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/items/bulk-import-items.md) from your external tools or templates. +--- +Aug 2024 | Bulk Import of Purchase Orders | You can now [import Purchase Orders in bulk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/purchase-order/bulk-import-po.md) from your external tools or templates. +--- +Aug 2024 | Create or Import Purchase Orders | You can now [create or import Purchase orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/purchase-order.md) and link them to vendors and payments. +--- +Aug 2024 | Payouts Pro Self-Serve | You can now improve the success rates of transactions by setting multiple accounts for payouts using the dynamic [Payouts Pro Multi-Bank Routing](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/multi-bank-routing.md) feature of RazorpayX. +--- +Jul 2024 | Capital | B2B Checkout Financing is no longer available as a Razorpay offering. +--- +Jul 2024 | Idempotency Header for Payouts API | [Idempotency header is now mandatory for all Payouts APIs.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/best-practices.md#handling-5xx-errors-and-idempotency) +--- +Jul 2024 | Payouts Downtime Alerts | You can now [receive partner and beneficiary bank downtime alerts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/downtimes.md) via email, SMS and webhooks. +--- +Jun 2024 | Payouts Pro Widget | [Payouts Pro Widget](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/multi-bank-routing.md#widget) is now publicly available to users. Get AI-powered insights into Payout performance for previous 30 days. +--- +May 2024 | Cost Centers | You can [create cost centers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/cost-centers.md) to streamline your expenses by mapping them to individual functions or activities in your organisation. +--- +May 2024 | Current Accounts on Axis Bank | RazorpayX is now offering [Current Accounts in partnership with Axis Bank](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/axis-current-account.md). +--- +May 2024 | User Groups | You can [create teams, departments or groups](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/user-groups.md) based on location and other custom categories. +--- +Mar 2024 | Deprecation of GST | The [GST](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/gst.md) feature on the RazorpayX Dashboard has been deprecated. +--- +Feb 2024 | Multi-Branch Management | You can [manage multiple business branches/locations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/multi-branch-management.md) and track the respective vendor payments from one RazorpayX account. +--- +Feb 2024 | Composite Account Validation API | [Introduced Composite Account Validation API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/composite-account-validation.md) to create contact, fund account and validate the bank account (using penny-drop/penniless) and VPA IDs of your customers, in a single API call. diff --git a/llm-content/x/contacts.md b/llm-content/x/contacts.md new file mode 100644 index 00000000..3468a4d9 --- /dev/null +++ b/llm-content/x/contacts.md @@ -0,0 +1,125 @@ +--- +title: Contacts on RazorpayX +heading: About Contacts +description: Create, update and view Contacts on the RazorpayX Dashboard. +--- + +# About Contacts + +A Contact can be a vendor or a customer to whom you need to send payouts (similar to a *beneficiary* in your netbanking portal). +- You can add a Contact's name, email id, phone and [Fund Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md) details (bank account, UPI or both) while creating a Contact. +- You can start sending payouts once the Contact has been created. +- There is no limit to the number of Contacts you can add. + +> **WARN** +> +> +> **Contact Support** +> +> This page is not meant for contacting Razorpay Support. Visit our [contact support page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) to contact our support team. +> + +## Contact Types + +When creating a Contact, you are required to assign a type to the Contact. This helps in categorisation of Contacts and analysis of the payouts made to each category. The following `types` are available: + +- `vendor` +- `customer` +- `employee` +- `self` + +You are not restricted to use only these `types`. You can create custom `types` for Contacts, as applicable to your business, from the RazorpayX Dashboard. + +### Create and View Contact Types + + +### To create a Contact Type: + + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/). + 2. Navigate to **Contacts** on the left navigation and click **︙**. + 3. Click **Create Contact Type**. + ![Create Contact Type](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-contact-type-1.jpg.md) + 4. Enter the **Type Name** and click **CREATE CONTACT TYPE**. + ![Enter Contact Type name](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-contact-type-2.jpg.md) + + Or, first view the existing Contact Types and decide whether you want to create a new type. + + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/). + 2. Navigate to **Contacts** on the left navigation and click **︙**. + 3. Click **View Contact Types**. + 4. Scroll to view all the available types or use search. + 5. Click **+ CREATE NEW CONTACT TYPE**. + ![View and create new Contact Type](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-contact-type-3.jpg.md) + 6. Enter the **Type Name** and click **CREATE CONTACT TYPE**. + + +## Contacts Actions + +The following table lists down the actions that can be performed on Contacts using APIs, Dashboard and Bulk Upload: + +Action | API | Dashboard | Bulk Upload +--- +Create a Contact | ✓ | ✓ | ✓ +--- +Update a Contact | ✓ | ✓ | x +--- +View Contact details | ✓ | ✓ | x +--- +Mark as inactive | ✓ | ✓ | x + +You can [create Contacts using APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/create.md) or [create Contacts in bulk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts/bulk-uploads.md). + +## Create a Contact + + +### To create a Contact with Fund Account from the Dashboard: + + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/). + 2. You can create a Contact in two ways: + - Navigate to the drop-down menu next to **+ Payouts** and click **Add Contact**. + ![Create new Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-create-contact.jpg.md) + - Hover over **Contacts** on the left navigation and click **+**. + - Press C on your keyboard. + - Navigate to **Contacts** on the left navigation and click **+ CONTACT**. + 3. Enter contact details. + ![Contact Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-contact-details.jpg.md) + 4. Click **SAVE AND CLOSE**. + + +## Update a Contact + + +### To update a Contact from the Dashboard: + + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/). + 2. Navigate to **Contacts**. + 3. Select the Contact you want to edit. + 4. Navigate to **Options** → **Edit Contact**. + 5. Edit Contact details and click **NEXT**. + 6. Click **SAVE AND CLOSE**. + + +You can also [create](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/create.md) and [update](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/update.md) contacts using APIs. + +## Mark Contact Inactive + +Mark Contacts inactive instead of deleting them when you do not require them. You can also activate them following the same steps. + + +### To mark a Contact inactive from the Dashboard: + + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/). + 2. Navigate to **Contacts**. + 3. Select the Contact you want to mark inactive. A right-pane opens up. + 4. Click **Options** → **Mark as Inactive**. + ![Mark Contact Inactive](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-mark-contact-inactive.jpg.md) + + +## Next Steps + +Add [Fund Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md). + +### Related Information + +- [Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) +- [Fund Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts/faqs.md) diff --git a/llm-content/x/contacts/api.md b/llm-content/x/contacts/api.md new file mode 100644 index 00000000..16825767 --- /dev/null +++ b/llm-content/x/contacts/api.md @@ -0,0 +1,30 @@ +--- +title: RazorpayX Contact APIs +heading: Contact APIs +description: List of RazorpayX Contact APIs available to perform various actions. +--- + +# Contact APIs + +You can use the our Contact APIs to create, update or deactivate contacts. You can perform most of these actions from the [RazorpayX Dashboard](https://x.razorpay.com/auth) as well. + +## List of APIs + +The table below lists the various Contacts APIs and gives a brief description of each API: + +API | Description +--- +[Create a Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/create.md) | Creates a new Contact. +--- +[Update a Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/update.md) | Updates an existing Contact. +--- +[Activate or Deactivate a Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/activate-or-deactivate.md) | Activates or deactivates an existing contact. +--- +[Fetch all Contacts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/fetch-all.md) | Retrieves all the Contacts. +--- +[Fetch a Contact with ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/fetch-with-id.md) | Retrieves a single Contact with ID. + +### Related Information + +- [Contacts and Fund Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/apis/subscribe.md) diff --git a/llm-content/x/contacts/bulk-uploads.md b/llm-content/x/contacts/bulk-uploads.md new file mode 100644 index 00000000..a4fb4749 --- /dev/null +++ b/llm-content/x/contacts/bulk-uploads.md @@ -0,0 +1,148 @@ +--- +title: Bulk Upload on RazorpayX +heading: Bulk Upload - Contact and Fund Account +description: Create Contacts and Fund Accounts in bulk from your RazorpayX Dashboard using bulk upload. +--- + +# Bulk Upload - Contact and Fund Account + +You can use the bulk upload feature to create Contacts and Fund accounts in bulk from the Dashboard. You can also use this feature to add Fund account details to existing Contacts. Export the existing Contacts and add the beneficiary details. + +![Export Contacts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-bulk-contact-upload-export-contacts.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> - It is not possible to create new Contacts without adding Fund account details. When you create a Contact using bulk upload, you must also upload the Fund account details for the Contact. +> - You cannot use this feature to edit existing Contact or Fund account details. +> + +## Bulk Upload Contacts and Fund Accounts + +Create Contacts and their respective Fund accounts in bulk. Check the sample template to input the details, how to upload the template and the required fields. + +To create Contacts and Fund accounts in bulk: + +1. Download the required [sample template](#sample-template). +2. Add the [required data in the template](#requested-fields-in-template). +3. Upload the template via the Dashboard. + +### Sample Template + +[Download .csv file Sample Template](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/batch_contacts_sample.csv.md) + +### Requested Fields in Template + +Use the [sample template](#sample-template) to create Contacts and Fund accounts using bulk upload. This contains some example data to help you. + + +### Fields and Descriptions + + The table below lists the various fields in the template and gives a brief description of each field. + + `Fund Account Type` _conditionally mandatory_ + : `string` The type of account to be linked to the Contact id. Possible values: + - `bank_account` + - `vpa` + + `Fund Account Name` _conditionally mandatory_ + : `string` Name of the account holder as per bank records. For example, `Gaurav Kumar`. + + `Fund Account Ifsc` _conditionally mandatory (Mandatory if Fund Account Type = bank_account)_ + : `string` Bank IFSC of the account number. For example, `HDFC0000053`. + + `Fund Account Number` _conditionally mandatory (Mandatory if Fund Account Type = bank_account)_ + : `string` Beneficiary account number. For example, `765432123456789`. + + `Fund Account Vpa` _conditionally mandatory (Mandatory if Fund Account Type = vpa)_ + : `string` The virtual payment address. + + For example, `gauravkumar@upi`. + + `Fund Account Phone Number`_optional_ + : `number` Phone number of the contact associated with the given Fund account. + + `Fund Account Email` _optional_ + : `string` Email of the contact associated with the given fund account. + + `Fund Account Provider` _optional_ + : `string` The bank/wallet providing the user with a fund account. +Possible values: +- `amazonpay` + + `Contact Id` _conditionally mandatory_ + : `number` This is the unique Contact id to which payouts are to be made. + + `Contact Type` _mandatory if Contact id is not given_ + : `string` The classification of Contact that is being created. For example, `employee`. + + +> **INFO** +> +> +> **Handy Tips** +> +> - Additional classifications can be created via the Dashboard. +> - This field is case-sensitive. +> + + The following classifications are available in the system by default: + - `vendor` + - `customer` + - `employee` + - `self` + + `Contact Name` _conditionally mandatory_ + : `string` Name of the person to whom payout is to be made. For example, `Gaurav Kumar`. + + `Contact Email` _mandatory_ + : `string` Email address of the Contact to whom the payout has to be made. + + `Contact Mobile` _mandatory_ + : `number` Mobile number of the Contact to whom the payout has to be made. + + `Contact Reference ID` _optional_ + : `string` Reference ID of the Contact, if any. + + `notes[example text]` _optional_ + : `string` Notes for the details being imported. You can replace the `example text` in the header with text of your choice. You can add up to 15 notes. Text in the header is the title and text in the cell is the value for the note. + + + +## Upload and Process Bulk File + + +### To upload the bulk file containing Contacts and the respective Fund accounts: + + 1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). + 2. Navigate to **Contacts** → **Import Contacts**. Here, click **+ IMPORT**. + ![Contacts Import Page on RazorpayX Dashboard shows a list of old, newly sorted batches of contacts uploaded. '+ Import' is to the top-right edge of the screen.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-cfa-bulk-create-1.jpg.md) + 3. Click [**DOWNLOAD SAMPLE FILE**](#sample-template). + 4. Add the required data to the sample template file. Ensure the data is formatted correctly and save the file. + 5. Select **Click to Upload** and choose the file you want to import. + ![Import Contacts window, asks you to drop your .csv file in the window, or upload it. Maximum size: 10MB. File must follow given template.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-cfa-bulk-create-2.jpg.md) + 6. Click **NEXT** and preview the uploaded contacts. + 7. Name the batch of contacts and click **CREATE**. + !['Preview & Close' screen shows top 3 rows from uploaded file. Batch Name is editble; click 'Create' at bottom-right corner.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-cfa-bulk-create-3.jpg.md) + + +## Bulk Upload Report + +After a bulk upload is processed, you can download the processed bulk report from the Dashboard. The report has the following additional fields that you can check to see if the contacts/fund accounts were created successfully. + +`Fund Account Id` +: `string` Unique identifier for the Fund account. Value is returned only when the Fund account is successfully created. For example, `fa_ECDexvVvKxbQDK`. + +`Error Code` +: `string` The error code for the failure. For example, `BAD_REQUEST_ERROR`. + +`Error Description` +: `string` The reason for the error. For example, `Invalid IFSC Code in Bank Account` + +### Related Information + +- [Contacts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md) +- [Fund Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md) +- [Bulk Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts.md) diff --git a/llm-content/x/contacts/faqs.md b/llm-content/x/contacts/faqs.md new file mode 100644 index 00000000..0237aa53 --- /dev/null +++ b/llm-content/x/contacts/faqs.md @@ -0,0 +1,64 @@ +--- +title: RazorpayX Contacts | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about RazorpayX Contacts. +--- + +# Frequently Asked Questions (FAQs) + +### 1. What is a Contact in RazorpayX? + + A Contact is an entity to whom payouts can be made through supported modes such as UPI/IMPS/NEFT/RTGS. + + + +### 2. How do I create a Contact? + + You can create Contacts on RazorpayX by providing the Contact name, email id, mobile, and so on. Contacts can be created via: + - [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/create.md) + - [RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md) + - [Bulk Upload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts/bulk-uploads.md) + + Know how to [create a Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#create-a-contact). + + + +### 3. Can I classify a Contact? + + Yes, you can classify a Contact and assign a type or a category to that Contact. For example, Contact types can be `Vendor`, `Employee` or other custom types as applicable to your business. + + Know more about [Contact types](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#contact-types). + + + +### 4. What is meant by '**Active**' and '**Inactive**' contact? + + When you create a Contact, it is in the **Active** status by default. + + However, for business needs, you can [mark a Contact as '**Inactive**'](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#mark-contact-inactive). If marked '**Inactive**', you cannot [create Payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#how-to-make-payouts/) to that Contact. + + If you want to resume payouts to a Contact, mark them as 'Active' again. + + + +### 5. What modifications can I make to a Contact once created? + + Once created, you can modify any property of the Contact. In fact, you can also mark a Contact as '**Inactive**' or '**Active**'. Know more about [Contact actions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md). + + + +### 6. How do I block payouts to a Contact? + + You can [mark a Contact as '**Inactive**'](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#mark-contact-inactive) to block any payout requests to a Contact. + + + +### 7. How do I resume payouts to a blocked Contact? + + Mark the Contact as ‘Active’ to resume payouts to the Contact. + + + +### 8. Can I automatically import my Linked Accounts and Customers from the Razorpay Payments Dashboard to RazorpayX Dashboard? + + No. You cannot automatically import Customers and Linked Accounts from Razorpay Payments Dashboard to RazorpayX Dashboard. diff --git a/llm-content/x/cost-centers.md b/llm-content/x/cost-centers.md new file mode 100644 index 00000000..ed6ea489 --- /dev/null +++ b/llm-content/x/cost-centers.md @@ -0,0 +1,65 @@ +--- +title: Cost Center on RazorpayX +heading: Cost Centers +description: Create Cost Centers on the RazorpayX Dashboard. Streamline your expenses by mapping them to individual functions or activities within the organisation. +--- + +# Cost Centers + +A Cost Center can be a specific group, or a Business Unit within an organisation. Organisations create Cost Centers for streamlining expenses. Cost centers are typically used to monitor and control the costs associated with various functions or activities within the organisation. + +Cost centers can be used to tag expenses while creating a Purchase Order. An approval workflow can be triggered based on the Cost Center selected, using [Purchase Order Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/purchase-order.md#purchase-order-approval-workflow). + +You can also set up a separate [Invoices Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices/approval-workflow.md). + +> **WARN** +> +> +> **Watch Out!** +> +> - Only 1 Cost Center can be linked to a Purchase Order or Invoice. +> - Only the owner or admin can create a Cost Center. +> + +## Create a Cost Center + +To create a cost center: + +1. Log in to the [RazorpayX Dashboard](http://x.razorpay.com/auth). +2. Navigate to **Cost Centers** and click **+ Cost Center**. + ![Create cost center](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-cost-center.jpg.md) +3. Enter a unique **Name** and **Description** of the cost center and click **Create**. + ![Enter cost center details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cost-center-details.jpg.md) + +Your cost center is created and ready to use. You can view the **Name**, **Description** and by whom the cost center was **Created By** on the Cost Center Dashboard. + +## Edit a Cost Center + +To edit a cost center: + +1. Log in to the [RazorpayX Dashboard](http://x.razorpay.com/auth). +2. Navigate to **Cost Centers** and hover over the cost center you want to edit. + ![Edit Cost Center](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-edit-cost-center.jpg.md) +3. Click on the pencil icon that appears. +4. You can enter **New name** or **New description** and click **Save Changes**. + ![Save Edited Cost Center](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-edit-screen-cc.jpg.md) +5. Review and click **Confirm** and your changes are saved. + +## Deactivate a Cost Center + +You can deactivate a cost center if you do not want to tag any purchase order or invoice to it anymore. To deactivate a cost center: + +1. Log in to the [RazorpayX Dashboard](http://x.razorpay.com/auth). +2. Navigate to **Cost Centers** and hover over the cost center you want to deactivate. + ![Deactivate Cost Center](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-deactivate-cost-center.jpg.md) +3. Click on the trash bin icon that appears. +4. Click **Deactivate** to confirm your action. + ![Confirm Deactivated Cost Center](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-deactivate-screen-cc.jpg.md) +5. Review and click **Got it**. Your cost center is deactivated. + +The cost center continues to appear on the list as deactivated. This action cannot be reversed. + +## Related Information + +- [Purchase Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/purchase-order.md) +- [Invoices Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices/approval-workflow.md) diff --git a/llm-content/x/dashboard.md b/llm-content/x/dashboard.md new file mode 100644 index 00000000..7d516a16 --- /dev/null +++ b/llm-content/x/dashboard.md @@ -0,0 +1,85 @@ +--- +title: About RazorpayX Dashboard +description: Switch Merchants, generate Reports, update Account Settings with the RazorpayX Dashboard. +--- + +# About RazorpayX Dashboard + +RazorpayX Dashboard is an easy to use and interactive page. It offers [Global Search](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/keyboard-shortcuts.md#global-search) and announcements for easy discoverability of new and existing features. + +![RazorpayX Dashboard Global Search and profile](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xdashboard.jpg.md) + +## Profile + +This is where you find your Merchant ID (MiD) or Business ID and other necessary tabs: + +- [Switch Merchant](#switch-merchant) +- [My Account & Settings](#my-account-settings) +- [Technical Documentation](#technical-documentation) +- [Announcements](#announcements) +- [Keyboard Shortcuts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/keyboard-shortcuts.md#keyboard-shortcuts) +- [Go to Razorpay Dashboard](#razorpay-dashboard) +- [Enable Test Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md) +- [Light Theme](#light-theme) +- [Cashflow Insights](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/cashflow-insights.md) + +![RazorpayX Dashboard Profile](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/xdashboardDark.jpg.md) + +### Switch Merchant + +To switch you merchant profile: + +1. Go to Profile. +2. Click **Switch Merchant**. +3. Select the Merchant you want to switch to and wait for the page to refresh. + +### My Account & Settings + +Tab | Actions +--- +User Profile | - To find and edit details like your username, password, phone number. +- To disable or enable 2 FA. + +--- +Business Profile | - To find business details like KYC status, business name and ID, website, tax details etc. +- To set expiry for Payout Links. + +--- +Public Profile | To customise Payout Links display screen with a colour or logo of your choice and support details. +--- +Banking | To find all your affiliated bank account details. +--- +[Manage Team](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams.md) | - To enable 2FA for the team. +- To add and assign roles to the team members. + +--- +Developer Controls | To [generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md) and edit webhooks. +--- +[Support Tickets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) Inbox | To raise queries in case of trouble and follow up on the existing ones. +--- +Integrations | To [integrate with accounting tools](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting.md) for easier reconciliation. +--- + +### Technical Documentation + +You can access the documentation related to all RazorpayX products and APIs here. + +### Announcements + +You can view all the latest announcements with respect to RazorpayX products and features here. + +### Razorpay Dashboard + +You can directly access your Razorpay Dashboard via Profile. Click **Go to Razorpay Dashboard** and you will be redirected to your Dashboard. + +### Light Theme + +You can switch your Dashboard to Light Theme using the Light Theme toggle. + +![RazorpayX Dashboard Light Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/lightmode.jpg.md) + +### Related Information + +- [Sign up](https://x.razorpay.com/auth/signup) for a RazorpayX account. +- [Open a Current Account](https://razorpay.com/x/current-accounts/) +- [Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/reports.md) diff --git a/llm-content/x/dashboard/allowlist-ip.md b/llm-content/x/dashboard/allowlist-ip.md new file mode 100644 index 00000000..2e7c88ef --- /dev/null +++ b/llm-content/x/dashboard/allowlist-ip.md @@ -0,0 +1,53 @@ +--- +title: Allowlist IPs for Payout APIs +heading: Allowlist IPs +description: Allowlist (also known as Whitelist) the IPs that you use to make payout requests or fund account validation requests. +--- + +# Allowlist IPs + +To protect your API payouts from malicious attacks, it is mandatory to allowlist the IPs that you use for all payout related API requests (such as create contact, fund account, payout, fund account validation, payout links and so on). If an API request is received from an IP outside the allowlist, the request will fail. + +> **WARN** +> +> +> **Watch Out!** +> +> - IP Allowlisting is applicable only in Live Mode. +> - Only the Owner or Admin of the account can allowlist IPs. +> + +Watch the video to see how to allowlist your IPs or read along. + +[Video: https://www.youtube.com/embed/1l1HGjGFFT8] + +To allowlist your IPs in Live mode: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Click on the profile icon and select **My Account & Settings**. +3. Navigate to **Developer Controls** and click **Share IP Addresses**. +4. Enter up to 20 IPs that you use for API requests. Press the Enter key after typing each IP. +5. Click **Save**. +6. Enter the OTP received on your registered phone number and email ID. +7. Click **Submit**. + +Your IPs are allowlisted. You can use these IPs for API requests. The list of your allowlisted IPs is visible in this section. You can also edit the IPs from the same section. + +![Edit Allowlisted IPs List](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ip-allowlisting-edit-list.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> - Currently, IP Allowlisting is only applicable for Payouts APIs (including Contacts and Fund Accounts), Payout Link APIs and Fund Account Validation requests. It is not applicable for Vendor payments, Payroll and Dashboard payouts. +> - If you wish to allowlist your IPs for making API Payouts but the option is not visible on your dashboard, [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#razorpayx-users). +> - If you are using dynamic IPs for API payouts and Fund Account Validations, [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#razorpayx-users). +> - If you are using PG APIs and want to allowlist your PG calls, [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/dashboard/support.md#registered-razorpay-users). +> + +### Related Information + +- [Payout APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts.md) +- [Payout Links API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/api.md) +- [Payouts Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/best-practices.md) diff --git a/llm-content/x/dashboard/api-keys.md b/llm-content/x/dashboard/api-keys.md new file mode 100644 index 00000000..2823ff67 --- /dev/null +++ b/llm-content/x/dashboard/api-keys.md @@ -0,0 +1,92 @@ +--- +title: Generate API Keys from RazorpayX Dashboard +heading: Generate API Keys +description: Know how new and existing merchants can generate Test Mode and Live Mode API keys from the RazorpayX Dashboard. +--- + +# Generate API Keys + +After you [set up your RazorpayX account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/set-up.md), you can generate API keys in both Test mode and Live mode. + +> **WARN** +> +> +> **Watch Out!** +> - If you have newly signed up for RazorpayX, you must generate a new set of API keys. +> - If you are an existing Razorpay user, use your existing API key to fire Payout APIs. Do not regenerate your API Keys. +> - API Keys generated in the Live mode will not work in test mode and vice versa. +> - After generating the keys from the Dashboard, **DOWNLOAD KEY DETAILS** and save them securely. The Key secret is not visible on the Dashboard due to security reasons. If you have misplaced the key details, **regenerate** the keys and replace them wherever required. +> + +## Generate API Keys + +To generate API keys: +1. Log in to your [RazorpayX Account](https://x.razorpay.com/). +2. Navigate to the user icon in the top-right corner of the screen and click `My Profile' → **My Accounts & Settings**. +3. Navigate to **Developer Controls** and click **Generate Key**. + +> **INFO** +> +> +> **Handy Tips** +> +> When generating API keys in Live mode, you must enter the OTP sent to you. This is to authroize the new user generating a new set of keys. + +> The same is **not applicable** for Test Mode. +> + +4. Download the keys when the pop-up appears. + + +### Test Mode API Keys + + Watch this video to see how to generate API keys in the test mode. + + +[Video: https://www.youtube.com/embed/PS06fCIqRKI] + + + + +### Live Mode API Keys + + +> **WARN** +> +> +> **Watch Out!** +> +> You must activate your account to make live payouts. To activate your account, provide the following KYC information from your Dashboard: +> - Contact Info +> - Business Details +> - Your Bank Account Information +> - Business Documents such as ID proof, Business Registration proof and Company PAN. +> + + + +### Postman Collection + +We have a Postman collection to make the integration quicker and easier. Click the **Run in Postman** button below to get started. + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/razorpaydev/workspace/razorpay-public-workspace/folder/12492020-fcd32a4a-0c53-41a7-a879-d771de7e2804) + +## Regenerate API Keys + +You can regenerate API keys from the Dashboard. + +To regenerate keys: +1. Log in to your [RazorpayX Account](https://x.razorpay.com/). +2. Navigate to the user icon in the top-right corner of the screen and click `My Profile' → **My Accounts & Settings**. +3. Navigate to **Developer Controls** and click **REGENERATE KEY**. + +This allows you to deactivate the old key immediately or within 24 hours. + +### Next Steps + +- [Allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) + +### Related Information + +- [About RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) +- [Payout APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/apis.md) diff --git a/llm-content/x/dashboard/cashflow-insights.md b/llm-content/x/dashboard/cashflow-insights.md new file mode 100644 index 00000000..0d0f68ad --- /dev/null +++ b/llm-content/x/dashboard/cashflow-insights.md @@ -0,0 +1,45 @@ +--- +title: RazorpayX Cashflow Insights +heading: Cashflow Insights +description: View cashflow summary of your account(s) on the dashboard through Cashflow Insights. +--- + +# Cashflow Insights + +Cashflow Insights offers you a comprehensive view of the cashflow occurred during a particular period. + +> **WARN** +> +> +> **Watch Out!** +> +> **Cashflow Insights** is currently available only upon request. Contact [Razorpay Support](https://razorpay.com/support/) to get this feature enabled on your Dashboard. +> +> + +## Cashflow Insights + +Cashflow Insights provide a summary of the total cash inflow and outflow in your account during the past 7/15/30/90 days. You can see the cashflow of all the accounts registered with RazorpayX. + +### View Cashflow Insights +1. Log in to the RazorpayX Dashboard. +2. Click **Insights** on the left navigation to go to the Insights home page. + ![Cashflow Insights](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cashflowhomepage.jpg.md) +3. Under **Overview**, you can see the total Payouts volume, number of Payouts, Inflow volume and number of Inflows of all your accounts put together in the past 30 days (default period). + - You can also view the total account balance towards the right side of **Overview**. +4. To view the cashflow details of individual accounts, select the account of your choice from the **Select Account** dropdown list. You can choose so to see the cashflow of the past 7/15/90 days also, by selecting the required duration from the dropdown next to the **Select Account** dropdown list. + ![Cashflow Individual Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/cashflow2.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> Payouts Insights is currently not available on the Dashboard. The images shown are for illustration purposes only. +> + +### Related Information + +- [About RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) +- [Sign up for a RazorpayX account](https://x.razorpay.com/auth/signup) +- [Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/dashboard/faqs.md b/llm-content/x/dashboard/faqs.md new file mode 100644 index 00000000..bdd7ffbc --- /dev/null +++ b/llm-content/x/dashboard/faqs.md @@ -0,0 +1,110 @@ +--- +title: RazorpayX Dashboard | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about the RazorpayX Dashboard. +--- + +# Frequently Asked Questions (FAQs) + +## General + + +### 1. Can I use RazorpayX as a freelancer/individual? + + Unfortunately, we do not support freelancers/individuals on [RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) at the moment. + + + +### 2. What reports are available on RazorpayX platform? + + Downloadable reports are available in every section of the Dashboard. Currently only `.csv` and `.xls` based reports are available. Know more about [Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/reports.md). + + + +### 3. How to generate Account Statement report? + + Navigate to Account Statement on the RazorpayX Dashboard to generate the report. Know more about [Account Statement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-statement.md). + + + +### 4. Is there a monthly invoice available for the charges deducted? + + Yes, we provide monthly invoices. You can download the invoice from the Billing section of your Dashboard. Know more about [Billing reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/billing.md#billing-reports). + + + +### 5. What are Actionable Insights? + + [RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) Insights help businesses analyse and manage their expenses better and empower them to take more informed and impactful business decisions. + + + +### 6. If an account has access to both Razorpay and RazorpayX platforms, is there a combined transactions report for both platforms? + + No, [Razorpay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments.md) and [RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) are different platforms. Transactions created on Razorpay will not show up on RazorpayX platform and vice versa, neither on dashboard nor reports. + + + +### 7. When I download reports from RazorpayX, the account numbers seem incorrect. What should I do? + + In some cases, Google Sheets/Microsoft Excel/other similar applications delete the zeros from account numbers or round off contact numbers. To avoid this, ensure your numbers are not scientifically formatted. + + For example, in Google Sheets, you can unselect the **Convert text to numbers, dates and formulas** checkbox, as shown. + ![Uncheck the checkbox on Google Sheets to retain original formatting](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/retain-report-formatting.gif.md) + + + + +### 8. How do I contact the support team if my issue is not resolved? + + You can visit our [support page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) to reach out to our support team. + + + + + +## Two-Factor Authentication + + +### 1. What to do if a user account is locked? + + For security reasons, a user account gets locked when the user enters the wrong OTP 9 times. In such scenarios, the user should contact their respective account owner. The account owner can unlock the users' accounts. + + + +### 2. What to do if a user loses the mobile device? + + If a user loses the mobile device, the user should reach out to the respective account owner. The account owner can **Reset 2FA** for the user. The next time the user logs into the Dashboard, they user will be asked to enter the mobile number. Hover over the respective team member's name under manage team to find the Reset 2FA option. + ![Rest 2FA for your team member](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/reset-2fa-for-team-member.jpg.md) + + + +### 3. What to do if the account owner is locked? + + If user account gets locked for security reasons, contact our [Support Team](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) to **Reset 2FA** for your account. + + + +### 4. What to do if the account owner loses the mobile device? + + If an account owner has lost their mobile device, contact our [Support Team](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) to **Reset 2FA** for your account. + + +## Manage Teams + + +### 1. Can a new or existing team member on Razorpay be invited to RazorpayX? + + Yes, you can invite a new or existing user from your team on Razorpay. Once the invite is sent, if the invited member is already on your Razorpay team, they can log in to RazorpayX platform with their current login credentials. However, if the invited member is new, they will have to set up new login credentials by clicking on the confirmation link sent via email. + + + +### 2. Can different roles be assigned to my team members on RazorpayX? + + Yes, you can assign different set of roles to a team member as per your requirement to [manage your team](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams.md). + + + +### 3. Will the existing team members have access to RazorpayX? + + Only the Owner will have access to RazorpayX account. However, you can add members and assign roles just as Razorpay PG. diff --git a/llm-content/x/dashboard/global-search.md b/llm-content/x/dashboard/global-search.md new file mode 100644 index 00000000..70362dea --- /dev/null +++ b/llm-content/x/dashboard/global-search.md @@ -0,0 +1,54 @@ +--- +title: Global Search on RazorpayX +heading: Global Search +description: Use global search for easier navigation across the RazorpayX Dashboard. +--- + +# Global Search + +Global search on the RazorpayX Dashboard makes finding the most used actions effortless. You find **all the information** related to your search query in one place. + +## How it Works + +When you search using the search bar in RazorpayX Dashboard, global search shows you every value that matches your search query. **Every** value, from everywhere in your RazorpayX Dashboard. + +Searching for the value 'kiran' shows every entity matching 'kiran' from all over the Dashboard. 'kiran' from Payouts, from Vendor Payments, a Contact, or any other entity,as shown below. + +![RazorpayX Global Search](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-global-search.gif.md) + +Similarily, every action search will return actions available across all RazorpayX products. + +With this feature, you can: + +Use Case | Examples +--- +Access data| - transactions +- contacts +- invoices + +--- +Navigate Dashboard | - Settings +- Documentation +- Cards controls +- FAQs + +--- +Initiate actions | - Payout creation +- Contact creation + +--- +Filter results | - name +- phone +- invoice no. +- UTR +- status + +--- + +Find the global search bar on the top right corner or use "/" on your keyboard. You can make effective use of custom search suggestions curated for you based on your usage. + +### Related Information + +- [Keyboard Shortcuts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/keyboard-shortcuts.md) +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md) +- [Test Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md) diff --git a/llm-content/x/dashboard/keyboard-shortcuts.md b/llm-content/x/dashboard/keyboard-shortcuts.md new file mode 100644 index 00000000..670ff0e5 --- /dev/null +++ b/llm-content/x/dashboard/keyboard-shortcuts.md @@ -0,0 +1,56 @@ +--- +title: Keyboard Shortcuts on RazorpayX Dashboard +heading: Keyboard Shortcuts +description: Use keyboard shortcuts for quick access across the RazorpayX Dashboard. +--- + +# Keyboard Shortcuts + +RazorpayX offers Keyboard Shortcuts for tasks that are frequently performed by pro users. Basic actions such as viewing payouts or launching the payout modal can be performed directly from any screen without having to navigate multiple times. + +Following is the list of keyboard shortcuts that you can use to quickly perform a few actions on the RazorpayX Dashboard: + +> **INFO** +> +> +> +> **Handy Tips** +> +> ⌘ is applicable for MacBook users. Windows users can use the `Ctrl` key instead of ⌘. +> + +Keyboard Shortcut | Action +--- +/ + ⌘ + K (Mac Users) + Ctrl + K (Windows Users) | Trigger Global search +--- +C | Open Create Contact modal +--- +P | Open Create Payout modal +--- +L | Open Create Payout Link modal +--- +⌘ + / (Mac Users) + Ctrl + K (Windows Users) | Keyboard shortcuts list view +--- +Shift + H | View Home +--- +Shift + P | View Payouts +--- +Shift + A | View Account Statement +--- +Shift + C | View Contacts +--- +Shift + V | View Vendor Payments +--- +Shift + T | View Tax Payments +--- +Shift + L | View Payout Links +--- + +### Related Information + +- [Global Search](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/global-search.md) +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md) +- [Test Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md) diff --git a/llm-content/x/dashboard/test-mode.md b/llm-content/x/dashboard/test-mode.md new file mode 100644 index 00000000..89b5b2c1 --- /dev/null +++ b/llm-content/x/dashboard/test-mode.md @@ -0,0 +1,149 @@ +--- +title: RazorpayX Test Mode +heading: Test Mode +description: Use test mode to test your integration, add funds, view fund details and execute a list of APIs. +--- + +# Test Mode + +RazorpayX test mode is a replica of RazorpayX in a sandbox environment that allows you to test your integration before you switch to Live Mode. + +You can perform the following actions to get started with RazorpayX Test Mode. +- [Switch to test mode](#switch-to-test-mode) +- [Generate API Keys in test mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md#test-mode). +- [Add funds in the test mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md#add-funds). +- [Payout Actions that can be performed in the Test Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md#actions). + +You can test the following using the Test Mode: + +Feature | API | Dashboard | Bulk Upload +--- +[Contacts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md#contacts) | ✓ | ✓ | ✓ +--- +[Fund accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md#fund-accounts) | ✓ | ✓ | ✓ +--- +[Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md#payouts) | ✓ | ✓ | ✓ +--- +[Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md#webhooks) | ✓ | ✓ | ✓ + +> **INFO** +> +> +> **Handy Tips** +> +> - Actions taken in the test mode have no consequences in your live environment. +> - Contacts, Fund accounts and Payouts created in the Test Mode do not appear in the live environment. +> - You can create Contacts and Fund accounts using real-world or dummy data. +> - Test Mode has its own dummy balance. **No real money is used in the Test Mode**. +> For example, a Contact created in the test mode does not carry over to the live mode and vice versa. Payouts made to a Fund account in the Test Mode uses funds from the test account balance, which is not real money. +> + +## Switch to Test Mode +Click on the user profile icon to switch to test mode. + +![Enable Test Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rzpx-switch-to-test-mode.jpg.md) + +### Add Funds + +Just like in the live environment, you must add funds in the test mode before you can make payouts. Test mode uses its own dummy balance. You can type in any random amount as dummy balance. **No real money is used in the test mode.** + +To add funds to your test mode, click **+ Add test balance** and follow the on-screen instructions. + +![Add Test Balance from the RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-test-balance.gif.md) + +> **INFO** +> +> +> **Handy Tips** +> +> The account details in the test mode are dummy details. Do not load real money to this account. +> + +### Contacts + +To make a payout, you need to create a Contact. +The table below lists the various Contact actions you can perform in the test mode: + +Action | API | Dashboard | Bulk Upload +--- +Create a contact | ✓ | ✓ | ✓ +--- +Update a contact | ✓ | ✓ | x +--- +View contact details | ✓ | ✓ | x +--- +Mark as inactive | ✓ | ✓ | x + +You can [create Contacts using APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/create.md) and [create Contacts in bulk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts.md#create-bulk-payout). + +### Fund Accounts + +After you create a Contact, you need to create a Fund account for the Contact. You can create Fund accounts in test mode by using contacts created in test mode only. Payouts are made to the Fund account linked to the Contact. + +The table below lists the various Fund account actions you can perform in the test mode. + +Action | API | Dashboard | Bulk Upload +--- +Create a fund account | ✓ | ✓ | ✓ +--- +View fund account details | ✓ | ✓ | ✓ +--- +Mark as inactive | ✓ | ✓ | x + +You can create Fund accounts using APIs with either [bank account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts/create/bank-account.md) details or [VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts/create/vpa.md) and +[create contacts in bulk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts/bulk-uploads.md). + +### Payouts + +Payouts are transactions you can make to the fund accounts of your contacts. You can test payouts in the Test Mode, view its life cycle, its states and other details. + +> **WARN** +> +> +> **Watch Out!** +> +> The [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) is not available in the test mode. This means the `pending` and `rejected` states are not available in the test mode. +> + +#### Actions + +The table below lists the various payout actions you can perform in the test mode. + +Action | API | Dashboard | Bulk Upload +--- +Create a payout | ✓ | ✓ | ✓ +--- +View payout details | ✓ | ✓ | x + +You can [create contacts using APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts.md) and [create contacts in bulk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts/bulk-uploads.md). + +### Move a Payout to Next State + +By default, Payouts created in the Test Mode acquire the `processing` state. However, if you do not have sufficient balance, the payout acquires the `queued` state. In this case, [add funds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md#add-funds) to move the payout to the `processing` state. + +From the `processing` state, you will have to manually move the payout to the next state from the Dashboard. You can move it forward to any state in the payout lifecycle. Unlike the Live Mode, this does not happen automatically. + +![Manually move a payout to the next state in test mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/change-payout-status.gif.md) + +### Account Statements + +The Test Mode has its own account statement based on transactions made in the Test Mode. You can view the account statement on the RazorpayX Dashboard or fetch details using the [Transaction APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/transactions.md). + +## Webhooks + +Know about [webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md), how to [set up and also edit them](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md). + +The following webhook events are available in the test mode: +- `payout.queued` +- `payout.initiated` +- `payout.processed` +- `payout.reversed` +- `transaction.created` + +Find a more detailed list of [sample payloads available in RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). + +### Related Information + +- [About RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) +- [Set up your RazorpayX account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/set-up.md) +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md) diff --git a/llm-content/x/fund-account-validation.md b/llm-content/x/fund-account-validation.md new file mode 100644 index 00000000..734daff9 --- /dev/null +++ b/llm-content/x/fund-account-validation.md @@ -0,0 +1,104 @@ +--- +title: RazorpayX Fund Account Validation +heading: Fund Account Validation +description: Validate your customer's fund account to ensure it is the right account number. +--- + +# Fund Account Validation + +It is important to validate your customer's fund account to ensure it is the account number where the user wants to receive the amount. Fund account validation is possible only for RazorpayX Lite. + +Know more about [Account Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation.md). + +> **WARN** +> +> +> +> **Watch Out!** +> +> - If your user provides an account number by mistake which is not where the user wants the amount, the payout gets processed if the account number exists. Hence, we recommend you to validate the Fund accounts before making a payout. + +> - Fund Account Validation is possible only for RazorpayX Lite. + +> - Fund accounts once created can not be deleted. + +> + +## Workflow + +Below is a high-level diagrammatic overview of how to validate a contact's fund account in RazorpayX. + +![Fund Account Validation Transaction Workflow. To do so, refer to the steps below.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-RZPX-account-validation-flow.jpg.md) + +The process to validate a fund account is similar to making a regular payout. + +1. Create a contact. +1. Create a fund account using the bank account details or VPA you want to validate. +1. Create an account validation transaction to validate the account. + +## Account Validation States + +Here is an illustration of life cycle of a fund account validation transaction. + +![](/docs/assets/images/RZPX-fav.jpg) + +### Created + +This state is assigned to an account validation transaction after Razorpay receives the API request. At this stage, we are awaiting a response from the beneficiary's bank. The account details have not been validated. We do not recommend making payouts to the account while the account validation transaction is still in this status. + +### Completed + +This state indicates that the account validation transaction was completed. + +> **WARN** +> +> +> +> **Watch Out!** +> +> The `completed` status does not mean the bank account or VPA is valid. It just means the account validation transaction was completed and results are available to you via the API response and webhooks payloads. + Based on the response, you can decide if you should make a payout to the account. +> + +### Failed + +This state indicates that the account validation transaction has failed due to a technical error or if IMPS is disabled by the beneficiary bank. + +## Validation Conditions + + +### Validate a Bank Account + + You can only validate the following information for a contact's bank account: + + - **Bank Account Number**: When the status of the transaction changes to `completed`, the bank passes on the bank account status in the API response. If the account is active, you can transfer funds to the account. + + - **Beneficiary Validation**: When the status of the transaction changes to `completed`, the bank passes on the name linked to the account in the API response. By comparing the name sent by the bank to the name provided by the customer, you can successfully validate if the account belongs to the same customer. + + - **Amount Validation**: If you want to perform an amount validation, transfer a random amount ranging between ₹1 and ₹2, for example, ₹1.27. Ask your contact to enter the amount received on your website. This acts as an additional check to validate that the customer has access to the account. + + + + +### Validate a VPA + + +> **WARN** +> +> +> **Watch Out!** +> +> It is not possible to perform an amount validation for your contact's VPA. +> + + You can only validate the following information for a contact's VPA: + + - **Address Validation (VPA)**: When the status of the transaction changes to `completed`, the bank passes on the status of the VPA in the API response. If the VPA is active, you can transfer funds to the VPA. + + - **Beneficiary Validation**: When the status of the transaction changes to `completed`, the bank passes on the name linked to the VPA in the API response. By comparing the name sent by the bank to the name provided by the customer, you can successfully validate if the account belongs to the same customer. + + +### Related Information + +- [Fund Account Validation FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts/faqs.md#fund-account-validation) +- [Fund Account Validation APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-account-validation/api.md) diff --git a/llm-content/x/fund-account-validation/api.md b/llm-content/x/fund-account-validation/api.md new file mode 100644 index 00000000..2ec78b17 --- /dev/null +++ b/llm-content/x/fund-account-validation/api.md @@ -0,0 +1,70 @@ +--- +title: RazorpayX | Account Validation APIs +heading: Account Validation APIs +description: List of RazorpayX Account Validation APIs available to perform various actions. +--- + +# Account Validation APIs + +To make a [payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) to a Contact, you must: +1. Create a Contact. +1. Add a Fund account to the Contact. +1. Validate the Contact's Fund account. +1. Make payouts. + +You can validate your Contact's Fund account/s using the following Validation APIs. + +> **WARN** +> +> +> **Watch Out!** +> +> You must [allowlist your IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) to use the Account Validation APIs. +> + +## Account Validation APIs + +Account Validation APIs validate previously created Contact's Fund accounts. You can create a Contact and Fund Account from the [RazorpayX Dashboard](https://x.razorpay.com/auth) or using the APIs. + +The table below lists the various endpoints and gives a brief description of each: + +API Endpoint | Description +--- +[Create a Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation/create-contact.md) | Creates a Contact. +--- +[Create Fund account (Bank account)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation/bank-account/create-fund-account.md) | Creates a [Fund account of the type bank account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md#fund-account-types). +--- +[Validate a Bank Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation/bank-account.md) | Validates the Contact's bank account information. +--- +[Create Fund account (VPA)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation/vpa/create-fund-account.md) | Creates a [Fund account of the type VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md#fund-account-types). +--- +[Validate a VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation/vpa.md) | Validate the Contact's Virtual Payment Address (VPA)/UPI account information. +--- +[Validate VPA using Reverse Penny Drop](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation/reverse-penny-drop.md) | Validate a bank account using Reverse Penny Drop +--- +[Fetch all Account Validation Transactions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation/fetch-all-transactions.md) | Retrieves all account validation transactions. +--- +[Fetch an Account Validation Transaction with ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation/fetch-transactions-with-id.md) | Retrieves a single account validation transaction with ID. +--- + +## Composite Account Validation APIs + +With Composite Account Validation, you can use a single API to perform all the actions at once, including account validation. This is useful to create new Contacts and Fund accounts immediately. You can create a Contact and Fund Account from the [RazorpayX Dashboard](https://x.razorpay.com/auth) as well. + +The table below lists the various endpoints and gives a brief description of each: + +API Endpoint | Description +--- +[Validate a Bank Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/composite-account-validation/bank-account.md) | Create Contact, Fund Account with bank details and Validate the Contact's bank account information in a single API call. +--- +[Validate a VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/composite-account-validation/vpa.md) | Create Contact, Fund Account with VPA and Validate the Contact's bank account information in a single API call. +--- +[Fetch all Account Validation Transactions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/composite-account-validation/fetch-all-transactions.md) | Retrieves all account validation transactions. +--- +[Fetch an Account Validation Transaction with ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/composite-account-validation/fetch-transactions-with-id.md) | Retrieves a single account validation transaction with ID. +--- + +### Related Information + +- [Fund Account Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-account-validation.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/apis/subscribe.md) diff --git a/llm-content/x/fund-accounts.md b/llm-content/x/fund-accounts.md new file mode 100644 index 00000000..33998138 --- /dev/null +++ b/llm-content/x/fund-accounts.md @@ -0,0 +1,76 @@ +--- +title: Fund Accounts on RazorpayX +heading: About Fund Accounts +description: Create, Update and View Fund Accounts on the RazorpayX Dashboard. +--- + +# About Fund Accounts + +Fund accounts are accounts associated with a [Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md) (similar to a *beneficiary* in your netbanking portal). +- To make a payout to a Contact, you must add a Fund Account to the Contact. +- There is no limitation to the number of Fund accounts a Contact can have. + +## Fund Account Types + +Fund accounts are associated with a Contact. Payouts are made to the Fund accounts. There are three types of fund accounts: + +- **Bank account**: Make payouts to a beneficiary's bank account via bank transfer using one of the available such as NEFT or IMPS. +- **UPI ID (VPA)**: Make payouts to a beneficiary's UPI ID via a UPI transfer. +- **Cards**: Know more about [Payouts to Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards.md). + - **Credit Card**: Make payouts directly to a beneficiary's credit card by bank transfer using NEFT or IMPS. + - **Debit Card or Prepaid Card**: Make payouts directly to a beneficiary's debit card or prepaid card using the 'card' mode. +- **Wallet**: Make payouts to your beneficiary's wallet. You can make payouts to a beneficiary via an Amazon Pay gift card. Know more about [Payouts to Amazon Pay Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-wallet.md). + +Know about the [payout modes available for each Fund account type](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#payout-modes-and-tat) and the [ list of banks/cards supported](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/cards.md#banks). + +## Fund Account Actions + +The following table lists down the actions that can be performed on Fund accounts using APIs, Dashboard and Bulk Upload: + +Action | API | Dashboard | Bulk Upload +--- +Create a fund account | ✓ | ✓ | ✓ +--- +View fund account details | ✓ | ✓ | ✓ +--- +Mark as inactive | ✓ | ✓ | x + +You can create Fund accounts using APIs either with [bank account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts/create/bank-account.md) details or [VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts/create/vpa.md), or [create contacts in bulk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts/bulk-uploads.md). + +## Dashboard Actions + +After logging in to your RazorpayX account, you can start creating a contact and its associated fund account. Refer below for steps on how to create a contact with a fund account, and how to update it. + +### Create a Contact with Fund Account + +To create a Contact with Fund Account from the Dashboard: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **Contacts**. +3. Click **+ CONTACT**. +4. Fill Contact details and click **NEXT**. +5. Add Fund Account details. +6. Click **SAVE AND CLOSE**. + +### Add New Fund Account + +To add a new Fund Account to an existing Contact from the Dashboard: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **Contacts**. +3. Select the Contact you want to edit. +4. Click **ADD FUND ACCOUNT**. +5. Add the Fund Account details. +6. Click **SAVE AND CLOSE**. + +You can also [create and update Fund Account using APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts.md#list-of-endpoints). + +### Next Steps + +- [Fund Account Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-account-validation.md) + +### Related Information + +- [Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) +- [Contacts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md) +- [Fund Account APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts/api.md) diff --git a/llm-content/x/fund-accounts/api.md b/llm-content/x/fund-accounts/api.md new file mode 100644 index 00000000..439b6574 --- /dev/null +++ b/llm-content/x/fund-accounts/api.md @@ -0,0 +1,31 @@ +--- +title: RazorpayX Fund Account APIs +heading: Fund Account APIs +description: List of RazorpayX Fund Account APIs available to perform various actions. +--- + +# Fund Account APIs + +A Fund Account is an entity to which payouts are made. To make a payout to a contact, you must add a fund account to the contact. Use our APIs to perform these actions or access them directly from the [RazorpayX Dashboard](https://x.razorpay.com/auth). + +## Fund Account APIs + +The table below lists the various endpoints and gives a brief description of each: + +API Endpoint | Description +--- +[Create a Fund Account using Bank Account details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts/create/bank-account.md) | Creates a new fund account using bank account details. +--- +[Create a Fund Account using VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts/create/vpa.md) | Creates a new fund account using VPA. +--- +[Activate or Deactivate a Fund Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts/activate-or-deactivate.md) | Activates or deactivates an existing fund account. +--- +[Fetch all Fund Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts/fetch-all.md) | Retrieves all the fund accounts. +--- +[Fetch a Fund Account with ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts/fetch-with-id.md) | Retrieves a single fund account with ID. +--- + +### Related Information + +- [Fund Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/apis/subscribe.md) diff --git a/llm-content/x/fund-accounts/faqs.md b/llm-content/x/fund-accounts/faqs.md new file mode 100644 index 00000000..25872d3d --- /dev/null +++ b/llm-content/x/fund-accounts/faqs.md @@ -0,0 +1,130 @@ +--- +title: RazorpayX Fund Accounts | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about RazorpayX Fund Accounts. +--- + +# Frequently Asked Questions (FAQs) + +## Fund Accounts + +### 1. What are Fund Accounts? + +To make a payout to a Contact, you must [create a Fund Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md#create-a-contact-with-fund-account) associated with that Contact. Payouts made to the Contact are credited to that Fund Account. Thus, its necessary to create a Fund Account to start transacting with the contact. + +There are multiple types of Fund Accounts and RazorpayX supports two types of them. +- Bank account +- VPA (Virtual Payment Address) + +They are necessary to process bank transfers of UPI/VPA payments. + +### 2. How do I add bank account for a Contact? + +You can add a bank account for a contact by [creating a Fund Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md#create-a-contact-with-fund-account) for that Contact. + +1. Select the contact to which you want to add bank account details. +1. Specify the bank account number, IFSC, bank name and the contact’s full name (as given in their bank records) while creating a Fund Account of the type bank account. + +### 3. Can I add the same bank account against multiple Contacts? + +Yes. You can add the same bank account against multiple Contacts as per your business needs. + +### 4. Can I add multiple bank accounts or VPA addresses to a Contact? + +Yes. You can add as many bank accounts and VPA addresses against a Contact as you wish. This creates more than one Fund Account for that Contact. + +### 5. What is a VPA and how do I add VPA for a Contact? + +VPA stands for Virtual Payment Address. This is required to make UPI based payouts to a person or an entity. + +You must provide the Contact’s VPA while [creating a Fund Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md#create-a-contact-with-fund-account) of type VPA. + +## Fund Account Validation + +### 1. What is the correct usage of the product? + +The bank account/VPA validation service offered is used to validate if the end user's account exists or not. If it does, we share the registered name of the user in the response. + +There are high chances that users might misuse this feature and make multiple validation requests to receive funds. Hence, we request you to keep a check on the number of requests made by a user. + +### 2. What are the possible ways to do FAV? + +Currently, it can be done via the [Fund Account Validation API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/composite-account-validation.md) only. We do not support validation of Fund Accounts through the Dashboard. + +### 3. Can the Current Account be used for FAV? + +FAV is only supported for RazorpayX Lite and not the Current Account. + +### 4. For VPA validation, does `active` status mean that the underlying bank account is also active? + +Yes. The NPCI confirms the validity of the primary account associated with the contact. + + + +### 5. If a bank account is deactivated, will the VPA handle linked to it also get deactivated? + +The VPA might be active. Since there is no bank account linked to the VPA address, the completed status of a Fund Account Validation Request and the account status will be invalid and the registered name appears as null. + +If this is not the case, please raise [a support query](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#razorpayx-users). + +### 6. What fields are returned after a Fund Account validation? + +Upon successful Fund Account Validation, the following fields are returned: +- Account status. +- Registered name of the bank account. + +### 7. What will be the response in case the customer has linked multiple bank accounts for a single VPA? + +The details of the primary bank account associated with the VPA address are returned. + + + +### 8. Are there any charges levied for Fund Account validation for Bank Account and VPA? + +- Yes, there is a verification charge for every validation. +- In case the validation moves to a failed state, the charges will be reversed to your account. + +For more information on fund account validation charges, please raise [a support query](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#razorpayx-users). + +### 9. What is the time taken for Fund Account Validation to move to a `completed` state? + +Most of the Fund Account Validation status moves to `completed` instantaneously. However, if there are any NPCI or Beneficiary Bank issues, there might be a delay of T+3 bank working days. + +### 10. Is FAV supported in test mode? + +No, it is not supported in [test mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md). + +### 11. Why is the status `created`, while registered_name and account_status fields are null? + +For example, +"status": "created" + +"results": \{ "account_status": null, "registered_name": null \} + +The status of Fund account Validation requests is always `created`. To fetch the latest status, you can either: +- Make a GET call and get the status. +- Subscribe to webhooks and consume the payload for status update. + +Know more about [Fund Account Validation statuses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation.md). + +### 12. How to delete a Fund Account? + +It is not possible to delete a Fund Account after it has been created. + +### 13. My FAV status is complete but registered_name and account_status are null, why? + +If your status is `complete` and the `registered_name` & `account_status` are `null`, it means that the account validation process is completed and the result is that the account is invalid. + +## Reverse Penny Drop + +### 1. Is the ₹1 refunded to the user? + +Yes, the ₹1 payment is automatically refunded to the user in real time once the account validation is complete. There is no manual action required from you or your user. + +### 2. Which bank account does Reverse Penny Drop work on? + +Reverse Penny Drop works with any bank account linked to a UPI id - covering 99% of Indian bank accounts. Users can pay via any UPI app that they use. + +### 3. Is Reverse Penny Drop compliant with the NPCI guidelines? + +Yes, reverse penny drop feature is an NPCI-approved validation methodology. Because the transaction is user-initiated and provides a complete audit trail, it meets all regulatory requirements. diff --git a/llm-content/x/fund-accounts/reverse-penny-drop.md b/llm-content/x/fund-accounts/reverse-penny-drop.md new file mode 100644 index 00000000..cb93b8ba --- /dev/null +++ b/llm-content/x/fund-accounts/reverse-penny-drop.md @@ -0,0 +1,47 @@ +--- +title: Reverse Penny Drop +description: Validate a bank account or VPA (UPI id) and retrieve bank account details instantly. +--- + +# Reverse Penny Drop + +Reverse Penny Drop is a way to verify a bank account or VPA (UPI id). In this method, the end user — the person whose account needs to be verified — makes a ₹1 payment from their UPI app to a Razorpay-designated account. Once Razorpay receives this payment, it automatically pulls the payer's verified account details directly from their bank. This includes their full name, bank account number, IFSC code, account type and VPA. + +**Reverse Penny Drop vs Standard Penny Drop** + +In standard Penny Drop, Razorpay credits ₹1 to the user's account to verify it exists. This method can just verify if the account to which payment is made exists or not. But it can not verify the details of the account holder. Reverse Penny Drop requires the user to actively take an action — pulling the complete bank account details, thus verifying the identity of the account holder as well. + +**When To Use** + +Reverse Penny Drop is ideal for situations where ownership verification matters, such as: + +- KYC onboarding +- Loan disbursement pre-checks +- Beneficiary registration flows + +> **INFO** +> +> +> **Feature Request** +> +> This feature is enabled on demand. Raise a request with our [Support team](https://razorpay.com/support/#request) or your Razorpay point-of-contact to get this feature activated. +> + +## How it Works + +- **Initiate Validation**: User is presented with a ₹1 payment request via QR Code. +- **Make Payment**: The user completes the payment using any UPI app. Works with 99% of Indian bank accounts. +- **Instant Validation**: RazorpayX validates the bank account and returns complete bank details including account number, IFSC, account holder name, account type and bank name. +- **Automatic Refund**: The ₹1 is automatically refunded to the user in real time. No manual intervention needed. + +## Advantages + +- **Zero Fund Leakage**: No deposits to unverified accounts. The ₹1 is always refunded automatically. +- **Real-Time Results**: Validation and refund happen instantly. +- **NPCI Compliant**: User-initiated transactions with complete audit trail meeting all regulatory requirements. + +### Related Information + +- [Fund Account Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-account-validation.md) +- [Reverse Penny Drop FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts/faqs.md#reverse-penny-drop) +- [Fund Account APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts/api.md) diff --git a/llm-content/x/glossary.md b/llm-content/x/glossary.md new file mode 100644 index 00000000..2909df5f --- /dev/null +++ b/llm-content/x/glossary.md @@ -0,0 +1,224 @@ +--- +title: RazorpayX Glossary +heading: Glossary +description: Commonly-used terms in RazorpayX and their definitions. +--- + +# Glossary + +The following tables list all the commonly used terms and their definitions used in RazorpayX: + +## Banking + +Terms | Description +--- +Bank Downtime | **Bank downtime** refers to a period when a particular bank's systems are idle, unresponsive, unavailable or underperforming. +--- +Beneficiary Account | **Beneficiary Account** is the account to which money is credited in a payout/payment. +--- +Beneficial Owner | A **Beneficial Owner** is a person or legal entity with a stake of 25% or more in a legal entity. In a trust, a beneficial owner is a trustee who has control over the assets and decisions of the trust. There can be more than one beneficial owners in an entity. +--- +Beneficiary Bank | A **Beneficiary Bank** is the bank which holds the receiver's account. It is the destination bank where the payment gets credited after a successful transaction +--- +Changelog | **Changelog** is a chronological log of notable changes or feature updates made to a software or a system. +--- +CIF | **Customer Information Form** or CIF is a form used to collect the personal details of a customer before onboarding. +--- +Compliance | **Compliance** is a set of rules and regulations prescribed by the governing body, to be followed with respect to security, processes, operations, marketing and finance. +--- +`.csv` file | **CSV** refers to **Comma-Separated Values**. CSV file format is a plain text format in which values are separated by commas and saved with extension `.csv`. It can be opened in a text editor like Notepad or MS Excel. A `.csv` file consumes less memory than Excel but does not contain formatting, formulae, macros, etc. +--- +Current Account | A **Current Account** is a non-interest-bearing bank account, mainly used to service the needs of businesses. A RazorpayX powered Current account is opened in partnership with RBL/Yes Bank/ICICI bank and offers all standard banking features like cheque book, debit card and account statement. Know about [Current Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/current-account.md). +--- +Dashboard | A **dashboard** is a way of displaying various types of related information for a user in one place in the system. +--- +Disclaimer | A **disclaimer** is a statement that seeks to limit the liability of a person or entity making the statement. A disclaimer relieves a person or an entity from all responsibilities, accountabilities and legal liabilities in case something goes wrong. +--- +Escrow Account | **Escrow Account** is an account where a third party temporarily holds money on behalf of two other parties involved in a transaction. This process ensures that both parties fulfill their obligations before the transfer of funds or assets. +--- +Franking | **Franking** is the process of stamping documents by authorized franking agencies, after the transaction, to confirm that stamp duty has been paid. +--- +Fund Account | **Fund Account** is the account to which you need to send a payment. It is the beneficiary account for payouts. +--- +Idempotency | An application call or operation is said to be **idempotent** if it has the same result, no matter how many times it is applied. This ensures consistency and predictability in scenarios like network issues, request retries, or duplicated requests and protects against accidental duplicate occurances. +--- +IE Code | **IEC** or **IE Code** is a key business identification number issued by the Directorate General of Foreign Trade (DGFT), a part of the Ministry of Commerce and Industry, which is mandatory for export or import in India. +--- +IFSC | **Indian Financial System Code** or IFSC is a unique eleven digit alpha-numeric code issued by the The Reserve Bank of India (RBI) to bank branches. It is used for electronic money transfers between banks and is unique to each branch of the financial institution. +--- +IMPS | **Immediate Payment Service** or IMPS is an instant and 24x7 available money transfer service that is routed through NPCI (National Payments Corporation of India) from the source bank to the beneficiary bank. The maximum amount cap per transaction is ₹2,00,000/-. +--- +Integration | Software integration is the process of combining or connecting one software application with another so that they can function together as a single system. +--- +ISA | **Investment Services Account or ISA** is an account offered by banks and financial institutions to clients to enable a seamless platform for investments in various mutual funds and other financial instruments. +--- +KYC | **Know Your Customer** or KYC is a set of processes that financial institutions use to verify the identity, profile and activity of the customers, and also to ensure legal compliance. +--- +NBFC | **Non-Banking Financial Company** or NBFC is a financial institution that offer various limited banking services like lending, but does not have a banking license. A NBFC is not subject to the banking regulations. +--- +NEFT | **National Electronic Funds Transfer** or NEFT is a form of money transfer routed via RBI by the banks. Transfers from the source bank are sent in batches once in every 30 minutes to the RBI which is then forwarded to the beneficiary bank. +--- +Notarised | **Notarisation** is a legal process in India in which a public notary (a person who is authorized by the central or state government to attest documents) verifies the authenticity of documents and signatures. +--- +NPCI | The **National Payments Corporation of India** or NPCI is an umbrella organization set up with the guidance and support of RBI and Indian Banks Association that manages India's retail payments and settlement systems. The NPCI acts as an intermediary between banks and financial institutions to facilitate the settlement of interbank transactions. +--- +NPO | An NPO is Non-profit Organisation that operates for charitable purposes often including entities like trusts, societies, and Non-profit Companies. An NPO Declaration for a Section 8 Company (under Companies Act, 2013; formerly Section 25 Company under Companies Act, 1956) in India is a formal set of declarations made during the registration and operation of the NPO. It is a key part of the incorporation and compliance process for these entities. +--- +NPO | An NPO is Non-profit Organisation that operates for charitable purposes often including entities like trusts, societies, and Non-profit Companies. An NPO Declaration for a Section 8 Company (under Companies Act, 2013; formerly Section 25 Company under Companies Act, 1956) in India is a formal set of declarations made during the registration and operation of the NPO. It is a key part of the incorporation and compliance process for these entities. +--- +NRI | **Non-resident Indian** or **NRI** is an Indian Citizen who resides outside India for more than 182 days in a financial year. +--- +OCR | **Optical Character Recognition** or OCR is a technology that converts text from images into a machine-readable format. It is used to convert a scanned receipt or document into a text document that you can edit and search. +--- +Partner Bank | **Partner banks** enable fintech companies to offer financial services to their customers by providing the necessary financial infrastructure. Fintech companies combine their cutting edge technology with the financial expertise of partner banks to offer quick and seamless financial management solutions like payment links, bulk payouts, payment modes and many more to their customers. +--- +Payment Gateway | A **Payment Gateway** is a service which facilitates a payment between any two transacting parties by transferring information between them. +--- +POC | **Point of Contact** is the professional or department that can provide information or assist on the particular subject whenever required by the customer. +--- +P2P | **P2P transaction** is one where individuals directly transact business or cooperate in production with each other with little to no intermediation by third parties. +--- +RazorpayX Account | **RazorpayX Account** is a Current Account used for business transactions. Currently, there are two types of accounts: +• RazorpayX Lite + • Current Account +Know more about [RazorpayX Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types.md). +--- +RazorpayX Lite | **RazorpayX Lite** is a digital account created in RazorpayX for businesses to start accepting payments or make payouts within a short span of time. Know more about [RazorpayX Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/razorpayx-lite.md). +--- +RTGS | **Real Time Gross Settlement** or RTGS is also a form of money transfer routed via RBI by the banks. Unlike NEFT, transactions made using this method are settled instantly. It can be used only when the minimum amount to be transferred is ₹2,00,000/- or more. +--- +SaaS | **Software as a Service** or SaaS is application software hosted on the cloud and made available to end users by way of subscription. The user does not have to purchase the software to use it. +--- +Scheduled Commercial Bank | A **Scheduled Commercial Bank (SCB)** is a commercial bank in India that is listed in the Second Schedule of the Reserve Bank of India Act, 1934. Banks must meet certain prescribed criteria to be included in the list. SCBs have several advantages over non-scheduled banks like borrowing funds at low interest rates from The Reserve Bank of India +--- +Scheduled Payout | **Scheduled Payout** is a payout which is set in the system to occur at a future time or date. Money is debited from the source account only at the time of the transaction. +--- +Service Aggregator | A **Service Aggregator** aggregates or combines a number of services sourced from multiple suppliers to have single view across those services. A Service Aggregator ensures that the services and its components function in a cohesive and unified manner. +--- +SLA | **Service Level Agreement** or SLA is a legally binding contract between a service provider and a customer that specifies the level of service to be delivered. +--- +Source Account | **Source Account** is the account from which money is sent or debited for a payout/payment. +--- +Stamping | **Stamping** is the process by which you pay stamp duty to the government, before or at the time of the transaction to legalise the necessary documents pertaining to it. +--- +Transactions | A **transaction** in RazorpayX indicates transfer of money from source account to beneficiary account. +--- +UPI | **Unified Payments Interface** or UPI is another instant and 24x7 available money transfer service that is routed through NPCI for amounts. The maximum amount cap per transaction is ₹1,00,000/-. +--- +UTR | **Unique Transaction Reference** number or UTR number is a unique code that is attached to every financial transaction processed by banks in India. It is used to distinguish one bank transaction from another. +--- +Validated Bank Account | A **Validated Bank Account or VBA** is an account which has been verified for correctness before an online transaction. +--- +VPA | **Virtual Payment Address** or VPA is a unique virual financial address that lets you send and receive money without having to share bank details such as account numbers and IFSC codes. +--- +Widget | A **widget** is an interactive element of a software designed to enhance user experience by providing quick access to commonly used features, real-time updates, or personalized content. +--- +`.xlsx` or `.xls` file | A .`xlsx` or `.xls` file is a Microsoft Excel file which holds information about all the worksheets together in a workbook. It can store data and also do operations on the data using formatting, formulae, macros, etc. Excel files use more memory but can read large data. Files saved in Excel cannot be opened or edited by text editors. +--- + +## Payouts + +Terms | Description +--- +Allowlist | **Allowlist** is a cybersecurity system that permits only an approved list of email addresses, IP addresses, domain names or applications, to access or communicate with the system or network. +--- +API | **Application Protocol Interface** or API is a software intermediary that translates user input into data which helps the system send back the right response. It allows two applications to communicate with each other. +--- +Contact | A **Contact** is an entity to whom payouts are made. [Contacts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#contacts/) have certain identification properties such as name, email id and phone number. To make a payout to a contact, you must add a fund account to the contact. +--- +Fund Account | **Fund Account** is an entity to which payouts can be made. Currently, RazorpayX supports three types of [fund accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#fund-accounts/): +• **Bank Account**: Make payouts to a Contact's bank account via bank transfer using one of the available Payout Modes such as NEFT, UPI or IMPS. + • **Cards** : Make payouts directly to a Contact's card via a bank transfer using one of the available Payout Modes such as NEFT, UPI or IMPS. +• **VPA** (Virtual Payment Address): Make payouts to a Contact's VPA via a UPI transfer. +--- +IP address| An **Internet Protocol** address or IP address is a numerical label that is assigned to a device connected to a computer network which uses the Internet Protocol for communication. +--- +Payload | **Payload** is the data you send to the server when you make an API request. It is the body of your request and response message. +--- +Payout Link | A **Payout Link** is a way to instantly send money to beneficiaries without having to reveal bank account details of both parties. +--- +Tokenisation | **Tokenisation** is a data security process in which unique randomised data strings known as tokens are used in place of account or credit card numbers. Tokenisation ensures that only tokens are exposed or stored during a transaction, in place of the original data, which prevents merchants from storing card or account details of customers. +--- + +## Vendor Payments + +Terms | Description +--- +Amount to Vendor | This is the amount paid to the vendor. That is, the **payout amount**. +For example: + Amount to Vendor = Total Amount - TDS + Amount to Vendor = ₹5,410 - ₹375 + Amount to Vendor = ₹5,035 +--- +Payment Terms | The number of days you have to pay the invoice once issued to you. This can vary from `Immediate` to `x number of days`. +For example, you are issued an invoice on July 01 and the payment terms for this invoice is 15 days. + • This means the invoice has to be paid by July 15. + • If the invoice is not paid by July 15, it is marked as `Overdue` on the Dashboard. +--- +Subtotal | The invoice amount without GST, Cess and any other taxes. +--- +Template | A **template** is a pre-built spreadsheet or workbook that is already formatted, organised, and populated with formulae tailored for a specific purpose. +--- +Total Amount | The invoice amount with GST, Cess and any other taxes. +For example, if your subtotal is ₹5,000, SGST is ₹200, CGST is ₹200 and Cess is ₹10. + **Total Amount** = Subtotal + SGST + CGST + Cess + Total amount = ₹5,000 + ₹200 + ₹200 + ₹10 + Total amount = ₹5,410 +--- + +## Tax Payments + +Terms | Description +--- +CGST & SGST | **Central Goods and Services Tax or CGST** is a tax levied on intrastate supplies of goods/services by the Central Government. **State Goods and Services Tax** or SGST is a tax levied on intrastate supplies of goods/services by the particular State Government where the product sold is consumed. If a seller sells a product to a buyer within the same state then CGST and SGST will apply. Both the State and Central governments share the tax revenue upon a mutually agreed proportion. +--- +ITC | **Input Tax Credit or ITC** refers to the tax paid on purchases for the business which can be claimed as deduction at the time of paying tax on output tax. When you buy goods/services from a GST registered seller/vendor, you pay tax on the purchase (Input Tax). On selling your goods/services, you collect tax from your buyer (Output Tax). Your tax liability is the difference between these two taxes. +--- +GST | **Goods and Services Tax** or GST is an indirect tax to be paid to the Government by any person or company for goods sold or services rendered. Under the GST act, the Central Government will collect CGST, SGST or IGST depending upon whether the transaction is intrastate or interstate. +--- +GSTIN | All businesses that register under GST are allotted a unique 15-digit identification number called the **GSTIN**. +--- +GSTR 2A | **GSTR-2A** is an auto-generated statement that contains the Input Tax Credit (ITC) details of buyers/marchants. It is a dynamic statement and gets updated whenever a taxpayer's sellers/vendors file their GST return of outward supplies. It is generated on a monthly basis. +--- +GSTR-2B | **GSTR-2B** is an auto-generated statement that contains the Input Tax Credit (ITC) details of buyers/marchants. It is a static statement generated on a monthly basis, and does not change as and when the seller/vendor updates GST data. +--- +IGST | **Integrated Goods and Services Tax** or IGST is a tax levied on all interstate supplies of goods/services, or across two or more States/Union Territories. IGST will be applicable on any supply of goods/services in both import and export in India. The tax will be shared between the Central and State governments. +--- +RCM | **Reverse Charge Mechanism or RCM** in GST is a system where the recipient of goods or services is liable to pay the tax instead of the seller/vendor. Normally, the buyer pays for the value of goods/services received plus the GST to seller, who is registered under GST. The seller/vendor pays the GST to the government and files the information. In case of an unregistered seller/vendor, the responsibility of paying the GST lies with the buyer itself. The buyer can claim this as Input Tax Credit and deduct this amount while paying GST. +--- +TDS | **Tax Deducted at Source or TDS** is an income tax component that you need to deduct while making specific payments (vendor payments, salaries, etc). + TDS is calculated on the Invoice Subtotal. That is, the invoice amount without GST, Cess and other taxes. + For example, TDS for a vendor is set to 7.5%. + Subtotal (Amount without GST, Cess and other taxes.) = ₹5,000 + TDS = ₹5,000 x 7.5% + TDS = ₹375 + +Know more about tax payment [here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments.md). +--- + +## Accounting and RazorpayX Integrations + +Terms | Description +--- +Bookkeeping | **Bookkeeping** is an accurate day-to-day record of financial transactions. +--- +ERP | **Enterprise Resource Planning** or ERP is a kind of business management software that helps organisations to manage their day-to-day activities in departments like finance, HR, operations and sales. It provides a centralised database that allows teams within the organisation to share information seamlessly. +--- +Items | **Items** represent the goods a company has for sale or the raw materials needed to create those goods. +--- +MIS | **Management Information Systems** or MIS is a department within an enterprise responsible for controlling the hardware and software systems that the enterprise uses to make business-critical decisions. It uses information technology to manage information within the organisation. +--- +Reconciliation | **Reconciliation** is the process of comparing two sets of records to check that figures are correct and in agreement. It is used extensively in the field of accounting. +--- +SKU | **Stock Keeping Unit** or SKU is a code assigned to items in inventory, used by retailers to keep track of stock levels, pricing, and other product details. +--- +Tally | **Tally** is a popular accounting software used by organisations to track and maintain accounts. +--- +Zoho Books | **Zoho Books** is a financial platform that enables you to create invoices, maintain and reconcile bank accounts, and make tax payments to ensure GST compliance. +--- + +### Related Information + +- [About RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) +- [Test Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md) +- [Contacts and Fund Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md) diff --git a/llm-content/x/icici-current-account/company.md b/llm-content/x/icici-current-account/company.md new file mode 100644 index 00000000..0a1ed3ca --- /dev/null +++ b/llm-content/x/icici-current-account/company.md @@ -0,0 +1,74 @@ +--- +title: Private / Public Limited Company / OPC KYC Documents +heading: Private / Public Limited Company / OPC +description: List of documents required to open a Current Account powered by RazorpayX in partnership with ICICI Bank for a private/public limited company/OPC. +--- + +# Private / Public Limited Company / OPC + +This page has information on the documents required for a **Private/Public Limited** company to open a Current Account using RazorpayX in partnership with ICICI Bank. + +> **INFO** +> +> +> **Handy Tips** +> +> - All declarations should be on company letterhead along with date, sign, and stamp. +> - All declarations must contain rectangular stamp. Round stamp is not acceptable. +> - All KYC documents must be presented in originals to the bank Relationship Manager (RM). +> + +## Documents and Forms Required + +### Entity Documents + +SL. No. | Documents +--- +1 | PAN of Entity +--- +2 | Certificate of Incorporation (CoI) +--- +3 | Articles of Association (AoA) and Memorandum of Association (MoA) +--- +4 | Communication address proof (if different from what is mentioned in CoI). Refer [here ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/icici-current-account/entity-address-proof.md)for list of acceptable entity address proof. + +### KYC Documents + +KYC documents required for: +- All authorized signatory. +- All beneficial owners. +- All senior managing officials. + +Here is a list of documents required from the customer end: + +- Photo +- PAN Card +- ID and Address Proof (Refer the image below for list of acceptable documents) + +![](/docs/assets/images/RZPX-rzpx-id-address-proof-icici.jpg) + +### Declarations + +SL. No. | Documents +--- +1 | Board Resolution +--- +2 | Board Resolution 2 +--- +3 | Covering Letter +--- +4 | List of Directors (in ICICI Format) +--- +5 | List of Shareholding pattern/Beneficial Owners holding pattern for those with more than 25% in the company (in ICICI Format) + +Apart from the above mentioned documents and declarations, the customer has to submit: + +- Account Opening Form +- Account opening cheque from existing Current Account + +[Download all forms and documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x_ca_icici_documents-public-limited2112.zip.md). + +### Related Information + +- [RazorpayX Documentation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) +- [Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/icici-current-account/entity-address-proof.md b/llm-content/x/icici-current-account/entity-address-proof.md new file mode 100644 index 00000000..66e27640 --- /dev/null +++ b/llm-content/x/icici-current-account/entity-address-proof.md @@ -0,0 +1,120 @@ +--- +title: Current Account KYC Documents +heading: Current Account Documents +description: List of documents acceptable as entity address proof to open a Current Account powered by RazorpayX in partnership with ICICI Bank for public/private companies, LLPs and Partnership firms. +--- + +# Current Account Documents + +## Public/Private Companies, LLPs and Partnership firms + +### Entity Proof 1 + +- Any certificate issued for registration/operations/Trade License/business by Local/State/ Central Government/Government Agency/SEBI/IRDA/ICAI/ICSI/ICWAI/Office of Registrar of Newspapers for India in the name of entity/firm. E.g.: Sales Tax, TIN/VAT/TAN etc. +- APMC/Mandi License/Certificate +- Labour License/Certificate +- Professional Tax Registration Certificate +- Trade Mark Registration Certificate +- Liquor License/Registration Certificate +- Drug License +- Registration Certificate issued by Excise & Customs Department. +- License/Certificate to Sell/Stock/Exhibit for Sale or Distribute Insecticide/Pesticide +- Registration Certificate issued under Weight & Measurement Act +- Police Department Permission/License/Certificate +- Regional Transport Office Permit/Registration Certificate +- Consent to Operate document issued by State/Central Pollution Control Board +- Sales Tax Registration Certificate/TIN Certificate/VAT Certificate/Service Tax certificate/TAN certificate/Allotment letter for new firms not older than six months. BSM/BM/CBM/DBM/ RHS to visit communication address and submit report as per Annexure 3 in case details of TIN/VAT/ST etc. could not be verified from official website of issuing authority +- Valid Shops & Establishment Certificate/Trade License. Validity can be extended up to the grace period for renewal as mentioned in such certificate. +- Certificate Issued by SEZ(Special Economic Zone), STP(Software Technology Park), EHTP(Electronic Hardware Technology park), DTA(Domestic Tariff Area) and EPZ (Export Processing Zone) in the name of the entity mentioning the address allotted +- Importer–Exporter Code Certificate along with PAN Card (if PAN is quoted on the IEC Certificate) +- Certificate/License issued by Indian Medical Council +- License issued by Food and Drug Control Authorities +- Letter/certificate issued by Village Administrative officers/ Panchayat Head/Mukhiya/ Village Development Officer/ Block Development Officer for customers in rural/village areas stating the details of existence of the firm (should be on letterhead and not more than 3 month old) to be accepted with BM/BSM/DBM/CBM/RHS site visit report as per Annexure 3 along with bank officials details mentioned on AOF. Certificate should be used as entity proof for entities registered and operating from rural areas only +- Trade License in the name of entity +- Factory Registration Certificate in the name of entity +- SEBI Registration Certificate in the name of the entity +Certificate of enlistment/license/shop allotment letter issued by Municipal Corporation (Kolkata, Ludhiana and others) +- Shops & Establishment Certificate issued by E-Seva Kendra’s (Andhra Pradesh). Receipt issued only by Municipal Corporation of Hyderabad (MCH) to be accepted along with Shops & Establishment Certificate. +- The Shops and Establishment Certificate issued by the Municipal Corporations in West Bengal are valid till March 31 every year. The entities are given time up to July 31st to renew the certificate. On application, the Municipal Corporation starts issuing the certificate from August 1st. Expired certificate (for last financial year) and the latest renewal fee receipt copy duly acknowledged by the MC to be taken. +- Provision trade license issued by Agartala Municipal Council/ Grampanchayat in West Bengal +- Copy of PAN Card in the name of firm (only for Partnership firms, HUF & JV) +- Partnership registration certificate issued by Registrar of Firms. (Only for Partnership firm) +- License issued under Explosive Act in the name of Firm + +### Best Practices + +- Any entity proofs given as KYC documents for opening current account should be signed & stamped by issuing authority/department. +- A step towards online registration, whereby many registering authorities across India have started issuing registration certificate/licenses which are issued online and/or physical copies are not issued to the customer. In such scenarios Online Certificates/Licences will be accepted as entity proofs/address proof of firms. Wherever online certificates/licence are collected as entity/address proof, the customer to provide the copy of downloaded certificate/licence and following process should be followed: + - Certificates/Licences should be authenticated by the customer under firm's/entity rubber stamp/stamp confirming the ownership of the said document. + - The bank official (BSM/BM/DBM/CBM/RHS) will cross verify the details available on the certificate from the website of the issuing authority and will put the declaration on the photocopy that “Copy of License / Registration Certificate is issued online and the details of License/Registration Certificate is verified from website of the issuing authority “instead of putting Original seen and verified stamp. + - Printout of the desktop due diligence conducted by the bank official to be attached with the certificate and the same should be supported by BM/CBM/RHS approval on usage of the online registration certificate as an entity proof. + - Details of the firm available on online issued certificate/license should exactly match with details available on website of the authority. + - Above guidelines in note, point 2 on website due diligence can also be considered for accepting electricity/telephone bills while accepting as second entity proof, the name & address must match with first entity proof. It should be self-attested by the customer and BSM/BM/DBM/CBM/RHS will put the declaration on the photocopy that “Bill copy is issued online and the details on the is verified from website of the issuing authority “instead of putting Original seen and verified stamp This will not be considered as address proof independently. +- The document must be valid at the time of account opening. +- In case of accepting entity proof for proprietorship entity and entity owned by HUF, utility bills & Service/professional tax certificate/Food License confirming Name of Proprietor, Firm’s name and address of Entity can be taken as valid proof of entity for sole proprietorship concerns. Name of the proprietary concern should necessarily match with the second entity proof collected. It has to be backed by the Bank official Visit. + +## Sole Proprietorship + +### Entity proof 1 + +- Any certificate issued for registration/operations/Trade License/business by Local/State/ Central Government/Government Agency/SEBI/IRDA/ICAI/ICSI/ICWAI/Office of Registrar of Newspapers for India in the name of entity/firm. E.g.: Sales Tax, TIN/VAT/TAN etc. +- APMC/Mandi License/Certificate +- Labour License/Certificate +- Professional Tax Registration Certificate +- Trade Mark Registration Certificate +- Liquor License/Registration Certificate +- Drug License +- Registration Certificate issued by Excise & Customs Department. +- License/Certificate to Sell/Stock/Exhibit for Sale or Distribute Insecticide/Pesticide +- Registration Certificate issued under Weight & Measurement Act +- Police Department Permission/License/Certificate +- Regional Transport Office Permit/Registration Certificate +- Consent to Operate document issued by State/Central Pollution Control Board +- Sales Tax Registration Certificate/TIN Certificate/VAT Certificate/Service Tax certificate/TAN certificate/Allotment letter for new firms not older than six months. BSM/BM/CBM/DBM/ RHS to visit communication address and submit report as per Annexure 3 in case details of TIN/VAT/ST etc. could not be verified from official website of issuing authority +- Valid Shops & Establishment Certificate/Trade License. Validity can be extended up to the grace period for renewal as mentioned in such certificate. +- Certificate Issued by SEZ(Special Economic Zone), STP(Software Technology Park), EHTP(Electronic Hardware Technology park), DTA(Domestic Tariff Area) and EPZ (Export Processing Zone) in the name of the entity mentioning the address allotted +- Importer–Exporter Code Certificate along with PAN Card (if PAN is quoted on the IEC Certificate) +- Certificate/License issued by Indian Medical Council +- License issued by Food and Drug Control Authorities +- Letter/certificate issued by Village Administrative officers/ Panchayat Head/Mukhiya/ Village Development Officer/ Block Development Officer for customers in rural/village areas stating the details of existence of the firm (should be on letterhead and not more than 3 month old) to be accepted with BM/BSM/DBM/CBM/RHS site visit report as per Annexure 3 along with bank officials details mentioned on AOF. Certificate should be used as entity proof for entities registered and operating from rural areas only +- Trade License in the name of entity +- Factory Registration Certificate in the name of entity +- SEBI Registration Certificate in the name of the entity +- Certificate of enlistment/license/shop allotment letter issued by Municipal Corporation (Kolkata, Ludhiana and others) +- Shops & Establishment Certificate issued by E-Seva Kendra’s (Andhra Pradesh). Receipt issued only by Municipal Corporation of Hyderabad (MCH) to be accepted along with Shops & Establishment Certificate. +- The Shops and Establishment Certificate issued by the Municipal Corporations in West Bengal are valid till March 31 every year. The entities are given time up to July 31st to renew the certificate. On application, the Municipal Corporation starts issuing the certificate from August 1st. Expired certificate (for last financial year) and the latest renewal fee receipt copy duly acknowledged by the MC to be taken. +- Provision trade license issued by Agartala Municipal Council/ Grampanchayat in West Bengal +- Copy of PAN Card in the name of firm (only for Partnership firms, HUF & JV) +- Partnership registration certificate issued by Registrar of Firms. (Only for Partnership firm) +- License issued under Explosive Act in the name of Firm + +### Entity proof 2 + +Following documents can be accepted as 2nd Entity proof only for sole proprietorship firm: + +- Registration of firm with Employee Provident Fund Organization. +- Any one document from fowling - Latest copy of Electricity Bill, not more than 3 months old OR Latest copy of Telephone Bill from Telecom operator, not more than 3 months old OR True copy of gas connection book in the name of entity along with latest gas receipt not more than 3 months old or Gas bill in case of pipe connection OR Water Tax bill paid to Municipal Body/Corporations, not more than 6 months old along with the Tax receipt should stand in the name of the firm. OR Property Tax bill should not be more than calendar one year old from the bill issuance date along with Tax receipts for property tax paid to Municipal Body / Corporations. The Tax receipt should stand in the name of the firm. +- Complete Sales tax return in the name of the firm duly acknowledged. Note: The portion of the sales tax return showing the name of the firm should be duly acknowledged by the accepting authority +License issued under Explosive Act in the name of Firm +- Registration of firm with Employee State Insurance Corporation. +- Letter or Certificate (should be on letterhead and not more than 3 month old) confirming existence of business issued by Chairman/President/CEO/ Head of the Nagar Panchayat/Parishad, and not by local councilors/corporators to be accepted with BM/BSM/DBM/CBM/RHS site visit report as per Annexure 3 along with bank officials details mentioned on AOF. +- Last available Income/Wealth Tax Assessment order in the name of firm. +- Certificate issued by Municipal Corporation/Local Self Government Bodies confirming address of the firm. +- Certificate of Verification issued under Weight & Measurement Act–This document will not be considered if Registration Certificate issued under the same act has being taken as 1st entity proof document. +- District Industries Center (DIC)/ Small Scale Industries (SSI) Certificate - Acknowledgment Part -II issued by DIC/SSI containing Entrepreneur's Memorandum Number. Duly stamped and signed by issuing authority. + +### Best Practices + +- Any entity proofs given as KYC documents for opening current account should be signed & stamped by issuing authority/department. +- A step towards online registration, whereby many registering authorities across India have started issuing registration certificate/licenses which are issued online and/or physical copies are not issued to the customer. In such scenarios Online Certificates/Licences will be accepted as entity proofs/address proof of firms. Wherever online certificates/licence are collected as entity/address proof, the customer to provide the copy of downloaded certificate/licence and following process should be followed :- + - Certificates/Licences should be authenticated by the customer under firm's/entity rubber stamp/stamp confirming the ownership of the said document. + - The bank official (BSM/BM/DBM/CBM/RHS) will cross verify the details available on the certificate from the website of the issuing authority and will put the declaration on the photocopy that “Copy of License / Registration Certificate is issued online and the details of License/Registration Certificate is verified from website of the issuing authority “instead of putting Original seen and verified stamp. + - Print out of the desktop due diligence conducted by the bank official to be attached with the certificate and the same should be supported by BM/CBM/RHS approval on usage of the online registration certificate as an entity proof. + - Details of the firm available on online issued certificate/license should exactly match with details available on website of the authority. + - Above guidelines in note, point 2 on website due diligence can also be considered for accepting electricity/telephone bills while accepting as second entity proof, the name & address must match with first entity proof. It should be self-attested by the customer and BSM/BM/DBM/CBM/RHS will put the declaration on the photocopy that “Bill copy is issued online and the details on the is verified from website of the issuing authority “instead of putting Original seen and verified stamp This will not be considered as address proof independently. +- The document must be valid at the time of account opening. +- In case of accepting entity proof for proprietorship entity and entity owned by HUF, utility bills & Service/professional tax certificate/Food License confirming Name of Proprietor, Firm’s name and address of Entity can be taken as valid proof of entity for sole proprietorship concerns. Name of the proprietary concern should necessarily match with the second entity proof collected. It has to be backed by the Bank official Visit. + +## Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/icici-current-account/llp.md b/llm-content/x/icici-current-account/llp.md new file mode 100644 index 00000000..7990b9d5 --- /dev/null +++ b/llm-content/x/icici-current-account/llp.md @@ -0,0 +1,60 @@ +--- +title: Limited Liability Partnership (LLP) +description: List of documents required to open a Current Account powered by RazorpayX in partnership with ICICI Bank for a limited liability partnership. +--- + +# Limited Liability Partnership (LLP) + +This page has information on the documents required for a **Limited Liability Partnership (LLP)** firm to open a Current Account using RazorpayX in partnership with ICICI Bank. + +> **INFO** +> +> +> **Handy Tips** +> +> - All declarations should be on company letterhead along with date, sign, and stamp. +> - All declarations must contain rectangular stamp. Round stamp is not acceptable. +> - All KYC documents must be presented in originals to the bank Relationship Manager (RM). +> + +## Documents and Forms Required + +SL. No. | Document Type | Document List +--- +1 | Entity Documents | +- PAN of Entity +- LLP Agreement +- Certificate of Registration issued by Registrar of Limited Liability Partnership (LLP) +- Communication Address Proof (if different from what is mentioned in Certificate of Registration). Click [here ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/icici-current-account/entity-address-proof.md)for a list of acceptable documents +--- +2 | KYC Documents for all Authorized Signatories and Beneficial Owners | +- Photo +- ID and Address Proof (Refer image below for list of acceptable documents) +- PAN +--- +3 | Declarations | +- List of Shareholding pattern/Beneficial owners holding pattern more than 15% in the company (ICICI format) +- LLP Letter +- Covering Letter +--- +4 | Account Opening Forms | Account Opening Form +--- +5 | Account Opening Cheque | Account Opening Cheque from existing Current Account + +Refer to the table given below for acceptable documents for KYC: + +![](/docs/assets/images/RZPX-rzpx-id-address-proof-icici.jpg) + +> **INFO** +> +> +> **Handy Tips** +> +> Beneficial Owners are those holding more than 15% stake in the company. +> + +[Download all forms and documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x_ca_icici_documents-limited-liability-2112.zip.md). + +## Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/icici-current-account/partnership.md b/llm-content/x/icici-current-account/partnership.md new file mode 100644 index 00000000..9bc4ee4c --- /dev/null +++ b/llm-content/x/icici-current-account/partnership.md @@ -0,0 +1,58 @@ +--- +title: Partnership +description: List of documents required to open a Current Account powered by RazorpayX in partnership with ICICI Bank for a partnership firm. +--- + +# Partnership + +This page has information on the documents required for a **Partnership** firm to open a Current Account using RazorpayX in partnership with ICICI Bank. + +> **INFO** +> +> +> **Handy Tips** +> - All declarations should be on company letterhead along with date, sign, and stamp. +> - All declarations must contain rectangular stamp. Round stamp is not acceptable. +> - All KYC documents must be presented in originals to the bank Relationship Manager (RM). +> + +## Documents and Forms Required + +SL. No. | Document Type | Document List +--- +1 | Entity Documents | +- PAN of Entity +- Latest Partnership Deed +- Communication Address Proof (if different from what is mentioned in Certificate of Registration) Click [here ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/icici-current-account/entity-address-proof.md)for a list of acceptable documents +- Registration Certificate (for Registered Partnership firm only) +--- +2 | KYC Documents for all Authorized Signatories and Beneficial Owners | +- Photo +- ID and Address Proof (Refer image below for a list of acceptable documents) +- PAN. +--- +3 | Declarations | +- Partnership Letter +- Covering Letter +--- +4 | Account Opening Forms | Account Opening Form +--- +5 | Account Opening Cheque | Account Opening Cheque from existing Current Account + +Refer to the table given below for acceptable documents for KYC: + +![](/docs/assets/images/RZPX-rzpx-id-address-proof-icici.jpg) + +> **INFO** +> +> +> **Handy Tip** +> +> Beneficial Owners are those holding more than 15% stake in the company. +> + +[Download all forms and documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x_ca_icici_documents-partnership2112.zip.md). + +## Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/icici-current-account/sole-proprietorship.md b/llm-content/x/icici-current-account/sole-proprietorship.md new file mode 100644 index 00000000..35cce0e9 --- /dev/null +++ b/llm-content/x/icici-current-account/sole-proprietorship.md @@ -0,0 +1,53 @@ +--- +title: Sole Proprietorship +description: List of documents required to open a Current Account powered by RazorpayX in partnership with ICICI Bank for sole proprietorship. +--- + +# Sole Proprietorship + +This page has information on the documents required for a **Sole Proprietorship** firm to open a Current Account using RazorpayX in partnership with ICICI Bank. + +> **INFO** +> +> +> **Handy Tips** +> +> - All declarations should be on company letterhead along with date, sign, and stamp. +> - All declarations must contain rectangular stamp. Round stamp is not acceptable. +> - All KYC documents must be presented in originals to the bank Relationship Manager (RM). +> + +## Documents and Forms Required + +Here is a list of documents and forms required from the customer end: + +Sl. No. | Document Type | Documents/Forms required +--- +1 | KYC Documents of Proprietor | +- ID and Address Proof (Refer the image below for acceptable documents) +- Photo +- PAN Card +--- +2 | Entity Documents | 2 proofs to be submitted. Know which [documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/icici-current-account/entity-address-proof.md) are acceptable as proof. +--- +3 | Declarations | +- Proprietorship Letter +- Covering Format +--- +4 | Power of Attorney (PoA) if applicable | +- ID, Address Proof, Relationship Proof (Refer the image below for acceptable documents) +- Photo +--- +5 | Account Opening Forms | Account Opening Form +--- +6 | Account Opening Cheque | Account Opening Cheque from existing Current Account + +Refer to the table given below for acceptable documents for KYC: + +![](/docs/assets/images/RZPX-rzpx-id-address-proof-icici.jpg) + +[Download all forms and documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x_ca_icici_documents-sole-proprietorship2112.zip.md). + +## Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/idfc-first/kyc.md b/llm-content/x/idfc-first/kyc.md new file mode 100644 index 00000000..d6fd73d5 --- /dev/null +++ b/llm-content/x/idfc-first/kyc.md @@ -0,0 +1,119 @@ +--- +title: KYC for Current Operators +heading: KYC for Current Account Operators +description: Find the details of KYC documents of operators (based on residential status) required to open a Current Account powered by RazorpayX in partnership with IDFC Bank. +--- + +# KYC for Current Account Operators + +Below are the list of KYC documents required to be submitted by the operators/beneficial owners/partners/directors/proprietors of a business entity to open a current account with RazorpayX in partnership with IDFC First Bank. You can find the list of acceptable documents for [Indian Residents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/kyc.md#indian-residents), [NRIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/kyc.md#non-resident-of-india), [Foreign Nationals](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/kyc.md#foreign-nationals-residing-in-india), [Hindu Undivided Families](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/kyc.md#hindu-undivided-family-huf) and [Business Entities](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/kyc.md#kyc-documents-for-the-business-entity). + +> **WARN** +> +> +> **Watch Out!** +> +> All documents are to be submitted in **original hard copies** to the Relationship Manager assigned to you. +> + + +### Indian Residents + + The following are the documents required for Indian Residents. + - **Resident Customer Information Form** (CIF). + - **ID Proof** (this can be any of the below). + - PAN + - Aadhaar + - Passport + - Driving Licence + - Voter's ID + - Letter issued by National Population Register containing details of name and address. + + + +> **INFO** +> +> +> **Watch Out!** +> +> - **Signature declaration**: Required if the signature on the signature proof document does not match the signature on the ID proof. +> +> - **Dual name declaration**: Required if the name on the signature proof does not match the name on the ID proof. A slight mismatch is allowed for South Indian names. +> +> - **Vernacular declaration**: If signature is in any language other than English, it needs to be attested by atleast two bank officials. +> +> + + - **Address Proof** (this has to be one of the Officially Valid Document from below): + - Passport + - Driving Licence + - Voters’ ID card + - Aadhaar card + - Job Card (issued by NREGA and signed by a State Government official). + + + + +### Non-Resident of India + + The following are the documents required for Non-resident Indians. + + - **Non-resident Indian Customer Information Form** (NRI CIF). + - **Investment Services Account (ISA)**. + - Valid **Passport** (mandatory). + - **Visa** for the country of residence. + - **PAN** (optional). + - **Person of Indian Origin (PIO)** or **Overseas Citizenship of India (OCI)** Card (mandatory). + - **Job card issued by NREGA** duly signed by an officer of the state government. + + + + +### Foreign Nationals Residing in India + + The following are the documents required for non-Indians residing in India. + - **Customer Information Form** (CIF) + - **Overseas Citizen of India/Person of Indian Origin** Customer Information Form. + - **Investment Services Account(ISA)** form. + - Valid **Passport**. + - **Indian Visa**. + - **PAN** or **Form 60 and Form 49A**. + - **Foreign Registration Regional Office (FRRO)** certificate or a certificate from **Foreigners Registration Officer (FRO)** which includes the purpose of stay, duration and type of visa. + + + + +### Hindu Undivided Family (HUF) + + The following are the documents required for a Hindu Undivided Family (HUF). + - **HUF PAN card**. + - **Karta’s PAN**. + - **Karta’s KYC**. + - Aadhaar + - Passport + - Driving Licence + - Voter's ID + - **HUF declaration**. + + +## KYC documents for the Business Entity + +You can find the detailed list of documents required in the name of the business entity in the links below, based on the constitution of the entity. + + - [Private / Public Limited Company / OPC](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/pvt-ltd-co.md) + - [Limited Liability Partnership (LLP)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/llp.md) + - [Partnership](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/partnership.md) + - [Sole Proprietorship](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/sole-proprietorship.md) + +### Escrow Accounts + +Below are the **additional documents** required in case of [Escrow Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/escrow.md) + - **Escrow Board Resolution** ([Click](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/idfc-escrow.docx.md) to download the format ) + - **Escrow Agreement** (finalised and signed) + - **Trustee Board Resolution** + +[Download Forms](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/IDFC.zip.md) + +### Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/idfc-first/llp.md b/llm-content/x/idfc-first/llp.md new file mode 100644 index 00000000..536c6b4b --- /dev/null +++ b/llm-content/x/idfc-first/llp.md @@ -0,0 +1,95 @@ +--- +title: Documents for LLP Account +heading: Documents for Limited Liability Partnership Account +description: List of documents required to open a Current Account powered by RazorpayX in partnership with IDFC First for a Limited Liability Partnership (LLP). +--- + +# Documents for Limited Liability Partnership Account + +You can find the list of documents required for a **LLP** firm to open a Current Account through RazorpayX in partnership with IDFC First. + +> **INFO** +> +> +> **Handy Tips** +> +> - All declarations should be in the **company letterhead** along with **date, sign, and relevant stamps**. +> - All KYC documents must be presented in **original hard copies** to the bank Relationship Manager assigned to you. +> + +## Documents and Forms Required + +List of documents for LLP +- **Account Opening Form** (duly signed by all Authorised Signatories with relevant seals) +- **Customer Information Form(s)** (CIF) of all Authorised Signatories and Partners, signed in individual capacities. +- **LLP agreements** since inception. +- **Certificate of Incorporation**. +- **LLP declaration**. +- **List of all partners** (including designated partners) with name, date of birth, and address. +- **PAN** of the entity. +- **Registered Office address proof** in the name of the entity. +- **Communication address proof**, if different from registered address. +- [**KYC of all the Partners/Authorised Signatories and Beneficial Owners**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/kyc.md) + +[Download Forms](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/IDFC.zip.md) + +> **INFO** +> +> +> **Handy Tips** +> +> Beneficial Owners are those holding more than 10% stake in the LLP. +> + + +### List of Other Applicable Documents + + Below are the list of documents to be submitted in whichever cases applicable. + +### Details of Documents Required + +Particulars | Entity ID Proof | Address Proof +--- +Registration Certificate issued by Registrar of Firms, in case of Registered Partnership Firm | Y | Y +--- +Valid Shops & Establishment Certificate | Y | Y +--- +Trade License | Y | Y +--- +GST Registration Certificate in the name of the Firm | Y | Y +--- +CST / VAT Registration Certificate (for goods not covered under GST) | Y | Y +--- +Firm Registration Certificate/letter issued by Institute of Chartered Accountants of India (ICAI)/ Institute of Cost Accountants of India/Institute of Company Secretaries of India/Indian Medical Council | Y | Y +--- +Certificate by Food and Drug Control Authorities (if applicable) | Y | Y +--- +Latest copy of the Electricity Bill | Y | Y +--- +Latest copy of Telephone Bill | Y | Y +--- +True copy of gas connection book and latest gas receipt or Gas bill in case of pipe connection | Y | Y +--- +Latest Three months Bank Statement/Passbook from a Scheduled Commercial Bank with a Cancelled Cheque (Not Applicable for Sole Proprietorship) | N | Y +--- +Trade Mark Registration Certificate (if applicable) | Y | Y +--- +Drug License (if applicable) | Y | Y +--- +License/ Certificate to Sell/ Stock/ Exhibit for Sale or Distribute Insecticide/Pesticide (if applicable) | Y | Y +--- +IEC (Importer Exporter Code) Certificate issued to the Proprietary Concern by the Office of DGFT (if applicable) | Y | Y +--- +SEBI Registration Certificate (if applicable) | Y | Y +--- +Labour License/Certificate (if applicable) (Note: Labour Certificate issued by Department of Labour, Govt of National Capital Territory of Delhi, is not considered) | Y | Y +--- +Registered Rent Agreement/Notarized Rent Agreement in the name of the Company (if applicable) (Note: The Rent Agreement submitted should have at least 3 months of validity period till expiry date) | N | Y +--- +Udyam registration | Y | Y + + + +## Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/idfc-first/partnership.md b/llm-content/x/idfc-first/partnership.md new file mode 100644 index 00000000..15064ecc --- /dev/null +++ b/llm-content/x/idfc-first/partnership.md @@ -0,0 +1,93 @@ +--- +title: Documents for Partnership Account +description: List of documents required by a Partnership firm to open a Current Account powered by RazorpayX in partnership with IDFC First Bank. +--- + +# Documents for Partnership Account + +You can find the list of documents required for a **Partnership** firm to open a Current Account through RazorpayX in partnership with IDFC First Bank. + +> **INFO** +> +> +> **Handy Tips** +> - All declarations should be in the **company letterhead** along with **date, sign, and relevant stamps**. +> - All KYC documents must be presented in **original hard copies** to the bank Relationship Manager assigned to you. +> + +## Documents and Forms Required + +List of Documents for a Partnership Firm +- **Account Opening Form** (duly signed by all Authorised Signatories with relevant seals) +- **Customer Information Form(s)** (CIF) of all Authorised Signatories and Partners, signed in individual capacities. +- **Partnership Deed**. +- **Partnership Registration** Certificate (for registered partnership firm). +- **Partnership Firm Declaration**. +- **PAN** of the firm. +- **Registered office address proof** (in the name of the entity). +- **Communication address proof**, if different from registered address. +- [KYC of all the partners and authorised signatories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/kyc.md) (if different from the partners). +- List of partners with name, date of birth, and address. + +[Download Forms](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/IDFC.zip.md) + +> **INFO** +> +> +> **Handy Tips** +> +> Beneficial Owners are those holding more than 10% stake in the Partnership Firm. +> + + +### List of Other Applicable Documents + + Below are the list of documents to be submitted in whichever cases applicable. + +### Details of Documents Required + +Particulars | Entity ID Proof | Address Proof +--- +Registration Certificate issued by Registrar of Firms, in case of Registered Partnership Firm | Y | Y +--- +Valid Shops & Establishment Certificate | Y | Y +--- +Trade License | Y | Y +--- +GST Registration Certificate in the name of the Firm | Y | Y +--- +CST / VAT Registration Certificate (for goods not covered under GST) | Y | Y +--- +Firm Registration Certificate/letter issued by Institute of Chartered Accountants of India (ICAI)/ Institute of Cost Accountants of India/Institute of Company Secretaries of India/Indian Medical Council | Y | Y +--- +Certificate by Food and Drug Control Authorities (if applicable) | Y | Y +--- +Latest copy of the Electricity Bill | Y | Y +--- +Latest copy of Telephone Bill | Y | Y +--- +True copy of gas connection book and latest gas receipt or Gas bill in case of pipe connection | Y | Y +--- +Latest Three months Bank Statement/Passbook from a Scheduled Commercial Bank with a Cancelled Cheque (Not Applicable for Sole Proprietorship) | N | Y +--- +Trade Mark Registration Certificate (if applicable) | Y | Y +--- +Drug License (if applicable) | Y | Y +--- +License/ Certificate to Sell/ Stock/ Exhibit for Sale or Distribute Insecticide/Pesticide (if applicable) | Y | Y +--- +IEC (Importer Exporter Code) Certificate issued to the Proprietary Concern by the Office of DGFT (if applicable) | Y | Y +--- +SEBI Registration Certificate (if applicable) | Y | Y +--- +Labour License/Certificate (if applicable) (Note: Labour Certificate issued by Department of Labour, Govt of National Capital Territory of Delhi, is not considered) | Y | Y +--- +Registered Rent Agreement/Notarized Rent Agreement in the name of the Company (if applicable) (Note: The Rent Agreement submitted should have at least 3 months of validity period till expiry date) | N | Y +--- +Udyam registration | Y | Y + + + +## Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/idfc-first/pvt-ltd-co.md b/llm-content/x/idfc-first/pvt-ltd-co.md new file mode 100644 index 00000000..b10303c6 --- /dev/null +++ b/llm-content/x/idfc-first/pvt-ltd-co.md @@ -0,0 +1,96 @@ +--- +title: Documents for Private / Public Limited Company / OPC +description: List of documents required to open a Current Account powered by RazorpayX in partnership with IDFC First Bank for a Private/Public Limited Company/One Person Company. +--- + +# Documents for Private / Public Limited Company / OPC + +You can find the list of documents required for a **Company/One Person Company (OPC)** to open a Current Account through RazorpayX in partnership with IDFC First Bank. + +> **INFO** +> +> +> **Handy Tips** +> +> - All declarations should be in the **company letterhead** along with **date, sign, and relevant stamps**. +> - All KYC documents must be presented in **original hard copies** to the bank Relationship Manager assigned to you. +> + +## Documents and Forms Required + +List of documents for a Limited Company/OPC +- **Account Opening Form** (duly signed by all Authorised Signatories with relevant stamps) +- **Customer Information Form(s)** (CIF) of all Authorised Signatories/Beneficial Owners/Directors signed in individual capacities. +- **Memorandum of Association (MOA)**. +- **Articles of Association (AOA)**. +- **Certificate of Incorporation**. +- **Board Resolution**. +- Latest **list of directors and officials** holding senior management positions. +- **PAN** of the company. +- **Registered office address proof** in the name of the entity. +- **Communication address proof**, if different from registered address. +- [KYC of all the authorised signatories](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/kyc.md). +- **NPO Declaration** for section 8 company (formerly Section 25) (including Darpan registration certificate/ number for NPO) in case of Non-profit Companies. + +[Download Forms](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/IDFC.zip.md) + +> **INFO** +> +> +> **Handy Tips** +> +> Beneficial Owners are those holding more than 10% stake in case of unlisted companies and 25% in case of listed companies. +> + + +### List of Other Applicable Documents + + Below are the list of documents to be submitted in whichever cases applicable. + +### Details of Documents Required + +Particulars | Entity ID Proof | Address Proof +--- +Registration Certificate issued by Registrar of Firms, in case of Registered Partnership Firm | Y | Y +--- +Valid Shops & Establishment Certificate | Y | Y +--- +Trade License | Y | Y +--- +GST Registration Certificate in the name of the Firm | Y | Y +--- +CST / VAT Registration Certificate (for goods not covered under GST) | Y | Y +--- +Firm Registration Certificate/letter issued by Institute of Chartered Accountants of India (ICAI)/ Institute of Cost Accountants of India/Institute of Company Secretaries of India/Indian Medical Council | Y | Y +--- +Certificate by Food and Drug Control Authorities (if applicable) | Y | Y +--- +Latest copy of the Electricity Bill | Y | Y +--- +Latest copy of Telephone Bill | Y | Y +--- +True copy of gas connection book and latest gas receipt or Gas bill in case of pipe connection | Y | Y +--- +Latest Three months Bank Statement/Passbook from a Scheduled Commercial Bank with a Cancelled Cheque (Not Applicable for Sole Proprietorship) | N | Y +--- +Trade Mark Registration Certificate (if applicable) | Y | Y +--- +Drug License (if applicable) | Y | Y +--- +License/ Certificate to Sell/ Stock/ Exhibit for Sale or Distribute Insecticide/Pesticide (if applicable) | Y | Y +--- +IEC (Importer Exporter Code) Certificate issued to the Proprietary Concern by the Office of DGFT (if applicable) | Y | Y +--- +SEBI Registration Certificate (if applicable) | Y | Y +--- +Labour License/Certificate (if applicable) (Note: Labour Certificate issued by Department of Labour, Govt of National Capital Territory of Delhi, is not considered) | Y | Y +--- +Registered Rent Agreement/Notarized Rent Agreement in the name of the Company (if applicable) (Note: The Rent Agreement submitted should have at least 3 months of validity period till expiry date) | N | Y +--- +Udyam registration | Y | Y + + + +### Related Information + +- [Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/idfc-first/sole-proprietorship.md b/llm-content/x/idfc-first/sole-proprietorship.md new file mode 100644 index 00000000..11684ec5 --- /dev/null +++ b/llm-content/x/idfc-first/sole-proprietorship.md @@ -0,0 +1,81 @@ +--- +title: Documents for Sole Proprietorship Accounts +description: List of documents required by a Sole Proprietorship entity to open a Current Account powered by RazorpayX in partnership with IDFC First Bank. +--- + +# Documents for Sole Proprietorship Accounts + +You can find the list of documents required for a **Sole Proprietory** entity to open a Current Account through RazorpayX in partnership with IDFC First Bank. + +> **INFO** +> +> +> **Handy Tips** +> - All declarations should be in the **company letterhead** along with **date, sign, and relevant stamps**. +> - All KYC documents must be presented in **original hard copies** to the bank Relationship Manager assigned to you. +> + +## Documents and Forms Required + +List of Documents for a Sole Proprietorship + +- **Account Opening Form** (duly signed by all Authorised Signatories with relevant seals) +- **Customer Information Form(s)** (CIF) of all Authorised Signatories/Proprietor signed in individual capacities. +- [ 2 ID proofs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/sole-proprietorship.md#list-of-other-applicable-documents) in the name of the entity. +- [KYC of Proprietor](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/kyc.md). +- [KYC of Authorised Signatory](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/kyc.md) (if different from proprietor). +- Nature of industry proof (in case not indicative in [entity documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/idfc-first/sole-proprietorship.md#list-of-other-applicable-documents), please check for invoice copy, bill of entry, freight invoice, or agreement copy). + +[Download Forms](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/IDFC.zip.md) + + + +### List of Other Applicable Documents + + Below are the list of documents to be submitted in whichever cases applicable. + +Particulars | Entity ID Proof | Address Proof +--- +Registration certificate issued by Registrar of Firms, in case of registered partnership firm | Y | Y +--- +Valid Shops & Establishment Certificate | Y | Y +--- +Trade License | Y | Y +--- +GST Registration Certificate in the name of the firm | Y | Y +--- +CST / VAT Registration Certificate (for goods not covered under GST) | Y | Y +--- +Firm Registration certificate/letter issued by Institute of Chartered Accountants of India (ICAI), or Institute of Cost Accountants of India or Institute of Company Secretaries of India or Indian Medical Council | Y | Y +--- +Certificate by Food and Drug Control Authorities (if applicable) | Y | Y +--- +Latest copy of the Electricity Bill | Y | Y +--- +Latest copy of Telephone Bill from telecom operator | Y | Y +--- +True copy of gas connection book and latest gas receipt or Gas bill in case of pipe connection | Y | Y +--- +Latest Three months Bank Statement/Passbook from scheduled commercial bank with account opening cheque/Cancelled cheque (Not Applicable for Sole Proprietorship) | N | Y +--- +Trade Mark Registration Certificate (if applicable) | Y | Y +--- +Drug License (if applicable) | Y | Y +--- +License/ Certificate to Sell/ Stock/ Exhibit for Sale or Distribute Insecticide/Pesticide (if applicable) | Y | Y +--- +IEC (Importer Exporter Code) Certificate issued to the proprietary concern by the office of DGFT (if applicable) | Y | Y +--- +SEBI Registration Certificate (if applicable) | Y | Y +--- +Labour License/Certificate (Note: Labour certificate issued by Department of Labour Govt of National Capital Territory of Delhi is not considered) (if applicable) | Y | Y +--- +Registered Rent Agreement in the name of the company or Notarized Rent Agreement to be accompanied. Additionally, the rent agreement submitted should have at least 3 months of validity period from the agreement expiry date (if applicable) | N | Y +--- +Udyam registration | Y | Y + + + +## Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/manage-teams.md b/llm-content/x/manage-teams.md new file mode 100644 index 00000000..bb83a592 --- /dev/null +++ b/llm-content/x/manage-teams.md @@ -0,0 +1,116 @@ +--- +title: Manage Teams on RazorpayX +heading: Manage Teams +description: Manage your team's access to the RazorpayX Dashboard by assigning User Roles and understand how you can invite and add a user. +--- + +# Manage Teams + +You can add the relevant team members as users on your [Dashboard](https://x.razorpay.com/) and assign user roles to them. User roles limit their access to the Dashboard as per your business requirements. + +For example, you might want to provide a **View Only** role to a Support Engineer of your team, or you want your Finance Team to access Payouts and Reports. In such cases, you can create user roles, or choose from the available templates in RazorpayX and manage your team's access to your Dashboard. + +> **INFO** +> +> +> **Handy Tips** +> +> Any team member with access can add team members, create and edit roles & permissions. +> + +## Invite a Team Member + +Watch the video to know how to add or invite a user to your team. + +[Video: https://www.youtube.com/embed/Gu8Ad6Up4vs] + +To add a team member: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. You can to it in two ways: + - Navigate to the drop-down menu next to **+ Payouts** and click **Team Member**. + - Navigate to the profile icon → **My Account and Settings** → **Manage Team** and click **+ TEAM MEMBER**. +3. You can either select an existing role or you can [create a new role](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/create-user-role.md). +4. Once the role is selected, you can preview the permissions associated with the role and enter the email address of the team member. +5. Click **SEND INVITE**. + +RazorpayX will send an email to the added user, informing about the pending invitation. User can then [accept the invitation](#accept-an-invitation) and access the Dashboard as per the access permissions the Owner has set. + +Invitation status | Actions you can perform +--- +After the invite is sent | [**Remove**](#remove-invite) or [**Resend**](#resend-invite) the pending invitation. +--- +After the user accepts the invitation, you can: | - [**Change** the role assigned](#edit-user-role). +- [**Remove** the user](#remove-users) from your team. + +## Change Team Member Role + +To edit the role of a team member: +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to the profile icon → **My Account & Settings** → **Manage Team**. +3. Hover over the team member on the list you want to change the role for and click the edit icon. + ![Edit the role of a team member](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-team-edit-role.jpg.md) +4. Select from the existing user role templates or [create a new role](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/create-user-role.md). +5. You can select and review the the permissions and click **Update Changes**. + ![Update the change in user role](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-team-edit-role-2.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> - First [create the custom role](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/create-user-role.md) to change the role of a team member to a new custom role. +> - If the team member's role is already a part of approval workflow, make sure to add the team member's newly assigned role to the approval workflow for them to be able to continue approve or reject payouts. +> + +## Remove Team Members + +To remove a team member from your RazorpayX account: +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to the profile icon **My Account & Settings** → **Manage Team**. +3. Hover over the user you want to remove from the team and click the delete icon. + +![Remove a user from the team](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-team-remove-member.jpg.md) + +## Resend Invite + +To resend an invite to a team member: +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to the profile icon → **My Account & Settings** → **Manage Team**. +3. Hover over the pending invite you want to send again and click **RESEND**. + +![Resend an invite to the user](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-team-resend-invite.jpg.md) + +## Remove Invite + +To remove the invite sent to the user: +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to the profile icon → **My Account & Settings** → **Manage Team**. +3. Hover over the user you want to remove the invite for and click the delete icon. + +![Remove the invite sent to a user](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-team-remove-invite.jpg.md) + +## Accept an Invitation + +To accept an invitation: + +1. Click **ACCEPT INVITE** on the email and you will be redirected to either sign in or sign up for RazorpayX. + ![Accept RazorpayX Invitation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/accept-invitation.jpg.md) +2. Set a new password for your RazorpayX account and click **Create Account**. + ![Set Password and Create Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/set-password.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> To avoid creating a duplicate Merchant ID (MID), we recommend that you set a password directly instead of signing in through Google SSO. +> + +3. If you are already logged in, you can accept the invite by navigating to **My Account & Settings** → **User Profile** and [Switch Merchant](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard.md#switch-merchant). + +### Related Information + +- [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) +- [Two-Factor Authentication](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/2fa.md) +- [Chartered Accountant Portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/ca-portal.md) diff --git a/llm-content/x/manage-teams/2fa.md b/llm-content/x/manage-teams/2fa.md new file mode 100644 index 00000000..b7c395f9 --- /dev/null +++ b/llm-content/x/manage-teams/2fa.md @@ -0,0 +1,53 @@ +--- +title: 2FA on RazorpayX +heading: Two-Factor Authentication +description: Enhance account security and ensure only authorised users log in to your account using 2-factor authentication(2FA). +--- + +# Two-Factor Authentication + +RazorpayX provides enhanced security and protection through Two-Factor Authentication (2FA) for all users of the Dashboard. + +Usually, to log in to the [RazorpayX Dashboard](https://x.razorpay.com/), users enter their email address and password. When you enable 2FA on an account, users are prompted to enter a one-time password (OTP) when logging in. They receive an OTP on their registered mobile number. + +By setting this additional layer of security, you can ensure that only the intended user has access to your Dashboard, thus preventing malicious attacks or misuse of your sensitive business data. + +## Enabling 2FA for Users on Dashboard + +To add this additional layer of security, you must enable 2FA. You can enable it +- [**All team members**](#2fa-for-all-team-members): As the account owner, you can enforce 2FA for all users (team members) linked to your account. +- [**Your account only**](#2fa-for-your-account-only): As a user, you can set up 2FA for your account only. + +### 2FA for All Team Members + +As an owner, you can enforce 2FA for all users (team members) linked to your account. To enable 2FA for all your team members: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **My Account & Settings** → **Manage Team**. +3. In the **Team Members** tab, enable the **Two-Factor Authentication for the team** option by toggling it to **ENABLED**. + ![Enable 2FA for your team](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/enable-2fa-for-your-team.jpg.md) +4. Enter the OTP sent to your registered mobile device. +5. Enter your account password and confirm. + +You have now set up 2FA as a mandatory step for all team members on your account. If a user did not provide their mobile number during sign up, they are prompted to do so on their next login. + +### 2FA for Your Account Only + +You can enable 2FA for your account only. To enable 2FA for your account only: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **My Account & Settings** → **User Profile**. +3. Enable the **Two-Factor Authentication** option in the section under **User Role**. + ![Enable 2FA for your account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/enable-2fa-for-your-account.jpg.md) +4. Enter the OTP sent to your registered mobile device. +5. Enter your account password and confirm. + +You have now set up 2FA for your account only. + +If your users are locked out of their accounts, the Owner/person with Owner privileges, can reset 2FA for that user. + +### Related Information + +- [Manage Teams](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams.md) +- [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) +- [Chartered Accountant Portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/ca-portal.md) diff --git a/llm-content/x/manage-teams/approval-workflow.md b/llm-content/x/manage-teams/approval-workflow.md new file mode 100644 index 00000000..80259076 --- /dev/null +++ b/llm-content/x/manage-teams/approval-workflow.md @@ -0,0 +1,152 @@ +--- +title: Approval Workflow on RazorpayX +heading: Approval Workflow +description: Assign user roles to create and approve payouts using the RazorpayX Approval Workflow. +--- + +# Approval Workflow + +Approval Workflow, or the Maker-Checker, is a feature that can be used by organisations to have certain transactions go through an approval process. + +You can create custom workflows for creation and approval, that allows you to have more control and scrutinise your payouts to reduce human errors. + +- There are no pre-set workflows that you need to follow. +- You can set up the Approval Workflow rules so that a payout created by a role can be approved by up to two different roles before it is sent for processing. + +Approval Workflow can be applied to all payouts created on RazorpayX, whether they are created individually from the [RazorpayX Dashboard](https://x.razorpay.com/), using [API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts.md) or using the [Bulk Payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts.md#payouts) feature. + +> **WARN** +> +> +> **Watch Out!** +> +> The Approval Workflow feature is **not** available in the Test mode. +> +> + +## Create a Workflow + +To create an Approval Workflow: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +1. Navigate to **My Account & Settings** → **Workflow** → **Payouts**. +1. Click **Get Started**. You will be prompted with a sample template to create the workflow. Click **Awesome, got it** to continue. + ![Getting Started with Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-workflow-approval-get-started.gif.md) +1. You can start editing the template by entering the range and number of approvers required. + - For example, for a range from ₹ 0 to ₹ 1,000 - No approval required. + - ₹ 1,000 & 5,000 - Approval at Step 1. + - ₹ 5,000 & Above - Approval at Step 1 and Step 2, and so on. +1. To add a range, click **+RANGE** between two ranges and to remove a range, click **-** along the listed range. + ![Adding range](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-workflow-approval-enter-range.gif.md) +1. You can use the **+Approvers** to add an approval step. +1. Once you have clicked on **+Approvers**, you can add approvers in the step by selecting a desired role from the drop-down. + ![Adding another layer of approvers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-workflow-approval-add-approver.gif.md) +1. You can add multiple roles as approvers in a step by the `OR` or `AND` conditions. + - For example, for a range - ₹ 1,000 & 5,000 + - If Step 1 approvers are Finance OR Admin, the payout in that range will be processed or move to the next step of approval on either Finance or Admin approval. + - If Step 1 approvers are Finance AND Admin, the payout in that range will be processed or move to the next step of approval on both Finance and Admin approval. + ![Adding condition for approval](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-workflow-approval-add-condition.gif.md) +1. Once you are done with all the changes, click **Save Workflow**. +1. Confirm saving workflow and [2FA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/2fa.md) to create workflow successfully. + +> **INFO** +> +> +> **Handy Tips** +> +> While adding a role as an approver in the workflow, please make sure that the role has permission to view payouts. You will be able to view the permissions associated with a role in the **Roles and Permissions** tab of team management. +> + +## Edit Workflow + +To edit an Approval Workflow: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +1. Navigate to **My Account & Settings** → **Workflow** → **Payouts**. +1. Click on the Edit Workflow icon as shown below. + ![Edit workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-workflow-approval-edit.jpg.md) +1. If you don’t have any pending Payouts or Payout Links: + - You will proceed directly to the workflow builder. Here you can add, edit or remove approval ranges, approvers and approval steps. + - Once you are done with all the changes, click **Save Changes**. + - An OTP is sent to your registered mobile number to confirm changes to the workflow. +5. If you have pending Payouts or Payout Links: + - You are notified of the pending Payouts or Payout Links. + - If you wish to review the Pending Payouts, you can do so by clicking **REVIEW**. + - You can approve or reject these Pending Payouts before saving changes to workflow. + ![Review pending payouts before saving new workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-workflow-approval-pending-payouts.jpg.md) + - Click on **Got it, Proceed** to proceed to the workflow builder. + - On the workflow builder, you can add, edit or remove approval ranges, approvers and approval steps. + - Once you are done with the changes, click **Save Changes**. + - An OTP is sent to your registered mobile number to confirm rejection of Pending Payouts or Payout Links and saving changes to the workflow. + ![Reject pending payouts and confirm to save new workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-workflow-approval-reject-and-save.jpg.md) + +### What happens once Approval Workflow is set up? + +Approvers can approve or reject payouts and payout links from the [RazorpayX Dashboard](https://x.razorpay.com/), mobile app or RazorpayX Slack App. You can also select and approve multiple payouts at once from the Dashboard using the check box beside the payout. + +[Video: https://www.youtube.com/embed/RLxch_AENBw] + +Let us consider that you have set up a workflow where any payout above ₹10,001 has to be approved by the roles Finance L2 in Step 1 and Finance L3 in Step 2. Below is how the payout is created and approved: + +Action by User | What Happens | Reason +--- +Step 1: Payout is created. | The payout moves to the `pending` state. | Approval needed from Finance L2 (Step 1 Approver). +--- +Step 2: Finance L2 approves the payout. | The payout remains in the `pending` state. | Approval needed from Finance L3 (Step 2 Approver). +--- +Step 3: Finance L3 approves the payout. | - The payout moves to the processing state if there’s sufficient balance. +- The payout moves to the queued state if there’s insufficient balance. + | No further action required. + +No further action is required by you to process the payout. That is, it can either be processed or reversed. + +> **WARN** +> +> +> **Watch Out!** +> +> Any payout in `pending` or `queued` state for more than 3 months will automatically be `cancelled` or `rejected`. +> +> + +## Disable Approval Workflow for Payouts Created Using APIs + +When an approval workflow is created, it by default applies to API payouts as well. + +You can disable Approval Workflow only for payouts created using APIs. Payouts and payout links created using the Dashboard or mobile will still follow the Approval Workflow as defined, before they are processed. + +To disable Approval Workflows for payouts created using APIs from the RazorpayX Dashboard: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **My Account & Settings** → **Workflow** → **Payouts** and use the toggle button to disable the **Workflow on payouts created via API** +![Toggle button to disable approval workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-workflow-approval-disable-workflow.gif.md) + +## Removing Approval Workflow + +You can disable Approval Workflow anytime. On disabling, all the payouts in `pending` state are `rejected` automatically and the payouts are processed without approval. + +To remove or disable the approval workflow: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **My Account & Settings** → **Workflow** → **Payouts**. +3. Click on the delete icon and click **Yes, Proceed**. + ![Removing Payouts Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-removing-approval-workflow.jpg.md) +4. Enter the OTP sent to your registered email id and mobile number and click **Confirm**. + +Your Approval Workflow is removed. + +## Webhook Events + +In addition to the [webhook events available for payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md), the Approval Workflow has the following events. + +Event Name | Description +--- +**payout.pending** | Triggered whenever a payout moves to the `pending` state. That is, the payout needs to be approved by a user for processing. +--- +**payout.rejected** | Triggered whenever a payout moves to the `rejected` state. That is, the payout was rejected by a user. + +### Related Information + +- [Manage Teams](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams.md) +- [Chartered Accountant Portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/ca-portal.md) +- [Invoices - Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/approvals-on-invoices.md) diff --git a/llm-content/x/manage-teams/billing.md b/llm-content/x/manage-teams/billing.md new file mode 100644 index 00000000..d0350088 --- /dev/null +++ b/llm-content/x/manage-teams/billing.md @@ -0,0 +1,106 @@ +--- +title: RazorpayX | Fees and Taxes +heading: Billing - Fees and Taxes +description: Explore the fees and taxes charged for payouts in RazorpayX and download the related billing reports. +--- + +# Billing - Fees and Taxes + +When you make a payout from your RazorpayX account, you are charged fees and taxes, which is deducted from your account balance. + +- **Fees**: The fees that Razorpay charges you to make a payout. This is charged according to your pricing plan. + +- **Tax**: This is the GST on the fees, as per government regulations. This is collected by the government. + +## Billing for Payouts + +Fees and taxes are applicable to payouts made through RazorpayX Lite as well as Current Account. However, the billing cycle and structure varies. + +- [Payouts from RazorpayX Lite](#payouts-from-razorpayx-lite). +- [Payouts from Current Account](#payouts-from-current-account). + +### Payouts from RazorpayX Lite + +When you make a payout using [RazorpayX Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/razorpayx-lite.md), the fees and taxes are charged as a part of the payout in real-time. + +#### Example +For a payout of ₹10,000, the fees applicable is ₹5 and the tax on this is ₹0.90. + +When you make a payout ₹10,000 from RazorpayX Lite: +- ₹10,005.90 (₹10,000+ ₹5 + ₹0.90) is deducted from RazorpayX Lite balance. +- ₹10,000 is credited to your contact. +- ₹5 (fees) is credited to Razorpay. +- ₹0.90 (tax) collected by the government. + +In case of a [payout reversal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md#reversal-transaction), the fees and tax are also reversed. + +### Payouts from Current Account + +When you make a payout from your [Current Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/current-account.md), you are charged a fee. The fees and taxes are collected once everyday and **appear as a payout** in your account statement. This is an automated process and does not require any action from you. + +The invoice for Payout Fees deduction is generated on the 1st of every month. You can download the same from the RazorpayX Dashboard under **My Accounts & Settings** → **Billing**. Scroll down to the **Monthly Invoice** section and click **Download Invoice & Report** for the required month. + +> **INFO** +> +> +> **Handy Tips** +> +> Ensure to maintain a sufficient balance at all times for uninterrupted transactions. +> +> Fee and tax for reversals appear with a minus symbol. This is to indicate they are returned to you and also to help with reconciliation. Reversals are calculated as, `amount = (original payout amount + fees + tax).` +> + +## Billing Reports + +There are 2 reports about your account's billing process you can download from the Dashboard: +- [Invoice Reconciliation Report](#invoice-reconciliation-report). +- [Monthly Tax Invoice Report](#monthly-tax-invoice-report). + +> **WARN** +> +> +> **Watch Out!** +> +> Invoices older than 1 year are not available on the dashboard. We recommend that you download your invoices periodically. +> + + +### Invoice Reconciliation and Fee Recovery Report + +The Invoice Reconciliation report contains details of fees and tax for payouts made using both **RazorpayX Lite and Current Accounts**. + +Watch this video to know how you can download the Invoice Reconciliation and Fee Recovery Report. + +[Video: https://www.youtube.com/embed/O4SfXNrG6pA] + +To download the Invoice Reconciliation report: +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **My Account & Settings** → **Billing**. +3. In the **MONTHLY INVOICE** section, click **REPORT** against a particular month in the **EXPORT** column. +4. Select the **Include charged and pending fee details** check box if required. + +Apart from the various fields in the report containing details of each transaction, the following are two important fields: + +- `fee_id` + - **RazorpayX Lite**: `auto_paid`, because the fees and tax is collected as part of the payout. + - **Current account**: This column contains a unique identifier associated with the fee and tax collected. This is because, for current accounts, fees and tax are collected on a regular frequency and not on a per payout basis. Multiple payouts can have the same `fee_id`. +- `fee_created_at` + - **RazorpayX Lite**: This column will be blank because the fees and tax is collected as part of the payout. + - **Current account**: The date and time when the fee and tax collection was initiated by RazorpayX. +- `fee_type` + - `free_payout`: Indicates a Free Payout was used to process the payout. In such scenarios, you are not charged any fees and tax. Only the payout amount is deducted from your account balance. + +### Monthly Tax Invoice Report + +This is a consolidated statement of all fees and taxes deducted from RazorpayX Lite and your current account. + +To download the Monthly Tax Invoice: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **My Account & Settings** → **Billing**. +3. In the **MONTHLY INVOICE** section, click **INVOICE** against a particular month in the **EXPORT** column. + +### Related Information + +- [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) +- [Chartered Accountant Portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/ca-portal.md) diff --git a/llm-content/x/manage-teams/ca-portal.md b/llm-content/x/manage-teams/ca-portal.md new file mode 100644 index 00000000..7f8a8f50 --- /dev/null +++ b/llm-content/x/manage-teams/ca-portal.md @@ -0,0 +1,97 @@ +--- +title: Chartered Accountant Portal via RazorpayX +heading: Chartered Accountant Portal +description: Generate and share reports with your CAs and maintain financial data using RazorpayX CA Portal. +--- + +# Chartered Accountant Portal + +Most companies rely on a Chartered Accountant (CA) or an internal finance team to work on their financial data for filing taxes, payment and compliance. + +Usually, this data is maintained in an accounting tool or structured folders for bookkeeping, auditing and tax filing and periodically sent via email or uploaded into shared folders (like Google Drive or Dropbox) for stakeholders to access. + +With the [RazorpayX Chartered Accountant Portal](https://x.razorpay.com/reports), you can access and download a host of reports that you would need to maintain financial data. + +## Chartered Account Portal + +The CA Portal in RazorpayX is a user role using which you can invite your CA to your X team. The special permissions the CA role has are listed below: + +Actions | CA +--- +Create Contact | x +--- +Create Fund Account | x +--- +Create Payouts | x +--- +Approve-Reject Payouts | x +--- +View Payouts | x +--- +View Transactions | x +--- +Download Reports | ✓ +--- +Developer Controls | x +--- +Manage Team | x +--- +View Billing (invoices) | ✓ +--- +Create Payout Links | x +--- +View Payout Links | x + +Explore [what other user roles are available in RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams.md#razorpayx). + +Your CA can primarily view and download reports. You can share the reports to your CA in the following 2 ways: +- [Generate and share reports with your CA](#generate-reports). +- [Add CA to your team and enable access to reports](#steps-for-the-cafinance-team). + +## Generate Reports + +You can generate reports and send them via email to your CA. To do so: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **Menu** → **Reports** as shown below: + ![Reports section in the left nav menu on RazorpayX Dashboard.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-ca-portal-reports.jpg.md) +3. Select a report type from the drop-down list and period for which report must be generated, and format of the report. Click **DOWNLOAD** to download a copy of the report as shown below: + + ![Selecting report type from the Reports Dashboard on RazorpayX.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-ca-portal-report-types.jpg.md) +4. Enter the email address to which report must be sent, or select email address from the list as shown below: + + ![Enter email id or select from email ids present.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-ca-portal-email-report.jpg.md) +5. Click **EMAIL REPORT**. + +A copy of the report is emailed to the specified email ids. + +### Steps for the CA/Finance Team + +You can enable the Chartered Accountant (CA), finance in-charge, or the Finance team to access the CA Portal to view and analyze financial data. This reduces the wait times and eliminates the need to email reports manually. + +To provide access to your CA/Finance team: + +1. The owner/founder/admin must click **INVITE CA** in the banner or pop-up page. + ![Invite CA pop-up/banner.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-ca-invite.jpg.md) +2. Enter the email address, choose role, and click **SEND INVITE**. + ![Send Invite to CA after entering the email id.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-ca-send-invite.jpg.md) + +The CA/Finance team has to do the following: + +1. Click **ACCEPT INVITE** in the email invitation as shown below. + ![Accept Invite email](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-ca-accept-invite.jpg.md) +2. Enter email address, and create a password. Click **ACCEPT INVITE**. +3. Enter name, and firm name and click **GET STARTED** as shown below. + ![Get Started with CA Portal after entering Your Name and Your Firm.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-ca-get-started.jpg.md) + +The CA/Finance team will now have access to the CA Portal. + +**Handy Tips** + +If multiple RazorpayX users have invited CA to the Portal, the CA can switch merchants from within the RazorpayX Dashboard. + +### Related Information + +- [Manage Teams](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams.md) +- [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) +- [RazorpayX Fees and Taxes Information](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/billing.md) diff --git a/llm-content/x/manage-teams/create-user-role.md b/llm-content/x/manage-teams/create-user-role.md new file mode 100644 index 00000000..56f24d0f --- /dev/null +++ b/llm-content/x/manage-teams/create-user-role.md @@ -0,0 +1,74 @@ +--- +title: Create User Roles on RazorpayX +heading: Create User Roles +description: Create custom user roles and set access as per your requirement on RazorpayX Dashboard. +--- + +# Create User Roles + +Besides the preset templates, you can create custom user roles in RazorpayX. You can add users and assign roles to them and limit their access to the Dashboard as per your business requirements. + +For example, you might want to hide the account balance and account statement from the new employees in your team. Or you wish to delegate certain tasks, like team management and Dashboard Settings configuration to certain members of your team only. + +You can use the preset templates to create new custom roles. You can further edit the custom roles as required. + +## Create Custom User Roles + +Watch the video to know how to create new custom user roles. + +[Video: https://www.youtube.com/embed/q-9lfvnYUf4] + +To create custom user roles in RazorpayX, you must: +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **My Account and Settings** → **Team Management** → **Roles & Permissions**. +3. Click **+ Create New Role**. You can click on the templates to view the preset permissions. You can either: + + 1. Duplicate a standard role/existing custom role from the templates available. + ![Creating a custom role in Roles & Permissions on RazorpayX Dashboard.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-manage-teams-cac-1.jpg.md) + + 2. Click **+ Create Blank Role**, as shown. + ![image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-manage-teams-cac-2.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot duplicate Owner and Admin roles. +> + +4. For the new custom role, provide a name and description, then select the required permissions using the checkboxes. +5. Click **Save Role**. Once the role is successfully created, you can invite a new team member to the role or update the role of an existing team member to the newly created role. + +On sending the invite, this user will get access to your team via email as per the assigned role. + +## Edit Custom User Roles + +Users can click on any existing role and modify the permissions to update the role, if their role allows them to do so. Usually, the Owner can do this. However, the user cannot edit their own role. + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). + +2. Navigate to **My Account and Settings** → **Manage Team** → **Roles & Permissions**. + +3. Hover over the user you want to edit, click the pencil icon and make the changes. + + ![Pen icon highlighted against the Assistant role to make changes to custom role.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-manage-team-cac-edit-2.jpg.md) + +4. Click **Save Role**. + + ![A blue SAVE ROLE button highlighted to save changes made to custom role.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-manage-team-cac-edit-1.jpg.md) + +5. On the pop-up, click **Save Changes**. + +> **WARN** +> +> +> **Watch Out!** +> +> The role is edited for all the users who are assigned with that role. For your reference, RazorpayX also displays a list of users associated with the modified role. +> + +### Related Information + +- [Manage Teams](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams.md) diff --git a/llm-content/x/manage-teams/user-groups.md b/llm-content/x/manage-teams/user-groups.md new file mode 100644 index 00000000..ff0ad2e8 --- /dev/null +++ b/llm-content/x/manage-teams/user-groups.md @@ -0,0 +1,123 @@ +--- +title: User groups on RazorpayX Dashboard +heading: User Groups +description: Create teams, departments or groups based on location and other custom categories for data privacy, custom approval workflows and better coordination. +--- + +# User Groups + +You can create separate group types for users based on your organisations' need. For example, these group types can be: +- **Teams** that work for you, like Product, IT, Sales. +- **Stores** pan-India like Chennai, Kolkata, Hyderabad. +- **Departments** like Marketing, HR, Finance. +- **Regions** like South Bangalore, East Bangalore. +- **Locations** like MG Road, Koramangala, Whitefield and so on. + +[Raise a support ticket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#raise-a-new-request) to set up a group type based on your requirement for your MiD. Once the group types have been created, you can navigate to **Accounts & Settings** → **Team Management** → **User Groups** → to view group types, groups, members and perform Dashboard actions. You can add groups under the group types and invite users. + + +### Advantages + + - **Data privacy**: Currently, you can make a setting for your team member to either view their own data or the entire organisation's data. + - Customised Approval Workflows: We can create different levels of management and set up workflows according to your needs, for better administration. With this feature you can maintain your hierarchy while standardising and supervising the process across your employees, on one dashboard. + - **Time Saving**: Each team need not spend time setting up their own process and tools. Everyone can follow the standardised set. + - **End-to-end data in one place**: You get full financial control with the availability of data and download reports for easy tracking and verification. You can also download data based on group type. For example, data for a particular team or department. + + +To understand the Dashboard actions, assume that an organisation, Acme Corp., has [asked RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#raise-a-new-request) to create two user group types for them: +- Teams +- Departments + +![Teams and departments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-ug-1-ss.jpg.md) + +## Add a Group + +You can add groups one by one or [request RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#raise-a-new-request) to create the groups. + +To add a group, in this case, a department, you must: +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **My Account and Settings** → **Team Management** → **User Groups**. +3. Select the group type, that is, Departments and click **+ Department**. +4. Enter the name and description of the department and select **Head of Department** from list of Team Members. + ![Enter user details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-ug-add-department.jpg.md) +5. Click **Create**. A new group 'Department' is added successfully. + +## Add a User to a Group + +If you require multiple roles, you can [create multiple user roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/create-user-role.md) based on your requirements and invite the users. You can also [raise a request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#raise-a-new-request) with us to create user groups in bulk, once you have created all the required roles. + +To add a user to a group, in this case, a department, you must: +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **My Account and Settings** → **Team Management** → **Team Members** and click **+ Team Member**. +3. Enter the team member details and select a department and **Reporting Manager** from the drop-down. + ![Team member details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-ug-add-team-member.jpg.md) +4. Select the role to be assigned to the user or [**+ Create New Role**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/create-user-role.md). Review the permissions and click **Send Invite**. +5. Enter the OTP sent to your registered mobile number and click **Verify & Invite**. + +You have successfully sent an email invite to your team member. They can **Accept Invite** via their email. + +### Resend Invite + +To resend an invite, you must: +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **My Account and Settings** → **Team Management** → **Team Members**. +3. Hover over the user to who you want to resend the invite. Click on the Vertical Ellipsis **⋮** → **Resend Invite**. + +![Remove or resend invite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-ug-invite.jpg.md) + +You have successfully sent an email invite to your team member. They can **Accept Invite** via their email. + +### Remove Invite + +To delete an invite, you must: +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **My Account and Settings** → **Team Management** → **Team Members**. +3. Hover over the user you want to remove. Click on the Vertical Ellipsis **⋮** → **Remove Invite**. + +This user is no longer invited to join your team. + +## Edit/Update User Details, Role or Department + +To edit a user's details, role or group, you must: +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **My Account and Settings** → **Team Management** → **Team Members**. +3. Hover over the user whose information you wish to edit. Click on the Vertical Ellipsis **⋮** → **Edit**. +4. You can edit any of the details except the Work Email ID of the user. Once the changes are made, review and click **Save Changes**. + +You have successfully updated the details of the user. + +> **INFO** +> +> +> **Handy Tips** +> +> You can navigate to **My Account and Settings** → **Team Management** → **Roles & Permissions** to [edit the permissions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/create-user-role.md#edit-custom-user-roles) for different roles. +> + +## Remove a User + +To remove a user, you must: +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **My Account and Settings** → **Team Management** → **Team Members**. +3. Hover over the user to be deleted. Click on the Vertical Ellipsis **⋮** → **Remove Member**. +4. Click **Remove**. Review and click **Got it**. + +The user is removed. + +> **WARN** +> +> +> **Watch Out!** +> +> - Any approval requests raised by the reportees of a deleted user might be blocked as the reportees do not have a manager assigned on the Dashboard. +> - If the deleted user has pending approvals or is a part of the existing workflows, the approval requests might get blocked. +> - Ensure to modify workflows and re-assign managers after deleting a user, if required. +> + +## Workflows + +Two types of workflows are available: +- Workflow based on group types. +- Workflow based on amount based on roles. + +You can [contact us](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#raise-a-new-request) to set up, modify or remove workflow/s based on your requirements for POs, Invoices or Payouts. diff --git a/llm-content/x/payout-links.md b/llm-content/x/payout-links.md new file mode 100644 index 00000000..7c459562 --- /dev/null +++ b/llm-content/x/payout-links.md @@ -0,0 +1,149 @@ +--- +title: RazorpayX Payout Links +heading: About Payout Links +description: Explore RazorpayX Payout Links, customise branding and see how you can use them. +--- + +# About Payout Links + +RazorpayX Payout Links is an easy way to send funds to anyone, especially when you do not have their bank account details. You just need to enter the recipient's name, phone number or email, and the amount to be paid to create a Payout Link. + +RazorpayX then sends them a link where the [Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md) can then enter their account details (bank account or UPI ID). Once we get their verified account details, we transfer the amount. + +Know more about [how Payout Links work](#how-it-works) and their [use cases](#use-cases). + +> **WARN** +> +> +> **Watch Out!** +> +> - Allowlisting your IP is mandatory for using the Payout Link APIs. Know how to [allowlist your IP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md). +> - Allowlisting is not required for creating Payout Links from the Dashboard. +> +> + +## How it Works + +To make a payout using a Payout Link: + +1. [Create a Payout Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/create.md) by entering: + - Contact details such as name, phone number, email and type + - Amount + - Currency +1. The Payout Link is then sent to the Contact. Contact opens the link and completes OTP verification. +1. The Contact provides their account details where they want to receive the payout. This creates a Fund account for the Contact. +1. The Payout amount is transferred to the Fund account created via the details provided by your Contact. The Contact receives the payout amount. + +![Creating Payout Links process, describing the above process](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-payout_links_flow.jpg.md) + +## Supported Payout Modes + +You can set the Payout Links to debit the necessary amount from your RazorpayX account using any of the following payout modes: + +- `NEFT` +- `IMPS` +- `UPI` + +By default, all the 3 modes are enabled for Payout Links. However, after a certain limit, RazorpayX uses a specific mode to create a successful Payout Link. If the amount is: + +Amount Value | Mode of Payout +--- +Less than ₹2,00,000/- | You can use `IMPS` as the mode of transfer. +--- +More than ₹2,00,000/- | You can use `NEFT` as the mode of transfer. + +The end recipients can add any bank account details to receive the funds; there is no restriction there. + +## Use Single Payout Mode + +You can choose to process Payout Links from your account using only **one particular mode**. For example, you can choose your Payout Links to debit the amount for your account balance using `NEFT` only. + +To do this, [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) and request the feature. The configured mode will be used to process all payouts made via links from your account. + +> **WARN** +> +> +> **Watch Out!** +> +> This is an account-level setting. You cannot choose a single mode for every individual Payout Link. +> + +## Use Cases + +Payout Links help you send money to anyone whose fund account or bank details you do not have. + +### Improve Customer Experience + +Usually you would talk to the recipient via email or phone to get their bank account details. Then you or your finance team upload the details to the bank portal, after which you process the payout. + +This is a time-consuming process with the Contact receiving the money 7-10 days after you contact them. This heavily impacts the customer experience. + +You can instead: +1. Create and send a Payout Link via SMS and email to your Contact. +1. Customer opens the link and enters their bank account details. This creates a Fund Account for the Contact. +1. Payout is processed the instant the customer has entered their account details. + +This boosts your customer's experience and creates a positive impact on your business image. + +### Cash on Delivery Refunds for Ecommerce Businesses + +For any ecommerce business, Cash on Delivery (CoD) is one of the major modes of payment. + +Whenever a CoD order is returned, businesses typically have to reach out to the customer to get their bank account details to refund the order. + +With Payout Links, you just send a Payout Link to your Contact and they can use it to get their refund in their preferred fund account. You can set up the [Shopify Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/shopify.md) integration and simplify refunds for your business. + +### Security Deposit Refunds for Rental Businesses + +You can use Payout Links to collect security deposits when providing rentals. + +When you rent houses, furniture, appliances, clothing, cars and bikes and more, you ask your recipient for the upfront deposit, in exchange for the goods. After the usage period ends, the deposit amount is returned. + +To refund the money, send the Payout Link to your Contact via SMS or email. The Contact enters their account details and gets the security deposit refunded to their preferred account. + +### Cashbacks, Winnings and Incentives + +- **Winnings** + + For Gaming companies, getting fund account information to payout winnings can be a cumbersome process. With Payout Links, you can send them a Payout Link and their winnings can be are processed instantly. +- **Referrals and Cashbacks** + + Any business which wants to offer Cashbacks and other Referral payouts can do so instantly using Payout Links. +- **Incentives** + + Payout Links also work when businesses want to process incentive payouts to partners, customers and so on. + +## Customise Branding + +You can edit how your Payout Link looks when the recipient/Contact clicks and opens the Payout Link. You can: +- Change the background/theme colour. +- Upload your business/company logo. +- Provide support details like phone number, email id, and your official website. + +You can customise your branding in two ways: +- From the Payout Links page. +- From RazorpayX Account Settings menu. + + + 1. On your Dashboard, go to the More Options menu (⋮) next to **+PAYOUT LINK**. + 1. Click **User Guide** to open the **Get Started** section at the top. + 1. Select the **Set Up Payout Links** option and click **EDIT BRANDING**. + ![Payout Links Dashboard on RazorpayX to customise branding](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payout-links-customise-process.jpg.md) + It opens the RazorpayX settings page where you can edit your account and organisation's branding, as shown. + + + + You can directly edit it from the Account Settings menu. To do so: + 1. Navigate to the user profile icon to the top right of your RazorpayX Dashboard. + 1. Click **My Account & Settings** → **Public Profile**, and edit your appearance. + + +Here is how your Payout Link appears after customising. + +![Customise the look and feel of the Payout Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payout-link-customise.jpg.md) + +### Related Information + +- [Create Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/create.md) +- [Payout Links API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-links.md) +- [Payout Link Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md) diff --git a/llm-content/x/payout-links/api.md b/llm-content/x/payout-links/api.md new file mode 100644 index 00000000..3e2b2734 --- /dev/null +++ b/llm-content/x/payout-links/api.md @@ -0,0 +1,41 @@ +--- +title: RazorpayX | Payout Link APIs +heading: Payout Link APIs +description: List of RazorpayX Payout Links API available to perform various actions. +--- + +# Payout Link APIs + +You can use our APIs to perform various actions required to make payouts. You can perform most of these actions from the [RazorpayX Dashboard](https://x.razorpay.com/auth) as well. + +## List of APIs + +The table below lists the various APIs and gives a brief description of each API: + +API Endpoint | Description +--- +[Create Payout Links Using Contact Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-links/create/use-contact-details.md) | Creates a Payout Link using customer's contact details like email id/mobile number. +--- +[Create Payout Links Using Contact ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-links/create/use-contact-id.md) | Creates a Payout Link using the Contact id of the customer. [Create a Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#list-of-endpoints) to generate the Contact id. +--- +[Fetch All Payout Links](/api/x/payout-links/fetch-all) | Retrieves the details of all Payout Links created. Use the query parameters to customise Payout Links retrieval. +--- +[Fetch a Payout Link with ID](/api/x/payout-links/fetch-with-id) | Retrieves the details of a particular Payout Link. +--- +[Cancel a Payout Link](/api/x/payout-links/cancel/) | API to cancel an active Payout Link. +--- + +> **WARN** +> +> +> **Watch Out!** +> +> Allowlisting your IP is mandatory for using the Payout Link APIs. Know how to [allowlist your IP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md). +> +> + +### Related Information + +- [About Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) +- [About Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/apis/subscribe.md) diff --git a/llm-content/x/payout-links/bulk.md b/llm-content/x/payout-links/bulk.md new file mode 100644 index 00000000..a77fea79 --- /dev/null +++ b/llm-content/x/payout-links/bulk.md @@ -0,0 +1,166 @@ +--- +title: Create Bulk Payout Links on RazorpayX +heading: Create Bulk Payout Links +description: Create and process bulk Payout Links and know about the bulk Payout Links' status. +--- + +# Create Bulk Payout Links + +Create Payout Links in bulk using the **Bulk Payout Links** feature. You can create Payout Links for: +- Recipients whose contact details you do not know. +- Recipients whose contact details you know. + +You need your recipients' contact details to send the link. Once they receive the Payout Link, they can enter their account details. RazorpayX then creates a [Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md) and the respective [Fund Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md). + +To create Bulk Payout Links from the RazorpayX Dashboard: +1. Download the [sample template](#sample-template). +1. Add data to the template as per the [required fields](#requested-fields-in-template). +1. Upload the template on the [Dashboard](https://x.razorpay.com/). + +![Create Bulk Payout Links Process from uploaded → created → processed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-bulk-upload.jpg.md) + +## Sample Template + +Download the sample template in `.csv` format. Check the fields you must populate to create corresponding Payout Links. + +[Download .csv](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sample_batch_payout_links.csv.md) + +### Requested Fields in Template + +The table below lists the requested fields listed in the [sample template](#sample-template) and describes each field. + +`Name of Contact` _mandatory_ +: `string` The contact's name. This field is case-sensitive. Has a minimum of 3 characters. and a maximum of 50 characters is allowed. The name cannot end with a special character, except `.`. Supported characters: `a-z`, `A-Z`, `0-9`, `space`, `’` , `-` , `_` , `/` , `(` , `)` and , `.`. For example, `Gaurav Kumar`. + +`Payout Link Amount` _mandatory_ +: `number` The amount, in paise, to be transferred to the contact. For example, `1000`. The minimum value is `100`. + +`Contact Phone Number` _mandatory_ +: `string` The contact's phone number. For example, `9000090000`. + +`Contact Email ID` _mandatory_ +: `string` The contact's email address. For example, `gaurav.kumar@example.com`. + +`Send Link to Phone Number` _mandatory_ +: `string` Determines who sends the Payout Link to the contact via SMS. Possible values: + - `Yes`: Razorpay sends the Payout Link to the contact via SMS. + - `No`: You send the Payout Link to the contact via SMS. + + The possible values are case-sensitive. + +`Send Link to Mail ID` _mandatory_ +: `string` Determines who sends the Payout Link to the contact via email. Possible values: + - `Yes`: Razorpay sends the Payout Link to the contact via email. + - `No`: You send the Payout Link to the contact via email. + + The possible values are case-sensitive. + +`Contact Type` _mandatory_ +: `string` The classification of contact that is being created. For example, `employee`. The following classifications are available by default: + - `vendor` + - `customer` + - `employee` + - `self` + +> **INFO** +> +> **Handy Tips** +Additional classifications can be created from the Dashboard if required. + +`Payout Purpose` _mandatory_ +: `string` The purpose of the payout that is being created. The following classifications are available in the system by default: + - `refund` + - `cashback` + - `payout` + - `salary` + - `utility bill` + - `vendor bill` + +> **INFO** +> +> **Handy Tips**- Additional purposes for payouts can be created from the Dashboard if required. +- This field is case-sensitive. + +`Payout Description` _mandatory_ +: `string` The description for the Payout Link you have created. This appears on the Payout Link hosted page. + +`Reference ID` _optional_ +: `string` A user-generated reference given to the payout. For example, `Acme Transaction ID 12345`. You can use this field to store your own transaction id, if any. + +`Internal notes: Title` _optional_ +: `string` You can enter custom notes for your reference. Enter the note title in this column. Notes are not visible to the contact. For example, `Refund 08 Feb 2021`. + +`Internal notes: Description` _optional_ +: `string` You can enter custom notes for your reference. Enter the note description in this column. Description is not visible to the contact. For example, `Evening Batch`. + +`Expiry Date` _optional_ +: `string` After you [enable expiry](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md#enable-expiry), you can set the expiry date for the payout link. For example, `22/07/2021`. + +`Expiry Time` _optional_ +: `string` After you [enable expiry](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md#enable-expiry), you can enter the expiry time for the payout link. Input should be in the 24-hour format. For example, `14:52`. + +## Process Bulk Payout Links + +To upload and process a bulk file using the RazorpayX Dashboard: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +1. Navigate to **Payout Links** → **Bulk Payout Links** → **+ BULK PAYOUT LINK**. + ![Navigating to uploading bulk Payout Links file on the X Dashboard.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-upload-payoutlink-bulkfile.jpg.md) +1. Download or upload the file. + - You can download the [.csv file sample template](#sample-template) from the Dashboard. + - Or if your template is ready, use **Click to Upload** and upload the file. +1. Click **NEXT**. +1. Select the account from which you want to process the amount. This can either be your: + - RazorpayX Lite + - RazorpayX powered Current Account +1. Enter the OTP sent to your registered mobile number/email address. +1. Click **CREATE PAYOUT LINK**. + +> **INFO** +> +> +> +> **Handy Tips** +> +> You can also [set expiry on Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md). +> + +## Bulk Upload Status + +After you upload the Payout Links Bulk Upload file, it moves through the following statuses: + +> **WARN** +> +> +> **Watch Out!** +> +> The processed state means the bulk file was fully processed. To check the status of the individual Payout Links, download the [Bulk Payout Links Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/report-and-errors.md). +> + +![Bulk Payout Links Statuses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-bulk-upload.jpg.md) + +- `created`: + + This is the initial status of the bulk upload and indicates that the bulk upload was created in the RazorpayX database and is ready to be processed. No processing is done at this point. +- `processed`: + + This is the final status of a bulk upload where the uploaded details are processed. + +## Bulk Payout Link Statuses + +A Payout Link created using the bulk upload feature can have the following statuses during its life cycle: + +- `issued` +- `processing` +- `processed` +- `cancelled` +- `expired` +![Payout Links States and Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-payout_links_states.jpg.md) + +Know more about [Payout Links Statuses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md) and [Payout Statuses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md#payout-states). + +### Related Information + +- [About Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md) +- [Set Expiry for Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md) +- [Shopify Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/shopify.md) diff --git a/llm-content/x/payout-links/create.md b/llm-content/x/payout-links/create.md new file mode 100644 index 00000000..e79e2401 --- /dev/null +++ b/llm-content/x/payout-links/create.md @@ -0,0 +1,94 @@ +--- +title: Create Payout Links on RazorpayX +heading: Create Payout Links +description: Create Payout Links via the Dashboard, API and explore the other Payout Links Dashboard actions available in RazorpayX. +--- + +# Create Payout Links + +You can create Payout Links in two ways: +- [Via the Dashboard](#create-a-payout-link). +- [Via Payout Links APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/api.md). + +You can also [create Payout Links in bulk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/bulk.md). + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot create Payout Links in [Test mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md) on the Dashboard and APIs. Switch to Live mode and use [Live API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md) to create a successful Payout Link. +> + +## Create a Payout Link + +Watch this video to know how to create a Payout Link or read along. + +[Video: https://www.youtube.com/embed/yGxzEFjRSSw] + +To create a Payout Link: +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +1. Navigate to **Payout Links** from the left menu. +1. Click **+PAYOUT LINK**. + ![Payout Links Dashboard highlighting +PAYOUT LINK](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/create-payout-link.jpg.md) +1. Fill in the necessary details such as: + - The account from which the money must be debited. + ![Add the account from which the amount must be debited](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payout-links-create1.jpg.md) + - The Contact to whom you are making the payout. Or, click **Add a new contact** to [create a new Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#create-a-contact). + ![Add the Contact to whom you want to send the link or add a new contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payout-links-create2.jpg.md) + - The contact's email id and phone number. Choose where of the two you want to send the Payout Link to. + ![. Choose email id/mobile number](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payout-links-create3.jpg.md) + - Mandatory details like the Payout Link Amount, Purpose and Description. [Set expiry](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md) for the link if applicable. + - Additional optional details such as reference id and internal notes under **Add more details**. + ![finalise the payout amount and other details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payout-links-create4.jpg.md) +1. Enter the OTP sent to your registered mobile number or email address, and confirm creation of the Payout Link. + +You have successfully created a Payout Link. + +> **INFO** +> +> +> **Handy Tips** +> +> When selecting a contact, you need not specify the associated fund account. If the fund account is already present then the payout amount is immediately transferred. +> + +### When Approval Workflow is Enabled + +In some use cases, you can send the Payout Link for approval from the approver and then forward the link to the contact. Given below is the Payout Link creation flow when If [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) is enabled. + +1. [Create a Payout Link](#create-a-payout-link) on the Dashboard. +1. The Payout Link is then sent to the **Approver** for approval. +1. Once approved, the Payout Link is sent to the Contact on the number and email provided. + +> **INFO** +> +> +> **Handy Tips** +> +> You can set [expiry on Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md). +> + +## Other Actions + +From the Overview page, click on the specific Payout Link and view its details. In the summary pop-up page, you can also: + +- Copy the Payout Link. +- Resend the Payout Link to the same contact and repeat the transaction. +- Cancel the Payout Link. + + You can also hover over the Payout Link row and access the copy, resend and cancel Payout Link options. + +![Summary pop-up page showing the Payout Link details on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payout-links-summary.jpg.md) + +- Using the **Quick Filters** menu, filter out the Payout Links and transactions based on their status and other details. +- As an [Owner/Approver](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md), view the Payout Links pending on you from the same menu. Also view the Payout Links pending on a specific [user role](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams.md). +- Click the download icon to download the Payout Links report for a specific time range. Download as a `CSV` or an `XLS` file or email it. + +![Quick filters menu on Payout Links Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payout-links-quick-filters.jpg.md) + +### Related Information + +- [Payout Links API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-links.md) +- [Create Bulk Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/bulk.md) +- [Shopify Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/shopify.md) diff --git a/llm-content/x/payout-links/faqs.md b/llm-content/x/payout-links/faqs.md new file mode 100644 index 00000000..1ffbc04e --- /dev/null +++ b/llm-content/x/payout-links/faqs.md @@ -0,0 +1,124 @@ +--- +title: RazorpayX Payout Links | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about RazorpayX Payout Links. +--- + +# Frequently Asked Questions (FAQs) + +## Payout Links + + +### 1. Is the Payout Link supported in test mode? + + No, currently it is not supported in [Test mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md). You can only make requests or designate links in Live mode. + + + +### 2. What are the supported modes for creating Payout Links? + + You can create Payout Links via: + - [Payout Link APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-links.md). + - [RazorpayX Dashboard](https://x.razorpay.com/). + - [Bulk upload feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/bulk.md). + + + +### 3. What happens if the payout of a Payout Link fails due to reasons such as bank downtime or incorrect account details? + + If a payout fails due to any reason, the same Payout Link becomes active and moves to the issued state; customers can retry the payout using the same link. + + If the 'Send SMS/Email' setting is set to true, the user will be notified on the respective medium. + + + +### 4. Is the maker-checker applicable for Payout Links? + + Yes, if the [maker-checker](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) is enabled on the account, then it will be applicable. + + + +### 5. Is the Payout Link cancelled if the payout for a Payout Link is rejected? + + No, only the payout is rejected, but the link becomes active again. You must cancel the Payout Link if you do not want to make a payout. + + + +### 6. Can Payout links be resent? + + Payout Links in the `issued` state can be resent only from the [RazorpayX Dashboard](https://x.razorpay.com/). + + + +### 7. If a new link is issued to an old customer, will the customer need to enter the fund account details again? + + No, if the link is sent to an old contact, the previously used fund account details will be displayed. The customers can then choose the old fund account or add a new one. + + You can manually [resend the Payout Link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/create.md#create-a-payout-link) from the Payout Link summary pop-up page. + + + +### 8. Can a Payout link be cancelled? + + If the Fund Account details are incorrect or the Payout Link is no longer relevant, you can cancel the Payout Link via the [Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/create.md#other-actions) or by using the [Cancel a Payout Link API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-links/cancel.md). + + Only Payout Links in the `issued` state can be cancelled. Know more about [Payout Link Statuses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md). If [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) is enabled, [cancel the Payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#cancel-payouts) first and then the Payout Link. + + + +### 9. Can Email/SMS for a Payout Link delivery be disabled? + + Yes, during the creation of a payout, you can select the medium by which it has to be delivered. Both Email/SMS for a Payout Link can be disabled. + + + +### 10. Will the customer receive notification upon payout success? + + Yes, if 'Send Email/SMS' setting was set to true, then the customer receives a notification on successful completion of a payout. + + + +### 11. Does the Payout Link support an expiry time? + + Yes, you can [set expiry](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md#set-expiry) date and time on the Payout Link. + + + +### 12. What happens to Payout Links if funds in a debit account/RazorpayX Lite are less? + + If the funds are insufficient and the user has submitted the link, the Payout Link will be in `queued` state. Once sufficient funds are added, they will be processed. + + + +### 13. What fund account types are supported in Payout Links? + + Refer the table below to know more about fund account types supported for Payout Links. + + Fund account type | RazorpayX Lite | Current Account + --- + Bank Account | Yes | Yes + --- + UPI | Yes | No + --- + Amazon Pay | Yes | No + + + + +### 14. Is IP Allowlisting mandatory for creating Payout Links? + + [Allowlisting your IP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) addresses is mandatory for creating Payout Links through APIs. However, it is not mandatory for creating Payout Links through the Dashboard. + + +## Bulk Payout Links + + +### 1. Is the Bulk Payout Link supported in Test mode? + + No, Bulk Payout Link is not supported in Test mode. You need to create Bulk Payout Links in the Live mode only. + + + +### 2. How can I set expiry for Bulk Payout Links? + + To set expiry for Bulk Payout Links, you must [enable expiry](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md#enable-expiry) on the RazorpayX Dashboard. You can then [set expiry](/x/payout-links/bulk#how-it-works) for bulk Payout Links in the sample template. diff --git a/llm-content/x/payout-links/life-cycle.md b/llm-content/x/payout-links/life-cycle.md new file mode 100644 index 00000000..e166e3bb --- /dev/null +++ b/llm-content/x/payout-links/life-cycle.md @@ -0,0 +1,82 @@ +--- +title: RazorpayX Payout Links Life Cycle +heading: Payout Links Life Cycle +description: Check the RazorpayX Payout Link life cycle and its states from start to end. +--- + +# Payout Links Life Cycle + +A Payout Link can have the following statuses during its life cycle: + +- `pending` +- `issued` +- `processing` +- `processed` +- `cancelled` +- `expired` +- `rejected` + +![Payout Links States and Life Cycle depicting the above-mentioned states.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-payout-links-pl-states.jpg.md) + +### Pending + +As soon as a Payout Link is created, it immediately moves to the `pending` state as shown in the image below. The Payout Link remains in this state until it is sent for approval. This status is applicable only for cases where [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) is enabled. + +![Payout Link Status Pending on RazorpayX Dashboard.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-pending-payout.jpg.md) + +For cases where workflow is not applicable, Payout Link status is updated to `issued` immediately. + +### Issued + +This is the first state a Payout Link acquires when you create and send it to your Contact. The Payout Link remains in the `issued` state until your Contact takes any action. + +From the `issued` state, a Payout Link can move to the following states: + - `processing`: moves to this state when your Contact provides their Fund account details. + - `cancelled`: moves to this state when you cancel the Payout Link. + +### Processing + +A Payout Link moves to this state from the `issued` state when your Contact provides their Fund account details. From the `processing` state, a Payout Link moves to the following states: + - `processed`: moves to this state when the payout to your contact is completed. + - `issued`: moves to this state if the underlying Payout fails. The Contact can try to enter their Fund account details again. No action is required by you. + +### Processed + +A Payout Link moves to this state from the `processing` state when the payout to your contact is completed. This is the last state of the Payout Link. + +### Cancelled + +A Payout Link moves to this state if you cancel it. A Payout Link can move to this state from the `issued` state. + +This is a last state for the Payout Link. + +### Expired + +A Payout Link moves to this state when the payout amount is not claimed by your contact within the stipulated date and time. A Payout Link that has expired can be duplicated to create another Payout Link without having to enter contact or amount details. + +Know how you can [set Payout Links to expire](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md) after a certain duration. + +### Rejected + +A Payout Link moves to the `rejected` state if it is rejected by the Approver. This status is applicable only for cases where [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) is enabled. + +## Payout Life Cycle + +Once your contact clicks on a Payout Link and enters their details, a payout is created. These payouts an have the following statuses during its life cycle: + +- `pending` +- `queued` +- `processing` +- `processed` +- `reversed` +- `cancelled` +- `rejected` +- `failed` + +Refer to [Payout Life Cycle and States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#payout-life-cycle) for more information. + +### Related Information + +- [About Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md) +- [Bulk Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/bulk.md) +- [Shopify Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/shopify.md) diff --git a/llm-content/x/payout-links/report-and-errors.md b/llm-content/x/payout-links/report-and-errors.md new file mode 100644 index 00000000..f025293d --- /dev/null +++ b/llm-content/x/payout-links/report-and-errors.md @@ -0,0 +1,58 @@ +--- +title: Bulk Payout Links Report and Errors on RazorpayX +heading: Bulk Payout Links Report and Errors +description: Download the RazorpayX Payout Links Bulk Upload report and troubleshoot the errors. +--- + +# Bulk Payout Links Report and Errors + +After processing your [Payout Links bulk upload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/bulk.md#process-bulk-payout-links) file, RazorpayX generates a Bulk Upload report. The report shows the: +- Summary of Payout Links created. +- List of Payout Links not created/failed to create. +- Errors and reasons for the failure. + +## Bulk Payout Links Report + +After a bulk upload is processed, download the report from the [RazorpayX Dashboard](https://x.razorpay.com/payout-links). + +### Fields in the Report + +The report contains: +- A summary of the processed file. +- The Contacts, Fund Accounts and Payout Links created as per the contact details the recipient/owner has provided. +- Additional details as per the [fields requested](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/bulk.md#requested-fields-in-template) in the sample template for Payout Links. + +The report has the following additional fields that you can check to see if the individual payouts were created and processed. + +![Processed Bulk Report Example with Payout Id, Error Code and Error Description.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-buk_upload_payouts_processed.jpg.md) + +`Payout Id` +: `string` Unique identifier for the payout. Value is returned only if the payout is successfully created. For example, `pout_FMfjLUuRS9Hlzc`. + +`Error Code` +: `string` The error code for the failure. For example, `BAD_REQUEST_ERROR`. + +`Error Description` +: `string` The reason for the error. For example, `No db records found.` + +## Errors in Bulk Upload + +In some cases, the Payout Links are not created. The reason for failure is shown in the Error Code, whose description you can use to resolve the error. + +The table below lists possible errors and corresponding error messages. + +**S.No** | **Error Message** | **Description** +--- +1 | Invalid Expiry Date format, should be DD/MM/YYYY | Expiry date is not in the DD/MM/YYYY format. Change in batch file and upload again. +--- +2 | Invalid Expiry Time format, should be HH:MM | Expiry time is not in the hh:mm format. Change in batch file and upload again. +--- +3 | Expiry Date missing, but Expiry Time present | Expiry time has been entered but not the expiry date. Enter expiry date in the batch file and upload again. Know about [Payout Link Expiry](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md). +--- +4 | Invalid value for field(s): `expire_by`. Cannot be less than the current time + 15min | Expiry date and time cannot be in the past. Enter a value which is at least 15 minutes ahead of the present time. + +### Related Information + +- [Create Bulk Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/bulk.md) +- [Payout Links Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md) +- [Payout Links FAQs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/faqs.md) diff --git a/llm-content/x/payout-links/reports.md b/llm-content/x/payout-links/reports.md new file mode 100644 index 00000000..a8f6255c --- /dev/null +++ b/llm-content/x/payout-links/reports.md @@ -0,0 +1,29 @@ +--- +title: RazorpayX Payout Links Report +heading: Payout Links Report +description: Download and view Payout Links Report on the RazorpayX Dashboard. +--- + +# Payout Links Report + +You can download all of your transaction data for a specific day, month or any time frame as per your business requirements. This information can be downloaded as a `.csv` or `.xlsx` file, or sent via email to the intended recipients. + +## Download Report + +To generate the report: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Click on the download icon. + ![Download Payout Links Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payout-links-export.jpg.md) +3. Select a period from the drop-down, or select custom dates for which you require the report. +4. Choose the format of your report- `.xlsx` or `.csv`. +5. You can **DOWNLOAD** as well as **EMAIL** the report. You can enter any email address you wish to share the report with as well as select the team members you want to share it with. + +> **WARN** +> +> +> +> **Watch Out!** +> +> Generating reports can take upto 10 minutes. +> diff --git a/llm-content/x/payout-links/set-expiry.md b/llm-content/x/payout-links/set-expiry.md new file mode 100644 index 00000000..df4b8700 --- /dev/null +++ b/llm-content/x/payout-links/set-expiry.md @@ -0,0 +1,124 @@ +--- +title: Set Payout Links Expiry on RazorpayX +heading: Set Payout Links Expiry +description: Check how to set expiry for RazorpayX Payout Links and how to add, modify or delete expiry. +--- + +# Set Payout Links Expiry + +With Payout Links, you can offer cashbacks, refund deposits, or refunds in case of cash on delivery transactions. However, if the end user does not claim the benefit, the amount is not disbursed and this results in bookkeeping issues for enterprises. + +To resolve this, you can set your Payout Links to expire after a certain time. By default, Payout Links do not expire. You must: +1. [Enable Expiry](#enable-expiry) +2. [Set Expiry](#set-expiry) + +The Payout Link then expires on that specific date or after the chosen duration. + +You can set a Payout Link to expire: +- While creating the Payout Link. +- After creating the Payout Link. + +Your contact receives 3 reminders for 3 days before the Payout Link expires. + +## Enable Expiry + +You have to enable the setting to set expiry date on Payout Links. To enable this feature: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **My Account & Settings**. +3. Click **Business Profile**. +4. Scroll to the **PAYOUT LINK EXPIRY** section and enable the feature using the toggle as shown: + ![Enable Payout Link expiry toggle on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payout-links-enable-expiry2.jpg.md) + +You can also enable expiry from the Payout Links Dashboard. +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +1. Navigate to the **More Options** (⋮) menu as shown and click **Expiry Settings** from the menu. + ![Expiry Settings in the Payout Links Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payout-links-enable-expiry1.jpg.md) +1. On the **Business Profile** page, you can enable expiry for Payout Links. + +After you enable expiry, you can set the following for Payout Links: +- Expiry date +- Expiry time + +> **WARN** +> +> +> **Watch Out!** +> +> Ensure the expiry time is greater than the current time by at least 15 minutes. For example, if the current time is `15:00`, the expiry time must be greater than `15:15`. +> + +## Set Expiry + +To set expiry date on a Payout Link: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **Payout Links** from the left menu. +3. Click **+PAYOUT LINK**. +4. Select contact to whom you want to send the Payout Link or add new contact and complete the procedure. +5. Click **NEXT**. +6. Provide details such as amount, Payout purpose, and Payout Reason. +7. Select the **Set Expiry Date** checkbox and add the expiry date and time as shown here: + ![Setting expiry date on Payout Links modal on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payout-link-expiry.jpg.md) +8. Click **PROCEED TO CONFIRM**. +9. Enter the OTP sent to your registered mobile number/email address. +10. Click **CREATE LINK**. + +You can also set expiry after creating the Payout Link and modify it as well. + +### Add Expiry + +To add expiry for existing Payout Links: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/) → **Payout Links** from the left menu. +1. Navigate to the specific Payout Link and open the Payout Link details view. +1. Click **SET EXPIRY DATE**, as shown. + ![Add expiry date for existing links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/add-expiry-date-payout-links.jpg.md) +1. Select the date and the time by when you want the Payout Link to expire. + ![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/expiry-date-time-payout-links.jpg.md) +1. Click **CONFIRM**. + +You have successfully added expiry for an existing Payout Link. + +### Modify Expiry + +To modify the expiry set for a Payout Link: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/) → **Payout Links** from the left menu. +1. Navigate to the specific Payout Link and open the Payout Link details view. +1. Click the edit icon, as shown. + ![Add expiry date for existing links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/modify-expiry-payout-links.jpg.md) +1. Change the date and the time by when you want the Payout Link to expire. + ![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/modify-expiry-date-time-payout-links.jpg.md) +1. Click **UPDATE EXPIRY**. + +You have successfully updated the expiry for an existing Payout Link. + +### Remove Expiry + +You can remove expiry for your Payout Links if they are no longer applicable. To do so: + +1. Click and open the Payout Link details view. +1. Click the edit icon, as shown. + ![Add expiry date for existing links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/modify-expiry-payout-links.jpg.md) +1. Click **REMOVE EXPIRY**. + ![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/modify-expiry-date-time-payout-links.jpg.md) + +You have successfully removed the expiry for a Payout Link. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - Expired Payout Links can be duplicated to create another Payout Link with same details. Contact, Fund Account and amount details are automatically returned in the duplicated Payout Link. +> +> - Once you enable expiry for Payout Links from the Dashboard, you can find the expiry parameters in the API response too (if you are using the [Payout Links API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-links.md)). +> + +### Related Information + +- [About Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md) +- [Create Bulk Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/bulk.md) +- [Shopify Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/shopify.md) diff --git a/llm-content/x/payout-links/shopify.md b/llm-content/x/payout-links/shopify.md new file mode 100644 index 00000000..3fda4ed7 --- /dev/null +++ b/llm-content/x/payout-links/shopify.md @@ -0,0 +1,72 @@ +--- +title: Shopify Payout Links on RazorpayX +heading: Shopify Payout Links +description: Create RazorpayX Payout Links for your Shopify website customers. +--- + +# Shopify Payout Links + +Shopify provides an API based e-commerce platform that enables businesses to set up their stores online. It offers a wide host of services including payments, marketing, maintenance of customer database, and so on. + +Shopify customers can now manage the entire refund process, especially for [cash-on-delivery (COD) refunds](#create-refunds-via-shopify), from the Shopify Dashboard, without having to enter the tracking details manually. + +## Integrate Shopify with RazorpayX + +To start making payouts via Payout Links, you have to first integrate Shopify with RazorpayX. To do this: + +1. Open the Payout Links App page on the Shopify App store using [Shopify App Store](https://apps.shopify.com/payout-links-simple-refunds). +2. Click **Add app**. + ![Add Shopify App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-shopify-payout-links-app-listing.jpg.md) +3. Click **Install app** as shown below: + ![Install Shopify App](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-shopify-payout-links-install-app.jpg.md) + +You are redirected to the RazorpayX Dashboard to complete the rest of the integration steps. + +## Complete the Integration + +To complete the integration: + +1. Select **Merchant**. Note that only users who are owners or have admin rights have the access to integration. +2. Click **COMPLETE INTEGRATION**. + +Upon successful integration, you see a success message on the page. With this, the integration is complete. + +## Create Refunds via Shopify + +Now that the integration is complete, you can generate Payout Links to your Shopify customers and process refunds when necessary. To do so, you must first create a Payout Link for the refund, and then verify and approve it. The steps for the same are explained below. + +To create Payout Links for refunds on Shopify: + +1. Log in to your Shopify store. +2. In the Store Home page, go to **Orders** in the left menu. The Orders page is displayed with a list of orders placed in the store. +3. Select the order for which refund has to be made. +4. Under the **More actions** option in the order page, select **Refund via Payout Links** as shown below: + ![Shopify Refund via Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-shopify-payout-links-refund-via-pl.jpg.md) + +You are redirected to the Create Payout Link window of the [RazorpayX Dashboard](https://x.razorpay.com/). If you are not already logged in to the Dashboard, you will be redirected to the login window. Please log in to continue. + +On the Create Payout Link pop-up page: + +1. The order details such as Amount, Order Id, Customer Name, Customer contact information are automatically fetched from Shopify. +2. Verify the payout details for creating a refund and click **PROCEED TO CONFIRM** as shown below. + ![Proceed to Confirm Refund](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-shopify-payout-links-create-pl-confirm.jpg.md) +3. To confirm creation of Payout Link, enter the OTP sent to the registered mobile number. Once confirmed, a success message is displayed as shown below: + ![Payout Link Created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-shopify-payout-links-pl-success-msg.jpg.md) + +After a Payout Link is created using Shopify, the Payout Link is displayed in the ADDITIONAL DETAILS section in the right panel of the Shopify Dashboard as well. + ![Updates on Shopify Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-shopify-payout-links-pl-status-on-shopify-panel.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> You can use the **Using Shopify** filter in the **Quick Filters** option to view Payout Links created using Shopify in the Payout Links page. +> ![Sorting Payout Links by selecting Shopify in Quick Filters.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-shopify-quickfilter.jpg.md) +> + +### Related Information + +- [About Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md) +- [Payout Link Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/life-cycle.md) +- [Set Expiry for Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/set-expiry.md) diff --git a/llm-content/x/payout-wallet/amazon.md b/llm-content/x/payout-wallet/amazon.md new file mode 100644 index 00000000..860bdffc --- /dev/null +++ b/llm-content/x/payout-wallet/amazon.md @@ -0,0 +1,82 @@ +--- +title: RazorpayX | Amazon Payout Gift Card +heading: About Amazon Payout Gift Card +description: Make payouts to an Amazon Pay Gift Card via the RazorpayX Dashboard and understand the terms and conditions applicable. +--- + +# About Amazon Payout Gift Card + +You can make payouts to Amazon Pay Gift Cards using your [RazorpayX Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/razorpayx-lite.md). Once you process the payout, the amount gets instantly credited to your end customer's Amazon Pay Gift Card balance. + +You can make payouts of up to ₹10,000 (per transaction) to the beneficiary. There is no limit to the number of transactions you can make. + +All you need to create and process the payout is the beneficiary's phone number. The beneficiaries do not need to have their KYC completed on their Amazon Pay account to receive the Amazon Pay Gift Card balance. + +## Making Payouts to Amazon Pay Gift Card Wallet + +> **INFO** +> +> +> **Handy Tips** +> +> - This feature is available only on [RazorpayX Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/razorpayx-lite.md). +> - You cannot make payouts to Amazon Pay directly from your RazorpayX - Current Account. You must add funds to RazorpayX Lite and make payouts. +> - Transaction limit is ₹10,000/- per transaction. +> - There is no limit on the balance an end customer can have in their Amazon Pay Gift Card balance. +> - Amazon Pay Gift Card balance works same as the Amazon Pay Wallet balance. +> + +## How it Works + +1. Create a [Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#create-a-contact-with-fund-account). +2. Create a Fund account with `type: wallet` and `provider: amazonpay`. +3. Create a payout with `mode: amazonpay`. +4. The money is credited to the Amazon Pay Gift Card balance linked to the beneficiary's phone number. + +## Payout Life Cycle + +See: [Payout states and life cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md). + +## Actions + +Action | API | Dashboard | Bulk Upload +--- +Create a payout via Amazon Pay | ✓ | ✓ | x +--- +View payout details | ✓ | ✓ | x + +Know more about [creating a Fund account via API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-wallet/create/fund-account.md) with `type: wallet` and `provider: amazonpay` and [creating payouts via Amazon Pay](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-wallet/create/payout.md). + +## Terms and Conditions + +Amazon Pay Gift Cards are issued by Pine Labs Private Limited under the brand name of Qwikcilver and co-branded with Amazon Pay (India) Private Limited. Below are the terms and conditions when making a payout via an Amazon Pay gift card: + +- Any unused Gift Card balance will remain associated with the redeemers Amazon Pay balance account and applied to purchases in order of earliest expiration date. +- Gift Cards, including any unused Gift Card balances, expire one year from the date of issuance. You may request for revalidation of any expired Gift Cards. Upon receipt of such request, the Gift Card may be revalidated after due verification and subject to applicable terms and conditions. +- Gift Cards may only be purchased in denominations ranging from ₹10 to ₹ 10,000, or such other limits as Pine Labs may determine. +- Gift Cards cannot be used to purchase other gift cards. +- Gift Cards cannot be reloaded, resold, transferred for value or redeemed for cash. Except as provided hereunder or as per applicable law, amount in your Gift Cards will not be refunded to you under any circumstances. No refund will be provided in cash, at any point of time. +- Pine Labs is not responsible if a Gift Card is lost, stolen, destroyed or used without permission. +- For complete terms and conditions, see the [Amazon India Gift Card Terms and Conditions](https://www.amazon.in/gp/help/customer/display.html?nodeId=201522810). +- You can view your [gift card transaction statement](https://amazonbal.qwikcilver.com). + +## Branding Guidelines + +The Amazon brand is a valuable company asset to Amazon. You can use the Amazon name, logo and wallet image in a limited capacity within the requirements outlined by Amazon. + +Know more about to the [Amazon Branding Guidelines](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-wallet/amazon/branding-guidelines.md). + +> **INFO** +> +> +> **Payouts Demo** +> +> [Check out the RazorpayX Payouts Demo](https://x.razorpay.com/demo?utm_source=docs&utm_medium=fold&utm_id=demo) to understand how to create and make payouts in 4 simple steps. Experience making payouts in a jiffy, without having to sign up! +> +> [![Payouts Dashboard Demo](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-payouts-demo.gif.md)](https://x.razorpay.com/demo?utm_source=docs&utm_medium=fold&utm_id=demo) +> + +### Related Information + +- [Amazon Brand Guidelines](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-wallet/amazon/branding-guidelines.md) +- [Amazon Payout APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-wallet.md) diff --git a/llm-content/x/payout-wallet/amazon/api.md b/llm-content/x/payout-wallet/amazon/api.md new file mode 100644 index 00000000..fe3d4ebc --- /dev/null +++ b/llm-content/x/payout-wallet/amazon/api.md @@ -0,0 +1,28 @@ +--- +title: RazorpayX | Amazon Payout Wallet +heading: Payout Wallet - Amazon APIs +description: List of RazorpayX Payouts Wallet APIs available to perform various actions. +--- + +# Payout Wallet - Amazon APIs + +You can use our APIs to perform various actions necessary to create payouts. You can perform most of these actions from the [RazorpayX Dashboard](https://x.razorpay.com/auth) as well. + +## List of APIs + +The table below lists the various endpoints and gives a brief description of each: + +API Endpoint | Description +--- +[Normal Payout API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-wallet/create/contact.md) Includes: - [Create a Contact API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-wallet/create/contact.md) +- [Create a Fund Account of type `wallet` API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-wallet/create/fund-account.md) +- [Create a Payout API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-wallet/create/payout.md) + | Creates a normal payout to your Contact's Amazon Pay Gift Card. +--- +[Composite Payout API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-wallet/create/payout-composite.md) | Create a Contact, Fund Account and make the payout to your Contact's Amazon Pay Gift Card at once using [Composite API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-composite.md). + +### Related Information + +- [Payout Wallets](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-wallet/amazon.md) +- [Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/apis/subscribe.md) diff --git a/llm-content/x/payout-wallet/amazon/branding-guidelines.md b/llm-content/x/payout-wallet/amazon/branding-guidelines.md new file mode 100644 index 00000000..ad5aa0e8 --- /dev/null +++ b/llm-content/x/payout-wallet/amazon/branding-guidelines.md @@ -0,0 +1,156 @@ +--- +title: RazorpayX | Amazon Branding Guidelines +heading: Amazon Branding Guidelines +description: Check the Amazon branding guidelines to use the Amazon name, logo and gift card image on your website. +--- + +# Amazon Branding Guidelines + +The Amazon brand is a valuable company asset to Amazon. You can use the Amazon name, logo and gift card image in a limited capacity within the requirements outlined by Amazon. + +This page lists the guidelines you must follow when using the Amazon Pay Gift Card brand. + +## Amazon Branding Guidelines + +### 1. Logo Usage Guidelines + +The logos and graphics shown may not be altered in any way. They must be used in accordance with the Logo Usage Guidelines. + +You can download the logos using the button below. The link has the gift card images and Amazon Company Logos for approved usage. Only use the logos downloaded using the below button. + +[Download Amazon Company Logos](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/Amazon-Pay-Logos.zip.md) + +![Four variations of the Amazon Pay Gift Card Logo approved for use.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-amazon-pay-branding-guidelines-1.jpg.md) + +### 2. Proper Product Name + +**Amazon Pay Gift Card** is the product name. The 4-word product name should always be capitalized and should not be broken up. It is **not** a *gift certificate* or *e-gift card*. If you are describing the gift card value, display the rupee amount first. For example, **₹100 Amazon Pay Gift Card**. + +![Amazon Pay Gift Card example comparing between proper and improper branding of the gift card.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-amazon-pay-branding-guidelines-2.jpg.md) + +### 3. Display Disclaimer + +Always display the disclaimer when showing the Amazon logo or product name. Below is the disclaimer text. Use it as-it-is. + +**Replicate the disclaimer below. Do not change**. + +Disclaimer: *Amazon.in is not a sponsor of this promotion. Amazon Pay Gift Cards (GCs) are issued by QwikCilver Solutions Private Limited (QwikCilver). GCs may be used only for the purchase of eligible products/services on Amazon.in or other partner sites. Gift Card balances must be used within 1 year of the date of purchase/activation and any unspent balance shall expire in 1 year from the date of purchase. GCs cannot be transferred for value or redeemed for cash. QwikCilver, Amazon Seller Services Private Limited (Amazon) or their affiliates are not responsible if a Gift Card is lost, stolen, destroyed or used without permission. To redeem your Gift Card, visit [www.amazon.in/addgiftcard](https://www.amazon.in/giftcardtnc). For complete terms and conditions, see [www.amazon.in/giftcardtnc](https://www.amazon.in/giftcardtnc). All Amazon ®, ™ and © are IP of Amazon or its affiliates. For detailed Amazon Pay Gift Card terms and conditions refer, to [www.amazon.in/addgiftcard](https://www.amazon.in/giftcardtnc). + +![Comparing two creatives that show and do not show disclaimer. Always show Amazon Pay Gift Card Disclaimer.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-amazon-pay-branding-guidelines-3.jpg.md) + +### 4. Amazon is not a Sponsor + +Your use of the Amazon brand should not imply partnership, endorsement or sponsorship. You agree that you will not misrepresent or embellish the relationship between Amazon and your business. + +![Two example creatives following and not following no-sponsorship guidelines.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-amazon-pay-branding-guidelines-4.jpg.md) + +### 5. Nothing is Free + +No statements can refer to the gift card as **free**. + +![Comparing a proper Amazon creative with an improper one that uses the word 'Free'. Do not say 'Free'.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-amazon-pay-branding-guidelines-5.jpg.md) + +## General Brand Guidelines + +### 1. Physical copies for customer promotion + +- **Amazon Pay Brand** + + Use the appropriate [Amazon Pay text and logos](#1-logo-usage-guidelines). Do not use Amazon.com text or logo. +- **Amazon Pay Gift Card Terms and Conditions** + + The link to [Amazon Pay Gift Card terms and conditions](https://www.amazon.in/giftcardtnc) should be included in all communications. +- **Amazon Pay Gift Cards** + + The text should be **Amazon Pay Gift Cards** with G and C in upper case and space between **Gift** and **Cards**. The Gift Card value should be prefixed with ₹. [Appropriate logos](#1-logo-usage-guidelines) used should be used. +- **Disclaimer** + + The first prominent mention of Amazon Pay Gift Cards should be followed by asterisk (`*`). + The asterisk (`*`) must reference the [disclaimer text](#3-display-disclaimer) on the same page. +- **Amazon Pay Gift Cards Logo** + + Amazon Pay Gift Cards logo should not be prominent compared to the brand logo. + +### 2. Client emailers to customers with Gift Card branding + +- **Amazon Pay Brand** + + The term to be used is Amazon Pay Gift Vouchers/Amazon Pay Gift Cards and the logo used is Amazon Pay Gift Cards. Amazon.com/amazon.in text or logo should **NOT** be used. Also, Amazon Vouchers/Amazon Coupons, etc., should **NOT** be used. +- **Amazon Gift Cards** + + The text should be **Amazon Pay Gift Cards** with G and C in upper case and space between **Gift** and **Cards**. The Gift Card value should be prefixed with ₹. +- **Disclaimer** + + The first prominent mention of Amazon Pay Gift Cards/Voucher should be followed by asterisk (`*`). + The asterisk (`*`) must reference the link to the [Amazon Pay Gift Card terms and conditions page](https://www.amazon.in/giftcardtnc). +- **Offer Callout** + + Action to be taken by customer followed by Reward Customer Gets. + For example, *Complete Credit Card application to receive ₹ 1000 Amazon Pay Gift Voucher* +- **Prominence of the Amazon Pay Gift Card voucher** + + Amazon Pay Gift Card voucher should occupy less than 10% of the email space. + +### 3. Do Not Mention Amazon Pay Gift Cards/Amazon Pay Vouchers + +Listed below are some of the use-cases for which B2C emailers **cannot** mention Amazon Pay Gift Cards/Amazon Pay Vouchers: +- Spam communication where a customer has won something or has been selected by luck. +- Communication that does not prominently mention the brand that is sponsoring the promotion. +- Communication that does not prominently mention the product/service being promoted and the action that the customers need to take. + +### 4. Banner Communication + +Refer to [https://www.amazon.in/l/17543658031](https://www.amazon.in/l/17543658031) for banner communication guidelines. + +## Appendix + +### 1. Prohibited Affiliations + +The Amazon brand should not be associated with brands from the following categories: +- Alcohol and alcoholic products +- Animals and animal products +- Adult-oriented products and services +- Currency, coins and cash equivalents +- Drugs and drug paraphernalia +- Gambling and lottery +- Hazardous and dangerous Items +- Human parts and burial artifacts +- Illegal drugs +- Medical devices and accessories +- Offensive products, products containing prohibited images of children and any other violent, offensive, obscene or sexual content that is unlawful +- Postage meters and stamps +- Sexual wellness +- Stolen property and lock picking devices +- Surveillance equipment +- Tobacco and tobacco-related products +- Weapons and firearms +- Fireworks or other pyrotechnics +- Regulated activities such as bail bonds, security brokers, bankruptcy, debt settlement services, telemarketing, structured settlement services, embargoed goods and countries +- Anything that could at Amazon's sole discretion be construed as an illegal, inappropriate, misleading or offensive activity + +### 2. Templates for B2C Communication + +Shown below are a few examples of the most common creative templates that follow the Amazon Branding Guidelines. + +#### Email Template + +In centre-aligned text, the template for Email shows the following in that specific order: + +![Amazon Pay Gift Card B2C Email Template showing above-mentioned details.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-amazon-pay-branding-guidelines-email.jpg.md) + +#### SMS Template + +In centre-aligned text, the template for SMS shows the following in that specific order: + +![Amazon Pay Gift Card B2C SMS Template showing above-mentioned details.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-amazon-pay-branding-guidelines-sms.jpg.md) + +#### Onsite Template + +In centre-aligned text, the template for on the site shows the following in that specific order: + +![Amazon Pay Gift Card B2C Onsite Template showing above-mentioned details.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-amazon-pay-branding-guidelines-onsite.jpg.md) + +### Related Information + +- [About Amazon Payout Wallet](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-wallet/amazon.md) +- [Amazon Payout APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-wallet.md) diff --git a/llm-content/x/payouts.md b/llm-content/x/payouts.md new file mode 100644 index 00000000..72fa2aca --- /dev/null +++ b/llm-content/x/payouts.md @@ -0,0 +1,373 @@ +--- +title: RazorpayX | Payouts +heading: About Payouts +description: Create and process payouts on the RazorpayX Dashboard. Understand the payout modes, actions and features. +--- + +# About Payouts + +Payouts are transactions made to contacts. For every payout, you need to specify the amount, the contact, and the payout purpose. You become eligible to make payouts after you sign up, complete the account activation and KYC verification. + +A payout transaction is made to a [Fund account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md) associated with a [Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md). Contact is the beneficiary (person or institution) and Fund account is the account used for payment transactions. + +> **SUCCESS** +> +> +> **What's New** +> +> You can now initiate payouts directly to mobile numbers using the [Payout Composite API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-composite/create/phone-number.md). This feature is currently not available on dashboard. +> + + +### Features and Functions + + Payouts in RazorpayX come with variety of features and functions. You can: + - [Add attachments](#add-attachments) to your payouts and help customers and clients reconcile payments. + - [Create Payout Purpose](#create-payout-purpose) as a narration to the payment to give context. You can create new or/and use the existing ones. + - [Create and view Payout summary](#actions) as created. + - [Use the various supported payout modes](#payout-modes) to process payouts from RazorpayX Lite and Current Account. + - [Make payouts in Test Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md#payouts) to understand the payout process and life cycle. + + If a payout fails at any stage, [a reversal is created](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md#reversal-transaction), which ends with the debited balance being credited back to your RazorpayX account. + + The payout amount, fees and tax are deducted from your RazorpayX account balance. These appear as a debit against your RazorpayX account. Know more about [Billing in RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/billing.md). + + +> **WARN** +> +> +> **Watch Out!** +> +> - Making payouts from [RazorpayX Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/razorpayx-lite.md) account to RazorpayX Lite Customer Identifiers or Razorpay [Customer identifiers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/smart-collect.md) is not supported. +> - The payout modes are case-sensitive. When creating payouts using APIs, ensure payout modes are entered in upper case. +> +> + +## How to Make Payouts + +You can make payouts in 3 simple steps: + +1. Add funds to your business account. +2. Create a Contact and a Fund account. This is similar to adding a beneficiary on your netbanking portal. Know more about adding [ Contacts and Fund accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md). +3. Make a payout. + +![Create Payout by adding funds → create Contact and Fund Account → create Payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-create-payout.jpg.md) + +> **INFO** +> +> +> +> **Payouts Demo** +> +> [Check out the RazorpayX Payouts Demo](https://x.razorpay.com/demo?utm_source=docs&utm_medium=fold&utm_id=demo) to understand how to create and make payouts in 4 simple steps. Experience making payouts in a jiffy, without having to sign up! +> +> ![Demo of RazorpayX, showing how to make a payout in Live mode.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-payouts-demo.gif.md) +> +> + +### Create a Payout + +Watch the video to know how to create payouts. + +[Video: https://www.youtube.com/embed/uJfaqH64BLE] + +To make a Payout: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. You can navigate to Payouts in two ways: + - Click **+ Payouts** on the top-right side of the Dashboard or + - Hover over Payouts on the left navigation and click **+**. + - You can also click Payouts on the left navigation and then click **+ Payouts** on the left side. +3. Select an existing contact or [create a new one](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#create-a-contact). +4. Hover over the fund account to which you want to make the payout and click **NEXT** or [**+ FUND ACCOUNT**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md#update-a-contact-and-fund-account) as per requirement. +5. Enter the total amount to be paid and click **Next**. +6. Select the Payout Details: + - Payout Purpose (_mandatory_) + - Debit from (_mandatory_) + - Transfer Type (_mandatory_) + - Attachment (_optional_) + - Additional details (_optional_) +7. Click **Next**. An OTP is sent to your registered mobile number and email id. Enter the OTP to confirm the Payout. +8. Click **Pay**. + + +> **INFO** +> +> +> **Is your payout in `processing` state?** +> +> You can check status details of a payout to know why it is in the `processing` state. +> +> 1. [Status Details via API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) +> 2. [Status Details via Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/status-details.md) +> 3. You can subscribe to daily reports to receive a detailed document on the status, reason for status and SLA for the payouts in `processing state`. [Raise a support ticket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) from the Dashboard, with a list of recipient email IDs. We will enable the function for you in 3 working days. +> + +> **WARN** +> +> +> **Watch Out!** +> +> If you get the below response while trying to complete a payout, it is recommended to wait for sometime and retry the payout if required, after the status is updated on the Dashboard. +> +> ![Payout in progress](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/5xx.jpg.md) +> +> +> + +### Payout Purpose + +You can add a payout purpose as a narration to the payout as it leads to easier reconciliation. You can choose an existing purpose or create a new one while making the payout itself. **You can add up to 400 Payout Purposes.** + + +### Create Payout Purpose + + To create payout purpose via the Dashboard: + + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). + 2. Navigate to **Payouts** on the left navigation and click the more options (**⋮**) menu. + 3. Click **Create New Purpose**. + ![Create New Payout Purpose](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-create-new-purpose.jpg.md) + 4. Enter name for the purpose. + 5. Click **CREATE PAYOUT PURPOSE**. + ![Create Payout Purpose](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-create-payout-purpose-final.jpg.md) + + The payout purpose is created. + + Alternately, you can also assign a payout purpose while creating a payout. Select purpose from the Payout Purpose drop-down menu or click **+ ADD PAYOUT PURPOSE** to create a new one. + + ![Select Payout Purpose](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/choose-payout-purpose.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> You cannot delete or edit a Payout Purpose once it is created. +> + + +### Upload Attachments During Payout Creation + + To add attachments during the payout creation process: + + 1. On your Dashboard, [create a Payout](#how-to-make-payouts). + 2. In the **Payout Details** page of creating a payout, add files against **Attachment**, as shown. + - You can upload files with `.pdf`, `.jpg`, `.jpg`, `.doc` and `.xls` extensions. + - The supported file size is upto 5 MB. + - Drag and drop the file or click **browse** to upload it from the system. + + + The image below shows how to add an attachment during the payout creation process. You can also add [after creating payouts](#upload-attachments-after-payout-creation). + + ![Payout Details asking (compulsory) Payout Purpose, Debit Account, Transfer Type and (non-compulsory) Attachment.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payouts-add-attachments.jpg.md) + 3. Add other details in **+ ADDITIONAL DETAILS** if required and click **NEXT**. Enter the OTP and proceed to pay. + + + +### Upload Attachments After Payout Creation + + To add attachments after the Payout is created: + 1. In you Payouts Dashboard, click on the Payout you want to add an attachment to. + 1. Navigate to **Attachment** in pop-up page that appears to the right. + 1. Click **Upload** and upload the attachment file. The supported file type remain [as mentioned above](#upload-attachments-during-payout-creation). + + ![Payout summary pop-up showing Payout details and highlighting Attachment and Upload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payouts-add-attachment-2.jpg.md) + + + +## Cancel Payouts + +You can cancel the payouts in a [`queued`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md#queued), [`pending`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md#pending) or [`scheduled`](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md#scheduled) state only. + + +### Cancel Payout + + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). + + Either: + + 2. Navigate to **Payouts**. + 3. Hover over the payout you want to cancel and click **CANCEL**. Your payout is cancelled. + ![Cancel Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-cancel-payouts.jpg.md) + + Or you can also: + + 2. Select the payout you want to cancel. + 3. Click **CANCEL PAYOUT** on the right pane. Your payout is cancelled. + ![Cancel Payouts from RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-cancel-payouts-2.jpg.md) + + +### Actions + +Action | API | Dashboard | RazorpayX Mobile App | Bulk Upload +--- +Create a Payout | ✓ | ✓ | ✓ | ✓ +--- +View payout details | ✓ | ✓ | ✓ | x + +Know more about creating [payouts using APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts.md) and [payouts in bulk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts/bulk-uploads.md). + +## Payout Modes and TAT + +You can make payouts using any one of the following payout modes (IMPS/RTGS/NEFT/UPI). The transaction limits and operating hours for each payout mode is listed below. + + +### RazorpayX Lite + + The transaction limits and operating hours for different payout modes for [RazorpayX Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types.md#virtual-account) are as below: + + + + + When the payout mode is IMPS for the following conditions: +- **Fund account type**: `bank_account` +- **Amount limit**: Upto ₹5 lakh (per transaction) + +The transaction is processed to the fund account immediately on all days, 24x7. + + + When the payout mode is NEFT for the following conditions: +- **Fund account type**: `bank_account` +- **Amount limit**: Above ₹1 (per transaction) + +Transactions are processed to fund accounts within 2 hours, if initiated on working days between 2:00 am and 6:00 pm. + + + When the payout mode is RTGS for the following conditions: +- **Fund account type**: `bank_account` +- **Amount limit**: Above ₹2 lakh (per transaction) + + Transactions are processed to fund accounts within 2 hours, if initiated on working days between 2:00 am and 6:00 pm. + + + When the payout mode is UPI for the following conditions: +- **Fund account type**: `vpa` +- **Amount limit**: Upto ₹1 lakh (per transaction) + +The transaction is processed to the fund account immediately on all days, 24x7. + + + When the payout mode is NEFT for the following conditions: +- **Fund account type**: `wallet` +- **Amount limit**: Upto ₹10,000 (per transaction) + +The gift card is sent to the fund account immediately. + + + + + +### Current Account + + The transaction limits and operating hours for different payout modes for [Current account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types.md#current-account): + + + + + When the payout mode is IMPS for the following conditions: +- **Fund account type**: `bank_account` +- **Amount limit**: Upto ₹5 lakh (per transaction) + +The transaction is processed to the fund account immediately on all days, 24x7. + + + When the payout mode is NEFT for the following conditions: +- **Fund account type**: `bank_account` +- **Amount limit**: Above ₹1 (per transaction) + +The transaction is processed to the fund account within 2 hours if initiated on working days between:- 2:00 am and 6:00 pm ( from **IDFC First Bank** or **RBL** Accounts) +- 1:00 am and 6:45 pm (from **ICICI Bank** or **Yes Bank** Accounts) + +[Contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) for enabling **NEFT 24 * 7** in RBL and Yes Bank accounts. + + + IDFC First Bank Holiday List + + - January 26, 2026 (Republic Day) + - August 15, 2026 (Independence Day) + - October 2, 2026 (Gandhi Jayanti) + - All Sundays + - All 2nd and 4th Saturdays + + + +### ICICI Bank Holiday List + + - January 26, 2026 (Republic Day) + - August 15, 2026 (Independence Day) + - October 2, 2026 (Gandhi Jayanthi) + - December 25, 2026 (Christmas) + - All Sundays + - All 2nd and 4th Saturdays + + + +### Yes Bank Holiday List + + - January 26, 2026 (Republic Day) + - August 15, 2026 (Independence Day) + - October 2, 2026 (Gandhi Jayanthi) + - All Sundays + - All 2nd and 4th Saturdays + + + +### Axis Bank Holiday List + + - January 26, 2026 (Republic Day) + - August 15, 2026 (Independence Day) + - October 2, 2026 (Gandhi Jayanthi) + - All Sundays + - All 2nd and 4th Saturdays + + + +### RBL Holiday List + + - January 26, 2026 (Republic Day) + - August 15, 2026 (Independence Day) + - October 2, 2026 (Gandhi Jayanthi) + - December 25, 2026 (Christmas) + - All Sundays + - All 2nd and 4th Saturdays + + + +### Slice Holiday List + + - Operational on all days regardless of bank holidays. + + + + + + When the payout mode is RTGS for the following conditions: +- **Fund account type**: `bank_account` +- **Amount limit**: Above ₹2 lakh (per transaction) + +The transaction is processed to the fund account within 30 minutes, if initiated on working days between:- 2:00 am and 6:00 pm ( from **IDFC First Bank** Accounts) +- 9:30 am and 5:15 pm (from **ICICI Bank** Accounts) +- 7:00 am and 6:30 pm (from **Yes Bank** Accounts) +- 8:00 am and 5:30 pm (from **RBL** Accounts) + +RTGS holidays: 2nd and 4th Saturdays and all Sundays for all banks. + + + Currently, the UPI facility is available only for RBL and Yes Bank Current Accounts. +When the payout mode is UPI for the following conditions: +- **Fund account type**: `vpa` +- **Amount limit**: Below ₹1 lakh (per transaction) + +The transaction is processed to the fund account immediately on all days, 24x7. + + + + + +### Related Information + +- [Payout Life Cycle and States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md) +- [Payout Status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/status-details.md) +- [Payout Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/best-practices.md) diff --git a/llm-content/x/payouts/api.md b/llm-content/x/payouts/api.md new file mode 100644 index 00000000..7c93e838 --- /dev/null +++ b/llm-content/x/payouts/api.md @@ -0,0 +1,119 @@ +--- +title: RazorpayX | Payouts APIs +heading: Payouts APIs +description: List of RazorpayX Payouts APIs available to perform various actions. +--- + +# Payouts APIs + +You can use the Razorpay's Payout APIs to perform various actions. You can perform most of these actions from the [RazorpayX Dashboard](https://x.razorpay.com/auth) as well. + +> **SUCCESS** +> +> +> **What's New** +> +> You can now initiate payouts directly to mobile numbers using the [Payout Composite API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-composite/create/phone-number.md) +> + +> **WARN** +> +> +> **Watch Out!** +> +> It is mandatory to [allowlist IPs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md) and pass the [idempotency key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) to make a successful payout. +> + +## Payout APIs + +The table below lists the various endpoints and gives a brief description of each: + +API Endpoint | Description +--- +[Creates a Payout to a Bank Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts/create/bank-account.md) | Create a payout to a bank account. +--- +[Create a Payout to a VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts/create/vpa.md) | Creates a payout to a VPA. +--- +[Fetch a Payout with ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts/fetch-with-id.md) | Retrieves details of one payout via ID. +--- +[Fetch all Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts/fetch-all.md) | Retrieves details of all the payouts. +--- +[Cancel a Queued Payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts/cancel.md) | Cancels a payout in `queued` state. + +## Payout to Cards APIs + +The table below lists the various endpoints and gives a brief description of each: + +> **WARN** +> +> +> **Watch Out!** +> +> Payouts via **Visa Direct** and **MasterCard Send** are temporarily unavailable. Please watch this space for further updates. +> +> +> + +API Endpoint | Description +--- +[Make Payouts to Cards without saving cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards/create/without-saving-card.md) | Make a payout to a card without saving card details. +--- +[Create Fund Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards/create/save-card/external-token/fund-account.md) to make Payouts to Externally Tokenised Card | Creates a fund account for a tokenised card via external tokenisation providers. +--- +[Make Payouts to Externally Tokenised Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards/create/save-card/external-token/payout.md) | Makes a payout to a tokenised card via external tokenisation providers. +--- +[Create Fund Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards/create/save-card/razorpay-tokenhq/fund-account.md) to make Payouts to Tokenised Card with Razorpay TokenHQ | Creates a fund account for a tokenised card via via Razorpay Token HQ. +--- +[Make Payouts to Tokenised Card with Razorpay TokenHQ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards/create/save-card/razorpay-tokenhq/payout.md) | Makes a payout to a tokenised card via via Razorpay Token HQ. + +## Payout Composite API + +The table below lists the various endpoints and gives a brief description of each: + +API Endpoint | Description +--- +[Create a Composite Payout to Mobile Number](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-composite/create/phone-number.md) | Creates a payout to a contact's mobile number. +--- +[Create a Composite Payout to Bank Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-composite/create/bank-account.md) | Creates a payout to a contact's bank account. +--- +[Create a Composite Payout to VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-composite/create/vpa.md) | Creates a payout to a contact's VPA (UPI). +--- +[Create a Composite Payout to Card](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-composite/create/card.md) | Creates a payout to a contact's card. + +## Payout Approval API + +The table below lists the various endpoints and gives a brief description of each: + +API Endpoint | Description +--- +[Approve Payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-approval/approve.md) | Approves the payout. +--- +[Reject Payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-approval/reject.md) | Rejects the payout. + +## Payout Idempotency API + +The table below lists the various endpoints and gives a brief description of each: + +API Endpoint | Description +--- +[Request Idempotent Payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) | Requests for an idempotent payout. + +## Transactions APIs + +The table below lists the various endpoints and gives a brief description of each: + +API Endpoint | Description +--- +[Fetch All Transactions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/transactions/fetch-all.md) | Retrieves all the transactions made from your business account. +--- +[Fetch Transaction with ID](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/transactions/fetch-with-id.md) | Retrieves a particular transaction. + +## Payout Status Details + +[Status details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) are sent as part of the fetch payout API response and webhook payloads. It provides additional details about each payout status. A payout update webhook is sent every time an attribute in status details changes. + +### Related Information + +- [Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) +- [Fund Account APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts/api.md) +- [Subscribe to Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/apis/subscribe.md) diff --git a/llm-content/x/payouts/best-practices.md b/llm-content/x/payouts/best-practices.md new file mode 100644 index 00000000..c3c2cd10 --- /dev/null +++ b/llm-content/x/payouts/best-practices.md @@ -0,0 +1,154 @@ +--- +title: RazorpayX Payouts Best Practices +heading: Payouts Best Practices +description: Check the best practices when integrating RazorpayX payouts. +--- + +# Payouts Best Practices + +The following table lists the best practices for integrating RazorpayX payouts: + +Guideline | Description +--- +[Types of Payout API](#types-of-payout-apis) | Select how you want to create payouts using APIs. +--- +[API guidelines](#api-guidelines) | Guidelines to follow when making API calls. +--- +[API key guidelines](#api-key-guidelines) | Save and manage your API keys. +--- +[Payout states](#payout-states) | Best way to check the payout state. +--- +[Payout Status Details](#payout-status-details) | Provides additional details about each payouts' status. +--- +[Fund account validation](#fund-account-validation) | Ensure payouts are never made to the wrong account. +--- +[Workflows](#workflows) | Reduce human error when creating payouts. +--- +[Intelligent Payouts](#intelligent-payouts) | Enhances the overall payout success rate. +--- +[Low balance alerts](#low-balance-alerts) | Get notified when your RazorpayX account balance drops below a set threshold. +--- +[Queued payouts](#queued-payouts) | Ensure payouts do not fail due to insufficient balance in your RazorpayX account. +--- +[Handling 5XX Errors & Idempotency](#handling-5xx-errors-and-idempotency) | Handle 5XX Errors efficiently. Safely retry the same request multiple times without fear of performing the same action more than once. +--- +[IP Allowlisting](#ip-allowlisting) | Add a layer of security by ensuring API calls are only made from allowlisted IPs. + +## API Guidelines + +Guidelines to follow while making API calls: + +- All the API calls have to be server-to-server calls. API calls made from an Android application or website frontend will fail. +- Ensure all the calls are made within a range of 5-10 transactions per sec (TPS). +- Pass your RazorpayX bank account number against the `account_number` parameter in the Payout API/Composite Payout API. + - **DO NOT** pass your beneficiary account number here. The payout will fail. + - Use your customer identifier to make payouts from RazorpayX Lite. + - Use your current account number to make payouts from your RazorpayX powered Current Account. + - Navigate to **My Account and Settings** → **Banking** to get your RazorpayX bank account number. +- We recommend using your internal `transaction_id` as the `reference_id` value in a Payout API request. +- In some cases, a webhook can be triggered more than once. We recommend you to apply deduplication while consuming webhooks based on the Payout ID and the payout status. + +### API Key Guidelines + +- Ensure that your API key, that is the `` and ``, is not publicly available. Limited people should have access to this. We recommend you store them as environment variables. +- Ensure you download and save your API key when you generate them. We do not store these at our end. If you lose them, you will have to regenerate your API key. +- The API keys are the same for Payment Gateway and RazorpayX. Regenerating the keys will affect both PG and Payout APIs. + +### Types of Payout APIs +There are two types of APIs to create payouts. + +- Normal Payout API +- Composite Payout API + +#### Normal Payout API + +You can use Normal Payout API to: +1. Create a [Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/contacts/create.md). You receive a Contact id in the response. +1. Create a Fund account using the Contact id. The Fund account can be a [bank account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts/create/bank-account.md) or [VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/fund-accounts/create/vpa.md). +1. Create a Payout to [bank account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts/create/bank-account.md) or [VPA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts/create/vpa.md) using the Fund account id. + +#### Composite Payout API + +You can use the Composite Payout API to create a Contact, Fund account and payout in a single API call. + +## Payout States + +- After a payout is created, a payout can remain in the **processing** state for T+3 working days, where **T** is the transaction time. From the **processing** state, a payout can move to the **processed** or **reversed** state. +- It is possible for a payout in the **processed** state to move to the **reversed** state. This can happen in a maximum time of T+3 working days. This happens in very rare occasions. + +Know more about [payout states and life cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md). + +### Payout Status Details + +[Status details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) are sent as part of the fetch payout API response and webhook payloads. It provides additional details about each payout status. A payout update webhook is sent every time an attribute in status details changes. + +#### Check Payout Status + +- API calls are asynchronous. We **DO NOT** recommend using the Fetch Payout API to check the status of the payouts. +- We recommend subscribing to our [webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/apis/subscribe.md) to get instant notifications. Webhooks are triggered whenever there is a change in the status of the payout. You can update your database using the webhook payload. + +## Others Guidelines + +### Fund Account Validation + +Always validate your customer's Fund account to ensure it is the account number where your user wants to receive the amount. Know more about [Fund account validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation.md). + +> **WARN** +> +> +> **Watch Out!** +> +> If your user provides an account number by mistake which is not where the user wants the amount, the payout gets processed if the account number exists. Hence, we recommend you to validate the Fund accounts before making a payout. +> + +### Workflows + +We recommend that you enable workflows on your account. This allows you to set up a maker-checker process. You can have 1 person create a payout and save it as a draft. Next, you can have someone from the financial team check the payouts before they are processed. Know more about [RazorpayX Maker-Checker](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md). + +### Intelligent Payouts + +Intelligent Payouts automatically detects the degradation of beneficiary bank or NPCI and queues the payout in the system for a pre-defined SLA, thereby reducing the chances of payouts being [deemed success](https://razorpay.com/blog/business-banking/payout-processing-imps-upi-transactions-deemed-success-npci/), preventing money from getting blocked for T+3 days. + +This feature is enabled by default. You just have to consume the `payout.failed` event to utilise this feature. Know more about [Intelligent Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/intelligent-payouts.md). + +### Low Balance Alerts + +We recommend that you set low balance alerts on your RazorpayX account. Once set, we will notify you when your RazorpayX account balance drops below the set threshold. Know more about [Low balance alerts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types.md#low-balance-email-alerts). + +### Queued Payouts + +If your RazorpayX account does not have sufficient funds to process a payout, the payout fails. + +To avoid such scenarios, we recommend passing `queue_if_low_balance: true` in the Payout API request. When you pass the parameter, if you do not have sufficient balance to process the payout, the payout is queued instead of failing. The queued payouts are automatically processed when you add funds to your RazorpayX account. Know more about [Queued Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/queued.md). + +### Handling 5XX Errors and Idempotency + +We recommend you ensure your payout API requests are idempotent. Idempotency allows you to safely retry or send the same request multiple times without fear of performing the same action more than once. Know more about [RazorpayX Idempotency](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md). + +> **WARN** +> +> +> **Watch Out!** +> +> [Idempotency key](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md) is mandatory to make a successful payout. +> + +**Example** + +You made a request, but were unable to read/save the response sent by Razorpay. In such cases, you make another payout request. Assuming the first request was successful, your account will be debited twice. Making your payout requests idempotent helps you avoid such scenarios. + +To make a request idempotent: +1. Add the header `X-Payout-Idempotency` to the request and pass an idempotency key against it. When a payout request is idempotent, you can make the same call multiple times, but the amount will be deducted only once. +2. If a duplicate request is found with the same idempotency key, we return the payout's latest state. + +Know more about [Handling 5XX Errors](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x.md#handling-5xx-errors) and [Idempotency](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payout-idempotency/make-request.md). + +### IP Allowlisting + +It is mandatory to [get your IP address allowlisted](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/allowlist-ip.md). This means we will process the API calls made from the allowlisted IPs only. + +### Related Information + +- [About Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) +- [Payout Life Cycle and States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md) +- [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) diff --git a/llm-content/x/payouts/cards.md b/llm-content/x/payouts/cards.md new file mode 100644 index 00000000..3fec899c --- /dev/null +++ b/llm-content/x/payouts/cards.md @@ -0,0 +1,222 @@ +--- +title: RazorpayX | Payouts to Cards +heading: Payouts to Cards +description: Make payouts directly to a debit or a credit card using RazorpayX Lite. +--- + +# Payouts to Cards + +With RazorpayX, you can make payouts directly to a credit card, debit card, or prepaid card. The process of making a payout to a card is the same as other payouts. + +Payouts via IMPS, NEFT, and UPI are supported on both RazorpayX Lite and Current Account. Payouts via `card` mode is supported **RazorpayX Lite**. According to the RBI guidelines, merchants cannot save their customer’s card credentials (card number & other card data) on their own servers. You can either: + +- Make a payout via RazorpayX payouts to cards APIs **without saving the card number**. You have to collect the card number from the customer each time a payout is made. +- Save a card number with a tokenisation service like [Razorpay TokenHQ](https://razorpay.com/card-tokenisation/). Payouts to these tokenised cards can be made using the ‘card’ mode on RazorpayX. + + +### Payouts to Tokenised Cards + + [Tokenisation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/payment-methods/cards/token-hq/razorpay-requestor-with-network-tokens.md) is the process by which the original card number / Primary Account Number is replaced with a surrogate value called a `token`. According to the recent RBI guidelines, Payment Aggregators (PA)/ Payment Gateway (PG) and businesses cannot save their customers' card numbers and other card data on their servers. Hence, you can save card numbers and make payouts to it only by creating tokens. + + You can create tokens using: + + - [External Tokenization Providers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards/create/save-card/external-token/payout.md) + - [Razorpay TokenHQ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards/create/save-card/razorpay-tokenhq/payout.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> - Payouts via IMPS, NEFT and UPI are not supported via tokenised cards. +> - Token expiry month and year are mandatory in case of external service provider. +> - Payouts to tokenised cards is supported only for limited issuers on Visa and Mastercard. They are not supported via bank rails. Its only supported for the mode `card`. +> - Bank issuers/networks for payouts to tokenised and non-tokenised is different. +> - Bank issuers/networks for payouts via bank modes and `card` mode (Payouts via network rails). +> + + + + + +> **INFO** +> +> +> **Handy Tips** +> +> This feature is not enabled by default. Raise a request using the support form on the RazorpayX Dashboard to enable this feature for your account. +> + +## Actions +The table below lists the various Payout to Card actions you can perform using the Dashboard, API and Bulk Upload: + +Action | API | Dashboard | Bulk Upload +--- +Create a payout to a card | ✓ | x | x +--- +View payout details | ✓ | ✓ | x +--- + +Know more about [creating payouts to cards using APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards.md). + +## Supported Networks and Banks + +If the payouts are made via cards that are not mentioned in the list, the payout creation request will fail. You can use payouts to cards without a compliance certificate in Test mode upon [request](https://razorpay.com/support/). + +### Card Networks + +Card payouts are supported on the below card networks: +- Diners Club +- Mastercard +- Visa +- Amex + +> **WARN** +> +> +> **Watch Out!** +> +> Payouts via **Visa Direct** and **MasterCard Send** are temporarily unavailable. Please watch this space for further updates. +> +> *This is the latest version of the bank list and was last updated on April 24, 2023*. +> + + +### Payouts via Bank Transfer + + You can make payouts via bank transfers using this traditional bank transfers such as NEFT, IMPS, and UPI. This method of making payouts via bank transfers is possible only for non-tokenised cards. Payment is supported on all card networks, but only for credit cards. Here is a list of banks and the supported payout mode: + + + + Issuer Bank Name | Issuer Bank Code | Supported Method + --- + RBL | RATN | NEFT + --- + State Bank of India | SBIN | NEFT + --- + Axis Bank | UTIB | NEFT +IMPS + --- + HDFC Bank | HDFC | IMPS +NEFT + --- + ICICI Bank | ICICI | NEFT +UPI + --- + Andhra Bank | ANDB | IMPS +NEFT + --- + Bank of America | BOFA | NEFT + --- + Bank of Baroda | BARB | NEFT + --- + Bank of India | BKID | NEFT + --- + Canara Bank | CNRB | NEFT + --- + Citibank | CITI | NEFT + --- + Corporation Bank | CORP | NEFT + --- + HSBC Bank | HSBC | NEFT + --- + IDBI Bank | IBKL | NEFT + --- + Indian Overseas Bank | IOBA | NEFT + --- + IndusInd Bank | INDB | IMPS +NEFT + --- + Kotak Mahindra Bank | KKBK | IMPS +NEFT + --- + Punjab National Bank | PUNB | NEFT + --- + Syndicate Bank | SYNB | NEFT + --- + Union Bank of India | UBIN | NEFT + --- + Yes Bank | YESB | NEFT + --- + American Express | AMEX | IMPS +NEFT +UPI + + + + +### Payout via Card Networks + + The list of banks that support payouts to cards are as follows: + + + Issuer Bank Name | Issuer Bank Code | Network | Card Type + --- + Airtel Payments Bank | AIRP | Mastercard Send | Debit + --- + Axis Bank | UTIB | Visa Direct +Mastercard Send | Debit + --- + Bank of India | BKID | Visa Direct | Debit + --- + Bank of Maharashtra | MAHB | Visa Direct | Debit + --- + Canara Bank | CNRB | Visa Direct +Mastercard Send | Debit + --- + Central Bank of India | CBIN | Mastercard Send | Debit + --- + Corporation Bank | CORP | Visa Direct | Debit + --- + Development Credit Bank Ltd | DCBL | Visa Direct | Debit + --- + Federal Bank | FDRL | Visa Direct +Mastercard Send | Debit + --- + ICICI Bank | ICIC | Visa Direct | Debit + --- + IDBI Bank | IBKL | Visa Direct +Mastercard Send | Debit + --- + IDFC Bank | IDFB | Visa Direct | Debit + --- + Indian Bank | IDIB | Mastercard Send | Debit + --- + IndusInd Bank | INDB | Visa Direct +Mastercard Send | Debit +Credit + --- + J & K Bank | JAKA | Mastercard Send | Debit + --- + Kotak Bank | KKBK | Visa Direct | Debit + --- + Oriental Bank of Commerce | ORBC | Visa Direct | Debit + --- + RBL Bank | RATN | Mastercard Send | Debit + --- + State Bank of India | SBIN | Visa Direct +Mastercard Send | Debit +Credit + --- + Standard Chartered Bank | SCBL | Visa Direct +Mastercard Send | Debit +Credit + --- + Syndicate Bank | SYNB | Mastercard Send | Debit + --- + The Federal Bank Ltd | FDRL | Visa Direct | Debit + --- + The South Indian Bank Ltd | SIBL | Visa Direct | Debit + --- + Yes Bank | YESB | Mastercard Send | Debit +Credit + --- + + + +### Related Information + +- [About Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) +- [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) +- [Payout Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/best-practices.md) diff --git a/llm-content/x/payouts/downtimes.md b/llm-content/x/payouts/downtimes.md new file mode 100644 index 00000000..a5088cee --- /dev/null +++ b/llm-content/x/payouts/downtimes.md @@ -0,0 +1,100 @@ +--- +title: Enable Bank Downtime Alerts +heading: Downtime Alerts +description: Get notified for partner and beneficiary bank downtimes via email & SMS and webhooks respectively via RazorpayX. +--- + +# Downtime Alerts + +When banks experience downtimes, payouts you initiate on the RazorpayX Dashboard may fail, that is, the payouts move to the `failed` or `deemed_duccess` state. Know more about [Payout States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md). + +You can enable downtime alerts for partner banks (ICICI/Yes Bank/Axis) and for beneficiary banks (where the recipient receives the amount in their Fund account). +- [For partner banks](#enable-partner-bank-downtime-alerts), we send alerts about downtimes via SMS and email. +- [For beneficiary banks](#enable-beneficiary-bank-downtime-alerts), you can enable webhooks and get notified about downtimes. + +## Partner Bank Downtime Alerts + +To receive alerts for partner bank downtime via email and SMS, [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#razorpayx-users). We shall enable the feature for you in 2 days. +- Downtime notifications are sent for RazorpayX powered Current, Escrow and Lite accounts. +- We notify you of the partner bank downtimes in near real-time. This is usually within 15 minutes from when the downtime started. + +## Beneficiary Bank Downtime Alerts + +When you make payouts, it is possible that the recipient's bank/beneficiary bank is experiencing downtime. In such cases, your payouts can fail. To make a successful payout, you must retry the payout after the bank restores normalcy. + +You can get notified about the beneficiary bank downtimes via [Payout Webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/apis/subscribe.md) events. To enable downtime webhooks: + +1. Follow the steps to [set up Payout Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md#set-up-and-edit-webhooks). + + + +### Enable Webhooks + + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/). + 1. Go to the user profile icon → **My Account & Settings** → **Developer Controls** in the left menu. + 1. Click **+ ADD WEBHOOK** if you are setting up webhooks for the first time. Otherwise, hover over the already added webhook and click **EDIT WEBHOOK**. + ![RazorpayX Dashboard enable webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-dev-controls-webhooks.jpg.md) + + + + +1. In the **Active Events** list on the RazorpayX Dashboard, select the following webhook events: + - payout.downtime.started + - payout.downtime.resolved + + ![RazorpayX Dashboard enable payout downtime webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payouts-downtime-webhooks.jpg.md) +1. Click **SAVE**. + +You have successfully enabled the downtime webhooks for beneficiary banks. Whenever your beneficiary banks experience downtimes, we notify you at the webhook URL you selected during [webhook setup](#enable-partner-bank-downtime-alerts). + +### Downtime Webhooks + +There are two downtime webhooks. Refer to the respective webhooks for the sample payloads and format. +- [payout.downtime.started](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md#payout-downtime-started): Triggered when the beneficiary bank downtime begins. +- [payout.downtime.resolved](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md#payout-downtime-resolved): Triggered when the beneficiary bank has resolved the downtime. + + +### Webhook Response Parameters + + `id` + : The unique reference id created for each downtime alert. For example, `poutdown_F1Zppa6lcVheSE`. + + `method` + : Contains the list of [payout modes/methods](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#payout-modes-and-tat) impacted. For example, `IMPS`, `UPI` and more. + + `begin` + : Timestamp in Unix when the beneficiary bank downtime started. + + `end` + : Timestamp in Unix when the beneficiary bank downtime ended. + + For **payout.downtime.started webhook**, this parameter response is `NULL`. + + `status` + : The status of the downtime, whether it is ongoing or resolved. Possible values: + - `started` + - `resolved` + + `scheduled` + : Contains whether the downtime was a scheduled downtime. Possible values: + - `true` (if the downtime was scheduled and informed) + - `false` (if the downtime is unscheduled) + + `source` + : The source of the downtime. Possible value: `beneficiary`. + + `instrument.bank` + : Four-digit alpha code of the beneficiary bank. For example, `SBI`. + + +## Alternate Payout Options + +In case of downtimes, you can opt for Payouts Pro. You can either: +- Customise and route your payouts via other bank accounts using [Multi-bank Routing](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/multi-bank-routing.md). +- Let RazorpayX automatically queue and process your payouts via [Intelligent payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/intelligent-payouts.md). + +### Related Information + +- [About Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) +- [Payout Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/best-practices.md) +- [Check Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/status-details.md) diff --git a/llm-content/x/payouts/faqs.md b/llm-content/x/payouts/faqs.md new file mode 100644 index 00000000..60f94273 --- /dev/null +++ b/llm-content/x/payouts/faqs.md @@ -0,0 +1,107 @@ +--- +title: RazorpayX Payouts | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about RazorpayX Payouts. +--- + +# Frequently Asked Questions (FAQs) + +### 1 . What are Queued Payouts? + + Payouts are queued when your business account does not have sufficient funds to process a payout. + + Instead of failing the payout, it is queued and processed when there are enough funds. + + + +### 2 . What is Approval Workflow? + + An Approval Workflow is a custom process you can create on your Dashboard to manage Payouts and teams. It sets limitations to the payout creation process. Such payouts will be processed only after the user/s have provided their approval. + + Know more about approval workflow. + + + +### 3 . What is Fund Account Validation? + + [Fund Account Validation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/account-validation.md) is a transaction made to ensure the fund account details of the bank account and/or VPA are correct. + + + +### 4 . What are Payouts to Cards? + + Payouts to cards are transactions that are processed to cards and card accounts. They can be initiated via traditional banking methods like NEFT or UPI, but they are processed via Visa Direct or Mastercard Send. This feature is only available via the [Payouts to Cards API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts-cards.md). + + Know more about [supported banks and cards for Payouts to cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/cards.md#supported-networks-and-banks). + + + +### 5 . What is a Payout Link? + + [Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md) can be generated for those Contacts whose bank account details are not available. + 1. The recipient receives the link on their email or mobile number and uploads their bank account information or UPI details. + 1. This creates a Fund Account for the contact, to which the payout is then processed. + + Know more about other [Payout Links use cases](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md#use-cases). + + + +### 6 . How do I add purpose to a Payout? + + You can add a Payout purpose under the Payout details while creating the Payout. Know more about [Payout purposes](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#payout-purpose). + + + +### 7. Why am I not able to add a new Payout Purpose? + + The maximum number of Payout Purposes you can add is 400. [Contact Support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) if you want to add more Payout Purposes. + + + +### 8 . Can I edit or delete a Payout Purpose? + + Currently, you do not have the option to edit or delete an existing Payout Purpose. + + + +### 9 . How do I access UTR of the created Payouts? + + You can view the UTR along with the Payout on the RazorpayX Dashboard, under the Payouts tab in the Payout summary view. + + + +### 10 . Can I make Payouts from Razorpay PG platform? + + No, you cannot make Payouts from the Razorpay Payments Dashboard. You have to log in to the RazorpayX Dashboard to [make Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#how-to-make-payouts). + + + +### 11 . How do I edit a created Payout? + + You cannot edit a Payout after you [create a Payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#how-to-make-payouts). However, you can [add an attachment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#add-attachments). + + Navigate to Payouts on the RazorpayX Dashboard and select the payout you want to add an attachment to. Click **Upload** on the right pane. + + + +### 12 . How can other users on my team create Payouts? + + Refer to [Manage Teams](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams.md) to see how to add and assign user roles based on requirements. + + + +### 13 . How to make transfers to beneficiaries who have provided their RazorpayX Lite? + + Add the [RazorpayX Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/razorpayx-lite.md) details while creating the [Fund Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#update-a-contact-and-fund-account) for the respective Contact and create a Payout. + + + +### 14 . Why are payouts not going through after getting access to RazorpayX? + + The Onboarding process to RazorpayX has 2 steps. If your business falls in the approved category of businesses, you can start accepting funds in your business account. However, payouts can be made only once your KYC details have been submitted and verified. + + + +### 15 . How to enable RazorpayX Lite? + + [RazorpayX Lite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/razorpayx-lite.md) is available to you as soon as you complete the KYC process and have your account verified. The approval process is simple and fast. diff --git a/llm-content/x/payouts/intelligent-payouts.md b/llm-content/x/payouts/intelligent-payouts.md new file mode 100644 index 00000000..f22951d8 --- /dev/null +++ b/llm-content/x/payouts/intelligent-payouts.md @@ -0,0 +1,46 @@ +--- +title: RazorpayX Intelligent Payouts +heading: Intelligent Payouts +description: Find out how Intelligent Payouts reduce the risk of delayed payments via RazorpayX. +--- + +# Intelligent Payouts + +Intelligent Payouts detects downtimes or degradations at Razorpay's partner or beneficiary banks' side and prevents the money from being blocked for T+3 days. Downtimes refer to the time period when payouts underperform, leading to considerable delays in processing. + +Intelligent Payout feature also reduces the chances of payouts being [deemed success](https://razorpay.com/blog/business-banking/payout-processing-imps-upi-transactions-deemed-success-npci/). With this, we aim to streamline online transactions and ensure a smoother payout experience for you. + +## How it Works + +If the beneficiary or the partner bank experiences downtime after a payout is made, the payout enters a `queued` state. + +> **WARN** +> +> +> **Watch Out!** +> +> Intelligent payouts is available by default for Current Account users. RazorpayX Lite users must consume `payout.failed` [webhook](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md#payout-failed) to enable Intelligent payouts. +> + +- You receive a `payout.queued` webhook event to inform you of the `status_details`. + - The reason is either `beneficiary_bank_down` or `gateway_degraded`. +- If the issue is resolved within the defined SLA, the payout is `processed`. +- If the issue is not resolved within the defined SLA, the payout is moved to the `failed` state and you receive `payout.failed` webhook event. +- You can choose to `cancel` payouts in `queued` state from the RazorpayX Dashboard or via API. + +Know more about [Payout States and Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md). + +Entity | Default SLA | Supported Modes | Supported Account Type +--- +Beneficiary Bank/ NPCI| 15 minutes | IMPS & NEFT | Current Account & RazorpayX Lite +--- +Partner Bank | 60 minutes | IMPS, NEFT, RTGS & UPI | Current Account +--- + +You can customise the SLA by contacting our [Support Team](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md#razorpayx-users). + +### Related Information + +- [Queued Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/queued.md) +- [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) +- [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks/setup-edit-payouts.md) diff --git a/llm-content/x/payouts/multi-bank-routing.md b/llm-content/x/payouts/multi-bank-routing.md new file mode 100644 index 00000000..d0caa893 --- /dev/null +++ b/llm-content/x/payouts/multi-bank-routing.md @@ -0,0 +1,212 @@ +--- +title: Multi-bank Routing on RazorpayX +heading: Multi-bank Routing +description: Avoid payout failures and improve payouts success rates with industry-first dynamic Multi-bank Routing by RazorpayX. +--- + +# Multi-bank Routing + +RazorpayX **Payouts Pro** is a Multi-bank Routing feature which allows you to set primary, secondary and tertiary accounts and helps avoid payout failures by detecting bank downtimes. While [Intelligent Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/intelligent-payouts.md) prevents the money from being blocked, Multi-bank Routing changes the account of the transaction and prevents payment delays in real-time. + +- **Payouts Pro** instantly detects bank degradations and immediately switches between two or more RazorpayX powered Current Accounts or RazorpayX Lite, thus improving success rates. +- This process is entirely automated and you will receive the debit account number in the API and webhook responses informing you the account from which the payout was finally done. +- Your payments will no longer be stuck in processing. +- You can enable Payouts Pro if you have more than one bank account registered with RazorpayX (Current/Escrow/Lite). + +> **WARN** +> +> +> **Watch Out!** +> +> Dynamic Multi-bank Routing is applicable only to payouts made via [Payout APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts.md). +> + +## How It Works + +Consider the following scenario: + +- Name of the business: **Acme Corp** +- Number of accounts: **3** +- The different accounts enabled and set in priority by **Acme Corp** for UPI: + - Primary bank account: **RBL Bank** + - First backup account: **Yes Bank** + - Second backup account: RazorpayX **Lite** + + + +> **INFO** +> +> +> **Handy Tips** +> +> If you do not have a backup current account or cannot open one, you can use RazorpayX Lite as your backup account. +> + + + +Let us consider a scenario where Acme Corp has initiated five payouts through UPI. + - After 3 payouts, RBL Bank which is the primary bank started facing a downtime. + - The remaining 2 payouts are now deducted from Yes Bank. + - While the payouts are being made via Yes Bank, we parallelly check whether the downtime has been resolved at RBL Bank. + - Once the downtime is resolved, the rest of the payouts are re-routed through RBL Bank. + - Else, they are processed from Yes Bank. +This process is entirely automated and can be reconciled easily by accurately identifying the debit account number from the API and webhook responses. + +## Set Account Preferences in Payouts Pro +You can view and set your account priorities. + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Go to **Payouts Pro** by clicking **User Icon→Account & Settings→Banking**. +3. Click **Get Started** to set up your account priorities. + + ![Get started](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payoutpro-getstarted.jpg.md) + +4. You can view your accounts listed under each of IMPS, UPI and NEFT channels. This is the default setting. + + ![Set account preferences](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/marsdefault1.jpg.md) + + +> **INFO** +> +> +> **Handy Tips** +> +> Accounts are listed by default based on their transaction success rates. This means that the account listed first has had the most number of successful transactions historically. +> +> + +5. Click **Save Changes** to save the default account priority settings. +6. Click **Yes, save changes** to confirm. All the payouts will now be routed based on the default account priorities. +7. You can also [edit your preferences](#edit-payout-account-preferences), [add a new account](#add-new-account) or [delete an account](#delete-account) later. + +> **WARN** +> +> +> **Watch Out!** +> +> RTGS channel is currently not enabled for Multi-bank Routing. +> + + +### Edit Payout Account Preferences + + You can edit the default settings and change your account preferences. + + 1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). + 2. Go to **Payout Pro** by clicking **User Icon→Account & Settings→Banking**. + 3. Click **Get Started**. + 1. Click **Edit Preferences** on **Payouts Pro**. You will see the default listing of your accounts. + 2. Hover over each bank account and use up/down arrows to move the bank up or down the list under each payment method. + 3. Click **Save changes** to save your preferences or **Cancel** to continue editing. + 4. To confirm, click **Yes, save changes** in the pop-up modal. + + ![Set account preferences](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payoutpro-edit-pref.jpg.md) + + All the payouts will now be routed based on the changed account priorities. + + + + + +### Add New Account + + You can add your registered account(s) to Payouts Pro. + + 1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). + 2. Go to **Payout Pro** by clicking **User Icon→Account & Settings→Banking**. + 3. Click **Get Started**. + 4. If you are unable to view all your accounts (those registered during RazorpayX account creation) listed on Payouts Pro, you can add them by clicking **Add bank +** immediately below the existing list of banks. + 5. You can select the bank account from the drop-down list. + 6. If you have registered only one account with RazorpayX, you will not see the **Add bank +** option. + + ![Add bank](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payoutpro-addbank.jpg.md) + + The newly added account will be used for the subsequent payouts as per the priority you have set for it. + +> **INFO** +> +> +> **Handy Tips** +> +> - Only those accounts registered by you during RazorpayX account creation can be added to **Payouts Pro** using **Add bank** option. Your accounts which are not registered with RazorpayX will not be listed when you click **Add bank**. +> - To register a new account with RazorpayX, log in to your [RazorpayX Dashboard](https://x.razorpay.com/) , go to **My Account & Settings** → **Banking** → **+ADD ACCOUNT**. +> +> + + + + + + + + + +### Delete Account + + 1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). + 2. Go to **Payout Pro** by clicking **User Icon→Account & Settings→Banking**. + 3. Click **Get Started**. + 4. Go to **Payouts Pro** to view your accounts. + 5. Hover over the bank account card that you want to delete, and click the delete icon next to it. + 6. Click **Remove account** on the pop-up modal to confirm or **Don't remove account** to cancel the action. + + +> **WARN** +> +> +> **Watch Out!** +> +> - Deleting a bank account from Payout Pro does not delete the registered bank account from RazorpayX. It is deleted only from the Payouts Pro routing preferences. +> - **It is mandatory to have at least one account each under IMPS, UPI and NEFT options.** +> + + The deleted account will no longer be used for Multi-bank Routing of subsequent payouts. + + + + + +### Disable Payouts Pro + + You can disable Payouts Pro if you no longer want to use the Multi-bank Routing feature. + + 1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). + 2. Go to **Payout Pro** by clicking **User Icon→Account & Settings→Banking**. + 3. Click **Get Started**. + 4. Go to **Payouts Pro** + 5. Click **Disable Payouts Pro**. + 6. Click **Disable** in the pop-up modal to confirm or **Don't disable** to cancel your action. + + ![Disable payoutpro](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payoutpro-disable.jpg.md) + + Once you disable **Payouts Pro**, the payouts will no longer use the Multi-bank Routing and will use only the selected account and channel. + + + +## Widget + +- The Payouts Pro widget displays the payout volumes, total number of payouts, transactions protected from downtimes and the success rates of transactions under each payout modes. +- The first account displayed here is the first account you registered with RazorpayX. +- Click **View all account details** to view the success rates of all your registered accounts. + +For example, the following widget shows data available for two payment modes across the last 30 days: UPI and IMPS. + +![RazorpayX Payouts Pro Widget Success Rate](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payouts-pro-widget.jpg.md) + +You can read the widget data in the following manner: +- **7.5% more success rate**, that is, success rates spiked to 97.3% from 88.8% due to Payouts Pro. +- **5.8k more payouts**, that is, number of payouts increased by 5823 due to protection from bank downtimes. +- **₹ 22 Cr more volume**, that is, volume of payouts increased from 297 Cr to 319 Cr. + +## Reports + +All the transactions made from different accounts, through this feature, are recorded accordingly. You can find the information when you generate reports from: + +1. [Account Statements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-statement.md) +2. [Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/reports.md) +3. [Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/reports.md) + +### Related Information + +- [About Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) +- [Open a Current Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/current-account.md) diff --git a/llm-content/x/payouts/queued.md b/llm-content/x/payouts/queued.md new file mode 100644 index 00000000..c5bb097a --- /dev/null +++ b/llm-content/x/payouts/queued.md @@ -0,0 +1,79 @@ +--- +title: RazorpayX Queued Payouts +heading: Queued Payouts +description: Check about scenarios when payouts are queued and how to cancel a queued payout. +--- + +# Queued Payouts + +When you do not have sufficient balance to process a payout, we queue the payout instead of failing the payout, saving you time and effort. + +Payouts that are queued get processed when you add funds to your account. Know more about [adding funds to your RazorpayX account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/current-account.md#add-funds), whether it is current account or RazorpayX Lite. + +> **WARN** +> +> +> **Watch Out!** +> +> Any payout in `queued` state for more than 3 months will automatically be `cancelled`/`rejected` by the system. +> + +## Queued Payouts Processing + +> **INFO** +> +> +> **Handy Tips** +> +> - This feature is available to you by default. You do not need to do anything to enable the feature. +> - A payout is queued only when there is insufficient funds to process the payout. You cannot use this feature to schedule a payout. If you want to schedule your payouts, use [Scheduled payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/scheduled.md). +> + +### Payout Processing - Order + +Queued payouts are processed in a first-in-first-out (FIFO) basis. If a payout cannot be processed due to insufficient balance, Razorpay attempts to process the next payout in the queue. + +Account Balance | Action | Payout Status +--- +₹5,000 | Create 3 payouts: +- Payout A → ₹6,000 + +- Payout B → ₹3,000 + +- Payout C → ₹5,000 + | - Payout A → queued( insufficient balance). Account balance → ₹5,000. +- Payout B → processed. Account balance → ₹2,000. +- Payout C → queued( insufficient balance). Account balance → ₹2,000. + +### Payout Life Cycle + +Once a payout is queued, it can have the following statuses during its life cycle: + +- `queued` +- `processing` +- `processed` +- `reversed` +- `cancelled` +- `failed` + +![Payout life cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-queued_payout_life_cycle.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> The `Pending` and `Rejected` states are available only if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled on your account. +> + +### Cancel a Queued Payout Using API + +You can cancel a queued payout using the [Cancel a Queued Payout API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts/cancel.md). + +### Related Information + +- [Payout Life Cycle and States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md) +- [Intelligent Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/intelligent-payouts.md) +- [Payouts to Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/cards.md) +- [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) +- [Payout Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/best-practices.md) diff --git a/llm-content/x/payouts/queued/balance-threshold.md b/llm-content/x/payouts/queued/balance-threshold.md new file mode 100644 index 00000000..7502d7b0 --- /dev/null +++ b/llm-content/x/payouts/queued/balance-threshold.md @@ -0,0 +1,18 @@ +--- +title: Balance Threshold +description: Proactively queue payouts before they fail due to low balance with Balance Threshold on RazorpayX. +--- + +# Balance Threshold + +When you send payouts using the `queue_if_low_balance=true` parameter in the Payout API, payouts can still fail due to minor differences between the balance reflected on RazorpayX and the actual balance at the partner bank. This typically happens when you maintain your account balance close to the minimum required for your payout volume, and payouts are processed rapidly within a short span of time (payouts per minute). + +Balance Threshold solves this by proactively queuing payouts before they are sent to the bank, preventing failures caused by these balance discrepancies. + +### How Balance Threshold Works + +You set a threshold amount (for example, ₹5,00,000) on your RazorpayX account. When a payout is initiated, the system checks if processing it would bring your balance below the threshold. If it would, the payout is queued instead of being sent to the bank. + +The system evaluates the following condition for every payout: + +If (`Current Balance − Payout Amount`) diff --git a/llm-content/x/payouts/reports.md b/llm-content/x/payouts/reports.md new file mode 100644 index 00000000..4d6bb282 --- /dev/null +++ b/llm-content/x/payouts/reports.md @@ -0,0 +1,30 @@ +--- +title: RazorpayX Payouts Report +heading: Payouts Report +description: Download and view Payouts Report on the RazorpayX Dashboard. +--- + +# Payouts Report + +You can download all of your transaction data for a specific day, month or any time frame as per your business requirements. This information can be downloaded as a `.csv` or `.xlsx` file, or sent via email to the intended recipients. + +## Download Report + +To generate the report: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Click **Payouts**. +3. Click **Export** button. + ![Download Payouts Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/payouts-export.jpg.md) +4. Select a period from the drop-down, or select custom dates for which you require the report. +5. Choose the format of your report- `xlsx` or `csv`. +6. You can **DOWNLOAD** as well as **EMAIL** the report. You can enter any email address you wish to share the report with as well as select the team members you want to share it with. The downloaded reports will be available in the default downloads folder of your system. + +> **WARN** +> +> +> +> **Watch Out!** +> +> Generating reports can take upto 10 minutes. +> diff --git a/llm-content/x/payouts/scheduled.md b/llm-content/x/payouts/scheduled.md new file mode 100644 index 00000000..f62e0f92 --- /dev/null +++ b/llm-content/x/payouts/scheduled.md @@ -0,0 +1,104 @@ +--- +title: RazorpayX | Scheduled Payouts +heading: Scheduled Payouts +description: Use the Scheduled payouts to set up payouts up to 3 months in advance. +--- + +# Scheduled Payouts + +Use the RazorpayX Scheduled payouts to schedule payouts to your Contact's bank account or VPA, to be processed at a later time. For example, you can use Scheduled payouts to schedule salary payouts for your employees. + +- Your account balance is not blocked when you create a Scheduled payout. +- You can schedule as many payouts as you like irrespective of your account balance. We check your account balance at the time of processing. +- You can schedule payouts up to 3 months in advance, thus allowing you to better plan the float in your account. + +> **INFO** +> +> +> **Handy Tips** +> +> - This feature is only available on the RazorpayX Dashboard. It is not available on APIs. +> - You cannot schedule payouts to cards. +> + +## How it Works + +You can create Scheduled payouts via the RazorpayX Dashboard or using Bulk Upload. + +The process to create a Scheduled payout is similar to how you create a regular payout. +1. Create a [Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#contacts). +2. Create a [Fund account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#fund-accounts) for the Contact. +3. Create a payout. + +### Individual Payout + +You can create a Scheduled payout via the RazorpayX Dashboard. To create a Scheduled payout, select the following options while creating a payout: +1. Select **Schedule the payout**. +2. Select a date when you want the payout to be processed. You can schedule payouts up to 3 months in advance. +3. Select a time slot when you want the payout to be processed. Following are the 4 slots available: + - 9 a.m. to 10 a.m. + - 1 p.m. to 2 p.m. + - 5 p.m. to 6 p.m. + - 9 p.m. to 10 p.m. + +After a payout is created, it moves to the `pending` or `scheduled` state. + +![Schedule payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-schedule-payout.jpg.md) + +### Bulk Upload + +You can create Scheduled payouts created using [Bulk Upload](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts/bulk-uploads.md). Select the following options while uploading the bulk upload file: + +1. Select **Schedule the payout**. +2. Select the date when you want the payout to be processed. You can schedule payouts up to 3 months in advance. +3. Select a time slot when you want the payout to be processed. Following are the 4 slots available: + - 9 a.m. to 10 a.m. + - 1 p.m. to 2 p.m. + - 5 p.m. to 6 p.m. + - 9 p.m. to 10 p.m. + +After a bulk file is uploaded, it is picked up for processing immediately. Know more about [bulk payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/bulk-payouts.md). + +Payouts created via the bulk upload move to either the `pending` or `scheduled` state. + +> **INFO** +> +> +> **Handy Tips** +> +> You cannot use this feature to schedule when a bulk upload file is picked up for processing. Once uploaded, the bulk upload file is processed immediately. The individual payouts created are scheduled as per the selected options. +> + +### Life Cycle + +A scheduled payout can have the following statuses during its life cycle: + +- `pending` +- `scheduled` +- `processing` +- `processed` +- `reversed` +- `cancelled` +- `rejected` +- `failed` + +![Scheduled Payouts Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-scheduled_payout_life_cycle.jpg.md) + +Know more about the [states and the life cycle of a payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md). + +> **INFO** +> +> +> **Handy Tips** +> +> The `Pending` and `Rejected` states are available only if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled on your account. +> + +### Related Information + +- [Payout Life Cycle and States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md) +- [Queued Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/queued.md) +- [Intelligent Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/intelligent-payouts.md) +- [Payouts to Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/cards.md) +- [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) +- [Payout Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/best-practices.md) diff --git a/llm-content/x/payouts/states-life-cycle.md b/llm-content/x/payouts/states-life-cycle.md new file mode 100644 index 00000000..1b3de181 --- /dev/null +++ b/llm-content/x/payouts/states-life-cycle.md @@ -0,0 +1,246 @@ +--- +title: RazorpayX Payout States and Life Cycle +heading: Payout States and Life Cycle +description: Explore the various states of processing a payout. Know more about its life cycle. +--- + +# Payout States and Life Cycle + +[Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) are made to [Contacts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md). A payout has various states in its life cycle. + +## Payout Life Cycle + +The following flow illustrates the various states in the payout life cycle: + +![Payouts Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/rzpx-payouts-life-cycle-modified.jpg.md) + +## Payout States + +Following are the various payout states: + +- `pending` +- `queued` +- `scheduled` +- `processing` +- `processed` +- `reversed` +- `cancelled` +- `rejected` +- `failed` + +> **INFO** +> +> +> **Handy Tips** +> +> For more information on the complete Payout States and the Status Response Code, refer [Payout Status Details.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) +> +> Get automatic notifcations about the payout states using [Webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md). [Set up and configure webhooks](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/apis/subscribe.md) to improve process efficiency, and stay updated on the status of the payout. +> +> + +### Pending + +If you have the [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) feature enabled on your account, the payout moves to the `pending` state if the payout requires approval as per the Approval Workflow. + +At this stage, the payout details are stored in the system, but no processing is done either by Razorpay or the Contact's bank. + +> **INFO** +> +> +> **Handy Tips** +> +> - The payout needs to be approved/rejected by the required user(s). Any payout in `pending` state for more than 3 months will automatically be `rejected`. +> - The `Pending` and `Rejected` states are available only if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled on your account. +> +> + +From the `pending` state, payouts can either move to the: +- `queued` state if you do not have sufficient balance to process the payout. +- `scheduled` state if you have scheduled the payout. +- `processing` state if you have sufficient balance to process the payout. +- `rejected` state if you reject the payout or if you did not approve the payout before the scheduled date and time. + +### Queued + +A payout is assigned the `queued` status only when you do not have sufficient balance in your business account. + +At this stage, the payout details are stored in the system, but no processing has been done either by Razorpay or the contact's bank. + +> **WARN** +> +> +> **Watch Out!** +> +> The payout remains in this state until you add sufficient funds to your business account. Any payout in `queued` state for more than 3 months will automatically be `failed`. +> + +From the `queued` state, payouts can either move to the: +- `processing` state when you add sufficient balance to process the payout. +- `cancelled` state if you cancel the payout. + +> **INFO** +> +> +> +> **Handy Tips** +> +> The `scheduled` state does not apply to Queued Payouts. Know more about [Queued Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/queued.md). +> + +### Scheduled + +The payout remains in the `scheduled` state until the scheduled date and time. At this stage, the payout details are stored in the system, but no processing is done either by Razorpay or the Contact's bank. + +From the `scheduled` state, payouts can either move to the: +- `processing` state when the scheduled time is reached. +- `cancelled` state if you cancel the payout. +- `failed` state if you do not have sufficient balance to process the payout. + +> **INFO** +> +> +> **Handy Tips** +> +> The `queued` state does not apply to Scheduled Payouts. Know more about [Scheduled Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/scheduled.md). +> + +### Processing + +A payout can acquire the `processing` state in one of the three ways: + +- From the `pending` state, when you approve the payout and you have sufficient balance to process the payout. +- From the `queued` state, when you add sufficient funds to your account to process the payout. +- Immediately, when a payout is created if you do not have the Queued Payouts or Approval Workflow feature enabled on your account. + +At this stage, either Razorpay or the Contact's bank process the payout. No further action is required by you while a payout is in the `processing` state. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - IMPS and UPI payouts can remain in the [`processing` state for T+3 working days.](#deemed-success) +> - You can check status details of a payout to know why it is in the `processing` state. It maybe due to: +> - [Deemed Success](https://razorpay.com/blog/business-banking/payout-processing-imps-upi-transactions-deemed-success-npci/) +> - NEFT/RTGS off hours +> - Partner bank or beneficiary bank issues +> - Other bank or server issues +> You can use this information to keep your beneficiaries informed. +> +> 1. [Status Details via API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) +> 2. [Status Details via Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/status-details.md) +> 3. You can subscribe to daily reports to receive a detailed document on the status, reason for status and SLA for the payouts in `processing state`. [Raise a support ticket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) from the Dashboard, with a list of recipient email IDs. We will enable the function for you in 3 working days. +> +> + +From `processing` state, payouts can either move to the: +- `processed` state if the payout is successful. +- `reversed` state if the payout fails. + +#### Deemed Success + +IMPS and UPI Payouts can be in the processing state for up to T+3 working days. NPCI marks these payouts as [deemed success/deemed approved](https://razorpay.com/blog/business-banking/payout-processing-imps-upi-transactions-deemed-success-npci/). + +Below is how a payout is processed from when you authorise it to when you receive the terminal payout state (`processed`/`failed`/`reversed`). + +![payout transaction flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-payout-npci.jpg.md) + +- If NPCI is successfully able to credit money to your beneficiary account, it returns a success status to the partner bank who in turn returns it to us and we mark the payout as `processed`. +- If NPCI is not able to credit money to your beneficiary account, it returns a failed status to the partner bank, who passes the status to us and we mark the payout as `reversed`. + +Sometimes, there are technical errors when trying to credit the payout to the beneficiary account. When this happens, it is not possible to be certain if the payout was credited to the beneficiary. + +In such cases, NPCI moves the payout to an intermediate state ([deemed success](https://razorpay.com/blog/business-banking/payout-processing-imps-upi-transactions-deemed-success-npci/)). From this state, the payout can go to the `processed`, `failed` or `reversed` state. + +When we receive the deemed success from NPCI, we do not move the payout to a terminal state. We do this to avoid returning a false positive state to you. Instead, we keep the payout in the `processing` state till we receive the final status from the partner bank. + +After NPCI and beneficiary bank reconcile the deemed success transactions, we receive the final status from the partner bank. Only then do we move the payout to the terminal state (`processed`/`failed`/`reversed`). This takes T+3 working days. + +### Processed + +The `processed` status means that payout has been processed by the contact's Bank. + +A payout in the `processed` state can move to the `reversed` state if a payout failure is detected. + +This can happen due to various reasons such as the customer's bank reversing the transaction or if the payout was reversed by the clearing house. + +This is a terminal state for a payout. No further action is possible on a payout at this state. + +### Reversed + +A payout acquires the `reversed` state when the payout operation fails. This can happen due to issues with our partner banks, clearing house or even the customer's bank. + +As soon as Razorpay identifies a payout failure scenario, it moves the payout to the `reversed` state and creates a reversal transaction that credits your business account with the original payout amount including fees and tax. + +A Payout can move from `reversed` state to `failed` state only in case of RazorpayX powered Current accounts. + +This is a terminal state for a payout. No further action is possible on a payout at this state. + +> **WARN** +> +> +> **Watch Out!** +> +> A transaction can also move from `failed` to `reversed` status in certain situations. When a transaction fails but money is debited from the account, the status changes to `reversed` only after the money is credited back. Until then, the status remains as `failed`. +> +> +> + +### Rejected + +A payout in the `pending` state moves to the `rejected` state when: + +- You manually reject the payout. +- You do not approve it before the scheduled date and time. + +No further action is possible on a payout at this state. + +> **INFO** +> +> +> +> **Handy Tips** +> +> The `Pending` and `Rejected` states are available only if you have [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) enabled on your account. +> + +### Cancelled + +A payout moves to the `cancelled` state when you manually cancel a payout in the: + +- `queued` state. You can cancel a payout in the `queued` state either from the [Dashboard](https://x.razorpay.com/) or using our [APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x/payouts/cancel.md). +- `scheduled` state. You can cancel a payout in the `scheduled` state from the [Dashboard](https://x.razorpay.com/). + +A payout that is cancelled acquires the `cancelled` state. No further action is possible on a payout at this state. + +### Failed + +The payout failed status is applicable in both cases when you're making payouts using your current account balance or your RazorpayX Lite balance. + +- Payouts in the `processing` state move to the `failed` state when they are failed by our current account partner bank. +- Payouts in the `scheduled` state move to the `failed` state if you do not have sufficient balance to process them. + +This is a terminal state for a payout. No further action is possible on a payout at this state. + +## Reversal Transaction + +A reversal transaction is created whenever a payout fails. + +A payout may fail at Razorpay, at the contact's bank or elsewhere. In some rare scenarios, failure might happen a few days after the payout is moved to the `processed` state. + +As soon as Razorpay detects a failure, we create a reversal transaction and credit the payout amount (including the fees and tax) to your business account. The original payout transaction status is changed to `reversed`. + +Anytime a payout fails, a webhook is triggered to notify of the failure. A payout failure event is accompanied by a reversal transaction. + +You can view a list of reversed transactions from the [RazorpayX Dashboard](https://x.razorpay.com/). + +### Related Information + +- [Queued Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/queued.md) +- [Scheduled Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/scheduled.md) +- [Intelligent Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/intelligent-payouts.md) +- [Payouts to Cards](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/cards.md) +- [Payout Status Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) +- [Payout Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/best-practices.md) diff --git a/llm-content/x/payouts/status-details.md b/llm-content/x/payouts/status-details.md new file mode 100644 index 00000000..f4fb19fc --- /dev/null +++ b/llm-content/x/payouts/status-details.md @@ -0,0 +1,407 @@ +--- +title: RazorpayX Payout Status +heading: Check Payout Status +description: Check the status of payouts on the RazorpayX Dashboard. +--- + +# Check Payout Status + +Payout Status details are returned when a payout is created and moves to another state. Know more about [Payout States](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md). + +> **WARN** +> +> +> **Watch Out!** +> +> The `failure_reason`, `queueing_details` and `cancellation_details` fields, along with the error object, would be deprecated from the API response. Please move to Payout status details to understand the status of your payout and share this information with your developers. +> + +## About Status Details + +Status details shows intermediate statuses (`pending`, `processing`, `queued`) and terminal states (`reversed` and `failed`) along with the payout clearance SLA. You can view the status of a payout in the following places: +- [RazorpayX Dashboard](#check-status-on-dashboard) +- [Fetch Payout API response](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) +- [Webhook Payloads](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) + +Status details also tells you why a payout is in the `processing` state. Some reasons include: + +- [Deemed Success](https://razorpay.com/blog/business-banking/payout-processing-imps-upi-transactions-deemed-success-npci/) +- NEFT/RTGS off hours +- Partner bank or beneficiary bank issues +- Other bank or server issues + +Whenever an attribute in the status details changes, we send a payout update webhook, which you can use to inform your beneficiaries. + +## Check Status on Dashboard + +You can check the status details of a payout in three ways on the RazorpayX Dashboard. + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +1. Navigate to either of the following. + + + +### Need Help Widget + + You can check the payout status using the **Need Help?** button at the bottom-right corner of the Dashboard. Watch the video below or read along. + + +[Video: https://www.youtube.com/embed/epkmUCUI83c] + + 1. Click the **Need Help?** widget. + 1. In the right pane, use commas to enter multiple Payout IDs in the text box. + ![Search Payout Status on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payout-status-support-search.jpg.md) + 1. Click **Search**. + + It opens a list view of the payouts along with their statuses. You can hover over the payout status or open the summary view for more information on the payout's status. + + + +### Payout Summary View + + 2. Navigate to **Payouts** from the left menu. + 3. Select the particular payout to open the summary view in the right pane. + + ![Payout status details on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payouts-status-summary.jpg.md) + + + +### Subscribe to Daily Reports + + You can also subscribe to daily reports to receive a detailed document on the status, status and SLA for the payouts in the `processing` status. + + To subscribe, [raise a support ticket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) from the RazorpayX Dashboard with a list of recipient email IDs. We will enable the function for you in 3 working days. + + + + +![Check Payout Status on RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-check-payout-status-dashboard.jpg.md) + +## Payout Status Details +Find below an exhaustive list of payout statuses, their details and also possible steps you can take to proceed further. + + +### Status: reversed/failed + + + + bank_account_closed + + - **Description**: Payout failed as the beneficiary account is closed. Please contact the beneficiary bank. + - **Source**: beneficiary_bank + - **Next Steps**: NA + + + +### bank_account_frozen + + - **Description**: Payout failed as beneficiary account is frozen. Please contact the beneficiary bank. + - **Source**: beneficiary_bank + - **Next Steps**: NA + + + +### bank_account_invalid + + - **Description**: Payout failed due to invalid beneficiary account details. + - **Source**: beneficiary_bank + - **Next Steps**: NA + + + +### beneficiary_account_dormant + + - **Description**: Payout failed as beneficiary account is dormat. Please contact the beneficiary bank. + - **Source**: beneficiary_bank + - **Next Steps**: NA + + + +### beneficiary_bank_failure + + - **Description**: Payout failed at the beneficiary bank due to a technical issue. Please retry after 30 min. + - **Source**: beneficiary_bank + - **Next Steps**: Retry + + + +### beneficiary_bank_offline + + - **Description**: Beneficiary bank systems are offline. Please retry after 30 min. + - **Source**: beneficiary_bank + - **Next Steps**: Retry + + + +### beneficiary_bank_rejected + + - **Description**: Payout rejected by the beneficiary bank. Please contact the beneficiary bank. + - **Source**: beneficiary_bank + - **Next Steps**: NA + + + +### beneficiary_bank_technical_error + + - **Description**: Payout failed due to a technical issue at the beneficiary bank. Please retry after 30 min. + - **Source**: beneficiary_bank + - **Next Steps**: Retry + + + +### beneficiary_psp_offline + + - **Description**: Beneficiary PSP systems are offline. Please retry after 30 min. + - **Source**: beneficiary_bank + - **Next Steps**: Retry + + + +### imps_not_allowed + + - **Description**: IMPS is not enabled on beneficiary account. Please retry with different mode. + - **Source**: beneficiary_bank + - **Next Steps**: Retry with a different payment mode. + + + +### invalid_ifsc_code + + - **Description**: Payout failed as the IFSC code is invalid. Please correct the IFSC code and retry. + - **Source**: beneficiary_bank + - **Next Steps**: Retry with correct IFSC code. + + + +### npci_beneficiary_timeout + + - **Description**: Temporary technical issue between NPCI and the beneficiary bank. Please retry after 30 min. + - **Source**: beneficiary_bank + - **Next Steps**: Retry + + + +### transaction_limit_exceeded + + - **Description**: Payout amount greater than the limit supported by the beneficiary account. + - **Source**: beneficiary_bank + - **Next Steps**: NA + + + +### amount_limit_exhausted_neft + + - **Description**: The NEFT 24*7 limits for your account has been exhausted. Please retry after sometime. + - **Source**: business + - **Next Steps**: Retry + + + +### beneficiary_account_invalid + + - **Description**: Payout failed due to invalid beneficiary account number. + - **Source**: business + - **Next Steps**: NA + + + +### beneficiary_vpa_invalid + + - **Description**: UPI validation failed. If the UPI ID is valid, please retry after sometime. + - **Source**: business + - **Next Steps**: Ensure UPI ID is valid and retry. + + + +### insufficient_funds + + - **Description**: Payout failed due to insufficient funds in your account. + - **Source**: business + - **Next Steps**: Add funds to your account and retry. + + + +### invalid_beneficiary + + - **Description**: Customer account does not exist with the wallet provider for the given phone number. + - **Source**: business + - **Next Steps**: NA + + + +### gateway_down + + - **Description**: Payout failed as the partner bank is facing technical issues. Please retry. + - **Source**: gateway + - **Next Steps**: Retry + + + +### gateway_technical_error + + - **Description**: Payout failed due to a temporary technical issue at the partner bank. Please retry after 30 min. + - **Source**: gateway + - **Next Steps**: Retry + + + +### gateway_timeout + + - **Description**: Payout timed out at the partner bank. Please retry after 30 min. + - **Source**: gateway + - **Next Steps**: Retry + + + +### server_error + + - **Description**: Payout failed. Contact support for help. + - **Source**: internal + - **Next Steps**: Contact support to find out the exact issue. + + + +### server_error_temporary + + - **Description**: Payout failed due to temporary technical issue. Please retry. + - **Source**: internal + - **Next Steps**: Retry + + + + + + + +### Status: processing + + + + beneficiary_bank_confirmation_pending + + - **Description**: Confirmation of credit to the beneficiary is pending from `beneficiary_bank`. Please check the status after (date,time). + - **Source**: beneficiary_bank + - **Next Steps**: Inform the customer of the delay, reason for the same and by when it will be cleared. + + + +### bank_window_closed + + - **Description**: The `mode` window for the day is closed. Please check the status after (date,time). + - **Source**: gateway + - **Next Steps**: Inform the customer of the delay, reason for the same and by when it will be cleared. + + + +### payout_bank_processing + + - **Description**: Payout is being processed by the partner bank. Please check the final status after (date,time). + - **Source**: gateway + - **Next Steps**: Inform the customer of the delay, reason for the same and by when it will be cleared. + + + +### amount_limit_exhausted + + - **Description**: The (mode) 24*7 limits for your account has been exhausted. Please check the status after (date,time). + - **Source**: business + - **Next Steps**: Inform the customer of the delay, reason for the same and by when it will be cleared. + + + +### partner_bank_pending + + - **Description**: Payout is being processed by our partner bank. Please check the final status after (date,time). + - **Source**: internal + - **Next Steps**: Inform the customer of the delay, reason for the same and by when it will be cleared. + + + + + + + +### Status: processed + + + + payout_processed + + - **Description**: Payout is processed and the money has been credited into the beneficiary's account. + - **Source**: beneficiary_bank + - **Next Steps**: NA + + + + + + + +### Status: pending + + + + pending_approval + + - **Description**: Workflow for the payout is pending approval from the approver(s). + - **Source**: business + - **Next Steps**: NA + + + + + + + +### Status: queued + + + + gateway_degraded + + - **Description**: Payout is queued as Partner bank systems are down. + - **Source**: gateway + - **Next Steps**: NA + + + +### beneficiary_bank_down + + - **Description**: Beneficiary bank's systems are not working. Payout will be processed after the system starts working else it will be failed after the pre-defined time limit. + - **Source**: gateway + - **Next Steps**: NA + + + +### low_balance + + - **Description**: Payout is queued as there is insufficient balance in your account to process the payout. + - **Source**: business + - **Next Steps**: NA + + + +### syncing_balance + + - **Description**: Payout is queued as your balance is being synced with the bank. Please check the status after some time. + - **Source**: gateway + - **Next Steps**: Check status after some time. + + + +### fee_recovery_pending + + - **Description**: Payout is queued as you have a pending fee recovery payout. It will get processed after the fee recovery payout is cleared. + - **Source**: business + - **Next Steps**: NA + + + + + + +### Related Information + +- [About Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) +- [Payout Best Practices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/best-practices.md) +- [Status Details via API](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/errors/x/payout-status-details.md) diff --git a/llm-content/x/payouts/sub-accounts.md b/llm-content/x/payouts/sub-accounts.md new file mode 100644 index 00000000..f05807f4 --- /dev/null +++ b/llm-content/x/payouts/sub-accounts.md @@ -0,0 +1,122 @@ +--- +title: Sub-Accounts on RazorpayX +heading: Sub-Accounts +description: Create and manage multiple sub-accounts with a single RazorpayX powered Current Account to manage funds with safety and in compliance. +--- + +# Sub-Accounts + +The purpose of this feature is to allow the **master** account to create and manage multiple **sub**-**accounts** linked to their Current Account. The master can allocate amount limits to each sub-account. Each sub-account has its own RazorpayX Dashboard, API keys and Approval Workflows. Using this feature, businesses can create multiple sub-accounts and manage payouts for multiple use cases via a single bank account. It records the funds and makes reconciliation easier for the master as well as sub-account owners. + +When a sub-account holder initiates a payout, limit on the sub-account is reduced and the money is debited from the master's bank account. The limits assigned to the sub-accounts are static, the master has to reset the limits once the sub-account has exhausted its limit. The master account user can increase this limit anytime. + +## Use case + +The following is a basic use case for sub-accounts: + +### Non-Banking Financial Companies + +Non-Banking Financial Companys' (NBFCs) can use this feature to work with multiple Loan Service Provider (LSPs) on a single bank account. NBFCs can provide secure and restricted access to LSPs to enable loan disbursements to their customers and manage their payouts with sufficient checks and balances in place. + +In compliance with the [digital lending guidelines](https://rbidocs.rbi.org.in/rdocs/notification/PDFs/GUIDELINESDIGITALLENDINGD5C35A71D8124A0E92AEB940A7D25BB3.PDF), NBFCs can ensure that the loan disbursals flow directly from their account to the borrower's account. However, these disbursals are triggered by the LSP on behalf of the NBFC. For both these steps to work together, the LSP needs access to initiate loan disbursals to their customers. + +> **INFO** +> +> +> **Handy Tips** +> +> You can [download reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard.md#reports) for your sub-accounts and see the real-time limit assigned to them. +> + +## How it Works + +Different features are enabled for the **Master Account** and **Sub-Account** respectively. The process is as follows: + +### Master Account + +To create a master account: + +1. [Sign Up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/set-up.md#new-users) on the RazorpayX Dashboard. +2. Open a [Current Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/current-account.md#current-account) using RazorpayX. + +The master account functions like any other RazorpayX account. In addition to that, you can view all the linked sub-accounts on your RazorpayX Dashboard home screen. + +#### Add Limit to Sub-Accounts + +Use the master account to add limit to the sub-account via the Dashboard. To add limit to a sub-account: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Hover over the sub-account for which you want to increase the limit and click on the pencil icon. + ![Edit the sub-account limit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-sub-accounts-modify-limit.jpg.md) +3. Enter the amount you want to add to the limit and click **Save**. + ![Save Limit](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-sub-accounts-modify-limit-save.jpg.md) +4. Enter the OTP sent to your registered number and email. Click **Submit**. + ![Enter OTP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-sub-accounts-submit-otp.jpg.md) + +#### View Past Limit of Sub-Accounts + +To view the past limits assigned to the different sub-accounts: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Click **Sub-Account Limits** on the left navigation. +3. You can filter the sub-account for which you want to view the limits and choose the appropriate dates if required. + ![Sub-Accounts Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-sub-accounts.jpg.md) +4. You can also export the data as `.csv` or `.xlsx`. + +### Sub-Account + +> **WARN** +> +> +> **Watch Out!** +> +> Sub-account holders can only make [Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#how-to-make-payouts). +> + +The following functions are **not** available for sub-accounts: + +- AmazonPay Payouts +- Payouts to Cards via card rails +- Tax Payments +- Payroll + +The sub-account Name, Customer Identifier, Merchant ID and Live balance of the sub-accounts are visible to the Master account and the RazorpayX Lite accounts assigned to the sub-accounts get disabled. + +- The master account and sub-account have their own merchant IDs. +- The master account can track the funds for the sub-accounts. +- Only the master account can add fund limits to the sub-account. + +> **WARN** +> +> +> **Watch Out!** +> +> Only users with access to initiate payouts can load funds to sub-accounts. +> + +#### Create a Sub-Account + +To create a sub-account: + +1. [Sign Up](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/set-up.md#new-users) to the RazorpayX Dashboard. +2. Send an email to [x.support@razorpay.com](mailto:x.support@razorpay.com) and the owner of the master account to link your account with theirs. +3. Once the owner of the Master Account has approved and confirmed the debit account details for your account on the same mail, we will link the accounts. + +#### Example + +The NBFC ***Acme Crop.*** (master account holder) funds FinTech ***Bertie Botts*** (sub-account holder) with ₹1,00,000 via the add limit option. + +- FinTech ***Bertie Botts*** lends the fund as follows: + - ₹20,000 to *Gaurav* + - ₹30,000 to *John* + - ₹40,000 to *Saurabh* +- **Acme Crop.** can view the balance on ***Bertie Botts***’s account (₹10,000). +- The ledger entry is made for ***Gaurav***, ***John*** and ***Saurabh*** for ***Acme Crop.*** as well as ***Bertie Botts***, respectively. +- The actual funds do **not** move from ***Acme Crop.*** to ***Bertie Botts***. The funds are only a limit allocation assigned to the ***Bertie Botts***. +- The actual funds flow directly from ***Acme Crop.*** to ***Gaurav***, ***John*** and ***Saurabh*** respectively. + +### Related Information + +- [Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) +- [Current Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types/current-account.md) +- [Support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) diff --git a/llm-content/x/quickstart.md b/llm-content/x/quickstart.md new file mode 100644 index 00000000..eafc5c39 --- /dev/null +++ b/llm-content/x/quickstart.md @@ -0,0 +1,128 @@ +--- +title: Quickstart Guide +description: Complete guide to get started with Razorpay's Banking platform. +--- + +# Quickstart Guide + +Welcome to Razorpay! This guide will walk you through setting up your account and how to use our solutions for your business needs. + +## Step 1: Create an Account + +You can [sign up for a RazorpayX account](https://x.razorpay.com/auth/signup) or if you are already a Razorpay user, use your existing credentials to sign in. After KYC completion and testing, live mode unlocks for real payments. + +### Test Mode vs Live Mode + + + + - Start without KYC completion. + + - Use test transactions with dummy data. No real money involved. + + - API keys begin with `rzp_test_`. + + - Perfect for development and testing. + + + + + + + - Requires KYC verification (24-48 hours). + + - Start creating real customer payouts. + + - API keys begin with `rzp_live_`. + + - Full access to all features. + + + + +## Step 2: Select Solutions + +Choose solutions based on your business requirements. + + +### Payouts + + With the Payouts module, you can: + - Make instant Payouts individually or in bulk for chargebacks or cashbacks. + - Use IMPS, NEFT, RTGS, UPI or Bank Transfer to pay. Know more about [ creating a payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#create-a-payout). + + + +### Payout Links + + Send funds to anyone, even when you do not have their bank account details. You just need to enter the recipient's name, phone number or email, and the amount to be paid to create a Payout Link. [Know more about Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md). + + + +### RazorpayX Vendor Payouts + + Manage your vendor payments effortlessly with Vendor Payouts. You can choose to settle the dues against all the invoices raised by the vendor in one go, or make selective payments. [Explore Vendor Payment capabilities on RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md). + + + +### RazorpayX Tax Payments + + Use RazorpayX to automate direct tax payments via a user-friendly interface. Know more about [RazorpayX Tax Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments.md). + + + +### RazorpayX Payroll + + You can manage payroll, attendance, reimbursements and compliances - all in a single Dashboard! RazorpayX Payroll fully automates payroll solutions for you., including tax and filings. Know more about [RazorpayX Payroll.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll.md). + + +## Step 3: Key Dashboard Actions + + +### Generate API Keys + + If you are using our APIs, follow these steps to [generate API keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/api/x.md) for the integration: + 1. Log in to Dashboard. + 2. Navigate to the user icon in the top-right corner of the screen and click **My Profile** → **My Accounts & Settings**. + 3. Navigate to **Developer Controls** and click **Generate Key**. + 4. Download and save **Key ID** and **Key Secret** securely. + + **Important:** + - Only Owner and Admin roles can access API keys. + - Generate separate keys for Test and Live modes. + - Key Secret is only visible at generation time. + + + +### Add Team Members + + Follow these steps: + 1. Log in to the Dashboard. + 2. Navigate to **My Account & Settings** → **Team Management** → **Manage Team**. + 3. Click **+ Team Member**. + 4. Enter their email address and select role from the dropdown. + 4. Click **Send Invite**. + + + +### Configure Webhooks + + We recommend setting up webhooks to receive notifications, if you are integrating with our APIs. + 1. Log in to the Dashboard. + 1. Navigate to **My Account & Settings** → **Developer Controls**. + 2. Click **Add Webhooks**. + 3. Enter your endpoint URL. + 4. Select events to monitor. + 5. Add webhook secret for signature verification. + 6. Click **SAVE** to enable the webhook. + + [Webhooks Documentation →](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/webhooks.md) + + +## Next Steps + +Once your account is created: + +1. **Complete KYC**: [Submit KYC documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md#2-submit-kyc-details) for live mode activation. +2. **Choose Solution**: Select solutions based on your business needs and technical capabilities. +3. **Test Thoroughly**: Use test mode before going live. +4. **Go Live**: Switch to live mode when ready. Use live mode keys with our APIs. diff --git a/llm-content/x/rbl-ybl-current-account/cif.md b/llm-content/x/rbl-ybl-current-account/cif.md new file mode 100644 index 00000000..4a618b11 --- /dev/null +++ b/llm-content/x/rbl-ybl-current-account/cif.md @@ -0,0 +1,56 @@ +--- +title: KYC for Current Account Operators +description: Find the details of KYC documents of operators (based on residential status) required to open a Current Account powered by RazorpayX in partnership with RBL/Yes Bank. +--- + +# KYC for Current Account Operators + +You have to submit **hard copies** of the below KYC documents along with the account opening form and business documents to open a current account with RazorpayX. + +## Foreign Nationals Residing in India + +The following documents are required for non-Indians residing in India. + +- Non-Resident Indian (NRI) Customer Information Form (CIF). [Download form here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/razorpayx_current_account_documents-CIF-NRI.pdf.md). +- Investment Services Account(ISA) form. +- Valid Passport. +- Indian Visa. +- PAN or Form 60 and Form 49A. +- Foreign Registration Regional Office (FRRO) certificate or a certificate from Foreigners Registration Officer (FRO) which includes the purpose of stay, duration and type of visa. + +## Indian Residents + +The following documents are required for Indian residents. + +- **ID Proof**, this can be any valid Indian ID. +- **Signature Proof**, this can be any government issued document other than what was submitted as ID proof. + +> **INFO** +> +> +> **Watch Out!** +> +> - **Signature declaration**: Required if the signature on the signature proof document does not match the signature on the ID proof. [](/docs/assets/images/razorpayx_current_account_documents-sign_declaration.pdf). +> - **Dual name declaration**: Required if the name on the signature proof does not match the name on the ID proof. A slight mismatch is allowed for South Indian names. [](/docs/assets/images/razorpayx_current_account_documents-sign_declaration.pdf). +> - **Vernacular declaration**: If signing in any language other than English, that is any regional language, declarations are required from two bank officials. [](/docs/assets/images/razorpayx_current_account_documents-sign_declaration.pdf). +> + +- **Address Proof**, this can be any one officially valid document such as: Passport, driving licence, voters’ ID card, PAN card, Aadhaar card and Job Card issued by NREGA and signed by a State Government official. + +## Non-Resident Indian + +These documents vary, depending on your residential status. Check your residential status for a list of documents. + +The following documents are required for Non-Resident Indians (NRIs). + +- Non-Resident Indian (NRI) Customer Information Form (CIF). [Download form here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/razorpayx_current_account_documents-CIF-NRI.pdf.md). +- Investment Services Account (ISA). +- Valid Passport (mandatory). +- Visa for the country of residence. + - For foreign nationals, Visa is NOT required. +- PAN (not mandatory). +- Person of Indian Origin (PIO) or Overseas Citizenship of India (OCI) Card (mandatory as officially valid documents for KYC). + +## Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/rbl-ybl-current-account/company.md b/llm-content/x/rbl-ybl-current-account/company.md new file mode 100644 index 00000000..422a4b59 --- /dev/null +++ b/llm-content/x/rbl-ybl-current-account/company.md @@ -0,0 +1,74 @@ +--- +title: Current Account Documents for Company +description: List of documents required to open a Current Account powered by RazorpayX in partnership with RBL/Yes Bank for a Private/Public Limited Company/OPC. +--- + +# Current Account Documents for Company + +This page has information on the documents required for a **Private/Public Limited** company to open a Current Account using RazorpayX in partnership with RBL/Yes Bank. + +> **INFO** +> +> +> +> **Handy Tips** +> +> +> - All declarations should be on firm letter head and dated. +> - All KYC documents must include the rectangular seal (director / authorised signatory) along with signatures on all pages. +> - The LLP entity should be registered on The Ministry of Corporate Affairs (MCA) site and the status should be active on the site. +> - The cheque amount can range from ₹20,000 to ₹10,00,000 and must be shared at the time of document pickup. +> +> + +## Forms Required + +SL. No. | Forms +--- +1 | Account Opening Form and Customer Information Form (CIF) for the **entity**. +--- +2 | Individual CIF form and KYC documents for:- Authorized signatories / directors operating the account. +- The natural person / individual who, whether acting alone or together, or through one or more juridical person, exercises control through ownership. +- The natural person / individual who, whether acting alone or together, or through one or more juridical person ultimately has ownership of / entitlement to more than 25% of the shares or capital or profits of the company. + +--- +3 | Corporate Netbanking Application Form. +--- +4 | Foreign Account Tax Compliance Act (FATCA) declaration in the name of the entity. + +## Documents Required + +SL. No. | Documents +--- +1 | [KYC documents ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/cif.md) of all Authorised Signatories +--- +2 | Memorandum of Association (MoA) & Articles of Association (AoA). +--- +3 | Certificate of Incorporation (CoI). +--- +4 | Board Resolution (BR) duly signed. - All pages have to be signed by the Company Secretary OR Managing Director OR at least 2 Directors. +- It should contain a clause mentioning account opening with the preferred bank (RBL/ YBL). +- In case the BR is more than 6 months old, then it should mandatorily state that it is a *Certified True and Updated copy* BR. +- BR to be signed by managers/officers/employees who the have Power of Attorney granted to transact on behalf of the company. +- In the case of a one-person company (OPC) the BR can be signed by the single authority. + +--- +5 | PAN Card in the name of the company. +--- +6 | GST registration certificate in the name of the company. +--- +7 | Valid address proof in the name of the entity, **if address is not available or is incomplete in the above documents**. [Proof of Company Address ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/company/kyc.md#proof-of-company-address-any-1) (any one). +--- +8| Latest list of directors / List of directors downloaded from The Ministry of Corporate Affairs (MCA) site dated and signed by the company secretary or managing director or at least 2 directors. If the board resolution of the company gives authority to any director(s), to sign singly on any documents being submitted to the bank, then the said director(s) can sign the latest list of directors. +--- +9 | Beneficiary Owner(BO) declaration signed by senior management of the company such as the CEO / CFO / Director / company secretary. If no one satisfies the criteria, the entity has to assign one person as the BO. +--- +10 | Covering Letter (Attach to ₹600 duty stamp paper). +--- +11 | A cheque of minimum ₹20,000 in the entity's name. If there are any transfer or currency conversion charges, the cheque amount should be higher to ensure at least ₹20,000 is credited to the new account after all deductions. For example, if the charges are ₹1,500, write a cheque for ₹21,500. + +[ Download all forms and documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x_ca_docs-public-limited-updated190422.zip.md) + +## Related Information + + [Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/rbl-ybl-current-account/company/kyc.md b/llm-content/x/rbl-ybl-current-account/company/kyc.md new file mode 100644 index 00000000..b06caede --- /dev/null +++ b/llm-content/x/rbl-ybl-current-account/company/kyc.md @@ -0,0 +1,27 @@ +--- +title: Private/ Public Limited Company/ OPC | KYC Documents +heading: Current Account KYC Documents - Private/ Public Limited Company/ OPC +description: List of documents required to open a Current Account powered by RazorpayX in partnership with RBL/Yes Bank for a Private/Public limited company/One Person Company (OPC). +--- + +# Current Account KYC Documents - Private/ Public Limited Company/ OPC + +## Proof of Company Address (Any one) + +1. Any of the Proof of Existence documents, if the document contains the address and is registered with the Registrar of Societies / Charity commissioner / PF commissioner. +1. Telephone bill (landline / mobile) / Electricity bill of public and approved private operators/Water Bill issued by Municipality (not more than 3 months old) in the name of company. +1. Property ownership deed (Title Deed) in company’s name duly stamped and registered. +1. Property tax paid receipt/bill raised in the name of the company. +1. 1-month account statement from an existing bank account maintained with a Scheduled Commercial bank (not more than 3 months old). + - In the case of Rural Branches statement from Scheduled State Co-operative Banks in the name of the firm. +1. Registered and stamped lease / rent / leave and license agreement in the name of the firm. +1. Form 18 / INC-22 along with ROC challan and Statutory Valuation Report (SVR) format containing valid present address. +1. Downloaded copy taken from MCA site mentioning address provided same is matching with address mentioned in the account opening form (AOF). +1. Latest available acknowledged copy of Income Tax / GST /Assessment order along with printout from PAN website confirming the PAN number and the name of entity (printout to be duly signed by Relationship Manager / Branch Manager). +1. 12A or 80G certificate provided it contains the address. +1. In case the address is mentioned in registration certificate and bye laws matches with the Trust Deed, then registration certificate can be considered as an address proof, subject to satisfactory SVR (SVR Format to be filled). +1. Communication / letter from the Ministry of Home Affairs (MHA). + +## Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/rbl-ybl-current-account/llp.md b/llm-content/x/rbl-ybl-current-account/llp.md new file mode 100644 index 00000000..e937e1e1 --- /dev/null +++ b/llm-content/x/rbl-ybl-current-account/llp.md @@ -0,0 +1,70 @@ +--- +title: Current Account Documents for LLP +description: List of documents required to open a Current Account powered by RazorpayX in partnership with RBL/Yes Bank for a Limited Liability Partnership. +--- + +# Current Account Documents for LLP + +This page has information on the documents required for a **Limited Liability Partnership (LLP)** firm to open a Current Account using RazorpayX in partnership with RBL/Yes Bank. + +> **INFO** +> +> +> **Handy Tips** +> +> +> 1. All KYC documents must include the rectangular seal (director / authorised signatory) along with signatures on all pages. +> 2. The LLP entity should be registered on The Ministry of Corporate Affairs (MCA) site and the status must be active on the site. +> 3. The cheque amount can range from ₹20,000 to ₹10,00,000 and must be shared at the time of document pick up. +> + +## Forms Required + +SL. No. | Document List +--- +1 | Account Opening Form and Customer Information Form (CIF) for the entity. +--- +2 | Individual CIF form and KYC documents for:- All authorized signatory/signatories +- All partners + +--- +3 | Corporate Netbanking Application Form. +--- +4 | Foreign Account Tax Compliance Act (FATCA) declaration in the name of the entity. + +## Documents Required + KYC documents for: +- All authorized signatory/signatories. +- All partners. + +SL. No. | Documents +--- +1 | [KYC documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/cif.md) in the name of all authorised signatories/partners. +--- +2 | LLP declaration signed by all the partners. +--- +3 | LLP PAN copy. +--- +4 | Valid address proof in the name of the entity. [List of acceptable documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/llp/kyc.md) (any one). +--- +5 | LLP Agreement. Where the banking clause is not mentioned in the LLP agreement, all the partners must sign the Resolution / LLP Declaration certifying the banking clause and mode of operation for the account. Mode of operation letter signed by all partners. +--- +6 | Beneficiary Owner(BO) declaration signed by all partners of the firm. +--- +7 | Certificate of Incorporation. +--- +8 | Mode of operation letter signed by all partners (if mode of operation is not specified in the LLP Agreement). +--- +9 | Account Opening Board Resolution. +--- +10 | Covering Letter (Attach to ₹600 duty stamp paper). +--- +11 | A cheque of minimum ₹20,000 in the entity's name. If there are any transfer or currency conversion charges, the cheque amount should be higher to ensure at least ₹20,000 is credited to the new account after all deductions. For example, if the charges are ₹1,500, write a cheque for ₹21,500. +--- +12 | Internet Banking Letter. + +[Download all forms and documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x_ca_docs-LLP-updated190422.zip.md) + +## Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/rbl-ybl-current-account/llp/kyc.md b/llm-content/x/rbl-ybl-current-account/llp/kyc.md new file mode 100644 index 00000000..5adcb937 --- /dev/null +++ b/llm-content/x/rbl-ybl-current-account/llp/kyc.md @@ -0,0 +1,30 @@ +--- +title: Limited Liability Partnership (LLP) | KYC Documents +heading: Current Account KYC Documents - Limited Liability Partnership (LLP) +description: List of KYC Documents to open a Current Account powered by RazorpayX in partnership with RBL/Yes Bank for a limited liability partnership. +--- + +# Current Account KYC Documents - Limited Liability Partnership (LLP) + +## Proof of Address (any 1) + +1. ****Any Utility Bill** of public and approved private operators - Telephone bill (landline / mobile) / Electricity / Water Bill (not more than 3 months old). +1. **Property tax paid receipt / bill** raised in the name of the firm. +1. **1-month account statement** from existing bank account maintained with a Scheduled Commercial Bank in the name of the firm and having at least one customer-initiated transaction (not more than 3-months-old). +1. **Registered and stamped lease / rent / leave and license agreement** in the name of the firm. +1. **Property ownership deed, that is the Title Deeds** of the property in the name of the firm duly stamped and registered. +1. **Certificate of Registration** under any Statue /Act or Professional bodies. +1. **Business License** issued by State / Central Government authority. +1. **Municipal Registration Certificate.** +1. **GST Certificate**. +1. **Valid Securities and Exchange Board of India (SEBI) registration certificate**. +1. **Valid License under the Explosives Act** (in the case of Industry of Hazardous nature like fireworks). +1. **Import / Export certificate or Importer Exporter Code (IEC)** in the name of the firm issued by office of Directorate General of Foreign Trade (DGFT). +1. Latest available acknowledged copy of **Income Tax / Assessment order** along with printout from PAN website confirming the PAN number and name of entity (printout to be duly signed by Relationship Manager / Branch Manager). +1. **Certificate issued by respective government authority for units in Special Economic Zone (SEZ), Software Technology Park (STP), Export Oriented Unit (EOU), Electronic Hardware Technology Park (EHTP) and Export Processing Zone (EPZ)** in the name of the entity mentioning the address allotted. +1. **Registration certificate of recognized Provident Fund (PF)** with PF Commissioner. +1. **Certificate of Registration / Certificate of Practice** issued by professional bodies such as Institute of Chartered Accountants of India (ICAI) / Institute of Company Secretaries of India (ICSI) / The Institute of Cost Accountants of India (ICMAI) in the name of the firm. + +## Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/rbl-ybl-current-account/partnership.md b/llm-content/x/rbl-ybl-current-account/partnership.md new file mode 100644 index 00000000..938bfb0c --- /dev/null +++ b/llm-content/x/rbl-ybl-current-account/partnership.md @@ -0,0 +1,71 @@ +--- +title: Partnership Firm | Current Account Documents +heading: Current Account Documents - Partnership Firm +description: List of documents required to open a Current Account powered by RazorpayX in partnership with RBL/Yes Bank for a partnership firm. +--- + +# Current Account Documents - Partnership Firm + +This page has information on the documents required for a **Partnership** firm to open a Current Account using RazorpayX in partnership with RBL/Yes Bank. + +> **INFO** +> +> +> +> **Handy Tips** +> +> - All declarations must be on firm letter head and dated. +> - All KYC documents must include the rectangular seal (partner / authorised signatory) along with signatures on all pages. +> - If the banking clause is not mentioned in the partnership deed, then all partners must sign the resolution / declaration certifying the banking clause and mode of operation on the entity letterhead. +> - A complete chain of the partnership deed is required. In case there is a deceased partner in the chain, the Death Certificate of the deceased partner is mandatory. In the case of a retiring partner, he/she must sign on the last deed. +> - The last page of the deed must include all the existing partners’ signatures. +> - For partnership deed, name and count of the partners must match with the partnership declaration. +> - The cheque amount can range from ₹20,000 to ₹10,00,000 and must be shared at the time of document pick up. +> + +## Forms Required + +Sl. No. | Forms +--- +1 | Account Opening Form and Customer Information Form (CIF) for the **entity**. +--- +2 | Individual CIF form and KYC documents for:- All authorized signatory/signatories +- All partners. + +--- +3 | Corporate Netbanking Application Form +--- +4 | Foreign Account Tax Compliance Act (FATCA) declaration in the name of the entity. + +## Documents Required + +Sl. No. | Documents +--- +1 | [KYC documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/cif.md) in the name of all authorised signatories/partners. +--- +2 | Partnership declaration signed by all the partners. +--- +3 | Partnership PAN card. +--- +4 | Valid address proof in the name of the entity. [List of acceptable documents ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/partnership/kyc.md)(any one). +--- +5 | Mode of operation letter signed by all Partners. +--- +6 | Beneficiary Owner(BO) declaration. +--- +7 | Certified true copy of the latest partnership deed along with one entity proof.- If the copy is not notarized, signatures of two witnesses are mandatory. +- Franking and stamping has to be done. +- The purchase date on the stamp should be within 6 months of the partnership deed being made. + +--- +8 | Covering Letter (Attach to ₹600 duty stamp paper). +--- +9 | A cheque of minimum ₹20,000 in the entity's name. If there are any transfer or currency conversion charges, the cheque amount should be higher to ensure at least ₹20,000 is credited to the new account after all deductions. For example, if the charges are ₹1,500, write a cheque for ₹21,500. +--- +10 | Internet Banking Letter. + +[Download all forms and documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x_ca_docs-partnership-updated190422.zip.md) + +### Related Information + +- [Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/rbl-ybl-current-account/partnership/kyc.md b/llm-content/x/rbl-ybl-current-account/partnership/kyc.md new file mode 100644 index 00000000..fdbcd15f --- /dev/null +++ b/llm-content/x/rbl-ybl-current-account/partnership/kyc.md @@ -0,0 +1,46 @@ +--- +title: Partnership Firm | KYC Documents +heading: Current Account KYC Documents - Partnership Firm +description: List of KYC Documents to open a Current Account powered by RazorpayX in partnership with RBL/Yes Bank for a partnership firm. +--- + +# Current Account KYC Documents - Partnership Firm + +> **INFO** +> +> +> **Handy Tips** +> +> If any of the Proof of Existence document contains the complete address, it can be submitted as an Address Proof document also. +> + +## Proof of Existence (Any 1) + +1. **Certificate of Registration** under any Statue / Act or Professional bodies. + - If the certificate is downloaded from the website, it should be self-attested by the customer and signed by the Relationship Manager / Branch Manager as "Downloaded/Checked at Branch". + - For Partnership cases sourced in Andhra Pradesh State only, the acknowledgment issued by the Registrar of Partnership firms for any partnership that registers with them is accepted as proof of Registration of the firm. No separate registration certificate is required for such cases. +1. **Business License** issued by the State/Central Government authority. +1. **Municipal Registration Certificate**. +1. **GST Certificate**. +1. Valid **Securities and Exchange Board of India (SEBI)** registration certificate. +1. Valid **License under the Explosives Act** (in case of Industry of Hazardous nature like fireworks). +1. **Import / Export certificate or Importer Exporter Code (IEC)** in the name of the firm issued by office of Directorate General of Foreign Trade (DGFT). +1. **Self–signed cheque issued from the firm’s bank account with Scheduled Commercial Bank (not older than 3 months)**. + - In the case of rural branches, statements from Scheduled state Co-operative Banks, along with 1-month bank statement (which is printed and sent out by banks or which is on the bank letterhead / bank stationery). +1. Latest available acknowledged copy of **Income Tax / Assessment order** along with a printout from the PAN website confirming the PAN number and the name of entity (printout to be duly signed by Relationship Manager / Branch Manager). +1. Certificate issued by the respective government authority for units in **Special Economic Zone (SEZ), Software Technology Park (STP), Export Oriented Unit (EOU), Electronic Hardware Technology Park (EHTP) and Export Processing Zone (EPZ) in the name of the entity** mentioning the address allotted. +1. **Registration Certificate of recognized Provident Fund (PF) with PF Commissioner**. +1. **Certificate of Registration / Certificate of Practice issued by professional bodies such as Institute of Chartered Accountants of India (ICAI) / Institute of Company Secretaries of India (ICSI) / The Institute of Cost Accountants of India (ICMAI)** in the name of the firm. + +## Proof of Address (Any 1) + +1. **Utility bills such as electricity, water or telephone bills (landline and mobile)** in the name of the sole proprietary concern not more than 2 months old. +1. **Property tax paid receipt / bill** raised in the name of the firm. +1. **1-month account statement from an existing bank account** maintained with a Scheduled Commercial Bank. + - In the case of rural branches, statements from Scheduled State Co-operative Banks in the name of the firm having at least one customer-initiated transaction (not more than 3 months old). +1. **Registered and stamped lease / rent / leave and license agreement** in the name of the firm. +1. **Property ownership deed, that is, Title Deeds** of the property in the name of the firm duly stamped and registered. + +## Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/rbl-ybl-current-account/sole-proprietorship.md b/llm-content/x/rbl-ybl-current-account/sole-proprietorship.md new file mode 100644 index 00000000..3732030a --- /dev/null +++ b/llm-content/x/rbl-ybl-current-account/sole-proprietorship.md @@ -0,0 +1,53 @@ +--- +title: Sole Proprietorship | Current Account Documents +heading: Current Account Documents - Sole Proprietorship +description: List of documents required to open a Current Account powered by RazorpayX in partnership with RBL/Yes Bank for a sole proprietorship. +--- + +# Current Account Documents - Sole Proprietorship + +This page has information on the documents required for a **Sole Proprietorship** firm to open a Current Account using RazorpayX in partnership with RBL/Yes Bank. + +> **INFO** +> +> +> **Handy Tips** +> +> +> - All KYC documents must include the company seal along with the sole proprietor's signature on all pages. +> - The cheque amount can range from ₹20,000 to ₹10,00,000 and must be shared at the time of document pick up. +> + +## Forms Required + +Sl. No. | Form +--- +1 | Account Opening Form and Customer Information Form (CIF) for the **entity**. +--- +2 | Individual CIF form and KYC documents for Proprietor. +--- +3 | Foreign Account Tax Compliance Act (FATCA) declaration in the name of the entity. + +## Documents Required + +KYC documents for Proprietor. + +Sl. No. | Document +--- +1 | [KYC Documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/cif.md) in the name of the Proprietor. +--- +2 | Any two proof of existence for the proprietary firm. [List of acceptable documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/sole-proprietorship/kyc.md#proof-of-existence-any-2) (any two). +--- +3 | Valid address proof in the name of the proprietary firm. [List of acceptable documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/rbl-ybl-current-account/sole-proprietorship/kyc.md#proof-of-address-of-the-proprietorship-concern-any) (any one). +--- +5 | Sole Proprietorship declaration. +--- +6 | Sole Proprietorship covering letter (Attach to ₹600 duty stamp paper). +--- +7 | A cheque of minimum ₹20,000 in the entity's name. If there are any transfer or currency conversion charges, the cheque amount should be higher to ensure at least ₹20,000 is credited to the new account after all deductions. For example, if the charges are ₹1,500, write a cheque for ₹21,500. + +[Download all forms and documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x_ca_docs-sole-proprietorship-updated190422.zip.md) + +## Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/rbl-ybl-current-account/sole-proprietorship/kyc.md b/llm-content/x/rbl-ybl-current-account/sole-proprietorship/kyc.md new file mode 100644 index 00000000..789dd349 --- /dev/null +++ b/llm-content/x/rbl-ybl-current-account/sole-proprietorship/kyc.md @@ -0,0 +1,60 @@ +--- +title: Sole Proprietorship | KYC Documents +heading: Current Account KYC Documents - Sole Proprietorship +description: List of KYC Documents to open a Current Account powered by RazorpayX in partnership with RBL/Yes Bank for sole proprietorship. +--- + +# Current Account KYC Documents - Sole Proprietorship + +> **INFO** +> +> +> **Handy Tips** +> +> If any of the Proof of Existence document contains the complete address, it can be submitted as an Address Proof document also. +> + +## Proof of Existence (Any 2) + +1. Certificate of registration under any Statute / Act or Professional bodies. +2. **Certificate / license issued by the Municipal authorities under Shop and Establishment Act.**. + - *Shop and Establishment* + - Due to fraud risk, downloaded copy of 'Certificate/license **will not be accepted** except for Shop Act License. + - **Information receipt issued by the Shop and Establishment department will be accepted as an entity proof.** This is issued to entities where less than 10 employees are working for the firm. This will carry information such as the name of the firm, proprietor, number of employees working in this firm and address of the firm. + - *Gram Panchayat Certificate* (on its letterhead) + - That is less than 6 months old for rural branches and select semi-urban branches as specifically approved by ZH. SVR of Sole Proprietorship firm’s address is mandatory by branch employee along-with confirmation by branch employee with Gram Panchayat regarding issuance of such certificate. + - Certificate letter should contain the below details: + - Name of the Firm. + - Name of the proprietor. + - Date of incorporation and address of the firm. +3. **Income Tax Returns** + - The complete Income Tax Return (not just the acknowledgement) in the name of the sole proprietor where the firm's income is reflected, duly authenticated / acknowledged by the Income Tax authorities +4. Any **registration / licensing document issued by the central or state government authority**. + + +> **WARN** +> +> +> **Watch Out!** +> +> Udyog Aadhaar Memorandum and Online Labour Certificate will not be accepted as entity proof. +> + +5. Latest available acknowledged copy of **income tax / GST / assessment order (not more than 1-year-old)**. +6. **Utility bills such as electricity, water or telephone bills (landline and mobile)** in the name of the sole proprietary concern not more than 2 months old. +6. **Import / Export certificate in the name of the firm / IEC (Importer Exporter Code)** issued to the proprietary concern by the office of Directorate General of Foreign Trade (DGFT). +7. License issued by registering authority such as Certificate of Practice issued by the **Institute of Chartered Accountants of India (ICAI) / Institute of Cost Accountants of India / Institute of Company Secretaries of India / Indian Medical Council / Food and Drug Control Authorities**. +8. Valid **Securities and Exchange Board of India (SEBI)** registration certificate (wherever applicable). +9. **Certificate / registration document issued by GST / professional tax authorities.** + +## Address Proof (Any 1) + +2. Telephone bill (landline/mobile) / Electricity bill of public and approved private operators / water bill issued by Municipality (not more than 2 months old) in the name of the firm. +3. Property tax paid receipt / bill raised in the name of the firm. +4. Monthly statement from a Scheduled Commercial Bank + - In the case of Rural Branches, statements from Scheduled State Co-operative Banks which is not more than 3 months old with one customer-initiated transaction. +5. Professional tax receipts (latest tax paid receipt, preferably not more than 3 months old) will be accepted if the address details match with the Account Opening Form (AOF). + +## Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/rbl-ybl-current-account/trust-society.md b/llm-content/x/rbl-ybl-current-account/trust-society.md new file mode 100644 index 00000000..8fb066ff --- /dev/null +++ b/llm-content/x/rbl-ybl-current-account/trust-society.md @@ -0,0 +1,57 @@ +--- +title: Trust or Society | Current Account Documents +heading: Current Account Documents - Trust or Society +description: List of documents required to open a Current Account powered by RazorpayX in partnership with RBL/Yes Bank for a Trust or Society. +--- + +# Current Account Documents - Trust or Society + +This page has information on the documents required for a **Trust or Society** to open a Current Account using RazorpayX in partnership with RBL/Yes Bank. + +> **INFO** +> +> +> **Handy Tips** +> +> In a trust, the trustee(s) who ultimately control the trust's assets or decision-making process are considered as the Beneficial Owners. +> + +## Forms Required + +Sl. No. | Forms +--- +1 | Account Opening Form and Customer Information Form(CIF) for the trust. +--- +2 | Individual CIF Forms of Trustees/Beneficial Owners/Authorised Signatories. +--- +3 | Corporate internet banking application. +--- +4 | FATCA Declaration. +--- +5 | Credit Exposure Declaration. + +## Documents Required + +Sl. No. | Documents +--- +1 | Trust Deed. +--- +2 | PAN Card Copy. +--- +3 | Address Proof (in the name of the entity). +--- +4 | Board Resolution mentioning account opening and operation. +--- +5 | List Of Trustees. +--- +6 | Beneficial Owner Declaration. +--- +7 | Resolution/Minutes of Meeting with Razorpay Clause, preferably in the prescribed format. +--- +8 | Cheque in the name of the Trust. + +[Download all forms and documents](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x_ca_docs-trust-society-documents-rbl-updated23092022.zip.md) + +## Related Information + +[Open a Current Account](https://razorpay.com/x/current-accounts/) diff --git a/llm-content/x/reports.md b/llm-content/x/reports.md new file mode 100644 index 00000000..fd8ee9f3 --- /dev/null +++ b/llm-content/x/reports.md @@ -0,0 +1,57 @@ +--- +title: Reports on RazorpayX Dashboard +heading: Reports +description: Download and view reports on the RazorpayX Dashboard. +--- + +# Reports + +RazorpayX offers a range of reports that enable you to track the cash flow of your business. You can download all of your transaction data for a specific day, month or any time frame as per your business requirements. This information can be downloaded as a `csv`, `xls` or `xlsx` file, or sent via email to the intended recipients. + +> **SUCCESS** +> +> +> **What's New** +> +> Apart from the reports available in your dashboard, you can also get customised reports upon request. +> + +## Download Reports + +To generate reports: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Navigate to Reports on the left navigation. +3. Select the type of report: + - [Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) + - [Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) + - [Account Statement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-statement.md) + - [TDS/Advance Tax Challans](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments.md) + - [Sub-Account Limits](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/sub-accounts.md) + - [Purchase Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/purchase-order.md) + - [Vendor Advances](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/advances.md) + - [Vendor Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md) + + +4. Select a period from the drop-down, or select custom dates for which you require the report. +5. Choose the format of your report- `xlsx` or `csv`. +6. You can **DOWNLOAD** as well as **EMAIL** the report. You can enter any email address you wish to share the report with as well as select the team members you want to share it with. The downloaded reports will be available in the default downloads folder of your system. + +> **WARN** +> +> +> **Watch Out!** +> +> You can send the standard reports to a third party email id. All other reports can be sent only to the registered email ids. +> + +![Generate Reports from the RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-dashboard-reports.jpg.md) + +> **WARN** +> +> +> +> **Watch Out!** +> +> Generating reports can take upto 10 minutes. +> diff --git a/llm-content/x/set-up.md b/llm-content/x/set-up.md new file mode 100644 index 00000000..c1ea07f3 --- /dev/null +++ b/llm-content/x/set-up.md @@ -0,0 +1,45 @@ +--- +title: Set Up RazorpayX Account +description: Set up your RazorpayX Account or use existing Razorpay credentials to log in and use Banking+ products. +--- + +# Set Up RazorpayX Account + +You can [sign up for a RazorpayX account](https://x.razorpay.com/auth/signup) or if you are an +[existing Razorpay user](#existing-users) use your existing credentials to sign in. + +> **INFO** +> +> +> **RazorpayX on Mobile** +> +> You can use RazorpayX on your mobile device by downloading the RazorpayX Mobile App. You can create contacts, and make payouts on your mobile device, without using a desktop. +> +> [Use this link to download on your Android device.](https://play.google.com/store/apps/details?id=com.razorpay.x.app&pli=1) +> [Use this link to download the app on your iOS device.](https://apps.apple.com/in/app/razorpayx/id1542911810) +> +> + +## New Users + +To create a new RazorpayX account: +1. [Sign up](https://x.razorpay.com/auth/signup) for a RazorpayX account. +2. Enter your business email address and click **Get Started**. This will be the username you will use to login. + ![Enter Email to sign up for RazorpayX Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/email.jpg.md) +3. Create a password. It should be at least 8 characters long, must contain a number and a letter. Click **Create Account**. +4. Enter your name and phone number in the contact details input screen. +5. Select Business Category from the drop-down list and click **Continue**. + ![Set Up your RazorpayX Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/modified-pre-signup-flow.jpg.md) +6. Enter the OTP sent on the registered email address for verification and click **Finish →**. + ![Enter OTP to create RazorpayX Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/OTP.jpg.md) + +## Existing Users + +If you are an existing Razorpay user, you can use your Razorpay Payments credentials to sign into RazorpayX. You can use the same API credentials to fire Payout APIs as well. + +### Related Information + +- [About RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x.md) +- [Open a Current Account](https://razorpay.com/x/current-accounts/) +- [Test Mode](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/test-mode.md) +- [Generate API Keys](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/dashboard/api-keys.md) diff --git a/llm-content/x/solutions/bfsi.md b/llm-content/x/solutions/bfsi.md new file mode 100644 index 00000000..8daac591 --- /dev/null +++ b/llm-content/x/solutions/bfsi.md @@ -0,0 +1,81 @@ +--- +title: Banking, Financial Services & Insurance (BFSI) | Razorpay Solutions +heading: Banking, Financial Services & Insurance +description: Explore Razorpay's BFSI solutions to streamline transactions, manage claims, create payouts and payout links for superior service and growth. +--- + +# Banking, Financial Services & Insurance + +Razorpay provides comprehensive banking solutions that solve unique challenges across the lending, wealth management and insurance sectors. Businesses in the BFSI sector can benefit in the following ways: + +### Insurance companies +Insurance companies can leverage RazorpayX payout and payroll features to enable hassle free transactions and employee management. + + +### Seamless Claim Settlements + + - Settle claims instantly using [RazorpayX Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md). + - Choose between multiple [Current Accounts or RazorpayX Lite ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md) for claim settlements. + - Create [Sub Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/sub-accounts.md) for better payment segregation. + - Overcome delays due bank downtimes and experience hassle free claim settlements using RazorpayX's [Multi-bank Routing feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/multi-bank-routing.md). + - Set up approval workflows on RazorpayX Dashboard for channeling payouts for different levels of approvals. + + + + +### Bulk Payouts to Advisors + + - Execute payouts in bulk to insurance agents/advisors using [Bulk Payouts Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/bulk.md). + - Schedule payouts in advance for future disbursements. + + + +### Employees and Vendor Portals + + - Set roles and permissions for different categories of users using [Create User Roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/create-user-role.md) and enable controlled access. + - Use [RazorpayX Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll.md) for managing employee onboarding, attendance, salaries, payment to contract employees, TDS and more. + + +### NBFCs and Lending services +RazorpayX's lending tech stack can be used to credit instant loans to customers while ensuring compliance. + + +### Quick and Simple Loan Disbursals + + - Offer instant loan credits by using [RazorpayX Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md) through multiple [Current Accounts or RazorpayX Lite ](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/set-up.md). + - Leverage RazorpayX's tech stack to ensure financial, regulatory and legal compliance in lending. + - Use [Sub Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/sub-accounts.md) for better payment segregation. + - Utilize RazorpayX's [Multi-bank Routing feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/multi-bank-routing.md) to overcome bank downtimes and experience hassle free loan payouts. + - Route payouts for different levels of approvals by setting up [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) on RazorpayX Dashboard. + + + + +### Bulk Payments to Agents + + - Enable bulk payouts to agents/advisors using [Bulk Payouts Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/bulk.md). + - Manage and reconcile transactions across multiple accounts through a single Dashboard. + - Create individual or bulk payouts to process hundreds of transactions at once. + - Make payouts to bank accounts, debit cards, credit cards, or prepaid cards. + + + +### Employees and Contractor Portal + + - Set up user roles and permissions for different categories of users using [Create User Roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/create-user-role.md) and enable controlled access. + - Manage employee onboarding, attendance, salaries, payment to contract employees, TDS and more using [RazorpayX Payroll](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payroll.md). + - Accurately calculate and disburse salaries automatically. + - Directly deposit into employees' bank accounts without manual intervention. + - Calculate and deposit taxes and file returns. + + +### Broking Platforms +Customer withdrawals can be completely automated using RazorpayX Payout APIs. + + + +### Automate Customer Withdrawals + + - Use [Payout APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/api.md) to automate customer withdrawals. + - Approve or reject payouts using [Payout Approval APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/api.md#payout-approval-api). + - Enable fund tracking and ensure more clarity in payment management by using [Sub Accounts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/sub-accounts.md). diff --git a/llm-content/x/solutions/ecommerce.md b/llm-content/x/solutions/ecommerce.md new file mode 100644 index 00000000..12947047 --- /dev/null +++ b/llm-content/x/solutions/ecommerce.md @@ -0,0 +1,122 @@ +--- +title: Ecommerce | Razorpay Solutions +heading: Ecommerce +description: Explore Razorpay's recommended products for the ecommerce industry, enabling easy access and management of transactions, accounts, payouts, and more. +--- + +# Ecommerce + +Razorpay's versatile platform finds its application in multiple industries and sectors, including ecommerce, online marketplaces, freelance platforms and more. Below are some of the most common use cases for RazorpayX. + +### Online Marketplaces + +Online marketplaces are a complex network of buyers, sellers, and transactions, making the management of finances and payments a key component of their operations. RazorpayX provides a suite of tools and features designed to streamline and automate these financial processes, thus improving the efficiency and performance of online marketplaces. + + +### Seamless Vendor Onboarding + + - Onboard all your vendors by providing their emails and let RazorpayX do the KYC check. RazorpayX automates vendor verification and simplifies onboarding with [Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md). This helps to ensure financial compliance and minimise fraud. + - RazorpayX's streamlined process accelerates onboarding, reducing manual effort for marketplaces. Vendors can use their [portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/portal/business.md) for invoice uploads and easy reconciliation. + - Manage all your vendors, payouts, purchase orders, invoices and taxes in one dashboard. + + + +### Manage Payouts + + - Employ the [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) to obtain consent from stakeholders for customer and vendor refunds or payments. + - Use RazorpayX's AI-powered [multi-bank account routing](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/multi-bank-routing.md) system to ensure best payout success rates. + - Manage refunds better using custom refund feature. + - Do payouts in bulk using the [Bulk Import](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/purchase-order/bulk-import-po.md) feature. + + + +### Accounting Integrations and Tax Management + + - Manage your branches and cost centres in one dashboard. + - Import documents, purchase orders and files from your external accouting software(s). + - Manage all your taxes and get GST reports. + - Share relevant data to your Chartered Accountant by creating [CA Portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/ca-portal.md). + + + +### Detailed Transaction Reports + + - Ensure marketplace transparency with RazorpayX's comprehensive [Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/reports.md) offering. + - Gain transaction insights like parties involved, payment methods, and timing. + - Simplify audits and grasp business performance through detailed reporting. + + + +### Freelance Platforms + +RazorpayX can ease payment processing for freelance platforms. It allows for the smooth transfer of payments between clients and freelancers, offering transparent transactions and ensuring compliance with financial regulations. + + +### Scheduled Payouts + + - Optimise freelancer payments with [Scheduled Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/scheduled.md), enhancing consistency and timeliness. + - Reduce delays and bolster trust through reliable automated payouts, improving freelancer satisfaction. + - Customise schedules to meet freelancers' preferences and client convenience. + - Make instant Payouts individually or in bulk. + - You can use IMPS, NEFT, RTGS, UPI or Bank Transfer to pay. + + + +### Transparent Transactions and Reporting + + - Foster trust and prevent payment disputes by upholding transparency among freelancers, clients and the platform with RazorpayX's comprehensive transaction recording. + - Access transactions in the Account Statement section and download and email [Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/reports.md) from the RazorpayX Dashboard, ensuring transparent and clear financial communication. + - Reduce wait time by sharing Payout Links to mobile numbers and email IDs without saving bank details. + - Receiver can input their UPI ID or bank details to which they need the amount to be credited. + + + +### Invoice Portals + + - Employ [Vendor Portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/portal/business.md) for freelancer convenience, allowing them to upload invoices centrally. + - Streamline payment management, track dues, and deadlines through user-friendly portals. + + + +### Approvals on Invoices + + - Initiate client approval before processing payouts for freelancers' dues. + - Enjoy automated and seamless [Invoice Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/approvals-on-invoices.md). + + +### Retail Stores + +RazorpayX simplifies the complex financial operations of retail and ecommerce businesses. The platform offers tools for easy vendor payments, managing returns and refunds, and automating salary payments for employees. + + +### Automated Vendor Payments + + - Use [Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) by RazorpayX for convenient and timely vendor payments, whether immediate or scheduled. + - Create Purchase Orders, add Invoices and set-up approval workflows for large payments. + - Opt for [Approvals on Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/approvals-on-invoices.md) or direct payments, with the flexibility to streamline invoice handling through the [Vendor Portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/portal/business.md). + - Automate payments once set up, using funds from your chosen account type in RazorpayX for seamless vendor transactions. + + + +### Simplified Returns and Refund management + + - Employ [Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) and [Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md) for cashbacks and refunds, either individually or in bulk, with instant or scheduled options. + - Establish an [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) on RazorpayX Dashboard for required permissions before making payouts. + - Simplify reconciliation with downloadable reports for all recorded payments, ensuring easy tracking and management across various scenarios. + + + +### Automated TDS Payments + + - Enforce tax compliance using [Tax Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments.md) through RazorpayX, including [Automatic TDS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/automatic-tds.md) setup. + - Upload invoices to RazorpayX to auto-calculate the TDS components according to the TDS rate selected by the vendor. + - Automate TDS calculations upon invoice upload and seamless integration with the Tax Payments Application. + - The TDS amount is automatically deducted from your account balance and deposited with the government monthly. You can then download the challan and file the TDS. + + + +### Easy Accounting Integration and CA Portal + + - Simplify Ecommerce reconciliation using [Accounting Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting.md) with Zoho or Tally, exporting transaction details seamlessly. + - Share relevant data by integrating with your preferred software and provide access to a [CA Portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/ca-portal.md) for your CA to review transactions on RazorpayX Dashboard. + - Streamline accounting processes, enhance collaboration, and offer transparency. diff --git a/llm-content/x/solutions/edtech.md b/llm-content/x/solutions/edtech.md new file mode 100644 index 00000000..3e879473 --- /dev/null +++ b/llm-content/x/solutions/edtech.md @@ -0,0 +1,42 @@ +--- +title: EdTech | Razorpay Solutions +heading: EdTech +description: Explore Razorpay's recommended products for the educational institutions, ensuring secure and efficient transactions for seamless experiences. +--- + +# EdTech + +Manage payments and financial operations of your educational institution from a consolidated dashboard. Create an online platform, track payments, and create payouts within minutes. + +### Education and E-Learning + +Educational institutions and e-learning platforms can leverage RazorpayX for hassle-free fee collection. Automated receipts, timely reminders, and an easy-to-use interface simplify the payment process for students and parents. + + +### Payout Links for Guest Instructors + + - Simplify payments using [Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md), streamlining finance procedures. + - Avoid bank details for one-time resources while maintaining proper records. + + + +### Easy Accounting Integration + + - Easy reconciliation of multiple payouts. + - Utilize [Accounting Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting.md) with [Zoho Books](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/zohobooks/account-statement.md) and [Tally](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/tally/account-statement.md), along with downloadable [Account Statements](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-statement.md). + - Enhance visibility, transparency, and team collaboration while ensuring consented access. + + + +### Manage Team and Custom User Roles + + - Assign roles and permissions to both vendors and freelancers, enhancing security and control. + - [Custom User Roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/create-user-role.md) allow controlled access with or without [2FA](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/2fa.md). + + + + +### Bulk Payouts for Refunds and Scholarships + + - Use [RazorpayX Lite or Current Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/account-types.md) and [Bulk Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/bulk.md) for convenient student incentive payouts. + - Simplify rewards distribution using [Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md) without the need for individual account details, improving efficiency. diff --git a/llm-content/x/solutions/saas.md b/llm-content/x/solutions/saas.md new file mode 100644 index 00000000..1a4ead52 --- /dev/null +++ b/llm-content/x/solutions/saas.md @@ -0,0 +1,36 @@ +--- +title: SaaS Companies | Razorpay Solutions +heading: Saas Companies +description: Explore Razorpay's recommended products for the SaaS industry, enabling easy access and management of invoices and cash flow. +--- + +# Saas Companies + +SaaS businesses can automate invoice generation for subscription models, handle taxes, and manage cash flow across different plans and pricing tiers. + +### Others - SaaS Products + +SaaS companies can use RazorpayX for invoices and customer payouts. The platform offers a robust solution for ensuring timely payments and providing detailed transaction reports. + + +### Tax Payments + + - Embrace [Automated Tax Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/automatic-tds.md) for efficient compliance. + - Automatic calculation and deduction to minimize errors and non-compliance risk. + - Save time, avoid penalties, and enhance business efficiency through streamlined tax processes. + + + +### Generate Invoices + + - Generate [invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md) for transparent customer transactions. + - Invoices track services, costs and payments, building trust. + - Manage revenue, cash flow, and taxes with automated [Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md), utilizing OCR for existing invoices. + + + +### Detailed Financial Reports + + - Utilize [Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/reports.md) for in-depth financial insights. + - Guide strategic decisions with revenue sources, expenses, and profitability data. + - Enhance resource allocation, compliance, and investor confidence with detailed financial information. diff --git a/llm-content/x/solutions/travel.md b/llm-content/x/solutions/travel.md new file mode 100644 index 00000000..67e2dcf2 --- /dev/null +++ b/llm-content/x/solutions/travel.md @@ -0,0 +1,45 @@ +--- +title: Travel | Razorpay Solutions +heading: Travel +description: Explore Razorpay's recommended products for the travel industry, ensuring secure and efficient transactions for seamless booking experiences. +--- + +# Travel + +Manage all your travel-related payments and financial operations from a consolidated Dashboard. Create an online booking platform, track payments, and issue refunds within minutes. Make better business decisions with real-time reporting. Following are the use cases and recommended products. + +### Service Aggregators +Service aggregators can use RazorpayX to do instant partner payouts, offer incentives, streamline payments and manage service partners. + + +### Payouts to Partners + + - Utilise [RazorpayX Payouts Link APIs](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links/api.md) to do instant payouts to service partners seamlessly. + - Create individual or bulk payouts to process hundreds of transactions at once. + - Make payouts to bank accounts, credit cards, debit cards and UPI IDs. + - Schedule payouts for future disbursements to avoid missed payments. + - Make rewards distribution process simpler and more efficient using [Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md) without the need for individual account details. + - Reduce delays and boost trust through automated payouts, improving partner satisfaction. + - Optimise partner payments with [Scheduled Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/scheduled.md), enhancing consistency and timeliness. + - Ensure prompt cashbacks and refunds including short-term contracts using [Payout Links](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md). + + + +### Invoices and Taxes Automation + + - Use S2P solutions to upload vendor invoices and deposit the applicable taxes. You can also generate challans for the taxes deducted. + - Automate [invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md) generation for customers. + - Ensure tax compliance using [Tax Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments.md) through RazorpayX, including [Automated TDS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/automatic-tds.md) setup. + + + +### Partner Management + + - Use [Create User Roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/create-user-role.md) to set roles and permissions for different categories of users. + + + +### Easy Payroll and Expense Management + + - Automate and disburse salaries, create employee dashboards, deduct TDS, manage reimbursements, auto-generate payslips and Form16 and log absences. + - Manage your expenses by mapping them to specific teams; assign roles and permissions and manage workflows for easy expense tracking. diff --git a/llm-content/x/support.md b/llm-content/x/support.md new file mode 100644 index 00000000..51fa7612 --- /dev/null +++ b/llm-content/x/support.md @@ -0,0 +1,82 @@ +--- +title: Contact Support +heading: RazorpayX Support +description: Contact the Support Team for all your queries related to RazorpayX and RazorpayX Payroll products and offerings. +--- + +# RazorpayX Support + +> **INFO** +> +> +> **Handy Tips** +> +> - If you are a customer looking for a refund, know about [customer refunds](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/payments/customers/customer-refunds.md). +> - To check the status of payouts, follow [these steps](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/status-details.md#check-status-on-dashboard). +> + +## RazorpayX Users + +To raise a support ticket: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +1. You can raise a ticket in two ways: + + + +### From My Account & Settings + + 1. Navigate to user profile icon at the top-right corner and click **My Account & Settings**. + 1. Select **Support Tickets Inbox** and click **+ NEW QUERY**. + 1. Select whether to: + - [**Raise a new request**](#raise-a-new-request). + - [**File a grievance**](#file-a-grievance). + + Click **Next**. + ![Raise a new request or File a grievance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-support-new-req-grievience.jpg.md) + + + +### Need Help Widget + + 1. Click the **Need Help?** button at the bottom-right corner of the screen. + 1. Click **Write To Us** in the bottom menu. You can also browse through the FAQs/help articles to resolve your queries. + 1. Select either of the following: + - [**Raise a new request**](#raise-a-new-request). + - [**File a grievance**](#file-a-grievance). + + Click **Next**. + + + + + ![My Account and Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-support-profile.jpg.md) + +### Raise a New Request + +You can raise a request when you wish for help in setting up certain processes, enabling features or to report an issue. + +1. Select the category of the issue from the drop-down menu. +2. Write a description of the issue faced for our better understanding and attach images if available. +3. Enter the email addresses of other users who you wish to keep informed. +4. Click **Submit**. + + ![Raise a new Support ticket](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-support-raise-new-request.jpg.md) + +### File a Grievance + +You can file a grievance when you are not satisfied with the support provided for a request you raised in the past. + +1. Select the reason for you to file a grievance. +2. Mention your ticket reference number. +3. Click **Next**. + ![Enter support ticket number](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-support-file-grievance-1.jpg.md) +4. Write a description of the complaint and expectations and click **Submit**. + + ![File a Grievance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-support-file-grievance-2.jpg.md) + +You have successfully raised a support request from the RazorpayX Dashboard. + +## RazorpayX Payroll + +Write to [xpayroll@razorpay.com](mailto:xpayroll@razorpay.com) for any queries, requests or other issues related to Payroll. diff --git a/llm-content/x/tally-epayments.md b/llm-content/x/tally-epayments.md new file mode 100644 index 00000000..89e42e3c --- /dev/null +++ b/llm-content/x/tally-epayments.md @@ -0,0 +1,55 @@ +--- +title: Tally e-Payments via RazorpayX +heading: About Tally e-Payments +description: Integrate RazorpayX with TallyPrime and explore making payouts and settle dues to your vendors. +--- + +# About Tally e-Payments + +Tally is one of the most used accounting software by small and medium enterprises. Businesses use it to maintain and track accounting transactions, finance, inventory, sales, and so on. + +Razorpay offers an integration with TallyPrime to make payouts to vendors. SMEs and MSMEs who use TallyPrime can now use RazorpayX Payouts to make payments to their vendors, partners, and suppliers. + +## How it Works + +Watch the video below to understand how to make Tally e-Payments with RazorpayX or read along. + +[Video: https://www.youtube.com/embed/xqSy5Yv219g] + +## Process and Reconcile Payouts + +On TallyPrime (a Tally product), you can directly create payout instructions in CSV format readable by RazorpayX. +- These payout instructions are imported to Tally Payouts and processed within seconds. +- Once the payouts are processed, download the MIS and upload it on TallyPrime. This automatically reconciles the entire payout. + +To process payouts using Tally e-Payments: + +1. Open TallyPrime and [Create a RazorpayX Ledger.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/set-up.md) + +> **INFO** +> +> +> **Handy Tips** +> +> If you are an existing Current Account user with a RazorpayX/RBL Bank account ledger in TallyPrime, [create a new ledger](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/set-up.md#create-a-ledger) for RazorpayX Bank. +> +> All the existing unpaid bills that you wish to pay through RazorpayX using this integration is credited to the new RazorpayX ledger account. +> + +2. Credit all payable bills to the RazorpayX Bank Account Ledger. + 1. Download the [e-Payments' payout instructions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/export-approve-payouts.md#export-data-from-tallyprime-to-razorpayx) as a CSV file to export it to RazorpayX. + 1. [Upload the payouts instructions file to RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/export-approve-payouts.md#upload-payout-data) in the Tally Payouts section. + 1. [Review the payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/export-approve-payouts.md#view-payouts-and-download-reports) as created after uploading the file. Approve them as applicable. + 1. [View the payouts processed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/export-approve-payouts.md#view-payouts-and-download-reports) and download the error report for the unprocessed payouts. +3. [Download and export the MIS file](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/reconcile-payouts.md) from RazorpayX to TallyPrime for automatic reconciliation of accounts. + +### Next Steps + +- [Create RazorpayX Ledger in TallyPrime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/set-up.md) +- [Export and Approve Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/export-approve-payouts.md) +- [Reconcile Payouts in TallyPrime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/reconcile-payouts.md) + +### Related Information + +- [Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) +- [Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md) diff --git a/llm-content/x/tally-epayments/export-approve-payouts.md b/llm-content/x/tally-epayments/export-approve-payouts.md new file mode 100644 index 00000000..0238268d --- /dev/null +++ b/llm-content/x/tally-epayments/export-approve-payouts.md @@ -0,0 +1,81 @@ +--- +title: Export and Approve Payouts in RazorpayX +heading: Export and Approve Payouts +description: Export payout data file from TallyPrime, import to the Dashboard, approve in bulk, and view & download reports. +--- + +# Export and Approve Payouts + +To make Tally e-Payments payouts using RazorpayX, you must export the payout data file from TallyPrime and import it to the RazorpayX Dashboard. + +You can approve these in bulk and then export the approved payouts back to TallyPrime to reconcile your payments automatically. Know more about [Tally e-Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments.md). + +Following is the process to move the data between TallyPrime and RazorpayX. + +## Export Data + +You must first [set up a RazorpayX ledger in TallyPrime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/set-up.md) and then export the CSV file data to RazorpayX. + +To export the payout data you have on TallyPrime into RazorpayX: + +1. Open TallyPrime and navigate to the Gateway. +2. Go to **Utilities** → **Banking**. +3. Select **e-Payments**. The e-Payments screen is displayed. +4. Select the **Ready for sending to bank** row as shown below: + ![Ready for Sending to bank line selected.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tally-epayments-rzpx-tally-rsb.jpg.md) +5. Select the transactions which you wish to export from the list. +6. On the top menu, select **Export** → **Payment Instructions**. +7. Click **Yes** to confirm. + +You see a message after successful completion of the data export. Then you [upload the payout data](#upload-payout-data) into the RazorpayX Dashboard for review and approval. + +## RazorpayX Dashboard Actions + +Switch to your RazorpayX Dashboard to upload and approve the payouts. + +## Upload Payout Data + +To upload payout data: +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +1. Navigate to **Payouts** → **Tally Payouts**. +1. Click **Tally bulk import** under the **+ NEW** drop-down menu, as shown below. + ![Select Tally Bulk import](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tally-epayments-import-tally-0.jpg.md) +1. Click **+ BULK PAYOUT**. +1. Upload the payouts data file exported from TallyPrime and click **Next**. + ![Import payouts from Tally](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tally-epayments-import-tally-2.jpg.md) +1. Preview the payouts and click Next. +1. Enter the OTP sent to your registered mobile number and email address and click **Confirm Payouts**. + ![Confirm Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tally-epayments-import-tally-3.jpg.md) + +Bulk payouts are created and listed on the Tally Payouts screen. + +## Approve Payouts + +After the payouts are uploaded to the RazorpayX Dashboard, you can access the payout data for further review and approval. + +To approve these payouts in bulk: +1. Go to **Payouts** → **Pending on you**. + ![Payouts Pending on you selection on X Dashboard.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tally-epayments-rzpx-tally-approval.jpg.md) +2. All payouts pending on you are displayed in the **Payouts** page. +3. Use the check box to select the payouts you want to make. +4. Click **APPROVE** as shown below. + ![Approve payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tally-epayments-rzpx-tallyepayments-approval.jpg.md) + +RazorpayX shows a message confirming the payouts approval. You can now [view and download the payouts report](#view-payouts-and-download-reports). + +## View Payouts and Download Reports + +Click **VIEW PAYOUTS** to view all the processed payouts. Click **DOWNLOAD** to view information about unprocessed rows by downloading the error report. + +![View and download MIS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tally-epayments-rzpx-tally-view-payouts.jpg.md) + +You can then download the MIS report and [reconcile payouts in TallyPrime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/reconcile-payouts.md). + +### Next Steps + +- [Reconcile Payouts in TallyPrime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/reconcile-payouts.md) + +### Related Information + +- [About Tally e-Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments.md) +- [Create RazorpayX Ledger in TallyPrime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/set-up.md) diff --git a/llm-content/x/tally-epayments/reconcile-payouts.md b/llm-content/x/tally-epayments/reconcile-payouts.md new file mode 100644 index 00000000..09bfa2f6 --- /dev/null +++ b/llm-content/x/tally-epayments/reconcile-payouts.md @@ -0,0 +1,31 @@ +--- +title: Reconcile Payouts with RazorpayX +heading: Reconcile Payouts +description: Check how payouts are reconciled in TallyPrime after approval in RazorpayX. +--- + +# Reconcile Payouts + +After you [approve the payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/export-approve-payouts.md#approve-payouts) on the RazorpayX Dashboard, reconcile them on TallyPrime using the **Instrument Number** and **Bank Date**. + +## Reconcile Payouts + +To reconcile the payouts: + +1. After the payouts are approved, hover on the batch of payouts on the Tally Payouts page and click the **DOWNLOAD MIS** option. + ![Download MIS](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tally-epayments-download-tally-mis.jpg.md) + +2. Now shift to TallyPrime. Go to **TallyPrime** → **Import** → **Intermediate File**. + ![Import Intermediate file](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tally-epayments-rzpx-reconciliation-step1.jpg.md) + +3. Upload the MIS file downloaded from RazorpayX in the **File to import (CSV)** field. + ![Uploading the File to CSV](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tally-epayments-rzpx-reconciliation-step2.jpg.md) + +4. TallyPrime automatically reconciles all transactions and updates the bank date. + ![Reconciliation](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tally-epayments-rzpx-reconciliation-step3.jpg.md) + +### Related Information + +- [About Tally e-Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments.md) +- [Create RazorpayX Ledger in TallyPrime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/set-up.md) +- [Export and Approve Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/export-approve-payouts.md) diff --git a/llm-content/x/tally-epayments/set-up.md b/llm-content/x/tally-epayments/set-up.md new file mode 100644 index 00000000..f06d42b1 --- /dev/null +++ b/llm-content/x/tally-epayments/set-up.md @@ -0,0 +1,42 @@ +--- +title: Create RazorpayX Ledger on Tally +heading: Create RazorpayX Ledger +description: Create a RazorpayX Ledger in TallyPrime to enable access to e-Payments. +--- + +# Create RazorpayX Ledger + +You can use the Ledger feature in TallyPrime to create a RazorpayX Ledger. + +> **INFO** +> +> +> **Handy Tips** +> +> If you are a Current Account user having a RazorpayX/RBL Bank account ledger in TallyPrime, [create a new ledger](#create-a-ledger) for RazorpayX Bank. + +> All existing unpaid bills that you wish to pay through RazorpayX using this integration will be credited to the new RazorpayX ledger account. +> + +## Create a Ledger + +To create a ledger: +1. Open TallyPrime and navigate to the **Gateway of Tally**. +2. Go to **Create**, as shown. + ![Create under Gateway of Tally selected to create Ledger.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tally-epayments-rzpx-tally-gateway-create.jpg.md) +3. Select **Ledgers** and enter a name for the ledger. +4. In the **Bank Accounts Details** section, type RAZ in the **Bank Name** field. A **List of Banks** pop-up page is displayed. + ![Selecting RazorpayX from the List of Banks list.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tally-epayments-rzpx-tally-lob.jpg.md) +5. Select **RazorpayX (India)**. +6. Set the fields under **Bank Configuration** to **Yes** or **No** as required. + ![Select the Yes/No fields in the Bank Configuration.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tally-epayments-rzpx-tally-bankconfig.jpg.md) + - Set **Enable e-Payments** under **Bank Configuration** to **Yes**. This is mandatory. + - Under Enable e-Payments, select **Set/alter e-Payments configuration**. Select the requisite parameters for e-Payment. +7. Click **Yes** in the Accept window to save your selection. +8. Click **Yes** in the **Confirm RazorpayX ledger creation** window. + +You have successfully created a ledger for RazorpayX. There are other ledger features available in Tally, which you can use to [map the expenses and taxes to the ledgers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/bring-bills.md#ledger-and-mapping) as per the transactions made. + +### Related Information + +- Keyboard shortcuts in [Tally Prime](https://help.tallysolutions.com/tally-prime/keyboard-shortcuts/keyboard-shortcuts-tally-prime/) diff --git a/llm-content/x/tax-payments.md b/llm-content/x/tax-payments.md new file mode 100644 index 00000000..577ebb40 --- /dev/null +++ b/llm-content/x/tax-payments.md @@ -0,0 +1,47 @@ +--- +title: Tax Payments on RazorpayX +heading: About Tax Payments +description: Set up the RazorpayX Tax Payment app to make automatic and manual TDS payments and pay advance tax. +--- + +# About Tax Payments + +Every business has to pay several types of taxes (direct and indirect) to the government every month. The most common tax payments are tax deducted at source (TDS), advance tax, and goods and services tax (GST). + +You can use [RazorpayX Tax Payments](https://x.razorpay.com/tax-payments) to automate direct tax payments via a user-friendly interface. Explore more about tax payments with the following video. + +[Video: https://www.youtube-nocookie.com/embed/XwnEGxlVVvc] + +## How it Works + +1. You can get started with tax payments by adding your + - TAN Number + - Business Address +1. Once you have calculated your taxes, navigate to the [RazorpayX Dashboard](https://x.razorpay.com/). Here, navigate to **Menu** → **Tax Payments**. +1. Finalise the filing details on the tax payment creation window and add the payment details, such as the account you want to debit the payable amount from. +1. You can make the payment immediately or save the payment and pay at a later date. + +## Types of Tax Payments + +With RazorpayX Tax Payment App, you can make tax payments of the following categories: +- [**Tax Deducted at Source (TDS)**](#types-of-tds-payments): As per the Income Tax Act, any company or person making a payment is required to deduct tax at the source if the payment exceeds certain threshold limits. +- [**Advance Tax**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/advance.md): Advance tax is the amount of income tax that is paid much in advance rather than a lump-sum payment at the year-end. +- [**Goods and Service Tax (GST)**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/gst.md): Is an indirect tax that merchants must pay to the Government. Firms can arrive at the amount to be paid using a conventional formula, and RazorpayX can scan and calculate that for you. + +### Automatic TDS Payments + +When you upload an invoice to [RazorpayX Vendor Payments app](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md), the TDS component is auto-calculated according to the TDS rate selected for the vendor. + +This TDS amount is automatically deducted from your account balance and deposited with the government every month. You can download the challan and file the TDS. + +Know more about [automatic TDS payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/automatic-tds.md). + +## Manage Teams + +You can add your team members to access the Tax Payments app to create and make payments as necessary, or allow them to only access the reports. With [Tax Payments - Standard User Roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams.md#tax-payments), you can create and set limitations for the RazorpayX Dashboard as per your business requirements. + +### Related Information + +- [Automatic TDS payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/automatic-tds.md) +- [Tax Payments - Standard User Roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams.md#tax-payments) +- [Tax Payment Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/life-cycle.md) diff --git a/llm-content/x/tax-payments/advance.md b/llm-content/x/tax-payments/advance.md new file mode 100644 index 00000000..be501035 --- /dev/null +++ b/llm-content/x/tax-payments/advance.md @@ -0,0 +1,87 @@ +--- +title: Set up and Make Advance Income Tax Payments on RazorpayX +heading: Advance Tax Payments +description: Set up and make advance income tax payments using RazorpayX. Check the tax schedule mandated by the Government of India. +--- + +# Advance Tax Payments + +Advance tax is the amount of income tax that is paid much in advance rather than a lump-sum payment at the year-end. Also known as earn tax, advance tax is to be paid in installments as per the due dates decided by the income tax department. + +Both individuals as well as businesses are liable to pay advance tax if their tax liability is greater than or equal to INR 10,000 post TDS payment in a fiscal year. + +## How it Works + +Watch this short video on using [RazorpayX Dashboard](https://x.razorpay.com/) to make Advance Tax payments. + +[Video: https://www.youtube.com/embed/vrgMUU3HT14] + +To get started with Advance Tax payments, you must: +1. Naviagte to **Menu** → **Tax Payments** on the Dashboard. +1. Go to **Advance Tax** → **Get Started**. +1. Here, you must verify the pre-populated PAN and business location details. + +> **WARN** +> +> +> **Watch Out!** +> +> - We have moved to TIN 2.0, in effect from 1st November, 2022. +> - Challans are **not** available on the RazorpayX Dashboard. To download challans, visit [https://www.incometax.gov.in/iec/foportal/](https://www.incometax.gov.in/iec/foportal/) and log in to your account. +> 1. Go to **e-File** → **E-Pay Tax** → **Payment History**. + +> 2. Under the **Actions** tab, click on the 3 dot menu for the challan you want, and click **Download**. +> - If you do not have an existing account, follow [these steps](https://www.incometax.gov.in/iec/foportal/help/taxdeductor/registration) to register. +> + +## Advance Tax Actions in RazorpayX + +With RazorpayX Tax Payments, you can perform the following actions. + +### Set Up Advance Tax + +To set up Advance Tax: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/vendor-payments). +2. Navigate to **Menu** → **Tax Payments**. +3. Tab across to **Advance Tax**. + +When using the Advance Tax feature for the first time, you must setup advance tax by confirming your PAN details and business address, both of which are automatically populated using your KYC details. + +This is a one-time process only. Here is a sample **Setup Advance Tax** screen: + ![Setup Advance Tax after providing necessary details.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tax-payments-setup-adv-tax1.jpg.md) + +### Create Advance Tax Payout + +To create a payout for Advance Tax: + +1. In the Advance Tax Payment window, click **+ Advance Tax**. +2. Confirm details for tax filing in the Adding Filing Details window as shown below: + ![Create Advance Tax Payment pop-up screen.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tax-payments-create-adv-tax.jpg.md) +3. Click **Next**. +4. Add tax amount to be paid. You can enter break-up of the tax amount by using the **Show all fields** drop-down menu. +5. Click **Save Payment** to save the payment, or click **Pay Now** to proceed to make the payment. + ![Add Tax Payment Details window.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tax-payments-add-tax-details.jpg.md) +6. If you select **Save Payment** then, enter OTP to verify and click **CREATE PAYOUT** to save the payout. The payout is created and is listed in the Advance Tax screen as shown below: + ![Advance Tax Listing](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tax-payments-adv-tax-listing.jpg.md) +7. If you select **Pay Now**, then enter OTP to verify and confirm the payment in case of making the payment. + +## Tax Schedule + +The table below gives you the advance tax schedule mandated by the Government of India. + +Tax Installment | Due Date | Amount of Tax Payable +--- +1 | Either on or before 15th of June | At least 15% of the advance tax liability +--- +2 | Either on or before 15th of September | At least 45% of the advance tax liability +--- +3 | Either on or before 15th of December | At least 75% of the advance tax liability +--- +4 | Either on or before 15th of March | 100% of tax liability + +### Related Information + +- [Automatic TDS payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/automatic-tds.md) +- [Tax Payment Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/life-cycle.md) +- [Goods and Services Tax (GST)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/gst.md) diff --git a/llm-content/x/tax-payments/automatic-tds.md b/llm-content/x/tax-payments/automatic-tds.md new file mode 100644 index 00000000..347be2fd --- /dev/null +++ b/llm-content/x/tax-payments/automatic-tds.md @@ -0,0 +1,198 @@ +--- +title: Automatic TDS with RazorpayX +heading: Automatic TDS +description: Explore the merits of setting up automatic TDS payments in RazorpayX. +--- + +# Automatic TDS + +Tax Deducted at Source (TDS) is a deduction mandated by the government. When you upload an invoice to [RazorpayX Vendor Payment Portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md#vendor-portal), you have the option to calculate and deduct tax at source. + +TDS is calculated for all invoices uploaded to RazorpayX Vendor Payments, irrespective of how you have made the payment. This means, TDS is calculated even for invoices that are in `Mark as Paid` state. Explore [when an invoice is marked as paid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md#mark-invoice-as-paid). + +## Advantages + +Following are the advantages of using RazorpayX Tax Payments to pay your taxes automatically: + +- RazorpayX automatically calculates the TDS when you upload an invoice on [RazorpayX Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md). +- It also automatically enters the TDS data on the Tax Payments application. +- The TDS payments are automatically made before the due date. No need to worry about late fees and penalties. +- You can avoid data entry errors. +- CIN and CRN numbers are available on the Dashboard after the payment. +- It saves you time and effort. + +## How it Works + +Watch the following video to know about to automated tax payments, or read on. + +[Video: https://www.youtube-nocookie.com/embed/O23u1b3o9BA] + +1. When you create a vendor on the RazorpayX Dashboard, you set a [TDS category](#tds-categories) for the vendor. +1. When you upload an invoice and select the vendor, the TDS component is auto-calculated according to the TDS rate selected for the vendor. +1. When you make a vendor payment, the TDS amount is recorded against the relevant category. The TDS amount is **NOT** deducted from your account balance at this stage. +1. On the 1st of every month, RazorpayX sends a reminder to you, informing of the total TDS you owe on your vendor payments. You must ensure there is sufficient balance in your account to make the tax payments. +1. TDS payment for the previous month will be paid automatically on the **4th of every month**. The TDS amount is deducted from your account balance at this stage. +1. After the TDS is successfully paid, you can download the challan from the [income tax portal](https://www.incometax.gov.in/iec/foportal/). +1. File the TDS as per your convenience. + +> **WARN** +> +> +> **Watch Out!** +> +> - RazorpayX Tax Payments **does not file TDS**. It only facilitates monthly payments. +> - We have moved to TIN 2.0, with effect from 1st November, 2022. +> - Challans are **not** available on the RazorpayX Dashboard. To download challans, visit [https://www.incometax.gov.in/iec/foportal/](https://www.incometax.gov.in/iec/foportal/) and log in to your account. +> 1. Go to **e-File** → **E-Pay Tax** → **Payment History**. + +> 2. Under the **Actions** tab, click on the 3 dot menu for the challan you want, and click **Download**. +> - If you do not have an existing account, follow [these steps](https://www.incometax.gov.in/iec/foportal/help/taxdeductor/registration) to e-register on the Income Tax Portal. +> + +## Automatic TDS Actions in RazorpayX + +In your RazorpayX Dashboard, you can perform the following actions to automate your TDS payments. + +> **WARN** +> +> +> **Watch Out!** +> +> - RazorpayX automatically creates the tax payment even if the auto TDS setting is disabled. +> - The actual tax payment is made only when the auto TDS setting is enabled. +> + +### Set Up + +To set up the tax payments, you must provide your business details such as your TAN number and business address. + +To set up tax payments: +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +1. Navigate to **Menu** → **Tax Payments**. +1. Click **Setup TDS Payments** and enter the required details such as TAN number and business address in the pop-up and click **Confirm**. +1. We recommend you to select [**Deduct TDS on Invoice Date**](#deduct-tds-on-invoice-date) under **Setup TDS deduction date**. You can also select [**Deduct TDS on Payment Date**](#deduct-tds-on-payment-date). +1. Click **Enable Auto-Pay**, select the auto-debit account (Razorpay Lite or Current account) and click **Enable Auto-Pay**. +1. Enter the OTP you receive on your registered mobile number and click **Confirm**. + +> **WARN** +> +> +> **Watch Out!** +> +> In **Automatic** Tax Payments, the default tax applicable is `Non-Company Deductees`. This cannot be changed. +> + +### Change Details + +You can change your TAN and business address details from the RazorpayX Dashboard. + +To change the details: +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/vendor-payments). +1. Navigate to **Menu** → **My Account & Settings** → **Business Profile**. +1. Click **EDIT DETAILS** in the **TAX DETAILS** section to edit your TAN and business address details. + +> **WARN** +> +> +> **Watch Out!** +> +> - If you have chosen to **Deduct TDS on Invoice Date**, editing of the invoice date, amount and TDS is not possible after the 4th of the subsequent month. +> - The TDS will be deducted based on the invoice date for the invoices created after setting the TDS deduction date to **Deduct TDS on Invoice Date**. The TDS deduction for previous invoices will be done based on the payment date itself. +> + +### Setup TDS Deduction Date + +To setup the TDS deduction date: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/vendor-payments). +1. Navigate to **Menu** → **My Account & Settings** → **Business Profile**. +1. Next to **Setup TDS deduction date**, click **CHANGE** under **TAX DETAILS**. + ![Set the TDS deduction date](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/set-tds-deduction-date.png.md) +1. Select the TDS deduction date as per your requirement. We recommend you to select [**Deduct TDS on Invoice Date**](#deduct-tds-on-invoice-date). + ![Select TDS deduction date](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/select-tds-deduction-date.png.md) +1. Click **Save**. + +You can also change the TDS deduction date from payment date to invoice date for vendors individually. + +1. Select the vendor you want to make the change in TDS deduction setting. +1. In the right side panel, click **Change**. + ![Change TDS deduction setting for a Vendor](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tax-payments-TDS-deduction-change.png.md) +1. Click **Yes**. + ![Change TDS deduction setting for a Vendor from payment date to invoice date](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tax-payments-change-TDS-deduction-payment-to-invoice.png.md) + +### Disable Automatic Tax Payments + +You can disable tax payments at any time if you want. To disable automatic tax payments: +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/vendor-payments). +1. Navigate to **Menu** → **My Account & Settings** → **Business Profile**. +1. Use the **Auto-Debit for TDS on Vendor Payment** toggle the **TAX DETAILS** section to disable tax payments. + +### Mark As Paid + +There is a possibility that you paid TDS using some other method. In such cases, you can mark a TDS payment as paid from the [RazorpayX Dashboard](https://x.razorpay.com/). + +> **INFO** +> +> +> **Handy Tips** +> +> - You can only mark a TDS payment as **paid** after the 1st of the following month. +> - You need to pay if there is any Late Fees. +> + +Sometimes payments do not go through automatically. It could be because: +- The Partner Bank is facing technical error. +- There are insufficient funds in your account. +- Auto TDS is disabled. + +Hence, the amount must be paid manually and updated on the Dashboard. To mark a payment as paid, select the check box against the relevant payment and click **MARK AS PAID** on the top right. + +![Mark Tax Payment as Paid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/mark-as-paid.jpg.md) + +## TDS Categories + +Download the TDS categories and rates available to you. + +> **INFO** +> +> +> **Handy Tips** +> +> The TDS rates are subject to change as per government guidelines. Refer to the [income tax website](https://www.incometax.gov.in/iec/foportal/) for the latest TDS updates. +> + +### TDS Calculation + +TDS is calculated on the Invoice Subtotal, that is, the invoice amount without GST, cess and other taxes. + +Assume TDS for a vendor is set to 7.5%. + +Invoice Subtotal = Invoice amount - (GST + Cess + Other Taxes) + +Field | Amount +--- +Invoice Subtotal | ₹5,000 +--- +TDS | ₹5,000 x 7.5% +--- +TDS to be paid | **₹375** + +We calculate the TDS and add it to the running balance of Auto TDS. The time at which TDS gets added to the Auto TDS balance depends on the date of deduction. + +#### Example + +To understand the difference between the dates of deduction, refer to the examples given below. + +#### Deduct TDS on Payment Date + +If the invoice is dated 15th December, 2022 and paid on 15th January, 2023; the TDS will be paid after the payment, i.e. 4th February, 2023. + +#### Deduct TDS on Invoice Date + +If the invoice is dated 15th December, 2022 and paid on 15th January, 2023; the TDS will be paid on 4th January, 2023, based on the date of the invoice, irrespective of when the payment is made. + +### Related Information + +- [Tax Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments.md) +- [Tax Payment Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/life-cycle.md) +- [Goods and Services Tax (GST)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/gst.md) diff --git a/llm-content/x/tax-payments/gst.md b/llm-content/x/tax-payments/gst.md new file mode 100644 index 00000000..e8c9d1cf --- /dev/null +++ b/llm-content/x/tax-payments/gst.md @@ -0,0 +1,32 @@ +--- +title: Make GST (Goods and Services Tax) Payments using RazorpayX +heading: Goods and Services Tax (GST) +description: Check how to fetch GST challans from the GSTIN Portal and make payments using the RazorpayX Tax Payments application. +--- + +# Goods and Services Tax (GST) + +> **WARN** +> +> +> **Important Notice** +> +> The automated GST payment feature is no longer available. If you're an existing user, you can access historical challans in the GST payments section on the Dashboard. +> + +## View GST Challan + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **Menu** → **Tax Payments**. +3. Go to **GST Payments** tab. +4. You can use the **VIEW CHALLAN** button to download the challan. Clicking on **VIEW CHALLAN** redirects you to the GST portal. + +You can copy and paste the CPIN and GSTIN from the [RazorpayX Dashboard](https://x.razorpay.com/vendor-payments) and use it to download the challan as shown here: + +![All paid GST Payments in GST Payments overview page.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-view-challan.jpg.md) + +### Related Information + +- [Tax Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments.md) +- [Automatic TDS payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/automatic-tds.md) +- [Tax Payment Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/life-cycle.md) diff --git a/llm-content/x/tax-payments/life-cycle.md b/llm-content/x/tax-payments/life-cycle.md new file mode 100644 index 00000000..2311a85d --- /dev/null +++ b/llm-content/x/tax-payments/life-cycle.md @@ -0,0 +1,58 @@ +--- +title: Tax Payment Life Cycle on RazorpayX +heading: Tax Payment Life Cycle +description: Check the states of a tax payment and their significance. +--- + +# Tax Payment Life Cycle + +Following are the 2 life cycles in tax payments: +- [Tax Payment Life Cycle](#tax-payment-life-cycle) +- [Payout Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md) + +Following is the tax payment life cycle. + +![tax payment life cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-tax-payments-tax-payments-life-cycle.jpg.md) + +## Unpaid + +The TDS payment is uploaded to our system. A payout may have been created, but not successfully made against the TDS payment. + +Possible payout states: +- Payout not yet created. +- `rejected` +- `cancelled` +- `failed` +- `reversed` + +## Processing + +The TDS payment is being processed. A payout is created and is being processed. + +Possible payout states: +- `pending` +- `queued` +- `processing` + +From the `processing` states, the payout can go back to the `unpaid` state if: +- If you cancel or reject the payout. +- If the payout fails or is reversed. + +## Paid + +The TDS payment was successful. Possible payout state: `processed`. + +After the TDS is successfully paid, you can download the challan from the Dashboard and file the TDS as per your convenience. + +## Cancelled + +You have manually cancelled the TDS payment from the Dashboard. + +- You can only cancel a TDS payment in the `unpaid` state. +- You cannot cancel a TDS payment after a payout is initiated for it. + +### Related Information + +- [Tax Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments.md) +- [Tax Payments - Standard User Roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams.md#tax-payments) +- [Payout Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md) diff --git a/llm-content/x/tax-payments/manual-tds.md b/llm-content/x/tax-payments/manual-tds.md new file mode 100644 index 00000000..dcc26eec --- /dev/null +++ b/llm-content/x/tax-payments/manual-tds.md @@ -0,0 +1,137 @@ +--- +title: Manual TDS on RazorpayX +heading: Manual TDS +description: Check how manual TDS payments work, how to make them and the various TDS categories. +--- + +# Manual TDS + +Tax Deducted at Source (TDS) is mandated by the government. You can upload TDS data to [RazorpayX Tax Payments](https://x.razorpay.com/tax-payments) and make payments. You can set up an automated method to pay taxes. Know more about [Automatic TDS payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/automatic-tds.md). + +However, you can also choose to make manual payments before the due date. Take a look at the [advantages of using RazorpayX Tax Payments](#advantages) to make manual TDS payments. + +## Advantages + +Following are the advantages of using RazorpayX Tax Payments to pay your taxes manually: + +- RazorpayX automatically populates data such as TAN and address. This avoids data entry errors. +- You can save your work and edit it at a later time. +- You enter the data now and make TDS payments at a later date. +- You can make one-click payments. No need to enter your bank details for each TDS payment. +- CIN and CRN numbers are available on the Dashboard after the payment. +- It saves your time and effort. + +> **WARN** +> +> +> **Watch Out!** +> +> - We have moved to TIN 2.0, in effect from 1st November, 2022. +> - Challans are **not** available on the RazorpayX Dashboard. To download challans, visit [https://www.incometax.gov.in/iec/foportal/](https://www.incometax.gov.in/iec/foportal/) and log in to your account. +> 1. Go to **e-File** → **E-Pay Tax** → **Payment History**. + +> 2. Under the **Actions** tab, click on the 3 dot menu for the challan you want, and click **Download**. +> - If you do not have an existing account, follow [these steps](https://www.incometax.gov.in/iec/foportal/help/taxdeductor/registration) to register. +> + +## How it Works + +1. You manually input the TDS details on RazorpayX Tax Payments. +1. Enter the payment details such as the RazorpayX account from which money will be deducted, that is, either RazorpayX Lite or your Current Account. +1. You can either: + - Save the payment and pay it at a later time. + - Make the payment immediately. +1. After you make the payment, it follows the [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) set on your RazorpayX account. +1. Once the TDS is successfully paid, you can download the challan from the [income tax portal](https://www.incometax.gov.in/iec/foportal/). +1. You can download the challan and file the TDS as per your convenience. + +## Manual TDS Actions in RazorpayX + +In your RazorpayX Dashboard, you can perform the following actions to manually pay your TDS. + +### Set Up + +To set up the tax payments, we will need a few details, such as your TAN number and business address. + +To set up tax payments: +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +1. Navigate to **Menu** → **Tax Payments**. +1. Click **Setup Tax Payments** and enter the required details such as TAN number and business address and click **Continue**. + +### Change Details + +You can change your TAN and business address details from the RazorpayX Dashboard. + +To change details: +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/vendor-payments). +1. Navigate to **Menu** → **My Account & Settings** → **Business Profile**. +1. Click **EDIT DETAILS** in the **TAX DETAILS** section to edit your TAN and business address details. + +### Mark As Paid + +There is a possibility that you paid TDS using some other method. In such cases, you can mark a TDS payment as paid from the [RazorpayX Dashboard](https://x.razorpay.com/vendor-payments). + +> **INFO** +> +> +> **Handy Tips** +> +> - You can only mark a TDS payment as **paid** after the 1st of the following month. +> - You need to pay if there is any Late Fees. +> + +## TDS Fields + +Following are the various fields you have to fill when uploading TDS data to the RazorpayX Tax Payment app: + +Field | Description +--- +Tax Applicable | - Company Deductees (0020): When TDS is deducted against businesses - if the vendor is a business or a registered company +- Non-Company Deductees (0021): When TDS is deducted against individuals, if the vendor is a contractor or an individual. + +--- +Tax Type (TDS/TCS) | - (200) TDS/TCS Payable by Taxpayer: Selected if the TDS/ TCS is a regular transaction. +- (400) TDS/TCS Regular Assessment: Selected if the payment is being made for a demand raised by the income tax authorities. + +--- +Tax Category | When TDS is deducted, it is deducted based on the selected TDS code. Know more about [TDS Categories](#tds-categories). +--- +Assessment Year | Assessment year when the TDS should be considered for income tax returns. +--- +Tax Amount | TDS to be paid to the government before the addition of late fees and penalties. +--- +Interest | Interest amount to be paid if TDS is deducted, but not paid within the due date. +--- +Surcharge | Surcharge to be paid by the business if TDS is not paid for the whole quarter. Surcharge depends on the turnover of the company. +--- +Educational Cess | Educational cess is levied by the government on income tax. +--- +Fee | As per section 234E, where a person fails to file the TDS/TCS return on or before the due date +--- +Penalty | Penalty to be paid if the business does not deduct TDS on a payment. +--- +Penalty Payment Code | - 11C - All penalties under section 271(1)(c). +- N11C - All penalties other than section 271(1)(c). + +--- +Others | Any other fee, penalties or amount to be paid. +--- +Total Amount | Total amount to be paid to the government with late fees and penalties. + +## TDS Categories + +Download the TDS categories and rates available to you. + +> **INFO** +> +> +> **Handy Tips** +> +> The TDS rates are subject to change as per government guidelines. Refer to the [income tax website](https://www.incometax.gov.in/iec/foportal/) for the latest TDS updates. +> + +### Related Information + +- [Tax Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments.md) +- [Advance Tax Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/advance.md) +- [Goods and Services Tax (GST)](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments/gst.md) diff --git a/llm-content/x/vendor-payments.md b/llm-content/x/vendor-payments.md new file mode 100644 index 00000000..00f6dc55 --- /dev/null +++ b/llm-content/x/vendor-payments.md @@ -0,0 +1,57 @@ +--- +title: RazorpayX | Vendor Payments +heading: About Vendor Payments +description: Explore the Dashboard actions for invoices and vendors in the RazorpayX Vendor Payments app. Manage user roles, set up a vendor portal and create end-to-end solutions. +--- + +# About Vendor Payments + +When you purchase goods or avail services from a vendor, it is usually on credit. The vendor sends you an invoice and expects payments as per the agreed payment terms. You make the payment after deducting TDS, if any. + +There are many features you can utilise to make your invoice creation process, reconciliation and automation simple and swift. With RazorpayX, you can do the following: + +## Invoices and Advances + +You can use the [RazorpayX Vendor Payments](https://x.razorpay.com/vendor-payments) to automate the process of making payments to your vendors in three simple steps: + +1. [Upload an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md#add-invoices) on the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Add the vendor/s details. +3. Make the payment as per your business requirements. + +You can also pay an [advance](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/advances.md) to your vendor via RazorpayX without worrying about reconciliation because we take care of that for you, when you pay for the invoice. + +## TDS and GST Details + +While creating an invoice, you can select from the existing TDS categories on RazorpayX. The calculations are based on the chosen category’s percentage. However, for some cases, the TDS might differ, so you can edit the amount manually: +- To deduct flat 20% TDS when the PAN of the vendor is unknown. +- To deduct TDS at a lower rate based on a certificate from the government for a particular vendor. +- To deduct TDS on a cumulative basis when the contractor’s yearly income goes over a certain threshold. + +GST breakup is one of the vital pieces of information on the invoice. It is necessary to keep a record of this. RazorpayX enables you to select the type of breakup and edit the amount accordingly. It also records the GST split in the report for accurate bookkeeping. + +Given below are 2 ways to apply GST: +- Intrastate purchase + - Levies CGST and SGST +- Interstate purchase + - Levies IGST + +For example, the invoice amount is ₹100 and the subtotal is ₹80. +- Intrastate - CGST - ₹10; SGST - ₹10; +- Interstate - IGST - ₹20; + +## Input Tax Credit Checker + +RazorpayX automatically checks if your vendors have filed their GST, identify discrepancies in the filing and control your vendor payouts to recover previously lost credit dues. Know more about [Input Tax Credit Checker](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/gst-credit-checker.md). + +## Vendor Portal + +The RazorpayX Vendor Portal is a platform created for your vendors where they can upload the invoices and receive updates to the payment. Know more about how to [setup a Vendor Portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/portal/business.md) and how your Vendors can use the [RazorpayX Vendor Portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/portal.md). + +## Manage Teams + +You can assign assign users roles to limit their access to the RazorpayX Dashboard as per your business requirements. Know more about [User Roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams.md#vendor-payments). + +### Related Information + +- [Bulk Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/bulk-invoices.md) +- [Tally Accrual](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/sync-purchase-vouchers.md) diff --git a/llm-content/x/vendor-payments/advances.md b/llm-content/x/vendor-payments/advances.md new file mode 100644 index 00000000..f16d5729 --- /dev/null +++ b/llm-content/x/vendor-payments/advances.md @@ -0,0 +1,46 @@ +--- +title: Pay Vendor Advances with RazorpayX +heading: Vendor Advances +description: Make advance payments to vendors for easy reconciliation with RazorpayX Dashboard. +--- + +# Vendor Advances + +Advance payments, often referred to as upfront payments or prepayments, are financial transactions in which a party makes a payment in advance of receiving goods, services or fulfilling contractual obligations. These payments serve various purposes, such as securing reservations, ensuring commitment or providing working capital. + +Advance payments play a crucial role in managing cash flow and risk mitigation for both parties involved. Pay and track advance payments to vendors and avoid double payments with RazorpayX Advance Payments. + +## Create Vendor Advance + +To create an advance payment for a vendor: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Navigate to **Vendor Payments** → **Advances** at the top of the screen. + ![Advance payment on razorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-advances.jpg.md) +3. Click **+ Advance** to make an advance payment to a vendor. +4. Search and select from existing contacts or create [**+ NEW CONTACT**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#create-a-contact). +5. Select the fund account of the chosen vendor to which you want to make the payment. +6. In the **Advance Details** section, enter the **Advance Amount**. +7. You can choose to **Attach** an existing Purchase Order and enter the **PO Number**, and add **+ NOTES**, as required. + ![New advance payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-new-advance.jpg.md) +8. Click **Next** and review the details. You can Schedule Payout or click **Next** to pay instantly. +9. Enter the OTP sent to your registered mobile number and email id. Click **Pay**. + +The advance is created and recorded. + +## Settling Advance Payments + +How it Works: + +- When you [add an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md#add-invoices) for a vendor to whom you have already paid an advance, RazorpayX recognises it and asks you if that particular advance is relevant to the current invoice. +- If it is relevant, select the checkbox against the row and the payable amount reduces as the advance is subtracted from the invoice. + +![Apply advance payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-apply-advance.jpg.md) + +You can make the payment instantly, schedule it or save and close the invoice. The invoice status will appear as `PARTIALLY PAID` once you map it to the advance payment. + +## Advance Payment State + +After the advance payment is mapped with the invoice, the status of the advance changes from `PAID` to `USED`. + +![Vendor advance state](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vendor-advance-state.jpg.md) diff --git a/llm-content/x/vendor-payments/advances/tds.md b/llm-content/x/vendor-payments/advances/tds.md new file mode 100644 index 00000000..2af9370c --- /dev/null +++ b/llm-content/x/vendor-payments/advances/tds.md @@ -0,0 +1,80 @@ +--- +title: Pay TDS on Vendor Advance Payments | RazorpayX +heading: Pay TDS on Vendor Advances +description: Make advance payments to vendors with TDS and knock off advances against invoices on the RazorpayX Dashboard. +--- + +# Pay TDS on Vendor Advances + +On the RazorpayX Dashboard, you can make advance payments to a vendor and simultaneously deduct the Tax Deducted at Source (TDS), in compliance with the TDS law. + +When you knock off the advance payment against an invoice, the invoice payable amount is reduced by the advance payment previously made. In those cases, we automatically adjust the TDS amount. + +## How it Works + +1. Create an Advance, deduct TDS and pay the advance to the vendor on the Dashboard. +1. Knock off applicable advance payments against the received invoice. RazorpayX automatically adjusts the TDS and the amount payable. +1. Make the invoice payment to the vendor on RazorpayX. + +## Deduct TDS with Advance Payments + +To deduct TDS with advance payments: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +1. Navigate to **Vendor Payments** → **Advances** in the left menu and click **+ Advance**. Follow the steps to [create an advance payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/advances.md#create-vendor-advance) using the applicable POs and vendor details. +1. On the **New Advance** page: + 1. Select the PO applicable. + 1. Enter the **Advance Amount** details. + - In case there is no existing PO, enter the total amount payable in advance. + - For an existing PO, enter the percentage of the PO you want to pay as an advance. This calculates the advance payment amount. + + For example, if the PO's value is ₹1,00,000 and the percentage is 30, the advance payment amount calculated is ₹30,000. + 1. We automatically add the **TDS** category. + - Select the relevant category from the **TDS Amount** drop-down menu to change the TDS category. + - You can also edit the **TDS amount**. Click the edit icon and make changes. + + This automatically calculates the **Total Payable** amount. The total payable amount is the difference of the Advance amount and the TDS amount. + 1. Add up to five reference files/attachments and notes, if necessary. + + ![TDS on Advance Payments RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tds-advance-payments.jpg.md) +1. Click **Next**. +1. [Create a payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#create-a-payout) after selecting the [Payout purpose](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#payout-purpose), debit account, mode of payment and more. You can also add attachments and additional details, and [schedule the payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/scheduled.md#individual-payout). +1. Authorise the payout with OTP. If [approval workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/approvals-on-invoices.md) is applicable, the payout is sent to the approver. + +This successfully creates an advance payment to the vendor. The advance payment details are available on the **Advances** tab. Here you can: +- View when you created the advance payment, the **UTR** number, **Advance IDs**, **Payout IDs**, the TDS deducted, and the TDS category details. +- View all TDS payment adjustments in the right pane of the selected advance payment. + ![TDS adjustments RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tds-advances-adjustments.jpg.md) + +> **WARN** +> +> +> **Watch Out!** +> +> We notify you on the RazorpayX Dashboard if excess TDS is deducted. In such cases, you must handle the refund process with the Income Tax department. +> + +## Adjust Advances Against Invoice + +When you receive invoices from the vendor with a future date, you can link your paid advances and adjust them with the invoices. Linking paid advances with an invoice reduces the invoice payable amount. This auto-adjusts the TDS, given the invoice and advance's TDS category are the same. + +For any remaining TDS deducted with the advance payment after adjustments, you can claim a refund from the Income Tax department. + +To adjust an advance against an invoice, initiate an invoice payment. + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +1. Go to **Vendor Payments** and select the invoice to pay. You can view the vendor, invoice, and advance details in the right pane. Click **Apply them →** to review the advance payments detected against the vendor and knock off the advance payments. + ![RazorpayX knock off advance payments with invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tds-advance-payments-apply.jpg.md) +1. On the **Edit Invoice** page, review and select the advances matched with the vendor and invoice. + + Click **Apply advance →** If no advance is applicable, click **Don't apply**. + + ![Choose advance payments applicable and knock off invoice RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tds-advance-payments-choose.jpg.md) +1. Authorise the payout with OTP to pay the invoice fully or partially, or you can schedule the payout. + +You have successfully paid the vendor's invoice after knocking the advance already paid. The TDS is automatically adjusted. + +## Related Information + +- [About Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) +- [About Vendor Portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/portal/business.md) diff --git a/llm-content/x/vendor-payments/approvals-on-invoices.md b/llm-content/x/vendor-payments/approvals-on-invoices.md new file mode 100644 index 00000000..1e0c2d16 --- /dev/null +++ b/llm-content/x/vendor-payments/approvals-on-invoices.md @@ -0,0 +1,98 @@ +--- +title: Approvals On Invoices with RazorpayX +heading: Approvals On Invoices +description: Establish an approval workflow for your invoices through the RazorpayX Dashboard. +--- + +# Approvals On Invoices + +Some vendor payouts may require multiple levels of approval by business stakeholders before they can be sent for the final review. To facilitate this approval process, you can add the approvers while uploading the invoice on the RazorpayX Dashboard. The invoices move to [`UNPAID` state](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/life-cycle.md#unpaid) after the invoice is approved. You can make the payment once you receive the approval/s. + +Watch the video below to know how to enable the approval workflow and approve invoices. + +[Video: https://www.youtube.com/embed/shWddDzbml0] + +## Enable Invoice Approval Workflow + +To enable the Business Approval Workflow: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Select **Vendor Payments** on the left navigation menu. +3. Click the ellipsis icon **⋮** and select **Invoice Approval Setting** as shown below. + ![Invoice approval setting](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-invoice-approval-setting.jpg.md) +4. Alternately, you can also navigate to **My Account & Settings** → **Workflow** → **Invoices** and select **Invoice Approval Setting**. +5. Use the toggle button to enable **Approvals on Invoices** as shown below. + ![Enable approval invoice workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-enable-approval-invoice.jpg.md) + +You can also toggle on **Skip approval for individual invoices** to allow your team member to upload invoice without requiring approval. + +> **WARN** +> +> +> **Watch Out!** +> +> An invoice cannot be edited once sent for approval or approved. You must create a new invoice if your invoice is rejected. +> + +### How it Works + +First, [add invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md) on the RazorpayX Dashboard. + +1. Enter the details and click **Add Approvers**. + ![Add Approvers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-add-approvers.jpg.md) + If you decide to **Skip** sending the invoice for approval, enter the reason for doing it. + ![Skip approval email](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-skip-approval-mail.jpg.md) +2. Enter the email of the approver. You can either add more approvers or click **Save**. + ![Enter approver email](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-approver-email.jpg.md) + + +> **WARN** +> +> +> **Watch Out!** +> +> - Once the approver(s) is added, they are considered default approvers for the respective vendor. However, you can [change the approver](#edit-approvers) at anytime. +> - The approvers are added in an hierarchial order. That is, unless the first approver has approved the invoice, the approval mail is not sent to the next approver and the payment will not go through without receiving all the approvals. +> - To maintain the control and correct audit trail on the invoice, you cannot edit invoices sent for approval. In case an invoice is rejected, you must be recreate the invoice and make the changes again before sending the invoice for approval. +> + +3. Click **Send** to email the invoice for approval. + +You can also skip the approval workflow after invoice creation, when the invoice is `in approval` state and move it to the `UNPAID` state. + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Navigate to **Vendor Payments** on the left navigation. +3. Select the `IN APPROVAL` invoice for which you want to skip the approval workflow. +4. Click the skip icon in the right pane with invoice details. + ![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-skip-approval.jpg.md) +5. Enter the reason for skipping th approval workflow and click **Skip approval**. + +## Edit Approvers + +To change the approvers, click **Change** and edit the email/s. + +![Change approval email](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-send-approval-mail.jpg.md) + +## Invoice Status + +Once the mail is sent for approval, the invoice status changes to`IN APPROVAL`, post which it is either `REJECTED` or `UNPAID` if the invoice is approved. To view the audit trail, navigate to **Vendor Payments** → **Invoices** and select the respective invoice to view the details. + +![Invoice in approval](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-invoice-in-approval.jpg.md) + +Know more about the [Invoice Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/life-cycle.md). + +> **INFO** +> +> +> **Handy Tips** +> +> In case an [accounting integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting.md) is enabled, the invoices sync only post-approval. +> + +Know how to [approve or reject invoices via email](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/approve-invoices.md). + +### Related Information + +- [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md) +- [Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) +- [Approve Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/approve-invoices.md) diff --git a/llm-content/x/vendor-payments/approve-invoices.md b/llm-content/x/vendor-payments/approve-invoices.md new file mode 100644 index 00000000..0d9db570 --- /dev/null +++ b/llm-content/x/vendor-payments/approve-invoices.md @@ -0,0 +1,19 @@ +--- +title: Approve Invoices on RazorpayX +heading: Approve Invoices +description: Approve or reject invoices via email with RazorpayX. +--- + +# Approve Invoices + +You can approve or reject invoices directly through email, without logging into the RazorpayX Dashboard. + +## Invoice Approval Email + +You can approve or reject the invoice attached in the email. Click **Approve** or **Reject** as required. + +![Approval email](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-approval-email.jpg.md) + +### Related Information + +- [Approval on Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/approvals-on-invoices.md) diff --git a/llm-content/x/vendor-payments/bulk-invoices.md b/llm-content/x/vendor-payments/bulk-invoices.md new file mode 100644 index 00000000..43283634 --- /dev/null +++ b/llm-content/x/vendor-payments/bulk-invoices.md @@ -0,0 +1,45 @@ +--- +title: Add Invoices in Bulk on RazorpayX +heading: Add Invoices in Bulk +description: Import a large number of invoices to your RazorpayX Dashboard. +--- + +# Add Invoices in Bulk + +Businesses deal with a large number of invoices every month. To manually upload invoices one after the other is time consuming and prone to errors. Added to that is the time taken by OCRs to read data one by one. + +To overcome this problem, you can use the Bulk Invoices feature to create a large number of invoices from the [RazorpayX Dashboard](https://x.razorpay.com/). + +## Upload Invoices in Bulk + +Watch this video to know how to upload invoices in bulk or read along. + +[Video: https://www.youtube.com/embed/61f4pVZVxg0] + + +To upload invoices in bulk: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **Menu** → **Vendor Payments**. +3. Click the drop-down icon in the **+ INVOICE** button and click **Add multiple invoices** as shown below: + ![Add multiple invoices option in RazorpayX Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-bulk-invoices-add-multiple.jpg.md) +4. Alternatively, you can also drag and drop invoices from your computer to Vendor Payments as shown here: + ![Process depicting dragging a Mahishmati.pdf file into RazorpayX Dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-bulk-invoices-drag-drop.jpg.md) + +## Invoice Upload Status + +The invoices are assigned `DRAFT` status after successful upload. You can add further details to these invoices by clicking **OPEN DRAFT** and proceed to add details using the **COMPLETE INVOICE** button. + +- **Successful Upload**: + The invoices are uploaded automatically and an **Upload successful** message is displayed as shown: + ![Bulk Invoices Upload message against the file reading Upload Successful](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-bulk-invoices-upload-success.jpg.md) + +- **Processing Failed**: + If the invoices fail to upload for some reason, then a failure message is displayed as shown here: + ![Bulk Invoices Upload message against the file reading Processing Failed](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-bulk-invoices-upload-failed.jpg.md) + +### Related Information + +- [Invoice Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/life-cycle.md) +- [Vendor Reports](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/reports.md) +- [Tally Accrual](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/sync-purchase-vouchers.md) diff --git a/llm-content/x/vendor-payments/faqs.md b/llm-content/x/vendor-payments/faqs.md new file mode 100644 index 00000000..e315ab13 --- /dev/null +++ b/llm-content/x/vendor-payments/faqs.md @@ -0,0 +1,102 @@ +--- +title: RazorpayX Vendor Payments | FAQs +heading: Frequently Asked Questions (FAQs) +description: Find answers to frequently asked questions about RazorpayX Vendor Portal. +--- + +# Frequently Asked Questions (FAQs) + +## Invoices + + +### 1. Is GSTIN mandatory for invoices? + + No, GSTIN is not mandatory for invoices. + + + +### 2. Why am I not able to receive invoices? + + Please contact [RazorpayX support](https://razorpay.com/support/) for help. + + + +### 3. Can I cancel a Payout for an invoice in the processing state? + + Yes, you can reject or cancel the payout in processing state. Know more about [Vendor Payments Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/life-cycle.md#processing). + + + +### 4. After uploading an invoice, can I replace it? + + Yes, you can [replace an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md#replace-an-invoice) after it has been added. + + + +### 5. How to cancel an invoice? + + Refer to the [Cancel an Invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md#cancel-an-invoice) section. + + + +### 6. Can I edit an invoice in the `paid` or `processing` state? + + You can edit the invoice details - the **date**, **invoice number** and **description** or add **internal notes**. You cannot edit other information for an invoice in the `paid` or `processing` state. + + + +### 7. After uploading an invoice how to set reminders to make the payment? + + When you upload and [save an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md#add-invoices), we send automatic reminders to make payment. Reminder emails are sent to your registered email address. We also show you reminder alerts on the Dashboard. + + + +### 8. Can I edit a saved invoice? + + Yes, you can edit a saved invoice. + + + +### 9. I uploaded an invoice but made the payment offline. Do I have to cancel the invoice? + + No, you need not cancel the invoice. You can instead [Mark as Paid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md#mark-invoice-as-paid). + + +## TDS + + +### 1. How to check the TDS calculated for the vendor payments? + + Once you make a vendor payment, the TDS amount is recorded against the relevant category. To check how much TDS has been calculated for each category: + 1. Log in to the RazorpayX Dashboard. + 2. Navigate to **Tax Payments** from the left menu. + + + +### 2. Why is the TDS calculated not showing up in the Tax Payment section after uploading and saving the invoice? + + TDS is recorded in the Tax Payment section only when you [make a vendor payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md#invoices). It is not recorded when you upload and save an invoice. + + + +### 3. When is the TDS amount deducted from the account balance? + + TDS payment for the previous month is automatically paid on the 4th of every month. + + + +### 4. What happens if I do not have sufficient account balance on the 4th to make the TDS payment? + + If you do not have enough balance on the 4th, we [queue](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md#queued) the Payout and send out reminders. You can add balance to your account and manually initiate the payment from the [RazorpayX Dashboard](https://x.razorpay.com/auth). + + If the payment is not processed on or before the 7th of the month, an interest amount is automatically added to the tax payment as per government norms. + + +## Miscellaneous + + +### 1. Does my vendor also need a RazorpayX account to receive payments? + + No, your Vendor does not need a RazorpayX account to receive payments. + + However, they can sign up for the [Vendor Portal](https://razorpay.com/docs/x/vendor-payments/portal/business/) to automate the collection of payments. diff --git a/llm-content/x/vendor-payments/grn.md b/llm-content/x/vendor-payments/grn.md new file mode 100644 index 00000000..4c08a01a --- /dev/null +++ b/llm-content/x/vendor-payments/grn.md @@ -0,0 +1,66 @@ +--- +title: RazorpayX | About GRN +heading: About GRN +description: Create or import GRNs to your RazorpayX Dashboard. +--- + +# About GRN + +GRN - Goods Received Note is a document used in procurement to formally acknowledge the receipt of goods. + +- When businesses receive goods from a supplier, the receiving department or personnel generate a GRN to confirm the delivery of goods specified in a Purchase Order. +- It also is a confirmation that the goods are in the expected condition, of the requested quantity and rate. + +## How it Works + +A key part of the procurement process is to ensure that the quantity received is the same as the quantity ordered and is in the aligned rate. + +RazorpayX solves this problem with a seamless three-way matching system that reconciles Purchase Orders (PO), Goods Receipts (GRN), and Invoices. This robust process ensures accuracy and compliance, reducing the risk of errors and discrepancies. + +## Advantages of GRN + +With GRN, you can be assured of: + +- Confirmed Delivery: It acts as proof that the goods have been delivered as per the Purchase Order. It also maintains a log of receipts tagged to the respective Purchase Orders. The receipt log provides information on: + - Receiver of goods + - Date/time of receipt + - The SKU wise quantity of the goods received + - The effective SKU wise inward post damages/defects +- Three-Way Matching: Match the quantity received against quantity ordered and quantity billed for, to ensure that what you received matches against what you ordered and what you are billed for. +- Easy Escalation: In case of mismatch, conflicts can be easily resolved by matching records. + +> **INFO** +> +> +> **Handy Tips** +> +> Approval Workflows can be applied on GRNs. However, GRNs are created usually by the warehouse team whereas the Purchase Orders/Bills are created by the finance teams. This means that you must create a separate set of Approval Workflows. +> + +## Create new GRN + +To create a new GRN: + +1. Log in to the [RazorpayX Dashboard](http://x.razorpay.com/auth). +2. Navigate to **Source to Pay** on the left-hand menu. +3. Click **GRN**. +4. Click **+ New GRN**. The New GRN modal is displayed. +5. From the list of vendors, select the vendor for whom the GRN has to be created. If it is a new vendor, you can click **+ NEW VENDOR** to create a new vendor. + ![Select Vendor](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-grn-select-vendor.jpg.md) + +6. In the **Link PO** modal, select the Purchase Order to be linked to the GRN. Click **Next**. + ![Link Purchase Order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-grn-link-po.jpg.md) + +7. Enter the **GRN number** and **GRN date**. The rest of the details such as Shipping location, Cost Center, Requested By, Department, and Team is auto-populated on basis of the linked PO as shown below. Click **Next**. + ![GRN Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-grn-details.jpg.md) + +8. Enter the details of the goods received, such as Item name, Description, Received Quantity and Balance Quantity, Rate, Number of Units, and the IGST%. Click **Review** to verify the information entered. The details entered in the GRN are matched with the details from the Purchase Order. Discrepancies, if any, are displayed by the system as shown here. + ![Review GRN Line Items](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-grn-line-items.jpg.md) + +9. Rectify the errors and click **Send for Approval**. For cases where approvals are not configured, you can proceed with creating the GRN directly. + +## Related information + +- [Purchase Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/purchase-order.md) +- [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md) +- [Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) diff --git a/llm-content/x/vendor-payments/grn/bulk-import-grn.md b/llm-content/x/vendor-payments/grn/bulk-import-grn.md new file mode 100644 index 00000000..e1875f06 --- /dev/null +++ b/llm-content/x/vendor-payments/grn/bulk-import-grn.md @@ -0,0 +1,99 @@ +--- +title: Bulk Import GRN +heading: GRN +description: Upload GRNs in bulk from any of your external MIS or template into RazorpayX. +--- + +# GRN + +You can import GRNs in bulk from your external MIS or template into RazorpayX and manage all your POs, Items and GRNs in one dashboard. + +### Prerequisites + +To import GRNs in bulk, you must download the [GRN template](#download-grn-template) from your dashboard. + +> **WARN** +> +> +> **Watch Out!** +> +> Only those GRNs can be imported whose linked Purchase Orders are in `issued` status in your dashboard. +> + +### Download GRN Template + + To generate GRNs, the file you upload should follow the format of the template. + + Watch this video to know how to download the template for your GRN file. + + +[Video content] + + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). + 2. Go to **Vendor Payments** in the left navigation and click **GRN**. + 3. In the **GRN** window, click **+ GRN** drop-down button on the top right and select **Bulk upload GRN** from the drop-down list. + 4. Click **Template** to download the template. You can also [click here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/GRNtemplate.xlsx.md) to download the template. + + + + +### Instructions for Filling the Template + +- Enter all the required details in the template as per the validations. +- Green coloured columns in the template are mandatory. If the entry in a field is not done as per format, the field turns red. +- Hover over the empty cells to see the validation criteria. +- Default values will be picked if any of the columns are left blank. Refer [GRN Template Requirements](#grn-template-requirements) to find out the default value for each column. +- If you are copy-pasting data using an internal tool, use these shortcuts: + - MacOS : Cmd+Opt+V, then press V again + - WindowsOS : Ctrl+Alt+V then press V again + +> **WARN** +> +> +> **Watch Out!** +> +> - Do not use Command+V or Ctrl+V for pasting data. The validation and formatting which help to identify errors will be removed. +> +> - If you are generating a file in a template format from an internal tool, copy-paste the validations and formatting from the template to your file. +> + +### GRN Template Requirements + + Column | Requirement + --- + GRN Number (Mandatory) | Enter complete GRN number with pre-fix. Supports alpha-numeric. + --- + PO Number (Mandatory)| Add the PO number to be linked with the GRN. The PO must be be issued on the RazorpayX dashboard. + --- + Received Date | Enter the goods/services received date in DD/MM/YYYY format. Date of upload will be the default date. + --- + Item Name (Mandatory) | The name needs to match exactly with the name of the item set up in your RazorpayX. + --- + Item Rate (Mandatory) | Enter the item rate in ₹. Supports upto two decimal places and needs to be greater than 0. + --- + Received Quantity | Enter the quantity of item received. The default quantity will be 1. Supports upto two decimal places. + + + +### Upload File + + + Watch this video to know how to upload your GRN file. + + +[Video content] + + 1. Once the file is completed as per the template and saved in your computer, log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). + 2. Go to **Vendor Payments** in the left navigation and click **GRN**. + 3. Click **+ GRN** drop-down button and select **Bulk upload GRN** from the drop-down list. + 4. The **Upload file** window opens. Here, you can select the saved file from your system or drag and drop it into the window. Alternatively, you can also upload the file by navigating to **Vendor Payments**→**Import**→**GRNs** tab→**Import GRNs**→**Upload**. + 5. If the file gets uploaded succesfully without any format errors, the system gives the preview of the top 3 line items of your file. This helps to ensure that you have uploaded the right file. + 6. Click **Create GRN**. You can see the accepted GRNs under **Accepted** and erroneous GRNs under **Invalid GRNs**. + 7. Click on the error sign on the rows to view the error report of the respective GRNs. + 8. Click **View GRN** against each accepted GRN to view it. This shows the GRN as a line item. + 9. Click on the line item to preview the generated GRN. + +### Related Information + +- [Import Purchase Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/purchase-order/bulk-import-po.md) +- [Bulk Import Items](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/items/bulk-import-items.md) diff --git a/llm-content/x/vendor-payments/gst-credit-checker.md b/llm-content/x/vendor-payments/gst-credit-checker.md new file mode 100644 index 00000000..fe2e13a2 --- /dev/null +++ b/llm-content/x/vendor-payments/gst-credit-checker.md @@ -0,0 +1,102 @@ +--- +title: GST Credit Checker on RazorpayX Vendor Payments +heading: Input Tax Credit Checker +description: RazorpayX automatically checks if your vendors have filed their GST, identify discrepancies in the filing and control your vendor payouts to recover previously lost credit dues. +--- + +# Input Tax Credit Checker + +Enabling GST Input Credit allows RazorpayX to use GSTR-2A data and check if your vendors have reported GST correctly and reports if there are discrepancies. This helps you optimise your GST input claim. + +> **WARN** +> +> +> **Watch Out!** +> +> This feature is available only for GST registered businesses. If you want to update your GSTIN on RazorpayX, [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md). +> + +## Set up GST Input Credit + +To set up the GST Input Credit integration: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Navigate to the profile icon at the top right and click **My Accounts & Settings** → **Integrations**. +3. Find **GST Input Credit** and click **Get Started**. +4. Log in to your [GST portal](https://gst.gov.in). + + + +### GST Portal + + After logging in to the GST portal, perform the following steps: + 1. Click **My Profile** on the GST dashboard. + 2. Navigate to **Quick Links** → **Manage API Access**. + 3. Select **Yes** to **Enable API Request**. + 4. Select **30 days** from the **Duration** drop-down and click **Confirm**. + + + +5. Select the **I have completed above steps** checkbox and click **Next**. +6. Your GSTIN is displayed. Enter the GSTIN portal **Username** and click **Generate OTP**. + ![Generate OTP](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-gst-otp.jpg.md) +7. Enter the OTP sent to your registered mobile number on the GSTIN portal and click **Next**. + +As soon as you setup the GST credit checker, the data syncs for the current financial year. Post set up, the data syncs every 24 hours. You can also [manually refresh](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/gst-credit-checker.md#refresh-gstr-2a-data) the data. The integration lasts for 30 days at once. After 30 days, you must [**Re-authenticate**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/gst-credit-checker.md#re-authenticate-gst-input-credit) for the system to access your GSTR-2A data. + + +### Re-authenticate GST Input Credit + + +> **INFO** +> +> +> **Handy Tips** +> +> You will receive an email and a Dashboard notification when re-authentication is required. You can directly re-authenticate from the banner or email, or you can follow the steps given below. +> + + To re-authenticate the GST Input Credit integration: + + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). + 2. Navigate to the profile icon at the top right and click **My Accounts & Settings** → **Integrations**. + 3. Find **GST Input Credit** and click **Re-authenticate**. + 4. Enter the GSTIN portal **Username** and click **Generate OTP**. + 5. Enter the OTP sent to your registered mobile number on the GSTIN portal and click **Next**. + + Your re-authentication is successful. + + +## GST Input Credit on Dashboard + +You can view whether the vendor has reported GST for the respective invoice on the [RazorpayX Dashboard](https://x.razorpay.com/auth) → **Vendor Payments** → **Invoices**. The GSTR-2A coloumn displays the status. + +![GST status on RazorpayX dashboard](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-gst-status.jpg.md) + +To view more information, select the required invoice. The relevant information is available in the right-pane. + + +### Refresh GSTR-2A Data + + To refresh the GSTR-2A data on RazorpayX Dashboard: + + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). + 2. Navigate to the profile icon at the top right and click **My Accounts & Settings** → **Integrations**. + 3. Find **GST Input Credit** and click **Refresh**. + + +## Disable GST Input Credit + +To disable the GST Input Credit integration: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Navigate to the profile icon at the top right and click **My Accounts & Settings** → **Integrations**. +3. Find **GST Input Credit** and click **Disable**. + ![Disable GST integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-gst-disable.jpg.md) +4. In the pop-up, click **Disable**. + +This integration is disabled. + +## Related Information + +- [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md) diff --git a/llm-content/x/vendor-payments/invoices.md b/llm-content/x/vendor-payments/invoices.md new file mode 100644 index 00000000..235a526b --- /dev/null +++ b/llm-content/x/vendor-payments/invoices.md @@ -0,0 +1,97 @@ +--- +title: RazorpayX | Invoices +heading: Invoices +description: Import invoices to your RazorpayX Dashboard for Vendor Payments. +--- + +# Invoices + +On Vendor Payments, you can make payouts to vendors against the invoices you receive from them. You can receive and import the invoice through email, [Vendor Portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/portal/business.md), upload the PDF on RazorpayX Dashboard or enter the details manually. + +## Add Invoices + +Watch this video to know how to add an invoice on the RazorpayX Dashboard or read along. + +[Video: https://www.youtube.com/embed/Mf50YVrXB3I] + +To add an invoice: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. You can navigate to Invoices in three ways: + - Navigate to the drop-down menu on the top-right side of the Dashboard and click **Upload Invoice**. + - Hover over **Vendor Payments** on the left navigation and click **+**. + - You can also click **Vendor Payments** on the left navigation and then click **+ INVOICE** on the left side. +3. Upload the invoice. The invoice details are auto-read and uploaded using the OCR technology. You can also click **Enter Details Manually** to add the details yourself. +4. Select an existing vendor or [create a new vendor](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#create-a-contact). The vendor is the person or entity to which you are making an payment to, basing an invoice received. +5. Select a Fund account for the vendor or [create a new Fund account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md#create-a-contact-with-fund-account). These are the account details (bank account or UPI ID) to which the amount is transferred. +6. If you have opted to enter the details manually, fill the **Amount Details**, click **Next**. Enter the **Invoice Details** and click **Next**. +7. Review the **Invoice Details** such as due date, TDS category, GSTIN, PAN and Amount to Vendor. +8. You can either: + - Save the invoice and pay it at a later time. RazorpayX sends reminders as you get closer to the due date. + - Make the payment immediately. + +Once you make the payment, it follows the [Approval Workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/approval-workflow.md) set on your RazorpayX account. + +### Add Invoices through Email + +When you add invoices in RazorpayX, you allow your vendors to send invoices to you via your business email. + +You have the option to forward these emails to the dedicated email address provided to you by RazorpayX. When you forward them to that email address, RazorpayX automatically generates a corresponding invoice on the Dashboard. You do not have to manually update the details, or upload invoices for the OCR to read them. + +1. Razorpay creates a unique email address for you to collect and create invoices. +2. Send this unique email address to your vendors for them to forward invoices. +3. You can forward invoices received through other email addresses as well to this uniquely generated email address. +4. Razorpay will read data in the email and automatically generate invoice. The invoice is displayed on the Vendor Payments Dashboard in the `draft` state. +5. You can add relevant details to the `draft` invoice and create payout or save it as an `unpaid` invoice. +6. You can accept or reject or schedule payouts for these invoices via the Vendor Payments Dashboard. + +Your unique business email address is visible on the Vendor Payments Dashboard. You can forward all your invoices to the dedicated email address, as shown below: +![Forward invoices to unique email option highlighted under +INVOICE.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-vendor-payments-email-int.jpg.md) + +## Mark Invoice as Paid + +You may have uploaded an invoice on the Dashboard but paid it externally. In such cases, you can mark the invoice as `paid` via the RazorpayX Dashboard. + +- The invoice moves to the `paid` state without creating a corresponding payout. +- When you mark an invoice as `paid`, you can select the external method you chose to pay the invoice (such as bank transfer, cheque or cash). +- Invoices marked as `paid` are considered for TDS payments. You can calculate and pay the TDS using [Tax Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tax-payments.md). + +This makes Vendor Payments an end-to-end solution to track all your vendor payments, irrespective of the payment method and gives you an accurate bookkeeping summary. + +Watch this video to know how to mark an invoice as `paid` or read along. + + +[Video: https://www.youtube.com/embed/Z3i6JQ_7OXM] + + +To mark an invoice as `paid`: +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +1. Navigate to **Menu** → **Vendor Payments**. +1. Click on the relevant invoice from the list to mark as `paid` . +1. In the invoice summary page, hover on the downward arrow against the **PAY/SCHEDULE** button. Click **MARK AS PAID** from the drop-down list. +1. Choose the payment mode in the **Mark as paid** pop-up page and click **MARK PAID**. + +You have successfully marked the invoice as `paid`. + +> **WARN** +> +> +> **Watch Out!** +> +> Once marked as `paid`, you cannot change the invoice status to `unpaid`. +> + +## Replace an Invoice + +To replace an invoice: +1. Log in to [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Navigate to **Menu** → **Vendor Payments**. +3. Select the required invoice and on the side panel, click the Edit icon. +4. Click **Replace File**. Details of the new invoice are auto-read and it replaces the details of the old invoice. + +## Cancel an Invoice + +To cancel an unpaid invoice: +1. Log in to [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Navigate to **Menu** → **Vendor Payments** and select the required invoice. +3. On the right pane, click the Cancel icon. The vendor payment is cancelled. diff --git a/llm-content/x/vendor-payments/invoices/approval-workflow.md b/llm-content/x/vendor-payments/invoices/approval-workflow.md new file mode 100644 index 00000000..8f3e8a2f --- /dev/null +++ b/llm-content/x/vendor-payments/invoices/approval-workflow.md @@ -0,0 +1,57 @@ +--- +title: Approvals on Invoices on RazorpayX +heading: Invoices Approval Workflow +description: Set up an approval workflow for your invoices through the cost center on the RazorpayX Dashboard. +--- + +# Invoices Approval Workflow + +This approval workflow is based on the [cost center](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/cost-centers.md) that you have linked to your invoice. You can add a cost center to your invoice at the time of creation and the workflow linked to that cost center for an invoice will become applicable to your invoice. + +You can [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) to setup this approval workflow and assign it to relevant team members. + +While [creating or adding an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md#add-invoices), you can **Link PO** and add a **Cost Center** in the **Invoice Details** section. + +![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-invoices-tag-cost-center.jpg.md) + +After adding the cost center when you review the final invoice details, you can hover over **Show all** at the right-bottom of your screen to view the set approval cycle. Click **Send for Approval**. + +![specific and meaningful image title](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-invoices-send-for-approval.jpg.md) + + +### Approving an Invoice + + To approve or reject an Invoice: + + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). + +> **INFO** +> +> +> **Handy Tips** +> +> You can either find the Invoices waiting for your approval on the Dashboard or follow the steps below. +> + + 2. Navigate to **Vendor Payments** → **Invoices**. + 3. Hover over the required Invoice `In Approval` and click **APPROVE** or **REJECT** or select it to view more details and click **APPROVE** or **REJECT** on the right-pane. + 1. If you click **APPROVE**, the following screen appears. Enter comments and click **Approve**. + ![Approve purchase order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-invoices-approve.jpg.md) + 2. If you click **REJECT**, enter the reason for rejection and click **Reject**. + + +Once your invoice is approved or rejected, you receive a mail from RazorpayX. + +### View the Invoices Workflow + +To view the approval workflow after the setup: + +1. Log in to the [RazorpayX Dashboard](http://x.razorpay.com/auth). +2. Navigate to the profile icon → **My Accounts & Settings** → **Workflow** → **Invoices**. +3. Click **View Workflows** and select the cost center for which you want to view the workflow. + +![Invoices approval workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-invoices-workflow.jpg.md) + +### Related Information + +- [Purchase Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/purchase-order.md) diff --git a/llm-content/x/vendor-payments/items.md b/llm-content/x/vendor-payments/items.md new file mode 100644 index 00000000..716ec773 --- /dev/null +++ b/llm-content/x/vendor-payments/items.md @@ -0,0 +1,104 @@ +--- +title: Add Items on RazorpayX Vendor Payments +heading: Items +description: Add and save detailed descriptions, pricing and specifications for products and services on the RazorpayX Dashboard. +--- + +# Items + +Items serve as a detailed description of products or services that are bought or sold. They enable buyers to verify that they are receiving what they ordered and at the agreed-upon prices, and they provide sellers with a clear record of what was delivered and the corresponding revenue. + +[Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md) and [purchase orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/purchase-order.md) often feature multiple items, making them records of a business transactions. The effective use of items streamlines the process of procurement, sales and financial management, contributing to more efficient and accurate business operations. + + +### Item Fields + + Items in invoices and purchase orders typically include a range of information, such as: + + + Term | Description + --- + Item Name | This is the name or title of the item, which serves as a unique identifier for the product or service being bought or sold. This is a mandatory field. + --- + Description | A brief or detailed explanation of the item, providing additional information about its features, specifications or any other relevant details. + --- + Rate per Unit | The cost or price associated with a single unit of the item. It is used to calculate the total cost for the specified quantity. This is a mandatory field. + --- + Unit | This indicates the quantity for which the given rate is applied. + --- + HSN Code | A standardised code used to classify and categorise products for taxation and trade purposes. It helps determine the applicable tax rates and is often used in international trade. + --- + Item type | This attribute categorises the item into a specific type or category, which is useful for organizing and classifying products or services within a business. This is a mandatory field. Possible values: - Goods +- Service + + --- + Tax Preference | Tax preference refers to the tax treatment or categorisation of the item for the purpose of taxation. It includes whether the item is subject to different tax rates or exemptions. This is a mandatory field. Possible values: - Taxable +- Non Taxable +- Out of scope +- Non GST Supply + + --- + CGST + SGST | This represents the tax components applied at both the central and state levels. CGST and SGST are levied separately on the same transaction. This is applicable only when the Tax Preference is Taxable. Possible values: - 0% +- 5% +- 12% +- 18% +- 28% + + --- + IGST | In a GST system, this represents the tax applied on inter-state transactions. It is collected by the central government. This is applicable only when the Tax Preference is Taxable. Possible values: - 0% +- 5% +- 12% +- 18% +- 28% + + --- + Discount type | This attribute indicates the method or type of discount applied to the item, such as a percentage discount or fixed amount discount. Possible values: - Flat +- Percentage% + + --- + Discount | The amount or percentage reduction in an item's cost owing to discounts or promotions. It stores the value per quantity. When you use the item and change the quantity, the discount is applied accordingly. + + + +## Create an Item + +To create an item: + +1. Log in to the [RazorpayX Dashboard](http://x.razorpay.com/auth). +2. Navigate to **Vendor Payments** → **Items**. +3. Click **+ Item**. + ![Create item](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-item-create.jpg.md) +4. Enter the fields mentioned [above](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/items.md#item-fields). +5. Click **Save**. + +You can use these items while creating invoices or purchase orders. To view the item details, you can select the item from the list. + +## Edit an Item + +To edit an item: + +1. Log in to the [RazorpayX Dashboard](http://x.razorpay.com/auth). +2. Navigate to **Vendor Payments** → **Items**. +3. Select the item you want to edit. +4. Go to **Options** → **Edit Item**. + ![Edit item](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-items-edit.jpg.md) +5. Add or modify the fields and click **Save**. + +Your modified item is saved. + +## Mark Item Inactive + +To mark an item inactive: + +1. Log in to the [RazorpayX Dashboard](http://x.razorpay.com/auth). +2. Navigate to **Vendor Payments** → **Items**. +3. Select the item you want to mark inactive. +4. Go to **Options** → **Mark Inactive**. + +Your item is inactive. + +### Related Information + +- [Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) +- [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md) +- [Purchase Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/purchase-order.md) diff --git a/llm-content/x/vendor-payments/items/bulk-import-items.md b/llm-content/x/vendor-payments/items/bulk-import-items.md new file mode 100644 index 00000000..de634565 --- /dev/null +++ b/llm-content/x/vendor-payments/items/bulk-import-items.md @@ -0,0 +1,92 @@ +--- +title: Bulk Import Items +description: Upload Items in bulk from any of your external MIS or template into RazorpayX. +--- + +# Bulk Import Items + +You can import Items in bulk from your external MIS or template into RazorpayX and manage all your POs, Items and GRNs in one Dashboard. + +### Prerequisites + +To upload Items in bulk, you must download the [Items template](#download-items-template) from your dashboard. + +### Download Items Template + + To import Items, the Items file you upload should follow the format of the template. Watch this video to know how to download the Items template. + + +[Video content] + + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). + 2. Go to **Vendor Payments** in the left navigation and click **Items**. + 3. In the **Items** window, click **+ Items** drop-down button on the top right and select **Bulk upload Items** from the drop-down list. + 4. Click **Template** to download the template. You can also [click here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/ItemsTemplate.xlsx.md) to download the template. + 5. Fill the Items details in the file as per the validations in the template. + +### Instructions for Filling the Template + +- Enter all the required details in the template as per the validations. +- Green coloured columns in the template are mandatory. If the entry in a field is not done as per format, the field turns red. +- Hover over the empty cells to see the validation criteria. +- Default values will be picked if any of the columns are left blank. Refer [Items Template Requirements](#items-template-requirements) to find out the default value for each column. +- If you are copy-pasting data using an internal tool, use these shortcuts: + - MacOS : Cmd+Opt+V, then press V again + - WindowsOS : Ctrl+Alt+V then press V again + +> **WARN** +> +> +> **Watch Out!** +> +> - Do not use Command+V or Ctrl+V for pasting data. The validation and formatting which help to identify errors will be removed. +> +> - If you are generating a file in a template format from an internal tool, copy-paste the validations and formatting from the template to your file. +> + +### Items Template Requirements + + Column | Requirement + --- + Item Name (Mandatory) | Enter the item name. The name needs to match exactly with the name of the item set up in your RazorpayX. + --- + Description| Add item description. + --- + Product Type | Enter type of product. Can be either Goods or Services. The default type is Goods. + --- + Rate Per Unit (Mandatory) | Enter the item rate in ₹. Supports upto two decimal places and needs to be greater than 0. + --- + HSN / SAC Code | Enter the 8 digit HSN code. Only numeric values accepted. + --- + Unit | Enter the number of units to be purchased. Default number of units is 1. + --- + Tax Preference | Accepted options are Taxable / Non-Taxable / Out of Scope / Non GST Supply. Taxable is the default option. + --- + CGST + SGST | Enter the total GST value. Accepted options are 0 / 5 / 12 / 18 / 28. + --- + IGST | Accepted options are 0 / 5 / 12 / 18 / 28. Default value is 0. + --- + Discount Type | Accepted values are Percentage or Flat. Flat will be the default value. + --- + Discount (in % or ₹) | Cannot be more than 100 if discount type entered is percentage. Cannot be more than the rate of item if discount type is mentioned flat. Default value is 0. + + +### Upload File + + Watch this video to know how to upload your Items file . + + +[Video content] + + 1. Once the file is completed as per the template and saved in your computer, log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). + 2. Go to **Vendor Payments** in the left navigation and click **Items**. + 3. In the **Items** window, click **+ Items** drop-down button on the top right and select **Bulk upload Items** from the drop-down list. + 4. The **Upload file** window opens. Here, you can select the saved file from your system or drag and drop it into the window. Alternatively, you can also upload the file by navigating to **Vendor Payments**→**Import**→**Items** tab→**Import Items**→**Upload**. + 5. If the file gets uploaded succesfully without any format errors, the system gives the preview of the top 3 line items of your file. This helps to ensure that you have uploaded the right file. + 6. After preview, the system will display the uploaded Items as rows. + 7. Click on each row to view the Item. + +### Related Information + +- [Import Purchase Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/purchase-order/bulk-import-po.md) +- [Bulk Import GRN](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/grn/bulk-import-grn.md) diff --git a/llm-content/x/vendor-payments/life-cycle.md b/llm-content/x/vendor-payments/life-cycle.md new file mode 100644 index 00000000..28494d75 --- /dev/null +++ b/llm-content/x/vendor-payments/life-cycle.md @@ -0,0 +1,118 @@ +--- +title: Vendor Payments Life Cycle on RazorpayX +heading: Invoice Life Cycle and States +description: List of states of a RazorpayX invoice and their significance. +--- + +# Invoice Life Cycle and States + +Following are the 2 life cycles in Vendor Payments: +- [Invoice Life Cycle](#invoice-life-cycle) +- [Payout Life Cycle](#payout-life-cycle) + +Below is the life cycle of an invoice. + +![vendor payment life cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-vendor-payments-vendor_payments_life_cycle.jpg.md) + +## Invoice Life Cycle + +Invoices can be in any one of the following states: +- `draft` +- `unpaid` +- `scheduled` +- `partially paid` +- `processing` +- `canceled` +- `paid` + +### Draft + +An invoice is in the `draft` state when the process of creating an invoice has been initiated but the invoice has not been saved yet. For an invoice in the `draft` state, you can take the following actions from the Vendor Payments app: +- Complete details (or edit the invoice) +- Cancel + +### Unpaid + +The invoice has been uploaded to our system. A payout may be created, but not successfully paid against the invoice. + +Possible payout states: +- Payout not yet created. +- `rejected` +- `cancelled` +- `failed` +- `reversed` + +For an invoice in the `unpaid` state, you can take the following actions from the Vendor Payments app: +- Pay Invoice +- Edit Invoice +- Mark as Paid +- Cancel Invoice +- Add File + +### Scheduled + +An invoice can be created and a corresponding payout can be scheduled. This is done in cases where payments are to be made on specific dates. For an invoice in the `scheduled` state, you can take the following actions from the Vendor Payments app: +- Pay Remaining +- Mark as Paid +- Edit Details +- Add File + +Scheduled payouts can be canceled/approved/rejected from the Payouts app. This will automatically change the status of the invoice to `unpaid`. + +### Partially Paid + +Partial payouts are done in cases where an advance payment is requested or in cases where payments are made in EMIs. An invoice is moved to `partially paid` state in such cases. For an invoice in this state, you can take the following actions from the Vendor Payments app: +- Pay Remaining +- Mark as Paid +- Edit Details +- Add File + +Invoices in this state can be canceled/approved/rejected from the Payouts app. + +### Processing + +The payment for the invoice is being processed. A payout is created and is being processed. + +Possible payout states: +- `pending` +- `queued` +- `processing` + +From the `processing` state, the invoice can go back to the `unpaid` state: +- If you reject or cancel the payout. +- If the payout fails or is reversed. + +For an invoice in the `processing` state, you can take the following actions from the Vendor Payments app: +- Edit Details +- Add File + +Invoices in this state can be canceled/approved/rejected from the Payouts app. + +### Paid + +A payout for the full amount is made against the invoice to your vendor. Possible payout state: `processed`. + +Once an invoice is paid, your vendor receives an email informing them about the payment. Shown below is a sample email that is sent to your vendor. + +![Invoice paid email example confirming successful transfer](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/RZPX-vendor-payments-invoice_paid_email.jpg.md) + +You can perform the following actions on invoices in the `paid` state: +- Edit Details +- Add File + +### Cancelled + +You have manually cancelled the payout against the invoice from the Dashboard. + +- You can only cancel an invoice in the `unpaid` state. +- You cannot cancel an invoice once a payout is made for it. + +## Payout Life Cycle + +After you pay an invoice, a payout is created. The payout created follows the same life cycle as a normal payout. Know more about [payout life cycle and states](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts/states-life-cycle.md). + +### Related Information + +- [About Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) +- [Bulk Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/bulk-invoices.md) +- [Vendor Payments Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/reports.md) diff --git a/llm-content/x/vendor-payments/multi-branch-management.md b/llm-content/x/vendor-payments/multi-branch-management.md new file mode 100644 index 00000000..a550923b --- /dev/null +++ b/llm-content/x/vendor-payments/multi-branch-management.md @@ -0,0 +1,86 @@ +--- +title: Multi Branch Management on RazorpayX Dashboard +heading: Multi Branch Management +description: Manage multiple business branches/locations and track the respective vendor payments from one RazorpayX account. +--- + +# Multi Branch Management + +Multi Branch management enables you to set up multiple branches of your business under one RazorpayX account so that you can seamlessly manage: + +- [Initiation of POs, GRNs and invoices for various branches](#auto-fill-branch-details-on-invoice-or-po). +- [Payment of invoices issued to respective branches](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md#invoices-and-advances). +- [Syncing respective branch related GST details to your accounting tool](#sync-gst-data-to-your-tally-ledgers). + +> **INFO** +> +> +> **Handy Tips** +> +> - You can configure the respective branches to have the same or different GSTINs. +> - It is mandatory to create at least one branch if the multi branch management functionality is enabled for your RazorpayX account. +> + +## Create New Branch + +You can create multiple branches and manage them from your RazorpayX account. To create a branch: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Navigate to the profile icon → **My Accounts & Settings** → **Branches**. +3. Click **+ New Branch**. +4. Enter the details and click **Save**. + ![Create new branch](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-create-branch.jpg.md) + - You can mark any one of your branches as the primary branch, if a majority of your invoices and POs are billed to that branch. This will automatically add the billing address on your POs and invoices. You can change your primary branch anytime by marking any other branch as the primary branch, if required. + +## Edit Branch + +To edit a branch: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Navigate to the profile icon → **My Accounts & Settings** → **Branches**. +3. Hover over the branch you want to edit, click ⋮ and **Edit**. + ![Edit branch](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-edit-branch.jpg.md) +4. Edit the **Business Nickname**, **Name** or **Address**. You cannot edit the GSTIN. Click **Save**. +5. Click **Save Changes** on the pop-up window. + +Your changes are saved. Invoices in `draft` state and POs in `created` state are updated with the changes made to the linked branch. + +## Mark Branch Inactive + +You can deactivate a branch if it is no longer required. This action is irreversible. To mark a branch inactive: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Navigate to the profile icon → **My Accounts & Settings** → **Branches**. +3. Hover over the branch you want to deactivate, click ⋮ and **Mark as Inactive**. +4. Click **Mark as Inactive**. + ![Delete branch](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-mark-branch-inactive.jpg.md) + +You cannot reuse an inactive branch. Create a new branch if required. + +## Auto-fill Branch Details on Invoice or PO + +You can select branches for your Invoices and POs on the **Invoice Details** tab and **PO Details** tab respectively, through the **Bill to** field. By default, the invoice/PO is auto-filled with the details of your primary branch. Click **Change** to update the **Bill to** field for your invoice/PO from your list of branches. + +![Select Branch for PO](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-branches-PO-details.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> To change a PO linked invoice's branch, you must change the branch linked to the PO of that invoice. This is because invoices are linked to POs and you can only update the POs' branch on RazorpayX. +> +> + +## Sync GST data to your Tally Ledgers + +You can sync your respective GST data from RazorpayX to your Tally ledgers at branch level. To configure the sync: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Navigate to the profile icon → My Accounts & Settings → Integrations. +3. Click **Edit Configuration** → **Mappings** → **GST**. +4. Choose the branch for which you want to configure the Tally ledger mapping. +5. **Select Ledger** for all required GST types that you want to configure and select the ledger that you want to map. +6. Click **Save changes**. + +Know more about [accounting integrations](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting.md). diff --git a/llm-content/x/vendor-payments/portal.md b/llm-content/x/vendor-payments/portal.md new file mode 100644 index 00000000..1747debd --- /dev/null +++ b/llm-content/x/vendor-payments/portal.md @@ -0,0 +1,81 @@ +--- +title: RazorpayX Vendor Portal +heading: Onboarding Vendors +description: Vendors can directly upload the invoices in their portal and Merchants can view them on their dashboard. +--- + +# Onboarding Vendors + +> **INFO** +> +> +> **Handy Tips** +> +> This page is meant for Vendors to assist them in the onboarding process. +> + +Through the RazorpayX Vendor Portal, upload all the invoices in one place and track your payments from the respective business, eliminating the manual procedure and external tracking. +To log in to the RazorpayX Vendor Portal, please visit [`https://x.razorpay.com/vendor-portal/`](https://x.razorpay.com/vendor-portal/). + +## Onboarding + +1. Check the email registered with the business owner to find an invite to join the [Vendor Portal](https://x.razorpay.com/vendor-portal/). Click **ACCEPT INVITE**. + ![Accept Invite](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-accept-invite.jpg.md) +2. You will be redirected to the RazorpayX Vendor Portal. Set a password for your account and click **Create Account**. +3. Click **Complete your Profile**. The form has the following fields: + + - **Tell us about yourself** + - Your Name + - Work Email + - Contact Number + - **Add Business Details** (Optional) + - Business Name + - GSTIN + - PAN + - TDS Category + - **Add Banking Details** (Optional) + - Account No. + - Re-enter Account No. + - IFSC + - Account holder's name + + Some of these fields maybe pre-filled. This is because your merchant has already filled it for you. +4. Click **Submit Form**. + +Your Vendor Portal is ready to use! + +## Create Payment Request + +1. Click **+ Payment Request**. + ![Create Payment Request](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-payment-request.jpg.md) +2. Click **Upload Invoice**. You can upload an invoice in .pdf, .jpg or .jpeg format. It is not mandatory to upload an invoice. +3. On uploading an invoice, Vendor Portal automatically fills the required fields in the Payment Request form, however, the details can also be added manually. The fields are: + - Invoice Date + - Invoice No. + - Due Date + - Total Amount + - GST + - TDS + - Description + - Note + ![Enter Invoice Details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-invoice-details.jpg.md) +4. Click **Review and Send Invoice**. +5. Review the details and click **Send to Merchant**. + ![Send invoice to Merchant](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-sent-to-merchant.jpg.md) + +The Payment Request status is visible on your Dashboard. + +## Payment Status + +Invoices can be in any one of the following states: +- `Sent to Merchant` +- `Accepted` +- `Rejected` +- `Partially Paid` +- `Paid` + + ![Payment Status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-status.jpg.md) + + ## Related Information + + - [Set Up Vendor Portal for Businesses](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/portal/business.md) diff --git a/llm-content/x/vendor-payments/portal/business.md b/llm-content/x/vendor-payments/portal/business.md new file mode 100644 index 00000000..d8aaa45b --- /dev/null +++ b/llm-content/x/vendor-payments/portal/business.md @@ -0,0 +1,96 @@ +--- +title: Vendor Portal by RazorpayX +heading: Set Up Vendor Portal +description: Let your vendors set up RazorpayX Vendor Portal to upload invoices for vendor payments and track them in one place. +--- + +# Set Up Vendor Portal + +The RazorpayX Vendor Portal is a platform created for your vendors where they can upload the invoices and receive updates of the payment upon your invitation. You can: +- Automate the collection of invoices from different vendors in one portal, eliminating the manual process. +- Save your time and help in better tracking of the vendor payments. +- `accept`, `reject`, `schedule` or `pay` the payment requests from vendors as per your convenience. The vendor is also notified of your action. + +Watch this video to know how to set up the Vendor Portal or read along. + +[Video: https://www.youtube.com/embed/BYtVhidKfwU] + +Following are the steps to set up and invite vendors to the Vendor Portal: +1. [Setup Vendor Portal](#setup-vendor-portal) +1. [Invite Vendors](#invite-vendors) + +## Setup Vendor Portal + +To setup the Vendor Portal: + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/). +2. Click **Vendor Payments**. +3. Navigate to the three dots menu between the **Refresh** and **Download** icons and click **Setup Vendor Portal**. +4. Click **Setup Vendor Portal**. +5. Review your public profile details that will be visible to the vendor: + - Business name + - Logo + - Phone + - Email + + ![Vendor Portal - Set up Public Profile](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-setup-vendor-portal.jpg.md) + + + + **Edit details** if required or click **Save And Continue**. + +6. You can either **Invite all vendors** or **Select vendors** from the contact list. Only the [Contact type](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#contact-types) saved as **vendor** is eligible to use the portal. + +## Invite Vendors + +After you set up the portal, you can invite your vendors. + +1. On your [RazorpayX Dashboard](https://x.razorpay.com/), navigate to **Menu** → **Contacts**. +1. Using Quick Filters, choose `vendor` as the contact type. +1. Select the contact that you want to invite to the portal. In the pop-up that appears to the right, click **Invite To Vendor Portal**, as shown. + ![Invite to Vendor Portal option highlighted.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-invite-to-vendor-portal.jpg.md) + +When you do so, the vendor receives an invite on their email address. Once the vendor accepts the invite to join the portal, the label under their contact changes from **INVITE SENT** to **PORTAL ENABLED**. + + +> **INFO** +> +> +> **Handy Tips** +> +> Check and share the url: [https://razorpay.com/docs/x/vendor-payments/portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/portal.md) with your vendors for them to see the activities they can perform on the portal. +> + + +## Disable Portal + +1. Select and open the `vendor` contact of whom you want to disable the portal. +2. Click **Options**. + ![Disable Vendor Portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-disable-vendor-portal.jpg.md) +3. Click **Disable Vendor Portal**. + +The vendor loses their access to the portal. + +## Invoice Status + +When the vendor makes a payment request, it is visible on your dashboard, under **Vendor Payments**. + +Watch this video to know how to accept or reject invoices uploaded by your vendors, or read on. + + +[Video: https://www.youtube.com/embed/vN25G_wt7gg] + + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/). +2. Click **Vendor Payments**. +3. Click **View More Filters** on the top right. Find **Source** and select **From Vendor Portal** to view only those invoices uploaded by vendors. +4. New requests have `PENDING REVIEW` status. Hover over the the payment to **ACCEPT** or **REJECT** the invoice. You can also click on the invoice to **ACCEPT INVOICE** or **REJECT** the payment. +5. **PAY** instantly or **SCHEDULE** the payment for later, based on your convenience. + +When you accept the invoice, the invoice status changes from `pending review` to `unpaid`. When you make the payment, `unpaid` status moves to `paid`. If you have made the payment outside of RazorpayX Vendor Payment App, you can come back to this invoice and [mark it as paid](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md#mark-inovice-as-paid). + +### Related Information +- [About Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) +- [Partial Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/partial-payouts.md) +- [Scheduled Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/scheduled-payouts.md) +- [Bulk Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/bulk.md) diff --git a/llm-content/x/vendor-payments/purchase-order.md b/llm-content/x/vendor-payments/purchase-order.md new file mode 100644 index 00000000..63200e58 --- /dev/null +++ b/llm-content/x/vendor-payments/purchase-order.md @@ -0,0 +1,164 @@ +--- +title: Purchase Orders on RazorpayX +heading: Purchase Orders +description: Create or upload Purchase Orders on the RazorpayX Dashboard. +--- + +# Purchase Orders + +A Purchase Order (PO) is a crucial document in the world of business and commerce. It serves as a formal request made by a buyer to a supplier or vendor to acquire goods or services. + + +### Advantages of Purchase Order + + Purchase orders play a vital role in the procurement process by helping both parties, the buyer and the seller to: + - Ensure your planned expenditure does not exceed. + - Maintain clarity and accountability. + - Provide as a legal record of the agreement. + - Facilitate efficient inventory management. + - Track expenses and provide resolution for any potential disputes. + + It is a fundamental tool in ensuring smooth and organized business transactions. + + + +### Purchase Order Life Cycle + + Given below are the different states of a Purchase Order. + + + PO State | Description + --- + `Created` | When you create a PO on the Dashboard but do not send it to the vendor. + --- + `Issued` | When you share the PO with the respective vendor. You can send it directly from the RazorpayX dashboard or you can manually **MARK AS ISSUED** if you choose to send it separately. + --- + `Partially Billed` | When you **PAY ADVANCE** to the vendor, if required. + --- + `Billed` | When you complete the payment to the vendor. + --- + `Closed` | After the transaction is complete and goods/services are received, click **MARK AS CLOSED**. + + + ![Purchase Order life cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-po-lifecycle.jpg.md) + + +### How it Works + +You can initiate a Purchase Order, share it, link it to the payments, all from the RazorpayX Dashboard. + +1. [Create a Purchase Order](#create-purchase-order). +2. [Send the Purchase Order](#send-purchase-orders-to-vendors-via-email) to the Vendor. +3. Link the Purchase Order to the respective invoice and advance payments. +4. [Close the Purchase Order](#mark-as-closed). + +## Add Purchase Order + +To add a Purchase Order: + +1. Log in to the [RazorpayX Dashboard](http://x.razorpay.com/auth). +2. Navigate to **Vendor Payments** → **Purchase Orders**. +3. **Create new PO** or **Upload existing PO**. + +### Create Purchase Order + +Before creating your first Purchase Order, set your **Billing Address** via [Branches](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/multi-branch-management.md) that will appear on the header of the Purchase Order. You can add only 1 billing address. + +**Shipping Address** is the same as billing address by default. De-select the **Same as billing address** check box if you want to add a different shipping address. Enter the required details and click **Save**. + +Once the addresses are saved click **Done**. + +1. **SELECT** a vendor or add **NEW VENDOR**. It is optional to **+ Add Address** of the vendor. Enter the required details and click **Save**. +2. Select or deselect the **GST applicable vendor**, as required. Enter the GSTIN. +3. Review the address, you can **Edit** or click **Next**. +4. Enter the **PO Details** as given below. Select the relevant **Cost Center** and click **Next**. + ![Purchase order details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-purchase-orders-details.jpg.md) +5. Enter and verify the **Amount details** and click **Next**. + ![PO Amount details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-po-amount-details.jpg.md) +6. Review the Purchase Order. You can **Edit details**, **Save & close** or **Save & Send** the Purchase Order. + +If you choose to **Save & Send** the PO, enter or verify the **Vendor Email** and add other email ids for carbon copy (**CC**) if required. Click **Send PO** to `Issue` the PO to the vendor. + +### Upload Purchase Order + +Click **Upload PO**. Select the file from your computer and click **open** or drag and drop the file. +RazorpayX reads the uploaded file and you can review the PO. + +You can **Edit details**, **Save & close** or **Save & Send** the PO if required. + +## Send Purchase Orders to Vendors via Email + +1. Log in to the [RazorpayX Dashboard](http://x.razorpay.com/auth). +2. Navigate to **Vendor Payments** → **Purchase Orders**. +3. Select the Purchase Order that you want to share with your vendor. In the right pane, click **SEND TO VENDOR**. +4. Enter the email id and click **Send PO**. + +The Purchase Order is sent to the vendor and is marked `Issued`. + +## Mark as Issued + +If you choose to **Save & close** the Purchase Order and decide to share it through another platform, you can manually mark the Purchase Order issued. You cannot edit a Purchase Order after issuing it. You can pay advances or link the Purchase Order to an invoice only after it is `issued`. + +1. Log in to the [RazorpayX Dashboard](http://x.razorpay.com/auth). +2. Navigate to **Vendor Payments** → **Purchase Orders**. +3. Select the Purchase Order that you want to issue. In the right pane, click **MARK AS ISSUED**. + +![PO Issued](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-po-mark-issued.jpg.md) + +## Mark as Closed + +You can choose to close the Purchase Order at any state. It is advised to close the Purchase Order after the transactions are settled. + +To close the Purchase Order: + +1. Log in to the [RazorpayX Dashboard](http://x.razorpay.com/auth). +2. Navigate to **Vendor Payments** → **Purchase Orders**. +3. Select the Purchase Order that you want to close. In the right pane, click **MARK AS CLOSED**. + +The Purchase Order is closed. + +## Cancel Purchase Order + +To cancel a Purchase Order: + +1. Log in to the [RazorpayX Dashboard](http://x.razorpay.com/auth). +2. Navigate to **Vendor Payments** → **Purchase Orders**. +3. Select the Purchase Order that you want to cancel. In the right pane, select the three-dot menu and click **Cancel PO**. + +The Purchase Order is cancelled. + +## Purchase Order Approval Workflow + +This approval workflow is based on the [cost center](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/cost-centers.md) that you have linked to your PO. You can [contact support](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/support.md) to setup this approval workflow and assign it to relevant team members. + + +### Approving a Purchase Order + + To approve or reject a Purchase Order: + + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). + +> **INFO** +> +> +> **Handy Tips** +> +> You can either find the Purchase Orders waiting for your approval on the Dashboard or follow the steps below. +> + + 2. Navigate to **Vendor Payments** → **Purchase Orders**. + 3. Hover over the required Purchase Order `In Approval` and click **APPROVE** or **REJECT** or select it to view more details and click **APPROVE** or **REJECT** on the right-pane. + 1. If you click **APPROVE**, the following screen is displayed. Enter comments and click **Approve**. + ![Approve purchase order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-po-approve.jpg.md) + 2. If you click **REJECT**, enter the reason for rejection and click **Reject**. + + +### View the Purchase Order Workflow + +To view the approval workflow after it is setup: + +1. Log in to the [RazorpayX Dashboard](http://x.razorpay.com/auth). +2. Navigate to the profile icon → **My Accounts & Settings** → **Workflow** → **Purchase Orders**. +3. Click **View Workflows** and select the cost center for which you want to view the workflow. + +![View Purchase Order workflow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/view-PO-workflows.jpg.md) diff --git a/llm-content/x/vendor-payments/purchase-order/bulk-import-po.md b/llm-content/x/vendor-payments/purchase-order/bulk-import-po.md new file mode 100644 index 00000000..4c7dd69b --- /dev/null +++ b/llm-content/x/vendor-payments/purchase-order/bulk-import-po.md @@ -0,0 +1,197 @@ +--- +title: Bulk Import of Purchase Orders +heading: Bulk Import +description: Import Purchase Orders in bulk from any of your external tools or templates into RazorpayX. +--- + +# Bulk Import + +Managing Purchase Orders, Items and GRNs can be very tedious and time-consuming in a large scale business. The Bulk Import feature in RazorpayX helps to overcome this by enabling you to: + +- Import Purchase Orders, Items and GRNs in bulk in `.xlsx` or `.csv` format. +- Seamlessly integrate with your WMS, inventory management or internal tools. + +### Prerequisites +To import Purchase Orders in bulk, you must: +- Download the [Purchase Order template](#download-purchase-order-template) from the Dashboard. +- Download the [Vendor Contact ID](#download-vendor-contact-id) file from the Dashboard. + +> **WARN** +> +> +> **Watch Out!** +> +> Downloading the Contact ID file may take several minutes. It is recommended to download it in advance. +> +> + +### Download Purchase Order Template + +Watch this video to know how to download the Purchase Order import template. + + +[Video content] + + + + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). + 2. Go to **Vendor Payments** in the left navigation and click **Purchase Orders**. + 3. In the **Purchase Orders** window, click **Purchase Order** drop-down button on the top right and select **Bulk upload PO** from the drop-down list. + 4. Click **Template** to download the template. You can also [click here](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/PoTemplate.xlsx.md) to download the template. The template is now available in your system. + +### Download Vendor Contact ID + +Vendor Contact IDs are unique IDs generated for each vendor registered with your RazorpayX. They are used to map a Purchase Order to a specific vendor and are required only for managing Purchase Orders. + + Watch this video to know how to download the Contact ID file. + + +[Video content] + + 1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). + 2. Go to **Vendor Payments** in the left navigation and click **Purchase Orders**. + 3. Click **Purchase Order** drop-down button and select **Bulk upload PO** from the drop-down list. + 4. Select the preferred file format (`.xlsx` or `.csv`). + 5. You can either click the **Download** button to download the file into your system or **Email** button to email it to yourself. Alternatively, you can also download or email the file from the **Contacts** menu by navigating to **Contacts → Vendors → Export**. + + +### Instructions for Filling the Template + +- Enter all the Purchase Order details in the template as per the validations. +- Green coloured columns in the template are mandatory. If an entry in a field is not done as per format, the field turns red. +- Hover over the empty cells to see the validation criteria. +- Default values will be picked if any of the columns are left blank. Refer [Template Requirements](#template-requirements) to find out the default value for each column. +- If you are copy-pasting data using an internal tool, use these shortcuts: + - MacOS : Cmd+Opt+V, then press V again + - WindowsOS : Ctrl+Alt+V then press V again +- Ensure that the file is saved as `.xlsx`. + +> **WARN** +> +> +> **Watch Out!** +> +> - Do not use Command+V or Ctrl+V for pasting data. The validation and formatting which help to identify errors will be removed. +> +> - If you are generating a file in a template format from an internal tool, copy-paste the validations and formatting from the +> template to your file. +> +> + +### Template Requirements + + + Column | Requirement + --- + PO Number (Mandatory)| Enter complete Purchase Order number with pre-fix. If a Purchase Order has multiple line items, then each item will be a new row in the sheet and the Purchase Order number should be common among those rows. Supports alpha-numeric (no special characters or spaces). + --- + RazorpayX Contact ID (Mandatory)| Enter the Vendor Contact ID downloaded from the Vendor Contact ID file. + --- + Order Date | Enter the order date (DD/MM/YYYY). Date of upload will be the default Order Date. + --- + Delivery Date | Enter the delivery date (DD/MM/YYYY). Date of upload will be the default Delivery Date. + --- + Payment Terms | Enter the payment terms. 0 will be the default value. + --- + Bill To| Enter the branch of your firm to which you wish to bill. The branch name needs to match exactly with the name of the branch set up in your RazorpayX. + --- + + Ship To | Enter the branch of your firm which should receive the consignment. to ship to. The branch name needs to match exactly with the name of the branch set up in your RazorpayX. + --- + Cost Center | Enter the cost center name. The name needs to match exactly with the name of the branch set up in your RazorpayX. + --- + Item Name (Mandatory) | Enter the item name. The name needs to match exactly with the name of the item set up in your RazorpayX. + --- + Item Quantity | Enter the quantity of item. The default quantity will be 1. Supports upto two decimal places. + --- + Item Rate (Mandatory) | Enter the item rate in ₹. Supports upto two decimal places and needs to be greater than 0. + --- + Item Tax % | Values accepted are 0 / 5 / 12 / 18 / 28. + --- + Item HSN/SAC | Accepts 8 digit numeric code. + --- + Discount | Enter in ₹. Supports upto two decimal places. + --- + Round Off | Enter in ₹. Supports upto two decimal places. + --- + Address Line 1 | Enter address line 1 of the vendor address if not already present in your RazorpayX. + --- + Address Line 2 | Continue to enter the rest of the vendor address. + --- + Pincode | Enter pincode of the vendor address. This is mandatory if you have entered the address columns P and Q. + --- + City | Enter city of the vendor. This is mandatory if you have entered the address columns P and Q. + --- + State | Enter state of the vendor. This is mandatory if you have entered the address columns P and Q. + --- + Country | Enter country of the vendor. This is mandatory if you have entered the address columns P and Q. + --- + Notes | Enter notes, if any. + --- + Terms and Conditions | Enter terms and conditions, if any. + --- + + + + The template throws errors in case the in-sheet validation fails. Ensure that you follow the template to avoid errors. + + + +### Upload Purchase Order File + + + Watch this video to know how to upload Purchase Orders in bulk. + + +[Video content] + + 1. Once the Purchase Order file is completed as per the template and saved in your computer, log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). + 2. Go to **Vendor Payments** in the left navigation and click **Purchase Orders**. + 3. Click **Purchase Order** drop-down button and select **Bulk upload PO** from the drop-down list. + 4. The **Upload file** window opens. Here, you can select the saved file from your system or drag and drop it into the window. Alternatively, you can also upload the file by navigating to **Vendor Payments**→**Imports**→**Purchase Orders** tab→**Import Purchase Orders**→**Upload**. + 5. If the file gets uploaded succesfully without any format errors, the system gives the preview of the top 3 line items of your file. This helps to ensure that you have uploaded the right file. + 6. Click **Create Purchase Order**. You can see the accepted Purchase Orders under **Accepted** and erroneous Purchase Orders under **Invalid POs**. + 7. You can click on the error sign against the erraneous Purchase Orders to view the respective error reports. + 8. Click on **View PO** against each accepted Purchase Order to see the generated Purchase Order. This shows the Purchase Order as a line item with status as `draft`. + 9. Click on the line item to preview the Purchase Order. + 10. Click on **Complete PO** to add any further details or **Save to Draft** to save without editing. + +> **INFO** +> +> +> **Handy Tips** +> +> The Purchase Oredr file undergoes a two level validation. The first set of formatting validations take place while filling the template. Further, a dynamic checking happens while uploading the completed file. Here the system checks for errors in data (Contact ID, for example). +> + + +### Purchase Order Life Cycle + + Given below are the different states of a Purchase Order. + + + Purchase Order State | Description + --- + `Accepted` | When you upload Purchase Orders in a bulk file without errors, they are listed under **Accepted** column. + --- + `Invalid` | When you upload Purchase Orders in a bulk file with errors, they are listed under **Invalid POs**. + --- + `Drafts` | When a succesfully uploaded Purchase Order is listed under **Accepted** column, ready for editing. + --- + `In Approval`/`Ready to Issue` | When you complete the Purchase Order in `drafts` and it is ready for approval (in case of approvals in the workflow) or issuance. + --- + `Issued` | When the completed and approved (where required) Purchase Order is issued. + --- + `Partially Billed` | When you pay advance to the vendor, in case of requirement + --- + `Billed` | When you complete the payment to the vendor. + --- + `Closed` | When you mark the `billed` Purchase Orders as `closed` after ensuring that all the billing transactions are completed. + + + + +### Related Information + + - [Bulk Import GRN](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/grn/bulk-import-grn.md) + - [Bulk Import Items](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/items/bulk-import-items.md) diff --git a/llm-content/x/vendor-payments/purchase-order/reconciliation.md b/llm-content/x/vendor-payments/purchase-order/reconciliation.md new file mode 100644 index 00000000..acf7a9af --- /dev/null +++ b/llm-content/x/vendor-payments/purchase-order/reconciliation.md @@ -0,0 +1,40 @@ +--- +title: Reconcile Purchase Orders on RazorpayX +heading: Reconcile Purchase Orders +description: Reconcile purchase orders on the RazorpayX Dashboard. +--- + +# Reconcile Purchase Orders + +You can link purchase orders with invoices and advance payments on the RazorpayX Dashboard. This helps in reconciliation and interlinks the payments to avoid re-payments or other confusion. + +For example, if you have `partially billed` a PO and have linked it to an invoice, only the balance amount displays as the final payable avoiding double payment. + +## Vendor Advances and Purchase Orders + +To pay advances to your vendors for whom you have created the PO: + +1. Log in to the [RazorpayX Dashboard](http://x.razorpay.com/auth). +2. Navigate to **Vendor Payments** → **Purchase Orders**. +3. Select the PO for which you want to pay an advance. In the right pane, click **PAY ADVANCE**. + +While making an [advance payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/advances.md), RazorpayX lists the PO that may be related to your payment. You can select the relevant PO to link it to the advance payment or you can choose **Advance is not against my PO**. + +![Link purchase order to advance payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-po-link-advance-payment.jpg.md) + +## Invoices and Purchase Orders + +You can link POs to your invoices while [adding the invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md#add-invoices). All the existing POs that are `issued`, `partially billed` or `billed` and related to the vendor are displayed and you can select the relevant PO. You can also select **No PO to link against this Invoice**, this is an irreversible action. + +![Link PO to invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/link-po-invoice.jpg.md) + + +### Link Invoice while creating PO + + To link your PO to one or more invoices: + + 1. Log in to the [RazorpayX Dashboard](http://x.razorpay.com/auth). + 2. Navigate to **Vendor Payments** → **Purchase Orders**. + 3. Select the PO you want to link to an invoice. In the right pane, click **LINK TO INVOICE**. + ![Link purchase order to invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-po-link-invoice.jpg.md) + 4. A list of invoices in `unpaid` or `draft` state is displayed and you can choose the required invoices to link. If there are invoices in other states, remove the filter from the top of the page for all the invoices to be displayed. diff --git a/llm-content/x/vendor-payments/reports.md b/llm-content/x/vendor-payments/reports.md new file mode 100644 index 00000000..3c567c62 --- /dev/null +++ b/llm-content/x/vendor-payments/reports.md @@ -0,0 +1,54 @@ +--- +title: Vendor Payment Reports on RazorpayX +heading: Vendor Payment Reports +description: Generate and view the Vendor Payments Invoice Report, TDS Auto Calculation Report and Vendor Payouts Report on RazorpayX Dashboard. Share them with your CA. +--- + +# Vendor Payment Reports + +You can generate reports from Vendor Payments to export details of all invoices/vendors/taxes on your account. + +## Generate a Report + +To generate a report, you can either navigate to [**Reports**](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/reports.md) on the RazorpayX Dashboard or follow the steps below: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Click **Vendor Payments** in the left navigation menu. +3. Click **View More Filters** and apply the required filters. + ![Filter Vendor Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-download-report-filter.jpg.md) +4. Click the download icon. +5. Select the report you want to generate: + - Vendor Payments + - Payouts on Vendor Payments + - Auto TDS Calculation + - Vendors +6. Select the date range/duration for which you want to download data. +7. Select the **Include Invoice Files** option, if you want to include the uploaded invoices in the report. This is applicable only for the Vendor Payments report. +8. Select the format for the report. You can download them either as `csv` or `xlsx` files. +9. Click: + - **DOWNLOAD** to download the report and save it on your system. It may take up to 10 minutes. + - **EMAIL** to email the report to yourself or your team members. + ![Download Vendor Payments Report](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-download-report.jpg.md) + +## Types of Vendor Payment Reports + +The following are the types of reports available for vendor payments on the RazorpayX Dashboard. + +Report | Description | Sample +--- +Vendor Payments | Consolidated vendor payments report. If an invoice has got two payments against it, the report will reflect it on the same row. You can also download the attached invoices as a `.zip` file. | Report +--- +Payouts on Vendor Payments | Provides information about payouts associated with vendor payments respectively. If an invoice has got two payments against it, the report will reflect it in two rows. | Report +--- +Auto TDS Calculation | Gives information about additions and deletions to the auto TDS calculations on Vendor Payments, both category-wise and each record wise. | Report +--- +Vendors | Provides a list of all the vendors in the system, along with their contact information, tax-related information, fund account details and other relevant data such as vendor portal enabled/disabled status. | Report + +## Share Reports with CA + +You can share the invoice report with your Chartered Accountant or Financial Manager via the [CA user role feature](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams/ca-portal.md) available in RazorpayX. + +### Related Information + +- [About Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) +- [Invoice Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/life-cycle.md) diff --git a/llm-content/x/vendor-payments/tally.md b/llm-content/x/vendor-payments/tally.md new file mode 100644 index 00000000..c97c0cef --- /dev/null +++ b/llm-content/x/vendor-payments/tally.md @@ -0,0 +1,64 @@ +--- +title: RazorpayX-Tally Integration +heading: About RazorpayX-Tally Integration +description: Explore the benefits and features of the RazorpayX-Tally Integration and see How it Works. +--- + +# About RazorpayX-Tally Integration + +Tally is one of small and medium enterprises' most widely used accounting software. Businesses use Tally services such as Tally.ERP 9 or TallyPrime to maintain and track accounting transactions, finance, inventory, and sales. + +RazorpayX offers an intelligent integration with Tally to make payouts to vendors, partners and suppliers. Businesses that use TallyPrime or Tally.ERP 9 (from version 6 and upwards) can now integrate RazorpayX with Tally and reduce many manual accounting processes. + +## How it Works + +Watch the video below to understand the benefits, use cases and the process of setting up the RazorpayX-Tally Integration or read along. + +[Video: https://www.youtube.com/embed/cixFw1dwiSk?list=PLCwKlvaW1shYSe38ZxPE2e_jfuuxxwGmq] + +You can also watch the [Introduction to RazorpayX Tally Integration video in Hindi](https://youtu.be/zlYQQvAgxh0). + +You must integrate and set up the two-way integration between RazorpayX and Tally. Enable and disable the vendor payment flows as applicable to your business, or make them all work together. + +### Four Flows + +You can perform the following four core bookkeeping and reconciliation actions of vendor payments with this integration: + +- [Sync Purchase Voucher](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/sync-purchase-vouchers.md) payment entries and reconciliation in Tally. +- [Sync Payment Voucher](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/sync-payment-vouchers.md) reconciliation in Tally. +- Automate bookkeeping process, that is: bill creation → payment entry → reconciliation, by [bringing bills](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/bring-bills.md) to Tally. +- Use [Smart Bank Statement](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/bank-statement-sync.md) to source each and every transaction from all over RazorpayX to Tally. + +RazorpayX automatically syncs all the above flows when you make the entries in Tally. + +### Advantages + +With the RazorpayX-Tally Integration, you enjoy many intelligent benefits, which include the following: + +- **First and Only Accounting Assistant** + + The RazorpayX-Tally Integration is the only accounting assistant in India that is smart and sensitively designed for Indian businesses. + +- **Bi-directional Integration** + + It is the first two-way integration between Tally and RazorpayX Vendor Payments. It automates and customises your syncing process between Tally and RazorpayX. + +- **Seamless Automation** + You need not manually work through documents and processes; anything you upload to Tally or RazorpayX gets automatically synced to the other in just a click. + +- **Smart Bank Statement** + + The RazorpayX-Tally Integration offers a smart bank statement like no other. Sync your transactions from all the apps you use in RazorpayX to Tally with context-sensitive journal entries. + +- **Save up on Time and Efficiency** + + With the RazorpayX-Tally Integration, you can: + - **Save 50% of time spent** in payment processing during the 1st and 7th of the month. + - **Close books of accounts 40% faster**; reduce your bookkeeping effort, time and errors. + - Use the saved time to spend on compliance and core business operations. + +### Related Information + +- [About Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) +- [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md) +- [Tally Account Statement Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/accounting/tally/account-statement.md) diff --git a/llm-content/x/vendor-payments/tally/bank-statement-sync.md b/llm-content/x/vendor-payments/tally/bank-statement-sync.md new file mode 100644 index 00000000..d8fcf799 --- /dev/null +++ b/llm-content/x/vendor-payments/tally/bank-statement-sync.md @@ -0,0 +1,100 @@ +--- +title: RazorpayX Smart Bank Statement Sync with Tally +heading: Smart Bank Statement Sync +description: Sync all transactions from RazorpayX in Tally. +--- + +# Smart Bank Statement Sync + +The Smart Bank Statement feature syncs transactions from your bank statements as entries in your Tally application. With this feature, you can understand your transactions from a business perspective than just a banking perspective. + +## How it Works + +1. Suppose you paid a vendor and it shows in your bank statement as a debit and a double-entry transaction only. +2. When you sync the transaction using the RazorpayX-Tally Integration, you can use the Payout notes, Payout Purpose and other details from RazorpayX as a reference and update your journal entry narrations in TallyPrime. +3. Create a journal entry and reconcile payments easily. + +Watch the video below to understand the Smart Bank Statement process or read along. + +[Video: https://www.youtube.com/embed/fjJWqs8jK90?list=PLCwKlvaW1shasiBE6k7h1m8OoW0EgTg11] + +## Advantages + +Following are the advantages of the bank statement sync flow: +- It automates a lot of your bookkeeping and data entry processes. +- Reduce errors and inconsistency and save up on time. +- You do not need to maintain and cross-verify data between many Excel sheets. + +## Setup Workflow + +Enable the Smart Bank Statement setting to sync all the transactions made in RazorpayX to Tally. + +1. Navigate to **R:RazorpayX Settings** from your **Gateway of Tally** page. + ![Top-right menu highlighting R:RazorpayX Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sbs-enable.jpg.md) +1. Select **Yes** against **Sync Entries from RazorpayX**. This is a one-time process. + ![Select Yes in Tally to enable sync](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sbs-select-yes.jpg.md) + +You have successfully enabled the setting to sync all transactions made in RazorpayX to Tally, regardless of the type of transaction. + +Whether you [make a payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payouts.md#how-to-make-payouts), or the money is debited as part of a [payout link](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/payout-links.md), payroll, tax payments and more, **all transactions** can be synced in Tally. + +## Sync Transactions + +After you enable the [sync workflow](#setup-workflow) to allow Tally to sync all the transactions you make in RazorpayX. Follow + +- [Start sync](#start-sync). +- [Create journal entries](#create-journal-entry). +- [Reconcile entries](#reconcile-entries). + +## Start Sync + +To sync these transactions in Tally: +1. Open Tally to show the **Gateway of Tally** page. +1. Go to **UTILITIES** → **RazorpayX**. + ![RazorpayX in utilities in Gateway of Tally menu](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-menu.jpg.md) +1. In the **RazorpayX** menu, click **RazorpayX Bank Statement**. + ![RazorpayX Bank Statement in RazorpayX menu](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sbs-bank-statement.jpg.md) +1. Select **RazorpayX Account** when prompted to **Select Ledger**. The **RX_Statement** page appears. + +You have successfully moved all your transactions from RazorpayX to Tally. On this page, you find the list of transactions taken from all of RazorpayX. They appear marked as **NA___** under the **Particulars** column. + +![Transactions after syncing from RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/txn-after-sync.jpg.md) + +## Create Journal Entry + +The **Status** of transaction synced reads **Not Booked**. This means that the journal entry is made but is incomplete in Tally. As such, it is also not posted to Tally. RazorpayX never posts journal entries directly to Tally. + +To create the journal entry: + +1. Click on the relevant transaction synced to Tally. The **Accounting Voucher Alteration** page appears. +1. On this page, check the **Narration** to the bottom-left corner. The narration contains the transaction details you can use as a reference when creating a journal entry. + ![Select relevant incomplete journal entry and create entry using narration as reference.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sbs-create-journal entry.jpg.md) +1. Create the journal entries by clicking on the **By** and **To** fields. Map the fields to the entities as present in your ledgers. +1. Review your journal entry. Once statisfactory, enter **Yes** against **Convert Voucher & Approval**. You have successfully created and updated the particulars and narration of your journal. You have also booked the entry in Tally. + ![After the entry is created, you](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/sbs-create-journal entry.jpg.md) +1. Go to the **RX_Statement** page. +1. Click on **F10:Booked**. It shows all the booked entries in journal. The latest entry you have booked will appear in the booked page. + +You have successfully created a journal entry for your transaction. + +## Reconcile Entries + +To reconcile the entries: + +1. Go to **Gateway of Tally**. +1. Navigate to **UTILITIES** → **Banking** → **Bank Reconciliation**. +1. Here, select the **Name of the Bank Ledger** as **RazorpayX A/c**. + ![Select RazorpayX ledger](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/select-ledger.jpg.md) +1. Select the duration for which you want to view the entries by clicking **F2:Period**. +1. Select **B:Basis of Values** and click **Include Reconciled transactions** from the drop-down list. + ![Select option from the list to show reconciled trasactions](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/include-recon-txn.jpg.md) + +Tally registers the journal entry you have created with all the narration details and context. You do not have to worry about the origin and settlement of the transaction, or contact your Vendors and other entities to help in reconciliation process. + +### Related Information + +- Keyboard shortcuts in [Tally Prime](https://help.tallysolutions.com/tally-prime/keyboard-shortcuts/keyboard-shortcuts-tally-prime/) +- [Bring bills from RazorpayX to Tally](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/bring-bills.md) +- Sync Vouchers in RazorpayX + - [Purchase Vouchers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/sync-purchase-vouchers.md) + - [Payment Vouchers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/sync-payment-vouchers.md) diff --git a/llm-content/x/vendor-payments/tally/bring-bills.md b/llm-content/x/vendor-payments/tally/bring-bills.md new file mode 100644 index 00000000..44f77254 --- /dev/null +++ b/llm-content/x/vendor-payments/tally/bring-bills.md @@ -0,0 +1,221 @@ +--- +title: Bring Invoices from RazorpayX to Tally +heading: Bring Invoices to Tally +description: Automate invoice sourcing and bookkeeping process in Tally and improve journal entry narrations using ledger mapping. +--- + +# Bring Invoices to Tally + +With the accounting assistant, the [RazorpayX-Tally Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally.md), you can: +- Source invoices from the Vendor Payments App to Tally. +- Automate the bookkeeping process, that is, creating the bill → the payment → reconciliation of the bill. +- Map the bills generated to the tax and Vendor Expenses ledgers in Tally. + +## How it Works + +Watch the video below to understand the advantages and the process of automating the bookkeeping process or read along. + +[Video: https://www.youtube.com/embed/FjtAbWzQuYE?list=PLCwKlvaW1shYSe38ZxPE2e_jfuuxxwGmq] + +You can also watch the [Bring Bills from RazorpayX to Tally video in Hindi](https://www.youtube.com/watch?v=56rUlfPlUbM). + +1. Source the bills received and paid through your RazorpayX Vendor Payments App to Tally. +2. The bills received from the below-mentioned modes are auto-read by the RazorpayX AI OCR reader. You can create bills in RazorpayX via: - [Vendor Portal](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/portal/business.md) +- [Bulk drag and drop](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/bulk-invoices.md) +- [Email Integration](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md#add-invoices-through-email) + You can pay bills in RazorpayX via: - [Bulk Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/bulk.md) +- [Partial Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/partial-payouts.md) +- [Scheduled Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/scheduled-payouts.md) + +3. Review the invoices and sync them to Tally, which automatically creates the journal entries. Tally then maps the entries to the ledgers. +4. Verify the journal entries and map them to the respective ledgers, if necessary. +5. After your CA/Finance team has reviewed and approved them, post them to Tally. + +## Advantages + +Following are the advantages of automating the bookkeeping process. With the RazorpayX-Tally integration, you can: + +- Reduce your data entry effort by up to 40%. +- Eliminate errors of omission or repetition. +- Remove the pain of manual cross-verification between multiple Excel sheets. +- Choose when, who and how the journal entries are synced to Tally. +- Need not worry about making manual changes as per approvals and audit changes your CA suggests. +- The OCR reader scans the bills uploaded from [all the bill creation modes](#how-it-works), so you do not have to focus on entering the correct details. The bills paid are also easily synced. + +## Setup Workflow + +To source and map the bills sourced from RazorapyX, you must set up: +1. [RazorpayX to Tally workflow](#enable-setting). +2. [Ledger and Mapping mechanism](#ledger-and-mapping). + +## Enable Setting + +To bring the bills from RazorpayX to Tally: + +1. Open your Tally application to show the **Gateway of Tally** page. +1. Click **R:RazorpayX Settings** from the right menu. + ![Click R:Razorpay Settings from the right menu in the Tally application](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-int-razorpayx-settings.jpg.md) +1. Enter **Yes** against the following settings to enable the feature: + + Settings | Value + --- + **Bring invoices from RazorpayX to Tally** | Yes + --- + **Sync on Receipt** | Yes + --- + + ![Change the settings against bringing invoices and syncing receipts on Tally](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-int-bring-bills1.jpg.md) +1. Enter the OTP you receive at your email address and save the settings. + +You have successfully enabled the feature to bring bills from RazorpayX to Tally. + +## Ledger and Mapping + +When you [generate an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) in Vendor Payments, you can automate bringing that bill to Tally. + +You can also choose to automate mapping those bills to the ledgers present in Tally as per the conditions matched. This is a one-time setting only. + +There are two ledgers you map your bills to: +- [Vendor Expense Mapping](#1-vendor-expense-mapping). +- [Tax Ledger Mapping](#2-tax-ledger-mapping). + +#### How it Works + +1. Set up the necessary ledgers and map the expenses and tax accordingly. +2. When you bring a bill from RazorpayX, Tally maps that transaction to the respective ledger. +3. You can manually change the mapping to a different ledger if necessary. + +Suppose you run a clothing business and make the following payments from RazorpayX regularly: +- To a supplier who provides readymade clothing items. +- To a different supplier who provides unstitched dress material. +- To a logistics company that offers home delivery on all orders received. +- To suppliers who provide housekeeping, canteen, packaging, sundry expenses and many other services. +- Pay tax incurred on these transactions as per the relevant tax categories. And so on. + +For all such cases and more, you can: +- Create Expense Ledger. This maps the expenses you frequently incur. +- Create Vendor Ledger. You collate a list of Vendors to whom you regularly make payments to. +- Use Tax Ledger to map the tax paid and credited. + +Now, map the expense to the vendor and vice versa in the **Vendor Expense Mapping** ledger. When moving the transactions to Tally, the ledgers automatically map the transaction to the expense incurred per the vendor to whom you have paid. + +#### Example + +Suppose Pankhuri Traders is one such supplier. +- You incur Canteen Expenses regularly from them and make payments to them. +- In such cases, you can map Canteen Expenses to Pankhuri Traders in your Tally ledger. + +When you create an invoice in RazorpayX for Pankhuri Traders and sync the bill in Tally, the narration for the journal entry in Tally gets automatically updated to Canteen Expenses. This is because the vendor, Pankhuri Traders, is already mapped to Canteen Expenses. + +You can also map one vendor to many expenses in the expense ledger. + +#### Advantages + +- **Understand banking transactions from a business perspective** + + - When you make payments using RazorpayX, you can use Payout Notes, Contact type and name, Payout Purpose, and more, to generate a banking narration. + - When syncing to Tally, the banking narration can help to automate mapping the tax, vendor or expense entry to Tally when it matches with the ledger entry. + - If many teams handle your vendor business and reconciliation, they can understand the transactions easily in this way. +- **Create context-specific journal entries** + + When the transactions are specific to context about when, how and why you have made the payment, you improve the narration of your journal entry automatically. +- **Automates the process** + + uppose you create an invoice against a specific vendor already mapped to an expense in the Vendor Expense mapping ledger. The narration automatically syncs the invoice in Tally to its mapped expense. + + Due to not manually making the entries, you save time and effort. You can verify, repeat and reduce errors easily. +- **One-time process** + + It is a one-time process. Every time you select a type of expense or a specific vendor, the expense gets updated to match the mapping you have set. If necessary, you can still map the expense manually to a different expense. + +### 1. Vendor Expense Mapping + +To set up your Vendor Expense ledger: +1. Open your Tally application to show the **Gateway of Tally** page. +1. Go to **UTILITIES** → **RazorpayX**. +1. In the **RazorpayX** menu, click **RazorpayX Cashflow**. +1. In **RazorpayX Cashflow**, click **Settings**. +1. Here, click **Vendor Expense Mapping**. + + ![Process showing the vendor expense mapping mechanism](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-bring-bills-ve.gif.md) + +In the **Vendor Expense Mapping** window, you can map your Vendors and sundry creditors to the expense ledger on a one-to-one basis. This is a one-time process. + +![Example of a Vendor Expense Ledger](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-int-bring-bills.jpg.md) + +> **INFO** +> +> +> **Handy Tips** +> +> When you add a bill from a new vendor and map it to an expense in the Vendor Expense ledger, Tally automatically maps the vendor to that expense category for all future invoices from them. +> + +### 2. Tax Ledger Mapping + +You can map your TDS Credit and GST Debit settings to the Tax ledgers in Tally as applicable. This is also a one-time process. To do so: + +1. Open your Tally application to show the **Gateway of Tally** page. +1. Go to **UTILITIES** → **RazorpayX**. +1. In the **RazorpayX** menu, click **RazorpayX Cashflow**. +1. In **RazorpayX Cashflow**, click **Settings**. +1. Here, go to **Tax Ledger Mapping**. + +![Workflow to setup tax ledger and mapping](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-bring-bills-tl.gif.md) + +In the **Tax Ledger Mapping** page, map the **GST - Debit** and **TDS - Credit** to the respective Tally ledgers as per the tax categories applicable. + +![Example of a Tax Ledger](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-int-bring-bills-tl-example.jpg.md) + +## Bring Bills to Tally + +After you enable the settings in your Tally application, you can test the automation. Once you source an invoice from RazorpayX to Tally, you can: + +- [Sync the bill](#sync-bills). +- [Post the bill](#post-to-tally). + +## Sync Bills + +After you [create an invoice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) in Vendor Payments, sync the bill in Tally. To do so: + +1. In your Tally application, go to **UTILITIES** → **RazorpayX**. +1. In the **RazorpayX** menu, click **RazorpayX Cashflow** → **Sync Entries from RX**. + ![Enable the sync entries from RX setting](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-bring-bills-sync.jpg.md) +1. Click **Yes** and confirm your action to finish sync. + +The bills you have created in RazorpayX are now synced in Tally. Check the journal entries, get your CA's approval, and post them in Tally. + +## Post to Tally + +After you sync the invoices, you can review the entries and prepare them for your CA's approval. Your CA reviews the: +1. Invoice sourced into Tally. +1. Journal entry created in Tally for that invoice. +1. Details of the ledgers the expense is mapped to. + +You/CA can review the bill by following these steps: + +1. In your Tally application, go to **UTILITIES** → **RazorpayX**. +1. In the **RazorpayX** menu, click **RazorpayX Cashflow**. +1. In **RazorpayX Cashflow**, go to **Not Posted**. + ![Open the bills created but not posted to Tally](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-int-bring-bills-3.jpg.md) + The **Bills to RazorpayX** page appears. +1. Review the bill you have created. + +You will find that the bill created has mapped to the expense you generally incur from that vendor, as [explained in the example](#example). You can edit the expense and map it to a different expense ledger if necessary. + +After review, you can approve the entries by clicking **F5:Approval** from the right menu. + +> **WARN** +> +> +> **Watch Out!** +> +> RazorpayX **never** posts the entries into Tally directly. Always get the entries approved from CA and then ask the CA to post them. This is a manual process. +> + +Suppose you pay the invoice after creating it. You can [sync the bills in Tally](#sync-bills-in-tally) and check the payment entry in the bill details. After reviewing the bill, you can [post them again to Tally](#post-to-tally). + +### Related Information + +- [Vendor Payments](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md) +- Keyboard shortcuts in [Tally Prime](https://help.tallysolutions.com/tally-prime/keyboard-shortcuts/keyboard-shortcuts-tally-prime/) diff --git a/llm-content/x/vendor-payments/tally/set-up.md b/llm-content/x/vendor-payments/tally/set-up.md new file mode 100644 index 00000000..6e2c2107 --- /dev/null +++ b/llm-content/x/vendor-payments/tally/set-up.md @@ -0,0 +1,145 @@ +--- +title: Set Up RazorpayX-Tally Integration +heading: Set Up Tally Integration +description: Download, start and set up the RazorpayX-Tally Integration. +--- + +# Set Up Tally Integration + +Start the RazorpayX-Tally Integration via your [RazorpayX Dashboard](https://x.razorpay.com/). To install and set up your integration, you must: +1. [Download the plugin](#download-plugin). +2. [Locate the file path and install the integration](#install-and-set-up). +3. [Configure your Tally Application](#configure-integration). + +After setup, change or modify the settings in your Tally application to make the [four flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally.md#four-flows) of the integration work seamlessly. + +Watch the video below for the instructions or read along. + +[Video: https://www.youtube.com/embed/s2L4dmBjQGs?list=PLCwKlvaW1shYSe38ZxPE2e_jfuuxxwGmq] + +You can also watch the [RazorpayX - Tally Integration video in Hindi](https://youtu.be/pyID2TsAV4U). + +## Download Plugin + +To start the integration, download the plugin from the [RazorpayX Dashboard](https://x.razorpay.com/auth). The `RazorpayX.tcp` file is compatible with TallyPrime or Tally.ERP 9 (from version 6 and upwards) on your Windows device. + +You can find the integration options in four places on the Dashboard. + +- **Banner on RazorpayX Home Page**: + + On the [RazorpayX Dashboard](https://x.razorpay.com/auth), click **GET STARTED →** in the **Introducing Smart Bank Statement Sync** to download the plugin. + +- **Banner on Vendor Payments Dashboard**: + + Click **GET STARTED →** in the **Sync Vendor Payment with your Accounting Software Today!** banner on your RazorpayX Vendor Payments Dashboard. + +- **Accounting Integration Button**: + + In the Vendor Payments Overview page, click the grey **ACCOUNTING INTEGRATIONS** button next to the **+ INVOICE** button. + +- **Integrations in Account Settings**: + + On the [RazorpayX Dashboard](https://x.razorpay.com/auth): + 1. Navigate to the user icon at the top right of the page. + 1. Click **My Account & Settings**. + 1. Go to **Integrations** in the left menu. + 1. Click the Tally icon button under **ACCOUNTING TOOL INTEGRATION** to download the plugin. + ![Tally highlighted in Accounting Tool Integrations in RazorpayX Settings](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-accounting-tool-integrations.jpg.md) + +Start integrating RazorpayX with Tally by yourself or invite your Finance Team to do it. Know more about [managing teams and user roles](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/manage-teams.md) in RazorpayX. + +## Set Up Integration + +After you have downloaded the file, begin the setup process explained below. + +## Install and Set Up + +> **INFO** +> +> +> **Handy Tips** +> +> If you use Tally on the cloud, ask your Tally administrator to install the `RazorpayX.tcp` file. +> + +### Install Integration + +After you download the `RazorpayX.tcp` file, locate where you have downloaded it. +1. On your Windows device, right click on the `.tcp` file and click **Properties**. + ![Information about the .tcp downloaded](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-integration-4.jpg.md) +2. In the **Security** tab of the **Properties** window, note the path against the **Object name**. + +### Set Up Integration + +You or your team can set up the integration in the following way: + +1. Open Tally to show the **Gateway of Tally** page. +1. Go to **F1: Help** → **TDLs & AddOns** → **F4:Manage Local TDLs**. + ![Tally Prime set up using TDLs & AddOns and Manage Local TDLs in that order](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-int-tdls-addons.jpg.md) +1. In the **TDL Configuration screen**: + - Click **Specify Path** in the **Specify File Path** pop-up page. + - Paste the path noted [during installation](#install-integration). + You can also **Select from Drive**. +1. Enter **Yes** against Load TDL. + +Once the TDL loads, you can view the author and the summary of your actions. For more information on the setup process, refer [How to Setup TDL and Add-ons in Tally Prime](https://www.labhsoftware.in/2020/12/10/setup-tdls-and-add-ons-in-tally-prime/). + +#### Post Set Up + +After the setup process, you can see: + +- **RazorpayX** in the **Gateway of Tally** page. +- Under **F1:Help** to the top-right of the page: + - **R:RazorpayX Settings**. + - **X:RazorpayX Sync**. + ![Changes reflecting in Gateway of Tally page after installation.](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/tally-info.jpg.md) + +You have completed the setup. Check how to [configure the system](#configure-integration). + +## Configure Integration + +See how you can configure the integration. + +### Prerequisites + +Before you configure the system, keep your merchant id and the Administrator/Finance role/Owner's email id available. To find your merchant id: +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +1. Navigate to the user icon drop-down to the top right corner of the page. + +You can find your merchant id above **My Account & Settings**. + +> **WARN** +> +> +> **Watch Out!** +> +> For security purposes, you must re-login once every 7 days. Use the OTP you receive at your administrator/finance role/owner's email address to authorise access and ensure Tally data security. +> + +### Configure Application + +To configure your application: +1. Go to **R:RazorpayX Settings**. The **RazorpayX Configuration (in Developer Mode)** page appears. +1. Select **Yes** against **Enable RazorpayX Integration**. + ![Say Yes against Enable RazorpayX Integration in Tally Prime](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-int-enable-sync-settings.jpg.md) +1. Enter your RazorpayX merchant id noted in [prerequisites](#prerequisites). +1. Under the RazorpayX admin login id, enter the finance/owner/admin role's email id. You receive the OTP required for Tally account authentication here. +1. Select a time when you are not using the Tally application. Tally automatically syncs the payment and reconciliation entries to RazorpayX in this time frame. You cannot use your Tally application during this time. + +You have now partially configured your the RazorpayX-Tally Integration. + +### Enable Flows + +To fully configure the application, enable and disable the settings as per the [four flows](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally.md#four-flows) applicable to your business. +- If you choose to [bring bills](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/bring-bills.md) to Tally from RazorpayX, enable it at this step. +- You can change the settings to sync [Purchase Vouchers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/sync-purchase-vouchers.md) and [Payment Vouchers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/sync-payment-vouchers.md) entries in Tally and RazorpayX. Select **Yes** against only one of them at a time. +- Additionally, choose how you want to sync these invoices: + - When receiving the invoices. + - At the time of payment of invoices. + + Select **Yes** for only one of these. + +### Related Information + +- Keyboard shortcuts in [Tally Prime](https://help.tallysolutions.com/tally-prime/keyboard-shortcuts/keyboard-shortcuts-tally-prime/) +- [Create RazorpayX Ledger](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/tally-epayments/set-up.md) diff --git a/llm-content/x/vendor-payments/tally/sync-payment-vouchers.md b/llm-content/x/vendor-payments/tally/sync-payment-vouchers.md new file mode 100644 index 00000000..730b2357 --- /dev/null +++ b/llm-content/x/vendor-payments/tally/sync-payment-vouchers.md @@ -0,0 +1,115 @@ +--- +title: Sync Payment Vouchers with RazorpayX +heading: Sync Payment Vouchers +description: Set up the mechanism to send and sync Payment Vouchers uploaded in Tally with RazorpayX. +--- + +# Sync Payment Vouchers + +After you [set up and configure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/set-up.md) the integration, you can send your [Payment Vouchers](#send-and-sync-payment-vouchers-to-razorpayx) to RazorpayX and sync them for reconciliation. + +## How it Works + +To set up the Payment Vouchers workflow, you must: +1. [Send the Payment Vouchers to RazorpayX](#1-send-payment-voucher). +2. [Sync the voucher in RazorpayX](#2-sync-payment-voucher). +3. [Make payments as per the invoices created in RazorpayX](#pay-invoices). + +Watch the video below to understand how you can send Payment Vouchers to RazorpayX, or keep reading for the instructions. + +[Video: https://www.youtube.com/embed/IHzMUvkAhCs?list=PLCwKlvaW1shYSe38ZxPE2e_jfuuxxwGmq] + +You can also watch the [Send Payment Vouchers to RazorpayX video in Hindi](https://youtu.be/s1FgaTHXBas). + +## Advantages + +Following are the advantages of using the sync payment vouchers flow: + +- Make expense or vendor payments in Tally. RazorpayX syncs the entries with additional payment details in the transaction, such as TDS, GST, and more. +- Pay, process and reconcile the payments three times faster. +- You need not maintain tedious Excel sheets, import and export them and verify details between both of them. +- Removes the need to add IFSC and bank account numbers multiple times. This prevents errors of repetition. + +## Send and Sync Workflow + +Check the process to send and sync payment vouchers to RazorpayX. + +## 1. Send Payment Voucher + +To send Purchase Vouchers to RazorpayX, you must change the settings in Tally. +1. Open your Tally application to show the **Gateway of Tally** page. +1. Click **R:RazorpayX Settings** from the right menu. + ![Click R:RazorpayX Settings from the right menu in the Tally application](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-int-razorpayx-settings.jpg.md) + The **RazorpayX Configuration (in Developer Mode)** page appears. +1. On this page: + - Enter **Yes** against **Invoice Sync Settings**. + - Change the following settings: + + + Settings | Value + --- + **Send puchase vouchers to RazorpayX** | No + --- + **Send payment vouchers to RazorpayX** | Yes + --- + + + Set the payment voucher setting to **Yes**. + + ![Change the setting to yes against payment vouchers only](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-sync-payment-vouchers1.jpg.md) +1. After selecting, enter the OTP sent to your registered email. Check your spam folder if you do not find the OTP in your primary inbox. +1. Save your changes. + +You have successully configured the settings to send Payment Vouchers to RazorpayX. + +> **WARN** +> +> +> **Watch Out!** +> +> Select either **Purchase vouchers** or **Payment vouchers**. You **cannot** choose **Yes** for both Purchase vouchers and Payment vouchers. If you do so, Tally shows an error. +> + +## 2. Sync Payment Voucher + +To create a payment voucher in Tally and sync it in RazorpayX: + +1. Go to **Gateway of Tally** → **TRANSACTIONS** → **Vouchers**. + ![Click Vouchers under Transactions heading in Tally](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-int-sync-puchase-vouchers1.jpg.md) + The **Accounting Voucher Creation (In Developer Mode)** page appears. +1. Select **F5:Payments**. Enter the invoice details to create a Payment Voucher and add a Purchase Voucher or an older bill as a reference. + ![Create a payment voucher](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-int-sync-payment-vouchers2.jpg.md) +1. Create the payment voucher and add the bank account from which the payment must be debited. +1. Select the invoice against which payment has to be made. Enter the details and click **Yes** when prompted. +1. Go to the **Gateway of Tally**. Click **RazorpayX** → **Ready for Bank**. + ![Steps to open the Payment Instructions page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-int-sync-payment-vouchers3.jpg.md) + + The **RXEPayment (In Developer Mode)** appears. Tally displays particulars about payments with the number of payment invoices that are: + - **Ready for sending to RazorpayX** + - **Sent to RazorpayX (unpaid & partially paid)** + - **Fully paid in RazorpayX & Reconciled transactions** + + Here is a sample screenshot of payments as seen on Tally. Click on each of the rows for more information. You can also filter the results based on the displayed fields. + ![Tally Payments View](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-ready-for-bank.jpg.md) +1. Select **Ready for sending to RazorpayX** and press Enter. +1. Sync all of these entries by clicking on **A:Sync All Bills** in the right menu as shown below. + ![Sync All Bills](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-sync-all-bills.jpg.md) + +After syncing, return to **Ready for Bank** page. Here, you can find that the number of bills in **Ready for sending to RazorpayX** has reduced, and the bills in **Sent to RazorpayX (unpaid & partially paid)** have increased. + +Go to RazorpayX and pay your invoices as per the standard [vendor payment flow](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md). + +## Pay Invoices + +After you send and sync the vouchers in RazorpayX, you can pay the invoices in the following ways: +- [Pay your vendor immediately](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md). +- [Pay vendor partially](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/partial-payouts.md). +- [Schedule the vendor payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/scheduled-payouts.md). +- [Make vendor payouts in bulk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/bulk.md). + +All the payments made can be brought back to Tally. Know more about [bringing bills to Tally](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/bring-bills.md) from RazorpayX. + +### Related Information + +- [Bring Bills to Tally](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/bring-bills.md) +- Keyboard shortcuts in [Tally Prime](https://help.tallysolutions.com/tally-prime/keyboard-shortcuts/keyboard-shortcuts-tally-prime/) diff --git a/llm-content/x/vendor-payments/tally/sync-purchase-vouchers.md b/llm-content/x/vendor-payments/tally/sync-purchase-vouchers.md new file mode 100644 index 00000000..c8529d8e --- /dev/null +++ b/llm-content/x/vendor-payments/tally/sync-purchase-vouchers.md @@ -0,0 +1,132 @@ +--- +title: Sync Purchase Vouchers with RazorpayX +heading: Sync Purchase Vouchers +description: Set up the mechanism to send and sync Purchase Vouchers uploaded in Tally with RazorpayX. +--- + +# Sync Purchase Vouchers + +After you [set up and configure](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/set-up.md) the integration, you can send your Purchase Vouchers to RazorpayX and sync them for reconciliation. + +## How it Works + +To set up the Purchase Vouchers workflow, you must: +1. [Send the Purchase Voucher to RazorpayX](#1-send-purchase-voucher). +2. [Sync the voucher in RazorpayX](#2-sync-purchase-voucher). +3. [Make payments as per the invoices created in RazorpayX](#pay-invoices). + +Watch the video below to understand how you can send Purchase Vouchers to RazorpayX, or read along. + +[Video: https://www.youtube.com/embed/dR0VEjhFFww?list=PLCwKlvaW1shYSe38ZxPE2e_jfuuxxwGmq] + +You can also watch the [Send Purchase Vouchers to RazorpayX video in Hindi](https://youtu.be/saKPbQuy0qw). + +## Advantages + +Following are the advantages of using the sync purchase vouchers flow: + +- Make bill entries in a single place instead of maintaining multiple Excel sheets. +- You need not spend time cross-checking the synced values. This integration removes the errors of repetition. +- Move Payment Instructions, bank account details and other sensitive data with complete accuracy. +- Automate the payment entry and reconciliation in Tally. +- Verify the invoices created only once. You need not spend time reviewing or rectifying entries. + +## Send and Sync Workflow + +Check the process to send and sync purchase vouchers to RazorpayX. + +## 1. Send Purchase Voucher + +To send Purchase Vouchers to RazorpayX, you must configure that setting in Tally. + +1. Open your Tally application to show the **Gateway of Tally** page. +1. Click **R:RazorpayX Settings** from the right menu. + ![Click R:RazorpayX Settings from the right menu in the Tally application](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-int-razorpayx-settings.jpg.md) + The **RazorpayX Configuration (in Developer Mode)** page appears. +1. On this page: + - Enter **Yes** against **Invoice Sync Settings**. + - Change the following settings: + + + Settings | Value + --- + **Send puchase vouchers to RazorpayX** | Yes + --- + **Send payment vouchers to RazorpayX** | No + --- + + + Set the purchase voucher setting to **Yes**. + + ![Select Yes for Purchase Vouchers only](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-int-yes-purchase-vouchers.jpg.md) +1. After selecting **Yes**, enter the OTP sent to your registered email. Check your spam folder if you do not find the OTP in your primary inbox. +1. Save your changes. + +You have successully configured the settings to send Purchase Vouchers to RazorpayX. + +> **WARN** +> +> +> **Watch Out!** +> +> Select either **Purchase vouchers** or **Payment vouchers**. You cannot choose **Yes** for both Purchase vouchers and Payment vouchers. If you do so, Tally shows an error. +> + +## 2. Sync Purchase Voucher + +To creat a purchase voucher in Tally and sync it in RazorpayX: + +1. Go to **Gateway of Tally** → **TRANSACTIONS** → **Vouchers**. + ![Click Vouchers under Transactions heading in Tally](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-int-sync-puchase-vouchers1.jpg.md) +1. Click **F9:Purchase**. Enter the invoice details to create a Purchase Voucher. + ![Enter the Purchase Voucher details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-int-sync-purchase-vouchers2.jpg.md) +1. Go to **Gateway of Tally** → **UTILITIES** → **RazorpayX**. Under **RazorpayX**, go to **RazorpayX Bills** → **Bill Status**. + ![Steps to open the Bills Outstanding page](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-sync-purchase-vouchers3.gif.md) + The **Bills Outstanding (in Developer Mode)** page appears. +1. From the right menu, click **F2:Period** and enter the duration in the **From** and **To** fields. The bills for that duration load on the page. + + ![All the unsynced bills appear as Not Synced under Bill Status](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/unsynced-bills-purchase-voucher.jpg.md) + + The Bill Status is **Not Synced** for the invoices uploaded but not synced to RazorpayX. +1. Click spacebar on your keyboard to select a particular bill, or multiple bills, and click **S:Sync Selected Bills** to sync the selected bill/s. + ![Sync a specific bill from the duration or sync all bills](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-tally-int-sync-purchase-vouchers4.jpg.md) + You can also sync bills in bulk by clicking **A:Sync All Bills** from the right menu. +1. A dialogue box appears asking for confirmation of your action. Select **Yes** under **Do you want to sync bill to RazorpayX**. +1. Shift to your [RazorpayX Dashboard](https://x.razorpay.com/auth). Refresh the Vendor Payments Dashboard, and you can find that the latest invoice you have uploaded reflects in the topmost row. + +To verify the details of the invoice uploaded via Tally, click the invoice to open the invoice details view to the right of the page, as shown. + + ![latest bill synced in RazorpayX Vendor Payments Overview](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/purchase-vouchers-vpdashboard.jpg.md) + +This page shows the details as synced from Tally. +- The single tick mark under the **TALLY SYNC** column shows whether the invoice was synced from Tally. +- The double tick marks mean that the invoice is synced and reconciled too. + +> **INFO** +> +> +> **Handy Tips** +> +> In the invoice details pop-up page, you find the **Payout to vendor** section. This is the vendor's contact and bank details as saved in RazorpayX. +> +> If the section is empty, [create a Contact](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md) of the type Vendor and [create a Fund Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/fund-accounts.md) for that Contact. +> +> This is a one-time process. If you regularly make purchases from and payments to that Vendor, you can simply make regular [payments](#pay-invoices) to them. +> + +You have now successfully synced a Purchase Voucher made in Tally to RazorpayX. Know more about [syncing Payment Vouchers](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/sync-payment-vouchers.md). + +## Pay Invoices + +After you send and sync the vouchers in RazorpayX, you can pay the invoices in the following ways: +- [Pay your vendor immediately](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments.md). +- [Pay vendor partially](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/partial-payouts.md). +- [Schedule the vendor payment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/scheduled-payouts.md). +- [Make vendor payouts in bulk](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/bulk.md). + +All the payments made can be brought back to Tally. Know more about [bringing bills](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/bring-bills.md) to Tally from RazorpayX. + +### Related Information + +- [Bring Bills to Tally](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/tally/bring-bills.md) +- Keyboard shortcuts in [Tally Prime](https://help.tallysolutions.com/tally-prime/keyboard-shortcuts/keyboard-shortcuts-tally-prime/) diff --git a/llm-content/x/vendor-payments/vendor-payouts.md b/llm-content/x/vendor-payments/vendor-payouts.md new file mode 100644 index 00000000..bb8794c8 --- /dev/null +++ b/llm-content/x/vendor-payments/vendor-payouts.md @@ -0,0 +1,44 @@ +--- +title: Vendor Payouts +description: Explore bulk, scheduled and partial payouts for vendor invoices. +--- + +# Vendor Payouts + +RazorpayX enables you to make payouts towards vendor invoices in different ways. +You can choose to settle the dues against all the invoices raised by the vendor in one go, or make selective payments. You also have the option to schedule your payments at a future date and time. + +## Partial Payouts +Partial Payouts feature in RazorpayX enables you to make payouts in small chunks against one or more invoices of the vendor. You can also use Partial Payouts to pay at regular intervals to a vendor. + +Know more about [Partial Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/partial-payouts.md) + + ## Bulk Payouts +RazorpayX enables you to do bulk payouts against multiple invoices of a vendor in one shot. You can view the invoices, select the required invoices for payment and pay the entire amount in one go, or schedule it for a later date and time. + +Know more about [Bulk Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/bulk.md) + +> **INFO** +> +> +> **Handy Tips** +> +> Bulk payout against multiple invoices will be displayed as a single payout in the Payouts section of your dashboard. +> + +## Scheduled Payouts + +Most businesses benefit out of making payments on or just before the invoice due date. Making payments closer to due date or on due date helps in maintaining a higher net worth and a smoother cashflow, especially for SMEs and MSMEs. In such cases, scheduling the payouts to your vendors can be helpful. All you must do is, ensure that, on the day of processing the payout, you have adequate balance in your account. + +Scheduling payouts helps you to: +- Eliminate the need to do multiple checks. +- Ensure the due date is not missed. +- Be consistent with your payments thereby enhance your business relationship with your vendors. + +Know more about [Scheduled Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/scheduled-payouts.md) + +### Related Information + +- [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md) +- [Advances](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/advances.md) +- [Purchase Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/purchase-order.md) diff --git a/llm-content/x/vendor-payments/vendor-payouts/bulk.md b/llm-content/x/vendor-payments/vendor-payouts/bulk.md new file mode 100644 index 00000000..c4726b9c --- /dev/null +++ b/llm-content/x/vendor-payments/vendor-payouts/bulk.md @@ -0,0 +1,105 @@ +--- +title: RazorpayX | Bulk Vendor Payouts +heading: Bulk Vendor Payouts +description: View or pay your vendor bills, in parts or full, directly from the RazorpayX Dashboard. +--- + +# Bulk Vendor Payouts + +Using RazorpayX, you can settle the amount for multiple invoices in a single transaction. This way, you can have de-cluttered, cleaner bank statements. + +1. Log in to the [RazorpayX Dashboard](https://x.razorpay.com/auth). +2. Go to to **Vendor Payments** → **Vendors** → **Vendor Balances**. + +List of vendors with details such as **Vendor Name**, **Invoice Outstanding**, **Open Advances**, **Outstanding Balance** and **Last Invoice on** (date) is displayed. + + ## Full Settlement + + You can choose to clear the complete dues in one go rather than settling individual invoices. + + 1. Hover over the respective vendor from the list. You can see **View Invoices**, **View Advances** and **Settle Invoices** options under **Last Invoice on**. + + 2. Click **View Invoices** to view all the paid, unpaid and partially paid invoices raised by the vendor. + + 3. Click **View Advances** to view the used, partially used and unused advances for the vendor. + + 4. Click **Settle Invoices**. + + 5. Click **Apply advances** if you have made any advance payments to the vendor. This populates the final settlement amount less the advance(s) paid. Click **Settle anyway** to settle the dues without deducting the advance(s) paid. + + +> **INFO** +> +> +> **Handy Tips** +> +> - **Outstanding** amount is the total sum of invoices that are unpaid or partially paid to the vendor. +> - **Overdue** amount is the total sum of unpaid invoices past their due date. +> + + 6. Click **Pay/Schedule** to proceed with payment or **Mark as Paid** if the settlement has been made via other means. + - If you wish to proceed with **Mark as Paid**, select one of **Bank transfer**, **Cheque**, or **Cash** and enter comments (if any) to mark the settlement as complete. Once the settlement is marked paid, you cannot change the status to unpaid. + + 7. Click **Proceed**. Vendor name, phone number, email id, GST and registered account(s) are displayed. + + 8. Hover over the account/upi to which you wish to make the payment to view the **Select** button. + + 9. Click **Select** to view the payout details. You can see the vendor details, amount, payout purpose your debit account and transfer type. + + 10. Click **Add Attachment** to add a file of your choice. + + 11. Click **+Additional Details** to add notes and narration. Comments given under **Narration** will be passed to your and the vendor's bank statement. + + 12. Click **Next** to complete the payout or **Schedule Payout** to do the payout on a later date and time. + + 13. Enter the OTP to complete the payout/scheduled payout. + + 14. Click **Send for approval**. + + +> **INFO** +> +> +> **Handy Tips** +> +> This is recorded as one payout in the **Payouts** section of the Dashboard. +> + + + +## Selective Settlement + +If you do not want to pay for all the invoices but only some of them, follow the steps below: + +1. Hover over the respective vendor from the list and click **View Invoices**. +2. View all the invoices associated with that particular vendor. +3. Select the Invoices you want to pay. +4. Click **Pay Invoices**. The vendor name, phone number, email id, GST and registered account(s) are displayed. +5. Hover over the account/upi to which you wish to make the payment to view the **Select** button. +6. Click **Select** to view the payout details. You can see the vendor details, amount, payout purpose your debit account and transfer type. +7. Click **Add Attachment** to add a file of your choice. +8. Click **+Additional Details** to add notes and narration. Comments given under **Narration** will be passed to your and the vendor's bank statement. +9. Click **Next** to complete the payout or **Schedule Payout** to do the payout on a later date and time. +11. Enter the OTP to complete the payout/scheduled payout. +12. Click **Send for approval**. + +## Vendor Advice + +After the payment is made, the vendor receives an email with an advice which displays the total amount transferred along with a `.pdf` attachment which lists the invoice numbers, invoice date, paid amount, TDS deducted and the total amount against which the payment was made. + +- Below is a sample image of tax advice sent over email. + +![Tax Advice](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vendor-balances-4.jpg.md) + +- Below is a sample image of the `.pdf` attached to the email. + +![Invoice attachment](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vendor-balances-5.jpg.md) + +### Related Information + +- [Partial Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/partial-payouts.md) +- [Scheduled Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/scheduled-payouts.md) +- [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md) +- [Invoice Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/life-cycle.md) +- [Advances](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/advances.md) +- [Purchase Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/purchase-order.md) diff --git a/llm-content/x/vendor-payments/vendor-payouts/partial-payouts.md b/llm-content/x/vendor-payments/vendor-payouts/partial-payouts.md new file mode 100644 index 00000000..a60e89dc --- /dev/null +++ b/llm-content/x/vendor-payments/vendor-payouts/partial-payouts.md @@ -0,0 +1,58 @@ +--- +title: Partial Payouts on RazorpayX Vendor Payments +heading: Partial Payouts +description: Make and understand how partial payouts work on RazorpayX Vendor Payments. +--- + +# Partial Payouts + +Using RazorpayX, you can make partial payouts on a given invoice. The Partial Payouts feature eliminates the need for mulitple invoices and allows you to make many smaller payments on the same invoice. + +## How it Works + +Here is a typical business use case that explains how partial payments work: + +1. You receive either a **proforma invoice** (an invoice which is provided before delivery of the goods/services) or **payment terms** (details of advances, due date, delivery date, and so on) before accepting/confirming the order. +2. Create a vendor payment with or without uploading a proforma invoice. +3. Pay an advance to the vendor based on payment terms. +4. You receive a second invoice post-delivery of goods/services. +5. Replace/Upload the latest invoice after receiving it. +6. Make a partial payment because one of the goods was not delivered or because of service quality issues. +7. The vendor rectifies/completes the pending transaction and sends an updated invoice. +8. Pay the remaining amount to match the new invoice amount. + +## Make Partial Payouts + +To make a partial payout: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/). +2. Navigate to **Menu** → **Vendor Payments**. +3. Select the invoice you want to pay partially. A pop-up screen appears to the right side of the screen. +4. In this window, click or hover over the options arrow next to the **PAY/SCHEDULE** button for the drop-down menu to appear. Here, click **PAY PARTIALLY**. + ![Select Pay Partially in the pop-up window on RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-partial-payouts-select.jpg.md) +5. You must now create a payout. + - In the **New Payout** window, enter the Contact's valid details and [create a Fund Account](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#create-a-contact-with-fund-account) if the Contact doesn't have one. You can also select the [Contact type](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/contacts.md#contact-types) to be `Vendor`. + - Your contact, fund account and payout progress is automatically saved in RazorpayX. If you quit the **New Payout** window, or click **BACK**, you can always restart from the **Edit Invoice Screen**, as shown. + ![Edit Invoice screen showing all the invoice details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-partial-payouts-edit-invoice.jpg.md) +6. Finalise all the payout details and click **Next**. + +> **INFO** +> +> +> **Handy Tips** +> - If you click on **Pay in Full** instead of paying partially, the invoice gets updated to match the same. You can select **Pay Partially** once again to update the invoice. +> - Ensure to enter the correct amount when making partial payout. This amount should **always** be less than the actual payment to be made. +> + +7. Enter OTP and complete the payment. + +After you make a Partial Payout, the invoice status changes to `Partially Paid`. + +### Related Information + +- [Bulk Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/bulk.md) +- [Scheduled Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/scheduled-payouts.md) +- [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md) +- [Invoice Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/life-cycle.md) +- [Advances](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/advances.md) +- [Purchase Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/purchase-order.md) diff --git a/llm-content/x/vendor-payments/vendor-payouts/scheduled-payouts.md b/llm-content/x/vendor-payments/vendor-payouts/scheduled-payouts.md new file mode 100644 index 00000000..15e9e13e --- /dev/null +++ b/llm-content/x/vendor-payments/vendor-payouts/scheduled-payouts.md @@ -0,0 +1,46 @@ +--- +title: RazorpayX | Vendor Payments - Scheduled Payouts +heading: Scheduled Payouts +description: Explore when and how you can schedule payouts to vendors in RazorpayX Vendor Payments app. +--- + +# Scheduled Payouts + +Scheduling payouts helps to manage your payments in a more organised way. You can use the [Vendor Payments app in RazorpayX](https://x.razorpay.com/vendor-payments) to schedule payouts. + +Here are some typical business use cases where you can schedule payouts: + +- You receive an invoice from your vendor with a due date against it. You decide to pay the invoice exactly on the due date. +- You wish to pay all the invoices of a particular vendor in a specific time range at the end of the fortnight/month or payment cycles. +- You receive an invoice based on some payment terms agreed with the vendor, which mandates payment to be made exactly after `x` days post the invoice date. + +In all these cases, you can schedule the payout accordingly. + +## Schedule Payouts + +To schedule a payout: + +1. Log in to your [RazorpayX Dashboard](https://x.razorpay.com/vendor-payments). +2. Navigate to **Menu** → **Vendor Payments**. +3. Click **+ INVOICE**. +4. Continue to upload the invoice or click **CONTINUE WITHOUT UPLOAD** to manually enter the details. +5. Add the Invoice Details, Vendor Details, and Amount Details. +6. Click **REVIEW INVOICE** to cross-check the payout details. +7. Click **Pay/Schedule Invoice** as shown here: + ![Edit Invoice screen showing all the invoice details](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-partial-payouts-edit-invoice.jpg.md) +8. It takes you to the **New Payout** window. Here you can finalise the payout details. Once done, click **Schedule Payout**, as shown. + ![Schedule payout in New Payout window in RazorpayX](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-schedule-payouts.jpg.md) + Once you click **Schedule Payout**, you see the calendar and time options on your screen. Select the date on the calendar and also the time of day when you want RazorpayX to process your scheduled payout, as shown. + ![Update the calendar and the time to schedule payout](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/assets/images/x-vp-schedule-payouts-calendar-time.jpg.md) +9. Click **CONFIRM**. +10. Authenticate the transaction using OTP. + +After you schedule a payout, the invoice status changes to `Scheduled`. + +### Related Information +- [Bulk Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/bulk.md) +- [Partial Payouts](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/vendor-payouts/partial-payouts.md) +- [Invoices](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/invoices.md) +- [Invoice Life Cycle](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/life-cycle.md) +- [Advances](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/advances.md) +- [Purchase Orders](https://raw.githubusercontent.com/razorpay/razorpay-php-testapp/markdown-docs/llm-content/x/vendor-payments/purchase-order.md)